Index: Dev/branches/Demo/Aapje.php
===================================================================
--- Dev/branches/Demo/Aapje.php	(revision 225)
+++ Dev/branches/Demo/Aapje.php	(revision 225)
@@ -0,0 +1,155 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['userUid'])) {
+    redirect("index.php");
+}
+
+if (isset($_SESSION['message'])) {
+    echo $_SESSION['message'];
+    unset($_SESSION['message']);
+}
+
+$dbi = new DatabaseInterface();
+
+$sessions = $dbi->get("Session", array());
+
+$questions = $dbi->get("question");
+?>
+<!-- Javascript multiple selection-->   
+<script language="JavaScript" type="text/javascript">
+
+    var infoTimer = null;
+    
+    function loopSelected()
+    {
+        var txtSelectedValuesObj = document.getElementById('txtSelectedValues');
+        var selectedArray = new Array();
+        var selObj = document.getElementById('selSeaShells');
+        var count = 0;
+        for (var i=0; i<selObj.options.length; i++) {
+            if (selObj.options[i].selected) {
+                selectedArray[count] = selObj.options[i].value;
+                count++;
+            }
+        }
+        
+        txtSelectedValuesObj.value = selectedArray;
+    }
+    function openInNewWindow(frm)
+    {
+        // open a blank window
+        var aWindow = window.open('', 'NewWindow',
+        'scrollbars=yes,menubar=no,resizable=no, location=yes, toolbar=no, fullscreen=yes');
+  
+        // set the target to the blank window
+        frm.target = 'NewWindow';
+  
+        // submit
+        frm.submit();
+    }
+    
+    function clickForInfoS(uid) {
+        // Start delay
+        // After delay, call AJAX
+        // Update Info Panel
+        if (infoTimer) {
+            window.clearTimeout(infoTimer);
+        }
+        
+        infoTimer = window.setTimeout(ajaxInfoRequest, 500, uid, ge('iPanel'), "Session");
+    }
+    
+    function clickForInfoQ(uid) {
+        // Start delay
+        // After delay, call AJAX
+        // Update Info Panel
+        if (infoTimer) {
+            window.clearTimeout(infoTimer);
+        }
+        
+        infoTimer = window.setTimeout(ajaxInfoRequest, 500, uid, ge('iPanel'), "Question");
+    }
+</script>
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+        <title>Data selection</title>
+        <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/generalScripts.js"></script>
+
+        <?php
+        new StyleSheet("visualeditors");
+        ?>
+
+    </head>
+
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="content">
+            <a href="selectSession.php">Ga naar de selectSession</a>
+        </div>      
+        
+        
+        <div class=largeFrame C" id="sessionResultList">
+            <div class="largeTitle">Sessions</div>
+            <div class="checkboxList">
+                <?php
+                foreach ($sessions as $session) {
+                    // First checkbox, then descriptor
+                    echo "<input type='checkbox' id='" . $session->uid . "' style='margin-right: 10px;' />";
+                    echo "<label for='" . $session->uid . "' onClick='clickForInfoS(this.id);'>" . $session->title . "</label><br />";
+                }
+                ?>
+            </div>
+            <div class="controls">
+                <input type="button" value="Select data" class="smallButton" onclick="loopSelected();" />
+               // <input type="button" value="Submit" class="smallButton" onclick="openInNewWindow(this.form);" />
+            </div>
+        </div>
+
+        
+        <div class="largeFrame C" id="gamedataResultList">
+            <div class="largeTitle">Game Data</div>
+            <div class="checkboxList">
+                <?php
+                $questions = $dbi->get("Question", array());
+                foreach ($questions as $question) {
+                    // First checkbox, then descriptor
+                    echo "<input type='checkbox' id='" . $question->uid . "' style='margin-right: 10px;' />";
+                    echo "<label for='" . $question->uid . "' onClick='clickForInfoQ(this.id);'>" . $question->title . "</label><br />";
+                }
+                ?>
+            </div>
+            <div class="controls">
+                <input type="button" value="Select data" class="smallButton" onclick="loopSelected();" />
+                <input type="button" value="Submit" class="smallButton" onclick="openInNewWindow(this.form);" />
+            </div>
+        </div>
+
+        
+        
+        
+        
+        
+        
+        <div class="largeFrame C">
+            <a href="Dprobeersel.php">
+                <img src="images/icons/dashboard2.png" width="245" height="140"></img>
+            </a>
+        </div>  
+
+        <div class="largeFrame Cu" id="iPanel">
+            INFOPANEL
+        </div>
+    </body>       
+</html>
+
+
+
+
Index: Dev/branches/Demo/DProbeersel.php
===================================================================
--- Dev/branches/Demo/DProbeersel.php	(revision 225)
+++ Dev/branches/Demo/DProbeersel.php	(revision 225)
@@ -0,0 +1,107 @@
+    <?php
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['userUid'])) {
+    redirect("index.php");
+}
+
+if (isset($_SESSION['message'])) {
+    echo $_SESSION['message'];
+    unset($_SESSION['message']);
+}
+
+$dbi = new DatabaseInterface();
+$data = JSON_decode($_POST['selectedData']);
+
+new StyleSheet("visualEditors");
+
+?>
+
+<html>
+    <head>
+
+    <!-- 1/3. Include the RGraph libraries -->
+    <script src="RGraph/libraries/RGraph.common.core.js" ></script> 
+    <script src="RGraph/libraries/RGraph.common.context.js" ></script> 
+    <script src="RGraph/libraries/RGraph.common.annotate.js" ></script> 
+    <script src="RGraph/libraries/RGraph.common.tooltips.js" ></script> 
+    <script src="RGraph/libraries/RGraph.common.zoom.js" ></script> 
+    <script src="RGraph/libraries/RGraph.radar.js" ></script>   
+    
+   <script> 
+        window.onload = function ()
+        {
+            if (RGraph.isIE8()) {
+                ShowGraph1();
+                ShowGraph2();
+                ShowGraph3();
+            }
+        }
+        
+        function ShowGraph1 ()
+        {
+            var radar1 = new RGraph.Radar('radar5', [43,84,54,64,34,21,21], [52,30,51,41,22,23,56]);
+            radar1.Set('chart.colors', ['rgba(255,0,0,0.3)']);
+            radar1.Set('chart.labels.axes', 'n');
+            radar1.Set('chart.circle', 50);
+            radar1.Set('chart.circle.fill', 'rgba(0, 0, 255, 0.3)');
+            radar1.Set('chart.tooltips', [
+                                           'Dave (43)', 'John (84)', 'Kiffen (54)', 'Peter (64)', 'Lou (34)', 'Igor (21)', 'John (21)',
+                                           'Dave (52)', 'John (30)', 'Kiffen (51)', 'Peter (41)', 'Lou (22)', 'Igor (23)', 'John (56)',
+                                          ]);
+            radar1.Set('chart.colors', ['green', 'red']);
+            radar1.Set('chart.colors.alpha', 0.5);
+            //radar1.Set('chart.title', 'The results of the competition');
+            radar1.Set('chart.labels', ['Dave (43)', 'John (84)', 'Kiffen (54)', 'Peter (64)', 'Lou (34)', 'Igor (21)', 'John (21)']);
+            radar1.Set('chart.tooltips.effect', 'fade');
+            radar1.Draw();
+        }
+        
+        function ShowGraph2 ()
+        {
+            var radar = new RGraph.Radar('radar2', [7,6,6,7,8], [6,7,7,6,6], [4,5,6,10,4]);
+            radar.Set('chart.strokestyle', 'black');
+            radar.Set('chart.colors.alpha', 0.3);
+            radar.Set('chart.colors', ['red', 'green', 'yellow']);
+            //radar.Set('chart.title', 'Multiple datasets, key');
+            radar.Set('chart.tooltips.effect', 'snap');
+            radar.Set('chart.tooltips', [
+                                          'Pete in 2000','Lou in 2000','Jim in 2000','Jack in 2000','Fred in 2000',
+                                          'Pete in 2001','Lou in 2001','Jim in 2001','Jack in 2001','Fred in 2001',
+                                          'Pete in 2002','Lou in 2002','Jim in 2002','Jack in 2002','Fred in 2002'
+                                         ]);
+            radar.Set('chart.key', ['2000','2001','2002']);
+            radar.Set('chart.key.position', 'graph');
+            radar.Set('chart.labels', ['Pete','Lou','Jim','Jack','Fred']);
+            radar.Set('chart.gutter.top', 35);
+            radar.Draw();
+        }
+    </script> 
+ 
+</head> 
+  
+<body>
+    
+    <!-- 2/3. This is the canvas that the graph is drawn on -->
+    <div class="largeFrame">
+                <canvas id="radar5" width="450" height="300">[No canvas support]</canvas>
+                <canvas id="radar2" width="450" height="300">[No canvas support]</canvas> 
+    </div>
+      
+        <script> 
+        if (!RGraph.isIE8()) {
+            ShowGraph1();
+            ShowGraph2();
+        }
+    </script> 
+    
+    
+    <div class="smallFrame" id="dataField">
+        <?php              
+       var_dump($data);
+        ?>
+    </div>
+    
+</body>
+
+</html>
Index: Dev/branches/Demo/RGraph/LICENSE.txt
===================================================================
--- Dev/branches/Demo/RGraph/LICENSE.txt	(revision 225)
+++ Dev/branches/Demo/RGraph/LICENSE.txt	(revision 225)
@@ -0,0 +1,91 @@
+THE RGRAPH LICENSE VERSION 1.5.5
+
+This license applies to any software originating from the www.rgraph.net website.
+Such software is herein referred to as the Software. This license covers
+modification and distribution of the Software, use of third-party application
+programs based on the Software, and development of software which uses the
+Software. Note that ExCanvas is covered by the Apache license.
+
+
+SUMMARY
+
+
+A summary of the license is that non-commercial use of the Software is free,
+whilst for commercial use there is a one-time fee of £79 (GBP).
+
+
+
+GRANTED RIGHTS
+
+
+1. You are granted the non-exclusive rights set forth in this license
+   provided you agree to and comply with any and all conditions in
+   this license. Whole or partial use or distribution of the Software,
+   signifies acceptance of this license.
+
+
+2. You may copy and distribute the Software in unmodified form
+   provided that the entire package, including - but not restricted to
+   - copyright, trademark notices and disclaimers, as released by the
+   initial developer of the Software, is distributed. See clause (3)
+   regarding the inclusion of this license document with your software.
+
+
+3. You may develop application programs, reusable components and other
+   software items that use the original or modified versions of the
+   Software. You may distribute these programs or components as long
+   as this license is distributed along with the Software. If you have
+   purchased an RGraph license you do not need to include this license
+   document with your software.
+
+
+4. For commercial use you are required to buy a license from the copyright
+   holder. A commercial license permits you to use any code you wish that
+   originated from the RGraph website (www.rgraph.net). This license is
+   £79 (UK pounds). Commercial use incorporates applications, websites
+   (regardless of whether they sell products or services or simply promote
+   them), intranets and use in offline materials.
+   
+   
+5. Non-commercial use (eg personal, charity, government and educational)
+   is permitted. Please link back to the RGraph website. Example code as
+   follows:
+
+   <a href="http://www.rgraph.net" target="_blank">
+        RGraph: Javascript charts and graph library
+   </a>
+
+   Alternatively, if you don't wish to link to the RGraph website, you can
+   buy an RGraph license and you won't need to.
+
+
+LIMITATIONS OF LIABILITY
+
+In no event shall the initial developers or copyright holders be
+liable for any damages whatsoever, including - but not restricted to
+- lost revenue or profits or other direct, indirect, special,
+incidental or consequential damages, even if they have been advised
+of the possibility of such damages, except to the extent invariable
+law, if any, provides otherwise.
+
+
+NO WARRANTY
+
+The Software and this license document are provided AS IS with NO
+WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+CHOICE OF LAW
+
+This license is governed by the Laws of England. Disputes shall be
+settled by Chelmsford town court.
+
+
+QUESTIONS
+
+Any questions or queries about this license or its extent should
+be directed to licensing@rgraph.net
+
+
+
Index: Dev/branches/Demo/RGraph/css/ModalDialog.css
===================================================================
--- Dev/branches/Demo/RGraph/css/ModalDialog.css	(revision 225)
+++ Dev/branches/Demo/RGraph/css/ModalDialog.css	(revision 225)
@@ -0,0 +1,90 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+
+    /**
+    * Modal Dialog
+    */
+    .modalBg {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        filter: Alpha(Opacity=50);
+        -moz-opacity: 0.5;
+        background-color: #ddd;
+        visibility: hidden;
+        width: expression(document.body.clientWidth);
+        height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight);
+        z-index: 100;
+    }
+
+    .modalDialog {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        visibility: hidden;
+        z-index: 101;
+        background-color: white;
+        top: expression(document.body.clientHeight / 2 - this.offsetHeight / 2);
+        left: expression(document.body.clientWidth / 2 - this.offsetWidth / 2);
+        border: 1px solid #777;
+        border-top: 0;
+        padding: 20px;
+        border-radius: 5px;
+        -moz-border-radius: 5px;
+        -webkit-border-radius: 5px;
+    }
+
+    .modalDialog .modalDialogHeader {
+        margin:0;
+        padding: 0px;
+        color: #333;
+        font-weight: bold;
+        background-color: #ccc;
+        border: 1px solid #989898;
+        position: absolute;
+        top: 0px;
+        left: -1px;
+        height: 7px;
+        border-radius: 5px;
+        -moz-border-radius: 5px;
+        -webkit-border-radius: 5px;
+        -moz-border-radius-bottomleft: 0;
+        -moz-border-radius-bottomright: 0;
+        -webkit-border-bottom-left-radius: 0;
+        -webkit-border-bottom-right-radius: 0;
+    }
+
+    .modalShadow {
+        position: absolute;
+        background-color: black;
+        top: 0px;
+        left: 0px;
+        z-index: 99;
+        top: expression(document.body.clientHeight / 2 - this.offsetHeight / 2);
+        left: expression(document.body.clientWidth / 2 - this.offsetWidth / 2);
+        border-radius: 5px;
+        -moz-border-radius: 5px;
+        -webkit-border-radius: 5px;
+        opacity: 0.5;
+    }
+
+    /**
+    * This is not part of the core Modal Dialog styles, instead it's just so that the dialog looks
+    * respectable.
+    */
+    h4 {
+        font-family: Verdana, Arial;
+        padding-top: 10px;
+    }
Index: Dev/branches/Demo/RGraph/css/common.css
===================================================================
--- Dev/branches/Demo/RGraph/css/common.css	(revision 225)
+++ Dev/branches/Demo/RGraph/css/common.css	(revision 225)
@@ -0,0 +1,299 @@
+@font-face {
+    font-family: Delicious;
+    src: url('/Delicious-Roman.otf')
+}
+
+/**
+* Various
+*/
+body {
+    margin: 0px;
+}
+
+a {
+    text-decoration: none;
+}
+
+code {
+    background-color: #dedede;
+    border: 1px dashed #aaaaaa;
+    padding: 3px;
+    display: block;
+    font-family: Monospace;
+}
+
+
+/**
+* Datagrid stuff
+*/
+table.datagrid {
+    border-collapse: collapse;
+    margin-left: 30px;
+}
+
+table.datagrid th {
+    background-color: #ccc;
+    border: 1px solid #aaa;
+    padding: 2px;
+}
+
+table.datagrid tr {
+    background-color: #ddd;
+}
+
+table.datagrid tr.oddrow {
+    background-color: #eee;
+}
+
+table.datagrid td {
+    border: 1px solid #aaa;
+    padding: 3px;
+}
+
+
+/**
+* Master div
+*/
+.master {
+    font-family: Georgia;
+}
+
+
+/**
+* Header section
+*/
+.header {
+    margin-right: 10px;
+    letter-spacing: 2px;
+    background-image: url(/images/hdrbg.jpg);
+    margin-left: 10px;
+}
+
+.header h1 {
+    margin-top: 0px;
+}
+
+.tagline {
+    font-size: 8pt;
+    position: relative;
+    top: -15px;
+    left: 15px;
+    letter-spacing: 0px;
+}
+
+
+/**
+* Top nav
+*/
+.topnav {
+    color: white;
+    background-color: #314657; /* Old */
+    background-color: #2D4B33;
+    padding: 1px;
+    padding-left: 10px;
+}
+
+.topnav a {
+    color: white;
+}
+
+
+/**
+* Left nav
+*/
+.leftnav,
+.searchbox {
+    width: 180px;
+    color: black;
+    background-color: #FF5A18;
+    margin-left: 5px;
+    margin-top: 10px;
+    padding: 10px;
+    padding-top: 0;
+    padding-bottom: 0;
+    padding: expression('10px');
+    border: 1px solid #B33E11;
+}
+
+.leftnav {
+
+    box-shadow: 0 0 15px #aaa;
+    -moz-box-shadow: 0 0 15px #aaa;
+    -webkit-box-shadow: 0 0 15px #aaa;
+
+    border-radius: 5px;
+    -moz-border-radius: 5px;
+    -webkit-border-radius: 5px;
+    width: 180px;
+    float: left;
+    hmargin: 5px;
+}
+
+.leftnav h4 {
+    border-bottom: 1px solid black;
+}
+.leftnav a {
+    color: black;
+}
+
+.leftnav ul {
+    margin-left: -20px;
+    margin-left: expression('20px');
+    list-style-type: square;
+}
+
+
+/**
+* Main body section
+*/
+.mainbody {
+    margin-left: 220px;
+}
+
+.borderedTable table {
+    border-collapse: collapse;
+}
+
+.borderedTable th {
+    background-color: #dddddd;
+    border: 1px solid #aaaaaa;
+    font-size: 70%;
+    padding-left: 3px;
+    padding-right: 3px;
+}
+
+.borderedTable td {
+    vertical-align: top;
+    font-size: 70%;
+    border: 1px solid #dddddd;
+}
+
+.newsitem {
+    margin-bottom: 25px;
+}
+
+.newsitem h2,
+.newsitem h1 {
+    display: inline;
+}
+
+.newsitem .date {
+    font-size: 70%;
+}
+
+p.firstLetter:first-letter {
+    font-size: 200%;
+    font-style: italic;
+    font-weight: bold;
+    float: left;
+    padding-right: 3px;
+}
+
+.newsitem p.update {
+    background-color: #efefef;
+    border: 1px dashed black;
+    padding: 5px; 
+}
+
+
+/**
+* Comments
+*/
+.comment {
+    padding: 5px;
+    margin-bottom: 20px;
+    font-size: 80%;
+    background-color: #efefef;
+    border: 1px dashed #cccccc;
+}
+
+.comment .body {
+    margin-top: 5px;
+    padding-left: 7px;
+}
+
+.comment .quoteLink {
+    text-align: right;
+    font-size: 90%;
+}
+
+
+/**
+* Errors
+*/
+.error {
+    color: red;
+    font-style: italic;
+}
+
+
+/**
+* Copyright text
+*/
+.copyright {
+    text-align: right;
+    font-size: 75%;
+}
+
+
+/**
+* Admin page
+*/
+.adminPage table {
+    font-family: Verdana;
+    font-size: 10pt;
+}
+
+.adminPage th {
+    background-color: #dddddd;
+}
+
+
+/**
+* Tools page
+*/
+#toolsPage th,
+#toolsPage td {
+}
+
+#toolsPage th {
+    font-weight: bold;
+    text-align: right;
+    white-space: nowrap;
+    vertical-align: top;
+    background-color: #ffffcc;
+}
+
+#toolsPage textarea {
+    height: 200px;
+    width: 800px;
+    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#ffffff, endColorstr=#ffffcc);
+}
+
+#shortcuts th {
+    
+}
+
+#shortcuts th {
+    text-align: left;
+    background-color: #ededed;
+    padding: 2px;
+}
+
+/**
+* Download header/footer
+*/
+div#download pre,
+div#download pre a {
+    
+}
+
+/**
+* Code
+*/
+div.boxout,
+pre.code {
+    border: 2px dashed gray;
+    padding: 3px;
+    background-color: #eee;
+}
Index: Dev/branches/Demo/RGraph/css/index.html
===================================================================
--- Dev/branches/Demo/RGraph/css/index.html	(revision 225)
+++ Dev/branches/Demo/RGraph/css/index.html	(revision 225)
@@ -0,0 +1,2 @@
+<?php
+    header('Location: /');
Index: Dev/branches/Demo/RGraph/css/website.css
===================================================================
--- Dev/branches/Demo/RGraph/css/website.css	(revision 225)
+++ Dev/branches/Demo/RGraph/css/website.css	(revision 225)
@@ -0,0 +1,238 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+
+body {
+    padding-top: 10px;
+    font-family: Arial, Sans-Serif;
+}
+
+h1,
+h2 {
+}
+
+h1 span,
+h2 span {
+    color: #65AEFF;
+    font-style: italic;
+}
+
+a#read-more {
+}
+
+pre#code,
+code {
+    display: block;
+    border: 1px solid #aaa;
+    padding: 5px;
+    background-color: #ddd;
+}
+
+#breadcrumb,
+#logo {
+    border: 2px black solid;
+    background-color: #eee;
+    padding: 3px;
+    top: 0;
+    right: 0;
+    position: absolute;
+    margin: 2px;
+    opacity: 0.8;
+    border-radius: 5px;
+}
+#breadcrumb a,
+#logo a {
+    text-decoration: none;
+}
+
+th {
+    text-align: left;
+    border: 1px solid gray;
+    background-color: #ddd;
+    padding: 3px;
+    vertical-align: top;
+}
+
+td {
+    vertical-align: top;
+}
+
+ol li {
+    margin-top: 20px;
+}
+
+ol#implementation li code {
+    margin-top: 5px;
+}
+
+td.description {
+    background-color: #eee;
+    padding: 3px;
+    border: 1px solid #ddd;
+}
+
+td.chart {
+    text-align: center;
+}
+
+.example_boxout {
+    background-color: #eee;
+    padding: 3px;
+    border: 1px solid #aaa;
+}
+
+.code {
+    padding: 5px;
+    background-color: #eee;
+    border: 2px dashed gray
+}
+
+/**
+* This is semi-transparent box in the top left corner
+*/
+div#devtag {
+    -moz-border-radius: 5px;
+    -webkit-border-radius: 5px;
+    border-radius: 5px;
+    -webkit-box-shadow: #999 3px 3px 3px;
+    -moz-box-shadow: #999 3px 3px 3px;
+    box-shadow: #999 3px 3px 3px;
+    filter: progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135);
+    position: fixed;
+    top: 2px;
+    right: 2px;
+    width: 145px;
+    border: 2px solid black;
+    text-align: center;
+    font-weight: bold;
+    font-family: Arial;
+    background-color: #fdd;
+    z-index: 1001;
+    opacity: 0.8;
+}
+
+div#devtag a {
+    font-size: 10px;
+    text-decoration: none;
+    color: blue;
+    opacity: 1;
+}
+
+/**
+* This overrides something defined earlier
+*/
+ol#colors li {
+    margin: 0;
+}
+
+/**
+* styles lists
+*/
+div.list-item {
+    width: 220px;
+    display: inline-block;
+}
+
+div.list-item.label {
+    width: 170px;
+}
+
+legend {
+    background-color: #efefef;
+    border: 1px solid #75736e;
+}
+
+body#licensing span {
+    font-size: 120%;
+}
+
+/**
+* The yellow warning box on the front page
+*/
+div.warning {
+    border: 1px solid black;
+    text-align: center;
+    background-color: #ffa;
+    padding: 5px;
+    margin-top: 5px;
+    border-radius: 15px;
+    -moz-border-radius: 15px;
+    -webkit-border-radius: 15px;
+    -webkit-box-shadow: #aaa 1px 1px 15px;
+    -moz-box-shadow: #aaa 1px 1px 15px;
+    box-shadow: #aaa 1px 1px 15px;
+    filter: progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135);
+    z-index: 98;
+}
+
+div.canvasfallback {
+    border: 2px dashed red;
+    background-color: #fee;
+    width: 475px;
+    height: 150px;
+    text-align: center;
+    padding-top: 50px;
+}
+
+/**
+* The title "bar"
+*/
+div#title {
+}
+
+div#title div#image {
+    float: left;
+    margin-right: 15px;
+}
+
+div#title div#text {
+    padding-top: 5px;
+    margin-left: 70px;
+}
+
+
+div.warning p {
+    text-align: center;
+    margin-top: 5px;
+    margin-bottom: 5px;
+    font-weight: bold;
+}
+
+        
+div.description {
+    border: 1px dashed gray;
+    background-color: #eee;
+    font-size: 75%;
+    padding: 3px;
+}
+
+div#social {
+    display: inline;
+    display: inline-block;
+}
+
+.upgrade_notice {
+    display: inline;
+    display: inline-block;
+    text-align: center;
+    background-color: yellow;
+    border: 1px black solid;
+    border-radius: 10px;
+    -webkit-border-radius: 10px;
+    -moz-border-radius: 10px;
+    padding: 3px;
+    padding-left: 5px;
+    padding-right: 5px;
+}
Index: Dev/branches/Demo/RGraph/docs/.BC.txt
===================================================================
--- Dev/branches/Demo/RGraph/docs/.BC.txt	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/.BC.txt	(revision 225)
@@ -0,0 +1,194 @@
+
+  Backwards compatibility breaks and advisories
+ ===============================================
+
+                +---------------------------------------------------------------------------------------+
+ o [29-07-2011] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+  o [30-07-2011] When using Line chart specific labels in conjunction with chart.ymin the label positioning
+                 has changed - the labels now start at the X axis vertical position.
+  o [20-07-2011] The chart.segments option is no longer mmaintained - use obj.angles instead
+  o [20-07-2011] When adding a Line chart to a Bar chart some of the Line chart properties are no longer set for you -
+                 you will need to set these yourself if you want them. They are (along with what they were set to):
+
+                    lineObj.Set('chart.noaxes', true);
+                    lineObj.Set('chart.background.barcolor1', 'rgba(0,0,0,0)');
+                    lineObj.Set('chart.background.barcolor2', 'rgba(0,0,0,0)');
+                    lineObj.Set('chart.background.grid', false);
+                    lineObj.Set('chart.ylabels', false);
+
+  o [17-07-2011] The default CSS has been altered for tooltips. This affects all chart types. The changes are:
+                  o There is now no CSS border to the tooltip
+                  o The toltip is now transparent a small amount (opacity=0.9)
+                  o The tooltip shadow X & Y offsets are now zero
+
+                 If you wish to revert these changes you will need to use the tooltip CSS class:
+
+                <style>
+                    .RGraph_tooltip {
+                        // ...
+                    }
+                </style>
+
+                +---------------------------------------------------------------------------------------+
+ o [12-07-2011] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [02-07-2011] The Tradar chart has been renamed to the Radar chart. This will make more identifiable. You WILL
+                need to update you code to the new name!
+ o [25-06-2011] The HBar default colors have changed.
+ o [18-06-2011] The Rose chart has undergone significant changes, now supporting a "stacked" Rose chart as well as
+                a "non-equi-angular" variant. It also now supports chart.colors.sequential property and
+                the default chart.strokestyle value has been changed to rgba(0,0,0,0.5). You may need to set the
+                chart.colors.sequential (to true) to maintain BC.
+
+                +---------------------------------------------------------------------------------------+
+ o [04-06-2011] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [04-06-2011] MAJOR BREAK: The chart.gutter property has been split into four properties:
+                 o chart.gutter.left
+                 o chart.gutter.right
+                 o chart.gutter.top
+                 o chart.gutter.bottom
+                This affects all graph types (except the LED chart) so rigorous testing will be necessary if
+                you choose to upgrade.
+ o [14-05-2011] If you're using chart.width/chart.height, please switch to the individual gutter settings. These
+                provide finer grained and more intuitive control over the gutters and certain things are done for you
+                automatically, like for example adjusting coordinates for tooltips and resizing. The chart.width and
+                chart.height will cease to function starting immediately.
+ o [02-04-2011] The default color for background bars on the Scatter has changed from white to transparent. This was
+                necessary to facilitate background images
+
+                +---------------------------------------------------------------------------------------+
+ o [26-03-2011] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+ 
+ o [12-03-2011] The RGraph.Clear() API function now clears to transparent, not white. If you wanted it to clear to white
+                you could call this function from the new onclear event:
+
+                function myClear(obj)
+                {
+                    obj.context.beginPath();
+                    obj.context.fillStyle = 'white';
+                    obj.context.fillRect(-10,-10,obj.canvas.width + 20, obj.canvas.height + 20);
+                    obj.context.fill();
+                }
+                
+                DO NOT simply use the RGraph.Clear() function in the onclear event listener function, as you will create an
+                infinite loop.
+
+ o [06-03-2011] The RGraph.getSegment() method has been moved to be a part of both the Pie and Rose objects. This means
+                that if you use it you will have to change your code slightly. This change was necessary to facilitate
+                Pie chart exploded segments. This change will also help prevent bugs in this function in the future.
+ 
+                +---------------------------------------------------------------------------------------+
+ o [28-01-2011] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+                
+ o [22-01-2011] The RGraph.Clear() function now uses a square 2,000 pixels wide & high
+ o [15-01-2011] The Gantt adjusting array (kept in the RGraph registry) now uses associative/textual keys instead of numeric ones
+ o [08-01-2011] The default number of Line chart X tickmarks has been altered ever-so-slightly: Now if you don't have chart.hmargin
+                set then the X tickmarks will line up with the points on the chart. See the first example on the line chart test
+                page for an example: http://dev.rgraph.net/tests/_line.html
+ o [08-01-2011] The custom RGraph event onannotatestart has been renamed to onannotatebegin. The previous name will still work,
+                but will eventually be removed.
+ 
+                +---------------------------------------------------------------------------------------+
+ o [24-12-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [04-12-2010] chart.key.vpos is now silently converted to chart.key.position.y (note that these two properies behave slightly
+                differently - chart.key.position.y is an absolute coordinate). ALSO; the key has been rewritten, so check that
+                your graphs are working as you expect
+ o [04-12-2010] The HBar labels (from chart.labels.above) now have an extra property (chart.labels.above.decimals) which controls
+                how many decimals are shown. This defaults to 0, and as a result you may need to set this if you're expecting decimals.
+ 
+                +---------------------------------------------------------------------------------------+
+ o [27-11-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [20-11-2010] For the line/bar/scatter, when the X axis is at the bottom and there is a background bar with a 
+                negative start (or it results in a negative end value), you now get a warning.
+ o [13-11-2010] All line chart labels are now shown, regardless of how many points on the line there are.
+ o [06-11-2010] The HBar and Scatter have had their scaled handling changed slightly - now if you specify a maximum Y value,
+                that is what is used.
+ o [06-11-2010] The API function RGraph.getSCale(max, obj) now takes two arguments - the maximum value and the graph object.
+
+                +---------------------------------------------------------------------------------------+
+ o [30-10-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [30-10-2010] The Scatter chart can now only have 1/3/5 labels
+ o [30-10-2010] The Line chart can now only have 1/3/5 labels
+ o [23-10-2010] The Bar chart can now only have 1/3/5/10 labels
+ o [23-10-2010] The default for chart.scale.decimals has changed, as such you may need to specify this:
+                myScatter.Set('chart.scale.decimals', 0);
+ o [09-10-2010] Scatter chart ticksize has changed behaviour slightly, you therefore may need to alter it slightly.
+
+                +---------------------------------------------------------------------------------------+
+ o [25-09-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [18-09-2010] For IE9 compatibility purposes, the IE8 DirectX shadow has been removed from the ModalDialog. This only affects
+                MSIE8. The background is still semi-opaque.
+ o [18-09-2010] The common function RGraph.isIE9() has changed to RGraph.isIE9up(). The old one will continue to work, but
+                not indefinitely.
+ o [11-09-2010] The Odometer properties chart.units.pre and chart.units.post have now changed to chart.value.units.pre
+                and chart.value.units.post. The properties chart.units.post and chart.units.pre are now used for the main
+                labels.
+ o [04-09-2010] HBar and Pie charts have been moved to DOM2 event registration for tooltips
+ o [04-09-2010] The RGraph.number_format() function has had its argument list changed
+ o [04-09-2010] Now that RGraph is moving to DOM2 event handlers, tooltips will be incompatible with IE8
+
+                +---------------------------------------------------------------------------------------+
+ o [28-08-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [28-08-2010] Removed option to have the labels on the outside of a Meter. Now they're always on the inside of the Meter
+                and there's always 11 of them (including zero)
+ o [14-08-2010] Changed the HBar property chart.strokecolor to chart.strokestyle
+ o [07-08-2010] The Odometer property chart.needle.thickness has been changed to chart.needle.width. Work has been done on the
+                needle head.
+ o [07-08-2010] Progress bar has now been split into two different graph types:
+                 o HProgress
+                 o VProgress
+ o [07-08-2010] Progress bar property chart.color is now chart.colors, and should be an array
+ o [07-08-2010] Changed default Bipolar colors to just one - green
+ 
+                +---------------------------------------------------------------------------------------+
+ o [31-07-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+  o [17-07-2010] Stepped line charts and their tickmarks have been marginally altered. No final tickmark is now shown (it looks
+                 odd being isolated)
+  o [17-07-2010] Changed the Odo chart.needle.style to chart.needle.color
+  o [17-07-2010] The Odo properties chart.start, chart.end and chart.value have all been changed to internal properties:
+                 obj.start, obj.end and obj.value
+  o [09-07-2010] With the Odometer the old property chart.needle.style has been renamed to be chart.needle.color
+  o [09-07-2010] The Progress bar has had it's properties chart.max and chart.value changed to class properties, this means
+                 that if you want to make use of these, you will now need to use myProgress.value and myProgress.max.
+                 myProgress being the name of your graph object.
+
+                +---------------------------------------------------------------------------------------+
+ o [26-06-2010] | Stable release                                                                        |
+                +---------------------------------------------------------------------------------------+
+
+ o [08-05-2010] The Rose charts "chart.labels" property is now different to the "chart.key" property
+ o [01-05-2010] The Donut chart is now a variant of the Pie chart (chart.variant = donut)
+ o [24-04-2010] The radar chart has been renamed to Rose. The library is now called RGraph.rose.js and the constructor has
+                been renamed. It has also been prettied up marginally and labels have been added.
+ o [17-04-2010] All charts have had their property "chart.tooltip.effect" renamed to "chart.tooltips.effect".
+                The Scatter chart has also had its property "chart.tooltip.hotspot" renamed to "chart.tooltips.hotspot"
+ o [17-04-2010] Default chart.tooltips bar chart property has changed from an empty array to null.
+ o [17-04-2010] The RGraph.common.js library has now been split into 5 separate files because it had
+                become far too large. You can read the new implementation details here:
+                http://www.rgraph.net/docs/index.html#implementation
+ o [10-04-2010] The "coords" arrays (for each object) have been unified. Now you no longer need to take
+                into account the margins. What you get in the coords arrays are as they are used on the
+                graph.
+
+                +---------------------------------------------------------------------------------------+
+ o [27-03-2010] | Initial stable release                                                                |
+                +---------------------------------------------------------------------------------------+
Index: Dev/branches/Demo/RGraph/docs/.CHANGELOG.txt
===================================================================
--- Dev/branches/Demo/RGraph/docs/.CHANGELOG.txt	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/.CHANGELOG.txt	(revision 225)
@@ -0,0 +1,1654 @@
+ 29th July 2011 (STABLE)
+ ==============
+  o [BAR] Added chart.noendxtick
+  o [BAR] Fixed a bug with specific labels vertical positioning with a center X axis
+  o [LINE] Documented chart.noendxtick
+  o [LINE] Added chart.tickmarks.linewidth
+  o [LINE] When using specific labels and a ymin, the first label is now placed where "0" would go
+
+ 25th July 2011
+ ==============
+  o [CONTEXT] Added onbeforecontextmenu RGraph event
+  o [KEY] Noted Line chart interactive key
+  o [PIE] Shadow now works correctly with exploded segments
+  o [SCATTER] Added chart.labels.above, chart.labels.above.size and chart.labels.above.decimals to the Scatter chart
+  
+
+ 20th July 2011
+ ==============
+   o [BIPOLAR] Converted tooltips to use the new obj.getBar(e) method.
+   o [PIE] The option chart.exploded can now be a number, which is then applied to each segment (as well as the prior array)
+   o [PIE] Outlining now works with exploded segments - http://www.rgraph.net/docs/you-dont-need-to-spend-a-lot-of-money.html
+   o [BAR] When adding a line chart on top of a bar chart, the following are no longer set.
+            If you want them you will need to set them yourself (the former values are also shown):
+
+              line.Set('chart.noaxes', true);
+              line.Set('chart.background.barcolor1', 'rgba(0,0,0,0)');
+              line.Set('chart.background.barcolor2', 'rgba(0,0,0,0)');
+              line.Set('chart.background.grid', false);
+              line.Set('chart.ylabels', false);
+            
+            There are a few things that are still set for you:
+            
+              chart.gutter.top
+              chart.gutter.bottom
+              chart.gutter.left
+              chart.gutter.right
+              chart.ymax
+
+  o [FUNNEL] Converted tooltips to use the new obj.getSegment(e) method.
+  o [LINE] The Line chart now has a .__index2__ property which can be used in your ontooltip event handlers. This is the index
+           in the individual array for a particular line. If you're not using multiple lines in your chart, this won't affect
+           you.
+
+ 17th July 2011
+ ==============
+  o [BAR] Added chart.colors.reverse for reversing the order in which colors are used (stacked bar charts only)
+  o [FUNNEL] Added a .getSegment(e) method - which greatly simplifies retrieving the segment that has
+             been clicked on (or the mouse is over etc).
+  o [LINE] Added chart.key.interactive - this allows you click on a key item and it will be highlighted on the chart
+  o [TOOLTIPS] Small fix to snap effect when you have multiple charts one one page, both with tooltips
+  o [TOOLTIPS] The default CSS has been altered for tooltips. This affects all chart types. The changes are:
+                o There is now no CSS border to the tooltip
+                o The toltip is now transparent a small amount (opacity=0.9)
+                o The tooltip shadow X & Y offsets are now zero
+
+ 12th July 2011
+ ==============
+  o [MISC] Stable release
+
+ 11th July 2011
+ ==============
+  o [WEBSITE] Website updates
+
+ 10th July 2011
+ ==============
+  o [CONTEXT] Added the registry variable: RGraph.Registry.Get('chart.contextmenu').__shape__
+              This is the underlying hotspot (eg bar/segment/point), if any, that was clicked on.
+
+              Objects that have a .getXXX() method now also have a .getShape() method, which is
+              exactly the same, but can be used if you don't know what object type you have,
+              (since it's the same name across all object types).
+
+ 8th July 2011
+ =============
+  o [DOCS] Documentation updates
+  o [COMMON] Fixed a slight bug when formatting negative numbers at 1,000 and over
+  o [METER] Added Meter options: chart.value.label
+                                 chart.value.text.decimals
+                                 chart.value.text.units.pre
+                                 chart.value.text.units.post
+
+ 29th June 2011
+ ==============
+  o [WEBSITE] Website changes
+
+ 28th June 2011
+ ==============
+  o [RADAR] The Tradar has been renamed to Radar - you WILL need to update your code slightly.
+  o [RADAR] Fixed a bug with tooltips and multiple datasets
+  o [TOOLTIPS] The 'snap' effect now snaps on the first view, moving in from the top left - see the front page line chart
+               for an example of its use.
+
+ 25th June 2011
+ ==============
+  o [LINE] "10 labels" with a chart.ymin value now works with X axis at the top and bottom
+  o [PIE] The chart.tooltips.coords.adjust property has been removed
+  o [ZOOM] Added ability to fire the full canvas zoom by just a click - no context menu
+
+ 23rd June 2011
+ ==============
+  o [LINE] The chart.tooltips.coords.adjust property has been removed
+  o [ROSE] The Rose chart getSegment() return value has changed. Instead of just one radius value, there are now two
+           radius values - the start and end values. This change was necessary to facilitate stacked Rose charts.
+           Subsequent values have "moved up one" in the array (ie what was index 3 is now 4, what was 4 is now 5
+           and what was 5 is now 6)
+  o [SCATTER] The chart.tooltips.coords.adjust property has been removed
+
+ 21st June 2011
+ ==============
+ o [DONUT] Added chart.variant.donut.color for the center hole
+ o [HBAR] The default colors have changed
+ o [HBAR] Added sequential color support to grouped and stacked HBars
+
+ 18th June 2011
+ ==============
+  o [HBAR] Added chart.colors.sequential for regular hbars (not stacked or grouped)
+  o [HBAR] Converted to .getBar(e) method for tooltips
+  o [LINE] Added triangle and filledtriangle tickmark types
+  o [ODO] Added chart.green.solid and documented
+  o [ODO] Added chart.yellow.solid and documented
+  o [ODO] Added chart.red.solid and documented
+  o [ODO] Documented chart.green.color
+  o [ODO] Documented chart.yellow.color
+  o [ODO] Documented chart.red.color
+  o [PIE] Added chart.variant.donut.color - this controls the color of the hole
+  o [ROSE] Implemented stacked Rose chart (see below)
+  o [ROSE] Added chart.colors.sequential (which, if you upgrade, you need to set to true to maintain BC)
+  o [ROSE] When using tooltips, the highlight will now appear "over" the axis labels. This makes the
+           highlighted segment more identifiable.
+  o [ROSE] Tooltips can now be a single function, or an array of functions as well as an array of strings
+  o [ROSE] Added chart.variant - the value can be either null (for a normal or stacked Rose chart) or "non-equi-angular" for a
+           Rose chart that has unequal segment sizes. See an example here:
+
+           http://dev.rgraph.net/tests/2011-07-30/non-equi-angular_rose.html
+    
+  o [ROSE] Added chart.labels.offset
+  o [ROSE] Added chart.tooltips.event
+  o [SCATTER] Added in-graph labels to Scatter chart
+  
+    The Rose chart has undergone significant changes in order to facilitate stacked and non-equi-angular charts.
+    In particular, the color handling has changed, and as such you may need to specify chart.colors.sequential in
+    your chart configurtion to get the colors to behave as they used to. Changing the way colors behave brings the Rose chart
+    into line with other chart types. Also, the Rose chart .getSegment() return value has changed - now instead of just one radius
+    value, you get a start radius and end radius value.
+
+ 7th June 1011
+ =============
+  o [LINE] Documented chart.filled.accumulative
+  o [WEBSITE] Removed redundant checks from graph libraries
+
+ 4th June 2011 (STABLE)
+ =============
+  o [MISC] Stable release - see .BC.txt, and look through this files entries since the last stable release (25-03-2011)
+ 
+ 28th May 2011
+ =============
+  o [LINE] You may need to adjust your titles vertical positioning using chart.title.vpos
+  o [MISC] Added example of adding a subtitle to your graph
+
+ 21st May 2011
+ =============
+  o [BIPOLAR] Tooltip handling has changed. If none is set for a particular bar, none will now be shown
+  o [COMMON] Check your graph titles - the vertical positioning has changed. To reposition you can
+             use chart.title.vpos
+  o [HBAR]The X axis title positioning may have changed slightly - if you use it you should check your title is as you expect
+  o [HBAR] chart.labels.above has been fixed in respect of drawing text in a stacked HBar for sections that it shouldn't do
+  o [HBAR] Fixed a very minor bug when the chart is redrawn (after being drawn once) and the scale wasn't correctly reset
+  o [LINE] This chart type may be particularly buggy because of the gutter changes
+  o [MISC] Individual gutters are now settable with all graph types
+  o [MISC] The settings chart.width and chart.height are now deprecated in favour of the new individual gutter settings
+  o [ODO] Added key - helpful for multiple pointers
+  o [RESIZE] Repositioning the resize handle is no longer necessary with the introduction of independent gutter settings.
+             Starting with the May release this setting should no longer be used.
+  o [SCATTER] Added an obj.getPoint(e) method which eases getting the point (if any) that is currently being hovered over
+  o [WATERFALL] Documented chart.scale.formatter
+
+       Keep in mind that individual gutter settings and using chart.width/chart.height are not meant
+       to be used together - chart.width/chart.height will cease to be user facing properties and will
+       (starting this release) stop functioning and be removed completely. The addition of individual
+       gutter settings is a fundamental change so testing of your graphs is imperative. The
+       requirement of translating to reclaim lost space is reduced (if not eliminated
+       entirely) with the addition of these settings.
+
+ 7th May 2011
+ ============
+  o [API] Added RGraph.Reset() function, which both clears the canvas AND resets any .translate() that has been performed
+  o [INVOICE] Improved the appearance of the invoice
+  o [LINE] Added individual gutter settings:
+             chart.gutter.left
+             chart.gutter.right
+             chart.gutter.top
+             chart.gutter.bottom
+            Keep in mind that these settings are experimental currently. In particular they may cause dynamic features
+            not to work 100% correctly.
+  o [MODALDIALOG] Added an example of covering the scroll bars to the ModalDialog page
+  o [ODO] Kength of extra pointers is now supported, eg: odo.Set('chart.needle.extra', [[16, 'yellow', 50]]);
+  o [WATERFALL] Added this new chart type
+  o [WEBSITE] Changed pages to use uncompressed version of ExCanvas - now works offline
+
+ 30th April 2011
+ ===============
+  o [METER] Added chart.scale.decimals - default is 0
+
+ 9th April 2011
+ ==============
+  o [BAR] Added support for chart.background.image
+  o [BAR] Added ability to have X axis at the top for entirely negative data sets, eg:
+           obj.Set('chart.xaxispos', 'top');
+  o [LED] Added chart.width and chart.height. Also changed the sizing so now the letters should always fit the canvas size
+  o [LINE] Added support for chart.background.image
+  o [LINE] Added ability to have X axis at the top for entirely negative data sets, eg:
+           obj.Set('chart.xaxispos', 'top');
+  o [MSIE] MSIE 8 now clears to white by default, not transparent
+  o [PIE] Added chart.tooltips.coords.adjust
+  o [PIE] Segment separation is now available as a tooltip highlight mode (exploded segments)
+  o [SCATTER] Added support for chart.background.image
+  o [SCATTER] Documented chart.ylabels.invert
+  o [THERMOMETER] Added adjusting
+  o [THERMOMETER] Added chart.text.color
+  o [THERMOMETER] Added chart.value.label, which allows to not display the label (true/false)
+
+ 25th March 2011 (STABLE)
+ ===============
+  o [COMMON] The default for chart.key.halign is now null, by default the position for the
+             key depends on the position of the Y axis
+  o [COMMON] Changed chart.title.yaxis.align to chart.title.yaxis.position
+  o [MSIE] Positioning tweaks for IE9 final
+
+ 20th March 2011
+ ===============
+  o [LINE] Added workaround for Chrome bug when specifying different line widths for lines
+  o [MISC] Added chart.key.halign (when using graph mode) which can be left or right (default)
+  o [TRADAR] Fixed tradar and interactive adjusting (thrown out by the addition of multiple datasets)
+
+ 12th March 2011
+ ===============
+  o [COMMON] The RGraph.Clear() function has been changed to a transparent colour to transparent instead of white. Also,
+             a new event has been added called onclear which fires when the function is called. You can use this function
+             to draw a white (or a color of your choice) rectangle over the canvas. Effectively clearing the canvas to
+             your color, for example:
+
+            function myClear(obj)
+            {
+                obj.context.beginPath();
+                obj.context.fillStyle = 'white';
+                obj.context.fillRect(-10,-10,obj.canvas.width + 20, obj.canvas.height + 20);
+                obj.context.fill();
+            }
+
+            DO NOT simply use the RGraph.Clear() function in the onclear event listener function, as you will create an
+            infinite loop.
+  o [COMMON] Added chart.title.yaxis.align to the common background code. This is usable by:
+              - Bar
+              - Line
+              - Scatter
+  o [LINE] A bug has been fixed that is apparent when you're using chart.outofbounds and have null values. If you have this
+           combination, please test your graphs! An example is here: http://dev.rgraph.net/tests/null.html
+  o [ODO] Added chart.border.color1
+  o [ODO] Added chart.border.color2
+  o [ODO] Added chart.border.color3
+  o [ROSE] Corrected a bug in the Rose chart, introduced in the prior beta
+  o [METER] Added the following tickmark controls to the Meter chart:
+             chart.tickmarks.small.num
+             chart.tickmarks.big.num
+             chart.tickmarks.small.color
+             chart.tickmarks.big.color
+  o [RESIZING] Tooltips for the icons are now limited to Google Chrome and MSIE because of reliability issues. The cursor will
+               still change in all browsers though
+  o [THERMOMETER] Added chart.title.side
+  o [TRADAR] Added multiple dataset support. eg: http://www.rgraph.net/examples/tradar.html
+  o [TRADAR] Added key
+
+ 5th March 2011
+ ==============
+  o [COMMON] The default color for by the RGraph.Clear() function has been changed to transparent.
+  o [COMMON] The RGraph.getSegment() function has been moved to  be a method of both the Rose and the Pie charts, instead of part
+             of the common object. ie Supposing your object is called myObj, it will now be myObj.getSegment(e), instead of
+             RGraph.getSegment(e)
+  o [INVOICE] Added Paypal button to invoice
+  o [PIE] Added exploded segments. http://www.rgraph.net/docs/animation_segments.html Certain Pie chart options won't work
+          with this feature
+ o [THERMOMETER] Added initial implementation of this visual variation on the progress bar
+
+ 26th February 2011 (STABLE)
+ ==================
+  [MISC] Stable release
+
+ 19th February 2011
+ ==================
+  o [BAR] Added chart.noaxes
+                chart.noxaxis
+                chart.noyaxis
+  o [KEY] Added new test example of an interactive key. This feature isn't finished yet and has limited use cases.
+  o [WEBSITE] Added facebook sharing icon
+
+ 14th February 2011
+ ==================
+  o [DOCS] Added example of persistent annotations
+  o [HBAR] Updated docs
+
+ 11th February 2011
+ ==================
+  o [HBAR] Added chart.xmin
+  o [MISC] Added chart.width and chart.height properties to remaining libraries
+  o [LINE] Fixed slight bug in line when multiple lines are specified as one argument
+  o [SCATTER] Added chart.labels.specific.align which allows you to center align labels
+
+ 28th January 2011 (STABLE)
+ =================
+  o [BAR] Added chart.background.grid.autofit.align, for making the grid lines line up with the ticks. Any chart.hmargin will
+           throw the alignment out.
+  o [DOCS] Added note to animation page about CSS vs <canvas> animation
+  o [DOCS] Documented the custom event removall functions
+  o [LINE] Corrected a bug with null tickmarks and the mouseover event
+  o [LINE] Added chart.background.grid.autofit.align, for making the grid lines line up with the ticks. Any chart.hmargin will
+           throw the alignment out.
+  o [RESIZING] If the canvas has a CSS "border:", it is now preserved after a reset
+
+ 22nd January 2011
+ =================
+  o [MISC] You can now revert the canvas back to tranparency with the RGraph.Clear() function by specifying "transparent" as the color.
+
+ 15th January 2011
+ =================
+  o [ADJUSTING] Converted the Gantt chart state array (which is kept in the registry) to textual keys instead of numeric ones.
+  o [API] Fixed slight bug with RGraph.array_max which presented itself in a few rare instances
+  o [ANNOTATE] Converted annotating to DOM2 event registration
+  o [FUNNEL] Added chart.highlight.stroke and chart.highlight.fill
+  o [GANTT] You can now resize Gantt chart events (as well as move) by placing your cursor in the right five pixels of the appropriate
+            bar
+  o [HBAR] Added chart.xlabels
+  o [MISC] Added chart.highlight.fill and chart.highlight.stroke to all pertinent graph types
+  o [PROGRESS] Fully converted the progress bars to DOM2
+  o [RESIZING] Converted to DOM2 for event registration
+  o [SCATTER] Added chart.ylabels.inverted
+
+ 8th January 2011
+ ================
+  o [ADJUSTING] Converted all adjusting event handlers to DOM2
+  o [API] Added RGraph.GetWidth() and RGraph.GetHeight()
+  o [BAR] Added chart.labels.above.angle, which can be from -90 to 90 (degrees)
+  o [BAR] Added chart.colors.sequential for regular bar charts (not stacked, not grouped, but the applicable variants work)
+  o [DOCS] Documentation updates
+  o [EVENTS] New events have been added - onresizebegin, onresizeend, onannotatecolor, onannotateclear
+  o [GANTT] Added seventh (border color) and eigth (linewidth) possible options to event options.
+  o [GANTT] Gantt chart is now adjustable. You can drag the existing events about. Altering the extent of an event to follow.
+ 
+ 1st January 2011
+ ================
+  o [ADJUSTING] Added onadjustbegin and onadjustend events
+  o [API] RGraph.RemoveCustomEventListener() has been added
+  o [API] RGraph.RemoveAllCustomEventListeners() has been added. This function can optionally take a canvas id to limit the clearing to)
+  o [BAR] The bar chart now supports the chart.height and chart.width properties
+  o [BAR] The Bar chart now supports the chart.tooltips.highlight property
+  o [BAR] Added chart.highlight.fill (which is the fill color used for tooltips highlighting)
+  o [BAR] Added support for adjusting when the X axis is in the center
+  o [EVENTS] Added examples of each event to the events page
+  o [HBAR] This can now have tooltips triggered by the onmousemove event when using chart.tooltips.event
+  o [HPROGRESS] Added chart.tickmarks.zerostart for having tickmarks/labels start at zero
+  o [BAR] Added chart.width and chart.height
+  o [LINE] Added chart.width and chart.height
+  o [LINE] Added chart.outofbounds support to adjusting (for the line chart)
+  o [LINE] Added support for adjusting when the X axis is in the center
+  o [MISC] Text function, when multiple carriage returns are in use, has been fixed
+  o [ODO] Added border (the color of which is configurable with chart.needle.triangle.border) to the triangle pointer
+  o [RESIZING] Added chart.resize.handle.adjust
+  o [RESIZING] Added chart.resize.handle.background
+  o [SCATTER} Added chart.width and chart.height
+  o [SKELETON] Added chart.width and chart.height default properties (defaulting to null)
+  o [VPROGRESS] Added the chart.width and chart.height properties
+  o [VPROGRESS] Added adjusting to this chart type
+  o [VPROGRESS] Added an example to the VProgress example page (http://www.rgraph.net/examples/vprogress.html) showing
+                a key in graph mode. There's an example of gutter mode for the HProgress on the this test page
+
+NB Different font sizes in charts for X/Y labels is now no longer going to be added since it is no longer
+   necessary with the new chart.width and chart.height properties.
+
+ 24th December 2010 (STABLE)
+ ==================
+  o [ANNOTATING] Annotating has been changed to allow annotating to occur in the gutter
+
+ 18th December 2010
+ ==================
+  o [MSIE] MSIE 9 now uses the double click event to trigger the context menu
+  o [ZOOM] Added a note about making the zoom in thumdnail mode circular:
+           http://www.rgraph.net/docs/zoom.html#thumbnail
+ 
+ 11th December 2010
+ ==================
+ o [API] Added pointer, in the docs, for how to add text to your charts
+ o [BAR] The Bar chart now converts null values to zero
+ o [BAR] You can now specify a textual scale with chart.ylabels.specific
+ o [GANTT] Fixed background bars when specifying an xmin
+ o [HPROGRESS] Labels can now be on top of the bar as well as the bottom
+ o [LINE] You can now specify a textual scale with chart.ylabels.specific
+ o [MISC] Added the RGraph.SetConfig() function - http://www.rgraph.net/docs/setconfig.html
+ o [MISC] Added chart.title.background to graph types that use a title
+ o [PIE] Added chart.highlight.style.2d.color - default is a semi-transparent white color
+ o [PIE] Added chart.tooltips.event
+ o [SCATTER] Crosshairs readout now works when the X axis is in the center
+
+ 4th December 2010
+ =================
+  o [GANTT] Added chart.xmin (default is 0)
+  o [HBAR] Added chart.labels.above.decimals, defaulting to 0. You may need to set this to the number of desired decimals
+           if you're expecting decimals
+ o [LICENSING] If you prefer you can now use PayPal instead of Google Checkout to buy an RGraph license:
+               http://www.rgraph.net/docs/licensing.html#paypal
+  o [LINE] Fixed a bug with null points still showing tooltips
+  o [MISC] The key handling has been rewritten. There is now a documentation page about keys:
+           http://www.rgraph.net/docs/keys.html
+  o [MISC] Added default key properties to all relevant graph types - the key has been completely rewritten and as such,
+           you should check your graphs are as you expect. You may neeed to slightly adjust your key coordinates for example.
+  o [SCATTER] Added option to have vertical bars (much like the horizontal bars option)
+  o [SKELETON] Added more default properties
+  o [VPROGRESS] You can now position the labels on the left of the chart instead of the (default) right.
+
+ 27th November 2010 (STABLE)
+ ==================
+ o [BAR] When showing 10 Y labels, chart.scale.decimals is respected
+ o [DOCS] Add an example showing dynamic updating
+ o [DOCS] Added animation example using jQuery
+ o [LINE] When showing 10 Y labels, chart.scale.decimals is respected
+ o [MISC] Improved the jQuery animation example
+ o [MISC] Removed the "functions as colors" option - this may re-added at a later date
+ o [SCATTER] When showing 10 Y labels, chart.scale.decimals is respected
+ o [SKEL] Added lots more default default properties and functionality that common RGraph functionality
+          uses, for example: chart.resizable.
+
+ 20th November 2010
+ ==================
+  o [API] Documented RGraph.background.Draw().
+  o [DOCS] Added note to AJAX section about types
+  o [DOCS] Added skeleton object which can be used to ease creating new graph types
+  o [DOCS] Added note to misc docs about debugging your graphs
+  o [LINE] Fixed line chart tooltips as separate arguments
+  o [MISC] Minor adjustments to placement and borders
+  o [MISC] For the line/bar/scatter, when the X axis is at the bottom and there is a background bar with a 
+           negative start (or it results in a negative end value), you now get a warning.
+ o [MISC] Added animation example using jQuery
+ o [MSIE] Changed instances of document.all to RGraph.isIE8()
+ o [RESIZING] Tweaked the positioning a little, so now nothing should move when you resize a canvas
+ o [SKEL] Added a skeleton file, which can be used as a base when creating new RGraph libraries.
+
+ 13th November 2010
+ ==================
+  o [API] Added RGraph.array_shift() function (removes an element from the beginning of an array)
+  o [LINE] Added chart.labels.above and chart.labels.above.size (default is 8)
+  o [LINE] All chart labels are now shown, regardless of how many points on the line there are.
+  o [LINE] Sets of line points can now be given as one big multi-dimensional array. This may make it easier to use in AJAX, eg:
+           http://dev.rgraph.net/tests/line.arguments.html
+  o [LINE] In Google Chrome, the shadow fix is applied by default. An option exists to enable you to turn this off: chart.chromefix
+           In a few rare cases you will need to turn off shadow blurring (chart.shadow.blur=0)
+  o [MISC] Added more options for in-graph labels. See http://www.rgraph.net/docs/ingraph.html
+  o [MISC] Added note about AJAX and types
+  o [VPROGRESS] Added chart.tooltips.coords.adjust
+  o [VPROGRESS] Added chart.min
+  o [VPROGRESS] Added chart.labels.count, chart.min, chart.scale.decimals
+
+ 6th November 2010
+ =================
+ o [API] RGraph.getScale() now takes the graph object as the second argument
+ o [BAR] Added chart.labels.above.decimals, defaulting to 0
+ o [BAR] Added chart.labels.above.size, which if specified is used as the font size. An example of this and the above change is
+         here: http://dev.rgraph.net/tests/above.bar.html
+ o [BIPOLAR] Added chart.gutter.center, which controls the space where the labels are
+ O [BIPOLAR] Added chart.scale.round
+ o [DOCS] Added note to API docs about references available
+ o [HBAR] Added chart.scale.decimals
+ o [HBAR] Added chart.scale.round
+ o [HPROGRESS] Added chart.min, for specifying a minimum value and chart.scale.decimals
+ o [LINE] Y labels can once again be 1/3/5/10
+ o [LINE] Added chart.scale.round
+ o [LINE] chart.outofbounds is now usable in conjunction with chart.ymax
+ o [LINE] Added chart.chromefix
+ o [RESIZE] Resize now sets the placeholder DIVs 'position' CSS value as inline-block, thus reducing page re-organisation
+ o [ROSE] Added chart.scale.decimals
+ o [ROSE] Added chart.ymax
+ o [ROSE] Added chart.ymin (There's an example here: http://dev.rgraph.net/tests/rose.ymin.html
+ o [RSCATTER] Added chart.scale.decimals // If you use the Rscatter, please test this with your graph(s)
+ o [RSCATTER] Added chart.scale.round    // If you use the Rscatter, please test this with your graph(s)
+ o [RSCATTER] Added chart.ymin           // If you use the Rscatter, please test this with your graph(s)
+ o [SCATTER] Y labels can once again be 1/3/5/10
+ o [SCATTER] Added chart.scale.decimals
+ o [SCATTER] Added chart.scale.round
+ o [SCATTER] Scatter chart, translating and crosshairs now work when you tell RGraph how you've translated using
+             chart.tooltips.coords.adjust
+ o [SCALE] Added chart.scale.round to: bar, bi-polar, line, rscatter, rose, scatter, tradar This means that scales produced are
+           rounded up, producing rounder values
+ o [SCALE] Re-added 10 Y labels to Line/Scatter. This may be best used In conjunction with chart.scale.round
+ o [TRADAR] Added chart.scale.round
+
+ 30th October 2010 (STABLE)
+ =================
+ o [DOCS] The combination example has been changed and extended. It now shows Pie charts in the tooltips,
+          which can be clicked on.
+ o [DOCS] Added note about using RGraph.showPNG() without a context menu.
+ o [DOCS] RGraph.showPNG() has had it's parameter list changed: http://www.rgraph.net/docs/api.html
+ o [API] Added fix to crosshairs when coordinates are used in conjunction with an X minimum value
+ 
+ 
+ 23rd October 2010
+ =================
+  
+  Important:
+            The Line (and Scatter chart) chart have been PARTIALLY REVERTED, meaning that the number of labels is again a
+            choice between 1/3/5. The option to have 10 labels will be re-added, but for positive charts only, and
+            probably for scales with maximum values over 10.
+
+  o [API] The RGraph.showPNG() function can now accept the canvas to use as an (optional) argument,
+          allowing you to use the RGraph.showPNG() function with an image, eg:
+          http://www.rgraph.net/examples/tradar.html (1st graph)
+  o [BAR] Bar chart can now only have 1/3/5/10 labels
+  o [GANTT] Borders are now a little thinner (and less blurry)
+  o [KEY] Rounded key corners now lives behind an option: chart.key.rounded (default is false), also documented this
+  o [KEY] Filled keys now only cover the key with one layer of color - so transparency works better
+  o [PNG] URL is now selected by default
+  o [SCATTER] Box plot coords bug has been corrected
+  o [SCATTER] The default for chart.scale.decimals has been changed fr0m 0 (zero) to null. You may need to set this now
+              with: myScatter.Set('chart.scale.decimals', 0);
+
+ 16th October 2010
+ =================
+  o [LINE] Y axis can now have an arbitrary number of labels: http://dev.rgraph.net/tests/ymin.html
+  o [LINE] Made addition so that in Chrome a 1px linewidth is changed to 1.01
+  o [MISC] Corners on the key (in graph mode) are now curvy
+  o [MISC] RGraph.showPNG() now shows the data: URL to the image and makes it easy to copy it to the clipboard
+
+ 9th October 2010
+ ================
+  o [LINE] Changed decimal handling - you may need to specify this: myLine.Set('chart.scale.decimals', 0);
+  o [LINE] Added chart.outofbounds (default is false)
+  o [LINE] Added obj.getPoint(e) method which simplifies getting the pertinent point on the line
+           chart in events (eg the onmousemove event, and now the Line chart uses it)
+ o [LINE] Line charts can now have custom tickmarks
+ o [SCATTER] Added facility for custom tickmarks
+ o [WEBSITE] Fixed favicon path
+
+ 1st October 2010
+ ================
+ 
+   In October, 25% of all license fees will be donated to Unicef - the International charity for children
+ 
+  o [BAR] Added .getBar() method. This allows you to easily get the focused/selected bar. There is an example usage here:
+  o [DOCS] Documentation is no longer dynamic
+  o [FUNNEL] Shadows can now go upwards (ie any x/y offset is feasible)
+  o [FUNNEL] Converted this chart type to DOM2 for tooltips
+  o [GANTT] This chart has been moved to DOM2 for tooltips
+  o [HPROGRESS] This chart has been moved to DOM2 for tooltips
+  o [MISC] Colors can now be functions as well as well as strings/gradients. These colors are resolved once, at the start
+           of the .Draw() method
+  o [PIE] Documented method .getSegment(). Used for getting the pertinent
+          segment when the canvas is clicked on (for example), http://www.rgraph.net/docs/pie.html#available.methods
+  o [ROSE] This chart has been moved to DOM2 for tooltips
+  o [ROSE] Documented method .getSegment(). Used for getting the pertinent
+           segment when the canvas is clicked on (for example), http://www.rgraph.net/docs/rose.html#available.methods
+  o [RSCATTER] This chart has been moved to DOM2 for tooltips
+  o [SCATTER] This chart has been moved to DOM2 for tooltips
+  o [SCATTER] Added new properties: chart.yaxispos
+                                    chart.xaxis
+                                    chart.noendxtick
+  o [TOOLTIPS] Fixed a tooltip bug that probably only presented itself on the bar chart example page
+  o [TRADAR] Added chart.tooltips.highlight (default is true)
+  o [TRADAR] This chart has been moved to DOM2 for tooltips
+  o [VPROGRESS] This chart has been moved to DOM2 for tooltips
+  o [XML] Removed XML documentation
+
+ 25th September 2010 (STABLE)
+ ===================
+  o [DOCS] Fleshed out the integration example - http://www.rgraph.net/docs/index.html#mysql
+  o [DOCS] Added note to docs about line chart obj.original_data
+
+ 18th September 2010
+ ===================
+  o [ANNOTATE] Added onannotatestart and onannotateend events
+  o [CONTEXT] Fixed submenu offset in MSIE 9
+  o [DOCS] Added MySQL integration example to integration docs
+  o [DOCS] Documented how to use a dynamically created canvas with ExCanvas
+  o [MODALDIALOG] Removed MSIE 8 DirectX shadow from ModalDialog
+  o [MODALDIALOG] Better MSIE 9 compatibility
+  o [PIE] Fixed Pie chart sticks for Chrome 6
+  o [TOOLTIPS] If Y position is less than 0, tooltips are now shown below the cursor to mitigate this
+  o [WEBSITE] Added social networking icons to all pages
+  o [WEBSITE] "Preload" social networking icons
+ 
+ 11th September 2010
+ ===================
+  o [API] Updated docs for RGraph.Redraw() slightly
+  o [LINE] Added chart.toltips.highlight
+  o [MISC] Updated the combined bar/line example
+   o [ODO] The chart.units.pre and chart.units.post properties have changed to chart.value.units.pre and chart.value.units.post.
+           The chart.units.pre and chart.units.post properties have changed functionally.
+  o [ODO] Added chart.needle.extra to allow you to specify extra needles.
+  o [RSCATTER] Added chart.toltips.highlight
+  o [SCATTER] Added chart.toltips.highlight
+  o [SCATTER] Added coordinates readout: chart.crosshairs.coords
+                                         chart.crosshairs.coords.fixed
+                                         chart.crosshairs.coords.fadeout
+                                         chart.crosshairs.coords.labels.x
+                                         chart.crosshairs.coords.labels.y
+              Example: http://dev.rgraph.net/tests/crosshairs.html
+  o [ZOOM] Much improved the smoothness of the indicator box when in area mode - see http://www.rgraph.net/docs/zoom.html
+           for an example of area mode
+
+ 4th September 2010
+ ==================
+  o [API] Changed RGraph.number_format() functions arguments
+  o [API] Added RGraph.getGutterSuggest() function, which is a suggestion based on the left labels (only)
+          for the chart.gutter setting.
+  o [API] Added RGraph.showPNG() function, which makes it easy to get images of graphs. This is designed to be
+          used in conjunction with the context menu, and is therfore defined in the RGraph.common.context.js file.
+          There's documentation about it here: http://www.rgraph.net/docs/png.html
+  o [BAR] Added key shadow control
+  o [BAR] Added chart.scale.point and chart.scale.decimal
+  o [BIPOLAR] Added chart.scale.point and chart.scale.decimal
+  o [FUNNEL] Added key shadow control
+  o [HBAR] Moved to DOM 2 event handler functions
+  o [HBAR] Added chart.scale.point and chart.scale.decimal
+  o [LINE] Added key shadow control
+  o [LINE] Added warning about Chrome 6 shadow bug
+  o [LINE] Added chart.noyaxis
+  o [LINE] Added chart.scale.point and chart.scale.decimal
+  o [MISC] Added RGraph.getGutterSuggest(). See the misc documentation for more detail
+  o [MSIE] Now that RGraph is moving to DOM2, tooltips on graph libraries that have been changed will not function in MSIE8.
+           The graphs will still be shown, however tooltips will not function. MSIE9 will still work.
+  o [ODO] Pointer is now more pointy
+  o [PIE] Moved to DOM 2 event handler functions
+  o [ROSE] Added key shadow control
+  o [RSCATTER] Added key shadow control
+  o [SCATTER] Added chart.tooltips.coords.adjust
+  o [SCATTER] Added key shadow control
+  o [SCATTER] Added chart.scale.point and chart.scale.decimal
+  o [TRADAR] Added key shadow control
+  o [WEBSITE] Added code to async page that demonstrates the difference more
+
+ 28th August 2010
+ ================
+  o [API] Updated the API docs a little with the correct data properties for some graph types
+  o [DOCS] Added information about AJAX requests to performance section
+  o [DOCS] Added information about the DOMContentLoaded event to the docs.
+  o [LINE] Fixed problem with chart.ylabels = false
+  o [METER] Added arrow head to the Meter
+  o [METER] Removed outer labels
+  o [METER] Increased number of labels to 11
+  o [MSIE] A few small tweaks to the palette, the scatter chart, the context menu, and tooltips
+  o [ODO] A few fixes for the Odometer in Chrome 6, and a few minor enhancements to the appearance.
+  o [WEBSITE] Live site now uses images.rgraph.net for the index page ** REVERTED **
+  o [WEBSITE] Social networking icons are now combined into one image.
+
+ 21st August 2010
+ ================
+  o [HBAR] Added chart.units.ingraph (for when your units are quite long)
+  o [MISC] Fixed various bugs in circular charts with Chrome 6
+  o [MISC] Added note to front page about suitability for Chrome extensions
+  o [MSIE] Lots more fixes for MSIE 9
+
+ 14th August 2010
+ ================
+  o [BAR] Added  chart.tooltips.coords.adjust which allows you to adjust tooltip coordinates when you translate
+  o [HBAR] HBar shadow is now "unified", so you can have an upwards shadow with a large offset and it still looks OK
+  o [HBAR] "chart.labels.abovebar" are now left aligned if they would go off the end of the canvas
+  o [HBAR] Fixed a bug with chart.strokecolor - renamed to chart.strokestyle
+  o [LINE] Added chart.tooltips.coords.adjust (for when you translate() first)
+  o [LINE] Tweaked filled/stepped line charts - stepped line charts show trailing line again
+  o [LINE] Tickmarks, as well as a string, can now also be an array of tickmark styles, eg:
+           http://dev.rgraph.net/tests/test3.html
+  o [LINE] Added chart.ylabels.invert
+  o [MISC] You can now specify in-graph labels like this:
+             line4.Set('chart.labels.ingraph', [6,'July', 3, 'November']);
+           If you have a lot ofempty spaces, this will help.
+  o [MISC] Added type property(=common) to common objects
+  o [ODO] Improved the appearance of the Odometer border
+  o [SCATTER] Tickmarks are no longer drawn when the ticks are boxplots
+  o [SCATTER] Added chart.xmin (upgrade cautiously)
+  o [SCATTER] Boxplots are now usable when the X axis is in the center
+
+ o [NOTE] Chrome 6 appears to have an issue with canvas shadows. Other browsers are fine. A workaround has been added to the
+          Line chart library, however it won't be a solution for all cases. In these cases, turn off shadow blurring.
+
+ 7th August 2010
+ ===============
+  o [BAR] Changed this graph type over to the DOM2 .addEventListener() for tooltips
+  o [BAR] Bar chart can now have an arbitrary number of labels
+  o [BAR] Added chart.ylabels.inside
+  o [BAR] Labels can now be at any angle
+  o [BIPOLAR] Changed the default colors to just one - green
+  o [EVENTS] Added more events:
+              o onmodaldialog
+              o onresize
+              o onadjust
+              o onannotate
+  o [HPROGRESS] Multiple segments are now supported
+  O [HPROGRESS] Added the ability to configure the number of inner tickmarks
+  o [LINE] Labels can now be at any angle
+  o [LINE] Changed this graph type to use the DOM2 .addEventListener() for tooltips
+  o [MISC] Added isRGraph property to common objects
+  o [MISC] Added chart.title.hpos to all graph libraries
+  o [MODALDIALOG] Added onmodaldialog event
+  o [ODO] Outer shadow is now configurable
+  o [ODO] Inner shadow is now configurable
+  o [PROGRESS] This has now been split into the HProgress and VProgress
+  o [SCATTER] Labels can now be at any angle
+  o [TOOLTIPS] Added contract effect, similar to expand but in reverse
+  o [TRADAR] Background grid now matches RScatter in terms of width etc
+  o [VPROGRESS] Multiple segments are now supported
+  o [VPROGRESS] Added the ability to configure the number of inner tickmarks
+  
+  o [NOTE] Upgrading to the new H/VProgress should be done cautiously as they have undergone significant alterations
+
+ 31st July 2010
+ ==============
+  o [MISC] Stable release
+  o [DOCS] Added CSS class: RGraph_palette
+  o [DOCS] Added simple example AJAX function to integration documentation:
+           http://www.rgraph.net/docs/index.html#integration
+  o [ZOOM] Fixed a fade-in bug with full canvas zoom
+
+ 24th July 2010
+ ==============
+  o [LINE] This chart can now have text at any angle. Other graph types to follow
+  o [MISC] The minify script now accepts multiple arguments (filenames),
+           eg. ./minify file1 file2 file3 ...
+
+ 17th July 2010
+ ==============
+  o [BAR] Abovebar labels in GROUPED charts are now formatted
+  o [BIPOLAR] Moved this to use addeventListener() for events - this is a test case
+  o [EVENTS] Renamed the RGraph functions RGraph.AddEventListener() and RGraph.FireEvent()
+             to RGraph..AddCustomEventListener() and RGraph.FireCustomEvent()
+  o [EVENTS] Added onbeforedraw event which fires at the start of the .Draw() function
+  o [EVENTS] Added onzoom event to all types of zoom. See docs for details
+  o [HBAR] Added formatting to above bar labels
+  o [HBAR] Fixed grouped HBars with shadows going upwards (partially)
+  o [ODO] Changed a few internal properties. Read more in the docs/.BC.txt file
+  o [ODO] Changed chart.needle.style to chart.needle.color
+  o [RSCATTER] Updated test script
+  o [TRADAR] Added chart.labels.axes - defaults to "nsew"
+  o [TRADAR] Added chart.ymax
+  o [BIPOLAR] Implemented chart.xtickinterval. If you specify this, X tickmark spacing is totally down to this setting
+  o [MISC] Added chart.tooltips.override (see tooltips docs for details)
+
+ 9th July 2010
+ =============
+  o [API] Added __index__ to tooltip DIVs, which corresponds to the original tooltips array. If you're not using an array of strings
+          for your tooltips, this is not pertinent
+  o [API] The RGraph.Tooltip() function now accepts an extra parameter - the index of the tooltip
+  o [MISC] Introduced event support. There are currently just three events - ontooltip - which naturally fires when
+           a tooltip is shown, oncontextmenu - which fires when the RGraph context menu is shown and ondraw - which
+           fires when the .Draw() method is called.. More information is available here:
+           http://www.rgraph.net/docs/events.html
+  o [MISC] Added snap tooltip effect for graph types where the tooltips are triggered using the onmousemove event,
+           ie Line, Rscatter, Scatter and the Tradar
+  o [MISC] MooTools compatibility fix
+  o [MISC] Added obj.isRGraph boolean to all graph objects. This is documented on the misc docs page (docs/misc.html)
+  o [MSIE] MSIE9 compatibility work
+  o [ODO] You can now use textual labels instead of numbers, eg. N/S/E/W (using chart.labels)
+  o [ODO] Added chart.zerostart option determining whether the top label is zero or the end value
+  o [ODO] Fixed a pointer bug
+  o [ODO] Fixed a rounding issue and added chart.scale.decimals (default is 0)
+  o [ODO] Colors can now be configured with: chart.green.color, chart.yellow.color, chart.red.color
+  o [PROGRESS] Changed a few internal properties. Read more in the docs/.BC.txt file
+  o [TRADAR] Added background diagonal lines (going from the center outwards)
+
+
+ 26th June 2010
+ ==============
+  o Stable release
+
+ 18th June 2010
+ ==============
+  o [BAR] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+  o [DOCS] Documentation pages have been reorganised and a contents list added to each page
+  o [GANTT] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+  o [HBAR] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+  o [LINE] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+  o [SCATTER] Documented grid properties: chart.background.grid.autofit, chart.background.grid.autofit.numhlines, chart.background.grid.autofit.numvlines
+  o [WEBSITE] Added warning about MSIE versions less than 8
+
+ 5th June 2010
+ =============
+  o [HBAR] Added the following properties: chart.title.xaxis
+                                           chart.title.yaxis
+                                           chart.title.xaxis.pos
+                                           chart.title.yaxis.pos
+  o [ROSE] Slightly increased the area recognised to initiate resizing the Rose (ie the size of the hotspot)
+  o [TRADAR] Added adjusting to the TRadar
+
+ 29th May 2010
+ =============
+  o [BAR] Added adjusting
+  o [ODO] Added gray border effect
+  o [ODO] Added chart.tickmarks.highlight
+  o [PROGRESS] Added adjusting
+  o [ROSE] Added adjusting
+  o [SCATTER] Added chart.ymin
+
+ 22nd May 2010
+ =============
+  o [LINE] Added interactive adjustments
+
+ 15th May 2010
+ =============
+  o [API] Updated the .getSegment() for use with the Rose chart and Donut variant charts
+  o [API]  Added RGraph.array_pad() function
+  o [BAR] You can now have grouped bar charts with shadows going to the left
+  o [LINE] Linewidth can now, as well as being a single number, be an array of numbers, one for each line
+  o [LINE] You can now have labels on the inside of the Y axis as opposed to having them in the gutter
+  o [MISC] ModalDialog and zoom background DIVs are now much better in regards to page coverage (the semi-opaque background)
+  o [MISC] Removed RGraph.getPageWidth() and RGraph.getPageHeight() functions
+  o [MISC] You can now pass a color as the second argument to RGraph.Redraw() which it will use
+  o [MISC] Resizing the window when zoomed no longer hides the zoom
+  o [ODO] Little bit of work on pointers and MSIE compatibility
+  o [ODO] Added "digital" readout option, as shown on the example page
+  o [PROGRESS] This chart type can now have an "in-bar" indicator
+  o [PIE] Converted this chart to use RGraph.getSegment() for tooltips
+  o [ROSE] You can now set the strokestyle
+  o [ROSE] Converted this chart to use RGraph.getSegment() for tooltips
+  o [SCATTER] Added chart.line.linewidth and, as with the line, it can be either a number or an array of numbers
+  o [SCATTER] chart.line.stepped can now, as well as simply true or false, be an array of booleans. This allows you to have
+              multiple lines, some stepped, some not.
+
+ 8th May 2010
+ ============
+  o [MISC] You can now have multi-line labels by using the text "\r\n" in your label (without the quotes)
+  o [MISC] Resizing a graph no longer affects the page layout
+  o [ROSE] Added labels to this chart
+  o [ROSE] The Rose chart origin is now the "north" axis
+  o [WEBSITE] Re-arranged the front page
+  o [WEBSITE] Removed a lot of examples from the website and made the whole thing a little more streamlined
+  o [ZOOM] Once visible, you can now double click a zoomed area to expand it to a full size zoom. You can see
+           this on the line graph on the front page.
+ 
+ 1st May 2010
+ ============
+  o [DONUT] This is no longer a seperate class, but now a variant of the Pie chart (chart.variant = donut)
+  o [MISC] Added note about copying the text in tooltips using Firefox
+  o [ROSE] Tooltip highlighted area is now "under" the labels (as opposed to "over")
+
+ 25th April 2010
+ ===============
+  o [MISC] Separated out resizing functionality into it's own file - RGraph.common.resizing.js This further reduces the size of
+           RGraph.common.core.js
+  o [MISC] In area zoom, you can now left-drag to move the zoom itself around, and right-drag to move the zoomed canvas around inside
+           the zoom
+  o [MISC] Added RGraph_zoomed_area CSS class
+  o [MISC] Added chart.crosshairs.linewidth to bar, line and scatter
+  o [MISC] You can now have a single level of submenu items with the context menu
+  o [RADAR] This chart has been renamed to Rose and the appearance enhanced
+
+ 17th April 2010
+ ===============
+  o [BAR] This chart type can now use the onmousemove event for tooltips instead of the onmousedown
+  o [DOCS] Added tooltips documentation page - this explains tooltips and how you can specify them. There are now 4 methods available.
+  o [MISC] The zoomed area is now draggable once visible
+  o [MISC] Split out RGraph.common.js into separate files, consisting of:
+            o RGraph.common.core.js
+            o RGraph.common.annotate.js
+            o RGraph.common.context.js
+            o RGraph.common.tooltips.js
+            o RGraph.common.zoom.js
+           If you don't use any of the interactive features, the core common library is now roughly half the size. See
+           http://www.rgraph.net/docs/index.html#implementation for details of the new way to implement RGraph
+  o [MISC] You can now specify the CSS class that tooltips use (using chart.tooltips.css.class). If you have multiple
+           graphs on one page and want the tooltips to appear differently, this is how to do it
+ o [MISC] New tooltip effect - "none". Which, as the name implies, doesn't fade or expand.
+
+ 10th April 2010
+ ===============
+ o [MISC] Cleaned up each graphs coords array. If you use the coords arrays, you may need to adjust your numbers slightly.
+          The new coords may be off for you by one or two chart.margin (it can be hmargin or vmargin depending on your graph type)
+ o [MISC] Added details of backwards compatibility breaks
+ o [MISC] New zoom mode - area. You can see this on the front page line graph and on the zoom documentation page
+ o [MISC] Added resizing capability. Will not work with other dynamic features (except the context menu)
+
+ 3rd April 2010
+ ==============
+  o [BAR] Added new grid properties: chart.background.grid.autofit
+                                     chart.background.grid.autofit.numhlines
+                                     chart.background.grid.autofit.numvlines
+  o [BAR] Added chart.title.xaxis
+  o [BAR] Added chart.title.yaxis
+  o [BAR] Added chart.title.xaxis.pos
+  o [BAR] Added chart.title.yaxis.pos
+  o [GANTT] Adjusted the background grid, adding the required default properties
+  o [GANTT] Added new grid properties: chart.background.grid.autofit
+                                       chart.background.grid.autofit.numhlines
+                                       chart.background.grid.autofit.numvlines
+  o [HBAR] Added new grid properties: chart.background.grid.autofit
+                                      chart.background.grid.autofit.numhlines
+                                      chart.background.grid.autofit.numvlines
+  o [LINE] Multiple shadow colors are now facilitated (see example on front page)
+  o [LINE] Added new grid properties: chart.background.grid.autofit
+                                      chart.background.grid.autofit.numhlines
+                                      chart.background.grid.autofit.numvlines
+  o [LINE] Added chart.title.xaxis
+  o [LINE] Added chart.title.yaxis
+  o [LINE] Added chart.title.xaxis.pos
+  o [LINE] Added chart.title.yaxis.pos
+  o [LINE] Added chart.backdrop, chart.backdrop.alpha and chart.backdrop.size
+  o [LINE] Shadow color can now be an array of shadow colors. ie. A different one for each line
+  o [MISC] Added note about installing your own event handlers to misc documentation page
+  o [MISC] Added RGraph.SetShadow() - a shortcut function for setting the shadow
+  o [ODO] Added option to not draw the pointer tail
+  o [ODO] Added chart.needle.type option. It can be "pointer" (default) or "triangle".
+  o [PROGRESS] Added chart.margin
+  o [PROGRESS] Added inner tickmarks (chart.tickmarks.inner)
+  o [PROGRESS] Made examples a bit better
+  o [SCATTER] Connecting lines can now be stepped (chart.line.stepped)
+  o [SCATTER] You can now specify the exact X point at which an X label is drawn
+  o [SCATTER] Added new grid properties: chart.background.grid.autofit
+                                         chart.background.grid.autofit.numhlines
+                                         chart.background.grid.autofit.numvlines
+  o [SCATTER] Added chart.title.xaxis
+  o [SCATTER] Added chart.title.yaxis
+  o [SCATTER] Added chart.title.xaxis.pos
+  o [SCATTER] Added chart.title.yaxis.pos
+
+
++------------------------------------------------------------------------------------------------------------+
+|                                                STABLE RELEASE - 27th March 2010                            |
++------------------------------------------------------------------------------------------------------------+
+
+
+ 27th March 2010
+ ===============
+  o [MISC] Just tweaks - nothing major
+
+ 20th March 2010
+ ===============
+  o [MISC] Reverted dark background color for zoom back to the lighter one
+  o [MODALDIALOG] Reverted the dark background color back to the lighter one
+  o [METER] Added more feint tickmarks
+  o [METER] Labels are now angled. This will be an option in the future
+  o [ODO] Added more feint tickmarks
+  o [ODO] Labels are now angled. This will be an option in the future
+  o [ODO] Significant changes to this see the docs page - http://www.rgraph.net/docs/odo.html
+
+ 13th March 2010
+ ===============
+  o [MISC] Removed curvy corner from context menu
+  o [WEBSITE] Added Google Buzz social networking icon
+  o [MODALDIALOG] Darkened the background a little. You can set this back if you wish by using the ModalDialog_dialog CSS class
+ 
+ 6th March 2010
+ ==============
+  o [METER] Documented shadow properties
+  o [MISC] Added RGraph.getPageWidth() which returns the page width, accommodating browser differences
+  o [MISC] Added RGraph.getPageHeight() which returns the page height, accommodating browser differences
+  o [MODALDIALOG] Increased the radius of the corners (ie they're more rounded now)
+  o [MODALDIALOG] Documented the ModalDialog CSS classes and also added miscellaneous documentation
+  o [MSIE] Added context menu to the MSIE example
+
+ 27th February 2010
+ ==================
+  o [API] Added information about the coords array.
+  o [API] Added a little information about dynamically updating your graphs
+  o [MISC] Zoom in canvas mode now has a dark background option - chart.zoom.background - can be true or false and defaults to true
+           Note: If you use the full canvas zoom, this will affect you - if you don't like it, you will need to turn it off
+ o [MISC] Added RGraph_zoomed_canvas CSS class. Also tweaked the default CSS for the two types of zoom
+ o [MISC] Tweaked the animation example
+
+ 20th February 2010
+ ==================
+  o [DOCS] Added reasonable caching strategy
+  o [DOCS] Expanded the API docs regarding the data properties
+  o [LINE] Removed chart.border property. You should use CSS on your canvas element instead.
+  o [LINE] Added chart.ymin property
+  o [LINE] Tickmarks are no longer drawn if the tick is outside the Y scale range
+  o [METER] Added shadow
+  o [WEBSITE] Removed most tables from the website
+  o [WEBSITE] Fixed the issue with the front page graphs, Google Chrome and missing text. This was done by NOT using
+              asynchronous processing.
+
+ 9th February 2010
+ =================
+  o [PIE] Fixed pie chart sticks with athick white border
+  o [PIE] Added chart.labels.sticks.color
+  o [DOCS] Added link anchors to documentation pages, eg: http://www.rgraph.net/docs/bar.html#chart.labels
+
+ 7th February 2010
+ =================
+  o [BAR] Added ability to specify number of Y labels - 1, 3 or 5 (the default).
+  o [LINE] Added ability to specify number of Y labels - 1, 3 or 5 (the default).
+  o [LINE] Added a little missing documentation
+  o [LINE] Small fix to MSIE arrow style tickmarks
+  o [MISC] Optimisations to all chart libraries
+  o [MISC] Added RGraph_zoom_window CSS class - the front page uses it if you want an example
+  o [SCATTER] Added ability to specify number of Y labels - 1, 3 or 5 (the default).
+  o [SCATTER] Added a little missing documentation
+
+ 30th January 2010
+ =================
+  o [BAR] Performance tweaks.
+  o [DOCS] Made note about using tables for layout and how it can impact negatively on graph speed.
+  o [DOCS] Documented Pie chart label sticks.
+  o [LINE] Performance tweaks.
+  o [MISC] Opera (10.5) now supports the canvas text and shadow APIs
+
+ 23rd January 2010
+ =================
+  o [LINE] Fix to arrow style tickmarks
+  o [MISC] Very minor change to tooltips and event handling
+  o [SCATTER] Added diamond shape tickmarks
+
+ 16th January 2010
+ =================
+  o [BAR] Documented chart.ylabels
+  o [CONTEXT] Context menus are now positioned correctly when you specify a DOCTYPE in MSIE
+  o [LINE] Added and documented chart.ylabels
+  o [MODAL DIALOG] This is now completely static (when scrolling) in all browsers (Chrome, FF, MSIE, Safari, Opera), (MSIE requires that
+                   you use a doctype.
+  o [ODO] Improved MSIE support (spurious circles are no longer drawn)
+
+ 9th January 2010
+ ================
+  o [BAR] Added glass variant
+  o [BAR] Added sketch variant
+  o [DOCS] Documented getCanvasXY() function
+  o [MISC] Links now work in tooltips
+  o [MISC] Added standard box-shadow: CSS property where necessary
+  o [MISC] Slight border-radius change to context menu
+  o [PIE] Added small (optional) label sticks
+  o [PROGRESS] Added indicator arrows
+
+ 2nd January 2010
+ ================
+  o [METER] Added this as a new chart type
+  o [MISC] More optimisations for Meter, Line and Bar charts
+  o [TRADAR] Added tooltips
+  o [TRADAR] Added ability to specify offsetx and offsety for labels
+
+ 19th December 2009
+ ==================
+  o [BAR] Added support for MSIE shadows. Shadow blurring is not available though
+  o [BAR] Fixed dot chart colours not showing correctly in MSIE
+  o [BIPOLAR] Added support for MSIE shadows. Shadow blurring is not available though
+  o [FUNNEL] Optimised this chart type a little
+  o [FUNNEL] Added support for MSIE shadows. Shadow blurring is not available though
+  o [LINE] Added support for MSIE shadows. Shadow blurring is not available though
+  o [MISC] The context menu for Safari, Opera and Firefox Mac is now triggered by a double click (left mouse button).
+  o [MSIE] Tooltips now work (albeit a little unreliably), but this browser is very slow at showing them. Using a doctype will
+           cause them to be ou of position.
+  o [PIE] Added support for MSIE shadows. Shadow blurring is not available though
+  o [PROGRESS] Added support for MSIE shadows. Shadow blurring is not available though
+
+ 12th December 2009
+ ==================
+  o [MSIE] Microsoft Internet Explorer is now supported in a limited fashion. You can see it in action here:
+           http://www.rgraph.net/docs/msie.html This is not using Google Chrome Frame.
+  o [TRADAR] Rewrote so that it works with MSIE. This rewrite means that tooltips will be feasible (I'm yet to add them)
+  o [WEBSITE] Significant reorganisation of website
+ 
+ 5th December 2009
+ =================
+  o [API] Added and documented RGraph.Async() function, which can be used to help speed up your pages. There's a page which details it:
+          http://www.rgraph.net/docs/async.html
+  o [MISC] Removed text support for Opera. The graphs are still displayed, albeit without text
+  o [MISC] Changed to object detection in place of specific browser detection for older browsers. This means more
+           browsers are accounted for.
+  o [MISC] Added RGraph.getSegment() function, which returns the applicable segment information
+           (x, y, radius, startAngle, endAngle)
+  o [SCATTER] Added ability to do Barplots using the Scatter chart.
+  o [SCATTER] Can now specify the scatter to not display tick marks (be specifying the tickmark as null)
+
+ 28th November 2009
+ ==================
+ o [DOCS] Added RGraph.HideContext() to API documentation.
+ o [MISC] Simplified logic for showing the context menu. Please test your browser on the website before upgrading as this may
+          cause regressions.
+ o [MISC] Fixed slight oddity for zoom which resulted in a small zoom thumbnail
+ o [MISC] The RGraph website now works with Google Chrome Frame. NB: If you're having a similar problem, ensure the META
+          tag is in the first 1Kb of the page.
+ o [MISC] Achieved a degree of Opera compatibility. Please bear in mind that Opera does not yet support the canvas text
+          or shadow APIs so do not expect to see any shadows on your graphs. Text is simulated however, so the graphs
+          are still usable in some circumstances however. Also bear in mind that Opera support is buggy.
+
+ 20th November 2009
+ ==================
+  o [MISC] Added new mode for zoom - thumbnail This shows a zoom thumbnail (you must set chart.zoom.mode to thumbnail) instead of
+           zooming the entire canvas. The line graph on the front page shows an example of it.
+  o [MISC] Context menu in Mac Firefox is now attached to the left mouse button instead of the right
+  o [NOTE] Annotations are now persistent in Chrome (dev channel releases at the moment) and Chrome Frame
+
+ 14th November 2009
+ ==================
+  o [ALL] Finished zoom function
+  o [PIE] Work on linewidth and line color
+  o [MISC] Changed Safari to use left click for context menu - should elimate the temperamentality
+
+ 8th November 2009
+ =================
+  o [ALL] Added zoom functionality (This is not finished yet)
+  o [API] Corrected this regarding graph data
+  o [MISC] Added RGraph.ClearAnnotations() to API documentation. NB: This function is called when you call RGraph.Clear()
+
+ 31st October 2009
+ =================
+  o [DOCS] Correct the docs regarding text sizes
+  o [PIE] Miscellaneous fixes
+  o [RADAR] Changed to be left aligned
+
+ 25th October 2009
+ =================
+  o [ALL] Added property: chart.text.font
+  o [ALL] Added property: chart.text.color
+  o [ALL] Changed from pixels to points for font sizes (you may need to reduce your font sizes slightly). Default is now 10pt
+  o [DONUT] Added ability to set key as being in gutter
+  o [DONUT] Added chart.align for left/center/right aligning the chart
+  o [PIE] Added chart.align for left/center/right aligning the chart
+
+ 17th October 2009
+ =================
+  o [BAR] Added new option: chart.axis.color
+  o [Bipolar] Added new option: chart.axis.color
+  o [DOCS] Automated generation of API (properties) documentation
+  o [HBAR] Added new option: chart.axis.color
+  o [LINE] Added new option: chart.noxaxis
+  o [LINE] Added new option: chart.axis.color
+  o [LINE] Reduced default X/Y shadow offset
+  o [LINE] Added new option: chart.noendtick - useful for when you're generating line charts with Y axes on both sides
+  o [MISC] Changed "Combining..." page to illustrate combining two line charts
+  o [MISC] Added XML documentation
+  o [MISC] Added performance note about combining libraries
+  o [SCATTER] Added new option: chart.axis.color
+
+ 10th October 2009
+ =================
+  o [BAR] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+  o [BAR] Changed chart.labels.abovebar to chart.labels.above
+  o [BAR] Added chart.labels.above to stacked bar charts
+  o [BIPOLAR] Fixed using chart.xmax
+  o [BIPOLAR] Added chart.scale.decimals
+  o [HBAR] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+  o [HBAR] Added chart.labels.above. Not technically "above" the bar (not at all), but it's so named for API compatibility
+  o [HBAR] Added chart.labels.above to stacked chart
+  o [LINE] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+  o [PIE] Miscellaeous work
+  o [SCATTER] Added chart.background.grid.hlines, chart.background.grid.chart.background.grid.vlines and chart.background.grid.border
+  o [WEBSITE] Added sharing buttons
+
+ 3rd October 2009
+ ================
+  o [ALL] Charts now clean up events if tooltips are not installed. This means that if tooltips are not being used
+          the onmousemove/onclick events (depending on the graph library) are reset to null.
+  o [BAR] 3D effect now works with background grid and bars
+  o [DOCS] Added API documentation (replaces working.html)
+  o [MISC] Changed various graphs default background bar colors to white
+  O [MISC] Removed array_range() function - unused
+  o [LINE] More (general) work
+  o [LINE] chart.fillstyle can now be an array as well as a string
+  o [LINE] Added 3D variant to line chart.
+  o [MISC] Added minified library archive
+
+ 19th September 2009
+ ===================
+  o [ALL] Added new option - chart.title.color - to all graph types (except the LED)
+  o [LINE] Slight modification to filled line charts and the (stroke) colour.
+  o [LINE] Changed stepped line chart so last vertical line is not drawn
+  o [LINE] Changed the look (for the better) of filled line charts and thick lines
+  o [LINE] Added option - chart.axesontop - useful in a minority of cases; causes the axes to be
+           redrawn after the graph
+  o [LINE] Added "chart.filled.range" option. Used to compare the range/difference between two sets of data.
+  o [MISC] Fixed negative horizontal bars
+  o [LINE] Fixed problem with null arguments
+  o [LINE] Filled line charts now work a little better with negative values
+  o [PROGRESS] Added chart.tickmarks.color
+  o [PROGRESS] Added chart.text.color
+
+ 6th September 2009
+ ==================
+  o [ALL] Fixed libraries to work with Prototype.js
+  o [ALL] Added chart.title.vpos allowing you override and specify the position of the title. This should be a
+          decimal from 0 to 1. By default it's not used
+  o [BAR] Can now have Y axis labels in right hand gutter
+  o [LINE] Can now have Y axis labels in right hand gutter
+  o [COMMON] Fixed scale generation bug when maximum value is zero (ie all of your values are zero)
+
+ 22nd August 2009
+ ================
+  o [MISC] Optimisations on various graph libraries
+  o [MISC] Very minor albeit better HTML5 compliance
+  o [LINE] You can now specify the Y axis position - left (default) or right
+  
+ 8th August 2009
+ ===============
+  o [BAR] Added 3D effect to regular, grouped and stacked charts
+  o [GANTT] Can now specify background grid width
+  o [LED] The text is now stripped of right-most whitespace
+
+ 25th July 2009
+ ==============
+  o [MISC] Stop using $() function for better compatibility with outside libraries
+  o [SCATTER] Support supplying multiple datasets as one big array instead of multiple arrays
+  o [ALL] Changed all graph types to "new RGraph.xxx()" format
+ 
+ 3rd July 2009
+ =============
+  o [DOCS] Misc updates
+  o [DOCS] Fixed docs regarding default gutter size
+  o [LINE] Handle null values better
+  o [LINE] Documented optional different fill colour
+  o [MISC] Added caching enhancements
+  o [MISC] Slight change to FixEventObject() so offsetX and offsetY are available in Firefox
+  o [SCATTER] Allow multiple datasets. Effect is only visible when lines are shown
+  o [SCATTER] Key can now be shown for multiple lines
+
+ 20th June 2009
+ ==============
+  o [ALL] Code optimisations
+  o [ALL] Annotations are now persistent in browsers that support HTML5 DOM storage (currently Firefox 3.5 and Safari 4)
+  o [BAR] Added ability to specify labels above bars on single and grouped bar charts
+  o [SCATTER] Added ability to show connecting line
+
+ 6th June 2009
+ =============
+  o [ALL] On graphs that support tooltips, you can now have context menus at the same time as tooltips
+  o [MISC] Fixes to hiding palette in Chrome
+  o [MISC] Fixed a palette resizing bug
+  o [MISC] Changed the number of frames for expand and fade tooltip effects from 5 to 10 - looks a little smoother
+  o [MISC] Fixed a minor scale bug
+  o [MISC] Changed name of ShowPalette() function to RGraph.Showpalette()
+  o [PIE] Fixed minor pie chart bugs with mouse cursor
+
+ 23rd May 2009
+ =============
+  o [ALL] Documented context menu
+  o [ALL] Added annotations - useful to highlight interactively, and added example to front page line chart
+  o [BAR] Added pyramid chart variant
+  o [BAR] Added arrow chart variant
+  o [BAR] Added crosshairs
+  o [FUNNEL] Added tooltips
+  o [LINE] Added crosshairs
+  o [LINE] Can now have a context menu at the same time as tooltips
+  o [MISC] Added annotations mini colour palette
+  o [SCATTER] Added crosshairs
+  o [SCATTER] Fixed bug where pre/post units were not being shown
+  o [SCATTER] Can now have a context menu at the same time as tooltips
+
+ 9th May 2009
+ ============
+  o [BAR] Can now better control the shadow
+  o [BAR] Now ymax is exactly that which is used
+  o [BAR] You can now control the number of decimals that are used
+  o [BIPOLAR] Added shadow
+  o [HBAR] Can now better control the shadow
+  o [HBAR] Added tooltipcapability
+  o [PIE] Can now better control the shadow
+  o [LINE] Can now better control the shadow
+  o [LINE] Reversed order of arguments to the constructor - ie the data - so they are uniform with things like labels and tooltips
+  o [LINE] Can now have a fill colour that's different to the line colour (see the last example on the lines example page)
+  o [LINE] Added arrow style tickmarks (filled and not) - look best with a linewidth of 1 or 2
+  o [LINE] Number of labels is now independent of number of datapoints, as are number of X tickmarks
+           The second to last two line chart examples show this in action
+  o [LINE] Added an interesting example showing off the new independence of labels, datapoints and tickmarks. The ninth
+           line example (the sin/cos/tan curves) has 361 datapoints but only 5 labels - 361 labels would be a bit much.
+  o [LINE] Line chart no longer draws in the gutter (see this in action by looking at the above tangent curve example)
+  o [PROGRESS] Brought shadow into line with the rest of the graphs
+  o [PROGRESS] Tidied this up a little
+  o [PROGRESS] Added tooltip capability
+  o [RADAR] Added tooltip capability
+  o [DOCS] Added small note about canvas and accessibility
+  o [MISC] Fixed a few HTML warnings
+  o [MISC] Cleaned up CSS warnings
+  o [MISC] Updated license
+  o [MISC] Slight tweaks to context menu: Specifying a null callback now means that that menu item
+           will not trigger the rollover effect
+ o [MISC] Fixed a scale bug where the top value is 5.xxx
+ o [WEBSITE] Made the line graph and pie chart on the front page a little more interactive
+ o [WEBSITE] Added a funnel chart to the front page
+ o [FUNNEL] Added horizontal alignment for labels
+
+ 25th April 1009
+ ===============
+  o [MISC] Changed to .zip format for archive instead of .tar.gz - easier to work with
+  o [MISC] Fixed issue with "expand" type tooltips & timers
+  o [MISC] Unified default gutter setting (25px)
+  o [MISC] Made shadows all point the same way across all graphs
+  o [MISC] Fixed horizontal background bars so that specifying a value greater than the ymax (or less than the negative ymax)
+           uses the ymax value instead
+  o [MISC] ModalDialog fixes for width and height settings on various browsers and DOM modes
+  o [MISC] Scale is now generated more accurately for *really* tiny values
+  o [LINE] Performance enhancements regarding scale generation
+
+ 11th April 2009
+ ===============
+  o [MISC] Slight aleration to improve "grow" option of tooltips. Instead of starting at the top and growing downwards, it now
+           starts in the center and grows outward in all directions
+  o [MISC] Changed "grow" to "expand" for tooltips
+  o [ODO] Documented ability to turn off the pointer end
+  o [DONUT] Added ring-in-ring effect, enabling multiple datasets
+  o [DONUT] Added option to use in-graph key instead of labels
+  o [LINE] Changed "tick" style tickmarks to "halftick". "tick" now gives a fullheight tickmark, and also added "endtick"
+           which gives a full height tick mark at the ends of the lines
+  o [MISC] Added doctype to all pages and fixed modaldialog accordingly
+  o [MISC] CSS and DTD fixes across the site
+  o [MISC] ModalDialog fixes
+  o [MISC] Add type attribute back to SCRIPT tags - needed for DTD compliance
+  o [HBAR] Added new graph type - Horizontal Bar chart
+
+ 28th March 2009
+ ===============
+  o [BAR] Added dot chart capability
+  o [BAR] When mouse is over a hotspot, cursor now changes
+  o [PIE] When mouse is over a hotspot, cursor now changes
+  o [LINE] When mouse is over a hotspot, cursor now changes
+  o [GANTT] When mouse is over a hotspot, cursor now changes
+  o [DONUT] When mouse is over a hotspot, cursor now changes
+  o [SCATTER] When mouse is over a hotspot, cursor now changes
+  o [MISC] Added new effect for tooltips. So now you can have "fade" (default) or "grow"
+  o [MISC] Added drop shadow to context menu
+  o [MISC] Resolved Chrome color, shadow and gradient bugs
+  o [DOCS] Added short section about suggested library layout
+  o [WEBSITE] Always now show two download links
+
+ 14th March 2009
+ ===============
+  o o------------------------------------------------------------------------------------------------------------------o
+    | IMPORTANT !                                                                                                      |
+    | Every single one of the property names has been changed to be a little more unified. The new format is now       |
+    | "chart.xxx" where xxx is the actual name. Some of the names have been changed completely, eg. "chart.text.size", |
+    | which was formerly "textheight", whilst others only marginally. This was necessary to bring some semblance of    |
+    | uniformity to the RGraph properties across all of the libraries, make it look a bit more "proffessional" and     |
+    | provide plenty of scope for future properties.                                                                   |
+    |                                                                                                                  |
+    | You should also note that as of this release (14th March 2009) that RGraph has been changed to use the canvas    |
+    | text and shadow APIs. This may mean you needing to upgrade your browser if you want to use the latest version.   |
+    | At the time of writing, this meant Firefox 3.1b2, Safari 4 and Chrome 2. If you don't wish to upgrade your       |
+    | browser, or need Opera support, then you will need to remain on the 28th February 2009 version.                  |
+    o------------------------------------------------------------------------------------------------------------------o
+  o [FUNNEL] Added key ability to Funnel chart
+  o [FUNNEL] Added shadow for key
+  o [BAR] Added shadow for key
+  o [LINE] Added shadow for key
+  o [RADAR] Added shadow for key
+  o [TRADAR] Added shadow for key
+  o [RADAR] Added tick marks to the axes
+  o [PIE] Added border option.
+  o [BAR] Added "in graph" static labels, useful for highlighting things
+  o [LINE] Added "in graph" static labels, useful for highlighting things
+  o [MISC] Provided easy access to minified copies of the libraries
+  o [ODO] Added inner and outer shadows
+  o [BAR] Changed to canvas text & shadow API
+  o [BIPOLAR] Changed to canvas text & shadow API
+  o [DONUT] Changed to canvas text & shadow API
+  o [FUNNEL] Changed to canvas text & shadow API
+  o [GANTT] Changed to canvas text & shadow API
+  o [LED] Changed to canvas text & shadow API
+  o [LINE] Changed to canvas text & shadow API
+  o [ODO] Changed to canvas text & shadow API
+  o [PIE] Changed to canvas text & shadow API
+  o [PROGRESS] Changed to canvas text & shadow API
+  o [radar] Changed to canvas text & shadow API
+  o [SCATTER] Changed to canvas text & shadow API
+  o [TRADAR] Changed to canvas text & shadow API
+
+ 28th February 2009
+ ==================
+  o [MISC] Added performance information about onload
+  o [BAR] Can now specify Y axis units (both before and after the number)
+  o [LINE] Can now specify Y axis units (both before and after the number)
+  o [SCATTER] Can now specify Y axis units (both before and after the number)
+  o [PROGRESS] Can now specify Y axis units (both before and after the number)
+  o [BIPOLAR] Can now specify X axis units (both before and after the number)
+  o [BAR] Fixed scale bug
+  o [MISC] Added UK pound sign to font set
+  o [FUNNEL] Added new chart - Funnel chart. Can be used to represent sales processes
+  o [FUNNEL] Made funnel use canvas shadow API
+  o [MISC] Changed minification script to work "in-place" NOTE
+  o [PROGRESS] Made progress use canvas shadow API
+  o [MISC] Tested RGraph on Safari 4.0 - appears to be fine
+  o [LINE] Added ability to specify horizontal coloured bars
+  o [BAR] Added ability to specify horizontal coloured bars
+  o [SCATTER] Added ability to specify horizontal coloured bars
+
+ 14th February 2009
+ ==================
+  o [PIE] Added tooltips + updated docs to correspond
+  o [WEBSITE] Added tooltips to Pie on front page
+  o [LED] Added "counter-like" basic LED grid
+  o [DONUT] Made donut a proxy to pie chart
+  o [DONUT] Added tooltips
+  o [MISC] Moved CSS styles to scripts. You no longer need to define CSS styles unless you wish to override something
+  o [PIE] Made tooltips for pie use 3D effect. This is optional - it can be the traditional 2D or the new 3D effect
+  o [SCATTER] Can now have the X axis in the center
+  o [SCATTER] Added tooltip facility
+  o [MISC] Consolidated invoice handling
+  o [MISC] Minor fix to DOM structure of context menu
+  o [LINE] Can now have combined Line and Bar chart so you can overlay Line graphs on top of Bar charts
+  o [BAR] Can now have combined Line and Bar chart so you can overlay Line graphs on top of Bar charts
+  o [MISC] Moved showcase examples to separate pages - showcase.html was doing too much and becoming far too slow
+
+ 31st January 2009
+ =================
+  o [ODO] Added .beginPath() when starting to draw the Odo - needed for animation
+  o [MISC] Rewrote ModalDialog
+  o [GANTT] Corrected gantt chart docs
+  o [MISC] Context menu is now always the correct width
+  o [BAR] Added ability to specify X axis labels to be drawn at eith 45 or 90 degrees
+  o [LINE] Added ability to specify X axis labels to be drawn at eith 45 or 90 degrees
+  o [SCATTER] Added ability to specify X axis labels to be drawn at eith 45 or 90 degrees
+  o [BIPOLAR] Added tooltips
+  o [DOCS] Re-jigged (ever so slightly) docs index layout
+  o [DOCS] Added info on working with RGraph objects in conjunction with accessing the underlying
+           canvas/context objects
+  o [DONUT] Made sure the above was valid
+  o [PROGRESS] Made sure the above was valid
+
+ 17th January 2009
+ =================
+  o [MISC] Added licensing FAQ page including invoice mailer
+  o [MISC] Moved CSS to css subfolder
+  o [MISC] Renamed modaldialog and removed external fade library
+  o [MISC] Added example of how to integrate RGraph with external libraries using the ModalDialog
+  o [MISC] ymax property is no longer deprecated - it can be used to stop the scale changing when animating your graphs.
+  o [MISC] Added documentation page about animation
+  o [SCATTER] Added square tick type
+  o [PIE]  Fixed last segments line width
+  o [MISC] Updated copyright notice
+  o [DOCS] Added basic example for implementation guidance
+  o [MISC] Changed test page to use tables instead of divs. This will make it more apparent if something breaks
+           in the RGraph.getMouseXY() function.
+  o [ODO]  Changed to use 10 labels instead of 8 - should make for nicer scale values.
+  o [ODO]  Made tick marks tie into labels more
+
+ 4th January 2009
+ ================
+  o [DOCS] Added note about pre-caching
+  o [SCATTER] Added color example to scatter chart
+  o [MISC] Fixed tooltips appearing in the wrong place
+  o [MISC] Removed tooltip shadow layer. Shadows are accomodated for in CSS3
+  o [DOCS] CSS class documentation
+  o [MISC] More work on things working with html5 doctype
+  o [MISC] Removed shadow layer from tooltips. This will be accomodated in CSS3, and is already by some browsers (MSIE (!), Chrome,
+           Safari, and the forthcoming FF 3.1)
+  o [MISC] Ditto for context menus
+  o [MISC] Changed RGraph.getMouseXY() to be more accomodating
+  o [WEBSITE] Added favicon.png
+  o [WEBSITE] Added example of pie chart to front page
+  o [WEBSITE] Changed front page to use tables instead of divs to tell if tooltips keep working
+  o [MISC] Overhauled RGraph.getMouseXY() so that it works in spite of being nested in tables. It also works
+           if you position the canvas absolutely and only specify one of the top or left. Wonderbar!
+  o [SCATTER] Added ability to specify the color of the tick ie:[x, y, color] It's optional. ** Could do with a key **
+  o [DOCS] Added color information
+  o [DOCS] Added context menu information
+  o [MISC] Made context menus more XP style
+  o [GANTT] Customised the example more, showing the completage indicators.
+  o [GANTT] Events and vertical bars are now defined in the usual way, by using the Set() method
+  o ]MISC] Added __object__ property to all graph objects
+  o [MISC] Unified text size at 10 points (and 2 greater for titles).
+  o [MISC] Added context menus to all graph types
+  o [MISC] Fixed tooltip widths on front page. And siving in general in Opera
+
+ 20th December 2008
+ ==================
+  o [MISC] Converted all graphs to use dollar ($) function in place of document.getElementById("...")
+  o [TRADAR] Now defaults to drawing the key out of graph
+  o [LINE] Now labels are turned off if there's fewer labels than data points (every line)
+  o [MISC] Added better smaller scales - now goes down to 0.0005
+  o [DOCS] Added more details on tooltips and positioning
+  o [LINE] Added gridwidth property
+  o [BAR] Added gridwidth property
+  o [MISC] Removed rotating text example (it's still in the archive - it's just not linked)
+  o [MISC] More work on scales when decimal values are involved, plus graphs now use thousand seperators to aid readability
+  o [MISC] More work on tooltips and their positioning.
+  o [MISC] Added "keyposition" option, which can be either "gutter" or "graph" and determines where the key is drawn
+  o [MISC] Unified all graphs to use the same "textheight" property for text.
+  o [MISC] All titles are now drawn two pixels larger than the "textheight" property
+  o [LINE] Key can now be placed above the actual graph area if  desired
+  o [BAR] Key can now be placed above the actual graph area if  desired
+  o [MISC] Fixes to number formatting, including when there multiple graphs on a page
+  o [BAR] Changed summary line to default to off
+  o [BIPOLAR] Scale values now contain thousand separators
+  o [SCATTER] Scale values now contain thousand separators
+  o [LINE] Scale values now contain thousand separators
+  o [BAR] Scale values now contain thousand separators
+  o [MISC] Updated issues.html with details of the smallest scales
+  o [SCATTER] Deprecated the ymax property. RGraph.getScale() is now good enough (xMax is bipolar chart equivalent)
+  o [LINE] Deprecated the ymax property. RGraph.getScale() is now good enough
+  o [BIPOLAR] Deprecated the xmax property. RGraph.getScale() is now good enough
+  o [BAR] Deprecated the ymax property. RGraph.getScale() is now good enough
+  o [MISC] Made RGraph.getScale() return the whole scale (all five values), not just the top value
+           This means better quality scales can be produced.
+  o [MISC] Made note about positioning in docs on issues page
+  o [ODO] Work on Small scale values
+  o [BIPOLAR] Work on Small scale values
+  o [BAR] Work on Small scale values
+  o [LINE] Work on Small scale values
+  o [MISC] Added tooltip fade in effect using CSS3 opacity
+  o [BAR] Added tooltip functionality to stacked bar chart
+  o [BAR] Added tooltip functionality to grouped bar chart
+  o [MISC] Added gradient to front page graphs
+  o [TRADAR] Added gradient to bipolar on test page
+  o [TRADAR] Re-added traditional radar chart. It doesn't work in Opera 9.x, only Opera 10+. Documentation for this also fine tuned
+  o [MISC] Tidied up RGraph.common.js
+  o [MISC] Removed drawTextAngle() - RGraph.Text() does this
+  o [MISC] Added a bar chart with centre X axis to example page
+  o [GANTT] Fixed Gantt chart title text placement
+  o [GANTT] Added title text size property
+  o [WEBSITE] Changed colour of example on website
+  o [RADAR] Changed key to be the same as the bar/line/tradar
+  o [DOCS] Lots of link updates
+
+ 5th December 2008
+ =================
+  o [LINE] Made keys and lines (ie stacked/filled) totally correspond.
+  o [BAR] Stopped bar chart tooltips redrawing the axes. Not entirely sure why it's doing this, but it seems fine without it.
+  o [DOCS] Bundled license document with archive
+  o [DOCS] Documentation and example updates.
+  o [MISC] Changed index.php to index.html Not earth shattering, but should make it clearer for people where to start,
+           and also makes the downloaded index.html styled as it should be.
+  o [WEBSITE] Added Cache-Control: Header
+  o [WEBSITE] Added link to support group on Google more obvious
+  o [DOCS] Added list of common issues
+  o [MISC] Added header into files that didn't have it
+  o [MISC] Removed CanvasText.enable() - unneccessary
+  o [ODO] Shortened the Odos pointer
+
+ 28th November 2008
+ ==================
+  o [MISC] Got rid of HTML5 doctypes - they seem to be interfering with tooltip positioning.
+           If you don't use tooltips, you'll therefore be fine.
+  o [ODO] Better needle. I think.
+  o [BAR] Keys for charts are now specified in the same order as the pertaining datasets
+  o [LINE] Keys for charts are now specified in the same order as the pertaining datasets
+  o [MISC] Added CSS3 shadows to tooltips
+  o [GANTT] Fixed bug in Gantt chart textsize property
+  o [LINE] Finally made shadows 100% accurate (ie tickmarks now have shadows too), including stepped line
+  o [WEBSITE] Added tooltips to line chart on front page
+  o [MISC] Fixed release script (check)
+  o [LINE] Added keys to line & bar chart
+  o [BAR] Added keys to line & bar chart
+  o [MISC] o-----------------------------------------------------------------------------------------------------o
+           | Use unified better getters/setters for all charts. This is a MAJOR update, since it affects all the |
+           | charts in a fundamental way. For the better. Any update should be done cautiously. But since        |
+           | RGraph is beta, all updates should be done that way. Judging by the RGraph test page though,        |
+           | everything seems fine.                                                                              |
+           o-----------------------------------------------------------------------------------------------------o
+
+ 15th November 2008
+ ------------------
+  o [BAR] Removed animation
+  o [LINE] Documented stepped line chart
+  o [LINE] Fixed tick marks
+  o [LINE] Added ability to specify line chart as being stepped
+  o [MISC] Documented default values.
+  o [GANTT] Added gantt chart
+  o [PROGRESS] Corrected name of Progressbar
+  o [LINE] Moved the background drawing to RGraph.common.js
+  o [SCATTER] Moved the background drawing to RGraph.common.js
+  o [MISC] Tooltips now move to the left of the cursor when it's too far right
+  o [MISC] Changed print_r() to pr() - less to type
+  o [MISC] Added GetDays() function for Gantt chart
+  o [GANT] Added it
+  o [MISC] Added an RGraph.print_r() method for easier debugging
+  o [MISC] Added a registry object to the common library to resolve scoping issues and so we don't need to use globals. Globals suck.
+  o [SCATTER] Added a plus tick style to the scatter chart - added a demo too
+  o [SCATTER] Fixed a bug in the Scatter graphs background drawing
+  o [BAR] Moved bar charts DrawBackground() into the RGraph.background class. Should make reuse far easier.
+  o [BAR] "backgroundGrid" property changed to "grid"
+  o [MISC] Added a minification script. This script doesn't reduce the scripts to the bare minimum. But it can take 50% off the size (!).
+  o [LINE] Can now specify colour of shadows for line and bar graphs
+   o [BAR] Can now specify colour of shadows for line and bar graphs
+  o [LINE] line chart now has real shadows and so they can be used for lines of any thickness
+  o [LINE] can now specify shadow offset
+  o [SCATTER] Fixed background bar boundaries
+  o [SCATTER] Added plus cross type
+  o [MISC] Moved background drawing to common library
+  o [WEBSITE] sitemap.xml Now has correct <lastmod> date which changes correctly when a release is performed CHECK
+  o [MISC] Tooltip nows store the text in __text__ variable on the tooltip object (.innerHTML changes the HTML when it's set)
+  
+ 1st November 2008
+ ------------------
+  o [BAR] Last bar chart example now uses a gradient
+  o [MISC] Changed hyphens to be slightly shorter
+  o [WEBSITE] Changed sitemap to use an update frequency of weekly. Last modified is now updated when a release is performed
+  o [BAR] Can now specify the grid size on the bar chart
+  o [LINE] Setting propeties can now be any case, upper or lower
+  o [MISC] Added RGraph.print_r() function
+  o [LINE] TickSize now actually has an effect
+  o [LINE] Added tooltips to line chart
+  o [WEBSITE] Moved support forum to Google group
+  o [MISC] Added object registration (for redrawing)
+  o [BAR] Removed margin from being accounted for in height calculation
+  o [LINE] Made tickmarks more coherent
+  o [BAR] Bar chart now uses canvas ID in some, but not all, error messages
+  o [LINE] Added small drop shadow to line chart
+  o [WEBSITE] Added example graphs to front page
+  o [BAR] Added tooltips to line chart
+  o [WEBSITE] Added more performance related information
+  o [PIE] Added drop shadow
+
+ 25th October 2008
+ -----------------
+  o [DOCS[ Added integration section
+  o [RADAR] Added title to radar
+  o [RADAR] Added textStyle to radar
+  o [PIE] Made one of the pie charts use a gradient
+  o [PROGRESS] Added shadows
+  o [PROGRESS] Added title
+  o [ODO] Converted plain colour to radial gradient
+  o [PIE] Added gutter and title
+  o [DONUT] Added gutter and title
+  o [MISC] Fixed comma issue with rendering text
+  o [MISC] Added something to text bounding box illustrating exactly where the point specified is
+  o [BIPOLAR] Bipolar middle bit is now 60px wide instead of 50
+  o [BAR] Fixed shadow bugettee in Safari, Chrome, Opera
+  o [ODO] Documented and vastly improved. Made it use a gutter now allowind for a title (implemented)
+  o [MISC] Added common function, DrawTitle()
+  o [MISC] Added a Javascript version of the PHP function range()
+  o [MISC] Added ability to specify a title to the bar chart, line graph and scatter graph.
+  o [MISC] Changed directory layout slightly
+  o [MISC] Forum is now ecluded from the tar
+  o [MISC] Much improved scale auto-generation
+  o [DOCS] Added code samples to docs pages
+  o [DOCS] Added section on the front page about performance
+  o [SCATTER] Many improvements to the scatter graph
+  o [SCATTER] Much better auto scale generation
+  o [SCATTER] Made scatter use RGraph common library for text
+  o [RADAR] Converted to use common library for text
+  o [LINE] Much improved scale auto-generation
+  o [LINE] Changed to rounded line ends - not very noticable though
+  o [LINE] Converted labels to be drawn by the RGraph library
+  o [BAR] Added optional shadow effect
+  o [BAR] Removed ability to have X axis at the top. It served no real purpose and only served to complicate the code
+  o [BAR] Added animation
+  o [BAR] Much improved scale auto-generation
+  o [BAR] Converted text functions to use RGraph common library
+  o [BAR] Can now specify a title for the bar chart
+  o [BAR] Fixed a bug for Chrome
+  o [BAR] Fixed minor bugs in bar chart (background bars)
+  o [BAR] Added grouping property, which defaults to stacked, but can also be grouped, producing what you would
+          expect (unless you're expecting a chicken.
+  o [BAR] Added a few warnings concerning bad combinations of axis positions
+  o [ODO] Added more labels, now at 8 instead of 4
+
+ 24th September 2008
+ -------------------
+  o [WEBSITE] Added RSS feed to forum
+  o [DOCS] Added more documentation
+  o [ALL] Unified (sort of) the error messages
+  o [ODO] Added odometer
+  o [BIPOLAR] Added a bottom gutter for scale to go in
+  o [BIPOLAR] Added bottom text labels
+  o [PIE] Made pie chart work without translating
+  o [TRADAR] Added real radar chart.
+  o [BAR] Bar chart can now have the X axis in the center, so it now able to represent negative values
+  o [LINE] Allowed multiple lines
+  o [LINE] Line chart can now have the X axis in the center, so it now able to represent negative values
+  o [LINE] Fixed bug in line chart that meant if it was filled the filled line was stopping too short
+  o [LINE] Made it more obvious (I think) for specifying data when using multiple data sets (ie multiple lines)
+
+ 4th September 2008
+ ------------------
+  o Various additions including labels on all the graphs
Index: Dev/branches/Demo/RGraph/docs/adjusting.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting.html	(revision 225)
@@ -0,0 +1,133 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts interactively" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Adjusting charts interactively
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div style="float: left"></div>
+        <p>
+            Since 24th May 2010 you have had the ability to adjust your so if you want to see the charts interactively. Currently the Bar chart, Line chart,
+            Progress Bar, Rose chart and the Radar have this facility. Some chart types use multiple event handlers and as such
+            are unlikely to work well with other dynamic features. The Line chart is an example of this, and whilst it does work
+            with the context menu (and so the full canvas zoom), it is unlikely to work with other dynamic features.
+        </p>
+    
+    
+        <p>
+            At the current time this feature on the Bar and Line charts doesn't work with X axis in the center.
+        </p>
+    
+    
+        <p>
+            If your intention is to make some sort of interactive console, new HTML5 input types may also be of interest (for example the new <i>range</i> input type
+            which gives you a "slider bar"). Eg (Chrome/Safari/Opera):
+        </p>
+    
+        <p style="text-align: center">
+            <input type="range" min="0" max="100" value="76" onchange="document.getElementById('range_result').value = this.value"/>
+            <input type="text" id="range_result" size="3" value="76" />
+        </p>
+        
+        <h4>Note</h4>
+        
+        <p>
+            Since interactivly adjusting a chart involves completely redrawing it, having a lot of them on one page can cause
+            slower updates. For this reason each example chart is on its own page:
+        </p>
+        
+        <ul>
+            <li><a href="adjusting_bar.html">Bar chart</a></li>
+            <li><a href="adjusting_gantt.html">Gantt chart</a></li>
+            <li><a href="adjusting_hprogress.html">HProgress bar</a></li>
+            <li><a href="adjusting_line.html">Line chart</a></li>
+            <li><a href="adjusting_radar.html">Radar chart</a></li>
+            <li><a href="adjusting_rose.html">Rose chart</a></li>
+            <li><a href="adjusting_thermometer.html">Thermometer chart</a></li>
+            <li><a href="adjusting_vprogress.html">VProgress bar</a></li>
+        </ul>
+        
+        <h4>DOM2 event handlers</h4>
+        
+        <p>
+            In January 2011 all adjusting was converted to DOM2 event handling. This makes adjusting work much better with other
+            dynamic features.
+        </p>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_bar.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_bar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_bar.html	(revision 225)
@@ -0,0 +1,145 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - bar chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - bar chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            var bar = new RGraph.Bar('myCanvas', [512,653,512,533,674,453,458,741,496]);
+            bar.Set('chart.colors', ['blue', 'pink']);
+            bar.Set('chart.labels.above', true);
+            bar.Set('chart.shadow', true);
+            bar.Set('chart.shadow.color', '#aaa');
+            bar.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+            bar.Set('chart.adjustable', true);
+            bar.Set('chart.labels', ['2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008']);
+            bar.Set('chart.gutter.left', 45);
+            bar.Set('chart.title', 'An adjustable bar chart');
+            bar.Draw();
+            
+            function myFunc (obj)
+            {
+                var conf = RGraph.Registry.Get('chart.adjusting.bar.myCanvas');
+                
+                p(conf);
+            }
+            RGraph.AddCustomEventListener(bar, 'onadjustend', myFunc);
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        Bar chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - Bar chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The Bar chart can be adjusted by clicking on the chart, in line with the bar that you want to adjust.When adjusting is finished
+        the <i>onadjustend</i> event fires. As you will see in the example you can find the index of the relevant bar in the RGraph registry -
+        <i>RGraph.Registry.Get('chart.adjusting.bar.myCanvas')</i> (replace <i>myCanvas</i> with the ID of your canvas).
+    </p>
+    <canvas id="myCanvas" width="1000" height="250">[No canvas support]</canvas>
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+        var bar = new RGraph.Bar('myCanvas', [512,653,512,533,674,453,458,741,496]);
+        bar.Set('chart.colors', ['blue', 'pink']);
+        bar.Set('chart.labels.above', true);
+        bar.Set('chart.shadow', true);
+        bar.Set('chart.shadow.color', '#aaa');
+        bar.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+        bar.Set('chart.adjustable', true);
+        bar.Set('chart.labels', ['2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008']);
+        bar.Draw();
+        
+        function myFunc (obj)
+        {
+            var conf = RGraph.Registry.Get('chart.adjusting.bar.myCanvas');
+            
+            p(conf);
+        }
+        RGraph.AddCustomEventListener(bar, 'onadjustend', myFunc);
+    }
+&lt;/script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_gantt.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_gantt.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_gantt.html	(revision 225)
@@ -0,0 +1,227 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - Gantt chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - Gantt chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.gantt.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            gantt_events = [
+                      [31, 28, null, 'Richard'],
+                      [0, 120, null, 'Bob'],
+                      [84, 16, null, 'Fred'],
+                      [35, 45, null, 'Charles'],
+                      [0, 35, null, 'Kev'],
+                      [0, 28, null, 'Wayne'],
+                      [31, 28, null, 'John']
+                     ];
+            var gantt = new RGraph.Gantt('myc');
+            gantt.Set('chart.xmax', 120);
+            gantt.Set('chart.events', gantt_events);
+            gantt.Set('chart.defaultcolor', 'rgba(255,0,0,0.5)');
+            gantt.Set('chart.labels', ['January', 'February', 'March', 'April']);
+            //gantt.Set('chart.borders', false);
+            gantt.Set('chart.title', 'An adjustable Gantt chart');
+            gantt.Set('chart.adjustable', true);
+            gantt.Set('chart.vbars', [
+                                      [0, 31, 'rgba(230,230,230,0.8)'],
+                                      [59, 31, 'rgba(230,230,230,0.8)']
+                                     ]);
+            gantt.Draw();
+        
+            /**
+            * This is how to get notified once adjusting has ended
+            */
+            RGraph.AddCustomEventListener(gantt, 'onadjustend',function (obj)
+            {
+                var events = obj.Get('chart.events');
+                var conf   = RGraph.Registry.Get('chart.adjusting.gantt');
+                var idx    = conf['index'];
+
+                cl(gantt.Get('chart.events')[idx]);
+                cl(conf);
+                
+
+                document.getElementById("eventID").value       = idx;
+                document.getElementById("eventStart").value    = events[idx][0];
+                document.getElementById("eventDuration").value = events[idx][1];
+            });
+        
+            /**
+            * This is how to get notified during the adjusting
+            */
+            RGraph.AddCustomEventListener(gantt, 'onadjust',function (obj)
+            {
+                var events = obj.Get('chart.events');
+                var conf   = RGraph.Registry.Get('chart.adjusting.gantt');
+                var idx    = conf[0];                
+
+                document.getElementById("eventID").value       = conf['index'];
+                document.getElementById("eventStart").value    = events[conf['index']][0];
+                document.getElementById("eventDuration").value = events[conf['index']][1];
+            });
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        Gantt chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - Gantt chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The Gantt chart can be adjusted by dragging the bars left or right, or the events can be resized if you place the cursor at the
+        right edge of the event. To get the details of the bar being dragged you can use the
+        <i>onadjustend</i> event, and in that you can look at the RGraph registry - <i>RGraph.Registry.Get('chart.adjusting.gantt')</i> The
+        returned array consists of:
+
+        <ul>
+            <li>The numerical index of the event being adjusted (corresponding to the chart.events array that you set).</li>
+            <li>The chart object</li>
+            <li>The starting X position of the bar (before the chart was adjusted)</li>
+            <li>The starting Y position of the bar (before the chart was adjusted)</li>
+            <li>The original numerical value (in relation to your chart.xmax) that the bar started at</li>
+        </ul>
+    </p>
+    
+    <p>
+        When adjusting is complete the <i>chart.events</i> array is updated. So you can use the numerical index that you find in
+        the registry (as above) with the <i>chart.events</i> array to get up-to-date event information.
+    </p>
+    
+    <p>
+        <b>Note:</b>
+        The Gantt chart uses console.log() to send notifications. Press CTRL+SHIFT+J in Chrome to see the console, or use Firebug in
+        Firefox. Other browsers will vary.        
+    </p>
+
+    <canvas id="myc" width="1000" height="250">[No canvas support]</canvas>
+    Event ID: <input type="text" id="eventID" readonly />
+    Event start: <input type="text" id="eventStart" readonly />
+    Event duration: <input type="text" id="eventDuration" readonly />
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+        gantt_events = [
+                  [31, 28, null, 'Richard'],
+                  [0, 120, null, 'Bob'],
+                  [84, 16, null, 'Fred'],
+                  [35, 45, null, 'Charles'],
+                  [0, 35, null, 'Kev'],
+                 ];
+        var gantt = new RGraph.Gantt('myc');
+        gantt.Set('chart.xmax', 120);
+        gantt.Set('chart.events', gantt_events);
+        gantt.Set('chart.defaultcolor', '#0c0');
+        gantt.Set('chart.labels', ['January', 'February', 'March', 'April']);
+        gantt.Set('chart.borders', false);
+        gantt.Set('chart.adjustable', true);
+        gantt.Draw();
+    
+        /**
+        * This is how to get notified once adjusting has ended
+        */
+        RGraph.AddCustomEventListener(gantt, 'onadjustend',function (obj)
+        {
+                var idx = RGraph.Registry.Get('chart.adjusting.gantt')[0];
+
+                cl(RGraph.Registry.Get('chart.adjusting.gantt'));
+                cl(gantt.Get('chart.events')[idx]);
+        });
+        
+        /**
+        * This is how to get notified during the adjusting
+        */
+        RGraph.AddCustomEventListener(gantt, 'onadjust',function (obj)
+        {
+            var events = obj.Get('chart.events');
+            var conf   = RGraph.Registry.Get('chart.adjusting.gantt');
+            var idx    = conf[0];                
+
+            document.getElementById("eventID").value       = conf[0];
+            document.getElementById("eventStart").value    = events[conf[0]][0];
+            document.getElementById("eventDuration").value = events[conf[0]][1];
+        });
+    }
+&lt;/script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_hprogress.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_hprogress.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_hprogress.html	(revision 225)
@@ -0,0 +1,133 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - HProgress bar</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - HProgress bar" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.hprogress.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+
+            var hprogress = new RGraph.HProgress('myc', 83, 100, 0);
+            hprogress.Set('chart.color', 'green');
+            hprogress.Set('chart.adjustable', true);
+            hprogress.Set('chart.margin', 5);
+            hprogress.Set('chart.tickmarks.inner', true);
+            hprogress.Set('chart.tickmarks.zerostart', true);
+            hprogress.Set('chart.units.post', '%');
+            hprogress.Draw();
+
+            RGraph.AddCustomEventListener(hprogress, 'onadjustbegin', function () {console.log('Old value: ' + hprogress.value  );});
+            RGraph.AddCustomEventListener(hprogress, 'onadjustend', function () {console.log('New value: ' + hprogress.value  );});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        HProgress bar
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - HProgress bar</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The Horizontal Progress Bar can be adjusted by clicking on it. When adjusting
+        is finished the onadjustend event fires. If you attach a function to the onadjustend event (as below) you can get the new value by
+        looking at the <i>.value</i> property (eg <i>myProgress.value</i>).
+    </p>
+
+    <canvas id="myc" width="1000" height="100">[No canvas support]</canvas>
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+
+        var hprogress = new RGraph.HProgress('myc', 83, 100, 0);
+        hprogress.Set('chart.color', 'green');
+        hprogress.Set('chart.adjustable', true);
+        hprogress.Set('chart.margin', 5);
+        hprogress.Set('chart.tickmarks.inner', true);
+        hprogress.Set('chart.tickmarks.zerostart', true);
+        hprogress.Set('chart.units.post', '%');
+        hprogress.Draw();
+
+        RGraph.AddCustomEventListener(hprogress, 'onadjustbegin', function () {console.log('Old value: ' + hprogress.value  );});
+        RGraph.AddCustomEventListener(hprogress, 'onadjustend', function () {console.log('New value: ' + hprogress.value  );});
+    }
+&lt;/script&gt;
+</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_line.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_line.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_line.html	(revision 225)
@@ -0,0 +1,142 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - Line chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - Line chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            var line = new RGraph.Line('myc', [45,74,84,85,45,35,65,68,87,97,45,34,12], [15,14,12,16,18,19,14,12,74,84,95,65,35]);
+            line.Set('chart.labels', ['Kev','Matt','Rich','Dave','Iggy','Polly','Fiona','Fred','Pete','Lou','Fred','Bob']);
+            line.Set('chart.ylabels.inside', true);
+            //line.Set('chart.outofbounds', true);
+            line.Set('chart.linewidth', 2);
+            line.Set('chart.hmargin', 10);
+            line.Set('chart.shadow', true);
+            line.Set('chart.adjustable', true);
+            line.Set('chart.title', 'An adjustable line chart');
+            line.Set('chart.title.vpos', 0.5);
+            line.Draw();
+            
+            RGraph.AddCustomEventListener(line, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.line.myc'));});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        Line chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - Line chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The Line chart can be adjusted by dragging the line(s) up and down. By using the RGraph registry -
+        <i>RGraph.Registry.Get('chart.adjusting.line.myc')</i> - you can get the details of the adjustment
+        (replace <i>myc</i> with the ID of your canvas). This is an array consisting of:
+        
+        <ul>
+            <li>The chart object</li>
+            <li>The index of the point in the data series</li>
+            <li>A two element array consisting of the original coordinates of the point that is being adjusted</li>
+            <li>The index of the data series that contains the point being adjusted</li>
+        </ul>
+    </p>
+
+    <canvas id="myc" width="1000" height="250">[No canvas support]</canvas>
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+        var line = new RGraph.Line('myc', [45,74,84,85,45,35,65,68,87,97,45,34,12], [15,14,12,16,18,19,14,12,74,84,95,65,35]);
+        line.Set('chart.labels', ['Kev','Matt','Rich','Dave','Iggy','Polly','Fiona','Fred','Pete','Lou','Fred','Bob']);
+        line.Set('chart.ylabels.inside', true);
+        line.Set('chart.linewidth', 2);
+        line.Set('chart.hmargin', 10);
+        line.Set('chart.shadow', true);
+        line.Set('chart.adjustable', true);
+        line.Set('chart.title', 'An adjustable line chart');
+        line.Set('chart.outofbounds', true);
+        line.Draw();
+        
+        RGraph.AddCustomEventListener(line, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.line.myc'));});
+    }
+&lt;/script&gt;
+</pre>
+    
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_radar.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_radar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_radar.html	(revision 225)
@@ -0,0 +1,132 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - Radar chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - Radar chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.radar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            var radar = new RGraph.Radar('myc', [4,3,8,6,8,7,7,4,5], [7,2,4,5,4,3,3,3,3]);
+            radar.Set('chart.adjustable', true);
+            radar.Set('chart.colors', ['rgba(255,0,0,0.5)', 'rgba(255,255,0,0.5)']);
+            radar.Set('chart.labels', ['Hoolio', 'Godfrey', 'Albert', 'Jeff', 'Jack', 'Pete', 'Lou', 'Barney', 'Fred']);
+            radar.Draw();
+            
+            RGraph.AddCustomEventListener(radar, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.radar.myc'));});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        Radar chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - Radar chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <canvas id="myc" width="400" height="400" style="float: left">[No canvas support]</canvas>
+    
+    <p>
+        The Radar chart can be adjusted by dragging the points on the chart. When the <i>onadjustend</i> event fires, you will find
+        the following information in the RGraph registry - <i>RGraph.Registry.Get('chart.adjusting.radar.myc')</i> - where <i>myc</i>
+        is the ID of your canvas:
+    </p>
+    
+    <ul>
+        <li>The numerical, zero indexed number that corresponds to the dataset</li>
+        <li>The numerical, zero indexed point that relates to the original data array</li>
+        <li>This is a boolean and used to indicate which (horizontal) half of the chart the point is in. true - the right half, false - the left half</li>
+        <li>This is a boolean and used to indicate which (vertical) half of the chart the point is in. true - the bottom half, false - the top half</li>
+    </ul>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+            var radar = new RGraph.Radar('myc', [4,3,8,6,8,7,7,4,5], [7,2,4,5,4,3,3,3,3]);
+            radar.Set('chart.adjustable', true);
+            radar.Set('chart.colors', ['rgba(255,0,0,0.5)', 'rgba(255,255,0,0.5)']);
+            radar.Set('chart.labels', ['Hoolio', 'Godfrey', 'Albert', 'Jeff', 'Jack', 'Pete', 'Lou', 'Barney', 'Fred']);
+            radar.Draw();
+            
+            RGraph.AddCustomEventListener(radar, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.radar.myc'));});
+    }
+&lt;/script&gt;
+</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_rose.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_rose.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_rose.html	(revision 225)
@@ -0,0 +1,139 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - Rose chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - Rose chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.rose.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            var rose = new RGraph.Rose('cvs',[4,3,5,6,2,1,4]);
+            rose.Set('chart.colors.alpha', 0.5);
+            rose.Set('chart.colors.sequential', true);
+            rose.Set('chart.adjustable', true);
+            rose.Set('chart.labels', ['Olga','Kev','Bob','Charlie','Pete','John','Fred']);
+            rose.Draw();
+            
+            RGraph.AddCustomEventListener(rose, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.rose.cvs'));});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        Rose chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - Rose chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <canvas id="cvs" width="450" height="400" style="float: right">[No canvas support]</canvas>
+    
+    <div>
+        <p>
+            The Rose chart can be adjusted by clicking and dragging the segments to the desired size. When the <i>onadjustend</i> event fires
+            you can get the following segment information from <i>RGraph.Registry.Get('chart.adjusting.rose.myrose')</i> (where <i>myrose</i>
+            is the canvas ID):
+            
+            <ul>
+                <li>X coordinate</li>
+                <li>Y coordinate</li>
+                <li>The radius of the segment</li>
+                <li>Start angle (in DEGREES)</li>
+                <li>End angle (in DEGREES)</li>
+                <li>Numerical index of the segment, starting at the north axis and going clockwise.</li>
+            </ul>
+        </p>
+    </div>
+
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+        var rose = new RGraph.Rose('cvs',[4,3,5,6,2,1,4]);
+        rose.Set('chart.colors.alpha', 0.5);
+        rose.Set('chart.adjustable', true);
+        rose.Set('chart.labels', ['Olga','Kev','Bob','Charlie','Pete','John','Fred']);
+        rose.Draw();
+        
+        RGraph.AddCustomEventListener(rose, 'onadjustend', function (obj) {p(RGraph.Registry.Get('chart.adjusting.rose.cvs'));});
+    }
+&lt;/script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_thermometer.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_thermometer.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_thermometer.html	(revision 225)
@@ -0,0 +1,143 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - Thermometer chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - Thermometer chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.thermometer.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            var thermometer = new RGraph.Thermometer('myc', 0, 100, 78);
+            
+            var grad = thermometer.context.createLinearGradient(0,50,0,350);
+            grad.addColorStop(0, 'orange');
+            grad.addColorStop(1, 'white');
+
+            thermometer.Set('chart.colors', [grad]);
+            thermometer.Set('chart.title.side', 'An adjustable thermometer');
+            thermometer.Set('chart.adjustable', true);
+            thermometer.Draw();
+
+            RGraph.AddCustomEventListener(thermometer, 'onadjustbegin', function (obj) {document.getElementById("output").value += 'Value before adjustment: ' + obj.value + '\n';});
+            RGraph.AddCustomEventListener(thermometer, 'onadjust', function (obj) {document.getElementById("output").value += 'Value during adjustment: ' + obj.value + '\n';});
+            RGraph.AddCustomEventListener(thermometer, 'onadjustend', function (obj) {document.getElementById("output").value += 'Value after adjustment: ' + obj.value + '\n';});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        Thermometer chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - Thermometer chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+             document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <canvas id="myc" width="100" height="400" style="float: left">[No canvas support]</canvas>
+    
+    <p>
+        Nothing pertinent is kept in the registry. If you wish to get the new value of the thermometer you can check <i>obj.value</i>.
+        If you want the value before the adjustment, you can check the value with the onadjustbegin event (instead of the
+        onadjustend event).
+    </p>
+    
+    <p>
+        <textarea id="output" style="width: 600px; height: 200px;"></textarea>
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+        var thermometer = new RGraph.Thermometer('myc', 0, 100, 78);
+        
+        var grad = thermometer.context.createLinearGradient(0,50,0,350);
+        grad.addColorStop(0, 'orange');
+        grad.addColorStop(1, 'white');
+
+        thermometer.Set('chart.colors', [grad]);
+        thermometer.Set('chart.title.side', 'An adjustable thermometer');
+        thermometer.Set('chart.adjustable', true);
+        thermometer.Draw();
+
+        RGraph.AddCustomEventListener(thermometer, 'onadjustbegin', function (obj) {document.getElementById("output").value += 'Value before adjustment: ' + obj.value + '\n';});
+        RGraph.AddCustomEventListener(thermometer, 'onadjust', function (obj) {document.getElementById("output").value += 'Value during adjustment: ' + obj.value + '\n';});
+        RGraph.AddCustomEventListener(thermometer, 'onadjustend', function (obj) {document.getElementById("output").value += 'Value after adjustment: ' + obj.value + '\n';});
+    }
+&lt;/script&gt;
+</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/adjusting_vprogress.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/adjusting_vprogress.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/adjusting_vprogress.html	(revision 225)
@@ -0,0 +1,137 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Adjusting your charts interactively - VProgress bar</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart adjusting docs " />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about adjusting your charts - VProgress bar" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.vprogress.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function (e)
+        {
+            var vprogress = new RGraph.VProgress('myc', 83, 100, 0);
+            vprogress.Set('chart.color', 'red');
+            vprogress.Set('chart.adjustable', true);
+            vprogress.Set('chart.margin', 5);
+            vprogress.Set('chart.tickmarks.inner', true);
+            vprogress.Set('chart.label.inner', true);
+            vprogress.Set('chart.units.post', '%');
+            vprogress.Set('chart.gutter.right', 45);
+            vprogress.Draw();
+            
+            RGraph.AddCustomEventListener(vprogress, 'onadjustbegin', function (obj) {document.getElementById("output").value += 'Value before adjustment: ' + obj.value + '\n';});
+            RGraph.AddCustomEventListener(vprogress, 'onadjustend', function (obj) {document.getElementById("output").value += 'Value after adjustment: ' + obj.value + '\n';});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        <a href="adjusting.html">Adjusting charts interactively</a>
+        >
+        VProgress bar
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Adjusting your charts interactively - VProgress bar</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <canvas id="myc" width="150" height="600" style="border: 1px dashed gray; float: left; margin-right: 5px">[No canvas support]</canvas>
+
+    <p>
+        Nothing pertinent is kept in the registry. If you wish to get the new value of the progress you can check
+        <i>obj.value</i>. If you want the value before the adjustment, you can check the value
+        with the <i>onadjustbegin</i> event (instead of the <i>onadjustend</i> event).
+    </p>
+    
+    <textarea id="output" style="width: 500px; height: 200px" readonly></textarea>
+
+    <br clear="all" />
+
+    <pre class="code" style="float: left">
+&lt;script&gt;
+    window.onload = function (e)
+    {
+        var vprogress = new RGraph.VProgress('myc', 83, 100, 0);
+        vprogress.Set('chart.color', 'red');
+        vprogress.Set('chart.adjustable', true);
+        vprogress.Set('chart.margin', 5);
+        vprogress.Set('chart.tickmarks.inner', true);
+        vprogress.Set('chart.label.inner', true);
+        vprogress.Set('chart.units.post', '%');
+        vprogress.Set('chart.gutter.right', 45);
+        vprogress.Draw();
+        
+        RGraph.AddCustomEventListener(vprogress, 'onadjustbegin', function (obj) {document.getElementById("output").value += 'Value before adjustment: ' + obj.value + '\n';});
+        RGraph.AddCustomEventListener(vprogress, 'onadjustend', function (obj) {document.getElementById("output").value += 'Value after adjustment: ' + obj.value + '\n';});
+    }
+&lt;/script&gt;
+</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/animation.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/animation.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/animation.html	(revision 225)
@@ -0,0 +1,269 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Animating your charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs animation" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about animating your charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.rose.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        /**
+        * The total number of frames, delay and current frame number
+        */
+        delay    = 35;
+        curframe = 1;
+        numframe = 20;
+
+        window.onload = function ()
+        {
+            /**
+            * Clear all of the canvases
+            */
+            RGraph.Clear(document.getElementById("myRose"));
+
+            /**
+            * Draw the bar chart
+            */
+            var multiplier = curframe / numframe;
+            var rose = new RGraph.Rose('myRose', [45 * multiplier, 12 * multiplier,
+                                           16 * multiplier, 18 * multiplier,
+                                           44 * multiplier, 54 * multiplier,
+                                           23 * multiplier, 21 * multiplier,
+                                           56 * multiplier, 58 * multiplier,
+                                           33 * multiplier, 47 * multiplier] );
+            rose.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            rose.Set('chart.ymax', 60); // This stops the scale from changing frame to frame
+            rose.Set('chart.hmargin', 5);
+            rose.Set('chart.gutter.left', 30);
+            rose.Set('chart.gutter.right', 30);
+            rose.Set('chart.gutter.top', 30);
+            rose.Set('chart.gutter.bottom', 30);
+            
+            // Gradient
+            var grad = rose.context.createRadialGradient(rose.canvas.width / 2,
+                                                         rose.canvas.height / 2,
+                                                         0,
+                                                         rose.canvas.width / 2,
+                                                         rose.canvas.height / 2,
+                                                         150);
+
+            grad.addColorStop(0, 'white');
+            grad.addColorStop(1, 'red');
+
+            rose.Set('chart.colors', [grad]);
+            rose.Set('chart.strokecolor', null);
+            rose.Draw();
+
+            /**
+            * If the animation frame is less than number of the total number of frames, redraw the canvas
+            */
+            if (curframe < numframe) {
+                curframe++;
+                setTimeout(window.onload, delay);
+            }
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Animating your charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Animating your charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div style="float: right">
+        <canvas id="myRose" width="300" height="300">[No canvas support]</canvas>
+    </div>
+
+    <p>
+        Animating your charts is a relatively easy affair, whilst not being supported natively as it would only serve to
+        over-complicate the RGraph libraries. The way to do it is to use
+        the function <i>RGraph.Clear(canvas)</i>, passing it your canvas object that is returned by
+        <i>document.getElementById()</i>. By default this will revert the canvas back to transparency. You can change this by
+        passing it the color you want it to use as the second (optional) argument. You could even use a gradient if
+        you wanted. Then you can simply redraw the entire chart.
+    </p>
+    
+    <p>
+        One thing you should note, is that you may have to specify the scale manually, to prevent it from changing
+        from frame to frame. This can be done by using the <i>chart.ymax</i> property.
+    </p>
+    
+    <p>
+        You can review the source of this page if you need further help. Two global variables are set - the number of frames
+        and the current frame number (which starts at one). The charts are then drawn with appropriate data
+        (ie the data multiplied by the frame number over the total number of frames). If the frame number is less than
+        the total number of frames, the frame number is incremented and the function (window.onload) is called again
+        after a small delay.
+    </p>
+    
+    <h4>Animation using jQuery</h4>
+
+
+    <div style="width: 600px; height: 250px; display: inline; display: inline-block; float: right">
+        <canvas id="myLine" width="600" height="250" style="position: relative">[No canvas support]</canvas>
+    </div>
+    <button style="width: 600px; float: right" id="butAnimate" onclick="Animate(); this.disabled = true; setTimeout(function () {document.getElementById('butAnimate').disabled = false;}, 2000);">Animate!</button>
+
+    <script>
+        animate = false;
+        ShowGraph();
+
+        /**
+        * This is the jQuery animation bit
+        */
+        function Animate()
+        {
+            $('#myLine').animate({
+                opacity: 0,
+                width: 0,
+                height: 0,
+                left: '+=300px',
+                top: '+=125px'
+            }, 1000, null, function () {animate = true; ShowGraph();});
+        }
+        
+        function ShowGraph()
+        {
+            // This clears the canvas            
+            document.getElementById("myLine").width = 600;
+            
+            if (document.getElementById("myLine").__object__ && document.getElementById("myLine").__object__.type == 'line') {
+                var bar = new RGraph.Bar('myLine', [4,2,3]);
+                bar.Set('chart.labels', ['Fred','Charles','Carl']);
+                bar.Set('chart.title', 'jQuery animation example');
+                bar.Set('chart.labels.above', true);
+                bar.Set('chart.labels.above.size', 16);
+                bar.Set('chart.units.post', 'pt');
+                bar.Draw();
+            
+            } else {    
+                line = new RGraph.Line('myLine', [4,5,3,4,6,8,4,9,5,2]);
+                line.Set('chart.hmargin', 5);
+                line.Set('chart.labels', ['Gavin','Hoolio','June','Kev','Lou','Jane','Rich','Tom','John','Pat']);
+                line.Set('chart.tickmarks', 'endcircle');
+                line.Set('chart.title', 'jQuery animation example');
+                line.Draw();
+            }
+
+            if (animate) {
+                $('#myLine').animate({
+                    opacity: 1,
+                    width: '600px',
+                    height: '250px',
+                    left: '-=300px',
+                    top: '-=125px'
+                }, 1000);
+                
+                animate = true;
+            }
+        }
+    </script>
+
+    <p>
+        You can if you prefer use an external library for animation, like jQuery.
+    </p>
+    
+    <p>
+        The chart to the right is animated using
+        jQuery. In the example the width is maintained by placing the canvas within a DIV which has the width/height CSS
+        attributes set.
+    </p>
+    
+    <p>
+        In this instance, the <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" target="_blank">
+        Google hosted jQuery</a> is used.
+    </p>
+    
+    
+    <br clear="all" />
+    
+    <h4>CSS animation versus &lt;canvas&gt; animation</h4>
+    
+    <p>
+        As you can see from the above examples, or if you build your own animations, CSS animation (which jQuery does) can be much smoother.
+        This is because CSS animation (ie changing the CSS attributes) does not have the side effect of clearing the canvas, and so
+        does not incur a redraw.
+    </p>
+    
+    <h4>An Animated Pie chart</h4>
+    
+    <p>
+        <a href="animation_segments.html"><b>This example</b></a> is of the Pie chart, with animated segment separation. Animated
+        segment separation is now (April 2011) available as an alternative tooltip highlight mode:
+        
+        <pre class="code">myObj.Set('chart.highlight.style', 'explode');</pre>
+    </p>
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/animation_segments.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/animation_segments.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/animation_segments.html	(revision 225)
@@ -0,0 +1,138 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Animated Pie chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs animated pie chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - An example of an animated Pie chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+
+    <!-- These are the Javascript includes that pull in the RGraph libraries (and ExCanvas) -->
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        An example of an animated &amp; interactive Pie chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - An example of an animated &amp; interactive Pie chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br />Because of the need for a global variable, this example does not work in Internet Explorer 8</div>');
+        }
+    </script>
+
+
+
+    <!-- This is the canvas that the Pie chart is drawn on -->
+    <canvas id="cvs" width="500" height="300" style="float: right">[No canvas support]</canvas>
+
+
+
+    <script>
+        pie = new RGraph.Pie('cvs', [24,43,51,16,26,23,35]);
+        pie.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+        pie.Set('chart.labels', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
+        pie.Set('chart.tooltips', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
+        //pie.Set('chart.tooltips.event', 'onmousemove');
+        pie.Set('chart.highlight.style', 'explode');
+        pie.Set('chart.labels.sticks', true);
+        pie.Set('chart.radius', 100);
+        pie.Draw();
+    </script>
+
+
+
+    <p>
+        This example shows animated segment separation. This used to be something that had to be done seperately, however now it's
+        built into the Pie chart as a tooltip effect. You can utilise the effect by using the <i>chart.highlight.style</i> setting
+        like this:
+    </p>
+    
+    <br clear="all" />
+
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var pie = new RGraph.Pie('cvs', [24,43,51,16,26,23,35]);
+        pie.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+        pie.Set('chart.labels', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
+        pie.Set('chart.tooltips', ['Richard','John','Kev','Lou','Pete','Fred','Bob']);
+        <span style="color: green">pie.Set('chart.highlight.style', 'explode');</span>
+        pie.Set('chart.labels.sticks', true);
+        pie.Set('chart.radius', 100);
+        pie.Draw();
+    }
+&lt;/script&gt;
+</pre>
+    
+    <p>
+        <a href="animation.html">&laquo; Back to animation page</a>
+    </p>
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/annotate_persist.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/annotate_persist.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/annotate_persist.html	(revision 225)
@@ -0,0 +1,314 @@
+<?php
+    /**
+    * Save the annotations to a tmp file
+    */
+    if (isset($_POST) && isset($_POST['data'])) {
+        file_put_contents('/tmp/annotation_data', $_POST['data']);
+        exit;
+    }
+
+
+    /**
+    * Load the annotations
+    */
+    if (!empty($_GET['getannotations']) && $_GET['getannotations'] == 12) {// An arbitrary number
+        echo file_get_contents('/tmp/annotation_data');
+        exit;
+    }
+    
+    ob_start('ob_gzhandler');
+?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Making annotations shareable cross browser</title>
+
+    <meta name="keywords" content="rgraph html5 canvas chart docs annotating shareable cross browser" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Making annotations shareable cross browser" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.common.annotate.js"></script>
+    <script src="../libraries/RGraph.common.context.js"></script>
+    <script src="../libraries/RGraph.line.js"></script>
+    
+    <script>
+        /**
+        * The function that loads the annotations from the server
+        */
+        function LoadAnnotations ()
+        {
+            var canvasPosition = RGraph.getCanvasXY(g.canvas);
+            var div = document.createElement('DIV');
+
+            div.style.backgroundColor = 'white';
+            div.style.padding = '3px';
+            div.style.position = 'absolute';
+            div.style.left = canvasPosition[0] + 5 + 'px';
+            div.style.top  = canvasPosition[1] + 5 + 'px';
+            div.style.color = 'gray';
+            div.style.opacity = 1;
+            div.style.border = '2px solid black';
+            div.style.zIndex = 99;
+            div.innerHTML  = 'Loading annotations...';
+            document.body.appendChild(div);
+            
+            div2 = document.createElement('DIV');
+            div2.style.backgroundColor = 'gray';
+            div2.style.opacity = 0.5;
+            div2.style.position = 'absolute';
+            div2.style.left = canvasPosition[0] + 'px';
+            div2.style.top  = canvasPosition[1] + 'px';
+            div2.style.width = g.canvas.width + 'px';
+            div2.style.height = g.canvas.height + 'px';
+            //div2.style.zIndex = 98;
+            document.body.appendChild(div2);
+
+            window.localStorage['__rgraph_annotations_cvs__'] = '';
+            AjaxGet('annotate_persist.html?getannotations=12',
+
+function ()
+{
+    if (this.readyState == 4 && this.status == 200) {
+        window.localStorage['__rgraph_annotations_cvs__'] = this.responseText;
+        
+        RGraph.ReplayAnnotations(g);
+        
+        setTimeout(function () {div.style.opacity = 0.8; div2.style.opacity = 0.4;}, 50);
+        setTimeout(function () {div.style.opacity = 0.6;div2.style.opacity = 0.3;}, 100);
+        setTimeout(function () {div.style.opacity = 0.4;div2.style.opacity = 0.2;}, 150);
+        setTimeout(function () {div.style.opacity = 0.2;div2.style.opacity = 0.1;}, 200);
+        setTimeout(function () {div.style.opacity = 0;div2.style.opacity = 0;}, 250);
+        setTimeout(function () {div.style.display = 'none';div2.style.display = 'none';}, 300);
+    }
+}
+            );
+        }
+
+
+
+        /**
+        * The function that saves annotations to the server
+        */
+        function SaveAnnotations ()
+        {
+
+            var canvasPosition = RGraph.getCanvasXY(g.canvas);
+            var div = document.createElement('DIV');
+
+            div.style.backgroundColor = 'white';
+            div.style.padding = '3px';
+            div.style.position = 'absolute';
+            div.style.left = canvasPosition[0] + 5 + 'px';
+            div.style.top  = canvasPosition[1] + 5 + 'px';
+            div.style.color = 'gray';
+            div.style.opacity = 1;
+            div.style.border = '2px solid black';
+            div.style.zIndex = 99;
+            div.innerHTML  = 'Saving annotations...';
+            document.body.appendChild(div);
+
+            AjaxPost('annotate_persist.html', 'data=' + window.localStorage['__rgraph_annotations_cvs__']);
+            
+            setTimeout(function () {div.style.opacity = 0.8}, 50);
+            setTimeout(function () {div.style.opacity = 0.6}, 100);
+            setTimeout(function () {div.style.opacity = 0.4}, 150);
+            setTimeout(function () {div.style.opacity = 0.2}, 200);
+            setTimeout(function () {div.style.opacity = 0; div.style.display = 'none';}, 250);
+        }
+
+
+
+        /**
+        * Makes an AJAX POST.
+        */
+        function AjaxPost (url, data)
+        {
+            // Mozilla, Safari, ...
+            if (window.XMLHttpRequest) {
+                var httpRequest = new XMLHttpRequest();
+            
+            // MSIE
+            } else if (window.ActiveXObject) {
+                var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
+            }
+            
+            //httpRequest.onreadystatechange = callback;
+            
+            httpRequest.open('POST', url, true);
+            httpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
+            httpRequest.send(data);
+        }
+
+        /**
+        * Makes an AJAX call. It calls the given callback (a function) when ready
+        * 
+        * @param string   url      The URL to retrieve
+        * @param function callback A function object that is called when the response is ready, there's an example below
+        *                          called "myCallback".
+        */
+        function AjaxGet (url, callback)
+        {
+            // Mozilla, Safari, ...
+            if (window.XMLHttpRequest) {
+                var httpRequest = new XMLHttpRequest();
+            
+            // MSIE
+            } else if (window.ActiveXObject) {
+                var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
+            }
+            
+            httpRequest.onreadystatechange = callback;
+            
+            httpRequest.open('GET', url, true);
+            httpRequest.send();
+        }
+
+
+
+        window.onload = function (e)
+        {
+            /**
+            * This clears the locally stored annotations so that they can be loaded from server
+            */            
+            window.localStorage['__rgraph_annotations_cvs__'] = '';
+
+            g = new RGraph.Line('cvs', [5,6,3,4,8,6,7,5,9]);
+            g.Set('chart.tickmarks', 'endcircle');
+            g.Set('chart.hmargin', 5);
+            g.Set('chart.annotatable', true);
+            g.Set('chart.labels', ['Ben','Olga','Jeff','Indigo','Kev','Pete','Lou','Fred','John']);
+            g.Set('chart.contextmenu', [['Show palette', RGraph.Showpalette], ['Clear', function () {RGraph.Clear(g.canvas);g.Draw();}]]);
+            g.Set('chart.shadow', true);
+            g.Set('chart.linewidth', 1.01);
+            g.Set('chart.ylabels.count', 10);
+            g.Draw();
+            
+            LoadAnnotations();
+            
+            RGraph.AddCustomEventListener(g, 'onannotateend', function (obj) {SaveAnnotations();});
+            RGraph.AddCustomEventListener(g, 'onannotateclear', function (obj) {SaveAnnotations();});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Making annotations shareable cross browser
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Making annotations shareable cross browser</h1>
+
+    <div style="text-align: center">
+        <div class="warning" style="display: inline-block">
+            This example does not work offline - you must use a website. Annotations are removed every five minutes.
+        </div>
+    </div>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <canvas id="cvs" width="600" height="250" style="float: right">[No canvas support]</canvas>
+
+    <p>
+        Combining a little AJAX and some very simple server side scripting, you can easily make an annotation system that can persist
+        across different browsers and computers. You an either use Load/Save buttons to trigger the loading and saving, or like the
+        example to the right you can make use of the custom RGraph onannotateend event to make it happen automatically.
+    </p>
+    
+    <p>
+        This simple example uses a small PHP server side script that loads and saves the annotation data to a file on the server, 
+        and that looks like this:
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;?php
+    $file = '/tmp/annotation_data';
+
+    /**
+    * Save the annotations to a tmp file
+    */
+    if (isset($_POST) && isset($_POST['data'])) {
+        file_put_contents($file, $_POST['data']);
+        exit;
+    }
+
+
+    /**
+    * Load the annotations
+    */
+    if (!empty($_GET['getannotations']) && $_GET['getannotations'] == 1) {
+        $contents = file_get_contents($file);
+        print($contents);
+        exit;
+    }
+?&gt;
+</pre>
+
+    <p>
+        By making the Javascript Save/Load functions repeat themselves every few seconds, you could easily make a presentation/demo system
+        that can be used when paticipants are in differing locations - in a similar fashion to Google Docs - or when you want one persons
+        annotations to be viewable by multiple PCs. On this page  though, the Save function is triggered by the custom RGraph event
+        <i>onannotateend</i>.
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/annotating.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/annotating.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/annotating.html	(revision 225)
@@ -0,0 +1,208 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Annotating your charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs annotating" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about annotating your charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            bar = new RGraph.Bar('myBar', [[45,64],[32,51],[41,52],[54,43],[43,50]]);
+            bar.Set('chart.title', 'An annotatable chart with context menu');
+            bar.Set('chart.labels', ['John','Fred', 'Barry', 'Charlie', 'Joan']);
+            bar.Set('chart.colors', ['red', 'blue']);
+            bar.Set('chart.background.barcolor1', '#fff');
+            bar.Set('chart.background.barcolor2', '#fff');
+            bar.Set('chart.annotatable', true);
+            bar.Set('chart.contextmenu', [['Show palette', RGraph.Showpalette], ['Clear', function () {RGraph.Clear(bar.canvas); bar.Draw();}]]);
+            bar.Draw();
+            
+            RGraph.AddCustomEventListener(bar, 'onannotatestart', function (obj) {cl('Started annotating: ' + obj.id);});
+            RGraph.AddCustomEventListener(bar, 'onannotate', function (obj) {cl('Annotating: ' + obj.id);});
+            RGraph.AddCustomEventListener(bar, 'onannotateend', function (obj) {cl('Finished annotating: ' + obj.id);});
+            RGraph.AddCustomEventListener(bar, 'onannotatecolor', function (obj) {cl('Changed annotate color: ' + obj.Get('chart.annotate.color'));});
+            RGraph.AddCustomEventListener(bar, 'onannotateclear', function (obj) {cl('Fired the annotation clear event');});
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Annotating your charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Annotating your charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div style="float: right">
+        <canvas id="myBar" width="400" height="200">[No canvas support]</canvas><br />
+    </div>
+
+    <p>
+        The annotations feature brings presentation style functionality to RGraph charts. You can use this feature
+        for highlighting your charts if you need to.
+    </p>
+    
+    <ul>
+        <li><a href="#how">How do annotations work?</a></li>
+        <li><a href="#browser">Browser support</a></li>
+        <li><a href="#what">What can I use annotations for?</a></li>
+        <li><a href="#persistent">Are annotations persistent?</a></li>
+        <li><a href="#palette">How do I show the mini-palette?</a></li>
+        <li><a href="#clear">How can I clear the annotations?</a></li>
+        <li><a href="#replay">Replaying annotations when they're off</a></li>
+        <li><a href="#persist">Making your annotations persist</a></li>
+    </ul>
+
+    <a name="how"></a>
+    <h4>How do annotations work?</h4>
+    
+    <p>
+        Enabling annotations is a very simple affair, and consists of doing the following:
+    </p>
+    
+    <pre class="code" style="width: 55%">myGraph.Set('chart.annotatable', true);</pre>
+
+    <a name="browser"></a>
+    <h4>Browser support</h4>
+
+    <p>
+        Annotations are supported in all browsers that RGraph works with - Firefox 3.5+, Chrome 2+, Safari 4+, Opera 10.5+ and
+        MSIE/Google Chrome Frame. They DO NOT however work with MSIE 8/ExCanvas.
+    </p>
+
+    <a name="what"></a>
+    <h4>What can I use annotations for?</h4>
+    
+    <p>
+        As mentioned you can use it for presentations, highlighting things to yourself or others or just to have fun drawing (!).
+    </p>
+    
+    <a name="persistent"></a>
+    <h4>Are annotations persistent?</h4>
+    
+    <p>
+        That depends on which browser you're using. The annotation data is stored in the users web browser (not on the web server),
+        meaning currently (21st March 2010) browser support is limited to Firefox 3.5+, Safari 4+,
+        Chrome 4+ and Opera 10.5+. MSIE 8 also has the required storage capabilities, but since it doesn't yet support canvas, the point is moot.
+        The user does not have to
+        confirm anything for storage to be allowed - try it out on this page by drawing on the chart and then refreshing the page.
+    </p>
+    
+    <a name="palette"></a>
+    <h4>How do I show the mini-palette?</h4>
+
+
+    <p>
+        You can show the palette by using the <i>RGraph.Showpalette</i> function shown below as a context menu item:
+    </p>
+    
+    <pre class="code">
+myObj.Set('chart.contextmenu', [
+                                ['Show palette', RGraph.Showpalette],
+                                ['Clear', function () {RGraph.Clear(myObj.canvas); myObj.Draw();}]
+                               ]);
+</pre>
+
+    <p>
+        This code will result in the same context menu as the chart above.
+    </p>
+
+    <a name="clear"></a>
+    <h4>How can I clear the annotations?</h4>
+
+    You can simply clear the chart and redraw it:
+    
+    <pre class="code">RGraph.Clear(myGraph.canvas); // Clear the chart
+myGraph.Draw();               // Redraw it</pre>
+
+    <p>
+        In the chart above, there is a context menu that allows you to both clear the chart and also demonstrates the mini-palette
+        feature available to you.
+    </p>
+
+    <a name="replay"></a>
+    <h4>Replaying annotations when they're off</h4>    
+        <p>
+            When annotations are not enabled, any prior annotations that may have been made are not displayed. To show them you need
+            to use the API function <i>RGraph.ReplayAnnotations(object)</i> after the call to .Draw().
+        </p>
+    
+    <a name="persist"></a>
+    <h4>Making your annotations persist  across browsers/computers</h4>
+        <p>
+            With a little bit of custom Javascript and some server side scripting you can make your annotations persist across
+            different browsers/computers. You can find an example of this <a href="annotate_persist.html"><b>here</b></a>.
+        </p>
+
+</html>
Index: Dev/branches/Demo/RGraph/docs/api.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/api.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/api.html	(revision 225)
@@ -0,0 +1,804 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - API documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs api" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the RGraph API" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        API Documentation
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - API documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <br />
+
+    <ul>
+        <li><a href="#overview">Overview</a></li>
+        <li><a href="#references">Canvas and context references</a></li>
+        <li><a href="#events">Working with events</a></li>
+        <li><a href="#coords">Working with chart coordinates</a></li>
+        <li><a href="#data">Working with chart data</a></li>
+        <li><a href="#updating">Updating your charts dynamically</a></li>
+        <li><a href="#accessors">Setting properties</a></li>
+        <li><a href="#references.other">References available on RGraph objects</a></li>
+        <li><a href="#scale">Scale information</a></li>
+        <li><a href="#text">Adding text to your charts</a></li>
+        <li>
+            <a href="#functions">RGraph functions</a>
+            <ul>
+                <li><a href="#functions.arrays">Arrays</a></li>
+                <li><a href="#functions.strings">Strings</a></li>
+                <li><a href="#functions.numbers">Numbers</a></li>
+                <li><a href="#functions.misc">Miscellaneous</a></li>
+                <li><a href="#functions.events">Custom RGraph event related functions</a></li>
+                <li><a href="#functions.other">Other</a></li>
+            </ul>
+        </li>
+        <li><a href="#skeleton">The skeleton file</a></li>
+        <li><a href="#questions">Questions</a></li>
+    </ul>
+
+    <a name="overview"></a>
+    <h4>Overview</h4>
+    
+    <p>
+        Working with RGraph objects is purposefully easy, to make them straight forward to integrate into your own scripts if you want to. For any
+        particular chart type there are a few files required - the common libraries and the chart specific library. Eg:
+    </p>
+    
+    <pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.bar.js"&gt;&lt;/script&gt;
+</pre>
+
+    <p>
+        <i>RGraph.common.core.js</i> is a function library that contains a large set of functions that support the chart classes.
+        Some functions, and sets of functions, have their own files. For example, the zoom functions reside in <i>RGraph.common.zoom.js</i>,
+        so if you don't need zoom, you don't need this file.
+        Each of the chart libraries (<i>RGraph.*.js</i>) contains that particular charts class. If you'd like to see a "bare bones"
+        implementation, you can look at the <a href="../examples/basic.html">basic example</a>. There's also a
+        <a href="#skeleton">skeleton example</a> to make it easier to create new chart types.
+    </p>
+
+    <a name="references"></a>
+    <h4>Canvas and context references</h4>
+
+    <p>
+        Each chart object maintains references to the <i>context</i> and <i>canvas</i> as properties. So to get hold of them all you
+        need to do is this:
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        // 1/2 First draw the chart
+        var myBar = new RGraph.Bar('myCanvas', [1,5,8,4,6,3,1,5,7,8,4,6]);
+        myBar.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        myBar.Draw();
+    
+        // 2/2 Now get hold of the references
+        var context = myBar.context; // Get hold of a reference to the context
+        var canvas  = myBar.canvas;  // Get hold of a reference to the canvas
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="events"></a>
+    <h4>Working with events</h4>
+
+    <p>
+        When working with events, you may come across the situation where you have a reference to the <i>canvas</i>, but
+        also need to access the chart object. For this reason the constructor of each object adds a reference to the object to the
+        canvas and you can access it like this:
+    </p>
+
+    <pre class="code">
+&lt;script&gt;
+    document.getElementById("myCanvas").onclick = function (e)
+    {
+        var src = (RGraph.isIE8() ? event.srcElement) : e.target;
+    
+        // The RGraph object constructors add __object__ to the canvas.
+        var myBar = src.__object__;
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="coords"></a>
+    <h4>Working with chart coordinates</h4>
+
+    <p>
+        For most chart types, the coordinates of elements (eg bars, lines etc) are to be found in the class variable <i>obj.coords</i>.
+        This is usually a multi-dimensional array consisting of the coordinates of those shapes, or of points. As an example the bar
+        chart maintains the X, Y, width and height of each bar (or sections of bars in a stacked bar chart). The coords array is
+        usually a flat array, even when you have multiple sets of data.
+    </p>
+    
+    <p>
+        By using the RGraph.getMouseXY() function and this array you can determine if a bar was clicked on, or if the mouse is near a
+        line point etc.
+    </p>
+    
+    <pre class="code">
+var myCoords = myBar.coords;
+</pre>
+
+    <p>
+        <b>Note:</b> Previously the coords array values sometimes included the margin values, and sometimes didn't. As of 17th
+        April 2010 the values have all been unified to not include the margin values, so the values are as reported.
+    </p>
+    
+    <p>
+        <b>Note:</b>
+        The Line chart also has an object variable <i>myObj.coords2</i>, where the coordinates are indexed differently -
+        by line index.
+    </p>
+
+    <a name="data"></a>
+    <h4>Working with chart data</h4>
+
+    <p>
+        Another variable you may need is the <i>data</i> variable. For most chart types, this is where the data is stored. It is usually
+        untouched, so it is as you supplied to the chart objects constructor. A notable exception to this is filled line charts.
+        Here the original data is stored in the class variable <i>original_data</i>. The data supplied is modified to produce the stacking
+        effect. If you need to modify a filled line charts data you will need to change this variable instead.
+    </p>
+    
+    <p>
+        Not all chart types use the <i>data</i> variable. For some the name is different so that it makes a little more sense. The
+        chart types and their associate data variables are listed below<sup>1</sup>.
+    </p>
+
+    <style>
+        table#data_properties td,
+        th {
+            text-align: center;
+        }
+    </style>
+
+    <table border="0" align="center" id="data_properties">
+        <tr>
+            <th>Chart type</th>
+            <th>Data variable(s)</th>
+        </tr>
+        
+        <tr>
+            <td>Bar</td>
+            <td>obj.data</td>
+        </tr>
+        
+        <tr>
+            <td>Bi-polar</td>
+            <td>obj.left, obj.right</td>
+        </tr>
+        
+        <tr>
+            <td>Donut</td>
+            <td>This is now a variant of the Pie chart</td>
+        </tr>
+        
+        <tr>
+            <td>Funnel</td>
+            <td>obj.data</td>
+        </tr>
+        
+        <tr>
+            <td>Gantt</td>
+            <td>See the <a href="gantt.html#events">docs</a></td>
+        </tr>
+        
+        <tr>
+            <td>Horizontal Bar</td>
+            <td>obj.data</td>
+        </tr>
+        
+        <tr>
+            <td>Horizontal Progress bar</td>
+            <td>obj.max, obj.value</td>
+        </tr>
+        
+        <tr>
+            <td>LED</td>
+            <td>obj.text</td>
+        </tr>
+        
+        <tr>
+            <td>Line</td>
+            <td>obj.original_data<sup>3</sup></td>
+        </tr>
+
+        <tr>
+            <td>Meter</td>
+            <td>obj.min, obj.max, obj.value</td>
+        </tr>
+        
+        <tr>
+            <td>Odometer</td>
+            <td>obj.start, obj.end, obj.value</td>
+        </tr>
+        
+        <tr>
+            <td>Pie</td>
+            <td>obj.angles, obj.data</td>
+        </tr>
+        
+        <tr>
+            <td>Radial Scatter chart</td>
+            <td>obj.data</td>
+        </tr>
+        
+        <tr>
+            <td>Rose</td>
+            <td>obj.max, obj.data</td>
+        </tr>
+        
+        <tr>
+            <td>Scatter</td>
+            <td>obj.max, obj.data<sup>2</sup></td>
+        </tr>
+        
+        <tr>
+            <td>Scatter</td>
+            <td>obj.min, obj.max, obj.value</td>
+        </tr>
+        
+        <tr>
+            <td>Thermometer</td>
+            <td>obj.min, obj.max, obj.value</td>
+        </tr>
+        
+        <tr>
+            <td>Traditional Radar</td>
+            <td>obj.data, obj.max</td>
+        </tr>
+        
+        <tr>
+            <td>Vertical Progress bar</td>
+            <td>obj.max, obj.value</td>
+        </tr>
+        
+        <tr>
+            <td>Waterfall chart</td>
+            <td>obj.max, obj.data</td>
+        </tr>
+    </table>
+    
+    <ol>
+        <li style="margin-top: 0">In the table, <i>obj</i> refers to your chart object.</li>
+        <li style="margin-top: 0">For the Scatter chart, each data point is an array of X/Y coordinates, the color and the tooltip for that point.</li>
+        <li  style="margin-top: 0">
+            The Line chart <i>obj.original_data</i> is an aggregation of all the datasets given to the Line chart, so the first
+            dataset is held in <i>obj.original_data[0]</i>, the second in <i>obj.original_data[1]</i> etc.
+        </li>
+    </ol>
+    
+    <a name="updating"></a>
+    <h4>Updating your charts dynamically</h4>
+
+        <p style="background-color: #ffa; padding: 3px; border: 1px dashed black">
+            <b>Note:</b>
+            It is important that you're careful with types when making AJAX requests. Since the response is initially a string,
+            and your AJAX function/library may not do conversions for you, you may need to convert these strings to numbers. To
+            do this you can use the <i>Number()</i> or <i>parseInt()</i> functions. For example:
+        </p>
+
+        <pre class="code">
+&lt;script&gt;
+    num = Number('23');
+    num = parseInt('43');
+&lt;/script&gt;
+</pre>
+
+        <p>
+            A common request is to be able to update charts dynamically. This is quite simple and consists of three steps:
+        </p>
+        
+        <ol>
+            <li style="margin-top: 0">Get the new data from the server (with an AJAX request for example).</li>
+            <li style="margin-top: 0">Set the data in your chart object. See the above table for the appropriate property to use.</li>
+            <li style="margin-top: 0">Call the .Draw() method again.</li>
+        </ol>
+        
+        <p>
+            If you don't need to get data from your server (ie it's all client-side) then you can omit the first step. Also, it may be
+            sufficient to simply recreate the entire object from scratch. This means that you won't have to alter and
+            RGraph internal properties - just recreate the chart object and configuration. There's a simple function
+            you can use for AJAX purposes <a href="index.html#ajax">here</a>.
+        </p>
+
+
+    <a name="accessors"></a>
+    <h4>Setting properties</h4>
+    
+        <p>
+            To set RGraph properties, ideally you should use each objects setter  (there's also a corresponding getter). These functions
+            accomodate some backwards compatibility changes, so by not using them you run the risk of your charts not working entirely as
+            expected.
+        </p>
+    
+    <pre class="code">
+myObj.Set('chart.gutter.left', 25);
+myObj.Get('chart.gutter.left');
+</pre>
+
+    <a name="references.other"></a>
+    <p>&nbsp;</p>
+    <h4>References available on RGraph objects</h4>
+        <p>
+            RGraph stores various references to objects on the canvas (typically) to make getting hold of them easier. There's also a
+            Registry object in
+            which references are stored. Typically the objects are named with the format <i>__xxx__</i>, and you can inspect the
+            objects by using a console(eg the inspector that's part of Google Chrome - <i>CTRL+SHIFT+J</i>). Some examples are:
+        </p>
+        
+        <ul>
+            <li>__object__ on the canvas - a reference to the chart object</li>
+            <li>
+                RGraph.Registry.Get('chart.tooltip') - a reference to the currently visible tooltip. This in turn has the following
+                available:
+                    <ul>
+                        <li>__text__ - Since setting .innerHTML can cause changes in HTML, this is the original tooltip text.</li>
+                        <li>__index__ - This is the numerical index corresponding to the tooltips array that you set.</li>
+                        <li>__dataset__ - Used in the Scatter chart and corresponding to the dataset.</li>
+                        <li>__canvas__ - A reference to the original canvas that triggered the tooltip.</li>
+                    </ul>
+            </li>
+            <li>
+                RGraph.Registry.Get('chart.mousedown') - Used in annotating, and stipulates whether the mouse button is currently
+                pressed.
+            </li>
+            <li>
+                RGraph.Registry.Get('chart.contextmenu') - The currently shown context menu, if any. This in turn has the following
+                properties:
+                <ul>
+                    <li>__canvas__ - The original canvas object.</li>
+                </ul>
+            </li>
+        </ul>
+        
+        These are just a sample of what's available, to find more you should use an introspection tool, look at the source, or ask
+        on the <a href="http://support.rgraph.net" target="_blank">support group</a>.
+        
+        
+
+    <a name="scale"></a>
+    <h4>Scale information</h4>
+        <p>
+            For the Bar, Bipolar, HBar, Line and Scatter charts the scale that is used is stored in the <i>scale</i> class variable. Eg:
+        </p>
+        
+        <pre class="code">
+&lt;script&gt;
+    var myBar = new RGraph.Bar('cvs', [56,43,52,54,51,38,46,42,52]);
+    myBar.Draw();
+    
+    var myScale = myBar.scale
+&lt;/script&gt;
+</pre>
+
+    <a name="text"></a>
+    <h4>Adding text to your charts</h4>
+        <p>
+            If you want to add arbitrary text to your chart(s) you can use the API function <a href="#functions.other">RGraph.Text().</a>
+        </p>
+        
+        <pre class="code">
+&lt;script&gt;
+    // Draw a basic chart
+    var myObj = new RGraph.Bar('myCanvas', [4,5,5,8,7,6,4,8,5,9]);
+    myObj.Draw();
+    
+    // Draw some text
+    myObj.context.beginPath();
+        size = 12;
+        font = 'Verdana';
+        text = 'Some text!;
+        x    = 10;
+        y    = 10;
+
+        RGraph.Text(myObj.context, font, size, x, y, text);
+    myObj.context.fill();
+&lt;/script&gt;
+</pre>
+    
+    <a name="functions"></a>
+    <h4>RGraph functions</h4>
+
+        <p>
+            This is a list of some of the functions available to you in the RGraph common libraries.
+            It's not every single one that's available, but is a list of the common ones that you're likely to want to use. Arguments
+            in square brackets are optional.
+        </p>
+
+    <pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+
+&lt;script&gt;
+    // Returns 9
+    myArray = [3,2,5,4,9,7,8];
+    max = RGraph.array_max(myArray);
+&lt;/script&gt;
+</pre>
+
+    <a name="functions.arrays"></a>
+    <h4>Arrays</h4>
+
+    <ul>
+        <li><b>(number) RGraph.array_max(array)</b><br />Returns the maximum value in the array.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(number) RGraph.array_sum(array)</b><br />Returns the sum of all values in the array. You can also pass a single integer, in which case it is simply returned as-is.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(array) RGraph.array_clone(array)</b><br />Creates a copy/clone of the given array. Only numerically indexed arrays are supported.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(array) RGraph.array_reverse(array)</b><br />Returns a reversal of the given array.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(boolean) RGraph.is_array(obj)</b><br />Returns true or false as to whether the given object is an array or not.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(array) RGraph.array_pad(array, length[, value])</b><br />Pads the given array to the specified length (if the length is less, if not the array is returned as is). The third, optional, argument is the value which is used as the pad value. If not specified, <i>null</i> is used.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(array) RGraph.array_shift(array)</b><br />Shifts an element off of the start of the given array and returns the new array.<br /><i>File: RGraph.common.core.js</i><p /></li>
+    </ul>
+    
+    <a name="functions.strings"></a>
+    <h4>Strings</h4>
+    
+    <ul>
+        <li><b>(string) RGraph.rtrim(string)</b><br />Strips the right hand white space from the string that you pass it.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li>
+            <b>(string) RGraph.number_format(obj, number[, prepend[, append]])</b><br />
+            This formats the given number (which can be either an integer or a float. The prepend and append variables are
+            strings which are added to the string (eg 5%).<br /><br />
+            <b>Note:</b>As of 5th September 2010 this functions argument list has been changed to include the chart object, as shown above.<br /><br />
+            <i>File: RGraph.common.core.js</i><p />
+        </li>
+    </ul>
+    
+    <a name="functions.numbers"></a>
+    <h4>Numbers</h4>
+    
+    <ul>
+        <li><b>(number) RGraph.random(min, max)</b><br />Returns a random number between the minimum and maximum that you give.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(string) RGraph.number_format(number[, prepend[, append]])</b><br />See <a href="#functions.strings">above</a>.<br /><i>File: RGraph.common.core.js</i></li>
+    </ul>
+    
+    <a name="functions.misc"></a>
+    <h4>Miscellaneous</h4>
+
+    <ul>
+        <li>
+            <b>(object) RGraph.FixEventObject(event)</b><br />Pass this function an event object and it will attempt to "fill in" the missing properties (depending on the browser).
+            It tries to add:<br /><br />
+            
+            <ul>
+                <li>pageX (MSIE)</li>
+                <li>pageY (MSIE)</li>
+                <li>target (MSIE)</li>
+                <li>stopPropagation() (MSIE)</li>
+                <li>offsetX (FF)</li>
+                <li>offsetY (FF)</li>
+            </ul>
+            <br /><i>File: RGraph.common.core.js</i>
+            <p />
+        </li>
+        <li><b>(null) RGraph.OldBrowserCompat(context)</b><br />This function "fills in" any required functions that some browsers don't have. At the moment this consists of adding the measureText() and fillText() functions to the context when they're missing (usually this means older versions of Opera).<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(number) RGraph.GetDays(date)</b><br />This returns the number of days in the given month. The argument should be a Date object.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(null) RGraph.pr(mixed)</b><br />Emulates the PHP function print_r() by recursively printing the structure of whatever you pass to it. It handles numbers, strings, arrays, booleans, functions and objects.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(null) p(mixed)</b><br />An alias of the above albeit far shorter to type.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(null) cl(mixed)</b><br />A shortcut for the Firebug and Google Chrome debug function console.log().<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(null) RGraph.Clear(canvas[, color])</b><br />Clears the canvas by drawing a white (or the optional color you give) rectangle over it. As of 23rd January 2011 you can now specify <i>transparent</i> as the color and the canvas will be reset back to transparency instead of to white. This may become the default at a later date.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li>
+            <b>(null) RGraph.ClearAnnotations(id)</b><br />This function clears the annotation data associated with the given canvas ID (but DOES NOT redraw the chart). If you want to clear the visible annotations too, you will need to redraw the canvas. You could do this using the following code:
+            <br />
+            <pre class="code">
+function ClearAndRedraw (obj)
+{
+    RGraph.Clear(obj.canvas); // This function also calls the RGraph.ClearAnnotations() function
+    obj.Draw();
+}</pre>
+        <br /><i>File: RGraph.common.annotatate.js</i><p />
+        </li>
+        <li><b>(null) RGraph.ReplayAnnotations(object)</b><br />This function redraws any annotations which have previously been drawn on the canvas. You would use this function when annotations are turned off and you want previous annotations to be displayed.<br /><i>File: RGraph.common.annotate.js</i><p /></li>
+        <li><b>(array) RGraph.getMouseXY(event)</b><br />When passed your event object, it returns the X and Y coordinates (in relation to the canvas) of the mouse pointer. (0,0) is in the top left corner, with the X value increasing going right and the Y value increasing going down.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(array) RGraph.getCanvasXY(canvas)</b><br />Similar to the above function but returns the X/Y coordinates of the canvas in relation to the page.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(number) RGraph.degrees2Radians(number)</b><br />Converts and returns the given number of degrees to radians. 1 radian = 57.3 degrees.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(array) RGraph.getScale(max, obj)</b><br />Given the maximum value this will return an appropriate scale. The second argument is the graph object.<br /><i>File: RGraph.common.core.js</i><p /></li>
+        <li><b>(mixed) RGraph.Registry.Get(name)</b><br />In conjunction with the next function, this is an implementation of the Registry pattern which can be used for storing settings.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(mixed) RGraph.Registry.Set(name, value)</b><br />In conjunction with the previous function, this is an implementation of the Registry pattern which can be used for storing settings.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.Register(object)</b><br />This function is used in conjunction with the next to register a canvas for redrawing. Canvases are redrawn (for example) when tooltips or crosshairs are being used.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        
+        <li>
+            <b>(null) RGraph.Redraw([id, [color]])</b><br />This function is used in conjunction with the previous to redraw a canvas. Canvases are redrawn (for example) when tooltips or crosshairs are being used.<br /><br /> <b>Note:</b> All canvases that are registered are redrawn. However the optional first argument can be an ID (a string) of the canvas that is NOT to be redrawn. The optional second argument is the color to use when clearing canvases.<br /><i>File: RGraph.common.core.js</i><br /><br />
+        </li>
+
+        <li><b>(null) RGraph.SetShadow(object, color, offetX, offsetY, blur)</b><br />This function is a shortcut function used to set the four shadow properties. The arguments are: your chart object, the shadow color, the X offset, the Y offset, the shadow blur.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.NoShadow(object)</b><br />This function is a shortcut function used to "turn off" the shadow. The argument is your chart object.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li>
+            <b>(number) RGraph.Async(mixed[, delay])</b><br />This is a simple function but has significant implications on your pages performance. You
+            can pass this either a function pointer, or a string containing the code to run and it will run the code asynchronously (ie in
+            parallel to the page loading). In doing so it can mean that your page is displayed faster, as the chart is created
+            seperate to the page loading. As such, the placement of your canvas tag becomes more important. What you can do is
+            define the canvas tag and then the code to produce the chart immediately after it. This is how the front page is coded,
+            (but not using the RGraph.Async() function).
+            There's an example of it <a href="async.html">here</a>. The optional delay argument is measured in milliseconds
+            (1 second = 1000 milliseconds) and defaults to 1. What you can do is specify something like 1000 to make the effect
+            more pronounced to ensure it's working as expected.
+            
+            <p>
+                <b>Note:</b> Since a dev release of version 4,  Google Chrome versions 4 and 5 have an issue with rendering text when using
+                the RGraph.Async() function. The solution here is to simply not use the RGraph.Async() function.
+            </p>
+            <i>File: RGraph.common.core.js</i><br /><br />
+        </li>
+
+        <li>
+            <b>(null) RGraph.filledCurvyRect(context, x, y, width, height[, radius[, curvy top left[, curvy top right[, curvy bottom right[, curvy bottom left]]]]])</b><br />
+            This draws a rectangle with curvy corners. Similar to the built in rectangle functions, and you can control
+            individual corners. The radius controls the severity of the corner curvature and defaults to 3. By default all
+            the corners are curvy.<br /><i>File: RGraph.common.core.js</i><br /><br />
+        </li>
+
+        <li>
+            <b>(null) RGraph.strokedCurvyRect(context, x, y, width, height[, radius[, curvy top left[, curvy top right[, curvy bottom right[, curvy bottom left]]]]])</b><br />
+            This draws a rectangle with curvy corners. Similar to the built in rectangle functions, and you can control
+            individual corners. The radius controls the severity of the corner curvature and defaults to 3. By default all
+            the corners are curvy.<br /><i>File: RGraph.common.core.js</i><br /><br />
+        </li>
+
+        <li>
+            <b>(null) RGraph.Reset(canvas)</b><br />
+            This function resets the canvas. At first this function may appear similar to the RGraph.Clear() function, however this
+            function will reset any translate() that has been performed, and so can stop them accumulating.
+            <br /><i>File: RGraph.common.core.js</i><br /><br />
+        </li>
+    </ul>
+
+    <a name="functions.events"></a>
+    <h4>Custom RGraph event related functions</h4>
+    
+    <ul>
+        <li><b>(null) RGraph.FireCustomEvent(object, event)</b><br />This fires a custom event. The object is your chart object, and the name is a string specifying the name of the event.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(number) RGraph.AddCustomEventListener(object, event, callback)</b><br />This attaches a function to the specified event. The object argument is your chart object, the event argument should be the name of the event, eg <i>ontooltip</i>, and the function argument is your function which handles the event. The return value is an ID which can be used with the <i>RGraph.RemoveCustomEventListener()</i> function.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.RemoveCustomEventListener(object, id)</b><br />This removes the custom event listener that corresponds to the given ID. The arguments are the chart object  and the ID of the event handler to remove (as returned by <i>RGraph.AddCustomEventListener()</i>).<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.RemoveAllCustomEventListeners([id])</b><br />To easily remove all custom event listeners you can use this function. It also can optionally take one argument - a canvas ID - to limit the clearing to.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+    </ul>
+
+    <a name="functions.other"></a>
+    <h4>Other</h4>
+    
+    <p>
+        These are functions which are less generic, and used to build the charts. You may still wish to use them however.
+    </p>
+
+    <ul>
+        <li><b>(null) RGraph.lineByAngle(context, x, y, angle, length)</b><br />This function draws a line from the given X and Y coordinates at the specified angle.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        
+        <li>
+            <b>(null) RGraph.Text(context, font, size, x, y, text[, valign[, halign[, border[, angle[, background[, bold[, indicator]]]]]]])</b><br />
+            This function acts as a wrapper around the canvas text functionality. The arguments are:
+        
+            <ul>
+                <li>The context is the canvases 2D context.</li>
+                <li>The font is the name of the font you want to use (eg Arial).</li>
+                <li>The size is an integer specifying the size of the text, (measured in points).</li>
+                <li>The x and y arguments are the X/Y coordinates at which to draw the text.</li>
+                <li>The text argument is the text to draw.</li>
+                <li>The optional valign argument is the vertical alignment and can be either <i>top</i>, <i>center</i> or <i>bottom</i>.</li>
+                <li>The optional halign argument is the horizontal alignment and can be <i>left</i>, <i>center</i> or <i>right</i>.</li>
+                <li>The optional border argument is a boolean (<i>true</i> or <i>false</i>) controlling whether the text has a border.</li>
+                <li>The optional angle argument specifies the angle at which the text is drawn (rotated around the X/Y coordinates and measured in degrees).</li>
+                <li>The optional background argument is the color of the background, (eg #fff).</li>
+                <li>The optional bold argument is boolean which controls whether the text is bold or not.</li>
+                <li>And the optional indicator argument is a boolean which controls whether a placement indicator is shown.</li>
+            </ul>
+            
+            <br /><i>File: RGraph.common.core.js</i>
+            <br /><br />
+        </li>
+        
+        <li><b>(null) RGraph.DrawTitle(canvas, text, gutter[, centerx[, size]])</b><br />This function draws the title. The centerx argument is the center point to use. If not given the center of the canvas is used.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.Tooltip(canvas, text, x, y, idx)</b><br />This function shows a tooltip. The idx value corresponds to the tooltip array that you give.<br /><i>File: RGraph.common.tooltips.js</i><br /><br /></li>
+        <li><b>(null) RGraph.DrawKey(object, key, colors)</b><br />This function draws the key. The first argument is the chart object, the second is an array of key information and the last is an array of the colors to use.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.DrawBars(object)</b><br />This draws the horizontal background bars. The argument is the chart object.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.DrawInGraphLabels(object)</b><br />This draws the in-graph labels. The argument is the chart object.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.DrawCrosshairs(object)</b><br />This function draws the crosshairs. The argument is the chart object.<br /><i>File: RGraph.common.core.js</i><br /><br /></li>
+        <li><b>(null) RGraph.HideContext()</b><br />This function clears the context menu. RGraph uses it to hide the context menu, but only AFTER your function/callback is run. You may wish to hide the context menu before your own function, in which case you can call this function.<br /><i>File: RGraph.common.context.js</i><br /><br /></li>
+        <li>
+            <b>(null) RGraph.showPNG([canvas[, event]])</b><br />
+            This function allows you to easily facilitate getting a PNG image representation of your chart.
+            You can use it like this:<br />
+            
+            <pre class="code">myBar.Set('chart.contextmenu', [
+                                <span style="color: green">['Get PNG', RGraph.showPNG]</span>,
+                                null,
+                                ['Cancel', function () {}]
+                               ]);</pre>
+            Optionally, you can pass in the canvas as an argument which will be used, meaning now you do not have to use a
+            context menu (there's an example <a href="png.html"><b>here</b></a>). It WAS originally designed to be used with a context menu, hence it's part of the <i>RGraph.core.context.js</i>
+            file.<br />
+            <i>File: RGraph.common.context.js</i>
+            <br /><br />
+        </li>
+
+        <li>
+            <b>(number) RGraph.getGutterSuggest(obj, data)</b><br />
+            This function returns a suggested gutter setting based on the vertical labels. If the bottom labels are larger, this
+            setting may be inappropriate. The <i>data</i> variable is a simple single dimension array, <i>eg [1,2,3,4,5]</i>.
+            <br />
+            <pre class="code">
+var size = RGraph.getGutterSuggest(obj, data);
+obj.Set('chart.gutter.left', size);
+</pre>
+            <i>File: RGraph.common.core.js</i>
+            <br /><br />
+        </li>
+        
+        <li>
+            <b>(boolean) RGraph.isIE8()</b><br />
+            This function tests the useragent for MSIE8.<br />
+            <i>File: RGraph.common.core.js</i>
+            <br /><br />
+        </li>
+        
+        <li>
+            <b>(boolean) RGraph.isIE8up()</b><br />
+            This function tests the useragent for MSIE8 or higher.<br />
+            <i>File: RGraph.common.core.js</i>
+            <br /><br />
+        </li>
+        
+        <li>
+            <b>(boolean) RGraph.isIE9()</b><br />
+            This function tests the useragent for MSIE9.<br />
+            <i>File: RGraph.common.core.js</i>
+            <br /><br />
+        </li>
+        
+        <li>
+            <b>(boolean) RGraph.isIE9up()</b><br />
+            This function tests the useragent for MSIE9 or higher.<br />
+            <i>File: RGraph.common.core.js</i>
+            <br /><br />
+        </li>
+        
+        <li>
+            <b>(null) RGraph.background.Draw(obj)</b><br />
+            This function is used by the Bar, Gantt, Line and Scatter chart to draw the chart background (but not the axes).
+            It is passed the chart object which it uses to get the properties it uses:<br /><br />
+            
+            <div>
+                <div style="float: left">
+                    <ul>
+                        <li>chart.gutter</li>
+                        <li>chart.variant</li>
+                        <li>chart.text.size</li>
+                        <li>chart.text.font</li>
+                        <li>chart.title</li>
+                        <li>chart.title.xaxis</li>
+                        <li>chart.title.xaxis.pos</li>
+                        <li>chart.title.yaxis</li>
+                        <li>chart.title.yaxis.pos</li>
+                        <li>chart.background.barcolor1</li>
+                        <li>chart.background.grid</li>
+                        <li>chart.background.grid.width</li>
+                    </ul>
+                </div>
+                <div style="float: left">
+                    <ul>
+                        <li>chart.background.grid.autofit</li>
+                        <li>chart.background.grid.autofit.numhlines</li>
+                        <li>chart.background.grid.autofit.numvlines</li>
+                        <li>chart.background.grid.autofit.align</li>
+                        <li>chart.background.grid.hlines</li>
+                        <li>chart.background.grid.vlines</li>
+                        <li>chart.background.grid.hsize</li>
+                        <li>chart.background.grid.vsize</li>
+                        <li>chart.background.grid.color</li>
+                        <li>chart.background.grid.border</li>
+                        <li>chart.background.barcolor2</li>
+                    </ul>
+
+                </div>
+            </div>
+            
+            <br clear="all" />
+            
+            
+            
+            <p>
+                 Note that this function also calls RGraph.DrawTitle() in order to draw the title.<br />
+                 <i>File: RGraph.common.core.js</i>
+            </p>
+
+            <br /><br />
+        </li>
+    </ul>
+
+
+    <a name="skeleton"></a>
+    <h4>The skeleton file</h4>
+    <p>
+        The skeleton object
+        (<a href="../libraries/RGraph.skeleton.js" target="_blank"><i>RGraph.skeleton.js</i></a>) gives you a base for creating new chart types that
+        match the RGraph object system (eg getters, setters, RGraph names etc). Example usage of the skeleton object would be:
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    var myObj = new RGraph.Skeleton('cvs', [3,3,4,5,3,8,3,2,1,9]);
+    myObj.Set('chart.colors', ['red']);
+    myObj.Draw();
+
+    var colors = myObj.Get('chart.colors');
+&lt;/script&gt;
+</pre>
+
+    <a name="questions"></a>
+    <h4>Questions</h4>
+
+    <p>
+        If you have a question regarding the API, you can ask it in the
+        <a href="http://support.rgraph.net" target="_blank">support group</a>
+    </p>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/async.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/async.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/async.html	(revision 225)
@@ -0,0 +1,201 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Asynchronous processing</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs async asynchronous" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about asynchronous processing" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.line.js"></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            var duration = (new Date().getTime() - timer.getTime()) / 1000;
+            document.getElementById("waiting").innerHTML = '<span style="color: green">Done! Extra time taken: ' + duration.toFixed(1) + ' seconds</span>';
+            alert('The window.onload event fired, extra time taken: ' + duration.toFixed(1) + ' seconds');
+        }
+
+        // Create a timer to show the difference
+        timer = new Date();
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Asynchronous processing
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Asynchronous processing</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p id="waiting" style="; font-weight: bold; font-size: 16pt"><span style="color: #aa0">Waiting for onload event...</span></p>
+
+    <p style="background-color: #eee; border: 1px dashed gray; padding: 5px; height: 50px;">
+        <span style="display: inline-block; margin-left: 10px; float: right">
+            <script>
+                document.write('<img src="http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/whidbey.jpg?' + Math.random() + '" width="50" height="50" />&nbsp;');
+                document.write('<img src="http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/window.jpg?' + Math.random() + '" width="50" height="50" />&nbsp;');
+                document.write('<img src="http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/whidbey2.jpg?' + Math.random() + '" width="50" height="50" />');
+            </script>
+        </span>
+
+        These images are here to pad the page and slow down loading so that the window.onload event is slowed. This makes the
+        difference far more visible.
+    </p>
+
+    <canvas id="myCanvas" width="600" height="250" style="float: right">[No canvas support]</canvas>
+
+    <script>
+        /**
+        * Create the line chart
+        */
+        function CreateLineGraph ()
+        {
+            var line = new RGraph.Line('myCanvas', [1,2,4,2,1,3,5,6,6,5,3,5]);
+            line.Set('chart.title', 'Sales for Acme Inc.');
+            line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            line.Set('chart.hmargin', 10);
+            line.Set('chart.linewidth', 5);
+            line.Set('chart.shadow', true);
+            line.Set('chart.shadow.offsetx', 0);
+            line.Set('chart.shadow.offsety', 0);
+            line.Set('chart.shadow.blur', 15);
+            line.Draw();
+        }
+    
+        RGraph.Async(CreateLineGraph);
+    </script>
+
+    <p>
+        Asynchronous processing can speed up the display of your charts, because the browser gets to your code, sets it
+        going and then continues on rendering the page. Particularly if you have a weighty page,
+        it can make quite a difference. The <i>RGraph.Async()</i> function itself is very simple, but because it can make
+        a significant difference to the speed of your page, it is documented here. There's an example of it to the right.
+        One thing to remember is to ensure your canvas tag is defined first before you set the function that creates
+        the chart going.
+    </p>
+    
+    <p>
+        Although asynchronous processing can speed up your pages, it can also give the appearance of slower pages due to partial
+        rendering, (ie your pages render a bit at a time). You therefore will need to experiment to get the best result for you.
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script src="RGraph.common.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;
+
+&lt;canvas id="myCanvas" width="300" height="100"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script&gt;
+    /**
+    * Create the line chart
+    */
+    function CreateLineGraph ()
+    {
+        var line = new RGraph.Line('myCanvas', [1,2,4,2,1,3,5,6,6,5,3,5]);
+        line.Set('chart.title', 'Sales for Acme Inc.');
+        line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        line.Set('chart.hmargin', 10);
+        line.Set('chart.linewidth', 5);
+        line.Set('chart.shadow', true);
+        line.Set('chart.shadow.offsetx', 0);
+        line.Set('chart.shadow.offsety', 0);
+        line.Set('chart.shadow.blur', 15);
+        line.Draw();
+    }
+
+    RGraph.Async(CreateLineGraph);
+&lt;/script&gt;
+</pre>
+
+    <p><b>Things to remember</b></p>
+    
+    <ul>
+        <li>All your libraries must be loaded first. In the pages &lt;head&gt; for example. If not, you won't be able to create your charts.</li>
+        <li>Your &lt;canvas&gt; tag must be defined before setting the asynchronous code going. If not, then the canvas may be referenced before it exists, and thus your charts will not be created.</li>
+        <li>
+            The users connection speed may be a factor. Slower connections may mean, for example, that the onload event doesn't fire very
+            quickly. If you're using the onload event to create your charts then asynchronous creation instead may give you more
+            apparent speed ups. Alternatively, careful placement of the &lt;canvas&gt; tag and the code that creates the chart may suffice
+            instead.
+        </li>
+        <li>Since the MSIE/ExCanvas combo requires you to use the window.onload event, asynchronous chart creation in this case will probably not be any help.</li>
+        <li>
+            Since a dev release of version 4, Google Chrome has had an issue when asynchronous processing is used, meaning that
+            text isn't always displayed. The solution here is simply to not use asynchronous processing. As of 27th March 2010,
+            Chrome 5 appears to be fine.
+        </li>
+    </ul>
+
+    <h4>See also</h4>
+    
+    You might also be interested in the alternative, <a href="domcontentloaded.html">DOMContentLoaded</a> event.
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/bar.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/bar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/bar.html	(revision 225)
@@ -0,0 +1,698 @@
+<?php ob_start('ob_gzshandler') ?>
+<!DOCTYPE html>
+<html> 
+<head> 
+    <meta http-equiv="X-UA-Compatible" content="chrome=1"> 
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    --> 
+    <title>RGraph: Javascript charts and graph library - bar charts documentation</title> 
+    
+    <meta name="keywords" content="rgraph html5 canvas docs bar charts" /> 
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Bar charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+ 
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" /> 
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head> 
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb"> 
+        <a href="../index.html">RGraph: Javascript charts and graph library</a> 
+        >
+        <a href="index.html">Documentation</a> 
+        >
+        Bar charts
+    </div> 
+ 
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Bar charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+ 
+    <p> 
+        Bar charts, along with Line charts, are the most configurable of all the charts available,
+        because they're the most common of chart types.
+    </p> 
+    
+    <p> 
+        The example file is <a href="../examples/bar.html">here</a>.
+    </p> 
+
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+        <li><a href="#available.methods">Methods</a></li>
+    </ul>
+
+    <pre class="code"> 
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [280,45,133,166,84,259,266,960,219,311];
+    
+        var bar = new RGraph.Bar('myCanvas', data);
+        bar.Set('chart.labels', ['Richard', 'Alex', 'Nick', 'Scott', 'Kjnell', 'Doug', 'Charles', 'Michelle', 'Mark', 'Alison']);
+        bar.Set('chart.gutter.left', 45);
+        bar.Set('chart.background.barcolor1', 'rgba(255,255,255,1)');
+        bar.Set('chart.background.barcolor2', 'rgba(255,255,255,1)');
+        bar.Set('chart.background.grid', true);
+        bar.Set('chart.colors', ['rgba(255,0,0,1)']);
+        bar.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="available.properties"></a>
+    <h2>Properties</h2> 
+ 
+    <p> 
+        You can use these properties to control how the bar chart apears. You can set them by using the Set() method. Eg:
+    </p> 
+    
+    <p> 
+        <b>myBar.Set('name', 'value');</b> 
+    </p>
+    
+    <ul>
+        <li><a href="#background">Background</a></li>
+        <li><a href="#axes">Axes properties</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+
+<a name="background"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Background</h3>            <a name="chart.background.barcolor1"></a>
+<b>chart.background.barcolor1</b><br />
+            The color of the background bars, (1 of 2). <br /><i>Default: white</i><br /><br />
+            <a name="chart.background.barcolor2"></a>
+<b>chart.background.barcolor2</b><br />
+            The color of the background bars, (2 of 2). <br /><i>Default: white</i><br /><br />
+            <a name="chart.background.grid"></a>
+<b>chart.background.grid</b><br />
+            Whether to show the background grid or not. <br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.color"></a>
+<b>chart.background.grid.color</b><br />
+            The color of the background grid. <br /><i>Default: #ddd</i><br /><br />
+            <a name="chart.background.grid.hsize"></a>
+<b>chart.background.grid.hsize</b><br />
+            The horizontal background grid size. <br /><i>Default: 40</i><br /><br />
+            <a name="chart.background.grid.vsize"></a>
+<b>chart.background.grid.vsize</b><br />
+            The vertical background grid size. <br /><i>Default: 18</i><br /><br />
+            <a name="chart.background.grid.width"></a>
+<b>chart.background.grid.width</b><br />
+            The width that the background grid lines are. Decimals (eg 0.5) are permitted.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.background.grid.border"></a>
+<b>chart.background.grid.border</b><br />
+            Determines whether a border line is drawn around the grid.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.hlines"></a>
+<b>chart.background.grid.hlines</b><br />
+            Determines whether to draw the horizontal grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.vlines"></a>
+<b>chart.background.grid.vlines</b><br />
+            Determines whether to draw the vertical grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.autofit"></a>
+<b>chart.background.grid.autofit</b><br />
+            Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want.<br /><i>Default: false</i><br /><br />
+            <a name="chart.background.grid.autofit.numhlines"></a>
+<b>chart.background.grid.autofit.numhlines</b><br />
+            When using autofit this allows you to specify how many horizontal grid lines you want. <br /><i>Default: 7</i><br /><br />
+            <a name="chart.background.grid.autofit.numvlines"></a>
+<b>chart.background.grid.autofit.numvlines</b><br />
+            When using autofit this allows you to specify how many vertical grid lines you want. <br /><i>Default: 20</i><br /><br />
+            
+            <a name="chart.background.grid.autofit.align"></a>
+            <b>chart.background.grid.autofit.align</b><br />
+            If you want to have your grid lines line up with the labels (both X and Y axes), you can set this to true and RGraph will
+            attempt to make the grid lines line up. If you have a <i>chart.hmargin</i> set then the alignment will be thrown out.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.background.hbars"></a>
+<b>chart.background.hbars</b><br />
+            An array of information stipulating horizontal coloured bars. You can use these to indicate limits. Eg: <i>myBar.Set('hbars', [[75, 10, 'yellow'], [85, 15, 'red']]);</i> This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the starting point and the height.<br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.background.image"></a>
+            <b>chart.background.image</b><br />
+            If you want to specify a background image to use on your chart, specify it with this property.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="axes"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Axes properties</h3>
+
+            <a name="chart.noaxes"></a>
+            <b>chart.noaxes</b><br />
+            Whether the axes are drawn<br />
+            <i>Default: false (the axes ARE drawn)</i><br /><br />
+
+            <a name="chart.noxaxis"></a>
+            <b>chart.noxaxis</b><br />
+            Whether the X axis is drawn<br />
+            <i>Default: false (the X axis IS drawn)</i><br /><br />
+
+            <a name="chart.noyaxis"></a>
+            <b>chart.noyaxis</b><br />
+            Whether the Y axis is drawn<br />
+            <i>Default: false (the Y axis IS drawn)</i><br /><br />
+
+            <a name="chart.noendxtick"></a>
+            <b>chart.noendxtick</b><br />
+            When you're combining the Bar and Line charts, you may want to use this property to stop the end X tick from
+            being drawn.<br />
+            <i>Default: false (the end tick IS drawn)</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.strokecolor"></a>
+<b>chart.strokecolor</b><br />
+            The color of the outline of the bars. <br /><i>Default: #666</i><br /><br />
+            
+            <a name="chart.colors"></a>
+            <b>chart.colors</b><br />
+            An array of the colors of the actual bars. <br />
+            <i>Default: An array - ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0']</i><br /><br />
+            
+            <a name="chart.colors.sequential"></a>
+            <b>chart.colors.sequential</b><br />
+            If true, for regular bar charts, (not stacked or grouped), the colors that you specify will be used in a sequential
+            fashion.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.colors.reverse"></a>
+            <b>chart.colors.reverse</b><br />
+            If true, for stacked bar charts only, the colors that you specify will be used in a reverse order to what they are
+            normally.<br />
+            <i>Default: false</i><br /><br />
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+        <a name="chart.hmargin"></a>
+        <b>chart.hmargin</b><br />
+            The horizontal margin (in pixels) of the chart. The horizontal margin is on the inside of the axes.<br />
+            <i>Default: 5</i><br /><br />
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.angle"></a>
+<b>chart.text.angle</b><br />
+            The angle of the horizontal text labels (at the bottom of the chart). This can be one of three values - 0, 45 or 90.<br /><i>Default: 0 (Horizontal)</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            An array of the labels to be used on the chart. <br /><i>Default: An empty array</i><br /><br />
+            
+            <a name="chart.labels.above"></a>
+            <b>chart.labels.above</b><br />
+            If true, values will be shown above the bars. For regular and stacked bar charts units are included, whereas for
+            grouped bar charts they're not (usually there isn't enough space for them).
+            <br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.labels.above.decimals"></a>
+            <b>chart.labels.above.decimals</b><br />
+            This stipulates how many decimals are used in the above bar labels.
+            <br /><i>Default: 0</i><br /><br />
+            
+            <a name="chart.labels.above.size"></a>
+            <b>chart.labels.above.size</b><br />
+            The font size of the above bar labels. Useful if you only have a few bars.
+            <br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.labels.above.angle"></a>
+            <b>chart.labels.above.angle</b><br />
+            You can use this to angle the text shown above the bars. It can be anything from -90 to 90 (degrees).
+            <br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.labels.ingraph"></a>
+<b>chart.labels.ingraph</b><br />
+            An array of labels for the chart which are drawn "inside" the chart.  If you have 5 data points then this should have a corresponding number of elements, though there is a <a href="misc.html#shorthand.ingraph.labels">shorthand available</a>.<br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.ylabels"></a>
+            <b>chart.ylabels</b><br />
+            Can be <i>true</i> or <i>false</i> and determines whether the chart has Y axis labels.<br />
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.ylabels.count"></a>
+            <b>chart.ylabels.count</b><br />
+            A value  that controls how many Y labels there are. Previously (prior to 8th August 2010) this could be 1,3,5.
+            Now it can be any number, but keep in mind that if you use this it may result in decimals.<br />
+            <i>Default: 5</i><br /><br />
+
+            <a name="chart.ylabels.specific"></a>
+            <b>chart.ylabels.specific</b><br />
+            You can use this option to give your own Y labels (eg ['Low', 'Medium', 'High'].<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.xlabels.offset"></a>
+<b>chart.xlabels.offset</b><br />
+            This allows you finer grained control over the X label positioning if you need it.<br /><i>Default: 0</i><br /><br />
+            <a name="chart.numyticks"></a>
+<b>chart.numyticks</b><br />
+            The number of Y tickmarks. If you have changed the number of Y labels, you may also want to change this to match. <br /><i>Default: 10</i><br /><br />
+<a name="titles"></a>
+
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>
+
+<a name="chart.title"></a>
+<b>chart.title</b><br />
+The title of the chart, if any. <br />
+<i>Default: null</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+<a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.xaxis"></a>
+<b>chart.title.xaxis</b><br />
+            This allows to specify a title for the X axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.yaxis"></a>
+<b>chart.title.yaxis</b><br />
+            This allows to specify a title for the Y axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.xaxis.pos"></a>
+<b>chart.title.xaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the X axis title.<br /><i>Default: 0.25</i><br /><br />
+            <a name="chart.title.yaxis.pos"></a>
+<b>chart.title.yaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the Y axis title.<br /><i>Default: 0.25</i><br /><br />
+
+<!--
+            <a name="chart.title.yaxis.position"></a>
+            <b>chart.title.yaxis.align</b><br />
+            Instead of using the option above you can instead use this option, specifying <i>left</i> or <i>right</i>.<br />
+            <i>Default: left</i><br /><br />
+-->
+
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether a drop shadow is applied. <br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow. <br /><i>Default: #666</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the shadow. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the shadow.  <br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect. <br /><i>Default: 3</i><br /><br />
+
+            <a name="scale"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+            
+            <a name="chart.scale.formatter"></a>
+            <b>chart.scale.formatter</b><br />
+            To allow thoroughly custom formats of numbers in the scale, you can use this option to
+            specify a function that is used by RGraph to format numbers. This function should
+            handle ALL of the formatting. Eg:<br /><br />
+            <pre class="code">
+function myFormatter(obj, num)
+{
+    return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+</pre>
+            <br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.scale.decimals"></a>
+            <b>chart.scale.decimals</b><br />
+            The number of decimal places to display for the Y scale.
+            <br /><i>Default: 0</i><br /><br />
+            
+            <a name="chart.scale.point"></a>
+            <b>chart.scale.point</b><br />
+            The character used as the decimal point.<br /><i>Default: .</i><br /><br />
+            
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.units.pre"></a>
+            <b>chart.units.pre</b><br />
+            The units that the Y axis is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50".<br /><i>Default: none</i><br /><br />
+            
+            <a name="chart.units.post"></a>
+            <b>chart.units.post</b><br />
+            The units that the Y axis is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms".<br /><i>Default: none</i><br /><br />
+
+            <a name="chart.ymax"></a>
+            <b>chart.ymax</b><br />
+            The optional maximum Y scale value. If not specified then it will be calculated.<br /><i>Default: null (It's calculated)</i><br /><br />
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            A numerically indexed array of tooltips that are shown when a bar is clicked. These can contain HTML.<br /><i>Default: null</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            
+            <a name="chart.tooltips.event"></a>
+            <b>chart.tooltips.event</b><br />
+            This is the event that triggers the tooltips. It can be either <i>onclick</i> or <i>onmousemove</i>.<br />
+            <i>Default: onclick</i><br /><br />
+
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            
+            
+            <a name="chart.crosshairs"></a>
+<b>chart.crosshairs</b><br />
+            If true, you will get a crosshair centering on the current mouse position.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.linewidth"></a>
+<b>chart.crosshairs.linewidth</b><br />
+            This controls the linewidth of the crosshairs.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.crosshairs.color"></a>
+<b>chart.crosshairs.color</b><br />
+            The color of the crosshairs.<br /><i>Default: #333</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+            
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.adjustable"></a>
+<b>chart.adjustable</b><br />
+            Defaulting to false, this determines whether your bar chart will be adjustable. <br /><i>Default: false</i><br /><br />
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>
+<a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+
+    <a name="miscellaneous"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+<a name="chart.line"></a>
+<b>chart.line</b><br />
+            Formerly a boolean, this now stipulates a line chart object which is to be drawn on top of the bar chart. You can see an example <a href="combine.html">here</a>.<br /><i>Default: null</i><br /><br />
+            <a name="chart.variant"></a>
+<b>chart.variant</b><br />
+            This simply stipulates whether you want a regular bar chart, a dot chart, a pyramid chart a 3D chart, a sketch or a glassy chart. Possible values are:<ul><li>bar</li><li>dot</li><li>pyramid</li><li>arrow</li><li>3d</li><li>sketch</li><li>glass</li></ul>The pyramid, dot, arrow, sketch and glass variants are only effective for regular bar charts - not grouped or stacked charts.<br /><i>Default: bar</i><br /><br />
+            
+            <a name="chart.xaxispos"></a>
+            <b>chart.xaxispos</b><br />
+            The position of the X axis. This can be <i>bottom</i>,  <i>center</i> or <i>top</i>. <br />
+            <i>Default: bottom</i><br /><br />
+
+            <a name="chart.axis.color"></a>
+<b>chart.axis.color</b><br />
+            The color of the axes.<br /><i>Default: black</i><br /><br />
+            <a name="chart.grouping"></a>
+<b>chart.grouping</b><br />
+            How the bars are grouped, and it should be one of: <b>grouped</b> or <b>stacked</b><br /><i>Default: grouped</i><br /><br />
+</div>
+    
+    <a name="available.methods"></a>
+    <br />&nbsp;<br />
+    <h2>Methods</h2>
+    
+    <a name="getbar"></a>
+    <b>obj.getBar()</b><br /><br />
+    This method makes it easier to get hold of which bar has been clicked on, or hovered over. It returns an array of:
+    <ul>
+        <li>The chart object</li>
+        <li>The X coordinate</li>
+        <li>The Y coordinate</li>
+        <li>The width of the bar</li>
+        <li>The height of the bar</li>
+        <li>The numerical index of the bar. This corresponds (for example) to the tooltips array, and the coordinates array</li>
+    </ul>
+    
+    An example usage is:
+    
+    <pre class="code">
+&lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.bar.js"&gt;&lt;/script&gt;
+
+&lt;script&gt;
+    myGraph = new RGraph.Bar('myCanvas', [1.2, 1.3, 1.4, 1.5,6,1.9,2,2.1,2.5]);
+    myGraph.Set('chart.labels', ['John', 'Barry', 'Rich', 'Craig', 'Tom', 'Frank', 'Helen', 'Joyce', 'Fred'])
+    myGraph.Draw();
+
+    RGraph.Register(myGraph);
+    
+    myGraph.canvas.onclick = function (e)
+    {
+        RGraph.Redraw();
+    
+        var canvas  = e.target;
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        <span style="color: green">var coords  = obj.getBar(e);</span>
+        
+        if (coords) {
+            var top    = coords[1];
+            var left   = coords[2];
+            var width  = coords[3];
+            var height = coords[4];
+            
+            context.beginPath();
+                context.strokeStyle = 'black';
+                context.fillStyle = 'rgba(255,255,255,0.5)';
+                context.strokeRect(top, left, width, height);
+                context.fillRect(top, left, width, height);
+            context.stroke();
+            context.fill();
+        }
+    }
+&lt;/script&gt;
+</pre>
+    
+    
+</body> 
+</html>
Index: Dev/branches/Demo/RGraph/docs/basic_tooltips.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/basic_tooltips.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/basic_tooltips.html	(revision 225)
@@ -0,0 +1,106 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - A basic example of Pie charts in tooltips</title>
+    
+    <meta name="keywords" content="rgraph javascript charts html5 canvas basic example pie charts tooltips" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  A basic example of Pie charts in tooltips" />
+
+    <!-- Include the RGraph libraries -->
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+</head>
+
+<body>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - A basic example of Pie charts in tooltips</h1>
+
+    <canvas id="myBar" width="1000" height="250">[No canvas support]</canvas>
+
+    <script>
+        window.onload = function ()
+        {
+            /**
+            * This creates the Bar chart
+            */
+            var bar = new RGraph.Bar('myBar', [12,13,16,15]);
+            bar.Set('chart.gutter.left', 35);
+            bar.Set('chart.colors', ['red']);
+            bar.Set('chart.title', 'A basic graph with charts in tooltips');
+            bar.Set('chart.labels', ['Kev', 'Brian', 'Fred', 'John']);
+
+            // A function which returns the string which is used as every tooltip
+            bar.Set('chart.tooltips', function () { return '<canvas id="__tooltip__canvas__" width="300" height="200">[No canvas support]</canvas>';});
+
+            bar.Draw();
+
+
+            /**
+            * This is the function which ceates the Pie chart (using the custom ontooltip RGraph event
+            */
+            function myCreatePieChart(obj)
+            {
+                var canvas  = obj.canvas;
+                var context = obj.context;
+                var id      = obj.id;
+                
+                // This gets the tooltip index from the tooltip (which is stored in the RGraph registry) itself
+                var idx = RGraph.Registry.Get('chart.tooltip').__index__;
+                
+                /**
+                * The Pie chart data. Realistically this would come from a dynamic source,
+                * eg AJAX
+                */
+                var pieData = [
+                               [4,5,3,6],
+                               [8,4,5,2],
+                               [4,3,5,1],
+                               [4,2,1,3]
+                              ];
+                
+                var pie = new RGraph.Pie('__tooltip__canvas__', pieData[idx]);
+                pie.Set('chart.key', ['Monday','Tuesday','Wednesday','Thursday']);
+                pie.Set('chart.align', 'left');
+                pie.Set('chart.gutter.top', 10);
+                pie.Set('chart.gutter.bottom', 10);
+                pie.Set('chart.gutter.left', 10);
+                pie.Set('chart.gutter.right', 10);
+                pie.Set('chart.exploded', [3,3,3,3]);
+                pie.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+                pie.Draw();
+            }
+
+            RGraph.AddCustomEventListener(bar, 'ontooltip', myCreatePieChart);
+        }
+    </script>
+    
+    <p>
+        This is a basic example that shows charts (Pie charts) in tooltips. The canvas element is part of the tooltip
+        HTML code (specified like regular tooltips), and then it uses the <i>ontooltip</i> event to run some code whhich
+        then creates the Pie chart in the tooltip.
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/bipolar.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/bipolar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/bipolar.html	(revision 225)
@@ -0,0 +1,367 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Bi-polar charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs bipolar charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Bipolar charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Bi-polar charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Bi-polar charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Bi-polar charts are good for comparing two sets of data side by side. For example sales trends for two separate years, that you
+        want to compare.
+    </p>
+    
+    <p> 
+        The example file is <a href="../examples/bipolar.html">here</a>.
+    </p> 
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var left  = [5,6,8,9,12,13,4,9];
+        var right = [5,8,4,11,15,26,13,16];
+    
+        var bipolar = new RGraph.Bipolar('myBipolar', left, right);
+        bipolar.Set('chart.colors', ['#fff', '#eef', '#ddf', '#ccf', '#bbf', '#bbf', '#aaf', '#99f']);
+        bipolar.Set('chart.margin', 3);
+        bipolar.Set('chart.labels', ['Barry', 'John', 'Fred', 'George', 'Rich', 'Larry', 'John', 'Mike']);
+        bipolar.Set('chart.title.left', '2007');
+        bipolar.Set('chart.title.right', '2008');
+        bipolar.Set('chart.gutter.bottom', 45);
+        bipolar.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the chart apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myBipolar.Set('name', 'value');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels, text and axes">Labels, text and axes</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.margin"></a>
+<b>chart.margin</b><br />
+            The space above and below each bar. <br /><i>Default: 2</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>
+
+<b>chart.title</b><br />
+The main title of the chart.<br />
+<i>Default: (An empty string)</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+<a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title"></a>
+            <a name="chart.title.left"></a>
+<b>chart.title.left</b><br />
+            The left title. <br /><i>Default: An empty string</i><br /><br />
+            <a name="chart.title.right"></a>
+<b>chart.title.right</b><br />
+            The right title. <br /><i>Default: An empty string</i><br /><br />
+<a name="colors"></a>
+
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>
+
+    <a name="chart.colors"></a>
+    <b>chart.colors</b><br />
+    An array of colors. These too can be gradients that you make if you wish. <br />
+    <i>Default: ['#fcf', '#00f', '#f00', '#0f0', '#ff0', '#0ff', '#f0f', '#ff6101', '#b401ff', '#e4ff01', '#fb8195', '#ccc']</i><br /><br />
+    
+    <a name="chart.strokestyle"></a>
+    <b>chart.strokestyle</b><br />
+    This is the color used as the stroke style. If you didn't want it, you could set this to <i>rgba(0,0,0,0)</i><br />
+    <i>Default: #333</i><br /><br />
+
+<a name="labels, text and axes"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels, text and axes</h3>            <a name="chart.xtickinterval"></a>
+<b>chart.xtickinterval</b><br />
+            The X tick mark interval. <br /><i>Default: null</i><br /><br />
+            <a name="chart.axis.color"></a>
+<b>chart.axis.color</b><br />
+            The color of the axes. <br /><i>Default: black</i><br /><br />
+            <a name="chart.xmax"></a>
+<b>chart.xmax</b><br />
+            This allows you to set the maximum X value that the chart uses, instead of it being auto-generated.<br><i>Default: null</i></br><br /><br />
+
+<a name="chart.scale.formatter"></a>
+            <b>chart.scale.formatter</b><br />
+            To allow thoroughly custom formats of numbers in the scale, you can use this option to
+            specify a function that is used by RGraph to format numbers. This function should
+            handle ALL of the formatting. Eg:<br /><br />
+            <pre class="code">
+function myFormatter(obj, num)
+{
+    return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+</pre>
+            <br /><i>Default: null</i><br /><br />
+
+            <a name="chart.scale.decimals"></a>
+<b>chart.scale.decimals</b><br />
+            This allows you to set the precision of the X labels.<br /><i>Default: null</i><br /><br />
+            <a name="chart.scale.point"></a>
+<b>chart.scale.point</b><br />
+            The character used as the decimal point.<br /><i>Default: .</i><br /><br />
+            <a name="chart.scale.thousand"></a>
+<b>chart.scale.thousand</b><br />
+            The character used as the thousand separator<br /><i>Default: ,</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            An array of the charts labels (they go in the middle). <br /><i>Default: null</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text used (in points). <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>            <a name="chart.units.pre"></a>
+
+            
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+<b>chart.units.pre</b><br />
+            The units that are applied to the X axis labels (these are pre-pended to the number).<br /><i>Default: none</i><br /><br />
+            <a name="chart.units.post"></a>
+<b>chart.units.post</b><br />
+            The units that are applied to the X axis labels (these are appended to the number).<br /><i>Default: none</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            A numerically indexed array of tooltips that are shown when a bar is clicked. These can contain HTML.<br /><i>Default: An empty array</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. Cannot be used in conjunction with tooltips.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Turns the shadow on or off.<br /> <i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow.<br /> <i>Default: #666</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The horizontal offset of the shadow.<br /> <i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The vertical offset of the shadow. <br /> <i>Default: 3</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            How severe the blurring effect is for the shadow.<br /> <i>Default: 3</i><br /><br />
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+
+    <a name="miscellaneous"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+</div><!-- /DOCS --><br /><br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/color.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/color.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/color.html	(revision 225)
@@ -0,0 +1,209 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - About canvas color definitions</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs color" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about canvas colors" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A graph library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        About canvas color definitions
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - About canvas color definitions</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        You will probably want to know the different ways you can define a color. There are a few
+        ways which you can use, all of which are quite straight-forward.
+    </p>
+
+    <ul id="colors">
+        <li><a href="#named">Named colors</a></li>
+        <li><a href="#hex">Hex values</a></li>
+        <li><a href="#rgb">RGB values</a></li>
+        <li><a href="#rgba">RGBA values</a></li>
+        <li><a href="#hsl">HSL values</a></li>
+        <li><a href="#hsla">HSLA values</a></li>
+        <li><a href="#lgradients">Linear gradients</a></li>
+        <li><a href="#rgradients">Radial gradients</a></li>
+        <li><a href="#info">More information</a></li>
+    </ul>
+    
+    <a name="named"></a>
+    <br />&nbsp;<br />
+    <h2>Named colors</h2>
+    
+    <p>
+        The first, and easiest, is to use named colors. This gives you a range of color values that have been predefined for you. Eg:
+    </p>
+    
+    <pre class="code">myObject.Set('chart.colors', ['red', 'blue']);</pre>
+
+    <a name="hex"></a>
+    <br />&nbsp;<br />
+    <h2>Hex values</h2>
+    
+    <p>
+        The next, is straight forward hex values like you can use in normal CSS. These consist of a hash sign,
+        followed by three or six hexadecimal characters. Eg:
+    </p>
+
+    <pre class="code">myObject.Set('chart.colors', ['#f00', '#0000ff']);</pre>
+    
+    <a name="rgb"></a>
+    <br />&nbsp;<br />
+    <h2>RGB values</h2>
+    
+    <p>
+        Also as used in CSS, RGB values are the same as what you can use in CSS. Eg:
+    </p>
+    
+    <pre class="code">myObject.Set('chart.colors', ['rgb(255,0,0)', 'rgb(0,0,255)']);</pre>
+
+    <a name="rgba"></a>
+    <br />&nbsp;<br />
+    <h2>RGBA values</h2>
+    
+    <p>
+        Probably new to most people, is rgba(). Similar to regular rgb() values, but with a fourth value that allows you to specify the
+        alpha value, which stipulates how transparent the color is. An alpha value of 0 is totally transparent, and a value of 1, is
+        totally opaque (ie. you can't see through it). With a value of 1, rgba() acts exactly like rgb(). This example gives you red
+        and blue colors that are semi-transparent:
+    </p>
+    
+    <pre class="code">myObject.Set('chart.colors', ['rgba(255,0,0,0.5)', 'rgba(0,0,255,0.5)']);</pre>
+
+    <a name="hsl"></a>
+    <br />&nbsp;<br />
+    <h2>HSL() values</h2>
+    
+    <p>
+        Also probably quite new to you, are hsl() values. Much like rgb(), but instead of red green and blue, it allows you to specify
+        the Hue, Saturation and Light values instead. For example:
+    </p>
+    
+    <pre class="code">myObject.Set('chart.colors', ['hsl(255, 100%, 50%)', 'hsl(169, 100%, 50%)']);</pre>
+
+    <a name="hsla"></a>
+    <br />&nbsp;<br />
+    <h2>HSLA() values</h2>
+
+    <p>
+        Much like rgb() and rgba(), hsl() has a corresponding hsla() version, which allows you to specify an alpha (transparency) value.
+        Eg:
+    </p>
+    
+    <pre class="code">myObject.Set('chart.colors', ['hsla(255, 100%, 50%, 0.5)', 'hsla(169, 100%, 50%, 0.5)']);</pre>
+
+    <a name="lgradients"></a>
+    <br />&nbsp;<br />
+    <h2>Linear gradients</h2>
+    
+    <p>
+        Gradients can be used in place of color values. You can create a linear gradient like so:
+    </p>
+    
+    <pre class="code">myGradient = myObject.context.createLinearGradient(0,0,0,250);
+myGradient.addColorStop(0, 'red');
+myGradient.addColorStop(1, 'blue');</pre>
+
+    <p>
+        This creates a gradient that goes from red to blue. The gradient starts at 0,0, and finishes at 0,250. ie A vertical
+        gradient. You may not see the whole gradient - that depends on the extent of the shape you're filling. You can use the gradient
+        in place of a regular color definition. Eg:
+    </p>
+    
+    <pre class="code">myObject.Set('chart.colors', [myGradient]);</pre>
+
+    <a name="rgradients"></a>
+    <br />&nbsp;<br />
+    <h2>Radial gradients</h2>
+
+    <p>
+        Radial gradients are much like their linear counterparts, but circular, as the name suggests. Eg:
+    </p>
+    
+    <pre class="code">myGradient = myObject.context.createRadialGradient(0,0,0,0,0,100);
+myGradient.addColorStop(0, 'red');
+myGradient.addColorStop(1, 'blue');
+</pre>
+    
+    <p>
+        Instead of four arguments, it takes six - the coordinates of the start point along with the radius, and the coordinates
+        of the end point, along with the radius. After it has been created, you can treat as you would a linear gradient:
+    </p>
+
+    <pre class="code">myObject.Set('chart.colors', [myGradient]);</pre>
+
+    <a name="info"></a>
+    <br />&nbsp;<br />
+    <h2>More information</h2>
+    
+    <p>
+        You can read more about CSS3 color definitions  <a href="http://www.w3.org/TR/css3-color/" target="_blank" rel="nofollow">here</a>.
+    </p>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/combine.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/combine.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/combine.html	(revision 225)
@@ -0,0 +1,423 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - combining bar and line charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs combining" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about combining charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <style>
+        div.RGraph_tooltip div {
+            display: inline-block;
+            width: 10px;
+            height: 10px;
+            margin-right: 5px;
+        }
+
+        div.RGraph_tooltip div#green {
+            background-color: green;
+        }
+
+        div.RGraph_tooltip div#red {
+            background-color: red;
+        }
+
+        div.RGraph_tooltip div#gray {
+            background-color: #ccc;
+        }
+    </style>
+
+
+    <script>
+        function enlarge_tooltip_graph (e, title)
+        {
+            var bg = document.createElement('DIV');
+                bg.style.opacity = 0;
+                bg.style.position = 'fixed';
+                bg.style.left = 0;
+                bg.style.top = 0;
+                bg.style.width = '2000px';
+                bg.style.height = '2000px';
+                bg.style.backgroundColor = 'rgba(0,0,0,0.2)';
+                bg.style.zIndex = 32568;
+                bg.style.textAlign = 'center';
+            document.body.appendChild(bg);
+            
+            var div = document.createElement('DIV');
+                div.style.position = 'relative';
+                div.style.backgroundColor = 'white';
+                div.style.top = '200px';
+                div.style.width = '300px'
+                div.style.height = '240px';
+                div.style.padding = '15px';
+                div.style.WebkitBorderRadius = '5px';
+                div.style.MozBorderRadius = '5px';
+                div.style.borderRadius = '5px';
+                div.style.left = ((document.body.clientWidth / 2) - 175) + 'px';
+                
+                // Add standard box-shadow and -moz-box-shadow                
+                div.style.WebkitBoxShadow = 'gray 0 0 25px';
+                div.style.MozBoxShadow = '0 0 25px gray';
+                div.style.boxShadow = '0 0 25px gray';
+
+                div.style.border = '1px black solid';
+
+            bg.appendChild(div);
+
+            var canvas = document.createElement('CANVAS');
+                canvas.width  = 300;
+                canvas.height = 240;
+                canvas.id     = 'big_pie';
+            div.appendChild(canvas);
+            
+            bg.onmousedown = function (e)
+            {
+                this.style.display = 'none';
+                document.body.removeChild(this);
+                
+                e.stopPropagation();
+            }
+            
+            div.onmousedown = function (e)
+            {
+                e.stopPropagation();
+            }
+            
+            var data = e.target.__object__.data;
+            
+            var pie = new RGraph.Pie('big_pie', data);
+            pie.Set('chart.strokestyle', 'white');
+            pie.Set('chart.linewidth', 5);
+            pie.Set('chart.align', 'left');
+            pie.Set('chart.colors', ['red','green','#ccc']);
+            pie.Set('chart.key', ['Jane', 'Fred', 'John']);
+            pie.Set('chart.key.shadow', true);
+            pie.Set('chart.key.shadow.blur', 15);
+            pie.Set('chart.key.shadow.offsetx', 0);
+            pie.Set('chart.key.shadow.offsety', 0);
+            pie.Set('chart.key.shadow.color', 'gray');
+            pie.Set('chart.key.rounded', true);
+            pie.Set('chart.gutter.top', 2);
+            pie.Set('chart.gutter.bottom', 2);
+            pie.Set('chart.gutter.left', 2);
+            pie.Set('chart.gutter.right', 2);
+            pie.Draw();
+
+            
+            setTimeout(function () {bg.style.opacity = 0.2;}, 50);
+            setTimeout(function () {bg.style.opacity = 0.4;}, 100);
+            setTimeout(function () {bg.style.opacity = 0.6;}, 150);
+            setTimeout(function () {bg.style.opacity = 0.8;}, 200);
+            setTimeout(function () {bg.style.opacity = 1;}, 250);
+        }
+    </script>
+
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="./index.html">Documentation</a>
+        >
+        Combining charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Combining charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <ul>
+        <li><a href="#barandline">Combining bar and line charts</a></li>
+        <li><a href="#combiningline">Combining Line charts</a></li>
+    </ul>
+    
+    <a name="barandline"></a>
+    <h4>Combining bar and line charts</h4>
+
+    <canvas id="myCanvas" width="600" height="250" style="float: right; border: 1px dashed gray">[No canvas support]</canvas>
+
+    <script>
+        var bar = new RGraph.Bar('myCanvas', [4,5,3,4,1,2,6,5,8,4,9,4]);
+        bar.Set('chart.title', 'A bar/line/pie combination (tooltips)');
+        bar.Set('chart.ymax', 15);
+        bar.Set('chart.text.angle', 45);
+        bar.Set('chart.colors', ['#ccc', 'red', 'green']);
+        bar.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        bar.Set('chart.background.grid.autofit', true);
+        bar.Set('chart.key', ['John', 'Jane', 'Fred']);
+        bar.Set('chart.key.shadow', true);
+        bar.Set('chart.key.shadow.offsetx', 0);
+        bar.Set('chart.key.shadow.offsety', 0);
+        bar.Set('chart.key.shadow.blur', 10);
+        bar.Set('chart.key.shadow.color', 'rgba(128,128,128,0.5)');
+        bar.Set('chart.key.background', 'white');
+        bar.Set('chart.key.rounded', true);
+        bar.Set('chart.background.grid.autofit', true);
+        bar.Set('chart.background.grid.autofit.numvlines', 12);
+        bar.Set('chart.background.grid.autofit.numhlines', 5);
+
+        // Define the line first so that it can be added to the bar chart
+        var line = new RGraph.Line('myCanvas', [1,3,4,3,2,1,4,5,2,3,8,8], [5,6,7,9,7,5,6,3,5,2,5,1]);
+        line.Set('chart.background.grid', false);
+        line.Set('chart.linewidth', 2);
+        line.Set('chart.colors', ['red', 'green']);
+        line.Set('chart.tickmarks', 'circle');
+        line.Set('chart.labels.ingraph', ['January',11,,'February']);
+        
+        // This would all be done programmatically normally, and linked to the key, so that if you change a name in the key,
+        // it changes in all of the tooltips too
+        line.Set('chart.tooltips', [
+                                    '<b>January</b><br />   <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'January\')"></canvas>   <div id="red"></div>Jane: 1<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 4',
+                                    '<b>February</b><br />  <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'February\')"></canvas>  <div id="red"></div>Jane: 6<br /><div id="green"></div>Fred: 6<br /><div id="gray"></div>John: 5',
+                                    '<b>March</b><br />     <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'March\')"></canvas>     <div id="red"></div>Jane: 4<br /><div id="green"></div>Fred: 7<br /><div id="gray"></div>John: 3',
+                                    '<b>April</b><br />     <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'April\')"></canvas>     <div id="red"></div>Jane: 3<br /><div id="green"></div>Fred: 9<br /><div id="gray"></div>John: 4',
+                                    '<b>May</b><br />       <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'May\')"></canvas>       <div id="red"></div>Jane: 2<br /><div id="green"></div>Fred: 7<br /><div id="gray"></div>John: 1',
+                                    '<b>June</b><br />      <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'June\')"></canvas>      <div id="red"></div>Jane: 1<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 2',
+                                    '<b>July</b><br />      <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'July\')"></canvas>      <div id="red"></div>Jane: 4<br /><div id="green"></div>Fred: 6<br /><div id="gray"></div>John: 6',
+                                    '<b>Aug</b><br />       <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'August\')"></canvas>    <div id="red"></div>Jane: 5<br /><div id="green"></div>Fred: 3<br /><div id="gray"></div>John: 5',
+                                    '<b>September</b><br /> <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'September\')"></canvas> <div id="red"></div>Jane: 2<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 8',
+                                    '<b>October</b><br />   <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'October\')"></canvas>   <div id="red"></div>Jane: 3<br /><div id="green"></div>Fred: 2<br /><div id="gray"></div>John: 4',
+                                    '<b>November</b><br />  <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'November\')"></canvas>  <div id="red"></div>Jane: 8<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 9',
+                                    '<b>December</b><br />  <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'December\')"></canvas>  <div id="red"></div>Jane: 8<br /><div id="green"></div>Fred: 1<br /><div id="gray"></div>John: 4',
+
+                                    '<b>January</b><br />   <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'January\')"></canvas>   <div id="red"></div>Jane: 1<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 4',
+                                    '<b>February</b><br />  <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'February\')"></canvas>  <div id="red"></div>Jane: 6<br /><div id="green"></div>Fred: 6<br /><div id="gray"></div>John: 5',
+                                    '<b>March</b><br />     <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'March\')"></canvas>     <div id="red"></div>Jane: 4<br /><div id="green"></div>Fred: 7<br /><div id="gray"></div>John: 3',
+                                    '<b>April</b><br />     <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'April\')"></canvas>     <div id="red"></div>Jane: 3<br /><div id="green"></div>Fred: 9<br /><div id="gray"></div>John: 4',
+                                    '<b>May</b><br />       <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'May\')"></canvas>       <div id="red"></div>Jane: 2<br /><div id="green"></div>Fred: 7<br /><div id="gray"></div>John: 1',
+                                    '<b>June</b><br />      <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'June\')"></canvas>      <div id="red"></div>Jane: 1<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 2',
+                                    '<b>July</b><br />      <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'July\')"></canvas>      <div id="red"></div>Jane: 4<br /><div id="green"></div>Fred: 6<br /><div id="gray"></div>John: 6',
+                                    '<b>August</b><br />    <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'August\')"></canvas>    <div id="red"></div>Jane: 5<br /><div id="green"></div>Fred: 3<br /><div id="gray"></div>John: 5',
+                                    '<b>September</b><br /> <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'September\')"></canvas> <div id="red"></div>Jane: 2<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 8',
+                                    '<b>October</b><br />   <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'October\')"></canvas>   <div id="red"></div>Jane: 3<br /><div id="green"></div>Fred: 2<br /><div id="gray"></div>John: 4',
+                                    '<b>November</b><br />  <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'November\')"></canvas>  <div id="red"></div>Jane: 8<br /><div id="green"></div>Fred: 5<br /><div id="gray"></div>John: 9',
+                                    '<b>December</b><br />  <canvas width="50" height="50" id="__tooltip_canvas__" style="float: right" onclick="enlarge_tooltip_graph(event, \'December\')"></canvas>  <div id="red"></div>Jane: 8<br /><div id="green"></div>Fred: 1<br /><div id="gray"></div>John: 4'
+                                   ]);
+        line.Set('chart.tooltips.highlight', false);
+        // No need to call Draw() - the bar chart will do it
+
+        // Add a Line chart tooltip event that draws the tooltip Pie charts
+        RGraph.AddCustomEventListener(line, 'ontooltip', CreateTooltipGraph);        
+        
+        
+        // Add the line chart to the bar chart
+        bar.Set('chart.line', line);
+        
+        // Draw the bar chart, which in turn draws the line chart for us
+        bar.Draw();
+            
+        /**
+        * This is the function that creates the tooltip charts
+        */
+        function CreateTooltipGraph (obj)
+        {
+            var index  = RGraph.Registry.Get('chart.tooltip').__index__;
+            var tooltip = obj.Get('chart.tooltips')[index];
+            
+            // Extract the data for the obj.Get('chart.tooltips')[index]ie chart froim the tooltip
+            var jane_data = Number(tooltip.replace(/.*Jane: (\d+).*/, '$1'));
+            var fred_data = Number(tooltip.replace(/.*Fred: (\d+).*/, '$1'));
+            var john_data = Number(tooltip.replace(/.*John: (\d+).*/, '$1'));
+            
+            var pie_data    = [jane_data,fred_data,john_data];
+
+            // This data could be dynamic
+            var pie  = new RGraph.Pie('__tooltip_canvas__', pie_data);
+            pie.Set('chart.gutter.top', 2);
+            pie.Set('chart.gutter.bottom', 2);
+            pie.Set('chart.gutter.left', 2);
+            pie.Set('chart.gutter.right', 2);
+            pie.Set('chart.colors', ['red','green','#ccc']);
+            pie.Set('chart.strokestyle', '#ffd');
+            pie.Set('chart.linewidth', 2);
+            pie.Draw();
+            
+            pie.canvas.style.cursor = 'pointer';
+        }
+    </script>
+
+    <p>
+        This is an example of combining Bar and Line charts. It's quite straight-forward, and the code here shows you how it can be achieved.
+    </p>
+    
+    <p>
+        If the values for the line and bar result in different Y scales you may need to specify the <i>chart.ymax</i> property for each chart
+        so that the scales are the same. The line turns off Y labels so as not to overwrite the Bars labels.
+    </p>
+    
+    <b>Tooltips</b>
+    
+    <p>
+        You can have tooltips on the Line chart by setting <i>chart.tooltips.highlighting</i> to <i>false</i>, like below.
+        The order in which you create the charts is also important, you must define the Bar chart first, and subsequently the Line
+        chart.
+    </p>
+    
+    <pre class="code">line.Set('chart.tooltips.highlighting', false);</pre>
+    
+    <p>
+        Because the tooltips are only triggered by the Line chart, you should put all of the information, for both the Line and the
+        Bar chart, in the tooltips.
+    </p>
+
+    <a name="combiningline"></a>
+    <h4>Combining Line charts</h4>
+
+    <!-- This is the canvas that both the line charts use -->
+    <canvas id="myCanvas2" width="600" height="250" style="float: right">[No canvas support]</canvas>
+    <script>
+        line2 = new RGraph.Line('myCanvas2', [51,22,23,33,35,23,32,45]);
+        line2.Set('chart.hmargin', 10);
+        line2.Set('chart.labels', ['Kiff', 'Wayne', 'Pete', 'Lou', 'Jake', 'Jo', 'Fred', 'Bob']);
+        line2.Set('chart.linewidth', 3);
+        line2.Set('chart.shadow', true);
+        line2.Set('chart.shadow.offsetx', 2);
+        line2.Set('chart.shadow.offsety', 2);
+        line2.Set('chart.ymax', 65);
+        line2.Set('chart.units.post', 'l');
+        line2.Set('chart.noxaxis', true);
+        line2.Set('chart.noendxtick', true);
+        line2.Set('chart.title', 'An example of axes both sides');
+        line2.Set('chart.gutter.right', 40);
+        line2.Draw();
+
+        line3 = new RGraph.Line('myCanvas2', [42,50,51,23,46,48,65,11]);
+        line3.Set('chart.hmargin', 10);
+        line3.Set('chart.linewidth', 3);
+        line3.Set('chart.shadow', true);
+        line3.Set('chart.shadow.offsetx', 2);
+        line3.Set('chart.shadow.offsety', 2);
+        line3.Set('chart.yaxispos', 'right');
+        line3.Set('chart.gutter.right', 40);
+        line3.Set('chart.noendxtick', true);
+        line3.Set('chart.background.grid', false);
+        line3.Set('chart.ymax', 100);
+        line3.Set('chart.colors', ['blue', 'red']);
+        line3.Set('chart.units.pre', '$');
+        line3.Set('chart.key', ['Cost', 'Volume']);
+        line3.Set('chart.key.background', 'rgba(255,255,255,0.8)');
+        line3.Draw();
+    </script>
+
+    <p>
+        Another type of chart you may want is a line chart with Y axes on both sides, as illustrated on the right. You should
+        be careful with this chart type as it can easily lead to confusion.
+    </p>
+    
+    <p>
+        This chart is made up from two line charts, one with the Y axis on the left and one on the right. The code that makes up
+        this chart is below.
+    </p>
+    
+    <p>
+         The only reason to combine line charts is to get Y axes on the left and right. If you simply want mutiple lines,
+         you can do this without combining any charts. <a href="../examples/line.html">See the line chart example page</a>
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function
+    {
+        line2 = new RGraph.Line('myCanvas2', [51,22,23,33,35,23,32,45]);
+        line2.Set('chart.hmargin', 10);
+        line2.Set('chart.labels', ['Kiff', 'Wayne', 'Pete', 'Lou', 'Jake', 'Jo', 'Fred', 'Bob']);
+        line2.Set('chart.linewidth', 3);
+        line2.Set('chart.shadow', true);
+        line2.Set('chart.shadow.offsetx', 2);
+        line2.Set('chart.shadow.offsety', 2);
+        line2.Set('chart.ymax', 65);
+        line2.Set('chart.units.post', 'l');
+        line2.Set('chart.noxaxis', true);
+        line2.Set('chart.noendxtick', true);
+        line2.Set('chart.title', 'An example of axes both sides');
+        line2.Draw();
+
+        line3 = new RGraph.Line('myCanvas2', [42,50,51,23,46,48,65,11]);
+        line3.Set('chart.hmargin', 10);
+        line3.Set('chart.linewidth', 3);
+        line3.Set('chart.shadow', true);
+        line3.Set('chart.shadow.offsetx', 2);
+        line3.Set('chart.shadow.offsety', 2);
+        line3.Set('chart.yaxispos', 'right');
+        line3.Set('chart.noendxtick', true);
+        line3.Set('chart.background.grid', false);
+        line3.Set('chart.ymax', 65);
+        line3.Set('chart.colors', ['blue', 'red']);
+        line3.Set('chart.units.pre', '$');
+        line3.Set('chart.key', ['Cost', 'Volume']);
+        line3.Set('chart.key.background', 'rgba(255,255,255,0.5)');
+        line3.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/context.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/context.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/context.html	(revision 225)
@@ -0,0 +1,363 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Context menus</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs context menus" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about context menus" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <!-- Contextmenu CSS classes -->
+    <style>
+        .RGraph_contextmenu {
+        }
+
+        .RGraph_contextmenu_background {
+        }
+
+        .RGraph_contextmenu_item {
+        }
+    </style>
+
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Context menus
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Context menus</h1>
+
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    
+    
+    <div style="text-align: center; float: right">
+        <canvas id="myCanvas" width="500" height="200">[No canvas support]</canvas><br />
+        <small>(<a href="#mac">some browsers use a double left click</a>)</small>
+    </div>
+    
+    <ul>
+        <li><a href="#what">What are context menus?</a></li>
+        <li><a href="#look">What do they look like?</a></li>
+        <li><a href="#multiple">Can I have multiple levels of menus?</a></li>
+        <li><a href="#define">How do I define context menus?</a></li>
+        <li><a href="#seperators">Can I have "separators"?</a></li>
+        <li><a href="#bypass">How do I bypass them?</a></li>
+        <li><a href="#getshape">How do I get the underlying shape that was clicked on?</a></li>
+        <li><a href="#use">What can I use them for?</a></li>
+        <li><a href="#mac">Context menus, Macs, Safari, Opera and MSIE 9</a></li>
+        <li><a href="#events">Related events</a></li>
+    </ul>
+
+    <a name="what"></a>
+    <br />&nbsp;<br />
+    <h3>What are context menus?</h3>
+
+    <p>
+        Context menus are what you see when you click your right mouse button. With RGraph, you can specify custom menus
+        for your charts if you wish. This way you can define custom actions to be associated with menu items. Context menus are a
+        very easy way to extend the functionality of your charts, allowing you to associate presentation style functionality
+        with them.
+    </p>
+    
+    <p>
+        <b>Important:</b> Opera does not allow you to customise the context menu, so with this browser you
+        should use the left mouse button on the chart, instead of the right.
+    </p>
+
+    <a name="look"></a>
+    <br />&nbsp;<br />
+    <h3>What do they look like?</h3>
+
+    <img src="../images/context.png" width="148" height="90" alt="An RGraph context menu" style="float: right; margin-right: 200px; border: 2px dashed gray; margin-right: 280px" />
+
+    <p>
+        Context menus look like the image on the right. You can of course customise their look by using stylesheets. The CSS classes
+        you need to use are <b>RGraph_contextmenu_background</b>, <b>RGraph_contextmenu</b> and <b>RGraph_contextmenu_item</b>. Eg:
+    </p>
+    
+    <br clear="all" />
+
+    <pre class="code">
+&lt;style type="text/css"&gt;
+    .RGraph_contextmenu {
+    }
+
+    .RGraph_contextmenu_item {
+    }
+
+    .RGraph_contextmenu_background {
+    }
+&lt;/style&gt;</pre>
+
+    <p>
+        The "! important" is not necessary if you're not overriding a style that is set by the chart script. If you're having trouble,
+        it's a good idea to use it though.
+    </p>
+
+    <a name="multiple"></a>
+    <br />&nbsp;<br />
+    <h3>Can I have multiple levels of menus?</h3>
+    
+    <p>
+        Yes, as of 24th April 2010 you can have a dual level context menu, which can reduce "option overload" in your user interface.
+        This example defines a simple context menu:
+    </p>
+    
+    <pre class="code">
+bar.Set('chart.contextmenu', [
+                              ['Zoom', RGraph.Zoom],
+                              ['Application', <span style="color: green">[['Login...', function () {ModalDialog.Show('modaldialog_login', 300);}]]</span> ],
+                              null,
+                              ['Cancel', function () {}]
+                             ]);
+</pre>
+    
+    <p>
+        As you can see there could easily get to be a lot of arrays, so it may help you during development to structure your code by using
+        indentation.
+    </p>
+
+    <a name="define"></a>
+    <br />&nbsp;<br />
+    <h3>How do I define context menus?</h3>
+    
+    <p>
+        Defining a context menu is quite a simple affair. Eg:
+    </p>
+    
+    <pre class="code">
+myBar.Set('chart.contextmenu', [
+                                ['Menu item 1', Callback1],
+                                ['Menu item 2', Callback2]
+                               ]);</pre>
+
+    <p>
+        As you can see, the value is a two dimension array. The second being an array consisting of a string which is used as the name of the
+        menu item, and a function object (NOT the function name as a string). The function object is the function called when the menu item is selected.
+    </p>
+
+    <a name="seperators"></a>
+    <br />&nbsp;<br />
+    <h3>Can I have "separators"?</h3>
+    
+    <p>
+        Yes. Simply pass null instead of an array as your menu item. Eg:
+    </p>
+
+    <pre class="code">
+myBar.Set('chart.contextmenu', [
+                                ['Menu item 1', Callback1],
+                                null,
+                                ['Menu item 2', Callback2]
+                               ]);</pre>
+
+    <a name="bypass"></a>
+    <br />&nbsp;<br />
+    <h3>How do I bypass them?</h3>
+    
+    <p>
+        If for any reason you wish to access the browsers own context menu, you can hold down your CTRL key on your keyboard when you
+        click, and the canvas context menu will be bypassed. Try it on the chart below by holding your CTRL key whilst right clicking.
+    </p>
+
+
+
+
+    <a name="getshape"></a>
+    <br />&nbsp;<br />
+
+    <canvas id="cvs" width="600" height="250" style="float: right">[No canvas support]</canvas>
+
+    <h3>How do I get the underlying shape that was clicked on?</h3>
+    
+    <p>
+        In some circumstances you may want to know which bar/point/segment was right-clicked on when showing the context menu (if any).
+        In these cases you will find the pertinent information (the same as what you get from the various .get*() methods) on the
+        context menu object - which is held in the registry: <i>RGraph.Registry.Get('chart.contextmenu').__shape__</i>. The example bar chart
+        shows it in action.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    function myListener (obj)
+    {
+        p(RGraph.Registry.Get('chart.contextmenu').__shape__)
+    }
+    RGraph.AddCustomEventListener(myBar, 'oncontextmenu', myListener);
+&lt;/script&gt;
+</pre>
+    
+
+    <a name="use"></a>
+    <br />&nbsp;<br />
+    <h3>What can I use them for?</h3>
+    
+    <p>
+        Since the context menu items run Javascript functions when selected, you can use them for pretty much
+        anything you want. For example you could make a presentation system, with the context menu controlling which
+        chart is shown on the canvas, like the example above.
+    </p>
+
+    <a name="mac"></a>
+    <br />&nbsp;<br />
+    <h3>Context menus, Macs, Safari, Opera and MSIE 9</h3>
+        <p>
+            Mac Safari, Mac Firefox, Windows Safari and MSIE 9 (beta 1) can have trouble displaying the context menu. So for this reason, for these browsers,
+            the context menu is attached to a double click of the left mouse button. Opera doesn't support customising the context menu so
+            this browser also uses a left mouse button double click to trigger the context menu.
+        </p>
+
+    <a name="events"></a>
+    <br />&nbsp;<br />
+    <h3>Related events</h3>
+        <p>
+            There are two context menu related events which you can utilise:
+        </p>
+        
+        <ul>
+            <li><i>onbeforecontextmenu</i></li>
+            <li><i>oncontextmenu</i></li>
+        </ul>
+        
+        <p>
+            As their names suggest, one fires before the contextmenu is shown, and one after. <b>Important:</b> Because of the
+            fading effect, it may seem that both events fire before the contextmenu is shown, however this is just due to the nature
+            of Javascript timers and the fact that alert()s will block them (pause them in effect).
+        </p>
+    
+    <script>
+        /**
+        * Shows the bar chart
+        */
+        function ShowGraphOne ()
+        {
+            RGraph.Clear(document.getElementById('myCanvas'));
+
+            var bar = new RGraph.Bar('myCanvas', [[45,15],[16,23],[52,12],[33,64],[34,54],[62,33],[66,23],[12,23],[12,53],[16,45],[26,43],[46,42],[41,41],[32,46]]);
+            bar.Set('chart.colors', ['#66f', '#f66']);
+            bar.Set('chart.title', 'Data represented on a bar chart (with context menu)');
+            bar.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th']);
+            bar.Set('chart.contextmenu', [['Zoom in', RGraph.Zoom], null, ['Chart', [['Bar chart', ShowGraphOne], ['Line chart', ShowGraphTwo]]], null, ['Cancel', function () {}]]);
+            bar.Set('chart.grouping', 'grouped');
+            bar.Set('chart.zoom.hdir', 'left');
+            bar.Set('chart.zoom.vdir', 'center');
+            bar.Draw();
+        }
+
+        /**
+        * Show the line chart
+        */
+        function ShowGraphTwo()
+        {
+            RGraph.Clear(document.getElementById('myCanvas'));
+
+            var line = new RGraph.Line('myCanvas', [15,23,12,64,54,33,23,23,53,45,43,42,41,46], [45,16,52,33,34,62,66,12,12,16,26,46,41,32]);
+            line.Set('chart.title', 'Data represented on a line chart (context menu)');
+            line.Set('chart.colors', ['#f66', '#66f']);
+            line.Set('chart.background.barcolor1', 'white');
+            line.Set('chart.background.barcolor2', 'white');
+            line.Set('chart.tickmarks', null);
+            line.Set('chart.linewidth', 3);
+            line.Set('chart.hmargin', 550 / 26);
+            line.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th']);
+
+            line.Set('chart.contextmenu', [['Zoom in', RGraph.Zoom], null, ['Chart', [['Bar chart', ShowGraphOne],['Line chart', ShowGraphTwo]]], null,['Cancel', function () {}]]);
+            line.Set('chart.zoom.hdir', 'left');
+            line.Set('chart.zoom.vdir', 'center');
+
+            line.Draw();
+        }
+        
+        /**
+        * Show the first chart
+        */
+        window.onload = function ()
+        {
+            ShowGraphOne();
+            
+            var myBar = new RGraph.Bar('cvs', [54,52,64,84,72,65]);
+            myBar.Set('chart.labels', ['Fred','Rich','Dave','John','Kev','Lou']);
+            myBar.Set('chart.title', 'A chart showing the context menu .__shape__ property (context)');
+            myBar.Set('chart.contextmenu', [['A sample context menu item', function () {}]]);
+            myBar.Draw();
+            
+            function myListener (obj)
+            {
+                p(RGraph.Registry.Get('chart.contextmenu').__shape__)
+            }
+            RGraph.AddCustomEventListener(myBar, 'oncontextmenu', myListener);
+        }
+
+    </script>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/css.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/css.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/css.html	(revision 225)
@@ -0,0 +1,262 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - available CSS classes</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs css classes" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about RGraph CSS classes" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A graph library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <style type="text/css">
+        li {
+            margin: 0 ! important;
+        }
+        
+        li a {
+            text-decoration: none;
+        }
+    </style>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Available CSS classes
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Available CSS classes</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        This is information about the CSS classes available to you to allow you to customise the appearance of tooltips and
+        context menus.
+    </p>
+    
+    <ul>
+        <li><a href="#RGraph_png">RGraph_png</a></li>
+        <li><a href="#RGraph_palette">RGraph_palette</a></li>
+        <li><a href="#RGraph_tooltip">RGraph_tooltip</a></li>
+        <li><a href="#RGraph_contextmenu">RGraph_contextmenu</a></li>
+        <li><a href="#RGraph_contextmenu_item">RGraph_contextmenu_item</a></li>
+        <li><a href="#RGraph_contextmenu_background">RGraph_contextmenu_background</a></li>
+        <li><a href="#RGraph_zoom_window">RGraph_zoom_window</a></li>
+        <li><a href="#RGraph_zoomed_canvas">RGraph_zoomed_canvas</a></li>
+        <li><a href="#RGraph_zoomed_area">RGraph_zoomed_area</a></li>
+        <li><a href="#ModalDialog_background">ModalDialog_background</a></li>
+        <li><a href="#ModalDialog_dialog">ModalDialog_dialog</a></li>
+        <li><a href="#ModalDialog_topbar">ModalDialog_topbar</a></li>
+        <li><a href="#example">An example usage</a></li>
+        <li><a href="#important">! important</a></li>
+    </ul>
+    
+    <a name="RGraph_png"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_png</h2>
+        <p>
+            This controls the appearance of the PNG image which is shown when you use the context menu option <i>RGraph.showPNG()</i>.
+        </p>
+    
+    <a name="RGraph_palette"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_palette</h2>
+        <p>
+            This controls the appearance of the mini-palette that can be used with annotating.
+        </p>
+    
+    <a name="RGraph_tooltip"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_tooltip</h2>
+        <p>
+            This controls the appearance of tooltips. The default is to have them look like Windows tooltips.
+        </p>
+
+    <a name="RGraph_contextmenu"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_contextmenu</h2>
+        <p>
+            This controls how context menus appear. The default is similar to the look that Windows XP has.
+        </p>
+
+    <a name="RGraph_contextmenu_item"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_contextmenu_item</h2>
+        <p>
+            This controls how individual items on the context menu will appear, for example the default has roughly 25px padding-left
+            to accomodate the left bar.
+        </p>
+
+    <a name="RGraph_contextmenu_background"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_contextmenu_background</h2>
+        <p>
+            This is the Windows XP style left vertical bar. By default this is light grey.
+        </p>
+    
+    <a name="RGraph_zoom_window"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_zoom_window</h2>
+        <p>
+            This is the class to use if you want to customise the mini-zoom window.
+        </p>
+    
+    <a name="RGraph_zoomed_canvas"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_zoomed_canvas</h2>
+        <p>
+            This is the class to use if you want to customise the full canvas zoom.
+        </p>
+    
+    <a name="RGraph_zoomed_area"></a>
+    <br />&nbsp;<br />
+    <h2>RGraph_zoomed_area</h2>
+        <p>
+            This is the class to use if you want to customise the zoomed area.
+        </p>
+    
+    <a name="ModalDialog_background"></a>
+    <br />&nbsp;<br />
+    <h2>ModalDialog_background</h2>
+        <p>
+            This class controls the dark semi-opaque background for the ModalDialog.
+        </p>
+    
+    <a name="ModalDialog_dialog"></a>
+    <br />&nbsp;<br />
+    <h2>ModalDialog_dialog</h2>
+        <p>
+            This class controls the ModalDialog itself.
+        </p>
+    
+    <a name="ModalDialog_topbar"></a>
+    <br />&nbsp;<br />
+    <h2>ModalDialog_topbar</h2>
+        <p>
+            This class controls the top bar for the ModalDialog. You could, for example, use the <i>display</i> CSS property to
+            hide this if you don't want it.
+        </p>
+    
+    <a name="example"></a>
+    <br />&nbsp;<br />
+    <h2>Example usage</h2>
+        <p>
+            Here is an example of using the CSS classes. At the time of writing, some of the items here were only implemented in newer
+            web browsers:
+        </p>
+
+        <pre class="code">
+&lt;style&gt;
+    .RGraph_png {
+    }
+
+    .RGraph_palette {
+    }
+
+    .RGraph_tooltip {
+    }
+    
+    .RGraph_contextmenu {
+    }
+    
+    .RGraph_contextmenu_background {
+    }
+    
+    .RGraph_contextmenu_item {
+    }
+    
+    .RGraph_zoom_window {
+    }
+    
+    .RGraph_zoomed_canvas {
+    }
+    
+    .RGraph_zoomed_area {
+    }
+    
+    .ModalDialog_background {
+    }
+    
+    .ModalDialog_dialog {
+    }
+    
+    .ModalDialog_topbar {
+    }
+&lt;/style&gt;
+</pre>
+
+<a name="important"></a>
+<br />&nbsp;<br />
+<h2>! important</h2>
+    
+    <p>
+        If you're attempting to override default styles, then because of the ordering (ie the script is setting the style  AFTER
+        your own CSS) you may need to use the "! important" modifier, for example:
+    </p>
+
+    <pre class="code">
+&lt;style&gt;
+    .RGraph_tooltip {
+        background-color: white ! important;
+    }
+&lt;/style&gt;
+</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/domcontentloaded.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/domcontentloaded.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/domcontentloaded.html	(revision 225)
@@ -0,0 +1,188 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - DOMContentLoaded event</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs domcontentloaded" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - DOMContentLoaded example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <meta name="keywords" content="rgraph chart html5 javascript canvas" />
+    <meta name="description" content="RGraph: Javascript charts and graph library Javascript charts and HTML5 canvas charts library" />
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    
+    <script>
+        window.onload = function ()
+        {
+            var duration = (new Date().getTime() - timer.getTime()) / 1000;
+            document.getElementById("waiting").innerHTML = '<span style="color: green">Done! Extra time taken: ' + duration.toFixed(1) + ' seconds</span>';
+            alert('The window.onload event fired, extra time taken: ' + duration.toFixed(1) + ' seconds');
+        }
+        
+        function myFunc ()
+        {
+            var line = new RGraph.Line('cvs', [4,3,2,4,5,6,7,4,8,9]);
+            line.Set('chart.labels', ['Dez', 'Fliss','Geoff','Hoolio','John','Rich','Kev','Charles','Lou','Bob']);
+            line.Set('chart.hmargin', 5);
+            line.Set('chart.title', 'A demonstration of the DOMContentLoaded event');
+            line.Set('chart.title.vpos', 0.5);
+            line.Set('chart.tickmarks', 'circle');
+            line.Set('chart.linewidth', 1.01);
+
+            if (navigator.userAgent.indexOf('Chrome/6') == -1) {
+                line.Set('chart.shadow', true);
+                line.Set('chart.shadow.offsetx', 0);
+                line.Set('chart.shadow.offsety', 0);
+                line.Set('chart.shadow.blur', 15);
+            }
+            line.Draw();
+        }
+    
+        /**
+        * Install the function to the appropriate event
+        */
+        if(window.addEventListener) {
+            window.addEventListener('DOMContentLoaded', myFunc, false);
+        } else {
+            document.attachEvent("onDOMContentLoaded", myFunc);
+        }
+        
+        // Create a timer to show the difference
+        timer = new Date();
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="index.html">Documentation</a>
+    >
+    DOMContentLoaded event
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - DOMContentLoaded example</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p id="waiting" style="; font-weight: bold; font-size: 16pt"><span style="color: #aa0">Waiting for onload event...</span></p>
+
+
+
+
+    <p style="background-color: #eee; border: 1px dashed gray; padding: 5px; height: 50px;">
+        <span style="display: inline-block; margin-left: 10px; float: right">
+            <script>
+                document.write('<img src="http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/whidbey.jpg?' + Math.random() + '" width="50" height="50" />&nbsp;');
+                document.write('<img src="http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/window.jpg?' + Math.random() + '" width="50" height="50" />&nbsp;');
+                document.write('<img src="http://ie.microsoft.com/testdrive/HTML5/DOMContentLoaded/whidbey2.jpg?' + Math.random() + '" width="50" height="50" />');
+            </script>
+        </span>
+
+        These images are here to pad the page and slow down loading so that the window.onload event is slowed. This makes the
+        difference far more visible.
+    </p>
+    
+    <canvas id="cvs" width="600" height="250" style="float: right">[No canvas support]</canvas>
+
+    <p>
+        The DOMContentLoaded event is an extremely useful event and can make a big impact on the performance of your pages, hence this
+        example. The DOMContentLoaded event fires when the pages HTML and scripts have loaded, but not necessarily any images or CSS.
+        This can make a big improvement on the apparent speed of your page(s).
+    </p>
+    
+    <p>
+        You can read more about the <i>DOMContentLoaded</i> event on the Mozilla site, <a href="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events" target="_blank">here</a>,
+        and the Microsoft site <a href="http://ie.microsoft.com/testdrive/HTML5/87DOMContent-Loaded/Default.html" target="_blank">here</a>.
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+function createGraph(func)
+{
+    if(window.addEventListener) {
+        window.addEventListener('DOMContentLoaded', func, false);
+    } else {
+        document.attachEvent("onDOMContentLoaded", func);
+    }
+}
+</pre>
+
+    <h4>Browser support</h4>
+    
+    <p>
+        The DOMContentLoaded event is supported by the following browsers:
+    </p>
+    
+    <ul>
+        <li>Google Chrome</li>
+        <li><a href="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events" target="_blank">Mozilla Firefox</a></li>
+        <li>Apple Safari</li>
+        <li>Opera ASA. Opera</li>
+        <li><a href="http://ie.microsoft.com/testdrive/HTML5/87DOMContent-Loaded/Default.html" target="_blank">Microsoft Internet Explorer 9</a></li>
+    </ul>
+    
+    <h4>See also</h4>
+    
+    You might also be interested in <a href="async.html">asynchronous</a> chart creation as an alternative.
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/donut.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/donut.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/donut.html	(revision 225)
@@ -0,0 +1,105 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - donut charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs donut charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Donut charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Donut charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Donut charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Donut charts were formerly separate charts, however it's now simply a variant of the Pie chart.
+    </p>
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [45,57,48,32];
+    
+        var donut = new RGraph.Pie('myDonut', data);
+        donut.Set('chart.labels', ['Jan', 'Ben', 'Mark', 'Lucy']);
+        donut.Set('chart.linewidth', 5);
+        donut.Set('chart.strokestyle', 'white');
+        donut.Set('chart.tooltips', ['Jan', 'Ben', 'Mark', 'Lucy']);
+        donut.Set('chart.variant', 'donut');
+        donut.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <ul>
+        <li><a href="../examples/donut.html">Donut chart examples</a></li>
+        <li><a href="pie.html">Pie chart documentation</a></li>
+    </ul>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/dynamic.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/dynamic.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/dynamic.html	(revision 225)
@@ -0,0 +1,224 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Updating your charts dynamically</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs dynamic" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Updating your charts dynamically" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="index.html">Documentation</a>
+    >
+    Updating your charts dynamically
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Updating your charts dynamically</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <canvas id="cvs" width="600" height="250" style="float: right">[No canvas support]</canvas>
+    <script>
+        window.onload = function (e)
+        {
+            d1 = [];
+            d2 = [];
+        
+            // Pre-pad the arrays with 100 null values
+            for (var i=0; i<100; ++i) {
+                d1.push(null);
+                d2.push(null);
+            }
+
+            function getGraph(id, d1, d2)
+            {
+                var graph = new RGraph.Line(id, d1, d2);
+                graph.Set('chart.xticks', 100);
+                graph.Set('chart.background.barcolor1', 'white');
+                graph.Set('chart.background.barcolor2', 'white');
+                graph.Set('chart.title.xaxis', 'Time >>>');
+                graph.Set('chart.title.yaxis', 'Bandwidth (MB/s)');
+                graph.Set('chart.title.vpos', 0.5);
+                graph.Set('chart.title', 'Bandwidth used by servers 1 and 2');
+                graph.Set('chart.filled', true);
+                graph.Set('chart.fillstyle', ['#daf1fa', '#faa']);
+                graph.Set('chart.colors', ['rgb(169, 222, 244)', 'red']);
+                graph.Set('chart.linewidth', 1);
+                //graph.Set('chart.ylabels.inside', true);
+                graph.Set('chart.yaxispos', 'right');
+                graph.Set('chart.ymax', 20);
+                graph.Set('chart.xticks', 25);
+    
+                return graph;
+            }
+        
+            function drawGraph ()
+            {
+                RGraph.Clear(document.getElementById("cvs"));
+                
+                var graph = getGraph('cvs', d1, d2);
+                graph.Draw();
+                
+                // Add some data to the data arrays
+                var r1 = RGraph.random(7, 9);
+                var r2 = RGraph.random(7, 10);
+
+                d1.push(r1);
+                d2.push(r2);
+                
+                if (d1.length > 100) {
+                    d1 = RGraph.array_shift(d1);
+                    d2 = RGraph.array_shift(d2);
+                }
+    
+                if (document.all && RGraph.isIE8()) {
+                    alert('[MSIE] Sorry, Internet Explorer 8 is not fast enough to support animated charts');
+                } else {
+                    setTimeout(drawGraph,25);
+                }
+            }
+        
+            drawGraph();
+        }
+    </script>
+    
+    <p>
+        The example on the right shows a  line chart that automatically updates itself every 15 milliseconds. An ideal
+        use for this could be showing a networks bandwidth usage, or a servers load value.
+    </p>
+    
+    <p>
+        This particular example shows a stacked line chart with two data series, though if you're showing load/stress values, a
+        non-filled chart might be a better choice.
+    </p>
+    
+    <p>
+        To get up-to-date data from your server you could simply have the page refresh itself, storing the data on the server,
+        or use <a href="index.html#ajax">AJAX</a> if you want the data stored client-side.
+    </p>
+    
+    <p>
+        Be careful of the data types you use to pass the data to RGraph - you should use numbers to represent values, not strings.
+    </p>
+
+    <br clear="all" />
+    
+    <pre class="code">
+&lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script&gt;
+    d1 = [];
+    d2 = [];
+    
+    // Pre-pad the arrays with 100 null values
+    for (var i=0; i&lt; 100; ++i) {
+        d1.push(null);
+        d2.push(null);
+    }
+
+    function getGraph(id, d1, d2)
+    {
+        var graph = new RGraph.Line(id, d1, d2);
+        graph.Set('chart.background.barcolor1', 'white');
+        graph.Set('chart.background.barcolor2', 'white');
+        graph.Set('chart.title.xaxis', 'Time');
+        graph.Set('chart.filled', true);
+        graph.Set('chart.fillstyle', ['#daf1fa', '#faa']);
+        graph.Set('chart.colors', ['rgb(169, 222, 244)', 'red']);
+        graph.Set('chart.linewidth', 3);
+        graph.Set('chart.ymax', 20);
+        graph.Set('chart.xticks', 25);
+
+        return graph;
+    }
+    
+    function drawGraph (e)
+    {
+        // Clear the canvas and redraw the chart
+        RGraph.Clear(document.getElementById("cvs"));
+        var graph = getGraph('cvs', d1, d2);
+        graph.Draw();
+        
+        // Add some data to the data arrays
+        d1.push(RGraph.random(5, 10));
+        d2.push(RGraph.random(5, 10));
+        
+        // Get rid of the first values of the arrays
+        if (d1.length > 100) {
+            d1 = RGraph.array_shift(d1);
+            d2 = RGraph.array_shift(d2);
+        }
+
+        setTimeout(drawGraph,25);
+    }
+    
+    drawGraph();
+&lt;/script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/events.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/events.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/events.html	(revision 225)
@@ -0,0 +1,546 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Custom RGraph events</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs custom events" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the custom RGraph events" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.modaldialog.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    
+    <script>
+        window.onload = function (e)
+        {
+            var bar1 = new RGraph.Bar('bar1', [1,2,3,5,9,7,8]);
+            bar1.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar1.Set('chart.tooltips', ['January','February','March','April','May','June','July']);
+            bar1.Set('chart.title', 'An example of the ontooltip event');
+            bar1.Draw();
+            RGraph.AddCustomEventListener(bar1, 'ontooltip', function (obj) {alert('ontooltip event, showing tooltip with index: ' + RGraph.Registry.Get('chart.tooltip').__index__);});
+
+
+            var bar2 = new RGraph.Bar('bar2', [1,2,3,5,9,7,8]);
+            bar2.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar2.Set('chart.contextmenu', [['Cancel', function () {}]]);
+            bar2.Set('chart.title', 'An example of the oncontextmenu event');
+            bar2.Draw();
+            RGraph.AddCustomEventListener(bar2, 'oncontextmenu', function (obj) {alert('oncontextmenu event fired');});
+
+
+            // Intentionally a global
+            bar3 = new RGraph.Bar('bar3', [1,2,3,5,9,7,8]);
+            bar3.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar3.Set('chart.title', 'An example of the onbeforedraw event');
+            // Drawn when the button is clicked            
+            RGraph.AddCustomEventListener(bar3, 'onbeforedraw', function (obj) {alert('onbeforedraw event fired');});
+
+
+            // Intentionally a global
+            bar4 = new RGraph.Bar('bar4', [1,2,3,5,9,7,8]);
+            bar4.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar4.Set('chart.title', 'An example of the ondraw event');
+            // Drawn when the button is clicked
+            RGraph.AddCustomEventListener(bar4, 'ondraw', function (obj) {alert('ondraw event fired');});
+
+
+            var bar5 = new RGraph.Bar('bar5', [1,2,3,5,9,7,8]);
+            bar5.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar5.Set('chart.title', 'An example of the onzoom event');
+            bar5.Set('chart.contextmenu', [['Zoom', RGraph.Zoom]]);
+            bar5.Set('chart.zoom.vdir', 'center');
+            bar5.Draw();
+            RGraph.AddCustomEventListener(bar5, 'onzoom', function (obj) {alert('onzoom event fired');});
+
+
+            var bar6 = new RGraph.Bar('bar6', [1,2,3,5,9,7,8]);
+            bar6.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar6.Set('chart.title', 'An example of the onmodaldialog event');
+            bar6.Set('chart.contextmenu', [['Show dialog', function () {ModalDialog.Show('modaldialog_login', 300);}]]);
+            bar6.Draw();
+            ModalDialog.AddCustomEventListener('onmodaldialog', function (obj) {alert('onmodaldialog event fired');});
+
+
+            var bar7 = new RGraph.Bar('bar7', [1,2,3,5,9,7,8]);
+            bar7.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar7.Set('chart.title', 'The onresizebeforedraw event');
+            bar7.Set('chart.text.angle', 45);
+            bar7.Set('chart.resizable', true);
+            bar7.Set('chart.gutter.bottom', 60);
+            bar7.Draw();
+            RGraph.AddCustomEventListener(bar7, 'onresizebeforedraw', function (obj)
+            {
+                alert('onresizebeforedraw event fired');
+            });
+
+
+            var bar8 = new RGraph.Bar('bar8', [1,2,3,5,9,7,8]);
+            bar8.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar8.Set('chart.title', 'An example of the onresize event');
+            bar8.Set('chart.resizable', true);
+            bar8.Draw();
+            
+            RGraph.AddCustomEventListener(bar8, 'onresizebegin', function (obj){cl('onresizebegin event fired');});
+            RGraph.AddCustomEventListener(bar8, 'onresize', function (obj){cl('onresize event fired');});
+            RGraph.AddCustomEventListener(bar8, 'onresizeend', function (obj){cl('onresizeend event fired');});
+
+
+            var bar9 = new RGraph.Bar('bar9', [1,2,3,5,9,7,8]);
+            bar9.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar9.Set('chart.title', 'An example of the onadjust event');
+            bar9.Set('chart.adjustable', true);
+            bar9.Draw();
+            
+            RGraph.AddCustomEventListener(bar9, 'onadjustbegin', function (obj){cl('The onadjuststart event fired');});
+            RGraph.AddCustomEventListener(bar9, 'onadjust', function (obj){cl('The onadjust event fired');});
+            RGraph.AddCustomEventListener(bar9, 'onadjustend', function (obj){cl('The onadjustend event fired');});
+
+
+            // Global on purpose
+            bar10 = new RGraph.Bar('bar10', [1,2,3,5,9,7,8]);
+            bar10.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar10.Set('chart.title', 'An example of the onannotate event');
+            bar10.Set('chart.annotatable', true);
+            bar10.Set('chart.contextmenu', [['ShowPalette', RGraph.Showpalette], ['Clear', function () {RGraph.Clear(bar10.canvas); bar10.Draw();}]]);
+            bar10.Draw();
+            
+            RGraph.AddCustomEventListener(bar10, 'onannotatebegin', function (obj){cl('onannotatebegin event fired');});
+            RGraph.AddCustomEventListener(bar10, 'onannotate', function (obj){cl('onannotate event fired');});
+            RGraph.AddCustomEventListener(bar10, 'onannotateend', function (obj){cl('onannotateend event fired');});
+            RGraph.AddCustomEventListener(bar10, 'onannotatecolor', function (obj) {cl('Changed annotate color: ' + obj.Get('chart.annotate.color'));});
+            RGraph.AddCustomEventListener(bar10, 'onannotateclear', function (obj) {cl('Fired the annotation clear event');});
+
+
+            // Global on purpose
+            var bar11 = new RGraph.Bar('bar11', [1,2,3,5,9,7,8]);
+            bar11.Set('chart.labels', ['January','February','March','April','May','June','July']);
+            bar11.Set('chart.title', 'The onbeforecontextmenu event');
+            bar11.Set('chart.contextmenu', [['A sample context menu item', null]]);
+            bar11.Draw();
+            
+            RGraph.AddCustomEventListener(bar11, 'onbeforecontextmenu', function (obj) {p('Fired the onbeforecontextmenu event)');});
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Custom RGraph events
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Custom RGraph events</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <ul>
+        <li><a href="#introduction">Introduction</a></li>
+        <li>
+            <a href="#available.events">Available events</a>
+            <ul>
+                <li><a href="#event.ontooltip">ontooltip</a></li>
+                <li><a href="#event.onbeforecontextmenu">oncontextmenu</a></li>
+                <li><a href="#event.oncontextmenu">oncontextmenu</a></li>
+                <li><a href="#event.onbeforedraw">onbeforedraw</a></li>
+                <li><a href="#event.ondraw">ondraw</a></li>
+                <li><a href="#event.onzoom">onzoom</a></li>
+                <li><a href="#event.onmodaldialog">onmodaldialog</a></li>
+                <li><a href="#event.onresizebeforedraw">onresizebeforedraw</a></li>
+                <li><a href="#event.onresize">onresizebegin</a></li>
+                <li><a href="#event.onresize">onresize</a></li>
+                <li><a href="#event.onresize">onresizeend</a></li>
+                <li><a href="#event.onadjustbegin">onadjustbegin</a></li>
+                <li><a href="#event.onadjustbegin">onadjust</a></li>
+                <li><a href="#event.onadjustbegin">onadjustend</a></li>
+                <li><a href="#event.onannotatebegin">onannotatebegin</a></li>
+                <li><a href="#event.onannotatebegin">onannotate</a></li>
+                <li><a href="#event.onannotatebegin">onannotateend</a></li>
+                <li><a href="#event.onannotatebegin">onannotatecolor</a></li>
+                <li><a href="#event.onannotatebegin">onannotateclear</a></li>
+                <li><a href="#event.onclear">onclear</a></li>
+            </ul>
+        </li>
+        <li><a href="#removing.events">Removing events</a></li>
+    </ul>
+    
+    <a name="introduction"></a>
+    <h4>Introduction</h4>
+    
+    <p>
+        Custom events allow you to easily interact with and extend RGraph for your own purposes. The list of available events is below,
+        as is an example of how to make use of them with the <i>RGraph.AddCustomEventListener()</i> function. Event handler functions (ie your
+        functions) are passed a single parameter - the chart object. With this you can get references to the canvas and context. There's
+        an example of this below.
+    </p>
+
+<pre class="code">&lt;script&gt;
+    window.onload = function ()
+    {
+        var line = new RGraph.Line('myLine', [45,12,16,18,44,54,23,21,56]);
+        line.Set('chart.tooltips', ['Fred', 'Barney', 'Jay', 'Pete', 'Frank', 'Bob', 'Ted', 'Lou', 'Kev']);
+        line.Set('chart.labels', ['Fred', 'Barney', 'Jay', 'Pete', 'Frank', 'Bob', 'Ted', 'Lou', 'Kev']);
+        line.Set('chart.hmargin', 5);
+        line.Set('chart.tickmarks', 'dot');
+        line.Draw();
+
+        <span style="color: green">/**
+        * This is the call to the RGraph function that registers the event listener
+        * 
+        *      line: The chart object
+        * ontooltip: The name of the event
+        *    myFunc: The function that handles the event
+        */</span>
+        RGraph.AddCustomEventListener(line, 'ontooltip', myFunc);
+    }
+
+    <span style="color: green">/**
+    * The function that is called when the ontooltip event fires. It is  passed a single parameter - the chart object.
+    * With this you can get the ID and references to the canvas and context:
+    *  o obj.id
+    *  o obj.canvas
+    *  o obj.context
+    */</span>
+    function myFunc(obj)
+    {
+        var id      = obj.id;
+        var canvas  = obj.canvas;
+        var context = obj.context;
+
+        alert('This alert was triggered by the custom ontooltip event');
+    }
+&lt;/script&gt;
+</pre>
+    
+    <a name="available.events"></a>
+    <h4>Available events</h4>
+
+    <p>
+        <a name="event.ontooltip"></a>
+        <canvas id="bar1" width="400" height="150" style="float: left">[No canvas support]</canvas>
+        <b>ontooltip</b><br />
+        This event fires immediately after a tooltip has been created. This event allows you to easily show charts in your tooltips (tooltip
+        effects that involve moving the tooltip, eg. <i>contract</i>, <i>expand</i> &amp; <i>snap</i>, will not function). You
+        can find the tooltip object in the RGraph registry - <i>RGraph.Registry.Get('chart.tooltip')</i>. Note that if you're testing and
+        using a function that pauses execution (eg alert()), this will also pause any timers (for animation effects etc). If you want to
+        avoid this you should use a function that doesn't block execution, eg the Firebug/WebKit function, <i>console.log()</i> (you can use the
+        <i>cl()</i> shortcut in RGraph).
+    </p>
+    
+    <br clear="all" />
+    
+    <p>
+        <a name="event.onbeforecontextmenu"></a>
+        <canvas id="bar11" width="400" height="200" style="float: left">[No canvas support]</canvas>
+        <b>onbeforecontextmenu</b><br />
+        The onbeforecontextmenu event fires before the context menu is shown.
+    </p>
+
+    <br clear="all" />
+
+    <p>
+        <a name="event.oncontextmenu"></a>
+        <canvas id="bar2" width="400" height="150" style="float: left">[No canvas support]</canvas>
+        <b>oncontextmenu</b><br />
+        This event fires immediately after the RGraph context menu is shown. If you want it, you can get at the context menu in the
+        RGraph registry: <i>RGraph.Registry.Get('chart.contextmenu')</i>
+
+        <br /><br />
+
+        <b>Important:</b> Like the <i>ontooltip</i> event, using <i>alert()</i> can
+        pause the fade in timers, so you might consider using the Firebug/Webkit <i>console.log</i> functions instead.
+    </p>
+
+    <br clear="all" />
+
+    <p>
+        <a name="event.onbeforedraw"></a>
+        <div style="float: left">
+            <canvas id="bar3" width="400" height="150" style="left">[No canvas support]</canvas><br />
+            <button onmousedown="bar3.Draw()" style="width: 400px">Draw chart</button>
+        </div>
+        
+        <b>onbeforedraw</b><br />
+        Much like the ondraw event, however this fires at the start of the .Draw() method, in effect "before" the method. Keep in mind
+        that since other charts may trigger the .Draw() method, this event can also be triggered by other charts.
+    </p>
+
+    <br clear="all" />
+
+    <p>
+        <a name="event.ondraw"></a>
+        <div style="float: left">
+            <canvas id="bar4" width="400" height="150" style="left">[No canvas support]</canvas><br />
+            <button onmousedown="bar4.Draw()" style="width: 400px">Draw chart</button>
+        </div>
+        <b>ondraw</b><br />
+        The ondraw event fires <i>after</i> the .Draw() method has run. Note that the interactive features of RGraph may call the .Draw()
+        method multiple times - the zoom in area mode is a prime example.
+        A chart with tooltips is also an example. In this case it would demonstrate that the .Draw() method is called twice (and
+        hence the ondraw event), whereas the ontooltip event only fires once.
+        
+        <br /><br />
+
+        <b>Note:</b> The <i>ondraw</i> event is not only fired by its own chart,
+        but (if you're using tooltips for example), can also be fired by other charts on the page.
+    </p>
+    
+    <br clear="all" />
+
+    <p>
+        <a name="event.onzoom"></a>
+        <canvas id="bar5" width="400" height="150" style="float: left">[No canvas support]</canvas>
+        <b>onzoom</b><br />
+        The onzoom event fires whenever the canvas is zoomed. When the zoom is in <i>area</i> and <i>canvas</i> modes this fires once,
+        but when in <i>thumbnail</i> mode this event is like the onmousemove event in that it fires whenever the mouse is moved.
+    </p>
+
+    <br clear="all" />
+
+    <p>
+        <a name="event.onmodaldialog"></a>
+        <canvas id="bar6" width="400" height="150" style="float: left">[No canvas support]</canvas>
+        <b>onmodaldialog</b><br />
+        The onmodaldialog event fires when the ModalDialog is shown. This event is easily replicated yourself, though using this event
+        may help you to keep your code tidy. This event is utilised slightly differently to the other events:
+        
+        <br clear="all" />
+
+        <pre class="code">ModalDialog.AddCustomEventListener('onmodaldialog', function () {alert('Hello world!');});</pre>
+    </p>
+    
+    <br clear="all" />
+
+    <p>
+        <a name="event.onresizebeforedraw"></a>
+        <canvas id="bar7" width="400" height="200" style="float: left">[No canvas support]</canvas>
+        <b>onresizebeforedraw</b><br />
+        The onresizebeforedraw event was added when translating was necessary to reclaim wasted space, before the introduction
+        of independent gutters. This event is now no longer necessary to reposition the resize handle. It will still have an
+        effect though, so if you choose to upgrade then you should remove this from your configuration. The event isn't
+        planned to be removed, so if you wish to use it, you can.
+    </p>
+    
+    <br clear="all" />
+    
+    <p style="background-color: #ffa; border: 2px dashed #990; padding: 4px">
+        <b>Note:</b>
+        The annotation events send notifications to the console because using alert() would cause them to lock the window.
+    </p>
+
+    <p>
+        <a name="event.onresize"></a>
+        <canvas id="bar8" width="400" height="150" style="float: left">[No canvas support]</canvas>
+        <b>onresizebegin</b><br />
+        The onresizebegin event fires when a canvas is starting to be resized. It also fires when the canvas is reset to the original
+        size.<br /><br />
+        
+        <b>onresize</b><br />
+        The onresize event fires when a canvas is resized. It also fires when the canvas is reset to the original size.<br /><br />
+        
+        <b>onresizeend</b><br />
+        The onresizeend event fires when a canvas is ended resizing. It also fires when the canvas is reset to the original size.
+    </p>
+    
+    <br clear="all" />
+
+    <p style="background-color: #ffa; border: 2px dashed #990; padding: 4px">
+        <b>Note:</b>
+        The adjusting events send notifications to the console because using alert() would cause them to lock the window.
+    </p>
+    
+    <p>
+        <a name="event.onadjustbegin"></a>
+        <canvas id="bar9" width="400" height="200" style="float: left">[No canvas support]</canvas>
+        <b>onadjustbegin</b><br />
+        The onadjustbegin event fires once at the start of an adjusting process. It can be thought of as similar to
+        the onmousedown event as that's when it usually fires.
+    </p>
+    
+    <br />
+
+    <p>
+        <a name="event.onadjust"></a>
+        <b>onadjust</b><br />
+        The onadjust event fires whenever one of the supported chart types is adjusted. It usually fires in conjunction with the
+        onmousemove event, and can be blocked by alert(). You therefore may need to use a different function (eg console.log())
+        whilst debugging.
+    </p>
+    
+    <br />
+    
+    <p>
+        <a name="event.onadjustend"></a>
+        <b>onadjustend</b><br />
+        The onadjustend event fires once at the end of an adjusting process. It can be thought of as similar to
+        the onmouseup event as that's when it usually fires.
+    </p>
+
+    <br clear="all" />
+    
+    <p style="background-color: #ffa; border: 2px dashed #990; padding: 4px">
+        <b>Note:</b>
+        The annotation events send notifications to the console because using alert() would cause them to lock the window.
+    </p>
+
+    <p>
+        <a name="event.onannotatebegin"></a>
+        <canvas id="bar10" width="400" height="350" style="float: left">[No canvas support]</canvas>
+        <b>onannotatebegin</b><br />
+        The onannotatebegin event fires at the beginning of the annotating procedure (ie in a similar vein to the onmousedown event).
+    </p>
+
+    <p>
+        <a name="event.onannotate"></a>
+        <b>onannotate</b><br />
+        The onannotate event fires when the chart has been annotated. It fires during the annotate procedure.
+    </p>
+
+    <p>
+        <a name="event.onannotateend"></a>
+        <b>onannotateend</b><br />
+        The onannotateend event fires at the end of the annotating procedure (ie in a similar vein to the onmouseup event).
+    </p>
+
+    <p>
+        <a name="event.onannotatecolor"></a>
+        <b>onannotatecolor</b><br />
+        The onannotatecolor event fires when the annotation color has been changed using the RGraph palette.
+    </p>
+
+    <p>
+        <a name="event.onannotateclear"></a>
+        <b>onannotateclear</b><br />
+        The onannotateclear event fires when the RGraph annotation data has been cleared using the RGraph.ClearAnnotations() API
+        function.
+    </p>
+
+    <p>
+        <a name="event.onclear"></a>
+        <b>onclear</b><br />
+        The onclear event fires when the function <i>RGraph.Clear()</i> is called. If you use the <i>.Clear()</i>function inside the onclear event
+        handler, it will create a loop. Instead, you could use this function:
+    </p>
+    
+    <pre class="code">
+/**
+* This function clears the canvas
+* 
+* @param object obj The chart object
+*/
+function myClear(obj)
+{
+    obj.context.beginPath();
+    obj.context.fillStyle = 'white';
+    obj.context.fillRect(-10,-10,obj.canvas.width + 20, obj.canvas.height + 20);
+    obj.context.fill();
+}
+</pre>
+    
+    
+    <a name="removing.events"></a>
+    <h4>Removing events</h4>
+        <p>
+            In the case that you need to remove RGraph event listeners, there are a few ways that you can do it. The API function
+            <i>RGraph.RemoveCustomEventListener(obj, id)</i> can be used to remove a single event listener. This function
+            takes the chart object and the numerical ID (returned by <i>RGraph.AddCustomEventListener()</i>) as its arguments.
+            
+            <p />
+
+            There's
+            also the <i>RGraph.RemoveAllCustomEventListeners()</i>, for easily removing all of the pertinent event listeners. This
+            function can either take no arguments at all, in which case ALL event listeners for ALL objects are removed. Or it can
+            also take an objects ID (the same id that you pass to the constructor), in which case the removal will be limited to
+            that object.
+        </p>
+
+    <!-- Login dialog -->
+    <div style="display: none" class="ModalDialog" id="modaldialog_login">
+        
+        <b>Login to admin area</b><br /><br />
+
+        <table border="0">
+            <tr>
+                <td align="right">Email:</td>
+                <td><input type="text" name="email" /></td>
+            </tr>
+            <tr>
+                <td align="right">Password:</td>
+                <td><input type="password" name="password" /></td>
+            </tr>
+            
+            <tr>
+                <td>&nbsp;</td>
+                <td align="right"><input type="submit" value="Login &raquo;" /></td>
+            </tr>
+        </table>
+
+        <div style="font-size: 8pt; float: right"><a href="" onclick="ModalDialog.Hide(); return false">Dismiss</a></div>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/external.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/external.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/external.html	(revision 225)
@@ -0,0 +1,349 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Integrating RGraph with external libraries</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs external libraries" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about integrating RGraph with external libraries" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.modaldialog.js" ></script>
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            /**
+            * Draw the line chart
+            */
+            var line = new RGraph.Line('myLine', [45,12,16,18,44,54,23,21,56,58,33,47]);
+            line.Set('chart.background.barcolor1', 'white');
+            line.Set('chart.background.barcolor2', 'white');
+            line.Set('chart.tickmarks', null);
+            line.Set('chart.hmargin', 10);
+            line.Set('chart.linewidth', 3);
+            line.Set('chart.shadow', true);
+            line.Set('chart.shadow.offset', 2);
+            line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            line.Set('chart.title', 'A line chart with context menu');
+
+            // This defines a context menu which shows the dialog. The commented out
+            // bit defines an onclick handler on the background, so that when you
+            // click it (the background), the dialog is hidden.
+            line.Set('chart.contextmenu', [ 
+                                           ['Login to admin area...', function () {ModalDialog.Show('myDialog', 300);/*ModalDialog.background.onclick = function () {ModalDialog.Close();};*/}],
+                                           null,
+                                           ['Cancel', function () {}]
+                                          ]);
+
+            line.Draw();
+        }
+    </script>
+
+
+    <style>
+        /*
+        * These are the CSS classes that you can use to customise the appearance of the ModalDialog. If you're trying to
+        * override something which the scripts set, then because of the ordering you may need to use the "! important"
+        * modifier.
+        */
+        .ModalDialog_background {
+        }
+
+        .ModalDialog_dialog {
+            -webkit-box-shadow: gray 0 0 15px ! important;
+            -moz-box-shadow: 0 0 15px gray ! important;
+            box-shadow: 0 0 15px gray ! important;
+        }
+
+        .ModalDialog_topbar {
+        }
+    </style>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Integrating RGraph with external libraries
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Integrating RGraph with external libraries</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <ul>
+        <li><a href="#msie">Note about Microsoft Internet Explorer and the ModalDialog</a></li>
+        <li><a href="#hiding">Hiding the ModalDialog</a></li>
+        <li><a href="#customising">Customising the ModalDialog</a></li>
+        <li><a href="#integration">ModalDialog integration</a></li>
+        <li><a href="#covering">Covering the scroll bars</a></li>
+    </ul>
+
+    <canvas id="myLine" width="400" height="200" style="float: right">[No canvas support]</canvas>
+
+    <p>
+        This page shows you how you can easily integrate the charts with other external Javascript libraries. This particular example
+        adds a context menu to the chart, of which the only option is to show a login dialog. This could, for example, be used to
+        allow logging in to an admin area.
+    </p>
+    
+    <p>
+        The dialog doesn't need to require user input - it could just be a static "Please wait..." type dialog, which is shown while a
+        subsequent page loads that takes a few seconds.
+    </p>
+        
+    <p>
+        The ModalDialog was originally an external library, however it's now part of the RGraph package. It's also covered by the
+        RGraph license - so if you have an <a href="licensing.html">RGraph license</a>, then the ModalDialog is part of that.
+    </p>
+
+    <br /><br />
+
+    <pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;
+&lt;script src="RGraph.common.context.js"&gt;
+&lt;script src="RGraph.line.js"&gt;
+&lt;script src="RGraph.modaldialog.js"&gt;
+
+&lt;script&gt;
+    window.onload = function ()
+    {
+        /**
+        * Draw the line chart
+        */
+        var line = new RGraph.Line('myLine', [45,12,16,18,44,54,23,21,56,58,33,47]);
+        line.Set('chart.background.barcolor1', 'white');
+        line.Set('chart.background.barcolor2', 'white');
+        line.Set('chart.tickmarks', null);
+        line.Set('chart.hmargin', 10);
+        line.Set('chart.linewidth', 3);
+        line.Set('chart.shadow', true);
+        line.Set('chart.shadow.offset', 2);
+        line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        line.Set('chart.title', 'A line chart with context menu');
+        <span style="color: green">
+        // This defines a context menu which calls the given function. This function in turn shows the dialog
+        line.Set('chart.contextmenu', [['Login to admin area...', function () {ModalDialog.Show('myDialog', 300);}}]]);
+        </span>
+        line.Draw();
+    }
+&lt;/script&gt;
+
+&lt;!-- This is the popup dialog--&gt;
+    &lt;div id="myDialog" class="modalDialog" style="display: none"&gt;
+        &lt;b&gt;Please login&lt;/b&gt;
+        &lt;p&gt;
+            &lt;table border="0"&gt;
+                &lt;tr&gt;
+                    &lt;td align="right" style="padding-top: 4px"&gt;Email&lt;/td&gt;
+                    &lt;td&gt;&lt;input type="text" size="20" name="email" style="width: 150px" />&lt;/td&gt;
+                &lt;/tr&gt;
+                &lt;tr&gt;
+                    &lt;td align="right" style="padding-top: 4px"&gt;Password&lt;/td&gt;
+                    &lt;td&gt;&lt;input type="password" size="20" name="password" style="width: 150px" /&gt;&lt;/td&gt;
+                &lt;/tr&gt;
+                &lt;tr&gt;
+                    &lt;td colspan="2" align="right"&gt;
+                        &lt;input type="reset" value="Cancel" onclick="ModalDialog.Close()"&gt;
+                        &lt;input type="submit"
+                                  name="submit"
+                                  value="Login &raquo;"
+                                  onclick="alert('This is just an example'); event.stopPropagation()"&gt;
+                    &lt;/td&gt;
+                &lt;/tr&gt;
+            &lt;/table&gt;
+        &lt;/p&gt;
+    &lt;/div&gt;
+&lt;!-- End of dialog --&gt;</pre>
+
+    <p>
+        If you're interested in using this modal dialog, then you'll probably also want the CSS that styles it. This can be found in the
+        &quot;css&quot; directory.
+    </p>
+
+    <a name="msie"></a>
+    <h3>Note about Microsoft Internet Explorer 8 and the ModalDialog</h3>
+    
+    <p>
+        Microsoft Internet Explorer 8 only supports fixed positioning in strict rendering mode, therefore you must specify a DTD
+        when using this browser. Eg:
+    </p>
+    
+    <pre class="code">
+&lt;!DOCTYPE html &gt;
+</pre>
+
+    <a name="hiding"></a>
+    <h3>Hiding the ModalDialog</h3>
+    <p>
+        To hide the ModalDialog (from a "Cancel" button for example), you can use the Close() method:
+    </p>
+    
+    <pre class="code">
+&lt;input type="reset" value="Cancel" onclick="ModalDialog.Close()"&gt;
+</pre>
+
+    <a name="customising"></a>
+    <h3>Customising the ModalDialog</h3>
+        <p>
+            You can customise the appearance of the ModalDialog by using three CSS classes, which are documented <a href="css.html">here</a>.
+            This page customises the dialog slightly by changing the shadow X/Y offsets:
+        </p>
+        
+        <pre class="code">
+&lt;style&gt;
+    /*
+    * These are the CSS classes that you can use to customise the appearance of the ModalDialog. If you're trying to
+    * override something which the scripts set, then because of the ordering you may need to use the "! important"
+    * modifier.
+    */
+    
+    /**
+    * This is the semi-opaque background
+    */
+    .ModalDialog_background {
+    }
+
+
+    /**
+    * This is the dialog itself
+    */
+    .ModalDialog_dialog {
+        -webkit-box-shadow: gray 0 0 15px ! important;
+        -moz-box-shadow: 0 0 15px gray ! important;
+        box-shadow: 0 0 15px gray ! important;
+    }
+
+
+    /**
+    * This is gray bar at the top of the dialog
+    */
+    .ModalDialog_topbar {
+    }
+&lt;/style&gt;
+</pre>
+
+    <a name="integration"></a>
+    <h3>ModalDialog integration</h3>
+        <p>
+            To integrate the ModalDialog look at the sample code above (the key line is where the context menu is defined). The method you should call is <b>ModalDialog.Show(id, width)</b>.
+            The <i>id</i> is the <i>id</i> of the layer to use. Only the <i>.innerHTML</i> is used, not the layer itself, so it can be hidden by
+            setting the display CSS <i>display</i> property to <i>none</i>. The <i>width</i> is a number which is used as the width of the dialog.
+        </p>
+        
+        <p>
+            The only library needed for the ModalDialog to work is <i>RGraph.modaldialog.js</i> - you do not need to use
+            <i>RGraph.common.js</i>. This makes for far smaller download requirements.
+        </p>
+
+    <a name="covering"></a>
+    <h3>Covering the scroll bars</h3>
+        <p>
+            Normally, a regular DIV lives inside the browser and cannot cover the scroll bars. There is however a way to achieve
+            this but it does mean that restructuring your website may be necessary, and it's done by using an IFRAME. The following
+            steps are involved:
+        </p>
+        
+        <ol>
+            <li style="margin-top: 0">The index page of your website creates an IFRAME and sets it to cover the entire window.</li>
+            <li style="margin-top: 0">This IFRAME then loads the website.</li>
+            <li style="margin-top: 0">The DIV then covers the top-most window.</li></li>
+        </ol>
+        
+        <p style="margin-bottom: 50px">
+            There is an example of this technique <a href="iframe-setup.html"><b>here</b></a>
+        </p>
+
+    <!-- This is the popup dialog-->
+
+        <div id="myDialog" class="modalDialog" style="display: none">
+
+            <b>Please login</b>
+            <p>
+                <table border="0">
+                    <tr>
+                        <td align="right" style="padding-top: 4px">Email</td>
+                        <td><input type="text" size="20" name="email" style="width: 150px" /></td>
+                    </tr>
+
+                    <tr>
+                        <td align="right" style="padding-top: 4px">Password</td>
+                        <td><input type="password" size="20" name="password" style="width: 150px" /></td>
+                    </tr>
+                    
+                    <tr>
+                        <td colspan="2" align="right">
+                            <input type="reset" value="Cancel" onclick="ModalDialog.Close()">
+                            <input type="submit" name="submit" value="Login &raquo;" onclick="alert('This is just an example'); event.stopPropagation()">
+                        </td>
+                    </tr>
+                </table>
+            </p>
+        </div>
+
+    <!-- End of dialog -->
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/funnel.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/funnel.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/funnel.html	(revision 225)
@@ -0,0 +1,385 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - funnel charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs funnel charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Funnel charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Funnel charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Funnel charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        These are funnel charts. It can be used to illustrate stages of a sales or order fulfillment process, and in doing so highlight
+        any bottlenecks or steps where large amounts of customers are lost.
+    </p>
+    
+    <p> 
+        The example file is <a href="../examples/funnel.html">here</a>.
+    </p> 
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var funnel = new RGraph.Funnel('funnel1', [100,45,45,26,21,5]);
+        funnel.Set('chart.text.boxed', false);
+        funnel.Set('chart.title', 'Leads through to sales');
+        funnel.Set('chart.labels', ['A', 'B', 'C', 'D', 'E', 'F']);
+        funnel.Set('chart.shadow', true);
+        funnel.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the Funnel chart appears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myFunnel.Set('name', 'value');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#misc">Miscellaneous</a></li>
+    </ul>
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.colors"></a>
+<b>chart.colors</b><br />
+            These are the colors used for each segment.<br /><i>Default: ['red', 'green', 'gray', 'blue', 'black', 'white']</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            An array of the labels to be used on the chart. <br /><i>Default: An empty array</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.boxed"></a>
+<b>chart.text.boxed</b><br />
+            Whether the text is contained within a white bounding box. In some cases this can help readability.<br /><i>Default: true</i><br /><br />
+            <a name="chart.text.halign"></a>
+<b>chart.text.halign</b><br />
+            The horizontal alignment of the text. Can be <i>center</i> or <i>left</i>.<br /><i>Default: left</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the chart, if any. <br /><i>Default: null</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether a drop shadow is applied to the Funnel chart. The funnel is the first to use the canvas shadow API, and as such they won't be supported on all browsers. Currently only Safari 4+ (possibly earlier versions too), Firefox 3.5+ and Chrome 2+ support canvas shadows.<br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the drop shadow.<br /><i>Default: #666</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the shadow.<br /><i>Default: 3</i><br /><br />
+
+            <a name="interactive features"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+            
+            <a name="chart.contextmenu"></a>
+            <b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            
+            <a name="chart.tooltips"></a>
+            <b>chart.tooltips</b><br />
+            An array of tooltips for the Funnel chart segments.<br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.tooltips.effect"></a>
+            <b>chart.tooltips.effect</b><br />
+            The animated effect that tooltips use - <i>fade</i> or <i>expand</i><br /><i>Default: fade</i><br /><br />
+            
+            <a name="chart.tooltips.css.class"></a>
+            <b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            
+            <a name="chart.tooltips.override"></a>
+            <b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+            
+            
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+
+            <a name="misc"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+
+            <a name="chart.highlight.stroke"></a>
+            <b>chart.highlight.stroke</b><br />
+            If you use tooltips, this controls the colour of the highlight stroke.<br />
+            <i>Default: black</i><br /><br />
+            
+            <a name="chart.highlight.fill"></a>
+            <b>chart.highlight.fill</b><br />
+            If you use tooltips, this controls the colour of the highlight fill.<br />
+            <i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+</div><br /><br />
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/gantt.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/gantt.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/gantt.html	(revision 225)
@@ -0,0 +1,444 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - gantt charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs gantt charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Gantt charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Gantt charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Gantt charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Gantt charts can be used to easily represent schedule information, making visualising this information far more straightfoward.
+    </p>
+
+    <ul>
+        <li><a href="#events">Adding events to your Gantt charts</a></li>
+        <li><a href="#vbars">Adding vertical bars to your Gantt charts</a></li>
+    </ul>
+
+    <h2>Example</h2>
+    
+    <p> 
+        The example file is <a href="../examples/gantt.html">here</a>.
+    </p> 
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var gantt = new RGraph.Gantt('gantt');
+        gantt.Set('chart.xmax', 365);
+        gantt.Set('chart.gutter.left', 75);
+        gantt.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        gantt.Set('chart.title', 'Holiday schedule for Xyz Ltd');
+        gantt.Set('chart.defaultcolor', 'rgba(255,0,0,1)');
+        gantt.Set('chart.tooltips', ["&lt;b&gt;Richard&lt;/b&gt;&lt;br /&gt;Richard is going on holiday to Malta.&lt;br /&gt;He'll be away for 28 days.",
+                                     "&lt;b&gt;Fred&lt;/b&gt;&lt;br /&gt;Fred is also going away for 28 days",
+                                     "&lt;b&gt;Barney&lt;/b&gt;&lt;br /&gt;Barney is off work for two weeks",
+                                     "&lt;b&gt;Gloria&lt;/b&gt;&lt;br /&gt;Gloria is off for 3 weeks",
+                                     "&lt;b&gt;Paul&lt;/b&gt;&lt;br /&gt; Away for 31 days",
+                                     "&lt;b&gt;Harry&lt;/b&gt;&lt;br /&gt;Away for three weeks",
+                                     "&lt;b&gt;Shane&lt;/b&gt;&lt;br /&gt;Away for one week",
+                                     "&lt;b&gt;Barry&lt;/b&gt;&lt;br /&gt;Away for two weeks",
+                                     "&lt;b&gt;Cynthia&lt;/b&gt;&lt;br /&gt;Away for two weeks",
+                                     "&lt;b&gt;Graham&lt;/b&gt;&lt;br /&gt;Away for August and September",
+                                     "&lt;b&gt;Paul&lt;/b&gt;&lt;br /&gt;Away for 31 days"]);
+        gantt.Set('chart.events', [
+                                 [31, 28, null, 'Richard'],
+                                 [31, 28, null, 'Fred'],
+                                 [59, 14, null, 'Barney'],
+                                 [59, 21, null, 'Gloria'],
+                                 [59, 31, null, 'Paul'],
+                                 [80, 21, null, 'Harry'],
+                                 [94, 7, null, 'Shane'],
+                                 [120, 14, null, 'Barry'],
+                                 [130, 14, null, 'Cynthia'],
+                                 [211, 61, null, 'Graham'],
+                                 [334, 31, null, 'Paul']
+                                ]);
+        gantt.Set('chart.vbars', [
+                                  [0, 31, 'rgba(192,255,192,0.5)'],
+                                  [59, 31, 'rgba(192,255,192,0.5)'],
+                                  [120, 31, 'rgba(192,255,192,0.5)'],
+                                  [181, 31, 'rgba(192,255,192,0.5)'],
+                                  [243, 30, 'rgba(192,255,192,0.5)'],
+                                  [304, 30, 'rgba(192,255,192,0.5)']
+                                 ]);
+    
+        gantt.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the bar chart apears.
+    </p>
+
+    <ul>
+        <li><a href="#chart configuration">Chart configuration</a></li>
+        <li><a href="#background">Background</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+
+
+    <a name="chart configuration"></a>
+        <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Chart configuration</h3>
+        <a name="chart.xmax"></a>
+        <b>chart.xmax</b><br />
+        Required. This determines how many "units" wide the Gantt chart is. For example to represent a year, you would use 365, giving
+        a granularity of one day.<br />
+        <i>Default: none</i><br /><br />
+
+        <a name="chart.xmin"></a>
+        <b>chart.xmin</b><br />
+        This option can sometimes make using a Gantt chart spread over several pages easier.<br />
+        <i>Default: 0</i><br /><br />
+
+
+<a name="background"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Background</h3>            <a name="chart.background.barcolor1"></a>
+<b>chart.background.barcolor1</b><br />
+            Color of the background bars<br /><i>Default: white</i><br /><br />
+            <a name="chart.background.barcolor2"></a>
+<b>chart.background.barcolor2</b><br />
+            Color of the background bars<br /><i>Default: white</i><br /><br />
+            <a name="chart.background.grid"></a>
+<b>chart.background.grid</b><br />
+            Whether a grid is shown as part of the background<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.color"></a>
+<b>chart.background.grid.color</b><br />
+            The color of the background grid.<br /><i>Default: #eee</i><br /><br />
+            <a name="chart.background.grid.hsize"></a>
+<b>chart.background.grid.hsize</b><br />
+            The size of the horizontal grid.<br /><i>Default: 20</i><br /><br />
+            <a name="chart.background.grid.vsize"></a>
+<b>chart.background.grid.vsize</b><br />
+            The size of the vertical grid.<br /><i>Default: 20</i><br /><br />
+            <a name="chart.background.grid.width"></a>
+<b>chart.background.grid.width</b><br />
+            The line width of the background grid.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.background.grid.autofit"></a>
+<b>chart.background.grid.autofit</b><br />
+            Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want.<br /><i>Default: false</i><br /><br />
+            <a name="chart.background.grid.autofit.numhlines"></a>
+<b>chart.background.grid.autofit.numhlines</b><br />
+            When using autofit this allows you to specify how many horizontal grid lines you want. <br /><i>Default: 7</i><br /><br />
+            <a name="chart.background.grid.autofit.numvlines"></a>
+<b>chart.background.grid.autofit.numvlines</b><br />
+            When using autofit this allows you to specify how many vertical grid lines you want. <br /><i>Default: 20</i><br /><br />
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 75</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points).<br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            An array of the labels which are applied to the chart.<br /><i>Default: [] (An empty array)</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the chart.<br /><i>Default: not set</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            An array of tooltips that are shown when the bars are clicked. They can contain HTML.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. Cannot be used in conjunction with tooltips.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+    <a name="miscellaneous"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+<a name="chart.borders"></a>
+<b>chart.borders</b><br />
+            Whether a border is shown on the event bars<br /><i>Default: true</i><br /><br />
+            <a name="chart.defaultcolor"></a>
+<b>chart.defaultcolor</b><br />
+            The default color of bars. If you don't specify a color for the event, this will be used.<br /><i>Default: white</i><br /><br />
+            <a name="chart.events"></a>
+<b>chart.events</b><br />
+            An array of event information that is displayed on the gantt. See below for further information.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.vbars"></a>
+<b>chart.vbars</b><br />
+            Vertical bars used for decorative purposes, or for marking something on the chart (an event for example). See below for further information.<br /><i>Default: [] (An empty array)</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+    <a name="events"></a>
+    <h2>Adding events to your Gantt chart</h2>
+    
+    <p>
+        To add events, you specify them using the <i>chart.events</i> property. You could use the following to set some events on your gantt chart:
+    </p>
+    
+    <pre class="code">gantt.Set('chart.events', [
+                       [31, 28, 75, 'Richard'],
+                       [12, 28, 67, 'Fred'],
+                       [59, 14, 0, 'Barney'],
+                       [59, 21, 5, 'Gloria'],
+                       [46, 31, 94, 'Paul'],
+                       [80, 21, 46, 'Harry'],
+                       [94, 17, 84, 'Shane'],
+                       [34, 14, 32, 'Barry'],
+                       [64, 14, 28, 'Cynthia', 'red', 'yellow'],
+                       [13, 61, 74, 'Graham'],
+                       [84, 31, 16, 'Paul']
+                      ]);
+</pre>
+
+    <p>
+        The first value is the (zero indexed) start number relative to your <i>chart.xmax</i>. So if you have set your <i>chart.xmax</i> to 62, (to represent
+        two months), and this value is 31, the start will be the start of the second month. In this case you could give two labels -
+        <i>['July', 'August']</i>.
+    </p>
+    
+    <p>
+        The second value is the duration. So using the previous example, if you set this to 7, you would have an event lasting a week.
+    </p>
+    
+    <p>
+        The third value is the "percentage complete" indicator. This is shown to the right of the event, and is optional - you can
+        specify <i>null</i> if you wish.
+    </p>
+    
+    <p>
+        The fourth value is the label that is used on the left hand side.
+    </p>
+    
+    <p>
+        The optional fifth value stipulates the background colour that the bar is. Default is white.
+    </p>
+    
+    <p>
+        The optional sixth value is the foreground color of the bar. Defaulting to #0c0.
+    </p>
+    
+    <p>
+        The optional seventh value is the border color, defaulting to black
+    </p>
+    
+    <p>
+        And the optional eigth value is the numerical linewidth of the border. The default is 1.
+    </p>
+    
+    <a name="vbars"></a>
+    <h2>Adding vertical bars to your Gantt chart</h2>
+    
+    <p>
+        You can add decorative vertical bars like so:
+    </p>
+    
+    <pre class="code">gantt.Set('chart.vbars', [
+                    [0, 31, 'rgba(192,255,192,0.5)'],
+                    [59, 31, 'rgba(192,255,192,0.5)'],
+                    [120, 31, 'rgba(192,255,192,0.5)'],
+                    [181, 31, 'rgba(192,255,192,0.5)'],
+                    [243, 30, 'rgba(192,255,192,0.5)'],
+                    [304, 30, 'rgba(192,255,192,0.5)'],
+                   ]);
+</pre>
+
+    <p>
+        You can use these for decorative purposes, or to mark events/limits. The first value is the start index, as above.
+        The second value is the unit length, again as above. The third value is the color of the vertical bar.
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/gutters.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/gutters.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/gutters.html	(revision 225)
@@ -0,0 +1,221 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Variable gutter sizes</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs variable gutter sizes" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Variable gutter sizes" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function (e)
+        {
+            var bar = new RGraph.Bar('cvs', [0.2,0.2,0.5,0.6,0.5,0.3,0.5,0.1,0.2,0.7,4.2,3.5]);
+            bar.Set('chart.ymax', 5);
+            bar.Set('chart.labels', ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);
+            bar.Set('chart.tooltips', ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);
+            bar.Set('chart.text.angle', 45);
+            bar.Set('chart.contextmenu', [['Zoom in', RGraph.Zoom]]);
+            bar.Set('chart.zoom.hdir', 'left');
+            bar.Set('chart.title', '2010 statistics (tooltips)');
+            bar.Set('chart.ylabels.specific', ['100,000','10,000','1,000','100','10']);
+            bar.Set('chart.background.grid.autofit', true);
+            bar.Set('chart.background.grid.autofit.align', true);
+            bar.Set('chart.title.vpos', 0.5);
+
+            bar.Set('chart.gutter.left', 65);
+            bar.Set('chart.gutter.right', 5);
+            bar.Set('chart.gutter.bottom', 60);
+
+            bar.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+    
+    <style>
+        ol li {
+            margin-top: 0;
+        }
+    </style>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Variable gutter sizes
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Variable gutter sizes</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <ul>
+        <li>
+            <a href="#upgrading">Upgrading from a previous version of RGraph</a>
+        </li>
+    </ul>
+
+    <canvas id="cvs" width="620" height="300" style="border: 1px dashed gray; float: right">[No canvas support]</canvas>
+    
+    <p>
+        New in June 2011 is the much requested feature of seperate gutter sizing. As the chart to the right shows, this means
+        that you can now easily set the left/right/top/bottom gutters independently. This makes it easy to give
+        yourself the space that you need for labels, which will be most noticeable with the Bar chart, the Line chart
+        and similar chart types. There is another example on the <a href="../examples/hbar.html#gutter-example">HBar example page</a>.
+    </p>
+    
+    <p>
+        Because of the fundamental nature of this change (every chart type has been affected) 
+        you should rigorously test your charts if you choose to upgrade.
+    </p>
+    
+    <p>
+        The new properties are:
+    </p>
+    
+    <ul>
+        <li>chart.gutter.left</li>
+        <li>chart.gutter.right</li>
+        <li>chart.gutter.top</li>
+        <li>chart.gutter.bottom</li>
+    </ul>
+    
+    <p>
+         They all default to 25 pixels (with a few exceptions) and each can be set independently.
+    </p>
+    
+    <p>
+        These new properties eliminate the need for certain others. So starting immediately the following properties are no longer
+        used:
+    </p>
+    
+    <ul>
+        <li>chart.gutter</li>
+        <li>chart.width</li>
+        <li>chart.height</li>
+        <li>chart.tooltips.coords.adjust</li>
+        <li>chart.resize.handle.adjust</li>
+    </ul>
+    
+    <p>
+        The <i>chart.gutter</i> property has been completely removed, so you will need to start using the new properties immediately.
+        The <i>chart.width</i> and <i>chart.height</i> properties are completely unused from this point and the last two
+        will be phased out starting immediately.
+    </p>
+
+        <br clear="all" />
+
+        <pre class="code">
+&lt;script&gt;
+        window.onload = function (e)
+        {
+            var bar = new RGraph.Bar('cvs', [0.2,0.2,0.5,0.6,0.5,0.3,0.5,0.1,0.2,0.7,4.2,3.5]);
+            bar.Set('chart.ymax', 5);
+            bar.Set('chart.labels', ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);
+            bar.Set('chart.tooltips', ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);
+            bar.Set('chart.text.angle', 45);
+            bar.Set('chart.contextmenu', [['Zoom in', RGraph.Zoom]]);
+            bar.Set('chart.zoom.hdir', 'left');
+            bar.Set('chart.title', '2010 statistics (tooltips)');
+            bar.Set('chart.ylabels.specific', ['100,000','10,000','1,000','100','10']);
+            bar.Set('chart.background.grid.autofit', true);
+            bar.Set('chart.background.grid.autofit.align', true);
+            bar.Set('chart.title.vpos', 0.5);
+
+            <span style="color: green">bar.Set('chart.gutter.left', 65);
+            bar.Set('chart.gutter.right', 5);
+            bar.Set('chart.gutter.bottom', 60);</span>
+
+            bar.Draw();
+        }
+&lt;/script&gt;
+</pre>
+
+    <a name="upgrading"></a>
+    <h2>Upgrading from a previous version of RGraph</h2>
+    
+    <p>
+        If you're upgrading from a previous version of RGraph then there are a few points you should bear in mind:
+    </p>
+    
+    <ol>
+        <li>
+            Remove any calls to .translate().
+            If you use the .translate() method to give yourself extra space, this should be converted to the new gutter properties.
+        </li>
+        
+        <li>
+            If you use <i>chart.tooltips.coords.adjust</i> or <i>chart.resize.handle.adjust</i> then you should remove them. These
+            properties will cease to have any effect eventually, but not immediately.
+        </li>
+        
+        <li>
+            If you use caching, then you may need to use a CTRL/SHIFT+Refresh on your page to bypass any cached copy of the RGraph
+            libraries.
+        </li>
+    </ol>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/hbar.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/hbar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/hbar.html	(revision 225)
@@ -0,0 +1,614 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - horizontal bar charts documentation</title>
+    
+    <meta name="keywords" content="rgraph javascript charts docs hbar horizontal bar" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Horizontal Bar (HBar) charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Horizontal bar charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Horizontal bar charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Horizontal bar charts are a variation on Bar charts, which can be useful when you have larger labels, since you have
+        more space available to you for them.
+    </p>
+    
+    <p>
+        The example file is <a href="../examples/hbar.html">here</a>.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [280,45,133,166,84,259,266,960,219,311];
+    
+        var hbar = new RGraph.HBar('myCanvas', data);
+        hbar.Set('chart.labels', ['Richard', 'Alex', 'Nick', 'Scott', 'Kjnell', 'Doug', 'Charles', 'Michelle', 'Mark', 'Alison']);
+        hbar.Set('chart.gutter.left', 45);
+        hbar.Set('chart.background.barcolor1', 'rgba(255,255,255,1)');
+        hbar.Set('chart.background.barcolor2', 'rgba(255,255,255,1)');
+        hbar.Set('chart.background.grid', true);
+        hbar.Set('chart.colors', ['rgba(255,0,0,1)']);
+        hbar.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+        <li><a href="#available.methods">Methods</a></li>
+    </ul>
+
+    <a name="available.properties"></a>
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the bar chart apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myHBar.Set('name', 'value');</b>
+    </p>
+
+    <ul>
+        <li><a href="#chart">Chart configuration</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#background">Background</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#scale and axes">Scale and axes</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+    </ul>
+
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 75</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.colors"></a>
+<b>chart.colors</b><br />
+            An array of the colors of the actual bars. <br /><i>Default: An array - ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0']</i><br /><br />
+<a name="background"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Background</h3>            <a name="chart.background.barcolor1"></a>
+<b>chart.background.barcolor1</b><br />
+            The color of the background bars, (1 of 2). <br /><i>Default: white</i><br /><br />
+            <a name="chart.background.barcolor2"></a>
+<b>chart.background.barcolor2</b><br />
+            The color of the background bars, (2 of 2). <br /><i>Default: white</i><br /><br />
+            <a name="chart.background.grid"></a>
+<b>chart.background.grid</b><br />
+            Whether to show the background grid or not. <br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.color"></a>
+<b>chart.background.grid.color</b><br />
+            The color of the background grid. <br /><i>Default: #ddd</i><br /><br />
+            <a name="chart.background.grid.hsize"></a>
+<b>chart.background.grid.hsize</b><br />
+            The horizontal background grid size. <br /><i>Default: 40</i><br /><br />
+            <a name="chart.background.grid.vsize"></a>
+<b>chart.background.grid.vsize</b><br />
+            The vertical background grid size. <br /><i>Default: 18</i><br /><br />
+            <a name="chart.background.grid.width"></a>
+<b>chart.background.grid.width</b><br />
+            The width that the background grid lines are. Decimals (eg 0.5) are permitted.<br /><i>Default: 0.5</i><br /><br />
+            <a name="chart.background.grid.border"></a>
+<b>chart.background.grid.border</b><br />
+            Determines whether a border line is drawn around the grid.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.hlines"></a>
+<b>chart.background.grid.hlines</b><br />
+            Determines whether to draw the horizontal grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.vlines"></a>
+<b>chart.background.grid.vlines</b><br />
+            Determines whether to draw the vertical grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.autofit"></a>
+<b>chart.background.grid.autofit</b><br />
+            Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want.<br /><i>Default: false</i><br /><br />
+            <a name="chart.background.grid.autofit.numhlines"></a>
+<b>chart.background.grid.autofit.numhlines</b><br />
+            When using autofit this allows you to specify how many horizontal grid lines you want. <br /><i>Default: 14</i><br /><br />
+            <a name="chart.background.grid.autofit.numvlines"></a>
+<b>chart.background.grid.autofit.numvlines</b><br />
+            When using autofit this allows you to specify how many vertical grid lines you want. <br /><i>Default: 20</i><br /><br />
+
+            <a name="labels and text"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>
+            
+            <a name="chart.xlabels"></a>
+            <b>chart.xlabels</b><br />
+            A boolean controlling whether the X labels are shown.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.labels"></a>
+            <b>chart.labels</b><br />
+            An array of the labels to be used on the chart. <br />
+            <i>Default: An empty array</i><br /><br />
+
+            <a name="chart.labels.above"></a>
+            <b>chart.labels.above</b><br />
+            This is a boolean which if true, will cause labels to be shown to the right of the bars. (It's called "above"
+            for API compatibility).<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.labels.above.decimals"></a>
+            <b>chart.labels.above.decimals</b><br />
+            This is a number which controls how many decimals are shown. It defaults to 0, and since it was added (4th December 2010)
+            you may need to set this, otherwise no decimals will be shown.<br />
+            <i>Default: 0</i><br /><br />
+            
+            <a name="chart.text.font"></a>
+            <b>chart.text.font</b><br />
+            The font used to render the text.<br />
+            <i>Default: Verdana</i><br /><br />
+            
+            <a name="chart.text.color"></a>
+            <b>chart.text.color</b><br />
+            The color of the labels. <br />
+            <i>Default: black</i><br /><br />
+
+            <a name="chart.text.size"></a>
+            <b>chart.text.size</b><br />
+            The size (in points) of the labels. <br />
+            <i>Default: 10</i><br /><br />
+
+
+            <a name="titles"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>
+            
+            <a name="chart.title"></a>
+            <b>chart.title</b><br />
+            The title of the chart, if any. <br />
+            <i>Default: null</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.xaxis"></a>
+<b>chart.title.xaxis</b><br />
+            This allows to specify a title for the X axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.yaxis"></a>
+<b>chart.title.yaxis</b><br />
+            This allows to specify a title for the Y axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.xaxis.pos"></a>
+<b>chart.title.xaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the X axis title.<br /><i>Default: 0.25</i><br /><br />
+            <a name="chart.title.yaxis.pos"></a>
+<b>chart.title.yaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the Y axis title.<br /><i>Default: 0.5</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+<a name="scale and axes"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale and axes</h3>            <a name="chart.scale.point"></a>
+<b>chart.scale.point</b><br />
+            The character used as the decimal point.<br /><i>Default: .</i><br /><br />
+            <a name="chart.scale.thousand"></a>
+<b>chart.scale.thousand</b><br />
+            The character used as the thousand separator<br /><i>Default: ,</i><br /><br />
+
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.xmax"></a>
+            <b>chart.xmax</b><br />
+            (Optional) An optional max figure for the X scale.<br />
+            <i>Default: none (one is calculated)</i><br /><br />
+
+            <a name="chart.xmin"></a>
+            <b>chart.xmin</b><br />
+            An optional minimum figure for the X scale.<br />
+            <i>Default: 0</i><br /><br />
+
+            <a name="chart.yaxispos"></a>
+<b>chart.yaxispos</b><br />
+            The position of the Y axis. Works with regular and grouped charts. Can be either <i>center</i> or <i>left</i>.<br /> <i>Default: left</i><br /><br />
+            <a name="chart.axis.color"></a>
+<b>chart.axis.color</b><br />
+            The color of the axes.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.units.pre"></a>
+<b>chart.units.pre</b><br />
+            The units that the X axis is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50".<br /><i>Default: none</i><br /><br />
+            <a name="chart.units.post"></a>
+<b>chart.units.post</b><br />
+            The units that the X axis is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms".<br /><i>Default: none</i><br /><br />
+            <a name="chart.units.ingraph"></a>
+<b>chart.units.ingraph</b><br />
+            If your units are long, setting this stipulates them to be used for ingraph labels only.<br /><i>Default: false</i><br /><br />
+
+
+
+
+
+
+
+
+<a name="miscellaneous"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+    
+    <a name="chart.grouping"></a>
+    <b>chart.grouping</b><br />
+    How the bars are grouped, and it should be one of: <b>grouped</b> or <b>stacked</b><br />
+    <i>Default: grouped</i><br /><br />
+    
+    <a name="chart.vmargin"></a>
+    <b>chart.vmargin</b><br />
+    The vertical margin that is applied to each individual bar.<br />
+    <i>Default: 3</i><br /><br />
+    
+    <a name="chart.strokestyle"></a>
+    <b>chart.strokestyle</b><br />
+    The color of the outlines of the bars.<br />
+    <i>Default: black</i><br /><br />
+    
+    <a name="chart.highlight.stroke"></a>
+    <b>chart.highlight.stroke</b><br />
+    If you use tooltips, this controls the colour of the highlight stroke.
+    <br /><i>Default: black</i><br /><br />
+
+    <a name="chart.highlight.fill"></a>
+    <b>chart.highlight.fill</b><br />
+    If you use tooltips, this controls the colour of the highlight fill.
+    <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+
+
+
+
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether a small drop shadow is applied. <br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow. <br /><i>Default: #666</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the shadow. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the shadow. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect. <br /><i>Default: 3</i><br /><br />
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+
+<a name="chart.contextmenu"></a>
+    <b>chart.contextmenu</b><br />
+    An array of context menu items. You cannot have context menus AND tooltips, only one or the other. More information on context menus is <a href="context.html">here</a>.<br />
+    <i>Default: [] (An empty array)</i><br /><br />
+    
+    <a name="chart.tooltips"></a>
+    <b>chart.tooltips</b><br />
+    An array of tooltips for the chart.<br />
+    <i>Default: An empty array</i><br /><br />
+    
+    <a name="chart.tooltips.event"></a>
+    <b>chart.tooltips.event</b><br />
+    This is the event that triggers the tooltips. It can be <i>onclick</i> or <i>onmousemove</i>.<br />
+    <i>Default: onclick</i><br /><br />
+    
+    <a name="chart.tooltips.effect"></a>
+    <b>chart.tooltips.effect</b><br />
+    The visual effect used when showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br />
+    <i>Default: fade</i><br /><br />
+
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+
+
+
+
+
+
+
+
+
+
+
+    <a name="available.methods"></a>
+    <br />&nbsp;<br />
+    <h2>Methods</h2>
+    
+    <a name="getbar"></a>
+    <b>obj.getBar()</b><br /><br />
+    This method makes it easier to get hold of which bar has been clicked on, or hovered over. It returns an array of:
+    <ul>
+        <li>The X coordinate</li>
+        <li>The Y coordinate</li>
+        <li>The width of the bar</li>
+        <li>The height of the bar</li>
+        <li>The numerical index of the bar. This corresponds (for example) to the tooltips array, and the coordinates array</li>
+    </ul>
+    
+    An example usage is:
+    
+    <pre class="code">
+&lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.hbar.js"&gt;&lt;/script&gt;
+
+&lt;script&gt;
+    myGraph = new RGraph.HBar('myCanvas', [1.2, 1.3, 1.4, 1.5,6,1.9,2,2.1,2.5]);
+    myGraph.Set('chart.labels', ['John', 'Barry', 'Rich', 'Craig', 'Tom', 'Frank', 'Helen', 'Joyce', 'Fred'])
+    myGraph.Draw();
+
+    RGraph.Register(myGraph);
+    
+    myGraph.canvas.onclick = function (e)
+    {
+        RGraph.Redraw();
+    
+        var canvas  = e.target;
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        <span style="color: green">var bar     = obj.getBar(e);</span>
+        
+        if (bar) {
+
+            var top    = bar[0];
+            var left   = bar[1];
+            var width  = bar[2];
+            var height = bar[3];
+            var idx    = bar[4];
+            
+            context.beginPath();
+                context.strokeStyle = 'black';
+                context.fillStyle = 'rgba(255,255,255,0.5)';
+                context.strokeRect(top, left, width, height);
+                context.fillRect(top, left, width, height);
+            context.stroke();
+            context.fill();
+        }
+    }
+&lt;/script&gt;
+</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/hprogress.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/hprogress.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/hprogress.html	(revision 225)
@@ -0,0 +1,400 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for personal,    |
+        * | charity and educational purposes it is free to use. You can read the full    |
+        * | license here:                                                                |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - horizontal progress bar documentation</title>
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Horizontal Progress bar
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Horizontal Progress bar documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The example file is <a href="../examples/hprogress.html">here</a>.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var myProgress = new RGraph.HProgess('myProgress', 78, 100);    
+        myProgress.Set('chart.colors', ['red']);
+        myProgress.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the progress bar apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myProgress.Set('name', 'value');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#chart configuration">Chart configuration</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#key">Key</a></li>
+    </ul>
+
+
+            <a name="chart configuration"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Chart configuration</h3>
+
+            
+            <a name="chart.tickmarks"></a>
+            <b>chart.tickmarks</b><br />
+            Whether the tickmarks are drawn. <br />
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.tickmarks.color"></a>
+<b>chart.tickmarks.color</b><br />
+            The color used for tickmarks.<br /><i>Default: black</i><br /><br />
+            <a name="chart.tickmarks.inner"></a>
+<b>chart.tickmarks.inner</b><br />
+            This controls whether the bar has inner tickmarks<br /><i>Default: false</i><br /><br />
+<!--
+            <a name="chart.value"></a>
+            <b>chart.value</b><br />
+            The indicated value. You don't need to set this because it's one of the arguments to the constructor.<br /><br />
+
+            <a name="chart.max"></a>
+            <b>chart.max</b><br />
+            The maximum value. You don't need to set this because it's one of the arguments to the constructor.<br /><br />
+-->
+            <a name="chart.numticks"></a>
+<b>chart.numticks</b><br />
+            How many tick marks there are. <br /><i>Default: 10</i><br /><br />
+            <a name="chart.numticks.inner"></a>
+<b>chart.numticks.inner</b><br />
+            How many inner tick marks there are. <br /><i>Default: 50</i><br /><br />
+            <a name="chart.arrows"></a>
+<b>chart.arrows</b><br />
+            This stipulates that two indicator arrows are drawn. It works best if you have tickmarks off, and no title.<br><i>Default: false</i><br /><br />
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.colors"></a>
+<b>chart.colors</b><br />
+            The colors of the bar(s). This can be a solid color, or a gradient that you create. <br /><i>Default: [#0c0]</i><br /><br />
+            <a name="chart.background.color"></a>
+<b>chart.background.color</b><br />
+            The background color. <br /><i>Default: #eee</i><br /><br />
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether the progress bar has a shadow. This uses the canvas shadow API and therefore is only supported on Chrome 2, Safari 3.1 and Firefox 3.1 (and above).<br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the progress bar shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the progress bar shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow.<br /><i>Default: rgba(0,0,0,0.5)</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The blurring effect that is applied to the shadow.<br /><i>Default: 3</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points). <br /><i>Default: 10</i><br /><br />
+            <a name="chart.labels"></a>
+            <b>chart.labels</b><br />
+            Labels that are applied to the chart. <br />
+            <i>Default: An empty array</i><br /><br />
+
+            <a name="chart.labels.position"></a>
+            <b>chart.labels.position</b><br />
+            This determines whether the labels are placed on the top or the bottom of the progress bar.<br />
+            <i>Default: bottom</i><br /><br />
+
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>            <a name="chart.units.pre"></a>
+<b>chart.units.pre</b><br />
+            The units that the Y scale is measured in (these are preppend to the number). <br /><i>Default: none</i><br /><br />
+            <a name="chart.units.post"></a>
+<b>chart.units.post</b><br />
+            The units that the Y scale is measured in (these are appended to the number). <br /><i>Default: none</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the progress bar. <br /><i>Default: An empty string</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            An array, albeit one element only. This is shown when the progress bar is clicked on. This can contain HTML.<br /><i>Default: An empty array</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing the tooltip. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the tooltips use.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+
+            <a name="chart.adjustable"></a>
+<b>chart.adjustable</b><br />
+            Defaulting to false, this determines whether your progress bar will be adjustable (click the bar and drag it). <br /><i>Default: false</i><br /><br />
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+    <a name="miscellaneous"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key. Either <b>graph</b> or <b>gutter</b> (default).<br />
+            <i>Default: gutter</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: true</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+</div>
+<br /><br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/iframe-setup.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/iframe-setup.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/iframe-setup.html	(revision 225)
@@ -0,0 +1,60 @@
+<!DOCTYPE html >
+<html>
+<head>
+    <title></title>
+</head>
+<body>
+<!DOCTYPE html >
+<html>
+<head>
+    <style>
+        .ModalDialog_dialog {
+            font-family: Georgia, Verdana;
+        }
+    </style>
+</head>
+<body>
+
+    <iframe style="position: fixed; top: 0; left: 0; border: none" id="myIframe" src="iframe.html"></iframe>
+
+    <div id="myCover"></div>
+
+    <script>
+        
+        document.getElementById("myIframe").style.height = '100%';
+        document.getElementById("myIframe").style.width = '100%';
+    </script>
+    
+    <script src="../libraries/RGraph.modaldialog.js" ></script>
+
+    <!-- This is the popup dialog-->
+
+        <div id="loginDialog" style="display: none">
+
+            <b>Please login</b>
+            <p>
+                <table border="0">
+                    <tr>
+                        <td align="right" style="padding-top: 4px">Email</td>
+                        <td><input type="text" size="20" name="email" style="width: 150px" /></td>
+                    </tr>
+
+                    <tr>
+                        <td align="right" style="padding-top: 4px">Password</td>
+                        <td><input type="password" size="20" name="password" style="width: 150px" /></td>
+                    </tr>
+                    
+                    <tr>
+                        <td colspan="2" align="right">
+                            <input type="reset" value="Cancel" onclick="ModalDialog.Close()">
+                            <input type="submit" name="submit" value="Login &raquo;" onclick="alert('This is just an example'); event.stopPropagation()">
+                        </td>
+                    </tr>
+                </table>
+            </p>
+        </div>
+
+    <!-- End of dialog -->
+</body>
+</html>
+    
Index: Dev/branches/Demo/RGraph/docs/iframe.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/iframe.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/iframe.html	(revision 225)
@@ -0,0 +1,178 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Integrating RGraph with external libraries - covering the scrollbars</title>
+
+    <meta name="keywords" content="rgraph html5 canvas chart docs external libraries" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about integrating RGraph with external libraries" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+        obj    = document.all ? top.document.all['myCover'] : top.document.getElementById('myCover');
+        iframe = document.all ? top.document.all['myIframe'] : top.document.getElementById('myIframe');
+
+        function Cover (msg)
+        {            
+            // Show the ModalDialog
+            top.ModalDialog.Show('loginDialog', 300);
+        }
+        
+        /**
+        * This function uncovers the window
+        */
+        function Uncover ()
+        {
+            Resize = function (size)
+            {
+                iframe.style.width    = size + 'px';
+                iframe.style.height   = size + 'px';
+                iframe.style.position = 'static';
+                iframe.style.border   = '2px dashed gray';
+            }
+            
+            for (var i=0; i<10; i++) {
+                setTimeout('Resize(' + (((10 - i) * 50) + 250 )+')', i * 50);
+            }
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body id="outer">
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html" target="_top">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html" target="_top">Documentation</a>
+        >
+        Covering the browsers scroll bars
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Covering the scroll bars</h1>
+
+    <button onclick="top.location.href = 'external.html#covering'">&laquo; Back</button>
+    <button onclick="Cover('The window is now completely covered...')">Cover me!</button>
+    <button onclick="Uncover()">Resize me!</button>
+    
+    <p>
+        This is an example of getting the ModalDialog to cover the entire page - including the scroll bars. A regular DIV does
+        not do this. This text is just here to pad the page and ensure that the browser creates a scroll bar.
+    </p>
+    
+    <hr>
+
+    <p>
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+    </p>
+    
+    <p>
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+    </p>
+    
+    <p>
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+        gh ghiu gyu gfyugf yu gfyu fgyugfyufgyu gfyu gfyu fgyu yu fyu yu gyu guighui ghui ghui uhi hui hui 
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/image2url.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/image2url.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/image2url.html	(revision 225)
@@ -0,0 +1,114 @@
+<html>
+<head>
+    <title>Image to data: url converter</title>
+    
+    <style>
+        body {
+            font-size: 12pt;
+            font-family: Georgia;
+        }
+    </style>
+</head>
+<body onload="document.getElementById('url').focus(); document.getElementById('url').value = '/images/logo.png'">
+
+    <div style="position: fixed; right: 5px; background-color: #eee; border: 2px solid #000; padding: 3px">
+        <a href="http://www.rgraph.net" target="_blank"><i>Courtesy of www.rgraph.net</i></a>
+    </div>
+
+    <h1>Image to data: url converter</h1>
+    
+    <i>
+        This only works for online images, which are on the [<script>document.write(location.host)</script>] domain. There's no server-side
+        scripting though, so feel free to put it on your website and use it there.
+    </i>
+    
+    <p />
+    
+    URL: <input type="text" value="" id="url" />
+    <button onclick="Go()">Go!</button>
+    
+    <p />
+
+    The data: url:
+    <textarea id="output" readonly style="width: 100%" rows="20" style="color: gray" onclick="this.select()">This is where the output URL goes...</textarea>
+
+    <p />
+    
+    A full image tag with the url as the src:
+    <textarea id="output_tag" readonly style="width: 100%" rows="20" style="color: gray" onclick="this.select()">This is where the image tag  goes...</textarea>
+
+    <p>The image itself using the data: url:</p>
+    <script>
+        function Go()
+        {
+            var url      = document.getElementById("url").value;
+            var text     = document.getElementById("output");
+            var text_tag = document.getElementById("output_tag");
+            var img      = document.createElement('IMG');
+
+            img.src = url;
+            document.body.appendChild(img);
+
+            /*******************************************************
+            * Create the canvas and paint the image onto it
+            *******************************************************/
+            canvas = CreateCanvas(img);
+            
+            /*******************************************************
+            * Now use the .toDataURL() function to get the data: url
+            *******************************************************/
+            var data = canvas.toDataURL();
+            
+            /*******************************************************
+            * Populate the first text box
+            *******************************************************/
+            text.value = data;
+            text.select();
+            
+            /*******************************************************
+            * Populate the second text box
+            *******************************************************/
+            text_tag.value = '<img src="' + data + '" width="' + img.offsetWidth + '" height="' + img.offsetHeight + '" alt="An image" />'
+            
+            /*******************************************************
+            * Add the image tag just created to the DOM
+            *******************************************************/
+            img.src = data;
+            img.width = img.offsetWidth;
+            img.height = img.offsetHeight;
+        }
+        
+        /*******************************************************
+        * This function creates the canvas and appends it to the
+        * DOM
+        * 
+        * @param img The image DOM object
+        *******************************************************/
+        function CreateCanvas(img)
+        {
+            var canvas    = document.createElement('CANVAS');
+            var context   = canvas.getContext('2d');
+
+            canvas.width  = img.offsetWidth;
+            canvas.height = img.offsetHeight;
+            document.body.appendChild(canvas);
+
+            /*******************************************************
+            * Now add the image to the canvas
+            *******************************************************/
+            context.drawImage(img, 0, 0);
+            
+            /*******************************************************
+            * Move the canvas off-screen
+            *******************************************************/
+            
+            canvas.style.position = 'absolute';
+            canvas.style.left = (-1 * img.offsetWidth) + 'px';
+            canvas.style.top  = (-1 * img.offsetHeight) + 'px';
+            
+            return canvas;
+        }
+    </script>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/index.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/index.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/index.html	(revision 225)
@@ -0,0 +1,881 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation index" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <meta name="keywords" content="rgraph chart html5 javascript canvas" />
+    <meta name="description" content="RGraph: Javascript charts and graph library Javascript charts & HTML5 canvas charts library" />
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    Documentation
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <div style="background-color: #ffb; border: 2px dashed black; padding: 3px">
+        12th July 2011: The Tradar chart has been renamed to the Radar chart. You WILL need to update your code slightly with the new name.
+    </div>
+
+    <div>
+        <h4>Introduction</h4>
+
+        <ul>
+            <li>
+                <a href="../index.html#intro" title="A short description of RGraph: Javascript charts and graph library">Introduction to RGraph: Javascript charts and graph library</a>
+                <ul>
+                    <li><a href="what-is-a-graph.html" title="A brief description of what a graph/chart is">What is a graph?</a></li>
+                    <li><a href="what-is-html5-canvas.html" title="A brief description of what HTML5 canvas is">What is HTML5 canvas?</a></li>
+                    <li><a href="you-dont-need-to-spend-a-lot-of-money.html" title="You don't need to spend a lot of money to get attractive charts">You don't need to spend a lot of money to get attractive charts</a></li>
+                </ul>
+            </li>
+        </ul>
+        
+        <ul>
+            <li><a href="../examples/index.html"><b>Examples</b></a></li>
+        </ul>
+    </div>
+
+
+    <div style="float: left; width: 202px">
+        <h4>Chart types</h4>
+        <ul>
+            <li><a href="bar.html">Bar charts</a></li>
+            <li><a href="bipolar.html">Bi-polar charts</a></li>
+            <li><a href="donut.html">Donut charts</a></li>
+            <li><a href="funnel.html">Funnel charts</a></li>
+            <li><a href="gantt.html">Gantt charts</a></li>
+            <li><a href="hbar.html">Horizontal bar charts</a></li>
+            <li><a href="hprogress.html">Horizontal progress bar</a></li>
+            <li><a href="led.html">LED Grid</a></li>
+            <li><a href="line.html">Line charts</a></li>
+            <li><a href="meter.html">Meter charts</a></li>
+            <li><a href="odo.html">Odometer charts</a></li>
+            <li><a href="pie.html">Pie charts</a></li>
+            <li><a href="radar.html">Radar charts</a></li>
+            <li><a href="rose.html">Rose charts</a></li>
+            <li><a href="rscatter.html">Radial scatter charts</a></li>
+            <li><a href="scatter.html">Scatter charts</a></li>
+            <li><a href="thermometer.html">Thermometer charts</a></li>
+            <li><a href="vprogress.html">Vertical progress bar</a></li>
+            <li><a href="waterfall.html">Waterfall charts</a></li>
+        </ul>
+    </div>
+    
+    <div style="float: left; width: 435px">
+
+        <h4>Features</h4>
+        <ul>
+            <li><a href="gutters.html">Variable gutter sizes</a></li>
+            <li><a href="setconfig.html">The RGraph.SetConfig() function</a></li>
+            <li><a href="keys.html">Examples of keys in charts</a></li>
+            <li><a href="dynamic.html">Updating your charts dynamically</a></li>
+            <li><a href="png.html">Retrieving a PNG of your charts</a></li>
+            <li><a href="domcontentloaded.html">DOMContentLoaded example</a></li>
+            <li><a href="events.html">Custom RGraph events</a></li>
+            <li><a href="adjusting.html">Adjusting your charts interactively</a></li>
+            <li><a href="tooltips.html">Using tooltips in your charts</a></li>
+            <li><a href="resizing.html">Resizing your charts</a></li>
+            <li><a href="msie.html">Microsoft Internet Explorer support</a></li>
+            <li><a href="async.html">Asynchronous processing</a></li>
+            <li><a href="zoom.html">Zooming your charts</a></li>
+            <li>
+                <a href="annotating.html">Annotating your charts</a>
+                <ul>
+                    <li><a href="annotate_persist.html">Making your annotations shareable across browsers/computers</a></li>
+                </ul>
+            </li>
+            <li><a href="combine.html">Combining charts</a></li>
+            <li><a href="external.html">Integrating RGraph with external libraries (ModalDialog)</a></li>
+            <li>
+                <a href="animation.html">Animating your charts</a>
+                <ul>
+                    <li><a href="animation_segments.html">An animated (interactive) Pie chart</a></li>
+                </ul>
+            </li>
+            <li><a href="css.html">Available CSS classes</a></li>
+            <li><a href="color.html">About canvas color definitions</a></li>
+            <li><a href="context.html">Context menus</a></li>
+            <li><a href="misc.html">Miscellaneous documentation</a></li>
+            <li><a href="issues.html">Common issues</a></li>
+            <li><a href="api.html">API Documentation</a></li>
+        </ul>
+    </div>
+    
+    <div style="float: left; width: 338px">
+        <h4>Miscellaneous</h4>
+        <ul>
+            <li><a href="licensing.html"><b>Licensing FAQs</b></a></li>
+            <li><a href=".CHANGELOG.txt">The changelog</a></li>
+            <li><a href=".BC.txt">Backwards compatibility breaks</a></li>
+        </ul>
+
+        <h4>On this page:</h4>
+
+        <ul>
+            <li><a href="#benefits" title="Benefits of RGraph: Javascript charts and graph library">Benefits of RGraph: Javascript charts and HTML5 canvas charts</a></li>
+            <li><a href="#browser" title="Information about browser support">Browser support</a></li>
+            <li><a href="#performance" title="Things you may want to look at concerning performance">Improving the performance of your charts</a></li>
+            <li><a href="#implementation" title="Implementing RGraph on your website">Implementing RGraph</a></li>
+            <li><a href="#structure" title="Suggested structure for RGraph">Suggested structure for RGraph</a></li>
+            <li>
+                <a href="#integration" title="Information on integrating RGraph with server side scripting">Integration with server side scripting</a>
+                <ul>
+                    <li><a href="#mysql" title="Integration with PHP &amp; MySQL">Integration with PHP &amp; MySQL</a></li>
+                    <li><a href="#ajax" title="Making AJAX requests">Making AJAX requests</a></li>
+                </ul>
+            </li>
+            <li><a href="#support" title="Need support? Get it here">Support forum</a></li>
+        </ul>
+    </div>
+
+
+
+<!------------------------------------------------------------------------------------------------------------------------>
+
+
+
+    <br clear="all" />
+    <hr />
+
+
+
+    <a name="benefits"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Benefits of RGraph: Javascript charts and graph library</h2>
+    
+    <p>
+        HTML5 introduces a new HTML element - the CANVAS tag. This tag allows for two dimensional drawing easily using Javascript.
+        This makes it perfect for producing charts. Because Javascript runs on your users computer, none of the load on your web server
+        normally associated with producing charts is incurred. Not only that but because
+        of the greater processing power that is typically available on users' computers, they will be much faster. And,
+        because the code can be both compressed (for example if you're using Apache, mod_gzip will do this automatically for you) and
+        cached, bandwidth usage can be massively reduced. This makes it economically attractive to employ at the same time as
+        benefiting your website, ie:
+    </p>
+    
+    <ul>
+        <li><b>It can save you money by reducing the load on your web server(s) and hence the number of web servers you may need</b><br /><br /></li>
+        <li><b>It can speed up your web pages by reducing the number of images in your web pages and moving the overhead of chart
+        production to the client</b></li>
+    </ul>
+
+    <p>
+        Imagine, you are creating 100,000 charts a day and the data is such that the resulting charts cannot be cached. With the RGraph
+        library you can reduce that figure to zero. All the processing and chart creation is done by each individual client, much like
+        rendering the HTML you send to them. So you don't have to send any images, you simply send them the Javascript charts libraries
+        once. So, much lower bandwidth bills and far less strain on your webserver.
+    </p>
+    
+    <p>
+        And if that wasn't enough, because the charts are created using Javascript, they will work offline if you view a .html page
+        on your own PC. Download the archive and see! Useful if you need to do a presentation for example and want to use the same
+        chart(s) as your website.
+    </p>
+    
+    <div>
+        <div style="width: 45%; background-color: #fff; display: inline; display: inline-block">
+            <ul>
+                <li>Cross browser support.</li>
+                <li>19 Different base chart types (<a href="../examples/index.html">Examples</a>).</li>
+                <li>Charts work on and off-line.</li>
+                <li>Interactive features.</li>
+            </ul>
+        </div>
+
+        <div style="width: 45%; display: inline; display: inline-block">
+            <ul>
+                <li>Charts are created on the client - no server overhead.</li>
+                <li>Very easy setup (see <a href="#implementation">Implementing RGraph</a>).</li>
+                <li>Fully documented.</a></li>
+                <li>Very easy to learn.</li>
+            </ul>
+        </div>
+    </div>
+
+
+    <a name="browser"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Browser support</h2>
+    
+    <p>
+        Since the charts are produced using HTML5 features (the new <b>canvas</b> tag), client support is currently:
+    </p>
+    
+    <ul>
+        <li>Mozilla Firefox 3.0+</li>
+        <li>Google Chrome 1+</li>
+        <li>Apple Safari 3+</li>
+        <li>Opera 9.5+</li>
+        <li>Microsoft Internet Explorer 8+ (see note)</li>
+        <li>iPhone (text support from iOS v4+)</li>
+        <li>iPad (text support from iOS v4.2+)</li>
+    </ul>
+    
+    <p>
+        The HTML5 canvas tag is part of the <a href="http://www.w3.org/html/wg/html5/" target="_blank">HTML5 specification</a>,
+        and all of the above browsers have some sort of support for it.
+    </p>
+    
+    <p>
+        <b>HTML5 canvas &amp; Microsoft Internet Explorer (MSIE)</b><br />
+        Microsoft Internet Explorer 8 doesn't natively support the HTML5 &lt;canvas&gt; tag. To support
+        MSIE 8 you will need to use either
+        <a href="http://code.google.com/chrome/chromeframe/" target="_blank">Google Chrome Frame</a> or
+        <a href="http://code.google.com/p/explorercanvas/" target="_blank">ExCanvas from Google</a>
+        (which is included in the RGraph archive). Read more about Internet Explorer compatibility
+        <a href="msie.html">here</a>.
+        
+        <p />
+        
+        <span style="color: #090">
+            Starting with preview 3 <b style="color: black">Microsoft Internet Explorer 9</b> has full support for &lt;canvas&gt;. You can view some screenshots
+            <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a>.
+            MSIE 6 and 7 are supported by way of Google Chrome Frame.
+        </span>
+    </p>
+
+    <p>
+        <b>RGraph and older browsers</b><br />
+        Older browsers (eg Chrome 1, Firefox 3, Safari 3, Opera 9.5) are supported, however if they don't support the canvas shadow or
+        text APIs, these will naturally be unavailable. Earlier versions of these browsers may work, but are untested.
+    </p>
+
+    <a name="performance"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Improving the performance of your charts</h2>
+    
+    <p>
+        Although performance is excellent, (eg compared to server based charts libraries), you may still want to tune
+        RGraph further. The biggest thing you can do is use compression, which reduces the initial download time of the libraries, but
+        there are a number of things you can do:
+    </p>
+    
+    <ul>
+        <li>
+            <b>Compression</b><br />HTTP compression can dramatically reduce your bandwidth bills and increase the speed
+            of your website. The RGraph.common.core.js file for example used to be over 100k, but with compression this was reduced
+            to around 17k. Less than a fifth of the original size! <span style="color: red">If you do only one thing to aid performance,
+            then it should be this.</span>
+            
+            <p>
+                To achieve this with Apache you have a few options:
+            </p>
+            
+            <ul style="list-style-type: disc">
+                <li>You can use the Apache module mod_gzip which compresses the libraries on the fly.</li>
+                <li>
+                    You can compress the libraries manually using the *NIX gzip command, rename them to remove the .gz suffix
+                    and add the header using an Apache directive
+                    (eg <span style="background-color: #C5FFC5; padding: 1px">AddEncoding gzip .js</span>). If you have some sort of
+                    release process/script, it would make sense to add this to it to automate the procedure.
+                </li>
+            </ul>
+            <p>
+        </li>
+
+        <li>
+            <b>Minification</b><br />
+            Minification reduces the size of the library before compression takes effect, removing unnecessary spaces and comments etc.
+            A combination of minification and compression will give superb results. For example, before being split up into seperate files,
+            minification combined with compression reduced the common library from over 100k to roughly 10k (!). There is a PHP shell
+            script that you can use to minify the libraries in the scripts directory.
+
+            <p>
+                You can get pre-minified versions of the libraries <a href="http://www.rgraph.net/RGraph.minified.zip">here</a>.
+            </p>
+        </li>
+        
+        <p>
+
+        <li>
+            <b>Pre-emptive caching</b><br />
+            Slightly different to caching itself, is pre-emptive caching. This involves downloading the libraries before the page that requires
+            them is shown. This way, they're already in the users browser cache and the chart will subsequently appear to be much much
+            quicker. An example of this would be having the library included at the bottom of your index page of your website (optionally
+            with the <b>defer="defer"</b> attribute). The script can be downloaded at will because the page doesn't actually use it, but
+            for subsequent pages it will already be in the users browser cache.
+            
+            <p>
+        </li>
+
+        <li>
+            <b>Caching</b><br />
+            Since the libraries you're using won't change that often, you can set distant Expires: headers on them, or appropriate
+            Cache-Control: headers, and the client will not even have to contact your server for it. When you want to make sure
+            the library is re-downloaded (eg. you update the library), then simply change the filename.
+            
+            <p>
+        </li>
+
+        <li>
+            <b>Script tag placement</b><br />
+            According to <a href="http://developer.yahoo.com/performance/" target="_blank">Yahoo! guidelines</a> placing the &lt;SCRIPT&gt;
+            tag at the bottom of the page can increase the percieved load time. If you do this, then your charts should be
+            created in the window.onload event, otherwise the browser may try to create them without the library
+            having been loaded, and will therefore subsequently fail.
+
+            <p>
+
+            You should also consider the effect that this has when your page is rather weighty. If the page is weighty there
+            will be a small delay before the onload event fires, and therefore creates the chart. This might not be so bad if the
+            chart is not immediately visible, however if it is then you should carefully consider using the onload event. You
+            may wish to load the library in the page header, define the canvas tag and then immediately define the javascript
+            that creates the chart. This way
+            the chart will be created and shown, and then the rest of the page loads. The end result is that your chart
+            appears to be faster.
+            
+            <p />
+            
+            Between the onload event, asychronous Javascript and careful tag placement, you will need to experiment to get the right result
+            for you.
+        </li>
+        
+        <li>
+            <b>Document structure</b><br />
+            The structure of your document can have a significant impact on how fast your charts are displayed. If, for example, you use
+            tables for layout, this can delay the display of elements that are affected by the size of the table. Where possible, you
+            should consider trying to convert your layout to DIVs. An example of this is the front page of this website. The charts
+            were right aligned using a table as a container. This caused a visible delay when showing them. In this case it was a
+            simple matter to convert the page to use DIVs, and the page subsequently displays much faster.
+            <p />
+        </li>
+        
+        <li>
+            <b>Creating your charts asynchronously</b><br />
+            Where possible, you may wish to create your charts asynchronously. This allows the browser to continue rendering the page
+            immediately after getting to the code that creates the chart. This might not be perceptible if you don't have a lot of
+            charts, or your page is small. You can read a little more about this and see example code <a href="async.html">here</a>.
+
+            <p />
+            
+            Note that recent releases of Google Chrome (from a dev release of version 4) have had an issue with creating charts
+            asynchronously, which presents itself by not drawing text sometimes (it's not consistent). Simply not using
+            asynchronous chart production in this case resolves the issue.
+        </li>
+        
+        <li>
+            <b>DOMContentLoaded event</b><br />
+            Using this event can speed up the display of your charts signifcantly compared to the more well known <i>onload</i> event.
+            It is supported by Chrome, Gecko based browsers (ie Firefox), Safari, Opera and Internet Explorer 9. This event fires when
+            the structure of the page is loaded, but not necessarily the images or CSS. This means that if your page is laden with
+            images, this event will fire before the onload event, thus creating your charts quicker. The effect can be very noticeable.
+            
+            <pre class="code">
+function addListener(func)
+{
+    if(window.addEventListener) {
+        window.addEventListener('DOMContentLoaded', func, false);
+    } else {
+        document.attachEvent("onDOMContentLoaded", func);
+    }
+}
+</pre>
+            You can read more about the <i>DOMContentLoaded</i> event on the Mozilla site, <a href="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events" target="_blank">here</a>,
+            and the Microsoft site <a href="http://ie.microsoft.com/testdrive/HTML5/87DOMContent-Loaded/Default.html" target="_blank">here</a>.
+            There's an example <a href="domcontentloaded.html">here</a>.
+            <p />
+        </li>
+        
+        <li>
+            <b>AJAX requests</b><br />
+            If you can take advantage of AJAX, you can use this method to retrieve data from your server. If, for example, you have a chart that
+            shows ongoing information, instead of simply refreshing the entire page, you could use an AJAX request to just retrieve the
+            data that you want and update the chart that way. This reduces the amount of data needed to be transferred, thus reducing the
+            bandwidth used, and will be quicker than a full page refresh, particularly if your page is weighty. There's a simple AJAX
+            function that you can use <a href="#ajax">below</a>.
+            <p />
+        </li>
+        
+        <li>
+            <b>Combining libraries</b><br />
+            You may wish to consider combining the RGraph libraries into a single file.
+            This won't save on the size of the individual libraries, but will save on the headers that are sent as part of the response.
+            If a typical response sends 500 bytes worth of headers, and you send four chart libraries, then combining the libraries
+            would save 1500 bytes. Multiple factors need to be considered though, including things like caching, which can circumvent
+            the unneccessary repeated downloading of the libraries.
+            
+            <p>
+                To make your life straight-forward, you may want to make this a part of your release script/process. This way you
+                can make changes to the scripts in your development environment as you would normally.
+            </p>
+            
+            <p>
+                Another effect of combining libraries is reducing the amount of HTTP connections needed to retrieve them. Most browsers
+                have a limit on how many connections they can create simultaneously, so if they're not being used to retrieve your
+                chart libraries, they can be used for something else. Reducing the number of HTTP connections also eliminates the time
+                spent setting up those connections.
+            </p>
+        </li>
+    </ul>
+    
+    <b>A reasonable performance strategy</b>
+    
+    <p>
+        Although there's a lot you can do in regards to performance, a few of the points here will suffice for most
+        websites:
+        
+        <ul>
+            <li>Compression</li>
+            <li>Minification</li>
+            <li>Pre-emptive caching</li>
+            <li>Caching</li>
+        </ul>
+        
+        The number one thing you should do is compress your libraries. This has multiple benefits and provides by far the most gain,
+        effectively for free. Secondly, use the minified libraries. Since you can download them <a href="../RGraph.minified.zip">here</a>,
+        you might as well use them. Then we have pre-emptive caching. Since most websites won't show charts on the front page or will
+        have a login page that is shown before any charts, this effectively eliminates the charts library download. And lastly caching
+        should be done as a matter of course. There's no reason to keep downloading the same library so even caching for only 30 minutes
+        (or the duration of an average visit to your website) will produce results.
+    </p>
+    
+    <p>
+        <b>General website performance tools</b><br /><br />
+        
+        If your aim is to improve your websites performance as a whole then you may be interested in these tools:
+    </p>
+    
+    <ul>
+        <li>
+            <a href="http://www.webpagetest.org/" target="_blank">http://www.webpagetest.org/</a><br />
+            This site can provide a wealth of information about how to improve the permance of your website, specific to your site.<br /><br />
+        </li>
+
+        <li>
+            <a href="http://code.google.com/speed/page-speed/docs/using_chrome.html" target="_blank">Page Speed for Google Chrome</a><br />
+            <a href="http://code.google.com/speed/page-speed/docs/using_firefox.html" target="_blank">Page Speed for Mozilla Firefox</a><br />
+            <a href="http://pagespeed.googlelabs.com/" target="_blank">Page Speed online</a><br />
+            The Page Speed plugins and the online tool also provide a great deal of information about how to speed up your website.<br /><br />
+        </li>
+    </ul>
+    
+    <a name="implementation"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Implementing RGraph</h2>
+    
+    <p>
+        Getting RGraph up and running is very easy and consists of three steps. If you're having trouble I suggest you get hold of a copy of
+        <a href="http://www.mozilla.com" target="_blank">Firefox</a> along with <a href="http://www.getfirebug.com" target="_blank">Firebug</a> - its
+        Javascript error console will make debugging your issue much easier. Many problems are down to a library not having been included or
+        not using the onload event when you need to. You might also benefit from using the <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer toolbar</a>
+        for Firefox. This allows you to easily disable caching, thus eliminating any problems that that causes. You could equally use
+        the Chrome developer tools (CTRL+SHIFT+J), optionally in docked mode, which also provides a good quality Javascript console.
+    </p>
+
+    <ol>
+        <li>
+            Include the libraries (put this in your documents &lt;HEAD&gt;):
+<pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+
+&lt;script src="RGraph.common.adjusting.js"&gt;&lt;/script&gt; &lt;!-- Just needed for adjusting --&gt;
+&lt;script src="RGraph.common.annotate.js"&gt;&lt;/script&gt;  &lt;!-- Just needed for annotating --&gt;
+&lt;script src="RGraph.common.context.js"&gt;&lt;/script&gt;   &lt;!-- Just needed for context menus --&gt;
+&lt;script src="RGraph.common.resizing.js"&gt;&lt;/script&gt;  &lt;!-- Just needed for resizing --&gt;
+&lt;script src="RGraph.common.tooltips.js"&gt;&lt;/script&gt;  &lt;!-- Just needed for tooltips --&gt;
+&lt;script src="RGraph.common.zoom.js"&gt;&lt;/script&gt;      &lt;!-- Just needed for zoom --&gt;
+
+&lt;script src="RGraph.bar.js"&gt;&lt;/script&gt;              &lt;!-- Just needed for bar charts --&gt;
+&lt;script src="RGraph.bipolar.js"&gt;&lt;/script&gt;          &lt;!-- Just needed for bi-polar charts --&gt;
+&lt;script src="RGraph.funnel.js"&gt;&lt;/script&gt;           &lt;!-- Just needed for funnel charts --&gt;
+&lt;script src="RGraph.gantt.js"&gt;&lt;/script&gt;            &lt;!-- Just needed for gantt charts --&gt;
+&lt;script src="RGraph.hbar.js"&gt;&lt;/script&gt;             &lt;!-- Just needed for horizontal bar charts --&gt;
+&lt;script src="RGraph.hprogress.js"&gt;&lt;/script&gt;        &lt;!-- Just needed for horizontal progress bars --&gt;
+&lt;script src="RGraph.led.js"&gt;&lt;/script&gt;              &lt;!-- Just needed for LED charts --&gt;
+&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;             &lt;!-- Just needed for line charts --&gt;
+&lt;script src="RGraph.meter.js"&gt;&lt;/script&gt;            &lt;!-- Just needed for meter charts --&gt;
+&lt;script src="RGraph.odo.js"&gt;&lt;/script&gt;              &lt;!-- Just needed for odometers --&gt;
+&lt;script src="RGraph.pie.js"&gt;&lt;/script&gt;              &lt;!-- Just needed for pie AND donut charts --&gt;
+&lt;script src="RGraph.rose.js"&gt;&lt;/script&gt;             &lt;!-- Just needed for rose charts --&gt;
+&lt;script src="RGraph.rscatter.js"&gt;&lt;/script&gt;         &lt;!-- Just needed for rscatter charts --&gt;
+&lt;script src="RGraph.scatter.js"&gt;&lt;/script&gt;          &lt;!-- Just needed for scatter charts --&gt;
+&lt;script src="RGraph.radar.js"&gt;&lt;/script&gt;            &lt;!-- Just needed for radar charts --&gt;
+&lt;script src="RGraph.vprogress.js"&gt;&lt;/script&gt;        &lt;!-- Just needed for vertical progress bars --&gt;
+</pre>
+        </li>
+
+        <li>
+            Add the canvas tag (put it where you want the chart to appear):
+<pre class="code">
+&lt;canvas id="myCanvas" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+</pre>
+        </li>
+
+        <li>
+            Create the chart (since it is using the onload event, you can put this anywhere):
+            
+<pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [280, 45, 133, 166, 84, 259, 266, 960, 219, 311, 67, 89];
+
+        var bar = new RGraph.Bar('myCanvas', data);
+        bar.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        bar.Set('chart.gutter.left', 35);
+        bar.Draw();
+    }
+&lt;/script&gt;
+</pre>
+        </li>
+    </ol>
+
+    <p>
+        There's also a very <a href="../examples/basic.html">basic example</a> of using RGraph, that does very little. It can be helpful to
+        illustrate how you can get RGraph up and running.
+    </p>
+    
+    <a name="structure"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Suggested structure for RGraph</h2>
+    
+    <img src="../images/structure.png" width="175" height="205" alt="Suggested structure for RGraph" style="float: right" />
+    
+    <p>
+        The suggested layout structure for the RGraph libraries is shown on the right. The <b>www.example.com</b> folder represents
+        the root/top level of your website with the <b>javascript</b> directory beneath that. The <b>css</b> and <b>images</b>
+        folders are shown for
+        illustrative purposes only. If you follow this layout then your URLs to the RGraph libraries would be:
+    </p>
+    
+    <p>
+        <b>http://www.example.com/javascript/rgraph/RGraph.common.core.js</b><br />
+        <b>http://www.example.com/javascript/rgraph/RGraph.bar.js</b><br />
+        etc
+    </p>
+    
+    <p>
+        By using this structure you make RGraph easy to update should you need to, and also keep all the RGraph libraries in
+        one, easy to find, place.
+    </p>
+
+    <br clear="all" />
+
+    <a name="integration"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Integration with server side scripting</h2>
+    
+    <p>
+        This is a very easy process, as easy as sending content to the browser. All you need to do is make the <i>data</i> variable
+        (as in the example below) contain the data you want to be displayed. Eg:
+    </p>
+
+    <pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;
+
+&lt;canvas id="myCanvasTag" width="600" height="200"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script&gt;
+    data = [78,16,26,23,25,51,34,64,84,84];
+
+    line = new RGraph.Line("myCanvasTag", data);
+    line.Set("chart.labels", ["Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov"]);
+    line.Draw();
+&lt;/script&gt;
+</pre>
+    
+    <p>
+        To get the above using PHP you could do this:
+    </p>
+    
+    <pre class="code">&lt;?php
+    // This simply makes a string out of the array of data
+    $myData = join(',', array(78,16,26,23,25,51,34,64,84,84));
+
+    // This prints out the required HTML markup
+    print('&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;' . "\n");
+    print('&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;' . "\n\n");
+    print('&lt;canvas id="myCanvasTag" width="600" height="200"&gt;[No canvas support]&lt;/canvas&gt;' . "\n\n");
+    print('&lt;script&gt;' . "\n");
+    print('    var data = [' . $myData . '];' . "\n\n");
+    print('    var line = new RGraph.Line("myCanvasTag", data);' . "\n");
+    print('    line.Set("chart.labels", ["Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov"]);' . "\n");
+    print('    line.Draw();' . "\n");
+    print('&lt;/script&gt;');
+?&gt;
+</pre>
+
+    <p>
+        Strictly speaking the <span style="font-family: Monospace">var</span> isn't necessary, however if you put the code inside a
+        function (like window.onload), it's probably best to do so as using <span style="font-family: Monospace">var</span> will
+        make the variable local, and not global. So doing so will help prevent naming clashes.
+    </p>
+
+
+    <a name="mysql"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Integration with PHP &amp;  MySQL</h4>
+    
+        <p>
+            This is a simple matter of formatting what you get back from MySQL into a string, as the MySQL dump and PHP code
+            below shows (it's based on a database called RGraph_example):
+        </p>
+        
+        <pre class="code">
+#
+# Table structure for table `daily_statistics`
+#
+
+CREATE TABLE `daily_statistics` (
+  `st_day` char(9) NOT NULL,
+  `st_statistics` tinyint(4) NOT NULL,
+  UNIQUE KEY `st_day` (`st_day`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+#
+# Dumping data for table `daily_statistics`
+#
+
+INSERT INTO `daily_statistics` VALUES ('Mon', 124);
+INSERT INTO `daily_statistics` VALUES ('Tue', 95);
+INSERT INTO `daily_statistics` VALUES ('Wed', 64);
+INSERT INTO `daily_statistics` VALUES ('Thu', 94);
+INSERT INTO `daily_statistics` VALUES ('Fri', 75);
+INSERT INTO `daily_statistics` VALUES ('Sat', 98);
+INSERT INTO `daily_statistics` VALUES ('Sun', 84);
+</pre>
+
+        <pre class="code">
+&lt;?php
+    /**
+    * Change these to your own credentials
+    */
+    $hostname = "localhost";
+    $username = "root";
+    $password = "PASSWORD";
+    $database = "RGraph_example";
+    
+    $connection = mysql_connect($hostname, $username, $password) OR die('Could not connect to MySQL: ' . mysql_error());
+    mysql_select_db($database);
+    
+    $result = mysql_query("SELECT st_day, st_statistics FROM daily_statistics");
+    if ($result) {
+    
+        $labels = array();
+        $data   = array();
+    
+        while ($row = mysql_fetch_assoc($result)) {
+            $labels[] = $row["st_day"];
+            $data[]   = $row["st_statistics"];
+        }
+
+        // Now you can aggregate all the data into one string
+        $data_string = "[" . join(", ", $data) . "]";
+        $labels_string = "['" . join("', '", $labels) . "']";
+    } else {
+        print('MySQL query failed with error: ' . mysql_error());
+    }
+?&gt;
+&lt;html&gt;
+&lt;head&gt;
+
+    &lt;!-- Don't forget to update these paths --&gt;
+
+    &lt;script src="libraries/RGraph.common.core.js" &gt;&lt;/script&gt;
+    &lt;script src="libraries/RGraph.line.js" &gt;&lt;/script&gt;
+
+&lt;/head&gt;
+&lt;body&gt;
+    
+    &lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+    &lt;script&gt;
+        chart = new RGraph.Line('cvs', &lt;?php print($data_string) ?&gt;);
+        chart.Set('chart.background.grid.autofit', true);
+        chart.Set('chart.gutter.left', 35);
+        chart.Set('chart.gutter.right', 5);
+        chart.Set('chart.hmargin', 10);
+        chart.Set('chart.tickmarks', 'endcircle');
+        chart.Set('chart.labels', &lt;?php print($labels_string) ?&gt;);        
+        chart.Draw();
+    &lt;/script&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+    <p>
+        This PHP code provides the data in two strings - <i>$labels_string</i> and <i>$data_string</i>. These variables are then used
+        in the RGraph code to provide the data and the labels.
+    </p>
+    
+    <p><b>Remember:</b></p>
+    
+    <ul>
+        <li>Change the database hostname/username/password/database to match your own.</li>
+        <li>Ensure you have the correct paths to the RGraph libraries.</li>
+    </ul>
+
+    <a name="ajax"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Making AJAX requests</h4>
+
+        <p style="background-color: #ffa; padding: 3px; border: 1px dashed black">
+            <b>Note:</b>
+            It is important that you're careful with types when making AJAX requests. Since the response is initially a string,
+            and your AJAX function/library may not do conversions for you, you may need to convert these strings to numbers. To
+            do this you can use the <i>Number()</i> or <i>parseInt()</i> functions. For example:
+        </p>
+
+        <pre class="code">
+&lt;script&gt;
+    num = Number('23');
+    num = parseInt('43');
+&lt;/script&gt;
+</pre>
+
+        <p>
+            Here is a simple function that you could use to get data from your server using AJAX:
+        </p>
+
+    <pre class="code">
+&lt;script&gt;
+    /**
+    * Makes an AJAX call. It calls the given callback (a function) when ready
+    * 
+    * @param string   url      The URL to retrieve
+    * @param function callback A function object that is called when the response is ready, there's an example below
+    *                          called "myCallback".
+    */
+    function AjaxCall (url, callback)
+    {
+        // Mozilla, Safari, ...
+        if (window.XMLHttpRequest) {
+            var httpRequest = new XMLHttpRequest();
+        
+        // MSIE
+        } else if (window.ActiveXObject) {
+            var httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
+        }
+        
+        httpRequest.onreadystatechange = callback;
+        
+        httpRequest.open('GET', url, true);
+        httpRequest.send();
+    }
+
+
+    /**
+    * This sample callback function is called when the data is ready (readyState=4)
+    */
+    function myCallback ()
+    {
+        if (this.readyState == 4 && this.status == 200) {
+            // Everything is good, the response is received
+            alert(this.responseText);
+        }
+    }
+&lt;/script&gt;
+</pre>
+
+    <p>And you would use it like this:</p>
+    
+    <pre class="code">
+&lt;script&gt;
+    AjaxCall('http://www.example.com/getSomething.php', myCallback);
+&lt;/script&gt;
+</pre>
+
+    <p>
+        There's an example <a href="dynamic.html">here</a> that shows updating your chart dynamically.
+    </p>
+
+
+    <a name="support"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h2>Support forum</h2>
+    
+    <div style="text-align: center">
+        <span style="background-color: #efe; padding: 3px; border: 1px solid black; border-radius: 15px; padding-left: 10px; padding-right: 10px">
+            <b>
+                Join the support forum:
+                <a href="http://support.rgraph.net">http://support.rgraph.net</a>
+            </b>
+        </span>
+    </div>
+    
+    <p>
+        Support is available via a public forum. If you think that the issue you have is common, try the <a href="issues.html">issues</a>
+        page first. If you just want to read the group you can and there's also an
+        <a target="_blank" href="http://support.rgraph.net/feeds.html"><b>RSS feed</b></a> that you can subscribe to if you prefer.
+    </p>
+    
+    <p>
+        If you want to keep up-to-date on RGraph, then also subscribe to the RSS feed, as I post update notifications here. You can
+        also follow me on <a href="http://twitter.com/_rgraph"><b>Twitter</b></a>. I post update notifications here along with HTML5
+        related news.
+    </p>
+
+    <br />
+    <br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/ingraph.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/ingraph.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/ingraph.html	(revision 225)
@@ -0,0 +1,171 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - In-graph labels</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs ingraph in-graph" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about in-graph labels" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.scatter.js" ></script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        In-graph labels
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - In-graph labels</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <br />
+
+    <p>
+        This page shows the various options for in-graph labels. The in-graph labels can be set like this:
+    </p>
+    
+    <pre class="code">obj.Set('chart.labels.ingraph', [,,'Hoolio',,'Olga']);</pre>
+    
+    <p>
+        Or like this if you want to be more specific:
+    </p>
+    
+    <pre class="code">obj.Set('chart.labels.ingraph', [,,<span style="color: green">['Hoolio', 'red', 'yellow', -1, 60]</span>,,'Olga']);</pre>
+
+    <p>
+        The array can consist of:
+    </p>
+    
+    <ul>
+        <li>The label text</li>
+        <li>The text color</li>
+        <li>The background color</li>
+        <li>This can be 1 or -1 and denotes whether the label should be above or below the line. This has no effect in Bar or Scatter charts</li>
+        <li>The length of the label pointer/arrow</li>
+    </ul>
+    
+    <h4>Example line chart</h4>
+    
+    <canvas id="line" width="600" height="250">[No canvas support]</canvas>
+    <script>
+        myGraph = new RGraph.Line('line', [4,5,6,3,2,5,6,4,2,4,1]);
+        myGraph.Set('chart.title', 'Line chart with in-graph labels');
+        myGraph.Set('chart.labels', ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe']);
+        myGraph.Set('chart.labels.ingraph', [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga']);
+        myGraph.Draw();
+    </script>
+    
+    <h4>Example bar chart</h4>
+
+    <canvas id="bar" width="600" height="250">[No canvas support]</canvas>
+    <script>
+        myGraph = new RGraph.Bar('bar', [4,5,6,3,2,5,6,4,2,4,1]);
+        myGraph.Set('chart.colors', ['#fcc']);
+        myGraph.Set('chart.title', 'Bar chart with in-graph labels');
+        myGraph.Set('chart.labels', ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe']);
+        myGraph.Set('chart.labels.ingraph', [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga']);
+        myGraph.Draw();
+    </script>
+
+    <canvas id="scatter" width="600" height="250">[No canvas support]</canvas>
+    <script>
+        myGraph = new RGraph.Scatter('scatter', [[5,15],[24,30],[27,3],[23, 5]], [[4,12]]);
+        myGraph.Set('chart.title', 'Scatter chart with in-graph labels');
+        myGraph.Set('chart.labels', ['W1','W2','W3','W4']);
+        myGraph.Set('chart.labels.ingraph', [null,null,['Hoolio', 'red', 'yellow', -1, 60],'Olga','Fred']);
+        myGraph.Set('chart.xmax', 31);
+        myGraph.Draw();
+    </script>
+    
+    <h4>Example bar chart (arrow variant)</h4>
+
+    <canvas id="bar1" width="600" height="250">[No canvas support]</canvas>
+    <script>
+        myGraph = new RGraph.Bar('bar1', [4,5,6,3,2,5,6,4,2,4,1]);
+        myGraph.Set('chart.colors', ['#fcc']);
+        myGraph.Set('chart.title', 'Bar chart with in-graph labels (arrow variant)');
+        myGraph.Set('chart.labels', ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe']);
+        myGraph.Set('chart.variant', 'arrow');
+        myGraph.Set('chart.labels.ingraph', [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga']);
+        myGraph.Draw();
+    </script>
+
+    
+    <h4>Example bar chart (dot variant)</h4>
+    <canvas id="bar2" width="600" height="250">[No canvas support]</canvas>
+    <script>
+        myGraph = new RGraph.Bar('bar2', [4,5,6,3,2,5,6,4,2,4,1]);
+        myGraph.Set('chart.colors', ['#fcc']);
+        myGraph.Set('chart.title', 'Bar chart with in-graph labels (dot variant)');
+        myGraph.Set('chart.labels', ['Jim','Gail','Hoolio','Kev','Olga','Jimmy','Paul','Jake','John','Fred', 'Jobe']);
+        myGraph.Set('chart.labels.ingraph', [6,['Foo', 'red', 'yellow', null, 75],3,'Bar']);
+        myGraph.Set('chart.variant', 'dot');
+        myGraph.Set('chart.labels.ingraph', [,,['Hoolio', 'red', 'yellow', -1, 60],,'Olga']);
+        myGraph.Draw();
+    </script>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/issues.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/issues.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/issues.html	(revision 225)
@@ -0,0 +1,166 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Common issues</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs common issues" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about common issues" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Common issues
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Common issues</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <div style="text-align: center">
+        <span style="background-color: #efe; padding: 3px; border: 1px solid black; border-radius: 15px; padding-left: 10px; padding-right: 10px">
+            <b>
+                Join the support forum:
+                <a href="http://support.rgraph.net">http://support.rgraph.net</a>
+            </b>
+        </span>
+    </div>
+
+    <p>
+        These are some common issues that you should be aware of. If you're having trouble, you may want to look through these to see
+        if any apply to you or may be the source of your problem.
+    </p>
+
+    <a name="tooltips"></a>
+    <h4>Tooltips not working as of the October 2010 release</h4>
+
+    <p>
+        If you're specifying numbers instead of strings for your tooltips, they will not work any more. Simply cast them to
+        strings, like this:
+    </p>
+    
+    <pre class="code">
+<span style="color: red">
+// This WILL NOT work any more
+myBar.Set('chart.tooltips', [56, 67, 53]);
+</span>
+<span style="color: green">
+// Do any of these instead
+myBar.Set('chart.tooltips', ['56', (67).toString(), String(53)]);</span>
+</pre>
+
+    <a name="annotations"></a>
+    <h4>Annotations aren't saved when running locally in Mozilla Firefox</h4>
+
+    <p>
+        The solution here is to run the charts using a web server. At this time (March 2010) only Safari, Chrome and Opera
+        support saving annotations when running locally.
+    </p>
+
+    <a name="missing.text"></a>
+    <h4>Missing text in Google Chrome</h4>
+
+    <p>
+        Since one of the Chrome 4 dev releases there has been an issue with Google Chrome 4 and 5, asynchronous processing and  not rendering
+        chart labels. This has been remedied by simply not using asynchronous processing. Because of the tag placement on the front page,
+        the effect shouldn't be apparent. Other browsers (eg Firefox, Safari, Opera, MSIE) are fine.
+    </p>
+    
+    <p>
+        <b>Update:</b> Currently, (roughly March 2011), the missing text issue appears to be much less evident, if not resolved entirely.
+    </p>
+
+    <a name="firefox.tooltips.clipboard"></a>
+    <h4>Firefox, tooltips and the clipboard</h4>
+
+    <p>
+        Firefox, tooltips and using the clipboard is a little convoluted. To copy the text in a tooltip you must do the following:
+    </p>
+
+    <ol>
+        <li style="margin-top: 0">Select the text you want with the mouse.</li>
+        <li style="margin-top: 0">Press CTRL+C (it may be a different key combination if you're not using Windows) to copy the text to the clipboard.</li>
+    </ol>
+    
+    <p>
+        <b>Note:</b> Recent versions of Firefox 4 (from beta 6 onwards) appear to work as expected, and you can copy text with the mouse as normal.
+    </p>
+
+    <h4>Shadows in Google Chrome and the line chart</h4>
+
+    <p>
+        Shadows in recent versions of Google Chrome are somewhat broken. Firefox, MSIE, Opera and Safari are fine. The reason for this
+        error is a combination of factors it seems - shadow blurring and line width. Fixes have been added to allow shadow blurring and
+        a 1 pixel linewidth, though some chart types may still be affected.
+    </p>
+
+<!--
+
+    <p>
+        <b></b><br />
+    </p>
+-->
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/keys.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/keys.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/keys.html	(revision 225)
@@ -0,0 +1,157 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Examples of keys</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            var pie = new RGraph.Pie('myPie', [45,43,23,68,84,41]);
+            pie.Set('chart.title', 'A pie chart showing gutter mode');
+            
+            pie.Set('chart.key', ['John','Fred','Lou','Pete','Kevin','Gary']);
+            pie.Set('chart.key.position', 'gutter');
+            pie.Set('chart.key.position.y', pie.canvas.height - 35);
+            pie.Set('chart.key.rounded', false);
+            pie.Set('chart.key.shadow', true);
+            pie.Set('chart.key.shadow.offsetx', 3);
+            pie.Set('chart.key.shadow.offsety', 3);
+            pie.Set('chart.key.shadow.blur', 0);
+            pie.Set('chart.key.shadow.color', '#aaa');
+
+            pie.Draw();
+
+            var line = new RGraph.Line('myLine', [8,4,2,5,6,4,3,7,8,9,7,6], [4,3,1,6,5,8,4,9,8,7,4,6]);
+            line.Set('chart.key', ['Richard', 'Fred']);
+            line.Set('chart.title', 'A line chart showing the key in graph mode (interactive)');
+            line.Set('chart.key.position', 'graph');
+            line.Set('chart.key.shadow', true);
+            line.Set('chart.key.shadow.offsetx', 0);
+            line.Set('chart.key.shadow.offsety', 0);
+            line.Set('chart.key.shadow.blur', 15);
+            line.Set('chart.key.shadow.color', '#ccc');
+            line.Set('chart.key.interactive', true);
+            line.Set('chart.hmargin', 5);
+            line.Set('chart.linewidth', 3);
+            line.Set('chart.labels', ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']);
+            line.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Examples of keys in charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Examples of keys in charts</h1>
+
+    <div style="float: right; display: inline-block; width: 650px">
+        <canvas id="myLine" width="600" height="250" style="float: right">[No canvas support]</canvas>
+        <canvas id="myPie" width="450" height="250" style="float: right">[No canvas support]</canvas>
+    </div>
+
+    <p>
+        As of 4th December 2010 the code that produces the keys has been rewritten. There are two variants of keys available,
+        a horizontal one designed to sit in the gutter, and a vertical one that is designed to sit on top of (ie over) the chart.
+    </p>
+    
+    <p>
+        The actual positioning is now configurable though, so you could have a horizontal key and position it to sit on top
+        of the chart.
+    </p>
+    
+    <h4>Key properties</h4>
+    
+    <p>
+        The available key properties and their defaults are listed below (some chart types have slightly different defaults to
+        suit):
+    </p>
+
+
+    <ul>
+        <li>chart.key (<i>[] (An empty array)</i>)</li>
+        <li>chart.key.position (<i>graph</i>)</li>
+        <li>chart.key.position.gutter.boxed (<i>true</i>)</li>
+        <li>chart.key.position.x (<i>null</i>)</li>
+        <li>chart.key.position.y (<i>null</i>)</li>
+        <li>chart.key.shadow (<i>false</i>)</li>
+        <li>chart.key.shadow.offsetx (<i>2</i>)</li>
+        <li>chart.key.shadow.offsety (<i>2</i>)</li>
+        <li>chart.key.shadow.color (<i>#666</i>)</li>
+        <li>chart.key.shadow.blur (<i>3</i>)</li>
+        <li>chart.key.color.shape (<i>square</i>)</li>
+        <li>chart.key.background (<i>white</i>)</li>
+        <li>chart.key.rounded (<i>true</i>)</li>
+        <li>chart.key.text.size (<i>10</i>)</li>
+    </ul>
+    
+    <h4>Interactive keys</h4>
+        <p>
+            The Line chart supports interactive keys - as shown in the example. This is only available when the key
+            is in <i>graph</i> mode. This allows you to click a key item and it will be highlighted on the chart.
+        </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/led.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/led.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/led.html	(revision 225)
@@ -0,0 +1,178 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - LED Grid documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs LED chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about LED charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        LED Grids
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - LED Grid documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        The LED grid can be used to represent simple letters and numbers.
+    </p>
+    
+    <p> 
+        The example file is <a href="../examples/led.html">here</a>.
+    </p> 
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var led = new RGraph.LED('myCanvas', '456461');
+        led.Set('chart.dark', '#666');
+        led.Set('chart.light', 'rgba(255,255,255,1)');
+        led.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the LED grid apears.
+    </p>
+    
+    <ul>
+        <li><a href="#chart configuration">Chart configuration</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+    </ul>
+
+
+<a name="chart configuration"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Chart configuration</h3>            <a name="chart.dark"></a>
+<b>chart.dark</b><br />
+            Color of the darkened (ie unlit) lights<br /><i>Default: #eee</i><br /><br />
+            <a name="chart.light"></a>
+<b>chart.light</b><br />
+            Color of lit lights<br /><i>Default: #f66</i><br /><br />
+            <a name="chart.background"></a>
+<b>chart.background</b><br />
+            The color of the background.<br /><i>Default: white</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/licensing.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/licensing.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/licensing.html	(revision 225)
@@ -0,0 +1,195 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Licensing FAQs</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart licensing" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about licensing" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body id="licensing">
+    
+    <a name="top"></a>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Licensing FAQs
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Licensing FAQs</h1>
+
+    <div style="padding-top: 35px; float: right; margin-right: 50px; text-align: center">
+            <form action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/456239608328156" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
+                <input name="item_name_1" type="hidden" value="RGraph License" />
+                <input name="item_description_1" type="hidden" value="License for RGraph: Javascript charts and graph library" />
+                <input name="item_quantity_1" type="hidden" value="1" />
+                <input name="item_price_1" type="hidden" value="79.0" />
+                <input name="item_currency_1" type="hidden" value="GBP" />
+                <input name="_charset_" type="hidden" value="utf-8" />
+                <input alt="" width="116" height="61" src="../images/buy.png" type="image" />
+            </form>
+    
+            <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+                <input type="hidden" name="cmd" value="_s-xclick">
+                <input type="hidden" name="hosted_button_id" value="FDVK4T4GKQ6M8">
+                <input type="image" src="../images/paypal.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
+                <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
+            </form>
+    </div>
+
+    <p>
+        If you have any questions regarding licensing, these are some FAQs that should help answer them.
+    </p>
+    
+    <h2>FAQs</h2>
+
+    <ul>
+        <li><a href="#do.i.need.to.buy.a.license"><b>Do I need to buy a license?</b></a></li>
+        <li><a href="#how.many.licenses.do.i.need">How many licenses do I need?</a></li>
+        <li><a href="#how.much.is.a.license">How much is a license?</a></li>
+        <li><a href="#where.can.i.read.the.license">Where can I read the license?</a></li>
+        <li><a href="#what.does.the.license.cover">What does the license cover?</a></li>
+        <li><a href="#can.you.send.me.an.invoice">Can you send me an invoice?</a></li>
+        <li><a href="#can.i.use.paypal">Can I use PayPal?</a></li>
+    </ul>
+
+    <a name="do.i.need.to.buy.a.license"></a>
+
+    <ul>
+        <li><a href="#contact">Contact</a></li>
+        <li><a href="#license.text">License</a></li>
+    </ul>
+
+    
+
+    <div class="code">
+        <b>Do I need to buy a license?</b><br /><br />
+        For commercial/business use yes, you need a license to use RGraph. RGraph is not free software.
+        For non-commercial use (eg personal, charity, government and educational), RGraph is freely usable. You can
+        read the license itself <a href="#license.text">here</a>.
+    </div>
+    
+    <br /><br />
+
+    <a name="how.many.licenses.do.i.need"></a>
+    <p>&nbsp;</p>
+    <b>How many licenses do I need?</b><br /><br />
+    Regardless of how much you choose to use RGraph in your organisation or in the software you make, you are only required to buy
+    one RGraph license.
+    
+    <a name="how.much.is.a.license"></a>
+    <p>&nbsp;</p>
+    
+    
+    <b>How much is a license?</b><br /><br />
+    A license is a one-time fee of <b>&pound;79</b> (UK pounds). That's roughly $80 (US dollars) at
+    the time of writing.
+
+    
+    <a name="where.can.i.read.the.license"></a>
+    <p>&nbsp;</p>
+    
+    <b>Where can I read the license?</b><br /><br />
+    The license is further down this page.
+    
+    <br /><br />
+    
+    <a name="what.does.the.license.cover"></a>
+    <p>&nbsp;</p>
+    <b>What does the license cover?</b><br /><br />
+    The RGraph license covers RGraph as a whole. Excepting ExCanvas, all code that you find in the RGraph archive is
+    covered by the RGraph license.<br /><br />
+    
+    <br /><br />
+
+    <a name="can.you.send.me.an.invoice"></a>
+    <p>&nbsp;</p>
+    <b>Can you send me an invoice?</b><br /><br />
+    Of course, simply go here: <a href="http://www.rgraph.net/invoice.html">http://www.rgraph.net/invoice.html</a>, enter your email
+    address and you'll be sent an invoice that you can use for tax purposes.
+
+    
+    <br /><br />
+
+    <a name="can.i.use.paypal"></a>
+    <p>&nbsp;</p>
+    <b>Can I use PayPal?</b><br /><br />
+    Yes, you can use PayPal if you prefer. Please use the PayPal button <a href="#top">above</a> to start the process.
+    
+    <br /><br />
+
+
+    <a name="contact"></a>
+    <p>&nbsp;</p>
+    <h2>Contact</h2>
+    <p>
+        If you have a question about RGraph licensing, you can send it to <a href="mailto:licensing@rgraph.net">licensing@rgraph.net</a>
+        or you can order directly using <a href="licensing.html" onclick="document.getElementById('BB_BuyButtonForm').submit(); return false">Google Checkout</a> or
+        <a href="licensing.html" onclick="document.getElementById('ppform').submit(); return false">Paypal</a>.
+    </p>
+    
+    <a name="license.text"></a>
+    <p>&nbsp;</p>
+    <h2>License</h2>
+    
+    <p>
+        The license text:
+    </p>
+    <iframe width="100%" height="400" src="../LICENSE.txt"></iframe>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/line.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/line.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/line.html	(revision 225)
@@ -0,0 +1,864 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - line charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas docs line charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Line charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Line charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Line charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Line charts, along with Bar charts, are probably the most configurable of all the charts available.
+    </p>
+    
+    <p>
+        The example file is <a href="../examples/line.html">here</a>.
+    </p>
+    
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+        <li><a href="#available.methods">Methods</a></li>
+        <li><a href="#combining.line.bar">Combining  the Line and Bar charts</a></li>
+        <li><a href="#alternative.colors">Alternative colors</a></li>
+        <li><a href="#filled.accumulative">Accumulative filled Line charts</a></li>
+        <li><a href="#custom.tickmarks">Custom tickmarks</a></li>
+        <li><a href="#coords2">The coords2 array</a></li>
+    </ul>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [10,4,17,50,25,19,20,25,30,29,30,29];
+    
+        var line = new RGraph.Line("myLine", data);
+        line.Set('chart.background.barcolor1', 'rgba(255,255,255,1)');
+        line.Set('chart.background.barcolor2', 'rgba(255,255,255,1)');
+        line.Set('chart.background.grid.color', 'rgba(238,238,238,1)');
+        line.Set('chart.colors', ['rgba(255,0,0,1)']);
+        line.Set('chart.linewidth', 2);
+        line.Set('chart.filled', true);
+        line.Set('chart.hmargin', 5);
+        line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        line.Set('chart.gutter.left', 40);
+        line.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="available.properties"></a>
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the Line chart apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myLine.Set('name', 'value');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#background">Background</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#margins">Margins</a></li><li><a href="#colors">Colors</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#titles">Titles</a></li><li><a href="#key">Key</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#axis properties">Axis properties</a></li>
+        <li><a href="#zoom">Zoom</a></li><li><a href="#miscellaneous">Miscellaneous</a>
+        </li>
+    </ul>
+
+
+<a name="background"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Background</h3>            <a name="chart.background.barcolor1"></a>
+<b>chart.background.barcolor1</b><br />
+            The color of the background bars (1 of 2).<br /><i>Default: rgba(0,0,0,0)</i><br /><br />
+            <a name="chart.background.barcolor2"></a>
+<b>chart.background.barcolor2</b><br />
+            The color of the background bars (2 of 2).<br /><i>Default: rgba(0,0,0,0)</i><br /><br />
+            <a name="chart.background.grid"></a>
+<b>chart.background.grid</b><br />
+            Whether to show the background grid or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.color"></a>
+<b>chart.background.grid.color</b><br />
+            The color of the background grid.<br /><i>Default: #eee</i><br /><br />
+            <a name="chart.background.hbars"></a>
+<b>chart.background.hbars</b><br />
+            An array of information stipulating horizontal colored bars. You can use these to indicate limits. Eg: <i>myLine.Set('hbars', [[75, 10, 'yellow'], [85, 15, 'red']]);</i> This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the starting point and the height.<br /><i>Default: null</i><br /><br />
+            <a name="chart.background.grid.hsize"></a>
+<b>chart.background.grid.hsize</b><br />
+            The horizontal size of the grid.<br /><i>Default: 25</i><br /><br />
+            <a name="chart.background.grid.vsize"></a>
+<b>chart.background.grid.vsize</b><br />
+            The vertical size of the grid.<br /><i>Default: 25</i><br /><br />
+            <a name="chart.background.grid.width"></a>
+<b>chart.background.grid.width</b><br />
+            The width of the background grid.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.background.grid.border"></a>
+<b>chart.background.grid.border</b><br />
+            Determines whether a border line is drawn around the grid.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.hlines"></a>
+<b>chart.background.grid.hlines</b><br />
+            Determines whether to draw the horizontal grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.vlines"></a>
+<b>chart.background.grid.vlines</b><br />
+            Determines whether to draw the vertical grid lines.<br /><i>Default: true</i><br /><br />
+            
+            <a name="chart.background.grid.autofit"></a>
+            <b>chart.background.grid.autofit</b><br />
+            Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many
+            horizontal and vertical lines you want.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.background.grid.autofit.numhlines"></a>
+            <b>chart.background.grid.autofit.numhlines</b><br />
+            When using autofit this allows you to specify how many horizontal grid lines you want. <br />
+            <i>Default: 7</i><br /><br />
+
+            <a name="chart.background.grid.autofit.numvlines"></a>
+            <b>chart.background.grid.autofit.numvlines</b><br />
+            When using autofit this allows you to specify how many vertical grid lines you want. <br />
+            <i>Default: 20</i><br /><br />
+
+            <a name="chart.background.grid.autofit.align"></a>
+            <b>chart.background.grid.autofit.align</b><br />
+            If you want to have your grid lines line up with the labels (both X and Y axes), you can set this to true and RGraph will
+            attempt to make the grid lines line up. If you have a <i>chart.hmargin</i> set then the alignment will be thrown out.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.background.image"></a>
+            <b>chart.background.image</b><br />
+            If you want to specify a background image to use on your chart, specify it with this property.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.backdrop"></a>
+<b>chart.backdrop</b><br />
+            When enabled this specifies that the line(s) will have a backdrop effect. You can control the transparency with the other backdrop settings).<br /><i>Default: false</i><br /><br />
+            <a name="chart.backdrop.size"></a>
+<b>chart.backdrop.size</b><br />
+            This controls the size/extent of the backdrop effect.<br /><i>Default: 30</i><br /><br />
+            <a name="chart.backdrop.alpha"></a>
+<b>chart.backdrop.alpha</b><br />
+            This controls how much transparency the backdrop effect has. It can go from 0 - 1.<br /><i>Default: 0.2</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>
+
+            <a name="chart.labels.above"></a>
+            <b>chart.labels.above</b><br />
+            Whether the values are shown in labels drawn above the line.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.labels.above.size"></a>
+            <b>chart.labels.above.size</b><br />
+            The size of the labels which are drawn above the line.<br />
+            <i>Default: 8</i><br /><br />
+
+            <a name="chart.labels"></a>
+            <b>chart.labels</b><br />
+            An array of the X labels for the chart. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+            
+            <a name="chart.labels.ingraph"></a>
+<b>chart.labels.ingraph</b><br />
+            An array of labels for the chart which are drawn "inside" the chart.  If you have 5 data points then this should have a corresponding number of elements, though there is a <a href="misc.html#shorthand.ingraph.labels">shorthand available</a>.<br /><i>Default: null</i><br /><br />
+            <a name="chart.ylabels"></a>
+<b>chart.ylabels</b><br />
+            Can be <i>true</i> or <i>false</i> and determines whether the chart has Y axis labels.<br /><i>Default: true</i><br /><br />
+            
+            <a name="chart.ylabels.invert"></a>
+            <b>chart.ylabels.invert</b><br />
+            Reverses the Y axis so that 0 is at the top, instead of the bottom.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.ylabels.count"></a>
+            <b>chart.ylabels.count</b><br />
+            A value (<i>1, 3, 5 or 10</i>) that controls how many Y labels there are. <br />
+            <i>Default: 5</i><br /><br />
+
+            <a name="chart.ylabels.inside"></a>
+<b>chart.ylabels.inside</b><br />
+            This controls whether the Y labels are drawn inside the Y axis or not. If your labels are large, this may help.<br /><i>Default: false</i><br /><br />
+            <a name="chart.ylabels.inside.color"></a>
+<b>chart.ylabels.inside.color</b><br />
+            If the Y labels are to be drawn inside the Y axis, this is used as the background color.<br />
+            <i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+            <a name="chart.ylabels.specific"></a>
+            <b>chart.ylabels.specific</b><br />
+            You can use this option to give your own Y labels (eg ['Low', 'Medium', 'High'].<br />
+            <i>Default: null</i><br /><br />
+            
+            <a name="chart.xlabels.inside"></a>
+            <b>chart.xlabels.inside</b><br />
+            This controls whether the X labels are drawn inside the X axis or not. By using this you can significantly
+            reduce the size of the gutter needed. <br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.xlabels.inside.color"></a>
+<b>chart.xlabels.inside.color</b><br />
+            If the X labels are to be drawn inside the X axis, this is used as the background color.<br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points).<br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.angle"></a>
+<b>chart.text.angle</b><br />
+            The angle of the horizontal text labels (at the bottom of the chart). Previously this could be 0, 45 or 90, but now (31st July 2010) this can be any angle.<br /><i>Default: 0 (Horizontal)</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+
+            <a name="chart.hmargin"></a>
+<b>chart.hmargin</b><br />
+            The size of the horizontal margin. This is on the inside of the axes.<br /><i>Default: 0</i><br /><br />
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.colors"></a>
+<b>chart.colors</b><br />
+            An array of line colors.<br /><i>Default: ['#f00', '#0f0', '', '#00f', '#f0f', '#ff0', '#0ff'] 9</i><br /><br />
+            <a name="chart.colors.alternate"></a>
+<b>chart.colors.alternate</b><br />
+            Set this to true if you want your line color(s) to be alternated. <a href="#note.colors">See note</a><br /><i>Default: false</i><br /><br />
+            <a name="chart.fillstyle"></a>
+<b>chart.fillstyle</b><br />
+            A single color or an array of colors that filled line charts will use.<br /><br /><b>Important:</b> This used to be a string, and still can be, but can now also be an array.<br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.filled"></a>
+            <b>chart.filled</b><br />
+            Whether the area under the line is filled or not. This looks best when there is no horizontal
+            margin.<br /><br />
+            
+            <b>Note:</b> When showing multiple lines the values are additive by default. This means that if you have two lines
+            they will be "stacked" on top of each other. If this is not the desired behaviour then you can set the option
+            below to false.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.filled.accumulative"></a>
+            <b>chart.filled.accumulative</b><br />
+            When showing multiple filled lines the values are by default accumulative (ie added to each other). If this is not the
+            desired behaviour, then you can set this property to <i>false</i> to have them drawn "non-accumulatively".<br/><br/>
+            
+            <b>Note:</b> If you use fully opaque colors in conjunction with this option set to false it's feasible that you
+            might not see one or more of the lines, or parts of the line. If you want to see all of the lines you should
+            leave this option set to its default <i>true</i> setting. You can see an example of this setting
+            <a href="line_filled.html">here</a>.
+            
+            <br /><br />
+            
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.filled.range"></a>
+<b>chart.filled.range</b><br />
+            This is useful for indicating a range. Exactly two datasets are required, with the space between them filled. This is useful for indicating a range.The <a href="../examples/line.html">line chart examples</a> page demonstrates this in action.<br /><i>Default: false</i><br /><br />
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            If true a shadow will be applied to the line.<br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow. As well as a single color definition, this can also be an array of colors. This means that if you have multiple lines on your chart, each can have a different shadow color. <br /><i>Default: rgba(0,0,0,0.5)</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset in pixels for the shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset in pixels for the shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect.<br /><i>Default: 3</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            These are tooltips for the line(s). It should be an array of tooltips. If you have multiple lines, simply pass multiple arrays to the Set() method. <br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            <a name="chart.tooltips.highlight"></a>
+<b>chart.tooltips.highlight</b><br />
+            If you don't want/need the chart to be highlighted and thus avoid redrawing, (eg When <a href="combine.html">combining charts</a>), then set this to false.<br /><i>Default: true</i><br /><br />
+            <a name="chart.crosshairs"></a>
+<b>chart.crosshairs</b><br />
+            If true, you will get a crosshair centering on the current mouse position.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.linewidth"></a>
+<b>chart.crosshairs.linewidth</b><br />
+            This controls the linewidth of the crosshairs.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.crosshairs.color"></a>
+<b>chart.crosshairs.color</b><br />
+            The color of the crosshairs.<br /><i>Default: #333</i><br /><br />
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. Unlike the bar chart, you CAN have context menus at the same time as tooltips. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only color allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+            <a name="chart.adjustable"></a>
+<b>chart.adjustable</b><br />
+            Defaulting to false, this determines whether your chart will be adjustable (click a point and drag it). <br /><i>Default: false</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the chart.<br /><i>Default: none</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.xaxis"></a>
+<b>chart.title.xaxis</b><br />
+            This allows to specify a title for the X axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.yaxis"></a>
+<b>chart.title.yaxis</b><br />
+            This allows to specify a title for the Y axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.xaxis.pos"></a>
+<b>chart.title.xaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the X axis title.<br /><i>Default: 0.25</i><br /><br />
+            <a name="chart.title.yaxis.pos"></a>
+<b>chart.title.yaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the Y axis title.<br /><i>Default: 0.25</i><br /><br />
+
+            <a name="chart.title.yaxis.position"></a>
+            <b>chart.title.yaxis.align</b><br />
+            Instead of using the option above you can instead use this option, specifying <i>left</i> or <i>right</i>.<br />
+            <i>Default: left</i><br /><br />
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>. By default the key is positioned on the opposite side to the Y axis.<br />
+            <i>Default: null</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.rounded"></a>
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.key.color.shape"></a>
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <a name="chart.key.linewidth"></a>
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+            
+            <a name="chart.key.interactive"></a>
+            <b>chart.key.interactive</b><br />
+            The Line chart supports interactive keys - so you can click on a key element and RGraph will highlight
+            the appropriate line, whilst fading the rest of the chart.<br />
+            <i>Default: false</i><br /><br />
+
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+
+<a name="chart.scale.formatter"></a>
+            <b>chart.scale.formatter</b><br />
+            To allow thoroughly custom formats of numbers in the scale, you can use this option to
+            specify a function that is used by RGraph to format numbers. This function should
+            handle ALL of the formatting. Eg:<br /><br />
+            <pre class="code">
+function myFormatter(obj, num)
+{
+    return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+</pre>
+            <br /><i>Default: null</i><br /><br />
+            
+<a name="chart.units.post"></a>
+<b>chart.units.post</b><br />
+            The units (if any) that the Y axis is measured in (gets appended to the number)<br /><i>Default: none</i><br /><br />
+            <a name="chart.units.pre"></a>
+<b>chart.units.pre</b><br />
+            The units (if any) that the Y axis is measured in (gets preppended to the number)<br /><i>Default: none</i><br /><br />
+            <a name="chart.scale.decimals"></a>
+<b>chart.scale.decimals</b><br />
+            Determines the precision of the numbers used as the scale.<br /><i>Default: 0</i><br /><br />
+            <a name="chart.scale.point"></a>
+<b>chart.scale.point</b><br />
+            The character used as the decimal point.<br /><i>Default: .</i><br /><br />
+            
+            <a name="chart.scale.thousand"></a>
+            <b>chart.scale.thousand</b><br />
+            The character used as the thousand separator<br /><i>Default: ,</i><br /><br />
+
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.ymin"></a>
+<b>chart.ymin</b><br />
+            The optional minimum Y scale value. If not specified then it will be zero.<br /><i>Default: null</i><br /><br />
+            <a name="chart.ymax"></a>
+
+            <b>chart.ymax</b><br />
+            The optional maximum Y scale value. If not specified then it will be calculated.<br />
+            <i>Default: null (It's calculated)</i><br /><br />
+
+            <b>chart.outofbounds</b><br />
+            Normally, out-of-bounds values are not drawn. By setting this to <i>true</i> you can change this behaviour.<br />
+            <i>Default: false</i><br /><br />
+
+<a name="axis properties"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Axis properties</h3>            <a name="chart.xticks"></a>
+<b>chart.xticks</b><br />
+            The number of X tickmarks.<br /><i>Default: null (linked to number of datapoints)</i><br /><br />
+            <a name="chart.ticksize"></a>
+<b>chart.ticksize</b><br />
+            The size of the tick marks. This only affects certain styles of tickmarks.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.tickdirection"></a>
+<b>chart.tickdirection</b><br />
+            Whether the ticks are above or below the axis.<br /><i>Default: -1 (-1 is below, 1 is above)</i><br /><br />
+            <a name="chart.axis.color"></a>
+<b>chart.axis.color</b><br />
+            The color of the axes.<br /><i>Default: black</i><br /><br />
+            <a name="chart.xaxispos"></a>
+<b>chart.xaxispos</b><br />
+            The position of the X axis. It can be either <i>bottom</i> or <i>center</i>.<br /><i>Default: bottom</i><br /><br />
+            
+            <a name="chart.yaxispos"></a>
+            <b>chart.yaxispos</b><br />
+            Specifies the Y axis position. Can be <i>left</i> or <i>right</i>.<br /><i>Default: left</i><br /><br />
+            
+            <a name="chart.noaxes"></a>
+            <b>chart.noaxes</b><br />
+            Whether the axes are drawn<br />
+            <i>Default: false (the axes ARE drawn)</i><br /><br />
+            
+            <a name="chart.axesontop"></a>
+            <b>chart.axesontop</b><br />
+            A minor option, this sets the axes to be redrawn after the chart has been drawn. This is only useful in a certain
+            set of circumstances - the chart is filled and the line width is small.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.noendxtick"></a>
+            <b>chart.noendxtick</b><br />
+            When you're combining the Bar and Line charts, you may want to use this property to stop the end X tick from
+            being drawn.<br />
+            <i>Default: false (the end tick IS drawn)</i><br /><br />
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+<a name="miscellaneous"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+
+    <a name="chart.tickmarks"></a>
+    <b>chart.tickmarks</b><br />
+    What kind of tickmarks to use on the chart. This can be:<ul><li>dot</li><li>circle</li><li>filledcircle</li><li>endcircle</li><li>square</li><li>endsquare</li><li>filledsquare</li><li>filledendsquare</li><li>tick</li><li>halftick</li><li>endtick</li><li>cross</li><li>borderedcircle (same as dot)</li><li>arrow</li><li>filledarrow</li></ul><p>Note that "arrow" and "filledarrow" look better with a thinner (1 or 2) linewidth setting. Also note that now (10th August 2010) as well as a string, this can be an array of different tickmark styles.<br />
+    <i>Default: null</i><br /><br />
+    
+    <a name="chart.tickmarks.dot.color"></a>
+    <b>chart.tickmarks.dot.color</b><br />
+    This is the color of the BORDER around the dot/borderedcircle style tickmarks. <br />
+    <i>Default: #fff</i><br /><br />
+    
+    <a name="chart.tickmarks.linewidth"></a>
+    <b>chart.tickmarks.linewidth</b><br />
+    This is the width of the line used when drawing the tickmarks. By default this is the same as the chart.linewidth setting.<br />
+    <i>Default: null</i><br /><br />
+
+            <a name="chart.stepped"></a>
+<b>chart.stepped</b><br />
+            Draws the line as stepped. Useful for showing stock performance for example.<br /><i>Default: false</i><br /><br />
+            <a name="chart.linewidth"></a>
+<b>chart.linewidth</b><br />
+            The width of the line (ie the actual line on the chart). Note: If your line is stepped and filled, and you don't want a trailing line indicating the last value, you can set this to zero.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.variant"></a>
+<b>chart.variant</b><br />
+            At present this can only be <i>3d</i>, and gives a small 3D effect.<br /><i>Default: null</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+            <b>chart.chromefix</b><br />
+            Since version 6, Chrome has had a shadow bug, which becomes apparent when you use shadow blurring. This value defaults
+            to true and means that RGraph will skirt the bug with a small fix.<br /><i>Default: true</i><br /><br />
+
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+        </div>
+    <br /><br />
+
+    
+    <a name="available.methods"></a>
+    <h2>Methods</h2>
+
+    <a href="getPoint"></a>
+        <b>obj.getPoint(e)</b><br /><br />
+        This method makes it easier to get hold of which point on the Line chart has been hovered over. It returns an array of:
+        
+        <ul>
+            <li>The chart object</li>
+            <li>The X coordinate</li>
+            <li>The Y coordinate</li>
+            <li>The numerical index of the point. This corresponds (for example) to the tooltips array, and the coordinates array</li>
+        </ul>
+        
+        An example usage is:
+        
+        <pre class="code">
+&lt;canvas id="cvs" width="600" height="300"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;
+
+&lt;script&gt;
+    myGraph = new RGraph.Line('cvs', [10,4,2,4,1]);
+    myGraph.Set('chart.hmargin', 10);
+    myGraph.Set('chart.tickmarks', 'endcircle');
+    myGraph.Set('chart.labels', ['Fred','John','Kev','Lou','Pete']);
+    myGraph.Draw();
+
+
+    RGraph.Register(myGraph);
+    
+    myGraph.canvas.onmousemove = function (e)
+    {
+        RGraph.FixEventObject(e);
+
+        var canvas  = e.target;
+        var context = canvas.getContext('2d');
+        var obj     = e.target.__object__;
+      
+        // This is the new method which simplifies getting coordinates
+        var point = obj.getPoint(e);
+      
+      
+        if (point) {
+            
+            canvas.style.cursor = 'pointer';
+            
+            // Is this the same tooltip as the one (if any) that's already being shown
+            if (RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__index__ == point[3]) {
+                return;
+            }
+
+            // Start afresh
+            RGraph.Redraw();
+
+            // Show the tooltip
+            RGraph.Tooltip(canvas, obj.Get('chart.labels')[point[3]], e.pageX, e.pageY, point[3]);
+
+            // Highlight the point
+            context.strokeStyle = 'gray';
+            context.fillStyle = 'white';
+            context.beginPath();
+            context.moveTo(point[1], point[2]);
+            context.arc(point[1], point[2], 2, 0, 6.26, 0);
+            context.stroke();
+            context.fill();
+            
+            return;
+        }
+        
+        canvas.style.cursor = 'default';
+    }
+    
+    window.onclick = function ()
+    {
+        RGraph.Redraw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="combining.line.bar"></a>
+        <h2>Combining the Line and Bar charts</h2>
+        
+        <p>
+            You can combine the Bar and Line charts with a bit of magic. It's actually quite easy to do. <a href="combine.html">Find out more here</a>.
+            In the same vein, you can have Y axes on both the left and right.
+        </p>
+
+
+    <a name="alternative.colors"></a>
+        <h2>Alternative colors</h2>
+        
+        <p>
+            Instead of a string stipulating the color, each element of the colors array can itself be a two element array,
+            stipulating the up color, and the down color. To use alternating colors you must also stipulate the alternate property:
+        </p>
+        
+
+        <pre class="code">
+myLine.Set('chart.colors.alternate', true);
+myLine.Set('chart.colors', ['red', ['blue', 'yellow'], 'green]);
+</pre>
+
+    <a name="filled.accumulative"></a>
+        <h2>Accumulative filled Line charts</h2>
+        
+        <p>
+            The default behaviour of filled Line charts is to "stack" the lines on top of each other. This allows them all
+            to be totally visible, no matter what (unless a line has a zero value of course). If this is not desired, then there is an
+            option (<i>chart.filled.accumulative</i> - true/false) to change this behaviour so the lines are plotted "as-is".
+            Keep in mind that if you set this option to false (ie the Lines are plotted as-is) it may be wiser to use
+            semi-transparent colors or some parts of data sets (or even entire data sets) may be hidden by others. There's a
+            comparison of the different modes <a href="line_filled.html">here</a>.
+        </p>
+
+    <a name="custom.tickmarks"></a>
+        <h2>Custom tickmarks</h2>
+        <p>
+            If none of the available tickmark styles are suitable, you can instead specify a function object that draws the tickmark,
+            enabling you to draw the tickmark yourself. For example:
+        </p>
+        
+        <pre class="code">
+&lt;script&gt;
+    line.Set('chart.tickmarks', myTick);
+
+    /**
+    * The function that is called once per tickmark, to draw it
+    * 
+    * @param object obj   The chart object
+    * @param array  data  The entire line data
+    * @param number value The individual points value
+    * @param number index The current index, in the data array
+    * @param number x     The X coordinate
+    * @param number y     The Y coordinate
+    * @param string color The color of the line
+    * @param number prevX The previous X coordinate
+    * @param number prevY The previous Y coordinate
+    */
+    function myTick (obj, data, value, index, x, y, color, prevX, prevY)
+    {
+        // Draw your custom tick here
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="coords2"></a>
+        <h2>The coords2 array</h2>
+        
+        An alternative method of indexing the chart coordinates is available in <i>obj.coords2</i>. With this array, all of the first
+        lines coordinates are available in <i>obj.coords2[0]</i>, the second lines coordinates in <i>obj.coords2[1]</i> and so on.
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/line_filled.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/line_filled.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/line_filled.html	(revision 225)
@@ -0,0 +1,134 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - The Line chart setting chart.filled.accumulative</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs accumulative" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - The Line chart setting chart.filled.accumulative" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            line = new RGraph.Line('cvs', [4,3,6,7,8,4,9,5,1,3,4,3], [4,5,1,6,2,3,4,5,8,1,9,7]);
+            line.Set('chart.labels', ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']);
+            line.Set('chart.linewidth', 5);
+            line.Set('chart.fillstyle', ['rgba(255,0,0,0.3)', 'rgba(0,0,255,0.3)']);
+            line.Set('chart.colors', ['red', 'blue']);
+            line.Set('chart.filled', true);
+            line.Set('chart.filled.accumulative', true);
+            line.Set('chart.title', 'A filled line with chart.filled.accumulative=true');
+            line.Set('chart.gutter.right', 15);
+            line.Set('chart.gutter.bottom', 15);
+            line.Set('chart.background.grid.autofit', true);
+            line.Draw();
+
+            line2 = new RGraph.Line('cvs2', [4,3,6,7,8,4,9,5,1,3,4,3], [4,5,1,6,2,3,4,5,8,1,9,7]);
+            line2.Set('chart.labels', ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']);
+            line2.Set('chart.linewidth', 5);
+            line2.Set('chart.fillstyle', ['rgba(255,0,0,0.3)', 'rgba(0,0,255,0.3)']);
+            line2.Set('chart.colors', ['red', 'blue']);
+            line2.Set('chart.filled', true);
+            line2.Set('chart.filled.accumulative', false);
+            line2.Set('chart.title', 'A filled line with chart.filled.accumulative=false');
+            line2.Set('chart.gutter.right', 15);
+            line2.Set('chart.gutter.bottom', 15);
+            line2.Set('chart.background.grid.autofit', true);
+            line2.Draw();
+        }
+    </script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        The Line chart setting: chart.filled.accumulative
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - The Line chart setting: chart.filled.accumulative</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        This page shows how the setting <i>chart.filled.accumulative</i> affects your charts. The chart on the left has
+        it enabled (the default), so the lines in effect sit on top of each other. The chart on the right has the setting
+        set to false so the points are drawn "as-is", ie not accumulatively. The first chart could be more useful if you wish
+        to see accumulated values, whereas the chart on the right might be better if you want to see individual values.
+    </p>
+    
+    <p>
+        Keep in mind that if you choose to use a non-accumulative chart the colors may be better as semi-transparent ones,
+        otherwise parts or all of some lines may get hidden by others.
+    </p>
+
+    <div style="text-align: center">
+        <canvas id="cvs" width="450" height="200">[No canvas support]</canvas>
+        <canvas id="cvs2" width="450" height="200">[No canvas support]</canvas>
+
+        <p>
+            <a href="line.html">&laquo; Back to the Line chart documentation</a>
+        </p>
+    </div>
+</html>
Index: Dev/branches/Demo/RGraph/docs/meter.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/meter.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/meter.html	(revision 225)
@@ -0,0 +1,372 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - meter charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas docs meter chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Meter charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Meter charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Meter charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        These are Meter charts. Similar to half the Odometer. The difference is purely visual, but may well be more suited to
+        a control panel type application.
+    </p>
+    
+    <p>
+        The example file is <a href="../examples/meter.html">here</a>.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var meter = new RGraph.Meter('myCanvas', 50, 100, 60);
+        meter.Set('chart.contextmenu', [
+                                        ['Show palette', RGraph.Showpalette],
+                                        ['Clear annotations', function () {RGraph.Clear(meter.canvas); meter.Draw();}],
+                                        null,
+                                        ['Cancel', function () {}]
+                                       ]);
+        meter.Set('chart.annotatable', true);
+        meter.Set('chart.label.position', 'inside');
+        meter.Set('chart.title', 'A sample measurement');
+        meter.Set('chart.title.vpos', 0.5);
+        meter.Set('chart.units.post', 'k');
+        meter.Set('chart.red.start', 0);
+        meter.Set('chart.red.end', 3);
+        meterSet('chart.yellow.start', 3);
+        meter.Set('chart.yellow.end', 6);
+        meter.Set('chart.green.start', 6);
+        meter.Set('chart.green.end', 10);
+        meter.Draw();
+    }
+&lt;/script&gt;
+</pre>
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the Meter apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myMeter.Set('name', 'value');</b>
+    </p>
+
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.border.color"></a>
+<b>chart.border.color</b><br />
+            The color of the outline (including tickmarks).<br /><i>Default: black</i><br /><br />
+            <a name="chart.green.start"></a>
+<b>chart.green.start</b><br />
+            The value that the green area should begin at. <br /><i>Default: 35% of the maximum value</i><br /><br />
+            <a name="chart.green.end"></a>
+<b>chart.green.end</b><br />
+            The value that the green area should end at. <br /><i>Default: The maximum value</i><br /><br />
+            <a name="chart.green.color"></a>
+<b>chart.green.color</b><br />
+            The color of the green area, (can be any color).. <br /><i>Default: #207A20</i><br /><br />
+            <a name="chart.yellow.start"></a>
+<b>chart.yellow.start</b><br />
+            The value that the yellow area should begin at. <br /><i>Default: 10% of the maximum value</i><br /><br />
+            <a name="chart.yellow.end"></a>
+<b>chart.yellow.end</b><br />
+            The value that the yellow area should end at. <br /><i>Default: 35% of the maximum value</i><br /><br />
+            <a name="chart.green.color"></a>
+<b>chart.green.color</b><br />
+            The color of the yellow area, (can be any color).. <br /><i>Default: #D0AC41</i><br /><br />
+            <a name="chart.red.start"></a>
+<b>chart.red.start</b><br />
+            The value that the red area should begin at. <br /><i>Default: The minimum value</i><br /><br />
+            <a name="chart.red.end"></a>
+<b>chart.red.end</b><br />
+            The value that the red area should end at. <br /><i>Default: 10% of the maximum value</i><br /><br />
+            <a name="chart.red.color"></a>
+<b>chart.red.color</b><br />
+            The color of the red area, (can be any color).. <br /><i>Default: #9E1E1E</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
+            
+            <a name="chart.text.font"></a>
+            <b>chart.text.font</b><br />
+            The font used to render the text.<br />
+            <i>Default: Verdana</i><br /><br />
+            
+            <a name="chart.value.text"></a>
+            <b>chart.value.text</b><br />
+            This option controls whether the value of the Meter is shown in text.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.value.text.decimals"></a>
+            <b>chart.value.text.decimals</b><br />
+            The amount of decimals shown in the text label.<br />
+            <i>Default: 0</i><br /><br />
+            
+            <a name="chart.value.text.units.pre"></a>
+            <b>chart.value.text.units.pre</b><br />
+            The units (before the value) shown in the text label.<br />
+            <i>Default: None (an empty string)</i><br /><br />
+            
+            <a name="chart.value.text.units.post"></a>
+            <b>chart.value.text.units.post</b><br />
+            The units (after the value) shown in the text label.<br />
+            <i>Default: None (an empty string)</i><br /><br />
+
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the chart, if any. <br /><i>Default: null</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+
+            <a name="scale"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+            
+            <a name="chart.units.pre"></a>
+            <b>chart.units.pre</b><br />
+            The units that the labels are measured in. This string is displayed BEFORE the actual number, allowing you to
+            specify values such as "$50".<br />
+            <i>Default: none</i><br /><br />
+
+            <a name="chart.units.post"></a>
+            <b>chart.units.post</b><br />
+            The units that the labels are measured in. This string is displayed AFTER the actual number, allowing you to specify
+            values such as "50ms".<br />
+            <i>Default: none</i><br /><br />
+    
+            <a name="chart.scale.decimals"></a>
+            <b>chart.scale.decimals</b><br />
+            The number of decimal places to display for the values.<br />
+            <i>Default: 0</i><br /><br />
+
+            <a name="interactive features"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively).<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only color allowed for annotations.<br /><i>Default: black</i><br /><br />
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            If true a shadow will be applied to the meter.<br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow. <br /><i>Default: rgba(0,0,0,0.5)</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset in pixels for the shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset in pixels for the shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect.<br /><i>Default: 3</i><br /><br />
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+<a name="miscellaneous"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+    <a name="chart.linewidth"></a>
+    <b>chart.linewidth</b><br />
+    The width of the outline of the Meter. <br /><i>Default: 2</i><br /><br />
+    
+    <a name="chart.tickmarks.small.num"></a>
+    <b>chart.tickmarks.small.num</b><br />
+    This controls the number of small tickmarks.<br />
+    <i>Default: 100</i><br /><br />
+    
+    <a name="chart.tickmarks.big.num"></a>
+    <b>chart.tickmarks.big.num</b><br />
+    This controls the number of large tickmarks.<br />
+    <i>Default: 10</i><br /><br />
+    
+    <a name="chart.tickmarks.small.color"></a>
+    <b>chart.tickmarks.small.color</b><br />
+    This sets the color of the small tickmarks.<br />
+    <i>Default: #bbb</i><br /><br />
+    
+    <a name="chart.tickmarks.big.color"></a>
+    <b>chart.tickmarks.big.color</b><br />
+    This sets the color of the large tickmarks.<br />
+    <i>Default: black</i><br /><br />
+</div>
+
+<br /><br />
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/misc.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/misc.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/misc.html	(revision 225)
@@ -0,0 +1,748 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Miscellaneous</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas misc docs" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Miscellaneous documentation" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Miscellaneous documentation
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Miscellaneous documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <ul>
+        <li><a href="#fallback.content">Canvas fallback content and visually impaired users</a></li>
+        <li><a href="#limits">Upper and lower limits for horizontal bars</a></li>
+        <li><a href="#canvas.width.height">Setting the canvas width and height</a></li>
+        <li><a href="#canvas.coordinates">The canvas coordinate system</a></li>
+        <li><a href="#older.browsers">RGraph and older browsers</a></li>
+        <li><a href="#msie">RGraph and Microsoft Internet Explorer</a></li>
+        <li><a href="#debugging">Debugging tips</a></li>
+        <li><a href="#inspecting">Inspecting an RGraph chart</a></li>
+        <li><a href="#context.menus">Double click context menus</a></li>
+        <li><a href="#event.handlers">Adding your own event handlers</a></li>
+        <li><a href="#crlf">Carriage returns and newlines in labels</a></li>
+        <li><a href="#character.set">Character set issues</a></li>
+        <li><a href="#rgraph.identify">How to identify an RGraph object</a></li>
+        <li><a href="#static.y.axis">Static Y axis</a></li>
+        <li><a href="#reducing.white.space">Reducing white space</a></li>
+        <li><a href="#in.graph">In-graph labels</a></li>
+        <li><a href="#shorthand.ingraph.labels">Shorthand for in-graph labels</a></li>
+        <li><a href="#dom2.events">DOM2 Event handlers</a></li>
+        <li><a href="#data.types">Data types</a></li>
+        <li><a href="#create.your.own">Creating your own chart type</a></li>
+        <li><a href="#world.map">World map</a></li>
+        <li><a href="#text">Adding text to your charts</a></li>
+        <li><a href="#known.issues">Known issues</a></li>
+    </ul>
+
+    <a name="fallback.content"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Canvas fallback content and visually impaired users</h4>
+
+    <p>
+        When using the canvas element you should be aware of the accessibility of your charts, for example where vision limited users are
+        concerned. Screen readers, for example, may not be able to convert a chart into something that is reasonable, so you should
+        consider
+        doing this yourself, possibly using the canvas fallback content (ie the content in between the canvas tags). A possible example
+        would be to put a table of data inside the canvas tag that the chart on the canvas represents. Doing this goes a long way
+        towards making the data available to everyone. You might also wish to consider using the <a href="zoom.html">full canvas
+        zoom</a> or the <a href="resizing.html">resizing feature</a> to enable people to enlarge the chart.
+    </p>
+
+    <a name="limits"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Upper and lower limits for horizontal bars</h4>
+
+        <p>
+            If you don't wish to specify an upper or lower limit for horizontal bars, and you just want them to extend to the upper or lower
+            limits of the chart, whatever they may be, you can specify null for the value determining how far they extend. For cases where
+            the X axis is in the middle and you're specifying a negative start value, or you want the bar to extend all the way to the
+            bottom, you can simply specify an arbitrary length (eg -999999). Eg:
+        </p>
+        
+        <pre class="code">myBar.Set('chart.background.hbars', [[0, null, 'green'], [0,-999999,'red']]);</pre>
+    
+    <a name="canvas.width.height"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Setting the canvas width and height</h4>
+    
+        <p>
+            To set the canvas width and height you must use the HTML width/height attributes and NOT CSS. If you do use CSS, the canvas
+            will be scaled, and not enlarged, to fit the new width/height. Eg:
+        </p>
+        
+        <pre class="code">&lt;canvas id="myCanvas" width="200" height="100"&gt;[No canvas support]&lt;canvas&gt;</pre>
+        
+        <p>
+            <b>Note:</b>
+            When you resize the canvas using CSS, not only will it be scaled (not enlarged), but it will also NOT be cleared. You can
+            see this effect on the <a href="animation.html">animation page</a> with the jQuery animation example.
+        </p>
+    
+    <a name="canvas.coordinates"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>The canvas coordinate system</h4>
+        <p>
+            The canvas coordinate system starts in the top left of the canvas (at [0,0] - the X value increasing as you go right
+            and the Y value as you go down), much like the CSS coordinates for the entire page. The
+            gutter goes around the canvas (ie top/bottom/left/right - where the labels and titles are placed), and the actual chart
+            sits in the middle.
+        </p>
+
+    <a name="older.browsers"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>RGraph and older browsers</h4>
+    
+        <p>
+            Older versions of browsers are supported (assuming they have canvas support), however, if they don't support the canvas text
+            or shadow APIs these will naturally be unavailable. The charts will still be drawn, though without shadows or text.
+        </p>
+
+    <a name="msie"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>RGraph and Microsoft Internet Explorer</h4>
+
+        <p>
+            You can now use RGraph with Internet Explorer 8 in conjunction with ExCanvas, (which brings a degree of &lt;canvas&gt; support to MSIE).
+            Bear in mind though that shadows are not available and thus are simulated. Microsoft Internet Explorer 9 has native &lt;canvas&gt;
+            support. You can see some screenshots of it <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a>.
+        </p>
+
+    <a name="debugging"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    
+    <h4>Debugging tips</h4>
+
+        <p>
+            If you're having a hard time debugging your chart, try these:
+        </p>
+        
+        <ul>
+            <li>Ensure you have only one chart on the page</li>
+            <li>Make sure you have disabled your web browsers cache (the Firefox <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Web Developer toolbar</a> can do this for Firefox)</li>
+            <li>
+                Try using <a href="http://www.getfirebug.com" target="_blank">Firebug</a> for Firefox or the
+                Webkit developer tools for Google Chrome (CTRL_SHIFT+J) and Safari (CTRL+ALT+C). There's a
+                video about using the Chrome developer tools
+                <a href="http://www.youtube.com/watch?v=N8SS-rUEZPg&feature=youtu.be" target="_blank">here</a>. These are very useful
+                tools that make development much easier.
+            </li>
+            <li>Reduce the page to the bare minimum.</li>
+            <li>Start with a very basic chart and build it up slowly.</li>
+        </ul>
+
+
+
+    <a name="inspecting"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Inspecting an RGraph chart</h4>
+    
+    <p>
+        To help when debugging your RGraph charts and canvas elements, you can use you browsers built in debugging tools.
+        An example is the WebKit developer tools which are available in Google Chrome and Apple Safari. There is a screenshot
+        of these tools (in docked mode) <a href="../images/introspection.png" target="_blank"><b>here</b></a>. To view these
+        tools in Google Chrome press CTRL+SHIFT+J. Inspect the canvas, and then the associated object can be found via
+        the <i>__object__</i> property.
+    </p>
+
+
+    <a name="context.menus"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Double click context menus</h4>
+
+    <p>
+        Windows Opera, Windows Safari, Mac Safari and Mac Firefox all attach the context menu to the double click event (left mouse button),
+        not the right, in order to make it more reliable.
+    </p>
+
+
+    <a name="event.handlers"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Adding your own event handlers</h4>
+    
+    <p>
+        Because each RGraph object exposes the canvas element (the same as what you get from <i>document.getElementById()</i>),
+        you can use normal procedures to add your own event handlers. Eg If you wanted to add your own onclick handler you could
+        do this:
+    </p>
+        
+    <pre class="code">
+&lt;script&gt;
+    var myBar = new RGraph.Bar('cvs', [7,4,2,6,3,4,8]);
+    myBar.Draw();
+
+    myBar.canvas.onclick = function ()
+    {
+    }
+&lt;/script&gt;
+</pre>
+    <p>
+        But what if, for example, you're using an RGraph feature which
+        uses the event handler that you need? In this case you can use the standard DOM2 method <i>addEventListener()</i>. This will add
+        your new event handler without replacing any existing one (ie the one installed by RGraph). For example:
+    </p>
+
+    <pre class="code">
+&lt;script&gt;
+    var myBar = new RGraph.Bar('cvs', [7,4,2,6,3,4,8]);
+    myBar.Draw();
+
+    function myFunc ()
+    {
+    }
+
+    myBar.canvas.addEventListener('click', myFunc, false)
+&lt;/script&gt;
+</pre>
+
+
+    <a name="crlf"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Carriage returns and newlines in labels</h4>
+    
+    <p>
+        You can put carriage returns in your labels by using the string <i>\r\n</i>. This means your labels will span multiple lines.
+        Like so:
+    </p>
+    
+    <pre class="code">myBar.Set('chart.labels', 'John\r\n(Winner!)', ...)</pre>
+
+
+    <a name="character.set"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Character set issues</h4>
+    
+    <p>
+        If you're seeing strange, unrecognised characters in your text labels or titles, you may need to specify the correct
+        character set that the browser should use. In PHP you can do this with the <i>header()</i> function (which, as the
+        name suggests, sends a HTTP header):
+    </p>
+    
+    <pre class="code">&lt;?php
+    header("Content-Type: text/html; charset=ISO-8859-1");
+?&gt;</pre>
+
+    <p>
+        If you use Apache, you could use the <i>header</i> directive, though this may be overridden by other directives,
+        eg <i>AddDefaultCharset</i>.
+    </p>
+    
+    <a name="rgraph.identify"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>How to identify an RGraph object</h4>
+    
+    <p>
+        Because identity can sometimes be a tricky affair, there are a few RGraph properties that you can use to check whether an object
+        is an RGraph object:
+    </p>
+    
+    <ul>
+        <li><i>obj.isRGraph</i> - This is a boolean that you can use to clearly identify an RGraph object.</li>
+        <li><i>obj.type</i> - This identifies the type of an RGraph object. It is a string which contains a one word description of the objects chart type, eg bar/line/pie.</li>
+    </ul>
+
+
+    <!------------------------------------------------------------------------------------------------------------->
+
+
+
+
+
+
+    <a name="static.y.axis"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Static Y axis</h4>
+
+    <!--
+        The HTML and script necessary for a chart with a static Y axis. The libraries are included at the top of the page
+        in the <HEAD>
+    -->
+    <div style="position: relative; float: right; margin-right: 10px">
+        <!-- The width here is set further down the page in script -->
+        <canvas id="axes" width="0" height="170" style="position: absolute; top: 0; left: 0; z-index: 100"></canvas>
+        <div style="width: 600px; overflow: auto">
+            <canvas id="cvs" width="1000" height="200"></canvas>
+        </div>
+    </div>
+
+    <script>
+        ShowGraphOne = function ()
+        {
+            /**
+            * This is the script that draws the chart
+            */
+            line = new RGraph.Line('cvs', [3,15,22,26,28,24,22,25,23,24,26,23,24,25,27,28,29,26,23,22,24,21,24,25]);
+            line.Set('chart.noaxes', true); // We draw the Y axis ourselves further down the page
+            line.Set('chart.gutter.top', 25);
+            line.Set('chart.gutter.bottom', 35);
+            line.Set('chart.gutter.left', 50);
+            line.Set('chart.hmargin', 5);
+            line.Set('chart.linewidth', 3);
+            line.Set('chart.shadow', true);
+            line.Set('chart.shadow.offsetx', 0);
+            line.Set('chart.shadow.offsety', 0);
+            line.Set('chart.shadow.blur', 15);
+            line.Set('chart.shadow.color', 'red');
+            line.Set('chart.text.angle', 15);
+            line.Set('chart.tooltips', [
+                                        'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December',
+                                        'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
+                                       ]);
+            line.Set('chart.labels', [
+                                      'Jan `09','Feb 09', 'Mar 09','Apr 09','May 09','Jun 09','Jul 09','Aug 09','Sep 09','Oct 09','Nov 09', 'Dec 09',
+                                      'Jan 10', 'Feb 10', 'Mar 10','Apr 10','May 10','Jun 10','Jul 10','Aug 10','Sep 10','Oct 10','Nov 10', 'Dec 10'
+                                     ]);
+            line.Draw();
+    
+    
+    
+            /**
+            * And this is the script that draws the left axis, on the other canvas (that doesn't move)
+            */
+            ca = document.getElementById("axes")
+            co = ca.getContext('2d');
+
+
+            /**
+            * This sets the smaller canvas to cover the whole of the charts left gutter
+            */
+            ca.width = line.Get('chart.gutter.left') + 1;
+
+
+            RGraph.Clear(ca, 'white');
+
+
+            /**
+            * This draws the static axis
+            */
+
+            co.beginPath();
+                co.moveTo(line.Get('chart.gutter.left'), line.Get('chart.gutter.top'));
+                co.lineTo(line.Get('chart.gutter.left'), line.canvas.height - line.Get('chart.gutter.bottom'));
+
+                // Draw the tickmarks on the axis
+                var numTicks = 10;
+                for (var i=0; i<=numTicks; ++i) {
+                    co.moveTo(line.Get('chart.gutter.left'), line.Get('chart.gutter.top') + (((line.canvas.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom')) / numTicks) * i));
+                    co.lineTo(line.Get('chart.gutter.left') - 3, line.Get('chart.gutter.top') + (((line.canvas.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom')) / numTicks) * i));
+                }
+
+            co.stroke();
+
+
+
+            /**
+            * This draws the labels for the static axis
+            */
+            co.beginPath();
+                var color = 'black';
+                var size = 10;
+
+                for (var i=0; i<5; ++i) {
+                    co.fillStyle = color;
+                    co.textAlign = 'right';
+                    co.textBaseline = 'middle';
+                    var h = line.canvas.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom');
+
+                    RGraph.Text(co, 'Verdana', size, line.Get('chart.gutter.left') - 4, line.Get('chart.gutter.top') + (h * (i/5)), line.max - (line.max * (i/5)));
+                }
+                
+                // Draw zero
+                RGraph.Text(co,
+                            'Verdana',
+                            size,
+                            line.Get('chart.gutter.left') - 4,
+                            165,
+                            '0');
+            co.fill();
+        }
+    </script>
+    
+    A static Y axis is useful if you have a wide chart but limited space. Whilst not part of the RGraph libraries itself, it can be
+    achieved with a little HTML, like the chart shown. The HTML and the script to achieve this is shown below.
+    It involves placing an extra canvas above the chart with the Y axis drawn on it. This canvas doesn't
+    move when the main canvas scrolls left and right.
+    
+    <p />
+    
+    <b>Note:</b> Because Firefox doesn't support the event.offsetX and event.offsetY properties and they have to be simulated,
+    scrolling in conjunction with tooltips in this case and this browser doesn't work.
+
+    <pre class="code">
+&lt;div style="position: relative; float: right; margin-right: 10px; margin-top: 10px"&gt;
+    &lt;!-- The width here is set further down the page in script --&gt;
+    &lt;canvas id="axes" width="0" height="200" style="position: absolute; top: 0; left: 0; z-index: 100"&gt;&lt;/canvas&gt;
+    &lt;div style="width: 600px; overflow: auto"&gt;
+        &lt;canvas id="cvs" width="1000" height="200"&gt;&lt;/canvas&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;script&gt;
+    window.onload = function ()
+    {
+        /**
+        * This is the script that draws the chart
+        */
+        line = new RGraph.Line('cvs', [3,15,22,26,28,24,22,25,23,24,26,23,24,25,27,28,29,26,23,22,24,21,24,25]);
+        line.Set('chart.noaxes', true); // We draw the Y axis ourselves
+        line.Set('chart.gutter.top', 25);
+        line.Set('chart.gutter.bottom', 35);
+        line.Set('chart.gutter.left', 50);
+        line.Set('chart.hmargin', 5);
+        line.Set('chart.linewidth', 3);
+        line.Set('chart.shadow', true);
+        line.Set('chart.shadow.offsetx', 0);
+        line.Set('chart.shadow.offsety', 0);
+        line.Set('chart.shadow.blur', 15);
+        line.Set('chart.shadow.color', 'red');
+        line.Set('chart.text.angle', 15);
+        line.Set('chart.tooltips', [
+                                    'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December',
+                                    'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
+                                   ]);
+        line.Set('chart.labels', [
+                                  '','Feb 09', 'Mar 09','Apr 09','May 09','Jun 09','Jul 09','Aug 09','Sep 09','Oct 09','Nov 09', 'Dec 09',
+                                  'Jan 10', 'Feb 10', 'Mar 10','Apr 10','May 10','Jun 10','Jul 10','Aug 10','Sep 10','Oct 10','Nov 10', 'Dec 10'
+                                 ]);
+        line.Draw();
+
+
+
+        /**
+        * And this is the script that draws the left axis, on the other canvas (that doesn't move)
+        */
+        ca = document.getElementById("axes")
+        co = ca.getContext('2d');
+
+
+        /**
+        * This sets the smaller canvas to cover the whole of the charts left gutter
+        */
+        ca.width = line.Get('chart.gutter.left') + 1;
+
+
+        RGraph.Clear(ca, 'white');
+
+
+        /**
+        * This draws the static axis
+        */
+        co.beginPath();
+            co.moveTo(line.Get('chart.gutter.left'), line.Get('chart.gutter.top'));
+            co.lineTo(line.Get('chart.gutter.left'), line.canvas.height - line.Get('chart.gutter.bottom'));
+
+            // Draw the tickmarks on the axis
+            var numTicks = 10;
+            for (var i=0; i<=numTicks; ++i) {
+                co.moveTo(line.Get('chart.gutter.left'), line.Get('chart.gutter.top') + (((ca.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom')) / numTicks) * i));
+                co.lineTo(line.Get('chart.gutter.left') - 3, line.Get('chart.gutter.top') + (((ca.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom')) / numTicks) * i));
+            }
+
+        co.stroke();
+
+
+
+        /**
+        * This draws the labels for the static axis
+        */
+        co.beginPath();
+            var color = 'black';
+            var size = 10;
+
+            for (var i=0; i<5; ++i) {
+                co.fillStyle = color;
+                co.textAlign = 'right';
+                co.textBaseline = 'middle';
+                var h = line.canvas.height - line.Get('chart.gutter.top') - line.Get('chart.gutter.bottom');
+
+                RGraph.Text(co,
+                            'Verdana',
+                            size,
+                            line.Get('chart.gutter.left') - 4,
+                            line.Get('chart.gutter.top') + (h * (i/5)),
+                            line.max - (line.max * (i/5)));
+            }
+        co.fill();
+    }
+&lt;/script&gt;
+</pre>
+    <!------------------------------------------------------------------------------------------------------------->
+
+
+    <br clear="all" />
+    <br clear="all" />
+
+
+    <!-- This chart is an example of how you can eliminate the gutter white space by translating before you draw the chart. -->
+    
+    <a name="reducing.white.space"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Reducing white space</h4>
+
+    <canvas id="myc" width="600" height="250" style="float: right; border: dashed  1px gray; margin-right: 10px"></canvas>
+
+    <script>
+        ShowGraphTwo = function ()
+        {            
+        
+            var arg1 = [73, 65, 76, 75, 69, 73, 54, 61, 89, 77];
+            var arg2 = [264, 240, 240, 256, 200, 208, 240, 216, 248, 240]
+        
+            var line1 = new RGraph.Line('myc', arg1 , arg2); 
+            line1.Set('chart.colors', ['red', 'silver']); 
+            line1.Set('chart.background.barcolor1', 'white'); 
+            line1.Set('chart.background.barcolor2', 'white'); 
+            line1.Set('chart.labels', ['Jan 2000',
+                                       'Feb 2001',
+                                       'Mar 2002',
+                                       'Apr 2003',
+                                       'May 2004',
+                                       'Jun 2005',
+                                       'Jul 2006',
+                                       'Aug 2007',
+                                       'Sep 2008',
+                                       'Oct 2009'])
+            line1.Set('chart.filled', true); 
+            line1.Set('chart.fillstyle', ['#fcc', '#cfc']); 
+            line1.Set('chart.gutter.top', 5);
+            line1.Set('chart.gutter.bottom', 55);
+            line1.Set('chart.gutter.left', 55);
+            line1.Set('chart.gutter.right', 35);
+            line1.Set('chart.background.grid', true); 
+            line1.Set('chart.ymax', 365) 
+            line1.Set('chart.yaxispos', 'right'); 
+            line1.Set('chart.title.xaxis', 'Month'); 
+            line1.Set('chart.title.yaxis', 'Temperature');
+            line1.Set('chart.title.xaxis.pos', -0.3);
+            line1.Set('chart.title.yaxis.pos', 0.5);
+            line1.Set('chart.text.angle', 30);
+            line1.Set('chart.tooltips', [
+                                         'January 2000','February 2001','March 2002','April 2003','May 2004','June 2005','July 2006','August 2007','September 2008','October 2009',
+                                         'January 2000','February 2001','March 2002','April 2003','May 2004','June 2005','July 2006','August 2007','September 2008','October 2009'
+                                        ]);
+            line1.Draw();
+        }
+        
+        window.onload = function ()
+        {
+            ShowGraphOne();
+            ShowGraphTwo();
+        }
+    </script>
+
+    <p>
+        New in June 2011 is the ability to set the gutters independently. This removes the necessity to translate
+        and adjust the coordinates to get more space and is far more straight-forward. The new properties are:
+        
+        <ul>
+            <li>chart.gutter.left</li>
+            <li>chart.gutter.right</li>
+            <li>chart.gutter.top</li>
+            <li>chart.gutter.bottom</li>
+        </ul>
+        
+        You can read more about this change <a href="gutters.html"><b>here</b></a>.
+    </p>
+
+
+    <br clear="all" />
+
+
+    <a name="in.graph"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>In-graph labels</h4>
+        
+        <p>
+            As well as an array of strings, like this:
+        </p>
+        
+        <pre class="code">obj.Set('chart.labels.ingraph', ['First label','Second label']);</pre>
+        
+        <p>
+            The string can also be an array, consisting of color and placement information, like this:
+        </p>
+        
+        <pre class="code">obj.Set('chart.labels.ingraph', ['First label',<span style="color: green">['Second label', 'red', 'yellow', -1, 50]</span> ]);</pre>
+        
+        
+        <p>
+            You can read more information about this <a href="ingraph.html">here</a>.
+        </p>
+
+    <a name="shorthand.ingraph.labels"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Shorthand for in-graph labels</h4>
+            <p>
+                Instead of providing a full array of <i>null</i> elements for in-graph labels which may get a little unwieldy,
+                you can instead  specify an integer that specifies how many elements to skip. Like this:
+            </p>
+            
+            <pre class="code">line.Set('chart.labels.ingraph', [6, 'July', 3, 'November']);</pre>
+    
+        <br clear="all" />
+        <br clear="all" />
+
+    <a name="dom2.events"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>DOM2 Event handlers</h4>
+            <p>
+                All the charts have now (1st October 2010) been converted to DOM2 for tooltips event registration. This allows them to
+                be far more co-operative if you're using events. Tooltips will not be compatible with MSIE8 - the charts will still be
+                drawn, albeit without tooltips.
+            </p>
+    
+    
+    
+        <br clear="all" />
+
+
+
+
+    <a name="data.types"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Data types</h4>
+        <p>
+            If your data values aren't the correct type - ie numbers - it can cause problems. Pay particular attention to this
+            when you're getting your data from data sources which may be classed as strings, such as JSON or AJAX requests.
+        </p>
+
+
+
+
+    <a name="create.your.own"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Creating your own chart type</h4>
+        <p>
+            If you wish to create your own chart type, there is a skeleton file
+            <a href="../libraries/RGraph.skeleton.js" target="_blank"><b>here</b></a> that you can use as a starting point.
+            This file contains the bare bones of an RGraph object, such as the .Get() and .Set() methods, as well as examples
+            of common properties.
+        </p>
+
+
+    <a name="world.map"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>World map</h4>
+        <p>
+            There is no function in RGraph to do mapping, either of the World or a smaller region. If this is what you want then you
+            may be interested in this HTML5 canvas based mapping system:
+            <a href="http://joncom.be/code/excanvas-world-map/" target="_blank">http://joncom.be/code/excanvas-world-map/</a>
+        </p>
+
+
+    <a name="text"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Adding text to your charts</h4>
+        <p>
+            You can add arbitrary text to your charts by using the RGraph API. For example you could use this code after the call to .Draw():
+        </p>
+        
+        <pre class="code">
+function DrawSubTitle (obj)
+{
+    var context = obj.context;
+    
+    context.beginPath();
+        context.fillStyle = 'gray';
+        RGraph.Text(context,
+                    'Verdana',
+                    7,
+                    obj.canvas.width / 2,
+                    obj.Get('chart.gutter.top') - 6,
+                    'The subtitle',
+                    'center',
+                    'center');
+    context.fill();
+}
+
+DrawSubTitle(myLine);
+</pre>
+
+This is the code that is used on the <a href="../examples/line.html">line chart example page</a>.
+
+    <a name="known.issues"></a>
+    <br />&nbsp;<br />&nbsp;<br />
+    <h4>Known issues</h4>
+    
+    <p>
+        There's a few known issues documented <a href="issues.html">here</a>
+    </p>
+
+
+    <p />
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/msie.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/msie.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/msie.html	(revision 225)
@@ -0,0 +1,230 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Microsoft Internet Explorer support</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas docs msie" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Microsoft Internet Explorer (MSIE) support" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <script src="../libraries/RGraph.modaldialog.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <style>
+        div#msie9 {
+            background-color: #dfd;
+            padding: 5px;
+            border: 2px dashed green;
+        }
+    </style>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        MSIE support
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Microsoft Internet Explorer (MSIE) support</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p />
+
+    <div id="msie9">
+        <b>Microsoft Internet Explorer 9</b>
+        
+        <p>
+            Starting from preview 3, Internet Explorer 9 has support for canvas, including the text and shadow APIs. It also
+            benefits from hardware acceleration, and quick rendering times. You can see some screenshots
+            <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a>.
+        </p>
+    </div>
+    
+    <br />
+
+    <canvas id="myLine" width="600" height="250" style="float: right">[No canvas support]</canvas>
+
+    <script>
+
+        window.onload = function ()
+        {
+            var data1 = [4,3,6,8,4,2,1,4,9,8,7,8];
+            var data2 = [1,2,4,2,1,3,5,6,6,5,3,5];
+    
+            // No "var" as the variable has to be global
+            line = new RGraph.Line('myLine', data1, data2);
+            line.Set('chart.title', 'Sales for Acme Inc. (context menu)');
+            line.Set('chart.title.vpos', 0.5);
+            line.Set('chart.colors', ['red', 'black']);
+            line.Set('chart.linewidth', 5);
+
+            // Odd, but this seems to fix an strange MSIE bug where the text is truncated
+            line.Set('chart.units.post', '%                         .');
+
+            line.Set('chart.yaxispos', 'right');
+            line.Set('chart.key', ['2007', '2008']);
+            line.Set('chart.key.background', 'white');
+            line.Set('chart.noaxes', true);
+            line.Set('chart.gutter.left', 5);
+            line.Set('chart.gutter.right', 35);
+            line.Set('chart.hmargin', 10);
+            line.Set('chart.background.barcolor1', 'white');
+            line.Set('chart.background.barcolor2', 'white');
+            line.Set('chart.shadow', true);
+            line.Set('chart.background.grid.autofit', true);
+            line.Set('chart.contextmenu', [['Show dialog', function () {ModalDialog.Show('myDialog', 300);}], ['Cancel', function () {}]]);
+            line.Draw();
+        }
+    </script>
+    
+    <ul>
+        <li><a href="#introduction">Introduction</a></li>
+        <li><a href="#getting">Getting hold of ExCanvas</a></li>
+        <li><a href="#caveats">Caveats</a></li>
+        <li><a href="#frame">Google Chrome Frame</a></li>
+        <li><a href="#dynamic.canvas">Using a dynamically created canvas</a></li>
+    </ul>
+
+    <a name="introduction"></a>
+    <h4>Introduction</h4>
+    
+    <p>
+        As of December 2009 RGraph now works partially with Internet Explorer without Google Chrome Frame.
+        Charts are rendered as VML. You are still recommended to use
+        <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a> to get the best results.
+        The interactive features are unlikely to work correctly. RGraph only works with Microsoft
+        Internet Explorer 8.
+    </p>
+    
+    <p>
+        Thanks go to everyone involved with the <a href="http://code.google.com/p/explorercanvas/" target="_blank" rel="nofollow">ExCanvas project</a> for providing the ExCanvas library.
+    </p>
+    
+    <a name="getting"></a>
+    <h4>Getting hold of ExCanvas</h4>
+    
+    <p>
+        Google ExCanvas is distributed with RGraph in the "excanvas" directory. There is a minified gzip compressed version, along
+        with the original.
+    </p>
+
+    <a name="caveats"></a>
+    <h4>Caveats</h4>
+    
+    <ul>
+        <li>The interactive features of RGraph are unlikely to work correctly with MSIE 8.</li>
+        <li>Shadows are now available (on some chart types), albeit without blurring.</li>
+        <li>You must reference the Javascript libraries in the documents &lt;head&gt;.</li>
+        <li>You must use the window.onload event to create your chart.</li>
+        <li>If your page is large, there may be a slight pause before the window.onload event fires and thus creates the chart.</li>
+        <li>Changing the font that text is shown in is not available.</li>
+    </ul>
+    
+    <a name="frame"></a>
+    <h4>Google Chrome Frame</h4>
+        <p>
+            Instead of ExCanvas you can also use Google Chrome Frame. This basically turns Internet Explorer into Google Chrome, and fully
+            supports RGraph. Since it involves a plugin installation, this is a better option if you can fully influence the users PC. If you
+            can fully influence the users PC however, a better option might be to simply use one of the browsers with native
+            support.
+        </p>
+
+
+    <br />
+
+
+    <a name="dynamic.canvas"></a>
+    <h4>Using a dynamically created canvas</h4>
+        <p>
+            If you're creating your canvas dynamically there is an extra step that you must perform to allow it to be recognised by
+            ExCanvas:
+        </p>
+        
+        <pre class="code">
+var canvas = document.createElement('CANVAS');
+    canvas.id = 'cvs';
+    canvas.width = 600;
+    canvas.height = 250;
+    canvas.style.border = '1px dashed black';
+document.body.appendChild(canvas);
+
+<span style="color: green">G_vmlCanvasManager.initElement(canvas);</span>
+</pre>
+    
+
+    
+    <br />
+    <br />
+    <br />
+
+    <!-- This is the ModdalDialog -->
+    <div id="myDialog" style="display: none">
+        <div style="text-align: center; font-family: Arial">
+            <h4>Please wait...</h4>
+            <span style="font-size: 8pt">(Nothing is going to happen, this is simply an example <a href="" onclick="ModalDialog.Close(); return false">Close</a>)</span>
+        </div>
+    </div>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/odo.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/odo.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/odo.html	(revision 225)
@@ -0,0 +1,393 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Odometer charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas docs odometer charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Odometer charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Odometer charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Odometer charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p> 
+        The example file is <a href="../examples/odo.html">here</a>.
+    </p> 
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        // ID, MINIMUM, MAXIMUM, INDICATED VALUE
+        var odo = new RGraph.Odometer('myOdo', 0, 100, 18);
+        
+        odo.Set('chart.green.max', 75);
+        odo.Set('chart.red.min', 90);
+        odo.Set('chart.label.area', 50);
+        odo.Set('chart.needle.thickness', 2);
+    
+        odo.Draw();
+    }
+&lt;/script&gt;
+</pre>
+    
+    <!--
+        <div class="warning">
+            <p>Note</p>
+             As of 20th March 2010, how you specify the start and end values has changed. The chart.green.start, chart.green.end, chart.yellow.start,
+             chart.yellow.end, chart.red.start and chart.red.end have all been replaced by chart.green.max and chart.red.min. Now the
+             green area always starts at zero and goes to chart.green.max, and the red area starts (by default - you can customise this by using
+             chart.red.min) at 90% of the maximum value and goes to the maximum value. The yellow area is between the two.
+        </div>
+    -->
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the Odometer apears. You can set these properties using the <b>Set()</b> method.
+    </p>
+    
+    <ul>
+        <li><a href="#chart configuration">Chart configuration</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#needle">Needle</a></li>
+        <li><a href="#title">Title</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li><li><a href="#scale">Scale</a></li>
+    </ul>
+
+
+<a name="chart configuration"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Chart configuration</h3>
+
+            <a name="chart.value.text"></a>
+            <b>chart.value.text</b><br />
+            Controls whether the value is indicated as a text label in the center of the dial.<br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.value.units.pre"></a>
+            <b>chart.value.units.pre</b><br />
+            The pre units used on the textual value.<br /><i>Default: nothing (An empty string)</i><br /><br />
+            
+            <a name="chart.value.units.post"></a>
+            <b>chart.value.units.post</b><br />
+            The post units used on the textual value.<br /><i>Default: nothing (An empty string)</i><br /><br />
+            
+            <a name="chart.border"></a>
+            <b>chart.border</b><br />
+            This controls the gray border of the Odometer.<br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.tickmarks.highlighted"></a>
+            <b>chart.tickmarks.highlighted</b><br />
+            This controls whether the tickmarks are highlighted in red/yellow/green.<br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.zerostart"></a>
+            <b>chart.zerostart</b><br />
+            If you want the top value on your chart to be zero instead of the maximum value, set this to true.<br /><i>Default: false</i><br /><br />
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+            
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>
+            
+            <a name="chart.border.color1"></a>
+            <b>chart.border.color1</b><br />
+            This is the first color used in the gradient of the outer border of the chart (if enabled).<br />
+            <i>Default: #BEBCB0</i><br /><br />
+            
+            <a name="chart.border.color2"></a>
+            <b>chart.border.color2</b><br />
+            This is the second/middle color used in the gradient of the outer border of the chart (if enabled).<br />
+            <i>Default: #F0EFEA</i><br /><br />
+            
+            <a name="chart.border.color3"></a>
+            <b>chart.border.color3</b><br />
+            This is the third color used in the gradient of the outer border of the chart (if enabled).<br />
+            <i>Default: #BEBCB0</i><br /><br />
+
+            <a name="chart.green.max"></a>
+            <b>chart.green.max</b><br />
+            This is the point at which the green area ends.<br />
+            <i>Default: 75% of the maximum value</i><br /><br />
+
+            <a name="chart.red.min"></a>
+            <b>chart.red.min</b><br />
+            This is the point at which the red area starts. The yellow area is between the green and red areas.<br />
+            <i>Default: 90% of the maximum value</i><br /><br />
+
+            <a name="chart.green.color"></a>
+            <b>chart.green.color</b><br />
+            This option has two roles. If <i>chart.green.solid</i> is true, this is the actual color, whereas if
+            <i>chart.green.solid</i> is false (the default), it's used as one of the gradient colors.<br />
+            <i>Default: green</i><br /><br />
+
+            <a name="chart.yellow.color"></a>
+            <b>chart.yellow.color</b><br />
+            This option has two roles. If <i>chart.yellow.solid</i> is true, this is the actual color, whereas if
+            <i>chart.yellow.solid</i> is false (the default), it's used as one of the gradient colors.<br />
+            <i>Default: yellow</i><br /><br />
+
+            <a name="chart.red.color"></a>
+            <b>chart.red.color</b><br />
+            This option has two roles. If <i>chart.red.solid</i> is true, this is the actual color, whereas if
+            <i>chart.red.solid</i> is false (the default), it's used as one of the gradient colors.<br />
+            <i>Default: red</i><br /><br />
+
+            <a name="chart.green.solid"></a>
+            <b>chart.green.solid</b><br />
+            If <i>true</i> then the associated <i>chart.green.color</i> option is used as the  actual color, not part of a gradient<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.yellow.solid"></a>
+            <b>chart.yellow.solid</b><br />
+            If <i>true</i> then the associated <i>chart.yellow.color</i> option is used as the  actual color, not part of a gradient<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.red.solid"></a>
+            <b>chart.red.solid</b><br />
+            If <i>true</i> then the associated <i>chart.red.color</i> option is used as the  actual color, not part of a gradient<br />
+            <i>Default: false</i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            Instead of using computed numbers, which uses the maximum value, you can specify the Odometer to use textual labels instead, with this option.<br /> <i>Default: null</i><br /><br />
+            <a name="chart.label.area"></a>
+<b>chart.label.area</b><br />
+            The width of the area that labels are put in. <br /><i>Default: 35</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points). <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+<a name="needle"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Needle</h3>            <a name="chart.needle.width"></a>
+<b>chart.needle.width</b><br />
+            How thick the needle is. <br /><i>Default: 2</i><br /><br />
+            <a name="chart.needle.color"></a>
+<b>chart.needle.color</b><br />
+            The color that is applied to the needle. <br /><i>Default: black</i><br /><br />
+            <a name="chart.needle.head"></a>
+<b>chart.needle.head</b><br />
+            This controls whether the arrow head on the end of the needle is displayed. <br /><i>Default: true</i><br /><br />
+            
+            <a name="chart.needle.type"></a>
+            <b>chart.needle.type</b><br />
+            This determines which type of needle is used. It can be <i>pointer</i> or <i>triangle</i>. <br />
+            <i>Default: pointer</i><br /><br />
+            
+            <a name="chart.needle.triangle.border"></a>
+            <b>chart.needle.triangle.border</b><br />
+            This controls the colour of the border for the pointer. If you don't want it you could set it to be transparent -
+            <i>rgba(0,0,0,0)</i>.<br />
+            <i>Default: #aaa</i><br /><br />
+            
+            <a name="chart.needle.extra"></a>
+            <b>chart.needle.extra</b><br />
+            With this you can specify a number of extra pointers that will be drawn on the Odometer. An example would be a meter that's used to show upload and download data. An example use:<pre class="code">odo.Set('chart.needle.extra', [[16, 'red'], [24, 'blue']]);</pre><br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+<a name="title"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Title</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title text. <br /><i>Default: no title set</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow.inner"></a>
+<b>chart.shadow.inner</b><br />
+            Whether a drop shadow is applied to the inner circle of the Odometer<br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.outer"></a>
+<b>chart.shadow.outer</b><br />
+            Whether a drop shadow is applied to the whole Odometer.<br /><i>Default: false</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+
+            <a name="chart.units.pre"></a>
+            <b>chart.units.pre</b><br />
+            The units that the value is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50" and is only used if chart.value.text is <i>true</i>.<br /><i>Default: none</i><br /><br />
+            
+            <a name="chart.units.post"></a>
+            <b>chart.units.post</b><br />
+            The units that the value is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms" and is only used if chart.value.text is <i>true</i>.<br /><i>Default: none</i><br /><br />
+
+            <a name="chart.scale.decimals"></a>
+<b>chart.scale.decimals</b><br />
+            The number of decimal places to display for the labels.<br /><i>Default: 0</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/pie.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/pie.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/pie.html	(revision 225)
@@ -0,0 +1,502 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Pie charts documentation</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs pie charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Pie charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Pie charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Pie charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        The pie chart can be used, for example, to represent something that is akin to percentages. ie A set of data that
+        should be taken as part of a whole.
+    </p>
+    
+    <p> 
+        The example file is <a href="../examples/pie.html">here</a>.
+    </p> 
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [564,155,499,611,322];
+    
+        var pie = new RGraph.Pie('myPie', data);
+        pie.Set('chart.labels', ['Abc', 'Def', 'Ghi', 'Jkl', 'Mno']);
+        pie.Set('chart.linewidth', 5);
+        pie.Set('chart.stroke', '#fff');
+        pie.Draw();
+    }
+&lt;/script&gt;
+</pre>
+    
+    <a name="available.properties"></a>
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+        <li><a href="#available.methods">Methods</a></li>
+    </ul>
+
+    <h2>Properties</h2>
+
+    <p>
+        You can use these properties to control how the pie chart looks. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myPie.Set('name', 'value');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#shadows">Shadows</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.colors"></a>
+<b>chart.colors</b><br />
+            Colors to be used for the pie segments. <br /><i>Default: ['rgb(255,0,0)', '#ddd', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)', 'red', 'pink', 'black', 'white']</i><br /><br />
+            <a name="chart.strokestyle"></a>
+<b>chart.strokestyle</b><br />
+            The color of the seperating lines. By setting this to your background color, and setting the linewidth to approx. 5, it will make the pie chart look "exploded". <br /><i>Default: #999</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points). <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            An array of labels to be used for the chart. <br /><i>Default: [] (an empty array)</i><br /><br />
+            <a name="chart.labels.sticks"></a>
+<b>chart.labels.sticks</b><br />
+            Stipulates that small sticks for the labels are shown. The <a href="../examples/pie.html">example page</a> has an example of this.<br /><i>Default: false</i><br /><br />
+            <a name="chart.labels.sticks.color"></a>
+<b>chart.labels.sticks.color</b><br />
+            Sets the color of the label sticks.<br /><i>Default: #aaa</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the pie chart. <br /><i>Default: none</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+<a name="shadows"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadows</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether a simple shadow effect is applied. <br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow. <br /> <i>Default: rgba(0,0,0,0.5)</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect. <br /> <i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the shadow.<br /><i>Default: 3</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+
+            <a name="chart.tooltips"></a>
+            <b>chart.tooltips</b><br />
+            An array of tooltips, starting from the middle right (ie east) axis, and going clockwise sequentially.<br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.tooltips.event"></a>
+            <b>chart.tooltips.event</b><br />
+            This can be <i>onclick</i> or <i>onmousemove</i> and determines which event is used for tooltips.<br />
+            <i>Default: onclick</i><br /><br />
+
+            <a name="chart.tooltips.effect"></a>
+            <b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br />
+            <i>Default: fade</i><br /><br />
+            
+            <a name="chart.tooltips.css.class"></a>
+            <b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br />
+            <i>Default: RGraph_tooltip</i><br /><br />
+            
+            <a name="chart.tooltips.override"></a>
+            <b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more
+            information on the <a href="tooltips.html">tooltips documentation page</a><br />
+            <i>Default: null</i><br /><br />
+
+
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+
+
+<a name="miscellaneous"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>            <a name="chart.align"></a>
+<b>chart.align</b><br />
+            Whether to left, center or right align the pie chart.<br /><i>Default: center</i><br /><br />
+            <a name="chart.linewidth"></a>
+<b>chart.linewidth</b><br />
+            By setting this to roughly 5, and setting the strokestyle to the same colour as your background colour,you will get a segment separation effect.<br /><i>Default: 1</i><br /><br />
+            
+            <a name="chart.variant"></a>
+            <b>chart.variant</b><br />
+            This can be either <i>pie</i> (the default) or <i>donut</i>. Setting this to <i>donut</i> is how you get a
+            donut chart.<br />
+            <i>Default: pie</i><br /><br />
+            
+            <a name="chart.variant.donut.color"></a>
+            <b>chart.variant.donut.color</b><br />
+            This is the color of the center of the Donut chart.<br />
+            <i>Default: white</i><br /><br />
+
+            <a name="chart.value.text"></a>
+            <b>chart.value.text</b><br />
+            Set this to true if you want the value displayed in text beow the center of the pointer.<br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.highlight.style"></a>
+            <b>chart.highlight.style</b><br />
+            Can be either <i>explode</i>, <i>2d</i> or <i>3d</i> and determines which style of segment highlighting is used in
+            conjunction with tooltips.<br />
+            <i>Default: 2d</i><br /><br />
+            
+            <a name="chart.highlight.style.2d.fill"></a>
+            <b>chart.highlight.style.2d.fill</b><br />
+            When 2D highlighting for tooltips is used, this controls the color of the highlighting. The former name for this property was
+            <i>chart.highlight.style.2d.color</i>.<br />
+            <i>Default: rgba(255,255,255,0.5)</i><br /><br />
+            
+            <a name="chart.highlight.style.2d.stroke"></a>
+            <b>chart.highlight.style.2d.stroke</b><br />
+            When 2D highlighting for tooltips is used, this controls the stroke color of the highlighting.<br />
+            <i>Default: rgba(255,255,255,0)</i><br /><br />
+            
+            <a name="chart.explode"></a>
+            <b>chart.explode</b><br />
+            This can either be an array with the same number of elements as segments, or a single number, in which case every
+            segment will be exploded that amount. If it's an array then only those segments will be exploded - eg <i>[0,5,0,0]</i><br />
+            <i>Default: [] (an empty array)</i><br /><br />
+</div>
+
+    <a name="available.methods"></a>
+    <br />&nbsp;<br />
+    <h2>Methods</h2>
+
+    <b>obj.getSegment()</b><br /><br />
+    
+    obj.getSegment() makes it easy to determine which segment of the Pie chart was clicked on. It provides:
+    
+    <ul>
+        <li>Originating X coordinate</li>
+        <li>Originating Y coordinate</li>
+        <li>The radius of the segment</li>
+        <li>The starting angle (in degrees)</li>
+        <li>The ending angle (in degrees)</li>
+        <li>The zero-indexed segment number</li>
+    </ul>
+
+    <pre class="code">
+&lt;script&gt;
+    RGraph.Register(myGraph);
+    
+    myGraph.canvas.onclick = function (e)
+    {
+        RGraph.FixEventObject(e);
+        RGraph.Redraw();
+
+        var canvas  = e.target;
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        <span style="color: green">var segment = obj.getSegment(e);</span>
+        
+        if (segment) {
+            context.fillStyle = 'rgba(255,255,255,0.5)';
+            context.beginPath();
+                
+                // Angles are provided in degrees, so convert them to radians
+                segment[3] /= 57.29;
+                segment[4] /= 57.29;
+            
+                context.moveTo(segment[0], segment[1]);
+                context.arc(segment[0], segment[1], segment[2], segment[3], segment[4], 0);
+            context.stroke();
+            context.fill();
+            
+            e.stopPropagation();
+        }
+    }
+    
+    window.onclick = function (e)
+    {
+        RGraph.Redraw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <b>Important Note</b>
+
+    <p>
+        This method was formerly a common object method, called <i>RGraph.getSegment(e)</i>, but has now (6th March 2011) been
+        moved to be part of the Pie chart object.
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/png.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/png.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/png.html	(revision 225)
@@ -0,0 +1,185 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Retrieving a PNG of your graph</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts docs png image" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Retrieving a PNG representation of your chart" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            var line = new RGraph.Line('cvs', [4,3,7,4,5,6,7,4,8,9]);
+            line.Set('chart.labels', ['Dez', 'Fliss','Geoff','Hoolio','John','Rich','Kev','Charles','Lou','Bob']);
+            line.Set('chart.hmargin', 5);
+            line.Set('chart.title', 'Retrieving a PNG of your chart (context menu)');
+            line.Set('chart.title.vpos', 0.5);
+            line.Set('chart.tickmarks', 'endcircle');
+            
+            line.Set('chart.contextmenu', [
+                                           ['Get PNG', RGraph.showPNG],
+                                           null,
+                                           ['Cancel', function () {}]
+                                          ]);
+
+            line.Set('chart.linewidth', 2);
+            line.Set('chart.shadow', true);
+            line.Set('chart.shadow.offsetx', 0);
+            line.Set('chart.shadow.offsety', 0);
+            line.Set('chart.shadow.blur', 15);
+            line.Set('chart.shadow.color', 'red');
+            
+            RGraph.Clear(line.canvas, 'white'); // This effectively sets the background color to be white
+            
+            line.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="index.html">Documentation</a>
+    >
+    Retrieving a PNG of your chart
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Retrieving a PNG of your chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <style>
+        span#png_link {
+            position: absolute;
+            left: 500px;
+            top: 30px;
+            border: 1px black solid;
+            padding: 1px;
+            background-color: rgba(225,225,225,0.5);
+            cursor: pointer;
+            color: blue;
+            font-size: 12pt;
+        }
+    </style>
+
+    <div style="position: relative">
+        <span id="png_link" onclick="RGraph.showPNG(document.getElementById('cvs'), event);">Get PNG</span>
+        <canvas id="cvs" width="600" height="250" style="float: left">[No canvas support]</canvas>
+    </div>
+    
+    
+    <p>
+        RGraph  provides an easy way to get a PNG image of your chart. This allows you to
+        easily save the image locally to use in (for example) a document, spreadsheet or presentation.
+    </p>
+    
+    <p>
+        Originally, the function was designed to be used with a context menu, so it is located in the <i>RGraph.common.context.js</i>.
+        Now though, you do not have to use the function with a context menu, and can instead pass in the canvas as the optional argument. There's an
+        example of its usage on the first <a href="../examples/radar.html">Radar example</a href>.
+    </p>
+    
+    <br clear="all" />
+
+    <p>Include the context menu code:</p>
+    <pre class="code">&lt;script src="../libraries/RGraph.common.context.js" &gt;&lt;/script&gt;</pre>
+    
+    <p>Add the context menu:</p>
+    <pre class="code">
+myGraph.Set('chart.contextmenu', [
+                                  <span style="color: green">['Get PNG', RGraph.showPNG]</span>,
+                                  null,
+                                  ['Cancel', function () {}]
+                                 ]);</pre>
+
+    <h4>Using the function without a context menu</h4>
+
+    <p>
+        If you want to use the function with a piece of text (or an image) as the "link", optionally positioned over the canvas, you can pass
+        the canvas into the function as an argument, along with the event object.
+    </p>
+    
+    <pre class="code">
+&lt;!-- This CSS positions the link over the top right of the canvas --&gt;
+&lt;style&gt;
+    span#png_link {
+        position: absolute;
+        left: 450px;
+        top: 30px;
+        border: 1px black solid;
+        padding: 1px;
+        background-color: #eee;
+        cursor: pointer;
+    }
+&lt;/style&gt;
+
+&lt;div style="position: relative"&gt;
+    &lt;span id="png_link" <span style="color: green">onclick="RGraph.showPNG(myCanvas, event)"</span>&gt;Get PNG&lt;/span&gt;
+    &lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+&lt;/div&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/radar.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/radar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/radar.html	(revision 225)
@@ -0,0 +1,420 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for personal,    |
+        * | charity and educational purposes it is free to use. You can read the full    |
+        * | license here:                                                                |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Radar charts documentation</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Radar charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Radar charts documentation</h1>
+
+    <div style="background-color: #ffb; border: 2px dashed #000; padding: 3px">
+        This chart used to be called the Tradar chart (T standing for "Traditional" - there used to be two Radar charts in RGraph),
+        however now (July 2011), it has been renamed to the "Radar" chart to make it easier for people to identify. If you use it
+        you will need to update your code accordingly. Keep in mind that if you use the .type property - this has been updated too
+        (to <i>radar</i>).
+    </div>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        A Radar chart.
+    </p>
+    
+    <p>
+        The example file is <a href="../examples/radar.html">here</a>.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [3, 3, 41, 37, 16];
+    
+        var radar = new RGraph.Radar('myRadar', data);
+        radar.Set('chart.background.circles', true);
+        radar.Set('chart.color', 'rgba(255,0,0,0.5)');
+        radar.Set('chart.circle', 20);
+        radar.Set('chart.circle.fill', 'rgba(200,255,200,0.5)');
+        radar.Set('chart.labels', ['Safari (3%)', 'Other (3%)', 'MSIE 7 (41%)', 'MSIE 6 (37%)', 'Firefox (16%)']);
+        radar.Set('chart.key', ['Market share', 'A made up figure']);
+        radar.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the chart apears. You can set these properties by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myRadar.Set('color', 'rgba(255,0,0,0.5)');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#title">Title</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#misc">Miscellaneous</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+    </ul>
+
+
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>
+            <a name="chart.colors"></a>
+            <b>chart.colors</b><br />
+            The colors of the radar chart(s).<br />
+            <i>Default: red</i><br /><br />
+
+            <a name="chart.colors.alpha"></a>
+            <b>chart.colors.alpha</b><br />
+            If set (a number between 0 nd 1), this will be used as the alpha value of the colors of the chart.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="title"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Title</h3>
+
+            <a name="chart.title"></a>
+            <b>chart.title</b><br />
+            The title, if any, of the chart.<br />
+            <i>Default: Not set</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            The labels to use for the chart.<br /><i>Default: An empty array</i><br /><br />
+            <a name="chart.labels.axes"></a>
+<b>chart.labels.axes</b><br />
+            This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West)<br /><i>Default: nsew</i><br /><br />
+            <a name="chart.labels.offsetx"></a>
+<b>chart.labels.offsetx</b><br />
+            The X pixel offset for the labels.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.labels.offsety"></a>
+<b>chart.labels.offsety</b><br />
+            The Y pixel offset for the labels.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points).<br /><i>Default: 10</i><br /><br />
+<a name="scale"></a>
+
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>            <a name="chart.ymax"></a>
+            <b>chart.ymax</b><br />
+            The optional maximum Y scale value. If not specified then it will be calculated.<br /><i>Default: null (It's calculated)</i><br /><br />
+
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+    <a name="misc"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the color of the highlight stroke.
+        <br /><i>Default: gray</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: white</i><br /><br />
+
+<a name="chart.background.circles"></a>
+<b>chart.background.circles</b><br />
+            Whether to draw the grey background circles.<br /><i>Default: true</i><br /><br />
+            <a name="chart.linewidth"></a>
+<b>chart.linewidth</b><br />
+            The width of the outline.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.circle"></a>
+<b>chart.circle</b><br />
+            What value to draw a circle at. Defaults to zero (off). You could use this to represent a threshold of some sort.<br /><i>Default: 0</i><br /><br />
+            <a name="chart.circle.fill"></a>
+<b>chart.circle.fill</b><br />
+            What color to fill the circle with.<br /><i>Default: red</i><br /><br />
+            <a name="chart.circle.stroke"></a>
+<b>chart.circle.stroke</b><br />
+            What color to stroke (ie The outline) the circle with.<br /><i>Default: black</i><br /><br />
+
+
+
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+
+
+
+
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+
+            <a name="chart.contextmenu"></a>
+            <b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br />
+            <i>Default: [] (An empty array)</i><br /><br />
+            
+            <a name="chart.annotatable"></a>
+            <b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            
+            <a name="chart.annotate.color"></a>
+            <b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br />
+            <i>Default: black</i><br /><br />
+
+            <a name="chart.tooltips"></a>
+            <b>chart.tooltips</b><br />
+            A numerically indexed array of tooltips that are shown when a hotspot is hovered over. These can contain HTML.<br />
+            <i>Default: An empty array</i><br /><br />
+
+            <a name="chart.tooltips.effect"></a>
+            <b>chart.tooltips.effect</b><br />
+            The visual effect used when showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br />
+            <i>Default: fade</i><br /><br />
+
+            <a name="chart.tooltips.css.class"></a>
+            <b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br />
+            <i>Default: RGraph_tooltip</i><br /><br />
+
+            <a name="chart.tooltips.override"></a>
+            <b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/released.txt
===================================================================
--- Dev/branches/Demo/RGraph/docs/released.txt	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/released.txt	(revision 225)
@@ -0,0 +1,2615 @@
+This version released on: Fri, 29 Jul 2011 20:21:37 +0100
+
+A    RGraph
+A    RGraph/tests.old
+A    RGraph/tests.old/ramon.html
+A    RGraph/tests.old/animated_meter.html
+A    RGraph/tests.old/context.html
+A    RGraph/tests.old/zoom.html
+A    RGraph/tests.old/kwong.html
+A    RGraph/tests.old/clear.html
+A    RGraph/tests.old/key.html
+A    RGraph/tests.old/getPoint.html
+A    RGraph/tests.old/grafica.html
+A    RGraph/tests.old/lots-of-points.html
+A    RGraph/tests.old/above.bar.html
+A    RGraph/tests.old/set.config.html
+A    RGraph/tests.old/getSegment.html
+A    RGraph/tests.old/ralphoid.html
+A    RGraph/tests.old/pointers.html
+A    RGraph/tests.old/test4.html
+A    RGraph/tests.old/scatter_crosshairs.html
+A    RGraph/tests.old/test6.html
+A    RGraph/tests.old/browsers.html
+A    RGraph/tests.old/smoothing.html
+A    RGraph/tests.old/null.values.html
+A    RGraph/tests.old/scale2.html
+A    RGraph/tests.old/boxplots.html
+A    RGraph/tests.old/sparklines.html
+A    RGraph/tests.old/___.html
+A    RGraph/tests.old/getGutterSuggest.html
+A    RGraph/tests.old/ymin.html
+A    RGraph/tests.old/scatter_yvalues.html
+A    RGraph/tests.old/tooltips.html
+A    RGraph/tests.old/crosshairs.html
+A    RGraph/tests.old/ajax.html
+A    RGraph/tests.old/rose.ymin.html
+A    RGraph/tests.old/gantt-xmin.html
+A    RGraph/tests.old/scale.html
+A    RGraph/tests.old/tickmarks.html
+A    RGraph/tests.old/noxaxis.html
+A    RGraph/tests.old/ingraph.labels.html
+A    RGraph/tests.old/animated_line.html
+A    RGraph/tests.old/line.arguments.html
+A    RGraph/tests.old/msie.html
+A    RGraph/tests.old/ie-events.html
+A    RGraph/tests.old/chrome-text.html
+A    RGraph/tests.old/trends.html
+A    RGraph/tests.old/3D-effect.html
+A    RGraph/tests.old/out-of-bounds.html
+A    RGraph/tests.old/resize.html
+A    RGraph/tests.old/mfrancis.html
+A    RGraph/tests.old/rscatter.ymin.html
+A    RGraph/tests.old/scatter_vbars.html
+A    RGraph/tests.old/test3.html
+A    RGraph/tests.old/smallrunedex.html
+A    RGraph/tests.old/getBar.html
+A    RGraph/tests.old/scatter.html
+A    RGraph/tests.old/log-scale.html
+A    RGraph/tests.old/kwong2.html
+A    RGraph/tests.old/highlight.html
+A    RGraph/tests.old/shadows.html
+A    RGraph/tests.old/missing.html
+A    RGraph/tests.old/animated_rose.html
+A    RGraph/tests.old/scale3.html
+A    RGraph/RGraph_ChromeExtension_sample.zip
+A    RGraph/www.phpguru.org_4849532196
+A    RGraph/www.phpguru.org_4849532196/CanvasText
+A    RGraph/www.phpguru.org_4849532196/CanvasText/CanvasText.js
+A    RGraph/www.phpguru.org_4849532196/CanvasText/index.php
+A    RGraph/www.phpguru.org_4849532196/Log
+A    RGraph/www.phpguru.org_4849532196/Log/test.phps
+A    RGraph/www.phpguru.org_4849532196/Log/Log.phps
+A    RGraph/www.phpguru.org_4849532196/RGraph
+A    RGraph/www.phpguru.org_4849532196/RGraph/index.php
+A    RGraph/www.phpguru.org_4849532196/DB
+A    RGraph/www.phpguru.org_4849532196/DB/pear_db_replacement.zip
+A    RGraph/www.phpguru.org_4849532196/Console_Menu
+A    RGraph/www.phpguru.org_4849532196/Console_Menu/test.phps
+A    RGraph/www.phpguru.org_4849532196/Console_Menu/Menu.phps
+A    RGraph/www.phpguru.org_4849532196/FileIterator
+A    RGraph/www.phpguru.org_4849532196/FileIterator/FileIterator.phps
+A    RGraph/www.phpguru.org_4849532196/header.html
+A    RGraph/www.phpguru.org_4849532196/TableEditor
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor.zip
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor_de.phps
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor_Pear-DB.phps
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor.php
+A    RGraph/www.phpguru.org_4849532196/TableEditor/ChangeLog.txt
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor.phps
+A    RGraph/www.phpguru.org_4849532196/TableEditor/release.sh
+A    RGraph/www.phpguru.org_4849532196/TableEditor/.TableEditor_new.php
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor_de.php
+A    RGraph/www.phpguru.org_4849532196/TableEditor/TableEditor_Pear-DB.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart/bak/LineChart.js
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart/bak/index.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart/bak/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart/bak/base.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_linechart/index.php
+A    RGraph/www.phpguru.org_4849532196/js_sleep
+A    RGraph/www.phpguru.org_4849532196/js_sleep/example.html
+A    RGraph/www.phpguru.org_4849532196/RGrid
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/RGrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/RGrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-09-02/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/datagrid.zip
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/Datagrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/Datagrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/php-datagrid.zip
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-08/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/RGrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/RGrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2010-03-10/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/RGrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/RGrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-19/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/RGrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/RGrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-06-26/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/Datagrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/link.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/Datagrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/2008-08-17/common.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/RGrid.zip
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/RGrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/RGrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-05-01/header.png
+A    RGraph/www.phpguru.org_4849532196/RGrid/.htaccess
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/datagrid.zip
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/release
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example7.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example2.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example8.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example3.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example4.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/docs
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/Datagrid.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example5.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example6.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example7.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example8.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example9.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example2.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example3.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example.phps
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example4.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/Datagrid.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/php-datagrid.zip
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example5.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example6.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example7.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example7.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example8.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example8.css
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/example9.php
+A    RGraph/www.phpguru.org_4849532196/RGrid/2009-04-12/header.png
+A    RGraph/www.phpguru.org_4849532196/LineReader
+A    RGraph/www.phpguru.org_4849532196/LineReader/LineReader.php
+A    RGraph/www.phpguru.org_4849532196/LineReader/example.php
+A    RGraph/www.phpguru.org_4849532196/LineReader/LineReader.phps
+A    RGraph/www.phpguru.org_4849532196/LineReader/example.phps
+A    RGraph/www.phpguru.org_4849532196/search.replace
+A    RGraph/www.phpguru.org_4849532196/search.replace/search.replace.zip
+A    RGraph/www.phpguru.org_4849532196/phpSQLiteAdmin
+A    RGraph/www.phpguru.org_4849532196/phpSQLiteAdmin/phpSQLiteAdmin.2004-03-07.zip
+A    RGraph/www.phpguru.org_4849532196/smtp
+A    RGraph/www.phpguru.org_4849532196/smtp/smtp-1.0.5.zip
+A    RGraph/www.phpguru.org_4849532196/smtp/index.html
+A    RGraph/www.phpguru.org_4849532196/mailb
+A    RGraph/www.phpguru.org_4849532196/mailb/mailb.phps
+A    RGraph/www.phpguru.org_4849532196/zoom
+A    RGraph/www.phpguru.org_4849532196/zoom/Zoom.js
+A    RGraph/www.phpguru.org_4849532196/zoom/zoom.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_xy
+A    RGraph/www.phpguru.org_4849532196/.HTML5_xy/_index.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_xy/index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_CanvasTag
+A    RGraph/www.phpguru.org_4849532196/.HTML5_CanvasTag/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_CanvasTag/index.php
+A    RGraph/www.phpguru.org_4849532196/Tree
+A    RGraph/www.phpguru.org_4849532196/Tree/Tree-1.0.3.tgz
+A    RGraph/www.phpguru.org_4849532196/Tree/docs
+A    RGraph/www.phpguru.org_4849532196/Tree/docs/Tree.html
+A    RGraph/www.phpguru.org_4849532196/Tree/docs/Tree.doc
+A    RGraph/www.phpguru.org_4849532196/Tree/Tree-2.0.0.tgz
+A    RGraph/www.phpguru.org_4849532196/AutoComplete
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/AutoComplete.zip
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/AutoComplete.html
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/versions.txt
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/AutoComplete.css
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/AutoComplete.old.js
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/release.sh
+A    RGraph/www.phpguru.org_4849532196/AutoComplete/AutoComplete.js
+A    RGraph/www.phpguru.org_4849532196/.HTML5_dualbar
+A    RGraph/www.phpguru.org_4849532196/.HTML5_dualbar/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_dualbar/bak/distribution.js
+A    RGraph/www.phpguru.org_4849532196/.HTML5_dualbar/bak/index.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_dualbar/bak/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_dualbar/index.php
+A    RGraph/www.phpguru.org_4849532196/Rmail
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/RFC822.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.1.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.2.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.3.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.4.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/background.gif
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.5.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/API.txt
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/mimePart.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/htmlMimeMail.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/RFC822.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.zip
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/smtp.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.html
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.1.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.2.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/mimePart.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/changelog.txt
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/htmlMimeMail.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.4.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.5.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/example.txt
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail-2.5.2/smtp.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/RFC822.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/example.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/background.gif
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/example2.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/mimePart.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/release.sh
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/htmlMimeMail5.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/docs.html
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/example.zip
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/RFC822.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/smtp.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/LICENSE.txt
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/example2.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/mimePart.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/example.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/htmlMimeMail5.zip
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/smtp.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/index.html
+A    RGraph/www.phpguru.org_4849532196/Rmail/.htmlMimeMail5/htmlMimeMail5.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/RFC822.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/background.gif
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example2.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example3.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/mimePart.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/release.sh
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/Rmail.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/docs.html
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example.zip
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/RFC822.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/smtp.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/LICENSE.txt
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example2.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example3.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/example.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/mimePart.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/Rmail.zip
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/namedFileAttachment.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/Rmail_Patch.diff.txt
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/smtp.php
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/index.html
+A    RGraph/www.phpguru.org_4849532196/Rmail/Rmail for PHP/Rmail.phps
+A    RGraph/www.phpguru.org_4849532196/Rmail/_index.html
+A    RGraph/www.phpguru.org_4849532196/registry
+A    RGraph/www.phpguru.org_4849532196/registry/Registry.phps
+A    RGraph/www.phpguru.org_4849532196/registry/example.php
+A    RGraph/www.phpguru.org_4849532196/registry/example.phps
+A    RGraph/www.phpguru.org_4849532196/registry/.htaccess
+A    RGraph/www.phpguru.org_4849532196/registry/Registry.php
+A    RGraph/www.phpguru.org_4849532196/PorterStemmer
+A    RGraph/www.phpguru.org_4849532196/PorterStemmer/PorterStemmer.phps
+A    RGraph/www.phpguru.org_4849532196/formproc3
+A    RGraph/www.phpguru.org_4849532196/formproc3/formproc-3.0.4.tar.gz
+A    RGraph/www.phpguru.org_4849532196/formproc3/formproc-3.0.5.tar.gz
+A    RGraph/www.phpguru.org_4849532196/toncarta.cache
+A    RGraph/www.phpguru.org_4849532196/toncarta.cache/toncarta.cache.zip
+A    RGraph/www.phpguru.org_4849532196/.HTML5_ScatterGraph
+A    RGraph/www.phpguru.org_4849532196/.HTML5_ScatterGraph/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_ScatterGraph/bak/ScatterGraph.js
+A    RGraph/www.phpguru.org_4849532196/.HTML5_ScatterGraph/bak/index.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_ScatterGraph/bak/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_ScatterGraph/index.php
+A    RGraph/www.phpguru.org_4849532196/datagrid
+A    RGraph/www.phpguru.org_4849532196/pcntl
+A    RGraph/www.phpguru.org_4849532196/pcntl/example.php
+A    RGraph/www.phpguru.org_4849532196/pcntl/Forked_Child.php
+A    RGraph/www.phpguru.org_4849532196/pcntl/example.phps
+A    RGraph/www.phpguru.org_4849532196/pcntl/Forked_Child.phps
+A    RGraph/www.phpguru.org_4849532196/pcntl/Forked_Parent.php
+A    RGraph/www.phpguru.org_4849532196/pcntl/Forked_Parent.phps
+A    RGraph/www.phpguru.org_4849532196/Timer
+A    RGraph/www.phpguru.org_4849532196/Timer/Console
+A    RGraph/www.phpguru.org_4849532196/Timer/Console/Table.phps
+A    RGraph/www.phpguru.org_4849532196/Timer/Console/Table.php
+A    RGraph/www.phpguru.org_4849532196/Timer/test.phps
+A    RGraph/www.phpguru.org_4849532196/Timer/Timer.phps
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut/bak/donut.js.bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut/bak/pie.js.bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut/bak/index.html.bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut/bak/index.php.bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_donut/index.php
+A    RGraph/www.phpguru.org_4849532196/pop3
+A    RGraph/www.phpguru.org_4849532196/pop3/POP3_example.phps
+A    RGraph/www.phpguru.org_4849532196/pop3/POP3.phps
+A    RGraph/www.phpguru.org_4849532196/dynCalendar
+A    RGraph/www.phpguru.org_4849532196/dynCalendar/dynCalendar.zip
+A    RGraph/www.phpguru.org_4849532196/rgraph.html
+A    RGraph/www.phpguru.org_4849532196/HTTP_Request
+A    RGraph/www.phpguru.org_4849532196/HTTP_Request/Request.phps
+A    RGraph/www.phpguru.org_4849532196/HTTP_Request/download-progress.phps
+A    RGraph/www.phpguru.org_4849532196/HTTP_Request/example.phps
+A    RGraph/www.phpguru.org_4849532196/HTTP_Request/Listener.phps
+A    RGraph/www.phpguru.org_4849532196/PCRE Cheat Sheet
+A    RGraph/www.phpguru.org_4849532196/PCRE Cheat Sheet/PHP PCRE Cheat Sheet.pdf
+A    RGraph/www.phpguru.org_4849532196/benchmark
+A    RGraph/www.phpguru.org_4849532196/benchmark/class.phps
+A    RGraph/www.phpguru.org_4849532196/benchmark/function.phps
+A    RGraph/www.phpguru.org_4849532196/Rtemplate
+A    RGraph/www.phpguru.org_4849532196/messaging2
+A    RGraph/www.phpguru.org_4849532196/messaging2/Messages2.php
+A    RGraph/www.phpguru.org_4849532196/messaging2/green_tick2.png
+A    RGraph/www.phpguru.org_4849532196/messaging2/example.php
+A    RGraph/www.phpguru.org_4849532196/messaging2/Messages2.phps
+A    RGraph/www.phpguru.org_4849532196/messaging2/yellow_exclamation.png
+A    RGraph/www.phpguru.org_4849532196/messaging2/example.phps
+A    RGraph/www.phpguru.org_4849532196/messaging2/yellow_exclamation2.png
+A    RGraph/www.phpguru.org_4849532196/messaging2/red_cross.png
+A    RGraph/www.phpguru.org_4849532196/messaging2/red_cross2.png
+A    RGraph/www.phpguru.org_4849532196/messaging2/green_tick.png
+A    RGraph/www.phpguru.org_4849532196/dynContext
+A    RGraph/www.phpguru.org_4849532196/dynContext/dynContext-1.3.1.tar.gz
+A    RGraph/www.phpguru.org_4849532196/TextualNumber
+A    RGraph/www.phpguru.org_4849532196/TextualNumber/TextualNumber.phps
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/example.php
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/example.phps
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/Static_Tabstrip.php
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/images
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/images/tab_active_tl.png
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/images/tab_tl.png
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/images/tab_active_tr.png
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/images/tab_tr.png
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/Static_Tabstrip.css
+A    RGraph/www.phpguru.org_4849532196/static_tabstrip/Static_Tabstrip.phps
+A    RGraph/www.phpguru.org_4849532196/image_rotate
+A    RGraph/www.phpguru.org_4849532196/image_rotate/right.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/rotate.html
+A    RGraph/www.phpguru.org_4849532196/image_rotate/reset.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/plus.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/up.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/down.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/rotate_left.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/left.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/minus.png
+A    RGraph/www.phpguru.org_4849532196/image_rotate/rotate_right.png
+A    RGraph/www.phpguru.org_4849532196/Console
+A    RGraph/www.phpguru.org_4849532196/Console/test.phps
+A    RGraph/www.phpguru.org_4849532196/Console/Console.phps
+A    RGraph/www.phpguru.org_4849532196/windowskey
+A    RGraph/www.phpguru.org_4849532196/windowskey/cheat_sheet.doc
+A    RGraph/www.phpguru.org_4849532196/windowskey/cheat_sheet.pdf
+A    RGraph/www.phpguru.org_4849532196/treeBoard
+A    RGraph/www.phpguru.org_4849532196/treeBoard/treeBoard.tar.gz
+A    RGraph/www.phpguru.org_4849532196/smtp5
+A    RGraph/www.phpguru.org_4849532196/smtp5/release
+A    RGraph/www.phpguru.org_4849532196/smtp5/example.php
+A    RGraph/www.phpguru.org_4849532196/smtp5/example.phps
+A    RGraph/www.phpguru.org_4849532196/smtp5/SMTP5.zip
+A    RGraph/www.phpguru.org_4849532196/smtp5/smtp.php
+A    RGraph/www.phpguru.org_4849532196/smtp5/index.html
+A    RGraph/www.phpguru.org_4849532196/smtp5/smtp.phps
+A    RGraph/www.phpguru.org_4849532196/mime.decode
+A    RGraph/www.phpguru.org_4849532196/mime.decode/mime.decode.zip
+A    RGraph/www.phpguru.org_4849532196/.htaccess
+A    RGraph/www.phpguru.org_4849532196/messaging
+A    RGraph/www.phpguru.org_4849532196/messaging/exclamation-yellow.jpg
+A    RGraph/www.phpguru.org_4849532196/messaging/Message.phps
+A    RGraph/www.phpguru.org_4849532196/csharp
+A    RGraph/www.phpguru.org_4849532196/csharp/getopt
+A    RGraph/www.phpguru.org_4849532196/csharp/getopt/GetOpt.zip
+A    RGraph/www.phpguru.org_4849532196/csharp/SQLite.NET
+A    RGraph/www.phpguru.org_4849532196/csharp/SQLite.NET/SQLite.NET-1.0.0.zip
+A    RGraph/www.phpguru.org_4849532196/csharp/SQLite.NET/SQLite.NET.2.0.1.zip
+A    RGraph/www.phpguru.org_4849532196/csharp/ConsoleTable
+A    RGraph/www.phpguru.org_4849532196/csharp/ConsoleTable/ConsoleTable.cs
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar/bak/basic.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar/bak/RadarChart.js
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar/bak/index.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar/bak/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_radar/index.php
+A    RGraph/www.phpguru.org_4849532196/sortAlgorithms
+A    RGraph/www.phpguru.org_4849532196/sortAlgorithms/sorting.phps
+A    RGraph/www.phpguru.org_4849532196/BrowserDetection
+A    RGraph/www.phpguru.org_4849532196/BrowserDetection/UserAgent.php
+A    RGraph/www.phpguru.org_4849532196/BrowserDetection/test.php
+A    RGraph/www.phpguru.org_4849532196/BrowserDetection/UserAgent.phps
+A    RGraph/www.phpguru.org_4849532196/BrowserDetection/test.phps
+A    RGraph/www.phpguru.org_4849532196/search_input
+A    RGraph/www.phpguru.org_4849532196/search_input/index.phps
+A    RGraph/www.phpguru.org_4849532196/search_input/search.png
+A    RGraph/www.phpguru.org_4849532196/search_input/index.php
+A    RGraph/www.phpguru.org_4849532196/RPC_for_PHP5
+A    RGraph/www.phpguru.org_4849532196/RPC_for_PHP5/RPC for PHP5-1.0.zip
+A    RGraph/www.phpguru.org_4849532196/curtains
+A    RGraph/www.phpguru.org_4849532196/curtains/curtains.js
+A    RGraph/www.phpguru.org_4849532196/curtains/example.html
+A    RGraph/www.phpguru.org_4849532196/rtemplate
+A    RGraph/www.phpguru.org_4849532196/rtemplate/example.php
+A    RGraph/www.phpguru.org_4849532196/rtemplate/RTemplate.php
+A    RGraph/www.phpguru.org_4849532196/rtemplate/docs
+A    RGraph/www.phpguru.org_4849532196/rtemplate/docs/index.html
+A    RGraph/www.phpguru.org_4849532196/rtemplate/release.sh
+A    RGraph/www.phpguru.org_4849532196/rtemplate/inc.html
+A    RGraph/www.phpguru.org_4849532196/rtemplate/index.php
+A    RGraph/www.phpguru.org_4849532196/rtemplate/RTemplate.zip
+A    RGraph/www.phpguru.org_4849532196/rtemplate/example.html
+A    RGraph/www.phpguru.org_4849532196/Tree_array
+A    RGraph/www.phpguru.org_4849532196/Tree_array/Tree.phps
+A    RGraph/www.phpguru.org_4849532196/rss2email
+A    RGraph/www.phpguru.org_4849532196/rss2email/RSS2email.phps
+A    RGraph/www.phpguru.org_4849532196/footer.html
+A    RGraph/www.phpguru.org_4849532196/PHP_Unserialize
+A    RGraph/www.phpguru.org_4849532196/PHP_Unserialize/PHP_Unserialize.php
+A    RGraph/www.phpguru.org_4849532196/PHP_Unserialize/PHP_Unserialize.phps
+A    RGraph/www.phpguru.org_4849532196/PHP_Unserialize/PHP_Unserialize.js
+A    RGraph/www.phpguru.org_4849532196/Cache
+A    RGraph/www.phpguru.org_4849532196/Cache/Cache.zip
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/bak/pie.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/bak/pie.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/bak/pie.js
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/bak/index.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/bak/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_pie/index.php
+A    RGraph/www.phpguru.org_4849532196/articles
+A    RGraph/www.phpguru.org_4849532196/articles/pop3.html
+A    RGraph/www.phpguru.org_4849532196/articles/phpSQLiteAdmin.html
+A    RGraph/www.phpguru.org_4849532196/articles/js-registry.html
+A    RGraph/www.phpguru.org_4849532196/articles/dyncalendar.html
+A    RGraph/www.phpguru.org_4849532196/articles/ApplicationStructure.html
+A    RGraph/www.phpguru.org_4849532196/articles/treemenu.html
+A    RGraph/www.phpguru.org_4849532196/articles/TableEditorComparison.html
+A    RGraph/www.phpguru.org_4849532196/articles/dynContext.example.html
+A    RGraph/www.phpguru.org_4849532196/articles/pleasewait.html
+A    RGraph/www.phpguru.org_4849532196/articles/getopt.html
+A    RGraph/www.phpguru.org_4849532196/articles/auth.sasl.html
+A    RGraph/www.phpguru.org_4849532196/articles/messages.html
+A    RGraph/www.phpguru.org_4849532196/articles/html5-dom-storage.html
+A    RGraph/www.phpguru.org_4849532196/articles/PariahBB.html
+A    RGraph/www.phpguru.org_4849532196/articles/mime.decode.html
+A    RGraph/www.phpguru.org_4849532196/articles/libComments.html
+A    RGraph/www.phpguru.org_4849532196/articles/webkit-transformations.html
+A    RGraph/www.phpguru.org_4849532196/articles/search.replace.html
+A    RGraph/www.phpguru.org_4849532196/articles/google-checkout.html
+A    RGraph/www.phpguru.org_4849532196/articles/file.html
+A    RGraph/www.phpguru.org_4849532196/articles/license.html
+A    RGraph/www.phpguru.org_4849532196/articles/TextualNumbers.html
+A    RGraph/www.phpguru.org_4849532196/articles/smtp.html
+A    RGraph/www.phpguru.org_4849532196/articles/SQLite.NET.html
+A    RGraph/www.phpguru.org_4849532196/articles/net.url.html
+A    RGraph/www.phpguru.org_4849532196/articles/firefox3.5.html
+A    RGraph/www.phpguru.org_4849532196/articles/console.table.html
+A    RGraph/www.phpguru.org_4849532196/articles/faqs.html
+A    RGraph/www.phpguru.org_4849532196/articles/clock.html
+A    RGraph/www.phpguru.org_4849532196/articles/Caching.html
+A    RGraph/www.phpguru.org_4849532196/articles/User-Agent2.html
+A    RGraph/www.phpguru.org_4849532196/articles/PHP_Unserialize.html
+A    RGraph/www.phpguru.org_4849532196/articles/backlinks.html
+A    RGraph/www.phpguru.org_4849532196/articles/positioning.html
+A    RGraph/www.phpguru.org_4849532196/articles/seo-tips.html
+A    RGraph/www.phpguru.org_4849532196/articles/geolocation.html
+A    RGraph/www.phpguru.org_4849532196/articles/css-reflections.html
+A    RGraph/www.phpguru.org_4849532196/articles/templating.html
+A    RGraph/www.phpguru.org_4849532196/articles/rgraph-text.html
+A    RGraph/www.phpguru.org_4849532196/articles/http.request.html
+A    RGraph/www.phpguru.org_4849532196/articles/html5-desktop-notifications.html
+A    RGraph/www.phpguru.org_4849532196/articles/canvas.html
+A    RGraph/www.phpguru.org_4849532196/articles/css3.html
+A    RGraph/www.phpguru.org_4849532196/articles/datagrid.html
+A    RGraph/www.phpguru.org_4849532196/articles/rgraph.html
+A    RGraph/www.phpguru.org_4849532196/articles/browser.html
+A    RGraph/www.phpguru.org_4849532196/articles/Modal-Dialog.html
+A    RGraph/www.phpguru.org_4849532196/articles/FileIterator.html
+A    RGraph/www.phpguru.org_4849532196/articles/TextualNumber.html
+A    RGraph/www.phpguru.org_4849532196/articles/dynContext.html
+A    RGraph/www.phpguru.org_4849532196/articles/static_tabstrip.html
+A    RGraph/www.phpguru.org_4849532196/articles/tree.html
+A    RGraph/www.phpguru.org_4849532196/articles/smiley.html
+A    RGraph/www.phpguru.org_4849532196/articles/windowskey.html
+A    RGraph/www.phpguru.org_4849532196/articles/Rmail.html
+A    RGraph/www.phpguru.org_4849532196/articles/search.html
+A    RGraph/www.phpguru.org_4849532196/articles/ie6-dies.html
+A    RGraph/www.phpguru.org_4849532196/articles/html5-examples.html
+A    RGraph/www.phpguru.org_4849532196/articles/PorterStemmer.html
+A    RGraph/www.phpguru.org_4849532196/articles/ConsoleTable.html
+A    RGraph/www.phpguru.org_4849532196/articles/breakout.html
+A    RGraph/www.phpguru.org_4849532196/articles/layerfun.html
+A    RGraph/www.phpguru.org_4849532196/articles/attributes.html
+A    RGraph/www.phpguru.org_4849532196/articles/html5.html
+A    RGraph/www.phpguru.org_4849532196/articles/TableEditor.html
+A    RGraph/www.phpguru.org_4849532196/articles/AutoComplete.html
+A    RGraph/www.phpguru.org_4849532196/articles/Cache.html
+A    RGraph/www.phpguru.org_4849532196/articles/rmail.html
+A    RGraph/www.phpguru.org_4849532196/articles/canvas-example.html
+A    RGraph/www.phpguru.org_4849532196/articles/css-gradients.html
+A    RGraph/www.phpguru.org_4849532196/articles/html5-form-inputs.html
+A    RGraph/www.phpguru.org_4849532196/articles/sieve.html
+A    RGraph/www.phpguru.org_4849532196/articles/template.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_text
+A    RGraph/www.phpguru.org_4849532196/.HTML5_text/_index.php
+A    RGraph/www.phpguru.org_4849532196/.HTML5_text/index.php
+A    RGraph/www.phpguru.org_4849532196/Console_ProgressBar
+A    RGraph/www.phpguru.org_4849532196/Console_ProgressBar/Console_ProgressBar.php
+A    RGraph/www.phpguru.org_4849532196/Console_ProgressBar/example.php
+A    RGraph/www.phpguru.org_4849532196/Console_ProgressBar/Console_ProgressBar.phps
+A    RGraph/www.phpguru.org_4849532196/Console_ProgressBar/example.phps
+A    RGraph/www.phpguru.org_4849532196/template
+A    RGraph/www.phpguru.org_4849532196/libComments
+A    RGraph/www.phpguru.org_4849532196/libComments/libComments-1.0.1.zip
+A    RGraph/www.phpguru.org_4849532196/ModalDialog
+A    RGraph/www.phpguru.org_4849532196/ModalDialog/ModalDialog.css
+A    RGraph/www.phpguru.org_4849532196/ModalDialog/ModalDialog.js
+A    RGraph/www.phpguru.org_4849532196/ModalDialog/fade.js
+A    RGraph/www.phpguru.org_4849532196/ModalDialog/example.html
+A    RGraph/www.phpguru.org_4849532196/.HTML5_bargraph
+A    RGraph/www.phpguru.org_4849532196/.HTML5_bargraph/bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_bargraph/bak/index.php.bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_bargraph/bak/BarChart.js.bak
+A    RGraph/www.phpguru.org_4849532196/.HTML5_bargraph/index.php
+A    RGraph/scripts
+A    RGraph/scripts/diff.sh
+A    RGraph/scripts/replace.php
+A    RGraph/scripts/generateSitemap.php
+A    RGraph/scripts/tests.php
+A    RGraph/scripts/release.sh
+A    RGraph/scripts/index.html
+A    RGraph/scripts/minify
+A    RGraph/docs
+A    RGraph/docs/async.html
+A    RGraph/docs/color.html
+A    RGraph/docs/animation.html
+A    RGraph/docs/.CHANGELOG.txt
+A    RGraph/docs/waterfall.html
+A    RGraph/docs/external.html
+A    RGraph/docs/annotate_persist.html
+A    RGraph/docs/animation_segments.html
+A    RGraph/docs/context.html
+A    RGraph/docs/ingraph.html
+A    RGraph/docs/adjusting.html
+A    RGraph/docs/css.html
+A    RGraph/docs/vprogress.html
+A    RGraph/docs/thermometer.html
+A    RGraph/docs/adjusting_line.html
+A    RGraph/docs/licensing.html
+A    RGraph/docs/pie.html
+A    RGraph/docs/tooltips.html
+A    RGraph/docs/basic_tooltips.html
+A    RGraph/docs/you-dont-need-to-spend-a-lot-of-money.html
+A    RGraph/docs/adjusting_rose.html
+A    RGraph/docs/setconfig.html
+A    RGraph/docs/png.html
+A    RGraph/docs/adjusting_hprogress.html
+A    RGraph/docs/adjusting_gantt.html
+A    RGraph/docs/line.html
+A    RGraph/docs/funnel.html
+A    RGraph/docs/donut.html
+A    RGraph/docs/what-is-a-graph.html
+A    RGraph/docs/misc.html
+A    RGraph/docs/msie.html
+A    RGraph/docs/gutters.html
+A    RGraph/docs/adjusting_radar.html
+A    RGraph/docs/annotating.html
+A    RGraph/docs/iframe.html
+A    RGraph/docs/events.html
+A    RGraph/docs/rose.html
+A    RGraph/docs/api.html
+A    RGraph/docs/keys.html
+A    RGraph/docs/issues.html
+A    RGraph/docs/meter.html
+A    RGraph/docs/hprogress.html
+A    RGraph/docs/gantt.html
+A    RGraph/docs/.BC.txt
+A    RGraph/docs/odo.html
+A    RGraph/docs/zoom.html
+A    RGraph/docs/image2url.html
+A    RGraph/docs/downloads
+A    RGraph/docs/radar.html
+A    RGraph/docs/.htaccess
+A    RGraph/docs/hbar.html
+A    RGraph/docs/adjusting_bar.html
+A    RGraph/docs/combine.html
+A    RGraph/docs/what-is-html5-canvas.html
+A    RGraph/docs/domcontentloaded.html
+A    RGraph/docs/dynamic.html
+A    RGraph/docs/forum
+A    RGraph/docs/rscatter.html
+A    RGraph/docs/zoom_thumbnail.html
+A    RGraph/docs/bipolar.html
+A    RGraph/docs/resizing.html
+A    RGraph/docs/.TODO.txt
+A    RGraph/docs/iframe-setup.html
+A    RGraph/docs/adjusting_vprogress.html
+A    RGraph/docs/adjusting_thermometer.html
+A    RGraph/docs/led.html
+A    RGraph/docs/bar.html
+A    RGraph/docs/scatter.html
+A    RGraph/docs/line_filled.html
+A    RGraph/docs/index.html
+A    RGraph/docs/forums
+A    RGraph/docs/examples
+A    RGraph/downloads
+A    RGraph/example-images
+A    RGraph/example-images/gauge.png
+A    RGraph/example-images/fuel.png
+A    RGraph/invoice.html
+A    RGraph/tools
+A    RGraph/tools/tabs.css
+A    RGraph/tools/mail
+A    RGraph/tools/mail/mime
+A    RGraph/tools/mail/mime/mimePart.php
+A    RGraph/tools/mail/mime/smtp.php
+A    RGraph/tools/mail/mime/htmlMimeMail5.php
+A    RGraph/tools/mail/mime/RFC822.php
+A    RGraph/tools/mail/index.html
+A    RGraph/tools/index.html
+A    RGraph/tools/.htaccess
+A    RGraph/tests
+A    RGraph/tests/_tradar.html
+A    RGraph/tests/_pie.html
+A    RGraph/tests/offsetx.html
+A    RGraph/tests/bronson.html
+A    RGraph/tests/setConfig.html
+A    RGraph/tests/annotate_persist.html
+A    RGraph/tests/rotated-text.html
+A    RGraph/tests/zoom.html
+A    RGraph/tests/hbar.sequential.html
+A    RGraph/tests/interactive_key.html
+A    RGraph/tests/clear.html
+A    RGraph/tests/switcheroo.html
+A    RGraph/tests/_bipolar.html
+A    RGraph/tests/scatter_labels.html
+A    RGraph/tests/box.html
+A    RGraph/tests/2011-05-28
+A    RGraph/tests/2011-05-28/scatter_getpoint.html
+A    RGraph/tests/2011-05-28/background-images.html
+A    RGraph/tests/2011-05-28/xaxispos_bar.html
+A    RGraph/tests/2011-05-28/context.html
+A    RGraph/tests/2011-05-28/exploded.html
+A    RGraph/tests/2011-05-28/led.html
+A    RGraph/tests/2011-05-28/xaxispos_line.html
+A    RGraph/tests/2011-05-28/pie_coords.html
+A    RGraph/tests/2011-05-28/hbar.above.html
+A    RGraph/tests/2011-05-28/invert.html
+A    RGraph/tests/2011-05-28/filled_line_accumulative.html
+A    RGraph/tests/2011-05-28/odo.key.html
+A    RGraph/tests/2011-05-28/ie8-clear.html
+A    RGraph/tests/2011-05-28/gutters
+A    RGraph/tests/2011-05-28/gutters/meter.html
+A    RGraph/tests/2011-05-28/gutters/hprogress.html
+A    RGraph/tests/2011-05-28/gutters/hbar.html
+A    RGraph/tests/2011-05-28/gutters/tradar.html
+A    RGraph/tests/2011-05-28/gutters/pie.html
+A    RGraph/tests/2011-05-28/gutters/gantt.html
+A    RGraph/tests/2011-05-28/gutters/odo.html
+A    RGraph/tests/2011-05-28/gutters/waterfall.html
+A    RGraph/tests/2011-05-28/gutters/rscatter.html
+A    RGraph/tests/2011-05-28/gutters/line.html
+A    RGraph/tests/2011-05-28/gutters/funnel.html
+A    RGraph/tests/2011-05-28/gutters/bipolar.html
+A    RGraph/tests/2011-05-28/gutters/vprogress.html
+A    RGraph/tests/2011-05-28/gutters/thermometer.html
+A    RGraph/tests/2011-05-28/gutters/led.html
+A    RGraph/tests/2011-05-28/gutters/bar.html
+A    RGraph/tests/2011-05-28/gutters/scatter.html
+A    RGraph/tests/2011-05-28/gutters/rose.html
+A    RGraph/tests/2011-05-28/thermometer.html
+A    RGraph/tests/dyn.html
+A    RGraph/tests/thermometer.html
+A    RGraph/tests/thomas.html
+A    RGraph/tests/meter_resize.html
+A    RGraph/tests/noaxes.html
+A    RGraph/tests/filled.html
+A    RGraph/tests/border-radius.html
+A    RGraph/tests/_bar.html
+A    RGraph/tests/_led.html
+A    RGraph/tests/thursday.html
+A    RGraph/tests/_scatter.html
+A    RGraph/tests/event_removal.html
+A    RGraph/tests/stacked_rose.html
+A    RGraph/tests/scatter_animated.html
+A    RGraph/tests/null.html
+A    RGraph/tests/pie_bug.html
+A    RGraph/tests/_hbar.html
+A    RGraph/tests/_hprogress.html
+A    RGraph/tests/_meter.html
+A    RGraph/tests/combine.html
+A    RGraph/tests/_gantt.html
+A    RGraph/tests/ymin.html
+A    RGraph/tests/pie.html
+A    RGraph/tests/_odo.html
+A    RGraph/tests/hbar_scale.html
+A    RGraph/tests/2011-07-12
+A    RGraph/tests/2011-07-12/getShape.html
+A    RGraph/tests/2011-07-12/triangle_ticks.html
+A    RGraph/tests/2011-07-12/hbar.sequential.html
+A    RGraph/tests/2011-07-12/rose_tooltips_event.html
+A    RGraph/tests/2011-07-12/stacked_rose.html
+A    RGraph/tests/2011-07-12/donut_color.html
+A    RGraph/tests/2011-07-12/scale.html
+A    RGraph/tests/2011-07-12/hprogress_ticks.html
+A    RGraph/tests/2011-07-12/zoom_click.html
+A    RGraph/tests/2011-07-12/meter.value.text.html
+A    RGraph/tests/2011-07-12/non-equi-angular_rose.html
+A    RGraph/tests/2011-07-30
+A    RGraph/tests/2011-07-30/bipolar_getbar.html
+A    RGraph/tests/2011-07-30/line_tooltips_index2.html
+A    RGraph/tests/2011-07-30/stacked_bar_colors.html
+A    RGraph/tests/2011-07-30/funnel_getsegment.html
+A    RGraph/tests/2011-07-30/scale.specific.html
+A    RGraph/tests/chrome6-shadow.html
+A    RGraph/tests/_funnel.html
+A    RGraph/tests/_line.html
+A    RGraph/tests/_rscatter.html
+A    RGraph/tests/css-2D-transforms.html
+A    RGraph/tests/line.html
+A    RGraph/tests/_vprogress.html
+A    RGraph/tests/multiple_needles.html
+A    RGraph/tests/sequential_colors.html
+A    RGraph/tests/scatter_invert.html
+A    RGraph/tests/gutters.html
+A    RGraph/tests/n.html
+A    RGraph/tests/combo.html
+A    RGraph/tests/values.html
+A    RGraph/tests/formatter.html
+A    RGraph/tests/video.html
+A    RGraph/tests/_rose.html
+A    RGraph/tests/curvy.html
+A    RGraph/message.txt
+A    RGraph/images
+A    RGraph/images/barg2.png
+A    RGraph/images/barg4.png
+A    RGraph/images/analogo.gif
+A    RGraph/images/twitter.png
+A    RGraph/images/barg8.png
+A    RGraph/images/barc1.gif
+A    RGraph/images/bara32.png
+A    RGraph/images/barg2.gif
+A    RGraph/images/bare32.png
+A    RGraph/images/bard16.png
+A    RGraph/images/barg4.gif
+A    RGraph/images/bari32.png
+A    RGraph/images/barh16.png
+A    RGraph/images/barg8.gif
+A    RGraph/images/html2.png
+A    RGraph/images/alex.png
+A    RGraph/images/bard2.png
+A    RGraph/images/sqg.png
+A    RGraph/images/bara32.gif
+A    RGraph/images/bard4.png
+A    RGraph/images/barh1.png
+A    RGraph/images/bare32.gif
+A    RGraph/images/bard16.gif
+A    RGraph/images/bard8.png
+A    RGraph/images/bari32.gif
+A    RGraph/images/barh16.gif
+A    RGraph/images/html2.gif
+A    RGraph/images/download-stable-sml.png
+A    RGraph/images/bard2.gif
+A    RGraph/images/bard4.gif
+A    RGraph/images/barh1.gif
+A    RGraph/images/bard8.gif
+A    RGraph/images/bara2.png
+A    RGraph/images/bara4.png
+A    RGraph/images/bare1.png
+A    RGraph/images/bara8.png
+A    RGraph/images/bari2.png
+A    RGraph/images/bari4.png
+A    RGraph/images/google_+1_button.png
+A    RGraph/images/bari8.png
+A    RGraph/images/download.png
+A    RGraph/images/bara2.gif
+A    RGraph/images/download-beta-sml.png
+A    RGraph/images/bara4.gif
+A    RGraph/images/bare1.gif
+A    RGraph/images/favicon.ico
+A    RGraph/images/icons_combined.png
+A    RGraph/images/reddit.png
+A    RGraph/images/bard32.png
+A    RGraph/images/bara8.gif
+A    RGraph/images/barc16.png
+A    RGraph/images/bari2.gif
+A    RGraph/images/barh32.png
+A    RGraph/images/bari4.gif
+A    RGraph/images/barg16.png
+A    RGraph/images/context.png
+A    RGraph/images/bari8.gif
+A    RGraph/images/barb1.png
+A    RGraph/images/.htaccess
+A    RGraph/images/barf2.png
+A    RGraph/images/chrome_logo.png
+A    RGraph/images/barf4.png
+A    RGraph/images/bard32.gif
+A    RGraph/images/barj1.png
+A    RGraph/images/barc16.gif
+A    RGraph/images/introspection.png
+A    RGraph/images/barh32.gif
+A    RGraph/images/barf8.png
+A    RGraph/images/border-radius.png
+A    RGraph/images/barg16.gif
+A    RGraph/images/sq0.png
+A    RGraph/images/sq2.png
+A    RGraph/images/coins.jpg
+A    RGraph/images/sq4.png
+A    RGraph/images/barb1.gif
+A    RGraph/images/facebook.png
+A    RGraph/images/sq6.png
+A    RGraph/images/png.icon.png
+A    RGraph/images/sq8.png
+A    RGraph/images/barf2.gif
+A    RGraph/images/barf4.gif
+A    RGraph/images/barj1.gif
+A    RGraph/images/barf8.gif
+A    RGraph/images/favicon.png
+A    RGraph/images/barc2.png
+A    RGraph/images/barc4.png
+A    RGraph/images/barg1.png
+A    RGraph/images/logo.jpg
+A    RGraph/images/barc8.png
+A    RGraph/images/structure.png
+A    RGraph/images/paypal.gif
+A    RGraph/images/barc2.gif
+A    RGraph/images/stumble.png
+A    RGraph/images/barc32.png
+A    RGraph/images/barc4.gif
+A    RGraph/images/barg1.gif
+A    RGraph/images/barb16.png
+A    RGraph/images/barg32.png
+A    RGraph/images/barc8.gif
+A    RGraph/images/download-beta.png
+A    RGraph/images/search_party.jpg
+A    RGraph/images/barf16.png
+A    RGraph/images/barj16.png
+A    RGraph/images/bard1.png
+A    RGraph/images/barc32.gif
+A    RGraph/images/barh2.png
+A    RGraph/images/barb16.gif
+A    RGraph/images/barh4.png
+A    RGraph/images/barg32.gif
+A    RGraph/images/barf16.gif
+A    RGraph/images/barh8.png
+A    RGraph/images/barj16.gif
+A    RGraph/images/rss.png
+A    RGraph/images/merry-christmas-snowman.png
+A    RGraph/images/bard1.gif
+A    RGraph/images/barh2.gif
+A    RGraph/images/barh4.gif
+A    RGraph/images/rgraph.logo.png
+A    RGraph/images/bg.jpg
+A    RGraph/images/barh8.gif
+A    RGraph/images/bara1.png
+A    RGraph/images/bare2.png
+A    RGraph/images/friendfeed.png
+A    RGraph/images/bare4.png
+A    RGraph/images/bari1.png
+A    RGraph/images/logo.png
+A    RGraph/images/bare8.png
+A    RGraph/images/bara1.gif
+A    RGraph/images/unicef.png
+A    RGraph/images/barb32.png
+A    RGraph/images/bara16.png
+A    RGraph/images/bare2.gif
+A    RGraph/images/googlegroups.png
+A    RGraph/images/bare4.gif
+A    RGraph/images/bari1.gif
+A    RGraph/images/barf32.png
+A    RGraph/images/bare16.png
+A    RGraph/images/bn.personal.png
+A    RGraph/images/bare8.gif
+A    RGraph/images/barj32.png
+A    RGraph/images/shared
+A    RGraph/images/shared/me-in-drag.png
+A    RGraph/images/shared/.htaccess
+A    RGraph/images/bari16.png
+A    RGraph/images/barb2.png
+A    RGraph/images/bn.business.png
+A    RGraph/images/barb4.png
+A    RGraph/images/barf1.png
+A    RGraph/images/barb32.gif
+A    RGraph/images/bara16.gif
+A    RGraph/images/barb8.png
+A    RGraph/images/buy.png
+A    RGraph/images/barj2.png
+A    RGraph/images/barf32.gif
+A    RGraph/images/atom.png
+A    RGraph/images/bare16.gif
+A    RGraph/images/barj4.png
+A    RGraph/images/barj32.gif
+A    RGraph/images/sq1.png
+A    RGraph/images/bari16.gif
+A    RGraph/images/barj8.png
+A    RGraph/images/sq3.png
+A    RGraph/images/sq5.png
+A    RGraph/images/barb2.gif
+A    RGraph/images/sq7.png
+A    RGraph/images/barb4.gif
+A    RGraph/images/barf1.gif
+A    RGraph/images/sq9.png
+A    RGraph/images/barb8.gif
+A    RGraph/images/download-stable.png
+A    RGraph/images/analogo.png
+A    RGraph/images/delicious.png
+A    RGraph/images/barj2.gif
+A    RGraph/images/barj4.gif
+A    RGraph/images/barj8.gif
+A    RGraph/images/index.html
+A    RGraph/images/bg.png
+A    RGraph/images/barc1.png
+A    RGraph/images/rss_big.png
+A    RGraph/images/buzz.png
+A    RGraph/info.txt
+A    RGraph/404.html
+A    RGraph/.htaccess
+A    RGraph/common.php
+A    RGraph/robots.txt
+A    RGraph/admin
+A    RGraph/admin/publicise
+A    RGraph/admin/publicise/index.php
+A    RGraph/admin/load
+A    RGraph/admin/load/index.php
+A    RGraph/admin/comments
+A    RGraph/admin/comments/comments
+A    RGraph/admin/comments/comments/index.php
+A    RGraph/admin/comments/index.php
+A    RGraph/admin/forum
+A    RGraph/admin/forum/index.php
+A    RGraph/admin/config.php
+A    RGraph/admin/index.php
+A    RGraph/admin/invoice.html
+A    RGraph/admin/resellers
+A    RGraph/admin/resellers/index.php
+A    RGraph/admin/hosts
+A    RGraph/admin/hosts/trace.php
+A    RGraph/admin/hosts/index.html
+A    RGraph/admin/phpMyAdmin-3.4.3.1-english.tar.gz
+A    RGraph/admin/mysql
+A    RGraph/admin/mysql/phpdoctor.ini
+A    RGraph/admin/mysql/db_printview.php
+A    RGraph/admin/mysql/phpmyadmin.css.php
+A    RGraph/admin/mysql/tbl_addfield.php
+A    RGraph/admin/mysql/server_replication.php
+A    RGraph/admin/mysql/server_import.php
+A    RGraph/admin/mysql/scripts
+A    RGraph/admin/mysql/scripts/upgrade.pl
+A    RGraph/admin/mysql/scripts/remove-incomplete-mo
+A    RGraph/admin/mysql/scripts/signon.php
+A    RGraph/admin/mysql/scripts/upgrade_tables_mysql_4_1_2+.sql
+A    RGraph/admin/mysql/scripts/openid.php
+A    RGraph/admin/mysql/scripts/update-po-foreign
+A    RGraph/admin/mysql/scripts/decode_bug.php
+A    RGraph/admin/mysql/scripts/convertcfg.pl
+A    RGraph/admin/mysql/scripts/create_tables.sql
+A    RGraph/admin/mysql/show_config_errors.php
+A    RGraph/admin/mysql/tbl_structure.php
+A    RGraph/admin/mysql/tbl_chart.php
+A    RGraph/admin/mysql/url.php
+A    RGraph/admin/mysql/README.VENDOR
+A    RGraph/admin/mysql/tbl_create.php
+A    RGraph/admin/mysql/schema_edit.php
+A    RGraph/admin/mysql/chk_rel.php
+A    RGraph/admin/mysql/server_export.php
+A    RGraph/admin/mysql/config.inc.php
+A    RGraph/admin/mysql/webapp.php
+A    RGraph/admin/mysql/pmd_save_pos.php
+A    RGraph/admin/mysql/db_import.php
+A    RGraph/admin/mysql/tbl_select.php
+A    RGraph/admin/mysql/main.php
+A    RGraph/admin/mysql/tbl_operations.php
+A    RGraph/admin/mysql/pmd_relation_upd.php
+A    RGraph/admin/mysql/js
+A    RGraph/admin/mysql/js/jquery
+A    RGraph/admin/mysql/js/jquery/jquery.json-2.2.js
+A    RGraph/admin/mysql/js/jquery/jquery-ui-1.8.custom.js
+A    RGraph/admin/mysql/js/jquery/jquery.qtip-1.0.0.min.js
+A    RGraph/admin/mysql/js/jquery/timepicker.js
+A    RGraph/admin/mysql/js/jquery/jquery-1.4.4.js
+A    RGraph/admin/mysql/js/jquery/jquery.sprintf.js
+A    RGraph/admin/mysql/js/db_structure.js
+A    RGraph/admin/mysql/js/config.js
+A    RGraph/admin/mysql/js/functions.js
+A    RGraph/admin/mysql/js/replication.js
+A    RGraph/admin/mysql/js/import.js
+A    RGraph/admin/mysql/js/db_search.js
+A    RGraph/admin/mysql/js/tbl_relation.js
+A    RGraph/admin/mysql/js/tbl_select.js
+A    RGraph/admin/mysql/js/export.js
+A    RGraph/admin/mysql/js/messages.php
+A    RGraph/admin/mysql/js/keyhandler.js
+A    RGraph/admin/mysql/js/tbl_change.js
+A    RGraph/admin/mysql/js/db_operations.js
+A    RGraph/admin/mysql/js/common.js
+A    RGraph/admin/mysql/js/update-location.js
+A    RGraph/admin/mysql/js/dom-drag.js
+A    RGraph/admin/mysql/js/pMap.js
+A    RGraph/admin/mysql/js/querywindow.js
+A    RGraph/admin/mysql/js/navigation.js
+A    RGraph/admin/mysql/js/indexes.js
+A    RGraph/admin/mysql/js/server_privileges.js
+A    RGraph/admin/mysql/js/sql.js
+A    RGraph/admin/mysql/js/server_synchronize.js
+A    RGraph/admin/mysql/js/tbl_structure.js
+A    RGraph/admin/mysql/js/cross_framing_protection.js
+A    RGraph/admin/mysql/Documentation.html
+A    RGraph/admin/mysql/db_export.php
+A    RGraph/admin/mysql/tbl_change.php
+A    RGraph/admin/mysql/prefs_manage.php
+A    RGraph/admin/mysql/changelog.php
+A    RGraph/admin/mysql/docs.css
+A    RGraph/admin/mysql/server_variables.php
+A    RGraph/admin/mysql/navigation.php
+A    RGraph/admin/mysql/server_binlog.php
+A    RGraph/admin/mysql/robots.txt
+A    RGraph/admin/mysql/tbl_indexes.php
+A    RGraph/admin/mysql/user_password.php
+A    RGraph/admin/mysql/schema_export.php
+A    RGraph/admin/mysql/Documentation.txt
+A    RGraph/admin/mysql/ChangeLog
+A    RGraph/admin/mysql/db_sql.php
+A    RGraph/admin/mysql/tbl_row_action.php
+A    RGraph/admin/mysql/index.php
+A    RGraph/admin/mysql/db_tracking.php
+A    RGraph/admin/mysql/pmd_display_field.php
+A    RGraph/admin/mysql/tbl_alter.php
+A    RGraph/admin/mysql/contrib
+A    RGraph/admin/mysql/contrib/swekey.sample.conf
+A    RGraph/admin/mysql/contrib/README
+A    RGraph/admin/mysql/contrib/htaccess
+A    RGraph/admin/mysql/setup
+A    RGraph/admin/mysql/setup/validate.php
+A    RGraph/admin/mysql/setup/scripts.js
+A    RGraph/admin/mysql/setup/lib
+A    RGraph/admin/mysql/setup/lib/index.lib.php
+A    RGraph/admin/mysql/setup/lib/ConfigGenerator.class.php
+A    RGraph/admin/mysql/setup/lib/common.inc.php
+A    RGraph/admin/mysql/setup/lib/form_processing.lib.php
+A    RGraph/admin/mysql/setup/lib/.htaccess
+A    RGraph/admin/mysql/setup/styles.css
+A    RGraph/admin/mysql/setup/config.php
+A    RGraph/admin/mysql/setup/frames
+A    RGraph/admin/mysql/setup/frames/form.inc.php
+A    RGraph/admin/mysql/setup/frames/menu.inc.php
+A    RGraph/admin/mysql/setup/frames/config.inc.php
+A    RGraph/admin/mysql/setup/frames/index.inc.php
+A    RGraph/admin/mysql/setup/frames/servers.inc.php
+A    RGraph/admin/mysql/setup/frames/.htaccess
+A    RGraph/admin/mysql/setup/index.php
+A    RGraph/admin/mysql/db_qbe.php
+A    RGraph/admin/mysql/import_status.php
+A    RGraph/admin/mysql/config
+A    RGraph/admin/mysql/db_datadict.php
+A    RGraph/admin/mysql/prefs_forms.php
+A    RGraph/admin/mysql/server_sql.php
+A    RGraph/admin/mysql/tbl_printview.php
+A    RGraph/admin/mysql/print.css
+A    RGraph/admin/mysql/view_create.php
+A    RGraph/admin/mysql/server_privileges.php
+A    RGraph/admin/mysql/themes
+A    RGraph/admin/mysql/themes/svg_gradient.php
+A    RGraph/admin/mysql/themes/pmahomme
+A    RGraph/admin/mysql/themes/pmahomme/jquery
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-icons_2e83ff_256x240.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_glass_95_fef1ec_1x400.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-icons_888888_256x240.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_glass_75_dadada_1x400.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_flat_75_ffffff_40x100.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_glass_65_ffffff_1x400.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-icons_cd0a0a_256x240.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-icons_454545_256x240.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/images/ui-icons_222222_256x240.png
+A    RGraph/admin/mysql/themes/pmahomme/jquery/jquery-ui-1.8.custom.css
+A    RGraph/admin/mysql/themes/pmahomme/screen.png
+A    RGraph/admin/mysql/themes/pmahomme/css
+A    RGraph/admin/mysql/themes/pmahomme/css/theme_left.css.php
+A    RGraph/admin/mysql/themes/pmahomme/css/theme_print.css.php
+A    RGraph/admin/mysql/themes/pmahomme/css/theme_right.css.php
+A    RGraph/admin/mysql/themes/pmahomme/info.inc.php
+A    RGraph/admin/mysql/themes/pmahomme/layout.inc.php
+A    RGraph/admin/mysql/themes/pmahomme/img
+A    RGraph/admin/mysql/themes/pmahomme/img/logo_right.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_print.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_sync.png
+A    RGraph/admin/mysql/themes/pmahomme/img/window-new.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_tblanalyse.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_lastpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_data_selected_hovered.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/s_notice.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_tblops.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_index.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_prevpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/arrow_rtl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_data.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/tab_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/error.ico
+A    RGraph/admin/mysql/themes/pmahomme/img/vertical_line.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_rights.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_edit.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_vars.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_empty.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_lastpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_unique.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_struct_selected_hovered.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_prevpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_data_selected.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/b_docsql.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_reload.png
+A    RGraph/admin/mysql/themes/pmahomme/img/input_bg.gif
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_sbrowse.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_docs.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_selboard.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_views.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_pdfdoc.png
+A    RGraph/admin/mysql/themes/pmahomme/img/asc_order.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_relations.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_browse.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_comment.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_tbloptimize.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_props.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_loggoff.png
+A    RGraph/admin/mysql/themes/pmahomme/img/left_nav_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_usrcheck.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_sdb.png
+A    RGraph/admin/mysql/themes/pmahomme/img/marked_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_unique.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_tblimport.png
+A    RGraph/admin/mysql/themes/pmahomme/img/docs_menu_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_theme.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_fulltext.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_firstpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_help.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_replication.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_newtbl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_error2.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_process.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_struct_selected.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_browse.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_db.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_deltbl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/logo_left.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_nextpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_tipp.png
+A    RGraph/admin/mysql/themes/pmahomme/img/item_ltr.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_usredit.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_insrow.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_export.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_success.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_host.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_sql.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_dbstatistics.png
+A    RGraph/admin/mysql/themes/pmahomme/img/more.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_more.png
+A    RGraph/admin/mysql/themes/pmahomme/img/body_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_drop.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_bookmark.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_cancel.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_deltbl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/arrow_ltr.png
+A    RGraph/admin/mysql/themes/pmahomme/img/spacer.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_views.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_nextpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/tab_hover_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/eye.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_sbrowse.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_insrow.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_primary.png
+A    RGraph/admin/mysql/themes/pmahomme/img/item.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_ftext.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_chart.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_struct_hovered.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/s_status.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_usrlist.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_drop.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_error.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_index.png
+A    RGraph/admin/mysql/themes/pmahomme/img/pma_logo2.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_snewtbl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_select.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_firstpage.png
+A    RGraph/admin/mysql/themes/pmahomme/img/database_list_li_hover.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_asc.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_cancel2.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_minus.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_info.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_save.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_newdb.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_asci.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_lang.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_empty.png
+A    RGraph/admin/mysql/themes/pmahomme/img/database.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_close.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_search.png
+A    RGraph/admin/mysql/themes/pmahomme/img/ajax_clock_small.gif
+A    RGraph/admin/mysql/themes/pmahomme/img/eye_grey.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_really.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_view.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_partialtext.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_usradd.png
+A    RGraph/admin/mysql/themes/pmahomme/img/bd_select.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_inline_edit.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_plus.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_tblexport.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_okay.png
+A    RGraph/admin/mysql/themes/pmahomme/img/new_struct.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/new_data_hovered.jpg
+A    RGraph/admin/mysql/themes/pmahomme/img/b_usrdrop.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_desc.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_tbl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_engine.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_sqlhelp.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_calendar.png
+A    RGraph/admin/mysql/themes/pmahomme/img/tabactive_bg.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_import.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_info.png
+A    RGraph/admin/mysql/themes/pmahomme/img/php_sym.png
+A    RGraph/admin/mysql/themes/pmahomme/img/item_rtl.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_passwd.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_primary.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_sqldoc.png
+A    RGraph/admin/mysql/themes/pmahomme/img/s_attention.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_home.png
+A    RGraph/admin/mysql/themes/pmahomme/img/b_ftext.png
+A    RGraph/admin/mysql/themes/original
+A    RGraph/admin/mysql/themes/original/jquery
+A    RGraph/admin/mysql/themes/original/jquery/images
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-icons_2e83ff_256x240.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_glass_95_fef1ec_1x400.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-icons_888888_256x240.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_glass_75_dadada_1x400.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_flat_75_ffffff_40x100.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_glass_65_ffffff_1x400.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-icons_cd0a0a_256x240.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-icons_454545_256x240.png
+A    RGraph/admin/mysql/themes/original/jquery/images/ui-icons_222222_256x240.png
+A    RGraph/admin/mysql/themes/original/jquery/jquery-ui-1.8.custom.css
+A    RGraph/admin/mysql/themes/original/screen.png
+A    RGraph/admin/mysql/themes/original/css
+A    RGraph/admin/mysql/themes/original/css/theme_left.css.php
+A    RGraph/admin/mysql/themes/original/css/theme_print.css.php
+A    RGraph/admin/mysql/themes/original/css/theme_right.css.php
+A    RGraph/admin/mysql/themes/original/info.inc.php
+A    RGraph/admin/mysql/themes/original/layout.inc.php
+A    RGraph/admin/mysql/themes/original/img
+A    RGraph/admin/mysql/themes/original/img/b_print.png
+A    RGraph/admin/mysql/themes/original/img/logo_right.png
+A    RGraph/admin/mysql/themes/original/img/s_sync.png
+A    RGraph/admin/mysql/themes/original/img/window-new.png
+A    RGraph/admin/mysql/themes/original/img/b_tblanalyse.png
+A    RGraph/admin/mysql/themes/original/img/s_host.png
+A    RGraph/admin/mysql/themes/original/img/b_sql.png
+A    RGraph/admin/mysql/themes/original/img/b_dbstatistics.png
+A    RGraph/admin/mysql/themes/original/img/more.png
+A    RGraph/admin/mysql/themes/original/img/new_data_selected_hovered.jpg
+A    RGraph/admin/mysql/themes/original/img/b_more.png
+A    RGraph/admin/mysql/themes/original/img/s_notice.png
+A    RGraph/admin/mysql/themes/original/img/b_tblops.png
+A    RGraph/admin/mysql/themes/original/img/b_drop.png
+A    RGraph/admin/mysql/themes/original/img/b_bookmark.png
+A    RGraph/admin/mysql/themes/original/img/s_cancel.png
+A    RGraph/admin/mysql/themes/original/img/b_index.png
+A    RGraph/admin/mysql/themes/original/img/bd_deltbl.png
+A    RGraph/admin/mysql/themes/original/img/arrow_rtl.png
+A    RGraph/admin/mysql/themes/original/img/arrow_ltr.png
+A    RGraph/admin/mysql/themes/original/img/spacer.png
+A    RGraph/admin/mysql/themes/original/img/new_data.jpg
+A    RGraph/admin/mysql/themes/original/img/error.ico
+A    RGraph/admin/mysql/themes/original/img/s_views.png
+A    RGraph/admin/mysql/themes/original/img/vertical_line.png
+A    RGraph/admin/mysql/themes/original/img/eye.png
+A    RGraph/admin/mysql/themes/original/img/s_rights.png
+A    RGraph/admin/mysql/themes/original/img/b_sbrowse.png
+A    RGraph/admin/mysql/themes/original/img/bd_insrow.png
+A    RGraph/admin/mysql/themes/original/img/b_edit.png
+A    RGraph/admin/mysql/themes/original/img/bd_primary.png
+A    RGraph/admin/mysql/themes/original/img/s_vars.png
+A    RGraph/admin/mysql/themes/original/img/bd_ftext.png
+A    RGraph/admin/mysql/themes/original/img/b_empty.png
+A    RGraph/admin/mysql/themes/original/img/b_chart.png
+A    RGraph/admin/mysql/themes/original/img/new_struct_hovered.jpg
+A    RGraph/admin/mysql/themes/original/img/s_status.png
+A    RGraph/admin/mysql/themes/original/img/b_usrlist.png
+A    RGraph/admin/mysql/themes/original/img/b_unique.png
+A    RGraph/admin/mysql/themes/original/img/bd_drop.png
+A    RGraph/admin/mysql/themes/original/img/s_error.png
+A    RGraph/admin/mysql/themes/original/img/bd_index.png
+A    RGraph/admin/mysql/themes/original/img/new_struct_selected_hovered.jpg
+A    RGraph/admin/mysql/themes/original/img/b_snewtbl.png
+A    RGraph/admin/mysql/themes/original/img/b_select.png
+A    RGraph/admin/mysql/themes/original/img/new_data_selected.jpg
+A    RGraph/admin/mysql/themes/original/img/s_asc.png
+A    RGraph/admin/mysql/themes/original/img/s_reload.png
+A    RGraph/admin/mysql/themes/original/img/b_docs.png
+A    RGraph/admin/mysql/themes/original/img/bd_sbrowse.png
+A    RGraph/admin/mysql/themes/original/img/b_selboard.png
+A    RGraph/admin/mysql/themes/original/img/b_info.png
+A    RGraph/admin/mysql/themes/original/img/b_minus.png
+A    RGraph/admin/mysql/themes/original/img/b_views.png
+A    RGraph/admin/mysql/themes/original/img/b_save.png
+A    RGraph/admin/mysql/themes/original/img/b_newdb.png
+A    RGraph/admin/mysql/themes/original/img/b_relations.png
+A    RGraph/admin/mysql/themes/original/img/s_asci.png
+A    RGraph/admin/mysql/themes/original/img/b_browse.png
+A    RGraph/admin/mysql/themes/original/img/bd_empty.png
+A    RGraph/admin/mysql/themes/original/img/b_tbloptimize.png
+A    RGraph/admin/mysql/themes/original/img/b_comment.png
+A    RGraph/admin/mysql/themes/original/img/s_lang.png
+A    RGraph/admin/mysql/themes/original/img/b_props.png
+A    RGraph/admin/mysql/themes/original/img/s_loggoff.png
+A    RGraph/admin/mysql/themes/original/img/b_search.png
+A    RGraph/admin/mysql/themes/original/img/b_close.png
+A    RGraph/admin/mysql/themes/original/img/ajax_clock_small.gif
+A    RGraph/admin/mysql/themes/original/img/b_usrcheck.png
+A    RGraph/admin/mysql/themes/original/img/eye_grey.png
+A    RGraph/admin/mysql/themes/original/img/s_really.png
+A    RGraph/admin/mysql/themes/original/img/b_view.png
+A    RGraph/admin/mysql/themes/original/img/bd_unique.png
+A    RGraph/admin/mysql/themes/original/img/b_tblimport.png
+A    RGraph/admin/mysql/themes/original/img/b_usradd.png
+A    RGraph/admin/mysql/themes/original/img/s_partialtext.png
+A    RGraph/admin/mysql/themes/original/img/b_tblexport.png
+A    RGraph/admin/mysql/themes/original/img/b_inline_edit.png
+A    RGraph/admin/mysql/themes/original/img/b_plus.png
+A    RGraph/admin/mysql/themes/original/img/bd_select.png
+A    RGraph/admin/mysql/themes/original/img/docs_menu_bg.png
+A    RGraph/admin/mysql/themes/original/img/s_theme.png
+A    RGraph/admin/mysql/themes/original/img/b_help.png
+A    RGraph/admin/mysql/themes/original/img/new_struct.jpg
+A    RGraph/admin/mysql/themes/original/img/s_fulltext.png
+A    RGraph/admin/mysql/themes/original/img/new_data_hovered.jpg
+A    RGraph/admin/mysql/themes/original/img/s_replication.png
+A    RGraph/admin/mysql/themes/original/img/b_newtbl.png
+A    RGraph/admin/mysql/themes/original/img/s_error2.png
+A    RGraph/admin/mysql/themes/original/img/b_usrdrop.png
+A    RGraph/admin/mysql/themes/original/img/s_desc.png
+A    RGraph/admin/mysql/themes/original/img/s_process.png
+A    RGraph/admin/mysql/themes/original/img/new_struct_selected.jpg
+A    RGraph/admin/mysql/themes/original/img/s_tbl.png
+A    RGraph/admin/mysql/themes/original/img/bd_browse.png
+A    RGraph/admin/mysql/themes/original/img/b_engine.png
+A    RGraph/admin/mysql/themes/original/img/b_deltbl.png
+A    RGraph/admin/mysql/themes/original/img/s_db.png
+A    RGraph/admin/mysql/themes/original/img/b_sqlhelp.png
+A    RGraph/admin/mysql/themes/original/img/b_calendar.png
+A    RGraph/admin/mysql/themes/original/img/logo_left.png
+A    RGraph/admin/mysql/themes/original/img/b_import.png
+A    RGraph/admin/mysql/themes/original/img/b_tipp.png
+A    RGraph/admin/mysql/themes/original/img/item_ltr.png
+A    RGraph/admin/mysql/themes/original/img/item_rtl.png
+A    RGraph/admin/mysql/themes/original/img/b_usredit.png
+A    RGraph/admin/mysql/themes/original/img/b_export.png
+A    RGraph/admin/mysql/themes/original/img/b_insrow.png
+A    RGraph/admin/mysql/themes/original/img/s_passwd.png
+A    RGraph/admin/mysql/themes/original/img/b_primary.png
+A    RGraph/admin/mysql/themes/original/img/b_home.png
+A    RGraph/admin/mysql/themes/original/img/s_success.png
+A    RGraph/admin/mysql/themes/original/img/b_ftext.png
+A    RGraph/admin/mysql/server_synchronize.php
+A    RGraph/admin/mysql/phpinfo.php
+A    RGraph/admin/mysql/db_structure.php
+A    RGraph/admin/mysql/CREDITS
+A    RGraph/admin/mysql/favicon.ico
+A    RGraph/admin/mysql/db_create.php
+A    RGraph/admin/mysql/pmd_pdf.php
+A    RGraph/admin/mysql/server_status.php
+A    RGraph/admin/mysql/enum_editor.php
+A    RGraph/admin/mysql/tbl_import.php
+A    RGraph/admin/mysql/tbl_replace.php
+A    RGraph/admin/mysql/pmd_general.php
+A    RGraph/admin/mysql/view_operations.php
+A    RGraph/admin/mysql/tbl_relation.php
+A    RGraph/admin/mysql/INSTALL
+A    RGraph/admin/mysql/tbl_export.php
+A    RGraph/admin/mysql/bs_play_media.php
+A    RGraph/admin/mysql/db_operations.php
+A    RGraph/admin/mysql/pmd
+A    RGraph/admin/mysql/pmd/styles
+A    RGraph/admin/mysql/pmd/styles/default
+A    RGraph/admin/mysql/pmd/styles/default/images
+A    RGraph/admin/mysql/pmd/styles/default/images/small_tab.png
+A    RGraph/admin/mysql/pmd/styles/default/images/left_panel_tab.png
+A    RGraph/admin/mysql/pmd/styles/default/images/1.png
+A    RGraph/admin/mysql/pmd/styles/default/images/2.png
+A    RGraph/admin/mysql/pmd/styles/default/images/3.png
+A    RGraph/admin/mysql/pmd/styles/default/images/4.png
+A    RGraph/admin/mysql/pmd/styles/default/images/5.png
+A    RGraph/admin/mysql/pmd/styles/default/images/6.png
+A    RGraph/admin/mysql/pmd/styles/default/images/7.png
+A    RGraph/admin/mysql/pmd/styles/default/images/left_panel_butt.png
+A    RGraph/admin/mysql/pmd/styles/default/images/8.png
+A    RGraph/admin/mysql/pmd/styles/default/images/Field_small_date.png
+A    RGraph/admin/mysql/pmd/styles/default/images/Field_small_char.png
+A    RGraph/admin/mysql/pmd/styles/default/images/Field_small.png
+A    RGraph/admin/mysql/pmd/styles/default/images/Header_Linked.png
+A    RGraph/admin/mysql/pmd/styles/default/images/top_panel.png
+A    RGraph/admin/mysql/pmd/styles/default/images/plus.png
+A    RGraph/admin/mysql/pmd/styles/default/images/FieldKey_small.png
+A    RGraph/admin/mysql/pmd/styles/default/images/Field_small_int.png
+A    RGraph/admin/mysql/pmd/styles/default/images/Header.png
+A    RGraph/admin/mysql/pmd/styles/default/images/minus.png
+A    RGraph/admin/mysql/pmd/styles/default/style1.css
+A    RGraph/admin/mysql/pmd/images
+A    RGraph/admin/mysql/pmd/images/uparrow2_m.png
+A    RGraph/admin/mysql/pmd/images/def.png
+A    RGraph/admin/mysql/pmd/images/save.png
+A    RGraph/admin/mysql/pmd/images/ang_direct.png
+A    RGraph/admin/mysql/pmd/images/resize.png
+A    RGraph/admin/mysql/pmd/images/downarrow1.png
+A    RGraph/admin/mysql/pmd/images/2leftarrow_m.png
+A    RGraph/admin/mysql/pmd/images/downarrow2.png
+A    RGraph/admin/mysql/pmd/images/bottom.png
+A    RGraph/admin/mysql/pmd/images/reload.png
+A    RGraph/admin/mysql/pmd/images/display_field.png
+A    RGraph/admin/mysql/pmd/images/pdf.png
+A    RGraph/admin/mysql/pmd/images/rightarrow1.png
+A    RGraph/admin/mysql/pmd/images/and_icon.png
+A    RGraph/admin/mysql/pmd/images/2rightarrow.png
+A    RGraph/admin/mysql/pmd/images/rightarrow2.png
+A    RGraph/admin/mysql/pmd/images/favicon.ico
+A    RGraph/admin/mysql/pmd/images/query_builder.png
+A    RGraph/admin/mysql/pmd/images/exec_small.png
+A    RGraph/admin/mysql/pmd/images/relation.png
+A    RGraph/admin/mysql/pmd/images/downarrow2_m.png
+A    RGraph/admin/mysql/pmd/images/exec.png
+A    RGraph/admin/mysql/pmd/images/grid.png
+A    RGraph/admin/mysql/pmd/images/help_relation.png
+A    RGraph/admin/mysql/pmd/images/bord.png
+A    RGraph/admin/mysql/pmd/images/2rightarrow_m.png
+A    RGraph/admin/mysql/pmd/images/2leftarrow.png
+A    RGraph/admin/mysql/pmd/images/table.png
+A    RGraph/admin/mysql/pmd/images/help.png
+A    RGraph/admin/mysql/pmd/images/or_icon.png
+A    RGraph/admin/mysql/pmd/scripts
+A    RGraph/admin/mysql/pmd/scripts/move.js
+A    RGraph/admin/mysql/pmd/scripts/iecanvas.js
+A    RGraph/admin/mysql/pmd/scripts/history.js
+A    RGraph/admin/mysql/pmd/scripts/ajax.js
+A    RGraph/admin/mysql/LICENSE
+A    RGraph/admin/mysql/transformation_overview.php
+A    RGraph/admin/mysql/server_collations.php
+A    RGraph/admin/mysql/querywindow.php
+A    RGraph/admin/mysql/sql.php
+A    RGraph/admin/mysql/server_processlist.php
+A    RGraph/admin/mysql/tbl_sql.php
+A    RGraph/admin/mysql/tbl_move_copy.php
+A    RGraph/admin/mysql/tbl_tracking.php
+A    RGraph/admin/mysql/transformation_wrapper.php
+A    RGraph/admin/mysql/RELEASE-DATE-3.4.3.1
+A    RGraph/admin/mysql/README
+A    RGraph/admin/mysql/import.php
+A    RGraph/admin/mysql/db_search.php
+A    RGraph/admin/mysql/server_databases.php
+A    RGraph/admin/mysql/bs_disp_as_mime_type.php
+A    RGraph/admin/mysql/server_engines.php
+A    RGraph/admin/mysql/TODO
+A    RGraph/admin/mysql/export.php
+A    RGraph/admin/mysql/license.php
+A    RGraph/admin/mysql/tbl_get_field.php
+A    RGraph/admin/mysql/browse_foreigners.php
+A    RGraph/admin/mysql/themes.php
+A    RGraph/admin/mysql/pmd_relation_new.php
+A    RGraph/admin/mysql/libraries
+A    RGraph/admin/mysql/libraries/tbl_common.php
+A    RGraph/admin/mysql/libraries/tbl_links.inc.php
+A    RGraph/admin/mysql/libraries/information_schema_relations.lib.php
+A    RGraph/admin/mysql/libraries/session.inc.php
+A    RGraph/admin/mysql/libraries/Error.class.php
+A    RGraph/admin/mysql/libraries/header_http.inc.php
+A    RGraph/admin/mysql/libraries/display_change_password.lib.php
+A    RGraph/admin/mysql/libraries/js_escape.lib.php
+A    RGraph/admin/mysql/libraries/config.values.php
+A    RGraph/admin/mysql/libraries/chart.lib.php
+A    RGraph/admin/mysql/libraries/mysql_charsets.lib.php
+A    RGraph/admin/mysql/libraries/server_synchronize.lib.php
+A    RGraph/admin/mysql/libraries/header_printview.inc.php
+A    RGraph/admin/mysql/libraries/user_preferences.inc.php
+A    RGraph/admin/mysql/libraries/db_info.inc.php
+A    RGraph/admin/mysql/libraries/sqlvalidator.class.php
+A    RGraph/admin/mysql/libraries/db_structure.lib.php
+A    RGraph/admin/mysql/libraries/bookmark.lib.php
+A    RGraph/admin/mysql/libraries/tbl_replace_fields.inc.php
+A    RGraph/admin/mysql/libraries/chart
+A    RGraph/admin/mysql/libraries/chart/pChart
+A    RGraph/admin/mysql/libraries/chart/pChart/pChart.class
+A    RGraph/admin/mysql/libraries/chart/pChart/pCache.class
+A    RGraph/admin/mysql/libraries/chart/pChart/fonts
+A    RGraph/admin/mysql/libraries/chart/pChart/fonts/DejaVuSans.ttf
+A    RGraph/admin/mysql/libraries/chart/pChart/fonts/LICENSE
+A    RGraph/admin/mysql/libraries/chart/pChart/fonts/README
+A    RGraph/admin/mysql/libraries/chart/pChart/pData.class
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_pie.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_multi_bar.php
+A    RGraph/admin/mysql/libraries/chart/pma_chart.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_chart.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_multi_line.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_single.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_stacked_bar.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_multi_radar.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_single_bar.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_single_line.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_multi.php
+A    RGraph/admin/mysql/libraries/chart/pma_pchart_single_radar.php
+A    RGraph/admin/mysql/libraries/Partition.class.php
+A    RGraph/admin/mysql/libraries/blowfish.php
+A    RGraph/admin/mysql/libraries/server_links.inc.php
+A    RGraph/admin/mysql/libraries/List.class.php
+A    RGraph/admin/mysql/libraries/string_type_ctype.lib.php
+A    RGraph/admin/mysql/libraries/db_events.inc.php
+A    RGraph/admin/mysql/libraries/replication_gui.lib.php
+A    RGraph/admin/mysql/libraries/relation_cleanup.lib.php
+A    RGraph/admin/mysql/libraries/Table.class.php
+A    RGraph/admin/mysql/libraries/cleanup.lib.php
+A    RGraph/admin/mysql/libraries/error.inc.php
+A    RGraph/admin/mysql/libraries/List_Database.class.php
+A    RGraph/admin/mysql/libraries/build_html_for_db.lib.php
+A    RGraph/admin/mysql/libraries/zip_extension.lib.php
+A    RGraph/admin/mysql/libraries/user_preferences.lib.php
+A    RGraph/admin/mysql/libraries/ob.lib.php
+A    RGraph/admin/mysql/libraries/tbl_properties.inc.php
+A    RGraph/admin/mysql/libraries/display_select_lang.lib.php
+A    RGraph/admin/mysql/libraries/schema
+A    RGraph/admin/mysql/libraries/schema/Pdf_Relation_Schema.class.php
+A    RGraph/admin/mysql/libraries/schema/Visio_Relation_Schema.class.php
+A    RGraph/admin/mysql/libraries/schema/Dia_Relation_Schema.class.php
+A    RGraph/admin/mysql/libraries/schema/Svg_Relation_Schema.class.php
+A    RGraph/admin/mysql/libraries/schema/Export_Relation_Schema.class.php
+A    RGraph/admin/mysql/libraries/schema/User_Schema.class.php
+A    RGraph/admin/mysql/libraries/schema/Eps_Relation_Schema.class.php
+A    RGraph/admin/mysql/libraries/sqlvalidator.lib.php
+A    RGraph/admin/mysql/libraries/tcpdf
+A    RGraph/admin/mysql/libraries/tcpdf/LICENSE.TXT
+A    RGraph/admin/mysql/libraries/tcpdf/tcpdf.p12
+A    RGraph/admin/mysql/libraries/tcpdf/cache
+A    RGraph/admin/mysql/libraries/tcpdf/cache/table_data_demo.txt
+A    RGraph/admin/mysql/libraries/tcpdf/cache/utf8test.txt
+A    RGraph/admin/mysql/libraries/tcpdf/cache/chapter_demo_1.txt
+A    RGraph/admin/mysql/libraries/tcpdf/cache/chapter_demo_2.txt
+A    RGraph/admin/mysql/libraries/tcpdf/CHANGELOG.TXT
+A    RGraph/admin/mysql/libraries/tcpdf/config
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/urd.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/mlt.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/heb.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/hrv.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/zho.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/bel.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/dan.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/slv.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/srp.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/cat.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/ces.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/mkd.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/hat.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/ger.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/nob.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/kat.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/msa.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/hye.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/yid.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/cym.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/pol.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/hun.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/swa.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/kor.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/est.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/eus.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/sqi.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/ron.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/swe.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/por.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/ara.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/chi.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/bra.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/gle.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/afr.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/fra.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/glg.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/eng.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/rus.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/ind.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/nld.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/ita.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/aze.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/lang/spa.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/tcpdf_config.php
+A    RGraph/admin/mysql/libraries/tcpdf/config/tcpdf_config_alt.php
+A    RGraph/admin/mysql/libraries/tcpdf/unicode_data.php
+A    RGraph/admin/mysql/libraries/tcpdf/tcpdf.php
+A    RGraph/admin/mysql/libraries/tcpdf/tcpdf.crt
+A    RGraph/admin/mysql/libraries/tcpdf/fonts
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavuserif.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/timesi.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavuserifb.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavu-fonts-ttf-2.32
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavu-fonts-ttf-2.32/LICENSE
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavu-fonts-ttf-2.32/README
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/timesbi.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavusans.ctg.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavusansb.ctg.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavusans.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/helvetica.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavuserif.ctg.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavusansb.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/symbol.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/helveticab.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavuserifb.ctg.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavuserif.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/courier.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavuserifb.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/courierb.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/zapfdingbats.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/helveticai.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/helveticabi.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/courieri.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/times.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/courierbi.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/timesb.php
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavusans.z
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/README.TXT
+A    RGraph/admin/mysql/libraries/tcpdf/fonts/dejavusansb.z
+A    RGraph/admin/mysql/libraries/tcpdf/README.TXT
+A    RGraph/admin/mysql/libraries/tcpdf/htmlcolors.php
+A    RGraph/admin/mysql/libraries/tcpdf/spotcolors.php
+A    RGraph/admin/mysql/libraries/tcpdf/tcpdf.fdf
+A    RGraph/admin/mysql/libraries/display_tbl.lib.php
+A    RGraph/admin/mysql/libraries/Index.class.php
+A    RGraph/admin/mysql/libraries/string.lib.php
+A    RGraph/admin/mysql/libraries/PMA.php
+A    RGraph/admin/mysql/libraries/import.lib.php
+A    RGraph/admin/mysql/libraries/config
+A    RGraph/admin/mysql/libraries/config/ConfigFile.class.php
+A    RGraph/admin/mysql/libraries/config/FormDisplay.class.php
+A    RGraph/admin/mysql/libraries/config/validate.lib.php
+A    RGraph/admin/mysql/libraries/config/messages.inc.php
+A    RGraph/admin/mysql/libraries/config/config_functions.lib.php
+A    RGraph/admin/mysql/libraries/config/user_preferences.forms.php
+A    RGraph/admin/mysql/libraries/config/setup.forms.php
+A    RGraph/admin/mysql/libraries/config/Form.class.php
+A    RGraph/admin/mysql/libraries/config/FormDisplay.tpl.php
+A    RGraph/admin/mysql/libraries/string_native.lib.php
+A    RGraph/admin/mysql/libraries/PHPExcel
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell/IValueBinder.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell/DataType.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell/DataValidation.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell/Hyperlink.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell/AdvancedValueBinder.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/RichText.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/HashTable.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/DocumentProperties.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/DiscISAM.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/ICache.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/PHPTemp.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/CacheBase.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/Wincache.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/Memcache.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/MemoryGZip.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/APC.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/MemorySerialized.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorage/Memory.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/ReferenceHelper.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/IOFactory.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Autoloader.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Settings.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/NamedRange.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Comment.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/RichText
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/RichText/TextElement.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/RichText/Run.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/RichText/ITextElement.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/DocumentSecurity.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Engineering.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/ExceptionHandler.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/DateTime.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Exception.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Database.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/LookupRef.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/FormulaToken.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Functions.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/functionlist.txt
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Logical.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/TextData.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/MathTrig.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/FormulaParser.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Statistical.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Financial.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Calculation/Function.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Border.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Alignment.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Color.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Borders.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/NumberFormat.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Conditional.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Fill.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Font.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Style/Protection.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/CachedObjectStorageFactory.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel2007.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Gnumeric.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/IReadFilter.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/CSV.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/IReader.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel5
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel5/Escher.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/OOCalc.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/SYLK.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel2007
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel2007/Theme.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel5.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/DefaultReadFilter.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Reader/Excel2003XML.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/IComparable.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Cell.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE/PPS
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE/PPS/File.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE/PPS/Root.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE/ChainedBlockStream.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE/PPS.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Drawing.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/XMLWriter.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/PasswordHasher.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/ZipArchive.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/String.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Font.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/CodePage.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/PCLZip
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/PCLZip/gnu-lgpl.txt
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/PCLZip/readme.txt
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/PCLZip/pclzip.lib.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLERead.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Date.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/OLE.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/File.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/ZipStreamWrapper.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/utils
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/utils/Error.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/utils/Maths.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/LUDecomposition.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/CholeskyDecomposition.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/SingularValueDecomposition.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/CHANGELOG.TXT
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/QRDecomposition.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/JAMA/Matrix.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DgContainer.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DggContainer.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DgContainer
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/Excel5.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/logarithmicBestFitClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/polynomialBestFitClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/exponentialBestFitClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/linearBestFitClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/trendClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/powerBestFitClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Shared/trend/bestFitClass.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/CellIterator.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/Drawing.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/PageMargins.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/PageSetup.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/RowDimension.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/RowIterator.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/ColumnDimension.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/HeaderFooterDrawing.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/SheetView.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/MemoryDrawing.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/Drawing
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/Drawing/Shadow.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/BaseDrawing.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/Protection.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/HeaderFooter.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Worksheet/Row.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/WorksheetIterator.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/PDF.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/CSV.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/Escher.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/Worksheet.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/Parser.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/Workbook.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/Xf.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/BIFFwriter.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5/Font.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/DocProps.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Drawing.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Worksheet.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Workbook.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/StringTable.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/ContentTypes.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Style.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Theme.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/WriterPart.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Comments.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel2007/Rels.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/HTML.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/Excel5.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel/Writer/IWriter.php
+A    RGraph/admin/mysql/libraries/PHPExcel/PHPExcel.php
+A    RGraph/admin/mysql/libraries/vendor_config.php
+A    RGraph/admin/mysql/libraries/plugin_interface.lib.php
+A    RGraph/admin/mysql/libraries/server_variables_doc.php
+A    RGraph/admin/mysql/libraries/import
+A    RGraph/admin/mysql/libraries/import/csv.php
+A    RGraph/admin/mysql/libraries/import/upload
+A    RGraph/admin/mysql/libraries/import/upload/uploadprogress.php
+A    RGraph/admin/mysql/libraries/import/upload/noplugin.php
+A    RGraph/admin/mysql/libraries/import/upload/apc.php
+A    RGraph/admin/mysql/libraries/import/xlsx.php
+A    RGraph/admin/mysql/libraries/import/sql.php
+A    RGraph/admin/mysql/libraries/import/xml.php
+A    RGraph/admin/mysql/libraries/import/docsql.php
+A    RGraph/admin/mysql/libraries/import/ods.php
+A    RGraph/admin/mysql/libraries/import/xls.php
+A    RGraph/admin/mysql/libraries/import/README
+A    RGraph/admin/mysql/libraries/import/ldi.php
+A    RGraph/admin/mysql/libraries/sqlparser.data.php
+A    RGraph/admin/mysql/libraries/database_interface.lib.php
+A    RGraph/admin/mysql/libraries/Error_Handler.class.php
+A    RGraph/admin/mysql/libraries/export
+A    RGraph/admin/mysql/libraries/export/csv.php
+A    RGraph/admin/mysql/libraries/export/xlsx.php
+A    RGraph/admin/mysql/libraries/export/texytext.php
+A    RGraph/admin/mysql/libraries/export/sql.php
+A    RGraph/admin/mysql/libraries/export/xml.php
+A    RGraph/admin/mysql/libraries/export/htmlword.php
+A    RGraph/admin/mysql/libraries/export/excel.php
+A    RGraph/admin/mysql/libraries/export/yaml.php
+A    RGraph/admin/mysql/libraries/export/mediawiki.php
+A    RGraph/admin/mysql/libraries/export/codegen.php
+A    RGraph/admin/mysql/libraries/export/xls.php
+A    RGraph/admin/mysql/libraries/export/pdf.php
+A    RGraph/admin/mysql/libraries/export/json.php
+A    RGraph/admin/mysql/libraries/export/latex.php
+A    RGraph/admin/mysql/libraries/export/php_array.php
+A    RGraph/admin/mysql/libraries/export/ods.php
+A    RGraph/admin/mysql/libraries/export/odt.php
+A    RGraph/admin/mysql/libraries/tbl_triggers.lib.php
+A    RGraph/admin/mysql/libraries/db_links.inc.php
+A    RGraph/admin/mysql/libraries/core.lib.php
+A    RGraph/admin/mysql/libraries/mult_submits.inc.php
+A    RGraph/admin/mysql/libraries/header.inc.php
+A    RGraph/admin/mysql/libraries/db_table_exists.lib.php
+A    RGraph/admin/mysql/libraries/Theme_Manager.class.php
+A    RGraph/admin/mysql/libraries/common.inc.php
+A    RGraph/admin/mysql/libraries/parse_analyze.lib.php
+A    RGraph/admin/mysql/libraries/display_import.lib.php
+A    RGraph/admin/mysql/libraries/tbl_info.inc.php
+A    RGraph/admin/mysql/libraries/opendocument.lib.php
+A    RGraph/admin/mysql/libraries/header_scripts.inc.php
+A    RGraph/admin/mysql/libraries/display_import_ajax.lib.php
+A    RGraph/admin/mysql/libraries/check_user_privileges.lib.php
+A    RGraph/admin/mysql/libraries/language_stats.inc.php
+A    RGraph/admin/mysql/libraries/url_generating.lib.php
+A    RGraph/admin/mysql/libraries/display_export.lib.php
+A    RGraph/admin/mysql/libraries/auth
+A    RGraph/admin/mysql/libraries/auth/config.auth.lib.php
+A    RGraph/admin/mysql/libraries/auth/cookie.auth.lib.php
+A    RGraph/admin/mysql/libraries/auth/swekey
+A    RGraph/admin/mysql/libraries/auth/swekey/swekey.auth.lib.php
+A    RGraph/admin/mysql/libraries/auth/swekey/musbe-ca.crt
+A    RGraph/admin/mysql/libraries/auth/swekey/authentication.inc.php
+A    RGraph/admin/mysql/libraries/auth/swekey/swekey.php
+A    RGraph/admin/mysql/libraries/auth/signon.auth.lib.php
+A    RGraph/admin/mysql/libraries/auth/http.auth.lib.php
+A    RGraph/admin/mysql/libraries/navigation_header.inc.php
+A    RGraph/admin/mysql/libraries/display_create_database.lib.php
+A    RGraph/admin/mysql/libraries/replication.inc.php
+A    RGraph/admin/mysql/libraries/sqlparser.lib.php
+A    RGraph/admin/mysql/libraries/string_type_native.lib.php
+A    RGraph/admin/mysql/libraries/iconv_wrapper.lib.php
+A    RGraph/admin/mysql/libraries/File.class.php
+A    RGraph/admin/mysql/libraries/sanitizing.lib.php
+A    RGraph/admin/mysql/libraries/db_routines.inc.php
+A    RGraph/admin/mysql/libraries/.htaccess
+A    RGraph/admin/mysql/libraries/server_common.inc.php
+A    RGraph/admin/mysql/libraries/string_mb.lib.php
+A    RGraph/admin/mysql/libraries/ip_allow_deny.lib.php
+A    RGraph/admin/mysql/libraries/logging.lib.php
+A    RGraph/admin/mysql/libraries/mime.lib.php
+A    RGraph/admin/mysql/libraries/blobstreaming.lib.php
+A    RGraph/admin/mysql/libraries/common.lib.php
+A    RGraph/admin/mysql/libraries/StorageEngine.class.php
+A    RGraph/admin/mysql/libraries/transformations.lib.php
+A    RGraph/admin/mysql/libraries/Tracker.class.php
+A    RGraph/admin/mysql/libraries/engines
+A    RGraph/admin/mysql/libraries/engines/mrg_myisam.lib.php
+A    RGraph/admin/mysql/libraries/engines/ndbcluster.lib.php
+A    RGraph/admin/mysql/libraries/engines/bdb.lib.php
+A    RGraph/admin/mysql/libraries/engines/berkeleydb.lib.php
+A    RGraph/admin/mysql/libraries/engines/memory.lib.php
+A    RGraph/admin/mysql/libraries/engines/innodb.lib.php
+A    RGraph/admin/mysql/libraries/engines/binlog.lib.php
+A    RGraph/admin/mysql/libraries/engines/pbxt.lib.php
+A    RGraph/admin/mysql/libraries/engines/innobase.lib.php
+A    RGraph/admin/mysql/libraries/engines/merge.lib.php
+A    RGraph/admin/mysql/libraries/engines/myisam.lib.php
+A    RGraph/admin/mysql/libraries/engines/pbms.lib.php
+A    RGraph/admin/mysql/libraries/charset_conversion.lib.php
+A    RGraph/admin/mysql/libraries/transformations
+A    RGraph/admin/mysql/libraries/transformations/image_png__inline.inc.php
+A    RGraph/admin/mysql/libraries/transformations/text_plain__link.inc.php
+A    RGraph/admin/mysql/libraries/transformations/image_jpeg__inline.inc.php
+A    RGraph/admin/mysql/libraries/transformations/text_plain__sql.inc.php
+A    RGraph/admin/mysql/libraries/transformations/text_plain__imagelink.inc.php
+A    RGraph/admin/mysql/libraries/transformations/TEMPLATE_MIMETYPE
+A    RGraph/admin/mysql/libraries/transformations/text_plain__longToIpv4.inc.php
+A    RGraph/admin/mysql/libraries/transformations/template_generator.sh
+A    RGraph/admin/mysql/libraries/transformations/README
+A    RGraph/admin/mysql/libraries/transformations/global.inc.php
+A    RGraph/admin/mysql/libraries/transformations/generator.sh
+A    RGraph/admin/mysql/libraries/transformations/image_jpeg__link.inc.php
+A    RGraph/admin/mysql/libraries/transformations/application_octetstream__download.inc.php
+A    RGraph/admin/mysql/libraries/transformations/template_generator_mimetype.sh
+A    RGraph/admin/mysql/libraries/transformations/text_plain__external.inc.php
+A    RGraph/admin/mysql/libraries/transformations/text_plain__substr.inc.php
+A    RGraph/admin/mysql/libraries/transformations/text_plain__formatted.inc.php
+A    RGraph/admin/mysql/libraries/transformations/text_plain__dateformat.inc.php
+A    RGraph/admin/mysql/libraries/transformations/TEMPLATE
+A    RGraph/admin/mysql/libraries/transformations/application_octetstream__hex.inc.php
+A    RGraph/admin/mysql/libraries/display_create_table.lib.php
+A    RGraph/admin/mysql/libraries/db_common.inc.php
+A    RGraph/admin/mysql/libraries/footer.inc.php
+A    RGraph/admin/mysql/libraries/Theme.class.php
+A    RGraph/admin/mysql/libraries/zip.lib.php
+A    RGraph/admin/mysql/libraries/file_listing.php
+A    RGraph/admin/mysql/libraries/dbi
+A    RGraph/admin/mysql/libraries/dbi/mysqli.dbi.lib.php
+A    RGraph/admin/mysql/libraries/dbi/mysql.dbi.lib.php
+A    RGraph/admin/mysql/libraries/Config.class.php
+A    RGraph/admin/mysql/libraries/select_server.lib.php
+A    RGraph/admin/mysql/libraries/sql_query_form.lib.php
+A    RGraph/admin/mysql/libraries/relation.lib.php
+A    RGraph/admin/mysql/libraries/grab_globals.lib.php
+A    RGraph/admin/mysql/libraries/php-gettext
+A    RGraph/admin/mysql/libraries/php-gettext/streams.php
+A    RGraph/admin/mysql/libraries/php-gettext/gettext.php
+A    RGraph/admin/mysql/libraries/php-gettext/gettext.inc
+A    RGraph/admin/mysql/libraries/kanji-encoding.lib.php
+A    RGraph/admin/mysql/libraries/select_lang.lib.php
+A    RGraph/admin/mysql/libraries/header_meta_style.inc.php
+A    RGraph/admin/mysql/libraries/Message.class.php
+A    RGraph/admin/mysql/libraries/config.default.php
+A    RGraph/admin/mysql/pmd_help.php
+A    RGraph/admin/mysql/pmd_common.php
+A    RGraph/admin/licenses
+A    RGraph/admin/licenses/statistics.php
+A    RGraph/admin/licenses/reports.php
+A    RGraph/admin/licenses/index.php
+A    RGraph/admin/articles
+A    RGraph/admin/articles/index.html
+A    RGraph/admin/.htaccess
+A    RGraph/admin/news
+A    RGraph/admin/news/iframe.php
+A    RGraph/admin/news/index.php
+A    RGraph/admin/lib_auth.php
+A    RGraph/admin/zphpMyAdmin.old
+A    RGraph/admin/zphpMyAdmin.old/pdf_schema.php
+A    RGraph/admin/zphpMyAdmin.old/db_details_links.php
+A    RGraph/admin/zphpMyAdmin.old/db_printview.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_addfield.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties.php
+A    RGraph/admin/zphpMyAdmin.old/scripts
+A    RGraph/admin/zphpMyAdmin.old/scripts/remove_control_m.sh
+A    RGraph/admin/zphpMyAdmin.old/scripts/check_lang.php
+A    RGraph/admin/zphpMyAdmin.old/scripts/decode_bug.php
+A    RGraph/admin/zphpMyAdmin.old/scripts/convertcfg.pl
+A    RGraph/admin/zphpMyAdmin.old/scripts/create-release.sh
+A    RGraph/admin/zphpMyAdmin.old/scripts/create_tables.sql
+A    RGraph/admin/zphpMyAdmin.old/scripts/extchg.sh
+A    RGraph/admin/zphpMyAdmin.old/scripts/inno2pma.sh
+A    RGraph/admin/zphpMyAdmin.old/tbl_create.php
+A    RGraph/admin/zphpMyAdmin.old/ldi_check.php
+A    RGraph/admin/zphpMyAdmin.old/server_export.php
+A    RGraph/admin/zphpMyAdmin.old/chk_rel.php
+A    RGraph/admin/zphpMyAdmin.old/header_printview.inc.php
+A    RGraph/admin/zphpMyAdmin.old/config.inc.php
+A    RGraph/admin/zphpMyAdmin.old/server_links.inc.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_select.php
+A    RGraph/admin/zphpMyAdmin.old/main.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_change.php
+A    RGraph/admin/zphpMyAdmin.old/Documentation.html
+A    RGraph/admin/zphpMyAdmin.old/docs.css
+A    RGraph/admin/zphpMyAdmin.old/translators.html
+A    RGraph/admin/zphpMyAdmin.old/db_details.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_row_delete.php
+A    RGraph/admin/zphpMyAdmin.old/lang
+A    RGraph/admin/zphpMyAdmin.old/lang/basque-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/italian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/italian-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/arabic-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/latvian-windows-1257.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/serbian_latin-windows-1250.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/thai-tis-620.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/indonesian-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/english-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/english-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/serbian_cyrillic-windows-1251.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/japanese-sjis.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/georgian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/czech-iso-8859-2.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/polish-iso-8859-2.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/persian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/portuguese-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/malay-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/bosnian-windows-1250.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/spanish-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/spanish-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/danish-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/swedish-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/galician-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/dutch-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/slovak-windows-1250.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/azerbaijani-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/bulgarian-windows-1251.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/ukrainian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/chinese_gb-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/russian-dos-866.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/sync_lang.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/czech-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/lithuanian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/greek-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/brazilian_portuguese-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/brazilian_portuguese-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/finnish-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/slovenian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/japanese-euc.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/afrikaans-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/slovak-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/russian-windows-1251.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/sort_lang.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/greek-iso-8859-7.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/arabic-windows-1256.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/catalan-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/romanian-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/danish-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/add_message.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/bulgarian-koi8-r.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/slovenian-windows-1250.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/korean-ks_c_5601-1987.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/croatian-windows-1250.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/hungarian-iso-8859-2.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/estonian-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/persian-windows-1256.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/chinese_big5-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/chinese_gb.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/thai-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/indonesian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/norwegian-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/norwegian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/russian-koi8-r.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/finnish-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/ukrainian-windows-1251.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/slovenian-iso-8859-2.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/croatian-iso-8859-2.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/malay-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/bulgarian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/romanian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/galician-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/dutch-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/remove_message.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/hungarian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/serbian_cyrillic-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/estonian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/basque-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/translatecount.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/chinese_big5.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/russian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/japanese-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/azerbaijani-iso-8859-9.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/check_lang.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/bosnian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/turkish-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/hindi-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/latvian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/polish-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/afrikaans-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/croatian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/slovak-iso-8859-2.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/turkish-iso-8859-9.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/portuguese-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/catalan-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/french-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/french-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/albanian-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/albanian-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/add_message_file.sh
+A    RGraph/admin/zphpMyAdmin.old/lang/swedish-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/czech-windows-1250.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/hebrew-iso-8859-8-i.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/german-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/german-iso-8859-1.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/serbian_latin-utf-8.inc.php
+A    RGraph/admin/zphpMyAdmin.old/lang/lithuanian-windows-1257.inc.php
+A    RGraph/admin/zphpMyAdmin.old/db_details_export.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties_links.php
+A    RGraph/admin/zphpMyAdmin.old/server_variables.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties_export.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_indexes.php
+A    RGraph/admin/zphpMyAdmin.old/user_password.php
+A    RGraph/admin/zphpMyAdmin.old/Documentation.txt
+A    RGraph/admin/zphpMyAdmin.old/ChangeLog
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties.inc.php
+A    RGraph/admin/zphpMyAdmin.old/index.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_alter.php
+A    RGraph/admin/zphpMyAdmin.old/db_details_structure.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_query_box.php
+A    RGraph/admin/zphpMyAdmin.old/queryframe.php
+A    RGraph/admin/zphpMyAdmin.old/db_datadict.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_printview.php
+A    RGraph/admin/zphpMyAdmin.old/server_privileges.php
+A    RGraph/admin/zphpMyAdmin.old/mult_submits.inc.php
+A    RGraph/admin/zphpMyAdmin.old/header.inc.php
+A    RGraph/admin/zphpMyAdmin.old/db_details_common.php
+A    RGraph/admin/zphpMyAdmin.old/phpinfo.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties_common.php
+A    RGraph/admin/zphpMyAdmin.old/CREDITS
+A    RGraph/admin/zphpMyAdmin.old/db_create.php
+A    RGraph/admin/zphpMyAdmin.old/server_status.php
+A    RGraph/admin/zphpMyAdmin.old/db_details_db_info.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_replace.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties_structure.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_relation.php
+A    RGraph/admin/zphpMyAdmin.old/ldi_table.php
+A    RGraph/admin/zphpMyAdmin.old/images
+A    RGraph/admin/zphpMyAdmin.old/images/button_nodrop.png
+A    RGraph/admin/zphpMyAdmin.old/images/pma_logo.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_unique.png
+A    RGraph/admin/zphpMyAdmin.old/images/asc_order.png
+A    RGraph/admin/zphpMyAdmin.old/images/browse.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_fulltext.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_select.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_noprimary.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_primary.png
+A    RGraph/admin/zphpMyAdmin.old/images/vertical_line.png
+A    RGraph/admin/zphpMyAdmin.old/images/plus.png
+A    RGraph/admin/zphpMyAdmin.old/images/minus.png
+A    RGraph/admin/zphpMyAdmin.old/images/arrow_ltr.gif
+A    RGraph/admin/zphpMyAdmin.old/images/arrow_rtl.gif
+A    RGraph/admin/zphpMyAdmin.old/images/button_browse.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_nounique.png
+A    RGraph/admin/zphpMyAdmin.old/images/spacer.gif
+A    RGraph/admin/zphpMyAdmin.old/images/button_noindex.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_nofulltext.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_drop.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_insert.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_bookmark.png
+A    RGraph/admin/zphpMyAdmin.old/images/partialtext.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_index.png
+A    RGraph/admin/zphpMyAdmin.old/images/Thumbs.db
+A    RGraph/admin/zphpMyAdmin.old/images/fulltext.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_noselect.png
+A    RGraph/admin/zphpMyAdmin.old/images/desc_order.png
+A    RGraph/admin/zphpMyAdmin.old/images/item_rtl.png
+A    RGraph/admin/zphpMyAdmin.old/images/item_ltr.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_edit.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_smallbrowse.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_noempty.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_properties.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_empty.png
+A    RGraph/admin/zphpMyAdmin.old/images/button_nobrowse.png
+A    RGraph/admin/zphpMyAdmin.old/INSTALL
+A    RGraph/admin/zphpMyAdmin.old/db_details_qbe.php
+A    RGraph/admin/zphpMyAdmin.old/server_common.inc.php
+A    RGraph/admin/zphpMyAdmin.old/left.php
+A    RGraph/admin/zphpMyAdmin.old/db_details_importdocsql.php
+A    RGraph/admin/zphpMyAdmin.old/LICENSE
+A    RGraph/admin/zphpMyAdmin.old/server_collations.php
+A    RGraph/admin/zphpMyAdmin.old/querywindow.php
+A    RGraph/admin/zphpMyAdmin.old/sql.php
+A    RGraph/admin/zphpMyAdmin.old/server_processlist.php
+A    RGraph/admin/zphpMyAdmin.old/read_dump.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties_operations.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_move_copy.php
+A    RGraph/admin/zphpMyAdmin.old/css
+A    RGraph/admin/zphpMyAdmin.old/css/phpmyadmin.css.php
+A    RGraph/admin/zphpMyAdmin.old/tbl_replace_fields.php
+A    RGraph/admin/zphpMyAdmin.old/RELEASE-DATE-2.5.5-pl1
+A    RGraph/admin/zphpMyAdmin.old/footer.inc.php
+A    RGraph/admin/zphpMyAdmin.old/transformation_wrapper.php
+A    RGraph/admin/zphpMyAdmin.old/README
+A    RGraph/admin/zphpMyAdmin.old/tbl_rename.php
+A    RGraph/admin/zphpMyAdmin.old/db_search.php
+A    RGraph/admin/zphpMyAdmin.old/server_databases.php
+A    RGraph/admin/zphpMyAdmin.old/TODO
+A    RGraph/admin/zphpMyAdmin.old/tbl_properties_table_info.php
+A    RGraph/admin/zphpMyAdmin.old/export.php
+A    RGraph/admin/zphpMyAdmin.old/browse_foreigners.php
+A    RGraph/admin/zphpMyAdmin.old/libraries
+A    RGraph/admin/zphpMyAdmin.old/libraries/export
+A    RGraph/admin/zphpMyAdmin.old/libraries/export/csv.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/export/latex.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/export/sql.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/export/xml.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/mysql_wrappers.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/header_http.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/db_table_exists.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/config_import.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/mysql_charsets.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/sqlvalidator.class.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/bookmark.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/url_generating.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/auth
+A    RGraph/admin/zphpMyAdmin.old/libraries/auth/config.auth.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/auth/cookie.auth.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/auth/http.auth.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/display_export.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/display_tbl_links.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/tbl_change.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/blowfish.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/left.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/db_config.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/sqlparser.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/server_privileges.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/user_password.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/relation_cleanup.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/fpdf.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/tahoma.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/timesi.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/tahomab.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/timesbi.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/zapfdingbats.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/helveticai.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/helveticabi.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/times.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/timesb.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/helvetica.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/symbol.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/helveticab.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/font/courier.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/fpdf/README
+A    RGraph/admin/zphpMyAdmin.old/libraries/ip_allow_deny.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/get_foreign.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/functions.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/common.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/charset_conversion.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/image_png__inline.inc.php0000644
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/text_plain__link.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/image_jpeg__inline.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/text_plain__imagelink.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/TEMPLATE_MIMETYPE
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/template_generator.sh
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/overview.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/README
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/global.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/generator.sh
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/image_jpeg__link.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/template_generator_mimetype.sh
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/text_plain__external.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/text_plain__substr.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/text_plain__formatted.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/text_plain__dateformat.inc.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/transformations/TEMPLATE
+A    RGraph/admin/zphpMyAdmin.old/libraries/read_dump.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/ob.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/dbg
+A    RGraph/admin/zphpMyAdmin.old/libraries/dbg/profiling.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/dbg/setup.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/defines_mysql.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/zip.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/sqlvalidator.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/display_tbl.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/string.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/dom-drag.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/relation.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/defines.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/grab_globals.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/indexes.js
+A    RGraph/admin/zphpMyAdmin.old/libraries/sqlparser.data.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/kanji-encoding.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/select_lang.lib.php
+A    RGraph/admin/zphpMyAdmin.old/libraries/header_meta_style.inc.php
+A    RGraph/admin/zphpMyAdmin.old/pdf_pages.php
+A    RGraph/analog.css
+A    RGraph/css
+A    RGraph/css/common.css
+A    RGraph/css/ModalDialog.css
+A    RGraph/css/website.css
+A    RGraph/css/index.html
+A    RGraph/css/.htaccess
+A    RGraph/video.webm
+A    RGraph/screenshots
+A    RGraph/screenshots/led.png
+A    RGraph/screenshots/bar.png
+A    RGraph/screenshots/scatter.png
+A    RGraph/screenshots/rose.png
+A    RGraph/screenshots/meter.png
+A    RGraph/screenshots/hprogress.png
+A    RGraph/screenshots/hbar.png
+A    RGraph/screenshots/tradar.png
+A    RGraph/screenshots/pie.png
+A    RGraph/screenshots/gantt.png
+A    RGraph/screenshots/odo.png
+A    RGraph/screenshots/rscatter.png
+A    RGraph/screenshots/line.png
+A    RGraph/screenshots/funnel.png
+A    RGraph/screenshots/bipolar.png
+A    RGraph/screenshots/donut.png
+A    RGraph/screenshots/vprogress.png
+A    RGraph/LICENSE.txt
+A    RGraph/sitemap.xml
+A    RGraph/documents
+A    RGraph/documents/PG-invoice.html
+A    RGraph/entry.html
+A    RGraph/captcha.html
+A    RGraph/favicon.png
+A    RGraph/excanvas
+A    RGraph/excanvas/EXCANVAS-LICENSE.txt
+A    RGraph/excanvas/excanvas.compressed.js
+A    RGraph/excanvas/excanvas.original.js
+A    RGraph/excanvas/.htaccess
+A    RGraph/excanvas/HTACCESS-SAMPLE
+A    RGraph/index.html
+A    RGraph/libraries
+A    RGraph/libraries/RGraph.skeleton.js
+A    RGraph/libraries/RGraph.line.js
+A    RGraph/libraries/RGraph.funnel.js
+A    RGraph/libraries/RGraph.rscatter.js
+A    RGraph/libraries/RGraph.bipolar.js
+A    RGraph/libraries/RGraph.radar.js
+A    RGraph/libraries/RGraph.vprogress.js
+A    RGraph/libraries/RGraph.thermometer.js
+A    RGraph/libraries/RGraph.common.annotate.js
+A    RGraph/libraries/RGraph.led.js
+A    RGraph/libraries/RGraph.common.tooltips.js
+A    RGraph/libraries/RGraph.bar.js
+A    RGraph/libraries/RGraph.scatter.js
+A    RGraph/libraries/RGraph.rose.js
+A    RGraph/libraries/RGraph.common.zoom.js
+A    RGraph/libraries/RGraph.common.context.js
+A    RGraph/libraries/RGraph.hprogress.js
+A    RGraph/libraries/RGraph.hbar.js
+A    RGraph/libraries/RGraph.meter.js
+A    RGraph/libraries/RGraph.modaldialog.js
+A    RGraph/libraries/RGraph.gantt.js
+A    RGraph/libraries/RGraph.pie.js
+A    RGraph/libraries/index.html
+A    RGraph/libraries/.htaccess
+A    RGraph/libraries/RGraph.common.core.js
+A    RGraph/libraries/RGraph.common.adjusting.js
+A    RGraph/libraries/RGraph.common.resizing.js
+A    RGraph/libraries/RGraph.odo.js
+A    RGraph/libraries/RGraph.waterfall.js
+A    RGraph/exchange-rate.html
+A    RGraph/examples
+A    RGraph/examples/meter.html
+A    RGraph/examples/hprogress.html
+A    RGraph/examples/hbar.html
+A    RGraph/examples/showcase.html
+A    RGraph/examples/pie.html
+A    RGraph/examples/gantt.html
+A    RGraph/examples/odo.html
+A    RGraph/examples/basic.html
+A    RGraph/examples/waterfall.html
+A    RGraph/examples/text.html
+A    RGraph/examples/line.html
+A    RGraph/examples/funnel.html
+A    RGraph/examples/rscatter.html
+A    RGraph/examples/bipolar.html
+A    RGraph/examples/radar.html
+A    RGraph/examples/donut.html
+A    RGraph/examples/vprogress.html
+A    RGraph/examples/thermometer.html
+A    RGraph/examples/led.html
+A    RGraph/examples/bar.html
+A    RGraph/examples/scatter.html
+A    RGraph/examples/index.html
+A    RGraph/examples/.htaccess
+A    RGraph/examples/rose.html
+Exported revision 1651.
Index: Dev/branches/Demo/RGraph/docs/resizing.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/resizing.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/resizing.html	(revision 225)
@@ -0,0 +1,155 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Resizing your charts</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            /**
+            * Draw the line chart
+            */
+            var line = new RGraph.Line('myLine', [4,6,3,7,8,4,9,5,6,4,8,5] );
+            line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            line.Set('chart.hmargin', 5);
+            line.Set('chart.title', 'A resizable line chart (tooltips)');
+            line.Set('chart.colors', ['red']);
+            line.Set('chart.resizable', true);
+            line.Set('chart.hmargin', 5);
+            line.Set('chart.shadow', true);
+            line.Set('chart.shadow.blur', 5);
+            line.Set('chart.shadow.offsetx', 1);
+            line.Set('chart.shadow.offsety', 1);
+            line.Set('chart.contextmenu', [['Sample!', function () {alert('A sample item');}]]);
+            line.Set('chart.background.grid.autofit', true);
+            line.Set('chart.background.grid.autofit.numhlines', 10);
+            line.Set('chart.linewidth', 3);
+            //line.Set('chart.tooltips', ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']);
+            line.Draw();
+            
+            RGraph.AddCustomEventListener(line, 'onresizebegin', function (obj) {cl('onresizebegin has fired');});
+            RGraph.AddCustomEventListener(line, 'onresize', function (obj) {cl('onresize has fired');});
+            RGraph.AddCustomEventListener(line, 'onresizeend', function (obj) {cl('onresizeend has fired');});
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Resizing your charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Resizing your charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <canvas id="myLine" width="400" height="200" style="float: left">[No canvas support]</canvas>
+    
+    <p>&nbsp;</p>
+    
+    <p>
+        RGraph has the facility to allow you to resize your charts. This is new as of 10th April 2010. Because of the
+        numerous events it has to install code on, it is unlikely to work with other dynamic features. The context
+        menu does though, and now that tooltips use DOM2 events, so do they. It can be useful if you are,
+        for example, doing a presentation and need to enlarge the chart.
+    </p>
+    
+    <p>
+        All you need to do to enable it is set <i>chart.resizable</i> to true. There are certain caveats that you should be aware of though:
+    </p>
+    
+    <br clear="all" />
+    
+    <ul>
+        <li>
+            Charts can only be enlarged down and to the right, so you will get better results if your chart is not placed at the
+            right of the page.
+        </li>
+        
+        <li>
+            The minimum you can resize your charts to is 50% of the original chart width/height.
+        </li>
+        
+        <li>
+            <b>Note:</b> Resizing can change the layout of your page (reflows). As such you will need to be careful when laying out your
+            page, and you may need to experiment with things like CSS float:, width, height etc so that the effect is either not apparent
+            or is minimal.
+        </li>
+        
+        <li>
+            If your canvas is nested within a table, resizing can result in very minor (1-2px) positioning changes. These
+            can be mitigated by turning off table borders, setting the cellspacing to 0 and also setting the cellpadding to 0.
+        </li>
+    </ul>
+
+    <br /><br /><br />
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/rose.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/rose.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/rose.html	(revision 225)
@@ -0,0 +1,552 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for personal,    |
+        * | charity and educational purposes it is free to use. You can read the full    |
+        * | license here:                                                                |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - rose charts documentation</title>
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Rose charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Rose charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The example file is <a href="../examples/rose.html">here</a>.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [41,37,16,3,3];
+    
+        var rose = new RGraph.Rose('myRose', data);
+        rose.Set('chart.labels', ['MSIE 7 (41%)',
+                                  'MSIE 6 (37%)',
+                                  'Firefox (16%)',
+                                  'Safari (3%)',
+                                  'Other (3%)']);
+        rose.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+        <a name="available.properties"></a>
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+        <li><a href="#available.methods">Methods</a></li>
+        <li><a href="#stacked">Stacked Rose charts</a></li>
+        <li><a href="#non-equi-angular">Non-equi-angular Rose charts</a></li>
+    </ul>
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the Rose chart appears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myRose.Set('name', 'value');</b>
+    </p>
+
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#axis properties">Axis properties</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#misc">Miscellaneous</a></li>
+    </ul>
+
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>
+
+            <a name="chart.colors"></a>
+            <b>chart.colors</b><br />
+            An array of colors to be used by the chart.<br />
+            <i>Default: ['red', 'rgb(0,255,255)', 'rgb(0,255,0)', 'gray', 'blue', 'rgb(255,128,255)','green', 'pink', 'gray', 'aqua']</i><br /><br />
+            
+            <a name="chart.colors.alpha"></a>
+            <b>chart.colors.alpha</b><br />
+            Instead of using <i>rgba()</i>, you can use color definitions such as <i>red</i> along with this setting to add
+            transparency.<br />
+            <i>Default: null</i></i><br /><br />
+            
+            <a name="chart.colors.sequential"></a>
+            <b>chart.colors.sequential</b><br />
+            Because of the new (as of July 2011) support for grouped Rose charts, the way colors are used has changed. So to have them
+            used in a sequential fashion as before the change, you will need to set this option to true.
+            <i>Default: false</i></i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points).<br /> <i>Default: 10</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            The labels, if any, for the chart.<br /><i>Default: none</i><br /><br />
+            <a name="chart.labels.axes"></a>
+<b>chart.labels.axes</b><br />
+            This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West)<br /><i>Default: nsew</i><br /><br />
+            <a name="chart.labels.position"></a>
+<b>chart.labels.position</b><br />
+            This can be either <i>center</i> or <i>edge</i> and determines the position of the labels.<br /><i>Default: center</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the chart. <br /><i>Default: none</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+
+<a name="axis properties"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Axis properties</h3>            <a name="chart.ymax"></a>
+            <b>chart.ymax</b><br />
+            This can be set to control the maximum value of the scale. It's so called to maintain a degree of API compatibility across chart libraries.<br /><i>Default: null</i><br /><br />
+
+<a name="scale"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.tooltips"></a>
+
+            <b>chart.tooltips</b><br />
+            An array of tooltips. You can use HTML if you so wish.<br />
+            <i>Default: [] (An empty array)</i><br /><br />
+            
+            <a name="chart.tooltips.event"></a>
+            <b>chart.tooltips.event</b><br />
+            This is the event that triggers the tooltips. It can be either <i>onclick</i> or <i>onmousemove</i>.<br />
+            <i>Default: onclick</i><br /><br />
+
+            <a name="chart.tooltips.effect"></a>
+            <b>chart.tooltips.effect</b><br />
+            The tooltip effect used. Can be either <i>fade</i> or <i>expand</i>.<br />
+            <i>Default: fade</i><br /><br />
+
+            <a name="chart.tooltips.css.class"></a>
+            <b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br />
+            <i>Default: RGraph_tooltip</i><br /><br />
+
+            <a name="chart.tooltips.override"></a>
+            <b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more
+            information on the <a href="tooltips.html">tooltips documentation page</a><br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.contextmenu"></a>
+            <b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.annotatable"></a>
+            <b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.annotate.color"></a>
+            <b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br />
+            <i>Default: black</i><br /><br />
+
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+
+            <a name="chart.adjustable"></a>
+<b>chart.adjustable</b><br />
+            Defaulting to false, this determines whether your rose chart will be adjustable (click the edge of a segment and drag to adjust it). <br /><i>Default: false</i><br /><br />
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+        <a name="misc"></a>
+        <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+        <a name="chart.variant"></a>
+        <b>chart.variant</b><br />
+        This option can be either <i>stacked</i> (the default) or <i>non-equi-angular</i>. Just because his option is set to
+        <i>stacked</i> does not automatically mean your chart is stacked. If you don't suppy the appropriate data you chart
+        may well appear as a regular Rose chart. Examples of appropriate data:
+        
+        <p>
+            A regular Rose chart
+        </p>
+        
+        <pre class="code">
+myRose = new RGraph.Rose('myCanvas', [8,5,4,8,6,7,2,3,5,8]);
+</pre>
+        
+        <p>
+            A stacked Rose chart
+        </p>
+
+        <pre class="code">
+myRose = new RGraph.Rose('myCanvas', [[2,6],[2,4],[1,5],[4,3],[7,5],[8,3],[4,5],[3,4],[2,6],[4,5]]);
+</pre>
+        
+        <p>
+            A non-equi-angular Rose chart
+        </p>
+        
+        <pre class="code">
+myRose = new RGraph.Rose('myCanvas', [[45,23],[45,23],[5,26],[78,4],[49,12],[49,21],[40,18],[48,12],[43,23],[45,12]]);
+myRose.Set('chart.variant', 'non-equi-angular');
+</pre>
+
+        <p>
+            It is important to note that with a non-equi-angular each "value" is actually an array consisting of two values,
+            as shown. The first value represents the magnitude of the segment (ie how far the segment extends outwards),
+            and the second value represents the size of the segment. The second value is relative to all the other second
+            values - it is not the absolute angle used. The angle is calculated for you.
+        </p>
+
+        <i>Default: stacked</i><br /><br />
+</div>
+
+    <a name="available.methods"></a>
+    <br />&nbsp;<br />
+    <h2>Methods</h2>
+
+    <b>obj.getSegment()</b><br /><br />
+    
+    obj.getSegment() makes it easy to determine which segment of the Rose chart was clicked on. It provides:
+    
+    <ul>
+        <li>Originating X coordinate</li>
+        <li>Originating Y coordinate</li>
+        <li>The starting radius of the segment</li>
+        <li>The ending radius of the segment</li>
+        <li>The starting angle (in degrees)</li>
+        <li>The ending angle (in degrees)</li>
+        <li>The numerical index of the segment</li>
+    </ul>
+
+    <pre class="code">
+&lt;script&gt;
+    RGraph.Register(myGraph);
+    
+    myGraph.canvas.onclick = function (e)
+    {
+        RGraph.FixEventObject(e);
+        RGraph.Redraw();
+
+        var canvas  = e.target;
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        <span style="color: green">var segment = obj.getSegment(e);</span>
+        
+        if (segment) {
+            context.fillStyle = 'rgba(255,255,255,0.5)';
+            context.beginPath();
+                
+                // Angles are provided in degrees, so convert them to radians
+                segment[4] /= 57.29;
+                segment[5] /= 57.29;
+            
+                context.moveTo(segment[0], segment[1]);
+                context.arc(segment[0], segment[1], segment[3], segment[4], segment[5], 0);
+                context.arc(segment[0], segment[1], segment[2], segment[5], segment[4], true);
+            context.stroke();
+            context.fill();
+            
+            e.stopPropagation();
+        }
+    }
+    
+    window.onclick = function (e)
+    {
+        RGraph.Redraw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <b>Important Note</b>
+
+    <p>
+        This method was formerly a common object method, called <i>RGraph.getSegment(e)</i>, but has now (6th March 2011) been
+        moved to be part of the Rose chart object.
+    </p>
+
+    <a name="stacked"></a>
+    <br />&nbsp;<br />
+    <h2>Stacked Rose charts</h2>
+        <p>
+            Rose charts can now be stacked, much like stacked Bar charts. For an example see the <a href="../examples/rose.html">Rose
+            chart example page</a>. The data should be supplied in the same format as a stacked Bar chart:
+        </p>
+        
+        <pre class="code">
+myRose = new RGraph.Rose('myCanvas', [[4,6,2],[8,4,7],[4,3,6],[1,5,6]]);
+</pre>
+
+    <a name="non-equi-angular"></a>
+    <br />&nbsp;<br />
+    <h2>Non-equi-angular Rose charts</h2>
+        <p>
+            Rose charts can be displayed in a <i>non-equi-angular</i> mode. For an example see the
+            <a href="../examples/rose.html">Rose chart example page</a>. Instead of a plain array of values (as with a regular
+            Rose chart), each data point should itself be a two element array consisting of the magnitude value and also a relative
+            circular size. This second value is not the actual degrees used - these are calculated. For example:
+        </p>
+        
+        <pre class="code">
+&lt;script&gt;
+    myRose = new RGraph.Rose('myCanvas', [[47,6],[48,2],[40,4],[43,5],[45,6]]);
+    myRose.Set('chart.variant', 'non-equi-angular');
+    myRose.Draw();
+&lt;/script&gt;
+</pre>
+    
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/rscatter.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/rscatter.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/rscatter.html	(revision 225)
@@ -0,0 +1,345 @@
+<!DOCTYPE html>
+<html> 
+<head> 
+    <meta http-equiv="X-UA-Compatible" content="chrome=1"> 
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    --> 
+    <title>RGraph: Javascript charts and graph library - Radial scatter charts documentation</title> 
+    
+    <meta name="keywords" content="rgraph html5 canvas javascript charts docs radial scatter chart" /> 
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about Radial scatter charts" /> 
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+ 
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" /> 
+    <link rel="icon" type="image/png" href="/favicon.png"> 
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head> 
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb"> 
+        <a href="../index.html">RGraph: Javascript charts and graph library</a> 
+        >
+        <a href="index.html">Documentation</a> 
+        >
+        Radial scatter charts
+    </div> 
+ 
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Radial scatter charts documentation</h1> 
+ 
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script> 
+ 
+    <p> 
+        The Radial scatter chart is, as the name suggests, a circular variant of scatter charts.
+    </p> 
+    
+    <p> 
+        The example file is <a href="../examples/rscatter.html">here</a>.
+    </p> 
+    
+    <pre class="code"> 
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [
+                    [15,53,'red'],
+                    [45,63,null, 'The tooltip'],
+                    [48,45,'green'],
+                    [52,38],
+                    [51,61]
+                   ];
+
+        var rscatter= new RGraph.Rscatter('myCanvas', data);
+        rscatter.Set('chart.labels', ['NE','E','SE','S','SW','W','NW','N']);
+        rscatter.Set('chart.gutter.left', 35);
+        rscatter.Set('chart.gutter.right', 35);
+        rscatter.Draw();
+    }
+&lt;/script&gt;
+</pre> 
+ 
+    <h2>Properties</h2> 
+ 
+    <p> 
+        You can use these properties to control how the chart appears. You can set them by using the Set() method. Eg:
+    </p> 
+    
+    <p> 
+        <b>myRscatter.Set('name', 'value');</b> 
+    </p>
+    
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+    </ul>
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            The labels, if any, for the chart.<br /><i>Default: none</i><br /><br />
+            <a name="chart.labels.axes"></a>
+<b>chart.labels.axes</b><br />
+            This controls the axes that show the scale labels. Each letter stands for the appropriate axis (North, South, East and West)<br /><i>Default: nsew</i><br /><br />
+            <a name="chart.labels.position"></a>
+<b>chart.labels.position</b><br />
+            This can be either <i>center</i> or <i>edge</i> and determines the position of the labels.<br /><i>Default: center</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the chart, if any. <br /><i>Default: null</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+
+
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            <a name="chart.tooltips.event"></a>
+<b>chart.tooltips.event</b><br />
+            This is the event that triggers the tooltips. It can be either <i>onclick</i> or <i>onmousemove</i>.<br /><i>Default: onclick</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+<br /><br />
+
+</body> 
+</html>
Index: Dev/branches/Demo/RGraph/docs/scatter.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/scatter.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/scatter.html	(revision 225)
@@ -0,0 +1,806 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for personal,    |
+        * | charity and educational purposes it is free to use. You can read the full    |
+        * | license here:                                                                |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - scatter charts documentation</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library - Scatter charts documentation" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+    <a name="top"></a>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Scatter charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Scatter charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Scatter charts. Used to represent many data points over a period of time. For example, events occurring in a given year.
+    </p>
+    
+    <p>
+        The example file is <a href="../examples/scatter.html">here</a>.
+    </p>
+    
+    <ul>
+        <li><a href="#properties">Properties</a></li>
+        <li><a href="#methods">Methods</a></li>
+        <li><a href="#boxplots">Box plots</a></li>
+        <li><a href="#labelpoints">Specific points for labels on the X axis</a></li>
+        <li><a href="#custom.tickmarks">Custom tickmarks</a></li>
+        <li><a href="#colors">Note about colors and the key</a></li>
+    </ul>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [
+                    [67,78,null, 'The winner!'], [67,40,'red'], [58,12], [78,56], [365,90], [360,300], [320,150], [15,45],
+                    [16,43], [84,12], [67,89,'green'], [90,23,'green'], [23,80], [80,66], [55,66], [88,12], [43,45], [61,12],
+                    [15,89], [13,16]
+                   ];
+        var sg = new RGraph.Scatter('myScatter', data);
+        sg.Set('chart.background.barcolor1','rgba(255,255,255,1)');
+        sg.Set('chart.background.barcolor2', 'rgba(255,255,255,1)');
+        sg.Set('chart.grid.color', 'rgba(238,238,238,1)');
+        sg.Set('chart.gutter.left', 30);
+        sg.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        sg.Set('chart.xmax', 365); // Important!
+        sg.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <p>
+        As you can see each mark on the Scatter chart is made by supplying an array of up to 4 elements:
+    </p>
+    
+    <ul>
+        <li>The X value (required)</li>
+        <li>The Y value (required)</li>
+        <li>The color (optional)</li>
+        <li>The tooltip for this mark (optional)</li>
+    </ul>
+    
+    <p>
+        If you wish to specify a tooltip, but not a color (ie use the default color instead), you can pass null instead of a color.
+    </p>
+
+
+    <a name="properties"></a>
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the Scatter apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myScatter.Set('chart.xmax', 365);</b>
+    </p>
+    
+    <ul>
+        <li><a href="#background">Background</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#axis properties">Axis properties</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#line properties">Line properties</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+
+<a name="background"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Background</h3>            <a name="chart.background.barcolor1"></a>
+<b>chart.background.barcolor1</b><br />
+            The color of the background bars. <br /><i>Default: rgba(0,0,0,0)</i><br /><br />
+            <a name="chart.background.barcolor2"></a>
+<b>chart.background.barcolor2</b><br />
+            The color of the background bars. <br /><i>Default: rgba(0,0,0,0)</i><br /><br />
+            <a name="chart.background.grid"></a>
+<b>chart.background.grid</b><br />
+            Whether to show the background grid or not. <br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.color"></a>
+<b>chart.background.grid.color</b><br />
+            The color of the background grid. <br /><i>Default: #eee</i><br /><br />
+            
+            <a name="chart.background.hbars"></a>
+            <b>chart.background.hbars</b><br />
+            An array of information stipulating horizontal coloured bars. You can use these to indicate limits. Eg: 
+            
+            <pre class="code">myScatter.Set('chart.background.hbars', [[75, 10, 'yellow'], [85, 15, 'red']]);</pre>
+            
+            This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the
+            starting point and the height.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.background.vbars</b><br />
+            An array of vertical bar information. They're specified like his:
+            <pre class="code">myScatter.Set('chart.background.vbars', [[0, 181, 'rgba(0,255,0,0.5)']]);</pre>           
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.background.grid.border"></a>
+<b>chart.background.grid.border</b><br />
+            Determines whether a border line is drawn around the grid.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.hlines"></a>
+<b>chart.background.grid.hlines</b><br />
+            Determines whether to draw the horizontal grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.vlines"></a>
+<b>chart.background.grid.vlines</b><br />
+            Determines whether to draw the vertical grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.autofit"></a>
+<b>chart.background.grid.autofit</b><br />
+            Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want.<br /><i>Default: false</i><br /><br />
+            <a name="chart.background.grid.autofit.numhlines"></a>
+<b>chart.background.grid.autofit.numhlines</b><br />
+            When using autofit this allows you to specify how many horizontal grid lines you want. <br /><i>Default: 7</i><br /><br />
+            
+            <a name="chart.background.grid.autofit.numvlines"></a>
+            <b>chart.background.grid.autofit.numvlines</b><br />
+            When using autofit this allows you to specify how many vertical grid lines you want. <br />
+            <i>Default: 20</i><br /><br />
+
+            <a name="chart.background.grid.autofit.align"></a>
+            <b>chart.background.grid.autofit.align</b><br />
+            If you want to have your grid lines line up with the labels (both X and Y axes), you can set this to true and RGraph will
+            attempt to make the grid lines line up. If you have a <i>chart.hmargin</i> set then the alignment will be thrown out.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.background.image"></a>
+            <b>chart.background.image</b><br />
+            If you want to specify a background image to use on your chart, specify it with this property.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>
+    
+    <a name="chart.labels"></a>
+    <b>chart.labels</b><br />
+    An array of the X labels for the chart. <br />
+    <i>Default: [] (An empty array)</i><br /><br />
+    
+    <a name="chart.labels.above"></a>
+    <b>chart.labels.above</b><br />
+    If true this will show the values of the points above them.<br />
+    <i>Default: false</i><br /><br />
+    
+    <a name="chart.labels.above.size"></a>
+    <b>chart.labels.above.size</b><br />
+    If you're showing the labels above the points, this controls their size.<br />
+    <i>Default: 8</i><br /><br />
+    
+    <a name="chart.labels.avove.decimals"></a>
+    <b>chart.labels.above.decimals</b><br />
+    If your points have lots of decimals, you use this option to curtail them.<br />
+    <i>Default: 0</i><br /><br />
+    
+    <a name="chart.ylabels"></a>
+<b>chart.ylabels</b><br />
+            A boolean (<i>true</i> or <i>false</i>) that controls whether the chart has Y labels. <br /><i>Default: true</i><br /><br />
+            
+            <a name="chart.ylabels.count"></a>
+            <b>chart.ylabels.count</b><br />
+            A value (<i>1, 3, 5 or 10</i>) that controls how many Y labels there are. <br />
+            <i>Default: 5</i><br /><br />
+            
+            <a name="chart.ylabels.invert"></a>
+            <b>chart.ylabels.invert</b><br />
+            Reverses the Y axis so that 0 is at the top, instead of the bottom.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.ylabels.specific"></a>
+            <b>chart.ylabels.specific</b><br />
+            You can use this option to give your own Y labels (eg ['Low', 'Medium', 'High'].<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            
+            <a name="chart.text.color"></a>
+            <b>chart.text.color</b><br />
+            The color of the labels. <br />
+            <i>Default: black</i><br /><br />
+            
+            <a name="chart.text.size"></a>
+            <b>chart.text.size</b><br />
+            The size of the text (in points).<br />
+            <i>Default: 10</i><br /><br />
+
+            <a name="chart.text.angle"></a>
+            <b>chart.text.angle</b><br />
+            The angle of the horizontal text labels (at the bottom of the chart). This can be from 0-90 (degrees)<br />
+            <i>Default: 0 (Horizontal)</i><br /><br />
+
+            <a name="chart.labels.specific.align"></a>
+            <b>chart.labels.specific.align</b><br />
+            If you are using specific points for X labels, by default the labels are left aligned within its section. With this setting
+            you can center the labels within its section.<br />
+            <i>Default: left</i><br /><br />
+<!--
+            <a name="chart.text.halign"></a>
+            <b>chart.text.halign</b><br />
+            This only affects X labels when you're using specific X points, and controls the alignment in the labels
+            individual "section".<br />
+            <i>Default: left</i><br /><br />
+-->
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="axis properties"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Axis properties</h3>            <a name="chart.xmax"></a>
+<b>chart.xmax</b><br />
+            The maximum X axis value you wish to set. For example if you're displaying products sold in a year, you might use 365. <br /><i>Default: none - must be supplied</i><br /><br />
+            <a name="chart.ymax"></a>
+<b>chart.ymax</b><br />
+            The optional maximum Y scale value. If not specified then it will be calculated.<br /><i>Default: null (It's calculated)</i><br /><br />
+            <a name="chart.ymin"></a>
+<b>chart.ymin</b><br />
+            The optional minimum Y scale value. If not specified it will be zero.<br /><i>Default: null</i><br /><br />
+            <a name="chart.ticksize"></a>
+<b>chart.ticksize</b><br />
+            The size of the tickmarks. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.tickmarks"></a>
+<b>chart.tickmarks</b><br />
+            The style of the tickmarks. Can be: <i>cross</i>, <i>plus</i>, <i>circle</i>, <i>diamond</i>, <i>square</i> or <i>null</i> (no tickmarks). <br /><i>Default: cross</i><br /><br />
+            <a name="chart.xticks"></a>
+<b>chart.xticks</b><br />
+            This controls whether the X axis tickmarks are drawn.<br /><i>Default: true</i><br /><br />
+            <a name="chart.xaxispos"></a>
+<b>chart.noendxtick</b><br />
+            Whether to draw an end X tick. Usually used when combining Scatter charts<br /><i>Default: false</i><br /><br />
+            <a name="chart.xaxispos"></a>
+<b>chart.xaxis</b><br />
+            This controls whether the X axis is drawn.<br /><i>Default: true</i><br /><br />
+            <a name="chart.xaxispos"></a>
+<b>chart.xaxispos</b><br />
+            Where the X axis should be drawn. Can be either <i>center</i> or <i>bottom</i>.<br /><i>Default: bottom</i><br /><br />
+            <a name="chart.yaxispos"></a>
+<b>chart.yaxispos</b><br />
+            Where the Y axis should be drawn. Can be either <i>left</i> or <i>right</i>.<br /><i>Default: left</i><br /><br />
+            <a name="chart.axis.color"></a>
+<b>chart.axis.color</b><br />
+            The color of the axes.<br /><i>Default: black</i><br /><br />
+            <a name="chart.noaxes"></a>
+<b>chart.noaxes</b><br />
+            If this is set to true, no axes will be drawn. <br /><i>Default: false</i><br /><br />
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the scatter chart. <br /><i>Default: none</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.xaxis"></a>
+<b>chart.title.xaxis</b><br />
+            This allows to specify a title for the X axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.yaxis"></a>
+<b>chart.title.yaxis</b><br />
+            This allows to specify a title for the Y axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.xaxis.pos"></a>
+<b>chart.title.xaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the X axis title.<br /><i>Default: 0.25</i><br /><br />
+            <a name="chart.title.yaxis.pos"></a>
+<b>chart.title.yaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the Y axis title.<br /><i>Default: 0.25</i><br /><br />
+
+            <a name="chart.title.yaxis.position"></a>
+            <b>chart.title.yaxis.position</b><br />
+            Instead of using the option above you can instead use this option, specifying <i>left</i> or <i>right</i>.<br />
+            <i>Default: left</i><br /><br />
+
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+
+<a name="chart.scale.formatter"></a>
+            <b>chart.scale.formatter</b><br />
+            To allow thoroughly custom formats of numbers in the scale, you can use this option to
+            specify a function that is used by RGraph to format numbers. This function should
+            handle ALL of the formatting. Eg:<br /><br />
+            <pre class="code">
+function myFormatter(obj, num)
+{
+    return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+</pre>
+            <br /><i>Default: null</i><br /><br />
+
+<a name="chart.scale.decimals"></a>
+<b>chart.scale.decimals</b><br />
+            The number of decimal places to display for the Y scale.<br /><i>Default: 0</i><br /><br />
+            <a name="chart.scale.point"></a>
+<b>chart.scale.point</b><br />
+            The character used as the decimal point.<br /><i>Default: .</i><br /><br />
+            <a name="chart.scale.thousand"></a>
+<b>chart.scale.thousand</b><br />
+            The character used as the thousand separator<br /><i>Default: ,</i><br /><br />
+
+            <a name="chart.scale.round"></a>
+            <b>chart.scale.round</b><br />
+            Whether to round the maximum scale value up or not. This will produce slightly better scales in some instances.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.units.pre"></a>
+<b>chart.units.pre</b><br />
+            The units (if any) that the Y axis is measured in (these are preppended to the number).<br /><i>Default: none</i><br /><br />
+            <a name="chart.units.post"></a>
+<b>chart.units.post</b><br />
+            The units (if any) that the Y axis is measured in (these are appended to the number).<br /><i>Default: none</i><br /><br />
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+
+    <p style="background-color: #ffe; padding: 3px; border: 1px black solid; border-radius: 5px">
+        <b>Note:</b> Unlike other charts, the Scatter chart tooltips are specified as part of the data array. See <a href="#top">above</a>.
+    </p>
+
+    <a name="chart.tooltips.effect"></a>
+    <b>chart.tooltips.effect</b><br />
+    The animated effect used for showing tooltips.<br />
+    <i>Default: fade</i><br /><br />
+    
+            <a name="chart.tooltips.hotspot"></a>
+            <b>chart.tooltips.hotspot</b><br />
+            This controls the size of the hotspot on the chart for tooltips.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+            
+            <a name="chart.tooltips.highlight"></a>
+            <b>chart.tooltips.highlight</b><br />
+            This controls whether points are highlighted when a tooltip is shown. If you're combining the Scatter with another chart
+            you may need to set this to <i>false</i>.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.tooltips.css.class"></a>
+            <b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            
+            <a name="chart.tooltips.override"></a>
+            <b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more
+            information on the <a href="tooltips.html">tooltips documentation page</a><br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.crosshairs"></a>
+<b>chart.crosshairs</b><br />
+            If true, you will get a crosshair centering on the current mouse position.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.linewidth"></a>
+<b>chart.crosshairs.linewidth</b><br />
+            This controls the linewidth of the crosshairs.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.crosshairs.color"></a>
+<b>chart.crosshairs.color</b><br />
+            The color of the crosshairs.<br /><i>Default: #333</i><br /><br />
+            <a name="chart.crosshairs.coords"></a>
+<b>chart.crosshairs.coords</b><br />
+            If true, this will show the coordinates that the crosshairs are currently over.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.fixed"></a>
+<b>chart.crosshairs.fixed</b><br />
+            If true, this makes the coordinates static (attached), instead of following the pointer around.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.fadeout"></a>
+<b>chart.crosshairs.fadeout</b><br />
+            If true, when you move your mouse off of the canvas the coordinates will fade out.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.labels.x"></a>
+<b>chart.crosshairs.labels.x</b><br />
+            Instead ox X and Y, you can specify more meaningful labels.<br /><i>Default: X</i><br /><br />
+            <a name="chart.crosshairs.labels.y"></a>
+<b>chart.crosshairs.labels.y</b><br />
+            Instead ox X and Y, you can specify more meaningful labels.<br /><i>Default: Y</i><br /><br />
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: null</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: #000</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="line properties"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Line properties</h3>            <a name="chart.line"></a>
+<b>chart.line</b><br />
+            Whether to show a connecting line (like in the sixth example). <br /><i>Default: false</i><br /><br />
+            <a name="chart.line.colors"></a>
+<b>chart.line.colors</b><br />
+            The colors of the lines connecting the tick marks. <br /><i>Default: ['green', 'red']</i><br /><br />
+            <a name="chart.line.shadow.color"></a>
+<b>chart.line.shadow.color</b><br />
+            The color of the lines shadow (if any). <br /><i>Default: rgba(0,0,0,0) (invisible)</i><br /><br />
+            <a name="chart.line.shadow.offsetx"></a>
+<b>chart.line.shadow.offsetx</b><br />
+            The X offset of the lines shadow. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.line.shadow.offsety"></a>
+<b>chart.line.shadow.offsety</b><br />
+            The Y offset of the lines shadow. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.line.shadow.blur"></a>
+<b>chart.line.shadow.blur</b><br />
+            The severity of the line shadows blurring effect. <br /><i>Default: 2</i><br /><br />
+            <a name="chart.line.stepped"></a>
+<b>chart.line.stepped</b><br />
+            Like the line chart, Scatter chart lines can be stepped by setting this to true <br /><i>Default: false</i><br /><br />
+
+
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: false</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+
+
+
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+<a name="miscellaneous"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>            <a name="chart.defaultcolor"></a>
+<b>chart.defaultcolor</b><br />
+            This is the default color of tick marks, which is used if a color isn't given.<br /><i>Default: #000</i><br /><br />
+            <a name="chart.boxplot.width"></a>
+<b>chart.boxplot.width</b><br />
+            This stipulates the default width of boxes. For more on boxplots, see <a href="#boxplots">here</a>.<br /><i>Default: 8</i><br /><br />
+</div><!-- /DOCS --><br /><br />
+
+    <a name="methods"></a>
+    <h2>Methods</h2>
+    
+    <b>obj.getPoint(e)</b>
+    
+    <p>
+        This method makes it easier to get hold of which point on the Scatter chart has been hovered over. It returns an array of:
+    </p>
+    
+    <ul>
+        <li>The X coordinate of the point</li>
+        <li>The Y coordinate of the point</li>
+        <li>The data set. This corresponds to the appropriate dataset (since mutiple datasets can be given to the constructor)</li>
+        <li>The index of the appropriate data point in the set</li>
+        <li>The tooltip (if any) for that particular point</li>
+    </ul>
+    
+    (If the return value is null, then no point is being hovered over.) An example usage is:
+    
+    <pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;
+
+&lt;canvas id="cvs" width="600" height="250" style="border: 1px gray dashed"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script&gt;
+    scatter = new RGraph.Scatter('cvs', [[5,1, 'red', 'A'],[4,2,, 'B'],[3,9,,'C'],[10,12,,'D'],[300,2,,'E']],
+                                        [[5,6, 'red', 'F'],[2,9,,'G'],[13,19,,'H'],[18,17,,'I'],[340,12,,'J']]);
+    scatter.Set('chart.xmax', 365);
+    scatter.Set('chart.line', true);
+    scatter.Set('chart.labels', ['Q1', 'Q2', 'Q3', 'Q4']);
+    scatter.Draw();
+
+    scatter.canvas.onmousemove = function (e)
+    {
+        var canvas  = e.target;
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        var point   = obj.getPoint(e);
+
+        if (point) {
+            p('\r\nX Coordinate: ' + point[0] + '\r\n' +
+              'Y Coordinate: ' + point[1] + '\r\n' +
+              'Dataset: ' + point[2] + '\r\n' +
+              'Datapoint: ' + point[3] + '\r\n' +
+              'Tooltip: ' + point[4] + '\r\n');
+        }
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="boxplots"></a>
+    <h2>Box plots</h2>
+    
+    <p>
+        Instead of a single Y value, you have the ability to specify an array of 5, 6, 7 or 8 values, which will be used to make a box plot.
+        The <a href="../examples/scatter.html#boxplots">example page shows a box plot</a>. These values are (in order):
+
+        <ul>
+            <li>Lower whisker</li>
+            <li>Bottom of box</li>
+            <li>Middle value (which isn't necessarily in the center of the box - this depends on your data)</li>
+            <li>Top of box</li>
+            <li>Upper whisker</li>
+            <li>Upper color (optional)</li>
+            <li>Lower color (optional)</li>
+            <li>Width (optional)</li>
+        </ul>
+
+        <pre class="code">
+&lt;script&gt;
+    scatter8 = new RGraph.Scatter('scatter8', [
+                                               [10,<span style="color: green">[1,1,16,24,24, 'red', 'green']</span>],
+                                               [105,<span style="color: green">[5,10,15,25,25, 'red', 'green']</span>],
+                                               [125,<span style="color: green">[10,15,25,35,45, 'red', 'green']</span>],
+                                               [325,<span style="color: green">[10,15,25,35,45, 'red', 'green', 30]</span>]
+                                              ]);
+    scatter8.Set('chart.title', 'An example of a boxplot');
+    scatter8.Set('chart.labels', ['Q1', 'Q2', 'Q3', 'Q4']);
+    scatter8.Set('chart.xmax', 365);
+    scatter8.Set('chart.ymax', 50);
+    scatter8.Set('chart.boxplot.width', 12); // The default width
+    scatter8.Draw();
+&lt;/script&gt;
+</pre>
+    </p>
+
+
+    <a name="labelpoints"></a>
+    <h2>Specific points for labels on the X axis</h2>
+    
+    <p>
+        Instead of a simple string which is used as the label, each entry of the chart.labels array can be a two element array
+        consisting of the label, and the X value that the label should be placed at. For example:
+    </p>
+
+    <pre class="code">
+scatter.Set('chart.labels', [
+                             ['Quarter 1', 0],
+                             ['Quarter 2', 90],
+                             ['Quarter 3', 181],
+                             ['Quarter 4', 273]
+                            ]);
+</pre>
+
+
+
+    <a name="custom.tickmarks"></a>
+    <h2>Custom tickmarks</h2>
+
+    <p>
+        If none of the available tickmark styles are suitable, you can instead specify a function object that draws the tickmark,
+        enabling you to draw the tickmark yourself. For example:
+    </p>
+
+    <pre class="code">
+&lt;script&gt;
+    line.Set('chart.tickmarks', myTick);
+
+    /**
+    * The function that is called once per tickmark, to draw it
+    * 
+    * @param object obj   The chart object
+    * @param object data  The chart data
+    * @param number x     The X coordinate
+    * @param number y     The Y coordinate
+    * @param number xVal  The X value
+    * @param number yVal  The Y value
+    * @param number xMax  The maximum X scale value
+    * @param number xMax  The maximum Y scale value
+    * @param string color The color of the tickmark
+    */
+    function myTick (obj, data, x, y, xVal, yVal, xMax, yMax, color)
+    {
+        // Draw your custom tick here
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="colors"></a>
+    <h2>Note about colors and the key</h2>
+    
+    <p>
+        If you're using a key you may need to set <i>chart.line.colors</i> to allow it to use the correct colors. For example:
+    </p>
+    
+    <pre class="code">myObj.Set('chart.line.colors', ['red','green','blue']);</pre>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/setconfig.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/setconfig.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/setconfig.html	(revision 225)
@@ -0,0 +1,140 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - The RGraph.SetConfig() function</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs setconfig" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - The RGraph.SetConfig() function" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        The RGraph.SetConfig() function
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - The RGraph.SetConfig() function</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+
+    <div style="text-align: center; float: right; font-family: Verdana">
+        <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
+    </div>
+
+    <script>
+        window.onload = function ()
+        {
+            var config = {
+                          'chart.colors':                   ['red', 'green'],
+                          'chart.labels':                   ['John','Fred','June','Charles','Lou', 'Olga'],
+                          'chart.title.yaxis':               'Amount',
+                          'chart.title.yaxis.pos':           -0.2,
+                          'chart.title.xaxis':               'Person',
+                          'chart.background.grid.autofit':  true,
+                          'chart.strokestyle': 'rgba(0,0,0,0)',
+                          'chart.title': 'A chart showing RGraph.SetConfig()'
+                         }
+            var bar = new RGraph.Bar('cvs', [48,56,52,49,43,51]);
+            RGraph.SetConfig(bar, config);
+            bar.Draw();
+        }
+    </script>
+    
+    <p>
+        Instead of using a number of .Set() calls, you may find that using the <i>RGraph.SetConfig()</i> method more to your tastes. The
+        method is an alternative to setting the configuration of your chart. It doesn't offer any speed benefits, but it can facilitate reuse better, so that the
+        appearance  of your websites charts is the same. There's an example of its use below:
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        /**
+        * This configuration could be stored in a central configuration file, making its reuse easier. You could also have
+        * several different configurations that you pick and choose from depending on the requirements. Values in
+        * subsequent calls to .SetConfig() will overwrite previous ones.
+        */
+        var config = {
+                      'chart.colors':                  ['red', 'green'],
+                      'chart.labels':                  ['John','Fred','June','Charles','Lou', 'Olga'],
+                      'chart.title.yaxis':             'Amount',
+                      'chart.title.yaxis.pos':         -0.2,
+                      'chart.title.xaxis':             'Person',
+                      'chart.background.grid.autofit': true,
+                      'chart.title': 'A chart showing RGraph.SetConfig()'
+                     }
+        var bar = new RGraph.Bar('cvs', [48,56,52,49,43,51]);
+        RGraph.SetConfig(bar, config);
+        bar.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/thermometer.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/thermometer.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/thermometer.html	(revision 225)
@@ -0,0 +1,262 @@
+<!DOCTYPE html>
+<html> 
+<head> 
+    <meta http-equiv="X-UA-Compatible" content="chrome=1"> 
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    --> 
+    <title>RGraph: Javascript charts and graph library - thermometer documentation</title> 
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs thermometer chart" /> 
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Thermometer charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+ 
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" /> 
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head> 
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb"> 
+        <a href="../index.html">RGraph: Javascript charts and graph library</a> 
+        >
+        <a href="index.html">Documentation</a> 
+        >
+        Thermometer charts
+    </div> 
+ 
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Thermometer charts documentation</h1> 
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+ 
+    <p> 
+        Thermometer charts, along with progress bars, are a prime candidate for use in a status panel. Much like the progress bars,
+        but the design may be better suited to your application/website etc.
+    </p> 
+    
+    <p> 
+        The example file is <a href="../examples/thermometer.html">here</a>.
+    </p> 
+
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+    </ul>
+
+    <pre class="code"> 
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var thermometer = new RGraph.Thermometer('myCanvas', data);
+        thermometer.Set('chart.gutter.left', 45);
+        thermometer.Set('chart.gutter.right', 45);
+        thermometer.Set('chart.colors', ['rgba(255,0,0,1)']);
+        thermometer.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="available.properties"></a>
+    <h2>Properties</h2>
+ 
+    <p> 
+        You can use these properties to control how the chart apears. You can set them by using the Set() method. Eg:
+    </p> 
+    
+    <p> 
+        <b>myBar.Set('name', 'value');</b> 
+    </p>
+    
+    <ul>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#labels">Labels and text</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#interactive">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+    </ul>
+
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 15</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 15</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 15</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 15</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>
+            
+            <a name="chart.colors"></a>
+            <b>chart.colors</b><br />
+            An array of the colors of the actual bars. <br />
+            <i>Default: An array - ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0']</i><br /><br />
+
+
+<a name="labels"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>
+
+        <a name="chart.value.label"></a>
+        <b>chart.value.label</b><br />
+        This controls whether the Thermometers value is shown in text.<br />
+        <i>Default: true</i><br /><br />
+
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>
+
+            <a name="chart.shadow"></a>
+            <b>chart.shadow</b><br />
+            Whether a drop shadow is applied. <br /><i>Default: true</i><br /><br />
+            
+            <a name="chart.shadow.color"></a>
+            <b>chart.shadow.color</b><br />
+            The color of the shadow. <br /><i>Default: gray</i><br /><br />
+            
+            <a name="chart.shadow.offsetx"></a>
+            <b>chart.shadow.offsetx</b><br />
+            The X offset of the shadow. <br /><i>Default: 0</i><br /><br />
+            
+            <a name="chart.shadow.offsety"></a>
+            <b>chart.shadow.offsety</b><br />
+            The Y offset of the shadow.  <br /><i>Default: 0</i><br /><br />
+            
+            <a name="chart.shadow.blur"></a>
+            <b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect. <br /><i>Default: 15</i><br /><br />
+
+<a name="interactive"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>
+
+            <a name="chart.adjustable"></a>
+            <b>chart.adjustable</b><br />
+            Defaulting to false, this determines whether your bar chart will be adjustable.<br />
+            <i>Default: false</i><br /><br />
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>
+
+            <a name="chart.zoom.mode"></a>
+            <b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br />
+            <i>Default: canvas</i><br /><br />
+            
+            <a name="chart.zoom.factor"></a>
+            <b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br />
+            <i>Default: 1.5</i><br /><br />
+
+            <a name="chart.zoom.fade.in"></a>
+            <b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br />
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.zoom.fade.out"></a>
+            <b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br />
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.zoom.hdir"></a>
+            <b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br />
+            <i>Default: right</i><br /><br />
+
+            <a name="chart.zoom.vdir"></a>
+            <b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br />
+            <i>Default: down</i><br /><br />
+
+            <a name="chart.zoom.delay"></a>
+            <b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br />
+            <i>Default: 50</i><br /><br />
+
+            <a name="chart.zoom.frames"></a>
+            <b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br />
+            <i>Default: 10</i><br /><br />
+
+            <a name="chart.zoom.shadow"></a>
+            <b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br />
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.zoom.thumbnail.width"></a>
+            <b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br />
+            <i>Default: 75</i><br /><br />
+
+            <a name="chart.zoom.thumbnail.height"></a>
+            <b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br />
+            <i>Default: 75</i><br /><br />
+
+            <a name="chart.zoom.background"></a>
+            <b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br />
+            <i>Default: true</i><br /><br />
+
+</div>
+    
+    
+</body> 
+</html>
Index: Dev/branches/Demo/RGraph/docs/tooltips.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/tooltips.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/tooltips.html	(revision 225)
@@ -0,0 +1,524 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Tooltips</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A chart library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.common.tooltips.js"></script>
+    <script src="../libraries/RGraph.line.js"></script>
+    <script src="../libraries/RGraph.bar.js"></script>
+    <script src="../libraries/RGraph.pie.js"></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <style>
+        .bar_chart_tooltips_css {
+            background-color: white ! important;
+            border: 2px solid black ! important;
+            padding: 3px;
+            padding-top: 5px ! important;
+            font-size: 14pt ! important;
+            text-align: center;
+            -webkit-box-shadow: 0 0 15px gray ! important;
+            -moz-box-shadow: 0 0 15px gray ! important;
+            box-shadow: 0 0 15px gray ! important;
+        }
+    </style>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Tooltips
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Tooltips</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div style="float: right; text-align: right">
+        <canvas width="600" height="250" id="cvs">[No canvas support]</canvas><br />
+        Tooltip effect:
+        <select id="effect" onchange="RGraph.Clear(line.canvas); line.Set('chart.tooltips.effect', this.options[this.selectedIndex].value); line.Draw();">
+            <option>none</option>
+            <option selected>fade</option>
+            <option>expand</option>
+            <option>contract</option>
+            <option>snap</option>
+        </select>
+    </div>
+
+    <script>
+        /**
+        * This is the function which handles the display of all the tooltips (for the line chart) - it is passed the
+        * zero-indexed number of the tooltip. Here, that index is just used to get the text from an array, but you
+        * could do anything with it. You could even perform an AJAX request to get the tooltip. Note that at this
+        * point, ie when the text is being retrieved, the tooltip DIV doesn't exist yet.
+        */
+        function myTooltipFunc (idx)
+        {
+            var tooltips = ['<b>Winner!</b><br />John','Fred','Jane','Lou','Pete','Kev'];
+            return tooltips[idx];
+        }
+
+
+        window.onload = function ()
+        {
+            // Has to be a global variable
+            line = new RGraph.Line('cvs', [64,34,26,35,51,24]);
+            
+            /**
+            * These lines show you some of the alternative methods  of specifying tooltips:
+            * 
+            *  o An array of strings - one per tooltip
+            *  o An array of functions - one per tooltip
+            *  o A single function that handles all of the tooltips
+            * o An "id:xxx" string (xxx being the ID tag of a div whose contents are used as the tooltip)
+            * 
+            * Functions are passed a single argument - the zero-indexed number of the tooltip
+            */
+            //line.Set('chart.tooltips', ['John', 'Fred', 'Jane', 'Lou', 'Pete', 'Kev']);
+            //line.Set('chart.tooltips', [myTooltipFunc, myTooltipFunc, myTooltipFunc, myTooltipFunc, myTooltipFunc, myTooltipFunc]);
+            line.Set('chart.tooltips', myTooltipFunc);
+            line.Set('chart.tooltips.effect', 'fade');
+            line.Set('chart.hmargin', 10);
+            line.Set('chart.linewidth', 2);
+            line.Set('chart.shadow', true);
+            line.Set('chart.shadow.offsetx', 0);
+            line.Set('chart.shadow.offsety', 0);
+            line.Set('chart.shadow.blur', 15);
+            line.Set('chart.colors', ['green']);
+            line.Set('chart.tickmarks', 'circle');
+            line.Set('chart.labels', ['John', 'Fred', 'Jane', 'Lou', 'Pete', 'Kev']);
+            line.Draw();
+
+
+            /* -------------------------------------------------------------------------------------------------------- */
+
+
+            /**
+            * Create and display the bar chart
+            */
+            bar = new RGraph.Bar('cvs2', [41.2,51.3,64.2,42.1,32.2,43.2,45.8,45.1,61.1]);
+            
+            var grad = bar.context.createLinearGradient(0,25,0,225);
+            grad.addColorStop(0, 'blue');
+            grad.addColorStop(1, 'white');
+
+            bar.Set('chart.hmargin', 15);
+            bar.Set('chart.colors', [grad]);
+            bar.Set('chart.linewidth', 2);
+            bar.Set('chart.tickmarks', 'endsquare');
+            bar.Set('chart.labels', ['John', 'Pete', 'Glynn', 'Kev', 'Youssef', 'Lou', 'Kiff', 'Liz', 'Fred']);
+            bar.Set('chart.background.grid.autofit', true);
+            bar.Set('chart.strokecolor', 'rgba(0,0,0,0)');
+            bar.Set('chart.tooltips', getTooltip); // The getTooltip() function (defined below) provides the tooltip text ONLY
+            bar.Set('chart.tooltips.css.class', 'bar_chart_tooltips_css');
+            bar.Set('chart.tooltips.effect', 'fade');
+            bar.Draw();
+            
+            /**
+            * This installs the RGraph ontooltip event handler. The CreateTooltipGraph() function is defined below
+            */
+            RGraph.AddCustomEventListener(bar, 'ontooltip', CreateTooltipGraph);
+        }
+
+
+        /*
+        * Used by the bar chart to get the tooltip text.
+        * 
+        * @param idx int The zero indexed number of the tooltip
+        */
+        function getTooltip(idx)
+        {
+            return '<b>' + bar.Get('chart.labels')[idx] + 's stats</b><br /><canvas id="__tooltip_canvas__" width="400" height="150" style="background-color: white; margin: 5px">[No canvas support</canvas>';
+        }
+
+
+        /**
+        * This is the function that is called (by the ontooltip event) to create the tooltip charts
+        * 
+        * @param obj object   The chart object
+        */
+        function CreateTooltipGraph(obj)
+        {
+            // These are the statistics that are shown in the tooltips. This data could quite easily
+            // come from your server.
+            var stats = [
+                         [5,8,7,6,9,5,4,6,3,5,4,4],
+                         [4,6,7,8,6,5,4,4,2,5,8,4],
+                         [3,2,1,3,4,5,1,5,6,7,4,1],
+                         [3,5,1,2,4,8,9,6,7,4,5,1],
+                         [9,6,7,8,7,9,4,5,6,3,5,8],
+                         [4,8,5,6,4,3,5,4,6,5,7,8],
+                         [4,3,4,9,8,7,8,6,4,3,5,1],
+                         [1,2,3,1,2,4,5,1,6,5,3,1],
+                         [2,3,5,4,3,5,1,3,5,2,6,4]
+                        ];
+
+            var idx  = RGraph.Registry.Get('chart.tooltip').__index__;
+            var data = stats[idx];
+
+            // This data could be dynamic
+            var g  = new RGraph.Line('__tooltip_canvas__', data);
+            g.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            g.Set('chart.gutter.top', 5);
+            g.Set('chart.hmargin', 5);
+            g.Set('chart.tickmarks', 'endcircle');
+            g.Set('chart.background.grid.autofit', true);
+            g.Draw();
+        }
+
+
+    </script>
+
+    <ul>
+        <li><a href="#introduction">Introduction</a></li>
+        <li><a href="#hold">What can they hold?</a></li>
+        <li><a href="#how">How can I specify them?</a></li>
+        <li><a href="#what">What can I specify?</a></li>
+        <li><a href="#charts">Can I show charts in tooltips?</a></li>
+        <li><a href="#customise">Can I customise the appearance of tooltips?</a></li>
+        <li><a href="#effects">What tooltip effects are available?</a></li>
+        <li><a href="#firefox">Tooltips, the clipboard and Firefox</a></li>
+        <li><a href="#override">Can I override the tooltip function?</a></li>
+    </ul>
+
+    <a name="introduction"></a>
+    <h4>Introduction</h4>
+
+    <p>
+        Tooltips are a very effective and straight forward way to extend your charts and add more information to them, without overloading
+        the user.
+    </p>
+    
+    <a name="hold"></a>
+    <h4>What can they hold?</h4>
+    
+    <p>
+        At the base level, tooltips are DIVs, so they can hold a multitude of HTML - images, videos etc. See <a href="#charts">below</a>
+        for information on showing charts in tooltips.
+    </p>
+
+    <a name="how"></a>
+    <h4>How can I specify them?</h4>
+    
+    <p>
+        You can specify them by including the tooltips code and then using the <i>chart.tooltips</i> property. For example:
+    </p>
+    
+    <ol>
+        <li>
+            Include the RGraph libraries.
+            <pre class="code">
+&lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.common.tooltips.js"&gt;&lt;/script&gt;
+&lt;script src="RGraph.line.js"&gt;&lt;/script&gt;
+</pre>
+        </li>
+        
+        <li>
+            Define your chart and set the tooltips property.
+            <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var line = new RGraph.Line('cvs', [64,34,26,35,51,24]);
+        <span style="color: green">line.Set('chart.tooltips', ['&lt;b&gt;Winner!&lt;/b&gt;&lt;br /&gt;John', 'Fred', 'Jane', 'Lou', 'Pete', 'Kev']);</span>
+        line.Set('chart.tooltips.effect', 'expand');
+        line.Set('chart.hmargin', 10);
+        line.Set('chart.linewidth', 2);
+        line.Set('chart.shadow', true);
+        line.Set('chart.shadow.offsetx', 0);
+        line.Set('chart.shadow.offsety', 0);
+        line.Set('chart.shadow.color', 'green');
+        line.Set('chart.shadow.blur', 25);
+        line.Set('chart.colors', ['green']);
+        line.Set('chart.tickmarks', 'circle');
+        line.Set('chart.labels', ['John', 'Fred', 'Jane', 'Lou', 'Pete', 'Kev']);
+        line.Draw();
+    }
+&lt;/script&gt;
+</pre>
+        </li>
+    </ol>
+
+    <a name="what"></a>
+    <h4>What can I specify?</h4>
+    
+    <p>
+        The tooltips that you specify are usually strings (which can contain HTML). They can however also be functions which are called when they're about
+        to be displayed. The function should return the text that is used as the tooltip. You have the option to either specify
+        one function per data point, or just one function for all of the tooltips. You can mix functions and strings if you wish.
+        These functions are passed the numerical, zero-indexed tooltip index and the return value is used as the tooltip
+        text. So to summarise:
+    </p>
+    
+    <ul>
+        <li>
+            An array of strings. The string is used as the tooltip. Eg:
+            <pre class="code">myGraph.Set('chart.tooltips', ['John', 'Fred', 'Lou']);</pre>
+        </li>
+
+        <li>
+            An array of function objects. Each function is called and should return the text to be used. Eg:
+            <pre class="code">myGraph.Set('chart.tooltips', [getJohnTooltip, getFredTooltip, getLouTooltip]);</pre>
+        </li>
+
+        <li>
+            A single function object. This is probably the most useful. This function is called whenever a tooltip
+            is about to be displayed, and passed the numerical, zero-indexed tooltip index of the point on the chart.
+            The function should return the text to be used as the tooltip. Note that the function you specify is called
+            <i>before</i>
+            the tooltip DIV has been created, so you cannot access it. If you wish to customise the appearance
+            of the tooltip, you can use either the tooltip <a href="css.html">CSS class</a> or a call to <i>setTimeout()</i>. Eg:
+            <pre class="code">myGraph.Set('chart.tooltips', getTooltip);</pre>
+        </li>
+        
+        <li>
+            An array of DIV ids. This will make working with large tooltips easier. You basically specify the id of a DIV whose
+            .innerHTML is then used as the tooltip. Only the contents of the DIV are used, not the DIV itself, so you can hide
+            the DIV by setting its <i>display</i> CSS value to <i>none</i>. An example of this in action is the
+            <a href="../examples/line.html">first line chart</a>. For example:
+            
+            <pre class="code">myBar.Set('chart.tooltips', ['id:myDiv', ...])</pre>
+        </li>
+    </ul>
+
+    <a name="charts"></a>
+    <h4>Can I show charts in tooltips?</h4>
+
+    <canvas style="float: right" id="cvs2" width="600" height="250">[No canvas support]</canvas>
+
+    <p>
+        You can, and with the custom event support that RGraph has, it's reasonably easy. Simply attach your function that
+        creates the chart to the <i>ontooltip</i> event. This allows the tooltip HTML to be created and added to the page
+        so that the code that creates the chart can run. The sequence is:
+    </p>
+    
+    <ol>
+        <li style="margin-top: 0">Specify the HTML for the tooltip as normal (including the &lt;canvas&gt; tag).</li>
+        <li style="margin-top: 0">Use the <i>ontooltip</i> RGraph event so that a function is called when a tooltip is shown.</li>
+        <li style="margin-top: 0">This function should subsequently create the chart.</li>
+    </ol>
+    
+    <p>
+        The tooltip DIV is to be found in the RGraph registry - <i>RGraph.Registry.Get('chart.tooltip')</i>. And if you want it the
+        numerical zero indexed count of the tooltip is to be found in the <i>__index__</i> property:
+        <i>RGraph.Registry.Get('chart.tooltip').__index__</i>
+    </p>
+    
+    <pre class="code">
+&lt;script src="RGraph.common.core.js" &gt;&lt;/script&gt;
+&lt;script src="RGraph.common.tooltips.js" &gt;&lt;/script&gt;
+&lt;script src="RGraph.bar.js" &gt;&lt;/script&gt;
+&lt;script src="RGraph.line.js" &gt;&lt;/script&gt;
+
+&lt;style&gt;
+    .RGraph_tooltip {
+        background-color: white ! important;
+    }
+&lt;/style&gt;
+
+&lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt;
+
+&lt;script&gt;
+    window.onload = function ()
+    {
+        labels = ['Gary','Pete','Lou','Ned','Kev','Fred'];
+
+        bar = new RGraph.Bar("cvs", [4.5,28,13,26,35,36]);
+        bar.Set('chart.tooltips', function (idx) {return labels[idx] + 's stats&lt;br/&gt;&lt;canvas id="__tooltip_canvas__" width="400" height="150"&gt;[No canvas support]&lt;/canvas&gt;';});
+        bar.Set('chart.hmargin', 10);
+        bar.Set('chart.tickmarks', 'endcircle');
+        bar.Set('chart.colors', ['blue']);
+        bar.Set('chart.ymax', 100);
+        bar.Set('chart.labels', labels);
+        bar.Draw();
+        
+        <span style="color: green">RGraph.AddCustomEventListener(line, 'ontooltip', CreateTooltipGraph);</span>
+    }
+      
+
+    <span style="color: green">
+    /**
+    * This is the function that is called by the ontooltip event to create the tooltip charts
+    * 
+    * @param obj object   The chart object
+    */
+    function CreateTooltipGraph(obj)
+    {
+        // This data could be dynamic
+        var line  = new RGraph.Line('__tooltip_canvas__', [5,8,7,6,9,5,4,6,3,5,4,4]);
+        line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        line.Set('chart.hmargin', 5);
+        line.Set('chart.tickmarks', 'endcircle');
+        line.Set('chart.background.grid.autofit', true);
+        line.Draw();
+    }
+    </span>
+&lt;/script&gt;
+</pre>
+
+    <p>
+        If you want to see more source code, simply view the source of this page and look at the code that creates the bar chart.
+        There's also a basic stripped-down example <a href="basic_tooltips.html">here</a>.
+    </p>
+
+    <br clear="all" />    
+
+        <a name="customise"></a>
+        <h4>Can I customise the appearance of tooltips?</h4>
+        
+        <p>
+            Yes. You can either use the default CSS class <i>RGraph_tooltip</i>, or you can specify a specific CSS class that a
+            charts tooltips should use with the property <i>chart.tooltips.css.class</i>. The two charts on this page have
+            different looking tooltips by using this method - the line chart uses the default look, whilst the bar chart
+            overrides the CSS class name and sets it to <i>bar_chart_tooltips_css</i>. For example:
+        </p>
+        
+        <pre class="code">bar.Set('chart.tooltips.css.class', 'bar_chart_tooltips_css');</pre>
+        
+        <pre class="code">
+&lt;style&gt;
+    .bar_chart_tooltips_css {
+        background-color: white ! important;
+        border: 2px solid black ! important;
+        padding: 3px;
+    }
+&lt;/style&gt;
+</pre>
+
+        <p>
+            You can read more about RGraph CSS classes <a href="css.html">here</a>.
+        </p>
+
+        <a name="effects"></a>
+        <h4>What tooltip effects are available?</h4>
+        
+        <p>
+            These effects are available to you:
+        </p>
+        
+        <ul>
+            <li>fade</li>
+            <li>expand</li>
+            <li>contract</li>
+            <li>snap</li>
+            <li>none</li>
+        </ul>
+        
+        <p>
+            All of them are as their names imply. <i>fade</i> is a straight forward fade in effect, <i>expand</i> is another effect
+            which expands outward from the center of the tooltip, <i>contract</i> is like the <i>expand</i> effect but in reverse, <i>snap</i> is an effect which can be used in a limited set of circumstances
+            and "snaps" to the current mouse position and <i>none</i> is simply no effect at all. The default effect used
+            by all chart types is <i>fade</i>. Note: If you're showing canvases in your tooltips then the <i>expand</i>, <i>contract</i> and <i>snap</i>
+            effects will not work - you must use <i>fade</i> or <i>none</i>.
+        </p>
+        
+        <p>
+            <b>Note:</b> The snap effect is only available to chart types where the tooltip is triggered using the onmousemove event.
+            Currently this means the <i>Line chart</i>, <i>Rscatter chart</i>, <i>Scatter chart</i> and Radar chart. It can also
+            be negatively effected when using multiple charts on one page.
+        </p>
+
+
+        <a name="firefox"></a>
+        <h4>Tooltips, the clipboard and Firefox</h4>
+        
+        <p>
+            If you're using Firefox, there's a note about tooltips and the clipboard (ie copying text) on the <a href="issues.html">issues page</a>.
+        </p>
+        
+        <a name="override"></a>
+        <h4>Can I override the tooltip function?</h4>
+
+        <p>
+            You can by stipulating <i>chart.tooltips.override</i>. This should be a function object that handles everything with regard
+            to showing the tooltip. Highlighting the chart is still done for you - the override function is only concerned with showing
+            the tooltip. The override function is passed these arguments:
+        </p>
+
+        <ul>
+            <li>canvas - The HTML canvas element, the same as what you get from document.getElementById()</li>
+            <li>text - The tooltip text (id:xxx strings are NOT expanded)</li>
+            <li>x - The X coordinate in relation to the entire page</li>
+            <li>y - The Y coordinate in relation to the entire page</li>
+            <li>index - The numerical index of the tooltip in the original tooltip array</li>
+        </ul>
+        
+        <p>
+            <b>Note:</b> Although "id:xxx" strings are not expanded for you, you can easily do this yourself by using the
+            <i>RGraph.getTooltipText('id:xxx')</i> function.
+        </p>
+        
+        <pre class="code">
+&lt;script&gt;
+    function tooltip_override (canvas, text, x, y, idx)
+    {
+        alert('In tooltip override function...');
+    }
+    myObj.Set('chart.tooltips.override', tooltip_override);
+&lt;/script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/vprogress.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/vprogress.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/vprogress.html	(revision 225)
@@ -0,0 +1,414 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for personal,    |
+        * | charity and educational purposes it is free to use. You can read the full    |
+        * | license here:                                                                |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Vertical progress bar documentation</title>
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="/favicon.png">
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Vertical Progress bar
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Vertical Progress bar documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        The example file is <a href="../examples/vprogress.html">here</a>.
+    </p>
+    
+    <pre class="code">
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var myProgress = new RGraph.VProgess('myProgress', 78, 100);    
+        myProgress.Set('chart.colors', ['red']);
+        myProgress.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <h2>Properties</h2>
+    
+    <p>
+        You can use these properties to control how the progress bar apears. You can set them by using the Set() method. Eg:
+    </p>
+    
+    <p>
+        <b>myProgress.Set('name', 'value');</b>
+    </p>
+    
+    <ul>
+        <li><a href="#chart configuration">Chart configuration</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#key">Key</a></li>
+        <li><a href="#misc">Miscellaneous</a></li>
+    </ul>
+
+
+<a name="chart configuration"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Chart configuration</h3>
+            
+            <a name="chart.labels.count"></a>
+            <b>chart.labels.count</b><br />
+            This controls how many labels there are.
+            <br /><i>Default: 10</i><br /><br />
+
+            <a name="chart.tickmarks"></a>
+            <b>chart.tickmarks</b><br />
+            Whether the tickmarks are drawn. <br />
+            <i>Default: true</i><br /><br />
+
+            <a name="chart.tickmarks.color"></a>
+            <b>chart.tickmarks.color</b><br />
+            The color used for tickmarks.<br />
+            <i>Default: black</i><br /><br />
+            
+            <a name="chart.tickmarks.inner"></a>
+            <b>chart.tickmarks.inner</b><br />
+            This controls whether the bar has inner tickmarks<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.tickmarks.zerostart"></a>
+            <b>chart.tickmarks.zerostart</b><br />
+            If true, labels and tickmarks will start at and show zero.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.min"></a>
+            <b>chart.min</b><br />
+            The minimum value. Setting a minimum value allows to show a more detailed progress bar.<BR />
+            <i>Default: 0</i><br /><br />
+
+            <a name="chart.numticks"></a>
+<b>chart.numticks</b><br />
+            How many tick marks there are. <br /><i>Default: 10</i><br /><br />
+            <a name="chart.numticks.inner"></a>
+<b>chart.numticks.inner</b><br />
+            How many inner tick marks there are. <br /><i>Default: 50</i><br /><br />
+            <a name="chart.arrows"></a>
+<b>chart.arrows</b><br />
+            This stipulates that two indicator arrows are drawn. It works best if you have tickmarks off, and no title.<br><i>Default: false</i><br /><br />
+    
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>
+
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>            <a name="chart.color"></a>
+<b>chart.color</b><br />
+            The color of the bar. This can be a solid color, or a gradient that you create. <br /><i>Default: #0c0</i><br /><br />
+            <a name="chart.background.color"></a>
+<b>chart.background.color</b><br />
+            The background color. <br /><i>Default: #eee</i><br /><br />
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether the progress bar has a shadow. This uses the canvas shadow API and therefore is only supported on Chrome 2, Safari 3.1 and Firefox 3.1 (and above).<br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the progress bar shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the progress bar shadow.<br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow.<br /><i>Default: rgba(0,0,0,0.5)</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The blurring effect that is applied to the shadow.<br /><i>Default: 3</i><br /><br />
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size of the text (in points). <br /><i>Default: 10</i><br /><br />
+            
+            <a name="chart.labels"></a>
+            <b>chart.labels</b><br />
+            Labels that are applied to the chart. <br /><i>Default: An empty array</i><br /><br />
+            
+            <a name="chart.labels.position"></a>
+            <b>chart.labels.position</b><br />
+            Can be <i>left</i> or <i>right</i> and controls which side the labels are positioned on.<br />
+            <i>Default: right</i><br /><br />
+
+
+<a name="scale"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>            <a name="chart.units.pre"></a>
+            <b>chart.units.pre</b><br />
+            The units that the Y scale is measured in (these are preppend to the number). <br /><i>Default: none</i><br /><br />
+            
+            <a name="chart.units.post"></a>
+            <b>chart.units.post</b><br />
+            The units that the Y scale is measured in (these are appended to the number). <br /><i>Default: none</i><br /><br />
+            
+            <a name="chart.scale.decimals"></a>
+            <b>chart.scale.decimals</b><br />
+            This stipulates how many decimal places there are.
+            <br /><i>Default: 0</i><br /><br />
+
+
+<a name="titles"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>            <a name="chart.title"></a>
+<b>chart.title</b><br />
+            The title of the progress bar. <br /><i>Default: An empty string</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            An array, albeit one element only. This is shown when the progress bar is clicked on. Tooltips can contain HTML.<br /><i>Default: An empty array</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing the tooltip. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            
+            <a name="chart.tooltips.override"></a>
+            <b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br />
+            <i>Default: null</i><br /><br />
+            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+
+
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+            <a name="chart.adjustable"></a>
+<b>chart.adjustable</b><br />
+            Defaulting to false, this determines whether your progress bar will be adjustable (click the bar and drag it). <br /><i>Default: false</i><br /><br />
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+
+            <a name="key"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Key</h3>
+            
+            <a name="chart.key"></a>
+            <b>chart.key</b><br />
+            An array of key information. <br />
+            <i>Default: [] (An empty array)</i><br /><br />
+
+            <a name="chart.key.background"></a>
+            <b>chart.key.background</b><br />
+            The color of the key background. Typically white, you could set this to something like rgba(255,255,255,0.7) to allow people to see things behind it.<br>
+            <i>Default: white</i><br /><br />
+            
+            <a name="chart.key.halign"></a>
+            <b>chart.key.halign</b><br />
+            Instead of specifying the exact x/y coordinates, you can use this property to simply specify whether the key hould be
+            aligned <i>left</i> or <i>right</i>.<br />
+            <i>Default: right</i><br /><br />
+            
+            <a name="chart.key.position"></a>
+            <b>chart.key.position</b><br />
+            Determines the position of the key.Either <b>graph</b> (default), or <b>gutter</b>.<br />
+            <i>Default: graph</i><br /><br />
+            
+            <b>chart.key.position.x</b><br />
+            This allows you to specify a specific X coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.y</b><br />
+            This allows you to specify a specific Y coordinate for the key.<br />
+            <i>Default: null</i><br /><br />
+            
+            <b>chart.key.position.gutter.boxed</b><br />
+            If you have the key in gutter mode (ie horizontal), this allows you to give a background color.<br />
+            <i>Default: true</i><br /><br />
+            
+            <a name="chart.key.shadow"></a>
+            <b>chart.key.shadow</b><br />
+            Whether a small drop shadow is applied to the key.<br />
+            <i>Default: false</i><br /><br />
+
+            <a name="chart.key.shadow.color"></a>
+            <b>chart.key.shadow.color</b><br />
+            The color of the shadow.<br />
+            <i>Default: #666</i><br /><br />
+
+            <a name="chart.key.shadow.blur"></a>
+            <b>chart.key.shadow.blur</b><br />
+            The extent of the blurring effect used on the shadow.<br />
+            <i>Default: 3</i><br /><br />
+
+            <a name="chart.key.shadow.offsetx"></a>
+            <b>chart.key.shadow.offsetx</b><br />
+            The X offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <a name="chart.key.shadow.offsety"></a>
+            <b>chart.key.shadow.offsety</b><br />
+            The Y offset of the shadow.<br />
+            <i>Default: 2</i><br /><br />
+
+            <b>chart.key.rounded</b><br />
+            This controls whether the corners of the key (in graph mode) are curved. If the key is gutter mode, this has no effect.<br />
+            <i>Default: true</i><br /><br />
+            
+            <b>chart.key.color.shape</b><br />
+            This can be <i>square</i>, <i>circle</i> or <i>line</i> and controls how the color indicators in the key appear.<br />
+            <i>Default: square</i><br /><br />
+            
+            <b>chart.key.linewidth</b><br />
+            The line width of the surrounding border on the key.<br />
+            <i>Default: 1</i><br /><br />
+
+    <a name="misc"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+</div>
+<br /><br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/waterfall.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/waterfall.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/waterfall.html	(revision 225)
@@ -0,0 +1,494 @@
+<!DOCTYPE html>
+<html> 
+<head> 
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    --> 
+    <title>RGraph: Javascript charts and graph library - waterfall charts documentation</title> 
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs waterfall charts" /> 
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about the Waterfall charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+ 
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" /> 
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head> 
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb"> 
+        <a href="../index.html">RGraph: Javascript charts and graph library</a> 
+        >
+        <a href="index.html">Documentation</a> 
+        >
+        Waterfall charts
+    </div> 
+ 
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Waterfall charts documentation</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+ 
+    <p></p> 
+    
+    <p> 
+        The example file is <a href="../examples/waterfall.html">here</a>.
+    </p> 
+
+    <ul>
+        <li><a href="#available.properties">Properties</a></li>
+        <li><a href="#available.methods">Methods</a></li>
+    </ul>
+
+    <pre class="code"> 
+&lt;script&gt;
+    window.onload = function ()
+    {
+        var data = [90, -16, -18, -34];
+        
+        var waterfall = new RGraph.Waterfall('cvs', data);
+        waterfall.Draw();
+    }
+&lt;/script&gt;
+</pre>
+
+    <a name="available.properties"></a>
+    <h2>Properties</h2> 
+ 
+    <p> 
+        You can use these properties to control how the Waterfall chart apears. You can set them by using the Set() method. Eg:
+    </p> 
+    
+    <p> 
+        <b>myBar.Set('name', 'value');</b> 
+    </p>
+    
+    <ul>
+        <li><a href="#background">Background</a></li>
+        <li><a href="#axis">Axis properties</a></li>
+        <li><a href="#colors">Colors</a></li>
+        <li><a href="#margins">Margins</a></li>
+        <li><a href="#labels and text">Labels and text</a></li>
+        <li><a href="#titles">Titles</a></li>
+        <li><a href="#shadow">Shadow</a></li>
+        <li><a href="#scale">Scale</a></li>
+        <li><a href="#interactive features">Interactive features</a></li>
+        <li><a href="#zoom">Zoom</a></li>
+        <li><a href="#miscellaneous">Miscellaneous</a></li>
+    </ul>
+
+
+
+<a name="background"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Background</h3>            <a name="chart.background.barcolor1"></a>
+
+            <b>chart.background.barcolor1</b><br />
+            The color of the background bars, (1 of 2). <br /><i>Default: white</i><br /><br />
+            <a name="chart.background.barcolor2"></a>
+
+            <b>chart.background.barcolor2</b><br />
+            The color of the background bars, (2 of 2). <br /><i>Default: white</i><br /><br />
+            <a name="chart.background.grid"></a>
+
+            <b>chart.background.grid</b><br />
+            Whether to show the background grid or not. <br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.color"></a>
+
+            <b>chart.background.grid.color</b><br />
+            The color of the background grid. <br /><i>Default: #ddd</i><br /><br />
+            <a name="chart.background.grid.hsize"></a>
+
+            <b>chart.background.grid.hsize</b><br />
+            The horizontal background grid size. <br /><i>Default: 40</i><br /><br />
+            <a name="chart.background.grid.vsize"></a>
+
+            <b>chart.background.grid.vsize</b><br />
+            The vertical background grid size. <br /><i>Default: 18</i><br /><br />
+            <a name="chart.background.grid.width"></a>
+
+            <b>chart.background.grid.width</b><br />
+            The width that the background grid lines are. Decimals (eg 0.5) are permitted.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.background.grid.border"></a>
+
+            <b>chart.background.grid.border</b><br />
+            Determines whether a border line is drawn around the grid.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.hlines"></a>
+
+            <b>chart.background.grid.hlines</b><br />
+            Determines whether to draw the horizontal grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.vlines"></a>
+
+            <b>chart.background.grid.vlines</b><br />
+            Determines whether to draw the vertical grid lines.<br /><i>Default: true</i><br /><br />
+            <a name="chart.background.grid.autofit"></a>
+
+            <b>chart.background.grid.autofit</b><br />
+            Instead of specifying a pixel width/height for the background grid, you can use autofit and specify how many horizontal and vertical lines you want.<br /><i>Default: false</i><br /><br />
+            <a name="chart.background.grid.autofit.numhlines"></a>
+
+            <b>chart.background.grid.autofit.numhlines</b><br />
+            When using autofit this allows you to specify how many horizontal grid lines you want. <br /><i>Default: 7</i><br /><br />
+            <a name="chart.background.grid.autofit.numvlines"></a>
+
+            <b>chart.background.grid.autofit.numvlines</b><br />
+            When using autofit this allows you to specify how many vertical grid lines you want. <br /><i>Default: 20</i><br /><br />
+            
+            <a name="chart.background.grid.autofit.align"></a>
+            <b>chart.background.grid.autofit.align</b><br />
+            If you want to have your grid lines line up with the labels (both X and Y axis), you can set this to true and RGraph will
+            attempt to make the grid lines line up. If you have a <i>chart.hmargin</i> set then the alignment will be thrown out.<br />
+            <i>Default: false</i><br /><br />
+            
+            <a name="chart.background.hbars"></a>
+<b>chart.background.hbars</b><br />
+            An array of information stipulating horizontal coloured bars. You can use these to indicate limits. Eg: <i>myBar.Set('hbars', [[75, 10, 'yellow'], [85, 15, 'red']]);</i> This would give you two bars, one red and a lower yellow bar. The units correspond to your scale, and are the starting point and the height.<br /><i>Default: null</i><br /><br />
+            
+            <a name="chart.background.image"></a>
+            <b>chart.background.image</b><br />
+            If you want to specify a background image to use on your chart, specify it with this property.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="axis"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Axis properties</h3>
+
+            <a name="chart.noaxes"></a>
+            <b>chart.noaxes</b><br />
+            Whether the axes are drawn<br />
+            <i>Default: false (the axes ARE drawn)</i><br /><br />
+
+            <a name="chart.noxaxis"></a>
+            <b>chart.noxaxis</b><br />
+            Whether the X axis is drawn<br />
+            <i>Default: false (the X axis IS drawn)</i><br /><br />
+
+            <a name="chart.noyaxis"></a>
+            <b>chart.noyaxis</b><br />
+            Whether the Y axis is drawn<br />
+            <i>Default: false (the Y axis IS drawn)</i><br /><br />
+
+<a name="colors"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Colors</h3>
+
+<a name="chart.strokestyle"></a>
+<b>chart.strokestyle</b><br />
+            The color of the outline of the bars. <br /><i>Default: #666</i><br /><br />
+            
+            <a name="chart.colors"></a>
+            <b>chart.colors</b><br />
+            An array of the colors of the actual bars. <br />
+            <i>Default: An array - ['green', 'red', 'blue']</i><br /><br />
+
+<a name="margins"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Margins</h3>            <a name="chart.hmargin"></a>
+<b>chart.hmargin</b><br />
+            The horizontal margin (in pixels) of the chart. <br /><i>Default: 5</i><br /><br />
+
+
+            <a name="chart.gutter.left"></a>
+            <b>chart.gutter.left</b><br />
+            The left gutter of the chart, (the gutter is where the labels and title are)).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.right"></a>
+            <b>chart.gutter.right</b><br />
+            The right gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.top"></a>
+            <b>chart.gutter.top</b><br />
+            The top gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+            <a name="chart.gutter.bottom"></a>
+            <b>chart.gutter.bottom</b><br />
+            The bottom gutter of the chart, (the gutter is where the labels and title are).<br />
+            <i>Default: 25</i><br /><br />
+
+<a name="labels and text"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Labels and text</h3>            <a name="chart.text.color"></a>
+<b>chart.text.color</b><br />
+            The color of the labels. <br /><i>Default: black</i><br /><br />
+            <a name="chart.text.size"></a>
+<b>chart.text.size</b><br />
+            The size (in points) of the labels. <br /><i>Default: 10</i><br /><br />
+            <a name="chart.text.angle"></a>
+<b>chart.text.angle</b><br />
+            The angle of the horizontal text labels (at the bottom of the chart). This can be one of three values - 0, 45 or 90.<br /><i>Default: 0 (Horizontal)</i><br /><br />
+            <a name="chart.text.font"></a>
+<b>chart.text.font</b><br />
+            The font used to render the text.<br /><i>Default: Verdana</i><br /><br />
+            <a name="chart.labels"></a>
+<b>chart.labels</b><br />
+            An array of the labels to be used on the chart. <br /><i>Default: An empty array</i><br /><br />
+            
+<b>chart.ylabels</b><br />
+            Can be <i>true</i> or <i>false</i> and determines whether the chart has Y axis labels.<br /><i>Default: true</i><br /><br />
+
+
+            <a name="chart.numyticks"></a>
+<b>chart.numyticks</b><br />
+            The number of Y tickmarks. If you have changed the number of Y labels, you may also want to change this to match. <br /><i>Default: 10</i><br /><br />
+
+
+<a name="titles"></a>
+
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Titles</h3>
+
+<a name="chart.title"></a>
+<b>chart.title</b><br />
+The title of the chart, if any. <br />
+<i>Default: null</i><br /><br />
+
+<a name="chart.title.background"></a>
+<b>chart.title.background</b><br />
+The background color (if any) for the title.<br />
+<i>Default: null</i><br /><br />
+
+<a name="chart.title.color"></a>
+<b>chart.title.color</b><br />
+            The color of the title.<br /> <i>Default: black</i><br /><br />
+            <a name="chart.title.hpos"></a>
+<b>chart.title.hpos</b><br />
+            This allows you to completely override the horizontal positioning of the title. It should be a number between 0 and 1, and is multiplied with the whole width of the canvas and then used as the horizontal position. <br /><i>Default: null</i><br /><br />
+            <a name="chart.title.vpos"></a>
+<b>chart.title.vpos</b><br />
+            This allows you to completely override the vertical positioning of the title. It should be a number between 0 and 1, and is multiplied with the gutter and then used as the vertical position. It can be useful if you need to have a large gutter.<br /><i>Default: null</i><br /><br />
+            <a name="chart.title.xaxis"></a>
+<b>chart.title.xaxis</b><br />
+            This allows to specify a title for the X axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.yaxis"></a>
+<b>chart.title.yaxis</b><br />
+            This allows to specify a title for the Y axis.<br /><i>Default: none</i><br /><br />
+            <a name="chart.title.xaxis.pos"></a>
+<b>chart.title.xaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the X axis title.<br /><i>Default: 0.25</i><br /><br />
+            <a name="chart.title.yaxis.pos"></a>
+<b>chart.title.yaxis.pos</b><br />
+            This is multiplied with the gutter to give the position of the Y axis title.<br /><i>Default: 0.25</i><br /><br />
+
+
+            <a name="chart.title.yaxis.align"></a>
+            <b>chart.title.yaxis.align</b><br />
+            Instead of using the option above you can instead use this option, specifying <i>left</i> or <i>right</i>.<br />
+            <i>Default: left</i><br /><br />
+
+<a name="shadow"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Shadow</h3>            <a name="chart.shadow"></a>
+<b>chart.shadow</b><br />
+            Whether a drop shadow is applied. <br /><i>Default: false</i><br /><br />
+            <a name="chart.shadow.color"></a>
+<b>chart.shadow.color</b><br />
+            The color of the shadow. <br /><i>Default: #666</i><br /><br />
+            <a name="chart.shadow.offsetx"></a>
+<b>chart.shadow.offsetx</b><br />
+            The X offset of the shadow. <br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.offsety"></a>
+<b>chart.shadow.offsety</b><br />
+            The Y offset of the shadow.  <br /><i>Default: 3</i><br /><br />
+            <a name="chart.shadow.blur"></a>
+<b>chart.shadow.blur</b><br />
+            The severity of the shadow blurring effect. <br /><i>Default: 3</i><br /><br />
+
+            <a name="scale"></a>
+            <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Scale</h3>
+            
+
+
+            <a name="chart.scale.decimals"></a>
+            <b>chart.scale.decimals</b><br />
+            The number of decimal places to display for the Y scale.
+            <br /><i>Default: 0</i><br /><br />
+            
+            <a name="chart.scale.point"></a>
+            <b>chart.scale.point</b><br />
+            The character used as the decimal point.<br /><i>Default: .</i><br /><br />
+
+            <a name="chart.scale.formatter"></a>
+            <b>chart.scale.formatter</b><br />
+            To allow thoroughly custom formats of numbers in the scale, you can use this option to
+            specify a function that is used by RGraph to format numbers. This function should
+            handle ALL of the formatting. Eg:<br /><br />
+            <pre class="code">
+function myFormatter(obj, num)
+{
+    return num + 'F'; // An example of formatting
+}
+myGraph.Set('chart.scale.formatter', myFormatter);
+</pre>
+            <br /><i>Default: null</i><br /><br />
+            
+            
+
+            <a name="chart.units.pre"></a>
+            <b>chart.units.pre</b><br />
+            The units that the Y axis is measured in. This string is displayed BEFORE the actual number, allowing you to specify values such as "$50".<br /><i>Default: none</i><br /><br />
+            
+            <a name="chart.units.post"></a>
+            <b>chart.units.post</b><br />
+            The units that the Y axis is measured in. This string is displayed AFTER the actual number, allowing you to specify values such as "50ms".<br /><i>Default: none</i><br /><br />
+
+            <a name="chart.ymax"></a>
+            <b>chart.ymax</b><br />
+            The optional maximum Y scale value. If not specified then it will be calculated.<br /><i>Default: null (It's calculated)</i><br /><br />
+
+
+
+
+<a name="interactive features"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Interactive features</h3>            <a name="chart.contextmenu"></a>
+<b>chart.contextmenu</b><br />
+            An array of context menu items. More information on context menus is <a href="context.html">here</a>.<br /><i>Default: [] (An empty array)</i><br /><br />
+            <a name="chart.tooltips"></a>
+<b>chart.tooltips</b><br />
+            A numerically indexed array of tooltips that are shown when a bar is clicked. These can contain HTML.<br /><i>Default: null</i><br /><br />
+            <a name="chart.tooltips.effect"></a>
+<b>chart.tooltips.effect</b><br />
+            The animated effect used for showing tooltips. Can be either <i>fade</i> or <i>expand</i>.<br /><i>Default: fade</i><br /><br />
+            <a name="chart.tooltips.event"></a>
+<b>chart.tooltips.event</b><br />
+            This is the event that triggers the tooltips. It can be either <i>onclick</i> or <i>onmousemove</i>.<br /><i>Default: onclick</i><br /><br />
+            <a name="chart.tooltips.css.class"></a>
+<b>chart.tooltips.css.class</b><br />
+            This is the name of the CSS class the chart uses.<br /><i>Default: RGraph_tooltip</i><br /><br />
+            <a name="chart.tooltips.override"></a>
+<b>chart.tooltips.override</b><br />
+            If you wish to handle showing tooltips yourself, this should be a function object which does just that. There's more information on the <a href="tooltips.html">tooltips documentation page</a><br /><i>Default: null</i><br /><br />
+
+            
+            <a name="chart.crosshairs"></a>
+<b>chart.crosshairs</b><br />
+            If true, you will get a crosshair centering on the current mouse position.<br /><i>Default: false</i><br /><br />
+            <a name="chart.crosshairs.linewidth"></a>
+<b>chart.crosshairs.linewidth</b><br />
+            This controls the linewidth of the crosshairs.<br /><i>Default: 1</i><br /><br />
+            <a name="chart.crosshairs.color"></a>
+<b>chart.crosshairs.color</b><br />
+            The color of the crosshairs.<br /><i>Default: #333</i><br /><br />
+            <a name="chart.annotatable"></a>
+<b>chart.annotatable</b><br />
+            Whether annotations are enabled for the chart (ie you can draw on the chart interactively.<br /><i>Default: false</i><br /><br />
+            <a name="chart.annotate.color"></a>
+<b>chart.annotate.color</b><br />
+            If you do not allow the use of the palette, then this will be the only colour allowed for annotations.<br /><i>Default: black</i><br /><br />
+            
+            <a name="chart.resizable"></a>
+            <b>chart.resizable</b><br />
+            Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).<br />
+            <i>Default: false</i><br /><br />
+
+
+            <a name="chart.resize.handle.background"></a>
+            <b>chart.resize.handle.background</b><br />
+            With this you can specify the background color for the resize handle. If you're adjusting the position of the
+            handle then you may need this to make the handle stand out more.<br />
+            <i>Default: null</i><br /><br />
+
+<a name="zoom"></a>
+<h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Zoom</h3>
+<a name="chart.zoom.mode"></a>
+<b>chart.zoom.mode</b><br />
+            Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: <i>thumbnail</i> and <i>canvas</i>.<br /><i>Default: canvas</i><br /><br />
+            <a name="chart.zoom.factor"></a>
+<b>chart.zoom.factor</b><br />
+            This is the factor that the chart will be zoomed by (bigger values means more zoom)<br /><i>Default: 1.5</i><br /><br />
+            <a name="chart.zoom.fade.in"></a>
+<b>chart.zoom.fade.in</b><br />
+            Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.fade.out"></a>
+<b>chart.zoom.fade.out</b><br />
+            Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.hdir"></a>
+<b>chart.zoom.hdir</b><br />
+            The horizontal direction of the zoom. Possible values are: <i>left</i>, <i>center</i>, <i>right</i><br /><i>Default: right</i><br /><br />
+            <a name="chart.zoom.vdir"></a>
+<b>chart.zoom.vdir</b><br />
+            The vertical direction of the zoom. Possible values are: <i>up</i>, <i>center</i>, <i>down</i><br /><i>Default: down</i><br /><br />
+            <a name="chart.zoom.delay"></a>
+<b>chart.zoom.delay</b><br />
+            The delay (in milliseconds) between frames.<br /><i>Default: 50</i><br /><br />
+            <a name="chart.zoom.frames"></a>
+<b>chart.zoom.frames</b><br />
+            The number of frames in the zoom animation.<br /><i>Default: 10</i><br /><br />
+            <a name="chart.zoom.shadow"></a>
+<b>chart.zoom.shadow</b><br />
+            Whether or not the zoomed canvas has a shadow or not.<br /><i>Default: true</i><br /><br />
+            <a name="chart.zoom.thumbnail.width"></a>
+<b>chart.zoom.thumbnail.width</b><br />
+            When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.thumbnail.height"></a>
+<b>chart.zoom.thumbnail.height</b><br />
+            When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.<br /><i>Default: 75</i><br /><br />
+            <a name="chart.zoom.background"></a>
+<b>chart.zoom.background</b><br />
+            Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.<br /><i>Default: true</i><br /><br />
+
+
+    <a name="miscellaneous"></a>
+    <h3 style="border: 1px solid #aaa; background-color: #eee; font-style: italic; padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px">Miscellaneous</h3>
+        <a name="chart.highlight.stroke"></a>
+        <b>chart.highlight.stroke</b><br />
+        If you use tooltips, this controls the colour of the highlight stroke.
+        <br /><i>Default: black</i><br /><br />
+
+        <a name="chart.highlight.fill"></a>
+        <b>chart.highlight.fill</b><br />
+        If you use tooltips, this controls the colour of the highlight fill.
+        <br /><i>Default: rgba(255,255,255,0.5)</i><br /><br />
+
+            
+            <a name="chart.axis.color"></a>
+<b>chart.axis.color</b><br />
+            The color of the axis.<br /><i>Default: black</i><br /><br />
+</div>
+    
+
+    
+    
+</body> 
+</html>
Index: Dev/branches/Demo/RGraph/docs/what-is-a-graph.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/what-is-a-graph.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/what-is-a-graph.html	(revision 225)
@@ -0,0 +1,231 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: What is a graph?</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts graph what " />
+    <meta name="description" content="RGraph: What is a graph?" />
+    
+    <meta property="og:title" content="RGraph: What is a graph?" />
+    <meta property="og:description" content="A brief description and a few examples of a graph " />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        What is a graph?
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - What is a graph?</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        If you're new to charting and graphing, this page is a brief description of charts, the benefits of using
+        <a href="#javascript.charts">Javascript charts</a> and some descriptions of the commonest chart types.
+    </p>
+    
+    <ul>
+        <li><a href="#introduction">Introduction</a></li>
+        <li><a href="#javascript.charts">Javascript charts</a></li>
+        <li><a href="#what.is.rgraph">What is RGraph?</a></li>
+        <li><a href="#what.is.a.bar.chart">What is a Bar chart?</a></li>
+        <li><a href="#what.is.a.line.chart">What is a Line chart?</a></li>
+        <li><a href="#what.is.a.pie.chart">What is a Pie chart?</a></li>
+        <li><a href="#other.chart.types">Other chart types</a></li>
+    </ul>
+    
+    <a name="introduction"></a>
+    <h2>Introduction</h2>
+        <p>
+            A graph (or chart to use the correct term - a graph in computer science is
+            <a href="http://en.wikipedia.org/wiki/Graph_theory" rel="nofollow" target="_blank">something else</a>)
+            is simply a graphical representation of your
+            data. This representation will be easier to understand than a long list of numbers and far more illustrative (of trends for
+            example). The actual data is represented by different symbols depending on the chart type - bars in a Bar chart, lines
+            in a Line chart and slices in a Pie chart. Different chart types can represent different sets of data better. For example
+            a Line chart can be used to represent chonological data quite well and a Pie chart might be better at representing percentages.
+        </p>
+    
+    <a name="javascript.charts"></a>
+    <h2>Javascript charts</h2>
+        <p>
+            <b>Javascript charts</b> are charts which are made using browser based Javascript. New HTML5 features allow far easier
+            creation of charts, such as the <b>HTML5 canvas</b> tag. Charts made in this way (ie in the users browser) are often
+            faster than their server based
+            counterparts and can be used as a way of reducing bandwidth/load/stress on your server. They can therefore be used to
+            prolong the life of your hardware, at the same time as improving the resposiveness of your website.
+        </p>
+    
+    <a name="what.is.rgraph"></a>
+    <h2>What is RGraph?</h2>
+        
+        <p>
+            RGraph is a <b>Javascript charts</b> library that makes it far easier to produce these charts (roughly 20 different
+            types). It uses the HTML5 canvas tag in conjunction with Javascript to draw the charts.
+        </p>
+
+    <a name="what.is.a.bar.chart"></a>
+    <h2>What is a Bar chart?</h2>
+    
+        <canvas id="myBar" width="600" height="250" style="float: right">[No canvas support]</canvas>
+        <script>
+            myBar = new RGraph.Bar('myBar', [4,8,12,4,6,8,7]);
+            myBar.Set('chart.labels', ['John', 'Lucy','Kevin','Julian','Vera','Bob','Peter']);
+            myBar.Set('chart.title', 'An example Bar chart');
+            myBar.Set('chart.background.grid.autofit', true);
+            myBar.Set('chart.strokestyle', '#300');
+            myBar.Set('chart.linewidth', 5);
+            myBar.Set('chart.shadow', true);
+            myBar.Set('chart.shadow.offsetx', 0);
+            myBar.Set('chart.shadow.offsety',0);
+            myBar.Set('chart.shadow.blur', 15);
+            myBar.Set('chart.colors', ['faa']);
+            myBar.Draw();
+        </script>
+    
+        <p>
+            A Bar chart represents data with one bar, or segment of a bar, for each piece of data. There's an example of a Bar
+            chart on the right. The RGraph Bar chart can be grouped or stacked, and the X axis can be either at the bottom, center
+            or the top.
+        </p>
+        
+        <p>
+            You can see the full range of bar chart options on the <a href="bar.html">Bar chart documentation</a> page.
+        </p>
+        
+    <br clear="all" />
+
+    <a name="what.is.a.line.chart"></a>
+    <h2>What is a Line chart?</h2>
+    
+        <canvas id="myLine" width="600" height="250" style="float: right">[No canvas support]</canvas>
+        <script>
+            myLine = new RGraph.Line('myLine', [4,8,12,4,6,8,7], [8,9,6,15,12,18,16]);
+            myLine.Set('chart.labels', ['John', 'Lucy','Kevin','Julian','Vera','Bob','Peter']);
+            myLine.Set('chart.title', 'An example Line chart');
+            myLine.Set('chart.linewidth', 2);
+            myLine.Set('chart.shadow', true);
+            myLine.Set('chart.hmargin', 10);
+            myLine.Set('chart.tickmarks', 'endcircle');
+            myLine.Set('chart.background.grid.autofit', true);
+            myLine.Draw();
+        </script>
+    
+        <p>
+            A Line chart represents data through a series of points, connected by a line. There's an example of a Line chart
+            to the right. You can have multiple lines on the chart, it can be filled, stepped or ranged. Like the Bar chart,
+            the X axis can either at the bottom, center or the top.
+        </p>
+        
+        <p>
+            You can see the full range of line chart options on the <a href="line.html">Line chart documentation</a> page.
+        </p>
+        
+    <br clear="all" />
+    
+    <a name="what.is.a.pie.chart"></a>
+    <h2>What is a Pie chart?</h2>
+    
+        <canvas id="myPie" width="600" height="250" style="float: right">[No canvas support]</canvas>
+        <script>
+            myPie = new RGraph.Pie('myPie', [4,8,12,4,6,8,7]);
+            myPie.Set('chart.labels', ['John', 'Lucy','Kevin','Julian','Vera','Bob','Peter']);
+            myPie.Set('chart.title', 'An example Pie chart');
+            myPie.Set('chart.exploded', [15,15]);
+            myPie.Set('chart.shadow', true);
+            myPie.Draw();
+        </script>
+        
+        <p>
+            A Pie chart represents data as segments of circle. As such, it can be good at showing things such as precentages.
+            Bear in mind though that it has been criticized as not being the easiest way to compare individual sections. More
+            information is available on the <a href="http://en.wikipedia.org/wiki/Pie_chart" target="_blank" rel="nofollow">Wikipedia page</a>.
+        </p>
+
+        <p>
+            You can see the full range of Pie chart options on the <a href="pie.html">Pie chart documentation</a> page.
+        </p>
+        
+    <br clear="all" />  
+    
+    <a name="other.chart.types"></a>
+    <h2>Other chart types</h2>
+        <p>
+            RGraph supports roughly 20 different types of chart in total. Besides the Bar, Line and Pie there is: Bipolar, Donut, Funnel,
+            Gantt, Horizontal Bar, Horizontal Progress Bar, LED display, Meter, Odometer, Radar, Radial Scatter, Rose, Scatter,
+            Thermometer, Vertical Progress Bar and Waterfall chart. For more information on each chart type you can read the
+            appropriate chart types documentation page. Besides the individual chart documentation pages you can also
+            read about the many features of RGraph.
+        </p>
+        
+        <p align="right">
+            <b>
+                <a href="index.html">Full documentation &raquo;</a>
+            </b>
+        </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/what-is-html5-canvas.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/what-is-html5-canvas.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/what-is-html5-canvas.html	(revision 225)
@@ -0,0 +1,200 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: What is HTML5 canvas?</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas charts what " />
+    <meta name="description" content="RGraph: What is HTML5 canvas?" />
+    
+    <meta property="og:title" content="RGraph: What is HTML5 canvas?" />
+    <meta property="og:description" content="A brief description and a few examples of HTML5 canvas " />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        What is HTML5 canvas?
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - What is HTML5 canvas?</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <ul>
+        <li><a href="#introduction">Introduction</a></li>
+        <li><a href="#history">History</a></li>
+        <li><a href="#example">Example</a></li>
+        <li><a href="#compare">Canvas compared to SVG</a></li>
+        <li><a href="#support">Browser support for HTML5 canvas</a></li>
+    </ul>
+    
+    <a name="introduction"></a>
+    <h2>Introduction</h2>
+    
+        <p>
+            HTML5 canvas is a new HTML tag (<i>&lt;canvas&gt;</i>) which is part of the forthcoming HTML5 standard. It allows bitmap
+            drawing which is controlled using Javascript, and is what the RGraph libraries use to draw the charts. You could
+            liken it to a piece of paper which is part of your HTML page, on to which you can draw. Because you use Javascript to
+            draw on the canvas it becomes part of your page and allows interaction very easily.
+        </p>
+        
+        <p>
+            Canvas uses a "fire and forget" drawing methodology - there is no DOM that is maintained, so if you want to alter something
+            you will probably have to redraw the entire canvas. The lack of a DOM means that canvas is fast to draw on and very
+            responsive - important when you're providing iteractive charts to your users.
+        </p>
+    
+    <a name="history"></a>
+    <h2>History</h2>
+        <p>
+            HTML5 canvas was originally introduced by Apple for use in WebKit (which is used in their Safari browser and Google Chrome).
+            It is now part of the HTML5 specification and supported by the majority (if not all) of modern web browsers.
+        </p>
+
+    <a name="example"></a>
+    <h2>Example</h2>
+
+        <canvas id="cvs" width="350" height="250" style="border: 1px dashed gray; float: right">[No canvas support]</canvas>
+        <script>
+            canvas  = document.getElementById("cvs");
+            context = canvas.getContext('2d');
+            
+            // Draw the red triangle
+            context.beginPath();
+                context.strokeStyle = 'black';
+                context.fillStyle = 'red';
+                context.moveTo(100, 25);
+                context.lineTo(150, 100);
+                context.lineTo(50, 100);
+                context.lineTo(100, 25);
+            context.stroke();
+            context.fill();
+            
+            // Draw the blue square
+            context.beginPath();
+                context.fillStyle = 'rgba(0,0,255,0.5)';
+                context.strokeRect(100, 75, 100,100);
+                context.fillRect(100, 75, 100,100);
+            context.stroke();
+            context.fill();
+            
+            // Draw the yellow circle
+            context.beginPath();
+                context.globalAlpha = 0.5;
+                context.fillStyle = 'yellow';
+                context.arc(200,175,50,0,2 * Math.PI, 0);
+            context.stroke();
+            context.fill();
+        </script>
+
+        <p>
+            The example to the right is a very simple case of drawing a few primitives on the canvas. The dotted border is
+            provided by CSS to illustrate the drawing area.
+        </p>
+        
+        <p>
+            The &lt;canvas&gt; tag itself is defined with just a width/height/id attribute. The one here also has a style attribute
+            to make it more evident in the page. The HTML used is shown below:
+        </p>
+        
+        <br clear="all" />
+        
+        <pre class="code">
+&lt;canvas id="cvs" width="375" height="250"&gt;[No canvas support]&lt;canvas&gt;
+</pre>
+
+    The content in between the tags is not shown if the browser supports canvas, and is if the browser doesn't. This provides
+    for fallback content if the users browser doesn't support canvas.
+
+    <a name="compare"></a>
+    <h2>HTML5 Canvas compared to SVG</h2>
+        <p>
+            HTML5 canvas can be compared (a bit) to SVG - which is a vector based alternative for drawing in HTML pages. SVG is
+            at a higher level than canvas because it maintains a record of everything drawn, using a DOM. This is then converted
+            to a bitmap when shown. In the above example, if the blue squares coordinates are changed (eg in an animation),
+            then the whole canvas needs to be cleared and redrawn for each frame.
+        </p>
+        
+        <p>
+            On the other hand you may not require animation - so this may not be an issue and a DOM may just be overhead.
+            Libraries exist that provide a pseudo-DOM that can be used as part of canvas.
+        </p>
+
+    <a name="support"></a>
+    <h2>Browser support for HTML5 canvas</h2>
+        <p>
+            The majority of current browsers support canvas, including IE9. Earlier versions of MSIE have some support through
+            compatibility layers provided by Google and Mozilla. One such library - ExCanvas - is provided in the RGraph archive
+            allowing IE8 to display the graphs, albeit without many of the dynamic features. You can read more on this
+            <a href="msie.html">here</a>.
+        </p>
+        
+    <p align="right">
+        <b>
+            <a href="index.html">Full documentation &raquo;</a>
+        </b>
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/you-dont-need-to-spend-a-lot-of-money.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/you-dont-need-to-spend-a-lot-of-money.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/you-dont-need-to-spend-a-lot-of-money.html	(revision 225)
@@ -0,0 +1,193 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - You don't need to spend a lot of money to get attractive charts</title>
+
+    <meta name="keywords" content="rgraph html5 canvas charts money" />
+    <meta name="description" content="RGraph: You don't need to spend a lot of money..." />
+    
+    <meta property="og:title" content="RGraph: What is HTML5 canvas?" />
+    <meta property="og:description" content="A brief description and a few examples of HTML5 canvas " />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="http://dev.rgraph.net/libraries/RGraph.common.core.js" ></script>
+    <script src="http://dev.rgraph.net/libraries/RGraph.common.tooltips.js" ></script>
+    <script src="http://dev.rgraph.net/libraries/RGraph.bar.js" ></script>
+    <script src="http://dev.rgraph.net/libraries/RGraph.line.js" ></script>
+    <script src="http://dev.rgraph.net/libraries/RGraph.pie.js" ></script>
+    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" ></script>
+    
+    <style>
+        .RGraph_tooltip {
+            color: white ! important;
+            background-color: rgba(64,64,64,0.7) ! important;
+            box-shadow: 5px 5px 10px black ! important;
+            padding: 3px ! important;
+            font-weight: bold;
+            text-align: center ! important;
+        }
+    </style>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        You don't need to spend a lot of money
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - You don't need to spend a lot of money to get attractive charts</h1>
+
+    <div style="position: relative; display: inline-block; float: right; width: 520px; height: 250px; text-align: left">
+        <canvas id="bar_cvs" width="500" height="200" style="width: 0.1px; background-color: #333; border: #C0C0C0 solid 1px; border-radius: 15px; box-shadow: 0 0 35px #6B6860" >[No canvas support]</canvas>
+        <canvas id="pie_cvs" width="130" height="60" style="width: 0.1px; position: absolute; left: 0; top: 0">[No canvas support]</canvas>
+    </div>
+    
+    <p>
+        You don't need to spend a lot of money to get good looking charts, as the chart to the right shows. It's a Bar,
+        Line and Pie chart combination, complete with Line and Pie chart tooltips.
+    </p>
+    
+    <p>
+        There are two canvas tags - one for the Line/Bar chart and the other for the Pie chart. The Pie chart canvas is
+        positioned over the other by using CSS and relative/absolute positioning.
+    </p>
+
+    <script>
+    
+        bar_data = [60,85,90,90,87,91,86,99,115,105];
+        
+        function getTooltip (idx)
+        {
+            var rainfall =  bar_data;
+            var years    = ['2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011'];
+
+            var str = years[idx] + ': ' + line.data[0][idx] + '°C, ' + rainfall[idx] + 'mm';
+
+            return String(str);
+        }
+
+        bar = new RGraph.Bar('bar_cvs', bar_data);
+        bar.Set('chart.colors', ['#4572A7']);
+        bar.Set('chart.background.grid.vlines', false);
+        bar.Set('chart.background.grid.autofit', true);
+        bar.Set('chart.background.grid.autofit.numhlines', 5);
+        bar.Set('chart.background.grid.border', false);
+        bar.Set('chart.labels', ['2001','2002','2003','2004','2005','2006','2007','2008','2009','2010']);
+        bar.Set('chart.text.color', '#4572A7');
+        bar.Set('chart.text.color', 'white');
+        bar.Set('chart.noaxes', true);
+        bar.Set('chart.gutter.left', 75);
+        bar.Set('chart.gutter.right', 65);
+        bar.Set('chart.ylabels.count', 3);
+        bar.Set('chart.units.post', 'mm');
+        bar.Set('chart.title.yaxis', 'Rainfall');
+        bar.Set('chart.title.yaxis.pos', 0.15);
+        bar.Set('chart.strokestyle', 'white');
+        bar.Set('chart.linewidth', 3);
+        bar.Set('chart.hmargin', 10);
+        
+
+        line = new RGraph.Line('bar_cvs', [9,8,8.5,8,7.5,8,9,10,10.5,10]);
+        line.Set('chart.ymax', 30);
+        line.Set('chart.ylabels.count', 3);
+        line.Set('chart.colors', ['yellow', '#4572A7']);
+        line.Set('chart.tickmarks', 'filledcircle');
+        line.Set('chart.yaxispos', 'right');
+        line.Set('chart.gutter.left', 75);
+        line.Set('chart.gutter.right', 65);
+        line.Set('chart.background.grid', false);
+        line.Set('chart.text.color', 'yellow');
+        line.Set('chart.linewidth', 2);
+        line.Set('chart.units.post', '°C');
+        line.Set('chart.noaxes', true);
+        line.Set('chart.title.yaxis', 'Avg. Temp');
+        line.Set('chart.title.yaxis.position', 'right');
+        line.Set('chart.title.yaxis.pos', 0.8);
+        line.Set('chart.tooltips', getTooltip);
+        line.Set('chart.tooltips.highlight', false);
+
+        bar.Set('chart.line', line);
+        bar.Draw();
+        
+        // Draw the pie chart
+        pie = new RGraph.Pie('pie_cvs', [6740, 2020]);
+        pie.Set('chart.gutter.top', 5);
+        pie.Set('chart.gutter.bottom', 5);
+        pie.Set('chart.gutter.left', 5);
+        pie.Set('chart.gutter.right', 5);
+        pie.Set('chart.align', 'left');
+        pie.Set('chart.exploded', [0,7]);
+        pie.Set('chart.strokestyle', '#eee');
+        pie.Set('chart.labels', ['','Sunshine']);
+        pie.Set('chart.labels.sticks', [false, true]);
+        pie.Set('chart.labels.sticks.color', '#eee')
+        pie.Set('chart.colors', ['#5683B8', 'yellow']);
+        pie.Set('chart.text.color', '#ddd');
+        pie.Set('chart.tooltips', ['Non-sunshine hours (including night): 6740','Sunshine hours: 2020']);
+        pie.Set('chart.tooltips.event', 'onmousemove');
+        pie.Set('chart.highlight.style', '2d');
+        pie.Set('chart.highlight.style.2d.fill', '#666');
+        pie.Set('chart.shadow', true);
+        pie.Set('chart.shadow.color', '#fff');
+        pie.Set('chart.shadow.offsetx', 0);
+        pie.Set('chart.shadow.offsety', 0);
+        pie.Set('chart.shadow.blur', 15);
+        pie.Draw();
+        
+        (function ()
+        {
+            $('#bar_cvs').animate({
+                width: '500px',
+                height: '200px'
+            }, 1000);
+
+            $('#pie_cvs').animate({
+                width: '130px',
+                height: '60px',
+                left: parseInt(bar.Get('chart.gutter.left')) + 'px',
+                top: parseInt(bar.Get('chart.gutter.top')) + 'px'
+            }, 1000);
+        })()
+        
+        
+    </script>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/zoom.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/zoom.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/zoom.html	(revision 225)
@@ -0,0 +1,324 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Zooming your charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs zoom" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about zooming your charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.jpg"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <style>
+        .RGraph_zoom_window {
+            border: 2px solid #ccc ! important;
+            box-shadow: 0 0 15px #aaa ! important;;
+            -moz-box-shadow: 0 0 15px #aaa ! important;
+            -webkit-box-shadow: 0 0 15px #aaa ! important;
+        }
+    </style>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        Zooming your charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Zooming your charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+
+    <ul>
+        <li><a href="#canvas">Canvas mode</a></li>
+        <li><a href="#thumbnail">Thumbnail mode</a></li>
+        <li><a href="#area">Area mode</a></li>
+    </ul>
+
+
+    <a name="canvas"></a>
+    <h2>Canvas mode</h2>
+
+    <table border="0" width="100%">
+        <tr>
+            <td>
+                <p>
+                    As of November 2009 RGraph has had the ability to provide a zoom facility. It's designed to be used in
+                    conjunction with a context menu as in the example to the right.
+                </p>
+
+                <p>
+                    You can control the zoom using these properties:
+                </p>
+                
+                <ul>
+                    <li>chart.zoom.mode<i>Default: canvas</i></li>
+                    <li>chart.zoom.factor<i>Default: 1.5</i></li>
+                    <li>chart.zoom.fade.in <i>Default: true</i></li>
+                    <li>chart.zoom.fade.out <i>Default: true</i></li>
+                    <li>chart.zoom.hdir <i>Default: right</i></li>
+                    <li>chart.zoom.vdir <i>Default: down</i></li>
+                    <li>chart.zoom.delay <i>Default: 50</i></li>
+                    <li>chart.zoom.frames <i>Default: 10</i></li>
+                    <li>chart.zoom.shadow <i>Default: true</i></li>
+                    <li>chart.zoom.mode <i>Default: canvas</i></li>
+                    <li>chart.zoom.thumbnail.width <i>Default: 75</i></li>
+                    <li>chart.zoom.thumbnail.height <i>Default: 75</i></li>
+                    <li>chart.zoom.background <i>Default: true</i></li>
+                </ul>
+            </td>
+
+            <td style="text-align: center">
+                <canvas width="600" height="250" id="myc">[No canvas support]</canvas>
+            </td>
+        </tr>
+        
+        <tr>
+            <td colspan="2">
+                The possible values of <i>chart.zoom.hdir</i> are: <i>left</i>, <i>center</i>, <i>right</i>.
+                The possible values of <i>chart.zoom.vdir</i> are: <i>up</i>, <i>center</i>, <i>down</i>. <i>chart.zoom.delay</i>
+                is the delay in between frames (in milliseconds) and <i>chart.zoom.frames</i> is the number of frames in the zoom. <i>chart.zoom.shadow</i>
+                is whether the zoomed canvas has a shadow or not. The possible values of <i>chart.zoom.mode</i> are <i>canvas</i> (default)
+                and <i>thumbnail</i>.
+            </td>
+        </tr>
+    </table>
+
+    <script>
+        window.onload = function ()
+        {
+            var graph = new RGraph.Bar('myc', [[4,6],[6, 8],[8,6],[7,5],[9,4],[4,7],[3,5],[8,6],[7,6],[4,7],[5,4],[5,6],[6,4]]);
+            graph.Set('chart.colors', ['#f66', '#66f']);
+            graph.Set('chart.strokecolor', 'rgba(0,0,0,0)');
+            graph.Set('chart.labels', ['Fry','Hav','Jim','Moo','Io','Olga','Tim','Gaz','Jake','Pippa','Lou','Fred','John']);
+            
+            if (!RGraph.isIE8()) {
+                graph.Set('chart.contextmenu', [
+                                                ['Clear annotations', function () {RGraph.Clear(graph.canvas); graph.Draw();}],
+                                                ['Zoom in', RGraph.Zoom]
+                                               ]);
+                graph.Set('chart.annotatable', true);
+                graph.Set('chart.zoom.hdir', 'left');
+                graph.Set('chart.zoom.factor', 1.5);
+                graph.Set('chart.zoom.vdir', 'center');
+                graph.Set('chart.zoom.frames', 50); // Number of frames
+                graph.Set('chart.zoom.delay', 5);  // Delay between each frame
+                graph.Set('chart.zoom.shadow', 'rgba(0,0,0,0.7)');  // Show a shadow on the zoomed chart
+                graph.Set('chart.zoom.background', true);
+            }
+
+            graph.Set('chart.title', 'Chart with zoom (context, annotatable)');
+            graph.Set('chart.shadow', true);
+            graph.Set('chart.shadow.color', '#999');
+            graph.Draw();
+
+            var myLine = new RGraph.Line('myc2', [40,48,45,64,34,22,23,56,56,54,84,44], [4,5,6,7,20,21,1,9,9,8,5,4]);
+            myLine.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            myLine.Set('chart.hmargin', 10);
+            myLine.Set('chart.linewidth', 3);
+            myLine.Set('chart.title', 'A sample line chart');
+            myLine.Set('chart.colors', ['red', 'black']);
+            myLine.Set('chart.shadow', true);
+            
+            if (!RGraph.isIE8()) {
+                myLine.Set('chart.contextmenu', [['Zoom entire chart', RGraph.Zoom]]);
+                myLine.Set('chart.zoom.delay', 15);
+                myLine.Set('chart.zoom.factor', 1.5);
+                myLine.Set('chart.zoom.mode', 'thumbnail');
+                myLine.Set('chart.zoom.vdir', 'center');
+                myLine.Set('chart.zoom.thumbnail.width', 100);
+                myLine.Set('chart.zoom.thumbnail.height', 100);
+            }
+            myLine.Draw();
+            
+            myLine2 = new RGraph.Line('myc3', [15,30,62,26,46,86,48,51,51,35,32, 35]);
+            myLine2.Set('chart.background.grid.width', 0.5);
+            myLine2.Set('chart.shadow.offsetx', 1);
+            myLine2.Set('chart.shadow.offsety', 1);
+            myLine2.Set('chart.shadow.blur', 2);
+            myLine2.Set('chart.shadow', true);
+            myLine2.Set('chart.zoom.mode', 'area');
+            myLine2.Set('chart.hmargin', 10);
+            myLine2.Set('chart.linewidth', 2);
+            myLine2.Set('chart.title', 'A chart with zoom in area mode');
+            myLine2.Set('chart.tickmarks', 'endcircle');
+            myLine2.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            myLine2.Draw();
+        }
+    </script>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    var graph = new RGraph.Line('myc', [4,6,8,7,9,4,3,8,7,4,5,5,5]);
+    graph.Set('chart.labels', ['Fry','Hav','Jim','Moo','Io','Olga','Tim','Gaz','Jake','Pippa','Lou','Fred','John']);
+    graph.Set('chart.contextmenu', [
+                                    ['Clear annotations', function () {RGraph.Clear(graph.canvas); graph.Draw();}],
+                                    ['Zoom in', RGraph.Zoom]
+                                   ]);
+    graph.Set('chart.title', 'Chart with zoom (context, annotatable)');
+    graph.Set('chart.shadow', true);
+    graph.Set('chart.annotatable', true);
+    graph.Draw();
+&lt;/script&gt;
+</pre>
+
+
+    <a name="thumbnail"></a>
+    <h2>Thumbnail mode</h2>
+    
+    <canvas id="myc2" width="600" height="250" style="float: left">[No canvas support]</canvas>
+
+    <p>
+        The zoom has an alternative thumbnail mode, which displays a small thumbnail zoom instead of zooming the entire canvas.
+        The chart to the left shows an example of this.
+    </p>
+
+    <p>
+        It uses some of the same properties as the regular zoom, eg <i>chart.fade.in</i>, <i>chart.fade.out</i>, <i>chart.zoom.shadow</i>
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    var myLine = new RGraph.Line('myc2', [40,48,45,64,34,22,23,56,56,54,84,44], [4,5,6,7,20,21,1,9,9,8,5,4]);
+    myLine.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+    myLine.Set('chart.hmargin', 10);
+    myLine.Set('chart.linewidth', 3);
+    myLine.Set('chart.title', 'A sample line chart');
+    myLine.Set('chart.zoom.mode', 'thumbnail');
+    myLine.Set('chart.zoom.vdir', 'center');
+    myLine.Set('chart.zoom.thumbnail.width', 100);
+    myLine.Set('chart.zoom.thumbnail.height', 100);
+    myLine.Set('chart.colors', ['red', 'black']);
+    myLine.Set('chart.shadow', true);
+    myLine.Set('chart.contextmenu', [['Zoom entire chart', RGraph.Zoom]]);
+&lt;/script&gt;
+</pre>
+
+    <p>
+        <b>Making the zoom circular</b><br /><br />
+        <img src="../images/border-radius.png" width="171" height="159" alt="A circular zoom window" style="float: right; border: 1px gray solid" />
+        It is possible to make the zoom in area mode circular by utilising the <i>border-radius</i> CSS property. Currently support for
+        this is limited to FireFox 4b7+ and MSIE9, so it's not part of the main RGraph software. The CSS ncessary to achieve this is
+        thus:
+    </p>
+    
+    <pre class="code" style="width: 700px" />
+&lt;style&gt;
+    .RGraph_zoom_window {
+        border-radius: 50px ! important;
+    }
+&lt;/style&gt;
+</pre>
+    
+    This a chart demonstrating this technique <a href="zoom_thumbnail.html">here</a>. Note that browser support for this technique is limited.
+    
+    <br clear="all" />
+
+
+    <a name="area"></a>
+    <h2>Area mode</h2>
+    
+    <canvas id="myc3" width="600" height="250" style="float: right">[No canvas support]</canvas>    
+    
+    <p>
+        Another type of zoom available is <i>area</i>. This is somewhat similar to thumbnail, but allows you to draw a rectangle around
+        the specific area that you want to zoom.
+    </p>
+    
+    <p>
+        Again, this uses some common zoom properties, such as <i>chart.zoom.factor</i>.
+    </p>
+    
+    <p>
+        Once visible, you can drag the zoomed area around with the left mouse button (a left drag), and drag the zoomed canvas around
+        within the zoom by using the right mouse button (a right-drag). And a double click will expand the zoomed area to cover the
+        whole canvas.
+    </p>
+
+    <br clear="all" />
+
+    <pre class="code">
+&lt;script&gt;
+    var myLine = new RGraph.Line('myc3', [15,30,62,26,46,86,48,51,51,35,32, 35]);
+    myLine.Set('chart.zoom.mode', 'area');
+    myLine.Set('chart.hmargin', 10);
+    myLine.Set('chart.linewidth', 1);
+    myLine.Set('chart.title', 'A chart with zoom in area mode');
+    myLine.Set('chart.tickmarks', 'endcircle');
+    myLine.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+    myLine.Draw();
+&lt;script&gt;
+</pre>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/docs/zoom_thumbnail.html
===================================================================
--- Dev/branches/Demo/RGraph/docs/zoom_thumbnail.html	(revision 225)
+++ Dev/branches/Demo/RGraph/docs/zoom_thumbnail.html	(revision 225)
@@ -0,0 +1,127 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - Zooming your charts; a circular thumbnail</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas chart docs circular zoom" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Documentation about zooming your charts; a circular thumbnail" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <style>
+        .RGraph_zoom_window {
+            box-shadow: 0 0 15px black ! important;
+            -webkit-box-shadow: 0 0 15px black ! important;
+            -moz-box-shadow: 0 0 15px black ! important;
+            border-radius: 50px ! important;
+        }
+    </style>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="index.html">Documentation</a>
+        >
+        A circular thumbnail demonstration
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - A circular thumbnail demonstration</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+
+    <canvas id="cvs" width="600" height="250" style="float: right">[No canvas support]</canvas>
+    <script>
+        var line = new RGraph.Line('cvs', [5,3,4,6,5,1,3,4,5,5], [4,8,6,7,4,3,5,1,2,3]);
+        line.Set('chart.colors', ['red', 'black']);
+        line.Set('chart.hmargin', 5);
+        line.Set('chart.linewidth', 5);
+        line.Set('chart.shadow', true);
+        line.Set('chart.shadow.offsetx', 0);
+        line.Set('chart.shadow.offsety', 0);
+        line.Set('chart.shadow.blur', 15);
+        line.Set('chart.shadow.color', ['red','black']);
+        line.Set('chart.labels', ['Hoolio','Gina','Jo','Olga','Kev','John','Lou','Pete','June','Fred']);
+        line.Set('chart.zoom.mode', 'thumbnail');
+        line.Set('chart.zoom.thumbnail.width', 100);
+        line.Set('chart.zoom.thumbnail.height', 100);
+        line.Draw();
+    </script>
+
+    <p>
+        This is a demonstration of the zoom in thumbnail mode with some custom CSS (the <i>border-radius</i> property) which facilitates
+        making the thumbnail circular.
+    </p>
+    
+    <p>
+        Remember that browser support for this is limited - currently (18th December 2010) only Firefox 4b7+ supports this.
+    </p>
+    
+    <p>
+        <a href="zoom.html#thumbnail">&laquo;Back to zoom documentation</a>
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/bar.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/bar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/bar.html	(revision 225)
@@ -0,0 +1,195 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - bar charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example bar charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Bar charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A javascript charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        /**
+        * The onload function creates the graph
+        */
+        window.onload = function ()
+        {
+
+            var bar1 = new RGraph.Bar('bar1', [
+                                        [0.000092, 0.00008],
+                                        [0.000034, 0.000057],
+                                        [0.000056, 0.000062],
+                                        [0.000055, 0.000045],
+                                        [0.000036, 0.000012],
+                                        [0.000044, 0.000056],
+                                        [0.000051, 0.000066],
+                                        [0.000068, 0.000088]]);
+            bar1.Set('chart.background.barcolor1', 'white');
+            bar1.Set('chart.background.barcolor2', 'white');
+            bar1.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th']);
+            bar1.Set('chart.key', ['John', 'Bob']);
+            bar1.Set('chart.key.position.y', 35);
+            bar1.Set('chart.key.position', 'gutter');
+            bar1.Set('chart.key.background', 'rgb(255,255,255)');
+            bar1.Set('chart.colors', ['#77f', '#7f7']);
+            bar1.Set('chart.shadow', true);
+            bar1.Set('chart.shadow.blur', 15);
+            bar1.Set('chart.shadow.offsetx', 0);
+            bar1.Set('chart.shadow.offsety', 0);
+            bar1.Set('chart.shadow.color', '#aaa');
+            bar1.Set('chart.yaxispos', 'right');
+            bar1.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+            bar1.Set('chart.gutter.left', 5);
+            bar1.Set('chart.gutter.right', 45);
+            bar1.Draw();
+
+            var bar2 = new RGraph.Bar('bar2', [[30,20,19,21], [23,25, 27, 30], [30,25,29, 32], [27,28,35,33], [26,18,29,30], [31,20,25,27], [39,28,28,35], [27,29,28,29], [26,23,26,27], [30,20,19,21], [30,20,19,21], [30,20,19,21]]);
+            bar2.Set('chart.units.pre', '$');
+            bar2.Set('chart.title', 'Sales in the last 8 months (tooltips)');
+            bar2.Set('chart.title.vpos', 0.5);
+            bar2.Set('chart.colors', ['red', 'yellow', 'green', 'orange']);
+            bar2.Set('chart.gutter.left', 40);
+            bar2.Set('chart.gutter.right', 5);
+            bar2.Set('chart.gutter.top', 40);
+            bar2.Set('chart.gutter.bottom', 50);
+            bar2.Set('chart.shadow', true);
+            bar2.Set('chart.shadow.color', '#aaa');
+            bar2.Set('chart.background.barcolor1', 'white');
+            bar2.Set('chart.background.barcolor2', 'white');
+            bar2.Set('chart.background.grid.hsize', 5);
+            bar2.Set('chart.background.grid.vsize', 5);
+            bar2.Set('chart.grouping', 'stacked');
+            bar2.Set('chart.labels', ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September','October','November','December']);
+            bar2.Set('chart.labels.above', true);
+            bar2.Set('chart.key', ['Richard', 'Barbara', 'Johnny', 'Frederick']);
+            bar2.Set('chart.key.background', 'rgba(255,255,255,0.7)');
+            bar2.Set('chart.key.position', 'gutter');
+            bar2.Set('chart.key.position.gutter.boxed', false);
+            bar2.Set('chart.key.position.y', bar2.Get('chart.gutter.top') - 15);
+            bar2.Set('chart.key.border', false);
+            bar2.Set('chart.background.grid.width', 0.3); // Decimals are permitted
+            bar2.Set('chart.text.angle', 35);
+            bar2.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+            bar2.Set('chart.tooltips.event', 'onmousemove');
+            
+            if (!RGraph.isIE8()) {
+                tooltipFunc = function (i)
+                {
+                    var r = i % 4;
+                    
+                    if (r == 3) return 'John'
+                    else if (r == 2) return 'Rich';
+                    else if (r == 1) return 'Jane';
+                    else if (r == 0) return 'Quentin';
+                }
+                bar2.Set('chart.tooltips', tooltipFunc);
+            }
+
+            bar2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="./index.html">Examples</a>
+        >
+        Bar charts
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Bar charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the graphs, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div>
+        <p>
+            The bar chart is probably one of the most widely used of charts, and also one of the most versatile. It's defined as a chart with
+            rectangular bars with lengths proportional to the values they represent. The bar chart can be used to represent two
+            or more values. With grouped and stacked bar charts, you can visualise two or more sets of data. For example two years
+            worth of sales figures. Doing this you will be able to easily see differences, for example a better year when it comes
+            to sales. You can also show negative values by having the X axis in the center, like the examples shown. If you use a
+            grouped or stacked bar chart, a key may be helpful to your users.
+        </p>
+        
+        <p>
+            By using the tooltips feature, you can provide more detail about what a particular bar represents. The tooltips in
+            <b>RGraph</b> can contain wide range of HTML, so you can use them to show photos or movies for example.
+        </p>
+    
+        <div>
+            <ul>
+                <li><a href="../docs/bar.html">Bar chart API documentation</a></li>
+            </ul>
+        </div>
+
+        <div>
+            <canvas id="bar1" width="450" height="200">[No canvas support]</canvas>
+            <canvas id="bar2" width="450" height="200">[No canvas support]</canvas>
+        </div>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/basic.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/basic.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/basic.html	(revision 225)
@@ -0,0 +1,64 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - a basic example</title>
+    
+    <meta name="keywords" content="rgraph javascript charts html5 canvas basic example" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  A basic example" />
+
+    <!-- 1/3. Include the RGraph libraries -->
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.bar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+</head>
+
+<body>
+
+    <h1>RGraph: Javascript charts and graph library - A basic example</h1>
+
+    <!-- 2/3. This is the canvas that the graph is drawn on -->
+    <canvas id="myBar" width="1000" height="250">[No canvas support]</canvas>
+
+    <!--
+        3/3. This creates and displays the graph. As it is here, you can call this from the window.onload event,
+             allowing you to put it in your pages header.
+    -->
+    <script>
+        window.onload = function ()
+        {
+            var bar = new RGraph.Bar('myBar', [12,13,16,15,16,19,19,12,23,16,13,24]);
+            bar.Set('chart.gutter.left', 35);
+            bar.Set('chart.colors', ['red']);
+            bar.Set('chart.title', 'A basic graph');
+            bar.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+            bar.Draw();
+        }
+    </script>
+    
+    <p>
+        This is a very basic example that does little more than display a chart. If you're trying to understand how RGraph
+        works, this should help as there is very little happening on this page. To see the source code of this
+        page simply view the source (Right click > View Source).
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/bipolar.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/bipolar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/bipolar.html	(revision 225)
@@ -0,0 +1,145 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - bi-polar charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example bipolar charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  Bipolar charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.common.tooltips.js"></script>
+    <script src="../libraries/RGraph.bipolar.js"></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            var left  = [5,6,8,9,12,13,4,9];
+            var right = [5,8,4,11,15,26,13,16];
+           
+            var bipolar1 = new RGraph.Bipolar('bipolar1', left, right);
+            bipolar1.Set('chart.colors', ['red']);
+            bipolar1.Set('chart.labels', ['Barry', 'John', 'Fred', 'George', 'Rich', 'Larry', 'John', 'Mike']);
+            bipolar1.Set('chart.title.left', '2007');
+            bipolar1.Set('chart.title.right', '2008');
+            bipolar1.Set('chart.title', 'Sales');
+            
+            if (!RGraph.isIE8()) {
+                bipolar1.Set('chart.tooltips', ['Barry', 'John', 'Fred', 'George', 'Rich', 'Larry', 'John', 'Mike', 'Barry', 'John', 'Fred', 'George', 'Rich', 'Larry', 'John', 'Mike']);
+                bipolar1.Set('chart.tooltips.effect', 'fade');
+            }
+
+            bipolar1.Set('chart.units.post', 'k');
+            bipolar1.Set('chart.xmax', 35);
+            bipolar1.Set('chart.shadow', true);
+            bipolar1.Set('chart.shadow.offsety', 0);
+            bipolar1.Set('chart.shadow.offsetx', 0);
+            bipolar1.Set('chart.shadow.color', '#aaa');
+            bipolar1.Set('chart.shadow.blur', 25);
+            bipolar1.Draw();
+
+
+
+            var bipolar2 = new RGraph.Bipolar('bipolar2', left, right);
+            bipolar2.Set('chart.labels', ['Ferrari', 'Porsche', 'Honda', 'Mazda', 'Aston', 'BMW','Ford','Renault']);
+            bipolar2.Set('chart.title.left', 'July')
+            bipolar2.Set('chart.title.right', 'August');
+            bipolar2.Set('chart.title', 'Vehicle market share');
+            bipolar2.Set('chart.units.post', 'k');
+            bipolar2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Bi-polar chart
+</div>
+
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Bi-polar charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <div>
+        <p>
+            The Bi-polar chart is also known as an age-frequency chart or a population pyramid. It allows you to very straight forwardly
+            compare two sets of data. For example two years worth of sales figues. Using this type of chart abnormalities will become
+            apparent. Other charts that would also be comparable, include a grouped bar chart, a stacked bar chart, and a multiple
+            line chart.
+        </p>
+
+        <div>
+            <ul>
+                <li><a href="../docs/bipolar.html">Bi-polar chart API documentation</a></li>
+            </ul>
+        </div>
+        
+        <div>
+            <canvas id="bipolar1" width="475" height="250">[No canvas support]</canvas>
+            <canvas id="bipolar2" width="475" height="250">[No canvas support]</canvas>
+        </div>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/donut.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/donut.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/donut.html	(revision 225)
@@ -0,0 +1,160 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - donut charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example donut charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  Donut charts examples" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <script>
+        window.onload = function ()
+        {
+            var donut = new RGraph.Pie('donut1', [41,37,16,3,3]);
+            donut.Set('chart.variant', 'donut');
+            donut.Set('chart.linewidth', 5);
+            donut.Set('chart.strokestyle', 'white');
+            donut.Set('chart.title', "Browser share");
+            donut.Set('chart.key', ['MSIE 7 (41%)', 'MSIE 6 (37%)', 'Firefox (16%)', 'Safari (3%)', 'Other (3%)']);
+            donut.Set('chart.key.shadow', true);
+            donut.Set('chart.key.shadow.offsetx', 0);
+            donut.Set('chart.key.shadow.offsety', 0);
+            donut.Set('chart.key.shadow.blur', 15);
+            donut.Set('chart.key.shadow.color', '#ccc');
+            donut.Set('chart.key.position', 'graph');
+            donut.Set('chart.align', 'left');
+            donut.Draw();
+
+
+            function getGradient(obj, color)
+            {
+                var gradient = obj.context.createRadialGradient(obj.canvas.width / 2, obj.canvas.height / 2, 0, obj.canvas.width / 2, obj.canvas.height / 2, 200);
+                gradient.addColorStop(0, 'black');
+                gradient.addColorStop(0.5, color);
+                gradient.addColorStop(1, 'black');
+                
+                return RGraph.isIE8() ? color : gradient;
+            }
+
+            var donut2 = new RGraph.Pie('donut2', [8,6,5,3,8,9,9,4]);
+            
+            // Create the gradients
+            var gradient = getGradient(donut2, 'red');
+            var gradient2 = getGradient(donut2, 'green');
+            var gradient3 = getGradient(donut2, 'pink');
+            var gradient4 = getGradient(donut2, 'yellow');
+            var gradient5 = getGradient(donut2, 'grey');
+            var gradient6 = getGradient(donut2, 'cyan');
+            var gradient7 = getGradient(donut2, 'red');
+            var gradient8 = getGradient(donut2, '#ddd');
+            var gradient9 = getGradient(donut2, 'blue');
+
+            donut2.Set('chart.variant', 'donut');
+            donut2.Set('chart.labels', ['Flipper', 'Harry', 'Ben', 'Richard', 'Keith', 'Ben', 'George', 'Barry']);
+            donut2.Set('chart.title', "Sales figures for week 43");
+            donut2.Set('chart.gutter.left', 35);
+            donut2.Set('chart.gutter.right', 35);
+            donut2.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+            donut2.Set('chart.colors', [gradient, gradient2, gradient3, gradient4, gradient5, gradient6, gradient7, gradient8, gradient9]);
+            donut2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Donut charts
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Donut charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div>
+
+        <p>
+            Formerly the Donut chart was a separate class, though now it's a variant of the Pie chart. This means smaller downloads and
+            a much simpler implementation. Essentially it's a Pie chart with a big hole in the middle.
+            comparisons easier.
+        </p>
+
+        <div>
+            <ul>
+                <li><a href="../docs/pie.html">Pie charts API documentation</a></li>
+            </ul>
+        </div>
+
+        <div>
+            <canvas id="donut1" width="430" height="350">[No canvas support]</canvas>
+            <canvas id="donut2" width="450" height="350">[No canvas support]</canvas>
+        </div>
+    </div>
+
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/funnel.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/funnel.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/funnel.html	(revision 225)
@@ -0,0 +1,168 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - funnel chart</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example funnel chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  Funnel charts examples" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.funnel.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        /**
+        * The onload function creates the graph
+        */
+        window.onload = function ()
+        {
+            var funnel = new RGraph.Funnel('funnel1', [100,45,45,26,21,5]);
+            funnel.Set('chart.gutter.top', 40);
+            funnel.Set('chart.text.boxed', false);
+            funnel.Set('chart.title', 'Leads progressing to sales');
+            
+            funnel.Set('chart.shadow', true);
+            funnel.Set('chart.shadow.color', 'gray');
+            funnel.Set('chart.shadow.blur', 25);
+            funnel.Set('chart.shadow.offsetx', 0);
+            funnel.Set('chart.shadow.offsety', 0);
+            
+            if (!RGraph.isIE8()) {
+            
+                /**
+                * This gradient is for the highlight fill
+                */
+                var grad = funnel.context.createLinearGradient(funnel.Get('chart.gutter.left'),0,funnel.canvas.width - funnel.Get('chart.gutter.right'),0);
+                grad.addColorStop(1, 'white');
+                grad.addColorStop(0, 'rgba(255,255,255,0)');
+            
+                funnel.Set('chart.tooltips', [
+                                              'id:tooltip_contact',
+                                              'id:tooltip_lead',
+                                              'id:tooltip_call',
+                                              'id:tooltip_visit',
+                                              'id:tooltip_sale',
+                                              '<b>After sales concern</b><br />An after sales concern or query was raised by the Customer.'
+                                             ]);
+
+                funnel.Set('chart.tooltips.effect', 'fade');
+                funnel.Set('chart.highlight.fill', grad);
+                funnel.Set('chart.zoom.hdir', 'center');
+                funnel.Set('chart.zoom.vdir', 'up');
+                funnel.Set('chart.contextmenu', [['Zoom in', RGraph.Zoom]]);
+            }
+
+            funnel.Set('chart.labels', ['Initial contact', 'Established lead', 'Telephone contact', 'Site visit', 'Sale', 'After sales']);
+            funnel.Set('chart.text.boxed', true);
+            funnel.Draw();
+
+
+            var funnel2 = new RGraph.Funnel('funnel2', [56,45,12,4,3,2,1]);
+            funnel2.Set('chart.title', 'A funnel');
+            funnel2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="./index.html">Examples</a>
+        >
+        Funnel chart
+    </div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Funnel chart</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        The funnel chart can be used to show stages in a sales or order process, from initial lead/contact through to actual sale.
+        It works well if you have a diminishing process, like that shown below. It can show potential revenue in each stage, or
+        like below, it can show actual numbers. It can also highlight potential problems in an organisations sales and/or order fulfillment
+        processes.
+    </p>
+
+    <div>
+        <div>
+            <ul>
+                <li><a href="../docs/funnel.html">Funnel charts API documentation</a></li>
+            </ul>
+        </div>
+        
+        <div style="text-align: center">
+            <canvas id="funnel1" width="400" height="400">[No canvas support]</canvas>
+            <canvas id="funnel2" width="400" height="400">[No canvas support]</canvas>
+        </div>
+    </div>
+
+    <div style="display: none">
+        <div id="tooltip_contact"><b>Initial contact</b><br />All potential cutomers were contacted and<br />interest was established.</div>
+        <div id="tooltip_lead"><b>Established lead</b><br />Customers who were interested had their details<br />recorded and passed to the sales team.</div>
+        <div id="tooltip_call"><b>Sales Call</b><br />Interested Customers were called by the<br />sales team.</div>
+        <div id="tooltip_visit"><b>Site visit</b><br />The Customers site was visited by a representative<br />of the sales core.</div>
+        <div id="tooltip_sale"><b>Sale agreed</b><br />A sale was finalised by the sales core.</div>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/gantt.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/gantt.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/gantt.html	(revision 225)
@@ -0,0 +1,179 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - gantt charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example gantt charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  Gantt charts examples" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.gantt.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+    
+    <style>
+        .RGraph_tooltip {
+            color: #00a ! important;
+        }
+        
+        .RGraph_tooltip b {
+            color: black ! important;
+        }
+    </style>
+
+    <script>
+        window.onload = function ()
+        {
+            var gantt1 = new RGraph.Gantt('gantt1');
+            gantt1.Set('chart.xmax', 122);
+            gantt1.Set('chart.gutter.right', 35);
+            gantt1.Set('chart.labels', ['January', 'February', 'March', 'April']);
+            gantt1.Set('chart.title', 'Work schedule for Xyz Ltd');
+            gantt1.Set('chart.defaultcolor', '#faa');
+            gantt1.Set('chart.background.grid', false);
+
+            if (!RGraph.isIE8()) {
+                gantt1.Set('chart.tooltips', ["<b>Richard Crenshaw</b><br />Working through adding something<br /> to the website.",
+                                              "<b>Rachel Higgenbottom</b><br />Singing sweetly",
+                                              "<b>Fred Bloggs</b><br />Building a new drive",
+                                              "<b>Barney Rubble</b><br />Not started adding the new garden",
+                                              "<b>Gloria Crockford</b><br />Just started dinner",
+                                              "<b>Paul Josford</b><br />Nearly finished the front garden",
+                                              "<b>Harry Secjom</b><br />Roughly half way through the book reading",
+                                              "<b>Shane Ritchford</b><br />Comedian",
+                                              "<b>Kyle Jasford</b><br />Gardening",
+                                              "<b>Cynthia Frances</b><br />Not entirely sure what she's doing",
+                                              "<b>Mabel Mincy</b><br />Making more lunches",
+                                               "<b>Paul MacFord</b><br />Putting everyone off their work",
+                                               "<b>Kiffen Longbottom</b><br />Farming Maize",
+                                               "<b>John Blussford</b><br />A deer"]);
+                gantt1.Set('chart.tooltips.effect', 'expand');
+            }
+
+            gantt1.Set('chart.events', [
+                                 [31, 28, 67, 'Richard'],
+                                 [0, 28, 50, 'Rachel'],
+                                 [12, 28, 45, 'Fred'],
+                                 [59, 14, 0, 'Barney'],
+                                 [59, 21, 5, 'Gloria'],
+                                 [46, 31, 92, 'Paul'],
+                                 [80, 21, 46, 'Harry'],
+                                 [94, 17, 84, 'Shane'],
+                                 [34, 14, 32, 'Kyle'],
+                                 [64, 14, 28, 'Cynthia'],
+                                 [13, 61, 74, 'Mabel'],
+                                 [84, 31, 16, 'Paul'],
+                                 [100, 22, 45, 'Kiffen'],
+                                 [0, 365, 50, 'John']
+                                ]);
+            var color = 'rgba(192,255,192,0.5)';
+            gantt1.Set('chart.vbars', [
+                                       [0, 10, color],
+                                       [20, 10, color],
+                                       [40, 10, color],
+                                       [60, 10, color],
+                                       [80, 10, color],
+                                       [100, 10, color]
+                                      ]);
+            gantt1.Set('chart.borders', false);
+            gantt1.Set('chart.title.vpos', 0.6);
+            gantt1.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Gantt charts
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Gantt charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div>
+        <p>
+            Gantt charts are used to show scheduling information. It is commonly used in project management but can also be used,
+            for example, to show holiday schedule information. In this case it would be easy to see when someone is unavailable.
+            The Gantt chart can have clickable bars  that can be used to provide more detail. It can also show vertical bars
+            that can be used to indicate events, or as in the cases below, can be decorative.
+        </p>
+        
+        <p>
+            The chart is made of "units", in this case 365. This represents days in a year. The labels are separate, being equally
+            spaced across the chart. This means you can use more meaningful labels, which are easier to comprehend. As in the
+            example charts.
+        </p>
+    </div>
+
+    <div>
+        <ul>
+            <li><a href="../docs/gantt.html">Gantt chart API documentation</a></li>
+        </ul>
+    </div>
+
+    <div style="text-align: center">
+        <canvas id="gantt1" width="900" height="300">[No canvas support]</canvas>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/hbar.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/hbar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/hbar.html	(revision 225)
@@ -0,0 +1,125 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - horizontal bar charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example horizontal bar charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  Horizontal Bar charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.hbar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        /**
+        * The onload function creates the chart
+        */
+        window.onload = function ()
+        {
+
+            var hbar1 = new RGraph.HBar('hbar1', [55.11, 21.63, 11.94, 7.15, 2.14, 1.11, 0.91]);
+
+            var grad = hbar1.context.createLinearGradient(275,0,900, 0);
+            grad.addColorStop(0, 'white');
+            grad.addColorStop(1, 'blue');
+
+            hbar1.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+            hbar1.Set('chart.gutter.left', 275);
+            hbar1.Set('chart.gutter.right', 10);
+            hbar1.Set('chart.background.grid.autofit', true);
+            hbar1.Set('chart.title', 'Browser usage (NetApps) in May 2011');
+            hbar1.Set('chart.labels', ['Microsoft Internet Explorer (55.11%)','Mozilla Firefox (21.63%)', 'Google Chrome (11.94)','Apple Safari (7.15%)','Opera (2.14%)','Opera Mini (1.11)','Other (0.91%)']);
+            hbar1.Set('chart.shadow', true);
+            hbar1.Set('chart.shadow.color', 'gray');
+            hbar1.Set('chart.shadow.offsetx', 0);
+            hbar1.Set('chart.shadow.offsety', 0);
+            hbar1.Set('chart.shadow.blur', 15);
+            hbar1.Set('chart.colors', [grad]);
+            hbar1.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="./index.html">Examples</a>
+        >
+        Horizontal Bar charts
+    </div>
+
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Horizontal bar charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        A horizontal bar chart can be useful when your labels are too big for regular bar charts.
+    </p>
+    
+    <ul>
+        <li><a href="../docs/hbar.html">The API documentation</a></li>
+    </ul>
+
+    <a name="gutter-example"></a>
+    <canvas id="hbar1" width="900" height="400">[No canvas support]</canvas>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/hprogress.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/hprogress.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/hprogress.html	(revision 225)
@@ -0,0 +1,128 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - horizontal progress bar</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example horizontal progress bar" />
+    <meta name="description" content="RGraph: Javascript charts and graph library -  Horizontal Progress Bar example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.common.adjusting.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.hprogress.js"></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            progress1 = new RGraph.HProgress('progress1', [59.65, 22.96, 7.98, 5.27, 4.09], 100);
+            progress1.Set('chart.colors', ['blue', 'red', 'yellow', 'green','black']);
+            progress1.Set('chart.key', ['Microsoft Internet Explorer (59.65%)', 'Mozilla Firefox (22.96%)', 'Google Chrome (7.98%)', 'Apple Safari (5.27%)','Other (4.09%)']);
+            progress1.Set('chart.tooltips', ['Microsoft Internet Explorer (59.65%)', 'Mozilla Firefox (22.96%)', 'Google Chrome (7.98%)', 'Apple Safari (5.27%)','Other (4.09%)']);
+            progress1.Set('chart.units.post', '%');
+            progress1.Set('chart.tickmarks.zerostart', true);
+            progress1.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Horizontal Progress bar
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Horizontal Progress bar</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        This is a Progress Bar for showing state. You can show anything with it - use it to show load on your server,
+        or percentage space free on your servers disk drive. You could even incorporate it with some AJAX to retrieve status information
+        from your webserver dynamically, making the Progress Bar realtime. To redraw the progress bar simply call <i>RGraph.Clear()</i>
+        (which clears the canvas) and then call <i>myProgress.Draw()</i> again.
+    </p>
+        
+    <p>
+        The colours, title and scale are configurable, allowing you to represent a wide range of values.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/hprogress.html">Horizontal Progress bar API documentation</a></li>
+            <li><a href="vprogress.html">Vertical progress bar</a></li>
+        </ul>
+    </div>
+
+    
+    <p style="text-align: center">
+        <b>Browser market share in September (custom highlight)</b>
+        <canvas id="progress1" width="1000" height="80">[No canvas support]</canvas>
+    </p>
+
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/index.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/index.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/index.html	(revision 225)
@@ -0,0 +1,141 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<!--
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+-->
+<html>
+<head>
+    <title>RGraph: Javascript charts and graph library - example charts</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <meta name="keywords" content="rgraph charts html5 javascript charts canvas" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - examples" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.rose.js" ></script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+    
+    <script>
+        window.onload = function ()
+        {
+            var rose1 = new RGraph.Rose('cvs', [41,37,16,3,3,45,26,25,24,12,34,60,36,24,23,12]);
+            rose1.Set('chart.colors.alpha', 0.5);
+            rose1.Set('chart.colors', ['rgb(0,255,0)', 'red']);
+            rose1.Set('chart.gutter.top', 30);
+            rose1.Set('chart.labels', ['Bev','Ben','Violet','Olga','Wez','Tristan','Hoolio','Nevil','Gary','Pete','Lou','Jim','Rich','Dave','Kevin','Jamie']);
+            rose1.Set('chart.tooltips', ['Bev','Ben','Violet','Olga','Wez','Tristan','Hoolio','Nevil','Gary','Pete','Lou','Jim','Rich','Dave','Kevin','Jamie']);
+            rose1.Draw();
+        }
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    Examples
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Example charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div style="background-color: #ffb; border: 2px dashed #000; padding: 3px">
+        12th July 2011: The Tradar chart has been renamed to the Radar chart. You WILL need to update your code slightly.
+    </div>
+
+<p>
+    The following example charts are available:
+</p>
+
+<div style="float: right; text-align: center; width: 430px">
+    <b>A Rose chart of sales statistics</b>
+    <canvas id="cvs" width="430" height="400" style="margin-right: 100px">[No canvas support]</canvas>
+</div>
+
+</div>
+
+<ul>
+    <li><a href="bar.html">Bar charts</a></li>
+    <li><a href="bipolar.html">Bi-polar charts</a></li>
+    <li><a href="donut.html">Donut charts</a></li>
+    <li><a href="funnel.html">Funnel charts</a></li>
+    <li><a href="gantt.html">Gantt charts</a></li>
+    <li><a href="hbar.html">Horizontal Bar charts</a></li>
+    <li><a href="hprogress.html">Horizontal progress bar</a></li>
+    <li><a href="led.html">LED grid</a></li>
+    <li><a href="line.html">Line charts</a></li>
+    <li><a href="meter.html">Meter charts</a></li>
+    <li><a href="odo.html">Odometer charts</a></li>
+    <li><a href="pie.html">Pie charts</a></li>
+    <li><a href="radar.html">Radar charts</a></li>
+    <li><a href="rscatter.html">Radial scatter charts</a></li>
+    <li><a href="rose.html">Rose charts</a></li>
+    <li><a href="scatter.html">Scatter charts</a></li>
+    <li><a href="thermometer.html">Thermometer charts</a></li>
+    <li><a href="vprogress.html">Vertical progress bar</a></li>
+    <li><a href="waterfall.html">Waterfall charts</a></li>
+</ul>
+
+<ul>
+    <li><a href="basic.html">A basic example (for implementation help)</a></li>
+</ul>
+
+    <h4>More examples</h4>
+    
+    <p>
+        There are more usage examples as well as implementation guidance in the <a href="../docs/index.html">documentation</a>.
+    </p>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/led.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/led.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/led.html	(revision 225)
@@ -0,0 +1,113 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - LED grid</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example led grid" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - LED grid example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.led.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            var led1 = new RGraph.LED('led1', 'an led display');
+            led1.Set('chart.zoom.hdir', 'center');
+            led1.Set('chart.zoom.vdir', 'center');
+            led1.Set('chart.light', 'red');
+            led1.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    LED Grid
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - LED Grid</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        An LED grid, that could be used to show a multitude of things. Could be used as a website counter for example.
+        It supports the A-Z, 0-9 and space characters. As you can see the colors are also user-definable. It also
+        supports the context menu, and therefore the zoom. The first LED grid demonstrates this.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/led.html">LED Grid API documentation</a></li>
+        </ul>
+    </div>
+
+    <div style="width: 50%; margin-left: 250px; text-align: center">
+        <canvas id="led1" width="500" height="60">[No canvas support]</canvas>
+    </div>
+
+    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/line.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/line.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/line.html	(revision 225)
@@ -0,0 +1,167 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - line charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example line chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Line chart example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.line.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            var line1 = new RGraph.Line('line1', [56,45,43,52,56,65,21,23,34,15,21,-12,-13,-31,-25], [35,43,41,41,42,46,42,39,46,41,45,65,54,54,41,41]);
+            line1.Set('chart.background.barcolor1', 'white');
+            line1.Set('chart.background.barcolor2', 'white');
+            line1.Set('chart.background.grid', true);
+            line1.Set('chart.linewidth', 5);
+            line1.Set('chart.gutter.left', 35);
+            line1.Set('chart.hmargin', 5);
+            line1.Set('chart.shadow', true);
+            line1.Set('chart.tickmarks', null);
+            line1.Set('chart.units.post', 'k');
+            line1.Set('chart.xticks', 8);
+            line1.Set('chart.colors', ['red', 'green']);
+            line1.Set('chart.key', ['Sales (not good)','Costs (reasonably consistent)']);
+            line1.Set('chart.key.shadow', true);
+            line1.Set('chart.key.shadow.offsetx', 0);
+            line1.Set('chart.key.shadow.offsety', 0);
+            line1.Set('chart.key.shadow.blur', 15);
+            line1.Set('chart.key.shadow.color', '#ddd');
+            line1.Set('chart.key.rounded', true);
+            line1.Set('chart.key.position', 'graph');
+            line1.Set('chart.key.position.x', line1.Get('chart.gutter.left') + 4);
+            line1.Set('chart.key.position.y', (line1.canvas.height / 2) + 5);
+            line1.Set('chart.xaxispos', 'center');
+            line1.Set('chart.background.grid.autofit', true);
+            line1.Set('chart.background.grid.autofit.numhlines', 16);
+            line1.Set('chart.title', 'Sales last year');
+            line1.Draw();
+            
+            var line2 = new RGraph.Line('line2', [6,5,4,5,6,4,1,2,3], [7,8,9,9,8,7,8,7,6]);
+            line2.Set('chart.labels', ['13th','14th','15th','16th','15th','16th','17th','18th','19th']);
+            line2.Set('chart.title', 'Range of fuel consumption');
+            line2.Set('chart.title.vpos', 0.5);
+            line2.Set('chart.background.barcolor1', 'white');
+            line2.Set('chart.background.barcolor2', 'white');
+            line2.Set('chart.filled', true);
+            line2.Set('chart.filled.range', true);
+            line2.Set('chart.fillstyle', 'rgba(128,255,128,0.5)');
+            line2.Set('chart.linewidth', 2);
+            line2.Set('chart.colors', ['green']);
+            line2.Set('chart.hmargin', 5);
+            line2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Line chart
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Line charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <div>
+        <p>
+            Like Bar charts, Line charts are some of the most versatile chart types. It is similar, but can indicate chronological
+            data better. Line charts are good if, for example, you want to illustrate sales figures over a year (or any period of
+            time). You'll then be able to easily see whether sales are going up, down or are stagnant. It will also become apparent
+            which months are busier than others. By using a multiple line chart you can add multiple sets of data (eg two or more years
+            of figures) to your chart. You can customise the line chart by stipulating it as being filled, having drop shadows, keys,
+            having the X axis in the centre, different colors, different tickmark styles and tooltips etc.
+        </p>
+        
+        <p>
+            The first chart uses external DIVs for the tooltip contents. The DIVs are at the bottom of this page (they're set not to
+            be visible). Using external DIVs for tooltips can make maintenance easier.
+        </p>
+    
+        <div>
+            <ul>
+                <li><a href="../docs/line.html">Line charts API documentation</a></li>
+            </ul>
+        </div>
+
+        <div>
+          <div> 
+        <canvas id="radar2" width="450" height="300">[No canvas support]</canvas> 
+        <canvas id="radar5" width="450" height="300">[No canvas support]</canvas> 
+    </div> 
+        </div>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/meter.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/meter.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/meter.html	(revision 225)
@@ -0,0 +1,165 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - meter charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example meter charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Meter charts examples" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.common.resizing.js" ></script>
+    <script src="../libraries/RGraph.meter.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            var meter1 = new RGraph.Meter('meter1', 50, 100, 58);
+            
+            var grad1 = meter1.context.createRadialGradient(meter1.canvas.width / 2,meter1.canvas.height - 25,0,meter1.canvas.width / 2,meter1.canvas.height - 25,200);
+            grad1.addColorStop(0, 'green');
+            grad1.addColorStop(1, 'white');
+            
+            var grad2 = meter1.context.createRadialGradient(meter1.canvas.width / 2, meter1.canvas.height - 25,0,meter1.canvas.width / 2, meter1.canvas.height - 25,200);
+            grad2.addColorStop(0, 'yellow');
+            grad2.addColorStop(1, 'white');
+            
+            var grad3 = meter1.context.createRadialGradient(meter1.canvas.width / 2, meter1.canvas.height - 25,0,meter1.canvas.width / 2, meter1.canvas.height - 25,200);
+            grad3.addColorStop(0, 'red');
+            grad3.addColorStop(1, 'white');
+            
+            //meter1.Set('chart.contextmenu', [['Zoom in', RGraph.Zoom], ['Show palette', RGraph.Showpalette], ['Clear annotations', function () {RGraph.Clear(meter1.canvas); meter1.Draw();}], null, ['Cancel', function () {}]]);
+            meter1.Set('chart.annotatable', true);
+            meter1.Set('chart.labels.position', 'inside');
+            meter1.Set('chart.title', 'A sample measurement');
+            meter1.Set('chart.title.vpos', 0.5);
+            meter1.Set('chart.title.color', 'black');
+            meter1.Set('chart.green.color', grad1);
+            meter1.Set('chart.yellow.color', grad2);
+            meter1.Set('chart.red.color', grad3);
+            meter1.Set('chart.shadow', true);
+            meter1.Set('chart.shadow.color', 'gray');
+            meter1.Set('chart.shadow.offsetx', 0);
+            meter1.Set('chart.shadow.offsety', 0);
+            meter1.Set('chart.shadow.blur', 15);
+            meter1.Set('chart.zoom.hdir', 'center');
+            meter1.Set('chart.zoom.vdir', 'center');
+            meter1.Set('chart.contextmenu', [['Clear', function () {RGraph.Clear(meter1.canvas); meter1.Draw();}]]);
+            
+            meter1.Set('chart.tickmarks.small.num', 100);
+            meter1.Set('chart.tickmarks.big.num', 10);
+            meter1.Set('chart.tickmarks.small.color', '#bbb');
+            meter1.Set('chart.tickmarks.big.color', 'black');
+            meter1.Set('chart.scale.decimals', 1);
+            meter1.Draw();
+
+            var meter2 = new RGraph.Meter('meter2', 0, 10, 5);
+            meter2.Set('chart.units.post', 'kg');
+            meter2.Set('chart.red.start', 0);
+            meter2.Set('chart.red.end', 3);
+            meter2.Set('chart.yellow.start', 3);
+            meter2.Set('chart.yellow.end', 6);
+            meter2.Set('chart.green.start', 6);
+            meter2.Set('chart.green.end', 10);
+            meter2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Meter charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="./index.html">Examples</a>
+        >
+        Meter
+    </div>
+    
+    <div>
+        <p>
+            Meter charts are similar to Odometer charts albeit only a semi-circle and not a full circle. It can be better when trying illustrate
+            a particular level, but only have a limited amount of space. It could also be quite effective as part of a control panel.
+        </p>
+        
+        <p></p>
+    </div>
+
+    <div>
+        <ul>
+            <li><a href="../docs/meter.html">Meter charts API documentation</a></li>
+        </ul>
+    </div>
+    
+    <div style="text-align: center">
+        <canvas id="meter1" width="400" height="250"><div class="canvasfallback">[No canvas support]</div></canvas>
+        &nbsp;&nbsp;&nbsp;&nbsp;
+        <canvas id="meter2" width="400" height="250"><div class="canvasfallback">[No canvas support]</div></canvas>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/odo.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/odo.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/odo.html	(revision 225)
@@ -0,0 +1,166 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - odometer charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example odometer charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Odometer charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.odo.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            // ID, MINIMUM, MAXIMUM, INDICATED VALUE
+            var odo1 = new RGraph.Odometer('odo1', 0, 12,9.5);
+            odo1.Set('chart.labels', ['12', '1','2','3','4','5','6','7','8','9','10','11']);
+            odo1.Set('chart.needle.thickness', 5);
+            odo1.Set('chart.needle.color', 'black');
+            odo1.Set('chart.needle.extra', [[6, 'black', 50]]);
+            odo1.Set('chart.needle.head', false);
+            odo1.Set('chart.label.area', 40);
+            odo1.Set('chart.shadow.outer', true);
+            odo1.Set('chart.needle.tail', false);
+
+            odo1.Set('chart.green.color', 'gray');
+            odo1.Set('chart.yellow.color', 'gray');
+            odo1.Set('chart.red.color', 'gray');
+            
+            RGraph.AddCustomEventListener(odo1, 'ondraw',
+                function (obj)
+                {
+                    var context = obj.context;
+                    context.strokeStyle = 'black';
+                    context.fillStyle = 'white';
+                    context.beginPath();
+                        context.moveTo(obj.centerx, obj.centery);
+                        context.arc(obj.centerx, obj.centery, 10, 0, 6.28, 0);
+                    context.stroke();
+                    context.fill();
+                }
+            );
+
+            odo1.Draw();
+            
+            var odo2 = new RGraph.Odometer('odo2', 0, 360, 56);
+            odo2.Set('chart.needle.color', 'black');
+            odo2.Set('chart.needle.tail', false);
+            odo2.Set('chart.label.area', 35);
+            odo2.Set('chart.border', RGraph.isIE8() ? false : true);
+            odo2.Set('chart.title.vpos', 0.3);
+            odo2.Set('chart.labels', ['N','NE','E','SE','S','SW','W','NW']);
+            odo2.Set('chart.red.min', 360);
+            odo2.Set('chart.red.color', 'gray');
+            odo2.Set('chart.value.text', true);
+            odo2.Set('chart.value.units.post', '°');
+            odo2.Draw();
+            
+            
+            var odo3 = new RGraph.Odometer('odo3',0, 200, 160);
+            odo3.Set('chart.green.max', 150);
+            odo3.Set('chart.red.min', 175);
+            odo3.Set('chart.shadow.inner', true);
+            odo3.Set('chart.value.text', true);
+            odo3.Set('chart.value.units.post', ' litres');
+            odo3.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Odometer charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+
+    <div id="breadcrumb">
+        <a href="../index.html">RGraph: Javascript charts and graph library</a>
+        >
+        <a href="./index.html">Examples</a>
+        >
+        Odometer charts
+    </div>
+    
+    <div>
+        <p>
+            Odometer charts can be used to provide an indication of a particular value. For example you could easily use them to
+            represent values for a control panel that shows information about a server. Odometer charts indicating how much disk
+            space is used for example, would be more visual than a simple number.
+        </p>
+        
+        <p>
+            The green, yellow and red areas are configurable, allowing you to add some level of urgency into your figures
+            (as are the colors). The
+            figures are also configurable, so it can go from 0-10, or from 0-100.
+        </p>
+    </div>
+
+    <div>
+        <ul>
+            <li><a href="../docs/odo.html">Odometer charts API documentation</a></li>
+        </ul>
+    </div>
+    
+    <canvas id="odo1" width="300" height="300">[No canvas support]</canvas>
+    <canvas id="odo2" width="300" height="300">[No canvas support]</canvas>
+    <canvas id="odo3" width="300" height="300">[No canvas support]</canvas>
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/pie.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/pie.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/pie.html	(revision 225)
@@ -0,0 +1,158 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - pie charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example pie charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Pie charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+    
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.pie.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            /**
+            * These are not angles - these are values. The appropriate angles are calculated
+            */
+            var pie1 = new RGraph.Pie('pie1', [41,37,16,6]); // Create the pie object
+            pie1.Set('chart.labels', ['MSIE 7 (41%)', 'MSIE 6 (37%)', 'Firefox (16%)', 'Safari (3%)', 'Other (3%)']);
+            pie1.Set('chart.labels.sticks', true);
+            pie1.Set('chart.gutter.left', 30);
+            pie1.Set('chart.gutter.right', 30);
+            pie1.Set('chart.title', "Browser share");
+            pie1.Set('chart.shadow', false);
+            pie1.Set('chart.tooltips.effect', 'fade');
+            pie1.Set('chart.tooltips.event', 'onmousemove');
+            //pie1.Set('chart.exploded', [0,0,15,25]);
+            pie1.Set('chart.tooltips', [
+                                        'Internet Explorer 7 (41%)',
+                                        'Internet Explorer 6 (37%)',
+                                        'Mozilla Firefox (16%)',
+                                        'Other (6%)'
+                                       ]
+                                      );
+            pie1.Set('chart.highlight.style', '2d');
+            pie1.Set('chart.linewidth', 1);
+            pie1.Set('chart.strokestyle', 'gray');
+            pie1.Set('chart.shadow', true);
+            pie1.Set('chart.shadow.offsetx', 0);
+            pie1.Set('chart.shadow.offsety', 0);
+            pie1.Set('chart.shadow.blur', 15);
+            pie1.Set('chart.exploded', [0,0,20,20]);
+            pie1.Draw();
+
+            var pie2 = new RGraph.Pie('pie2', [12,29,45,17,7]); // Create the pie object
+            pie2.Set('chart.gutter.left', 45);
+            pie2.Set('chart.colors', ['red', 'pink', '#6f6', 'blue', 'yellow']);
+            pie2.Set('chart.key', ['John (2%)', 'Richard (29%)', 'Fred (45%)', 'Brian (17%)', 'Peter (7%)']);
+            pie2.Set('chart.key.background', 'white');
+            pie2.Set('chart.align', 'left');
+            pie2.Set('chart.strokestyle', '#aaa');
+            pie2.Set('chart.linewidth', 1);
+            pie2.Set('chart.exploded', [5,5,5,5,5]);
+            pie2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Pie chart
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Pie charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <div>
+
+        <p>
+            Pie charts can be used when you need to represent a value as part of a whole. It is commonly used to represent percentages,
+            relative magnitudes or relative frequencies. If your intent is to compare a particular value (slice) against the whole of
+            the Pie chart, then it can be quite effective. If however you want to compare two seperate segments, then it can get
+            more difficult. If this is the case, you may want to consider a bar chart for example.
+        </p>
+        
+        <p>
+            The colours can be customised, as can the borders (using the same color as the background and a line width of
+            about 5 gives the effect of segment separation. The chart can also have a drop shadow if you want one, but this shouldn't
+            be used in conjunction with segment seperation.
+        </p>
+    </div>
+
+    <div>
+        <ul>
+            <li><a href="../docs/pie.html">Pie charts API documentation</a></li>
+        </ul>
+    </div>
+    
+    <div style="text-align: center">
+        <canvas id="pie1" width="450" height="300">[No canvas support]</canvas>
+        <canvas id="pie2" width="400" height="300">[No canvas support]</canvas>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/radar.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/radar.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/radar.html	(revision 225)
@@ -0,0 +1,185 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - Radar charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example radar charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Radar charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.context.js" ></script>
+    <script src="../libraries/RGraph.common.annotate.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.common.zoom.js" ></script>
+    <script src="../libraries/RGraph.radar.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            if (RGraph.isIE8()) {
+                ShowGraph1();
+                ShowGraph2();
+                ShowGraph3();
+            }
+        }
+        
+        function ShowGraph1 ()
+        {
+            var radar1 = new RGraph.Radar('radar5', [43,84,54,64,34,21,21], [52,30,51,41,22,23,56]);
+            radar1.Set('chart.colors', ['rgba(255,0,0,0.3)']);
+            radar1.Set('chart.labels.axes', 'n');
+            radar1.Set('chart.circle', 50);
+            radar1.Set('chart.circle.fill', 'rgba(0, 0, 255, 0.3)');
+            radar1.Set('chart.tooltips', [
+                                           'Dave (43)', 'John (84)', 'Kiffen (54)', 'Peter (64)', 'Lou (34)', 'Igor (21)', 'John (21)',
+                                           'Dave (52)', 'John (30)', 'Kiffen (51)', 'Peter (41)', 'Lou (22)', 'Igor (23)', 'John (56)',
+                                          ]);
+            radar1.Set('chart.colors', ['green', 'red']);
+            radar1.Set('chart.colors.alpha', 0.5);
+            radar1.Set('chart.title', 'The results of the competition');
+            radar1.Set('chart.labels', ['Dave (43)', 'John (84)', 'Kiffen (54)', 'Peter (64)', 'Lou (34)', 'Igor (21)', 'John (21)']);
+            radar1.Set('chart.tooltips.effect', 'fade');
+            radar1.Draw();
+        }
+        
+        function ShowGraph2 ()
+        {
+            var radar = new RGraph.Radar('radar2', [7,6,6,7,8], [6,7,7,6,6], [4,5,6,10,4]);
+            radar.Set('chart.strokestyle', 'black');
+            radar.Set('chart.colors.alpha', 0.3);
+            radar.Set('chart.colors', ['red', 'green', 'yellow']);
+            radar.Set('chart.title', 'Multiple datasets, key');
+            radar.Set('chart.tooltips.effect', 'snap');
+            radar.Set('chart.tooltips', [
+                                          'Pete in 2000','Lou in 2000','Jim in 2000','Jack in 2000','Fred in 2000',
+                                          'Pete in 2001','Lou in 2001','Jim in 2001','Jack in 2001','Fred in 2001',
+                                          'Pete in 2002','Lou in 2002','Jim in 2002','Jack in 2002','Fred in 2002'
+                                         ]);
+            radar.Set('chart.key', ['2000','2001','2002']);
+            radar.Set('chart.key.position', 'graph');
+            radar.Set('chart.labels', ['Pete','Lou','Jim','Jack','Fred']);
+            radar.Set('chart.gutter.top', 35);
+            radar.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Radar charts
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Radar charts</h1>
+
+    <div style="background-color: #ffb; border: 2px dashed #000; padding: 3px">
+        This chart used to be called the Tradar chart (T standing for "Traditional" - there used to be two Radar charts in RGraph),
+        however now (July 2011), it has been renamed to the "Radar" chart to make it easier for people to identify. If you use it
+        you will need to update your code accordingly. Keep in mind that if you use the .type property - this has been updated too
+        (to <i>radar</i>).
+    </div>
+ 
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <div style="float: right; width: 450px">
+    </div>
+    
+    <p>
+        Radar charts, that are similar to Rose charts. Each of the data points is
+        arranged equally in terms of angle, whilst the magnitude of each point is shown by the distance from the centre. Thus,
+        data points of a higher magnitude can be seen as they are more distant from the centre.
+    </p>
+    
+    <p>
+        Suitable for many datasets, but not all. If not, then Rose charts may be more apt.
+    </p>
+    
+    <p>
+        The circle, as can be seen in the second example, could be used to indicate a threshold of sorts. In the example,
+        it could be minimum sales required for a particular month. Months that fall below this threshold can be clearly seen.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/radar.html">Radar charts API documentation</a></li>
+            <li><a href="rose.html">Rose charts examples</a></li>
+        </ul>
+    </div>
+
+    <div>
+        <canvas id="radar2" width="450" height="300">[No canvas support]</canvas>
+        <canvas id="radar5" width="450" height="300">[No canvas support]</canvas>
+    </div>
+
+    
+    
+    <script>
+        if (!RGraph.isIE8()) {
+            ShowGraph1();
+            ShowGraph2();
+        }
+    </script>
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/rose.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/rose.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/rose.html	(revision 225)
@@ -0,0 +1,137 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - rose charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example rose charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Rose charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.rose.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {            
+            var rose1 = new RGraph.Rose('rose3', [[4,5,2],[3,5,4],[2,9,4],[1,8,5],[3,6,7],[4,8,5],[6,5,8],[6,9,8]]);
+            
+            // Rose chart now supports functions as tooltips
+            rose1.Set('chart.tooltips',
+                function (index)
+                {
+                    if (index % 3 == 0) {
+                        return 'Julie';
+                    } else if (index % 3 == 1) {
+                        return 'Frederick';
+                    } else if (index % 3 == 2) {
+                        return 'Jobe';
+                    }
+                }
+            );
+            rose1.Set('chart.colors.alpha', 0.5);
+            rose1.Set('chart.labels', ['NE','E','SE','S','SW','W','NW','']);
+            rose1.Set('chart.labels.position', 'edge');
+            rose1.Draw();
+            
+            var rose2= new RGraph.Rose('rose4', [[45,75],[45,23],[45,26],[78,4],[49,12],[49,21],[40,18],[48,12],[43,23],[45,12]]);
+            rose2.Set('chart.title.vpos', 0.5);
+            rose2.Set('chart.colors.alpha', 0.5);
+            rose2.Set('chart.colors.sequential', true);
+            rose2.Set('chart.labels', ['Fred','Julie','Denise','Cynthia','Peter','Wez','Noddy','James','Jimmy','Craig']);
+            rose2.Set('chart.labels.position', 'edge');
+            rose2.Set('chart.variant', 'non-equi-angular');
+            rose2.Set('chart.tooltips', ['Fred','Julie','Denise','Cynthia','Peter','Wez','Noddy','James','Jimmy','Craig']);
+            rose2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Rose charts
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Rose charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        The Rose chart was formally called the Pseudo-Radar chart.
+    </p>
+
+    <ul>
+        <li><a href="../docs/rose.html">Rose charts API documentation</a></li>
+    </ul>
+    <div style="display: inline-block; text-align: center; font-family: Verdana">
+        <b>A stacked Rose chart</b><br />
+        <canvas id="rose3" width="450" height="350">[No canvas support]</canvas>
+    </div>
+
+    <div style="display: inline-block; text-align: center; font-family: Verdana">
+        <b>A "non-equi-angular" Rose chart</b><br />
+        <canvas id="rose4" width="450" height="350">[No canvas support]</canvas>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/rscatter.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/rscatter.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/rscatter.html	(revision 225)
@@ -0,0 +1,135 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html >
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - Radial scatter charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example radial scatter chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Radial scatter chart example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.rscatter.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            // Create the data
+            var data = [];
+            for (var i=0; i<75; i++) {
+                data.push([RGraph.random(0, 360), i * RGraph.random(0, 10)]);
+            }
+
+            var rscatter1 = new RGraph.Rscatter('cvs', data);
+            rscatter1.Set('chart.labels.axes', 'n');
+            rscatter1.Set('chart.labels.position', 'edge');
+            rscatter1.Set('chart.labels', ['NE', 'E', 'SE', 'S', 'SW', 'W', 'NW', '']);
+            rscatter1.Set('chart.tickmarks', 'plus');
+            rscatter1.Set('chart.tooltips.effect', 'contract');
+            rscatter1.Set('chart.title', 'Direction and magnitude');
+            rscatter1.Set('chart.title.color', 'black');
+            rscatter1.Set('chart.title.vpos', 0.3);
+            rscatter1.Draw();
+            
+            rscatter2 = new RGraph.Rscatter('cvs2', [
+                                                     [30, 120, 'red'],
+                                                     [350, 100, 'blue'],
+                                                     [456, 97, 'black'],
+                                                     [125, 67, 'red'],
+                                                     [245, 84, 'green'],
+                                                    ]);
+            rscatter2.Set('chart.title', 'Another Radial scatter chart');
+            rscatter2.Set('chart.title.color', 'black');
+            rscatter2.Set('chart.title.vpos', 0.3);
+            rscatter2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Radial scatter charts
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Radial scatter charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        Radial scatter charts are a circular variant of regular Scatter charts, and as the name suggests, circular. They
+        may be more suited to your dataset than regular scatter charts.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/rscatter.html">Radial scatter charts API documentation</a></li>
+        </ul>
+    </div>
+
+    <div style="text-align: center">
+        <canvas id="cvs" width="350" height="350">[No canvas support]</canvas>
+        <canvas id="cvs2" width="350" height="350">[No canvas support]</canvas>
+    </div>
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/scatter.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/scatter.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/scatter.html	(revision 225)
@@ -0,0 +1,155 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - scatter charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example scatter chart" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Scatter charts example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.scatter.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+
+            var data = [
+                     [10,15,'red'],[13,16,'red'],[12,11,'red'],[15,16,'red'],[20,19,'red'],[19,16,'red'],[13,15,'red'],[11,12,'red'],[13,16,'red'],[5,19,'red'],[16,15,'red'],[13,15,'red'],[14,14,'red'],[12,12,'red'],
+                     [5,4,'green'],[6,14,'green'],[19,12,'green'],[3,5,'green'],[1,16,'green'],[13,5,'green'],[15,15,'green'],[13,5,'green'],[4,9,'green'],[16,6,'green'],[13,18,'green'],[18,12,'green'],[19,18,'green'],[13,16,'green'],[15,14,'green'],
+                     [12,4,'blue'],[4,23,'blue'],[13,8,'blue'],[12,12,'blue'],[18,4,'blue'],[4,18,'blue'],[11,2,'blue'],[4,3,'blue'],[5,8,'blue'],[1,9,'blue'],[4,6,'blue'],[16,8,'blue'],[17,8,'blue'],[19,9,'blue'],[13,5,'blue'],[16,21,'blue'],
+                     [12,4],[13,12],[11,16],[4,19],[4,3],[5,6],[1,9],[4,12],[6,12],[8,8],[16,6],[13,5],[15,13],[23,23,'red'], [1,1, 'gray'],
+                     [1,4,'gray'], [2,3,'gray'], [1,6,'gray'], [2,3,'gray'], [2,5,'gray'], [3,7,'gray'], [1,4,'gray'], [2,7,'gray']
+                    ];
+
+            var scatter1 = new RGraph.Scatter('scatter1', data);
+            scatter1.Set('chart.ylabels.count', 10);
+            scatter1.Set('chart.background.hbars', [[0,null,'rgba(0,255,0,0.3)']]);
+            scatter1.Set('chart.background.grid.autofit', true);
+            scatter1.Set('chart.background.grid.autofit.numhlines', 10);
+            scatter1.Set('chart.labels', [['Week 1', 0], ['Week 2', 7], ['Week 3', 14], ['Week 4', 21]]);
+            scatter1.Set('chart.labels.specific.align', 'center');
+            scatter1.Set('chart.xmax', 28); // Necessary
+            scatter1.Set('chart.defaultcolor', 'black'); // Optional
+            scatter1.Set('chart.title', 'A scatter chart');
+            scatter1.Set('chart.gutter.left', 40);
+            scatter1.Set('chart.tickmarks', 'square');
+            scatter1.Set('chart.ticksize', 4);
+            scatter1.Set('chart.ymax', 30);
+            scatter1.Set('chart.units.pre', '$');
+            scatter1.Set('chart.line.colors', ['red','blue','black']);
+            scatter1.Set('chart.key', ['Bob','Fred','Gaz']);
+            scatter1.Draw();
+
+            
+            
+            var scatter2 = new RGraph.Scatter('scatter2', [
+                                                       [10,[21,22,26,31,35, 'red', 'green']],
+                                                       [105,[10,10,15,25,30, 'red', 'green']],
+                                                       [125,[10,15,25,35,45, 'red', 'green']],
+                                                       [325,[10,15,25,35,45, 'yellow', 'green', 30]] // The last value is the width (in pixels)
+                                                      ]);
+            scatter2.Set('chart.title', 'A Scatter chart boxplot');
+            scatter2.Set('chart.tickmarks', null);
+            scatter2.Set('chart.labels', ['Q1', 'Q2', 'Q3', 'Q4']);
+            scatter2.Set('chart.xmax', 365);
+            scatter2.Set('chart.ymax', 50);
+            scatter2.Set('chart.ymin', 10);
+            scatter2.Set('chart.boxplot.width', 12); // The default width
+            scatter2.Set('chart.background.vbars', [[182.5, 91.125, 'rgba(0,255,0,0.5)']]);
+            scatter2.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Scatter charts
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Scatter charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+    
+    <p>
+        Scatter charts use two variables to plot points and makes it clear where there are congregations. The data points
+        make up the X and Y coordinates. The labels on the X axis are separate from the X units, allowing you to "group" them. For
+        example, like the example, you could set the maxium X value to be 365, but only have four labels. That way you would
+        have a granularity of a day, but the X axis would only have four labels. Like the example.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/scatter.html">Scatter charts API documentation</a></li>
+        </ul>
+    </div>
+
+    <canvas id="scatter1" width="450" height="200">[No canvas support]</canvas>
+    <canvas id="scatter2" width="450" height="200">[No canvas support]</canvas>
+
+    
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/showcase.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/showcase.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/showcase.html	(revision 225)
@@ -0,0 +1,4 @@
+<?php
+    header('Location: index.html');
+    exit;
+?>
Index: Dev/branches/Demo/RGraph/examples/text.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/text.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/text.html	(revision 225)
@@ -0,0 +1,116 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts &amp; HTML5 canvas charts library - Animated rotating text with the RGraph software</title>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    
+    <script>
+        __pause          = false; // Provide a way to pause the rotation
+        __RGraph_rotate  = 0;     // A record of the angle (IN DEGREES) we're at currently
+        __RGraph_rotate2 = 0;     // Ditto, but this is controlled by the buttons
+
+        window.onload = function ()
+        {
+            
+            if (!__pause) {
+                var canvas  = document.getElementById("myc");
+                var context = canvas.getContext('2d');
+
+                RGraph.Clear(canvas); // Clears the canvas
+    
+                context.beginPath();
+                    context.fillStyle = 'black';
+
+                    RGraph.Text(context, 'Verdana',10,canvas.width/2,canvas.height/2,'Magic text! (' + __RGraph_rotate + ')','center','center',false, ++__RGraph_rotate);
+                    RGraph.Text(context, 'Verdana', 16, 50, 50, 'This is making me dizzy... (' + (__RGraph_rotate * 5) + ')', 'center', 'left', false, __RGraph_rotate * 2);
+                    RGraph.Text(context, 'Verdana', 20, 50, 200, 'Some user controllable text (' + __RGraph_rotate2 + ')', 'center', 'center', false, __RGraph_rotate2);
+    
+                context.stroke();
+                context.fill();
+            }
+            
+            setTimeout(window.onload, 1);
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts &amp; HTML5 canvas charts library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Rotating text
+</div>
+
+<h1>RGraph: Javascript charts &amp; HTML5 canvas charts - A text function that does horizontal and vertical alignment (and spins)</h1>
+
+
+
+<table border="0" style="float: left; margin-right: 10px">
+    <tr>
+        <td colspan="2"><canvas id="myc" width="300" height="300" style="border: 1px dashed gray">The fallback HTML</canvas></td>
+    </tr>
+
+    <tr>
+        <td align="center">
+            <button style="width: 100px; margin: 5px" onclick="__RGraph_rotate2 -= 5">&laquo; Rotate left</button>&nbsp;
+            <button style="margin: 5px" onclick="if (this.innerHTML == 'Pause') {__pause = true; this.innerHTML = 'Play'} else {this.innerHTML = 'Pause'; __pause = false; }">Pause</button>&nbsp;
+            <button style="width: 100px; margin: 5px" onclick="__RGraph_rotate2 += 5">Rotate right&raquo;</button>
+        </td>
+    </tr>
+</table>
+
+<p>
+    RGraph.Text() is a text drawing function that allows vertical and horizontal alignment, and allows you to specify the angle of the
+    text too. The animation is done by a simple gobal variable, setTimeout() and redrawing the entire
+    canvas every frame. Perhaps not the most efficient of methods, but remember that your Javascript will likely be
+    running on computers that have more processing power than
+    some small countries... <a href="javascript: location.href = location.href">Reset the page</a>
+</p>
+
+<p>
+    In a similar vein you could easily make some text that bounces from one side of the screen to the other,
+    hurrah - the return of &lt;marquee&gt;!
+</p>
+
+    <div>
+        More examples can be found on the individual <a href="/examples/index.html">example pages</a>, and a more complete
+        reference to the Text() function can be found in the <a href="../docs/api.html#functions.other">API docs</a>.
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/thermometer.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/thermometer.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/thermometer.html	(revision 225)
@@ -0,0 +1,134 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library - Thermometer charts</title>
+    
+    <meta name="keywords" content="rgraph html5 canvas example thermometer charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Thermometer charts" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js" ></script>
+    <script src="../libraries/RGraph.thermometer.js" ></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Thermometer charts
+</div>
+
+<h1>RGraph: <span>Javascript charts and graph library</span> - Thermometer charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    
+    <p>
+        The thermometer chart/gauge is a variation on the <a href="vprogress.html">Vertical Progress Bar</a>, that may suit your
+        design better than a regular progress bar. The thermometer is only available in a vertical orientation.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/thermometer.html">Thermometer charts API documentation</a></li>
+        </ul>
+    </div>
+
+    <div style="text-align: center">
+        <canvas id="thermo1" width="100" height="350">[No canvas support]</canvas>
+        <canvas id="thermo2" width="100" height="350" style="margin-left: 150px; margin-right: 150px">[No canvas support]</canvas>
+        <canvas id="thermo3" width="100" height="350">[No canvas support]</canvas>
+    </div>
+    <script>
+        window.onload = function ()
+        {
+            var thermometer = new RGraph.Thermometer('thermo1', 0,1,0.14);
+            thermometer.Set('chart.colors', ['green']);
+            thermometer.Set('chart.title.side', 'This servers load');
+            thermometer.Draw();
+        
+            var thermometer2 = new RGraph.Thermometer('thermo2', 0,100,16);
+            thermometer2.Set('chart.colors', ['blue']);
+            thermometer2.Set('chart.title.side', 'Mould level');
+            thermometer2.Draw();
+        
+            
+            grad = thermometer2.context.createLinearGradient(0,50,0,350);
+            grad.addColorStop(0, 'red');
+            grad.addColorStop(1, 'white');
+            
+            var thermometer3 = new RGraph.Thermometer('thermo3', 0,100,84);
+            thermometer3.Set('chart.colors', [grad]);
+            thermometer3.Set('chart.title.side', 'Temperature');
+            thermometer3.Set('chart.shadow', true);
+            thermometer3.Set('chart.shadow.offsetx', 0);
+            thermometer3.Set('chart.shadow.offsety', 0);
+            thermometer3.Set('chart.shadow.blur', 15);
+            thermometer3.Set('chart.shadow.color', 'green');
+            thermometer3.Set('chart.text.color', 'green');
+            thermometer3.Set('chart.value.label', false);
+            thermometer3.Draw();
+        }
+    </script>
+    
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/vprogress.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/vprogress.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/vprogress.html	(revision 225)
@@ -0,0 +1,154 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - vertical progress bar</title>
+
+    <meta name="keywords" content="rgraph html5 canvas example vertical progress bar" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Vertical Progress Bar example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.vprogress.js"></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            var progress1 = new RGraph.VProgress('progress1', 63, 100);
+            progress1.Set('chart.tickmarks', false);
+            progress1.Set('chart.margin', 3);
+            progress1.Set('chart.tickmarks.inner', true);
+            progress1.Set('chart.label.inner', true);
+            progress1.Set('chart.gutter.left', 30);
+            progress1.Set('chart.gutter.right', 30);
+            progress1.Set('chart.units.post', '%');
+            
+            progress1.Draw();
+
+            var progress2 = new RGraph.VProgress('progress2', [6.5, 1, 2], 10);
+            progress2.Set('chart.colors', ['red', '#cfc', 'blue']);
+            progress2.Set('chart.shadow', true);
+            progress2.Set('chart.shadow.color', '#666');
+            progress2.Set('chart.shadow.offsetx', 0);
+            progress2.Set('chart.shadow.offsety', 0);
+            progress2.Set('chart.shadow.blur', 15);
+            progress2.Set('chart.margin', 3);
+            progress2.Set('chart.tooltips', ['John', 'Fred', 'Pete']);
+            progress2.Set('chart.tooltips.effect', 'contract');
+            progress2.Set('chart.tickmarks', true);
+            progress2.Set('chart.tickmarks.inner', true);
+            progress2.Set('chart.tickmarks.color', '#333');
+            progress2.Draw();
+
+            var progress3 = new RGraph.VProgress('progress3', [1.455, 13, 42], 100);
+            progress3.Set('chart.colors', ['red', '#cfc', 'blue']);
+            progress3.Set('chart.margin', 3);
+            progress3.Set('chart.tooltips', ['John', 'Fred', 'Pete']);
+            progress3.Set('chart.tooltips.effect', 'fade');
+            progress3.Set('chart.tickmarks', true);
+            progress3.Set('chart.tickmarks.inner', true);
+            progress3.Set('chart.tickmarks.color', '#333');
+            progress3.Set('chart.key', ['Richard','Fred','Bob']);
+            progress3.Set('chart.key.position.x', progress3.canvas.width - 90);
+            progress3.Set('chart.tickmarks.zerostart', true);
+            progress3.Set('chart.gutter.right', 125);
+            progress3.Set('chart.scale.decimals', 2);
+            progress3.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Vertical Progress bar
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Vertical Progress bar</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        This is a Progress Bar for showing state. You can show anything with it - use it to show load on your server,
+        or percentage space free on your servers disk drive. You could even incorporate it with some AJAX to retrieve status information
+        from your webserver dynamically, making the Progress Bar realtime. To redraw the progress bar simply call <i>RGraph.Clear()</i>
+        (which clears the canvas) and then call <i>myProgress.Draw()</i> again.
+    </p>
+        
+    <p>
+        The colours, title and scale are configurable, allowing you to represent a wide range of values.
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/vprogress.html">Vertical Progress bar API documentation</a></li>
+            <li><a href="hprogress.html">Horizontal Progress bar</a></li>
+        </ul>
+    </div>
+
+    <div style="text-align: center">
+        <canvas width="125" height="450" id="progress1">[No canvas support]</canvas>
+        <canvas width="125" height="450" id="progress2" style="margin-left: 100px; margin-right: 100px">[No canvas support]</canvas>
+        <canvas width="210" height="450" id="progress3">[No canvas support]</canvas>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/examples/waterfall.html
===================================================================
--- Dev/branches/Demo/RGraph/examples/waterfall.html	(revision 225)
+++ Dev/branches/Demo/RGraph/examples/waterfall.html	(revision 225)
@@ -0,0 +1,131 @@
+<?php ob_start('ob_gzhandler') ?>
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+    <title>RGraph: Javascript charts and graph library - waterfall charts</title>
+
+    <meta name="keywords" content="rgraph html5 canvas example waterfall charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library - Waterfall chart example" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" />
+    <link rel="icon" type="image/png" href="../images/favicon.png">
+
+    <script src="../libraries/RGraph.common.core.js"></script>
+    <script src="../libraries/RGraph.common.tooltips.js" ></script>
+    <script src="../libraries/RGraph.waterfall.js"></script>
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]-->
+
+    <script>
+        window.onload = function ()
+        {
+            var waterfall1 = new RGraph.Waterfall('waterfall1', [50,12,-5,-9, 130, -23])
+            waterfall1.Set('chart.background.grid.autofit', true);
+            waterfall1.Set('chart.background.grid.autofit.numhlines', 10);
+            waterfall1.Set('chart.background.grid.autofit.numvlines', 25);
+            waterfall1.Set('chart.title', 'A chart showing income/expenditure');
+            waterfall1.Set('chart.colors', ['black','red','blue']);
+            waterfall1.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+            waterfall1.Set('chart.units.pre', '$');
+            waterfall1.Set('chart.units.post', 'k');
+            waterfall1.Set('chart.total', true);
+            waterfall1.Set('chart.labels', ['Sales','Misc income','Salaries','Running costs','Extortion','Stationary', 'Gross']);
+            waterfall1.Set('chart.tooltips', ['Traditional sales from the shops',
+                                              'Miscellaneous income from neer-do-wells',
+                                              'Salaries of the henchmen',
+                                              'Running costs including fuel for the cars',
+                                              'Extortion',
+                                              'Stationary for the offices',
+                                              'Gross income before "tax"']);
+            waterfall1.Set('chart.highlight.stroke', 'rgba(0,0,0,0)');
+            waterfall1.Set('chart.shadow', true);
+            waterfall1.Set('chart.shadow.color', '#aaa');
+            waterfall1.Set('chart.shadow.blur', 5);
+            waterfall1.Set('chart.shadow.offsetx', 0);
+            waterfall1.Set('chart.shadow.offsety', 0);
+            waterfall1.Set('chart.gutter.left', 50);
+            waterfall1.Draw();
+        }
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+    <!-- Social networking buttons -->
+
+
+<div id="breadcrumb">
+    <a href="../index.html">RGraph: Javascript charts and graph library</a>
+    >
+    <a href="./index.html">Examples</a>
+    >
+    Waterfall chart
+</div>
+
+    <h1>RGraph: <span>Javascript charts and graph library</span> - Waterfall charts</h1>
+
+    <script>
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script>
+
+    <p>
+        Waterfall charts can be used to represent sales and expenditure for an entity. More information can be found here:
+        <a href="http://en.wikipedia.org/wiki/Waterfall_chart" target="_blank">http://en.wikipedia.org/wiki/Waterfall_chart</a>
+    </p>
+
+    <div>
+        <ul>
+            <li><a href="../docs/waterfall.html">Waterfall charts API documentation</a></li>
+        </ul>
+    </div>
+
+    <div>
+        <canvas width="900" height="300" id="waterfall1">[No canvas support]</canvas>
+    </div>
+
+</body>
+</html>
Index: Dev/branches/Demo/RGraph/excanvas/EXCANVAS-LICENSE.txt
===================================================================
--- Dev/branches/Demo/RGraph/excanvas/EXCANVAS-LICENSE.txt	(revision 225)
+++ Dev/branches/Demo/RGraph/excanvas/EXCANVAS-LICENSE.txt	(revision 225)
@@ -0,0 +1,214 @@
+ Versions
+ ========
+ The excanvas.original.js is the original unminified and uncompressed library. The excanvas.compressed.js has been minified by hand and
+ Gzip compressed.
+ 
+ License for excanvas.js
+ =======================
+ 
+ This license is applicable to excanvas.original.js and excanvas.compressed.js ONLY.
+
+ License
+ =======
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.
Index: Dev/branches/Demo/RGraph/excanvas/HTACCESS-SAMPLE
===================================================================
--- Dev/branches/Demo/RGraph/excanvas/HTACCESS-SAMPLE	(revision 225)
+++ Dev/branches/Demo/RGraph/excanvas/HTACCESS-SAMPLE	(revision 225)
@@ -0,0 +1,11 @@
+##
+## This is an example Apache .htaccess file that can be used to add the required
+## Content-Encoding: header to the compressed version of the ExCanvas library.
+## This .htaccess file is ONLY required for the compressed version.
+##
+## If you are not using the compressed version, or are doing the compression
+## yourself (it could for example, be built into  your web server), then you
+## do not need this file.
+##
+
+AddEncoding gzip .js
Index: Dev/branches/Demo/RGraph/excanvas/excanvas.original.js
===================================================================
--- Dev/branches/Demo/RGraph/excanvas/excanvas.original.js	(revision 225)
+++ Dev/branches/Demo/RGraph/excanvas/excanvas.original.js	(revision 225)
@@ -0,0 +1,1421 @@
+// Copyright 2006 Google Inc.
+//
+// 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.
+
+
+// Known Issues:
+//
+// * Patterns only support repeat.
+// * Radial gradient are not implemented. The VML version of these look very
+//   different from the canvas one.
+// * Clipping paths are not implemented.
+// * Coordsize. The width and height attribute have higher priority than the
+//   width and height style values which isn't correct.
+// * Painting mode isn't implemented.
+// * Canvas width/height should is using content-box by default. IE in
+//   Quirks mode will draw the canvas using border-box. Either change your
+//   doctype to HTML5
+//   (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
+//   or use Box Sizing Behavior from WebFX
+//   (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
+// * Non uniform scaling does not correctly scale strokes.
+// * Optimize. There is always room for speed improvements.
+
+// Only add this code if we do not already have a canvas implementation
+if (!document.createElement('canvas').getContext) {
+
+(function() {
+
+  // alias some functions to make (compiled) code shorter
+  var m = Math;
+  var mr = m.round;
+  var ms = m.sin;
+  var mc = m.cos;
+  var abs = m.abs;
+  var sqrt = m.sqrt;
+
+  // this is used for sub pixel precision
+  var Z = 10;
+  var Z2 = Z / 2;
+
+  var IE_VERSION = +navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];
+
+  /**
+   * This funtion is assigned to the <canvas> elements as element.getContext().
+   * @this {HTMLElement}
+   * @return {CanvasRenderingContext2D_}
+   */
+  function getContext() {
+    return this.context_ ||
+        (this.context_ = new CanvasRenderingContext2D_(this));
+  }
+
+  var slice = Array.prototype.slice;
+
+  /**
+   * Binds a function to an object. The returned function will always use the
+   * passed in {@code obj} as {@code this}.
+   *
+   * Example:
+   *
+   *   g = bind(f, obj, a, b)
+   *   g(c, d) // will do f.call(obj, a, b, c, d)
+   *
+   * @param {Function} f The function to bind the object to
+   * @param {Object} obj The object that should act as this when the function
+   *     is called
+   * @param {*} var_args Rest arguments that will be used as the initial
+   *     arguments when the function is called
+   * @return {Function} A new function that has bound this
+   */
+  function bind(f, obj, var_args) {
+    var a = slice.call(arguments, 2);
+    return function() {
+      return f.apply(obj, a.concat(slice.call(arguments)));
+    };
+  }
+
+  function encodeHtmlAttribute(s) {
+    return String(s).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
+  }
+
+  function addNamespace(doc, prefix, urn) {
+    if (!doc.namespaces[prefix]) {
+      if (IE_VERSION >= 7) {
+        doc.namespaces.add(prefix, urn).doImport('#default#VML');
+      } else {
+        // IE6 cannot handle the third argument.
+        doc.namespaces.add(prefix, urn);
+      }
+    }
+  }
+
+  function addNamespacesAndStylesheet(doc) {
+    addNamespace(doc, 'g_vml_', 'urn:schemas-microsoft-com:vml');
+    addNamespace(doc, 'g_o_', 'urn:schemas-microsoft-com:office:office');
+
+    // Setup default CSS.  Only add one style sheet per document
+    if (!doc.styleSheets['ex_canvas_']) {
+      var ss = doc.createStyleSheet();
+      ss.owningElement.id = 'ex_canvas_';
+      ss.cssText = 'canvas{display:inline-block;overflow:hidden;' +
+          // default size is 300x150 in Gecko and Opera
+          'text-align:left;width:300px;height:150px}';
+    }
+  }
+
+  // Add namespaces and stylesheet at startup.
+  addNamespacesAndStylesheet(document);
+
+  var G_vmlCanvasManager_ = {
+    init: function(opt_doc) {
+      var doc = opt_doc || document;
+      // Create a dummy element so that IE will allow canvas elements to be
+      // recognized.
+      doc.createElement('canvas');
+      doc.attachEvent('onreadystatechange', bind(this.init_, this, doc));
+    },
+
+    init_: function(doc) {
+      // find all canvas elements
+      var els = doc.getElementsByTagName('canvas');
+      for (var i = 0; i < els.length; i++) {
+        this.initElement(els[i]);
+      }
+    },
+
+    /**
+     * Public initializes a canvas element so that it can be used as canvas
+     * element from now on. This is called automatically before the page is
+     * loaded but if you are creating elements using createElement you need to
+     * make sure this is called on the element.
+     * @param {HTMLElement} el The canvas element to initialize.
+     * @return {HTMLElement} the element that was created.
+     */
+    initElement: function(el) {
+      if (!el.getContext) {
+        el.getContext = getContext;
+
+        // Add namespaces and stylesheet to document of the element.
+        addNamespacesAndStylesheet(el.ownerDocument);
+
+        // Remove fallback content. There is no way to hide text nodes so we
+        // just remove all childNodes. We could hide all elements and remove
+        // text nodes but who really cares about the fallback content.
+        el.innerHTML = '';
+
+        // do not use inline function because that will leak memory
+        el.attachEvent('onpropertychange', onPropertyChange);
+        el.attachEvent('onresize', onResize);
+
+        var attrs = el.attributes;
+        if (attrs.width && attrs.width.specified) {
+          // TODO: use runtimeStyle and coordsize
+          // el.getContext().setWidth_(attrs.width.nodeValue);
+          el.style.width = attrs.width.nodeValue + 'px';
+        } else {
+          el.width = el.clientWidth;
+        }
+        if (attrs.height && attrs.height.specified) {
+          // TODO: use runtimeStyle and coordsize
+          // el.getContext().setHeight_(attrs.height.nodeValue);
+          el.style.height = attrs.height.nodeValue + 'px';
+        } else {
+          el.height = el.clientHeight;
+        }
+        //el.getContext().setCoordsize_()
+      }
+      return el;
+    }
+  };
+
+  function onPropertyChange(e) {
+    var el = e.srcElement;
+
+    switch (e.propertyName) {
+      case 'width':
+        el.getContext().clearRect();
+        el.style.width = el.attributes.width.nodeValue + 'px';
+        // In IE8 this does not trigger onresize.
+        el.firstChild.style.width =  el.clientWidth + 'px';
+        break;
+      case 'height':
+        el.getContext().clearRect();
+        el.style.height = el.attributes.height.nodeValue + 'px';
+        el.firstChild.style.height = el.clientHeight + 'px';
+        break;
+    }
+  }
+
+  function onResize(e) {
+    var el = e.srcElement;
+    if (el.firstChild) {
+      el.firstChild.style.width =  el.clientWidth + 'px';
+      el.firstChild.style.height = el.clientHeight + 'px';
+    }
+  }
+
+  G_vmlCanvasManager_.init();
+
+  // precompute "00" to "FF"
+  var decToHex = [];
+  for (var i = 0; i < 16; i++) {
+    for (var j = 0; j < 16; j++) {
+      decToHex[i * 16 + j] = i.toString(16) + j.toString(16);
+    }
+  }
+
+  function createMatrixIdentity() {
+    return [
+      [1, 0, 0],
+      [0, 1, 0],
+      [0, 0, 1]
+    ];
+  }
+
+  function matrixMultiply(m1, m2) {
+    var result = createMatrixIdentity();
+
+    for (var x = 0; x < 3; x++) {
+      for (var y = 0; y < 3; y++) {
+        var sum = 0;
+
+        for (var z = 0; z < 3; z++) {
+          sum += m1[x][z] * m2[z][y];
+        }
+
+        result[x][y] = sum;
+      }
+    }
+    return result;
+  }
+
+  function copyState(o1, o2) {
+    o2.fillStyle     = o1.fillStyle;
+    o2.lineCap       = o1.lineCap;
+    o2.lineJoin      = o1.lineJoin;
+    o2.lineWidth     = o1.lineWidth;
+    o2.miterLimit    = o1.miterLimit;
+    o2.shadowBlur    = o1.shadowBlur;
+    o2.shadowColor   = o1.shadowColor;
+    o2.shadowOffsetX = o1.shadowOffsetX;
+    o2.shadowOffsetY = o1.shadowOffsetY;
+    o2.strokeStyle   = o1.strokeStyle;
+    o2.globalAlpha   = o1.globalAlpha;
+    o2.font          = o1.font;
+    o2.textAlign     = o1.textAlign;
+    o2.textBaseline  = o1.textBaseline;
+    o2.arcScaleX_    = o1.arcScaleX_;
+    o2.arcScaleY_    = o1.arcScaleY_;
+    o2.lineScale_    = o1.lineScale_;
+  }
+
+  var colorData = {
+    aliceblue: '#F0F8FF',
+    antiquewhite: '#FAEBD7',
+    aquamarine: '#7FFFD4',
+    azure: '#F0FFFF',
+    beige: '#F5F5DC',
+    bisque: '#FFE4C4',
+    black: '#000000',
+    blanchedalmond: '#FFEBCD',
+    blueviolet: '#8A2BE2',
+    brown: '#A52A2A',
+    burlywood: '#DEB887',
+    cadetblue: '#5F9EA0',
+    chartreuse: '#7FFF00',
+    chocolate: '#D2691E',
+    coral: '#FF7F50',
+    cornflowerblue: '#6495ED',
+    cornsilk: '#FFF8DC',
+    crimson: '#DC143C',
+    cyan: '#00FFFF',
+    darkblue: '#00008B',
+    darkcyan: '#008B8B',
+    darkgoldenrod: '#B8860B',
+    darkgray: '#A9A9A9',
+    darkgreen: '#006400',
+    darkgrey: '#A9A9A9',
+    darkkhaki: '#BDB76B',
+    darkmagenta: '#8B008B',
+    darkolivegreen: '#556B2F',
+    darkorange: '#FF8C00',
+    darkorchid: '#9932CC',
+    darkred: '#8B0000',
+    darksalmon: '#E9967A',
+    darkseagreen: '#8FBC8F',
+    darkslateblue: '#483D8B',
+    darkslategray: '#2F4F4F',
+    darkslategrey: '#2F4F4F',
+    darkturquoise: '#00CED1',
+    darkviolet: '#9400D3',
+    deeppink: '#FF1493',
+    deepskyblue: '#00BFFF',
+    dimgray: '#696969',
+    dimgrey: '#696969',
+    dodgerblue: '#1E90FF',
+    firebrick: '#B22222',
+    floralwhite: '#FFFAF0',
+    forestgreen: '#228B22',
+    gainsboro: '#DCDCDC',
+    ghostwhite: '#F8F8FF',
+    gold: '#FFD700',
+    goldenrod: '#DAA520',
+    grey: '#808080',
+    greenyellow: '#ADFF2F',
+    honeydew: '#F0FFF0',
+    hotpink: '#FF69B4',
+    indianred: '#CD5C5C',
+    indigo: '#4B0082',
+    ivory: '#FFFFF0',
+    khaki: '#F0E68C',
+    lavender: '#E6E6FA',
+    lavenderblush: '#FFF0F5',
+    lawngreen: '#7CFC00',
+    lemonchiffon: '#FFFACD',
+    lightblue: '#ADD8E6',
+    lightcoral: '#F08080',
+    lightcyan: '#E0FFFF',
+    lightgoldenrodyellow: '#FAFAD2',
+    lightgreen: '#90EE90',
+    lightgrey: '#D3D3D3',
+    lightpink: '#FFB6C1',
+    lightsalmon: '#FFA07A',
+    lightseagreen: '#20B2AA',
+    lightskyblue: '#87CEFA',
+    lightslategray: '#778899',
+    lightslategrey: '#778899',
+    lightsteelblue: '#B0C4DE',
+    lightyellow: '#FFFFE0',
+    limegreen: '#32CD32',
+    linen: '#FAF0E6',
+    magenta: '#FF00FF',
+    mediumaquamarine: '#66CDAA',
+    mediumblue: '#0000CD',
+    mediumorchid: '#BA55D3',
+    mediumpurple: '#9370DB',
+    mediumseagreen: '#3CB371',
+    mediumslateblue: '#7B68EE',
+    mediumspringgreen: '#00FA9A',
+    mediumturquoise: '#48D1CC',
+    mediumvioletred: '#C71585',
+    midnightblue: '#191970',
+    mintcream: '#F5FFFA',
+    mistyrose: '#FFE4E1',
+    moccasin: '#FFE4B5',
+    navajowhite: '#FFDEAD',
+    oldlace: '#FDF5E6',
+    olivedrab: '#6B8E23',
+    orange: '#FFA500',
+    orangered: '#FF4500',
+    orchid: '#DA70D6',
+    palegoldenrod: '#EEE8AA',
+    palegreen: '#98FB98',
+    paleturquoise: '#AFEEEE',
+    palevioletred: '#DB7093',
+    papayawhip: '#FFEFD5',
+    peachpuff: '#FFDAB9',
+    peru: '#CD853F',
+    pink: '#FFC0CB',
+    plum: '#DDA0DD',
+    powderblue: '#B0E0E6',
+    rosybrown: '#BC8F8F',
+    royalblue: '#4169E1',
+    saddlebrown: '#8B4513',
+    salmon: '#FA8072',
+    sandybrown: '#F4A460',
+    seagreen: '#2E8B57',
+    seashell: '#FFF5EE',
+    sienna: '#A0522D',
+    skyblue: '#87CEEB',
+    slateblue: '#6A5ACD',
+    slategray: '#708090',
+    slategrey: '#708090',
+    snow: '#FFFAFA',
+    springgreen: '#00FF7F',
+    steelblue: '#4682B4',
+    tan: '#D2B48C',
+    thistle: '#D8BFD8',
+    tomato: '#FF6347',
+    turquoise: '#40E0D0',
+    violet: '#EE82EE',
+    wheat: '#F5DEB3',
+    whitesmoke: '#F5F5F5',
+    yellowgreen: '#9ACD32'
+  };
+
+
+  function getRgbHslContent(styleString) {
+    var start = styleString.indexOf('(', 3);
+    var end = styleString.indexOf(')', start + 1);
+    var parts = styleString.substring(start + 1, end).split(',');
+    // add alpha if needed
+    if (parts.length != 4 || styleString.charAt(3) != 'a') {
+      parts[3] = 1;
+    }
+    return parts;
+  }
+
+  function percent(s) {
+    return parseFloat(s) / 100;
+  }
+
+  function clamp(v, min, max) {
+    return Math.min(max, Math.max(min, v));
+  }
+
+  function hslToRgb(parts){
+    var r, g, b, h, s, l;
+    h = parseFloat(parts[0]) / 360 % 360;
+    if (h < 0)
+      h++;
+    s = clamp(percent(parts[1]), 0, 1);
+    l = clamp(percent(parts[2]), 0, 1);
+    if (s == 0) {
+      r = g = b = l; // achromatic
+    } else {
+      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+      var p = 2 * l - q;
+      r = hueToRgb(p, q, h + 1 / 3);
+      g = hueToRgb(p, q, h);
+      b = hueToRgb(p, q, h - 1 / 3);
+    }
+
+    return '#' + decToHex[Math.floor(r * 255)] +
+        decToHex[Math.floor(g * 255)] +
+        decToHex[Math.floor(b * 255)];
+  }
+
+  function hueToRgb(m1, m2, h) {
+    if (h < 0)
+      h++;
+    if (h > 1)
+      h--;
+
+    if (6 * h < 1)
+      return m1 + (m2 - m1) * 6 * h;
+    else if (2 * h < 1)
+      return m2;
+    else if (3 * h < 2)
+      return m1 + (m2 - m1) * (2 / 3 - h) * 6;
+    else
+      return m1;
+  }
+
+  function processStyle(styleString) {
+    var str, alpha = 1;
+
+    styleString = String(styleString);
+    if (styleString.charAt(0) == '#') {
+      str = styleString;
+    } else if (/^rgb/.test(styleString)) {
+      var parts = getRgbHslContent(styleString);
+      var str = '#', n;
+      for (var i = 0; i < 3; i++) {
+        if (parts[i].indexOf('%') != -1) {
+          n = Math.floor(percent(parts[i]) * 255);
+        } else {
+          n = +parts[i];
+        }
+        str += decToHex[clamp(n, 0, 255)];
+      }
+      alpha = +parts[3];
+    } else if (/^hsl/.test(styleString)) {
+      var parts = getRgbHslContent(styleString);
+      str = hslToRgb(parts);
+      alpha = parts[3];
+    } else {
+      str = colorData[styleString] || styleString;
+    }
+    return {color: str, alpha: alpha};
+  }
+
+  var DEFAULT_STYLE = {
+    style: 'normal',
+    variant: 'normal',
+    weight: 'normal',
+    size: 10,
+    family: 'sans-serif'
+  };
+
+  // Internal text style cache
+  var fontStyleCache = {};
+
+  function processFontStyle(styleString) {
+    if (fontStyleCache[styleString]) {
+      return fontStyleCache[styleString];
+    }
+
+    var el = document.createElement('div');
+    var style = el.style;
+    try {
+      style.font = styleString;
+    } catch (ex) {
+      // Ignore failures to set to invalid font.
+    }
+
+    return fontStyleCache[styleString] = {
+      style: style.fontStyle || DEFAULT_STYLE.style,
+      variant: style.fontVariant || DEFAULT_STYLE.variant,
+      weight: style.fontWeight || DEFAULT_STYLE.weight,
+      size: style.fontSize || DEFAULT_STYLE.size,
+      family: style.fontFamily || DEFAULT_STYLE.family
+    };
+  }
+
+  function getComputedStyle(style, element) {
+    var computedStyle = {};
+
+    for (var p in style) {
+      computedStyle[p] = style[p];
+    }
+
+    // Compute the size
+    var canvasFontSize = parseFloat(element.currentStyle.fontSize),
+        fontSize = parseFloat(style.size);
+
+    if (typeof style.size == 'number') {
+      computedStyle.size = style.size;
+    } else if (style.size.indexOf('px') != -1) {
+      computedStyle.size = fontSize;
+    } else if (style.size.indexOf('em') != -1) {
+      computedStyle.size = canvasFontSize * fontSize;
+    } else if(style.size.indexOf('%') != -1) {
+      computedStyle.size = (canvasFontSize / 100) * fontSize;
+    } else if (style.size.indexOf('pt') != -1) {
+      computedStyle.size = fontSize / .75;
+    } else {
+      computedStyle.size = canvasFontSize;
+    }
+
+    // Different scaling between normal text and VML text. This was found using
+    // trial and error to get the same size as non VML text.
+    computedStyle.size *= 0.981;
+
+    return computedStyle;
+  }
+
+  function buildStyle(style) {
+    return style.style + ' ' + style.variant + ' ' + style.weight + ' ' +
+        style.size + 'px ' + style.family;
+  }
+
+  function processLineCap(lineCap) {
+    switch (lineCap) {
+      case 'butt':
+        return 'flat';
+      case 'round':
+        return 'round';
+      case 'square':
+      default:
+        return 'square';
+    }
+  }
+
+  /**
+   * This class implements CanvasRenderingContext2D interface as described by
+   * the WHATWG.
+   * @param {HTMLElement} canvasElement The element that the 2D context should
+   * be associated with
+   */
+  function CanvasRenderingContext2D_(canvasElement) {
+    this.m_ = createMatrixIdentity();
+
+    this.mStack_ = [];
+    this.aStack_ = [];
+    this.currentPath_ = [];
+
+    // Canvas context properties
+    this.strokeStyle = '#000';
+    this.fillStyle = '#000';
+
+    this.lineWidth = 1;
+    this.lineJoin = 'miter';
+    this.lineCap = 'butt';
+    this.miterLimit = Z * 1;
+    this.globalAlpha = 1;
+    this.font = '10px sans-serif';
+    this.textAlign = 'left';
+    this.textBaseline = 'alphabetic';
+    this.canvas = canvasElement;
+
+    var cssText = 'width:' + canvasElement.clientWidth + 'px;height:' +
+        canvasElement.clientHeight + 'px;overflow:hidden;position:absolute';
+    var el = canvasElement.ownerDocument.createElement('div');
+    el.style.cssText = cssText;
+    canvasElement.appendChild(el);
+
+    var overlayEl = el.cloneNode(false);
+    // Use a non transparent background.
+    overlayEl.style.backgroundColor = 'red';
+    overlayEl.style.filter = 'alpha(opacity=0)';
+    canvasElement.appendChild(overlayEl);
+
+    this.element_ = el;
+    this.arcScaleX_ = 1;
+    this.arcScaleY_ = 1;
+    this.lineScale_ = 1;
+  }
+
+  var contextPrototype = CanvasRenderingContext2D_.prototype;
+  contextPrototype.clearRect = function() {
+    if (this.textMeasureEl_) {
+      this.textMeasureEl_.removeNode(true);
+      this.textMeasureEl_ = null;
+    }
+    this.element_.innerHTML = '';
+  };
+
+  contextPrototype.beginPath = function() {
+    // TODO: Branch current matrix so that save/restore has no effect
+    //       as per safari docs.
+    this.currentPath_ = [];
+  };
+
+  contextPrototype.moveTo = function(aX, aY) {
+    var p = this.getCoords_(aX, aY);
+    this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y});
+    this.currentX_ = p.x;
+    this.currentY_ = p.y;
+  };
+
+  contextPrototype.lineTo = function(aX, aY) {
+    var p = this.getCoords_(aX, aY);
+    this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y});
+
+    this.currentX_ = p.x;
+    this.currentY_ = p.y;
+  };
+
+  contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
+                                            aCP2x, aCP2y,
+                                            aX, aY) {
+    var p = this.getCoords_(aX, aY);
+    var cp1 = this.getCoords_(aCP1x, aCP1y);
+    var cp2 = this.getCoords_(aCP2x, aCP2y);
+    bezierCurveTo(this, cp1, cp2, p);
+  };
+
+  // Helper function that takes the already fixed cordinates.
+  function bezierCurveTo(self, cp1, cp2, p) {
+    self.currentPath_.push({
+      type: 'bezierCurveTo',
+      cp1x: cp1.x,
+      cp1y: cp1.y,
+      cp2x: cp2.x,
+      cp2y: cp2.y,
+      x: p.x,
+      y: p.y
+    });
+    self.currentX_ = p.x;
+    self.currentY_ = p.y;
+  }
+
+  contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
+    // the following is lifted almost directly from
+    // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
+
+    var cp = this.getCoords_(aCPx, aCPy);
+    var p = this.getCoords_(aX, aY);
+
+    var cp1 = {
+      x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_),
+      y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_)
+    };
+    var cp2 = {
+      x: cp1.x + (p.x - this.currentX_) / 3.0,
+      y: cp1.y + (p.y - this.currentY_) / 3.0
+    };
+
+    bezierCurveTo(this, cp1, cp2, p);
+  };
+
+  contextPrototype.arc = function(aX, aY, aRadius,
+                                  aStartAngle, aEndAngle, aClockwise) {
+    aRadius *= Z;
+    var arcType = aClockwise ? 'at' : 'wa';
+
+    var xStart = aX + mc(aStartAngle) * aRadius - Z2;
+    var yStart = aY + ms(aStartAngle) * aRadius - Z2;
+
+    var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
+    var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
+
+    // IE won't render arches drawn counter clockwise if xStart == xEnd.
+    if (xStart == xEnd && !aClockwise) {
+      xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
+                       // that can be represented in binary
+    }
+
+    var p = this.getCoords_(aX, aY);
+    var pStart = this.getCoords_(xStart, yStart);
+    var pEnd = this.getCoords_(xEnd, yEnd);
+
+    this.currentPath_.push({type: arcType,
+                           x: p.x,
+                           y: p.y,
+                           radius: aRadius,
+                           xStart: pStart.x,
+                           yStart: pStart.y,
+                           xEnd: pEnd.x,
+                           yEnd: pEnd.y});
+
+  };
+
+  contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
+    this.moveTo(aX, aY);
+    this.lineTo(aX + aWidth, aY);
+    this.lineTo(aX + aWidth, aY + aHeight);
+    this.lineTo(aX, aY + aHeight);
+    this.closePath();
+  };
+
+  contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
+    var oldPath = this.currentPath_;
+    this.beginPath();
+
+    this.moveTo(aX, aY);
+    this.lineTo(aX + aWidth, aY);
+    this.lineTo(aX + aWidth, aY + aHeight);
+    this.lineTo(aX, aY + aHeight);
+    this.closePath();
+    this.stroke();
+
+    this.currentPath_ = oldPath;
+  };
+
+  contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
+    var oldPath = this.currentPath_;
+    this.beginPath();
+
+    this.moveTo(aX, aY);
+    this.lineTo(aX + aWidth, aY);
+    this.lineTo(aX + aWidth, aY + aHeight);
+    this.lineTo(aX, aY + aHeight);
+    this.closePath();
+    this.fill();
+
+    this.currentPath_ = oldPath;
+  };
+
+  contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
+    var gradient = new CanvasGradient_('gradient');
+    gradient.x0_ = aX0;
+    gradient.y0_ = aY0;
+    gradient.x1_ = aX1;
+    gradient.y1_ = aY1;
+    return gradient;
+  };
+
+  contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
+                                                   aX1, aY1, aR1) {
+    var gradient = new CanvasGradient_('gradientradial');
+    gradient.x0_ = aX0;
+    gradient.y0_ = aY0;
+    gradient.r0_ = aR0;
+    gradient.x1_ = aX1;
+    gradient.y1_ = aY1;
+    gradient.r1_ = aR1;
+    return gradient;
+  };
+
+  contextPrototype.drawImage = function(image, var_args) {
+    var dx, dy, dw, dh, sx, sy, sw, sh;
+
+    // to find the original width we overide the width and height
+    var oldRuntimeWidth = image.runtimeStyle.width;
+    var oldRuntimeHeight = image.runtimeStyle.height;
+    image.runtimeStyle.width = 'auto';
+    image.runtimeStyle.height = 'auto';
+
+    // get the original size
+    var w = image.width;
+    var h = image.height;
+
+    // and remove overides
+    image.runtimeStyle.width = oldRuntimeWidth;
+    image.runtimeStyle.height = oldRuntimeHeight;
+
+    if (arguments.length == 3) {
+      dx = arguments[1];
+      dy = arguments[2];
+      sx = sy = 0;
+      sw = dw = w;
+      sh = dh = h;
+    } else if (arguments.length == 5) {
+      dx = arguments[1];
+      dy = arguments[2];
+      dw = arguments[3];
+      dh = arguments[4];
+      sx = sy = 0;
+      sw = w;
+      sh = h;
+    } else if (arguments.length == 9) {
+      sx = arguments[1];
+      sy = arguments[2];
+      sw = arguments[3];
+      sh = arguments[4];
+      dx = arguments[5];
+      dy = arguments[6];
+      dw = arguments[7];
+      dh = arguments[8];
+    } else {
+      throw Error('Invalid number of arguments');
+    }
+
+    var d = this.getCoords_(dx, dy);
+
+    var w2 = sw / 2;
+    var h2 = sh / 2;
+
+    var vmlStr = [];
+
+    var W = 10;
+    var H = 10;
+
+    // For some reason that I've now forgotten, using divs didn't work
+    vmlStr.push(' <g_vml_:group',
+                ' coordsize="', Z * W, ',', Z * H, '"',
+                ' coordorigin="0,0"' ,
+                ' style="width:', W, 'px;height:', H, 'px;position:absolute;');
+
+    // If filters are necessary (rotation exists), create them
+    // filters are bog-slow, so only create them if abbsolutely necessary
+    // The following check doesn't account for skews (which don't exist
+    // in the canvas spec (yet) anyway.
+
+    if (this.m_[0][0] != 1 || this.m_[0][1] ||
+        this.m_[1][1] != 1 || this.m_[1][0]) {
+      var filter = [];
+
+      // Note the 12/21 reversal
+      filter.push('M11=', this.m_[0][0], ',',
+                  'M12=', this.m_[1][0], ',',
+                  'M21=', this.m_[0][1], ',',
+                  'M22=', this.m_[1][1], ',',
+                  'Dx=', mr(d.x / Z), ',',
+                  'Dy=', mr(d.y / Z), '');
+
+      // Bounding box calculation (need to minimize displayed area so that
+      // filters don't waste time on unused pixels.
+      var max = d;
+      var c2 = this.getCoords_(dx + dw, dy);
+      var c3 = this.getCoords_(dx, dy + dh);
+      var c4 = this.getCoords_(dx + dw, dy + dh);
+
+      max.x = m.max(max.x, c2.x, c3.x, c4.x);
+      max.y = m.max(max.y, c2.y, c3.y, c4.y);
+
+      vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z),
+                  'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(',
+                  filter.join(''), ", sizingmethod='clip');");
+
+    } else {
+      vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;');
+    }
+
+    vmlStr.push(' ">' ,
+                '<g_vml_:image src="', image.src, '"',
+                ' style="width:', Z * dw, 'px;',
+                ' height:', Z * dh, 'px"',
+                ' cropleft="', sx / w, '"',
+                ' croptop="', sy / h, '"',
+                ' cropright="', (w - sx - sw) / w, '"',
+                ' cropbottom="', (h - sy - sh) / h, '"',
+                ' />',
+                '</g_vml_:group>');
+
+    this.element_.insertAdjacentHTML('BeforeEnd', vmlStr.join(''));
+  };
+
+  contextPrototype.stroke = function(aFill) {
+    var lineStr = [];
+    var lineOpen = false;
+
+    var W = 10;
+    var H = 10;
+
+    lineStr.push('<g_vml_:shape',
+                 ' filled="', !!aFill, '"',
+                 ' style="position:absolute;width:', W, 'px;height:', H, 'px;"',
+                 ' coordorigin="0,0"',
+                 ' coordsize="', Z * W, ',', Z * H, '"',
+                 ' stroked="', !aFill, '"',
+                 ' path="');
+
+    var newSeq = false;
+    var min = {x: null, y: null};
+    var max = {x: null, y: null};
+
+    for (var i = 0; i < this.currentPath_.length; i++) {
+      var p = this.currentPath_[i];
+      var c;
+
+      switch (p.type) {
+        case 'moveTo':
+          c = p;
+          lineStr.push(' m ', mr(p.x), ',', mr(p.y));
+          break;
+        case 'lineTo':
+          lineStr.push(' l ', mr(p.x), ',', mr(p.y));
+          break;
+        case 'close':
+          lineStr.push(' x ');
+          p = null;
+          break;
+        case 'bezierCurveTo':
+          lineStr.push(' c ',
+                       mr(p.cp1x), ',', mr(p.cp1y), ',',
+                       mr(p.cp2x), ',', mr(p.cp2y), ',',
+                       mr(p.x), ',', mr(p.y));
+          break;
+        case 'at':
+        case 'wa':
+          lineStr.push(' ', p.type, ' ',
+                       mr(p.x - this.arcScaleX_ * p.radius), ',',
+                       mr(p.y - this.arcScaleY_ * p.radius), ' ',
+                       mr(p.x + this.arcScaleX_ * p.radius), ',',
+                       mr(p.y + this.arcScaleY_ * p.radius), ' ',
+                       mr(p.xStart), ',', mr(p.yStart), ' ',
+                       mr(p.xEnd), ',', mr(p.yEnd));
+          break;
+      }
+
+
+      // TODO: Following is broken for curves due to
+      //       move to proper paths.
+
+      // Figure out dimensions so we can do gradient fills
+      // properly
+      if (p) {
+        if (min.x == null || p.x < min.x) {
+          min.x = p.x;
+        }
+        if (max.x == null || p.x > max.x) {
+          max.x = p.x;
+        }
+        if (min.y == null || p.y < min.y) {
+          min.y = p.y;
+        }
+        if (max.y == null || p.y > max.y) {
+          max.y = p.y;
+        }
+      }
+    }
+    lineStr.push(' ">');
+
+    if (!aFill) {
+      appendStroke(this, lineStr);
+    } else {
+      appendFill(this, lineStr, min, max);
+    }
+
+    lineStr.push('</g_vml_:shape>');
+
+    this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
+  };
+
+  function appendStroke(ctx, lineStr) {
+    var a = processStyle(ctx.strokeStyle);
+    var color = a.color;
+    var opacity = a.alpha * ctx.globalAlpha;
+    var lineWidth = ctx.lineScale_ * ctx.lineWidth;
+
+    // VML cannot correctly render a line if the width is less than 1px.
+    // In that case, we dilute the color to make the line look thinner.
+    if (lineWidth < 1) {
+      opacity *= lineWidth;
+    }
+
+    lineStr.push(
+      '<g_vml_:stroke',
+      ' opacity="', opacity, '"',
+      ' joinstyle="', ctx.lineJoin, '"',
+      ' miterlimit="', ctx.miterLimit, '"',
+      ' endcap="', processLineCap(ctx.lineCap), '"',
+      ' weight="', lineWidth, 'px"',
+      ' color="', color, '" />'
+    );
+  }
+
+  function appendFill(ctx, lineStr, min, max) {
+    var fillStyle = ctx.fillStyle;
+    var arcScaleX = ctx.arcScaleX_;
+    var arcScaleY = ctx.arcScaleY_;
+    var width = max.x - min.x;
+    var height = max.y - min.y;
+    if (fillStyle instanceof CanvasGradient_) {
+      // TODO: Gradients transformed with the transformation matrix.
+      var angle = 0;
+      var focus = {x: 0, y: 0};
+
+      // additional offset
+      var shift = 0;
+      // scale factor for offset
+      var expansion = 1;
+
+      if (fillStyle.type_ == 'gradient') {
+        var x0 = fillStyle.x0_ / arcScaleX;
+        var y0 = fillStyle.y0_ / arcScaleY;
+        var x1 = fillStyle.x1_ / arcScaleX;
+        var y1 = fillStyle.y1_ / arcScaleY;
+        var p0 = ctx.getCoords_(x0, y0);
+        var p1 = ctx.getCoords_(x1, y1);
+        var dx = p1.x - p0.x;
+        var dy = p1.y - p0.y;
+        angle = Math.atan2(dx, dy) * 180 / Math.PI;
+
+        // The angle should be a non-negative number.
+        if (angle < 0) {
+          angle += 360;
+        }
+
+        // Very small angles produce an unexpected result because they are
+        // converted to a scientific notation string.
+        if (angle < 1e-6) {
+          angle = 0;
+        }
+      } else {
+        var p0 = ctx.getCoords_(fillStyle.x0_, fillStyle.y0_);
+        focus = {
+          x: (p0.x - min.x) / width,
+          y: (p0.y - min.y) / height
+        };
+
+        width  /= arcScaleX * Z;
+        height /= arcScaleY * Z;
+        var dimension = m.max(width, height);
+        shift = 2 * fillStyle.r0_ / dimension;
+        expansion = 2 * fillStyle.r1_ / dimension - shift;
+      }
+
+      // We need to sort the color stops in ascending order by offset,
+      // otherwise IE won't interpret it correctly.
+      var stops = fillStyle.colors_;
+      stops.sort(function(cs1, cs2) {
+        return cs1.offset - cs2.offset;
+      });
+
+      var length = stops.length;
+      var color1 = stops[0].color;
+      var color2 = stops[length - 1].color;
+      var opacity1 = stops[0].alpha * ctx.globalAlpha;
+      var opacity2 = stops[length - 1].alpha * ctx.globalAlpha;
+
+      var colors = [];
+      for (var i = 0; i < length; i++) {
+        var stop = stops[i];
+        colors.push(stop.offset * expansion + shift + ' ' + stop.color);
+      }
+
+      // When colors attribute is used, the meanings of opacity and o:opacity2
+      // are reversed.
+      lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"',
+                   ' method="none" focus="100%"',
+                   ' color="', color1, '"',
+                   ' color2="', color2, '"',
+                   ' colors="', colors.join(','), '"',
+                   ' opacity="', opacity2, '"',
+                   ' g_o_:opacity2="', opacity1, '"',
+                   ' angle="', angle, '"',
+                   ' focusposition="', focus.x, ',', focus.y, '" />');
+    } else if (fillStyle instanceof CanvasPattern_) {
+      if (width && height) {
+        var deltaLeft = -min.x;
+        var deltaTop = -min.y;
+        lineStr.push('<g_vml_:fill',
+                     ' position="',
+                     deltaLeft / width * arcScaleX * arcScaleX, ',',
+                     deltaTop / height * arcScaleY * arcScaleY, '"',
+                     ' type="tile"',
+                     // TODO: Figure out the correct size to fit the scale.
+                     //' size="', w, 'px ', h, 'px"',
+                     ' src="', fillStyle.src_, '" />');
+       }
+    } else {
+      var a = processStyle(ctx.fillStyle);
+      var color = a.color;
+      var opacity = a.alpha * ctx.globalAlpha;
+      lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity,
+                   '" />');
+    }
+  }
+
+  contextPrototype.fill = function() {
+    this.stroke(true);
+  };
+
+  contextPrototype.closePath = function() {
+    this.currentPath_.push({type: 'close'});
+  };
+
+  /**
+   * @private
+   */
+  contextPrototype.getCoords_ = function(aX, aY) {
+    var m = this.m_;
+    return {
+      x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2,
+      y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
+    };
+  };
+
+  contextPrototype.save = function() {
+    var o = {};
+    copyState(this, o);
+    this.aStack_.push(o);
+    this.mStack_.push(this.m_);
+    this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
+  };
+
+  contextPrototype.restore = function() {
+    if (this.aStack_.length) {
+      copyState(this.aStack_.pop(), this);
+      this.m_ = this.mStack_.pop();
+    }
+  };
+
+  function matrixIsFinite(m) {
+    return isFinite(m[0][0]) && isFinite(m[0][1]) &&
+        isFinite(m[1][0]) && isFinite(m[1][1]) &&
+        isFinite(m[2][0]) && isFinite(m[2][1]);
+  }
+
+  function setM(ctx, m, updateLineScale) {
+    if (!matrixIsFinite(m)) {
+      return;
+    }
+    ctx.m_ = m;
+
+    if (updateLineScale) {
+      // Get the line scale.
+      // Determinant of this.m_ means how much the area is enlarged by the
+      // transformation. So its square root can be used as a scale factor
+      // for width.
+      var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
+      ctx.lineScale_ = sqrt(abs(det));
+    }
+  }
+
+  contextPrototype.translate = function(aX, aY) {
+    var m1 = [
+      [1,  0,  0],
+      [0,  1,  0],
+      [aX, aY, 1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), false);
+  };
+
+  contextPrototype.rotate = function(aRot) {
+    var c = mc(aRot);
+    var s = ms(aRot);
+
+    var m1 = [
+      [c,  s, 0],
+      [-s, c, 0],
+      [0,  0, 1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), false);
+  };
+
+  contextPrototype.scale = function(aX, aY) {
+    this.arcScaleX_ *= aX;
+    this.arcScaleY_ *= aY;
+    var m1 = [
+      [aX, 0,  0],
+      [0,  aY, 0],
+      [0,  0,  1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), true);
+  };
+
+  contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) {
+    var m1 = [
+      [m11, m12, 0],
+      [m21, m22, 0],
+      [dx,  dy,  1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), true);
+  };
+
+  contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
+    var m = [
+      [m11, m12, 0],
+      [m21, m22, 0],
+      [dx,  dy,  1]
+    ];
+
+    setM(this, m, true);
+  };
+
+  /**
+   * The text drawing function.
+   * The maxWidth argument isn't taken in account, since no browser supports
+   * it yet.
+   */
+  contextPrototype.drawText_ = function(text, x, y, maxWidth, stroke) {
+    var m = this.m_,
+        delta = 1000,
+        left = 0,
+        right = delta,
+        offset = {x: 0, y: 0},
+        lineStr = [];
+
+    var fontStyle = getComputedStyle(processFontStyle(this.font),
+                                     this.element_);
+
+    var fontStyleString = buildStyle(fontStyle);
+
+    var elementStyle = this.element_.currentStyle;
+    var textAlign = this.textAlign.toLowerCase();
+    switch (textAlign) {
+      case 'left':
+      case 'center':
+      case 'right':
+        break;
+      case 'end':
+        textAlign = elementStyle.direction == 'ltr' ? 'right' : 'left';
+        break;
+      case 'start':
+        textAlign = elementStyle.direction == 'rtl' ? 'right' : 'left';
+        break;
+      default:
+        textAlign = 'left';
+    }
+
+    // 1.75 is an arbitrary number, as there is no info about the text baseline
+    switch (this.textBaseline) {
+      case 'hanging':
+      case 'top':
+        offset.y = fontStyle.size / 1.75;
+        break;
+      case 'middle':
+        break;
+      default:
+      case null:
+      case 'alphabetic':
+      case 'ideographic':
+      case 'bottom':
+        offset.y = -fontStyle.size / 2.25;
+        break;
+    }
+
+    switch(textAlign) {
+      case 'right':
+        left = delta;
+        right = 0.05;
+        break;
+      case 'center':
+        left = right = delta / 2;
+        break;
+    }
+
+    var d = this.getCoords_(x + offset.x, y + offset.y);
+
+    lineStr.push('<g_vml_:line from="', -left ,' 0" to="', right ,' 0.05" ',
+                 ' coordsize="100 100" coordorigin="0 0"',
+                 ' filled="', !stroke, '" stroked="', !!stroke,
+                 '" style="position:absolute;width:1px;height:1px;">');
+
+    if (stroke) {
+      appendStroke(this, lineStr);
+    } else {
+      // TODO: Fix the min and max params.
+      appendFill(this, lineStr, {x: -left, y: 0},
+                 {x: right, y: fontStyle.size});
+    }
+
+    var skewM = m[0][0].toFixed(3) + ',' + m[1][0].toFixed(3) + ',' +
+                m[0][1].toFixed(3) + ',' + m[1][1].toFixed(3) + ',0,0';
+
+    var skewOffset = mr(d.x / Z) + ',' + mr(d.y / Z);
+
+    lineStr.push('<g_vml_:skew on="t" matrix="', skewM ,'" ',
+                 ' offset="', skewOffset, '" origin="', left ,' 0" />',
+                 '<g_vml_:path textpathok="true" />',
+                 '<g_vml_:textpath on="true" string="',
+                 encodeHtmlAttribute(text),
+                 '" style="v-text-align:', textAlign,
+                 ';font:', encodeHtmlAttribute(fontStyleString),
+                 '" /></g_vml_:line>');
+
+    this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
+  };
+
+  contextPrototype.fillText = function(text, x, y, maxWidth) {
+    this.drawText_(text, x, y, maxWidth, false);
+  };
+
+  contextPrototype.strokeText = function(text, x, y, maxWidth) {
+    this.drawText_(text, x, y, maxWidth, true);
+  };
+
+  contextPrototype.measureText = function(text) {
+    if (!this.textMeasureEl_) {
+      var s = '<span style="position:absolute;' +
+          'top:-20000px;left:0;padding:0;margin:0;border:none;' +
+          'white-space:pre;"></span>';
+      this.element_.insertAdjacentHTML('beforeEnd', s);
+      this.textMeasureEl_ = this.element_.lastChild;
+    }
+    var doc = this.element_.ownerDocument;
+    this.textMeasureEl_.innerHTML = '';
+    this.textMeasureEl_.style.font = this.font;
+    // Don't use innerHTML or innerText because they allow markup/whitespace.
+    this.textMeasureEl_.appendChild(doc.createTextNode(text));
+    return {width: this.textMeasureEl_.offsetWidth};
+  };
+
+  /******** STUBS ********/
+  contextPrototype.clip = function() {
+    // TODO: Implement
+  };
+
+  contextPrototype.arcTo = function() {
+    // TODO: Implement
+  };
+
+  contextPrototype.createPattern = function(image, repetition) {
+    return new CanvasPattern_(image, repetition);
+  };
+
+  // Gradient / Pattern Stubs
+  function CanvasGradient_(aType) {
+    this.type_ = aType;
+    this.x0_ = 0;
+    this.y0_ = 0;
+    this.r0_ = 0;
+    this.x1_ = 0;
+    this.y1_ = 0;
+    this.r1_ = 0;
+    this.colors_ = [];
+  }
+
+  CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
+    aColor = processStyle(aColor);
+    this.colors_.push({offset: aOffset,
+                       color: aColor.color,
+                       alpha: aColor.alpha});
+  };
+
+  function CanvasPattern_(image, repetition) {
+    assertImageIsValid(image);
+    switch (repetition) {
+      case 'repeat':
+      case null:
+      case '':
+        this.repetition_ = 'repeat';
+        break
+      case 'repeat-x':
+      case 'repeat-y':
+      case 'no-repeat':
+        this.repetition_ = repetition;
+        break;
+      default:
+        throwException('SYNTAX_ERR');
+    }
+
+    this.src_ = image.src;
+    this.width_ = image.width;
+    this.height_ = image.height;
+  }
+
+  function throwException(s) {
+    throw new DOMException_(s);
+  }
+
+  function assertImageIsValid(img) {
+    if (!img || img.nodeType != 1 || img.tagName != 'IMG') {
+      throwException('TYPE_MISMATCH_ERR');
+    }
+    if (img.readyState != 'complete') {
+      throwException('INVALID_STATE_ERR');
+    }
+  }
+
+  function DOMException_(s) {
+    this.code = this[s];
+    this.message = s +': DOM Exception ' + this.code;
+  }
+  var p = DOMException_.prototype = new Error;
+  p.INDEX_SIZE_ERR = 1;
+  p.DOMSTRING_SIZE_ERR = 2;
+  p.HIERARCHY_REQUEST_ERR = 3;
+  p.WRONG_DOCUMENT_ERR = 4;
+  p.INVALID_CHARACTER_ERR = 5;
+  p.NO_DATA_ALLOWED_ERR = 6;
+  p.NO_MODIFICATION_ALLOWED_ERR = 7;
+  p.NOT_FOUND_ERR = 8;
+  p.NOT_SUPPORTED_ERR = 9;
+  p.INUSE_ATTRIBUTE_ERR = 10;
+  p.INVALID_STATE_ERR = 11;
+  p.SYNTAX_ERR = 12;
+  p.INVALID_MODIFICATION_ERR = 13;
+  p.NAMESPACE_ERR = 14;
+  p.INVALID_ACCESS_ERR = 15;
+  p.VALIDATION_ERR = 16;
+  p.TYPE_MISMATCH_ERR = 17;
+
+  // set up externs
+  G_vmlCanvasManager = G_vmlCanvasManager_;
+  CanvasRenderingContext2D = CanvasRenderingContext2D_;
+  CanvasGradient = CanvasGradient_;
+  CanvasPattern = CanvasPattern_;
+  DOMException = DOMException_;
+})();
+
+} // if
Index: Dev/branches/Demo/RGraph/images/index.html
===================================================================
--- Dev/branches/Demo/RGraph/images/index.html	(revision 225)
+++ Dev/branches/Demo/RGraph/images/index.html	(revision 225)
@@ -0,0 +1,3 @@
+<?php
+    header('Location: /');
+?>
Index: Dev/branches/Demo/RGraph/index.html
===================================================================
--- Dev/branches/Demo/RGraph/index.html	(revision 225)
+++ Dev/branches/Demo/RGraph/index.html	(revision 225)
@@ -0,0 +1,432 @@
+<?php
+    require_once('common.php');
+    
+    CheckDomain();
+
+    if ($_SERVER['SERVER_NAME'] == 'www.rgraph.net') {
+        ob_start('ob_gzhandler');
+        header('Cache-control: max-age=4800');
+    }
+?>
+<!DOCTYPE html>
+<html>
+<head>
+
+    <meta http-equiv="X-UA-Compatible" content="chrome=1">
+
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    -->
+
+    <title>RGraph: Javascript charts and graph library</title>
+    <link rel="stylesheet" href="css/website.css" type="text/css" media="screen" />
+
+    <RELEASE_SCRIPT_REMOVE>
+        <!-- These get replaced by a single combined JS file -->
+        <script src="libraries/RGraph.common.core.js" ></script>
+        <script src="libraries/RGraph.common.tooltips.js" ></script>
+        <script src="libraries/RGraph.line.js" ></script>
+        <script src="libraries/RGraph.bar.js" ></script>
+    </RELEASE_SCRIPT_REMOVE>
+    <!--[if IE 8]>
+        <script src="excanvas/excanvas.original.js"></script>
+    <![endif]-->
+
+    <link rel="icon" type="image/png" href="images/favicon.png">
+    <link rel="alternate" type="application/rss+xml" title="RGraph: Javascript charts and graph library" href="http://support.rgraph.net/rss">
+
+    <meta name="verify-v1" content="5y8rHGO/NPFDYU8jBgyT3qI7CSiEoPaeB+4x2TXan+4=" />
+    <meta name="keywords" content="html5 charts canvas graph rgraph javascript line chart bar charts" />
+    <meta name="description" content="RGraph: Javascript charts and graph library" />
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" />
+    <meta property="og:description" content="A javascript charts and graph library based on the HTML5 canvas tag" />
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/>
+    <meta property="fb:admins" content="825417645" />
+    
+    <!-- Place this tag in your head or just before your close body tag -->
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+    
+    
+    <style>        
+        .color_square {
+            display: inline;
+            display: inline-block;
+            width: 10px;
+            height: 10px;
+        }
+        
+        .black {
+            background-color: black;
+        }
+        
+        .red {
+            background-color: red;
+        }
+    </style>
+
+    <script>
+        cover = {div: null};
+
+        function ShowWarning ()
+        {
+            if (document.all && !RGraph.isIE8() && !RGraph.isIE9up()) {
+                cover.div = document.createElement('DIV');
+                cover.div.style.position = 'absolute';
+                cover.div.style.top    = 0;
+                cover.div.style.left   = 0;
+                cover.div.style.width  = (document.body.clientWidth + 20) + 'px';
+                cover.div.style.height = Math.max(document.documentElement.scrollHeight, screen.height) + 'px';
+                cover.div.style.filter = 'Alpha(opacity=50)';
+                cover.div.style.backgroundColor = 'gray';
+                document.body.appendChild(cover.div);
+                
+
+                cover.messageDiv = document.createElement('DIV');
+                cover.messageDiv.style.left = ((parseInt(document.body.clientWidth) / 2) - 200) + 'px';
+                cover.messageDiv.style.top = '200px';
+                cover.messageDiv.style.width = '400px';
+                cover.messageDiv.style.padding = '5px';
+                cover.messageDiv.style.position = 'absolute';
+                cover.messageDiv.style.backgroundColor = 'yellow';
+                cover.messageDiv.style.textAlign = 'center';
+                cover.messageDiv.style.fontFamily = 'Arial';
+                cover.messageDiv.style.fontSize = '12pt';
+                cover.messageDiv.style.border   = '2px black solid';
+                cover.messageDiv.style.filter = 'filter: progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135);';
+                document.body.appendChild(cover.messageDiv);
+                
+                cover.messageDiv.innerHTML = "<h2>Yikes!</h2>Your version of Microsoft Internet Explorer appears to be less than 8, which is required to view these charts. You can still view the website, but it will look odd and the charts won't work.<br /><br /><a onclick=\"cover.div.style.display = 'none'; cover.messageDiv.style.display = 'none';\" href=\"javascript:\">Close</a>"
+            }
+        }
+
+        window.onload = function (e)
+        {
+            if (RGraph.isIE8()) {
+                CreateLineChart();
+                CreateBarChart();
+                CreateRoseChart();
+            }
+
+            ShowWarning();
+        }
+        
+        window.onresize = function (e)
+        {
+            if (cover.div) {
+                cover.messageDiv.style.display = 'none';
+                cover.div.style.display = 'none';
+                cover.div = null;
+            }
+
+            ShowWarning();
+        }
+        
+    </script>
+
+    <script>
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script>
+</head>
+<body>
+
+    <!-- Social networking buttons -->
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed">
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20chart%20types&title=RGraph:%20Javascript%20charts%20%26%20graph%20library" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAIAAABL1vtsAAAAK3RFWHRDcmVhdGlvbiBUaW1lAFN1biA0IE9jdCAyMDA5IDE2OjU1OjAyIC0wMDAwXdSr9wAAAAd0SU1FB9oGBBA4IE+EyF0AAAAJcEhZcwAACvAAAArwAUKsNJgAAAAEZ0FNQQAAsY8L/GEFAAADUklEQVR42qVUQYtcRRCuqu432Y3ZYEDFOBhDkJCQ9SAExKOXhYAI7uhJD2JAlOAf8OJvCd70JHgKJAoGPEg8iEEW9xCi7AaDybiZeW/mve4qv+qejfFs87bnbb/ur77vq6pmsy/p/41Yf5TeEcpGZMRE4ivKrPT5Zzeufb3XyEkRMTOSqNanfv7hR1sffLIe1ymGrxxiSBMRNhGH8j+fmYMpPf/cq+devhj0OD4aE0BCwCe69s2v80W4/PHZp5+lePfua6dOeVgzYRZ2Tr7ZKRHNZrP791MjGwSODIYeki1tnBj/8P2tM2fOvv0exel0Oh6PpUbx75DBhn8AQ5SSLjqzAHBww7KaIY7YQ+qG+Med4sUwLHMeQhhRPXQ4xEiN0oIf/Z1TJBYIUFPnC8BFlyxyOx8cIoRglFfn+BDAHEyUlm2eT1PGwVj2WHaPMDfDkQ3QaRxCVUsiFAqs5APnXU1Z7buUO25zZuCxBRNlzfD5yDBYqqzdHthIT2ooS2AGpG6ZMhhbKEQ1VXoIlMJiMawgRFwLUuolwUULOxstzsyXfQpiWWGik+Mspp7WBAMVkCshQZonGVjR4+GElnkvhcFiRxJUM5Ajk2aV8EDCHYqPVhmZTCZd19WiLEXFoKY6Wi6fev3iW5cuvZH7YwnJQIGqm4ToEto+v/DiS7MKMVy//u3BwYHZf+1wm9benbz5/uUTHp5L0q3OI5ajfz14Zm//d98HhchToeBv8KwKIRhObbKHsNI1BT/vD94L3ZSmprNqp/ePVelkj7mgHB0vLwJrKHmDpzFYbQU4m7XNuigswBAkuJSvaS0uNq5gTRg5IbStSaxKcqaAQwGJxFOw81AjM1chxKt+98eBYASoS8m3n0V9F6Q8rDwbjWIolfW4taxOXnHIAIjVWwD3RxnFEECimlAQzuIYxvGNEPiwM+BW/NdXceHqeChYLobixfnv7++3bev7X7nw2/b2Ngep10xpUVqZyrq2NqoGeIOBSG0iknv3/tzd3R2PT6565MqVT2OMN7+72fc9x8brKg+FtO3s7Fz94ioIN+5aPrwTfWxtbZ0+/WPxvly/t2+f+/mnW8NQWhK84T+kaeIQJDZoCLAEBFZB8Oja+ubm5vnzv1Q7/wE5+e63NZwqQQAAAABJRU5ErkJggg==" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a>
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAIAAABL1vtsAAAAK3RFWHRDcmVhdGlvbiBUaW1lAFN1biA0IE9jdCAyMDA5IDE4OjM4OjI3IC0wMDAwqmTObgAAAAd0SU1FB9oGBBA5GpCTIK4AAAAJcEhZcwAACvAAAArwAUKsNJgAAAAEZ0FNQQAAsY8L/GEFAAAD40lEQVR42j1UTW8cRRDt6u7dWe+u12sb21iOBUGJsEmcQ5AgKEJwRIIbN478If5HbhxAHEEiIKzIgETiRCDHseO1idf7MRvvfHR3Na/GNjM7vV/Vr1+9elUU44Ne+tkoLwORiipiJW+YgrKRmCjKreS6WC/eNSkT4mIzWZn9gY76ZwOtHcJd0AKiWDOxjUor5SMAFXCq7XSFga9EdWMM+/lazR6nKXW6hQ8IiexNVBxxrpNQYiVY8s/VckFCnjL4Rl3vH5/Y/iTtJi1GsJbDXFRdaxYbDTYqnU7TjL0WGlfnXxIxMTLp3MfBaGjL0pcheFbEQrDVsDfn55FXGePSQvPFOD1OJ0iKSONvUaq6QgyRDDYVpbM+8NR7sIgUgPLOQidj9e3uJHfh8425a7PN09E4Cx5M+EJsSQhaMHQDRuBoOXDunPyIhxki/fvaHZ4nQdF+GtZatdtrq67Sr/T++elgkGVKGyGkHKEOIVjnvXclNCTJkJi5VHUfg1PUy+KTcaGqiujIy+3kztqbj/YPTjOnFQsdosAC4XyeawAKDxZBWDmvEPV7j3eOGDpoBoRebZx/dbe12pk9Hh8xGVFEcfAeWoTzLLPGIhJVBQ2cWaBAEa6wsBkOuvAEJAtVyV+7grQoEJhtwCswUEr4SmsgI22PVbGP6vYy3VoQXwhBFa91Ou0aPXo1KAoQzSNyR6GioETnpCJak2P2LLWviqPebtInK6YqoxgvY/7xz92np0MQI9krWyxyRPZeJPUACt5xcE1LMaBH9N6o7DOdK7z0VCQx68tvxBh8dQl9h1SEBXiIn9EgyodXw9Hm9cXFZtbLZx6fmW9+nbbrkF76ZWvJfnp95b3xaPvvPfjKKEgK/dFSkYGHJ6A2HB8f9kz0X2wmXTsN0ZwVyYu0tpfavUny8z/TUcHLrVl2SigIEdlpIbFjkRqmg+MOzvq/PXl2f2vz67vNXw7K4TnEgV3g7nBzodFN9F/jERKIMg1AQyxj4QNAweYiO0SI4aenzwZp+vGdrS83ZlglsWpMmBrxL/v9P/aeeygpALg1Os/KglwADH2rsrPhnYPD3cPe3Fw7MTVpLwoeviupPx7mRtDEshgqpi4sDMd6vVbkhZdGZRkwTgbVhMNkOAIkas/ofB1kL9WCzBQxG9xXs9Z4p9v1uvG+NdOoGChxOHCkc8FWSyhKhniMEoLfCgqoJATidrPJ0+lSZ85+cGtj/7vvfZLMduY4SPWqdrZXg87Ey4EnbVh90JKFpvzkuEvx3v17yOXB7u7Ww+3tlycnQRqkChelL+fc/2PmanSqqhT2rfX1jz58/90bO/8BXcnf85jv+UAAAAAASUVORK5CYII=" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a>
+        </div>
+
+        <script>
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script>
+        
+        <div id="google_plusone" style="position: fixed; right: 0; z-index: 1000">
+            <!-- Place this tag where you want the +1 button to render -->
+            <g:plusone href="http://www.rgraph.net"></g:plusone>
+        </div>
+
+    <!-- Social networking buttons -->
+
+
+    <div id="title">
+        <div id="image">
+            <br />
+            <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAB3RJTUUH2AsJEyYTYWGVqgAAAAlwSFlzAAAK8AAACvABQqw0mAAAAARnQU1BAACxjwv8YQUAAA/JSURBVHja1VtrjBvHff/vLp9H8o53etxDp5NPTiTZVSU7SmxLiWLEraXGieQ2cdQ4kW0ptvuhLZA2MFC0Xwok6LfGSQu0QL8ECZAgNQq0BRoYTeXaSGRbbhRXjVrZJ0u6l+7II++O5JE88vjYmf5ndmZ3drnkPXS2LyPNDTk7OzP/3/z+j5ldapRSWG/6p1feOPLjn/78nGmSIZOY418+cXwC+xknhIwTSqfOn360tu5OP6SkrRUAFHpwbHL27NjU7NPNZvOgaZrQxIwgAP9MTBB1BMtZzOOYJ+4/cPfVPzxz+oeH943Of9jC+qVAp4v/e2My8o//cfH0OxO3nwkYxgnDMAKapgEDTeJGxT/gdbxSx7wbNEjGuroOzGTzv3/t1vSbv5YAvPTqL75ZrDbObu/t7SqVlzO4ooNMQCYnocQS2PoPNo8olCPhcDUajsQ1XevnbbQPW8wNAhANh7sxD4qvPUjv5UKplKuurCQLS6X8crXaj0CELUbQ5VAwWA3HQjFkyQ5bs1B4xpqtmjoCoOu663tQ02I7entjTOBd/f0JNHr1XLE4nZlfCKzU6726pm2XbaVt2YCN3UIAsJVTFo9SRyAGjWYYoe3J5Eij0ShnFhaj7frZuuu/CgCow1Slr6A6oPoDXgBkANd9jZPcLSY3lsIy/NqqgOFRAW7smGAaBYLujwmmWwKitriFtAyktrWXfzUA/FaO1RDg7ACN2O00/1WWIGxdFFa1AVIwTn0mPJaaAEfTrHjAatZOSLqlSbAaA6hXME0pLRCEDfDYiq2s92sGQIDA3SELc4V0Po0YWQRb8DoBxw1u9bQqACwxa78aThIs2g6kDaaV6UvhyuSl09lXvvNA36f/dAqnMoHbjnHMk8Of/0b1fQWAraIqvLqqMgyWAHjb3klqpN7QmunXP1W4+DdPNRrGl5p1SDJyzb/6IuBnnhsNoJP/+u202YBxzJOJfUfHkweO3er/2NGfdu87mtkUANDgUekIKThxALGjPCqz5gWHKm3WmvIXX/xoM33prDn3+lldJ3spDYCKs6dkrBsS+Vht+lKhWnmL1vu/8Uew7+hLmwIAFfrsFcwKhqgCCrQA4LRf20Rq7/3gmDnz0j/TlZUAoeGVZq1JCdE0pDqwzIMvIrSL2iWJxKDc3adBMKz1sevrtb2rMYBJ5ggGbhZI1+hdbVkSQl0r1ykZkVAkPjLQL90MqTeLtcVCsV6qJpczxXyjttKPAoaYkNgtCUdhJTGoQyCkdbuA3kwAKHUTWOo9UZnAM2nRf6up3CuvAQIWdgdE0ITtjWiwO7prR3cUpe35CI2ThtlAIGZKtxfiWr0cRcG7LJBZc80eb1MZwE57NIkqBddqqyAQ6pZR7gFsRqxlJiyUDhj2WJZesbEJDyZxrYPxwZ5hg1YrlVQpLHs1+AGNxoFgs11v9LGqDaAeCVTaO6pA+AGJ7/2KQeyUNLS2FgPkeCiYSfkFHnFy8XTezjCcrTbvmrCtu8WC9VJgVRvgFag9CO3aAsy8dSn4xtgvT/3suy8+3aBwX5PSqQalE3seOjp+F2ac/8SePbd79x+QKiBuZLKY1ldN0FwzcJUNC2zGEEp0y1ATJzLdPACkFZNC+QEhPIKnKU89+SwM3r4OxtTYy5fMZoKHz1b+CCtvXXoTxjAjKLD3cA/s/85hEU0C71MzrZW3ANG5G2BsQBfJS/QSAgjdUhN9/eH3uhjgFV6WnAECnlC9BgMT78DwzHXoLhd4LQqYMD1AtvTMVi+gO3sIITxbeTAEIAI9BgDL7IJJ72yzuRoDfOtbQGAHI6LtSC4NpyauwIIRgmYwCBlWrlSayJCAZSypK6BhGVV/sS+oBzVD70arZhlAPgGNnz/wVq7NFjN6Oi/vNK1qBDvVSf/r8sNYJswmdGNmVR9tVsE0gC7q2kyeQHKeQHGB0BjC1YMLm0uiwHFN3xYDa3URBDR+RAgNnqzxzbVFfcv6M5A49sJGbDYA1KdOlJa0VMQF0guw9TVUr2FNPLhDg+E+VONR0OJMHSaaJLdEoY8Jxu7kITenvSkiPWFYZSwsDSPB0AwRtRlENCcO2GwA/AybX8hLPAwwwAnIiDTmmiUkEdeimtZXBkcd+IMVk1o3yBv5d/GZCLahwKbpnErIuo2CsGEVUIMdfjgq4wAsdXBHpBQcFuvK94AAxHJzWDZMR9el0MQ6hJXSUeH6nPloIhq0Fmy95xCreAE/CsjHYa3uUBXWJRy4T5LkB6Lu9Nj9TSqQEACblvWXQHCPiCVjgIiY7RUnNlCbyACTEHvC3n7dbpC4tsigCO+Dn102JdAgdnpN4oTdIsIDIh7BMQHROBKTguqcbANM4f1RAdqm3tVGoR6RR2KKcOp3tTTtPkQ/TeraC0jKc+PIg33CgWIguOcjMvkAbYAc2BbaBsASzDaCYHkCFQgKtoo7YFCFAbKSKvQ3iTgT8DIAXKu/qQAQ0rk7Z99P7MMj9qzI1NxyEE8pPlPT0ngbRPAAwA0rEeOYUg2w1vTOwwFivWndDFDrXbQXyyJVwAUkuBlAJAAi4ON13AaYym5QCuW4QmYDGGquAFVpKx/bbRoAqx1y2gAxRyzdohXKOKrsyRII02KAvWgmB4C2qgBVPAFV3KJnHu+LCrRlgIdrbNoyaJI2wHPdJbyYKLNlhqoCqhcQE7CjQmk42E2mjxEExRZsHgBtunNqlb0AuL2AmlqMHzCQMKJVoDQFxX2Rk3GGogZ+89mIHWgLQHm5GtnRk7g3ky/6ANB6+CFjJm7LwLOQ4o8KBNUNw2w27T6IHQg5N1LbvAvk7LOH9gCQzQDg5tTs0XKl+r2dvd0H5nJLHQHga68yAGjLJPzsAAcA3ABQ03TfJKRyjCH23WQqYJ+dOgConW8UAFz16M3p2W/hxz/BbMgor1NyrK+jAn42AMCjCppz4GJ5AT8bIP4QsNWAv5tluplOlUE2bANw1T+Oq/5D/LjftXL+VsB9Cux6EgQuL+Dqy87WEWdTuc7tmjcQAoVtUgWoEfZzTvaueSMA3Jic+RwK/y8a7tu9vfp6Ap/HYJIpfF/QApcjuMoAU+mH7Tu4EfRuPlyegAFnhIiPrdywFygtV2Io/I9bhMc0tL0XpuYWIFcs+2DgBUEsFHAL7wuA+plo0LJnaPECNgCOMXQFQtTdjKVfZc2/fPOV/3ro3tFdb2Htpd+8e/d0RwAKxfLnUPiE38W9Qzt5zqAhHJtKwXu301Ct1VtYoZ4HdMdjbW2Ae4OkgSsQ4rpjtszBjgGkOxSxQGtDUejGPVjcc218hlddvTmTQla+uSOZ+GV/X8/rA9t63h7cllyxAajVG2FGP+8LUWrCG3k+fng/Z8S7CMatVIY/OVLBePTB++GzvWGYf/tCWwAcBmigykH8NkPK0lIbAOIb7lIvyk5iT4+fyOSKT6QXl4BcJ2aj0Xx3ZzL+7S888uD3A7hymcX8EsRjUfZmaMdXW9ibIqPICJZrjQbcuD0H70zOQqm0BE+eOQ337dsLy1cug+lzr7KIggWaqx2RgVBHAAjfQPhG6O0B8CTNMAKBg9li5Xs/+8WV/w70JXsu3ppOLZbKlW3Vag3C4RBEQiEIBIyO3YSDQTi4dzfPzYc/AQHDah/o2w76zgFoZOY6soAzQKnj2+EWAKhSCiDEY3JfBqwvEtSIaR7StyW7q33J7jO48tOMzrV6HUrLy5grUGevYSgUb0cOKTwHZs8o3P0PP4KRb/41JI5/BigCpWyAeLa/O7tcCHR1WS8CmCLzz0SpI3y3aNkAaMlUvkOwRunLhRyzXRnuBh84dM+r+aXS3nyx9NnJ2bnnEYzHUHC0D01o4KChYEAIubYHERqqSuy+Izw3S0XIv3YBchdehpWpcccQcgZY3+75rZNw4smTQK/9lX+H6tmjqXW0AWtxgyvLZSjMz1VGH3noLTsQ6u1JmJh/snf30E8mZ9KDxXLl3FK58jX2HI+h3sTpBgMBmxFrfQ1Ojyeg7/O/x3P15nVYRCAKP3+Nn+ZGkr3w219/Ae4+dhzC+bGONsA+ImMPQ9u5wWAUSHxn+8lgo6XcPBQWskyOH+wd2VXq+IuRpdKyViwvfyaVXXxe17Tf1Q094rweQ7lRNJAZnaCQ7xO76morkH77MvQdPASRRA+vYwAMXHyhdc4eEDL5EKSnWzdo5tBBWHnkj8FM7LR2luI8kxlXFpzVUbWzqRmo4uqzn/d87czjHx8d2ZVf809mZjML29BQnkXb8Bx2eJD/VEY8sAwYOgRR1/1cqdnhUEUdWjPr0DV7EWIzr0F4/n/YAYOnoRVsZQohSE2XHXSCYTA/+TQ0Dj0mzhlpCwClYgGy6Vn+riO60Svnz5w+Pbp71wwfd70PEpARjBlHp1LZ59CFnsEB48w3s4EDugHhUBBCmOVPazodK7a7ZFQXoev2axCb/k8I5m+BE+VQmFuKQmpq2fo6fC+Qk18H0jPAhZaHs/IBCQN/fi4NRcvgMXy+e+6JU38+unuobgN/J290YhSZQKP55dxSEcGgD1DiCBxh7hSzYbR3p6sNzeamFyYgNvUKxBGMQCULmaUumJkloD/8FNAjp9CLaILmjvCsrFYrkEHK12s11k96ZGjgmXNfOnXBO8YdAaCm8dupw+PTqecQ9a9in71EsgIB6IpGIBqJQOsr9Z375HRmqkat1/Mj2Stg3roMxdETQPuGrXpCXQCwVc8tLsDifNY606T03576wmPP3jU85PujrU0DQKZcoRi5MTXzxYXcEmPFwzghe4xoJAyJWBcPttYyLKN1kwFJrFNn9t0UwLI6k0qqW2W93oA0rnoF4xi0U1Vc9Rc+/cDH/v6u4cG2Y2w6AGq6PjG9b+zW9LM4+WdwnH458SBGmQncNCViMVQR/z2IFEwVuCmAUAGQq18sFmEunQJ2zIb3Xv3UJw5/BYW/ttoc31cAZJrPFYKYT127MYFg0JM4pkFE2BZHRvR0xyEWdf/kiKgACMEdAJynUU0M1DJzc1Ao5NmOlJmhv/3q4yf/bM+uwTX9evUDAUBN//fe+Ajuvs7PZRfP49h7pKdgQVayJ4EBWTf/LIU3lVWXddaDIgrlchlXPQ01NHQsrB0Z6j/3lcd/59/XM58PHACZMgs5HfOjv3r35vMo1CkUMCRPoOKoGgyILmQH9dCf+fISuuLFfA7KpbJ8P+HlJ0+fOI86n13vPD40ANR05Z33+tPZxafT2YVnEYj9/JyBvWqDgVUXqgaLONmepF6vQaVatRhhGb7S8MCOvzh25NDfofAbEmRLACATAgCp7MLxy1fH/gD1+YsIRlSygojwW6x4CYsfPXT/wW998sih1J2MuaUAUNPlq+8mZ+ayZ1KZ+YdR+B1o3lBoOvngfb/x+vDAzgu7B/vLdz4KwP8DgN+jwdfm84MAAAAASUVORK5CYII=" align="absmiddle" alt="RGraph: Javascript charts and graph library" width="64" height="64" style="position: relative; top: 15px" />
+        </div>
+        
+        <div id="text">
+            <h1 id="title">RGraph: <span>Javascript charts and graph library</span></h1>
+            <i style="position: relative; top: -20px; left: 5px">Interactive javascript charts using the HTML5 canvas tag</i>
+        </div>
+    </div>
+
+    <!-- END HEADER -->
+
+
+
+        <canvas id="myLine" width="480" height="250" style="float: right">[Please wait for the onload event to fire...]</canvas>
+        <script>
+            /**
+            * Create the line graph
+            */
+            function CreateLineChart ()
+            {
+                var data1 = [14,13,16,18,14,12,11,14,19,18,17,18];
+                var data2 = [11,12,14,12,11,13,13,15,14,15,13,14];
+                var labels = ['Jane','Geoff','Lou','Pob','Verity','Baz','Hue','Olga','Pete','Lou','Kev','Fred']
+        
+                var myLine = new RGraph.Line('myLine', data1, data2);
+
+                myLine.Set('chart.gutter.top', 35);
+                myLine.Set('chart.gutter.left', 40  );
+                myLine.Set('chart.gutter.right', 5);
+                myLine.Set('chart.gutter.bottom', 10);
+
+                myLine.Set('chart.colors', ['red', 'black']);
+                myLine.Set('chart.units.post', '%');
+                myLine.Set('chart.tickmarks', null);
+                myLine.Set('chart.shadow', true);
+                myLine.Set('chart.shadow.offsety', RGraph.isIE8() ? 3 : 0);
+                myLine.Set('chart.shadow.offsetx', RGraph.isIE8() ? 3 : 0);
+                myLine.Set('chart.shadow.blur', 15);
+                myLine.Set('chart.shadow.color', ['#f66', '#666']);
+                myLine.Set('chart.linewidth', 5);
+                myLine.Set('chart.hmargin', 10);
+                
+                myLine.Set('chart.background.grid.width', 1);
+                myLine.Set('chart.background.grid.color', '#ddd');
+                myLine.Set('chart.background.barcolor1', 'white');
+                myLine.Set('chart.background.barcolor2', 'white');
+                myLine.Set('chart.background.grid.autofit', true);
+                myLine.Set('chart.background.grid.autofit.numvlines', 12);
+                myLine.Set('chart.background.grid.autofit.numhlines', 5);
+
+                myLine.Set('chart.title', 'An example showing Robert and Daniels sats');
+                myLine.Set('chart.title.vpos', 0.5);
+
+                myLine.Set('chart.text.color', '#333');
+                myLine.Set('chart.noaxes', true);
+                myLine.Set('chart.ymin', 10);
+
+                myLine.Set('chart.key', ['Robert', 'Daniel']);
+                myLine.Set('chart.key.rounded', true);
+                myLine.Set('chart.key.background', 'white');
+                myLine.Set('chart.key.position.x', myLine.Get('chart.gutter.left') + 10);
+                
+                if (RGraph.isIE8()) {
+                    // Change the shadow color
+                    myLine.Set('chart.shadow.color', '#666');
+                } else {
+                    // Only show tooltips for capable browsers - NOT IE8
+                    window.__rgraph_line_object__ = myLine;
+                    
+                    /**
+                    * This function is used to create the tooltip - instead of an array of tooltips
+                    */
+                    function line_chart_tooltip_func (i)
+                    {
+                        var obj   = window.__rgraph_line_object__
+                        var index = i;
+                        
+
+                        while (i > 11) {
+                            index   = i - 12;
+                            i       = i - 12;
+                        }
+
+                        // Add the index to the window object so it can be used
+                        // in the ontooltip event handler in making the Pie
+                        window.__rgraph_line_tooltip_index__ = index;
+
+                        var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
+                    
+                        return '<canvas id="tooltip_cvs" width="50" height="50" style="float: right">[No canvas support]</canvas><div style="float: right"><b>' + months[index] + '</b><br /><div class="color_square red"></div> Robert: ' + obj.original_data[0][index] + '<br /><div class="color_square black"></div> Daniel: ' + obj.original_data[1][index] + '</div>';
+                    }
+                    myLine.Set('chart.tooltips', line_chart_tooltip_func);
+                    myLine.Set('chart.tooltips.effect', 'fade');
+                    myLine.Set('chart.tooltips.css.class', 'line_graph_css');
+                    
+                    function DrawTooltipPie (obj)
+                    {
+                        var tt = RGraph.Registry.Get('chart.tooltip');
+
+                        // Extract the data from the tooltip HTML itself
+                        var r_data = data1[__rgraph_line_tooltip_index__];
+                        var d_data = data2[__rgraph_line_tooltip_index__];
+                        
+                        var bar = new RGraph.Bar('tooltip_cvs', [r_data, d_data]);
+                        bar.Set('chart.gutter.top', 5);
+                        bar.Set('chart.gutter.bottom', 5);
+                        bar.Set('chart.gutter.left', 5);
+                        bar.Set('chart.gutter.right', 5);
+                        bar.Set('chart.noyaxis', true);
+                        bar.Set('chart.background.grid', false);
+                        bar.Set('chart.colors', ['red', 'black']);
+                        bar.Set('chart.colors.sequential', true);
+                        bar.Set('chart.shadow', true);
+                        bar.Set('chart.shadow.offsetx', 0);
+                        bar.Set('chart.shadow.offsety', 0);
+                        bar.Set('chart.shadow.blur', 15);
+                        bar.Set('chart.strokestyle', 'rgba(0,0,0,0)');
+                        bar.Draw();
+                    }
+                    RGraph.AddCustomEventListener(myLine, 'ontooltip', DrawTooltipPie);
+                }
+                myLine.Draw();
+            }
+        </script>
+
+    <h2>Faster <span>websites with RGraph</span></h2>
+    <p>
+        RGraph is a Javascript charts and graph library. By using the HTML5 canvas tag, these javascript charts are created in the web
+        browser, meaning quicker charts and less web server load. RGraph is an easy way of speeding up your website.
+        
+    </p>
+
+    <p>
+        RGraph uses the HTML5 canvas tag to produce a wide variety of javascript charts and graph types.
+        It is covered by the RGraph License.
+    </p>
+
+    <div style="text-align: center">
+        <a href="examples/index.html" id="read-more"><b>Examples</b></a> &amp;
+        <a href="docs/index.html" id="read-more">Documentation</a>
+    </div>
+    
+    <h2>Available <span>charts</span></h2>
+        <p>
+            RGraph supports over twenty different types of javascript charts, including: Bar charts, Bipolar charts, Donut charts,
+            Funnel charts, Gantt charts, Horizontal Bar charts, Horizontal Progress bars, LED grids, Line charts, Meter charts,
+            Odometer charts, Pie charts, Radar charts, Radial Scatter charts, Rose charts, Scatter charts, Thermometer charts,
+            Vertical Progress bars and Waterfall charts. In addition there are variants available on many charts.
+        </p>
+
+    <a name="download"></a>
+    <h2>Download <span>RGraph</span></h2>
+    
+    <?php if($_SERVER['SERVER_NAME'] == 'www.rgraph.net' OR $_SERVER['SERVER_NAME'] == 'www.rgraph.org' OR isset($_GET['showdownloadlinks'])): ?>
+        <div id="downloadlinks">
+            <p>
+                The latest downloads are below. These are not time limited demos or a branded trial - they're full versions.
+            </p>
+        
+            <?php ShowDownloadLinks() ?>
+        </div>
+
+    <?php else: ?>
+
+        <span style="color: red">
+            [Only available on <a href="http://www.rgraph.net#download">http://www.rgraph.net</a>]
+        </span>
+    <?php endif ?>
+
+    
+    <script>
+        /**
+        * Hide the download links if not online
+        */
+        if (location.host != 'www.rgraph.net' && location.host != 'www.rgraph.org' && location.host != 'dev.rgraph.net') {
+            var downloadlinks = document.getElementById("downloadlinks");
+            
+            if (downloadlinks) {
+                document.getElementById("downloadlinks").style.display = 'none';
+            }
+        }
+    </script>
+
+
+    <a name="license"></a>
+    <h2>The <span>RGraph license</span></h2>
+
+    <div style="float: right; padding-left: 15px; padding-right: 40px; text-align: center">
+        <form action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/456239608328156" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
+            <input name="item_name_1" type="hidden" value="RGraph License" />
+            <input name="item_description_1" type="hidden" value="License for RGraph: Javascript charts and graph library" />
+            <input name="item_quantity_1" type="hidden" value="1" />
+            <input name="item_price_1" type="hidden" value="79.0" />
+            <input name="item_currency_1" type="hidden" value="GBP" />
+            <input name="_charset_" type="hidden" value="utf-8" />
+            <input alt="" width="116" height="61" src="images/buy.png" type="image" />
+        </form>
+
+        <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+            <input type="hidden" name="cmd" value="_s-xclick">
+            <input type="hidden" name="hosted_button_id" value="FDVK4T4GKQ6M8">
+            <input type="image" src="images/paypal.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
+            <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
+        </form>
+    </div>
+
+    <p>
+        RGraph is covered by the RGraph license. A summary is that for commercial/business use there is a small one-time
+        licensing fee of 79 GBP (roughly 125 USD). For non-commercial purposes it's freely usable.
+        
+        There are some
+        <a href="docs/licensing.html"><b>licensing FAQs</b></a> that should help to answer any
+        questions you might have. If you need one, you can <a href="http://www.rgraph.net/invoice.html">get an invoice here</a>.
+    </p>
+
+    <p>
+        If you have any questions about RGraph licensing, you can send your question to: <a href="mailto:licensing@rgraph.net">licensing@rgraph.net</a>.
+        If your question is of a support nature, please use the <a href="http://support.rgraph.net" target="_blank">support forum</a>.
+    </p>
+    
+    <iframe width="100%" height="300" src="LICENSE.txt"></iframe>
+
+    <script>
+        if (!RGraph.isIE8()) {
+            CreateLineChart();
+        }
+    </script>
+
+
+    <br clear="all" />
+
+
+
+
+    <p style="text-align: center">
+        <a href="http://www.rgraph.net" target="_blank">Keep up-to-date at www.rgraph.net</a>
+    </p>
+    
+    <div id="rgraph"></div>
+    
+    <script>
+        if (location.host.match(/^dev\.rgraph/)) {
+            document.getElementById("rgraph").innerHTML = '<div id="devtag">DEVELOPMENT<br /><a href="http://www.rgraph.net">Go to the live version &raquo;</a></div>';
+        }
+    </script>
+
+    <script>
+        (function swapImages ()
+        {
+            document.getElementById("social_icons").getElementsByTagName('IMG')[0].src = 'images/delicious.png';
+            document.getElementById("social_icons").getElementsByTagName('IMG')[1].src = 'images/twitter.png';
+            document.getElementById("title").getElementsByTagName('IMG')[0].src = 'images/logo.png';
+        })()
+    </script>
+</body>
+</html><!-- 2011-07-29 -->
Index: Dev/branches/Demo/RGraph/libraries/RGraph.bar.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.bar.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.bar.js	(revision 225)
@@ -0,0 +1,1922 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The bar chart constructor
+    * 
+    * @param object canvas The canvas object
+    * @param array  data   The chart data
+    */
+    RGraph.Bar = function (id, data)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.type              = 'bar';
+        this.max               = 0;
+        this.stackedOrGrouped  = false;
+        this.isRGraph          = true;
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        // Various config type stuff
+        this.properties = {
+            'chart.width':                  null,
+            'chart.height':                 null,
+            'chart.background.barcolor1':   'rgba(0,0,0,0)',
+            'chart.background.barcolor2':   'rgba(0,0,0,0)',
+            'chart.background.grid':        true,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.width':  1,
+            'chart.background.grid.hsize':  20,
+            'chart.background.grid.vsize':  20,
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':false,
+            'chart.background.grid.autofit.numhlines': 7,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.background.image':       null,
+            'chart.ytickgap':               20,
+            'chart.smallyticks':            3,
+            'chart.largeyticks':            5,
+            'chart.numyticks':              10,
+            'chart.hmargin':                5,
+            'chart.strokecolor':            '#666',
+            'chart.axis.color':             'black',
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.labels':                 null,
+            'chart.labels.ingraph':         null,
+            'chart.labels.above':           false,
+            'chart.labels.above.decimals':  0,
+            'chart.labels.above.size':      null,
+            'chart.labels.above.angle':     null,
+            'chart.ylabels':                true,
+            'chart.ylabels.count':          5,
+            'chart.ylabels.inside':         false,
+            'chart.xlabels.offset':         0,
+            'chart.xaxispos':               'bottom',
+            'chart.yaxispos':               'left',
+            'chart.text.color':             'black',
+            'chart.text.size':              10,
+            'chart.text.angle':             0,
+            'chart.text.font':              'Verdana',
+            'chart.ymax':                   null,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.xaxis':            '',
+            'chart.title.yaxis':            '',
+            'chart.title.xaxis.pos':        0.25,
+            'chart.title.yaxis.pos':        0.25,
+            'chart.colors':                 ['rgb(0,0,255)', '#0f0', '#00f', '#ff0', '#0ff', '#0f0'],
+            'chart.colors.sequential':      false,
+            'chart.colors.reverse':         false,
+            'chart.grouping':               'grouped',
+            'chart.variant':                'bar',
+            'chart.shadow':                 false,
+            'chart.shadow.color':           '#666',
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.shadow.blur':            3,
+            'chart.tooltips':               null,
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.tooltips.event':         'onclick',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.stroke':       'black',
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+            'chart.background.hbars':       null,
+            'chart.key':                    [],
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.halign':             'right',
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.text.size':          10,
+            'chart.key.linewidth':          1,
+            'chart.contextmenu':            null,
+            'chart.line':                   null,
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.scale.decimals':         0,
+            'chart.scale.point':            '.',
+            'chart.scale.thousand':         ',',
+            'chart.crosshairs':             false,
+            'chart.crosshairs.color':       '#333',
+            'chart.linewidth':              1,
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.adjustable':             false,
+            'chart.noaxes':                 false,
+            'chart.noxaxis':                false,
+            'chart.noyaxis':                false
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[BAR] No canvas support');
+            return;
+        }
+
+        /**
+        * Determine whether the chart will contain stacked or grouped bars
+        */
+        for (i=0; i<data.length; ++i) {
+            if (typeof(data[i]) == 'object') {
+                this.stackedOrGrouped = true;
+            }
+        }
+
+        // Store the data
+        this.data = data;
+        
+        // Used to store the coords of the bars
+        this.coords = [];
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getBar;
+    }
+
+
+    /**
+    * A setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Bar.prototype.Set = function (name, value)
+    {
+        name = name.toLowerCase();
+
+        if (name == 'chart.labels.abovebar') {
+            name = 'chart.labels.above';
+        }
+        
+        if (name == 'chart.strokestyle') {
+            name = 'chart.strokecolor';
+        }
+        
+        /**
+        * Check for xaxispos
+        */
+        if (name == 'chart.xaxispos' ) {
+            if (value != 'bottom' && value != 'center' && value != 'top') {
+                alert('[BAR] (' + this.id + ') chart.xaxispos should be top, center or bottom. Tried to set it to: ' + value + ' Changing it to center');
+                value = 'center';
+            }
+            
+            if (value == 'top') {
+                for (var i=0; i<this.data.length; ++i) {
+                    if (typeof(this.data[i]) == 'number' && this.data[i] > 0) {
+                        alert('[BAR] The data element with index ' + i + ' should be negative');
+                    }
+                }
+            }
+        }
+
+        this.properties[name] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Bar.prototype.Get = function (name)
+    {
+        if (name == 'chart.labels.abovebar') {
+            name = 'chart.labels.above';
+        }
+        
+        var value = this.properties[name];
+
+        return value;
+    }
+
+
+    /**
+    * The function you call to draw the bar chart
+    */
+    RGraph.Bar.prototype.Draw = function ()
+    {
+        // MUST be the first thing done!
+        if (typeof(this.Get('chart.background.image')) == 'string' && !this.__background_image__) {
+            RGraph.DrawBackgroundImage(this);
+            return;
+        }
+
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        /**
+        * Convert any null values to 0. Won't make any difference to the bar (as opposed to the line chart)
+        */
+        for (var i=0; i<this.data.length; ++i) {
+            if (this.data[i] == null) {
+                this.data[i] = 0;
+            }
+        }
+
+
+        // Cache this in a class variable as it's used rather a lot
+
+        /**
+        * Check for tooltips and alert the user that they're not supported with pyramid charts
+        */
+        if (   (this.Get('chart.variant') == 'pyramid' || this.Get('chart.variant') == 'dot')
+            && typeof(this.Get('chart.tooltips')) == 'object'
+            && this.Get('chart.tooltips')
+            && this.Get('chart.tooltips').length > 0) {
+
+            alert('[BAR] (' + this.id + ') Sorry, tooltips are not supported with dot or pyramid charts');
+        }
+
+        /**
+        * Stop the coords array from growing uncontrollably
+        */
+        this.coords = [];
+
+        /**
+        * Work out a few things. They need to be here because they depend on things you can change before you
+        * call Draw() but after you instantiate the object
+        */
+        this.max            = 0;
+        this.grapharea      = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        this.halfgrapharea  = this.grapharea / 2;
+        this.halfTextHeight = this.Get('chart.text.size') / 2;
+
+        // Progressively Draw the chart
+        RGraph.background.Draw(this);
+
+
+        //If it's a sketch chart variant, draw the axes first
+        if (this.Get('chart.variant') == 'sketch') {
+            this.DrawAxes();
+            this.Drawbars();
+        } else {
+            this.Drawbars();
+            this.DrawAxes();
+        }
+
+        this.DrawLabels();
+
+
+        // Draw the key if necessary
+        if (this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+        
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+
+        /**
+        * Is a line is defined, draw it
+        */
+        var line = this.Get('chart.line');
+
+        if (line) {
+        
+            line.__bar__ = this;
+            
+            // Check the X axis positions
+            if (this.Get('chart.xaxispos') != line.Get('chart.xaxispos')) {
+                alert("[BAR] Using different X axis positions when combining the Bar and Line is not advised");
+            }
+
+            line.Set('chart.gutter.left',   this.Get('chart.gutter.left'));
+            line.Set('chart.gutter.right',  this.Get('chart.gutter.right'));
+            line.Set('chart.gutter.top',    this.Get('chart.gutter.top'));
+            line.Set('chart.gutter.bottom', this.Get('chart.gutter.bottom'));
+
+            line.Set('chart.hmargin', (this.canvas.width - this.gutterLeft - this.gutterRight) / (line.original_data[0].length * 2));
+            
+            // If a BAR custom yMax is set, use that
+            if (this.Get('chart.ymax') && !line.Get('chart.ymax')) {
+                line.Set('chart.ymax', this.Get('chart.ymax'));
+            
+            } else if (line.Get('chart.ymax')) {
+                line.Set('chart.ymax', line.Get('chart.ymax'));
+            }
+
+            line.Draw();
+        }
+
+
+        /**
+        * Draw "in graph" labels
+        */
+        if (this.Get('chart.labels.ingraph')) {
+            RGraph.DrawInGraphLabels(this);
+        }
+        
+        /**
+        * Draw crosschairs
+        */
+        if (this.Get('chart.crosshairs')) {
+            RGraph.DrawCrosshairs(this);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+
+        /**
+        * This function enables adjusting
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    
+    /**
+    * Draws the charts axes
+    */
+    RGraph.Bar.prototype.DrawAxes = function ()
+    {
+        if (this.Get('chart.noaxes')) {
+            return;
+        }
+
+        var xaxispos = this.Get('chart.xaxispos');
+        var yaxispos = this.Get('chart.yaxispos');
+
+        this.context.beginPath();
+        this.context.strokeStyle = this.Get('chart.axis.color');
+        this.context.lineWidth   = 1;
+
+        // Draw the Y axis
+        if (this.Get('chart.noyaxis') == false) {
+            if (yaxispos == 'right') {
+                this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, this.gutterTop);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+            } else {
+                this.context.moveTo(this.gutterLeft, this.gutterTop);
+                this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+        
+        // Draw the X axis
+        if (this.Get('chart.noxaxis') == false) {
+            if (xaxispos == 'center') {
+                this.context.moveTo(this.gutterLeft, ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop);
+                this.context.lineTo(this.canvas.width - this.gutterRight, ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop);
+            } else if (xaxispos == 'top') {
+                this.context.moveTo(this.gutterLeft, this.gutterTop);
+                this.context.lineTo(this.canvas.width - this.gutterRight, this.gutterTop);
+            } else {
+                this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+
+        var numYTicks = this.Get('chart.numyticks');
+
+        // Draw the Y tickmarks
+        if (this.Get('chart.noyaxis') == false) {
+            var yTickGap = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / numYTicks;
+            var xpos     = yaxispos == 'left' ? this.gutterLeft : RGraph.GetWidth(this) - this.gutterRight;
+    
+            for (y=this.gutterTop;
+                 xaxispos == 'center' ? y <= (RGraph.GetHeight(this) - this.gutterBottom) : y < (RGraph.GetHeight(this) - this.gutterBottom + (xaxispos == 'top' ? 1 : 0));
+                 y += yTickGap) {
+    
+                if (xaxispos == 'center' && y == (RGraph.GetHeight(this) / 2)) continue;
+                
+                // X axis at the top
+                if (xaxispos == 'top' && y == this.gutterTop) continue;
+                
+                this.context.moveTo(xpos, y);
+                this.context.lineTo(xpos + (yaxispos == 'left' ? -3 : 3), y);
+            }
+            
+            /**
+            * If the X axis is not being shown, draw an extra tick
+            */
+            if (this.Get('chart.noxaxis')) {
+                if (xaxispos == 'center') {
+                    this.context.moveTo(xpos + (yaxispos == 'left' ? -3 : 3), RGraph.GetHeight(this) / 2);
+                    this.context.lineTo(xpos, RGraph.GetHeight(this) / 2);
+                } else if (xaxispos == 'top') {
+                    this.context.moveTo(xpos + (yaxispos == 'left' ? -3 : 3), this.gutterTop);
+                    this.context.lineTo(xpos, this.gutterTop);
+                } else {
+                    this.context.moveTo(xpos + (yaxispos == 'left' ? -3 : 3), RGraph.GetHeight(this) - this.gutterBottom);
+                    this.context.lineTo(xpos, RGraph.GetHeight(this) - this.gutterBottom);
+                }
+            }
+        }
+
+
+        // Draw the X tickmarks
+        if (this.Get('chart.noxaxis') == false) {
+            
+            xTickGap = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / this.data.length;
+            
+            if (xaxispos == 'bottom') {
+                yStart   = this.canvas.height - this.gutterBottom;
+                yEnd     = (this.canvas.height - this.gutterBottom) + 3;
+            } else if (xaxispos == 'top') {
+                yStart = this.gutterTop - 3;
+                yEnd   = this.gutterTop;
+            } else if (xaxispos == 'center') {
+                yStart = ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop + 3;
+                yEnd   = ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop - 3;
+            }
+            
+            //////////////// X TICKS ////////////////
+            
+            var noEndXTick = this.Get('chart.noendxtick');
+
+            for (x=this.gutterLeft + (yaxispos == 'left' ? xTickGap : 0); x<this.canvas.width - this.gutterRight + (yaxispos == 'left' ? 5 : 0); x+=xTickGap) {
+
+                if (yaxispos == 'left' && !noEndXTick && x > this.gutterLeft) {
+                    this.context.moveTo(x, yStart);
+                    this.context.lineTo(x, yEnd);
+                
+                } else if (yaxispos == 'left' && noEndXTick && x > this.gutterLeft && x < (this.canvas.width - this.gutterRight) ) {
+                    this.context.moveTo(x, yStart);
+                    this.context.lineTo(x, yEnd);
+                
+                } else if (yaxispos == 'right' && x < (this.canvas.width - this.gutterRight) && !noEndXTick) {
+                    this.context.moveTo(x, yStart);
+                    this.context.lineTo(x, yEnd);
+                
+                } else if (yaxispos == 'right' && x < (this.canvas.width - this.gutterRight) && x > (this.gutterLeft) && noEndXTick) {
+                    this.context.moveTo(x, yStart);
+                    this.context.lineTo(x, yEnd);
+                }
+            }
+            
+            if (this.Get('chart.noyaxis')) {
+                this.context.moveTo(this.gutterLeft, yStart);
+                this.context.lineTo(this.gutterLeft, yEnd);
+            }
+    
+            //////////////// X TICKS ////////////////
+        }
+
+        /**
+        * If the Y axis is not being shown, draw an extra tick
+        */
+        if (this.Get('chart.noyaxis') && this.Get('chart.noxaxis') == false) {
+            if (xaxispos == 'center') {
+                this.context.moveTo(this.gutterLeft, (RGraph.GetHeight(this) / 2) - 3);
+                this.context.lineTo(this.gutterLeft, (RGraph.GetHeight(this) / 2) + 3);
+            } else {
+                this.context.moveTo(this.gutterLeft, this.canvas.height - this.gutterBottom);
+                this.context.lineTo(this.gutterLeft, this.canvas.height - this.gutterBottom + 3);
+            }
+        }
+
+        this.context.stroke();
+    }
+
+
+    /**
+    * Draws the bars
+    */
+    RGraph.Bar.prototype.Drawbars = function ()
+    {
+        this.context.lineWidth   = this.Get('chart.linewidth');
+        this.context.strokeStyle = this.Get('chart.strokecolor');
+        this.context.fillStyle   = this.Get('chart.colors')[0];
+        var prevX                = 0;
+        var prevY                = 0;
+        var decimals             = this.Get('chart.scale.decimals');
+
+        /**
+        * Work out the max value
+        */
+        if (this.Get('chart.ymax')) {
+            this.max = this.Get('chart.ymax');
+
+            this.scale = [
+                          (this.max * (1/5)).toFixed(decimals),
+                          (this.max * (2/5)).toFixed(decimals),
+                          (this.max * (3/5)).toFixed(decimals),
+                          (this.max * (4/5)).toFixed(decimals),
+                          this.max.toFixed(decimals)
+                         ];
+        } else {
+            for (i=0; i<this.data.length; ++i) {
+                if (typeof(this.data[i]) == 'object') {
+                    var value = this.Get('chart.grouping') == 'grouped' ? Number(RGraph.array_max(this.data[i], true)) : Number(RGraph.array_sum(this.data[i])) ;
+
+                } else {
+                    var value = Number(this.data[i]);
+                }
+
+                this.max = Math.max(Math.abs(this.max), Math.abs(value));
+            }
+
+            this.scale = RGraph.getScale(this.max, this);
+            this.max   = this.scale[4];
+
+            if (this.Get('chart.scale.decimals')) {
+                var decimals = this.Get('chart.scale.decimals');
+
+                this.scale[0] = Number(this.scale[0]).toFixed(decimals);
+                this.scale[1] = Number(this.scale[1]).toFixed(decimals);
+                this.scale[2] = Number(this.scale[2]).toFixed(decimals);
+                this.scale[3] = Number(this.scale[3]).toFixed(decimals);
+                this.scale[4] = Number(this.scale[4]).toFixed(decimals);
+            }
+        }
+
+        /**
+        * Draw horizontal bars here
+        */
+        if (this.Get('chart.background.hbars') && this.Get('chart.background.hbars').length > 0) {
+            RGraph.DrawBars(this);
+        }
+
+        var variant = this.Get('chart.variant');
+        
+        /**
+        * Draw the 3D axes is necessary
+        */
+        if (variant == '3d') {
+            RGraph.Draw3DAxes(this);
+        }
+
+        /**
+        * Get the variant once, and draw the bars, be they regular, stacked or grouped
+        */
+        
+        // Get these variables outside of the loop
+        var xaxispos      = this.Get('chart.xaxispos');
+        var width         = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight ) / this.data.length;
+        var orig_height   = height;
+        var hmargin       = this.Get('chart.hmargin');
+        var shadow        = this.Get('chart.shadow');
+        var shadowColor   = this.Get('chart.shadow.color');
+        var shadowBlur    = this.Get('chart.shadow.blur');
+        var shadowOffsetX = this.Get('chart.shadow.offsetx');
+        var shadowOffsetY = this.Get('chart.shadow.offsety');
+        var strokeStyle   = this.Get('chart.strokecolor');
+        var colors        = this.Get('chart.colors');
+
+        for (i=0; i<this.data.length; ++i) {
+
+            // Work out the height
+            //The width is up outside the loop
+            var height = (RGraph.array_sum(this.data[i]) / this.max) * (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom);
+
+            // Half the height if the Y axis is at the center
+            if (xaxispos == 'center') {
+                height /= 2;
+            }
+
+            var x = (i * width) + this.gutterLeft;
+            var y = xaxispos == 'center' ? ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop - height : RGraph.GetHeight(this) - height - this.gutterBottom;
+            
+            // xaxispos is top
+            if (xaxispos == 'top') {
+                y = this.gutterTop + Math.abs(height);
+            }
+            
+
+            // Account for negative lengths - Some browsers (eg Chrome) don't like a negative value
+            if (height < 0) {
+                y += height;
+                height = Math.abs(height);
+            }
+
+            /**
+            * Turn on the shadow if need be
+            */
+            if (shadow) {
+                this.context.shadowColor   = shadowColor;
+                this.context.shadowBlur    = shadowBlur;
+                this.context.shadowOffsetX = shadowOffsetX;
+                this.context.shadowOffsetY = shadowOffsetY;
+            }
+
+            /**
+            * Draw the bar
+            */
+            this.context.beginPath();
+                if (typeof(this.data[i]) == 'number') {
+                    
+                    var barWidth = width - (2 * hmargin);
+
+                    // Set the fill color
+                    this.context.strokeStyle = strokeStyle;
+                    this.context.fillStyle = colors[0];
+                    
+                    /**
+                    * Sequential colors
+                    */
+                    if (this.Get('chart.colors.sequential')) {
+                        this.context.fillStyle = colors[i];
+                    }
+
+                    if (variant == 'sketch') {
+
+                        this.context.lineCap = 'round';
+                        
+                        var sketchOffset = 3;
+
+                        this.context.beginPath();
+
+                        this.context.strokeStyle = colors[0];
+
+                        /**
+                        * Sequential colors
+                        */
+                        if (this.Get('chart.colors.sequential')) {
+                            this.context.strokeStyle = colors[i];
+                        }
+
+                        // Left side
+                        this.context.moveTo(x + hmargin + 2, y + height - 2);
+                        this.context.lineTo(x + hmargin , y - 2);
+
+                        // The top
+                        this.context.moveTo(x + hmargin - 3, y + -2 + (this.data[i] < 0 ? height : 0));
+                        this.context.bezierCurveTo(x + ((hmargin + width) * 0.33),y + 5 + (this.data[i] < 0 ? height - 10: 0),x + ((hmargin + width) * 0.66),y + 5 + (this.data[i] < 0 ? height - 10 : 0),x + hmargin + width + -1, y + 0 + (this.data[i] < 0 ? height : 0));
+
+
+                        // The right side
+                        this.context.moveTo(x + hmargin + width - 2, y + -2);
+                        this.context.lineTo(x + hmargin + width - 3, y + height - 3);
+
+                        for (var r=0.2; r<=0.8; r+=0.2) {
+                            this.context.moveTo(x + hmargin + width + (r > 0.4 ? -1 : 3) - (r * width),y - 1);
+                            this.context.lineTo(x + hmargin + width - (r > 0.4 ? 1 : -1) - (r * width), y + height + (r == 0.2 ? 1 : -2));
+                        }
+
+                        this.context.stroke();
+
+                    // Regular bar
+                    } else if (variant == 'bar' || variant == '3d' || variant == 'glass' || variant == 'bevel') {
+                    
+                        if (RGraph.isIE8() && shadow) {
+                            this.DrawIEShadow([x + hmargin, y, barWidth, height]);
+                        }
+                        
+                        if (variant == 'glass') {
+                            RGraph.filledCurvyRect(this.context, x + hmargin, y, barWidth, height, 3, this.data[i] > 0, this.data[i] > 0, this.data[i] < 0, this.data[i] < 0);
+                            RGraph.strokedCurvyRect(this.context, x + hmargin, y, barWidth, height, 3, this.data[i] > 0, this.data[i] > 0, this.data[i] < 0, this.data[i] < 0);
+                        } else {
+                            this.context.strokeRect(x + hmargin, y, barWidth, height);
+                            this.context.fillRect(x + hmargin, y, barWidth, height);
+                        }
+
+                        
+                        // This bit draws the text labels that appear above the bars if requested
+                        if (this.Get('chart.labels.above')) {
+
+                            // Turn off any shadow
+                            if (shadow) {
+                                RGraph.NoShadow(this);
+                            }
+
+                            var yPos = y - 3;
+
+                            // Account for negative bars
+                            if (this.data[i] < 0) {
+                                yPos += height + 6 + (this.Get('chart.text.size') - 4);
+                            }
+
+                            // Account for chart.xaxispos=top
+                            if (this.Get('chart.xaxispos') == 'top') {
+                                yPos = this.gutterTop + height + 6 + (typeof(this.Get('chart.labels.above.size')) == 'number' ? this.Get('chart.labels.above.size') : this.Get('chart.text.size') - 4);
+                            }
+
+                            this.context.fillStyle = this.Get('chart.text.color');
+
+                            RGraph.Text(this.context,
+                                        this.Get('chart.text.font'),
+                                        typeof(this.Get('chart.labels.above.size')) == 'number' ? this.Get('chart.labels.above.size') : this.Get('chart.text.size') - 3,
+                                        x + hmargin + (barWidth / 2),
+                                        yPos,
+                                        RGraph.number_format(this, Number(this.data[i]).toFixed(this.Get('chart.labels.above.decimals')),this.Get('chart.units.pre'),this.Get('chart.units.post')),
+                                        this.Get('chart.labels.above.angle') ? 'bottom' : null,
+                                        this.Get('chart.labels.above.angle') ? (this.Get('chart.labels.above.angle') > 0 && (this.Get('chart.xaxispos') != 'top') ? 'right' : 'left') : 'center',
+                                        null,
+                                        this.Get('chart.labels.above.angle')
+                                       );
+                        }
+
+                        // 3D effect
+                        if (variant == '3d') {
+
+                            var prevStrokeStyle = this.context.strokeStyle;
+                            var prevFillStyle   = this.context.fillStyle;
+
+                            // Draw the top
+                            this.context.beginPath();
+                                this.context.moveTo(x + hmargin, y);
+                                this.context.lineTo(x + hmargin + 10, y - 5);
+                                this.context.lineTo(x + hmargin + 10 + barWidth, y - 5);
+                                this.context.lineTo(x + hmargin + barWidth, y);
+                            this.context.closePath();
+
+                            this.context.stroke();
+                            this.context.fill();
+
+                            // Draw the right hand side
+                            this.context.beginPath();
+                                this.context.moveTo(x + hmargin + barWidth, y);
+                                this.context.lineTo(x + hmargin + barWidth + 10, y - 5);
+                                this.context.lineTo(x + hmargin + barWidth + 10, y + height - 5);
+                                this.context.lineTo(x + hmargin + barWidth, y + height);
+                            this.context.closePath();
+    
+                            this.context.stroke();                        
+                            this.context.fill();
+
+                            // Draw the darker top section
+                            this.context.beginPath();
+                                this.context.fillStyle = 'rgba(255,255,255,0.3)';
+                                this.context.moveTo(x + hmargin, y);
+                                this.context.lineTo(x + hmargin + 10, y - 5);
+                                this.context.lineTo(x + hmargin + 10 + barWidth, y - 5);
+                                this.context.lineTo(x + hmargin + barWidth, y);
+                                this.context.lineTo(x + hmargin, y);
+                            this.context.closePath();
+    
+                            this.context.stroke();
+                            this.context.fill();
+
+                            // Draw the darker right side section
+                            this.context.beginPath();
+                                this.context.fillStyle = 'rgba(0,0,0,0.4)';
+                                this.context.moveTo(x + hmargin + barWidth, y);
+                                this.context.lineTo(x + hmargin + barWidth + 10, y - 5);
+                                this.context.lineTo(x + hmargin + barWidth + 10, y - 5 + height);
+                                this.context.lineTo(x + hmargin + barWidth, y + height);
+                                this.context.lineTo(x + hmargin + barWidth, y);
+                            this.context.closePath();
+
+                            this.context.stroke();
+                            this.context.fill();
+
+                            this.context.strokeStyle = prevStrokeStyle;
+                            this.context.fillStyle   = prevFillStyle;
+                        
+                        // Glass variant
+                        } else if (variant == 'glass') {
+ 
+                            var grad = this.context.createLinearGradient(
+                                                                         x + hmargin,
+                                                                         y,
+                                                                         x + hmargin + (barWidth / 2),
+                                                                         y
+                                                                        );
+                            grad.addColorStop(0, 'rgba(255,255,255,0.9)');
+                            grad.addColorStop(1, 'rgba(255,255,255,0.5)');
+
+                            this.context.beginPath();
+                            this.context.fillStyle = grad;
+                            this.context.fillRect(x + hmargin + 2,y + (this.data[i] > 0 ? 2 : 0),(barWidth / 2) - 2,height - 2);
+                            this.context.fill();
+                        }
+
+                    // Dot chart
+                    } else if (variant == 'dot') {
+
+                        this.context.beginPath();
+                        this.context.moveTo(x + (width / 2), y);
+                        this.context.lineTo(x + (width / 2), y + height);
+                        this.context.stroke();
+                        
+                        this.context.beginPath();
+                        this.context.fillStyle = this.Get('chart.colors')[i];
+                        this.context.arc(x + (width / 2), y + (this.data[i] > 0 ? 0 : height), 2, 0, 6.28, 0);
+                        
+                        // Set the colour for the dots
+                        this.context.fillStyle = this.Get('chart.colors')[0];
+
+                        /**
+                        * Sequential colors
+                        */
+                        if (this.Get('chart.colors.sequential')) {
+                            this.context.fillStyle = colors[i];
+                        }
+
+                        this.context.stroke();
+                        this.context.fill();
+                    
+                    // Pyramid chart
+                    } else if (variant == 'pyramid') {
+
+                        this.context.beginPath();
+                            var startY = (this.Get('chart.xaxispos') == 'center' ? (RGraph.GetHeight(this) / 2) : (RGraph.GetHeight(this) - this.gutterBottom));
+                        
+                            this.context.moveTo(x + hmargin, startY);
+                            this.context.lineTo(
+                                                x + hmargin + (barWidth / 2),
+                                                y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0)
+                                               );
+                            this.context.lineTo(x + hmargin + barWidth, startY);
+                        
+                        this.context.closePath();
+                        
+                        this.context.stroke();
+                        this.context.fill();
+                    
+                    // Arrow chart
+                    } else if (variant == 'arrow') {
+                        
+                        var startY = (this.Get('chart.xaxispos') == 'center' ? (RGraph.GetHeight(this) / 2) : (RGraph.GetHeight(this) - this.gutterBottom));
+
+                        this.context.lineWidth = this.Get('chart.linewidth') ? this.Get('chart.linewidth') : 1;
+                        this.context.lineCap = 'round';
+
+                        this.context.beginPath();
+
+                            this.context.moveTo(x + hmargin + (barWidth / 2), startY);
+                            this.context.lineTo(x + hmargin + (barWidth / 2), y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0));
+                            this.context.arc(x + hmargin + (barWidth / 2),
+                                             y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0),
+                                             5,
+                                             this.data[i] > 0 ? 0.78 : 5.6,
+                                             this.data[i] > 0 ? 0.79 : 5.48,
+                                             this.data[i] < 0);
+
+                            this.context.moveTo(x + hmargin + (barWidth / 2), y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0));
+                            this.context.arc(x + hmargin + (barWidth / 2),
+                                             y + (this.Get('chart.xaxispos') == 'center' && (this.data[i] < 0) ? height : 0),
+                                             5,
+                                             this.data[i] > 0 ? 2.355 : 4,
+                                             this.data[i] > 0 ? 2.4 : 3.925,
+                                             this.data[i] < 0);
+
+                        this.context.stroke();
+                        
+                        this.context.lineWidth = 1;
+
+                    // Unknown variant type
+                    } else {
+                        alert('[BAR] Warning! Unknown chart.variant: ' + variant);
+                    }
+
+                    this.coords.push([x + hmargin, y, width - (2 * hmargin), height]);
+
+
+                /**
+                * Stacked bar
+                */
+                } else if (typeof(this.data[i]) == 'object' && this.Get('chart.grouping') == 'stacked') {
+                    
+                    var barWidth     = width - (2 * hmargin);
+                    var redrawCoords = [];// Necessary to draw if the shadow is enabled
+                    var startY       = 0;
+
+                    for (j=0; j<this.data[i].length; ++j) {
+
+                        // Stacked bar chart and X axis pos in the middle - poitless since negative values are not permitted
+                        if (xaxispos == 'center') {
+                            alert("[BAR] It's fruitless having the X axis position at the center on a stacked bar chart.");
+                            return;
+                        }
+
+                        // Negative values not permitted for the stacked chart
+                        if (this.data[i][j] < 0) {
+                            alert('[BAR] Negative values are not permitted with a stacked bar chart. Try a grouped one instead.');
+                            return;
+                        }
+
+                        /**
+                        * Set the fill and stroke colors
+                        */
+                            this.context.strokeStyle = strokeStyle
+                            this.context.fillStyle = colors[j];
+    
+                            if (this.Get('chart.colors.reverse')) {
+                                this.context.fillStyle = colors[this.data[i].length - j - 1];
+                            }
+
+                        var height = (this.data[i][j] / this.max) * (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom );
+
+                        // If the X axis pos is in the center, we need to half the  height
+                        if (xaxispos == 'center') {
+                            height /= 2;
+                        }
+
+                        var totalHeight = (RGraph.array_sum(this.data[i]) / this.max) * (RGraph.GetHeight(this) - hmargin - this.gutterTop - this.gutterBottom);
+
+                        /**
+                        * Store the coords for tooltips
+                        */
+                        this.coords.push([x + hmargin, y, width - (2 * hmargin), height]);
+
+                        // MSIE shadow
+                        if (document.all && shadow) {
+                            this.DrawIEShadow([x + hmargin, y, width - (2 * hmargin), height + 1]);
+                        }
+
+                        this.context.strokeRect(x + hmargin, y, width - (2 * hmargin), height);
+                        this.context.fillRect(x + hmargin, y, width - (2 * hmargin), height);
+
+                        
+                        if (j == 0) {
+                            var startY = y;
+                            var startX = x;
+                        }
+
+                        /**
+                        * Store the redraw coords if the shadow is enabled
+                        */
+                        if (shadow) {
+                            redrawCoords.push([x + hmargin, y, width - (2 * hmargin), height, colors[j]]);
+                        }
+
+                        /**
+                        * Stacked 3D effect
+                        */
+                        if (variant == '3d') {
+
+                            var prevFillStyle = this.context.fillStyle;
+                            var prevStrokeStyle = this.context.strokeStyle;
+
+    
+                            // Draw the top side
+                            if (j == 0) {
+                                this.context.beginPath();
+                                    this.context.moveTo(startX + hmargin, y);
+                                    this.context.lineTo(startX + 10 + hmargin, y - 5);
+                                    this.context.lineTo(startX + 10 + barWidth + hmargin, y - 5);
+                                    this.context.lineTo(startX + barWidth + hmargin, y);
+                                this.context.closePath();
+                                
+                                this.context.fill();
+                                this.context.stroke();
+                            }
+
+                            // Draw the side section
+                            this.context.beginPath();
+                                this.context.moveTo(startX + barWidth + hmargin, y);
+                                this.context.lineTo(startX + barWidth + hmargin + 10, y - 5);
+                                this.context.lineTo(startX + barWidth + + hmargin + 10, y - 5 + height);
+                                this.context.lineTo(startX + barWidth + hmargin , y + height);
+                            this.context.closePath();
+                            
+                            this.context.fill();
+                            this.context.stroke();
+
+                            // Draw the darker top side
+                            if (j == 0) {
+                                this.context.fillStyle = 'rgba(255,255,255,0.3)';
+                                this.context.beginPath();
+                                    this.context.moveTo(startX + hmargin, y);
+                                    this.context.lineTo(startX + 10 + hmargin, y - 5);
+                                    this.context.lineTo(startX + 10 + barWidth + hmargin, y - 5);
+                                    this.context.lineTo(startX + barWidth + hmargin, y);
+                                this.context.closePath();
+                                
+                                this.context.fill();
+                                this.context.stroke();
+                            }
+
+                            // Draw the darker side section
+                            this.context.fillStyle = 'rgba(0,0,0,0.4)';
+                            this.context.beginPath();
+                                this.context.moveTo(startX + barWidth + hmargin, y);
+                                this.context.lineTo(startX + barWidth + hmargin + 10, y - 5);
+                                this.context.lineTo(startX + barWidth + + hmargin + 10, y - 5 + height);
+                                this.context.lineTo(startX + barWidth + hmargin , y + height);
+                            this.context.closePath();
+                            
+                            this.context.fill();
+                            this.context.stroke();
+
+                            this.context.strokeStyle = prevStrokeStyle;
+                            this.context.fillStyle = prevFillStyle;
+                        }
+
+                        y += height;
+                    }
+
+                    // This bit draws the text labels that appear above the bars if requested
+                    if (this.Get('chart.labels.above')) {
+
+                        // Turn off any shadow
+                        RGraph.NoShadow(this);
+
+                        this.context.fillStyle = this.Get('chart.text.color');
+                        RGraph.Text(this.context,this.Get('chart.text.font'),typeof(this.Get('chart.labels.above.size')) == 'number' ? this.Get('chart.labels.above.size') : this.Get('chart.text.size') - 3,startX + (barWidth / 2) + this.Get('chart.hmargin'),startY - (this.Get('chart.shadow') && this.Get('chart.shadow.offsety') < 0 ? 7 : 4),String(this.Get('chart.units.pre') + RGraph.array_sum(this.data[i]).toFixed(this.Get('chart.labels.above.decimals')) + this.Get('chart.units.post')),this.Get('chart.labels.above.angle') ? 'bottom' : null,this.Get('chart.labels.above.angle') ? (this.Get('chart.labels.above.angle') > 0 ? 'right' : 'left') : 'center',null,this.Get('chart.labels.above.angle'));
+                      
+                        // Turn any shadow back on
+                        if (shadow) {
+                            this.context.shadowColor   = shadowColor;
+                            this.context.shadowBlur    = shadowBlur;
+                            this.context.shadowOffsetX = shadowOffsetX;
+                            this.context.shadowOffsetY = shadowOffsetY;
+                        }
+                    }
+                    
+
+                    /**
+                    * Redraw the bars if the shadow is enabled due to hem being drawn from the bottom up, and the
+                    * shadow spilling over to higher up bars
+                    */
+                    if (shadow) {
+
+                        RGraph.NoShadow(this);
+
+                        for (k=0; k<redrawCoords.length; ++k) {
+                            this.context.strokeStyle = strokeStyle;
+                            this.context.fillStyle = redrawCoords[k][4];
+                            this.context.strokeRect(redrawCoords[k][0], redrawCoords[k][1], redrawCoords[k][2], redrawCoords[k][3]);
+                            this.context.fillRect(redrawCoords[k][0], redrawCoords[k][1], redrawCoords[k][2], redrawCoords[k][3]);
+
+                            this.context.stroke();
+                            this.context.fill();
+                        }
+                        
+                        // Reset the redraw coords to be empty
+                        redrawCoords = [];
+                    }
+                /**
+                * Grouped bar
+                */
+                } else if (typeof(this.data[i]) == 'object' && this.Get('chart.grouping') == 'grouped') {
+
+                    var redrawCoords = [];
+                    this.context.lineWidth = this.Get('chart.linewidth');
+
+                    for (j=0; j<this.data[i].length; ++j) {
+                        // Set the fill and stroke colors
+                        this.context.strokeStyle = strokeStyle;
+                        this.context.fillStyle   = colors[j];
+
+                        var individualBarWidth = (width - (2 * hmargin)) / this.data[i].length;
+                        var height = (this.data[i][j] / this.max) * (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom );
+
+                        // If the X axis pos is in the center, we need to half the  height
+                        if (xaxispos == 'center') {
+                            height /= 2;
+                        }
+
+                        var startX = x + hmargin + (j * individualBarWidth);
+
+                        /**
+                        * Determine the start positioning for the bar
+                        */
+                        if (xaxispos == 'top') {
+                            var startY = this.Get('chart.gutter.top');
+                            var height = Math.abs(height);
+
+                        } else if (xaxispos == 'center') {
+                            var startY = this.gutterTop + (this.grapharea / 2) - height;
+                            
+                        } else {
+                            var startY = this.canvas.height - this.gutterBottom - height;
+                            var height = Math.abs(height);
+                        }
+
+                        /**
+                        * Draw MSIE shadow
+                        */
+                        if (RGraph.isIE8() && shadow) {
+                            this.DrawIEShadow([startX, startY, individualBarWidth, height]);
+                        }
+
+                        this.context.strokeRect(startX, startY, individualBarWidth, height);
+                        this.context.fillRect(startX, startY, individualBarWidth, height);
+                        y += height;
+
+                        // This bit draws the text labels that appear above the bars if requested
+                        if (this.Get('chart.labels.above')) {
+                        
+                            this.context.strokeStyle = 'rgba(0,0,0,0)';
+
+                            // Turn off any shadow
+                            if (shadow) {
+                                RGraph.NoShadow(this);
+                            }
+
+                            var yPos = y - 3;
+
+                            // Account for negative bars
+                            if (this.data[i][j] < 0) {
+                                yPos += height + 6 + (this.Get('chart.text.size') - 4);
+                            }
+
+                            this.context.fillStyle = this.Get('chart.text.color');
+                            RGraph.Text(this.context,this.Get('chart.text.font'),typeof(this.Get('chart.labels.above.size')) == 'number' ? this.Get('chart.labels.above.size') : this.Get('chart.text.size') - 3,startX + (individualBarWidth / 2),startY - 2,RGraph.number_format(this, this.data[i][j].toFixed(this.Get('chart.labels.above.decimals'))),null,this.Get('chart.labels.above.angle') ? (this.Get('chart.labels.above.angle') > 0 ? 'right' : 'left') : 'center', null, this.Get('chart.labels.above.angle'));
+                          
+                            // Turn any shadow back on
+                            if (shadow) {
+                                this.context.shadowColor   = shadowColor;
+                                this.context.shadowBlur    = shadowBlur;
+                                this.context.shadowOffsetX = shadowOffsetX;
+                                this.context.shadowOffsetY = shadowOffsetY;
+                            }
+                        }
+
+                        /**
+                        * Grouped 3D effect
+                        */
+                        if (variant == '3d') {
+                            var prevFillStyle = this.context.fillStyle;
+                            var prevStrokeStyle = this.context.strokeStyle;
+                            
+                            // Draw the top side
+                            this.context.beginPath();
+                                this.context.moveTo(startX, startY);
+                                this.context.lineTo(startX + 10, startY - 5);
+                                this.context.lineTo(startX + 10 + individualBarWidth, startY - 5);
+                                this.context.lineTo(startX + individualBarWidth, startY);
+                            this.context.closePath();
+                            
+                            this.context.fill();
+                            this.context.stroke();
+                            
+                            // Draw the side section
+                            this.context.beginPath();
+                                this.context.moveTo(startX + individualBarWidth, startY);
+                                this.context.lineTo(startX + individualBarWidth + 10, startY - 5);
+                                this.context.lineTo(startX + individualBarWidth + 10, startY - 5 + height);
+                                this.context.lineTo(startX + individualBarWidth , startY + height);
+                            this.context.closePath();
+                            
+                            this.context.fill();
+                            this.context.stroke();
+
+
+                            // Draw the darker top side
+                            this.context.fillStyle = 'rgba(255,255,255,0.3)';
+                            this.context.beginPath();
+                                this.context.moveTo(startX, startY);
+                                this.context.lineTo(startX + 10, startY - 5);
+                                this.context.lineTo(startX + 10 + individualBarWidth, startY - 5);
+                                this.context.lineTo(startX + individualBarWidth, startY);
+                            this.context.closePath();
+                            
+                            this.context.fill();
+                            this.context.stroke();
+                            
+                            // Draw the darker side section
+                            this.context.fillStyle = 'rgba(0,0,0,0.4)';
+                            this.context.beginPath();
+                                this.context.moveTo(startX + individualBarWidth, startY);
+                                this.context.lineTo(startX + individualBarWidth + 10, startY - 5);
+                                this.context.lineTo(startX + individualBarWidth + 10, startY - 5 + height);
+                                this.context.lineTo(startX + individualBarWidth , startY + height);
+                            this.context.closePath();
+                            
+                            this.context.fill();
+                            this.context.stroke();
+
+                            this.context.strokeStyle = prevStrokeStyle;
+                            this.context.fillStyle   = prevFillStyle;
+                        }
+
+                        this.coords.push([startX, startY, individualBarWidth, height]);
+
+                        // Facilitate shadows going to the left
+                        if (this.Get('chart.shadow')) {
+                            redrawCoords.push([startX, startY, individualBarWidth, height]);
+                        }
+                    }
+                    
+                    /**
+                    * Redraw the bar if shadows are going to the left
+                    */
+                    if (redrawCoords.length) {
+
+                        RGraph.NoShadow(this);
+                        
+                        this.context.lineWidth = this.Get('chart.linewidth');
+
+                        this.context.beginPath();
+                            for (var j=0; j<redrawCoords.length; ++j) {
+
+                                this.context.fillStyle   = this.Get('chart.colors')[j];
+                                this.context.strokeStyle = this.Get('chart.strokecolor');
+
+                                this.context.fillRect(redrawCoords[j][0], redrawCoords[j][1], redrawCoords[j][2], redrawCoords[j][3]);
+                                this.context.strokeRect(redrawCoords[j][0], redrawCoords[j][1], redrawCoords[j][2], redrawCoords[j][3]);
+                            }
+                        this.context.fill();
+                        this.context.stroke();
+
+                        redrawCoords = [];
+                    }
+                }
+
+            this.context.closePath();
+        }
+
+        /**
+        * Turn off any shadow
+        */
+        RGraph.NoShadow(this);
+
+
+        /**
+        * Install the onclick event handler
+        */
+        if (this.Get('chart.tooltips')) {
+        
+            // Need to register this object for redrawing
+            RGraph.Register(this);
+
+            /**
+            * Install the window onclick handler
+            */
+            var window_onclick_func = function (){RGraph.Redraw();};
+            window.addEventListener('click', window_onclick_func, false);
+            RGraph.AddEventListener('window_' + this.id, 'click', window_onclick_func);
+
+
+
+            /**
+            * If the cursor is over a hotspot, change the cursor to a hand. Bar chart tooltips can now
+            * be based around the onmousemove event
+            */
+            canvas_onmousemove = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas    = document.getElementById(e.target.id);
+                var obj       = canvas.__object__;
+                var barCoords = obj.getBar(e);
+
+                /**
+                * If there are bar coords AND the bar has height
+                */
+
+                if (barCoords && barCoords[4] > 0) {
+
+                    /**
+                    * Get the tooltip text
+                    */
+                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')(barCoords[5]));
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')[barCoords[5]](barCoords[5]));
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && (typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'string' || typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'number')) {
+                        var text = String(obj.Get('chart.tooltips')[barCoords[5]]);
+                
+                    } else {
+                        var text = null;
+                    }
+
+                    if (text) {
+                        canvas.style.cursor = 'pointer';
+                    } else {
+                        canvas.style.cursor = 'default';
+                    }
+                    
+                    /**
+                    * Hide the currently displayed tooltip if the index is the same
+                    */
+                    if (   RGraph.Registry.Get('chart.tooltip')
+                        && RGraph.Registry.Get('chart.tooltip').__canvas__.id != obj.id
+                        && obj.Get('chart.tooltips.event') == 'onmousemove') {
+
+                        RGraph.Redraw();
+                        RGraph.HideTooltip();
+                    }
+
+                    /**
+                    * This facilitates the tooltips using the onmousemove event
+                    */
+
+                    if (   obj.Get('chart.tooltips.event') == 'onmousemove'
+                        && (
+                               (RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__index__ != barCoords[5])
+                            || !RGraph.Registry.Get('chart.tooltip')
+                           )
+                        && text) {
+                        /**
+                        * Show a tooltip if it's defined
+                        */
+                        RGraph.Redraw(obj);
+
+                        if (obj.Get('chart.tooltips.highlight')) {
+                            obj.context.beginPath();
+                            obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                            obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                            obj.context.strokeRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]);
+                            obj.context.fillRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]);
+                    
+                            obj.context.stroke();
+                            obj.context.fill();
+                        }
+
+                        RGraph.Tooltip(canvas, text, e.pageX, e.pageY, barCoords[5]);
+                    }
+                } else {
+                    canvas.style.cursor = 'default';
+                }
+            }
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove);
+            this.canvas.addEventListener('mousemove', canvas_onmousemove, false);
+
+
+            /**
+            * Install the onclick event handler for the tooltips
+            */
+            if (this.Get('chart.tooltips.event') == 'onclick') {
+
+                canvas_onclick = function (e)
+                {
+                    var e = RGraph.FixEventObject(e);
+    
+                    // If the button pressed isn't the left, we're not interested
+                    if (e.button != 0) return;
+    
+                    e = RGraph.FixEventObject(e);
+    
+                    var canvas    = document.getElementById(this.id);
+                    var obj       = canvas.__object__;
+                    var barCoords = obj.getBar(e);
+
+                    /**
+                    * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn
+                    * This "deselects" any already selected bar
+                    */
+                    RGraph.Redraw();
+
+                    /**
+                    * Loop through the bars determining if the mouse is over a bar
+                    */
+                    if (barCoords) {
+
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = String(obj.Get('chart.tooltips')(barCoords[5]));
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[barCoords[5]]) == 'function') {
+                            var text = String(obj.Get('chart.tooltips')[barCoords[5]](barCoords[5]));
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = String(obj.Get('chart.tooltips')[barCoords[5]]);
+
+                        } else {
+                            var text = null;
+                        }
+
+                        /**
+                        * Show a tooltip if it's defined
+                        */
+                        if (text && text != 'undefined') {
+
+                            if (obj.Get('chart.tooltips.highlight')) {
+                                // [TODO] Allow customisation of the highlight colors
+                                obj.context.beginPath();
+                                obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                                obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                                obj.context.strokeRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]);
+                                obj.context.fillRect(barCoords[1], barCoords[2], barCoords[3], barCoords[4]);
+            
+                                obj.context.stroke();
+                                obj.context.fill();
+                            }
+
+                            RGraph.Tooltip(canvas, text, e.pageX, e.pageY, barCoords[5]);
+                        }
+                    }
+    
+                    /**
+                    * Stop the event bubbling
+                    */
+                    e.stopPropagation();
+                }
+                RGraph.AddEventListener(this.id, 'click', canvas_onclick);
+                this.canvas.addEventListener('click', canvas_onclick, false);
+            }
+
+
+            // This resets the bar graph
+            // 8th August 2010 : Is this redundant
+            //if (typeof(obj) != 'undefined' && obj == RGraph.Registry.Get('chart.tooltip')) {
+            //    obj.style.display = 'none';
+            //    RGraph.Registry.Set('chart.tooltip', null)
+            //}
+        }
+    }
+
+    /**
+    * Draws the labels for the graph
+    */
+    RGraph.Bar.prototype.DrawLabels = function ()
+    {
+        var context    = this.context;
+        var text_angle = this.Get('chart.text.angle');
+        var text_size  = this.Get('chart.text.size');
+        var labels     = this.Get('chart.labels');
+
+
+        // Draw the Y axis labels:
+        if (this.Get('chart.ylabels')) {
+            this.Drawlabels_top();
+            this.Drawlabels_center();
+            this.Drawlabels_bottom();
+        }
+
+        /**
+        * The X axis labels
+        */
+        if (typeof(labels) == 'object' && labels) {
+
+            var yOffset = 13 + Number(this.Get('chart.xlabels.offset'));
+
+            /**
+            * Text angle
+            */
+            var angle  = 0;
+            var halign = 'center';
+
+            if (text_angle > 0) {
+                angle  = -1 * text_angle;
+                halign   = 'right';
+                yOffset -= 5;
+                
+                if (this.Get('chart.xaxispos') == 'top') {
+                    halign   = 'left';
+                    yOffset += 5;
+                }
+            }
+
+            // Draw the X axis labels
+            context.fillStyle = this.Get('chart.text.color');
+            
+            // How wide is each bar
+            var barWidth = (RGraph.GetWidth(this) - this.gutterRight - this.gutterLeft) / labels.length;
+            
+            // Reset the xTickGap
+            xTickGap = (RGraph.GetWidth(this) - this.gutterRight - this.gutterLeft) / labels.length
+
+            // Draw the X tickmarks
+            var i=0;
+            var font = this.Get('chart.text.font');
+
+            for (x=this.gutterLeft + (xTickGap / 2); x<=RGraph.GetWidth(this) - this.gutterRight; x+=xTickGap) {
+                RGraph.Text(context, font,
+                                      text_size,
+                                      x + (this.Get('chart.text.angle') == 90 ? 0 : 0),
+                                      this.Get('chart.xaxispos') == 'top' ? this.gutterTop - yOffset + text_size  - 1: (RGraph.GetHeight(this) - this.gutterBottom) + yOffset,
+                                      String(labels[i++]),
+                                      (this.Get('chart.text.angle') == 90 ? 'center' : null),
+                                      halign,
+                                      null,
+                                      angle);
+            }
+        }
+    }
+
+    /**
+    * Draws the X axis at the top
+    */
+    RGraph.Bar.prototype.Drawlabels_top = function ()
+    {
+        this.context.beginPath();
+        this.context.fillStyle = this.Get('chart.text.color');
+        this.context.strokeStyle = 'black';
+
+        if (this.Get('chart.xaxispos') == 'top') {
+
+            var context    = this.context;
+            var interval   = (this.grapharea * (1/5) );
+            var text_size  = this.Get('chart.text.size');
+            var units_pre  = this.Get('chart.units.pre');
+            var units_post = this.Get('chart.units.post');
+            var align      = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left';
+            var font       = this.Get('chart.text.font');
+            var numYLabels = this.Get('chart.ylabels.count');
+
+            if (this.Get('chart.ylabels.inside') == true) {
+                var xpos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft + 5 : RGraph.GetWidth(this) - this.gutterRight - 5;
+                var align = this.Get('chart.yaxispos') == 'left' ? 'left' : 'right';
+                var boxed = true;
+            } else {
+                var xpos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : this.canvas.width - this.gutterRight + 5;
+                var boxed = false;
+            }
+            
+            /**
+            * Draw specific Y labels here so that the local variables can be reused
+            */
+            if (typeof(this.Get('chart.ylabels.specific')) == 'object' && this.Get('chart.ylabels.specific')) {
+                
+                var labels = RGraph.array_reverse(this.Get('chart.ylabels.specific'));
+                var grapharea = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+                for (var i=0; i<labels.length; ++i) {
+                    
+                    var y = this.gutterTop + (grapharea * (i / labels.length)) + (grapharea / labels.length);
+                    
+                    RGraph.Text(context, font, text_size, xpos, y, labels[i], 'center', align, boxed);
+                }
+
+                return;
+            }
+
+            // 1(ish) label
+            if (numYLabels == 3 || numYLabels == 5) {
+                RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + interval, '-' + RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, boxed);
+    
+                // 5 labels
+                if (numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (1*interval) + this.gutterTop + this.halfTextHeight + interval, '-' + RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (3*interval) + this.gutterTop + this.halfTextHeight + interval, '-' + RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, boxed);
+                }
+                
+                // 3 labels
+                if (numYLabels == 3 || numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (2*interval) + this.gutterTop + this.halfTextHeight + interval, '-' + RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (4*interval) + this.gutterTop + this.halfTextHeight + interval, '-' + RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, boxed);
+                }
+            }
+            
+            // 10 Y labels
+            if (numYLabels == 10) {
+
+                interval = (this.grapharea / numYLabels );
+
+                for (var i=10; i>0; --i) {
+                    RGraph.Text(context, font, text_size, xpos,this.gutterTop + ((this.grapharea / numYLabels) * i),'-' + RGraph.number_format(this,((this.scale[4] / numYLabels) * i).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post), 'center', align, boxed);
+                }
+            }
+        }
+        
+        this.context.fill();
+        this.context.stroke();
+    }
+
+    /**
+    * Draws the X axis in the middle
+    */
+    RGraph.Bar.prototype.Drawlabels_center = function ()
+    {
+        var font       = this.Get('chart.text.font');
+        var numYLabels = this.Get('chart.ylabels.count');
+
+        this.context.fillStyle = this.Get('chart.text.color');
+
+        if (this.Get('chart.xaxispos') == 'center') {
+
+            /**
+            * Draw the top labels
+            */
+            var interval   = (this.grapharea * (1/10) );
+            var text_size  = this.Get('chart.text.size');
+            var units_pre  = this.Get('chart.units.pre');
+            var units_post = this.Get('chart.units.post');
+            var context = this.context;
+            var align   = '';
+            var xpos    = 0;
+            var boxed   = false;
+
+            this.context.fillStyle = this.Get('chart.text.color');
+            this.context.strokeStyle = 'black';
+
+            if (this.Get('chart.ylabels.inside') == true) {
+                var xpos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft + 5 : RGraph.GetWidth(this) - this.gutterRight - 5;
+                var align = this.Get('chart.yaxispos') == 'left' ? 'left' : 'right';
+                var boxed = true;
+            } else {
+                var xpos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : RGraph.GetWidth(this) - this.gutterRight + 5;
+                var align = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left';
+                var boxed = false;
+            }
+
+
+
+
+
+
+
+
+
+
+
+
+            /**
+            * Draw specific Y labels here so that the local variables can be reused
+            */
+            if (typeof(this.Get('chart.ylabels.specific')) == 'object' && this.Get('chart.ylabels.specific')) {
+
+                var labels = this.Get('chart.ylabels.specific');
+                var grapharea = this.canvas.height - this.gutterTop - this.gutterBottom;
+
+                // Draw the top halves labels
+                for (var i=0; i<labels.length; ++i) {
+
+                    var y = this.gutterTop + ((grapharea / 2) / labels.length) * i;
+                    
+                    RGraph.Text(context, font, text_size, xpos, y, String(labels[i]), 'center', align, boxed);
+                }
+
+                // Draw the bottom halves labels
+                for (var i=labels.length-1; i>=0; --i) {
+                    var y = this.gutterTop  + (grapharea * ( (i+1) / (labels.length * 2) )) + (grapharea / 2);
+
+                    RGraph.Text(context, font, text_size, xpos, y, labels[labels.length - i - 1], 'center', align, boxed);
+                }
+
+                return;
+            }
+
+
+
+
+
+
+
+
+
+
+
+
+            if (numYLabels == 3 || numYLabels == 5) {
+                RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, boxed);
+    
+                if (numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (1*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (3*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, boxed);
+                }
+                
+                if (numYLabels == 3 || numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (4*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (2*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, boxed);
+                }
+            } else if (numYLabels == 10) {
+                // 10Y labels
+                interval = (this.grapharea / numYLabels) / 2;
+            
+                for (var i=0; i<numYLabels; ++i) {
+                    RGraph.Text(context, font, text_size, xpos,this.gutterTop + ((this.grapharea / (numYLabels * 2)) * i),RGraph.number_format(this, ((this.scale[4] / numYLabels) * (numYLabels - i)).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post), 'center', align, boxed);
+                }
+            }
+            ///////////////////////////////////////////////////////////////////////////////////
+
+            /**
+            * Draw the bottom (X axis) labels
+            */
+            var interval = (this.grapharea) / 10;
+
+            if (numYLabels == 3 || numYLabels == 5) {
+                if (numYLabels == 3 || numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (this.grapharea + this.gutterTop + this.halfTextHeight) - (4 * interval), '-' + RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (this.grapharea + this.gutterTop + this.halfTextHeight) - (2 * interval), '-' + RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, boxed);
+                }
+    
+                if (numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (this.grapharea + this.gutterTop + this.halfTextHeight) - (3 * interval), '-' + RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (this.grapharea + this.gutterTop + this.halfTextHeight) - interval, '-' + RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, boxed);
+                }
+    
+                RGraph.Text(context, font, text_size, xpos,  this.grapharea + this.gutterTop + this.halfTextHeight, '-' + RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, boxed);
+
+            } else if (numYLabels == 10) {
+
+                // Arbitrary number of Y labels
+                interval = (this.grapharea / numYLabels) / 2;
+            
+                for (var i=0; i<numYLabels; ++i) {
+                    RGraph.Text(context, font, text_size, xpos,this.gutterTop + (this.grapharea / 2) + ((this.grapharea / (numYLabels * 2)) * i) + (this.grapharea / (numYLabels * 2)),RGraph.number_format(this, ((this.scale[4] / numYLabels) * (i+1)).toFixed((this.Get('chart.scale.decimals'))), '-' + units_pre, units_post),'center', align, boxed);
+                }
+            }
+
+
+
+        }
+    }
+
+    /**
+    * Draws the X axdis at the bottom (the default)
+    */
+    RGraph.Bar.prototype.Drawlabels_bottom = function ()
+    {
+        this.context.beginPath();
+        this.context.fillStyle = this.Get('chart.text.color');
+        this.context.strokeStyle = 'black';
+
+        if (this.Get('chart.xaxispos') != 'center' && this.Get('chart.xaxispos') != 'top') {
+            
+            var interval   = (this.grapharea * (1/5) );
+            var text_size  = this.Get('chart.text.size');
+            var units_pre  = this.Get('chart.units.pre');
+            var units_post = this.Get('chart.units.post');
+            var context    = this.context;
+            var align      = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left';
+            var font       = this.Get('chart.text.font');
+            var numYLabels = this.Get('chart.ylabels.count');
+
+            if (this.Get('chart.ylabels.inside') == true) {
+                var xpos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft + 5 : RGraph.GetWidth(this) - this.gutterRight - 5;
+                var align = this.Get('chart.yaxispos') == 'left' ? 'left' : 'right';
+                var boxed = true;
+            } else {
+                var xpos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : RGraph.GetWidth(this) - this.gutterRight + 5;
+                var boxed = false;
+            }
+            
+            /**
+            * Draw specific Y labels here so that the local variables can be reused
+            */
+            if (this.Get('chart.ylabels.specific') && typeof(this.Get('chart.ylabels.specific')) == 'object') {
+                
+                var labels = this.Get('chart.ylabels.specific');
+                var grapharea = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+                for (var i=0; i<labels.length; ++i) {
+                    var y = this.gutterTop + (grapharea * (i / labels.length));
+                    
+                    RGraph.Text(context, font, text_size, xpos, y, labels[i], 'center', align, boxed);
+                }
+
+                return;
+            }
+
+            // 1 label
+            if (numYLabels == 3 || numYLabels == 5) {
+                RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, boxed);
+    
+                // 5 labels
+                if (numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (1*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (3*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, boxed);
+                }
+                
+                // 3 labels
+                if (numYLabels == 3 || numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, (2*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, boxed);
+                    RGraph.Text(context, font, text_size, xpos, (4*interval) + this.gutterTop + this.halfTextHeight, RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, boxed);
+                }
+            }
+            
+            // 10 Y labels
+            if (numYLabels == 10) {
+
+                interval   = (this.grapharea / numYLabels );
+
+                for (var i=0; i<numYLabels; ++i) {
+                    RGraph.Text(context, font, text_size, xpos, this.gutterTop + ((this.grapharea / numYLabels) * i), RGraph.number_format(this,((this.scale[4] / numYLabels) * (numYLabels - i)).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post), 'center', align, boxed);
+                }
+            }
+        }
+        
+        this.context.fill();
+        this.context.stroke();
+    }
+
+
+    /**
+    * This function is used by MSIE only to manually draw the shadow
+    * 
+    * @param array coords The coords for the bar
+    */
+    RGraph.Bar.prototype.DrawIEShadow = function (coords)
+    {
+        var prevFillStyle = this.context.fillStyle;
+        var offsetx       = this.Get('chart.shadow.offsetx');
+        var offsety       = this.Get('chart.shadow.offsety');
+        
+        this.context.lineWidth = this.Get('chart.linewidth');
+        this.context.fillStyle = this.Get('chart.shadow.color');
+        this.context.beginPath();
+        
+        // Draw shadow here
+        this.context.fillRect(coords[0] + offsetx, coords[1] + offsety, coords[2], coords[3]);
+
+        this.context.fill();
+        
+        // Change the fillstyle back to what it was
+        this.context.fillStyle = prevFillStyle;
+    }
+
+
+    /**
+    * Not used by the class during creating the graph, but is used by event handlers
+    * to get the coordinates (if any) of the selected bar
+    */
+    RGraph.Bar.prototype.getBar = function (e)
+    {
+        var canvas      = e.target;
+        var obj         = e.target.__object__;
+        var mouseCoords = RGraph.getMouseXY(e);
+
+        /**
+        * Loop through the bars determining if the mouse is over a bar
+        */
+        for (var i=0; i<obj.coords.length; i++) {
+
+            var mouseX = mouseCoords[0];
+            var mouseY = mouseCoords[1];
+
+            var left   = obj.coords[i][0];
+            var top    = obj.coords[i][1];
+            var width  = obj.coords[i][2];
+            var height = obj.coords[i][3];
+
+            if (   mouseX >= left
+                && mouseX <= left + width
+                && mouseY >= top
+                && mouseY <= top + height) {
+                
+                return [obj, left, top, width, height, i];
+            }
+        }
+        
+        return null;
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.bipolar.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.bipolar.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.bipolar.js	(revision 225)
@@ -0,0 +1,785 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The bi-polar/age frequency constructor.
+    * 
+    * @param string id The id of the canvas
+    * @param array  left  The left set of data points
+    * @param array  right The right set of data points
+    */
+    RGraph.Bipolar = function (id, left, right)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.canvas.__object__ = this;
+        this.type              = 'bipolar';
+        this.coords            = [];
+        this.max               = 0;
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        
+        // The left and right data respectively
+        this.left       = left;
+        this.right      = right;
+        this.data       = [left, right];
+
+        this.properties = {
+            'chart.margin':                 2,
+            'chart.xtickinterval':          null,
+            'chart.labels':                 [],
+            'chart.text.size':              10,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.title.left':             '',
+            'chart.title.right':            '',
+            'chart.gutter.center':          60,
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.colors':                 ['#0f0'],
+            'chart.contextmenu':            null,
+            'chart.tooltips':               null,
+            'chart.tooltips.effect':         'fade',
+            'chart.tooltips.css.class':      'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.stroke':       'black',
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.shadow':                 false,
+            'chart.shadow.color':           '#666',
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.shadow.blur':            3,
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.xmax':                   null,
+            'chart.scale.decimals':         null,
+            'chart.scale.point':            '.',
+            'chart.scale.thousand':         ',',
+            'chart.axis.color':             'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.strokestyle':            '#333'
+        }
+
+        // Pad the arrays so they're the same size
+        while (this.left.length < this.right.length) this.left.push(0);
+        while (this.left.length > this.right.length) this.right.push(0);
+    }
+
+
+    /**
+    * The setter
+    * 
+    * @param name  string The name of the parameter to set
+    * @param value mixed  The value of the paraneter 
+    */
+    RGraph.Bipolar.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * The getter
+    * 
+    * @param name string The name of the parameter to get
+    */
+    RGraph.Bipolar.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+    
+    /**
+    * Draws the graph
+    */
+    RGraph.Bipolar.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+        
+
+
+        // Reset the data to what was initially supplied
+        this.left  = this.data[0];
+        this.right = this.data[1];
+
+
+        /**
+        * Reset the coords array
+        */
+        this.coords = [];
+
+        this.GetMax();
+        this.DrawAxes();
+        this.DrawTicks();
+        this.DrawLeftBars();
+        this.DrawRightBars();
+
+        if (this.Get('chart.axis.color') != 'black') {
+            this.DrawAxes(); // Draw the axes again (if the axes color is not black)
+        }
+
+        this.DrawLabels();
+        this.DrawTitles();
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+
+        /**
+        * Install the on* event handlers
+        */
+        if (this.Get('chart.tooltips')) {
+
+
+            // Register the object so that it gets redrawn
+            RGraph.Register(this);
+
+
+            /**
+            * Install the window onclick handler
+            */
+            
+            /**
+            * Install the window event handler
+            */
+            var eventHandler_window_click = function ()
+            {
+                RGraph.Redraw();
+            }
+            window.addEventListener('click', eventHandler_window_click, false);
+            RGraph.AddEventListener('window_' + this.id, 'click', eventHandler_window_click);
+
+
+
+            /**
+            * If the cursor is over a hotspot, change the cursor to a hand
+            */
+            var eventHandler_canvas_mousemove = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id);
+                var obj = canvas.__object__;
+
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+                var bar         = obj.getBar(e);
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+
+                    var mouseX = mouseCoords[0];  // In relation to the canvas
+                    var mouseY = mouseCoords[1];  // In relation to the canvas
+                    var left   = obj.coords[i][0];
+                    var top    = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+
+                    if (mouseX >= left && mouseX <= (left + width ) && mouseY >= top && mouseY <= (top + height) ) {
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(i);
+
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[i]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[i](i);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = obj.Get('chart.tooltips')[i];
+
+                        } else {
+                            var text = '';
+                        }
+                        
+                        if (text) {
+                            canvas.style.cursor = 'pointer';
+                        }
+                        return;
+                    }
+                }
+                    
+                canvas.style.cursor = 'default';
+            }
+            this.canvas.addEventListener('mousemove', eventHandler_canvas_mousemove, false);
+            RGraph.AddEventListener(this.id, 'mouseover', eventHandler_canvas_mousemove);
+
+
+            /**
+            * Install the onclick event handler for the tooltips
+            */
+            var eventHandler_canvas_click = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id)
+                var obj = canvas.__object__;
+
+                /**
+                * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn
+                * This "deselects" any already selected bar
+                */
+                RGraph.Clear(canvas);
+                obj.Draw();
+    
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+                var bar         = obj.getBar(e);
+
+                /**
+                * This bit shows the tooltip (if required)
+                */
+                if (bar) {
+
+                    var mouseX = mouseCoords[0];  // In relation to the canvas
+                    var mouseY = mouseCoords[1];  // In relation to the canvas
+                    var left   = bar[0];
+                    var top    = bar[1];
+                    var width  = bar[2];
+                    var height = bar[3];
+                    var index  = bar[4];
+
+                    /**
+                    * Show a tooltip if it's defined
+                    */
+                    if (obj.Get('chart.tooltips')) {
+
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(index);
+
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[index]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[index](index);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = obj.Get('chart.tooltips')[index];
+
+                        } else {
+                            var text = '';
+                        }
+                        
+                        // Only now show a tooltip if one has been set
+                        if (text) {
+                            obj.context.beginPath();
+                                obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                                obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                                obj.context.strokeRect(left, top, width, height);
+                                obj.context.fillRect(left, top, width, height);
+                            obj.context.stroke();
+                            obj.context.fill();
+
+                            RGraph.Tooltip(canvas, text, e.pageX, e.pageY, index);
+                        }
+                    }
+                }
+
+                /**
+                * Stop the event bubbling
+                */
+                e.stopPropagation();
+                
+                return false;
+            }
+            this.canvas.addEventListener('click', eventHandler_canvas_click, false);
+            RGraph.AddEventListener(this.id, 'click', eventHandler_canvas_click);
+
+            // This resets the bipolar graph
+            if (RGraph.Registry.Get('chart.tooltip')) {
+                RGraph.Registry.Get('chart.tooltip').style.display = 'none';
+                RGraph.Registry.Set('chart.tooltip', null)
+            }
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Add the common .getShape() method
+        */
+        this.getShape = this.getBar;
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draws the axes
+    */
+    RGraph.Bipolar.prototype.DrawAxes = function ()
+    {
+        // Draw the left set of axes
+        this.context.beginPath();
+        this.context.strokeStyle = this.Get('chart.axis.color');
+
+        this.axisWidth  = (RGraph.GetWidth(this) - this.Get('chart.gutter.center') - this.gutterLeft - this.gutterRight) / 2;
+        this.axisHeight = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+        this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+        this.context.lineTo(this.gutterLeft + this.axisWidth, RGraph.GetHeight(this) - this.gutterBottom);
+        this.context.lineTo(this.gutterLeft + this.axisWidth, this.gutterTop);
+        
+        this.context.stroke();
+
+        // Draw the right set of axes
+        this.context.beginPath();
+
+        var x = this.gutterLeft + this.axisWidth + this.Get('chart.gutter.center');
+        
+        this.context.moveTo(x, this.gutterTop);
+        this.context.lineTo(x, RGraph.GetHeight(this) - this.gutterBottom);
+        this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+
+        this.context.stroke();
+    }
+
+
+    /**
+    * Draws the tick marks on the axes
+    */
+    RGraph.Bipolar.prototype.DrawTicks = function ()
+    {
+        var numDataPoints = this.left.length;
+        var barHeight     = ( (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom)- (this.left.length * (this.Get('chart.margin') * 2) )) / numDataPoints;
+        
+        // Draw the left Y tick marks
+        for (var i = RGraph.GetHeight(this) - this.gutterBottom; i >= this.gutterTop; i -= (barHeight + ( this.Get('chart.margin') * 2)) ) {
+            if (i < (RGraph.GetHeight(this) - this.gutterBottom) ) {
+                this.context.beginPath();
+                this.context.moveTo(this.gutterLeft + this.axisWidth, i);
+                this.context.lineTo(this.gutterLeft + this.axisWidth + 3, i);
+                this.context.stroke();
+            }
+        }
+
+        //Draw the right axis Y tick marks
+        for (var i = RGraph.GetHeight(this) - this.gutterBottom; i >= this.gutterTop; i -= (barHeight + ( this.Get('chart.margin') * 2)) ) {
+            if (i < (RGraph.GetHeight(this) - this.gutterBottom) ) {
+                this.context.beginPath();
+                this.context.moveTo(this.gutterLeft + this.axisWidth + this.Get('chart.gutter.center'), i);
+                this.context.lineTo(this.gutterLeft + this.axisWidth + this.Get('chart.gutter.center') - 3, i);
+                this.context.stroke();
+            }
+        }
+        
+        var xInterval = this.axisWidth / 10;
+
+        // Is chart.xtickinterval specified ? If so, use that.
+        if (typeof(this.Get('chart.xtickinterval')) == 'number') {
+            xInterval = this.Get('chart.xtickinterval');
+        }
+
+        
+        // Draw the left sides X tick marks
+        for (i=this.gutterLeft; i<(this.gutterLeft + this.axisWidth); i+=xInterval) {
+            this.context.beginPath();
+            this.context.moveTo(i, RGraph.GetHeight(this) - this.gutterBottom);
+            this.context.lineTo(i, (RGraph.GetHeight(this) - this.gutterBottom) + 4);
+            this.context.closePath();
+            
+            this.context.stroke();
+        }
+
+        // Draw the right sides X tick marks
+        var stoppingPoint = RGraph.GetWidth(this) - this.gutterRight;
+
+        for (i=(this.gutterLeft + this.axisWidth + this.Get('chart.gutter.center') + xInterval); i<=stoppingPoint; i+=xInterval) {
+            this.context.beginPath();
+                this.context.moveTo(i, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(i, (RGraph.GetHeight(this) - this.gutterBottom) + 4);
+            this.context.closePath();
+            
+            this.context.stroke();
+        }
+        
+        // Store this for later
+        this.barHeight = barHeight;
+    }
+
+
+    /**
+    * Figures out the maximum value, or if defined, uses xmax
+    */
+    RGraph.Bipolar.prototype.GetMax = function()
+    {
+        var max = 0;
+        var dec = this.Get('chart.scale.decimals');
+        
+        // chart.xmax defined
+        if (this.Get('chart.xmax')) {
+
+            max = this.Get('chart.xmax');
+            
+            this.scale    = [];
+            this.scale[0] = Number((max / 5) * 1).toFixed(dec);
+            this.scale[1] = Number((max / 5) * 2).toFixed(dec);
+            this.scale[2] = Number((max / 5) * 3).toFixed(dec);
+            this.scale[3] = Number((max / 5) * 4).toFixed(dec);
+            this.scale[4] = Number(max).toFixed(dec);
+
+            this.max = max;
+            
+
+        // Generate the scale ourselves
+        } else {
+            this.leftmax  = RGraph.array_max(this.left);
+            this.rightmax = RGraph.array_max(this.right);
+            max = Math.max(this.leftmax, this.rightmax);
+
+            this.scale    = RGraph.getScale(max, this);
+            this.scale[0] = Number(this.scale[0]).toFixed(dec);
+            this.scale[1] = Number(this.scale[1]).toFixed(dec);
+            this.scale[2] = Number(this.scale[2]).toFixed(dec);
+            this.scale[3] = Number(this.scale[3]).toFixed(dec);
+            this.scale[4] = Number(this.scale[4]).toFixed(dec);
+
+            this.max = this.scale[4];
+        }
+
+        // Don't need to return it as it is stored in this.max
+    }
+
+
+    /**
+    * Function to draw the left hand bars
+    */
+    RGraph.Bipolar.prototype.DrawLeftBars = function ()
+    {
+        // Set the stroke colour
+        this.context.strokeStyle = this.Get('chart.strokestyle');
+
+        for (i=0; i<this.left.length; ++i) {
+            
+            /**
+            * Turn on a shadow if requested
+            */
+            if (this.Get('chart.shadow')) {
+                this.context.shadowColor   = this.Get('chart.shadow.color');
+                this.context.shadowBlur    = this.Get('chart.shadow.blur');
+                this.context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+                this.context.shadowOffsetY = this.Get('chart.shadow.offsety');
+            }
+
+            this.context.beginPath();
+
+                // Set the colour
+                if (this.Get('chart.colors')[i]) {
+                    this.context.fillStyle = this.Get('chart.colors')[i];
+                }
+                
+                /**
+                * Work out the coordinates
+                */
+                var width = ( (this.left[i] / this.max) *  this.axisWidth);
+                var coords = [
+                              this.gutterLeft + this.axisWidth - width,
+                              this.gutterTop + (i * ( this.axisHeight / this.left.length)) + this.Get('chart.margin'),
+                              width,
+                              this.barHeight
+                             ];
+
+                // Draw the IE shadow if necessary
+                if (RGraph.isIE8() && this.Get('chart.shadow')) {
+                    this.DrawIEShadow(coords);
+                }
+    
+                
+                this.context.strokeRect(coords[0], coords[1], coords[2], coords[3]);
+                this.context.fillRect(coords[0], coords[1], coords[2], coords[3]);
+
+            this.context.stroke();
+            this.context.fill();
+
+            /**
+            * Add the coordinates to the coords array
+            */
+            this.coords.push([
+                              coords[0],
+                              coords[1],
+                              coords[2],
+                              coords[3]
+                             ]);
+        }
+
+        /**
+        * Turn off any shadow
+        */
+        RGraph.NoShadow(this);
+    }
+
+
+    /**
+    * Function to draw the right hand bars
+    */
+    RGraph.Bipolar.prototype.DrawRightBars = function ()
+    {
+        // Set the stroke colour
+        this.context.strokeStyle = this.Get('chart.strokestyle');
+            
+        /**
+        * Turn on a shadow if requested
+        */
+        if (this.Get('chart.shadow')) {
+            this.context.shadowColor   = this.Get('chart.shadow.color');
+            this.context.shadowBlur    = this.Get('chart.shadow.blur');
+            this.context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+            this.context.shadowOffsetY = this.Get('chart.shadow.offsety');
+        }
+
+        for (var i=0; i<this.right.length; ++i) {
+            this.context.beginPath();
+
+            // Set the colour
+            if (this.Get('chart.colors')[i]) {
+                this.context.fillStyle = this.Get('chart.colors')[i];
+            }
+
+
+            var width = ( (this.right[i] / this.max) * this.axisWidth);
+            var coords = [
+                          this.gutterLeft + this.axisWidth + this.Get('chart.gutter.center'),
+                          this.Get('chart.margin') + (i * (this.axisHeight / this.right.length)) + this.gutterTop,
+                          width,
+                          this.barHeight
+                        ];
+
+                // Draw the IE shadow if necessary
+                if (RGraph.isIE8() && this.Get('chart.shadow')) {
+                    this.DrawIEShadow(coords);
+                }
+            this.context.strokeRect(coords[0], coords[1], coords[2], coords[3]);
+            this.context.fillRect(coords[0], coords[1], coords[2], coords[3]);
+
+            this.context.closePath();
+            
+            /**
+            * Add the coordinates to the coords array
+            */
+            this.coords.push([
+                              coords[0],
+                              coords[1],
+                              coords[2],
+                              coords[3]
+                             ]);
+        }
+        
+        this.context.stroke();
+
+        /**
+        * Turn off any shadow
+        */
+        RGraph.NoShadow(this);
+    }
+
+
+    /**
+    * Draws the titles
+    */
+    RGraph.Bipolar.prototype.DrawLabels = function ()
+    {
+        this.context.fillStyle = this.Get('chart.text.color');
+
+        var labelPoints = new Array();
+        var font = this.Get('chart.text.font');
+        var size = this.Get('chart.text.size');
+        
+        var max = Math.max(this.left.length, this.right.length);
+        
+        for (i=0; i<max; ++i) {
+            var barAreaHeight = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+            var barHeight     = barAreaHeight / this.left.length;
+            var yPos          = (i * barAreaHeight) + this.gutterTop;
+
+            labelPoints.push(this.gutterTop + (i * barHeight) + (barHeight / 2) + 5);
+        }
+
+        for (i=0; i<labelPoints.length; ++i) {
+            RGraph.Text(this.context,
+                        this.Get('chart.text.font'),
+                        this.Get('chart.text.size'),
+                        this.gutterLeft + this.axisWidth + (this.Get('chart.gutter.center') / 2),
+                        labelPoints[i],
+                        String(this.Get('chart.labels')[i] ? this.Get('chart.labels')[i] : ''),
+                        null,
+                        'center');
+        }
+
+        // Now draw the X labels for the left hand side
+        RGraph.Text(this.context,font,size,this.gutterLeft,RGraph.GetHeight(this) - this.gutterBottom + 14,RGraph.number_format(this, this.scale[4], this.Get('chart.units.pre'), this.Get('chart.units.post')),null,'center');
+        RGraph.Text(this.context, font, size, this.gutterLeft + ((RGraph.GetWidth(this) - this.Get('chart.gutter.center') - this.gutterLeft - this.gutterRight) / 2) * (1/5), RGraph.GetHeight(this) - this.gutterBottom + 14, RGraph.number_format(this, this.scale[3], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, this.gutterLeft + ((RGraph.GetWidth(this) - this.Get('chart.gutter.center') - this.gutterLeft - this.gutterRight) / 2) * (2/5), RGraph.GetHeight(this) - this.gutterBottom + 14, RGraph.number_format(this, this.scale[2], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, this.gutterLeft + ((RGraph.GetWidth(this) - this.Get('chart.gutter.center') - this.gutterLeft - this.gutterRight) / 2) * (3/5), RGraph.GetHeight(this) - this.gutterBottom + 14, RGraph.number_format(this, this.scale[1], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, this.gutterLeft + ((RGraph.GetWidth(this) - this.Get('chart.gutter.center') - this.gutterLeft - this.gutterRight) / 2) * (4/5), RGraph.GetHeight(this) - this.gutterBottom + 14, RGraph.number_format(this, this.scale[0], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+
+        // Now draw the X labels for the right hand side
+        RGraph.Text(this.context, font, size, RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom + 14, RGraph.number_format(this, this.scale[4], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, RGraph.GetWidth(this) - this.gutterRight - (this.axisWidth * 0.2), RGraph.GetHeight(this) - this.gutterBottom + 14,RGraph.number_format(this, this.scale[3], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, RGraph.GetWidth(this) - this.gutterRight - (this.axisWidth * 0.4), RGraph.GetHeight(this) - this.gutterBottom + 14,RGraph.number_format(this, this.scale[2], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, RGraph.GetWidth(this) - this.gutterRight - (this.axisWidth * 0.6), RGraph.GetHeight(this) - this.gutterBottom + 14,RGraph.number_format(this, this.scale[1], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+        RGraph.Text(this.context, font, size, RGraph.GetWidth(this) - this.gutterRight - (this.axisWidth * 0.8), RGraph.GetHeight(this) - this.gutterBottom + 14,RGraph.number_format(this, this.scale[0], this.Get('chart.units.pre'), this.Get('chart.units.post')), null, 'center');
+    }
+    
+    /**
+    * Draws the titles
+    */
+    RGraph.Bipolar.prototype.DrawTitles = function ()
+    {
+        RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size'), this.gutterLeft + 5, (this.gutterTop / 2) + 5, String(this.Get('chart.title.left')), 'center');
+        RGraph.Text(this.context,this.Get('chart.text.font'), this.Get('chart.text.size'), RGraph.GetWidth(this) - this.gutterRight - 5, (this.gutterTop / 2) + 5, String(this.Get('chart.title.right')), 'center', 'right');
+        
+        // Draw the main title for the whole chart
+        RGraph.DrawTitle(this.canvas, this.Get('chart.title'), this.gutterTop);
+    }
+
+
+    /**
+    * This function is used by MSIE only to manually draw the shadow
+    * 
+    * @param array coords The coords for the bar
+    */
+    RGraph.Bipolar.prototype.DrawIEShadow = function (coords)
+    {
+        var prevFillStyle = this.context.fillStyle;
+        var offsetx = this.Get('chart.shadow.offsetx');
+        var offsety = this.Get('chart.shadow.offsety');
+        
+        this.context.lineWidth = this.Get('chart.linewidth');
+        this.context.fillStyle = this.Get('chart.shadow.color');
+        this.context.beginPath();
+        
+        // Draw shadow here
+        this.context.fillRect(coords[0] + offsetx, coords[1] + offsety, coords[2],coords[3]);
+
+        this.context.fill();
+        
+        // Change the fillstyle back to what it was
+        this.context.fillStyle = prevFillStyle;
+    }
+
+
+    /**
+    * Returns the appropriate focussed bar coordinates
+    * 
+    * @param e object The event object
+    */
+    RGraph.Bipolar.prototype.getBar = function (e)
+    {
+        var obj         = e.target.__object__;
+        var canvas      = obj.canvas;
+        var context     = obj.context;
+        var mouseCoords = RGraph.getMouseXY(e);
+
+        /**
+        * Loop through the bars determining if the mouse is over a bar
+        */
+        for (var i=0; i<obj.coords.length; i++) {
+
+            var mouseX = mouseCoords[0];
+            var mouseY = mouseCoords[1];
+            var left   = obj.coords[i][0];
+            var top    = obj.coords[i][1];
+            var width  = obj.coords[i][2];
+            var height = obj.coords[i][3];
+
+            if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
+                return [left,top,width,height,i];
+            }
+        }
+
+        return null;
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.adjusting.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.adjusting.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.adjusting.js	(revision 225)
@@ -0,0 +1,1164 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+
+    RGraph.AllowAdjusting = function (obj)
+    {
+        var canvas  = obj.canvas;
+        var context = obj.context;
+        
+        RGraph.Register(obj);
+        
+        if (obj.type == 'thermometer') {
+            var canvas_onmousedown = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var obj         = e.target.__object__;
+                var id          = obj.id;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var coords      = obj.coords;
+
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                
+                if (   mouseX > obj.coords[0]
+                    && mouseX < (obj.coords[0] + obj.coords[2])
+                    ) {
+
+                    RGraph.Registry.Set('chart.thermometer.' + id + '.resizing', true);
+                    obj.canvas.style.cursor = 'ns-resize';
+
+                    /**
+                    * Fire the RGraph event
+                    */
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustbegin');
+                    
+                    // Fire the onmousemove handler
+                    canvas_onmousemove(e);
+                }
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+
+            var canvas_onmousemove = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+                
+                var obj         = e.target.__object__;
+                var id          = obj.id;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var coords      = obj.coords;
+
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                
+                if (RGraph.Registry.Get('chart.thermometer.' + id + '.resizing')) {
+                    
+                    var capRadius = (RGraph.GetWidth(obj) - obj.gutterLeft - obj.gutterRight) / 2;
+                    var top       = obj.gutterTop + capRadius;
+                    var bottom    = coords[1] + coords[3];
+                    var newvalue = obj.max - ((mouseY - top) / (bottom - obj.gutterTop - capRadius)) * (obj.max - obj.min);
+
+                    obj.value = Math.round(newvalue);
+
+                    /**
+                    * Bounds checking
+                    */
+                    if (obj.value > obj.max) {
+                        obj.value = obj.max;
+                    } else if (obj.value < obj.min) {
+                        obj.value = obj.min;
+                    }
+
+                    RGraph.Clear(canvas);
+                    obj.Draw();
+
+                    /**
+                    * Fire the RGraph event
+                    */
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjust');
+                }
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+
+
+
+            var canvas_onmouseup = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+                
+                var obj         = e.target.__object__;
+                var id          = obj.id;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var coords      = obj.coords;
+
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+
+                RGraph.Registry.Set('chart.thermometer.' + id + '.resizing', false);
+                obj.canvas.style.cursor = 'default';
+
+                /**
+                * Fire the RGraph event
+                */
+                RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+            
+            
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        } else if (obj.type == 'line') {
+            var canvas_onmousedown = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var obj         = e.target.__object__;
+                var id          = obj.id;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var coords      = obj.coords;
+                var mouseCoords = RGraph.getMouseXY(e);
+    
+                RGraph.Redraw();
+    
+                for (var i=0; i<coords.length; ++i) {
+    
+                    if (   mouseCoords[0] > coords[i][0] - 5
+                        && mouseCoords[1] > coords[i][1] - 5
+                        && mouseCoords[0] < coords[i][0] + 5
+                        && mouseCoords[1] < coords[i][1] + 5
+                       ) {
+
+                        var numDataSeries = obj.original_data.length;
+                        var numDataPoints = obj.original_data[0].length;
+                        var data_series   = i / numDataPoints;
+                            data_series = Math.floor(data_series);
+    
+    
+    
+                      canvas.style.cursor = 'ns-resize';
+                      RGraph.FireCustomEvent(obj, 'onadjustbegin');
+                      RGraph.Registry.Set('chart.adjusting.line.' + id, [obj, i, [coords[i][0], coords[i][1]], data_series]);
+    
+                      return;
+                    }
+                }
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+    
+    
+            var canvas_onmousemove = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+                var id = e.target.__object__.id;
+    
+                var state = RGraph.Registry.Get('chart.adjusting.line.' + id);
+    
+                if (state) {
+                    var obj         = state[0];
+                    var idx         = state[1];
+                    var canvas      = obj.canvas;
+                    var context     = obj.context;
+                    var data_series = state[3];
+                    var points      = obj.original_data[data_series];
+                    var mouseCoords = RGraph.getMouseXY(e);
+                    var x           = mouseCoords[0];
+                    var y           = mouseCoords[1];
+                    var h           = RGraph.GetHeight(obj);
+                    
+    
+                    // Don't allow adjusting to the gutter if out-of-bounds is NOT specified
+                    if (!obj.Get('chart.outofbounds')) {
+                        if (y >= (h - obj.gutterBottom)) {
+                            y = h - obj.gutterBottom;
+                        } else if (y <= obj.gutterTop) {
+                            y = obj.gutterTop;
+                        }
+                    }
+
+                    // This accounts for a center X axis
+                    if (obj.Get('chart.xaxispos') == 'center') {
+                        y *= 2;
+                        y -= (obj.gutterTop / 2);
+                    } else if (obj.Get('chart.xaxispos') == 'top') {
+                        y = RGraph.GetHeight(obj) - y;
+                    }
+
+                    var pos   = h - obj.gutterTop - obj.gutterBottom;
+                        pos   = pos - (y - obj.gutterTop);
+                    var value = (obj.max / (h - obj.gutterTop - obj.gutterBottom)) * pos;
+                    
+                    if (obj.Get('chart.ylabels.invert')) {
+                        value = obj.max - value;
+                    }
+
+
+
+                    // Adjust the index so that it's applicable to the correct data series
+                    for (var i=0; i<data_series; ++i) {
+                        idx -= obj.original_data[0].length;
+                    }
+
+                    obj.original_data[data_series][idx] = value;
+    
+                    obj.Set('chart.ymax', obj.max);
+                    canvas.style.cursor = 'ns-resize';
+                    RGraph.Redraw();
+
+                    /**
+                    * Fire the onadjust event
+                    */
+                    RGraph.FireCustomEvent(obj, 'onadjust');
+    
+                    return;
+    
+                } else {
+                    
+                    var canvas  = e.target;
+                    var context = canvas.__object__.context;
+                    var obj     = canvas.__object__;
+                    var mouseCoords = RGraph.getMouseXY(e);
+                    var x       = mouseCoords[0];
+                    var y       = mouseCoords[1];
+    
+                    for (var i=0; i<obj.coords.length; ++i) {
+    
+                        if (   x > obj.coords[i][0] - 5
+                            && y > obj.coords[i][1] - 5
+                            && x < obj.coords[i][0] + 5
+                            && y < obj.coords[i][1] + 5
+                           ) {
+    
+                           canvas.style.cursor = 'ns-resize';
+                           return;
+                        }
+                    }
+                }
+                
+                e.target.style.cursor = null;
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+    
+    
+            var canvas_onmouseup = function (e)
+            {
+                var id = e.target.__object__.id;
+                
+                if (RGraph.Registry.Get('chart.adjusting.line.' + id)) {
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+                }
+
+                RGraph.Registry.Set('chart.adjusting.line.' + id, null);
+                e.target.style.cursor = null;
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+    
+    
+            var canvas_onmouseout = function (e)
+            {
+                canvas_onmouseup(e);
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+        
+        /**
+        * HProgress bar
+        */
+        } else if (obj.type == 'hprogress') {
+
+            
+            var canvas_onmousedown = function (e)
+            {
+                var id = e.target.__object__.id;
+
+                RGraph.Registry.Set('chart.adjusting.hprogress.' + id, [true]);
+                
+                RGraph.FireCustomEvent(e.target.__object__, 'onadjustbegin');
+                
+                canvas_onmousemove(e);
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+            var canvas_onmousemove = function (e)
+            {
+                var id    = e.target.__object__.id;
+                var state = RGraph.Registry.Get('chart.adjusting.hprogress.' + id);
+
+                if (state && state.length) {
+                    var obj     = e.target.__object__;
+                    var canvas  = obj.canvas;
+                    var context = obj.context;
+                    
+                    if (obj.type == 'hprogress') {
+                    
+                        var coords = RGraph.getMouseXY(e);
+                            coords[0] = Math.max(0, coords[0] - obj.gutterLeft);
+                        var barWidth  = canvas.width - obj.gutterLeft - obj.gutterRight;
+                        
+                        // Work out the new value
+                        var value  = (coords[0] / barWidth) * (obj.max - obj.Get('chart.min'));
+                            value += obj.Get('chart.min');
+                        
+                        obj.value = Math.max(0, value.toFixed());
+                        RGraph.Clear(obj.canvas);
+                        obj.Draw();
+
+/*
+                    } else if (obj.type == 'vprogress') {
+
+                        var coords = RGraph.getMouseXY(e);
+                            coords[1] = Math.max(0, coords[1] - obj.Get('chart.gutter'));
+                        var barHeight = canvas.height - (2 * obj.Get('chart.gutter'));
+                        
+                        // Work out the new value
+                        var value = ( (barHeight - coords[1]) / barHeight) * obj.max;
+                        
+                        obj.value = Math.max(0, value.toFixed());
+                        RGraph.Clear(obj.canvas);
+                        obj.Draw();
+*/
+                    }
+
+                    /**
+                    * Fire the onadjust event
+                    */
+                    RGraph.FireCustomEvent(obj, 'onadjust');
+                }
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+            
+            
+            var canvas_onmouseup = function (e)
+            {
+                var id = e.target.__object__.id;
+
+                if (RGraph.Registry.Get('chart.adjusting.hprogress.' + id)) {
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+                }
+
+                RGraph.Registry.Set('chart.adjusting.hprogress.' + id, null);
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+    
+    
+            var canvas_onmouseout = function (e)
+            {
+                canvas_onmouseup(e);
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+        
+        /**
+        * VProgress bar
+        */
+        } else if (obj.type == 'vprogress') {
+
+            
+            var canvas_onmousedown = function (e)
+            {
+                var id = e.target.__object__.id;
+
+                RGraph.Registry.Set('chart.adjusting.vprogress.' + id, [true]);
+                
+                RGraph.FireCustomEvent(e.target.__object__, 'onadjustbegin');
+                
+                canvas_onmousemove(e);
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+            var canvas_onmousemove = function (e)
+            {
+                var id    = e.target.__object__.id;
+                var state = RGraph.Registry.Get('chart.adjusting.vprogress.' + id);
+
+                if (state && state.length) {
+                    var obj     = e.target.__object__;
+                    var canvas  = obj.canvas;
+                    var context = obj.context;
+                    
+                    if (obj.type == 'hprogress') {
+                    
+                        var coords = RGraph.getMouseXY(e);
+                            coords[0] = Math.max(0, coords[0] - obj.gutterLeft);
+                        var barWidth  = canvas.width - obj.gutterLeft - obj.gutterRight;
+                        
+                        // Work out the new value
+                        var value  = (coords[0] / barWidth) * (obj.max - obj.Get('chart.min'));
+                            value += obj.Get('chart.min');
+                        
+                        obj.value = Math.max(0, value.toFixed());
+                        RGraph.Clear(obj.canvas);
+                        obj.Draw();
+
+                    } else if (obj.type == 'vprogress') {
+
+                        var coords = RGraph.getMouseXY(e);
+                            coords[1] = Math.max(0, coords[1] - obj.gutterTop);
+                        var barHeight = canvas.height - obj.gutterTop -  obj.gutterBottom;
+                        
+                        // Work out the new value
+                        var value = ( (barHeight - coords[1]) / barHeight) * obj.max;
+                        
+                        obj.value = Math.max(0, value.toFixed());
+                        RGraph.Clear(obj.canvas);
+                        obj.Draw();
+                    }
+
+                    /**
+                    * Fire the onadjust event
+                    */
+                    RGraph.FireCustomEvent(obj, 'onadjust');
+                }
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+            
+            
+            var canvas_onmouseup = function (e)
+            {
+                var id = e.target.__object__.id;
+
+                if (RGraph.Registry.Get('chart.adjusting.vprogress.' + id)) {
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+                }
+
+                RGraph.Registry.Set('chart.adjusting.vprogress.' + id, null);
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+    
+    
+            var canvas_onmouseout = function (e)
+            {
+                canvas_onmouseup(e);
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+        
+        /**
+        * Rose chart
+        */
+        } else if (obj.type == 'rose') {
+
+
+            obj.Set('chart.ymax', obj.max);
+
+
+            var canvas_onmousemove = function (e)
+            {
+                var obj     = e.target.__object__;
+                var id      = obj.id;
+                var canvas  = obj.canvas;
+                var context = obj.context;
+                var coords  = RGraph.getMouseXY(e);
+                var segment = RGraph.Registry.Get('chart.adjusting.rose.' + id);
+                var x       = Math.abs(coords[0] - obj.centerx);
+                var y       = Math.abs(coords[1] - obj.centery);
+                var theta   = Math.atan(y / x) * (180 / Math.PI); // theta is now in DEGREES
+
+
+                // Account for the correct quadrant
+                if (coords[0] >= obj.centerx && coords[1] < obj.centery) {
+                    theta = 90 - theta;
+                } else if (coords[0] >= obj.centerx && coords[1] >= obj.centery) {
+                    theta += 90;
+                } else if (coords[0] < obj.centerx && coords[1] >= obj.centery) {
+                    theta = 90 - theta;
+                    theta = 180 + theta;
+                    
+                } else if (coords[0] < obj.centerx && coords[1] < obj.centery) {
+                    theta = theta + 270;
+                }
+
+                var Opp = y;
+                var Adj = x;
+                var Hyp = Math.abs(Adj / Math.sin(theta / (180 / Math.PI)));
+
+                for (var i=0; i<obj.angles.length; ++i) {
+                    if (
+                           theta > obj.angles[i][0]
+                        && theta < obj.angles[i][1]) {
+
+                        if (RGraph.Registry.Get('chart.adjusting.rose.' + id) && i == segment[6]) {
+                            var newvalue  = (Hyp / (obj.radius - 25) ) * obj.max;
+                            obj.data[i]   = Math.min(newvalue, obj.max);
+
+                            RGraph.Clear(obj.canvas);
+                            obj.Draw();
+
+                            /**
+                            * Fire the onadjust event
+                            */
+                            RGraph.FireCustomEvent(obj, 'onadjust');
+                        }
+                        
+                        if (Hyp <= (obj.angles[i][2] + 5) && Hyp >= (obj.angles[i][2] - 5) ) {
+                            canvas.style.cursor = 'move';
+                            return false;
+                        
+                        } else if (obj.Get('chart.tooltips') && Hyp <= (obj.angles[i][2] - 5) ) {
+                            canvas.style.cursor = 'pointer';
+                            return false;
+                        }
+
+                    }
+                }
+
+                canvas.style.cursor = 'default';
+                
+                return;
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+
+
+            var canvas_onmousedown = function (e)
+            {
+                var obj     = e.target.__object__;
+                var id      = obj.id;
+                var canvas  = obj.canvas;
+                var context = obj.context;
+                var coords  = RGraph.getMouseXY(e);
+                var segment = obj.getSegment(e, 5);
+
+                if (segment && segment.length && !RGraph.Registry.Get('chart.adjusting.rose.' + id)) {
+                    var x = Math.abs(coords[0] - obj.centerx);
+                    var y = Math.abs(coords[1] - obj.centery);
+                    var a = Math.atan(y / x) * (180 / Math.PI); // a is now in DEGREES
+
+                    // Account for the correct quadrant
+                    if (coords[0] >= obj.centerx && coords[1] < obj.centery) {
+                        a  = 90 - a;
+                        a += 270;
+                    } else if (coords[0] >= obj.centerx && coords[1] >= obj.centery) {
+                        // Nada
+                    } else if (coords[0] < obj.centerx && coords[1] >= obj.centery) {
+                         a  = 90 - a;
+                         a += 90;
+                    } else if (coords[0] < obj.centerx && coords[1] < obj.centery) {
+                        a += 180;
+                    }
+
+                    var hyp = Math.abs(y / Math.sin(a / 57.3));
+
+                    if (hyp >= (segment[2] - 10) ) {
+
+                        /**
+                        * Hide any currently shown tooltip
+                        */
+                        if (RGraph.Registry.Get('chart.tooltip')) {
+                            RGraph.Registry.Get('chart.tooltip').style.display = 'none';
+                            RGraph.Registry.Set('chart.tooltip', null);
+                        }
+                        
+                        RGraph.Registry.Set('chart.adjusting.rose.' + id, segment);
+                        
+                        RGraph.FireCustomEvent(e.target.__object__, 'onadjustbegin');
+                        
+                        e.stopPropagation();
+                    }
+                }
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+            var canvas_onmouseup = function (e)
+            {
+                var obj = e.target.__object__;
+                var id  = obj.id;
+
+                if (RGraph.Registry.Get('chart.adjusting.rose.' + id)) {
+
+
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+                    RGraph.Registry.Set('chart.adjusting.rose.' + id, null);
+                    e.stopPropagation();
+                    
+                    return false;
+                }
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+    
+    
+            var canvas_onmouseout = function (e)
+            {
+                canvas_onmouseup(e);
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        /**
+        * Bar chart
+        */
+        } else if (obj.type == 'bar') {
+        
+            // Stacked bar charts not supported
+            if (obj.Get('chart.grouping') == 'stacked') {
+                alert('[BAR] Adjusting stacked bar charts is not supported');
+                return;
+            }
+
+
+            var canvas  = obj.canvas;
+            var context = obj.context;
+
+
+            var canvas_onmousemove = function (e)
+            {
+                var obj     = e.target.__object__;
+                var id      = obj.id;
+                var canvas  = obj.canvas;
+                var context = obj.context;
+                var mouse   = RGraph.getMouseXY(e);
+                var mousex  = mouse[0];
+                var mousey  = mouse[1]; // mousey, mousey...
+                
+
+                // Loop through the coords to see if the mouse position is at the top of a bar
+                for (var i=0; i<obj.coords.length; ++i) {
+
+                    var barX = obj.coords[i][0];
+                    var barY = obj.coords[i][1];
+                    var barW = obj.coords[i][2];
+                    var barH = obj.coords[i][3];
+                    
+                    if (mousex > barX && mousex < (barX + barW)) {
+
+                        /**
+                        * Change the mouse pointer
+                        */
+                        //if (   (obj.Get('chart.xaxispos') == 'bottom' && (mousey > (barY - 5) && mousey < (barY + 5)))
+                        //    || (((obj.Get('chart.xaxispos') == 'center' || obj.Get('chart.xaxispos') == 'top') && mousey > (barY + barH - 5) && mousey < (barY + barH + 5)))
+                        //    || ((obj.Get('chart.xaxispos') == 'center' && barX < (obj.canvas.height / 2) && mousey < (barY + 5) && mousey > barY))
+                        //   ) {
+                        //    canvas.style.cursor = 'ns-resize';
+
+                        //} else {
+                        //    canvas.style.cursor = 'default';
+                        //}
+
+
+
+                        var idx = RGraph.Registry.Get('chart.adjusting.bar.' + id)
+                        
+                        if (typeof(idx) == 'number') {
+
+                            // This accounts for a center X axis
+                            if (obj.Get('chart.xaxispos') == 'center') {
+                                obj.grapharea /= 2;
+                            }
+
+                            var newheight = obj.grapharea - (mousey - obj.gutterTop);
+                            var newvalue  = (newheight / obj.grapharea) * obj.max;
+                            
+                            // Account for X axis at the top
+                            if (obj.Get('chart.xaxispos') == 'top') {
+                                newvalue = obj.max - newvalue;
+                            }
+
+                            // Top and bottom boundaries
+                            if (newvalue > obj.max) newvalue = obj.max;
+
+                            if (obj.Get('chart.xaxispos') == 'center') {
+                                if (newvalue < (-1 * obj.max)) newvalue = (-1 * obj.max);
+                            
+                            } else {
+                                if (newvalue < 0) newvalue = 0;
+                            }
+
+                            ///////////////// This was fun to work out... /////////////////
+
+                            var j, index;
+
+                            for (var j=0, index=0; j<obj.data.length; ++j,++index) {
+
+                                if (typeof(obj.data[j]) == 'object') {
+
+                                    for (var k=0; k<obj.data[j].length && index <= idx; ++k, ++index) {
+                                        if (index == idx) {
+
+                                        
+                                            if (obj.Get('chart.xaxispos') == 'top') {
+                                                newvalue *= -1;
+                                            }
+
+                                            obj.data[j][k] = newvalue;
+                                            var b = true;
+                                            break;
+                                        }
+                                    }
+                                    
+                                    --index;
+                                } else if (typeof(obj.data[j]) == 'number') {
+
+                                    if (index == idx) {
+                                        
+                                        if (obj.Get('chart.xaxispos') == 'top') {
+                                            newvalue *= -1;
+                                        }
+
+                                        obj.data[j] = newvalue;
+
+                                        // No need to set b
+                                        break;
+                                    }
+                                }
+                                
+                                if (b) {
+                                    break;
+                                }
+                            }
+                            ///////////////////////////////////////////////////////////////
+
+                            RGraph.Clear(canvas);
+                            obj.Draw();
+
+                            /**
+                            * Fire the onadjust event
+                            */
+                            RGraph.FireCustomEvent(obj, 'onadjust');
+                        }
+
+                        return;
+                    }
+                }
+                
+                canvas.style.cursor = 'default';
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+
+
+
+            var canvas_onmousedown = function (e)
+            {
+                var obj     = e.target.__object__;
+                var id      = obj.id;
+                var canvas  = obj.canvas;
+                var context = obj.context;
+                var mouse   = RGraph.getMouseXY(e);
+                var mousex  = mouse[0];
+                var mousey  = mouse[1];
+
+                // Loop through the coords to see if the mouse position is at the top of a bar
+                for (var i=0; i<obj.coords.length; ++i) {
+                    if (mousex > obj.coords[i][0] && mousex < (obj.coords[i][0] + obj.coords[i][2])) {
+
+                        RGraph.FireCustomEvent(obj, 'onadjustbegin');
+
+                        obj.Set('chart.ymax', obj.max);
+                        RGraph.Registry.Set('chart.adjusting.bar.' + id, i);
+                        
+                        canvas_onmousemove(e);
+                    }
+                }
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+
+            var canvas_onmouseup = function (e)
+            {
+                var id = e.target.__object__.id;
+                
+                if (typeof(RGraph.Registry.Get('chart.adjusting.bar.' + id)) == 'number') {
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+                }
+                
+                RGraph.Registry.Set('chart.adjusting.bar.' + id, null);
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+
+
+            var canvas_onmouseout = function (e)
+            {
+                canvas_onmouseup(e);
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        /**
+        * The Radar chart
+        */
+        } else if (obj.type == 'radar') {
+
+
+            var canvas = obj.canvas;
+            var context = obj.context;
+            
+            
+            var canvas_onmousemove = function (e)
+            {
+                var id          = e.target.id;
+                var obj         = e.target.__object__;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var mouseDown   = RGraph.Registry.Get('chart.adjusting.radar.' + id);
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                if (mouseDown) {
+
+                    canvas.style.cursor = 'move';
+                    
+                    var dataset = mouseDown[0];
+                    var index   = mouseDown[1];
+                    var dx      = mouseCoords[0] - obj.centerx;
+                    var dy      = mouseCoords[1] - obj.centery;
+                    var hyp     = Math.sqrt((dx * dx) + (dy * dy));
+                    var newvalue = (hyp / (obj.size / 2)) * obj.max;
+                    
+                    newvalue = Math.min(obj.max, newvalue);
+                    newvalue = Math.max(0, newvalue);
+
+                    obj.data[mouseDown[0]][mouseDown[1]] = newvalue;
+                    RGraph.Clear(canvas);
+                    obj.Draw();
+
+                    /**
+                    * Fire the onadjust event
+                    */
+                    RGraph.FireCustomEvent(obj, 'onadjust');
+
+                } else {
+
+                    // Determine if the mouse is near a point, and if so, change the pointer
+                    for (var ds = 0; ds<obj.coords.length; ds++) {
+                        for (var i=0; i<obj.coords[ds].length; ++i) {
+                            
+                            var dx = Math.abs(mouseCoords[0] - obj.coords[ds][i][0]);
+                            var dy = Math.abs(mouseCoords[1] - obj.coords[ds][i][1]);
+                            var a  = Math.atan(dy / dx);
+        
+                            
+                            var hyp = Math.sqrt((dx * dx) + (dy * dy));
+        
+                            if (hyp <= 5) {
+                                canvas.style.cursor = 'move';
+                                return;
+                            }
+                        }
+                    }
+
+                    canvas.style.cursor = 'default';
+                }
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+            
+            
+            var canvas_onmousedown = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+                
+                var obj         = e.target.__object__;
+                var id          = obj.id;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var mouseCoords = RGraph.getMouseXY(e);
+
+
+                // Determine if the mouse is near a point
+                for (var j=0; j<obj.coords.length; ++j) {
+                    for (var i=0; i<obj.coords[j].length; ++i) {
+                        
+                        var dx = Math.abs(mouseCoords[0] - obj.coords[j][i][0]);
+                        var dy = Math.abs(mouseCoords[1] - obj.coords[j][i][1]);
+                        var a  = Math.atan(dy / dx);
+    
+                        
+                        var hyp = Math.sqrt((dx * dx) + (dy * dy));
+    
+                        if (hyp <= 5) {
+                            canvas.style.cursor = 'pointer';
+                            RGraph.FireCustomEvent(obj, 'onadjustbegin');
+
+                            RGraph.Registry.Set('chart.adjusting.radar.' + id, [j, i, obj.coords[j][i][0] > obj.centerx, obj.coords[j][i][1] > obj.centery]);
+                            return;
+                        }
+                    }
+                }
+                    
+                canvas.style.cursor = 'default';
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+            var canvas_onmouseup = function (e)
+            {
+                var id = e.target.id;
+
+                if (RGraph.Registry.Get('chart.adjusting.radar.' + id)) {
+                    RGraph.FireCustomEvent(e.target.__object__, 'onadjustend');
+                }
+
+                RGraph.Registry.Set('chart.adjusting.radar.' + id, null);
+                canvas.style.cursor = 'default';
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+    
+    
+            var canvas_onmouseout = function (e)
+            {
+                canvas_onmouseup(e);
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+        
+        /**
+        * Gantt chart
+        */
+        } else if (obj.type == 'gantt') {
+
+
+            /**
+            * The onmousedown event handler
+            */
+            var canvas_onmousedown = function (e)
+            {
+                var canvas      = e.target;
+                var id          = canvas.id;
+                var obj         = canvas.__object__;
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+
+                for (var i=0; i<obj.coords.length; ++i) {
+                    
+                    var coordX = obj.coords[i][0];
+                    var coordY = obj.coords[i][1];
+                    var coordW = obj.coords[i][2];
+                    var coordH = obj.coords[i][3];
+
+                    if (mouseX > coordX
+                        && mouseX < (coordX + coordW)
+                        && mouseY > coordY
+                        && mouseY < (coordY + coordH)
+                       ) {
+                        
+                        var mode = (mouseX >= (coordX + coordW - 5) ? 'resize' : 'move');
+
+                        RGraph.Registry.Set('chart.adjusting.gantt', {'index': i,'object': obj,'mousex': mouseX,'mousey': mouseY,'event_start': obj.Get('chart.events')[i][0],'event_duration': obj.Get('chart.events')[i][1],'mode': mode});
+
+                        RGraph.FireCustomEvent(obj, 'onadjustbegin');
+                        return;
+                    }
+                }
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+            
+            /**
+            * Change the pointer
+            */
+            var canvas_onmousemove = function (e)
+            {
+                var canvas      = e.target;
+                var id          = canvas.id;
+                var obj         = canvas.__object__;
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                
+                for (var i=0; i<obj.coords.length; ++i) {
+                    
+                    var coordX = obj.coords[i][0];
+                    var coordY = obj.coords[i][1];
+                    var coordW = obj.coords[i][2];
+                    var coordH = obj.coords[i][3];
+
+                    if (mouseX > coordX
+                        && mouseX < (coordX + coordW)
+                        && mouseY > coordY
+                        && mouseY < (coordY + coordH)
+                       ) {
+
+                       canvas.style.cursor = 'ew-resize';                        
+                        return;
+                    }
+                }
+                
+                canvas.style.cursor = 'default';
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+
+
+
+
+
+
+
+
+            var window_onmousemove = function (e)
+            {
+                var conf = RGraph.Registry.Get('chart.adjusting.gantt');
+
+                if (conf) {
+
+                    var obj         = conf['object'];
+                    var id          = obj.id;
+                    var index       = conf['index'];
+                    var startX      = conf['mousex'];
+                    var startY      = conf['mousey'];
+                    var eventStart  = conf['event_start'];
+                    var duration    = conf['event_duration'];
+                    var mode        = conf['mode'];
+                    var mouseCoords = RGraph.getMouseXY(e);
+                    var mouseX      = mouseCoords[0];
+                    var mouseY      = mouseCoords[1];
+                    
+                    RGraph.FireCustomEvent(obj, 'onadjust');
+
+                    if (mode == 'resize') {
+                    
+                        /**
+                        * Account for the right hand gutter. Appears to be a FF bug
+                        */
+                        if (mouseX > (RGraph.GetWidth(obj) - obj.gutterRight)) {
+                            mouseX = RGraph.GetWidth(obj) - obj.gutterRight;
+                        }
+                        
+
+                        var diff = ((mouseX - startX) / (RGraph.GetWidth(obj) - obj.gutterLeft - obj.gutterRight)) * obj.Get('chart.xmax');
+                            diff = Math.round(diff);
+                        
+                        obj.Get('chart.events')[index][1] = duration + diff;
+                        
+                        if (obj.Get('chart.events')[index][1] < 0) {
+                            obj.Get('chart.events')[index][1] = 1;
+                        }
+
+                    } else {
+
+                        var diff = ((mouseX - startX) / (RGraph.GetWidth(obj) - obj.gutterLeft - obj.gutterRight)) * obj.Get('chart.xmax');
+                        diff = Math.round(diff);
+
+                        if (   eventStart + diff > 0
+                            && (eventStart + diff + obj.Get('chart.events')[index][1]) < obj.Get('chart.xmax')) {
+    
+                            obj.Get('chart.events')[index][0] = eventStart + diff;
+                        
+                        } else if (eventStart + diff < 0) {
+                            obj.Get('chart.events')[index][0] = 0;
+                        
+                        } else if ((eventStart + diff + obj.Get('chart.events')[index][1]) > obj.Get('chart.xmax')) {
+                            obj.Get('chart.events')[index][0] = obj.Get('chart.xmax') - obj.Get('chart.events')[index][1];
+                        }
+                    }
+                    
+                    RGraph.Redraw();
+                    RGraph.FireCustomEvent(obj, 'onadjust');
+                }
+            }
+            window.addEventListener('mousemove', window_onmousemove, false);
+            RGraph.AddEventListener('window_' + canvas.id, 'mousemove', window_onmousemove);
+
+
+
+
+
+
+
+
+        
+        
+            var window_onmouseup = function (e)
+            {
+                if (RGraph.Registry.Get('chart.adjusting.gantt')) {
+                
+                    var conf = RGraph.Registry.Get('chart.adjusting.gantt');
+                    var obj  = conf['object'];
+                    var id   = obj.id;
+
+                    RGraph.FireCustomEvent(obj, 'onadjustend');
+                    RGraph.Registry.Set('chart.adjusting.gantt', null);
+                }
+            }
+            window.addEventListener('mouseup', window_onmouseup, false);
+            RGraph.AddEventListener('window_' + canvas.id, 'mouseup', window_onmouseup);
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.annotate.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.annotate.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.annotate.js	(revision 225)
@@ -0,0 +1,340 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+
+
+    /**
+    * The function which controls the annotate feature
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.Annotate = function (obj)
+    {
+        /**
+        * This installs some event handlers
+        */
+        if (obj.Get('chart.annotatable')) {
+
+            var canvas  = obj.canvas;
+            var context = obj.context;
+            
+            /**
+            * Capture the mouse events so we can set whther the mouse is down or not
+            */
+            var canvas_onmousedown = function (e)
+            {
+                if (e.button == 0) {
+
+                    e.target.__object__.Set('chart.mousedown', true);
+
+                    // Get the context
+                    var obj = e.target.__object__;
+                    var context = obj.context;
+
+                    // Don't want any "joining" lines or colour "bleeding"
+                    context.beginPath();
+
+                    // Accommodate Chrome
+                    var coords = RGraph.getMouseXY(e);
+                    var x      = coords[0];
+                    var y      = coords[1];
+                    
+                    // Clear the annotation recording
+                    RGraph.Registry.Set('annotate.actions', [obj.Get('chart.annotate.color')]);
+
+                    context.strokeStyle = obj.Get('chart.annotate.color');
+
+                    context.moveTo(x, y);
+                
+                    // Set the lineWidth
+                    context.lineWidth = 1;
+                    
+                    RGraph.Registry.Set('started.annotating', false);
+                    RGraph.Registry.Set('chart.annotating', obj);
+                    
+                    /**
+                    * Fire the onannotatebegin event. It also fires an event called ononnotatestart for BC purposes
+                    */
+                    RGraph.FireCustomEvent(obj, 'onannotatestart');
+                    RGraph.FireCustomEvent(obj, 'onannotatebegin');
+                }
+                
+                return false;
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+            
+            /**
+            * This cancels annotating for ALL canvases
+            */
+            var window_onmouseup = function (e)
+            {
+                var obj  = RGraph.Registry.Get('chart.annotating');
+                var tags = document.getElementsByTagName('canvas');
+
+                for (var i=0; i<tags.length; ++i) {
+                    if (tags[i].__object__) {
+                        tags[i].__object__.Set('chart.mousedown', false);
+                    }
+                }
+
+                if (e.button != 0 || !obj) {
+                    return;
+                }
+
+                // Store the annotations in browser storage if it's available
+                if (RGraph.Registry.Get('annotate.actions') && RGraph.Registry.Get('annotate.actions').length > 0 && window.localStorage) {
+
+                    var id = '__rgraph_annotations_' + e.target.id + '__';
+                    var annotations  = window.localStorage[id] ? window.localStorage[id] + '|' : '';
+                        annotations += RGraph.Registry.Get('annotate.actions');
+
+                    // Store the annotations information in HTML5 browser storage here
+                    window.localStorage[id] = annotations;
+                }
+                
+                // Clear the recorded annotations
+                RGraph.Registry.Set('annotate.actions', []);
+                
+                /**
+                * Fire the annotate event
+                */
+
+                RGraph.FireCustomEvent(obj, 'onannotateend');
+            }
+            window.addEventListener('mouseup', window_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'window_mouseup', window_onmouseup);
+            
+            /**
+            * Canvas onmouseup event
+            */
+            var canvas_onmouseup = function (e)
+            {
+                var obj = e.target.__object__;
+                
+                RGraph.Registry.Set('chart.mousedown', false);
+            }
+            canvas.addEventListener('mouseup', canvas_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'mouseup', canvas_onmouseup);
+
+            /**
+            * The canvas onmousemove function
+            */
+            var canvas_onmousemove = function (e)
+            {
+                var e      = RGraph.FixEventObject(e);
+                var obj    = e.target.__object__;
+                var coords = RGraph.getMouseXY(e);
+                var x      = coords[0];
+                var y      = coords[1];
+                var width  = canvas.width;
+                var height = canvas.height;
+
+                obj.context.lineWidth = 1;
+
+                // Don't allow annotating in the gutter
+                //
+                // CHANGED 20TH DECEMBER 2010 TO ALLOW ANNOTATING IN THE GUTTER
+                if (true) {
+                
+                    canvas.style.cursor = 'crosshair';
+                
+                    if (obj.Get('chart.mousedown')) {
+                           
+                       // Special case for HBars and Gantts with their extra wide left gutter
+                       if ( (obj.type != 'hbar' && obj.type != 'gantt') || x > obj.gutterLeft) {
+
+                           /**
+                           * This is here to stop annotating in the gutter
+                           */
+                            if (RGraph.Registry.Get('started.annotating') == false) {
+                                context.moveTo(x, y);
+                                RGraph.Registry.Set('started.annotating', true)
+                            }
+
+                            context.lineTo(x, y);
+
+                            RGraph.Registry.Set('annotate.actions', RGraph.Registry.Get('annotate.actions') + '|' + x + ',' + y);
+
+                            context.stroke();
+
+                            /**
+                            * Fire the annotate event
+                            */
+                            RGraph.FireCustomEvent(obj, 'onannotate');
+                        }
+                    }
+
+                } else {
+                    canvas.style.cursor = 'default';
+                }
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+
+            RGraph.ReplayAnnotations(obj);
+        }
+    }
+
+
+    /**
+    * Shows the mini palette used for annotations
+    * 
+    * @param object e The event object
+    */
+    RGraph.Showpalette = function (e)
+    {
+        var isSafari = navigator.userAgent.indexOf('Safari') ? true : false;
+
+        e = RGraph.FixEventObject(e);
+
+        var canvas  = e.target.parentNode.__canvas__;
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        var div     = document.createElement('DIV');
+        var coords  = RGraph.getMouseXY(e);
+        
+        div.__object__               = obj; // The graph object
+        div.className                = 'RGraph_palette';
+        div.style.position           = 'absolute';
+        div.style.backgroundColor    = 'white';
+        div.style.border             = '1px solid black';
+        div.style.left               = 0;
+        div.style.top                = 0;
+        div.style.padding            = '3px';
+        div.style.paddingBottom      = 0;
+        div.style.paddingRight       = 0;
+        div.style.opacity            = 0;
+        div.style.boxShadow          = 'rgba(96,96,96,0.5) 3px 3px 3px';
+        div.style.WebkitBoxShadow    = 'rgba(96,96,96,0.5) 3px 3px 3px';
+        div.style.MozBoxShadow       = 'rgba(96,96,96,0.5) 3px 3px 3px';
+        div.style.filter             = 'progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135)';
+        
+        var common_css       = 'padding: 1px; display: inline; display: inline-block; width: 15px; height: 15px; margin-right: 3px; cursor: pointer;' + (isSafari ? 'margin-bottom: 3px' : '');
+        var common_mouseover = ' onmouseover="this.style.border = \'1px black solid\'; this.style.padding = 0"';
+        var common_mouseout  = ' onmouseout="this.style.border = 0; this.style.padding = \'1px\'" ';
+
+        var str = '';
+
+        var colors = ['red', 'blue', 'green', 'black', 'yellow', 'magenta', 'pink', 'cyan', 'purple', '#ddf', 'gray', '#36905c'];
+
+        for (i=0; i<colors.length; ++i) {
+            str = str + '<span ' + common_mouseover + common_mouseout + ' style="background-color: ' + colors[i] + '; ' + common_css  + '" onclick="this.parentNode.__object__.Set(\'chart.annotate.color\', this.style.backgroundColor); this.parentNode.style.display = \'none\'; RGraph.FireCustomEvent(this.parentNode.__object__, \'onannotatecolor\')">&nbsp;</span>';
+            
+            // This makes the colours go across two levels
+            if (i == 5) {
+                str += '<br />';
+            }
+        }
+
+        div.innerHTML = str;
+        document.body.appendChild(div);
+        
+        /**
+        * Now the div has been added to the document, move it up and left and set the width and height
+        */
+        div.style.width  = (div.offsetWidth) + 'px';
+        div.style.height = (div.offsetHeight - (RGraph.isIE9up() ? 5 : 5)) + 'px';
+        div.style.left   = Math.max(0, e.pageX - div.offsetWidth - 2) + 'px';
+        div.style.top    = (e.pageY - div.offsetHeight - 2) + 'px';
+
+        /**
+        * Store the palette div in the registry
+        */
+        RGraph.Registry.Set('palette', div);
+        
+        setTimeout("RGraph.Registry.Get('palette').style.opacity = 0.2", 50);
+        setTimeout("RGraph.Registry.Get('palette').style.opacity = 0.4", 100);
+        setTimeout("RGraph.Registry.Get('palette').style.opacity = 0.6", 150);
+        setTimeout("RGraph.Registry.Get('palette').style.opacity = 0.8", 200);
+        setTimeout("RGraph.Registry.Get('palette').style.opacity = 1", 250);
+
+        RGraph.HideContext();
+
+        window.onclick = function ()
+        {
+            RGraph.HidePalette();
+        }
+
+        // Should this be here? Yes. This function is being used as an event handler.
+        e.stopPropagation();
+        return false;
+    }
+    
+    
+    /**
+    * Clears any annotation data from global storage
+    * 
+    * @param string id The ID of the canvas
+    */
+    RGraph.ClearAnnotations = function (id)
+    {
+        var canvas = document.getElementById(id);
+        var obj    = canvas.__object__;
+
+        if (window.localStorage && window.localStorage['__rgraph_annotations_' + id + '__'] && window.localStorage['__rgraph_annotations_' + id + '__'].length) {
+            window.localStorage['__rgraph_annotations_' + id + '__'] = [];
+            
+            RGraph.FireCustomEvent(obj, 'onannotateclear');
+        }
+    }
+
+
+    /**
+    * Replays stored annotations
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.ReplayAnnotations = function (obj)
+    {
+        // Check for support
+        if (!window.localStorage) {
+            return;
+        }
+
+        var context     = obj.context;
+        var annotations = window.localStorage['__rgraph_annotations_' + obj.id + '__'];
+        var i, len, move, coords;
+
+        context.beginPath();
+        context.lineWidth = 2;
+
+        if (annotations && annotations.length) {
+            annotations = annotations.split('|');
+        } else {
+            return;
+        }
+
+        for (i=0, len=annotations.length; i<len; ++i) {
+            if (!annotations[i].match(/^[0-9]+,[0-9]+$/)) {
+                context.stroke();
+                context.beginPath();
+                context.strokeStyle = annotations[i];
+                move = true;
+                continue;
+            }
+            
+            coords = annotations[i].split(',');
+
+            if (move) {
+                context.moveTo(coords[0], coords[1]);
+                move = false;
+            } else {
+                context.lineTo(coords[0], coords[1]);
+            }
+        }
+        
+        context.stroke();
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.context.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.context.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.context.js	(revision 225)
@@ -0,0 +1,579 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+
+
+    /**
+    * This gunction shows a context menu containing the parameters
+    * provided to it
+    * 
+    * @param object canvas    The canvas object
+    * @param array  menuitems The context menu menuitems
+    * @param object e         The event object
+    */
+    RGraph.Contextmenu = function (canvas, menuitems, e)
+    {
+        e = RGraph.FixEventObject(e);
+
+        /**
+        * Fire the custom RGraph event onbeforecontextmenu
+        */
+        RGraph.FireCustomEvent(canvas.__object__, 'onbeforecontextmenu');
+
+        /**
+        * Hide any existing menu
+        */
+        if (RGraph.Registry.Get('chart.contextmenu')) {
+            RGraph.HideContext();
+        }
+        
+        // Hide any zoomed canvas
+        RGraph.HideZoomedCanvas();
+
+        /**
+        * Hide the palette if necessary
+        */
+        RGraph.HidePalette();
+        
+        /**
+        * This is here to ensure annotating is OFF
+        */
+        canvas.__object__.Set('chart.mousedown', false);
+
+        var x      = e.pageX;
+        var y      = e.pageY;
+        var div    = document.createElement('div');
+        var bg     = document.createElement('div');
+
+        div.className             = 'RGraph_contextmenu';
+        div.__canvas__            = canvas; /* Store a reference to the canvas on the contextmenu object */
+        div.style.position        = 'absolute';
+        div.style.left            = 0;
+        div.style.top             = 0;
+        div.style.border          = '1px solid black';
+        div.style.backgroundColor = 'white';
+        div.style.boxShadow       = '3px 3px 3px rgba(96,96,96,0.5)';
+        div.style.MozBoxShadow    = '3px 3px 3px rgba(96,96,96,0.5)';
+        div.style.WebkitBoxShadow = '3px 3px 3px rgba(96,96,96,0.5)';
+        div.style.filter          = 'progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=135)';
+        div.style.opacity         = 0;
+
+        bg.className             = 'RGraph_contextmenu_background';
+        bg.style.position        = 'absolute';
+        bg.style.backgroundColor = '#ccc';
+        bg.style.borderRight     = '1px solid #aaa';
+        bg.style.top             = 0;
+        bg.style.left            = 0;
+        bg.style.width           = '18px';
+        bg.style.height          = '100%';
+        bg.style.opacity         = 0;
+
+
+        div = document.body.appendChild(div);
+        bg  = div.appendChild(bg);
+
+
+        /**
+        * Now add the context menu items
+        */
+        for (i=0; i<menuitems.length; ++i) {
+            
+            var menuitem = document.createElement('div');
+            
+            menuitem.__canvas__      = canvas;
+            menuitem.__contextmenu__ = div;
+            menuitem.className       = 'RGraph_contextmenu_item';
+            
+            if (menuitems[i]) {
+                menuitem.style.padding = '2px 5px 2px 23px';
+                menuitem.style.fontFamily = 'Arial';
+                menuitem.style.fontSize = '10pt';
+                menuitem.style.fontWeight = 'normal';
+                menuitem.innerHTML = menuitems[i][0];
+
+                if (RGraph.is_array(menuitems[i][1])) {
+                    menuitem.style.backgroundImage = 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAQUlEQVQImY3NoQ2AMABE0ZewABMyGQ6mqWODzlAclBSFO8HZl8uf0FFxCHtwYkt4Y6ChYE44cGH9/fyae2p2LAleW9oVTQuVf6gAAAAASUVORK5CYII=)';
+                    menuitem.style.backgroundRepeat = 'no-repeat';
+                    menuitem.style.backgroundPosition = '97% center';
+                }
+
+                // Add the mouseover event
+                if (menuitems[i][1]) {
+                    if (menuitem.addEventListener) {
+                        menuitem.addEventListener("mouseover", function (e) {RGraph.HideContextSubmenu(); e.target.style.backgroundColor = 'rgba(0,0,0,0.2)'; e.target.style.cursor = 'pointer';}, false);
+                        menuitem.addEventListener("mouseout", function (e) {e.target.style.backgroundColor = 'inherit'; e.target.style.cursor = 'default';}, false);
+                    } else  {
+                        menuitem.attachEvent("onmouseover", function () {RGraph.HideContextSubmenu();event.srcElement.style.backgroundColor = '#eee';event.srcElement.style.cursor = 'pointer';}
+                    , false);
+                        menuitem.attachEvent("onmouseout", function () {event.srcElement.style.backgroundColor = 'inherit'; event.srcElement.style.cursor = 'default';}, false);
+                    }
+                } else {
+                    if (menuitem.addEventListener) {
+                        menuitem.addEventListener("mouseover", function (e) {e.target.style.cursor = 'default';}, false);
+                        menuitem.addEventListener("mouseout", function (e) {e.target.style.cursor = 'default';}, false);
+                    } else  {
+                        menuitem.attachEvent("onmouseover", function () {event.srcElement.style.cursor = 'default'}, false);
+                        menuitem.attachEvent("onmouseout", function () {event.srcElement.style.cursor = 'default';}, false);
+                    }
+                }
+
+            } else {
+                menuitem.style.borderBottom = '1px solid #ddd';
+                menuitem.style.marginLeft = '25px';
+            }
+
+            div.appendChild(menuitem);
+
+            /**
+            * Install the event handler that calls the menuitem
+            */
+            if (menuitems[i] && menuitems[i][1] && typeof(menuitems[i][1]) == 'function') {
+                if (document.all  && 0) { // MSIE bit no longer necessary
+                    menuitem.attachEvent('onclick', menuitems[i][1]);
+                    menuitem.attachEvent('onclick', function () {RGraph.HideContext();});
+                } else {
+                    menuitem.addEventListener('click', menuitems[i][1], false);
+                }
+            
+            // Submenu
+            } else if (menuitems[i] && menuitems[i][1] && RGraph.is_array(menuitems[i][1])) {
+                (function ()
+                {
+                    var tmp = menuitems[i][1]; // This is here because of "references vs primitives" and how they're passed around in Javascript
+                    menuitem.addEventListener('mouseover', function (e) {RGraph.Contextmenu_submenu(canvas.__object__, tmp, e.target);}, false);
+                })();
+            }
+        }
+
+        /**
+        * Now all the menu items have been added, set the shadow width
+        * Shadow now handled by CSS3?
+        */
+        div.style.width = (div.offsetWidth + 10) + 'px';
+        div.style.height = (div.offsetHeight - 2) + 'px';
+
+        /**
+        * Set the background (the left bar) width if it's MSIE
+        */
+        //if (document.all) {
+        //    bg.style.height = (div.offsetHeight - 2) + 'px';
+        //}
+
+        // Show the menu to the left or the right (normal) of the cursor?
+        if (x + div.offsetWidth > document.body.offsetWidth) {
+            x -= div.offsetWidth;
+        }
+        
+        // Reposition the menu (now we have the real offsetWidth)
+        div.style.left = x + 'px';
+        div.style.top = y + 'px';
+
+        /**
+        * Do a little fade in effect
+        */
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu')) obj.style.opacity = 0.2", 50);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu')) obj.style.opacity = 0.4", 100);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu')) obj.style.opacity = 0.6", 150);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu')) obj.style.opacity = 0.8", 200);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu')) obj.style.opacity = 1", 250);
+
+        // The fade in effect on the left gray bar
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu.bg')) obj.style.opacity = 0.2", 50);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu.bg')) obj.style.opacity = 0.4", 100);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu.bg')) obj.style.opacity = 0.6", 150);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu.bg')) obj.style.opacity = 0.8", 200);
+        setTimeout("if (obj = RGraph.Registry.Get('chart.contextmenu.bg')) obj.style.opacity = 1", 250);
+
+        // Store the context menu in the registry
+        RGraph.Registry.Set('chart.contextmenu', div);
+        RGraph.Registry.Set('chart.contextmenu.bg', bg);
+        RGraph.Registry.Get('chart.contextmenu').oncontextmenu = function () {return false;};
+        RGraph.Registry.Get('chart.contextmenu.bg').oncontextmenu = function () {return false;};
+
+        /**
+        * Install the event handlers that hide the context menu
+        */
+        canvas.addEventListener('click', function () {RGraph.HideContext();}, false);
+
+        window.onclick = function (e)
+        {
+            RGraph.HideContext();
+            
+            // Removed on 3/7/10 - stops a bug in conjunction with annotating which presents itself on the Rscatter
+            //RGraph.Redraw();
+            
+            // Fire the onclick event again
+            if (e.target.onclick && e.button == 0) {
+                e.target.onclick(e);
+            }
+        }
+
+        window.onresize = function () {RGraph.HideContext();}
+        
+        /**
+        * Add the __shape__ object to the context menu
+        */
+        
+        /**
+        * Set the shape coords from the .getShape()  method
+        */
+        if (typeof(canvas.__object__.getShape) == 'function') {
+            RGraph.Registry.Get('chart.contextmenu').__shape__ = canvas.__object__.getShape(e);
+        }
+
+
+        e.stopPropagation();
+
+        /**
+        * Fire the (RGraph) oncontextmenu event
+        */
+        RGraph.FireCustomEvent(canvas.__object__, 'oncontextmenu');
+
+        return false;
+    }
+
+
+    /**
+    * Hides the context menu if it's currently visible
+    */
+    RGraph.HideContext = function ()
+    {
+        var cm   = RGraph.Registry.Get('chart.contextmenu');
+        var cmbg = RGraph.Registry.Get('chart.contextmenu.bg');
+        
+        //Hide any submenu currently being displayed
+        RGraph.HideContextSubmenu();
+
+        if (cm) {
+            cm.parentNode.removeChild(cm);
+            cmbg.parentNode.removeChild(cmbg);
+
+            cm.style.visibility = 'hidden';
+            cm.style.display = 'none';
+            RGraph.Registry.Set('chart.contextmenu', null);
+            
+            cmbg.style.visibility = 'hidden';
+            cmbg.style.display = 'none';
+            RGraph.Registry.Set('chart.contextmenu.bg', null);
+        }
+    }
+
+
+    /**
+    * Hides the context menus SUBMENU if it's currently visible
+    */
+    RGraph.HideContextSubmenu = function ()
+    {
+        var sub  = RGraph.Registry.Get('chart.contextmenu.submenu');
+
+        if (sub) {
+            sub.style.visibility = 'none';
+            sub.style.display    = 'none';
+            RGraph.Registry.Set('chart.contextmenu.submenu', null);
+        }
+    }
+
+
+    /**
+    * Shows the context menu after making a few checks - not opera (doesn't support oncontextmenu,
+    * not safari (tempermentality), not chrome (hmmm)
+    */
+    RGraph.ShowContext = function (obj)
+    {
+        RGraph.HidePalette();
+
+        if (obj.Get('chart.contextmenu') && obj.Get('chart.contextmenu').length) {
+
+            var isOpera      = navigator.userAgent.indexOf('Opera') >= 0;
+            var isSafari     = navigator.userAgent.indexOf('Safari') >= 0;
+            var isChrome     = navigator.userAgent.indexOf('Chrome') >= 0;
+            var isMacFirefox = navigator.userAgent.indexOf('Firefox') > 0 && navigator.userAgent.indexOf('Mac') > 0;
+            var isIE9        = navigator.userAgent.indexOf('MSIE 9') >= 0;
+
+            if (((!isOpera && !isSafari) || isChrome) && !isMacFirefox) {
+
+                obj.canvas.oncontextmenu = function (e)
+                {
+                     e = RGraph.FixEventObject(e);
+
+                    if (e.ctrlKey) return true;
+
+                    RGraph.Contextmenu(obj.canvas, obj.Get('chart.contextmenu'), e);
+
+                    return false;
+                }
+
+            // Accomodate Opera and Safari - use double click event
+            } else {
+
+                obj.canvas.addEventListener('dblclick', function (e)
+                {
+                    if (e.ctrlKey) return true;
+
+                    if (!RGraph.Registry.Get('chart.contextmenu')) {
+                        RGraph.Contextmenu(obj.canvas, obj.Get('chart.contextmenu'), e);
+                    }
+                }, false);
+            }
+        }
+    }
+
+
+    /**
+    * This draws a submenu should it be necessary
+    * 
+    * @param object obj  The graph object
+    * @param object menu The context menu
+    */
+    RGraph.Contextmenu_submenu = function (obj, menuitems, parentMenuItem)
+    {
+        RGraph.HideContextSubmenu();
+
+        var canvas  = obj.canvas;
+        var context = obj.context;
+        var menu    = parentMenuItem.parentNode;
+
+        var subMenu = document.createElement('DIV');
+        subMenu.style.position = 'absolute';
+        subMenu.style.width = '100px';
+        subMenu.style.top = menu.offsetTop + parentMenuItem.offsetTop + 'px';
+        subMenu.style.left            = (menu.offsetLeft + menu.offsetWidth - (RGraph.isIE8() ? 9 : 0)) + 'px';
+        subMenu.style.backgroundColor = 'white';
+        subMenu.style.border          = '1px solid black';
+        subMenu.className             = 'RGraph_contextmenu';
+        subMenu.__contextmenu__       = menu;
+        subMenu.style.boxShadow       = '3px 3px 3px rgba(96,96,96,0.5)';
+        subMenu.style.MozBoxShadow    = '3px 3px 3px rgba(96,96,96,0.5)';
+        subMenu.style.WebkitBoxShadow = '3px 3px 3px rgba(96,96,96,0.5)';
+        subMenu.style.filter          = 'progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=135)';
+        document.body.appendChild(subMenu);
+        
+        for (var i=0; i<menuitems.length; ++i) {
+                    
+            var menuitem = document.createElement('DIV');
+            
+            menuitem.__canvas__      = canvas;
+            menuitem.__contextmenu__ = menu;
+            menuitem.className       = 'RGraph_contextmenu_item';
+            
+            if (menuitems[i]) {
+                menuitem.style.padding = '2px 5px 2px 23px';
+                menuitem.style.fontFamily = 'Arial';
+                menuitem.style.fontSize = '10pt';
+                menuitem.style.fontWeight = 'normal';
+                menuitem.innerHTML = menuitems[i][0];
+        
+                if (menuitems[i][1]) {
+                    if (menuitem.addEventListener) {
+                        menuitem.addEventListener("mouseover", function (e) {e.target.style.backgroundColor = 'rgba(0,0,0,0.2)'; e.target.style.cursor = 'pointer';}, false);
+                        menuitem.addEventListener("mouseout", function (e) {e.target.style.backgroundColor = 'inherit'; e.target.style.cursor = 'default';}, false);
+                    } else  {
+                        menuitem.attachEvent("onmouseover", function () {event.srcElement.style.backgroundColor = 'rgba(0,0,0,0.2)'; event.srcElement.style.cursor = 'pointer'}, false);
+                        menuitem.attachEvent("onmouseout", function () {event.srcElement.style.backgroundColor = 'inherit'; event.srcElement.style.cursor = 'default';}, false);
+                    }
+                } else {
+                    if (menuitem.addEventListener) {
+                        menuitem.addEventListener("mouseover", function (e) {e.target.style.cursor = 'default';}, false);
+                        menuitem.addEventListener("mouseout", function (e) {e.target.style.cursor = 'default';}, false);
+                    } else  {
+                        menuitem.attachEvent("onmouseover", function () {event.srcElement.style.cursor = 'default'}, false);
+                        menuitem.attachEvent("onmouseout", function () {event.srcElement.style.cursor = 'default';}, false);
+                    }
+                }
+            } else {
+                menuitem.style.borderBottom = '1px solid #ddd';
+                menuitem.style.marginLeft = '25px';
+            }
+            
+            subMenu.appendChild(menuitem);
+        
+            if (menuitems[i] && menuitems[i][1]) {
+                if (document.all) {
+                    menuitem.attachEvent('onclick', menuitems[i][1]);
+                } else {
+                    menuitem.addEventListener('click', menuitems[i][1], false);
+                }
+            }
+        }
+
+
+        var bg                   = document.createElement('DIV');
+        bg.className             = 'RGraph_contextmenu_background';
+        bg.style.position        = 'absolute';
+        bg.style.backgroundColor = '#ccc';
+        bg.style.borderRight     = '1px solid #aaa';
+        bg.style.top             = 0;
+        bg.style.left            = 0;
+        bg.style.width           = '18px';
+        bg.style.height          = '100%';
+
+        bg  = subMenu.appendChild(bg);
+
+        RGraph.Registry.Set('chart.contextmenu.submenu', subMenu);
+    }
+
+
+    /**
+    * A function designed to be used in conjunction with thed context menu
+    * to allow people to get image versions of canvases.
+    * 
+    * @param      canvas Optionally you can pass in the canvas, which will be used
+    */
+    RGraph.showPNG = function ()
+    {
+        if (RGraph.isIE8()) {
+            alert('[RGRAPH PNG] Sorry, showing a PNG is not supported on MSIE8.');
+            return;
+        }
+
+        if (arguments[0] && arguments[0].id) {
+            var canvas = arguments[0];
+            var event  = arguments[1];
+        
+        } else if (RGraph.Registry.Get('chart.contextmenu')) {
+            var canvas = RGraph.Registry.Get('chart.contextmenu').__canvas__;
+        
+        } else {
+            alert('[RGRAPH SHOWPNG] Could not find canvas!');
+        }
+
+        var obj = canvas.__object__;
+
+        /**
+        * Create the gray background DIV to cover the page
+        */
+        var bg = document.createElement('DIV');
+            bg.id = '__rgraph_image_bg__';
+            bg.style.position = 'fixed';
+            bg.style.top = '-10px';
+            bg.style.left = '-10px';
+            bg.style.width = '5000px';
+            bg.style.height = '5000px';
+            bg.style.backgroundColor = 'rgb(204,204,204)';
+            bg.style.opacity = 0;
+        document.body.appendChild(bg);
+        
+        
+        /**
+        * Create the div that the graph sits in
+        */
+        var div = document.createElement('DIV');
+            div.style.backgroundColor = 'white';
+            div.style.opacity = 0;
+            div.style.border = '1px solid black';
+            div.style.position = 'fixed';
+            div.style.top = '20%';
+            div.style.width = canvas.width + 'px';
+            div.style.height = canvas.height + 35 + 'px';
+            div.style.left = (document.body.clientWidth / 2) - (canvas.width / 2) + 'px';
+            div.style.padding = '5px';
+
+            div.style.borderRadius = '10px';
+            div.style.MozBorderRadius = '10px';
+            div.style.WebkitBorderRadius = '10px';
+
+            div.style.boxShadow    = '0 0 15px rgba(96,96,96,0.5)';
+            div.style.MozBoxShadow = '0 0 15px rgba(96,96,96,0.5)';
+            div.style.WebkitBoxShadow = 'rgba(96,96,96,0.5) 0 0 15px';
+
+            div.__canvas__ = canvas;
+            div.__object__ = obj;
+            div.id = '__rgraph_image_div__';
+        document.body.appendChild(div);
+
+        
+        /**
+        * Add the HTML text inputs
+        */
+        div.innerHTML += '<div style="position: absolute; margin-left: 10px; top: ' + canvas.height + 'px; width: ' + (canvas.width - 50) + 'px; height: 25px"><span style="display: inline; display: inline-block; width: 65px; text-align: right">URL:</span><textarea style="float: right; overflow: hidden; height: 15px; width: ' + (canvas.width - obj.gutterLeft - obj.gutterRight - 80) + 'px" onclick="this.select()" readonly="readonly" id="__rgraph_dataurl__">' + canvas.toDataURL() + '</textarea></div>';
+        div.innerHTML += '<div style="position: absolute; top: ' + (canvas.height + 25) + 'px; left: ' + (obj.gutterLeft - 65 + (canvas.width / 2)) + 'px; width: ' + (canvas.width - obj.gutterRight) + 'px; font-size: 65%">A link using the URL: <a href="' + canvas.toDataURL() + '">View</a></div>'
+
+        
+        
+        /**
+        * Create the image rendition of the graph
+        */
+        var img = document.createElement('IMG');
+        RGraph.Registry.Set('chart.png', img);
+        img.__canvas__ = canvas;
+        img.__object__ = obj;
+        img.id = '__rgraph_image_img__';
+        img.className = 'RGraph_png';
+
+        img.src = canvas.toDataURL();
+
+        div.appendChild(img);
+        
+        setTimeout(function () {document.getElementById("__rgraph_dataurl__").select();}, 50);
+        
+        window.addEventListener('resize', function (e){var img = RGraph.Registry.Get('chart.png');img.style.left = (document.body.clientWidth / 2) - (img.width / 2) + 'px';}, false);
+        
+        bg.onclick = function (e)
+        {
+            var div = document.getElementById("__rgraph_image_div__");
+            var bg = document.getElementById("__rgraph_image_bg__");
+
+            if (div) {
+                div.style.opacity = 0;
+
+                div.parentNode.removeChild(div);
+
+                div.id = '';
+                div.style.display = 'none';
+                div = null;
+            }
+
+            if (bg) {
+                bg.style.opacity = 0;
+
+                bg.id = '';
+                bg.style.display = 'none';
+                bg = null;
+            }
+        }
+        
+        window.addEventListener('resize', function (e) {bg.onclick(e);}, false)
+        
+        /**
+        * This sets the image as a global variable, circumventing repeated calls to document.getElementById()
+        */
+        __rgraph_image_bg__  = bg;
+        __rgraph_image_div__ = div;
+
+
+        setTimeout('__rgraph_image_div__.style.opacity = 0.2', 50);
+        setTimeout('__rgraph_image_div__.style.opacity = 0.4', 100);
+        setTimeout('__rgraph_image_div__.style.opacity = 0.6', 150);
+        setTimeout('__rgraph_image_div__.style.opacity = 0.8', 200);
+        setTimeout('__rgraph_image_div__.style.opacity = 1', 250);
+
+        setTimeout('__rgraph_image_bg__.style.opacity = 0.1', 50);
+        setTimeout('__rgraph_image_bg__.style.opacity = 0.2', 100);
+        setTimeout('__rgraph_image_bg__.style.opacity = 0.3', 150);
+        setTimeout('__rgraph_image_bg__.style.opacity = 0.4', 200);
+        setTimeout('__rgraph_image_bg__.style.opacity = 0.5', 250);
+
+
+        
+        img.onclick = function (e)
+        {
+            if (e.stopPropagation) e.stopPropagation();
+            else event.cancelBubble = true;
+        }
+        
+        if (event && event.stopPropagation) {
+            event.stopPropagation();
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.core.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.core.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.core.js	(revision 225)
@@ -0,0 +1,2776 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    /**
+    * Initialise the various objects
+    */
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+
+
+    RGraph.Registry       = {};
+    RGraph.Registry.store = [];
+    RGraph.Registry.store['chart.event.handlers'] = [];
+    RGraph.background     = {};
+    RGraph.objects        = [];
+    RGraph.Resizing       = {};
+    RGraph.events         = [];
+    
+
+
+    /**
+    * Returns five values which are used as a nice scale
+    * 
+    * @param  max int    The maximum value of the graph
+    * @param  obj object The graph object
+    * @return     array   An appropriate scale
+    */
+    RGraph.getScale = function (max, obj)
+    {
+        /**
+        * Special case for 0
+        */
+        if (max == 0) {
+            return ['0.2', '0.4', '0.6', '0.8', '1.0'];
+        }
+
+        var original_max = max;
+
+        /**
+        * Manually do decimals
+        */
+        if (max <= 1) {
+            if (max > 0.5) {
+                return [0.2,0.4,0.6,0.8, Number(1).toFixed(1)];
+
+            } else if (max >= 0.1) {
+                return obj.Get('chart.scale.round') ? [0.2,0.4,0.6,0.8,1] : [0.1,0.2,0.3,0.4,0.5];
+
+            } else {
+
+                var tmp = max;
+                var exp = 0;
+
+                while (tmp < 1.01) {
+                    exp += 1;
+                    tmp *= 10;
+                }
+
+                var ret = ['2e-' + exp, '4e-' + exp, '6e-' + exp, '8e-' + exp, '10e-' + exp];
+
+
+                if (max <= ('5e-' + exp)) {
+                    ret = ['1e-' + exp, '2e-' + exp, '3e-' + exp, '4e-' + exp, '5e-' + exp];
+                }
+
+                return ret;
+            }
+        }
+
+        // Take off any decimals
+        if (String(max).indexOf('.') > 0) {
+            max = String(max).replace(/\.\d+$/, '');
+        }
+
+        var interval = Math.pow(10, Number(String(Number(max)).length - 1));
+        var topValue = interval;
+
+        while (topValue < max) {
+            topValue += (interval / 2);
+        }
+
+        // Handles cases where the max is (for example) 50.5
+        if (Number(original_max) > Number(topValue)) {
+            topValue += (interval / 2);
+        }
+
+        // Custom if the max is greater than 5 and less than 10
+        if (max < 10) {
+            topValue = (Number(original_max) <= 5 ? 5 : 10);
+        }
+        
+        /**
+        * Added 02/11/2010 to create "nicer" scales
+        */
+        if (obj && typeof(obj.Get('chart.scale.round')) == 'boolean' && obj.Get('chart.scale.round')) {
+            topValue = 10 * interval;
+        }
+
+        return [topValue * 0.2, topValue * 0.4, topValue * 0.6, topValue * 0.8, topValue];
+    }
+
+
+    /**
+    * Returns the maximum numeric value which is in an array
+    * 
+    * @param  array arr The array (can also be a number, in which case it's returned as-is)
+    * @param  int       Whether to ignore signs (ie negative/positive)
+    * @return int       The maximum value in the array
+    */
+    RGraph.array_max = function (arr)
+    {
+        var max = null;
+        
+        if (typeof(arr) == 'number') {
+            return arr;
+        }
+        
+        for (var i=0; i<arr.length; ++i) {
+            if (typeof(arr[i]) == 'number') {
+
+                var val = arguments[1] ? Math.abs(arr[i]) : arr[i];
+                
+                if (typeof(max) == 'number') {
+                    max = Math.max(max, val);
+                } else {
+                    max = val;
+                }
+            }
+        }
+        
+        return max;
+    }
+
+
+    /**
+    * Returns the maximum value which is in an array
+    * 
+    * @param  array arr The array
+    * @param  int   len The length to pad the array to
+    * @param  mixed     The value to use to pad the array (optional)
+    */
+    RGraph.array_pad = function (arr, len)
+    {
+        if (arr.length < len) {
+            var val = arguments[2] ? arguments[2] : null;
+            
+            for (var i=arr.length; i<len; ++i) {
+                arr[i] = val;
+            }
+        }
+        
+        return arr;
+    }
+
+
+    /**
+    * An array sum function
+    * 
+    * @param  array arr The  array to calculate the total of
+    * @return int       The summed total of the arrays elements
+    */
+    RGraph.array_sum = function (arr)
+    {
+        // Allow integers
+        if (typeof(arr) == 'number') {
+            return arr;
+        }
+
+        var i, sum;
+        var len = arr.length;
+
+        for(i=0,sum=0;i<len;sum+=arr[i++]);
+        return sum;
+    }
+
+
+
+    /**
+    * A simple is_array() function
+    * 
+    * @param  mixed obj The object you want to check
+    * @return bool      Whether the object is an array or not
+    */
+    RGraph.is_array = function (obj)
+    {
+        return obj != null && obj.constructor.toString().indexOf('Array') != -1;
+    }
+
+
+    /**
+    * Converts degrees to radians
+    * 
+    * @param  int degrees The number of degrees
+    * @return float       The number of radians
+    */
+    RGraph.degrees2Radians = function (degrees)
+    {
+        return degrees * (Math.PI / 180);
+    }
+
+
+    /**
+    * This function draws an angled line. The angle is cosidered to be clockwise
+    * 
+    * @param obj ctxt   The context object
+    * @param int x      The X position
+    * @param int y      The Y position
+    * @param int angle  The angle in RADIANS
+    * @param int length The length of the line
+    */
+    RGraph.lineByAngle = function (context, x, y, angle, length)
+    {
+        context.arc(x, y, length, angle, angle, false);
+        context.lineTo(x, y);
+        context.arc(x, y, length, angle, angle, false);
+    }
+
+
+    /**
+    * This is a useful function which is basically a shortcut for drawing left, right, top and bottom alligned text.
+    * 
+    * @param object context The context
+    * @param string font    The font
+    * @param int    size    The size of the text
+    * @param int    x       The X coordinate
+    * @param int    y       The Y coordinate
+    * @param string text    The text to draw
+    * @parm  string         The vertical alignment. Can be null. "center" gives center aligned  text, "top" gives top aligned text.
+    *                       Anything else produces bottom aligned text. Default is bottom.
+    * @param  string        The horizontal alignment. Can be null. "center" gives center aligned  text, "right" gives right aligned text.
+    *                       Anything else produces left aligned text. Default is left.
+    * @param  bool          Whether to show a bounding box around the text. Defaults not to
+    * @param int            The angle that the text should be rotate at (IN DEGREES)
+    * @param string         Background color for the text
+    * @param bool           Whether the text is bold or not
+    * @param bool           Whether the bounding box has a placement indicator
+    */
+    RGraph.Text = function (context, font, size, x, y, text)
+    {
+        /**
+        * This calls the text function recursively to accommodate multi-line text
+        */
+        if (typeof(text) == 'string' && text.match(/\r\n/)) {
+            
+            var arr = text.split('\r\n');
+
+            text = arr[0];
+            arr = RGraph.array_shift(arr);
+
+            var nextline = arr.join('\r\n')
+
+            RGraph.Text(context, font, size, arguments[9] == -90 ? (x + (size * 1.5)) : x, y + (size * 1.5), nextline, arguments[6] ? arguments[6] : null, 'center', arguments[8], arguments[9], arguments[10], arguments[11], arguments[12]);
+        }
+
+
+        // Accommodate MSIE
+        if (RGraph.isIE8()) {
+            y += 2;
+        }
+
+
+        context.font = (arguments[11] ? 'Bold ': '') + size + 'pt ' + font;
+
+        var i;
+        var origX = x;
+        var origY = y;
+        var originalFillStyle = context.fillStyle;
+        var originalLineWidth = context.lineWidth;
+
+        // Need these now the angle can be specified, ie defaults for the former two args
+        if (typeof(arguments[6]) == null) arguments[6]  = 'bottom'; // Vertical alignment. Default to bottom/baseline
+        if (typeof(arguments[7]) == null) arguments[7]  = 'left';   // Horizontal alignment. Default to left
+        if (typeof(arguments[8]) == null) arguments[8]  = null;     // Show a bounding box. Useful for positioning during development. Defaults to false
+        if (typeof(arguments[9]) == null) arguments[9]  = 0;        // Angle (IN DEGREES) that the text should be drawn at. 0 is middle right, and it goes clockwise
+        if (typeof(arguments[12]) == null) arguments[12] = true;    // Whether the bounding box has the placement indicator
+
+        // The alignment is recorded here for purposes of Opera compatibility
+        if (navigator.userAgent.indexOf('Opera') != -1) {
+            context.canvas.__rgraph_valign__ = arguments[6];
+            context.canvas.__rgraph_halign__ = arguments[7];
+        }
+
+        // First, translate to x/y coords
+        context.save();
+
+            context.canvas.__rgraph_originalx__ = x;
+            context.canvas.__rgraph_originaly__ = y;
+
+            context.translate(x, y);
+            x = 0;
+            y = 0;
+            
+            // Rotate the canvas if need be
+            if (arguments[9]) {
+                context.rotate(arguments[9] / 57.3);
+            }
+
+            // Vertical alignment - defaults to bottom
+            if (arguments[6]) {
+                var vAlign = arguments[6];
+
+                if (vAlign == 'center') {
+                    context.translate(0, size / 2);
+                } else if (vAlign == 'top') {
+                    context.translate(0, size);
+                }
+            }
+
+
+            // Hoeizontal alignment - defaults to left
+            if (arguments[7]) {
+                var hAlign = arguments[7];
+                var width  = context.measureText(text).width;
+    
+                if (hAlign) {
+                    if (hAlign == 'center') {
+                        context.translate(-1 * (width / 2), 0)
+                    } else if (hAlign == 'right') {
+                        context.translate(-1 * width, 0)
+                    }
+                }
+            }
+            
+            
+            context.fillStyle = originalFillStyle;
+
+            /**
+            * Draw a bounding box if requested
+            */
+            context.save();
+                 context.fillText(text,0,0);
+                 context.lineWidth = 0.5;
+                
+                if (arguments[8]) {
+
+                    var width = context.measureText(text).width;
+                    var ieOffset = RGraph.isIE8() ? 2 : 0;
+
+                    context.translate(x, y);
+                    context.strokeRect(0 - 3, 0 - 3 - size - ieOffset, width + 6, 0 + size + 6);
+    
+                    /**
+                    * If requested, draw a background for the text
+                    */
+                    if (arguments[10]) {
+        
+                        var offset = 3;
+                        var ieOffset = RGraph.isIE8() ? 2 : 0;
+                        var width = context.measureText(text).width
+
+                        //context.strokeStyle = 'gray';
+                        context.fillStyle = arguments[10];
+                        context.fillRect(x - offset, y - size - offset - ieOffset, width + (2 * offset), size + (2 * offset));
+                        //context.strokeRect(x - offset, y - size - offset - ieOffset, width + (2 * offset), size + (2 * offset));
+                    }
+                    
+                    /**
+                    * Do the actual drawing of the text
+                    */
+                    context.fillStyle = originalFillStyle;
+                    context.fillText(text,0,0);
+
+                    if (arguments[12]) {
+                        context.fillRect(
+                            arguments[7] == 'left' ? 0 : (arguments[7] == 'center' ? width / 2 : width ) - 2,
+                            arguments[6] == 'bottom' ? 0 : (arguments[6] == 'center' ? (0 - size) / 2 : 0 - size) - 2,
+                            4,
+                            4
+                        );
+                    }
+                }
+            context.restore();
+            
+            // Reset the lineWidth
+            context.lineWidth = originalLineWidth;
+
+        context.restore();
+    }
+
+
+    /**
+    * Clears the canvas by setting the width. You can specify a colour if you wish.
+    * 
+    * @param object canvas The canvas to clear
+    */
+    RGraph.Clear = function (canvas)
+    {
+        var context = canvas.getContext('2d');
+        var color   = arguments[1];
+
+        if (RGraph.isIE8() && !color) {
+            color = 'white';
+        }
+
+        /**
+        * Can now clear the canvas back to fully transparent
+        */
+        if (!color || (color && color == 'transparent')) {
+
+            context.fillStyle = 'rgba(0,0,0,0)';
+            context.globalCompositeOperation = 'source-in';
+            context = canvas.getContext('2d');
+            context.beginPath();
+            context.fillRect(-1000,-1000,canvas.width + 2000,canvas.height + 2000);
+            context.fill();
+            
+            // Reset the globalCompositeOperation
+            context.globalCompositeOperation = 'source-over';
+
+        } else {
+
+            context.fillStyle = color;
+            context = canvas.getContext('2d');
+            context.beginPath();
+
+            if (RGraph.isIE8()) {
+                context.fillRect(0,0,canvas.width,canvas.height);
+            } else {
+                context.fillRect(-1000,-1000,canvas.width + 2000,canvas.height + 2000);
+            }
+
+            context.fill();
+        }
+        
+        // Don't do this as it also clears any translation that may have occurred
+        //canvas.width = canvas.width;
+        
+        if (RGraph.ClearAnnotations) {
+            RGraph.ClearAnnotations(canvas.id);
+        }
+
+        RGraph.FireCustomEvent(canvas.__object__, 'onclear');
+    }
+
+
+    /**
+    * Draws the title of the graph
+    * 
+    * @param object  canvas The canvas object
+    * @param string  text   The title to write
+    * @param integer gutter The size of the gutter
+    * @param integer        The center X point (optional - if not given it will be generated from the canvas width)
+    * @param integer        Size of the text. If not given it will be 14
+    */
+    RGraph.DrawTitle = function (canvas, text, gutterTop)
+    {
+        var obj          = canvas.__object__;
+        var context      = canvas.getContext('2d');
+        var gutterLeft   = obj.Get('chart.gutter.left');
+        var gutterRight  = obj.Get('chart.gutter.right');
+        var gutterBottom = obj.Get('chart.gutter.bottom');
+        var size         = arguments[4] ? arguments[4] : 12;
+        var centerx      = (arguments[3] ? arguments[3] : ((RGraph.GetWidth(obj) - gutterLeft - gutterRight) / 2) + gutterLeft);
+        var keypos       = obj.Get('chart.key.position');
+        var vpos         = obj.Get('chart.title.vpos');
+        var hpos         = obj.Get('chart.title.hpos');
+        var bgcolor      = obj.Get('chart.title.background');
+
+        // Account for 3D effect by faking the key position
+        if (obj.type == 'bar' && obj.Get('chart.variant') == '3d') {
+            keypos = 'gutter';
+        }
+
+        context.beginPath();
+        context.fillStyle = obj.Get('chart.text.color') ? obj.Get('chart.text.color') : 'black';
+
+        /**
+        * Vertically center the text if the key is not present
+        */
+        if (keypos && keypos != 'gutter') {
+            var vCenter = 'center';
+
+        } else if (!keypos) {
+            var vCenter = 'center';
+
+        } else {
+            var vCenter = 'bottom';
+        }
+
+        // if chart.title.vpos does not equal 0.5, use that
+        if (typeof(obj.Get('chart.title.vpos')) == 'number') {
+            vpos = obj.Get('chart.title.vpos') * gutterTop;
+
+            if (obj.Get('chart.xaxispos') == 'top') {
+                vpos = obj.Get('chart.title.vpos') * gutterBottom + gutterTop + (obj.canvas.height - gutterTop - gutterBottom);
+            }
+        } else {
+            vpos = gutterTop - size - 5;
+
+            if (obj.Get('chart.xaxispos') == 'top') {
+                vpos = obj.canvas.height  - gutterBottom + size + 5;
+            }
+        }
+
+        // if chart.title.hpos is a number, use that. It's multiplied with the (entire) canvas width
+        if (typeof(hpos) == 'number') {
+            centerx = hpos * canvas.width;
+        }
+        
+        // Set the colour
+        if (typeof(obj.Get('chart.title.color') != null)) {
+            var oldColor = context.fillStyle
+            var newColor = obj.Get('chart.title.color')
+            context.fillStyle = newColor ? newColor : 'black';
+        }
+        
+        /**
+        * Default font is Verdana
+        */
+        var font = obj.Get('chart.text.font');
+
+        /**
+        * Draw the title itself
+        */
+        RGraph.Text(context, font, size, centerx, vpos, text, vCenter, 'center', bgcolor != null, null, bgcolor, true);
+        
+        // Reset the fill colour
+        context.fillStyle = oldColor;
+    }
+
+
+    /**
+    * This function returns the mouse position in relation to the canvas
+    * 
+    * @param object e The event object.
+    */
+    RGraph.getMouseXY = function (e)
+    {
+        var obj = (RGraph.isIE8() ? event.srcElement : e.target);
+        var x;
+        var y;
+        
+        if (RGraph.isIE8()) e = event;
+
+        // Browser with offsetX and offsetY
+        if (typeof(e.offsetX) == 'number' && typeof(e.offsetY) == 'number') {
+            x = e.offsetX;
+            y = e.offsetY;
+
+        // FF and other
+        } else {
+            x = 0;
+            y = 0;
+
+            while (obj != document.body && obj) {
+                x += obj.offsetLeft;
+                y += obj.offsetTop;
+
+                obj = obj.offsetParent;
+            }
+
+            x = e.pageX - x;
+            y = e.pageY - y;
+        }
+
+        return [x, y];
+    }
+    
+    
+    /**
+    * This function returns a two element array of the canvas x/y position in
+    * relation to the page
+    * 
+    * @param object canvas
+    */
+    RGraph.getCanvasXY = function (canvas)
+    {
+        var x   = 0;
+        var y   = 0;
+        var obj = canvas;
+
+        do {
+
+            x += obj.offsetLeft;
+            y += obj.offsetTop;
+
+            obj = obj.offsetParent;
+
+        } while (obj && obj.tagName.toLowerCase() != 'body');
+
+        return [x, y];
+    }
+
+
+    /**
+    * Registers a graph object (used when the canvas is redrawn)
+    * 
+    * @param object obj The object to be registered
+    */
+    RGraph.Register = function (obj)
+    {
+        var key = obj.id + '_' + obj.type;
+
+        RGraph.objects[key] = obj;
+    }
+
+
+    /**
+    * Causes all registered objects to be redrawn
+    * 
+    * @param string   An optional string indicating which canvas is not to be redrawn
+    * @param string An optional color to use to clear the canvas
+    */
+    RGraph.Redraw = function ()
+    {
+        for (i in RGraph.objects) {
+            // TODO FIXME Maybe include more intense checking for whether the object is an RGraph object, eg obj.isRGraph == true ...?
+            if (
+                   typeof(i) == 'string'
+                && typeof(RGraph.objects[i]) == 'object'
+                && typeof(RGraph.objects[i].type) == 'string'
+                && RGraph.objects[i].isRGraph)  {
+
+                if (!arguments[0] || arguments[0] != RGraph.objects[i].id) {
+                    RGraph.Clear(RGraph.objects[i].canvas, arguments[1] ? arguments[1] : null);
+                    RGraph.objects[i].Draw();
+                }
+            }
+        }
+    }
+
+
+    /**
+    * Loosly mimicks the PHP function print_r();
+    */
+    RGraph.pr = function (obj)
+    {
+        var str = '';
+        var indent = (arguments[2] ? arguments[2] : '');
+
+        switch (typeof(obj)) {
+            case 'number':
+                if (indent == '') {
+                    str+= 'Number: '
+                }
+                str += String(obj);
+                break;
+            
+            case 'string':
+                if (indent == '') {
+                    str+= 'String (' + obj.length + '):'
+                }
+                str += '"' + String(obj) + '"';
+                break;
+
+            case 'object':
+                // In case of null
+                if (obj == null) {
+                    str += 'null';
+                    break;
+                }
+
+                str += 'Object\n' + indent + '(\n';
+                
+                for (var i=0; i<obj.length; ++i) {
+                    str += indent + ' ' + i + ' => ' + RGraph.pr(obj[i], true, indent + '    ') + '\n';
+                }
+                
+                var str = str + indent + ')';
+                break;
+            
+            case 'function':
+                str += obj;
+                break;
+            
+            case 'boolean':
+                str += 'Boolean: ' + (obj ? 'true' : 'false');
+                break;
+        }
+
+        /**
+        * Finished, now either return if we're in a recursed call, or alert()
+        * if we're not.
+        */
+        if (arguments[1]) {
+            return str;
+        } else {
+            alert(str);
+        }
+    }
+
+
+    /**
+    * The RGraph registry Set() function
+    * 
+    * @param  string name  The name of the key
+    * @param  mixed  value The value to set
+    * @return mixed        Returns the same value as you pass it
+    */
+    RGraph.Registry.Set = function (name, value)
+    {
+        // Store the setting
+        RGraph.Registry.store[name] = value;
+        
+        // Don't really need to do this, but ho-hum
+        return value;
+    }
+
+
+    /**
+    * The RGraph registry Get() function
+    * 
+    * @param  string name The name of the particular setting to fetch
+    * @return mixed       The value if exists, null otherwise
+    */
+    RGraph.Registry.Get = function (name)
+    {
+        //return RGraph.Registry.store[name] == null ? null : RGraph.Registry.store[name];
+        return RGraph.Registry.store[name];
+    }
+
+
+    /**
+    * This function draws the background for the bar chart, line chart and scatter chart.
+    * 
+    * @param  object obj The graph object
+    */
+    RGraph.background.Draw = function (obj)
+    {
+        var canvas       = obj.canvas;
+        var context      = obj.context;
+        var height       = 0;
+        var gutterLeft   = obj.Get('chart.gutter.left');
+        var gutterRight  = obj.Get('chart.gutter.right');
+        var gutterTop    = obj.Get('chart.gutter.top');
+        var gutterBottom = obj.Get('chart.gutter.bottom');
+        var variant      = obj.Get('chart.variant');
+        
+        context.fillStyle = obj.Get('chart.text.color');
+        
+        // If it's a bar and 3D variant, translate
+        if (variant == '3d') {
+            context.save();
+            context.translate(10, -5);
+        }
+
+        // X axis title
+        if (typeof(obj.Get('chart.title.xaxis')) == 'string' && obj.Get('chart.title.xaxis').length) {
+        
+            var size = obj.Get('chart.text.size');
+            var font = obj.Get('chart.text.font');
+        
+            context.beginPath();
+            RGraph.Text(context, font, size + 2, RGraph.GetWidth(obj) / 2, RGraph.GetHeight(obj) - (gutterBottom * obj.Get('chart.title.xaxis.pos')), obj.Get('chart.title.xaxis'), 'center', 'center', false, false, false, true);
+            context.fill();
+        }
+
+        // Y axis title
+        if (typeof(obj.Get('chart.title.yaxis')) == 'string' && obj.Get('chart.title.yaxis').length) {
+        
+            var size            = obj.Get('chart.text.size');
+            var font            = obj.Get('chart.text.font');
+            var angle           = 270;
+            var yaxis_title_pos = obj.Get('chart.title.yaxis.pos');
+
+            if (obj.Get('chart.title.yaxis.align') == 'right' || obj.Get('chart.title.yaxis.position') == 'right') {
+                angle = 90;
+                yaxis_title_pos = yaxis_title_pos * obj.Get('chart.gutter.right') + (obj.canvas.width - obj.Get('chart.gutter.right'));
+            } else {
+                yaxis_title_pos *= obj.Get('chart.gutter.left');
+            }
+            
+        
+            context.beginPath();
+            RGraph.Text(context,
+                        font,
+                        size + 2,
+                        yaxis_title_pos,
+                        RGraph.GetHeight(obj) / 2,
+                        obj.Get('chart.title.yaxis'),
+                        'center',
+                        'center',
+                        false,
+                        angle,
+                        false,
+                        true);
+            context.fill();
+        }
+
+        obj.context.beginPath();
+
+        // Draw the horizontal bars
+        context.fillStyle = obj.Get('chart.background.barcolor1');
+        height = (RGraph.GetHeight(obj) - gutterBottom);
+
+        for (var i=gutterTop; i < height ; i+=80) {
+            obj.context.fillRect(gutterLeft, i, RGraph.GetWidth(obj) - gutterLeft - gutterRight, Math.min(40, RGraph.GetHeight(obj) - gutterBottom - i) );
+        }
+
+            context.fillStyle = obj.Get('chart.background.barcolor2');
+            height = (RGraph.GetHeight(obj) - gutterBottom);
+    
+            for (var i= (40 + gutterTop); i < height; i+=80) {
+                obj.context.fillRect(gutterLeft, i, RGraph.GetWidth(obj) - gutterLeft - gutterRight, i + 40 > (RGraph.GetHeight(obj) - gutterBottom) ? RGraph.GetHeight(obj) - (gutterBottom + i) : 40);
+            }
+            
+            context.stroke();
+    
+
+        // Draw the background grid
+        if (obj.Get('chart.background.grid')) {
+
+            // If autofit is specified, use the .numhlines and .numvlines along with the width to work
+            // out the hsize and vsize
+            if (obj.Get('chart.background.grid.autofit')) {
+
+                /**
+                * Align the grid to the tickmarks
+                */
+                if (obj.Get('chart.background.grid.autofit.align')) {
+
+                    // Align the horizontal lines
+                    obj.Set('chart.background.grid.autofit.numhlines', obj.Get('chart.ylabels.count'));
+
+                    // Align the vertical lines for the line
+                    if (obj.type == 'line') {
+                        if (obj.Get('chart.labels') && obj.Get('chart.labels').length) {
+                            obj.Set('chart.background.grid.autofit.numvlines', obj.Get('chart.labels').length - 1);
+                        } else {
+                            obj.Set('chart.background.grid.autofit.numvlines', obj.data[0].length - 1);
+                        }
+
+                    // Align the vertical lines for the bar
+                    } else if (obj.type == 'bar' && obj.Get('chart.labels') && obj.Get('chart.labels').length) {
+                        obj.Set('chart.background.grid.autofit.numvlines', obj.Get('chart.labels').length);
+                    }
+                }
+
+                var vsize = ((RGraph.GetWidth(obj) - gutterLeft - gutterRight)) / obj.Get('chart.background.grid.autofit.numvlines');
+                var hsize = (RGraph.GetHeight(obj) - gutterTop - gutterBottom) / obj.Get('chart.background.grid.autofit.numhlines');
+
+                obj.Set('chart.background.grid.vsize', vsize);
+                obj.Set('chart.background.grid.hsize', hsize);
+            }
+
+            context.beginPath();
+            context.lineWidth   = obj.Get('chart.background.grid.width') ? obj.Get('chart.background.grid.width') : 1;
+            context.strokeStyle = obj.Get('chart.background.grid.color');
+
+            // Draw the horizontal lines
+            if (obj.Get('chart.background.grid.hlines')) {
+                height = (RGraph.GetHeight(obj) - gutterBottom)
+                for (y=gutterTop; y<height; y+=obj.Get('chart.background.grid.hsize')) {
+                    context.moveTo(gutterLeft, y);
+                    context.lineTo(RGraph.GetWidth(obj) - gutterRight, y);
+                }
+            }
+
+            if (obj.Get('chart.background.grid.vlines')) {
+                // Draw the vertical lines
+                var width = (RGraph.GetWidth(obj) - gutterRight)
+                for (x=gutterLeft; x<=width; x+=obj.Get('chart.background.grid.vsize')) {
+                    context.moveTo(x, gutterTop);
+                    context.lineTo(x, RGraph.GetHeight(obj) - gutterBottom);
+                }
+            }
+
+            if (obj.Get('chart.background.grid.border')) {
+                // Make sure a rectangle, the same colour as the grid goes around the graph
+                context.strokeStyle = obj.Get('chart.background.grid.color');
+                context.strokeRect(gutterLeft, gutterTop, RGraph.GetWidth(obj) - gutterLeft - gutterRight, RGraph.GetHeight(obj) - gutterTop - gutterBottom);
+            }
+        }
+
+        context.stroke();
+
+        // If it's a bar and 3D variant, translate
+        if (variant == '3d') {
+            context.restore();
+        }
+
+        // Draw the title if one is set
+        if ( typeof(obj.Get('chart.title')) == 'string') {
+
+            if (obj.type == 'gantt') {
+                gutterTop -= 10;
+            }
+
+            RGraph.DrawTitle(canvas,
+                             obj.Get('chart.title'),
+                             gutterTop,
+                             null,
+                             obj.Get('chart.text.size') + 2);
+        }
+
+        context.stroke();
+    }
+
+
+    /**
+    * Returns the day number for a particular date. Eg 1st February would be 32
+    * 
+    * @param   object obj A date object
+    * @return  int        The day number of the given date
+    */
+    RGraph.GetDays = function (obj)
+    {
+        var year  = obj.getFullYear();
+        var days  = obj.getDate();
+        var month = obj.getMonth();
+        
+        if (month == 0) return days;
+        if (month >= 1) days += 31; 
+        if (month >= 2) days += 28;
+
+            // Leap years. Crude, but if this code is still being used
+            // when it stops working, then you have my permission to shoot
+            // me. Oh, you won't be able to - I'll be dead...
+            if (year >= 2008 && year % 4 == 0) days += 1;
+
+        if (month >= 3) days += 31;
+        if (month >= 4) days += 30;
+        if (month >= 5) days += 31;
+        if (month >= 6) days += 30;
+        if (month >= 7) days += 31;
+        if (month >= 8) days += 31;
+        if (month >= 9) days += 30;
+        if (month >= 10) days += 31;
+        if (month >= 11) days += 30;
+        
+        return days;
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    /**
+    * Draws the graph key (used by various graphs)
+    * 
+    * @param object obj The graph object
+    * @param array  key An array of the texts to be listed in the key
+    * @param colors An array of the colors to be used
+    */
+    RGraph.DrawKey = function (obj, key, colors)
+    {
+        var canvas  = obj.canvas;
+        var context = obj.context;
+        context.lineWidth = 1;
+
+        context.beginPath();
+
+        /**
+        * Key positioned in the gutter
+        */
+        var keypos   = obj.Get('chart.key.position');
+        var textsize = obj.Get('chart.text.size');
+        
+        /**
+        * Change the older chart.key.vpos to chart.key.position.y
+        */
+        if (typeof(obj.Get('chart.key.vpos')) == 'number') {
+            obj.Set('chart.key.position.y', obj.Get('chart.key.vpos') * this.Get('chart.gutter.top') );
+        }
+
+        /**
+        * Account for null values in the key
+        */
+        var key_non_null    = [];
+        var colors_non_null = [];
+        for (var i=0; i<key.length; ++i) {
+            if (key[i] != null) {
+                colors_non_null.push(colors[i]);
+                key_non_null.push(key[i]);
+            }
+        }
+        
+        key    = key_non_null;
+        colors = colors_non_null;
+
+
+
+        if (keypos && keypos == 'gutter') {
+    
+            RGraph.DrawKey_gutter(obj, key, colors);
+
+
+        /**
+        * In-graph style key
+        */
+        } else if (keypos && keypos == 'graph') {
+
+            RGraph.DrawKey_graph(obj, key, colors);
+        
+        } else {
+            alert('[COMMON] (' + obj.id + ') Unknown key position: ' + keypos);
+        }
+    }
+
+
+
+
+
+    /**
+    * This does the actual drawing of the key when it's in the graph
+    * 
+    * @param object obj The graph object
+    * @param array  key The key items to draw
+    * @param array colors An aray of colors that the key will use
+    */
+    RGraph.DrawKey_graph = function (obj, key, colors)
+    {
+        var canvas      = obj.canvas;
+        var context     = obj.context;
+        var text_size   = typeof(obj.Get('chart.key.text.size')) == 'number' ? obj.Get('chart.key.text.size') : obj.Get('chart.text.size');
+        var text_font   = obj.Get('chart.text.font');
+        
+        var gutterLeft   = obj.Get('chart.gutter.left');
+        var gutterRight  = obj.Get('chart.gutter.right');
+        var gutterTop    = obj.Get('chart.gutter.top');
+        var gutterBottom = obj.Get('chart.gutter.bottom');
+
+        var hpos        = obj.Get('chart.yaxispos') == 'right' ? gutterLeft + 10 : RGraph.GetWidth(obj) - gutterRight - 10;
+        var vpos        = gutterTop + 10;
+        var title       = obj.Get('chart.title');
+        var blob_size   = text_size; // The blob of color
+        var hmargin      = 8; // This is the size of the gaps between the blob of color and the text
+        var vmargin      = 4; // This is the vertical margin of the key
+        var fillstyle    = obj.Get('chart.key.background');
+        var strokestyle  = '#333';
+        var height       = 0;
+        var width        = 0;
+
+
+        obj.coordsKey = [];
+
+
+        // Need to set this so that measuring the text works out OK
+        context.font = text_size + 'pt ' + obj.Get('chart.text.font');
+
+        // Work out the longest bit of text
+        for (i=0; i<key.length; ++i) {
+            width = Math.max(width, context.measureText(key[i]).width);
+        }
+
+        width += 5;
+        width += blob_size;
+        width += 5;
+        width += 5;
+        width += 5;
+
+        /**
+        * Now we know the width, we can move the key left more accurately
+        */
+        if (   obj.Get('chart.yaxispos') == 'left'
+            || (obj.type == 'pie' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'hbar' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'hbar' && obj.Get('chart.yaxispos') == 'center')
+            || (obj.type == 'rscatter' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'radar' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'rose' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'funnel' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'vprogress' && !obj.Get('chart.yaxispos'))
+            || (obj.type == 'hprogress' && !obj.Get('chart.yaxispos'))
+           ) {
+
+            hpos -= width;
+        }
+
+        /**
+        * Horizontal alignment
+        */
+        if (typeof(obj.Get('chart.key.halign')) == 'string') {
+            if (obj.Get('chart.key.halign') == 'left') {
+                hpos = gutterLeft + 10;
+            } else if (obj.Get('chart.key.halign') == 'right') {
+                hpos = RGraph.GetWidth(obj) - gutterRight  - width;
+            }
+        }
+
+        /**
+        * Specific location coordinates
+        */
+        if (typeof(obj.Get('chart.key.position.x')) == 'number') {
+            hpos = obj.Get('chart.key.position.x');
+        }
+        
+        if (typeof(obj.Get('chart.key.position.y')) == 'number') {
+            vpos = obj.Get('chart.key.position.y');
+        }
+
+
+        // Stipulate the shadow for the key box
+        if (obj.Get('chart.key.shadow')) {
+            context.shadowColor   = obj.Get('chart.key.shadow.color');
+            context.shadowBlur    = obj.Get('chart.key.shadow.blur');
+            context.shadowOffsetX = obj.Get('chart.key.shadow.offsetx');
+            context.shadowOffsetY = obj.Get('chart.key.shadow.offsety');
+        }
+
+
+
+
+        // Draw the box that the key resides in
+        context.beginPath();
+            context.fillStyle   = obj.Get('chart.key.background');
+            context.strokeStyle = 'black';
+
+
+        if (arguments[3] != false) {
+
+            context.lineWidth = obj.Get('chart.key.linewidth') ? obj.Get('chart.key.linewidth') : 1;
+
+            // The older square rectangled key
+            if (obj.Get('chart.key.rounded') == true) {
+                context.beginPath();
+                    context.strokeStyle = strokestyle;
+                    RGraph.strokedCurvyRect(context, hpos, vpos, width - 5, 5 + ( (text_size + 5) * RGraph.getKeyLength(key)),4);
+        
+                context.stroke();
+                context.fill();
+        
+                RGraph.NoShadow(obj);
+        
+            } else {
+                context.strokeRect(hpos, vpos, width - 5, 5 + ( (text_size + 5) * RGraph.getKeyLength(key)));
+                context.fillRect(hpos, vpos, width - 5, 5 + ( (text_size + 5) * RGraph.getKeyLength(key)));
+            }
+        }
+
+        RGraph.NoShadow(obj);
+
+        context.beginPath();
+
+            // Draw the labels given
+            for (var i=key.length - 1; i>=0; i--) {
+            
+                var j = Number(i) + 1;
+
+                // Draw the blob of color
+                if (obj.Get('chart.key.color.shape') == 'circle') {
+                    context.beginPath();
+                        context.strokeStyle = 'rgba(0,0,0,0)';
+                        context.fillStyle = colors[i];
+                        context.arc(hpos + 5 + (blob_size / 2), vpos + (5 * j) + (text_size * j) - text_size + (blob_size / 2), blob_size / 2, 0, 6.26, 0);
+                    context.fill();
+                
+                } else if (obj.Get('chart.key.color.shape') == 'line') {
+                    context.beginPath();
+                        context.strokeStyle = colors[i];
+                        context.moveTo(hpos + 5, vpos + (5 * j) + (text_size * j) - text_size + (blob_size / 2));
+                        context.lineTo(hpos + blob_size + 5, vpos + (5 * j) + (text_size * j) - text_size + (blob_size / 2));
+                    context.stroke();
+
+                } else {
+                    context.fillStyle =  colors[i];
+                    context.fillRect(hpos + 5, vpos + (5 * j) + (text_size * j) - text_size, text_size, text_size + 1);
+                }
+
+                context.beginPath();
+            
+                context.fillStyle = 'black';
+            
+                RGraph.Text(context,
+                            text_font,
+                            text_size,
+                            hpos + blob_size + 5 + 5,
+                            vpos + (5 * j) + (text_size * j),
+                            key[i]);
+
+                if (obj.Get('chart.key.interactive')) {
+                
+                    var px = hpos + 5;
+                    var py = vpos + (5 * j) + (text_size * j) - text_size;
+                    var pw = width - 5 - 5 - 5;
+                    var ph = text_size;
+                    
+                    
+                    obj.coordsKey.push([px, py, pw, ph]);
+                }
+
+            }
+        context.fill();
+
+        /**
+        * Install the interactivity event handler
+        */
+        if (obj.Get('chart.key.interactive')) {
+        
+            RGraph.Register(obj);
+        
+            var key_mousemove = function (e)
+            {
+                var obj         = e.target.__object__;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+        
+                for (var i=0; i<obj.coordsKey.length; ++i) {
+                
+                    var px = obj.coordsKey[i][0];
+                    var py = obj.coordsKey[i][1];
+                    var pw = obj.coordsKey[i][2];
+                    var ph = obj.coordsKey[i][3];
+        
+                    if (   mouseX > px && mouseX < (px + pw) && mouseY > py && mouseY < (py + ph) ) {
+                        
+                        // Necessary?
+                        //var index = obj.coordsKey.length - i - 1;
+        
+                        canvas.style.cursor = 'pointer';
+                        
+
+                        
+                        return;
+                    }
+                    
+                    canvas.style.cursor = 'default';
+                    
+                    if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(canvas_onmousemove_func) == 'function') {
+                        canvas_onmousemove_func(e);
+                    }
+                }
+            }
+            canvas.addEventListener('mousemove', key_mousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', key_mousemove);
+        
+        
+            var key_click = function (e)
+            {
+                RGraph.Redraw();
+
+                var obj         = e.target.__object__;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+
+                RGraph.DrawKey(obj, obj.Get('chart.key'), obj.Get('chart.colors'));
+        
+                for (var i=0; i<obj.coordsKey.length; ++i) {
+                
+                    var px = obj.coordsKey[i][0];
+                    var py = obj.coordsKey[i][1];
+                    var pw = obj.coordsKey[i][2];
+                    var ph = obj.coordsKey[i][3];
+        
+                    if (   mouseX > px && mouseX < (px + pw) && mouseY > py && mouseY < (py + ph) ) {
+                        
+                        var index = obj.coordsKey.length - i - 1;
+
+                        // HIGHLIGHT THE LINE HERE
+                        context.beginPath();
+                            context.fillStyle = 'rgba(255,255,255,0.9)';
+                            context.fillRect(obj.Get('chart.gutter.left'),obj.Get('chart.gutter.top'),canvas.width - obj.Get('chart.gutter.left') - obj.Get('chart.gutter.right'),canvas.height - obj.Get('chart.gutter.top') - obj.Get('chart.gutter.bottom'));
+                        context.fill();
+
+                        context.beginPath();
+                            context.strokeStyle = obj.Get('chart.colors')[index];
+                            context.lineWidth  = obj.Get('chart.linewidth');
+                            for (var j=0; j<obj.coords2[index].length; ++j) {
+                                
+                                var x = obj.coords2[index][j][0];
+                                var y = obj.coords2[index][j][1];
+                            
+                                if (j == 0) {
+                                    context.moveTo(x, y);
+                                } else {
+                                    context.lineTo(x, y);
+                                }
+                        }
+                        context.stroke();
+
+
+                        context.lineWidth  = 1;
+                        context.beginPath();
+                            context.strokeStyle = 'black';
+                            context.fillStyle   = 'white';
+                            
+                            RGraph.SetShadow(obj, 'rgba(0,0,0,0.5)', 0,0,10);
+
+                            context.strokeRect(px - 2, py - 2, pw + 4, ph + 4);
+                            context.fillRect(px - 2, py - 2, pw + 4, ph + 4);
+
+                        context.stroke();
+                        context.fill();
+
+
+                        RGraph.NoShadow(obj);
+
+
+                        context.beginPath();
+                            context.fillStyle = obj.Get('chart.colors')[index];
+                            context.fillRect(px, py, blob_size, blob_size);
+                        context.fill();
+
+                        context.beginPath();
+                            context.fillStyle = obj.Get('chart.text.color');
+                        
+                            RGraph.Text(context,
+                                        obj.Get('chart.text.font'),
+                                        obj.Get('chart.text.size'),
+                                        px + 5 + blob_size,
+                                        py + ph,
+                                        obj.Get('chart.key')[obj.Get('chart.key').length - i - 1]
+                                       );
+                        context.fill();
+
+        
+                        canvas.style.cursor = 'pointer';
+        
+                        return;
+                    }
+                    
+                    canvas.style.cursor = 'default';
+                }
+            }
+            canvas.addEventListener('click', key_click, false);
+            RGraph.AddEventListener(canvas.id, 'click', key_click);
+            
+            
+            //var key_window_click = function (e)
+            //{
+            //    RGraph.Redraw();
+            //}
+            //window.addEventListener('click', key_window_click, false);
+            //RGraph.AddEventListener(canvas.id, 'window_click', key_window_click);
+        }
+    }
+
+
+
+
+
+
+    /**
+    * This does the actual drawing of the key when it's in the gutter
+    * 
+    * @param object obj The graph object
+    * @param array  key The key items to draw
+    * @param array colors An aray of colors that the key will use
+    */
+    RGraph.DrawKey_gutter = function (obj, key, colors)
+    {
+        var canvas      = obj.canvas;
+        var context     = obj.context;
+        var text_size   = typeof(obj.Get('chart.key.text.size')) == 'number' ? obj.Get('chart.key.text.size') : obj.Get('chart.text.size');
+        var text_font   = obj.Get('chart.text.font');
+        
+        var gutterLeft   = obj.Get('chart.gutter.left');
+        var gutterRight  = obj.Get('chart.gutter.right');
+        var gutterTop    = obj.Get('chart.gutter.top');
+        var gutterBottom = obj.Get('chart.gutter.bottom');
+
+        var hpos        = RGraph.GetWidth(obj) / 2;
+        var vpos        = (gutterTop / 2) - 5;
+        var title       = obj.Get('chart.title');
+        var blob_size   = text_size; // The blob of color
+        var hmargin      = 8; // This is the size of the gaps between the blob of color and the text
+        var vmargin      = 4; // This is the vertical margin of the key
+        var fillstyle   = obj.Get('chart.key.background');
+        var strokestyle = 'black';
+        var length      = 0;
+
+
+
+        // Need to work out the length of the key first
+        context.font = text_size + 'pt ' + text_font;
+        for (i=0; i<key.length; ++i) {
+            length += hmargin;
+            length += blob_size;
+            length += hmargin;
+            length += context.measureText(key[i]).width;
+        }
+        length += hmargin;
+
+
+
+
+        /**
+        * Work out hpos since in the Pie it isn't necessarily dead center
+        */
+        if (obj.type == 'pie') {
+            if (obj.Get('chart.align') == 'left') {
+                var hpos = obj.radius + gutterLeft;
+                
+            } else if (obj.Get('chart.align') == 'right') {
+                var hpos = obj.canvas.width - obj.radius - gutterRight;
+
+            } else {
+                hpos = canvas.width / 2;
+            }
+        }
+
+
+
+
+
+        /**
+        * This makes the key centered
+        */  
+        hpos -= (length / 2);
+
+
+        /**
+        * Override the horizontal/vertical positioning
+        */
+        if (typeof(obj.Get('chart.key.position.x')) == 'number') {
+            hpos = obj.Get('chart.key.position.x');
+        }
+        if (typeof(obj.Get('chart.key.position.y')) == 'number') {
+            vpos = obj.Get('chart.key.position.y');
+        }
+
+
+
+        /**
+        * Draw the box that the key sits in
+        */
+        if (obj.Get('chart.key.position.gutter.boxed')) {
+
+            if (obj.Get('chart.key.shadow')) {
+                context.shadowColor   = obj.Get('chart.key.shadow.color');
+                context.shadowBlur    = obj.Get('chart.key.shadow.blur');
+                context.shadowOffsetX = obj.Get('chart.key.shadow.offsetx');
+                context.shadowOffsetY = obj.Get('chart.key.shadow.offsety');
+            }
+
+            
+            context.beginPath();
+                context.fillStyle = fillstyle;
+                context.strokeStyle = strokestyle;
+
+                if (obj.Get('chart.key.rounded')) {
+                    RGraph.strokedCurvyRect(context, hpos, vpos - vmargin, length, text_size + vmargin + vmargin)
+                    // Odd... RGraph.filledCurvyRect(context, hpos, vpos - vmargin, length, text_size + vmargin + vmargin);
+                } else {
+                    context.strokeRect(hpos, vpos - vmargin, length, text_size + vmargin + vmargin);
+                    context.fillRect(hpos, vpos - vmargin, length, text_size + vmargin + vmargin);
+                }
+                
+            context.stroke();
+            context.fill();
+
+
+            RGraph.NoShadow(obj);
+        }
+
+
+        /**
+        * Draw the blobs of color and the text
+        */
+        for (var i=0, pos=hpos; i<key.length; ++i) {
+            pos += hmargin;
+            
+            // Draw the blob of color - line
+            if (obj.Get('chart.key.color.shape') =='line') {
+                
+                context.beginPath();
+                    context.strokeStyle = colors[i];
+                    context.moveTo(pos, vpos + (blob_size / 2));
+                    context.lineTo(pos + blob_size, vpos + (blob_size / 2));
+                context.stroke();
+                
+            // Circle
+            } else if (obj.Get('chart.key.color.shape') == 'circle') {
+                
+                context.beginPath();
+                    context.fillStyle = colors[i];
+                    context.moveTo(pos, vpos + (blob_size / 2));
+                    context.arc(pos + (blob_size / 2), vpos + (blob_size / 2), (blob_size / 2), 0, 6.28, 0);
+                context.fill();
+
+
+            } else {
+
+                context.beginPath();
+                    context.fillStyle = colors[i];
+                    context.fillRect(pos, vpos, blob_size, blob_size);
+                context.fill();
+            }
+
+            pos += blob_size;
+            
+            pos += hmargin;
+
+            context.beginPath();
+                context.fillStyle = 'black';
+                RGraph.Text(context, text_font, text_size, pos, vpos + text_size - 1, key[i]);
+            context.fill();
+            pos += context.measureText(key[i]).width;
+        }
+    }
+    
+    
+    /**
+    * Returns the key length, but accounts for null values
+    * 
+    * @param array key The key elements
+    */
+    RGraph.getKeyLength = function (key)
+    {
+        var len = 0;
+
+        for (var i=0; i<key.length; ++i) {
+            if (key[i] != null) {
+                ++len;
+            }
+        }
+
+        return len;
+    }
+
+
+
+
+
+
+    /**
+    * A shortcut for RGraph.pr()
+    */
+    function pd(variable)
+    {
+        RGraph.pr(variable);
+    }
+    
+    function p(variable)
+    {
+        RGraph.pr(variable);
+    }
+    
+    /**
+    * A shortcut for console.log - as used by Firebug and Chromes console
+    */
+    function cl (variable)
+    {
+        return console.log(variable);
+    }
+
+
+    /**
+    * Makes a clone of an object
+    * 
+    * @param obj val The object to clone
+    */
+    RGraph.array_clone = function (obj)
+    {
+        if(obj == null || typeof(obj) != 'object') {
+            return obj;
+        }
+
+        var temp = [];
+        //var temp = new obj.constructor();
+
+        for(var i=0;i<obj.length; ++i) {
+            temp[i] = RGraph.array_clone(obj[i]);
+        }
+
+        return temp;
+    }
+
+
+    /**
+    * This function reverses an array
+    */
+    RGraph.array_reverse = function (arr)
+    {
+        var newarr = [];
+
+        for (var i=arr.length - 1; i>=0; i--) {
+            newarr.push(arr[i]);
+        }
+
+        return newarr;
+    }
+
+
+    /**
+    * Formats a number with thousand seperators so it's easier to read
+    * 
+    * @param  integer num The number to format
+    * @param  string      The (optional) string to prepend to the string
+    * @param  string      The (optional) string to ap
+    * pend to the string
+    * @return string      The formatted number
+    */
+    RGraph.number_format = function (obj, num)
+    {
+        var i;
+        var prepend = arguments[2] ? String(arguments[2]) : '';
+        var append  = arguments[3] ? String(arguments[3]) : '';
+        var output  = '';
+        var decimal = '';
+        var decimal_seperator  = obj.Get('chart.scale.point') ? obj.Get('chart.scale.point') : '.';
+        var thousand_seperator = obj.Get('chart.scale.thousand') ? obj.Get('chart.scale.thousand') : ',';
+        RegExp.$1   = '';
+        var i,j;
+
+if (typeof(obj.Get('chart.scale.formatter')) == 'function') {
+    return obj.Get('chart.scale.formatter')(obj, num);
+}
+
+        // Ignore the preformatted version of "1e-2"
+        if (String(num).indexOf('e') > 0) {
+            return String(prepend + String(num) + append);
+        }
+
+        // We need then number as a string
+        num = String(num);
+        
+        // Take off the decimal part - we re-append it later
+        if (num.indexOf('.') > 0) {
+            num     = num.replace(/\.(.*)/, '');
+            decimal = RegExp.$1;
+        }
+
+        // Thousand seperator
+        //var seperator = arguments[1] ? String(arguments[1]) : ',';
+        var seperator = thousand_seperator;
+        
+        /**
+        * Work backwards adding the thousand seperators
+        */
+        var foundPoint;
+        for (i=(num.length - 1),j=0; i>=0; j++,i--) {
+            var character = num.charAt(i);
+            
+            if ( j % 3 == 0 && j != 0) {
+                output += seperator;
+            }
+            
+            /**
+            * Build the output
+            */
+            output += character;
+        }
+        
+        /**
+        * Now need to reverse the string
+        */
+        var rev = output;
+        output = '';
+        for (i=(rev.length - 1); i>=0; i--) {
+            output += rev.charAt(i);
+        }
+
+        // Tidy up
+        output = output.replace(/^-,/, '-');
+
+        // Reappend the decimal
+        if (decimal.length) {
+            output =  output + decimal_seperator + decimal;
+            decimal = '';
+            RegExp.$1 = '';
+        }
+
+        // Minor bugette
+        if (output.charAt(0) == '-') {
+            output = output.replace(/-/, '');
+            prepend = '-' + prepend;
+        }
+
+        return prepend + output + append;
+    }
+
+
+    /**
+    * Draws horizontal coloured bars on something like the bar, line or scatter
+    */
+    RGraph.DrawBars = function (obj)
+    {
+        var hbars = obj.Get('chart.background.hbars');
+
+        /**
+        * Draws a horizontal bar
+        */
+        obj.context.beginPath();
+        
+        for (i=0; i<hbars.length; ++i) {
+            
+            // If null is specified as the "height", set it to the upper max value
+            if (hbars[i][1] == null) {
+                hbars[i][1] = obj.max;
+            
+            // If the first index plus the second index is greater than the max value, adjust accordingly
+            } else if (hbars[i][0] + hbars[i][1] > obj.max) {
+                hbars[i][1] = obj.max - hbars[i][0];
+            }
+
+
+            // If height is negative, and the abs() value is greater than .max, use a negative max instead
+            if (Math.abs(hbars[i][1]) > obj.max) {
+                hbars[i][1] = -1 * obj.max;
+            }
+
+
+            // If start point is greater than max, change it to max
+            if (Math.abs(hbars[i][0]) > obj.max) {
+                hbars[i][0] = obj.max;
+            }
+            
+            // If start point plus height is less than negative max, use the negative max plus the start point
+            if (hbars[i][0] + hbars[i][1] < (-1 * obj.max) ) {
+                hbars[i][1] = -1 * (obj.max + hbars[i][0]);
+            }
+
+            // If the X axis is at the bottom, and a negative max is given, warn the user
+            if (obj.Get('chart.xaxispos') == 'bottom' && (hbars[i][0] < 0 || (hbars[i][1] + hbars[i][1] < 0)) ) {
+                alert('[' + obj.type.toUpperCase() + ' (ID: ' + obj.id + ') BACKGROUND HBARS] You have a negative value in one of your background hbars values, whilst the X axis is in the center');
+            }
+
+            var ystart = (obj.grapharea - ((hbars[i][0] / obj.max) * obj.grapharea));
+            var height = (Math.min(hbars[i][1], obj.max - hbars[i][0]) / obj.max) * obj.grapharea;
+
+            // Account for the X axis being in the center
+            if (obj.Get('chart.xaxispos') == 'center') {
+                ystart /= 2;
+                height /= 2;
+            }
+            
+            ystart += obj.Get('chart.gutter.top')
+
+            var x = obj.Get('chart.gutter.left');
+            var y = ystart - height;
+            var w = obj.canvas.width - obj.Get('chart.gutter.left') - obj.Get('chart.gutter.right');
+            var h = height;
+            
+            // Accommodate Opera :-/
+            if (navigator.userAgent.indexOf('Opera') != -1 && obj.Get('chart.xaxispos') == 'center' && h < 0) {
+                h *= -1;
+                y = y - h;
+            }
+            
+            /**
+            * Account for X axis at the top
+            */
+            if (obj.Get('chart.xaxispos') == 'top') {
+                y  = obj.canvas.height - y;
+                h *= -1;
+            }
+
+            obj.context.fillStyle = hbars[i][2];
+            obj.context.fillRect(x, y, w, h);
+        }
+
+        obj.context.fill();
+    }
+
+
+    /**
+    * Draws in-graph labels.
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.DrawInGraphLabels = function (obj)
+    {
+        var canvas  = obj.canvas;
+        var context = obj.context;
+        var labels  = obj.Get('chart.labels.ingraph');
+        var labels_processed = [];
+
+        // Defaults
+        var fgcolor   = 'black';
+        var bgcolor   = 'white';
+        var direction = 1;
+
+        if (!labels) {
+            return;
+        }
+
+        /**
+        * Preprocess the labels array. Numbers are expanded
+        */
+        for (var i=0; i<labels.length; ++i) {
+            if (typeof(labels[i]) == 'number') {
+                for (var j=0; j<labels[i]; ++j) {
+                    labels_processed.push(null);
+                }
+            } else if (typeof(labels[i]) == 'string' || typeof(labels[i]) == 'object') {
+                labels_processed.push(labels[i]);
+            
+            } else {
+                labels_processed.push('');
+            }
+        }
+
+        /**
+        * Turn off any shadow
+        */
+        RGraph.NoShadow(obj);
+
+        if (labels_processed && labels_processed.length > 0) {
+
+            for (var i=0; i<labels_processed.length; ++i) {
+                if (labels_processed[i]) {
+                    var coords = obj.coords[i];
+                    
+                    if (coords && coords.length > 0) {
+                        var x      = (obj.type == 'bar' ? coords[0] + (coords[2] / 2) : coords[0]);
+                        var y      = (obj.type == 'bar' ? coords[1] + (coords[3] / 2) : coords[1]);
+                        var length = typeof(labels_processed[i][4]) == 'number' ? labels_processed[i][4] : 25;
+
+    
+                        context.beginPath();
+                        context.fillStyle   = 'black';
+                        context.strokeStyle = 'black';
+                        
+    
+                        if (obj.type == 'bar') {
+                        
+                            /**
+                            * X axis at the top
+                            */
+                            if (obj.Get('chart.xaxispos') == 'top') {
+                                length *= -1;
+                            }
+    
+                            if (obj.Get('chart.variant') == 'dot') {
+                                context.moveTo(x, obj.coords[i][1] - 5);
+                                context.lineTo(x, obj.coords[i][1] - 5 - length);
+                                
+                                var text_x = x;
+                                var text_y = obj.coords[i][1] - 5 - length;
+                            
+                            } else if (obj.Get('chart.variant') == 'arrow') {
+                                context.moveTo(x, obj.coords[i][1] - 5);
+                                context.lineTo(x, obj.coords[i][1] - 5 - length);
+                                
+                                var text_x = x;
+                                var text_y = obj.coords[i][1] - 5 - length;
+                            
+                            } else {
+    
+                                context.arc(x, y, 2.5, 0, 6.28, 0);
+                                context.moveTo(x, y);
+                                context.lineTo(x, y - length);
+
+                                var text_x = x;
+                                var text_y = y - length;
+                            }
+
+                            context.stroke();
+                            context.fill();
+                            
+    
+                        } else if (obj.type == 'line') {
+                        
+                            if (
+                                typeof(labels_processed[i]) == 'object' &&
+                                typeof(labels_processed[i][3]) == 'number' &&
+                                labels_processed[i][3] == -1
+                               ) {
+
+                                context.moveTo(x, y + 5);
+                                context.lineTo(x, y + 5 + length);
+                                
+                                context.stroke();
+                                context.beginPath();                                
+                                
+                                // This draws the arrow
+                                context.moveTo(x, y + 5);
+                                context.lineTo(x - 3, y + 10);
+                                context.lineTo(x + 3, y + 10);
+                                context.closePath();
+                                
+                                var text_x = x;
+                                var text_y = y + 5 + length;
+                            
+                            } else {
+                                
+                                var text_x = x;
+                                var text_y = y - 5 - length;
+
+                                context.moveTo(x, y - 5);
+                                context.lineTo(x, y - 5 - length);
+                                
+                                context.stroke();
+                                context.beginPath();
+                                
+                                // This draws the arrow
+                                context.moveTo(x, y - 5);
+                                context.lineTo(x - 3, y - 10);
+                                context.lineTo(x + 3, y - 10);
+                                context.closePath();
+                            }
+                        
+                            context.fill();
+                        }
+
+                        // Taken out on the 10th Nov 2010 - unnecessary
+                        //var width = context.measureText(labels[i]).width;
+                        
+                        context.beginPath();
+                            
+                            // Fore ground color
+                            context.fillStyle = (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][1]) == 'string') ? labels_processed[i][1] : 'black';
+
+                            RGraph.Text(context,
+                                        obj.Get('chart.text.font'),
+                                        obj.Get('chart.text.size'),
+                                        text_x,
+                                        text_y,
+                                        (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][0]) == 'string') ? labels_processed[i][0] : labels_processed[i],
+                                        'bottom',
+                                        'center',
+                                        true,
+                                        null,
+                                        (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][2]) == 'string') ? labels_processed[i][2] : 'white');
+                        context.fill();
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+    * This function "fills in" key missing properties that various implementations lack
+    * 
+    * @param object e The event object
+    */
+    RGraph.FixEventObject = function (e)
+    {
+        if (RGraph.isIE8()) {
+            
+            var e = event;
+
+            e.pageX  = (event.clientX + document.body.scrollLeft);
+            e.pageY  = (event.clientY + document.body.scrollTop);
+            e.target = event.srcElement;
+            
+            if (!document.body.scrollTop && document.documentElement.scrollTop) {
+                e.pageX += parseInt(document.documentElement.scrollLeft);
+                e.pageY += parseInt(document.documentElement.scrollTop);
+            }
+        }
+
+        // This is mainly for FF which doesn't provide offsetX
+        if (typeof(e.offsetX) == 'undefined' && typeof(e.offsetY) == 'undefined') {
+            var coords = RGraph.getMouseXY(e);
+            e.offsetX = coords[0];
+            e.offsetY = coords[1];
+        }
+        
+        // Any browser that doesn't implement stopPropagation() (MSIE)
+        if (!e.stopPropagation) {
+            e.stopPropagation = function () {window.event.cancelBubble = true;}
+        }
+        
+        return e;
+    }
+
+
+    /**
+    * Draw crosshairs if enabled
+    * 
+    * @param object obj The graph object (from which we can get the context and canvas as required)
+    */
+    RGraph.DrawCrosshairs = function (obj)
+    {
+        if (obj.Get('chart.crosshairs')) {
+            var canvas  = obj.canvas;
+            var context = obj.context;
+            
+            // 5th November 2010 - removed now that tooltips are DOM2 based.
+            //if (obj.Get('chart.tooltips') && obj.Get('chart.tooltips').length > 0) {
+                //alert('[' + obj.type.toUpperCase() + '] Sorry - you cannot have crosshairs enabled with tooltips! Turning off crosshairs...');
+                //obj.Set('chart.crosshairs', false);
+                //return;
+            //}
+            
+            canvas.onmousemove = function (e)
+            {
+                var e       = RGraph.FixEventObject(e);
+                var canvas  = obj.canvas;
+                var context = obj.context;
+                var width   = canvas.width;
+                var height  = canvas.height;
+                var adjustments = obj.Get('chart.tooltips.coords.adjust');
+                
+                var gutterLeft   = obj.Get('chart.gutter.left');
+                var gutterRight  = obj.Get('chart.gutter.right');
+                var gutterTop    = obj.Get('chart.gutter.top');
+                var gutterBottom = obj.Get('chart.gutter.bottom');
+    
+                var mouseCoords = RGraph.getMouseXY(e);
+                var x = mouseCoords[0];
+                var y = mouseCoords[1];
+                
+                if (typeof(adjustments) == 'object' && adjustments[0] && adjustments[1]) {
+                    x = x - adjustments[0];
+                    y = y - adjustments[1];
+                }
+
+                RGraph.Clear(canvas);
+                obj.Draw();
+
+                if (   x >= gutterLeft
+                    && y >= gutterTop
+                    && x <= (width - gutterRight)
+                    && y <= (height - gutterBottom)
+                   ) {
+
+                    var linewidth = obj.Get('chart.crosshairs.linewidth');
+                    context.lineWidth = linewidth ? linewidth : 1;
+
+                    context.beginPath();
+                    context.strokeStyle = obj.Get('chart.crosshairs.color');
+                    
+                    // Draw a top vertical line
+                    context.moveTo(x, gutterTop);
+                    context.lineTo(x, height - gutterBottom);
+                    
+                    // Draw a horizontal line
+                    context.moveTo(gutterLeft, y);
+                    context.lineTo(width - gutterRight, y);
+
+                    context.stroke();
+                    
+                    /**
+                    * Need to show the coords?
+                    */
+                    if (obj.Get('chart.crosshairs.coords')) {
+                        if (obj.type == 'scatter') {
+
+                            var xCoord = (((x - obj.Get('chart.gutter.left')) / (obj.canvas.width - gutterLeft - gutterRight)) * (obj.Get('chart.xmax') - obj.Get('chart.xmin'))) + obj.Get('chart.xmin');
+                                xCoord = xCoord.toFixed(obj.Get('chart.scale.decimals'));
+                            var yCoord = obj.max - (((y - obj.Get('chart.gutter.top')) / (obj.canvas.height - gutterTop - gutterBottom)) * obj.max);
+
+                                if (obj.type == 'scatter' && obj.Get('chart.xaxispos') == 'center') {
+                                    yCoord = (yCoord - (obj.max / 2)) * 2;
+                                }
+
+                                yCoord = yCoord.toFixed(obj.Get('chart.scale.decimals'));
+                            var div    = RGraph.Registry.Get('chart.coordinates.coords.div');
+                            var mouseCoords = RGraph.getMouseXY(e);
+                            var canvasXY = RGraph.getCanvasXY(canvas);
+                            
+                            if (!div) {
+
+                                div = document.createElement('DIV');
+                                div.__object__     = obj;
+                                div.style.position = 'absolute';
+                                div.style.backgroundColor = 'white';
+                                div.style.border = '1px solid black';
+                                div.style.fontFamily = 'Arial, Verdana, sans-serif';
+                                div.style.fontSize = '10pt'
+                                div.style.padding = '2px';
+                                div.style.opacity = 1;
+                                div.style.WebkitBorderRadius = '3px';
+                                div.style.borderRadius = '3px';
+                                div.style.MozBorderRadius = '3px';
+                                document.body.appendChild(div);
+                                
+                                RGraph.Registry.Set('chart.coordinates.coords.div', div);
+                            }
+                            
+                            // Convert the X/Y pixel coords to correspond to the scale
+                            
+                            div.style.opacity = 1;
+                            div.style.display = 'inline';
+
+                            if (!obj.Get('chart.crosshairs.coords.fixed')) {
+                                div.style.left = Math.max(2, (e.pageX - div.offsetWidth - 3)) + 'px';
+                                div.style.top = Math.max(2, (e.pageY - div.offsetHeight - 3))  + 'px';
+                            } else {
+                                div.style.left = canvasXY[0] + gutterLeft + 3 + 'px';
+                                div.style.top  = canvasXY[1] + gutterTop + 3 + 'px';
+                            }
+
+                            div.innerHTML = '<span style="color: #666">' + obj.Get('chart.crosshairs.coords.labels.x') + ':</span> ' + xCoord + '<br><span style="color: #666">' + obj.Get('chart.crosshairs.coords.labels.y') + ':</span> ' + yCoord;
+                            
+                            canvas.addEventListener('mouseout', RGraph.HideCrosshairCoords, false);
+
+                        } else {
+                            alert('[RGRAPH] Showing crosshair coordinates is only supported on the Scatter chart');
+                        }
+                    }
+                } else {
+                    RGraph.HideCrosshairCoords();
+                }
+            }
+        }
+    }
+
+    /**
+    * Thisz function hides the crosshairs coordinates
+    */
+    RGraph.HideCrosshairCoords = function ()
+    {
+        var div = RGraph.Registry.Get('chart.coordinates.coords.div');
+
+        if (   div
+            && div.style.opacity == 1
+            && div.__object__.Get('chart.crosshairs.coords.fadeout')
+           ) {
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.9;}, 50);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.8;}, 100);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.7;}, 150);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.6;}, 200);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.5;}, 250);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.4;}, 300);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.3;}, 350);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.2;}, 400);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0.1;}, 450);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.opacity = 0;}, 500);
+            setTimeout(function() {RGraph.Registry.Get('chart.coordinates.coords.div').style.display = 'none';}, 550);
+        }
+    }
+
+
+    /**
+    * Trims the right hand side of a string. Removes SPACE, TAB
+    * CR and LF.
+    * 
+    * @param string str The string to trim
+    */
+    RGraph.rtrim = function (str)
+    {
+        return str.replace(/( |\n|\r|\t)+$/, '');
+    }
+
+
+    /**
+    * Draws the3D axes/background
+    */
+    RGraph.Draw3DAxes = function (obj)
+    {
+        var gutterLeft    = obj.Get('chart.gutter.left');
+        var gutterRight   = obj.Get('chart.gutter.right');
+        var gutterTop     = obj.Get('chart.gutter.top');
+        var gutterBottom  = obj.Get('chart.gutter.bottom');
+
+        var context = obj.context;
+        var canvas  = obj.canvas;
+
+        context.strokeStyle = '#aaa';
+        context.fillStyle = '#ddd';
+
+        // Draw the vertical left side
+        context.beginPath();
+            context.moveTo(gutterLeft, gutterTop);
+            context.lineTo(gutterLeft + 10, gutterTop - 5);
+            context.lineTo(gutterLeft + 10, canvas.height - gutterBottom - 5);
+            context.lineTo(gutterLeft, canvas.height - gutterBottom);
+        context.closePath();
+        
+        context.stroke();
+        context.fill();
+
+        // Draw the bottom floor
+        context.beginPath();
+            context.moveTo(gutterLeft, canvas.height - gutterBottom);
+            context.lineTo(gutterLeft + 10, canvas.height - gutterBottom - 5);
+            context.lineTo(canvas.width - gutterRight + 10,  canvas.height - gutterBottom - 5);
+            context.lineTo(canvas.width - gutterRight, canvas.height - gutterBottom);
+        context.closePath();
+        
+        context.stroke();
+        context.fill();
+    }
+
+    /**
+    * Turns off any shadow
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.NoShadow = function (obj)
+    {
+        obj.context.shadowColor   = 'rgba(0,0,0,0)';
+        obj.context.shadowBlur    = 0;
+        obj.context.shadowOffsetX = 0;
+        obj.context.shadowOffsetY = 0;
+    }
+    
+    
+    /**
+    * Sets the four shadow properties - a shortcut function
+    * 
+    * @param object obj     Your graph object
+    * @param string color   The shadow color
+    * @param number offsetx The shadows X offset
+    * @param number offsety The shadows Y offset
+    * @param number blur    The blurring effect applied to the shadow
+    */
+    RGraph.SetShadow = function (obj, color, offsetx, offsety, blur)
+    {
+        obj.context.shadowColor   = color;
+        obj.context.shadowOffsetX = offsetx;
+        obj.context.shadowOffsetY = offsety;
+        obj.context.shadowBlur    = blur;
+    }
+
+
+    /**
+    * This function attempts to "fill in" missing functions from the canvas
+    * context object. Only two at the moment - measureText() nd fillText().
+    * 
+    * @param object context The canvas 2D context
+    */
+    RGraph.OldBrowserCompat = function (context)
+    {
+        if (!context.measureText) {
+        
+            // This emulates the measureText() function
+            context.measureText = function (text)
+            {
+                var textObj = document.createElement('DIV');
+                textObj.innerHTML = text;
+                textObj.style.backgroundColor = 'white';
+                textObj.style.position = 'absolute';
+                textObj.style.top = -100
+                textObj.style.left = 0;
+                document.body.appendChild(textObj);
+
+                var width = {width: textObj.offsetWidth};
+                
+                textObj.style.display = 'none';
+                
+                return width;
+            }
+        }
+
+        if (!context.fillText) {
+            // This emulates the fillText() method
+            context.fillText    = function (text, targetX, targetY)
+            {
+                return false;
+            }
+        }
+        
+        // If IE8, add addEventListener()
+        if (!context.canvas.addEventListener) {
+            window.addEventListener = function (ev, func, bubble)
+            {
+                return this.attachEvent('on' + ev, func);
+            }
+
+            context.canvas.addEventListener = function (ev, func, bubble)
+            {
+                return this.attachEvent('on' + ev, func);
+            }
+        }
+    }
+
+
+
+    /**
+    * This is a function that can be used to run code asynchronously, which can
+    * be used to speed up the loading of you pages.
+    * 
+    * @param string func This is the code to run. It can also be a function pointer.
+    *                    The front page graphs show this function in action. Basically
+    *                   each graphs code is made in a function, and that function is
+    *                   passed to this function to run asychronously.
+    */
+    RGraph.Async = function (func)
+    {
+        return setTimeout(func, arguments[1] ? arguments[1] : 1);
+    }
+
+
+    /**
+    * A custom random number function
+    * 
+    * @param number min The minimum that the number should be
+    * @param number max The maximum that the number should be
+    * @param number    How many decimal places there should be. Default for this is 0
+    */
+    RGraph.random = function (min, max)
+    {
+        var dp = arguments[2] ? arguments[2] : 0;
+        var r = Math.random();
+        
+        return Number((((max - min) * r) + min).toFixed(dp));
+    }
+
+
+    /**
+    * Draws a rectangle with curvy corners
+    * 
+    * @param context object The context
+    * @param x       number The X coordinate (top left of the square)
+    * @param y       number The Y coordinate (top left of the square)
+    * @param w       number The width of the rectangle
+    * @param h       number The height of the rectangle
+    * @param         number The radius of the curved corners
+    * @param         boolean Whether the top left corner is curvy
+    * @param         boolean Whether the top right corner is curvy
+    * @param         boolean Whether the bottom right corner is curvy
+    * @param         boolean Whether the bottom left corner is curvy
+    */
+    RGraph.strokedCurvyRect = function (context, x, y, w, h)
+    {
+        // The corner radius
+        var r = arguments[5] ? arguments[5] : 3;
+
+        // The corners
+        var corner_tl = (arguments[6] || arguments[6] == null) ? true : false;
+        var corner_tr = (arguments[7] || arguments[7] == null) ? true : false;
+        var corner_br = (arguments[8] || arguments[8] == null) ? true : false;
+        var corner_bl = (arguments[9] || arguments[9] == null) ? true : false;
+
+        context.beginPath();
+
+            // Top left side
+            context.moveTo(x + (corner_tl ? r : 0), y);
+            context.lineTo(x + w - (corner_tr ? r : 0), y);
+            
+            // Top right corner
+            if (corner_tr) {
+                context.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2, false);
+            }
+
+            // Top right side
+            context.lineTo(x + w, y + h - (corner_br ? r : 0) );
+
+            // Bottom right corner
+            if (corner_br) {
+                context.arc(x + w - r, y - r + h, r, Math.PI * 2, Math.PI * 0.5, false);
+            }
+
+            // Bottom right side
+            context.lineTo(x + (corner_bl ? r : 0), y + h);
+
+            // Bottom left corner
+            if (corner_bl) {
+                context.arc(x + r, y - r + h, r, Math.PI * 0.5, Math.PI, false);
+            }
+
+            // Bottom left side
+            context.lineTo(x, y + (corner_tl ? r : 0) );
+
+            // Top left corner
+            if (corner_tl) {
+                context.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5, false);
+            }
+
+        context.stroke();
+    }
+
+
+    /**
+    * Draws a filled rectangle with curvy corners
+    * 
+    * @param context object The context
+    * @param x       number The X coordinate (top left of the square)
+    * @param y       number The Y coordinate (top left of the square)
+    * @param w       number The width of the rectangle
+    * @param h       number The height of the rectangle
+    * @param         number The radius of the curved corners
+    * @param         boolean Whether the top left corner is curvy
+    * @param         boolean Whether the top right corner is curvy
+    * @param         boolean Whether the bottom right corner is curvy
+    * @param         boolean Whether the bottom left corner is curvy
+    */
+    RGraph.filledCurvyRect = function (context, x, y, w, h)
+    {
+        // The corner radius
+        var r = arguments[5] ? arguments[5] : 3;
+
+        // The corners
+        var corner_tl = (arguments[6] || arguments[6] == null) ? true : false;
+        var corner_tr = (arguments[7] || arguments[7] == null) ? true : false;
+        var corner_br = (arguments[8] || arguments[8] == null) ? true : false;
+        var corner_bl = (arguments[9] || arguments[9] == null) ? true : false;
+
+        context.beginPath();
+
+            // First draw the corners
+
+            // Top left corner
+            if (corner_tl) {
+                context.moveTo(x + r, y + r);
+                context.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI, false);
+            } else {
+                context.fillRect(x, y, r, r);
+            }
+
+            // Top right corner
+            if (corner_tr) {
+                context.moveTo(x + w - r, y + r);
+                context.arc(x + w - r, y + r, r, 1.5 * Math.PI, 0, false);
+            } else {
+                context.moveTo(x + w - r, y);
+                context.fillRect(x + w - r, y, r, r);
+            }
+
+
+            // Bottom right corner
+            if (corner_br) {
+                context.moveTo(x + w - r, y + h - r);
+                context.arc(x + w - r, y - r + h, r, 0, Math.PI / 2, false);
+            } else {
+                context.moveTo(x + w - r, y + h - r);
+                context.fillRect(x + w - r, y + h - r, r, r);
+            }
+
+            // Bottom left corner
+            if (corner_bl) {
+                context.moveTo(x + r, y + h - r);
+                context.arc(x + r, y - r + h, r, Math.PI / 2, Math.PI, false);
+            } else {
+                context.moveTo(x, y + h - r);
+                context.fillRect(x, y + h - r, r, r);
+            }
+
+            // Now fill it in
+            context.fillRect(x + r, y, w - r - r, h);
+            context.fillRect(x, y + r, r + 1, h - r - r);
+            context.fillRect(x + w - r - 1, y + r, r + 1, h - r - r);
+
+        context.fill();
+    }
+
+
+    /**
+    * A crude timing function
+    * 
+    * @param string label The label to use for the time
+    */
+    RGraph.Timer = function (label)
+    {
+        var d = new Date();
+
+        // This uses the Firebug console
+        console.log(label + ': ' + d.getSeconds() + '.' + d.getMilliseconds());
+    }
+
+
+    /**
+    * Hides the palette if it's visible
+    */
+    RGraph.HidePalette = function ()
+    {
+        var div = RGraph.Registry.Get('palette');
+
+        if (typeof(div) == 'object' && div) {
+            div.style.visibility = 'hidden';
+            div.style.display    = 'none';
+            RGraph.Registry.Set('palette', null);
+        }
+    }
+
+
+    /**
+    * Hides the zoomed canvas
+    */
+    RGraph.HideZoomedCanvas = function ()
+    {
+        if (typeof(__zoomedimage__) == 'object') {
+            obj = __zoomedimage__.obj;
+        } else {
+            return;
+        }
+
+        if (obj.Get('chart.zoom.fade.out')) {
+            for (var i=10,j=1; i>=0; --i, ++j) {
+                if (typeof(__zoomedimage__) == 'object') {
+                    setTimeout("__zoomedimage__.style.opacity = " + String(i / 10), j * 30);
+                }
+            }
+
+            if (typeof(__zoomedbackground__) == 'object') {
+                setTimeout("__zoomedbackground__.style.opacity = " + String(i / 10), j * 30);
+            }
+        }
+
+        if (typeof(__zoomedimage__) == 'object') {
+            setTimeout("__zoomedimage__.style.display = 'none'", obj.Get('chart.zoom.fade.out') ? 310 : 0);
+        }
+
+        if (typeof(__zoomedbackground__) == 'object') {
+            setTimeout("__zoomedbackground__.style.display = 'none'", obj.Get('chart.zoom.fade.out') ? 310 : 0);
+        }
+    }
+
+
+    /**
+    * Adds an event handler
+    * 
+    * @param object obj   The graph object
+    * @param string event The name of the event, eg ontooltip
+    * @param object func  The callback function
+    */
+    RGraph.AddCustomEventListener = function (obj, name, func)
+    {
+        if (typeof(RGraph.events[obj.id]) == 'undefined') {
+            RGraph.events[obj.id] = [];
+        }
+
+        RGraph.events[obj.id].push([obj, name, func]);
+        
+        return RGraph.events[obj.id].length - 1;
+    }
+
+
+    /**
+    * Used to fire one of the RGraph custom events
+    * 
+    * @param object obj   The graph object that fires the event
+    * @param string event The name of the event to fire
+    */
+    RGraph.FireCustomEvent = function (obj, name)
+    {
+        if (obj && obj.isRGraph) {
+            var id = obj.id;
+    
+            if (   typeof(id) == 'string'
+                && typeof(RGraph.events) == 'object'
+                && typeof(RGraph.events[id]) == 'object'
+                && RGraph.events[id].length > 0) {
+    
+                for(var j=0; j<RGraph.events[id].length; ++j) {
+                    if (RGraph.events[id][j] && RGraph.events[id][j][1] == name) {
+                        RGraph.events[id][j][2](obj);
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+    * Checks the browser for traces of MSIE8
+    */
+    RGraph.isIE8 = function ()
+    {
+        return navigator.userAgent.indexOf('MSIE 8') > 0;
+    }
+
+
+    /**
+    * Checks the browser for traces of MSIE9
+    */
+    RGraph.isIE9 = function ()
+    {
+        return navigator.userAgent.indexOf('MSIE 9') > 0;
+    }
+
+
+    /**
+    * Checks the browser for traces of MSIE9
+    */
+    RGraph.isIE9up = function ()
+    {
+        navigator.userAgent.match(/MSIE (\d+)/);
+
+        return Number(RegExp.$1) >= 9;
+    }
+
+
+    /**
+    * This clears a canvases event handlers. Used at the start of each graphs .Draw() method.
+    * 
+    * @param string id The ID of the canvas whose event handlers will be cleared
+    */
+    RGraph.ClearEventListeners = function (id)
+    {
+        for (var i=0; i<RGraph.Registry.Get('chart.event.handlers').length; ++i) {
+
+            var el = RGraph.Registry.Get('chart.event.handlers')[i];
+
+            if (el && (el[0] == id || el[0] == ('window_' + id)) ) {
+                if (el[0].substring(0, 7) == 'window_') {
+                    window.removeEventListener(el[1], el[2], false);
+                } else {
+                    document.getElementById(id).removeEventListener(el[1], el[2], false);
+                }
+                
+                RGraph.Registry.Get('chart.event.handlers')[i] = null;
+            }
+        }
+    }
+
+
+    /**
+    * 
+    */
+    RGraph.AddEventListener = function (id, e, func)
+    {
+        RGraph.Registry.Get('chart.event.handlers').push([id, e, func]);
+    }
+
+
+    /**
+    * This function suggests a gutter size based on the widest left label. Given that the bottom
+    * labels may be longer, this may be a little out.
+    * 
+    * @param object obj  The graph object
+    * @param array  data An array of graph data
+    * @return int        A suggested gutter setting
+    */
+    RGraph.getGutterSuggest = function (obj, data)
+    {
+        var str = RGraph.number_format(obj, RGraph.array_max(RGraph.getScale(RGraph.array_max(data), obj)), obj.Get('chart.units.pre'), obj.Get('chart.units.post'));
+
+        // Take into account the HBar
+        if (obj.type == 'hbar') {
+
+            var str = '';
+            var len = 0;
+
+            for (var i=0; i<obj.Get('chart.labels').length; ++i) {
+                str = (obj.Get('chart.labels').length > str.length ? obj.Get('chart.labels')[i] : str);
+            }
+        }
+
+        obj.context.font = obj.Get('chart.text.size') + 'pt ' + obj.Get('chart.text.font');
+
+        len = obj.context.measureText(str).width + 5;
+
+        return (obj.type == 'hbar' ? len / 3 : len);
+    }
+
+
+    /**
+    * A basic Array shift gunction
+    * 
+    * @param  object The numerical array to work on
+    * @return        The new array
+    */
+    RGraph.array_shift = function (arr)
+    {
+        var ret = [];
+        
+        for (var i=1; i<arr.length; ++i) ret.push(arr[i]);
+        
+        return ret;
+    }
+
+
+    /**
+    * If you prefer, you can use the SetConfig() method to set the configuration information
+    * for your chart. You may find that setting the configuration this way eases reuse.
+    * 
+    * @param object obj    The graph object
+    * @param object config The graph configuration information
+    */
+    RGraph.SetConfig = function (obj, c)
+    {
+        for (i in c) {
+            if (typeof(i) == 'string') {
+                obj.Set(i, c[i]);
+            }
+        }
+        
+        return obj;
+    }
+
+
+    /**
+    * This function gets the canvas height. Defaults to the actual
+    * height but this can be changed by setting chart.height.
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.GetHeight = function (obj)
+    {
+        return obj.canvas.height;
+    }
+
+
+    /**
+    * This function gets the canvas width. Defaults to the actual
+    * width but this can be changed by setting chart.width.
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.GetWidth = function (obj)
+    {        
+        return obj.canvas.width;
+    }
+
+
+    /**
+    * Clears all the custom event listeners that have been registered
+    * 
+    * @param    string Limits the clearing to this object ID
+    */
+    RGraph.RemoveAllCustomEventListeners = function ()
+    {
+        var id = arguments[0];
+
+        if (id && RGraph.events[id]) {
+            RGraph.events[id] = [];
+        } else {
+            RGraph.events = [];
+        }
+    }
+
+
+    /**
+    * Clears a particular custom event listener
+    * 
+    * @param object obj The graph object
+    * @param number i   This is the index that is return by .AddCustomEventListener()
+    */
+    RGraph.RemoveCustomEventListener = function (obj, i)
+    {
+        if (   typeof(RGraph.events) == 'object'
+            && typeof(RGraph.events[obj.id]) == 'object'
+            && typeof(RGraph.events[obj.id][i]) == 'object') {
+            
+            RGraph.events[obj.id][i] = null;
+        }
+    }
+
+
+    /**
+    * This draws the background
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.DrawBackgroundImage = function (obj)
+    {
+        var img = new Image();
+        img.__object__  = obj;
+        img.__canvas__  = obj.canvas;
+        img.__context__ = obj.context;
+        img.src         = obj.Get('chart.background.image');
+        
+        obj.__background_image__ = img;
+
+        img.onload = function ()
+        {
+            var obj = this.__object__;
+            
+            var gutterLeft   = obj.Get('chart.gutter.left');
+            var gutterRight  = obj.Get('chart.gutter.right');
+            var gutterTop    = obj.Get('chart.gutter.top');
+            var gutterBottom = obj.Get('chart.gutter.bottom');
+
+            RGraph.Clear(obj.canvas);
+
+            obj.context.drawImage(this,gutterLeft,gutterTop, RGraph.GetWidth(obj) - gutterLeft - gutterRight, RGraph.GetHeight(obj) - gutterTop - gutterBottom);
+
+            // Draw the graph
+            obj.Draw();
+        }
+        
+        img.onerror = function ()
+        {
+            var obj = this.__canvas__.__object__;
+
+            // Show an error alert
+            alert('[ERROR] There was an error with the background image that you specified: ' + img.src);
+            
+            // Draw the graph, because the onload doesn't fire, and thus that won't draw the chart
+            obj.Draw();
+        }
+    }
+
+
+    /**
+    * This resets the canvas. Keep in mind that any translate() that has been performed will also be reset.
+    * 
+    * @param object canvas The canvas
+    */
+    RGraph.Reset = function (canvas)
+    {
+        canvas.width = canvas.width;
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.resizing.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.resizing.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.resizing.js	(revision 225)
@@ -0,0 +1,471 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+
+
+    /**
+    * This is an array of CSS properties that should be preserved when adding theplaceholder DIV
+    */
+    __rgraph_resizing_preserve_css_properties__ = [];
+
+    /**
+    * This function can be used to allow resizing
+    * 
+    * @param object obj Your graph object
+    */
+    RGraph.AllowResizing = function (obj)
+    {
+        if (obj.Get('chart.resizable')) {
+            var canvas  = obj.canvas;
+            var context = obj.context;
+            var resizeHandle = 15;
+            RGraph.Resizing.canvas = canvas;
+            RGraph.Resizing.placeHolders = [];
+            
+            /**
+            * Add the original width and height to the canvas
+            */
+            if (!canvas.__original_width__ && !canvas.__original_height__) {
+                canvas.__original_width__  = canvas.width;
+                canvas.__original_height__ = canvas.height;
+            }
+
+
+            var adjustX = (typeof(obj.Get('chart.resize.handle.adjust')) == 'object' && typeof(obj.Get('chart.resize.handle.adjust')[0]) == 'number' ? obj.Get('chart.resize.handle.adjust')[0] : 0);
+            var adjustY = (typeof(obj.Get('chart.resize.handle.adjust')) == 'object' && typeof(obj.Get('chart.resize.handle.adjust')[1]) == 'number' ? obj.Get('chart.resize.handle.adjust')[1] : 0);
+
+
+            /**
+            * Draw the resize handle
+            */
+            var textWidth = context.measureText('Reset').width + 2;
+
+
+            // Draw the white background for the resize handle - OPTIONAL default is rgba(0,0,0,0);
+            var bgcolor = obj.Get('chart.resize.handle.background');
+            
+            if (!bgcolor) {
+                bgcolor = 'rgba(0,0,0,0)';
+            }
+
+            context.beginPath();
+                context.fillStyle = bgcolor;
+                context.moveTo(canvas.width - resizeHandle - resizeHandle + adjustX, canvas.height - resizeHandle);
+                context.fillRect(canvas.width - resizeHandle - resizeHandle + adjustX, canvas.height - resizeHandle + adjustY, 2 * resizeHandle, resizeHandle);
+            context.fill();
+
+
+            obj.context.beginPath();
+                obj.context.strokeStyle = 'gray';
+                obj.context.fillStyle = 'rgba(0,0,0,0)';
+                obj.context.lineWidth = 1;
+                obj.context.fillRect(obj.canvas.width - resizeHandle + adjustX, obj.canvas.height - resizeHandle - 2 + adjustY, resizeHandle, resizeHandle + 2);
+                obj.context.fillRect(obj.canvas.width - resizeHandle - textWidth + adjustX, obj.canvas.height - resizeHandle + adjustY, resizeHandle + textWidth, resizeHandle + 2);
+
+
+                // Draw the arrows
+                
+                    // Vertical line
+                    obj.context.moveTo(obj.canvas.width - (resizeHandle / 2) + adjustX, obj.canvas.height - resizeHandle + adjustY);
+                    obj.context.lineTo(obj.canvas.width - (resizeHandle / 2) + adjustX, obj.canvas.height + adjustY);
+
+
+                    // Horizontal line
+                    obj.context.moveTo(obj.canvas.width + adjustX, obj.canvas.height - (resizeHandle / 2) + adjustY);
+                    obj.context.lineTo(obj.canvas.width - resizeHandle + adjustX, obj.canvas.height - (resizeHandle / 2) + adjustY);
+                
+            context.fill();
+            context.stroke();
+
+
+            // Top arrow head
+            context.fillStyle = 'gray';
+            context.beginPath();
+                context.moveTo(canvas.width - (resizeHandle / 2) + adjustX, canvas.height - resizeHandle + adjustY);
+                context.lineTo(canvas.width - (resizeHandle / 2) + 3 + adjustX, canvas.height - resizeHandle + 3 + adjustY);
+                context.lineTo(canvas.width - (resizeHandle / 2) - 3 + adjustX, canvas.height - resizeHandle + 3 + adjustY);
+            context.closePath();
+            context.fill();
+
+            // Bottom arrow head
+            context.beginPath();
+                context.moveTo(canvas.width - (resizeHandle / 2) + adjustX, canvas.height + adjustY);
+                context.lineTo(canvas.width - (resizeHandle / 2) + 3 + adjustX, canvas.height - 3 + adjustY);
+                context.lineTo(canvas.width - (resizeHandle / 2) - 3 + adjustX, canvas.height - 3 + adjustY);
+            context.closePath();
+            context.fill();
+
+            // Left arrow head
+            context.beginPath();
+                context.moveTo(canvas.width - resizeHandle + adjustX, canvas.height - (resizeHandle / 2) + adjustY);
+                context.lineTo(canvas.width - resizeHandle + 3 + adjustX, canvas.height - (resizeHandle / 2) + 3 + adjustY);
+                context.lineTo(canvas.width - resizeHandle + 3 + adjustX, canvas.height - (resizeHandle / 2) - 3 + adjustY);
+            context.closePath();
+            context.fill();
+
+            // Right arrow head
+            context.beginPath();
+                context.moveTo(canvas.width + adjustX, canvas.height - (resizeHandle / 2) + adjustY);
+                context.lineTo(canvas.width - 3 + adjustX, canvas.height - (resizeHandle / 2) + 3 + adjustY);
+                context.lineTo(canvas.width  - 3 + adjustX, canvas.height - (resizeHandle / 2) - 3 + adjustY);
+            context.closePath();
+            context.fill();
+            
+            // Square at the centre of the arrows
+            context.beginPath();
+                context.fillStyle = 'white';
+                context.moveTo(canvas.width + adjustX, canvas.height - (resizeHandle / 2) + adjustY);
+                context.strokeRect(canvas.width - (resizeHandle / 2) - 2 + adjustX, canvas.height - (resizeHandle / 2) - 2 + adjustY, 4, 4);
+                context.fillRect(canvas.width - (resizeHandle / 2) - 2 + adjustX, canvas.height - (resizeHandle / 2) - 2 + adjustY, 4, 4);
+            context.fill();
+            context.stroke();
+
+
+            // Draw the "Reset" button
+            context.beginPath();
+                context.fillStyle = 'gray';
+                context.moveTo(canvas.width - resizeHandle - 3 + adjustX, canvas.height - resizeHandle / 2 + adjustY);
+                context.lineTo(canvas.width - resizeHandle - resizeHandle + adjustX, canvas.height - (resizeHandle / 2) + adjustY);
+                context.lineTo(canvas.width - resizeHandle - resizeHandle + 2 + adjustX, canvas.height - (resizeHandle / 2) - 2 + adjustY);
+                context.lineTo(canvas.width - resizeHandle - resizeHandle + 2 + adjustX, canvas.height - (resizeHandle / 2) + 2 + adjustY);
+                context.lineTo(canvas.width - resizeHandle - resizeHandle + adjustX, canvas.height - (resizeHandle / 2) + adjustY);
+            context.stroke();
+            context.fill();
+
+            context.beginPath();
+                context.moveTo(canvas.width - resizeHandle - resizeHandle - 1 + adjustX, canvas.height - (resizeHandle / 2) - 3 + adjustY);
+                context.lineTo(canvas.width - resizeHandle - resizeHandle - 1 + adjustX, canvas.height - (resizeHandle / 2) + 3 + adjustY);
+            context.stroke();
+            context.fill();
+            
+
+
+            var window_onmousemove = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+                
+                var canvas    = RGraph.Resizing.canvas;
+                var newWidth  = RGraph.Resizing.originalw - (RGraph.Resizing.originalx - e.pageX);// - 5
+                var newHeight = RGraph.Resizing.originalh - (RGraph.Resizing.originaly - e.pageY);// - 5
+
+                if (RGraph.Resizing.mousedown) {
+                    if (newWidth > (canvas.__original_width__ / 2)) RGraph.Resizing.div.style.width = newWidth + 'px';
+                    if (newHeight > (canvas.__original_height__ / 2)) RGraph.Resizing.div.style.height = newHeight + 'px';
+                    
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresize');
+                }
+            }
+            window.addEventListener('mousemove', window_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'window_mousemove', window_onmousemove);
+
+            /**
+            * The window onmouseup function
+            */
+            var MouseupFunc = function (e)
+            {
+                if (!RGraph.Resizing || !RGraph.Resizing.div || !RGraph.Resizing.mousedown) {
+                    return;
+                }
+
+                if (RGraph.Resizing.div) {
+
+                    var div    = RGraph.Resizing.div;
+                    var canvas = div.__canvas__;
+                    var coords = RGraph.getCanvasXY(div.__canvas__);
+
+                    var parentNode = canvas.parentNode;
+
+                    if (canvas.style.position != 'absolute') {
+                        // Create a DIV to go in the canvases place
+                        var placeHolderDIV = document.createElement('DIV');
+                            placeHolderDIV.style.width = RGraph.Resizing.originalw + 'px';
+                            placeHolderDIV.style.height = RGraph.Resizing.originalh + 'px';
+                            //placeHolderDIV.style.backgroundColor = 'red';
+                            placeHolderDIV.style.display = 'inline-block'; // Added 5th Nov 2010
+                            placeHolderDIV.style.position = canvas.style.position;
+                            placeHolderDIV.style.left     = canvas.style.left;
+                            placeHolderDIV.style.top      = canvas.style.top;
+                            placeHolderDIV.style.cssFloat = canvas.style.cssFloat;
+
+                        parentNode.insertBefore(placeHolderDIV, canvas);
+                    }
+
+
+                    // Now set the canvas to be positioned absolutely
+                    canvas.style.backgroundColor = 'white';
+                    canvas.style.position        = 'absolute';
+                    canvas.style.border = '1px dashed gray';
+                    canvas.style.left            = (RGraph.Resizing.originalCanvasX  - 1) + 'px';
+                    canvas.style.top             = (RGraph.Resizing.originalCanvasY - 1) + 'px';
+
+                    canvas.width = parseInt(div.style.width);
+                    canvas.height = parseInt(div.style.height);
+                    
+                
+
+                    /**
+                    * Fire the onresize event
+                    */
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresizebeforedraw');
+
+                    canvas.__object__.Draw();
+
+                    // Get rid of transparent semi-opaque DIV
+                    RGraph.Resizing.mousedown = false;
+                    div.style.display = 'none';
+                    document.body.removeChild(div);
+                }
+
+                /**
+                * If there is zoom enabled in thumbnail mode, lose the zoom image
+                */
+                if (RGraph.Registry.Get('chart.zoomed.div') || RGraph.Registry.Get('chart.zoomed.img')) {
+                    RGraph.Registry.Set('chart.zoomed.div', null);
+                    RGraph.Registry.Set('chart.zoomed.img', null);
+                }
+
+                /**
+                * Fire the onresize event
+                */
+                RGraph.FireCustomEvent(canvas.__object__, 'onresizeend');
+            }
+
+
+            var window_onmouseup = MouseupFunc;
+            window.addEventListener('onmouseup', window_onmouseup, false);
+            RGraph.AddEventListener(canvas.id, 'window_mouseup', window_onmouseup);
+
+
+            var canvas_onmousemove = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+                
+                var coords  = RGraph.getMouseXY(e);
+                var canvas  = e.target;
+                var context = canvas.getContext('2d');
+                //var orig_cursor = canvas.style.cursor; // Used for playing well with tooltips
+
+                RGraph.Resizing.title = canvas.title;
+                
+                if (   (coords[0] > (canvas.width - resizeHandle)
+                    && coords[0] < canvas.width
+                    && coords[1] > (canvas.height - resizeHandle)
+                    && coords[1] < canvas.height)) {
+                        
+                        canvas.style.cursor = 'move';
+                        
+                        if (navigator.userAgent.indexOf('Chrome') > 0 || document.all) {
+                            canvas.title = 'Resize the graph';
+                        }
+
+                } else if (   coords[0] > (canvas.width - resizeHandle - resizeHandle)
+                           && coords[0] < canvas.width - resizeHandle
+                           && coords[1] > (canvas.height - resizeHandle)
+                           && coords[1] < canvas.height) {
+                    
+                    canvas.style.cursor = 'pointer';
+    
+                    if (navigator.userAgent.indexOf('Chrome') > 0 || document.all) {
+                        canvas.title = 'Reset graph to original size';
+                    }
+
+                } else {
+
+                    // orig_cursor
+                    canvas.style.cursor = 'default';
+                    canvas.title = '';
+                }
+            }
+            canvas.addEventListener('mousemove', canvas_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'mousemove', canvas_onmousemove);
+
+
+
+            var canvas_onmouseout = function (e)
+            {
+                e.target.style.cursor = 'default';
+                e.target.title        = '';
+            }
+            canvas.addEventListener('mouseout', canvas_onmouseout, false);
+            RGraph.AddEventListener(canvas.id, 'mouseout', canvas_onmouseout);
+
+
+
+            var canvas_onmousedown = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var coords = RGraph.getMouseXY(e);
+                var canvasCoords = RGraph.getCanvasXY(e.target);
+                var canvas = e.target;
+
+                if (   coords[0] > (obj.canvas.width - resizeHandle)
+                    && coords[0] < obj.canvas.width
+                    && coords[1] > (obj.canvas.height - resizeHandle)
+                    && coords[1] < obj.canvas.height) {
+                    
+                    RGraph.FireCustomEvent(obj, 'onresizebegin');
+                    
+                    // Save the existing border
+                    if (canvas.__original_css_border__ == null) {
+                        canvas.__original_css_border__ = canvas.style.border;
+                    }
+
+                    RGraph.Resizing.mousedown = true;
+
+
+                    /**
+                    * Create the semi-opaque DIV
+                    */
+
+                    var div = document.createElement('DIV');
+                    div.style.position = 'absolute';
+                    div.style.left     = canvasCoords[0] + 'px';
+                    div.style.top      = canvasCoords[1] + 'px';
+                    div.style.width    = canvas.width + 'px';
+                    div.style.height   = canvas.height + 'px';
+                    div.style.border   = '1px dotted black';
+                    div.style.backgroundColor = 'gray';
+                    div.style.opacity  = 0.5;
+                    div.__canvas__ = e.target;
+
+                    document.body.appendChild(div);
+                    RGraph.Resizing.div = div;
+                    RGraph.Resizing.placeHolders.push(div);
+                    
+                    // Hide the previous resize indicator layers. This is only necessary it seems for the Meter chart
+                    for (var i=0; i<(RGraph.Resizing.placeHolders.length - 1); ++i) {
+                        RGraph.Resizing.placeHolders[i].style.display = 'none';
+                    }
+
+                    // This is a repetition of the window.onmouseup function (No need to use DOM2 here)
+                    div.onmouseup = function (e)
+                    {
+                        MouseupFunc(e);
+                    }
+
+                    
+                    // No need to use DOM2 here
+                    RGraph.Resizing.div.onmouseover = function (e)
+                    {
+                        e = RGraph.FixEventObject(e);
+                        e.stopPropagation();
+                    }
+    
+                    // The mouse
+                    RGraph.Resizing.originalx = e.pageX;
+                    RGraph.Resizing.originaly = e.pageY;
+                    
+                    RGraph.Resizing.originalw = obj.canvas.width;
+                    RGraph.Resizing.originalh = obj.canvas.height;
+                    
+                    RGraph.Resizing.originalCanvasX = RGraph.getCanvasXY(obj.canvas)[0];
+                    RGraph.Resizing.originalCanvasY = RGraph.getCanvasXY(obj.canvas)[1];
+                }
+
+
+                /**
+                * This facilitates the reset button
+                */
+                if (   coords[0] > (canvas.width - resizeHandle - resizeHandle)
+                    && coords[0] < canvas.width - resizeHandle
+                    && coords[1] > (canvas.height - resizeHandle)
+                    && coords[1] < canvas.height) {
+                    
+                    /**
+                    * Fire the onresizebegin event
+                    */
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresizebegin');
+
+                    // Restore the original width and height
+                    canvas.width = canvas.__original_width__;
+                    canvas.height = canvas.__original_height__;
+
+                    // Lose the border
+                    canvas.style.border = canvas.__original_css_border__;
+                    //canvas.__original_css_border__ = null;
+                    
+                    // Add 1 pixel to the top/left because the border is going
+                    canvas.style.left = (parseInt(canvas.style.left)) + 'px';
+                    canvas.style.top  = (parseInt(canvas.style.top)) + 'px';
+
+
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresizebeforedraw');
+
+                    // Redraw the canvas
+                    canvas.__object__.Draw();
+                    
+                    // Set the width and height on the DIV
+                    if (RGraph.Resizing.div) {
+                        RGraph.Resizing.div.style.width  = canvas.__original_width__ + 'px';
+                        RGraph.Resizing.div.style.height = canvas.__original_height__ + 'px';
+                    }
+
+                    /**
+                    * Fire the resize event
+                    */
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresize');
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresizeend');
+                }
+            }
+            canvas.addEventListener('mousedown', canvas_onmousedown, false);
+            RGraph.AddEventListener(canvas.id, 'mousedown', canvas_onmousedown);
+
+
+            /**
+            * This function facilitates the reset button
+            * 
+            * NOTE: 31st December 2010 - doesn't appear to be being used any more
+            */
+
+            /*
+            canvas.onclick = function (e)
+            {
+                var coords = RGraph.getMouseXY(e);
+                var canvas = e.target;
+
+                if (   coords[0] > (canvas.width - resizeHandle - resizeHandle)
+                    && coords[0] < canvas.width - resizeHandle
+                    && coords[1] > (canvas.height - resizeHandle)
+                    && coords[1] < canvas.height) {
+
+                    // Restore the original width and height
+                    canvas.width = canvas.__original_width__;
+                    canvas.height = canvas.__original_height__;
+
+                    // Lose the border
+                    canvas.style.border = '';
+                    
+                    // Add 1 pixel to the top/left because the border is going
+                    canvas.style.left = (parseInt(canvas.style.left) + 1) + 'px';
+                    canvas.style.top  = (parseInt(canvas.style.top) + 1) + 'px';
+                    
+                    // Fire the onresizebeforedraw event
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresizebeforedraw');
+
+                    // Redraw the canvas
+                    canvas.__object__.Draw();
+                    
+                    // Set the width and height on the DIV
+                    RGraph.Resizing.div.style.width  = canvas.__original_width__ + 'px';
+                    RGraph.Resizing.div.style.height = canvas.__original_height__ + 'px';
+                    
+                    // Fire the resize event
+                    RGraph.FireCustomEvent(canvas.__object__, 'onresize');
+                }
+            }
+            */
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.tooltips.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.tooltips.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.tooltips.js	(revision 225)
@@ -0,0 +1,514 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+    
+    /**
+    * This is used in two functions, hence it's here
+    */
+    RGraph.tooltips = {};
+    RGraph.tooltips.padding   = '3px';
+    RGraph.tooltips.font_face = 'Tahoma';
+    RGraph.tooltips.font_size = '10pt';
+
+
+    /**
+    * Shows a tooltip next to the mouse pointer
+    * 
+    * @param canvas object The canvas element object
+    * @param text   string The tooltip text
+    * @param int     x      The X position that the tooltip should appear at. Combined with the canvases offsetLeft
+    *                       gives the absolute X position
+    * @param int     y      The Y position the tooltip should appear at. Combined with the canvases offsetTop
+    *                       gives the absolute Y position
+    * @param int     idx    The index of the tooltip in the graph objects tooltip array
+    */
+    RGraph.Tooltip = function (canvas, text, x, y, idx)
+    {
+        /**
+        * chart.tooltip.override allows you to totally take control of rendering the tooltip yourself
+        */
+        if (typeof(canvas.__object__.Get('chart.tooltips.override')) == 'function') {
+            return canvas.__object__.Get('chart.tooltips.override')(canvas, text, x, y, idx);
+        }
+
+        /**
+        * This facilitates the "id:xxx" format
+        */
+        text = RGraph.getTooltipText(text);
+
+        /**
+        * First clear any exising timers
+        */
+        var timers = RGraph.Registry.Get('chart.tooltip.timers');
+
+        if (timers && timers.length) {
+            for (i=0; i<timers.length; ++i) {
+                clearTimeout(timers[i]);
+            }
+        }
+        RGraph.Registry.Set('chart.tooltip.timers', []);
+
+        /**
+        * Hide the context menu if it's currently shown
+        */
+        if (canvas.__object__.Get('chart.contextmenu')) {
+            RGraph.HideContext();
+        }
+        // Redraw the canvas?
+        if (canvas.__object__.Get('chart.tooltips.highlight')) {
+            RGraph.Redraw(canvas.id);
+        }
+
+        var effect = canvas.__object__.Get('chart.tooltips.effect').toLowerCase();
+
+        if (effect == 'snap' && RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__canvas__.id == canvas.id) {
+
+            if (   canvas.__object__.type == 'line'
+                || canvas.__object__.type == 'radar'
+                || canvas.__object__.type == 'scatter'
+                || canvas.__object__.type == 'rscatter'
+                ) {
+
+                var tooltipObj = RGraph.Registry.Get('chart.tooltip');
+                
+        
+                tooltipObj.style.width  = null;
+                tooltipObj.style.height = null;
+        
+                tooltipObj.innerHTML = text;
+                tooltipObj.__text__  = text;
+        
+                /**
+                * Now that the new content has been set, re-set the width & height
+                */
+                RGraph.Registry.Get('chart.tooltip').style.width  = RGraph.getTooltipWidth(text, canvas.__object__) + 'px';
+                RGraph.Registry.Get('chart.tooltip').style.height = RGraph.Registry.Get('chart.tooltip').offsetHeight + 'px';
+                
+            
+                var currentx = parseInt(RGraph.Registry.Get('chart.tooltip').style.left);
+                var currenty = parseInt(RGraph.Registry.Get('chart.tooltip').style.top);
+            
+                var diffx = x - currentx - ((x + RGraph.Registry.Get('chart.tooltip').offsetWidth) > document.body.offsetWidth ? RGraph.Registry.Get('chart.tooltip').offsetWidth : 0);
+                var diffy = y - currenty - RGraph.Registry.Get('chart.tooltip').offsetHeight;
+            
+                // Position the tooltip
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.2)) + 'px"', 25);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.4)) + 'px"', 50);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.6)) + 'px"', 75);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 0.8)) + 'px"', 100);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.left = "' + (currentx + (diffx * 1.0)) + 'px"', 125);
+            
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.2)) + 'px"', 25);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.4)) + 'px"', 50);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.6)) + 'px"', 75);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 0.8)) + 'px"', 100);
+                setTimeout('RGraph.Registry.Get("chart.tooltip").style.top = "' + (currenty + (diffy * 1.0)) + 'px"', 125);
+            
+            } else {
+        
+                alert('[TOOLTIPS] The "snap" effect is only supported on the Line, Rscatter, Scatter and Radar charts (tried to use it with type: ' + canvas.__object__.type);
+            }
+
+            /**
+            * Fire the tooltip event
+            */
+            RGraph.FireCustomEvent(canvas.__object__, 'ontooltip');
+
+            return;
+        }
+
+        /**
+        * Hide any currently shown tooltip
+        */
+        RGraph.HideTooltip();
+
+
+        /**
+        * Show a tool tip
+        */
+        var tooltipObj  = document.createElement('DIV');
+        tooltipObj.className             = canvas.__object__.Get('chart.tooltips.css.class');
+        tooltipObj.style.display         = 'none';
+        tooltipObj.style.position        = 'absolute';
+        tooltipObj.style.left            = 0;
+        tooltipObj.style.top             = 0;
+        tooltipObj.style.backgroundColor = 'rgba(255,255,239,0.9)';
+        tooltipObj.style.color           = 'black';
+        if (!document.all) tooltipObj.style.border = '';
+        tooltipObj.style.visibility      = 'visible';
+        tooltipObj.style.paddingLeft     = RGraph.tooltips.padding;
+        tooltipObj.style.paddingRight    = RGraph.tooltips.padding;
+        tooltipObj.style.fontFamily      = RGraph.tooltips.font_face;
+        tooltipObj.style.fontSize        = RGraph.tooltips.font_size;
+        tooltipObj.style.zIndex          = 3;
+        tooltipObj.style.borderRadius       = '5px';
+        tooltipObj.style.MozBorderRadius    = '5px';
+        tooltipObj.style.WebkitBorderRadius = '5px';
+        tooltipObj.style.WebkitBoxShadow    = 'rgba(96,96,96,0.5) 0 0 15px';
+        tooltipObj.style.MozBoxShadow       = 'rgba(96,96,96,0.5) 0 0 15px';
+        tooltipObj.style.boxShadow          = 'rgba(96,96,96,0.5) 0 0 15px';
+        tooltipObj.style.filter             = 'progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=135)';
+        tooltipObj.style.opacity            = 0;
+        tooltipObj.style.overflow           = 'hidden';
+        tooltipObj.innerHTML                = text;
+        tooltipObj.__text__                 = text; // This is set because the innerHTML can change when it's set
+        tooltipObj.__canvas__               = canvas;
+        tooltipObj.style.display            = 'inline';
+        
+        if (typeof(idx) == 'number') {
+            tooltipObj.__index__ = idx;
+            
+            /**
+            * Just for the line chart
+            */
+            if (canvas.__object__.type == 'line') {
+                var index2 = idx;
+                
+                while (index2 >= canvas.__object__.data[0].length) {
+                    index2 -= canvas.__object__.data[0].length;
+                }
+                
+                tooltipObj.__index2__ = index2;
+            }
+        }
+
+        document.body.appendChild(tooltipObj);
+        
+        var width  = tooltipObj.offsetWidth;
+        var height = tooltipObj.offsetHeight;
+
+        if ((y - height - 2) > 0) {
+            y = y - height - 2;
+        } else {
+            y = y + 2;
+        }
+
+        /**
+        * Set the width on the tooltip so it doesn't resize if the window is resized
+        */
+        tooltipObj.style.width = width + 'px';
+        //tooltipObj.style.height = 0; // Initially set the tooltip height to nothing
+
+        /**
+        * If the mouse is towards the right of the browser window and the tooltip would go outside of the window,
+        * move it left
+        */
+        if ( (x + width) > document.body.offsetWidth ) {
+            x = x - width - 7;
+            var placementLeft = true;
+            
+            if (canvas.__object__.Get('chart.tooltips.effect') == 'none') {
+                x = x - 3;
+            }
+
+            tooltipObj.style.left = x + 'px';
+            tooltipObj.style.top  = y + 'px';
+
+        } else {
+            x += 5;
+
+            tooltipObj.style.left = x + 'px';
+            tooltipObj.style.top = y + 'px';
+        }
+
+
+        if (effect == 'expand') {
+
+            tooltipObj.style.left        = (x + (width / 2)) + 'px';
+            tooltipObj.style.top         = (y + (height / 2)) + 'px';
+            leftDelta                    = (width / 2) / 10;
+            topDelta                     = (height / 2) / 10;
+
+            tooltipObj.style.width              = 0;
+            tooltipObj.style.height             = 0;
+            //tooltipObj.style.boxShadow          = '';
+            //tooltipObj.style.MozBoxShadow       = '';
+            //tooltipObj.style.WebkitBoxShadow    = '';
+            //tooltipObj.style.borderRadius       = 0;
+            //tooltipObj.style.MozBorderRadius    = 0;
+            //tooltipObj.style.WebkitBorderRadius = 0;
+            tooltipObj.style.opacity = 1;
+
+            // Progressively move the tooltip to where it should be (the x position)
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) - leftDelta) + 'px' }", 250));
+            
+            // Progressively move the tooltip to where it should be (the Y position)
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) - topDelta) + 'px' }", 250));
+
+            // Progressively grow the tooltip width
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.1) + "px'; }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.2) + "px'; }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.3) + "px'; }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.4) + "px'; }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.5) + "px'; }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.6) + "px'; }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.7) + "px'; }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.8) + "px'; }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 0.9) + "px'; }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + width + "px'; }", 250));
+
+            // Progressively grow the tooltip height
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.1) + "px'; }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.2) + "px'; }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.3) + "px'; }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.4) + "px'; }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.5) + "px'; }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.6) + "px'; }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.7) + "px'; }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.8) + "px'; }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 0.9) + "px'; }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + height + "px'; }", 250));
+            
+            // When the animation is finished, set the tooltip HTML
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').innerHTML = RGraph.Registry.Get('chart.tooltip').__text__; }", 250));
+        
+        } else if (effect == 'contract') {
+
+            tooltipObj.style.left = (x - width) + 'px';
+            tooltipObj.style.top  = (y - (height * 2)) + 'px';
+            tooltipObj.style.cursor = 'pointer';
+
+            leftDelta = width / 10;
+            topDelta  = height / 10;
+
+            tooltipObj.style.width  = (width * 5) + 'px';
+            tooltipObj.style.height = (height * 5) + 'px';
+
+            tooltipObj.style.opacity = 0.2;
+
+            // Progressively move the tooltip to where it should be (the x position)
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = (parseInt(RGraph.Registry.Get('chart.tooltip').style.left) + leftDelta) + 'px' }", 250));
+
+            // Progressively move the tooltip to where it should be (the Y position)
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = (parseInt(RGraph.Registry.Get('chart.tooltip').style.top) + (topDelta*2)) + 'px' }", 250));
+
+            // Progressively shrink the tooltip width
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 5.5) + "px'; }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 5.0) + "px'; }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 4.5) + "px'; }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 4.0) + "px'; }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 3.5) + "px'; }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 3.0) + "px'; }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 2.5) + "px'; }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 2.0) + "px'; }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + (width * 1.5) + "px'; }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.width = '" + width + "px'; }", 250));
+
+            // Progressively shrink the tooltip height
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 5.5) + "px'; }", 25));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 5.0) + "px'; }", 50));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 4.5) + "px'; }", 75));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 4.0) + "px'; }", 100));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 3.5) + "px'; }", 125));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 3.0) + "px'; }", 150));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 2.5) + "px'; }", 175));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 2.0) + "px'; }", 200));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + (height * 1.5) + "px'; }", 225));
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.height = '" + height + "px'; }", 250));
+
+            // When the animation is finished, set the tooltip HTML
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').innerHTML = RGraph.Registry.Get('chart.tooltip').__text__; }", 250));
+
+            /**
+            * This resets the pointer
+            */
+            RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.cursor = 'default'; }", 275));
+
+        } else if (effect == 'snap') {
+
+            /*******************************************************
+            * Move the tooltip
+            *******************************************************/
+            for (var i=1; i<=10; ++i) {
+                RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.left = '" + (x * 0.1 * i) + "px'; }", 15 * i));
+                RGraph.Registry.Get('chart.tooltip.timers').push(setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.top = '" + (y * 0.1 * i) + "px'; }", 15 * i));
+            }
+
+            tooltipObj.style.left = 0 - tooltipObj.offsetWidth + 'px';
+            tooltipObj.style.top  = 0 - tooltipObj.offsetHeight + 'px';
+
+        } else if (effect != 'fade' && effect != 'expand' && effect != 'none' && effect != 'snap' && effect != 'contract') {
+            alert('[COMMON] Unknown tooltip effect: ' + effect);
+        }
+
+        if (effect != 'none') {
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.1; }", 25);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.2; }", 50);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.3; }", 75);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.4; }", 100);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.5; }", 125);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.6; }", 150);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.7; }", 175);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.8; }", 200);
+            setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 0.9; }", 225);
+        }
+
+        setTimeout("if (RGraph.Registry.Get('chart.tooltip')) { RGraph.Registry.Get('chart.tooltip').style.opacity = 1;}", effect == 'none' ? 50 : 250);
+
+        /**
+        * If the tooltip it self is clicked, cancel it
+        */
+        tooltipObj.onmousedown = function (e)
+        {
+            e = RGraph.FixEventObject(e)
+            e.stopPropagation();
+        }
+        
+        tooltipObj.onclick = function (e)
+        {
+            if (e.button == 0) {
+                e = RGraph.FixEventObject(e);
+                e.stopPropagation();
+            }
+        }
+
+        /**
+        * Install the function for hiding the tooltip.
+        */
+        document.body.onmousedown = function (event)
+        {
+            var tooltip = RGraph.Registry.Get('chart.tooltip');
+
+            if (tooltip) {
+                RGraph.HideTooltip();
+
+                // Redraw if highlighting is enabled
+                if (tooltip.__canvas__.__object__.Get('chart.tooltips.highlight')) {
+                    RGraph.Redraw();
+                }
+            }
+        }
+
+        /**
+        * If the window is resized, hide the tooltip
+        */
+        window.onresize = function ()
+        {
+            var tooltip = RGraph.Registry.Get('chart.tooltip');
+
+            if (tooltip) {
+                tooltip.parentNode.removeChild(tooltip);
+                tooltip.style.display = 'none';                
+                tooltip.style.visibility = 'hidden';
+                RGraph.Registry.Set('chart.tooltip', null);
+
+                // Redraw the graph if necessary
+                if (canvas.__object__.Get('chart.tooltips.highlight')) {
+                    RGraph.Clear(canvas);
+                    canvas.__object__.Draw();
+                }
+            }
+        }
+        
+        /**
+        * Keep a reference to the tooltip
+        */
+        RGraph.Registry.Set('chart.tooltip', tooltipObj);
+
+        /**
+        * Fire the tooltip event
+        */
+        RGraph.FireCustomEvent(canvas.__object__, 'ontooltip');
+    }
+    
+    
+    /**
+    * 
+    */
+    RGraph.getTooltipText = function (text)
+    {
+        var result = /^id:(.*)/.exec(text);
+
+        if (result && result[1] && document.getElementById(result[1])) {
+            text = document.getElementById(result[1]).innerHTML;
+        }
+        
+        return text;
+    }
+
+
+    /**
+    * 
+    */
+    RGraph.getTooltipWidth = function (text, obj)
+    {
+        var div = document.createElement('DIV');
+            div.className             = obj.Get('chart.tooltips.css.class');
+            div.style.paddingLeft     = RGraph.tooltips.padding;
+            div.style.paddingRight    = RGraph.tooltips.padding;
+            div.style.fontFamily      = RGraph.tooltips.font_face;
+            div.style.fontSize        = RGraph.tooltips.font_size;
+            div.style.visibility      = 'hidden';
+            div.style.position        = 'absolute';
+            div.style.top            = '300px';
+            div.style.left             = 0;
+            div.style.display         = 'inline';
+            div.innerHTML             = RGraph.getTooltipText(text);
+        document.body.appendChild(div);
+
+        return div.offsetWidth;
+    }
+
+
+    /**
+    * Hides the currently shown tooltip
+    */
+    RGraph.HideTooltip = function ()
+    {
+        var tooltip = RGraph.Registry.Get('chart.tooltip');
+
+        if (tooltip) {
+            tooltip.parentNode.removeChild(tooltip);
+            tooltip.style.display = 'none';                
+            tooltip.style.visibility = 'hidden';
+            RGraph.Registry.Set('chart.tooltip', null);
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.common.zoom.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.common.zoom.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.common.zoom.js	(revision 225)
@@ -0,0 +1,884 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {isRGraph:true,type:'common'};
+
+
+    /**
+    * Installs the event handlers for zooming an area of the graph
+    * 
+    * @param object obj Your graph object
+    */
+    RGraph.ZoomArea = function (obj)
+    {
+        if (obj.Get('chart.zoom.mode') == 'area') {
+
+            var canvas  = obj.canvas;
+            var context = obj.context;
+            
+            obj.canvas.style.cursor = 'crosshair';
+            
+            RGraph.Register(obj);
+
+
+            canvas.onmousedown = function(e)
+            {
+                var canvas = e.target;
+                var coords = RGraph.getMouseXY(e);
+                var obj    = canvas.__object__;
+                    
+                if (RGraph.Registry.Get('chart.zoomed.area.div')) {
+                    RGraph.Registry.Get('chart.zoomed.area.div').style.display = 'none';
+                }
+
+                if (typeof(RGraph.Registry.Get('chart.zoomed.area.divs')) == null) {
+                    RGraph.Registry.Set('chart.zoomed.area.divs', []);
+
+                } else {
+
+                    var divs = RGraph.Registry.Get('chart.zoomed.area.divs');
+                    
+                    if (divs && divs.length) {
+                        for (var i=0; i<divs.length; ++i) {
+                            if (divs[i]) {
+                                divs[i].style.display = 'none';
+                                divs[i] = null;
+                            }
+                        }
+                    }
+                }
+
+                /**
+                * Create the indicator DIV
+                */
+                var canvasXY = RGraph.getCanvasXY(canvas);
+                var areaDiv  = document.createElement('DIV');
+                    areaDiv.__canvas__     = canvas;
+                    areaDiv.style.position = 'absolute';
+                    areaDiv.style.left     = canvasXY[0] + coords[0] + 'px'
+                    areaDiv.style.top      = canvasXY[1] + coords[1] + 'px'
+                    areaDiv.style.width    = 0;
+                    areaDiv.style.height   = 0;
+                    areaDiv.style.border   = '1px solid black';
+                    areaDiv.style.backgroundColor = 'rgba(220,220,220,0.3)';
+                    areaDiv.style.display = 'none';
+
+                    areaDiv.onmouseover = function (e)
+                    {
+                        setTimeout(function () {e.target.style.opacity = 0.8;}, 50);
+                        setTimeout(function () {e.target.style.opacity = 0.6;}, 100);
+                        setTimeout(function () {e.target.style.opacity = 0.4;}, 150);
+                        setTimeout(function () {e.target.style.opacity = 0.2;}, 200);
+                        setTimeout(function () {e.target.style.opacity = 0;}, 250);
+                        setTimeout(function () {e.target.style.display = 'none';}, 300);
+                        setTimeout(function () {e.target = null;}, 350);
+                    }
+
+                document.body.appendChild(areaDiv);
+
+
+                RGraph.Registry.Set('chart.zoomed.area.div', null);
+                RGraph.Registry.Set('chart.zoomed.area.mousedown', coords);
+                RGraph.Registry.Set('chart.zoomed.area.areadiv', areaDiv);
+            }
+
+
+            var window_onmousemove = function (e)
+            {
+                var startCoords = RGraph.Registry.Get('chart.zoomed.area.mousedown');
+                
+                if (startCoords && startCoords.length) {
+
+                    var coords      = RGraph.getMouseXY(e);
+                    var canvasXY    = RGraph.getCanvasXY(e.target);
+                    var obj = e.target.__object__;
+                    var context = obj.context;
+                    var canvas  = obj.canvas;
+                    var startx  = startCoords[0];
+                    var starty  = startCoords[1];
+                    var endx    = coords[0];
+                    var endy    = coords[1];
+                    var width   = endx - startx;
+                    var height  = endy - starty;
+                    var areaDiv = RGraph.Registry.Get('chart.zoomed.area.areadiv');
+                    
+                    if (width >= 0 && height >= 0) {
+                    
+                        if (width > 5 && height > 5) {
+                            areaDiv.style.width = (width - 15) + 'px';
+                            areaDiv.style.height = (height - 15) + 'px';
+                            areaDiv.style.display = 'inline';
+                        } else {
+                            areaDiv.style.display = 'none';
+                        }
+
+                    } else if (width < -5 || height < -5) {
+
+                        var canvasCoords = RGraph.getCanvasXY(canvas);
+                        var noticeDiv = document.createElement('DIV');
+
+                        noticeDiv.style.position = 'absolute';
+                        noticeDiv.style.top  = 0;
+                        noticeDiv.style.left = 0;
+                        noticeDiv.style.zIndex = 99;
+                        noticeDiv.style.border = '1px dashed black';
+                        noticeDiv.style.backgroundColor = '#ffc1c1';
+                        noticeDiv.style.MozBoxShadow = '0 0 5px #999';
+                        noticeDiv.style.WebkitBoxShadow = '0 0 5px #999';
+                        noticeDiv.style.boxShadow = '0 0 5px #999';
+                        noticeDiv.style.padding = '2px';
+                        noticeDiv.innerHTML = 'Zoom goes right and down';
+                        document.body.appendChild(noticeDiv);
+
+                        // Reposition the warning
+                        noticeDiv.style.top  = canvasCoords[1] + startCoords[1] - noticeDiv.offsetHeight + 'px';
+                        noticeDiv.style.left = canvasCoords[0] + startCoords[0] - (noticeDiv.offsetWidth / 2) + 'px';
+                        noticeDiv.style.width = noticeDiv.offsetWidth + 'px';
+                        
+                        setTimeout(function () {noticeDiv.style.opacity = 0.8;}, 2100);
+                        setTimeout(function () {noticeDiv.style.opacity = 0.6;}, 2200);
+                        setTimeout(function () {noticeDiv.style.opacity = 0.4;}, 2300);
+                        setTimeout(function () {noticeDiv.style.opacity = 0.2;}, 2400);
+                        setTimeout(function () {noticeDiv.style.display = 'none';}, 2500);
+                        setTimeout(function () {noticeDiv = null;}, 2600);
+                    }
+                }
+            }
+            window.addEventListener('mousemove', window_onmousemove, false);
+            RGraph.AddEventListener(canvas.id, 'window_mousemove', window_onmousemove);
+
+
+            canvas.onmouseup = function (e)
+            {
+                RGraph.FixEventObject(e);
+
+                var startCoords = RGraph.Registry.Get('chart.zoomed.area.mousedown');
+                var coords      = RGraph.getMouseXY(e);
+
+                // Do the zooming here
+                if (RGraph.Registry.Get('chart.zoomed.area.mousedown')) {
+
+                    //RGraph.Redraw();
+                    
+                    RGraph.Registry.Get('chart.zoomed.area.areadiv').style.display = 'none';
+                    RGraph.Registry.Get('chart.zoomed.area.areadiv').style.left = '-1000px';
+                    RGraph.Registry.Get('chart.zoomed.area.areadiv').style.top = '-1000px';
+                    RGraph.Registry.Set('chart.zoomed.area.areadiv', null);
+
+                    if (coords[0] < startCoords[0] || coords[1] < startCoords[1]) {
+                        RGraph.Registry.Set('chart.zoomed.area.mousedown', false);
+                        return;
+                    }
+
+                    var canvas       = e.target;
+                    var obj          = canvas.__object__;
+                    var context      = obj.context;
+                    var canvasCoords = RGraph.getCanvasXY(e.target);
+                    var coords       = RGraph.getMouseXY(e);
+                    var startCoords  = RGraph.Registry.Get('chart.zoomed.area.mousedown');
+                    var startx       = startCoords[0];
+                    var starty       = startCoords[1];
+                    var endx         = coords[0] - 15;
+                    var endy         = coords[1] - 15;
+                    var width        = Math.abs(endx - startx);
+                    var height       = Math.abs(endy - starty);
+                    var factor       = obj.Get('chart.zoom.factor') - 1;
+                    
+                    var img = document.createElement('IMG');
+                    img.src = canvas.toDataURL();
+                    img.style.position = 'relative';
+                    img.style.left     = (factor + 1) * -1 * startx + 'px';
+                    img.style.top      = (factor + 1) * -1 * starty + 'px';
+                    img.width          = (factor + 1) * canvas.width;
+                    img.height         = (factor + 1) * canvas.height;
+
+                    var div            = document.createElement('DIV');
+                    div.__object__     = obj;
+                    div.className      = 'RGraph_zoomed_area';
+                    div.style.position = 'absolute';
+                    div.style.backgroundColor = 'white';
+                    div.style.cursor = 'move';
+
+                    div.style.top      = e.pageY + 'px';
+                    div.style.left     = e.pageX + 'px';
+                    div.origWidth      = width;
+                    div.origHeight     = height;
+                    div.style.width    = width + 'px';
+                    div.style.height   = height + 'px';
+                    div.style.border   = '1px solid black';                    
+                    div.style.boxShadow          = '0 0 15px black';
+                    div.style.MozBoxShadow       = '0 0 15px black';
+                    div.style.WebkitBoxShadow    = '0 0 15px black';
+                    div.style.overflow           = 'hidden';
+                    div.style.opacity            = 0;
+                    div.style.zIndex             = 99;
+                    
+                    document.body.appendChild(div);
+                    div.appendChild(img);
+
+
+                    /**
+                    * This facilitates expanding the zoomed area once visible (the double click)
+                    */
+                    div.ondblclick = function (event)
+                    {
+                        var event = RGraph.FixEventObject(event);
+                        var img   = event.target;
+                        var div   = event.target.parentNode;
+                        
+                        var current_width  = div.offsetWidth
+                        var current_height = div.offsetHeight
+                        var target_width   = img.offsetWidth;
+                        var target_height  = img.offsetHeight;
+                        var diff_width     = target_width - current_width;
+                        var diff_height    = target_height - current_height;
+                        
+                        var img_offset_left = parseInt(img.offsetLeft);
+                        var img_offset_top  = parseInt(img.offsetTop);
+                        
+                        // Global vars on purpose so the timers can access them
+                        __zoomed_div_style__ = div.style;
+                        __zoomed_img_style__ = img.style;
+                    
+                        setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 50);
+                        setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 100);
+                        setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 150);
+                        setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 200);
+                        setTimeout("__zoomed_div_style__.left = parseInt(__zoomed_div_style__.left) - " + (diff_width * 0.1) + " + 'px'", 250);
+                    
+                        setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 50);
+                        setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 100);
+                        setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 150);
+                        setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 200);
+                        setTimeout("__zoomed_div_style__.top = parseInt(__zoomed_div_style__.top) - " + (diff_height * 0.1) + " + 'px'", 250);
+                    
+                        setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 50);
+                        setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 100);
+                        setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 150);
+                        setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 200);
+                        setTimeout("__zoomed_div_style__.width = parseInt(__zoomed_div_style__.width) + " + (diff_width * 0.2) + " + 'px'", 250);
+                        
+                        setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 50);
+                        setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 100);
+                        setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 150);
+                        setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 200);
+                        setTimeout("__zoomed_div_style__.height = parseInt(__zoomed_div_style__.height) + " + (diff_height * 0.2) + " + 'px'", 250);
+                    
+                        // Move the image within the div
+                        setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.8) + " + 'px'", 50);
+                        setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.6) + " + 'px'", 100);
+                        setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.4) + " + 'px'", 150);
+                        setTimeout("__zoomed_img_style__.left = " + (img_offset_left * 0.2) + " + 'px'", 200);
+                        setTimeout("__zoomed_img_style__.left = 0", 250);
+                        
+                        setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.8) + " + 'px'", 50);
+                        setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.6) + " + 'px'", 100);
+                        setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.4) + " + 'px'", 150);
+                        setTimeout("__zoomed_img_style__.top = " + (img_offset_top * 0.2) + " + 'px'", 200);
+                        setTimeout("__zoomed_img_style__.top = 0", 250);
+                        
+                        div.ondblclick = null;
+                    }
+                    /**
+                    * Make the zoomed bit draggable
+                    */
+                    div.onmousedown = function (e)
+                    {
+                        e = RGraph.FixEventObject(e);
+                            
+                        var div = e.target.parentNode;
+                        var img = div.childNodes[0];
+                        
+                        if (e.button == 0 || e.button == 1  ) {
+                        
+                            div.__offsetx__       = e.offsetX + img.offsetLeft;
+                            div.__offsety__       = e.offsetY + img.offsetTop;
+                        
+                            RGraph.Registry.Set('chart.mousedown', div);
+                            RGraph.Registry.Set('chart.button', 0);
+                        
+                        } else {
+                        
+                            img.__startx__ = e.pageX;
+                            img.__starty__ = e.pageY;
+                            
+                            img.__originalx__ = img.offsetLeft;
+                            img.__originaly__ = img.offsetTop;
+
+                            RGraph.Registry.Set('chart.mousedown', img);
+                            RGraph.Registry.Set('chart.button', 2);
+                            
+                            /**
+                            * Don't show a context menu when the zoomed area is right-clicked on
+                            */
+                            window.oncontextmenu = function (e)
+                            {
+                                e = RGraph.FixEventObject(e);
+
+                                e.stopPropagation();
+                                
+                                // [18th July 2010] Is this reallly necessary?
+                                window.oncontextmenu = function (e)
+                                {
+                                    return true;
+                                }
+                            
+
+                                return false;
+                            }
+                        }
+
+                        e.stopPropagation();
+
+                        return false;
+                    }
+                    
+                    window.onmouseup = function (e)
+                    {
+                        RGraph.Registry.Set('chart.mousedown', false);
+                    }
+                    
+                    window.onmousemove = function (e)
+                    {
+                        if (RGraph.Registry.Get('chart.mousedown') && RGraph.Registry.Get('chart.button') == 0) {
+                            
+                            var div = RGraph.Registry.Get('chart.mousedown');
+                    
+                            var x = e.pageX - div.__offsetx__;
+                            var y = e.pageY - div.__offsety__;
+                    
+                            div.style.left = x + 'px';
+                            div.style.top = y + 'px';
+
+                        } else if (RGraph.Registry.Get('chart.mousedown') && RGraph.Registry.Get('chart.button') == 2) {
+                            
+                            var img = RGraph.Registry.Get('chart.mousedown');
+                    
+                            var x = img.__originalx__ + e.pageX - img.__startx__;
+                            var y = img.__originaly__ + e.pageY - img.__starty__;
+                    
+                            img.style.left = x + 'px';
+                            img.style.top  = y + 'px';
+                        }
+                    }
+                    // End dragging code
+
+
+                    var divs = RGraph.Registry.Get('chart.zoomed.area.divs');
+                    if (typeof(divs) == 'object') {
+                        divs.push(div);
+                    } else {
+                        RGraph.Registry.Set('chart.zoomed.area.divs', [div])
+                    }
+                    
+                    // Create the background
+                    var bg = document.createElement('DIV');
+                    bg.style.position        = 'fixed'
+                    bg.style.zIndex          = 98;
+                    bg.style.top             = 0;
+                    bg.style.left            = 0;
+                    bg.style.backgroundColor = '#999';
+                    bg.style.opacity         = 0;
+                    bg.style.width           = (screen.width + 100) + 'px';
+                    bg.style.height          = (screen.height + 100) + 'px';
+                    document.body.appendChild(bg);
+                    
+                    bg.onclick = function (e)
+                    {
+                        div.style.display = 'none';
+                        bg.style.display  = 'none';
+                        div = null;
+                        bg  = null;
+                    }
+                    
+
+                    setTimeout(function (){div.style.opacity = 0.2;}, 50);
+                    setTimeout(function (){div.style.opacity = 0.4;}, 100);
+                    setTimeout(function (){div.style.opacity = 0.6;}, 150);
+                    setTimeout(function (){div.style.opacity = 0.8;}, 200);
+                    setTimeout(function (){div.style.opacity = 1.0;}, 250);
+                    
+                    setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.1) + 'px'}, 50);
+                    setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.2) + 'px'}, 100);
+                    setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.3) + 'px'}, 150);
+                    setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.4) + 'px'}, 200);
+                    setTimeout(function () {div.style.left = canvasCoords[0] + startx - (width * factor * 0.5) + 'px'}, 250);
+
+                    setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.1) + 'px'}, 50);
+                    setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.2) + 'px'}, 100);
+                    setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.3) + 'px'}, 150);
+                    setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.4) + 'px'}, 200);
+                    setTimeout(function () {div.style.top = canvasCoords[1] + starty - (height * factor * 0.5) + 'px'}, 250);
+
+                    setTimeout(function () {div.style.width = width + (width * factor * 0.2) + 'px'}, 50);
+                    setTimeout(function () {div.style.width = width + (width * factor * 0.4) + 'px'}, 100);
+                    setTimeout(function () {div.style.width = width + (width * factor * 0.6) + 'px'}, 150);
+                    setTimeout(function () {div.style.width = width + (width * factor * 0.8) + 'px'}, 200);
+                    setTimeout(function () {div.style.width = width + (width * factor * 1.0) + 'px'}, 250);
+                    
+                    setTimeout(function () {div.style.height = height + (height * factor * 0.2) + 'px'}, 50);
+                    setTimeout(function () {div.style.height = height + (height * factor * 0.4) + 'px'}, 100);
+                    setTimeout(function () {div.style.height = height + (height * factor * 0.6) + 'px'}, 150);
+                    setTimeout(function () {div.style.height = height + (height * factor * 0.8) + 'px'}, 200);
+                    setTimeout(function () {div.style.height = height + (height * factor * 1.0) + 'px'}, 250);
+
+                    setTimeout(function (){bg.style.opacity = 0.1;}, 50);
+                    setTimeout(function (){bg.style.opacity = 0.2;}, 100);
+                    setTimeout(function (){bg.style.opacity = 0.3;}, 150);
+                    setTimeout(function (){bg.style.opacity = 0.4;}, 200);
+                    setTimeout(function (){bg.style.opacity = 0.5;}, 250);
+
+                    RGraph.Registry.Set('chart.zoomed.area.bg', bg);
+                    RGraph.Registry.Set('chart.zoomed.area.img', img);
+                    RGraph.Registry.Set('chart.zoomed.area.div', div);
+                    RGraph.Registry.Set('chart.zoomed.area.mousedown', null);
+                }
+
+                /**
+                * Fire the zoom event
+                */
+                RGraph.FireCustomEvent(obj, 'onzoom');
+            }
+            
+            canvas.onmouseout = function (e)
+            {
+                RGraph.Registry.Set('chart.zoomed.area.areadiv', null);
+                RGraph.Registry.Set('chart.zoomed.area.mousedown', null);
+                RGraph.Registry.Set('chart.zoomed.area.div', null);
+            }
+        }
+    }
+
+
+    /**
+    * This function sets up the zoom window if requested
+    * 
+    * @param obj object The graph object
+    */
+    RGraph.ShowZoomWindow = function (obj)
+    {
+        if (obj.Get('chart.zoom.mode') == 'thumbnail') {
+            RGraph.ZoomWindow(obj.canvas);
+        }
+
+        if (obj.Get('chart.zoom.mode') == 'area') {
+            RGraph.ZoomArea(obj);
+        }
+    }
+
+
+    /**
+    * Installs the evnt handler for the zoom window/THUMBNAIL
+    */
+    RGraph.ZoomWindow = function (canvas)
+    {
+        canvas.onmousemove = function (e)
+        {
+            e = RGraph.FixEventObject(e);
+
+            var obj     = e.target.__object__;
+            var canvas  = obj.canvas;
+            var context = obj.context;
+            var coords  = RGraph.getMouseXY(e);
+            
+            /**
+            * Create the DIV
+            */
+            if (!RGraph.Registry.Get('chart.zoomed.div')) {
+
+                var div = document.createElement('div');
+                div.className    = 'RGraph_zoom_window';
+                div.style.width  = obj.Get('chart.zoom.thumbnail.width') + 'px';
+                div.style.height = obj.Get('chart.zoom.thumbnail.height') + 'px';
+                
+                // Added back in on the 17th December
+                div.style.border = '2px dashed gray';
+
+                div.style.position = 'absolute';
+                div.style.overflow = 'hidden';
+                div.style.backgroundColor = 'white';
+                
+                // Initially the zoomed layer should be off-screen
+                div.style.left = '-1000px';
+                div.style.top = '-1000px';
+
+                // Should these be 0? No.
+                div.style.borderRadius       = '5px';
+                div.style.MozBorderRadius    = '5px';
+                div.style.WebkitBorderRadius = '5px';
+
+                if (obj.Get('chart.zoom.shadow')) {
+                    div.style.boxShadow       = 'rgba(0,0,0,0.5) 3px 3px 3px';
+                    div.style.MozBoxShadow    = 'rgba(0,0,0,0.5) 3px 3px 3px';
+                    div.style.WebkitBoxShadow = 'rgba(0,0,0,0.5) 3px 3px 3px';
+                }
+
+                //div.style.opacity = 0.2;
+                div.__object__ = obj;
+                document.body.appendChild(div);
+        
+                /**
+                * Get the canvas as an image
+                */
+                var img = document.createElement('img');
+                img.width  = obj.canvas.width * obj.Get('chart.zoom.factor');
+                img.height = obj.canvas.height * obj.Get('chart.zoom.factor');
+                img.style.position = 'relative';
+                img.style.backgroundColor = 'white';
+                img.__object__ = obj;
+
+                div.appendChild(img);
+
+                RGraph.Registry.Set('chart.zoomed.div', div);
+                RGraph.Registry.Set('chart.zoomed.img', img);
+                
+                // Fade the zoom in
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').__object__.canvas.onmouseover()", 5);
+
+            } else {
+
+                div = RGraph.Registry.Get('chart.zoomed.div');
+                img = RGraph.Registry.Get('chart.zoomed.img');
+            }
+
+            // Make sure the image is up-to-date
+            img.src = canvas.toDataURL();
+            
+            /**
+            * Ensure the div is visible
+            */
+            if (div && div.style.opacity < 1) {
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 1", 400);
+            }
+
+            /**
+            * Get the canvas x/y coords
+            */
+            var c = RGraph.getCanvasXY(obj.canvas);
+            var x = c[0];
+            var y = c[1];
+
+            /**
+            * Position the div and img
+            */
+            var offset = 7;
+
+            div.style.left = (e.pageX - obj.Get('chart.zoom.thumbnail.width') - offset) + 'px';
+            div.style.top = (e.pageY -  obj.Get('chart.zoom.thumbnail.height') - offset) + 'px';
+            
+            var l = (obj.Get('chart.zoom.thumbnail.width') / 2) - (coords[0] * obj.Get('chart.zoom.factor'));
+            var t = (obj.Get('chart.zoom.thumbnail.height') / 2) - (coords[1] * obj.Get('chart.zoom.factor'));
+
+            // More positioning
+            img.style.left = (l + ((obj.Get('chart.zoom.thumbnail.width') / 2) * obj.Get('chart.zoom.factor'))) + 'px';
+            img.style.top = (t + ((obj.Get('chart.zoom.thumbnail.height') / 2) * obj.Get('chart.zoom.factor'))) + 'px';
+            
+            /**
+            * Fire the onzoom event
+            */
+            RGraph.FireCustomEvent(obj, 'onzoom');
+        }
+        
+        /**
+        * The onmouseover event. Evidently. Fades the zoom window in
+        */
+        canvas.onmouseover = function (e)
+        {
+            var div = RGraph.Registry.Get('chart.zoomed.div');
+            
+            // ???
+            if (!div) return;
+
+            var obj = div.__object__;
+
+            // Used for the enlargement animation
+            var targetWidth  = obj.Get('chart.zoom.thumbnail.width');
+            var targetHeight = obj.Get('chart.zoom.thumbnail.height');
+
+            div.style.width  = 0;
+            div.style.height = 0;
+
+            if (obj.Get('chart.zoom.fade.in')) {
+                
+                RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2;
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.4", 100);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.6", 200);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.8", 300);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 1", 400);
+
+            } else {
+
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 1", 1);
+            }
+
+            // The enlargement animation frames
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (1/5) ) + "px'", 75);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (2/5) ) + "px'", 150);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (3/5) ) + "px'", 225);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (4/5) ) + "px'", 300);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.width = '" + (targetWidth * (5/5) ) + "px'", 325);
+            
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (1/5) ) + "px'", 75);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (2/5) ) + "px'", 150);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (3/5) ) + "px'", 225);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (4/5) ) + "px'", 300);
+            setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.height = '" + (targetHeight * (5/5) ) + "px'", 375);
+        }
+        
+        canvas.onmouseout = function (e)
+        {
+            if (RGraph.Registry.Get('chart.zoomed.div') && RGraph.Registry.Get('chart.zoomed.div').__object__.Get('chart.zoom.fade.out')) {
+
+                RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.8;
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.6", 100);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.4", 200);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2", 300);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0", 400);
+
+                // Get rid of the zoom window
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 400);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 400);
+            
+            } else {
+                // Get rid of the zoom window
+                if (RGraph.Registry.Get('chart.zoomed.div')) {
+                    setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 1);
+                    setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 41);
+                }            }
+        }
+    }
+
+
+    /**
+    * A zoom in function
+    * 
+    * @param e object The event object
+    */
+    RGraph.Zoom = function (e)
+    {
+        e = RGraph.FixEventObject(e);
+
+        /**
+        * Show the zoom window
+        */
+        //if ((e.target.__canvas__ && e.target.__canvas__.__object__.Get('chart.zoom.mode') == 'thumbnail') || (e.target.parentNode.__canvas__ && e.target.parentNode.__canvas__.__object__.Get('chart.zoom.mode') == 'thumbnail') ) {
+        //    return RGraph.ZoomWindow(e);
+        //}
+        if (e && e.target && e.target.__canvas__) {
+            var canvas  = e.target.__canvas__;
+        
+        /*******************************************************
+        * This is here to facilitate zooming by just a single left click
+        *******************************************************/
+        } else if (e && e.target && e.target.__object__) {
+            var canvas = e.target.__object__.canvas;
+            e.stopPropagation(); // Hmmmm
+        }
+
+        // Fallback for MSIE9
+        if (!canvas) {
+            var registry_canvas = RGraph.Registry.Get('chart.contextmenu').__canvas__;
+            if (registry_canvas) {
+                var canvas = registry_canvas;
+            }
+        }
+
+        var context = canvas.getContext('2d');
+        var obj     = canvas.__object__;
+        var dataurl = canvas.toDataURL();
+        var tmp     = canvas;
+        var coords = RGraph.getCanvasXY(canvas);
+        var factor = obj.Get('chart.zoom.factor') - 1;
+
+        var x = coords[0];
+        var y = coords[1];
+
+        var img = document.createElement('img');
+        img.className    = 'RGraph_zoomed_canvas';
+        img.style.border = '3px solid gray';
+        img.style.width  = canvas.width + 'px';
+        img.style.height = canvas.height + 'px';
+        img.style.position = 'absolute';
+        img.style.left = x + 'px';
+        img.style.top = y + 'px';
+        img.style.backgroundColor = 'white';
+        img.style.opacity = obj.Get('chart.zoom.fade.in') ? 0 : 1;
+        img.style.zIndex = 99;
+        img.src = dataurl;
+        document.body.appendChild(img);
+
+        //RGraph.Registry.Set('chart.zoomedimage', img);
+        // Store the zoomed image in a global var - NOT the registry
+        __zoomedimage__ = img;
+        __zoomedimage__.obj = obj;
+        
+        // Image onclick should not hide the image
+        img.onclick = function (e)
+        {
+            e = RGraph.FixEventObject(e);
+            e.stopPropagation();
+            return false;
+        }
+
+        setTimeout(function () {window.onclick = RGraph.HideZoomedCanvas;}, 1);
+        
+        var width = parseInt(canvas.width);
+        var height = parseInt(canvas.height);
+        var frames = obj.Get('chart.zoom.frames');
+        var delay  = obj.Get('chart.zoom.delay');
+
+        // Increase the width over 10 frames - center
+        if (obj.Get('chart.zoom.hdir') == 'center') {
+
+            for (var i=1; i<=frames; ++i) {
+                var newWidth      = width * factor * (i/frames) + width;
+                var rightHandEdge = x + canvas.width;
+                var newLeft       = (x + (canvas.width / 2)) - (newWidth / 2);
+
+                setTimeout("__zoomedimage__.style.width = '" + String(newWidth) + "px'; __zoomedimage__.style.left = '" + newLeft + "px'", i * delay);
+            }
+
+        // Left
+        } else if (obj.Get('chart.zoom.hdir') == 'left') {
+            for (var i=1; i<=frames; ++i) {
+                var newWidth      = width * factor * (i/frames) + width;
+                var rightHandEdge = x + canvas.width;
+                var newLeft       = rightHandEdge - newWidth;
+
+                setTimeout("__zoomedimage__.style.width = '" + String(newWidth) + "px'; __zoomedimage__.style.left = '" + newLeft + "px'", i * delay);
+            }
+            
+        // Right (default)
+        } else {
+            for (var i=1; i<=frames; ++i) {
+                var newWidth      = width * factor * (i/frames) + width;
+                setTimeout("__zoomedimage__.style.width = '" + String(newWidth) + "px'", i * delay);
+            }
+        }
+
+        // Increase the height over 10 frames - up
+        if (obj.Get('chart.zoom.vdir') == 'up') {
+            for (var i=1; i<=frames; ++i) {
+                var newHeight  = (height * factor * (i/frames)) + height;
+                var bottomEdge = y + canvas.height;
+                var newTop       = bottomEdge - newHeight;
+        
+                setTimeout("__zoomedimage__.style.height = '" + String(newHeight) + "px'; __zoomedimage__.style.top = '" + newTop + "px'", i * delay);
+            }
+        
+        // center
+        } else if (obj.Get('chart.zoom.vdir') == 'center') {
+            for (var i=1; i<=frames; ++i) {
+                var newHeight  = (height * factor * (i/frames)) + height;
+                var bottomEdge = (y + (canvas.height / 2)) + (newHeight / 2);
+                var newTop       = bottomEdge - newHeight;
+
+                setTimeout("__zoomedimage__.style.height = '" + String(newHeight) + "px'; __zoomedimage__.style.top = '" + newTop + "px'", i * delay);
+            }
+        
+        // Down (default
+        } else {
+            for (var i=1; i<=frames; ++i) {
+                setTimeout("__zoomedimage__.style.height = '" + String(height * factor * (i/frames) + height) + "px'", i * delay);
+            }
+        }
+
+        // If enabled, increase the opactity over 10 frames
+        if (obj.Get('chart.zoom.fade.in')) {
+            for (var i=1; i<=frames; ++i) {
+                setTimeout("__zoomedimage__.style.opacity = " + String(i / frames), i * delay);
+            }
+        }
+
+        // If stipulated, produce a shadow
+        if (obj.Get('chart.zoom.shadow')) {
+            for (var i=1; i<=frames; ++i) {
+                setTimeout("__zoomedimage__.style.boxShadow = 'rgba(128,128,128," + Number(i / frames) / 2 + ") 0 0 15px'", i * delay);
+                setTimeout("__zoomedimage__.style.MozBoxShadow = 'rgba(128,128,128," + Number(i / frames) / 2 + ") 0 0 15px'", i * delay);
+                setTimeout("__zoomedimage__.style.WebkitBoxShadow = 'rgba(128,128,128," + Number(i / frames) / 2 + ") 0 0 15px'", i * delay);
+            }
+        }
+
+        /**
+        * The onmouseout event. Hides the zoom window. Fades the zoom out
+        */
+        canvas.onmouseout = function (e)
+        {
+            if (RGraph.Registry.Get('chart.zoomed.div') && RGraph.Registry.Get('chart.zoomed.div').__object__.Get('chart.zoom.fade.out')) {
+
+                RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.8;
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.6", 100);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.4", 200);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0.2", 300);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.opacity = 0", 400);
+
+                // Get rid of the zoom window
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 400);
+                setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 400);
+            
+            } else {
+
+                // Get rid of the zoom window
+                if (RGraph.Registry.Get('chart.zoomed.div')) {
+                    setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.left = '-400px'", 1);
+                    setTimeout("RGraph.Registry.Get('chart.zoomed.div').style.top = '-400px'", 1);
+                }
+            }
+        }
+
+        // The background
+        if (obj.Get('chart.zoom.background')) {
+            var div = document.createElement('DIV');
+            div.style.backgroundColor = '#999';
+            div.style.opacity         = 0;
+            div.style.position        = 'fixed';
+            div.style.top             = 0;
+            div.style.left            = 0;
+            div.style.width           = (screen.width + 100) + 'px';
+            div.style.height          = (screen.height + 100) + 'px';
+            div.style.zIndex          = 98;
+
+            // Hides the zoomed caboodle
+            div.oncontextmenu = function (e)
+            {
+                return RGraph.HideZoomedCanvas(e);
+            }
+
+            // 30th July 2010 - Is this necessary?
+            //for (var i=1; i<=frames; ++i) {
+            //  setTimeout('__zoomedbackground__.style.opacity = ' + Number(0.04 * i), i * delay);
+            //
+            //    //  MSIE doesn't support zoom
+            //    //setTimeout('__zoomedbackground__.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color=#aaaaaa,direction=135); Alpha(opacity=10)"', 50);
+            //}
+            
+            div.origHeight = div.style.height;
+            
+            document.body.appendChild(div);
+
+            __zoomedbackground__ = div;
+            
+            // If the window is resized, hide the zoom
+            //window.onresize = RGraph.HideZoomedCanvas;
+
+            for (var i=1; i<=frames; ++i) {
+                setTimeout("__zoomedbackground__.style.opacity = " + (Number(i / frames) * 0.5), i * delay);
+            }
+        }
+        
+        /**
+        * Fire the onzoom event
+        */
+        RGraph.FireCustomEvent(obj, 'onzoom');
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.funnel.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.funnel.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.funnel.js	(revision 225)
@@ -0,0 +1,616 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The bar chart constructor
+    * 
+    * @param object canvas The canvas object
+    * @param array  data   The chart data
+    */
+    RGraph.Funnel = function (id, data)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.type              = 'funnel';
+        this.coords            = [];
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[FUNNEL] No canvas support');
+            return;
+        }
+
+        /**
+        * The funnel charts properties
+        */
+        this.properties = {
+            'chart.strokestyle':           'black',
+            'chart.gutter.left':           25,
+            'chart.gutter.right':          25,
+            'chart.gutter.top':            25,
+            'chart.gutter.bottom':         25,
+            'chart.labels':                null,
+            'chart.title':                 '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':            null,
+            'chart.colors':                ['red', 'green', 'gray', 'blue', 'black', 'gray'],
+            'chart.text.size':             10,
+            'chart.text.boxed':            true,
+            'chart.text.halign':           'left',
+            'chart.text.color':            'black',
+            'chart.text.font':             'Verdana',
+            'chart.contextmenu':           null,
+            'chart.shadow':                false,
+            'chart.shadow.color':          '#666',
+            'chart.shadow.blur':           3,
+            'chart.shadow.offsetx':        3,
+            'chart.shadow.offsety':        3,
+            'chart.key':                    [],
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.tooltips':               null,
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.highlight.stroke':       'black',
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+            'chart.tooltips.highlight':     true,
+            'chart.annotatable':           false,
+            'chart.annotate.color':        'black',
+            'chart.zoom.factor':           1.5,
+            'chart.zoom.fade.in':          true,
+            'chart.zoom.fade.out':         true,
+            'chart.zoom.factor':           1.5,
+            'chart.zoom.fade.in':          true,
+            'chart.zoom.fade.out':         true,
+            'chart.zoom.hdir':             'right',
+            'chart.zoom.vdir':             'down',
+            'chart.zoom.frames':           10,
+            'chart.zoom.delay':            50,
+            'chart.zoom.shadow':           true,
+            'chart.zoom.mode':             'canvas',
+            'chart.zoom.thumbnail.width':  75,
+            'chart.zoom.thumbnail.height': 75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null
+        }
+
+        // Store the data
+        this.data = data;
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getSegment;
+    }
+
+
+    /**
+    * A setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Funnel.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Funnel.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+
+    /**
+    * The function you call to draw the bar chart
+    */
+    RGraph.Funnel.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // This stops the coords array from growing
+        this.coords = [];
+
+        RGraph.DrawTitle(this.canvas, this.Get('chart.title'), this.gutterTop, null, this.Get('chart.text.size') + 2);
+        this.DrawFunnel();
+        
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * The tooltip handler
+        */
+        if (this.Get('chart.tooltips')) {
+        
+            RGraph.Register(this);
+
+            var canvas_onclick_func = function (e)
+            {
+                RGraph.Redraw();
+
+                var e       = RGraph.FixEventObject(e);
+                var canvas  = e.target;
+                var context = canvas.getContext('2d');
+                var obj     = canvas.__object__;
+
+                var mouseCoords = RGraph.getMouseXY(e);
+                var coords      = obj.coords;
+                var x           = mouseCoords[0];
+                var y           = mouseCoords[1];
+                var segment     = obj.getSegment(e);
+                
+                if (segment) {
+                
+                    var idx = segment[2];
+
+                    // Is there a tooltip defined?
+                    if (!obj.Get('chart.tooltips')[idx] && typeof(obj.Get('chart.tooltips')) != 'function') {
+                        return;
+                    }
+
+                    context.beginPath();
+
+                    RGraph.NoShadow(obj);
+
+                    context.strokeStyle = obj.Get('chart.highlight.stroke');
+                    context.fillStyle   = obj.Get('chart.highlight.fill');
+
+                    context.moveTo(coords[idx][0], coords[idx][1]);
+                    context.lineTo(coords[idx][2], coords[idx][3]);
+                    context.lineTo(coords[idx][4], coords[idx][5]);
+                    context.lineTo(coords[idx][6], coords[idx][7]);
+                    context.closePath();
+
+                    context.stroke();
+                    context.fill();
+                
+                    /**
+                    * Draw the key again for in-graph keys so they don't appear "under" the highlight
+                    */
+                    if (obj.Get('chart.key').length && obj.Get('chart.key.position') == 'graph') {
+                        RGraph.DrawKey(obj, obj.Get('chart.key'), obj.Get('chart.colors'));
+                    }
+                    
+                    /**
+                    * Redraw the labels if necessary
+                    */
+                    if (obj.Get('chart.labels')) {
+                        obj.DrawLabels();
+                    }
+
+                    /**
+                    * Get the tooltip text
+                    */
+                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                        var text = obj.Get('chart.tooltips')(idx);
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                        var text = obj.Get('chart.tooltips')[idx](idx);
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                        var text = obj.Get('chart.tooltips')[idx];
+
+                    } else {
+                        var text = '';
+                    }
+
+                    // Show the tooltip
+                    RGraph.Tooltip(canvas, text, e.pageX, e.pageY, idx);
+    
+                    // Stop the event propagating
+                    e.stopPropagation();
+                }
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+            
+            /**
+            * Onmousemove event handler
+            */
+            var canvas_onmousemove_func = function (e)
+            {
+                var e = RGraph.FixEventObject(e);
+
+                var canvas = e.target;
+                var context = canvas.getContext('2d');
+                var obj     = canvas.__object__;
+                var overFunnel = false;
+                var coords = obj.coords;
+
+                var mouseCoords = RGraph.getMouseXY(e);
+                var x           = mouseCoords[0];
+                var y           = mouseCoords[1];
+                var segment     = obj.getSegment(e);
+
+                if (segment) {
+                
+                    var idx = segment[2];
+                    
+                    // Is there a tooltip defined?
+                    if (obj.Get('chart.tooltips')[idx] || typeof(obj.Get('chart.tooltips')) == 'function') {
+
+                        overFunnel = true;
+                        canvas.style.cursor = 'pointer';
+        
+                        // Stop the event propagating
+                        e.stopPropagation();
+                        
+                    }
+                }
+                
+                if (!overFunnel) {
+                    canvas.style.cursor = 'default';
+                    canvas.style.cursor = 'default';
+                }
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+        }
+
+
+        /**
+        * Draw the labels on the chart
+        */
+        this.DrawLabels();
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail'|| this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * This function actually draws the chart
+    */
+    RGraph.Funnel.prototype.DrawFunnel = function ()
+    {
+        var context   = this.context;
+        var canvas    = this.canvas;
+        var width     = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        var height    = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        var total     = RGraph.array_max(this.data);
+        var accheight = this.gutterTop;
+
+
+        /**
+        * Loop through each segment to draw
+        */
+        
+        // Set a shadow if it's been requested
+        if (this.Get('chart.shadow')) {
+            context.shadowColor   = this.Get('chart.shadow.color');
+            context.shadowBlur    = this.Get('chart.shadow.blur');
+            context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+            context.shadowOffsetY = this.Get('chart.shadow.offsety');
+        }
+
+        for (i=0; i<this.data.length; ++i) {
+
+            i = Number(i);
+
+            var firstvalue = this.data[0];
+            var firstwidth = (firstvalue / total) * width;
+            var curvalue   = this.data[i];
+            var curwidth   = (curvalue / total) * width;
+            var curheight  = height / this.data.length;
+            var halfCurWidth = (curwidth / 2);
+            var nextvalue  = this.data[i + 1] ?  this.data[i + 1] : 0;
+            var nextwidth  = this.data[i + 1] ? (nextvalue / total) * width : 0;
+            var halfNextWidth = (nextwidth / 2);
+            var center     = this.gutterLeft + (firstwidth / 2);
+
+            /**
+            * First segment
+            */
+            if (i == 0) {
+                var x1 = center - halfCurWidth;
+                var y1 = this.gutterTop;
+                var x2 = center + halfCurWidth;
+                var y2 = this.gutterTop;
+                var x3 = center + halfNextWidth;
+                var y3 = accheight + curheight;
+                var x4 = center - halfNextWidth;
+                var y4 = accheight + curheight;
+
+            /**
+            * Subsequent segments
+            */
+            } else {
+                var x1 = center - halfCurWidth;
+                var y1 = accheight;
+                var x2 = center + halfCurWidth;
+                var y2 = accheight;
+                var x3 = center + halfNextWidth;
+                var y3 = accheight + curheight;
+                var x4 = center - halfNextWidth;
+                var y4 = accheight + curheight;
+            }
+
+            /**
+            * Set the fill colour. If i is over 0 then don't use an offset
+            */
+            if (document.all && this.Get('chart.shadow')) {
+                this.DrawIEShadow([x1, y1, x2, y2, x3, y3, x4, y4], i > 0 && this.Get('chart.shadow.offsety') < 0);
+            }
+
+            context.strokeStyle = this.Get('chart.strokestyle');
+            context.fillStyle   = this.Get('chart.colors')[i];
+
+            context.beginPath();
+                context.moveTo(x1, y1);
+                context.lineTo(x2, y2);
+                context.lineTo(x3, y3);
+                context.lineTo(x4, y4);
+            context.closePath();
+
+            /**
+            * Store the coordinates
+            */
+            this.coords.push([x1, y1, x2, y2, x3, y3, x4, y4]);
+
+            // The redrawing if the shadow is on will do the stroke
+            if (!this.Get('chart.shadow')) {
+                context.stroke();
+            }
+
+            context.fill();
+
+            accheight += curheight;
+        }
+
+        /**
+        * If the shadow is enabled, redraw every segment, in order to allow for shadows going upwards
+        */
+        if (this.Get('chart.shadow')) {
+        
+            RGraph.NoShadow(this);
+        
+            for (i=0; i<this.coords.length; ++i) {
+            
+                context.strokeStyle = this.Get('chart.strokestyle');
+                context.fillStyle = this.Get('chart.colors')[i];
+        
+                context.beginPath();
+                    context.moveTo(this.coords[i][0], this.coords[i][1]);
+                    context.lineTo(this.coords[i][2], this.coords[i][3]);
+                    context.lineTo(this.coords[i][4], this.coords[i][5]);
+                    context.lineTo(this.coords[i][6], this.coords[i][7]);
+                context.closePath();
+                
+                context.stroke();
+                context.fill();
+            }
+        }
+        
+        /**
+        * Lastly, draw the key if necessary
+        */
+        if (this.Get('chart.key') && this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+    }
+    
+    /**
+    * Draws the labels
+    */
+    RGraph.Funnel.prototype.DrawLabels = function ()
+    {
+        /**
+        * Draws the labels
+        */
+        if (this.Get('chart.labels') && this.Get('chart.labels').length > 0) {
+
+            var context = this.context;
+
+            for (var j=0; j<this.coords.length; ++j) {  // MUST be "j"
+                context.beginPath();
+                
+                // Set the color back to black
+                context.strokeStyle = 'black';
+                context.fillStyle = this.Get('chart.text.color');
+                
+                // Turn off any shadow
+                RGraph.NoShadow(this);
+                
+                var label = this.Get('chart.labels')[j];
+
+                RGraph.Text(context,
+                            this.Get('chart.text.font'),
+                            this.Get('chart.text.size'),
+                            this.Get('chart.text.halign') == 'left' ? (this.gutterLeft - 15) : ((this.canvas.width - this.gutterLeft - this.gutterRight) / 2) + this.gutterLeft,
+                            this.coords[j][1],
+                            label,
+                            'center',
+                            this.Get('chart.text.halign') == 'left' ? 'left' : 'center',
+                            true,
+                            null,
+                            this.Get('chart.text.boxed') ? 'white' : null);
+            }
+        }
+    }
+
+
+    /**
+    * This function is used by MSIE only to manually draw the shadow
+    * 
+    * @param array coords The coords for the bar
+    */
+    RGraph.Funnel.prototype.DrawIEShadow = function (coords, noOffset)
+    {
+        var prevFillStyle = this.context.fillStyle;
+        var offsetx = this.Get('chart.shadow.offsetx');
+        var offsety = this.Get('chart.shadow.offsety');
+        var context = this.context;
+
+        context.lineWidth = 1;
+        context.fillStyle = this.Get('chart.shadow.color');
+        
+        // Draw the shadow
+        context.beginPath();
+            context.moveTo(coords[0] + (noOffset ? 0 : offsetx), coords[1] + (noOffset ? 0 : offsety));
+            context.lineTo(coords[2] + (noOffset ? 0 : offsetx), coords[3] + (noOffset ? 0 : offsety));
+            context.lineTo(coords[4] + (noOffset ? 0 : offsetx), coords[5] + (noOffset ? 0 : offsety));
+            context.lineTo(coords[6] + (noOffset ? 0 : offsetx), coords[7] + (noOffset ? 0 : offsety));
+        context.closePath();
+        
+        context.fill();
+        
+
+        
+        // Change the fillstyle back to what it was
+        this.context.fillStyle = prevFillStyle;
+    }
+
+
+    /**
+    * Gets the appropriate segment that has been highlighted
+    */
+    RGraph.Funnel.prototype.getSegment = function (e)
+    {
+        var canvas      = e.target;
+        var obj         = canvas.__object__;
+        var mouseCoords = RGraph.getMouseXY(e);
+        var coords = obj.coords;
+        var x = mouseCoords[0];
+        var y = mouseCoords[1];
+        
+        
+
+        for (i=0; i<coords.length; ++i) {
+            if (
+                   x > coords[i][0]
+                && x < coords[i][2]
+                && y > coords[i][1]
+                && y < coords[i][5]
+               ) {
+               
+                /**
+                * Handle the right corner
+                */
+                if (x > coords[i][4]) {
+                    var w1 = coords[i][2] - coords[i][4];
+                    var h1 = coords[i][5] - coords[i][3];;
+                    var a1 = Math.atan(h1 / w1) * 57.3; // DEGREES
+
+                    var w2 = coords[i][2] - mouseCoords[0];
+                    var h2 = mouseCoords[1] - coords[i][1];
+                    var a2 = Math.atan(h2 / w2) * 57.3; // DEGREES
+
+                    if (a2 > a1) {
+                        continue;
+                    }
+                
+                /**
+                * Handle the left corner
+                */
+                } else if (x < coords[i][6]) {
+                    var w1 = coords[i][6] - coords[i][0];
+                    var h1 = coords[i][7] - coords[i][1];;
+                    var a1 = Math.atan(h1 / w1) * 57.3; // DEGREES
+
+                    var w2 = mouseCoords[0] - coords[i][0];
+                    var h2 = mouseCoords[1] - coords[i][1];
+                    var a2 = Math.atan(h2 / w2) * 57.3; // DEGREES
+                
+                    if (a2 > a1) {
+                        continue;
+                    }
+                }
+                
+                return [obj, coords[i], i];
+            }
+        }
+        
+        return null;
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.gantt.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.gantt.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.gantt.js	(revision 225)
@@ -0,0 +1,487 @@
+7    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The gantt chart constructor
+    * 
+    * @param object canvas The cxanvas object
+    * @param array  data   The chart data
+    */
+    RGraph.Gantt = function (id)
+    {
+        // Get the canvas and context objects
+        this.id      = id;
+        this.canvas  = document.getElementById(id);
+        this.context = this.canvas.getContext("2d");
+        this.canvas.__object__ = this;
+        this.type              = 'gantt';
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        
+        // Set some defaults
+        this.properties = {
+            'chart.background.barcolor1':   'white',
+            'chart.background.barcolor2':   'white',
+            'chart.background.grid':        true,
+            'chart.background.grid.width':  1,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.hsize':  20,
+            'chart.background.grid.vsize':  20,
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':false,
+            'chart.background.grid.autofit.numhlines': 7,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.background.vbars':       [],
+            'chart.text.size':              10,
+            'chart.text.font':              'Verdana',
+            'chart.text.color':             'black',
+            'chart.gutter.left':            75,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             35,
+            'chart.gutter.bottom':          25,
+            'chart.labels':                 [],
+            'chart.margin':                 2,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.yaxis':            '',
+            'chart.title.yaxis.pos':        this.canvas.width - 12.5,
+            'chart.title.yaxis.position':   'right',
+            'chart.events':                 [],
+            'chart.borders':                true,
+            'chart.defaultcolor':           'white',
+            'chart.coords':                 [],
+            'chart.tooltips':               [],
+            'chart.tooltips.effect':         'fade',
+            'chart.tooltips.css.class':      'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.stroke':       'black',
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+            'chart.xmin':                   0,
+            'chart.xmax':                   0,
+            'chart.contextmenu':            null,
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.adjustable':             false
+        }
+    }
+
+
+    /**
+    * A peudo setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Gantt.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A peudo getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Gantt.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+    
+    /**
+    * Draws the chart
+    */
+    RGraph.Gantt.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        /**
+        * Work out the graphArea
+        */
+        this.graphArea     = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        this.graphHeight   = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        this.numEvents     = this.Get('chart.events').length
+        this.barHeight     = this.graphHeight / this.numEvents;
+        this.halfBarHeight = this.barHeight / 2;
+
+        /**
+        * Draw the background
+        */
+        RGraph.background.Draw(this);
+        
+        /**
+        * Draw a space for the left hand labels
+        */
+        //this.context.beginPath();
+            //this.context.lineWidth   = 1;
+            //this.context.strokeStyle = this.Get('chart.background.grid.color');
+            //this.context.fillStyle   = 'white';
+            //this.context.fillRect(0,gutter - 5,gutter * 3, RGraph.GetHeight(this) - (2 * gutter) + 10);
+            //this.context.moveTo(gutter * 3, gutter);
+            //this.context.lineTo(gutter * 3, RGraph.GetHeight(this) - gutter);
+        //this.context.stroke();
+        //this.context.fill();
+        
+        /**
+        * Draw the labels at the top
+        */
+        this.DrawLabels();
+        
+        /**
+        * Draw the events
+        */
+        this.DrawEvents();
+        
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+
+        /**
+        * This function enables adjusting
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+
+
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    
+    /**
+    * Draws the labels at the top and the left of the chart
+    */
+    RGraph.Gantt.prototype.DrawLabels = function ()
+    {
+        this.context.beginPath();
+        this.context.fillStyle = this.Get('chart.text.color');
+
+        /**
+        * Draw the X labels at the top of the chart.
+        */
+        var labelSpace = (this.graphArea) / this.Get('chart.labels').length;
+        var xPos       = this.gutterLeft + (labelSpace / 2);
+        this.context.strokeStyle = 'black'
+
+        for (i=0; i<this.Get('chart.labels').length; ++i) {
+            RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size'),xPos + (i * labelSpace),this.gutterTop - (this.Get('chart.text.size') / 2) - 5,String(this.Get('chart.labels')[i]),'center','center');
+        }
+        
+        // Draw the vertical labels
+        for (i=0; i<this.Get('chart.events').length; ++i) {
+            var ev = this.Get('chart.events')[i];
+            var x  = this.gutterLeft;
+            var y  = this.gutterTop + this.halfBarHeight + (i * this.barHeight);
+
+            RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size'), x - 5, y, String(ev[3]), 'center', 'right');
+        }
+    }
+    
+    /**
+    * Draws the events to the canvas
+    */
+    RGraph.Gantt.prototype.DrawEvents = function ()
+    {
+        var canvas  = this.canvas;
+        var context = this.context;
+        var events  = this.Get('chart.events');
+
+        /**
+        * Reset the coords array to prevent it growing
+        */
+        this.coords = [];
+
+        /**
+        * First draw the vertical bars that have been added
+        */
+        if (this.Get('chart.vbars')) {
+            for (i=0; i<this.Get('chart.vbars').length; ++i) {
+                // Boundary checking
+                if (this.Get('chart.vbars')[i][0] + this.Get('chart.vbars')[i][1] > this.Get('chart.xmax')) {
+                    this.Get('chart.vbars')[i][1] = 364 - this.Get('chart.vbars')[i][0];
+                }
+    
+                var barX   = this.gutterLeft + (( (this.Get('chart.vbars')[i][0] - this.Get('chart.xmin')) / (this.Get('chart.xmax') - this.Get('chart.xmin')) ) * this.graphArea);
+
+                var barY   = this.gutterTop;
+                var width  = (this.graphArea / (this.Get('chart.xmax') - this.Get('chart.xmin')) ) * this.Get('chart.vbars')[i][1];
+                var height = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+                
+                // Right hand bounds checking
+                if ( (barX + width) > (RGraph.GetWidth(this) - this.gutterRight) ) {
+                    width = RGraph.GetWidth(this) - this.gutterRight - barX;
+                }
+    
+                context.fillStyle = this.Get('chart.vbars')[i][2];
+                context.fillRect(barX, barY, width, height);
+            }
+        }
+
+
+        /**
+        * Draw the events
+        */
+        for (i=0; i<events.length; ++i) {
+            
+            var ev  = events[i];
+            var min = this.Get('chart.xmin');
+
+            context.beginPath();
+            context.strokeStyle = 'black';
+            context.fillStyle = ev[4] ? ev[4] : this.Get('chart.defaultcolor');
+
+            var barStartX  = this.gutterLeft + (((ev[0] - min) / (this.Get('chart.xmax') - min)) * this.graphArea);
+            //barStartX += this.margin;
+            var barStartY  = this.gutterTop + (i * this.barHeight);
+            var barWidth   = (ev[1] / (this.Get('chart.xmax') - min) ) * this.graphArea;
+
+            /**
+            * If the width is greater than the graph atrea, curtail it
+            */
+            if ( (barStartX + barWidth) > (RGraph.GetWidth(this) - this.gutterRight) ) {
+                barWidth = RGraph.GetWidth(this) - this.gutterRight - barStartX;
+            }
+
+            /**
+            *  Draw the actual bar storing store the coordinates
+            */
+            this.coords.push([barStartX, barStartY + this.Get('chart.margin'), barWidth, this.barHeight - (2 * this.Get('chart.margin'))]);
+            context.fillRect(barStartX, barStartY + this.Get('chart.margin'), barWidth, this.barHeight - (2 * this.Get('chart.margin')) );
+
+            // Work out the completeage indicator
+            var complete = (ev[2] / 100) * barWidth;
+
+            // Draw the % complete indicator. If it's greater than 0
+            if (typeof(ev[2]) == 'number') {
+                context.beginPath();
+                context.fillStyle = ev[5] ? ev[5] : '#0c0';
+                context.fillRect(barStartX,
+                                      barStartY + this.Get('chart.margin'),
+                                      (ev[2] / 100) * barWidth,
+                                      this.barHeight - (2 * this.Get('chart.margin')) );
+                
+                context.beginPath();
+                context.fillStyle = this.Get('chart.text.color');
+                RGraph.Text(context, this.Get('chart.text.font'), this.Get('chart.text.size'), barStartX + barWidth + 5, barStartY + this.halfBarHeight, String(ev[2]) + '%', 'center');
+            }
+
+            // draw the border around the bar
+            if (this.Get('chart.borders') || events[i][6]) {
+                context.strokeStyle = typeof(events[i][6]) == 'string' ? events[i][6] : 'black';
+                context.lineWidth = (typeof(events[i][7]) == 'number' ? events[i][7] : 1);
+                context.beginPath();
+                context.strokeRect(barStartX, barStartY + this.Get('chart.margin'), barWidth, this.barHeight - (2 * this.Get('chart.margin')) );
+            }
+        }
+
+
+        /**
+        * If tooltips are defined, handle them
+        */
+        if (this.Get('chart.tooltips')) {
+
+            // Register the object for redrawing
+            RGraph.Register(this);
+
+            /**
+            * If the cursor is over a hotspot, change the cursor to a hand
+            */
+            var canvas_onmousemove_func = function (eventObj)
+            {
+                eventObj = RGraph.FixEventObject(eventObj);
+                var canvas = eventObj.target;
+                var obj    = canvas.__object__;
+                var len    = obj.coords.length;
+
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(eventObj);
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<len; i++) {
+
+                    var mouseX = mouseCoords[0];  // In relation to the canvas
+                    var mouseY = mouseCoords[1];  // In relation to the canvas
+                    var left   = obj.coords[i][0];
+                    var top    = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+
+                    if (   mouseX >= left
+                        && mouseX <= (left + width)
+                        && mouseY >= top
+                        && mouseY <= (top + height)
+                        && (typeof(obj.Get('chart.tooltips')) == 'function' || obj.Get('chart.tooltips')[i]) ) {
+
+                        canvas.style.cursor = 'pointer';
+                        return;
+                    }
+                }
+
+                canvas.style.cursor = 'default';
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+
+
+            var canvas_onclick_func = function (eventObj)
+            {
+                eventObj = RGraph.FixEventObject(eventObj);
+
+                var canvas  = eventObj.target;
+                var context = canvas.getContext('2d');
+                var obj     = canvas.__object__;
+
+                var mouseCoords = RGraph.getMouseXY(eventObj);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                
+                
+                for (i=0; i<obj.coords.length; ++i) {
+                    
+                    var idx = i;
+                    var xCoord = obj.coords[i][0];
+                    var yCoord = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+
+                    if (
+                           mouseX >= xCoord
+                        && (mouseX <= xCoord + width)
+                        && mouseY >= yCoord
+                        && (mouseY <= yCoord + height)
+                        && obj.Get('chart.tooltips')
+                       ) {
+
+                       // Redraw the graph
+                        RGraph.Redraw();
+
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[idx](idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = obj.Get('chart.tooltips')[idx];
+
+                        } else {
+                            var text = null;
+                        }
+
+                        if (String(text).length && text != null) {
+
+                            // SHOW THE CORRECT TOOLTIP
+                            RGraph.Tooltip(canvas, text, eventObj.pageX, eventObj.pageY, idx);
+                            
+                            /**
+                            * Draw a rectangle around the correct bar, in effect highlighting it
+                            */
+                            context.strokeStyle = obj.Get('chart.highlight.stroke');
+                            context.fillStyle   = obj.Get('chart.highlight.fill');
+                            context.strokeRect(xCoord, yCoord, width, height);
+                            context.fillRect(xCoord, yCoord, width, height);
+    
+                            eventObj.stopPropagation();
+                        }
+                        return;
+                    }
+                }
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.hbar.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.hbar.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.hbar.js	(revision 225)
@@ -0,0 +1,958 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The horizontal bar chart constructor. The horizontal bar is a minor variant
+    * on the bar chart. If you have big labels, this may be useful as there is usually
+    * more space available for them.
+    * 
+    * @param object canvas The canvas object
+    * @param array  data   The chart data
+    */
+    RGraph.HBar = function (id, data)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.data              = data;
+        this.type              = 'hbar';
+        this.coords            = [];
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        
+        this.max = 0;
+        this.stackedOrGrouped  = false;
+
+        // Default properties
+        this.properties = {
+            'chart.gutter.left':            75,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             35,
+            'chart.gutter.bottom':          25,
+            'chart.background.grid':        true,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.width':  1,
+            'chart.background.grid.hsize':  25,
+            'chart.background.grid.vsize':  25,
+            'chart.background.barcolor1':   'white',
+            'chart.background.barcolor2':   'white',
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':false,
+            'chart.background.grid.autofit.numhlines': 14,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.xaxis':            '',
+            'chart.title.yaxis':            '',
+            'chart.title.xaxis.pos':        0.25,
+            'chart.title.yaxis.pos':        10,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.text.size':              10,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.colors':                 ['red', 'blue', 'green', 'pink', 'yellow', 'cyan', 'navy', 'gray', 'black'],
+            'chart.labels':                 [],
+            'chart.labels.above':           false,
+            'chart.labels.above.decimals':  0,
+            'chart.xlabels':                true,
+            'chart.contextmenu':            null,
+            'chart.key':                    [],
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.units.ingraph':          false,
+            'chart.strokestyle':            'black',
+            'chart.xmin':                   0,
+            'chart.xmax':                   0,
+            'chart.axis.color':             'black',
+            'chart.shadow':                 false,
+            'chart.shadow.color':           '#666',
+            'chart.shadow.blur':            3,
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.vmargin':                3,
+            'chart.grouping':               'grouped',
+            'chart.tooltips':               null,
+            'chart.tooltips.event':         'onclick',
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+            'chart.highlight.stroke':       'black',
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.scale.point':            '.',
+            'chart.scale.thousand':         ',',
+            'chart.scale.decimals':         null,
+            'chart.noredraw':               false
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[HBAR] No canvas support');
+            return;
+        }
+
+        for (i=0; i<this.data.length; ++i) {
+            if (typeof(this.data[i]) == 'object') {
+                this.stackedOrGrouped = true;
+            }
+        }
+
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getBar;
+    }
+
+
+    /**
+    * A setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.HBar.prototype.Set = function (name, value)
+    {
+        if (name == 'chart.labels.abovebar') {
+            name = 'chart.labels.above';
+        }
+
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.HBar.prototype.Get = function (name)
+    {
+        if (name == 'chart.labels.abovebar') {
+            name = 'chart.labels.above';
+        }
+
+        return this.properties[name];
+    }
+
+
+    /**
+    * The function you call to draw the bar chart
+    */
+    RGraph.HBar.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        /**
+        * Stop the coords array from growing uncontrollably
+        */
+        this.coords = [];
+        this.max    = 0;
+
+        /**
+        * Check for chart.xmin in stacked charts
+        */
+        if (this.Get('chart.xmin') > 0 && this.Get('chart.grouping') == 'stacked') {
+            alert('[HBAR] Using chart.xmin is not supported with stacked charts, resetting chart.xmin to zero');
+            this.Set('chart.xmin', 0);
+        }
+
+        /**
+        * Work out a few things. They need to be here because they depend on things you can change before you
+        * call Draw() but after you instantiate the object
+        */
+        this.graphwidth     = this.canvas.width - this.gutterLeft - this.gutterRight;
+        this.graphheight    = this.canvas.height - this.gutterTop - this.gutterBottom;
+        this.halfgrapharea  = this.grapharea / 2;
+        this.halfTextHeight = this.Get('chart.text.size') / 2;
+
+
+        // Progressively Draw the chart
+        RGraph.background.Draw(this);
+
+        this.Drawbars();
+        this.DrawAxes();
+        this.DrawLabels();
+
+
+        // Draw the key if necessary
+        if (this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+
+        /**
+        * Install the event handlers for tooltips
+        */
+        if (this.Get('chart.tooltips')) {
+
+            // Need to register this object for redrawing
+            RGraph.Register(this);
+
+            /**
+            * Install the window onclick handler
+            */
+            window.onclick = function ()
+            {
+                RGraph.Redraw();
+            }
+
+
+
+            /**
+            * If the cursor is over a hotspot, change the cursor to a hand
+            */
+            //this.canvas.onmousemove = function (e)
+            var canvas_onmousemove_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id);
+                var obj = canvas.__object__;
+                var bar = obj.getBar(e);
+
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                if (bar && (typeof(obj.Get('chart.tooltips')) == 'function' || obj.Get('chart.tooltips')[bar[4]]) ) {
+
+                    canvas.style.cursor = 'pointer';
+                    
+                    var left   = bar[0];
+                    var top    = bar[1];
+                    var width  = bar[2];
+                    var height = bar[3];
+                    var idx    = bar[4];
+                    
+                    /**
+                    * Show the tooltip if the event is onmousemove
+                    */
+                    if (obj.Get('chart.tooltips.event') == 'onmousemove') {
+                    
+                        var tooltipObj = RGraph.Registry.Get('chart.tooltip');
+
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[idx](idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = obj.Get('chart.tooltips')[idx];
+
+                        } else {
+                            var text = null;
+                        }
+
+                        if (text) {
+                            if (!tooltipObj || tooltipObj.__index__ != idx) {
+                            
+                                RGraph.HideTooltip();
+                                RGraph.Redraw();
+
+                                obj.context.beginPath();
+                                obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                                obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                                obj.context.strokeRect(left, top, width, height);
+                                obj.context.fillRect(left, top, width, height);
+
+                                RGraph.Tooltip(canvas, text, e.pageX, e.pageY, idx);
+                            }
+                            return;
+                        }
+                    }
+                }
+                
+                if (!bar) {
+                    canvas.style.cursor = 'default';
+                }
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+
+
+            /**
+            * Install the onclick event handler for the tooltips
+            */
+            //this.canvas.onclick = function (e)
+            var canvas_onclick_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                //var canvas = document.getElementById(this.id);
+                var canvas = e.target;
+                var obj = canvas.__object__;
+                var bar = obj.getBar(e);
+
+                /**
+                * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn
+                * This "deselects" any already selected bar
+                */
+                RGraph.Redraw();
+
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+                
+                /*******************************************************
+                * Only do this if a bar is being hovered over
+                *******************************************************/
+                if (bar) {
+                    
+                    var left   = bar[0];
+                    var top    = bar[1];
+                    var width  = bar[2];
+                    var height = bar[3];
+                    var idx    = bar[4];
+
+                    /**
+                    * Get the tooltip text
+                    */
+                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                        var text = obj.Get('chart.tooltips')(idx);
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                        var text = obj.Get('chart.tooltips')[idx](idx);
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                        var text = obj.Get('chart.tooltips')[idx];
+
+                    } else {
+                        var text = null;
+                    }
+
+                    /**
+                    * Show a tooltip if it's defined
+                    */
+                    if (String(text).length && text != null) {
+
+                        obj.context.beginPath();
+                        obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                        obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                        obj.context.strokeRect(left, top, width, height);
+                        obj.context.fillRect(left, top, width, height);
+    
+                        obj.context.stroke();
+                        obj.context.fill();
+
+                        RGraph.Tooltip(canvas, text, e.pageX, e.pageY, idx);
+                    }
+                }
+
+                /**
+                * Stop the event bubbling
+                */
+                e.stopPropagation();
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id,'click', canvas_onclick_func);
+
+            // This resets the bar graph
+            if (RGraph.Registry.Get('chart.tooltip')) {
+                RGraph.Registry.Get('chart.tooltip').style.display = 'none';
+                RGraph.Registry.Set('chart.tooltip', null)
+            }
+        }
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+
+        /**
+        * Draw "in graph" labels
+        */
+        RGraph.DrawInGraphLabels(this);
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+    
+    /**
+    * This draws the axes
+    */
+    RGraph.HBar.prototype.DrawAxes = function ()
+    {
+        var halfway = (this.graphwidth / 2) + this.gutterLeft;
+
+        this.context.beginPath();
+        this.context.lineWidth   = 1;
+        this.context.strokeStyle = this.Get('chart.axis.color');
+
+        // Draw the Y axis
+        if (this.Get('chart.yaxispos') == 'center') {
+            this.context.moveTo(halfway, this.gutterTop);
+            this.context.lineTo(halfway, RGraph.GetHeight(this) - this.gutterBottom);
+        } else {
+            this.context.moveTo(this.gutterLeft, this.gutterTop);
+            this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+        }
+
+        // Draw the X axis
+        this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+        this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+
+        // Draw the Y tickmarks
+        var yTickGap = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / this.data.length;
+
+        for (y=this.gutterTop; y<(RGraph.GetHeight(this) - this.gutterBottom); y+=yTickGap) {
+            if (this.Get('chart.yaxispos') == 'center') {
+                this.context.moveTo(halfway + 3, y);
+                this.context.lineTo(halfway  - 3, y);
+            } else {
+                this.context.moveTo(this.gutterLeft, y);
+                this.context.lineTo( this.gutterLeft  - 3, y);
+            }
+        }
+
+
+        // Draw the X tickmarks
+        xTickGap = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight ) / 10;
+        yStart   = RGraph.GetHeight(this) - this.gutterBottom;
+        yEnd     = (RGraph.GetHeight(this) - this.gutterBottom) + 3;
+
+        for (x=(RGraph.GetWidth(this) - this.gutterRight), i=0; this.Get('chart.yaxispos') == 'center' ? x>=this.gutterLeft : x>this.gutterLeft; x-=xTickGap) {
+
+            if (this.Get('chart.yaxispos') != 'center' || i != 5) {
+                this.context.moveTo(x, yStart);
+                this.context.lineTo(x, yEnd);
+            }
+            i++;
+        }
+
+        this.context.stroke();
+    }
+
+
+    /**
+    * This draws the labels for the graph
+    */
+    RGraph.HBar.prototype.DrawLabels = function ()
+    {
+        var context    = this.context;
+        var canvas     = this.canvas;
+        var units_pre  = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+        var text_size  = this.Get('chart.text.size');
+        var font       = this.Get('chart.text.font');
+
+
+        /**
+        * Set the units to blank if they're to be used for ingraph labels only
+        */
+        if (this.Get('chart.units.ingraph')) {
+            units_pre  = '';
+            units_post = '';
+        }
+
+
+        /**
+        * Draw the X axis labels
+        */
+        if (this.Get('chart.xlabels')) {
+            this.context.beginPath();
+            this.context.fillStyle = this.Get('chart.text.color');
+
+            if (this.Get('chart.yaxispos') == 'center') {
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (10/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (9/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (8/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (7/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (6/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (4/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, '-' + RGraph.number_format(this, Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (3/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, '-' + RGraph.number_format(this, Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (2/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, '-' + RGraph.number_format(this, Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (1/10)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, '-' + RGraph.number_format(this, Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (0)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, '-' + RGraph.number_format(this, Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+    
+            } else {
+    
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (5/5)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (4/5)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (3/5)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (2/5)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                RGraph.Text(context, font, text_size, this.gutterLeft + (this.graphwidth * (1/5)), this.gutterTop + this.halfTextHeight + this.graphheight + 2, RGraph.number_format(this, Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', 'center');
+                
+                if (this.Get('chart.xmin') > 0) {
+                    RGraph.Text(context,font,text_size,this.gutterLeft,this.gutterTop + this.halfTextHeight + this.graphheight + 2,RGraph.number_format(this, this.Get('chart.xmin'), units_pre, units_post),'center','center');
+                }
+            }
+            
+            this.context.fill();
+            this.context.stroke();
+        }
+
+        /**
+        * The Y axis labels
+        */
+        if (typeof(this.Get('chart.labels')) == 'object') {
+        
+            var xOffset = 5;
+            var font    = this.Get('chart.text.font');
+
+            // Draw the X axis labels
+            this.context.fillStyle = this.Get('chart.text.color');
+            
+            // How wide is each bar
+            var barHeight = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom ) / this.Get('chart.labels').length;
+            
+            // Reset the xTickGap
+            yTickGap = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / this.Get('chart.labels').length
+
+            // Draw the X tickmarks
+            var i=0;
+            for (y=this.gutterTop + (yTickGap / 2); y<=RGraph.GetHeight(this) - this.gutterBottom; y+=yTickGap) {
+                RGraph.Text(this.context, font,this.Get('chart.text.size'),this.gutterLeft - xOffset,y,String(this.Get('chart.labels')[i++]),'center','right');
+            }
+        }
+    }
+    
+    
+    /**
+    * This function draws the actual bars
+    */
+    RGraph.HBar.prototype.Drawbars = function ()
+    {
+        this.context.lineWidth   = 1;
+        this.context.strokeStyle = this.Get('chart.strokestyle');
+        this.context.fillStyle   = this.Get('chart.colors')[0];
+        var prevX                = 0;
+        var prevY                = 0;
+
+        /**
+        * Work out the max value
+        */
+        if (this.Get('chart.xmax')) {
+            this.scale = [
+                          (((this.Get('chart.xmax') - this.Get('chart.xmin')) * 0.2) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')),
+                          (((this.Get('chart.xmax') - this.Get('chart.xmin')) * 0.4) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')),
+                          (((this.Get('chart.xmax') - this.Get('chart.xmin')) * 0.6) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')),
+                          (((this.Get('chart.xmax') - this.Get('chart.xmin')) * 0.8) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')),
+                          (((this.Get('chart.xmax') - this.Get('chart.xmin')) + this.Get('chart.xmin'))).toFixed(this.Get('chart.scale.decimals'))
+                         ];
+            this.max = this.scale[4];
+        
+        } else {
+        
+            var grouping = this.Get('chart.grouping');
+
+            for (i=0; i<this.data.length; ++i) {
+                if (typeof(this.data[i]) == 'object') {
+                    var value = grouping == 'grouped' ? Number(RGraph.array_max(this.data[i], true)) : Number(RGraph.array_sum(this.data[i])) ;
+                } else {
+                    var value = Number(Math.abs(this.data[i]));
+                }
+
+                this.max = Math.max(Math.abs(this.max), Math.abs(value));
+            }
+
+            this.scale = RGraph.getScale(this.max, this);
+
+            /**
+            * Account for chart.xmin
+            */
+            if (this.Get('chart.xmin') > 0) {
+                this.scale[0] = Number((((this.scale[4] - this.Get('chart.xmin')) * 0.2) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')));
+                this.scale[1] = Number((((this.scale[4] - this.Get('chart.xmin')) * 0.4) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')));
+                this.scale[2] = Number((((this.scale[4] - this.Get('chart.xmin')) * 0.6) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')));
+                this.scale[3] = Number((((this.scale[4] - this.Get('chart.xmin')) * 0.8) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')));
+                this.scale[4] = Number((((this.scale[4] - this.Get('chart.xmin')) * 1.0) + this.Get('chart.xmin')).toFixed(this.Get('chart.scale.decimals')));
+            }
+
+            this.max = this.scale[4];
+        }
+
+        if (this.Get('chart.scale.decimals') == null && Number(this.max) == 1) {
+            this.Set('chart.scale.decimals', 1);
+        }
+        
+        /*******************************************************
+        * This is here to facilitate sequential colors
+        *******************************************************/
+        var colorIdx = 0;
+
+        /**
+        * The bars are drawn HERE
+        */
+        var graphwidth = (this.canvas.width - this.gutterLeft - this.gutterRight);
+        var halfwidth  = graphwidth / 2;
+
+        for (i=0; i<this.data.length; ++i) {
+
+            // Work out the width and height
+            var width  = (this.data[i] / this.max) *  graphwidth;
+            var height = this.graphheight / this.data.length;
+
+            var orig_height = height;
+
+            var x       = this.gutterLeft;
+            var y       = this.gutterTop + (i * height);
+            var vmargin = this.Get('chart.vmargin');
+
+            // Account for negative lengths - Some browsers (eg Chrome) don't like a negative value
+            if (width < 0) {
+                x -= width;
+                width = Math.abs(width);
+            }
+
+            /**
+            * Turn on the shadow if need be
+            */
+            if (this.Get('chart.shadow')) {
+                this.context.shadowColor   = this.Get('chart.shadow.color');
+                this.context.shadowBlur    = this.Get('chart.shadow.blur');
+                this.context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+                this.context.shadowOffsetY = this.Get('chart.shadow.offsety');
+            }
+
+            /**
+            * Draw the bar
+            */
+            this.context.beginPath();
+                if (typeof(this.data[i]) == 'number') {
+
+                    var barHeight = height - (2 * vmargin);
+                    var barWidth  = ((this.data[i] - this.Get('chart.xmin')) / (this.max - this.Get('chart.xmin'))) * this.graphwidth;
+                    var barX      = this.gutterLeft;
+
+                    // Account for Y axis pos
+                    if (this.Get('chart.yaxispos') == 'center') {
+                        barWidth /= 2;
+                        barX += halfwidth;
+                    }
+
+                    // Set the fill color
+                    this.context.strokeStyle = this.Get('chart.strokestyle');
+                    this.context.fillStyle = this.Get('chart.colors')[0];
+                    
+                    // Sequential colors
+                    if (this.Get('chart.colors.sequential')) {
+                        this.context.fillStyle = this.Get('chart.colors')[colorIdx++];
+                    }
+
+                    this.context.strokeRect(barX, this.gutterTop + (i * height) + this.Get('chart.vmargin'), barWidth, barHeight);
+                    this.context.fillRect(barX, this.gutterTop + (i * height) + this.Get('chart.vmargin'), barWidth, barHeight);
+
+                    this.coords.push([barX,
+                                      y + vmargin,
+                                      barWidth,
+                                      height - (2 * vmargin),
+                                      this.context.fillStyle,
+                                      this.data[i],
+                                      true]);
+
+                /**
+                * Stacked bar chart
+                */
+                } else if (typeof(this.data[i]) == 'object' && this.Get('chart.grouping') == 'stacked') {
+
+                    if (this.Get('chart.yaxispos') == 'center') {
+                        alert('[HBAR] You can\'t have a stacked chart with the Y axis in the center, change it to grouped');
+                    }
+
+                    var barHeight = height - (2 * vmargin);
+
+                    for (j=0; j<this.data[i].length; ++j) {
+                    
+
+                        // Set the fill/stroke colors
+                        this.context.strokeStyle = this.Get('chart.strokestyle');
+                        this.context.fillStyle = this.Get('chart.colors')[j];
+                        
+
+                        // Sequential colors
+                        if (this.Get('chart.colors.sequential')) {
+                            this.context.fillStyle = this.Get('chart.colors')[colorIdx++];
+                        }
+                        
+
+                        var width = (((this.data[i][j]) / (this.max))) * this.graphwidth;
+                        var totalWidth = (RGraph.array_sum(this.data[i]) / this.max) * this.graphwidth;
+
+                        this.context.strokeRect(x, this.gutterTop + this.Get('chart.vmargin') + (this.graphheight / this.data.length) * i, width, height - (2 * vmargin) );
+                        this.context.fillRect(x, this.gutterTop + this.Get('chart.vmargin') + (this.graphheight / this.data.length) * i, width, height - (2 * vmargin) );
+
+                        /**
+                        * Store the coords for tooltips
+                        */
+
+                        // The last property of this array is a boolean which tells you whether the value is the last or not
+                        this.coords.push([x,
+                                          y + vmargin,
+                                          width,
+                                          height - (2 * vmargin),
+                                          this.context.fillStyle,
+                                          RGraph.array_sum(this.data[i]),
+                                          j == (this.data[i].length - 1)
+                                         ]);
+
+                        x += width;
+                    }
+
+                /**
+                * A grouped bar chart
+                */
+                } else if (typeof(this.data[i]) == 'object' && this.Get('chart.grouping') == 'grouped') {
+
+                    for (j=0; j<this.data[i].length; ++j) {
+
+                        /**
+                        * Turn on the shadow if need be
+                        */
+                        if (this.Get('chart.shadow')) {
+                            RGraph.SetShadow(this, this.Get('chart.shadow.color'), this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));
+                        }
+
+                        // Set the fill/stroke colors
+                        this.context.strokeStyle = this.Get('chart.strokestyle');
+                        this.context.fillStyle = this.Get('chart.colors')[j];
+                        
+
+                        // Sequential colors
+                        if (this.Get('chart.colors.sequential')) {
+                            this.context.fillStyle = this.Get('chart.colors')[colorIdx++];
+                        }
+
+                        var width = ((this.data[i][j] - this.Get('chart.xmin')) / (this.max - this.Get('chart.xmin'))) * (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight );
+                        var individualBarHeight = (height - (2 * vmargin)) / this.data[i].length;
+
+                        var startX = this.gutterLeft;
+                        var startY = y + vmargin + (j * individualBarHeight);
+
+                        // Account for the Y axis being in the middle
+                        if (this.Get('chart.yaxispos') == 'center') {
+                            width  /= 2;
+                            startX += halfwidth;
+                        }
+                        
+                        if (width < 0) {
+                            startX += width;
+                            width *= -1;
+                        }
+
+                        this.context.strokeRect(startX, startY, width, individualBarHeight);
+                        this.context.fillRect(startX, startY, width, individualBarHeight);
+
+                        this.coords.push([startX,
+                                          startY,
+                                          width,
+                                          individualBarHeight,
+                                          this.context.fillStyle,
+                                          this.data[i][j],
+                                          true]);
+                    }
+                }
+
+            this.context.closePath();
+        }
+
+        this.context.fill();
+        this.context.stroke();
+
+
+
+        /**
+        * Now the bars are stroke()ed, turn off the shadow
+        */
+        RGraph.NoShadow(this);
+        
+        this.RedrawBars();
+    }
+    
+    
+    /**
+    * This function goes over the bars after they been drawn, so that upwards shadows are underneath the bars
+    */
+    RGraph.HBar.prototype.RedrawBars = function ()
+    {
+        if (this.Get('chart.noredraw')) {
+            return;
+        }
+
+        var coords = this.coords;
+
+        var font   = this.Get('chart.text.font');
+        var size   = this.Get('chart.text.size');
+        var color  = this.Get('chart.text.color');
+
+        RGraph.NoShadow(this);
+        this.context.strokeStyle = this.Get('chart.strokestyle');
+
+        for (var i=0; i<coords.length; ++i) {
+
+            if (this.Get('chart.shadow')) {
+                this.context.beginPath();
+                    this.context.strokeStyle = this.Get('chart.strokestyle');
+                    this.context.fillStyle = coords[i][4];
+                    this.context.lineWidth = 1;
+                    this.context.strokeRect(coords[i][0], coords[i][1], coords[i][2], coords[i][3]);
+                    this.context.fillRect(coords[i][0], coords[i][1], coords[i][2], coords[i][3]);
+                this.context.fill();
+                this.context.stroke();
+            }
+
+            /**
+            * Draw labels "above" the bar
+            */
+            if (this.Get('chart.labels.above') && coords[i][6]) {
+
+                this.context.fillStyle   = color;
+                this.context.strokeStyle = 'black';
+                RGraph.NoShadow(this);
+
+                var border = (coords[i][0] + coords[i][2] + 7 + this.context.measureText(this.Get('chart.units.pre') + this.coords[i][5] + this.Get('chart.units.post')).width) > RGraph.GetWidth(this) ? true : false;
+
+                RGraph.Text(this.context,
+                            font,
+                            size,
+                            coords[i][0] + coords[i][2] + (border ? -5 : 5),
+                            coords[i][1] + (coords[i][3] / 2),
+                            RGraph.number_format(this, (this.coords[i][5]).toFixed(this.Get('chart.labels.above.decimals')), this.Get('chart.units.pre'), this.Get('chart.units.post')),
+                            'center',
+                            border ? 'right' : 'left',
+                            border,
+                            null,
+                            border ? 'rgba(255,255,255,0.9)' : null);
+            }
+        }
+    }
+    
+    
+    /*******************************************************
+    * This function can be used to get the appropriate bar information (if any)
+    * 
+    * @param  e Event object
+    * @return   Appriate bar information (if any)
+    *******************************************************/
+    RGraph.HBar.prototype.getBar = function (e)
+    {
+        var obj         = e.target.__object__;
+        var canvas      = obj.canvas;
+        var context     = obj.context;
+        var mouseCoords = RGraph.getMouseXY(e);
+
+        /**
+        * Loop through the bars determining if the mouse is over a bar
+        */
+        for (var i=0,len=obj.coords.length; i<len; i++) {
+
+            var mouseX = mouseCoords[0];  // In relation to the canvas
+            var mouseY = mouseCoords[1];  // In relation to the canvas
+            var left   = obj.coords[i][0];
+            var top    = obj.coords[i][1];
+            var width  = obj.coords[i][2];
+            var height = obj.coords[i][3];
+            var idx    = i;
+
+            if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
+                return [left, top, width, height, idx];
+            }
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.hprogress.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.hprogress.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.hprogress.js	(revision 225)
@@ -0,0 +1,591 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The progress bar constructor
+    * 
+    * @param int id    The ID of the canvas tag
+    * @param int value The indicated value of the meter.
+    * @param int max   The end value (the upper most) of the meter
+    */
+    RGraph.HProgress = function (id, value, max)
+    {
+        this.id                = id;
+        this.max               = max;
+        this.value             = value;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.canvas.__object__ = this;
+        this.type              = 'hprogress';
+        this.coords            = [];
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        this.properties = {
+            'chart.min':                0,
+            'chart.colors':             ['#0c0'],
+            'chart.tickmarks':          true,
+            'chart.tickmarks.color':    'black',
+            'chart.tickmarks.inner':    false,
+            'chart.gutter.left':        25,
+            'chart.gutter.right':       25,
+            'chart.gutter.top':         25,
+            'chart.gutter.bottom':      25,
+            'chart.numticks':           10,
+            'chart.numticks.inner':     50,
+            'chart.background.color':   '#eee',
+            'chart.shadow':             false,
+            'chart.shadow.color':       'rgba(0,0,0,0.5)',
+            'chart.shadow.blur':        3,
+            'chart.shadow.offsetx':     3,
+            'chart.shadow.offsety':     3,
+            'chart.title':              '',
+            'chart.title.background':   null,
+            'chart.title.hpos':         null,
+            'chart.title.vpos':         null,
+            'chart.width':              0,
+            'chart.height':             0,
+            'chart.text.size':          10,
+            'chart.text.color':         'black',
+            'chart.text.font':          'Verdana',
+            'chart.contextmenu':        null,
+            'chart.units.pre':          '',
+            'chart.units.post':         '',
+            'chart.tooltips':           [],
+            'chart.tooltips.effect':    'fade',
+            'chart.tooltips.css.class': 'RGraph_tooltip',
+            'chart.tooltips.highlight': true,
+            'chart.highlight.stroke':   'black',
+            'chart.highlight.fill':     'rgba(255,255,255,0.5)',
+            'chart.annotatable':        false,
+            'chart.annotate.color':     'black',
+            'chart.zoom.mode':          'canvas',
+            'chart.zoom.factor':        1.5,
+            'chart.zoom.fade.in':       true,
+            'chart.zoom.fade.out':      true,
+            'chart.zoom.hdir':          'right',
+            'chart.zoom.vdir':          'down',
+            'chart.zoom.frames':        10,
+            'chart.zoom.delay':         50,
+            'chart.zoom.shadow':        true,
+            'chart.zoom.background':    true,
+            'chart.zoom.thumbnail.width': 100,
+            'chart.zoom.thumbnail.height': 100,
+            'chart.arrows':             false,
+            'chart.margin':             0,
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.label.inner':        false,
+            'chart.adjustable':         false,
+            'chart.scale.decimals':     0,
+            'chart.key':                [],
+            'chart.key.background':     'white',
+            'chart.key.position':       'gutter',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':         false,
+            'chart.key.shadow.color':   '#666',
+            'chart.key.shadow.blur':    3,
+            'chart.key.shadow.offsetx': 2,
+            'chart.key.shadow.offsety': 2,
+            'chart.key.position.gutter.boxed': false,
+            'chart.key.position.x':     null,
+            'chart.key.position.y':     null,
+            'chart.key.color.shape':    'square',
+            'chart.key.rounded':        true,
+            'chart.key.linewidth':      1,
+            'chart.key.color.shape':    'square',
+            'chart.labels.position':     'bottom'
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[PROGRESS] No canvas support');
+            return;
+        }
+    }
+
+
+    /**
+    * A generic setter
+    * 
+    * @param string name  The name of the property to set
+    * @param string value The value of the poperty
+    */
+    RGraph.HProgress.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A generic getter
+    * 
+    * @param string name  The name of the property to get
+    */
+    RGraph.HProgress.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+
+    /**
+    * Draws the progress bar
+    */
+    RGraph.HProgress.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // Figure out the width and height
+        this.width  = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        this.height = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        this.coords = [];
+
+        this.Drawbar();
+        this.DrawTickMarks();
+        this.DrawLabels();
+
+        this.context.stroke();
+        this.context.fill();
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * Alternatively, show the tooltip if requested
+        */
+        if (typeof(this.Get('chart.tooltips')) == 'function' || this.Get('chart.tooltips').length) {
+
+            // Need to register this object for redrawing
+            RGraph.Register(this);
+
+            /**
+            * Install the window onclick handler
+            */
+            var window_onclick = function ()
+            {
+                RGraph.Redraw();
+            }
+            window.addEventListener('click', window_onclick, false);
+            RGraph.AddEventListener('window_' + this.id, 'click', window_onclick);
+
+
+            /**
+            * Install the onclick event handler for the tooltips
+            */
+            var canvas_onclick_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id);
+                var obj = canvas.__object__;
+
+                /**
+                * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn
+                * This "deselects" any already selected bar
+                */
+                RGraph.Redraw();
+    
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+
+                    var mouseX = mouseCoords[0];
+                    var mouseY = mouseCoords[1];
+                    var left   = obj.coords[i][0];
+                    var top    = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+                    var idx    = i;
+
+                    if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
+    
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[idx](idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = obj.Get('chart.tooltips')[idx];
+
+                        } else {
+                            var text = null;
+                        }
+
+                        /**
+                        * Show a tooltip if it's defined
+                        */
+                        if (text) {
+
+                            obj.context.beginPath();
+                            obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                            obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                            obj.context.strokeRect(left, top, width, height);
+                            obj.context.fillRect(left, top, width, height);
+        
+                            obj.context.stroke();
+                            obj.context.fill();
+
+                            RGraph.Tooltip(canvas, text, e.pageX, e.pageY, i);
+                        }
+                    }
+                }
+
+                /**
+                * Stop the event bubbling
+                */
+                e.stopPropagation();
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+
+            /**
+            * If the cursor is over a hotspot, change the cursor to a hand
+            */
+            var canvas_onmousemove_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id);
+                var obj = canvas.__object__;
+
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+
+                    var mouseX = mouseCoords[0];  // In relation to the canvas
+                    var mouseY = mouseCoords[1];  // In relation to the canvas
+                    var left   = obj.coords[i][0];
+                    var top    = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+
+                    if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
+                        canvas.style.cursor = 'pointer';
+                        break;
+                    }
+                    
+                    canvas.style.cursor = 'default';
+                }
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+
+
+        // Draw the key if necessary
+        if (this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Instead of using RGraph.common.adjusting.js, handle them here
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    /**
+    * Draws the bar
+    */
+    RGraph.HProgress.prototype.Drawbar = function ()
+    {
+        // Set a shadow if requested
+        if (this.Get('chart.shadow')) {
+            RGraph.SetShadow(this, this.Get('chart.shadow.color'), this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));
+        }
+
+        // Draw the shadow for MSIE
+        if (RGraph.isIE8() && this.Get('chart.shadow')) {
+            this.context.fillStyle = this.Get('chart.shadow.color');
+            this.context.fillRect(this.gutterLeft + this.Get('chart.shadow.offsetx'), this.gutterTop + this.Get('chart.shadow.offsety'), this.width, this.height);
+        }
+
+        // Draw the outline
+        this.context.fillStyle   = this.Get('chart.background.color');
+        this.context.strokeStyle = 'black';
+        this.context.strokeRect(this.gutterLeft, this.gutterTop, this.width, this.height);
+        this.context.fillRect(this.gutterLeft, this.gutterTop, this.width, this.height);
+
+        // Turn off any shadow
+        RGraph.NoShadow(this);
+
+        this.context.fillStyle   = this.Get('chart.color');
+        this.context.strokeStyle = 'black';
+        
+        var margin = this.Get('chart.margin');
+
+        // Draw the actual bar itself
+        var barWidth = Math.min(this.width, ((RGraph.array_sum(this.value) - this.Get('chart.min')) / (this.max - this.Get('chart.min')) ) * this.width);
+
+        if (this.Get('chart.tickmarks.inner')) {
+
+            var spacing = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / this.Get('chart.numticks.inner');
+
+            this.context.lineWidth   = 1;
+            this.context.strokeStyle = '#999';
+
+            this.context.beginPath();
+            for (var x = this.gutterLeft; x<RGraph.GetWidth(this) - this.gutterRight; x+=spacing) {
+                this.context.moveTo(x, this.gutterTop);
+                this.context.lineTo(x, this.gutterTop + 2);
+
+                this.context.moveTo(x, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(x, RGraph.GetHeight(this) - this.gutterBottom - 2);
+            }
+            this.context.stroke();
+        }
+        
+        /**
+        * This bit draws the actual progress bar
+        */
+        if (typeof(this.value) == 'number') {
+            this.context.beginPath();
+            this.context.strokeStyle = 'black';
+            this.context.fillStyle = this.Get('chart.colors')[0];
+            this.context.strokeRect(this.gutterLeft, this.gutterTop + margin, barWidth, this.height - margin - margin);
+            this.context.fillRect(this.gutterLeft, this.gutterTop + margin, barWidth, this.height - margin - margin);
+
+            // Store the coords
+            this.coords.push([this.gutterLeft,
+                              this.gutterTop + margin,
+                              barWidth,
+                              this.height - margin - margin]);
+
+        } else if (typeof(this.value) == 'object') {
+
+            this.context.beginPath();
+            this.context.strokeStyle = 'black';
+
+            var startPoint = this.gutterLeft;
+            
+            for (var i=0; i<this.value.length; ++i) {
+
+                var segmentLength = (this.value[i] / RGraph.array_sum(this.value)) * barWidth;
+                this.context.fillStyle = this.Get('chart.colors')[i];
+
+                this.context.strokeRect(startPoint, this.gutterTop + margin, segmentLength, this.height - margin - margin);
+                this.context.fillRect(startPoint, this.gutterTop + margin, segmentLength, this.height - margin - margin);
+
+
+                // Store the coords
+                this.coords.push([startPoint,
+                                  this.gutterTop + margin,
+                                  segmentLength,
+                                  this.height - margin - margin]);
+
+                startPoint += segmentLength;
+            }
+        }
+
+        /**
+        * Draw the arrows indicating the level if requested
+        */
+        if (this.Get('chart.arrows')) {
+            var x = this.gutterLeft + barWidth;
+            var y = this.gutterTop;
+            
+            this.context.lineWidth = 1;
+            this.context.fillStyle = 'black';
+            this.context.strokeStyle = 'black';
+
+            this.context.beginPath();
+                this.context.moveTo(x, y - 3);
+                this.context.lineTo(x + 2, y - 7);
+                this.context.lineTo(x - 2, y - 7);
+            this.context.closePath();
+
+            this.context.stroke();
+            this.context.fill();
+
+            this.context.beginPath();
+                this.context.moveTo(x, y + this.height + 4);
+                this.context.lineTo(x + 2, y + this.height + 9);
+                this.context.lineTo(x - 2, y + this.height + 9);
+            this.context.closePath();
+
+            this.context.stroke();
+            this.context.fill()
+
+
+            /**
+            * Draw the "in-bar" label
+            */
+            if (this.Get('chart.label.inner')) {
+                this.context.beginPath();
+                this.context.fillStyle = 'black';
+                RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size') + 2, this.gutterLeft + barWidth + 5, RGraph.GetHeight(this) / 2, String(this.Get('chart.units.pre') + this.value + this.Get('chart.units.post')), 'center', 'left');
+                this.context.fill();
+            }
+        }
+
+    }
+
+    /**
+    * The function that draws the tick marks. Apt name...
+    */
+    RGraph.HProgress.prototype.DrawTickMarks = function ()
+    {
+        var context = this.context;
+
+        context.strokeStyle = this.Get('chart.tickmarks.color');
+
+        if (this.Get('chart.tickmarks')) {
+            
+            this.context.beginPath();        
+
+            // This is used by the label function below
+            this.tickInterval = this.width / this.Get('chart.numticks');
+            
+            var start   = this.Get('chart.tickmarks.zerostart') ? 0 : this.tickInterval;
+
+            if (this.Get('chart.labels.position') == 'top') {
+                for (var i=this.gutterLeft + start; i<=(this.width + this.gutterLeft + 0.1); i+=this.tickInterval) {
+                    context.moveTo(i, this.gutterTop);
+                    context.lineTo(i, this.gutterTop - 4);
+                }
+
+            } else {
+
+                for (var i=this.gutterLeft + start; i<=(this.width + this.gutterLeft + 0.1); i+=this.tickInterval) {
+                    context.moveTo(i, this.gutterTop + this.height);
+                    context.lineTo(i, this.gutterTop + this.height + 4);
+                }
+            }
+
+            this.context.stroke();
+        }
+    }
+
+
+    /**
+    * The function that draws the labels
+    */
+    RGraph.HProgress.prototype.DrawLabels = function ()
+    {
+        var context = this.context;
+        this.context.fillStyle = this.Get('chart.text.color');
+
+        var xPoints = [];
+        var yPoints = [];
+
+        for (i=0; i<this.Get('chart.numticks'); i++) {
+
+            var font       = this.Get('chart.text.font');
+            var size       = this.Get('chart.text.size');
+
+            if (this.Get('chart.labels.position') == 'top') {
+                var x = this.width * (i/this.Get('chart.numticks')) + this.gutterLeft + (this.width / this.Get('chart.numticks'));
+                var y = this.gutterTop - 6;
+                var valign = 'bottom';
+            } else {
+                var x = this.width * (i/this.Get('chart.numticks')) + this.gutterLeft + (this.width / this.Get('chart.numticks'));
+                var y = this.height + this.gutterTop + 4;
+                var valign = 'top';
+            }
+                
+            RGraph.Text(this.context,font,size,x,y,this.Get('chart.units.pre') + String((((this.max - this.Get('chart.min')) / this.Get('chart.numticks') ) * (i + 1) + this.Get('chart.min')).toFixed(this.Get('chart.scale.decimals'))) + this.Get('chart.units.post'),valign,'center');
+        }
+
+        if (this.Get('chart.tickmarks.zerostart')) {
+            if (this.Get('chart.labels.position') == 'top') {
+                RGraph.Text(this.context,font,size,this.gutterLeft,this.gutterTop - 6,this.Get('chart.units.pre') + Number(this.Get('chart.min')).toFixed(this.Get('chart.scale.decimals')) + this.Get('chart.units.post'),'bottom','center');
+            } else {
+                RGraph.Text(this.context,font,size,this.gutterLeft,this.canvas.height - this.gutterBottom + 5,this.Get('chart.units.pre') + Number(this.Get('chart.min')).toFixed(this.Get('chart.scale.decimals')) + this.Get('chart.units.post'),'top','center');
+            }
+        }
+
+
+
+        // Draw the title text
+        if (this.Get('chart.title')) {
+            RGraph.DrawTitle(this.canvas,
+                             this.Get('chart.title'),
+                             this.gutterTop + this.Get('chart.text.size'),
+                             0,
+                             this.Get('chart.text.size') + 2);
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.led.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.led.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.led.js	(revision 225)
@@ -0,0 +1,232 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The LED lights constructor
+    * 
+    * @param object canvas The canvas object
+    * @param array  data   The chart data
+    */
+    RGraph.LED = function (id, text)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.type              = 'led';
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        /**
+        * Set the string that is to be displayed
+        */
+        this.text = text;
+        
+        /**
+        * The letters and numbers
+        */
+        this.lights = {
+            'a': [[0,1,1,0],[1,0,0,1],[1,0,0,1],[1,1,1,1],[1,0,0,1],[1,0,0,1],[1,0,0,1]],
+            'b': [[1,1,1,0],[1,0,0,1],[1,0,0,1],[1,1,1,0],[1,0,0,1],[1,0,0,1],[1,1,1,0]],
+            'c': [[0,1,1,0],[1,0,0,1],[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,0,0,1],[0,1,1,0]],
+            'd': [[1,1,1,0],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,1,1,0]],
+            'e': [[1,1,1,1],[1,0,0,0],[1,0,0,0],[1,1,1,0],[1,0,0,0],[1,0,0,0],[1,1,1,1]],
+            'f': [[1,1,1,1],[1,0,0,0],[1,0,0,0],[1,1,1,0],[1,0,0,0],[1,0,0,0],[1,0,0,0]],
+            'g': [[0,1,1,0],[1,0,0,1],[1,0,0,0],[1,0,1,1],[1,0,0,1],[1,0,0,1],[0,1,1,0]],
+            'h': [[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,1,1,1],[1,0,0,1],[1,0,0,1],[1,0,0,1]],
+            'i': [[0,1,1,1],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,1,1,1]],
+            'j': [[0,1,1,1],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,1,0,0]],
+            'k': [[1,0,0,1],[1,0,0,1],[1,0,1,0],[1,1,0,0],[1,0,1,0],[1,0,0,1],[1,0,0,1]],
+            'l': [[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,0,0,0],[1,1,1,1]],
+            'm': [[1,0,0,1],[1,1,1,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1]],
+            'n': [[1,0,0,1],[1,1,0,1],[1,0,1,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1]],
+            'o': [[0,1,1,0],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[0,1,1,0]],
+            'p': [[1,1,1,0],[1,0,0,1],[1,0,0,1],[1,1,1,0],[1,0,0,0],[1,0,0,0],[1,0,0,0]],
+            'q': [[0,1,1,0],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,1,1],[0,1,1,1]],
+            'r': [[1,1,1,0],[1,0,0,1],[1,0,0,1],[1,1,1,0],[1,0,1,0],[1,0,0,1],[1,0,0,1]],
+            's': [[0,1,1,0],[1,0,0,1],[1,0,0,0],[0,1,1,0],[0,0,0,1],[1,0,0,1],[0,1,1,0]],
+            't': [[1,1,1,0],[0,1,0,0],[0,1,0,0],[0,1,0,0],[0,1,0,0],[0,1,0,0],[0,1,0,0]],
+            'u': [[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[0,1,1,0]],
+            'v': [[1,0,1],[1,0,1],[1,0,1],[1,0,1],[1,0,1],[0,1,0],[0,1,0]],
+            'w': [[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,1,1,1],[0,1,1,0]],
+            'x': [[0,1,0,1],[0,1,0,1],[0,1,0,1],[0,0,1,0],[0,1,0,1],[0,1,0,1],[0,1,0,1]],
+            'y': [[0,1,0,1],[0,1,0,1],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0]],
+            'z': [[1,1,1,1],[0,0,0,1],[0,0,1,0],[0,0,1,0],[0,1,0,0],[1,0,0,0],[1,1,1,1]],
+            ' ': [[],[],[],[],[], [], []],
+            '0': [[0,1,1,0],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[1,0,0,1],[0,1,1,0]],
+            '1': [[0,0,1,0],[0,1,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,0,1,0],[0,1,1,1]],
+            '2': [[0,1,1,0],[1,0,0,1],[0,0,0,1],[0,0,1,0],[0,1,,0],[1,0,0,0],[1,1,1,1]],
+            '3': [[0,1,1,0],[1,0,0,1],[0,0,0,1],[0,1,1,0],[0,0,0,1],[1,0,0,1],[0,1,1,0]],
+            '4': [[1,0,0,0],[1,0,0,0],[1,0,1,0],[1,0,1,0],[1,1,1,1],[0,0,1,0],[0,0,1,0]],
+            '5': [[1,1,1,1],[1,0,0,0],[1,0,0,0],[1,1,1,0],[0,0,0,1],[1,0,0,1],[0,1,1,0]],
+            '6': [[0,1,1,0],[1,0,0,1],[1,0,0,0],[1,1,1,0],[1,0,0,1],[1,0,0,1],[0,1,1,0]],
+            '7': [[1,1,1,1],[0,0,0,1],[0,0,0,1],[0,0,1,0],[0,1,0,0],[0,1,0,0],[0,1,0,0]],
+            '8': [[0,1,1,0],[1,0,0,1],[1,0,0,1],[0,1,1,0],[1,0,0,1],[1,0,0,1],[0,1,1,0]],
+            '9': [[0,1,1,1],[1,0,0,1],[1,0,0,1],[0,1,1,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]
+        }
+
+        // Various config type stuff
+        this.properties = {
+            'chart.background':    'white',
+            'chart.dark':          '#eee',
+            'chart.light':         '#f66',
+            'chart.zoom.factor':   1.5,
+            'chart.zoom.fade.in':  true,
+            'chart.zoom.fade.out': true,
+            'chart.zoom.hdir':     'right',
+            'chart.zoom.vdir':     'down',
+            'chart.zoom.frames':   10,
+            'chart.zoom.delay':    50,
+            'chart.zoom.shadow':   true,
+            'chart.zoom.background': true,
+            'chart.zoom.action':     'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.width':                    null,
+            'chart.height':                   null
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[LED] No canvas support');
+            return;
+        }
+    }
+
+
+    /**
+    * A setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.LED.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.LED.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+
+    /**
+    * This draws the LEDs
+    */
+    RGraph.LED.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+
+        // First clear the canvas, using the background colour
+        RGraph.Clear(this.canvas, this.Get('chart.background'));
+        
+        for (var l=0; l<this.text.length; l++) {
+            this.DrawLetter(this.text.charAt(l), l);
+        }
+        
+        /**
+        * Set the title attribute on the canvas
+        */
+        this.canvas.title = RGraph.rtrim(this.text);
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draws a single letter
+    * 
+    * @param string lights The lights to draw to draw
+    * @param int    index  The position of the letter
+    */
+    RGraph.LED.prototype.DrawLetter = function (letter, index)
+    {
+        var light    = this.Get('chart.light');
+        var dark     = this.Get('chart.dark');
+        var lights   = (this.lights[letter] ? this.lights[letter] : [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]);
+        var lwidth   = RGraph.GetWidth(this) / this.text.length;
+        var diameter = lwidth / 5;
+        var radius   = diameter / 2;
+
+        var lheight = diameter * 7;
+        if (lheight > RGraph.GetHeight(this)) {
+            lheight  = RGraph.GetHeight(this);
+            diameter = (lheight / 7);
+            radius   = (diameter / 2);
+            lwidth   = diameter * 5;
+        }
+
+        for (var i=0; i<7; i++) {
+            for (var j=0; j<5; j++) {
+
+                var x = (j * diameter) + (index * lwidth) + radius;
+                var y = ((i * diameter)) + radius;
+
+                // Draw a circle
+                this.context.fillStyle   = (lights[i][j] ? light : dark);
+                this.context.strokeStyle = (lights[i][j] ? '#ccc' : 'rgba(0,0,0,0)');
+                this.context.beginPath();
+                this.context.arc(x, y, radius, 0, 6.28, 0);
+
+                this.context.stroke();
+                this.context.fill();
+            }
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.line.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.line.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.line.js	(revision 225)
@@ -0,0 +1,2130 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The line chart constructor
+    * 
+    * @param object canvas The cxanvas object
+    * @param array  data   The chart data
+    * @param array  ...    Other lines to plot
+    */
+    RGraph.Line = function (id)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.type              = 'line';
+        this.max               = 0;
+        this.coords            = [];
+        this.coords2           = [];
+        this.coords.key        = [];
+        this.hasnegativevalues = false;
+        this.isRGraph          = true;
+
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        // Various config type stuff
+        this.properties = {
+            'chart.background.barcolor1':   'rgba(0,0,0,0)',
+            'chart.background.barcolor2':   'rgba(0,0,0,0)',
+            'chart.background.grid':        1,
+            'chart.background.grid.width':  1,
+            'chart.background.grid.hsize':  25,
+            'chart.background.grid.vsize':  25,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':           false,
+            'chart.background.grid.autofit.align':     false,
+            'chart.background.grid.autofit.numhlines': 7,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.background.hbars':       null,
+            'chart.background.image':       null,
+            'chart.labels':                 null,
+            'chart.labels.ingraph':         null,
+            'chart.labels.above':           false,
+            'chart.labels.above.size':      8,
+            'chart.xtickgap':               20,
+            'chart.smallxticks':            3,
+            'chart.largexticks':            5,
+            'chart.ytickgap':               20,
+            'chart.smallyticks':            3,
+            'chart.largeyticks':            5,
+            'chart.linewidth':              1.01,
+            'chart.colors':                 ['red', '#0f0', '#00f', '#f0f', '#ff0', '#0ff'],
+            'chart.hmargin':                0,
+            'chart.tickmarks.dot.color':    'white',
+            'chart.tickmarks':              null,
+            'chart.tickmarks.linewidth':    null,
+            'chart.ticksize':               3,
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.tickdirection':          -1,
+            'chart.yaxispoints':            5,
+            'chart.fillstyle':              null,
+            'chart.xaxispos':               'bottom',
+            'chart.yaxispos':               'left',
+            'chart.xticks':                 null,
+            'chart.text.size':              10,
+            'chart.text.angle':             0,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.ymin':                   null,
+            'chart.ymax':                   null,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             0.5,
+            'chart.title.xaxis':            '',
+            'chart.title.yaxis':            '',
+            'chart.title.xaxis.pos':        0.25,
+            'chart.title.yaxis.pos':        0.25,
+            'chart.shadow':                 false,
+            'chart.shadow.offsetx':         2,
+            'chart.shadow.offsety':         2,
+            'chart.shadow.blur':            3,
+            'chart.shadow.color':           'rgba(0,0,0,0.5)',
+            'chart.tooltips':               null,
+            'chart.tooltips.effect':         'fade',
+            'chart.tooltips.css.class':      'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.stroke':       '#999',
+            'chart.highlight.fill':         'white',
+            'chart.stepped':                false,
+            'chart.key':                    [],
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             null,
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.key.interactive':        false,
+            'chart.contextmenu':            null,
+            'chart.ylabels':                true,
+            'chart.ylabels.count':          5,
+            'chart.ylabels.inside':         false,
+            'chart.ylabels.invert':         false,
+            'chart.xlabels.inside':         false,
+            'chart.xlabels.inside.color':   'rgba(255,255,255,0.5)',
+            'chart.noaxes':                 false,
+            'chart.noyaxis':                false,
+            'chart.noxaxis':                false,
+            'chart.noendxtick':             false,
+            'chart.units.post':             '',
+            'chart.units.pre':              '',
+            'chart.scale.decimals':         null,
+            'chart.scale.point':            '.',
+            'chart.scale.thousand':         ',',
+            'chart.crosshairs':             false,
+            'chart.crosshairs.color':       '#333',
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.axesontop':              false,
+            'chart.filled':                 false,
+            'chart.filled.range':           false,
+            'chart.filled.accumulative':    true,
+            'chart.variant':                null,
+            'chart.axis.color':             'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            15,
+            'chart.zoom.delay':             33,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.backdrop':               false,
+            'chart.backdrop.size':          30,
+            'chart.backdrop.alpha':         0.2,
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.adjustable':             false,
+            'chart.noredraw':               false,
+            'chart.outofbounds':            false,
+            'chart.chromefix':              true,
+            'chart.draw.delegate':          null
+        }
+
+        /**
+        * Change null arguments to empty arrays
+        */
+        for (var i=1; i<arguments.length; ++i) {
+            if (typeof(arguments[i]) == 'null' || !arguments[i]) {
+                arguments[i] = [];
+            }
+        }
+
+
+        /**
+        * Store the original data. Thiss also allows for giving arguments as one big array.
+        */
+        this.original_data = [];
+
+        for (var i=1; i<arguments.length; ++i) {
+            if (arguments[1] && typeof(arguments[1]) == 'object' && arguments[1][0] && typeof(arguments[1][0]) == 'object' && arguments[1][0].length) {
+
+                var tmp = [];
+
+                for (var i=0; i<arguments[1].length; ++i) {
+                    tmp[i] = RGraph.array_clone(arguments[1][i]);
+                }
+
+                for (var j=0; j<tmp.length; ++j) {
+                    this.original_data[j] = RGraph.array_clone(tmp[j]);
+                }
+
+            } else {
+                this.original_data[i - 1] = RGraph.array_clone(arguments[i]);
+            }
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[LINE] Fatal error: no canvas support');
+            return;
+        }
+        
+        /**
+        * Store the data here as one big array
+        */
+        this.data_arr = [];
+
+        for (var i=1; i<arguments.length; ++i) {
+            for (var j=0; j<arguments[i].length; ++j) {
+                this.data_arr.push(arguments[i][j]);
+            }
+        }
+
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getPoint;
+    }
+
+
+    /**
+    * An all encompassing accessor
+    * 
+    * @param string name The name of the property
+    * @param mixed value The value of the property
+    */
+    RGraph.Line.prototype.Set = function (name, value)
+    {
+        // Consolidate the tooltips
+        if (name == 'chart.tooltips') {
+        
+            var tooltips = [];
+
+            for (var i=1; i<arguments.length; i++) {
+                if (typeof(arguments[i]) == 'object' && arguments[i][0]) {
+                    for (var j=0; j<arguments[i].length; j++) {
+                        tooltips.push(arguments[i][j]);
+                    }
+
+                } else if (typeof(arguments[i]) == 'function') {
+                    tooltips = arguments[i];
+
+                } else {
+                    tooltips.push(arguments[i]);
+                }
+            }
+
+            // Because "value" is used further down at the end of this function, set it to the expanded array os tooltips
+            value = tooltips;
+        }
+
+        /**
+        * Reverse the tickmarks to make them correspond to the right line
+        */
+        if (name == 'chart.tickmarks' && typeof(value) == 'object' && value) {
+            value = RGraph.array_reverse(value);
+        }
+        
+        /**
+        * Inverted Y axis should show the bottom end of the scale
+        */
+        if (name == 'chart.ylabels.invert' && value && this.Get('chart.ymin') == null) {
+            this.Set('chart.ymin', 0);
+        }
+        
+        /**
+        * If (buggy) Chrome and the linewidth is 1, change it to 1.01
+        */
+        if (name == 'chart.linewidth' && navigator.userAgent.match(/Chrome/)) {
+            if (value == 1) {
+                value = 1.01;
+            
+            } else if (RGraph.is_array(value)) {
+                for (var i=0; i<value.length; ++i) {
+                    if (typeof(value[i]) == 'number' && value[i] == 1) {
+                        value[i] = 1.01;
+                    }
+                }
+            }
+        }
+        
+        /**
+        * Check for xaxispos
+        */
+        if (name == 'chart.xaxispos' ) {
+            if (value != 'bottom' && value != 'center' && value != 'top') {
+                alert('[LINE] (' + this.id + ') chart.xaxispos should be top, center or bottom. Tried to set it to: ' + value + ' Changing it to center');
+                value = 'center';
+            }
+        }
+
+        this.properties[name] = value;
+    }
+
+
+    /**
+    * An all encompassing accessor
+    * 
+    * @param string name The name of the property
+    */
+    RGraph.Line.prototype.Get = function (name)
+    {
+        return this.properties[name];
+    }
+
+
+    /**
+    * The function you call to draw the line chart
+    */
+    RGraph.Line.prototype.Draw = function ()
+    {
+        // MUST be the first thing done!
+        if (typeof(this.Get('chart.background.image')) == 'string' && !this.__background_image__) {
+            RGraph.DrawBackgroundImage(this);
+            return;
+        }
+
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+
+        /**
+        * Check for Chrome 6 and shadow
+        * 
+        * TODO Remove once it's been fixed (for a while)
+        * SEARCH TAGS: CHROME FIX SHADOW BUG
+        */
+        if (   this.Get('chart.shadow')
+            && navigator.userAgent.match(/Chrome/)
+            && this.Get('chart.linewidth') <= 1
+            && this.Get('chart.chromefix')
+            && this.Get('chart.shadow.blur') > 0) {
+                alert('[RGRAPH WARNING] Chrome has a shadow bug, meaning you should increase the linewidth to at least 1.01');
+        }
+
+
+        // Reset the data back to that which was initially supplied
+        this.data = RGraph.array_clone(this.original_data);
+
+
+        // Reset the max value
+        this.max = 0;
+
+        /**
+        * Reverse the datasets so that the data and the labels tally
+        */
+        this.data = RGraph.array_reverse(this.data);
+
+        if (this.Get('chart.filled') && !this.Get('chart.filled.range') && this.data.length > 1 && this.Get('chart.filled.accumulative')) {
+
+            var accumulation = [];
+        
+            for (var set=0; set<this.data.length; ++set) {
+                for (var point=0; point<this.data[set].length; ++point) {
+                    this.data[set][point] = Number(accumulation[point] ? accumulation[point] : 0) + this.data[set][point];
+                    accumulation[point] = this.data[set][point];
+                }
+            }
+        }
+
+        /**
+        * Get the maximum Y scale value
+        */
+        if (this.Get('chart.ymax')) {
+            
+            this.max = this.Get('chart.ymax');
+            this.min = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0;
+
+            this.scale = [
+                          ( ((this.max - this.min) * (1/5)) + this.min).toFixed(this.Get('chart.scale.decimals')),
+                          ( ((this.max - this.min) * (2/5)) + this.min).toFixed(this.Get('chart.scale.decimals')),
+                          ( ((this.max - this.min) * (3/5)) + this.min).toFixed(this.Get('chart.scale.decimals')),
+                          ( ((this.max - this.min) * (4/5)) + this.min).toFixed(this.Get('chart.scale.decimals')),
+                          this.max.toFixed(this.Get('chart.scale.decimals'))
+                         ];
+
+            // Check for negative values
+            if (!this.Get('chart.outofbounds')) {
+                for (dataset=0; dataset<this.data.length; ++dataset) {
+                    for (var datapoint=0; datapoint<this.data[dataset].length; datapoint++) {
+            
+                        // Check for negative values
+                        this.hasnegativevalues = (this.data[dataset][datapoint] < 0) || this.hasnegativevalues;
+                    }
+                }
+            }
+
+        } else {
+
+            this.min = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0;
+
+            // Work out the max Y value
+            for (dataset=0; dataset<this.data.length; ++dataset) {
+                for (var datapoint=0; datapoint<this.data[dataset].length; datapoint++) {
+    
+                    this.max = Math.max(this.max, this.data[dataset][datapoint] ? Math.abs(parseFloat(this.data[dataset][datapoint])) : 0);
+    
+                    // Check for negative values
+                    if (!this.Get('chart.outofbounds')) {
+                        this.hasnegativevalues = (this.data[dataset][datapoint] < 0) || this.hasnegativevalues;
+                    }
+                }
+            }
+
+            // 20th April 2009 - moved out of the above loop
+            this.scale = RGraph.getScale(Math.abs(parseFloat(this.max)), this);
+            this.max   = this.scale[4] ? this.scale[4] : 0;
+
+            if (this.Get('chart.ymin')) {
+                this.scale[0] = ((this.max - this.Get('chart.ymin')) * (1/5)) + this.Get('chart.ymin');
+                this.scale[1] = ((this.max - this.Get('chart.ymin')) * (2/5)) + this.Get('chart.ymin');
+                this.scale[2] = ((this.max - this.Get('chart.ymin')) * (3/5)) + this.Get('chart.ymin');
+                this.scale[3] = ((this.max - this.Get('chart.ymin')) * (4/5)) + this.Get('chart.ymin');
+                this.scale[4] = ((this.max - this.Get('chart.ymin')) * (5/5)) + this.Get('chart.ymin');
+            }
+
+            if (typeof(this.Get('chart.scale.decimals')) == 'number') {
+                this.scale[0] = Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[1] = Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[2] = Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[3] = Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[4] = Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals'));
+            }
+        }
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * Reset the coords array otherwise it will keep growing
+        */
+        this.coords = [];
+
+        /**
+        * Work out a few things. They need to be here because they depend on things you can change before you
+        * call Draw() but after you instantiate the object
+        */
+        this.grapharea      = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        this.halfgrapharea  = this.grapharea / 2;
+        this.halfTextHeight = this.Get('chart.text.size') / 2;
+
+        // Check the combination of the X axis position and if there any negative values
+        //
+        // 19th Dec 2010 - removed for Opera since it can be reported incorrectly whn there
+        // are multiple graphs on the page
+        if (this.Get('chart.xaxispos') == 'bottom' && this.hasnegativevalues && navigator.userAgent.indexOf('Opera') == -1) {
+            alert('[LINE] You have negative values and the X axis is at the bottom. This is not good...');
+        }
+
+        if (this.Get('chart.variant') == '3d') {
+            RGraph.Draw3DAxes(this);
+        }
+        
+        // Progressively Draw the chart
+        RGraph.background.Draw(this);
+
+        /**
+        * Draw any horizontal bars that have been defined
+        */
+        if (this.Get('chart.background.hbars') && this.Get('chart.background.hbars').length > 0) {
+            RGraph.DrawBars(this);
+        }
+
+        if (this.Get('chart.axesontop') == false) {
+            this.DrawAxes();
+        }
+
+        /**
+        * Handle the appropriate shadow color. This now facilitates an array of differing
+        * shadow colors
+        */
+        var shadowColor = this.Get('chart.shadow.color');
+        
+        if (typeof(shadowColor) == 'object') {
+            shadowColor = RGraph.array_reverse(RGraph.array_clone(this.Get('chart.shadow.color')));
+        }
+
+
+        for (var i=(this.data.length - 1), j=0; i>=0; i--, j++) {
+
+            this.context.beginPath();
+
+            /**
+            * Turn on the shadow if required
+            */
+            if (this.Get('chart.shadow') && !this.Get('chart.filled')) {
+
+                /**
+                * Accommodate an array of shadow colors as well as a single string
+                */
+                if (typeof(shadowColor) == 'object' && shadowColor[i - 1]) {
+                    this.context.shadowColor = shadowColor[i];
+                } else if (typeof(shadowColor) == 'object') {
+                    this.context.shadowColor = shadowColor[0];
+                } else if (typeof(shadowColor) == 'string') {
+                    this.context.shadowColor = shadowColor;
+                }
+
+                this.context.shadowBlur    = this.Get('chart.shadow.blur');
+                this.context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+                this.context.shadowOffsetY = this.Get('chart.shadow.offsety');
+            
+            } else if (this.Get('chart.filled') && this.Get('chart.shadow')) {
+                alert('[LINE] Shadows are not permitted when the line is filled');
+            }
+
+            /**
+            * Draw the line
+            */
+
+            if (this.Get('chart.fillstyle')) {
+                if (typeof(this.Get('chart.fillstyle')) == 'object' && this.Get('chart.fillstyle')[j]) {
+                   var fill = this.Get('chart.fillstyle')[j];
+                
+                } else if (typeof(this.Get('chart.fillstyle')) == 'string') {
+                    var fill = this.Get('chart.fillstyle');
+    
+                } else {
+                    alert('[LINE] Warning: chart.fillstyle must be either a string or an array with the same number of elements as you have sets of data');
+                }
+            } else if (this.Get('chart.filled')) {
+                var fill = this.Get('chart.colors')[j];
+
+            } else {
+                var fill = null;
+            }
+
+            /**
+            * Figure out the tickmark to use
+            */
+            if (this.Get('chart.tickmarks') && typeof(this.Get('chart.tickmarks')) == 'object') {
+                var tickmarks = this.Get('chart.tickmarks')[i];
+            } else if (this.Get('chart.tickmarks') && typeof(this.Get('chart.tickmarks')) == 'string') {
+                var tickmarks = this.Get('chart.tickmarks');
+            } else if (this.Get('chart.tickmarks') && typeof(this.Get('chart.tickmarks')) == 'function') {
+                var tickmarks = this.Get('chart.tickmarks');
+            } else {
+                var tickmarks = null;
+            }
+
+
+            this.DrawLine(this.data[i],
+                          this.Get('chart.colors')[j],
+                          fill,
+                          this.GetLineWidth(j),
+                           tickmarks,
+                           this.data.length - i - 1);
+                           
+            this.context.stroke();
+        }
+
+
+
+
+
+
+
+
+
+
+
+
+
+        /**
+        * If tooltips are defined, handle them
+        */
+        if (this.Get('chart.tooltips') && (this.Get('chart.tooltips').length || typeof(this.Get('chart.tooltips')) == 'function')) {
+
+            // Need to register this object for redrawing
+            if (this.Get('chart.tooltips.highlight')) {
+                RGraph.Register(this);
+            }
+
+            canvas_onmousemove_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas  = e.target;
+                var context = canvas.getContext('2d');
+                var obj     = canvas.__object__;
+                var point   = obj.getPoint(e);
+
+                if (obj.Get('chart.tooltips.highlight')) {
+                    RGraph.Register(obj);
+                }
+
+                if (   point
+                    && typeof(point[0]) == 'object'
+                    && typeof(point[1]) == 'number'
+                    && typeof(point[2]) == 'number'
+                    && typeof(point[3]) == 'number'
+                   ) {
+
+                    // point[0] is the graph object
+                    var xCoord = point[1];
+                    var yCoord = point[2];
+                    var idx    = point[3];
+
+                    if ((obj.Get('chart.tooltips')[idx] || typeof(obj.Get('chart.tooltips')) == 'function')) {
+
+                        // Get the tooltip text
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[idx](idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = String(obj.Get('chart.tooltips')[idx]);
+                        } else {
+                            var text = '';
+                        }
+
+
+                        // No tooltip text - do nada
+                        if (text.match(/^id:(.*)$/) && RGraph.getTooltipText(text).substring(0,3) == 'id:') {
+                            return;
+                        }
+
+                        // Chnage the pointer to a hand
+                        canvas.style.cursor = 'pointer';
+
+                        /**
+                        * If the tooltip is the same one as is currently visible (going by the array index), don't do squat and return.
+                        */
+                        if (   RGraph.Registry.Get('chart.tooltip')
+                            && RGraph.Registry.Get('chart.tooltip').__index__ == idx
+                            && RGraph.Registry.Get('chart.tooltip').__canvas__.id == canvas.id) {
+
+                            return;
+                        }
+
+                        /**
+                        * Redraw the graph
+                        */
+                        if (obj.Get('chart.tooltips.highlight')) {
+                           // Redraw the graph
+                            RGraph.Redraw();
+                        }
+
+                        // SHOW THE CORRECT TOOLTIP
+                        RGraph.Tooltip(canvas, text, e.pageX, e.pageY, idx);
+
+                        // Store the tooltip index on the tooltip object
+                        RGraph.Registry.Get('chart.tooltip').__index__ = Number(idx);
+
+                        /**
+                        * This converts idx into the index that is not greater than the
+                        * number of items in the data array
+                        */
+                        while (idx >= obj.data[0].length) {
+                            idx -= obj.data[0].length
+                        }
+
+                        RGraph.Registry.Get('chart.tooltip').__index2__ = idx;
+
+                        /**
+                        * Highlight the graph
+                        */
+                        if (obj.Get('chart.tooltips.highlight')) {
+                            context.beginPath();
+                            context.moveTo(xCoord, yCoord);
+                            context.arc(xCoord, yCoord, 2, 0, 6.28, 0);
+                            context.strokeStyle = obj.Get('chart.highlight.stroke');
+                            context.fillStyle = obj.Get('chart.highlight.fill');
+                            context.stroke();
+                            context.fill();
+                        }
+                        
+                        e.stopPropagation();
+                        return;
+                    }
+                }
+                
+                /**
+                * Not over a hotspot?
+                */
+                canvas.style.cursor = 'default';
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+            
+            // TODO COMBINED LINE BAR ONCLICK HANDLER
+            // ONLY INSTALL IF THERE IS A BAR CHART
+
+            //canvas_onclick_func = function (e)
+            //{
+            //    p(666)
+            //}
+            //this.canvas.addEventListener('click', canvas_onclick_func, false);
+            //RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+        }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        /**
+        * If the axes have been requested to be on top, do that
+        */
+        if (this.Get('chart.axesontop')) {
+            this.DrawAxes();
+        }
+
+        /**
+        * Draw the labels
+        */
+        this.DrawLabels();
+        
+        /**
+        * Draw the range if necessary
+        */
+        this.DrawRange();
+        
+        // Draw a key if necessary
+        if (this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+
+        /**
+        * Draw " above" labels if enabled
+        */
+        if (this.Get('chart.labels.above')) {
+            this.DrawAboveLabels();
+        }
+
+        /**
+        * Draw the "in graph" labels
+        */
+        RGraph.DrawInGraphLabels(this);
+
+        /**
+        * Draw crosschairs
+        */
+        RGraph.DrawCrosshairs(this);
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+
+        /**
+        * Redraw the lines if a filled range is on the cards
+        */
+        if (this.Get('chart.filled') && this.Get('chart.filled.range') && this.data.length == 2) {
+
+            this.context.beginPath();
+            var len = this.coords.length / 2;
+            this.context.lineWidth = this.Get('chart.linewidth');
+            this.context.strokeStyle = this.Get('chart.colors')[0];
+
+            for (var i=0; i<len; ++i) {
+                if (i == 0) {
+                    this.context.moveTo(this.coords[i][0], this.coords[i][1]);
+                } else {
+                    this.context.lineTo(this.coords[i][0], this.coords[i][1]);
+                }
+            }
+            
+            this.context.stroke();
+
+
+            this.context.beginPath();
+            
+            if (this.Get('chart.colors')[1]) {
+                this.context.strokeStyle = this.Get('chart.colors')[1];
+            }
+            
+            for (var i=this.coords.length - 1; i>=len; --i) {
+                if (i == (this.coords.length - 1) ) {
+                    this.context.moveTo(this.coords[i][0], this.coords[i][1]);
+                } else {
+                    this.context.lineTo(this.coords[i][0], this.coords[i][1]);
+                }
+            }
+            
+            this.context.stroke();
+        } else if (this.Get('chart.filled') && this.Get('chart.filled.range')) {
+            alert('[LINE] You must have only two sets of data for a filled range chart');
+        }
+
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        /**
+        * This function enables the zoom in area mode
+        */
+        if (this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ZoomArea(this);
+        }
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * This function enables adjustments
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    
+    /**
+    * Draws the axes
+    */
+    RGraph.Line.prototype.DrawAxes = function ()
+    {
+        // Don't draw the axes?
+        if (this.Get('chart.noaxes')) {
+            return;
+        }
+
+        // Turn any shadow off
+        RGraph.NoShadow(this);
+
+        this.context.lineWidth   = 1;
+        this.context.strokeStyle = this.Get('chart.axis.color');
+        this.context.beginPath();
+
+        // Draw the X axis
+        if (this.Get('chart.noxaxis') == false) {
+            if (this.Get('chart.xaxispos') == 'center') {
+                this.context.moveTo(this.gutterLeft, (this.grapharea / 2) + this.gutterTop);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, (this.grapharea / 2) + this.gutterTop);
+            } else if (this.Get('chart.xaxispos') == 'top') {
+                this.context.moveTo(this.gutterLeft, this.gutterTop);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, this.gutterTop);
+            } else {
+                this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+        
+        // Draw the Y axis
+        if (this.Get('chart.noyaxis') == false) {
+            if (this.Get('chart.yaxispos') == 'left') {
+                this.context.moveTo(this.gutterLeft, this.gutterTop);
+                this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom );
+            } else {
+                this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, this.gutterTop);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+
+        /**
+        * Draw the X tickmarks
+        */
+        if (this.Get('chart.noxaxis') == false) {
+
+            var xTickInterval = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / (this.Get('chart.xticks') ? this.Get('chart.xticks') : (this.data[0].length - 1));
+    
+            for (x=this.gutterLeft + (this.Get('chart.yaxispos') == 'left' ? xTickInterval : 0); x<=(RGraph.GetWidth(this) - this.gutterRight + 1 ); x+=xTickInterval) {
+
+                if (this.Get('chart.yaxispos') == 'right' && x >= (RGraph.GetWidth(this) - this.gutterRight - 1) ) {
+                    break;
+                }
+                
+                // If the last tick is not desired...
+                if (this.Get('chart.noendxtick')) {
+                    if (this.Get('chart.yaxispos') == 'left' && x >= (RGraph.GetWidth(this) - this.gutterRight)) {
+                        break;
+                    } else if (this.Get('chart.yaxispos') == 'right' && x == this.gutterLeft) {
+                        continue;
+                    }
+                }
+    
+                var yStart = this.Get('chart.xaxispos') == 'center' ? (this.gutterTop + (this.grapharea / 2)) - 3 : RGraph.GetHeight(this) - this.gutterBottom;
+                var yEnd = this.Get('chart.xaxispos') == 'center' ? yStart + 6 : RGraph.GetHeight(this) - this.gutterBottom - (x % 60 == 0 ? this.Get('chart.largexticks') * this.Get('chart.tickdirection') : this.Get('chart.smallxticks') * this.Get('chart.tickdirection'));
+                
+                if (this.Get('chart.xaxispos') == 'top') {
+                    yStart = this.gutterTop - 3;
+                    yEnd   = this.gutterTop;
+                }
+
+                this.context.moveTo(x, yStart);
+                this.context.lineTo(x, yEnd);
+            }
+
+        // Draw an extra tickmark if there is no X axis, but there IS a Y axis
+        } else if (this.Get('chart.noyaxis') == false) {
+            if (this.Get('chart.yaxispos') == 'left') {
+                this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(this.gutterLeft - this.Get('chart.smallyticks'), RGraph.GetHeight(this) - this.gutterBottom);
+            } else {
+                this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight + this.Get('chart.smallyticks'), RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+
+        /**
+        * Draw the Y tickmarks
+        */
+        if (this.Get('chart.noyaxis') == false) {
+            var counter    = 0;
+            var adjustment = 0;
+    
+            if (this.Get('chart.yaxispos') == 'right') {
+                adjustment = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight);
+            }
+            
+            // X axis at the center
+            if (this.Get('chart.xaxispos') == 'center') {
+                var interval = (this.grapharea / 10);
+                var lineto = (this.Get('chart.yaxispos') == 'left' ? this.gutterLeft : RGraph.GetWidth(this) - this.gutterRight + this.Get('chart.smallyticks'));
+    
+                // Draw the upper halves Y tick marks
+                for (y=this.gutterTop; y < (this.grapharea / 2) + this.gutterTop; y+=interval) {
+                    this.context.moveTo((this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - this.Get('chart.smallyticks') : RGraph.GetWidth(this) - this.gutterRight), y);
+                    this.context.lineTo(lineto, y);
+                }
+                
+                // Draw the lower halves Y tick marks
+                for (y=this.gutterTop + (this.halfgrapharea) + interval; y <= this.grapharea + this.gutterTop; y+=interval) {
+                    this.context.moveTo((this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - this.Get('chart.smallyticks') : RGraph.GetWidth(this) - this.gutterRight), y);
+                    this.context.lineTo(lineto, y);
+                }
+            
+            // X axis at the top
+            } else if (this.Get('chart.xaxispos') == 'top') {
+                var interval = (this.grapharea / 10);
+                var lineto = (this.Get('chart.yaxispos') == 'left' ? this.gutterLeft : RGraph.GetWidth(this) - this.gutterRight + this.Get('chart.smallyticks'));
+
+                // Draw the Y tick marks
+                for (y=this.gutterTop + interval; y <=this.grapharea + this.gutterTop; y+=interval) {
+                    this.context.moveTo((this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - this.Get('chart.smallyticks') : RGraph.GetWidth(this) - this.gutterRight), y);
+                    this.context.lineTo(lineto, y);
+                }
+                
+                // If there's no X axis draw an extra tick
+                if (this.Get('chart.noxaxis')) {
+                    this.context.moveTo((this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - this.Get('chart.smallyticks') : RGraph.GetWidth(this) - this.gutterRight), this.gutterTop);
+                    this.context.lineTo(lineto, this.gutterTop);
+                }
+            
+            // X axis at the bottom
+            } else {
+                var lineto = (this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - this.Get('chart.smallyticks') : this.canvas.width - this.gutterRight + this.Get('chart.smallyticks'));
+    
+                for (y=this.gutterTop; y < (this.canvas.height - this.gutterBottom) && counter < 10; y+=( (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 10) ) {
+    
+                    this.context.moveTo(this.gutterLeft + adjustment, y);
+                    this.context.lineTo(lineto, y);
+                
+                    var counter = counter +1;
+                }
+            }
+
+        // Draw an extra X tickmark
+        } else if (this.Get('chart.noxaxis') == false) {
+
+            if (this.Get('chart.yaxispos') == 'left') {
+                this.context.moveTo(this.gutterLeft, this.Get('chart.xaxispos') == 'top' ? this.gutterTop : RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(this.gutterLeft, this.Get('chart.xaxispos') == 'top' ? this.gutterTop - this.Get('chart.smallxticks') : RGraph.GetHeight(this) - this.gutterBottom + this.Get('chart.smallxticks'));
+           } else {
+                this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom + this.Get('chart.smallxticks'));
+            }
+        }
+
+        this.context.stroke();
+    }
+
+
+    /**
+    * Draw the text labels for the axes
+    */
+    RGraph.Line.prototype.DrawLabels = function ()
+    {
+        this.context.strokeStyle = 'black';
+        this.context.fillStyle   = this.Get('chart.text.color');
+        this.context.lineWidth   = 1;
+        
+        // Turn off any shadow
+        RGraph.NoShadow(this);
+
+        // This needs to be here
+        var font      = this.Get('chart.text.font');
+        var text_size = this.Get('chart.text.size');
+        var context   = this.context;
+        var canvas    = this.canvas;
+
+        // Draw the Y axis labels
+        if (this.Get('chart.ylabels') && this.Get('chart.ylabels.specific') == null) {
+
+            var units_pre  = this.Get('chart.units.pre');
+            var units_post = this.Get('chart.units.post');
+            var xpos       = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : RGraph.GetWidth(this) - this.gutterRight + 5;
+            var align      = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left';
+            
+            var numYLabels = this.Get('chart.ylabels.count');
+            var bounding   = false;
+            var bgcolor    = this.Get('chart.ylabels.inside') ? this.Get('chart.ylabels.inside.color') : null;
+
+            
+            /**
+            * If the Y labels are inside the Y axis, invert the alignment
+            */
+            if (this.Get('chart.ylabels.inside') == true && align == 'left') {
+                xpos -= 10;
+                align = 'right';
+                bounding = true;
+                
+
+            } else if (this.Get('chart.ylabels.inside') == true && align == 'right') {
+                xpos += 10;
+                align = 'left';
+                bounding = true;
+            }
+
+
+
+            if (this.Get('chart.xaxispos') == 'center') {
+                var half = this.grapharea / 2;
+
+                if (numYLabels == 1 || numYLabels == 3 || numYLabels == 5) {
+                    //  Draw the upper halves labels
+                    RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (0/5) * half ) + this.halfTextHeight, RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, bounding, null, bgcolor);
+    
+                    if (numYLabels == 5) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (1/5) * half ) + this.halfTextHeight, RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (3/5) * half ) + this.halfTextHeight, RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+    
+                    if (numYLabels >= 3) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (2/5) * half ) + this.halfTextHeight, RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (4/5) * half ) + this.halfTextHeight, RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+                    
+                    //  Draw the lower halves labels
+                    if (numYLabels >= 3) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (6/5) * half ) + this.halfTextHeight, '-' + RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (8/5) * half ) + this.halfTextHeight, '-' + RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+    
+                    if (numYLabels == 5) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (7/5) * half ) + this.halfTextHeight, '-' + RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (9/5) * half ) + this.halfTextHeight, '-' + RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+    
+                    RGraph.Text(context, font, text_size, xpos, this.gutterTop + ( (10/5) * half ) + this.halfTextHeight, '-' + RGraph.number_format(this, (this.scale[4] == '1.0' ? '1.0' : this.scale[4]), units_pre, units_post), null, align, bounding, null, bgcolor);
+                
+                } else if (numYLabels == 10) {
+
+                    // 10 Y labels
+                    var interval = (this.grapharea / numYLabels) / 2;
+                
+                    for (var i=0; i<numYLabels; ++i) {
+                        // This draws the upper halves labels
+                        RGraph.Text(context,font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((i/20) * (this.grapharea) ), RGraph.number_format(this, ((this.scale[4] / numYLabels) * (numYLabels - i)).toFixed((this.Get('chart.scale.decimals'))),units_pre, units_post), null, align, bounding, null, bgcolor);
+                        
+                        // And this draws the lower halves labels
+                        RGraph.Text(context, font, text_size, xpos,
+                        
+                        this.gutterTop + this.halfTextHeight + ((i/20) * this.grapharea) + (this.grapharea / 2) + (this.grapharea / 20),
+                        
+                        '-' + RGraph.number_format(this, (this.scale[4] - ((this.scale[4] / numYLabels) * (numYLabels - i - 1))).toFixed((this.Get('chart.scale.decimals'))),units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+                    
+                } else {
+                    alert('[LINE SCALE] The number of Y labels must be 1/3/5/10');
+                }
+
+                // Draw the lower limit if chart.ymin is specified
+                if (typeof(this.Get('chart.ymin')) == 'number') {
+                    RGraph.Text(context, font, text_size, xpos, RGraph.GetHeight(this) / 2, RGraph.number_format(this, this.Get('chart.ymin').toFixed(this.Get('chart.scale.decimals')), units_pre, units_post), 'center', align, bounding, null, bgcolor);
+                }
+                
+                // No X axis - so draw 0
+                if (this.Get('chart.noxaxis') == true) {
+                    RGraph.Text(context,font,text_size,xpos,this.gutterTop + ( (5/5) * half ) + this.halfTextHeight,'0',null, align, bounding, null, bgcolor);
+                }
+
+            // X axis at the top
+            } else if (this.Get('chart.xaxispos') == 'top') {
+
+                var scale = RGraph.array_reverse(this.scale);
+
+                /**
+                * Accommodate reversing the Y labels
+                */
+                if (this.Get('chart.ylabels.invert')) {
+
+                    scale = RGraph.array_reverse(scale);
+
+                    this.context.translate(0, this.grapharea * -0.2);
+                    if (typeof(this.Get('chart.ymin')) == null) {
+                        this.Set('chart.ymin', 0);
+                    }
+                }
+
+                if (numYLabels == 1 || numYLabels == 3 || numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((1/5) * (this.grapharea ) ), '-' + RGraph.number_format(this, scale[4], units_pre, units_post), null, align, bounding, null, bgcolor);
+    
+                    if (numYLabels == 5) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((4/5) * (this.grapharea) ), '-' + RGraph.number_format(this, scale[1], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((2/5) * (this.grapharea) ), '-' + RGraph.number_format(this, scale[3], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+    
+                    if (numYLabels >= 3) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((3/5) * (this.grapharea ) ), '-' + RGraph.number_format(this, scale[2], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((5/5) * (this.grapharea) ), '-' + RGraph.number_format(this, scale[0], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+                
+                } else if (numYLabels == 10) {
+
+                    // 10 Y labels
+                    var interval = (this.grapharea / numYLabels) / 2;
+
+                    for (var i=0; i<numYLabels; ++i) {
+
+                        RGraph.Text(context,font,text_size,xpos,(2 * interval) + this.gutterTop + this.halfTextHeight + ((i/10) * (this.grapharea) ),'-' + RGraph.number_format(this,(scale[0] - (((scale[0] - this.min) / numYLabels) * (numYLabels - i - 1))).toFixed((this.Get('chart.scale.decimals'))),units_pre,units_post),null,align,bounding,null,bgcolor);
+                    }
+
+                } else {
+                    alert('[LINE SCALE] The number of Y labels must be 1/3/5/10');
+                }
+
+
+                /**
+                * Accommodate translating back after reversing the labels
+                */
+                if (this.Get('chart.ylabels.invert')) {
+                    this.context.translate(0, 0 - (this.grapharea * -0.2));
+                }
+
+                // Draw the lower limit if chart.ymin is specified
+                if (typeof(this.Get('chart.ymin')) == 'number') {
+                    RGraph.Text(context,font,text_size,xpos,this.Get('chart.ylabels.invert') ? this.canvas.height - this.gutterBottom : this.gutterTop,'-' + RGraph.number_format(this, this.Get('chart.ymin').toFixed(this.Get('chart.scale.decimals')), units_pre, units_post),'center',align,bounding,null,bgcolor);
+                }
+
+            } else {
+
+                /**
+                * Accommodate reversing the Y labels
+                */
+                if (this.Get('chart.ylabels.invert')) {
+                    this.scale = RGraph.array_reverse(this.scale);
+                    this.context.translate(0, this.grapharea * 0.2);
+                    if (typeof(this.Get('chart.ymin')) == null) {
+                        this.Set('chart.ymin', 0);
+                    }
+                }
+
+                if (numYLabels == 1 || numYLabels == 3 || numYLabels == 5) {
+                    RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((0/5) * (this.grapharea ) ), RGraph.number_format(this, this.scale[4], units_pre, units_post), null, align, bounding, null, bgcolor);
+    
+                    if (numYLabels == 5) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((3/5) * (this.grapharea) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((1/5) * (this.grapharea) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+    
+                    if (numYLabels >= 3) {
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((2/5) * (this.grapharea ) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), null, align, bounding, null, bgcolor);
+                        RGraph.Text(context, font, text_size, xpos, this.gutterTop + this.halfTextHeight + ((4/5) * (this.grapharea) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), null, align, bounding, null, bgcolor);
+                    }
+                
+                } else if (numYLabels == 10) {
+
+                    // 10 Y labels
+                    var interval = (this.grapharea / numYLabels) / 2;
+                
+                    for (var i=0; i<numYLabels; ++i) {
+                        RGraph.Text(context,font,text_size,xpos,this.gutterTop + this.halfTextHeight + ((i/10) * (this.grapharea) ),RGraph.number_format(this,((((this.scale[4] - this.min) / numYLabels) * (numYLabels - i)) + this.min).toFixed((this.Get('chart.scale.decimals'))),units_pre,units_post),null,align,bounding,null,bgcolor);
+                    }
+
+                } else {
+                    alert('[LINE SCALE] The number of Y labels must be 1/3/5/10');
+                }
+
+
+                /**
+                * Accommodate translating back after reversing the labels
+                */
+                if (this.Get('chart.ylabels.invert')) {
+                    this.context.translate(0, 0 - (this.grapharea * 0.2));
+                }
+
+                // Draw the lower limit if chart.ymin is specified
+                if (typeof(this.Get('chart.ymin')) == 'number') {
+                    RGraph.Text(context,font,text_size,xpos,this.Get('chart.ylabels.invert') ? this.gutterTop : RGraph.GetHeight(this) - this.gutterBottom,RGraph.number_format(this, this.Get('chart.ymin').toFixed(this.Get('chart.scale.decimals')), units_pre, units_post),'center',align,bounding,null,bgcolor);
+                }
+            }
+
+            // No X axis - so draw 0
+            if (   this.Get('chart.noxaxis') == true
+                && this.Get('chart.ymin') == null
+               ) {
+
+                RGraph.Text(context,font,text_size,xpos,this.Get('chart.xaxispos') == 'top' ? this.gutterTop + this.halfTextHeight: (RGraph.GetHeight(this) - this.gutterBottom + this.halfTextHeight),'0',null, align, bounding, null, bgcolor);
+            }
+        
+        } else if (this.Get('chart.ylabels') && typeof(this.Get('chart.ylabels.specific')) == 'object') {
+            
+            // A few things
+            var gap      = this.grapharea / this.Get('chart.ylabels.specific').length;
+            var halign   = this.Get('chart.yaxispos') == 'left' ? 'right' : 'left';
+            var bounding = false;
+            var bgcolor  = null;
+            var ymin     = this.Get('chart.ymin') != null && this.Get('chart.ymin');
+
+            // Figure out the X coord based on the position of the axis
+            if (this.Get('chart.yaxispos') == 'left') {
+                var x = this.gutterLeft - 5;
+                
+                if (this.Get('chart.ylabels.inside')) {
+                    x += 10;
+                    halign   = 'left';
+                    bounding = true;
+                    bgcolor  = 'rgba(255,255,255,0.5)';
+                }
+
+            } else if (this.Get('chart.yaxispos') == 'right') {
+                var x = this.canvas.width - this.gutterRight + 5;
+                
+                if (this.Get('chart.ylabels.inside')) {
+                    x -= 10;
+                    halign = 'right';
+                    bounding = true;
+                    bgcolor  = 'rgba(255,255,255,0.5)';
+                }
+            }
+
+
+            // Draw the labels
+            if (this.Get('chart.xaxispos') == 'center') {
+            
+                // Draw the top halfs labels
+                for (var i=0; i<this.Get('chart.ylabels.specific').length; ++i) {
+                    var y = this.gutterTop + (this.grapharea / ((this.Get('chart.ylabels.specific').length ) * 2) * i);
+                    
+                    if (ymin && ymin > 0) {
+                        var y  = ((this.grapharea / 2) / (this.Get('chart.ylabels.specific').length - (ymin ? 1 : 0)) ) * i;
+                            y += this.gutterTop;
+                    }
+                    
+                    RGraph.Text(context, font, text_size,x,y,String(this.Get('chart.ylabels.specific')[i]), 'center', halign, bounding, 0, bgcolor);
+                }
+                
+                // Now reverse the labels and draw the bottom half
+                var reversed_labels = RGraph.array_reverse(this.Get('chart.ylabels.specific'));
+            
+                // Draw the bottom halfs labels
+                for (var i=0; i<reversed_labels.length; ++i) {
+                    var y = (this.grapharea / 2) + this.gutterTop + ((this.grapharea / (reversed_labels.length * 2) ) * (i + 1));
+
+                    if (ymin && ymin > 0) {
+                        var y  = ((this.grapharea / 2) / (reversed_labels.length - (ymin ? 1 : 0)) ) * i;
+                            y += this.gutterTop;
+                            y += (this.grapharea / 2);
+                    }
+
+                    RGraph.Text(context, font, text_size,x,y,String(reversed_labels[i]), 'center', halign, bounding, 0, bgcolor);
+                }
+            
+            } else if (this.Get('chart.xaxispos') == 'top') {
+
+                // Reverse the labels and draw
+                var reversed_labels = RGraph.array_reverse(this.Get('chart.ylabels.specific'));
+            
+                // Draw the bottom halfs labels
+                for (var i=0; i<reversed_labels.length; ++i) {
+                    
+                    var y = ((this.grapharea / (reversed_labels.length - (ymin ? 1 : 0)) ) * (i + (ymin ? 0 : 1)));
+                        y = y + this.gutterTop;
+
+                    RGraph.Text(context, font, text_size,x,y,String(reversed_labels[i]), 'center', halign, bounding, 0, bgcolor);
+                }
+
+            } else {
+                for (var i=0; i<this.Get('chart.ylabels.specific').length; ++i) {
+                    var y = this.gutterTop + ((this.grapharea / (this.Get('chart.ylabels.specific').length - (ymin ? 1 : 0) )) * i);
+                    RGraph.Text(context, font, text_size,x,y,String(this.Get('chart.ylabels.specific')[i]), 'center', halign, bounding, 0, bgcolor);
+                }
+            }
+        }
+
+        // Draw the X axis labels
+        if (this.Get('chart.labels') && this.Get('chart.labels').length > 0) {
+
+
+            var yOffset  = 13;
+            var bordered = false;
+            var bgcolor  = null;
+
+            if (this.Get('chart.xlabels.inside')) {
+                yOffset = -5;
+                bordered = true;
+                bgcolor  = this.Get('chart.xlabels.inside.color');
+            }
+
+            /**
+            * Text angle
+            */
+            var angle  = 0;
+            var valign = null;
+            var halign = 'center';
+
+            if (typeof(this.Get('chart.text.angle')) == 'number' && this.Get('chart.text.angle') > 0) {
+                angle   = -1 * this.Get('chart.text.angle');
+                valign  = 'center';
+                halign  = 'right';
+                yOffset = 10;
+                
+                if (this.Get('chart.xaxispos') == 'top') {
+                    yOffset = 10;
+                }
+            }
+
+            this.context.fillStyle = this.Get('chart.text.color');
+            var numLabels = this.Get('chart.labels').length;
+
+            for (i=0; i<numLabels; ++i) {
+
+                // Changed 8th Nov 2010 to be not reliant on the coords
+                //if (this.Get('chart.labels')[i] && this.coords && this.coords[i] && this.coords[i][0]) {
+                if (this.Get('chart.labels')[i]) {
+
+                    var labelX = ((RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - (2 * this.Get('chart.hmargin'))) / (numLabels - 1) ) * i;
+                        labelX += this.gutterLeft + this.Get('chart.hmargin');
+
+                    /**
+                    * Account for an unrelated number of labels
+                    */
+                    if (this.Get('chart.labels').length != this.data[0].length) {
+                        labelX = this.gutterLeft + this.Get('chart.hmargin') + ((RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - (2 * this.Get('chart.hmargin'))) * (i / (this.Get('chart.labels').length - 1)));
+                    }
+                    
+                    // This accounts for there only being one point on the chart
+                    if (!labelX) {
+                        labelX = this.gutterLeft + this.Get('chart.hmargin');
+                    }
+
+                    if (this.Get('chart.xaxispos') == 'top' && this.Get('chart.text.angle') > 0) {
+                        halign = 'left';
+                    }
+
+                    RGraph.Text(context,
+                                font,
+                                text_size,
+                                labelX,
+                                (this.Get('chart.xaxispos') == 'top') ? this.gutterTop - yOffset - (this.Get('chart.xlabels.inside') ? -22 : 0) : (RGraph.GetHeight(this) - this.gutterBottom) + yOffset,
+                                String(this.Get('chart.labels')[i]),
+                                valign,
+                                halign,
+                                bordered,
+                                angle,
+                                bgcolor);
+                }
+            }
+
+        }
+
+        this.context.stroke();
+        this.context.fill();
+    }
+
+
+    /**
+    * Draws the line
+    */
+    RGraph.Line.prototype.DrawLine = function (lineData, color, fill, linewidth, tickmarks, index)
+    {
+        var penUp = false;
+        var yPos  = null;
+        var xPos  = 0;
+        this.context.lineWidth = 1;
+        var lineCoords = [];
+
+        // Work out the X interval
+        var xInterval = (this.canvas.width - (2 * this.Get('chart.hmargin')) - this.gutterLeft - this.gutterRight) / (lineData.length - 1);
+
+        // Loop thru each value given, plotting the line
+        for (i=0; i<lineData.length; i++) {
+
+            var data_point = lineData[i];
+
+
+            yPos = this.canvas.height - (((data_point - (data_point > 0 ?  this.Get('chart.ymin') : (-1 * this.Get('chart.ymin')))) / (this.max - this.min) ) * this.grapharea);
+            yPos = (this.grapharea / (this.max - this.min)) * (data_point - this.min);
+            yPos = this.canvas.height - yPos;
+            
+            /**
+            * This skirts an annoying JS rounding error
+            * SEARCH TAGS: JS ROUNDING ERROR DECIMALS
+            */
+            if (data_point == this.max) {
+                yPos = Math.round(yPos);
+            }
+
+            if (this.Get('chart.ylabels.invert')) {
+                yPos -= this.gutterBottom;
+                yPos -= this.gutterTop;
+                yPos = this.canvas.height - yPos;
+            }
+
+            // Make adjustments depending on the X axis position
+            if (this.Get('chart.xaxispos') == 'center') {
+                yPos = (yPos - this.gutterBottom - this.gutterTop) / 2;
+                yPos = yPos + this.gutterTop;
+            
+            // TODO Check this
+            } else if (this.Get('chart.xaxispos') == 'top') {
+
+                yPos = (this.grapharea / (this.max - this.min)) * (Math.abs(data_point) - this.min);
+                yPos += this.gutterTop;
+                
+                if (this.Get('chart.ylabels.invert')) {
+                    yPos -= this.gutterTop;
+                    yPos  = this.grapharea - yPos;
+                    yPos += this.gutterTop;
+                }
+
+            } else if (this.Get('chart.xaxispos') == 'bottom') {
+                // TODO
+                yPos -= this.gutterBottom; // Without this the line is out of place due to the gutter
+            }
+
+
+
+            // Null data points, and a special case for this bug:http://dev.rgraph.net/tests/ymin.html
+            if (   lineData[i] == null
+                || (this.Get('chart.xaxispos') == 'bottom' && lineData[i] < this.min && !this.Get('chart.outofbounds'))
+                ||  (this.Get('chart.xaxispos') == 'center' && lineData[i] < (-1 * this.max) && !this.Get('chart.outofbounds'))) {
+
+                yPos = null;
+            }
+
+            // Not always very noticeable, but it does have an effect
+            // with thick lines
+            this.context.lineCap  = 'round';
+            this.context.lineJoin = 'round';
+
+            // Plot the line if we're at least on the second iteration
+            if (i > 0) {
+                xPos = xPos + xInterval;
+            } else {
+                xPos = this.Get('chart.hmargin') + this.gutterLeft;
+            }
+
+            /**
+            * Add the coords to an array
+            */
+            this.coords.push([xPos, yPos]);
+            lineCoords.push([xPos, yPos]);
+        }
+        
+        this.context.stroke();
+
+        // Store the coords in another format, indexed by line number
+        this.coords2[index] = lineCoords;
+
+        /**
+        * For IE only: Draw the shadow ourselves as ExCanvas doesn't produce shadows
+        */
+        if (RGraph.isIE8() && this.Get('chart.shadow')) {
+            this.DrawIEShadow(lineCoords, this.context.shadowColor);
+        }
+
+        /**
+        * Now draw the actual line [FORMERLY SECOND]
+        */
+        this.context.beginPath();
+        this.context.strokeStyle = 'rgba(240,240,240,0.9)'; // Almost transparent - changed on 10th May 2010
+        //this.context.strokeStyle = fill;
+        if (fill) this.context.fillStyle   = fill;
+
+        var isStepped = this.Get('chart.stepped');
+        var isFilled = this.Get('chart.filled');
+
+
+        for (var i=0; i<lineCoords.length; ++i) {
+
+            xPos = lineCoords[i][0];
+            yPos = lineCoords[i][1];
+            var set = index;
+
+            var prevY     = (lineCoords[i - 1] ? lineCoords[i - 1][1] : null);
+            var isLast    = (i + 1) == lineCoords.length;
+
+            /**
+            * This nullifys values which are out-of-range
+            */
+            if (prevY < this.gutterTop || prevY > (RGraph.GetHeight(this) - this.gutterBottom) ) {
+                penUp = true;
+            }
+
+            if (i == 0 || penUp || !yPos || !prevY || prevY < this.gutterTop) {
+
+                if (this.Get('chart.filled') && !this.Get('chart.filled.range')) {
+                    this.context.moveTo(xPos + 1, this.canvas.height - this.gutterBottom - (this.Get('chart.xaxispos') == 'center' ? (this.canvas.height - this.gutterTop - this.gutterBottom) / 2 : 0) -1);
+                    this.context.lineTo(xPos + 1, yPos);
+
+                } else {
+                    this.context.moveTo(xPos, yPos);
+                }
+                
+                if (yPos == null) {
+                    penUp = true;
+                } else {
+                    penUp = false;
+                }
+
+            } else {
+
+                // Draw the stepped part of stepped lines
+                if (isStepped) {
+                    this.context.lineTo(xPos, lineCoords[i - 1][1]);
+                }
+
+                if ((yPos >= this.gutterTop && yPos <= (RGraph.GetHeight(this) - this.gutterBottom)) || this.Get('chart.outofbounds') ) {
+
+                    if (isLast && this.Get('chart.filled') && !this.Get('chart.filled.range') && this.Get('chart.yaxispos') == 'right') {
+                        xPos -= 1;
+                    }
+
+
+                    // Added 8th September 2009
+                    if (!isStepped || !isLast) {
+                        this.context.lineTo(xPos, yPos);
+                        
+                        if (isFilled && lineCoords[i+1] && lineCoords[i+1][1] == null) {
+                            this.context.lineTo(xPos, RGraph.GetHeight(this) - this.gutterBottom);
+                        }
+                    
+                    // Added August 2010
+                    } else if (isStepped && isLast) {
+                        this.context.lineTo(xPos,yPos);
+                    }
+
+
+                    penUp = false;
+                } else {
+                    penUp = true;
+                }
+            }
+        }
+
+        if (this.Get('chart.filled') && !this.Get('chart.filled.range')) {
+            var fillStyle = this.Get('chart.fillstyle');
+
+            this.context.lineTo(xPos, RGraph.GetHeight(this) - this.gutterBottom - 1 -  + (this.Get('chart.xaxispos') == 'center' ? (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2 : 0));
+            this.context.fillStyle = fill;
+
+            this.context.fill();
+            this.context.beginPath();
+        }
+
+        /**
+        * FIXME this may need removing when Chrome is fixed
+        * SEARCH TAGS: CHROME SHADOW BUG
+        */
+        if (navigator.userAgent.match(/Chrome/) && this.Get('chart.shadow') && this.Get('chart.chromefix') && this.Get('chart.shadow.blur') > 0) {
+
+            for (var i=lineCoords.length - 1; i>=0; --i) {
+                if (
+                       typeof(lineCoords[i][1]) != 'number'
+                    || (typeof(lineCoords[i+1]) == 'object' && typeof(lineCoords[i+1][1]) != 'number')
+                   ) {
+                    this.context.moveTo(lineCoords[i][0],lineCoords[i][1]);
+                } else {
+                    this.context.lineTo(lineCoords[i][0],lineCoords[i][1]);
+                }
+            }
+        }
+
+        this.context.stroke();
+
+
+        if (this.Get('chart.backdrop')) {
+            this.DrawBackdrop(lineCoords, color);
+        }
+
+        // Now redraw the lines with the correct line width
+        this.RedrawLine(lineCoords, color, linewidth);
+        
+        this.context.stroke();
+
+        // Draw the tickmarks
+        for (var i=0; i<lineCoords.length; ++i) {
+
+            i = Number(i);
+
+            if (isStepped && i == (lineCoords.length - 1)) {
+                this.context.beginPath();
+                //continue;
+            }
+
+            if (
+                (
+                    tickmarks != 'endcircle'
+                 && tickmarks != 'endsquare'
+                 && tickmarks != 'filledendsquare'
+                 && tickmarks != 'endtick'
+                 && tickmarks != 'endtriangle'
+                 && tickmarks != 'arrow'
+                 && tickmarks != 'filledarrow'
+                )
+                || (i == 0 && tickmarks != 'arrow' && tickmarks != 'filledarrow')
+                || i == (lineCoords.length - 1)
+               ) {
+
+                var prevX = (i <= 0 ? null : lineCoords[i - 1][0]);
+                var prevY = (i <= 0 ? null : lineCoords[i - 1][1]);
+
+                this.DrawTick(lineData, lineCoords[i][0], lineCoords[i][1], color, false, prevX, prevY, tickmarks, i);
+
+                // Draws tickmarks on the stepped bits of stepped charts. Takend out 14th July 2010
+                //
+                //if (this.Get('chart.stepped') && lineCoords[i + 1] && this.Get('chart.tickmarks') != 'endsquare' && this.Get('chart.tickmarks') != 'endcircle' && this.Get('chart.tickmarks') != 'endtick') {
+                //    this.DrawTick(lineCoords[i + 1][0], lineCoords[i][1], color);
+                //}
+            }
+        }
+
+        // Draw something off canvas to skirt an annoying bug
+        this.context.beginPath();
+        this.context.arc(RGraph.GetWidth(this) + 50000, RGraph.GetHeight(this) + 50000, 2, 0, 6.38, 1);
+    }
+    
+    
+    /**
+    * This functions draws a tick mark on the line
+    * 
+    * @param xPos  int  The x position of the tickmark
+    * @param yPos  int  The y position of the tickmark
+    * @param color str  The color of the tickmark
+    * @param       bool Whether the tick is a shadow. If it is, it gets offset by the shadow offset
+    */
+    RGraph.Line.prototype.DrawTick = function (lineData, xPos, yPos, color, isShadow, prevX, prevY, tickmarks, index)
+    {
+        // If the yPos is null - no tick
+        if ((yPos == null || yPos > (this.canvas.height - this.gutterBottom) || yPos < this.gutterTop) && !this.Get('chart.outofbounds')) {
+            return;
+        }
+
+        this.context.beginPath();
+
+        var offset   = 0;
+
+        // Reset the stroke and lineWidth back to the same as what they were when the line was drawm
+        // UPDATE 28th July 2011 - the line width is now set to 1
+        this.context.lineWidth   = this.Get('chart.tickmarks.linewidth') ? this.Get('chart.tickmarks.linewidth') : this.Get('chart.linewidth');
+        this.context.strokeStyle = isShadow ? this.Get('chart.shadow.color') : this.context.strokeStyle;
+        this.context.fillStyle   = isShadow ? this.Get('chart.shadow.color') : this.context.strokeStyle;
+
+        // Cicular tick marks
+        if (   tickmarks == 'circle'
+            || tickmarks == 'filledcircle'
+            || tickmarks == 'endcircle') {
+
+            if (tickmarks == 'circle'|| tickmarks == 'filledcircle' || (tickmarks == 'endcircle') ) {
+                this.context.beginPath();
+                this.context.arc(xPos + offset, yPos + offset, this.Get('chart.ticksize'), 0, 360 / (180 / Math.PI), false);
+
+                if (tickmarks == 'filledcircle') {
+                    this.context.fillStyle = isShadow ? this.Get('chart.shadow.color') : this.context.strokeStyle;
+                } else {
+                    this.context.fillStyle = isShadow ? this.Get('chart.shadow.color') : 'white';
+                }
+
+                this.context.stroke();
+                this.context.fill();
+            }
+
+        // Halfheight "Line" style tick marks
+        } else if (tickmarks == 'halftick') {
+            this.context.beginPath();
+            this.context.moveTo(xPos, yPos);
+            this.context.lineTo(xPos, yPos + this.Get('chart.ticksize'));
+
+            this.context.stroke();
+        
+        // Tick style tickmarks
+        } else if (tickmarks == 'tick') {
+            this.context.beginPath();
+            this.context.moveTo(xPos, yPos -  this.Get('chart.ticksize'));
+            this.context.lineTo(xPos, yPos + this.Get('chart.ticksize'));
+
+            this.context.stroke();
+        
+        // Endtick style tickmarks
+        } else if (tickmarks == 'endtick') {
+            this.context.beginPath();
+            this.context.moveTo(xPos, yPos -  this.Get('chart.ticksize'));
+            this.context.lineTo(xPos, yPos + this.Get('chart.ticksize'));
+
+            this.context.stroke();
+        
+        // "Cross" style tick marks
+        } else if (tickmarks == 'cross') {
+            this.context.beginPath();
+            this.context.moveTo(xPos - this.Get('chart.ticksize'), yPos - this.Get('chart.ticksize'));
+            this.context.lineTo(xPos + this.Get('chart.ticksize'), yPos + this.Get('chart.ticksize'));
+            this.context.moveTo(xPos + this.Get('chart.ticksize'), yPos - this.Get('chart.ticksize'));
+            this.context.lineTo(xPos - this.Get('chart.ticksize'), yPos + this.Get('chart.ticksize'));
+            
+            this.context.stroke();
+
+
+        // Triangle style tick marks
+        } else if (tickmarks == 'triangle' || tickmarks == 'filledtriangle' || tickmarks == 'endtriangle') {
+            this.context.beginPath();
+                
+                if (tickmarks == 'filledtriangle') {
+                    this.context.fillStyle = isShadow ? this.Get('chart.shadow.color') : this.context.strokeStyle;
+                } else {
+                    this.context.fillStyle = 'white';
+                }
+
+                this.context.moveTo(xPos - this.Get('chart.ticksize'), yPos + this.Get('chart.ticksize'));
+                this.context.lineTo(xPos, yPos - this.Get('chart.ticksize'));
+                this.context.lineTo(xPos + this.Get('chart.ticksize'), yPos + this.Get('chart.ticksize'));
+            this.context.closePath();
+            
+            this.context.stroke();
+            this.context.fill();
+
+
+        // A white bordered circle
+        } else if (tickmarks == 'borderedcircle' || tickmarks == 'dot') {
+                this.context.lineWidth   = 1;
+                this.context.strokeStyle = this.Get('chart.tickmarks.dot.color');
+                this.context.fillStyle   = this.Get('chart.tickmarks.dot.color');
+
+                // The outer white circle
+                this.context.beginPath();
+                this.context.arc(xPos, yPos, this.Get('chart.ticksize'), 0, 360 / (180 / Math.PI), false);
+                this.context.closePath();
+
+
+                this.context.fill();
+                this.context.stroke();
+                
+                // Now do the inners
+                this.context.beginPath();
+                this.context.fillStyle   = color;
+                this.context.strokeStyle = color;
+                this.context.arc(xPos, yPos, this.Get('chart.ticksize') - 2, 0, 360 / (180 / Math.PI), false);
+
+                this.context.closePath();
+
+                this.context.fill();
+                this.context.stroke();
+        
+        } else if (   tickmarks == 'square'
+                   || tickmarks == 'filledsquare'
+                   || (tickmarks == 'endsquare')
+                   || (tickmarks == 'filledendsquare') ) {
+
+            this.context.fillStyle   = 'white';
+            this.context.strokeStyle = this.context.strokeStyle; // FIXME Is this correct?
+
+            this.context.beginPath();
+            this.context.strokeRect(xPos - this.Get('chart.ticksize'), yPos - this.Get('chart.ticksize'), this.Get('chart.ticksize') * 2, this.Get('chart.ticksize') * 2);
+
+            // Fillrect
+            if (tickmarks == 'filledsquare' || tickmarks == 'filledendsquare') {
+                this.context.fillStyle = isShadow ? this.Get('chart.shadow.color') : this.context.strokeStyle;
+                this.context.fillRect(xPos - this.Get('chart.ticksize'), yPos - this.Get('chart.ticksize'), this.Get('chart.ticksize') * 2, this.Get('chart.ticksize') * 2);
+
+            } else if (tickmarks == 'square' || tickmarks == 'endsquare') {
+                this.context.fillStyle = isShadow ? this.Get('chart.shadow.color') : 'white';
+                this.context.fillRect((xPos - this.Get('chart.ticksize')) + 1, (yPos - this.Get('chart.ticksize')) + 1, (this.Get('chart.ticksize') * 2) - 2, (this.Get('chart.ticksize') * 2) - 2);
+            }
+
+            this.context.stroke();
+            this.context.fill();
+
+        /**
+        * FILLED arrowhead
+        */
+        } else if (tickmarks == 'filledarrow') {
+        
+            var x = Math.abs(xPos - prevX);
+            var y = Math.abs(yPos - prevY);
+
+            if (yPos < prevY) {
+                var a = Math.atan(x / y) + 1.57;
+            } else {
+                var a = Math.atan(y / x) + 3.14;
+            }
+
+            this.context.beginPath();
+                this.context.moveTo(xPos, yPos);
+                this.context.arc(xPos, yPos, 7, a - 0.5, a + 0.5, false);
+            this.context.closePath();
+
+            this.context.stroke();
+            this.context.fill();
+
+        /**
+        * Arrow head, NOT filled
+        */
+        } else if (tickmarks == 'arrow') {
+
+            var x = Math.abs(xPos - prevX);
+            var y = Math.abs(yPos - prevY);
+
+            if (yPos < prevY) {
+                var a = Math.atan(x / y) + 1.57;
+            } else {
+                var a = Math.atan(y / x) + 3.14;
+            }
+
+            this.context.beginPath();
+                this.context.moveTo(xPos, yPos);
+                this.context.arc(xPos, yPos, 7, a - 0.5 - (document.all ? 0.1 : 0.01), a - 0.4, false);
+
+                this.context.moveTo(xPos, yPos);
+                this.context.arc(xPos, yPos, 7, a + 0.5 + (document.all ? 0.1 : 0.01), a + 0.5, true);
+
+
+            this.context.stroke();
+        
+        /**
+        * Custom tick drawing function
+        */
+        } else if (typeof(tickmarks) == 'function') {
+            tickmarks(this, lineData, lineData[index], index, xPos, yPos, color, prevX, prevY);
+        }
+    }
+
+
+    /**
+    * Draws a filled range if necessary
+    */
+    RGraph.Line.prototype.DrawRange = function ()
+    {
+        /**
+        * Fill the range if necessary
+        */
+        if (this.Get('chart.filled.range') && this.Get('chart.filled')) {
+            this.context.beginPath();
+            this.context.fillStyle = this.Get('chart.fillstyle');
+            this.context.strokeStyle = this.Get('chart.fillstyle');
+            this.context.lineWidth = 1;
+            var len = (this.coords.length / 2);
+
+            for (var i=0; i<len; ++i) {
+                if (i == 0) {
+                    this.context.moveTo(this.coords[i][0], this.coords[i][1])
+                } else {
+                    this.context.lineTo(this.coords[i][0], this.coords[i][1])
+                }
+            }
+
+            for (var i=this.coords.length - 1; i>=len; --i) {
+                this.context.lineTo(this.coords[i][0], this.coords[i][1])
+            }
+            this.context.stroke();
+            this.context.fill();
+        }
+    }
+
+
+    /**
+    * Redraws the line with the correct line width etc
+    * 
+    * @param array coords The coordinates of the line
+    */
+    RGraph.Line.prototype.RedrawLine = function (coords, color, linewidth)
+    {
+        if (this.Get('chart.noredraw')) {
+            return;
+        }
+
+        this.context.beginPath();
+        this.context.strokeStyle = (typeof(color) == 'object' && color ? color[0] : color);
+        this.context.lineWidth = linewidth;
+
+        var len    = coords.length;
+        var width  = RGraph.GetWidth(this);
+        var height = RGraph.GetHeight(this);
+        var penUp  = false;
+
+        for (var i=0; i<len; ++i) {
+
+            var xPos   = coords[i][0];
+            var yPos   = coords[i][1];
+
+            if (i > 0) {
+                var prevX = coords[i - 1][0];
+                var prevY = coords[i - 1][1];
+            }
+
+
+            if ((
+                   (i == 0 && coords[i])
+                || (yPos < this.gutterTop)
+                || (prevY < this.gutterTop)
+                || (yPos > (height - this.gutterBottom))
+                || (i > 0 && prevX > (width - this.gutterRight))
+                || (i > 0 && prevY > (height - this.gutterBottom))
+                || prevY == null
+                || penUp == true
+               ) && (!this.Get('chart.outofbounds') || yPos == null || prevY == null) ) {
+
+                this.context.moveTo(coords[i][0], coords[i][1]);
+
+                penUp = false;
+
+            } else {
+
+                if (this.Get('chart.stepped') && i > 0) {
+                    this.context.lineTo(coords[i][0], coords[i - 1][1]);
+                }
+                
+                // Don't draw the last bit of a stepped chart. Now DO
+                //if (!this.Get('chart.stepped') || i < (coords.length - 1)) {
+                this.context.lineTo(coords[i][0], coords[i][1]);
+                //}
+                penUp = false;
+            }
+        }
+
+        /**
+        * If two colors are specified instead of one, go over the up bits
+        */
+        if (this.Get('chart.colors.alternate') && typeof(color) == 'object' && color[0] && color[1]) {
+            for (var i=1; i<len; ++i) {
+
+                var prevX = coords[i - 1][0];
+                var prevY = coords[i - 1][1];
+                
+                this.context.beginPath();
+                this.context.strokeStyle = color[coords[i][1] < prevY ? 0 : 1];
+                this.context.lineWidth = this.Get('chart.linewidth');
+                this.context.moveTo(prevX, prevY);
+                this.context.lineTo(coords[i][0], coords[i][1]);
+                this.context.stroke();
+            }
+        }
+    }
+
+
+    /**
+    * This function is used by MSIE only to manually draw the shadow
+    * 
+    * @param array coords The coords for the line
+    */
+    RGraph.Line.prototype.DrawIEShadow = function (coords, color)
+    {
+        var offsetx = this.Get('chart.shadow.offsetx');
+        var offsety = this.Get('chart.shadow.offsety');
+        
+        this.context.lineWidth   = this.Get('chart.linewidth');
+        this.context.strokeStyle = color;
+        this.context.beginPath();
+
+        for (var i=0; i<coords.length; ++i) {
+            if (i == 0) {
+                this.context.moveTo(coords[i][0] + offsetx, coords[i][1] + offsety);
+            } else {
+                this.context.lineTo(coords[i][0] + offsetx, coords[i][1] + offsety);
+            }
+        }
+
+        this.context.stroke();
+    }
+
+
+    /**
+    * Draw the backdrop
+    */
+    RGraph.Line.prototype.DrawBackdrop = function (coords, color)
+    {
+        var size = this.Get('chart.backdrop.size');
+        this.context.lineWidth = size;
+        this.context.globalAlpha = this.Get('chart.backdrop.alpha');
+        this.context.strokeStyle = color;
+        this.context.lineJoin = 'miter';
+        
+        this.context.beginPath();
+            this.context.moveTo(coords[0][0], coords[0][1]);
+            for (var j=1; j<coords.length; ++j) {
+                this.context.lineTo(coords[j][0], coords[j][1]);
+            }
+    
+        this.context.stroke();
+    
+        // Reset the alpha value
+        this.context.globalAlpha = 1;
+        this.context.lineJoin = 'round';
+        RGraph.NoShadow(this);
+    }
+
+
+    /**
+    * Returns the linewidth
+    */
+    RGraph.Line.prototype.GetLineWidth = function (i)
+    {
+        var linewidth = this.Get('chart.linewidth');
+        
+        if (typeof(linewidth) == 'number') {
+            return linewidth;
+        
+        } else if (typeof(linewidth) == 'object') {
+            if (linewidth[i]) {
+                return linewidth[i];
+            } else {
+                return linewidth[0];
+            }
+
+            alert('[LINE] Error! chart.linewidth should be a single number or an array of one or more numbers');
+        }
+    }
+
+
+    /**
+    * The getPoint() method - used to get the point the mouse is currently over, if any
+    * 
+    * @param object e The event object
+    */
+    RGraph.Line.prototype.getPoint = function (e)
+    {
+        var canvas  = e.target;
+        var obj     = canvas.__object__;
+        var context = obj.context;
+        var mouseXY = RGraph.getMouseXY(e);
+        var mouseX  = mouseXY[0];
+        var mouseY  = mouseXY[1];
+
+        for (var i=0; i<obj.coords.length; ++i) {
+        
+            var xCoord = obj.coords[i][0];
+            var yCoord = obj.coords[i][1];
+ 
+            if (   mouseX <= (xCoord + 5)
+                && mouseX >= (xCoord - 5)
+                && mouseY <= (yCoord + 5)
+                && mouseY >= (yCoord - 5)
+               ) {
+
+                    return [obj, xCoord, yCoord, i];
+            }
+        }
+    }
+
+
+    /**
+    * Draws the above line labels
+    */
+    RGraph.Line.prototype.DrawAboveLabels = function ()
+    {
+        var context    = this.context;
+        var size       = this.Get('chart.labels.above.size');
+        var font       = this.Get('chart.text.font');
+        var units_pre  = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+
+        context.beginPath();
+
+        // Don't need to check that chart.labels.above is enabled here, it's been done already
+        for (var i=0; i<this.coords.length; ++i) {
+            var coords = this.coords[i];
+            
+            RGraph.Text(context, font, size, coords[0], coords[1] - 5 - size, RGraph.number_format(this, this.data_arr[i], units_pre, units_post), 'center', 'center', true, null, 'rgba(255, 255, 255, 0.7)');
+        }
+        
+        context.fill();
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.meter.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.meter.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.meter.js	(revision 225)
@@ -0,0 +1,455 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The bar chart constructor
+    * 
+    * @param string canvas The canvas ID
+    * @param min    integer The minimum value
+    * @param max    integer The maximum value
+    * @param value  integer The indicated value
+    */
+    RGraph.Meter = function (id, min, max, value)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.type              = 'meter';
+        this.min               = min;
+        this.max               = max;
+        this.value             = value;
+        this.centerx           = null;
+        this.centery           = null;
+        this.radius            = null;
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        // Various config type stuff
+        this.properties = {
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.linewidth':              2,
+            'chart.border.color':           'black',
+            'chart.text.font':              'Verdana',
+            'chart.text.size':              10,
+            'chart.text.color':             'black',
+            'chart.value.label':            false,
+            'chart.value.text.decimals':    0,
+            'chart.value.text.units.pre':   '',
+            'chart.value.text.units.post':  '',
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.color':            'black',
+            'chart.green.start':            ((this.max - this.min) * 0.35) + this.min,
+            'chart.green.end':              this.max,
+            'chart.green.color':            '#207A20',
+            'chart.yellow.start':           ((this.max - this.min) * 0.1) + this.min,
+            'chart.yellow.end':             ((this.max - this.min) * 0.35) + this.min,
+            'chart.yellow.color':           '#D0AC41',
+            'chart.red.start':              this.min,
+            'chart.red.end':                ((this.max - this.min) * 0.1) + this.min,
+            'chart.red.color':              '#9E1E1E',
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.contextmenu':            null,
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            15,
+            'chart.zoom.delay':             33,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.shadow':                 false,
+            'chart.shadow.color':           'rgba(0,0,0,0.5)',
+            'chart.shadow.blur':            3,
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.tickmarks.small.num':      100,
+            'chart.tickmarks.big.num':        10,
+            'chart.tickmarks.small.color':    '#bbb',
+            'chart.tickmarks.big.color':      'black',
+            'chart.scale.decimals':           0
+        }
+
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[METER] No canvas support');
+            return;
+        }
+        
+        /**
+        * Constrain the value to be within the min and max
+        */
+        if (this.value > this.max) this.value = this.max;
+        if (this.value < this.min) this.value = this.min;
+    }
+
+
+    /**
+    * A setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Meter.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Meter.prototype.Get = function (name)
+    {
+        return this.properties[name];
+    }
+
+
+    /**
+    * The function you call to draw the bar chart
+    */
+    RGraph.Meter.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        this.centerx = this.canvas.width / 2;
+        this.centery = this.canvas.height    - this.gutterBottom;
+        this.radius  = Math.min(
+                                this.canvas.width - this.gutterLeft - this.gutterRight,
+                                this.canvas.height - this.gutterTop - this.gutterBottom
+                               );
+
+        this.DrawBackground();
+        this.DrawNeedle();
+        this.DrawLabels();
+        this.DrawReadout();
+        
+        /**
+        * Draw the title
+        */
+        RGraph.DrawTitle(this.canvas, this.Get('chart.title'), this.gutterTop);
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+        
+        /**
+        * For MSIE only, to cover the spurious lower ends of the circle
+        */
+        if (RGraph.isIE8()) {
+            // Cover the left tail
+            this.context.beginPath();
+            this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+            this.context.fillStyle = 'white';
+            this.context.fillRect(this.centerx - this.radius - 5, RGraph.GetHeight(this) - this.gutterBottom + 1, 10, this.gutterBottom);
+            this.context.fill();
+
+            // Cover the right tail
+            this.context.beginPath();
+            this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+            this.context.fillStyle = 'white';
+            this.context.fillRect(this.centerx + this.radius - 5, RGraph.GetHeight(this) - this.gutterBottom + 1, 10, this.gutterBottom);
+            this.context.fill();
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draws the background of the chart
+    */
+    RGraph.Meter.prototype.DrawBackground = function ()
+    {
+        // Draw the shadow
+        if (this.Get('chart.shadow')) {
+            this.context.beginPath();
+                this.context.fillStyle     = 'white';
+                this.context.shadowColor   = this.Get('chart.shadow.color');
+                this.context.shadowBlur    = this.Get('chart.shadow.blur');
+                this.context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+                this.context.shadowOffsetY = this.Get('chart.shadow.offsety');
+                
+                this.context.arc(this.centerx, this.centery, this.radius, 3.14, 6.28, false);
+                //this.context.arc(this.centerx, this.centery, , 0, 6.28, false);
+            this.context.fill();
+
+
+            this.context.beginPath();
+                var r = (this.radius * 0.06) > 40 ? 40 : (this.radius * 0.06);
+                this.context.arc(this.centerx, this.centery, r, 0, 6.28, 0);
+            this.context.fill();
+
+            RGraph.NoShadow(this);
+        }
+
+        // First, draw the grey tickmarks
+        this.context.beginPath();
+        this.context.strokeStyle = this.Get('chart.tickmarks.small.color');
+        for (var i=0; i<3.14; i+=(3.14 / this.Get('chart.tickmarks.small.num'))) {
+            this.context.arc(this.centerx, this.centery, this.radius, 3.14 + i, 3.1415 + i, 0);
+            this.context.lineTo(this.centerx, this.centery);
+        }
+        this.context.stroke();
+
+        // Draw the white semi-circle that makes the tickmarks
+        this.context.beginPath();
+        this.context.fillStyle = 'white'
+        this.context.arc(this.centerx, this.centery, this.radius - 4, 3.1415927, 6.28, false);
+        this.context.closePath();
+        this.context.fill();
+
+
+
+        // Second, draw the darker tickmarks. First run draws them in white to get rid of the existing tickmark,
+        // then the second run draws them in the requested color
+        var colors = ['white','white',this.Get('chart.tickmarks.big.color')];
+        for (var j=0; j<colors.length; ++j) {
+            for (var i=0; i<3.14; i+=(3.1415927 / this.Get('chart.tickmarks.big.num'))) {
+                this.context.beginPath();
+                this.context.strokeStyle = colors[j];
+                this.context.arc(this.centerx, this.centery, this.radius, 3.14 + i, 3.1415 + i, 0);
+                this.context.lineTo(this.centerx, this.centery)
+                this.context.stroke();
+            }
+        }
+
+        // Draw the white circle that makes the tickmarks
+        this.context.beginPath();
+        this.context.fillStyle = 'white';
+        this.context.arc(this.centerx, this.centery, this.radius - 7, 3.1415927, 6.28, false);
+        this.context.closePath();
+        this.context.fill();
+
+        // Draw the green area
+        this.context.strokeStyle = this.Get('chart.green.color');
+        this.context.fillStyle = this.Get('chart.green.color');
+        this.context.beginPath();
+        this.context.arc(this.centerx,this.centery,this.radius * 0.85,(((this.Get('chart.green.start') - this.min) / (this.max - this.min)) * 3.1415927) + 3.1415927,(((this.Get('chart.green.end') - this.min) / (this.max - this.min)) * 3.1415927) + 3.1415927,false);
+        this.context.lineTo(this.centerx, this.centery);
+        this.context.closePath();
+        this.context.stroke();
+        this.context.fill();
+        
+        // Draw the yellow area
+        this.context.strokeStyle = this.Get('chart.yellow.color');
+        this.context.fillStyle = this.Get('chart.yellow.color');
+        this.context.beginPath();        this.context.arc(this.centerx,this.centery,this.radius * 0.85,(((this.Get('chart.yellow.start') - this.min) / (this.max - this.min)) * 3.1415927) + 3.1415927,(((this.Get('chart.yellow.end') - this.min) / (this.max - this.min)) * 3.1415927) + 3.1415927,false)
+        this.context.lineTo(this.centerx, this.centery);
+        this.context.closePath();
+        this.context.stroke();
+        this.context.fill();
+        
+        // Draw the yellow area
+        this.context.strokeStyle = this.Get('chart.red.color');
+        this.context.fillStyle = this.Get('chart.red.color');
+        this.context.beginPath();
+        this.context.arc(this.centerx,this.centery,this.radius * 0.85,(((this.Get('chart.red.start') - this.min) / (this.max - this.min)) * 3.1415927) + 3.1415927,(((this.Get('chart.red.end') - this.min) / (this.max - this.min)) * 3.1415927) + 3.1415927,false);
+        this.context.lineTo(this.centerx, this.centery);
+        this.context.closePath();
+        this.context.stroke();
+        this.context.fill();
+
+        // Draw the outline
+        this.context.strokeStyle = this.Get('chart.border.color');
+        this.context.lineWidth   = this.Get('chart.linewidth');
+
+        this.context.beginPath();
+        this.context.moveTo(this.centerx, this.centery);
+        this.context.arc(this.centerx, this.centery, this.radius, 3.1415927, 6.2831854, false);
+        this.context.closePath();
+
+        this.context.stroke();
+        
+        // Reset the linewidth back to 1
+        this.context.lineWidth = 1;
+    }
+
+
+    /**
+    * Draws the pointer
+    */
+    RGraph.Meter.prototype.DrawNeedle = function ()
+    {
+        // First draw the circle at the bottom
+        this.context.fillStyle = 'black';
+        this.context.lineWidth = this.radius >= 200 ? 7 : 3;
+        this.context.lineCap = 'round';
+
+        // Now, draw the pointer
+        this.context.beginPath();
+        this.context.strokeStyle = 'black';
+        var a = (((this.value - this.min) / (this.max - this.min)) * 3.14) + 3.14;
+        this.context.arc(this.centerx, this.centery, this.radius * 0.7, a, a + 0.001, false);
+        this.context.lineTo(this.centerx, this.centery);
+        this.context.stroke();
+        
+        // Draw the triangular needle head
+        this.context.beginPath();
+            this.context.lineWidth = 1;
+            //this.context.moveTo(this.centerx, this.centery);
+            this.context.arc(this.centerx, this.centery, (this.radius * 0.7) + 15, a, a + 0.001, 0);
+            this.context.arc(this.centerx, this.centery, (this.radius * 0.7) - 15, a + 0.087, a + 0.087999, 0);
+            this.context.arc(this.centerx, this.centery, (this.radius * 0.7) - 15, a - 0.087, a - 0.087999, 1);
+        this.context.fill();
+
+        // Draw the center circle
+        var r = (this.radius * 0.06) > 40 ? 40 : (this.radius * 0.06);
+
+        this.context.beginPath();
+        this.context.arc(this.centerx, this.centery, r, 0, 6.28, 0);
+        this.context.fill();
+        
+        // Draw the centre bit of the circle
+        this.context.fillStyle = 'white';
+        this.context.beginPath();
+        this.context.arc(this.centerx, this.centery, r - 2, 0, 6.28, 0);
+        this.context.fill();
+    }
+
+
+    /**
+    * Draws the labels
+    */
+    RGraph.Meter.prototype.DrawLabels = function ()
+    {
+        var context    = this.context;
+        var radius     = this.radius;
+        var text_size  = this.Get('chart.text.size');
+        var text_font  = this.Get('chart.text.font');
+        var units_post = this.Get('chart.units.post');
+        var units_pre  = this.Get('chart.units.pre');
+        var centerx    = this.centerx;
+        var centery    = this.centery;
+        var min        = this.min;
+        var max        = this.max;
+        var decimals   = this.Get('chart.scale.decimals');
+
+        context.fillStyle = this.Get('chart.text.color');
+        context.lineWidth = 1;
+
+        context.beginPath();
+
+
+        RGraph.Text(context, text_font, text_size, centerx - radius + (0.075 * radius), centery - 10, units_pre + (min).toFixed(decimals) + units_post, 'center', 'left', false, 270);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(0.62819 / 2) * (radius - (0.075 * radius)) ),centery - (Math.sin(0.682819 / 2) * (radius - (0.1587 * radius)) ),units_pre + (((max - min) * (1/10)) + min).toFixed(decimals) + units_post,'center','center', false, 288);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(0.62819) * (radius - (0.07 * radius)) ),centery - (Math.sin(0.682819) * (radius - (0.15 * radius)) ),units_pre + (((max - min) * (2/10)) + min).toFixed(decimals) + units_post,'center','center', false, 306);
+        RGraph.Text(context, text_font, text_size,centerx - (Math.cos(0.95) * (radius - (0.085 * radius)) ),centery - (Math.sin(0.95) * (radius - (0.0785 * radius)) ),units_pre + (((max - min) * (3/10)) + min).toFixed(decimals) + units_post,'center', 'center', false, 320);
+        RGraph.Text(context, text_font, text_size,centerx - (Math.cos(1.2566) * (radius - (0.085 * radius)) ),centery - (Math.sin(1.2566) * (radius - (0.0785 * radius)) ),units_pre + (((max - min) * (4/10)) + min).toFixed(decimals) + units_post,'center', 'center', false, 342);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(1.57) * (radius - (0.075 * radius)) ),centery - (Math.sin(1.57) * (radius - (0.075 * radius)) ),units_pre + (((max - min) * (5/10)) + min).toFixed(decimals) + units_post,'center','center', false, 0);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(1.88495562) * (radius - (0.075 * radius)) ),centery - (Math.sin(1.88495562) * (radius - (0.075 * radius)) ),units_pre + (((max - min)* (6/10)) + min).toFixed(decimals) + units_post,'center','center', false, 18);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(2.1989) * (radius - (0.075 * radius)) ),centery - (Math.sin(2.1989) * (radius - (0.075 * radius)) ),units_pre + (((max - min)* (7/10)) + min).toFixed(decimals) + units_post,'center','center', false, 36);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(2.51327416) * (radius - (0.075 * radius)) ),centery - (Math.sin(2.51327416) * (radius - (0.075 * radius)) ), units_pre + (((max - min) * (8/10)) + min).toFixed(decimals) + units_post,'center','center', false, 54);
+        RGraph.Text(context,text_font,text_size,centerx - (Math.cos(2.82764832) * (radius - (0.075 * radius)) ),centery - (Math.sin(2.82764832) * (radius - (0.075 * radius)) ),units_pre + (((max - min) * (9/10)) + min).toFixed(decimals) + units_post,'center','center', false, 72);
+        RGraph.Text(context, text_font, text_size,centerx + radius - (0.075 * radius),centery - 10,units_pre + (max).toFixed(decimals) + units_post, 'center', 'right', false, 90);
+
+        context.fill();
+        context.stroke();
+    }
+
+    
+    /**
+    * This function draws the text readout if specified
+    */
+    RGraph.Meter.prototype.DrawReadout  = function ()
+    {
+        if (this.Get('chart.value.text')) {
+            this.context.beginPath();
+            RGraph.Text(this.context,
+                        this.Get('chart.text.font'),
+                        this.Get('chart.text.size'),
+                        this.centerx,
+                        this.centery - this.Get('chart.text.size') - 15,
+                        this.Get('chart.value.text.units.pre') + (this.value).toFixed(this.Get('chart.value.text.decimals')) + this.Get('chart.value.text.units.post'),
+                         'center',
+                         'center',
+                         true,
+                         null,
+                         'white');
+
+            this.context.stroke();
+            this.context.fill();
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.modaldialog.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.modaldialog.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.modaldialog.js	(revision 225)
@@ -0,0 +1,244 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    ModalDialog = {}
+    ModalDialog.dialog     = null;
+    ModalDialog.background = null;
+    ModalDialog.offset     = 50;
+    ModalDialog.events     = [];
+
+    /**
+    * Shows the dialog with the supplied DIV acting as the contents
+    * 
+    * @param string id    The ID of the DIV to use as the dialogs contents
+    * @param int    width The width of the dialog
+    */
+    ModalDialog.Show = function (id, width)
+    {
+        ModalDialog.id    = id;
+        ModalDialog.width = width;
+
+        ModalDialog.ShowBackground();
+        ModalDialog.ShowDialog();
+
+        // Install the event handlers
+        window.onresize = ModalDialog.Resize;
+
+        
+        // Call them initially
+        ModalDialog.Resize();
+        
+        ModalDialog.FireCustomEvent('onmodaldialog');
+    }
+    
+    
+    /**
+    * Shows the background semi-transparent darkened DIV
+    */
+    ModalDialog.ShowBackground = function ()
+    {
+        // Create the background if neccessary
+        ModalDialog.background = document.createElement('DIV');
+        ModalDialog.background.className      = 'ModalDialog_background';
+        ModalDialog.background.style.position = 'fixed';
+        ModalDialog.background.style.top      = 0;
+        ModalDialog.background.style.left     = 0;
+        ModalDialog.background.style.width    = (screen.width + 100) + 'px';
+        ModalDialog.background.style.height   = (screen.height + 100) + 'px';
+        ModalDialog.background.style.backgroundColor = 'rgb(204,204,204)';        
+        ModalDialog.background.style.opacity = 0;
+        ModalDialog.background.style.zIndex = 3276;
+        ModalDialog.background.style.filter = "Alpha(opacity=50)";
+            
+        document.body.appendChild(ModalDialog.background);
+
+        ModalDialog.background.style.visibility = 'visible';
+    }
+
+
+    /**
+    * Shows the dialog itself
+    */
+    ModalDialog.ShowDialog = function ()
+    {
+        // Create the DIV if necessary
+        if (!ModalDialog.dialog) {
+            ModalDialog.dialog = document.createElement('DIV');
+    
+            ModalDialog.dialog.id                    = 'ModalDialog_dialog';
+            ModalDialog.dialog.className             = 'ModalDialog_dialog';
+
+            var borderRadius = '15px';
+
+            ModalDialog.dialog.style.borderRadius       = borderRadius;
+            ModalDialog.dialog.style.MozBorderRadius    = borderRadius;
+            ModalDialog.dialog.style.WebkitBorderRadius = borderRadius;
+
+            ModalDialog.dialog.style.boxShadow    = '3px 3px 3px rgba(96,96,96,0.5)';
+            ModalDialog.dialog.style.MozBoxShadow = '3px 3px 3px rgba(96,96,96,0.5)';
+            ModalDialog.dialog.style.WebkitBoxShadow    = 'rgba(96,96,96,0.5) 3px 3px 3px';
+
+            ModalDialog.dialog.style.position        = 'fixed';
+            ModalDialog.dialog.style.backgroundColor = 'white';
+            ModalDialog.dialog.style.width           = parseInt(ModalDialog.width) + 'px';
+            ModalDialog.dialog.style.border          = '2px solid #999';
+            ModalDialog.dialog.style.zIndex          = 32767;
+            ModalDialog.dialog.style.padding         = '5px';
+            ModalDialog.dialog.style.paddingTop      = '25px';
+            ModalDialog.dialog.style.opacity       = 0;
+            
+            if (document.all) {
+                ModalDialog.dialog.style.zIndex = 32767;
+            }
+
+
+
+            // Accomodate various browsers
+            if (navigator.userAgent.indexOf('Opera') != -1) {
+                ModalDialog.dialog.style.paddingTop = '25px';
+
+            } else if (navigator.userAgent.indexOf('MSIE') != -1) {
+                ModalDialog.dialog.style.paddingTop = '25px';
+
+            } else if (navigator.userAgent.indexOf('Safari') != -1) {
+                ModalDialog.dialog.style.paddingTop = '25px';
+            }
+
+            document.body.appendChild(ModalDialog.dialog);
+
+
+            // Now create the grey bar at the top of the dialog
+            var bar = document.createElement('DIV');
+                bar.className = 'ModalDialog_topbar';
+                bar.style.top = 0;
+                bar.style.left = 0;
+                bar.style.width = '100%';//(ModalDialog.dialog.offsetWidth - 4) + 'px';
+                bar.style.height = '20px';
+                bar.style.backgroundColor = '#bbb';
+                bar.style.borderBottom = '2px solid #999';
+                //bar.style.zIndex    = 50000;
+                bar.style.position = 'absolute';
+                var borderRadius = '11px';
+                bar.style.WebkitBorderTopLeftRadius = borderRadius;
+                bar.style.WebkitBorderTopRightRadius = borderRadius;
+                bar.style.MozBorderRadiusTopleft = borderRadius;
+                bar.style.MozBorderRadiusTopright = borderRadius;
+                bar.style.borderTopRightRadius = borderRadius;
+                bar.style.borderTopLeftRadius = borderRadius;
+            ModalDialog.dialog.appendChild(bar);
+            
+            // Add the content div
+            var content = document.createElement('DIV');
+                //content.style.paddingTop = '20px';
+                content.style.width = '100%';
+                content.style.height = '100%';
+            ModalDialog.dialog.appendChild(content);
+
+        content.innerHTML = document.getElementById(ModalDialog.id).innerHTML;
+
+            // Now reposition the dialog in the center
+            ModalDialog.dialog.style.left = (document.body.offsetWidth / 2) - (ModalDialog.dialog.offsetWidth / 2) + 'px';
+            ModalDialog.dialog.style.top  = '30%';
+        }
+        
+        // Show the dialog
+        ModalDialog.dialog.style.visibility = 'visible';
+        
+        // A simple fade-in effect
+        setTimeout('ModalDialog.dialog.style.opacity = 0.2', 50);
+        setTimeout('ModalDialog.dialog.style.opacity = 0.4', 100);
+        setTimeout('ModalDialog.dialog.style.opacity = 0.6', 150);
+        setTimeout('ModalDialog.dialog.style.opacity = 0.8', 200);
+        setTimeout('ModalDialog.dialog.style.opacity = 1', 250);
+
+        setTimeout('ModalDialog.background.style.opacity = 0.1', 50);
+        setTimeout('ModalDialog.background.style.opacity = 0.2', 100);
+        setTimeout('ModalDialog.background.style.opacity = 0.3', 150);
+        setTimeout('ModalDialog.background.style.opacity = 0.4', 200);
+        setTimeout('ModalDialog.background.style.opacity = 0.5', 250);
+    }
+
+    
+    /**
+    * Hides everything
+    */
+    ModalDialog.Close = function ()
+    {
+        if (ModalDialog.dialog) {
+            ModalDialog.dialog.style.visibility = 'hidden';
+            ModalDialog.dialog.style.opacity = 0;
+        }
+
+        if (ModalDialog.background) {
+            ModalDialog.background.style.visibility = 'hidden';
+            ModalDialog.background.style.opacity = 0;
+        }        
+    }
+    
+    // An alias
+    ModalDialog.Hide = ModalDialog.Close
+    
+    
+    /**
+    * Accommodate the window being resized
+    */
+    ModalDialog.Resize = function ()
+    {
+        if (ModalDialog.dialog) {
+            ModalDialog.dialog.style.left = (document.body.offsetWidth / 2) - (ModalDialog.dialog.offsetWidth / 2) + 'px';
+        }
+
+        ModalDialog.background.style.width  = '2500px';
+        ModalDialog.background.style.height = '2500px';
+    }
+
+
+    /**
+    * Returns the page height
+    * 
+    * @return int The page height
+    */
+    ModalDialog.AddCustomEventListener = function (name, func)
+    {
+        if (typeof(ModalDialog.events) == 'undefined') {
+            ModalDialog.events = [];
+        }
+
+        ModalDialog.events.push([name, func]);
+    }
+
+
+    /**
+    * Used to fire the ModalDialog custom event
+    * 
+    * @param object obj   The graph object that fires the event
+    * @param string event The name of the event to fire
+    */
+    ModalDialog.FireCustomEvent = function (name)
+    {
+        for (var i=0; i<ModalDialog.events.length; ++i) {
+            if (typeof(ModalDialog.events[i][0]) == 'string' && ModalDialog.events[i][0] == name && typeof(ModalDialog.events[i][1]) == 'function') {
+                ModalDialog.events[i][1]();
+            }
+        }
+    }
+
+
+    /**
+    * Returns true if the browser is IE8
+    */
+    ModalDialog.isIE8 = function ()
+    {
+        return document.all && (navigatot.userAgent.indexOf('MSIE 8') > 0);
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.odo.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.odo.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.odo.js	(revision 225)
@@ -0,0 +1,777 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The odometer constructor. Pass it the ID of the canvas tag, the start value of the odo,
+    * the end value, and the value that the pointer should point to.
+    * 
+    * @param string id    The ID of the canvas tag
+    * @param int    start The start value of the Odo
+    * @param int    end   The end value of the odo
+    * @param int    value The indicated value (what the needle points to)
+    */
+    RGraph.Odometer = function (id, start, end, value)
+    {
+        this.id                = id
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.canvas.__object__ = this;
+        this.type              = 'odo';
+        this.isRGraph          = true;
+        this.start             = start;
+        this.end               = end;
+        this.value             = value;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        this.properties = {
+            'chart.radius':                 null,
+            'chart.value.text':             false,
+            'chart.needle.color':           'black',
+            'chart.needle.width':           2,
+            'chart.needle.head':            true,
+            'chart.needle.tail':            true,
+            'chart.needle.type':            'pointer',
+            'chart.needle.extra':            [],
+            'chart.needle.triangle.border': '#aaa',
+            'chart.text.size':              10,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.green.max':              end * 0.75,
+            'chart.red.min':                end * 0.9,
+            'chart.green.color':            'green',
+            'chart.yellow.color':           'yellow',
+            'chart.red.color':              'red',
+            'chart.green.solid':            false,
+            'chart.yellow.solid':           false,
+            'chart.red.solid':              false,
+            'chart.label.area':             35,
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.contextmenu':            null,
+            'chart.linewidth':              1,
+            'chart.shadow.inner':           false,
+            'chart.shadow.inner.color':     'black',
+            'chart.shadow.inner.offsetx':   3,
+            'chart.shadow.inner.offsety':   3,
+            'chart.shadow.inner.blur':      6,
+            'chart.shadow.outer':           false,
+            'chart.shadow.outer.color':     '#666',
+            'chart.shadow.outer.offsetx':   0,
+            'chart.shadow.outer.offsety':   0,
+            'chart.shadow.outer.blur':      15,
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.scale.decimals':         0,
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.border':                 false,
+            'chart.border.color1':          '#BEBCB0',
+            'chart.border.color2':          '#F0EFEA',
+            'chart.border.color3':          '#BEBCB0',
+            'chart.tickmarks.highlighted':  false,
+            'chart.zerostart':              false,
+            'chart.labels':                 null,
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.value.units.pre':        '',
+            'chart.value.units.post':       '',
+            'chart.key':                    [],
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.halign':             'right',
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.text.size':          10,
+        }
+    }
+
+
+    /**
+    * A peudo setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Odometer.prototype.Set = function (name, value)
+    {
+        if (name == 'chart.needle.style') {
+            alert('[RGRAPH] The RGraph property chart.needle.style has changed to chart.needle.color');
+        }
+
+        if (name == 'chart.needle.thickness') {
+            name = 'chart.needle.width';
+        }
+
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Odometer.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+
+    /**
+    * Draws the odometer
+    */
+    RGraph.Odometer.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // Work out a few things
+        this.radius   = Math.min((RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / 2, (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2) - (this.Get('chart.border') ? 25 : 0);
+        this.diameter = 2 * this.radius;
+        this.centerx  = RGraph.GetWidth(this) / 2;
+        this.centery  = RGraph.GetHeight(this) / 2;
+        this.range    = this.end - this.start;
+        
+        if (typeof(this.Get('chart.radius')) == 'number') {
+            this.radius = this.Get('chart.radius');
+        }
+        
+        /**
+        * Move the centerx if the key is defined
+        */
+        if (this.Get('chart.key').length > 0 && this.canvas.width > this.canvas.height) {
+            this.centerx = 5 + this.radius;
+        }
+
+        this.context.lineWidth = this.Get('chart.linewidth');
+
+        // Draw the background
+        this.DrawBackground();
+
+        // And lastly, draw the labels
+        this.DrawLabels();
+
+        // Draw the needle
+        this.DrawNeedle(this.value, this.Get('chart.needle.color'));
+        
+        /**
+        * Draw any extra needles
+        */
+        if (this.Get('chart.needle.extra').length > 0) {
+            for (var i=0; i<this.Get('chart.needle.extra').length; ++i) {
+                var needle = this.Get('chart.needle.extra')[i];
+                this.DrawNeedle(needle[0], needle[1], needle[2]);
+            }
+        }
+        
+        /**
+        * Draw the key if requested
+        */
+        if (this.Get('chart.key').length > 0) {
+            // Build a colors array out of the needle colors
+            var colors = [this.Get('chart.needle.color')];
+            
+            if (this.Get('chart.needle.extra').length > 0) {
+                for (var i=0; i<this.Get('chart.needle.extra').length; ++i) {
+                    var needle = this.Get('chart.needle.extra')[i];
+                    colors.push(needle[1]);
+                }
+            }
+
+            RGraph.DrawKey(this, this.Get('chart.key'), colors);
+        }
+        
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    /**
+    * Draws the background
+    */
+    RGraph.Odometer.prototype.DrawBackground = function ()
+    {
+        this.context.beginPath();
+
+        /**
+        * Turn on the shadow if need be
+        */
+        if (this.Get('chart.shadow.outer')) {
+            RGraph.SetShadow(this, this.Get('chart.shadow.outer.color'), this.Get('chart.shadow.outer.offsetx'), this.Get('chart.shadow.outer.offsety'), this.Get('chart.shadow.outer.blur'));
+        }
+
+        var backgroundColor = '#eee';
+
+        // Draw the grey border
+        this.context.fillStyle = backgroundColor;
+        this.context.arc(this.centerx, this.centery, this.radius, 0.0001, 6.28, false);
+        this.context.fill();
+
+        /**
+        * Turn off the shadow
+        */
+        RGraph.NoShadow(this);
+
+
+        // Draw a circle
+        this.context.strokeStyle = '#666';
+        this.context.arc(this.centerx, this.centery, this.radius, 0, 6.28, false);
+
+        // Now draw a big white circle to make the lines appear as tick marks
+        // This is solely for Chrome
+        this.context.fillStyle = backgroundColor;
+        this.context.arc(this.centerx, this.centery, this.radius, 0, 6.28, false);
+        this.context.fill();
+
+        /**
+        * Draw more tickmarks
+        */
+        this.context.beginPath();
+        this.context.strokeStyle = '#bbb';
+        
+        for (var i=0; i<=360; i+=3) {
+            this.context.arc(this.centerx, this.centery, this.radius, 0, RGraph.degrees2Radians(i), false);
+            this.context.lineTo(this.centerx, this.centery);
+        }
+        this.context.stroke();
+
+        this.context.beginPath();
+        this.context.lineWidth = 1;
+        this.context.strokeStyle = 'black';
+
+        // Now draw a big white circle to make the lines appear as tick marks
+        this.context.fillStyle = backgroundColor;
+        this.context.strokeStyle = backgroundColor;
+        this.context.arc(this.centerx, this.centery, this.radius - 5, 0, 6.28, false);
+        this.context.fill();
+        this.context.stroke();
+
+        // Gray lines at 18 degree intervals
+        this.context.beginPath();
+        this.context.strokeStyle = '#ddd';
+        for (var i=0; i<360; i+=18) {
+            this.context.arc(this.centerx, this.centery, this.radius, 0, RGraph.degrees2Radians(i), false);
+            this.context.lineTo(this.centerx, this.centery);
+        }
+        this.context.stroke();
+        
+        // Redraw the outer circle
+        this.context.beginPath();
+        this.context.strokeStyle = 'black';
+        this.context.arc(this.centerx, this.centery, this.radius, 0, 6.2830, false);
+        this.context.stroke();
+
+        /**
+        * Now draw the center bits shadow if need be
+        */
+        if (this.Get('chart.shadow.inner')) {
+            this.context.beginPath();
+            RGraph.SetShadow(this, this.Get('chart.shadow.inner.color'), this.Get('chart.shadow.inner.offsetx'), this.Get('chart.shadow.inner.offsety'), this.Get('chart.shadow.inner.blur'));
+            this.context.arc(this.centerx, this.centery, this.radius - this.Get('chart.label.area'), 0, 6.28, 0);
+            this.context.fill();
+            this.context.stroke();
+    
+            /**
+            * Turn off the shadow
+            */
+            RGraph.NoShadow(this);
+        }
+
+        /*******************************************************
+        * Draw the green area
+        *******************************************************/
+        if (this.Get('chart.green.solid')) {
+            var greengrad = this.Get('chart.green.color');
+
+        } else {
+            var greengrad = this.context.createRadialGradient(this.centerx,this.centery,0,this.centerx,this.centery,this.radius);
+            greengrad.addColorStop(0, 'white');
+            greengrad.addColorStop(1, this.Get('chart.green.color'));
+        }
+
+        // Draw the "tick highlight"
+        if (this.Get('chart.tickmarks.highlighted')) {
+            this.context.beginPath();
+            this.context.lineWidth = 5;
+            this.context.strokeStyle = greengrad;
+            this.context.arc(this.centerx, this.centery, this.radius - 2.5,
+            
+                -1.57,
+                (((this.Get('chart.green.max') - this.start)/ (this.end - this.start)) * 6.2830) - 1.57,
+                0);
+
+            this.context.stroke();
+            
+            this.context.lineWidth = 1;
+        }
+
+        this.context.beginPath();
+            this.context.fillStyle = greengrad;
+            this.context.arc(
+                             this.centerx,
+                             this.centery,
+                             this.radius - this.Get('chart.label.area'),
+                             -1.57,
+                             (((this.Get('chart.green.max') - this.start)/ (this.end - this.start)) * 6.2830) - 1.57,
+                             false
+                            );
+            this.context.lineTo(this.centerx, this.centery);
+        this.context.closePath();
+        this.context.fill();
+
+
+        /*******************************************************
+        * Draw the yellow area
+        *******************************************************/
+        if (this.Get('chart.yellow.solid')) {
+            var yellowgrad = this.Get('chart.yellow.color');
+
+        } else {
+            var yellowgrad = this.context.createRadialGradient(this.centerx,this.centery,0,this.centerx,this.centery,this.radius);
+            yellowgrad.addColorStop(0, 'white');
+            yellowgrad.addColorStop(1, this.Get('chart.yellow.color'));
+        }
+
+        // Draw the "tick highlight"
+        if (this.Get('chart.tickmarks.highlighted')) {
+            this.context.beginPath();
+            this.context.lineWidth = 5;
+            this.context.strokeStyle = yellowgrad;
+            this.context.arc(this.centerx, this.centery, this.radius - 2.5, (
+            
+                ((this.Get('chart.green.max') - this.start) / (this.end - this.start)) * 6.2830) - 1.57,
+                (((this.Get('chart.red.min') - this.start) / (this.end - this.start)) * 6.2830) - 1.57,
+                0);
+
+            this.context.stroke();
+            
+            this.context.lineWidth = 1;
+        }
+
+        this.context.beginPath();
+            this.context.fillStyle = yellowgrad;
+            this.context.arc(
+                             this.centerx,
+                             this.centery,
+                             this.radius - this.Get('chart.label.area'),
+                             ( ((this.Get('chart.green.max') -this.start) / (this.end - this.start)) * 6.2830) - 1.57,
+                             ( ((this.Get('chart.red.min') - this.start) / (this.end - this.start)) * 6.2830) - 1.57,
+                             false
+                            );
+            this.context.lineTo(this.centerx, this.centery);
+        this.context.closePath();
+        this.context.fill();
+
+        /*******************************************************
+        * Draw the red area
+        *******************************************************/
+        if (this.Get('chart.red.solid')) {
+            var redgrad = this.Get('chart.red.color');
+
+        } else {
+            var redgrad = this.context.createRadialGradient(this.centerx,
+                                                            this.centery,
+                                                            0,
+                                                            this.centerx,
+                                                            this.centery,
+                                                            this.radius);
+            redgrad.addColorStop(0, 'white');
+            redgrad.addColorStop(1, this.Get('chart.red.color'));
+        }
+
+
+        // Draw the "tick highlight"
+        if (this.Get('chart.tickmarks.highlighted')) {
+            this.context.beginPath();
+            this.context.lineWidth = 5;
+            this.context.strokeStyle = redgrad;
+            this.context.arc(this.centerx, this.centery, this.radius - 2.5,(((this.Get('chart.red.min') - this.start) / (this.end - this.start)) * 6.2830) - 1.57,(2 * Math.PI) - (0.5 * Math.PI),0);
+            this.context.stroke();
+            
+            this.context.lineWidth = 1;
+        }
+
+        this.context.beginPath();
+            this.context.fillStyle = redgrad;
+            this.context.strokeStyle = redgrad;
+            this.context.arc(
+                             this.centerx,
+                             this.centery,
+                             this.radius - this.Get('chart.label.area'),
+                             (((this.Get('chart.red.min') - this.start) / (this.end - this.start)) * 6.2830) - 1.57,
+                             6.2830 - (0.25 * 6.2830),
+                             false
+                            );
+            this.context.lineTo(this.centerx, this.centery);
+        this.context.closePath();
+        this.context.fill();
+
+
+        /**
+        * Draw the thick border
+        */
+        if (this.Get('chart.border')) {
+            var grad = this.context.createRadialGradient(this.centerx, this.centery, this.radius, this.centerx, this.centery, this.radius + 15);
+            grad.addColorStop(1, this.Get('chart.border.color1'));
+            grad.addColorStop(0.5, this.Get('chart.border.color2'));
+            grad.addColorStop(0, this.Get('chart.border.color3'));
+            
+            this.context.beginPath();
+                this.context.fillStyle = grad;
+                this.context.strokeStyle = grad;
+                this.context.lineWidth = 22;
+                this.context.lineCap = 'round';
+                this.context.arc(this.centerx, this.centery, this.radius + 9, 0, 6.2830, 0);
+            this.context.stroke();
+        }
+        
+        // Put the linewidth back to what it was
+        this.context.lineWidth = this.Get('chart.linewidth');
+
+
+        /**
+        * Draw the title if specified
+        */
+        if (this.Get('chart.title')) {
+            RGraph.DrawTitle(this.canvas,
+                             this.Get('chart.title'),
+                             this.centery - this.radius,
+                             null,
+                             this.Get('chart.text.size') + 2);
+        }
+
+
+        // Draw the big tick marks
+        if (!this.Get('chart.tickmarks.highlighted')) {
+            for (var i=18; i<=360; i+=36) {
+                this.context.beginPath();
+                    this.context.strokeStyle = '#999';
+                    this.context.lineWidth = 2;
+                    this.context.arc(this.centerx, this.centery, this.radius - 1, RGraph.degrees2Radians(i), RGraph.degrees2Radians(i+0.01), false);
+                    this.context.arc(this.centerx, this.centery, this.radius - 7, RGraph.degrees2Radians(i), RGraph.degrees2Radians(i+0.01), false);
+                this.context.stroke();
+            }
+        }
+    }
+
+
+    /**
+    * Draws the needle of the odometer
+    * 
+    * @param number value The value to represent
+    * @param string color The color of the needle
+    * @param number       The OPTIONAL length of the needle
+    */
+    RGraph.Odometer.prototype.DrawNeedle = function (value, color)
+    {
+        // The optional length of the needle
+        var length = arguments[2] ? arguments[2] : this.radius - this.Get('chart.label.area');
+
+        // ===== First draw a grey background circle =====
+        
+        this.context.fillStyle = '#999';
+
+        this.context.beginPath();
+            this.context.moveTo(this.centerx, this.centery);
+            this.context.arc(this.centerx, this.centery, 10, 0, 6.28, false);
+            this.context.fill();
+        this.context.closePath();
+
+        this.context.fill();
+
+        // ===============================================
+        
+        this.context.fillStyle = color
+        this.context.strokeStyle = '#666';
+
+        // Draw the centre bit
+        this.context.beginPath();
+            this.context.moveTo(this.centerx, this.centery);
+            this.context.arc(this.centerx, this.centery, 8, 0, 6.28, false);
+            this.context.fill();
+        this.context.closePath();
+        
+        this.context.stroke();
+        this.context.fill();
+
+        if (this.Get('chart.needle.type') == 'pointer') {
+
+            this.context.strokeStyle = color;
+            this.context.lineWidth   = this.Get('chart.needle.width');
+            this.context.lineCap     = 'round';
+            this.context.lineJoin    = 'round';
+            
+            // Draw the needle
+            this.context.beginPath();
+                // The trailing bit on the opposite side of the dial
+                this.context.beginPath();
+                    this.context.moveTo(this.centerx, this.centery);
+                    
+                    if (this.Get('chart.needle.tail')) {
+
+                        this.context.arc(this.centerx,
+                                         this.centery,
+                                         20,
+                                          (((value / this.range) * 360) + 90) / 57.3,
+                                         (((value / this.range) * 360) + 90 + 0.01) / 57.3, // The 0.01 avoids a bug in ExCanvas and Chrome 6
+                                         false
+                                        );
+                    }
+
+                // Draw the long bit on the opposite side
+                this.context.arc(this.centerx,
+                                 this.centery,
+                                 length - 10,
+                                 (((value / this.range) * 360) - 90) / 57.3,
+                                 (((value / this.range) * 360) - 90 + 0.1 ) / 57.3, // The 0.1 avoids a bug in ExCanvas and Chrome 6
+                                 false
+                                );
+            this.context.closePath();
+            
+            //this.context.stroke();
+            //this.context.fill();
+        
+
+        } else if (this.Get('chart.needle.type') == 'triangle') {
+
+            this.context.lineWidth = 0.01;
+            this.context.lineEnd  = 'square';
+            this.context.lineJoin = 'miter';
+
+            /**
+            * This draws the version of the pointer that becomes the border
+            */
+            this.context.beginPath();
+                this.context.fillStyle = this.Get('chart.needle.triangle.border');
+                this.context.arc(this.centerx, this.centery, 11, (((value / this.range) * 360)) / 57.3, ((((value / this.range) * 360)) + 0.01) / 57.3, 0);
+                this.context.arc(this.centerx, this.centery, 11, (((value / this.range) * 360) + 180) / 57.3, ((((value / this.range) * 360) + 180) + 0.01)/ 57.3, 0);
+                this.context.arc(this.centerx, this.centery, length - 5, (((value / this.range) * 360) - 90) / 57.3, ((((value / this.range) * 360) - 90) / 57.3) + 0.01, 0);
+            this.context.closePath();
+            this.context.fill();
+
+            this.context.beginPath();
+                this.context.arc(this.centerx, this.centery, 15, 0, 6.28, 0);
+            this.context.closePath();
+            this.context.fill();
+
+            // This draws the pointer
+            this.context.beginPath();
+                this.context.strokeStyle = 'black';
+                this.context.fillStyle = color;
+                this.context.arc(this.centerx, this.centery, 7, (((value / this.range) * 360)) / 57.3, ((((value / this.range) * 360)) + 0.01) / 57.3, 0);
+                this.context.arc(this.centerx, this.centery, 7, (((value / this.range) * 360) + 180) / 57.3, ((((value / this.range) * 360) + 180) + 0.01)/ 57.3, 0);
+                this.context.arc(this.centerx, this.centery, length - 13, (((value / this.range) * 360) - 90) / 57.3, ((((value / this.range) * 360) - 90) / 57.3) + 0.01, 0);
+            this.context.closePath();
+            this.context.stroke();
+            this.context.fill();
+
+            /**
+            * This is here to accomodate the MSIE/ExCanvas combo
+            */
+            this.context.beginPath();
+                this.context.arc(this.centerx, this.centery, 7, 0, 6.28, 0);
+            this.context.closePath();
+            this.context.fill();
+        }
+
+
+        this.context.stroke();
+        this.context.fill();
+            
+        // Draw the mini center circle
+        this.context.beginPath();
+        this.context.fillStyle = color;
+            this.context.arc(this.centerx, this.centery, this.Get('chart.needle.type') == 'pointer' ? 7 : 12, 0.01, 6.2830, false);
+        this.context.fill();
+
+        // This draws the arrow at the end of the line
+        if (this.Get('chart.needle.head') && this.Get('chart.needle.type') == 'pointer') {
+            this.context.lineWidth = 1;
+            this.context.fillStyle = color;
+
+            // round, bevel, miter
+            this.context.lineJoin = 'miter';
+            this.context.lineCap  = 'butt';
+
+            this.context.beginPath();
+                this.context.arc(this.centerx, this.centery, length - 5, (((value / this.range) * 360) - 90) / 57.3, (((value / this.range) * 360) - 90 + 0.1) / 57.3, false);
+
+                this.context.arc(this.centerx,
+                                 this.centery,
+                                 length - 20,
+                                 RGraph.degrees2Radians( ((value / this.range) * 360) - (length < 60 ? 80 : 85) ),
+                                 RGraph.degrees2Radians( ((value / this.range) * 360) - (length < 60 ? 100 : 95) ),
+                                 1);
+            this.context.closePath();
+    
+            this.context.fill();
+            //this.context.stroke();
+        }
+        
+        /**
+        * Draw a white circle at the centre
+        */
+        this.context.beginPath();
+        this.context.fillStyle = 'gray';
+            this.context.moveTo(this.centerx, this.centery);
+            this.context.arc(this.centerx,this.centery,2,0,6.2795,false);
+        this.context.closePath();
+
+        this.context.fill();
+    }
+    
+    /**
+    * Draws the labels for the Odo
+    */
+    RGraph.Odometer.prototype.DrawLabels = function ()
+    {
+        var context   = this.context;
+        var size      = this.Get('chart.text.size');
+        var font      = this.Get('chart.text.font');
+        var centerx   = this.centerx;
+        var centery   = this.centery;
+        var r         = this.radius - (this.Get('chart.label.area') / 2);
+        var start     = this.start;
+        var end       = this.end;
+        var decimals  = this.Get('chart.scale.decimals');
+        var labels    = this.Get('chart.labels');
+        var units_pre = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+
+        context.beginPath();
+        context.fillStyle = this.Get('chart.text.color');
+
+        /**
+        * If label are specified, use those
+        */
+        if (labels) {
+            for (var i=0; i<labels.length; ++i) {
+
+                RGraph.Text(context,
+                            font,
+                            size,
+                            centerx + (Math.cos(((i / labels.length) * 6.28) - 1.57) * (this.radius - (this.Get('chart.label.area') / 2) ) ), // Sin A = Opp / Hyp
+                            centery + (Math.sin(((i / labels.length) * 6.28) - 1.57) * (this.radius - (this.Get('chart.label.area') / 2) ) ), // Cos A = Adj / Hyp
+                            String(units_pre + labels[i] + units_post),
+                            'center',
+                            'center');
+            }
+
+        /**
+        * If not, use the maximum value
+        */
+        } else {
+            RGraph.Text(context, font, size, centerx + (0.588 * r ), centery - (0.809 * r ), String(units_pre + (((end - start) * (1/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 36);
+            RGraph.Text(context, font, size, centerx + (0.951 * r ), centery - (0.309 * r), String(units_pre + (((end - start) * (2/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 72);
+            RGraph.Text(context, font, size, centerx + (0.949 * r), centery + (0.287 * r), String(units_pre + (((end - start) * (3/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 108);
+            RGraph.Text(context, font, size, centerx + (0.588 * r ), centery + (0.809 * r ), String(units_pre + (((end - start) * (4/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 144);
+            RGraph.Text(context, font, size, centerx, centery + r, String(units_pre + (((end - start) * (5/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 180);
+            RGraph.Text(context, font, size, centerx - (0.588 * r ), centery + (0.809 * r ), String(units_pre + (((end - start) * (6/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 216);
+            RGraph.Text(context, font, size, centerx - (0.949 * r), centery + (0.300 * r), a = String(units_pre + (((end - start) * (7/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 252);
+            RGraph.Text(context, font, size, centerx - (0.951 * r), centery - (0.309 * r), String(units_pre + (((end - start) * (8/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 288);
+            RGraph.Text(context, font, size, centerx - (0.588 * r ), centery - (0.809 * r ), String(units_pre + (((end - start) * (9/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 324);
+            RGraph.Text(context, font, size, centerx, centery - r, this.Get('chart.zerostart') ? units_pre + String(this.start) + units_post : String(units_pre + (((end - start) * (10/10)) + start).toFixed(decimals) + units_post), 'center', 'center', false, 360);
+        }
+        
+        this.context.fill();
+        
+        /**
+        * Draw the text label below the center point
+        */
+        if (this.Get('chart.value.text')) {
+            context.strokeStyle = 'black';
+            RGraph.Text(context, font, size + 2, centerx, centery + size + 2 + 10, String(this.Get('chart.value.units.pre') + this.value + this.Get('chart.value.units.post')), 'center', 'center', true,  null, 'white');
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.pie.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.pie.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.pie.js	(revision 225)
@@ -0,0 +1,949 @@
+/**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The pie chart constructor
+    * 
+    * @param data array The data to be represented on the pie chart
+    */
+    RGraph.Pie = function (id, data)
+    {
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext("2d");
+        this.canvas.__object__ = this;
+        this.total             = 0;
+        this.subTotal          = 0;
+        this.angles            = [];
+        this.data              = data;
+        this.properties        = [];
+        this.type              = 'pie';
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        this.properties = {
+            'chart.colors':                 ['rgb(255,0,0)', '#ddd', 'rgb(0,255,0)', 'rgb(0,0,255)', 'pink', 'yellow', '#000'],
+            'chart.strokestyle':            '#999',
+            'chart.linewidth':              1,
+            'chart.labels':                 [],
+            'chart.labels.sticks':          false,
+            'chart.labels.sticks.color':    '#aaa',
+            'chart.segments':               [],
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.shadow':                 false,
+            'chart.shadow.color':           'rgba(0,0,0,0.5)',
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.shadow.blur':            3,
+            'chart.text.size':              10,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.contextmenu':            null,
+            'chart.tooltips':               [],
+            'chart.tooltips.event':         'onclick',
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.style':        '3d',
+            'chart.highlight.style.2d.fill': 'rgba(255,255,255,0.5)',
+            'chart.highlight.style.2d.stroke': 'rgba(255,255,255,0)',
+            'chart.radius':                 null,
+            'chart.border':                 false,
+            'chart.border.color':           'rgba(255,255,255,0.5)',
+            'chart.key':                    null,
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.align':                  'center',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.variant':                'pie',
+            'chart.variant.donut.color':    'white',
+            'chart.exploded':               []
+        }
+
+        /**
+        * Calculate the total
+        */
+        for (var i=0,len=data.length; i<len; i++) {
+            this.total += data[i];
+        }
+
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getSegment;
+    }
+
+
+    /**
+    * A generic setter
+    */
+    RGraph.Pie.prototype.Set = function (name, value)
+    {
+        if (name == 'chart.highlight.style.2d.color') {
+            name = 'chart.highlight.style.2d.fill';
+        }
+
+        this.properties[name] = value;
+    }
+
+
+    /**
+    * A generic getter
+    */
+    RGraph.Pie.prototype.Get = function (name)
+    {
+        if (name == 'chart.highlight.style.2d.color') {
+            name = 'chart.highlight.style.2d.fill';
+        }
+
+        return this.properties[name];
+    }
+
+
+    /**
+    * This draws the pie chart
+    */
+    RGraph.Pie.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        
+        /**
+        * This bit of code converts chart.exploded from an integer to an array
+        * that consists of that value, repeated n times, where n is equal to
+        * the number of segments that you have
+        */
+        var explosion = this.Get('chart.exploded');
+        if (typeof(explosion) == 'number') {
+            this.Set('chart.exploded', RGraph.array_pad([], this.data.length, explosion));
+        }
+
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        /**
+        * Reset this to an empty array
+        */
+        this.Set('chart.segments', []);
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+
+
+        this.diameter    = Math.min(RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom, RGraph.GetWidth(this)) - this.gutterLeft - this.gutterRight;
+        this.radius      = this.Get('chart.radius') ? this.Get('chart.radius') : this.diameter / 2;
+        // this.centerx now defined below
+        this.centery     = ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop;
+        this.subTotal    = 0;
+        this.angles      = [];
+        
+        /**
+        * Alignment (Pie is center aligned by default) Only if centerx is not defined - donut defines the centerx
+        */
+        if (this.Get('chart.align') == 'left') {
+            this.centerx = this.radius + this.gutterLeft;
+        
+        } else if (this.Get('chart.align') == 'right') {
+            this.centerx = RGraph.GetWidth(this) - this.radius - this.gutterRight;
+        
+        } else {
+            this.centerx = RGraph.GetWidth(this) / 2;
+        }
+
+        /**
+        * Draw the shadow if required
+        */
+        if (this.Get('chart.shadow') && 0) {
+        
+            var offsetx = document.all ? this.Get('chart.shadow.offsetx') : 0;
+            var offsety = document.all ? this.Get('chart.shadow.offsety') : 0;
+
+            this.context.beginPath();
+            this.context.fillStyle = this.Get('chart.shadow.color');
+
+            this.context.shadowColor   = this.Get('chart.shadow.color');
+            this.context.shadowBlur    = this.Get('chart.shadow.blur');
+            this.context.shadowOffsetX = this.Get('chart.shadow.offsetx');
+            this.context.shadowOffsetY = this.Get('chart.shadow.offsety');
+            
+            this.context.arc(this.centerx + offsetx, this.centery + offsety, this.radius, 0, 6.28, 0);
+            
+            this.context.fill();
+            
+            // Now turn off the shadow
+            RGraph.NoShadow(this);
+        }
+
+        /**
+        * The total of the array of values
+        */
+        this.total = RGraph.array_sum(this.data);
+
+        for (var i=0,len=this.data.length; i<len; i++) {
+            var angle = (this.data[i] / this.total) * 360;
+    
+            // Draw the segment
+            this.DrawSegment(angle,this.Get('chart.colors')[i],i == (this.data.length - 1), i);
+        }
+
+        RGraph.NoShadow(this);
+
+
+        /**
+        * Redraw the seperating lines
+        */
+        this.DrawBorders();
+
+        /**
+        * Now draw the segments again with shadow turned off. This is always performed,
+        * not just if the shadow is on.
+        */
+        for (var i=0; i<this.angles.length; i++) {
+    
+            this.context.beginPath();
+                this.context.strokeStyle = this.Get('chart.strokestyle');
+                this.context.fillStyle = this.Get('chart.colors')[i];
+                this.context.moveTo(this.angles[i][2], this.angles[i][3]);
+                this.context.arc(this.angles[i][2], this.angles[i][3], this.radius, this.angles[i][0] / 57.3, this.angles[i][1] / 57.3, false);
+                this.context.lineTo(this.angles[i][2], this.angles[i][3]);
+            this.context.closePath();
+            this.context.fill();
+            this.context.stroke();
+        }
+
+        /**
+        * Draw label sticks
+        */
+        if (this.Get('chart.labels.sticks')) {
+            this.DrawSticks();
+            
+            // Redraw the border going around the Pie chart if the stroke style is NOT white
+            if (
+                  this.Get('chart.strokestyle') != 'white'
+               && this.Get('chart.strokestyle') != '#fff'
+               && this.Get('chart.strokestyle') != '#fffffff'
+               && this.Get('chart.strokestyle') != 'rgb(255,255,255)'
+               && this.Get('chart.strokestyle') != 'rgba(255,255,255,0)'
+              ) {
+
+               // Again (?)
+              this.DrawBorders();
+           }
+        }
+
+        /**
+        * Draw the labels
+        */
+        this.DrawLabels();
+
+        /**
+        * Draw the title
+        */
+        if (this.Get('chart.align') == 'left') {
+            var centerx = this.radius + this.Get('chart.gutter.left');
+
+        } else if (this.Get('chart.align') == 'right') {
+            var centerx = RGraph.GetWidth(this) - (this.radius + this.gutterRight);
+
+        } else {
+            var centerx = null;
+        }
+
+        RGraph.DrawTitle(this.canvas, this.Get('chart.title'), (this.canvas.height / 2) - this.radius - 5, centerx, this.Get('chart.text.size') + 2);
+        
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * Tooltips
+        */
+        if (this.Get('chart.tooltips').length) {
+
+            /**
+            * Register this object for redrawing
+            */
+            RGraph.Register(this);
+        
+            /**
+            * The onclick event
+            */
+            //this.canvas.onclick = function (e)
+            var canvas_onclick_func = function (e)
+            {
+                RGraph.HideZoomedCanvas();
+
+                e = RGraph.FixEventObject(e);
+
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                var canvas  = e.target;
+                var context = canvas.getContext('2d');
+                var obj     = e.target.__object__;
+
+
+
+                /**
+                * If it's actually a donut make sure the hyp is bigger
+                * than the size of the hole in the middle
+                */
+                if (obj.Get('chart.variant') == 'donut' && Math.abs(hyp) < (obj.radius / 2)) {
+                    return;
+                }
+
+                /**
+                * The angles for each segment are stored in "angles",
+                * so go through that checking if the mouse position corresponds
+                */
+                var isDonut = obj.Get('chart.variant') == 'donut';
+                var hStyle  = obj.Get('chart.highlight.style');
+                var segment = obj.getSegment(e);
+
+                if (segment) {
+
+                    var x     = mouseCoords[0] - segment[0];
+                    var y     = mouseCoords[1] - segment[1];
+                    var theta = Math.atan(y / x); // RADIANS
+                    var hyp   = y / Math.sin(theta);
+
+
+                    if (RGraph.Registry.Get('chart.tooltip') && segment[5] == RGraph.Registry.Get('chart.tooltip').__index__) {
+                        return;
+                    } else {
+                        RGraph.Redraw();
+                    }
+
+
+                    if (isDonut || hStyle == '2d') {
+                        
+                        context.beginPath();
+
+                        context.strokeStyle = obj.Get('chart.highlight.style.2d.stroke');
+                        context.fillStyle   = obj.Get('chart.highlight.style.2d.fill');
+
+                        //context.moveTo(obj.centerx, obj.centery);
+
+                        context.moveTo(segment[0], segment[1]);
+                        context.arc(segment[0], segment[1], segment[2], RGraph.degrees2Radians(obj.angles[segment[5]][0]), RGraph.degrees2Radians(obj.angles[segment[5]][1]), 0);
+                        context.lineTo(segment[0], segment[1]);
+                        context.closePath();
+                        
+                        context.stroke();
+                        context.fill();
+                        
+                        //Removed 7th December 2010
+                        //context.stroke();
+
+                    } else if (hStyle == 'explode') {
+
+                        var exploded = [];
+
+                        exploded[segment[5]] = 0;
+
+                        RGraph.Registry.Set('chart.pie.exploded', obj);
+                        
+                        setTimeout(function () {var pie = RGraph.Registry.Get('chart.pie.exploded'); pie.Set('chart.exploded', exploded);RGraph.Clear(pie.canvas);pie.Draw(); exploded[segment[5]] += 7;}, 25);
+                        setTimeout(function () {var pie = RGraph.Registry.Get('chart.pie.exploded'); pie.Set('chart.exploded', exploded);RGraph.Clear(pie.canvas);pie.Draw(); exploded[segment[5]] += 7;}, 50);
+                        setTimeout(function () {var pie = RGraph.Registry.Get('chart.pie.exploded'); pie.Set('chart.exploded', exploded);RGraph.Clear(pie.canvas);pie.Draw(); exploded[segment[5]] += 7;}, 75);
+                        setTimeout(function () {var pie = RGraph.Registry.Get('chart.pie.exploded'); pie.Set('chart.exploded', exploded);RGraph.Clear(pie.canvas);pie.Draw(); exploded[segment[5]] += 7;}, 100);
+                        setTimeout(function () {var pie = RGraph.Registry.Get('chart.pie.exploded'); pie.Set('chart.exploded', exploded);RGraph.Clear(pie.canvas);pie.Draw(); exploded[segment[5]] += 7;}, 125);
+                        
+                        setTimeout(function () {RGraph.Registry.Get('chart.pie.exploded').Set('chart.exploded', []);}, 150);
+
+                    } else {
+
+                        context.lineWidth = 2;
+
+                        /**
+                        * Draw a white segment where the one that has been clicked on was
+                        */
+                        context.fillStyle = 'white';
+                        context.strokeStyle = 'white';
+                        context.beginPath();
+                        context.moveTo(segment[0], segment[1]);
+                        context.arc(segment[0], segment[1], segment[2], obj.angles[segment[5]][0] / 57.3, obj.angles[segment[5]][1] / 57.3, 0);
+                        context.stroke();
+                        context.fill();
+
+                        context.lineWidth = 1;
+
+                        context.shadowColor   = '#666';
+                        context.shadowBlur    = 3;
+                        context.shadowOffsetX = 3;
+                        context.shadowOffsetY = 3;
+
+                        // Draw the new segment
+                        context.beginPath();
+                            context.fillStyle   = obj.Get('chart.colors')[segment[5]];
+                            context.strokeStyle = obj.Get('chart.strokestyle');
+                            context.moveTo(segment[0] - 3, segment[1] - 3);
+                            context.arc(segment[0] - 3, segment[1] - 3, segment[2], RGraph.degrees2Radians(obj.angles[segment[5]][0]), RGraph.degrees2Radians(obj.angles[segment[5]][1]), 0);
+                            context.lineTo(segment[0] - 3, segment[1] - 3);
+                        context.closePath();
+                        
+                        context.stroke();
+                        context.fill();
+                        
+                        // Turn off the shadow
+                        RGraph.NoShadow(obj);
+                        
+                        /**
+                        * If a border is defined, redraw that
+                        */
+                        if (obj.Get('chart.border')) {
+                            context.beginPath();
+                            context.strokeStyle = obj.Get('chart.border.color');
+                            context.lineWidth = 5;
+                            context.arc(segment[0] - 3, segment[1] - 3, obj.radius - 2, RGraph.degrees2Radians(obj.angles[i][0]), RGraph.degrees2Radians(obj.angles[i][1]), 0);
+                            context.stroke();
+                        }
+                    }
+                        
+                    /**
+                    * If a tooltip is defined, show it
+                    */
+
+                    /**
+                    * Get the tooltip text
+                    */
+                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')(segment[5]));
+
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[segment[5]]) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')[segment[5]](segment[5]));
+                    
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                        var text = String(obj.Get('chart.tooltips')[segment[5]]);
+
+                    } else {
+                        var text = '';
+                    }
+
+                    if (text) {
+                        RGraph.Tooltip(canvas, text, e.pageX, e.pageY, segment[5]);
+                    }
+
+                    /**
+                    * Need to redraw the key?
+                    */
+                    if (obj.Get('chart.key') && obj.Get('chart.key').length && obj.Get('chart.key.position') == 'graph') {
+                        RGraph.DrawKey(obj, obj.Get('chart.key'), obj.Get('chart.colors'));
+                    }
+
+                    e.stopPropagation();
+
+                    return;
+                } else if (obj.Get('chart.tooltips.event') == 'onclick') {
+                    RGraph.Redraw();
+                }
+            }
+            var event_name = this.Get('chart.tooltips.event') == 'onmousemove' ? 'mousemove' : 'click';
+
+            this.canvas.addEventListener(event_name, canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, event_name, canvas_onclick_func);
+
+
+
+
+
+
+            /**
+            * The onmousemove event for changing the cursor
+            */
+            //this.canvas.onmousemove = function (e)
+            var canvas_onmousemove_func = function (e)
+            {
+                RGraph.HideZoomedCanvas();
+
+                e = RGraph.FixEventObject(e);
+                
+                var obj     = e.target.__object__;
+                var segment = obj.getSegment(e);
+
+                if (segment) {
+                    e.target.style.cursor = 'pointer';
+
+                    return;
+                }
+
+                /**
+                * Put the cursor back to null
+                */
+                e.target.style.cursor = 'default';
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+
+
+
+
+
+
+
+
+
+            /**
+            * The window onclick function
+            */
+            var window_onclick_func = function (e)
+            {
+                RGraph.HideZoomedCanvas();
+
+                e = RGraph.FixEventObject(e);
+
+                RGraph.Redraw();
+
+                /**
+                * Put the cursor back to null
+                */
+                e.target.style.cursor = 'default';
+            }
+            window.addEventListener('click', window_onclick_func, false);
+            RGraph.AddEventListener('window_' + this.id, 'click', window_onclick_func);
+        }
+
+
+        /**
+        * If a border is pecified, draw it
+        */
+        if (this.Get('chart.border')) {
+            this.context.beginPath();
+            this.context.lineWidth = 5;
+            this.context.strokeStyle = this.Get('chart.border.color');
+
+            this.context.arc(this.centerx,
+                             this.centery,
+                             this.radius - 2,
+                             0,
+                             6.28,
+                             0);
+
+            this.context.stroke();
+        }
+        
+        /**
+        * Draw the kay if desired
+        */
+        if (this.Get('chart.key') != null) {
+            //this.Set('chart.key.position', 'graph');
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+
+
+        /**
+        * If this is actually a donut, draw a big circle in the middle
+        */
+        if (this.Get('chart.variant') == 'donut') {
+            this.context.beginPath();
+            this.context.strokeStyle = this.Get('chart.strokestyle');
+            this.context.fillStyle   = this.Get('chart.variant.donut.color');
+            this.context.arc(this.centerx, this.centery, this.radius / 2, 0, 6.28, 0);
+            this.context.stroke();
+            this.context.fill();
+        }
+        
+        RGraph.NoShadow(this);
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draws a single segment of the pie chart
+    * 
+    * @param int degrees The number of degrees for this segment
+    */
+    RGraph.Pie.prototype.DrawSegment = function (degrees, color, last, index)
+    {
+        var context  = this.context;
+        var canvas   = this.canvas;
+        var subTotal = this.subTotal;
+
+        context.beginPath();
+
+            context.fillStyle   = color;
+            context.strokeStyle = this.Get('chart.strokestyle');
+            context.lineWidth   = 0;
+            
+            if (this.Get('chart.shadow')) {
+                RGraph.SetShadow(this, this.Get('chart.shadow.color'),this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));
+            }
+
+            /**
+            * Exploded segments
+            */
+            if ( (typeof(this.Get('chart.exploded')) == 'object' && this.Get('chart.exploded')[index] > 0)) {
+                var explosion = this.Get('chart.exploded')[index];
+                var x         = 0;
+                var y         = 0;
+                var h         = explosion;
+                var t         = (subTotal + (degrees / 2)) / (360/6.2830);
+                var x         = (Math.cos(t) * explosion);
+                var y         = (Math.sin(t) * explosion);
+            
+                this.context.moveTo(this.centerx + x, this.centery + y);
+            } else {
+                var x = 0;
+                var y = 0;
+            }
+
+            context.arc(this.centerx + x,
+                        this.centery + y,
+                        this.radius,
+                        subTotal / 57.3,
+                        (last ? 360 : subTotal + degrees) / 57.3,
+                        0);
+    
+            context.lineTo(this.centerx + x, this.centery + y);
+            
+            // Keep hold of the angles
+            this.angles.push([subTotal, subTotal + degrees, this.centerx + x, this.centery + y])
+        this.context.closePath();
+        
+
+        
+        //this.context.stroke();
+        this.context.fill();
+
+        /**
+        * Calculate the segment angle
+        */
+        this.Get('chart.segments').push([subTotal, subTotal + degrees]);
+        this.subTotal += degrees;
+    }
+
+    /**
+    * Draws the graphs labels
+    */
+    RGraph.Pie.prototype.DrawLabels = function ()
+    {
+        var hAlignment = 'left';
+        var vAlignment = 'center';
+        var labels     = this.Get('chart.labels');
+        var context    = this.context;
+
+        /**
+        * Turn the shadow off
+        */
+        RGraph.NoShadow(this);
+        
+        context.fillStyle = 'black';
+        context.beginPath();
+
+        /**
+        * Draw the key (ie. the labels)
+        */
+        if (labels && labels.length) {
+
+            var text_size = this.Get('chart.text.size');
+
+            for (i=0; i<labels.length; ++i) {
+            
+                /**
+                * T|his ensures that if we're given too many labels, that we don't get an error
+                */
+                if (typeof(this.Get('chart.segments')[i]) == 'undefined') {
+                    continue;
+                }
+
+                // Move to the centre
+                context.moveTo(this.centerx,this.centery);
+                
+                var a = this.Get('chart.segments')[i][0] + ((this.Get('chart.segments')[i][1] - this.Get('chart.segments')[i][0]) / 2);
+
+                /**
+                * Alignment
+                */
+                if (a < 90) {
+                    hAlignment = 'left';
+                    vAlignment = 'center';
+                } else if (a < 180) {
+                    hAlignment = 'right';
+                    vAlignment = 'center';
+                } else if (a < 270) {
+                    hAlignment = 'right';
+                    vAlignment = 'center';
+                } else if (a < 360) {
+                    hAlignment = 'left';
+                    vAlignment = 'center';
+                }
+
+
+                /**
+                * Handle the additional "explosion" offset
+                */
+                if (typeof(this.Get('chart.exploded')) == 'object' && this.Get('chart.exploded')[i]) {
+
+                    var t = ((this.angles[i][1] - this.angles[i][0]) / 2) / (360/6.2830);
+                    var seperation = this.Get('chart.exploded')[i];
+                    var angle = ((this.angles[i][1] - this.angles[i][0]) / 2) + this.angles[i][0];
+
+                    // Adjust the angles
+                    var explosion_offsetx = (Math.cos(angle / 57.29) * seperation);
+                    var explosion_offsety = (Math.sin(angle / 57.29) * seperation);
+                } else {
+                    var explosion_offsetx = 0;
+                    var explosion_offsety = 0;
+                }
+
+                context.fillStyle = this.Get('chart.text.color');
+
+                RGraph.Text(context,
+                            this.Get('chart.text.font'),
+                            text_size,
+                            this.centerx + explosion_offsetx + ((this.radius + 10)* Math.cos(a / 57.3)) + (this.Get('chart.labels.sticks') ? (a < 90 || a > 270 ? 2 : -2) : 0),
+                            this.centery + explosion_offsety + (((this.radius + 10) * Math.sin(a / 57.3))),
+                            labels[i],
+                            vAlignment,
+                            hAlignment);
+            }
+            
+            context.fill();
+        }
+    }
+
+
+    /**
+    * This function draws the pie chart sticks (for the labels)
+    */
+    RGraph.Pie.prototype.DrawSticks = function ()
+    {
+        var context  = this.context;
+        var segments = this.Get('chart.segments');
+        var offset   = this.Get('chart.linewidth') / 2;
+        var exploded = this.Get('chart.exploded');
+        var sticks   = this.Get('chart.labels.sticks');
+
+        for (var i=0; i<segments.length; ++i) {
+        
+            // This allows the chart.labels.sticks to be an array as well as a boolean
+            if (typeof(sticks) == 'object' && !sticks[i]) {
+                continue;
+            }
+
+            var degrees = segments[i][1] - segments[i][0];
+
+            context.beginPath();
+            context.strokeStyle = this.Get('chart.labels.sticks.color');
+            context.lineWidth   = 1;
+
+            var midpoint = (segments[i][0] + (degrees / 2)) / 57.3;
+
+            if (exploded && exploded[i]) {
+                var extra = exploded[i];
+            } else {
+                var extra = 0;
+            }
+            
+            context.lineJoin = 'round';
+            context.lineWidth = 1;
+
+            context.arc(this.centerx,
+                        this.centery,
+                        this.radius + 7 + extra,
+                        midpoint,
+                        midpoint + 0.01,
+                        0);
+            
+            context.arc(this.centerx,
+                        this.centery,
+                        this.radius - offset + extra,
+                        midpoint,
+                        midpoint + 0.01,
+                        0);
+
+            context.stroke();
+        }
+    }
+
+
+    /**
+    * The (now Pie chart specific) getSegment function
+    * 
+    * @param object e The event object
+    */
+    RGraph.Pie.prototype.getSegment = function (e)
+    {
+        RGraph.FixEventObject(e);
+
+        // The optional arg provides a way of allowing some accuracy (pixels)
+        var accuracy = arguments[1] ? arguments[1] : 0;
+
+        var obj         = e.target.__object__;
+        var canvas      = obj.canvas;
+        var context     = obj.context;
+        var mouseCoords = RGraph.getMouseXY(e);
+        var r           = obj.radius;
+        var angles      = obj.angles;
+        var ret         = [];
+
+        for (var i=0; i<angles.length; ++i) {
+
+            var x     = mouseCoords[0] - angles[i][2];
+            var y     = mouseCoords[1] - angles[i][3];
+            var theta = Math.atan(y / x); // RADIANS
+            var hyp   = y / Math.sin(theta);
+            var hyp   = (hyp < 0) ? hyp + accuracy : hyp - accuracy;
+            // Put theta in DEGREES
+            theta *= 57.3
+
+            /**
+            * Account for the correct quadrant
+            */
+            if (x < 0 && y >= 0) {
+                theta += 180;
+            } else if (x < 0 && y < 0) {
+                theta += 180;
+            } else if (x > 0 && y < 0) {
+                theta += 360;
+            }
+            
+            if (theta > 360) {
+                theta -= 360;
+            }
+
+            if (theta >= angles[i][0] && theta < angles[i][1]) {
+
+                hyp = Math.abs(hyp);
+
+                if (!hyp || (obj.radius && hyp > obj.radius) ) {
+                    return null;
+                }
+
+                if (obj.type == 'pie' && obj.Get('chart.variant') == 'donut' && (hyp > obj.radius || hyp < (obj.radius / 2) ) ) {
+                    return null;
+                }
+
+                ret[0] = angles[i][2];
+                ret[1] = angles[i][3];
+                ret[2] = (obj.type == 'rose') ? angles[i][2] : obj.radius;
+                ret[3] = angles[i][0];
+                ret[4] = angles[i][1];
+                ret[5] = i;
+
+
+                
+                if (ret[3] < 0) ret[3] += 360;
+                if (ret[4] > 360) ret[4] -= 360;
+
+                return ret;
+            }
+        }
+        
+        return null;
+    }
+
+
+    RGraph.Pie.prototype.DrawBorders = function ()
+    {
+        if (this.Get('chart.linewidth') > 0) {
+
+            this.context.lineWidth = this.Get('chart.linewidth');
+            this.context.strokeStyle = this.Get('chart.strokestyle');
+
+            for (var i=0,len=this.angles.length; i<len; ++i) {
+                this.context.beginPath();
+                    this.context.moveTo(this.angles[i][2], this.angles[i][3]);
+                    this.context.arc(this.angles[i][2], this.angles[i][3], this.radius, this.angles[i][0] / 57.3, (this.angles[i][0] + 0.01) / 57.3, 0);
+                    this.context.arc(this.angles[i][2], this.angles[i][3], this.radius, this.angles[i][0] / 57.3, (this.angles[i][1]) / 57.3, 0);
+                this.context.closePath();
+                
+                this.context.stroke();
+            }
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.radar.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.radar.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.radar.js	(revision 225)
@@ -0,0 +1,688 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The traditional radar chart constructor
+    * 
+    * @param string id   The ID of the canvas
+    * @param array  data An array of data to represent
+    */
+    RGraph.Radar = function (id, data)
+    {
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.canvas.__object__ = this;
+        this.size              = null;// Set in the .Draw() method
+        this.type              = 'radar';
+        this.coords            = [];
+        this.isRGraph          = true;
+        this.data              = [];
+        this.max               = 0;
+
+        for (var i=1; i<arguments.length; ++i) {
+            this.data.push(RGraph.array_clone(arguments[i]));
+            this.max = Math.max(this.max, RGraph.array_max(arguments[i]));
+        }
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        
+        this.properties = {
+            'chart.strokestyle':           'black',
+            'chart.gutter.left':           25,
+            'chart.gutter.right':          25,
+            'chart.gutter.top':            25,
+            'chart.gutter.bottom':         25,
+            'chart.linewidth':             1,
+            'chart.colors':                ['red'],
+            'chart.colors.alpha':          null,
+            'chart.circle':                0,
+            'chart.circle.fill':           'red',
+            'chart.circle.stroke':         'black',
+            'chart.labels':                [],
+            'chart.labels.offsetx':        10,
+            'chart.labels.offsety':        10,
+            'chart.background.circles':    true,
+            'chart.text.size':             10,
+            'chart.text.font':             'Verdana',
+            'chart.text.color':            'black',
+            'chart.title':                 '',
+            'chart.title.background':      null,
+            'chart.title.hpos':            null,
+            'chart.title.vpos':            null,
+            'chart.title.color':           'black',
+            'chart.linewidth':             1,
+            
+            'chart.key':                   null,
+            'chart.key.background':        'white',
+            'chart.key.shadow':            false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position':          'graph',
+            'chart.key.halign':             'right',
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+
+            'chart.contextmenu':           null,
+            'chart.annotatable':           false,
+            'chart.annotate.color':        'black',
+            'chart.zoom.factor':           1.5,
+            'chart.zoom.fade.in':          true,
+            'chart.zoom.fade.out':         true,
+            'chart.zoom.hdir':             'right',
+            'chart.zoom.vdir':             'down',
+            'chart.zoom.frames':           10,
+            'chart.zoom.delay':            50,
+            'chart.zoom.shadow':           true,
+            'chart.zoom.mode':             'canvas',
+            'chart.zoom.thumbnail.width':  75,
+            'chart.zoom.thumbnail.height': 75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':      'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.tooltips.coords.adjust': [0,0],
+            'chart.highlight.stroke':       'gray',
+            'chart.highlight.fill':         'white',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.labels.axes':            'nsew',
+            'chart.ymax':                   null
+        }
+        
+        // Must have at least 3 points
+        for (var dataset=0; dataset<this.data.length; ++dataset) {
+            if (this.data[dataset].length < 3) {
+                alert('[RADAR] You must specify at least 3 data points');
+                return;
+            }
+        }
+    }
+
+
+    /**
+    * A simple setter
+    * 
+    * @param string name  The name of the property to set
+    * @param string value The value of the property
+    */
+    RGraph.Radar.prototype.Set = function (name, value)
+    {
+        this.properties[name] = value;
+
+        /**
+        * If the name is chart.color, set chart.colors too
+        */
+        if (name == 'chart.color') {
+            this.properties['chart.colors'] = [value];
+        }
+    }
+
+
+    /**
+    * A simple hetter
+    * 
+    * @param string name  The name of the property to get
+    */
+    RGraph.Radar.prototype.Get = function (name)
+    {
+        return this.properties[name];
+    }
+
+
+    /**
+    * The draw method which does all the brunt of the work
+    */
+    RGraph.Radar.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        this.centerx  = ((this.canvas.width - this.gutterLeft - this.gutterRight) / 2) + this.gutterLeft;
+        this.centery  = ((this.canvas.height - this.gutterTop - this.gutterBottom) / 2) + this.gutterTop;
+        this.size     = Math.min(this.canvas.width - this.gutterLeft - this.gutterRight, this.canvas.height - this.gutterTop - this.gutterBottom);
+
+        // Work out the maximum value and the sum
+        if (!this.Get('chart.ymax')) {
+
+            // this.max is calculated in the constructor
+
+            this.scale = RGraph.getScale(this.max, this);
+            this.max = this.scale[4];
+        } else {
+            var ymax = this.Get('chart.ymax');
+
+            this.scale = [
+                          ymax * 0.2,
+                          ymax * 0.4,
+                          ymax * 0.6,
+                          ymax * 0.8,
+                          ymax * 1
+                         ];
+            this.max = this.scale[4];
+        }
+
+        this.DrawBackground();
+        this.DrawAxes();
+        this.DrawCircle();
+        this.DrawAxisLabels();
+        this.DrawChart();
+        this.DrawLabels();
+        
+        // Draw the title
+        if (this.Get('chart.title')) {
+            RGraph.DrawTitle(this.canvas, this.Get('chart.title'), this.gutterTop)
+        }
+
+        // Draw the key if necessary
+        // obj, key, colors
+        if (this.Get('chart.key')) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+
+        /**
+        * Show the context menu
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+
+        /**
+        * This function enables adjusting
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draws the background circles
+    */
+    RGraph.Radar.prototype.DrawBackground = function ()
+    {
+        var color = '#ddd';
+
+        /**
+        * Draws the background circles
+        */
+        if (this.Get('chart.background.circles')) {
+
+           this.context.strokeStyle = color;
+           this.context.beginPath();
+
+           for (var r=5; r<(this.size / 2); r+=15) {
+
+                this.context.moveTo(this.centerx, this.centery);
+                this.context.arc(this.centerx, this.centery,r, 0, 6.28, 0);
+            }
+            
+            this.context.stroke();
+        }
+        
+        
+        /**
+        * Draw diagonals
+        */
+        this.context.strokeStyle = color;
+        for (var i=0; i<360; i+=15) {
+            this.context.beginPath();
+            this.context.arc(this.centerx, this.centery, this.size / 2, (i / 360) * (2 * Math.PI), ((i+0.01) / 360) * (2 * Math.PI), 0); // The 0.01 avoids a bug in Chrome 6
+            this.context.lineTo(this.centerx, this.centery);
+            this.context.stroke();
+        }
+    }
+
+
+    /**
+    * Draws the axes
+    */
+    RGraph.Radar.prototype.DrawAxes = function ()
+    {
+        this.context.strokeStyle = 'black';
+
+        var halfsize = this.size / 2;
+
+        this.context.beginPath();
+
+        /**
+        * The Y axis
+        */
+            this.context.moveTo(this.centerx, this.centery + halfsize);
+            this.context.lineTo(this.centerx, this.centery - halfsize);
+            
+    
+            // Draw the bits at either end of the Y axis
+            this.context.moveTo(this.centerx - 5, this.centery + halfsize);
+            this.context.lineTo(this.centerx + 5, this.centery + halfsize);
+            this.context.moveTo(this.centerx - 5, this.centery - halfsize);
+            this.context.lineTo(this.centerx + 5, this.centery - halfsize);
+            
+            // Draw X axis tick marks
+            for (var y=(this.centery - halfsize); y<(this.centery + halfsize); y+=15) {
+                this.context.moveTo(this.centerx - 3, y);
+                this.context.lineTo(this.centerx + 3, y);
+            }
+
+        /**
+        * The X axis
+        */
+            this.context.moveTo(this.centerx - halfsize, this.centery);
+            this.context.lineTo(this.centerx + halfsize, this.centery);
+    
+            // Draw the bits at the end of the X axis
+            this.context.moveTo(this.centerx - halfsize, this.centery - 5);
+            this.context.lineTo(this.centerx - halfsize, this.centery + 5);
+            this.context.moveTo(this.centerx + halfsize, this.centery - 5);
+            this.context.lineTo(this.centerx + halfsize, this.centery + 5);
+
+            // Draw X axis tick marks
+            for (var x=(this.centerx - halfsize); x<(this.centerx + halfsize); x+=15) {
+                this.context.moveTo(x, this.centery - 3);
+                this.context.lineTo(x, this.centery + 3);
+            }
+
+        /**
+        * Finally draw it to the canvas
+        */
+        this.context.stroke();
+    }
+
+
+    /**
+    * The function which actually draws the radar chart
+    */
+    RGraph.Radar.prototype.DrawChart = function ()
+    {
+        var alpha = this.Get('chart.colors.alpha');
+
+        if (typeof(alpha) == 'number') {
+            var oldAlpha = this.context.globalAlpha;
+            this.context.globalAlpha = alpha;
+        }
+
+        for (var dataset=0; dataset<this.data.length; ++dataset) {
+
+            this.context.beginPath();
+            
+                this.coords[dataset] = [];
+    
+                for (var i=0; i<this.data[dataset].length; ++i) {
+                    this.coords[dataset][i] = this.GetCoordinates(dataset, i);
+                }
+    
+                /**
+                * Now go through the coords and draw the chart itself
+                */
+                this.context.strokeStyle = this.Get('chart.strokestyle');
+                this.context.fillStyle = this.Get('chart.colors')[dataset];
+                this.context.lineWidth = this.Get('chart.linewidth');
+
+                for (i=0; i<this.coords[dataset].length; ++i) {
+                    if (i == 0) {
+                        this.context.moveTo(this.coords[dataset][i][0], this.coords[dataset][i][1]);
+                    } else {
+                        this.context.lineTo(this.coords[dataset][i][0], this.coords[dataset][i][1]);
+                    }
+                }
+            
+            this.context.closePath();
+    
+            this.context.stroke();
+            this.context.fill();
+            
+            /**
+            * Can now handletooltips
+            */
+            if (this.Get('chart.tooltips')) {
+                
+                RGraph.Register(this);
+                
+                var canvas_onmousemove_func = function (e)
+                {
+                    e = RGraph.FixEventObject(e);
+                    
+                    var canvas      = e.target;
+                    var obj         = canvas.__object__;
+                    var x           = e.offsetX;
+                    var y           = e.offsetY;
+                    var overHotspot = false;
+                    
+                    for(var dataset=0; dataset<obj.coords.length; ++dataset) {
+                        for (var i=0; i<obj.coords[dataset].length; ++i) {
+                        
+                            var xCoord   = obj.coords[dataset][i][0];
+                            var yCoord   = obj.coords[dataset][i][1];
+                            var tooltips = obj.Get('chart.tooltips');
+                            var idx      = Number(i);
+        
+                            if (
+                                (tooltips[i] || tooltips) // The order here is important due to short circuiting
+                                && x < (xCoord + 5 + obj.Get('chart.tooltips.coords.adjust')[0])
+                                && x > (xCoord - 5 + obj.Get('chart.tooltips.coords.adjust')[0])
+                                && y > (yCoord - 5 + obj.Get('chart.tooltips.coords.adjust')[1])
+                                && y < (yCoord + 5 + obj.Get('chart.tooltips.coords.adjust')[1])
+                               ) {
+
+                                // This accounts for the datasets and increases the index accordingly
+                                for(var j=0; j<dataset; j++) {
+                                    if (typeof(obj.data[j]) == 'object') {
+                                        i += obj.data[j].length;
+                                    }
+                                }
+                                
+                                idx = Number(i);
+
+                                if (   !RGraph.Registry.Get('chart.tooltip')
+                                    || (RGraph.Registry.Get('chart.tooltip').__index__ != idx && RGraph.Registry.Get('chart.tooltip').__dataset__ != dataset)
+                                    || (RGraph.Registry.Get('chart.tooltip').__index__ != idx && RGraph.Registry.Get('chart.tooltip').__dataset__ == dataset)
+                                   ) {
+
+                                    /**
+                                    * Get the tooltip text
+                                    */
+                                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                                        var text = String(obj.Get('chart.tooltips')(i));
+        
+                                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[i]) == 'function') {
+                                        var text = String(obj.Get('chart.tooltips')[i](i));
+                                    
+                                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[i]) == 'string') {
+                                        var text = String(obj.Get('chart.tooltips')[i]);
+        
+                                    } else {
+                                        var text = null;
+                                    }
+        
+                                    if (typeof(text) == 'string' && text.length) {
+                               
+                                        overHotspot = true;
+                                        obj.canvas.style.cursor = 'pointer';
+        
+                                        RGraph.Clear(obj.canvas);
+                                        obj.Draw();
+                                        
+                                        if (obj.Get('chart.tooltips.highlight')) {
+                                            obj.context.beginPath();
+                                            obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                                            obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                                            obj.context.arc(xCoord, yCoord, 2, 0, 6.28, 0);
+                                            obj.context.fill();
+                                            obj.context.stroke();
+                                        }
+                                        
+                                        RGraph.Tooltip(obj.canvas, text, e.pageX, e.pageY, idx);
+                                        
+                                        // Set the data set value on the tooltip
+                                        RGraph.Registry.Get('chart.tooltip').__index__ = idx;
+                                        RGraph.Registry.Get('chart.tooltip').__dataset__ = dataset;
+
+
+                                    }
+                                //} else if (RGraph.Registry.Get('chart.tooltip') && RGraph.Registry.Get('chart.tooltip').__index__ == idx && RGraph.Registry.Get('chart.tooltip').__dataset__ == dataset) {
+                                } else {
+                                    overHotspot = true;
+                                    obj.canvas.style.cursor = 'pointer';
+                                }
+                            }
+                        }
+                    }
+
+                    if (!overHotspot) {
+                        obj.canvas.style.cursor = 'default';
+                    }
+                }
+                this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+                RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+            }
+        }
+        
+        // Reset the globalAlpha
+        if (typeof(alpha) == 'number') {
+            this.context.globalAlpha = oldAlpha;
+        }
+    }
+
+
+    /**
+    * Gets the coordinates for a particular mark
+    * 
+    * @param  number i The index of the data (ie which one it is)
+    * @return array    A two element array of the coordinates
+    */
+    RGraph.Radar.prototype.GetCoordinates = function (dataset, index)
+    {
+        // The number  of data points
+        var len = this.data[dataset].length;
+
+        // The magnitude of the data (NOT the x/y coords)
+        var mag = (this.data[dataset][index] / this.max) * (this.size / 2);
+
+        /**
+        * Get the angle
+        */
+        var angle = (6.28 / len) * index; // In radians
+
+        /**
+        * Work out the X/Y coordinates
+        */
+        var x = Math.cos(angle) * mag;
+        var y = Math.sin(angle) * mag;
+
+        /**
+        * Put the coordinate in the right quadrant
+        */
+        x = this.centerx + x;
+        y = this.centery + (index == 0 ? 0 : y);
+        
+        return [x,y];
+    }
+    
+    
+    /**
+    * This function adds the labels to the chart
+    */
+    RGraph.Radar.prototype.DrawLabels = function ()
+    {
+        var labels = this.Get('chart.labels');
+
+        if (labels && labels.length > 0) {
+
+            this.context.lineWidth = 1;
+            this.context.fillStyle = this.Get('chart.text.color');
+            
+            var offsetx = this.Get('chart.labels.offsetx');
+            var offsety = this.Get('chart.labels.offsety');
+
+            for (var i=0; i<labels.length; ++i) {
+            
+                var ds = 0;
+            
+                for (var dataset=0; dataset<this.data.length; ++dataset) {
+                    if (this.data[dataset][i] > this.data[ds][i]) {
+                        ds = dataset;
+                    }
+                }
+
+                var x        = this.coords[ds][i][0];
+                var y        = this.coords[ds][i][1];
+                var text     = labels[i];
+                var hAlign   = 'center';
+                var vAlign   = 'center';
+                var quartile = (i / this.coords.length);
+
+                // ~Manually do labels on the right middle axis
+                if (i == 0) {
+                    hAlign = 'left';
+                    vAlign = 'center';
+                    x += offsetx;
+
+                } else {
+
+                    hAlign = (x < this.centerx) ? 'right' : 'left';
+                    vAlign = (y < this.centery) ? 'bottom' : 'top';
+                    x     += (x < this.centerx) ? (-1 * offsetx) : offsetx;
+                    y     += (y < this.centery) ? (-1 * offsety) : offsety;
+                    
+                    if (i / this.data.length == 0.25) { x -= offsetx; hAlign = 'center';
+                    } else if (i / this.data.length == 0.5) { y -= offsety; vAlign = 'center';
+                    } else if (i / this.data.length == 0.75) { x += offsetx; hAlign = 'center'; }
+                }
+
+                // context, font, size, x, y, text
+                RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size'), x, y, text, vAlign, hAlign, true, null, 'white');
+            }
+        }
+    }
+
+
+    /**
+    * Draws the circle. No arguments as it gets the information from the object properties.
+    */
+    RGraph.Radar.prototype.DrawCircle = function ()
+    {
+        var circle   = {};
+        circle.limit = this.Get('chart.circle');
+        circle.fill  = this.Get('chart.circle.fill');
+        circle.stroke  = this.Get('chart.circle.stroke');
+
+        if (circle.limit) {
+
+            var r = (circle.limit / this.max) * (this.size / 2);
+            
+            this.context.fillStyle = circle.fill;
+            this.context.strokeStyle = circle.stroke;
+
+            this.context.beginPath();
+            this.context.arc(this.centerx, this.centery, r, 0, 6.28, 0);
+            this.context.fill();
+            this.context.stroke();
+        }
+    }
+
+
+    /**
+    * Unsuprisingly, draws the labels
+    */
+    RGraph.Radar.prototype.DrawAxisLabels = function ()
+    {
+        this.context.lineWidth = 1;
+        
+        // Set the color to black
+        this.context.fillStyle = 'black';
+        this.context.strokeStyle = 'black';
+
+        var r         = (this.size/ 2);
+        var font_face = this.Get('chart.text.font');
+        var font_size = this.Get('chart.text.size');
+        var context   = this.context;
+        var axes      = this.Get('chart.labels.axes').toLowerCase();
+        var color     = 'rgba(255,255,255,0.8)';
+
+        // The "North" axis labels
+        if (axes.indexOf('n') > -1) {
+            RGraph.Text(context,font_face,font_size,this.centerx,this.centery - (r * 0.2),String(this.scale[0]),'center','center',true,false,color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.4), String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.6), String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.8), String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - r, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+
+        // The "South" axis labels
+        if (axes.indexOf('s') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.2), String(this.scale[0]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.4), String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.6), String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.8), String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + r, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+        
+        // The "East" axis labels
+        if (axes.indexOf('e') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.2), this.centery, String(this.scale[0]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.4), this.centery, String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.6), this.centery, String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.8), this.centery, String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + r, this.centery, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+
+        // The "West" axis labels
+        if (axes.indexOf('w') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.2), this.centery, String(this.scale[0]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.4), this.centery, String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.6), this.centery, String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.8), this.centery, String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - r, this.centery, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+
+        RGraph.Text(context, font_face, font_size, this.centerx,  this.centery, '0', 'center', 'center', true, false, color);
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.rose.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.rose.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.rose.js	(revision 225)
@@ -0,0 +1,874 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+    
+    /**
+    * The rose chart constuctor
+    * 
+    * @param object canvas
+    * @param array data
+    */
+    RGraph.Rose = function (id, data)
+    {
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.data              = data;
+        this.canvas.__object__ = this;
+        this.type              = 'rose';
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        this.centerx = 0;
+        this.centery = 0;
+        this.radius  = 0;
+        this.max     = 0;
+        
+        this.properties = {
+            'chart.radius':                 null,
+            'chart.colors':                 ['red', 'rgb(0,255,255)', 'rgb(0,255,0)', 'gray', 'blue', 'rgb(255,128,255)','green', 'pink', 'gray', 'aqua'],
+            'chart.colors.sequential':      false,
+            'chart.colors.alpha':           null,
+            'chart.strokestyle':            'rgba(0,0,0,0.5)',
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.labels':                 null,
+            'chart.labels.position':       'center',
+            'chart.labels.axes':            'nsew',
+            'chart.labels.offset':          0,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.text.size':              10,
+            'chart.key':                    null,
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.contextmenu':            null,
+            'chart.tooltips':               null,
+            'chart.tooltips.event':         'onclick',
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.highlight.stroke':       'black',
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.adjustable':             false,
+            'chart.ymax':                   null,
+            'chart.ymin':                   0,
+            'chart.scale.decimals':         null,
+            'chart.variant':                'stacked'
+        }
+
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getSegment;
+    }
+
+
+    /**
+    * A simple setter
+    * 
+    * @param string name  The name of the property to set
+    * @param string value The value of the property
+    */
+    RGraph.Rose.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+    
+    
+    /**
+    * A simple getter
+    * 
+    * @param string name The name of the property to get
+    */
+    RGraph.Rose.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+    
+    /**
+    * This method draws the rose chart
+    */
+    RGraph.Rose.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+        
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+
+        
+        /**
+        * This doesn't affect the chart, but is used for compatibility
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // Calculate the radius
+        this.radius       = (Math.min(RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight, RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2);
+        this.centerx      = RGraph.GetWidth(this) / 2;
+        this.centery      = RGraph.GetHeight(this) / 2;
+        this.angles       = [];
+        this.total        = 0;
+        this.startRadians = 0;
+        
+        // User specified radius
+        if (typeof(this.Get('chart.radius')) == 'number') {
+            this.radius = this.Get('chart.radius');
+        }
+        
+        /**
+        * Change the centerx marginally if the key is defined
+        */
+        if (this.Get('chart.key') && this.Get('chart.key').length > 0 && this.Get('chart.key').length >= 3) {
+            this.centerx = this.centerx - this.Get('chart.gutter.right') + 5;
+        }
+
+        this.DrawBackground();
+        this.DrawRose();
+        this.DrawLabels();
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * Tooltips
+        */
+        if (this.Get('chart.tooltips')) {
+
+            /**
+            * Register this object for redrawing
+            */
+            RGraph.Register(this);
+        
+            /**
+            * The onclick event
+            */
+            var canvas_onclick_func = function (e)
+            {
+                var obj     = e.target.__object__;
+                var canvas  = e.target;
+                var context = canvas.getContext('2d');
+
+                e = RGraph.FixEventObject(e);
+
+                RGraph.Redraw();
+                
+                var segment = obj.getSegment(e);
+
+                if (segment && obj.Get('chart.tooltips')) {
+
+                    /**
+                    * Get the tooltip text
+                    */
+                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')(segment[6]));
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[segment[6]]) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')[segment[6]](segment[6]));
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && (typeof(obj.Get('chart.tooltips')[segment[6]]) == 'string' || typeof(obj.Get('chart.tooltips')[segment[6]]) == 'number')) {
+                        var text = String(obj.Get('chart.tooltips')[segment[6]]);
+                    } else {
+                        var text = null;
+                    }
+
+                    if (text) {
+                        context.beginPath();
+                            context.strokeStyle = obj.Get('chart.highlight.stroke');
+                            context.fillStyle   = obj.Get('chart.highlight.fill');
+                            
+                            // This highlights the chart
+                            context.arc(obj.centerx, obj.centery, segment[3], segment[4] / 57.3, segment[5] / 57.3, false);
+                            context.arc(obj.centerx, obj.centery, segment[2] + 0.01, segment[5] / 57.3, segment[4] / 57.3, true);
+    
+                        context.closePath();
+    
+                        context.fill();
+                        context.stroke();
+    
+                        context.strokeStyle = 'rgba(0,0,0,0)';
+
+                        // Taken out on 12th June 2011
+                        //obj.DrawLabels();
+                        
+                        /**
+                        * Show the tooltip
+                        */
+                        RGraph.Tooltip(canvas, text, e.pageX, e.pageY, segment[6]);
+    
+                        e.stopPropagation();
+                    }
+
+                    return;
+                }
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+
+
+            /**
+            * The onmousemove event
+            */
+            var canvas_onmousemove_func = function (e)
+            {
+
+                var obj     = e.target.__object__;
+                var canvas  = e.target;
+                var context = canvas.getContext('2d');
+
+                e = RGraph.FixEventObject(e);
+
+                var segment = obj.getSegment(e);
+
+                if (segment && obj.Get('chart.tooltips')) {
+
+                    /**
+                    * Get the tooltip text
+                    */
+                    if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')(segment[6]));
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[segment[6]]) == 'function') {
+                        var text = String(obj.Get('chart.tooltips')[segment[6]](segment[6]));
+                    } else if (typeof(obj.Get('chart.tooltips')) == 'object' && (typeof(obj.Get('chart.tooltips')[segment[6]]) == 'string' || typeof(obj.Get('chart.tooltips')[segment[6]]) == 'number')) {
+                        var text = String(obj.Get('chart.tooltips')[segment[6]]);
+                    } else {
+                        var text = null;
+                    }
+
+                    if (text) {
+                        canvas.style.cursor = 'pointer';
+                
+                        /*******************************************************
+                        * This is here in case tooltips are using the
+                        * onmousemove event
+                        *******************************************************/
+                        if (obj.Get('chart.tooltips.event') == 'onmousemove') {
+                            if (!RGraph.Registry.Get('chart.tooltip') || RGraph.Registry.Get('chart.tooltip').__index__ != segment[6]) {
+                                canvas_onclick_func(e);
+                            }
+                        }
+
+                    } else {
+                        canvas.style.cursor = 'default';
+                    }
+
+                    return;
+                }
+
+                canvas.style.cursor = 'default';
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+        
+        /**
+        * This function enables adjusting
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    /**
+    * This method draws the rose charts background
+    */
+    RGraph.Rose.prototype.DrawBackground = function ()
+    {
+        this.context.lineWidth = 1;
+    
+        // Draw the background grey circles
+        this.context.strokeStyle = '#ccc';
+        for (var i=15; i<this.radius - (RGraph.isIE8() ? 5 : 0); i+=15) {// Radius must be greater than 0 for Opera to work
+            //this.context.moveTo(this.centerx + i, this.centery);
+    
+            // Radius must be greater than 0 for Opera to work
+            this.context.arc(this.centerx, this.centery, i, 0, (2 * Math.PI), 0);
+        }
+        this.context.stroke();
+
+        // Draw the background lines that go from the center outwards
+        this.context.beginPath();
+        for (var i=15; i<360; i+=15) {
+        
+            // Radius must be greater than 0 for Opera to work
+            this.context.arc(this.centerx, this.centery, this.radius, i / 57.3, (i + 0.1) / 57.3, 0); // The 0.1 avoids a bug in Chrome 6
+        
+            this.context.lineTo(this.centerx, this.centery);
+        }
+        this.context.stroke();
+        
+        this.context.beginPath();
+        this.context.strokeStyle = 'black';
+    
+        // Draw the X axis
+        this.context.moveTo(this.centerx - this.radius, this.centery);
+        this.context.lineTo(this.centerx + this.radius, this.centery);
+    
+        // Draw the X ends
+        this.context.moveTo(this.centerx - this.radius, this.centery - 5);
+        this.context.lineTo(this.centerx - this.radius, this.centery + 5);
+        this.context.moveTo(this.centerx + this.radius, this.centery - 5);
+        this.context.lineTo(this.centerx + this.radius, this.centery + 5);
+        
+        // Draw the X check marks
+        for (var i=(this.centerx - this.radius); i<(this.centerx + this.radius); i+=20) {
+            this.context.moveTo(i,  this.centery - 3);
+            this.context.lineTo(i,  this.centery + 3);
+        }
+        
+        // Draw the Y check marks
+        for (var i=(this.centery - this.radius); i<(this.centery + this.radius); i+=20) {
+            this.context.moveTo(this.centerx - 3, i);
+            this.context.lineTo(this.centerx + 3, i);
+        }
+    
+        // Draw the Y axis
+        this.context.moveTo(this.centerx, this.centery - this.radius);
+        this.context.lineTo(this.centerx, this.centery + this.radius);
+    
+        // Draw the Y ends
+        this.context.moveTo(this.centerx - 5, this.centery - this.radius);
+        this.context.lineTo(this.centerx + 5, this.centery - this.radius);
+    
+        this.context.moveTo(this.centerx - 5, this.centery + this.radius);
+        this.context.lineTo(this.centerx + 5, this.centery + this.radius);
+        
+        // Stroke it
+        this.context.closePath();
+        this.context.stroke();
+    }
+
+
+    /**
+    * This method draws the data on the graph
+    */
+    RGraph.Rose.prototype.DrawRose = function ()
+    {
+        var max  = 0;
+        var data = this.data;
+
+        // Must be at least two data points
+        if (data.length < 2) {
+            alert('[ROSE] Must be at least two data points! [' + data + ']');
+            return;
+        }
+    
+        // Work out the maximum value and the sum
+        if (!this.Get('chart.ymax')) {
+            // Work out the max
+            for (var i=0; i<data.length; ++i) {
+                if (typeof(data[i]) == 'number') {
+                    max = Math.max(max, data[i]);
+                } else if (typeof(data[i]) == 'object' && this.Get('chart.variant') == 'non-equi-angular') {
+                    max = Math.max(max, data[i][0]);
+                
+                // Fallback is stacked
+                } else {
+                    max = Math.max(max, RGraph.array_sum(data[i]));
+                }
+            }
+
+            this.scale = RGraph.getScale(max, this);
+            this.max = this.scale[4];
+        } else {
+            var ymax = this.Get('chart.ymax');
+            var ymin = this.Get('chart.ymin');
+
+            this.scale = [
+                          ((ymax - ymin) * 0.2) + ymin,
+                          ((ymax - ymin) * 0.4) + ymin,
+                          ((ymax - ymin) * 0.6) + ymin,
+                          ((ymax - ymin) * 0.8) + ymin,
+                          ((ymax - ymin) * 1.0) + ymin
+                         ];
+            this.max = this.scale[4];
+        }
+        
+        this.sum = RGraph.array_sum(data);
+        
+        // Move to the centre
+        this.context.moveTo(this.centerx, this.centery);
+    
+        this.context.stroke(); // Stroke the background so it stays grey
+    
+        // Transparency
+        if (this.Get('chart.colors.alpha')) {
+            this.context.globalAlpha = this.Get('chart.colors.alpha');
+        }
+
+        /*******************************************************
+        * A non-equi-angular Rose chart
+        *******************************************************/
+        if (typeof(this.Get('chart.variant')) == 'string' && this.Get('chart.variant') == 'non-equi-angular') {
+            /*******************************************************
+            * NON-EQUI-ANGULAR GOES HERE
+            *******************************************************/
+            var total=0;
+            for (var i=0; i<data.length; ++i) {
+                total += data[i][1];
+            }
+            
+            
+            for (var i=0; i<this.data.length; ++i) {
+            
+                var segmentRadians = (this.data[i][1] / total) * (2 * Math.PI);
+                var radius         = ((this.data[i][0] - this.Get('chart.ymin')) / (this.max - this.Get('chart.ymin'))) * (this.radius - 10);
+                
+                this.context.strokeStyle = this.Get('chart.strokestyle');
+                this.context.fillStyle = this.Get('chart.colors')[0];
+                
+                if (this.Get('chart.colors.sequential')) {
+                    this.context.fillStyle = this.Get('chart.colors')[i];
+                }
+            
+                this.context.beginPath(); // Begin the segment
+                    this.context.arc(this.centerx, this.centery, radius, this.startRadians - (Math.PI / 2), this.startRadians + segmentRadians - (Math.PI / 2), 0);
+                    this.context.lineTo(this.centerx, this.centery);
+                this.context.closePath(); // End the segment
+                
+                this.context.stroke();
+                this.context.fill();
+                
+                // Store the start and end angles
+                this.angles.push([
+                                  ((this.startRadians - (Math.PI / 2)) * 57.3) + 90,
+                                  (((this.startRadians + segmentRadians) - (Math.PI / 2)) * 57.3) + 90,
+                                  0,
+                                  radius
+                                 ]);
+
+                this.startRadians += segmentRadians;
+            }
+        } else {
+            /*******************************************************
+            * Draw the segments
+            *******************************************************/
+            for (var i=0; i<this.data.length; ++i) {
+    
+                this.context.strokeStyle = this.Get('chart.strokestyle');
+                this.context.fillStyle = this.Get('chart.colors')[0];
+                
+                /*******************************************************
+                * This allows sequential colors
+                *******************************************************/
+                if (this.Get('chart.colors.sequential')) {
+                    this.context.fillStyle = this.Get('chart.colors')[i];
+                }
+        
+                var segmentRadians = (1 / this.data.length) * (2 * Math.PI);
+    
+                if (typeof(this.data[i]) == 'number') {
+                    this.context.beginPath(); // Begin the segment
+                        var radius = ((this.data[i] - this.Get('chart.ymin')) / (this.max - this.Get('chart.ymin'))) * (this.radius - 10);
+        
+                        this.context.arc(this.centerx, this.centery, radius, this.startRadians - (Math.PI / 2), this.startRadians + segmentRadians - (Math.PI / 2), 0);
+                        this.context.lineTo(this.centerx, this.centery);
+                    this.context.closePath(); // End the segment
+                    this.context.stroke();
+                    this.context.fill();
+                    
+                    // Store the start and end angles
+                    this.angles.push([
+                                      ((this.startRadians - (Math.PI / 2)) * 57.3) + 90,
+                                      (((this.startRadians + segmentRadians) - (Math.PI / 2)) * 57.3) + 90,
+                                      0,
+                                      radius
+                                     ]);
+                /*******************************************************
+                * Draw a stacked segment
+                *******************************************************/
+                } else if (typeof(this.data[i]) == 'object') {
+
+                    for (var j=0; j<this.data[i].length; ++j) {
+    
+                        this.context.fillStyle = this.Get('chart.colors')[j];
+                        if (j == 0) {
+                            this.context.beginPath(); // Begin the segment
+                                var startRadius = 0;
+                                var endRadius = ((this.data[i][j] - this.Get('chart.ymin')) / (this.max - this.Get('chart.ymin'))) * (this.radius - 10);
+                    
+                                this.context.arc(this.centerx,
+                                                 this.centery,
+                                                 endRadius,
+                                                 this.startRadians - (Math.PI / 2),
+                                                 this.startRadians + segmentRadians - (Math.PI / 2),
+                                                 0);
+                                this.context.lineTo(this.centerx, this.centery);
+                            this.context.closePath(); // End the segment
+                            this.context.stroke();
+                            this.context.fill();
+    
+                            this.angles.push([
+                                              ((this.startRadians - (Math.PI / 2)) * 57.3) + 90,
+                                              (((this.startRadians + segmentRadians) - (Math.PI / 2)) * 57.3) + 90,
+                                              0,
+                                              endRadius
+                                             ]);
+                        
+                        } else {
+                
+                            this.context.beginPath(); // Begin the segment
+                                var startRadius = endRadius; // This comes from the prior iteration of this loop
+                                var endRadius = (((this.data[i][j] - this.Get('chart.ymin')) / (this.max - this.Get('chart.ymin'))) * (this.radius - 10)) + startRadius;
+                
+                                this.context.arc(this.centerx,
+                                                 this.centery,
+                                                 startRadius,
+                                                 this.startRadians - (Math.PI / 2),
+                                                 this.startRadians + segmentRadians - (Math.PI / 2),
+                                                 0);
+                
+                                this.context.arc(this.centerx,
+                                                 this.centery,
+                                                 endRadius,
+                                                 this.startRadians + segmentRadians - (Math.PI / 2),
+                                                 this.startRadians - (Math.PI / 2),
+                                                 true);
+                
+                            this.context.closePath(); // End the segment
+                            this.context.stroke();
+                            this.context.fill();
+    
+                            this.angles.push([
+                                              ((this.startRadians - (Math.PI / 2)) * 57.3) + 90,
+                                              ((this.startRadians + segmentRadians - (Math.PI / 2)) * 57.3) + 90,
+                                              startRadius,
+                                              endRadius
+                                             ]);
+                        }
+                    }
+                }
+    
+                this.startRadians += segmentRadians;
+            }
+        }
+
+        // Turn off the transparency
+        if (this.Get('chart.colors.alpha')) {
+            this.context.globalAlpha = 1;
+        }
+
+        // Draw the title if any has been set
+        if (this.Get('chart.title')) {
+            RGraph.DrawTitle(this.canvas,
+                             this.Get('chart.title'),
+                             (this.canvas.height / 2) - this.radius,
+                             this.centerx,
+                             this.Get('chart.text.size') + 2);
+        }
+    }
+
+
+    /**
+    * Unsuprisingly, draws the labels
+    */
+    RGraph.Rose.prototype.DrawLabels = function ()
+    {
+        this.context.lineWidth = 1;
+        var key = this.Get('chart.key');
+
+        if (key && key.length) {
+            RGraph.DrawKey(this, key, this.Get('chart.colors'));
+        }
+        
+        // Set the color to black
+        this.context.fillStyle = 'black';
+        this.context.strokeStyle = 'black';
+        
+        var r         = this.radius - 10;
+        var font_face = this.Get('chart.text.font');
+        var font_size = this.Get('chart.text.size');
+        var context   = this.context;
+        var axes      = this.Get('chart.labels.axes').toLowerCase();
+
+        // Draw any labels
+
+        if (typeof(this.Get('chart.labels')) == 'object' && this.Get('chart.labels')) {
+            this.DrawCircularLabels(context, this.Get('chart.labels'), font_face, font_size, r + 10);
+        }
+
+
+        var color = 'rgba(255,255,255,0.8)';
+
+        // The "North" axis labels
+        if (axes.indexOf('n') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.2), String(Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.4), String(Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.6), String(Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - (r * 0.8), String(Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - r, String(Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+        }
+
+        // The "South" axis labels
+        if (axes.indexOf('s') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.2), String(Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.4), String(Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.6), String(Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + (r * 0.8), String(Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + r, String(Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+        }
+        
+        // The "East" axis labels
+        if (axes.indexOf('e') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.2), this.centery, String(Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.4), this.centery, String(Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.6), this.centery, String(Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + (r * 0.8), this.centery, String(Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + r, this.centery, String(Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+        }
+
+        // The "West" axis labels
+        if (axes.indexOf('w') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.2), this.centery, String(Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.4), this.centery, String(Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.6), this.centery, String(Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - (r * 0.8), this.centery, String(Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - r, this.centery, String(Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals'))), 'center', 'center', true, false, color);
+        }
+
+        RGraph.Text(context, font_face, font_size, this.centerx,  this.centery, typeof(this.Get('chart.ymin')) == 'number' ? String(Number(this.Get('chart.ymin')).toFixed(this.Get('chart.scale.decimals'))) : '0', 'center', 'center', true, false, color);
+    }
+
+
+    /**
+    * Draws the circular labels that go around the charts
+    * 
+    * @param labels array The labels that go around the chart
+    */
+    RGraph.Rose.prototype.DrawCircularLabels = function (context, labels, font_face, font_size, r)
+    {
+        var variant = this.Get('chart.variant');
+        var position = this.Get('chart.labels.position');
+        var r        = r + 10 + this.Get('chart.labels.offset');
+
+        for (var i=0; i<labels.length; ++i) {
+            
+            if (typeof(variant) == 'string' && variant == 'non-equi-angular') {
+
+                var a = Number(this.angles[i][0]) + ((this.angles[i][1] - this.angles[i][0]) / 2);
+                    a -= 90;
+                var halign = 'center'; // Default halign
+
+                var x = Math.cos(a / 57.29577866666) * (r + 10);
+                var y = Math.sin(a / 57.29577866666) * (r + 10);
+                
+                RGraph.Text(context, font_face, font_size, this.centerx + x, this.centery + y, String(labels[i]), 'center', halign);
+                
+            } else {
+
+                var a = (360 / labels.length) * (i + 1) - (360 / (labels.length * 2));
+                var a = a - 90 + (this.Get('chart.labels.position') == 'edge' ? ((360 / labels.length) / 2) : 0);
+                var halign = 'center'; // Default halign
+    
+                // Horizontal alignment
+                //if (a == 0) {
+                //    var halign = 'left';
+                //} else if (a == 180) {
+                //    var halign = 'right';
+                //}
+    
+                var x = Math.cos(a / 57.29577866666) * (r + 10);
+                var y = Math.sin(a / 57.29577866666) * (r + 10);
+    
+                RGraph.Text(context, font_face, font_size, this.centerx + x, this.centery + y, String(labels[i]), 'center', halign);
+            }
+        }
+    }
+
+
+    /**
+    * This function is for use with circular graph types, eg the Pie or Rose. Pass it your event object
+    * and it will pass you back the corresponding segment details as an array:
+    * 
+    * [x, y, r, startAngle, endAngle]
+    * 
+    * Angles are measured in degrees, and are measured from the "east" axis (just like the canvas).
+    * 
+    * @param object e   Your event object
+    */
+    RGraph.Rose.prototype.getSegment = function (e)
+    {
+        RGraph.FixEventObject(e);
+
+        // The optional arg provides a way of allowing some accuracy (pixels)
+        var accuracy = arguments[1] ? arguments[1] : 0;
+
+        var obj         = e.target.__object__;
+        var canvas      = obj.canvas;
+        var context     = obj.context;
+        var mouseCoords = RGraph.getMouseXY(e);
+        var x           = mouseCoords[0] - obj.centerx;
+        var y           = mouseCoords[1] - obj.centery;
+        var r           = obj.radius;
+        var theta       = Math.atan(y / x); // RADIANS
+        var hyp         = y / Math.sin(theta);
+        var angles      = obj.angles;
+        var ret         = [];
+        var hyp         = (hyp < 0) ? hyp + accuracy : hyp - accuracy;
+
+
+
+        // Put theta in DEGREES
+        theta *= 57.3
+
+        // hyp should not be greater than radius if it's a Rose chart
+        if (obj.type == 'rose') {
+            if (   (isNaN(hyp) && Math.abs(mouseCoords[0]) < (obj.centerx - r) )
+                || (isNaN(hyp) && Math.abs(mouseCoords[0]) > (obj.centerx + r))
+                || (!isNaN(hyp) && Math.abs(hyp) > r)) {
+                return;
+            }
+        }
+
+        /**
+        * Account for the correct quadrant
+        */
+        if (x < 0 && y >= 0) {
+            theta += 180;
+        } else if (x < 0 && y < 0) {
+            theta += 180;
+        } else if (x > 0 && y < 0) {
+            theta += 360;
+        }
+
+        /**
+        * Account for the rose chart angle displacement
+        */
+        theta += 90;
+
+        if (theta > 360) {
+            theta -= 360;
+        }
+
+        hyp = Math.abs(hyp);
+
+        for (var i=0; i<angles.length; ++i) {
+            if (theta >= angles[i][0] && theta < angles[i][1] && hyp > angles[i][2] && hyp < angles[i][3]) {
+
+                if (!(hyp > angles[i][2] && hyp < angles[i][3])) {
+                    return null;
+                }
+
+                if (!hyp) {
+                    return null;
+                }
+
+                ret[0] = obj.centerx;
+                ret[1] = obj.centery;
+                ret[2] = angles[i][2]; // Start angle
+                ret[3] = angles[i][3]; // End angle
+
+                ret[4] = angles[i][0]; // Start radius
+                ret[5] = angles[i][1]; // End radius
+                ret[6] = i;
+
+                ret[4] -= 90;
+                ret[5] -= 90;
+            
+                if (x > 0 && y < 0) {
+                    ret[4] += 360;
+                    ret[5] += 360;
+                }
+                
+                if (ret[4] < 0) ret[4] += 360;
+                if (ret[5] > 360) ret[5] -= 360;
+
+                return ret;
+            }
+        }
+        
+        return null;
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.rscatter.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.rscatter.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.rscatter.js	(revision 225)
@@ -0,0 +1,620 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+    
+    /**
+    * The chart constuctor
+    * 
+    * @param object canvas
+    * @param array data
+    */
+    RGraph.Rscatter = function (id, data)
+    {
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.data              = data;
+        this.canvas.__object__ = this;
+        this.type              = 'rscatter';
+        this.hasTooltips       = false;
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        this.centerx = 0;
+        this.centery = 0;
+        this.radius  = 0;
+        this.max     = 0;
+        
+        this.properties = {
+            'chart.radius':                 null,
+            'chart.colors':                 [], // This is used internally for the key
+            'chart.colors.default':         'black',
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.labels':                 null,
+            'chart.labels.position':       'center',
+            'chart.labels.axes':            'nsew',
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.text.size':              10,
+            'chart.key':                    null,
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.contextmenu':            null,
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.tooltips.highlight':     true,
+            'chart.tooltips.hotspot':       3,
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.adjustable':             false,
+            'chart.ymax':                   null,
+            'chart.ymin':                   0,
+            'chart.tickmarks':              'cross',
+            'chart.ticksize':               3,
+            'chart.scale.decimals':         null,
+            'chart.scale.round':            false
+        }
+    }
+
+
+    /**
+    * A simple setter
+    * 
+    * @param string name  The name of the property to set
+    * @param string value The value of the property
+    */
+    RGraph.Rscatter.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+    
+    
+    /**
+    * A simple getter
+    * 
+    * @param string name The name of the property to get
+    */
+    RGraph.Rscatter.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+    
+    /**
+    * This method draws the rose chart
+    */
+    RGraph.Rscatter.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+
+        
+        /**
+        * This doesn't affect the chart, but is used for compatibility
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // Calculate the radius
+        this.radius  = (Math.min(RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight, RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2);
+        this.centerx = RGraph.GetWidth(this) / 2;
+        this.centery = RGraph.GetHeight(this) / 2;
+        this.coords  = [];
+        
+        /**
+        * If there's a user specified radius, use that
+        */
+        if (typeof(this.Get('chart.radius')) == 'number') {
+            this.radius = this.Get('chart.radius');
+        }
+        
+        /**
+        * Work out the scale
+        */
+        var max = this.Get('chart.ymax');
+        var min = this.Get('chart.ymin');
+        
+        if (typeof(max) == 'number') {
+            this.max   = max;
+            this.scale = [((max - min) * 0.2) + min,((max - min) * 0.4) + min,((max - min) * 0.6) + min,((max - min) * 0.8) + min,((max - min) * 1.0) + min,];
+            
+        } else {
+            for (var i=0; i<this.data.length; ++i) {
+                this.max = Math.max(this.max, this.data[i][1]);
+            }
+            this.scale = RGraph.getScale(this.max, this);
+            this.max   = this.scale[4];
+
+            // Hmmmmmmmm
+            if (String(this.scale[0]).indexOf('e') == -1) {
+                this.scale[0] = Number(this.scale[0]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[1] = Number(this.scale[1]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[2] = Number(this.scale[2]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[3] = Number(this.scale[3]).toFixed(this.Get('chart.scale.decimals'));
+                this.scale[4] = Number(this.scale[4]).toFixed(this.Get('chart.scale.decimals'));
+            }
+        }
+
+        /**
+        * Change the centerx marginally if the key is defined
+        */
+        if (this.Get('chart.key') && this.Get('chart.key').length > 0 && this.Get('chart.key').length >= 3) {
+            this.centerx = this.centerx - this.Get('chart.gutter.right') + 5;
+        }
+        
+        /**
+        * Populate the colors array for the purposes of generating the key
+        */
+        if (typeof(this.Get('chart.key')) == 'object' && RGraph.is_array(this.Get('chart.key')) && this.Get('chart.key')[0]) {
+            for (var i=0; i<this.data.length; ++i) {
+                if (this.data[i][2] && typeof(this.data[i][2]) == 'string') {
+                    this.Get('chart.colors').push(this.data[i][2]);
+                }
+            }
+        }
+
+        this.DrawBackground();
+        this.DrawRscatter();
+        this.DrawLabels();
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * Tooltips
+        */
+        if (this.hasTooltips) {
+
+            /**
+            * Register this object for redrawing
+            */
+            RGraph.Register(this);
+            
+            /**
+            * The onmousemove event
+            */
+            var canvas_onmousemove_func = function (event)
+            {
+                event = RGraph.FixEventObject(event);
+
+                var mouseCoords = RGraph.getMouseXY(event);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                var obj         = event.target.__object__;
+                var canvas      = obj.canvas;
+                var context     = obj.context;
+                var overHotspot = false;
+                var offset      = obj.Get('chart.tooltips.hotspot'); // This is how far the hotspot extends
+
+                for (var i=0; i<obj.coords.length; ++i) {
+                
+                    var xCoord  = obj.coords[i][0];
+                    var yCoord  = obj.coords[i][1];
+                    var tooltip = obj.coords[i][3];
+
+                    if (
+                        mouseX < (xCoord + offset) &&
+                        mouseX > (xCoord - offset) &&
+                        mouseY < (yCoord + offset) &&
+                        mouseY > (yCoord - offset) &&
+                        typeof(tooltip) == 'string' &&
+                        tooltip.length > 0
+                       ) {
+
+                        overHotspot = true;
+                        canvas.style.cursor = 'pointer';
+
+                        if (!RGraph.Registry.Get('chart.tooltip') || RGraph.Registry.Get('chart.tooltip').__text__ != tooltip) {
+    
+                            if (obj.Get('chart.tooltips.highlight')) {
+                                RGraph.Redraw();
+                            }
+    
+                            /**
+                            * Get the tooltip text
+                            */
+                            if (typeof(tooltip) == 'function') {
+                                var text = String(tooltip(i));
+    
+                            } else {
+                                var text = String(tooltip);
+                            }
+    
+                            RGraph.Tooltip(canvas, text, event.pageX + 5, event.pageY - 5, i);
+    
+                            /**
+                            * Highlight the tickmark
+                            */
+                            if (obj.Get('chart.tooltips.highlight')) {
+                                context.beginPath();
+                                context.fillStyle = 'rgba(255,255,255,0.5)';
+                                context.arc(xCoord, yCoord, 3, 0, 6.2830, 0);
+                                context.fill();
+                            }
+                        }
+                    }
+                }
+                
+                if (!overHotspot) {
+                    canvas.style.cursor = 'default';
+                }
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+        }
+
+        // Draw the title if any has been set
+        if (this.Get('chart.title')) {
+            RGraph.DrawTitle(this.canvas,
+                             this.Get('chart.title'),
+                             (this.canvas.height / 2) - this.radius - 5,
+                             this.centerx,
+                             this.Get('chart.text.size') + 2);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    /**
+    * This method draws the rose charts background
+    */
+    RGraph.Rscatter.prototype.DrawBackground = function ()
+    {
+        this.context.lineWidth = 1;
+    
+        // Draw the background grey circles
+        this.context.strokeStyle = '#ccc';
+        for (var i=15; i<this.radius - (document.all ? 5 : 0); i+=15) {// Radius must be greater than 0 for Opera to work
+            //this.context.moveTo(this.centerx + i, this.centery);
+    
+            // Radius must be greater than 0 for Opera to work
+            this.context.arc(this.centerx, this.centery, i, 0, (2 * Math.PI), 0);
+        }
+        this.context.stroke();
+
+        // Draw the background lines that go from the center outwards
+        this.context.beginPath();
+        for (var i=15; i<360; i+=15) {
+        
+            // Radius must be greater than 0 for Opera to work
+            this.context.arc(this.centerx, this.centery, this.radius, i / 57.3, (i + 0.01) / 57.3, 0);
+        
+            this.context.lineTo(this.centerx, this.centery);
+        }
+        this.context.stroke();
+        
+        this.context.beginPath();
+        this.context.strokeStyle = 'black';
+    
+        // Draw the X axis
+        this.context.moveTo(this.centerx - this.radius, this.centery);
+        this.context.lineTo(this.centerx + this.radius, this.centery);
+    
+        // Draw the X ends
+        this.context.moveTo(this.centerx - this.radius, this.centery - 5);
+        this.context.lineTo(this.centerx - this.radius, this.centery + 5);
+        this.context.moveTo(this.centerx + this.radius, this.centery - 5);
+        this.context.lineTo(this.centerx + this.radius, this.centery + 5);
+        
+        // Draw the X check marks
+        for (var i=(this.centerx - this.radius); i<(this.centerx + this.radius); i+=20) {
+            this.context.moveTo(i,  this.centery - 3);
+            this.context.lineTo(i,  this.centery + 3);
+        }
+        
+        // Draw the Y check marks
+        for (var i=(this.centery - this.radius); i<(this.centery + this.radius); i+=20) {
+            this.context.moveTo(this.centerx - 3, i);
+            this.context.lineTo(this.centerx + 3, i);
+        }
+    
+        // Draw the Y axis
+        this.context.moveTo(this.centerx, this.centery - this.radius);
+        this.context.lineTo(this.centerx, this.centery + this.radius);
+    
+        // Draw the Y ends
+        this.context.moveTo(this.centerx - 5, this.centery - this.radius);
+        this.context.lineTo(this.centerx + 5, this.centery - this.radius);
+    
+        this.context.moveTo(this.centerx - 5, this.centery + this.radius);
+        this.context.lineTo(this.centerx + 5, this.centery + this.radius);
+        
+        // Stroke it
+        this.context.closePath();
+        this.context.stroke();
+    }
+
+
+    /**
+    * This method draws a set of data on the graph
+    */
+    RGraph.Rscatter.prototype.DrawRscatter = function ()
+    {
+        var data = this.data;
+
+        for (var i=0; i<data.length; ++i) {
+
+            var d1 = data[i][0];
+            var d2 = data[i][1];
+            var a   = d1 / (180 / Math.PI); // RADIANS
+            var r   = ( (d2 - this.Get('chart.ymin')) / (this.max - this.Get('chart.ymin')) ) * this.radius;
+            var x   = Math.sin(a) * r;
+            var y   = Math.cos(a) * r;
+            var color = data[i][2] ? data[i][2] : this.Get('chart.colors.default');
+            var tooltip = data[i][3] ? data[i][3] : null;
+            
+            if (tooltip && tooltip.length) {
+                this.hasTooltips = true;
+            }
+
+            /**
+            * Account for the correct quadrant
+            */
+            x = x + this.centerx;
+            y = this.centery - y;
+
+
+            this.DrawTick(x, y, color);
+            
+            // Populate the coords array with the coordinates and the tooltip
+            this.coords.push([x, y, color, tooltip]);
+        }
+    }
+
+
+    /**
+    * Unsuprisingly, draws the labels
+    */
+    RGraph.Rscatter.prototype.DrawLabels = function ()
+    {
+        this.context.lineWidth = 1;
+        var key = this.Get('chart.key');
+        
+        // Set the color to black
+        this.context.fillStyle = 'black';
+        this.context.strokeStyle = 'black';
+        
+        var r         = this.radius;
+        var color     = this.Get('chart.text.color');
+        var font_face = this.Get('chart.text.font');
+        var font_size = this.Get('chart.text.size');
+        var context   = this.context;
+        var axes      = this.Get('chart.labels.axes').toLowerCase();
+        
+        this.context.fillStyle = this.Get('chart.text.color');
+
+        // Draw any labels
+        if (typeof(this.Get('chart.labels')) == 'object' && this.Get('chart.labels')) {
+            this.DrawCircularLabels(context, this.Get('chart.labels'), font_face, font_size, r);
+        }
+
+
+        var color = 'rgba(255,255,255,0.8)';
+
+        // The "North" axis labels
+        if (axes.indexOf('n') > -1) {
+            RGraph.Text(context,font_face,font_size,this.centerx,this.centery - ((r) * 0.2),String(this.scale[0]),'center','center',true,false,color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - ((r) * 0.4), String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - ((r) * 0.6), String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - ((r) * 0.8), String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery - r, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+
+        // The "South" axis labels
+        if (axes.indexOf('s') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + ((r) * 0.2), String(this.scale[0]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + ((r) * 0.4), String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + ((r) * 0.6), String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + ((r) * 0.8), String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx, this.centery + r, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+        
+        // The "East" axis labels
+        if (axes.indexOf('e') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx + ((r) * 0.2), this.centery, String(this.scale[0]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + ((r) * 0.4), this.centery, String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + ((r) * 0.6), this.centery, String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + ((r) * 0.8), this.centery, String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx + r, this.centery, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+
+        // The "West" axis labels
+        if (axes.indexOf('w') > -1) {
+            RGraph.Text(context, font_face, font_size, this.centerx - ((r) * 0.2), this.centery, String(this.scale[0]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - ((r) * 0.4), this.centery, String(this.scale[1]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - ((r) * 0.6), this.centery, String(this.scale[2]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - ((r) * 0.8), this.centery, String(this.scale[3]), 'center', 'center', true, false, color);
+            RGraph.Text(context, font_face, font_size, this.centerx - r, this.centery, String(this.scale[4]), 'center', 'center', true, false, color);
+        }
+        
+        // Draw the center minimum value (but only if there's at least one axes labels stipulated)
+        if (this.Get('chart.labels.axes').length > 0) {
+            RGraph.Text(context, font_face, font_size, this.centerx,  this.centery, this.Get('chart.ymin') > 0 ? String(this.Get('chart.ymin').toFixed(this.Get('chart.scale.decimals'))) : '0', 'center', 'center', true, false, color);
+        }
+
+        /**
+        * Draw the key
+        */
+        if (key && key.length) {
+            RGraph.DrawKey(this, key, this.Get('chart.colors'));
+        }
+    }
+
+
+    /**
+    * Draws the circular labels that go around the charts
+    * 
+    * @param labels array The labels that go around the chart
+    */
+    RGraph.Rscatter.prototype.DrawCircularLabels = function (context, labels, font_face, font_size, r)
+    {
+        var position = this.Get('chart.labels.position');
+        var r        = r + 10;
+
+        for (var i=0; i<labels.length; ++i) {
+
+
+            var a = (360 / labels.length) * (i + 1) - (360 / (labels.length * 2));
+            var a = a - 90 + (this.Get('chart.labels.position') == 'edge' ? ((360 / labels.length) / 2) : 0);
+
+            var x = Math.cos(a / 57.29577866666) * (r + 10);
+            var y = Math.sin(a / 57.29577866666) * (r + 10);
+
+            RGraph.Text(context, font_face, font_size, this.centerx + x, this.centery + y, String(labels[i]), 'center', 'center');
+        }
+    }
+
+
+    /**
+    * Draws a single tickmark
+    */
+    RGraph.Rscatter.prototype.DrawTick = function (x, y, color)
+    {
+        var tickmarks    = this.Get('chart.tickmarks');
+        var ticksize     = this.Get('chart.ticksize');
+
+        this.context.strokeStyle = color;
+        this.context.fillStyle   = color;
+
+        // Cross
+        if (tickmarks == 'cross') {
+
+            this.context.beginPath();
+            this.context.moveTo(x + ticksize, y + ticksize);
+            this.context.lineTo(x - ticksize, y - ticksize);
+            this.context.stroke();
+    
+            this.context.beginPath();
+            this.context.moveTo(x - ticksize, y + ticksize);
+            this.context.lineTo(x + ticksize, y - ticksize);
+            this.context.stroke();
+        
+        // Circle
+        } else if (tickmarks == 'circle') {
+
+            this.context.beginPath();
+            this.context.arc(x, y, ticksize, 0, 6.2830, false);
+            this.context.fill();
+
+        // Square
+        } else if (tickmarks == 'square') {
+
+            this.context.beginPath();
+            this.context.fillRect(x - ticksize, y - ticksize, 2 * ticksize, 2 * ticksize);
+            this.context.fill();
+        
+        // Diamond shape tickmarks
+         } else if (tickmarks == 'diamond') {
+
+            this.context.beginPath();
+                this.context.moveTo(x, y - ticksize);
+                this.context.lineTo(x + ticksize, y);
+                this.context.lineTo(x, y + ticksize);
+                this.context.lineTo(x - ticksize, y);
+            this.context.closePath();
+            this.context.fill();
+
+        // Plus style tickmarks
+        } else if (tickmarks == 'plus') {
+        
+            this.context.lineWidth = 1;
+
+            this.context.beginPath();
+                this.context.moveTo(x, y - ticksize);
+                this.context.lineTo(x, y + ticksize);
+                this.context.moveTo(x - ticksize, y);
+                this.context.lineTo(x + ticksize, y);
+            this.context.stroke();
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.scatter.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.scatter.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.scatter.js	(revision 225)
@@ -0,0 +1,1494 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The scatter graph constructor
+    * 
+    * @param object canvas The cxanvas object
+    * @param array  data   The chart data
+    */
+    RGraph.Scatter = function (id, data)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.canvas.__object__ = this;
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.max               = 0;
+        this.coords            = [];
+        this.data              = [];
+        this.type              = 'scatter';
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        // Various config properties
+        this.properties = {
+            'chart.background.barcolor1':   'rgba(0,0,0,0)',
+            'chart.background.barcolor2':   'rgba(0,0,0,0)',
+            'chart.background.grid':        true,
+            'chart.background.grid.width':  1,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.hsize':  20,
+            'chart.background.grid.vsize':  20,
+            'chart.background.hbars':       null,
+            'chart.background.vbars':       null,
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':false,
+            'chart.background.grid.autofit.numhlines': 7,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.text.size':              10,
+            'chart.text.angle':             0,
+            'chart.text.color':             'black',
+            'chart.text.font':              'Verdana',
+            'chart.tooltips.effect':         'fade',
+            'chart.tooltips.hotspot':        3,
+            'chart.tooltips.css.class':      'RGraph_tooltip',
+            'chart.tooltips.highlight':      true,
+            'chart.tooltips.coords.adjust':  [0,0],
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.tickmarks':              'cross',
+            'chart.ticksize':               5,
+            'chart.xticks':                 true,
+            'chart.xaxis':                  true,
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.xmax':                   0,
+            'chart.ymax':                   null,
+            'chart.ymin':                   null,
+            'chart.scale.decimals':         null,
+            'chart.scale.point':            '.',
+            'chart.scale.thousand':         ',',
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.xaxis':            '',
+            'chart.title.yaxis':            '',
+            'chart.title.xaxis.pos':        0.25,
+            'chart.title.yaxis.pos':        0.25,
+            'chart.labels':                 [],
+            'chart.labels.ingraph':         null,
+            'chart.labels.above':           false,
+            'chart.labels.above.size':      8,
+            'chart.labels.above.decimals':  0,
+            'chart.ylabels':                true,
+            'chart.ylabels.count':          5,
+            'chart.ylabels.invert':         false,
+            'chart.contextmenu':            null,
+            'chart.defaultcolor':           'black',
+            'chart.xaxispos':               'bottom',
+            'chart.yaxispos':               'left',
+            'chart.noendxtick':             false,
+            'chart.crosshairs':             false,
+            'chart.crosshairs.color':       '#333',
+            'chart.crosshairs.linewidth':   1,
+            'chart.crosshairs.coords':      false,
+            'chart.crosshairs.coords.fixed':true,
+            'chart.crosshairs.coords.fadeout':false,
+            'chart.crosshairs.coords.labels.x': 'X',
+            'chart.crosshairs.coords.labels.y': 'Y',
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.line':                   false,
+            'chart.line.linewidth':         1,
+            'chart.line.colors':            ['green', 'red'],
+            'chart.line.shadow.color':      'rgba(0,0,0,0)',
+            'chart.line.shadow.blur':       2,
+            'chart.line.shadow.offsetx':    3,
+            'chart.line.shadow.offsety':    3,
+            'chart.line.stepped':           false,
+            'chart.noaxes':                 false,
+            'chart.key':                    [],
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.axis.color':             'black',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.zoom.action':            'zoom',
+            'chart.boxplot.width':          8,
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.xmin':                   0,
+            'chart.labels.specific.align':  'left'
+        }
+
+        // Handle multiple datasets being given as one argument
+        if (arguments[1][0] && arguments[1][0][0] && typeof(arguments[1][0][0][0]) == 'number') {
+            // Store the data set(s)
+            for (var i=0; i<arguments[1].length; ++i) {
+                this.data[i] = arguments[1][i];
+            }
+
+        // Handle multiple data sets being supplied as seperate arguments
+        } else {
+            // Store the data set(s)
+            for (var i=1; i<arguments.length; ++i) {
+                this.data[i - 1] = arguments[i];
+            }
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[SCATTER] No canvas support');
+            return;
+        }
+
+
+        /**
+        * Set the .getShape commonly named method
+        */
+        this.getShape = this.getPoint;
+    }
+
+
+    /**
+    * A simple setter
+    * 
+    * @param string name  The name of the property to set
+    * @param string value The value of the property
+    */
+    RGraph.Scatter.prototype.Set = function (name, value)
+    {
+        /**
+        * This is here because the key expects a name of "chart.colors"
+        */
+        if (name == 'chart.line.colors') {
+            this.properties['chart.colors'] = value;
+        }
+        
+        /**
+        * Allow compatibility with older property names
+        */
+        if (name == 'chart.tooltip.hotspot') {
+            name = 'chart.tooltips.hotspot';
+        }
+        
+        /**
+        * chart.yaxispos should be left or right
+        */
+        if (name == 'chart.yaxispos' && value != 'left' && value != 'right') {
+            alert("[SCATTER] chart.yaxispos should be left or right. You've set it to: '" + value + "' Changing it to left");
+            value = 'left';
+        }
+        
+        /**
+        * Check for xaxispos
+        */
+        if (name == 'chart.xaxispos' ) {
+            if (value != 'bottom' && value != 'center') {
+                alert('[SCATTER] (' + this.id + ') chart.xaxispos should be center or bottom. Tried to set it to: ' + value + ' Changing it to center');
+                value = 'center';
+            }
+        }
+
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A simple getter
+    * 
+    * @param string name  The name of the property to set
+    */
+    RGraph.Scatter.prototype.Get = function (name)
+    {
+        return this.properties[name];
+    }
+
+
+    /**
+    * The function you call to draw the line chart
+    */
+    RGraph.Scatter.prototype.Draw = function ()
+    {
+        // MUST be the first thing done!
+        if (typeof(this.Get('chart.background.image')) == 'string' && !this.__background_image__) {
+            RGraph.DrawBackgroundImage(this);
+            return;
+        }
+
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // Go through all the data points and see if a tooltip has been given
+        this.Set('chart.tooltips', false);
+        this.hasTooltips = false;
+        var overHotspot  = false;
+
+        // Reset the coords array
+        this.coords = [];
+
+        if (!RGraph.isIE8()) {
+            for (var i=0; i<this.data.length; ++i) {
+                for (var j =0;j<this.data[i].length; ++j) {
+                    if (this.data[i][j] && this.data[i][j][3] && typeof(this.data[i][j][3]) == 'string' && this.data[i][j][3].length) {
+                        this.Set('chart.tooltips', [1]); // An array
+                        this.hasTooltips = true;
+                    }
+                }
+            }
+        }
+
+        // Reset the maximum value
+        this.max = 0;
+
+        // Work out the maximum Y value
+        if (this.Get('chart.ymax') && this.Get('chart.ymax') > 0) {
+
+            this.scale = [];
+            this.max   = this.Get('chart.ymax');
+            this.min   = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0;
+
+            this.scale[0] = ((this.max - this.min) * (1/5)) + this.min;
+            this.scale[1] = ((this.max - this.min) * (2/5)) + this.min;
+            this.scale[2] = ((this.max - this.min) * (3/5)) + this.min;
+            this.scale[3] = ((this.max - this.min) * (4/5)) + this.min;
+            this.scale[4] = ((this.max - this.min) * (5/5)) + this.min;
+
+            var decimals = this.Get('chart.scale.decimals');
+
+            this.scale = [
+                          Number(this.scale[0]).toFixed(decimals),
+                          Number(this.scale[1]).toFixed(decimals),
+                          Number(this.scale[2]).toFixed(decimals),
+                          Number(this.scale[3]).toFixed(decimals),
+                          Number(this.scale[4]).toFixed(decimals)
+                         ];
+
+        } else {
+
+            var i = 0;
+            var j = 0;
+
+            for (i=0; i<this.data.length; ++i) {
+                for (j=0; j<this.data[i].length; ++j) {
+                    this.max = Math.max(this.max, typeof(this.data[i][j][1]) == 'object' ? RGraph.array_max(this.data[i][j][1]) : Math.abs(this.data[i][j][1]));
+                }
+            }
+
+            this.scale = RGraph.getScale(this.max, this);
+
+            this.max   = this.scale[4];
+            this.min   = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0;
+
+            if (this.min) {
+                this.scale[0] = ((this.max - this.min) * (1/5)) + this.min;
+                this.scale[1] = ((this.max - this.min) * (2/5)) + this.min;
+                this.scale[2] = ((this.max - this.min) * (3/5)) + this.min;
+                this.scale[3] = ((this.max - this.min) * (4/5)) + this.min;
+                this.scale[4] = ((this.max - this.min) * (5/5)) + this.min;
+            }
+
+
+            if (typeof(this.Get('chart.scale.decimals')) == 'number') {
+                var decimals = this.Get('chart.scale.decimals');
+    
+                this.scale = [
+                              Number(this.scale[0]).toFixed(decimals),
+                              Number(this.scale[1]).toFixed(decimals),
+                              Number(this.scale[2]).toFixed(decimals),
+                              Number(this.scale[3]).toFixed(decimals),
+                              Number(this.scale[4]).toFixed(decimals)
+                             ];
+            }
+        }
+
+        this.grapharea = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+        // Progressively Draw the chart
+        RGraph.background.Draw(this);
+
+        /**
+        * Draw any horizontal bars that have been specified
+        */
+        if (this.Get('chart.background.hbars') && this.Get('chart.background.hbars').length) {
+            RGraph.DrawBars(this);
+        }
+
+        /**
+        * Draw any vertical bars that have been specified
+        */
+        if (this.Get('chart.background.vbars') && this.Get('chart.background.vbars').length) {
+            this.DrawVBars();
+        }
+
+        if (!this.Get('chart.noaxes')) {
+            this.DrawAxes();
+        }
+
+        this.DrawLabels();
+
+        i = 0;
+        for(i=0; i<this.data.length; ++i) {
+            this.DrawMarks(i);
+
+            // Set the shadow
+            this.context.shadowColor   = this.Get('chart.line.shadow.color');
+            this.context.shadowOffsetX = this.Get('chart.line.shadow.offsetx');
+            this.context.shadowOffsetY = this.Get('chart.line.shadow.offsety');
+            this.context.shadowBlur    = this.Get('chart.line.shadow.blur');
+            
+            this.DrawLine(i);
+
+            // Turn the shadow off
+            RGraph.NoShadow(this);
+        }
+
+
+        if (this.Get('chart.line')) {
+            for (var i=0;i<this.data.length; ++i) {
+                this.DrawMarks(i); // Call this again so the tickmarks appear over the line
+            }
+        }
+
+
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * Install the event handler for tooltips
+        */
+        if (this.hasTooltips) {
+
+            /**
+            * Register all charts
+            */
+            RGraph.Register(this);
+
+            var overHotspot = false;
+
+            var canvas_onmousemove_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas      = e.target;
+                var obj         = canvas.__object__;
+                var context     = obj.context;
+                var mouseCoords = RGraph.getMouseXY(e);
+                var point       = obj.getPoint(e);
+                var overHotspot = false;
+
+                if (point) {
+
+                    var __dataset__ = point[2];
+                    var __index__   = point[3];
+                    var __text__    = point[4];
+                    var overHotspot = true;
+
+                    if (point[4]) {
+                        canvas.style.cursor = 'pointer';
+
+                        if (
+                            !RGraph.Registry.Get('chart.tooltip') ||
+                            RGraph.Registry.Get('chart.tooltip').__text__ != __text__ ||
+                            RGraph.Registry.Get('chart.tooltip').__index__ != __index__ ||
+                            RGraph.Registry.Get('chart.tooltip').__dataset__ != __dataset__
+                           ) {
+
+                            if (obj.Get('chart.tooltips.highlight')) {
+                                RGraph.Redraw();
+                            }
+    
+                            /**
+                            * Get the tooltip text
+                            */
+                            if (typeof(__text__) == 'function') {
+                                var text = String(__text__(i));
+    
+                            } else {
+                                var text = String(__text__);
+                            }
+    
+                            RGraph.Tooltip(canvas, text, e.pageX, e.pageY, __index__);
+                            
+                            RGraph.Registry.Get('chart.tooltip').__index__ = __index__;
+                            
+                            if (RGraph.Registry.Get('chart.tooltip')) {
+                                RGraph.Registry.Get('chart.tooltip').__dataset__ = __dataset__;
+                            }
+                                    
+                            /**
+                            * Draw a circle around the mark
+                            */
+                            if (obj.Get('chart.tooltips.highlight')) {
+                                context.beginPath();
+                                context.fillStyle = 'rgba(255,255,255,0.5)';
+                                context.arc(point[0], point[1], 3, 0, 6.28, 0);
+                                context.fill();
+                            }
+                        }
+                    }
+                }
+
+                /**
+                * Reset the pointer
+                */
+                if (!overHotspot || !point[4]) {
+                    canvas.style.cursor = 'default';
+                }
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+        }
+        
+        
+        /**
+        * Draw the key if necessary
+        */
+        if (this.Get('chart.key') && this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.line.colors'));
+        }
+
+
+        /**
+        * Draw " above" labels if enabled
+        */
+        if (this.Get('chart.labels.above')) {
+            this.DrawAboveLabels();
+        }
+
+        /**
+        * Draw the "in graph" labels, using the member function, NOT the shared function in RGraph.common.core.js
+        */
+        this.DrawInGraphLabels(this);
+
+
+        /**
+        * Draw crosschairs
+        */
+        RGraph.DrawCrosshairs(this);
+
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draws the axes of the scatter graph
+    */
+    RGraph.Scatter.prototype.DrawAxes = function ()
+    {
+        var canvas      = this.canvas;
+        var context     = this.context;
+        var graphHeight = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+        context.beginPath();
+        context.strokeStyle = this.Get('chart.axis.color');
+        context.lineWidth   = 1;
+
+        // Draw the Y axis
+        if (this.Get('chart.yaxispos') == 'left') {
+            context.moveTo(this.gutterLeft, this.gutterTop);
+            context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+        } else {
+            context.moveTo(RGraph.GetWidth(this) - this.gutterRight, this.gutterTop);
+            context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+        }
+
+
+        // Draw the X axis
+        if (this.Get('chart.xaxis')) {
+            if (this.Get('chart.xaxispos') == 'center') {
+                context.moveTo(this.gutterLeft, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2));
+                context.lineTo(RGraph.GetWidth(this) - this.gutterRight, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2));
+            } else {
+                context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+                context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+
+        /**
+        * Draw the Y tickmarks
+        */
+        for (y=this.gutterTop; y < RGraph.GetHeight(this) - this.gutterBottom + (this.Get('chart.xaxispos') == 'center' ? 1 : 0) ; y+=(graphHeight / 5) / 2) {
+
+            // This is here to accomodate the X axis being at the center
+            if (y == (this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2)) ) continue;
+
+            if (this.Get('chart.yaxispos') == 'left') {
+                context.moveTo(this.gutterLeft, y);
+                context.lineTo(this.gutterLeft - 3, y);
+            } else {
+                context.moveTo(RGraph.GetWidth(this) - this.gutterRight +3, y);
+                context.lineTo(RGraph.GetWidth(this) - this.gutterRight, y);
+            }
+        }
+
+
+        /**
+        * Draw the X tickmarks
+        */
+        if (this.Get('chart.xticks') && this.Get('chart.xaxis')) {
+
+            var x  = 0;
+            var y  =  (this.Get('chart.xaxispos') == 'center') ? this.gutterTop + (this.grapharea / 2): (this.canvas.height - this.gutterBottom);
+            this.xTickGap = (this.Get('chart.labels') && this.Get('chart.labels').length) ? ((this.canvas.width - this.gutterLeft - this.gutterRight ) / this.Get('chart.labels').length) : (this.canvas.width - this.gutterLeft - this.gutterRight) / 10;
+
+            for (x =  (this.gutterLeft + (this.Get('chart.yaxispos') == 'left' ? this.xTickGap : 0) );
+                 x <= (this.canvas.width - this.gutterRight - (this.Get('chart.yaxispos') == 'left' ? 0 : 1));
+                 x += this.xTickGap) {
+
+                if (this.Get('chart.yaxispos') == 'left' && this.Get('chart.noendxtick') == true && x == (RGraph.GetWidth(this) - this.gutterLeft) ) {
+                    continue;
+                } else if (this.Get('chart.yaxispos') == 'right' && this.Get('chart.noendxtick') == true && x == this.gutterLeft) {
+                    continue;
+                }
+
+                context.moveTo(x, y - (this.Get('chart.xaxispos') == 'center' ? 3 : 0));
+                context.lineTo(x, y + 3);
+            }
+        }
+
+        context.stroke();
+    }
+
+
+
+
+
+
+
+
+
+
+
+    /**
+    * Draws the labels on the scatter graph
+    */
+    RGraph.Scatter.prototype.DrawLabels = function ()
+    {
+        this.context.fillStyle = this.Get('chart.text.color');
+        var font       = this.Get('chart.text.font');
+        var xMin       = this.Get('chart.xmin');
+        var xMax       = this.Get('chart.xmax');
+        var yMax       = this.scale[4];
+        var yMin       = this.Get('chart.ymin');
+        var text_size  = this.Get('chart.text.size');
+        var units_pre  = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+        var numYLabels = this.Get('chart.ylabels.count');
+        var invert     = this.Get('chart.ylabels.invert');
+        var context    = this.context;
+        var canvas     = this.canvas;
+
+        this.halfTextHeight = text_size / 2;
+
+            
+        this.halfGraphHeight = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / 2;
+
+        /**
+        * Draw the Y yaxis labels, be it at the top or center
+        */
+        if (this.Get('chart.ylabels')) {
+
+            var xPos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : RGraph.GetWidth(this) - this.gutterRight + 5;
+            var align = this.Get('chart.yaxispos') == 'right' ? 'left' : 'right';
+
+            if (this.Get('chart.xaxispos') == 'center') {
+
+
+                /**
+                * Specific Y labels
+                */
+                if (typeof(this.Get('chart.ylabels.specific')) == 'object') {
+                
+                    var labels = this.Get('chart.ylabels.specific');
+                
+                    for (var i=0; i<this.Get('chart.ylabels.specific').length; ++i) {
+                        var y = this.gutterTop + (i * (this.grapharea / (labels.length * 2) ) );
+                        RGraph.Text(context, font, text_size, xPos, y, labels[i], 'center', align);
+                    }
+                    
+                    var reversed_labels = RGraph.array_reverse(labels);
+                
+                    for (var i=0; i<reversed_labels.length; ++i) {
+                        var y = this.gutterTop + (this.grapharea / 2) + ((i+1) * (this.grapharea / (labels.length * 2) ) );
+                        
+                        RGraph.Text(context, font, text_size, xPos, y, reversed_labels[i], 'center', align);
+                    }
+                
+                    return;
+                }
+
+
+                if (numYLabels == 1 || numYLabels == 3 || numYLabels == 5) {
+                    // Draw the top halves labels
+                    RGraph.Text(context, font, text_size, xPos, this.gutterTop, RGraph.number_format(this, this.scale[4], units_pre, units_post), 'center', align);
+                    
+                    
+                    if (numYLabels >= 5) {
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/10) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align);
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/10) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align);
+                    }
+        
+                    if (numYLabels >= 3) {
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/10) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align);
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/10) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align);
+                    }
+                    
+                    // Draw the bottom halves labels
+                    if (numYLabels >= 3) {
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align);
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align);
+                    }
+        
+                    if (numYLabels == 5) {
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align);
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align);
+                    }
+        
+                    RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (5/10) ) + this.halfGraphHeight, '-' + RGraph.number_format(this, this.scale[4], units_pre, units_post), 'center', align);
+                
+                } else if (numYLabels == 10) {
+                    // 10 Y labels
+                    var interval = (this.grapharea / numYLabels) / 2;
+                
+                    for (var i=0; i<numYLabels; ++i) {
+                        RGraph.Text(context, font, text_size, xPos,this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (i/20) ),RGraph.number_format(this,
+                        
+                        (this.max - (this.max * (i/10))).toFixed(this.Get('chart.scale.decimals')),
+                        
+                        units_pre, units_post),'center', align);
+                        RGraph.Text(context, font, text_size, xPos,this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (i/20) ) + (this.grapharea / 2) + (this.grapharea / 20),'-' + RGraph.number_format(this, ((this.max * (i/10)) + (this.max * (1/10))).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post), 'center', align);
+                    }
+
+                } else {
+                    alert('[SCATTER SCALE] Number of Y labels can be 1/3/5/10 only');
+                }
+    
+            } else {
+                
+                var xPos  = this.Get('chart.yaxispos') == 'left' ? this.gutterLeft - 5 : RGraph.GetWidth(this) - this.gutterRight + 5;
+                var align = this.Get('chart.yaxispos') == 'right' ? 'left' : 'right';
+
+                /**
+                * Specific Y labels
+                */
+                if (typeof(this.Get('chart.ylabels.specific')) == 'object' && this.Get('chart.ylabels.specific')) {
+
+                    var labels = this.Get('chart.ylabels.specific');
+
+                    for (var i=0; i<this.Get('chart.ylabels.specific').length; ++i) {
+                        var y = this.gutterTop + (i * (this.grapharea / labels.length) );
+                        
+                        RGraph.Text(context, font, text_size, xPos, y, labels[i], 'center', align);
+                    }
+
+                    return;
+                }
+
+                if (numYLabels == 1 || numYLabels == 3 || numYLabels == 5) {
+                    if (invert) {
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop, RGraph.number_format(this, 0, units_pre, units_post), 'center', align);
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (5/5) ), RGraph.number_format(this, this.scale[4], units_pre, units_post), 'center', align);
+        
+                        if (numYLabels >= 5) {
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/5) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align);
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/5) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align);
+                        }
+        
+                        if (numYLabels >= 3) {
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/5) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align);
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/5) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align);
+                        }
+                    } else {
+                        RGraph.Text(context, font, text_size, xPos, this.gutterTop, RGraph.number_format(this, this.scale[4], units_pre, units_post), 'center', align);
+        
+                        if (numYLabels >= 5) {
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (1/5) ), RGraph.number_format(this, this.scale[3], units_pre, units_post), 'center', align);
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (3/5) ), RGraph.number_format(this, this.scale[1], units_pre, units_post), 'center', align);
+                        }
+        
+                        if (numYLabels >= 3) {
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (2/5) ), RGraph.number_format(this, this.scale[2], units_pre, units_post), 'center', align);
+                            RGraph.Text(context, font, text_size, xPos, this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * (4/5) ), RGraph.number_format(this, this.scale[0], units_pre, units_post), 'center', align);
+                        }
+                    }
+                } else if (numYLabels == 10) {
+                    var interval = (this.grapharea / numYLabels) / 2;
+                    if (invert) {
+                        for (var i=numYLabels; i>=0; --i) {
+                            RGraph.Text(context, font, text_size, xPos,this.gutterTop + ((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) * ((10-i)/10) ),
+                            
+                            RGraph.number_format(this,(this.max - (this.max * (i/10))).toFixed((this.Get('chart.scale.decimals'))), units_pre, units_post),
+                            
+                            'center', align);
+                        }
+                    } else {
+                        // 10 Y labels
+                        for (var i=0; i<numYLabels; ++i) {
+
+                            RGraph.Text(context, font, text_size, xPos,this.gutterTop + ((this.canvas.height - this.gutterTop - this.gutterBottom) * (i/10) ),
+
+                            RGraph.number_format(this,
+                                                 (this.max - ((this.max - this.min) * (i/10))).toFixed((this.Get('chart.scale.decimals'))),
+                                                 units_pre,
+                                                 units_post),
+                            'center', align);
+                        }
+                    }
+                } else {
+                    alert('[SCATTER SCALE] Number of Y labels can be 1/3/5/10 only');
+                }
+                
+                if (this.Get('chart.ymin')) {
+                    RGraph.Text(context, font, text_size, xPos, this.canvas.height - this.gutterBottom,RGraph.number_format(this, this.Get('chart.ymin').toFixed(this.Get('chart.scale.decimals')), units_pre, units_post),'center', align);
+                }
+            }
+        }
+
+
+
+
+
+
+        // Put the text on the X axis
+        var graphArea = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        var xInterval = graphArea / this.Get('chart.labels').length;
+        var xPos      = this.gutterLeft;
+        var yPos      = (RGraph.GetHeight(this) - this.gutterBottom) + 15;
+        var labels    = this.Get('chart.labels');
+
+        /**
+        * Text angle
+        */
+        var angle  = 0;
+        var valign = null;
+        var halign = 'center';
+
+        if (this.Get('chart.text.angle') > 0) {
+            angle  = -1 * this.Get('chart.text.angle');
+            valign = 'center';
+            halign = 'right';
+            yPos -= 10;
+        }
+
+        for (i=0; i<labels.length; ++i) {
+            
+            if (typeof(labels[i]) == 'object') {
+            
+                if (this.Get('chart.labels.specific.align') == 'center') {
+                    var rightEdge = 0;
+
+                    if (labels[i+1] && labels[i+1][1]) {
+                        rightEdge = labels[i+1][1];
+                    } else {
+                        rightEdge = this.Get('chart.xmax');
+                    }
+                    
+                    var offset = (rightEdge - labels[i][1]) / 2;
+
+                } else {
+                    var offset = 0;
+                }
+            
+
+                RGraph.Text(context,
+                            font,
+                            this.Get('chart.text.size'),
+                            this.gutterLeft + (graphArea * ((labels[i][1] - xMin + offset) / (this.Get('chart.xmax') - xMin))) + 5,
+                            yPos,
+                            String(labels[i][0]),
+                            valign,
+                            angle != 0 ? 'right' : (this.Get('chart.labels.specific.align') == 'center' ? 'center' : 'left'),
+                            null,
+                            angle
+                           );
+                
+                /**
+                * Draw the gray indicator line
+                */
+                this.context.beginPath();
+                    this.context.strokeStyle = '#bbb';
+                    this.context.moveTo(this.gutterLeft + (graphArea * ((labels[i][1] - xMin)/ (this.Get('chart.xmax') - xMin))), RGraph.GetHeight(this) - this.gutterBottom);
+                    this.context.lineTo(this.gutterLeft + (graphArea * ((labels[i][1] - xMin)/ (this.Get('chart.xmax') - xMin))), RGraph.GetHeight(this) - this.gutterBottom + 20);
+                this.context.stroke();
+            
+            } else {
+                RGraph.Text(context, font, this.Get('chart.text.size'), xPos + (this.xTickGap / 2), yPos, String(labels[i]), valign, halign, null, angle);
+            }
+            
+            // Do this for the next time around
+            xPos += xInterval;
+        }
+
+        /**
+        * Draw the final indicator line
+        */
+        if (typeof(labels[0]) == 'object') {
+            this.context.beginPath();
+                this.context.strokeStyle = '#bbb';
+                this.context.moveTo(this.gutterLeft + graphArea, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(this.gutterLeft + graphArea, RGraph.GetHeight(this) - this.gutterBottom + 20);
+            this.context.stroke();
+        }
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    /**
+    * Draws the actual scatter graph marks
+    * 
+    * @param i integer The dataset index
+    */
+    RGraph.Scatter.prototype.DrawMarks = function (i)
+    {
+        /**
+        *  Reset the coords array
+        */
+        this.coords[i] = [];
+
+        /**
+        * Plot the values
+        */
+        var xmax          = this.Get('chart.xmax');
+        var default_color = this.Get('chart.defaultcolor');
+
+        for (var j=0; j<this.data[i].length; ++j) {
+            /**
+            * This is here because tooltips are optional
+            */
+            var data_point = this.data[i];
+
+            var xCoord = data_point[j][0];
+            var yCoord = data_point[j][1];
+            var color  = data_point[j][2] ? data_point[j][2] : default_color;
+            var tooltip = (data_point[j] && data_point[j][3]) ? data_point[j][3] : null;
+
+            
+            this.DrawMark(
+                          i,
+                          xCoord,
+                          yCoord,
+                          xmax,
+                          this.scale[4],
+                          color,
+                          tooltip,
+                          this.coords[i],
+                          data_point
+                         );
+        }
+    }
+
+
+    /**
+    * Draws a single scatter mark
+    */
+    RGraph.Scatter.prototype.DrawMark = function (index, x, y, xMax, yMax, color, tooltip, coords, data)
+    {
+        /**
+        * Inverted Y scale handling
+        */
+        if (this.Get('chart.ylabels.invert')) {
+            if (typeof(y) == 'number') {
+                y = yMax - y;
+            }
+        }
+
+        var tickmarks = this.Get('chart.tickmarks');
+        var tickSize  = this.Get('chart.ticksize');
+        var xMin      = this.Get('chart.xmin');
+        var x = ((x - xMin) / (xMax - xMin)) * (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight);
+        var originalX = x;
+        var originalY = y;
+        
+        
+        /**
+        * This allows chart.tickmarks to be an array
+        */
+
+        if (tickmarks && typeof(tickmarks) == 'object') {
+            tickmarks = tickmarks[index];
+        }
+
+
+        /**
+        * This allows chart.ticksize to be an array
+        */
+        if (typeof(tickSize) == 'object') {
+            var tickSize     = tickSize[index];
+            var halfTickSize = tickSize / 2;
+        } else {
+            var halfTickSize = tickSize / 2;
+        }
+
+
+        /**
+        * This bit is for boxplots only
+        */
+        if (   typeof(y) == 'object'
+            && typeof(y[0]) == 'number'
+            && typeof(y[1]) == 'number'
+            && typeof(y[2]) == 'number'
+            && typeof(y[3]) == 'number'
+            && typeof(y[4]) == 'number'
+           ) {
+
+            var yMin = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0;
+            this.Set('chart.boxplot', true);
+            this.graphheight = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+            
+            if (this.Get('chart.xaxispos') == 'center') {
+                this.graphheight /= 2;
+            }
+
+            var y0 = (this.graphheight) - ((y[4] - yMin) / (yMax - yMin)) * (this.graphheight);
+            var y1 = (this.graphheight) - ((y[3] - yMin) / (yMax - yMin)) * (this.graphheight);
+            var y2 = (this.graphheight) - ((y[2] - yMin) / (yMax - yMin)) * (this.graphheight);
+            var y3 = (this.graphheight) - ((y[1] - yMin) / (yMax - yMin)) * (this.graphheight);
+            var y4 = (this.graphheight) - ((y[0] - yMin) / (yMax - yMin)) * (this.graphheight);
+            
+            /**
+            * Inverted labels
+            */
+            if (this.Get('chart.ylabels.invert')) {
+                y0 = this.graphheight - y0;
+                y1 = this.graphheight - y1;
+                y2 = this.graphheight - y2;
+                y3 = this.graphheight - y3;
+                y4 = this.graphheight - y4;
+            }
+
+            var col1  = y[5];
+            var col2  = y[6];
+
+            // Override the boxWidth
+            if (typeof(y[7]) == 'number') {
+                var boxWidth = y[7];
+            }
+            
+            var y = this.graphheight - y2;
+
+        } else {
+            var yMin = this.Get('chart.ymin') ? this.Get('chart.ymin') : 0;
+            var y = (( (y - yMin) / (yMax - yMin)) * (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom));
+        }
+
+        /**
+        * Account for the X axis being at the centre
+        */
+        if (this.Get('chart.xaxispos') == 'center') {
+            y /= 2;
+            y += this.halfGraphHeight;
+        }
+
+        // This is so that points are on the graph, and not the gutter
+        x += this.gutterLeft;
+        y = RGraph.GetHeight(this) - this.gutterBottom - y;
+
+        this.context.beginPath();
+        
+        // Color
+        this.context.strokeStyle = color;
+
+        /**
+        * Boxplots
+        */
+        if (   this.Get('chart.boxplot')
+            && typeof(y0) == 'number'
+            && typeof(y1) == 'number'
+            && typeof(y2) == 'number'
+            && typeof(y3) == 'number'
+            && typeof(y4) == 'number'
+           ) {
+
+            var boxWidth = boxWidth ? boxWidth : this.Get('chart.boxplot.width');
+            var halfBoxWidth = boxWidth / 2;
+
+            this.context.beginPath();
+
+            // Draw the upper coloured box if a value is specified
+            if (col1) {
+                this.context.fillStyle = col1;
+                this.context.fillRect(x - halfBoxWidth, y1 + this.gutterTop, boxWidth, y2 - y1);
+            }
+
+            // Draw the lower coloured box if a value is specified
+            if (col2) {
+                this.context.fillStyle = col2;
+                this.context.fillRect(x - halfBoxWidth, y2 + this.gutterTop, boxWidth, y3 - y2);
+            }
+
+            this.context.strokeRect(x - halfBoxWidth, y1 + this.gutterTop, boxWidth, y3 - y1);
+            this.context.stroke();
+
+            // Now draw the whiskers
+            this.context.beginPath();
+            this.context.moveTo(x - halfBoxWidth, y0 + this.gutterTop);
+            this.context.lineTo(x + halfBoxWidth, y0 + this.gutterTop);
+
+            this.context.moveTo(x, y0 + this.gutterTop);
+            this.context.lineTo(x, y1 + this.gutterTop);
+
+            this.context.moveTo(x - halfBoxWidth, y4 + this.gutterTop);
+            this.context.lineTo(x + halfBoxWidth, y4 + this.gutterTop);
+
+            this.context.moveTo(x, y4 + this.gutterTop);
+            this.context.lineTo(x, y3 + this.gutterTop);
+
+            this.context.stroke();
+        }
+
+
+        /**
+        * Draw the tickmark, but not for boxplots
+        */
+        if (!y0 && !y1 && !y2 && !y3 && !y4) {
+            
+            this.graphheight = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+
+            
+            if (tickmarks == 'circle') {
+                this.context.arc(x, y, halfTickSize, 0, 6.28, 0);
+                this.context.fillStyle = color;
+                this.context.fill();
+            
+            } else if (tickmarks == 'plus') {
+
+                this.context.moveTo(x, y - halfTickSize);
+                this.context.lineTo(x, y + halfTickSize);
+                this.context.moveTo(x - halfTickSize, y);
+                this.context.lineTo(x + halfTickSize, y);
+                this.context.stroke();
+            
+            } else if (tickmarks == 'square') {
+                this.context.strokeStyle = color;
+                this.context.fillStyle = color;
+                this.context.fillRect(
+                                      x - halfTickSize,
+                                      y - halfTickSize,
+                                      tickSize,
+                                      tickSize
+                                     );
+                //this.context.fill();
+
+            } else if (tickmarks == 'cross') {
+
+                this.context.moveTo(x - halfTickSize, y - halfTickSize);
+                this.context.lineTo(x + halfTickSize, y + halfTickSize);
+                this.context.moveTo(x + halfTickSize, y - halfTickSize);
+                this.context.lineTo(x - halfTickSize, y + halfTickSize);
+                
+                this.context.stroke();
+            
+            /**
+            * Diamond shape tickmarks
+            */
+            } else if (tickmarks == 'diamond') {
+                this.context.fillStyle = this.context.strokeStyle;
+
+                this.context.moveTo(x, y - halfTickSize);
+                this.context.lineTo(x + halfTickSize, y);
+                this.context.lineTo(x, y + halfTickSize);
+                this.context.lineTo(x - halfTickSize, y);
+                this.context.lineTo(x, y - halfTickSize);
+                
+                this.context.fill();
+                this.context.stroke();
+
+            /**
+            * Custom tickmark style
+            */
+            } else if (typeof(tickmarks) == 'function') {
+
+                var graphWidth = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight
+                var xVal = ((x - this.gutterLeft) / graphWidth) * xMax;
+                var yVal = ((this.graphheight - (y - this.gutterTop)) / this.graphheight) * yMax;
+
+                tickmarks(this, data, x, y, xVal, yVal, xMax, yMax, color)
+
+            /**
+            * No tickmarks
+            */
+            } else if (tickmarks == null) {
+    
+            /**
+            * Unknown tickmark type
+            */
+            } else {
+                alert('[SCATTER] (' + this.id + ') Unknown tickmark style: ' + tickmarks );
+            }
+        }
+
+        /**
+        * Add the tickmark to the coords array
+        */
+        coords.push([x, y, tooltip]);
+    }
+    
+    
+    /**
+    * Draws an optional line connecting the tick marks.
+    * 
+    * @param i The index of the dataset to use
+    */
+    RGraph.Scatter.prototype.DrawLine = function (i)
+    {
+        if (this.Get('chart.line') && this.coords[i].length >= 2) {
+
+            this.context.lineCap     = 'round';
+            this.context.lineJoin    = 'round';
+            this.context.lineWidth   = this.GetLineWidth(i);// i is the index of the set of coordinates
+            this.context.strokeStyle = this.Get('chart.line.colors')[i];
+            this.context.beginPath();
+            
+            var len = this.coords[i].length;
+
+            for (var j=0; j<this.coords[i].length; ++j) {
+
+                var xPos = this.coords[i][j][0];
+                var yPos = this.coords[i][j][1];
+
+                if (j == 0) {
+                    this.context.moveTo(xPos, yPos);
+                } else {
+                
+                    // Stepped?
+                    var stepped = this.Get('chart.line.stepped');
+
+                    if (   (typeof(stepped) == 'boolean' && stepped)
+                        || (typeof(stepped) == 'object' && stepped[i])
+                       ) {
+                        this.context.lineTo(this.coords[i][j][0], this.coords[i][j - 1][1]);
+                    }
+
+                    this.context.lineTo(xPos, yPos);
+                }
+            }
+            
+            this.context.stroke();
+        }
+        
+        /**
+        * Set the linewidth back to 1
+        */
+        this.context.lineWidth = 1;
+    }
+
+
+    /**
+    * Returns the linewidth
+    * 
+    * @param number i The index of the "line" (/set of coordinates)
+    */
+    RGraph.Scatter.prototype.GetLineWidth = function (i)
+    {
+        var linewidth = this.Get('chart.line.linewidth');
+        
+        if (typeof(linewidth) == 'number') {
+            return linewidth;
+        
+        } else if (typeof(linewidth) == 'object') {
+            if (linewidth[i]) {
+                return linewidth[i];
+            } else {
+                return linewidth[0];
+            }
+
+            alert('[SCATTER] Error! chart.linewidth should be a single number or an array of one or more numbers');
+        }
+    }
+
+
+    /**
+    * Draws vertical bars. Line chart doesn't use a horizontal scale, hence this function
+    * is not common
+    */
+    RGraph.Scatter.prototype.DrawVBars = function ()
+    {
+        var canvas  = this.canvas;
+        var context = this.context;
+        var vbars = this.Get('chart.background.vbars');
+        var graphWidth = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        
+        if (vbars) {
+        
+            var xmax = this.Get('chart.xmax');
+
+            for (var i=0; i<vbars.length; ++i) {
+                var startX = ((vbars[i][0] / xmax) * graphWidth) + this.gutterLeft;
+                var width  = (vbars[i][1] / xmax) * graphWidth;
+
+                context.beginPath();
+                    context.fillStyle = vbars[i][2];
+                    context.fillRect(startX, this.gutterTop, width, (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom));
+                context.fill();
+            }
+        }
+    }
+
+
+
+
+
+    /**
+    * Draws in-graph labels.
+    * 
+    * @param object obj The graph object
+    */
+    RGraph.Scatter.prototype.DrawInGraphLabels = function (obj)
+    {
+        var canvas  = obj.canvas;
+        var context = obj.context;
+        var labels  = obj.Get('chart.labels.ingraph');
+        var labels_processed = [];
+
+        // Defaults
+        var fgcolor   = 'black';
+        var bgcolor   = 'white';
+        var direction = 1;
+
+        if (!labels) {
+            return;
+        }
+
+        /**
+        * Preprocess the labels array. Numbers are expanded
+        */
+        for (var i=0; i<labels.length; ++i) {
+            if (typeof(labels[i]) == 'number') {
+                for (var j=0; j<labels[i]; ++j) {
+                    labels_processed.push(null);
+                }
+            } else if (typeof(labels[i]) == 'string' || typeof(labels[i]) == 'object') {
+                labels_processed.push(labels[i]);
+            
+            } else {
+                labels_processed.push('');
+            }
+        }
+
+        /**
+        * Turn off any shadow
+        */
+        RGraph.NoShadow(obj);
+
+        if (labels_processed && labels_processed.length > 0) {
+
+            var i=0;
+
+            for (var set=0; set<obj.coords.length; ++set) {
+                for (var point = 0; point<obj.coords[set].length; ++point) {
+                    if (labels_processed[i]) {
+                        var x = obj.coords[set][point][0];
+                        var y = obj.coords[set][point][1];
+                        var length = typeof(labels_processed[i][4]) == 'number' ? labels_processed[i][4] : 25;
+                            
+                        var text_x = x;
+                        var text_y = y - 5 - length;
+
+                        context.moveTo(x, y - 5);
+                        context.lineTo(x, y - 5 - length);
+                        
+                        context.stroke();
+                        context.beginPath();
+                        
+                        // This draws the arrow
+                        context.moveTo(x, y - 5);
+                        context.lineTo(x - 3, y - 10);
+                        context.lineTo(x + 3, y - 10);
+                        context.closePath();
+
+
+                        context.beginPath();
+                            
+                            // Fore ground color
+                            context.fillStyle = (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][1]) == 'string') ? labels_processed[i][1] : 'black';
+
+                            RGraph.Text(context,
+                                        obj.Get('chart.text.font'),
+                                        obj.Get('chart.text.size'),
+                                        text_x,
+                                        text_y,
+                                        (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][0]) == 'string') ? labels_processed[i][0] : labels_processed[i],
+                                        'bottom',
+                                        'center',
+                                        true,
+                                        null,
+                                        (typeof(labels_processed[i]) == 'object' && typeof(labels_processed[i][2]) == 'string') ? labels_processed[i][2] : 'white');
+                        context.fill();
+                    }
+                    
+                    i++;
+                }
+            }
+        }
+    }
+
+
+    /**
+    * This function makes it much easier to get the (if any) point that is currently being hovered over.
+    * 
+    * @param object e The event object
+    */
+    RGraph.Scatter.prototype.getPoint = function (e)
+    {
+        var canvas      = e.target;
+        var obj         = canvas.__object__;
+        var context     = obj.context;
+        var context     = obj.context;
+        var mouseXY     = RGraph.getMouseXY(e);
+        var mouseX      = mouseXY[0];
+        var mouseY      = mouseXY[1];
+        var overHotspot = false;
+        var offset = obj.Get('chart.tooltips.hotspot'); // This is how far the hotspot extends
+
+        for (var set=0; set<obj.coords.length; ++set) {
+            for (var i=0; i<obj.coords[set].length; ++i) {
+                
+                var xCoord = obj.coords[set][i][0];
+                var yCoord = obj.coords[set][i][1];
+
+                if (mouseX <= (xCoord + offset) &&
+                    mouseX >= (xCoord - offset) &&
+                    mouseY <= (yCoord + offset) &&
+                    mouseY >= (yCoord - offset)) {
+                    
+                    return [xCoord, yCoord, set, i, obj.data[set][i][3]];
+                }
+            }
+        }
+    }
+
+
+    /**
+    * Draws the above line labels
+    */
+    RGraph.Scatter.prototype.DrawAboveLabels = function ()
+    {
+        var context    = this.context;
+        var size       = this.Get('chart.labels.above.size');
+        var font       = this.Get('chart.text.font');
+        var units_pre  = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+
+
+        for (var set=0; set<this.coords.length; ++set) {
+            for (var point=0; point<this.coords[set].length; ++point) {
+                
+                var x_val = this.data[set][point][0];
+                var y_val = this.data[set][point][1];
+                
+                
+                var x_pos = this.coords[set][point][0];
+                var y_pos = this.coords[set][point][1];
+
+                RGraph.Text(context,
+                            font,
+                            size,
+                            x_pos,
+                            y_pos - 5 - size,
+                            x_val.toFixed(this.Get('chart.labels.above.decimals')) + ', ' + y_val.toFixed(this.Get('chart.labels.above.decimals')),
+                            'center',
+                            'center',
+                            true,
+                            null,
+                            'rgba(255, 255, 255, 0.7)');
+            }
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.skeleton.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.skeleton.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.skeleton.js	(revision 225)
@@ -0,0 +1,323 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+
+
+
+    /**
+    * This is the RGraph.skeleton.js file which you can use as a base for creating new graph types.
+    */
+
+
+
+    
+    /**
+    * Having this here means that the RGraph libraries can be included in any order, instead of you having
+    * to include the common core library first.
+    */
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+
+
+
+    /**
+    * The chart constructor. This function sets up the object. It takes the ID (the HTML attribute) of the canvas as the
+    * first argument and the data as the second. If you need to change this, you can.
+    * 
+    * @param string id    The canvas tag ID
+    * @param array  data  The chart data
+    */
+    RGraph.Skeleton = function (id, data)
+    {
+        /**
+        * Set these as object properties so they don't have to be constantly retrieved. Note that using a dollar
+        * function - $() - can cause conflicts with popular javascript libraries, eg jQuery. It's therefore best
+        * to stick to document.getElementById(). Setting the canvas and context as object properties means you
+        * can reference them like this: myObj.canvas
+        *                               myObj.context
+        */
+        this.id      = id;
+        this.canvas  = document.getElementById(id);
+        this.context = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+
+        /**
+        * This puts a reference to this object on to the canvas. Useful in event handling.
+        */
+        this.canvas.__object__ = this;
+
+        /**
+        * This defines the type of this graph type and should be a one word description.
+        */
+        this.type = 'skeleton';
+
+        /**
+        * This facilitates easy object identification, and should be true
+        */
+        this.isRGraph = true;
+
+        /**
+        * This does a few things, for example adding the .fillText() method to the canvas 2D context when
+        * it doesn't exist. This facilitates the graphs to be still shown in older browser (though without
+        * text obviously). You'll find the function in RGraph.common.core.js
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        /**
+        * Some example background properties, as used by the method RGraph.background.Draw()
+        */
+        this.properties = {
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.colors':                 ['red','blue'],
+            'chart.background.barcolor1':   'rgba(0,0,0,0)',
+            'chart.background.barcolor2':   'rgba(0,0,0,0)',
+            'chart.background.grid':        true,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.width':  1,
+            'chart.background.grid.hsize':  20,
+            'chart.background.grid.vsize':  20,
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':false,
+            'chart.background.grid.autofit.align':false,
+            'chart.background.grid.autofit.numhlines': 7,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.contextmenu':            null,
+            'chart.labels':                 null,
+            'chart.labels.ingraph':         null,
+            'chart.labels.above':           false,
+            'chart.labels.above.decimals':  0,
+            'chart.labels.above.size':      null,
+            'chart.scale.decimals':         0,
+            'chart.scale.point':            '.',
+            'chart.scale.thousand':         ',',
+            'chart.crosshairs':             false,
+            'chart.crosshairs.color':       '#333',
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.key':                    null,
+            'chart.key.background':         'white',
+            'chart.key.position':           'graph',
+            'chart.key.shadow':             false,
+            'chart.key.shadow.color':       '#666',
+            'chart.key.shadow.blur':        3,
+            'chart.key.shadow.offsetx':     2,
+            'chart.key.shadow.offsety':     2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':         null,
+            'chart.key.position.y':         null,
+            'chart.key.color.shape':        'square',
+            'chart.key.rounded':            true,
+            'chart.key.linewidth':          1,
+            'chart.title':                  '',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.xaxis':            '',
+            'chart.title.yaxis':            '',
+            'chart.title.xaxis.pos':        0.25,
+            'chart.title.yaxis.pos':        0.25,
+            'chart.title.yaxis.position':   'left',
+            'chart.text.color':             'black',
+            'chart.text.size':              10,
+            'chart.text.angle':             0,
+            'chart.text.font':              'Verdana',
+            'chart.resizable':              false,
+            'chart.resize.handle.background': null,
+            'chart.adjustable':             false,
+            'chart.hmargin':                5,
+            'chart.shadow':                 false,
+            'chart.shadow.color':           '#666',
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.shadow.blur':            3,
+            'chart.tooltips':               null,
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+            'chart.tooltips.event':         'onclick',
+            'chart.tooltips.highlight':     true
+        }
+
+        /**
+        * A simple check that the browser has canvas support
+        */
+        if (!this.canvas) {
+            alert('[SKELETON] No canvas support');
+            return;
+        }
+
+        /**
+        * Store the data that was passed to this constructor
+        */
+        this.data = data;
+        
+        /**
+        * This can be used to store the coordinates of shapes on the graph
+        */
+        this.coords = [];
+        
+        
+        /**
+        * If you add a .get*(e) method to ease getting the shape that's currently being hovered over
+        * or has been clicked on (in the same vein as the Bar charts .getBar() method or the Line charts
+        * .getPoint() method) then you should set this so that common methods have a common function
+        * name to call - for example the context menu uses the common name .getShape(e) to add the
+        * details to the context menu.
+        */
+        this.getShape = this.getXXX;
+    }
+
+
+
+
+    /**
+    * A setter method for setting graph properties. It can be used like this: obj.Set('chart.background.grid', false);
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Skeleton.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+
+
+    /**
+    * A getter method for retrieving graph properties. It can be used like this: obj.Get('chart.background.grid');
+    * This can be used inside your methods that draw the graph.
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Skeleton.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+
+
+
+    /**
+    * The function you call to draw the chart after you have set all of the graph properties
+    */
+    RGraph.Skeleton.prototype.Draw = function ()
+    {
+        /**
+        * This draws the background image, which when loaded draws the graph, hence the return
+        */
+        if (typeof(this.Get('chart.background.image')) == 'string' && !this.__background_image__) {
+            RGraph.DrawBackgroundImage(this);
+            return;
+        }
+
+        /**
+        * Fire the custom RGraph onbeforedraw event (which should be fired before the chart is drawn)
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+
+
+
+
+        /*************************
+        * Draw the chart here... *
+        *************************/
+
+
+
+
+        /**
+        * These call common functions, that facilitate some of RGraphs features
+        */
+
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * Draw "in graph" labels
+        */
+        if (this.Get('chart.labels.ingraph')) {
+            RGraph.DrawInGraphLabels(this);
+        }
+        
+        /**
+        * Draw crosschairs
+        */
+        if (this.Get('chart.crosshairs')) {
+            RGraph.DrawCrosshairs(this);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+
+
+        /**
+        * This function enables adjusting
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+
+        /**
+        * Fire the custom RGraph ondraw event (which should be fired when you have drawn the chart)
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.thermometer.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.thermometer.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.thermometer.js	(revision 225)
@@ -0,0 +1,351 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The chart constructor. This function sets up the object. It takes the ID (the HTML attribute) of the canvas as the
+    * first argument and the data as the second. If you need to change this, you can.
+    * 
+    * @param string id    The canvas tag ID
+    * @param number min   The minimum value
+    * @param number max   The maximum value
+    * @param number value The value reported by the thermometer
+    */
+    RGraph.Thermometer = function (id, min, max, value)
+    {
+        this.id      = id;
+        this.canvas  = document.getElementById(id);
+        this.context = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+
+        this.type      = 'thermometer';
+        this.isRGraph  = true;
+        this.min       = min;
+        this.max       = max;
+        this.value     = value;
+        this.coords    = [];
+        this.graphArea = [];
+
+        RGraph.OldBrowserCompat(this.context);
+
+        this.properties = {
+            'chart.colors':                 ['red'],
+            'chart.gutter.left':            15,
+            'chart.gutter.right':           15,
+            'chart.gutter.top':             15,
+            'chart.gutter.bottom':          15,
+            'chart.ticksize':               5,
+            'chart.text.font':              'Verdana',
+            'chart.text.size':              10,
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+            'chart.title':                  '',
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.side':             '',
+            'chart.shadow':                 true,
+            'chart.shadow.offsetx':         0,
+            'chart.shadow.offsety':         0,
+            'chart.shadow.blur':            15,
+            'chart.shadow.color':           'gray',
+            'chart.resizable':              false,
+            'chart.contextmenu':            null,
+            'chart.adjustable':             false,
+            'chart.text.color':             'black',
+            'chart.value.label':            true
+        }
+
+        /**
+        * A simple check that the browser has canvas support
+        */
+        if (!this.canvas) {
+            alert('[THERMOMETER] No canvas support');
+            return;
+        }
+    }
+
+
+
+
+    /**
+    * A setter.
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Thermometer.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+
+
+    /**
+    * A getter.
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Thermometer.prototype.Get = function (name)
+    {
+        return this.properties[name];
+    }
+
+
+
+
+    /**
+    * Draws the thermometer
+    */
+    RGraph.Thermometer.prototype.Draw = function ()
+    {
+        /**
+        * Fire the custom RGraph onbeforedraw event (which should be fired before the chart is drawn)
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+
+
+        /**
+        * Draw the background
+        */
+        this.DrawBackground();
+        
+        /**
+        * Draw the bar that represents the value
+        */
+        this.DrawBar();
+
+        /**
+        * Draw the tickmarks/hatchmarks
+        */
+        this.DrawTickMarks();
+
+        /**
+        * Draw the label
+        */
+        this.DrawLabels();
+
+        /**
+        * Draw the title
+        */
+        if (this.Get('chart.title')) {
+            this.DrawTitle();
+        }
+        
+        /**
+        * Draw the side title
+        */
+        if (this.Get('chart.title.side')) {
+            this.DrawSideTitle();
+        }
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * Instead of using RGraph.common.adjusting.js, handle them here
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+
+
+
+        
+        /**
+        * Fire the custom RGraph ondraw event (which should be fired when you have drawn the chart)
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+
+
+
+    /**
+    * Draws the thermometer itself
+    */
+    RGraph.Thermometer.prototype.DrawBackground = function ()
+    {
+        var canvas     = this.canvas;
+        var context    = this.context;
+        var bulbRadius = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / 2;
+        
+        // Cache the bulbRadius as an object variable
+        this.bulbRadius = bulbRadius;
+
+        // Draw the black background that becomes the border
+        context.beginPath();
+            context.fillStyle = 'black';
+
+            if (this.Get('chart.shadow')) {
+                RGraph.SetShadow(this, this.Get('chart.shadow.color'), this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));
+            }
+
+            context.fillRect(this.gutterLeft + 12,this.gutterTop + bulbRadius,RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - 24, RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom - bulbRadius - bulbRadius);
+            context.arc(this.gutterLeft + bulbRadius, RGraph.GetHeight(this) - this.gutterBottom - bulbRadius, bulbRadius, 0, 6.28, 0);
+            context.arc(this.gutterLeft + bulbRadius,this.gutterTop + bulbRadius,(RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - 24)/ 2,0,6.28,0);
+        context.fill();
+        
+        RGraph.NoShadow(this);
+
+        // Draw the white inner content background that creates the border
+        context.beginPath();
+            context.fillStyle = 'white';
+            context.fillRect(this.gutterLeft + 12 + 1,this.gutterTop + bulbRadius,RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - 24 - 2,RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom - bulbRadius - bulbRadius);
+            context.arc(this.gutterLeft + bulbRadius, RGraph.GetHeight(this) - this.gutterBottom - bulbRadius, bulbRadius - 1, 0, 6.28, 0);
+            context.arc(this.gutterLeft + bulbRadius,this.gutterTop + bulbRadius,((RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - 24)/ 2) - 1,0,6.28,0);
+        context.fill();
+
+        // Draw the bottom content of the thermometer
+        context.beginPath();
+            context.fillStyle = this.Get('chart.colors')[0];
+            context.arc(this.gutterLeft + bulbRadius, RGraph.GetHeight(this) - this.gutterBottom - bulbRadius, bulbRadius - 1, 0, 6.28, 0);
+            context.fillRect(this.gutterLeft + 12 + 1, RGraph.GetHeight(this) - this.gutterBottom - bulbRadius - bulbRadius,RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - 24 - 2, bulbRadius);
+        context.fill();
+        
+        // Save the X/Y/width/height
+        this.graphArea[0] = this.gutterLeft + 12 + 1;
+        this.graphArea[1] = this.gutterTop + bulbRadius;
+        this.graphArea[2] = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight - 24 - 2;
+        this.graphArea[3] = (RGraph.GetHeight(this) - this.gutterBottom - bulbRadius - bulbRadius) - (this.graphArea[1]);
+    }
+
+
+    /**
+    * This draws the bar that indicates the value of the thermometer
+    */
+    RGraph.Thermometer.prototype.DrawBar = function ()
+    {
+        var barHeight = (this.value / (this.max - this.min)) * this.graphArea[3];
+        var context   = this.context;
+
+        // Draw the actual bar that indicates the value
+        context.beginPath();
+            context.fillStyle = this.Get('chart.colors')[0];
+            context.fillRect(this.graphArea[0],this.graphArea[1] + this.graphArea[3] - barHeight,this.graphArea[2],barHeight);
+        context.fill();
+        
+        this.coords = [this.graphArea[0],this.graphArea[1] + this.graphArea[3] - barHeight,this.graphArea[2],barHeight];
+    }
+
+    
+    /**
+    * Draws the tickmarks of the thermometer
+    */
+    RGraph.Thermometer.prototype.DrawTickMarks = function ()
+    {
+        var ticksize = this.Get('chart.ticksize');
+
+        // Left hand side tickmarks
+        for (var i=this.graphArea[1]; i<=(this.graphArea[1] + this.graphArea[3]); i += (this.graphArea[3] / 10)) {
+            this.context.beginPath();
+                this.context.moveTo(this.gutterLeft + 12, i);
+                this.context.lineTo(this.gutterLeft + 12 + ticksize, i);
+            this.context.stroke();
+        }
+
+        // Right hand side tickmarks
+        for (var i=this.graphArea[1]; i<=(this.graphArea[1] + this.graphArea[3]); i += (this.graphArea[3] / 10)) {
+            this.context.beginPath();
+                this.context.moveTo(RGraph.GetWidth(this) - (this.gutterRight + 12), i);
+                this.context.lineTo(RGraph.GetWidth(this) - (this.gutterRight + 12 + ticksize), i);
+            this.context.stroke();
+        }
+    }
+
+    
+    /**
+    * Draws the labels (well, theres only one) of the thermometer
+    */
+    RGraph.Thermometer.prototype.DrawLabels = function ()
+    {
+        if (this.Get('chart.value.label')) {
+            this.context.beginPath();
+                this.context.fillStyle = this.Get('chart.text.color');
+                RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size'),this.gutterLeft + this.bulbRadius,this.coords[1] + this.Get('chart.text.size'),this.Get('chart.units.pre') + String(this.value) + this.Get('chart.units.post'),'center','center',true,null,'white');
+            this.context.fill();
+        }
+    }
+
+    
+    /**
+    * Draws the title
+    */
+    RGraph.Thermometer.prototype.DrawTitle = function ()
+    {
+        this.context.beginPath();
+            this.context.fillStyle = this.Get('chart.text.color');
+            RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size') + 2,this.gutterLeft + ((RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / 2),this.gutterTop,String(this.Get('chart.title')),'center','center',null,null,null,true);
+        this.context.fill();
+    }
+
+    
+    /**
+    * Draws the title
+    */
+    RGraph.Thermometer.prototype.DrawSideTitle = function ()
+    {
+        this.context.beginPath();
+            this.context.fillStyle = this.Get('chart.text.color');
+            RGraph.Text(this.context,this.Get('chart.text.font'),this.Get('chart.text.size') + 2,this.gutterLeft,RGraph.GetHeight(this) / 2,String(this.Get('chart.title.side')),'center','center',null,270,null,true);
+        this.context.fill();
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.vprogress.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.vprogress.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.vprogress.js	(revision 225)
@@ -0,0 +1,620 @@
+    /**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The progress bar constructor
+    * 
+    * @param int id    The ID of the canvas tag
+    * @param int value The indicated value of the meter.
+    * @param int max   The end value (the upper most) of the meter
+    */
+    RGraph.VProgress = function (id, value, max)
+    {
+        this.id                = id;
+        this.max               = max;
+        this.value             = value;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext('2d');
+        this.canvas.__object__ = this;
+        this.type              = 'vprogress';
+        this.coords            = [];
+        this.isRGraph          = true;
+
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+        this.properties = {
+            'chart.colors':             ['#0c0'],
+            'chart.tickmarks':          true,
+            'chart.tickmarks.zerostart':false,
+            'chart.tickmarks.color':    'black',
+            'chart.tickmarks.inner':    false,
+            'chart.gutter.left':        25,
+            'chart.gutter.right':       25,
+            'chart.gutter.top':         25,
+            'chart.gutter.bottom':      25,
+            'chart.numticks':           10,
+            'chart.numticks.inner':     50,
+            'chart.background.color':   '#eee',
+            'chart.shadow':             false,
+            'chart.shadow.color':       'rgba(0,0,0,0.5)',
+            'chart.shadow.blur':        3,
+            'chart.shadow.offsetx':     3,
+            'chart.shadow.offsety':     3,
+            'chart.title':              '',
+            'chart.title.background':   null,
+            'chart.title.hpos':         null,
+            'chart.title.vpos':         null,
+            'chart.width':              0,
+            'chart.height':             0,
+            'chart.text.size':          10,
+            'chart.text.color':         'black',
+            'chart.text.font':          'Verdana',
+            'chart.contextmenu':        null,
+            'chart.units.pre':          '',
+            'chart.units.post':         '',
+            'chart.tooltips':           [],
+            'chart.tooltips.effect':    'fade',
+            'chart.tooltips.css.class': 'RGraph_tooltip',
+            'chart.tooltips.highlight': true,
+            'chart.tooltips.coords.adjust': [0,0],
+            'chart.highlight.stroke':   'black',
+            'chart.highlight.fill':     'rgba(255,255,255,0.5)',
+            'chart.annotatable':        false,
+            'chart.annotate.color':     'black',
+            'chart.zoom.mode':          'canvas',
+            'chart.zoom.factor':        1.5,
+            'chart.zoom.fade.in':       true,
+            'chart.zoom.fade.out':      true,
+            'chart.zoom.hdir':          'right',
+            'chart.zoom.vdir':          'down',
+            'chart.zoom.frames':        10,
+            'chart.zoom.delay':         50,
+            'chart.zoom.shadow':        true,
+            'chart.zoom.background':    true,
+            'chart.zoom.action':        'zoom',
+            'chart.arrows':             false,
+            'chart.margin':             0,
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            'chart.label.inner':        false,
+            'chart.labels.count':       10,
+            'chart.labels.position':    'right',
+            'chart.adjustable':         false,
+            'chart.min':                0,
+            'chart.scale.decimals':     0,
+            'chart.key':                [],
+            'chart.key.background':     'white',
+            'chart.key.position':       'graph',
+            'chart.key.halign':             'right',
+            'chart.key.shadow':         false,
+            'chart.key.shadow.color':   '#666',
+            'chart.key.shadow.blur':    3,
+            'chart.key.shadow.offsetx': 2,
+            'chart.key.shadow.offsety': 2,
+            'chart.key.position.gutter.boxed': true,
+            'chart.key.position.x':     null,
+            'chart.key.position.y':     null,
+            'chart.key.color.shape':    'square',
+            'chart.key.rounded':        true,
+            'chart.key.linewidth':      1
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[PROGRESS] No canvas support');
+            return;
+        }
+    }
+
+
+    /**
+    * A generic setter
+    * 
+    * @param string name  The name of the property to set
+    * @param string value The value of the poperty
+    */
+    RGraph.VProgress.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A generic getter
+    * 
+    * @param string name  The name of the property to get
+    */
+    RGraph.VProgress.prototype.Get = function (name)
+    {
+        return this.properties[name.toLowerCase()];
+    }
+
+
+    /**
+    * Draws the progress bar
+    */
+    RGraph.VProgress.prototype.Draw = function ()
+    {
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        // Figure out the width and height
+        this.width  = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        this.height = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        this.coords = [];
+
+        this.Drawbar();
+        this.DrawTickMarks();
+        this.DrawLabels();
+
+        this.context.stroke();
+        this.context.fill();
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+        
+        /**
+        * Alternatively, show the tooltip if requested
+        */
+        if (typeof(this.Get('chart.tooltips')) == 'function' || this.Get('chart.tooltips').length) {
+
+            // Need to register this object for redrawing
+            RGraph.Register(this);
+
+            /**
+            * Install the window onclick handler
+            */
+            var window_onclick = function ()
+            {
+                RGraph.Redraw();
+            }
+            window.addEventListener('click', window_onclick, false);
+            RGraph.AddEventListener('window_' + this.id, 'click', window_onclick);
+
+
+            /**
+            * Install the onclick event handler for the tooltips
+            */
+            //this.canvas.onclick = function (e)
+            var canvas_onclick_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id);
+                var obj = canvas.__object__;
+
+                /**
+                * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn
+                * This "deselects" any already selected bar
+                */
+                RGraph.Redraw();
+    
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+
+                    var mouseX = mouseCoords[0] - obj.Get('chart.tooltips.coords.adjust')[0];
+                    var mouseY = mouseCoords[1] - obj.Get('chart.tooltips.coords.adjust')[1];
+                    var left   = obj.coords[i][0];
+                    var top    = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+                    var idx    = i;
+
+                    if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
+    
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = obj.Get('chart.tooltips')(idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function') {
+                            var text = obj.Get('chart.tooltips')[idx](idx);
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object') {
+                            var text = obj.Get('chart.tooltips')[idx];
+
+                        } else {
+                            var text = null;
+                        }
+
+                        /**
+                        * Show a tooltip if it's defined
+                        */
+                        if (text) {
+
+                            obj.context.beginPath();
+                            obj.context.strokeStyle = obj.Get('chart.highlight.stroke');
+                            obj.context.fillStyle   = obj.Get('chart.highlight.fill');
+                            obj.context.strokeRect(left, top, width, height);
+                            obj.context.fillRect(left, top, width, height);
+        
+                            obj.context.stroke();
+                            obj.context.fill();
+
+                            RGraph.Tooltip(canvas, text, e.pageX, e.pageY, i);
+                        }
+                    }
+                }
+
+                /**
+                * Stop the event bubbling
+                */
+                e.stopPropagation();
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+
+
+            /**
+            * If the cursor is over a hotspot, change the cursor to a hand
+            */
+            //this.canvas.onmousemove = function (e)
+            var canvas_onmousemove_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas = document.getElementById(this.id);
+                var obj = canvas.__object__;
+
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+
+                    var mouseX = mouseCoords[0] - obj.Get('chart.tooltips.coords.adjust')[0];  // In relation to the canvas
+                    var mouseY = mouseCoords[1] - obj.Get('chart.tooltips.coords.adjust')[1];  // In relation to the canvas
+                    var left   = obj.coords[i][0];
+                    var top    = obj.coords[i][1];
+                    var width  = obj.coords[i][2];
+                    var height = obj.coords[i][3];
+
+                    if (mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ) {
+                        canvas.style.cursor = 'pointer';
+                        break;
+                    }
+                    
+                    canvas.style.cursor = 'default';
+                }
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+        
+        // Draw a key if necessary
+        if (this.Get('chart.key').length) {
+            RGraph.DrawKey(this, this.Get('chart.key'), this.Get('chart.colors'));
+        }
+
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Instead of using RGraph.common.adjusting.js, handle them here
+        */
+        if (this.Get('chart.adjustable')) {
+            RGraph.AllowAdjusting(this);
+        }
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+
+    /**
+    * Draw the bar itself
+    */
+    RGraph.VProgress.prototype.Drawbar = function ()
+    {
+        // Set a shadow if requested
+        if (this.Get('chart.shadow')) {
+            RGraph.SetShadow(this, this.Get('chart.shadow.color'), this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));
+        }
+
+        // Draw the shadow for MSIE
+        if (RGraph.isIE8() && this.Get('chart.shadow')) {
+            this.context.fillStyle = this.Get('chart.shadow.color');
+            this.context.fillRect(this.gutterLeft + this.Get('chart.shadow.offsetx'), this.gutterTop + this.Get('chart.shadow.offsety'), this.width, this.height);
+        }
+
+        // Draw the outline
+        this.context.fillStyle   = this.Get('chart.background.color');
+        this.context.strokeStyle = 'black';
+        this.context.strokeRect(this.gutterLeft, this.gutterTop, this.width, this.height);
+        this.context.fillRect(this.gutterLeft, this.gutterTop, this.width, this.height);
+
+        // Turn off any shadow
+        RGraph.NoShadow(this);
+
+        this.context.strokeStyle = 'black';
+        this.context.fillStyle   = this.Get('chart.colors')[0];
+        var margin = this.Get('chart.margin');
+        var barHeight = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+
+        // Draw the actual bar itself
+        if (typeof(this.value) == 'number') {
+
+            this.context.lineWidth   = 1;
+            this.context.strokeStyle = '#999';
+
+        } else if (typeof(this.value) == 'object') {
+
+            this.context.beginPath();
+            this.context.strokeStyle = '#999';
+
+            var startPoint = RGraph.GetHeight(this) - this.gutterBottom;
+            
+            for (var i=0; i<this.value.length; ++i) {
+
+                var segmentHeight = ( (this.value[i] - this.Get('chart.min')) / (this.max - this.Get('chart.min')) ) * barHeight;
+
+                this.context.fillStyle = this.Get('chart.colors')[i];
+
+                this.context.fillRect(this.gutterLeft + margin, startPoint - segmentHeight, this.width - margin - margin, segmentHeight);
+                this.context.strokeRect(this.gutterLeft + margin, startPoint - segmentHeight, this.width - margin - margin, segmentHeight);
+
+
+                // Store the coords
+                this.coords.push([this.gutterLeft + margin, startPoint - segmentHeight, this.width - margin - margin, segmentHeight]);
+
+                startPoint -= segmentHeight;
+            }
+
+        }
+
+        /**
+        * Inner tickmarks
+        */
+        if (this.Get('chart.tickmarks.inner')) {
+        
+            var spacing = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / this.Get('chart.numticks.inner');
+
+            this.context.lineWidth   = 1;
+            this.context.strokeStyle = '#999';
+
+            this.context.beginPath();
+
+            for (var y = this.gutterTop; y<RGraph.GetHeight(this) - this.gutterBottom; y+=spacing) {
+                this.context.moveTo(this.gutterLeft, y);
+                this.context.lineTo(this.gutterLeft + 3, y);
+
+                this.context.moveTo(RGraph.GetWidth(this) - this.gutterRight, y);
+                this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight - 3, y);
+            }
+
+            this.context.stroke();
+        }
+
+        /**
+        * Draw the actual bar
+        */
+        var barHeight = Math.min(this.height, ( (this.value - this.Get('chart.min')) / (this.max - this.Get('chart.min')) ) * this.height);
+
+        this.context.beginPath();
+        this.context.strokeStyle = 'black';
+
+        if (typeof(this.value) == 'number') {
+            this.context.strokeRect(this.gutterLeft + margin, this.gutterTop + this.height - barHeight, this.width - margin - margin, barHeight);
+            this.context.fillRect(this.gutterLeft + margin, this.gutterTop + this.height - barHeight, this.width - margin - margin, barHeight);
+        }
+
+
+        /**
+        * Draw the arrows indicating the level if requested
+        */
+        if (this.Get('chart.arrows')) {
+            var x = this.gutterLeft - 4;
+            var y = RGraph.GetHeight(this) - this.gutterBottom - barHeight;
+            
+            this.context.lineWidth = 1;
+            this.context.fillStyle = 'black';
+            this.context.strokeStyle = 'black';
+
+            this.context.beginPath();
+                this.context.moveTo(x, y);
+                this.context.lineTo(x - 4, y - 2);
+                this.context.lineTo(x - 4, y + 2);
+            this.context.closePath();
+
+            this.context.stroke();
+            this.context.fill();
+
+            x +=  this.width + 8;
+
+            this.context.beginPath();
+                this.context.moveTo(x, y);
+                this.context.lineTo(x + 4, y - 2);
+                this.context.lineTo(x + 4, y + 2);
+            this.context.closePath();
+
+            this.context.stroke();
+            this.context.fill();
+        }
+
+
+
+
+        /**
+        * Draw the "in-bar" label
+        */
+        if (this.Get('chart.label.inner')) {
+            this.context.beginPath();
+            this.context.fillStyle = 'black';
+            RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size') + 2, RGraph.GetWidth(this) / 2, RGraph.GetHeight(this) - this.gutterBottom - barHeight - 5, String(this.Get('chart.units.pre') + this.value + this.Get('chart.units.post')), 'bottom', 'center');
+            this.context.fill();
+        }
+
+
+        // Store the coords
+        this.coords.push([this.gutterLeft + margin, this.gutterTop + this.height - barHeight, this.width - margin - margin, barHeight]);
+    }
+
+    /**
+    * The function that draws the tick marks. Apt name...
+    */
+    RGraph.VProgress.prototype.DrawTickMarks = function ()
+    {
+        this.context.strokeStyle = this.Get('chart.tickmarks.color');
+
+        if (this.Get('chart.tickmarks')) {
+            this.context.beginPath();
+                for (var i=0; this.Get('chart.tickmarks.zerostart') ? i<=this.Get('chart.numticks') : i<this.Get('chart.numticks'); i++) {
+                    
+                    var startX = this.Get('chart.labels.position') == 'left' ? this.gutterLeft : this.canvas.width - this.Get('chart.gutter.right');
+                    var endX   = this.Get('chart.labels.position') == 'left' ? startX - 4 : startX + 4;
+                    var yPos   = (this.height * (i / this.Get('chart.numticks'))) + this.gutterTop
+
+                    this.context.moveTo(startX, yPos);
+                    this.context.lineTo(endX, yPos);
+                }
+            this.context.stroke();
+        }
+    }
+
+
+    /**
+    * The function that draws the labels
+    */
+    RGraph.VProgress.prototype.DrawLabels = function ()
+    {
+        this.context.fillStyle = this.Get('chart.text.color');
+
+        var context    = this.context;
+        var position   = this.Get('chart.labels.position');
+        var xAlignment = position == 'left' ? 'right' : 'left';
+        var yAlignment = 'center';
+        var count      = this.Get('chart.labels.count');
+        var units_pre  = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+        var text_size  = this.Get('chart.text.size');
+        var text_font  = this.Get('chart.text.font');
+        
+        if (this.Get('chart.tickmarks')) {
+            
+            for (var i=0; i<count ; ++i) {
+
+                var text = String(
+                                  ((( (this.max - this.Get('chart.min')) / count) * (count - i)) + this.Get('chart.min')).toFixed(this.Get('chart.scale.decimals'))
+                                 );
+
+                RGraph.Text(context,
+                            text_font,
+                            text_size,
+                            position == 'left' ? (this.gutterLeft - 5) : (RGraph.GetWidth(this) - this.gutterRight + 5),
+                            (((RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / count) * i) + this.gutterTop,
+                            units_pre + text + units_post,
+                            yAlignment,
+                            xAlignment);
+            }
+            
+            /**
+            * Show zero?
+            */            
+            if (this.Get('chart.tickmarks.zerostart') && this.Get('chart.min') == 0) {
+                RGraph.Text(context,
+                            text_font,
+                            text_size,
+                            position == 'left' ? (this.gutterLeft - 5) : (RGraph.GetWidth(this) - this.gutterRight + 5),
+                            RGraph.GetHeight(this) - this.gutterBottom, units_pre + String(this.Get('chart.min').toFixed(this.Get('chart.scale.decimals'))) + units_post,
+                            yAlignment,
+                            xAlignment);
+            }
+
+            /**
+            * chart.ymin is set
+            */
+            if (this.Get('chart.min') != 0) {
+                RGraph.Text(context,
+                            text_font,
+                            text_size,
+                            position == 'left' ? (this.gutterLeft - 5) : (RGraph.GetWidth(this) - this.gutterRight + 5),
+                            RGraph.GetHeight(this) - this.gutterBottom, units_pre + String(this.Get('chart.min').toFixed(this.Get('chart.scale.decimals'))) + units_post,
+                            yAlignment,
+                            xAlignment);
+            }
+        }
+
+        // Draw the title text
+        if (this.Get('chart.title')) {
+            RGraph.Text(context,
+                        text_font,
+                        text_size + 2,
+                        this.gutterLeft + ((this.canvas.width - this.gutterLeft - this.gutterRight) / 2), // X
+                        this.gutterTop - text_size, // Y
+                        this.Get('chart.title'),
+                        null,
+                        'center',null, null, null, true);
+        }
+    }
Index: Dev/branches/Demo/RGraph/libraries/RGraph.waterfall.js
===================================================================
--- Dev/branches/Demo/RGraph/libraries/RGraph.waterfall.js	(revision 225)
+++ Dev/branches/Demo/RGraph/libraries/RGraph.waterfall.js	(revision 225)
@@ -0,0 +1,726 @@
+/**
+    * o------------------------------------------------------------------------------o
+    * | This file is part of the RGraph package - you can learn more at:             |
+    * |                                                                              |
+    * |                          http://www.rgraph.net                               |
+    * |                                                                              |
+    * | This package is licensed under the RGraph license. For all kinds of business |
+    * | purposes there is a small one-time licensing fee to pay and for non          |
+    * | commercial  purposes it is free to use. You can read the full license here:  |
+    * |                                                                              |
+    * |                      http://www.rgraph.net/LICENSE.txt                       |
+    * o------------------------------------------------------------------------------o
+    */
+    
+    if (typeof(RGraph) == 'undefined') RGraph = {};
+
+    /**
+    * The bar chart constructor
+    * 
+    * @param object canvas The canvas object
+    * @param array  data   The chart data
+    */
+    RGraph.Waterfall = function (id, data)
+    {
+        // Get the canvas and context objects
+        this.id                = id;
+        this.canvas            = document.getElementById(id);
+        this.context           = this.canvas.getContext ? this.canvas.getContext("2d") : null;
+        this.canvas.__object__ = this;
+        this.type              = 'waterfall';
+        this.max               = 0;
+        this.isRGraph          = true;
+        this.coords            = [];
+
+        /**
+        * Compatibility with older browsers
+        */
+        RGraph.OldBrowserCompat(this.context);
+
+
+        // Various config
+        this.properties = {
+            'chart.background.barcolor1':   'rgba(0,0,0,0)',
+            'chart.background.barcolor2':   'rgba(0,0,0,0)',
+            'chart.background.grid':        true,
+            'chart.background.grid.color':  '#ddd',
+            'chart.background.grid.width':  1,
+            'chart.background.grid.hsize':  20,
+            'chart.background.grid.vsize':  20,
+            'chart.background.grid.vlines': true,
+            'chart.background.grid.hlines': true,
+            'chart.background.grid.border': true,
+            'chart.background.grid.autofit':false,
+            'chart.background.grid.autofit.numhlines': 7,
+            'chart.background.grid.autofit.numvlines': 20,
+            'chart.background.grid.autofit.align': false,
+            'chart.background.image':       null,
+            'chart.background.hbars':       null, // ???
+
+            'chart.numyticks':              10,
+            'chart.hmargin':                5,
+            'chart.strokestyle':            '#666',
+            'chart.axis.color':             'black',
+            'chart.gutter.left':            25,
+            'chart.gutter.right':           25,
+            'chart.gutter.top':             25,
+            'chart.gutter.bottom':          25,
+            'chart.labels':                 [],
+            'chart.ylabels':                true,
+            'chart.text.color':             'black',
+            'chart.text.size':              10,
+            'chart.text.angle':             0,
+            'chart.text.font':              'Verdana',
+            'chart.ymax':                   null,
+
+            'chart.title':                  '',
+            'chart.title.color':            'black',
+            'chart.title.background':       null,
+            'chart.title.hpos':             null,
+            'chart.title.vpos':             null,
+            'chart.title.xaxis':            '',
+            'chart.title.yaxis':            '',
+            'chart.title.xaxis.pos':        0.25,
+            'chart.title.yaxis.pos':        0.25,
+            'chart.title.yaxis.align':      'left',
+
+            'chart.colors':                 ['green', 'red', 'blue'],
+
+            'chart.shadow':                 false,
+            'chart.shadow.color':           '#666',
+            'chart.shadow.offsetx':         3,
+            'chart.shadow.offsety':         3,
+            'chart.shadow.blur':            3,
+
+            'chart.tooltips':               null,
+            'chart.tooltips.effect':        'fade',
+            'chart.tooltips.css.class':     'RGraph_tooltip',
+        //'chart.tooltips.event':         'onclick',
+            'chart.tooltips.coords.adjust': [0,0],
+            'chart.tooltips.highlight':     true,
+            'chart.tooltips.override':     null,
+
+            'chart.highlight.stroke':       'black',
+            'chart.highlight.fill':         'rgba(255,255,255,0.5)',
+
+            'chart.contextmenu':            null,
+
+            'chart.units.pre':              '',
+            'chart.units.post':             '',
+        
+        //'chart.scale.decimals':         0,
+        //'chart.scale.point':            '.',
+        //'chart.scale.thousand':         ',',
+        //'chart.scale.formatter':        null,
+
+            'chart.crosshairs':             false,
+            'chart.crosshairs.color':       '#333',
+
+            'chart.annotatable':            false,
+            'chart.annotate.color':         'black',
+            
+            'chart.zoom.factor':            1.5,
+            'chart.zoom.fade.in':           true,
+            'chart.zoom.fade.out':          true,
+            'chart.zoom.hdir':              'right',
+            'chart.zoom.vdir':              'down',
+            'chart.zoom.frames':            10,
+            'chart.zoom.delay':             50,
+            'chart.zoom.shadow':            true,
+            'chart.zoom.mode':              'canvas',
+            'chart.zoom.thumbnail.width':   75,
+            'chart.zoom.thumbnail.height':  75,
+            'chart.zoom.background':        true,
+
+            'chart.resizable':              false,
+            'chart.resize.handle.adjust':   [0,0],
+            'chart.resize.handle.background': null,
+            
+            'chart.noaxes':                 false,
+            'chart.noxaxis':                false,
+            'chart.noyaxis':                false,
+
+            'chart.axis.color':             'black',
+            'chart.total':                  true
+        }
+
+        // Check for support
+        if (!this.canvas) {
+            alert('[WATERFALL] No canvas support');
+            return;
+        }
+
+        // Store the data
+        this.data = data;
+    }
+
+
+    /**
+    * A setter
+    * 
+    * @param name  string The name of the property to set
+    * @param value mixed  The value of the property
+    */
+    RGraph.Waterfall.prototype.Set = function (name, value)
+    {
+        this.properties[name.toLowerCase()] = value;
+    }
+
+
+    /**
+    * A getter
+    * 
+    * @param name  string The name of the property to get
+    */
+    RGraph.Waterfall.prototype.Get = function (name)
+    {        
+        return this.properties[name.toLowerCase()];
+    }
+
+
+    /**
+    * The function you call to draw the bar chart
+    */
+    RGraph.Waterfall.prototype.Draw = function ()
+    {
+        // MUST be the first thing done!
+        if (typeof(this.Get('chart.background.image')) == 'string' && !this.__background_image__) {
+            RGraph.DrawBackgroundImage(this);
+            return;
+        }
+
+
+        /**
+        * Fire the onbeforedraw event
+        */
+        RGraph.FireCustomEvent(this, 'onbeforedraw');
+
+        /**
+        * Clear all of this canvases event handlers (the ones installed by RGraph)
+        */
+        RGraph.ClearEventListeners(this.id);
+        
+        /**
+        * This is new in May 2011 and facilitates indiviual gutter settings,
+        * eg chart.gutter.left
+        */
+        this.gutterLeft   = this.Get('chart.gutter.left');
+        this.gutterRight  = this.Get('chart.gutter.right');
+        this.gutterTop    = this.Get('chart.gutter.top');
+        this.gutterBottom = this.Get('chart.gutter.bottom');
+
+        /**
+        * Stop the coords array from growing uncontrollably
+        */
+        this.coords = [];
+
+        /**
+        * Work out a few things. They need to be here because they depend on things you can change after you instantiate the object
+        */
+        this.max            = 0;
+        this.grapharea      = RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom;
+        this.graphwidth     = RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight;
+        this.halfTextHeight = this.Get('chart.text.size') / 2;
+
+        // Work out the resulting total
+        if (typeof(this.Get('chart.total')) == 'boolean' && this.Get('chart.total')) {
+            var total = RGraph.array_sum(this.data);
+            this.data.push(total);
+            this.Set('chart.total', total);
+        }
+
+        /**
+        * Work out the maximum value
+        */
+        var runningTotal = 0;
+        for (var i=0; i<this.data.length - 1; ++i) {
+            runningTotal += this.data[i];
+            this.max = Math.max(this.max, runningTotal);
+        }
+
+        this.scale   = RGraph.getScale(typeof(this.Get('chart.ymax')) == 'number' ? this.Get('chart.ymax') : this.max, this);
+        this.max     = this.scale[4];
+        var decimals = this.Get('chart.scale.decimals');
+
+        this.scale = [
+                      (this.max * (1/5)).toFixed(decimals),
+                      (this.max * (2/5)).toFixed(decimals),
+                      (this.max * (3/5)).toFixed(decimals),
+                      (this.max * (4/5)).toFixed(decimals),
+                      this.max.toFixed(decimals)
+                     ];
+
+
+        // Progressively Draw the chart
+        RGraph.background.Draw(this);
+
+        this.Drawbars();
+        this.DrawAxes();
+        this.DrawLabels();
+
+        /**
+        * Setup the context menu if required
+        */
+        if (this.Get('chart.contextmenu')) {
+            RGraph.ShowContext(this);
+        }
+
+        
+        /**
+        * Draw crosschairs
+        */
+        if (this.Get('chart.crosshairs')) {
+            RGraph.DrawCrosshairs(this);
+        }
+        
+        /**
+        * If the canvas is annotatable, do install the event handlers
+        */
+        if (this.Get('chart.annotatable')) {
+            RGraph.Annotate(this);
+        }
+        
+        /**
+        * This bit shows the mini zoom window if requested
+        */
+        if (this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area') {
+            RGraph.ShowZoomWindow(this);
+        }
+
+        
+        /**
+        * This function enables resizing
+        */
+        if (this.Get('chart.resizable')) {
+            RGraph.AllowResizing(this);
+        }
+        
+        /**
+        * Tooltips
+        */
+        if (this.Get('chart.tooltips')) {
+        
+            RGraph.Register(this);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+            /**
+            * Install the onclick event handler for the tooltips
+            */
+            var canvas_onclick_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas  = document.getElementById(this.id);
+                var context = canvas.getContext('2d');
+                var obj     = canvas.__object__;
+
+                /**
+                * Redraw the graph first, in effect resetting the graph to as it was when it was first drawn
+                * This "deselects" any already selected bar
+                */
+                RGraph.Clear(canvas);
+                obj.Draw();
+    
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                var adjust      = obj.Get('chart.tooltips.coords.adjust');
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+                
+                    var coordsX = obj.coords[i][0];
+                    var coordsY = obj.coords[i][1];
+                    var coordsW = obj.coords[i][2];
+                    var coordsH = obj.coords[i][3];
+
+                    if (
+                        mouseX >= (coordsX + adjust[0]) &&
+                        mouseX <= (coordsX + coordsW + adjust[0]) &&
+                        mouseY >= (coordsY + adjust[1]) &&
+                        mouseY <= (coordsY + coordsH + adjust[1])
+                       ) {
+                       
+                       if (!obj.Get('chart.tooltips')[i]) {
+                        return;
+                       }
+                       
+                        // Draw the highlight (if necessary)
+                        if (obj.Get('chart.tooltips.highlight')) {
+                           context.beginPath();
+                               context.fillStyle = obj.Get('chart.highlight.fill');
+                               context.strokeStyle = obj.Get('chart.highlight.stroke');
+                               context.strokeRect(coordsX, coordsY, coordsW, coordsH);
+                               context.fillRect(coordsX, coordsY, coordsW, coordsH);
+                           context.stroke();
+                           context.fill();
+                        }
+
+                        /**
+                        * Get the tooltip text
+                        */
+                        if (typeof(obj.Get('chart.tooltips')) == 'function') {
+                            var text = String(obj.Get('chart.tooltips')(i));
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[i]) == 'function') {
+                            var text = String(obj.Get('chart.tooltips')[barCoords[5]](i));
+                        
+                        } else if (typeof(obj.Get('chart.tooltips')) == 'object' && (typeof(obj.Get('chart.tooltips')[i]) == 'string' || typeof(obj.Get('chart.tooltips')[i]) == 'number')) {
+                            var text = String(obj.Get('chart.tooltips')[i]);
+                    
+                        } else {
+                            var text = null;
+                        }
+    
+                        if (text) {
+                            canvas.style.cursor = 'pointer';
+                        } else {
+                            canvas.style.cursor = 'default';
+                        }
+
+                        RGraph.Tooltip(canvas, obj.Get('chart.tooltips')[i], e.pageX, e.pageY, text, i);
+                    }
+                }
+
+                /**
+                * Stop the event bubbling
+                */
+                e.stopPropagation();
+                
+                return false;
+            }
+            this.canvas.addEventListener('click', canvas_onclick_func, false);
+            RGraph.AddEventListener(this.id, 'click', canvas_onclick_func);
+
+            /**
+            * Install the window onclick handler
+            */
+            var window_onclick_func = function (){RGraph.Redraw();};
+            window.addEventListener('click', window_onclick_func, false);
+            RGraph.AddEventListener('window_' + this.id, 'click', window_onclick_func);
+
+
+
+
+
+
+
+
+
+
+
+
+
+            /**
+            * Install the onmousemove event handler for the tooltips
+            */
+            var canvas_onmousemove_func = function (e)
+            {
+                e = RGraph.FixEventObject(e);
+
+                var canvas  = document.getElementById(this.id);
+                var context = canvas.getContext('2d');
+                var obj     = canvas.__object__;
+    
+                /**
+                * Get the mouse X/Y coordinates
+                */
+                var mouseCoords = RGraph.getMouseXY(e);
+                var mouseX      = mouseCoords[0];
+                var mouseY      = mouseCoords[1];
+                var adjust      = obj.Get('chart.tooltips.coords.adjust');
+
+                /**
+                * Loop through the bars determining if the mouse is over a bar
+                */
+                for (var i=0; i<obj.coords.length; i++) {
+                
+                    var coordsX = obj.coords[i][0];
+                    var coordsY = obj.coords[i][1];
+                    var coordsW = obj.coords[i][2];
+                    var coordsH = obj.coords[i][3];
+
+                    if (
+                        mouseX >= (coordsX + adjust[0]) &&
+                        mouseX <= (coordsX + coordsW + adjust[0]) &&
+                        mouseY >= (coordsY + adjust[1]) &&
+                        mouseY <= (coordsY + coordsH + adjust[1])
+                       ) {
+                       if (obj.Get('chart.tooltips')[i]) {                       
+                            canvas.style.cursor = 'pointer';
+                            e.stopPropagation();
+                        }
+
+                       return;
+                    }
+                }
+                
+                canvas.style.cursor = 'default';
+
+                /**
+                * Stop the event bubbling
+                */
+                e.stopPropagation();
+                
+                return false;
+            }
+            this.canvas.addEventListener('mousemove', canvas_onmousemove_func, false);
+            RGraph.AddEventListener(this.id, 'mousemove', canvas_onmousemove_func);
+
+
+
+
+
+
+
+
+
+
+
+
+
+        }
+
+        
+        /**
+        * Fire the RGraph ondraw event
+        */
+        RGraph.FireCustomEvent(this, 'ondraw');
+    }
+
+    
+    /**
+    * Draws the charts axes
+    */
+    RGraph.Waterfall.prototype.DrawAxes = function ()
+    {
+        if (this.Get('chart.noaxes')) {
+            return;
+        }
+
+        this.context.beginPath();
+        this.context.strokeStyle = this.Get('chart.axis.color');
+        this.context.lineWidth = 1;
+
+        // Draw the Y axis
+        if (this.Get('chart.noyaxis') == false) {
+            this.context.moveTo(this.gutterLeft, this.gutterTop);
+            this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+        }
+
+        // Draw the X axis
+        if (this.Get('chart.noxaxis') == false) {
+            this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+            this.context.lineTo(RGraph.GetWidth(this) - this.gutterRight, RGraph.GetHeight(this) - this.gutterBottom);
+        }
+
+        var numYTicks = this.Get('chart.numyticks');
+
+        // Draw the Y tickmarks
+        if (this.Get('chart.noyaxis') == false) {
+
+            var yTickGap = (RGraph.GetHeight(this) - this.gutterTop - this.gutterBottom) / numYTicks;
+    
+            for (y=this.gutterTop; y < (RGraph.GetHeight(this) - this.gutterBottom); y += yTickGap) {
+                this.context.moveTo(this.gutterLeft, y);
+                this.context.lineTo(this.gutterLeft - 3, y);
+            }
+            
+            /**
+            * If the X axis is not being shown, draw an extra tick
+            */
+            if (this.Get('chart.noxaxis')) {
+                this.context.moveTo(this.gutterLeft - 3, RGraph.GetHeight(this) - this.gutterBottom);
+                this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+            }
+        }
+
+
+        // Draw the X tickmarks
+        if (this.Get('chart.noxaxis') == false) {
+
+            xTickGap = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight ) / this.data.length;
+            
+            yStart   = RGraph.GetHeight(this) - this.gutterBottom;
+            yEnd     = (RGraph.GetHeight(this) - this.gutterBottom) + 3;
+    
+            for (x=this.gutterLeft + xTickGap; x<=RGraph.GetWidth(this) - this.gutterRight; x+=xTickGap) {
+                this.context.moveTo(x, yStart);
+                this.context.lineTo(x, yEnd);
+            }
+            
+            if (this.Get('chart.noyaxis')) {
+                this.context.moveTo(this.gutterLeft, yStart);
+                this.context.lineTo(this.gutterLeft, yEnd);
+            }
+        }
+
+        /**
+        * If the Y axis is not being shown, draw an extra tick
+        */
+        if (this.Get('chart.noyaxis') && this.Get('chart.noxaxis') == false) {
+            this.context.moveTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom);
+            this.context.lineTo(this.gutterLeft, RGraph.GetHeight(this) - this.gutterBottom + 3);
+        }
+
+        this.context.stroke();
+    }
+
+
+    /**
+    * Draws the labels for the graph
+    */
+    RGraph.Waterfall.prototype.DrawLabels = function ()
+    {
+        var context    = this.context;
+        var numYLabels = 5;
+        var interval   = this.grapharea / numYLabels;
+        var font       = this.Get('chart.text.font');
+        var size       = this.Get('chart.text.size');
+        var color      = this.Get('chart.text.color');
+        var units_pre  = this.Get('chart.units.pre');
+        var units_post = this.Get('chart.units.post');
+        
+        this.context.beginPath();
+        this.context.fillStyle = color;
+
+        /**
+        * First, draw the Y labels
+        */
+        if (this.Get('chart.ylabels')) {
+            for (var i=1; i<=numYLabels; ++i) {
+
+                RGraph.Text(context,
+                            font,
+                            size,
+                            this.gutterLeft - 5,
+                            this.canvas.height - this.gutterBottom - (i * interval),
+                            RGraph.number_format(this, this.scale[i - 1], units_pre, units_post),
+                            'center',
+                            'right');
+
+            }
+        }
+
+
+
+        /**
+        * Now, draw the X labels
+        */
+        if (this.Get('chart.labels').length > 0) {
+        
+            // Recalculate the interval for the X labels
+            interval = (RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / this.Get('chart.labels').length;
+            
+            var halign = 'center';
+            var angle  = this.Get('chart.text.angle');
+            
+            if (angle) {
+                halign = 'right';
+                angle *= -1;
+            }
+
+            for (var i=0; i<this.Get('chart.labels').length; ++i) {
+                
+                var labels = this.Get('chart.labels');
+
+                RGraph.Text(context,
+                            font,
+                            size,
+                            this.gutterLeft - 5 + (i * interval) + (interval / 2),// X
+                            RGraph.GetHeight(this) - this.gutterBottom + 5 + this.halfTextHeight, // Y
+                            labels[i],
+                            'center',
+                            halign,
+                            null,
+                            angle);
+
+            }
+        }
+        
+        this.context.stroke();
+        this.context.fill();
+    }
+
+
+    /**
+    * Draws the bars on to the chart
+    */
+    RGraph.Waterfall.prototype.Drawbars = function ()
+    {
+        var context      = this.context;
+        var canvas       = this.canvas;
+        var hmargin      = this.Get('chart.hmargin');
+        var runningTotal = 0;
+
+        
+            for (var i=0; i<this.data.length; ++i) {
+                context.beginPath();
+                context.strokeStyle = this.Get('chart.strokestyle');
+
+                    var isLast = (i == (this.data.length - 1));
+                    var x      = this.gutterLeft + hmargin + ((this.graphwidth / this.data.length) * i);
+                    var y      = this.gutterTop + this.grapharea - (i == 0 ? ((this.data[0] / this.max) * this.grapharea) : (this.data[i] > 0 ? ((runningTotal + this.data[i]) / this.max) * this.grapharea : (runningTotal / this.max) * this.grapharea));
+                    var w      = ((RGraph.GetWidth(this) - this.gutterLeft - this.gutterRight) / this.data.length) - (2 * this.Get('chart.hmargin'));
+                    var h      = (Math.abs(this.data[i]) / this.max) * this.grapharea;
+    
+                    // Color
+                    context.fillStyle = this.data[i] >= 0 ? this.Get('chart.colors')[0] : this.Get('chart.colors')[1];
+    
+                    // Last item? Change to the third color
+                    if (isLast && this.Get('chart.total')) {
+                        context.fillStyle = this.Get('chart.colors')[2];
+                        y = this.gutterTop + this.grapharea - h;
+                    }
+                    
+                    if (this.Get('chart.shadow')) {
+                        RGraph.SetShadow(this, this.Get('chart.shadow.color'), this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));
+                    } else {
+                        RGraph.NoShadow(this);
+                    }
+    
+                    context.strokeRect(x, y, w, h);
+                    context.fillRect(x, y, w, h);
+                    
+                    this.coords.push([x, y, w, h]);
+                    
+                    runningTotal += this.data[i];
+
+                context.stroke();
+                context.fill();
+            }
+            
+            RGraph.NoShadow(this);
+
+            for (var i=1; i<this.coords.length; ++i) {
+                context.strokeStyle = 'gray';
+                context.beginPath();
+                    if (this.data[i - 1] > 0) {
+                        context.moveTo(this.coords[i - 1][0] + this.coords[i - 1][2], this.coords[i - 1][1]);
+                        context.lineTo(this.coords[i - 1][0] + this.coords[i - 1][2] + (2 * hmargin), this.coords[i - 1][1]);
+                    } else {
+                        context.moveTo(this.coords[i - 1][0] + this.coords[i - 1][2], this.coords[i - 1][1] + this.coords[i - 1][3]);
+                        context.lineTo(this.coords[i - 1][0] + this.coords[i - 1][2] + (2 * hmargin), this.coords[i - 1][1] + this.coords[i - 1][3]);
+                    }
+                context.stroke();
+            }
+    }
+
+
Index: Dev/branches/Demo/RGraph/scripts/minify
===================================================================
--- Dev/branches/Demo/RGraph/scripts/minify	(revision 225)
+++ Dev/branches/Demo/RGraph/scripts/minify	(revision 225)
@@ -0,0 +1,104 @@
+#!/usr/bin/php -q
+<?php
+    /**
+    * This is a minification script. It minifies the desired script "in-place"
+    * 
+    *  Usage (Unix): ./minify file1 file2 ...
+    *  Usage (Windows): C:\php\php.exe minify file1 file2 ...
+    * 
+    * The minification is medium, and it can over halve a scripts size.
+    * Combined with subsequent gzip compression the results can be excellent. For
+    * example a 70k script of mine was reduced to just 7k. (!) Substantial
+    * bandwidth savings for you, and much improved performance for your users.
+    *
+    * NOTE: Usage on Windows works, but is less tested
+    */
+
+    /**
+    * Check for arg
+    */
+    if (empty($_SERVER['argv'][1])) {
+        echo "RGraph minification script\n";
+        echo "==========================\n";
+        echo "Usage (Unix):     " . $_SERVER['argv'][0] . " file1 file2 ...\n";
+        echo "Usage (Windows): C:\php\php.exe " . $_SERVER['argv'][0] . " file1 file2 ...\n\n";
+        exit;
+
+    } else {
+
+        for ($i=1; $i<count($_SERVER['argv']); ++$i) {
+            Minify($_SERVER['argv'][$i]);
+        }
+    }
+
+
+    /**
+    * This is the function that does the work of minifying the file
+    * 
+    * @param $filename string The filename to be minified
+    */
+    function Minify($filename)
+    {
+        /**
+        * Begin
+        */
+        $original = file_get_contents($filename);
+        $new = preg_replace('/^ +/m', '', $original);    // Lose spaces at the start of lines
+        $new = preg_replace('/ *\/\/.*$/m', '', $new);   // Lose comments of the style: "// ..."
+        $new = preg_replace("/;\r?\n/m", ";\r\n", $new); // Make all lines end with \r\n
+        //$new = preg_replace("|\r\n\*|", "", $new);
+        
+        /**
+        * Get rid of block comments
+        */
+        $out = '';
+        $inBlock = false; // Are we in a block comment
+        for ($i=0; $i<strlen($new); $i++) {
+            if (substr($new, $i, 1) == '/') {
+                // Read the next char
+                if (!$inBlock AND substr($new, $i, 2) == '/*') {
+                    $inBlock = true;
+                }
+            } elseif (substr($new, $i, 2) == '*/') {
+                $inBlock = false;
+                $i++;
+                continue;
+            }
+            
+            if (!$inBlock) {
+                $out .= substr($new, $i, 1);
+            }
+        }
+        
+        /**
+        * Get rid of double line breaks
+        * 
+        * NOTE: Is this necessary?
+        */
+        $out = preg_replace('|\n+|', "\n", $out);
+        
+        /**
+        * Further tweaks
+        * UPDATED: 28th March 2009 - Line endings have been changed - they should all be \r\n
+        */
+        $out = str_replace(";\r\n}", ';}', $out);
+        $out = str_replace(";\r\nRGraph", ';RGraph', $out);
+        $out = preg_replace('/;\r\n([a-z])/i', ';$1', $out);
+        $out = str_replace('if (', 'if(', $out);
+        $out = str_replace(') {', '){', $out);
+        $out = str_replace("}\r\n", '}', $out);
+        $out = str_replace("{\r\n", '{', $out); // UPDATED
+        $out = str_replace("{\r\n", '{', $out); // UPDATED
+        $out = str_replace("}\r\n}", '}}', $out); // UPDATED
+        $out = str_replace("}\r\n}", '}}', $out); // UPDATED
+        $out = str_replace("}\r\n}", '}}', $out); // UPDATED
+        $out = preg_replace('/ {2,}= /', ' = ', $out);
+        
+        // Mark the file as minified
+        $out = "// THIS FILE HAS BEEN MINIFIED\r\n" . $out;
+    
+        file_put_contents($filename, $out);
+        
+        printf(" Minifying {$filename} Before: %s After: %s Saving: %d%%\n", number_format(strlen($original)), number_format(strlen($out)), number_format((((strlen($original) - strlen($out)) / strlen($original)) * 100), 1));
+    }
+?>
Index: Dev/branches/Demo/applicationcreation.php
===================================================================
--- Dev/branches/Demo/applicationcreation.php	(revision 225)
+++ Dev/branches/Demo/applicationcreation.php	(revision 225)
@@ -0,0 +1,57 @@
+<?php
+require 'classes/master.php';
+
+var_dump($_POST);
+
+if (is_null($_SESSION['username']))
+    redirect('index.php');
+
+$savedApplication = null;
+
+if(isset($_POST['applicationUID']) && $_POST['applicationUID'] != "") //either from same page or from menu
+{
+    $applicationUID = $_POST['applicationUID'];
+    $applicationDBI = new ApplicationDatabaseInterface($applicationUID);
+    
+    if (isset($_POST['applicationDescription']) && isset($_POST['applicationTitle'])) // from same page
+    {
+        $applicationDBI->setApplicationInfo($_POST);
+    }
+    
+    $info = $applicationDBI->getApplicationInfo($applicationUID);
+    $savedApplication = Application::getApplication($info);
+}
+else if(isset($_POST['applicationTitle'])) //save for first time
+{
+    $applicationDBI = new ApplicationDatabaseInterface($_POST['applicationUID']);
+    $applicationDBI->setApplicationInfo($_POST);
+    $applicationID = $applicationDBI->getApplicationID();
+    $info = $applicationDBI->getApplicationInfo($applicationID);
+    $savedApplication = Application::getApplication($info);
+}
+
+var_dump($savedApplication);
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+            <title>Application Creation</title>
+            <?php new StyleSheet(); ?>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+        <div id="wrapper">
+
+            <div id="content">
+                <?php
+                    new ApplicationCreationTool($savedApplication);
+                ?>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/classes/Answer.php
===================================================================
--- Dev/branches/Demo/classes/Answer.php	(revision 225)
+++ Dev/branches/Demo/classes/Answer.php	(revision 225)
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * Description of Answer
+ *
+ * @author jkraaijeveld
+ */
+class Answer extends ResearchToolObject {
+    public $question;
+	public $values;
+    
+    /**
+     * Constructor for an Answer object
+     * @param type $uid : The uid of the Answer object.
+     * @param type $question : The Question object this Answer answers.
+     * @param type $values : An array of strings, containing the answers.
+     */
+    public function __construct($uid = null, $question = null, $values = null) {
+      if(!isset($uid))
+      {
+            $uid = md5(uniqid(rand(), true));
+      }
+      $this->uid = $uid;
+      $this->question = $question;
+      $this->values = $values;
+	}
+	
+	/**
+	 * function evaluate()
+	 * Evaluates the references and fills in the objects for them instead.
+	 */
+	public function evaluate()
+	{
+		if(is_string($this->question))
+		{
+			$dbi = new DatabaseInterface();
+			$result = $dbi->get("question", array("code" => $this->question));
+			if(!isset($result[0]))
+				return false;
+			$this->question = $result[0];
+		}
+		return true;
+
+	}
+}
+
+?>
Index: Dev/branches/Demo/classes/AnswerConnector.php
===================================================================
--- Dev/branches/Demo/classes/AnswerConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/AnswerConnector.php	(revision 225)
@@ -0,0 +1,120 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of AnswerConnector
+ *
+ * @author jkraaijeveld
+ */
+class AnswerConnector extends Connector{
+    
+    /**
+     * Constructor for AnswerConnector
+     */
+    public function __construct() {
+        //Ensure the required folder for this connector exists
+        if (!is_dir('data/answers/'))
+			mkdir('data/answers/');
+		$this->fileName = 'data/answers/answers.rdf';
+    }
+    
+	/**
+	 * function get()
+	 * @param type $arguments: An array having one or more of the following elements:
+	 * 'uid', 'question', 'values'.
+	 */
+    public function get($arguments)
+	{
+		$this->load();
+		//Create the querystring
+		$querystring = '
+			PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+			PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+			SELECT DISTINCT ?uid, ?question_code
+			WHERE
+			{
+				_answer predicates:resource_type resources:answer;
+
+				predicates:uid ?uid ;
+				predicates:question_code ?question_code ;
+				' . $this->createArguments($arguments) . '
+			}';
+
+		//Query the model
+		$results = $this->model->sparqlQuery($querystring);	
+		//An answer can have multiple values, get all these values for the answer instances found.
+		$answers = array();
+		if(!empty($results))
+		{
+			foreach($results as $result)
+			{
+				$answers[] = new Answer($result['?uid']->label, $result['?question_code']->label, $this->getValues($result['?uid']->label));
+			}
+		}
+		return $answers;
+	}
+
+	/**
+	 * function getValues()
+	 * @param type $uid : The uid of the Answer for which the values should be gotten.
+	 */
+	private function getValues($uid)
+	{
+		$result = $this->model->findRegex("[(".$uid.")]", "[(answered)]", null);
+		$iterator = $result->getStatementIterator();
+		$values = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$values[] = $element->getLabelObject();
+		}
+		return $values;
+	} 
+
+    /**
+	 * function set()
+     * @param type $rToolObject : The ResearchToolObject to be saved.
+     */
+    public function set($rToolObject)
+    {
+		$this->load();
+		//If evaluation fails, some references are incorrect.
+		//We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed.
+		//TODO: Decide how to fix invalid references graciously.
+		if(!$rToolObject->evaluate()) 
+			return false;
+        $resourceAnswer = new Resource(ANSWER.'/'.$rToolObject->uid);        
+        //Remove the old value stored with the given id
+        $this->model->subtract($this->model->find($resourceAnswer, null, null));
+        
+        //Save all the new values
+        $resourceAnswerType = new Resource(ANSWER);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceAnswer,$predicateRType,$resourceAnswerType));
+        
+		$answerId = new Literal($rToolObject->uid);
+		$predicateId = new Resource(UID);
+		$this->model->add(new Statement($resourceAnswer, $predicateId, $answerId));
+
+		$questionId = new Literal($rToolObject->question->uid);
+		$predicateQId = new Resource(QCODE);
+		$this->model->add(new Statement($resourceAnswer, $predicateQId, $questionId));
+
+		if(isset($rToolObject->values))
+		{
+			foreach($rToolObject->values as $value)
+			{
+				$answerValue = new Literal($value);
+				$predicateAnswer = new Resource(ANSWERED);
+				$this->model->add(new Statement($resourceAnswer, $predicateAnswer, $answerValue));
+			}
+		}
+		$this->save();
+		return true;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes/AnswerSet.php
===================================================================
--- Dev/branches/Demo/classes/AnswerSet.php	(revision 225)
+++ Dev/branches/Demo/classes/AnswerSet.php	(revision 225)
@@ -0,0 +1,67 @@
+<?php
+
+/**
+ * AnswerSet is a collection of answers corresponding to a Session
+ *
+ */
+class AnswerSet extends ResearchToolObject{
+	public $survey;
+	public $respondent;
+	public $answers;
+
+	/**
+	 * Constructor for an AnswerSet object
+	 * @param type $uid
+	 * @param type $survey
+	 * @param type $respondent
+	 * @param type $answers
+	 */
+	public function __construct($uid=null, $survey=null, $respondent=null, $answers=null)
+	{
+		if(!isset($uid))
+		{
+			$uid = md5(uniqid(rand(), true));
+		}
+		$this->uid = $uid;
+		$this->survey = $survey;
+		$this->respondent = $respondent;
+		$this->answers = $answers;
+	}
+
+	/**
+	 * function evaluate()
+	 * evaluates the references of survey, respondent and answers.
+	 */
+	public function evaluate()
+	{
+		$dbi = new DatabaseInterface();
+		if(is_string($this->survey))
+		{
+			$result = $dbi->get("survey", array("uid" => $this->survey));
+			if(!isset($result[0]))
+				return false;
+			$this->survey = $result[0];
+		}
+		if(is_string($this->respondent))
+		{
+			$result = $dbi->get("respondent", array("uid" => $this->respondent));
+			if(!isset($result[0]))
+				return false;
+			$this->respondent = $result[0];
+		}
+		if(!empty($this->answers) && is_string($this->answers[0]))
+		{
+			$newanswers = array();
+			foreach($this->answers as $answer)
+			{
+				$result = $dbi->get("answer", array("uid" => $answer));
+				if(!isset($result[0]))
+					return false;
+				$newanswers[] = $result[0];
+			}
+			$this->answers = $newanswers;
+		}
+		return true;
+	}
+}
+
Index: Dev/branches/Demo/classes/AnswerSetConnector.php
===================================================================
--- Dev/branches/Demo/classes/AnswerSetConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/AnswerSetConnector.php	(revision 225)
@@ -0,0 +1,124 @@
+<?php
+
+/**
+ * Description of AnswerSetConnector
+ *
+ * @author jkraaijeveld
+ */
+class AnswerSetConnector extends Connector{
+    protected $db;
+
+	/**
+	 * Constructor for the AnswerSetConnector
+	 */
+	public function __construct()
+	{
+		$this->fileName = 'data/answers/answersets.rdf';
+		//Ensure the required folder for this connector exists
+		if(!is_dir('data/answers'))
+			mkdir('data/answers');
+	}
+
+	/**
+	 * function get()
+	 * @param type $arguments : An array having one ore more of the following elements:
+	 * 'uid', 'survey', 'respondent', 'answers'.
+	 */
+	public function get($arguments)
+	{
+		$this->load();
+
+		//Build the query string
+		$querystring = '
+			PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+			PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+			SELECT DISTINCT ?uid, ?for_survey, ?by_respondent
+			WHERE
+			{
+				_answerset	predicates:resource_type	resources:answerset ;
+				predicates:uid ?uid ;
+				predicates:for_survey ?for_survey ;
+				predicates:by_respondent ?by_respondent ;
+				' . $this->createArguments($arguments) . '
+			}';
+		//Query the model
+		$results = $this->model->sparqlQuery($querystring);
+		$answerSets = array();
+		if(!empty($results))
+		{
+			$this->db = new DatabaseInterface();
+			foreach($results as $result)
+			{
+				$survey = $result['?for_survey']->label;
+				$respondent = $result['?by_respondent']->label;
+				$answers = 	$this->getAnswers($result['?uid']->label);
+				$answerSets[] = new AnswerSet($result['?uid']->label, $survey[0], $respondent[0], $answers);
+			}
+		}
+		return $answerSets;
+	}
+
+	/**
+	 * function getAnswers()
+	 * @param type $uid : the uid for which the answers should be retrieved.
+	 */
+	private function getAnswers($uid)
+	{
+		$result = $this->model->findRegex("[(".$uid.")]", "[(given_answer)]", null);
+		$iterator = $result->getStatementIterator();
+		$answers = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$answers[] = $element->getLabelObject();
+		}
+		return $answers;
+	}
+
+	/**
+	 * function set()
+	 * @param type $rToolObject : The ResearchToolObject to be saved.
+	 */
+	public function set($rToolObject)
+	{
+		$this->load();
+		//If evaluation fails, some references are incorrect.
+		//We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed.
+		//TODO: Decide how to fix invalid references graciously.
+		if(!$rToolObject->evaluate()) 
+			return false;
+
+		$resourceAnswerSet = new Resource(ANSWERSET . '/' . $rToolObject->uid);
+		//Remove the old value stored with the given id
+		$this->model->subtract($this->model->find($resourceAnswerSet, null, null));
+
+		//Set the new values
+		$resourceAnswerSetType = new Resource(ANSWERSET);
+		$predicateRType = new Resource(RTYPE);
+		$this->model->add(new Statement($resourceAnswerSet, $predicateRType, $resourceAnswerSetType));
+
+		$answerSetId = new Literal($rToolObject->uid);
+		$predicateId = new Resource(UID);
+		$this->model->add(new Statement($resourceAnswerSet, $predicateId, $answerSetId));
+
+		$surveyId = new Literal($rToolObject->survey->uid);
+		$predicateSurvey = new Resource(FOR_SURVEY);
+		$this->model->add(new Statement($resourceAnswerSet, $predicateSurvey, $surveyId));
+
+		$respondentId = new Literal($rToolObject->respondent->uid);
+		$predicateRespondent = new Resource(BY_RESPONDENT);
+		$this->model->add(new Statement($resourceAnswerSet, $predicateRespondent, $respondentId));
+		
+		if(isset($rToolObject->answers))
+		{
+			foreach($rToolObject->answers as $answer)
+			{
+				$answerId = new Literal($answer->uid);
+				$predicateAnswer = new Resource(GIVEN_ANSWER);
+				$this->model->add(new Statement($resourceAnswerSet, $predicateAnswer, $answerId));
+			}
+		}
+		$this->save();
+		return true;
+	}
+}
Index: Dev/branches/Demo/classes/Application.php
===================================================================
--- Dev/branches/Demo/classes/Application.php	(revision 225)
+++ Dev/branches/Demo/classes/Application.php	(revision 225)
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * Description of Application
+ *
+ * @author jkraaijeveld
+ */
+class Application extends ResearchToolObject{
+    
+    public $title;
+    public $description;
+    public $style;
+
+	/**
+	 * Constructor for an Application object
+	 * @param type $uid : The uid of the Application object.
+	 * @param type $title: The title of the Application.
+	 * @param type $description: The description of the Application.
+	 * @param type $style: The style of the Application.
+	 */
+    public function __construct($uid = null, $title = null, $description = null, $style = null) 
+    {
+        if(!isset ($uid))
+        {
+            $uid = md5(uniqid(rand(), true));
+        }
+        $this->uid = $uid;
+        $this->title = $title;
+        $this->description = $description;
+		$this->style = $style;
+	}
+	
+	public function evaluate()
+	{
+		//Do nothing, there are no references in application.
+		return true;
+	}
+}
+?>
Index: Dev/branches/Demo/classes/ApplicationConnector.php
===================================================================
--- Dev/branches/Demo/classes/ApplicationConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/ApplicationConnector.php	(revision 225)
@@ -0,0 +1,101 @@
+<?php
+
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of ApplicationConnector
+ *
+ * @author jkraaijeveld
+ */
+class ApplicationConnector extends Connector{
+    
+    /**
+     * Constructor for ApplicationConnector.
+     */
+    public function __construct()
+    {
+		$this->fileName = 'data/applications/applications.rdf';
+        //Ensure the required folder for this connector exists
+        if (!is_dir('data/applications/'))
+            mkdir('data/applications/');	
+    }
+    
+    /**
+     * function get($arguments)
+     * @param type $arguments : An array containing zero or more of the following keys:
+     * 'uid', 'title', 'description', 'style'
+     */
+    public function get($arguments) {
+        $this->load();
+
+        //Create the querystring 
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT ?uid, ?title, ?description, ?style
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+					predicates:uid ?uid ;
+					predicates:title ?title ;
+					predicates:description ?description ;
+					predicates:style ?style ; '
+                    . $this->createArguments($arguments) . ' 
+            }';
+
+        //Query the model
+        $results = $this->model->sparqlQuery($querystring);
+        $applications = array();
+        if(!empty($results))
+        {
+            //Run over all results and create appropriate Application objets
+            foreach($results as $result)
+            { 
+                    $applications[] = new Application($result['?uid']->label, $result['?title']->label, $result['?description']->label, $result['?style']->label);
+            }
+        }
+        return $applications;
+    }
+    
+    /**
+     * function set()
+     * Finds the required databaseentry matching the given object and removes
+     * it from the rdf file. Then adds the new RDF entry matching the object.
+     * @param type $rToolObject: The ResearchToolObject to be saved. 
+     */
+    public function set($rToolObject)
+    {
+        $this->load();
+        $resourceApplication = new Resource(APPLICATION.'/'.$rToolObject->uid);
+        //Remove the old value stored with the given id
+        $this->model->subtract($this->model->find($resourceApplication, null, null));
+
+        //Add the new statements to the model
+        $resourceApplicationType = new Resource(APPLICATION);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceApplication,$predicateRType,$resourceApplicationType));
+		
+        $literalApplicationID = new Literal($rToolObject->uid);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($resourceApplication,$predicateUniqueID,$literalApplicationID));
+
+        $applicationTitle = new Literal($rToolObject->title);
+        $predicateTitle = new Resource(TITLE);	
+        $this->model->add(new Statement($resourceApplication,$predicateTitle,$applicationTitle));
+
+        $applicationDescription = new Literal($rToolObject->description);
+        $predicateDescription = new Resource(DESCRIPTION);
+        $this->model->add(new Statement($resourceApplication,$predicateDescription,$applicationDescription));
+
+        $applicationStyle = new Literal($rToolObject->style);
+        $predicateStyle = new Resource(STYLE);
+        $this->model->add(new Statement($resourceApplication,$predicateStyle,$applicationStyle));
+		
+		$this->save();
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes/Connector.php
===================================================================
--- Dev/branches/Demo/classes/Connector.php	(revision 225)
+++ Dev/branches/Demo/classes/Connector.php	(revision 225)
@@ -0,0 +1,89 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Connector
+ *
+ * @author jkraaijeveld
+ */
+
+abstract class Connector implements IConnector
+{
+	protected $model;
+	protected $fileName;
+
+	/**
+	 * function load()
+	 * Loads the file into the standard MemModel
+	 */
+	public function load()
+	{
+		$this->model = ModelFactory::getDefaultModel();
+		if(file_exists($this->fileName))
+			$this->model->load($this->fileName);
+	}
+
+	/**
+	 * function save()
+	 * Saves the MemModel into the given file.
+	 */
+	public function save()
+	{
+		$this->model->saveAs($this->fileName, 'rdf');
+	}
+
+	/**
+	 * function createArguments()
+	 * @param type $arguments
+	 * Creates the arguments to be used in the query based on the
+	 * arguments specified in the incoming array.
+	 */
+	public function createArguments($arguments)
+	{
+		$argumentString = "";
+		foreach(array_keys($arguments) as $key)
+		{
+			$addition = "";
+			switch($key)
+			{
+				case "uid" : $addition = "predicates:uid '" . $arguments[$key] . "'\n"; break;
+				case "question" : $addition = "predicates:question_code '" . $arguments[$key] . "'\n"; break;
+				case "values": foreach($arguments[$key] as $value) { $addition = $addition . "predicates:answered '" . $value . "'\n"; } break;
+				case "survey" : $addition = "predicates:for_survey '" . $arguments[$key] . "'\n"; break;
+				case "respondent" : $addition = "predicates:by_respondent '" . $arguments[$key] . "'\n"; break;
+				case "answers" : foreach($arguments[$key] as $answer) { $addition = $addition . "predicates:given_answer '" . $answer . "'\n"; } break;
+				case "title" : $addition = "predicates:title '" . $arguments[$key] . "'\n"; break;
+				case "description" : $addition = "predicates:description '" . $arguments[$key] . "'\n"; break;
+				case "style" : $addition = "predicates:style '" . $arguments[$key] . "'\n"; break;
+				case "code" : $addition = "predicates:question_code '" . $arguments[$key] . "'\n";break;
+				case "type" : $addition = "predicates:question_type '" . $arguments[$key] . "'\n"; break;	
+				case "category" : $addition = "predicates:question_category '" . $arguments[$key] . "'\n";
+				case "definedanswers" : foreach($arguments[$key] as $answer) { $addition = $addition . "predicates:has_answer '" . $answer . "'\n"; } break;
+				case "name" : $addition = "predicates:name '" . $arguments[$key] . "'\n"; break;
+				case "password" : $addition = "predicates:password '" . $arguments[$key] . "'\n"; break;
+				case "creator" : $addition = "predicates:creator '" . $arguments[$key] . "'\n"; break;
+				case "creationdate" : $addition = "predicates:creationdate '" . $arguments[$key] . "'\n"; break;
+				case "applications" : foreach($arguments[$key] as $application) { $addition = $addition . "predicates:has_application '" . $application . "'\n"; } break;
+				case "surveys" : foreach($arguments[$key] as $survey) { $addition = $addition . "predicates:has_survey '" . $survey . "'\n"; } break;
+				case "answersets" : foreach($arguments[$key] as $answerset) { $addition = $addition . "predicates:has_answerset '" . $answerset . "'\n"; } break;
+				case "questions" : foreach($arguments[$key] as $question) { $addition = $addition . "predicates:has_question '" . $question . "'\n"; } break;
+				case "location" : $addition = "predicates:location '" . $arguments[$key] . "\n"; break;
+				case "facilitator" : $addition = "predicates:facilitator '" . $arguments[$key] . "\n"; break;
+				case "starttime" : $addition = "predicates:starttime '" . $arguments[$key] . "\n"; break;
+				case "endtime" : $addition = "predicates:endtime '" . $arguments[$key] . "\n"; break;
+				case "session" : $addition = "predicates:of_session '" . $arguments[$key] . "\n"; break;
+				case "resultset" : $addition = "predciates:has_resultset '" . $arguments[$key] . "\n"; break;
+			}
+			$argumentString = $argumentString . $addition;
+		}
+		return $argumentString;
+	}
+}
+
+
+
+?>
+
Index: Dev/branches/Demo/classes/DatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes/DatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes/DatabaseInterface.php	(revision 225)
@@ -0,0 +1,141 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of DatabaseInterface
+ * Initializes all the connectors, serves as only entrance and exit point
+ * for the frontend
+ * @author jkraaijeveld
+ */
+class DatabaseInterface {
+    
+    /**
+     * Constructor for the DatabaseInterface class
+     */
+    private $applicationConnector;
+    private $questionConnector;
+    private $userConnector;
+    private $surveyConnector;
+    private $respondentConnector;
+	private $answerConnector;
+	private $answerSetConnector;
+	private $sessionConnector;
+	private $sessionInstanceConnector;
+    
+    /**
+     * Constructor for DatabaseInterface.
+     * Initializes all the connectors.
+     */
+    public function __construct() {
+        $this->applicationConnector = new ApplicationConnector();
+        $this->questionConnector = new QuestionConnector();
+        $this->userConnector = new UserConnector();
+        $this->surveyConnector = new SurveyConnector();
+        $this->respondentConnector = new RespondentConnector();
+		$this->answerConnector = new AnswerConnector();
+		$this->answerSetConnector = new AnswerSetConnector();
+		$this->sessionConnector = new SessionConnector();
+		$this->sessionInstanceConnector = new SessionInstanceConnector();
+    }
+    
+    /**
+     * Get the data corresponding to the given type and arguments
+     * @param type $type
+     * @param type $arguments
+     * @return type 
+     */
+    public function get($type, $arguments = array())
+    {
+        switch(strtolower($type))
+        {
+            case "application":
+                return $this->applicationConnector->get($arguments);
+                break;
+            case "question":
+                return $this->questionConnector->get($arguments);
+                break;
+            case "user":
+                return $this->userConnector->get($arguments);
+                break;
+            case "survey":
+                return $this->surveyConnector->get($arguments);
+                break;
+            case "respondent":
+                return $this->respondentConnector->get($arguments);
+                break;
+            case "answer":
+                return $this->answerConnector->get($arguments);
+				break;
+			case "answerset":
+				return $this->answerSetConnector->get($arguments);
+				break;
+			case "session":
+				return $this->sessionConnector->get($arguments);
+				break;
+			case "sessioninstance":
+				return $this->sessionInstanceConnector->get($arguments);
+				break;
+        }
+    }
+	
+    /**
+     * Saves the given object based on its class.
+     * @param type $rToolObject 
+     */
+    public function set($rToolObject)
+    {
+        switch(get_class($rToolObject))
+        {
+            case "Application":
+                return $this->applicationConnector->set($rToolObject);
+                break;
+            case "Question":
+                return $this->questionConnector->set($rToolObject);
+                break;
+            case "User":
+                return $this->userConnector->set($rToolObject);
+                break;
+            case "Survey":
+				return $this->surveyConnector->set($rToolObject);
+				break;
+            case "Respondent":
+				return $this->respondentConnector->set($rToolObject);
+				break;
+            case "Answer":
+				return $this->answerConnector->set($rToolObject);
+				break;
+			case "AnswerSet":
+				return $this->answerSetConnector->set($rToolObject);
+				break;
+			case "Session":
+				return $this->sessionConnector->set($rToolObject);
+				break;
+			case "SessionInstance":
+				return $this->sessionInstanceConnector->set($rToolObject);
+				break;
+        }
+    }
+    
+    /**
+     * Saves all the objects in the given array, assuming they are 
+     * valid ResearchToolObjects.
+     * @param type $rToolObjects 
+     */
+    public function batchSet($rToolObjects)
+    {
+        foreach ($rToolObjects as $rToolObject)
+        {
+			if(!$this->set($rToolObject))
+				return false;
+		}
+		return true;
+    }
+
+	
+}
+
+?>
Index: Dev/branches/Demo/classes/IConnector.php
===================================================================
--- Dev/branches/Demo/classes/IConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/IConnector.php	(revision 225)
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Connector
+ *
+ * @author jkraaijeveld
+ */
+interface IConnector {
+    //This class will outline everything a Connector needs to operate within the system
+    public function get($arguments);
+    public function set($rToolObject);
+    public function load();
+    public function save();
+}
+
+?>
Index: Dev/branches/Demo/classes/Logo.php
===================================================================
--- Dev/branches/Demo/classes/Logo.php	(revision 225)
+++ Dev/branches/Demo/classes/Logo.php	(revision 225)
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Logo
+ *
+ * @author tschipper
+ */
+class Logo {
+    
+    // hardcoded logo div, image is defined in stylesheet. (#logo background:"";)
+    public function __construct() {
+        echo '<div id="logo"><a href="index.php">Research Tool</a>';
+        if (isset($_SESSION['username'])) {
+            echo '<a href="index.php" onClick="savePipeline(true);" style="display:block; font-size: 12px;">Log out</a>';
+        }
+        echo '</div>';
+    
+    }
+    
+    
+}
+
+?>
Index: Dev/branches/Demo/classes/PipelineInfoPanel.php
===================================================================
--- Dev/branches/Demo/classes/PipelineInfoPanel.php	(revision 225)
+++ Dev/branches/Demo/classes/PipelineInfoPanel.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Info panel, to the side of the Toolbox, showing various stats and links for the current pipeline.
+ *
+ * @author Thijs Schipper
+ */
+class PipelineInfoPanel {
+
+    private $linkedSequencer;
+
+    public function __construct() {
+        ?>
+        <div>
+            <div id="infoPanel" class="largeFrame">
+                <div class="largeTitle">
+                    Info
+                </div>
+                <div id="infoPanelContent" class="content">
+                    
+                </div>
+            </fieldset>
+        </div>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes/Question.php
===================================================================
--- Dev/branches/Demo/classes/Question.php	(revision 225)
+++ Dev/branches/Demo/classes/Question.php	(revision 225)
@@ -0,0 +1,45 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Question
+ *
+ * @author fpvanagthoven
+ */
+class Question extends ResearchToolObject{    
+    public $title;
+    public $type;
+    public $description;
+    public $category;
+    public $answers; // format answers['#']
+    
+    /**
+     * Constructor for a Question. $uid equals the corresponding code.
+     * @param type $uid
+     * @param type $title
+     * @param type $type
+     * @param type $description
+     * @param type $category
+     * @param type $answers 
+     */
+    public function __construct($uid, $title = null, $type = null, $description = null, $category = null, $answers = null)
+    {
+		if(!isset($uid))
+		{
+			$uid = md5(uniqid(rand(), true));
+		}
+        $this->uid = $uid;
+        $this->title = $title;
+        $this->type = $type;
+        $this->description = $description;
+        $this->category =  $category;
+        $this->answers = $answers;
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/classes/QuestionConnector.php
===================================================================
--- Dev/branches/Demo/classes/QuestionConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/QuestionConnector.php	(revision 225)
@@ -0,0 +1,137 @@
+<?php
+
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+
+/**
+ * Description of QuestionConnector
+ *
+ * @author jkraaijeveld
+ */
+class QuestionConnector extends Connector {
+    
+    
+    /**
+     * Constructor for QuestionConnector
+     */
+    public function __construct()
+    {
+		$this->fileName = 'data/questions/questions.rdf';
+        //Ensure the required folder for this connector exists
+        if (!is_dir('data/questions/'))
+            mkdir('data/questions/');	
+    }
+    
+    /**
+     * Get the questions corresponding to the arguments.
+	 * @param type $arguments : An array having one ore more of the following elements:
+	 * 'code', 'title', 'type', 'description', 'category', 'definedanswers'.
+     */
+    public function get($arguments)
+    {
+        $this->load();
+           
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT DISTINCT ?uid, ?title, ?type, ?description, ?category
+            WHERE 	
+            {
+                _question	predicates:resource_type	resources:question ;                
+                predicates:question_code ?uid ;
+                predicates:title ?title ;
+                predicates:question_type ?type ;
+                predicates:description ?description ;
+                predicates:question_category ?category ;
+				'. $this->createArguments($arguments) . '
+	}';
+
+		
+        //Create the querystring 
+        $results = $this->model->sparqlQuery($querystring);
+
+        
+        $questions = array();
+        if(!empty($results))
+        {
+            foreach($results as $result)
+            {
+                $answers = $this->getAnswers($result['?uid']->label);
+                $questions[] = new Question($result['?uid']->label, $result['?title']->label, $result['?type']->label, $result['?description']->label, $result['?category']->label, $answers);
+            }
+        }
+        return $questions;
+    }
+    
+    /**
+     * Gets the answers belonging to the given uid.
+     * @param type $uid : The uid of the Question in question (haha, pun).
+     */
+    private function getAnswers($uid)
+    {
+		$result = $this->model->findRegex("[(".$uid.")]", "[(has_answer)]", null);
+		$iterator = $result->getStatementIterator();
+		$answers = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$answers[] = $element->getLabelObject();
+		}
+		return $answers;
+
+	}
+    
+    /**
+     * Save the given ResearchTool object
+     * @param type $rToolObject : The ResearchToolObject to be saved.
+     */
+    public function set($rToolObject)
+    {
+        $this->load();
+        
+        $resourceQuestion = new Resource(QUESTION.'/'.$rToolObject->uid);        
+        //Remove the old value stored with the given id
+        $this->model->subtract($this->model->find($resourceQuestion, null, null));
+        
+        //Save all the new values
+        $resourceQuestionType = new Resource(QUESTION);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceQuestion,$predicateRType,$resourceQuestionType));
+        
+        $questionQCode = new Literal($rToolObject->uid);
+        $predicateQCode = new Resource(QCODE);
+        $this->model->add(new Statement($resourceQuestion,$predicateQCode,$questionQCode));
+        
+        $questionTitle = new Literal($rToolObject->title);
+        $predicateTitle = new Resource(TITLE);		
+        $this->model->add(new Statement($resourceQuestion,$predicateTitle,$questionTitle));	
+
+        $questionDescription = new Literal($rToolObject->description);
+        $predicateDescription = new Resource(DESCRIPTION);
+        $this->model->add(new Statement($resourceQuestion,$predicateDescription,$questionDescription));		
+
+        $resourceQuestionType = new Literal($rToolObject->type);
+        $predicateQType = new Resource(QTYPE);
+        $this->model->add(new Statement($resourceQuestion,$predicateQType,$resourceQuestionType));
+        
+        $questionQCategory = new Literal($rToolObject->category);
+        $predicateQCategory = new Resource(QCATEGORY);
+        $this->model->add(new Statement($resourceQuestion,$predicateQCategory,$questionQCategory));
+
+        if(isset($rToolObject->answers))
+        {
+            foreach($rToolObject->answers as $answer)
+            {		
+                $answerValue = new Literal($answer);
+                $predicateAnswer = new Resource(HAS_ANSWER);	
+                $this->model->add(new Statement($resourceQuestion,$predicateAnswer,$answerValue));
+            }
+        }
+        $this->save();
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes/ResearchToolObject.php
===================================================================
--- Dev/branches/Demo/classes/ResearchToolObject.php	(revision 225)
+++ Dev/branches/Demo/classes/ResearchToolObject.php	(revision 225)
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Description of ResearchToolObject
+ *
+ * @author jkraaijeveld
+ */
+abstract class ResearchToolObject {
+	public $uid;
+//Uncomment when done with creating all evaluation methods \o/////
+	public function evaluate()
+	{
+		return true;
+	}
+}
+
+?>
Index: Dev/branches/Demo/classes/Respondent.php
===================================================================
--- Dev/branches/Demo/classes/Respondent.php	(revision 225)
+++ Dev/branches/Demo/classes/Respondent.php	(revision 225)
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * Description of Respondent
+ *
+ * @author jkraaijeveld
+ */
+class Respondent {
+   public $name;
+   public $password;
+   
+   /**
+    * Constructor for a Respondent object
+    * @param type $uid 
+    * @param type $name
+    * @param type $password 
+    */
+   public function __construct($uid = null, $name = null, $password = null) {
+      if(!isset($uid))
+      {
+            $uid = md5(uniqid(rand(), true));
+      }
+      
+      $this->uid = $uid;
+      $this->name = $name;
+      $this->password = $password;
+   }
+
+}
+
+?>
Index: Dev/branches/Demo/classes/RespondentConnector.php
===================================================================
--- Dev/branches/Demo/classes/RespondentConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/RespondentConnector.php	(revision 225)
@@ -0,0 +1,91 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of RespondentConnector
+ *
+ * @author jkraaijeveld
+ */
+class RespondentConnector extends Connector{
+    
+    /**
+     * Constructor for RespondentConnector.
+     */
+    public function __construct()
+    {
+		$this->fileName = 'data/users/respondents.rdf';
+        if (!is_dir('data/users/'))
+            mkdir('data/users/');	
+    }
+    
+    /**
+     * function get()
+     * Gets the array of Respondent objects belonging to arguments supplied.
+     * @param type $arguments : An array containing zero or more of the following keys:
+     *                          'uid', 'name', 'password'
+     */
+    public function get($arguments) {
+        $this->load();
+       
+        //Create the querystring 
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT ?uid, ?name, ?password
+            WHERE 	
+            {
+                    _respondent	predicates:resource_type	resources:respondent ;
+					predicates:uid ?uid ;
+					predicates:name ?name ;
+					predicates:password ?password ;
+					' . $this->createArguments($arguments) .  '
+            }';
+        //Query the model
+        $results = $this->model->sparqlQuery($querystring);
+		$respondents = array();
+        if(!empty($results))
+        {
+            //Run over all results and create appropriate Respondent objets
+            foreach($results as $result)
+            { 
+                    $respondents[] = new Respondent($result['?uid']->label, $result['?name']->label, $result['?password']->label);
+            }
+        }
+        return $respondents;
+    }
+    
+    /**
+	 * function set()
+     * @param type $rToolObject : The ResearchToolObject to be saved.
+     */
+    public function set($rToolObject)
+    {
+        $this->load();
+        $resourceRespondent = new Resource(RESPONDENT . '/' . $rToolObject->uid);
+        //Remove the old value stored with the given id
+        $this->model->subtract($this->model->find($resourceRespondent, null, null));
+
+		//Set the new values
+        $resourceRespondentType = new Resource(RESPONDENT);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceRespondent,$predicateRType,$resourceRespondentType));
+
+        $literalRespondentID = new Literal($rToolObject->uid);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($resourceRespondent,$predicateUniqueID,$literalRespondentID));
+        
+        $literalRespondentName = new Literal($rToolObject->name);
+        $predicateName = new Resource(NAME);
+        $this->model->add(new Statement($resourceRespondent,$predicateName,$literalRespondentName));			
+
+        $literalPassword = new Literal($rToolObject->password);
+        $predicatePassword = new Resource(PASSWORD);
+        $this->model->add(new Statement($resourceRespondent,$predicatePassword,$literalPassword));
+        $this->save();
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes/Session.php
===================================================================
--- Dev/branches/Demo/classes/Session.php	(revision 225)
+++ Dev/branches/Demo/classes/Session.php	(revision 225)
@@ -0,0 +1,189 @@
+<?php
+/**
+ * Description of Session
+ *
+ * @author jkraaijeveld
+ */
+
+class Session extends ResearchToolObject
+{
+	public $title;
+	public $creator;
+	public $creationdate;
+	public $pipeline;
+
+	
+	/**
+	 * Constructor for a Session object
+	 * @param type $uid
+	 * @param type $title
+	 * @param type $creator
+	 * @param type $datetime
+	 * @param type $pipeline
+	 */
+	public function __construct($uid = null, $title = null, $creator = null, $datetime = null, $pipeline = null)
+	{
+		if(!isset($uid))
+		{
+			$uid = md5(uniqid(rand(), true));
+		}
+		$this->uid = $uid;
+		$this->title = $title;
+		$this->creator = $creator;
+		$this->creationdate = $datetime;
+		$this->pipeline = $pipeline;
+	}
+
+	/*
+	 * function evaluate(()
+	 * Evaluates all the references of this object.
+	 */
+	public function evaluate()
+	{
+		$dbi = new DatabaseInterface();
+		if(is_string($this->creator))
+		{
+			$result = $dbi->get("user", array("uid" => $this->creator));
+			if(!isset($result[0]))
+				return false;
+			$this->creator = $result[0];
+		}
+		if(!empty($this->pipeline) && is_string($this->pipeline[0]))
+		{
+			$newPipeline = array();
+			foreach($this->pipeline as $element)
+			{
+				//Check if the element's UID can be found in surveys, if not: 
+				//Check applications. If it isn't in either: invalid reference.
+				$result = $dbi->get("survey", array("uid" => $element));
+				if(!isset($result[0]))
+					$result = $dbi->get("application", array("uid" => $element));
+				if(!isset($result[0]))
+					return false;
+				$newPipeline[] = $result[0];
+			}
+			$this->pipeline = $newPipeline;
+		}
+		return true;
+	}
+
+	/**
+	 * function toSPSS
+	 * @param type $location
+	 * Writes an SPSS parseable file at the given location, named '$datetime_$title.txt'
+	 * One big note about toSPSS: If this session contains multiple instances of THE SAME Survey,
+	 * the world burns, people die, etcetera. (or, in a more fortunate case, the latest values
+	 * are written to the file whilst the others get lost.
+	 */
+	//DO NOT USE - BROKEN AS OF 23/12/2011
+	public function toSPSS($location)
+	{
+		$this->evaluate();
+		if(!is_dir($location))
+		{
+			mkdir($location);
+		}
+		//Create the filename, open the file at the given location
+		$fileName = $this->datetime->format("d-m-Y") . "_" . $this->title . ".txt";
+
+		//Make a list of all 'column headers', e.g. "respondent" and all the question codes.
+		$headers = array();
+		$headers[] = "respondent";
+		foreach ($this->pipeline as $element)
+		{
+			if(get_class($element) == "Survey")
+			{
+				$element->evaluate();
+				foreach($element->questions as $question)
+				{
+					//TODO: This might need fixing after lazy initialization refactoring.
+					$headers[] = $element->title . '_' . $question->uid;
+				}
+			}
+		}
+		//Return if there are no surveys.
+		if(count($headers) < 2)
+			return;
+		
+		//Get the answers for all respondents
+		$answers = $this->getAnswers($headers);
+
+		//Create the strings and write to file.
+		$headerString = "";
+		foreach($headers as $headerElement)
+		{
+			$headerString = $headerString . $headerElement . "\t";
+		}
+		$fileHandler = fopen($location . '/' . $fileName, 'w') or die("File in use");
+		fwrite($fileHandler, $headerString . "\n");
+		foreach($answers as $entry)
+		{
+			$entryString = "";
+			//PHP doesn't automatically sort the indices so I have to do it myself
+			//Entry elements can now be printed in order to match the headers
+			for ($i = 0; $i < count($headers); $i++)
+			{
+				if(in_array($i, array_keys($entry)))
+					$entryString = $entryString . $entry[$i] . "\t";	
+				else
+					$entryString = $entryString . "\t";
+			}
+			fwrite($fileHandler, $entryString . "\n");	
+		}
+	}
+
+	/*
+	 * function getAnswers
+	 * @param type $headers
+	 * Based on the questions specified in the headers array, matches the answers of every
+	 * respondent to the correct questions and returns an array containing a list of answers per 
+	 * respondent
+	 */
+	private function getAnswers($headers)
+	{
+		//Add the answers per survey per respondent. Requires some extra looping to assure proper ordering.
+		//Keeps a list of respondents which have already been used. If an answerset exists for a respondent which
+		//already exists within the answers-array, use the index of the respondent. Else: make a new row.
+		$respondentsUsed = array();
+		$answers = array();
+		foreach($this->answersets as $answerset)
+		{
+			$entryIndex;
+			if(in_array($answerset->respondent->name, $respondentsUsed))
+			{
+				$entryIndex = array_search($answerset->respondent->name, $respondentsUsed);
+				$entry = $answers[$entryIndex];
+			}
+			else
+			{
+				$entry = array();
+				$entry[0] = $answerset->respondent->name;
+				$entryIndex = count($respondentsUsed);
+				$respondentsUsed[] = $answerset->respondent->name;
+			}
+			foreach ($answerset->answers as $answer)
+			{
+				$index = array_search($answerset->survey->title . '_' . $answer->question->uid, $headers);
+				//Index has to be a good number, else the answer doesn't belong in this session
+				//Causes might be a missing question or having a wrong survey
+				if($index != 0)
+				{
+					$value = "";
+					foreach ($answer->values as $val)
+					{
+						$value = $value . $val . ",";
+					}
+					//We all hate trailing commas
+					if (strlen($value) > 0) { $value = substr($value, 0, strlen($value)-1); }
+					$entry[$index] = $value;
+				}
+			}
+			$answers[$entryIndex] = $entry;
+		}
+		return $answers;
+	}
+
+}	
+
+
+?>
Index: Dev/branches/Demo/classes/SessionConnector.php
===================================================================
--- Dev/branches/Demo/classes/SessionConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/SessionConnector.php	(revision 225)
@@ -0,0 +1,172 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of SessionConnector
+ *
+ * @author jkraaijeveld
+ */
+class SessionConnector extends Connector  
+{
+	protected $db;
+
+	/**
+	 * Constructor for the SessionConnector
+	 */
+	public function __construct()
+	{
+		$this->fileName = 'data/sessions/sessions.rdf';
+		//Ensure the required folder for this connector exists
+		if(!is_dir('data/sessions'))
+			mkdir('data/sessions');
+	}
+
+	/**
+	 * function get()
+	 * @param type $arguments : An array containing one or more of the following elements:
+	 * 'uid', 'title', 'creationdate', 'applications', 'surveys'
+	 */
+	public function get($arguments)
+	{
+		$this->load();
+	
+		//Build the query string
+		$querystring = '
+			PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+			PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+			SELECT DISTINCT ?uid, ?title, ?creator, ?creationdate
+			WHERE
+			{
+				_session predicates:resource_type resources:session ;
+				predicates:uid ?uid ;
+				predicates:title ?title ;
+				predicates:creator ?creator ;
+				predicates:creationdate ?creationdate ;
+				' . $this->createArguments($arguments) . '
+			}';
+		//Query the model
+		$results = $this->model->sparqlQuery($querystring);
+		$sessions = array();
+		if(!empty($results))
+		{
+			$this->db = new DatabaseInterface();
+			foreach($results as $result)
+			{
+				//Create a session object out of every result, get all required fields as well.
+				$pipeline = $this->getPipeline($result['?uid']->label);
+				$creator = $result['?creator']->label;
+				$creationdate = new DateTime();
+				$creationdate->setTimestamp(intval($result['?creationdate']->label));
+				$sessions[] = new Session($result['?uid']->label, $result['?title']->label, $creator, $creationdate, $pipeline);
+			}
+		}
+		return $sessions;
+	}
+	/**
+	 * function getPipeline()
+	 * param type $uid : The Session uid for which the pipeline should be retrieved.
+	 */
+	private function getPipeline($uid)
+	{
+		$result = $this->model->findRegex("[(".$uid.")]", "[(has_application)|(has_survey)]" ,null);
+		$iterator = $result->getStatementIterator();
+		$pipeline = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$pipeline[] = $element->getLabelObject();
+		}
+		return $pipeline;
+	}
+
+	/**
+	 * function getAnswerSets()
+	 * @param type $uid : The Session uid for which the answerSets should be retrieved.
+	 */
+	private function getAnswerSets($uid)
+	{
+		$result = $this->model->findRegex("[(".$uid.")]", "[(has_answerset)]" ,null);
+		$iterator = $result->getStatementIterator();
+		$answersets = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$answersets[] = $element->getLabelObject();
+		}
+		return $answersets;
+	}
+
+	/**
+	 * function set()
+	 * @param type $rToolObjects : The ResearchToolObject to be saved.
+	 */
+	public function set($rToolObject)
+	{
+		$this->load();
+		//If evaluation fails, some references are incorrect.
+		//We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed.
+		//TODO: Decide how to fix invalid references graciously.
+		if(!$rToolObject->evaluate()) 
+			return false;
+
+		$resourceSession = new Resource(SESSION . '/' . $rToolObject->uid);
+		//Remove the old value stored with the given id
+		$this->model->subtract($this->model->find($resourceSession, null, null));
+
+		//Set the new values
+		$resourceSessionType = new Resource(SESSION);
+		$predicateType = new Resource(RTYPE);
+		$this->model->add(new Statement($resourceSession, $predicateType, $resourceSessionType));
+
+		$sessionId = new Literal($rToolObject->uid);
+		$predicateId = new Resource(UID);
+		$this->model->add(new Statement($resourceSession, $predicateId, $sessionId));
+
+		$sessionTitle = new Literal($rToolObject->title);
+		$predicateTitle = new Resource(TITLE);
+		$this->model->add(new Statement($resourceSession, $predicateTitle, $sessionTitle));
+
+		$sessionCreator = new Literal($rToolObject->creator->uid);
+		$predicateCreator = new Resource(CREATOR);
+		$this->model->add(new Statement($resourceSession, $predicateCreator, $sessionCreator));
+
+		$sessionTimestamp = new Literal($rToolObject->creationdate->getTimestamp());
+        //      $sessionTimestamp = new Literal($rToolObject->datetime);    // Edit of above function, allows for creation of session, but still results in errors...
+        $predicateTimestamp = new Resource(CREATIONDATE);
+		$this->model->add(new Statement($resourceSession, $predicateTimestamp, $sessionTimestamp));
+
+		//Create a sequence to store the different applications and surveys.
+		if(isset($rToolObject->pipeline))
+		{
+			foreach($rToolObject->pipeline as $element)
+			{
+				$sessionObject = new Literal($element->uid);
+				$predicateObject = null;
+				if(get_class($element) == "Application")
+					$predicateObject = new Resource(HAS_APPLICATION);
+				else if(get_class($element) == "Survey")
+					$predicateObject = new Resource(HAS_SURVEY);
+				if(isset($predicateObject))
+					$this->model->add(new Statement($resourceSession, $predicateObject, $sessionObject));
+			}
+		}
+
+		if(isset($rToolObject->answersets))
+		{
+			foreach($rToolObject->answersets as $answerset)
+			{
+				$sessionAnswerSet = new Literal($answerset->uid);
+				$predicateAnswerSet = new Resource(HAS_ANSWERSET);
+				$this->model->add(new Statement($resourceSession, $predicateAnswerSet, $sessionAnswerSet));
+			}
+		}
+
+		$this->save();
+		return true;
+	}
+}
+?>
+
Index: Dev/branches/Demo/classes/SessionInstance.php
===================================================================
--- Dev/branches/Demo/classes/SessionInstance.php	(revision 225)
+++ Dev/branches/Demo/classes/SessionInstance.php	(revision 225)
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Description of SessionInstance
+ *
+ * @author jkraaijeveld
+ */
+
+class SessionInstance extends ResearchToolObject
+{
+	public $title;
+	public $location;
+	public $facilitator;
+	public $starttime;
+	public $endtime;
+	public $notes;
+	public $session;
+	public $resultset;
+
+	/**
+	 * Constructor for a SessionInstance object
+	 * @param type $uid
+	 * @param type $title
+	 * @param type $location
+	 * @param type $facilitator
+	 * @param type $starttime
+	 * @param type $endtime
+	 * @param type $notes
+	 * @param type $session
+	 * @param type $resultset
+	 */
+	public function __construct($uid = null, $title = null, $location = null, $facilitator = null, $starttime = null, $endtime = null, $notes = null, $session = null, $resultset = null)
+	{
+		if(!isset($uid))
+		{
+			$uid = md5(uniqid(rand(), true));
+		}
+		$this->uid = $uid;
+		$this->title = $title;
+		$this->location = $location;
+		$this->facilitator = $facilitator;
+		$this->starttime = $starttime;
+		$this->endtime = $endtime;
+		$this->notes = $notes;
+		$this->session = $session;
+		$this->resultset = $resultset;
+	}
+
+	/*
+	 * function evaluate()
+	 * Evaluates all the references of this object.
+	 */
+	public function evaluate()
+	{
+		$dbi = new DatabaseInterface();
+		if(is_string($this->facilitator))
+		{
+			$result = $dbi->get("user", array("uid" => $this->facilitator));
+			if(!isset($result[0]))
+				return false;
+			$this->facilitator = $result[0];
+		}
+
+		if(is_string($this->session))
+		{
+			$result = $dbi->get("session", array("uid" => $this->session));
+			if(!isset($result[0]))
+				return false;
+			$this->session = $result[0]; 
+		}
+
+		if(is_string($this->resultset))
+		{
+			$result = $dbi->get("resultset", array("uid" => $this->resultset));
+			if(!isset($result[0]))
+				return true;
+			$newResultSets[] = $result[0];
+		}
+		return true;
+	}
+			
+
+}
Index: Dev/branches/Demo/classes/SessionInstanceConnector.php
===================================================================
--- Dev/branches/Demo/classes/SessionInstanceConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/SessionInstanceConnector.php	(revision 225)
@@ -0,0 +1,182 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of SessionInstanceConnector
+ *
+ * @author jkraaijeveld
+ */
+class SessionInstanceConnector extends Connector  
+{
+	protected $db;
+
+	/**
+	 * Constructor for the SessionInstanceConnector.
+	 */
+
+	public function __construct()
+	{
+		$this->fileName = 'data/sessions/sessioninstances.rdf';
+		//Ensure the required folder for this connector exists.
+		if(!is_dir('data/sessions'))
+			mkdir('data/sessions');
+	}
+
+	/**
+	 * function get()
+	 * @param type $arguments : An array containing one or more of the following elements:
+	 * 'uid', 'title', 'location', 'facilitator', 'starttime', 'endtime' 'notes', 'session', 'resultset'
+	 */
+	public function get($arguments)
+	{
+		$this->load();
+
+		//Build the query string
+		$querystring = '
+			PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+			PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+			SELECT DISTINCT ?uid, ?title, ?location, ?facilitator, ?starttime, ?endtime, ?of_session, ?has_resultset 
+			WHERE
+			{
+				_sessioninstance predicates:resource_type resources:sessioninstance ;
+				predicates:uid ?uid ;
+				predicates:title ?title ;
+				predicates:location ?location ;
+				predicates:facilitator ?facilitator ;
+				predicates:starttime ?starttime ;
+				predicates:endtime ?endtime ;
+				predicates:of_session ?of_session ;
+				' . $this->createArguments($arguments) . '
+	}';
+		//Query the model
+		$results = $this->model->sparqlQuery($querystring);
+		$sessioninstances = array();
+		if(!empty($results))
+		{	
+			$this->db = new DatabaseInterface();
+			foreach($results as $result)
+			{
+				//Create a SessionInstance object out of every result. Get all the required fields as well.
+				$notes = $this->getNotes($result['?uid']->label);
+				$resultset = $this->getResultSet($result['?uid']->label);
+				$starttime = new DateTime();
+				$starttime->setTimestamp(intval($result['?starttime']->label));
+				$endtime = new DateTime();
+				$endtime->setTimestamp(intval($result['?endtime']->label));
+				$sessioninstances[] = new SessionInstance(  
+					$result['?uid']->label,
+					$result['?title']->label,
+					$result['?location']->label,
+					$result['?facilitator']->label,
+					$starttime,
+					$endtime,
+					$notes,
+					$result['?of_session'],
+					$resultset
+				);
+			}
+		}
+		return $sessioninstances;
+	}
+	
+	/**
+	 * function getNotes()
+	 * param type $uid : The SessionInstance uid for which the notes should be retrieved.
+	 */
+	public function getNotes($uid)
+	{
+		$result = $this->model->findRegex("[(".$uid.")]", "[(has_note)]", null);
+		$iterator = $result->getStatementIterator();
+		$notes = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$notes[] = $element->getLabelObject();
+		}
+		return $notes;
+	}
+
+	/**
+	 * function getResultSet($uid)
+	 * param type $uid : The SessionInstance uid for which the ResultSet should be gotten.
+	 */
+	public function getResultSet($udi)
+	{
+		//TODO: Implement when ResultSet is in.
+		return null;
+	}
+
+	/**
+	 * function set()
+	 * @param type $rToolObject: The ResearchToolObject to be saved.
+	 */
+	public function set($rToolObject)
+	{
+		$this->load();
+		//If evaluation fails, some references are incorrect.
+		//We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed.
+		//TODO: Decide how to fix invalid references graciously.
+		if(!$rToolObject->evaluate()) 
+			return false;
+		$resourceSInstance = new Resource(SESSIONINSTANCE . '/' . $rToolObject->uid);
+		//Remove the old value stored with the given id
+		$this->model->subtract($this->model->find($resourceSInstance, null, null));
+
+		//Set the new values
+		$resourceSInstanceType = new Resource(SESSIONINSTANCE);
+		$predicateType = new Resource(RTYPE);
+		$this->model->add(new Statement($resourceSInstance, $predicateType, $resourceSInstanceType));
+
+		$sInstanceId = new Literal($rToolObject->uid);
+		$predicateId = new Resource(UID);
+		$this->model->add(new Statement($resourceSInstance, $predicateId, $sInstanceId));
+
+		$sInstanceTitle = new Literal($rToolObject->title);
+		$predicateTitle = new Resource(TITLE);
+		$this->model->add(new Statement($resourceSInstance, $predicateTitle, $sInstanceTitle));
+
+		$sInstanceLocation = new Literal($rToolObject->location);
+		$predicateLocation = new Resource(LOCATION);
+		$this->model->add(new Statement($resourceSInstance, $predicateLocation, $sInstanceLocation));
+
+		$sInstanceFacilitator = new Literal($rToolObject->facilitator->uid);
+		$predicateFacilitator = new Resource(FACILITATOR);
+		$this->model->add(new Statement($resourceSInstance, $predicateFacilitator, $sInstanceFacilitator));
+
+		$sInstanceStartTime = new Literal($rToolObject->starttime->getTimestamp());
+		$predicateStartTime = new Resource(STARTTIME);
+		$this->model->add(new Statement($resourceSInstance, $predicateStartTime, $sInstanceStartTime));
+
+		$sInstanceEndTime = new Literal($rToolObject->endtime->getTimestamp());
+		$predicateEndTime = new Resource(ENDTIME);
+		$this->model->add(new Statement($resourceSInstance, $predicateEndTime, $sInstanceEndTime));
+
+		if(isset($rToolObject->notes))
+		{
+			foreach($rToolObject->notes as $note)
+			{
+				$sInstanceNote = new Literal($note);
+				$predicateNote = new Resource(HAS_NOTE);
+				$this->model->add(new Statement($resourceSInstance, $predicateNote, $sInstanceNote));
+			}
+		}
+
+		$sInstanceSession = new Literal($rToolObject->session->uid);
+		$predicateSession = new Resource(OF_SESSION);
+		$this->model->add(new Statement($resourceSInstance, $predicateSession, $sInstanceSession));
+
+		if(isset($rToolObject->resultset))
+		{
+			//$sInstanceResultSet = new Literal($rToolObject->resultset->uid);
+			$sInstanceResultSet = new Literal($rToolObject->resultset);
+			$predicateResultSet = new Resource(HAS_RESULTSET);
+			$this->model->add(new Statement($resourceSInstance, $predicateResultSet, $sInstanceResultSet));
+		}
+		$this->save();
+		return true;
+	}
+}
+?>
Index: Dev/branches/Demo/classes/StyleSheet.php
===================================================================
--- Dev/branches/Demo/classes/StyleSheet.php	(revision 225)
+++ Dev/branches/Demo/classes/StyleSheet.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Standard stylesheet class
+ *
+ * @author tschipper
+ */
+class StyleSheet {
+
+    public $filename; // includes path
+
+    public function __construct($styleName) {
+
+        // call new StyleSheet("standard") to load css/standard.css
+        $this->path = "css/" . $styleName . ".css";
+
+        echo '<link rel="Stylesheet" type="text/css" href="css/resetstyle.css" />';
+        echo '<link rel="Stylesheet" type="text/css" href="' . $this->path . '"/>';
+        
+        echo "\n";
+    }
+
+    public function ChangeStyle($styleName) {
+        $this->path = "css/" . $styleName . ".css";
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/classes/Survey.php
===================================================================
--- Dev/branches/Demo/classes/Survey.php	(revision 225)
+++ Dev/branches/Demo/classes/Survey.php	(revision 225)
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * Description of Survey
+ *
+ * @author jkraaijeveld
+ */
+class Survey extends ResearchToolObject{
+    public $title;
+    public $description;
+    public $creator;
+    public $questions;
+    
+    public function __construct($uid = null, $title = null, $description = null, $creator = null, $questions = null) {
+        if(!isset($uid))
+        {
+            $uid = md5(uniqid(rand(), true));
+        }
+        $this->uid = $uid;
+        $this->title = $title;
+		$this->description = $description;
+		$this->creator = $creator;
+        $this->questions = $questions;
+	}
+
+	/**
+	 * function evaluate()
+	 * Evaluates the references
+	 */
+	public function evaluate()
+	{
+		$dbi = new DatabaseInterface();
+		if(is_string($this->creator))
+		{
+			$result = $dbi->get("user", array("uid" => $this->creator));	
+			if(!isset($result[0]))
+				return false;
+			$this->creator = $result[0];
+		}
+
+		if(!empty($this->questions) && is_string($this->questions[0]))
+		{
+			$newQuestions = array();
+			foreach($this->questions as $question)
+			{
+				$result = $dbi->get("question", array("uid" => $question));
+				if(!isset($result[0]))
+					return false;
+				$newQuestions[] = $result[0];			
+			}
+			$this->questions = newQuestions;
+		}
+		return true;
+	}
+}
+
+?>
Index: Dev/branches/Demo/classes/SurveyConnector.php
===================================================================
--- Dev/branches/Demo/classes/SurveyConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/SurveyConnector.php	(revision 225)
@@ -0,0 +1,135 @@
+<?php
+
+/**
+ * Description of SurveyConnector
+ *
+ * @author jkraaijeveld
+ */
+class SurveyConnector extends Connector{
+    protected $db;
+
+    /**
+     * Constructor for ApplicationConnector.
+     */
+    public function __construct()
+    {
+		$this->fileName = 'data/surveys/surveys.rdf';
+        //Ensure the required folder for this connector exists
+        if (!is_dir('data/surveys/'))
+            mkdir('data/surveys/');	
+    }
+    
+    /**
+     * function get($arguments)
+     * Gets the array of Survey objects belonging to arguments supplied.
+     * @param type $arguments : An array containing zero or more of the following keys:
+     *                          'uid', 'title', 'description', 'questions'
+     * Note: questions has to be an array of question IDs (codes) for this filter to work.
+     */
+    public function get($arguments)
+    {
+        $this->load();
+        
+        //Build the query string
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT DISTINCT ?uid, ?title, ?description, ?creator
+            WHERE
+            {
+                _survey     predicates:resource_type    resources:survey ;
+                predicates:uid ?uid ;
+                predicates:title ?title ;
+				predicates:description ?description ;
+				predicates:creator ?creator ;
+				' . $this->createArguments($arguments) . '
+            }';
+        
+        //Query the model
+        $results = $this->model->sparqlQuery($querystring);
+        
+        //Create the corresponding Survey objects
+        $surveys = array();
+        if(!empty($results))
+        {
+            $this->db = new DatabaseInterface();
+            foreach($results as $result)
+            {
+				$questions = $this->getQuestions($result['?uid']->label);
+				$creator = $result['?creator']->label;
+                $surveys[] = new Survey($result['?uid']->label, $result['?title']->label, $result['?description']->label, $creator[0], $questions);
+            }
+        }
+        return $surveys;
+    }
+    
+    /**
+     * Gets the questions corresponding to the survey
+     * @param type $uid : The uid for which the questions should be gotten.
+     */
+    private function getQuestions($uid)
+    {
+		$result = $this->model->findRegex("[(".$uid.")]", "[(has_question)]", null);
+		$iterator = $result->getStatementIterator();
+		$questions = array();
+		while($iterator->hasNext())
+		{
+			$element = $iterator->next();
+			$questions[] = $element->getLabelObject();
+		}
+		return $questions;
+    }
+    
+    /**
+     * Saves the given Survey object.
+     * @param type $rToolObject : The ResearchToolObject to be saved.
+     */
+    public function set($rToolObject)
+    {
+        $this->load();
+        
+		//If evaluation fails, some references are incorrect.
+		//We shouldn't save in this case. Instead - let the user know. This function returns false if the evaluation has failed.
+		//TODO: Decide how to fix invalid references graciously.
+		if(!$rToolObject->evaluate()) 
+			return false;
+
+        $resourceSurvey = new Resource(SURVEY.'/'.$rToolObject->uid);
+        //Remove the old value stored with the given id
+        $this->model->subtract($this->model->find($resourceSurvey, null, null));
+        
+        $resourceSurveyType = new Resource(SURVEY);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceSurvey,$predicateRType,$resourceSurveyType));
+
+        $predicateUniqueID = new Resource(UID);
+        $literalSurveyID = new Literal($rToolObject->uid);
+        $this->model->add(new Statement($resourceSurvey,$predicateUniqueID,$literalSurveyID));
+
+        $predicateTitle = new Resource(TITLE);		
+        $surveyTitle = new Literal($rToolObject->title);
+        $this->model->add(new Statement($resourceSurvey,$predicateTitle,$surveyTitle));		
+
+        $predicateDescription = new Resource(DESCRIPTION);
+        $surveyDescription = new Literal($rToolObject->description);
+        $this->model->add(new Statement($resourceSurvey,$predicateDescription,$surveyDescription));
+        
+		$predicateCreator = new Resource(CREATOR);
+		$surveyCreator = new Literal($rToolObject->creator->uid);
+		$this->model->add(new Statement($resourceSurvey, $predicateCreator, $surveyCreator));
+
+        if(isset($rToolObject->questions))
+        {
+            foreach($rToolObject->questions as $question)
+            {
+                $questionUid = new Literal($question->uid);
+                $predicateQuid = new Resource(HAS_QUESTION);
+                $this->model->add(new Statement($resourceSurvey,$predicateQuid,$questionUid));
+            }
+		}
+		$this->save();
+		return true;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes/Toolbox.php
===================================================================
--- Dev/branches/Demo/classes/Toolbox.php	(revision 225)
+++ Dev/branches/Demo/classes/Toolbox.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of ToolBox
+ *
+ * @author HP
+ */
+class Toolbox {
+
+    public function __construct() {
+        ?>
+
+        <br />
+
+        <div id="toolbox" class="largeFrame">
+            <div class="largeTitle">Toolbox</div>
+            <div class="content">
+                <p style="float: left; clear:both; margin-bottom: 1em;">Add new:</p>
+                <div class="bigButton toolbox" onClick="submitToolbox('Survey');"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p></div>
+                <div class="bigButton toolbox" onClick="submitToolbox('Application');"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p></div>
+                <div class="bigButton toolbox" onClick="submitToolbox('Dashboard');"><img src="images/icons/dashboard.png" class="buttonIcon" /><p>Dashboard</p></div>
+            </div>
+        </div>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes/User.php
===================================================================
--- Dev/branches/Demo/classes/User.php	(revision 225)
+++ Dev/branches/Demo/classes/User.php	(revision 225)
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * Description of User
+ *
+ * @author jkraaijeveld
+ */
+
+class User extends ResearchToolObject {
+    
+    public $name;
+    public $password;
+    
+    /**
+     * Constructor of User
+     * If the user does not yet exist in the database, call with null as first parameter
+     */
+    public function __construct($uid = null, $name = null, $password = null) {
+        if(!isset($uid))
+        {
+             $uid = md5(uniqid(rand(), true));
+        }
+        $this->uid = $uid;
+        $this->name = $name;
+        $this->password = $password;
+	}
+}
+
+?>
Index: Dev/branches/Demo/classes/UserConnector.php
===================================================================
--- Dev/branches/Demo/classes/UserConnector.php	(revision 225)
+++ Dev/branches/Demo/classes/UserConnector.php	(revision 225)
@@ -0,0 +1,90 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of UserConnector
+ *
+ * @author jkraaijeveld
+ */
+class UserConnector extends Connector{
+    
+    /**
+     * Constructor for UserConnector.
+     */
+    public function __construct()
+    {
+		$this->fileName = 'data/users/users.rdf';
+        //Ensure the required folder for this connector exists
+        if (!is_dir('data/users/'))
+            mkdir('data/users/');	
+    }
+    
+    /**
+     * function get($arguments)
+     * Gets the array of User objects belonging to arguments supplied.
+     * @param type $arguments : An array containing zero or more of the following keys:
+     *                          'uid', 'name', 'password'
+     */
+    public function get($arguments) {
+        $this->load();
+        //Create the querystring 
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT ?uid, ?name, ?password
+            WHERE 	
+            {
+                    _user	predicates:resource_type	resources:user ;
+					predicates:uid ?uid ;
+					predicates:name ?name ;
+					predicates:password ?password ;
+					' . $this->createArguments($arguments) . '
+            }';
+        //Query the model
+		$results = $this->model->sparqlQuery($querystring);
+        $users = array();
+        if(!empty($results))
+        {
+            //Run over all results and create appropriate Application objets
+            foreach($results as $result)
+            { 
+                    $users[] = new User($result['?uid']->label, $result['?name']->label, $result['?password']->label);
+            }
+        }
+        return $users;
+    }
+    
+    /**
+     * Save the given User object in the file.
+     * @param type $rToolObject 
+     */
+    public function set($rToolObject)
+    {
+        $this->load();
+        $resourceUser = new Resource(USER . '/' . $rToolObject->uid);
+        //Remove the old value stored with the given id
+        $this->model->subtract($this->model->find($resourceUser, null, null));
+
+        $resourceUserType = new Resource(USER);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceUser,$predicateRType,$resourceUserType));
+
+        $literalUserID = new Literal($rToolObject->uid);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($resourceUser,$predicateUniqueID,$literalUserID));
+        
+        $literalUserName = new Literal($rToolObject->name);
+        $predicateName = new Resource(NAME);
+        $this->model->add(new Statement($resourceUser,$predicateName,$literalUserName));			
+
+        $literalPassword = new Literal($rToolObject->password);
+        $predicatePassword = new Resource(PASSWORD);
+        $this->model->add(new Statement($resourceUser,$predicatePassword,$literalPassword));
+        $this->save();
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes/dbDataSelectionWidget.php
===================================================================
--- Dev/branches/Demo/classes/dbDataSelectionWidget.php	(revision 225)
+++ Dev/branches/Demo/classes/dbDataSelectionWidget.php	(revision 225)
@@ -0,0 +1,36 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of dbDataSelectionWidget
+ *
+ * @author CPS
+ */
+class dbDataSelectionWidget {
+
+    //Properties
+    
+    public $sessions;
+    public $gamedata;
+
+    public function __construct() {
+        $dbi = new DatabaseInterface();
+        
+        $this->sessions = $dbi->get("Session", array());
+        $this->gamedata = $dbi->get("Application", array());
+    }
+
+    public function Javascript() {
+        ?>
+        <script type='text/javascript' src="js/generalScripts.js"></script>
+        <script type='text/javascript' src="js/dashboardScripts.js"></script>
+        <?php
+
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes/master.php
===================================================================
--- Dev/branches/Demo/classes/master.php	(revision 225)
+++ Dev/branches/Demo/classes/master.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * Description of master
+ * 
+ * For autoloading of classes for example.
+ *
+ * @author fpvanagthoven
+ */
+// Determine our absolute document root
+define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
+
+/* Session */
+session_name("cpsft");   // Set a session name
+session_start();  // Start the session
+
+function __autoload($class_name) {
+    require 'classes/' . $class_name . '.php';
+}
+
+
+// Redirects user to $url
+function redirect($url = null)
+{
+	if (is_null($url))
+		$url = $_SERVER['PHP_SELF'];
+
+	header("Location: $url");
+	exit();
+}
+
+
+?>
Index: Dev/branches/Demo/classes/sessionEditorWidget.php
===================================================================
--- Dev/branches/Demo/classes/sessionEditorWidget.php	(revision 225)
+++ Dev/branches/Demo/classes/sessionEditorWidget.php	(revision 225)
@@ -0,0 +1,113 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * A visual interface object for editing and viewing a session's pipeline.
+ *
+ * @author Tschipper
+ */
+class SessionEditorWidget {
+
+    // properties
+    private $loadedSession;
+    private $selectedStep;
+    private $dbi;
+
+    public function __construct() {
+        $this->dbi = new DatabaseInterface();
+    }
+
+    public function init() {
+        $stringPipeline = "";
+        $stringPipelineType = "";
+        $stringPipelineUpdated = "";
+        $numberOfSteps = 0;
+
+        if (is_array($this->loadedSession->pipeline)) {
+            foreach ($this->loadedSession->pipeline as $object) {
+                $stringPipeline .= "$object->uid,";
+                $stringPipelineType .= get_class($object) . ",";
+                $stringPipelineUpdated .= "0,";
+                $numberOfSteps++;
+            }
+        } else {
+            $stringPipeline = $this->loadedSession->pipeline;
+            $stringPipelineType = $_POST['pipelineTypes'];
+            $stringPipelineUpdated = $_POST['pipelineUpdatedField'];
+        }
+        ?>
+        <br />
+
+        <div id="sequencer" class="largeFrame">
+            <div class="largeTitle">Name <?php echo $this->loadedSession->title; ?></div>
+            
+            <div id="seqContent" class="innerLargeFrame">
+                <div id="seqContentWrapper"></div>
+            </div>
+
+            <div class="controls">
+                <input type="button" id="moveSelectedL" value="< Move" class="smallButton"  onClick="moveStep(-1);" />
+                <input type="button" id="moveSelectedR" value="Move >" class="smallButton"  onClick="moveStep(1);" />
+                <input type="button" id="editSelected" value="Edit step" class="smallButton" onClick="editStep();" />
+                <input type="button" id="deleteSelected" value="Delete step" class="smallButton" onClick="deleteStep();" />
+                <input type="submit" id ="clearPipeline" name="clearPipeline" value="Clear pipeline" class="smallButton dis" disabled="true"/>
+                <input type="checkbox" id="confirmClear" name="confirmClear" onChange="IsCheckEnabled(this, document.getElementById('clearPipeline'));" />Really clear?
+                <input type="button" value="debug_save" onClick="savePipeline(true);" />
+            </div>
+            
+            <div id="hiddenInputs">
+                <input type="hidden" id="selectedStepField" value="" />
+                <input type="hidden" id="pipelineStringField" value="<?php echo $stringPipeline; ?>" />
+                <input type="hidden" id="pipelineTypeField" value="<?php echo $stringPipelineType; ?>" />
+                <input type="hidden" id="pipelineUpdatedField" value="<?php echo $stringPipelineUpdated; ?>" />
+                <input type="hidden" id="numSteps" value="<?php echo $numberOfSteps; ?>" />
+                <input type="hidden" id="sessionField" value="<?php echo $this->loadedSession->uid; ?>" />
+                <input type="hidden" id="sessionTitleField" value="<?php echo $this->loadedSession->title; ?>" />
+            </div>
+        </div>
+
+        
+        <?php
+    }
+
+    public function Javascript() {
+        ?>
+        <script type="text/javascript" src="js/generalScripts.js"></script>
+        <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/jquery.js"></script>
+        <script type="text/javascript">
+            $(document).ready(function() {
+                loadSequencer();
+            });
+        </script>
+        <?php
+    }
+
+    public function LoadSession() {   // Initialize variables on page load.
+		// Redirect if no session is set
+        if (!isset($_SESSION['currentSession'])) {
+            redirect("selectSession.php");
+        }
+        // Store the current session in internal variable
+        $results = $this->dbi->get("Session", array("uid"=> $_SESSION['currentSession']));
+		print_r($results);
+        if (!empty($results)) {
+            if ($results[0]->evaluate()) {
+                $this->loadedSession = $results[0];
+            }
+        }
+        else {
+            // Throw error and quit if no results found
+            die("No session with that UID found!");
+        }
+    }
+
+    public function HandlePostData() {
+                
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes/surveyEditorWidget.php
===================================================================
--- Dev/branches/Demo/classes/surveyEditorWidget.php	(revision 225)
+++ Dev/branches/Demo/classes/surveyEditorWidget.php	(revision 225)
@@ -0,0 +1,107 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * The PHP class that implements the survey editor interface
+ *
+ * @author Thijs Schipper
+ */
+class SurveyEditorWidget {
+
+    private $loadedSurvey;
+    private $dbi;
+
+    public function __construct() {
+        // Set basic variables
+        // Should probably include a default empty survey for the sake of safety
+        $dbi = new DatabaseInterface();
+    }
+
+    public function handlePost() {
+        // Get POSTed data and store variables to class instance properties
+        $dbi = new DatabaseInterface();
+        if (isset($_POST['objectUid']) && !empty($_POST['objectUid'])) {
+            $surveyResults = $dbi->get("Survey", array("uid" => $_POST['objectUid']));
+            if (!empty($surveyResults)) {
+                $this->loadedSurvey = $surveyResults[0];
+            } else {
+                die("No surveys found!");
+            }
+        } else {
+            die("Incorrect or null uid passed!");
+        }
+    }
+
+    public function init() {
+        $questionString = "";
+        foreach ($this->loadedSurvey->questions as $question) {
+            $questionString .= $question->code . ",";
+        }
+        // echo the HTML markup to display the editor on the screen
+        ?>
+
+        <div id="surveyEditor" class="largeFrame">
+            <div class="largeTitle" id="surveyTitle">
+                <?php echo $this->loadedSurvey->title; ?>
+            </div>
+            <div id="seqContent" class="innerLargeFrame">
+                <div id="seqContentWrapper">
+
+                </div>
+            </div>
+            <div id="surveyEditorVertControls" class="vertControls">
+                <div class="segment">
+                    <label>Move</label>
+                    <input type="button" id="vertControls_MoveUp" class="bigButton vertical" value="Ë" />
+                    <input type="button" id="vertControls_MoveDown" class="bigButton vertical" value="Ë
+" />
+                </div>
+                <input type="button" id="vertControls_Add" class="bigButton vertical" value="+" onClick="addQuestion_Click();" />
+            </div>
+            <div id="surveyEditorControls" class="controls">
+                <div id="pageControls">
+                    <input type="button" value="<<" id="pageControls_first" onClick="" />
+                    <input type="button" value="<" id="pageControls_previous" onClick="" />
+                    Page <input type="text" value="1" id="pageControls_current" onChange="" class="smallTextField" /> of 5
+                    <input type="button" value=">" id="pageControls_next" onClick="" />
+                    <input type="button" value=">>" id="pageControls_last" onClick="" />
+                </div>
+
+                <input type="button" value="Discard survey" onClick="javascript:alert('discard not yet supported');" class="smallButton" />
+                <input type="button" value="Save survey" onClick="saveSurvey(true);" class="smallButton" />
+            </div>
+
+        </div>
+
+
+        <form id="hiddenInputs">
+            <input type="hidden" id="surveyUidField" value="<?php echo $this->loadedSurvey->uid; ?>" />
+            <input type="hidden" id="questionUidsField" value="<?php echo $questionString ?>" />
+            <input type="hidden" id="surveyTitleField" value="<?php echo $this->loadedSurvey->title; ?>" />
+            <input type="hidden" id="numQuestionsField" value="<?php echo count($this->loadedSurvey->questions); ?>" />
+            <input type="hidden" id="surveyDescriptionField" value="<?php echo $this->loadedSurvey->description; ?>" />
+        </form>
+
+
+        <?php
+    }
+
+    public function javascript() {
+        // output the javascript tags and needed functions in the head of the page
+        ?>
+        <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/generalscripts.js"></script>
+        <script type="text/javascript" src="js/jquery.js"></script>
+        <script type="text/javascript">
+            $(document).ready(function() {
+                loadSequencer();
+            });
+        </script>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/Application.php
===================================================================
--- Dev/branches/Demo/classes_old/Application.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Application.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * Description of Application
+ *
+ * @author fpvanagthoven
+ */
+class Application {
+    
+    public $id;
+    public $title;
+    public $description;
+    public $style;
+
+    public function __construct($id = null, $title = null, $description = null, $style = null) 
+    {
+        $this->id = $id;
+        $this->title = $title;
+        $this->description = $description;
+	$this->style = $style;
+    }
+    
+    public static function getApplication($info)
+    {
+        return new Application(
+                $info['applicationID'],
+                $info['applicationTitle'],
+                $info['applicationDescription'],
+                $info['applicationStyle']);
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/ApplicationCreationTool.php
===================================================================
--- Dev/branches/Demo/classes_old/ApplicationCreationTool.php	(revision 225)
+++ Dev/branches/Demo/classes_old/ApplicationCreationTool.php	(revision 225)
@@ -0,0 +1,92 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of ApplicationCreationTool
+ *
+ * @author fpvanagthoven
+ */
+class ApplicationCreationTool {
+
+    private $application;
+
+    public function __construct($application = null) {
+        $this->application = $application;
+
+        $this->javascript();
+
+        $this->init();
+    }
+
+    private function javascript() {
+        ?>
+        <script type="text/javascript" src="js/creation.js"></script>
+        <script language="JavaScript" type="text/javascript">
+            function save(id){
+                var form = document.getElementById('applicationCreationForm');
+                var applicationUID = id;
+                                        
+                var applicationIDInput = document.createElement('input');
+                applicationIDInput.name = 'applicationUID';
+                applicationIDInput.value = applicationUID;
+                applicationIDInput.type = 'hidden';
+                                
+                form.appendChild(applicationIDInput);
+                                
+                form.submit();
+            }
+        </script>
+        <?php
+    }
+
+    private function init() {
+        ?>
+        <div id="creation">
+            <form id="applicationCreationForm" action="" method="post">
+                <?php
+                $this->title();
+                $this->description();
+
+                $this->save();
+                ?>
+            </form>
+        </div>
+        <?php
+    }
+
+    private function title() {
+        if (isset($this->application->title))
+            $value = $this->application->title;
+        else
+            $value = 'Untitled Application';
+        ?>
+        <input type="text" id="applicationTitle" class="titleBox" name="applicationTitle" value="<?php echo str_replace("\"", "&quot;", $value); ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" />
+        <?php
+    }
+
+    private function description() {
+        if (isset($this->application->description))
+            $value = $this->application->description;
+        else
+            $value = 'Write a description for this application here.';
+        ?>
+        <textarea id="applicationDescription" class="descriptionBox" name="applicationDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea>
+        <?php
+    }
+
+    private function save() {
+        if (isset($this->application)) {
+            $id = $this->application->id;
+        } else {
+            $id = null;
+        }
+        ?>
+        <input type="button" onclick="save('<?php echo $id; ?>')" class="surveyButton topRight" value="Save" />
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/ApplicationDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/ApplicationDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/ApplicationDatabaseInterface.php	(revision 225)
@@ -0,0 +1,77 @@
+<?php
+
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+
+
+class ApplicationDatabaseInterface
+{		
+    protected $applicationRDFWriter;
+    protected $applicationRDFReader;
+
+    protected $applicationID;
+
+
+    public function __construct($applicationID)
+    {		
+        if($applicationID == null)
+            $this->applicationID = md5( uniqid(rand(), true) );
+        else
+            $this->applicationID = $applicationID;
+			
+        $this->applicationRDFWriter = new ApplicationRDFWriter($this->applicationID);
+        $this->applicationRDFReader = new ApplicationRDFReader();
+    }
+    
+    public function getApplicationID()
+    {
+        return $this->applicationID;
+    }
+
+    public function setApplicationInfo($applicationInfo)
+    {
+        $appTitle = $applicationInfo['applicationTitle'];
+        $appDescription = $applicationInfo['applicationDescription'];
+        $appStyle = null;
+
+        $this->applicationRDFWriter->setApplicationInfo($appTitle, $appDescription, $appStyle);
+
+        $this->applicationRDFWriter->saveApplications();
+    }
+
+    public function getApplicationInfo($applicationID)
+    {
+        $applicationInfo = array();
+
+        $resultApplication = $this->applicationRDFReader->readApplicationInfo($applicationID);
+        
+        $applicationInfo['applicationID'] = $applicationID;
+        $applicationInfo['applicationTitle'] = $resultApplication[0]['?title']->label;
+        $applicationInfo['applicationDescription'] = $resultApplication[0]['?description']->label;
+        $applicationInfo['applicationStyle'] = $resultApplication[0]['?style']->label;
+        return $applicationInfo;
+    }
+
+    public function getExistingApplications()
+    {
+        $applicationInfo = array();
+
+        $resultApplication = $this->applicationRDFReader->readAllApplications();
+        if($resultApplication[0] != false)
+        {
+            for($aNumber = 0;$aNumber<sizeof($resultApplication[0]);$aNumber++)
+            {
+                $aID = $resultApplication[0][$aNumber]['?uid']->label;
+                $aTitle = $resultApplication[1][$aNumber]['?title']->label;
+                $applicationInfo[$aID] = $aTitle;
+            }
+        }
+
+        return $applicationInfo;
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/ApplicationMenu.php
===================================================================
--- Dev/branches/Demo/classes_old/ApplicationMenu.php	(revision 225)
+++ Dev/branches/Demo/classes_old/ApplicationMenu.php	(revision 225)
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * Description of ApplicationMenu
+ *
+ * @author fpvanagthoven
+ */
+class ApplicationMenu extends Menu {
+
+    public function __construct($applications) {
+        ?><fieldset class="menu"><?php
+        parent::__construct('Application');
+        ?> <div class="menuButtons"> <?php
+        ApplicationMenu::createApplicationButton();
+        ApplicationMenu::loadApplicationButton();
+        ?> </div> <?php
+        ApplicationMenu::loadApplicationList($applications);
+        ?></fieldset><?php
+    }
+
+    public static function createApplicationButton() {
+        ?>
+
+        <form action="applicationcreation.php" method="post">
+
+            <input type="submit" value="New" class="surveyButton bigSurveyButton" />
+
+        </form>
+
+        <?php
+    }
+
+    /**
+     *
+     * @param Survey $surveys An array of surveys
+     */
+    public static function loadApplicationButton() {
+        ?>
+        <form id="loadApplicationForm" action="applicationcreation.php" method="post">
+            <input type="button" onclick="loadApplication()" value="Load / Edit" class="surveyButton bigSurveyButton" />
+        </form>
+
+
+        <?php
+    }
+
+    public static function loadApplicationList($applications) {
+        ?>
+        <select id="applicationsToLoad" class="toLoad" size="1000">
+            <?php
+            if (!empty($applications)) {
+                foreach ($applications as $application) {
+                    ?><option value='<?php echo $application->id; ?>'><?php echo $application->title; ?></option><?php
+            }
+        }
+            ?>
+        </select>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/ApplicationRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/ApplicationRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/ApplicationRDFReader.php	(revision 225)
@@ -0,0 +1,127 @@
+<?php
+
+class ApplicationRDFReader
+{
+    protected $model;
+    protected $fileName;
+
+    public function __construct()
+    {
+        $this->fileName = 'data/applications/applications.rdf';
+    
+        $this->reloadApplications();
+    }
+    
+    public function reloadApplications()
+    {
+        // Create empty MemModel   
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+        
+        if(file_exists($this->fileName))
+            $this->model->load($this->fileName);
+    }
+
+    public function readApplicationInfo($applicationID)
+    {        
+        $this->reloadApplications();
+        
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?title ?description ?style
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:uid			"' . $applicationID . '"	;
+                                        predicates:title 		?title 	;
+                                        predicates:description		?description	;
+                                        predicates:style		?style
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readAllApplications()
+    {
+        $result = array();
+        $result[] = $this->readApplicationIDs();
+        $result[] = $this->readApplicationTitles();				
+        $result[] = $this->readApplicationDescriptions();
+        $result[] = $this->readApplicationStyles();
+
+        return $result;
+    }
+
+    public function readApplicationIDs()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?uid
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:uid			?uid
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readApplicationTitles()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?title
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:title 		?title 
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readApplicationDescriptions()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?description
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:description		?description	
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readApplicationStyles()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?style
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:style		?style
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/ApplicationRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/ApplicationRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/ApplicationRDFWriter.php	(revision 225)
@@ -0,0 +1,56 @@
+<?php
+
+class ApplicationRDFWriter
+{
+    protected $model;
+    protected $fileName = 'data/applications/applications.rdf';
+
+    public function __construct($applicationID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->applicationID = $applicationID;		
+        
+        if (!is_dir('data/applications/'))
+            mkdir('data/applications/');	
+        
+        if(file_exists($this->fileName))
+            $this->model->load($this->fileName);
+    }	
+
+    public function saveApplications()
+    {	
+        $this->model->saveAs($this->fileName,'rdf'); 
+    }
+
+    public function setApplicationInfo($aTitle, $aDescription, $aStyle)
+    {              
+        $resourceApplication = new Resource(APPLICATION.'/'.$this->applicationID);
+        //remove the old values...
+        $this->model->subtract($this->model->find($resourceApplication, null, null));        
+       
+        //...and add the new ones!
+        $resourceApplicationType = new Resource(APPLICATION);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceApplication,$predicateRType,$resourceApplicationType));
+        $literalApplicationID = new Literal($this->applicationID);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($resourceApplication,$predicateUniqueID,$literalApplicationID));
+
+        $applicationTitle = new Literal($aTitle);
+        $predicateTitle = new Resource(TITLE);	
+        $this->model->add(new Statement($resourceApplication,$predicateTitle,$applicationTitle));
+
+        $applicationDescription = new Literal($aDescription);
+        $predicateDescription = new Resource(DESCRIPTION);
+        $this->model->add(new Statement($resourceApplication,$predicateDescription,$applicationDescription));
+
+        $applicationStyle = new Literal($aStyle);
+        $predicateStyle = new Resource(STYLE);
+        $this->model->add(new Statement($resourceApplication,$predicateStyle,$applicationStyle));
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/DashboardCreationDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/DashboardCreationDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/DashboardCreationDatabaseInterface.php	(revision 225)
@@ -0,0 +1,65 @@
+<?php
+
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+class DashboardCreationDatabaseInterface
+{    
+    protected $dashboardRDFWriter;
+    protected $dashboardRDFReader;
+    
+    public function __construct($dashID)
+    {
+        if($dashID == null)
+            $dashboardID = md5( uniqid(rand(), true) );
+        else
+            $dashboardID = $dashID;
+        
+        $this->dashboardRDFWriter = new DashboardRDFWriter($dashboardID);
+        $this->dashboardRDFReader = new DashboardRDFReader($dashboardID);
+    }
+    
+    public function setDashboardInfo($dashboard,$user)
+    {
+        $dTitle = $dashboard['dashboardTitle'];
+        $dDescription = $dashboard['dashboardDescription'];
+        
+        $dCreatorID = $user['username'];
+        
+        $this->dashboardRDFWriter->createDashboard($dTitle, $dDescription, $dCreatorID);
+        
+        $gNumber = 1;
+        while (isset($dashboard['graphTitle'.$gNumber]))
+        {
+            if (isset($dashboard['graphID'.$gNumber]))
+                $gID = $dashboard['graphID'.$gNumber];
+            else
+                $gID = md5( uniqid(rand(), true) );
+            $gTitle = $dashboard['graphTitle'.$gNumber];
+            $gDescription = $dashboard['graphDescription'.$gNumber];
+            
+            $gTypes = array();
+            $tNumber = 1;
+            while(isset($dashboard['g'.$gNumber.'type'.$tNumber]))
+            {
+                $gTypes[] = $dashboard['g'.$gNumber.'type'.$tNumber];
+                $tNumber++;
+            }
+            $gData = array();
+            $dNumber = 1;
+            while(isset($dashboard['g'.$dNumber.'datatype'.$tNumber]) && isset($dashboard['g'.$gNumber.'dataid'.$dNumber]))
+            {
+                $dData = array();
+                $dData['type'] = $dashboard['g'.$gNumber.'datatype'.$dNumber];
+                $dData['id'] = $dashboard['g'.$gNumber.'dataid'.$dNumber];
+                $gData[] = $dData;
+                $dNumber++;
+            }
+        }
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/DashboardRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/DashboardRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/DashboardRDFReader.php	(revision 225)
@@ -0,0 +1,151 @@
+<?php
+
+class DashboardRDFReader
+{
+    protected $model;
+
+    protected $dashboardID;
+    protected $filePath;
+
+    public function __construct($dashboardID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->dashboardID = $dashboardID;
+        $this->filePath = 'data/dashboards/dashboard_'.$this->dashboardID.'.rdf';
+    }
+    
+    public function loadDashboard()
+    {
+        if(file_exists($this->filePath))
+        {
+            $this->model->load($this->filePath);
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+    
+    public function getDashboardInfo()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?uid ?title ?description ?creator
+            WHERE 	
+            {
+                    _dashboard	predicates:resource_type	resources:dashboard ;
+                                predicates:uid			?uid	;
+                                predicates:title 		?title 	;
+                                predicates:description		?description ;
+                                predicates:creator		?creator
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function readDashboardGraphs()
+    {
+        $result = array();
+        $result[] = $this->readSDashboardGraphsTitle();				
+        $result[] = $this->readDashboardGraphsDescription();
+
+        return $result;
+    }
+
+    public function readDashboardGraphsTitle()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?graphTitle
+            WHERE 
+            {	
+                    _graph	predicates:resource_type	resources:graph ;
+                                predicates:title		?graphTitle 		
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readDashboardGraphsDescription()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?graphDescription
+            WHERE 
+            {	
+                    _graph	predicates:resource_type	resources:graph ;
+                                predicates:description		?graphDescription 		
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readDashboardGraphsID()
+    {
+        $querystring = '
+            PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT 	?graphID
+            WHERE 
+            {	
+                    _graph	predicates:resource_type	resources:graph ;
+                                predicates:uid			?graphID				
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readGraphTypes($graphID)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?type
+            WHERE 
+            {
+                    _graph	predicates:resource_type	resources:graph ;
+                                predicates:uid			"' . $graphID . '"  ;
+                                predicates:graph_type		?type
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function readGraphData($graphID)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?datatype ?dataid
+            WHERE 
+            {
+                    _graph	predicates:resource_type	resources:graph ;
+                                predicates:uid			"' . $graphID . '"  .
+                    _data       predicates:has_data             resources:data  ;
+                                predicates:data_type		?datatype   ;
+                                predicates:uid                  ?dataid
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/DashboardRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/DashboardRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/DashboardRDFWriter.php	(revision 225)
@@ -0,0 +1,95 @@
+<?php
+
+class DashboardRDFWriter 
+{
+    protected $model;
+
+    protected $resourceDashboard;
+    protected $dashboardID;
+
+    protected $filePath;
+
+    public function __construct($dashboardID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->dashboardID = $dashboardID;	
+        $this->filePath = 'data/dashboards/';
+        if (!is_dir($this->filePath))
+            mkdir($this->filePath);	
+    }	
+
+    public function saveDashboard()
+    {	
+        $this->model->saveAs($this->filePath.'dashboard_'.$this->dashboardID.'.rdf','rdf');
+    }
+    
+    public function createDashboard($dTitle, $dDescription, $dCreatorID)
+    {
+        $this->resourceDashboard = new Resource(DASHBOARD.'/'.$this->dashboardID);
+
+        $resourceDashboardType = new Resource(DASHBOARD);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($this->resourceDashboard,$predicateRType,$resourceDashboardType));
+
+        $literalDashboardID = new Literal($this->dashboardID);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($this->resourceDashboard,$predicateUniqueID,$literalDashboardID));
+
+        $predicateTitle = new Resource(TITLE);		
+        $dashboardTitle = new Literal($dTitle);
+        $this->model->add(new Statement($this->resourceDashboard,$predicateTitle,$dashboardTitle));		
+
+        $predicateDescription = new Resource(DESCRIPTION);
+        $dashboardDescription = new Literal($dDescription);
+        $this->model->add(new Statement($this->resourceDashboard,$predicateDescription,$dashboardDescription));
+        
+        $predicateCreator = new Resource(CREATOR);
+        $userID = new Literal($dCreatorID);
+        $this->model->add(new Statement($this->resourceDashboard,$predicateCreator,$userID));
+    }
+    
+    public function addGraph($gID,$gTitle,$gDescription,$gTypes,$gData)
+    {
+        $resourceGraph = new Resource(GRAPH);
+        
+        $predicateTitle = new Resource(TITLE);		
+        $graphTitle = new Literal($gTitle);
+        $this->model->add(new Statement($resourceGraph,$predicateTitle,$graphTitle));		
+
+        $predicateDescription = new Resource(DESCRIPTION);
+        $graphDescription = new Literal($gDescription);
+        $this->model->add(new Statement($resourceGraph,$predicateDescription,$graphDescription));
+        
+        $predicateUniqueID = new Resource(UID);
+        $graphID = new Literal($gID);
+        $this->model->add(new Statement($resourceQuestion,$predicateUniqueID,$graphID));
+        
+        $predicateGraphType = new Resource(GRAPH_TYPE);
+        foreach($gTypes as $gType)
+        {
+            $graphType = new Literal($gType);
+            $this->model->add(new Statement($resourceGraph,$predicateGraphType,$gType));
+        }
+        
+        $predicateData = new Resource(HAS_DATA);
+        foreach($gData as $gThis)
+        {
+            $resourceData = new Resource(DATA);
+            $this->model->add(new Statement($resourceGraph,$predicateData,$resourceData));
+            
+            $dataType = new Literal($gThis['type']);
+            $predicateDataType = new Resource(DATA_TYPE);
+            $this->model->add(new Statement($resourceData,$predicateDataType,$dataType));
+            
+            $dataID = new Literal($gThis['id']);
+            $this->model->add(new Statement($resourceData,$predicateUniqueID,$dataID));            
+        }
+        
+        $predicateHasGraph = new Resource(HAS_GRAPH);
+        $this->model->add(new Statement($this->resourceDashboard,$predicateHasGraph,$resourceGraph));
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/DashboardTool.php
===================================================================
--- Dev/branches/Demo/classes_old/DashboardTool.php	(revision 225)
+++ Dev/branches/Demo/classes_old/DashboardTool.php	(revision 225)
@@ -0,0 +1,98 @@
+<?php
+
+/**
+ * Description of DashboardTool
+ *
+ * @author Frans
+ */
+class DashboardTool {
+
+    private $surveys;
+    private $gamedata;
+
+    public function __construct($surveys, $gamedata = null) {
+        $this->surveys = $surveys;
+        $this->gamedata = $gamedata;
+
+        $this->init();
+    }
+
+    private function init() {
+        $this->visualizeSurvey();
+    }
+
+    private function visualizeSurvey() {
+        foreach ($this->surveys as $survey) {
+            $surveyResults = $survey->results;
+
+            /* iterate at the same time through these arrays */
+            $questions = $survey->questions;
+            $questionResults = $surveyResults->getQuestionResults();
+            ?>
+            <div class="resultsDiv borderRadius padding1em">
+                <?php
+                $i = 0;
+                while (isset($questions[$i])) {
+                    ?><div class="resultDiv"><?php        
+                    $this->displayQuestion($questions[$i]);
+                    $this->visualizeResult($questionResults[$i]);
+                    ?></div><?php
+                    
+                    $i++;
+                }
+                ?>
+            </div>
+                <?php
+            }
+        }
+
+        private function visualizeResult($questionResult) {
+            
+        $this->displayVisualization($questionResult);
+        $this->displayChangeVisualizationBar();
+            
+    }
+
+    private function displayQuestion($question) {
+        echo $question->title;
+        echo "<br />";
+        echo $question->description;
+    }
+
+    private function displayVisualization($questionResult) {
+        $type = $questionResult->getType();
+        
+        switch ($type) {
+            case 0:
+                $value = "TEXT";
+
+                break;
+            case 1:
+                $value = "INTEGER";
+                break;
+            case 2:
+                $value = "MULT. CHOICE";
+                break;
+            case 3:
+                $value = "CHECKBOXES";
+                break;
+            case 4:
+                $value = "SCALE";
+                break;
+            default:
+                break;
+        }
+        echo $value;
+        
+        foreach($questionResult->answers as $answer)
+        {
+            echo "<br />" . $answer;
+        }
+    }
+
+    private function displayChangeVisualizationBar() {
+        
+    }
+
+}
+    ?>
Index: Dev/branches/Demo/classes_old/Loader.php
===================================================================
--- Dev/branches/Demo/classes_old/Loader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Loader.php	(revision 225)
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * Helper class to load arrays of objects from the database.
+ *
+ * @author fpvanagthoven
+ */
+class Loader {
+
+    public static function load($info, $classname) {
+        $theArray = array();
+        
+        foreach ($info as $id => $title)
+        {
+            $object = new $classname($id, $title);
+            array_push($theArray, $object);
+        }
+        
+        return $theArray;
+    }
+
+    /**
+     *
+     * @return array Array of Surveys with id and title
+     */
+    public static function loadSurveys() {
+    
+        $surveyDBI = new SurveyCreationDatabaseInterface(null);
+        $surveyIDTitles = $surveyDBI->getExistingSurveys();
+
+        return Loader::load($surveyIDTitles, "Survey");
+    }
+
+    public static function loadApplications() {
+        $applicationDBI = new ApplicationDatabaseInterface(null);
+        $applicationTitles = $applicationDBI->getExistingApplications();
+
+        return Loader::load($applicationTitles, "Application");
+    }
+
+    public static function loadSessions() {
+        $sessionDBI = new SessionCreationDatabaseInterface(null);
+        $sessionTitles = $sessionDBI->getExistingSessions();
+
+        return Loader::load($sessionTitles, "Session");
+    }
+
+    public static function loadQuestions() {
+        $questionDBI = new QuestionCreationDatabaseInterface();
+        $questionCodesAndTitles = $questionDBI->getExistingQuestions();
+
+        return Loader::load($questionCodesAndTitles, "Question");
+    }
+    
+    public static function loadFullQuestions() {
+        $questionDBI = new QuestionCreationDatabaseInterface();
+        $questionCodesAndTitles = $questionDBI->getExistingQuestions();
+        
+        $questions = array();
+        
+        foreach ($questionCodesAndTitles as $code => $title) {
+            $info = $questionDBI->getQuestionInfo($code);
+            $question = Question::getQuestion($code, $info);
+            
+            array_push($questions, $question);
+        }
+        
+        return $questions;
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/classes_old/Logo.php
===================================================================
--- Dev/branches/Demo/classes_old/Logo.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Logo.php	(revision 225)
@@ -0,0 +1,21 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Logo
+ *
+ * @author fpvanagthoven
+ */
+class Logo {
+
+    public function __construct() {
+        ?>
+        <div id="logo"><a href="index.php">CPSFacilitator Tool</a></div>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/Menu.php
===================================================================
--- Dev/branches/Demo/classes_old/Menu.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Menu.php	(revision 225)
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * Description of Menu
+ *
+ * @author fpvanagthoven
+ */
+class Menu {
+
+    private $title;
+
+    public function __construct($title) {
+        $this->title = $title;
+
+        $this->menuTitle();
+    }
+
+    public function menuTitle() {
+        ?>
+        <legend><h2><?php echo $this->title; ?></h2></legend>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/Question.php
===================================================================
--- Dev/branches/Demo/classes_old/Question.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Question.php	(revision 225)
@@ -0,0 +1,57 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Question
+ *
+ * @author fpvanagthoven
+ */
+class Question {    
+    public $code;
+    public $title;
+    public $type;
+    public $description;
+    public $answers; // format answers['#']
+    public $category;
+    
+    public function __construct($code, $title = null, $type = null, $description = null)
+    {
+        $this->code = $code;
+        $this->title = $title;
+        $this->type = $type;
+        $this->description = $description;
+        $this->answers = array();
+    }
+    
+    /* reminder that constructor doesn't contain category haha */
+    public function setCategory($category)
+    {
+        $this->category = $category;
+    }
+    
+    public static function getQuestion($code, $info)
+    {
+        $question = new Question($code);
+        $question->title = $info['questionTitle'];
+        $question->type = $info['questionType'];
+        if(isset($info['questionDescription']))
+            $question->description = $info['questionDescription'];
+        $question->category = $info['questionCategory'];
+        
+        $i = 1;
+        while (isset($info['ans' . $i]))
+        {
+            array_push($question->answers, $info['ans' . $i]);
+            $i++;
+        }
+        
+        return $question;
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/classes_old/QuestionCreationDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/QuestionCreationDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/QuestionCreationDatabaseInterface.php	(revision 225)
@@ -0,0 +1,117 @@
+<?php
+
+
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+/**
+ * Description of QuestionCreationDatabaseInterface
+ *
+ * @author basvannuland
+ */
+class QuestionCreationDatabaseInterface {
+   
+    protected $questionRDFWriter;
+    protected $questionRDFReader;
+    
+    public function __construct()
+    {
+        $this->questionRDFWriter = new QuestionRDFWriter();
+        $this->questionRDFReader = new QuestionRDFReader();
+    }
+    
+    public function setQuestionInfo($question)
+    {
+        $qCode = $question['questionCode'];
+        $qTitle = $question['questionTitle'];
+        $qDescription = $question['questionDescription'];
+        $qType = $question['questionType'];
+        $qCategory = $question['questionCategory'];
+
+        $qAnswers = array();
+        $aNumber = 1;
+        while (isset($question['ans'.$aNumber]))
+        {
+            $qAnswers[] = $question['ans'.$aNumber];
+
+            $aNumber++;
+        }
+
+        if($this->checkQuestionCodeExists($qCode))
+        {
+            return 'Question code (' . $qCode . ') already in use. Please try a new code.';
+        }
+        else {
+            $this->questionRDFWriter->createQuestion($qTitle,$qDescription,$qType,$qCode,$qCategory,$qAnswers);
+            $this->questionRDFWriter->saveQuestions(); 
+            return 'Question saved';
+        }         
+    }
+    
+    public function getQuestionInfo($qCode)
+    {
+        $questionInfo = array();
+        
+        $question = $this->questionRDFReader->readQuestionByCode($qCode);
+        
+        $questionInfo['questionTitle'] = $question['title'][0]['?questionTitle']->label;
+        $questionInfo['questionDescription'] = $question['description'][0]['?questionDescription']->label;
+        $questionInfo['questionType'] = $question['type'][0]['?questionType']->label;
+        $questionInfo['questionCategory'] = $question['category'][0]['?questionCategory']->label;
+        if ($question['answers'] != null)
+        {
+            for($aNumber = 1;$aNumber<=sizeof($question['answers']);$aNumber++)
+            {
+                $questionInfo['ans'.$aNumber] = $question['answers'][$aNumber-1]['?answerDescription']->label;
+            }
+        }
+        
+        return $questionInfo;
+    }
+    
+    public function getExistingQuestions()
+    {
+        $questions = array();
+
+        $resultQuestions = $this->questionRDFReader->readQuestionCodes();
+        $this->questionRDFReader->reloadQuestions();
+        if ($resultQuestions != null)
+        {
+            foreach ($resultQuestions as $questionCodeObject)
+            {
+                $questionCode = $questionCodeObject['?questionCode']->label;
+                $questionTitle = $this->questionRDFReader->readQuestionTitle($questionCode);
+                $questions[$questionCode] = $questionTitle[0]['?questionTitle']->label;
+            }
+        }
+
+        return $questions;
+    }
+    
+    public function checkQuestionCodeExists($qCode)
+    {
+        $result = false;
+
+        $questionCodes = $this->questionRDFReader->readQuestionCodes();
+        
+        if ($questionCodes != null)
+        {
+            foreach($questionCodes as $questionCode)
+            {
+                $code = $questionCode['?questionCode']->label;
+                if(!strcmp($code ,$qCode))
+                {
+                    $result = true;
+                    break;
+                }
+            }
+        }
+
+        return $result;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/QuestionCreationTool.php
===================================================================
--- Dev/branches/Demo/classes_old/QuestionCreationTool.php	(revision 225)
+++ Dev/branches/Demo/classes_old/QuestionCreationTool.php	(revision 225)
@@ -0,0 +1,473 @@
+<?php
+
+/**
+ * Tool that displays a list and an edit panel
+ *
+ * @author fpvanagthoven
+ */
+class QuestionCreationTool {
+
+    private $questions;
+
+    public function __construct($questions) {
+        $this->questions = $questions;
+
+        $this->loadQuestionsToJavascript();
+        $this->javascript();
+        $this->displayList();
+        $this->displayEditPanel();
+    }
+    
+    /**
+     * Loads the questions that PHP retrieved from database
+     * into javascript. This is done so that the page does not need
+     * to refresh in order to load an entire question in to the form.
+     * 
+     * The javascript array will have question codes as keys.
+     * The value is a javascript Question object that gets created from
+     * the PHP object.
+     */
+    private function loadQuestionsToJavascript()
+    {
+//        ?><script type="text/javascript">
+        document.questions = array();
+        
+        //<?php
+//        foreach ($this->questions as $question) {
+//            ?>
+            
+            
+            
+            //<?php
+//        }
+//        ?></script><?php
+    }
+
+    private function javascript() {
+        ?>
+        <script type="text/javascript">
+            function handleType(select)
+            {
+                var type = select.valueOf().value;
+                clearSpecifications();
+                                                                                                        
+                /* set answerCount for options */
+                document.getElementById("answerSpecifications").answerCount = 1;
+                                                                                                        
+                switch (type) {
+                    case "text":
+                        break;
+                    case "mc":
+                        addOption();
+                        break;
+                    case "int":
+                        minMax();
+                        break;
+                    case "checkboxes":
+                        addOption();
+                        break;
+                    case "scale":
+                        minMaxIncr();
+                        break;
+                    default:
+                                                                                                                
+                        break;
+                }
+
+            }
+                                                                                                    
+            function clearSpecifications()
+            {
+                var specs = document.getElementById("answerSpecifications");
+                specs.innerHTML = "";
+                specs.clicked = null;
+                specs.lastAnswer = null;
+                                                                                        
+                var questionType = document.getElementById("questionType");
+                var buttons = document.getElementById("questionButtons");
+                if(buttons != null)
+                    questionType.removeChild(buttons);
+            }
+                                                                                                    
+            function addOption()
+            {                       
+                var specs = document.getElementById("answerSpecifications");
+                                                                                                        
+                addAddRemoveOptionButtonsOnce(specs);
+                addAnswerInput(specs);
+                                                                                                        
+            }
+                                                                                                    
+            function removeOption()
+            {
+                var specs = document.getElementById("answerSpecifications");
+                                                                                                        
+                if(specs.lastAnswer.prev != null)
+                {
+                    specs.removeChild(specs.lastAnswer);
+                    specs.lastAnswer = specs.lastAnswer.prev;
+                    specs.answerCount--;
+                }
+            }
+                                                                                                    
+            function addAnswerInput(specs)
+            {
+                var answerCount = specs.answerCount;
+                                                                                                        
+                /* set value for option textbox */
+                var optionStr = "Option " + answerCount;
+                                                                                                        
+                /* the input textbox */
+                var answerInput = document.createElement("input");
+                answerInput.setAttribute("type", "text");
+                answerInput.setAttribute("name", "ans" + answerCount);
+                answerInput.setAttribute("value", optionStr);
+                answerInput.className = "answerInput";
+                                                                                                        
+                specs.appendChild(answerInput);
+                                                                                                        
+                /* Singly linked list */
+                answerInput.prev = specs.lastAnswer; // remember last one
+                specs.lastAnswer = answerInput; // new lastAnswer
+                                                                                                        
+                specs.answerCount++;               
+            }
+                                                                                                    
+            function addAddRemoveOptionButtonsOnce(specs)
+            {
+                if (specs.clicked == null)
+                {
+                    var buttonsDiv = document.createElement("div");
+                    buttonsDiv.id = "questionButtons";
+                    buttonsDiv.style.display = "inline";
+                    var typeBox = document.getElementById("questionType");
+                    typeBox.appendChild(buttonsDiv);
+                                                                                            
+                    addAddOptionButton(buttonsDiv);                                  
+                    addRemoveOptionButton(buttonsDiv);
+                                                                                                            
+                    specs.clicked = true;
+                }
+            }
+                                                                                                    
+            function addAddOptionButton(buttonsDiv)
+            {    
+                var addOpt = document.createElement("input");
+                addOpt.setAttribute("type", "button");
+                addOpt.setAttribute("id", "addOpt");
+                addOpt.setAttribute("class", "surveyButton");
+                addOpt.setAttribute("onclick", "addOption()");
+                addOpt.setAttribute("value", "Add Option");
+                buttonsDiv.appendChild(addOpt);                                  
+            }
+                                                                                                    
+            function addRemoveOptionButton(buttonsDiv)
+            {
+                var removeOpt = document.createElement("input");
+                removeOpt.setAttribute("type", "button");
+                removeOpt.className = "surveyButton";
+                removeOpt.setAttribute("onclick", "removeOption()");
+                removeOpt.setAttribute("value", "x");
+                buttonsDiv.appendChild(removeOpt);
+            }
+                                                                                                   
+            function minMax(min, max)
+            {
+                if (min == null)
+                    var min = '';
+                if (max == null)
+                    var max = '';
+                                                                                                                                                                                                                                                                                                                                
+                var specs = document.getElementById("answerSpecifications");
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+                var answerDiv = document.createElement("div");
+                                                                                                                                                                                                                                                                                                                                                                                                                                        
+                answerDiv.className = "answerDiv";
+                answerDiv.innerHTML = "<label for='min'>Min</label><input type='text' class='intBox' onchange='checkInt(this)' value='" + min + "' name='ans1' />" +
+                    "<label for='max'>Max</label><input type='text' class='intBox' onchange='checkInt(this)' value='" + max + "' name='ans2' />";
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
+                specs.appendChild(answerDiv);
+            }      
+                                                                            
+            function checkInt(input)
+            {
+                input.style.borderWidth = '1px' ;
+                var value = input.value;
+                if (isNaN(value))
+                {
+                    input.style.borderColor = 'red';
+                    input.checkPassed = 'no';
+                }
+                else
+                {
+                    input.style.border = '1px solid #888;';
+                    input.checkPassed = null;
+                }
+            }
+                                                            
+            function minMaxIncr(left, right, incr)
+            {
+                if (left == null)
+                    var left = '';
+                else
+                    left.replace("'", "&#39;");
+                if (right == null)
+                    var right = '';
+                else
+                    right.replace("'", "&#39;");
+                if (incr == null)
+                    var incr = '';
+                                                                                                                                                                                                                                                        
+                var specs = document.getElementById("answerSpecifications");
+                                                                                                                                                                                                                                                                                                                                                                                                                                               
+                var answerDiv = document.createElement("div");
+                answerDiv.className = "answerDiv";
+                                                                                                                                                                               
+                var leftLabel = document.createElement("label");
+                var rightLabel = document.createElement("label");
+                var scaleLabel = document.createElement("label");
+                leftLabel.innerHTML = "Left label";
+                rightLabel.innerHTML = "Right label";
+                scaleLabel.innerHTML = "Scale count";
+                                                                                                                                                                                
+                var leftInput = document.createElement("input");
+                leftInput.type = "text";
+                leftInput.value = left;
+                leftInput.name= "ans1";
+                leftInput.setAttribute("onchange", "handleAnswerChange()");
+                                                                                                                                                                                
+                var rightInput = document.createElement("input");
+                rightInput.type = "text";
+                rightInput.value = right;
+                rightInput.name = "ans2";
+                rightInput.setAttribute("onchange", "handleAnswerChange()");
+                                                                                                                                                                                
+                var scaleInput = document.createElement("input");
+                scaleInput.type = "text";
+                scaleInput.className = "intBox";
+                scaleInput.value = incr;
+                scaleInput.setAttribute("onblur", "checkInt(this)");
+                scaleInput.setAttribute("onchange", "");
+                scaleInput.name = "ans3";
+                                                                                                                                                                                
+                answerDiv.appendChild(leftLabel);
+                answerDiv.appendChild(leftInput);
+                answerDiv.appendChild(rightLabel);
+                answerDiv.appendChild(rightInput);
+                answerDiv.appendChild(scaleLabel);
+                answerDiv.appendChild(scaleInput);
+                                                                                                                                                                                                                                                                                                                                                                                                                           
+                specs.appendChild(answerDiv);
+            }   
+                                            
+            function newCategory()
+            {
+                var categoryBox = document.getElementById("categoryBox");
+                categoryBox.innerHTML = "";
+                                                
+                var categoryInput = document.createElement("input");
+                categoryInput.name = "questionCategory";
+                                                
+                categoryBox.appendChild(categoryInput);
+            }
+                                                       
+            function clearFields()
+            {
+                clearCategory();
+                clearCode();
+                clearTitle();
+                clearDescription();
+                clearType();
+            }
+                                            
+            function clearCategory()
+            {
+                var categoryBox = document.getElementById("categoryBox");
+                categoryBox.innerHTML = "";
+                                                
+                var questionCategorySelect = document.createElement("select");
+                questionCategorySelect.setAttribute("name", "questionCategory");
+                questionCategorySelect.id = "questionCategorySelect";
+                                                
+                var newCategoryButton = document.createElement("input");
+                newCategoryButton.setAttribute("type", "button");
+                newCategoryButton.setAttribute("onclick", "newCategory()");
+                newCategoryButton.setAttribute("value", "New Category");
+                newCategoryButton.className = "surveyButton";
+                                                
+                categoryBox.appendChild(questionCategorySelect);
+                categoryBox.appendChild(newCategoryButton);
+            }
+                                            
+            function clearCode()
+            {
+                var codeInput = document.getElementById("questionCode");
+                codeInput.value = "";
+            }
+                                            
+            function clearTitle()
+            {
+                var titleInput = document.getElementById("questionTitle");
+                titleInput.value ="";
+            }
+                                            
+            function clearDescription()
+            {
+                var descriptionInput = document.getElementById("questionDescription");
+                descriptionInput.value = "";
+            }
+                                            
+            function clearType()
+            {
+                var typeSelect = document.getElementById("questionTypeSelect");
+                typeSelect.selectedIndex = 0;
+                clearSpecifications();
+            }
+                                            
+        </script>
+        <?php
+    }
+
+    private function displayList() {
+        ?>
+        <div id="questionListWrapper">
+            <select id="questionsList" size="9999">
+                <?php $this->populateList(); ?>
+            </select>
+        </div>
+        <?php
+    }
+
+    private function displayEditPanel() {
+        ?>
+        <div id="questionCreation" class="floatLeft">
+            <?php $this->displayForm(); ?>
+        </div>
+        <?php
+    }
+
+    private function displayForm() {
+        ?>
+        <form id="questionEditForm" method="post" action="" onsubmit="">
+            <table class="questionTable">
+                <tr>
+                    <td><label for="questionCategory">Category</label></td>
+                    <td id="categoryBox"><!-- Select should be filled with existing categories-->
+                        <?php $this->questionCategorySelect(); ?>
+                    </td>
+                </tr>
+                <tr>
+                    <td><label for="questionCode">Code</label></td>
+                    <td><input id="questionCode" name="questionCode" size="5" /></td>
+                </tr>
+                <tr>
+                    <td><label for="questionTitle">Title</label></td>
+                    <td><input id="questionTitle" name="questionTitle" size="60" /></td>
+                </tr>
+                <tr>
+                    <td><label for="questionDescription">Description</label></td>
+                    <td><input id="questionDescription" name="questionDescription" size="60" /></td>
+                </tr>
+                <tr>
+                    <td><label for="questionType">Type answer</label></td>
+                    <td id="questionType">
+                        <select id="questionTypeSelect" name="questionType" onchange="handleType(this)">
+                            <option value='text' selected='selected'>Text</option>
+                            <option value='int'>Integer</option>
+                            <option value='mc'>Multiple choice</option>
+                            <option value='checkboxes'>Checkboxes</option>
+                            <option value='scale'>Scale</option>
+                        </select>
+                    </td>
+                </tr>
+            </table>
+            <div id="answerSpecifications"></div>
+            <input id="clearQuestionFields" type="button" onclick="clearFields()" class="surveyButton" value="Clear" />
+            <input id="saveQuestion" type="submit" class="surveyButton" value="Save" />
+        </form>
+        <?php
+    }
+
+    private function questionCategorySelect() {
+        ?>
+        <select id="questionCategorySelect" name="questionCategory">
+            <option value='Uncategorized' selected='selected'>Uncategorized</option>
+            <?php $this->generateCategoryOptions(); ?>
+        </select>
+        <!-- New category button -->
+        <input type="button" class="surveyButton" onclick="newCategory()" value="New Category" />
+        <?php
+    }
+
+    private function generateCategoryOptions() {
+        $categories = array();
+
+        foreach ($this->questions as $question) {
+            $category = $question->category;
+            array_push($categories, $category);
+        }
+        $categories = array_unique($categories);
+
+        // You might want to escape quotes and stuff here
+        foreach ($categories as $category) {
+            ?>
+            <option value="<?php echo $category; ?>"><?php echo $category; ?></option> 
+            <?php
+        }
+    }
+
+    /**
+     * Populates the question list. Sorts the list first by question category.
+     */
+    private function populateList() {
+
+        $this->questions = $this->sortByCategory($this->questions);
+
+        $currentCategory = null;
+
+        foreach ($this->questions as $question) {
+            if (is_null($currentCategory)) {
+                ?> <optgroup label="<?php echo $question->category; ?>"><?php
+                $currentCategory = $question->category;
+            } else if ($currentCategory != $question->category) {
+                /* Next category */
+                ?></optgroup><?php
+                $currentCategory = $question->category;
+                ?> <optgroup label="<?php echo $question->category; ?>"><?php
+            }
+            ?>
+                /* function loadQuestionIn() should still be made */
+                <option value="<?php echo $question->code; ?>" onfocus="loadQuestionIn()">
+                    <?php echo "[" . $question->code . "] " . $question->title; ?>
+                </option>
+
+                <?php
+            }
+            ?></optgroup><?php
+    }
+
+    /**
+     *
+     * @param type $questions 
+     */
+    private function sortByCategory($questions) {
+        usort($questions, "cmp");
+        return $questions;
+    }
+
+}
+
+/* This function is placed outside the class on purpose.
+ * It's only used as callback function.
+ */
+
+function cmp($q1, $q2) {
+    if ($q1->category == $q2->category) {
+        if($q1->code < $q2->code)
+            return -1;
+        else
+            return 1;
+    }
+    return ($q1->category < $q2->category) ? -1 : 1;
+}
+    ?>
Index: Dev/branches/Demo/classes_old/QuestionMenu.php
===================================================================
--- Dev/branches/Demo/classes_old/QuestionMenu.php	(revision 225)
+++ Dev/branches/Demo/classes_old/QuestionMenu.php	(revision 225)
@@ -0,0 +1,30 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of QuestionMenu
+ *
+ * @author fpvanagthoven
+ */
+class QuestionMenu extends Menu {
+
+    public function __construct() {
+        ?> <fieldset class="menu"> <?php
+        parent::__construct('Questions');
+        QuestionMenu::accessDatabaseButton();
+        ?></fieldset> <?php
+    }
+
+    public static function accessDatabaseButton() {
+        ?>
+        <form id="accessDatabase" action="questioncreation.php" method="post">
+            <input type="submit" value="Access Database" class="surveyButton bigSurveyButton" />
+        </form>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/QuestionRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/QuestionRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/QuestionRDFReader.php	(revision 225)
@@ -0,0 +1,162 @@
+<?php
+
+class QuestionRDFReader
+{
+    protected $model;
+
+    protected $filePath;
+
+    public function __construct()
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->filePath = 'data/questions/';
+        if (!is_dir($this->filePath))
+            mkdir($this->filePath);	
+        $this->reloadQuestions();
+    }
+    
+    public function reloadQuestions()
+    {
+        // Create empty MemModel   
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+        
+         if(file_exists($this->filePath.'questions.rdf'))
+        {
+            $this->model->load($this->filePath.'questions.rdf');
+        }
+    }
+    
+    public function readQuestionByCode($questionCode)
+    {        
+        $result = array();
+        $result['title'] = $this->readQuestionTitle($questionCode);				
+        $result['description'] = $this->readQuestionDescription($questionCode);
+        $result['type'] = $this->readQuestionType($questionCode);
+        $result['category'] = $this->readQuestionCategory($questionCode);
+        $result['answers'] = $this->readQuestionAnswers($questionCode);
+
+        return $result;
+    }
+     
+    public function readQuestionCodes()
+    {
+        $result = null;
+        
+        if(file_exists($this->filePath.'questions.rdf'))
+        {
+            // Create empty MemModel
+            $factory = new ModelFactory();
+            $tempmodel= $factory->getDefaultModel();
+            $tempmodel->load($this->filePath.'questions.rdf');
+
+            $querystring = '
+            PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT 	?questionCode
+            WHERE 
+            {	
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:question_code        ?questionCode				
+            }';
+            
+            $result = $tempmodel->sparqlQuery($querystring);
+        }
+        return $result; 
+    }
+
+    public function readQuestionTitle($questionCode)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?questionTitle
+            WHERE 
+            {
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:question_code        "' . $questionCode . '"  ;
+                                predicates:title		?questionTitle 		
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readQuestionDescription($questionCode)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?questionDescription
+            WHERE 
+            {	
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:question_code        "' . $questionCode . '"  ;
+                                predicates:description		?questionDescription 		
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readQuestionType($questionCode)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?questionType
+            WHERE 
+            {	
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:question_code	"' . $questionCode . '"  ;
+                                predicates:question_type	?questionType				
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+        
+    public function readQuestionCategory($questionCode)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?questionCategory
+            WHERE 
+            {	
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:question_code	"' . $questionCode . '"  ;
+                                predicates:question_category	?questionCategory				
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readQuestionAnswers($questionCode)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?answerDescription
+            WHERE 
+            {
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:question_code	"' . $questionCode . '"  ;
+                                predicates:has_answer		?answerDescription
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/QuestionRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/QuestionRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/QuestionRDFWriter.php	(revision 225)
@@ -0,0 +1,62 @@
+<?php
+class QuestionRDFWriter 
+{
+    protected $model;
+
+    protected $filePath = 'data/questions/';
+
+    public function __construct()
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        if (!is_dir($this->filePath))
+            mkdir($this->filePath);
+        
+        if(file_exists($this->filePath.'questions.rdf'))
+            $this->model->load($this->filePath.'questions.rdf');
+    }	
+
+    public function saveQuestions()
+    {	
+        $this->model->saveAs($this->filePath.'questions.rdf','rdf');
+    }
+    
+    public function createQuestion($qTitle,$qDescription,$qType,$qCode,$qCategory,$qAnswers)
+    {
+        $resourceQuestion = new Resource(QUESTION.'/'.$qCode);
+
+        $resourceQuestionType = new Resource(QUESTION);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceQuestion,$predicateRType,$resourceQuestionType));
+
+        $predicateTitle = new Resource(TITLE);		
+        $questionTitle = new Literal($qTitle);
+        $this->model->add(new Statement($resourceQuestion,$predicateTitle,$questionTitle));	
+
+        $predicateDescription = new Resource(DESCRIPTION);
+        $questionDescription = new Literal($qDescription);
+        $this->model->add(new Statement($resourceQuestion,$predicateDescription,$questionDescription));		
+
+        $predicateQType = new Resource(QTYPE);
+        $resourceQuestionType = new Literal($qType);
+        $this->model->add(new Statement($resourceQuestion,$predicateQType,$resourceQuestionType));
+        
+        $predicateQCode = new Resource(QCODE);
+        $questionQCode = new Literal($qCode);
+        $this->model->add(new Statement($resourceQuestion,$predicateQCode,$questionQCode));
+        
+        $predicateQCategory = new Resource(QCATEGORY);
+        $questionQCategory = new Literal($qCategory);
+        $this->model->add(new Statement($resourceQuestion,$predicateQCategory,$questionQCategory));
+
+        foreach($qAnswers as $answer)
+        {		
+            $answerValue = new Literal($answer);
+            $predicateAnswer = new Resource(HAS_ANSWER);	
+            $this->model->add(new Statement($resourceQuestion,$predicateAnswer,$answerValue));
+        }	
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/Session.php
===================================================================
--- Dev/branches/Demo/classes_old/Session.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Session.php	(revision 225)
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * Description of Session
+ *
+ * @author fpvanagthoven
+ */
+class Session {
+
+    public $title;
+    public $description;
+    public $pipeline;
+    public $count;
+
+    public function __construct($title, $description) {
+        $this->title = $title;
+        $this->description = $description;
+        $this->count = 0;
+        
+        $this->pipeline = array();
+    }
+    
+    public static function getSession($info)
+    {
+        if (!empty($info))
+        {
+            $title = $info['sessionTitle'];
+            $description = $info['sessionDescription'];
+            $session = new Session($title, $description);
+            $session->count = $info['pipelineCount'];
+            
+            $pipelineCount = 1;
+            for ($i = 1; $i < $session->count + 1; $i++)
+            {
+                if (isset($info[$i . 's']))
+                {
+                    $session->pipeline[$i . 's'] = $info[$i . 's'];
+                }
+                else if (isset($info[$i . 'd']))
+                {
+                    $session->pipeline[$i . 'd'] = $info[$i . 'd'];
+                }
+                else if (isset($info[$i . 'a']))
+                {
+                    $session->pipeline[$i . 'a'] = $info[$i . 'a'];
+                }
+
+                $pipelineCount++;
+            }
+            
+            return $session;
+        }
+        else
+            return null;
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/SessionCreationDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/SessionCreationDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SessionCreationDatabaseInterface.php	(revision 225)
@@ -0,0 +1,105 @@
+<?php
+
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+
+
+class SessionCreationDatabaseInterface
+{		
+    protected $sessionRDFWriter;
+    protected $sessionRDFReader;
+
+
+    public function __construct($sessionID)
+    {
+        if($sessionID == null)
+            $sessionUID = md5( uniqid(rand(), true) );
+        else
+            $sessionUID = $sessionID;
+
+        $this->sessionRDFWriter = new SessionRDFWriter($sessionUID);
+        $this->sessionRDFReader = new SessionRDFReader($sessionUID);
+    }
+    
+    public function setSessionInfo($session)
+    {
+        $sTitle = $session['sessionTitle'];
+        $sDescription = $session['sessionDescription'];
+
+        $this->sessionRDFWriter->createSession($sTitle,$sDescription);
+        
+        $pipelineCount = $session['pipelineCount'];
+        
+        for($i = 1; $i <= $pipelineCount; $i++)
+        {
+            if(isset($session[$i.'s']))
+            {
+                $this->sessionRDFWriter->addSurveyToPipeline($session[$i.'s'], $i);
+            }
+            else if(isset($session[$i.'a']))
+            {
+                $this->sessionRDFWriter->addApplicationToPipeline($session[$i.'a'], $i);
+            }
+            else if(isset($session[$i.'d'])) 
+            {
+                $this->sessionRDFWriter->addDashboardToPipeline($session[$i.'d'], $i);
+            }
+        }
+    }
+    
+    public function getSessionInfo()
+    {
+        $sessionInfo = array();
+
+        $resultSession = $this->sessionRDFReader->getSurveyInfo();
+        
+        $sessionInfo['sessionTitle'] = substr($resultSession[0][0]['?title'],9,strlen($resultSession[0][0]['?title'])-11);
+        $sessionInfo['sessionDescription'] = substr($resultSession[0][0]['?description'],9,strlen($resultSession[0][0]['?description'])-11);
+        
+        foreach ($resultSession[1][1] as $surveyInfo) 
+        {
+             $surveyUID = substr($surveyInfo['?uid'],9,strlen($surveyInfo['?uid'])-11);
+             $surveyIndex = substr($surveyInfo['?index'],9,strlen($surveyInfo['?index'])-11);
+             $sessionInfo[$surveyIndex . 's'] = $surveyUID;
+        }
+        foreach ($resultSession[1][2] as $applicationInfo) 
+        {
+             $applicationUID = substr($applicationInfo['?uid'],9,strlen($applicationInfo['?uid'])-11);
+             $applicationIndex = substr($applicationInfo['?index'],9,strlen($applicationInfo['?index'])-11);
+             $sessionInfo[$applicationIndex . 'a'] = $applicationUID;
+        }
+        foreach ($resultSession[1][3] as $dashboardInfo) 
+        {
+             $dashboardUID = substr($dashboardInfo['?uid'],9,strlen($dashboardInfo['?uid'])-11);
+             $dashboardIndex = substr($dashboardInfo['?index'],9,strlen($dashboardInfo['?index'])-11);
+             $sessionInfo[$dashboardIndex . 'd'] = $dashboardUID;
+        }
+    }
+    
+    public function getExistingSessions()
+    {
+        $sessionIDs = array();
+        $sessions = array();
+
+        if($handle = opendir('data/sessions/'))
+        {
+            while (false !== ($file = readdir($handle))) {
+                if(strstr($file, 'session_'))
+                    $sessionIDs[] = substr($file,7,strlen($file)-11);
+            }
+        }
+
+        foreach($sessionIDs as $sessionID)
+        {
+            $sessionTitle = $this->sessionRDFReader->getSessionTitleByID($sessionID);
+            $$sessions[$sessionID] = substr($sessionTitle[0]['?title'],9,strlen($sessionTitle[0]['?title'])-11);
+        }
+
+        return $surveys;
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/SessionCreationTool.php
===================================================================
--- Dev/branches/Demo/classes_old/SessionCreationTool.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SessionCreationTool.php	(revision 225)
@@ -0,0 +1,320 @@
+<?php
+
+/**
+ * Description of SessionCreationTool
+ *
+ * @author fpvanagthoven
+ */
+class SessionCreationTool {
+
+    private $session;
+    private $surveys;
+    private $applications;
+
+    public function __construct($session = null) {
+        $this->session = $session;
+
+        $this->init();
+
+        $this->javascript();
+        var_dump($_POST);
+        var_dump($session);
+        ?>
+
+        <div id="creation">
+            <form id="sessionCreationForm" action="" onsubmit="submitPipeline()" method="post">
+                <?php
+                $this->title();
+                $this->description();
+                $this->pipeline();
+                $this->surveysApplications();
+
+                $this->makeSessionButton();
+                ?>
+            </form>
+        </div>
+        <?php
+        $this->populatePipeline();
+    }
+
+    private function init() {
+        $this->surveys = Loader::loadSurveys();
+        $this->applications = Loader::loadApplications();
+    }
+
+    private function javascript() {
+        ?>
+        <script type="text/javascript" src="js/creation.js"></script>
+        <script type="text/javascript">
+            var pipelineCount = 0;
+                                                                                                                                                                                                                                                                                                                                                     
+            // =============================================================
+                                                                                                                                                                                                                                                                                                                                                                            
+            function addSurvey(surveyID) {     
+                var surveysList = document.getElementById("surveysList");
+                var entryType = "s";
+                var color = "#00ccff";
+                        
+                addFromList(surveysList, entryType, color, surveyID);
+            }
+                            
+            function addApplication(applicationID)
+            {
+                var applicationsList = document.getElementById("applicationsList");
+                var entryType = "a";
+                var color = "gold";
+                        
+                addFromList(applicationsList, entryType, color, applicationID);
+            }
+                            
+            function addFromList(list, entryType, color, id)
+            {
+                if(list.selectedIndex != -1 || id != null)
+                {
+                    var pipeline = document.getElementById("pipeline");
+                    var entry = document.createElement("option");
+                            
+                    pipelineCount++;
+                            
+                    if (id != null)
+                    {
+                        entry.setAttribute("value", id);
+                        entry.innerHTML = pipelineCount + ". " + list.options.namedItem(id).innerHTML;
+                    }
+                    else
+                    {
+                        entry.setAttribute("value", list.options[list.selectedIndex].value);
+                        entry.innerHTML = pipelineCount + ". " + list.options[list.selectedIndex].innerHTML;
+                    }
+                            
+                            
+                    entry.style.backgroundColor = color;
+                    entry.name = pipelineCount + entryType;
+                    entry.entryType = entryType;
+                            
+                    pipeline.appendChild(entry);
+                }
+            }
+                                                                                                                                                                                                                                                    
+            function addDashboard() {
+                pipelineCount++;
+                var pipeline = document.getElementById("pipeline");
+                                                                                                                                                                                                                                                        
+                var entry = document.createElement("option");
+                entry.setAttribute("value", "dashboard");
+                entry.style.backgroundColor = "#555";
+                entry.style.color = "white";
+                entry.innerHTML = pipelineCount + ". " + "Dashboard";
+                entry.name = pipelineCount + "d";
+                entry.entryType = "d";
+                                                                                                                                                                                                                                                        
+                pipeline.appendChild(entry);
+            }
+                                                                                                    
+            function removeFromPipeline() {
+                var pipeline = document.getElementById("pipeline");
+                if (pipeline.selectedIndex != -1)
+                {
+                    var index = pipeline.selectedIndex;
+                    pipeline.remove(index);
+                    if (pipelineCount > 1 && 
+                        pipeline.options[index] != null)
+                    {
+                        pipeline.options[index].selected = true;
+                    }
+                                                                                           
+                    for(var i = index; i < pipeline.length; i++)
+                    {
+                        var entry = pipeline.options[i];
+                        entry.name = "" + (i+1) + entry.entryType;
+                        var htmlStr = entry.innerHTML;
+                        var dotIndex = htmlStr.indexOf('.');
+                        entry.innerHTML = (i+1) + htmlStr.substr(dotIndex);
+                    }
+                    pipelineCount--;
+                }
+            }
+                                                                                                                                                                                                                                                                     
+            function submitPipeline()
+            {
+                var form = document.getElementById("sessionCreationForm");
+                                                                                                                                                                                                                                        
+                var pipeline = document.getElementById("pipeline").options;
+                                                                                                                                                                                                                                               
+                                                                                                                                                                                                                                                
+                for (var i = 0; i < pipeline.length; i++)
+                {
+                    var pipelineElem = document.createElement("input");
+                    pipelineElem.name = pipeline[i].name;
+                    pipelineElem.value = pipeline[i].value;
+                    pipelineElem.type = "hidden";
+                                                                                                                                                                                                                                            
+                    form.appendChild(pipelineElem);
+                }
+                                                                                                                                                                                                                                
+                var count = document.createElement("input");
+                count.name = "pipelineCount";
+                count.value = pipelineCount;
+                count.type = "hidden";
+                                                                                                                                                                                                                                
+                form.appendChild(count);
+            }
+        </script>
+        <?php
+    }
+
+    private function title() {
+        if (isset($this->session->title))
+            $value = $this->session->title;
+        else
+            $value = 'Untitled Session';
+        ?>
+        <input type="text" id="sessionTitle" class="titleBox" name="sessionTitle" value="<?php echo str_replace("\"", "&quot;", $value); ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" />
+        <?php
+    }
+
+    private function description() {
+        if (isset($this->session->description))
+            $value = $this->session->description;
+        else
+            $value = 'Write a description for this session here.';
+        ?>
+        <textarea id="sessionDescription" class="descriptionBox" name="sessionDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea>
+        <?php
+    }
+
+    private function pipeline() {
+        ?>
+        <div id="pipelineWrapper">
+            <h2 class="pipelineHead">Pipeline</h2>
+            <?php $this->pipelineSelect(); ?>
+            <div id="pipelineOptions">
+                <?php
+                $this->addDashboardToPipelineButton();
+                $this->removeFromPipelineButton();
+                ?>
+            </div>
+        </div>
+        <?php
+    }
+
+    private function surveysApplications() {
+        ?>
+        <div id="surveysApplicationsWrapper">
+            <div id="surveysForPipelineWrapper">
+                <h2 class="pipelineHead">Surveys</h2>
+                <?php
+                $this->surveysSelect();
+                $this->addSurveyToPipelineButton();
+                ?>
+            </div>
+            <div id="applicationsForPipelineWrapper">
+                <h2 class="pipelineHead">Applications</h2>
+                <?php
+                $this->applicationsSelect();
+                $this->addApplicationToPipelineButton();
+                ?>
+            </div>
+        </div>
+        <?php
+    }
+
+    private function pipelineSelect() {
+        ?>
+        <select id="pipeline" size="1000"></select>
+        <?php
+    }
+
+    private function surveysSelect() {
+        ?>
+        <select id="surveysList" size="5" class="width100p">
+            <?php
+            foreach ($this->surveys as $survey) {
+                ?>
+                <option name="<?php echo $survey->id; ?>" value="<?php echo $survey->id; ?>">
+                    <?php echo $survey->title; ?>
+                </option>
+                <?php
+            }
+            ?>
+        </select>
+        <?php
+    }
+
+    private function applicationsSelect() {
+        ?>
+        <select id="applicationsList" size="5" class="width100p">
+            <?php
+            foreach ($this->applications as $application) {
+                ?>
+                <option name="<?php echo $application->id; ?>" value="<?php echo $application->id; ?>">
+                    <?php echo $application->title; ?>
+                </option>
+                <?php
+            }
+            ?>
+        </select>
+        <?php
+    }
+
+    private function addSurveyToPipelineButton() {
+        ?>
+        <input type="button" id="surveyToPipeline" class="surveyButton pipelineButton leftAlign leftPadding1" value="<=====" onclick="addSurvey()"/>
+        <?php
+    }
+
+    private function addApplicationToPipelineButton() {
+        ?>
+        <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value="<=====" onclick="addApplication()"/>
+        <?php
+    }
+
+    private function addDashboardToPipelineButton() {
+        ?>
+        <input type="button" class="surveyButton pipelineButton leftAlign leftPadding1" value="+ Dashboard" onclick="addDashboard()"/>
+        <?php
+    }
+
+    private function removeFromPipelineButton() {
+        ?>
+        <input type="button" class="surveyButton" value="x" onclick="removeFromPipeline()"/>
+        <?php
+    }
+
+    private function makeSessionButton() {
+        ?>
+        <input type="submit" id="makeSessionButton" class="topRight surveyButton" value="Make session" />
+        <?php
+    }
+
+    private function populatePipeline() {
+
+        if (isset($this->session)) {
+            for ($i = 1; $i < $this->session->count + 1; $i++) {
+                if (isset($this->session->pipeline[$i . 's'])) {
+                    ?>
+                    <script type="text/javascript">
+                        addSurvey(<?php echo "'" . $this->session->pipeline[$i . 's'] . "'"; ?>);
+                    </script>
+                    <?php
+                } 
+                else if (isset($this->session->pipeline[$i . 'a'])) {
+                    ?>
+                    <script type="text/javascript">
+                        addApplication(<?php echo "'" . $this->session->pipeline[$i . 'a'] . "'"; ?>);
+                    </script>
+                    <?php
+                }
+                else if (isset($this->session->pipeline[$i . 'd'])) {
+                    ?>
+                    <script type="text/javascript">
+                        addDashboard();
+                    </script>
+                    <?php
+                }
+            }
+        }
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/SessionMenu.php
===================================================================
--- Dev/branches/Demo/classes_old/SessionMenu.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SessionMenu.php	(revision 225)
@@ -0,0 +1,65 @@
+<?php
+
+/**
+ * Description of SessionMenu
+ *
+ * @author fpvanagthoven
+ */
+class SessionMenu extends Menu {
+
+    public function __construct() {
+        ?> <fieldset class="menu"> <?php
+        parent::__construct('Session');
+        ?> <div class="menuButtons"> <?php
+        SessionMenu::createSessionButton();
+        SessionMenu::loadSessionButton();
+        SessionMenu::startSessionButton();
+        ?> </div> <?php
+        SessionMenu::loadSessionList(null);
+        ?></fieldset><?php
+    }
+
+    public static function createSessionButton() {
+        ?>
+
+        <form action="sessioncreation.php" method="post">
+
+            <input type="submit" value="New" class="surveyButton bigSurveyButton" />
+
+        </form>
+
+        <?php
+    }
+
+    public static function loadSessionButton() {
+        ?>
+        <form id="loadSessionForm" action="sessioncreation.php" method="post">
+            <input type="button" onclick="loadSession()" value="Load / Edit" class="surveyButton bigSurveyButton" />
+        </form>
+        <?php
+    }
+
+    public static function startSessionButton() {
+        ?>
+        <form action="session.php" method="post">
+            <input type="button" onclick="startSession()" value="Start" class="surveyButton bigSurveyButton" />
+        </form>
+        <?php
+    }
+
+    public static function loadSessionList($sessions) {
+        ?>
+        <select class="toLoad" size="1000">
+            <?php
+            if (!empty($sessions)) {
+                foreach ($sessions as $session) {
+                    ?><option value='<?php echo $session->id; ?>'><?php echo $session->title; ?></option><?php
+            }
+        }
+            ?>
+        </select>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/SessionRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/SessionRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SessionRDFReader.php	(revision 225)
@@ -0,0 +1,138 @@
+<?php
+
+class SessionRDFReader
+{
+    protected $model;
+
+    protected $sessionUID;
+    protected $filePath;
+
+    public function __construct($sessionUID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->sessionUID = $sessionUID;
+        $this->filePath = 'data/sessions/session_'.$this->surveyUID.'.rdf';
+    }
+
+    public function loadSurvey()
+    {
+        $this->model->load($this->filePath);
+    }
+    
+    public function getSessionInfo()
+    {        
+        $results[] = $this->readSessionInfo();
+        $results[] = $this->getPipeline();
+        
+        return $results;
+    }
+    
+    public function readSessionInfo()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?uid ?title ?description ?creator
+            WHERE 	
+            {
+                    _session	predicates:resource_type	resources:session ;
+                                predicates:uid			?uid	;
+                                predicates:title 		?title 	;
+                                predicates:description		?description 
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function getPipeline()
+    {
+        $results[] = $this->readSurveys();
+        $results[] = $this->readApplications();
+        $results[] = $this->readDashboards();
+        
+        return $results;
+    }
+    
+    public function readSurveys()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT DISTINCT ?uid ?index
+            WHERE 	
+            {
+                    _survey	predicates:resource_type	resources:survey ;
+                                predicates:uid			?uid	;
+                                predicates:index		?index 
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function readApplications()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT DISTINCT ?uid ?index
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                predicates:uid			?uid	;
+                                predicates:index		?index 
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function readDashboards()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT DISTINCT ?uid ?index
+            WHERE 	
+            {
+                    _dashboard	predicates:resource_type	resources:dashboard ;
+                                predicates:uid			?uid	;
+                                predicates:index		?index 
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function getSessionTitleByID($sessionID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $tempmodel= $factory->getDefaultModel();
+        $tempmodel->load('data/sessions/session_'.$sessionID.'/session_'.$sessionID.'.rdf');
+
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?title 
+            WHERE 	
+            {
+                    _session    predicates:resource_type	resources:session ;
+                                predicates:title 		?title 	
+            }';
+
+        $result = $tempmodel->sparqlQuery($querystring);
+
+        return $result;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/SessionRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/SessionRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SessionRDFWriter.php	(revision 225)
@@ -0,0 +1,98 @@
+<?php
+
+class SessionRDFWriter 
+{
+    protected $model;
+
+    protected $sessionUID;
+    protected $resourceSession;
+            
+    protected $filePath;
+
+    public function __construct($sessionUID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->sessionUID = $sessionUID;	
+        $this->filePath = 'data/sessions/';
+        if (!is_dir($this->filePath))
+            mkdir($this->filePath);	
+    }
+    
+    public function saveAs()
+    {
+        $this->model->saveAs($this->filePath.
+                'session_' . $this->surveyUID . '/.' . 
+                $this->surveyUID  .'.rdf',
+                'rdf');
+    }
+    
+    public function createSession($sTitle,$sDescription)
+    {
+        $this->resourceSession = new Resource(SESSION.'/'.$this->sessionUID);
+
+        $resourceSessionType = new Resource(SESSION);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($this->resourceSession,$predicateRType,$resourceSessionType));
+
+        $literalSessionID = new Literal($this->sessionUID);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($this->resourceSession,$predicateUniqueID,$literalSessionID));
+
+        $predicateTitle = new Resource(TITLE);		
+        $sessionTitle = new Literal($sTitle);
+        $this->model->add(new Statement($this->resourceSession,$predicateTitle,$sessionTitle));		
+
+        $predicateDescription = new Resource(DESCRIPTION);
+        $sessionDescription = new Literal($sDescription);
+        $this->model->add(new Statement($this->resourceSession,$predicateDescription,$sessionDescription));
+    }
+    
+    public function addSurveyToPipeline($uid,$index)
+    {
+        $resourceSurvey = new Resource(SURVEY);
+        $predicateHasProcess = new Resource(HAS_PROCESS);
+        $this->model->add(new Statement($this->resourceSession,$predicateHasProcess,$resourceSurvey));
+        
+        $literalSurveyID = new Literal($uid);
+        $predicateUID = new Resource(UID);
+        $this->model->add(new Statement($$resourceSurvey,$predicateUID,$literalSurveyID));        
+        
+        $literalIndex = new Literal($index);
+        $predicateIndex = new Resource(INDEX);        
+        $this->model->add(new Statement($resourceSurvey,$predicateIndex,$literalIndex));
+    }
+    
+    public function addApplicationToPipeline($uid,$index)
+    {
+        $resourceApplication = new Resource(APPLICATION);
+        $predicateHasProcess = new Resource(HAS_PROCESS);
+        $this->model->add(new Statement($this->resourceSession,$predicateHasProcess,$resourceApplication));
+        
+        $literalApplicationID = new Literal($uid,$index);
+        $predicateUID = new Resource(UID);
+        $this->model->add(new Statement($resourceApplication,$predicateUID,$literalApplicationID));        
+        
+        $literalIndex = new Literal($index);
+        $predicateIndex = new Resource(INDEX);        
+        $this->model->add(new Statement($resourceApplication,$predicateIndex,$literalIndex));
+    }
+    
+    public function addDashboardToPipeline($uid,$index)
+    {
+        $resourceDashboard = new Resource(DASHBOARD);
+        $predicateHasProcess = new Resource(HAS_PROCESS);
+        $this->model->add(new Statement($this->resourceSession,$predicateHasProcess,$resourceDashboard));
+        
+        $literalDashboardID = new Literal($uid);
+        $predicateUID = new Resource(UID);
+        $this->model->add(new Statement($resourceDashboard,$predicateUID,$literalDashboardID));        
+        
+        $literalIndex = new Literal($index);
+        $predicateIndex = new Resource(INDEX);        
+        $this->model->add(new Statement($resourceDashboard,$predicateIndex,$literalIndex));
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/StyleSheet.php
===================================================================
--- Dev/branches/Demo/classes_old/StyleSheet.php	(revision 225)
+++ Dev/branches/Demo/classes_old/StyleSheet.php	(revision 225)
@@ -0,0 +1,21 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of StyleSheet
+ *
+ * @author fpvanagthoven
+ */
+class StyleSheet {
+
+    public function __construct() {
+        ?>
+        <link rel="stylesheet" type="text/css" href="css/awesome.css" />
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/Survey.php
===================================================================
--- Dev/branches/Demo/classes_old/Survey.php	(revision 225)
+++ Dev/branches/Demo/classes_old/Survey.php	(revision 225)
@@ -0,0 +1,84 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Survey
+ *
+ * @author fpvanagthoven
+ */
+class Survey {
+
+    public $id;
+    public $title;
+    public $description;
+    public $questions;
+    public $results;
+    
+    const DEFAULT_DESCRIPTION = "Write a helpful description for this survey here.";
+
+    public function __construct($id, $title, $description = null) {
+        $this->id = $id;
+        $this->title = $title;
+        $this->description = $description;
+        $this->questions = array();
+
+        $this->results = null;
+    }
+
+    public function addQuestion($question) {
+        array_push($this->questions, $question);
+    }
+
+    public function setResults($surveyResults) {
+        $this->results = $surveyResults;
+    }
+
+    public static function getSurvey($info) {
+        $id = $info['surveyID'];
+        $title = $info['surveyTitle'];
+        $description = $info['surveyDescription'];
+
+        $survey = new Survey($id, $title, $description);
+
+        $numQ = 1; //number questions
+        while (isset($info['questionTitle' . $numQ])) {
+            $id = $info['questionID' . $numQ];
+            $code = $info['questionCode' . $numQ];
+            $title = $info['questionTitle' . $numQ];
+            $type = $info['questionType' . $numQ];
+            $description = $info['questionDescription' . $numQ];
+
+            $question = new Question($id, $code, $title, $type, $description);
+
+            $numA = 1; //number answers
+            while (isset($info['q' . $numQ . 'ans' . $numA])) {
+                $answer = $info['q' . $numQ . 'ans' . $numA];
+                $question->answers[$numA] = $answer;
+
+                $numA++;
+            }
+
+
+            $survey->questions[$numQ] = $question;
+
+            $numQ++;
+        }
+
+        return $survey;
+    }
+
+    /**
+     * TODO: Should return Results-object from reading RDF-database
+     * @param type $surveyID 
+     */
+    public static function getResults($surveyID) {
+        
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/classes_old/SurveyAnswerDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyAnswerDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyAnswerDatabaseInterface.php	(revision 225)
@@ -0,0 +1,57 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+class SurveyAnswerDatabaseInterface extends SurveyCreationDatabaseInterface
+{
+    protected $surveyAnswerRDFReader;
+    protected $surveyAnswerRDFWriter;
+    
+    public function __construct($surveyID,$sessionID,$respondentID)
+    {
+        parent::__construct($surveyID);
+        if($respondentID == null)
+            $respondentID = md5( uniqid(rand(), true) );
+        else
+            $respondentID = $respondentID;
+        
+        $this->surveyAnswerRDFReader = new SurveyAnswerRDFReader($surveyID,$sessionID,$respondentID);
+        $this->surveyAnswerRDFWriter = new SurveyAnswerRDFWriter($surveyID,$sessionID,$respondentID);
+    }
+        
+    public function setRespondentInfo($respondentInfo)
+    {
+        $name = $respondentInfo['username'];
+        $this->surveyAnswerRDFWriter->setRespondentData($name);
+    }
+    
+    public function setSurveyAnswers($answers)
+    {
+        $questionAnswerList = array();
+        
+        $qNumber = 1;
+        while (isset($survey['questionID'.$qNumber]))
+        {
+            $qID = $survey['questionID'.$qNumber];
+            $aArray = array();
+            
+            $aNumber = 1;
+            while (isset($survey['q'.$qNumber.'result'.$aNumber]))
+            {
+                $aArray[] = $survey['q'.$qNumber.'result'.$aNumber];
+
+                $aNumber++;
+            }
+                
+            $questionAnswerList[$qID] = $aArray;
+
+            $qNumber++;
+        }
+        
+        $this->surveyAnswerRDFWriter->setAnswers($questionAnswerList);
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/SurveyAnswerRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyAnswerRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyAnswerRDFReader.php	(revision 225)
@@ -0,0 +1,125 @@
+<?php
+
+class SurveyAnswerRDFReader
+{	
+    protected $model;
+    protected $respondentID;
+    
+    protected $filePath;
+
+    public function __construct($surveyUID,$sessionID,$respondentID)
+    {
+
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+        
+        $this->respondentID = $respondentID;
+        
+        $this->filePath = 'data/sessions/' .  $sessionID . '/survey_'.$surveyUID . '/';
+    }
+
+    public function loadAnsers()
+    {
+        if(file_exists($this->filePath.'questions.rdf'))
+        {
+            $this->model->load($this->filePath.'/answer_'.$this->respondentID.'.rdf');
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public function getAnswers()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?answered 
+            WHERE 	
+            {
+                    _answer        predicates:answered 		?answered 	
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function getAnswerByQuestionID($questionID)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?answered 
+            WHERE 	
+            {
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:uid			"'.$questionID.'"	;
+                                predicates:answered 		?answered 	
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function getAnswersByRespondent($respondentID)
+    {
+        $this->tempModel->loadModel($this->model);
+
+        $this->tempModel->load($this->answerPath . '/$answer_' . $respondentID);
+
+        $this->tempModel->visualize();
+
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?answered 
+            WHERE 	
+            {
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:answered 		?answered 	
+            }';
+
+        $result = $this->tempModel->sparqlQuery($querystring);
+
+        $this->tempModel->close();		
+
+        $this->tempModel->visualize();
+
+        return $result;
+    }
+
+    public function getAnswerByRespondentAndQuestion($respondentID,$questionID)
+    {
+        $this->tempModel->loadModel($this->model);
+
+        $this->tempModel->load($this->answerPath . '/$answer_' . $respondentID);
+
+        $this->tempModel->visualize();
+
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?answered 
+            WHERE 	
+            {
+                    _question	predicates:resource_type	resources:question ;
+                                predicates:uid			"'.$questionID.'"	;
+                                predicates:answered 		?answered 	
+            }';
+
+        $result = $this->tempModel->sparqlQuery($querystring);
+
+        $this->tempModel->close();		
+
+        $this->tempModel->visualize();
+
+        return $result;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/SurveyAnswerRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyAnswerRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyAnswerRDFWriter.php	(revision 225)
@@ -0,0 +1,77 @@
+<?php
+
+class SurveyAnswerRDFWriter
+{
+    protected $surveyID;
+    protected $respondentID;
+    protected $path;
+
+    public function __construct($surveyID,$sessionID,$respondentID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+        
+        $basePath = 'data/sessions/';
+        $sessionPath = $basePath . $sessionID . '/';
+        $this->path  = $sessionPath .'survey_'.$surveyID . '/';
+        $this->surveyID = $surveyID;
+        $this->respondentID = $respondentID;
+        
+        if (!is_dir($basePath))
+            mkdir($basePath);
+        if (!is_dir($sessionPath))
+             mkdir($sessionPath);
+        if (!is_dir($this->path))
+              mkdir($this->path);
+        if(file_exists($this->path.'/answer_'.$this->respondentID.'.rdf'))
+            $this->model->load($this->path.'/answer_'.$this->respondentID.'.rdf');
+    }
+
+    public function saveSurveyData()
+    {
+        $this->model->saveAs($this->path.'/answer_'.$this->respondentID.'.rdf','rdf');
+    }
+
+    public function setRespondentData($name)
+    {				
+        $resourceUser = new Resource(USER . '/' . $this->respondentID);		
+
+        $resourceUserType = new Resource(USER);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceUser,$predicateRType,$resourceUserType));
+
+        $literalUserName = new Literal($name);
+        $predicateName = new Resource(NAME);
+        $this->model->add(new Statement($resourceUser,$predicateName,$literalUserName));		
+
+        $literalUserID = new Literal($this->respondentID);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($resourceUser,$predicateUniqueID,$literalUserID));
+
+        $resourceSurvey = new Resource(SURVEY.'/'.$this->surveyID);
+        $predicateRespondent = new Resource(RESPONDENT);
+        $this->model->add(new Statement($resourceSurvey,$predicateRespondent,$resourceUser));
+    }
+
+    public function setAnswers($answers)
+    {
+        foreach($answers as $questionID => $answerValues)
+        {
+            $resourceQuestion = new Resource(QUESTION.'/'.$questionID);
+
+            $resourceQuestionType = new Resource(QUESTION);
+            $predicateRType = new Resource(RTYPE);
+            $this->model->add(new Statement($resourceQuestion,$predicateRType,$resourceQuestionType));
+            
+            foreach($answerValues as $answerValue)
+            {
+                $predicateAnswered = new Resource(ANSWERED);	
+                $answer = new Literal($answerValue);
+                $this->model->add(new Statement($resourceQuestion,$predicateAnswered,$answer));
+            }
+        }
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/SurveyCreationDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyCreationDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyCreationDatabaseInterface.php	(revision 225)
@@ -0,0 +1,196 @@
+<?php
+// Survey database interface class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+
+
+class SurveyCreationDatabaseInterface
+{		
+    protected $surveyRDFWriter;
+    protected $surveyRDFReader;
+    protected $questionRDFWriter;
+    protected $questionRDFReader;
+
+    public function __construct($surveyID)
+    {
+        if($surveyID == null)
+            $surveyUID = md5( uniqid(rand(), true) );
+        else
+            $surveyUID = $surveyID;
+
+        $this->surveyRDFWriter = new SurveyRDFWriter($surveyUID);
+        $this->surveyRDFReader = new SurveyRDFReader($surveyUID);
+        $this->questionRDFWriter = new QuestionRDFWriter();
+        $this->questionRDFReader = new QuestionRDFReader();
+    }
+
+    public function setSurveyInfo($survey,$user)
+    {
+        $sTitle = $survey['surveyTitle'];
+        $sDescription = $survey['surveyDescription'];
+
+        $this->surveyRDFWriter->createSurvey($sTitle,$sDescription);
+
+        $sUserID = $user['username'];
+
+        $this->surveyRDFWriter->setUserData($sUserID);
+
+        $qNumber = 1;
+        while (isset($survey['questionCode'.$qNumber]))
+        {
+            $qCode = $survey['questionCode'.$qNumber];          
+            $this->surveyRDFWriter->addQuestion($qCode);
+
+            $qNumber++;
+        }
+
+        $this->surveyRDFWriter->saveSurvey();
+        $this->questionRDFWriter->saveQuestions();
+    }
+    
+    public function saveQuestion($questionInfo)
+    {
+        $qCode = $question['questionCode'.$qNumber];
+        $qTitle = $question['questionTitle'.$qNumber];
+        $qDescription = $question['questionDescription'.$qNumber];
+        $qType = $question['questionType'.$qNumber];
+
+        $qAnswers = array();
+        $aNumber = 1;
+        while (isset($question['ans'.$aNumber]))
+        {
+            $qAnswers[] = $question['ans'.$aNumber];
+
+            $aNumber++;
+        }
+        
+        if($this->checkQuestionCodeExists($qCode))
+        {
+            return 'Question code (' . $qCode . ') already in use. Please try a new code.';
+        }
+        else 
+        {
+            $this->questionRDFWriter->createQuestion($qTitle,$qDescription,$qType,$qCode,"null",$qAnswers);
+            return 'Question saved';
+        }
+    }
+
+    public function getSurveyInfo()
+    {
+        $surveyInfo = array();
+
+        $this->questionRDFReader->loadQuestions();
+        
+        $resultSurvey = $this->surveyRDFReader->getSurveyInfo();
+        
+        $surveyInfo['surveyID'] = $resultSurvey['info'][0]['?uid']->label;
+        $surveyInfo['surveyTitle'] = $resultSurvey['info'][0]['?title']->label;
+        $surveyInfo['surveyDescription'] = $resultSurvey['info'][0]['?description']->label;
+        $surveyInfo['surveyCreator'] = $resultSurvey['info'][0]['?creator']->label;
+        $surveyQuestionIDs = $resultSurvey['questionIDs'];
+        
+        if($surveyQuestionIDs != false)
+        {
+            $qNumber = 1;
+            foreach($surveyQuestionIDs as $qID)
+            {
+                $questionID = $qID['?questionID']->label;
+                $surveyInfo['questionID'.$qNumber] = $questionID;
+
+                $questionTitleObject = $this->questionRDFReader->readQuestionTitle($questionID);
+                $surveyInfo['questionTitle'.$qNumber] = $questionTitleObject[0]['?questionTitle']->label;
+
+                $questionDescriptionObject = $this->questionRDFReader->readQuestionDescription($questionID);
+                $surveyInfo['questionDescription'.$qNumber] = $questionDescriptionObject[0]['?questionDescription']->label;
+
+                $questionTypeObject = $this->questionRDFReader->readQuestionType($questionID);
+                $surveyInfo['questionType'.$qNumber] = $questionTypeObject[0]['?questionType']->label;
+
+                $resultAnswers = $this->questionRDFReader->readQuestionAnswers($questionID);
+
+                if ($resultAnswers != null)
+                {
+                    for($aNumber = 1;$aNumber<=sizeof($resultAnswers);$aNumber++)
+                    {
+                        $surveyInfo['q'.$qNumber.'ans'.$aNumber] = $resultAnswers[$aNumber-1]['?answerDescription']->label;
+                    }
+                }
+                $resultAnswers = null;
+                $qNumber++;
+            }
+        }
+        
+        return $surveyInfo;
+    }
+    
+    public function getExistingSurveys()
+    {
+        $surveyIDs = array();
+        $surveys = array();
+
+        if($handle = opendir('data/surveys/'))
+        {
+            while (false !== ($file = readdir($handle))) {
+                if(strstr($file, 'survey_') && strstr($file, '.rdf'))
+                    $surveyIDs[] = substr($file,7,strlen($file)-11);
+            }
+        }
+        
+        foreach($surveyIDs as $surveyID)
+        {
+            $surveyTitle = $this->surveyRDFReader->getSurveyTitleByID($surveyID);
+            $surveys[$surveyID] = $surveyTitle[0]['?title']->label;
+        }
+
+        return $surveys;
+    }
+    
+    public function getExistingQuestions()
+    {
+        $questions = array();
+
+        $resultQuestions = $this->questionRDFReader->readQuestionCodes();
+        foreach ($resultQuestions as $questionCodeObject)
+        {
+            $questionCode = $questionCodeObject[0]['?questionCode']->label;
+            $questionTitle = $this->questionRDFReader->readQuestionTitle($questionCode);
+            $questions[$questionCode] = $questionTitle[0]['?questionTitle']->label;
+        }
+
+        return $questions;
+    }
+    
+    public function getSurveyTitleByID($surveyID)
+    {
+        $surveyTitleLiteral = $this->surveyRDFReader->getSurveyTitleByID($surveyID);
+        $surveyTitle = $surveyTitle[0]['?title']->label;
+        
+        return $surveyTitle;
+    }
+    
+    public function checkQuestionCodeExists($qCode)
+    {
+        $result = false;
+
+        $questionCodes = $this->questionRDFReader->readQuestionCodes();
+        
+        if ($questionCodes != null)
+        {
+            foreach($questionCodes as $questionCode)
+            {
+                $code = $questionCode['?questionCode']->label;
+                if(!strcmp($code ,$qCode))
+                {
+                    $result = true;
+                    break;
+                }
+            }
+        }
+
+        return $result;
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/SurveyCreationTool.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyCreationTool.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyCreationTool.php	(revision 225)
@@ -0,0 +1,594 @@
+<?php
+
+/**
+ * Description of SurveyTool
+ *
+ * SurveyTool is where the survey can be created.
+ * 
+ */
+class SurveyCreationTool {
+
+    private $survey;
+    private $timeStamp;
+
+    public function __construct($survey = null, $timeStamp = null) {
+        $this->survey = $survey;
+        $this->timeStamp = $timeStamp;
+        if (isset($this->survey->id))
+            SurveyCreationTool::javascript($this->survey->id);
+        else
+            SurveyCreationTool::javascript();
+        ?>
+
+        <div id="creation"><form id="survey" action="surveycreation.php" method="post">
+                <?php
+                $this->surveyHead();
+                $this->questionCreationForm();
+                SurveyCreationTool::addQuestionButton();
+                SurveyCreationTool::removeLastQuestionButton();
+                ?></form></div>
+        <?php
+    }
+
+    private static function javascript($id = null) {
+        ?>
+        <script type="text/javascript" src="js/creation.js"></script>
+        <script type="text/javascript">
+            /* autosave every 5 minutes */
+            setTimeout("save('<?php echo $id; ?>')", 300000);
+                                                                                                                                                                                                                                                                                                                            
+            var questionCount = 1;          
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+            function getNewQuestion(code, title, description)
+            {
+                if (code == null)
+                    var code = '';
+                        
+                if (title == null)
+                    var title = 'Untitled Question';
+                                                                                                                                                                                                                                                                
+                if (description == null)
+                    var description = 'Write a question description here.';
+                                                                                                                                                                                                                                                 
+                var questionDiv = document.createElement("div");
+                questionDiv.id = "question" + questionCount;
+                questionDiv.className = "question";                                                                            
+                                                                                                
+                var questionTable = document.createElement("table");
+                questionTable.className = "questionTable";
+                                                                                                
+                var th = document.createElement("th");
+                th.innerHTML = "Question " + questionCount;
+
+                var row0 = document.createElement("tr");
+                        
+                var colCodeLabel = document.createElement("td");
+                var codeLabel = document.createElement("label");
+                codeLabel.setAttribute("for", "questionCode");
+                codeLabel.innerHTML = "Code";
+                colCodeLabel.appendChild(codeLabel);
+                        
+                var colCodeInput = document.createElement("td");
+                var codeInput = document.createElement("input");
+                codeInput.id = "questionCode";
+                codeInput.setAttribute("type", "text");
+                codeInput.className = "questionCode";
+                codeInput.setAttribute("name", "questionCode" + questionCount);
+                codeInput.setAttribute("size", "5");
+                codeInput.setAttribute("value", code);
+                colCodeInput.appendChild(codeInput);
+                        
+                row0.appendChild(colCodeLabel);
+                row0.appendChild(colCodeInput);
+
+                var row1 = document.createElement("tr");
+                                                                                                
+                var col1 = document.createElement("td");
+                var titleLabel = document.createElement("label");
+                titleLabel.setAttribute("for", "questionTitle");
+                titleLabel.innerHTML = "Title";
+                col1.appendChild(titleLabel);
+                                                                                        
+                var col2 = document.createElement("td");
+                var titleInput = document.createElement("input");
+                titleInput.id = "questionTitle";
+                titleInput.setAttribute("type", "text");
+                titleInput.className = "questionTitle";
+                titleInput.setAttribute("name", "questionTitle"  + questionCount);
+                titleInput.setAttribute("onfocus", "handleFocus(this)");
+                titleInput.setAttribute("size", "30");
+                titleInput.setAttribute("value", title);
+                col2.appendChild(titleInput);                        
+
+                row1.appendChild(col1);
+                row1.appendChild(col2);
+                                                                                        
+                var row2 = document.createElement("tr");
+                var col3 = document.createElement("td");
+                var descriptionLabel = document.createElement("label");
+                descriptionLabel.setAttribute("for", "questionDescription");
+                descriptionLabel.innerHTML = "Description";
+                col3.appendChild(descriptionLabel);
+                                                                                        
+                var col4 = document.createElement("td");
+                var descriptionInput = document.createElement("input");
+                descriptionInput.type = "text";
+                descriptionInput.className = "questionDescription";
+                descriptionInput.name = "questionDescription" + questionCount;
+                descriptionInput.setAttribute("onfocus", "handleFocus(this)");
+                descriptionInput.setAttribute("size", 40);
+                descriptionInput.setAttribute("value", description);
+                col4.appendChild(descriptionInput);
+                                                                                        
+                row2.appendChild(col3);
+                row2.appendChild(col4);
+                                                                
+                var row3 = document.createElement("tr");
+                var col5 = document.createElement("td");
+                var typeLabel = document.createElement("label");
+                typeLabel.setAttribute("for", "questionType");
+                typeLabel.innerHTML = "Type answer";
+                col5.appendChild(typeLabel);
+                                                                
+                var col6 = document.createElement("td");
+                var select = document.createElement("select");
+                select.id = questionCount;
+                select.setAttribute("name", "questionType" + questionCount);
+                select.setAttribute("onchange", "handleType(this)");
+                select.innerHTML = 
+                    "<option value='text' selected='selected'>Text</option>" +
+                    "<option value='int'>Integer</option>" +
+                    "<option value='mc'>Multiple choice</option>" +
+                    "<option value='checkboxes'>Checkboxes</option>" +
+                    "<option value='scale'>Scale</option>";
+                                                                
+                col6.appendChild(select);
+                                                                
+                row3.appendChild(col5);
+                row3.appendChild(col6);
+                                                                
+                questionTable.appendChild(th);
+                questionTable.appendChild(row0);
+                questionTable.appendChild(row1);
+                questionTable.appendChild(row2);
+                questionTable.appendChild(row3);                         
+                                                                        
+                var answerDiv = document.createElement("div");
+                answerDiv.id = "answersDiv" + questionCount;
+                answerDiv.className = "answersDiv";
+                                                                        
+                questionDiv.appendChild(questionTable);
+                questionDiv.appendChild(answerDiv);
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                
+                return questionDiv;
+            }
+                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+            function handleType(select, answers)
+            {
+                var numQ = select.id; // questionNumber
+                var type = select.valueOf().value;
+                var answersDiv = document.getElementById("answersDiv" + numQ );
+                                                                                                                                                                
+                removeQuestionID(numQ);
+                                                                                                                                                                
+                answersDiv.answerCount = 1;
+                answersDiv.clicked = null;
+                                                                                                                                                                                                                                                                                                                                                                                                        
+                switch (type) {
+                    case 'mc':
+                        answersDiv.innerHTML = "";
+                        if (answers != null)
+                        {
+                            for (var i = 1; i < answers.length; i++)
+                            {
+                                addOption(numQ, answers[i]);
+                            }
+                        }
+                        else
+                            addOption(numQ);
+                                                                                                                                                                                                                                                                                                                                                                                                                                        
+                        break;
+                    case 'text':
+                        answersDiv.innerHTML = "";
+                        break;
+                    case 'int':    
+                        answersDiv.innerHTML = "";
+                                                                                                                                                                                                                                                                
+                        //min max
+                        if (answers != null)
+                            minMax(numQ, answers[1], answers[2]);
+                        else
+                            minMax(numQ);
+                        break;
+                    case 'checkboxes':
+                        answersDiv.innerHTML = "";
+                        if (answers != null)
+                        {
+                            for (var i = 1; i < answers.length; i++)
+                            {
+                                addOption(numQ, answers[i]);
+                            }
+                        }
+                        else
+                            addOption(numQ);
+                        break;
+                    case 'scale':
+                        answersDiv.innerHTML = ""; 
+                        //what scale (min max incr)
+                        if (answers != null)
+                            minMaxIncr(numQ, answers[1], answers[2], answers[3]);
+                        else
+                            minMaxIncr(numQ);
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+                                                                                                                                                            
+            function handleAnswerChange(questionNumber)
+            {
+                removeQuestionID(questionNumber);
+            }
+                                                                                                                                                            
+            function removeQuestionID(questionNumber)
+            {
+                /* When type changes, remove question ID, because question changes */
+                var questionIDInput = document.getElementById("questionID" + questionNumber);
+                if (questionIDInput != null)
+                {
+                    var questionsDiv = document.getElementById("questionsDiv");
+                    questionsDiv.removeChild(questionIDInput);
+                }
+
+            }
+                                                                                                                                                                     
+                                                                                                                                                                                                                                                                                                                                                                                                                            
+            function addOption(questionNumber, optionStr)
+            {        
+                var answersDiv = document.getElementById("answersDiv" + questionNumber);
+                var answerCount = answersDiv.answerCount;
+                var answerDiv = document.createElement("div");
+                                                                                                                                                                                                
+                if (optionStr == null)
+                    var optionStr = "Option " + answerCount;
+                                                                                                                                                                                                
+                                                                                                                                                                                               
+                answerDiv.className = "answerDiv";
+                                                                  
+                var answerInput = document.createElement("input");
+                answerInput.setAttribute("type", "text");
+                answerInput.setAttribute("name", "q" + questionNumber + "ans" + answerCount);
+                answerInput.setAttribute("onchange", "handleAnswerChange(" + questionNumber + ")");
+                answerInput.setAttribute("value", optionStr);
+                                        
+                answerDiv.appendChild(answerInput);
+
+                if (answersDiv.clicked == null)
+                {
+                    var addOpt = document.createElement("input");
+                    addOpt.setAttribute("type", "button");
+                    addOpt.setAttribute("id", "addOpt");
+                    addOpt.setAttribute("class", "surveyButton");
+                    addOpt.setAttribute("onclick", "addOption(" + questionNumber + ")");
+                    addOpt.setAttribute("value", "Add Option");
+                                            
+                    var removeOpt = document.createElement("input");
+                    removeOpt.setAttribute("type", "button");
+                    removeOpt.className = "surveyButton";
+                    removeOpt.setAttribute("onclick", "removeOption(" + questionNumber + ")");
+                    removeOpt.setAttribute("value", "x");
+                                            
+                    answerDiv.appendChild(addOpt);
+                    answerDiv.appendChild(removeOpt);
+                                                                                                                                                                                                                                                                                                                                                        
+                    answersDiv.clicked = true;
+                }
+                                                                                                                                                                                                                                                                                                                                                                        
+                answerDiv.prev = answersDiv.lastAnswer; //singly linked list
+                answersDiv.lastAnswer = answerDiv;
+                                                                                                                                                                                                                                                                                                                                                                                                                                       
+                answersDiv.appendChild(answerDiv);
+                answersDiv.answerCount++;
+                                                                                                                                                                
+                handleAnswerChange(questionNumber);
+            }
+                                                                                                                                                                                                                                                                                                                                                                    
+            function removeOption(questionNumber)
+            {
+                var answersDiv = document.getElementById("answersDiv" + questionNumber);
+                                                                                                                                                                                                                                                                                                                                                                       
+                if (answersDiv.lastAnswer.prev != null)
+                {
+                    answersDiv.removeChild(answersDiv.lastAnswer);
+                    answersDiv.lastAnswer = answersDiv.lastAnswer.prev;
+                    answersDiv.answerCount--;
+                }
+                                                                                                                                                                
+                handleAnswerChange(questionNumber);
+            }
+                                                                                                                                                                                                                                                                                                                                                                                            
+            function minMax(questionNumber, min, max)
+            {
+                if (min == null)
+                    var min = '';
+                if (max == null)
+                    var max = '';
+                                                                                                                                                                                                                                                        
+                var answersDiv = document.getElementById("answersDiv" + questionNumber);
+                                                                                                                                                                                                                                                                                                                                                                                               
+                var answerDiv = document.createElement("div");
+                                                                                                                                                                                                                                                                                                                                                                
+                answerDiv.className = "answerDiv";
+                answerDiv.innerHTML = "<label for='min'>Min</label><input type='text' class='intBox' onchange='checkInt(this)' value='" + min + "' name='q" + questionNumber + "ans1' />" +
+                    "<label for='max'>Max</label><input type='text' class='intBox' onchange='checkInt(this)' value='" + max + "' name='q" + questionNumber + "ans2' />";
+                                                                                                                                                                                                                                                                                                                                                                                           
+                answersDiv.appendChild(answerDiv);
+            }  
+                                                                                                                                                                                                                                                                                                                                                                                            
+            function minMaxIncr(questionNumber, left, right, incr)
+            {
+                if (left == null)
+                    var left = '';
+                else
+                    left.replace("'", "&#39;");
+                if (right == null)
+                    var right = '';
+                else
+                    right.replace("'", "&#39;");
+                if (incr == null)
+                    var incr = '';
+                                                                                                                                                                                                        
+                var answersDiv = document.getElementById("answersDiv" + questionNumber);
+                                                                                                                                                                                                                                                                                                                                                                                               
+                var answerDiv = document.createElement("div");
+                answerDiv.className = "answerDiv";
+                                                                                                                               
+                var leftLabel = document.createElement("label");
+                var rightLabel = document.createElement("label");
+                var scaleLabel = document.createElement("label");
+                leftLabel.innerHTML = "Left label";
+                rightLabel.innerHTML = "Right label";
+                scaleLabel.innerHTML = "Scale count";
+                                                                                                                                
+                var leftInput = document.createElement("input");
+                leftInput.type = "text";
+                leftInput.value = left;
+                leftInput.name= "q" + questionNumber + "ans1";
+                leftInput.setAttribute("onchange", "handleAnswerChange(" 
+                    + questionNumber + ")");
+                                                                                                                                
+                var rightInput = document.createElement("input");
+                rightInput.type = "text";
+                rightInput.value = right;
+                rightInput.name = "q" + questionNumber + "ans2";
+                rightInput.setAttribute("onchange", "handleAnswerChange(" 
+                    + questionNumber + ")");
+                                                                                                                                
+                var scaleInput = document.createElement("input");
+                scaleInput.type = "text";
+                scaleInput.className = "intBox";
+                scaleInput.value = incr;
+                scaleInput.setAttribute("onblur", "checkInt(this)");
+                scaleInput.setAttribute("onchange", "handleAnswerChange(" 
+                    + questionNumber + ")");
+                scaleInput.name = "q" + questionNumber + "ans3";
+                                                                                                                                
+                answerDiv.appendChild(leftLabel);
+                answerDiv.appendChild(leftInput);
+                answerDiv.appendChild(rightLabel);
+                answerDiv.appendChild(rightInput);
+                answerDiv.appendChild(scaleLabel);
+                answerDiv.appendChild(scaleInput);
+                                                                                                                                                                                                                                                                                                                                                                           
+                answersDiv.appendChild(answerDiv);
+            }         
+                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+                                                                                                                                                                                                                                                                                                                                                                                                                                                         
+            function addQuestion(code, title, description)
+            {
+                var questionsDiv = document.getElementById('questionsDiv');
+                var newQuestion = getNewQuestion(code, title, description);
+
+                newQuestion.prev = document.lastQuestion;
+                document.lastQuestion = newQuestion;
+
+                questionsDiv.appendChild(newQuestion);
+                questionCount++;
+            }
+                                                                                                                                                                                                                                                                                                                                                                                    
+            function removeLastQuestion()
+            {
+                var questionsDiv = document.getElementById('questionsDiv');
+                                                                                                                                                                                                                                                                                                                                                                                        
+                if (document.lastQuestion != null)
+                {
+                    questionsDiv.removeChild(document.lastQuestion);
+                    document.lastQuestion = document.lastQuestion.prev;
+                    questionCount--;  
+                }
+                else
+                {
+                    // do nothing
+                }               
+            }
+                                                                                                                                                                                                                                                                                                                                                             
+            function save(surveyID)
+            {
+                if (checksPassed())
+                {
+                    var form = document.getElementById('survey');
+                    var questionsDiv = document.getElementById('questionsDiv');
+                    form.action = "surveycreation.php";
+                                                                                                                                                                                                                                                                                                                                
+                    /* extra time stamp */
+                    var date = new Date();
+                    var minutes = date.getUTCMinutes();
+                    if (minutes < 10)
+                        minutes = "0" + minutes;
+                    var timeStamp = date.getHours() + ":" + minutes;
+                    var timeStampInput = document.createElement("input");
+                    timeStampInput.name = "timeStamp";
+                    timeStampInput.value = timeStamp;
+                    timeStampInput.type = "hidden";
+                                                                                                                                                                                                                                                                                    
+                    var surveyIDInput = document.createElement("input");
+                    surveyIDInput.name = "surveyID";
+                    surveyIDInput.value = surveyID;
+                    surveyIDInput.type = "hidden";
+                                                                                                                                                                                                                                                                                                             
+                    questionsDiv.appendChild(timeStampInput);
+                    questionsDiv.appendChild(surveyIDInput);
+                    form.submit();
+                }
+            }
+                                                                                                                                                            
+            function selectAll(input)
+            {
+                input.select();
+            }
+                                                                                                                                                            
+            /* --- input checking --- */
+            function checksPassed()
+            {
+                var form = document.getElementById('survey');
+                                                                                                                                        
+                for (var i = 0; i < form.length; i++)
+                {
+                    if (form.elements[i].checkPassed == 'no')
+                        return false;
+                }
+                return true;
+            }
+                                                                                                                                    
+
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+        </script>
+        <?php
+    }
+
+    private function surveyHead() {
+        ?><div id="surveyHead">
+        <?php
+        $this->titleBox();
+        $this->saveSurvey();
+        $this->descriptionBox();
+        $this->surveyLink();
+        ?></div>
+        <?php
+    }
+
+    private function titleBox() {
+        if (isset($this->survey->title))
+            $value = $this->survey->title;
+        else
+            $value = 'Untitled Survey';
+        ?>
+        <input type="text" id="surveyTitle" class="titleBox" name="surveyTitle" value="<?php echo str_replace("\"", "&quot;", $value); ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" />
+        <?php
+    }
+
+    private function saveSurvey() {
+        if (isset($this->timeStamp))
+            echo "<div id='timeStamp'>Last saved " . $this->timeStamp . '</div>';
+        if (isset($this->survey->id))
+            $id = $this->survey->id;
+        else
+            $id = null;
+        ?>
+        <input id="surveySaveButton" type="button" onclick="save('<?php echo $id; ?>')" class='surveyButton' value='Save' />
+        <?php
+    }
+
+    private function descriptionBox() {
+        if (isset($this->survey->description))
+            $value = $this->survey->description;
+        else
+            $value = 'Write a helpful description for this survey here.';
+        ?>
+        <textarea id="surveyDescription" class="descriptionBox" name="surveyDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea>
+        <?php
+    }
+
+    private function surveyLink() {
+        if (isset($this->survey)) {
+            $surveyID = $this->survey->id;
+
+            $link = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) .
+                    '/survey.php?id=' . $surveyID;
+            ?>
+            <input type="text" value="<?php echo $link; ?>" id="surveyLink" onclick="selectAll(this)">
+            <?php
+        }
+    }
+
+    private function questionCreationForm() {
+        ?>
+        <div id='questionsDiv'>
+        </div>
+        <?php
+        if (isset($this->survey)) {
+            foreach ($this->survey->questions as $numQ => $question) {
+                ?>
+                <script type="text/javascript">
+                    var answers = new Array();
+                <?php
+                /* Put all answers in js array */
+                foreach ($question->answers as $numA => $answer) {
+                    echo 'answers[' . $numA . '] = "' . addslashes($answer) . '"; ';
+                    ?> 
+                                                                                                                                                                                                                                                                                      
+                    <?php
+                }
+                ?>
+                    var code = "<?php echo addslashes($question->code); ?>";
+                    var title = "<?php echo addslashes($question->title); ?>";
+                    var description = "<?php echo addslashes($question->description); ?>";
+                    addQuestion(code, title, description);
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+                    var select = document.getElementById('<?php echo $numQ; ?>');
+                    var type = '<?php echo $question->type; ?>';
+
+                    for (var i = 0; i < select.options.length; i++) {
+                        if (select.options[i].value == type)
+                        {
+                            select.options[i].selected = true;
+                            handleType(select, answers);
+                            break;
+                        }
+                    }      
+                                                                                                                                                                                                                                                                                                                                    
+                                                                                                                                                                                                                                                                                                                                    
+                    /* questionID stuff */
+                    var questionIDInput = document.createElement("input");
+                    questionIDInput.id = "questionID<?php echo $numQ; ?>";
+                    questionIDInput.name = "questionID<?php echo $numQ; ?>";
+                    questionIDInput.value = "<?php echo $question->id; ?>";
+                    questionIDInput.type = "hidden";
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
+                    document.getElementById("questionsDiv").appendChild(questionIDInput);
+
+                </script>
+                <?php
+            }
+        } else {
+            ?>
+            <script type="text/javascript"> addQuestion();</script>
+            <?php
+        }
+    }
+
+    private static function addQuestionButton() {
+        ?>
+        <input id="addQuestionButton" type="button" onclick="addQuestion()" value="Add New Question" class="surveyButton" />
+        <?php
+    }
+
+    private static function removeLastQuestionButton() {
+        ?>
+        <input type="button" onclick="removeLastQuestion()" value="x" class="surveyButton" />
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/SurveyMenu.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyMenu.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyMenu.php	(revision 225)
@@ -0,0 +1,71 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of SurveyMenu
+ *
+ * @author fpvanagthoven
+ */
+class SurveyMenu extends Menu {
+
+    public function __construct($surveys) {
+        ?> <fieldset class="menu"> <?php
+        parent::__construct('Survey');
+        ?> <div class="menuButtons"> <?php
+        SurveyMenu::newSurveyButton();
+        SurveyMenu::loadSurveyButton();
+//        SurveyMenu::deleteSurveyButton();
+        ?> </div> <?php
+        SurveyMenu::loadSurveyList($surveys);
+        ?> </fieldset> <?php
+    }
+
+    public static function newSurveyButton() {
+        ?>
+
+        <form action="surveycreation.php" method="post">
+
+            <input type="submit" value="New" class="surveyButton bigSurveyButton" />
+
+        </form>
+
+        <?php
+    }
+
+    public static function loadSurveyButton() {
+        ?>
+        <form id="loadForm" action="surveycreation.php" method="post">
+            <input type="button" onclick="loadSurvey()" value="Load / Edit" class="surveyButton bigSurveyButton" />
+        </form>
+        <?php
+    }
+
+    public static function deleteSurveyButton() {
+        ?>
+        <form action="" method="post">
+            <input type="button" onclick="delSurvey()" value="Delete survey" class="surveyButton bigSurveyButton" />
+        </form>
+        <?php
+    }
+
+    /**
+     *
+     * @param Survey $surveys An array of surveys
+     */
+    public static function loadSurveyList($surveys) {
+        ?>
+        <select id="surveysToLoad" class="toLoad" size="1000">
+            <?php
+            foreach ($surveys as $survey) {
+                ?><option value='<?php echo $survey->id; ?>'><?php echo $survey->title; ?></option><?php
+        }
+            ?>
+        </select>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/SurveyRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyRDFReader.php	(revision 225)
@@ -0,0 +1,103 @@
+<?php
+
+class SurveyRDFReader
+{
+    protected $model;
+
+    protected $surveyUID;
+    protected $filePath;
+
+    public function __construct($surveyUID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->surveyUID = $surveyUID;
+        $this->filePath = 'data/surveys/survey_'.$this->surveyUID.'.rdf';
+    }
+
+    public function loadSurvey()
+    {
+        if(file_exists($this->filePath))
+        {
+            $this->model->load($this->filePath);
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    public function getSurveyInfo()
+    {		
+        $this->loadSurvey();
+
+        $result = array();
+        $result['info'] = $this->readSurveyInfo();				
+        $result['questionIDs'] = $this->readSurveyQuestionIDs();
+
+        return $result;
+    }
+
+    public function readSurveyInfo()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?uid ?title ?description ?creator
+            WHERE 	
+            {
+                    _survey	predicates:resource_type	resources:survey ;
+                                predicates:uid			?uid	;
+                                predicates:title 		?title 	;
+                                predicates:description		?description ;
+                                predicates:creator		?creator
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+    
+    public function readSurveyQuestionIDs()
+    {
+        $querystring = '
+            PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT 	?questionID
+            WHERE 
+            {	
+                    _survey	predicates:resource_type	resources:survey ;
+                                predicates:has_question		?questionID				
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function getSurveyTitleByID($surveyID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $tempmodel= $factory->getDefaultModel();
+        $tempmodel->load('data/surveys/survey_'.$surveyID.'.rdf');
+
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?title 
+            WHERE 	
+            {
+                    _survey     predicates:resource_type	resources:survey ;
+                                predicates:title 		?title 	
+            }';
+
+        $result = $tempmodel->sparqlQuery($querystring);
+
+        return $result;
+    }
+}
+?>
Index: Dev/branches/Demo/classes_old/SurveyRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyRDFWriter.php	(revision 225)
@@ -0,0 +1,66 @@
+<?php
+
+class SurveyRDFWriter 
+{
+    protected $model;
+
+    protected $resourceSurvey;
+    protected $surveyUID;
+
+    protected $filePath;
+
+    public function __construct($surveyUID)
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        $this->surveyUID = $surveyUID;	
+        $this->filePath = 'data/surveys/';
+        if (!is_dir($this->filePath))
+            mkdir($this->filePath);	
+    }	
+
+    public function saveSurvey()
+    {	
+        $this->model->saveAs($this->filePath.'survey_'.$this->surveyUID.'.rdf','rdf');
+    }
+
+    public function createSurvey($sTitle, $sDescription)
+    {		
+        $this->resourceSurvey = new Resource(SURVEY.'/'.$this->surveyUID);
+
+        $resourceSurveyType = new Resource(SURVEY);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($this->resourceSurvey,$predicateRType,$resourceSurveyType));
+
+        $literalSurveyID = new Literal($this->surveyUID);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($this->resourceSurvey,$predicateUniqueID,$literalSurveyID));
+
+        $predicateTitle = new Resource(TITLE);		
+        $surveyTitle = new Literal($sTitle);
+        $this->model->add(new Statement($this->resourceSurvey,$predicateTitle,$surveyTitle));		
+
+        $predicateDescription = new Resource(DESCRIPTION);
+        $surveyDescription = new Literal($sDescription);
+        $this->model->add(new Statement($this->resourceSurvey,$predicateDescription,$surveyDescription));		
+    }
+
+    public function setUserData($uID)
+    {				
+        $userID = new Literal($uID);
+
+        $predicateCreator = new Resource(CREATOR);
+        $this->model->add(new Statement($this->resourceSurvey,$predicateCreator,$userID));
+    }
+
+    public function addQuestion($qID)
+    {		
+        $questionID = new Literal($qID);
+        $predicateQuestion = new Resource(HAS_QUESTION);
+        $this->model->add(new Statement($this->resourceSurvey,$predicateQuestion,$questionID));
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/SurveyResults.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyResults.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyResults.php	(revision 225)
@@ -0,0 +1,59 @@
+<?php
+
+class ResultType
+{
+	/* possible types */
+	const TEXT = 0;				// string
+	const INTEGER = 1;			// int
+	const MULTIPLE_CHOICE = 2;  // string
+	const CHECKBOXES = 3;		// array
+	const SCALE = 4;			// int
+}
+
+/**
+ * 1 Results per Survey
+ *
+ * @author Frans
+ */
+class SurveyResults
+{
+	private $questionResults; 
+
+	public function __construct()
+	{
+		$this->questionResults = array();
+	}
+
+	public function addQuestionResult($result)
+	{
+		array_push($this->questionResults, $result);
+	}
+	
+	public function getQuestionResults()
+	{
+		return $this->questionResults;
+	}
+	
+}
+
+/**
+ * A Result per question
+ */
+class QuestionResult
+{
+	private $type;
+	public $answers; // array
+
+	public function __construct($type, $answers)
+	{
+		$this->type = $type;
+		$this->answers = $answers;
+	}
+        
+        public function getType()
+        {
+            return $this->type;
+        }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/SurveyTool.php
===================================================================
--- Dev/branches/Demo/classes_old/SurveyTool.php	(revision 225)
+++ Dev/branches/Demo/classes_old/SurveyTool.php	(revision 225)
@@ -0,0 +1,162 @@
+<?php
+
+/**
+ * Description of SurveyTool
+ *
+ * @author fpvanagthoven
+ */
+class SurveyTool {
+
+    private $survey;
+
+    public function __construct($survey) {
+        $this->survey = $survey;
+
+        $this->javascript();
+        $this->init();
+    }
+
+    private function javascript() {
+        ?>
+        <script type="text/javascript">
+                        /* --- input checking --- */
+            function checksPassed(form)
+            {
+                for (var i = 0; i < form.length; i++)
+                {
+                    if (form.elements[i].checkPassed == 'no')
+                        return false;
+                }
+                return true;
+            }
+                    
+            function checkInt(input)
+            {
+                input.style.borderWidth = '1px' ;
+                var value = input.value;
+                if (isNaN(value))
+                {
+                    input.style.borderColor = 'red';
+                    input.checkPassed = 'no';
+                }
+                else
+                {
+                    input.style.border = '1px solid #abadb3';
+                    input.checkPassed = null;
+                }
+            }
+        </script>
+        <?php
+    }
+
+    private function init() {
+        ?>
+        <form name="survey" action="" onsubmit="return checksPassed(this)" method="post">
+            <?php
+            $this->displayTitle();
+            $this->displayDescription();
+            $this->displayQuestions();
+            $this->submitSurvey();
+            ?>
+        </form>
+        <?php
+    }
+
+    private function displayTitle() {
+        ?>
+        <h1><?php echo $this->survey->title; ?></h1>
+        <?php
+    }
+
+    private function displayDescription() {
+        if ($this->survey->description != Survey::DEFAULT_DESCRIPTION)
+            $description = $this->survey->description;
+        else
+            $description = "";
+        ?>
+        <p class='centerBoxed'><?php echo $description; ?></p>
+        <?php
+    }
+
+    private function displayQuestions() {
+        foreach ($this->survey->questions as $numQ => $question) {
+
+            $this->displayQuestion($question, $numQ);
+        }
+    }
+
+    private function displayQuestion($question, $numQ) {
+        echo "<fieldset>";
+        $this->displayQuestionTitle($question);
+        $this->displayQuestionDescription($question);
+        $this->displayAnswerBox($question, $numQ);
+        echo "</fieldset>";
+    }
+
+    private function displayQuestionTitle($question) {
+        ?>
+        <?php echo "<legend><h2>" . $question->title . "</h2></legend>"; ?>
+        <?php
+    }
+
+    private function displayQuestionDescription($question) {
+        if ($question->description != "Write a question description here.")
+            $description = $question->description;
+        else
+            $description = "";
+        ?>
+        <p><?php echo "<div class='questionDescription noPadding'>" . $description . "</div>"; ?></p>
+        <?php
+    }
+
+    private function displayAnswerBox($question, $numQ) {
+        echo "<div class='answerBox'>";
+        switch ($question->type) {
+            case 'text':
+                ?>
+                <input type="text" name="<?php echo 'q' . $numQ . 'result1' ?>" value="" class="textBox"/>
+                <?php
+                break;
+            case 'int':
+                ?>
+                <input type="text" name="<?php echo 'q' . $numQ . 'result1' ?>" value="" onchange="checkInt(this)" class="intBox"/>
+                <?php
+                break;
+            case 'mc':
+                foreach ($question->answers as $answer) {
+                    ?>
+                    <input type="radio" name="<?php echo 'q' . $numQ . 'result1' ?>" value="<?php echo $answer; ?>" /><?php echo $answer; ?><br />
+                    <?php
+                }
+                break;
+            case 'checkboxes':
+                foreach ($question->answers as $numA => $answer) {
+                    ?>
+                    <input type="checkbox" name="<?php echo 'q' . $numQ . 'result' . $numA; ?>" value="<?php echo $answer; ?>" /><?php echo $answer; ?><br />
+                    <?php
+                }
+
+                break;
+            case 'scale':
+                ?>
+                <div class="scaleLabel"><?php echo $question->answers[1]; ?></div>
+                <?php
+                for ($i = 1; $i < $question->answers[3] + 1; $i++) {
+                    ?><input type="radio" class="scaleRadio" name="<?php echo 'q' . $numQ . 'result1' ?>" value="<?php echo $i; ?>"/><?php } ?>
+                <div class="scaleLabel"><?php echo $question->answers[2]; ?></div>
+                <?php
+                break;
+            default:
+                break;
+        }
+        echo "</div>";
+    }
+
+    private function submitSurvey() {
+        ?>
+        <input type="submit" value="Submit survey!" id="submitSurvey" class="topMargin surveyButton bigSurveyButton"/>
+        <?php
+    }
+
+}
+?>
Index: Dev/branches/Demo/classes_old/UserDatabaseInterface.php
===================================================================
--- Dev/branches/Demo/classes_old/UserDatabaseInterface.php	(revision 225)
+++ Dev/branches/Demo/classes_old/UserDatabaseInterface.php	(revision 225)
@@ -0,0 +1,80 @@
+<?php
+
+// Survey class as intermediate for storing data from the site to the RDF database 
+require_once 'rdfConstants.php';
+
+// Include RAP Library to write RDF files
+include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
+
+class UserDatabaseInterface
+{
+    protected $key = 'CPSsecretKey';
+
+    protected $userRDFWriter;
+    protected $userRDFReader;
+
+    public function __construct()
+    {
+        $this->userRDFWriter = new UserRDFWriter();
+        $this->userRDFReader = new UserRDFReader();
+    }
+
+    public function addNewUser($userInfo)
+    {
+        $userName = $userInfo['username'];
+        $userPassword = $this->RIJNDAEL_encrypt($userInfo['password']);
+
+        if(!$this->checkUserName($userName))
+        {
+            $this->userRDFWriter->addNewUser($userName, $userPassword);
+            $this->userRDFWriter->saveUsers();            
+        }
+    }
+
+    public function checkUserName($userName)
+    {
+        $result = false;
+
+        $resultUser = $this->userRDFReader->getUserNames();
+
+        if ($resultUser != null)
+        {
+            foreach($resultUser as $user)
+            {
+                $name = $user['?name']->label;
+                if(!strcmp($name ,$userName))
+                {
+                    $result = true;
+                }
+            }
+        }
+
+        return $result;
+    }
+
+    public function checkUserPassword($userInfo)
+    {
+        $result = false;
+
+        $userName = $userInfo['username'];
+        $userPassword = $userInfo['password'];
+
+        $encryptedPasswordLiteral = $this->userRDFReader->getUserPassword($userName);
+        $encryptedPassword = $encryptedPasswordLiteral[0]['?password']->label;
+
+        if(!strcmp($this->RIJNDAEL_encrypt($userPassword),$encryptedPassword))
+            $result = true;
+
+        return $result;
+    }
+
+    protected function RIJNDAEL_encrypt($text)
+    {
+        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
+        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
+
+        return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $text, MCRYPT_MODE_ECB, $iv)); 
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/UserRDFReader.php
===================================================================
--- Dev/branches/Demo/classes_old/UserRDFReader.php	(revision 225)
+++ Dev/branches/Demo/classes_old/UserRDFReader.php	(revision 225)
@@ -0,0 +1,54 @@
+<?php
+
+class UserRDFReader
+{
+    protected $model;
+    protected $fileName = 'data/users/users.rdf';
+
+    public function __construct()
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        if(file_exists($this->fileName))
+            $this->model->load($this->fileName);
+    }
+
+    public function getUserNames()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?name 
+            WHERE 	
+            {
+                    _user	predicates:resource_type	resources:user ;
+                                predicates:name 		?name 	
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function getUserPassword($userName)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?password 
+            WHERE 	
+            {
+                    _user	predicates:resource_type	resources:user ;
+                                predicates:name			"' . $userName . '"	;
+                                predicates:password		?password
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+}
+
+?>
Index: Dev/branches/Demo/classes_old/UserRDFWriter.php
===================================================================
--- Dev/branches/Demo/classes_old/UserRDFWriter.php	(revision 225)
+++ Dev/branches/Demo/classes_old/UserRDFWriter.php	(revision 225)
@@ -0,0 +1,48 @@
+<?php
+
+class UserRDFWriter
+{
+    protected $model;
+    protected $fileName = 'data/users/users.rdf';
+
+    public function __construct()
+    {
+        // Create empty MemModel
+        $factory = new ModelFactory();
+        $this->model = $factory->getDefaultModel();
+
+        if(file_exists($this->fileName))
+            $this->model->load($this->fileName);
+    }
+
+    public function saveUsers()
+    {						
+        $this->model->saveAs($this->fileName,'rdf');
+    }
+
+    public function addNewUser($name,$password)
+    {
+        $userID = md5( uniqid(rand(), true) );
+
+        $resourceUser = new Resource(USER . '/' . $userID);
+
+        $resourceUserType = new Resource(USER);
+        $predicateRType = new Resource(RTYPE);
+        $this->model->add(new Statement($resourceUser,$predicateRType,$resourceUserType));
+
+        $literalUserName = new Literal($name);
+        $predicateName = new Resource(NAME);
+        $this->model->add(new Statement($resourceUser,$predicateName,$literalUserName));	
+
+        $literalUserID = new Literal($userID);
+        $predicateUniqueID = new Resource(UID);
+        $this->model->add(new Statement($resourceUser,$predicateUniqueID,$literalUserID));		
+
+        $literalPassword = new Literal($password);
+        $predicatePassword = new Resource(PASSWORD);
+        $this->model->add(new Statement($resourceUser,$predicatePassword,$literalPassword));	
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/classes_old/master.php
===================================================================
--- Dev/branches/Demo/classes_old/master.php	(revision 225)
+++ Dev/branches/Demo/classes_old/master.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * Description of master
+ * 
+ * For autoloading of classes for example.
+ *
+ * @author fpvanagthoven
+ */
+// Determine our absolute document root
+define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
+
+/* Session */
+session_name("cpsft");   // Set a session name
+session_start();  // Start the session
+
+
+
+function __autoload($class_name) {
+    require 'classes/' . $class_name . '.php';
+}
+
+
+// Redirects user to $url
+function redirect($url = null)
+{
+	if (is_null($url))
+		$url = $_SERVER['PHP_SELF'];
+
+	header("Location: $url");
+	exit();
+}
Index: Dev/branches/Demo/createObject.php
===================================================================
--- Dev/branches/Demo/createObject.php	(revision 225)
+++ Dev/branches/Demo/createObject.php	(revision 225)
@@ -0,0 +1,51 @@
+<?php
+
+require 'classes/master.php'; //should be at top of every page
+
+if (isset($_POST['objectToCreate'])) {
+    if (!empty($_POST['objectToCreate'])) {
+        $otc = $_POST['objectToCreate'];
+    } else {
+        //die ("Invalid arguments passed!");
+    }
+} else {
+    //die ("No arguments passed!");
+}
+
+$dbi = new DatabaseInterface();
+$creator_results = $dbi->get("User", array("uid" => $_SESSION['userUid']));
+$creator = $creator_results[0];
+
+//var_dump($creator);
+
+if (!$creator) {
+    die("Stuff is broke, yo!");
+}
+
+$uid = null;
+switch (strtolower($otc)) {
+    case "application":
+        $newApp = new Application(null, "New application", "Default description", "Default style");
+        $dbi->set($newApp);
+        $uid = $newApp->uid;
+        break;
+    case "survey":
+        $newSurvey = new Survey(null, "New Survey", "Default description", $creator, null);
+        $dbi->set($newSurvey);
+        $uid = $newSurvey->uid;
+        break;
+    case "dashboard":
+        //TODO
+        break;
+    case "question":
+        $newQuestion = new Question(null, "new Question", "int", "Default description", "Standard category", array());
+        $dbi->set($newQuestion);
+        $uid = $newQuestion->uid;
+        break;
+    default:
+        //die ("Variable \$otc: $otc does not match a compatible object type!");
+        break;
+}
+
+echo $uid;
+?>
Index: Dev/branches/Demo/createapplication.php
===================================================================
--- Dev/branches/Demo/createapplication.php	(revision 225)
+++ Dev/branches/Demo/createapplication.php	(revision 225)
@@ -0,0 +1,22 @@
+<?php
+
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['currentSession'])) {
+    die("No session currently active!");
+}
+
+
+$dbi = new DatabaseInterface();
+
+$newApplication = new Application(null, "New application", "Default application", "Default style");
+$dbi->set($newApplication);
+
+if (isset($_SESSION['localSessionCopy']) && !empty($_SESSION['localSessionCopy'])) {
+    $session = $_SESSION['localSessionCopy'];
+    $session->pipeline[] = $newApplication;
+    $_SESSION['localSessionCopy'] = $session;
+}
+
+redirect("pipelineEditor.php");
+?>
Index: Dev/branches/Demo/createsurvey.php
===================================================================
--- Dev/branches/Demo/createsurvey.php	(revision 225)
+++ Dev/branches/Demo/createsurvey.php	(revision 225)
@@ -0,0 +1,29 @@
+<?php
+
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['username'])) {
+    redirect("index.php");
+}
+
+$dbi = new DatabaseInterface();
+$creator_results = $dbi->get("user", array("name" => $_SESSION['username']));   // Determine if user exists, so we can add him/her as creator of the new survey
+if (count($creator_results) > 0) {
+    $creator = $creator_results[0];
+    $newSurvey = new Survey(null, "New survey", "Default description", $creator, null);
+    $dbi->set($newSurvey);
+} else {
+    die("No user with that uid found!");
+}
+
+// Optional part, for when the session needs to be set in pipelineEditor
+// For now, store in local copy, only upload local copy to db when needed (page change, etc...)
+if (isset($_SESSION['localSessionCopy']) && !empty($_SESSION['localSessionCopy'])) {
+    $session = $_SESSION['localSessionCopy'];
+    $session->pipeline[] = $newSurvey;
+    $_SESSION['localSessionCopy'] = $session;
+}
+
+
+redirect("pipelineEditor.php");
+?>
Index: Dev/branches/Demo/css/aapje.css
===================================================================
--- Dev/branches/Demo/css/aapje.css	(revision 225)
+++ Dev/branches/Demo/css/aapje.css	(revision 225)
@@ -0,0 +1,188 @@
+/* 
+    Document   : style
+    Created on : 12-jul-2011, 15:12:02
+    Author     : fpvanagthoven
+    Description:
+        Purpose of the stylesheet follows.
+*/
+
+/* 
+   TODO customize this sample style
+   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+h1 {
+    width: 100%;
+    text-align: center;
+    color: white;
+    text-shadow: #888 0px 0px 1em;
+    margin: 0 0 0.1em 0;
+}
+
+h2 {
+    margin: 0;
+    font-size: larger;
+}
+
+h3 {
+    margin: 0;
+    font-size: small;
+    font-weight: normal;
+    color: #333;
+}
+
+legend {
+    padding-left: 0em;
+    color: #fff;
+    text-shadow: #000 0px 0px .4em;
+}
+
+fieldset {
+    background-color: #aeb2b3;
+    border: 1px solid #fff;
+    -moz-border-radius: 1em;
+    border-radius: 1em;
+    margin-bottom: 2em;
+    padding: 0 1em 1em 1em;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+html {
+    background-image: url('../images/bg/blueishgridblock.png');
+    height: 100%;
+    font-size: 12px;
+}
+
+root { 
+    display: block;
+}
+
+body {
+    font-family: sans-serif;
+    background-image: url('../images/bg/blueishgrid.png');
+    background-repeat: repeat-x;
+    margin: 0;
+    padding: 0;
+    height: 100%;
+}
+
+input {
+    background-color: #c6c6c6;
+    border: 1px solid #888;
+}
+
+textarea {
+    background-color: #c6c6c6;
+    border: 1px solid #888;
+}
+
+select {
+    background-color: #c6c6c6;
+    border: 1px solid #888;
+}
+
+#wrapper {
+    width: 80%;
+    min-width: 800px;
+    margin: auto;
+}
+
+#header {
+    height: 4em;
+    background-color: transparent;
+}
+
+#logo{
+    background-image: url('../images/headlogo.png');
+    background-position: top center;
+    background-repeat: no-repeat;
+    font-size: 2em;
+    font-weight: bold;
+    text-align: center;
+    padding-top: 15px;
+    /*line-height: 2em;*/
+    text-shadow: #555 0px 0px .2em;
+    height: 189px;
+}
+
+#logo a {
+    text-decoration: none;
+    color: #ddd;
+}
+
+#logo a:hover {
+    color: #fff;
+}
+
+#content {
+    position: relative;
+    width: 100%;
+    padding: 2em 0;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+.menu {
+    width: 30em;
+    margin: 1em auto 0 auto;
+    padding: 2em;
+    text-align: center;
+    background-image: url('../images/bg/graygradient.png');
+    background-repeat: repeat-x;
+    background-color: #aeb2b3;
+    -moz-border-radius: 15px;
+    border-radius: 15px; 
+    border: 1px solid white;
+   }
+
+.selectionmenu {
+    padding: 2em;
+    margin: 1em;
+    width:20%;
+    height: 25%;
+    overflow: auto; 
+    text-align: center;
+    background-image: url('../images/bg/graygradient.png');
+    background-repeat: repeat-x;
+    background-color: #aeb2b3;
+    -moz-border-radius: 15px;
+    border-radius: 15px; 
+    border: 1px solid white;
+    float: left;
+}
+
+.menuButtons {
+    float: left;
+}
+
+.toLoad {
+    background-color: #c6c6c6;
+    width: 23em;
+    height: 10em;
+}
+
+.feedback {
+    color: #fff;       
+    font-size: 30px;
+    float: right;
+}
+
+.radarGraph {
+    width: 35em;
+    margin: 1em auto 0 auto;
+    padding: 2em;
+    text-align: center;
+    background-image: url('../images/bg/graygradient.png');
+    background-repeat: repeat-x;
+    background-color: #aeb2b3;
+    -moz-border-radius: 15px;
+    border-radius: 15px; 
+    border: 1px solid white;
+    text-orientation: center;
+   }
+
+
+
+
+
Index: Dev/branches/Demo/css/awesome.css
===================================================================
--- Dev/branches/Demo/css/awesome.css	(revision 225)
+++ Dev/branches/Demo/css/awesome.css	(revision 225)
@@ -0,0 +1,990 @@
+/* 
+    Document   : style
+    Created on : 12-jul-2011, 15:12:02
+    Author     : fpvanagthoven
+    Description:
+        Purpose of the stylesheet follows.
+*/
+
+/* 
+   TODO customize this sample style
+   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+
+h1 {
+    width: 100%;
+    text-align: center;
+    color: white;
+    text-shadow: #888 0px 0px 1em;
+    margin: 0 0 0.1em 0;
+}
+
+h2 {
+    margin: 0;
+    font-size: larger;
+}
+
+h3 {
+    margin: 0;
+    font-size: small;
+    font-weight: normal;
+    color: #333;
+}
+
+legend {
+    padding-left: 0em;
+    color: #fff;
+    text-shadow: #000 0px 0px .4em;
+}
+
+fieldset {
+    background-color: #aeb2b3;
+    border: 1px solid #fff;
+    -moz-border-radius: 1em;
+    border-radius: 1em;
+    margin-bottom: 2em;
+    padding: 0 1em 1em 1em;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+html {
+    background-image: url('../images/bg/blueishgridblock.png');
+    height: 100%;
+    font-size: 12px;
+}
+
+root { 
+    display: block;
+}
+
+body {
+    font-family: sans-serif;
+    background-image: url('../images/bg/blueishgrid.png');
+    background-repeat: repeat-x;
+    margin: 0;
+    padding: 0;
+    height: 100%;
+}
+
+input {
+    background-color: #c6c6c6;
+    border: 1px solid #888;
+}
+
+textarea {
+    background-color: #c6c6c6;
+    border: 1px solid #888;
+}
+
+select {
+    background-color: #c6c6c6;
+    border: 1px solid #888;
+}
+
+#wrapper {
+    width: 80%;
+    min-width: 800px;
+    margin: auto;
+}
+
+#header {
+    height: 4em;
+    background-color: transparent;
+}
+
+#logo{
+    background-image: url('../images/headlogo.png');
+    background-position: top center;
+    background-repeat: no-repeat;
+    font-size: 2em;
+    font-weight: bold;
+    text-align: center;
+    padding-top: 15px;
+    /*line-height: 2em;*/
+    text-shadow: #555 0px 0px .2em;
+    height: 189px;
+}
+
+#logo a {
+    text-decoration: none;
+    color: #ddd;
+}
+
+#logo a:hover {
+    color: #fff;
+}
+
+#content {
+    position: relative;
+    width: 100%;
+    padding: 2em 0;
+}
+
+
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+#creation {
+    position: relative;
+    min-height: 10em;
+    background-image: url('../images/bg/graygradient.png');
+    background-repeat: repeat-x;
+    background-color: #aeb2b3;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+    -moz-box-shadow: 2px 2px 2px #888;
+    -webkit-box-shadow: 2px 2px 2px #888;
+    box-shadow: 2px 2px 2px #888;
+    padding: 2em;
+    border: 1px solid white;
+}
+
+#surveyHead {
+    position: relative;
+    width: 100%;
+}
+
+#surveyTitle {
+
+}
+
+#surveyTitle:hover {
+
+}
+
+.titleBox {
+    width: 17em;
+    font-size: large;
+    color: #555;
+}
+
+.titleBox:hover {
+    color: black;
+}
+
+#surveyDescription {
+
+}
+
+.descriptionBox {
+    display: block;
+    width: 30em;
+    max-width: 30em;
+    font-family: sans-serif;
+    color: #555;
+}
+
+#timeStamp {
+    position: absolute;
+    color: #333;
+    font-size: small;
+    right: 6em;
+    top: 0;
+    line-height: 2.3em;
+}
+
+#surveySaveButton {
+    position: absolute;
+    top: 0;
+    right: 0;
+    width: 5em;
+}
+
+#surveyDescription:hover {
+    color: black;
+}
+
+#surveyLink {
+    position: absolute;
+    top: -2em;
+    right: 0;
+    font-size: x-small;
+    color: #333;
+    width: 30em;
+    border-color: transparent;
+    background-color: transparent;
+}
+
+#questionsDiv {
+    margin-top: 2em;
+}
+
+.answersDiv {
+    margin-left: 0.5em;
+}
+
+#submitSurvey {
+    display: block;
+    height: 3em;
+    width: 10em;
+    margin-top: 2em;
+    background-color: #aeb2b3;
+    border: 1px solid white;
+}
+
+#submitSurvey:hover {
+    background-color: #e3eff3;
+    color: #111;
+    border-color: deepskyblue;
+}
+
+#submitSurvey:active {
+    background-color: #fff;
+    border-style: inset;
+    border-color: orange;
+}
+
+#addQuestionButton {
+    margin-top: 1em;
+    width: 20em;
+}
+
+#addOpt {
+    margin-left: 1em;
+}
+
+
+.surveyButton {
+    color: #444;
+    font-weight: bold;
+    background-color: transparent;
+    border: 1px solid #555;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+
+.surveyButton.dis {
+    color: #666;
+}
+
+.surveyButton.dis:hover {
+    background-color: transparent;
+    color: #666;
+    border-color: #555;
+}
+
+.bigSurveyButton {
+    margin-top: 1px;
+    height: 3em;
+    width: 12em;
+}
+
+.surveyButton:hover {
+    background-color: #e3eff3;
+    color: #111;
+    border-color: deepskyblue;
+}
+
+.surveyButton:active {
+    background-color: #fff;
+    border-style: inset;
+    border-color: orange;
+}
+
+.question {  
+    margin-top: 3em;
+    border-top: 1px solid #ddd;
+    text-shadow: #fff 0px 0px 1px;
+}
+
+.questionTable td{
+    width: 8em;
+}
+
+.questionTable th{
+    text-align: left;
+}
+
+
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+.menu {
+    width: 30em;
+    margin: 1em auto 0 auto;
+    padding: 2em;
+    text-align: center;
+    background-image: url('../images/bg/graygradient.png');
+    background-repeat: repeat-x;
+    background-color: #aeb2b3;
+    -moz-border-radius: 15px;
+    border-radius: 15px; 
+    border: 1px solid white;
+}
+
+.menuButtons {
+    float: left;
+}
+
+.toLoad {
+    background-color: #c6c6c6;
+    width: 23em;
+    height: 10em;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+.padding2em {
+    padding: 2em;
+}
+
+.padding1em {
+    padding: 1em;
+}
+
+.topMargin {
+    margin-top: 2em;
+}
+
+.leftPadding {
+    padding-left: 2em;
+}
+
+.leftPadding1 {
+    padding-left: 1em;
+}
+
+.noPadding {
+    padding: 0;
+}
+
+.centerBoxed {
+    margin: 1em auto;
+    width: 30em;
+    text-align: center;
+    padding: 0 1em;
+    font-size: small;
+    color: white;
+    /*    border: 1px solid gray;*/
+}
+
+.nextLine {
+    display: block;
+}
+
+.leftAlign {
+    text-align: left;
+}
+
+.leftMargin {
+    margin-left: 10px;
+}
+
+.width100p {
+    width: 100%;
+}
+
+.floatLeft {
+    float: left;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+.answerInput {
+    display: block;
+}
+
+.answerBox {
+    padding-left: 1em;
+}
+
+.textBox {
+    width: 20em;
+}
+
+.intBox {
+    width: 5em;
+    margin: 0 .3em;
+    border: 1px solid #abadb3;
+}
+
+.scaleLabel {
+    display: inline;
+    color: #333;
+}
+
+.questionTitle {
+
+}
+
+.questionDescription {
+    font-size: small;
+}
+
+.topRight {
+    position: absolute;
+    top: 2.3em;
+    right: 2.3em;
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+.borderRadius {
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.boxShadow {
+    -moz-box-shadow: 2px 2px 2px #888;
+    -webkit-box-shadow: 2px 2px 2px #888;
+    box-shadow: 2px 2px 2px #888;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+#questionEditForm {
+
+}
+
+#saveQuestion {
+    position: absolute;
+    top: 1em;
+    right: 1em;
+}
+
+#clearQuestionFields {
+    position: absolute;
+    top: 1em;
+    right: 5em;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+#sessionCreationForm {
+    padding-bottom: 16em;
+}
+
+#pipelineWrapper {
+    float: left;
+    width: 40%;
+}
+
+.pipelineHead {
+    margin-top: 1em;
+    text-shadow: #fff 0px 0px 1px;
+}
+
+#pipeline {
+    display: block;
+    width: 100%;
+    height: 15em;
+    overflow: hidden;
+}
+
+#surveysList {
+    height: 15em;
+}
+
+#applicationsList {
+    height: 15em;
+}
+
+.pipelineButton {
+
+}
+
+#surveysApplicationsWrapper {
+    float: left;
+    width: 60%;
+}
+
+#surveysForPipelineWrapper {
+    float: left;
+    width: 50%;
+}
+
+#applicationsForPipelineWrapper {
+    float: left;
+    width: 50%;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+.resultsDiv {
+    height: 10em;
+    border: 1px solid white;
+}
+
+.resultDiv {
+    width: 10em;
+    height: 10em;
+    border: 1px solid white;
+    background-color: #c6c6c6;
+    float: left;
+    margin-left: 2em;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+#questionCreation
+{
+    position: relative;
+    min-height: 10em;
+    min-width: 500px;
+    width: 50%;
+    background-image: url('../images/bg/graygradient.png');
+    background-repeat: repeat-x;
+    background-color: #aeb2b3;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+    -moz-box-shadow: 2px 2px 2px #888;
+    -webkit-box-shadow: 2px 2px 2px #888;
+    box-shadow: 2px 2px 2px #888;
+    padding: 2em;
+    border: 1px solid white;
+}
+
+#questionListWrapper {
+    float: left;
+    text-align: center;
+    margin-bottom: 5em;
+    width: 40%;
+    margin-right: 2em;
+}
+
+#questionListWrapper #questionsList {
+    height: 30em;
+    width: 100%;
+}
+
+#questionEditForm {
+
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+.xdebug-var-dump {
+    color:white;
+}
+
+
+/*
+#pipelineFrame{
+    height: 12em;
+    width: 96em;
+    display: block;
+    background-image: url('../images/bg/pipelineFrameBG.png');
+    background-color: #e3eff3;
+}
+
+.pipelineFrame .pipelineObject {
+    width: 10em;
+    height: 10em;
+    margin: 1em auto 1em auto;
+    text-align: center;
+}
+*/
+
+/*
+*
+*
+*   Horizontal sequencer styling
+*
+*
+*/
+
+#sequencer {
+    width: 100%;
+    /*max-width: 800px;*/
+    margin: 0 auto 0 auto;
+    padding-right: 0.5em;
+    /*background-image: url('../images/bg/sequencerBG.png');*/
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+    float: left;
+}
+
+#sequencer #seqContent {
+    height: 9em;
+    width: 98%;
+    overflow-x: scroll;
+    overflow-y: hidden;
+
+    margin-bottom: 0.5em;
+
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left bottom,
+        left top,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+
+    border: 1px solid #ddd;
+    -moz-border-radius: 0.5em;
+    border-radius: 0.5em;
+    padding: 0.5em;
+    /*white-space: nowrap;*/
+    float: left;
+}
+
+#sequencer #controls {
+    width: auto;
+    text-align: right;
+    margin-bottom: -0.5em;
+    float: right;
+}
+
+.displayStep {
+    width: 52px;
+    padding: 0;
+    margin: 10px 0 0 0;
+    background-repeat: no-repeat;
+    float: left;
+    text-align: center;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+}
+
+.displayStep.selected {
+    -moz-box-shadow: 0 0 50px #FFF;
+    -webkit-box-shadow: 0 0 50px #FFF;
+    box-shadow: 0 0 50px #FFF;
+
+}
+
+.displayStep .displayStepIcon {
+    width: 50px;
+    height: 50px;
+    border: 2px solid #444444;
+    color: #FFF;
+    /*float: left;*/
+}
+
+.displayStep p{
+    margin-top: 5px;
+    font-weight: normal;
+    font-size: 0.875em;
+    /*float: left;*/
+
+}
+
+#seqContent .divider {
+    width: 10px;
+    height: 50px;
+    margin: 10px 15px 0 20px;
+    background-image: url('../images/ui/sequencerDivider.png');
+    float: left;
+    /*display: inline-block;*/
+}
+
+#seqContentWrapper {
+    float: left;
+    margin-right: -32767px; /* maximum for opera, enough for ~320 steps*/
+    padding: 0 10px;
+}
+
+
+
+
+
+
+/*
+ *
+ *
+ *  TOOLBOX
+ *
+ *
+*/
+
+#toolbox {
+    /*width: 40%;*/
+    float: left;
+    margin: 1em 2em 0 0;
+    /*background-image: url('../images/bg/sequencerBG.png');*/
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+
+}
+
+#toolbox .creationButton {
+    height: 50px;
+    margin: 0 0 5px 0;
+    border: 1px solid #000;
+    border-radius: 6px;
+    -moz-border-radius: 6px;
+    cursor: pointer;
+}
+
+#toolbox .creationButton:hover {
+    border: 1px solid #FFF;
+    background: rgba(255, 255, 255, 0.2);
+}
+
+#toolbox .buttonIcon {
+    border: none;
+    border-radius: 6px;
+    margin: 0 10px 0 0;
+    float: left;
+}
+
+#toolbox .creationButton p {
+    margin: 15px 10px 0 0;
+    color: #444;
+    float: left;
+}
+
+#infoPanel {
+    width: 500px;
+    float: right;
+    margin: 1em 0 0 0;
+    /*background-image: url('../images/bg/sequencerBG.png');*/
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+}
+
+#infoContent {
+    float: left;
+    display: block;
+    width: 500px;
+    background-color: #ff0000;
+}
+
+.fieldsetTitle {
+    height: 1em;
+    margin-bottom: 0.5em;
+    margin-top:0.5em;
+    margin-left: 1em;
+    font-size: 1.25em;
+    color: #FFF;
+    /*float: left;*/
+    display: block;
+    clear: right;
+}
+
+fieldset p {
+    display: block;
+}
+
+
+
+/* QUESTION EDITOR
+*/
+
+#questionEditor {
+    width: 60em;
+    background-color: #00FF00;
+    border: 1px solid #FFF;
+    display: block;
+    margin: 0;
+    padding: 0;
+    float: left;
+    background-color: #5c5c5c;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+
+#questionEditor_header {
+    height: 1.5em;
+    float: left;
+    font-size: 1.25em;
+    color: #FFF;
+    padding: 0.5em 1em 0 1em;
+}
+
+#questionEditor_content {
+    width: 58em;
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+    float: left;
+    padding: 0.5em 1em;
+
+}
+
+#questionEditor_controls {
+    float: right;
+    height: 2em;
+    text-align: right;
+}
+
+
+
+#questionEditor_bodyText_textArea {
+    resize: none;
+    width: auto;
+    min-width: 51em;
+    margin: 3px;
+}
+
+#questionEditor_bodyText_staticText {
+    color: white;
+    font-size: 12px;
+}
+
+.questionParamField {
+    float: left;
+    margin: 2px 0 2px 0;
+}
+
+#questionEditor_questionParams label {
+    width: 130px;
+    float: left;
+    margin: 4px 0 0 0;
+}
+
+.formLineBreak {
+    clear: left;
+}
+
+#surveyEditor {
+    
+    margin: 0 auto 0 auto;
+    
+    /*background-image: url('../images/bg/sequencerBG.png');*/
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+    float: left;
+    
+    background-color: #aeb2b3;
+    border: 1px solid #fff;
+    -moz-border-radius: 1em;
+    border-radius: 1em;
+    margin-bottom: 2em;
+    padding: 0 1em 1em 1em;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+
+#surveyEditorContent {
+    overflow-x: hidden;
+
+    margin-bottom: 0.5em;
+
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left bottom,
+        left top,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+
+    border: 1px solid #ddd;
+    -moz-border-radius: 0.5em;
+    border-radius: 0.5em;
+    padding: 1em;
+    float: left;
+}
+
+.questionDisplay {
+    width: 60em;
+    border: 1px solid #FFF;
+    display: block;
+    margin: 0;
+    padding: 0;
+    float: left;
+    background-color: #5c5c5c;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+
+.questionDisplayContent {
+    margin: 0;
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.25, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    padding: 0.5em;
+}
+
+.questionDisplayControls {
+    text-align: right;
+}
+
+p.questionBody {
+    border: 1px solid #cccccc;
+    background-color: #c5c5c5;
+}
+
+#surveyEditorControls {
+    text-align: right;
+}
Index: Dev/branches/Demo/css/resetstyle.css
===================================================================
--- Dev/branches/Demo/css/resetstyle.css	(revision 225)
+++ Dev/branches/Demo/css/resetstyle.css	(revision 225)
@@ -0,0 +1,61 @@
+/* 
+    Document   : resetstyle
+    Created on : 6-dec-2011, 14:10:40
+    Author     : Thijs Schipper
+    Description:    Reset object styling for cross-browser compatibility
+        
+*/
+
+/* 
+   TODO customize this sample style
+   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+
+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	font-size: 100%;
+	font: inherit;
+	vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+	display: block;
+}
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}
Index: Dev/branches/Demo/css/style.css
===================================================================
--- Dev/branches/Demo/css/style.css	(revision 225)
+++ Dev/branches/Demo/css/style.css	(revision 225)
@@ -0,0 +1,312 @@
+/* 
+    Document   : style
+    Created on : 12-jul-2011, 15:12:02
+    Author     : fpvanagthoven
+    Description:
+        Purpose of the stylesheet follows.
+*/
+
+/* 
+   TODO customize this sample style
+   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+
+h1 {
+    width: 100%;
+    text-align: center;
+    color: #333;
+    text-shadow: #fff 0px 0px 10px;
+    margin: 0 0 0.1em 0;
+}
+
+h2 {
+    margin: 0;
+    font-size: larger;
+    color: #333;
+}
+
+h3 {
+    margin: 0;
+    font-size: small;
+    font-weight: normal;
+    color: #333;
+}
+
+legend {
+    padding-left: 0em;
+    color: #888;
+    text-shadow: #fff 0px 0px 1px;
+}
+
+fieldset {
+    border: 1px solid #fff;
+    background-color: #eee;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+    margin-bottom: 2em;
+    padding: 0 1em 1em 1em;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+}
+
+root { 
+    display: block;
+}
+
+body {
+    font-family: sans-serif;
+    background-color: gainsboro;
+    margin: 0;
+    padding: 0;
+}
+
+#wrapper {
+    width: 80%;
+    min-width: 570px;
+    margin: auto;
+}
+
+#header {
+    height: 4em;
+    background-color: slategray;
+}
+
+#logo{
+    font-size: 2em;
+    font-weight: bold;
+    color: white;
+    text-align: center;
+    line-height: 2em;
+    text-shadow: #0e2933 0px 0px 5px;
+}
+
+#logo a {
+    text-decoration: none;
+    color: white;
+}
+
+#logo a:hover {
+    text-decoration: underline;
+}
+
+#content {
+    position: relative;
+    width: 100%;
+    padding: 2em 0;
+}
+
+
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+#surveyCreation {
+    min-height: 10em;
+    background-color: #f2f1f1;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+    -moz-box-shadow: 2px 2px 2px #888;
+    -webkit-box-shadow: 2px 2px 2px #888;
+    box-shadow: 2px 2px 2px #888;
+    padding: 2em;
+}
+
+#surveyHead {
+    position: relative;
+    width: 100%;
+}
+
+#surveyTitle {
+    width: 17em;
+    font-size: large;
+    color: gray;
+}
+
+#surveyTitle:hover {
+    color: black;
+}
+
+#surveyDescription {
+    display: block;
+    width: 30em;
+    max-width: 30em;
+    font-family: sans-serif;
+    color: gray;
+}
+
+#timeStamp {
+    position: absolute;
+    color: gray;
+    font-size: small;
+    right: 6em;
+    top: 0;
+    line-height: 2.3em;
+}
+
+#surveySaveButton {
+    position: absolute;
+    top: 0;
+    right: 0;
+    width: 5em;
+}
+
+#surveyDescription:hover {
+    color: black;
+}
+
+#surveyLink {
+    position: absolute;
+    top: -2em;
+    right: 0;
+    font-size: x-small;
+    color: gray;
+    width: 30em;
+    border-color: transparent;
+    background-color: transparent;
+}
+
+#questionsDiv {
+    margin-top: 2em;
+}
+
+.answersDiv {
+    margin-left: 0.5em;
+}
+
+#submitSurvey {
+    display: block;
+    height: 3em;
+    width: 10em;
+    margin-top: 2em;
+}
+
+#addQuestionButton {
+    margin-top: 1em;
+    width: 20em;
+}
+
+#addOpt {
+    margin-left: 1em;
+}
+
+
+.surveyButton {
+    color: #888;
+    font-weight: bold;
+    background-color: #fff;
+    border: 1px solid #aaa;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.bigSurveyButton {
+    margin-top: 1px;
+    height: 3em;
+    width: 12em;
+}
+
+.surveyButton:hover {
+    background-color: white;
+    color: #555;
+    border-color: deepskyblue;
+}
+
+.surveyButton:active {
+    border-style: inset;
+    border-color: orange;
+}
+
+.question {  
+    margin-top: 3em;
+    border-top: 1px solid #ddd;
+    text-shadow: #fff 0px 0px 1px;
+}
+
+.questionTable td{
+    width: 8em;
+}
+
+.questionTable th{
+    text-align: left;
+}
+
+label {
+    font-size: small;
+    font-weight: bold;
+    color: gray;
+}
+
+
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+.menu {
+    width: 30em;
+    margin: 1em auto 0 auto;
+    padding: 2em;
+    text-align: center;
+    background-color: #E3E3E3;
+    -moz-border-radius: 15px;
+    border-radius: 15px; 
+}
+
+.menuButtons {
+    float: left;
+}
+
+.toLoad {
+    width: 23em;
+    height: 10em;
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+.topMargin {
+    margin-top: 2em;
+}
+
+.leftPadding {
+    padding-left: 2em;
+}
+
+.noPadding {
+    padding: 0;
+}
+
+.centerBoxed {
+    margin: 1em auto;
+    width: 30em;
+    text-align: center;
+    padding: 0 1em;
+    font-size: small;
+    /*    border: 1px solid gray;*/
+}
+
+/* ################################################################## 
+   ===================== STYLESHEET OF GLORY ======================== */
+
+.answerBox {
+    padding-left: 1em;
+}
+
+.textBox {
+    width: 20em;
+}
+
+.intBox {
+    width: 5em;
+    margin: 0 .3em;
+    border: 1px solid #abadb3;
+}
+
+.scaleLabel {
+    display: inline;
+    color: #333;
+}
+
+.questionDescription {
+    font-size: small;
+}
Index: Dev/branches/Demo/css/visualeditors.css
===================================================================
--- Dev/branches/Demo/css/visualeditors.css	(revision 225)
+++ Dev/branches/Demo/css/visualeditors.css	(revision 225)
@@ -0,0 +1,489 @@
+/* 
+    Document   : visualeditors
+    Created on : 6-dec-2011, 13:43:58
+    Author     : Thijs Schipper
+    Description:    Attempt at a new -organized- stylesheet
+        Purpose of the stylesheet follows.
+*/
+
+/* 
+   TODO customize this sample style
+   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
+*/
+
+root { 
+    display: block;
+}
+
+html {
+    background-image: url('../images/bg/blueishgridblock.png');
+    height: 100%;
+    font-size: 12px;
+    font-family: sans-serif;
+}
+
+#wrapper {
+    width: 80%;
+    min-width: 800px;
+    margin: 0 auto;
+}
+
+#content {
+    width: 100%;
+    position: relative;
+    padding: 2em 0;
+}
+
+/************************/
+/* STANDARD UI ELEMENTS */
+/************************/
+
+.largeFrame {
+    width: auto;
+    padding: 0 1em;
+    float: left;
+    clear: both;
+
+
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+
+    background-image: -webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+    border: 1px solid #FFF;
+    border-radius: 1em;
+    -moz-border-radius: 1em;
+}
+
+.largeFrame .content {
+    clear: left;
+}
+
+.innerLargeFrame {
+    width: auto;
+    max-height: 300px;
+    padding: 1em 1em;
+    border: 1px solid #FFF;
+    border-radius: 0.5em;
+    -maz-border-radius: 0.5em;
+    float: left;
+    clear: both;
+
+
+    background-image: linear-gradient(bottom, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(bottom, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(tbottomop, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(bottom, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(bottom, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left bottom,
+        left top,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+}
+
+.innerLargeFrame.horizontal {
+    height: auto;
+    overflow-x: auto;
+    overflow-y: hidden;
+}
+
+.innerLargeFrame.vertical {
+    overflow-x: hidden;
+    overflow-y: auto;
+    max-height: none;
+}
+
+.smallFrame {
+    margin: 0.5em auto;
+    float: left;
+    clear: both;
+    background-color: #555;
+    -moz-box-shadow: 2px 2px 1px #888;
+    -webkit-box-shadow: 2px 2px 1px #888;
+    box-shadow: 2px 2px 1px #888;
+    border: 1px solid #FFF;
+    margin: 0;
+}
+
+.smallFrame .content {
+    width: 600px;
+    float: left;
+    clear: left;
+    padding: 0.25em 1em;
+
+    background-image: linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -o-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -moz-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -ms-linear-gradient(top, #B0B0B0 21%, #888888 80%);
+    background-image: -webkit-gradient(
+        linear,
+        left bottom,
+        left top,
+        color-stop(0.21, #B0B0B0),
+        color-stop(0.8, #888888)
+        );
+    background-position: bottom;
+    background-repeat: repeat-x;
+}
+
+.smallFrame.selected {
+    background-color: #777777;
+    border-color:#000;
+}
+
+.largeTitle {
+    width: auto;
+    padding: 0.25em 1em;
+    font-size: 1.5em;
+    color: #FFF;
+    float: left;
+    text-shadow: #555 0px 0px 5px;
+}
+
+.smallTitle {
+    background-color: transparent;
+    width: auto;
+    min-height: 1.5em;
+    padding: 0.25em 1em;
+    font-size: 1.25em;
+    color: #FFF;
+    float: left;
+}
+
+.smallTitle .listNumber {
+    float: left;
+    color: #CCFFFF;
+    font-size: 2em;
+}
+
+.controls {
+    clear: both;
+    text-align: right;
+    float: right;
+    min-height: 2.5em;
+}
+
+.bigButton {
+    padding:0.25em;
+    margin: 0.25em;
+    border: 1px solid #555;
+    border-radius: 0.25em;
+    -moz-border-radius: 0.25em;
+    background-color: transparent;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+}
+
+.bigButton.vertical {
+    width: 2em;
+    height: 2em;
+    font-size: 20px;
+    font-weight: bold;
+    color: #555;
+    float: left;
+    clear: both;
+    border: 1px solid #555;
+    border-radius: 0.25em;
+    -moz-border-radius: 0.25em;
+    background-color: transparent;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+    cursor: default;
+}
+
+.bigButton:hover {
+    border-color: #1c94c4;
+    background-color: #ddd;
+}
+
+.bigButton .buttonIcon {
+
+}
+
+.smallButton {
+    margin: 0.5em 0.25em;
+    padding: 0.25em 0.5em;
+    color: #555;
+    font-weight: bold;
+    border: 1px solid #555;
+    border-radius: 0.25em;
+    -moz-border-radius: 0,25em;
+    background-color: transparent;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+    cursor: default;
+}
+
+.smallFrame .smallButton {
+    color: #ccc;
+    border-color: #ccc;
+}
+
+.smallButton:hover {
+    color: #000;
+    background-color: #ddd;
+    border-color: #1c94c4;
+}
+
+
+/****************************/
+/* PIPELINE EDITOR SPECIFIC */
+/****************************/
+
+#seqContentWrapper {
+    clear: none;
+    float: left;
+    margin-right: -32000px;
+    min-height: 9em;
+}
+
+#seqContentWrapper .divider.horizontal {
+    width: 10px;
+    height: 50px;
+    margin: 10px 15px 0 20px;
+    background-image: url('../images/ui/sequencerDivider.png');
+    float: left;
+}
+
+.displayStep {
+    width: 52px;
+    padding: 0;
+    margin-top: 10px;
+    background-repeat: no-repeat;
+    float: left;
+    text-align: center;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+}
+
+.displayStep.selected .displayStepIcon{
+    background-color: #bbbbbb;
+    /*-moz-box-shadow: 0 0 50px #FFF;
+    -webkit-box-shadow: 0 0 50px #FFF;
+    box-shadow: 0 0 50px #FFF;*/
+    border-color: #1c94c4;
+
+}
+
+.displayStep .displayStepIcon {
+    width: 50px;
+    height: 50px;
+    border: 2px solid #555;
+    color: #FFF;
+}
+
+.displayStep p{
+    margin-top: 5px;
+    font-weight: normal;
+    font-size: 1em;
+}
+
+#toolbox {
+    margin-top: 2em;
+}
+
+#toolbox .content {
+    padding: 0.5em;
+}
+
+#toolbox .bigButton p {
+    position: relative;
+    top: -1.75em;
+    margin-left: 0.5em;
+    display: inline;
+}
+
+.bigButton.toolbox {
+    clear: both;
+}
+
+#infoPanel {
+    margin-top: 2em;
+    margin-left: 2em;
+    clear: right;
+}
+
+#infoPanel .content {
+    clear: both;
+    min-height: 10em;
+    width: 30em;
+}
+
+.content .property {
+    float: left;
+    clear: left;
+    font-weight: bold;
+    width: 8em;
+    color: #FFF;
+}
+
+.content .value {
+    float: left;
+}
+
+/**************************/
+/* Survey Editor Specific */
+/**************************/
+
+#surveyEditor {
+    background-color: #0000FF;
+}
+
+#seqContentWrapper .divider.vertical {
+    float: left;
+    clear: both;
+    height: 2px;
+    width: 400px;
+    background-color: #555; /* VIES MAGENTA! */
+    margin: 0.75em 100px;
+}
+
+.questionBody {
+    float: left;
+    clear: left;
+    margin: 1em 0;
+    font-style: italic;
+}
+
+.questionParamsView {
+    float: left;
+    clear: left;
+    border: 1px solid #555;
+    padding: 0.5em;
+    font-weight: bold;
+}
+
+#pageControls {
+    float: left;
+    margin: 5px 200px 0 0;
+}
+
+#pageControls .smallTextField {
+    width: 1.5em;
+}
+
+.vertControls {
+    text-align: center;
+    display:block;
+    float: left;
+    clear: right;
+    margin: 0 0 0 1em;
+}
+
+.vertControls .segment {
+    margin: 1.25em -1px 0.25em -1px;
+    border: 1px solid #555;
+    clear: both;
+    padding: 1px;
+    float: left;
+    border-radius: 5px;
+}
+
+.vertControls label {
+    width: 100%;
+    float: left;
+    clear: both;
+    font-size: 12px;
+    text-align: center;
+    margin: -1.25em 0 0;
+    color: #555;
+    font-weight: bold;
+}
+
+.smallFrame .smallButton {
+    width:55px;
+}
+
+/**************************/
+/* Survey Editor Specific */
+/**************************/
+
+#leftColumn {
+    float: left;
+    clear: left;
+}
+
+#rightColumn {
+    float: left;
+    clear: none;
+}
+
+.largeFrame.C{
+    clear: left;
+    margin: 10px;
+    padding: 5px;
+    
+    height: auto;
+    max-height: 400px;
+}
+
+.largeFrame.Cu{
+    clear: left;
+    margin: 10px;
+    padding: 5px;
+    width: 640px;
+}
+
+.largeFrame.Cv {
+    clear: left;
+    margin: 10px;
+    padding: 5px;
+    width: 200px;
+}
+
+.checkboxList {
+    overflow-y: scroll; 
+    overflow-x: hidden;
+    clear: left;
+    width: auto; 
+    height: 250px; 
+    background-color: #FFF; 
+    border-width: 2px; 
+    border-style: solid; 
+    border-bottom-color: #AAA; 
+    border-top-color: #555; 
+    border-right-color: #AAA; 
+    border-left-color: #555;
+}
+
+.dbDataList {
+    width: 300px;
+    float: left;
+    clear: left;
+    margin: 0 10px 0 10px;
+}
+
+#dbShoppingCart .content {
+    height: 415px;
+}
Index: Dev/branches/Demo/d3/.gitignore
===================================================================
--- Dev/branches/Demo/d3/.gitignore	(revision 225)
+++ Dev/branches/Demo/d3/.gitignore	(revision 225)
@@ -0,0 +1,1 @@
+_site
Index: Dev/branches/Demo/d3/LICENSE
===================================================================
--- Dev/branches/Demo/d3/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/LICENSE	(revision 225)
@@ -0,0 +1,26 @@
+Copyright (c) 2010, Michael Bostock
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* The name Michael Bostock may not be used to endorse or promote products
+  derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: Dev/branches/Demo/d3/Makefile
===================================================================
--- Dev/branches/Demo/d3/Makefile	(revision 225)
+++ Dev/branches/Demo/d3/Makefile	(revision 225)
@@ -0,0 +1,283 @@
+JS_COMPILER = \
+	./lib/uglifyjs/bin/uglifyjs
+
+all: \
+	d3.js \
+	d3.min.js \
+	d3.behavior.js \
+	d3.behavior.min.js \
+	d3.chart.js \
+	d3.chart.min.js \
+	d3.layout.js \
+	d3.layout.min.js \
+	d3.csv.js \
+	d3.csv.min.js \
+	d3.geo.js \
+	d3.geo.min.js \
+	d3.geom.js \
+	d3.geom.min.js \
+	d3.time.js \
+	d3.time.min.js
+
+.INTERMEDIATE d3.js: \
+	src/start.js \
+	d3.core.js \
+	d3.scale.js \
+	d3.svg.js \
+	src/end.js
+
+d3.core.js: \
+	src/core/core.js \
+	src/core/date.js \
+	src/core/object.js \
+	src/core/array.js \
+	src/core/functor.js \
+	src/core/rebind.js \
+	src/core/ascending.js \
+	src/core/descending.js \
+	src/core/min.js \
+	src/core/max.js \
+	src/core/sum.js \
+	src/core/quantile.js \
+	src/core/zip.js \
+	src/core/bisect.js \
+	src/core/first.js \
+	src/core/last.js \
+	src/core/nest.js \
+	src/core/keys.js \
+	src/core/values.js \
+	src/core/entries.js \
+	src/core/permute.js \
+	src/core/merge.js \
+	src/core/split.js \
+	src/core/collapse.js \
+	src/core/call.js \
+	src/core/range.js \
+	src/core/requote.js \
+	src/core/round.js \
+	src/core/xhr.js \
+	src/core/text.js \
+	src/core/json.js \
+	src/core/html.js \
+	src/core/xml.js \
+	src/core/ns.js \
+	src/core/dispatch.js \
+	src/core/format.js \
+	src/core/ease.js \
+	src/core/event.js \
+	src/core/interpolate.js \
+	src/core/uninterpolate.js \
+	src/core/rgb.js \
+	src/core/hsl.js \
+	src/core/selection.js \
+	src/core/transition.js \
+	src/core/timer.js \
+	src/core/noop.js
+
+d3.scale.js: \
+	src/scale/scale.js \
+	src/scale/nice.js \
+	src/scale/linear.js \
+	src/scale/bilinear.js \
+	src/scale/polylinear.js \
+	src/scale/log.js \
+	src/scale/pow.js \
+	src/scale/sqrt.js \
+	src/scale/ordinal.js \
+	src/scale/category.js \
+	src/scale/quantile.js \
+	src/scale/quantize.js
+
+d3.svg.js: \
+	src/svg/svg.js \
+	src/svg/arc.js \
+	src/svg/line.js \
+	src/svg/line-radial.js \
+	src/svg/area.js \
+	src/svg/area-radial.js \
+	src/svg/chord.js \
+	src/svg/diagonal.js \
+	src/svg/diagonal-radial.js \
+	src/svg/mouse.js \
+	src/svg/touches.js \
+	src/svg/symbol.js
+
+d3.behavior.js: \
+	src/start.js \
+	src/behavior/behavior.js \
+	src/behavior/zoom.js \
+	src/end.js
+
+d3.chart.js: \
+	src/start.js \
+	src/chart/chart.js \
+	src/chart/box.js \
+	src/chart/bullet.js \
+	src/chart/horizon.js \
+	src/chart/qq.js \
+	src/end.js
+
+d3.layout.js: \
+	src/start.js \
+	src/layout/layout.js \
+	src/layout/bundle.js \
+	src/layout/chord.js \
+	src/layout/force.js \
+	src/layout/partition.js \
+	src/layout/pie.js \
+	src/layout/stack.js \
+	src/layout/histogram.js \
+	src/layout/hierarchy.js \
+	src/layout/pack.js \
+	src/layout/cluster.js \
+	src/layout/tree.js \
+	src/layout/treemap.js \
+	src/end.js
+
+d3.geo.js: \
+	src/start.js \
+	src/geo/geo.js \
+	src/geo/azimuthal.js \
+	src/geo/albers.js \
+	src/geo/mercator.js \
+	src/geo/path.js \
+	src/geo/bounds.js \
+	src/end.js
+
+d3.csv.js: \
+	src/start.js \
+	src/csv/csv.js \
+	src/csv/parse.js \
+	src/csv/format.js \
+	src/end.js
+
+d3.time.js: \
+	src/start.js \
+	src/time/time.js \
+	src/time/format.js \
+	src/time/format-utc.js \
+	src/time/format-iso.js \
+	src/time/range.js \
+	src/time/second.js \
+	src/time/seconds.js \
+	src/time/minute.js \
+	src/time/minutes.js \
+	src/time/hour.js \
+	src/time/hours.js \
+	src/time/day.js \
+	src/time/days.js \
+	src/time/week.js \
+	src/time/weeks.js \
+	src/time/month.js \
+	src/time/months.js \
+	src/time/year.js \
+	src/time/years.js \
+	src/time/scale.js \
+	src/time/scale-utc.js \
+	src/end.js
+
+d3.geom.js: \
+	src/start.js \
+	src/geom/geom.js \
+	src/geom/contour.js \
+	src/geom/hull.js \
+	src/geom/polygon.js \
+	src/geom/voronoi.js \
+	src/geom/delaunay.js \
+	src/geom/quadtree.js \
+	src/end.js
+
+test: \
+	test/core \
+	test/csv \
+	test/layout \
+	test/scale \
+	test/svg \
+	test/time
+
+test/core: \
+	test/core/test-append.test \
+	test/core/test-attr.test \
+	test/core/test-bisect.test \
+	test/core/test-call.test \
+	test/core/test-classed.test \
+	test/core/test-format.test \
+	test/core/test-hsl.test \
+	test/core/test-insert.test \
+	test/core/test-interpolate.test \
+	test/core/test-keys.test \
+	test/core/test-max.test \
+	test/core/test-min.test \
+	test/core/test-nest.test \
+	test/core/test-permute.test \
+	test/core/test-remove.test \
+	test/core/test-rgb.test \
+	test/core/test-round.test \
+	test/core/test-sum.test \
+	test/core/test-transition.test \
+	test/core/test-zip.test
+
+test/csv: \
+	test/csv/test-parse.test
+
+test/layout: \
+	test/layout/test-histogram.test \
+	test/layout/test-treemap.test
+
+test/scale: \
+	test/scale/test-linear.test \
+	test/scale/test-log.test \
+	test/scale/test-polylinear.test \
+	test/scale/test-pow.test \
+	test/scale/test-quantile.test \
+	test/scale/test-sqrt.test \
+	test/scale/test-ordinal.test
+
+test/svg: \
+	test/svg/test-arc.test \
+	test/svg/test-area.test \
+	test/svg/test-line.test \
+	test/svg/test-symbol.test
+
+test/time: \
+	test/time/test-day.test \
+	test/time/test-days.test \
+	test/time/test-format-iso.test \
+	test/time/test-format-utc.test \
+	test/time/test-format.test \
+	test/time/test-hour.test \
+	test/time/test-hours.test \
+	test/time/test-minute.test \
+	test/time/test-minutes.test \
+	test/time/test-month.test \
+	test/time/test-months.test \
+	test/time/test-parse-iso.test \
+	test/time/test-parse-utc.test \
+	test/time/test-parse.test \
+	test/time/test-scale.test \
+	test/time/test-scale-utc.test \
+	test/time/test-second.test \
+	test/time/test-seconds.test \
+	test/time/test-week.test \
+	test/time/test-weeks.test \
+	test/time/test-year.test \
+	test/time/test-years.test
+
+%.min.js: %.js Makefile
+	@rm -f $@
+	$(JS_COMPILER) < $< > $@
+
+d3.js d3%.js: Makefile
+	@rm -f $@
+	cat $(filter %.js,$^) > $@
+	@chmod a-w $@
+
+%.test: %.js %.out all
+	@/bin/echo -n "test: $* "
+	@node $< > $*.actual
+	@diff -U 3 $*.out $*.actual && rm -f $*.actual \
+		&& echo '\033[1;32mPASS\033[0m' \
+		|| echo test: $* '\033[1;31mFAIL\033[0m'
+
+clean:
+	rm -f d3*.js
Index: Dev/branches/Demo/d3/README.md
===================================================================
--- Dev/branches/Demo/d3/README.md	(revision 225)
+++ Dev/branches/Demo/d3/README.md	(revision 225)
@@ -0,0 +1,30 @@
+# D3
+
+**D3** is a small, free JavaScript library for manipulating HTML documents
+based on data. D3 can help you quickly visualize your data as HTML or SVG,
+handle interactivity, and incorporate smooth transitions and staged animations
+into your pages. You can use D3 as a visualization framework (like Protovis),
+or you can use it to build dynamic pages (like jQuery).
+
+### Browser Support
+
+D3 should work on any browser, with minimal requirements such as JavaScript
+and the [W3C DOM](http://www.w3.org/DOM/) API. By default D3 requires the
+[Selectors API](http://www.w3.org/TR/selectors-api/) Level 1, but you can
+preload [Sizzle](http://sizzlejs.com/) for compatibility with older browsers.
+Some of the included D3 examples use additional browser features, such as
+[SVG](http://www.w3.org/TR/SVG/) and [CSS3
+Transitions](http://www.w3.org/TR/css3-transitions/). These features are not
+required to use D3, but are useful for visualization! D3 is not a
+compatibility layer. The examples should work on Firefox, Chrome (Chromium),
+Safari (WebKit), Opera and IE9.
+
+Note: Chrome has strict permissions for reading files out of the local file
+system. Some examples use AJAX which works differently via HTTP instead of local
+files. For the best experience, load the D3 examples from your own machine via
+HTTP. Any static file web server will work; for example you can run Python's
+built-in server:
+
+    python -m SimpleHTTPServer 8888
+
+Once this is running, go to: <http://localhost:8888/examples/>
Index: Dev/branches/Demo/d3/d3.behavior.js
===================================================================
--- Dev/branches/Demo/d3/d3.behavior.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.behavior.js	(revision 225)
@@ -0,0 +1,198 @@
+(function(){d3.behavior = {};
+// TODO unbind zoom behavior?
+// TODO unbind listener?
+d3.behavior.zoom = function() {
+  var xyz = [0, 0, 0],
+      event = d3.dispatch("zoom");
+
+  function zoom() {
+    this
+        .on("mousedown.zoom", mousedown)
+        .on("mousewheel.zoom", mousewheel)
+        .on("DOMMouseScroll.zoom", dblclick)
+        .on("dblclick.zoom", dblclick)
+        .on("touchstart.zoom", touchstart);
+
+    d3.select(window)
+        .on("mousemove.zoom", d3_behavior_zoomMousemove)
+        .on("mouseup.zoom", d3_behavior_zoomMouseup)
+        .on("touchmove.zoom", d3_behavior_zoomTouchmove)
+        .on("touchend.zoom", d3_behavior_zoomTouchup);
+  }
+
+  // snapshot the local context for subsequent dispatch
+  function start() {
+    d3_behavior_zoomXyz = xyz;
+    d3_behavior_zoomDispatch = event.zoom.dispatch;
+    d3_behavior_zoomTarget = this;
+    d3_behavior_zoomArguments = arguments;
+  }
+
+  function mousedown() {
+    start.apply(this, arguments);
+    d3_behavior_zoomPanning = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));
+    d3.event.preventDefault();
+    window.focus();
+  }
+
+  // store starting mouse location
+  function mousewheel() {
+    start.apply(this, arguments);
+    if (!d3_behavior_zoomZooming) d3_behavior_zoomZooming = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));
+    d3_behavior_zoomTo(d3_behavior_zoomDelta() + xyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomZooming);
+  }
+
+  function dblclick() {
+    start.apply(this, arguments);
+    var mouse = d3.svg.mouse(d3_behavior_zoomTarget);
+    d3_behavior_zoomTo(d3.event.shiftKey ? Math.ceil(xyz[2] - 1) : Math.floor(xyz[2] + 1), mouse, d3_behavior_zoomLocation(mouse));
+  }
+
+  // doubletap detection
+  function touchstart() {
+    start.apply(this, arguments);
+    var touches = d3_behavior_zoomTouchup(),
+        touch,
+        now = Date.now();
+    if ((touches.length === 1) && (now - d3_behavior_zoomLast < 300)) {
+      d3_behavior_zoomTo(1 + Math.floor(xyz[2]), touch = touches[0], d3_behavior_zoomLocations[touch.identifier]);
+    }
+    d3_behavior_zoomLast = now;
+  }
+
+  zoom.on = function(type, listener) {
+    event[type].add(listener);
+    return zoom;
+  };
+
+  return zoom;
+};
+
+var d3_behavior_zoomDiv,
+    d3_behavior_zoomPanning,
+    d3_behavior_zoomZooming,
+    d3_behavior_zoomLocations = {}, // identifier -> location
+    d3_behavior_zoomLast = 0,
+    d3_behavior_zoomXyz,
+    d3_behavior_zoomDispatch,
+    d3_behavior_zoomTarget,
+    d3_behavior_zoomArguments;
+
+function d3_behavior_zoomLocation(point) {
+  return [
+    point[0] - d3_behavior_zoomXyz[0],
+    point[1] - d3_behavior_zoomXyz[1],
+    d3_behavior_zoomXyz[2]
+  ];
+}
+
+// detect the pixels that would be scrolled by this wheel event
+function d3_behavior_zoomDelta() {
+
+  // mousewheel events are totally broken!
+  // https://bugs.webkit.org/show_bug.cgi?id=40441
+  // not only that, but Chrome and Safari differ in re. to acceleration!
+  if (!d3_behavior_zoomDiv) {
+    d3_behavior_zoomDiv = d3.select("body").append("div")
+        .style("visibility", "hidden")
+        .style("top", 0)
+        .style("height", 0)
+        .style("width", 0)
+        .style("overflow-y", "scroll")
+      .append("div")
+        .style("height", "2000px")
+      .node().parentNode;
+  }
+
+  var e = d3.event, delta;
+  try {
+    d3_behavior_zoomDiv.scrollTop = 1000;
+    d3_behavior_zoomDiv.dispatchEvent(e);
+    delta = 1000 - d3_behavior_zoomDiv.scrollTop;
+  } catch (error) {
+    delta = e.wheelDelta || -e.detail;
+  }
+
+  return delta * .005;
+}
+
+// Note: Since we don't rotate, it's possible for the touches to become
+// slightly detached from their original positions. Thus, we recompute the
+// touch points on touchend as well as touchstart!
+function d3_behavior_zoomTouchup() {
+  var touches = d3.svg.touches(d3_behavior_zoomTarget),
+      i = -1,
+      n = touches.length,
+      touch;
+  while (++i < n) d3_behavior_zoomLocations[(touch = touches[i]).identifier] = d3_behavior_zoomLocation(touch);
+  return touches;
+}
+
+function d3_behavior_zoomTouchmove() {
+  var touches = d3.svg.touches(d3_behavior_zoomTarget);
+  switch (touches.length) {
+
+    // single-touch pan
+    case 1: {
+      var touch = touches[0];
+      d3_behavior_zoomTo(d3_behavior_zoomXyz[2], touch, d3_behavior_zoomLocations[touch.identifier]);
+      break;
+    }
+
+    // double-touch pan + zoom
+    case 2: {
+      var p0 = touches[0],
+          p1 = touches[1],
+          p2 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2],
+          l0 = d3_behavior_zoomLocations[p0.identifier],
+          l1 = d3_behavior_zoomLocations[p1.identifier],
+          l2 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2, l0[2]];
+      d3_behavior_zoomTo(Math.log(d3.event.scale) / Math.LN2 + l0[2], p2, l2);
+      break;
+    }
+  }
+}
+
+function d3_behavior_zoomMousemove() {
+  d3_behavior_zoomZooming = null;
+  if (d3_behavior_zoomPanning) d3_behavior_zoomTo(d3_behavior_zoomXyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomPanning);
+}
+
+function d3_behavior_zoomMouseup() {
+  if (d3_behavior_zoomPanning) {
+    d3_behavior_zoomMousemove();
+    d3_behavior_zoomPanning = null;
+  }
+}
+
+function d3_behavior_zoomTo(z, x0, x1) {
+  var K = Math.pow(2, (d3_behavior_zoomXyz[2] = z) - x1[2]),
+      x = d3_behavior_zoomXyz[0] = x0[0] - K * x1[0],
+      y = d3_behavior_zoomXyz[1] = x0[1] - K * x1[1],
+      o = d3.event, // Events can be reentrant (e.g., focus).
+      k = Math.pow(2, z);
+
+  d3.event = {
+    scale: k,
+    translate: [x, y],
+    transform: function(sx, sy) {
+      if (sx) transform(sx, x);
+      if (sy) transform(sy, y);
+    }
+  };
+
+  function transform(scale, o) {
+    var domain = scale.__domain || (scale.__domain = scale.domain()),
+        range = scale.range().map(function(v) { return (v - o) / k; });
+    scale.domain(domain).domain(range.map(scale.invert));
+  }
+
+  try {
+    d3_behavior_zoomDispatch.apply(d3_behavior_zoomTarget, d3_behavior_zoomArguments);
+  } finally {
+    d3.event = o;
+  }
+
+  o.preventDefault();
+}
+})();
Index: Dev/branches/Demo/d3/d3.behavior.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.behavior.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.behavior.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function p(a,b,c){function m(a,b){var c=a.__domain||(a.__domain=a.domain()),d=a.range().map(function(a){return(a-b)/l});a.domain(c).domain(d.map(a.invert))}var d=Math.pow(2,(f[2]=a)-c[2]),e=f[0]=b[0]-d*c[0],j=f[1]=b[1]-d*c[1],k=d3.event,l=Math.pow(2,a);d3.event={scale:l,translate:[e,j],transform:function(a,b){a&&m(a,e),b&&m(b,j)}};try{g.apply(h,i)}finally{d3.event=k}k.preventDefault()}function o(){b&&(n(),b=null)}function n(){c=null,b&&p(f[2],d3.svg.mouse(h),b)}function m(){var a=d3.svg.touches(h);switch(a.length){case 1:var b=a[0];p(f[2],b,d[b.identifier]);break;case 2:var c=a[0],e=a[1],g=[(c[0]+e[0])/2,(c[1]+e[1])/2],i=d[c.identifier],j=d[e.identifier],k=[(i[0]+j[0])/2,(i[1]+j[1])/2,i[2]];p(Math.log(d3.event.scale)/Math.LN2+i[2],g,k)}}function l(){var a=d3.svg.touches(h),b=-1,c=a.length,e;while(++b<c)d[(e=a[b]).identifier]=j(e);return a}function k(){a||(a=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var b=d3.event,c;try{a.scrollTop=1e3,a.dispatchEvent(b),c=1e3-a.scrollTop}catch(d){c=b.wheelDelta||-b.detail}return c*.005}function j(a){return[a[0]-f[0],a[1]-f[1],f[2]]}d3.behavior={},d3.behavior.zoom=function(){function w(){s.apply(this,arguments);var b=l(),c,f=Date.now();b.length===1&&f-e<300&&p(1+Math.floor(a[2]),c=b[0],d[c.identifier]),e=f}function v(){s.apply(this,arguments);var b=d3.svg.mouse(h);p(d3.event.shiftKey?Math.ceil(a[2]-1):Math.floor(a[2]+1),b,j(b))}function u(){s.apply(this,arguments),c||(c=j(d3.svg.mouse(h))),p(k()+a[2],d3.svg.mouse(h),c)}function t(){s.apply(this,arguments),b=j(d3.svg.mouse(h)),d3.event.preventDefault(),window.focus()}function s(){f=a,g=q.zoom.dispatch,h=this,i=arguments}function r(){this.on("mousedown.zoom",t).on("mousewheel.zoom",u).on("DOMMouseScroll.zoom",v).on("dblclick.zoom",v).on("touchstart.zoom",w),d3.select(window).on("mousemove.zoom",n).on("mouseup.zoom",o).on("touchmove.zoom",m).on("touchend.zoom",l)}var a=[0,0,0],q=d3.dispatch("zoom");r.on=function(a,b){q[a].add(b);return r};return r};var a,b,c,d={},e=0,f,g,h,i})()
Index: Dev/branches/Demo/d3/d3.chart.js
===================================================================
--- Dev/branches/Demo/d3/d3.chart.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.chart.js	(revision 225)
@@ -0,0 +1,984 @@
+(function(){d3.chart = {};
+// Inspired by http://informationandvisualization.de/blog/box-plot
+d3.chart.box = function() {
+  var width = 1,
+      height = 1,
+      duration = 0,
+      domain = null,
+      value = Number,
+      whiskers = d3_chart_boxWhiskers,
+      quartiles = d3_chart_boxQuartiles,
+      tickFormat = null;
+
+  // For each small multipleâŠ
+  function box(g) {
+    g.each(function(d, i) {
+      d = d.map(value).sort(d3.ascending);
+      var g = d3.select(this),
+          n = d.length,
+          min = d[0],
+          max = d[n - 1];
+
+      // Compute quartiles. Must return exactly 3 elements.
+      var quartileData = d.quartiles = quartiles(d);
+
+      // Compute whiskers. Must return exactly 2 elements, or null.
+      var whiskerIndices = whiskers && whiskers.call(this, d, i),
+          whiskerData = whiskerIndices && whiskerIndices.map(function(i) { return d[i]; });
+
+      // Compute outliers. If no whiskers are specified, all data are "outliers".
+      // We compute the outliers as indices, so that we can join across transitions!
+      var outlierIndices = whiskerIndices
+          ? d3.range(0, whiskerIndices[0]).concat(d3.range(whiskerIndices[1] + 1, n))
+          : d3.range(n);
+
+      // Compute the new x-scale.
+      var x1 = d3.scale.linear()
+          .domain(domain && domain.call(this, d, i) || [min, max])
+          .range([height, 0]);
+
+      // Retrieve the old x-scale, if this is an update.
+      var x0 = this.__chart__ || d3.scale.linear()
+          .domain([0, Infinity])
+          .range(x1.range());
+
+      // Stash the new scale.
+      this.__chart__ = x1;
+
+      // Note: the box, median, and box tick elements are fixed in number,
+      // so we only have to handle enter and update. In contrast, the outliers
+      // and other elements are variable, so we need to exit them! Variable
+      // elements also fade in and out.
+
+      // Update center line: the vertical line spanning the whiskers.
+      var center = g.selectAll("line.center")
+          .data(whiskerData ? [whiskerData] : []);
+
+      center.enter().insert("svg:line", "rect")
+          .attr("class", "center")
+          .attr("x1", width / 2)
+          .attr("y1", function(d) { return x0(d[0]); })
+          .attr("x2", width / 2)
+          .attr("y2", function(d) { return x0(d[1]); })
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .style("opacity", 1)
+          .attr("y1", function(d) { return x1(d[0]); })
+          .attr("y2", function(d) { return x1(d[1]); });
+
+      center.transition()
+          .duration(duration)
+          .style("opacity", 1)
+          .attr("y1", function(d) { return x1(d[0]); })
+          .attr("y2", function(d) { return x1(d[1]); });
+
+      center.exit().transition()
+          .duration(duration)
+          .style("opacity", 1e-6)
+          .attr("y1", function(d) { return x1(d[0]); })
+          .attr("y2", function(d) { return x1(d[1]); })
+          .remove();
+
+      // Update innerquartile box.
+      var box = g.selectAll("rect.box")
+          .data([quartileData]);
+
+      box.enter().append("svg:rect")
+          .attr("class", "box")
+          .attr("x", 0)
+          .attr("y", function(d) { return x0(d[2]); })
+          .attr("width", width)
+          .attr("height", function(d) { return x0(d[0]) - x0(d[2]); })
+        .transition()
+          .duration(duration)
+          .attr("y", function(d) { return x1(d[2]); })
+          .attr("height", function(d) { return x1(d[0]) - x1(d[2]); });
+
+      box.transition()
+          .duration(duration)
+          .attr("y", function(d) { return x1(d[2]); })
+          .attr("height", function(d) { return x1(d[0]) - x1(d[2]); });
+
+      // Update median line.
+      var medianLine = g.selectAll("line.median")
+          .data([quartileData[1]]);
+
+      medianLine.enter().append("svg:line")
+          .attr("class", "median")
+          .attr("x1", 0)
+          .attr("y1", x0)
+          .attr("x2", width)
+          .attr("y2", x0)
+        .transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1);
+
+      medianLine.transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1);
+
+      // Update whiskers.
+      var whisker = g.selectAll("line.whisker")
+          .data(whiskerData || []);
+
+      whisker.enter().insert("svg:line", "circle, text")
+          .attr("class", "whisker")
+          .attr("x1", 0)
+          .attr("y1", x0)
+          .attr("x2", width)
+          .attr("y2", x0)
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1)
+          .style("opacity", 1);
+
+      whisker.transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1)
+          .style("opacity", 1);
+
+      whisker.exit().transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1)
+          .style("opacity", 1e-6)
+          .remove();
+
+      // Update outliers.
+      var outlier = g.selectAll("circle.outlier")
+          .data(outlierIndices, Number);
+
+      outlier.enter().insert("svg:circle", "text")
+          .attr("class", "outlier")
+          .attr("r", 5)
+          .attr("cx", width / 2)
+          .attr("cy", function(i) { return x0(d[i]); })
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("cy", function(i) { return x1(d[i]); })
+          .style("opacity", 1);
+
+      outlier.transition()
+          .duration(duration)
+          .attr("cy", function(i) { return x1(d[i]); })
+          .style("opacity", 1);
+
+      outlier.exit().transition()
+          .duration(duration)
+          .attr("cy", function(i) { return x1(d[i]); })
+          .style("opacity", 1e-6)
+          .remove();
+
+      // Compute the tick format.
+      var format = tickFormat || x1.tickFormat(8);
+
+      // Update box ticks.
+      var boxTick = g.selectAll("text.box")
+          .data(quartileData);
+
+      boxTick.enter().append("svg:text")
+          .attr("class", "box")
+          .attr("dy", ".3em")
+          .attr("dx", function(d, i) { return i & 1 ? 6 : -6 })
+          .attr("x", function(d, i) { return i & 1 ? width : 0 })
+          .attr("y", x0)
+          .attr("text-anchor", function(d, i) { return i & 1 ? "start" : "end"; })
+          .text(format)
+        .transition()
+          .duration(duration)
+          .attr("y", x1);
+
+      boxTick.transition()
+          .duration(duration)
+          .text(format)
+          .attr("y", x1);
+
+      // Update whisker ticks. These are handled separately from the box
+      // ticks because they may or may not exist, and we want don't want
+      // to join box ticks pre-transition with whisker ticks post-.
+      var whiskerTick = g.selectAll("text.whisker")
+          .data(whiskerData || []);
+
+      whiskerTick.enter().append("svg:text")
+          .attr("class", "whisker")
+          .attr("dy", ".3em")
+          .attr("dx", 6)
+          .attr("x", width)
+          .attr("y", x0)
+          .text(format)
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("y", x1)
+          .style("opacity", 1);
+
+      whiskerTick.transition()
+          .duration(duration)
+          .text(format)
+          .attr("y", x1)
+          .style("opacity", 1);
+
+      whiskerTick.exit().transition()
+          .duration(duration)
+          .attr("y", x1)
+          .style("opacity", 1e-6)
+          .remove();
+    });
+    d3.timer.flush();
+  }
+
+  box.width = function(x) {
+    if (!arguments.length) return width;
+    width = x;
+    return box;
+  };
+
+  box.height = function(x) {
+    if (!arguments.length) return height;
+    height = x;
+    return box;
+  };
+
+  box.tickFormat = function(x) {
+    if (!arguments.length) return tickFormat;
+    tickFormat = x;
+    return box;
+  };
+
+  box.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = x;
+    return box;
+  };
+
+  box.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x == null ? x : d3.functor(x);
+    return box;
+  };
+
+  box.value = function(x) {
+    if (!arguments.length) return value;
+    value = x;
+    return box;
+  };
+
+  box.whiskers = function(x) {
+    if (!arguments.length) return whiskers;
+    whiskers = x;
+    return box;
+  };
+
+  box.quartiles = function(x) {
+    if (!arguments.length) return quartiles;
+    quartiles = x;
+    return box;
+  };
+
+  return box;
+};
+
+function d3_chart_boxWhiskers(d) {
+  return [0, d.length - 1];
+}
+
+function d3_chart_boxQuartiles(d) {
+  return [
+    d3.quantile(d, .25),
+    d3.quantile(d, .5),
+    d3.quantile(d, .75)
+  ];
+}
+// Chart design based on the recommendations of Stephen Few. Implementation
+// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
+// http://projects.instantcognition.com/protovis/bulletchart/
+d3.chart.bullet = function() {
+  var orient = "left", // TODO top & bottom
+      reverse = false,
+      duration = 0,
+      ranges = d3_chart_bulletRanges,
+      markers = d3_chart_bulletMarkers,
+      measures = d3_chart_bulletMeasures,
+      width = 380,
+      height = 30,
+      tickFormat = null;
+
+  // For each small multipleâŠ
+  function bullet(g) {
+    g.each(function(d, i) {
+      var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
+          markerz = markers.call(this, d, i).slice().sort(d3.descending),
+          measurez = measures.call(this, d, i).slice().sort(d3.descending),
+          g = d3.select(this);
+
+      // Compute the new x-scale.
+      var x1 = d3.scale.linear()
+          .domain([0, Math.max(rangez[0], markerz[0], measurez[0])])
+          .range(reverse ? [width, 0] : [0, width]);
+
+      // Retrieve the old x-scale, if this is an update.
+      var x0 = this.__chart__ || d3.scale.linear()
+          .domain([0, Infinity])
+          .range(x1.range());
+
+      // Stash the new scale.
+      this.__chart__ = x1;
+
+      // Derive width-scales from the x-scales.
+      var w0 = d3_chart_bulletWidth(x0),
+          w1 = d3_chart_bulletWidth(x1);
+
+      // Update the range rects.
+      var range = g.selectAll("rect.range")
+          .data(rangez);
+
+      range.enter().append("svg:rect")
+          .attr("class", function(d, i) { return "range s" + i; })
+          .attr("width", w0)
+          .attr("height", height)
+          .attr("x", reverse ? x0 : 0)
+        .transition()
+          .duration(duration)
+          .attr("width", w1)
+          .attr("x", reverse ? x1 : 0);
+
+      range.transition()
+          .duration(duration)
+          .attr("x", reverse ? x1 : 0)
+          .attr("width", w1)
+          .attr("height", height);
+
+      // Update the measure rects.
+      var measure = g.selectAll("rect.measure")
+          .data(measurez);
+
+      measure.enter().append("svg:rect")
+          .attr("class", function(d, i) { return "measure s" + i; })
+          .attr("width", w0)
+          .attr("height", height / 3)
+          .attr("x", reverse ? x0 : 0)
+          .attr("y", height / 3)
+        .transition()
+          .duration(duration)
+          .attr("width", w1)
+          .attr("x", reverse ? x1 : 0);
+
+      measure.transition()
+          .duration(duration)
+          .attr("width", w1)
+          .attr("height", height / 3)
+          .attr("x", reverse ? x1 : 0)
+          .attr("y", height / 3);
+
+      // Update the marker lines.
+      var marker = g.selectAll("line.marker")
+          .data(markerz);
+
+      marker.enter().append("svg:line")
+          .attr("class", "marker")
+          .attr("x1", x0)
+          .attr("x2", x0)
+          .attr("y1", height / 6)
+          .attr("y2", height * 5 / 6)
+        .transition()
+          .duration(duration)
+          .attr("x1", x1)
+          .attr("x2", x1);
+
+      marker.transition()
+          .duration(duration)
+          .attr("x1", x1)
+          .attr("x2", x1)
+          .attr("y1", height / 6)
+          .attr("y2", height * 5 / 6);
+
+      // Compute the tick format.
+      var format = tickFormat || x1.tickFormat(8);
+
+      // Update the tick groups.
+      var tick = g.selectAll("g.tick")
+          .data(x1.ticks(8), function(d) {
+            return this.textContent || format(d);
+          });
+
+      // Initialize the ticks with the old scale, x0.
+      var tickEnter = tick.enter().append("svg:g")
+          .attr("class", "tick")
+          .attr("transform", d3_chart_bulletTranslate(x0))
+          .style("opacity", 1e-6);
+
+      tickEnter.append("svg:line")
+          .attr("y1", height)
+          .attr("y2", height * 7 / 6);
+
+      tickEnter.append("svg:text")
+          .attr("text-anchor", "middle")
+          .attr("dy", "1em")
+          .attr("y", height * 7 / 6)
+          .text(format);
+
+      // Transition the entering ticks to the new scale, x1.
+      tickEnter.transition()
+          .duration(duration)
+          .attr("transform", d3_chart_bulletTranslate(x1))
+          .style("opacity", 1);
+
+      // Transition the updating ticks to the new scale, x1.
+      var tickUpdate = tick.transition()
+          .duration(duration)
+          .attr("transform", d3_chart_bulletTranslate(x1))
+          .style("opacity", 1);
+
+      tickUpdate.select("line")
+          .attr("y1", height)
+          .attr("y2", height * 7 / 6);
+
+      tickUpdate.select("text")
+          .attr("y", height * 7 / 6);
+
+      // Transition the exiting ticks to the new scale, x1.
+      tick.exit().transition()
+          .duration(duration)
+          .attr("transform", d3_chart_bulletTranslate(x1))
+          .style("opacity", 1e-6)
+          .remove();
+    });
+    d3.timer.flush();
+  }
+
+  // left, right, top, bottom
+  bullet.orient = function(x) {
+    if (!arguments.length) return orient;
+    orient = x;
+    reverse = orient == "right" || orient == "bottom";
+    return bullet;
+  };
+
+  // ranges (bad, satisfactory, good)
+  bullet.ranges = function(x) {
+    if (!arguments.length) return ranges;
+    ranges = x;
+    return bullet;
+  };
+
+  // markers (previous, goal)
+  bullet.markers = function(x) {
+    if (!arguments.length) return markers;
+    markers = x;
+    return bullet;
+  };
+
+  // measures (actual, forecast)
+  bullet.measures = function(x) {
+    if (!arguments.length) return measures;
+    measures = x;
+    return bullet;
+  };
+
+  bullet.width = function(x) {
+    if (!arguments.length) return width;
+    width = x;
+    return bullet;
+  };
+
+  bullet.height = function(x) {
+    if (!arguments.length) return height;
+    height = x;
+    return bullet;
+  };
+
+  bullet.tickFormat = function(x) {
+    if (!arguments.length) return tickFormat;
+    tickFormat = x;
+    return bullet;
+  };
+
+  bullet.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = x;
+    return bullet;
+  };
+
+  return bullet;
+};
+
+function d3_chart_bulletRanges(d) {
+  return d.ranges;
+}
+
+function d3_chart_bulletMarkers(d) {
+  return d.markers;
+}
+
+function d3_chart_bulletMeasures(d) {
+  return d.measures;
+}
+
+function d3_chart_bulletTranslate(x) {
+  return function(d) {
+    return "translate(" + x(d) + ",0)";
+  };
+}
+
+function d3_chart_bulletWidth(x) {
+  var x0 = x(0);
+  return function(d) {
+    return Math.abs(x(d) - x0);
+  };
+}
+// Implements a horizon layout, which is a variation of a single-series
+// area chart where the area is folded into multiple bands. Color is used to
+// encode band, allowing the size of the chart to be reduced significantly
+// without impeding readability. This layout algorithm is based on the work of
+// J. Heer, N. Kong and M. Agrawala in "Sizing the Horizon: The Effects of Chart
+// Size and Layering on the Graphical Perception of Time Series Visualizations",
+// CHI 2009. http://hci.stanford.edu/publications/2009/heer-horizon-chi09.pdf
+d3.chart.horizon = function() {
+  var bands = 1, // between 1 and 5, typically
+      mode = "offset", // or mirror
+      interpolate = "linear", // or basis, monotone, step-before, etc.
+      x = d3_chart_horizonX,
+      y = d3_chart_horizonY,
+      w = 960,
+      h = 40,
+      duration = 0;
+
+  var color = d3.scale.linear()
+      .domain([-1, 0, 1])
+      .range(["#d62728", "#fff", "#1f77b4"]);
+
+  // For each small multipleâŠ
+  function horizon(g) {
+    g.each(function(d, i) {
+      var g = d3.select(this),
+          n = 2 * bands + 1,
+          xMin = Infinity,
+          xMax = -Infinity,
+          yMax = -Infinity,
+          x0, // old x-scale
+          y0, // old y-scale
+          id; // unique id for paths
+
+      // Compute x- and y-values along with extents.
+      var data = d.map(function(d, i) {
+        var xv = x.call(this, d, i),
+            yv = y.call(this, d, i);
+        if (xv < xMin) xMin = xv;
+        if (xv > xMax) xMax = xv;
+        if (-yv > yMax) yMax = -yv;
+        if (yv > yMax) yMax = yv;
+        return [xv, yv];
+      });
+
+      // Compute the new x- and y-scales.
+      var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]),
+          y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]);
+
+      // Retrieve the old scales, if this is an update.
+      if (this.__chart__) {
+        x0 = this.__chart__.x;
+        y0 = this.__chart__.y;
+        id = this.__chart__.id;
+      } else {
+        x0 = d3.scale.linear().domain([0, Infinity]).range(x1.range());
+        y0 = d3.scale.linear().domain([0, Infinity]).range(y1.range());
+        id = ++d3_chart_horizonId;
+      }
+
+      // We'll use a defs to store the area path and the clip path.
+      var defs = g.selectAll("defs")
+          .data([data]);
+
+      var defsEnter = defs.enter().append("svg:defs");
+
+      // The clip path is a simple rect.
+      defsEnter.append("svg:clipPath")
+          .attr("id", "d3_chart_horizon_clip" + id)
+        .append("svg:rect")
+          .attr("width", w)
+          .attr("height", h);
+
+      defs.select("rect").transition()
+          .duration(duration)
+          .attr("width", w)
+          .attr("height", h);
+
+      // The area path is rendered with our resuable d3.svg.area.
+      defsEnter.append("svg:path")
+          .attr("id", "d3_chart_horizon_path" + id)
+          .attr("d", d3_chart_horizonArea
+          .interpolate(interpolate)
+          .x(function(d) { return x0(d[0]); })
+          .y0(h * bands)
+          .y1(function(d) { return h * bands - y0(d[1]); }))
+        .transition()
+          .duration(duration)
+          .attr("d", d3_chart_horizonArea
+          .x(function(d) { return x1(d[0]); })
+          .y1(function(d) { return h * bands - y1(d[1]); }));
+
+      defs.select("path").transition()
+          .duration(duration)
+          .attr("d", d3_chart_horizonArea);
+
+      // We'll use a container to clip all horizon layers at once.
+      g.selectAll("g")
+          .data([null])
+        .enter().append("svg:g")
+          .attr("clip-path", "url(#d3_chart_horizon_clip" + id + ")");
+
+      // Define the transform function based on the mode.
+      var transform = mode == "offset"
+          ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; }
+          : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; };
+
+      // Instantiate each copy of the path with different transforms.
+      var u = g.select("g").selectAll("use")
+          .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number);
+
+      // TODO don't fudge the enter transition
+      u.enter().append("svg:use")
+          .attr("xlink:href", "#d3_chart_horizon_path" + id)
+          .attr("transform", function(d) { return transform(d + (d > 0 ? 1 : -1)); })
+          .style("fill", color)
+        .transition()
+          .duration(duration)
+          .attr("transform", transform);
+
+      u.transition()
+          .duration(duration)
+          .attr("transform", transform)
+          .style("fill", color);
+
+      u.exit().transition()
+          .duration(duration)
+          .attr("transform", transform)
+          .remove();
+
+      // Stash the new scales.
+      this.__chart__ = {x: x1, y: y1, id: id};
+    });
+    d3.timer.flush();
+  }
+
+  horizon.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = +x;
+    return horizon;
+  };
+
+  horizon.bands = function(x) {
+    if (!arguments.length) return bands;
+    bands = +x;
+    color.domain([-bands, 0, bands]);
+    return horizon;
+  };
+
+  horizon.mode = function(x) {
+    if (!arguments.length) return mode;
+    mode = x + "";
+    return horizon;
+  };
+
+  horizon.colors = function(x) {
+    if (!arguments.length) return color.range();
+    color.range(x);
+    return horizon;
+  };
+
+  horizon.interpolate = function(x) {
+    if (!arguments.length) return interpolate;
+    interpolate = x + "";
+    return horizon;
+  };
+
+  horizon.x = function(z) {
+    if (!arguments.length) return x;
+    x = z;
+    return horizon;
+  };
+
+  horizon.y = function(z) {
+    if (!arguments.length) return y;
+    y = z;
+    return horizon;
+  };
+
+  horizon.width = function(x) {
+    if (!arguments.length) return w;
+    w = +x;
+    return horizon;
+  };
+
+  horizon.height = function(x) {
+    if (!arguments.length) return h;
+    h = +x;
+    return horizon;
+  };
+
+  return horizon;
+};
+
+var d3_chart_horizonArea = d3.svg.area(),
+    d3_chart_horizonId = 0;
+
+function d3_chart_horizonX(d) {
+  return d[0];
+}
+
+function d3_chart_horizonY(d) {
+  return d[1];
+}
+// Based on http://vis.stanford.edu/protovis/ex/qqplot.html
+d3.chart.qq = function() {
+  var width = 1,
+      height = 1,
+      duration = 0,
+      domain = null,
+      tickFormat = null,
+      n = 100,
+      x = d3_chart_qqX,
+      y = d3_chart_qqY;
+
+  // For each small multipleâŠ
+  function qq(g) {
+    g.each(function(d, i) {
+      var g = d3.select(this),
+          qx = d3_chart_qqQuantiles(n, x.call(this, d, i)),
+          qy = d3_chart_qqQuantiles(n, y.call(this, d, i)),
+          xd = domain && domain.call(this, d, i) || [d3.min(qx), d3.max(qx)], // new x-domain
+          yd = domain && domain.call(this, d, i) || [d3.min(qy), d3.max(qy)], // new y-domain
+          x0, // old x-scale
+          y0; // old y-scale
+
+      // Compute the new x-scale.
+      var x1 = d3.scale.linear()
+          .domain(xd)
+          .range([0, width]);
+
+      // Compute the new y-scale.
+      var y1 = d3.scale.linear()
+          .domain(yd)
+          .range([height, 0]);
+
+      // Retrieve the old scales, if this is an update.
+      if (this.__chart__) {
+        x0 = this.__chart__.x;
+        y0 = this.__chart__.y;
+      } else {
+        x0 = d3.scale.linear().domain([0, Infinity]).range(x1.range());
+        y0 = d3.scale.linear().domain([0, Infinity]).range(y1.range());
+      }
+
+      // Stash the new scales.
+      this.__chart__ = {x: x1, y: y1};
+
+      // Update diagonal line.
+      var diagonal = g.selectAll("line.diagonal")
+          .data([null]);
+
+      diagonal.enter().append("svg:line")
+          .attr("class", "diagonal")
+          .attr("x1", x1(yd[0]))
+          .attr("y1", y1(xd[0]))
+          .attr("x2", x1(yd[1]))
+          .attr("y2", y1(xd[1]));
+
+      diagonal.transition()
+          .duration(duration)
+          .attr("x1", x1(yd[0]))
+          .attr("y1", y1(xd[0]))
+          .attr("x2", x1(yd[1]))
+          .attr("y2", y1(xd[1]));
+
+      // Update quantile plots.
+      var circle = g.selectAll("circle")
+          .data(d3.range(n).map(function(i) {
+            return {x: qx[i], y: qy[i]};
+          }));
+
+      circle.enter().append("svg:circle")
+          .attr("class", "quantile")
+          .attr("r", 4.5)
+          .attr("cx", function(d) { return x0(d.x); })
+          .attr("cy", function(d) { return y0(d.y); })
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("cx", function(d) { return x1(d.x); })
+          .attr("cy", function(d) { return y1(d.y); })
+          .style("opacity", 1);
+
+      circle.transition()
+          .duration(duration)
+          .attr("cx", function(d) { return x1(d.x); })
+          .attr("cy", function(d) { return y1(d.y); })
+          .style("opacity", 1);
+
+      circle.exit().transition()
+          .duration(duration)
+          .attr("cx", function(d) { return x1(d.x); })
+          .attr("cy", function(d) { return y1(d.y); })
+          .style("opacity", 1e-6)
+          .remove();
+
+      var xformat = tickFormat || x1.tickFormat(4),
+          yformat = tickFormat || y1.tickFormat(4),
+          tx = function(d) { return "translate(" + x1(d) + "," + height + ")"; },
+          ty = function(d) { return "translate(0," + y1(d) + ")"; };
+
+      // Update x-ticks.
+      var xtick = g.selectAll("g.x.tick")
+          .data(x1.ticks(4), function(d) {
+            return this.textContent || xformat(d);
+          });
+
+      var xtickEnter = xtick.enter().append("svg:g")
+          .attr("class", "x tick")
+          .attr("transform", function(d) { return "translate(" + x0(d) + "," + height + ")"; })
+          .style("opacity", 1e-6);
+
+      xtickEnter.append("svg:line")
+          .attr("y1", 0)
+          .attr("y2", -6);
+
+      xtickEnter.append("svg:text")
+          .attr("text-anchor", "middle")
+          .attr("dy", "1em")
+          .text(xformat);
+
+      // Transition the entering ticks to the new scale, x1.
+      xtickEnter.transition()
+          .duration(duration)
+          .attr("transform", tx)
+          .style("opacity", 1);
+
+      // Transition the updating ticks to the new scale, x1.
+      xtick.transition()
+          .duration(duration)
+          .attr("transform", tx)
+          .style("opacity", 1);
+
+      // Transition the exiting ticks to the new scale, x1.
+      xtick.exit().transition()
+          .duration(duration)
+          .attr("transform", tx)
+          .style("opacity", 1e-6)
+          .remove();
+
+      // Update ticks.
+      var ytick = g.selectAll("g.y.tick")
+          .data(y1.ticks(4), function(d) {
+            return this.textContent || yformat(d);
+          });
+
+      var ytickEnter = ytick.enter().append("svg:g")
+          .attr("class", "y tick")
+          .attr("transform", function(d) { return "translate(0," + y0(d) + ")"; })
+          .style("opacity", 1e-6);
+
+      ytickEnter.append("svg:line")
+          .attr("x1", 0)
+          .attr("x2", 6);
+
+      ytickEnter.append("svg:text")
+          .attr("text-anchor", "end")
+          .attr("dx", "-.5em")
+          .attr("dy", ".3em")
+          .text(yformat);
+
+      // Transition the entering ticks to the new scale, y1.
+      ytickEnter.transition()
+          .duration(duration)
+          .attr("transform", ty)
+          .style("opacity", 1);
+
+      // Transition the updating ticks to the new scale, y1.
+      ytick.transition()
+          .duration(duration)
+          .attr("transform", ty)
+          .style("opacity", 1);
+
+      // Transition the exiting ticks to the new scale, y1.
+      ytick.exit().transition()
+          .duration(duration)
+          .attr("transform", ty)
+          .style("opacity", 1e-6)
+          .remove();
+    });
+  }
+
+  qq.width = function(x) {
+    if (!arguments.length) return width;
+    width = x;
+    return qq;
+  };
+
+  qq.height = function(x) {
+    if (!arguments.length) return height;
+    height = x;
+    return qq;
+  };
+
+  qq.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = x;
+    return qq;
+  };
+
+  qq.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x == null ? x : d3.functor(x);
+    return qq;
+  };
+
+  qq.count = function(z) {
+    if (!arguments.length) return n;
+    n = z;
+    return qq;
+  };
+
+  qq.x = function(z) {
+    if (!arguments.length) return x;
+    x = z;
+    return qq;
+  };
+
+  qq.y = function(z) {
+    if (!arguments.length) return y;
+    y = z;
+    return qq;
+  };
+
+  qq.tickFormat = function(x) {
+    if (!arguments.length) return tickFormat;
+    tickFormat = x;
+    return qq;
+  };
+
+  return qq;
+};
+
+function d3_chart_qqQuantiles(n, values) {
+  var m = values.length - 1;
+  values = values.slice().sort(d3.ascending);
+  return d3.range(n).map(function(i) {
+    return values[~~(i * m / n)];
+  });
+}
+
+function d3_chart_qqX(d) {
+  return d.x;
+}
+
+function d3_chart_qqY(d) {
+  return d.y;
+}
+})();
Index: Dev/branches/Demo/d3/d3.chart.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.chart.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.chart.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function n(a){return a.y}function m(a){return a.x}function l(a,b){var c=b.length-1;b=b.slice().sort(d3.ascending);return d3.range(a).map(function(d){return b[~~(d*c/a)]})}function k(a){return a[1]}function j(a){return a[0]}function g(a){var b=a(0);return function(c){return Math.abs(a(c)-b)}}function f(a){return function(b){return"translate("+a(b)+",0)"}}function e(a){return a.measures}function d(a){return a.markers}function c(a){return a.ranges}function b(a){return[d3.quantile(a,.25),d3.quantile(a,.5),d3.quantile(a,.75)]}function a(a){return[0,a.length-1]}d3.chart={},d3.chart.box=function(){function k(a){a.each(function(a,b){a=a.map(g).sort(d3.ascending);var k=d3.select(this),l=a.length,m=a[0],n=a[l-1],o=a.quartiles=i(a),p=h&&h.call(this,a,b),q=p&&p.map(function(b){return a[b]}),r=p?d3.range(0,p[0]).concat(d3.range(p[1]+1,l)):d3.range(l),s=d3.scale.linear().domain(f&&f.call(this,a,b)||[m,n]).range([d,0]),t=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(s.range());this.__chart__=s;var u=k.selectAll("line.center").data(q?[q]:[]);u.enter().insert("svg:line","rect").attr("class","center").attr("x1",c/2).attr("y1",function(a){return t(a[0])}).attr("x2",c/2).attr("y2",function(a){return t(a[1])}).style("opacity",1e-6).transition().duration(e).style("opacity",1).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}),u.transition().duration(e).style("opacity",1).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}),u.exit().transition().duration(e).style("opacity",1e-6).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}).remove();var v=k.selectAll("rect.box").data([o]);v.enter().append("svg:rect").attr("class","box").attr("x",0).attr("y",function(a){return t(a[2])}).attr("width",c).attr("height",function(a){return t(a[0])-t(a[2])}).transition().duration(e).attr("y",function(a){return s(a[2])}).attr("height",function(a){return s(a[0])-s(a[2])}),v.transition().duration(e).attr("y",function(a){return s(a[2])}).attr("height",function(a){return s(a[0])-s(a[2])});var w=k.selectAll("line.median").data([o[1]]);w.enter().append("svg:line").attr("class","median").attr("x1",0).attr("y1",t).attr("x2",c).attr("y2",t).transition().duration(e).attr("y1",s).attr("y2",s),w.transition().duration(e).attr("y1",s).attr("y2",s);var x=k.selectAll("line.whisker").data(q||[]);x.enter().insert("svg:line","circle, text").attr("class","whisker").attr("x1",0).attr("y1",t).attr("x2",c).attr("y2",t).style("opacity",1e-6).transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1),x.transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1),x.exit().transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1e-6).remove();var y=k.selectAll("circle.outlier").data(r,Number);y.enter().insert("svg:circle","text").attr("class","outlier").attr("r",5).attr("cx",c/2).attr("cy",function(b){return t(a[b])}).style("opacity",1e-6).transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1),y.transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1),y.exit().transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1e-6).remove();var z=j||s.tickFormat(8),A=k.selectAll("text.box").data(o);A.enter().append("svg:text").attr("class","box").attr("dy",".3em").attr("dx",function(a,b){return b&1?6:-6}).attr("x",function(a,b){return b&1?c:0}).attr("y",t).attr("text-anchor",function(a,b){return b&1?"start":"end"}).text(z).transition().duration(e).attr("y",s),A.transition().duration(e).text(z).attr("y",s);var B=k.selectAll("text.whisker").data(q||[]);B.enter().append("svg:text").attr("class","whisker").attr("dy",".3em").attr("dx",6).attr("x",c).attr("y",t).text(z).style("opacity",1e-6).transition().duration(e).attr("y",s).style("opacity",1),B.transition().duration(e).text(z).attr("y",s).style("opacity",1),B.exit().transition().duration(e).attr("y",s).style("opacity",1e-6).remove()}),d3.timer.flush()}var c=1,d=1,e=0,f=null,g=Number,h=a,i=b,j=null;k.width=function(a){if(!arguments.length)return c;c=a;return k},k.height=function(a){if(!arguments.length)return d;d=a;return k},k.tickFormat=function(a){if(!arguments.length)return j;j=a;return k},k.duration=function(a){if(!arguments.length)return e;e=a;return k},k.domain=function(a){if(!arguments.length)return f;f=a==null?a:d3.functor(a);return k},k.value=function(a){if(!arguments.length)return g;g=a;return k},k.whiskers=function(a){if(!arguments.length)return h;h=a;return k},k.quartiles=function(a){if(!arguments.length)return i;i=a;return k};return k},d3.chart.bullet=function(){function o(a){a.each(function(a,c){var d=i.call(this,a,c).slice().sort(d3.descending),e=j.call(this,a,c).slice().sort(d3.descending),o=k.call(this,a,c).slice().sort(d3.descending),p=d3.select(this),q=d3.scale.linear().domain([0,Math.max(d[0],e[0],o[0])]).range(b?[l,0]:[0,l]),r=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(q.range());this.__chart__=q;var s=g(r),t=g(q),u=p.selectAll("rect.range").data(d);u.enter().append("svg:rect").attr("class",function(a,b){return"range s"+b}).attr("width",s).attr("height",m).attr("x",b?r:0).transition().duration(h).attr("width",t).attr("x",b?q:0),u.transition().duration(h).attr("x",b?q:0).attr("width",t).attr("height",m);var v=p.selectAll("rect.measure").data(o);v.enter().append("svg:rect").attr("class",function(a,b){return"measure s"+b}).attr("width",s).attr("height",m/3).attr("x",b?r:0).attr("y",m/3).transition().duration(h).attr("width",t).attr("x",b?q:0),v.transition().duration(h).attr("width",t).attr("height",m/3).attr("x",b?q:0).attr("y",m/3);var w=p.selectAll("line.marker").data(e);w.enter().append("svg:line").attr("class","marker").attr("x1",r).attr("x2",r).attr("y1",m/6).attr("y2",m*5/6).transition().duration(h).attr("x1",q).attr("x2",q),w.transition().duration(h).attr("x1",q).attr("x2",q).attr("y1",m/6).attr("y2",m*5/6);var x=n||q.tickFormat(8),y=p.selectAll("g.tick").data(q.ticks(8),function(a){return this.textContent||x(a)}),z=y.enter().append("svg:g").attr("class","tick").attr("transform",f(r)).style("opacity",1e-6);z.append("svg:line").attr("y1",m).attr("y2",m*7/6),z.append("svg:text").attr("text-anchor","middle").attr("dy","1em").attr("y",m*7/6).text(x),z.transition().duration(h).attr("transform",f(q)).style("opacity",1);var A=y.transition().duration(h).attr("transform",f(q)).style("opacity",1);A.select("line").attr("y1",m).attr("y2",m*7/6),A.select("text").attr("y",m*7/6),y.exit().transition().duration(h).attr("transform",f(q)).style("opacity",1e-6).remove()}),d3.timer.flush()}var a="left",b=!1,h=0,i=c,j=d,k=e,l=380,m=30,n=null;o.orient=function(c){if(!arguments.length)return a;a=c,b=a=="right"||a=="bottom";return o},o.ranges=function(a){if(!arguments.length)return i;i=a;return o},o.markers=function(a){if(!arguments.length)return j;j=a;return o},o.measures=function(a){if(!arguments.length)return k;k=a;return o},o.width=function(a){if(!arguments.length)return l;l=a;return o},o.height=function(a){if(!arguments.length)return m;m=a;return o},o.tickFormat=function(a){if(!arguments.length)return n;n=a;return o},o.duration=function(a){if(!arguments.length)return h;h=a;return o};return o},d3.chart.horizon=function(){function n(j){j.each(function(j,k){var n=d3.select(this),o=2*a+1,p=Infinity,q=-Infinity,r=-Infinity,s,t,u,v=j.map(function(a,b){var c=d.call(this,a,b),f=e.call(this,a,b);c<p&&(p=c),c>q&&(q=c),-f>r&&(r=-f),f>r&&(r=f);return[c,f]}),z=d3.scale.linear().domain([p,q]).range([0,f]),A=d3.scale.linear().domain([0,r]).range([0,g*a]);this.__chart__?(s=this.__chart__.x,t=this.__chart__.y,u=this.__chart__.id):(s=d3.scale.linear().domain([0,Infinity]).range(z.range()),t=d3.scale.linear().domain([0,Infinity]).range(A.range()),u=++i);var B=n.selectAll("defs").data([v]),C=B.enter().append("svg:defs");C.append("svg:clipPath").attr("id","d3_chart_horizon_clip"+u).append("svg:rect").attr("width",f).attr("height",g),B.select("rect").transition().duration(l).attr("width",f).attr("height",g),C.append("svg:path").attr("id","d3_chart_horizon_path"+u).attr("d",h.interpolate(c).x(function(a){return s(a[0])}).y0(g*a).y1(function(b){return g*a-t(b[1])})).transition().duration(l).attr("d",h.x(function(a){return z(a[0])}).y1(function(b){return g*a-A(b[1])})),B.select("path").transition().duration(l).attr("d",h),n.selectAll("g").data([null]).enter().append("svg:g").attr("clip-path","url(#d3_chart_horizon_clip"+u+")");var D=b=="offset"?function(b){return"translate(0,"+(b+(b<0)-a)*g+")"}:function(b){return(b<0?"scale(1,-1)":"")+"translate(0,"+(b-a)*g+")"},E=n.select("g").selectAll("use").data(d3.range(-1,-a-1,-1).concat(d3.range(1,a+1)),Number);E.enter().append("svg:use").attr("xlink:href","#d3_chart_horizon_path"+u).attr("transform",function(a){return D(a+(a>0?1:-1))}).style("fill",m).transition().duration(l).attr("transform",D),E.transition().duration(l).attr("transform",D).style("fill",m),E.exit().transition().duration(l).attr("transform",D).remove(),this.__chart__={x:z,y:A,id:u}}),d3.timer.flush()}var a=1,b="offset",c="linear",d=j,e=k,f=960,g=40,l=0,m=d3.scale.linear().domain([-1,0,1]).range(["#d62728","#fff","#1f77b4"]);n.duration=function(a){if(!arguments.length)return l;l=+a;return n},n.bands=function(b){if(!arguments.length)return a;a=+b,m.domain([-a,0,a]);return n},n.mode=function(a){if(!arguments.length)return b;b=a+"";return n},n.colors=function(a){if(!arguments.length)return m.range();m.range(a);return n},n.interpolate=function(a){if(!arguments.length)return c;c=a+"";return n},n.x=function(a){if(!arguments.length)return d;d=a;return n},n.y=function(a){if(!arguments.length)return e;e=a;return n},n.width=function(a){if(!arguments.length)return f;f=+a;return n},n.height=function(a){if(!arguments.length)return g;g=+a;return n};return n};var h=d3.svg.area(),i=0;d3.chart.qq=function(){function i(i){i.each(function(i,j){var k=d3.select(this),m=l(f,g.call(this,i,j)),n=l(f,h.call(this,i,j)),o=d&&d.call(this,i,j)||[d3.min(m),d3.max(m)],p=d&&d.call(this,i,j)||[d3.min(n),d3.max(n)],q,r,s=d3.scale.linear().domain(o).range([0,a]),t=d3.scale.linear().domain(p).range([b,0]);this.__chart__?(q=this.__chart__.x,r=this.__chart__.y):(q=d3.scale.linear().domain([0,Infinity]).range(s.range()),r=d3.scale.linear().domain([0,Infinity]).range(t.range())),this.__chart__={x:s,y:t};var u=k.selectAll("line.diagonal").data([null]);u.enter().append("svg:line").attr("class","diagonal").attr("x1",s(p[0])).attr("y1",t(o[0])).attr("x2",s(p[1])).attr("y2",t(o[1])),u.transition().duration(c).attr("x1",s(p[0])).attr("y1",t(o[0])).attr("x2",s(p[1])).attr("y2",t(o[1]));var v=k.selectAll("circle").data(d3.range(f).map(function(a){return{x:m[a],y:n[a]}}));v.enter().append("svg:circle").attr("class","quantile").attr("r",4.5).attr("cx",function(a){return q(a.x)}).attr("cy",function(a){return r(a.y)}).style("opacity",1e-6).transition().duration(c).attr("cx",function(a){return s(a.x)}).attr("cy",function(a){return t(a.y)}).style("opacity",1),v.transition().duration(c).attr("cx",function(a){return s(a.x)}).attr("cy",function(a){return t(a.y)}).style("opacity",1),v.exit().transition().duration(c).attr("cx",function(a){return s(a.x)}).attr("cy",function(a){return t(a.y)}).style("opacity",1e-6).remove();var w=e||s.tickFormat(4),z=e||t.tickFormat(4),A=function(a){return"translate("+s(a)+","+b+")"},B=function(a){return"translate(0,"+t(a)+")"},C=k.selectAll("g.x.tick").data(s.ticks(4),function(a){return this.textContent||w(a)}),D=C.enter().append("svg:g").attr("class","x tick").attr("transform",function(a){return"translate("+q(a)+","+b+")"}).style("opacity",1e-6);D.append("svg:line").attr("y1",0).attr("y2",-6),D.append("svg:text").attr("text-anchor","middle").attr("dy","1em").text(w),D.transition().duration(c).attr("transform",A).style("opacity",1),C.transition().duration(c).attr("transform",A).style("opacity",1),C.exit().transition().duration(c).attr("transform",A).style("opacity",1e-6).remove();var E=k.selectAll("g.y.tick").data(t.ticks(4),function(a){return this.textContent||z(a)}),F=E.enter().append("svg:g").attr("class","y tick").attr("transform",function(a){return"translate(0,"+r(a)+")"}).style("opacity",1e-6);F.append("svg:line").attr("x1",0).attr("x2",6),F.append("svg:text").attr("text-anchor","end").attr("dx","-.5em").attr("dy",".3em").text(z),F.transition().duration(c).attr("transform",B).style("opacity",1),E.transition().duration(c).attr("transform",B).style("opacity",1),E.exit().transition().duration(c).attr("transform",B).style("opacity",1e-6).remove()})}var a=1,b=1,c=0,d=null,e=null,f=100,g=m,h=n;i.width=function(b){if(!arguments.length)return a;a=b;return i},i.height=function(a){if(!arguments.length)return b;b=a;return i},i.duration=function(a){if(!arguments.length)return c;c=a;return i},i.domain=function(a){if(!arguments.length)return d;d=a==null?a:d3.functor(a);return i},i.count=function(a){if(!arguments.length)return f;f=a;return i},i.x=function(a){if(!arguments.length)return g;g=a;return i},i.y=function(a){if(!arguments.length)return h;h=a;return i},i.tickFormat=function(a){if(!arguments.length)return e;e=a;return i};return i}})()
Index: Dev/branches/Demo/d3/d3.csv.js
===================================================================
--- Dev/branches/Demo/d3/d3.csv.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.csv.js	(revision 225)
@@ -0,0 +1,92 @@
+(function(){d3.csv = function(url, callback) {
+  d3.text(url, "text/csv", function(text) {
+    callback(text && d3.csv.parse(text));
+  });
+};
+d3.csv.parse = function(text) {
+  var header;
+  return d3.csv.parseRows(text, function(row, i) {
+    if (i) {
+      var o = {}, j = -1, m = header.length;
+      while (++j < m) o[header[j]] = row[j];
+      return o;
+    } else {
+      header = row;
+      return null;
+    }
+  });
+};
+
+d3.csv.parseRows = function(text, f) {
+  var EOL = {}, // sentinel value for end-of-line
+      EOF = {}, // sentinel value for end-of-file
+      rows = [], // output rows
+      re = /\r\n|[,\r\n]/g, // field separator regex
+      n = 0, // the current line number
+      t, // the current token
+      eol; // is the current token followed by EOL?
+
+  re.lastIndex = 0; // work-around bug in FF 3.6
+
+  /** @private Returns the next token. */
+  function token() {
+    if (re.lastIndex === text.length) return EOF; // special case: end of file
+    if (eol) { eol = false; return EOL; } // special case: end of line
+
+    // special case: quotes
+    var j = re.lastIndex;
+    if (text.charCodeAt(j) === 34) {
+      var i = j;
+      while (i++ < text.length) {
+        if (text.charCodeAt(i) === 34) {
+          if (text.charCodeAt(i + 1) !== 34) break;
+          i++;
+        }
+      }
+      re.lastIndex = i + 2;
+      var c = text.charCodeAt(i + 1);
+      if (c === 13) {
+        eol = true;
+        if (text.charCodeAt(i + 2) === 10) re.lastIndex++;
+      } else if (c === 10) {
+        eol = true;
+      }
+      return text.substring(j + 1, i).replace(/""/g, "\"");
+    }
+
+    // common case
+    var m = re.exec(text);
+    if (m) {
+      eol = m[0].charCodeAt(0) !== 44;
+      return text.substring(j, m.index);
+    }
+    re.lastIndex = text.length;
+    return text.substring(j);
+  }
+
+  while ((t = token()) !== EOF) {
+    var a = [];
+    while ((t !== EOL) && (t !== EOF)) {
+      a.push(t);
+      t = token();
+    }
+    if (f && !(a = f(a, n++))) continue;
+    rows.push(a);
+  }
+
+  return rows;
+};
+d3.csv.format = function(rows) {
+  return rows.map(d3_csv_formatRow).join("\n");
+};
+
+function d3_csv_formatRow(row) {
+  return row.map(d3_csv_formatValue).join(",");
+}
+
+function d3_csv_formatValue(text) {
+  return /[",\n]/.test(text)
+      ? "\"" + text.replace(/\"/g, "\"\"") + "\""
+      : text;
+}
+})();
Index: Dev/branches/Demo/d3/d3.csv.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.csv.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.csv.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function b(a){return/[",\n]/.test(a)?'"'+a.replace(/\"/g,'""')+'"':a}function a(a){return a.map(b).join(",")}d3.csv=function(a,b){d3.text(a,"text/csv",function(a){b(a&&d3.csv.parse(a))})},d3.csv.parse=function(a){var b;return d3.csv.parseRows(a,function(a,c){if(c){var d={},e=-1,f=b.length;while(++e<f)d[b[e]]=a[e];return d}b=a;return null})},d3.csv.parseRows=function(a,b){function j(){if(f.lastIndex===a.length)return d;if(i){i=!1;return c}var b=f.lastIndex;if(a.charCodeAt(b)===34){var e=b;while(e++<a.length)if(a.charCodeAt(e)===34){if(a.charCodeAt(e+1)!==34)break;e++}f.lastIndex=e+2;var g=a.charCodeAt(e+1);g===13?(i=!0,a.charCodeAt(e+2)===10&&f.lastIndex++):g===10&&(i=!0);return a.substring(b+1,e).replace(/""/g,'"')}var h=f.exec(a);if(h){i=h[0].charCodeAt(0)!==44;return a.substring(b,h.index)}f.lastIndex=a.length;return a.substring(b)}var c={},d={},e=[],f=/\r\n|[,\r\n]/g,g=0,h,i;f.lastIndex=0;while((h=j())!==d){var k=[];while(h!==c&&h!==d)k.push(h),h=j();if(b&&!(k=b(k,g++)))continue;e.push(k)}return e},d3.csv.format=function(b){return b.map(a).join("\n")}})()
Index: Dev/branches/Demo/d3/d3.geo.js
===================================================================
--- Dev/branches/Demo/d3/d3.geo.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.geo.js	(revision 225)
@@ -0,0 +1,566 @@
+(function(){d3.geo = {};
+// TODO clip input coordinates on opposite hemisphere
+d3.geo.azimuthal = function() {
+  var mode = "orthographic", // or stereographic
+      origin,
+      scale = 200,
+      translate = [480, 250],
+      x0,
+      y0,
+      cy0,
+      sy0;
+
+  function azimuthal(coordinates) {
+    var x1 = coordinates[0] * d3_radians - x0,
+        y1 = coordinates[1] * d3_radians,
+        cx1 = Math.cos(x1),
+        sx1 = Math.sin(x1),
+        cy1 = Math.cos(y1),
+        sy1 = Math.sin(y1),
+        k = mode == "stereographic" ? 1 / (1 + sy0 * sy1 + cy0 * cy1 * cx1) : 1,
+        x = k * cy1 * sx1,
+        y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
+    return [
+      scale * x + translate[0],
+      scale * y + translate[1]
+    ];
+  }
+
+  azimuthal.mode = function(x) {
+    if (!arguments.length) return mode;
+    mode = x;
+    return azimuthal;
+  };
+
+  azimuthal.origin = function(x) {
+    if (!arguments.length) return origin;
+    origin = x;
+    x0 = origin[0] * d3_radians;
+    y0 = origin[1] * d3_radians;
+    cy0 = Math.cos(y0);
+    sy0 = Math.sin(y0);
+    return azimuthal;
+  };
+
+  azimuthal.scale = function(x) {
+    if (!arguments.length) return scale;
+    scale = +x;
+    return azimuthal;
+  };
+
+  azimuthal.translate = function(x) {
+    if (!arguments.length) return translate;
+    translate = [+x[0], +x[1]];
+    return azimuthal;
+  };
+
+  return azimuthal.origin([0, 0]);
+};
+// Derived from Tom Carden's Albers implementation for Protovis.
+// http://gist.github.com/476238
+// http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html
+
+d3.geo.albers = function() {
+  var origin = [-98, 38],
+      parallels = [29.5, 45.5],
+      scale = 1000,
+      translate = [480, 250],
+      lng0, // d3_radians * origin[0]
+      n,
+      C,
+      p0;
+
+  function albers(coordinates) {
+    var t = n * (d3_radians * coordinates[0] - lng0),
+        p = Math.sqrt(C - 2 * n * Math.sin(d3_radians * coordinates[1])) / n;
+    return [
+      scale * p * Math.sin(t) + translate[0],
+      scale * (p * Math.cos(t) - p0) + translate[1]
+    ];
+  }
+
+  function reload() {
+    var phi1 = d3_radians * parallels[0],
+        phi2 = d3_radians * parallels[1],
+        lat0 = d3_radians * origin[1],
+        s = Math.sin(phi1),
+        c = Math.cos(phi1);
+    lng0 = d3_radians * origin[0];
+    n = .5 * (s + Math.sin(phi2));
+    C = c * c + 2 * n * s;
+    p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;
+    return albers;
+  }
+
+  albers.origin = function(x) {
+    if (!arguments.length) return origin;
+    origin = [+x[0], +x[1]];
+    return reload();
+  };
+
+  albers.parallels = function(x) {
+    if (!arguments.length) return parallels;
+    parallels = [+x[0], +x[1]];
+    return reload();
+  };
+
+  albers.scale = function(x) {
+    if (!arguments.length) return scale;
+    scale = +x;
+    return albers;
+  };
+
+  albers.translate = function(x) {
+    if (!arguments.length) return translate;
+    translate = [+x[0], +x[1]];
+    return albers;
+  };
+
+  return reload();
+};
+
+// A composite projection for the United States, 960x500. The set of standard
+// parallels for each region comes from USGS, which is published here:
+// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
+// TODO allow the composite projection to be rescaled?
+d3.geo.albersUsa = function() {
+  var lower48 = d3.geo.albers();
+
+  var alaska = d3.geo.albers()
+      .origin([-160, 60])
+      .parallels([55, 65]);
+
+  var hawaii = d3.geo.albers()
+      .origin([-160, 20])
+      .parallels([8, 18]);
+
+  var puertoRico = d3.geo.albers()
+      .origin([-60, 10])
+      .parallels([8, 18]);
+
+  function albersUsa(coordinates) {
+    var lon = coordinates[0],
+        lat = coordinates[1];
+    return (lat < 25
+        ? (lon < -100 ? hawaii : puertoRico)
+        : (lat > 50 ? alaska : lower48))(coordinates);
+  }
+
+  albersUsa.scale = function(x) {
+    if (!arguments.length) return lower48.scale();
+    lower48.scale(x);
+    alaska.scale(x * .6);
+    hawaii.scale(x);
+    puertoRico.scale(x * 1.5);
+    return albersUsa.translate(lower48.translate());
+  };
+
+  albersUsa.translate = function(x) {
+    if (!arguments.length) return lower48.translate();
+    var dz = lower48.scale() / 1000,
+        dx = x[0],
+        dy = x[1];
+    lower48.translate(x);
+    alaska.translate([dx - 400 * dz, dy + 170 * dz]);
+    hawaii.translate([dx - 190 * dz, dy + 200 * dz]);
+    puertoRico.translate([dx + 580 * dz, dy + 430 * dz]);
+    return albersUsa;
+  };
+
+  return albersUsa.scale(lower48.scale());
+};
+
+var d3_radians = Math.PI / 180;
+d3.geo.mercator = function() {
+  var scale = 500,
+      translate = [480, 250];
+
+  function mercator(coordinates) {
+    var x = (coordinates[0]) / 360,
+        y = (-180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + coordinates[1] * Math.PI / 360))) / 360;
+    return [
+      scale * x + translate[0],
+      scale * Math.max(-.5, Math.min(.5, y)) + translate[1]
+    ];
+  }
+
+  mercator.scale = function(x) {
+    if (!arguments.length) return scale;
+    scale = +x;
+    return mercator;
+  };
+
+  mercator.translate = function(x) {
+    if (!arguments.length) return translate;
+    translate = [+x[0], +x[1]];
+    return mercator;
+  };
+
+  return mercator;
+};
+/**
+ * Returns a function that, given a GeoJSON object (e.g., a feature), returns
+ * the corresponding SVG path. The function can be customized by overriding the
+ * projection. Point features are mapped to circles with a default radius of
+ * 4.5px; the radius can be specified either as a constant or a function that
+ * is evaluated per object.
+ */
+d3.geo.path = function() {
+  var pointRadius = 4.5,
+      pointCircle = d3_path_circle(pointRadius),
+      projection = d3.geo.albersUsa();
+
+  function path(d, i) {
+    if (typeof pointRadius === "function") {
+      pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
+    }
+    return d3_geo_pathType(pathTypes, d);
+  }
+
+  function project(coordinates) {
+    return projection(coordinates).join(",");
+  }
+
+  var pathTypes = {
+
+    FeatureCollection: function(f) {
+      var path = [],
+          features = f.features,
+          i = -1, // features.index
+          n = features.length;
+      while (++i < n) path.push(d3_geo_pathType(pathTypes, features[i].geometry));
+      return path.join("");
+    },
+
+    Feature: function(f) {
+      return d3_geo_pathType(pathTypes, f.geometry);
+    },
+
+    Point: function(o) {
+      return "M" + project(o.coordinates) + pointCircle;
+    },
+
+    MultiPoint: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length;
+      while (++i < n) path.push("M", project(coordinates[i]), pointCircle);
+      return path.join("");
+    },
+
+    LineString: function(o) {
+      var path = ["M"],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length;
+      while (++i < n) path.push(project(coordinates[i]), "L");
+      path.pop();
+      return path.join("");
+    },
+
+    MultiLineString: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length,
+          subcoordinates, // coordinates[i]
+          j, // subcoordinates.index
+          m; // subcoordinates.length
+      while (++i < n) {
+        subcoordinates = coordinates[i];
+        j = -1;
+        m = subcoordinates.length;
+        path.push("M");
+        while (++j < m) path.push(project(subcoordinates[j]), "L");
+        path.pop();
+      }
+      return path.join("");
+    },
+
+    Polygon: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length,
+          subcoordinates, // coordinates[i]
+          j, // subcoordinates.index
+          m; // subcoordinates.length
+      while (++i < n) {
+        subcoordinates = coordinates[i];
+        j = -1;
+        m = subcoordinates.length;
+        path.push("M");
+        while (++j < m) path.push(project(subcoordinates[j]), "L");
+        path[path.length - 1] = "Z";
+      }
+      return path.join("");
+    },
+
+    MultiPolygon: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates index
+          n = coordinates.length,
+          subcoordinates, // coordinates[i]
+          j, // subcoordinates index
+          m, // subcoordinates.length
+          subsubcoordinates, // subcoordinates[j]
+          k, // subsubcoordinates index
+          p; // subsubcoordinates.length
+      while (++i < n) {
+        subcoordinates = coordinates[i];
+        j = -1;
+        m = subcoordinates.length;
+        while (++j < m) {
+          subsubcoordinates = subcoordinates[j];
+          k = -1;
+          p = subsubcoordinates.length - 1;
+          path.push("M");
+          while (++k < p) path.push(project(subsubcoordinates[k]), "L");
+          path[path.length - 1] = "Z";
+        }
+      }
+      return path.join("");
+    },
+
+    GeometryCollection: function(o) {
+      var path = [],
+          geometries = o.geometries,
+          i = -1, // geometries index
+          n = geometries.length;
+      while (++i < n) path.push(d3_geo_pathType(pathTypes, geometries[i]));
+      return path.join("");
+    }
+
+  };
+
+  var areaTypes = {
+
+    FeatureCollection: function(f) {
+      var area = 0,
+          features = f.features,
+          i = -1, // features.index
+          n = features.length;
+      while (++i < n) area += d3_geo_pathType(areaTypes, features[i]);
+      return area;
+    },
+
+    Feature: function(f) {
+      return d3_geo_pathType(areaTypes, f.geometry);
+    },
+
+    Point: d3_geo_pathZero,
+    MultiPoint: d3_geo_pathZero,
+    LineString: d3_geo_pathZero,
+    MultiLineString: d3_geo_pathZero,
+
+    Polygon: function(o) {
+      return polygonArea(o.coordinates);
+    },
+
+    MultiPolygon: function(o) {
+      var sum = 0,
+          coordinates = o.coordinates,
+          i = -1, // coordinates index
+          n = coordinates.length;
+      while (++i < n) sum += polygonArea(coordinates[i]);
+      return sum;
+    },
+
+    GeometryCollection: function(o) {
+      var sum = 0,
+          geometries = o.geometries,
+          i = -1, // geometries index
+          n = geometries.length;
+      while (++i < n) sum += d3_geo_pathType(areaTypes, geometries[i]);
+      return sum;
+    }
+
+  };
+
+  function polygonArea(coordinates) {
+    var sum = area(coordinates[0]), // exterior ring
+        i = 0, // coordinates.index
+        n = coordinates.length;
+    while (++i < n) sum -= area(coordinates[i]); // holes
+    return sum;
+  }
+
+  function polygonCentroid(coordinates) {
+    var polygon = d3.geom.polygon(coordinates[0].map(projection)), // exterior ring
+        centroid = polygon.centroid(1),
+        x = centroid[0],
+        y = centroid[1],
+        z = Math.abs(polygon.area()),
+        i = 0, // coordinates index
+        n = coordinates.length;
+    while (++i < n) {
+      polygon = d3.geom.polygon(coordinates[i].map(projection)); // holes
+      centroid = polygon.centroid(1);
+      x -= centroid[0];
+      y -= centroid[1];
+      z -= Math.abs(polygon.area());
+    }
+    return [x, y, 6 * z]; // weighted centroid
+  }
+
+  var centroidTypes = {
+
+    // TODO FeatureCollection
+    // TODO Point
+    // TODO MultiPoint
+    // TODO LineString
+    // TODO MultiLineString
+    // TODO GeometryCollection
+
+    Feature: function(f) {
+      return d3_geo_pathType(centroidTypes, f.geometry);
+    },
+
+    Polygon: function(o) {
+      var centroid = polygonCentroid(o.coordinates);
+      return [centroid[0] / centroid[2], centroid[1] / centroid[2]];
+    },
+
+    MultiPolygon: function(o) {
+      var area = 0,
+          coordinates = o.coordinates,
+          centroid,
+          x = 0,
+          y = 0,
+          z = 0,
+          i = -1, // coordinates index
+          n = coordinates.length;
+      while (++i < n) {
+        centroid = polygonCentroid(coordinates[i]);
+        x += centroid[0];
+        y += centroid[1];
+        z += centroid[2];
+      }
+      return [x / z, y / z];
+    }
+
+  };
+
+
+  function area(coordinates) {
+    return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());
+  }
+
+  path.projection = function(x) {
+    projection = x;
+    return path;
+  };
+
+  path.area = function(d) {
+    return d3_geo_pathType(areaTypes, d);
+  };
+
+  path.centroid = function(d) {
+    return d3_geo_pathType(centroidTypes, d);
+  };
+
+  path.pointRadius = function(x) {
+    if (typeof x === "function") pointRadius = x;
+    else {
+      pointRadius = +x;
+      pointCircle = d3_path_circle(pointRadius);
+    }
+    return path;
+  };
+
+  return path;
+};
+
+function d3_path_circle(radius) {
+  return "m0," + radius
+      + "a" + radius + "," + radius + " 0 1,1 0," + (-2 * radius)
+      + "a" + radius + "," + radius + " 0 1,1 0," + (+2 * radius)
+      + "z";
+}
+
+function d3_geo_pathZero() {
+  return 0;
+}
+
+function d3_geo_pathType(types, o) {
+  return o && o.type in types ? types[o.type](o) : "";
+}
+/**
+ * Given a GeoJSON object, returns the corresponding bounding box. The bounding
+ * box is represented by a two-dimensional array: [[left, bottom], [right,
+ * top]], where left is the minimum longitude, bottom is the minimum latitude,
+ * right is maximum longitude, and top is the maximum latitude.
+ */
+d3.geo.bounds = function(feature) {
+  var left = Infinity,
+      bottom = Infinity,
+      right = -Infinity,
+      top = -Infinity;
+  d3_geo_bounds(feature, function(x, y) {
+    if (x < left) left = x;
+    if (x > right) right = x;
+    if (y < bottom) bottom = y;
+    if (y > top) top = y;
+  });
+  return [[left, bottom], [right, top]];
+};
+
+function d3_geo_bounds(o, f) {
+  if (o.type in d3_geo_boundsTypes) d3_geo_boundsTypes[o.type](o, f);
+}
+
+var d3_geo_boundsTypes = {
+  Feature: d3_geo_boundsFeature,
+  FeatureCollection: d3_geo_boundsFeatureCollection,
+  LineString: d3_geo_boundsLineString,
+  MultiLineString: d3_geo_boundsMultiLineString,
+  MultiPoint: d3_geo_boundsLineString,
+  MultiPolygon: d3_geo_boundsMultiPolygon,
+  Point: d3_geo_boundsPoint,
+  Polygon: d3_geo_boundsPolygon
+};
+
+function d3_geo_boundsFeature(o, f) {
+  d3_geo_bounds(o.geometry, f);
+}
+
+function d3_geo_boundsFeatureCollection(o, f) {
+  for (var a = o.features, i = 0, n = a.length; i < n; i++) {
+    d3_geo_bounds(a[i].geometry, f);
+  }
+}
+
+function d3_geo_boundsLineString(o, f) {
+  for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
+    f.apply(null, a[i]);
+  }
+}
+
+function d3_geo_boundsMultiLineString(o, f) {
+  for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
+    for (var b = a[i], j = 0, m = b.length; j < m; j++) {
+      f.apply(null, b[j]);
+    }
+  }
+}
+
+function d3_geo_boundsMultiPolygon(o, f) {
+  for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
+    for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {
+      f.apply(null, b[j]);
+    }
+  }
+}
+
+function d3_geo_boundsPoint(o, f) {
+  f.apply(null, o.coordinates);
+}
+
+function d3_geo_boundsPolygon(o, f) {
+  for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {
+    f.apply(null, a[i]);
+  }
+}
+})();
Index: Dev/branches/Demo/d3/d3.geo.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.geo.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.geo.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function m(a,b){for(var c=a.coordinates[0],d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function l(a,b){b.apply(null,a.coordinates)}function k(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d][0],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function j(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function i(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function h(a,b){for(var c=a.features,d=0,f=c.length;d<f;d++)e(c[d].geometry,b)}function g(a,b){e(a.geometry,b)}function e(a,b){a.type in f&&f[a.type](a,b)}function d(a,b){return b&&b.type in a?a[b.type](b):""}function c(){return 0}function b(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+ -2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}d3.geo={},d3.geo.azimuthal=function(){function j(c){var g=c[0]*a-f,j=c[1]*a,k=Math.cos(g),l=Math.sin(g),m=Math.cos(j),n=Math.sin(j),o=b=="stereographic"?1/(1+i*n+h*m*k):1,p=o*m*l,q=o*(i*m*k-h*n);return[d*p+e[0],d*q+e[1]]}var b="orthographic",c,d=200,e=[480,250],f,g,h,i;j.mode=function(a){if(!arguments.length)return b;b=a;return j},j.origin=function(b){if(!arguments.length)return c;c=b,f=c[0]*a,g=c[1]*a,h=Math.cos(g),i=Math.sin(g);return j},j.scale=function(a){if(!arguments.length)return d;d=+a;return j},j.translate=function(a){if(!arguments.length)return e;e=[+a[0],+a[1]];return j};return j.origin([0,0])},d3.geo.albers=function(){function k(){var d=a*c[0],e=a*c[1],k=a*b[1],l=Math.sin(d),m=Math.cos(d);f=a*b[0],g=.5*(l+Math.sin(e)),h=m*m+2*g*l,i=Math.sqrt(h-2*g*Math.sin(k))/g;return j}function j(b){var c=g*(a*b[0]-f),j=Math.sqrt(h-2*g*Math.sin(a*b[1]))/g;return[d*j*Math.sin(c)+e[0],d*(j*Math.cos(c)-i)+e[1]]}var b=[-98,38],c=[29.5,45.5],d=1e3,e=[480,250],f,g,h,i;j.origin=function(a){if(!arguments.length)return b;b=[+a[0],+a[1]];return k()},j.parallels=function(a){if(!arguments.length)return c;c=[+a[0],+a[1]];return k()},j.scale=function(a){if(!arguments.length)return d;d=+a;return j},j.translate=function(a){if(!arguments.length)return e;e=[+a[0],+a[1]];return j};return k()},d3.geo.albersUsa=function(){function e(e){var f=e[0],g=e[1];return(g<25?f<-100?c:d:g>50?b:a)(e)}var a=d3.geo.albers(),b=d3.geo.albers().origin([-160,60]).parallels([55,65]),c=d3.geo.albers().origin([-160,20]).parallels([8,18]),d=d3.geo.albers().origin([-60,10]).parallels([8,18]);e.scale=function(f){if(!arguments.length)return a.scale();a.scale(f),b.scale(f*.6),c.scale(f),d.scale(f*1.5);return e.translate(a.translate())},e.translate=function(f){if(!arguments.length)return a.translate();var g=a.scale()/1e3,h=f[0],i=f[1];a.translate(f),b.translate([h-400*g,i+170*g]),c.translate([h-190*g,i+200*g]),d.translate([h+580*g,i+430*g]);return e};return e.scale(a.scale())};var a=Math.PI/180;d3.geo.mercator=function(){function c(c){var d=c[0]/360,e=-180/Math.PI*Math.log(Math.tan(Math.PI/4+c[1]*Math.PI/360))/360;return[a*d+b[0],a*Math.max(-0.5,Math.min(.5,e))+b[1]]}var a=500,b=[480,250];c.scale=function(b){if(!arguments.length)return a;a=+b;return c},c.translate=function(a){if(!arguments.length)return b;b=[+a[0],+a[1]];return c};return c},d3.geo.path=function(){function n(a){return Math.abs(d3.geom.polygon(a.map(f)).area())}function l(a){var b=d3.geom.polygon(a[0].map(f)),c=b.centroid(1),d=c[0],e=c[1],g=Math.abs(b.area()),h=0,i=a.length;while(++h<i)b=d3.geom.polygon(a[h].map(f)),c=b.centroid(1),d-=c[0],e-=c[1],g-=Math.abs(b.area());return[d,e,6*g]}function k(a){var b=n(a[0]),c=0,d=a.length;while(++c<d)b-=n(a[c]);return b}function h(a){return f(a).join(",")}function g(c,f){typeof a=="function"&&(e=b(a.apply(this,arguments)));return d(i,c)}var a=4.5,e=b(a),f=d3.geo.albersUsa(),i={FeatureCollection:function(a){var b=[],c=a.features,e=-1,f=c.length;while(++e<f)b.push(d(i,c[e].geometry));return b.join("")},Feature:function(a){return d(i,a.geometry)},Point:function(a){return"M"+h(a.coordinates)+e},MultiPoint:function(a){var b=[],c=a.coordinates,d=-1,f=c.length;while(++d<f)b.push("M",h(c[d]),e);return b.join("")},LineString:function(a){var b=["M"],c=a.coordinates,d=-1,e=c.length;while(++d<e)b.push(h(c[d]),"L");b.pop();return b.join("")},MultiLineString:function(a){var b=[],c=a.coordinates,d=-1,e=c.length,f,g,i;while(++d<e){f=c[d],g=-1,i=f.length,b.push("M");while(++g<i)b.push(h(f[g]),"L");b.pop()}return b.join("")},Polygon:function(a){var b=[],c=a.coordinates,d=-1,e=c.length,f,g,i;while(++d<e){f=c[d],g=-1,i=f.length,b.push("M");while(++g<i)b.push(h(f[g]),"L");b[b.length-1]="Z"}return b.join("")},MultiPolygon:function(a){var b=[],c=a.coordinates,d=-1,e=c.length,f,g,i,j,k,l;while(++d<e){f=c[d],g=-1,i=f.length;while(++g<i){j=f[g],k=-1,l=j.length-1,b.push("M");while(++k<l)b.push(h(j[k]),"L");b[b.length-1]="Z"}}return b.join("")},GeometryCollection:function(a){var b=[],c=a.geometries,e=-1,f=c.length;while(++e<f)b.push(d(i,c[e]));return b.join("")}},j={FeatureCollection:function(a){var b=0,c=a.features,e=-1,f=c.length;while(++e<f)b+=d(j,c[e]);return b},Feature:function(a){return d(j,a.geometry)},Point:c,MultiPoint:c,LineString:c,MultiLineString:c,Polygon:function(a){return k(a.coordinates)},MultiPolygon:function(a){var b=0,c=a.coordinates,d=-1,e=c.length;while(++d<e)b+=k(c[d]);return b},GeometryCollection:function(a){var b=0,c=a.geometries,e=-1,f=c.length;while(++e<f)b+=d(j,c[e]);return b}},m={Feature:function(a){return d(m,a.geometry)},Polygon:function(a){var b=l(a.coordinates);return[b[0]/b[2],b[1]/b[2]]},MultiPolygon:function(a){var b=0,c=a.coordinates,d,e=0,f=0,g=0,h=-1,i=c.length;while(++h<i)d=l(c[h]),e+=d[0],f+=d[1],g+=d[2];return[e/g,f/g]}};g.projection=function(a){f=a;return g},g.area=function(a){return d(j,a)},g.centroid=function(a){return d(m,a)},g.pointRadius=function(c){typeof c=="function"?a=c:(a=+c,e=b(a));return g};return g},d3.geo.bounds=function(a){var b=Infinity,c=Infinity,d=-Infinity,f=-Infinity;e(a,function(a,e){a<b&&(b=a),a>d&&(d=a),e<c&&(c=e),e>f&&(f=e)});return[[b,c],[d,f]]};var f={Feature:g,FeatureCollection:h,LineString:i,MultiLineString:j,MultiPoint:i,MultiPolygon:k,Point:l,Polygon:m}})()
Index: Dev/branches/Demo/d3/d3.geom.js
===================================================================
--- Dev/branches/Demo/d3/d3.geom.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.geom.js	(revision 225)
@@ -0,0 +1,825 @@
+(function(){d3.geom = {};
+/**
+ * Computes a contour for a given input grid function using the <a
+ * href="http://en.wikipedia.org/wiki/Marching_squares">marching
+ * squares</a> algorithm. Returns the contour polygon as an array of points.
+ *
+ * @param grid a two-input function(x, y) that returns true for values
+ * inside the contour and false for values outside the contour.
+ * @param start an optional starting point [x, y] on the grid.
+ * @returns polygon [[x1, y1], [x2, y2], âŠ]
+ */
+d3.geom.contour = function(grid, start) {
+  var s = start || d3_geom_contourStart(grid), // starting point
+      c = [],    // contour polygon
+      x = s[0],  // current x position
+      y = s[1],  // current y position
+      dx = 0,    // next x direction
+      dy = 0,    // next y direction
+      pdx = NaN, // previous x direction
+      pdy = NaN, // previous y direction
+      i = 0;
+
+  do {
+    // determine marching squares index
+    i = 0;
+    if (grid(x-1, y-1)) i += 1;
+    if (grid(x,   y-1)) i += 2;
+    if (grid(x-1, y  )) i += 4;
+    if (grid(x,   y  )) i += 8;
+
+    // determine next direction
+    if (i === 6) {
+      dx = pdy === -1 ? -1 : 1;
+      dy = 0;
+    } else if (i === 9) {
+      dx = 0;
+      dy = pdx === 1 ? -1 : 1;
+    } else {
+      dx = d3_geom_contourDx[i];
+      dy = d3_geom_contourDy[i];
+    }
+
+    // update contour polygon
+    if (dx != pdx && dy != pdy) {
+      c.push([x, y]);
+      pdx = dx;
+      pdy = dy;
+    }
+
+    x += dx;
+    y += dy;
+  } while (s[0] != x || s[1] != y);
+
+  return c;
+};
+
+// lookup tables for marching directions
+var d3_geom_contourDx = [1, 0, 1, 1,-1, 0,-1, 1,0, 0,0,0,-1, 0,-1,NaN],
+    d3_geom_contourDy = [0,-1, 0, 0, 0,-1, 0, 0,1,-1,1,1, 0,-1, 0,NaN];
+
+function d3_geom_contourStart(grid) {
+  var x = 0,
+      y = 0;
+
+  // search for a starting point; begin at origin
+  // and proceed along outward-expanding diagonals
+  while (true) {
+    if (grid(x,y)) {
+      return [x,y];
+    }
+    if (x === 0) {
+      x = y + 1;
+      y = 0;
+    } else {
+      x = x - 1;
+      y = y + 1;
+    }
+  }
+}
+/**
+ * Computes the 2D convex hull of a set of points using Graham's scanning
+ * algorithm. The algorithm has been implemented as described in Cormen,
+ * Leiserson, and Rivest's Introduction to Algorithms. The running time of
+ * this algorithm is O(n log n), where n is the number of input points.
+ *
+ * @param vertices [[x1, y1], [x2, y2], âŠ]
+ * @returns polygon [[x1, y1], [x2, y2], âŠ]
+ */
+d3.geom.hull = function(vertices) {
+  if (vertices.length < 3) return [];
+
+  var len = vertices.length,
+      plen = len - 1,
+      points = [],
+      stack = [],
+      i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
+
+  // find the starting ref point: leftmost point with the minimum y coord
+  for (i=1; i<len; ++i) {
+    if (vertices[i][1] < vertices[h][1]) {
+      h = i;
+    } else if (vertices[i][1] == vertices[h][1]) {
+      h = (vertices[i][0] < vertices[h][0] ? i : h);
+    }
+  }
+
+  // calculate polar angles from ref point and sort
+  for (i=0; i<len; ++i) {
+    if (i === h) continue;
+    y1 = vertices[i][1] - vertices[h][1];
+    x1 = vertices[i][0] - vertices[h][0];
+    points.push({angle: Math.atan2(y1, x1), index: i});
+  }
+  points.sort(function(a, b) { return a.angle - b.angle; });
+
+  // toss out duplicate angles
+  a = points[0].angle;
+  v = points[0].index;
+  u = 0;
+  for (i=1; i<plen; ++i) {
+    j = points[i].index;
+    if (a == points[i].angle) {
+      // keep angle for point most distant from the reference
+      x1 = vertices[v][0] - vertices[h][0];
+      y1 = vertices[v][1] - vertices[h][1];
+      x2 = vertices[j][0] - vertices[h][0];
+      y2 = vertices[j][1] - vertices[h][1];
+      if ((x1*x1 + y1*y1) >= (x2*x2 + y2*y2)) {
+        points[i].index = -1;
+      } else {
+        points[u].index = -1;
+        a = points[i].angle;
+        u = i;
+        v = j;
+      }
+    } else {
+      a = points[i].angle;
+      u = i;
+      v = j;
+    }
+  }
+
+  // initialize the stack
+  stack.push(h);
+  for (i=0, j=0; i<2; ++j) {
+    if (points[j].index !== -1) {
+      stack.push(points[j].index);
+      i++;
+    }
+  }
+  sp = stack.length;
+
+  // do graham's scan
+  for (; j<plen; ++j) {
+    if (points[j].index === -1) continue; // skip tossed out points
+    while (!d3_geom_hullCCW(stack[sp-2], stack[sp-1], points[j].index, vertices)) {
+      --sp;
+    }
+    stack[sp++] = points[j].index;
+  }
+
+  // construct the hull
+  var poly = [];
+  for (i=0; i<sp; ++i) {
+    poly.push(vertices[stack[i]]);
+  }
+  return poly;
+}
+
+// are three points in counter-clockwise order?
+function d3_geom_hullCCW(i1, i2, i3, v) {
+  var t, a, b, c, d, e, f;
+  t = v[i1]; a = t[0]; b = t[1];
+  t = v[i2]; c = t[0]; d = t[1];
+  t = v[i3]; e = t[0]; f = t[1];
+  return ((f-b)*(c-a) - (d-b)*(e-a)) > 0;
+}
+// Note: requires coordinates to be counterclockwise and convex!
+d3.geom.polygon = function(coordinates) {
+
+  coordinates.area = function() {
+    var i = 0,
+        n = coordinates.length,
+        a = coordinates[n - 1][0] * coordinates[0][1],
+        b = coordinates[n - 1][1] * coordinates[0][0];
+    while (++i < n) {
+      a += coordinates[i - 1][0] * coordinates[i][1];
+      b += coordinates[i - 1][1] * coordinates[i][0];
+    }
+    return (b - a) * .5;
+  };
+
+  coordinates.centroid = function(k) {
+    var i = -1,
+        n = coordinates.length - 1,
+        x = 0,
+        y = 0,
+        a,
+        b,
+        c;
+    if (!arguments.length) k = 1 / (6 * coordinates.area());
+    while (++i < n) {
+      a = coordinates[i];
+      b = coordinates[i + 1];
+      c = a[0] * b[1] - b[0] * a[1];
+      x += (a[0] + b[0]) * c;
+      y += (a[1] + b[1]) * c;
+    }
+    return [x * k, y * k];
+  };
+
+  // The Sutherland-Hodgman clipping algorithm.
+  coordinates.clip = function(subject) {
+    var input,
+        i = -1,
+        n = coordinates.length,
+        j,
+        m,
+        a = coordinates[n - 1],
+        b,
+        c,
+        d;
+    while (++i < n) {
+      input = subject.slice();
+      subject.length = 0;
+      b = coordinates[i];
+      c = input[(m = input.length) - 1];
+      j = -1;
+      while (++j < m) {
+        d = input[j];
+        if (d3_geom_polygonInside(d, a, b)) {
+          if (!d3_geom_polygonInside(c, a, b)) {
+            subject.push(d3_geom_polygonIntersect(c, d, a, b));
+          }
+          subject.push(d);
+        } else if (d3_geom_polygonInside(c, a, b)) {
+          subject.push(d3_geom_polygonIntersect(c, d, a, b));
+        }
+        c = d;
+      }
+      a = b;
+    }
+    return subject;
+  };
+
+  return coordinates;
+};
+
+function d3_geom_polygonInside(p, a, b) {
+  return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
+}
+
+// Intersect two infinite lines cd and ab.
+function d3_geom_polygonIntersect(c, d, a, b) {
+  var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0],
+      y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1],
+      x13 = x1 - x3,
+      x21 = x2 - x1,
+      x43 = x4 - x3,
+      y13 = y1 - y3,
+      y21 = y2 - y1,
+      y43 = y4 - y3,
+      ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
+  return [x1 + ua * x21, y1 + ua * y21];
+}
+// Adapted from Nicolas Garcia Belmonte's JIT implementation:
+// http://blog.thejit.org/2010/02/12/voronoi-tessellation/
+// http://blog.thejit.org/assets/voronoijs/voronoi.js
+// See lib/jit/LICENSE for details.
+
+/**
+ * @param vertices [[x1, y1], [x2, y2], âŠ]
+ * @returns polygons [[[x1, y1], [x2, y2], âŠ], âŠ]
+ */
+d3.geom.voronoi = function(vertices) {
+  var polygons = vertices.map(function() { return []; });
+
+  // Note: we expect the caller to clip the polygons, if needed.
+  d3_voronoi_tessellate(vertices, function(e) {
+    var s1,
+        s2,
+        x1,
+        x2,
+        y1,
+        y2;
+    if (e.a === 1 && e.b >= 0) {
+      s1 = e.ep.r;
+      s2 = e.ep.l;
+    } else {
+      s1 = e.ep.l;
+      s2 = e.ep.r;
+    }
+    if (e.a === 1) {
+      y1 = s1 ? s1.y : -1e6;
+      x1 = e.c - e.b * y1;
+      y2 = s2 ? s2.y : 1e6;
+      x2 = e.c - e.b * y2;
+    } else {
+      x1 = s1 ? s1.x : -1e6;
+      y1 = e.c - e.a * x1;
+      x2 = s2 ? s2.x : 1e6;
+      y2 = e.c - e.a * x2;
+    }
+    var v1 = [x1, y1],
+        v2 = [x2, y2];
+    polygons[e.region.l.index].push(v1, v2);
+    polygons[e.region.r.index].push(v1, v2);
+  });
+
+  // Reconnect the polygon segments into counterclockwise loops.
+  return polygons.map(function(polygon, i) {
+    var cx = vertices[i][0],
+        cy = vertices[i][1];
+    polygon.forEach(function(v) {
+      v.angle = Math.atan2(v[0] - cx, v[1] - cy);
+    });
+    return polygon.sort(function(a, b) {
+      return a.angle - b.angle;
+    }).filter(function(d, i) {
+      return !i || (d.angle - polygon[i - 1].angle > 1e-10);
+    });
+  });
+};
+
+var d3_voronoi_opposite = {"l": "r", "r": "l"};
+
+function d3_voronoi_tessellate(vertices, callback) {
+
+  var Sites = {
+    list: vertices
+      .map(function(v, i) {
+        return {
+          index: i,
+          x: v[0],
+          y: v[1]
+        };
+      })
+      .sort(function(a, b) {
+        return a.y < b.y ? -1
+          : a.y > b.y ? 1
+          : a.x < b.x ? -1
+          : a.x > b.x ? 1
+          : 0;
+      }),
+    bottomSite: null
+  };
+
+  var EdgeList = {
+    list: [],
+    leftEnd: null,
+    rightEnd: null,
+
+    init: function() {
+      EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
+      EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
+      EdgeList.leftEnd.r = EdgeList.rightEnd;
+      EdgeList.rightEnd.l = EdgeList.leftEnd;
+      EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
+    },
+
+    createHalfEdge: function(edge, side) {
+      return {
+        edge: edge,
+        side: side,
+        vertex: null,
+        "l": null,
+        "r": null
+      };
+    },
+
+    insert: function(lb, he) {
+      he.l = lb;
+      he.r = lb.r;
+      lb.r.l = he;
+      lb.r = he;
+    },
+
+    leftBound: function(p) {
+      var he = EdgeList.leftEnd;
+      do {
+        he = he.r;
+      } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
+      he = he.l;
+      return he;
+    },
+
+    del: function(he) {
+      he.l.r = he.r;
+      he.r.l = he.l;
+      he.edge = null;
+    },
+
+    right: function(he) {
+      return he.r;
+    },
+
+    left: function(he) {
+      return he.l;
+    },
+
+    leftRegion: function(he) {
+      return he.edge == null
+          ? Sites.bottomSite
+          : he.edge.region[he.side];
+    },
+
+    rightRegion: function(he) {
+      return he.edge == null
+          ? Sites.bottomSite
+          : he.edge.region[d3_voronoi_opposite[he.side]];
+    }
+  };
+
+  var Geom = {
+
+    bisect: function(s1, s2) {
+      var newEdge = {
+        region: {"l": s1, "r": s2},
+        ep: {"l": null, "r": null}
+      };
+
+      var dx = s2.x - s1.x,
+          dy = s2.y - s1.y,
+          adx = dx > 0 ? dx : -dx,
+          ady = dy > 0 ? dy : -dy;
+
+      newEdge.c = s1.x * dx + s1.y * dy
+          + (dx * dx + dy * dy) * .5;
+
+      if (adx > ady) {
+        newEdge.a = 1;
+        newEdge.b = dy / dx;
+        newEdge.c /= dx;
+      } else {
+        newEdge.b = 1;
+        newEdge.a = dx / dy;
+        newEdge.c /= dy;
+      }
+
+      return newEdge;
+    },
+
+    intersect: function(el1, el2) {
+      var e1 = el1.edge,
+          e2 = el2.edge;
+      if (!e1 || !e2 || (e1.region.r == e2.region.r)) {
+        return null;
+      }
+      var d = (e1.a * e2.b) - (e1.b * e2.a);
+      if (Math.abs(d) < 1e-10) {
+        return null;
+      }
+      var xint = (e1.c * e2.b - e2.c * e1.b) / d,
+          yint = (e2.c * e1.a - e1.c * e2.a) / d,
+          e1r = e1.region.r,
+          e2r = e2.region.r,
+          el,
+          e;
+      if ((e1r.y < e2r.y) ||
+         (e1r.y == e2r.y && e1r.x < e2r.x)) {
+        el = el1;
+        e = e1;
+      } else {
+        el = el2;
+        e = e2;
+      }
+      var rightOfSite = (xint >= e.region.r.x);
+      if ((rightOfSite && (el.side === "l")) ||
+        (!rightOfSite && (el.side === "r"))) {
+        return null;
+      }
+      return {
+        x: xint,
+        y: yint
+      };
+    },
+
+    rightOf: function(he, p) {
+      var e = he.edge,
+          topsite = e.region.r,
+          rightOfSite = (p.x > topsite.x);
+
+      if (rightOfSite && (he.side === "l")) {
+        return 1;
+      }
+      if (!rightOfSite && (he.side === "r")) {
+        return 0;
+      }
+      if (e.a === 1) {
+        var dyp = p.y - topsite.y,
+            dxp = p.x - topsite.x,
+            fast = 0,
+            above = 0;
+
+        if ((!rightOfSite && (e.b < 0)) ||
+          (rightOfSite && (e.b >= 0))) {
+          above = fast = (dyp >= e.b * dxp);
+        } else {
+          above = ((p.x + p.y * e.b) > e.c);
+          if (e.b < 0) {
+            above = !above;
+          }
+          if (!above) {
+            fast = 1;
+          }
+        }
+        if (!fast) {
+          var dxs = topsite.x - e.region.l.x;
+          above = (e.b * (dxp * dxp - dyp * dyp)) <
+            (dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b));
+
+          if (e.b < 0) {
+            above = !above;
+          }
+        }
+      } else /* e.b == 1 */ {
+        var yl = e.c - e.a * p.x,
+            t1 = p.y - yl,
+            t2 = p.x - topsite.x,
+            t3 = yl - topsite.y;
+
+        above = (t1 * t1) > (t2 * t2 + t3 * t3);
+      }
+      return he.side === "l" ? above : !above;
+    },
+
+    endPoint: function(edge, side, site) {
+      edge.ep[side] = site;
+      if (!edge.ep[d3_voronoi_opposite[side]]) return;
+      callback(edge);
+    },
+
+    distance: function(s, t) {
+      var dx = s.x - t.x,
+          dy = s.y - t.y;
+      return Math.sqrt(dx * dx + dy * dy);
+    }
+  };
+
+  var EventQueue = {
+    list: [],
+
+    insert: function(he, site, offset) {
+      he.vertex = site;
+      he.ystar = site.y + offset;
+      for (var i=0, list=EventQueue.list, l=list.length; i<l; i++) {
+        var next = list[i];
+        if (he.ystar > next.ystar ||
+          (he.ystar == next.ystar &&
+          site.x > next.vertex.x)) {
+          continue;
+        } else {
+          break;
+        }
+      }
+      list.splice(i, 0, he);
+    },
+
+    del: function(he) {
+      for (var i=0, ls=EventQueue.list, l=ls.length; i<l && (ls[i] != he); ++i) {}
+      ls.splice(i, 1);
+    },
+
+    empty: function() { return EventQueue.list.length === 0; },
+
+    nextEvent: function(he) {
+      for (var i=0, ls=EventQueue.list, l=ls.length; i<l; ++i) {
+        if (ls[i] == he) return ls[i+1];
+      }
+      return null;
+    },
+
+    min: function() {
+      var elem = EventQueue.list[0];
+      return {
+        x: elem.vertex.x,
+        y: elem.ystar
+      };
+    },
+
+    extractMin: function() {
+      return EventQueue.list.shift();
+    }
+  };
+
+  EdgeList.init();
+  Sites.bottomSite = Sites.list.shift();
+
+  var newSite = Sites.list.shift(), newIntStar;
+  var lbnd, rbnd, llbnd, rrbnd, bisector;
+  var bot, top, temp, p, v;
+  var e, pm;
+
+  while (true) {
+    if (!EventQueue.empty()) {
+      newIntStar = EventQueue.min();
+    }
+    if (newSite && (EventQueue.empty()
+      || newSite.y < newIntStar.y
+      || (newSite.y == newIntStar.y
+      && newSite.x < newIntStar.x))) { //new site is smallest
+      lbnd = EdgeList.leftBound(newSite);
+      rbnd = EdgeList.right(lbnd);
+      bot = EdgeList.rightRegion(lbnd);
+      e = Geom.bisect(bot, newSite);
+      bisector = EdgeList.createHalfEdge(e, "l");
+      EdgeList.insert(lbnd, bisector);
+      p = Geom.intersect(lbnd, bisector);
+      if (p) {
+        EventQueue.del(lbnd);
+        EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
+      }
+      lbnd = bisector;
+      bisector = EdgeList.createHalfEdge(e, "r");
+      EdgeList.insert(lbnd, bisector);
+      p = Geom.intersect(bisector, rbnd);
+      if (p) {
+        EventQueue.insert(bisector, p, Geom.distance(p, newSite));
+      }
+      newSite = Sites.list.shift();
+    } else if (!EventQueue.empty()) { //intersection is smallest
+      lbnd = EventQueue.extractMin();
+      llbnd = EdgeList.left(lbnd);
+      rbnd = EdgeList.right(lbnd);
+      rrbnd = EdgeList.right(rbnd);
+      bot = EdgeList.leftRegion(lbnd);
+      top = EdgeList.rightRegion(rbnd);
+      v = lbnd.vertex;
+      Geom.endPoint(lbnd.edge, lbnd.side, v);
+      Geom.endPoint(rbnd.edge, rbnd.side, v);
+      EdgeList.del(lbnd);
+      EventQueue.del(rbnd);
+      EdgeList.del(rbnd);
+      pm = "l";
+      if (bot.y > top.y) {
+        temp = bot;
+        bot = top;
+        top = temp;
+        pm = "r";
+      }
+      e = Geom.bisect(bot, top);
+      bisector = EdgeList.createHalfEdge(e, pm);
+      EdgeList.insert(llbnd, bisector);
+      Geom.endPoint(e, d3_voronoi_opposite[pm], v);
+      p = Geom.intersect(llbnd, bisector);
+      if (p) {
+        EventQueue.del(llbnd);
+        EventQueue.insert(llbnd, p, Geom.distance(p, bot));
+      }
+      p = Geom.intersect(bisector, rrbnd);
+      if (p) {
+        EventQueue.insert(bisector, p, Geom.distance(p, bot));
+      }
+    } else {
+      break;
+    }
+  }//end while
+
+  for (lbnd = EdgeList.right(EdgeList.leftEnd);
+      lbnd != EdgeList.rightEnd;
+      lbnd = EdgeList.right(lbnd)) {
+    callback(lbnd.edge);
+  }
+}
+/**
+* @param vertices [[x1, y1], [x2, y2], âŠ]
+* @returns triangles [[[x1, y1], [x2, y2], [x3, y3]], âŠ]
+ */
+d3.geom.delaunay = function(vertices) {
+  var edges = vertices.map(function() { return []; }),
+      triangles = [];
+
+  // Use the Voronoi tessellation to determine Delaunay edges.
+  d3_voronoi_tessellate(vertices, function(e) {
+    edges[e.region.l.index].push(vertices[e.region.r.index]);
+  });
+
+  // Reconnect the edges into counterclockwise triangles.
+  edges.forEach(function(edge, i) {
+    var v = vertices[i],
+        cx = v[0],
+        cy = v[1];
+    edge.forEach(function(v) {
+      v.angle = Math.atan2(v[0] - cx, v[1] - cy);
+    });
+    edge.sort(function(a, b) {
+      return a.angle - b.angle;
+    });
+    for (var j = 0, m = edge.length - 1; j < m; j++) {
+      triangles.push([v, edge[j], edge[j + 1]]);
+    }
+  });
+
+  return triangles;
+};
+// Constructs a new quadtree for the specified array of points. A quadtree is a
+// two-dimensional recursive spatial subdivision. This implementation uses
+// square partitions, dividing each square into four equally-sized squares. Each
+// point exists in a unique node; if multiple points are in the same position,
+// some points may be stored on internal nodes rather than leaf nodes. Quadtrees
+// can be used to accelerate various spatial operations, such as the Barnes-Hut
+// approximation for computing n-body forces, or collision detection.
+d3.geom.quadtree = function(points, x1, y1, x2, y2) {
+  var p,
+      i = -1,
+      n = points.length;
+
+  // Type conversion for deprecated API.
+  if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);
+
+  // Allow bounds to be specified explicitly.
+  if (arguments.length < 5) {
+    if (arguments.length === 3) {
+      y2 = x2 = y1;
+      y1 = x1;
+    } else {
+      x1 = y1 = Infinity;
+      x2 = y2 = -Infinity;
+
+      // Compute bounds.
+      while (++i < n) {
+        p = points[i];
+        if (p.x < x1) x1 = p.x;
+        if (p.y < y1) y1 = p.y;
+        if (p.x > x2) x2 = p.x;
+        if (p.y > y2) y2 = p.y;
+      }
+
+      // Squarify the bounds.
+      var dx = x2 - x1,
+          dy = y2 - y1;
+      if (dx > dy) y2 = y1 + dx;
+      else x2 = x1 + dy;
+    }
+  }
+
+  // Recursively inserts the specified point p at the node n or one of its
+  // descendants. The bounds are defined by [x1, x2] and [y1, y2].
+  function insert(n, p, x1, y1, x2, y2) {
+    if (isNaN(p.x) || isNaN(p.y)) return; // ignore invalid points
+    if (n.leaf) {
+      var v = n.point;
+      if (v) {
+        // If the point at this leaf node is at the same position as the new
+        // point we are adding, we leave the point associated with the
+        // internal node while adding the new point to a child node. This
+        // avoids infinite recursion.
+        if ((Math.abs(v.x - p.x) + Math.abs(v.y - p.y)) < .01) {
+          insertChild(n, p, x1, y1, x2, y2);
+        } else {
+          n.point = null;
+          insertChild(n, v, x1, y1, x2, y2);
+          insertChild(n, p, x1, y1, x2, y2);
+        }
+      } else {
+        n.point = p;
+      }
+    } else {
+      insertChild(n, p, x1, y1, x2, y2);
+    }
+  }
+
+  // Recursively inserts the specified point p into a descendant of node n. The
+  // bounds are defined by [x1, x2] and [y1, y2].
+  function insertChild(n, p, x1, y1, x2, y2) {
+    // Compute the split point, and the quadrant in which to insert p.
+    var sx = (x1 + x2) * .5,
+        sy = (y1 + y2) * .5,
+        right = p.x >= sx,
+        bottom = p.y >= sy,
+        i = (bottom << 1) + right;
+
+    // Recursively insert into the child node.
+    n.leaf = false;
+    n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
+
+    // Update the bounds as we recurse.
+    if (right) x1 = sx; else x2 = sx;
+    if (bottom) y1 = sy; else y2 = sy;
+    insert(n, p, x1, y1, x2, y2);
+  }
+
+  // Create the root node.
+  var root = d3_geom_quadtreeNode();
+
+  root.add = function(p) {
+    insert(root, p, x1, y1, x2, y2);
+  };
+
+  root.visit = function(f) {
+    d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
+  };
+
+  // Insert all points.
+  points.forEach(root.add);
+  return root;
+};
+
+function d3_geom_quadtreeNode() {
+  return {
+    leaf: true,
+    nodes: [],
+    point: null
+  };
+}
+
+function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
+  if (!f(node, x1, y1, x2, y2)) {
+    var sx = (x1 + x2) * .5,
+        sy = (y1 + y2) * .5,
+        children = node.nodes;
+    if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
+    if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
+    if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
+    if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
+  }
+}
+
+function d3_geom_quadtreePoint(p) {
+  return {
+    x: p[0],
+    y: p[1]
+  };
+}
+})();
Index: Dev/branches/Demo/d3/d3.geom.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.geom.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.geom.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function k(a){return{x:a[0],y:a[1]}}function j(a,b,c,d,e,f){if(!a(b,c,d,e,f)){var g=(c+e)*.5,h=(d+f)*.5,i=b.nodes;i[0]&&j(a,i[0],c,d,g,h),i[1]&&j(a,i[1],g,d,e,h),i[2]&&j(a,i[2],c,h,g,f),i[3]&&j(a,i[3],g,h,e,f)}}function i(){return{leaf:!0,nodes:[],point:null}}function h(a,b){var c={list:a.map(function(a,b){return{index:b,x:a[0],y:a[1]}}).sort(function(a,b){return a.y<b.y?-1:a.y>b.y?1:a.x<b.x?-1:a.x>b.x?1:0}),bottomSite:null},d={list:[],leftEnd:null,rightEnd:null,init:function(){d.leftEnd=d.createHalfEdge(null,"l"),d.rightEnd=d.createHalfEdge(null,"l"),d.leftEnd.r=d.rightEnd,d.rightEnd.l=d.leftEnd,d.list.unshift(d.leftEnd,d.rightEnd)},createHalfEdge:function(a,b){return{edge:a,side:b,vertex:null,l:null,r:null}},insert:function(a,b){b.l=a,b.r=a.r,a.r.l=b,a.r=b},leftBound:function(a){var b=d.leftEnd;do b=b.r;while(b!=d.rightEnd&&e.rightOf(b,a));b=b.l;return b},del:function(a){a.l.r=a.r,a.r.l=a.l,a.edge=null},right:function(a){return a.r},left:function(a){return a.l},leftRegion:function(a){return a.edge==null?c.bottomSite:a.edge.region[a.side]},rightRegion:function(a){return a.edge==null?c.bottomSite:a.edge.region[g[a.side]]}},e={bisect:function(a,b){var c={region:{l:a,r:b},ep:{l:null,r:null}},d=b.x-a.x,e=b.y-a.y,f=d>0?d:-d,g=e>0?e:-e;c.c=a.x*d+a.y*e+(d*d+e*e)*.5,f>g?(c.a=1,c.b=e/d,c.c/=d):(c.b=1,c.a=d/e,c.c/=e);return c},intersect:function(a,b){var c=a.edge,d=b.edge;if(!c||!d||c.region.r==d.region.r)return null;var e=c.a*d.b-c.b*d.a;if(Math.abs(e)<1e-10)return null;var f=(c.c*d.b-d.c*c.b)/e,g=(d.c*c.a-c.c*d.a)/e,h=c.region.r,i=d.region.r,j,k;h.y<i.y||h.y==i.y&&h.x<i.x?(j=a,k=c):(j=b,k=d);var l=f>=k.region.r.x;if(l&&j.side==="l"||!l&&j.side==="r")return null;return{x:f,y:g}},rightOf:function(a,b){var c=a.edge,d=c.region.r,e=b.x>d.x;if(e&&a.side==="l")return 1;if(!e&&a.side==="r")return 0;if(c.a===1){var f=b.y-d.y,g=b.x-d.x,h=0,i=0;!e&&c.b<0||e&&c.b>=0?i=h=f>=c.b*g:(i=b.x+b.y*c.b>c.c,c.b<0&&(i=!i),i||(h=1));if(!h){var j=d.x-c.region.l.x;i=c.b*(g*g-f*f)<j*f*(1+2*g/j+c.b*c.b),c.b<0&&(i=!i)}}else{var k=c.c-c.a*b.x,l=b.y-k,m=b.x-d.x,n=k-d.y;i=l*l>m*m+n*n}return a.side==="l"?i:!i},endPoint:function(a,c,d){a.ep[c]=d;!a.ep[g[c]]||b(a)},distance:function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)}},f={list:[],insert:function(a,b,c){a.vertex=b,a.ystar=b.y+c;for(var d=0,e=f.list,g=e.length;d<g;d++){var h=e[d];if(a.ystar>h.ystar||a.ystar==h.ystar&&b.x>h.vertex.x)continue;break}e.splice(d,0,a)},del:function(a){for(var b=0,c=f.list,d=c.length;b<d&&c[b]!=a;++b);c.splice(b,1)},empty:function(){return f.list.length===0},nextEvent:function(a){for(var b=0,c=f.list,d=c.length;b<d;++b)if(c[b]==a)return c[b+1];return null},min:function(){var a=f.list[0];return{x:a.vertex.x,y:a.ystar}},extractMin:function(){return f.list.shift()}};d.init(),c.bottomSite=c.list.shift();var h=c.list.shift(),i,j,k,l,m,n,o,p,q,r,s,t,u;for(;;){f.empty()||(i=f.min());if(h&&(f.empty()||h.y<i.y||h.y==i.y&&h.x<i.x))j=d.leftBound(h),k=d.right(j),o=d.rightRegion(j),t=e.bisect(o,h),n=d.createHalfEdge(t,"l"),d.insert(j,n),r=e.intersect(j,n),r&&(f.del(j),f.insert(j,r,e.distance(r,h))),j=n,n=d.createHalfEdge(t,"r"),d.insert(j,n),r=e.intersect(n,k),r&&f.insert(n,r,e.distance(r,h)),h=c.list.shift();else if(!f.empty())j=f.extractMin(),l=d.left(j),k=d.right(j),m=d.right(k),o=d.leftRegion(j),p=d.rightRegion(k),s=j.vertex,e.endPoint(j.edge,j.side,s),e.endPoint(k.edge,k.side,s),d.del(j),f.del(k),d.del(k),u="l",o.y>p.y&&(q=o,o=p,p=q,u="r"),t=e.bisect(o,p),n=d.createHalfEdge(t,u),d.insert(l,n),e.endPoint(t,g[u],s),r=e.intersect(l,n),r&&(f.del(l),f.insert(l,r,e.distance(r,o))),r=e.intersect(n,m),r&&f.insert(n,r,e.distance(r,o));else break}for(j=d.right(d.leftEnd);j!=d.rightEnd;j=d.right(j))b(j.edge)}function f(a,b,c,d){var e=a[0],f=b[0],g=c[0],h=d[0],i=a[1],j=b[1],k=c[1],l=d[1],m=e-g,n=f-e,o=h-g,p=i-k,q=j-i,r=l-k,s=(o*p-r*m)/(r*n-o*q);return[e+s*n,i+s*q]}function e(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function d(a,b,c,d){var e,f,g,h,i,j,k;e=d[a],f=e[0],g=e[1],e=d[b],h=e[0],i=e[1],e=d[c],j=e[0],k=e[1];return(k-g)*(h-f)-(i-g)*(j-f)>0}function c(a){var b=0,c=0;for(;;){if(a(b,c))return[b,c];b===0?(b=c+1,c=0):(b=b-1,c=c+1)}}d3.geom={},d3.geom.contour=function(d,e){var f=e||c(d),g=[],h=f[0],i=f[1],j=0,k=0,l=NaN,m=NaN,n=0;do n=0,d(h-1,i-1)&&(n+=1),d(h,i-1)&&(n+=2),d(h-1,i)&&(n+=4),d(h,i)&&(n+=8),n===6?(j=m===-1?-1:1,k=0):n===9?(j=0,k=l===1?-1:1):(j=a[n],k=b[n]),j!=l&&k!=m&&(g.push([h,i]),l=j,m=k),h+=j,i+=k;while(f[0]!=h||f[1]!=i);return g};var a=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],b=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(a){if(a.length<3)return[];var b=a.length,c=b-1,e=[],f=[],g,h,i=0,j,k,l,m,n,o,p,q;for(g=1;g<b;++g)a[g][1]<a[i][1]?i=g:a[g][1]==a[i][1]&&(i=a[g][0]<a[i][0]?g:i);for(g=0;g<b;++g){if(g===i)continue;k=a[g][1]-a[i][1],j=a[g][0]-a[i][0],e.push({angle:Math.atan2(k,j),index:g})}e.sort(function(a,b){return a.angle-b.angle}),p=e[0].angle,o=e[0].index,n=0;for(g=1;g<c;++g)h=e[g].index,p==e[g].angle?(j=a[o][0]-a[i][0],k=a[o][1]-a[i][1],l=a[h][0]-a[i][0],m=a[h][1]-a[i][1],j*j+k*k>=l*l+m*m?e[g].index=-1:(e[n].index=-1,p=e[g].angle,n=g,o=h)):(p=e[g].angle,n=g,o=h);f.push(i);for(g=0,h=0;g<2;++h)e[h].index!==-1&&(f.push(e[h].index),g++);q=f.length;for(;h<c;++h){if(e[h].index===-1)continue;while(!d(f[q-2],f[q-1],e[h].index,a))--q;f[q++]=e[h].index}var r=[];for(g=0;g<q;++g)r.push(a[f[g]]);return r},d3.geom.polygon=function(a){a.area=function(){var b=0,c=a.length,d=a[c-1][0]*a[0][1],e=a[c-1][1]*a[0][0];while(++b<c)d+=a[b-1][0]*a[b][1],e+=a[b-1][1]*a[b][0];return(e-d)*.5},a.centroid=function(b){var c=-1,d=a.length-1,e=0,f=0,g,h,i;arguments.length||(b=1/(6*a.area()));while(++c<d)g=a[c],h=a[c+1],i=g[0]*h[1]-h[0]*g[1],e+=(g[0]+h[0])*i,f+=(g[1]+h[1])*i;return[e*b,f*b]},a.clip=function(b){var c,d=-1,g=a.length,h,i,j=a[g-1],k,l,m;while(++d<g){c=b.slice(),b.length=0,k=a[d],l=c[(i=c.length)-1],h=-1;while(++h<i)m=c[h],e(m,j,k)?(e(l,j,k)||b.push(f(l,m,j,k)),b.push(m)):e(l,j,k)&&b.push(f(l,m,j,k)),l=m;j=k}return b};return a},d3.geom.voronoi=function(a){var b=a.map(function(){return[]});h(a,function(a){var c,d,e,f,g,h;a.a===1&&a.b>=0?(c=a.ep.r,d=a.ep.l):(c=a.ep.l,d=a.ep.r),a.a===1?(g=c?c.y:-1e6,e=a.c-a.b*g,h=d?d.y:1e6,f=a.c-a.b*h):(e=c?c.x:-1e6,g=a.c-a.a*e,f=d?d.x:1e6,h=a.c-a.a*f);var i=[e,g],j=[f,h];b[a.region.l.index].push(i,j),b[a.region.r.index].push(i,j)});return b.map(function(b,c){var d=a[c][0],e=a[c][1];b.forEach(function(a){a.angle=Math.atan2(a[0]-d,a[1]-e)});return b.sort(function(a,b){return a.angle-b.angle}).filter(function(a,c){return!c||a.angle-b[c-1].angle>1e-10})})};var g={l:"r",r:"l"};d3.geom.delaunay=function(a){var b=a.map(function(){return[]}),c=[];h(a,function(c){b[c.region.l.index].push(a[c.region.r.index])}),b.forEach(function(b,d){var e=a[d],f=e[0],g=e[1];b.forEach(function(a){a.angle=Math.atan2(a[0]-f,a[1]-g)}),b.sort(function(a,b){return a.angle-b.angle});for(var h=0,i=b.length-1;h<i;h++)c.push([e,b[h],b[h+1]])});return c},d3.geom.quadtree=function(a,b,c,d,e){function o(a,b,c,d,e,f){var g=(c+e)*.5,h=(d+f)*.5,j=b.x>=g,k=b.y>=h,l=(k<<1)+j;a.leaf=!1,a=a.nodes[l]||(a.nodes[l]=i()),j?c=g:e=g,k?d=h:f=h,n(a,b,c,d,e,f)}function n(a,b,c,d,e,f){if(!isNaN(b.x)&&!isNaN(b.y))if(a.leaf){var g=a.point;g?Math.abs(g.x-b.x)+Math.abs(g.y-b.y)<.01?o(a,b,c,d,e,f):(a.point=null,o(a,g,c,d,e,f),o(a,b,c,d,e,f)):a.point=b}else o(a,b,c,d,e,f)}var f,g=-1,h=a.length;h&&isNaN(a[0].x)&&(a=a.map(k));if(arguments.length<5)if(arguments.length===3)e=d=c,c=b;else{b=c=Infinity,d=e=-Infinity;while(++g<h)f=a[g],f.x<b&&(b=f.x),f.y<c&&(c=f.y),f.x>d&&(d=f.x),f.y>e&&(e=f.y);var l=d-b,m=e-c;l>m?e=c+l:d=b+m}var p=i();p.add=function(a){n(p,a,b,c,d,e)},p.visit=function(a){j(a,p,b,c,d,e)},a.forEach(p.add);return p}})()
Index: Dev/branches/Demo/d3/d3.js
===================================================================
--- Dev/branches/Demo/d3/d3.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.js	(revision 225)
@@ -0,0 +1,3592 @@
+(function(){d3 = {version: "1.29.1"}; // semver
+if (!Date.now) Date.now = function() {
+  return +new Date;
+};
+if (!Object.create) Object.create = function(o) {
+  /** @constructor */ function f() {}
+  f.prototype = o;
+  return new f;
+};
+var d3_array = d3_arraySlice; // conversion for NodeLists
+
+function d3_arrayCopy(psuedoarray) {
+  var i = -1, n = psuedoarray.length, array = [];
+  while (++i < n) array.push(psuedoarray[i]);
+  return array;
+}
+
+function d3_arraySlice(psuedoarray) {
+  return Array.prototype.slice.call(psuedoarray);
+}
+
+try {
+  d3_array(document.documentElement.childNodes)[0].nodeType;
+} catch(e) {
+  d3_array = d3_arrayCopy;
+}
+d3.functor = function(v) {
+  return typeof v === "function" ? v : function() { return v; };
+};
+// A getter-setter method that preserves the appropriate `this` context.
+d3.rebind = function(object, method) {
+  return function() {
+    var x = method.apply(object, arguments);
+    return arguments.length ? object : x;
+  };
+};
+d3.ascending = function(a, b) {
+  return a < b ? -1 : a > b ? 1 : 0;
+};
+d3.descending = function(a, b) {
+  return b < a ? -1 : b > a ? 1 : 0;
+};
+d3.min = function(array, f) {
+  var i = -1,
+      n = array.length,
+      a,
+      b;
+  if (arguments.length === 1) {
+    while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = array[i]) != null && a > b) a = b;
+  } else {
+    while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
+  }
+  return a;
+};
+d3.max = function(array, f) {
+  var i = -1,
+      n = array.length,
+      a,
+      b;
+  if (arguments.length === 1) {
+    while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = array[i]) != null && b > a) a = b;
+  } else {
+    while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
+  }
+  return a;
+};
+d3.sum = function(array, f) {
+  var s = 0,
+      n = array.length,
+      a,
+      i = -1;
+
+  if (arguments.length === 1) {
+    while (++i < n) if (!isNaN(a = +array[i])) s += a;
+  } else {
+    while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
+  }
+
+  return s;
+};
+// R-7 per <http://en.wikipedia.org/wiki/Quantile>
+d3.quantile = function(values, p) {
+  var H = (values.length - 1) * p + 1,
+      h = Math.floor(H),
+      v = values[h - 1],
+      e = H - h;
+  return e ? v + e * (values[h] - v) : v;
+};
+d3.zip = function() {
+  if (!(n = arguments.length)) return [];
+  for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m;) {
+    for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n;) {
+      zip[j] = arguments[j][i];
+    }
+  }
+  return zips;
+};
+
+function d3_zipLength(d) {
+  return d.length;
+}
+// Locate the insertion point for x in a to maintain sorted order. The
+// arguments lo and hi may be used to specify a subset of the array which should
+// be considered; by default the entire array is used. If x is already present
+// in a, the insertion point will be before (to the left of) any existing
+// entries. The return value is suitable for use as the first argument to
+// `array.splice` assuming that a is already sorted.
+//
+// The returned insertion point i partitions the array a into two halves so that
+// all v < x for v in a[lo:i] for the left side and all v >= x for v in a[i:hi]
+// for the right side.
+d3.bisectLeft = function(a, x, lo, hi) {
+  if (arguments.length < 3) lo = 0;
+  if (arguments.length < 4) hi = a.length;
+  while (lo < hi) {
+    var mid = (lo + hi) >> 1;
+    if (a[mid] < x) lo = mid + 1;
+    else hi = mid;
+  }
+  return lo;
+};
+
+// Similar to bisectLeft, but returns an insertion point which comes after (to
+// the right of) any existing entries of x in a.
+//
+// The returned insertion point i partitions the array into two halves so that
+// all v <= x for v in a[lo:i] for the left side and all v > x for v in a[i:hi]
+// for the right side.
+d3.bisect =
+d3.bisectRight = function(a, x, lo, hi) {
+  if (arguments.length < 3) lo = 0;
+  if (arguments.length < 4) hi = a.length;
+  while (lo < hi) {
+    var mid = (lo + hi) >> 1;
+    if (x < a[mid]) hi = mid;
+    else lo = mid + 1;
+  }
+  return lo;
+};
+d3.first = function(array, f) {
+  var i = 0,
+      n = array.length,
+      a = array[0],
+      b;
+  if (arguments.length === 1) f = d3.ascending;
+  while (++i < n) {
+    if (f.call(array, a, b = array[i]) > 0) {
+      a = b;
+    }
+  }
+  return a;
+};
+d3.last = function(array, f) {
+  var i = 0,
+      n = array.length,
+      a = array[0],
+      b;
+  if (arguments.length === 1) f = d3.ascending;
+  while (++i < n) {
+    if (f.call(array, a, b = array[i]) <= 0) {
+      a = b;
+    }
+  }
+  return a;
+};
+d3.nest = function() {
+  var nest = {},
+      keys = [],
+      sortKeys = [],
+      sortValues,
+      rollup;
+
+  function map(array, depth) {
+    if (depth >= keys.length) return rollup
+        ? rollup.call(nest, array) : (sortValues
+        ? array.sort(sortValues)
+        : array);
+
+    var i = -1,
+        n = array.length,
+        key = keys[depth++],
+        keyValue,
+        object,
+        o = {};
+
+    while (++i < n) {
+      if ((keyValue = key(object = array[i])) in o) {
+        o[keyValue].push(object);
+      } else {
+        o[keyValue] = [object];
+      }
+    }
+
+    for (keyValue in o) {
+      o[keyValue] = map(o[keyValue], depth);
+    }
+
+    return o;
+  }
+
+  function entries(map, depth) {
+    if (depth >= keys.length) return map;
+
+    var a = [],
+        sortKey = sortKeys[depth++],
+        key;
+
+    for (key in map) {
+      a.push({key: key, values: entries(map[key], depth)});
+    }
+
+    if (sortKey) a.sort(function(a, b) {
+      return sortKey(a.key, b.key);
+    });
+
+    return a;
+  }
+
+  nest.map = function(array) {
+    return map(array, 0);
+  };
+
+  nest.entries = function(array) {
+    return entries(map(array, 0), 0);
+  };
+
+  nest.key = function(d) {
+    keys.push(d);
+    return nest;
+  };
+
+  // Specifies the order for the most-recently specified key.
+  // Note: only applies to entries. Map keys are unordered!
+  nest.sortKeys = function(order) {
+    sortKeys[keys.length - 1] = order;
+    return nest;
+  };
+
+  // Specifies the order for leaf values.
+  // Applies to both maps and entries array.
+  nest.sortValues = function(order) {
+    sortValues = order;
+    return nest;
+  };
+
+  nest.rollup = function(f) {
+    rollup = f;
+    return nest;
+  };
+
+  return nest;
+};
+d3.keys = function(map) {
+  var keys = [];
+  for (var key in map) keys.push(key);
+  return keys;
+};
+d3.values = function(map) {
+  var values = [];
+  for (var key in map) values.push(map[key]);
+  return values;
+};
+d3.entries = function(map) {
+  var entries = [];
+  for (var key in map) entries.push({key: key, value: map[key]});
+  return entries;
+};
+d3.permute = function(array, indexes) {
+  var permutes = [],
+      i = -1,
+      n = indexes.length;
+  while (++i < n) permutes[i] = array[indexes[i]];
+  return permutes;
+};
+d3.merge = function(arrays) {
+  return Array.prototype.concat.apply([], arrays);
+};
+d3.split = function(array, f) {
+  var arrays = [],
+      values = [],
+      value,
+      i = -1,
+      n = array.length;
+  if (arguments.length < 2) f = d3_splitter;
+  while (++i < n) {
+    if (f.call(values, value = array[i], i)) {
+      values = [];
+    } else {
+      if (!values.length) arrays.push(values);
+      values.push(value);
+    }
+  }
+  return arrays;
+};
+
+function d3_splitter(d) {
+  return d == null;
+}
+function d3_collapse(s) {
+  return s.replace(/(^\s+)|(\s+$)/g, "").replace(/\s+/g, " ");
+}
+//
+// Note: assigning to the arguments array simultaneously changes the value of
+// the corresponding argument!
+//
+// TODO The `this` argument probably shouldn't be the first argument to the
+// callback, anyway, since it's redundant. However, that will require a major
+// version bump due to backwards compatibility, so I'm not changing it right
+// away.
+//
+function d3_call(callback) {
+  callback.apply(this, (arguments[0] = this, arguments));
+  return this;
+}
+/**
+ * @param {number} start
+ * @param {number=} stop
+ * @param {number=} step
+ */
+d3.range = function(start, stop, step) {
+  if (arguments.length === 1) { stop = start; start = 0; }
+  if (step == null) step = 1;
+  if ((stop - start) / step == Infinity) throw new Error("infinite range");
+  var range = [],
+       i = -1,
+       j;
+  if (step < 0) while ((j = start + step * ++i) > stop) range.push(j);
+  else while ((j = start + step * ++i) < stop) range.push(j);
+  return range;
+};
+d3.requote = function(s) {
+  return s.replace(d3_requote_re, "\\$&");
+};
+
+var d3_requote_re = /[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;
+d3.round = function(x, n) {
+  return n
+      ? Math.round(x * Math.pow(10, n)) * Math.pow(10, -n)
+      : Math.round(x);
+};
+d3.xhr = function(url, mime, callback) {
+  var req = new XMLHttpRequest;
+  if (arguments.length < 3) callback = mime;
+  else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
+  req.open("GET", url, true);
+  req.onreadystatechange = function() {
+    if (req.readyState === 4) callback(req.status < 300 ? req : null);
+  };
+  req.send(null);
+};
+d3.text = function(url, mime, callback) {
+  function ready(req) {
+    callback(req && req.responseText);
+  }
+  if (arguments.length < 3) {
+    callback = mime;
+    mime = null;
+  }
+  d3.xhr(url, mime, ready);
+};
+d3.json = function(url, callback) {
+  d3.text(url, "application/json", function(text) {
+    callback(text ? JSON.parse(text) : null);
+  });
+};
+d3.html = function(url, callback) {
+  d3.text(url, "text/html", function(text) {
+    if (text != null) { // Treat empty string as valid HTML.
+      var range = document.createRange();
+      range.selectNode(document.body);
+      text = range.createContextualFragment(text);
+    }
+    callback(text);
+  });
+};
+d3.xml = function(url, mime, callback) {
+  function ready(req) {
+    callback(req && req.responseXML);
+  }
+  if (arguments.length < 3) {
+    callback = mime;
+    mime = null;
+  }
+  d3.xhr(url, mime, ready);
+};
+d3.ns = {
+
+  prefix: {
+    svg: "http://www.w3.org/2000/svg",
+    xhtml: "http://www.w3.org/1999/xhtml",
+    xlink: "http://www.w3.org/1999/xlink",
+    xml: "http://www.w3.org/XML/1998/namespace",
+    xmlns: "http://www.w3.org/2000/xmlns/"
+  },
+
+  qualify: function(name) {
+    var i = name.indexOf(":");
+    return i < 0 ? name : {
+      space: d3.ns.prefix[name.substring(0, i)],
+      local: name.substring(i + 1)
+    };
+  }
+
+};
+/** @param {...string} types */
+d3.dispatch = function(types) {
+  var dispatch = {},
+      type;
+  for (var i = 0, n = arguments.length; i < n; i++) {
+    type = arguments[i];
+    dispatch[type] = d3_dispatch(type);
+  }
+  return dispatch;
+};
+
+function d3_dispatch(type) {
+  var dispatch = {},
+      listeners = [];
+
+  dispatch.add = function(listener) {
+    for (var i = 0; i < listeners.length; i++) {
+      if (listeners[i].listener == listener) return dispatch; // already registered
+    }
+    listeners.push({listener: listener, on: true});
+    return dispatch;
+  };
+
+  dispatch.remove = function(listener) {
+    for (var i = 0; i < listeners.length; i++) {
+      var l = listeners[i];
+      if (l.listener == listener) {
+        l.on = false;
+        listeners = listeners.slice(0, i).concat(listeners.slice(i + 1));
+        break;
+      }
+    }
+    return dispatch;
+  };
+
+  dispatch.dispatch = function() {
+    var ls = listeners; // defensive reference
+    for (var i = 0, n = ls.length; i < n; i++) {
+      var l = ls[i];
+      if (l.on) l.listener.apply(this, arguments);
+    }
+  };
+
+  return dispatch;
+};
+// TODO align
+d3.format = function(specifier) {
+  var match = d3_format_re.exec(specifier),
+      fill = match[1] || " ",
+      sign = match[3] || "",
+      zfill = match[5],
+      width = +match[6],
+      comma = match[7],
+      precision = match[8],
+      type = match[9],
+      percentage = false,
+      integer = false;
+
+  if (precision) precision = precision.substring(1);
+
+  if (zfill) {
+    fill = "0"; // TODO align = "=";
+    if (comma) width -= Math.floor((width - 1) / 4);
+  }
+
+  switch (type) {
+    case "n": comma = true; type = "g"; break;
+    case "%": percentage = true; type = "f"; break;
+    case "p": percentage = true; type = "r"; break;
+    case "d": integer = true; precision = "0"; break;
+  }
+
+  type = d3_format_types[type] || d3_format_typeDefault;
+
+  return function(value) {
+    var number = percentage ? value * 100 : +value,
+        negative = (number < 0) && (number = -number) ? "\u2212" : sign;
+
+    // Return the empty string for floats formatted as ints.
+    if (integer && (number % 1)) return "";
+
+    // Convert the input value to the desired precision.
+    value = type(number, precision);
+
+    // If the fill character is 0, the sign and group is applied after the fill.
+    if (zfill) {
+      var length = value.length + negative.length;
+      if (length < width) value = new Array(width - length + 1).join(fill) + value;
+      if (comma) value = d3_format_group(value);
+      value = negative + value;
+    }
+
+    // Otherwise (e.g., space-filling), the sign and group is applied before.
+    else {
+      if (comma) value = d3_format_group(value);
+      value = negative + value;
+      var length = value.length;
+      if (length < width) value = new Array(width - length + 1).join(fill) + value;
+    }
+    if (percentage) value += "%";
+
+    return value;
+  };
+};
+
+// [[fill]align][sign][#][0][width][,][.precision][type]
+var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
+
+var d3_format_types = {
+  g: function(x, p) { return x.toPrecision(p); },
+  e: function(x, p) { return x.toExponential(p); },
+  f: function(x, p) { return x.toFixed(p); },
+  r: function(x, p) {
+    var n = 1 + Math.floor(1e-15 + Math.log(x) / Math.LN10);
+    return d3.round(x, p - n).toFixed(Math.max(0, p - n));
+  }
+};
+
+function d3_format_typeDefault(x) {
+  return x + "";
+}
+
+// Apply comma grouping for thousands.
+function d3_format_group(value) {
+  var i = value.lastIndexOf("."),
+      f = i >= 0 ? value.substring(i) : (i = value.length, ""),
+      t = [];
+  while (i > 0) t.push(value.substring(i -= 3, i + 3));
+  return t.reverse().join(",") + f;
+}
+/*
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the author nor the names of contributors may be used to
+ *   endorse or promote products derived from this software without specific
+ *   prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var d3_ease_quad = d3_ease_poly(2),
+    d3_ease_cubic = d3_ease_poly(3);
+
+var d3_ease = {
+  linear: function() { return d3_ease_linear; },
+  poly: d3_ease_poly,
+  quad: function() { return d3_ease_quad; },
+  cubic: function() { return d3_ease_cubic; },
+  sin: function() { return d3_ease_sin; },
+  exp: function() { return d3_ease_exp; },
+  circle: function() { return d3_ease_circle; },
+  elastic: d3_ease_elastic,
+  back: d3_ease_back,
+  bounce: function() { return d3_ease_bounce; }
+};
+
+var d3_ease_mode = {
+  "in": function(f) { return f; },
+  "out": d3_ease_reverse,
+  "in-out": d3_ease_reflect,
+  "out-in": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }
+};
+
+d3.ease = function(name) {
+  var i = name.indexOf("-"),
+      t = i >= 0 ? name.substring(0, i) : name,
+      m = i >= 0 ? name.substring(i + 1) : "in";
+  return d3_ease_mode[m](d3_ease[t].apply(null, Array.prototype.slice.call(arguments, 1)));
+};
+
+function d3_ease_reverse(f) {
+  return function(t) {
+    return 1 - f(1 - t);
+  };
+}
+
+function d3_ease_reflect(f) {
+  return function(t) {
+    return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));
+  };
+}
+
+function d3_ease_linear(t) {
+  return t;
+}
+
+function d3_ease_poly(e) {
+  return function(t) {
+    return Math.pow(t, e);
+  }
+}
+
+function d3_ease_sin(t) {
+  return 1 - Math.cos(t * Math.PI / 2);
+}
+
+function d3_ease_exp(t) {
+  return t ? Math.pow(2, 10 * (t - 1)) - 1e-3 : 0;
+}
+
+function d3_ease_circle(t) {
+  return 1 - Math.sqrt(1 - t * t);
+}
+
+function d3_ease_elastic(a, p) {
+  var s;
+  if (arguments.length < 2) p = 0.45;
+  if (arguments.length < 1) { a = 1; s = p / 4; }
+  else s = p / (2 * Math.PI) * Math.asin(1 / a);
+  return function(t) {
+    return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
+  };
+}
+
+function d3_ease_back(s) {
+  if (!s) s = 1.70158;
+  return function(t) {
+    return t * t * ((s + 1) * t - s);
+  };
+}
+
+function d3_ease_bounce(t) {
+  return t < 1 / 2.75 ? 7.5625 * t * t
+      : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75
+      : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375
+      : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
+}
+d3.event = null;
+d3.interpolate = function(a, b) {
+  var i = d3.interpolators.length, f;
+  while (--i >= 0 && !(f = d3.interpolators[i](a, b)));
+  return f;
+};
+
+d3.interpolateNumber = function(a, b) {
+  b -= a;
+  return function(t) { return a + b * t; };
+};
+
+d3.interpolateRound = function(a, b) {
+  b -= a;
+  return function(t) { return Math.round(a + b * t); };
+};
+
+d3.interpolateString = function(a, b) {
+  var m, // current match
+      i, // current index
+      j, // current index (for coallescing)
+      s0 = 0, // start index of current string prefix
+      s1 = 0, // end index of current string prefix
+      s = [], // string constants and placeholders
+      q = [], // number interpolators
+      n, // q.length
+      o;
+
+  // Reset our regular expression!
+  d3_interpolate_number.lastIndex = 0;
+
+  // Find all numbers in b.
+  for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
+    if (m.index) s.push(b.substring(s0, s1 = m.index));
+    q.push({i: s.length, x: m[0]});
+    s.push(null);
+    s0 = d3_interpolate_number.lastIndex;
+  }
+  if (s0 < b.length) s.push(b.substring(s0));
+
+  // Find all numbers in a.
+  for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
+    o = q[i];
+    if (o.x == m[0]) { // The numbers match, so coallesce.
+      if (o.i) {
+        if (s[o.i + 1] == null) { // This match is followed by another number.
+          s[o.i - 1] += o.x;
+          s.splice(o.i, 1);
+          for (j = i + 1; j < n; ++j) q[j].i--;
+        } else { // This match is followed by a string, so coallesce twice.
+          s[o.i - 1] += o.x + s[o.i + 1];
+          s.splice(o.i, 2);
+          for (j = i + 1; j < n; ++j) q[j].i -= 2;
+        }
+      } else {
+          if (s[o.i + 1] == null) { // This match is followed by another number.
+          s[o.i] = o.x;
+        } else { // This match is followed by a string, so coallesce twice.
+          s[o.i] = o.x + s[o.i + 1];
+          s.splice(o.i + 1, 1);
+          for (j = i + 1; j < n; ++j) q[j].i--;
+        }
+      }
+      q.splice(i, 1);
+      n--;
+      i--;
+    } else {
+      o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
+    }
+  }
+
+  // Remove any numbers in b not found in a.
+  while (i < n) {
+    o = q.pop();
+    if (s[o.i + 1] == null) { // This match is followed by another number.
+      s[o.i] = o.x;
+    } else { // This match is followed by a string, so coallesce twice.
+      s[o.i] = o.x + s[o.i + 1];
+      s.splice(o.i + 1, 1);
+    }
+    n--;
+  }
+
+  // Special optimization for only a single match.
+  if (s.length === 1) {
+    return s[0] == null ? q[0].x : function() { return b; };
+  }
+
+  // Otherwise, interpolate each of the numbers and rejoin the string.
+  return function(t) {
+    for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
+    return s.join("");
+  };
+};
+
+d3.interpolateRgb = function(a, b) {
+  a = d3.rgb(a);
+  b = d3.rgb(b);
+  var ar = a.r,
+      ag = a.g,
+      ab = a.b,
+      br = b.r - ar,
+      bg = b.g - ag,
+      bb = b.b - ab;
+  return function(t) {
+    return "rgb(" + Math.round(ar + br * t)
+        + "," + Math.round(ag + bg * t)
+        + "," + Math.round(ab + bb * t)
+        + ")";
+  };
+};
+
+// interpolates HSL space, but outputs RGB string (for compatibility)
+d3.interpolateHsl = function(a, b) {
+  a = d3.hsl(a);
+  b = d3.hsl(b);
+  var h0 = a.h,
+      s0 = a.s,
+      l0 = a.l,
+      h1 = b.h - h0,
+      s1 = b.s - s0,
+      l1 = b.l - l0;
+  return function(t) {
+    return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t).toString();
+  };
+};
+
+d3.interpolateArray = function(a, b) {
+  var x = [],
+      c = [],
+      na = a.length,
+      nb = b.length,
+      n0 = Math.min(a.length, b.length),
+      i;
+  for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
+  for (; i < na; ++i) c[i] = a[i];
+  for (; i < nb; ++i) c[i] = b[i];
+  return function(t) {
+    for (i = 0; i < n0; ++i) c[i] = x[i](t);
+    return c;
+  };
+};
+
+d3.interpolateObject = function(a, b) {
+  var i = {},
+      c = {},
+      k;
+  for (k in a) {
+    if (k in b) {
+      i[k] = d3_interpolateByName(k)(a[k], b[k]);
+    } else {
+      c[k] = a[k];
+    }
+  }
+  for (k in b) {
+    if (!(k in a)) {
+      c[k] = b[k];
+    }
+  }
+  return function(t) {
+    for (k in i) c[k] = i[k](t);
+    return c;
+  };
+}
+
+var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
+    d3_interpolate_rgb = {background: 1, fill: 1, stroke: 1};
+
+function d3_interpolateByName(n) {
+  return n in d3_interpolate_rgb || /\bcolor\b/.test(n)
+      ? d3.interpolateRgb
+      : d3.interpolate;
+}
+
+d3.interpolators = [
+  d3.interpolateObject,
+  function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); },
+  function(a, b) { return (typeof b === "string") && d3.interpolateString(String(a), b); },
+  function(a, b) { return (b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b)) && d3.interpolateRgb(String(a), b); },
+  function(a, b) { return (typeof b === "number") && d3.interpolateNumber(+a, b); }
+];
+function d3_uninterpolateNumber(a, b) {
+  b = 1 / (b - (a = +a));
+  return function(x) { return (x - a) * b; };
+}
+
+function d3_uninterpolateClamp(a, b) {
+  b = 1 / (b - (a = +a));
+  return function(x) { return Math.max(0, Math.min(1, (x - a) * b)); };
+}
+d3.rgb = function(r, g, b) {
+  return arguments.length === 1
+      ? d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb)
+      : d3_rgb(~~r, ~~g, ~~b);
+};
+
+function d3_rgb(r, g, b) {
+  return new d3_Rgb(r, g, b);
+}
+
+function d3_Rgb(r, g, b) {
+  this.r = r;
+  this.g = g;
+  this.b = b;
+}
+
+d3_Rgb.prototype.brighter = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  var r = this.r,
+      g = this.g,
+      b = this.b,
+      i = 30;
+  if (!r && !g && !b) return d3_rgb(i, i, i);
+  if (r && r < i) r = i;
+  if (g && g < i) g = i;
+  if (b && b < i) b = i;
+  return d3_rgb(
+    Math.min(255, Math.floor(r / k)),
+    Math.min(255, Math.floor(g / k)),
+    Math.min(255, Math.floor(b / k)));
+};
+
+d3_Rgb.prototype.darker = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  return d3_rgb(
+    Math.max(0, Math.floor(k * this.r)),
+    Math.max(0, Math.floor(k * this.g)),
+    Math.max(0, Math.floor(k * this.b)));
+};
+
+d3_Rgb.prototype.hsl = function() {
+  return d3_rgb_hsl(this.r, this.g, this.b);
+};
+
+d3_Rgb.prototype.toString = function() {
+  return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
+};
+
+function d3_rgb_hex(v) {
+  return v < 0x10 ? "0" + v.toString(16) : v.toString(16);
+}
+
+function d3_rgb_parse(format, rgb, hsl) {
+  var r = 0, // red channel; int in [0, 255]
+      g = 0, // green channel; int in [0, 255]
+      b = 0, // blue channel; int in [0, 255]
+      m1, // CSS color specification match
+      m2, // CSS color specification type (e.g., rgb)
+      name;
+
+  /* Handle hsl, rgb. */
+  m1 = /([a-z]+)\((.*)\)/i.exec(format);
+  if (m1) {
+    m2 = m1[2].split(",");
+    switch (m1[1]) {
+      case "hsl": {
+        return hsl(
+          parseFloat(m2[0]), // degrees
+          parseFloat(m2[1]) / 100, // percentage
+          parseFloat(m2[2]) / 100 // percentage
+        );
+      }
+      case "rgb": {
+        return rgb(
+          d3_rgb_parseNumber(m2[0]),
+          d3_rgb_parseNumber(m2[1]),
+          d3_rgb_parseNumber(m2[2])
+        );
+      }
+    }
+  }
+
+  /* Named colors. */
+  if (name = d3_rgb_names[format]) return rgb(name.r, name.g, name.b);
+
+  /* Hexadecimal colors: #rgb and #rrggbb. */
+  if (format != null && format.charAt(0) === "#") {
+    if (format.length === 4) {
+      r = format.charAt(1); r += r;
+      g = format.charAt(2); g += g;
+      b = format.charAt(3); b += b;
+    } else if (format.length === 7) {
+      r = format.substring(1, 3);
+      g = format.substring(3, 5);
+      b = format.substring(5, 7);
+    }
+    r = parseInt(r, 16);
+    g = parseInt(g, 16);
+    b = parseInt(b, 16);
+  }
+
+  return rgb(r, g, b);
+}
+
+function d3_rgb_hsl(r, g, b) {
+  var min = Math.min(r /= 255, g /= 255, b /= 255),
+      max = Math.max(r, g, b),
+      d = max - min,
+      h,
+      s,
+      l = (max + min) / 2;
+  if (d) {
+    s = l < .5 ? d / (max + min) : d / (2 - max - min);
+    if (r == max) h = (g - b) / d + (g < b ? 6 : 0);
+    else if (g == max) h = (b - r) / d + 2;
+    else h = (r - g) / d + 4;
+    h *= 60;
+  } else {
+    s = h = 0;
+  }
+  return d3_hsl(h, s, l);
+}
+
+function d3_rgb_parseNumber(c) { // either integer or percentage
+  var f = parseFloat(c);
+  return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
+}
+
+var d3_rgb_names = {
+  aliceblue: "#f0f8ff",
+  antiquewhite: "#faebd7",
+  aqua: "#00ffff",
+  aquamarine: "#7fffd4",
+  azure: "#f0ffff",
+  beige: "#f5f5dc",
+  bisque: "#ffe4c4",
+  black: "#000000",
+  blanchedalmond: "#ffebcd",
+  blue: "#0000ff",
+  blueviolet: "#8a2be2",
+  brown: "#a52a2a",
+  burlywood: "#deb887",
+  cadetblue: "#5f9ea0",
+  chartreuse: "#7fff00",
+  chocolate: "#d2691e",
+  coral: "#ff7f50",
+  cornflowerblue: "#6495ed",
+  cornsilk: "#fff8dc",
+  crimson: "#dc143c",
+  cyan: "#00ffff",
+  darkblue: "#00008b",
+  darkcyan: "#008b8b",
+  darkgoldenrod: "#b8860b",
+  darkgray: "#a9a9a9",
+  darkgreen: "#006400",
+  darkgrey: "#a9a9a9",
+  darkkhaki: "#bdb76b",
+  darkmagenta: "#8b008b",
+  darkolivegreen: "#556b2f",
+  darkorange: "#ff8c00",
+  darkorchid: "#9932cc",
+  darkred: "#8b0000",
+  darksalmon: "#e9967a",
+  darkseagreen: "#8fbc8f",
+  darkslateblue: "#483d8b",
+  darkslategray: "#2f4f4f",
+  darkslategrey: "#2f4f4f",
+  darkturquoise: "#00ced1",
+  darkviolet: "#9400d3",
+  deeppink: "#ff1493",
+  deepskyblue: "#00bfff",
+  dimgray: "#696969",
+  dimgrey: "#696969",
+  dodgerblue: "#1e90ff",
+  firebrick: "#b22222",
+  floralwhite: "#fffaf0",
+  forestgreen: "#228b22",
+  fuchsia: "#ff00ff",
+  gainsboro: "#dcdcdc",
+  ghostwhite: "#f8f8ff",
+  gold: "#ffd700",
+  goldenrod: "#daa520",
+  gray: "#808080",
+  green: "#008000",
+  greenyellow: "#adff2f",
+  grey: "#808080",
+  honeydew: "#f0fff0",
+  hotpink: "#ff69b4",
+  indianred: "#cd5c5c",
+  indigo: "#4b0082",
+  ivory: "#fffff0",
+  khaki: "#f0e68c",
+  lavender: "#e6e6fa",
+  lavenderblush: "#fff0f5",
+  lawngreen: "#7cfc00",
+  lemonchiffon: "#fffacd",
+  lightblue: "#add8e6",
+  lightcoral: "#f08080",
+  lightcyan: "#e0ffff",
+  lightgoldenrodyellow: "#fafad2",
+  lightgray: "#d3d3d3",
+  lightgreen: "#90ee90",
+  lightgrey: "#d3d3d3",
+  lightpink: "#ffb6c1",
+  lightsalmon: "#ffa07a",
+  lightseagreen: "#20b2aa",
+  lightskyblue: "#87cefa",
+  lightslategray: "#778899",
+  lightslategrey: "#778899",
+  lightsteelblue: "#b0c4de",
+  lightyellow: "#ffffe0",
+  lime: "#00ff00",
+  limegreen: "#32cd32",
+  linen: "#faf0e6",
+  magenta: "#ff00ff",
+  maroon: "#800000",
+  mediumaquamarine: "#66cdaa",
+  mediumblue: "#0000cd",
+  mediumorchid: "#ba55d3",
+  mediumpurple: "#9370db",
+  mediumseagreen: "#3cb371",
+  mediumslateblue: "#7b68ee",
+  mediumspringgreen: "#00fa9a",
+  mediumturquoise: "#48d1cc",
+  mediumvioletred: "#c71585",
+  midnightblue: "#191970",
+  mintcream: "#f5fffa",
+  mistyrose: "#ffe4e1",
+  moccasin: "#ffe4b5",
+  navajowhite: "#ffdead",
+  navy: "#000080",
+  oldlace: "#fdf5e6",
+  olive: "#808000",
+  olivedrab: "#6b8e23",
+  orange: "#ffa500",
+  orangered: "#ff4500",
+  orchid: "#da70d6",
+  palegoldenrod: "#eee8aa",
+  palegreen: "#98fb98",
+  paleturquoise: "#afeeee",
+  palevioletred: "#db7093",
+  papayawhip: "#ffefd5",
+  peachpuff: "#ffdab9",
+  peru: "#cd853f",
+  pink: "#ffc0cb",
+  plum: "#dda0dd",
+  powderblue: "#b0e0e6",
+  purple: "#800080",
+  red: "#ff0000",
+  rosybrown: "#bc8f8f",
+  royalblue: "#4169e1",
+  saddlebrown: "#8b4513",
+  salmon: "#fa8072",
+  sandybrown: "#f4a460",
+  seagreen: "#2e8b57",
+  seashell: "#fff5ee",
+  sienna: "#a0522d",
+  silver: "#c0c0c0",
+  skyblue: "#87ceeb",
+  slateblue: "#6a5acd",
+  slategray: "#708090",
+  slategrey: "#708090",
+  snow: "#fffafa",
+  springgreen: "#00ff7f",
+  steelblue: "#4682b4",
+  tan: "#d2b48c",
+  teal: "#008080",
+  thistle: "#d8bfd8",
+  tomato: "#ff6347",
+  turquoise: "#40e0d0",
+  violet: "#ee82ee",
+  wheat: "#f5deb3",
+  white: "#ffffff",
+  whitesmoke: "#f5f5f5",
+  yellow: "#ffff00",
+  yellowgreen: "#9acd32"
+};
+
+for (var d3_rgb_name in d3_rgb_names) {
+  d3_rgb_names[d3_rgb_name] = d3_rgb_parse(
+      d3_rgb_names[d3_rgb_name],
+      d3_rgb,
+      d3_hsl_rgb);
+}
+d3.hsl = function(h, s, l) {
+  return arguments.length === 1
+      ? d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl)
+      : d3_hsl(+h, +s, +l);
+};
+
+function d3_hsl(h, s, l) {
+  return new d3_Hsl(h, s, l);
+}
+
+function d3_Hsl(h, s, l) {
+  this.h = h;
+  this.s = s;
+  this.l = l;
+}
+
+d3_Hsl.prototype.brighter = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  return d3_hsl(this.h, this.s, this.l / k);
+};
+
+d3_Hsl.prototype.darker = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  return d3_hsl(this.h, this.s, k * this.l);
+};
+
+d3_Hsl.prototype.rgb = function() {
+  return d3_hsl_rgb(this.h, this.s, this.l);
+};
+
+d3_Hsl.prototype.toString = function() {
+  return "hsl(" + this.h + "," + this.s * 100 + "%," + this.l * 100 + "%)";
+};
+
+function d3_hsl_rgb(h, s, l) {
+  var m1,
+      m2;
+
+  /* Some simple corrections for h, s and l. */
+  h = h % 360; if (h < 0) h += 360;
+  s = s < 0 ? 0 : s > 1 ? 1 : s;
+  l = l < 0 ? 0 : l > 1 ? 1 : l;
+
+  /* From FvD 13.37, CSS Color Module Level 3 */
+  m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
+  m1 = 2 * l - m2;
+
+  function v(h) {
+    if (h > 360) h -= 360;
+    else if (h < 0) h += 360;
+    if (h < 60) return m1 + (m2 - m1) * h / 60;
+    if (h < 180) return m2;
+    if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
+    return m1;
+  }
+
+  function vv(h) {
+    return Math.round(v(h) * 255);
+  }
+
+  return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
+}
+var d3_select = function(s, n) { return n.querySelector(s); },
+    d3_selectAll = function(s, n) { return d3_array(n.querySelectorAll(s)); };
+
+// Use Sizzle, if available.
+if (typeof Sizzle === "function") {
+  d3_select = function(s, n) { return Sizzle(s, n)[0]; };
+  d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); };
+}
+
+var d3_root = d3_selection([[document]]);
+d3_root[0].parentNode = document.documentElement;
+
+// TODO fast singleton implementation!
+d3.select = function(selector) {
+  return typeof selector === "string"
+      ? d3_root.select(selector)
+      : d3_selection([[selector]]); // assume node
+};
+
+d3.selectAll = function(selector) {
+  return typeof selector === "string"
+      ? d3_root.selectAll(selector)
+      : d3_selection([d3_array(selector)]); // assume node[]
+};
+
+function d3_selection(groups) {
+
+  function select(select) {
+    var subgroups = [],
+        subgroup,
+        subnode,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          subgroup.push(subnode = select(node));
+          if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  }
+
+  function selectAll(selectAll) {
+    var subgroups = [],
+        subgroup,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          subgroups.push(subgroup = selectAll(node));
+          subgroup.parentNode = node;
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  }
+
+  // TODO select(function)?
+  groups.select = function(selector) {
+    return select(function(node) {
+      return d3_select(selector, node);
+    });
+  };
+
+  // TODO selectAll(function)?
+  groups.selectAll = function(selector) {
+    return selectAll(function(node) {
+      return d3_selectAll(selector, node);
+    });
+  };
+
+  // TODO preserve null elements to maintain index?
+  groups.filter = function(filter) {
+    var subgroups = [],
+        subgroup,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if ((node = group[i]) && filter.call(node, node.__data__, i)) {
+          subgroup.push(node);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  };
+
+  groups.map = function(map) {
+    var group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) node.__data__ = map.call(node, node.__data__, i);
+      }
+    }
+    return groups;
+  };
+
+  // TODO data(null) for clearing data?
+  groups.data = function(data, join) {
+    var enter = [],
+        update = [],
+        exit = [];
+
+    function bind(group, groupData) {
+      var i = 0,
+          n = group.length,
+          m = groupData.length,
+          n0 = Math.min(n, m),
+          n1 = Math.max(n, m),
+          updateNodes = [],
+          enterNodes = [],
+          exitNodes = [],
+          node,
+          nodeData;
+
+      if (join) {
+        var nodeByKey = {},
+            keys = [],
+            key,
+            j = groupData.length;
+
+        for (i = 0; i < n; i++) {
+          key = join.call(node = group[i], node.__data__, i);
+          if (key in nodeByKey) {
+            exitNodes[j++] = node; // duplicate key
+          } else {
+            nodeByKey[key] = node;
+          }
+          keys.push(key);
+        }
+
+        for (i = 0; i < m; i++) {
+          node = nodeByKey[key = join.call(groupData, nodeData = groupData[i], i)];
+          if (node) {
+            node.__data__ = nodeData;
+            updateNodes[i] = node;
+            enterNodes[i] = exitNodes[i] = null;
+          } else {
+            enterNodes[i] = d3_selection_enterNode(nodeData);
+            updateNodes[i] = exitNodes[i] = null;
+          }
+          delete nodeByKey[key];
+        }
+
+        for (i = 0; i < n; i++) {
+          if (keys[i] in nodeByKey) {
+            exitNodes[i] = group[i];
+          }
+        }
+      } else {
+        for (; i < n0; i++) {
+          node = group[i];
+          nodeData = groupData[i];
+          if (node) {
+            node.__data__ = nodeData;
+            updateNodes[i] = node;
+            enterNodes[i] = exitNodes[i] = null;
+          } else {
+            enterNodes[i] = d3_selection_enterNode(nodeData);
+            updateNodes[i] = exitNodes[i] = null;
+          }
+        }
+        for (; i < m; i++) {
+          enterNodes[i] = d3_selection_enterNode(groupData[i]);
+          updateNodes[i] = exitNodes[i] = null;
+        }
+        for (; i < n1; i++) {
+          exitNodes[i] = group[i];
+          enterNodes[i] = updateNodes[i] = null;
+        }
+      }
+
+      enterNodes.parentNode
+          = updateNodes.parentNode
+          = exitNodes.parentNode
+          = group.parentNode;
+
+      enter.push(enterNodes);
+      update.push(updateNodes);
+      exit.push(exitNodes);
+    }
+
+    var i = -1,
+        n = groups.length,
+        group;
+    if (typeof data === "function") {
+      while (++i < n) {
+        bind(group = groups[i], data.call(group, group.parentNode.__data__, i));
+      }
+    } else {
+      while (++i < n) {
+        bind(group = groups[i], data);
+      }
+    }
+
+    var selection = d3_selection(update);
+    selection.enter = function() {
+      return d3_selectionEnter(enter);
+    };
+    selection.exit = function() {
+      return d3_selection(exit);
+    };
+    return selection;
+  };
+
+  // TODO mask forEach? or rename for eachData?
+  // TODO offer the same semantics for map, reduce, etc.?
+  groups.each = function(callback) {
+    for (var j = 0, m = groups.length; j < m; j++) {
+      var group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        var node = group[i];
+        if (node) callback.call(node, node.__data__, i);
+      }
+    }
+    return groups;
+  };
+
+  function first(callback) {
+    for (var j = 0, m = groups.length; j < m; j++) {
+      var group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        var node = group[i];
+        if (node) return callback.call(node, node.__data__, i);
+      }
+    }
+    return null;
+  }
+
+  groups.empty = function() {
+    return !first(function() { return true; });
+  };
+
+  groups.node = function() {
+    return first(function() { return this; });
+  };
+
+  groups.attr = function(name, value) {
+    name = d3.ns.qualify(name);
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(name.local
+          ? function() { return this.getAttributeNS(name.space, name.local); }
+          : function() { return this.getAttribute(name); });
+    }
+
+    /** @this {Element} */
+    function attrNull() {
+      this.removeAttribute(name);
+    }
+
+    /** @this {Element} */
+    function attrNullNS() {
+      this.removeAttributeNS(name.space, name.local);
+    }
+
+    /** @this {Element} */
+    function attrConstant() {
+      this.setAttribute(name, value);
+    }
+
+    /** @this {Element} */
+    function attrConstantNS() {
+      this.setAttributeNS(name.space, name.local, value);
+    }
+
+    /** @this {Element} */
+    function attrFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.removeAttribute(name);
+      else this.setAttribute(name, x);
+    }
+
+    /** @this {Element} */
+    function attrFunctionNS() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.removeAttributeNS(name.space, name.local);
+      else this.setAttributeNS(name.space, name.local, x);
+    }
+
+    return groups.each(value == null
+        ? (name.local ? attrNullNS : attrNull) : (typeof value === "function"
+        ? (name.local ? attrFunctionNS : attrFunction)
+        : (name.local ? attrConstantNS : attrConstant)));
+  };
+
+  groups.classed = function(name, value) {
+    var re = new RegExp("(^|\\s+)" + d3.requote(name) + "(\\s+|$)", "g");
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(function() {
+        if (c = this.classList) return c.contains(name);
+        var c = this.className;
+        re.lastIndex = 0;
+        return re.test(c.baseVal != null ? c.baseVal : c);
+      });
+    }
+
+    /** @this {Element} */
+    function classedAdd() {
+      if (c = this.classList) return c.add(name);
+      var c = this.className,
+          cb = c.baseVal != null,
+          cv = cb ? c.baseVal : c;
+      re.lastIndex = 0;
+      if (!re.test(cv)) {
+        cv = d3_collapse(cv + " " + name);
+        if (cb) c.baseVal = cv;
+        else this.className = cv;
+      }
+    }
+
+    /** @this {Element} */
+    function classedRemove() {
+      if (c = this.classList) return c.remove(name);
+      var c = this.className,
+          cb = c.baseVal != null,
+          cv = cb ? c.baseVal : c;
+      cv = d3_collapse(cv.replace(re, " "));
+      if (cb) c.baseVal = cv;
+      else this.className = cv;
+    }
+
+    /** @this {Element} */
+    function classedFunction() {
+      (value.apply(this, arguments)
+          ? classedAdd
+          : classedRemove).call(this);
+    }
+
+    return groups.each(typeof value === "function"
+        ? classedFunction : value
+        ? classedAdd
+        : classedRemove);
+  };
+
+  groups.style = function(name, value, priority) {
+    if (arguments.length < 3) priority = "";
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(function() {
+        return window.getComputedStyle(this, null).getPropertyValue(name);
+      });
+    }
+
+    /** @this {Element} */
+    function styleNull() {
+      this.style.removeProperty(name);
+    }
+
+    /** @this {Element} */
+    function styleConstant() {
+      this.style.setProperty(name, value, priority);
+    }
+
+    /** @this {Element} */
+    function styleFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.style.removeProperty(name);
+      else this.style.setProperty(name, x, priority);
+    }
+
+    return groups.each(value == null
+        ? styleNull : (typeof value === "function"
+        ? styleFunction : styleConstant));
+  };
+
+  groups.property = function(name, value) {
+    name = d3.ns.qualify(name);
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(function() {
+        return this[name];
+      });
+    }
+
+    /** @this {Element} */
+    function propertyNull() {
+      delete this[name];
+    }
+
+    /** @this {Element} */
+    function propertyConstant() {
+      this[name] = value;
+    }
+
+    /** @this {Element} */
+    function propertyFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) delete this[name];
+      else this[name] = x;
+    }
+
+    return groups.each(value == null
+        ? propertyNull : (typeof value === "function"
+        ? propertyFunction : propertyConstant));
+  };
+
+  groups.text = function(value) {
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 1) {
+      return first(function() {
+        return this.textContent;
+      });
+    }
+
+    /** @this {Element} */
+    function textConstant() {
+      this.textContent = value;
+    }
+
+    /** @this {Element} */
+    function textFunction() {
+      this.textContent = value.apply(this, arguments);
+    }
+
+    return groups.each(typeof value === "function"
+        ? textFunction : textConstant);
+  };
+
+  groups.html = function(value) {
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 1) {
+      return first(function() {
+        return this.innerHTML;
+      });
+    }
+
+    /** @this {Element} */
+    function htmlConstant() {
+      this.innerHTML = value;
+    }
+
+    /** @this {Element} */
+    function htmlFunction() {
+      this.innerHTML = value.apply(this, arguments);
+    }
+
+    return groups.each(typeof value === "function"
+        ? htmlFunction : htmlConstant);
+  };
+
+  // TODO append(node)?
+  // TODO append(function)?
+  groups.append = function(name) {
+    name = d3.ns.qualify(name);
+
+    function append(node) {
+      return node.appendChild(document.createElement(name));
+    }
+
+    function appendNS(node) {
+      return node.appendChild(document.createElementNS(name.space, name.local));
+    }
+
+    return select(name.local ? appendNS : append);
+  };
+
+  // TODO insert(node, function)?
+  // TODO insert(function, string)?
+  // TODO insert(function, function)?
+  groups.insert = function(name, before) {
+    name = d3.ns.qualify(name);
+
+    function insert(node) {
+      return node.insertBefore(
+          document.createElement(name),
+          d3_select(before, node));
+    }
+
+    function insertNS(node) {
+      return node.insertBefore(
+          document.createElementNS(name.space, name.local),
+          d3_select(before, node));
+    }
+
+    return select(name.local ? insertNS : insert);
+  };
+
+  // TODO remove(selector)?
+  // TODO remove(node)?
+  // TODO remove(function)?
+  groups.remove = function() {
+    return groups.each(function() {
+      var parent = this.parentNode;
+      if (parent) parent.removeChild(this);
+    });
+  };
+
+  groups.sort = function(comparator) {
+    comparator = d3_selection_comparator.apply(this, arguments);
+    for (var j = 0, m = groups.length; j < m; j++) {
+      var group = groups[j];
+      group.sort(comparator);
+      for (var i = 1, n = group.length, prev = group[0]; i < n; i++) {
+        var node = group[i];
+        if (node) {
+          if (prev) prev.parentNode.insertBefore(node, prev.nextSibling);
+          prev = node;
+        }
+      }
+    }
+    return groups;
+  };
+
+  // type can be namespaced, e.g., "click.foo"
+  // listener can be null for removal
+  groups.on = function(type, listener, capture) {
+    if (arguments.length < 3) capture = false;
+
+    // parse the type specifier
+    var i = type.indexOf("."),
+        typo = i === -1 ? type : type.substring(0, i),
+        name = "__on" + type;
+
+    // remove the old event listener, and add the new event listener
+    return groups.each(function(d, i) {
+      if (this[name]) this.removeEventListener(typo, this[name], capture);
+      if (listener) this.addEventListener(typo, this[name] = l, capture);
+
+      // wrapped event listener that preserves i
+      var node = this;
+      function l(e) {
+        var o = d3.event; // Events can be reentrant (e.g., focus).
+        d3.event = e;
+        try {
+          listener.call(this, node.__data__, i);
+        } finally {
+          d3.event = o;
+        }
+      }
+    });
+  };
+
+  // TODO slice?
+
+  groups.transition = function() {
+    return d3_transition(groups);
+  };
+
+  groups.call = d3_call;
+
+  return groups;
+}
+
+function d3_selectionEnter(groups) {
+
+  function select(select) {
+    var subgroups = [],
+        subgroup,
+        subnode,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          subgroup.push(subnode = select(group.parentNode));
+          subnode.__data__ = node.__data__;
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  }
+
+  // TODO append(node)?
+  // TODO append(function)?
+  groups.append = function(name) {
+    name = d3.ns.qualify(name);
+
+    function append(node) {
+      return node.appendChild(document.createElement(name));
+    }
+
+    function appendNS(node) {
+      return node.appendChild(document.createElementNS(name.space, name.local));
+    }
+
+    return select(name.local ? appendNS : append);
+  };
+
+  // TODO insert(node, function)?
+  // TODO insert(function, string)?
+  // TODO insert(function, function)?
+  groups.insert = function(name, before) {
+    name = d3.ns.qualify(name);
+
+    function insert(node) {
+      return node.insertBefore(
+          document.createElement(name),
+          d3_select(before, node));
+    }
+
+    function insertNS(node) {
+      return node.insertBefore(
+          document.createElementNS(name.space, name.local),
+          d3_select(before, node));
+    }
+
+    return select(name.local ? insertNS : insert);
+  };
+
+  return groups;
+}
+
+function d3_selection_comparator(comparator) {
+  if (!arguments.length) comparator = d3.ascending;
+  return function(a, b) {
+    return comparator(a && a.__data__, b && b.__data__);
+  };
+}
+
+function d3_selection_enterNode(data) {
+  return {__data__: data};
+}
+d3.transition = d3_root.transition;
+
+var d3_transitionId = 0,
+    d3_transitionInheritId = 0;
+
+function d3_transition(groups) {
+  var transition = {},
+      transitionId = d3_transitionInheritId || ++d3_transitionId,
+      tweens = {},
+      interpolators = [],
+      remove = false,
+      event = d3.dispatch("start", "end"),
+      stage = [],
+      delay = [],
+      duration = [],
+      durationMax,
+      ease = d3.ease("cubic-in-out");
+
+  //
+  // Be careful with concurrent transitions!
+  //
+  // Say transition A causes an exit. Before A finishes, a transition B is
+  // created, and believes it only needs to do an update, because the elements
+  // haven't been removed yet (which happens at the very end of the exit
+  // transition).
+  //
+  // Even worse, what if either transition A or B has a staggered delay? Then,
+  // some elements may be removed, while others remain. Transition B does not
+  // know to enter the elements because they were still present at the time
+  // the transition B was created (but not yet started).
+  //
+  // To prevent such confusion, we only trigger end events for transitions if
+  // the transition ending is the only one scheduled for the given element.
+  // Similarly, we only allow one transition to be active for any given
+  // element, so that concurrent transitions do not overwrite each other's
+  // properties.
+  //
+  // TODO Support transition namespaces, so that transitions can proceed
+  // concurrently on the same element if needed. Hopefully, this is rare!
+  //
+
+  groups.each(function() {
+    (this.__transition__ || (this.__transition__ = {})).owner = transitionId;
+  });
+
+  function step(elapsed) {
+    var clear = true,
+        k = -1;
+    groups.each(function() {
+      if (stage[++k] === 2) return; // ended
+      var t = (elapsed - delay[k]) / duration[k],
+          tx = this.__transition__,
+          te, // ease(t)
+          tk, // tween key
+          ik = interpolators[k];
+
+      // Check if the (un-eased) time is outside the range [0,1].
+      if (t < 1) {
+        clear = false;
+        if (t < 0) return;
+      } else {
+        t = 1;
+      }
+
+      // Determine the stage of this transition.
+      // 0 - Not yet started.
+      // 1 - In progress.
+      // 2 - Ended.
+      if (stage[k]) {
+        if (!tx || tx.active !== transitionId) {
+          stage[k] = 2;
+          return;
+        }
+      } else if (!tx || tx.active > transitionId) {
+        stage[k] = 2;
+        return;
+      } else {
+        stage[k] = 1;
+        event.start.dispatch.apply(this, arguments);
+        ik = interpolators[k] = {};
+        tx.active = transitionId;
+        for (tk in tweens) {
+          if (te = tweens[tk].apply(this, arguments)) {
+            ik[tk] = te;
+          }
+        }
+      }
+
+      // Apply the interpolators!
+      te = ease(t);
+      for (tk in ik) ik[tk].call(this, te);
+
+      // Handle ending transitions.
+      if (t === 1) {
+        stage[k] = 2;
+        if (tx.active === transitionId) {
+          var owner = tx.owner;
+          if (owner === transitionId) {
+            delete this.__transition__;
+            if (remove && this.parentNode) this.parentNode.removeChild(this);
+          }
+          d3_transitionInheritId = transitionId;
+          event.end.dispatch.apply(this, arguments);
+          d3_transitionInheritId = 0;
+          tx.owner = owner;
+        }
+      }
+    });
+    return clear;
+  }
+
+  transition.delay = function(value) {
+    var delayMin = Infinity,
+        k = -1;
+    if (typeof value === "function") {
+      groups.each(function(d, i) {
+        var x = delay[++k] = +value.apply(this, arguments);
+        if (x < delayMin) delayMin = x;
+      });
+    } else {
+      delayMin = +value;
+      groups.each(function(d, i) {
+        delay[++k] = delayMin;
+      });
+    }
+    d3_timer(step, delayMin);
+    return transition;
+  };
+
+  transition.duration = function(value) {
+    var k = -1;
+    if (typeof value === "function") {
+      durationMax = 0;
+      groups.each(function(d, i) {
+        var x = duration[++k] = +value.apply(this, arguments);
+        if (x > durationMax) durationMax = x;
+      });
+    } else {
+      durationMax = +value;
+      groups.each(function(d, i) {
+        duration[++k] = durationMax;
+      });
+    }
+    return transition;
+  };
+
+  transition.ease = function(value) {
+    ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments);
+    return transition;
+  };
+
+  transition.attrTween = function(name, tween) {
+
+    /** @this {Element} */
+    function attrTween(d, i) {
+      var f = tween.call(this, d, i, this.getAttribute(name));
+      return f && function(t) {
+        this.setAttribute(name, f(t));
+      };
+    }
+
+    /** @this {Element} */
+    function attrTweenNS(d, i) {
+      var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
+      return f && function(t) {
+        this.setAttributeNS(name.space, name.local, f(t));
+      };
+    }
+
+    tweens["attr." + name] = name.local ? attrTweenNS : attrTween;
+    return transition;
+  };
+
+  transition.attr = function(name, value) {
+    return transition.attrTween(name, d3_transitionTween(value));
+  };
+
+  transition.styleTween = function(name, tween, priority) {
+    if (arguments.length < 3) priority = null;
+
+    /** @this {Element} */
+    function styleTween(d, i) {
+      var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
+      return f && function(t) {
+        this.style.setProperty(name, f(t), priority);
+      };
+    }
+
+    tweens["style." + name] = styleTween;
+    return transition;
+  };
+
+  transition.style = function(name, value, priority) {
+    if (arguments.length < 3) priority = null;
+    return transition.styleTween(name, d3_transitionTween(value), priority);
+  };
+
+  transition.text = function(value) {
+    tweens.text = function(d, i) {
+      this.textContent = typeof value === "function"
+          ? value.call(this, d, i)
+          : value;
+    };
+    return transition;
+  };
+
+  transition.select = function(query) {
+    var k, t = d3_transition(groups.select(query)).ease(ease);
+    k = -1; t.delay(function(d, i) { return delay[++k]; });
+    k = -1; t.duration(function(d, i) { return duration[++k]; });
+    return t;
+  };
+
+  transition.selectAll = function(query) {
+    var k, t = d3_transition(groups.selectAll(query)).ease(ease);
+    k = -1; t.delay(function(d, i) { return delay[i ? k : ++k]; })
+    k = -1; t.duration(function(d, i) { return duration[i ? k : ++k]; });
+    return t;
+  };
+
+  transition.remove = function() {
+    remove = true;
+    return transition;
+  };
+
+  transition.each = function(type, listener) {
+    event[type].add(listener);
+    return transition;
+  };
+
+  transition.call = d3_call;
+
+  return transition.delay(0).duration(250);
+}
+
+function d3_transitionTween(b) {
+  return typeof b === "function"
+      ? function(d, i, a) { var v = b.call(this, d, i) + ""; return a != v && d3.interpolate(a, v); }
+      : (b = b + "", function(d, i, a) { return a != b && d3.interpolate(a, b); });
+}
+var d3_timer_queue = null,
+    d3_timer_interval, // is an interval (or frame) active?
+    d3_timer_timeout; // is a timeout active?
+
+// The timer will continue to fire until callback returns true.
+d3.timer = function(callback) {
+  d3_timer(callback, 0);
+};
+
+function d3_timer(callback, delay) {
+  var now = Date.now(),
+      found = false,
+      t0,
+      t1 = d3_timer_queue;
+
+  if (!isFinite(delay)) return;
+
+  // See if the callback's already in the queue.
+  while (t1) {
+    if (t1.callback === callback) {
+      t1.then = now;
+      t1.delay = delay;
+      found = true;
+      break;
+    }
+    t0 = t1;
+    t1 = t1.next;
+  }
+
+  // Otherwise, add the callback to the queue.
+  if (!found) d3_timer_queue = {
+    callback: callback,
+    then: now,
+    delay: delay,
+    next: d3_timer_queue
+  };
+
+  // Start animatin'!
+  if (!d3_timer_interval) {
+    d3_timer_timeout = clearTimeout(d3_timer_timeout);
+    d3_timer_interval = 1;
+    d3_timer_frame(d3_timer_step);
+  }
+}
+
+function d3_timer_step() {
+  var elapsed,
+      now = Date.now(),
+      t1 = d3_timer_queue;
+
+  while (t1) {
+    elapsed = now - t1.then;
+    if (elapsed > t1.delay) t1.flush = t1.callback(elapsed);
+    t1 = t1.next;
+  }
+
+  var delay = d3_timer_flush() - now;
+  if (delay > 24) {
+    if (isFinite(delay)) {
+      clearTimeout(d3_timer_timeout);
+      d3_timer_timeout = setTimeout(d3_timer_step, delay);
+    }
+    d3_timer_interval = 0;
+  } else {
+    d3_timer_interval = 1;
+    d3_timer_frame(d3_timer_step);
+  }
+}
+
+d3.timer.flush = function() {
+  var elapsed,
+      now = Date.now(),
+      t1 = d3_timer_queue;
+
+  while (t1) {
+    elapsed = now - t1.then;
+    if (!t1.delay) t1.flush = t1.callback(elapsed);
+    t1 = t1.next;
+  }
+
+  d3_timer_flush();
+};
+
+// Flush after callbacks, to avoid concurrent queue modification.
+function d3_timer_flush() {
+  var t0 = null,
+      t1 = d3_timer_queue,
+      then = Infinity;
+  while (t1) {
+    if (t1.flush) {
+      t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
+    } else {
+      then = Math.min(then, t1.then + t1.delay);
+      t1 = (t0 = t1).next;
+    }
+  }
+  return then;
+}
+
+var d3_timer_frame = window.requestAnimationFrame
+    || window.webkitRequestAnimationFrame
+    || window.mozRequestAnimationFrame
+    || window.oRequestAnimationFrame
+    || window.msRequestAnimationFrame
+    || function(callback) { setTimeout(callback, 17); };
+function d3_noop() {}
+d3.scale = {};
+
+function d3_scaleExtent(domain) {
+  var start = domain[0], stop = domain[domain.length - 1];
+  return start < stop ? [start, stop] : [stop, start];
+}
+function d3_scale_nice(domain, nice) {
+  var i0 = 0,
+      i1 = domain.length - 1,
+      x0 = domain[i0],
+      x1 = domain[i1],
+      dx;
+
+  if (x1 < x0) {
+    dx = i0; i0 = i1; i1 = dx;
+    dx = x0; x0 = x1; x1 = dx;
+  }
+
+  nice = nice(x1 - x0);
+  domain[i0] = nice.floor(x0);
+  domain[i1] = nice.ceil(x1);
+  return domain;
+}
+
+function d3_scale_niceDefault() {
+  return Math;
+}
+d3.scale.linear = function() {
+  var domain = [0, 1],
+      range = [0, 1],
+      interpolate = d3.interpolate,
+      clamp = false,
+      output,
+      input;
+
+  function rescale() {
+    var linear = domain.length == 2 ? d3_scale_bilinear : d3_scale_polylinear,
+        uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
+    output = linear(domain, range, uninterpolate, interpolate);
+    input = linear(range, domain, uninterpolate, d3.interpolate);
+    return scale;
+  }
+
+  function scale(x) {
+    return output(x);
+  }
+
+  // Note: requires range is coercible to number!
+  scale.invert = function(y) {
+    return input(y);
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x.map(Number);
+    return rescale();
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    return rescale();
+  };
+
+  scale.rangeRound = function(x) {
+    return scale.range(x).interpolate(d3.interpolateRound);
+  };
+
+  scale.clamp = function(x) {
+    if (!arguments.length) return clamp;
+    clamp = x;
+    return rescale();
+  };
+
+  scale.interpolate = function(x) {
+    if (!arguments.length) return interpolate;
+    interpolate = x;
+    return rescale();
+  };
+
+  scale.ticks = function(m) {
+    return d3_scale_linearTicks(domain, m);
+  };
+
+  scale.tickFormat = function(m) {
+    return d3_scale_linearTickFormat(domain, m);
+  };
+
+  scale.nice = function() {
+    d3_scale_nice(domain, d3_scale_linearNice);
+    return rescale();
+  };
+
+  return rescale();
+};
+
+function d3_scale_linearRebind(scale, linear) {
+  scale.range = d3.rebind(scale, linear.range);
+  scale.rangeRound = d3.rebind(scale, linear.rangeRound);
+  scale.interpolate = d3.rebind(scale, linear.interpolate);
+  scale.clamp = d3.rebind(scale, linear.clamp);
+  return scale;
+}
+
+function d3_scale_linearNice(dx) {
+  dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
+  return {
+    floor: function(x) { return Math.floor(x / dx) * dx; },
+    ceil: function(x) { return Math.ceil(x / dx) * dx; }
+  };
+}
+
+// TODO Dates? Ugh.
+function d3_scale_linearTickRange(domain, m) {
+  var extent = d3_scaleExtent(domain),
+      span = extent[1] - extent[0],
+      step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
+      err = m / span * step;
+
+  // Filter ticks to get closer to the desired count.
+  if (err <= .15) step *= 10;
+  else if (err <= .35) step *= 5;
+  else if (err <= .75) step *= 2;
+
+  // Round start and stop values to step interval.
+  extent[0] = Math.ceil(extent[0] / step) * step;
+  extent[1] = Math.floor(extent[1] / step) * step + step * .5; // inclusive
+  extent[2] = step;
+  return extent;
+}
+
+function d3_scale_linearTicks(domain, m) {
+  return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
+}
+
+function d3_scale_linearTickFormat(domain, m) {
+  return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f");
+}
+function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
+  var u = uninterpolate(domain[0], domain[1]),
+      i = interpolate(range[0], range[1]);
+  return function(x) {
+    return i(u(x));
+  };
+}
+function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
+  var u = [],
+      i = [],
+      j = 0,
+      n = domain.length;
+
+  while (++j < n) {
+    u.push(uninterpolate(domain[j - 1], domain[j]));
+    i.push(interpolate(range[j - 1], range[j]));
+  }
+
+  return function(x) {
+    var j = d3.bisect(domain, x, 1, domain.length - 1) - 1;
+    return i[j](u[j](x));
+  };
+}
+d3.scale.log = function() {
+  var linear = d3.scale.linear(),
+      log = d3_scale_log,
+      pow = log.pow;
+
+  function scale(x) {
+    return linear(log(x));
+  }
+
+  scale.invert = function(x) {
+    return pow(linear.invert(x));
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return linear.domain().map(pow);
+    log = x[0] < 0 ? d3_scale_logn : d3_scale_log;
+    pow = log.pow;
+    linear.domain(x.map(log));
+    return scale;
+  };
+
+  scale.nice = function() {
+    linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));
+    return scale;
+  };
+
+  scale.ticks = function() {
+    var extent = d3_scaleExtent(linear.domain()),
+        ticks = [];
+    if (extent.every(isFinite)) {
+      var i = Math.floor(extent[0]),
+          j = Math.ceil(extent[1]),
+          u = pow(extent[0]),
+          v = pow(extent[1]);
+      if (log === d3_scale_logn) {
+        ticks.push(pow(i));
+        for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
+      } else {
+        for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
+        ticks.push(pow(i));
+      }
+      for (i = 0; ticks[i] < u; i++) {} // strip small values
+      for (j = ticks.length; ticks[j - 1] > v; j--) {} // strip big values
+      ticks = ticks.slice(i, j);
+    }
+    return ticks;
+  };
+
+  scale.tickFormat = function() {
+    return d3_scale_logTickFormat;
+  };
+
+  return d3_scale_linearRebind(scale, linear);
+};
+
+function d3_scale_log(x) {
+  return Math.log(x) / Math.LN10;
+}
+
+function d3_scale_logn(x) {
+  return -Math.log(-x) / Math.LN10;
+}
+
+d3_scale_log.pow = function(x) {
+  return Math.pow(10, x);
+};
+
+d3_scale_logn.pow = function(x) {
+  return -Math.pow(10, -x);
+};
+
+function d3_scale_logTickFormat(d) {
+  return d.toPrecision(1);
+}
+d3.scale.pow = function() {
+  var linear = d3.scale.linear(),
+      exponent = 1,
+      powp = Number,
+      powb = powp;
+
+  function scale(x) {
+    return linear(powp(x));
+  }
+
+  scale.invert = function(x) {
+    return powb(linear.invert(x));
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return linear.domain().map(powb);
+    powp = d3_scale_powPow(exponent);
+    powb = d3_scale_powPow(1 / exponent);
+    linear.domain(x.map(powp));
+    return scale;
+  };
+
+  scale.ticks = function(m) {
+    return d3_scale_linearTicks(scale.domain(), m);
+  };
+
+  scale.tickFormat = function(m) {
+    return d3_scale_linearTickFormat(scale.domain(), m);
+  };
+
+  scale.nice = function() {
+    return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
+  };
+
+  scale.exponent = function(x) {
+    if (!arguments.length) return exponent;
+    var domain = scale.domain();
+    exponent = x;
+    return scale.domain(domain);
+  };
+
+  return d3_scale_linearRebind(scale, linear);
+};
+
+function d3_scale_powPow(e) {
+  return function(x) {
+    return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
+  };
+}
+d3.scale.sqrt = function() {
+  return d3.scale.pow().exponent(.5);
+};
+d3.scale.ordinal = function() {
+  var domain = [],
+      index = {},
+      range = [],
+      rangeBand = 0,
+      rerange = d3_noop;
+
+  function scale(x) {
+    var i = x in index ? index[x] : (index[x] = domain.push(x) - 1);
+    return range[i % range.length];
+  }
+
+  scale.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x;
+    index = {};
+    var i = -1, j = -1, n = domain.length; while (++i < n) {
+      x = domain[i];
+      if (!(x in index)) index[x] = ++j;
+    }
+    rerange();
+    return scale;
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    rerange = d3_noop;
+    return scale;
+  };
+
+  scale.rangePoints = function(x, padding) {
+    if (arguments.length < 2) padding = 0;
+    (rerange = function() {
+      var start = x[0],
+          stop = x[1],
+          step = (stop - start) / (domain.length - 1 + padding);
+      range = domain.length == 1
+          ? [(start + stop) / 2]
+          : d3.range(start + step * padding / 2, stop + step / 2, step);
+      rangeBand = 0;
+    })();
+    return scale;
+  };
+
+  scale.rangeBands = function(x, padding) {
+    if (arguments.length < 2) padding = 0;
+    (rerange = function() {
+      var start = x[0],
+          stop = x[1],
+          step = (stop - start) / (domain.length + padding);
+      range = d3.range(start + step * padding, stop, step);
+      rangeBand = step * (1 - padding);
+    })();
+    return scale;
+  };
+
+  scale.rangeRoundBands = function(x, padding) {
+    if (arguments.length < 2) padding = 0;
+    (rerange = function() {
+      var start = x[0],
+          stop = x[1],
+          diff = stop - start,
+          step = Math.floor(diff / (domain.length + padding)),
+          err = diff - (domain.length - padding) * step;
+      range = d3.range(start + Math.round(err / 2), stop, step);
+      rangeBand = Math.round(step * (1 - padding));
+    })();
+    return scale;
+  };
+
+  scale.rangeBand = function() {
+    return rangeBand;
+  };
+
+  return scale;
+};
+/*
+ * This product includes color specifications and designs developed by Cynthia
+ * Brewer (http://colorbrewer.org/). See lib/colorbrewer for more information.
+ */
+
+d3.scale.category10 = function() {
+  return d3.scale.ordinal().range(d3_category10);
+};
+
+d3.scale.category20 = function() {
+  return d3.scale.ordinal().range(d3_category20);
+};
+
+d3.scale.category20b = function() {
+  return d3.scale.ordinal().range(d3_category20b);
+};
+
+d3.scale.category20c = function() {
+  return d3.scale.ordinal().range(d3_category20c);
+};
+
+var d3_category10 = [
+  "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
+  "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"
+];
+
+var d3_category20 = [
+  "#1f77b4", "#aec7e8",
+  "#ff7f0e", "#ffbb78",
+  "#2ca02c", "#98df8a",
+  "#d62728", "#ff9896",
+  "#9467bd", "#c5b0d5",
+  "#8c564b", "#c49c94",
+  "#e377c2", "#f7b6d2",
+  "#7f7f7f", "#c7c7c7",
+  "#bcbd22", "#dbdb8d",
+  "#17becf", "#9edae5"
+];
+
+var d3_category20b = [
+  "#393b79", "#5254a3", "#6b6ecf", "#9c9ede",
+  "#637939", "#8ca252", "#b5cf6b", "#cedb9c",
+  "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94",
+  "#843c39", "#ad494a", "#d6616b", "#e7969c",
+  "#7b4173", "#a55194", "#ce6dbd", "#de9ed6"
+];
+
+var d3_category20c = [
+  "#3182bd", "#6baed6", "#9ecae1", "#c6dbef",
+  "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2",
+  "#31a354", "#74c476", "#a1d99b", "#c7e9c0",
+  "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb",
+  "#636363", "#969696", "#bdbdbd", "#d9d9d9"
+];
+d3.scale.quantile = function() {
+  var domain = [],
+      range = [],
+      thresholds = [];
+
+  function rescale() {
+    var k = 0,
+        n = domain.length,
+        q = range.length;
+    thresholds.length = Math.max(0, q - 1);
+    while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
+  }
+
+  function scale(x) {
+    if (isNaN(x = +x)) return NaN;
+    return range[d3.bisect(thresholds, x)];
+  }
+
+  scale.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x.filter(function(d) { return !isNaN(d); }).sort(d3.ascending);
+    rescale();
+    return scale;
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    rescale();
+    return scale;
+  };
+
+  scale.quantiles = function() {
+    return thresholds;
+  };
+
+  return scale;
+};
+d3.scale.quantize = function() {
+  var x0 = 0,
+      x1 = 1,
+      kx = 2,
+      i = 1,
+      range = [0, 1];
+
+  function scale(x) {
+    return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
+  }
+
+  scale.domain = function(x) {
+    if (!arguments.length) return [x0, x1];
+    x0 = x[0];
+    x1 = x[1];
+    kx = range.length / (x1 - x0);
+    return scale;
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    kx = range.length / (x1 - x0);
+    i = range.length - 1;
+    return scale;
+  };
+
+  return scale;
+};
+d3.svg = {};
+d3.svg.arc = function() {
+  var innerRadius = d3_svg_arcInnerRadius,
+      outerRadius = d3_svg_arcOuterRadius,
+      startAngle = d3_svg_arcStartAngle,
+      endAngle = d3_svg_arcEndAngle;
+
+  function arc() {
+    var r0 = innerRadius.apply(this, arguments),
+        r1 = outerRadius.apply(this, arguments),
+        a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,
+        a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,
+        da = a1 - a0,
+        df = da < Math.PI ? "0" : "1",
+        c0 = Math.cos(a0),
+        s0 = Math.sin(a0),
+        c1 = Math.cos(a1),
+        s1 = Math.sin(a1);
+    return da >= d3_svg_arcMax
+      ? (r0
+      ? "M0," + r1
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1)
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + r1
+      + "M0," + r0
+      + "A" + r0 + "," + r0 + " 0 1,1 0," + (-r0)
+      + "A" + r0 + "," + r0 + " 0 1,1 0," + r0
+      + "Z"
+      : "M0," + r1
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1)
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + r1
+      + "Z")
+      : (r0
+      ? "M" + r1 * c0 + "," + r1 * s0
+      + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1
+      + "L" + r0 * c1 + "," + r0 * s1
+      + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0
+      + "Z"
+      : "M" + r1 * c0 + "," + r1 * s0
+      + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1
+      + "L0,0"
+      + "Z");
+  }
+
+  arc.innerRadius = function(v) {
+    if (!arguments.length) return innerRadius;
+    innerRadius = d3.functor(v);
+    return arc;
+  };
+
+  arc.outerRadius = function(v) {
+    if (!arguments.length) return outerRadius;
+    outerRadius = d3.functor(v);
+    return arc;
+  };
+
+  arc.startAngle = function(v) {
+    if (!arguments.length) return startAngle;
+    startAngle = d3.functor(v);
+    return arc;
+  };
+
+  arc.endAngle = function(v) {
+    if (!arguments.length) return endAngle;
+    endAngle = d3.functor(v);
+    return arc;
+  };
+
+  arc.centroid = function() {
+    var r = (innerRadius.apply(this, arguments)
+        + outerRadius.apply(this, arguments)) / 2,
+        a = (startAngle.apply(this, arguments)
+        + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
+    return [Math.cos(a) * r, Math.sin(a) * r];
+  };
+
+  return arc;
+};
+
+var d3_svg_arcOffset = -Math.PI / 2,
+    d3_svg_arcMax = 2 * Math.PI - 1e-6;
+
+function d3_svg_arcInnerRadius(d) {
+  return d.innerRadius;
+}
+
+function d3_svg_arcOuterRadius(d) {
+  return d.outerRadius;
+}
+
+function d3_svg_arcStartAngle(d) {
+  return d.startAngle;
+}
+
+function d3_svg_arcEndAngle(d) {
+  return d.endAngle;
+}
+function d3_svg_line(projection) {
+  var x = d3_svg_lineX,
+      y = d3_svg_lineY,
+      interpolate = "linear",
+      interpolator = d3_svg_lineInterpolators[interpolate],
+      tension = .7;
+
+  function line(d) {
+    return d.length < 1 ? null : "M" + interpolator(projection(d3_svg_linePoints(this, d, x, y)), tension);
+  }
+
+  line.x = function(v) {
+    if (!arguments.length) return x;
+    x = v;
+    return line;
+  };
+
+  line.y = function(v) {
+    if (!arguments.length) return y;
+    y = v;
+    return line;
+  };
+
+  line.interpolate = function(v) {
+    if (!arguments.length) return interpolate;
+    interpolator = d3_svg_lineInterpolators[interpolate = v];
+    return line;
+  };
+
+  line.tension = function(v) {
+    if (!arguments.length) return tension;
+    tension = v;
+    return line;
+  };
+
+  return line;
+}
+
+d3.svg.line = function() {
+  return d3_svg_line(Object);
+};
+
+// Converts the specified array of data into an array of points
+// (x-y tuples), by evaluating the specified `x` and `y` functions on each
+// data point. The `this` context of the evaluated functions is the specified
+// "self" object; each function is passed the current datum and index.
+function d3_svg_linePoints(self, d, x, y) {
+  var points = [],
+      i = -1,
+      n = d.length,
+      fx = typeof x === "function",
+      fy = typeof y === "function",
+      value;
+  if (fx && fy) {
+    while (++i < n) points.push([
+      x.call(self, value = d[i], i),
+      y.call(self, value, i)
+    ]);
+  } else if (fx) {
+    while (++i < n) points.push([x.call(self, d[i], i), y]);
+  } else if (fy) {
+    while (++i < n) points.push([x, y.call(self, d[i], i)]);
+  } else {
+    while (++i < n) points.push([x, y]);
+  }
+  return points;
+}
+
+// The default `x` property, which references d[0].
+function d3_svg_lineX(d) {
+  return d[0];
+}
+
+// The default `y` property, which references d[1].
+function d3_svg_lineY(d) {
+  return d[1];
+}
+
+// The various interpolators supported by the `line` class.
+var d3_svg_lineInterpolators = {
+  "linear": d3_svg_lineLinear,
+  "step-before": d3_svg_lineStepBefore,
+  "step-after": d3_svg_lineStepAfter,
+  "basis": d3_svg_lineBasis,
+  "basis-open": d3_svg_lineBasisOpen,
+  "basis-closed": d3_svg_lineBasisClosed,
+  "bundle": d3_svg_lineBundle,
+  "cardinal": d3_svg_lineCardinal,
+  "cardinal-open": d3_svg_lineCardinalOpen,
+  "cardinal-closed": d3_svg_lineCardinalClosed,
+  "monotone": d3_svg_lineMonotone
+};
+
+// Linear interpolation; generates "L" commands.
+function d3_svg_lineLinear(points) {
+  var path = [],
+      i = 0,
+      n = points.length,
+      p = points[0];
+  path.push(p[0], ",", p[1]);
+  while (++i < n) path.push("L", (p = points[i])[0], ",", p[1]);
+  return path.join("");
+}
+
+// Step interpolation; generates "H" and "V" commands.
+function d3_svg_lineStepBefore(points) {
+  var path = [],
+      i = 0,
+      n = points.length,
+      p = points[0];
+  path.push(p[0], ",", p[1]);
+  while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
+  return path.join("");
+}
+
+// Step interpolation; generates "H" and "V" commands.
+function d3_svg_lineStepAfter(points) {
+  var path = [],
+      i = 0,
+      n = points.length,
+      p = points[0];
+  path.push(p[0], ",", p[1]);
+  while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
+  return path.join("");
+}
+
+// Open cardinal spline interpolation; generates "C" commands.
+function d3_svg_lineCardinalOpen(points, tension) {
+  return points.length < 4
+      ? d3_svg_lineLinear(points)
+      : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1),
+        d3_svg_lineCardinalTangents(points, tension));
+}
+
+// Closed cardinal spline interpolation; generates "C" commands.
+function d3_svg_lineCardinalClosed(points, tension) {
+  return points.length < 3
+      ? d3_svg_lineLinear(points)
+      : points[0] + d3_svg_lineHermite((points.push(points[0]), points),
+        d3_svg_lineCardinalTangents([points[points.length - 2]]
+        .concat(points, [points[1]]), tension));
+}
+
+// Cardinal spline interpolation; generates "C" commands.
+function d3_svg_lineCardinal(points, tension, closed) {
+  return points.length < 3
+      ? d3_svg_lineLinear(points)
+      : points[0] + d3_svg_lineHermite(points,
+        d3_svg_lineCardinalTangents(points, tension));
+}
+
+// Hermite spline construction; generates "C" commands.
+function d3_svg_lineHermite(points, tangents) {
+  if (tangents.length < 1
+      || (points.length != tangents.length
+      && points.length != tangents.length + 2)) {
+    return d3_svg_lineLinear(points);
+  }
+
+  var quad = points.length != tangents.length,
+      path = "",
+      p0 = points[0],
+      p = points[1],
+      t0 = tangents[0],
+      t = t0,
+      pi = 1;
+
+  if (quad) {
+    path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3)
+        + "," + p[0] + "," + p[1];
+    p0 = points[1];
+    pi = 2;
+  }
+
+  if (tangents.length > 1) {
+    t = tangents[1];
+    p = points[pi];
+    pi++;
+    path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1])
+        + "," + (p[0] - t[0]) + "," + (p[1] - t[1])
+        + "," + p[0] + "," + p[1];
+    for (var i = 2; i < tangents.length; i++, pi++) {
+      p = points[pi];
+      t = tangents[i];
+      path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1])
+          + "," + p[0] + "," + p[1];
+    }
+  }
+
+  if (quad) {
+    var lp = points[pi];
+    path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3)
+        + "," + lp[0] + "," + lp[1];
+  }
+
+  return path;
+}
+
+// Generates tangents for a cardinal spline.
+function d3_svg_lineCardinalTangents(points, tension) {
+  var tangents = [],
+      a = (1 - tension) / 2,
+      p0,
+      p1 = points[0],
+      p2 = points[1],
+      i = 1,
+      n = points.length;
+  while (++i < n) {
+    p0 = p1;
+    p1 = p2;
+    p2 = points[i];
+    tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]);
+  }
+  return tangents;
+}
+
+// B-spline interpolation; generates "C" commands.
+function d3_svg_lineBasis(points) {
+  if (points.length < 3) return d3_svg_lineLinear(points);
+  var path = [],
+      i = 1,
+      n = points.length,
+      pi = points[0],
+      x0 = pi[0],
+      y0 = pi[1],
+      px = [x0, x0, x0, (pi = points[1])[0]],
+      py = [y0, y0, y0, pi[1]];
+  path.push(x0, ",", y0);
+  d3_svg_lineBasisBezier(path, px, py);
+  while (++i < n) {
+    pi = points[i];
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  i = -1;
+  while (++i < 2) {
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  return path.join("");
+}
+
+// Open B-spline interpolation; generates "C" commands.
+function d3_svg_lineBasisOpen(points) {
+  if (points.length < 4) return d3_svg_lineLinear(points);
+  var path = [],
+      i = -1,
+      n = points.length,
+      pi,
+      px = [0],
+      py = [0];
+  while (++i < 3) {
+    pi = points[i];
+    px.push(pi[0]);
+    py.push(pi[1]);
+  }
+  path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px)
+    + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
+  --i; while (++i < n) {
+    pi = points[i];
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  return path.join("");
+}
+
+// Closed B-spline interpolation; generates "C" commands.
+function d3_svg_lineBasisClosed(points) {
+  var path,
+      i = -1,
+      n = points.length,
+      m = n + 4,
+      pi,
+      px = [],
+      py = [];
+  while (++i < 4) {
+    pi = points[i % n];
+    px.push(pi[0]);
+    py.push(pi[1]);
+  }
+  path = [
+    d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",",
+    d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)
+  ];
+  --i; while (++i < m) {
+    pi = points[i % n];
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  return path.join("");
+}
+
+function d3_svg_lineBundle(points, tension) {
+  var n = points.length - 1,
+      x0 = points[0][0],
+      y0 = points[0][1],
+      dx = points[n][0] - x0,
+      dy = points[n][1] - y0,
+      i = -1,
+      p,
+      t;
+  while (++i <= n) {
+    p = points[i];
+    t = i / n;
+    p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
+    p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
+  }
+  return d3_svg_lineBasis(points);
+}
+
+// Returns the dot product of the given four-element vectors.
+function d3_svg_lineDot4(a, b) {
+  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
+}
+
+// Matrix to transform basis (b-spline) control points to bezier
+// control points. Derived from FvD 11.2.8.
+var d3_svg_lineBasisBezier1 = [0, 2/3, 1/3, 0],
+    d3_svg_lineBasisBezier2 = [0, 1/3, 2/3, 0],
+    d3_svg_lineBasisBezier3 = [0, 1/6, 2/3, 1/6];
+
+// Pushes a "C" BÃ©zier curve onto the specified path array, given the
+// two specified four-element arrays which define the control points.
+function d3_svg_lineBasisBezier(path, x, y) {
+  path.push(
+      "C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
+}
+
+// Computes the slope from points p0 to p1.
+function d3_svg_lineSlope(p0, p1) {
+  return (p1[1] - p0[1]) / (p1[0] - p0[0]);
+}
+
+// Compute three-point differences for the given points.
+// http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Finite_difference
+function d3_svg_lineFiniteDifferences(points) {
+  var i = 0,
+      j = points.length - 1,
+      m = [],
+      p0 = points[0],
+      p1 = points[1],
+      d = m[0] = d3_svg_lineSlope(p0, p1);
+  while (++i < j) {
+    m[i] = d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]));
+  }
+  m[i] = d;
+  return m;
+}
+
+// Interpolates the given points using Fritsch-Carlson Monotone cubic Hermite
+// interpolation. Returns an array of tangent vectors. For details, see
+// http://en.wikipedia.org/wiki/Monotone_cubic_interpolation
+function d3_svg_lineMonotoneTangents(points) {
+  var tangents = [],
+      d,
+      a,
+      b,
+      s,
+      m = d3_svg_lineFiniteDifferences(points),
+      i = -1,
+      j = points.length - 1;
+
+  // The first two steps are done by computing finite-differences:
+  // 1. Compute the slopes of the secant lines between successive points.
+  // 2. Initialize the tangents at every point as the average of the secants.
+
+  // Then, for each segmentâŠ
+  while (++i < j) {
+    d = d3_svg_lineSlope(points[i], points[i + 1]);
+
+    // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set
+    // mk = m{k + 1} = 0 as the spline connecting these points must be flat to
+    // preserve monotonicity. Ignore step 4 and 5 for those k.
+
+    if (Math.abs(d) < 1e-6) {
+      m[i] = m[i + 1] = 0;
+    } else {
+      // 4. Let ak = mk / dk and bk = m{k + 1} / dk.
+      a = m[i] / d;
+      b = m[i + 1] / d;
+
+      // 5. Prevent overshoot and ensure monotonicity by restricting the
+      // magnitude of vector <ak, bk> to a circle of radius 3.
+      s = a * a + b * b;
+      if (s > 9) {
+        s = d * 3 / Math.sqrt(s);
+        m[i] = s * a;
+        m[i + 1] = s * b;
+      }
+    }
+  }
+
+  // Compute the normalized tangent vector from the slopes. Note that if x is
+  // not monotonic, it's possible that the slope will be infinite, so we protect
+  // against NaN by setting the coordinate to zero.
+  i = -1; while (++i <= j) {
+    s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])
+      / (6 * (1 + m[i] * m[i]));
+    tangents.push([s || 0, m[i] * s || 0]);
+  }
+
+  return tangents;
+}
+
+function d3_svg_lineMonotone(points) {
+  return points.length < 3
+      ? d3_svg_lineLinear(points)
+      : points[0] +
+        d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
+}
+d3.svg.line.radial = function() {
+  var line = d3_svg_line(d3_svg_lineRadial);
+  line.radius = line.x, delete line.x;
+  line.angle = line.y, delete line.y;
+  return line;
+};
+
+function d3_svg_lineRadial(points) {
+  var point,
+      i = -1,
+      n = points.length,
+      r,
+      a;
+  while (++i < n) {
+    point = points[i];
+    r = point[0];
+    a = point[1] + d3_svg_arcOffset;
+    point[0] = r * Math.cos(a);
+    point[1] = r * Math.sin(a);
+  }
+  return points;
+}
+function d3_svg_area(projection) {
+  var x0 = d3_svg_lineX,
+      x1 = d3_svg_lineX,
+      y0 = 0,
+      y1 = d3_svg_lineY,
+      interpolate = "linear",
+      interpolator = d3_svg_lineInterpolators[interpolate],
+      tension = .7;
+
+  function area(d) {
+    if (d.length < 1) return null;
+    var points0 = d3_svg_linePoints(this, d, x0, y0),
+        points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1);
+    return "M" + interpolator(projection(points1), tension)
+         + "L" + interpolator(projection(points0.reverse()), tension)
+         + "Z";
+  }
+
+  area.x = function(x) {
+    if (!arguments.length) return x1;
+    x0 = x1 = x;
+    return area;
+  };
+
+  area.x0 = function(x) {
+    if (!arguments.length) return x0;
+    x0 = x;
+    return area;
+  };
+
+  area.x1 = function(x) {
+    if (!arguments.length) return x1;
+    x1 = x;
+    return area;
+  };
+
+  area.y = function(y) {
+    if (!arguments.length) return y1;
+    y0 = y1 = y;
+    return area;
+  };
+
+  area.y0 = function(y) {
+    if (!arguments.length) return y0;
+    y0 = y;
+    return area;
+  };
+
+  area.y1 = function(y) {
+    if (!arguments.length) return y1;
+    y1 = y;
+    return area;
+  };
+
+  area.interpolate = function(x) {
+    if (!arguments.length) return interpolate;
+    interpolator = d3_svg_lineInterpolators[interpolate = x];
+    return area;
+  };
+
+  area.tension = function(x) {
+    if (!arguments.length) return tension;
+    tension = x;
+    return area;
+  };
+
+  return area;
+}
+
+d3.svg.area = function() {
+  return d3_svg_area(Object);
+};
+
+function d3_svg_areaX(points) {
+  return function(d, i) {
+    return points[i][0];
+  };
+}
+
+function d3_svg_areaY(points) {
+  return function(d, i) {
+    return points[i][1];
+  };
+}
+d3.svg.area.radial = function() {
+  var area = d3_svg_area(d3_svg_lineRadial);
+  area.radius = area.x, delete area.x;
+  area.innerRadius = area.x0, delete area.x0;
+  area.outerRadius = area.x1, delete area.x1;
+  area.angle = area.y, delete area.y;
+  area.startAngle = area.y0, delete area.y0;
+  area.endAngle = area.y1, delete area.y1;
+  return area;
+};
+d3.svg.chord = function() {
+  var source = d3_svg_chordSource,
+      target = d3_svg_chordTarget,
+      radius = d3_svg_chordRadius,
+      startAngle = d3_svg_arcStartAngle,
+      endAngle = d3_svg_arcEndAngle;
+
+  // TODO Allow control point to be customized.
+
+  function chord(d, i) {
+    var s = subgroup(this, source, d, i),
+        t = subgroup(this, target, d, i);
+    return "M" + s.p0
+      + arc(s.r, s.p1) + (equals(s, t)
+      ? curve(s.r, s.p1, s.r, s.p0)
+      : curve(s.r, s.p1, t.r, t.p0)
+      + arc(t.r, t.p1)
+      + curve(t.r, t.p1, s.r, s.p0))
+      + "Z";
+  }
+
+  function subgroup(self, f, d, i) {
+    var subgroup = f.call(self, d, i),
+        r = radius.call(self, subgroup, i),
+        a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset,
+        a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
+    return {
+      r: r,
+      a0: a0,
+      a1: a1,
+      p0: [r * Math.cos(a0), r * Math.sin(a0)],
+      p1: [r * Math.cos(a1), r * Math.sin(a1)]
+    };
+  }
+
+  function equals(a, b) {
+    return a.a0 == b.a0 && a.a1 == b.a1;
+  }
+
+  function arc(r, p) {
+    return "A" + r + "," + r + " 0 0,1 " + p;
+  }
+
+  function curve(r0, p0, r1, p1) {
+    return "Q 0,0 " + p1;
+  }
+
+  chord.radius = function(v) {
+    if (!arguments.length) return radius;
+    radius = d3.functor(v);
+    return chord;
+  };
+
+  chord.source = function(v) {
+    if (!arguments.length) return source;
+    source = d3.functor(v);
+    return chord;
+  };
+
+  chord.target = function(v) {
+    if (!arguments.length) return target;
+    target = d3.functor(v);
+    return chord;
+  };
+
+  chord.startAngle = function(v) {
+    if (!arguments.length) return startAngle;
+    startAngle = d3.functor(v);
+    return chord;
+  };
+
+  chord.endAngle = function(v) {
+    if (!arguments.length) return endAngle;
+    endAngle = d3.functor(v);
+    return chord;
+  };
+
+  return chord;
+};
+
+function d3_svg_chordSource(d) {
+  return d.source;
+}
+
+function d3_svg_chordTarget(d) {
+  return d.target;
+}
+
+function d3_svg_chordRadius(d) {
+  return d.radius;
+}
+
+function d3_svg_chordStartAngle(d) {
+  return d.startAngle;
+}
+
+function d3_svg_chordEndAngle(d) {
+  return d.endAngle;
+}
+d3.svg.diagonal = function() {
+  var source = d3_svg_chordSource,
+      target = d3_svg_chordTarget,
+      projection = d3_svg_diagonalProjection;
+
+  function diagonal(d, i) {
+    var p0 = source.call(this, d, i),
+        p3 = target.call(this, d, i),
+        m = (p0.y + p3.y) / 2,
+        p = [p0, {x: p0.x, y: m}, {x: p3.x, y: m}, p3];
+    p = p.map(projection);
+    return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
+  }
+
+  diagonal.source = function(x) {
+    if (!arguments.length) return source;
+    source = d3.functor(x);
+    return diagonal;
+  };
+
+  diagonal.target = function(x) {
+    if (!arguments.length) return target;
+    target = d3.functor(x);
+    return diagonal;
+  };
+
+  diagonal.projection = function(x) {
+    if (!arguments.length) return projection;
+    projection = x;
+    return diagonal;
+  };
+
+  return diagonal;
+};
+
+function d3_svg_diagonalProjection(d) {
+  return [d.x, d.y];
+}
+d3.svg.diagonal.radial = function() {
+  var diagonal = d3.svg.diagonal(),
+      projection = d3_svg_diagonalProjection,
+      projection_ = diagonal.projection;
+
+  diagonal.projection = function(x) {
+    return arguments.length
+        ? projection_(d3_svg_diagonalRadialProjection(projection = x))
+        : projection;
+  };
+
+  return diagonal;
+};
+
+function d3_svg_diagonalRadialProjection(projection) {
+  return function() {
+    var d = projection.apply(this, arguments),
+        r = d[0],
+        a = d[1] + d3_svg_arcOffset;
+    return [r * Math.cos(a), r * Math.sin(a)];
+  };
+}
+d3.svg.mouse = function(container) {
+  return d3_svg_mousePoint(container, d3.event);
+};
+
+// https://bugs.webkit.org/show_bug.cgi?id=44083
+var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
+
+function d3_svg_mousePoint(container, e) {
+  var point = (container.ownerSVGElement || container).createSVGPoint();
+  if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
+    var svg = d3.select(document.body)
+      .append("svg:svg")
+        .style("position", "absolute")
+        .style("top", 0)
+        .style("left", 0);
+    var ctm = svg[0][0].getScreenCTM();
+    d3_mouse_bug44083 = !(ctm.f || ctm.e);
+    svg.remove();
+  }
+  if (d3_mouse_bug44083) {
+    point.x = e.pageX;
+    point.y = e.pageY;
+  } else {
+    point.x = e.clientX;
+    point.y = e.clientY;
+  }
+  point = point.matrixTransform(container.getScreenCTM().inverse());
+  return [point.x, point.y];
+};
+d3.svg.touches = function(container) {
+  var touches = d3.event.touches;
+  return touches ? d3_array(touches).map(function(touch) {
+    var point = d3_svg_mousePoint(container, touch);
+    point.identifier = touch.identifier;
+    return point;
+  }) : [];
+};
+d3.svg.symbol = function() {
+  var type = d3_svg_symbolType,
+      size = d3_svg_symbolSize;
+
+  function symbol(d, i) {
+    return (d3_svg_symbols[type.call(this, d, i)]
+        || d3_svg_symbols.circle)
+        (size.call(this, d, i));
+  }
+
+  symbol.type = function(x) {
+    if (!arguments.length) return type;
+    type = d3.functor(x);
+    return symbol;
+  };
+
+  // size of symbol in square pixels
+  symbol.size = function(x) {
+    if (!arguments.length) return size;
+    size = d3.functor(x);
+    return symbol;
+  };
+
+  return symbol;
+};
+
+function d3_svg_symbolSize() {
+  return 64;
+}
+
+function d3_svg_symbolType() {
+  return "circle";
+}
+
+// TODO cross-diagonal?
+var d3_svg_symbols = {
+  "circle": function(size) {
+    var r = Math.sqrt(size / Math.PI);
+    return "M0," + r
+        + "A" + r + "," + r + " 0 1,1 0," + (-r)
+        + "A" + r + "," + r + " 0 1,1 0," + r
+        + "Z";
+  },
+  "cross": function(size) {
+    var r = Math.sqrt(size / 5) / 2;
+    return "M" + -3 * r + "," + -r
+        + "H" + -r
+        + "V" + -3 * r
+        + "H" + r
+        + "V" + -r
+        + "H" + 3 * r
+        + "V" + r
+        + "H" + r
+        + "V" + 3 * r
+        + "H" + -r
+        + "V" + r
+        + "H" + -3 * r
+        + "Z";
+  },
+  "diamond": function(size) {
+    var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)),
+        rx = ry * d3_svg_symbolTan30;
+    return "M0," + -ry
+        + "L" + rx + ",0"
+        + " 0," + ry
+        + " " + -rx + ",0"
+        + "Z";
+  },
+  "square": function(size) {
+    var r = Math.sqrt(size) / 2;
+    return "M" + -r + "," + -r
+        + "L" + r + "," + -r
+        + " " + r + "," + r
+        + " " + -r + "," + r
+        + "Z";
+  },
+  "triangle-down": function(size) {
+    var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
+        ry = rx * d3_svg_symbolSqrt3 / 2;
+    return "M0," + ry
+        + "L" + rx +"," + -ry
+        + " " + -rx + "," + -ry
+        + "Z";
+  },
+  "triangle-up": function(size) {
+    var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
+        ry = rx * d3_svg_symbolSqrt3 / 2;
+    return "M0," + -ry
+        + "L" + rx +"," + ry
+        + " " + -rx + "," + ry
+        + "Z";
+  }
+};
+
+d3.svg.symbolTypes = d3.keys(d3_svg_symbols);
+
+var d3_svg_symbolSqrt3 = Math.sqrt(3),
+    d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
+})();
Index: Dev/branches/Demo/d3/d3.layout.js
===================================================================
--- Dev/branches/Demo/d3/d3.layout.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.layout.js	(revision 225)
@@ -0,0 +1,1923 @@
+(function(){d3.layout = {};
+// Implements hierarchical edge bundling using Holten's algorithm. For each
+// input link, a path is computed that travels through the tree, up the parent
+// hierarchy to the least common ancestor, and then back down to the destination
+// node. Each path is simply an array of nodes.
+d3.layout.bundle = function() {
+  return function(links) {
+    var paths = [],
+        i = -1,
+        n = links.length;
+    while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
+    return paths;
+  };
+};
+
+function d3_layout_bundlePath(link) {
+  var start = link.source,
+      end = link.target,
+      lca = d3_layout_bundleLeastCommonAncestor(start, end),
+      points = [start];
+  while (start !== lca) {
+    start = start.parent;
+    points.push(start);
+  }
+  var k = points.length;
+  while (end !== lca) {
+    points.splice(k, 0, end);
+    end = end.parent;
+  }
+  return points;
+}
+
+function d3_layout_bundleAncestors(node) {
+  var ancestors = [],
+      parent = node.parent;
+  while (parent != null) {
+    ancestors.push(node);
+    node = parent;
+    parent = parent.parent;
+  }
+  ancestors.push(node);
+  return ancestors;
+}
+
+function d3_layout_bundleLeastCommonAncestor(a, b) {
+  if (a === b) return a;
+  var aNodes = d3_layout_bundleAncestors(a),
+      bNodes = d3_layout_bundleAncestors(b),
+      aNode = aNodes.pop(),
+      bNode = bNodes.pop(),
+      sharedNode = null;
+  while (aNode === bNode) {
+    sharedNode = aNode;
+    aNode = aNodes.pop();
+    bNode = bNodes.pop();
+  }
+  return sharedNode;
+}
+d3.layout.chord = function() {
+  var chord = {},
+      chords,
+      groups,
+      matrix,
+      n,
+      padding = 0,
+      sortGroups,
+      sortSubgroups,
+      sortChords;
+
+  function relayout() {
+    var subgroups = {},
+        groupSums = [],
+        groupIndex = d3.range(n),
+        subgroupIndex = [],
+        k,
+        x,
+        x0,
+        i,
+        j;
+
+    chords = [];
+    groups = [];
+
+    // Compute the sum.
+    k = 0, i = -1; while (++i < n) {
+      x = 0, j = -1; while (++j < n) {
+        x += matrix[i][j];
+      }
+      groupSums.push(x);
+      subgroupIndex.push(d3.range(n));
+      k += x;
+    }
+
+    // Sort groupsâŠ
+    if (sortGroups) {
+      groupIndex.sort(function(a, b) {
+        return sortGroups(groupSums[a], groupSums[b]);
+      });
+    }
+
+    // Sort subgroupsâŠ
+    if (sortSubgroups) {
+      subgroupIndex.forEach(function(d, i) {
+        d.sort(function(a, b) {
+          return sortSubgroups(matrix[i][a], matrix[i][b]);
+        });
+      });
+    }
+
+    // Convert the sum to scaling factor for [0, 2pi].
+    // TODO Allow start and end angle to be specified.
+    // TODO Allow padding to be specified as percentage?
+    k = (2 * Math.PI - padding * n) / k;
+
+    // Compute the start and end angle for each group and subgroup.
+    x = 0, i = -1; while (++i < n) {
+      x0 = x, j = -1; while (++j < n) {
+        var di = groupIndex[i],
+            dj = subgroupIndex[i][j],
+            v = matrix[di][dj];
+        subgroups[di + "-" + dj] = {
+          index: di,
+          subindex: dj,
+          startAngle: x,
+          endAngle: x += v * k,
+          value: v
+        };
+      }
+      groups.push({
+        index: di,
+        startAngle: x0,
+        endAngle: x,
+        value: (x - x0) / k
+      });
+      x += padding;
+    }
+
+    // Generate chords for each (non-empty) subgroup-subgroup link.
+    i = -1; while (++i < n) {
+      j = i - 1; while (++j < n) {
+        var source = subgroups[i + "-" + j],
+            target = subgroups[j + "-" + i];
+        if (source.value || target.value) {
+          chords.push(source.value < target.value
+              ? {source: target, target: source}
+              : {source: source, target: target})
+        }
+      }
+    }
+
+    if (sortChords) resort();
+  }
+
+  function resort() {
+    chords.sort(function(a, b) {
+      return sortChords(a.target.value, b.target.value);
+    });
+  }
+
+  chord.matrix = function(x) {
+    if (!arguments.length) return matrix;
+    n = (matrix = x) && matrix.length;
+    chords = groups = null;
+    return chord;
+  };
+
+  chord.padding = function(x) {
+    if (!arguments.length) return padding;
+    padding = x;
+    chords = groups = null;
+    return chord;
+  };
+
+  chord.sortGroups = function(x) {
+    if (!arguments.length) return sortGroups;
+    sortGroups = x;
+    chords = groups = null;
+    return chord;
+  };
+
+  chord.sortSubgroups = function(x) {
+    if (!arguments.length) return sortSubgroups;
+    sortSubgroups = x;
+    chords = null;
+    return chord;
+  };
+
+  chord.sortChords = function(x) {
+    if (!arguments.length) return sortChords;
+    sortChords = x;
+    if (chords) resort();
+    return chord;
+  };
+
+  chord.chords = function() {
+    if (!chords) relayout();
+    return chords;
+  };
+
+  chord.groups = function() {
+    if (!groups) relayout();
+    return groups;
+  };
+
+  return chord;
+};
+// A rudimentary force layout using Gauss-Seidel.
+d3.layout.force = function() {
+  var force = {},
+      event = d3.dispatch("tick"),
+      size = [1, 1],
+      alpha,
+      friction = .9,
+      linkDistance = d3_layout_forceLinkDistance,
+      linkStrength = d3_layout_forceLinkStrength,
+      charge = -30,
+      gravity = .1,
+      theta = .8,
+      interval,
+      nodes = [],
+      links = [],
+      distances,
+      strengths;
+
+  function repulse(node, kc) {
+    return function(quad, x1, y1, x2, y2) {
+      if (quad.point !== node) {
+        var dx = quad.cx - node.x,
+            dy = quad.cy - node.y,
+            dn = 1 / Math.sqrt(dx * dx + dy * dy);
+
+        /* Barnes-Hut criterion. */
+        if ((x2 - x1) * dn < theta) {
+          var k = kc * quad.count * dn * dn;
+          node.x += dx * k;
+          node.y += dy * k;
+          return true;
+        }
+
+        if (quad.point && isFinite(dn)) {
+          var k = kc * dn * dn;
+          node.x += dx * k;
+          node.y += dy * k;
+        }
+      }
+    };
+  }
+
+  function tick() {
+    var n = nodes.length,
+        m = links.length,
+        q = d3.geom.quadtree(nodes),
+        i, // current index
+        o, // current object
+        s, // current source
+        t, // current target
+        l, // current distance
+        x, // x-distance
+        y; // y-distance
+
+    // gauss-seidel relaxation for links
+    for (i = 0; i < m; ++i) {
+      o = links[i];
+      s = o.source;
+      t = o.target;
+      x = t.x - s.x;
+      y = t.y - s.y;
+      if (l = (x * x + y * y)) {
+        l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
+        x *= l;
+        y *= l;
+        t.x -= x;
+        t.y -= y;
+        s.x += x;
+        s.y += y;
+      }
+    }
+
+    // apply gravity forces
+    var kg = alpha * gravity;
+    x = size[0] / 2;
+    y = size[1] / 2;
+    i = -1; while (++i < n) {
+      o = nodes[i];
+      o.x += (x - o.x) * kg;
+      o.y += (y - o.y) * kg;
+    }
+
+    // compute quadtree center of mass
+    d3_layout_forceAccumulate(q);
+
+    // apply charge forces
+    var kc = alpha * charge;
+    i = -1; while (++i < n) {
+      q.visit(repulse(nodes[i], kc));
+    }
+
+    // position verlet integration
+    i = -1; while (++i < n) {
+      o = nodes[i];
+      if (o.fixed) {
+        o.x = o.px;
+        o.y = o.py;
+      } else {
+        o.x -= (o.px - (o.px = o.x)) * friction;
+        o.y -= (o.py - (o.py = o.y)) * friction;
+      }
+    }
+
+    event.tick.dispatch({type: "tick", alpha: alpha});
+
+    // simulated annealing, basically
+    return (alpha *= .99) < .005;
+  }
+
+  force.on = function(type, listener) {
+    event[type].add(listener);
+    return force;
+  };
+
+  force.nodes = function(x) {
+    if (!arguments.length) return nodes;
+    nodes = x;
+    return force;
+  };
+
+  force.links = function(x) {
+    if (!arguments.length) return links;
+    links = x;
+    return force;
+  };
+
+  force.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return force;
+  };
+
+  force.linkDistance = function(x) {
+    if (!arguments.length) return linkDistance;
+    linkDistance = d3.functor(x);
+    return force;
+  };
+
+  // For backwards-compatibility.
+  force.distance = force.linkDistance;
+
+  force.linkStrength = function(x) {
+    if (!arguments.length) return linkStrength;
+    linkStrength = d3.functor(x);
+    return force;
+  };
+
+  force.friction = function(x) {
+    if (!arguments.length) return friction;
+    friction = x;
+    return force;
+  };
+
+  force.charge = function(x) {
+    if (!arguments.length) return charge;
+    charge = x;
+    return force;
+  };
+
+  force.gravity = function(x) {
+    if (!arguments.length) return gravity;
+    gravity = x;
+    return force;
+  };
+
+  force.theta = function(x) {
+    if (!arguments.length) return theta;
+    theta = x;
+    return force;
+  };
+
+  force.start = function() {
+    var i,
+        j,
+        n = nodes.length,
+        m = links.length,
+        w = size[0],
+        h = size[1],
+        neighbors,
+        o;
+
+    for (i = 0; i < n; ++i) {
+      (o = nodes[i]).index = i;
+    }
+
+    distances = [];
+    strengths = [];
+    for (i = 0; i < m; ++i) {
+      o = links[i];
+      if (typeof o.source == "number") o.source = nodes[o.source];
+      if (typeof o.target == "number") o.target = nodes[o.target];
+      distances[i] = linkDistance.call(this, o, i);
+      strengths[i] = linkStrength.call(this, o, i);
+    }
+
+    for (i = 0; i < n; ++i) {
+      o = nodes[i];
+      if (isNaN(o.x)) o.x = position("x", w);
+      if (isNaN(o.y)) o.y = position("y", h);
+      if (isNaN(o.px)) o.px = o.x;
+      if (isNaN(o.py)) o.py = o.y;
+    }
+
+    // initialize node position based on first neighbor
+    function position(dimension, size) {
+      var neighbors = neighbor(i),
+          j = -1,
+          m = neighbors.length,
+          x;
+      while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
+      return Math.random() * size;
+    }
+
+    // initialize neighbors lazily
+    function neighbor() {
+      if (!neighbors) {
+        neighbors = [];
+        for (j = 0; j < n; ++j) {
+          neighbors[j] = [];
+        }
+        for (j = 0; j < m; ++j) {
+          var o = links[j];
+          neighbors[o.source.index].push(o.target);
+          neighbors[o.target.index].push(o.source);
+        }
+      }
+      return neighbors[i];
+    }
+
+    return force.resume();
+  };
+
+  force.resume = function() {
+    alpha = .1;
+    d3.timer(tick);
+    return force;
+  };
+
+  force.stop = function() {
+    alpha = 0;
+    return force;
+  };
+
+  // use `node.call(force.drag)` to make nodes draggable
+  force.drag = function() {
+
+    this
+      .on("mouseover.force", d3_layout_forceDragOver)
+      .on("mouseout.force", d3_layout_forceDragOut)
+      .on("mousedown.force", dragdown)
+      .on("touchstart.force", dragdown);
+
+    d3.select(window)
+      .on("mousemove.force", d3_layout_forceDragMove)
+      .on("touchmove.force", d3_layout_forceDragMove)
+      .on("mouseup.force", d3_layout_forceDragUp, true)
+      .on("touchend.force", d3_layout_forceDragUp, true)
+      .on("click.force", d3_layout_forceDragClick, true);
+
+    return force;
+  };
+
+  function dragdown(d, i) {
+    var m = d3_layout_forcePoint(this.parentNode);
+    (d3_layout_forceDragNode = d).fixed = true;
+    d3_layout_forceDragMoved = false;
+    d3_layout_forceDragElement = this;
+    d3_layout_forceDragForce = force;
+    d3_layout_forceDragOffset = [m[0] - d.x, m[1] - d.y];
+    d3_layout_forceCancel();
+  }
+
+  return force;
+};
+
+var d3_layout_forceDragForce,
+    d3_layout_forceDragNode,
+    d3_layout_forceDragMoved,
+    d3_layout_forceDragOffset,
+    d3_layout_forceStopClick,
+    d3_layout_forceDragElement;
+
+function d3_layout_forceDragOver(d) {
+  d.fixed = true;
+}
+
+function d3_layout_forceDragOut(d) {
+  if (d !== d3_layout_forceDragNode) {
+    d.fixed = false;
+  }
+}
+
+function d3_layout_forcePoint(container) {
+  return d3.event.touches
+      ? d3.svg.touches(container)[0]
+      : d3.svg.mouse(container);
+}
+
+function d3_layout_forceDragMove() {
+  if (!d3_layout_forceDragNode) return;
+  var parent = d3_layout_forceDragElement.parentNode;
+
+  // O NOES! The drag element was removed from the DOM.
+  if (!parent) {
+    d3_layout_forceDragNode.fixed = false;
+    d3_layout_forceDragOffset = d3_layout_forceDragNode = d3_layout_forceDragElement = null;
+    return;
+  }
+
+  var m = d3_layout_forcePoint(parent);
+  d3_layout_forceDragMoved = true;
+  d3_layout_forceDragNode.px = m[0] - d3_layout_forceDragOffset[0];
+  d3_layout_forceDragNode.py = m[1] - d3_layout_forceDragOffset[1];
+  d3_layout_forceCancel();
+  d3_layout_forceDragForce.resume(); // restart annealing
+}
+
+function d3_layout_forceDragUp() {
+  if (!d3_layout_forceDragNode) return;
+
+  // If the node was moved, prevent the mouseup from propagating.
+  // Also prevent the subsequent click from propagating (e.g., for anchors).
+  if (d3_layout_forceDragMoved) {
+    d3_layout_forceStopClick = true;
+    d3_layout_forceCancel();
+  }
+
+  // Don't trigger this for touchend.
+  if (d3.event.type === "mouseup") {
+    d3_layout_forceDragMove();
+  }
+
+  d3_layout_forceDragNode.fixed = false;
+  d3_layout_forceDragForce =
+  d3_layout_forceDragOffset =
+  d3_layout_forceDragNode =
+  d3_layout_forceDragElement = null;
+}
+
+function d3_layout_forceDragClick() {
+  if (d3_layout_forceStopClick) {
+    d3_layout_forceCancel();
+    d3_layout_forceStopClick = false;
+  }
+}
+
+function d3_layout_forceCancel() {
+  d3.event.stopPropagation();
+  d3.event.preventDefault();
+}
+
+function d3_layout_forceAccumulate(quad) {
+  var cx = 0,
+      cy = 0;
+  quad.count = 0;
+  if (!quad.leaf) {
+    var nodes = quad.nodes,
+        n = nodes.length,
+        i = -1,
+        c;
+    while (++i < n) {
+      c = nodes[i];
+      if (c == null) continue;
+      d3_layout_forceAccumulate(c);
+      quad.count += c.count;
+      cx += c.count * c.cx;
+      cy += c.count * c.cy;
+    }
+  }
+  if (quad.point) {
+    // jitter internal nodes that are coincident
+    if (!quad.leaf) {
+      quad.point.x += Math.random() - .5;
+      quad.point.y += Math.random() - .5;
+    }
+    quad.count++;
+    cx += quad.point.x;
+    cy += quad.point.y;
+  }
+  quad.cx = cx / quad.count;
+  quad.cy = cy / quad.count;
+}
+
+function d3_layout_forceLinkDistance(link) {
+  return 20;
+}
+
+function d3_layout_forceLinkStrength(link) {
+  return 1;
+}
+d3.layout.partition = function() {
+  var hierarchy = d3.layout.hierarchy(),
+      size = [1, 1]; // width, height
+
+  function position(node, x, dx, dy) {
+    var children = node.children;
+    node.x = x;
+    node.y = node.depth * dy;
+    node.dx = dx;
+    node.dy = dy;
+    if (children) {
+      var i = -1,
+          n = children.length,
+          c,
+          d;
+      dx /= node.value;
+      while (++i < n) {
+        position(c = children[i], x, d = c.value * dx, dy);
+        x += d;
+      }
+    }
+  }
+
+  function depth(node) {
+    var children = node.children,
+        d = 0;
+    if (children) {
+      var i = -1,
+          n = children.length;
+      while (++i < n) d = Math.max(d, depth(children[i]));
+    }
+    return 1 + d;
+  }
+
+  function partition(d, i) {
+    var nodes = hierarchy.call(this, d, i);
+    position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
+    return nodes;
+  }
+
+  partition.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return partition;
+  };
+
+  return d3_layout_hierarchyRebind(partition, hierarchy);
+};
+d3.layout.pie = function() {
+  var value = Number,
+      sort = null,
+      startAngle = 0,
+      endAngle = 2 * Math.PI;
+
+  function pie(data, i) {
+
+    // Compute the start angle.
+    var a = +(typeof startAngle === "function"
+        ? startAngle.apply(this, arguments)
+        : startAngle);
+
+    // Compute the angular range (end - start).
+    var k = (typeof endAngle === "function"
+        ? endAngle.apply(this, arguments)
+        : endAngle) - startAngle;
+
+    // Optionally sort the data.
+    var index = d3.range(data.length);
+    if (sort != null) index.sort(function(i, j) {
+      return sort(data[i], data[j]);
+    });
+
+    // Compute the numeric values for each data element.
+    var values = data.map(value);
+
+    // Convert k into a scale factor from value to angle, using the sum.
+    k /= values.reduce(function(p, d) { return p + d; }, 0);
+
+    // Compute the arcs!
+    var arcs = index.map(function(i) {
+      return {
+        data: data[i],
+        value: d = values[i],
+        startAngle: a,
+        endAngle: a += d * k
+      };
+    });
+
+    // Return the arcs in the original data's order.
+    return data.map(function(d, i) {
+      return arcs[index[i]];
+    });
+  }
+
+  /**
+   * Specifies the value function *x*, which returns a nonnegative numeric value
+   * for each datum. The default value function is `Number`. The value function
+   * is passed two arguments: the current datum and the current index.
+   */
+  pie.value = function(x) {
+    if (!arguments.length) return value;
+    value = x;
+    return pie;
+  };
+
+  /**
+   * Specifies a sort comparison operator *x*. The comparator is passed two data
+   * elements from the data array, a and b; it returns a negative value if a is
+   * less than b, a positive value if a is greater than b, and zero if a equals
+   * b.
+   */
+  pie.sort = function(x) {
+    if (!arguments.length) return sort;
+    sort = x;
+    return pie;
+  };
+
+  /**
+   * Specifies the overall start angle of the pie chart. Defaults to 0. The
+   * start angle can be specified either as a constant or as a function; in the
+   * case of a function, it is evaluated once per array (as opposed to per
+   * element).
+   */
+  pie.startAngle = function(x) {
+    if (!arguments.length) return startAngle;
+    startAngle = x;
+    return pie;
+  };
+
+  /**
+   * Specifies the overall end angle of the pie chart. Defaults to 2Ï. The
+   * end angle can be specified either as a constant or as a function; in the
+   * case of a function, it is evaluated once per array (as opposed to per
+   * element).
+   */
+  pie.endAngle = function(x) {
+    if (!arguments.length) return endAngle;
+    endAngle = x;
+    return pie;
+  };
+
+  return pie;
+};
+// data is two-dimensional array of x,y; we populate y0
+d3.layout.stack = function() {
+  var values = Object,
+      order = d3_layout_stackOrders["default"],
+      offset = d3_layout_stackOffsets["zero"],
+      out = d3_layout_stackOut,
+      x = d3_layout_stackX,
+      y = d3_layout_stackY;
+
+  function stack(data, index) {
+
+    // Convert series to canonical two-dimensional representation.
+    var series = data.map(function(d, i) {
+      return values.call(stack, d, i);
+    });
+
+    // Convert each series to canonical [[x,y]] representation.
+    var points = series.map(function(d, i) {
+      return d.map(function(v, i) {
+        return [x.call(stack, v, i), y.call(stack, v, i)];
+      });
+    });
+
+    // Compute the order of series, and permute them.
+    var orders = order.call(stack, points, index);
+    series = d3.permute(series, orders);
+    points = d3.permute(points, orders);
+
+    // Compute the baselineâŠ
+    var offsets = offset.call(stack, points, index);
+
+    // And propagate it to other series.
+    var n = series.length,
+        m = series[0].length,
+        i,
+        j,
+        o;
+    for (j = 0; j < m; ++j) {
+      out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
+      for (i = 1; i < n; ++i) {
+        out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
+      }
+    }
+
+    return data;
+  }
+
+  stack.values = function(x) {
+    if (!arguments.length) return values;
+    values = x;
+    return stack;
+  };
+
+  stack.order = function(x) {
+    if (!arguments.length) return order;
+    order = typeof x === "function" ? x : d3_layout_stackOrders[x];
+    return stack;
+  };
+
+  stack.offset = function(x) {
+    if (!arguments.length) return offset;
+    offset = typeof x === "function" ? x : d3_layout_stackOffsets[x];
+    return stack;
+  };
+
+  stack.x = function(z) {
+    if (!arguments.length) return x;
+    x = z;
+    return stack;
+  };
+
+  stack.y = function(z) {
+    if (!arguments.length) return y;
+    y = z;
+    return stack;
+  };
+
+  stack.out = function(z) {
+    if (!arguments.length) return out;
+    out = z;
+    return stack;
+  };
+
+  return stack;
+}
+
+function d3_layout_stackX(d) {
+  return d.x;
+}
+
+function d3_layout_stackY(d) {
+  return d.y;
+}
+
+function d3_layout_stackOut(d, y0, y) {
+  d.y0 = y0;
+  d.y = y;
+}
+
+var d3_layout_stackOrders = {
+
+  "inside-out": function(data) {
+    var n = data.length,
+        i,
+        j,
+        max = data.map(d3_layout_stackMaxIndex),
+        sums = data.map(d3_layout_stackReduceSum),
+        index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),
+        top = 0,
+        bottom = 0,
+        tops = [],
+        bottoms = [];
+    for (i = 0; i < n; ++i) {
+      j = index[i];
+      if (top < bottom) {
+        top += sums[j];
+        tops.push(j);
+      } else {
+        bottom += sums[j];
+        bottoms.push(j);
+      }
+    }
+    return bottoms.reverse().concat(tops);
+  },
+
+  "reverse": function(data) {
+    return d3.range(data.length).reverse();
+  },
+
+  "default": function(data) {
+    return d3.range(data.length);
+  }
+
+};
+
+var d3_layout_stackOffsets = {
+
+  "silhouette": function(data) {
+    var n = data.length,
+        m = data[0].length,
+        sums = [],
+        max = 0,
+        i,
+        j,
+        o,
+        y0 = [];
+    for (j = 0; j < m; ++j) {
+      for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+      if (o > max) max = o;
+      sums.push(o);
+    }
+    for (j = 0; j < m; ++j) {
+      y0[j] = (max - sums[j]) / 2;
+    }
+    return y0;
+  },
+
+  "wiggle": function(data) {
+    var n = data.length,
+        x = data[0],
+        m = x.length,
+        max = 0,
+        i,
+        j,
+        k,
+        s1,
+        s2,
+        s3,
+        dx,
+        o,
+        o0,
+        y0 = [];
+    y0[0] = o = o0 = 0;
+    for (j = 1; j < m; ++j) {
+      for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
+      for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
+        for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
+          s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
+        }
+        s2 += s3 * data[i][j][1];
+      }
+      y0[j] = o -= s1 ? s2 / s1 * dx : 0;
+      if (o < o0) o0 = o;
+    }
+    for (j = 0; j < m; ++j) y0[j] -= o0;
+    return y0;
+  },
+
+  "expand": function(data) {
+    var n = data.length,
+        m = data[0].length,
+        k = 1 / n,
+        i,
+        j,
+        o,
+        y0 = [];
+    for (j = 0; j < m; ++j) {
+      for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+      if (o) for (i = 0; i < n; i++) data[i][j][1] /= o;
+      else for (i = 0; i < n; i++) data[i][j][1] = k;
+    }
+    for (j = 0; j < m; ++j) y0[j] = 0;
+    return y0;
+  },
+
+  "zero": function(data) {
+    var j = -1,
+        m = data[0].length,
+        y0 = [];
+    while (++j < m) y0[j] = 0;
+    return y0;
+  }
+
+};
+
+function d3_layout_stackMaxIndex(array) {
+  var i = 1,
+      j = 0,
+      v = array[0][1],
+      k,
+      n = array.length;
+  for (; i < n; ++i) {
+    if ((k = array[i][1]) > v) {
+      j = i;
+      v = k;
+    }
+  }
+  return j;
+}
+
+function d3_layout_stackReduceSum(d) {
+  return d.reduce(d3_layout_stackSum, 0);
+}
+
+function d3_layout_stackSum(p, d) {
+  return p + d[1];
+}
+d3.layout.histogram = function() {
+  var frequency = true,
+      valuer = Number,
+      ranger = d3_layout_histogramRange,
+      binner = d3_layout_histogramBinSturges;
+
+  function histogram(data, i) {
+    var bins = [],
+        values = data.map(valuer, this),
+        range = ranger.call(this, values, i),
+        thresholds = binner.call(this, range, values, i),
+        bin,
+        i = -1,
+        n = values.length,
+        m = thresholds.length - 1,
+        k = frequency ? 1 : 1 / n,
+        x;
+
+    // Initialize the bins.
+    while (++i < m) {
+      bin = bins[i] = [];
+      bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
+      bin.y = 0;
+    }
+
+    // Fill the bins, ignoring values outside the range.
+    i = -1; while(++i < n) {
+      x = values[i];
+      if ((x >= range[0]) && (x <= range[1])) {
+        bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
+        bin.y += k;
+        bin.push(data[i]);
+      }
+    }
+
+    return bins;
+  }
+
+  // Specifies how to extract a value from the associated data. The default
+  // value function is `Number`, which is equivalent to the identity function.
+  histogram.value = function(x) {
+    if (!arguments.length) return valuer;
+    valuer = x;
+    return histogram;
+  };
+
+  // Specifies the range of the histogram. Values outside the specified range
+  // will be ignored. The argument `x` may be specified either as a two-element
+  // array representing the minimum and maximum value of the range, or as a
+  // function that returns the range given the array of values and the current
+  // index `i`. The default range is the extent (minimum and maximum) of the
+  // values.
+  histogram.range = function(x) {
+    if (!arguments.length) return ranger;
+    ranger = d3.functor(x);
+    return histogram;
+  };
+
+  // Specifies how to bin values in the histogram. The argument `x` may be
+  // specified as a number, in which case the range of values will be split
+  // uniformly into the given number of bins. Or, `x` may be an array of
+  // threshold values, defining the bins; the specified array must contain the
+  // rightmost (upper) value, thus specifying n + 1 values for n bins. Or, `x`
+  // may be a function which is evaluated, being passed the range, the array of
+  // values, and the current index `i`, returning an array of thresholds. The
+  // default bin function will divide the values into uniform bins using
+  // Sturges' formula.
+  histogram.bins = function(x) {
+    if (!arguments.length) return binner;
+    binner = typeof x === "number"
+        ? function(range) { return d3_layout_histogramBinFixed(range, x); }
+        : d3.functor(x);
+    return histogram;
+  };
+
+  // Specifies whether the histogram's `y` value is a count (frequency) or a
+  // probability (density). The default value is true.
+  histogram.frequency = function(x) {
+    if (!arguments.length) return frequency;
+    frequency = !!x;
+    return histogram;
+  };
+
+  return histogram;
+};
+
+function d3_layout_histogramBinSturges(range, values) {
+  return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
+}
+
+function d3_layout_histogramBinFixed(range, n) {
+  var x = -1,
+      b = +range[0],
+      m = (range[1] - b) / n,
+      f = [];
+  while (++x <= n) f[x] = m * x + b;
+  return f;
+}
+
+function d3_layout_histogramRange(values) {
+  return [d3.min(values), d3.max(values)];
+}
+d3.layout.hierarchy = function() {
+  var sort = d3_layout_hierarchySort,
+      children = d3_layout_hierarchyChildren,
+      value = d3_layout_hierarchyValue;
+
+  // Recursively compute the node depth and value.
+  // Also converts the data representation into a standard hierarchy structure.
+  function recurse(data, depth, nodes) {
+    var childs = children.call(hierarchy, data, depth),
+        node = d3_layout_hierarchyInline ? data : {data: data};
+    node.depth = depth;
+    nodes.push(node);
+    if (childs) {
+      var i = -1,
+          n = childs.length,
+          c = node.children = [],
+          v = 0,
+          j = depth + 1;
+      while (++i < n) {
+        d = recurse(childs[i], j, nodes);
+        d.parent = node;
+        c.push(d);
+        v += d.value;
+      }
+      if (sort) c.sort(sort);
+      if (value) node.value = v;
+    } else if (value) {
+      node.value = value.call(hierarchy, data, depth);
+    }
+    return node;
+  }
+
+  // Recursively re-evaluates the node value.
+  function revalue(node, depth) {
+    var children = node.children,
+        v = 0;
+    if (children) {
+      var i = -1,
+          n = children.length,
+          j = depth + 1;
+      while (++i < n) v += revalue(children[i], j);
+    } else if (value) {
+      v = value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth);
+    }
+    if (value) node.value = v;
+    return v;
+  }
+
+  function hierarchy(d) {
+    var nodes = [];
+    recurse(d, 0, nodes);
+    return nodes;
+  }
+
+  hierarchy.sort = function(x) {
+    if (!arguments.length) return sort;
+    sort = x;
+    return hierarchy;
+  };
+
+  hierarchy.children = function(x) {
+    if (!arguments.length) return children;
+    children = x;
+    return hierarchy;
+  };
+
+  hierarchy.value = function(x) {
+    if (!arguments.length) return value;
+    value = x;
+    return hierarchy;
+  };
+
+  // Re-evaluates the `value` property for the specified hierarchy.
+  hierarchy.revalue = function(root) {
+    revalue(root, 0);
+    return root;
+  };
+
+  return hierarchy;
+};
+
+// A method assignment helper for hierarchy subclasses.
+function d3_layout_hierarchyRebind(object, hierarchy) {
+  object.sort = d3.rebind(object, hierarchy.sort);
+  object.children = d3.rebind(object, hierarchy.children);
+  object.links = d3_layout_hierarchyLinks;
+  object.value = d3.rebind(object, hierarchy.value);
+
+  // If the new API is used, enabling inlining.
+  object.nodes = function(d) {
+    d3_layout_hierarchyInline = true;
+    return (object.nodes = object)(d);
+  };
+
+  return object;
+}
+
+function d3_layout_hierarchyChildren(d) {
+  return d.children;
+}
+
+function d3_layout_hierarchyValue(d) {
+  return d.value;
+}
+
+function d3_layout_hierarchySort(a, b) {
+  return b.value - a.value;
+}
+
+// Returns an array source+target objects for the specified nodes.
+function d3_layout_hierarchyLinks(nodes) {
+  return d3.merge(nodes.map(function(parent) {
+    return (parent.children || []).map(function(child) {
+      return {source: parent, target: child};
+    });
+  }));
+}
+
+// For backwards-compatibility, don't enable inlining by default.
+var d3_layout_hierarchyInline = false;
+d3.layout.pack = function() {
+  var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort),
+      size = [1, 1];
+
+  function pack(d, i) {
+    var nodes = hierarchy.call(this, d, i),
+        root = nodes[0];
+
+    // Recursively compute the layout.
+    root.x = 0;
+    root.y = 0;
+    d3_layout_packTree(root);
+
+    // Scale the layout to fit the requested size.
+    var w = size[0],
+        h = size[1],
+        k = 1 / Math.max(2 * root.r / w, 2 * root.r / h);
+    d3_layout_packTransform(root, w / 2, h / 2, k);
+
+    return nodes;
+  }
+
+  pack.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return pack;
+  };
+
+  return d3_layout_hierarchyRebind(pack, hierarchy);
+};
+
+function d3_layout_packSort(a, b) {
+  return a.value - b.value;
+}
+
+function d3_layout_packInsert(a, b) {
+  var c = a._pack_next;
+  a._pack_next = b;
+  b._pack_prev = a;
+  b._pack_next = c;
+  c._pack_prev = b;
+}
+
+function d3_layout_packSplice(a, b) {
+  a._pack_next = b;
+  b._pack_prev = a;
+}
+
+function d3_layout_packIntersects(a, b) {
+  var dx = b.x - a.x,
+      dy = b.y - a.y,
+      dr = a.r + b.r;
+  return (dr * dr - dx * dx - dy * dy) > .001; // within epsilon
+}
+
+function d3_layout_packCircle(nodes) {
+  var xMin = Infinity,
+      xMax = -Infinity,
+      yMin = Infinity,
+      yMax = -Infinity,
+      n = nodes.length,
+      a, b, c, j, k;
+
+  function bound(node) {
+    xMin = Math.min(node.x - node.r, xMin);
+    xMax = Math.max(node.x + node.r, xMax);
+    yMin = Math.min(node.y - node.r, yMin);
+    yMax = Math.max(node.y + node.r, yMax);
+  }
+
+  // Create node links.
+  nodes.forEach(d3_layout_packLink);
+
+  // Create first node.
+  a = nodes[0];
+  a.x = -a.r;
+  a.y = 0;
+  bound(a);
+
+  // Create second node.
+  if (n > 1) {
+    b = nodes[1];
+    b.x = b.r;
+    b.y = 0;
+    bound(b);
+
+    // Create third node and build chain.
+    if (n > 2) {
+      c = nodes[2];
+      d3_layout_packPlace(a, b, c);
+      bound(c);
+      d3_layout_packInsert(a, c);
+      a._pack_prev = c;
+      d3_layout_packInsert(c, b);
+      b = a._pack_next;
+
+      // Now iterate through the rest.
+      for (var i = 3; i < n; i++) {
+        d3_layout_packPlace(a, b, c = nodes[i]);
+
+        // Search for the closest intersection.
+        var isect = 0, s1 = 1, s2 = 1;
+        for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
+          if (d3_layout_packIntersects(j, c)) {
+            isect = 1;
+            break;
+          }
+        }
+        if (isect == 1) {
+          for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
+            if (d3_layout_packIntersects(k, c)) {
+              if (s2 < s1) {
+                isect = -1;
+                j = k;
+              }
+              break;
+            }
+          }
+        }
+
+        // Update node chain.
+        if (isect == 0) {
+          d3_layout_packInsert(a, c);
+          b = c;
+          bound(c);
+        } else if (isect > 0) {
+          d3_layout_packSplice(a, j);
+          b = j;
+          i--;
+        } else { // isect < 0
+          d3_layout_packSplice(j, b);
+          a = j;
+          i--;
+        }
+      }
+    }
+  }
+
+  // Re-center the circles and return the encompassing radius.
+  var cx = (xMin + xMax) / 2,
+      cy = (yMin + yMax) / 2,
+      cr = 0;
+  for (var i = 0; i < n; i++) {
+    var node = nodes[i];
+    node.x -= cx;
+    node.y -= cy;
+    cr = Math.max(cr, node.r + Math.sqrt(node.x * node.x + node.y * node.y));
+  }
+
+  // Remove node links.
+  nodes.forEach(d3_layout_packUnlink);
+
+  return cr;
+}
+
+function d3_layout_packLink(node) {
+  node._pack_next = node._pack_prev = node;
+}
+
+function d3_layout_packUnlink(node) {
+  delete node._pack_next;
+  delete node._pack_prev;
+}
+
+function d3_layout_packTree(node) {
+  var children = node.children;
+  if (children) {
+    children.forEach(d3_layout_packTree);
+    node.r = d3_layout_packCircle(children);
+  } else {
+    node.r = Math.sqrt(node.value);
+  }
+}
+
+function d3_layout_packTransform(node, x, y, k) {
+  var children = node.children;
+  node.x = (x += k * node.x);
+  node.y = (y += k * node.y);
+  node.r *= k;
+  if (children) {
+    var i = -1, n = children.length;
+    while (++i < n) d3_layout_packTransform(children[i], x, y, k);
+  }
+}
+
+function d3_layout_packPlace(a, b, c) {
+  var da = b.r + c.r,
+      db = a.r + c.r,
+      dx = b.x - a.x,
+      dy = b.y - a.y,
+      dc = Math.sqrt(dx * dx + dy * dy),
+      cos = (db * db + dc * dc - da * da) / (2 * db * dc),
+      theta = Math.acos(cos),
+      x = cos * db,
+      h = Math.sin(theta) * db;
+  dx /= dc;
+  dy /= dc;
+  c.x = a.x + x * dx + h * dy;
+  c.y = a.y + x * dy - h * dx;
+}
+// Implements a hierarchical layout using the cluster (or dendogram) algorithm.
+d3.layout.cluster = function() {
+  var hierarchy = d3.layout.hierarchy().sort(null).value(null),
+      separation = d3_layout_treeSeparation,
+      size = [1, 1]; // width, height
+
+  function cluster(d, i) {
+    var nodes = hierarchy.call(this, d, i),
+        root = nodes[0],
+        previousNode,
+        x = 0,
+        kx,
+        ky;
+
+    // First walk, computing the initial x & y values.
+    d3_layout_treeVisitAfter(root, function(node) {
+      if (node.children) {
+        node.x = d3_layout_clusterX(node.children);
+        node.y = d3_layout_clusterY(node.children);
+      } else {
+        node.x = previousNode ? x += separation(node, previousNode) : 0;
+        node.y = 0;
+        previousNode = node;
+      }
+    });
+
+    // Compute the left-most, right-most, and depth-most nodes for extents.
+    var left = d3_layout_clusterLeft(root),
+        right = d3_layout_clusterRight(root),
+        x0 = left.x - separation(left, right) / 2,
+        x1 = right.x + separation(right, left) / 2;
+
+    // Second walk, normalizing x & y to the desired size.
+    d3_layout_treeVisitAfter(root, function(node) {
+      node.x = (node.x - x0) / (x1 - x0) * size[0];
+      node.y = (1 - node.y / root.y) * size[1];
+    });
+
+    return nodes;
+  }
+
+  cluster.separation = function(x) {
+    if (!arguments.length) return separation;
+    separation = x;
+    return cluster;
+  };
+
+  cluster.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return cluster;
+  };
+
+  return d3_layout_hierarchyRebind(cluster, hierarchy);
+};
+
+function d3_layout_clusterY(children) {
+  return 1 + d3.max(children, function(child) {
+    return child.y;
+  });
+}
+
+function d3_layout_clusterX(children) {
+  return children.reduce(function(x, child) {
+    return x + child.x;
+  }, 0) / children.length;
+}
+
+function d3_layout_clusterLeft(node) {
+  var children = node.children;
+  return children ? d3_layout_clusterLeft(children[0]) : node;
+}
+
+function d3_layout_clusterRight(node) {
+  var children = node.children;
+  return children ? d3_layout_clusterRight(children[children.length - 1]) : node;
+}
+// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm
+d3.layout.tree = function() {
+  var hierarchy = d3.layout.hierarchy().sort(null).value(null),
+      separation = d3_layout_treeSeparation,
+      size = [1, 1]; // width, height
+
+  function tree(d, i) {
+    var nodes = hierarchy.call(this, d, i),
+        root = nodes[0];
+
+    function firstWalk(node, previousSibling) {
+      var children = node.children,
+          layout = node._tree;
+      if (children) {
+        var n = children.length,
+            firstChild = children[0],
+            previousChild,
+            ancestor = firstChild,
+            child,
+            i = -1;
+        while (++i < n) {
+          child = children[i];
+          firstWalk(child, previousChild);
+          ancestor = apportion(child, previousChild, ancestor);
+          previousChild = child;
+        }
+        d3_layout_treeShift(node);
+        var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
+        if (previousSibling) {
+          layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
+          layout.mod = layout.prelim - midpoint;
+        } else {
+          layout.prelim = midpoint;
+        }
+      } else {
+        if (previousSibling) {
+          layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
+        }
+      }
+    }
+
+    function secondWalk(node, x) {
+      node.x = node._tree.prelim + x;
+      var children = node.children;
+      if (children) {
+        var i = -1,
+            n = children.length;
+        x += node._tree.mod;
+        while (++i < n) {
+          secondWalk(children[i], x);
+        }
+      }
+    }
+
+    function apportion(node, previousSibling, ancestor) {
+      if (previousSibling) {
+        var vip = node,
+            vop = node,
+            vim = previousSibling,
+            vom = node.parent.children[0],
+            sip = vip._tree.mod,
+            sop = vop._tree.mod,
+            sim = vim._tree.mod,
+            som = vom._tree.mod,
+            shift;
+        while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
+          vom = d3_layout_treeLeft(vom);
+          vop = d3_layout_treeRight(vop);
+          vop._tree.ancestor = node;
+          shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
+          if (shift > 0) {
+            d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
+            sip += shift;
+            sop += shift;
+          }
+          sim += vim._tree.mod;
+          sip += vip._tree.mod;
+          som += vom._tree.mod;
+          sop += vop._tree.mod;
+        }
+        if (vim && !d3_layout_treeRight(vop)) {
+          vop._tree.thread = vim;
+          vop._tree.mod += sim - sop;
+        }
+        if (vip && !d3_layout_treeLeft(vom)) {
+          vom._tree.thread = vip;
+          vom._tree.mod += sip - som;
+          ancestor = node;
+        }
+      }
+      return ancestor;
+    }
+
+    // Initialize temporary layout variables.
+    d3_layout_treeVisitAfter(root, function(node, previousSibling) {
+      node._tree = {
+        ancestor: node,
+        prelim: 0,
+        mod: 0,
+        change: 0,
+        shift: 0,
+        number: previousSibling ? previousSibling._tree.number + 1 : 0
+      };
+    });
+
+    // Compute the layout using Buchheim et al.'s algorithm.
+    firstWalk(root);
+    secondWalk(root, -root._tree.prelim);
+
+    // Compute the left-most, right-most, and depth-most nodes for extents.
+    var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost),
+        right = d3_layout_treeSearch(root, d3_layout_treeRightmost),
+        deep = d3_layout_treeSearch(root, d3_layout_treeDeepest),
+        x0 = left.x - separation(left, right) / 2,
+        x1 = right.x + separation(right, left) / 2,
+        y1 = deep.depth || 1;
+
+    // Clear temporary layout variables; transform x and y.
+    d3_layout_treeVisitAfter(root, function(node) {
+      node.x = (node.x - x0) / (x1 - x0) * size[0];
+      node.y = node.depth / y1 * size[1];
+      delete node._tree;
+    });
+
+    return nodes;
+  }
+
+  tree.separation = function(x) {
+    if (!arguments.length) return separation;
+    separation = x;
+    return tree;
+  };
+
+  tree.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return tree;
+  };
+
+  return d3_layout_hierarchyRebind(tree, hierarchy);
+};
+
+function d3_layout_treeSeparation(a, b) {
+  return a.parent == b.parent ? 1 : 2;
+}
+
+// function d3_layout_treeSeparationRadial(a, b) {
+//   return (a.parent == b.parent ? 1 : 2) / a.depth;
+// }
+
+function d3_layout_treeLeft(node) {
+  return node.children ? node.children[0] : node._tree.thread;
+}
+
+function d3_layout_treeRight(node) {
+  return node.children ? node.children[node.children.length - 1] : node._tree.thread;
+}
+
+function d3_layout_treeSearch(node, compare) {
+  var children = node.children;
+  if (children) {
+    var child,
+        n = children.length,
+        i = -1;
+    while (++i < n) {
+      if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
+        node = child;
+      }
+    }
+  }
+  return node;
+}
+
+function d3_layout_treeRightmost(a, b) {
+  return a.x - b.x;
+}
+
+function d3_layout_treeLeftmost(a, b) {
+  return b.x - a.x;
+}
+
+function d3_layout_treeDeepest(a, b) {
+  return a.depth - b.depth;
+}
+
+function d3_layout_treeVisitAfter(node, callback) {
+  function visit(node, previousSibling) {
+    var children = node.children;
+    if (children) {
+      var child,
+          previousChild = null,
+          i = -1,
+          n = children.length;
+      while (++i < n) {
+        child = children[i];
+        visit(child, previousChild);
+        previousChild = child;
+      }
+    }
+    callback(node, previousSibling);
+  }
+  visit(node, null);
+}
+
+function d3_layout_treeShift(node) {
+  var shift = 0,
+      change = 0,
+      children = node.children,
+      i = children.length,
+      child;
+  while (--i >= 0) {
+    child = children[i]._tree;
+    child.prelim += shift;
+    child.mod += shift;
+    shift += child.shift + (change += child.change);
+  }
+}
+
+function d3_layout_treeMove(ancestor, node, shift) {
+  ancestor = ancestor._tree;
+  node = node._tree;
+  var change = shift / (node.number - ancestor.number);
+  ancestor.change += change;
+  node.change -= change;
+  node.shift += shift;
+  node.prelim += shift;
+  node.mod += shift;
+}
+
+function d3_layout_treeAncestor(vim, node, ancestor) {
+  return vim._tree.ancestor.parent == node.parent
+      ? vim._tree.ancestor
+      : ancestor;
+}
+// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
+// Modified to support a target aspect ratio by Jeff Heer
+d3.layout.treemap = function() {
+  var hierarchy = d3.layout.hierarchy(),
+      round = Math.round,
+      size = [1, 1], // width, height
+      padding = null,
+      pad = d3_layout_treemapPadNull,
+      sticky = false,
+      stickies,
+      ratio = 0.5 * (1 + Math.sqrt(5)); // golden ratio
+
+  // Compute the area for each child based on value & scale.
+  function scale(children, k) {
+    var i = -1,
+        n = children.length,
+        child,
+        area;
+    while (++i < n) {
+      area = (child = children[i]).value * (k < 0 ? 0 : k);
+      child.area = isNaN(area) || area <= 0 ? 0 : area;
+    }
+  }
+
+  // Recursively arranges the specified node's children into squarified rows.
+  function squarify(node) {
+    if (!node.children) return;
+    var rect = pad(node),
+        row = [],
+        children = node.children.slice(), // copy-on-write
+        child,
+        best = Infinity, // the best row score so far
+        score, // the current row score
+        u = Math.min(rect.dx, rect.dy), // initial orientation
+        n;
+    scale(children, rect.dx * rect.dy / node.value);
+    row.area = 0;
+    while ((n = children.length) > 0) {
+      row.push(child = children[n - 1]);
+      row.area += child.area;
+      if ((score = worst(row, u)) <= best) { // continue with this orientation
+        children.pop();
+        best = score;
+      } else { // abort, and try a different orientation
+        row.area -= row.pop().area;
+        position(row, u, rect, false);
+        u = Math.min(rect.dx, rect.dy);
+        row.length = row.area = 0;
+        best = Infinity;
+      }
+    }
+    if (row.length) {
+      position(row, u, rect, true);
+      row.length = row.area = 0;
+    }
+    node.children.forEach(squarify);
+  }
+
+  // Recursively resizes the specified node's children into existing rows.
+  // Preserves the existing layout!
+  function stickify(node) {
+    if (!node.children) return;
+    var rect = pad(node),
+        children = node.children.slice(), // copy-on-write
+        child,
+        row = [];
+    scale(children, rect.dx * rect.dy / node.value);
+    row.area = 0;
+    while (child = children.pop()) {
+      row.push(child);
+      row.area += child.area;
+      if (child.z != null) {
+        position(row, child.z ? rect.dx : rect.dy, rect, !children.length);
+        row.length = row.area = 0;
+      }
+    }
+    node.children.forEach(stickify);
+  }
+
+  // Computes the score for the specified row, as the worst aspect ratio.
+  function worst(row, u) {
+    var s = row.area,
+        r,
+        rmax = 0,
+        rmin = Infinity,
+        i = -1,
+        n = row.length;
+    while (++i < n) {
+      if (!(r = row[i].area)) continue;
+      if (r < rmin) rmin = r;
+      if (r > rmax) rmax = r;
+    }
+    s *= s;
+    u *= u;
+    return s
+        ? Math.max((u * rmax * ratio) / s, s / (u * rmin * ratio))
+        : Infinity;
+  }
+
+  // Positions the specified row of nodes. Modifies `rect`.
+  function position(row, u, rect, flush) {
+    var i = -1,
+        n = row.length,
+        x = rect.x,
+        y = rect.y,
+        v = u ? round(row.area / u) : 0,
+        o;
+    if (u == rect.dx) { // horizontal subdivision
+      if (flush || v > rect.dy) v = rect.dy; // over+underflow
+      while (++i < n) {
+        o = row[i];
+        o.x = x;
+        o.y = y;
+        o.dy = v;
+        x += o.dx = v ? round(o.area / v) : 0;
+      }
+      o.z = true;
+      o.dx += rect.x + rect.dx - x; // rounding error
+      rect.y += v;
+      rect.dy -= v;
+    } else { // vertical subdivision
+      if (flush || v > rect.dx) v = rect.dx; // over+underflow
+      while (++i < n) {
+        o = row[i];
+        o.x = x;
+        o.y = y;
+        o.dx = v;
+        y += o.dy = v ? round(o.area / v) : 0;
+      }
+      o.z = false;
+      o.dy += rect.y + rect.dy - y; // rounding error
+      rect.x += v;
+      rect.dx -= v;
+    }
+  }
+
+  function treemap(d) {
+    var nodes = stickies || hierarchy(d),
+        root = nodes[0];
+    root.x = 0;
+    root.y = 0;
+    root.dx = size[0];
+    root.dy = size[1];
+    if (stickies) hierarchy.revalue(root);
+    scale([root], root.dx * root.dy / root.value);
+    (stickies ? stickify : squarify)(root);
+    if (sticky) stickies = nodes;
+    return nodes;
+  }
+
+  treemap.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return treemap;
+  };
+
+  treemap.padding = function(x) {
+    if (!arguments.length) return padding;
+
+    function padFunction(node) {
+      var p = x.call(treemap, node, node.depth);
+      return p == null
+          ? d3_layout_treemapPadNull(node)
+          : d3_layout_treemapPad(node, typeof p === "number" ? [p, p, p, p] : p);
+    }
+
+    function padConstant(node) {
+      return d3_layout_treemapPad(node, x);
+    }
+
+    var type;
+    pad = (padding = x) == null ? d3_layout_treemapPadNull
+        : (type = typeof x) === "function" ? padFunction
+        : type === "number" ? (x = [x, x, x, x], padConstant)
+        : padConstant;
+    return treemap;
+  };
+
+  treemap.round = function(x) {
+    if (!arguments.length) return round != Number;
+    round = x ? Math.round : Number;
+    return treemap;
+  };
+
+  treemap.sticky = function(x) {
+    if (!arguments.length) return sticky;
+    sticky = x;
+    stickies = null;
+    return treemap;
+  };
+
+  treemap.ratio = function(x) {
+    if (!arguments.length) return ratio;
+    ratio = x;
+    return treemap;
+  };
+
+  return d3_layout_hierarchyRebind(treemap, hierarchy);
+};
+
+function d3_layout_treemapPadNull(node) {
+  return {x: node.x, y: node.y, dx: node.dx, dy: node.dy};
+}
+
+function d3_layout_treemapPad(node, padding) {
+  var x = node.x + padding[3],
+      y = node.y + padding[0],
+      dx = node.dx - padding[1] - padding[3],
+      dy = node.dy - padding[0] - padding[2];
+  if (dx < 0) { x += dx / 2; dx = 0; }
+  if (dy < 0) { y += dy / 2; dy = 0; }
+  return {x: x, y: y, dx: dx, dy: dy};
+}
+})();
Index: Dev/branches/Demo/d3/d3.layout.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.layout.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.layout.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function bj(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];e<0&&(c+=e/2,e=0),f<0&&(d+=f/2,f=0);return{x:c,y:d,dx:e,dy:f}}function bi(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function bh(a,b,c){return a._tree.ancestor.parent==b.parent?a._tree.ancestor:c}function bg(a,b,c){a=a._tree,b=b._tree;var d=c/(b.number-a.number);a.change+=d,b.change-=d,b.shift+=c,b.prelim+=c,b.mod+=c}function bf(a){var b=0,c=0,d=a.children,e=d.length,f;while(--e>=0)f=d[e]._tree,f.prelim+=b,f.mod+=b,b+=f.shift+(c+=f.change)}function be(a,b){function c(a,d){var e=a.children;if(e){var f,g=null,h=-1,i=e.length;while(++h<i)f=e[h],c(f,g),g=f}b(a,d)}c(a,null)}function bd(a,b){return a.depth-b.depth}function bc(a,b){return b.x-a.x}function bb(a,b){return a.x-b.x}function ba(a,b){var c=a.children;if(c){var d,e=c.length,f=-1;while(++f<e)b(d=ba(c[f],b),a)>0&&(a=d)}return a}function _(a){return a.children?a.children[a.children.length-1]:a._tree.thread}function $(a){return a.children?a.children[0]:a._tree.thread}function Z(a,b){return a.parent==b.parent?1:2}function Y(a){var b=a.children;return b?Y(b[b.length-1]):a}function X(a){var b=a.children;return b?X(b[0]):a}function W(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function V(a){return 1+d3.max(a,function(a){return a.y})}function U(a,b,c){var d=b.r+c.r,e=a.r+c.r,f=b.x-a.x,g=b.y-a.y,h=Math.sqrt(f*f+g*g),i=(e*e+h*h-d*d)/(2*e*h),j=Math.acos(i),k=i*e,l=Math.sin(j)*e;f/=h,g/=h,c.x=a.x+k*f+l*g,c.y=a.y+k*g-l*f}function T(a,b,c,d){var e=a.children;a.x=b+=d*a.x,a.y=c+=d*a.y,a.r*=d;if(e){var f=-1,g=e.length;while(++f<g)T(e[f],b,c,d)}}function S(a){var b=a.children;b?(b.forEach(S),a.r=P(b)):a.r=Math.sqrt(a.value)}function R(a){delete a._pack_next,delete a._pack_prev}function Q(a){a._pack_next=a._pack_prev=a}function P(a){function l(a){b=Math.min(a.x-a.r,b),c=Math.max(a.x+a.r,c),d=Math.min(a.y-a.r,d),e=Math.max(a.y+a.r,e)}var b=Infinity,c=-Infinity,d=Infinity,e=-Infinity,f=a.length,g,h,i,j,k;a.forEach(Q),g=a[0],g.x=-g.r,g.y=0,l(g);if(f>1){h=a[1],h.x=h.r,h.y=0,l(h);if(f>2){i=a[2],U(g,h,i),l(i),M(g,i),g._pack_prev=i,M(i,h),h=g._pack_next;for(var m=3;m<f;m++){U(g,h,i=a[m]);var n=0,o=1,p=1;for(j=h._pack_next;j!==h;j=j._pack_next,o++)if(O(j,i)){n=1;break}if(n==1)for(k=g._pack_prev;k!==j._pack_prev;k=k._pack_prev,p++)if(O(k,i)){p<o&&(n=-1,j=k);break}n==0?(M(g,i),h=i,l(i)):n>0?(N(g,j),h=j,m--):(N(j,h),g=j,m--)}}}var q=(b+c)/2,r=(d+e)/2,s=0;for(var m=0;m<f;m++){var t=a[m];t.x-=q,t.y-=r,s=Math.max(s,t.r+Math.sqrt(t.x*t.x+t.y*t.y))}a.forEach(R);return s}function O(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return e*e-c*c-d*d>.001}function N(a,b){a._pack_next=b,b._pack_prev=a}function M(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function L(a,b){return a.value-b.value}function J(a){return d3.merge(a.map(function(a){return(a.children||[]).map(function(b){return{source:a,target:b}})}))}function I(a,b){return b.value-a.value}function H(a){return a.value}function G(a){return a.children}function F(a,b){a.sort=d3.rebind(a,b.sort),a.children=d3.rebind(a,b.children),a.links=J,a.value=d3.rebind(a,b.value),a.nodes=function(b){K=!0;return(a.nodes=a)(b)};return a}function E(a){return[d3.min(a),d3.max(a)]}function D(a,b){var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];while(++c<=b)f[c]=e*c+d;return f}function C(a,b){return D(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function B(a,b){return a+b[1]}function A(a){return a.reduce(B,0)}function z(a){var b=1,c=0,d=a[0][1],e,f=a.length;for(;b<f;++b)(e=a[b][1])>d&&(c=b,d=e);return c}function w(a,b,c){a.y0=b,a.y=c}function v(a){return a.y}function u(a){return a.x}function t(a){return 1}function s(a){return 20}function r(a){var b=0,c=0;a.count=0;if(!a.leaf){var d=a.nodes,e=d.length,f=-1,g;while(++f<e){g=d[f];if(g==null)continue;r(g),a.count+=g.count,b+=g.count*g.cx,c+=g.count*g.cy}}a.point&&(a.leaf||(a.point.x+=Math.random()-.5,a.point.y+=Math.random()-.5),a.count++,b+=a.point.x,c+=a.point.y),a.cx=b/a.count,a.cy=c/a.count}function q(){d3.event.stopPropagation(),d3.event.preventDefault()}function p(){i&&(q(),i=!1)}function o(){!f||(g&&(i=!0,q()),d3.event.type==="mouseup"&&n(),f.fixed=!1,e=h=f=j=null)}function n(){if(!!f){var a=j.parentNode;if(!a){f.fixed=!1,h=f=j=null;return}var b=m(a);g=!0,f.px=b[0]-h[0],f.py=b[1]-h[1],q(),e.resume()}}function m(a){return d3.event.touches?d3.svg.touches(a)[0]:d3.svg.mouse(a)}function l(a){a!==f&&(a.fixed=!1)}function k(a){a.fixed=!0}function c(a,c){if(a===c)return a;var d=b(a),e=b(c),f=d.pop(),g=e.pop(),h=null;while(f===g)h=f,f=d.pop(),g=e.pop();return h}function b(a){var b=[],c=a.parent;while(c!=null)b.push(a),a=c,c=c.parent;b.push(a);return b}function a(a){var b=a.source,d=a.target,e=c(b,d),f=[b];while(b!==e)b=b.parent,f.push(b);var g=f.length;while(d!==e)f.splice(g,0,d),d=d.parent;return f}d3.layout={},d3.layout.bundle=function(){return function(b){var c=[],d=-1,e=b.length;while(++d<e)c.push(a(b[d]));return c}},d3.layout.chord=function(){function k(){b.sort(function(a,b){return i(a.target.value,b.target.value)})}function j(){var a={},j=[],l=d3.range(e),m=[],n,o,p,q,r;b=[],c=[],n=0,q=-1;while(++q<e){o=0,r=-1;while(++r<e)o+=d[q][r];j.push(o),m.push(d3.range(e)),n+=o}g&&l.sort(function(a,b){return g(j[a],j[b])}),h&&m.forEach(function(a,b){a.sort(function(a,c){return h(d[b][a],d[b][c])})}),n=(2*Math.PI-f*e)/n,o=0,q=-1;while(++q<e){p=o,r=-1;while(++r<e){var s=l[q],t=m[q][r],u=d[s][t];a[s+"-"+t]={index:s,subindex:t,startAngle:o,endAngle:o+=u*n,value:u}}c.push({index:s,startAngle:p,endAngle:o,value:(o-p)/n}),o+=f}q=-1;while(++q<e){r=q-1;while(++r<e){var v=a[q+"-"+r],w=a[r+"-"+q];(v.value||w.value)&&b.push(v.value<w.value?{source:w,target:v}:{source:v,target:w})}}i&&k()}var a={},b,c,d,e,f=0,g,h,i;a.matrix=function(f){if(!arguments.length)return d;e=(d=f)&&d.length,b=c=null;return a},a.padding=function(d){if(!arguments.length)return f;f=d,b=c=null;return a},a.sortGroups=function(d){if(!arguments.length)return g;g=d,b=c=null;return a},a.sortSubgroups=function(c){if(!arguments.length)return h;h=c,b=null;return a},a.sortChords=function(c){if(!arguments.length)return i;i=c,b&&k();return a},a.chords=function(){b||j();return b},a.groups=function(){c||j();return c};return a},d3.layout.force=function(){function G(b,c){var d=m(this.parentNode);(f=b).fixed=!0,g=!1,j=this,e=a,h=[d[0]-b.x,d[1]-b.y],q()}function F(){var a=A.length,e=B.length,f=d3.geom.quadtree(A),g,h,j,k,l,m,n;for(g=0;g<e;++g){h=B[g],j=h.source,k=h.target,m=k.x-j.x,n=k.y-j.y;if(l=m*m+n*n)l=d*D[g]*((l=Math.sqrt(l))-C[g])/l,m*=l,n*=l,k.x-=m,k.y-=n,j.x+=m,j.y+=n}var o=d*x;m=c[0]/2,n=c[1]/2,g=-1;while(++g<a)h=A[g],h.x+=(m-h.x)*o,h.y+=(n-h.y)*o;r(f);var p=d*w;g=-1;while(++g<a)f.visit(E(A[g],p));g=-1;while(++g<a)h=A[g],h.fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*i,h.y-=(h.py-(h.py=h.y))*i);b.tick.dispatch({type:"tick",alpha:d});return(d*=.99)<.005}function E(a,b){return function(c,d,e,f,g){if(c.point!==a){var h=c.cx-a.x,i=c.cy-a.y,j=1/Math.sqrt(h*h+i*i);if((f-d)*j<y){var k=b*c.count*j*j;a.x+=h*k,a.y+=i*k;return!0}if(c.point&&isFinite(j)){var k=b*j*j;a.x+=h*k,a.y+=i*k}}}}var a={},b=d3.dispatch("tick"),c=[1,1],d,i=.9,u=s,v=t,w=-30,x=.1,y=.8,z,A=[],B=[],C,D;a.on=function(c,d){b[c].add(d);return a},a.nodes=function(b){if(!arguments.length)return A;A=b;return a},a.links=function(b){if(!arguments.length)return B;B=b;return a},a.size=function(b){if(!arguments.length)return c;c=b;return a},a.linkDistance=function(b){if(!arguments.length)return u;u=d3.functor(b);return a},a.distance=a.linkDistance,a.linkStrength=function(b){if(!arguments.length)return v;v=d3.functor(b);return a},a.friction=function(b){if(!arguments.length)return i;i=b;return a},a.charge=function(b){if(!arguments.length)return w;w=b;return a},a.gravity=function(b){if(!arguments.length)return x;x=b;return a},a.theta=function(b){if(!arguments.length)return y;y=b;return a},a.start=function(){function l(){if(!i){i=[];for(d=0;d<e;++d)i[d]=[];for(d=0;d<f;++d){var a=B[d];i[a.source.index].push(a.target),i[a.target.index].push(a.source)}}return i[b]}function k(a,c){var d=l(b),e=-1,f=d.length,g;while(++e<f)if(!isNaN(g=d[e][a]))return g;return Math.random()*c}var b,d,e=A.length,f=B.length,g=c[0],h=c[1],i,j;for(b=0;b<e;++b)(j=A[b]).index=b;C=[],D=[];for(b=0;b<f;++b)j=B[b],typeof j.source=="number"&&(j.source=A[j.source]),typeof j.target=="number"&&(j.target=A[j.target]),C[b]=u.call(this,j,b),D[b]=v.call(this,j,b);for(b=0;b<e;++b)j=A[b],isNaN(j.x)&&(j.x=k("x",g)),isNaN(j.y)&&(j.y=k("y",h)),isNaN(j.px)&&(j.px=j.x),isNaN(j.py)&&(j.py=j.y);return a.resume()},a.resume=function(){d=.1,d3.timer(F);return a},a.stop=function(){d=0;return a},a.drag=function(){this.on("mouseover.force",k).on("mouseout.force",l).on("mousedown.force",G).on("touchstart.force",G),d3.select(window).on("mousemove.force",n).on("touchmove.force",n).on("mouseup.force",o,!0).on("touchend.force",o,!0).on("click.force",p,!0);return a};return a};var e,f,g,h,i,j;d3.layout.partition=function(){function e(e,f){var g=a.call(this,e,f);c(g[0],0,b[0],b[1]/d(g[0]));return g}function d(a){var b=a.children,c=0;if(b){var e=-1,f=b.length;while(++e<f)c=Math.max(c,d(b[e]))}return 1+c}function c(a,b,d,e){var f=a.children;a.x=b,a.y=a.depth*e,a.dx=d,a.dy=e;if(f){var g=-1,h=f.length,i,j;d/=a.value;while(++g<h)c(i=f[g],b,j=i.value*d,e),b+=j}}var a=d3.layout.hierarchy(),b=[1,1];e.size=function(a){if(!arguments.length)return b;b=a;return e};return F(e,a)},d3.layout.pie=function(){function f(f,g){var h=+(typeof c=="function"?c.apply(this,arguments):c),i=(typeof e=="function"?e.apply(this,arguments):e)-c,j=d3.range(f.length);b!=null&&j.sort(function(a,c){return b(f[a],f[c])});var k=f.map(a);i/=k.reduce(function(a,b){return a+b},0);var l=j.map(function(a){return{data:f[a],value:d=k[a],startAngle:h,endAngle:h+=d*i}});return f.map(function(a,b){return l[j[b]]})}var a=Number,b=null,c=0,e=2*Math.PI;f.value=function(b){if(!arguments.length)return a;a=b;return f},f.sort=function(a){if(!arguments.length)return b;b=a;return f},f.startAngle=function(a){if(!arguments.length)return c;c=a;return f},f.endAngle=function(a){if(!arguments.length)return e;e=a;return f};return f},d3.layout.stack=function(){function g(h,i){var j=h.map(function(b,c){return a.call(g,b,c)}),k=j.map(function(a,b){return a.map(function(a,b){return[e.call(g,a,b),f.call(g,a,b)]})}),l=b.call(g,k,i);j=d3.permute(j,l),k=d3.permute(k,l);var m=c.call(g,k,i),n=j.length,o=j[0].length,p,q,r;for(q=0;q<o;++q){d.call(g,j[0][q],r=m[q],k[0][q][1]);for(p=1;p<n;++p)d.call(g,j[p][q],r+=k[p-1][q][1],k[p][q][1])}return h}var a=Object,b=x["default"],c=y.zero,d=w,e=u,f=v;g.values=function(b){if(!arguments.length)return a;a=b;return g},g.order=function(a){if(!arguments.length)return b;b=typeof a=="function"?a:x[a];return g},g.offset=function(a){if(!arguments.length)return c;c=typeof a=="function"?a:y[a];return g},g.x=function(a){if(!arguments.length)return e;e=a;return g},g.y=function(a){if(!arguments.length)return f;f=a;return g},g.out=function(a){if(!arguments.length)return d;d=a;return g};return g};var x={"inside-out":function(a){var b=a.length,c,d,e=a.map(z),f=a.map(A),g=d3.range(b).sort(function(a,b){return e[a]-e[b]}),h=0,i=0,j=[],k=[];for(c=0;c<b;++c)d=g[c],h<i?(h+=f[d],j.push(d)):(i+=f[d],k.push(d));return k.reverse().concat(j)},reverse:function(a){return d3.range(a.length).reverse()},"default":function(a){return d3.range(a.length)}},y={silhouette:function(a){var b=a.length,c=a[0].length,d=[],e=0,f,g,h,i=[];for(g=0;g<c;++g){for(f=0,h=0;f<b;f++)h+=a[f][g][1];h>e&&(e=h),d.push(h)}for(g=0;g<c;++g)i[g]=(e-d[g])/2;return i},wiggle:function(a){var b=a.length,c=a[0],d=c.length,e=0,f,g,h,i,j,k,l,m,n,o=[];o[0]=m=n=0;for(g=1;g<d;++g){for(f=0,i=0;f<b;++f)i+=a[f][g][1];for(f=0,j=0,l=c[g][0]-c[g-1][0];f<b;++f){for(h=0,k=(a[f][g][1]-a[f][g-1][1])/(2*l);h<f;++h)k+=(a[h][g][1]-a[h][g-1][1])/l;j+=k*a[f][g][1]}o[g]=m-=i?j/i*l:0,m<n&&(n=m)}for(g=0;g<d;++g)o[g]-=n;return o},expand:function(a){var b=a.length,c=a[0].length,d=1/b,e,f,g,h=[];for(f=0;f<c;++f){for(e=0,g=0;e<b;e++)g+=a[e][f][1];if(g)for(e=0;e<b;e++)a[e][f][1]/=g;else for(e=0;e<b;e++)a[e][f][1]=d}for(f=0;f<c;++f)h[f]=0;return h},zero:function(a){var b=-1,c=a[0].length,d=[];while(++b<c)d[b]=0;return d}};d3.layout.histogram=function(){function e(e,f){var g=[],h=e.map(b,this),i=c.call(this,h,f),j=d.call(this,i,h,f),k,f=-1,l=h.length,m=j.length-1,n=a?1:1/l,o;while(++f<m)k=g[f]=[],k.dx=j[f+1]-(k.x=j[f]),k.y=0;f=-1;while(++f<l)o=h[f],o>=i[0]&&o<=i[1]&&(k=g[d3.bisect(j,o,1,m)-1],k.y+=n,k.push(e[f]));return g}var a=!0,b=Number,c=E,d=C;e.value=function(a){if(!arguments.length)return b;b=a;return e},e.range=function(a){if(!arguments.length)return c;c=d3.functor(a);return e},e.bins=function(a){if(!arguments.length)return d;d=typeof a=="number"?function(b){return D(b,a)}:d3.functor(a);return e},e.frequency=function(b){if(!arguments.length)return a;a=!!b;return e};return e},d3.layout.hierarchy=function(){function g(a){var b=[];e(a,0,b);return b}function f(a,b){var d=a.children,e=0;if(d){var h=-1,i=d.length,j=b+1;while(++h<i)e+=f(d[h],j)}else c&&(e=c.call(g,K?a:a.data,b));c&&(a.value=e);return e}function e(f,h,i){var j=b.call(g,f,h),k=K?f:{data:f};k.depth=h,i.push(k);if(j){var l=-1,m=j.length,n=k.children=[],o=0,p=h+1;while(++l<m)d=e(j[l],p,i),d.parent=k,n.push(d),o+=d.value;a&&n.sort(a),c&&(k.value=o)}else c&&(k.value=c.call(g,f,h));return k}var a=I,b=G,c=H;g.sort=function(b){if(!arguments.length)return a;a=b;return g},g.children=function(a){if(!arguments.length)return b;b=a;return g},g.value=function(a){if(!arguments.length)return c;c=a;return g},g.revalue=function(a){f(a,0);return a};return g};var K=!1;d3.layout.pack=function(){function c(c,d){var e=a.call(this,c,d),f=e[0];f.x=0,f.y=0,S(f);var g=b[0],h=b[1],i=1/Math.max(2*f.r/g,2*f.r/h);T(f,g/2,h/2,i);return e}var a=d3.layout.hierarchy().sort(L),b=[1,1];c.size=function(a){if(!arguments.length)return b;b=a;return c};return F(c,a)},d3.layout.cluster=function(){function d(d,e){var f=a.call(this,d,e),g=f[0],h,i=0,j,k;be(g,function(a){a.children?(a.x=W(a.children),a.y=V(a.children)):(a.x=h?i+=b(a,h):0,a.y=0,h=a)});var l=X(g),m=Y(g),n=l.x-b(l,m)/2,o=m.x+b(m,l)/2;be(g,function(a){a.x=(a.x-n)/(o-n)*c[0],a.y=(1-a.y/g.y)*c[1]});return f}var a=d3.layout.hierarchy().sort(null).value(null),b=Z,c=[1,1];d.separation=function(a){if(!arguments.length)return b;b=a;return d},d.size=function(a){if(!arguments.length)return c;c=a;return d};return F(d,a)},d3.layout.tree=function(){function d(d,e){function j(a,c,d){if(c){var e=a,f=a,g=c,h=a.parent.children[0],i=e._tree.mod,j=f._tree.mod,k=g._tree.mod,l=h._tree.mod,m;while(g=_(g),e=$(e),g&&e)h=$(h),f=_(f),f._tree.ancestor=a,m=g._tree.prelim+k-e._tree.prelim-i+b(g,e),m>0&&(bg(bh(g,a,d),a,m),i+=m,j+=m),k+=g._tree.mod,i+=e._tree.mod,l+=h._tree.mod,j+=f._tree.mod;g&&!_(f)&&(f._tree.thread=g,f._tree.mod+=k-j),e&&!$(h)&&(h._tree.thread=e,h._tree.mod+=i-l,d=a)}return d}function i(a,b){a.x=a._tree.prelim+b;var c=a.children;if(c){var d=-1,e=c.length;b+=a._tree.mod;while(++d<e)i(c[d],b)}}function h(a,c){var d=a.children,e=a._tree;if(d){var f=d.length,g=d[0],i,k=g,l,m=-1;while(++m<f)l=d[m],h(l,i),k=j(l,i,k),i=l;bf(a);var n=.5*(g._tree.prelim+l._tree.prelim);c?(e.prelim=c._tree.prelim+b(a,c),e.mod=e.prelim-n):e.prelim=n}else c&&(e.prelim=c._tree.prelim+b(a,c))}var f=a.call(this,d,e),g=f[0];be(g,function(a,b){a._tree={ancestor:a,prelim:0,mod:0,change:0,shift:0,number:b?b._tree.number+1:0}}),h(g),i(g,-g._tree.prelim);var k=ba(g,bc),l=ba(g,bb),m=ba(g,bd),n=k.x-b(k,l)/2,o=l.x+b(l,k)/2,p=m.depth||1;be(g,function(a){a.x=(a.x-n)/(o-n)*c[0],a.y=a.depth/p*c[1],delete a._tree});return f}var a=d3.layout.hierarchy().sort(null).value(null),b=Z,c=[1,1];d.separation=function(a){if(!arguments.length)return b;b=a;return d},d.size=function(a){if(!arguments.length)return c;c=a;return d};return F(d,a)},d3.layout.treemap=function(){function n(b){var d=g||a(b),e=d[0];e.x=0,e.y=0,e.dx=c[0],e.dy=c[1],g&&a.revalue(e),i([e],e.dx*e.dy/e.value),(g?k:j)(e),f&&(g=d);return d}function m(a,c,d,e){var f=-1,g=a.length,h=d.x,i=d.y,j=c?b(a.area/c):0,k;if(c==d.dx){if(e||j>d.dy)j=d.dy;while(++f<g)k=a[f],k.x=h,k.y=i,k.dy=j,h+=k.dx=j?b(k.area/j):0;k.z=!0,k.dx+=d.x+d.dx-h,d.y+=j,d.dy-=j}else{if(e||j>d.dx)j=d.dx;while(++f<g)k=a[f],k.x=h,k.y=i,k.dx=j,i+=k.dy=j?b(k.area/j):0;k.z=!1,k.dy+=d.y+d.dy-i,d.x+=j,d.dx-=j}}function l(a,b){var c=a.area,d,e=0,f=Infinity,g=-1,i=a.length;while(++g<i){if(!(d=a[g].area))continue;d<f&&(f=d),d>e&&(e=d)}c*=c,b*=b;return c?Math.max(b*e*h/c,c/(b*f*h)):Infinity}function k(a){if(!!a.children){var b=e(a),c=a.children.slice(),d,f=[];i(c,b.dx*b.dy/a.value),f.area=0;while(d=c.pop())f.push(d),f.area+=d.area,d.z!=null&&(m(f,d.z?b.dx:b.dy,b,!c.length),f.length=f.area=0);a.children.forEach(k)}}function j(a){if(!!a.children){var b=e(a),c=[],d=a.children.slice(),f,g=Infinity,h,k=Math.min(b.dx,b.dy),n;i(d,b.dx*b.dy/a.value),c.area=0;while((n=d.length)>0)c.push(f=d[n-1]),c.area+=f.area,(h=l(c,k))<=g?(d.pop(),g=h):(c.area-=c.pop().area,m(c,k,b,!1),k=Math.min(b.dx,b.dy),c.length=c.area=0,g=Infinity);c.length&&(m(c,k,b,!0),c.length=c.area=0),a.children.forEach(j)}}function i(a,b){var c=-1,d=a.length,e,f;while(++c<d)f=(e=a[c]).value*(b<0?0:b),e.area=isNaN(f)||f<=0?0:f}var a=d3.layout.hierarchy(),b=Math.round,c=[1,1],d=null,e=bi,f=!1,g,h=.5*(1+Math.sqrt(5));n.size=function(a){if(!arguments.length)return c;c=a;return n},n.padding=function(a){function c(b){return bj(b,a)}function b(b){var c=a.call(n,b,b.depth);return c==null?bi(b):bj(b,typeof c=="number"?[c,c,c,c]:c)}if(!arguments.length)return d;var f;e=(d=a)==null?bi:(f=typeof a)==="function"?b:f==="number"?(a=[a,a,a,a],c):c;return n},n.round=function(a){if(!arguments.length)return b!=Number;b=a?Math.round:Number;return n},n.sticky=function(a){if(!arguments.length)return f;f=a,g=null;return n},n.ratio=function(a){if(!arguments.length)return h;h=a;return n};return F(n,a)}})()
Index: Dev/branches/Demo/d3/d3.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.min.js	(revision 225)
@@ -0,0 +1,2 @@
+(function(){function ct(){return"circle"}function cs(){return 64}function cr(a,b){var c=(a.ownerSVGElement||a).createSVGPoint();if(cq<0&&(window.scrollX||window.scrollY)){var d=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),e=d[0][0].getScreenCTM();cq=!e.f&&!e.e,d.remove()}cq?(c.x=b.pageX,c.y=b.pageY):(c.x=b.clientX,c.y=b.clientY),c=c.matrixTransform(a.getScreenCTM().inverse());return[c.x,c.y]}function cp(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+bB;return[c*Math.cos(d),c*Math.sin(d)]}}function co(a){return[a.x,a.y]}function cn(a){return a.endAngle}function cm(a){return a.startAngle}function cl(a){return a.radius}function ck(a){return a.target}function cj(a){return a.source}function ci(a){return function(b,c){return a[c][1]}}function ch(a){return function(b,c){return a[c][0]}}function cg(a){function i(f){if(f.length<1)return null;var i=bI(this,f,b,d),j=bI(this,f,b===c?ch(i):c,d===e?ci(i):e);return"M"+g(a(j),h)+"L"+g(a(i.reverse()),h)+"Z"}var b=bJ,c=bJ,d=0,e=bK,f="linear",g=bL[f],h=.7;i.x=function(a){if(!arguments.length)return c;b=c=a;return i},i.x0=function(a){if(!arguments.length)return b;b=a;return i},i.x1=function(a){if(!arguments.length)return c;c=a;return i},i.y=function(a){if(!arguments.length)return e;d=e=a;return i},i.y0=function(a){if(!arguments.length)return d;d=a;return i},i.y1=function(a){if(!arguments.length)return e;e=a;return i},i.interpolate=function(a){if(!arguments.length)return f;g=bL[f=a];return i},i.tension=function(a){if(!arguments.length)return h;h=a;return i};return i}function cf(a){var b,c=-1,d=a.length,e,f;while(++c<d)b=a[c],e=b[0],f=b[1]+bB,b[0]=e*Math.cos(f),b[1]=e*Math.sin(f);return a}function ce(a){return a.length<3?bM(a):a[0]+bS(a,cd(a))}function cd(a){var b=[],c,d,e,f,g=cc(a),h=-1,i=a.length-1;while(++h<i)c=cb(a[h],a[h+1]),Math.abs(c)<1e-6?g[h]=g[h+1]=0:(d=g[h]/c,e=g[h+1]/c,f=d*d+e*e,f>9&&(f=c*3/Math.sqrt(f),g[h]=f*d,g[h+1]=f*e));h=-1;while(++h<=i)f=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),b.push([f||0,g[h]*f||0]);return b}function cc(a){var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=cb(e,f);while(++b<c)d[b]=g+(g=cb(e=f,f=a[b+1]));d[b]=g;return d}function cb(a,b){return(b[1]-a[1])/(b[0]-a[0])}function ca(a,b,c){a.push("C",bY(bZ,b),",",bY(bZ,c),",",bY(b$,b),",",bY(b$,c),",",bY(b_,b),",",bY(b_,c))}function bY(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function bX(a,b){var c=a.length-1,d=a[0][0],e=a[0][1],f=a[c][0]-d,g=a[c][1]-e,h=-1,i,j;while(++h<=c)i=a[h],j=h/c,i[0]=b*i[0]+(1-b)*(d+j*f),i[1]=b*i[1]+(1-b)*(e+j*g);return bU(a)}function bW(a){var b,c=-1,d=a.length,e=d+4,f,g=[],h=[];while(++c<4)f=a[c%d],g.push(f[0]),h.push(f[1]);b=[bY(b_,g),",",bY(b_,h)],--c;while(++c<e)f=a[c%d],g.shift(),g.push(f[0]),h.shift(),h.push(f[1]),ca(b,g,h);return b.join("")}function bV(a){if(a.length<4)return bM(a);var b=[],c=-1,d=a.length,e,f=[0],g=[0];while(++c<3)e=a[c],f.push(e[0]),g.push(e[1]);b.push(bY(b_,f)+","+bY(b_,g)),--c;while(++c<d)e=a[c],f.shift(),f.push(e[0]),g.shift(),g.push(e[1]),ca(b,f,g);return b.join("")}function bU(a){if(a.length<3)return bM(a);var b=[],c=1,d=a.length,e=a[0],f=e[0],g=e[1],h=[f,f,f,(e=a[1])[0]],i=[g,g,g,e[1]];b.push(f,",",g),ca(b,h,i);while(++c<d)e=a[c],h.shift(),h.push(e[0]),i.shift(),i.push(e[1]),ca(b,h,i);c=-1;while(++c<2)h.shift(),h.push(e[0]),i.shift(),i.push(e[1]),ca(b,h,i);return b.join("")}function bT(a,b){var c=[],d=(1-b)/2,e,f=a[0],g=a[1],h=1,i=a.length;while(++h<i)e=f,f=g,g=a[h],c.push([d*(g[0]-e[0]),d*(g[1]-e[1])]);return c}function bS(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return bM(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;c&&(d+="Q"+(f[0]-g[0]*2/3)+","+(f[1]-g[1]*2/3)+","+f[0]+","+f[1],e=a[1],i=2);if(b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+h[0]*2/3)+","+(f[1]+h[1]*2/3)+","+k[0]+","+k[1]}return d}function bR(a,b,c){return a.length<3?bM(a):a[0]+bS(a,bT(a,b))}function bQ(a,b){return a.length<3?bM(a):a[0]+bS((a.push(a[0]),a),bT([a[a.length-2]].concat(a,[a[1]]),b))}function bP(a,b){return a.length<4?bM(a):a[1]+bS(a.slice(1,a.length-1),bT(a,b))}function bO(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("H",(e=a[c])[0],"V",e[1]);return b.join("")}function bN(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("V",(e=a[c])[1],"H",e[0]);return b.join("")}function bM(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("L",(e=a[c])[0],",",e[1]);return b.join("")}function bK(a){return a[1]}function bJ(a){return a[0]}function bI(a,b,c,d){var e=[],f=-1,g=b.length,h=typeof c=="function",i=typeof d=="function",j;if(h&&i)while(++f<g)e.push([c.call(a,j=b[f],f),d.call(a,j,f)]);else if(h)while(++f<g)e.push([c.call(a,b[f],f),d]);else if(i)while(++f<g)e.push([c,d.call(a,b[f],f)]);else while(++f<g)e.push([c,d]);return e}function bH(a){function g(d){return d.length<1?null:"M"+e(a(bI(this,d,b,c)),f)}var b=bJ,c=bK,d="linear",e=bL[d],f=.7;g.x=function(a){if(!arguments.length)return b;b=a;return g},g.y=function(a){if(!arguments.length)return c;c=a;return g},g.interpolate=function(a){if(!arguments.length)return d;e=bL[d=a];return g},g.tension=function(a){if(!arguments.length)return f;f=a;return g};return g}function bG(a){return a.endAngle}function bF(a){return a.startAngle}function bE(a){return a.outerRadius}function bD(a){return a.innerRadius}function bw(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function bv(a){return a.toPrecision(1)}function bu(a){return-Math.log(-a)/Math.LN10}function bt(a){return Math.log(a)/Math.LN10}function bs(a,b,c,d){var e=[],f=[],g=0,h=a.length;while(++g<h)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,a.length-1)-1;return f[c](e[c](b))}}function br(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function bq(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(bo(a,b)[2])/Math.LN10+.01))+"f")}function bp(a,b){return d3.range.apply(d3,bo(a,b))}function bo(a,b){var c=bj(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+e*.5,c[2]=e;return c}function bn(a){a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1);return{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function bm(a,b){a.range=d3.rebind(a,b.range),a.rangeRound=d3.rebind(a,b.rangeRound),a.interpolate=d3.rebind(a,b.interpolate),a.clamp=d3.rebind(a,b.clamp);return a}function bl(){return Math}function bk(a,b){var c=0,d=a.length-1,e=a[c],f=a[d],g;f<e&&(g=c,c=d,d=g,g=e,e=f,f=g),b=b(f-e),a[c]=b.floor(e),a[d]=b.ceil(f);return a}function bj(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function bi(){}function bg(){var a=null,b=bb,c=Infinity;while(b)b.flush?b=a?a.next=b.next:bb=b.next:(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function bf(){var a,b=Date.now(),c=bb;while(c)a=b-c.then,a>c.delay&&(c.flush=c.callback(a)),c=c.next;var d=bg()-b;d>24?(isFinite(d)&&(clearTimeout(bd),bd=setTimeout(bf,d)),bc=0):(bc=1,bh(bf))}function be(a,b){var c=Date.now(),d=!1,e,f=bb;if(!!isFinite(b)){while(f){if(f.callback===a){f.then=c,f.delay=b,d=!0;break}e=f,f=f.next}d||(bb={callback:a,then:c,delay:b,next:bb}),bc||(bd=clearTimeout(bd),bc=1,bh(bf))}}function ba(a){return typeof a=="function"?function(b,c,d){var e=a.call(this,b,c)+"";return d!=e&&d3.interpolate(d,e)}:(a=a+"",function(b,c,d){return d!=a&&d3.interpolate(d,a)})}function _(a){function n(b){var h=!0,l=-1;a.each(function(){if(i[++l]!==2){var a=(b-j[l])/k[l],n=this.__transition__,o,p,q=e[l];if(a<1){h=!1;if(a<0)return}else a=1;if(i[l]){if(!n||n.active!==c){i[l]=2;return}}else{if(!n||n.active>c){i[l]=2;return}i[l]=1,g.start.dispatch.apply(this,arguments),q=e[l]={},n.active=c;for(p in d)if(o=d[p].apply(this,arguments))q[p]=o}o=m(a);for(p in q)q[p].call(this,o);if(a===1){i[l]=2;if(n.active===c){var r=n.owner;r===c&&(delete this.__transition__,f&&this.parentNode&&this.parentNode.removeChild(this)),$=c,g.end.dispatch.apply(this,arguments),$=0,n.owner=r}}}});return h}var b={},c=$||++Z,d={},e=[],f=!1,g=d3.dispatch("start","end"),i=[],j=[],k=[],l,m=d3.ease("cubic-in-out");a.each(function(){(this.__transition__||(this.__transition__={})).owner=c}),b.delay=function(c){var d=Infinity,e=-1;typeof c=="function"?a.each(function(a,b){var f=j[++e]=+c.apply(this,arguments);f<d&&(d=f)}):(d=+c,a.each(function(a,b){j[++e]=d})),be(n,d);return b},b.duration=function(c){var d=-1;typeof c=="function"?(l=0,a.each(function(a,b){var e=k[++d]=+c.apply(this,arguments);e>l&&(l=e)})):(l=+c,a.each(function(a,b){k[++d]=l}));return b},b.ease=function(a){m=typeof a=="function"?a:d3.ease.apply(d3,arguments);return b},b.attrTween=function(a,c){function f(b,d){var e=c.call(this,b,d,this.getAttributeNS(a.space,a.local));return e&&function(b){this.setAttributeNS(a.space,a.local,e(b))}}function e(b,d){var e=c.call(this,b,d,this.getAttribute(a));return e&&function(b){this.setAttribute(a,e(b))}}d["attr."+a]=a.local?f:e;return b},b.attr=function(a,c){return b.attrTween(a,ba(c))},b.styleTween=function(a,c,e){function f(b,d){var f=c.call(this,b,d,window.getComputedStyle(this,null).getPropertyValue(a));return f&&function(b){this.style.setProperty(a,f(b),e)}}arguments.length<3&&(e=null),d["style."+a]=f;return b},b.style=function(a,c,d){arguments.length<3&&(d=null);return b.styleTween(a,ba(c),d)},b.text=function(a){d.text=function(b,c){this.textContent=typeof a=="function"?a.call(this,b,c):a};return b},b.select=function(b){var c,d=_(a.select(b)).ease(m);c=-1,d.delay(function(a,b){return j[++c]}),c=-1,d.duration(function(a,b){return k[++c]});return d},b.selectAll=function(b){var c,d=_(a.selectAll(b)).ease(m);c=-1,d.delay(function(a,b){return j[b?c:++c]}),c=-1,d.duration(function(a,b){return k[b?c:++c]});return d},b.remove=function(){f=!0;return b},b.each=function(a,c){g[a].add(c);return b},b.call=h;return b.delay(0).duration(250)}function Y(a){return{__data__:a}}function X(a){arguments.length||(a=d3.ascending);return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function W(a){function b(b){var c=[],d,e,f,g;for(var h=0,i=a.length;h<i;h++){f=a[h],c.push(d=[]),d.parentNode=f.parentNode;for(var j=0,k=f.length;j<k;j++)(g=f[j])?(d.push(e=b(f.parentNode)),e.__data__=g.__data__):d.push(null)}return V(c)}a.append=function(a){function d(b){return b.appendChild(document.createElementNS(a.space,a.local))}function c(b){return b.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return b(a.local?d:c)},a.insert=function(a,c){function e(b){return b.insertBefore(document.createElementNS(a.space,a.local),S(c,b))}function d(b){return b.insertBefore(document.createElement(a),S(c,b))}a=d3.ns.qualify(a);return b(a.local?e:d)};return a}function V(a){function d(b){for(var c=0,d=a.length;c<d;c++){var e=a[c];for(var f=0,g=e.length;f<g;f++){var h=e[f];if(h)return b.call(h,h.__data__,f)}}return null}function c(b){var c=[],d,e,f;for(var g=0,h=a.length;g<h;g++){e=a[g];for(var i=0,j=e.length;i<j;i++)if(f=e[i])c.push(d=b(f)),d.parentNode=f}return V(c)}function b(b){var c=[],d,e,f,g;for(var h=0,i=a.length;h<i;h++){f=a[h],c.push(d=[]),d.parentNode=f.parentNode;for(var j=0,k=f.length;j<k;j++)(g=f[j])?(d.push(e=b(g)),e&&"__data__"in g&&(e.__data__=g.__data__)):d.push(null)}return V(c)}a.select=function(a){return b(function(b){return S(a,b)})},a.selectAll=function(a){return c(function(b){return T(a,b)})},a.filter=function(b){var c=[],d,e,f;for(var g=0,h=a.length;g<h;g++){e=a[g],c.push(d=[]),d.parentNode=e.parentNode;for(var i=0,j=e.length;i<j;i++)(f=e[i])&&b.call(f,f.__data__,i)&&d.push(f)}return V(c)},a.map=function(b){var c,d;for(var e=0,f=a.length;e<f;e++){c=a[e];for(var g=0,h=c.length;g<h;g++)if(d=c[g])d.__data__=b.call(d,d.__data__,g)}return a},a.data=function(b,c){function g(a,b){var g=0,h=a.length,i=b.length,j=Math.min(h,i),k=Math.max(h,i),l=[],m=[],n=[],o,p;if(c){var q={},r=[],s,t=b.length;for(g=0;g<h;g++)s=c.call(o=a[g],o.__data__,g),s in q?n[t++]=o:q[s]=o,r.push(s);for(g=0;g<i;g++)o=q[s=c.call(b,p=b[g],g)],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=Y(p),l[g]=n[g]=null),delete q[s];for(g=0;g<h;g++)r[g]in q&&(n[g]=a[g])}else{for(;g<j;g++)o=a[g],p=b[g],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=Y(p),l[g]=n[g]=null);for(;g<i;g++)m[g]=Y(b[g]),l[g]=n[g]=null;for(;g<k;g++)n[g]=a[g],m[g]=l[g]=null}m.parentNode=l.parentNode=n.parentNode=a.parentNode,d.push(m),e.push(l),f.push(n)}var d=[],e=[],f=[],h=-1,i=a.length,j;if(typeof b=="function")while(++h<i)g(j=a[h],b.call(j,j.parentNode.__data__,h));else while(++h<i)g(j=a[h],b);var k=V(e);k.enter=function(){return W(d)},k.exit=function(){return V(f)};return k},a.each=function(b){for(var c=0,d=a.length;c<d;c++){var e=a[c];for(var f=0,g=e.length;f<g;f++){var h=e[f];h&&b.call(h,h.__data__,f)}}return a},a.empty=function(){return!d(function(){return!0})},a.node=function(){return d(function(){return this})},a.attr=function(b,c){function j(){var a=c.apply(this,arguments);a==null?this.removeAttributeNS(b.space,b.local):this.setAttributeNS(b.space,b.local,a)}function i(){var a=c.apply(this,arguments);a==null?this.removeAttribute(b):this.setAttribute(b,a)}function h(){this.setAttributeNS(b.space,b.local,c)}function g(){this.setAttribute(b,c)}function f(){this.removeAttributeNS(b.space,b.local)}function e(){this.removeAttribute(b)}b=d3.ns.qualify(b);if(arguments.length<2)return d(b.local?function(){return this.getAttributeNS(b.space,b.local)}:function(){return this.getAttribute(b)});return a.each(c==null?b.local?f:e:typeof c=="function"?b.local?j:i:b.local?h:g)},a.classed=function(b,c){function i(){(c.apply(this,arguments)?f:h).call(this)}function h(){if(a=this.classList)return a.remove(b);var a=this.className,c=a.baseVal!=null,d=c?a.baseVal:a;d=g(d.replace(e," ")),c?a.baseVal=d:this.className=d}function f(){if(a=this.classList)return a.add(b);var a=this.className,c=a.baseVal!=null,d=c?a.baseVal:a;e.lastIndex=0,e.test(d)||(d=g(d+" "+b),c?a.baseVal=d:this.className=d)}var e=new RegExp("(^|\\s+)"+d3.requote(b)+"(\\s+|$)","g");if(arguments.length<2)return d(function(){if(a=this.classList)return a.contains(b);var a=this.className;e.lastIndex=0;return e.test(a.baseVal!=null?a.baseVal:a)});return a.each(typeof c=="function"?i:c?f:h)},a.style=function(b,c,e){function h(){var a=c.apply(this,arguments);a==null?this.style.removeProperty(b):this.style.setProperty(b,a,e)}function g(){this.style.setProperty(b,c,e)}function f(){this.style.removeProperty(b)}arguments.length<3&&(e="");if(arguments.length<2)return d(function(){return window.getComputedStyle(this,null).getPropertyValue(b)});return a.each(c==null?f:typeof c=="function"?h:g)},a.property=function(b,c){function g(){var a=c.apply(this,arguments);a==null?delete this[b]:this[b]=a}function f(){this[b]=c}function e(){delete this[b]}b=d3.ns.qualify(b);if(arguments.length<2)return d(function(){return this[b]});return a.each(c==null?e:typeof c=="function"?g:f)},a.text=function(b){function e(){this.textContent=b.apply(this,arguments)}function c(){this.textContent=b}if(arguments.length<1)return d(function(){return this.textContent});return a.each(typeof b=="function"?e:c)},a.html=function(b){function e(){this.innerHTML=b.apply(this,arguments)}function c(){this.innerHTML=b}if(arguments.length<1)return d(function(){return this.innerHTML});return a.each(typeof b=="function"?e:c)},a.append=function(a){function d(b){return b.appendChild(document.createElementNS(a.space,a.local))}function c(b){return b.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return b(a.local?d:c)},a.insert=function(a,c){function e(b){return b.insertBefore(document.createElementNS(a.space,a.local),S(c,b))}function d(b){return b.insertBefore(document.createElement(a),S(c,b))}a=d3.ns.qualify(a);return b(a.local?e:d)},a.remove=function(){return a.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},a.sort=function(b){b=X.apply(this,arguments);for(var c=0,d=a.length;c<d;c++){var e=a[c];e.sort(b);for(var f=1,g=e.length,h=e[0];f<g;f++){var i=e[f];i&&(h&&h.parentNode.insertBefore(i,h.nextSibling),h=i)}}return a},a.on=function(b,c,d){arguments.length<3&&(d=!1);var e=b.indexOf("."),f=e===-1?b:b.substring(0,e),g="__on"+b;return a.each(function(a,b){function h(a){var d=d3.event;d3.event=a;try{c.call(this,e.__data__,b)}finally{d3.event=d}}this[g]&&this.removeEventListener(f,this[g],d),c&&this.addEventListener(f,this[g]=h,d);var e=this})},a.transition=function(){return _(a)},a.call=h;return a}function R(a,b,c){function g(a){return Math.round(f(a)*255)}function f(a){a>360?a-=360:a<0&&(a+=360);if(a<60)return d+(e-d)*a/60;if(a<180)return e;if(a<240)return d+(e-d)*(240-a)/60;return d}var d,e;a=a%360,a<0&&(a+=360),b=b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,e=c<=.5?c*(1+b):c+b-c*b,d=2*c-e;return H(g(a+120),g(a),g(a-120))}function Q(a,b,c){this.h=a,this.s=b,this.l=c}function P(a,b,c){return new Q(a,b,c)}function M(a){var b=parseFloat(a);return a.charAt(a.length-1)==="%"?Math.round(b*2.55):b}function L(a,b,c){var d=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),f=e-d,g,h,i=(e+d)/2;f?(h=i<.5?f/(e+d):f/(2-e-d),a==e?g=(b-c)/f+(b<c?6:0):b==e?g=(c-a)/f+2:g=(a-b)/f+4,g*=60):h=g=0;return P(g,h,i)}function K(a,b,c){var d=0,e=0,f=0,g,h,i;g=/([a-z]+)\((.*)\)/i.exec(a);if(g){h=g[2].split(",");switch(g[1]){case"hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case"rgb":return b(M(h[0]),M(h[1]),M(h[2]))}}if(i=N[a])return b(i.r,i.g,i.b);a!=null&&a.charAt(0)==="#"&&(a.length===4?(d=a.charAt(1),d+=d,e=a.charAt(2),e+=e,f=a.charAt(3),f+=f):a.length===7&&(d=a.substring(1,3),e=a.substring(3,5),f=a.substring(5,7)),d=parseInt(d,16),e=parseInt(e,16),f=parseInt(f,16));return b(d,e,f)}function J(a){return a<16?"0"+a.toString(16):a.toString(16)}function I(a,b,c){this.r=a,this.g=b,this.b=c}function H(a,b,c){return new I(a,b,c)}function G(a,b){b=1/(b-(a=+a));return function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function F(a,b){b=1/(b-(a=+a));return function(c){return(c-a)*b}}function E(a){return a in D||/\bcolor\b/.test(a)?d3.interpolateRgb:d3.interpolate}function B(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function A(a){a||(a=1.70158);return function(b){return b*b*((a+1)*b-a)}}function z(a,b){var c;arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a);return function(d){return 1+a*Math.pow(2,10*-d)*Math.sin((d-c)*2*Math.PI/b)}}function y(a){return 1-Math.sqrt(1-a*a)}function x(a){return a?Math.pow(2,10*(a-1))-.001:0}function w(a){return 1-Math.cos(a*Math.PI/2)}function v(a){return function(b){return Math.pow(b,a)}}function u(a){return a}function t(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function s(a){return function(b){return 1-a(1-b)}}function n(a){var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];while(b>0)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function m(a){return a+""}function j(a){var b={},c=[];b.add=function(a){for(var d=0;d<c.length;d++)if(c[d].listener==a)return b;c.push({listener:a,on:!0});return b},b.remove=function(a){for(var d=0;d<c.length;d++){var e=c[d];if(e.listener==a){e.on=!1,c=c.slice(0,d).concat(c.slice(d+1));break}}return b},b.dispatch=function(){var a=c;for(var b=0,d=a.length;b<d;b++){var e=a[b];e.on&&e.listener.apply(this,arguments)}};return b}function h(a){a.apply(this,(arguments[0]=this,arguments));return this}function g(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function f(a){return a==null}function e(a){return a.length}function c(a){return Array.prototype.slice.call(a)}function b(a){var b=-1,c=a.length,d=[];while(++b<c)d.push(a[b]);return d}d3={version:"1.29.1"},Date.now||(Date.now=function(){return+(new Date)}),Object.create||(Object.create=function(a){function b(){}b.prototype=a;return new b});var a=c;try{a(document.documentElement.childNodes)[0].nodeType}catch(d){a=b}d3.functor=function(a){return typeof a=="function"?a:function(){return a}},d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}},d3.ascending=function(a,b){return a<b?-1:a>b?1:0},d3.descending=function(a,b){return b<a?-1:b>a?1:0},d3.min=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&e>f&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&e>f&&(e=f)}return e},d3.max=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&f>e&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&f>e&&(e=f)}return e},d3.sum=function(a,b){var c=0,d=a.length,e,f=-1;if(arguments.length===1)while(++f<d)isNaN(e=+a[f])||(c+=e);else while(++f<d)isNaN(e=+b.call(a,a[f],f))||(c+=e);return c},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.zip=function(){if(!(f=arguments.length))return[];for(var a=-1,b=d3.min(arguments,e),c=Array(b);++a<b;)for(var d=-1,f,g=c[a]=Array(f);++d<f;)g[d]=arguments[d][a];return c},d3.bisectLeft=function(a,b,c,d){arguments.length<3&&(c=0),arguments.length<4&&(d=a.length);while(c<d){var e=c+d>>1;a[e]<b?c=e+1:d=e}return c},d3.bisect=d3.bisectRight=function(a,b,c,d){arguments.length<3&&(c=0),arguments.length<4&&(d=a.length);while(c<d){var e=c+d>>1;b<a[e]?d=e:c=e+1}return c},d3.first=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])>0&&(e=f);return e},d3.last=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])<=0&&(e=f);return e},d3.nest=function(){function g(a,d){if(d>=b.length)return a;var e=[],f=c[d++],h;for(h in a)e.push({key:h,values:g(a[h],d)});f&&e.sort(function(a,b){return f(a.key,b.key)});return e}function f(c,g){if(g>=b.length)return e?e.call(a,c):d?c.sort(d):c;var h=-1,i=c.length,j=b[g++],k,l,m={};while(++h<i)(k=j(l=c[h]))in m?m[k].push(l):m[k]=[l];for(k in m)m[k]=f(m[k],g);return m}var a={},b=[],c=[],d,e;a.map=function(a){return f(a,0)},a.entries=function(a){return g(f(a,0),0)},a.key=function(c){b.push(c);return a},a.sortKeys=function(d){c[b.length-1]=d;return a},a.sortValues=function(b){d=b;return a},a.rollup=function(b){e=b;return a};return a},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){var c=[],d=-1,e=b.length;while(++d<e)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c=[],d=[],e,g=-1,h=a.length;arguments.length<2&&(b=f);while(++g<h)b.call(d,e=a[g],g)?d=[]:(d.length||c.push(d),d.push(e));return c},d3.range=function(a,b,c){arguments.length===1&&(b=a,a=0),c==null&&(c=1);if((b-a)/c==Infinity)throw new Error("infinite range");var d=[],e=-1,f;if(c<0)while((f=a+c*++e)>b)d.push(f);else while((f=a+c*++e)<b)d.push(f);return d},d3.requote=function(a){return a.replace(i,"\\$&")};var i=/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*Math.pow(10,b))*Math.pow(10,-b):Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?c=b:b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),d.onreadystatechange=function(){d.readyState===4&&c(d.status<300?d:null)},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(a!=null){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.ns={prefix:{svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qualify:function(a){var b=a.indexOf(":");return b<0?a:{space:d3.ns.prefix[a.substring(0,b)],local:a.substring(b+1)}}},d3.dispatch=function(a){var b={},c;for(var d=0,e=arguments.length;d<e;d++)c=arguments[d],b[c]=j(c);return b},d3.format=function(a){var b=k.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=!1,o=!1;h&&(h=h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4)));switch(i){case"n":g=!0,i="g";break;case"%":j=!0,i="f";break;case"p":j=!0,i="r";break;case"d":o=!0,h="0"}i=l[i]||m;return function(a){var b=j?a*100:+a,k=b<0&&(b=-b)?"â":d;if(o&&b%1)return"";a=i(b,h);if(e){var l=a.length+k.length;l<f&&(a=Array(f-l+1).join(c)+a),g&&(a=n(a)),a=k+a}else{g&&(a=n(a)),a=k+a;var l=a.length;l<f&&(a=Array(f-l+1).join(c)+a)}j&&(a+="%");return a}};var k=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,l={g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){var c=1+Math.floor(1e-15+Math.log(a)/Math.LN10);return d3.round(a,b-c).toFixed(Math.max(0,b-c))}},o=v(2),p=v(3),q={linear:function(){return u},poly:v,quad:function(){return o},cubic:function(){return p},sin:function(){return w},exp:function(){return x},circle:function(){return y},elastic:z,back:A,bounce:function(){return B}},r={"in":function(a){return a},out:s,"in-out":t,"out-in":function(a){return t(s(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return r[d](q[c].apply(null,Array.prototype.slice.call(arguments,1)))},d3.event=null,d3.interpolate=function(a,b){var c=d3.interpolators.length,d;while(--c>=0&&!(d=d3.interpolators[c](a,b)));return d},d3.interpolateNumber=function(a,b){b-=a;return function(c){return a+b*c}},d3.interpolateRound=function(a,b){b-=a;return function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f=0,g=0,h=[],i=[],j,k;C.lastIndex=0;for(d=0;c=C.exec(b);++d)c.index&&h.push(b.substring(f,g=c.index)),i.push({i:h.length,x:c[0]}),h.push(null),f=C.lastIndex;f<b.length&&h.push(b.substring(f));for(d=0,j=i.length;(c=C.exec(a))&&d<j;++d){k=i[d];if(k.x==c[0]){if(k.i)if(h[k.i+1]==null){h[k.i-1]+=k.x,h.splice(k.i,1);for(e=d+1;e<j;++e)i[e].i--}else{h[k.i-1]+=k.x+h[k.i+1],h.splice(k.i,2);for(e=d+1;e<j;++e)i[e].i-=2}else if(h[k.i+1]==null)h[k.i]=k.x;else{h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1);for(e=d+1;e<j;++e)i[e].i--}i.splice(d,1),j--,d--}else k.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(k.x))}while(d<j)k=i.pop(),h[k.i+1]==null?h[k.i]=k.x:(h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1)),j--;if(h.length===1)return h[0]==null?i[0].x:function(){return b};return function(a){for(d=0;d<j;++d)h[(k=i[d]).i]=k.x(a);return h.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"rgb("+Math.round(c+f*a)+","+Math.round(d+g*a)+","+Math.round(e+h*a)+")"}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return function(a){return R(c+f*a,d+g*a,e+h*a).toString()}},d3.interpolateArray=function(a,b){var c=[],d=[],e=a.length,f=b.length,g=Math.min(a.length,b.length),h;for(h=0;h<g;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)d[h]=a[h];for(;h<f;++h)d[h]=b[h];return function(a){for(h=0;h<g;++h)d[h]=c[h](a);return d}},d3.interpolateObject=function(a,b){var c={},d={},e;for(e in a)e in b?c[e]=E(e)(a[e],b[e]):d[e]=a[e];for(e in b)e in a||(d[e]=b[e]);return function(a){for(e in c)d[e]=c[e](a);return d}};var C=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,D={background:1,fill:1,stroke:1};d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return typeof b=="string"&&d3.interpolateString(String(a),b)},function(a,b){return(b in N||/^(#|rgb\(|hsl\()/.test(b))&&d3.interpolateRgb(String(a),b)},function(a,b){return typeof b=="number"&&d3.interpolateNumber(+a,b)}],d3.rgb=function(a,b,c){return arguments.length===1?K(""+a,H,R):H(~~a,~~b,~~c)},I.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;if(!b&&!c&&!d)return H(e,e,e);b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e);return H(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))},I.prototype.darker=function(a){a=Math.pow(.7,arguments.length?a:1);return H(Math.max(0,Math.floor(a*this.r)),Math.max(0,Math.floor(a*this.g)),Math.max(0,Math.floor(a*this.b)))},I.prototype.hsl=function(){return L(this.r,this.g,this.b)},I.prototype.toString=function(){return"#"+J(this.r)+J(this.g)+J(this.b)};var N={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};for(var O in N)N[O]=K(N[O],H,R);d3.hsl=function(a,b,c){return arguments.length===1?K(""+a,L,P):P(+a,+b,+c)},Q.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);return P(this.h,this.s,this.l/a)},Q.prototype.darker=function(a){a=Math.pow(.7,arguments.length?a:1);return P(this.h,this.s,a*this.l)},Q.prototype.rgb=function(){return R(this.h,this.s,this.l)},Q.prototype.toString=function(){return"hsl("+this.h+","+this.s*100+"%,"+this.l*100+"%)"};var S=function(a,b){return b.querySelector(a)},T=function(b,c){return a(c.querySelectorAll(b))};typeof Sizzle=="function"&&(S=function(a,b){return Sizzle(a,b)[0]},T=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))});var U=V([[document
+]]);U[0].parentNode=document.documentElement,d3.select=function(a){return typeof a=="string"?U.select(a):V([[a]])},d3.selectAll=function(b){return typeof b=="string"?U.selectAll(b):V([a(b)])},d3.transition=U.transition;var Z=0,$=0,bb=null,bc,bd;d3.timer=function(a){be(a,0)},d3.timer.flush=function(){var a,b=Date.now(),c=bb;while(c)a=b-c.then,c.delay||(c.flush=c.callback(a)),c=c.next;bg()};var bh=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={},d3.scale.linear=function(){function h(a){return e(a)}function g(){var g=a.length==2?br:bs,i=d?G:F;e=g(a,b,i,c),f=g(b,a,i,d3.interpolate);return h}var a=[0,1],b=[0,1],c=d3.interpolate,d=!1,e,f;h.invert=function(a){return f(a)},h.domain=function(b){if(!arguments.length)return a;a=b.map(Number);return g()},h.range=function(a){if(!arguments.length)return b;b=a;return g()},h.rangeRound=function(a){return h.range(a).interpolate(d3.interpolateRound)},h.clamp=function(a){if(!arguments.length)return d;d=a;return g()},h.interpolate=function(a){if(!arguments.length)return c;c=a;return g()},h.ticks=function(b){return bp(a,b)},h.tickFormat=function(b){return bq(a,b)},h.nice=function(){bk(a,bn);return g()};return g()},d3.scale.log=function(){function d(c){return a(b(c))}var a=d3.scale.linear(),b=bt,c=b.pow;d.invert=function(b){return c(a.invert(b))},d.domain=function(e){if(!arguments.length)return a.domain().map(c);b=e[0]<0?bu:bt,c=b.pow,a.domain(e.map(b));return d},d.nice=function(){a.domain(bk(a.domain(),bl));return d},d.ticks=function(){var d=bj(a.domain()),e=[];if(d.every(isFinite)){var f=Math.floor(d[0]),g=Math.ceil(d[1]),h=c(d[0]),i=c(d[1]);if(b===bu){e.push(c(f));for(;f++<g;)for(var j=9;j>0;j--)e.push(c(f)*j)}else{for(;f<g;f++)for(var j=1;j<10;j++)e.push(c(f)*j);e.push(c(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},d.tickFormat=function(){return bv};return bm(d,a)},bt.pow=function(a){return Math.pow(10,a)},bu.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){function e(b){return a(c(b))}var a=d3.scale.linear(),b=1,c=Number,d=c;e.invert=function(b){return d(a.invert(b))},e.domain=function(f){if(!arguments.length)return a.domain().map(d);c=bw(b),d=bw(1/b),a.domain(f.map(c));return e},e.ticks=function(a){return bp(e.domain(),a)},e.tickFormat=function(a){return bq(e.domain(),a)},e.nice=function(){return e.domain(bk(e.domain(),bn))},e.exponent=function(a){if(!arguments.length)return b;var c=e.domain();b=a;return e.domain(c)};return bm(e,a)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){function f(d){var e=d in b?b[d]:b[d]=a.push(d)-1;return c[e%c.length]}var a=[],b={},c=[],d=0,e=bi;f.domain=function(c){if(!arguments.length)return a;a=c,b={};var d=-1,g=-1,h=a.length;while(++d<h)c=a[d],c in b||(b[c]=++g);e();return f},f.range=function(a){if(!arguments.length)return c;c=a,e=bi;return f},f.rangePoints=function(b,g){arguments.length<2&&(g=0),(e=function(){var e=b[0],f=b[1],h=(f-e)/(a.length-1+g);c=a.length==1?[(e+f)/2]:d3.range(e+h*g/2,f+h/2,h),d=0})();return f},f.rangeBands=function(b,g){arguments.length<2&&(g=0),(e=function(){var e=b[0],f=b[1],h=(f-e)/(a.length+g);c=d3.range(e+h*g,f,h),d=h*(1-g)})();return f},f.rangeRoundBands=function(b,g){arguments.length<2&&(g=0),(e=function(){var e=b[0],f=b[1],h=f-e,i=Math.floor(h/(a.length+g)),j=h-(a.length-g)*i;c=d3.range(e+Math.round(j/2),f,i),d=Math.round(i*(1-g))})();return f},f.rangeBand=function(){return d};return f},d3.scale.category10=function(){return d3.scale.ordinal().range(bx)},d3.scale.category20=function(){return d3.scale.ordinal().range(by)},d3.scale.category20b=function(){return d3.scale.ordinal().range(bz)},d3.scale.category20c=function(){return d3.scale.ordinal().range(bA)};var bx=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],by=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],bz=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],bA=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){function e(a){if(isNaN(a=+a))return NaN;return b[d3.bisect(c,a)]}function d(){var d=0,e=a.length,f=b.length;c.length=Math.max(0,f-1);while(++d<f)c[d-1]=d3.quantile(a,d/f)}var a=[],b=[],c=[];e.domain=function(b){if(!arguments.length)return a;a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),d();return e},e.range=function(a){if(!arguments.length)return b;b=a,d();return e},e.quantiles=function(){return c};return e},d3.scale.quantize=function(){function f(b){return e[Math.max(0,Math.min(d,Math.floor(c*(b-a))))]}var a=0,b=1,c=2,d=1,e=[0,1];f.domain=function(d){if(!arguments.length)return[a,b];a=d[0],b=d[1],c=e.length/(b-a);return f},f.range=function(g){if(!arguments.length)return e;e=g,c=e.length/(b-a),d=e.length-1;return f};return f},d3.svg={},d3.svg.arc=function(){function e(){var e=a.apply(this,arguments),f=b.apply(this,arguments),g=c.apply(this,arguments)+bB,h=d.apply(this,arguments)+bB,i=h-g,j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=bC?e?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+ -e+"A"+e+","+e+" 0 1,1 0,"+e+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":e?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+e*m+","+e*n+"A"+e+","+e+" 0 "+j+",0 "+e*k+","+e*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var a=bD,b=bE,c=bF,d=bG;e.innerRadius=function(b){if(!arguments.length)return a;a=d3.functor(b);return e},e.outerRadius=function(a){if(!arguments.length)return b;b=d3.functor(a);return e},e.startAngle=function(a){if(!arguments.length)return c;c=d3.functor(a);return e},e.endAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return e},e.centroid=function(){var e=(a.apply(this,arguments)+b.apply(this,arguments))/2,f=(c.apply(this,arguments)+d.apply(this,arguments))/2+bB;return[Math.cos(f)*e,Math.sin(f)*e]};return e};var bB=-Math.PI/2,bC=2*Math.PI-1e-6;d3.svg.line=function(){return bH(Object)};var bL={linear:bM,"step-before":bN,"step-after":bO,basis:bU,"basis-open":bV,"basis-closed":bW,bundle:bX,cardinal:bR,"cardinal-open":bP,"cardinal-closed":bQ,monotone:ce},bZ=[0,2/3,1/3,0],b$=[0,1/3,2/3,0],b_=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=bH(cf);a.radius=a.x,delete a.x,a.angle=a.y,delete a.y;return a},d3.svg.area=function(){return cg(Object)},d3.svg.area.radial=function(){var a=cg(cf);a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1;return a},d3.svg.chord=function(){function j(a,b,c,d){return"Q 0,0 "+d}function i(a,b){return"A"+a+","+a+" 0 0,1 "+b}function h(a,b){return a.a0==b.a0&&a.a1==b.a1}function g(a,b,f,g){var h=b.call(a,f,g),i=c.call(a,h,g),j=d.call(a,h,g)+bB,k=e.call(a,h,g)+bB;return{r:i,a0:j,a1:k,p0:[i*Math.cos(j),i*Math.sin(j)],p1:[i*Math.cos(k),i*Math.sin(k)]}}function f(c,d){var e=g(this,a,c,d),f=g(this,b,c,d);return"M"+e.p0+i(e.r,e.p1)+(h(e,f)?j(e.r,e.p1,e.r,e.p0):j(e.r,e.p1,f.r,f.p0)+i(f.r,f.p1)+j(f.r,f.p1,e.r,e.p0))+"Z"}var a=cj,b=ck,c=cl,d=bF,e=bG;f.radius=function(a){if(!arguments.length)return c;c=d3.functor(a);return f},f.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return f},f.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return f},f.startAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return f},f.endAngle=function(a){if(!arguments.length)return e;e=d3.functor(a);return f};return f},d3.svg.diagonal=function(){function d(d,e){var f=a.call(this,d,e),g=b.call(this,d,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];i=i.map(c);return"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var a=cj,b=ck,c=co;d.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return d},d.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return d},d.projection=function(a){if(!arguments.length)return c;c=a;return d};return d},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=co,c=a.projection;a.projection=function(a){return arguments.length?c(cp(b=a)):b};return a},d3.svg.mouse=function(a){return cr(a,d3.event)};var cq=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.touches=function(b){var c=d3.event.touches;return c?a(c).map(function(a){var c=cr(b,a);c.identifier=a.identifier;return c}):[]},d3.svg.symbol=function(){function c(c,d){return(cu[a.call(this,c,d)]||cu.circle)(b.call(this,c,d))}var a=ct,b=cs;c.type=function(b){if(!arguments.length)return a;a=d3.functor(b);return c},c.size=function(a){if(!arguments.length)return b;b=d3.functor(a);return c};return c};var cu={circle:function(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+ -b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"},cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+ -3*b+","+ -b+"H"+ -b+"V"+ -3*b+"H"+b+"V"+ -b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+ -b+"V"+b+"H"+ -3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*cw)),c=b*cw;return"M0,"+ -b+"L"+c+",0"+" 0,"+b+" "+ -c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+ -b+","+ -b+"L"+b+","+ -b+" "+b+","+b+" "+ -b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/cv),c=b*cv/2;return"M0,"+c+"L"+b+","+ -c+" "+ -b+","+ -c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/cv),c=b*cv/2;return"M0,"+ -c+"L"+b+","+c+" "+ -b+","+c+"Z"}};d3.svg.symbolTypes=d3.keys(cu);var cv=Math.sqrt(3),cw=Math.tan(30*Math.PI/180)})()
Index: Dev/branches/Demo/d3/d3.time.js
===================================================================
--- Dev/branches/Demo/d3/d3.time.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.time.js	(revision 225)
@@ -0,0 +1,660 @@
+(function(){d3.time = {};
+
+var d3_time = Date;
+d3.time.format = function(template) {
+  var n = template.length;
+
+  function format(date) {
+    var string = [],
+        i = -1,
+        j = 0,
+        c,
+        f;
+    while (++i < n) {
+      if (template.charCodeAt(i) == 37) {
+        string.push(
+            template.substring(j, i),
+            (f = d3_time_formats[c = template.charAt(++i)])
+            ? f(date) : c);
+        j = i + 1;
+      }
+    }
+    string.push(template.substring(j, i));
+    return string.join("");
+  }
+
+  format.parse = function(string) {
+    var date = new d3_time(1900, 0, 1),
+        i = d3_time_parse(date, template, string, 0);
+    if (i != string.length) return null;
+    if (date.hour12) {
+      var hours = date.getHours() % 12;
+      date.setHours(date.hour12pm ? hours + 12 : hours);
+    }
+    delete date.hour12;
+    delete date.hour12pm;
+    return date;
+  };
+
+  format.toString = function() {
+    return template;
+  };
+
+  return format;
+};
+
+function d3_time_parse(date, template, string, j) {
+  var c,
+      p,
+      i = 0,
+      n = template.length,
+      m = string.length;
+  while (i < n) {
+    if (j >= m) return -1;
+    c = template.charCodeAt(i++);
+    if (c == 37) {
+      p = d3_time_parsers[template.charAt(i++)];
+      if (!p || ((j = p(date, string, j)) < 0)) return -1;
+    } else if (c != string.charCodeAt(j++)) {
+      return -1;
+    }
+  }
+  return j;
+}
+
+var d3_time_zfill2 = d3.format("02d"),
+    d3_time_zfill3 = d3.format("03d"),
+    d3_time_zfill4 = d3.format("04d"),
+    d3_time_sfill2 = d3.format("2d");
+
+var d3_time_formats = {
+  a: function(d) { return d3_time_weekdays[d.getDay()].substring(0, 3); },
+  A: function(d) { return d3_time_weekdays[d.getDay()]; },
+  b: function(d) { return d3_time_months[d.getMonth()].substring(0, 3); },
+  B: function(d) { return d3_time_months[d.getMonth()]; },
+  c: d3.time.format("%a %b %e %H:%M:%S %Y"),
+  d: function(d) { return d3_time_zfill2(d.getDate()); },
+  e: function(d) { return d3_time_sfill2(d.getDate()); },
+  H: function(d) { return d3_time_zfill2(d.getHours()); },
+  I: function(d) { return d3_time_zfill2(d.getHours() % 12 || 12); },
+  j: d3_time_dayOfYear,
+  m: function(d) { return d3_time_zfill2(d.getMonth() + 1); },
+  M: function(d) { return d3_time_zfill2(d.getMinutes()); },
+  p: function(d) { return d.getHours() >= 12 ? "PM" : "AM"; },
+  S: function(d) { return d3_time_zfill2(d.getSeconds()); },
+  U: d3_time_weekNumberSunday,
+  w: function(d) { return d.getDay(); },
+  W: d3_time_weekNumberMonday,
+  x: d3.time.format("%m/%d/%y"),
+  X: d3.time.format("%H:%M:%S"),
+  y: function(d) { return d3_time_zfill2(d.getFullYear() % 100); },
+  Y: function(d) { return d3_time_zfill4(d.getFullYear() % 10000); },
+  Z: d3_time_zone,
+  "%": function(d) { return "%"; }
+};
+
+var d3_time_parsers = {
+  a: d3_time_parseWeekdayAbbrev,
+  A: d3_time_parseWeekday,
+  b: d3_time_parseMonthAbbrev,
+  B: d3_time_parseMonth,
+  c: d3_time_parseLocaleFull,
+  d: d3_time_parseDay,
+  e: d3_time_parseDay,
+  H: d3_time_parseHour24,
+  I: d3_time_parseHour12,
+  // j: function(d, s, i) { /*TODO day of year [001,366] */ return i; },
+  m: d3_time_parseMonthNumber,
+  M: d3_time_parseMinutes,
+  p: d3_time_parseAmPm,
+  S: d3_time_parseSeconds,
+  // U: function(d, s, i) { /*TODO week number (sunday) [00,53] */ return i; },
+  // w: function(d, s, i) { /*TODO weekday [0,6] */ return i; },
+  // W: function(d, s, i) { /*TODO week number (monday) [00,53] */ return i; },
+  x: d3_time_parseLocaleDate,
+  X: d3_time_parseLocaleTime,
+  y: d3_time_parseYear,
+  Y: d3_time_parseFullYear
+  // ,
+  // Z: function(d, s, i) { /*TODO time zone */ return i; },
+  // "%": function(d, s, i) { /*TODO literal % */ return i; }
+};
+
+// Note: weekday is validated, but does not set the date.
+function d3_time_parseWeekdayAbbrev(date, string, i) {
+  return string.substring(i, i += 3).toLowerCase() in d3_time_weekdayAbbrevLookup ? i : -1;
+}
+
+var d3_time_weekdayAbbrevLookup = {
+  sun: 3,
+  mon: 3,
+  tue: 3,
+  wed: 3,
+  thu: 3,
+  fri: 3,
+  sat: 3
+};
+
+// Note: weekday is validated, but does not set the date.
+function d3_time_parseWeekday(date, string, i) {
+  d3_time_weekdayRe.lastIndex = 0;
+  var n = d3_time_weekdayRe.exec(string.substring(i, i + 10));
+  return n ? i += n[0].length : -1;
+}
+
+var d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/ig;
+
+var d3_time_weekdays = [
+  "Sunday",
+  "Monday",
+  "Tuesday",
+  "Wednesday",
+  "Thursday",
+  "Friday",
+  "Saturday"
+];
+
+function d3_time_parseMonthAbbrev(date, string, i) {
+  var n = d3_time_monthAbbrevLookup[string.substring(i, i += 3).toLowerCase()];
+  return n == null ? -1 : (date.setMonth(n), i);
+}
+
+var d3_time_monthAbbrevLookup = {
+  jan: 0,
+  feb: 1,
+  mar: 2,
+  apr: 3,
+  may: 4,
+  jun: 5,
+  jul: 6,
+  aug: 7,
+  sep: 8,
+  oct: 9,
+  nov: 10,
+  dec: 11
+};
+
+function d3_time_parseMonth(date, string, i) {
+  d3_time_monthRe.lastIndex = 0;
+  var n = d3_time_monthRe.exec(string.substring(i, i + 12));
+  return n ? (date.setMonth(d3_time_monthLookup[n[0].toLowerCase()]), i += n[0].length) : -1;
+}
+
+var d3_time_monthRe = /^(?:January|February|March|April|May|June|July|August|September|October|November|December)/ig;
+
+var d3_time_monthLookup = {
+  january: 0,
+  february: 1,
+  march: 2,
+  april: 3,
+  may: 4,
+  june: 5,
+  july: 6,
+  august: 7,
+  september: 8,
+  october: 9,
+  november: 10,
+  december: 11
+};
+
+var d3_time_months = [
+  "January",
+  "February",
+  "March",
+  "April",
+  "May",
+  "June",
+  "July",
+  "August",
+  "September",
+  "October",
+  "November",
+  "December"
+];
+
+function d3_time_parseLocaleFull(date, string, i) {
+  return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
+}
+
+function d3_time_parseLocaleDate(date, string, i) {
+  return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
+}
+
+function d3_time_parseLocaleTime(date, string, i) {
+  return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
+}
+
+function d3_time_parseFullYear(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 4));
+  return n ? (date.setFullYear(n[0]), i += n[0].length) : -1;
+}
+
+function d3_time_parseYear(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setFullYear(d3_time_century() + +n[0]), i += n[0].length) : -1;
+}
+
+function d3_time_century() {
+  return ~~(new Date().getFullYear() / 1000) * 1000;
+}
+
+function d3_time_parseMonthNumber(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setMonth(n[0] - 1), i += n[0].length) : -1;
+}
+
+function d3_time_parseDay(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setDate(+n[0]), i += n[0].length) : -1;
+}
+
+// Note: we don't validate that the hour is in the range [0,23].
+function d3_time_parseHour24(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setHours(+n[0]), i += n[0].length) : -1;
+}
+
+// Note: we don't validate that the hour is in the range [1,12].
+function d3_time_parseHour12(date, string, i) {
+  date.hour12 = true;
+  return d3_time_parseHour24(date, string, i);
+}
+
+function d3_time_parseMinutes(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setMinutes(+n[0]), i += n[0].length) : -1;
+}
+
+function d3_time_parseSeconds(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setSeconds(+n[0]), i += n[0].length) : -1;
+}
+
+// Note: we don't look at the next directive.
+var d3_time_numberRe = /\s*\d+/;
+
+function d3_time_parseAmPm(date, string, i) {
+  var n = d3_time_amPmLookup[string.substring(i, i += 2).toLowerCase()];
+  return n == null ? -1 : (date.hour12pm = n, i);
+}
+
+var d3_time_amPmLookup = {
+  am: 0,
+  pm: 1
+};
+
+function d3_time_year(d) {
+  return new d3_time(d.getFullYear(), 0, 1);
+}
+
+function d3_time_dayOfYear(d) {
+  return d3_time_zfill3(1 + ~~((d - d3_time_year(d)) / 864e5));
+}
+
+function d3_time_weekNumberSunday(d) {
+  var d0 = d3_time_year(d);
+  return d3_time_zfill2(~~(((d - d0) / 864e5 + d0.getDay()) / 7));
+}
+
+function d3_time_weekNumberMonday(d) {
+  var d0 = d3_time_year(d);
+  return d3_time_zfill2(~~(((d - d0) / 864e5 + (d0.getDay() + 6) % 7) / 7));
+}
+
+// TODO table of time zone offset names?
+function d3_time_zone(d) {
+  var z = d.getTimezoneOffset(),
+      zs = z > 0 ? "-" : "+",
+      zh = ~~(Math.abs(z) / 60),
+      zm = Math.abs(z) % 60;
+  return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
+}
+d3.time.format.utc = function(template) {
+  var local = d3.time.format(template);
+
+  function format(date) {
+    var utc = new d3_time_format_utc();
+    utc._ = date;
+    return local(utc);
+  }
+
+  format.parse = function(string) {
+    try {
+      d3_time = d3_time_format_utc;
+      var date = local.parse(string);
+      return date && date._;
+    } finally {
+      d3_time = Date;
+    }
+  };
+
+  format.toString = local.toString;
+
+  return format;
+};
+
+function d3_time_format_utc() {
+  this._ = new Date(Date.UTC.apply(this, arguments));
+}
+
+d3_time_format_utc.prototype = {
+  getDate: function() { return this._.getUTCDate(); },
+  getDay: function() { return this._.getUTCDay(); },
+  getFullYear: function() { return this._.getUTCFullYear(); },
+  getHours: function() { return this._.getUTCHours(); },
+  getMilliseconds: function() { return this._.getUTCMilliseconds(); },
+  getMinutes: function() { return this._.getUTCMinutes(); },
+  getMonth: function() { return this._.getUTCMonth(); },
+  getSeconds: function() { return this._.getUTCSeconds(); },
+  getTimezoneOffset: function() { return 0; },
+  valueOf: function() { return this._.getTime(); },
+  setDate: function(x) { this._.setUTCDate(x); },
+  setDay: function(x) { this._.setUTCDay(x); },
+  setFullYear: function(x) { this._.setUTCFullYear(x); },
+  setHours: function(x) { this._.setUTCHours(x); },
+  setMilliseconds: function(x) { this._.setUTCMilliseconds(x); },
+  setMinutes: function(x) { this._.setUTCMinutes(x); },
+  setMonth: function(x) { this._.setUTCMonth(x); },
+  setSeconds: function(x) { this._.setUTCSeconds(x); }
+};
+d3.time.format.iso = d3.time.format.utc("%Y-%m-%dT%H:%M:%SZ");
+function d3_time_range(floor, step, number) {
+  return function(t0, t1, dt) {
+    var time = floor(t0), times = [];
+    if (time < t0) step(time);
+    if (dt > 1) {
+      while (time < t1) {
+        var date = new Date(+time);
+        if (!(number(date) % dt)) times.push(date);
+        step(time);
+      }
+    } else {
+      while (time < t1) times.push(new Date(+time)), step(time);
+    }
+    return times;
+  };
+}
+d3.time.second = function(date) {
+  return new Date(~~(date / 1e3) * 1e3);
+};
+
+d3.time.second.utc = d3.time.second;
+d3.time.seconds = d3_time_range(d3.time.second, function(date) {
+  date.setTime(date.getTime() + 1e3);
+}, function(date) {
+  return date.getSeconds();
+});
+
+d3.time.seconds.utc = d3.time.seconds;
+d3.time.minute = function(date) {
+  return new Date(~~(date / 6e4) * 6e4);
+};
+
+d3.time.minute.utc = d3.time.minute;d3.time.minutes = d3_time_range(d3.time.minute, d3_time_minutesStep, function(date) {
+  return date.getMinutes();
+});
+
+d3.time.minutes.utc = d3_time_range(d3.time.minute, d3_time_minutesStep, function(date) {
+  return date.getUTCMinutes();
+});
+
+function d3_time_minutesStep(date) {
+  date.setTime(date.getTime() + 6e4); // assumes no leap seconds
+}
+d3.time.hour = function(date) {
+  var offset = date.getTimezoneOffset() / 60;
+  return new Date((~~(date / 36e5 - offset) + offset) * 36e5);
+};
+
+d3.time.hour.utc = function(date) {
+  return new Date(~~(date / 36e5) * 36e5);
+};
+d3.time.hours = d3_time_range(d3.time.hour, d3_time_hoursStep, function(date) {
+  return date.getHours();
+});
+
+d3.time.hours.utc = d3_time_range(d3.time.hour.utc, d3_time_hoursStep, function(date) {
+  return date.getUTCHours();
+});
+
+function d3_time_hoursStep(date) {
+  date.setTime(date.getTime() + 36e5);
+}
+d3.time.day = function(date) {
+  return new Date(date.getFullYear(), date.getMonth(), date.getDate());
+};
+
+d3.time.day.utc = function(date) {
+  return new Date(~~(date / 864e5) * 864e5);
+};
+d3.time.days = d3_time_range(d3.time.day, function(date) {
+  date.setDate(date.getDate() + 1);
+}, function(date) {
+  return date.getDate() - 1;
+});
+
+d3.time.days.utc = d3_time_range(d3.time.day.utc, function(date) {
+  date.setUTCDate(date.getUTCDate() + 1);
+}, function(date) {
+  return date.getUTCDate() - 1;
+});
+d3.time.week = function(date) {
+  (date = d3.time.day(date)).setDate(date.getDate() - date.getDay());
+  return date;
+};
+
+d3.time.week.utc = function(date) {
+  (date = d3.time.day.utc(date)).setUTCDate(date.getUTCDate() - date.getUTCDay());
+  return date;
+};
+d3.time.weeks = d3_time_range(d3.time.week, function(date) {
+  date.setDate(date.getDate() + 7);
+}, function(date) {
+  return ~~((date - new Date(date.getFullYear(), 0, 1)) / 6048e5);
+});
+
+d3.time.weeks.utc = d3_time_range(d3.time.week.utc, function(date) {
+  date.setUTCDate(date.getUTCDate() + 7);
+}, function(date) {
+  return ~~((date - Date.UTC(date.getUTCFullYear(), 0, 1)) / 6048e5);
+});
+d3.time.month = function(date) {
+  return new Date(date.getFullYear(), date.getMonth(), 1);
+};
+
+d3.time.month.utc = function(date) {
+  return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1));
+};
+d3.time.months = d3_time_range(d3.time.month, function(date) {
+  date.setMonth(date.getMonth() + 1);
+}, function(date) {
+  return date.getMonth();
+});
+
+d3.time.months.utc = d3_time_range(d3.time.month.utc, function(date) {
+  date.setUTCMonth(date.getUTCMonth() + 1);
+}, function(date) {
+  return date.getUTCMonth();
+});
+d3.time.year = function(date) {
+  return new Date(date.getFullYear(), 0, 1);
+};
+
+d3.time.year.utc = function(date) {
+  return new Date(Date.UTC(date.getUTCFullYear(), 0, 1));
+};
+d3.time.years = d3_time_range(d3.time.year, function(date) {
+  date.setFullYear(date.getFullYear() + 1);
+}, function(date) {
+  return date.getFullYear();
+});
+
+d3.time.years.utc = d3_time_range(d3.time.year.utc, function(date) {
+  date.setUTCFullYear(date.getUTCFullYear() + 1);
+}, function(date) {
+  return date.getUTCFullYear();
+});
+// TODO nice
+function d3_time_scale(methods, format) {
+  var linear = d3.scale.linear();
+
+  function scale(x) {
+    return linear(x);
+  }
+
+  scale.invert = function(x) {
+    return d3_time_scaleDate(linear.invert(x));
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
+    linear.domain(x);
+    return scale;
+  };
+
+  scale.ticks = function(m, k) {
+    var extent = d3_time_scaleExtent(scale.domain());
+    if (typeof m !== "function") {
+      var span = extent[1] - extent[0],
+          target = span / m,
+          i = d3.bisect(d3_time_scaleSteps, target, 1, d3_time_scaleSteps.length - 1);
+      if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
+      m = methods[i];
+      k = m[1];
+      m = m[0];
+    }
+    return m(extent[0], extent[1], k);
+  };
+
+  scale.tickFormat = function() {
+    return format;
+  };
+
+  // TOOD expose d3_scale_linear_rebind?
+  scale.range = d3.rebind(scale, linear.range);
+  scale.rangeRound = d3.rebind(scale, linear.rangeRound);
+  scale.interpolate = d3.rebind(scale, linear.interpolate);
+  scale.clamp = d3.rebind(scale, linear.clamp);
+
+  return scale;
+}
+
+// TODO expose d3_scaleExtent?
+function d3_time_scaleExtent(domain) {
+  var start = domain[0], stop = domain[domain.length - 1];
+  return start < stop ? [start, stop] : [stop, start];
+}
+
+function d3_time_scaleDate(t) {
+  return new Date(t);
+}
+
+function d3_time_scaleFormat(formats) {
+  return function(date) {
+    var i = formats.length - 1, f = formats[i];
+    while (!f[1](date)) f = formats[--i];
+    return f[0](date);
+  };
+}
+
+var d3_time_scaleSteps = [
+  1e3,    // 1-second
+  5e3,    // 5-second
+  15e3,   // 15-second
+  3e4,    // 30-second
+  6e4,    // 1-minute
+  3e5,    // 5-minute
+  9e5,    // 15-minute
+  18e5,   // 30-minute
+  36e5,   // 1-hour
+  108e5,  // 3-hour
+  216e5,  // 6-hour
+  432e5,  // 12-hour
+  864e5,  // 1-day
+  1728e5, // 2-day
+  6048e5, // 1-week
+  1728e6, // 1-month
+  7776e6, // 3-month
+  31536e6 // 1-year
+];
+
+var d3_time_scaleLocalMethods = [
+  [d3.time.seconds, 1],
+  [d3.time.seconds, 5],
+  [d3.time.seconds, 15],
+  [d3.time.seconds, 30],
+  [d3.time.minutes, 1],
+  [d3.time.minutes, 5],
+  [d3.time.minutes, 15],
+  [d3.time.minutes, 30],
+  [d3.time.hours, 1],
+  [d3.time.hours, 3],
+  [d3.time.hours, 6],
+  [d3.time.hours, 12],
+  [d3.time.days, 1],
+  [d3.time.days, 2],
+  [d3.time.weeks, 1],
+  [d3.time.months, 1],
+  [d3.time.months, 3],
+  [d3.time.years, 1]
+];
+
+var d3_time_scaleLocalFormats = [
+  [d3.time.format("%Y"), function(d) { return true; }],
+  [d3.time.format("%B"), function(d) { return d.getMonth(); }],
+  [d3.time.format("%b %d"), function(d) { return d.getDate() != 1; }],
+  [d3.time.format("%a %d"), function(d) { return d.getDay() && d.getDate() != 1; }],
+  [d3.time.format("%I %p"), function(d) { return d.getHours(); }],
+  [d3.time.format("%I:%M"), function(d) { return d.getMinutes(); }],
+  [d3.time.format(":%S"), function(d) { return d.getSeconds() || d.getMilliseconds(); }]
+];
+
+var d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
+
+d3.time.scale = function() {
+  return d3_time_scale(d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
+};
+var d3_time_scaleUTCMethods = [
+  [d3.time.seconds.utc, 1],
+  [d3.time.seconds.utc, 5],
+  [d3.time.seconds.utc, 15],
+  [d3.time.seconds.utc, 30],
+  [d3.time.minutes.utc, 1],
+  [d3.time.minutes.utc, 5],
+  [d3.time.minutes.utc, 15],
+  [d3.time.minutes.utc, 30],
+  [d3.time.hours.utc, 1],
+  [d3.time.hours.utc, 3],
+  [d3.time.hours.utc, 6],
+  [d3.time.hours.utc, 12],
+  [d3.time.days.utc, 1],
+  [d3.time.days.utc, 2],
+  [d3.time.weeks.utc, 1],
+  [d3.time.months.utc, 1],
+  [d3.time.months.utc, 3],
+  [d3.time.years.utc, 1]
+];
+
+var d3_time_scaleUTCFormats = [
+  [d3.time.format.utc("%Y"), function(d) { return true; }],
+  [d3.time.format.utc("%B"), function(d) { return d.getUTCMonth(); }],
+  [d3.time.format.utc("%b %d"), function(d) { return d.getUTCDate() != 1; }],
+  [d3.time.format.utc("%a %d"), function(d) { return d.getUTCDay() && d.getUTCDate() != 1; }],
+  [d3.time.format.utc("%I %p"), function(d) { return d.getUTCHours(); }],
+  [d3.time.format.utc("%I:%M"), function(d) { return d.getUTCMinutes(); }],
+  [d3.time.format.utc(":%S"), function(d) { return d.getUTCSeconds() || d.getUTCMilliseconds(); }]
+];
+
+var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
+
+d3.time.scale.utc = function() {
+  return d3_time_scale(d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
+};
+})();
Index: Dev/branches/Demo/d3/d3.time.min.js
===================================================================
--- Dev/branches/Demo/d3/d3.time.min.js	(revision 225)
+++ Dev/branches/Demo/d3/d3.time.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){function U(a){return function(b){var c=a.length-1,d=a[c];while(!d[1](b))d=a[--c];return d[0](b)}}function T(a){return new Date(a)}function S(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function R(a,b){function d(a){return c(a)}var c=d3.scale.linear();d.invert=function(a){return T(c.invert(a))},d.domain=function(a){if(!arguments.length)return c.domain().map(T);c.domain(a);return d},d.ticks=function(b,c){var e=S(d.domain());if(typeof b!="function"){var f=e[1]-e[0],g=f/b,h=d3.bisect(V,g,1,V.length-1);Math.log(g/V[h-1])<Math.log(V[h]/g)&&--h,b=a[h],c=b[1],b=b[0]}return b(e[0],e[1],c)},d.tickFormat=function(){return b},d.range=d3.rebind(d,c.range),d.rangeRound=d3.rebind(d,c.rangeRound),d.interpolate=d3.rebind(d,c.interpolate),d.clamp=d3.rebind(d,c.clamp);return d}function Q(a){a.setTime(a.getTime()+36e5)}function P(a){a.setTime(a.getTime()+6e4)}function O(a,b,c){return function(d,e,f){var g=a(d),h=[];g<d&&b(g);if(f>1)while(g<e){var i=new Date(+g);c(i)%f||h.push(i),b(g)}else while(g<e)h.push(new Date(+g)),b(g);return h}}function N(){this._=new Date(Date.UTC.apply(this,arguments))}function M(a){var b=a.getTimezoneOffset(),d=b>0?"-":"+",e=~~(Math.abs(b)/60),f=Math.abs(b)%60;return d+c(e)+c(f)}function L(a){var b=I(a);return c(~~(((a-b)/864e5+(b.getDay()+6)%7)/7))}function K(a){var b=I(a);return c(~~(((a-b)/864e5+b.getDay())/7))}function J(a){return d(1+~~((a-I(a))/864e5))}function I(b){return new a(b.getFullYear(),0,1)}function G(a,b,c){var d=H[b.substring(c,c+=2).toLowerCase()];return d==null?-1:(a.hour12pm=d,c)}function E(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+2));return d?(a.setSeconds(+d[0]),c+=d[0].length):-1}function D(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+2));return d?(a.setMinutes(+d[0]),c+=d[0].length):-1}function C(a,b,c){a.hour12=!0;return B(a,b,c)}function B(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+2));return d?(a.setHours(+d[0]),c+=d[0].length):-1}function A(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+2));return d?(a.setDate(+d[0]),c+=d[0].length):-1}function z(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+2));return d?(a.setMonth(d[0]-1),c+=d[0].length):-1}function y(){return~~((new Date).getFullYear()/1e3)*1e3}function x(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+2));return d?(a.setFullYear(y()+ +d[0]),c+=d[0].length):-1}function w(a,b,c){F.lastIndex=0;var d=F.exec(b.substring(c,c+4));return d?(a.setFullYear(d[0]),c+=d[0].length):-1}function v(a,c,d){return b(a,g.X.toString(),c,d)}function u(a,c,d){return b(a,g.x.toString(),c,d)}function t(a,c,d){return b(a,g.c.toString(),c,d)}function p(a,b,c){q.lastIndex=0;var d=q.exec(b.substring(c,c+12));return d?(a.setMonth(r[d[0].toLowerCase()]),c+=d[0].length):-1}function n(a,b,c){var d=o[b.substring(c,c+=3).toLowerCase()];return d==null?-1:(a.setMonth(d),c)}function k(a,b,c){l.lastIndex=0;var d=l.exec(b.substring(c,c+10));return d?c+=d[0].length:-1}function i(a,b,c){return b.substring(c,c+=3).toLowerCase()in j?c:-1}function b(a,b,c,d){var e,f,g=0,i=b.length,j=c.length;while(g<i){if(d>=j)return-1;e=b.charCodeAt(g++);if(e==37){f=h[b.charAt(g++)];if(!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}d3.time={};var a=Date;d3.time.format=function(c){function e(a){var b=[],e=-1,f=0,h,i;while(++e<d)c.charCodeAt(e)==37&&(b.push(c.substring(f,e),(i=g[h=c.charAt(++e)])?i(a):h),f=e+1);b.push(c.substring(f,e));return b.join("")}var d=c.length;e.parse=function(d){var e=new a(1900,0,1),f=b(e,c,d,0);if(f!=d.length)return null;if(e.hour12){var g=e.getHours()%12;e.setHours(e.hour12pm?g+12:g)}delete e.hour12,delete e.hour12pm;return e},e.toString=function(){return c};return e};var c=d3.format("02d"),d=d3.format("03d"),e=d3.format("04d"),f=d3.format("2d"),g={a:function(a){return m[a.getDay()].substring(0,3)},A:function(a){return m[a.getDay()]},b:function(a){return s[a.getMonth()].substring(0,3)},B:function(a){return s[a.getMonth()]},c:d3.time.format("%a %b %e %H:%M:%S %Y"),d:function(a){return c(a.getDate())},e:function(a){return f(a.getDate())},H:function(a){return c(a.getHours())},I:function(a){return c(a.getHours()%12||12)},j:J,m:function(a){return c(a.getMonth()+1)},M:function(a){return c(a.getMinutes())},p:function(a){return a.getHours()>=12?"PM":"AM"},S:function(a){return c(a.getSeconds())},U:K,w:function(a){return a.getDay()},W:L,x:d3.time.format("%m/%d/%y"),X:d3.time.format("%H:%M:%S"),y:function(a){return c(a.getFullYear()%100)},Y:function(a){return e(a.getFullYear()%1e4)},Z:M,"%":function(a){return"%"}},h={a:i,A:k,b:n,B:p,c:t,d:A,e:A,H:B,I:C,m:z,M:D,p:G,S:E,x:u,X:v,y:x,Y:w},j={sun:3,mon:3,tue:3,wed:3,thu:3,fri:3,sat:3},l=/^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/ig,m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},q=/^(?:January|February|March|April|May|June|July|August|September|October|November|December)/ig,r={january:0,february:1,march:2,april:3,may:4,june:5,july:6,august:7,september:8,october:9,november:10,december:11},s=["January","February","March","April","May","June","July","August","September","October","November","December"],F=/\s*\d+/,H={am:0,pm:1};d3.time.format.utc=function(b){function d(a){var b=new N;b._=a;return c(b)}var c=d3.time.format(b);d.parse=function(b){try{a=N;var d=c.parse(b);return d&&d._}finally{a=Date}},d.toString=c.toString;return d},N.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.getTime()},setDate:function(a){this._.setUTCDate(a)},setDay:function(a){this._.setUTCDay(a)},setFullYear:function(a){this._.setUTCFullYear(a)},setHours:function(a){this._.setUTCHours(a)},setMilliseconds:function(a){this._.setUTCMilliseconds(a)},setMinutes:function(a){this._.setUTCMinutes(a)},setMonth:function(a){this._.setUTCMonth(a)},setSeconds:function(a){this._.setUTCSeconds(a)}},d3.time.format.iso=d3.time.format.utc("%Y-%m-%dT%H:%M:%SZ"),d3.time.second=function(a){return new Date(~~(a/1e3)*1e3)},d3.time.second.utc=d3.time.second,d3.time.seconds=O(d3.time.second,function(a){a.setTime(a.getTime()+1e3)},function(a){return a.getSeconds()}),d3.time.seconds.utc=d3.time.seconds,d3.time.minute=function(a){return new Date(~~(a/6e4)*6e4)},d3.time.minute.utc=d3.time.minute,d3.time.minutes=O(d3.time.minute,P,function(a){return a.getMinutes()}),d3.time.minutes.utc=O(d3.time.minute,P,function(a){return a.getUTCMinutes()}),d3.time.hour=function(a){var b=a.getTimezoneOffset()/60;return new Date((~~(a/36e5-b)+b)*36e5)},d3.time.hour.utc=function(a){return new Date(~~(a/36e5)*36e5)},d3.time.hours=O(d3.time.hour,Q,function(a){return a.getHours()}),d3.time.hours.utc=O(d3.time.hour.utc,Q,function(a){return a.getUTCHours()}),d3.time.day=function(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())},d3.time.day.utc=function(a){return new Date(~~(a/864e5)*864e5)},d3.time.days=O(d3.time.day,function(a){a.setDate(a.getDate()+1)},function(a){return a.getDate()-1}),d3.time.days.utc=O(d3.time.day.utc,function(a){a.setUTCDate(a.getUTCDate()+1)},function(a){return a.getUTCDate()-1}),d3.time.week=function(a){(a=d3.time.day(a)).setDate(a.getDate()-a.getDay());return a},d3.time.week.utc=function(a){(a=d3.time.day.utc(a)).setUTCDate(a.getUTCDate()-a.getUTCDay());return a},d3.time.weeks=O(d3.time.week,function(a){a.setDate(a.getDate()+7)},function(a){return~~((a-new Date(a.getFullYear(),0,1))/6048e5)}),d3.time.weeks.utc=O(d3.time.week.utc,function(a){a.setUTCDate(a.getUTCDate()+7)},function(a){return~~((a-Date.UTC(a.getUTCFullYear(),0,1))/6048e5)}),d3.time.month=function(a){return new Date(a.getFullYear(),a.getMonth(),1)},d3.time.month.utc=function(a){return new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),1))},d3.time.months=O(d3.time.month,function(a){a.setMonth(a.getMonth()+1)},function(a){return a.getMonth()}),d3.time.months.utc=O(d3.time.month.utc,function(a){a.setUTCMonth(a.getUTCMonth()+1)},function(a){return a.getUTCMonth()}),d3.time.year=function(a){return new Date(a.getFullYear(),0,1)},d3.time.year.utc=function(a){return new Date(Date.UTC(a.getUTCFullYear(),0,1))},d3.time.years=O(d3.time.year,function(a){a.setFullYear(a.getFullYear()+1)},function(a){return a.getFullYear()}),d3.time.years.utc=O(d3.time.year.utc,function(a){a.setUTCFullYear(a.getUTCFullYear()+1)},function(a){return a.getUTCFullYear()});var V=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,1728e6,7776e6,31536e6],W=[[d3.time.seconds,1],[d3.time.seconds,5],[d3.time.seconds,15],[d3.time.seconds,30],[d3.time.minutes,1],[d3.time.minutes,5],[d3.time.minutes,15],[d3.time.minutes,30],[d3.time.hours,1],[d3.time.hours,3],[d3.time.hours,6],[d3.time.hours,12],[d3.time.days,1],[d3.time.days,2],[d3.time.weeks,1],[d3.time.months,1],[d3.time.months,3],[d3.time.years,1]],X=[[d3.time.format("%Y"),function(a){return!0}],[d3.time.format("%B"),function(a){return a.getMonth()}],[d3.time.format("%b %d"),function(a){return a.getDate()!=1}],[d3.time.format("%a %d"),function(a){return a.getDay()&&a.getDate()!=1}],[d3.time.format("%I %p"),function(a){return a.getHours()}],[d3.time.format("%I:%M"),function(a){return a.getMinutes()}],[d3.time.format(":%S"),function(a){return a.getSeconds()||a.getMilliseconds()}]],Y=U(X);d3.time.scale=function(){return R(W,Y)};var Z=[[d3.time.seconds.utc,1],[d3.time.seconds.utc,5],[d3.time.seconds.utc,15],[d3.time.seconds.utc,30],[d3.time.minutes.utc,1],[d3.time.minutes.utc,5],[d3.time.minutes.utc,15],[d3.time.minutes.utc,30],[d3.time.hours.utc,1],[d3.time.hours.utc,3],[d3.time.hours.utc,6],[d3.time.hours.utc,12],[d3.time.days.utc,1],[d3.time.days.utc,2],[d3.time.weeks.utc,1],[d3.time.months.utc,1],[d3.time.months.utc,3],[d3.time.years.utc,1]],$=[[d3.time.format.utc("%Y"),function(a){return!0}],[d3.time.format.utc("%B"),function(a){return a.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(a){return a.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(a){return a.getUTCDay()&&a.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(a){return a.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(a){return a.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(a){return a.getUTCSeconds()||a.getUTCMilliseconds()}]],_=U($);d3.time.scale.utc=function(){return R(Z,_)}})()
Index: Dev/branches/Demo/d3/examples/albers/albers.html
===================================================================
--- Dev/branches/Demo/d3/examples/albers/albers.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/albers/albers.html	(revision 225)
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Albers Projection</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../lib/jquery/jquery.min.js"></script>
+    <script type="text/javascript" src="../../lib/jquery-ui/jquery-ui.min.js"></script>
+    <style type="text/css">
+
+@import url("../../lib/jquery-ui/jquery-ui.css");
+
+body, .ui-widget {
+  font: 14px Helvetica Neue;
+}
+
+svg {
+  width: 960px;
+  height: 500px;
+  border: solid 1px #ccc;
+  background: #eee;
+}
+
+#states path {
+  fill: #ccc;
+  stroke: #fff;
+}
+
+#states circle {
+  fill: #fcc;
+  stroke: #000;
+}
+
+div {
+  width: 960px;
+}
+
+    </style>
+  </head>
+  <body>
+    <h3>Albers Projection</h3>
+    <script type="text/javascript">
+
+// Our projection.
+var xy = d3.geo.albers(),
+    path = d3.geo.path().projection(xy);
+
+d3.select("body")
+  .append("svg:svg")
+  .append("svg:g")
+    .attr("id", "states");
+
+d3.json("../data/us-states.json", function(collection) {
+  d3.select("#states")
+    .selectAll("path")
+      .data(collection.features)
+    .enter().append("svg:path")
+      .attr("d", path);
+  d3.select("#states")
+    .append("svg:circle")
+      .attr("r", 10)
+      .attr("transform", "translate(" + xy(xy.origin()).join(",") + ")")
+});
+
+function refresh() {
+  d3.selectAll("#states path")
+      .attr("d", path);
+  d3.select("#states circle")
+      .attr("transform", "translate(" + xy(xy.origin()).join(",") + ")")
+  d3.select("#parallels span")
+      .text(xy.parallels());
+  d3.select("#lon span")
+      .text(xy.origin()[0]);
+  d3.select("#lat span")
+      .text(xy.origin()[1]);
+  d3.select("#scale span")
+      .text(xy.scale());
+  d3.select("#translate-x span")
+      .text(xy.translate()[0]);
+  d3.select("#translate-y span")
+      .text(xy.translate()[1]);
+}
+
+    </script><p>
+    <div id="lon">origin.longitude: <span>-98</span></div>
+    <div id="lat">origin.latitude: <span>38</span></div><p>
+    <div id="parallels">parallels: <span>29.5,45.5</span></div><p>
+    <div id="scale">scale: <span>1000</span></div><p>
+    <div id="translate-x">translate.x: <span>480</span></div>
+    <div id="translate-y">translate.y: <span>250</span></div>
+    <script type="text/javascript">
+
+$("#parallels").slider({
+  range: true,
+  min: -90,
+  max: 90,
+  step: 1e-1,
+  values: [29.5, 45.5],
+  slide: function(event, ui) {
+    xy.parallels(ui.values);
+    refresh();
+  }
+});
+
+$("#lon").slider({
+  min: -180,
+  max: 180,
+  step: 1e-1,
+  value: -98,
+  slide: function(event, ui) {
+    var origin = xy.origin();
+    origin[0] = ui.value;
+    xy.origin(origin);
+    refresh();
+  }
+});
+
+$("#lat").slider({
+  min: -90,
+  max: 90,
+  step: 1e-1,
+  value: 38,
+  slide: function(event, ui) {
+    var origin = xy.origin();
+    origin[1] = ui.value;
+    xy.origin(origin);
+    refresh();
+  }
+});
+
+$("#scale").slider({
+  min: 0,
+  max: 3000,
+  value: 1000,
+  slide: function(event, ui) {
+    xy.scale(ui.value);
+    refresh();
+  }
+});
+
+$("#translate-x").slider({
+  min: -2000,
+  max: 2000,
+  value: 480,
+  slide: function(event, ui) {
+    var translate = xy.translate();
+    translate[0] = ui.value;
+    xy.translate(translate);
+    refresh();
+  }
+});
+
+$("#translate-y").slider({
+  min: -2000,
+  max: 2000,
+  value: 250,
+  slide: function(event, ui) {
+    var translate = xy.translate();
+    translate[1] = ui.value;
+    xy.translate(translate);
+    refresh();
+  }
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/area/area-radial.html
===================================================================
--- Dev/branches/Demo/d3/examples/area/area-radial.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/area/area-radial.html	(revision 225)
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Area Chart (Radial)</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+.area {
+  fill: lightsteelblue;
+}
+
+.line {
+  fill: none;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var r = 960 / 2,
+    data = d3.range(361).map(function(i) { return .8 + Math.sin(i / 20 * Math.PI) / 6; });
+
+var svg = d3.select("body").append("svg:svg")
+    .data([data])
+    .attr("width", r * 2)
+    .attr("height", r * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + r + "," + r + ")");
+
+svg.append("svg:path")
+    .attr("class", "area")
+    .attr("d", d3.svg.area.radial()
+    .innerRadius(r / 2)
+    .outerRadius(function(d) { return r * d; })
+    .angle(function(d, i) { return i / 180 * Math.PI; }));
+
+svg.append("svg:path")
+    .attr("class", "line")
+    .attr("d", d3.svg.line.radial()
+    .radius(function(d) { return r * d; })
+    .angle(function(d, i) { return i / 180 * Math.PI; }));
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/area/area.html
===================================================================
--- Dev/branches/Demo/d3/examples/area/area.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/area/area.html	(revision 225)
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Area Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+.rule line {
+  stroke: #eee;
+  shape-rendering: crispEdges;
+}
+
+.rule line.axis {
+  stroke: #000;
+}
+
+.area {
+  fill: lightsteelblue;
+}
+
+.line, circle.area {
+  fill: none;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+circle.area {
+  fill: #fff;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var data = d3.range(20).map(function(i) {
+  return {x: i / 19, y: (Math.sin(i / 3) + 1) / 2};
+});
+
+var w = 450,
+    h = 275,
+    p = 20,
+    x = d3.scale.linear().domain([0, 1]).range([0, w]),
+    y = d3.scale.linear().domain([0, 1]).range([h, 0]);
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .data([data])
+    .attr("width", w + p * 2)
+    .attr("height", h + p * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + p + "," + p + ")");
+
+var rules = vis.selectAll("g.rule")
+    .data(x.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "rule");
+
+rules.append("svg:line")
+    .attr("x1", x)
+    .attr("x2", x)
+    .attr("y1", 0)
+    .attr("y2", h - 1);
+
+rules.append("svg:line")
+    .attr("class", function(d) { return d ? null : "axis"; })
+    .attr("y1", y)
+    .attr("y2", y)
+    .attr("x1", 0)
+    .attr("x2", w + 1);
+
+rules.append("svg:text")
+    .attr("x", x)
+    .attr("y", h + 3)
+    .attr("dy", ".71em")
+    .attr("text-anchor", "middle")
+    .text(x.tickFormat(10));
+
+rules.append("svg:text")
+    .attr("y", y)
+    .attr("x", -3)
+    .attr("dy", ".35em")
+    .attr("text-anchor", "end")
+    .text(y.tickFormat(10));
+
+vis.append("svg:path")
+    .attr("class", "area")
+    .attr("d", d3.svg.area()
+    .x(function(d) { return x(d.x); })
+    .y0(h - 1)
+    .y1(function(d) { return y(d.y); }));
+
+vis.append("svg:path")
+    .attr("class", "line")
+    .attr("d", d3.svg.line()
+    .x(function(d) { return x(d.x); })
+    .y(function(d) { return y(d.y); }));
+
+vis.selectAll("circle.area")
+    .data(data)
+  .enter().append("svg:circle")
+    .attr("class", "area")
+    .attr("cx", function(d) { return x(d.x); })
+    .attr("cy", function(d) { return y(d.y); })
+    .attr("r", 3.5);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/azimuthal/azimuthal.css
===================================================================
--- Dev/branches/Demo/d3/examples/azimuthal/azimuthal.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/azimuthal/azimuthal.css	(revision 225)
@@ -0,0 +1,21 @@
+@import url("../../lib/jquery-ui/jquery-ui.css");
+
+body, .ui-widget {
+  font: 14px Helvetica Neue;
+}
+
+svg {
+  width: 960px;
+  height: 500px;
+  border: solid 1px #ccc;
+  background: #eee;
+}
+
+path {
+  fill: #ccc;
+  stroke: #fff;
+}
+
+div {
+  width: 960px;
+}
Index: Dev/branches/Demo/d3/examples/azimuthal/azimuthal.html
===================================================================
--- Dev/branches/Demo/d3/examples/azimuthal/azimuthal.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/azimuthal/azimuthal.html	(revision 225)
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Polar Stereographic Projection</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../lib/jquery/jquery.min.js"></script>
+    <script type="text/javascript" src="../../lib/jquery-ui/jquery-ui.min.js"></script>
+    <link type="text/css" rel="stylesheet" href="azimuthal.css"/>
+  </head>
+  <body>
+    <h3>Azimuthal Projection</h3>
+    <script type="text/javascript" src="azimuthal.js"></script><p>
+    <div id="lon">origin.longitude: <span>0</span></div>
+    <div id="lat">origin.latitude: <span>0</span></div><p>
+    <div id="scale">scale: <span>240</span></div><p>
+    <div id="translate-x">translate.x: <span>480</span></div>
+    <div id="translate-y">translate.y: <span>250</span></div>
+    <script type="text/javascript">
+
+$("#lon").slider({
+  min: -180,
+  max: 180,
+  step: 1e-1,
+  value: 0,
+  slide: function(event, ui) {
+    var origin = xy.origin();
+    origin[0] = ui.value;
+    xy.origin(origin);
+    refresh();
+  }
+});
+
+$("#lat").slider({
+  min: -90,
+  max: 90,
+  step: 1e-1,
+  value: 0,
+  slide: function(event, ui) {
+    var origin = xy.origin();
+    origin[1] = ui.value;
+    xy.origin(origin);
+    refresh();
+  }
+});
+
+$("#scale").slider({
+  min: 0,
+  max: 3000,
+  value: 240,
+  slide: function(event, ui) {
+    xy.scale(ui.value);
+    refresh();
+  }
+});
+
+$("#translate-x").slider({
+  min: -2000,
+  max: 2000,
+  value: 480,
+  slide: function(event, ui) {
+    var translate = xy.translate();
+    translate[0] = ui.value;
+    xy.translate(translate);
+    refresh();
+  }
+});
+
+$("#translate-y").slider({
+  min: -2000,
+  max: 2000,
+  value: 250,
+  slide: function(event, ui) {
+    var translate = xy.translate();
+    translate[1] = ui.value;
+    xy.translate(translate);
+    refresh();
+  }
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/azimuthal/azimuthal.js
===================================================================
--- Dev/branches/Demo/d3/examples/azimuthal/azimuthal.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/azimuthal/azimuthal.js	(revision 225)
@@ -0,0 +1,27 @@
+var xy = d3.geo.azimuthal().scale(240).mode("stereographic"),
+    path = d3.geo.path().projection(xy),
+    svg = d3.select("body").append("svg:svg");
+
+d3.json("../data/world-countries.json", function(collection) {
+  svg.selectAll("path")
+      .data(collection.features)
+    .enter().append("svg:path")
+      .attr("d", path)
+    .append("svg:title")
+      .text(function(d) { return d.properties.name; });
+});
+
+function refresh() {
+  svg.selectAll("path")
+      .attr("d", path);
+  d3.select("#lon span")
+      .text(xy.origin()[0]);
+  d3.select("#lat span")
+      .text(xy.origin()[1]);
+  d3.select("#scale span")
+      .text(xy.scale());
+  d3.select("#translate-x span")
+      .text(xy.translate()[0]);
+  d3.select("#translate-y span")
+      .text(xy.translate()[1]);
+}
Index: Dev/branches/Demo/d3/examples/bar/bar.html
===================================================================
--- Dev/branches/Demo/d3/examples/bar/bar.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/bar/bar.html	(revision 225)
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Bar Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+svg {
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var data = d3.range(10).map(Math.random);
+
+var w = 430,
+    h = 230,
+    x = d3.scale.linear().domain([0, 1]).range([0, w]),
+    y = d3.scale.ordinal().domain(d3.range(data.length)).rangeBands([0, h], .2);
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w + 40)
+    .attr("height", h + 20)
+  .append("svg:g")
+    .attr("transform", "translate(20,0)");
+
+var bars = vis.selectAll("g.bar")
+    .data(data)
+  .enter().append("svg:g")
+    .attr("class", "bar")
+    .attr("transform", function(d, i) { return "translate(0," + y(i) + ")"; });
+
+bars.append("svg:rect")
+    .attr("fill", "steelblue")
+    .attr("width", x)
+    .attr("height", y.rangeBand());
+
+bars.append("svg:text")
+    .attr("x", x)
+    .attr("y", y.rangeBand() / 2)
+    .attr("dx", -6)
+    .attr("dy", ".35em")
+    .attr("fill", "white")
+    .attr("text-anchor", "end")
+    .text(x.tickFormat(100));
+
+bars.append("svg:text")
+    .attr("x", 0)
+    .attr("y", y.rangeBand() / 2)
+    .attr("dx", -6)
+    .attr("dy", ".35em")
+    .attr("text-anchor", "end")
+    .text(function(d, i) { return String.fromCharCode(65 + i); });
+
+var rules = vis.selectAll("g.rule")
+    .data(x.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "rule")
+    .attr("transform", function(d) { return "translate(" + x(d) + ",0)"; });
+
+rules.append("svg:line")
+    .attr("y1", h)
+    .attr("y2", h + 6)
+    .attr("stroke", "black");
+
+rules.append("svg:line")
+    .attr("y1", 0)
+    .attr("y2", h)
+    .attr("stroke", "white")
+    .attr("stroke-opacity", .3);
+
+rules.append("svg:text")
+    .attr("y", h + 9)
+    .attr("dy", ".71em")
+    .attr("text-anchor", "middle")
+    .text(x.tickFormat(10));
+
+vis.append("svg:line")
+    .attr("y1", 0)
+    .attr("y2", h)
+    .attr("stroke", "black");
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/box/box.css
===================================================================
--- Dev/branches/Demo/d3/examples/box/box.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/box/box.css	(revision 225)
@@ -0,0 +1,4 @@
+.box { font: 10px sans-serif; }
+.box line, .box rect, .box circle { stroke: #000; stroke-width: 1.5px; fill: #fff; }
+.box .center { stroke-dasharray: 3 3; }
+.box .outlier { stroke: #ccc; fill: none; }
Index: Dev/branches/Demo/d3/examples/box/box.html
===================================================================
--- Dev/branches/Demo/d3/examples/box/box.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/box/box.html	(revision 225)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Box Plot Charts</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.chart.js"></script>
+    <script type="text/javascript" src="../../d3.csv.js"></script>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+    <link type="text/css" rel="stylesheet" href="box.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button class="first last" onclick="transition()">
+        Update
+      </button><p>
+    </div>
+    <script type="text/javascript" src="box.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/box/box.js
===================================================================
--- Dev/branches/Demo/d3/examples/box/box.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/box/box.js	(revision 225)
@@ -0,0 +1,68 @@
+var w = 120,
+    h = 500,
+    m = [10, 50, 20, 50], // top right bottom left
+    min = Infinity,
+    max = -Infinity;
+
+var chart = d3.chart.box()
+    .whiskers(iqr(1.5))
+    .width(w - m[1] - m[3])
+    .height(h - m[0] - m[2]);
+
+d3.csv("../data/morley.csv", function(csv) {
+  var data = [];
+
+  csv.forEach(function(x) {
+    var e = ~~x.Expt - 1,
+        r = ~~x.Run - 1,
+        s = ~~x.Speed,
+        d = data[e];
+    if (!d) d = data[e] = [s];
+    else d.push(s);
+    if (s > max) max = s;
+    if (s < min) min = s;
+  });
+
+  chart.domain([min, max]);
+
+  var vis = d3.select("#chart").selectAll("svg")
+      .data(data)
+    .enter().append("svg:svg")
+      .attr("class", "box")
+      .attr("width", w)
+      .attr("height", h)
+    .append("svg:g")
+      .attr("transform", "translate(" + m[3] + "," + m[0] + ")")
+      .call(chart);
+
+  chart.duration(1000);
+  window.transition = function() {
+    vis.map(randomize).call(chart);
+  };
+});
+
+function randomize(d) {
+  if (!d.randomizer) d.randomizer = randomizer(d);
+  return d.map(d.randomizer);
+}
+
+function randomizer(d) {
+  var k = d3.max(d) * .02;
+  return function(d) {
+    return Math.max(min, Math.min(max, d + k * (Math.random() - .5)));
+  };
+}
+
+// Returns a function to compute the interquartile range.
+function iqr(k) {
+  return function(d, i) {
+    var q1 = d.quartiles[0],
+        q3 = d.quartiles[2],
+        iqr = (q3 - q1) * k,
+        i = -1,
+        j = d.length;
+    while (d[++i] < q1 - iqr);
+    while (d[--j] > q3 + iqr);
+    return [i, j];
+  };
+}
Index: Dev/branches/Demo/d3/examples/bubble/bubble.css
===================================================================
--- Dev/branches/Demo/d3/examples/bubble/bubble.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/bubble/bubble.css	(revision 225)
@@ -0,0 +1,8 @@
+circle {
+  stroke: #fff;
+  stroke-width: 1.5px;
+}
+
+text {
+  font: 10px sans-serif;
+}
Index: Dev/branches/Demo/d3/examples/bubble/bubble.html
===================================================================
--- Dev/branches/Demo/d3/examples/bubble/bubble.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/bubble/bubble.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Bubble Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="bubble.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="bubble.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/bubble/bubble.js
===================================================================
--- Dev/branches/Demo/d3/examples/bubble/bubble.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/bubble/bubble.js	(revision 225)
@@ -0,0 +1,46 @@
+var r = 960,
+    format = d3.format(",d"),
+    fill = d3.scale.category20c();
+
+var bubble = d3.layout.pack()
+    .sort(null)
+    .size([r, r]);
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", r)
+    .attr("height", r)
+    .attr("class", "bubble");
+
+d3.json("../data/flare.json", function(json) {
+  var node = vis.selectAll("g.node")
+      .data(bubble.nodes(classes(json))
+      .filter(function(d) { return !d.children; }))
+    .enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
+
+  node.append("svg:title")
+      .text(function(d) { return d.className + ": " + format(d.value); });
+
+  node.append("svg:circle")
+      .attr("r", function(d) { return d.r; })
+      .style("fill", function(d) { return fill(d.packageName); });
+
+  node.append("svg:text")
+      .attr("text-anchor", "middle")
+      .attr("dy", ".3em")
+      .text(function(d) { return d.className.substring(0, d.r / 3); });
+});
+
+// Returns a flattened hierarchy containing all leaf nodes under the root.
+function classes(root) {
+  var classes = [];
+
+  function recurse(name, node) {
+    if (node.children) node.children.forEach(function(child) { recurse(node.name, child); });
+    else classes.push({packageName: name, className: node.name, value: node.size});
+  }
+
+  recurse(null, root);
+  return {children: classes};
+}
Index: Dev/branches/Demo/d3/examples/bullet/bullet.css
===================================================================
--- Dev/branches/Demo/d3/examples/bullet/bullet.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/bullet/bullet.css	(revision 225)
@@ -0,0 +1,10 @@
+.bullet { font: 10px sans-serif; }
+.bullet .marker { stroke: #000; stroke-width: 2px; }
+.bullet .tick line { stroke: #666; stroke-width: .5px; }
+.bullet .range.s0 { fill: #eee; }
+.bullet .range.s1 { fill: #ddd; }
+.bullet .range.s2 { fill: #ccc; }
+.bullet .measure.s0 { fill: lightsteelblue; }
+.bullet .measure.s1 { fill: steelblue; }
+.bullet .title { font-size: 14px; font-weight: bold; }
+.bullet .subtitle { fill: #999; }
Index: Dev/branches/Demo/d3/examples/bullet/bullet.html
===================================================================
--- Dev/branches/Demo/d3/examples/bullet/bullet.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/bullet/bullet.html	(revision 225)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Bullet Charts</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.chart.js"></script>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+    <link type="text/css" rel="stylesheet" href="bullet.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button class="first last" onclick="transition()">
+        Update
+      </button><p>
+    </div>
+    <script type="text/javascript" src="bullet.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/bullet/bullet.js
===================================================================
--- Dev/branches/Demo/d3/examples/bullet/bullet.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/bullet/bullet.js	(revision 225)
@@ -0,0 +1,53 @@
+var w = 960,
+    h = 50,
+    m = [5, 40, 20, 120]; // top right bottom left
+
+var chart = d3.chart.bullet()
+    .width(w - m[1] - m[3])
+    .height(h - m[0] - m[2]);
+
+d3.json("bullets.json", function(data) {
+
+  var vis = d3.select("#chart").selectAll("svg")
+      .data(data)
+    .enter().append("svg:svg")
+      .attr("class", "bullet")
+      .attr("width", w)
+      .attr("height", h)
+    .append("svg:g")
+      .attr("transform", "translate(" + m[3] + "," + m[0] + ")")
+      .call(chart);
+
+  var title = vis.append("svg:g")
+      .attr("text-anchor", "end")
+      .attr("transform", "translate(-6," + (h - m[0] - m[2]) / 2 + ")");
+
+  title.append("svg:text")
+      .attr("class", "title")
+      .text(function(d) { return d.title; });
+
+  title.append("svg:text")
+      .attr("class", "subtitle")
+      .attr("dy", "1em")
+      .text(function(d) { return d.subtitle; });
+
+  chart.duration(1000);
+  window.transition = function() {
+    vis.map(randomize).call(chart);
+  };
+});
+
+function randomize(d) {
+  if (!d.randomizer) d.randomizer = randomizer(d);
+  d.ranges = d.ranges.map(d.randomizer);
+  d.markers = d.markers.map(d.randomizer);
+  d.measures = d.measures.map(d.randomizer);
+  return d;
+}
+
+function randomizer(d) {
+  var k = d3.max(d.ranges) * .2;
+  return function(d) {
+    return Math.max(0, d + k * (Math.random() - .5));
+  };
+}
Index: Dev/branches/Demo/d3/examples/bullet/bullets.json
===================================================================
--- Dev/branches/Demo/d3/examples/bullet/bullets.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/bullet/bullets.json	(revision 225)
@@ -0,0 +1,7 @@
+[
+  {"title":"Revenue","subtitle":"US$, in thousands","ranges":[150,225,300],"measures":[220,270],"markers":[250]},
+  {"title":"Profit","subtitle":"%","ranges":[20,25,30],"measures":[21,23],"markers":[26]},
+  {"title":"Order Size","subtitle":"US$, average","ranges":[350,500,600],"measures":[100,320],"markers":[550]},
+  {"title":"New Customers","subtitle":"count","ranges":[1400,2000,2500],"measures":[1000,1650],"markers":[2100]},
+  {"title":"Satisfaction","subtitle":"out of 5","ranges":[3.5,4.25,5],"measures":[3.2,4.7],"markers":[4.4]}
+]
Index: Dev/branches/Demo/d3/examples/bundle/bundle-radial.css
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/bundle-radial.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/bundle-radial.css	(revision 225)
@@ -0,0 +1,9 @@
+.node {
+  font: 10px sans-serif;
+}
+
+.link {
+  stroke: steelblue;
+  stroke-opacity: .4;
+  fill: none;
+}
Index: Dev/branches/Demo/d3/examples/bundle/bundle-radial.html
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/bundle-radial.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/bundle-radial.html	(revision 225)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Hierarchical Edge Bundling (Radial Tree)</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <script type="text/javascript" src="packages.js"></script>
+    <link type="text/css" rel="stylesheet" href="bundle-radial.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="bundle-radial.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/bundle/bundle-radial.js
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/bundle-radial.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/bundle-radial.js	(revision 225)
@@ -0,0 +1,50 @@
+var r = 960 / 2,
+    splines = [];
+
+var cluster = d3.layout.cluster()
+    .size([360, r - 120])
+    .sort(null)
+    .value(function(d) { return d.size; });
+
+var bundle = d3.layout.bundle();
+
+var line = d3.svg.line.radial()
+    .interpolate("bundle")
+    .tension(.85)
+    .radius(function(d) { return d.y; })
+    .angle(function(d) { return d.x / 180 * Math.PI; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", r * 2)
+    .attr("height", r * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + r + "," + r + ")");
+
+d3.json("../data/flare-imports.json", function(classes) {
+  var nodes = cluster.nodes(packages.root(classes)),
+      links = packages.imports(nodes);
+
+  vis.selectAll("path.link")
+      .data(splines = bundle(links))
+    .enter().append("svg:path")
+      .attr("class", "link")
+      .attr("d", line);
+
+  vis.selectAll("g.node")
+      .data(nodes.filter(function(n) { return !n.children; }))
+    .enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; })
+    .append("svg:text")
+      .attr("dx", function(d) { return d.x < 180 ? 8 : -8; })
+      .attr("dy", ".31em")
+      .attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; })
+      .attr("transform", function(d) { return d.x < 180 ? null : "rotate(180)"; })
+      .text(function(d) { return d.key; });
+});
+
+d3.select(window).on("mousemove", function() {
+  vis.selectAll("path.link")
+      .data(splines)
+      .attr("d", line.tension(Math.min(1, d3.event.clientX / 960)));
+});
Index: Dev/branches/Demo/d3/examples/bundle/bundle-treemap.css
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/bundle-treemap.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/bundle-treemap.css	(revision 225)
@@ -0,0 +1,14 @@
+.cell {
+  border: solid 1px white;
+  font: 10px sans-serif;
+  line-height: 12px;
+  overflow: hidden;
+  position: absolute;
+  text-indent: 2px;
+}
+
+.link {
+  stroke: #000;
+  stroke-opacity: .5;
+  fill: none;
+}
Index: Dev/branches/Demo/d3/examples/bundle/bundle-treemap.html
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/bundle-treemap.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/bundle-treemap.html	(revision 225)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Hierarchical Edge Bundling (Treemap)</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <script type="text/javascript" src="../../lib/colorbrewer/colorbrewer.js"></script>
+    <script type="text/javascript" src="packages.js"></script>
+    <link type="text/css" rel="stylesheet" href="bundle-treemap.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="bundle-treemap.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/bundle/bundle-treemap.js
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/bundle-treemap.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/bundle-treemap.js	(revision 225)
@@ -0,0 +1,53 @@
+var w = 960,
+    h = 500,
+    fill = d3.scale.ordinal().range(colorbrewer.Greys[9].slice(1, 4)),
+    stroke = d3.scale.linear().domain([0, 1e4]).range(["brown", "steelblue"]);
+
+var treemap = d3.layout.treemap()
+    .size([w, h])
+    .value(function(d) { return d.size; });
+
+var bundle = d3.layout.bundle();
+
+var div = d3.select("#chart").append("div")
+    .style("position", "relative")
+    .style("width", w + "px")
+    .style("height", h + "px");
+
+var line = d3.svg.line()
+    .interpolate("bundle")
+    .tension(.85)
+    .x(function(d) { return d.x + d.dx / 2; })
+    .y(function(d) { return d.y + d.dy / 2; });
+
+d3.json("../data/flare-imports.json", function(classes) {
+  var nodes = treemap.nodes(packages.root(classes)),
+      links = packages.imports(nodes);
+
+  div.selectAll("div")
+      .data(nodes)
+    .enter().append("div")
+      .attr("class", "cell")
+      .style("background", function(d) { return d.children ? fill(d.key) : null; })
+      .call(cell)
+      .text(function(d) { return d.children ? null : d.key; });
+
+  div.append("svg:svg")
+      .attr("width", w)
+      .attr("height", h)
+      .style("position", "absolute")
+    .selectAll("path.link")
+      .data(bundle(links))
+    .enter().append("svg:path")
+      .style("stroke", function(d) { return stroke(d[0].value); })
+      .attr("class", "link")
+      .attr("d", line);
+});
+
+function cell() {
+  this
+      .style("left", function(d) { return d.x + "px"; })
+      .style("top", function(d) { return d.y + "px"; })
+      .style("width", function(d) { return d.dx - 1 + "px"; })
+      .style("height", function(d) { return d.dy - 1 + "px"; });
+}
Index: Dev/branches/Demo/d3/examples/bundle/packages.js
===================================================================
--- Dev/branches/Demo/d3/examples/bundle/packages.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/bundle/packages.js	(revision 225)
@@ -0,0 +1,49 @@
+(function() {
+  packages = {
+
+    // Lazily construct the package hierarchy from class names.
+    root: function(classes) {
+      var map = {};
+
+      function find(name, data) {
+        var node = map[name], i;
+        if (!node) {
+          node = map[name] = data || {name: name, children: []};
+          if (name.length) {
+            node.parent = find(name.substring(0, i = name.lastIndexOf(".")));
+            node.parent.children.push(node);
+            node.key = name.substring(i + 1);
+          }
+        }
+        return node;
+      }
+
+      classes.forEach(function(d) {
+        find(d.name, d);
+      });
+
+      return map[""];
+    },
+
+    // Return a list of imports for the given array of nodes.
+    imports: function(nodes) {
+      var map = {},
+          imports = [];
+
+      // Compute a map from name to node.
+      nodes.forEach(function(d) {
+        map[d.name] = d;
+      });
+
+      // For each import, construct a link from the source to target node.
+      nodes.forEach(function(d) {
+        if (d.imports) d.imports.forEach(function(i) {
+          imports.push({source: map[d.name], target: map[i]});
+        });
+      });
+
+      return imports;
+    }
+
+  };
+})();
Index: Dev/branches/Demo/d3/examples/button.css
===================================================================
--- Dev/branches/Demo/d3/examples/button.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/button.css	(revision 225)
@@ -0,0 +1,35 @@
+button {
+  font: 14px Helvetica Neue;
+  background-color: #222;
+  background-image: -moz-linear-gradient(top, rgba(255,255,255,.25), rgba(255,255,255,.11));
+  background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, rgba(255,255,255,.25)),color-stop(1, rgba(255,255,255,.11)));
+  background-image: -webkit-linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.11));
+  color: #fff;
+  text-rendering: optimizeLegibility;
+  text-shadow: 0 -1px 1px #222;
+  padding: 6px 10px 6px 10px;
+  border: 0;
+  border-radius: 0;
+  border-bottom: 1px solid #222;
+  margin: 0;
+  -moz-box-shadow: 0 1px 3px #999;
+  -webkit-box-shadow: 0 1px 3px #999;
+}
+
+button.first {
+  border-top-left-radius: 5px;
+  border-bottom-left-radius: 5px;
+}
+
+button.last {
+  border-top-right-radius: 5px;
+  border-bottom-right-radius: 5px;
+}
+
+button.active {
+  background-color: rgb(65,102,133);
+}
+
+button:hover {
+  background-color: steelblue;
+}
Index: Dev/branches/Demo/d3/examples/calendar/calendar.css
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/calendar.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/calendar.css	(revision 225)
@@ -0,0 +1,16 @@
+#chart {
+  font: 10px sans-serif;
+}
+
+.day {
+  fill: #fff;
+  stroke: #ccc;
+  shape-rendering: crispEdges;
+}
+
+.month {
+  fill: none;
+  stroke: #000;
+  stroke-width: 2px;
+  shape-rendering: crispEdges;
+}
Index: Dev/branches/Demo/d3/examples/calendar/calendar.js
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/calendar.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/calendar.js	(revision 225)
@@ -0,0 +1,50 @@
+var calendar = {
+
+  format: d3.time.format("%Y-%m-%d"),
+
+  dates: function(year) {
+    var dates = [],
+        date = new Date(year, 0, 1),
+        week = 0,
+        day;
+    do {
+      dates.push({
+        day: day = date.getDay(),
+        week: week,
+        month: date.getMonth(),
+        Date: calendar.format(date)
+      });
+      date.setDate(date.getDate() + 1);
+      if (day === 6) week++;
+    } while (date.getFullYear() === year);
+    return dates;
+  },
+
+  months: function(year) {
+    var months = [],
+        date = new Date(year, 0, 1),
+        month,
+        firstDay,
+        firstWeek,
+        day,
+        week = 0;
+    do {
+      firstDay = date.getDay();
+      firstWeek = week;
+      month = date.getMonth();
+      do {
+        day = date.getDay();
+        if (day === 6) week++;
+        date.setDate(date.getDate() + 1);
+      } while (date.getMonth() === month);
+      months.push({
+        firstDay: firstDay,
+        firstWeek: firstWeek,
+        lastDay: day,
+        lastWeek: day === 6 ? week - 1 : week
+      });
+    } while (date.getFullYear() === year);
+    return months;
+  }
+
+};
Index: Dev/branches/Demo/d3/examples/calendar/dji.csv
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/dji.csv	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/dji.csv	(revision 225)
@@ -0,0 +1,5233 @@
+Date,Open,High,Low,Close,Volume,Adj Close
+2010-10-01,10789.72,10907.41,10759.14,10829.68,4298910000,10829.68
+2010-09-30,10835.96,10960.99,10732.27,10788.05,4284160000,10788.05
+2010-09-29,10857.98,10901.96,10759.75,10835.28,3990280000,10835.28
+2010-09-28,10809.85,10905.44,10714.03,10858.14,4025840000,10858.14
+2010-09-27,10860.03,10902.52,10776.44,10812.04,3587860000,10812.04
+2010-09-24,10664.39,10897.83,10664.39,10860.26,4123950000,10860.26
+2010-09-23,10738.48,10779.65,10610.12,10662.42,3847850000,10662.42
+2010-09-22,10761.11,10829.75,10682.40,10739.31,3911070000,10739.31
+2010-09-21,10753.39,10844.89,10674.83,10761.03,4175660000,10761.03
+2010-09-20,10608.08,10783.51,10594.38,10753.62,3364080000,10753.62
+2010-09-17,10595.44,10689.29,10529.67,10607.85,4086140000,10607.85
+2010-09-16,10571.75,10624.58,10499.43,10594.83,3364080000,10594.83
+2010-09-15,10526.42,10609.21,10453.15,10572.73,3369840000,10572.73
+2010-09-14,10544.81,10622.69,10460.34,10526.49,4521050000,10526.49
+2010-09-13,10458.60,10605.73,10458.45,10544.13,4521050000,10544.13
+2010-09-10,10415.01,10502.80,10376.34,10462.77,3061160000,10462.77
+2010-09-09,10388.22,10515.86,10359.23,10415.24,3387770000,10415.24
+2010-09-08,10338.57,10460.50,10318.93,10387.01,3224640000,10387.01
+2010-09-07,10446.80,10448.99,10304.44,10340.69,3107380000,10340.69
+2010-09-03,10321.92,10484.71,10321.92,10447.93,3534500000,10447.93
+2010-09-02,10270.08,10350.98,10211.80,10320.10,3704210000,10320.10
+2010-09-01,10016.01,10305.87,10016.01,10269.47,4396880000,10269.47
+2010-08-31,10006.42,10101.53,9915.73,10014.72,4038770000,10014.72
+2010-08-30,10145.58,10170.10,10005.56,10009.73,2917990000,10009.73
+2010-08-27,9982.40,10176.30,9925.11,10150.65,4102460000,10150.65
+2010-08-26,10059.83,10138.12,9959.17,9985.81,3646710000,9985.81
+2010-08-25,10040.15,10104.18,9925.34,10060.06,4360190000,10060.06
+2010-08-24,10170.86,10170.86,9975.86,10040.45,4436330000,10040.45
+2010-08-23,10215.51,10328.88,10146.18,10174.41,3210950000,10174.41
+2010-08-20,10270.98,10276.13,10131.88,10213.62,3761570000,10213.62
+2010-08-19,10411.15,10412.29,10202.34,10271.21,4290540000,10271.21
+2010-08-18,10398.59,10486.38,10308.83,10415.54,3724260000,10415.54
+2010-08-17,10297.55,10501.67,10297.55,10405.85,3968210000,10405.85
+2010-08-16,10303.07,10354.39,10193.26,10302.01,3142450000,10302.01
+2010-08-13,10320.33,10381.86,10254.18,10303.15,3328890000,10303.15
+2010-08-12,10361.58,10388.37,10222.85,10319.95,4521050000,10319.95
+2010-08-11,10631.82,10631.82,10339.63,10378.83,4511860000,10378.83
+2010-08-10,10696.63,10717.21,10522.63,10644.25,3979360000,10644.25
+2010-08-09,10654.62,10755.66,10618.26,10698.75,3191630000,10698.75
+2010-08-06,10668.55,10688.08,10491.37,10653.56,3857890000,10653.56
+2010-08-05,10679.67,10712.37,10571.60,10674.98,3685560000,10674.98
+2010-08-04,10630.20,10738.48,10583.10,10680.43,4057850000,10680.43
+2010-08-03,10673.92,10714.19,10564.18,10636.38,4071820000,10636.38
+2010-08-02,10468.82,10715.21,10468.82,10674.38,4144180000,10674.38
+2010-07-30,10465.19,10528.84,10327.37,10465.94,4006450000,10465.94
+2010-07-29,10498.94,10609.74,10383.45,10467.16,4612420000,10467.16
+2010-07-28,10537.01,10586.36,10445.17,10497.88,4002390000,10497.88
+2010-07-27,10525.28,10632.52,10460.65,10537.69,4725690000,10537.69
+2010-07-26,10424.17,10545.94,10391.02,10525.43,4009650000,10525.43
+2010-07-23,10321.16,10465.19,10237.84,10424.62,4524570000,10424.62
+2010-07-22,10121.81,10391.78,10121.81,10322.30,4826900000,10322.30
+2010-07-21,10226.02,10310.04,10053.85,10120.53,4747180000,10120.53
+2010-07-20,10151.48,10248.20,9973.17,10229.96,4713280000,10229.96
+2010-07-19,10098.12,10213.09,10051.28,10154.43,4089500000,10154.43
+2010-07-16,10356.20,10356.20,10071.63,10097.90,5297350000,10097.90
+2010-07-15,10367.10,10409.49,10216.04,10359.31,4552470000,10359.31
+2010-07-14,10370.96,10423.03,10265.16,10366.72,4521050000,10366.72
+2010-07-13,10217.55,10436.20,10217.55,10363.02,4640460000,10363.02
+2010-07-12,10199.24,10260.62,10121.13,10216.27,3426990000,10216.27
+2010-07-09,10137.93,10226.48,10079.05,10198.03,3506570000,10198.03
+2010-07-08,10019.26,10175.02,9987.02,10138.99,4548460000,10138.99
+2010-07-07,9736.85,10029.93,9716.38,10018.28,4931220000,10018.28
+2010-07-06,9689.21,9880.76,9648.26,9743.62,4691240000,9743.62
+2010-07-02,9732.23,9798.19,9603.80,9686.48,3968500000,9686.48
+2010-07-01,9773.27,9834.71,9596.04,9732.53,6435770000,9732.53
+2010-06-30,9868.34,9951.47,9741.07,9774.02,5067080000,9774.02
+2010-06-29,10135.72,10135.72,9786.45,9870.30,6136700000,9870.30
+2010-06-28,10143.05,10246.82,10070.12,10138.52,3896410000,10138.52
+2010-06-25,10153.48,10261.10,10039.97,10143.81,5128840000,10143.81
+2010-06-24,10297.08,10314.31,10112.60,10152.80,4814830000,10152.80
+2010-06-23,10293.30,10393.89,10195.81,10298.44,4526150000,10298.44
+2010-06-22,10441.95,10524.78,10276.14,10293.52,4514380000,10293.52
+2010-06-21,10452.46,10627.19,10387.54,10442.41,4514360000,10442.41
+2010-06-18,10435.00,10513.75,10379.60,10450.64,4555360000,10450.64
+2010-06-17,10409.98,10479.74,10293.49,10434.17,4557760000,10434.17
+2010-06-16,10404.24,10456.39,10289.37,10409.46,5002600000,10409.46
+2010-06-15,10192.40,10416.11,10192.40,10404.77,4644490000,10404.77
+2010-06-14,10211.83,10354.97,10175.02,10190.89,4425830000,10190.89
+2010-06-11,10166.78,10235.10,10038.31,10211.07,4059280000,10211.07
+2010-06-10,9901.67,10206.61,9901.67,10172.53,5144780000,10172.53
+2010-06-09,9941.57,10093.33,9859.04,9899.25,5983200000,9899.25
+2010-06-08,9812.94,9971.57,9726.33,9939.98,6192750000,9939.98
+2010-06-07,9931.75,10025.84,9798.73,9816.49,5467560000,9816.49
+2010-06-04,10249.61,10249.61,9881.11,9931.97,6180580000,9931.97
+2010-06-03,10250.67,10348.84,10158.92,10255.28,4995970000,10255.28
+2010-06-02,10025.61,10256.57,10007.09,10249.54,5026360000,10249.54
+2010-06-01,10133.94,10249.27,9976.56,10024.02,5271480000,10024.02
+2010-05-28,10258.00,10293.45,10078.66,10136.63,4871210000,10136.63
+2010-05-27,9971.73,10279.01,9971.73,10258.99,5698460000,10258.99
+2010-05-26,10045.11,10211.60,9937.79,9974.45,4521050000,9974.45
+2010-05-25,10061.43,10061.43,9756.11,10043.75,7329580000,10043.75
+2010-05-24,10193.46,10235.63,10028.78,10066.57,5224040000,10066.57
+2010-05-21,10063.93,10225.88,9860.93,10193.39,5452130000,10193.39
+2010-05-20,10440.21,10440.21,10042.46,10068.01,8328569600,10068.01
+2010-05-19,10505.70,10558.56,10306.22,10444.37,6765800000,10444.37
+2010-05-18,10625.45,10760.05,10463.15,10510.95,6170840000,10510.95
+2010-05-17,10616.98,10707.30,10424.72,10625.83,5922920000,10625.83
+2010-05-14,10780.68,10780.68,10509.89,10620.16,6126400000,10620.16
+2010-05-13,10896.61,10952.84,10752.72,10782.95,4870640000,10782.95
+2010-05-12,10742.15,10941.88,10725.81,10896.91,5225460000,10896.91
+2010-05-11,10780.00,10888.30,10653.71,10748.26,5842550000,10748.26
+2010-05-10,10386.18,10880.14,10386.18,10785.14,6893700000,10785.14
+2010-05-07,10519.42,10622.27,10221.50,10380.43,9472910400,10380.43
+2010-05-06,10862.22,10925.86,9787.17,10520.32,10617809600,10520.32
+2010-05-05,10918.40,10984.05,10754.30,10868.12,6795940000,10868.12
+2010-05-04,11149.48,11149.48,10843.71,10926.77,6594720000,10926.77
+2010-05-03,11009.60,11203.37,11004.15,11151.83,4938050000,11151.83
+2010-04-30,11168.23,11235.94,10984.35,11008.61,6048260000,11008.61
+2010-04-29,11045.64,11232.54,11045.64,11167.32,6059410000,11167.32
+2010-04-28,10988.87,11115.63,10938.48,11045.27,6342310000,11045.27
+2010-04-27,11203.67,11260.88,10962.81,10991.99,7454540000,10991.99
+2010-04-26,11205.11,11308.95,11150.01,11205.03,5647760000,11205.03
+2010-04-23,11132.18,11247.20,11058.87,11204.28,5326060000,11204.28
+2010-04-22,11119.78,11175.33,10975.66,11134.29,6035780000,11134.29
+2010-04-21,11116.91,11217.35,11018.59,11124.92,5724310000,11124.92
+2010-04-20,11093.11,11190.22,11045.80,11117.06,5316590000,11117.06
+2010-04-19,11018.36,11116.76,10940.60,11092.05,6597740000,11092.05
+2010-04-16,11143.66,11186.82,10947.55,11018.66,8108470400,11018.66
+2010-04-15,11122.96,11189.61,11051.31,11144.57,5995330000,11144.57
+2010-04-14,11020.70,11147.14,11004.61,11123.11,5760040000,11123.11
+2010-04-13,11006.72,11072.70,10925.86,11019.42,5403580000,11019.42
+2010-04-12,10996.75,11066.96,10957.22,11005.97,4607090000,11005.97
+2010-04-09,10926.92,11032.12,10894.19,10997.35,4511570000,10997.35
+2010-04-08,10896.99,10969.92,10810.15,10927.07,4726970000,10927.07
+2010-04-07,10961.95,11000.22,10835.77,10897.52,5101430000,10897.52
+2010-04-06,10972.49,11017.76,10893.89,10969.99,4086180000,10969.99
+2010-04-05,10927.45,11026.75,10880.36,10973.55,3881620000,10973.55
+2010-04-01,10857.31,10983.14,10851.57,10927.07,4006870000,10927.07
+2010-03-31,10907.34,10933.19,10802.22,10856.63,4484340000,10856.63
+2010-03-30,10895.02,10968.56,10837.21,10907.42,4085000000,10907.42
+2010-03-29,10849.23,10954.43,10827.91,10895.86,4375580000,10895.86
+2010-03-26,10841.29,10934.85,10801.84,10850.36,4708420000,10850.36
+2010-03-25,10837.51,10985.26,10818.77,10841.21,5668900000,10841.21
+2010-03-24,10887.62,10925.48,10788.77,10836.15,4705750000,10836.15
+2010-03-23,10787.18,10906.06,10752.41,10888.83,4411640000,10888.83
+2010-03-22,10741.00,10836.68,10672.23,10785.89,4261680000,10785.89
+2010-03-19,10780.00,10869.55,10665.35,10741.98,5212410000,10741.98
+2010-03-18,10733.44,10821.49,10686.89,10779.17,4234510000,10779.17
+2010-03-17,10686.36,10787.86,10658.10,10733.67,4963200000,10733.67
+2010-03-16,10642.53,10717.42,10594.16,10685.98,4369770000,10685.98
+2010-03-15,10623.41,10680.32,10540.65,10642.15,4164110000,10642.15
+2010-03-12,10611.77,10690.90,10561.66,10624.69,4928160000,10624.69
+2010-03-11,10560.98,10626.73,10489.87,10611.84,4669060000,10611.84
+2010-03-10,10560.13,10639.05,10502.64,10567.33,5469120000,10567.33
+2010-03-09,10552.24,10637.46,10493.49,10564.38,5185570000,10564.38
+2010-03-08,10563.78,10632.48,10500.90,10552.52,3774680000,10552.52
+2010-03-05,10445.13,10587.13,10445.13,10566.20,4133000000,10566.20
+2010-03-04,10396.53,10484.05,10363.88,10444.14,3945010000,10444.14
+2010-03-03,10406.28,10496.22,10359.58,10396.76,3951320000,10396.76
+2010-03-02,10404.16,10493.80,10359.80,10405.98,4134680000,10405.98
+2010-03-01,10326.10,10444.60,10320.05,10403.79,3847640000,10403.79
+2010-02-26,10321.41,10391.24,10250.45,10325.26,3945190000,10325.26
+2010-02-25,10366.60,10366.60,10155.75,10321.03,4521130000,10321.03
+2010-02-24,10284.00,10416.94,10271.61,10374.16,4168360000,10374.16
+2010-02-23,10383.16,10430.16,10239.34,10282.41,4521050000,10282.41
+2010-02-22,10402.43,10468.55,10333.05,10383.38,3814440000,10383.38
+2010-02-19,10387.77,10459.18,10316.50,10402.35,3944280000,10402.35
+2010-02-18,10309.39,10416.79,10255.58,10392.90,3878620000,10392.90
+2010-02-17,10261.48,10366.83,10223.16,10309.24,4259230000,10309.24
+2010-02-16,10100.81,10292.62,10100.81,10268.81,4080770000,10268.81
+2010-02-12,10137.23,10140.18,9962.13,10099.14,4160680000,10099.14
+2010-02-11,10037.85,10184.85,9963.19,10144.19,4400870000,10144.19
+2010-02-10,10055.46,10120.15,9946.26,10038.38,4251450000,10038.38
+2010-02-09,9910.28,10154.24,9910.28,10058.64,5114260000,10058.64
+2010-02-08,10005.43,10059.24,9882.85,9908.39,4089820000,9908.39
+2010-02-05,10003.69,10078.89,9822.84,10012.23,6438900000,10012.23
+2010-02-04,10273.12,10273.12,9984.35,10002.18,5859690000,10002.18
+2010-02-03,10291.73,10356.86,10192.03,10270.55,4285450000,10270.55
+2010-02-02,10186.13,10333.35,10138.75,10296.85,4749540000,10296.85
+2010-02-01,10068.99,10227.24,10068.99,10185.53,4077610000,10185.53
+2010-01-29,10122.04,10272.29,10014.35,10067.33,5412850000,10067.33
+2010-01-28,10236.92,10310.68,10023.80,10120.46,5452400000,10120.46
+2010-01-27,10194.29,10294.13,10060.98,10236.16,5319120000,10236.16
+2010-01-26,10195.35,10323.00,10102.17,10194.29,4731910000,10194.29
+2010-01-25,10175.10,10316.65,10135.95,10196.86,4481390000,10196.86
+2010-01-22,10389.58,10450.04,10133.15,10172.98,6208650000,10172.98
+2010-01-21,10603.91,10651.14,10334.18,10389.88,6874289600,10389.88
+2010-01-20,10719.69,10719.69,10492.36,10603.15,4810560000,10603.15
+2010-01-19,10608.37,10763.45,10555.47,10725.43,4724830000,10725.43
+2010-01-15,10706.99,10736.54,10529.09,10609.65,4758730000,10609.65
+2010-01-14,10680.16,10767.15,10619.02,10710.55,3915200000,10710.55
+2010-01-13,10628.09,10747.12,10569.07,10680.77,4170360000,10680.77
+2010-01-12,10662.86,10701.48,10523.35,10627.26,4716160000,10627.26
+2010-01-11,10620.31,10739.87,10538.91,10663.99,4255780000,10663.99
+2010-01-08,10606.40,10653.11,10509.74,10618.19,4389590000,10618.19
+2010-01-07,10571.11,10655.60,10471.73,10606.86,5270680000,10606.86
+2010-01-06,10564.72,10655.22,10488.28,10573.68,4972660000,10573.68
+2010-01-05,10584.56,10647.14,10468.86,10572.02,2491020000,10572.02
+2010-01-04,10430.69,10641.62,10430.69,10583.96,3991400000,10583.96
+2009-12-31,10548.51,10578.74,10420.56,10428.05,2076990000,10428.05
+2009-12-30,10544.36,10583.28,10470.75,10548.51,2277300000,10548.51
+2009-12-29,10547.83,10605.65,10518.59,10545.41,2491020000,10545.41
+2009-12-28,10517.91,10585.02,10477.25,10547.08,2716400000,10547.08
+2009-12-24,10467.12,10541.26,10450.95,10520.10,1267710000,10520.10
+2009-12-23,10464.32,10520.93,10409.00,10466.44,3166870000,10466.44
+2009-12-22,10414.67,10511.56,10399.33,10464.93,3641130000,10464.93
+2009-12-21,10330.10,10489.41,10330.10,10414.14,3977340000,10414.14
+2009-12-18,10309.39,10412.55,10237.75,10328.89,6325890000,10328.89
+2009-12-17,10439.99,10439.99,10279.39,10308.26,7615070400,10308.26
+2009-12-16,10449.81,10552.75,10401.90,10441.12,4829820000,10441.12
+2009-12-15,10499.31,10542.09,10380.96,10452.00,5045100000,10452.00
+2009-12-14,10471.28,10566.88,10431.60,10501.05,4548490000,10501.05
+2009-12-11,10403.41,10516.47,10385.42,10471.50,3791090000,10471.50
+2009-12-10,10336.00,10479.06,10332.14,10405.83,3996490000,10405.83
+2009-12-09,10282.85,10377.11,10207.29,10337.05,4115410000,10337.05
+2009-12-08,10385.42,10385.42,10216.44,10285.97,4748030000,10285.97
+2009-12-07,10386.86,10478.23,10321.11,10390.11,4103360000,10390.11
+2009-12-04,10368.57,10549.04,10285.44,10388.90,5781140000,10388.90
+2009-12-03,10455.63,10533.55,10338.49,10366.15,4810030000,10366.15
+2009-12-02,10470.44,10537.63,10386.03,10452.68,3941340000,10452.68
+2009-12-01,10343.82,10537.03,10343.82,10471.58,4249310000,10471.58
+2009-11-30,10309.77,10394.34,10238.05,10344.84,3895520000,10344.84
+2009-11-27,10452.23,10452.23,10179.33,10309.92,2362910000,10309.92
+2009-11-25,10432.96,10513.60,10385.65,10464.40,3036350000,10464.40
+2009-11-24,10451.25,10488.66,10335.62,10433.71,3700820000,10433.71
+2009-11-23,10320.13,10524.40,10320.13,10450.95,3827920000,10450.95
+2009-11-20,10327.91,10377.41,10237.60,10318.16,3751230000,10318.16
+2009-11-19,10425.33,10425.33,10226.41,10332.44,4178030000,10332.44
+2009-11-18,10426.27,10471.28,10330.33,10426.31,4293340000,10426.31
+2009-11-17,10404.77,10465.76,10318.69,10437.42,3824070000,10437.42
+2009-11-16,10267.53,10465.83,10267.53,10406.96,4565850000,10406.96
+2009-11-13,10197.85,10332.29,10162.93,10270.47,3792610000,10270.47
+2009-11-12,10289.82,10341.21,10157.64,10197.47,4160250000,10197.47
+2009-11-11,10247.42,10357.38,10217.19,10291.26,4286700000,10291.26
+2009-11-10,10223.01,10300.33,10148.12,10246.97,4394770000,10246.97
+2009-11-09,10020.62,10248.93,10020.62,10226.94,4460030000,10226.94
+2009-11-06,10001.35,10077.08,9898.49,10023.42,4277130000,10023.42
+2009-11-05,9807.80,10043.75,9807.80,10005.96,4848350000,10005.96
+2009-11-04,9767.30,9962.35,9745.76,9802.14,5635510000,9802.14
+2009-11-03,9787.47,9844.84,9649.78,9771.91,5487500000,9771.91
+2009-11-02,9712.13,9883.68,9647.06,9789.44,6202640000,9789.44
+2009-10-30,9961.52,9980.19,9664.89,9712.73,6512420000,9712.73
+2009-10-29,9762.91,9996.67,9762.91,9962.58,5595040000,9962.58
+2009-10-28,9881.11,9940.89,9723.31,9762.69,6600350000,9762.69
+2009-10-27,9868.34,9994.55,9802.36,9882.17,5337380000,9882.17
+2009-10-26,9972.33,10107.99,9817.55,9867.96,6363380000,9867.96
+2009-10-23,10099.90,10138.59,9908.70,9972.18,4767460000,9972.18
+2009-10-22,9946.18,10133.08,9879.07,10081.31,5192410000,10081.31
+2009-10-21,10038.84,10157.94,9909.83,9949.36,5616290000,9949.36
+2009-10-20,10092.42,10157.26,9952.98,10041.48,5396930000,10041.48
+2009-10-19,9996.67,10146.61,9967.49,10092.19,4619240000,10092.19
+2009-10-16,10061.36,10072.62,9884.51,9995.91,4894740000,9995.91
+2009-10-15,10014.88,10087.43,9916.93,10062.94,5369780000,10062.94
+2009-10-14,9873.55,10064.98,9873.55,10015.86,5406420000,10015.86
+2009-10-13,9883.98,9935.53,9780.90,9871.06,4320480000,9871.06
+2009-10-12,9865.24,9978.07,9814.45,9885.80,3710430000,9885.80
+2009-10-09,9786.04,9890.41,9731.32,9864.94,3763780000,9864.94
+2009-10-08,9728.22,9872.50,9709.78,9786.87,4988400000,9786.87
+2009-10-07,9725.69,9782.56,9634.96,9725.58,4238220000,9725.58
+2009-10-06,9601.26,9793.37,9601.26,9731.25,5029840000,9731.25
+2009-10-05,9488.73,9640.33,9449.81,9599.75,4313310000,9599.75
+2009-10-02,9507.62,9571.71,9378.77,9487.67,5583240000,9487.67
+2009-10-01,9711.60,9714.70,9482.98,9509.28,5791450000,9509.28
+2009-09-30,9741.83,9817.17,9583.04,9712.28,5998860000,9712.28
+2009-09-29,9789.74,9861.99,9705.10,9742.20,4949900000,9742.20
+2009-09-28,9663.23,9861.39,9658.09,9789.36,3726950000,9789.36
+2009-09-25,9706.68,9781.73,9605.19,9665.19,4507090000,9665.19
+2009-09-24,9749.99,9836.82,9637.53,9707.44,5505610000,9707.44
+2009-09-23,9830.63,9937.72,9724.90,9748.55,5531930000,9748.55
+2009-09-22,9779.61,9890.71,9742.96,9829.87,5246600000,9829.87
+2009-09-21,9818.61,9846.12,9688.40,9778.86,4615280000,9778.86
+2009-09-18,9784.75,9898.57,9751.27,9820.20,5607970000,9820.20
+2009-09-17,9789.82,9896.38,9706.23,9783.92,6668110000,9783.92
+2009-09-16,9683.71,9837.05,9648.95,9791.71,6793529600,9791.71
+2009-09-15,9626.42,9745.91,9553.80,9683.41,6185620000,9683.41
+2009-09-14,9598.08,9662.10,9492.96,9626.80,4979610000,9626.80
+2009-09-11,9625.44,9698.67,9532.11,9605.41,4922600000,9605.41
+2009-09-10,9546.54,9666.55,9479.20,9627.48,5191380000,9627.48
+2009-09-09,9496.59,9604.43,9435.45,9547.22,5202550000,9547.22
+2009-09-08,9440.13,9564.45,9402.80,9497.34,5235160000,9497.34
+2009-09-04,9345.36,9465.37,9302.28,9441.27,4097370000,9441.27
+2009-09-03,9282.03,9350.27,9252.93,9344.61,4624280000,9344.61
+2009-09-02,9306.21,9378.77,9223.08,9280.67,5842730000,9280.67
+2009-09-01,9492.32,9573.67,9275.15,9310.60,6862360000,9310.60
+2009-08-31,9542.91,9552.97,9389.27,9496.28,5004560000,9496.28
+2009-08-28,9582.74,9666.71,9476.63,9544.20,5785780000,9544.20
+2009-08-27,9541.63,9629.98,9440.43,9580.63,5785880000,9580.63
+2009-08-26,9538.61,9613.65,9446.71,9543.52,5080060000,9543.52
+2009-08-25,9509.21,9646.53,9485.70,9539.29,5768740000,9539.29
+2009-08-24,9506.18,9625.89,9442.17,9509.28,6302450000,9509.28
+2009-08-21,9347.86,9549.19,9347.86,9505.96,5885550000,9505.96
+2009-08-20,9278.55,9385.72,9237.52,9350.05,4893160000,9350.05
+2009-08-19,9208.68,9333.34,9099.14,9279.16,4257000000,9279.16
+2009-08-18,9134.36,9262.08,9124.08,9217.94,4198970000,9217.94
+2009-08-17,9313.85,9313.85,9078.28,9135.34,4854970000,9135.34
+2009-08-14,9398.04,9425.17,9214.47,9321.40,4940750000,9321.40
+2009-08-13,9362.29,9448.97,9269.26,9398.19,5250660000,9398.19
+2009-08-12,9236.06,9442.47,9199.80,9361.61,5498170000,9361.61
+2009-08-11,9334.33,9351.86,9180.23,9241.45,5773160000,9241.45
+2009-08-10,9368.41,9420.56,9249.99,9337.95,5406080000,9337.95
+2009-08-07,9258.45,9466.89,9258.45,9370.07,6827089600,9370.07
+2009-08-06,9277.19,9378.01,9168.44,9256.26,6753380000,9256.26
+2009-08-05,9315.36,9374.38,9173.20,9280.97,7242120000,9280.97
+2009-08-04,9285.05,9370.30,9207.21,9320.19,5713700000,9320.19
+2009-08-03,9173.65,9342.11,9162.09,9286.56,5603440000,9286.56
+2009-07-31,9154.61,9264.65,9081.30,9171.61,5139070000,9171.61
+2009-07-30,9072.84,9298.13,9072.84,9154.46,6035180000,9154.46
+2009-07-29,9092.34,9141.23,8967.26,9070.72,5178770000,9070.72
+2009-07-28,9106.92,9154.76,8980.03,9096.72,5490350000,9096.72
+2009-07-27,9093.09,9154.23,8996.58,9108.51,4631290000,9108.51
+2009-07-24,9066.11,9144.48,8955.77,9093.24,4458300000,9093.24
+2009-07-23,8882.31,9143.05,8837.95,9069.29,5761650000,9069.29
+2009-07-22,8912.39,8993.48,8802.13,8881.26,4634100000,8881.26
+2009-07-21,8848.15,8991.07,8780.82,8915.94,5309300000,8915.94
+2009-07-20,8746.05,8884.43,8717.26,8848.15,4853150000,8848.15
+2009-07-17,8711.89,8797.97,8638.81,8743.94,5141380000,8743.94
+2009-07-16,8612.66,8750.28,8543.97,8711.82,4898640000,8711.82
+2009-07-15,8363.95,8643.04,8363.95,8616.21,5238830000,8616.21
+2009-07-14,8331.37,8407.48,8255.27,8359.49,4149030000,8359.49
+2009-07-13,8146.82,8348.08,8106.16,8331.68,4499440000,8331.68
+2009-07-10,8182.49,8216.65,8057.57,8146.52,3912080000,8146.52
+2009-07-09,8179.01,8273.48,8117.27,8183.17,4347170000,8183.17
+2009-07-08,8157.02,8259.05,8057.94,8178.41,5721780000,8178.41
+2009-07-07,8324.95,8355.48,8138.51,8163.60,4673300000,8163.60
+2009-07-06,8279.30,8364.02,8156.49,8324.87,4712580000,8324.87
+2009-07-02,8503.00,8503.00,8260.41,8280.74,3931000000,8280.74
+2009-07-01,8447.53,8610.32,8447.00,8504.06,3919400000,8504.06
+2009-06-30,8528.93,8584.17,8369.99,8447.00,4627570000,8447.00
+2009-06-29,8440.13,8569.59,8406.57,8529.38,4211760000,8529.38
+2009-06-26,8468.54,8509.73,8364.17,8438.39,6076660000,8438.39
+2009-06-25,8299.25,8512.60,8236.07,8472.40,4911240000,8472.40
+2009-06-24,8323.51,8456.83,8246.20,8299.86,4636720000,8299.86
+2009-06-23,8340.44,8413.22,8239.17,8322.91,5071020000,8322.91
+2009-06-22,8538.52,8538.52,8306.66,8339.01,4903940000,8339.01
+2009-06-19,8556.96,8665.26,8476.02,8539.73,5713390000,8539.73
+2009-06-18,8496.73,8634.28,8438.61,8555.60,4684010000,8555.60
+2009-06-17,8504.36,8602.99,8421.46,8497.18,5523650000,8497.18
+2009-06-16,8612.44,8688.69,8483.58,8504.67,4951200000,8504.67
+2009-06-15,8798.50,8798.50,8540.87,8612.13,4697880000,8612.13
+2009-06-12,8770.01,8850.95,8671.61,8799.26,4528120000,8799.26
+2009-06-11,8736.23,8911.11,8697.99,8770.92,5500840000,8770.92
+2009-06-10,8763.66,8871.36,8625.21,8739.02,5379420000,8739.02
+2009-06-09,8764.83,8854.80,8688.99,8763.06,4439950000,8763.06
+2009-06-08,8759.35,8832.13,8593.84,8764.49,4483430000,8764.49
+2009-06-05,8751.75,8900.48,8673.41,8763.13,5277910000,8763.13
+2009-06-04,8665.72,8802.59,8609.17,8750.24,5352890000,8750.24
+2009-06-03,8740.07,8750.83,8556.90,8675.24,5323770000,8675.24
+2009-06-02,8721.60,8832.16,8635.25,8740.87,5987340000,8740.87
+2009-06-01,8501.53,8797.58,8501.53,8721.44,6370440000,8721.44
+2009-05-29,8404.04,8541.27,8323.91,8500.33,6050420000,8500.33
+2009-05-28,8300.50,8463.70,8221.65,8403.80,5738980000,8403.80
+2009-05-27,8473.65,8534.66,8280.82,8300.02,5698800000,8300.02
+2009-05-26,8275.33,8523.59,8194.33,8473.49,5667050000,8473.49
+2009-05-22,8292.21,8415.75,8218.86,8277.32,5155320000,8277.32
+2009-05-21,8416.07,8416.07,8185.25,8292.13,6019840000,8292.13
+2009-05-20,8471.82,8645.85,8376.40,8422.04,8205060000,8422.04
+2009-05-19,8502.48,8594.16,8402.61,8474.85,6616270000,8474.85
+2009-05-18,8270.15,8534.66,8270.15,8504.08,5702150000,8504.08
+2009-05-15,8326.22,8422.28,8206.67,8268.64,5439720000,8268.64
+2009-05-14,8285.92,8427.93,8218.94,8331.32,6134870000,8331.32
+2009-05-13,8461.80,8461.80,8208.74,8284.89,7091820000,8284.89
+2009-05-12,8419.17,8574.88,8306.47,8469.11,6871750400,8469.11
+2009-05-11,8569.23,8569.23,8347.41,8418.77,6150600000,8418.77
+2009-05-08,8410.73,8657.96,8388.11,8574.65,8163280000,8574.65
+2009-05-07,8513.56,8651.51,8296.04,8409.85,9120100000,8409.85
+2009-05-06,8403.48,8608.26,8350.12,8512.28,8555040000,8512.28
+2009-05-05,8425.55,8520.80,8321.37,8410.65,6882860000,8410.65
+2009-05-04,8213.60,8488.87,8213.60,8426.74,7038840000,8426.74
+2009-05-01,8167.41,8278.28,8047.54,8212.41,5312170000,8212.41
+2009-04-30,8188.51,8383.81,8083.62,8168.12,6862540000,8168.12
+2009-04-29,8018.31,8278.12,8018.31,8185.73,6101620000,8185.73
+2009-04-28,8023.56,8136.74,7898.75,8016.95,6328000000,8016.95
+2009-04-27,8073.82,8152.27,7920.42,8025.00,5613460000,8025.00
+2009-04-24,7957.45,8182.30,7905.60,8076.29,7114440000,8076.29
+2009-04-23,7886.81,8015.36,7762.80,7957.06,6563100000,7957.06
+2009-04-22,7964.78,8111.02,7802.46,7886.57,7327860000,7886.57
+2009-04-21,7841.73,8027.54,7699.79,7969.56,7436489600,7969.56
+2009-04-20,8128.94,8128.94,7801.58,7841.73,6973960000,7841.73
+2009-04-17,8125.43,8251.20,8024.92,8131.33,7352009600,8131.33
+2009-04-16,8029.14,8201.81,7933.08,8125.43,6598670000,8125.43
+2009-04-15,7914.92,8069.92,7808.19,8029.62,6241100000,8029.62
+2009-04-14,8057.41,8076.05,7840.53,7920.18,7569840000,7920.18
+2009-04-13,8082.02,8146.86,7888.96,8057.81,6434890000,8057.81
+2009-04-09,7839.89,8150.44,7839.89,8083.38,7600710400,8083.38
+2009-04-08,7788.68,7925.36,7715.09,7837.11,5938460000,7837.11
+2009-04-07,7968.92,7968.92,7733.56,7789.56,5155580000,7789.56
+2009-04-06,8016.16,8037.42,7830.66,7975.85,6210000000,7975.85
+2009-04-03,7980.63,8090.71,7850.33,8017.59,5855640000,8017.59
+2009-04-02,7763.99,8129.33,7763.99,7978.08,7542809600,7978.08
+2009-04-01,7606.13,7804.77,7450.74,7761.60,6034140000,7761.60
+2009-03-31,7523.77,7744.24,7502.98,7608.92,6089100000,7608.92
+2009-03-30,7773.31,7773.31,7406.85,7522.02,5912660000,7522.02
+2009-03-27,7922.57,7922.57,7695.97,7776.18,5600210000,7776.18
+2009-03-26,7752.36,7969.00,7709.19,7924.56,6992960000,7924.56
+2009-03-25,7659.81,7897.48,7539.54,7749.81,7687180000,7749.81
+2009-03-24,7773.47,7837.11,7585.98,7660.21,6767980000,7660.21
+2009-03-23,7279.25,7789.24,7279.25,7775.86,7715769600,7775.86
+2009-03-20,7402.31,7524.81,7215.77,7278.38,7643720000,7278.38
+2009-03-19,7489.68,7624.45,7325.13,7400.80,9033870400,7400.80
+2009-03-18,7395.70,7592.03,7218.24,7486.58,9098449600,7486.58
+2009-03-17,7218.00,7407.41,7129.60,7395.70,6156800000,7395.70
+2009-03-16,7225.33,7428.75,7171.41,7216.97,7883540000,7216.97
+2009-03-13,7219.20,7241.98,7106.34,7223.98,6787089600,7223.98
+2009-03-12,6932.39,7198.25,6840.79,7170.06,7326630400,7170.06
+2009-03-11,6923.13,7078.22,6804.55,6930.40,7287809600,6930.40
+2009-03-10,6547.01,6951.50,6547.01,6926.49,8618329600,6926.49
+2009-03-09,6625.74,6758.44,6440.08,6547.05,7277320000,6547.05
+2009-03-06,6595.16,6776.44,6443.27,6626.94,7331830400,6626.94
+2009-03-05,6874.01,6874.01,6531.28,6594.44,7507249600,6594.44
+2009-03-04,6726.50,7012.19,6715.11,6875.84,7673620000,6875.84
+2009-03-03,6764.81,6922.59,6661.74,6726.02,7583230400,6726.02
+2009-03-02,7056.48,7056.48,6736.69,6763.29,7868289600,6763.29
+2009-02-27,7180.97,7244.61,6952.06,7062.93,8926480000,7062.93
+2009-02-26,7269.06,7451.13,7135.25,7182.08,7599969600,7182.08
+2009-02-25,7349.58,7442.13,7123.94,7270.89,7483640000,7270.89
+2009-02-24,7115.34,7396.34,7077.35,7350.94,7234489600,7350.94
+2009-02-23,7365.99,7477.10,7092.64,7114.78,6509300000,7114.78
+2009-02-20,7461.49,7500.44,7226.29,7365.67,8210590400,7365.67
+2009-02-19,7555.23,7679.01,7420.63,7465.95,5746940000,7465.95
+2009-02-18,7546.35,7661.56,7451.37,7555.63,5740710000,7555.63
+2009-02-17,7845.63,7845.63,7502.59,7552.60,5907820000,7552.60
+2009-02-13,7933.00,8005.96,7811.38,7850.41,5296650000,7850.41
+2009-02-12,7931.97,7956.02,7662.04,7932.76,6476460000,7932.76
+2009-02-11,7887.05,8042.36,7820.14,7939.53,5926460000,7939.53
+2009-02-10,8269.36,8293.17,7835.83,7888.88,6770169600,7888.88
+2009-02-09,8281.38,8376.56,8137.70,8270.87,5574370000,8270.87
+2009-02-06,8056.38,8360.07,8044.03,8280.59,6484100000,8280.59
+2009-02-05,7954.83,8138.65,7811.70,8063.07,6624030000,8063.07
+2009-02-04,8070.32,8197.04,7899.79,7956.66,6420450000,7956.66
+2009-02-03,7936.99,8157.13,7855.19,8078.36,5886310000,8078.36
+2009-02-02,8000.62,8053.43,7796.17,7936.83,5673270000,7936.83
+2009-01-30,8149.01,8243.95,7924.88,8000.86,5350580000,8000.86
+2009-01-29,8373.06,8373.06,8092.14,8149.01,5067060000,8149.01
+2009-01-28,8175.93,8446.33,8175.93,8375.45,6199180000,8375.45
+2009-01-27,8117.39,8264.10,8042.60,8174.73,5353260000,8174.73
+2009-01-26,8078.04,8278.12,7971.15,8116.03,6039940000,8116.03
+2009-01-23,8108.79,8187.88,7856.86,8077.56,5832160000,8077.56
+2009-01-22,8224.43,8239.33,7925.75,8122.80,5843830000,8122.80
+2009-01-21,7949.17,8286.40,7890.63,8228.10,6467830000,8228.10
+2009-01-20,8279.63,8309.02,7920.66,7949.09,6375230000,7949.09
+2009-01-16,8215.67,8424.59,8086.01,8281.22,6786040000,8281.22
+2009-01-15,8196.24,8326.06,7949.65,8212.49,7807350400,8212.49
+2009-01-14,8446.01,8446.01,8097.95,8200.14,5407880000,8200.14
+2009-01-13,8474.61,8584.68,8325.59,8448.56,5567460000,8448.56
+2009-01-12,8599.26,8653.97,8391.85,8473.97,4725050000,8473.97
+2009-01-09,8738.80,8800.45,8541.75,8599.18,4716500000,8599.18
+2009-01-08,8769.94,8807.14,8593.52,8742.46,4991550000,8742.46
+2009-01-07,8996.94,8996.94,8690.45,8769.70,4704940000,8769.70
+2009-01-06,8954.57,9175.19,8868.07,9015.10,5392620000,9015.10
+2009-01-05,9027.13,9093.47,8841.70,8952.89,5413910000,8952.89
+2009-01-02,8772.25,9080.57,8725.10,9034.69,4048270000,9034.69
+2008-12-31,8666.48,8862.65,8634.06,8776.39,4172940000,8776.39
+2008-12-30,8487.51,8700.89,8463.70,8668.39,3627800000,8668.39
+2008-12-29,8515.87,8575.60,8349.24,8483.93,3323430000,8483.93
+2008-12-26,8468.71,8581.58,8434.94,8515.55,1880050000,8515.55
+2008-12-24,8428.17,8498.26,8417.02,8468.48,1546550000,8468.48
+2008-12-23,8518.65,8647.60,8376.80,8419.49,4051970000,8419.49
+2008-12-22,8573.37,8672.06,8351.79,8519.69,4869850000,8519.69
+2008-12-19,8606.50,8823.78,8499.06,8579.11,6705310000,8579.11
+2008-12-18,8823.94,8946.36,8516.02,8604.99,5675000000,8604.99
+2008-12-17,8921.91,9001.96,8701.13,8824.34,5907380000,8824.34
+2008-12-16,8565.65,8985.63,8534.03,8924.14,6009780000,8924.14
+2008-12-15,8628.81,8738.40,8431.04,8564.53,4982390000,8564.53
+2008-12-12,8563.10,8705.43,8272.22,8629.68,5959590000,8629.68
+2008-12-11,8750.13,8861.86,8480.18,8565.09,5513840000,8565.09
+2008-12-10,8693.00,8942.46,8589.86,8761.42,5942130000,8761.42
+2008-12-09,8934.10,8978.14,8591.69,8691.33,5693110000,8691.33
+2008-12-08,8637.65,9151.61,8637.65,8934.18,6553600000,8934.18
+2008-12-05,8376.08,8722.47,8084.25,8635.42,6165370000,8635.42
+2008-12-04,8587.07,8705.98,8222.84,8376.24,5860390000,8376.24
+2008-12-03,8409.14,8654.77,8170.19,8591.69,6221880000,8591.69
+2008-12-02,8153.75,8490.62,8072.47,8419.09,6170100000,8419.09
+2008-12-01,8826.89,8826.89,8123.04,8149.09,6052010000,8149.09
+2008-11-28,8690.24,8840.33,8687.05,8829.04,2740860000,8829.04
+2008-11-26,8464.49,8760.46,8250.80,8726.61,5793260000,8726.61
+2008-11-25,8445.14,8682.09,8244.43,8479.47,6952700000,8479.47
+2008-11-24,8048.09,8624.27,8023.32,8443.39,7879440000,8443.39
+2008-11-21,7552.37,8121.45,7392.27,8046.42,9495900000,8046.42
+2008-11-20,7995.53,8224.35,7464.51,7552.29,9093740000,7552.29
+2008-11-19,8420.69,8534.34,7967.33,7997.28,6548600000,7997.28
+2008-11-18,8273.34,8540.08,8075.81,8424.75,6679470000,8424.75
+2008-11-17,8494.84,8596.31,8197.12,8273.58,4927490000,8273.58
+2008-11-14,8822.19,8980.93,8421.08,8497.31,5881030000,8497.31
+2008-11-13,8281.14,8898.41,7947.74,8835.25,7849120000,8835.25
+2008-11-12,8684.52,8684.52,8235.66,8282.66,5764180000,8282.66
+2008-11-11,8864.32,8892.20,8499.62,8693.96,4998340000,8693.96
+2008-11-10,8946.60,9212.94,8735.61,8870.54,4572000000,8870.54
+2008-11-07,8696.03,9032.54,8661.22,8943.81,4931640000,8943.81
+2008-11-06,9134.01,9216.37,8607.14,8695.79,6102230000,8695.79
+2008-11-05,9616.60,9628.15,9086.06,9139.27,5426640000,9139.27
+2008-11-04,9323.89,9711.46,9323.89,9625.28,5531290000,9625.28
+2008-11-03,9326.04,9488.92,9175.03,9319.83,4492280000,9319.83
+2008-10-31,9179.09,9498.48,9014.78,9325.01,6394350000,9325.01
+2008-10-30,9004.66,9380.36,8916.81,9180.69,6175830000,9180.69
+2008-10-29,9062.33,9405.05,8800.61,8990.96,7077800000,8990.96
+2008-10-28,8178.72,9112.51,8153.79,9065.12,7096950400,9065.12
+2008-10-27,8375.92,8639.64,8085.37,8175.77,5558050000,8175.77
+2008-10-24,8683.21,8683.21,8088.63,8378.95,6550050000,8378.95
+2008-10-23,8519.77,8864.48,8200.06,8691.25,7189900000,8691.25
+2008-10-22,9027.84,9027.84,8324.07,8519.21,6147980000,8519.21
+2008-10-21,9179.11,9293.07,9017.30,9045.21,5121830000,9045.21
+2008-10-20,8852.30,9305.89,8799.49,9265.43,5175640000,9265.43
+2008-10-17,8975.35,9304.38,8640.83,8852.22,6581780000,8852.22
+2008-10-16,8577.04,9073.64,8176.17,8979.26,7984500000,8979.26
+2008-10-15,9301.91,9301.91,8516.50,8577.91,6542330000,8577.91
+2008-10-14,9388.97,9924.28,9050.06,9310.99,8161990400,9310.99
+2008-10-13,8462.42,9501.91,8462.42,9387.61,7263369600,9387.61
+2008-10-10,8568.67,8989.13,7773.71,8451.19,11456230400,8451.19
+2008-10-09,9261.69,9522.77,8523.27,8579.19,8285670400,8579.19
+2008-10-08,9437.23,9778.04,9042.97,9258.10,8716329600,9258.10
+2008-10-07,9955.42,10205.04,9391.67,9447.11,7069209600,9447.11
+2008-10-06,10322.52,10322.52,9503.10,9955.50,7956020000,9955.50
+2008-10-03,10483.96,10844.69,10261.75,10325.38,6716120000,10325.38
+2008-10-02,10825.54,10843.10,10368.08,10482.85,6285640000,10482.85
+2008-10-01,10847.40,11022.06,10495.99,10831.07,5782130000,10831.07
+2008-09-30,10371.58,10922.03,10371.58,10850.66,6065000000,10850.66
+2008-09-29,11139.62,11139.62,10266.76,10365.45,7305060000,10365.45
+2008-09-26,11019.04,11218.48,10781.37,11143.13,5383610000,11143.13
+2008-09-25,10827.17,11206.05,10799.77,11022.06,5877640000,11022.06
+2008-09-24,10850.02,11041.02,10696.38,10825.17,4820360000,10825.17
+2008-09-23,11015.69,11214.65,10763.77,10854.17,5185730000,10854.17
+2008-09-22,11394.42,11450.81,10956.43,11015.69,5368130000,11015.69
+2008-09-19,11027.51,11415.48,11027.51,11388.44,9387169600,11388.44
+2008-09-18,10609.01,11149.07,10403.75,11019.69,10082689600,11019.69
+2008-09-17,11056.58,11068.87,10521.81,10609.66,9431870400,10609.66
+2008-09-16,10905.62,11193.12,10604.70,11059.02,9459830400,11059.02
+2008-09-15,11416.37,11416.37,10849.85,10917.51,8279510400,10917.51
+2008-09-12,11429.32,11532.72,11191.08,11421.99,6273260000,11421.99
+2008-09-11,11264.44,11461.15,11018.72,11433.71,6869249600,11433.71
+2008-09-10,11233.91,11453.50,11135.64,11268.92,6543440000,11268.92
+2008-09-09,11514.73,11623.50,11209.81,11230.73,7380630400,11230.73
+2008-09-08,11224.87,11656.64,11224.87,11510.74,7351340000,11510.74
+2008-09-05,11185.63,11301.73,10998.77,11220.96,5017080000,11220.96
+2008-09-04,11532.48,11532.48,11130.26,11188.23,5212500000,11188.23
+2008-09-03,11506.01,11629.69,11328.84,11532.88,5056980000,11532.88
+2008-09-02,11545.63,11831.29,11444.79,11516.92,4783560000,11516.92
+2008-08-29,11713.23,11730.49,11508.78,11543.55,3288120000,11543.55
+2008-08-28,11499.87,11756.46,11493.72,11715.18,3854280000,11715.18
+2008-08-27,11412.46,11575.14,11349.69,11502.51,3499610000,11502.51
+2008-08-26,11383.56,11483.62,11284.47,11412.87,3587570000,11412.87
+2008-08-25,11626.19,11626.19,11336.82,11386.25,3420600000,11386.25
+2008-08-22,11426.79,11684.00,11426.79,11628.06,3741070000,11628.06
+2008-08-21,11415.23,11501.29,11263.63,11430.21,4032590000,11430.21
+2008-08-20,11345.94,11511.06,11240.18,11417.43,4555030000,11417.43
+2008-08-19,11478.09,11501.45,11260.53,11348.55,4159760000,11348.55
+2008-08-18,11659.65,11744.49,11410.18,11479.39,3829290000,11479.39
+2008-08-15,11611.21,11776.41,11540.05,11659.90,4041820000,11659.90
+2008-08-14,11532.07,11744.33,11399.84,11615.93,4064000000,11615.93
+2008-08-13,11632.81,11689.05,11377.37,11532.96,4787600000,11532.96
+2008-08-12,11781.70,11830.39,11541.43,11642.47,4711290000,11642.47
+2008-08-11,11729.67,11933.55,11580.19,11782.35,5067310000,11782.35
+2008-08-08,11432.09,11808.49,11344.23,11734.32,4966810000,11734.32
+2008-08-07,11655.42,11680.50,11355.63,11431.43,5319380000,11431.43
+2008-08-06,11603.64,11745.71,11454.64,11656.07,4873420000,11656.07
+2008-08-05,11286.02,11652.24,11286.02,11615.77,1219310000,11615.77
+2008-08-04,11326.32,11449.67,11144.59,11284.15,4562280000,11284.15
+2008-08-01,11379.89,11512.61,11205.41,11326.32,4684870000,11326.32
+2008-07-31,11577.99,11631.16,11317.69,11378.02,5346050000,11378.02
+2008-07-30,11397.56,11681.47,11328.68,11583.69,5631330000,11583.69
+2008-07-29,11133.44,11444.05,11086.13,11397.56,5414240000,11397.56
+2008-07-28,11369.47,11439.25,11094.76,11131.08,4282960000,11131.08
+2008-07-25,11341.14,11540.78,11252.47,11370.69,4672560000,11370.69
+2008-07-24,11630.34,11714.21,11288.79,11349.28,6127980000,11349.28
+2008-07-23,11603.39,11820.21,11410.02,11632.38,6705830000,11632.38
+2008-07-22,11457.90,11692.79,11273.32,11602.50,6180230000,11602.50
+2008-07-21,11495.02,11663.40,11339.02,11467.34,4630640000,11467.34
+2008-07-18,11436.56,11599.57,11290.50,11496.57,5653280000,11496.57
+2008-07-17,11238.39,11538.50,11118.46,11446.66,7365209600,11446.66
+2008-07-16,10961.89,11308.41,10831.61,11239.28,6738630400,11239.28
+2008-07-15,11050.80,11201.67,10731.96,10962.54,7363640000,10962.54
+2008-07-14,11103.64,11299.70,10972.63,11055.19,5434860000,11055.19
+2008-07-11,11226.17,11292.04,10908.64,11100.54,6742200000,11100.54
+2008-07-10,11148.01,11351.24,11006.01,11229.02,5840430000,11229.02
+2008-07-09,11381.93,11505.12,11115.61,11147.44,5181000000,11147.44
+2008-07-08,11225.03,11459.52,11101.19,11384.21,6034110000,11384.21
+2008-07-07,11289.19,11477.52,11094.44,11231.96,5265420000,11231.96
+2008-07-03,11297.33,11336.49,11158.02,11288.53,3247590000,11288.53
+2008-07-02,11382.34,11510.41,11180.58,11215.51,5276090000,11215.51
+2008-07-01,11344.64,11465.79,11106.65,11382.26,5846290000,11382.26
+2008-06-30,11345.70,11504.55,11226.34,11350.01,5032330000,11350.01
+2008-06-27,11452.85,11556.33,11248.48,11346.51,6208260000,11346.51
+2008-06-26,11808.57,11808.57,11431.92,11453.42,5231280000,11453.42
+2008-06-25,11805.31,12008.70,11683.75,11811.83,4825640000,11811.83
+2008-06-24,11842.36,11962.37,11668.53,11807.43,4705050000,11807.43
+2008-06-23,11843.83,11986.96,11731.06,11842.36,4186370000,11842.36
+2008-06-20,12062.19,12078.23,11785.04,11842.69,5324900000,11842.69
+2008-06-19,12022.54,12188.31,11881.03,12063.09,4811670000,12063.09
+2008-06-18,12158.68,12212.33,11947.07,12029.06,4573570000,12029.06
+2008-06-17,12269.65,12378.67,12114.14,12160.30,3801960000,12160.30
+2008-06-16,12306.86,12381.44,12139.79,12269.08,3706940000,12269.08
+2008-06-13,12144.59,12376.72,12096.23,12307.35,4080420000,12307.35
+2008-06-12,12089.63,12337.72,12041.43,12141.58,4734240000,12141.58
+2008-06-11,12286.34,12317.20,12029.46,12083.77,4779980000,12083.77
+2008-06-10,12277.71,12425.98,12116.58,12289.76,4635070000,12289.76
+2008-06-09,12210.13,12406.36,12102.50,12280.32,4404570000,12280.32
+2008-06-06,12602.74,12602.74,12180.50,12209.81,4771660000,12209.81
+2008-06-05,12388.81,12652.81,12358.07,12604.45,4350790000,12604.45
+2008-06-04,12391.86,12540.37,12283.74,12390.48,4338640000,12390.48
+2008-06-03,12503.20,12620.98,12317.61,12402.85,4396380000,12402.85
+2008-06-02,12637.67,12645.40,12385.76,12503.82,3714320000,12503.82
+2008-05-30,12647.36,12750.84,12555.60,12638.32,3845630000,12638.32
+2008-05-29,12593.87,12760.21,12493.47,12646.22,3894440000,12646.22
+2008-05-28,12542.90,12693.77,12437.38,12594.03,3927240000,12594.03
+2008-05-27,12479.63,12626.84,12397.56,12548.35,3588860000,12548.35
+2008-05-23,12620.90,12637.43,12420.20,12479.63,3516380000,12479.63
+2008-05-22,12597.69,12743.68,12515.78,12625.62,3955960000,12625.62
+2008-05-21,12824.94,12926.71,12550.39,12601.19,4517990000,12601.19
+2008-05-20,13026.04,13026.04,12742.29,12828.68,3854320000,12828.68
+2008-05-19,12985.41,13170.97,12899.19,13028.16,3683970000,13028.16
+2008-05-16,12992.74,13069.52,12860.60,12986.80,3842590000,12986.80
+2008-05-15,12891.29,13028.16,12798.39,12992.66,3836480000,12992.66
+2008-05-14,12825.12,13037.44,12806.21,12898.38,3979370000,12898.38
+2008-05-13,12872.08,12957.65,12716.16,12832.18,4018590000,12832.18
+2008-05-12,12768.38,12903.33,12746.36,12876.05,3370630000,12876.05
+2008-05-09,12860.68,12871.75,12648.09,12745.88,3518620000,12745.88
+2008-05-08,12814.84,12965.95,12727.56,12866.78,3827550000,12866.78
+2008-05-07,13010.82,13097.77,12756.14,12814.35,4075860000,12814.35
+2008-05-06,12968.89,13071.07,12817.53,13020.83,3924100000,13020.83
+2008-05-05,13056.57,13105.75,12896.50,12969.54,3410090000,12969.54
+2008-05-02,13012.53,13191.49,12931.35,13058.20,3953030000,13058.20
+2008-05-01,12818.34,13079.94,12721.94,13010.00,4448780000,13010.00
+2008-04-30,12831.45,13052.91,12746.45,12820.13,4508890000,12820.13
+2008-04-29,12870.37,12970.27,12737.82,12831.94,3815320000,12831.94
+2008-04-28,12890.76,13015.62,12791.55,12871.75,3607000000,12871.75
+2008-04-25,12848.38,12987.29,12703.70,12891.86,3891150000,12891.86
+2008-04-24,12764.68,12979.88,12651.51,12848.95,4461660000,12848.95
+2008-04-23,12721.45,12883.80,12627.00,12763.22,4103610000,12763.22
+2008-04-22,12825.02,12870.86,12604.53,12720.23,3821900000,12720.23
+2008-04-21,12850.91,12902.69,12666.08,12825.02,3420570000,12825.02
+2008-04-18,12626.76,12965.47,12626.76,12849.36,4222380000,12849.36
+2008-04-17,12617.40,12725.93,12472.71,12620.49,3713880000,12620.49
+2008-04-16,12371.51,12670.56,12371.51,12619.27,4260370000,12619.27
+2008-04-15,12303.60,12459.36,12223.97,12362.47,3581230000,12362.47
+2008-04-14,12324.77,12430.86,12208.42,12302.06,3565020000,12302.06
+2008-04-11,12579.78,12579.78,12280.89,12325.42,3723790000,12325.42
+2008-04-10,12526.78,12705.90,12447.96,12581.98,3686150000,12581.98
+2008-04-09,12574.65,12686.93,12416.53,12527.26,3556670000,12527.26
+2008-04-08,12602.66,12664.38,12440.55,12576.44,3602500000,12576.44
+2008-04-07,12612.59,12786.83,12550.22,12612.43,3747780000,12612.43
+2008-04-04,12626.35,12738.30,12489.40,12609.42,3703100000,12609.42
+2008-04-03,12604.69,12734.97,12455.04,12626.03,3920100000,12626.03
+2008-04-02,12651.67,12790.28,12488.22,12608.92,4320440000,12608.92
+2008-04-01,12266.64,12693.93,12266.64,12654.36,4745120000,12654.36
+2008-03-31,12215.92,12384.84,12095.18,12262.89,4188990000,12262.89
+2008-03-28,12303.92,12441.67,12164.22,12216.40,3686980000,12216.40
+2008-03-27,12421.88,12528.13,12264.76,12302.46,4037930000,12302.46
+2008-03-26,12531.79,12531.79,12309.62,12422.86,4055670000,12422.86
+2008-03-25,12547.34,12639.82,12397.62,12532.60,4145120000,12532.60
+2008-03-24,12361.97,12687.61,12346.17,12548.64,4499000000,12548.64
+2008-03-20,12102.43,12434.34,12024.68,12361.32,6145220000,12361.32
+2008-03-19,12391.52,12525.19,12077.27,12099.66,5358550000,12099.66
+2008-03-18,11975.92,12411.63,11975.92,12392.66,5335630000,12392.66
+2008-03-17,11946.45,12119.69,11650.44,11972.25,5683010000,11972.25
+2008-03-14,12146.39,12249.86,11781.43,11951.09,5153780000,11951.09
+2008-03-13,12096.49,12242.29,11832.88,12145.74,5073360000,12145.74
+2008-03-12,12148.61,12360.58,12037.79,12110.24,4414280000,12110.24
+2008-03-11,11741.33,12205.98,11741.33,12156.81,5109080000,12156.81
+2008-03-10,11893.04,11993.75,11691.47,11740.15,4261240000,11740.15
+2008-03-07,12039.09,12131.33,11778.66,11893.69,4565410000,11893.69
+2008-03-06,12254.59,12267.86,12010.03,12040.39,4323460000,12040.39
+2008-03-05,12204.93,12392.74,12105.36,12254.99,4277710000,12254.99
+2008-03-04,12259.14,12291.22,11991.06,12213.80,4757180000,12213.80
+2008-03-03,12264.36,12344.71,12101.29,12258.90,4117570000,12258.90
+2008-02-29,12579.58,12579.58,12210.30,12266.39,4426730000,12266.39
+2008-02-28,12689.28,12713.99,12463.32,12582.18,3938580000,12582.18
+2008-02-27,12683.54,12815.59,12527.64,12694.28,3904700000,12694.28
+2008-02-26,12569.48,12771.14,12449.08,12684.92,4096060000,12684.92
+2008-02-25,12380.77,12612.47,12292.03,12570.22,3866350000,12570.22
+2008-02-22,12281.09,12429.05,12116.92,12381.02,3572660000,12381.02
+2008-02-21,12426.85,12545.79,12225.36,12284.30,3696660000,12284.30
+2008-02-20,12333.31,12489.29,12159.42,12427.26,3870520000,12427.26
+2008-02-19,12349.59,12571.11,12276.81,12337.22,3613550000,12337.22
+2008-02-15,12376.66,12441.20,12216.68,12348.21,3583300000,12348.21
+2008-02-14,12551.51,12611.26,12332.03,12376.98,3644760000,12376.98
+2008-02-13,12368.12,12627.76,12354.22,12552.24,3856420000,12552.24
+2008-02-12,12241.56,12524.12,12207.90,12373.41,4044640000,12373.41
+2008-02-11,12181.89,12332.76,12006.79,12240.01,3593140000,12240.01
+2008-02-08,12248.47,12330.97,12058.01,12182.13,3768490000,12182.13
+2008-02-07,12196.20,12366.99,12045.00,12247.00,4589160000,12247.00
+2008-02-06,12257.25,12436.33,12142.14,12200.10,4008120000,12200.10
+2008-02-05,12631.85,12631.85,12234.97,12265.13,4315740000,12265.13
+2008-02-04,12743.11,12810.34,12557.61,12635.16,3495780000,12635.16
+2008-02-01,12638.17,12841.88,12510.05,12743.19,4650770000,12743.19
+2008-01-31,12438.28,12734.74,12197.09,12650.36,4970290000,12650.36
+2008-01-30,12480.14,12715.96,12311.55,12442.83,4742760000,12442.83
+2008-01-29,12385.19,12604.92,12262.29,12480.30,4232960000,12480.30
+2008-01-28,12205.71,12423.81,12061.42,12383.89,4100930000,12383.89
+2008-01-25,12391.70,12590.69,12103.61,12207.17,4882250000,12207.17
+2008-01-24,12272.69,12522.82,12114.83,12378.61,5735300000,12378.61
+2008-01-23,11969.08,12339.10,11530.12,12270.17,3241680000,12270.17
+2008-01-22,12092.72,12167.42,11508.74,11971.19,6544690000,11971.19
+2008-01-18,12159.94,12441.85,11953.71,12099.30,6004840000,12099.30
+2008-01-17,12467.05,12597.85,12089.38,12159.21,5303130000,12159.21
+2008-01-16,12476.81,12699.05,12294.48,12466.16,5440620000,12466.16
+2008-01-15,12777.50,12777.50,12425.92,12501.11,4601640000,12501.11
+2008-01-14,12613.78,12866.10,12596.95,12778.15,3682090000,12778.15
+2008-01-11,12850.74,12863.34,12495.91,12606.30,4495840000,12606.30
+2008-01-10,12733.11,12931.29,12632.15,12853.09,5170490000,12853.09
+2008-01-09,12590.21,12814.97,12431.53,12735.31,5351030000,12735.31
+2008-01-08,12820.90,12998.11,12511.03,12589.07,4705390000,12589.07
+2008-01-07,12801.15,12984.95,12640.44,12827.49,4221260000,12827.49
+2008-01-04,13046.56,13049.65,12740.51,12800.18,4166000000,12800.18
+2008-01-03,13044.12,13197.43,12968.44,13056.72,3429500000,13056.72
+2008-01-02,13261.82,13338.23,12969.42,13043.96,3452650000,13043.96
+2007-12-31,13364.16,13423.91,13197.35,13264.82,2440880000,13264.82
+2007-12-28,13361.23,13494.30,13272.14,13365.87,2420510000,13365.87
+2007-12-27,13549.17,13551.53,13325.71,13359.61,2365770000,13359.61
+2007-12-26,13547.95,13614.53,13440.16,13551.69,2010500000,13551.69
+2007-12-24,13487.12,13562.72,13451.35,13550.04,2200000,13550.04
+2007-12-21,13241.66,13518.20,13241.66,13450.65,4508590000,13450.65
+2007-12-20,13206.46,13354.00,13112.98,13245.64,3526890000,13245.64
+2007-12-19,13231.98,13368.79,13097.77,13207.27,3401300000,13207.27
+2007-12-18,13168.66,13346.84,13059.32,13232.47,3723690000,13232.47
+2007-12-17,13339.20,13378.38,13111.92,13167.20,3569030000,13167.20
+2007-12-14,13515.11,13557.54,13284.66,13339.85,3401050000,13339.85
+2007-12-13,13473.98,13586.73,13281.00,13517.96,3635170000,13517.96
+2007-12-12,13434.80,13778.98,13299.61,13473.90,4482120000,13473.90
+2007-12-11,13726.87,13850.92,13374.89,13432.77,4080180000,13432.77
+2007-12-10,13623.55,13807.02,13582.50,13727.03,2911760000,13727.03
+2007-12-07,13618.27,13744.02,13514.22,13625.58,3177710000,13625.58
+2007-12-06,13445.85,13652.49,13362.37,13619.89,3568570000,13619.89
+2007-12-05,13244.01,13513.00,13244.01,13444.96,3663660000,13444.96
+2007-12-04,13311.24,13395.21,13139.56,13248.73,3343620000,13248.73
+2007-12-03,13368.22,13490.24,13207.60,13314.57,3323250000,13314.57
+2007-11-30,13314.25,13570.31,13225.32,13371.72,4422200000,13371.72
+2007-11-29,13287.91,13399.03,13150.21,13311.73,3524730000,13311.73
+2007-11-28,12958.04,13353.51,12958.04,13289.45,4508020000,13289.45
+2007-11-27,12744.78,13040.38,12711.98,12958.44,4320720000,12958.44
+2007-11-26,12979.99,13104.44,12707.26,12743.44,3706470000,12743.44
+2007-11-23,12889.45,12981.56,12796.29,12980.88,1612720000,12980.88
+2007-11-21,13006.65,13055.59,12725.39,12799.04,4076230000,12799.04
+2007-11-20,12955.92,13179.23,12800.74,13010.14,4875150000,13010.14
+2007-11-19,13176.30,13195.48,12871.14,12958.44,4119650000,12958.44
+2007-11-16,13109.48,13293.44,12987.22,13176.79,4168870000,13176.79
+2007-11-15,13230.68,13333.59,13007.95,13110.05,3941010000,13110.05
+2007-11-14,13305.47,13465.20,13159.88,13231.01,4031470000,13231.01
+2007-11-13,12975.11,13357.57,12975.11,13307.09,4141310000,13307.09
+2007-11-12,13039.16,13238.73,12910.40,12987.55,4192520000,12987.55
+2007-11-09,13261.17,13321.81,12920.65,13042.74,4587050000,13042.74
+2007-11-08,13299.70,13463.66,13001.93,13266.29,5439720000,13266.29
+2007-11-07,13646.72,13646.72,13269.46,13300.02,4353160000,13300.02
+2007-11-06,13542.34,13716.55,13460.73,13660.94,3879160000,13660.94
+2007-11-05,13592.58,13666.15,13393.67,13543.40,3819330000,13543.40
+2007-11-02,13569.90,13708.58,13381.64,13595.10,4285990000,13595.10
+2007-11-01,13924.16,13924.16,13522.75,13567.87,4241470000,13567.87
+2007-10-31,13792.06,13990.65,13711.59,13930.01,3953070000,13930.01
+2007-10-30,13869.04,13930.91,13719.80,13792.47,3212520000,13792.47
+2007-10-29,13807.35,13966.18,13748.33,13870.26,3124480000,13870.26
+2007-10-26,13675.66,13885.95,13622.01,13806.70,3612120000,13806.70
+2007-10-25,13677.85,13819.78,13471.87,13671.92,4183960000,13671.92
+2007-10-24,13675.58,13751.50,13423.74,13675.25,4003300000,13675.25
+2007-10-23,13568.93,13754.91,13494.95,13676.23,3309120000,13676.23
+2007-10-22,13521.62,13636.80,13337.90,13566.97,3471830000,13566.97
+2007-10-19,13888.47,13888.47,13478.94,13522.02,4160970000,13522.02
+2007-10-18,13887.90,13984.39,13746.22,13888.96,3203210000,13888.96
+2007-10-17,13920.66,14075.84,13738.66,13892.54,3638070000,13892.54
+2007-10-16,13986.34,14061.37,13810.68,13912.94,3234560000,13912.94
+2007-10-15,14092.43,14157.38,13877.82,13984.80,3139290000,13984.80
+2007-10-12,14016.34,14168.51,13949.85,14093.08,2788690000,14093.08
+2007-10-11,14079.10,14279.96,13917.82,14015.12,3911260000,14015.12
+2007-10-10,14165.02,14225.66,13963.26,14078.69,3044760000,14078.69
+2007-10-09,14043.73,14198.83,13980.90,14164.53,2932040000,14164.53
+2007-10-08,14065.36,14134.05,13747.41,14043.73,2040650000,14043.73
+2007-10-05,13969.07,14169.49,13965.05,14066.01,2919030000,14066.01
+2007-10-04,13967.89,14074.54,13894.98,13974.31,2690430000,13974.31
+2007-10-03,14038.86,14090.48,13883.43,13968.05,3065320000,13968.05
+2007-10-02,14087.14,14166.16,13951.72,14047.31,3101910000,14047.31
+2007-10-01,13895.71,14147.30,13869.86,14087.55,3281990000,14087.55
+2007-09-28,13912.94,13994.64,13802.96,13895.63,2925350000,13895.63
+2007-09-27,13879.53,13991.63,13811.17,13912.94,2872180000,13912.94
+2007-09-26,13779.30,13962.61,13741.26,13878.15,3237390000,13878.15
+2007-09-25,13757.84,13847.10,13629.16,13778.65,3187770000,13778.65
+2007-09-24,13821.57,13930.74,13702.89,13759.06,3131310000,13759.06
+2007-09-21,13768.33,13948.95,13740.61,13820.19,3679460000,13820.19
+2007-09-20,13813.52,13893.02,13680.21,13766.70,2957700000,13766.70
+2007-09-19,13740.61,13936.68,13689.80,13815.56,3846750000,13815.56
+2007-09-18,13403.18,13772.15,13379.68,13739.39,3708940000,13739.39
+2007-09-17,13441.95,13514.71,13306.69,13403.42,2598390000,13403.42
+2007-09-14,13421.39,13507.55,13273.68,13442.52,2641740000,13442.52
+2007-09-13,13292.38,13519.91,13292.38,13424.88,2877080000,13424.88
+2007-09-12,13298.31,13408.62,13195.40,13291.65,2885720000,13291.65
+2007-09-11,13129.40,13369.77,13124.68,13308.39,3015330000,13308.39
+2007-09-10,13116.39,13280.67,12992.02,13127.85,2835720000,13127.85
+2007-09-07,13360.74,13360.74,13059.16,13113.38,3191080000,13113.38
+2007-09-06,13306.44,13464.79,13217.11,13363.35,2459590000,13363.35
+2007-09-05,13442.85,13442.85,13203.86,13305.47,2991600000,13305.47
+2007-09-04,13358.39,13521.86,13248.57,13448.86,2766600000,13448.86
+2007-08-31,13240.84,13472.35,13240.84,13357.74,2731610000,13357.74
+2007-08-30,13287.91,13355.46,13126.39,13238.73,2582960000,13238.73
+2007-08-29,13043.07,13336.93,13020.63,13289.29,2824070000,13289.29
+2007-08-28,13318.43,13319.61,13024.29,13041.85,3078090000,13041.85
+2007-08-27,13377.16,13438.46,13248.32,13322.13,2406180000,13322.13
+2007-08-24,13231.78,13402.20,13174.27,13378.87,2541400000,13378.87
+2007-08-23,13237.27,13358.22,13127.69,13235.88,3084390000,13235.88
+2007-08-22,13088.26,13304.33,13075.34,13236.13,3309120000,13236.13
+2007-08-21,13120.05,13228.57,12975.68,13090.86,3012150000,13090.86
+2007-08-20,13078.51,13245.80,12938.77,13121.35,3321340000,13121.35
+2007-08-17,12848.05,13289.70,12847.24,13079.08,3570040000,13079.08
+2007-08-16,12859.52,12996.73,12455.92,12845.78,6509300000,12845.78
+2007-08-15,13021.93,13184.51,12800.83,12861.47,4290930000,12861.47
+2007-08-14,13235.72,13309.04,12974.30,13028.92,3814630000,13028.92
+2007-08-13,13238.24,13440.08,13163.54,13236.53,3696280000,13236.53
+2007-08-10,13270.59,13386.43,12958.04,13239.54,5345780000,13239.54
+2007-08-09,13652.33,13675.66,13196.05,13270.68,5889600000,13270.68
+2007-08-08,13497.23,13769.63,13386.92,13657.86,5499560000,13657.86
+2007-08-07,13467.72,13635.09,13282.38,13504.30,4909390000,13504.30
+2007-08-06,13183.13,13501.86,13077.05,13468.78,5067200000,13468.78
+2007-08-03,13462.25,13539.50,13156.79,13181.91,4272110000,13181.91
+2007-08-02,13357.82,13547.47,13272.79,13463.33,4368850000,13463.33
+2007-08-01,13211.09,13431.06,13041.77,13362.37,5256780000,13362.37
+2007-07-31,13360.66,13579.41,13182.15,13211.99,4524520000,13211.99
+2007-07-30,13266.21,13445.12,13143.87,13358.31,4128780000,13358.31
+2007-07-27,13472.68,13589.17,13228.57,13265.47,4784650000,13265.47
+2007-07-26,13783.12,13793.61,13307.74,13473.57,4472550000,13473.57
+2007-07-25,13718.25,13919.77,13607.70,13785.07,4283200000,13785.07
+2007-07-24,13940.90,13967.65,13661.51,13716.95,4115830000,13716.95
+2007-07-23,13851.73,14039.59,13819.54,13943.42,3102700000,13943.42
+2007-07-20,14000.73,14039.67,13745.65,13851.08,3745780000,13851.08
+2007-07-19,13918.79,14121.04,13860.18,14000.41,3251450000,14000.41
+2007-07-18,13955.05,14020.89,13768.73,13918.22,3609220000,13918.22
+2007-07-17,13951.96,14095.60,13880.67,13971.55,3007140000,13971.55
+2007-07-16,13907.09,14053.57,13834.33,13950.98,2704110000,13950.98
+2007-07-13,13859.86,13982.93,13784.83,13907.25,2801120000,13907.25
+2007-07-12,13579.33,13889.45,13579.33,13861.73,3489600000,13861.73
+2007-07-11,13500.40,13638.75,13435.45,13577.87,3082920000,13577.87
+2007-07-10,13648.59,13685.90,13463.57,13501.70,3244280000,13501.70
+2007-07-09,13612.66,13739.06,13563.89,13649.97,2715330000,13649.97
+2007-07-06,13559.01,13670.46,13501.54,13611.68,2441520000,13611.68
+2007-07-05,13576.24,13637.78,13459.84,13565.84,2622950000,13565.84
+2007-07-03,13556.87,13592.07,13531.83,13577.30,1560790000,13577.30
+2007-07-02,13409.60,13586.97,13406.59,13535.43,2648990000,13535.43
+2007-06-29,13422.61,13556.16,13291.32,13408.62,3165410000,13408.62
+2007-06-28,13427.48,13537.47,13342.05,13422.28,3006710000,13422.28
+2007-06-27,13336.93,13455.36,13205.08,13427.73,3398150000,13427.73
+2007-06-26,13352.37,13491.70,13272.79,13337.66,3398530000,13337.66
+2007-06-25,13360.09,13519.34,13273.68,13352.05,3287250000,13352.05
+2007-06-22,13545.03,13564.13,13323.51,13360.26,4284320000,13360.26
+2007-06-21,13486.66,13596.56,13368.79,13545.84,3161110000,13545.84
+2007-06-20,13636.56,13735.08,13469.43,13489.42,3286900000,13489.42
+2007-06-19,13611.68,13705.41,13527.14,13635.42,2873590000,13635.42
+2007-06-18,13639.00,13720.29,13560.15,13612.98,2480240000,13612.98
+2007-06-15,13556.65,13741.18,13556.65,13639.48,3406030000,13639.48
+2007-06-14,13482.43,13622.66,13444.07,13553.73,2813630000,13553.73
+2007-06-13,13287.62,13502.76,13287.62,13482.35,3077930000,13482.35
+2007-06-12,13424.39,13474.12,13264.05,13295.01,3056200000,13295.01
+2007-06-11,13423.74,13519.88,13335.16,13424.96,2525280000,13424.96
+2007-06-08,13267.14,13445.19,13207.73,13424.39,2993460000,13424.39
+2007-06-07,13463.48,13517.85,13236.34,13266.73,3538470000,13266.73
+2007-06-06,13590.66,13606.75,13403.10,13465.67,2964190000,13465.67
+2007-06-05,13673.19,13689.40,13523.70,13595.46,2939450000,13595.46
+2007-06-04,13667.21,13723.37,13575.14,13676.32,2738930000,13676.32
+2007-06-01,13628.69,13756.69,13562.54,13668.11,2927020000,13668.11
+2007-05-31,13633.00,13718.82,13564.49,13627.64,3335530000,13627.64
+2007-05-30,13517.89,13650.64,13403.26,13633.08,2980210000,13633.08
+2007-05-29,13507.28,13603.26,13428.86,13521.34,2571790000,13521.34
+2007-05-25,13441.94,13571.48,13410.00,13507.28,2316250000,13507.28
+2007-05-24,13522.60,13645.52,13391.56,13441.13,3365530000,13441.13
+2007-05-23,13540.84,13648.69,13476.72,13525.65,3084260000,13525.65
+2007-05-22,13544.99,13632.03,13466.57,13539.95,2860500000,13539.95
+2007-05-21,13556.53,13636.98,13473.31,13542.88,3465360000,13542.88
+2007-05-18,13476.40,13611.95,13454.46,13556.53,2959050000,13556.53
+2007-05-17,13486.96,13558.24,13384.89,13476.72,2868640000,13476.72
+2007-05-16,13374.13,13526.54,13325.49,13487.53,2915350000,13487.53
+2007-05-15,13346.05,13518.33,13302.65,13383.84,3071020000,13383.84
+2007-05-14,13325.81,13432.84,13265.02,13346.78,2776130000,13346.78
+2007-05-11,13212.20,13373.35,13192.62,13326.22,2720780000,13326.22
+2007-05-10,13359.05,13376.20,13161.08,13215.13,3031240000,13215.13
+2007-05-09,13300.62,13410.17,13229.92,13362.87,2935550000,13362.87
+2007-05-08,13309.40,13359.05,13192.45,13309.07,2795720000,13309.07
+2007-05-07,13264.13,13385.06,13218.87,13312.97,2545090000,13312.97
+2007-05-04,13243.08,13340.60,13176.61,13264.62,2761930000,13264.62
+2007-05-03,13206.65,13306.55,13131.42,13241.38,3007970000,13241.38
+2007-05-02,13133.94,13291.60,13105.34,13211.88,3189800000,13211.88
+2007-05-01,13062.75,13188.96,12993.02,13136.14,3400350000,13136.14
+2007-04-30,13120.21,13226.99,13003.91,13062.91,3093420000,13062.91
+2007-04-27,13104.04,13195.05,13002.37,13120.94,2732810000,13120.94
+2007-04-26,13088.84,13197.49,13016.43,13105.50,3211800000,13105.50
+2007-04-25,12951.42,13142.31,12929.80,13089.89,3252590000,13089.89
+2007-04-24,12919.64,13033.66,12845.12,12953.94,3119750000,12953.94
+2007-04-23,12961.49,13029.59,12867.96,12919.40,2575020000,12919.40
+2007-04-20,12811.15,13035.77,12811.15,12961.98,3329940000,12961.98
+2007-04-19,12799.77,12889.17,12677.47,12808.63,2913610000,12808.63
+2007-04-18,12771.08,12871.21,12691.20,12803.84,2971330000,12803.84
+2007-04-17,12719.56,12837.40,12669.50,12773.04,2920570000,12773.04
+2007-04-16,12611.64,12770.60,12596.36,12720.46,2870140000,12720.46
+2007-04-13,12551.91,12654.47,12504.04,12612.13,2690020000,12612.13
+2007-04-12,12483.64,12580.92,12407.50,12552.96,2770570000,12552.96
+2007-04-11,12573.12,12618.63,12432.53,12484.62,2950190000,12484.62
+2007-04-10,12568.49,12641.87,12496.48,12573.85,2510110000,12573.85
+2007-04-09,12562.64,12641.22,12505.83,12569.14,2349410000,12569.14
+2007-04-05,12505.73,12573.02,12501.25,12560.83,2357230000,12560.83
+2007-04-04,12511.36,12591.81,12444.55,12530.05,2616320000,12530.05
+2007-04-03,12431.28,12534.49,12378.94,12510.93,2921760000,12510.93
+2007-04-02,12354.52,12450.81,12284.54,12382.30,2875880000,12382.30
+2007-03-30,12348.91,12442.40,12237.87,12354.35,2903960000,12354.35
+2007-03-29,12301.48,12424.77,12251.89,12348.75,2854710000,12348.75
+2007-03-28,12396.49,12415.56,12234.50,12300.36,3000440000,12300.36
+2007-03-27,12468.59,12484.54,12336.89,12397.29,2673040000,12397.29
+2007-03-26,12480.37,12526.27,12339.53,12469.07,2754660000,12469.07
+2007-03-23,12460.50,12550.07,12396.89,12481.01,2619020000,12481.01
+2007-03-22,12446.72,12524.03,12364.21,12461.14,3129970000,12461.14
+2007-03-21,12288.98,12489.02,12220.49,12447.52,3184770000,12447.52
+2007-03-20,12226.81,12324.31,12172.66,12288.10,2795940000,12288.10
+2007-03-19,12110.41,12273.52,12110.41,12226.17,2777180000,12226.17
+2007-03-16,12160.16,12226.01,12053.05,12110.41,3393640000,12110.41
+2007-03-15,12133.16,12228.42,12060.10,12159.68,2821900000,12159.68
+2007-03-14,12074.52,12187.88,11926.79,12133.40,3758350000,12133.40
+2007-03-13,12307.49,12319.66,12049.85,12075.96,3485570000,12075.96
+2007-03-12,12275.68,12385.44,12205.58,12318.62,2664000000,12318.62
+2007-03-09,12262.06,12379.51,12200.62,12276.32,2623050000,12276.32
+2007-03-08,12193.33,12355.47,12183.79,12260.70,3014850000,12260.70
+2007-03-07,12204.46,12315.18,12122.11,12192.45,3141350000,12192.45
+2007-03-06,12051.17,12252.61,12051.17,12207.59,3358160000,12207.59
+2007-03-05,12111.61,12220.16,11973.58,12050.41,3480520000,12050.41
+2007-03-02,12233.78,12293.15,12064.91,12114.10,3312260000,12114.10
+2007-03-01,12265.59,12338.89,11996.17,12234.34,3874910000,12234.34
+2007-02-28,12214.92,12396.81,12122.03,12268.63,3925250000,12268.63
+2007-02-27,12628.90,12628.90,12078.85,12216.24,4065230000,12216.24
+2007-02-26,12647.88,12746.34,12562.72,12632.26,2822170000,12632.26
+2007-02-23,12679.89,12726.79,12578.51,12647.48,2579950000,12647.48
+2007-02-22,12735.77,12792.97,12621.93,12686.02,1950770000,12686.02
+2007-02-21,12782.87,12813.88,12662.79,12738.41,2606980000,12738.41
+2007-02-20,12766.85,12845.76,12675.04,12786.64,2337860000,12786.64
+2007-02-16,12764.13,12829.42,12685.86,12767.57,2399450000,12767.57
+2007-02-15,12741.70,12828.38,12681.85,12765.01,2490920000,12765.01
+2007-02-14,12651.29,12793.29,12623.21,12741.86,2699290000,12741.86
+2007-02-13,12549.19,12702.36,12549.19,12654.85,2652150000,12654.85
+2007-02-12,12595.90,12605.11,12536.77,12552.55,2395680000,12552.55
+2007-02-09,12638.03,12725.59,12518.58,12580.83,2951810000,12580.83
+2007-02-08,12639.16,12666.88,12576.59,12637.63,2816180000,12637.63
+2007-02-07,12656.86,12748.99,12589.56,12666.87,2618820000,12666.87
+2007-02-06,12661.66,12738.41,12586.44,12666.31,2608710000,12666.31
+2007-02-05,12641.08,12681.06,12630.50,12661.74,2439430000,12661.74
+2007-02-02,12673.84,12740.65,12582.99,12653.49,2569450000,12653.49
+2007-02-01,12617.20,12741.30,12563.85,12673.68,2914890000,12673.68
+2007-01-31,12520.03,12685.54,12461.30,12621.69,2976690000,12621.69
+2007-01-30,12484.70,12538.06,12463.07,12523.31,2706250000,12523.31
+2007-01-29,12487.10,12599.74,12422.93,12490.78,2730480000,12490.78
+2007-01-26,12503.28,12582.67,12391.44,12487.02,2626620000,12487.02
+2007-01-25,12621.77,12670.48,12461.54,12502.56,2994330000,12502.56
+2007-01-24,12534.37,12659.42,12489.98,12621.77,2783180000,12621.77
+2007-01-23,12467.96,12553.44,12467.96,12533.80,2975070000,12533.80
+2007-01-22,12566.33,12619.04,12389.68,12477.16,2540120000,12477.16
+2007-01-19,12567.93,12649.89,12462.50,12565.53,2777480000,12565.53
+2007-01-18,12575.06,12674.16,12487.90,12567.93,2822430000,12567.93
+2007-01-17,12563.53,12613.28,12550.95,12577.15,2690270000,12577.15
+2007-01-16,12555.84,12638.27,12489.90,12582.59,2599530000,12582.59
+2007-01-12,12514.66,12616.08,12432.30,12556.08,2686480000,12556.08
+2007-01-11,12442.96,12586.12,12413.72,12514.98,2857870000,12514.98
+2007-01-10,12417.00,12487.18,12313.01,12442.16,2764660000,12442.16
+2007-01-09,12424.77,12516.66,12337.85,12416.60,3038380000,12416.60
+2007-01-08,12393.93,12445.37,12337.53,12423.49,2763340000,12423.49
+2007-01-05,12480.05,12504.40,12326.79,12398.01,2919400000,12398.01
+2007-01-04,12467.32,12510.26,12405.47,12480.69,3004460000,12480.69
+2007-01-03,12459.54,12630.34,12373.82,12474.52,3429160000,12474.52
+2006-12-29,12500.48,12560.16,12423.81,12463.15,1678200000,12463.15
+2006-12-28,12510.57,12566.17,12440.23,12501.52,1508570000,12501.52
+2006-12-27,12463.46,12518.34,12407.62,12510.57,1667370000,12510.57
+2006-12-26,12341.94,12439.19,12301.40,12407.63,1310310000,12407.63
+2006-12-22,12407.87,12417.96,12341.77,12343.21,1647590000,12343.21
+2006-12-21,12461.62,12526.59,12369.97,12421.25,2322410000,12421.25
+2006-12-20,12471.32,12549.35,12393.45,12463.87,2387630000,12463.87
+2006-12-19,12439.51,12517.78,12348.50,12471.32,2717060000,12471.32
+2006-12-18,12446.24,12545.74,12372.30,12441.27,2568140000,12441.27
+2006-12-15,12417.96,12536.37,12377.35,12445.52,3229580000,12445.52
+2006-12-14,12317.50,12472.76,12271.44,12416.76,2729700000,12416.76
+2006-12-13,12312.71,12411.55,12263.19,12317.50,2552260000,12317.50
+2006-12-12,12328.24,12396.01,12222.65,12315.58,2738170000,12315.58
+2006-12-11,12306.21,12399.54,12245.32,12328.48,2289900000,12328.48
+2006-12-08,12256.21,12332.16,12243.31,12307.48,2440460000,12307.48
+2006-12-07,12310.13,12396.33,12233.06,12278.41,2743150000,12278.41
+2006-12-06,12328.72,12390.88,12239.95,12309.25,2725280000,12309.25
+2006-12-05,12283.69,12398.57,12218.24,12331.60,2755700000,12331.60
+2006-12-04,12195.57,12349.87,12149.27,12283.85,2766320000,12283.85
+2006-12-01,12220.97,12289.30,12070.52,12194.13,2800980000,12194.13
+2006-11-30,12226.73,12317.10,12118.42,12221.93,4006230000,12221.93
+2006-11-29,12134.40,12283.05,12119.70,12226.73,2790970000,12226.73
+2006-11-28,12095.27,12148.78,12073.40,12136.44,2639750000,12136.44
+2006-11-27,12279.13,12303.32,12079.01,12121.71,2711210000,12121.71
+2006-11-24,12321.71,12340.89,12219.28,12280.17,832550000,12280.17
+2006-11-22,12321.91,12403.54,12238.43,12326.95,2237710000,12326.95
+2006-11-21,12312.13,12409.31,12233.94,12321.59,2597940000,12321.59
+2006-11-20,12340.71,12400.10,12257.34,12316.54,2546710000,12316.54
+2006-11-17,12293.49,12342.55,12278.20,12342.55,2726100000,12342.55
+2006-11-16,12250.05,12375.37,12204.00,12305.82,2835730000,12305.82
+2006-11-15,12214.37,12326.07,12156.37,12251.71,2831130000,12251.71
+2006-11-14,12132.44,12261.15,12051.68,12218.01,3027480000,12218.01
+2006-11-13,12084.89,12164.22,12084.89,12131.88,2386340000,12131.88
+2006-11-10,12102.74,12173.08,12074.01,12108.43,2290200000,12108.43
+2006-11-09,12174.70,12236.10,12039.59,12103.30,3012050000,12103.30
+2006-11-08,12147.38,12233.54,12051.60,12176.54,2814820000,12176.54
+2006-11-07,12104.75,12239.94,12065.20,12156.77,2636390000,12156.77
+2006-11-06,11985.16,12146.45,11973.23,12105.55,2533550000,12105.55
+2006-11-03,12018.30,12095.30,11928.97,11986.04,2419730000,11986.04
+2006-11-02,12023.98,12070.25,11938.89,12018.54,2646180000,12018.54
+2006-11-01,12080.25,12160.70,11972.99,12031.02,2821160000,12031.02
+2006-10-31,12086.18,12160.46,11986.84,12080.73,2803030000,12080.73
+2006-10-30,12074.01,12117.07,12050.23,12086.49,2770440000,12086.49
+2006-10-27,12164.78,12202.72,12024.78,12090.26,2458450000,12090.26
+2006-10-26,12134.84,12236.10,12037.99,12163.66,2793350000,12163.66
+2006-10-25,12127.24,12212.16,12017.66,12134.68,2953540000,12134.68
+2006-10-24,12116.51,12204.80,12028.14,12127.88,2876890000,12127.88
+2006-10-23,12001.33,12177.35,11940.41,12116.91,2480430000,12116.91
+2006-10-20,12013.01,12087.38,11881.34,12002.37,2526410000,12002.37
+2006-10-19,11988.92,12082.33,11911.44,12011.73,2619830000,12011.73
+2006-10-18,11947.62,12108.91,11900.79,11992.68,2658840000,11992.68
+2006-10-17,11977.40,12024.54,11849.16,11950.02,2519620000,11950.02
+2006-10-16,11957.70,11996.92,11945.70,11980.59,2305920000,11980.59
+2006-10-13,11947.22,12009.97,11862.29,11960.51,2482920000,11960.51
+2006-10-12,11896.63,11959.14,11852.12,11947.70,2514350000,11947.70
+2006-10-11,11865.49,11907.60,11762.72,11852.13,2521000000,11852.13
+2006-10-10,11857.73,11930.33,11778.09,11867.17,2376140000,11867.17
+2006-10-09,11849.56,11923.53,11759.36,11857.81,1935170000,11857.81
+2006-10-06,11865.49,11921.04,11743.35,11850.21,2523000000,11850.21
+2006-10-05,11832.51,11869.33,11821.55,11866.69,2817240000,11866.69
+2006-10-04,11722.94,11879.18,11654.02,11850.61,3019880000,11850.61
+2006-10-03,11670.11,11794.41,11608.23,11727.34,2682690000,11727.34
+2006-10-02,11678.99,11773.60,11608.79,11670.35,2154480000,11670.35
+2006-09-29,11718.05,11782.49,11642.17,11679.07,2273430000,11679.07
+2006-09-28,11689.40,11775.36,11625.92,11718.45,2397820000,11718.45
+2006-09-27,11670.19,11775.60,11595.75,11689.24,2749190000,11689.24
+2006-09-26,11575.73,11723.74,11517.54,11669.39,2673350000,11669.39
+2006-09-25,11536.67,11616.23,11486.00,11575.81,2710240000,11575.81
+2006-09-22,11532.91,11588.62,11423.57,11508.10,2162880000,11508.10
+2006-09-21,11611.67,11677.39,11471.76,11533.23,2627440000,11533.23
+2006-09-20,11542.28,11680.19,11514.50,11613.19,2543070000,11613.19
+2006-09-19,11554.60,11605.67,11450.30,11540.91,2390850000,11540.91
+2006-09-18,11538.35,11588.22,11528.43,11555.00,2325080000,11555.00
+2006-09-15,11528.75,11661.38,11504.57,11560.77,3198030000,11560.77
+2006-09-14,11508.82,11548.84,11495.77,11527.39,2351220000,11527.39
+2006-09-13,11487.69,11605.59,11423.73,11543.32,2597220000,11543.32
+2006-09-12,11412.52,11512.74,11396.83,11498.09,2791580000,11498.09
+2006-09-11,11389.87,11468.88,11295.90,11396.84,2506430000,11396.84
+2006-09-08,11332.24,11448.30,11295.18,11392.11,2132890000,11392.11
+2006-09-07,11405.16,11443.66,11273.89,11331.44,2325850000,11331.44
+2006-09-06,11421.33,11469.27,11395.15,11406.20,2329870000,11406.20
+2006-09-05,11461.83,11533.87,11385.95,11469.28,2114480000,11469.28
+2006-09-01,11427.41,11476.40,11381.14,11464.15,1800520000,11464.15
+2006-08-31,11383.47,11451.03,11326.80,11381.15,1974540000,11381.15
+2006-08-30,11365.98,11452.95,11309.99,11382.91,2060690000,11382.91
+2006-08-29,11352.65,11432.38,11255.88,11369.94,2093720000,11369.94
+2006-08-28,11285.33,11411.24,11240.91,11352.01,1834920000,11352.01
+2006-08-25,11301.22,11350.09,11218.66,11284.05,1667580000,11284.05
+2006-08-24,11297.82,11386.59,11232.83,11304.46,1930320000,11304.46
+2006-08-23,11337.12,11394.75,11238.67,11297.90,1893670000,11297.90
+2006-08-22,11344.41,11426.13,11279.25,11339.84,1908740000,11339.84
+2006-08-21,11353.29,11381.46,11322.31,11345.04,1759240000,11345.04
+2006-08-18,11333.76,11437.66,11273.49,11381.47,2033910000,11381.47
+2006-08-17,11321.19,11372.34,11298.54,11334.96,2458340000,11334.96
+2006-08-16,11224.91,11373.78,11207.85,11327.12,2554570000,11327.12
+2006-08-15,11098.03,11271.25,11098.03,11230.26,2334100000,11230.26
+2006-08-14,11089.07,11242.83,11049.68,11097.87,2118020000,11097.87
+2006-08-11,11103.55,11121.40,11042.88,11088.02,2004540000,11088.02
+2006-08-10,11073.14,11176.47,10998.06,11124.37,2402190000,11124.37
+2006-08-09,11168.47,11296.22,11044.64,11076.18,2555180000,11076.18
+2006-08-08,11218.18,11319.51,11117.80,11173.59,2457840000,11173.59
+2006-08-07,11239.47,11294.14,11143.02,11219.38,2045660000,11219.38
+2006-08-04,11244.59,11367.94,11165.11,11240.35,2530970000,11240.35
+2006-08-03,11195.28,11304.78,11101.55,11242.59,2728440000,11242.59
+2006-08-02,11167.91,11228.98,11124.52,11199.92,2610750000,11199.92
+2006-08-01,11184.80,11210.65,11035.92,11125.73,2527690000,11125.73
+2006-07-31,11218.90,11265.80,11115.24,11185.68,2461300000,11185.68
+2006-07-28,11102.11,11282.05,11102.11,11219.70,2480420000,11219.70
+2006-07-27,11104.19,11245.47,11040.80,11100.43,2776710000,11100.43
+2006-07-26,11102.91,11208.09,10987.41,11102.51,2667710000,11102.51
+2006-07-25,11037.59,11133.73,11000.05,11103.71,2563930000,11103.71
+2006-07-24,10868.70,11096.35,10868.70,11051.05,2312720000,11051.05
+2006-07-21,10937.94,10995.73,10778.58,10868.38,2704090000,10868.38
+2006-07-20,11007.26,11098.75,10884.47,10928.10,2345580000,10928.10
+2006-07-19,10854.22,11038.16,10796.74,11011.42,2701980000,11011.42
+2006-07-18,10745.84,10867.02,10658.35,10799.23,2481750000,10799.23
+2006-07-17,10739.35,10858.22,10668.35,10747.36,2146410000,10747.36
+2006-07-14,10846.53,10892.64,10664.43,10739.35,2467120000,10739.35
+2006-07-13,11012.62,11015.19,10790.82,10846.29,2545760000,10846.29
+2006-07-12,11133.97,11181.12,10973.37,11013.18,2250450000,11013.18
+2006-07-11,11102.59,11186.32,10987.33,11134.77,2310850000,11134.77
+2006-07-10,11130.53,11174.47,11090.10,11103.55,1854590000,11103.55
+2006-07-07,11224.18,11227.62,11040.32,11090.67,1988150000,11090.67
+2006-07-06,11147.12,11301.58,11117.16,11225.30,2009160000,11225.30
+2006-07-05,11225.06,11239.47,11083.94,11151.82,2165070000,11151.82
+2006-07-03,11149.34,11277.09,11146.06,11228.02,1114470000,11228.02
+2006-06-30,11190.80,11288.86,11100.11,11150.22,3049560000,11150.22
+2006-06-29,10974.36,11225.06,10974.36,11190.80,2621250000,11190.80
+2006-06-28,10925.30,11026.07,10869.02,10973.56,2085490000,10973.56
+2006-06-27,11048.24,11064.09,10920.73,10924.74,2203130000,10924.74
+2006-06-26,10990.29,11089.07,10937.06,11045.28,1878580000,11045.28
+2006-06-23,11019.19,11098.67,10932.82,10989.09,2017270000,10989.09
+2006-06-22,11077.78,11127.73,10954.83,11019.11,2148180000,11019.11
+2006-06-21,10975.24,11165.91,10952.43,11079.46,2361230000,11079.46
+2006-06-20,10942.03,11066.73,10895.28,10974.84,2232950000,10974.84
+2006-06-19,11014.87,11098.99,10886.63,10942.11,2517200000,10942.11
+2006-06-16,11009.10,11045.04,10984.29,11014.54,2783390000,11014.54
+2006-06-15,10817.48,11049.85,10788.34,11015.19,2775480000,11015.19
+2006-06-14,10713.10,10816.99,10699.25,10816.91,2667990000,10816.91
+2006-06-13,10783.14,10893.04,10653.23,10706.14,3215770000,10706.14
+2006-06-12,10892.00,10969.32,10767.61,10792.58,2247010000,10792.58
+2006-06-09,10939.14,11015.67,10842.89,10891.92,2214000000,10891.92
+2006-06-08,10929.70,11032.15,10726.15,10938.82,3543790000,10938.82
+2006-06-07,11002.06,11107.48,10897.76,10930.90,2644170000,10930.90
+2006-06-06,11048.24,11140.45,10890.24,11002.14,2697650000,11002.14
+2006-06-05,11247.55,11259.96,11025.75,11048.72,2313470000,11048.72
+2006-06-02,11260.52,11329.28,11158.06,11247.87,2295540000,11247.87
+2006-06-01,11169.03,11290.86,11115.40,11260.28,2360160000,11260.28
+2006-05-31,11091.15,11225.78,11050.40,11168.31,2692160000,11168.31
+2006-05-30,11277.25,11277.25,11071.70,11094.43,2176190000,11094.43
+2006-05-26,11211.69,11329.36,11177.43,11278.61,1814020000,11278.61
+2006-05-25,11114.96,11258.12,11089.55,11211.05,2372730000,11211.05
+2006-05-24,11100.11,11241.15,10980.29,11117.32,2999030000,11117.32
+2006-05-23,11126.29,11254.68,11068.49,11098.35,2605250000,11098.35
+2006-05-22,11092.90,11175.03,11040.16,11125.32,2773010000,11125.32
+2006-05-19,11124.37,11254.60,11009.98,11144.06,2982300000,11144.06
+2006-05-18,11206.17,11301.26,11096.35,11128.29,2537490000,11128.29
+2006-05-17,11410.13,11412.28,11139.17,11205.61,2830200000,11205.61
+2006-05-16,11428.21,11520.42,11334.64,11419.89,2386210000,11419.89
+2006-05-15,11380.43,11485.61,11273.65,11428.77,2505660000,11428.77
+2006-05-12,11500.01,11551.40,11336.96,11380.99,2567970000,11380.99
+2006-05-11,11639.29,11660.58,11449.74,11500.73,2531520000,11500.73
+2006-05-10,11630.48,11709.09,11545.64,11642.65,2268550000,11642.65
+2006-05-09,11584.62,11684.28,11535.71,11639.77,2157290000,11639.77
+2006-05-08,11576.37,11665.14,11504.09,11584.54,2151300000,11584.54
+2006-05-05,11440.62,11616.16,11440.62,11577.74,2294760000,11577.74
+2006-05-04,11401.80,11512.18,11366.82,11438.86,2431450000,11438.86
+2006-05-03,11414.69,11472.96,11308.55,11400.28,2395230000,11400.28
+2006-05-02,11372.74,11427.43,11343.28,11416.44,2403470000,11416.44
+2006-05-01,11367.78,11476.96,11304.30,11343.29,2437040000,11343.29
+2006-04-28,11358.33,11462.95,11278.13,11367.14,2419920000,11367.14
+2006-04-27,11349.53,11465.75,11220.74,11382.51,2772010000,11382.51
+2006-04-26,11283.25,11428.77,11256.12,11354.49,2502690000,11354.49
+2006-04-25,11336.56,11401.32,11213.05,11283.25,2366380000,11283.25
+2006-04-24,11346.81,11420.05,11246.35,11336.32,2117330000,11336.32
+2006-04-21,11343.45,11468.16,11272.61,11347.45,2392630000,11347.45
+2006-04-20,11278.53,11429.25,11221.30,11342.89,2512920000,11342.89
+2006-04-19,11265.40,11379.79,11181.84,11278.77,2447310000,11278.77
+2006-04-18,11074.58,11302.30,11064.01,11268.77,2595440000,11268.77
+2006-04-17,11137.33,11203.13,11017.43,11073.78,1794650000,11073.78
+2006-04-13,11130.13,11210.73,11053.29,11137.65,1891940000,11137.65
+2006-04-12,11089.47,11194.00,11052.17,11129.97,1938100000,11129.97
+2006-04-11,11141.33,11220.98,11017.99,11089.63,2232880000,11089.63
+2006-04-10,11119.88,11211.37,11083.06,11141.33,1898320000,11141.33
+2006-04-07,11228.10,11268.92,11108.75,11120.04,2082470000,11120.04
+2006-04-06,11233.01,11294.30,11137.57,11216.50,2281680000,11216.50
+2006-04-05,11203.21,11290.30,11141.82,11239.55,2420020000,11239.55
+2006-04-04,11142.54,11269.17,11094.03,11203.85,2147660000,11203.85
+2006-04-03,11113.00,11287.02,11101.07,11144.94,2494080000,11144.94
+2006-03-31,11151.34,11229.47,11069.78,11109.32,2236710000,11109.32
+2006-03-30,11195.36,11259.08,11118.12,11150.70,2294560000,11150.70
+2006-03-29,11154.94,11283.97,11117.48,11215.70,2143540000,11215.70
+2006-03-28,11250.11,11312.31,11132.05,11154.54,2148580000,11154.54
+2006-03-27,11280.13,11314.96,11194.07,11250.11,2029700000,11250.11
+2006-03-24,11270.61,11353.21,11197.21,11279.97,2326070000,11279.97
+2006-03-23,11317.35,11363.46,11207.85,11270.29,1980940000,11270.29
+2006-03-22,11234.51,11358.01,11200.22,11317.43,2039810000,11317.43
+2006-03-21,11275.89,11364.34,11188.56,11235.47,2147370000,11235.47
+2006-03-20,11278.93,11350.73,11208.33,11274.53,1976830000,11274.53
+2006-03-17,11294.94,11294.94,11253.23,11279.65,2549620000,11279.65
+2006-03-16,11210.97,11324.80,11176.07,11253.24,2292180000,11253.24
+2006-03-15,11149.76,11258.28,11097.23,11209.77,2293000000,11209.77
+2006-03-14,11076.02,11190.96,11030.23,11151.34,2165270000,11151.34
+2006-03-13,11067.61,11157.82,11019.75,11076.02,2070330000,11076.02
+2006-03-10,10972.92,11125.41,10948.43,11076.34,2123450000,11076.34
+2006-03-09,11005.66,11093.39,10923.86,10972.28,2140110000,10972.28
+2006-03-08,10977.08,11065.61,10885.99,11005.74,2442870000,11005.74
+2006-03-07,10957.31,11032.31,10885.35,10980.69,2268050000,10980.69
+2006-03-06,11022.47,11084.66,10899.76,10958.59,2280190000,10958.59
+2006-03-03,11024.23,11125.01,10942.99,11021.59,2152950000,11021.59
+2006-03-02,11052.57,11090.91,10951.71,11025.51,2494590000,11025.51
+2006-03-01,10993.25,11115.80,10960.60,11053.53,2308320000,11053.53
+2006-02-28,11096.75,11115.24,10947.07,10993.41,2370860000,10993.41
+2006-02-27,11062.81,11180.48,11038.72,11097.55,1975320000,11097.55
+2006-02-24,11068.33,11085.38,11010.46,11061.85,1933010000,11061.85
+2006-02-23,11133.52,11167.83,11017.27,11069.22,2144210000,11069.22
+2006-02-22,11086.98,11159.02,11064.25,11137.17,2222380000,11137.17
+2006-02-21,11115.48,11182.68,11011.18,11069.06,2104320000,11069.06
+2006-02-17,11119.56,11178.80,11035.44,11115.32,2128260000,11115.32
+2006-02-16,11059.05,11154.14,10997.66,11120.68,2251490000,11120.68
+2006-02-15,11025.67,11115.56,10940.18,11058.97,2317590000,11058.97
+2006-02-14,10890.72,11071.54,10873.62,11028.39,2437940000,11028.39
+2006-02-13,10915.21,10982.93,10824.60,10892.32,1850080000,10892.32
+2006-02-10,10883.51,10972.76,10787.62,10919.05,2290050000,10919.05
+2006-02-09,10859.42,11003.50,10800.91,10883.35,2441920000,10883.35
+2006-02-08,10742.16,10897.44,10712.30,10858.62,2456860000,10858.62
+2006-02-07,10796.42,10874.79,10691.97,10749.76,2366370000,10749.76
+2006-02-06,10793.30,10868.62,10725.91,10798.27,2132360000,10798.27
+2006-02-03,10849.57,10905.28,10725.35,10793.62,2282210000,10793.62
+2006-02-02,10950.11,10987.73,10800.35,10851.98,2565300000,10851.98
+2006-02-01,10862.14,11001.82,10815.39,10953.95,2589410000,10953.95
+2006-01-31,10900.40,10970.28,10807.55,10864.86,2708310000,10864.86
+2006-01-30,10913.13,10930.34,10887.67,10899.92,2282730000,10899.92
+2006-01-27,10815.32,10988.29,10766.01,10907.21,2623620000,10907.21
+2006-01-26,10768.17,10827.96,10709.73,10809.47,2856780000,10809.47
+2006-01-25,10713.26,10832.93,10615.20,10709.74,2617060000,10709.74
+2006-01-24,10690.21,10804.75,10624.49,10712.22,2608720000,10712.22
+2006-01-23,10668.75,10783.70,10607.36,10688.77,2256070000,10688.77
+2006-01-20,10880.71,10890.08,10637.21,10667.39,2845810000,10667.39
+2006-01-19,10855.18,10965.00,10796.66,10880.71,2444020000,10880.71
+2006-01-18,10890.08,10934.90,10778.33,10854.86,2233200000,10854.86
+2006-01-17,10957.55,10977.01,10841.17,10896.32,2179970000,10896.32
+2006-01-13,10961.48,11033.04,10888.88,10959.87,2206510000,10959.87
+2006-01-12,11043.12,11070.10,10918.09,10962.36,2318350000,10962.36
+2006-01-11,11011.66,11099.15,10939.86,11043.44,2406130000,11043.44
+2006-01-10,11010.46,11054.49,10902.96,11011.58,2373080000,11011.58
+2006-01-09,10959.47,11053.93,10906.33,11011.90,2301490000,11011.90
+2006-01-06,10875.45,11005.98,10846.21,10959.31,2446560000,10959.31
+2006-01-05,10880.39,10951.39,10797.55,10882.15,2433340000,10882.15
+2006-01-04,10843.97,10946.27,10772.89,10880.15,2515330000,10880.15
+2006-01-03,10718.30,10888.40,10650.18,10847.41,2554570000,10847.41
+2005-12-30,10783.86,10801.87,10675.64,10717.50,1443500000,10717.50
+2005-12-29,10795.70,10870.71,10747.76,10784.82,1382540000,10784.82
+2005-12-28,10778.25,10858.07,10750.40,10796.26,1422360000,10796.26
+2005-12-27,10883.75,10956.99,10754.16,10777.77,1540470000,10777.77
+2005-12-23,10901.68,10904.40,10869.98,10883.27,1285810000,10883.27
+2005-12-22,10831.56,10928.34,10785.93,10889.44,1888500000,10889.44
+2005-12-21,10805.63,10933.70,10776.01,10833.73,2065170000,10833.73
+2005-12-20,10836.93,10905.28,10754.56,10805.55,1996690000,10805.55
+2005-12-19,10875.51,10970.04,10781.70,10836.53,2208810000,10836.53
+2005-12-16,10881.67,10978.21,10830.84,10875.59,2584190000,10875.59
+2005-12-15,10883.43,10985.01,10803.55,10881.67,2180590000,10881.67
+2005-12-14,10821.32,10953.07,10786.34,10883.51,2145520000,10883.51
+2005-12-13,10765.69,10902.64,10694.29,10823.72,2390020000,10823.72
+2005-12-12,10778.66,10857.02,10707.18,10767.77,1876550000,10767.77
+2005-12-09,10751.76,10845.33,10694.05,10778.58,1896290000,10778.58
+2005-12-08,10808.43,10871.11,10705.17,10755.12,2178300000,10755.12
+2005-12-07,10856.86,10916.89,10737.27,10810.91,2093830000,10810.91
+2005-12-06,10835.41,10956.13,10809.15,10856.86,2110740000,10856.86
+2005-12-05,10876.95,10923.37,10766.57,10835.01,2325840000,10835.01
+2005-12-02,10912.01,10952.83,10818.36,10877.51,2125580000,10877.51
+2005-12-01,10806.03,10969.97,10806.03,10912.57,2614830000,10912.57
+2005-11-30,10883.91,10959.80,10789.38,10805.87,2374690000,10805.87
+2005-11-29,10888.48,10994.85,10850.29,10888.16,2268340000,10888.16
+2005-11-28,10932.74,10992.39,10839.37,10890.72,2016900000,10890.72
+2005-11-25,10915.13,10997.50,10883.55,10931.62,724940000,10931.62
+2005-11-23,10865.90,10950.59,10855.42,10916.09,1985400000,10916.09
+2005-11-22,10815.96,10907.77,10729.99,10871.43,2291420000,10871.43
+2005-11-21,10766.33,10871.11,10708.86,10820.28,2117350000,10820.28
+2005-11-18,10719.34,10865.58,10663.79,10766.33,2453290000,10766.33
+2005-11-17,10677.00,10778.50,10619.61,10720.22,2298040000,10720.22
+2005-11-16,10697.81,10710.78,10653.14,10674.76,2121580000,10674.76
+2005-11-15,10697.01,10783.62,10610.08,10686.44,2359370000,10686.44
+2005-11-14,10686.60,10756.88,10618.89,10697.17,1899780000,10697.17
+2005-11-11,10641.30,10725.99,10595.89,10686.04,1773140000,10686.04
+2005-11-10,10550.61,10655.22,10519.71,10640.10,2378460000,10640.10
+2005-11-09,10539.24,10637.78,10466.24,10546.21,2214460000,10546.21
+2005-11-08,10574.18,10606.80,10478.49,10539.72,1965050000,10539.72
+2005-11-07,10531.24,10632.34,10488.74,10586.23,1987580000,10586.23
+2005-11-04,10523.23,10593.51,10441.59,10530.76,2050510000,10530.76
+2005-11-03,10470.49,10613.84,10421.98,10522.59,2716630000,10522.59
+2005-11-02,10406.29,10527.32,10347.70,10472.73,2648090000,10472.73
+2005-11-01,10437.51,10510.03,10352.42,10406.77,2457850000,10406.77
+2005-10-31,10403.17,10539.16,10372.67,10440.07,2567470000,10440.07
+2005-10-28,10231.15,10433.51,10213.14,10402.77,2379400000,10402.77
+2005-10-27,10334.81,10348.66,10229.95,10229.95,2395370000,10229.95
+2005-10-26,10377.39,10474.18,10283.10,10344.98,2467750000,10344.98
+2005-10-25,10383.88,10457.52,10282.78,10377.87,2312470000,10377.87
+2005-10-24,10219.15,10411.57,10219.15,10385.00,2197790000,10385.00
+2005-10-21,10282.22,10354.02,10161.60,10215.22,2470920000,10215.22
+2005-10-20,10411.73,10483.21,10230.27,10281.10,2617250000,10281.10
+2005-10-19,10277.18,10444.15,10173.52,10414.13,2703590000,10414.13
+2005-10-18,10349.14,10412.85,10233.47,10285.26,2197010000,10285.26
+2005-10-17,10287.42,10419.58,10213.06,10348.10,2054570000,10348.10
+2005-10-14,10216.59,10327.21,10165.12,10287.34,2188940000,10287.34
+2005-10-13,10216.91,10309.20,10098.18,10216.59,2351150000,10216.59
+2005-10-12,10247.40,10308.23,10186.17,10216.90,2491280000,10216.90
+2005-10-11,10239.16,10361.15,10195.13,10253.17,2299040000,10253.17
+2005-10-10,10292.95,10378.19,10184.09,10238.76,2195990000,10238.76
+2005-10-07,10287.42,10387.48,10221.47,10292.31,2126080000,10292.31
+2005-10-06,10317.36,10425.98,10200.81,10287.10,2792030000,10287.10
+2005-10-05,10434.81,10477.21,10299.27,10317.36,2546780000,10317.36
+2005-10-04,10534.36,10618.41,10409.89,10441.11,2341420000,10441.11
+2005-10-03,10569.50,10637.00,10486.17,10535.48,2097490000,10535.48
+2005-09-30,10540.51,10569.81,10526.34,10568.70,2097520000,10568.70
+2005-09-29,10472.61,10583.43,10389.01,10552.78,2176120000,10552.78
+2005-09-28,10456.61,10560.02,10390.05,10473.08,2106980000,10473.08
+2005-09-27,10444.58,10534.31,10376.83,10456.21,1976270000,10456.21
+2005-09-26,10420.22,10544.98,10381.53,10443.63,2022220000,10443.63
+2005-09-23,10421.81,10494.42,10328.59,10419.59,1973020000,10419.59
+2005-09-22,10376.20,10489.64,10303.51,10422.05,2424720000,10422.05
+2005-09-21,10484.23,10512.02,10335.28,10378.03,2548150000,10378.03
+2005-09-20,10558.19,10642.26,10453.98,10481.52,2319250000,10481.52
+2005-09-19,10641.87,10656.75,10497.29,10557.63,2076540000,10557.63
+2005-09-16,10560.50,10696.24,10539.64,10641.94,3152470000,10641.94
+2005-09-15,10545.85,10627.85,10488.05,10558.75,2079340000,10558.75
+2005-09-14,10545.85,10627.85,10488.05,10558.75,1986750000,10558.75
+2005-09-13,10673.71,10701.57,10561.61,10597.44,2082360000,10597.44
+2005-09-12,10678.41,10743.77,10618.13,10682.94,1938050000,10682.94
+2005-09-09,10594.10,10727.53,10573.47,10678.56,1992560000,10678.56
+2005-09-08,10633.11,10670.60,10530.01,10595.93,1955380000,10595.93
+2005-09-07,10588.68,10667.10,10534.23,10633.50,2067700000,10633.50
+2005-09-06,10447.69,10621.96,10447.69,10589.24,1932090000,10589.24
+2005-09-02,10460.67,10536.14,10400.88,10447.37,1640160000,10447.37
+2005-09-01,10481.44,10557.47,10382.09,10459.63,2229860000,10459.63
+2005-08-31,10415.84,10484.55,10357.65,10481.60,2365510000,10481.60
+2005-08-30,10461.54,10476.83,10329.15,10412.82,1916470000,10412.82
+2005-08-29,10396.90,10508.35,10321.42,10463.05,1599450000,10463.05
+2005-08-26,10450.95,10480.01,10355.02,10397.29,1541090000,10397.29
+2005-08-25,10434.39,10506.60,10391.71,10450.63,1571110000,10450.63
+2005-08-24,10519.34,10584.30,10407.56,10434.87,1930800000,10434.87
+2005-08-23,10571.01,10604.29,10475.63,10519.58,1678620000,10519.58
+2005-08-22,10559.78,10669.81,10509.07,10569.89,1621330000,10569.89
+2005-08-19,10552.70,10656.59,10503.90,10559.23,1558790000,10559.23
+2005-08-18,10531.12,10592.34,10517.67,10554.92,1808170000,10554.92
+2005-08-17,10505.60,10625.86,10472.45,10550.71,1859150000,10550.71
+2005-08-16,10631.59,10650.14,10489.24,10513.45,1820410000,10513.45
+2005-08-15,10599.19,10687.72,10532.48,10634.38,1562880000,10634.38
+2005-08-12,10682.70,10688.68,10549.19,10600.30,1709300000,10600.30
+2005-08-11,10591.83,10721.56,10549.43,10685.89,1941560000,10685.89
+2005-08-10,10606.52,10746.87,10553.81,10594.41,2172320000,10594.41
+2005-08-09,10537.65,10662.80,10537.01,10615.67,1897520000,10615.67
+2005-08-08,10557.24,10635.65,10497.45,10536.93,1804140000,10536.93
+2005-08-05,10610.34,10643.46,10512.49,10558.03,1930280000,10558.03
+2005-08-04,10696.80,10709.77,10568.70,10610.10,1981220000,10610.10
+2005-08-03,10681.51,10735.17,10600.02,10697.59,1999980000,10697.59
+2005-08-02,10623.79,10729.60,10600.62,10683.74,2043120000,10683.74
+2005-08-01,10641.78,10713.51,10578.97,10623.15,1716870000,10623.15
+2005-07-29,10705.16,10754.60,10608.27,10640.91,1789600000,10640.91
+2005-07-28,10633.50,10745.68,10603.49,10705.55,2001680000,10705.55
+2005-07-27,10579.45,10689.31,10530.50,10637.09,1945800000,10637.09
+2005-07-26,10597.60,10667.90,10535.58,10579.77,1934180000,10579.77
+2005-07-25,10651.66,10709.69,10565.12,10596.48,1717580000,10596.48
+2005-07-22,10624.19,10702.21,10552.54,10651.18,1766990000,10651.18
+2005-07-21,10690.03,10735.33,10567.98,10627.77,2129840000,10627.77
+2005-07-20,10629.52,10726.81,10535.10,10689.15,2063340000,10689.15
+2005-07-19,10576.90,10718.69,10573.00,10646.56,2041280000,10646.56
+2005-07-18,10640.19,10681.99,10533.59,10574.99,1582100000,10574.99
+2005-07-15,10629.44,10698.07,10559.46,10640.83,1716400000,10640.83
+2005-07-14,10559.86,10696.96,10559.86,10628.88,2048710000,10628.88
+2005-07-13,10513.36,10596.98,10481.36,10557.39,1812500000,10557.39
+2005-07-12,10519.49,10583.02,10444.46,10513.89,1932010000,10513.89
+2005-07-11,10449.60,10570.67,10425.97,10519.72,1846300000,10519.72
+2005-07-08,10302.90,10486.50,10279.65,10449.14,1900810000,10449.14
+2005-07-07,10269.76,10337.84,10142.24,10302.29,1952440000,10302.29
+2005-07-06,10366.52,10413.23,10242.21,10270.68,1883470000,10270.68
+2005-07-05,10292.62,10388.91,10282.64,10371.80,1805820000,10371.80
+2005-07-01,10273.59,10380.78,10239.91,10303.44,1593820000,10303.44
+2005-06-30,10374.18,10458.19,10253.49,10274.97,2109490000,10274.97
+2005-06-29,10405.94,10472.46,10332.52,10374.48,1769280000,10374.48
+2005-06-28,10291.01,10434.18,10285.86,10405.63,1772410000,10405.63
+2005-06-27,10298.07,10377.55,10229.40,10290.78,1738620000,10290.78
+2005-06-24,10422.28,10452.82,10266.30,10297.83,2418800000,10297.83
+2005-06-23,10587.09,10617.39,10401.49,10421.44,2029920000,10421.44
+2005-06-22,10599.36,10676.24,10543.28,10587.93,1823250000,10587.93
+2005-06-21,10608.88,10670.56,10545.89,10599.67,1720700000,10599.67
+2005-06-20,10621.54,10656.66,10539.21,10609.10,1714530000,10609.10
+2005-06-17,10580.41,10710.38,10561.00,10623.07,2407370000,10623.07
+2005-06-16,10566.76,10632.20,10501.92,10578.65,1776040000,10578.65
+2005-06-15,10548.65,10628.67,10471.69,10566.37,1840440000,10566.37
+2005-06-14,10521.95,10617.01,10473.92,10547.57,1698150000,10547.57
+2005-06-13,10503.57,10611.10,10437.32,10522.56,1661350000,10522.56
+2005-06-10,10503.02,10581.13,10410.50,10512.63,1664180000,10512.63
+2005-06-09,10477.75,10556.90,10410.80,10503.02,1824120000,10503.02
+2005-06-08,10484.84,10575.81,10439.77,10476.86,1715490000,10476.86
+2005-06-07,10466.00,10603.15,10454.18,10483.07,1851370000,10483.07
+2005-06-06,10461.64,10519.79,10410.28,10467.03,1547120000,10467.03
+2005-06-03,10552.82,10572.18,10427.35,10460.97,1627520000,10460.97
+2005-06-02,10548.83,10590.07,10478.26,10553.49,1813790000,10553.49
+2005-06-01,10462.86,10616.15,10433.48,10549.87,1810100000,10549.87
+2005-05-31,10541.89,10574.92,10437.77,10467.48,1840680000,10467.48
+2005-05-27,10537.08,10579.94,10489.35,10542.55,1381430000,10542.55
+2005-05-26,10458.68,10581.87,10450.55,10537.60,1654110000,10537.60
+2005-05-25,10503.17,10516.17,10396.46,10457.80,1742180000,10457.80
+2005-05-24,10522.68,10550.24,10433.78,10503.68,1681000000,10503.68
+2005-05-23,10472.80,10589.92,10438.36,10523.56,1681170000,10523.56
+2005-05-20,10492.75,10535.24,10400.60,10471.91,1631750000,10471.91
+2005-05-19,10464.45,10538.71,10394.39,10493.19,1775860000,10493.19
+2005-05-18,10323.19,10518.17,10323.19,10464.45,2266320000,10464.45
+2005-05-17,10247.49,10357.30,10175.81,10331.88,1887260000,10331.88
+2005-05-16,10139.61,10274.39,10118.32,10252.29,1856860000,10252.29
+2005-05-13,10188.23,10268.85,10062.76,10140.12,2188590000,10140.12
+2005-05-12,10299.74,10357.37,10155.86,10189.48,1995290000,10189.48
+2005-05-11,10272.91,10355.31,10172.86,10300.25,1834970000,10300.25
+2005-05-10,10382.94,10389.96,10230.35,10281.11,1889660000,10281.11
+2005-05-09,10345.40,10416.56,10288.95,10384.34,1857020000,10384.34
+2005-05-06,10339.71,10454.40,10300.70,10345.40,1707200000,10345.40
+2005-05-05,10384.49,10447.08,10276.75,10340.38,1997100000,10340.38
+2005-05-04,10255.25,10412.20,10239.95,10384.64,2306480000,10384.64
+2005-05-03,10251.04,10327.37,10169.39,10256.95,2167020000,10256.95
+2005-05-02,10192.00,10309.86,10149.06,10251.70,1980040000,10251.70
+2005-04-29,10073.47,10231.31,10021.23,10192.51,2362360000,10192.51
+2005-04-28,10194.58,10229.09,10036.74,10070.37,2182270000,10070.37
+2005-04-27,10150.32,10250.23,10048.27,10198.80,2151520000,10198.80
+2005-04-26,10240.99,10298.85,10108.79,10151.13,1959740000,10151.13
+2005-04-25,10158.52,10305.87,10148.25,10242.47,1795030000,10242.47
+2005-04-22,10216.68,10266.48,10055.29,10157.71,2045880000,10157.71
+2005-04-21,10010.51,10250.30,10010.51,10218.60,2308560000,10218.60
+2005-04-20,10131.18,10232.34,9978.74,10012.36,2217050000,10012.36
+2005-04-19,10071.55,10220.21,10021.08,10127.41,2142700000,10127.41
+2005-04-18,10088.54,10183.50,9961.52,10071.25,2180670000,10071.25
+2005-04-15,10276.61,10311.26,10059.36,10087.51,2689960000,10087.51
+2005-04-14,10403.71,10457.06,10248.23,10278.75,2355040000,10278.75
+2005-04-13,10507.45,10567.38,10355.16,10403.93,2049740000,10403.93
+2005-04-12,10448.63,10552.60,10331.21,10507.97,1979830000,10507.97
+2005-04-11,10462.08,10530.58,10393.36,10448.56,1525310000,10448.56
+2005-04-08,10546.32,10584.60,10445.31,10461.34,1661330000,10461.34
+2005-04-07,10485.88,10589.99,10434.30,10546.32,1900620000,10546.32
+2005-04-06,10453.45,10557.18,10434.22,10486.02,1797400000,10486.02
+2005-04-05,10421.14,10530.14,10372.59,10458.46,1870800000,10458.46
+2005-04-04,10401.71,10496.44,10307.64,10421.14,2079770000,10421.14
+2005-04-01,10504.57,10600.56,10349.02,10404.30,2168690000,10404.30
+2005-03-31,10541.59,10586.15,10448.19,10503.76,2214230000,10503.76
+2005-03-30,10405.77,10564.80,10395.21,10540.93,2097110000,10540.93
+2005-03-29,10486.10,10565.46,10351.76,10405.70,2223250000,10405.70
+2005-03-28,10444.13,10568.05,10412.79,10485.65,1746220000,10485.65
+2005-03-24,10457.06,10554.60,10415.16,10442.87,1721720000,10442.87
+2005-03-23,10470.58,10558.51,10384.34,10456.02,2246870000,10456.02
+2005-03-22,10565.39,10651.41,10446.78,10470.51,2114470000,10470.51
+2005-03-21,10629.90,10662.93,10503.46,10565.39,1819440000,10565.39
+2005-03-18,10627.83,10709.85,10520.60,10629.67,2344370000,10629.67
+2005-03-17,10633.30,10707.86,10561.10,10626.35,1581930000,10626.35
+2005-03-16,10741.63,10764.16,10569.30,10633.07,1653190000,10633.07
+2005-03-15,10804.29,10884.76,10716.87,10745.10,1513530000,10745.10
+2005-03-14,10773.92,10859.12,10709.26,10804.51,1437430000,10804.51
+2005-03-11,10845.30,10897.68,10728.62,10774.36,1449820000,10774.36
+2005-03-10,10806.28,10907.45,10757.36,10851.51,1604020000,10851.51
+2005-03-09,10912.32,10949.20,10768.66,10805.62,1704970000,10805.62
+2005-03-08,10935.60,10996.56,10863.40,10912.62,1523090000,10912.62
+2005-03-07,10940.55,11027.15,10886.09,10936.86,1488830000,10936.86
+2005-03-04,10834.51,10996.93,10834.51,10940.55,1636820000,10940.55
+2005-03-03,10812.27,10904.34,10744.14,10833.03,1616240000,10833.03
+2005-03-02,10825.68,10896.66,10736.16,10811.97,1568540000,10811.97
+2005-03-01,10794.98,10849.14,10769.04,10830.00,1708060000,10830.00
+2005-02-28,10842.05,10877.07,10709.41,10766.23,1795480000,10766.23
+2005-02-25,10748.42,10871.53,10698.32,10841.60,1523680000,10841.60
+2005-02-24,10672.24,10779.39,10612.24,10748.79,1518750000,10748.79
+2005-02-23,10609.28,10735.42,10583.64,10673.79,1501090000,10673.79
+2005-02-22,10783.38,10806.36,10596.79,10611.20,1744940000,10611.20
+2005-02-18,10755.15,10854.98,10682.29,10785.22,1551200000,10785.22
+2005-02-17,10835.03,10873.60,10729.95,10754.26,1580120000,10754.26
+2005-02-16,10832.03,10889.78,10746.21,10834.88,1490100000,10834.88
+2005-02-15,10791.06,10886.31,10745.10,10837.32,1527080000,10837.32
+2005-02-14,10795.72,10853.80,10722.63,10791.13,1290180000,10791.13
+2005-02-11,10742.92,10865.69,10680.15,10796.01,1562300000,10796.01
+2005-02-10,10665.00,10803.92,10633.67,10749.61,1491670000,10749.61
+2005-02-09,10717.76,10781.38,10621.84,10664.11,1511040000,10664.11
+2005-02-08,10712.51,10783.97,10647.85,10724.63,1416170000,10724.63
+2005-02-07,10715.76,10774.80,10650.59,10715.76,1347270000,10715.76
+2005-02-04,10593.17,10750.94,10553.93,10716.13,1648160000,10716.13
+2005-02-03,10592.21,10640.69,10511.96,10593.10,1554460000,10593.10
+2005-02-02,10551.05,10638.25,10501.02,10596.79,1561740000,10596.79
+2005-02-01,10489.72,10609.73,10464.38,10551.94,1681980000,10551.94
+2005-01-31,10428.76,10559.77,10414.49,10489.94,1679800000,10489.94
+2005-01-28,10470.58,10520.61,10331.58,10427.20,1641800000,10427.20
+2005-01-27,10498.14,10535.16,10379.47,10467.40,1600600000,10467.40
+2005-01-26,10463.19,10571.66,10433.56,10498.59,1635900000,10498.59
+2005-01-25,10369.42,10534.72,10369.42,10461.56,1610400000,10461.56
+2005-01-24,10393.58,10491.71,10317.10,10368.61,1494600000,10368.61
+2005-01-21,10471.98,10541.30,10370.97,10392.99,1643500000,10392.99
+2005-01-20,10538.90,10582.09,10414.72,10471.47,1692000000,10471.47
+2005-01-19,10626.05,10668.40,10519.20,10539.97,1498700000,10539.97
+2005-01-18,10554.23,10665.44,10456.61,10628.79,1596800000,10628.79
+2005-01-14,10506.71,10606.47,10475.01,10558.00,1335400000,10558.00
+2005-01-13,10617.41,10650.96,10463.26,10505.83,1510300000,10505.83
+2005-01-12,10561.32,10648.52,10481.37,10617.78,1562100000,10617.78
+2005-01-11,10619.77,10632.63,10504.72,10556.22,1488800000,10556.22
+2005-01-10,10603.44,10696.85,10544.99,10621.03,1490400000,10621.03
+2005-01-07,10624.80,10697.81,10545.80,10603.96,1477900000,10603.96
+2005-01-06,10593.19,10708.37,10555.48,10622.88,1569100000,10622.88
+2005-01-05,10629.53,10736.16,10561.03,10597.83,1738900000,10597.83
+2005-01-04,10727.81,10803.62,10587.48,10630.78,1720200000,10630.78
+2005-01-03,10783.75,10892.67,10694.18,10729.43,1505900000,10729.43
+2004-12-31,10800.30,10849.81,10759.94,10783.01,786900000,10783.01
+2004-12-30,10829.12,10880.03,10781.67,10800.30,829800000,10800.30
+2004-12-29,10853.72,10872.71,10771.26,10829.19,924900000,10829.19
+2004-12-28,10776.06,10890.82,10774.51,10854.54,984200000,10854.54
+2004-12-27,10828.01,10892.52,10755.67,10776.13,922000000,10776.13
+2004-12-23,10815.00,10895.10,10780.12,10827.12,956100000,10827.12
+2004-12-22,10752.34,10861.33,10709.78,10815.89,1390800000,10815.89
+2004-12-21,10661.89,10789.66,10646.60,10759.43,1483700000,10759.43
+2004-12-20,10652.14,10769.13,10622.20,10661.60,1422800000,10661.60
+2004-12-17,10704.83,10766.01,10562.76,10649.92,2335000000,10649.92
+2004-12-16,10691.71,10776.43,10612.31,10705.64,1793900000,10705.64
+2004-12-15,10675.71,10749.53,10601.74,10691.45,1695800000,10691.45
+2004-12-14,10640.53,10715.76,10571.67,10676.45,1544400000,10676.45
+2004-12-13,10543.44,10678.52,10520.61,10638.32,1436100000,10638.32
+2004-12-10,10552.16,10616.23,10469.62,10543.22,1443700000,10543.22
+2004-12-09,10492.45,10579.94,10389.81,10552.82,1624700000,10552.82
+2004-12-08,10438.77,10550.16,10395.05,10494.23,1525200000,10494.23
+2004-12-07,10546.80,10612.90,10423.21,10440.58,1533900000,10440.58
+2004-12-06,10591.32,10614.82,10490.31,10547.06,1354400000,10547.06
+2004-12-03,10597.90,10670.47,10515.73,10592.21,1566700000,10592.21
+2004-12-02,10590.44,10670.02,10485.21,10585.12,1774900000,10585.12
+2004-12-01,10425.80,10618.59,10421.66,10590.22,1772800000,10590.22
+2004-11-30,10475.27,10530.80,10380.58,10428.02,1553500000,10428.02
+2004-11-29,10520.64,10590.73,10390.92,10475.90,1378500000,10475.90
+2004-11-26,10518.69,10574.70,10479.52,10522.23,504580000,10522.23
+2004-11-24,10493.86,10565.76,10451.66,10520.31,1149600000,10520.31
+2004-11-23,10486.69,10547.28,10407.18,10492.60,1428300000,10492.60
+2004-11-22,10455.73,10535.46,10380.95,10489.42,1392700000,10489.42
+2004-11-19,10571.63,10588.29,10419.89,10456.91,1526600000,10456.91
+2004-11-18,10549.20,10639.43,10499.62,10572.55,1456700000,10572.55
+2004-11-17,10481.83,10655.09,10470.21,10549.57,1684200000,10549.57
+2004-11-16,10549.79,10570.56,10445.31,10487.65,1364400000,10487.65
+2004-11-15,10541.89,10612.31,10463.34,10550.24,1453300000,10550.24
+2004-11-12,10469.21,10565.48,10419.77,10539.01,1531600000,10539.01
+2004-11-11,10386.95,10513.42,10364.10,10469.84,1393000000,10469.84
+2004-11-10,10378.59,10470.21,10330.54,10385.48,1504300000,10385.48
+2004-11-09,10387.62,10466.81,10327.00,10386.37,1450800000,10386.37
+2004-11-08,10385.15,10452.58,10313.51,10391.31,1358700000,10391.31
+2004-11-05,10317.05,10458.10,10279.96,10387.54,1724400000,10387.54
+2004-11-04,10132.48,10352.81,10076.36,10314.76,1782700000,10314.76
+2004-11-03,10137.05,10253.27,10062.80,10137.05,1767500000,10137.05
+2004-11-02,10053.87,10180.85,9976.29,10035.73,1659000000,10035.73
+2004-11-01,10028.73,10124.44,9953.29,10054.39,1395900000,10054.39
+2004-10-29,10004.69,10083.44,9936.77,10027.47,1500800000,10027.47
+2004-10-28,9998.94,10074.89,9900.42,10004.54,1628200000,10004.54
+2004-10-27,9888.25,10051.96,9807.80,10002.03,1741900000,10002.03
+2004-10-26,9750.59,9914.65,9718.94,9888.48,1685400000,9888.48
+2004-10-25,9757.22,9827.20,9660.18,9749.99,1380500000,9749.99
+2004-10-22,9863.85,9920.99,9732.81,9757.81,1469600000,9757.81
+2004-10-21,9884.65,9969.07,9769.16,9865.76,1673000000,9865.76
+2004-10-20,9895.19,9957.05,9766.95,9886.93,1685700000,9886.93
+2004-10-19,9958.38,10064.20,9854.19,9897.62,1737500000,9897.62
+2004-10-18,9932.98,10002.18,9816.73,9956.32,1373300000,9956.32
+2004-10-15,9895.63,10022.31,9845.56,9933.38,1645100000,9933.38
+2004-10-14,10002.54,10048.48,9837.22,9894.45,1489500000,9894.45
+2004-10-13,10085.21,10157.11,9935.08,10002.33,1546200000,10002.33
+2004-10-12,10080.42,10121.49,9985.44,10077.18,1320100000,10077.18
+2004-10-11,10056.09,10142.74,10017.67,10081.97,943800000,10081.97
+2004-10-08,10124.11,10177.53,10013.91,10055.20,1291600000,10055.20
+2004-10-07,10239.84,10267.57,10086.83,10125.40,1447500000,10125.40
+2004-10-06,10170.70,10267.14,10112.20,10239.92,1416700000,10239.92
+2004-10-05,10216.76,10253.93,10123.19,10177.68,1418400000,10177.68
+2004-10-04,10191.40,10313.81,10153.79,10216.54,1534000000,10216.54
+2004-10-01,10082.04,10237.05,10081.38,10192.65,1582200000,10192.65
+2004-09-30,10136.38,10155.49,9987.36,10080.27,1748000000,10080.27
+2004-09-29,10078.06,10160.50,10002.57,10136.24,1402900000,10136.24
+2004-09-28,9989.73,10132.04,9950.71,10077.40,1396600000,10077.40
+2004-09-27,10046.65,10077.32,9952.78,9988.54,1263500000,9988.54
+2004-09-24,10039.42,10111.39,9993.92,10047.24,1255400000,10047.24
+2004-09-23,10108.29,10134.84,9999.67,10038.90,1286300000,10038.90
+2004-09-22,10244.05,10244.05,10075.33,10109.18,1379900000,10109.18
+2004-09-21,10204.52,10291.39,10159.54,10244.93,1325000000,10244.93
+2004-09-20,10283.87,10293.23,10152.90,10204.89,1197600000,10204.89
+2004-09-17,10245.82,10352.37,10219.71,10284.46,1422600000,10284.46
+2004-09-16,10231.59,10315.72,10194.35,10244.49,1113900000,10244.49
+2004-09-15,10316.90,10324.87,10195.60,10231.36,1256000000,10231.36
+2004-09-14,10315.13,10374.79,10260.93,10318.16,1204500000,10318.16
+2004-09-13,10306.65,10380.47,10250.61,10314.76,1299800000,10314.76
+2004-09-10,10289.47,10348.68,10196.19,10313.07,1261200000,10313.07
+2004-09-09,10313.36,10337.33,10269.49,10289.10,1371300000,10289.10
+2004-09-08,10342.42,10390.64,10267.94,10313.36,1246300000,10313.36
+2004-09-07,10261.52,10388.95,10255.62,10341.16,1214400000,10341.16
+2004-09-03,10277.82,10346.99,10229.52,10260.20,924170000,10260.20
+2004-09-02,10168.39,10312.99,10129.01,10290.28,1118400000,10290.28
+2004-09-01,10170.12,10230.48,10092.37,10168.46,1142100000,10168.46
+2004-08-31,10121.97,10198.03,10056.09,10173.92,1138200000,10173.92
+2004-08-30,10193.83,10226.87,10110.43,10122.52,843100000,10122.52
+2004-08-27,10174.07,10235.49,10143.91,10195.01,845400000,10195.01
+2004-08-26,10181.07,10225.61,10124.88,10173.41,1023600000,10173.41
+2004-08-25,10098.49,10224.29,10041.93,10181.74,1192200000,10181.74
+2004-08-24,10074.89,10165.07,10044.66,10098.63,1092500000,10098.63
+2004-08-23,10111.10,10159.54,10046.72,10073.05,1021900000,10073.05
+2004-08-20,10040.81,10143.76,9989.65,10110.14,1199900000,10110.14
+2004-08-19,10082.78,10111.91,9972.39,10040.82,1249400000,10040.82
+2004-08-18,9964.22,10097.01,9910.82,10083.15,1282500000,10083.15
+2004-08-17,9955.50,10053.21,9916.05,9972.83,1267800000,9972.83
+2004-08-16,9825.35,9987.58,9807.44,9954.55,1206200000,9954.55
+2004-08-13,9814.11,9897.34,9746.60,9825.35,1175100000,9825.35
+2004-08-12,9936.48,9940.02,9780.52,9814.59,1405100000,9814.59
+2004-08-11,9931.24,9981.61,9804.63,9938.32,1410400000,9938.32
+2004-08-10,9815.55,9961.70,9798.44,9944.67,1245600000,9944.67
+2004-08-09,9816.14,9902.49,9773.74,9814.66,1086000000,9814.66
+2004-08-06,9960.67,9963.47,9767.54,9815.33,1521000000,9815.33
+2004-08-05,10127.10,10158.44,9945.84,9963.03,1397400000,9963.03
+2004-08-04,10117.96,10186.16,10029.02,10126.51,1369200000,10126.51
+2004-08-03,10178.27,10228.49,10064.57,10120.24,1338300000,10120.24
+2004-08-02,10138.45,10224.29,10063.75,10179.16,1276000000,10179.16
+2004-07-30,10129.12,10194.13,10045.76,10139.71,1298200000,10139.71
+2004-07-29,10115.52,10213.08,10049.74,10129.24,1530100000,10129.24
+2004-07-28,10084.03,10170.31,9966.34,10117.07,1554300000,10117.07
+2004-07-27,9963.54,10133.95,9942.75,10085.14,1610800000,10085.14
+2004-07-26,9964.71,10054.32,9874.38,9961.92,1413400000,9961.92
+2004-07-23,10045.46,10069.51,9893.93,9962.22,1337500000,9962.22
+2004-07-22,10047.60,10114.41,9906.62,10050.33,1680800000,10050.33
+2004-07-21,10156.30,10279.96,10027.92,10046.13,1679500000,10046.13
+2004-07-20,10094.43,10186.90,10031.24,10149.07,1445800000,10149.07
+2004-07-19,10140.95,10211.60,10027.33,10094.06,1319900000,10094.06
+2004-07-16,10162.34,10289.40,10095.32,10139.78,1450300000,10139.78
+2004-07-15,10208.20,10275.27,10115.81,10163.16,1408700000,10163.16
+2004-07-14,10232.84,10313.95,10129.31,10208.80,1462000000,10208.80
+2004-07-13,10238.37,10297.58,10188.45,10247.59,1199700000,10247.59
+2004-07-12,10211.75,10284.39,10130.42,10238.22,1114600000,10238.22
+2004-07-09,10173.12,10277.16,10150.32,10213.22,1186300000,10213.22
+2004-07-08,10238.52,10297.73,10134.99,10171.56,1401100000,10171.56
+2004-07-07,10211.92,10300.53,10156.45,10240.29,1328600000,10240.29
+2004-07-06,10280.26,10308.43,10163.60,10219.34,1283300000,10219.34
+2004-07-02,10334.00,10371.40,10228.71,10282.83,1085000000,10282.83
+2004-07-01,10434.00,10473.23,10255.55,10334.16,1495700000,10334.16
+2004-06-30,10413.43,10489.16,10348.98,10435.48,1473800000,10435.48
+2004-06-29,10356.35,10460.25,10315.65,10413.43,1375000000,10413.43
+2004-06-28,10377.52,10505.16,10317.64,10357.09,1354600000,10357.09
+2004-06-25,10444.24,10514.67,10329.88,10371.84,1812900000,10371.84
+2004-06-24,10477.43,10530.01,10398.16,10443.81,1394900000,10443.81
+2004-06-23,10395.14,10498.67,10323.32,10479.57,1444200000,10479.57
+2004-06-22,10370.21,10431.05,10284.24,10395.07,1382300000,10395.07
+2004-06-21,10417.82,10471.76,10336.44,10371.47,1123900000,10371.47
+2004-06-18,10375.82,10471.84,10328.20,10416.41,1500600000,10416.41
+2004-06-17,10378.59,10417.69,10308.25,10377.52,1296700000,10377.52
+2004-06-16,10380.23,10433.52,10320.60,10379.58,1168400000,10379.58
+2004-06-15,10336.51,10464.04,10319.89,10380.43,1345900000,10380.43
+2004-06-14,10401.23,10403.50,10283.48,10334.73,1179400000,10334.73
+2004-06-10,10367.80,10448.00,10333.94,10410.10,1160600000,10410.10
+2004-06-09,10431.10,10466.59,10325.07,10368.44,1276800000,10368.44
+2004-06-08,10389.41,10462.97,10323.94,10432.52,1190300000,10432.52
+2004-06-07,10243.31,10410.81,10243.31,10391.08,1211800000,10391.08
+2004-06-04,10196.83,10327.84,10196.83,10242.82,1115300000,10242.82
+2004-06-03,10261.85,10309.46,10163.40,10195.91,1232400000,10195.91
+2004-06-02,10199.78,10310.10,10170.57,10262.97,1251700000,10262.97
+2004-06-01,10187.18,10254.17,10104.07,10202.65,1238000000,10202.65
+2004-05-28,10205.83,10250.27,10137.14,10188.45,1172600000,10188.45
+2004-05-27,10109.89,10267.66,10106.13,10205.20,1447500000,10205.20
+2004-05-26,10116.84,10175.75,10034.16,10109.89,1369400000,10109.89
+2004-05-25,9958.08,10139.27,9895.41,10117.62,1545700000,10117.62
+2004-05-24,9968.02,10084.91,9891.22,9958.43,1227500000,9958.43
+2004-05-21,9939.34,10058.50,9910.81,9966.74,1258600000,9966.74
+2004-05-20,9939.12,10014.50,9867.73,9937.64,1211000000,9937.64
+2004-05-19,9962.55,10124.79,9919.90,9937.71,1548600000,9937.71
+2004-05-18,9906.71,10028.27,9895.77,9968.51,1353000000,9968.51
+2004-05-17,10009.92,10009.92,9827.21,9906.91,1430100000,9906.91
+2004-05-14,10008.43,10096.69,9912.45,10012.87,1335900000,10012.87
+2004-05-13,10044.31,10100.24,9924.94,10010.74,1411100000,10010.74
+2004-05-12,10011.52,10089.87,9822.10,10045.16,1697600000,10045.16
+2004-05-11,9989.24,10092.78,9928.91,10019.47,1533800000,10019.47
+2004-05-10,10116.28,10116.28,9881.86,9990.02,1918400000,9990.02
+2004-05-07,10240.62,10302.93,10086.94,10117.34,1653600000,10117.34
+2004-05-06,10308.20,10332.10,10147.21,10241.26,1509300000,10241.26
+2004-05-05,10316.98,10382.98,10249.63,10310.95,1469000000,10310.95
+2004-05-04,10314.32,10403.14,10232.31,10317.20,1662100000,10317.20
+2004-05-03,10227.27,10365.74,10199.67,10314.00,1571600000,10314.00
+2004-04-30,10273.06,10374.61,10198.39,10225.57,1634700000,10225.57
+2004-04-29,10339.41,10443.81,10199.31,10272.27,1859000000,10272.27
+2004-04-28,10476.67,10479.58,10301.65,10342.60,1855600000,10342.60
+2004-04-27,10445.38,10570.92,10410.52,10478.16,1518000000,10478.16
+2004-04-26,10472.91,10540.26,10396.75,10444.73,1290600000,10444.73
+2004-04-23,10463.11,10543.95,10362.97,10472.84,1396100000,10472.84
+2004-04-22,10314.99,10529.12,10255.88,10461.20,1826700000,10461.20
+2004-04-21,10311.87,10398.53,10200.38,10317.27,1738100000,10317.27
+2004-04-20,10437.85,10530.61,10297.39,10314.50,1508500000,10314.50
+2004-04-19,10451.62,10501.79,10351.97,10437.85,1194900000,10437.85
+2004-04-16,10398.32,10500.57,10343.74,10451.97,1487800000,10451.97
+2004-04-15,10377.95,10481.21,10279.37,10397.46,1568700000,10397.46
+2004-04-14,10378.10,10453.39,10259.35,10377.95,1547700000,10377.95
+2004-04-13,10516.05,10572.13,10343.17,10381.28,1423200000,10381.28
+2004-04-12,10444.38,10559.28,10439.27,10515.56,1102400000,10515.56
+2004-04-08,10482.77,10590.15,10383.84,10442.03,1199800000,10442.03
+2004-04-07,10569.26,10580.51,10422.74,10480.15,1458800000,10480.15
+2004-04-06,10553.76,10596.37,10467.26,10570.81,1397700000,10570.81
+2004-04-05,10470.59,10582.22,10423.33,10558.37,1413700000,10558.37
+2004-04-02,10375.33,10548.74,10375.33,10470.59,1629200000,10470.59
+2004-04-01,10357.52,10449.33,10299.48,10373.33,1560700000,10373.33
+2004-03-31,10380.89,10428.59,10287.11,10357.70,1560700000,10357.70
+2004-03-30,10327.63,10411.41,10264.15,10381.70,1332400000,10381.70
+2004-03-29,10212.91,10389.93,10212.91,10329.63,1405500000,10329.63
+2004-03-26,10218.37,10306.22,10145.63,10212.97,1319100000,10212.97
+2004-03-25,10049.56,10246.15,10049.56,10218.82,1471700000,10218.82
+2004-03-24,10065.41,10140.23,9975.86,10048.23,1527800000,10048.23
+2004-03-23,10066.67,10177.04,10020.75,10063.64,1458200000,10063.64
+2004-03-22,10185.93,10185.93,9985.19,10064.75,1452300000,10064.75
+2004-03-19,10295.85,10355.41,10163.71,10186.60,1457400000,10186.60
+2004-03-18,10298.96,10355.04,10187.78,10295.78,1369200000,10295.78
+2004-03-17,10184.30,10356.59,10184.30,10300.30,1490100000,10300.30
+2004-03-16,10103.41,10253.26,10085.34,10184.67,1500700000,10184.67
+2004-03-15,10238.45,10252.68,10066.08,10102.89,1600600000,10102.89
+2004-03-12,10130.67,10281.63,10097.04,10240.08,1388500000,10240.08
+2004-03-11,10288.85,10356.22,10102.75,10128.38,1889900000,10128.38
+2004-03-10,10457.59,10523.11,10259.34,10296.89,1648400000,10296.89
+2004-03-09,10529.52,10567.03,10391.48,10456.96,1499400000,10456.96
+2004-03-08,10595.37,10677.85,10505.85,10529.48,1254400000,10529.48
+2004-03-05,10582.59,10681.40,10497.11,10595.55,1398200000,10595.55
+2004-03-04,10593.48,10645.33,10522.59,10588.00,1265800000,10588.00
+2004-03-03,10588.59,10651.03,10506.66,10593.11,1334500000,10593.11
+2004-03-02,10678.36,10713.92,10539.40,10591.48,1476000000,10591.48
+2004-03-01,10582.25,10720.14,10568.74,10678.14,1497100000,10678.14
+2004-02-27,10581.55,10689.55,10519.03,10583.92,1540400000,10583.92
+2004-02-26,10598.14,10652.96,10493.70,10580.14,1383900000,10580.14
+2004-02-25,10566.59,10660.73,10509.40,10601.62,1360700000,10601.62
+2004-02-24,10609.55,10681.40,10479.33,10566.37,1543600000,10566.37
+2004-02-23,10619.55,10711.84,10508.89,10609.62,1380400000,10609.62
+2004-02-20,10666.29,10722.77,10559.11,10619.03,1479600000,10619.03
+2004-02-19,10674.59,10794.95,10626.44,10664.73,1562800000,10664.73
+2004-02-18,10706.68,10764.36,10623.62,10671.99,1382400000,10671.99
+2004-02-17,10628.88,10762.07,10628.88,10714.88,1396500000,10714.88
+2004-02-13,10696.22,10755.47,10578.66,10627.85,1329200000,10627.85
+2004-02-12,10735.18,10775.03,10636.44,10694.07,1464300000,10694.07
+2004-02-11,10605.48,10779.40,10561.55,10737.70,1699300000,10737.70
+2004-02-10,10578.74,10667.03,10511.18,10613.85,1403900000,10613.85
+2004-02-09,10592.00,10634.81,10433.70,10579.03,1303500000,10579.03
+2004-02-06,10494.89,10634.81,10433.70,10593.03,1477600000,10593.03
+2004-02-05,10469.33,10566.37,10399.92,10495.55,1566600000,10495.55
+2004-02-04,10503.11,10567.85,10394.81,10470.74,1634800000,10470.74
+2004-02-03,10499.48,10571.48,10414.15,10505.18,1476900000,10505.18
+2004-02-02,10487.78,10614.44,10395.55,10499.18,1599200000,10499.18
+2004-01-30,10510.22,10551.03,10385.56,10488.07,1635000000,10488.07
+2004-01-29,10467.41,10611.56,10369.92,10510.29,1921900000,10510.29
+2004-01-28,10610.07,10703.25,10412.44,10468.37,1842000000,10468.37
+2004-01-27,10701.10,10748.81,10579.33,10609.92,1673100000,10609.92
+2004-01-26,10568.00,10725.18,10510.44,10702.51,1480600000,10702.51
+2004-01-23,10625.25,10691.77,10490.14,10568.29,1561200000,10568.29
+2004-01-22,10624.22,10717.40,10545.03,10623.18,1693700000,10623.18
+2004-01-21,10522.77,10665.70,10453.11,10623.62,1757600000,10623.62
+2004-01-20,10601.40,10676.96,10447.92,10528.66,1698200000,10528.66
+2004-01-16,10556.37,10666.88,10503.70,10600.51,1721100000,10600.51
+2004-01-15,10534.52,10639.03,10454.52,10553.85,1695000000,10553.85
+2004-01-14,10428.67,10573.85,10426.89,10538.37,1514600000,10538.37
+2004-01-13,10485.18,10539.25,10341.19,10427.18,1595900000,10427.18
+2004-01-12,10461.55,10543.03,10389.85,10485.18,1510200000,10485.18
+2004-01-09,10589.25,10603.48,10420.52,10458.89,1720700000,10458.89
+2004-01-08,10530.07,10651.99,10480.59,10592.44,1868400000,10592.44
+2004-01-07,10535.46,10587.55,10432.00,10529.03,1704900000,10529.03
+2004-01-06,10543.85,10584.07,10454.37,10538.66,1494500000,10538.66
+2004-01-05,10411.85,10575.92,10411.85,10544.07,1578200000,10544.07
+2004-01-02,10452.74,10554.96,10367.41,10409.85,1153200000,10409.85
+2003-12-31,10426.30,10494.44,10382.89,10453.92,1027500000,10453.92
+2003-12-30,10449.70,10493.11,10374.52,10425.04,1012600000,10425.04
+2003-12-29,10321.35,10457.78,10319.70,10450.00,1058800000,10450.00
+2003-12-26,10305.85,10368.89,10282.22,10324.67,356070000,10324.67
+2003-12-24,10341.41,10365.63,10263.04,10305.19,518060000,10305.19
+2003-12-23,10337.56,10421.48,10265.71,10341.26,1145300000,10341.26
+2003-12-22,10276.48,10371.11,10216.08,10338.00,1251700000,10338.00
+2003-12-19,10249.48,10345.44,10189.63,10278.22,1657300000,10278.22
+2003-12-18,10141.41,10278.82,10117.78,10248.08,1579900000,10248.08
+2003-12-17,10128.75,10186.67,10040.08,10145.26,1441700000,10145.26
+2003-12-16,10023.34,10173.19,9986.23,10129.56,1547900000,10129.56
+2003-12-15,10046.53,10180.97,9994.38,10022.82,1520800000,10022.82
+2003-12-12,10008.75,10091.71,9946.60,10042.16,1223100000,10042.16
+2003-12-11,9922.45,10056.97,9896.16,10008.16,1441100000,10008.16
+2003-12-10,9922.38,10000.53,9848.97,9921.86,1444000000,9921.86
+2003-12-09,9966.45,10048.75,9887.57,9923.42,1465500000,9923.42
+2003-12-08,9862.01,9997.34,9824.83,9965.27,1218900000,9965.27
+2003-12-05,9923.27,9954.16,9819.05,9862.68,1265900000,9862.68
+2003-12-04,9874.83,9978.08,9814.97,9930.82,1463100000,9930.82
+2003-12-03,9851.94,9974.45,9824.31,9873.42,1441700000,9873.42
+2003-12-02,9899.64,9936.97,9798.83,9853.64,1383200000,9853.64
+2003-12-01,9785.35,9943.34,9777.64,9899.05,1375000000,9899.05
+2003-11-28,9779.72,9832.16,9733.20,9782.46,487220000,9782.46
+2003-11-26,9763.49,9838.01,9689.05,9779.57,1097700000,9779.57
+2003-11-25,9748.68,9821.94,9679.13,9763.94,1333700000,9763.94
+2003-11-24,9629.87,9788.60,9629.87,9747.79,1302800000,9747.79
+2003-11-21,9622.02,9692.53,9556.68,9628.53,1273800000,9628.53
+2003-11-20,9688.46,9756.09,9576.91,9619.42,1326700000,9619.42
+2003-11-19,9620.68,9731.94,9584.31,9690.46,1326200000,9690.46
+2003-11-18,9711.44,9792.16,9601.35,9624.16,1354300000,9624.16
+2003-11-17,9765.64,9775.35,9603.57,9710.83,1374300000,9710.83
+2003-11-14,9836.46,9919.19,9709.13,9768.68,1356100000,9768.68
+2003-11-13,9846.97,9895.71,9740.53,9837.94,1383000000,9837.94
+2003-11-12,9729.50,9882.60,9700.02,9848.83,1349300000,9848.83
+2003-11-11,9756.53,9801.21,9673.64,9737.79,1162500000,9737.79
+2003-11-10,9807.49,9861.05,9702.46,9756.53,1243600000,9756.53
+2003-11-07,9857.12,9945.71,9770.31,9809.79,1440500000,9809.79
+2003-11-06,9820.68,9888.90,9738.53,9856.97,1453900000,9856.97
+2003-11-05,9837.64,9883.86,9746.98,9820.83,1401800000,9820.83
+2003-11-04,9857.49,9905.94,9770.46,9838.83,1417600000,9838.83
+2003-11-03,9802.46,9936.31,9792.60,9858.46,1378200000,9858.46
+2003-10-31,9786.75,9880.08,9745.94,9801.12,1498900000,9801.12
+2003-10-30,9772.01,9882.97,9719.20,9786.61,1629700000,9786.61
+2003-10-29,9747.05,9830.23,9663.27,9774.53,1562600000,9774.53
+2003-10-28,9609.72,9769.57,9592.54,9748.31,1629200000,9748.31
+2003-10-27,9584.54,9696.98,9553.80,9608.16,1371800000,9608.16
+2003-10-24,9600.98,9631.50,9463.28,9582.46,1420300000,9582.46
+2003-10-23,9597.20,9661.05,9517.50,9613.13,1604300000,9613.13
+2003-10-22,9741.98,9741.98,9551.65,9598.24,1647200000,9598.24
+2003-10-21,9778.31,9824.90,9697.94,9747.64,1498000000,9747.64
+2003-10-20,9721.50,9816.97,9665.35,9777.94,1172600000,9777.94
+2003-10-17,9791.86,9833.12,9679.72,9721.79,1352000000,9721.79
+2003-10-16,9798.68,9838.53,9679.13,9791.72,1417700000,9791.72
+2003-10-15,9824.09,9901.64,9731.57,9803.05,1521100000,9803.05
+2003-10-14,9763.27,9833.42,9696.90,9812.98,1271900000,9812.98
+2003-10-13,9675.72,9814.97,9675.72,9764.38,1040500000,9764.38
+2003-10-10,9682.90,9743.12,9622.31,9674.68,1108100000,9674.68
+2003-10-09,9633.35,9798.08,9617.35,9680.01,1578700000,9680.01
+2003-10-08,9653.33,9699.35,9571.35,9630.90,1262500000,9630.90
+2003-10-07,9593.28,9672.68,9512.76,9654.61,1279500000,9654.61
+2003-10-06,9572.39,9656.09,9524.39,9594.98,1025800000,9594.98
+2003-10-03,9492.54,9701.87,9492.54,9572.31,1570500000,9572.31
+2003-10-02,9464.76,9539.20,9397.87,9487.80,1269300000,9487.80
+2003-10-01,9275.06,9472.69,9275.06,9469.20,1566300000,9469.20
+2003-09-30,9378.10,9393.35,9199.43,9275.06,1590500000,9275.06
+2003-09-29,9314.42,9431.54,9259.68,9380.24,1366500000,9380.24
+2003-09-26,9342.43,9407.89,9257.99,9313.08,1472500000,9313.08
+2003-09-25,9425.58,9493.44,9311.47,9343.96,1530000000,9343.96
+2003-09-24,9575.97,9612.53,9400.67,9425.51,1556000000,9425.51
+2003-09-23,9535.76,9623.34,9479.41,9576.04,1301700000,9576.04
+2003-09-22,9641.80,9641.87,9467.83,9535.41,1278800000,9535.41
+2003-09-19,9661.80,9719.49,9582.64,9644.82,1518600000,9644.82
+2003-09-18,9544.04,9691.55,9513.37,9659.13,1498800000,9659.13
+2003-09-17,9566.08,9641.45,9510.28,9545.65,1338210000,9545.65
+2003-09-16,9449.16,9587.90,9426.84,9567.34,1403200000,9567.34
+2003-09-15,9471.19,9541.02,9396.03,9448.81,1151300000,9448.81
+2003-09-12,9456.88,9517.37,9348.59,9471.55,1236700000,9471.55
+2003-09-11,9415.05,9540.60,9374.49,9459.76,1335900000,9459.76
+2003-09-10,9504.88,9545.51,9373.08,9420.46,1582100000,9420.46
+2003-09-09,9584.92,9617.02,9459.85,9507.20,1414800000,9507.20
+2003-09-08,9503.41,9638.57,9492.25,9586.29,1299300000,9586.29
+2003-09-05,9589.52,9602.22,9441.93,9503.34,1465200000,9503.34
+2003-09-04,9569.09,9661.80,9492.74,9587.90,1453900000,9587.90
+2003-09-03,9521.86,9632.75,9465.72,9568.46,1675600000,9568.46
+2003-09-02,9416.67,9563.83,9357.44,9523.27,1470500000,9523.27
+2003-08-29,9373.33,9444.25,9320.52,9415.82,945100000,9415.82
+2003-08-28,9334.35,9415.68,9246.48,9374.21,1165200000,9374.21
+2003-08-27,9339.82,9387.82,9280.03,9333.79,1051400000,9333.79
+2003-08-26,9316.03,9372.45,9203.54,9340.45,1178700000,9340.45
+2003-08-25,9349.44,9381.51,9242.56,9317.64,971700000,9317.64
+2003-08-22,9436.04,9535.97,9323.26,9348.87,1308900000,9348.87
+2003-08-21,9399.96,9517.37,9345.71,9423.68,1407100000,9423.68
+2003-08-20,9420.13,9454.49,9324.03,9397.51,1210800000,9397.51
+2003-08-19,9412.17,9490.60,9315.25,9428.90,1300600000,9428.90
+2003-08-18,9320.66,9466.79,9309.16,9412.45,1127600000,9412.45
+2003-08-15,9308.52,9360.27,9253.20,9321.69,636370000,9321.69
+2003-08-14,9272.25,9356.63,9193.33,9310.56,1186800000,9310.56
+2003-08-13,9303.69,9350.19,9213.43,9271.76,1208800000,9271.76
+2003-08-12,9218.12,9329.04,9163.29,9310.06,1132300000,9310.06
+2003-08-11,9189.62,9275.61,9124.00,9217.35,1022200000,9217.35
+2003-08-08,9127.36,9230.37,9097.74,9191.09,1086600000,9191.09
+2003-08-07,9060.48,9171.13,9003.63,9126.45,1389300000,9126.45
+2003-08-06,9032.96,9151.38,8964.13,9061.74,1491000000,9061.74
+2003-08-05,9185.27,9210.21,9024.77,9036.32,1351700000,9036.32
+2003-08-04,9154.18,9231.84,9033.66,9186.04,1318700000,9186.04
+2003-08-01,9232.68,9266.37,9100.12,9153.97,1390600000,9153.97
+2003-07-31,9199.35,9398.02,9183.80,9233.80,1608000000,9233.80
+2003-07-30,9204.39,9272.88,9131.70,9200.05,1391900000,9200.05
+2003-07-29,9268.19,9327.36,9135.62,9204.46,1508900000,9204.46
+2003-07-28,9284.92,9356.77,9182.96,9266.51,1328600000,9266.51
+2003-07-25,9113.85,9296.62,9062.38,9284.57,1397500000,9284.57
+2003-07-24,9196.56,9313.99,9092.98,9112.51,1559000000,9112.51
+2003-07-23,9159.08,9249.91,9064.69,9194.24,1362700000,9194.24
+2003-07-22,9098.65,9221.83,9008.60,9158.45,1439700000,9158.45
+2003-07-21,9187.80,9219.87,9025.12,9096.69,1254200000,9096.69
+2003-07-18,9052.29,9212.31,9034.36,9188.15,1365200000,9188.15
+2003-07-17,9089.34,9160.27,8968.82,9050.82,1661400000,9050.82
+2003-07-16,9133.70,9185.63,9005.23,9094.59,1662000000,9094.59
+2003-07-15,9179.18,9260.42,9054.60,9128.97,1518600000,9128.97
+2003-07-14,9126.45,9316.44,9126.45,9177.15,1448900000,9177.15
+2003-07-11,9036.39,9176.59,9009.01,9119.59,1212700000,9119.59
+2003-07-10,9154.53,9154.53,8978.13,9036.04,1465700000,9036.04
+2003-07-09,9221.90,9270.22,9077.91,9156.21,1618000000,9156.21
+2003-07-08,9213.48,9281.77,9122.24,9223.09,1565700000,9223.09
+2003-07-07,9073.92,9289.90,9073.92,9216.79,1429100000,9216.79
+2003-07-03,9141.16,9164.48,9014.06,9070.21,775900000,9070.21
+2003-07-02,9043.54,9168.82,9025.12,9142.84,1519300000,9142.84
+2003-07-01,8983.66,9068.05,8843.61,9040.95,1460200000,9040.95
+2003-06-30,8990.74,9100.12,8934.71,8985.44,1587200000,8985.44
+2003-06-27,9079.74,9135.91,8938.26,8989.05,1267800000,8989.05
+2003-06-26,9011.06,9118.82,8953.83,9079.04,1387400000,9079.04
+2003-06-25,9109.57,9195.20,8984.29,9011.53,1459200000,9011.53
+2003-06-24,9071.48,9179.25,9020.08,9109.85,1388300000,9109.85
+2003-06-23,9199.49,9215.32,9003.83,9072.95,1398100000,9072.95
+2003-06-20,9180.93,9306.36,9149.21,9200.75,1698000000,9200.75
+2003-06-19,9293.80,9346.34,9134.50,9179.53,1530100000,9179.53
+2003-06-18,9322.67,9363.15,9185.17,9293.80,1488900000,9293.80
+2003-06-17,9319.66,9406.50,9234.78,9323.02,1479700000,9323.02
+2003-06-16,9117.56,9335.49,9117.56,9318.96,1345900000,9318.96
+2003-06-13,9197.88,9234.23,9042.63,9117.12,1271600000,9117.12
+2003-06-12,9184.29,9270.64,9089.38,9196.55,1553100000,9196.55
+2003-06-11,9048.85,9202.08,9010.13,9183.22,1520000000,9183.22
+2003-06-10,8980.79,9111.11,8946.06,9054.89,1275400000,9054.89
+2003-06-09,9061.18,9109.43,8909.78,8980.00,1307000000,8980.00
+2003-06-06,9045.57,9248.71,9008.87,9062.79,1837200000,9062.79
+2003-06-05,9036.67,9106.70,8905.37,9041.30,1693100000,9041.30
+2003-06-04,8919.94,9076.94,8882.75,9038.98,1618700000,9038.98
+2003-06-03,8898.23,8973.02,8823.51,8922.95,1450200000,8922.95
+2003-06-02,8851.45,9040.46,8833.66,8897.81,1662500000,8897.81
+2003-05-30,8711.46,8897.04,8711.46,8850.26,1688800000,8850.26
+2003-05-29,8787.23,8895.99,8657.96,8711.18,1685800000,8711.18
+2003-05-28,8781.84,8885.34,8721.90,8793.12,1559000000,8793.12
+2003-05-27,8600.54,8812.30,8523.64,8781.35,1532000000,8781.35
+2003-05-23,8594.02,8668.47,8513.98,8601.38,1201000000,8601.38
+2003-05-22,8516.99,8650.33,8495.35,8594.02,1448500000,8594.02
+2003-05-21,8485.62,8577.64,8389.68,8516.43,1457800000,8516.43
+2003-05-20,8494.09,8593.61,8394.51,8491.36,1505300000,8491.36
+2003-05-19,8676.52,8676.52,8455.72,8493.39,1375700000,8493.39
+2003-05-16,8710.36,8766.36,8614.33,8678.97,1505500000,8678.97
+2003-05-15,8649.22,8766.58,8613.84,8713.14,1508700000,8713.14
+2003-05-14,8673.29,8744.94,8575.96,8647.82,1401800000,8647.82
+2003-05-13,8722.88,8757.40,8611.18,8679.25,1418100000,8679.25
+2003-05-12,8603.90,8764.12,8544.24,8726.73,1378800000,8726.73
+2003-05-09,8492.69,8637.58,8482.89,8604.60,1326100000,8604.60
+2003-05-08,8558.67,8591.01,8435.61,8491.22,1379600000,8491.22
+2003-05-07,8585.42,8650.82,8494.87,8560.63,1531900000,8560.63
+2003-05-06,8531.28,8658.18,8486.88,8588.36,1649600000,8588.36
+2003-05-05,8583.17,8643.11,8472.67,8531.57,1446300000,8531.57
+2003-05-02,8453.48,8612.86,8389.40,8582.68,1554300000,8582.68
+2003-05-01,8478.48,8519.09,8328.55,8454.25,1397500000,8454.25
+2003-04-30,8501.38,8557.62,8402.36,8480.09,1788510000,8480.09
+2003-04-29,8472.88,8578.55,8414.61,8502.99,1525600000,8502.99
+2003-04-28,8306.84,8515.80,8290.46,8471.61,1273000000,8471.61
+2003-04-25,8438.98,8453.06,8258.80,8306.35,1335800000,8306.35
+2003-04-24,8512.44,8527.99,8363.28,8440.04,1648100000,8440.04
+2003-04-23,8484.92,8587.72,8398.65,8515.66,1667200000,8515.66
+2003-04-22,8326.38,8509.43,8238.14,8484.99,1631200000,8484.99
+2003-04-21,8336.67,8423.09,8270.56,8328.90,1118700000,8328.90
+2003-04-17,8255.79,8388.28,8172.52,8337.65,1430600000,8337.65
+2003-04-16,8405.72,8459.15,8217.27,8257.61,1587600000,8257.61
+2003-04-15,8347.66,8443.11,8251.38,8402.36,1460200000,8402.36
+2003-04-14,8203.97,8375.19,8175.60,8351.10,1131000000,8351.10
+2003-04-11,8223.22,8360.76,8156.77,8203.41,1141600000,8203.41
+2003-04-10,8198.99,8274.56,8109.85,8221.33,1275300000,8221.33
+2003-04-09,8299.28,8404.25,8174.90,8197.94,1293700000,8197.94
+2003-04-08,8299.12,8382.43,8222.24,8298.92,1235400000,8298.92
+2003-04-07,8284.15,8550.40,8272.24,8300.41,1494000000,8300.41
+2003-04-04,8240.59,8348.29,8176.66,8277.15,1241200000,8277.15
+2003-04-03,8285.76,8378.76,8199.49,8240.38,1351500000,8240.38
+2003-04-02,8070.98,8342.27,8070.98,8285.06,1589800000,8285.06
+2003-04-01,7992.83,8133.03,7947.38,8069.86,1461600000,8069.86
+2003-03-31,8142.83,8142.83,7903.97,7992.13,1495500000,7992.13
+2003-03-28,8198.85,8224.83,8070.77,8145.77,1227000000,8145.77
+2003-03-27,8226.39,8272.03,8085.40,8201.45,1232900000,8201.45
+2003-03-26,8279.88,8323.01,8165.52,8229.88,1319700000,8229.88
+2003-03-25,8216.85,8355.93,8155.65,8280.23,1333400000,8280.23
+2003-03-24,8514.82,8514.82,8166.78,8214.68,1293000000,8214.68
+2003-03-21,8290.38,8552.08,8290.38,8521.97,1883710000,8521.97
+2003-03-20,8264.68,8335.20,8122.59,8286.60,1439100000,8286.60
+2003-03-19,8193.04,8304.04,8116.01,8265.45,1473400000,8265.45
+2003-03-18,8142.69,8253.48,8057.54,8194.23,1555100000,8194.23
+2003-03-17,7857.96,8163.56,7763.56,8141.92,1700420000,8141.92
+2003-03-14,7822.17,7961.60,7761.25,7859.71,1541900000,7859.71
+2003-03-13,7555.29,7847.03,7555.29,7821.75,1816300000,7821.75
+2003-03-12,7517.76,7582.96,7397.31,7552.07,1620000000,7552.07
+2003-03-11,7568.53,7673.98,7488.00,7524.06,1427700000,7524.06
+2003-03-10,7739.40,7739.40,7545.77,7568.18,1255000000,7568.18
+2003-03-07,7671.75,7780.57,7536.18,7740.03,1368500000,7740.03
+2003-03-06,7774.76,7795.07,7624.97,7673.99,1299200000,7673.99
+2003-03-05,7702.35,7801.79,7639.82,7775.60,1332700000,7775.60
+2003-03-04,7838.14,7859.08,7688.98,7704.87,1256600000,7704.87
+2003-03-03,7890.24,7997.66,7809.05,7837.86,1208900000,7837.86
+2003-02-28,7886.11,7987.80,7826.72,7891.08,1373300000,7891.08
+2003-02-27,7807.96,7950.46,7774.34,7884.99,1287800000,7884.99
+2003-02-26,7907.39,7944.93,7767.62,7806.98,1374400000,7806.98
+2003-02-25,7856.42,7931.14,7700.53,7909.50,1483700000,7909.50
+2003-02-24,8017.34,8017.34,7828.06,7858.24,1229200000,7858.24
+2003-02-21,7915.52,8055.79,7843.81,8018.11,1398200000,8018.11
+2003-02-20,8002.70,8051.37,7858.24,7914.96,1194100000,7914.96
+2003-02-19,8033.80,8079.11,7913.70,8000.60,1075600000,8000.60
+2003-02-18,7909.30,8114.82,7909.30,8041.15,1250800000,8041.15
+2003-02-14,7750.90,7936.56,7704.96,7908.80,1404600000,7908.80
+2003-02-13,7756.55,7817.88,7602.81,7749.87,1489300000,7749.87
+2003-02-12,7836.36,7892.96,7720.39,7758.17,1260500000,7758.17
+2003-02-11,7920.93,8010.89,7798.69,7843.11,1307000000,7843.11
+2003-02-10,7865.74,7963.03,7777.98,7920.11,1238200000,7920.11
+2003-02-07,7932.45,8019.46,7811.10,7864.23,1276800000,7864.23
+2003-02-06,7981.95,8031.66,7855.87,7929.30,1430900000,7929.30
+2003-02-05,8014.45,8162.96,7950.42,7985.18,1450800000,7985.18
+2003-02-04,8104.61,8104.61,7915.93,8013.29,1451600000,8013.29
+2003-02-03,8053.74,8189.35,8032.90,8109.82,1258500000,8109.82
+2003-01-31,7939.72,8121.37,7884.66,8053.81,1578530000,8053.81
+2003-01-30,8109.14,8169.81,7918.19,7945.13,1510300000,7945.13
+2003-01-29,8087.95,8173.31,7916.89,8110.71,1595400000,8110.71
+2003-01-28,7991.07,8153.36,7954.95,8088.84,1459100000,8088.84
+2003-01-27,8128.54,8167.41,7929.16,7989.56,1435900000,7989.56
+2003-01-24,8367.89,8367.89,8092.00,8131.01,1574800000,8131.01
+2003-01-23,8320.72,8437.69,8215.61,8369.47,1744550000,8369.47
+2003-01-22,8439.54,8493.50,8270.94,8318.73,1560800000,8318.73
+2003-01-21,8586.26,8650.43,8421.03,8442.90,1335200000,8442.90
+2003-01-17,8695.82,8695.82,8523.60,8586.74,1358200000,8586.74
+2003-01-16,8721.12,8837.47,8634.46,8697.87,1534600000,8697.87
+2003-01-15,8843.64,8865.65,8674.43,8723.18,1432100000,8723.18
+2003-01-14,8787.22,8865.41,8717.56,8842.62,1379400000,8842.62
+2003-01-13,8787.83,8896.09,8721.12,8785.98,1396300000,8785.98
+2003-01-10,8776.04,8846.25,8654.21,8784.89,1485400000,8784.89
+2003-01-09,8596.68,8814.09,8596.68,8776.18,1560300000,8776.18
+2003-01-08,8735.93,8749.44,8549.72,8595.31,1467600000,8595.31
+2003-01-07,8775.84,8843.37,8661.20,8740.59,1545200000,8740.59
+2003-01-06,8602.78,8826.71,8578.86,8773.57,1435900000,8773.57
+2003-01-03,8607.38,8669.91,8503.71,8601.69,1130800000,8601.69
+2003-01-02,8342.38,8633.02,8342.38,8607.52,1229200000,8607.52
+2002-12-31,8332.24,8400.46,8216.44,8341.63,1088500000,8341.63
+2002-12-30,8304.06,8405.67,8214.93,8332.85,1057800000,8332.85
+2002-12-27,8429.28,8470.05,8272.31,8303.78,758400000,8303.78
+2002-12-26,8448.86,8587.98,8392.23,8432.61,721100000,8432.61
+2002-12-24,8491.99,8522.98,8407.45,8448.11,458310000,8448.11
+2002-12-23,8511.39,8573.92,8418.90,8493.29,1112100000,8493.29
+2002-12-20,8367.41,8557.47,8367.41,8511.32,1782730000,8511.32
+2002-12-19,8441.94,8530.25,8302.41,8364.80,1385900000,8364.80
+2002-12-18,8531.31,8553.76,8367.89,8447.35,1446200000,8447.35
+2002-12-17,8626.99,8672.38,8495.21,8535.39,1251800000,8535.39
+2002-12-16,8436.59,8649.06,8421.58,8627.40,1271600000,8627.40
+2002-12-13,8536.07,8563.16,8374.68,8433.71,1330800000,8433.71
+2002-12-12,8590.99,8662.71,8466.21,8538.40,1255300000,8538.40
+2002-12-11,8571.52,8669.91,8452.84,8589.14,1285100000,8589.14
+2002-12-10,8473.61,8624.93,8419.86,8574.26,1286600000,8574.26
+2002-12-09,8643.99,8643.99,8438.24,8473.41,1320800000,8473.41
+2002-12-06,8620.88,8707.21,8469.16,8645.77,1241100000,8645.77
+2002-12-05,8740.66,8796.68,8572.00,8623.28,1250200000,8623.28
+2002-12-04,8734.22,8834.04,8600.93,8737.85,1588900000,8737.85
+2002-12-03,8861.13,8882.04,8649.89,8742.93,1488400000,8742.93
+2002-12-02,8902.95,9076.35,8757.60,8862.57,1612000000,8862.57
+2002-11-29,8933.67,8995.78,8847.42,8896.09,643460000,8896.09
+2002-11-27,8678.96,8975.08,8678.96,8931.68,1350300000,8931.68
+2002-11-26,8844.12,8845.01,8634.53,8676.42,1543600000,8676.42
+2002-11-25,8804.97,8918.03,8717.63,8849.40,1574000000,8849.40
+2002-11-22,8842.41,8944.16,8732.23,8804.84,1626800000,8804.84
+2002-11-21,8625.48,8910.83,8619.58,8845.15,2415100000,8845.15
+2002-11-20,8469.57,8675.12,8402.72,8623.01,1517300000,8623.01
+2002-11-19,8484.93,8566.45,8355.62,8474.78,1337400000,8474.78
+2002-11-18,8579.74,8671.41,8444.26,8486.57,1282600000,8486.57
+2002-11-15,8535.64,8622.30,8421.10,8579.09,1400100000,8579.09
+2002-11-14,8403.69,8596.50,8396.27,8542.13,1488100000,8542.13
+2002-11-13,8380.32,8523.47,8237.65,8398.49,1463400000,8398.49
+2002-11-12,8356.73,8557.25,8286.13,8386.00,1377100000,8386.00
+2002-11-11,8535.81,8541.09,8315.40,8358.95,1113000000,8358.95
+2002-11-08,8585.75,8688.96,8455.01,8537.13,1446500000,8537.13
+2002-11-07,8766.08,8766.08,8517.78,8586.24,1466900000,8586.24
+2002-11-06,8677.17,8841.61,8561.48,8771.01,1623700000,8771.01
+2002-11-05,8568.76,8730.92,8497.60,8678.27,1354100000,8678.27
+2002-11-04,8521.60,8787.30,8510.08,8571.60,1645900000,8571.60
+2002-11-01,8395.64,8569.24,8271.77,8517.64,1450400000,8517.64
+2002-10-31,8427.34,8538.17,8293.17,8397.03,1641300000,8397.03
+2002-10-30,8363.95,8502.32,8273.99,8427.41,1422300000,8427.41
+2002-10-29,8367.28,8456.19,8161.01,8368.94,1529700000,8368.94
+2002-10-28,8448.98,8601.01,8281.34,8368.04,1382600000,8368.04
+2002-10-25,8317.48,8474.92,8210.74,8443.99,1340400000,8443.99
+2002-10-24,8495.38,8607.04,8253.60,8317.34,1700570000,8317.34
+2002-10-23,8448.56,8546.57,8256.79,8494.27,1593900000,8494.27
+2002-10-22,8534.08,8543.65,8303.33,8450.16,1549200000,8450.16
+2002-10-21,8320.74,8580.13,8191.87,8538.24,1447000000,8538.24
+2002-10-18,8287.72,8383.16,8115.72,8322.40,1423100000,8322.40
+2002-10-17,8038.31,8395.99,8038.31,8275.04,1780390000,8275.04
+2002-10-16,8232.10,8232.10,7958.34,8036.03,1585000000,8036.03
+2002-10-15,7883.23,8304.58,7883.23,8255.68,1956000000,8255.68
+2002-10-14,7848.21,7948.91,7725.23,7877.40,1200300000,7877.40
+2002-10-11,7540.74,7919.57,7540.74,7850.29,1854130000,7850.29
+2002-10-10,7286.34,7588.25,7181.47,7533.95,2090230000,7533.95
+2002-10-09,7499.96,7500.03,7215.39,7286.27,1885030000,7286.27
+2002-10-08,7425.82,7680.57,7294.53,7501.49,1938430000,7501.49
+2002-10-07,7528.68,7685.42,7368.46,7422.84,1576500000,7422.84
+2002-10-04,7719.34,7817.06,7428.32,7528.40,1835930000,7528.40
+2002-10-03,7753.46,7943.64,7638.47,7717.19,1674500000,7717.19
+2002-10-02,7936.57,7996.77,7696.66,7755.61,1668900000,7755.61
+2002-10-01,7593.04,7964.24,7558.36,7938.79,1780900000,7938.79
+2002-09-30,7698.81,7729.53,7422.28,7591.93,1721870000,7591.93
+2002-09-27,7996.01,7997.12,7664.89,7701.45,1507300000,7701.45
+2002-09-26,7844.62,8086.86,7800.97,7997.12,1650000000,7997.12
+2002-09-25,7687.16,7939.90,7641.87,7841.82,1651500000,7841.82
+2002-09-24,7871.23,7893.36,7606.77,7683.13,1670240000,7683.13
+2002-09-23,7984.77,7984.77,7738.06,7872.15,1381100000,7872.15
+2002-09-20,7945.93,8081.04,7868.60,7986.02,1792800000,7986.02
+2002-09-19,8170.65,8170.65,7904.87,7942.39,1524000000,7942.39
+2002-09-18,8203.07,8283.49,8013.42,8172.45,1501000000,8172.45
+2002-09-17,8386.35,8508.61,8169.88,8207.55,1448600000,8207.55
+2002-09-16,8311.79,8435.04,8214.27,8380.18,1001400000,8380.18
+2002-09-13,8377.68,8414.79,8175.85,8312.69,1271000000,8312.69
+2002-09-12,8574.94,8574.94,8334.82,8379.41,1191600000,8379.41
+2002-09-11,8604.27,8767.82,8545.11,8581.17,846600000,8581.17
+2002-09-10,8520.14,8660.94,8447.73,8602.61,1186400000,8602.61
+2002-09-09,8425.88,8584.30,8288.28,8519.38,1130600000,8519.38
+2002-09-06,8296.46,8526.80,8296.46,8427.20,1184500000,8427.20
+2002-09-05,8420.20,8420.20,8173.56,8283.70,1401300000,8283.70
+2002-09-04,8308.53,8495.03,8216.98,8425.12,1372100000,8425.12
+2002-09-03,8659.27,8659.27,8282.87,8308.05,1323400000,8308.05
+2002-08-30,8669.26,8811.72,8572.85,8663.50,929900000,8663.50
+2002-08-29,8690.69,8769.34,8514.10,8670.99,1271100000,8670.99
+2002-08-28,8823.93,8832.18,8610.79,8694.09,1146600000,8694.09
+2002-08-27,8917.49,9040.04,8747.77,8824.41,1307700000,8824.41
+2002-08-26,8873.93,8981.23,8723.43,8919.01,1016900000,8919.01
+2002-08-23,9051.49,9051.49,8806.38,8872.96,1071500000,8872.96
+2002-08-22,8961.18,9129.10,8860.34,9053.64,1373000000,9053.64
+2002-08-21,8866.14,9033.52,8768.51,8957.23,1353100000,8957.23
+2002-08-20,8986.50,8989.69,8789.13,8872.07,1308500000,8872.07
+2002-08-19,8777.09,9037.38,8720.81,8990.79,1299800000,8990.79
+2002-08-16,8813.07,8899.42,8644.59,8778.06,1265300000,8778.06
+2002-08-15,8745.04,8914.37,8620.98,8818.14,1505100000,8818.14
+2002-08-14,8479.14,8778.89,8295.34,8743.31,1533800000,8743.31
+2002-08-13,8683.15,8801.87,8445.91,8482.39,1297700000,8482.39
+2002-08-12,8741.92,8753.14,8528.15,8688.89,1036500000,8688.89
+2002-08-09,8707.24,8824.92,8538.46,8745.45,1294900000,8745.45
+2002-08-08,8456.29,8755.70,8364.29,8712.02,1646700000,8712.02
+2002-08-07,8282.25,8520.95,8171.70,8456.15,1490400000,8456.15
+2002-08-06,8049.93,8472.28,8049.93,8274.09,1514100000,8274.09
+2002-08-05,8312.92,8371.00,7991.43,8043.63,1425500000,8043.63
+2002-08-02,8504.96,8566.36,8179.80,8313.13,1538100000,8313.13
+2002-08-01,8732.58,8758.40,8430.68,8506.62,1672200000,8506.62
+2002-07-31,8678.65,8793.36,8463.21,8736.59,2049360000,8736.59
+2002-07-30,8707.03,8806.86,8484.05,8680.03,1826090000,8680.03
+2002-07-29,8267.99,8749.12,8267.99,8711.88,1778650000,8711.88
+2002-07-26,8192.61,8350.10,8039.89,8264.39,1796100000,8264.39
+2002-07-25,8185.89,8390.39,7893.34,8186.31,2424700000,8186.31
+2002-07-24,7698.46,8243.07,7489.53,8191.29,2775560000,8191.29
+2002-07-23,7785.55,8007.91,7590.75,7702.34,2441020000,7702.34
+2002-07-22,8015.04,8173.08,7668.35,7784.58,2248060000,7784.58
+2002-07-19,8356.74,8356.74,7940.83,8019.26,2654100000,8019.26
+2002-07-18,8540.47,8683.84,8350.72,8409.49,1736300000,8409.49
+2002-07-17,8476.21,8765.39,8401.12,8542.48,2566500000,8542.48
+2002-07-16,8635.31,8697.69,8346.29,8473.11,1843700000,8473.11
+2002-07-15,8681.28,8720.18,8220.78,8639.19,2574800000,8639.19
+2002-07-12,8805.33,8903.00,8555.15,8684.53,1607400000,8684.53
+2002-07-11,8812.12,8937.87,8557.84,8801.53,2080480000,8801.53
+2002-07-10,9098.16,9188.71,8772.94,8813.50,1816900000,8813.50
+2002-07-09,9273.38,9357.35,9065.88,9096.09,1348900000,9096.09
+2002-07-08,9375.70,9433.08,9184.90,9274.90,1184400000,9274.90
+2002-07-05,9061.54,9399.65,9054.97,9379.50,699400000,9379.50
+2002-07-03,9006.37,9140.32,8832.89,9054.97,1527800000,9054.97
+2002-07-02,9104.95,9185.88,8918.11,9007.75,1823000000,9007.75
+2002-07-01,9239.25,9381.37,9059.88,9109.79,1425500000,9109.79
+2002-06-28,9270.33,9435.44,9131.49,9243.26,2117000000,9243.26
+2002-06-27,9122.12,9342.33,8992.32,9269.92,1908600000,9269.92
+2002-06-26,9108.22,9207.07,8831.92,9120.11,336570000,9120.11
+2002-06-25,9285.56,9457.38,9089.17,9126.82,1513700000,9126.82
+2002-06-24,9252.47,9417.23,9046.04,9281.82,1552600000,9281.82
+2002-06-21,9430.66,9456.76,9186.71,9253.79,1497200000,9253.79
+2002-06-20,9561.64,9628.11,9390.10,9431.77,1389700000,9431.77
+2002-06-19,9702.00,9760.20,9514.29,9561.57,1336100000,9561.57
+2002-06-18,9684.52,9775.83,9588.29,9706.12,1193100000,9706.12
+2002-06-17,9476.50,9736.58,9462.30,9687.42,1236600000,9687.42
+2002-06-14,9498.92,9538.93,9229.63,9474.21,1549000000,9474.21
+2002-06-13,9612.87,9671.64,9454.41,9502.80,1405500000,9502.80
+2002-06-12,9515.12,9682.37,9380.82,9617.71,1795720000,9617.71
+2002-06-11,9647.62,9794.17,9487.91,9517.26,1212400000,9517.26
+2002-06-10,9587.38,9744.33,9509.91,9645.40,1226200000,9645.40
+2002-06-07,9592.38,9668.18,9416.33,9589.67,1341300000,9589.67
+2002-06-06,9795.70,9820.41,9552.85,9624.64,1601500000,9624.64
+2002-06-05,9688.53,9860.91,9636.82,9796.80,1300100000,9796.80
+2002-06-04,9710.34,9798.74,9541.36,9687.84,1466600000,9687.84
+2002-06-03,9923.94,10016.04,9685.49,9709.79,1324300000,9709.79
+2002-05-31,9915.15,10074.16,9865.89,9925.25,1277300000,9925.25
+2002-05-30,9915.01,9995.76,9769.64,9911.69,1286600000,9911.69
+2002-05-29,9976.94,10056.31,9860.42,9923.04,1081800000,9923.04
+2002-05-28,10106.54,10144.53,9917.64,9981.58,996500000,9981.58
+2002-05-24,10211.92,10255.93,10054.58,10104.26,885400000,10104.26
+2002-05-23,10158.30,10268.87,10044.20,10216.08,1192900000,10216.08
+2002-05-22,10098.58,10200.78,10004.41,10157.88,1136300000,10157.88
+2002-05-21,10229.08,10322.15,10060.46,10105.71,1169200000,10105.71
+2002-05-20,10348.93,10357.44,10164.39,10229.50,989800000,10229.50
+2002-05-17,10291.05,10400.62,10209.49,10353.08,1274400000,10353.08
+2002-05-16,10242.11,10374.05,10168.64,10289.21,1256600000,10289.21
+2002-05-15,10288.56,10382.97,10152.97,10243.68,1420200000,10243.68
+2002-05-14,10119.34,10346.59,10119.34,10298.14,1414500000,10298.14
+2002-05-13,9938.82,10148.71,9892.73,10109.66,1088600000,10109.66
+2002-05-10,10040.25,10115.23,9891.04,9939.92,1171900000,9939.92
+2002-05-09,10137.96,10185.08,9966.63,10037.42,1153000000,10037.42
+2002-05-08,9847.96,10203.76,9847.96,10141.83,1502000000,10141.83
+2002-05-07,9810.53,9985.32,9749.73,9836.55,1354700000,9836.55
+2002-05-06,10005.80,10081.98,9780.29,9808.04,1122600000,9808.04
+2002-05-03,10091.73,10130.97,9891.49,10006.63,1284500000,10006.63
+2002-05-02,10057.62,10182.94,9970.92,10091.87,1364000000,10091.87
+2002-05-01,9944.90,10121.21,9778.42,10059.63,1451400000,10059.63
+2002-04-30,9818.90,10063.64,9775.10,9946.22,1628600000,9946.22
+2002-04-29,9910.52,10012.16,9767.15,9819.87,1314700000,9819.87
+2002-04-26,10037.42,10127.85,9875.44,9910.72,1374200000,9910.72
+2002-04-25,10028.70,10103.64,9864.08,10035.06,1517400000,10035.06
+2002-04-24,10090.07,10209.64,9984.00,10030.43,1373200000,10030.43
+2002-04-23,10137.20,10243.06,10003.84,10089.24,1388500000,10089.24
+2002-04-22,10256.00,10299.39,10056.45,10136.43,1181800000,10136.43
+2002-04-19,10212.69,10338.83,10151.52,10257.11,1185000000,10257.11
+2002-04-18,10219.47,10334.67,10010.22,10205.28,1359300000,10205.28
+2002-04-17,10299.66,10379.51,10137.47,10220.78,1376900000,10220.78
+2002-04-16,10100.38,10365.12,10100.38,10301.32,1341300000,10301.32
+2002-04-15,10189.57,10261.05,10037.90,10093.67,1120400000,10093.67
+2002-04-12,10178.57,10312.26,10083.92,10190.82,1282100000,10190.82
+2002-04-11,10378.89,10425.87,10116.37,10176.08,1505600000,10176.08
+2002-04-10,10210.40,10437.43,10175.18,10381.73,1447900000,10381.73
+2002-04-09,10249.84,10362.98,10156.57,10208.67,1235400000,10208.67
+2002-04-08,10258.91,10300.78,10049.94,10249.08,1095300000,10249.08
+2002-04-05,10235.80,10403.66,10169.79,10271.64,1110200000,10271.64
+2002-04-04,10199.54,10301.53,10118.10,10235.17,1283800000,10235.17
+2002-04-03,10311.81,10377.09,10116.02,10198.29,1219700000,10198.29
+2002-04-02,10352.46,10394.94,10204.66,10313.71,1176700000,10313.71
+2002-04-01,10402.07,10434.52,10226.59,10362.70,1050900000,10362.70
+2002-03-28,10429.68,10537.48,10341.59,10403.94,1147600000,10403.94
+2002-03-27,10351.28,10490.15,10300.29,10426.91,1180100000,10426.91
+2002-03-26,10280.51,10475.00,10233.65,10353.36,1223600000,10353.36
+2002-03-25,10428.43,10497.76,10255.59,10281.67,1057900000,10281.67
+2002-03-22,10477.70,10537.62,10324.23,10427.67,1243300000,10427.67
+2002-03-21,10501.99,10577.82,10326.99,10479.84,1339200000,10479.84
+2002-03-20,10626.85,10634.84,10455.56,10501.57,1304900000,10501.57
+2002-03-19,10578.38,10722.78,10530.63,10635.25,1255000000,10635.25
+2002-03-18,10608.54,10707.01,10488.84,10577.75,1169500000,10577.75
+2002-03-15,10516.45,10663.69,10452.10,10607.23,1493900000,10607.23
+2002-03-14,10501.29,10615.74,10421.17,10517.14,1208800000,10517.14
+2002-03-13,10620.17,10648.68,10427.67,10501.85,1354000000,10501.85
+2002-03-12,10604.32,10682.72,10462.34,10632.35,1304400000,10632.35
+2002-03-11,10570.07,10679.68,10470.85,10611.24,1210200000,10611.24
+2002-03-08,10531.67,10728.87,10480.33,10572.49,1412000000,10572.49
+2002-03-07,10578.10,10663.82,10405.95,10525.37,1517400000,10525.37
+2002-03-06,10431.96,10637.19,10393.84,10574.29,1541300000,10574.29
+2002-03-05,10591.38,10639.96,10349.90,10433.41,1549300000,10433.41
+2002-03-04,10368.10,10656.50,10313.01,10586.82,1594300000,10586.82
+2002-03-01,10111.04,10397.09,10086.51,10368.86,1456500000,10368.86
+2002-02-28,10130.28,10283.89,10055.34,10106.13,1392200000,10106.13
+2002-02-27,10117.65,10315.72,10025.86,10127.58,1393800000,10127.58
+2002-02-26,10145.86,10241.89,9986.84,10115.26,1309200000,10115.26
+2002-02-25,9969.75,10204.04,9934.94,10145.71,1367400000,10145.71
+2002-02-22,9834.89,10032.45,9726.67,9968.15,1411000000,9968.15
+2002-02-21,9933.56,10072.98,9788.11,9834.68,1381600000,9834.68
+2002-02-20,9742.37,9990.78,9674.91,9941.17,1438900000,9941.17
+2002-02-19,9899.24,9923.39,9704.03,9745.14,1189900000,9745.14
+2002-02-15,10000.83,10065.37,9843.54,9903.04,1359200000,9903.04
+2002-02-14,9989.67,10092.29,9905.95,10001.99,1272500000,10001.99
+2002-02-13,9856.99,10056.24,9839.18,9989.67,1215900000,9989.67
+2002-02-12,9880.35,9943.24,9766.18,9863.74,1094200000,9863.74
+2002-02-11,9739.81,9933.07,9668.34,9884.78,1159400000,9884.78
+2002-02-08,9627.65,9795.38,9503.52,9744.24,1371900000,9744.24
+2002-02-07,9650.97,9799.67,9562.12,9625.44,1441600000,9625.44
+2002-02-06,9682.04,9801.33,9558.18,9653.39,1665800000,9653.39
+2002-02-05,9684.74,9842.77,9553.96,9685.43,1778300000,9685.43
+2002-02-04,9905.46,9940.96,9648.55,9687.09,1437600000,9687.09
+2002-02-01,9923.04,10022.82,9795.45,9907.26,1367200000,9907.26
+2002-01-31,9763.20,9963.79,9701.76,9920.00,1557000000,9920.00
+2002-01-30,9619.14,9821.81,9443.32,9762.86,2019600000,9762.86
+2002-01-29,9865.54,9952.59,9576.65,9618.24,1812000000,9618.24
+2002-01-28,9843.05,9959.44,9746.66,9865.75,1186800000,9865.75
+2002-01-25,9793.23,9949.54,9697.47,9840.08,1345100000,9840.08
+2002-01-24,9734.21,9926.71,9670.99,9796.07,1552800000,9796.07
+2002-01-23,9710.96,9853.64,9588.49,9730.96,1479200000,9730.96
+2002-01-22,9772.34,9905.26,9652.01,9713.80,1311600000,9713.80
+2002-01-18,9830.94,9873.98,9673.11,9771.85,1333300000,9771.85
+2002-01-17,9712.21,9910.11,9684.39,9850.04,1380100000,9850.04
+2002-01-16,9916.54,9923.32,9661.00,9712.27,1482500000,9712.27
+2002-01-15,9892.73,10038.94,9805.33,9924.15,1386900000,9924.15
+2002-01-14,9985.38,10038.87,9831.98,9891.42,1286400000,9891.42
+2002-01-11,10069.52,10163.77,9938.12,9987.53,1211900000,9987.53
+2002-01-10,10092.50,10174.91,9956.67,10067.86,1299000000,10067.86
+2002-01-09,10153.18,10311.98,10049.25,10094.09,1452000000,10094.09
+2002-01-08,10195.76,10270.53,10063.43,10150.55,1258800000,10150.55
+2002-01-07,10261.33,10345.40,10137.61,10197.05,1308300000,10197.05
+2002-01-04,10176.84,10341.87,10132.14,10259.74,1513000000,10259.74
+2002-01-03,10073.88,10227.36,10002.54,10172.14,1398900000,10172.14
+2002-01-02,10021.71,10125.85,9889.69,10073.40,1171000000,10073.40
+2001-12-31,10136.36,10178.71,10002.96,10021.57,943600000,10021.57
+2001-12-28,10133.94,10220.78,10067.17,10136.99,917400000,10136.99
+2001-12-27,10088.71,10187.71,10036.10,10131.31,876300000,10131.31
+2001-12-26,10035.55,10203.28,10014.10,10088.14,791100000,10088.14
+2001-12-24,10036.59,10114.91,9987.39,10035.34,439670000,10035.34
+2001-12-21,9986.84,10148.13,9935.70,10035.34,1694000000,10035.34
+2001-12-20,10064.13,10141.21,9912.76,9985.18,1490500000,9985.18
+2001-12-19,9994.59,10142.95,9876.96,10070.49,1484900000,10070.49
+2001-12-18,9893.22,10066.27,9876.19,9998.39,1354000000,9998.39
+2001-12-17,9809.42,9996.25,9747.77,9891.97,1260400000,9891.97
+2001-12-14,9764.72,9888.44,9661.14,9811.15,1306800000,9811.15
+2001-12-13,9889.13,9927.95,9691.30,9766.45,1511500000,9766.45
+2001-12-12,9887.27,9985.59,9745.42,9894.81,1449700000,9894.81
+2001-12-11,9925.60,10063.98,9794.48,9888.37,1367200000,9888.37
+2001-12-10,10047.04,10123.78,9868.03,9921.45,1218700000,9921.45
+2001-12-07,10099.14,10160.24,9938.54,10049.46,1248200000,10049.46
+2001-12-06,10113.53,10220.23,9997.98,10099.14,1487900000,10099.14
+2001-12-05,9891.35,10195.04,9875.92,10114.29,1765300000,10114.29
+2001-12-04,9765.55,9937.29,9700.24,9893.84,1318500000,9893.84
+2001-12-03,9848.93,9861.94,9651.87,9763.96,1202900000,9763.96
+2001-11-30,9828.80,9945.80,9752.26,9851.56,1343600000,9851.56
+2001-11-29,9710.34,9873.29,9629.72,9829.42,1375700000,9829.42
+2001-11-28,9867.06,9889.13,9662.80,9711.86,1423700000,9711.86
+2001-11-27,9980.33,10021.48,9776.07,9872.60,1288000000,9872.60
+2001-11-26,9961.58,10054.58,9862.22,9982.75,1129800000,9982.75
+2001-11-23,9833.09,9983.24,9804.37,9959.71,410300000,9959.71
+2001-11-21,9894.19,9932.31,9746.45,9834.68,1029300000,9834.68
+2001-11-20,9968.64,10023.37,9825.06,9901.38,1330200000,9901.38
+2001-11-19,9870.45,10040.46,9826.96,9976.46,1316800000,9976.46
+2001-11-16,9871.51,9967.94,9754.07,9866.99,1337400000,9866.99
+2001-11-15,9824.65,9967.46,9745.43,9872.39,1454500000,9872.39
+2001-11-14,9751.13,9943.18,9683.97,9823.61,1443400000,9823.61
+2001-11-13,9551.43,9811.29,9551.43,9750.95,1370100000,9750.95
+2001-11-12,9606.13,9642.25,9347.76,9554.37,991600000,9554.37
+2001-11-09,9586.96,9692.35,9478.75,9608.00,1093800000,9608.00
+2001-11-08,9558.39,9765.00,9506.91,9587.52,1517500000,9587.52
+2001-11-07,9584.68,9695.67,9457.99,9554.37,1411300000,9554.37
+2001-11-06,9437.09,9627.44,9315.79,9591.12,1356000000,9591.12
+2001-11-05,9326.59,9534.58,9326.59,9441.03,1267700000,9441.03
+2001-11-02,9264.52,9406.93,9152.91,9323.54,1121900000,9323.54
+2001-11-01,9087.45,9320.77,8987.61,9263.90,1317400000,9263.90
+2001-10-31,9123.64,9281.68,9018.26,9075.14,1352500000,9075.14
+2001-10-30,9264.52,9265.34,9011.96,9121.98,1297400000,9121.98
+2001-10-29,9543.37,9543.37,9232.83,9269.50,1106100000,9269.50
+2001-10-26,9462.28,9626.54,9369.35,9545.17,1244500000,9545.17
+2001-10-25,9342.29,9491.48,9143.09,9462.90,1364400000,9462.90
+2001-10-24,9341.40,9456.40,9218.29,9345.62,1336200000,9345.62
+2001-10-23,9379.17,9499.78,9249.02,9340.08,1317300000,9340.08
+2001-10-22,9203.91,9438.75,9101.08,9377.03,1105700000,9377.03
+2001-10-19,9162.81,9278.36,9027.74,9204.11,1294900000,9204.11
+2001-10-18,9230.75,9310.33,9061.02,9163.22,1262900000,9163.22
+2001-10-17,9389.76,9539.22,9199.89,9232.97,1452200000,9232.97
+2001-10-16,9346.31,9479.37,9239.68,9384.23,1210500000,9384.23
+2001-10-15,9340.84,9417.51,9181.07,9347.62,1024700000,9347.62
+2001-10-12,9409.07,9426.30,9146.34,9344.16,1331400000,9344.16
+2001-10-11,9242.63,9522.61,9204.04,9410.45,1704580000,9410.45
+2001-10-10,9052.30,9305.97,8975.15,9240.86,1312400000,9240.86
+2001-10-09,9066.56,9168.42,8927.34,9052.44,1227800000,9052.44
+2001-10-08,9115.75,9187.85,8937.86,9067.94,979000000,9067.94
+2001-10-05,9058.83,9208.41,8894.47,9119.77,1301700000,9119.77
+2001-10-04,9127.24,9259.61,8982.28,9060.88,1609100000,9060.88
+2001-10-03,8946.02,9193.32,8800.99,9123.78,1650600000,9123.78
+2001-10-02,8836.69,9001.03,8737.61,8950.59,1289800000,8950.59
+2001-10-01,8845.97,8931.70,8659.90,8836.83,1175600000,8836.83
+2001-09-28,8679.07,8945.68,8633.75,8847.56,1727400000,8847.56
+2001-09-27,8567.46,8757.47,8398.14,8681.42,1467000000,8681.42
+2001-09-26,8660.06,8766.81,8457.37,8567.39,1519100000,8567.39
+2001-09-25,8605.59,8778.23,8435.56,8659.97,1613800000,8659.97
+2001-09-24,8242.32,8733.39,8242.32,8603.86,1746600000,8603.86
+2001-09-21,8356.56,8484.22,7926.93,8235.81,2317300000,8235.81
+2001-09-20,8375.72,8711.38,8304.45,8376.21,2004800000,8376.21
+2001-09-19,8903.54,8990.37,8453.01,8759.13,2120550000,8759.13
+2001-09-18,8922.70,9126.89,8743.91,8903.40,1650410000,8903.40
+2001-09-17,9294.55,9294.55,8755.46,8920.70,2330830000,8920.70
+2001-09-10,9603.36,9740.44,9431.07,9605.51,1276600000,9605.51
+2001-09-07,9841.25,9842.08,9507.04,9605.85,1424300000,9605.85
+2001-09-06,10028.35,10053.73,9762.03,9840.84,1359700000,9840.84
+2001-09-05,9998.12,10140.79,9820.98,10033.27,1384500000,10033.27
+2001-09-04,9946.98,10238.50,9858.34,9997.49,1178300000,9997.49
+2001-08-31,9918.96,10072.22,9846.72,9949.75,920100000,9949.75
+2001-08-30,10077.07,10149.10,9829.35,9919.58,1157000000,9919.58
+2001-08-29,10224.45,10292.60,10030.43,10090.90,963700000,10090.90
+2001-08-28,10382.56,10405.88,10175.60,10222.03,987100000,10222.03
+2001-08-27,10422.76,10498.03,10334.88,10382.35,842600000,10382.35
+2001-08-24,10232.48,10487.52,10190.34,10423.17,1043600000,10423.17
+2001-08-23,10276.41,10357.09,10142.66,10229.15,986200000,10229.15
+2001-08-22,10170.30,10340.76,10099.07,10276.90,1110800000,10276.90
+2001-08-21,10320.07,10436.39,10132.92,10174.14,1041600000,10174.14
+2001-08-20,10239.33,10388.23,10146.05,10320.07,897100000,10320.07
+2001-08-17,10385.46,10418.68,10143.49,10240.78,974300000,10240.78
+2001-08-16,10342.10,10460.82,10198.15,10392.52,1055400000,10392.52
+2001-08-15,10407.05,10530.36,10289.01,10345.95,1065600000,10345.95
+2001-08-14,10416.95,10513.68,10333.29,10412.17,964600000,10412.17
+2001-08-13,10411.90,10504.82,10314.95,10415.91,837600000,10415.91
+2001-08-10,10296.89,10473.34,10164.67,10416.25,960900000,10416.25
+2001-08-09,10291.15,10361.52,10160.51,10298.56,1104200000,10298.56
+2001-08-08,10456.18,10509.80,10245.68,10293.50,1124600000,10293.50
+2001-08-07,10399.03,10520.11,10324.50,10458.74,1012000000,10458.74
+2001-08-06,10504.13,10549.59,10337.23,10401.31,811700000,10401.31
+2001-08-03,10550.01,10592.98,10381.10,10512.78,939900000,10512.78
+2001-08-02,10513.47,10663.07,10454.53,10551.18,1218300000,10551.18
+2001-08-01,10527.38,10659.33,10423.31,10510.01,1340300000,10510.01
+2001-07-31,10403.18,10639.40,10364.84,10522.81,1129200000,10522.81
+2001-07-30,10418.68,10513.26,10301.05,10401.72,909100000,10401.72
+2001-07-27,10451.89,10516.38,10316.27,10416.67,1015300000,10416.67
+2001-07-26,10403.46,10498.73,10237.46,10455.63,1213900000,10455.63
+2001-07-25,10241.75,10466.28,10159.34,10405.67,1280700000,10405.67
+2001-07-24,10423.80,10469.40,10170.82,10241.12,1198700000,10241.12
+2001-07-23,10576.92,10644.73,10374.81,10424.42,986900000,10424.42
+2001-07-20,10606.19,10668.33,10456.25,10576.65,1170900000,10576.65
+2001-07-19,10574.33,10758.14,10480.54,10610.00,1343500000,10610.00
+2001-07-18,10594.54,10676.83,10374.55,10569.83,1316300000,10569.83
+2001-07-17,10468.62,10683.76,10363.51,10606.39,1238100000,10606.39
+2001-07-16,10537.98,10649.02,10374.55,10472.12,1039800000,10472.12
+2001-07-13,10478.39,10615.42,10374.01,10539.06,1121700000,10539.06
+2001-07-12,10269.31,10542.02,10249.58,10478.99,1394000000,10478.99
+2001-07-11,10174.70,10355.83,10049.38,10241.02,1384100000,10241.02
+2001-07-10,10300.82,10406.87,10104.06,10175.64,1263800000,10175.64
+2001-07-09,10253.62,10389.91,10166.55,10299.40,1045700000,10299.40
+2001-07-06,10476.73,10483.82,10176.26,10252.68,1056700000,10252.68
+2001-07-05,10566.23,10617.47,10403.57,10479.86,934900000,10479.86
+2001-07-03,10588.89,10648.00,10479.99,10571.11,622110000,10571.11
+2001-07-02,10504.95,10707.24,10397.20,10593.72,1128300000,10593.72
+2001-06-29,10565.27,10729.18,10374.32,10502.40,1832360000,10502.40
+2001-06-28,10438.73,10736.43,10429.74,10566.21,1327300000,10566.21
+2001-06-27,10470.35,10608.48,10351.10,10434.84,1162100000,10434.84
+2001-06-26,10497.30,10600.90,10313.40,10472.48,1198900000,10472.48
+2001-06-25,10607.88,10711.19,10417.93,10504.22,1050100000,10504.22
+2001-06-22,10716.50,10753.27,10513.61,10604.59,1189200000,10604.59
+2001-06-21,10646.39,10848.47,10512.67,10715.43,1546820000,10715.43
+2001-06-20,10593.79,10770.88,10480.20,10647.33,1350100000,10647.33
+2001-06-19,10654.30,10793.46,10514.74,10596.67,1184900000,10596.67
+2001-06-18,10622.50,10781.45,10531.78,10645.38,1111600000,10645.38
+2001-06-15,10690.13,10792.25,10495.69,10623.64,1635550000,10623.64
+2001-06-14,10868.27,10874.91,10604.45,10690.13,1242900000,10690.13
+2001-06-13,10942.00,11065.92,10817.21,10871.62,1063600000,10871.62
+2001-06-12,10914.67,11009.93,10744.99,10948.38,1136500000,10948.38
+2001-06-11,10974.79,11038.56,10819.29,10922.09,870100000,10922.09
+2001-06-08,11095.62,11096.46,10882.92,10977.00,726200000,10977.00
+2001-06-07,11069.58,11169.34,10940.11,11090.74,1089600000,11090.74
+2001-06-06,11177.73,11236.68,10998.48,11070.24,1061900000,11070.24
+2001-06-05,11061.39,11234.98,10973.10,11175.84,1116800000,11175.84
+2001-06-04,10991.77,11125.99,10898.80,11061.52,836500000,11061.52
+2001-06-01,10913.57,11063.61,10793.46,10990.41,1015000000,10990.41
+2001-05-31,10873.23,11023.25,10798.53,10911.94,1226600000,10911.94
+2001-05-30,11032.96,11089.89,10819.74,10872.64,1158600000,10872.64
+2001-05-29,11004.66,11162.96,10913.44,11039.14,1026000000,11039.14
+2001-05-25,11122.03,11166.92,10949.01,11005.37,828100000,11005.37
+2001-05-24,11107.07,11248.19,10977.20,11122.42,1100700000,11122.42
+2001-05-23,11257.76,11308.44,11033.16,11105.51,1134800000,11105.51
+2001-05-22,11339.80,11411.63,11162.83,11257.24,1260400000,11257.24
+2001-05-21,11299.14,11436.42,11149.82,11337.92,1174900000,11337.92
+2001-05-18,11245.78,11374.87,11123.01,11301.74,1130800000,11301.74
+2001-05-17,11218.65,11413.46,11104.34,11248.58,1355600000,11248.58
+2001-05-16,10864.74,11258.21,10779.66,11215.92,1405300000,11215.92
+2001-05-15,10877.46,10979.35,10752.73,10872.97,1071800000,10872.97
+2001-05-14,10819.55,10930.09,10730.74,10877.33,858200000,10877.33
+2001-05-11,10908.30,10969.39,10716.16,10821.31,906200000,10821.31
+2001-05-10,10868.87,11049.39,10826.90,10910.44,1056700000,10910.44
+2001-05-09,10875.96,10964.84,10739.78,10866.98,1132400000,10866.98
+2001-05-08,10936.66,11001.66,10755.07,10883.51,1006300000,10883.51
+2001-05-07,10952.35,11059.51,10822.74,10935.17,949000000,10935.17
+2001-05-04,10793.20,10989.95,10638.48,10951.24,1082100000,10951.24
+2001-05-03,10872.32,10911.06,10657.99,10796.65,1137900000,10796.65
+2001-05-02,10902.77,11024.31,10726.77,10876.68,1342200000,10876.68
+2001-05-01,10734.05,10966.07,10669.32,10898.34,1181300000,10898.34
+2001-04-30,10814.41,10973.15,10666.13,10734.97,1226000000,10734.97
+2001-04-27,10694.95,10894.60,10632.36,10810.05,1091300000,10810.05
+2001-04-26,10633.01,10820.72,10533.98,10692.35,1345200000,10692.35
+2001-04-25,10453.43,10675.95,10373.14,10625.20,1203600000,10625.20
+2001-04-24,10529.75,10694.61,10401.45,10454.34,1216500000,10454.34
+2001-04-23,10571.00,10669.71,10393.05,10532.23,1012600000,10532.23
+2001-04-20,10690.33,10755.46,10445.43,10579.85,1338700000,10579.85
+2001-04-19,10616.09,10768.28,10468.79,10693.71,1486800000,10693.71
+2001-04-18,10226.88,10806.41,10215.69,10615.83,1918900000,10615.83
+2001-04-17,10151.73,10286.61,9980.22,10216.73,1109600000,10216.73
+2001-04-16,10118.16,10282.38,9991.14,10158.56,913900000,10158.56
+2001-04-12,10013.08,10178.22,9862.71,10126.94,1102000000,10126.94
+2001-04-11,10109.05,10246.59,9898.77,10013.47,1290300000,10013.47
+2001-04-10,9850.35,10226.85,9850.35,10102.74,1349600000,10102.74
+2001-04-09,9793.58,9999.35,9699.92,9845.15,1062800000,9845.15
+2001-04-06,9913.94,9951.73,9600.91,9791.09,1266800000,9791.09
+2001-04-05,9527.21,9969.92,9527.21,9918.05,1368000000,9918.05
+2001-04-04,9480.95,9693.05,9303.48,9515.42,1425590000,9515.42
+2001-04-03,9774.78,9779.74,9385.43,9485.71,1386100000,9485.71
+2001-04-02,9877.16,10043.02,9638.35,9777.93,1204200000,9777.93
+2001-03-30,9799.47,9998.49,9685.07,9878.78,1280800000,9878.78
+2001-03-29,9784.94,9950.22,9583.67,9799.06,1234500000,9799.06
+2001-03-28,9939.68,9939.68,9607.06,9785.35,1333400000,9785.35
+2001-03-27,9687.93,10012.98,9584.29,9947.54,1314200000,9947.54
+2001-03-26,9509.25,9820.50,9489.75,9687.53,1114000000,9687.53
+2001-03-23,9395.58,9631.80,9249.63,9504.78,1364900000,9504.78
+2001-03-22,9490.66,9565.40,9047.56,9389.48,1723950000,9389.48
+2001-03-21,9717.46,9807.08,9391.42,9487.00,1346300000,9487.00
+2001-03-20,9961.14,10130.45,9675.51,9720.76,1235900000,9720.76
+2001-03-19,9820.05,10059.08,9720.94,9959.11,1126200000,9959.11
+2001-03-16,10023.55,10119.44,9720.17,9823.41,1543560000,9823.41
+2001-03-15,9982.92,10190.80,9887.68,10031.28,1259500000,10031.28
+2001-03-14,10279.42,10279.42,9817.74,9973.46,1397400000,9973.46
+2001-03-13,10206.89,10397.83,10021.60,10290.80,1360900000,10290.80
+2001-03-12,10638.52,10638.63,10138.90,10208.25,1229000000,10208.25
+2001-03-09,10850.11,10874.15,10520.42,10644.62,1085900000,10644.62
+2001-03-08,10727.16,10940.45,10625.95,10858.25,1114100000,10858.25
+2001-03-07,10591.86,10822.23,10524.76,10729.60,1132200000,10729.60
+2001-03-06,10570.17,10759.40,10508.43,10591.22,1091800000,10591.22
+2001-03-05,10468.93,10659.52,10393.59,10562.30,929200000,10562.30
+2001-03-02,10438.04,10645.57,10239.81,10466.31,1294000000,10466.31
+2001-03-01,10493.25,10605.23,10236.92,10450.14,1294900000,10450.14
+2001-02-28,10639.32,10750.23,10374.62,10495.28,1225300000,10495.28
+2001-02-27,10638.44,10787.29,10463.92,10636.88,1114100000,10636.88
+2001-02-26,10447.59,10701.92,10347.59,10642.53,1130800000,10642.53
+2001-02-23,10529.25,10595.01,10225.14,10441.90,1231300000,10441.90
+2001-02-22,10527.80,10694.50,10278.93,10526.81,1365900000,10526.81
+2001-02-21,10721.29,10828.48,10468.32,10526.58,1208500000,10526.58
+2001-02-20,10800.23,10988.29,10612.25,10730.88,1112200000,10730.88
+2001-02-16,10884.11,10946.11,10652.33,10799.82,1257200000,10799.82
+2001-02-15,10800.65,11023.44,10694.43,10891.02,1153700000,10891.02
+2001-02-14,10899.42,10989.61,10683.39,10795.41,1150300000,10795.41
+2001-02-13,10950.18,11114.44,10774.98,10903.32,1075200000,10903.32
+2001-02-12,10779.42,11024.92,10727.02,10946.77,1039100000,10946.77
+2001-02-09,10878.51,10979.12,10682.77,10781.45,1075500000,10781.45
+2001-02-08,10940.62,11080.42,10776.04,10880.55,1107200000,10880.55
+2001-02-07,10948.95,11140.09,10794.29,10946.72,1158300000,10946.72
+2001-02-06,10965.03,11117.80,10820.28,10957.42,1059600000,10957.42
+2001-02-05,10860.44,11061.42,10759.98,10965.85,1013000000,10965.85
+2001-02-02,10982.71,11093.01,10786.69,10864.10,1048400000,10864.10
+2001-02-01,10884.82,11063.95,10759.85,10983.63,1118800000,10983.63
+2001-01-31,10882.25,11072.28,10705.23,10887.36,1295300000,10887.36
+2001-01-30,10702.19,10950.38,10609.77,10881.20,1149800000,10881.20
+2001-01-29,10657.13,10832.56,10515.99,10702.19,1053100000,10702.19
+2001-01-26,10727.08,10874.28,10506.26,10659.98,1098000000,10659.98
+2001-01-25,10644.53,10882.42,10520.90,10729.52,1258000000,10729.52
+2001-01-24,10651.85,10795.80,10483.49,10646.97,1309000000,10646.97
+2001-01-23,10575.80,10773.94,10459.91,10649.81,1232600000,10649.81
+2001-01-22,10581.90,10749.44,10371.66,10578.24,1164000000,10578.24
+2001-01-19,10686.00,10792.14,10448.93,10587.59,1407800000,10587.59
+2001-01-18,10584.57,10834.43,10466.01,10678.28,1445000000,10678.28
+2001-01-17,10660.95,10817.35,10442.83,10584.34,1349100000,10584.34
+2001-01-16,10525.78,10751.48,10362.72,10652.66,1205700000,10652.66
+2001-01-12,10608.74,10743.75,10339.94,10525.38,1276000000,10525.38
+2001-01-11,10600.20,10808.00,10400.94,10609.55,1411200000,10609.55
+2001-01-10,10568.48,10728.30,10325.71,10604.27,1296500000,10604.27
+2001-01-09,10625.21,10801.09,10387.12,10572.55,1191300000,10572.55
+2001-01-08,10658.73,10818.98,10407.85,10621.35,1115500000,10621.35
+2001-01-05,10912.81,10990.59,10492.84,10662.01,1430800000,10662.01
+2001-01-04,10944.94,11224.41,10672.58,10912.41,216940000,10912.41
+2001-01-03,10637.42,11212.62,10367.19,10945.75,188070000,10945.75
+2001-01-02,10790.92,10916.98,10450.55,10646.15,1129400000,10646.15
+2000-12-29,10868.76,11031.05,10675.75,10787.99,1035500000,10787.99
+2000-12-28,10795.20,11009.44,10645.42,10868.76,1015300000,10868.76
+2000-12-27,10690.10,10944.60,10551.00,10803.16,1092700000,10803.16
+2000-12-26,10638.21,10813.78,10479.71,10692.44,806500000,10692.44
+2000-12-22,10495.26,10772.07,10364.06,10635.56,1087100000,10635.56
+2000-12-21,10314.38,10651.96,10158.16,10487.29,1449900000,10487.29
+2000-12-20,10580.97,10604.08,10197.59,10318.93,1421600000,10318.93
+2000-12-19,10643.14,10865.35,10441.41,10584.37,1324900000,10584.37
+2000-12-18,10433.34,10783.82,10417.43,10645.42,1189900000,10645.42
+2000-12-15,10647.98,10706.84,10324.24,10434.96,156110000,10434.96
+2000-12-14,10794.82,10864.49,10508.53,10674.99,1061300000,10674.99
+2000-12-13,10777.95,11002.23,10653.76,10794.44,1195100000,10794.44
+2000-12-12,10722.77,10968.77,10582.09,10768.27,1083400000,10768.27
+2000-12-11,10719.36,10931.33,10521.04,10725.80,1202400000,10725.80
+2000-12-08,10632.14,10896.82,10534.69,10712.91,1358300000,10712.91
+2000-12-07,10644.66,10791.40,10448.99,10617.36,1128000000,10617.36
+2000-12-06,10896.14,10995.41,10513.84,10664.38,1399300000,10664.38
+2000-12-05,10576.78,11044.70,10504.36,10898.72,900300000,10898.72
+2000-12-04,10377.33,10701.35,10227.17,10560.95,1103000000,10560.95
+2000-12-01,10416.76,10645.42,10238.54,10373.54,1195200000,10373.54
+2000-11-30,10610.53,10690.16,10204.80,10414.49,1186530000,10414.49
+2000-11-29,10502.74,10746.66,10383.02,10629.11,402100000,10629.11
+2000-11-28,10537.86,10730.35,10356.47,10507.58,1028200000,10507.58
+2000-11-27,10479.33,10758.04,10411.08,10546.07,946100000,10546.07
+2000-11-24,10403.87,10596.50,10354.20,10470.23,404870000,10470.23
+2000-11-22,10484.26,10589.67,10251.06,10399.32,963200000,10399.32
+2000-11-21,10465.57,10676.13,10303.39,10494.50,1137100000,10494.50
+2000-11-20,10624.18,10707.22,10331.45,10462.65,955800000,10462.65
+2000-11-17,10657.13,10824.77,10462.55,10629.87,1070400000,10629.87
+2000-11-16,10705.33,10857.38,10536.30,10656.03,956300000,10656.03
+2000-11-15,10681.21,10863.83,10544.17,10707.60,1066800000,10707.60
+2000-11-14,10528.25,10809.61,10484.64,10681.06,1118800000,10681.06
+2000-11-13,10595.35,10701.54,10273.24,10517.25,1129300000,10517.25
+2000-11-10,10813.78,10886.20,10497.53,10602.95,962500000,10602.95
+2000-11-09,10902.11,10989.34,10576.40,10834.25,1111000000,10834.25
+2000-11-08,10954.34,11152.02,10779.27,10907.06,909300000,10907.06
+2000-11-07,10978.72,11105.75,10825.15,10952.18,880900000,10952.18
+2000-11-06,10820.60,11092.10,10741.73,10977.21,930900000,10977.21
+2000-11-03,10883.17,10996.17,10650.72,10817.95,997700000,10817.95
+2000-11-02,10903.17,11071.06,10731.49,10880.51,1167700000,10880.51
+2000-11-01,10966.21,11103.10,10736.42,10899.47,1206800000,10899.47
+2000-10-31,10835.39,11108.79,10681.06,10971.14,1366400000,10971.14
+2000-10-30,10588.06,10944.98,10506.25,10835.77,1186500000,10835.77
+2000-10-27,10381.60,10696.43,10296.70,10590.62,1086300000,10590.62
+2000-10-26,10330.18,10563.25,10128.18,10380.12,1303800000,10380.12
+2000-10-25,10395.66,10563.99,10170.08,10326.48,1315600000,10326.48
+2000-10-24,10273.57,10583.96,10136.69,10393.07,1158600000,10393.07
+2000-10-23,10230.29,10496.28,10078.24,10271.72,1046800000,10271.72
+2000-10-20,10141.13,10406.76,9925.82,10226.59,1177400000,10226.59
+2000-10-19,10014.61,10317.23,9901.77,10142.98,1297900000,10142.98
+2000-10-18,10085.99,10171.47,9571.40,9975.02,1441700000,9975.02
+2000-10-17,10242.87,10402.32,9924.34,10089.71,1161500000,10089.71
+2000-10-16,10184.78,10428.95,10033.84,10238.80,1005400000,10238.80
+2000-10-13,10031.62,10325.37,9883.27,10192.18,1223900000,10192.18
+2000-10-12,10424.14,10462.25,9873.66,10034.58,1388600000,10034.58
+2000-10-11,10521.07,10647.23,10228.44,10413.79,1387500000,10413.79
+2000-10-10,10569.17,10744.52,10377.16,10524.40,1044000000,10524.40
+2000-10-09,10596.91,10762.10,10438.94,10568.43,716600000,10568.43
+2000-10-06,10726.76,10871.42,10440.05,10596.54,1150100000,10596.54
+2000-10-05,10783.72,10940.23,10570.28,10724.92,1176100000,10724.92
+2000-10-04,10723.33,10972.41,10596.54,10784.48,1167400000,10784.48
+2000-10-03,10709.84,10976.11,10561.03,10719.74,1098100000,10719.74
+2000-10-02,10659.06,10876.23,10479.27,10700.13,1051200000,10700.13
+2000-09-29,10821.40,10923.21,10552.15,10650.92,1197100000,10650.92
+2000-09-28,10629.84,10948.00,10539.48,10824.06,1206200000,10824.06
+2000-09-27,10634.45,10821.10,10439.31,10628.36,1174700000,10628.36
+2000-09-26,10806.30,10915.44,10499.61,10631.32,1106600000,10631.32
+2000-09-25,10847.37,11039.47,10664.24,10808.15,982400000,10808.15
+2000-09-22,10678.30,10936.53,10505.16,10847.37,1185500000,10847.37
+2000-09-21,10680.52,10902.12,10548.08,10765.52,1105400000,10765.52
+2000-09-20,10794.47,10906.93,10500.35,10687.92,1104000000,10687.92
+2000-09-19,10812.22,10960.95,10645.38,10789.29,1024900000,10789.29
+2000-09-18,10926.42,11053.80,10693.84,10808.52,962500000,10808.52
+2000-09-15,11087.84,11203.26,10857.73,10927.00,1268400000,10927.00
+2000-09-14,11189.58,11285.39,10986.47,11087.47,1014000000,11087.47
+2000-09-13,11225.03,11350.87,11020.14,11182.18,1068300000,11182.18
+2000-09-12,11197.71,11351.98,11015.70,11233.23,991200000,11233.23
+2000-09-11,11219.54,11367.15,11043.07,11195.49,899300000,11195.49
+2000-09-08,11261.72,11381.95,11059.72,11220.65,961000000,11220.65
+2000-09-07,11316.01,11444.84,11124.83,11259.87,985500000,11259.87
+2000-09-06,11253.58,11518.83,11186.25,11310.64,995100000,11310.64
+2000-09-05,11221.76,11382.69,11094.50,11260.61,838500000,11260.61
+2000-09-01,11219.54,11406.74,11130.01,11238.78,767700000,11238.78
+2000-08-31,11105.23,11415.99,11040.85,11215.10,1056600000,11215.10
+2000-08-30,11209.01,11282.06,11034.57,11103.01,818400000,11103.01
+2000-08-29,11249.27,11356.42,11100.79,11215.10,795600000,11215.10
+2000-08-28,11194.48,11410.44,11123.35,11252.84,733600000,11252.84
+2000-08-25,11180.54,11301.41,11073.59,11192.63,685600000,11192.63
+2000-08-24,11143.91,11302.51,11009.12,11182.74,837100000,11182.74
+2000-08-23,11130.55,11253.06,10990.44,11144.65,871000000,11144.65
+2000-08-22,11082.20,11274.67,11000.33,11139.15,818800000,11139.15
+2000-08-21,11058.85,11193.73,10945.39,11079.81,731600000,11079.81
+2000-08-18,11051.20,11180.54,10933.30,11046.48,821400000,11046.48
+2000-08-17,11010.95,11180.91,10899.24,11055.64,922400000,11055.64
+2000-08-16,11068.83,11171.02,10888.62,11008.39,929800000,11008.39
+2000-08-15,11175.05,11227.06,10965.54,11067.00,895900000,11067.00
+2000-08-14,11027.07,11232.92,10928.91,11176.14,783800000,11176.14
+2000-08-11,10905.98,11131.83,10841.37,11027.80,835500000,11027.80
+2000-08-10,10901.06,11069.93,10779.47,10908.76,940800000,10908.76
+2000-08-09,10970.94,11097.03,10780.02,10905.83,1054000000,10905.83
+2000-08-08,10865.15,11083.11,10741.38,10976.89,992200000,10976.89
+2000-08-07,10773.98,10973.23,10657.50,10867.01,854800000,10867.01
+2000-08-04,10713.36,10873.97,10555.68,10767.75,956000000,10767.75
+2000-08-03,10679.37,10844.30,10518.68,10706.58,1095600000,10706.58
+2000-08-02,10609.15,10818.66,10514.29,10687.53,986300000,10687.53
+2000-08-01,10523.81,10728.92,10428.58,10606.95,938700000,10606.95
+2000-07-31,10514.29,10727.09,10374.00,10521.98,952600000,10521.98
+2000-07-28,10594.97,10732.14,10367.28,10511.17,980000000,10511.17
+2000-07-27,10516.83,10745.93,10450.01,10586.13,1156400000,10586.13
+2000-07-26,10689.36,10790.13,10447.18,10516.48,1235800000,10516.48
+2000-07-25,10689.28,10867.20,10557.49,10699.97,969400000,10699.97
+2000-07-24,10731.44,10895.84,10545.47,10685.12,880300000,10685.12
+2000-07-21,10843.51,10949.58,10614.06,10733.56,968300000,10733.56
+2000-07-20,10700.68,10980.34,10671.33,10843.87,1064600000,10843.87
+2000-07-19,10724.15,10907.15,10587.89,10696.08,909400000,10696.08
+2000-07-18,10799.16,10895.57,10613.00,10739.92,908300000,10739.92
+2000-07-17,10812.40,10969.38,10653.30,10804.27,906000000,10804.27
+2000-07-14,10793.31,10935.44,10661.43,10812.75,960600000,10812.75
+2000-07-13,10774.92,10963.02,10643.40,10788.71,1026800000,10788.71
+2000-07-12,10722.24,10930.84,10639.51,10783.76,1001200000,10783.76
+2000-07-11,10649.06,10877.46,10544.76,10727.19,980500000,10727.19
+2000-07-10,10627.14,10792.25,10520.01,10646.58,838700000,10646.58
+2000-07-07,10483.33,10742.04,10419.25,10635.98,931700000,10635.98
+2000-07-06,10481.45,10644.11,10303.28,10481.47,947300000,10481.47
+2000-07-05,10538.23,10674.16,10362.33,10483.60,1019300000,10483.60
+2000-07-03,10450.36,10610.17,10353.66,10560.67,451900000,10560.67
+2000-06-30,10393.09,10626.79,10161.51,10447.89,1459700000,10447.89
+2000-06-29,10523.90,10582.94,10279.24,10398.04,1110900000,10398.04
+2000-06-28,10506.39,10712.70,10399.10,10527.79,1095100000,10527.79
+2000-06-27,10541.58,10741.69,10384.60,10504.46,1042500000,10504.46
+2000-06-26,10403.69,10680.26,10365.15,10542.99,889000000,10542.99
+2000-06-23,10376.47,10555.37,10283.13,10404.75,847600000,10404.75
+2000-06-22,10495.97,10596.73,10256.97,10376.12,1022700000,10376.12
+2000-06-21,10446.83,10607.69,10312.48,10497.74,1009600000,10497.74
+2000-06-20,10558.90,10632.09,10318.84,10435.16,1031500000,10435.16
+2000-06-19,10448.40,10733.56,10322.02,10557.84,921700000,10557.84
+2000-06-16,10717.76,10784.47,10393.44,10449.30,1250800000,10449.30
+2000-06-15,10689.63,10889.48,10552.89,10714.82,1011400000,10714.82
+2000-06-14,10632.46,10860.84,10542.99,10687.95,929700000,10687.95
+2000-06-13,10562.31,10751.86,10395.56,10621.84,935900000,10621.84
+2000-06-12,10615.12,10757.60,10476.88,10564.21,774100000,10564.21
+2000-06-09,10678.47,10848.38,10515.52,10614.06,786000000,10614.06
+2000-06-08,10818.78,10887.72,10524.92,10668.72,854300000,10668.72
+2000-06-07,10733.48,10974.07,10588.64,10812.86,854600000,10812.86
+2000-06-06,10822.61,10916.97,10592.82,10735.57,950100000,10735.57
+2000-06-05,10793.11,10951.79,10629.03,10815.30,838600000,10815.30
+2000-06-02,10660.09,11013.05,10600.46,10794.76,1162400000,10794.76
+2000-06-01,10532.27,10780.37,10422.95,10652.20,960100000,10652.20
+2000-05-31,10528.28,10692.73,10377.37,10522.33,960500000,10522.33
+2000-05-30,10302.31,10596.00,10287.94,10527.13,844200000,10527.13
+2000-05-26,10322.89,10487.72,10163.20,10299.24,722600000,10299.24
+2000-05-25,10529.87,10644.32,10207.75,10323.92,984500000,10323.92
+2000-05-24,10420.90,10679.53,10240.99,10535.35,1152300000,10535.35
+2000-05-23,10539.12,10671.74,10325.63,10422.27,869900000,10422.27
+2000-05-22,10624.79,10718.00,10308.15,10542.55,869000000,10542.55
+2000-05-19,10764.22,10821.83,10468.18,10626.85,853700000,10626.85
+2000-05-18,10771.80,10938.34,10669.00,10777.28,807900000,10777.28
+2000-05-17,10930.64,10947.25,10648.78,10769.74,820500000,10769.74
+2000-05-16,10816.01,11086.72,10723.48,10934.57,955500000,10934.57
+2000-05-15,10606.97,10902.36,10509.31,10807.78,854600000,10807.78
+2000-05-12,10549.06,10780.37,10444.54,10609.37,858200000,10609.37
+2000-05-11,10369.27,10676.88,10315.69,10545.97,953600000,10545.97
+2000-05-10,10533.09,10649.95,10169.77,10367.78,1006400000,10367.78
+2000-05-09,10607.54,10765.75,10435.96,10536.75,896600000,10536.75
+2000-05-08,10571.31,10744.22,10400.40,10603.63,787600000,10603.63
+2000-05-05,10409.70,10688.61,10312.91,10577.86,805500000,10577.86
+2000-05-04,10478.89,10631.53,10293.05,10412.49,925800000,10412.49
+2000-05-03,10732.21,10754.39,10345.17,10480.13,991600000,10480.13
+2000-05-02,10805.58,10932.47,10580.65,10731.12,1011500000,10731.12
+2000-05-01,10749.42,11001.34,10622.22,10811.78,966300000,10811.78
+2000-04-28,10892.76,11005.07,10632.46,10733.91,984600000,10733.91
+2000-04-27,10941.91,11024.61,10650.14,10888.10,1111000000,10888.10
+2000-04-26,11127.92,11246.75,10816.44,10945.50,999600000,10945.50
+2000-04-25,10916.65,11265.67,10764.62,11124.82,1071100000,11124.82
+2000-04-24,10822.33,11060.29,10579.10,10906.10,868700000,10906.10
+2000-04-20,10668.19,10941.47,10582.51,10844.05,896200000,10844.05
+2000-04-19,10748.97,10909.20,10503.40,10674.96,1001400000,10674.96
+2000-04-18,10584.02,10941.78,10424.90,10767.42,1109400000,10767.42
+2000-04-17,10303.29,10721.50,10128.62,10582.51,1204700000,10582.51
+2000-04-14,10922.85,10922.85,10173.92,10305.77,1279700000,10305.77
+2000-04-13,11132.58,11290.80,10806.51,10923.55,1032000000,10923.55
+2000-04-12,11283.05,11600.43,11026.47,11125.13,1175900000,11125.13
+2000-04-11,11180.98,11459.58,11024.22,11287.08,971400000,11287.08
+2000-04-10,11114.89,11404.35,10955.43,11186.56,853700000,11186.56
+2000-04-07,11122.03,11317.79,10932.78,11111.48,891600000,11111.48
+2000-04-06,11029.56,11303.83,10921.07,11114.27,1008000000,11114.27
+2000-04-05,11163.29,11326.79,10894.00,11033.92,1110300000,11033.92
+2000-04-04,11225.34,11531.24,10682.72,11164.84,1515460000,11164.84
+2000-04-03,10863.28,11344.17,10821.71,11221.93,1021700000,11221.93
+2000-03-31,10993.28,11244.58,10801.23,10921.92,1227400000,10921.92
+2000-03-30,11008.17,11258.23,10796.58,10980.25,1193400000,10980.25
+2000-03-29,10939.05,11214.48,10792.24,11018.72,1061900000,11018.72
+2000-03-28,11023.68,11192.76,10804.65,10936.11,959100000,10936.11
+2000-03-27,11093.25,11274.98,10881.90,11025.85,901000000,11025.85
+2000-03-24,11107.45,11311.28,10901.44,11112.72,1052200000,11112.72
+2000-03-23,10884.38,11224.72,10737.63,11119.86,1078300000,11119.86
+2000-03-22,10916.96,11054.71,10671.86,10866.70,1075000000,10866.70
+2000-03-21,10680.24,11012.20,10515.50,10907.34,1065900000,10907.34
+2000-03-20,10594.75,10866.08,10456.86,10680.24,920800000,10680.24
+2000-03-17,10629.98,10849.32,10399.15,10595.23,1295100000,10595.23
+2000-03-16,10139.58,10716.23,10139.58,10630.60,1482300000,10630.60
+2000-03-15,9808.15,10294.60,9676.90,10131.41,1302800000,10131.41
+2000-03-14,9957.67,10149.41,9747.33,9811.24,1094000000,9811.24
+2000-03-13,9911.22,10111.25,9670.07,9947.13,1016100000,9947.13
+2000-03-10,10008.55,10211.77,9792.93,9928.82,1138800000,9928.82
+2000-03-09,9855.29,10097.28,9667.28,10010.73,1123000000,10010.73
+2000-03-08,9800.69,10037.41,9611.75,9856.53,1203000000,9856.53
+2000-03-07,10197.61,10208.66,9651.77,9796.03,1314100000,9796.03
+2000-03-06,10358.96,10518.91,10038.65,10170.50,1029000000,10170.50
+2000-03-03,10171.12,10581.89,10148.16,10367.20,1150300000,10367.20
+2000-03-02,10135.44,10361.61,9986.53,10164.92,1198600000,10164.92
+2000-03-01,10128.11,10355.72,9935.96,10137.93,1274100000,10137.93
+2000-02-29,10039.58,10332.14,9926.65,10128.31,1204300000,10128.31
+2000-02-28,9854.66,10228.52,9760.36,10038.65,1026500000,10038.65
+2000-02-25,10090.77,10196.02,9767.80,9862.12,1065200000,9862.12
+2000-02-24,10242.48,10321.90,9877.94,10092.63,1215000000,10092.63
+2000-02-23,10294.82,10443.21,10077.74,10225.73,993700000,10225.73
+2000-02-22,10219.83,10446.62,10011.66,10304.84,980000000,10304.84
+2000-02-18,10514.57,10562.34,10129.24,10219.52,1042300000,10219.52
+2000-02-17,10565.76,10768.66,10348.66,10514.57,1034800000,10514.57
+2000-02-16,10711.82,10831.64,10468.65,10561.41,1018800000,10561.41
+2000-02-15,10520.15,10821.09,10377.44,10718.09,1092100000,10718.09
+2000-02-14,10431.65,10674.96,10327.56,10519.84,927300000,10519.84
+2000-02-11,10638.64,10763.38,10301.12,10425.21,1025700000,10425.21
+2000-02-10,10697.92,10853.67,10491.30,10643.63,1058800000,10643.63
+2000-02-09,10948.82,11016.54,10647.97,10699.16,1050500000,10699.16
+2000-02-08,10904.26,11139.40,10826.67,10957.60,1047700000,10957.60
+2000-02-07,10965.97,11097.52,10732.67,10905.79,918100000,10905.79
+2000-02-04,11014.37,11200.83,10847.54,10963.80,1045100000,10963.80
+2000-02-03,11010.48,11207.97,10799.68,11013.44,1146500000,11013.44
+2000-02-02,11037.64,11228.44,10876.00,11003.20,1038600000,11003.20
+2000-02-01,10937.74,11187.18,10798.44,11041.05,981000000,11041.05
+2000-01-31,10735.77,11059.67,10610.43,10940.53,993800000,10940.53
+2000-01-28,11024.92,11115.20,10649.21,10738.87,1095800000,10738.87
+2000-01-27,11035.55,11274.36,10818.30,11028.02,1129500000,11028.02
+2000-01-26,11025.85,11280.87,10870.73,11032.99,1117300000,11032.99
+2000-01-25,11010.96,11228.75,10779.83,11029.89,1073700000,11029.89
+2000-01-24,11251.94,11501.15,10849.01,11008.17,1115800000,11008.17
+2000-01-21,11356.26,11513.87,11113.65,11251.71,1209800000,11251.71
+2000-01-20,11490.29,11654.72,11194.32,11351.30,1100700000,11351.30
+2000-01-19,11535.24,11710.57,11320.28,11489.36,1087800000,11489.36
+2000-01-18,11719.19,11834.67,11397.22,11560.72,1056700000,11560.72
+2000-01-14,11619.35,11908.50,11506.42,11722.98,1085900000,11722.98
+2000-01-13,11558.24,11761.14,11421.42,11582.43,1030400000,11582.43
+2000-01-12,11506.73,11751.83,11385.74,11551.10,974600000,11551.10
+2000-01-11,11568.47,11748.11,11398.30,11511.08,1014000000,11511.08
+2000-01-10,11532.48,11765.17,11427.00,11572.20,1064800000,11572.20
+2000-01-07,11247.06,11655.65,11168.26,11522.56,1225200000,11522.56
+2000-01-06,11113.37,11447.79,10963.18,11253.26,1092300000,11253.26
+2000-01-05,10989.37,11337.65,10862.66,11122.65,1085500000,11122.65
+2000-01-04,11349.75,11358.44,10907.03,10997.93,1009000000,10997.93
+2000-01-03,11501.85,11641.07,11180.98,11357.51,931800000,11357.51
+1999-12-31,11453.48,11598.26,11368.05,11497.12,374050000,11497.12
+1999-12-30,11484.36,11640.33,11388.94,11452.86,554680000,11452.86
+1999-12-29,11472.88,11658.68,11367.53,11484.66,567860000,11484.66
+1999-12-28,11389.24,11613.72,11302.08,11476.71,655400000,11476.71
+1999-12-27,11410.65,11603.02,11253.15,11391.08,722600000,11391.08
+1999-12-23,11202.07,11506.38,11202.07,11405.76,728600000,11405.76
+1999-12-22,11199.45,11375.17,11075.76,11203.60,850000000,11203.60
+1999-12-21,11142.43,11336.03,10973.61,11200.54,963500000,11200.54
+1999-12-20,11254.50,11417.38,11026.22,11144.27,904600000,11144.27
+1999-12-17,11259.26,11497.20,11103.59,11257.43,1349800000,11257.43
+1999-12-16,11224.40,11396.89,11016.13,11244.89,1070300000,11244.89
+1999-12-15,11158.78,11400.48,11014.60,11225.32,1033900000,11225.32
+1999-12-14,11195.34,11336.33,11027.13,11160.17,1027800000,11160.17
+1999-12-13,11217.46,11379.46,11024.38,11192.59,977600000,11192.59
+1999-12-10,11137.85,11358.66,11042.12,11224.70,987200000,11224.70
+1999-12-09,11073.62,11327.46,10962.60,11134.79,1122100000,11134.79
+1999-12-08,11107.26,11273.33,10957.41,11068.12,957000000,11068.12
+1999-12-07,11221.65,11351.32,10993.49,11106.65,1085800000,11106.65
+1999-12-06,11286.79,11412.79,11100.53,11225.01,916800000,11225.01
+1999-12-03,11046.10,11423.50,11046.10,11286.18,1006400000,11286.18
+1999-12-02,10995.02,11183.72,10896.24,11039.06,900700000,11039.06
+1999-12-01,10876.47,11111.24,10798.07,10998.39,884000000,10998.39
+1999-11-30,10945.49,11142.13,10785.22,10877.81,951500000,10877.81
+1999-11-29,10985.73,11059.25,10813.97,10947.92,866100000,10947.92
+1999-11-26,11007.26,11115.83,10938.44,10988.91,312120000,10988.91
+1999-11-24,11000.22,11131.12,10859.23,11008.17,734800000,11008.17
+1999-11-23,11090.29,11178.83,10899.60,10995.63,926100000,10995.63
+1999-11-22,11008.78,11195.34,10887.67,11089.52,873500000,11089.52
+1999-11-19,11033.25,11146.41,10871.77,11003.89,893800000,11003.89
+1999-11-18,10887.67,11147.02,10859.92,11035.70,1022800000,11035.70
+1999-11-17,10929.00,11040.90,10774.21,10883.09,960000000,10883.09
+1999-11-16,10762.89,10992.88,10691.94,10932.33,942200000,10932.33
+1999-11-15,10764.73,10899.22,10626.80,10760.75,795700000,10760.75
+1999-11-12,10593.51,10845.16,10513.03,10769.32,900200000,10769.32
+1999-11-11,10603.25,10716.71,10485.20,10595.30,891300000,10595.30
+1999-11-10,10611.94,10713.04,10449.42,10597.74,984700000,10597.74
+1999-11-09,10715.10,10806.02,10506.61,10617.32,854300000,10617.32
+1999-11-08,10668.42,10838.74,10548.20,10718.85,806800000,10718.85
+1999-11-05,10639.95,10885.53,10636.59,10704.48,1007300000,10704.48
+1999-11-04,10612.42,10817.95,10523.43,10639.64,981700000,10639.64
+1999-11-03,10582.54,10759.22,10485.50,10609.06,914400000,10609.06
+1999-11-02,10653.71,10816.11,10508.14,10581.84,904500000,10581.84
+1999-11-01,10730.78,10828.96,10568.08,10648.51,861000000,10648.51
+1999-10-29,10629.18,10883.10,10580.11,10729.86,1120500000,10729.86
+1999-10-28,10397.67,10726.70,10397.67,10622.53,1135100000,10622.53
+1999-10-27,10302.76,10515.21,10172.32,10394.89,950100000,10394.89
+1999-10-26,10350.88,10486.39,10208.73,10302.13,878300000,10302.13
+1999-10-25,10468.98,10518.37,10225.82,10349.93,777000000,10349.93
+1999-10-22,10581.69,10581.69,10301.18,10470.25,959200000,10470.25
+1999-10-21,10390.71,10414.52,10047.57,10297.69,1012500000,10297.69
+1999-10-20,10203.31,10485.13,10144.46,10392.36,928800000,10392.36
+1999-10-19,10117.54,10418.01,10093.80,10204.93,905700000,10204.93
+1999-10-18,10018.45,10221.08,9884.20,10116.28,818700000,10116.28
+1999-10-15,10286.61,10286.61,9911.43,10019.71,912600000,10019.71
+1999-10-14,10230.89,10416.74,10071.64,10286.61,892300000,10286.61
+1999-10-13,10412.31,10495.89,10173.58,10232.16,821500000,10232.16
+1999-10-12,10648.81,10659.58,10366.08,10417.06,778300000,10417.06
+1999-10-11,10649.76,10781.16,10545.60,10648.18,655900000,10648.18
+1999-10-08,10534.52,10743.48,10423.71,10649.76,897300000,10649.76
+1999-10-07,10588.34,10687.12,10430.99,10537.05,827800000,10537.05
+1999-10-06,10399.77,10655.46,10340.75,10588.34,895200000,10588.34
+1999-10-05,10401.23,10578.21,10250.20,10400.59,965700000,10400.59
+1999-10-04,10274.58,10538.32,10220.44,10401.23,803300000,10401.23
+1999-10-01,10335.69,10425.92,10108.05,10273.00,896200000,10273.00
+1999-09-30,10214.11,10456.32,10156.85,10336.95,1017600000,10336.95
+1999-09-29,10274.27,10408.51,10119.76,10213.48,856000000,10213.48
+1999-09-28,10300.51,10386.03,10055.17,10275.53,885400000,10275.53
+1999-09-27,10279.33,10498.74,10201.76,10303.39,780600000,10303.39
+1999-09-24,10311.94,10428.14,10128.63,10279.33,872800000,10279.33
+1999-09-23,10524.07,10643.75,10260.33,10318.59,890800000,10318.59
+1999-09-22,10599.42,10688.39,10407.56,10524.07,822200000,10524.07
+1999-09-21,10822.95,10822.95,10517.10,10598.47,817300000,10598.47
+1999-09-20,10801.87,10918.88,10715.93,10823.90,568000000,10823.90
+1999-09-17,10745.38,10946.74,10690.61,10803.63,861900000,10803.63
+1999-09-16,10795.77,10876.46,10592.46,10737.46,739000000,10737.46
+1999-09-15,10910.40,11049.96,10757.41,10801.42,787300000,10801.42
+1999-09-14,11028.74,11061.04,10815.67,10910.33,734500000,10910.33
+1999-09-13,11027.40,11146.52,10886.90,11030.33,657900000,11030.33
+1999-09-10,11087.00,11218.39,10965.74,11028.43,808500000,11028.43
+1999-09-09,11031.28,11172.17,10900.83,11079.40,773900000,11079.40
+1999-09-08,11034.13,11164.89,10898.62,11036.34,791200000,11036.34
+1999-09-07,11079.08,11191.80,10910.65,11034.13,715300000,11034.13
+1999-09-03,10922.36,11155.70,10922.36,11078.45,663200000,11078.45
+1999-09-02,10923.95,10923.95,10669.71,10843.21,687100000,10843.21
+1999-09-01,10828.44,11013.55,10784.32,10937.88,708200000,10937.88
+1999-08-31,10909.70,11079.08,10725.43,10829.28,861700000,10829.28
+1999-08-30,11087.69,11176.60,10869.81,10914.13,597900000,10914.13
+1999-08-27,11198.45,11295.33,11021.14,11090.17,570050000,11090.17
+1999-08-26,11326.04,11393.48,11133.86,11198.45,719000000,11198.45
+1999-08-25,11282.38,11428.94,11106.31,11326.04,864600000,11326.04
+1999-08-24,11297.54,11404.87,11135.76,11283.30,732700000,11283.30
+1999-08-23,11099.66,11344.09,11087.95,11299.76,682600000,11299.76
+1999-08-20,10963.84,11155.07,10916.35,11100.61,661200000,11100.61
+1999-08-19,10988.85,11037.29,10809.65,10963.84,684200000,10963.84
+1999-08-18,11109.66,11153.49,10913.50,10991.38,682800000,10991.38
+1999-08-17,11049.64,11180.08,10963.52,11117.08,691500000,11117.08
+1999-08-16,10980.11,11105.05,10853.98,11046.79,583550000,11046.79
+1999-08-13,10822.00,11049.64,10822.00,10973.65,691700000,10973.65
+1999-08-12,10785.65,10967.64,10688.07,10789.39,745600000,10789.39
+1999-08-11,10650.59,10878.99,10596.26,10787.80,792300000,10787.80
+1999-08-10,10704.22,10812.82,10487.34,10655.15,836200000,10655.15
+1999-08-09,10714.03,10854.61,10571.56,10707.70,684300000,10707.70
+1999-08-06,10792.58,10896.08,10584.54,10714.03,698900000,10714.03
+1999-08-05,10675.41,10876.77,10509.19,10793.82,859300000,10793.82
+1999-08-04,10675.66,10901.78,10585.17,10674.77,789300000,10674.77
+1999-08-03,10645.96,10812.82,10538.00,10677.31,739600000,10677.31
+1999-08-02,10654.83,10849.23,10551.30,10645.96,649550000,10645.96
+1999-07-30,10791.29,10897.98,10594.99,10655.15,736800000,10655.15
+1999-07-29,10920.15,10920.15,10672.24,10791.29,770100000,10791.29
+1999-07-28,10979.04,11090.48,10851.13,10972.07,690900000,10972.07
+1999-07-27,10863.16,11079.40,10834.35,10979.04,723800000,10979.04
+1999-07-26,10910.96,11014.50,10748.86,10863.16,613450000,10863.16
+1999-07-23,10979.67,11069.59,10813.77,10910.96,630580000,10910.96
+1999-07-22,11002.78,11140.51,10796.67,10969.22,771700000,10969.22
+1999-07-21,10998.94,11142.72,10865.69,11002.78,785500000,11002.78
+1999-07-20,11130.06,11245.62,10914.13,10996.13,754800000,10996.13
+1999-07-19,11209.84,11321.61,11069.90,11187.68,642330000,11187.68
+1999-07-16,11188.63,11300.08,11069.27,11209.84,714100000,11209.84
+1999-07-15,11200.03,11313.37,11072.75,11186.41,818800000,11186.41
+1999-07-14,11202.24,11289.95,11051.86,11148.10,756100000,11148.10
+1999-07-13,11106.31,11277.60,11013.55,11175.02,736000000,11175.02
+1999-07-12,11234.22,11314.64,11087.95,11200.98,685300000,11200.98
+1999-07-09,11142.72,11284.25,11050.59,11193.70,701000000,11193.70
+1999-07-08,11118.66,11290.58,10985.68,11126.89,830600000,11126.89
+1999-07-07,11129.74,11268.42,11008.16,11187.36,791200000,11187.36
+1999-07-06,11119.93,11291.21,11021.78,11135.12,722900000,11135.12
+1999-07-02,11089.53,11205.41,10995.50,11139.24,613570000,11139.24
+1999-07-01,10972.39,11156.65,10841.63,11066.42,843400000,11066.42
+1999-06-30,10805.22,11120.24,10657.36,10970.80,1117000000,10970.80
+1999-06-29,10673.83,10855.56,10589.61,10815.35,820100000,10815.35
+1999-06-28,10633.93,10792.24,10535.15,10655.15,652910000,10655.15
+1999-06-25,10586.44,10719.42,10477.21,10552.56,623460000,10552.56
+1999-06-24,10620.32,10736.83,10404.07,10534.83,690400000,10534.83
+1999-06-23,10702.32,10791.29,10542.75,10666.86,731800000,10666.86
+1999-06-22,10768.49,10879.94,10639.63,10721.63,716500000,10721.63
+1999-06-21,10865.06,10960.36,10684.91,10815.98,686600000,10815.98
+1999-06-18,10885.00,10978.09,10751.39,10855.56,914500000,10855.56
+1999-06-17,10732.71,10936.61,10642.80,10841.63,700300000,10841.63
+1999-06-16,10709.92,10883.74,10608.92,10784.95,806800000,10784.95
+1999-06-15,10612.09,10740.00,10500.01,10594.99,696600000,10594.99
+1999-06-14,10490.83,10691.24,10414.52,10563.33,669400000,10563.33
+1999-06-11,10619.69,10744.11,10386.98,10490.51,698200000,10490.51
+1999-06-10,10621.58,10736.20,10452.52,10621.27,716500000,10621.27
+1999-06-09,10780.84,10871.39,10602.59,10690.29,662000000,10690.29
+1999-06-08,10878.35,10954.66,10671.93,10765.64,685900000,10765.64
+1999-06-07,10805.20,11016.40,10718.47,10909.38,664300000,10909.38
+1999-06-04,10702.64,10892.60,10558.26,10799.84,694500000,10799.84
+1999-06-03,10629.18,10767.86,10515.52,10663.69,719600000,10663.69
+1999-06-02,10591.82,10694.09,10388.24,10577.89,728000000,10577.89
+1999-06-01,10549.08,10717.20,10334.42,10596.26,683800000,10596.26
+1999-05-28,10489.56,10690.07,10389.94,10559.74,649960000,10559.74
+1999-05-27,10643.04,10734.21,10372.96,10466.93,811400000,10466.93
+1999-05-26,10580.94,10818.08,10416.06,10702.16,870800000,10702.16
+1999-05-25,10651.73,10818.96,10494.52,10531.09,826700000,10531.09
+1999-05-24,10829.87,10924.26,10568.85,10654.67,754700000,10654.67
+1999-05-21,10879.13,10974.69,10728.12,10829.28,686600000,10829.28
+1999-05-20,10892.40,11020.70,10773.83,10866.74,752200000,10866.74
+1999-05-19,10836.67,10988.85,10722.81,10887.39,801100000,10887.39
+1999-05-18,10895.94,11017.75,10678.86,10836.95,753400000,10836.95
+1999-05-17,10864.35,10976.32,10677.64,10853.47,665500000,10853.47
+1999-05-14,10950.26,11076.55,10787.03,10913.32,727800000,10913.32
+1999-05-13,11087.71,11244.36,10931.36,11107.19,796900000,11107.19
+1999-05-12,11002.38,11146.71,10759.54,11000.37,825500000,11000.37
+1999-05-11,11059.65,11185.08,10882.11,11026.15,836100000,11026.15
+1999-05-10,11029.25,11173.05,10876.38,11007.25,773300000,11007.25
+1999-05-07,10967.16,11135.54,10838.29,11031.59,814900000,11031.59
+1999-05-06,10909.02,11093.44,10730.33,10946.82,875400000,10946.82
+1999-05-05,10902.72,11055.36,10711.15,10955.41,913500000,10955.41
+1999-05-04,11012.11,11140.12,10787.32,10886.11,933100000,10886.11
+1999-05-03,10788.75,11083.13,10701.12,11014.69,811400000,11014.69
+1999-04-30,10933.94,11072.25,10603.76,10789.04,936500000,10789.04
+1999-04-29,10864.64,11052.49,10710.00,10878.38,1003600000,10878.38
+1999-04-28,10806.22,11050.77,10665.90,10845.45,951700000,10845.45
+1999-04-27,10781.88,10977.46,10647.29,10831.71,891700000,10831.71
+1999-04-26,10721.17,10854.33,10540.47,10718.59,712000000,10718.59
+1999-04-23,10646.71,10858.34,10530.45,10689.67,744900000,10689.67
+1999-04-22,10735.77,10896.42,10517.85,10727.18,927900000,10727.18
+1999-04-21,10462.58,10702.56,10309.09,10581.42,920000000,10581.42
+1999-04-20,10440.53,10610.06,10212.87,10448.55,985400000,10448.55
+1999-04-19,10566.07,10879.76,10284.39,10440.53,1214400000,10440.53
+1999-04-16,10497.26,10632.90,10299.55,10493.89,1002300000,10493.89
+1999-04-15,10411.66,10673.90,10201.31,10462.72,1089800000,10462.72
+1999-04-14,10436.91,10692.49,10196.87,10411.66,952000000,10411.66
+1999-04-13,10340.62,10512.11,10239.33,10395.01,810900000,10395.01
+1999-04-12,10094.19,10384.46,10042.02,10339.51,810800000,10339.51
+1999-04-09,10166.62,10298.71,10035.09,10173.84,716100000,10173.84
+1999-04-08,10083.93,10282.62,9980.69,10197.70,850500000,10197.70
+1999-04-07,10023.43,10166.62,9859.98,10085.31,816400000,10085.31
+1999-04-06,9985.69,10097.25,9862.48,9963.49,787500000,9963.49
+1999-04-05,9893.84,10080.87,9826.40,10007.33,695800000,10007.33
+1999-04-01,9825.29,9927.69,9707.91,9832.51,703000000,9832.51
+1999-03-31,9968.21,10025.10,9744.82,9786.16,924300000,9786.16
+1999-03-30,10003.84,10035.36,9812.53,9913.26,729000000,9913.26
+1999-03-29,9879.41,10089.48,9837.78,10006.78,747900000,10006.78
+1999-03-26,9795.88,9923.53,9700.69,9822.24,707200000,9822.24
+1999-03-25,9735.66,9916.59,9666.28,9836.39,784200000,9836.39
+1999-03-24,9702.08,9803.09,9547.23,9666.84,761900000,9666.84
+1999-03-23,9846.66,9897.72,9593.85,9671.83,811300000,9671.83
+1999-03-22,9901.88,10005.95,9796.99,9890.51,658200000,9890.51
+1999-03-19,10107.79,10158.57,9856.37,9903.55,914700000,9903.55
+1999-03-18,9958.59,10060.62,9776.17,9997.62,831000000,9997.62
+1999-03-17,9939.90,10024.54,9792.55,9879.41,752300000,9879.41
+1999-03-16,9969.32,10062.84,9857.48,9930.47,751900000,9930.47
+1999-03-15,9880.24,10027.59,9807.53,9958.77,727200000,9958.77
+1999-03-12,9927.14,10042.58,9779.78,9876.35,825800000,9876.35
+1999-03-11,9815.86,9992.35,9742.32,9897.44,904800000,9897.44
+1999-03-10,9735.10,9849.71,9624.94,9772.84,841900000,9772.84
+1999-03-09,9703.47,9856.65,9586.08,9693.76,803700000,9693.76
+1999-03-08,9728.72,9825.02,9616.33,9727.61,714600000,9727.61
+1999-03-05,9636.65,9799.92,9558.41,9736.08,834900000,9736.08
+1999-03-04,9339.18,9549.99,9272.08,9467.40,770900000,9467.40
+1999-03-03,9311.74,9397.86,9163.41,9275.88,751700000,9275.88
+1999-03-02,9382.10,9494.57,9216.66,9297.61,753600000,9297.61
+1999-03-01,9315.27,9419.32,9167.76,9324.78,699500000,9324.78
+1999-02-26,9382.64,9459.52,9177.54,9306.58,784600000,9306.58
+1999-02-25,9395.66,9446.32,9200.27,9366.34,740500000,9366.34
+1999-02-24,9547.88,9662.77,9357.81,9399.67,782000000,9399.67
+1999-02-23,9549.21,9659.58,9425.26,9544.42,781100000,9544.42
+1999-02-22,9346.62,9596.13,9289.04,9552.68,718500000,9552.68
+1999-02-19,9284.51,9430.59,9218.13,9339.95,700000000,9339.95
+1999-02-18,9239.72,9368.48,9145.09,9298.63,742400000,9298.63
+1999-02-17,9240.79,9409.53,9124.03,9195.47,735100000,9195.47
+1999-02-16,9333.34,9458.46,9187.10,9297.03,653760000,9297.03
+1999-02-12,9346.47,9437.35,9161.35,9274.89,691500000,9274.89
+1999-02-11,9176.28,9423.19,9088.49,9363.46,815800000,9363.46
+1999-02-10,9135.86,9267.68,9025.41,9177.31,721400000,9177.31
+1999-02-09,9268.46,9361.92,9076.13,9133.03,736000000,9133.03
+1999-02-08,9318.66,9427.83,9148.99,9291.11,705400000,9291.11
+1999-02-05,9317.12,9457.43,9141.27,9304.24,872000000,9304.24
+1999-02-04,9389.72,9511.50,9178.60,9304.50,854400000,9304.50
+1999-02-03,9275.41,9454.09,9176.80,9366.81,876500000,9366.81
+1999-02-02,9318.40,9394.10,9146.16,9274.12,845500000,9274.12
+1999-02-01,9405.43,9513.05,9266.91,9345.70,799400000,9345.70
+1999-01-29,9317.37,9457.18,9172.16,9358.83,917000000,9358.83
+1999-01-28,9220.57,9384.83,9134.57,9281.33,848800000,9281.33
+1999-01-27,9378.65,9461.04,9135.86,9200.23,893800000,9200.23
+1999-01-26,9210.78,9408.77,9118.35,9324.58,896400000,9324.58
+1999-01-25,9117.58,9273.09,8994.26,9203.32,723900000,9203.32
+1999-01-22,9149.51,9289.31,8998.89,9120.67,785900000,9120.67
+1999-01-21,9371.96,9479.83,9150.28,9264.08,871800000,9264.08
+1999-01-20,9395.64,9555.01,9230.35,9335.91,905700000,9335.91
+1999-01-19,9408.52,9499.14,9165.73,9355.22,785500000,9355.22
+1999-01-15,9200.74,9381.74,9124.02,9340.55,798100000,9340.55
+1999-01-14,9315.06,9380.20,9052.44,9120.93,797200000,9120.93
+1999-01-13,9213.62,9485.24,9134.06,9349.56,931500000,9349.56
+1999-01-12,9599.55,9680.40,9394.87,9474.68,800200000,9474.68
+1999-01-11,9613.97,9751.46,9446.36,9619.89,818000000,9619.89
+1999-01-08,9612.17,9759.44,9447.91,9643.32,937800000,9643.32
+1999-01-07,9445.33,9616.29,9369.12,9537.76,863000000,9537.76
+1999-01-06,9399.25,9608.05,9331.02,9544.97,986900000,9544.97
+1999-01-05,9201.00,9389.46,9137.66,9311.19,775000000,9311.19
+1999-01-04,9212.84,9393.84,9089.00,9184.27,877000000,9184.27
+1998-12-31,9271.55,9343.64,9106.77,9181.43,719200000,9181.43
+1998-12-30,9310.17,9390.75,9211.30,9274.64,594220000,9274.64
+1998-12-29,9222.63,9375.30,9152.34,9320.98,586490000,9320.98
+1998-12-28,9251.21,9330.50,9133.54,9226.75,531560000,9226.75
+1998-12-24,9202.29,9289.57,9146.42,9217.99,246980000,9217.99
+1998-12-23,9085.91,9255.84,9022.58,9202.03,697500000,9202.03
+1998-12-22,9000.95,9122.99,8909.29,9044.46,680500000,9044.46
+1998-12-21,8903.89,9150.54,8874.28,8988.85,744800000,8988.85
+1998-12-18,8902.86,9012.28,8789.31,8903.63,839600000,8903.63
+1998-12-17,8787.55,8959.76,8725.21,8875.82,739400000,8875.82
+1998-12-16,8843.38,8922.94,8675.52,8790.60,725500000,8790.60
+1998-12-15,8725.72,8878.40,8614.75,8823.30,777900000,8823.30
+1998-12-14,8767.95,8868.10,8610.63,8695.60,741800000,8695.60
+1998-12-11,8814.29,8916.24,8680.41,8821.76,688900000,8821.76
+1998-12-10,9008.42,9034.42,8795.24,8841.58,748600000,8841.58
+1998-12-09,9025.41,9138.18,8881.23,9009.19,694200000,9009.19
+1998-12-08,9038.03,9153.63,8903.37,9027.98,727700000,9027.98
+1998-12-07,9031.59,9146.93,8946.11,9070.47,671200000,9070.47
+1998-12-04,8964.91,9078.70,8873.76,9016.14,709700000,9016.14
+1998-12-03,9031.33,9112.69,8839.78,8879.68,799100000,8879.68
+1998-12-02,9039.57,9154.40,8922.94,9064.54,727400000,9064.54
+1998-12-01,9039.57,9214.65,8934.52,9133.54,789200000,9133.54
+1998-11-30,9292.40,9348.53,9074.07,9116.55,687900000,9116.55
+1998-11-27,9333.85,9403.62,9263.82,9333.08,256950000,9333.08
+1998-11-25,9292.91,9387.66,9199.20,9314.28,583580000,9314.28
+1998-11-24,9327.93,9457.95,9219.28,9301.15,766200000,9301.15
+1998-11-23,9225.72,9425.77,9137.92,9374.27,774100000,9374.27
+1998-11-20,9129.94,9215.93,9048.32,9159.55,721200000,9159.55
+1998-11-19,9081.02,9147.96,8967.22,9056.05,671000000,9056.05
+1998-11-18,8988.85,9095.70,8897.96,9041.11,652510000,9041.11
+1998-11-17,8991.17,9158.26,8870.42,8986.28,705200000,8986.28
+1998-11-16,8921.14,9093.12,8885.09,9011.25,615580000,9011.25
+1998-11-13,8863.21,8982.16,8782.62,8919.59,602270000,8919.59
+1998-11-12,8823.04,8951.26,8733.70,8829.74,662300000,8829.74
+1998-11-11,8922.42,8980.35,8759.19,8823.82,715700000,8823.82
+1998-11-10,8895.17,9020.00,8760.99,8863.98,671300000,8863.98
+1998-11-09,8980.87,9024.89,8813.00,8897.96,592990000,8897.96
+1998-11-06,8902.86,9042.40,8831.02,8975.46,683100000,8975.46
+1998-11-05,8782.11,8943.79,8676.55,8915.47,770200000,8915.47
+1998-11-04,8801.93,8933.49,8660.33,8783.14,861100000,8783.14
+1998-11-03,8708.99,8819.18,8601.88,8706.15,704300000,8706.15
+1998-11-02,8645.65,8804.51,8573.56,8706.15,753800000,8706.15
+1998-10-30,8591.58,8718.25,8481.39,8592.10,785000000,8592.10
+1998-10-29,8371.22,8539.83,8305.54,8495.03,699400000,8495.03
+1998-10-28,8372.74,8504.04,8271.55,8371.97,677500000,8371.97
+1998-10-27,8503.79,8586.69,8309.92,8366.04,764500000,8366.04
+1998-10-26,8483.96,8564.03,8349.57,8432.21,609910000,8432.21
+1998-10-23,8531.34,8589.01,8366.04,8452.29,637640000,8452.29
+1998-10-22,8519.03,8629.17,8334.12,8533.14,754900000,8533.14
+1998-10-21,8504.67,8641.02,8380.72,8519.23,745100000,8519.23
+1998-10-20,8540.09,8713.62,8419.08,8505.85,958200000,8505.85
+1998-10-19,8415.48,8591.07,8321.50,8466.45,738600000,8466.45
+1998-10-16,8384.84,8521.29,8244.26,8416.76,1042200000,8416.76
+1998-10-15,7953.07,8375.57,7885.62,8299.36,937600000,8299.36
+1998-10-14,7925.01,8107.29,7812.75,7968.78,791200000,7968.78
+1998-10-13,7982.68,8093.90,7805.29,7938.14,733300000,7938.14
+1998-10-12,8038.03,8162.65,7931.19,8001.47,691100000,8001.47
+1998-10-09,7806.57,7976.76,7628.15,7899.52,878100000,7899.52
+1998-10-08,7734.48,7822.02,7399.78,7731.91,1114600000,7731.91
+1998-10-07,7754.82,7913.94,7558.89,7741.69,977000000,7741.69
+1998-10-06,7733.97,7951.53,7646.43,7742.98,845700000,7742.98
+1998-10-05,7760.75,7866.82,7507.14,7726.24,817500000,7726.24
+1998-10-02,7631.50,7866.31,7496.84,7784.69,902900000,7784.69
+1998-10-01,7749.42,7856.26,7540.87,7632.53,899700000,7632.53
+1998-09-30,8025.42,8097.51,7775.42,7842.62,800100000,7842.62
+1998-09-29,8141.28,8253.79,7946.63,8080.52,760100000,8080.52
+1998-09-28,8114.76,8239.37,7986.80,8108.84,690500000,8108.84
+1998-09-25,7911.10,8127.89,7849.06,8028.77,736800000,8028.77
+1998-09-24,8117.33,8227.53,7906.73,8001.99,805900000,8001.99
+1998-09-23,7988.60,8198.43,7891.79,8154.41,899700000,8154.41
+1998-09-22,7987.83,8038.29,7816.87,7897.20,694900000,7897.20
+1998-09-21,7739.12,8008.43,7653.64,7933.25,609880000,7933.25
+1998-09-18,7942.77,8012.03,7759.97,7895.66,794700000,7895.66
+1998-09-17,7905.96,8001.99,7795.50,7873.77,694500000,7873.77
+1998-09-16,8061.46,8159.30,7923.46,8089.78,797500000,8089.78
+1998-09-15,7918.83,8087.21,7840.30,8024.39,724600000,8024.39
+1998-09-14,7936.08,8081.29,7848.03,7945.35,714400000,7945.35
+1998-09-11,7583.61,7866.31,7497.10,7795.50,819100000,7795.50
+1998-09-10,7680.42,7761.00,7469.04,7615.54,880300000,7615.54
+1998-09-09,7995.04,8094.16,7796.79,7865.02,704300000,7865.02
+1998-09-08,7964.91,8103.69,7779.03,8020.78,814800000,8020.78
+1998-09-04,7737.32,7831.29,7450.24,7640.25,780300000,7640.25
+1998-09-03,7679.13,7841.59,7499.68,7682.22,880500000,7682.22
+1998-09-02,7901.06,8036.23,7710.54,7782.37,894600000,7782.37
+1998-09-01,7583.09,7937.37,7379.70,7827.43,1216600000,7827.43
+1998-08-31,8078.97,8149.00,7517.70,7539.07,917500000,7539.07
+1998-08-28,8193.54,8301.68,7951.27,8051.68,840300000,8051.68
+1998-08-27,8377.89,8448.69,8062.24,8165.99,938600000,8165.99
+1998-08-26,8492.97,8639.47,8396.68,8523.35,674100000,8523.35
+1998-08-25,8632.00,8740.91,8510.22,8602.65,664900000,8602.65
+1998-08-24,8584.63,8680.66,8452.29,8566.61,558100000,8566.61
+1998-08-21,8600.34,8600.34,8307.60,8533.65,725700000,8533.65
+1998-08-20,8639.47,8726.75,8538.29,8611.41,621630000,8611.41
+1998-08-19,8745.80,8797.81,8635.61,8693.28,633630000,8693.28
+1998-08-18,8593.90,8767.69,8551.93,8714.65,690600000,8714.65
+1998-08-17,8404.66,8613.98,8350.34,8574.85,584380000,8574.85
+1998-08-14,8531.85,8635.87,8342.10,8425.00,644030000,8425.00
+1998-08-13,8535.46,8656.46,8399.51,8459.50,660700000,8459.50
+1998-08-12,8528.76,8621.71,8437.10,8552.96,711700000,8552.96
+1998-08-11,8431.44,8538.29,8263.32,8462.85,774400000,8462.85
+1998-08-10,8585.40,8689.16,8491.17,8574.85,579180000,8574.85
+1998-08-07,8610.63,8745.03,8490.40,8598.02,759100000,8598.02
+1998-08-06,8513.83,8671.14,8415.22,8577.68,768400000,8577.68
+1998-08-05,8493.75,8641.79,8316.10,8546.78,851600000,8546.78
+1998-08-04,8859.86,8896.68,8463.37,8487.31,852600000,8487.31
+1998-08-03,8868.10,8948.17,8729.58,8786.74,620400000,8786.74
+1998-07-31,9024.64,9109.34,8810.94,8883.29,645910000,8883.29
+1998-07-30,8962.85,9113.20,8884.83,9026.95,687400000,9026.95
+1998-07-29,8976.49,9039.57,8831.28,8914.96,644350000,8914.96
+1998-07-28,8982.16,9065.57,8786.48,8934.78,703600000,8934.78
+1998-07-27,8905.17,9084.63,8806.05,9028.24,619990000,9028.24
+1998-07-24,9002.24,9077.67,8814.29,8937.36,698600000,8937.36
+1998-07-23,9130.46,9196.11,8892.56,8932.98,741600000,8932.98
+1998-07-22,9185.71,9264.85,8996.83,9128.91,739800000,9128.91
+1998-07-21,9296.26,9369.12,9145.65,9190.19,659700000,9190.19
+1998-07-20,9340.55,9408.26,9206.15,9295.75,560580000,9295.75
+1998-07-17,9328.19,9412.64,9259.96,9337.97,618030000,9337.97
+1998-07-16,9233.23,9368.35,9173.19,9328.19,677800000,9328.19
+1998-07-15,9246.57,9388.69,9165.99,9234.47,723900000,9234.47
+1998-07-14,9100.07,9314.54,9087.20,9245.54,700300000,9245.54
+1998-07-13,9107.03,9186.58,9020.52,9096.21,574880000,9096.21
+1998-07-10,9098.53,9194.82,8976.23,9105.74,576080000,9105.74
+1998-07-09,9135.36,9217.07,9014.30,9089.78,663600000,9089.78
+1998-07-08,9107.96,9231.27,9041.70,9174.97,607230000,9174.97
+1998-07-07,9094.76,9209.85,9001.84,9085.04,624890000,9085.04
+1998-07-06,9017.53,9137.11,8965.97,9091.77,514750000,9091.77
+1998-07-02,9037.71,9094.01,8956.25,9025.26,510210000,9025.26
+1998-07-01,9011.56,9103.23,8918.64,9048.67,701600000,9048.67
+1998-06-30,9010.81,9085.79,8868.57,8952.02,757200000,8952.02
+1998-06-29,9002.34,9099.24,8930.84,8997.36,564350000,8997.36
+1998-06-26,8948.28,9047.93,8879.78,8944.54,520050000,8944.54
+1998-06-25,8950.52,9079.56,8863.58,8935.58,669900000,8935.58
+1998-06-24,8828.46,8970.20,8740.52,8923.87,714900000,8923.87
+1998-06-23,8789.35,8877.78,8724.83,8828.46,657100000,8828.46
+1998-06-22,8705.65,8805.04,8639.38,8711.13,531550000,8711.13
+1998-06-19,8844.90,8885.01,8664.79,8712.87,715500000,8712.87
+1998-06-18,8825.72,8900.20,8740.77,8813.01,590440000,8813.01
+1998-06-17,8745.51,8932.34,8695.43,8829.46,744400000,8829.46
+1998-06-16,8666.04,8751.24,8524.55,8665.29,664600000,8665.29
+1998-06-15,8723.34,8818.99,8588.32,8627.93,595820000,8627.93
+1998-06-12,8812.77,8891.24,8660.56,8834.94,633300000,8834.94
+1998-06-11,8975.43,9015.54,8774.40,8811.77,627470000,8811.77
+1998-06-10,9031.98,9145.08,8891.98,8971.70,609410000,8971.70
+1998-06-09,9074.58,9130.13,8966.72,9049.92,563610000,9049.92
+1998-06-08,9052.66,9155.04,8994.12,9069.60,543390000,9069.60
+1998-06-05,8920.88,9057.39,8866.57,9037.71,558440000,9037.71
+1998-06-04,8798.07,8916.64,8719.85,8870.56,577470000,8870.56
+1998-06-03,8909.42,8970.20,8769.67,8803.80,584480000,8803.80
+1998-06-02,8961.48,9014.05,8838.92,8891.24,590930000,8891.24
+1998-06-01,8907.93,9023.01,8805.04,8922.37,537660000,8922.37
+1998-05-29,9004.83,9060.13,8859.60,8899.95,556780000,8899.95
+1998-05-28,8947.53,9040.70,8861.59,8970.20,588900000,8970.20
+1998-05-27,8902.45,9015.04,8760.95,8936.57,682040000,8936.57
+1998-05-26,9167.00,9201.63,8949.78,8963.73,541410000,8963.73
+1998-05-22,9153.05,9209.35,9040.70,9114.44,444070000,9114.44
+1998-05-21,9173.48,9248.96,9058.64,9132.37,551970000,9132.37
+1998-05-20,9101.98,9219.06,9010.56,9171.48,587240000,9171.48
+1998-05-19,9097.00,9164.51,8997.36,9054.65,566020000,9054.65
+1998-05-18,9088.53,9171.23,8972.20,9050.91,519100000,9050.91
+1998-05-15,9161.52,9240.74,9051.91,9096.00,621990000,9096.00
+1998-05-14,9136.86,9266.89,9077.07,9172.23,578380000,9172.23
+1998-05-13,9178.06,9283.09,9119.67,9211.84,600010000,9211.84
+1998-05-12,9098.00,9214.08,9023.51,9161.77,604420000,9161.77
+1998-05-11,9125.65,9231.52,9045.43,9091.52,560840000,9091.52
+1998-05-08,8981.91,9143.09,8951.27,9055.15,567890000,9055.15
+1998-05-07,9044.44,9102.98,8914.90,8976.68,582240000,8976.68
+1998-05-06,9174.72,9223.80,9017.28,9054.65,606540000,9054.65
+1998-05-05,9189.92,9251.95,9062.37,9147.57,583630000,9147.57
+1998-05-04,9201.38,9311.98,9134.86,9192.66,551700000,9192.66
+1998-05-01,9106.47,9211.84,9015.54,9147.07,581970000,9147.07
+1998-04-30,9018.28,9169.99,8970.95,9063.37,695600000,9063.37
+1998-04-29,8899.21,9036.47,8857.85,8951.52,638790000,8951.52
+1998-04-28,8920.88,9051.16,8828.71,8898.96,678600000,8898.96
+1998-04-27,8937.07,9026.25,8796.08,8917.64,685960000,8917.64
+1998-04-24,9143.83,9206.36,8983.65,9064.62,633890000,9064.62
+1998-04-23,9176.96,9269.88,9061.88,9143.33,653190000,9143.33
+1998-04-22,9184.93,9287.32,9083.80,9176.72,696740000,9176.72
+1998-04-21,9137.85,9250.20,9051.41,9184.94,675640000,9184.94
+1998-04-20,9166.75,9245.22,9027.25,9141.84,595190000,9141.84
+1998-04-17,9077.57,9213.58,9010.06,9167.50,672290000,9167.50
+1998-04-16,9162.27,9204.12,8978.92,9076.57,699570000,9076.57
+1998-04-15,9110.45,9249.95,9017.53,9162.27,685020000,9162.27
+1998-04-14,9014.30,9177.96,8971.45,9110.20,613730000,9110.20
+1998-04-13,8997.11,9107.21,8870.31,9012.30,564480000,9012.30
+1998-04-09,8891.48,9062.12,8891.48,8994.86,548940000,8994.86
+1998-04-08,8951.52,9023.51,8821.73,8891.48,616330000,8891.48
+1998-04-07,8995.36,9072.34,8862.34,8956.50,670760000,8956.50
+1998-04-06,9051.16,9170.74,8958.49,9033.23,625810000,9033.23
+1998-04-03,8986.64,9085.79,8896.22,8983.41,653880000,8983.41
+1998-04-02,8900.20,9025.26,8829.21,8986.64,674340000,8986.64
+1998-04-01,8818.50,8935.33,8715.61,8868.32,677310000,8868.32
+1998-03-31,8852.12,8937.57,8726.32,8799.81,674930000,8799.81
+1998-03-30,8802.30,8877.04,8701.66,8782.12,497400000,8782.12
+1998-03-27,8835.68,8941.31,8741.77,8796.08,582190000,8796.08
+1998-03-26,8847.89,8931.09,8769.92,8846.89,606770000,8846.89
+1998-03-25,8943.05,8997.11,8780.88,8872.80,676550000,8872.80
+1998-03-24,8887.00,8962.48,8815.01,8904.44,605720000,8904.44
+1998-03-23,8839.42,8939.31,8758.71,8816.25,631350000,8816.25
+1998-03-20,8814.01,8957.25,8766.43,8906.43,717310000,8906.43
+1998-03-19,8776.89,8855.11,8708.64,8803.05,598240000,8803.05
+1998-03-18,8749.24,8825.72,8655.83,8775.40,632690000,8775.40
+1998-03-17,8706.64,8812.52,8633.41,8749.99,680960000,8749.99
+1998-03-16,8647.36,8760.45,8573.37,8718.85,548980000,8718.85
+1998-03-13,8669.28,8733.30,8563.90,8602.52,597800000,8602.52
+1998-03-12,8622.20,8725.58,8576.86,8659.56,594940000,8659.56
+1998-03-11,8682.73,8740.52,8599.28,8675.75,655260000,8675.75
+1998-03-10,8623.19,8688.71,8550.45,8643.12,631920000,8643.12
+1998-03-09,8601.02,8661.56,8482.45,8567.14,624700000,8567.14
+1998-03-06,8505.86,8610.49,8432.62,8569.39,665500000,8569.39
+1998-03-05,8480.20,8536.80,8377.32,8444.33,648270000,8444.33
+1998-03-04,8524.55,8609.99,8454.79,8539.24,644280000,8539.24
+1998-03-03,8532.77,8632.16,8464.26,8584.83,612360000,8584.83
+1998-03-02,8528.78,8649.35,8427.89,8550.45,591470000,8550.45
+1998-02-27,8532.77,8616.72,8426.15,8545.72,574480000,8545.72
+1998-02-26,8471.48,8541.98,8377.82,8490.67,646280000,8490.67
+1998-02-25,8455.29,8510.60,8362.37,8457.78,611350000,8457.78
+1998-02-24,8370.10,8457.78,8303.83,8370.10,589880000,8370.10
+1998-02-23,8381.31,8490.92,8331.98,8410.20,550730000,8410.20
+1998-02-20,8350.67,8449.06,8291.88,8413.94,594300000,8413.94
+1998-02-19,8379.56,8463.26,8327.25,8375.58,581820000,8375.58
+1998-02-18,8419.17,8503.12,8326.75,8451.06,606000000,8451.06
+1998-02-17,8439.35,8483.94,8335.97,8398.50,605890000,8398.50
+1998-02-13,8346.68,8416.43,8269.21,8370.10,531940000,8370.10
+1998-02-12,8260.49,8412.20,8206.93,8369.60,611480000,8369.60
+1998-02-11,8298.60,8367.61,8223.87,8314.55,599300000,8314.55
+1998-02-10,8241.81,8368.10,8149.88,8295.61,642800000,8295.61
+1998-02-09,8185.26,8256.75,8104.55,8180.52,524810000,8180.52
+1998-02-06,8178.28,8255.26,8102.30,8189.49,569650000,8189.49
+1998-02-05,8129.71,8215.65,8037.54,8117.25,703980000,8117.25
+1998-02-04,8160.35,8188.00,8050.99,8129.71,695420000,8129.71
+1998-02-03,8107.78,8193.23,8010.63,8160.35,692120000,8160.35
+1998-02-02,7987.46,8157.86,7987.46,8107.78,724320000,8107.78
+1998-01-30,7973.02,8023.83,7850.95,7906.50,613380000,7906.50
+1998-01-29,7915.47,8015.12,7883.09,7973.02,750760000,7973.02
+1998-01-28,7815.08,7985.97,7761.52,7915.47,708470000,7915.47
+1998-01-27,7712.94,7890.56,7677.07,7815.08,679140000,7815.08
+1998-01-26,7700.74,7813.59,7629.99,7712.94,555080000,7712.94
+1998-01-23,7730.88,7814.08,7609.31,7700.74,635770000,7700.74
+1998-01-22,7794.40,7833.26,7637.71,7730.88,646570000,7730.88
+1998-01-21,7873.12,7874.87,7707.96,7794.40,626160000,7794.40
+1998-01-20,7753.55,7908.00,7696.01,7873.12,644790000,7873.12
+1998-01-16,7691.77,7846.47,7687.04,7753.55,670080000,7753.55
+1998-01-15,7784.69,7803.87,7651.66,7691.77,569050000,7691.77
+1998-01-14,7732.13,7836.25,7669.10,7784.69,603280000,7784.69
+1998-01-13,7647.18,7791.17,7610.31,7732.13,646740000,7732.13
+1998-01-12,7580.42,7706.22,7391.59,7647.18,705450000,7647.18
+1998-01-09,7802.62,7815.08,7513.41,7580.42,746420000,7580.42
+1998-01-08,7902.27,7935.40,7733.12,7802.62,652140000,7802.62
+1998-01-07,7906.25,7943.87,7751.56,7902.27,667390000,7902.27
+1998-01-06,7978.99,7999.17,7832.52,7906.25,618360000,7906.25
+1998-01-05,7965.04,8072.91,7865.40,7978.99,628070000,7978.99
+1998-01-02,7908.25,8001.41,7845.47,7965.04,366730000,7965.04
+1997-12-31,7915.97,7995.93,7833.76,7908.25,467280000,7908.25
+1997-12-30,7792.41,7958.32,7787.68,7915.97,499500000,7915.97
+1997-12-29,7712.94,7835.01,7712.94,7792.41,443160000,7792.41
+1997-12-26,7660.13,7743.34,7634.72,7679.31,154900000,7679.31
+1997-12-24,7691.77,7767.75,7624.26,7660.13,265980000,7660.13
+1997-12-23,7819.31,7874.12,7667.11,7691.77,515070000,7691.77
+1997-12-22,7756.29,7892.05,7710.45,7819.31,530670000,7819.31
+1997-12-19,7846.50,7878.60,7563.23,7756.29,793200000,7756.29
+1997-12-18,7957.41,7991.48,7781.35,7846.50,618870000,7846.50
+1997-12-17,7976.31,8068.81,7879.08,7957.41,618900000,7957.41
+1997-12-16,7922.59,8069.06,7889.52,7976.31,623320000,7976.31
+1997-12-15,7838.30,7992.72,7807.96,7922.59,597150000,7922.59
+1997-12-12,7848.99,7947.21,7756.73,7838.30,579280000,7838.30
+1997-12-11,7961.64,7961.64,7778.37,7848.99,631770000,7848.99
+1997-12-10,8049.66,8077.27,7881.07,7978.79,602290000,7978.79
+1997-12-09,8110.84,8142.67,7990.98,8049.66,539130000,8049.66
+1997-12-08,8149.13,8195.88,8057.37,8110.84,490320000,8110.84
+1997-12-05,8050.16,8209.56,7980.04,8149.13,563590000,8149.13
+1997-12-04,8032.01,8159.58,7978.30,8050.16,633470000,8050.16
+1997-12-03,8018.83,8118.30,7915.63,8032.01,624610000,8032.01
+1997-12-02,8013.11,8096.66,7935.03,8018.83,576120000,8018.83
+1997-12-01,7823.62,8048.92,7823.62,8013.11,590300000,8013.11
+1997-11-28,7794.78,7872.86,7786.08,7823.13,189070000,7823.13
+1997-11-26,7808.95,7893.50,7749.77,7794.78,487750000,7794.78
+1997-11-25,7767.92,7880.32,7706.00,7808.95,587890000,7808.95
+1997-11-24,7881.07,7887.28,7723.41,7767.92,514920000,7767.92
+1997-11-21,7826.61,7934.53,7758.47,7881.07,611000000,7881.07
+1997-11-20,7724.74,7889.77,7718.19,7826.61,602610000,7826.61
+1997-11-19,7650.82,7779.75,7599.50,7724.74,542720000,7724.74
+1997-11-18,7698.22,7772.62,7607.11,7650.82,521380000,7650.82
+1997-11-17,7613.49,7781.71,7613.49,7698.22,576540000,7698.22
+1997-11-14,7487.76,7634.61,7431.03,7572.48,635760000,7572.48
+1997-11-13,7401.32,7546.45,7334.77,7487.76,653960000,7487.76
+1997-11-12,7558.73,7573.22,7359.32,7401.32,585340000,7401.32
+1997-11-11,7552.59,7599.74,7518.21,7558.73,435660000,7558.73
+1997-11-10,7581.32,7687.90,7511.83,7552.59,464140000,7552.59
+1997-11-07,7646.89,7646.89,7460.99,7581.32,569980000,7581.32
+1997-11-06,7692.57,7758.63,7597.78,7683.24,522890000,7683.24
+1997-11-05,7689.13,7791.78,7628.96,7692.57,565680000,7692.57
+1997-11-04,7674.39,7757.15,7583.29,7689.13,541590000,7689.13
+1997-11-03,7443.07,7674.39,7443.07,7674.39,564740000,7674.39
+1997-10-31,7381.67,7544.24,7329.61,7442.08,638070000,7442.08
+1997-10-30,7506.67,7569.78,7340.42,7381.67,712230000,7381.67
+1997-10-29,7498.32,7664.08,7409.67,7506.67,777660000,7506.67
+1997-10-28,7161.15,7553.57,6936.45,7498.32,1202550000,7498.32
+1997-10-27,7715.41,7717.37,7150.10,7161.15,693730000,7161.15
+1997-10-24,7847.77,7975.47,7645.91,7715.41,677630000,7715.41
+1997-10-23,7957.05,7957.05,7767.22,7847.77,673270000,7847.77
+1997-10-22,8060.44,8124.78,7941.33,8034.65,613490000,8034.65
+1997-10-21,7921.44,8090.40,7909.41,8060.44,582310000,8060.44
+1997-10-20,7847.03,7966.63,7774.83,7921.44,483880000,7921.44
+1997-10-17,7938.88,7953.61,7731.12,7847.03,624980000,7847.03
+1997-10-16,8057.98,8146.14,7880.18,7938.88,597010000,7938.88
+1997-10-15,8096.29,8127.48,7997.57,8057.98,505310000,8057.98
+1997-10-14,8072.22,8168.24,7990.20,8096.29,510330000,8096.29
+1997-10-13,8045.21,8150.31,8026.30,8072.22,354800000,8072.22
+1997-10-10,8061.42,8091.38,7961.96,8045.21,500680000,8045.21
+1997-10-09,8095.06,8127.72,7980.87,8061.42,551840000,8061.42
+1997-10-08,8178.31,8208.52,8019.92,8095.06,573110000,8095.06
+1997-10-07,8100.22,8218.34,8058.96,8178.31,551970000,8178.31
+1997-10-06,8038.58,8160.63,8017.71,8100.22,495620000,8100.22
+1997-10-03,8027.53,8183.22,7937.89,8038.58,623370000,8038.58
+1997-10-02,8015.50,8087.45,7943.79,8027.53,474760000,8027.53
+1997-10-01,7945.26,8081.06,7909.41,8015.50,598660000,8015.50
+1997-09-30,7991.43,8045.70,7900.08,7945.26,587500000,7945.26
+1997-09-29,7922.18,8030.48,7862.99,7991.43,477100000,7991.43
+1997-09-26,7853.66,7970.80,7853.66,7922.18,505340000,7922.18
+1997-09-25,7906.71,7962.45,7802.34,7848.01,524880000,7848.01
+1997-09-24,7970.06,8065.84,7866.43,7906.71,639460000,7906.71
+1997-09-23,7996.83,8048.16,7885.34,7970.06,522930000,7970.06
+1997-09-22,7917.27,8078.36,7889.27,7996.83,490900000,7996.83
+1997-09-19,7922.72,7972.29,7821.69,7917.27,631040000,7917.27
+1997-09-18,7886.44,8049.36,7858.93,7922.72,566830000,7922.72
+1997-09-17,7895.92,7981.54,7816.47,7886.44,590550000,7886.44
+1997-09-16,7721.14,7951.18,7709.75,7895.92,636380000,7895.92
+1997-09-15,7742.97,7832.86,7680.95,7721.14,468030000,7721.14
+1997-09-12,7660.98,7779.67,7584.56,7742.97,544150000,7742.97
+1997-09-11,7719.28,7745.29,7556.23,7660.98,575020000,7660.98
+1997-09-10,7851.91,7868.16,7686.30,7719.28,517620000,7719.28
+1997-09-09,7835.18,7922.05,7768.52,7851.91,502200000,7851.91
+1997-09-08,7822.41,7921.35,7795.00,7835.18,466430000,7835.18
+1997-09-05,7867.24,7952.01,7765.27,7822.41,536400000,7822.41
+1997-09-04,7894.64,7936.45,7788.50,7867.24,559310000,7867.24
+1997-09-03,7879.78,7972.22,7828.45,7894.64,549060000,7894.64
+1997-09-02,7650.99,7903.47,7650.99,7879.78,491870000,7879.78
+1997-08-29,7694.43,7729.73,7580.85,7622.42,413910000,7622.42
+1997-08-28,7787.33,7831.70,7634.50,7694.43,486300000,7694.43
+1997-08-27,7782.22,7850.51,7666.55,7787.33,492150000,7787.33
+1997-08-26,7859.57,7891.62,7734.61,7782.22,449110000,7782.22
+1997-08-25,7887.91,7974.08,7791.75,7859.57,388990000,7859.57
+1997-08-22,7893.95,7904.86,7695.36,7887.91,460160000,7887.91
+1997-08-21,8021.23,8043.06,7834.02,7893.95,499000000,7893.95
+1997-08-20,7918.10,8037.95,7870.95,8021.23,521270000,8021.23
+1997-08-19,7803.36,7947.37,7776.65,7918.10,545630000,7918.10
+1997-08-18,7694.66,7847.49,7588.28,7803.36,514330000,7803.36
+1997-08-15,7919.26,7919.26,7685.14,7694.66,537820000,7694.66
+1997-08-14,7928.32,8027.73,7843.54,7942.03,530460000,7942.03
+1997-08-13,7960.84,8075.58,7848.19,7928.32,587210000,7928.32
+1997-08-12,8062.11,8132.49,7926.46,7960.84,499310000,7960.84
+1997-08-11,8031.22,8122.27,7922.52,8062.11,480340000,8062.11
+1997-08-08,8170.58,8170.58,7961.07,8031.22,563420000,8031.22
+1997-08-07,8259.31,8340.14,8158.73,8188.00,576030000,8188.00
+1997-08-06,8187.54,8302.05,8130.63,8259.31,565200000,8259.31
+1997-08-05,8198.45,8251.88,8129.93,8187.54,525710000,8187.54
+1997-08-04,8194.04,8261.40,8097.65,8198.45,456000000,8198.45
+1997-08-01,8222.61,8287.65,8062.11,8194.04,513750000,8194.04
+1997-07-31,8254.89,8328.99,8160.36,8222.61,547830000,8222.61
+1997-07-30,8174.53,8313.19,8156.88,8254.89,568470000,8254.89
+1997-07-29,8121.11,8232.36,8049.34,8174.53,544540000,8174.53
+1997-07-28,8113.44,8221.68,8051.89,8121.11,466920000,8121.11
+1997-07-25,8116.93,8200.31,8037.95,8113.44,521510000,8113.44
+1997-07-24,8088.36,8174.53,7968.51,8116.93,571020000,8116.93
+1997-07-23,8061.65,8199.15,8024.95,8088.36,616930000,8088.36
+1997-07-22,7906.72,8093.93,7870.72,8061.65,579590000,8061.65
+1997-07-21,7890.46,7981.51,7783.85,7906.72,459500000,7906.72
+1997-07-18,8020.77,8057.23,7829.61,7890.46,589710000,7890.46
+1997-07-17,8038.88,8136.67,7910.67,8020.77,629250000,8020.77
+1997-07-16,7975.71,8108.10,7919.73,8038.88,647390000,8038.88
+1997-07-15,7922.98,8037.03,7843.78,7975.71,598370000,7975.71
+1997-07-14,7921.82,8001.26,7831.00,7922.98,485960000,7922.98
+1997-07-11,7886.76,7984.02,7837.68,7921.82,500050000,7921.82
+1997-07-10,7842.43,7953.94,7777.06,7886.76,551340000,7886.76
+1997-07-09,7962.31,8027.68,7775.48,7842.43,589110000,7842.43
+1997-07-08,7858.49,8000.08,7824.33,7962.31,526010000,7962.31
+1997-07-07,7895.81,7983.79,7805.34,7858.49,518780000,7858.49
+1997-07-03,7805.79,7952.35,7805.79,7895.81,374680000,7895.81
+1997-07-02,7722.33,7814.38,7648.14,7795.38,526970000,7795.38
+1997-07-01,7672.79,7801.04,7613.53,7722.33,544190000,7722.33
+1997-06-30,7687.72,7768.01,7571.46,7672.79,561540000,7672.79
+1997-06-27,7654.25,7793.12,7627.33,7687.72,472540000,7687.72
+1997-06-26,7689.98,7754.22,7581.64,7654.25,499780000,7654.25
+1997-06-25,7758.06,7832.48,7615.57,7689.98,603040000,7689.98
+1997-06-24,7787.01,7787.01,7602.90,7758.06,542650000,7758.06
+1997-06-23,7796.51,7816.87,7592.04,7604.26,492940000,7604.26
+1997-06-20,7777.06,7868.44,7733.64,7796.51,653110000,7796.51
+1997-06-19,7718.71,7834.51,7697.45,7777.06,536940000,7777.06
+1997-06-18,7760.78,7789.28,7651.30,7718.71,491740000,7718.71
+1997-06-17,7772.09,7834.97,7680.71,7760.78,543010000,7760.78
+1997-06-16,7782.04,7829.99,7712.37,7772.09,414280000,7772.09
+1997-06-13,7711.47,7829.08,7683.42,7782.04,575810000,7782.04
+1997-06-12,7575.83,7741.42,7569.66,7711.47,592730000,7711.47
+1997-06-11,7539.27,7633.96,7476.29,7575.83,513740000,7575.83
+1997-06-10,7478.50,7599.61,7459.12,7539.27,526980000,7539.27
+1997-06-09,7435.78,7548.52,7412.44,7478.50,465810000,7478.50
+1997-06-06,7305.29,7473.98,7290.26,7435.78,488940000,7435.78
+1997-06-05,7269.66,7376.97,7241.33,7305.29,452610000,7305.29
+1997-06-04,7312.15,7350.36,7214.29,7269.66,466690000,7269.66
+1997-06-03,7289.40,7379.98,7225.02,7312.15,527120000,7312.15
+1997-06-02,7331.04,7383.84,7244.76,7289.40,435950000,7289.40
+1997-05-30,7330.18,7385.99,7203.99,7331.04,537200000,7331.04
+1997-05-29,7357.23,7404.44,7272.24,7330.18,462600000,7330.18
+1997-05-28,7383.41,7430.20,7287.26,7357.23,487340000,7357.23
+1997-05-27,7345.91,7421.32,7276.68,7383.41,436150000,7383.41
+1997-05-23,7260.61,7382.58,7260.61,7345.91,417030000,7345.91
+1997-05-22,7290.69,7348.79,7210.33,7258.13,426940000,7258.13
+1997-05-21,7303.46,7385.47,7218.99,7290.69,540730000,7290.69
+1997-05-20,7228.88,7336.02,7123.38,7303.46,450850000,7303.46
+1997-05-19,7194.67,7274.21,7140.69,7228.88,345140000,7228.88
+1997-05-16,7332.31,7332.31,7192.61,7194.67,486780000,7194.67
+1997-05-15,7286.16,7363.63,7225.99,7333.55,458180000,7333.55
+1997-05-14,7274.21,7381.76,7238.35,7286.16,504960000,7286.16
+1997-05-13,7292.75,7350.85,7211.16,7274.21,489760000,7274.21
+1997-05-12,7169.53,7317.47,7156.35,7292.75,459370000,7292.75
+1997-05-09,7136.62,7235.76,7079.63,7169.53,455690000,7169.53
+1997-05-08,7085.65,7236.96,7040.30,7136.62,534120000,7136.62
+1997-05-07,7225.32,7246.60,7064.78,7085.65,500580000,7085.65
+1997-05-06,7213.68,7299.98,7139.43,7225.32,603680000,7225.32
+1997-05-05,7071.20,7220.91,7029.46,7213.68,549410000,7213.68
+1997-05-02,6976.48,7104.51,6935.54,7071.20,499770000,7071.20
+1997-05-01,7008.99,7041.90,6891.39,6976.48,460380000,6976.48
+1997-04-30,6962.03,7081.23,6912.26,7008.99,562830000,7008.99
+1997-04-29,6820.75,6998.15,6820.75,6962.03,547690000,6962.03
+1997-04-28,6738.87,6826.37,6691.51,6783.02,404470000,6783.02
+1997-04-25,6792.25,6826.77,6681.08,6738.87,414350000,6738.87
+1997-04-24,6812.72,6923.90,6742.89,6792.25,493640000,6792.25
+1997-04-23,6833.59,6902.23,6746.50,6812.72,489350000,6812.72
+1997-04-22,6660.21,6858.08,6628.50,6833.59,507500000,6833.59
+1997-04-21,6703.55,6768.17,6594.38,6660.21,397300000,6660.21
+1997-04-18,6658.60,6749.71,6616.46,6703.55,468940000,6703.55
+1997-04-17,6679.87,6750.91,6600.80,6658.60,503760000,6658.60
+1997-04-16,6587.16,6708.77,6506.08,6679.87,498820000,6679.87
+1997-04-15,6457.92,6626.09,6457.92,6587.16,507370000,6587.16
+1997-04-14,6391.69,6487.22,6315.84,6451.90,406800000,6451.90
+1997-04-11,6529.48,6529.48,6358.42,6391.69,444380000,6391.69
+1997-04-10,6563.84,6626.91,6495.48,6540.05,421790000,6540.05
+1997-04-09,6609.16,6662.41,6521.16,6563.84,451500000,6563.84
+1997-04-08,6555.91,6638.62,6491.71,6609.16,450790000,6609.16
+1997-04-07,6526.07,6639.00,6508.70,6555.91,453790000,6555.91
+1997-04-04,6477.35,6561.57,6376.90,6526.07,544580000,6526.07
+1997-04-03,6517.01,6540.43,6379.16,6477.35,498010000,6477.35
+1997-04-02,6611.05,6636.73,6476.60,6517.01,478210000,6517.01
+1997-04-01,6583.48,6667.70,6482.64,6611.05,515770000,6611.05
+1997-03-31,6740.59,6743.23,6532.49,6583.48,555880000,6583.48
+1997-03-27,6880.70,6918.47,6654.86,6740.59,476790000,6740.59
+1997-03-26,6876.17,6954.72,6811.21,6880.70,506670000,6880.70
+1997-03-25,6905.25,6984.94,6832.74,6876.17,487520000,6876.17
+1997-03-24,6804.79,6933.58,6746.63,6905.25,451970000,6905.25
+1997-03-21,6820.28,6890.52,6742.85,6804.79,544830000,6804.79
+1997-03-20,6877.68,6901.47,6765.14,6820.28,497480000,6820.28
+1997-03-19,6896.56,6944.15,6794.22,6877.68,539200000,6877.68
+1997-03-18,6955.48,6997.40,6841.05,6896.56,467490000,6896.56
+1997-03-17,6935.46,7004.20,6820.28,6955.48,495260000,6955.48
+1997-03-14,6878.89,6996.27,6851.19,6935.46,491540000,6935.46
+1997-03-13,7023.59,7023.59,6852.72,6878.89,507560000,6878.89
+1997-03-12,7085.16,7111.72,6988.96,7039.37,490200000,7039.37
+1997-03-11,7079.39,7158.28,7026.28,7085.16,493250000,7085.16
+1997-03-10,7000.89,7103.25,6970.10,7079.39,468780000,7079.39
+1997-03-07,6944.70,7047.07,6927.00,7000.89,508270000,7000.89
+1997-03-06,6945.85,7017.05,6896.60,6944.70,540310000,6944.70
+1997-03-05,6852.72,6966.64,6836.95,6945.85,532500000,6945.85
+1997-03-04,6918.92,6983.95,6814.63,6852.72,537890000,6852.72
+1997-03-03,6877.74,6957.01,6798.46,6918.92,437220000,6918.92
+1997-02-28,6925.07,6978.18,6820.78,6877.74,508280000,6877.74
+1997-02-27,6983.18,7028.59,6885.44,6925.07,467190000,6925.07
+1997-02-26,7037.83,7076.31,6878.12,6983.18,573920000,6983.18
+1997-02-25,7008.20,7099.79,6935.08,7037.83,527450000,7037.83
+1997-02-24,6931.62,7049.76,6868.50,7008.20,462450000,7008.20
+1997-02-21,6927.38,6984.72,6869.27,6931.62,478450000,6931.62
+1997-02-20,7020.13,7035.91,6890.82,6927.38,492220000,6927.38
+1997-02-19,7067.46,7112.87,6980.87,7020.13,519350000,7020.13
+1997-02-18,6988.96,7084.39,6946.62,7067.46,474110000,7067.46
+1997-02-14,7022.44,7074.77,6935.85,6988.96,491540000,6988.96
+1997-02-13,6961.63,7074.39,6924.30,7022.44,593710000,7022.44
+1997-02-12,6858.11,6976.64,6844.26,6961.63,563890000,6961.63
+1997-02-11,6806.54,6887.36,6756.90,6858.11,483090000,6858.11
+1997-02-10,6855.80,6908.14,6771.14,6806.54,471590000,6806.54
+1997-02-07,6773.06,6906.22,6747.28,6855.80,540910000,6855.80
+1997-02-06,6746.90,6821.17,6683.40,6773.06,519660000,6773.06
+1997-02-05,6833.48,6913.14,6704.56,6746.90,580520000,6746.90
+1997-02-04,6806.16,6859.65,6738.43,6833.48,506530000,6833.48
+1997-02-03,6813.09,6858.11,6733.04,6806.16,463600000,6806.16
+1997-01-31,6823.86,6912.37,6769.99,6813.09,578550000,6813.09
+1997-01-30,6740.74,6845.03,6719.96,6823.86,524160000,6823.86
+1997-01-29,6656.08,6766.91,6627.98,6740.74,498390000,6740.74
+1997-01-28,6660.69,6823.48,6612.20,6656.08,541580000,6656.08
+1997-01-27,6696.48,6748.82,6598.73,6660.69,445760000,6660.69
+1997-01-24,6755.75,6798.08,6629.91,6696.48,542920000,6696.48
+1997-01-23,6850.03,6953.55,6724.19,6755.75,685070000,6755.75
+1997-01-22,6883.90,6913.14,6801.16,6850.03,587300000,6850.03
+1997-01-21,6843.87,6934.69,6771.14,6883.90,571280000,6883.90
+1997-01-20,6833.10,6893.13,6777.30,6843.87,440470000,6843.87
+1997-01-17,6765.37,6863.88,6732.66,6833.10,534640000,6833.10
+1997-01-16,6726.88,6818.47,6688.40,6765.37,537290000,6765.37
+1997-01-15,6762.29,6800.77,6669.93,6726.88,524990000,6726.88
+1997-01-14,6709.18,6816.17,6689.94,6762.29,531600000,6762.29
+1997-01-13,6703.79,6773.45,6647.99,6709.18,445400000,6709.18
+1997-01-10,6625.67,6725.35,6530.62,6703.79,545860000,6703.79
+1997-01-09,6549.48,6677.24,6520.23,6625.67,555370000,6625.67
+1997-01-08,6600.66,6650.30,6509.84,6549.48,557510000,6549.48
+1997-01-07,6567.18,6621.82,6481.75,6600.66,538220000,6600.66
+1997-01-06,6544.09,6647.22,6508.30,6567.18,531350000,6567.18
+1997-01-03,6442.49,6586.42,6437.10,6544.09,452970000,6544.09
+1997-01-02,6448.27,6511.38,6318.96,6442.49,463230000,6442.49
+1996-12-31,6549.37,6580.90,6421.74,6448.27,399760000,6448.27
+1996-12-30,6560.91,6623.96,6518.23,6549.37,339060000,6549.37
+1996-12-27,6546.68,6607.81,6510.93,6560.91,253810000,6560.91
+1996-12-26,6522.85,6594.74,6495.94,6546.68,254630000,6546.68
+1996-12-24,6489.02,6546.68,6467.10,6522.85,165140000,6522.85
+1996-12-23,6484.40,6539.76,6428.27,6489.02,343280000,6489.02
+1996-12-20,6473.64,6597.43,6445.19,6484.40,654340000,6484.40
+1996-12-19,6352.15,6499.40,6352.15,6473.64,526410000,6473.64
+1996-12-18,6308.33,6399.06,6272.96,6346.77,500490000,6346.77
+1996-12-17,6268.35,6354.46,6206.83,6308.33,519840000,6308.33
+1996-12-16,6304.87,6388.68,6227.98,6268.35,447560000,6268.35
+1996-12-13,6303.71,6377.14,6227.59,6304.87,458540000,6304.87
+1996-12-12,6402.52,6465.57,6283.72,6303.71,492920000,6303.71
+1996-12-11,6457.88,6457.88,6317.94,6402.52,494210000,6402.52
+1996-12-10,6463.94,6545.56,6427.04,6473.25,446120000,6473.25
+1996-12-09,6381.94,6496.73,6375.98,6463.94,381570000,6463.94
+1996-12-06,6437.10,6441.20,6274.24,6381.94,500860000,6381.94
+1996-12-05,6422.94,6491.14,6363.31,6437.10,483710000,6437.10
+1996-12-04,6442.69,6482.20,6339.46,6422.94,498240000,6422.94
+1996-12-03,6521.70,6577.23,6422.94,6442.69,516160000,6442.69
+1996-12-02,6521.70,6553.01,6439.34,6521.70,412520000,6521.70
+1996-11-29,6499.34,6551.15,6490.40,6521.70,151550000,6521.70
+1996-11-27,6528.41,6566.43,6457.97,6499.34,377780000,6499.34
+1996-11-26,6547.79,6606.30,6475.49,6528.41,527380000,6528.41
+1996-11-25,6471.76,6565.68,6443.44,6547.79,475260000,6547.79
+1996-11-22,6418.47,6498.22,6402.44,6471.76,525210000,6471.76
+1996-11-21,6430.02,6463.56,6370.02,6418.47,464430000,6418.47
+1996-11-20,6397.60,6482.20,6370.02,6430.02,497900000,6430.02
+1996-11-19,6346.91,6428.16,6323.06,6397.60,461980000,6397.60
+1996-11-18,6348.03,6407.66,6297.34,6346.91,388520000,6346.91
+1996-11-15,6313.00,6414.37,6277.22,6348.03,529100000,6348.03
+1996-11-14,6274.24,6350.64,6232.50,6313.00,480350000,6313.00
+1996-11-13,6266.04,6317.10,6206.78,6274.24,429840000,6274.24
+1996-11-12,6255.60,6314.49,6199.70,6266.04,472940000,6266.04
+1996-11-11,6219.82,6292.87,6198.58,6255.60,353960000,6255.60
+1996-11-08,6206.04,6247.40,6151.62,6219.82,402320000,6219.82
+1996-11-07,6177.71,6238.83,6130.38,6206.04,502530000,6206.04
+1996-11-06,6081.18,6200.44,6060.69,6177.71,509600000,6177.71
+1996-11-05,6041.68,6125.53,6029.01,6081.18,492860000,6081.18
+1996-11-04,6021.93,6083.05,5981.30,6041.68,398790000,6041.68
+1996-11-01,6029.38,6082.67,5975.34,6021.93,465510000,6021.93
+1996-10-31,5993.23,6063.67,5955.59,6029.38,488500000,6029.38
+1996-10-30,6007.02,6055.84,5956.71,5993.23,437770000,5993.23
+1996-10-29,5972.73,6054.72,5938.82,6007.02,443890000,6007.02
+1996-10-28,6007.02,6063.67,5952.61,5972.73,383630000,5972.73
+1996-10-25,5992.48,6047.64,5954.47,6007.02,367640000,6007.02
+1996-10-24,6036.46,6080.07,5953.72,5992.48,418970000,5992.48
+1996-10-23,6061.80,6081.93,5965.65,6036.46,442170000,6036.46
+1996-10-22,6090.87,6114.73,6015.59,6061.80,410790000,6061.80
+1996-10-21,6094.23,6162.80,6027.89,6090.87,414630000,6090.87
+1996-10-18,6059.20,6119.57,6011.49,6094.23,473020000,6094.23
+1996-10-17,6020.81,6101.31,5994.72,6059.20,478550000,6059.20
+1996-10-16,6004.78,6056.21,5943.66,6020.81,441410000,6020.81
+1996-10-15,6010.00,6077.83,5951.12,6004.78,458980000,6004.78
+1996-10-14,5969.38,6043.91,5952.61,6010.00,322000000,6010.00
+1996-10-11,5921.67,5999.56,5912.36,5969.38,396050000,5969.38
+1996-10-10,5930.62,5956.71,5876.58,5921.67,394950000,5921.67
+1996-10-09,5966.77,5985.03,5892.23,5930.62,408450000,5930.62
+1996-10-08,5979.81,6032.36,5930.24,5966.77,435070000,5966.77
+1996-10-07,5992.86,6025.28,5945.15,5979.81,380750000,5979.81
+1996-10-04,5932.85,6023.79,5917.20,5992.86,463940000,5992.86
+1996-10-03,5933.97,5972.36,5887.76,5932.85,386500000,5932.85
+1996-10-02,5904.90,5966.02,5888.88,5933.97,440130000,5933.97
+1996-10-01,5882.17,5942.17,5833.72,5904.90,421550000,5904.90
+1996-09-30,5845.18,5934.32,5845.18,5882.17,394260000,5882.17
+1996-09-27,5868.85,5903.99,5819.65,5872.92,414760000,5872.92
+1996-09-26,5877.36,5928.04,5828.90,5868.85,500870000,5868.85
+1996-09-25,5874.03,5928.77,5827.42,5877.36,451710000,5877.36
+1996-09-24,5894.74,5952.08,5831.86,5874.03,460150000,5874.03
+1996-09-23,5888.46,5913.24,5820.39,5894.74,297760000,5894.74
+1996-09-20,5867.74,5925.82,5840.74,5888.46,519420000,5888.46
+1996-09-19,5877.36,5908.80,5818.17,5867.74,398580000,5867.74
+1996-09-18,5888.83,5919.90,5838.15,5877.36,396600000,5877.36
+1996-09-17,5889.20,5929.51,5830.38,5888.83,449850000,5888.83
+1996-09-16,5838.52,5920.64,5823.72,5889.20,430080000,5889.20
+1996-09-13,5786.73,5871.44,5786.73,5838.52,488360000,5838.52
+1996-09-12,5754.92,5815.59,5739.76,5771.94,398820000,5771.94
+1996-09-11,5727.18,5777.49,5696.85,5754.92,376880000,5754.92
+1996-09-10,5733.84,5767.87,5681.68,5727.18,372960000,5727.18
+1996-09-09,5662.08,5756.40,5662.08,5733.84,311530000,5733.84
+1996-09-06,5606.96,5696.48,5585.51,5659.86,348710000,5659.86
+1996-09-05,5656.90,5669.47,5592.53,5606.96,361430000,5606.96
+1996-09-04,5648.39,5682.05,5608.81,5656.90,351290000,5656.90
+1996-09-03,5616.21,5667.99,5550.37,5648.39,345740000,5648.39
+1996-08-30,5647.65,5659.86,5571.45,5616.21,258380000,5616.21
+1996-08-29,5712.38,5716.82,5615.47,5647.65,321120000,5647.65
+1996-08-28,5711.27,5747.89,5678.72,5712.38,296440000,5712.38
+1996-08-27,5693.89,5735.32,5670.58,5711.27,310520000,5711.27
+1996-08-26,5722.74,5742.71,5665.41,5693.89,281430000,5693.89
+1996-08-23,5733.47,5761.58,5679.09,5722.74,308010000,5722.74
+1996-08-22,5689.82,5761.95,5662.45,5733.47,354950000,5733.47
+1996-08-21,5721.26,5734.95,5648.76,5689.82,348820000,5689.82
+1996-08-20,5699.44,5747.52,5670.21,5721.26,334960000,5721.26
+1996-08-19,5689.45,5728.66,5664.30,5699.44,294080000,5699.44
+1996-08-16,5665.78,5722.74,5646.54,5689.45,337650000,5689.45
+1996-08-15,5666.88,5701.66,5633.22,5665.78,323950000,5665.78
+1996-08-14,5647.28,5695.00,5614.36,5666.88,343470000,5666.88
+1996-08-13,5618.06,5713.86,5618.06,5647.28,362470000,5647.28
+1996-08-12,5681.31,5746.04,5625.83,5704.98,312170000,5704.98
+1996-08-09,5713.49,5747.15,5654.31,5681.31,327280000,5681.31
+1996-08-08,5718.67,5746.41,5661.34,5713.49,334570000,5713.49
+1996-08-07,5696.11,5754.55,5659.12,5718.67,394340000,5718.67
+1996-08-06,5674.28,5716.45,5630.26,5696.11,347290000,5696.11
+1996-08-05,5679.83,5719.04,5639.14,5674.28,307240000,5674.28
+1996-08-02,5601.41,5703.51,5601.41,5679.83,442080000,5679.83
+1996-08-01,5528.91,5628.79,5507.83,5594.75,439110000,5594.75
+1996-07-31,5481.93,5558.13,5460.48,5528.91,403560000,5528.91
+1996-07-30,5434.59,5503.73,5403.52,5481.93,341090000,5481.93
+1996-07-29,5473.06,5497.47,5414.61,5434.59,281560000,5434.59
+1996-07-26,5422.01,5503.02,5397.97,5473.06,349900000,5473.06
+1996-07-25,5355.80,5469.36,5355.80,5422.01,405390000,5422.01
+1996-07-24,5346.55,5402.04,5244.83,5354.69,463030000,5354.69
+1996-07-23,5390.94,5447.90,5313.63,5346.55,421900000,5346.55
+1996-07-22,5426.82,5446.05,5346.92,5390.94,327300000,5390.94
+1996-07-19,5464.18,5490.44,5393.53,5426.82,408070000,5426.82
+1996-07-18,5376.88,5500.43,5352.10,5464.18,474460000,5464.18
+1996-07-17,5358.76,5465.29,5325.10,5376.88,513830000,5376.88
+1996-07-16,5349.51,5438.66,5170.11,5358.76,68290000,5358.76
+1996-07-15,5510.56,5527.93,5326.98,5349.51,419020000,5349.51
+1996-07-12,5520.54,5562.65,5455.16,5510.56,397790000,5510.56
+1996-07-11,5600.33,5600.33,5447.77,5520.54,520470000,5520.54
+1996-07-10,5581.86,5628.03,5515.00,5603.65,421350000,5603.65
+1996-07-09,5550.83,5622.49,5540.12,5581.86,379200000,5581.86
+1996-07-08,5588.14,5622.12,5519.80,5550.83,367560000,5550.83
+1996-07-05,5657.58,5657.58,5570.77,5588.14,181470000,5588.14
+1996-07-03,5720.38,5749.93,5656.47,5703.02,336260000,5703.02
+1996-07-02,5729.98,5769.88,5668.29,5720.38,388000000,5720.38
+1996-07-01,5654.63,5749.19,5637.26,5729.98,345750000,5729.98
+1996-06-28,5677.53,5724.44,5625.81,5654.63,470460000,5654.63
+1996-06-27,5682.70,5715.21,5616.21,5677.53,405580000,5677.53
+1996-06-26,5719.27,5739.22,5652.04,5682.70,386520000,5682.70
+1996-06-25,5717.79,5760.27,5668.66,5719.27,391900000,5719.27
+1996-06-24,5705.23,5770.61,5688.61,5717.79,333840000,5717.79
+1996-06-21,5659.43,5722.22,5639.11,5705.23,520340000,5705.23
+1996-06-20,5648.35,5709.30,5606.97,5659.43,441060000,5659.43
+1996-06-19,5628.03,5693.78,5600.70,5648.35,383610000,5648.35
+1996-06-18,5652.78,5683.44,5607.71,5628.03,373290000,5628.03
+1996-06-17,5649.45,5689.72,5614.36,5652.78,298410000,5652.78
+1996-06-14,5657.95,5687.13,5609.93,5649.45,390630000,5649.45
+1996-06-13,5668.29,5714.84,5622.86,5657.95,397620000,5657.95
+1996-06-12,5668.66,5725.55,5637.63,5668.29,397190000,5668.29
+1996-06-11,5687.87,5747.71,5637.63,5668.66,405390000,5668.66
+1996-06-10,5697.11,5727.03,5643.54,5687.87,337480000,5687.87
+1996-06-07,5667.19,5708.93,5559.69,5697.11,445710000,5697.11
+1996-06-06,5697.48,5750.67,5639.48,5667.19,464800000,5667.19
+1996-06-05,5665.71,5718.53,5631.35,5697.48,380360000,5697.48
+1996-06-04,5624.71,5697.84,5616.58,5665.71,386040000,5665.71
+1996-06-03,5643.18,5662.75,5587.40,5624.71,318470000,5624.71
+1996-05-31,5693.41,5712.62,5614.36,5643.18,351750000,5643.18
+1996-05-30,5673.83,5734.41,5625.07,5693.41,381960000,5693.41
+1996-05-29,5709.67,5743.65,5632.46,5673.83,346730000,5673.83
+1996-05-28,5762.86,5798.69,5680.48,5709.67,341480000,5709.67
+1996-05-24,5762.12,5815.68,5722.59,5762.86,329150000,5762.86
+1996-05-23,5778.00,5833.04,5704.12,5762.12,431850000,5762.12
+1996-05-22,5736.26,5803.49,5687.87,5778.00,423670000,5778.00
+1996-05-21,5748.82,5794.63,5698.21,5736.26,409610000,5736.26
+1996-05-20,5687.50,5778.74,5657.58,5748.82,385000000,5748.82
+1996-05-17,5635.05,5729.61,5631.35,5687.50,429140000,5687.50
+1996-05-16,5625.44,5677.53,5577.42,5635.05,392070000,5635.05
+1996-05-15,5624.71,5691.57,5590.72,5625.44,447790000,5625.44
+1996-05-14,5582.60,5663.12,5566.71,5624.71,460440000,5624.71
+1996-05-13,5518.14,5601.80,5495.42,5582.60,394180000,5582.60
+1996-05-10,5478.03,5559.68,5478.03,5518.14,428370000,5518.14
+1996-05-09,5474.06,5534.76,5419.87,5475.14,404310000,5475.14
+1996-05-08,5420.95,5486.34,5327.74,5474.06,495460000,5474.06
+1996-05-07,5464.31,5486.34,5392.05,5420.95,410770000,5420.95
+1996-05-06,5478.03,5528.97,5397.83,5464.31,375820000,5464.31
+1996-05-03,5498.27,5555.71,5439.74,5478.03,434010000,5478.03
+1996-05-02,5575.22,5578.11,5455.27,5498.27,442960000,5498.27
+1996-05-01,5569.08,5619.29,5523.56,5575.22,404620000,5575.22
+1996-04-30,5573.41,5606.29,5522.83,5569.08,393390000,5569.08
+1996-04-29,5567.99,5611.71,5515.25,5573.41,344030000,5573.41
+1996-04-26,5566.91,5618.57,5517.78,5567.99,402530000,5567.99
+1996-04-25,5553.90,5601.23,5490.68,5566.91,461120000,5566.91
+1996-04-24,5588.59,5619.29,5512.36,5553.90,494220000,5553.90
+1996-04-23,5564.74,5621.82,5534.76,5588.59,452690000,5588.59
+1996-04-22,5535.48,5610.62,5516.33,5564.74,397460000,5564.74
+1996-04-19,5551.74,5593.64,5504.41,5535.48,435690000,5535.48
+1996-04-18,5549.93,5600.51,5493.93,5551.74,415150000,5551.74
+1996-04-17,5620.02,5653.25,5500.07,5549.93,465200000,5549.93
+1996-04-16,5592.92,5656.14,5554.99,5620.02,453310000,5620.02
+1996-04-15,5532.59,5614.60,5517.41,5592.92,346370000,5592.92
+1996-04-12,5487.07,5577.39,5445.16,5532.59,413270000,5532.59
+1996-04-11,5485.98,5540.17,5382.66,5487.07,519710000,5487.07
+1996-04-10,5560.41,5601.23,5452.02,5485.98,475150000,5485.98
+1996-04-09,5594.37,5644.58,5530.06,5560.41,426790000,5560.41
+1996-04-08,5624.71,5624.71,5518.14,5594.37,411810000,5594.37
+1996-04-04,5689.74,5737.07,5633.02,5682.88,383400000,5682.88
+1996-04-03,5671.68,5712.50,5619.29,5689.74,386620000,5689.74
+1996-04-02,5637.72,5706.72,5597.26,5671.68,406640000,5671.68
+1996-04-01,5587.14,5670.23,5562.57,5637.72,392120000,5637.72
+1996-03-29,5630.85,5682.88,5550.29,5587.14,413510000,5587.14
+1996-03-28,5626.88,5664.45,5564.74,5630.85,370750000,5630.85
+1996-03-27,5670.60,5703.47,5596.53,5626.88,406280000,5626.88
+1996-03-26,5643.86,5701.30,5595.81,5670.60,400090000,5670.60
+1996-03-25,5636.64,5712.14,5592.92,5643.86,336700000,5643.86
+1996-03-22,5626.88,5681.07,5589.67,5636.64,329390000,5636.64
+1996-03-21,5655.42,5696.25,5590.03,5626.88,367180000,5626.88
+1996-03-20,5669.51,5724.06,5590.39,5655.42,409780000,5655.42
+1996-03-19,5683.60,5755.86,5619.66,5669.51,438300000,5669.51
+1996-03-18,5584.97,5706.00,5573.41,5683.60,437100000,5683.60
+1996-03-15,5586.06,5628.69,5523.56,5584.97,529970000,5584.97
+1996-03-14,5568.72,5662.29,5536.56,5586.06,492630000,5586.06
+1996-03-13,5583.89,5626.52,5513.80,5568.72,413030000,5568.72
+1996-03-12,5581.00,5622.55,5464.67,5583.89,454980000,5583.89
+1996-03-11,5470.45,5605.20,5425.29,5581.00,449500000,5581.00
+1996-03-08,5612.79,5612.79,5395.30,5470.45,546550000,5470.45
+1996-03-07,5629.77,5667.34,5572.33,5641.69,425790000,5641.69
+1996-03-06,5642.42,5700.22,5585.70,5629.77,428220000,5629.77
+1996-03-05,5600.15,5655.78,5558.24,5642.42,445700000,5642.42
+1996-03-04,5536.56,5646.39,5511.99,5600.15,417270000,5600.15
+1996-03-01,5485.62,5573.41,5424.20,5536.56,471480000,5536.56
+1996-02-29,5506.21,5562.21,5440.46,5485.62,453170000,5485.62
+1996-02-28,5549.21,5625.07,5487.07,5506.21,447790000,5506.21
+1996-02-27,5565.10,5597.26,5478.76,5549.21,431340000,5549.21
+1996-02-26,5630.49,5647.83,5530.42,5565.10,399330000,5565.10
+1996-02-23,5608.46,5693.36,5546.32,5630.49,443130000,5630.49
+1996-02-22,5515.97,5638.44,5511.63,5608.46,494750000,5608.46
+1996-02-21,5458.53,5548.12,5440.82,5515.97,431220000,5515.97
+1996-02-20,5503.32,5515.97,5393.50,5458.53,395910000,5458.53
+1996-02-16,5551.37,5563.30,5470.45,5503.32,445570000,5503.32
+1996-02-15,5579.55,5623.27,5514.88,5551.37,415320000,5551.37
+1996-02-14,5601.23,5633.02,5534.39,5579.55,421790000,5579.55
+1996-02-13,5600.15,5644.94,5530.06,5601.23,441540000,5601.23
+1996-02-12,5541.62,5643.50,5531.14,5600.15,401490000,5600.15
+1996-02-09,5539.45,5603.76,5474.06,5541.62,477640000,5541.62
+1996-02-08,5492.12,5559.68,5441.55,5539.45,474970000,5539.45
+1996-02-07,5459.61,5520.30,5423.84,5492.12,462730000,5492.12
+1996-02-06,5407.59,5483.82,5371.82,5459.61,465940000,5459.61
+1996-02-05,5373.99,5433.96,5319.43,5407.59,377760000,5407.59
+1996-02-02,5405.06,5442.99,5338.94,5373.99,420020000,5373.99
+1996-02-01,5395.30,5438.29,5335.69,5405.06,461610000,5405.06
+1996-01-31,5381.21,5433.24,5314.38,5395.30,472210000,5395.30
+1996-01-30,5304.98,5409.75,5288.73,5381.21,464350000,5381.21
+1996-01-29,5271.75,5338.22,5246.82,5304.98,363330000,5304.98
+1996-01-26,5216.83,5293.78,5187.21,5271.75,385700000,5271.75
+1996-01-25,5242.84,5289.45,5173.84,5216.83,453270000,5216.83
+1996-01-24,5192.27,5297.04,5176.73,5242.84,476380000,5242.84
+1996-01-23,5219.36,5241.76,5141.33,5192.27,416910000,5192.27
+1996-01-22,5184.68,5254.77,5133.02,5219.36,398040000,5219.36
+1996-01-19,5124.35,5214.66,5087.49,5184.68,497720000,5184.68
+1996-01-18,5066.90,5166.98,5032.58,5124.35,450410000,5124.35
+1996-01-17,5088.22,5133.38,5028.61,5066.90,458720000,5066.90
+1996-01-16,5043.78,5116.04,5000.79,5088.22,425220000,5088.22
+1996-01-15,5061.12,5099.42,5012.71,5043.78,306180000,5043.78
+1996-01-12,5065.10,5114.23,5000.07,5061.12,383400000,5061.12
+1996-01-11,5032.94,5099.78,5002.96,5065.10,408800000,5065.10
+1996-01-10,5130.13,5151.69,5000.07,5032.94,496830000,5032.94
+1996-01-09,5197.70,5239.23,5100.86,5130.13,417400000,5130.13
+1996-01-08,5181.43,5207.08,5179.98,5197.70,130360000,5197.70
+1996-01-05,5173.84,5217.55,5107.00,5181.43,437110000,5181.43
+1996-01-04,5194.07,5259.46,5114.23,5173.84,512580000,5173.84
+1996-01-03,5177.45,5252.60,5143.13,5194.07,468950000,5194.07
+1996-01-02,5117.12,5208.16,5087.13,5177.45,364180000,5177.45
+1995-12-29,5095.80,5144.58,5063.65,5117.12,319680000,5117.12
+1995-12-28,5105.92,5132.65,5062.21,5095.80,288470000,5095.80
+1995-12-27,5110.26,5146.74,5077.74,5105.92,252270000,5105.92
+1995-12-26,5097.97,5149.27,5072.32,5110.26,217030000,5110.26
+1995-12-22,5096.53,5146.74,5064.01,5097.97,289600000,5097.97
+1995-12-21,5059.32,5135.91,5031.50,5096.53,415780000,5096.53
+1995-12-20,5109.89,5173.48,5047.39,5059.32,437650000,5059.32
+1995-12-19,5075.21,5146.02,5016.68,5109.89,18440000,5109.89
+1995-12-18,5159.39,5159.39,5042.70,5075.21,426230000,5075.21
+1995-12-15,5182.15,5217.55,5135.54,5176.73,636780000,5176.73
+1995-12-14,5216.47,5266.69,5148.55,5182.15,461960000,5182.15
+1995-12-13,5174.92,5246.10,5144.22,5216.47,414680000,5216.47
+1995-12-12,5184.32,5226.23,5132.29,5174.92,349410000,5174.92
+1995-12-11,5156.86,5225.50,5122.18,5184.32,342050000,5184.32
+1995-12-08,5159.39,5200.21,5115.31,5156.86,327500000,5156.86
+1995-12-07,5199.13,5211.05,5124.35,5159.39,379260000,5159.39
+1995-12-06,5177.45,5234.53,5147.47,5199.13,417750000,5199.13
+1995-12-05,5139.52,5216.83,5108.45,5177.45,434000000,5177.45
+1995-12-04,5087.13,5157.58,5057.87,5139.52,405080000,5139.52
+1995-12-01,5074.49,5133.02,5038.36,5087.13,392650000,5087.13
+1995-11-30,5105.56,5143.13,5033.17,5074.49,439470000,5074.49
+1995-11-29,5078.10,5126.51,5047.03,5105.56,398230000,5105.56
+1995-11-28,5070.88,5105.56,5006.21,5078.10,408860000,5078.10
+1995-11-27,5048.84,5114.23,5034.03,5070.88,356180000,5070.88
+1995-11-24,5041.61,5072.68,5028.61,5048.84,125870000,5048.84
+1995-11-22,5023.55,5096.17,4982.72,5041.61,404900000,5041.61
+1995-11-21,4983.09,5050.28,4948.04,5023.55,405860000,5023.55
+1995-11-20,4989.95,5030.77,4946.60,4983.09,333110000,4983.09
+1995-11-17,4969.36,5022.10,4934.31,4989.95,429990000,4989.95
+1995-11-16,4922.75,5003.68,4902.16,4969.36,418430000,4969.36
+1995-11-15,4871.81,4939.73,4835.69,4922.75,373090000,4922.75
+1995-11-14,4872.90,4923.11,4826.29,4871.81,353650000,4871.81
+1995-11-13,4870.37,4909.75,4821.23,4872.90,292390000,4872.90
+1995-11-10,4864.23,4896.02,4820.51,4870.37,297950000,4870.37
+1995-11-09,4852.67,4902.52,4811.84,4864.23,379500000,4864.23
+1995-11-08,4797.03,4877.59,4775.71,4852.67,359770000,4852.67
+1995-11-07,4814.01,4839.30,4770.66,4797.03,365720000,4797.03
+1995-11-06,4825.57,4862.78,4779.33,4814.01,309090000,4814.01
+1995-11-03,4808.59,4858.81,4774.63,4825.57,344360000,4825.57
+1995-11-02,4766.68,4833.16,4745.00,4808.59,396150000,4808.59
+1995-11-01,4755.48,4801.73,4719.72,4766.68,377930000,4766.68
+1995-10-31,4756.57,4821.96,4735.97,4755.48,377350000,4755.48
+1995-10-30,4741.75,4798.84,4716.46,4756.57,318840000,4756.57
+1995-10-27,4703.82,4766.68,4653.24,4741.75,378820000,4741.75
+1995-10-26,4753.68,4777.88,4655.05,4703.82,464190000,4703.82
+1995-10-25,4783.66,4824.49,4708.88,4753.68,433570000,4753.68
+1995-10-24,4755.48,4819.07,4730.92,4783.66,415400000,4783.66
+1995-10-23,4794.86,4805.70,4724.41,4755.48,329720000,4755.48
+1995-10-20,4802.45,4836.41,4758.37,4794.86,388140000,4794.86
+1995-10-19,4777.52,4830.27,4744.28,4802.45,406620000,4802.45
+1995-10-18,4795.95,4837.49,4747.53,4777.52,411270000,4777.52
+1995-10-17,4784.38,4831.35,4747.90,4795.95,352940000,4795.95
+1995-10-16,4793.78,4823.04,4751.51,4784.38,299520000,4784.38
+1995-10-13,4764.88,4845.08,4749.70,4793.78,373970000,4793.78
+1995-10-12,4735.25,4790.16,4709.24,4764.88,343930000,4764.88
+1995-10-11,4720.80,4773.91,4686.43,4735.25,343060000,4735.25
+1995-10-10,4726.22,4745.73,4638.43,4720.80,412670000,4720.80
+1995-10-09,4769.21,4781.13,4691.54,4726.22,275280000,4726.22
+1995-10-06,4762.71,4805.70,4731.64,4769.21,314170000,4769.21
+1995-10-05,4740.67,4794.86,4705.63,4762.71,367410000,4762.71
+1995-10-04,4749.70,4787.27,4689.01,4740.67,339350000,4740.67
+1995-10-03,4761.26,4791.61,4702.74,4749.70,385890000,4749.70
+1995-10-02,4789.08,4817.98,4732.72,4761.26,304990000,4761.26
+1995-09-29,4787.64,4834.96,4757.65,4789.08,337670000,4789.08
+1995-09-28,4762.35,4810.03,4731.64,4787.64,367610000,4787.64
+1995-09-27,4765.60,4790.16,4692.98,4762.35,410970000,4762.35
+1995-09-26,4769.93,4816.54,4738.86,4765.60,362550000,4765.60
+1995-09-25,4764.15,4804.62,4728.02,4769.93,273110000,4769.93
+1995-09-22,4767.40,4789.44,4706.35,4764.15,370750000,4764.15
+1995-09-21,4792.69,4820.15,4728.75,4767.40,367060000,4767.40
+1995-09-20,4767.04,4828.46,4746.45,4792.69,402530000,4792.69
+1995-09-19,4780.41,4798.11,4734.53,4767.04,371080000,4767.04
+1995-09-18,4797.57,4814.01,4729.47,4780.41,328630000,4780.41
+1995-09-15,4801.80,4839.48,4762.35,4797.57,459370000,4797.57
+1995-09-14,4765.52,4830.32,4731.36,4801.80,382860000,4801.80
+1995-09-13,4747.21,4801.09,4697.55,4765.52,381450000,4765.52
+1995-09-12,4704.94,4762.35,4689.45,4747.21,342580000,4747.21
+1995-09-11,4700.72,4744.04,4672.54,4704.94,296820000,4704.94
+1995-09-08,4669.72,4722.91,4648.59,4700.72,317260000,4700.72
+1995-09-07,4683.81,4710.58,4640.14,4669.72,321710000,4669.72
+1995-09-06,4670.08,4716.21,4648.95,4683.81,369510000,4683.81
+1995-09-05,4647.54,4697.90,4625.70,4670.08,332660000,4670.08
+1995-09-01,4610.56,4672.19,4594.71,4647.54,255710000,4647.54
+1995-08-31,4604.57,4634.51,4582.38,4610.56,300890000,4610.56
+1995-08-30,4608.44,4639.79,4582.38,4604.57,329780000,4604.57
+1995-08-29,4594.00,4625.35,4554.21,4608.44,311290000,4608.44
+1995-08-28,4601.40,4632.39,4566.53,4594.00,267860000,4594.00
+1995-08-25,4580.62,4629.93,4569.70,4601.40,255990000,4601.40
+1995-08-24,4584.85,4618.30,4552.80,4580.62,299200000,4580.62
+1995-08-23,4620.42,4636.27,4571.81,4584.85,291380000,4584.85
+1995-08-22,4614.78,4646.13,4580.62,4620.42,290350000,4620.42
+1995-08-21,4617.60,4676.42,4593.65,4614.78,303200000,4614.78
+1995-08-18,4630.63,4665.15,4597.88,4617.60,312030000,4617.60
+1995-08-17,4639.08,4659.16,4587.66,4630.63,354460000,4630.63
+1995-08-16,4640.84,4673.60,4593.30,4639.08,390070000,4639.08
+1995-08-15,4659.86,4672.89,4602.10,4640.84,330040000,4640.84
+1995-08-14,4618.30,4677.12,4601.75,4659.86,263750000,4659.86
+1995-08-11,4643.66,4659.51,4584.85,4618.30,267850000,4618.30
+1995-08-10,4671.49,4698.96,4621.47,4643.66,306660000,4643.66
+1995-08-09,4693.32,4712.34,4649.30,4671.49,303390000,4671.49
+1995-08-08,4693.32,4722.55,4654.23,4693.32,305150000,4693.32
+1995-08-07,4683.46,4727.84,4667.26,4693.32,276040000,4693.32
+1995-08-04,4701.42,4728.54,4660.57,4683.46,314730000,4683.46
+1995-08-03,4690.15,4720.44,4632.04,4701.42,353110000,4701.42
+1995-08-02,4700.37,4772.56,4667.96,4690.15,374310000,4690.15
+1995-08-01,4708.47,4742.98,4648.59,4700.37,334770000,4700.37
+1995-07-31,4715.51,4753.55,4671.13,4708.47,291950000,4708.47
+1995-07-28,4732.77,4762.70,4686.28,4715.51,311580000,4715.51
+1995-07-27,4707.06,4767.99,4691.56,4732.77,356570000,4732.77
+1995-07-26,4714.45,4750.73,4665.15,4707.06,393460000,4707.06
+1995-07-25,4668.67,4743.69,4651.76,4714.45,373210000,4714.45
+1995-07-24,4641.55,4701.42,4620.42,4668.67,315170000,4668.67
+1995-07-21,4641.55,4676.06,4596.82,4641.55,427770000,4641.55
+1995-07-20,4628.87,4684.52,4578.51,4641.55,383380000,4641.55
+1995-07-19,4686.28,4698.60,4530.26,4628.87,489850000,4628.87
+1995-07-18,4734.53,4734.53,4648.24,4686.28,372230000,4686.28
+1995-07-17,4708.82,4767.63,4681.35,4736.29,322540000,4736.29
+1995-07-14,4727.48,4736.99,4664.79,4708.82,312930000,4708.82
+1995-07-13,4727.29,4766.58,4676.06,4727.48,387470000,4727.48
+1995-07-12,4680.60,4747.00,4654.66,4727.29,416000000,4727.29
+1995-07-11,4702.39,4724.52,4647.74,4680.60,376770000,4680.60
+1995-07-10,4702.73,4747.69,4670.91,4702.39,409700000,4702.39
+1995-07-07,4664.00,4740.77,4628.38,4702.73,466540000,4702.73
+1995-07-06,4615.23,4681.98,4587.91,4664.00,420470000,4664.00
+1995-07-05,4585.15,4652.24,4561.63,4615.23,357810000,4615.23
+1995-07-03,4556.10,4594.83,4536.04,4585.15,117870000,4585.15
+1995-06-30,4550.56,4606.24,4513.90,4556.10,311320000,4556.10
+1995-06-29,4556.79,4592.76,4510.45,4550.56,313060000,4550.56
+1995-06-28,4542.61,4587.22,4512.87,4556.79,368060000,4556.79
+1995-06-27,4551.25,4592.41,4511.48,4542.61,346950000,4542.61
+1995-06-26,4585.84,4600.02,4536.38,4551.25,296720000,4551.25
+1995-06-23,4589.64,4609.70,4549.18,4585.84,321530000,4585.84
+1995-06-22,4547.10,4614.20,4535.35,4589.64,420950000,4589.64
+1995-06-21,4550.56,4583.07,4517.02,4547.10,398210000,4547.10
+1995-06-20,4553.68,4587.22,4497.99,4550.56,382290000,4550.56
+1995-06-19,4510.79,4577.19,4498.69,4553.68,322620000,4553.68
+1995-06-16,4496.27,4533.96,4482.43,4510.79,442740000,4510.79
+1995-06-15,4491.08,4527.74,4466.87,4496.27,334640000,4496.27
+1995-06-14,4484.51,4510.79,4449.23,4491.08,330750000,4491.08
+1995-06-13,4446.46,4504.91,4440.24,4484.51,339620000,4484.51
+1995-06-12,4423.99,4482.09,4415.69,4446.46,287830000,4446.46
+1995-06-09,4458.57,4466.87,4394.59,4423.99,328960000,4423.99
+1995-06-08,4462.03,4492.12,4431.59,4458.57,289880000,4458.57
+1995-06-07,4485.20,4497.65,4432.29,4462.03,327790000,4462.03
+1995-06-06,4476.55,4520.47,4446.46,4485.20,340470000,4485.20
+1995-06-05,4444.39,4510.45,4417.76,4476.55,337520000,4476.55
+1995-06-02,4472.75,4496.27,4406.35,4444.39,366000000,4444.39
+1995-06-01,4465.14,4499.72,4421.56,4472.75,345890000,4472.75
+1995-05-31,4378.68,4467.91,4360.70,4465.14,358160000,4465.14
+1995-05-30,4369.00,4412.92,4334.41,4378.68,283020000,4378.68
+1995-05-26,4412.23,4423.64,4338.91,4369.00,290730000,4369.00
+1995-05-25,4427.44,4451.31,4375.91,4412.23,341820000,4412.23
+1995-05-24,4436.44,4480.70,4390.78,4438.16,391750000,4438.16
+1995-05-23,4395.63,4451.65,4372.46,4436.44,362690000,4436.44
+1995-05-22,4341.33,4416.03,4337.87,4395.63,285600000,4395.63
+1995-05-19,4340.64,4368.65,4287.38,4341.33,354010000,4341.33
+1995-05-18,4422.60,4426.41,4330.95,4340.64,351850000,4340.64
+1995-05-17,4435.05,4452.69,4386.63,4422.60,347930000,4422.60
+1995-05-16,4437.47,4464.10,4408.08,4435.05,366180000,4435.05
+1995-05-15,4430.56,4468.94,4398.74,4437.47,316240000,4437.47
+1995-05-12,4411.19,4463.07,4371.07,4430.56,361000000,4430.56
+1995-05-11,4404.62,4446.12,4365.19,4411.19,339900000,4411.19
+1995-05-10,4390.78,4440.24,4347.55,4404.62,381990000,4404.62
+1995-05-09,4383.87,4421.22,4360.00,4390.78,361430000,4390.78
+1995-05-08,4343.40,4407.04,4316.43,4383.87,291810000,4383.87
+1995-05-05,4359.66,4389.75,4310.55,4343.40,342380000,4343.40
+1995-05-04,4373.15,4426.41,4329.92,4359.66,434920000,4359.66
+1995-05-03,4328.88,4392.51,4312.28,4373.15,392290000,4373.15
+1995-05-02,4316.08,4348.25,4288.42,4328.88,300660000,4328.88
+1995-05-01,4321.27,4352.74,4278.73,4316.08,296830000,4316.08
+1995-04-28,4314.70,4348.94,4270.78,4321.27,320270000,4321.27
+1995-04-27,4299.83,4335.10,4269.05,4314.70,350850000,4314.70
+1995-04-26,4300.17,4324.73,4267.32,4299.83,350790000,4299.83
+1995-04-25,4303.98,4337.18,4267.32,4300.17,351790000,4300.17
+1995-04-24,4270.09,4328.88,4239.65,4303.98,325760000,4303.98
+1995-04-21,4230.66,4296.37,4214.41,4270.09,403210000,4270.09
+1995-04-20,4207.49,4263.86,4186.39,4230.66,368440000,4230.66
+1995-04-19,4179.13,4232.39,4143.51,4207.49,377520000,4207.49
+1995-04-18,4195.38,4221.67,4152.15,4179.13,344680000,4179.13
+1995-04-17,4208.18,4260.06,4174.63,4195.38,333930000,4195.38
+1995-04-13,4197.81,4243.46,4173.94,4208.18,301510000,4208.18
+1995-04-12,4187.08,4221.67,4163.57,4197.81,327880000,4197.81
+1995-04-11,4198.15,4229.97,4168.06,4187.08,309710000,4187.08
+1995-04-10,4192.62,4219.94,4163.91,4198.15,260980000,4198.15
+1995-04-07,4205.41,4226.86,4154.23,4192.62,314750000,4192.62
+1995-04-06,4200.57,4239.31,4179.13,4205.41,320460000,4205.41
+1995-04-05,4201.61,4229.62,4166.33,4200.57,315170000,4200.57
+1995-04-04,4168.41,4220.98,4154.23,4201.61,330550000,4201.61
+1995-04-03,4157.69,4202.30,4129.68,4168.41,287380000,4168.41
+1995-03-31,4172.56,4194.00,4100.28,4157.69,352940000,4157.69
+1995-03-30,4160.80,4213.37,4128.29,4172.56,362020000,4172.56
+1995-03-29,4151.81,4213.71,4121.72,4160.80,385910000,4160.80
+1995-03-28,4157.34,4176.02,4120.68,4151.81,320360000,4151.81
+1995-03-27,4138.67,4177.40,4113.08,4157.34,296160000,4157.34
+1995-03-24,4087.83,4155.27,4087.14,4138.67,358370000,4138.67
+1995-03-23,4082.99,4107.89,4046.33,4087.83,318490000,4087.83
+1995-03-22,4072.61,4107.54,4039.07,4082.99,313120000,4082.99
+1995-03-21,4083.68,4122.41,4046.67,4072.61,367110000,4072.61
+1995-03-20,4073.65,4115.15,4051.17,4083.68,301720000,4083.68
+1995-03-17,4069.15,4101.66,4044.94,4073.65,415810000,4073.65
+1995-03-16,4038.37,4095.78,4021.77,4069.15,336330000,4069.15
+1995-03-15,4048.75,4070.19,4008.63,4038.37,309540000,4038.37
+1995-03-14,4025.23,4087.14,4014.86,4048.75,346140000,4048.75
+1995-03-13,4035.61,4060.85,3999.29,4025.23,275280000,4025.23
+1995-03-10,3983.39,4054.97,3978.20,4035.61,383000000,4035.61
+1995-03-09,3979.23,4011.40,3953.99,3983.39,319100000,3983.39
+1995-03-08,3962.63,4002.41,3944.65,3979.23,349700000,3979.23
+1995-03-07,3997.56,4009.67,3935.31,3962.63,355550000,3962.63
+1995-03-06,3989.61,4015.89,3944.31,3997.56,298850000,3997.56
+1995-03-03,3979.93,4004.83,3946.03,3989.61,330840000,3989.61
+1995-03-02,3994.80,4009.67,3947.07,3979.93,329430000,3979.93
+1995-03-01,4011.05,4033.19,3960.56,3994.80,362590000,3994.80
+1995-02-28,3988.57,4021.43,3967.48,4011.05,317120000,4011.05
+1995-02-27,4011.74,4033.19,3966.78,3988.57,285790000,3988.57
+1995-02-24,4003.33,4033.61,3974.06,4011.74,302850000,4011.74
+1995-02-23,3979.45,4034.62,3979.45,4003.33,394100000,4003.33
+1995-02-22,3963.97,4002.32,3944.46,3973.05,339140000,3973.05
+1995-02-21,3953.54,3989.88,3930.66,3963.97,308060000,3963.97
+1995-02-17,3987.52,4001.99,3937.05,3953.54,350560000,3953.54
+1995-02-16,3986.17,4011.07,3948.16,3987.52,360990000,3987.52
+1995-02-15,3958.25,4019.15,3937.73,3986.17,377940000,3986.17
+1995-02-14,3954.21,3984.83,3930.66,3958.25,300720000,3958.25
+1995-02-13,3939.07,3974.74,3920.57,3954.21,256210000,3954.21
+1995-02-10,3932.68,3962.96,3908.46,3939.07,295550000,3939.07
+1995-02-09,3935.37,3967.33,3904.76,3932.68,325570000,3932.68
+1995-02-08,3937.39,3967.67,3909.13,3935.37,317910000,3935.37
+1995-02-07,3937.73,3960.27,3907.45,3937.39,317110000,3937.39
+1995-02-06,3928.64,3964.31,3900.04,3937.73,325660000,3937.73
+1995-02-03,3876.16,3959.60,3876.16,3928.64,440950000,3928.64
+1995-02-02,3847.56,3884.23,3828.38,3870.77,322030000,3870.77
+1995-02-01,3843.86,3886.25,3809.21,3847.56,395300000,3847.56
+1995-01-31,3832.08,3872.12,3809.54,3843.86,411570000,3843.86
+1995-01-30,3857.99,3881.20,3794.40,3832.08,318530000,3832.08
+1995-01-27,3870.44,3914.18,3827.37,3857.99,339490000,3857.99
+1995-01-26,3871.45,3903.41,3839.15,3870.44,304650000,3870.44
+1995-01-25,3862.70,3908.79,3832.08,3871.45,342240000,3871.45
+1995-01-24,3867.41,3898.36,3840.16,3862.70,315410000,3862.70
+1995-01-23,3869.43,3885.58,3815.26,3867.41,325810000,3867.41
+1995-01-20,3882.21,3898.70,3826.70,3869.43,376870000,3869.43
+1995-01-19,3928.98,3929.99,3866.74,3882.21,297220000,3882.21
+1995-01-18,3930.66,3950.85,3889.95,3928.98,343100000,3928.98
+1995-01-17,3932.34,3953.88,3895.33,3930.66,330890000,3930.66
+1995-01-16,3908.46,3955.56,3889.95,3932.34,315800000,3932.34
+1995-01-13,3859.00,3924.27,3852.61,3908.46,336740000,3908.46
+1995-01-12,3862.03,3886.59,3831.41,3859.00,313040000,3859.00
+1995-01-11,3866.74,3899.71,3824.68,3862.03,346310000,3862.03
+1995-01-10,3861.35,3912.49,3844.87,3866.74,352440000,3866.74
+1995-01-09,3867.41,3889.28,3834.44,3861.35,278710000,3861.35
+1995-01-06,3850.92,3902.40,3823.67,3867.41,308070000,3867.41
+1995-01-05,3857.65,3876.83,3825.35,3850.92,309140000,3850.92
+1995-01-04,3838.48,3876.83,3815.26,3857.65,319510000,3857.65
+1995-01-03,3834.44,3864.72,3805.50,3838.48,262450000,3838.48
+1994-12-30,3833.43,3874.48,3812.91,3834.44,256260000,3834.44
+1994-12-29,3839.49,3867.41,3812.91,3833.43,250650000,3833.43
+1994-12-28,3861.69,3871.45,3816.94,3839.49,246260000,3839.49
+1994-12-27,3833.43,3882.21,3832.08,3861.69,211180000,3861.69
+1994-12-23,3814.92,3860.01,3808.53,3833.43,196540000,3833.43
+1994-12-22,3801.80,3850.59,3780.61,3814.92,339670000,3814.92
+1994-12-21,3767.15,3836.46,3761.77,3801.80,378790000,3801.80
+1994-12-20,3790.70,3807.19,3752.35,3767.15,325510000,3767.15
+1994-12-19,3807.19,3815.26,3764.46,3790.70,271850000,3790.70
+1994-12-16,3765.47,3817.95,3758.07,3807.19,481860000,3807.19
+1994-12-15,3746.29,3794.07,3729.13,3765.47,332790000,3765.47
+1994-12-14,3715.34,3772.20,3700.53,3746.29,355000000,3746.29
+1994-12-13,3718.37,3749.32,3690.78,3715.34,307110000,3715.34
+1994-12-12,3691.11,3734.52,3667.90,3718.37,285730000,3718.37
+1994-12-09,3685.73,3713.32,3638.97,3691.11,336440000,3691.11
+1994-12-08,3735.52,3757.39,3670.25,3685.73,362280000,3685.73
+1994-12-07,3745.95,3758.07,3700.87,3735.52,283490000,3735.52
+1994-12-06,3741.92,3762.10,3703.56,3745.95,298890000,3745.95
+1994-12-05,3745.62,3779.93,3715.67,3741.92,258480000,3741.92
+1994-12-02,3700.87,3755.04,3680.68,3745.62,284740000,3745.62
+1994-12-01,3739.23,3755.37,3680.68,3700.87,285920000,3700.87
+1994-11-30,3738.55,3783.30,3718.37,3739.23,300800000,3739.23
+1994-11-29,3739.56,3755.04,3703.90,3738.55,286580000,3738.55
+1994-11-28,3708.27,3759.41,3693.13,3739.56,265020000,3739.56
+1994-11-25,3675.97,3722.40,3675.97,3708.27,118290000,3708.27
+1994-11-23,3677.99,3704.91,3612.05,3674.63,430730000,3674.63
+1994-11-22,3769.51,3787.34,3669.58,3677.99,387270000,3677.99
+1994-11-21,3815.26,3845.20,3758.74,3769.51,293030000,3769.51
+1994-11-18,3828.05,3844.87,3773.21,3815.26,356730000,3815.26
+1994-11-17,3845.20,3868.08,3797.77,3828.05,323190000,3828.05
+1994-11-16,3826.36,3864.38,3803.82,3845.20,296980000,3845.20
+1994-11-15,3829.73,3871.45,3794.40,3826.36,336330000,3826.36
+1994-11-14,3801.47,3849.91,3795.07,3829.73,260380000,3829.73
+1994-11-11,3821.99,3830.06,3779.93,3801.47,220800000,3801.47
+1994-11-10,3831.75,3873.47,3821.99,3821.99,280910000,3821.99
+1994-11-09,3830.74,3882.89,3798.44,3831.75,341500000,3831.75
+1994-11-08,3808.87,3857.65,3798.75,3830.74,290860000,3830.74
+1994-11-07,3807.52,3830.40,3781.62,3808.87,255030000,3808.87
+1994-11-04,3845.88,3879.52,3802.81,3807.52,280560000,3807.52
+1994-11-03,3837.13,3872.46,3814.25,3845.88,284480000,3845.88
+1994-11-02,3863.37,3888.94,3820.31,3837.13,331360000,3837.13
+1994-11-01,3908.12,3919.90,3836.79,3863.37,314940000,3863.37
+1994-10-31,3930.66,3956.90,3889.28,3908.12,302810000,3908.12
+1994-10-28,3875.15,3953.54,3863.37,3930.66,381450000,3930.66
+1994-10-27,3848.23,3893.99,3834.44,3875.15,327790000,3875.15
+1994-10-26,3850.59,3891.97,3816.61,3848.23,322560000,3848.23
+1994-10-25,3855.30,3883.56,3803.49,3850.59,326100000,3850.59
+1994-10-24,3891.30,3925.61,3840.16,3855.30,282800000,3855.30
+1994-10-21,3911.15,3921.58,3861.35,3891.30,309410000,3891.30
+1994-10-20,3936.04,3954.89,3873.13,3911.15,326100000,3911.15
+1994-10-19,3917.54,3958.25,3887.93,3936.04,317030000,3936.04
+1994-10-18,3923.93,3945.46,3892.64,3917.54,259730000,3917.54
+1994-10-17,3910.47,3949.84,3883.22,3923.93,238490000,3923.93
+1994-10-14,3889.95,3927.97,3862.03,3910.47,251770000,3910.47
+1994-10-13,3878.18,3944.12,3878.18,3889.95,337900000,3889.95
+1994-10-12,3876.83,3903.07,3844.87,3875.15,269550000,3875.15
+1994-10-11,3828.96,3898.36,3828.96,3876.83,355540000,3876.83
+1994-10-10,3797.43,3843.19,3789.36,3821.32,213110000,3821.32
+1994-10-07,3775.56,3826.03,3754.37,3797.43,284230000,3797.43
+1994-10-06,3787.34,3810.89,3752.01,3775.56,272620000,3775.56
+1994-10-05,3801.13,3811.56,3736.20,3787.34,359670000,3787.34
+1994-10-04,3846.89,3873.47,3788.35,3801.13,325620000,3801.13
+1994-10-03,3843.19,3872.79,3809.21,3846.89,269130000,3846.89
+1994-09-30,3854.63,3891.30,3825.69,3843.19,292060000,3843.19
+1994-09-29,3878.18,3892.64,3834.78,3854.63,302280000,3854.63
+1994-09-28,3863.04,3904.76,3854.29,3878.18,330020000,3878.18
+1994-09-27,3849.24,3891.63,3828.72,3863.04,290330000,3863.04
+1994-09-26,3831.75,3869.43,3804.50,3849.24,272530000,3849.24
+1994-09-23,3837.13,3872.46,3806.51,3831.75,300060000,3831.75
+1994-09-22,3851.60,3882.55,3818.29,3837.13,305210000,3837.13
+1994-09-21,3869.09,3886.92,3806.85,3851.60,355330000,3851.60
+1994-09-20,3932.01,3932.01,3859.67,3869.09,326050000,3869.09
+1994-09-19,3933.35,3972.72,3909.80,3936.72,272920000,3936.72
+1994-09-16,3953.88,3955.22,3894.66,3933.35,410750000,3933.35
+1994-09-15,3895.33,3959.93,3883.90,3953.88,281890000,3953.88
+1994-09-14,3879.86,3918.55,3856.64,3895.33,297480000,3895.33
+1994-09-13,3860.34,3905.76,3854.29,3879.86,293370000,3879.86
+1994-09-12,3874.81,3897.02,3843.86,3860.34,244680000,3860.34
+1994-09-09,3902.06,3902.06,3844.20,3874.81,293330000,3874.81
+1994-09-08,3886.25,3926.96,3872.46,3908.46,295010000,3908.46
+1994-09-07,3898.70,3920.90,3860.68,3886.25,292110000,3886.25
+1994-09-06,3885.58,3918.55,3860.01,3898.70,199670000,3898.70
+1994-09-02,3901.44,3928.64,3871.98,3885.58,216150000,3885.58
+1994-09-01,3913.42,3927.99,3871.66,3901.44,285670000,3901.44
+1994-08-31,3917.30,3954.54,3878.78,3913.42,354650000,3913.42
+1994-08-30,3898.85,3934.14,3875.87,3917.30,294520000,3917.30
+1994-08-29,3881.05,3927.34,3869.39,3898.85,266080000,3898.85
+1994-08-26,3836.69,3903.38,3836.69,3881.05,305120000,3881.05
+1994-08-25,3846.73,3872.63,3810.47,3829.89,284200000,3829.89
+1994-08-24,3775.83,3852.56,3767.41,3846.73,309780000,3846.73
+1994-08-23,3751.22,3804.64,3745.07,3775.83,307240000,3775.83
+1994-08-22,3755.11,3771.94,3722.41,3751.22,235870000,3751.22
+1994-08-19,3755.43,3785.22,3727.59,3755.11,276630000,3755.11
+1994-08-18,3776.48,3793.63,3736.98,3755.43,287330000,3755.43
+1994-08-17,3784.57,3812.09,3754.46,3776.48,309250000,3776.48
+1994-08-16,3760.29,3804.64,3732.45,3784.57,306640000,3784.57
+1994-08-15,3768.71,3798.17,3742.16,3760.29,223210000,3760.29
+1994-08-12,3750.90,3792.66,3738.27,3768.71,249270000,3768.71
+1994-08-11,3766.76,3785.86,3728.56,3750.90,275690000,3750.90
+1994-08-10,3755.76,3793.97,3738.27,3766.76,279470000,3766.76
+1994-08-09,3753.81,3773.89,3728.56,3755.76,259130000,3755.76
+1994-08-08,3747.02,3780.68,3732.77,3753.81,217670000,3753.81
+1994-08-05,3765.79,3769.68,3725.00,3747.02,230270000,3747.02
+1994-08-04,3792.66,3807.23,3752.52,3765.79,289150000,3765.79
+1994-08-03,3796.22,3815.00,3762.88,3792.66,283840000,3792.66
+1994-08-02,3798.17,3829.25,3776.48,3796.22,294740000,3796.22
+1994-08-01,3764.50,3809.50,3749.28,3798.17,258180000,3798.17
+1994-07-29,3730.83,3782.63,3726.30,3764.50,269560000,3764.50
+1994-07-28,3720.47,3757.05,3701.69,3730.83,247560000,3730.83
+1994-07-27,3735.68,3753.17,3693.27,3720.47,251680000,3720.47
+1994-07-26,3741.84,3764.50,3706.22,3735.68,232670000,3735.68
+1994-07-25,3735.04,3762.56,3713.67,3741.84,213470000,3741.84
+1994-07-22,3732.45,3765.15,3707.19,3735.04,261090000,3735.04
+1994-07-21,3727.27,3763.20,3684.86,3732.45,292080000,3732.45
+1994-07-20,3748.31,3763.85,3706.22,3727.27,267740000,3727.27
+1994-07-19,3755.43,3777.45,3726.30,3748.31,251530000,3748.31
+1994-07-18,3753.81,3779.39,3725.00,3755.43,227480000,3755.43
+1994-07-15,3739.25,3769.35,3712.37,3753.81,275860000,3753.81
+1994-07-14,3704.28,3763.53,3697.48,3739.25,319950000,3739.25
+1994-07-13,3702.66,3738.27,3683.89,3704.28,265840000,3704.28
+1994-07-12,3702.99,3725.32,3660.90,3702.66,252250000,3702.66
+1994-07-11,3709.14,3735.36,3671.26,3702.99,222580000,3702.99
+1994-07-08,3688.42,3728.56,3660.90,3709.14,236520000,3709.14
+1994-07-07,3674.50,3714.32,3656.04,3688.42,258500000,3688.42
+1994-07-06,3652.48,3698.13,3631.11,3674.50,233640000,3674.50
+1994-07-05,3646.65,3680.65,3621.73,3652.48,193030000,3652.48
+1994-07-01,3624.96,3675.79,3611.04,3646.65,199030000,3646.65
+1994-06-30,3667.05,3683.56,3610.72,3624.96,294110000,3624.96
+1994-06-29,3669.64,3711.73,3645.68,3667.05,263890000,3667.05
+1994-06-28,3685.50,3705.58,3630.47,3669.64,265880000,3669.64
+1994-06-27,3636.94,3694.89,3603.92,3685.50,250110000,3685.50
+1994-06-24,3699.09,3704.80,3616.65,3636.94,261260000,3636.94
+1994-06-23,3724.77,3752.04,3685.14,3699.09,256480000,3699.09
+1994-06-22,3707.97,3748.87,3694.65,3724.77,251110000,3724.77
+1994-06-21,3741.90,3756.80,3674.68,3707.97,298730000,3707.97
+1994-06-20,3771.07,3771.07,3716.21,3741.90,229520000,3741.90
+1994-06-17,3811.34,3821.48,3764.09,3776.78,373400000,3776.78
+1994-06-16,3790.41,3830.68,3771.39,3811.34,254880000,3811.34
+1994-06-15,3814.83,3838.29,3772.02,3790.41,269740000,3790.41
+1994-06-14,3783.12,3839.88,3769.17,3814.83,288550000,3814.83
+1994-06-13,3773.45,3808.17,3741.26,3783.12,242810000,3783.12
+1994-06-10,3753.14,3798.68,3739.60,3773.45,222480000,3773.45
+1994-06-09,3749.45,3776.83,3721.45,3753.14,252870000,3753.14
+1994-06-08,3755.91,3780.83,3721.45,3749.45,256000000,3749.45
+1994-06-07,3768.52,3788.52,3733.14,3755.91,234680000,3755.91
+1994-06-06,3772.22,3812.83,3749.75,3768.52,259080000,3768.52
+1994-06-03,3758.99,3792.22,3732.52,3772.22,271490000,3772.22
+1994-06-02,3760.83,3791.60,3732.83,3758.99,271150000,3758.99
+1994-06-01,3758.37,3785.14,3717.76,3760.83,279910000,3760.83
+1994-05-31,3757.14,3783.29,3725.45,3758.37,216700000,3758.37
+1994-05-27,3753.46,3772.18,3723.68,3757.14,186430000,3757.14
+1994-05-26,3755.30,3785.07,3722.76,3753.46,255740000,3753.46
+1994-05-25,3745.17,3768.19,3710.79,3755.30,254410000,3755.30
+1994-05-24,3742.41,3786.30,3707.11,3745.17,280040000,3745.17
+1994-05-23,3766.35,3770.65,3711.40,3742.41,249390000,3742.41
+1994-05-20,3758.98,3788.76,3721.84,3766.35,295180000,3766.35
+1994-05-19,3732.89,3782.92,3707.72,3758.98,303680000,3758.98
+1994-05-18,3720.61,3761.74,3683.16,3732.89,339280000,3732.89
+1994-05-17,3671.50,3735.04,3653.70,3720.61,311280000,3720.61
+1994-05-16,3659.68,3694.21,3628.52,3671.50,234680000,3671.50
+1994-05-13,3652.84,3690.32,3626.37,3659.68,252070000,3659.68
+1994-05-12,3629.04,3682.58,3624.58,3652.84,272770000,3652.84
+1994-05-11,3656.41,3678.42,3609.71,3629.04,277400000,3629.04
+1994-05-10,3629.04,3684.67,3627.56,3656.41,297660000,3656.41
+1994-05-09,3669.50,3676.93,3612.39,3629.04,250870000,3629.04
+1994-05-06,3695.97,3702.51,3625.77,3669.50,291910000,3669.50
+1994-05-05,3697.75,3731.07,3675.45,3695.97,255690000,3695.97
+1994-05-04,3714.41,3730.17,3670.09,3697.75,267940000,3697.75
+1994-05-03,3701.02,3736.12,3669.79,3714.41,288270000,3714.41
+1994-05-02,3681.69,3734.04,3648.97,3701.02,296130000,3701.02
+1994-04-29,3668.31,3707.87,3642.13,3681.69,293970000,3681.69
+1994-04-28,3699.54,3723.93,3640.35,3668.31,325200000,3668.31
+1994-04-26,3705.78,3733.15,3669.79,3699.54,288110000,3699.54
+1994-04-25,3648.68,3721.25,3635.29,3705.78,262220000,3705.78
+1994-04-22,3652.54,3690.32,3621.01,3648.68,295710000,3648.68
+1994-04-21,3598.71,3673.96,3582.94,3652.54,378760000,3652.54
+1994-04-20,3619.82,3662.66,3546.65,3598.71,366540000,3598.71
+1994-04-19,3620.42,3670.39,3567.18,3619.82,323280000,3619.82
+1994-04-18,3661.47,3679.61,3593.35,3620.42,271450000,3620.42
+1994-04-15,3663.25,3699.24,3631.13,3661.47,309550000,3661.47
+1994-04-14,3661.47,3693.59,3625.77,3663.25,275130000,3663.25
+1994-04-13,3681.69,3704.30,3616.85,3661.47,278030000,3661.47
+1994-04-12,3688.83,3722.14,3661.17,3681.69,256250000,3681.69
+1994-04-11,3674.26,3720.66,3651.35,3688.83,243180000,3688.83
+1994-04-08,3693.26,3717.15,3644.03,3674.26,264090000,3674.26
+1994-04-07,3679.73,3712.83,3642.59,3693.26,289280000,3693.26
+1994-04-06,3675.41,3722.34,3643.16,3679.73,302000000,3679.73
+1994-04-05,3625.02,3698.15,3625.02,3675.41,366890000,3675.41
+1994-04-04,3633.08,3633.08,3520.80,3593.35,344390000,3593.35
+1994-03-31,3626.75,3673.10,3544.12,3635.96,403580000,3635.96
+1994-03-30,3699.02,3718.88,3612.36,3626.75,390520000,3626.75
+1994-03-29,3762.35,3771.86,3689.23,3699.02,301630000,3699.02
+1994-03-28,3774.73,3793.45,3719.74,3762.35,287360000,3762.35
+1994-03-25,3821.09,3845.85,3764.66,3774.73,249670000,3774.73
+1994-03-24,3865.42,3865.42,3792.58,3821.09,303800000,3821.09
+1994-03-23,3862.55,3901.41,3839.80,3869.46,284600000,3869.46
+1994-03-22,3864.85,3896.23,3840.66,3862.55,283090000,3862.55
+1994-03-21,3895.65,3898.25,3838.65,3864.85,247390000,3864.85
+1994-03-18,3865.14,3911.78,3838.65,3895.65,462240000,3895.65
+1994-03-17,3848.15,3891.34,3821.66,3865.14,303950000,3865.14
+1994-03-16,3849.59,3879.53,3819.94,3848.15,306820000,3848.15
+1994-03-15,3862.98,3888.46,3826.85,3849.59,329260000,3849.59
+1994-03-14,3862.70,3894.21,3835.96,3862.98,260160000,3862.98
+1994-03-11,3830.62,3872.83,3806.69,3862.70,303250000,3862.70
+1994-03-10,3853.41,3865.51,3801.63,3830.62,369370000,3830.62
+1994-03-09,3851.72,3874.52,3817.95,3853.41,309810000,3853.41
+1994-03-08,3856.22,3881.55,3822.45,3851.72,298110000,3851.72
+1994-03-07,3832.30,3882.40,3824.71,3856.22,285580000,3856.22
+1994-03-04,3824.42,3868.04,3800.50,3832.30,311850000,3832.30
+1994-03-03,3831.74,3862.13,3784.74,3824.42,291960000,3824.42
+1994-03-02,3809.23,3845.25,3741.69,3831.74,361130000,3831.74
+1994-03-01,3832.02,3848.34,3772.93,3809.23,304450000,3809.23
+1994-02-28,3838.78,3874.52,3817.95,3832.02,267610000,3832.02
+1994-02-25,3839.90,3868.89,3811.76,3838.78,273680000,3838.78
+1994-02-24,3891.68,3895.62,3823.86,3839.90,342940000,3839.90
+1994-02-23,3911.66,3931.36,3872.83,3891.68,309910000,3891.68
+1994-02-22,3887.46,3928.83,3873.39,3911.66,270900000,3911.66
+1994-02-18,3922.64,3931.92,3869.73,3887.46,293210000,3887.46
+1994-02-17,3937.27,3975.82,3894.21,3922.64,340030000,3922.64
+1994-02-16,3928.27,3964.85,3906.32,3937.27,295450000,3937.27
+1994-02-15,3904.06,3950.50,3891.40,3928.27,306790000,3928.27
+1994-02-14,3894.78,3935.86,3873.67,3904.06,263190000,3904.06
+1994-02-11,3895.34,3920.95,3855.94,3894.78,213740000,3894.78
+1994-02-10,3931.92,3953.59,3882.96,3895.34,327250000,3895.34
+1994-02-09,3906.03,3956.97,3887.74,3931.92,332670000,3931.92
+1994-02-08,3906.32,3951.34,3873.67,3906.03,318180000,3906.03
+1994-02-07,3871.42,3923.48,3840.75,3906.32,348270000,3906.32
+1994-02-04,3967.66,3979.76,3857.63,3871.42,378380000,3871.42
+1994-02-03,3975.54,3995.52,3932.77,3967.66,318350000,3967.66
+1994-02-02,3964.01,3997.78,3937.27,3975.54,328960000,3975.54
+1994-02-01,3978.36,3998.06,3938.12,3964.01,322510000,3964.01
+1994-01-31,3945.43,4002.84,3937.27,3978.36,322870000,3978.36
+1994-01-28,3926.30,3971.89,3919.54,3945.43,313140000,3945.43
+1994-01-27,3908.00,3951.34,3876.77,3926.30,346500000,3926.30
+1994-01-26,3895.34,3934.74,3863.82,3908.00,304660000,3908.00
+1994-01-25,3912.79,3937.55,3863.82,3895.34,326120000,3895.34
+1994-01-24,3914.48,3947.68,3882.11,3912.79,296900000,3912.79
+1994-01-21,3891.96,3933.33,3875.36,3914.48,346220000,3914.48
+1994-01-20,3884.37,3915.60,3857.91,3891.96,310450000,3891.96
+1994-01-19,3870.29,3909.97,3839.34,3884.37,311370000,3884.37
+1994-01-18,3870.29,3905.19,3840.75,3870.29,309730000,3870.29
+1994-01-17,3867.20,3896.75,3833.71,3870.29,233980000,3870.29
+1994-01-14,3842.43,3891.96,3830.62,3867.20,304910000,3867.20
+1994-01-13,3848.63,3864.67,3808.38,3842.43,277970000,3842.43
+1994-01-12,3850.31,3876.49,3809.79,3848.63,310690000,3848.63
+1994-01-11,3865.51,3885.21,3823.02,3850.31,305490000,3850.31
+1994-01-10,3820.77,3874.52,3804.72,3865.51,319490000,3865.51
+1994-01-07,3803.88,3842.15,3778.83,3820.77,324920000,3820.77
+1994-01-06,3798.82,3843.84,3771.52,3803.88,367880000,3803.88
+1994-01-05,3783.90,3821.33,3750.41,3798.82,400030000,3798.82
+1994-01-04,3756.60,3798.25,3718.89,3783.90,326600000,3783.90
+1994-01-03,3754.09,3790.70,3715.24,3756.60,270140000,3756.60
+1993-12-31,3775.88,3804.11,3745.15,3754.09,168590000,3754.09
+1993-12-30,3794.33,3806.34,3759.96,3775.88,195860000,3775.88
+1993-12-29,3793.77,3818.92,3764.43,3794.33,269570000,3794.33
+1993-12-28,3792.93,3813.33,3766.10,3793.77,200960000,3793.77
+1993-12-27,3757.72,3804.95,3750.46,3792.93,171200000,3792.93
+1993-12-23,3762.19,3791.81,3739.56,3757.72,227240000,3757.72
+1993-12-22,3745.15,3780.64,3725.86,3762.19,272440000,3762.19
+1993-12-21,3755.21,3774.77,3719.72,3745.15,273370000,3745.15
+1993-12-20,3751.57,3777.84,3728.66,3755.21,255900000,3755.21
+1993-12-17,3726.14,3768.90,3706.30,3751.57,363750000,3751.57
+1993-12-16,3716.92,3756.60,3694.29,3726.14,284620000,3726.14
+1993-12-15,3742.63,3776.44,3689.82,3716.92,331770000,3716.92
+1993-12-14,3764.43,3785.94,3726.70,3742.63,275050000,3742.63
+1993-12-13,3740.67,3780.64,3711.33,3764.43,256580000,3764.43
+1993-12-10,3729.78,3758.84,3704.91,3740.67,245620000,3740.67
+1993-12-09,3734.53,3764.43,3709.94,3729.78,287570000,3729.78
+1993-12-08,3718.88,3756.60,3693.73,3734.53,314460000,3734.53
+1993-12-07,3710.21,3746.82,3689.26,3718.88,285690000,3718.88
+1993-12-06,3704.07,3738.44,3687.30,3710.21,292370000,3710.21
+1993-12-03,3702.11,3726.98,3677.80,3704.07,268780000,3704.07
+1993-12-02,3697.08,3725.30,3674.17,3702.11,256370000,3702.11
+1993-12-01,3683.95,3731.73,3673.33,3697.08,293870000,3697.08
+1993-11-30,3677.80,3713.57,3654.88,3683.95,290250000,3683.95
+1993-11-29,3683.95,3721.67,3654.33,3677.80,272710000,3677.80
+1993-11-26,3687.58,3703.23,3660.75,3683.95,90220000,3683.95
+1993-11-24,3674.17,3709.94,3654.33,3687.58,230630000,3687.58
+1993-11-23,3670.25,3702.67,3649.57,3674.17,261590000,3674.17
+1993-11-22,3694.01,3697.92,3627.78,3670.25,280130000,3670.25
+1993-11-19,3685.34,3711.05,3640.07,3694.01,302970000,3694.01
+1993-11-18,3704.35,3721.95,3649.57,3685.34,313480000,3685.34
+1993-11-17,3710.77,3749.90,3660.19,3704.35,319560000,3704.35
+1993-11-16,3677.52,3723.91,3653.77,3710.77,303980000,3710.77
+1993-11-15,3684.51,3705.74,3653.49,3677.52,251030000,3677.52
+1993-11-12,3662.43,3707.42,3648.74,3684.51,326240000,3684.51
+1993-11-11,3663.55,3700.43,3638.40,3662.43,287110000,3662.43
+1993-11-10,3640.07,3683.39,3616.60,3663.55,283450000,3663.55
+1993-11-09,3647.90,3689.82,3623.03,3640.07,278290000,3640.07
+1993-11-08,3643.43,3674.17,3621.91,3647.90,232340000,3647.90
+1993-11-05,3624.98,3663.83,3585.86,3643.43,336900000,3643.43
+1993-11-04,3661.87,3681.99,3609.61,3624.98,323430000,3624.98
+1993-11-03,3697.64,3714.69,3638.40,3661.87,342110000,3661.87
+1993-11-02,3692.61,3724.75,3656.00,3697.64,304780000,3697.64
+1993-11-01,3680.59,3708.26,3656.84,3692.61,256030000,3692.61
+1993-10-29,3687.86,3712.45,3656.84,3680.59,270570000,3680.59
+1993-10-28,3664.66,3713.57,3657.96,3687.86,301220000,3687.86
+1993-10-27,3672.49,3692.33,3634.76,3664.66,279830000,3664.66
+1993-10-26,3673.61,3701.55,3636.16,3672.49,284530000,3672.49
+1993-10-25,3649.30,3694.01,3618.28,3673.61,260310000,3673.61
+1993-10-22,3636.16,3697.92,3612.13,3649.30,301440000,3649.30
+1993-10-21,3645.10,3678.36,3610.45,3636.16,288820000,3636.16
+1993-10-20,3635.32,3667.74,3611.85,3645.10,305670000,3645.10
+1993-10-19,3642.31,3669.97,3601.79,3635.32,304400000,3635.32
+1993-10-18,3629.73,3675.84,3595.92,3642.31,329570000,3642.31
+1993-10-15,3621.63,3664.66,3596.20,3629.73,366110000,3629.73
+1993-10-14,3603.19,3652.09,3574.40,3621.63,353820000,3621.63
+1993-10-13,3593.13,3628.34,3574.12,3603.19,290930000,3603.19
+1993-10-12,3593.41,3619.39,3575.24,3593.13,263970000,3593.13
+1993-10-11,3584.74,3611.01,3565.46,3593.41,183190000,3593.41
+1993-10-08,3583.63,3610.45,3550.37,3584.74,243590000,3584.74
+1993-10-07,3598.99,3616.32,3564.90,3583.63,255210000,3583.63
+1993-10-06,3587.26,3620.79,3570.21,3598.99,277070000,3598.99
+1993-10-05,3577.76,3616.88,3553.72,3587.26,294570000,3587.26
+1993-10-04,3581.11,3603.19,3550.65,3577.76,229380000,3577.76
+1993-10-01,3555.12,3605.14,3541.71,3581.11,256870000,3581.11
+1993-09-30,3566.30,3583.63,3528.57,3555.12,282740000,3555.12
+1993-09-29,3566.02,3596.48,3538.91,3566.30,277690000,3566.30
+1993-09-28,3567.70,3589.49,3542.27,3566.02,243320000,3566.02
+1993-09-27,3543.11,3589.49,3539.47,3567.70,244920000,3567.70
+1993-09-24,3539.75,3568.54,3507.90,3543.11,248270000,3543.11
+1993-09-23,3547.02,3567.70,3513.48,3539.75,276660000,3539.75
+1993-09-22,3537.24,3577.20,3516.56,3547.02,288960000,3547.02
+1993-09-21,3575.80,3592.57,3501.47,3537.24,301740000,3537.24
+1993-09-20,3613.25,3632.81,3567.98,3575.80,228040000,3575.80
+1993-09-17,3630.85,3637.28,3580.83,3613.25,369600000,3613.25
+1993-09-16,3633.65,3651.25,3601.79,3630.85,229700000,3630.85
+1993-09-15,3615.76,3644.82,3573.84,3633.65,294410000,3633.65
+1993-09-14,3634.21,3639.51,3590.61,3615.76,258620000,3615.76
+1993-09-13,3621.63,3655.16,3607.66,3634.21,244970000,3634.21
+1993-09-10,3589.49,3636.16,3576.64,3621.63,269950000,3621.63
+1993-09-09,3588.93,3616.04,3556.52,3589.49,258070000,3589.49
+1993-09-08,3607.10,3623.31,3561.27,3588.93,283100000,3588.93
+1993-09-07,3633.93,3649.02,3592.57,3607.10,229500000,3607.10
+1993-09-03,3626.10,3651.53,3603.75,3633.93,197160000,3633.93
+1993-09-02,3645.10,3660.19,3610.17,3626.10,259870000,3626.10
+1993-09-01,3651.25,3665.50,3619.67,3645.10,245040000,3645.10
+1993-08-31,3643.99,3662.99,3619.67,3651.25,252830000,3651.25
+1993-08-30,3640.63,3667.46,3621.63,3643.99,194180000,3643.99
+1993-08-27,3648.18,3656.28,3606.54,3640.63,196140000,3640.63
+1993-08-26,3652.09,3681.71,3620.23,3648.18,247800000,3648.18
+1993-08-25,3638.96,3674.17,3620.51,3652.09,301640000,3652.09
+1993-08-24,3605.98,3648.18,3590.89,3638.96,270700000,3638.96
+1993-08-23,3615.48,3630.57,3578.87,3605.98,212500000,3605.98
+1993-08-20,3612.13,3633.37,3580.55,3615.48,276800000,3615.48
+1993-08-19,3604.86,3632.25,3581.11,3612.13,293330000,3612.13
+1993-08-18,3586.98,3638.96,3577.48,3604.86,312940000,3604.86
+1993-08-17,3579.15,3611.29,3554.00,3586.98,261320000,3586.98
+1993-08-16,3569.65,3606.54,3547.86,3579.15,229190000,3579.15
+1993-08-13,3569.09,3594.52,3547.58,3569.65,214370000,3569.65
+1993-08-12,3583.35,3607.66,3537.24,3569.09,278530000,3569.09
+1993-08-11,3572.73,3607.94,3550.93,3583.35,268330000,3583.35
+1993-08-10,3576.08,3599.83,3547.02,3572.73,255520000,3572.73
+1993-08-09,3560.43,3599.83,3541.15,3576.08,232750000,3576.08
+1993-08-06,3548.97,3583.35,3536.12,3560.43,221150000,3560.43
+1993-08-05,3552.05,3574.12,3523.54,3548.97,249650000,3548.97
+1993-08-04,3561.27,3579.99,3530.25,3552.05,230040000,3552.05
+1993-08-03,3560.99,3588.10,3530.81,3561.27,254540000,3561.27
+1993-08-02,3539.47,3578.32,3524.94,3560.99,230380000,3560.99
+1993-07-30,3567.42,3581.11,3515.72,3539.47,254420000,3539.47
+1993-07-29,3553.45,3593.41,3531.37,3567.42,261240000,3567.42
+1993-07-28,3565.46,3588.38,3524.38,3553.45,270530000,3553.45
+1993-07-27,3567.70,3604.86,3533.60,3565.46,256750000,3565.46
+1993-07-26,3546.74,3584.74,3541.43,3567.70,223280000,3567.70
+1993-07-23,3525.22,3569.37,3508.17,3546.74,222170000,3546.74
+1993-07-22,3555.40,3566.86,3514.32,3525.22,249630000,3525.22
+1993-07-21,3544.78,3573.84,3516.84,3555.40,278590000,3555.40
+1993-07-20,3535.28,3567.98,3500.63,3544.78,275130000,3544.78
+1993-07-19,3528.29,3563.23,3502.87,3535.28,216370000,3535.28
+1993-07-16,3550.93,3571.61,3505.94,3528.29,263100000,3528.29
+1993-07-15,3542.55,3573.01,3509.85,3550.93,277810000,3550.93
+1993-07-14,3515.44,3562.39,3507.34,3542.55,285890000,3542.55
+1993-07-13,3524.38,3544.22,3491.13,3515.44,236720000,3515.44
+1993-07-12,3521.06,3545.97,3495.04,3524.38,202310000,3524.38
+1993-07-09,3514.42,3544.03,3490.89,3521.06,235210000,3521.06
+1993-07-08,3475.67,3532.41,3462.38,3514.42,282910000,3514.42
+1993-07-07,3449.93,3495.32,3443.28,3475.67,253170000,3475.67
+1993-07-06,3483.97,3502.52,3443.28,3449.93,233420000,3449.93
+1993-07-02,3510.54,3511.65,3468.47,3483.97,220750000,3483.97
+1993-07-01,3516.08,3542.10,3487.29,3510.54,292040000,3510.54
+1993-06-30,3518.85,3543.48,3493.11,3516.08,281120000,3516.08
+1993-06-29,3530.20,3544.87,3491.44,3518.85,276310000,3518.85
+1993-06-28,3490.89,3542.10,3486.74,3530.20,242090000,3530.20
+1993-06-25,3490.61,3512.76,3473.18,3490.89,210430000,3490.89
+1993-06-24,3466.81,3504.73,3449.10,3490.61,267450000,3490.61
+1993-06-23,3497.53,3514.14,3445.77,3466.81,278260000,3466.81
+1993-06-22,3510.82,3530.47,3474.28,3497.53,259530000,3497.53
+1993-06-21,3494.77,3531.86,3477.05,3510.82,223650000,3510.82
+1993-06-18,3521.89,3539.88,3478.44,3494.77,300500000,3494.77
+1993-06-17,3511.65,3539.61,3488.68,3521.89,239810000,3521.89
+1993-06-16,3492.00,3527.43,3460.17,3511.65,264500000,3511.65
+1993-06-15,3514.69,3531.86,3471.24,3492.00,234110000,3492.00
+1993-06-14,3505.01,3538.22,3486.74,3514.69,210440000,3514.69
+1993-06-11,3491.72,3536.01,3479.27,3505.01,255200000,3505.01
+1993-06-10,3511.93,3538.22,3461.83,3491.72,231760000,3491.72
+1993-06-09,3510.54,3541.54,3490.89,3511.93,249030000,3511.93
+1993-06-08,3532.13,3543.48,3494.21,3510.54,238170000,3510.54
+1993-06-07,3545.14,3570.33,3510.82,3532.13,236930000,3532.13
+1993-06-04,3544.87,3563.13,3516.63,3545.14,226440000,3545.14
+1993-06-03,3553.45,3569.50,3516.08,3544.87,285770000,3544.87
+1993-06-02,3552.34,3576.14,3530.47,3553.45,287120000,3553.45
+1993-06-01,3527.43,3577.25,3518.02,3552.34,229690000,3552.34
+1993-05-28,3554.83,3563.41,3503.62,3527.43,207820000,3527.43
+1993-05-27,3540.16,3582.23,3523.28,3554.83,300810000,3554.83
+1993-05-26,3516.63,3558.98,3498.64,3540.16,274230000,3540.16
+1993-05-25,3507.78,3534.35,3486.46,3516.63,222090000,3516.63
+1993-05-24,3492.83,3526.60,3472.35,3507.78,197990000,3507.78
+1993-05-21,3523.28,3532.96,3468.47,3492.83,279120000,3492.83
+1993-05-20,3500.03,3539.88,3475.39,3523.28,289160000,3523.28
+1993-05-19,3444.39,3511.10,3405.09,3500.03,342420000,3500.03
+1993-05-18,3449.93,3468.47,3409.79,3444.39,264300000,3444.39
+1993-05-17,3443.01,3465.98,3421.42,3449.93,227580000,3449.93
+1993-05-14,3447.99,3472.62,3421.14,3443.01,252910000,3443.01
+1993-05-13,3482.31,3486.74,3428.89,3447.99,289860000,3447.99
+1993-05-12,3468.75,3501.69,3441.07,3482.31,255680000,3482.31
+1993-05-11,3443.28,3481.76,3421.42,3468.75,218480000,3468.75
+1993-05-10,3437.19,3485.36,3420.31,3443.28,235580000,3443.28
+1993-05-07,3441.90,3468.47,3413.67,3437.19,223570000,3437.19
+1993-05-06,3449.10,3475.67,3418.93,3441.90,255460000,3441.90
+1993-05-05,3446.19,3478.44,3420.86,3449.10,270960000,3449.10
+1993-05-04,3446.46,3477.26,3424.04,3446.19,268310000,3446.19
+1993-05-03,3427.55,3462.94,3402.42,3446.46,220860000,3446.46
+1993-04-30,3425.12,3466.18,3405.39,3427.55,247460000,3427.55
+1993-04-29,3413.50,3444.57,3377.57,3425.12,249760000,3425.12
+1993-04-28,3415.93,3445.65,3372.16,3413.50,267980000,3413.50
+1993-04-27,3398.37,3433.76,3364.06,3415.93,284140000,3415.93
+1993-04-26,3413.77,3442.14,3369.46,3398.37,281180000,3398.37
+1993-04-23,3429.17,3448.08,3385.67,3413.77,259810000,3413.77
+1993-04-22,3439.44,3488.33,3399.99,3429.17,310390000,3429.17
+1993-04-21,3443.49,3480.77,3401.34,3439.44,287300000,3439.44
+1993-04-20,3466.99,3486.71,3400.26,3443.49,317990000,3443.49
+1993-04-19,3478.61,3499.41,3436.73,3466.99,244710000,3466.99
+1993-04-16,3455.92,3498.60,3437.54,3478.61,305160000,3478.61
+1993-04-15,3455.64,3484.28,3419.17,3455.92,259500000,3455.92
+1993-04-14,3444.03,3482.93,3424.85,3455.64,257340000,3455.64
+1993-04-13,3428.09,3469.42,3408.37,3444.03,286690000,3444.03
+1993-04-12,3396.48,3452.67,3391.08,3428.09,259610000,3428.09
+1993-04-08,3397.02,3429.44,3357.58,3396.48,282470000,3396.48
+1993-04-07,3377.57,3417.55,3355.41,3397.02,296290000,3397.02
+1993-04-06,3379.19,3417.55,3339.75,3377.57,289640000,3377.57
+1993-04-05,3370.81,3411.61,3338.39,3379.19,238630000,3379.19
+1993-04-02,3439.44,3439.44,3344.88,3370.81,323330000,3370.81
+1993-04-01,3435.11,3466.45,3419.98,3439.44,231950000,3439.44
+1993-03-31,3457.27,3484.82,3424.85,3435.11,275710000,3435.11
+1993-03-30,3455.10,3481.58,3422.14,3457.27,233330000,3457.27
+1993-03-29,3439.98,3487.52,3431.87,3455.10,199890000,3455.10
+1993-03-26,3461.32,3484.28,3428.63,3439.98,219130000,3439.98
+1993-03-25,3445.38,3485.36,3429.44,3461.32,250040000,3461.32
+1993-03-24,3461.86,3489.14,3417.55,3445.38,271980000,3445.38
+1993-03-23,3463.48,3488.60,3438.08,3461.86,231900000,3461.86
+1993-03-22,3471.58,3483.20,3429.71,3463.48,231900000,3463.48
+1993-03-19,3465.64,3493.20,3446.46,3471.58,295510000,3471.58
+1993-03-18,3427.01,3486.17,3427.01,3465.64,240490000,3465.64
+1993-03-17,3442.95,3458.35,3408.91,3426.74,237850000,3426.74
+1993-03-16,3442.41,3466.72,3423.77,3442.95,217730000,3442.95
+1993-03-15,3427.82,3460.51,3412.96,3442.41,192690000,3442.41
+1993-03-12,3447.81,3447.81,3385.40,3427.82,244740000,3427.82
+1993-03-11,3478.34,3493.74,3437.27,3457.00,250720000,3457.00
+1993-03-10,3472.12,3497.25,3432.68,3478.34,255190000,3478.34
+1993-03-09,3469.42,3495.63,3443.76,3472.12,290120000,3472.12
+1993-03-08,3404.58,3476.99,3401.34,3469.42,274560000,3469.42
+1993-03-05,3398.91,3447.81,3373.25,3404.58,247130000,3404.58
+1993-03-04,3404.04,3423.77,3372.43,3398.91,230780000,3398.91
+1993-03-03,3400.53,3437.00,3368.92,3404.04,272290000,3404.04
+1993-03-02,3355.41,3406.21,3334.07,3400.53,269640000,3400.53
+1993-03-01,3370.81,3404.58,3336.23,3355.41,232090000,3355.41
+1993-02-26,3365.14,3396.21,3336.23,3370.81,234160000,3370.81
+1993-02-25,3356.50,3387.02,3326.78,3365.14,252790000,3365.14
+1993-02-24,3323.27,3371.89,3311.92,3356.50,298940000,3356.50
+1993-02-23,3342.99,3373.52,3296.79,3323.27,321050000,3323.27
+1993-02-22,3322.18,3367.30,3297.06,3342.99,311510000,3342.99
+1993-02-19,3302.19,3347.04,3270.04,3322.18,307960000,3322.18
+1993-02-18,3312.19,3362.98,3262.48,3302.19,309570000,3302.19
+1993-02-17,3309.49,3338.12,3273.56,3312.19,287240000,3312.19
+1993-02-16,3391.62,3391.62,3285.98,3309.49,325350000,3309.49
+1993-02-12,3422.69,3436.19,3378.11,3392.43,215750000,3392.43
+1993-02-11,3412.42,3455.64,3395.94,3422.69,252780000,3422.69
+1993-02-10,3414.58,3438.08,3379.19,3412.42,248480000,3412.42
+1993-02-09,3437.54,3449.16,3394.86,3414.58,233670000,3414.58
+1993-02-08,3442.14,3472.94,3408.91,3437.54,240350000,3437.54
+1993-02-05,3416.74,3463.21,3391.62,3442.14,320960000,3442.14
+1993-02-04,3373.79,3441.33,3367.03,3416.74,346480000,3416.74
+1993-02-03,3328.67,3397.83,3322.73,3373.79,342530000,3373.79
+1993-02-02,3332.18,3355.68,3300.30,3328.67,269250000,3328.67
+1993-02-01,3310.03,3343.80,3300.30,3332.18,238260000,3332.18
+1993-01-29,3306.25,3331.10,3287.06,3310.03,247010000,3310.03
+1993-01-28,3291.39,3327.86,3270.58,3306.25,255550000,3306.25
+1993-01-27,3298.95,3318.67,3260.05,3291.39,276880000,3291.39
+1993-01-26,3292.20,3331.91,3272.47,3298.95,311450000,3298.95
+1993-01-25,3256.81,3324.89,3243.84,3292.20,288010000,3292.20
+1993-01-22,3253.02,3292.74,3225.74,3256.81,293250000,3256.81
+1993-01-21,3241.95,3269.77,3219.25,3253.02,257350000,3253.02
+1993-01-20,3255.99,3278.96,3231.41,3241.95,267740000,3241.95
+1993-01-19,3274.91,3299.49,3239.52,3255.99,283110000,3255.99
+1993-01-18,3271.12,3296.52,3244.65,3274.91,195980000,3274.91
+1993-01-15,3267.88,3300.03,3238.70,3271.12,306140000,3271.12
+1993-01-14,3263.56,3297.06,3230.87,3267.88,280020000,3267.88
+1993-01-13,3264.64,3283.01,3225.47,3263.56,245020000,3263.56
+1993-01-12,3262.75,3287.06,3229.79,3264.64,239250000,3264.64
+1993-01-11,3251.67,3284.09,3228.98,3262.75,217150000,3262.75
+1993-01-08,3268.96,3280.31,3221.68,3251.67,262620000,3251.67
+1993-01-07,3305.16,3333.51,3250.30,3268.96,303140000,3268.96
+1993-01-06,3307.87,3330.29,3276.53,3305.16,282850000,3305.16
+1993-01-05,3309.22,3338.12,3279.23,3307.87,240550000,3307.87
+1993-01-04,3301.11,3335.69,3282.74,3309.22,199680000,3309.22
+1992-12-31,3321.10,3340.29,3294.36,3301.11,165910000,3301.11
+1992-12-30,3310.84,3340.54,3298.93,3321.10,183870000,3321.10
+1992-12-29,3333.26,3364.87,3295.71,3310.84,213660000,3310.84
+1992-12-28,3326.24,3352.17,3297.33,3333.26,143800000,3333.26
+1992-12-24,3313.54,3339.48,3303.27,3326.24,95240000,3326.24
+1992-12-23,3321.10,3350.55,3293.01,3313.54,227980000,3313.54
+1992-12-22,3312.46,3347.04,3286.52,3321.10,249670000,3321.10
+1992-12-21,3313.27,3335.15,3280.85,3312.46,224680000,3312.46
+1992-12-18,3269.23,3325.97,3261.94,3313.27,371080000,3313.27
+1992-12-17,3255.18,3289.22,3229.79,3269.23,248590000,3269.23
+1992-12-16,3284.36,3303.00,3238.70,3255.18,241910000,3255.18
+1992-12-15,3292.20,3313.27,3260.32,3284.36,225880000,3284.36
+1992-12-14,3304.08,3324.89,3279.50,3292.20,183510000,3292.20
+1992-12-11,3312.19,3324.89,3280.85,3304.08,164450000,3304.08
+1992-12-10,3323.81,3335.69,3285.17,3312.19,240570000,3312.19
+1992-12-09,3322.18,3345.42,3295.98,3323.81,229980000,3323.81
+1992-12-08,3307.33,3331.64,3288.41,3322.18,234300000,3322.18
+1992-12-07,3288.68,3320.56,3274.37,3307.33,217700000,3307.33
+1992-12-04,3276.53,3312.46,3261.40,3288.68,227410000,3288.68
+1992-12-03,3286.25,3302.73,3252.48,3276.53,238200000,3276.53
+1992-12-02,3294.36,3310.84,3265.18,3286.25,241860000,3286.25
+1992-12-01,3305.16,3321.64,3268.15,3294.36,259020000,3294.36
+1992-11-30,3282.20,3326.51,3270.31,3305.16,230190000,3305.16
+1992-11-27,3266.26,3304.62,3259.24,3282.20,106010000,3282.20
+1992-11-25,3248.70,3285.71,3243.57,3266.26,206700000,3266.26
+1992-11-24,3223.04,3277.88,3209.26,3248.70,241520000,3248.70
+1992-11-23,3227.36,3251.13,3196.83,3223.04,190490000,3223.04
+1992-11-20,3209.53,3249.78,3197.64,3227.36,256340000,3227.36
+1992-11-19,3207.37,3231.14,3190.35,3209.53,218700000,3209.53
+1992-11-18,3193.32,3227.09,3176.84,3207.37,218660000,3207.37
+1992-11-17,3205.74,3223.31,3178.19,3193.32,185460000,3193.32
+1992-11-16,3233.03,3241.41,3191.16,3205.74,173500000,3205.74
+1992-11-13,3239.79,3252.48,3211.69,3233.03,192320000,3233.03
+1992-11-12,3240.33,3264.91,3214.39,3239.79,224580000,3239.79
+1992-11-11,3225.47,3258.70,3203.31,3240.33,240160000,3240.33
+1992-11-10,3240.87,3268.15,3212.50,3225.47,221990000,3225.47
+1992-11-09,3240.06,3268.69,3220.33,3240.87,197490000,3240.87
+1992-11-06,3243.84,3264.64,3216.82,3240.06,204870000,3240.06
+1992-11-05,3223.04,3259.78,3203.58,3243.84,219580000,3243.84
+1992-11-04,3252.48,3274.10,3211.15,3223.04,193980000,3223.04
+1992-11-03,3262.21,3285.44,3226.82,3252.48,209740000,3252.48
+1992-11-02,3226.28,3274.64,3211.42,3262.21,201620000,3262.21
+1992-10-30,3246.27,3260.59,3208.45,3226.28,196740000,3226.28
+1992-10-29,3251.40,3268.96,3224.39,3246.27,206300000,3246.27
+1992-10-28,3235.73,3262.48,3210.34,3251.40,203040000,3251.40
+1992-10-27,3244.11,3270.31,3210.88,3235.73,201650000,3235.73
+1992-10-26,3207.64,3256.00,3190.08,3244.11,187950000,3244.11
+1992-10-23,3200.88,3233.57,3175.76,3207.64,197400000,3207.64
+1992-10-22,3187.10,3221.14,3162.79,3200.88,216080000,3200.88
+1992-10-21,3186.02,3211.69,3163.33,3187.10,218990000,3187.10
+1992-10-20,3188.45,3223.31,3166.30,3186.02,258220000,3186.02
+1992-10-19,3174.41,3211.15,3154.14,3188.45,218670000,3188.45
+1992-10-16,3174.68,3203.85,3123.89,3174.41,234480000,3174.41
+1992-10-15,3195.48,3207.37,3147.66,3174.68,206990000,3174.68
+1992-10-14,3201.42,3225.74,3167.11,3195.48,175440000,3195.48
+1992-10-13,3174.41,3222.77,3159.28,3201.42,184120000,3201.42
+1992-10-12,3140.10,3186.29,3140.10,3174.41,126590000,3174.41
+1992-10-09,3176.03,3176.57,3120.37,3136.58,178910000,3136.58
+1992-10-08,3152.25,3195.48,3135.77,3176.03,203780000,3176.03
+1992-10-07,3178.19,3200.88,3136.85,3152.25,183100000,3152.25
+1992-10-06,3179.00,3205.20,3147.93,3178.19,196660000,3178.19
+1992-10-05,3197.10,3197.10,3087.41,3179.00,284380000,3179.00
+1992-10-02,3254.37,3259.51,3193.59,3200.61,187400000,3200.61
+1992-10-01,3271.66,3291.39,3237.35,3254.37,203670000,3254.37
+1992-09-30,3266.80,3291.66,3247.89,3271.66,184220000,3271.66
+1992-09-29,3276.26,3295.98,3247.08,3266.80,170350000,3266.80
+1992-09-28,3250.32,3283.01,3226.55,3276.26,157480000,3276.26
+1992-09-25,3287.87,3292.20,3226.82,3250.32,213650000,3250.32
+1992-09-24,3278.69,3310.84,3267.07,3287.87,187770000,3287.87
+1992-09-23,3280.85,3302.19,3252.48,3278.69,204350000,3278.69
+1992-09-22,3320.83,3327.05,3270.58,3280.85,186990000,3280.85
+1992-09-21,3327.05,3341.91,3295.71,3320.83,153900000,3320.83
+1992-09-18,3315.70,3340.56,3297.87,3327.05,236080000,3327.05
+1992-09-17,3319.21,3347.04,3292.20,3315.70,188270000,3315.70
+1992-09-16,3327.32,3353.52,3288.95,3319.21,229380000,3319.21
+1992-09-15,3372.98,3372.98,3317.86,3327.32,200220000,3327.32
+1992-09-14,3326.51,3391.35,3326.51,3376.22,250900000,3376.22
+1992-09-11,3305.16,3327.32,3285.44,3305.70,180640000,3305.70
+1992-09-10,3271.39,3318.94,3261.67,3305.16,221970000,3305.16
+1992-09-09,3260.59,3284.09,3244.92,3271.39,172890000,3271.39
+1992-09-08,3281.93,3292.20,3245.73,3260.59,160930000,3260.59
+1992-09-04,3292.20,3306.23,3265.16,3281.93,124340000,3281.93
+1992-09-03,3290.31,3325.95,3268.94,3292.20,212540000,3292.20
+1992-09-02,3266.26,3301.90,3249.76,3290.31,187010000,3290.31
+1992-09-01,3257.35,3279.21,3239.77,3266.26,172650000,3266.26
+1992-08-31,3267.61,3287.04,3244.90,3257.35,160230000,3257.35
+1992-08-28,3254.64,3280.56,3237.88,3267.61,152230000,3267.61
+1992-08-27,3246.81,3285.69,3237.06,3254.64,178490000,3254.64
+1992-08-26,3232.22,3261.38,3217.07,3246.81,171840000,3246.81
+1992-08-25,3228.17,3253.00,3200.86,3232.22,201630000,3232.22
+1992-08-24,3254.09,3258.41,3207.08,3228.17,165130000,3228.17
+1992-08-21,3304.89,3330.27,3243.55,3254.09,202640000,3254.09
+1992-08-20,3307.06,3326.22,3285.69,3304.89,183390000,3304.89
+1992-08-19,3329.48,3347.56,3302.44,3307.06,186710000,3307.06
+1992-08-18,3324.89,3343.80,3309.22,3329.48,169880000,3329.48
+1992-08-17,3328.94,3350.28,3310.03,3324.89,152750000,3324.89
+1992-08-14,3313.27,3342.16,3300.82,3328.94,166180000,3328.94
+1992-08-13,3320.83,3347.29,3294.07,3313.27,185700000,3313.27
+1992-08-12,3331.10,3349.72,3304.88,3320.83,176440000,3320.83
+1992-08-11,3337.58,3356.48,3304.34,3331.10,173810000,3331.10
+1992-08-10,3332.18,3350.26,3305.14,3337.58,142440000,3337.58
+1992-08-07,3340.56,3378.38,3318.40,3332.18,188340000,3332.18
+1992-08-06,3365.14,3374.33,3327.05,3340.56,181390000,3340.56
+1992-08-05,3384.32,3391.35,3347.58,3365.14,172410000,3365.14
+1992-08-04,3395.40,3405.12,3367.03,3384.32,166740000,3384.32
+1992-08-03,3393.78,3413.23,3365.14,3395.40,164360000,3395.40
+1992-07-31,3391.89,3414.85,3371.89,3393.78,172920000,3393.78
+1992-07-30,3379.19,3409.16,3351.07,3391.89,193280000,3391.89
+1992-07-29,3345.13,3399.70,3345.13,3379.19,275760000,3379.19
+1992-07-28,3282.20,3345.67,3277.59,3334.07,217950000,3334.07
+1992-07-27,3285.71,3311.38,3265.99,3282.20,164680000,3282.20
+1992-07-24,3290.04,3305.68,3261.94,3285.71,163870000,3285.71
+1992-07-23,3277.61,3308.39,3255.43,3290.04,175460000,3290.04
+1992-07-22,3308.41,3310.28,3262.19,3277.61,190130000,3277.61
+1992-07-21,3303.00,3335.94,3292.45,3308.41,173800000,3308.41
+1992-07-20,3318.38,3318.38,3271.11,3303.00,165730000,3303.00
+1992-07-17,3359.74,3359.74,3308.14,3331.64,187520000,3331.64
+1992-07-16,3345.42,3375.66,3318.65,3361.63,206040000,3361.63
+1992-07-15,3358.39,3381.87,3319.73,3345.42,206550000,3345.42
+1992-07-14,3337.31,3371.88,3315.95,3358.39,195310000,3358.39
+1992-07-13,3330.56,3357.55,3315.41,3337.31,148820000,3337.31
+1992-07-10,3324.08,3355.93,3304.88,3330.56,164750000,3330.56
+1992-07-09,3293.28,3345.40,3292.45,3324.08,207970000,3324.08
+1992-07-08,3295.17,3322.98,3258.70,3293.28,200020000,3293.28
+1992-07-07,3339.21,3360.80,3285.69,3295.17,218740000,3295.17
+1992-07-06,3330.29,3367.57,3295.96,3339.21,186410000,3339.21
+1992-07-02,3354.10,3385.43,3303.30,3330.29,220130000,3330.29
+1992-07-01,3318.52,3366.43,3305.45,3354.10,214240000,3354.10
+1992-06-30,3319.86,3347.71,3295.01,3318.52,195520000,3318.52
+1992-06-29,3282.41,3330.32,3278.16,3319.86,176710000,3319.86
+1992-06-26,3284.01,3303.04,3254.89,3282.41,154430000,3282.41
+1992-06-25,3290.70,3319.62,3261.31,3284.01,182310000,3284.01
+1992-06-24,3285.62,3317.75,3262.11,3290.70,193850000,3290.70
+1992-06-23,3280.80,3312.13,3263.45,3285.62,189170000,3285.62
+1992-06-22,3285.35,3298.22,3242.32,3280.80,169340000,3280.80
+1992-06-19,3274.12,3313.20,3264.79,3285.35,233440000,3285.35
+1992-06-18,3287.76,3313.74,3245.53,3274.12,215080000,3274.12
+1992-06-17,3329.49,3347.98,3271.21,3287.76,227650000,3287.76
+1992-06-16,3354.90,3379.01,3321.76,3329.49,178850000,3329.49
+1992-06-15,3354.36,3371.79,3327.11,3354.90,159100000,3354.90
+1992-06-12,3351.51,3397.68,3339.62,3354.36,181830000,3354.36
+1992-06-11,3343.22,3374.61,3301.51,3351.51,192940000,3351.51
+1992-06-10,3369.92,3385.76,3328.99,3343.22,206380000,3343.22
+1992-06-09,3404.14,3412.98,3350.25,3369.92,190780000,3369.92
+1992-06-08,3398.69,3422.83,3370.21,3404.14,161130000,3404.14
+1992-06-05,3399.73,3424.64,3356.98,3398.69,199050000,3398.69
+1992-06-04,3406.99,3428.02,3376.43,3399.73,204360000,3399.73
+1992-06-03,3396.10,3431.13,3378.76,3406.99,215730000,3406.99
+1992-06-02,3413.21,3435.27,3380.84,3396.10,200660000,3396.10
+1992-06-01,3396.88,3424.39,3365.02,3413.21,180780000,3413.21
+1992-05-29,3398.43,3433.98,3384.20,3396.88,202730000,3396.88
+1992-05-28,3370.44,3408.31,3354.91,3398.43,195230000,3398.43
+1992-05-27,3364.21,3396.65,3337.29,3370.44,179980000,3370.44
+1992-05-26,3386.77,3410.91,3338.84,3364.21,196950000,3364.21
+1992-05-22,3378.71,3408.49,3364.08,3386.77,146640000,3386.77
+1992-05-21,3393.84,3402.88,3354.80,3378.71,182190000,3378.71
+1992-05-20,3397.99,3421.42,3376.04,3393.84,198170000,3393.84
+1992-05-19,3376.03,3413.37,3350.41,3397.99,187030000,3397.99
+1992-05-18,3353.09,3398.24,3349.93,3376.03,149830000,3376.03
+1992-05-15,3368.88,3380.30,3330.43,3353.09,192040000,3353.09
+1992-05-14,3391.98,3397.46,3347.59,3368.88,187700000,3368.88
+1992-05-13,3385.12,3414.17,3362.93,3391.98,171610000,3391.98
+1992-05-12,3397.58,3414.81,3361.51,3385.12,192810000,3385.12
+1992-05-11,3369.41,3410.11,3363.82,3397.58,155730000,3397.58
+1992-05-08,3363.37,3388.41,3344.59,3369.41,168670000,3369.41
+1992-05-07,3369.41,3390.65,3343.25,3363.37,168910000,3363.37
+1992-05-06,3359.35,3398.70,3346.60,3369.41,199070000,3369.41
+1992-05-05,3378.13,3393.78,3346.15,3359.35,198860000,3359.35
+1992-05-04,3340.79,3394.68,3340.79,3378.13,174520000,3378.13
+1992-05-01,3359.12,3375.67,3316.64,3336.09,177360000,3336.09
+1992-04-30,3333.18,3377.01,3314.40,3359.12,223160000,3359.12
+1992-04-29,3307.92,3353.75,3295.39,3333.18,199740000,3333.18
+1992-04-28,3304.56,3329.83,3273.03,3307.92,186740000,3307.92
+1992-04-27,3324.46,3340.79,3284.66,3304.56,172820000,3304.56
+1992-04-24,3348.61,3381.48,3305.23,3324.46,198740000,3324.46
+1992-04-23,3338.77,3376.34,3298.52,3348.61,235740000,3348.61
+1992-04-22,3343.25,3366.72,3309.48,3338.77,218790000,3338.77
+1992-04-21,3336.31,3366.50,3305.68,3343.25,214400000,3343.25
+1992-04-20,3366.50,3375.67,3300.98,3336.31,191910000,3336.31
+1992-04-16,3353.76,3387.97,3321.33,3366.50,232480000,3366.50
+1992-04-15,3306.13,3370.08,3296.51,3353.76,228400000,3353.76
+1992-04-14,3269.90,3336.54,3259.39,3306.13,232040000,3306.13
+1992-04-13,3255.37,3293.60,3230.77,3269.90,143100000,3269.90
+1992-04-10,3227.64,3280.86,3227.64,3255.37,199450000,3255.37
+1992-04-09,3181.35,3245.08,3171.06,3224.96,231330000,3224.96
+1992-04-08,3213.55,3221.38,3141.77,3181.35,249210000,3181.35
+1992-04-07,3275.49,3291.81,3207.51,3213.55,205110000,3213.55
+1992-04-06,3249.11,3295.84,3238.37,3275.49,179330000,3275.49
+1992-04-03,3234.12,3271.91,3201.92,3249.11,188530000,3249.11
+1992-04-02,3249.33,3277.06,3209.08,3234.12,185110000,3234.12
+1992-04-01,3235.47,3262.52,3202.37,3249.33,186260000,3249.33
+1992-03-31,3235.24,3272.81,3216.46,3235.47,182200000,3235.47
+1992-03-30,3231.44,3260.06,3215.79,3235.24,133980000,3235.24
+1992-03-27,3267.67,3272.58,3218.92,3231.44,166140000,3231.44
+1992-03-26,3259.39,3288.91,3245.08,3267.67,176690000,3267.67
+1992-03-25,3260.96,3290.47,3238.15,3259.39,192080000,3259.39
+1992-03-24,3272.14,3296.96,3242.84,3260.96,191580000,3260.96
+1992-03-23,3276.39,3288.68,3249.33,3272.14,156620000,3272.14
+1992-03-20,3261.40,3292.48,3240.83,3276.39,246170000,3276.39
+1992-03-19,3254.25,3286.22,3240.38,3261.40,197240000,3261.40
+1992-03-18,3256.04,3281.98,3230.10,3254.25,190800000,3254.25
+1992-03-17,3236.36,3272.58,3222.27,3256.04,187240000,3256.04
+1992-03-16,3235.91,3249.11,3201.25,3236.36,151280000,3236.36
+1992-03-13,3208.63,3252.23,3203.71,3235.91,176000000,3235.91
+1992-03-12,3208.63,3232.33,3176.21,3208.63,180240000,3208.63
+1992-03-11,3230.99,3242.17,3189.85,3208.63,185320000,3208.63
+1992-03-10,3215.12,3259.17,3207.29,3230.99,194530000,3230.99
+1992-03-09,3221.60,3242.62,3188.95,3215.12,160620000,3215.12
+1992-03-06,3241.50,3262.97,3204.61,3221.60,185040000,3221.60
+1992-03-05,3268.56,3283.54,3226.74,3241.50,205730000,3241.50
+1992-03-04,3290.25,3318.42,3256.04,3268.56,206770000,3268.56
+1992-03-03,3275.27,3313.28,3258.50,3290.25,200860000,3290.25
+1992-03-02,3267.67,3298.97,3242.39,3275.27,180380000,3275.27
+1992-02-28,3269.45,3304.11,3247.09,3267.67,202130000,3267.67
+1992-02-27,3283.32,3300.54,3251.79,3269.45,215050000,3269.45
+1992-02-26,3257.83,3305.01,3246.20,3283.32,240690000,3283.32
+1992-02-25,3282.42,3293.60,3226.74,3257.83,208400000,3257.83
+1992-02-24,3280.19,3305.01,3253.58,3282.42,177470000,3282.42
+1992-02-21,3280.64,3307.47,3242.17,3280.19,258700000,3280.19
+1992-02-20,3230.32,3304.34,3224.28,3280.64,270550000,3280.64
+1992-02-19,3224.73,3259.17,3199.02,3230.32,232900000,3230.32
+1992-02-18,3245.97,3280.19,3195.66,3224.73,234270000,3224.73
+1992-02-14,3246.65,3271.91,3208.63,3245.97,214840000,3245.97
+1992-02-13,3276.83,3296.73,3226.07,3246.65,229360000,3246.65
+1992-02-12,3251.57,3291.37,3233.68,3276.83,230230000,3276.83
+1992-02-11,3245.08,3277.28,3222.49,3251.57,200110000,3251.57
+1992-02-10,3225.40,3269.00,3208.85,3245.08,184390000,3245.08
+1992-02-07,3255.59,3283.09,3199.91,3225.40,230950000,3225.40
+1992-02-06,3257.60,3285.55,3224.95,3255.59,238210000,3255.59
+1992-02-05,3272.81,3299.87,3233.68,3257.60,261960000,3257.60
+1992-02-04,3234.12,3283.09,3208.63,3272.81,231530000,3272.81
+1992-02-03,3223.39,3261.40,3193.42,3234.12,182150000,3234.12
+1992-01-31,3244.86,3274.37,3207.96,3223.39,197060000,3223.39
+1992-01-30,3224.96,3269.68,3200.58,3244.86,194670000,3244.86
+1992-01-29,3272.14,3313.51,3204.16,3224.96,248900000,3224.96
+1992-01-28,3240.61,3298.30,3230.99,3272.14,217070000,3272.14
+1992-01-27,3232.78,3267.44,3216.23,3240.61,190430000,3240.61
+1992-01-24,3226.74,3264.31,3203.71,3232.78,213600000,3232.78
+1992-01-23,3255.81,3279.52,3205.95,3226.74,229680000,3226.74
+1992-01-22,3223.39,3272.80,3190.96,3255.81,225030000,3255.81
+1992-01-21,3254.03,3275.49,3194.09,3223.39,218650000,3223.39
+1992-01-20,3264.98,3283.32,3230.99,3254.03,180870000,3254.03
+1992-01-17,3249.55,3297.63,3224.28,3264.98,284560000,3264.98
+1992-01-16,3258.50,3289.13,3200.80,3249.55,333750000,3249.55
+1992-01-15,3246.20,3299.19,3207.73,3258.50,312400000,3258.50
+1992-01-14,3185.60,3255.81,3167.93,3246.20,264540000,3246.20
+1992-01-13,3199.46,3215.56,3161.67,3185.60,200270000,3185.60
+1992-01-10,3209.53,3235.91,3165.92,3199.46,236060000,3199.46
+1992-01-09,3203.94,3246.64,3173.75,3209.53,291780000,3209.53
+1992-01-08,3204.83,3245.53,3164.58,3203.94,289690000,3203.94
+1992-01-07,3200.13,3224.73,3165.25,3204.83,251280000,3204.83
+1992-01-06,3201.48,3230.32,3166.37,3200.13,241980000,3200.13
+1992-01-03,3172.41,3221.38,3156.30,3201.48,219170000,3201.48
+1992-01-02,3168.83,3184.70,3119.86,3172.41,203610000,3172.41
+1991-12-31,3163.91,3204.61,3121.20,3168.83,247670000,3168.83
+1991-12-30,3101.52,3174.64,3090.79,3163.91,245450000,3163.91
+1991-12-27,3082.96,3121.65,3063.73,3101.52,157940000,3101.52
+1991-12-26,3050.98,3101.97,3036.23,3082.96,149200000,3082.96
+1991-12-24,3022.58,3087.88,3015.65,3050.98,162300000,3050.98
+1991-12-23,2934.48,3037.57,2919.05,3022.58,228730000,3022.58
+1991-12-20,2914.36,2965.79,2907.65,2934.48,313810000,2934.48
+1991-12-19,2908.09,2927.10,2881.48,2914.36,199830000,2914.36
+1991-12-18,2902.28,2921.29,2870.30,2908.09,192350000,2908.09
+1991-12-17,2919.05,2936.27,2886.40,2902.28,191280000,2902.28
+1991-12-16,2914.36,2946.33,2900.49,2919.05,173010000,2919.05
+1991-12-13,2895.13,2936.72,2893.34,2914.36,195790000,2914.36
+1991-12-12,2865.38,2911.67,2861.14,2895.13,192930000,2895.13
+1991-12-11,2863.82,2889.53,2832.29,2865.38,207410000,2865.38
+1991-12-10,2871.65,2891.10,2841.23,2863.82,191800000,2863.82
+1991-12-09,2886.40,2913.46,2856.22,2871.65,174700000,2871.65
+1991-12-06,2889.09,2924.87,2854.65,2886.40,198170000,2886.40
+1991-12-05,2911.67,2923.75,2874.77,2889.09,165660000,2889.09
+1991-12-04,2929.56,2945.66,2892.22,2911.67,186380000,2911.67
+1991-12-03,2935.38,2958.18,2904.74,2929.56,187160000,2929.56
+1991-12-02,2894.68,2941.64,2855.32,2935.38,188050000,2935.38
+1991-11-29,2900.04,2913.46,2877.46,2894.68,77420000,2894.68
+1991-11-27,2916.14,2929.11,2883.72,2900.04,159790000,2900.04
+1991-11-26,2902.06,2942.31,2861.14,2916.14,213650000,2916.14
+1991-11-25,2902.73,2921.96,2870.30,2902.06,173520000,2902.06
+1991-11-22,2932.69,2940.30,2880.81,2902.73,188110000,2902.73
+1991-11-21,2930.01,2953.94,2902.28,2932.69,195060000,2932.69
+1991-11-20,2931.57,2973.61,2912.12,2930.01,192670000,2930.01
+1991-11-19,2960.20,2960.20,2883.72,2931.57,243880000,2931.57
+1991-11-18,2943.20,2990.61,2923.30,2972.72,238170000,2972.72
+1991-11-15,3063.51,3069.54,2936.05,2943.20,236000000,2943.20
+1991-11-14,3065.30,3084.97,3037.34,3063.51,200030000,3063.51
+1991-11-13,3054.11,3075.58,3023.70,3065.30,184080000,3065.30
+1991-11-12,3042.26,3078.71,3028.62,3054.11,198600000,3054.11
+1991-11-11,3045.62,3057.69,3025.27,3042.26,128910000,3042.26
+1991-11-08,3054.11,3080.95,3034.66,3045.62,183260000,3045.62
+1991-11-07,3038.46,3066.19,3020.35,3054.11,205440000,3054.11
+1991-11-06,3031.31,3056.57,3010.51,3038.46,167370000,3038.46
+1991-11-05,3045.62,3062.84,3015.88,3031.31,171950000,3031.31
+1991-11-04,3056.35,3061.27,3019.01,3045.62,155530000,3045.62
+1991-11-01,3069.10,3091.91,3031.75,3056.35,205750000,3056.35
+1991-10-31,3071.78,3091.01,3045.62,3069.10,179490000,3069.10
+1991-10-30,3061.94,3090.12,3038.24,3071.78,195340000,3071.78
+1991-10-29,3045.62,3077.82,3020.13,3061.94,192700000,3061.94
+1991-10-28,3004.92,3055.23,3001.57,3045.62,160220000,3045.62
+1991-10-25,3016.32,3034.44,2983.01,3004.92,167260000,3004.92
+1991-10-24,3040.92,3047.63,2991.73,3016.32,178990000,3016.32
+1991-10-23,3039.80,3065.52,3015.21,3040.92,185340000,3040.92
+1991-10-22,3060.38,3084.53,3020.57,3039.80,194120000,3039.80
+1991-10-21,3077.15,3085.20,3042.49,3060.38,153770000,3060.38
+1991-10-18,3053.00,3089.45,3045.62,3077.15,204030000,3077.15
+1991-10-17,3061.72,3077.15,3027.06,3053.00,202780000,3053.00
+1991-10-16,3041.37,3082.29,3016.10,3061.72,225290000,3061.72
+1991-10-15,3019.45,3057.69,3000.22,3041.37,213440000,3041.37
+1991-10-14,2983.68,3026.39,2975.85,3019.45,130110000,3019.45
+1991-10-11,2976.52,3000.89,2957.51,2983.68,146560000,2983.68
+1991-10-10,2946.33,2985.47,2930.23,2976.52,164120000,2976.52
+1991-10-09,2963.77,2984.79,2925.54,2946.33,186590000,2946.33
+1991-10-08,2942.75,2983.68,2927.77,2963.77,170000000,2963.77
+1991-10-07,2961.76,2973.17,2926.21,2942.75,148430000,2942.75
+1991-10-04,2984.79,3007.16,2956.17,2961.76,163930000,2961.76
+1991-10-03,3012.52,3021.24,2972.50,2984.79,174230000,2984.79
+1991-10-02,3018.34,3040.25,2992.40,3012.52,166290000,3012.52
+1991-10-01,3016.77,3043.60,3002.46,3018.34,163520000,3018.34
+1991-09-30,3006.04,3032.87,2982.78,3016.77,146740000,3016.77
+1991-09-27,3017.22,3040.70,2989.49,3006.04,160430000,3006.04
+1991-09-26,3021.02,3040.70,2996.87,3017.22,160190000,3017.22
+1991-09-25,3029.07,3048.52,3004.92,3021.02,153800000,3021.02
+1991-09-24,3010.51,3043.38,2995.97,3029.07,170300000,3029.07
+1991-09-23,3019.23,3037.79,2997.76,3010.51,145530000,3010.51
+1991-09-20,3024.37,3045.39,3002.46,3019.23,241340000,3019.23
+1991-09-19,3017.89,3050.76,3002.91,3024.37,210770000,3024.37
+1991-09-18,3013.19,3025.49,2993.52,3017.89,141280000,3017.89
+1991-09-17,3015.21,3036.00,2992.62,3013.19,168310000,3013.19
+1991-09-16,2985.69,3023.03,2973.61,3015.21,171960000,3015.21
+1991-09-13,3007.83,3021.47,2963.10,2985.69,167800000,2985.69
+1991-09-12,2987.03,3023.26,2977.64,3007.83,160310000,3007.83
+1991-09-11,2982.56,3004.70,2964.67,2987.03,147910000,2987.03
+1991-09-10,3007.16,3012.97,2967.80,2982.56,146730000,2982.56
+1991-09-09,3011.63,3025.49,2987.70,3007.16,109250000,3007.16
+1991-09-06,3008.50,3033.32,2987.48,3011.63,166410000,3011.63
+1991-09-05,3008.50,3031.98,2989.71,3008.50,162250000,3008.50
+1991-09-04,3017.67,3034.66,2990.83,3008.50,156770000,3008.50
+1991-09-03,3043.60,3066.64,3013.64,3017.67,153550000,3017.67
+1991-08-30,3049.64,3059.26,3024.82,3043.60,125830000,3043.60
+1991-08-29,3055.23,3068.65,3030.86,3049.64,150180000,3049.64
+1991-08-28,3026.16,3064.85,3018.11,3055.23,169590000,3055.23
+1991-08-27,3039.36,3047.41,3007.83,3026.16,143920000,3026.16
+1991-08-26,3040.25,3057.02,3020.80,3039.36,128400000,3039.36
+1991-08-23,3007.38,3065.97,2999.11,3040.25,187010000,3040.25
+1991-08-22,3001.79,3029.96,2989.94,3007.38,172900000,3007.38
+1991-08-21,2941.64,3009.17,2941.64,3001.79,231720000,3001.79
+1991-08-20,2898.03,2937.39,2886.85,2913.69,184090000,2913.69
+1991-08-19,2924.42,2924.42,2836.31,2898.03,229590000,2898.03
+1991-08-16,2998.43,3013.64,2945.89,2968.02,188360000,2968.02
+1991-08-15,3005.37,3029.96,2985.24,2998.43,174310000,2998.43
+1991-08-14,3008.72,3036.67,2988.60,3005.37,195890000,3005.37
+1991-08-13,3001.34,3041.14,2989.27,3008.72,211890000,3008.72
+1991-08-12,2996.20,3013.42,2974.06,3001.34,145280000,3001.34
+1991-08-09,3013.86,3036.45,2986.81,2996.20,143610000,2996.20
+1991-08-08,3026.61,3045.17,2995.30,3013.86,163620000,3013.86
+1991-08-07,3027.28,3050.54,3008.50,3026.61,170820000,3026.61
+1991-08-06,2989.04,3034.88,2970.48,3027.28,174340000,3027.28
+1991-08-05,3006.26,3019.68,2978.76,2989.04,125790000,2989.04
+1991-08-02,3017.67,3042.26,2994.41,3006.26,162050000,3006.26
+1991-08-01,3024.82,3037.12,2997.76,3017.67,169920000,3017.67
+1991-07-31,3016.32,3039.58,2999.11,3024.82,166650000,3024.82
+1991-07-30,2985.24,3029.07,2983.68,3016.32,168950000,3016.32
+1991-07-29,2972.50,2996.20,2957.07,2985.24,135240000,2985.24
+1991-07-26,2980.10,2994.86,2953.26,2972.50,127690000,2972.50
+1991-07-25,2966.23,2999.11,2947.23,2980.10,145510000,2980.10
+1991-07-24,2983.23,3003.13,2950.80,2966.23,158530000,2966.23
+1991-07-23,3012.97,3038.24,2972.94,2983.23,160010000,2983.23
+1991-07-22,3016.32,3034.44,2990.83,3012.97,148880000,3012.97
+1991-07-19,3016.32,3036.23,2989.49,3016.32,187290000,3016.32
+1991-07-18,2978.76,3026.61,2970.93,3016.32,199470000,3016.32
+1991-07-17,2983.90,3011.18,2961.54,2978.76,194150000,2978.76
+1991-07-16,2990.61,3012.52,2962.88,2983.90,182740000,2983.90
+1991-07-15,2980.77,3007.38,2965.79,2990.61,159340000,2990.61
+1991-07-12,2959.75,3003.35,2942.98,2980.77,173060000,2980.77
+1991-07-11,2944.77,2975.63,2933.36,2959.75,157680000,2959.75
+1991-07-10,2947.23,2990.83,2927.77,2944.77,178170000,2944.77
+1991-07-09,2961.99,2980.10,2934.03,2947.23,151430000,2947.23
+1991-07-08,2932.47,2966.23,2897.36,2961.99,138210000,2961.99
+1991-07-05,2934.70,2953.26,2917.71,2932.47,69790000,2932.47
+1991-07-03,2957.07,2957.07,2915.03,2934.70,139290000,2934.70
+1991-07-02,2958.41,2987.03,2939.62,2972.72,157140000,2972.72
+1991-07-01,2911.67,2971.15,2911.67,2958.41,166880000,2958.41
+1991-06-28,2934.03,2934.03,2879.25,2906.75,162670000,2906.75
+1991-06-27,2913.01,2946.56,2909.21,2934.93,155820000,2934.93
+1991-06-26,2910.11,2934.03,2879.25,2913.01,186830000,2913.01
+1991-06-25,2913.01,2938.51,2887.97,2910.11,155450000,2910.11
+1991-06-24,2957.29,2957.29,2904.29,2913.01,137700000,2913.01
+1991-06-21,2953.94,2977.64,2937.84,2965.56,193110000,2965.56
+1991-06-20,2955.50,2969.81,2927.33,2953.94,163780000,2953.94
+1991-06-19,2978.31,2978.31,2933.59,2955.50,156070000,2955.50
+1991-06-18,2993.96,3022.14,2970.48,2986.81,154900000,2986.81
+1991-06-17,3000.45,3021.69,2977.86,2993.96,133910000,2993.96
+1991-06-14,2967.58,3014.98,2967.58,3000.45,167530000,3000.45
+1991-06-13,2961.99,2982.11,2942.53,2965.12,144870000,2965.12
+1991-06-12,2985.91,2987.25,2928.89,2961.99,165720000,2961.99
+1991-06-11,2975.40,3012.08,2963.10,2985.91,161240000,2985.91
+1991-06-10,2976.74,2992.84,2958.41,2975.40,127420000,2975.40
+1991-06-07,2994.86,3005.14,2954.61,2976.74,167830000,2976.74
+1991-06-06,3005.37,3027.06,2975.63,2994.86,168050000,2994.86
+1991-06-05,3027.95,3042.93,2989.49,3005.37,186300000,3005.37
+1991-06-04,3035.33,3042.04,2992.62,3027.95,180170000,3027.95
+1991-06-03,3027.50,3057.47,3000.67,3035.33,173710000,3035.33
+1991-05-31,3000.45,3044.50,2972.94,3027.50,231680000,3027.50
+1991-05-30,2969.59,3022.81,2950.58,3000.45,234090000,3000.45
+1991-05-29,2958.86,2987.92,2940.74,2969.59,188150000,2969.59
+1991-05-28,2913.91,2965.12,2903.85,2958.86,161950000,2958.86
+1991-05-24,2900.04,2931.13,2893.78,2913.91,124500000,2913.91
+1991-05-23,2910.33,2935.38,2881.04,2900.04,173080000,2900.04
+1991-05-22,2906.08,2930.01,2881.93,2910.33,159310000,2910.33
+1991-05-21,2892.22,2931.80,2875.00,2906.08,186860000,2906.08
+1991-05-20,2886.63,2910.78,2872.76,2892.22,109510000,2892.22
+1991-05-17,2894.01,2908.54,2860.02,2886.63,174210000,2886.63
+1991-05-16,2865.38,2905.64,2863.82,2894.01,154460000,2894.01
+1991-05-15,2886.85,2901.83,2834.53,2865.38,193110000,2865.38
+1991-05-14,2922.85,2922.85,2870.08,2886.85,207910000,2886.85
+1991-05-13,2920.17,2945.44,2896.24,2924.42,129620000,2924.42
+1991-05-10,2971.15,2986.14,2906.08,2920.17,172730000,2920.17
+1991-05-09,2930.90,2983.68,2926.88,2971.15,180210000,2971.15
+1991-05-08,2917.49,2945.21,2898.70,2930.90,157240000,2930.90
+1991-05-07,2941.64,2962.66,2906.53,2917.49,153290000,2917.49
+1991-05-06,2938.86,2956.84,2911.45,2941.64,128360000,2941.64
+1991-05-03,2938.61,2959.90,2906.93,2938.86,158160000,2938.86
+1991-05-02,2930.20,2966.34,2917.33,2938.61,187090000,2938.61
+1991-05-01,2887.87,2945.30,2882.43,2930.20,181900000,2930.20
+1991-04-30,2876.98,2929.21,2859.41,2887.87,204930000,2887.87
+1991-04-29,2912.38,2941.09,2869.55,2876.98,149860000,2876.98
+1991-04-26,2921.04,2934.90,2888.61,2912.38,154550000,2912.38
+1991-04-25,2949.51,2958.42,2905.20,2921.04,166940000,2921.04
+1991-04-24,2930.45,2965.10,2913.37,2949.51,166800000,2949.51
+1991-04-23,2927.72,2957.92,2905.94,2930.45,167840000,2930.45
+1991-04-22,2962.13,2962.13,2911.63,2927.72,164410000,2927.72
+1991-04-19,2999.26,3000.25,2943.56,2965.59,195510000,2965.59
+1991-04-18,3004.46,3027.72,2976.24,2999.26,217410000,2999.26
+1991-04-17,2986.88,3030.45,2963.12,3004.46,246930000,3004.46
+1991-04-16,2933.17,2995.79,2912.13,2986.88,214480000,2986.88
+1991-04-15,2920.79,2957.18,2896.29,2933.17,161800000,2933.17
+1991-04-12,2905.45,2946.53,2884.16,2920.79,198610000,2920.79
+1991-04-11,2877.72,2937.62,2877.72,2905.45,196570000,2905.45
+1991-04-10,2873.02,2902.48,2848.51,2874.50,167940000,2874.50
+1991-04-09,2918.56,2932.42,2863.36,2873.02,169940000,2873.02
+1991-04-08,2896.78,2929.21,2877.72,2918.56,138580000,2918.56
+1991-04-05,2924.50,2949.26,2876.98,2896.78,187410000,2896.78
+1991-04-04,2926.73,2959.41,2899.75,2924.50,198120000,2924.50
+1991-04-03,2945.05,2970.54,2915.84,2926.73,213720000,2926.73
+1991-04-02,2881.19,2951.98,2878.22,2945.05,189530000,2945.05
+1991-04-01,2913.86,2919.31,2868.32,2881.19,144010000,2881.19
+1991-03-28,2917.57,2942.08,2893.32,2913.86,150750000,2913.86
+1991-03-27,2914.85,2956.93,2886.14,2917.57,201830000,2917.57
+1991-03-26,2865.84,2924.01,2848.02,2914.85,198720000,2914.85
+1991-03-25,2858.91,2897.52,2837.87,2865.84,153920000,2865.84
+1991-03-22,2855.45,2879.95,2829.21,2858.91,160890000,2858.91
+1991-03-21,2872.03,2907.92,2841.58,2855.45,199830000,2855.45
+1991-03-20,2867.82,2897.03,2840.84,2872.03,196810000,2872.03
+1991-03-19,2908.17,2908.17,2840.84,2867.82,177070000,2867.82
+1991-03-18,2948.27,2960.64,2899.75,2929.95,163100000,2929.95
+1991-03-15,2952.23,2966.58,2918.81,2948.27,237660000,2948.27
+1991-03-14,2955.20,3000.00,2925.74,2952.23,231000000,2952.23
+1991-03-13,2922.52,2967.82,2910.89,2955.20,176000000,2955.20
+1991-03-12,2939.36,2962.13,2906.68,2922.52,176440000,2922.52
+1991-03-11,2955.20,2975.50,2923.27,2939.36,161600000,2939.36
+1991-03-08,2963.37,3003.47,2934.90,2955.20,206850000,2955.20
+1991-03-07,2973.27,2998.51,2948.51,2963.37,197060000,2963.37
+1991-03-06,2972.52,3017.82,2957.67,2973.27,262290000,2973.27
+1991-03-05,2914.11,2995.54,2913.86,2972.52,253700000,2972.52
+1991-03-04,2909.90,2950.74,2897.03,2914.11,199830000,2914.11
+1991-03-01,2882.18,2923.51,2846.78,2909.90,221510000,2909.90
+1991-02-28,2889.11,2923.51,2858.42,2882.18,223010000,2882.18
+1991-02-27,2864.60,2915.35,2839.85,2889.11,211410000,2889.11
+1991-02-26,2887.87,2895.30,2840.10,2864.60,164170000,2864.60
+1991-02-25,2889.36,2935.89,2865.35,2887.87,193820000,2887.87
+1991-02-22,2891.83,2945.79,2860.40,2889.36,218760000,2889.36
+1991-02-21,2899.01,2927.72,2871.29,2891.83,180770000,2891.83
+1991-02-20,2923.76,2923.76,2879.46,2899.01,185680000,2899.01
+1991-02-19,2934.65,2955.20,2895.30,2932.18,189900000,2932.18
+1991-02-15,2877.23,2947.28,2868.07,2934.65,222370000,2934.65
+1991-02-14,2909.16,2942.08,2852.48,2877.23,230750000,2877.23
+1991-02-13,2874.75,2918.32,2848.51,2909.16,209960000,2909.16
+1991-02-12,2902.23,2923.02,2848.27,2874.75,256160000,2874.75
+1991-02-11,2830.69,2910.64,2822.52,2902.23,265930000,2902.23
+1991-02-08,2810.64,2847.28,2787.13,2830.69,187830000,2830.69
+1991-02-07,2830.94,2875.50,2790.59,2810.64,292190000,2810.64
+1991-02-06,2788.37,2844.80,2760.15,2830.94,276940000,2830.94
+1991-02-05,2772.28,2805.20,2742.82,2788.37,290570000,2788.37
+1991-02-04,2730.69,2791.83,2714.85,2772.28,250750000,2772.28
+1991-02-01,2736.39,2764.60,2694.31,2730.69,246670000,2730.69
+1991-01-31,2713.12,2747.28,2691.58,2736.39,204240000,2736.39
+1991-01-30,2662.62,2725.99,2654.70,2713.12,226790000,2713.12
+1991-01-29,2654.46,2677.23,2627.23,2662.62,155740000,2662.62
+1991-01-28,2659.41,2688.61,2635.15,2654.46,141270000,2654.46
+1991-01-25,2643.07,2679.46,2623.27,2659.41,194350000,2659.41
+1991-01-24,2619.06,2667.33,2615.10,2643.07,223150000,2643.07
+1991-01-23,2603.22,2645.54,2584.65,2619.06,169440000,2619.06
+1991-01-22,2629.21,2645.05,2586.39,2603.22,175590000,2603.22
+1991-01-21,2646.29,2646.29,2602.97,2629.21,136290000,2629.21
+1991-01-18,2623.51,2663.37,2600.25,2646.78,226770000,2646.78
+1991-01-17,2571.78,2635.40,2571.78,2623.51,318890000,2623.51
+1991-01-16,2490.59,2525.25,2475.99,2508.91,134560000,2508.91
+1991-01-15,2483.91,2504.46,2470.05,2490.59,109980000,2490.59
+1991-01-14,2500.99,2500.99,2447.03,2483.91,120830000,2483.91
+1991-01-11,2498.76,2516.09,2472.77,2501.49,123050000,2501.49
+1991-01-10,2470.30,2512.13,2467.08,2498.76,124510000,2498.76
+1991-01-09,2509.41,2562.38,2456.19,2470.30,191100000,2470.30
+1991-01-08,2522.77,2544.06,2493.07,2509.41,143390000,2509.41
+1991-01-07,2563.37,2563.37,2514.11,2522.77,130610000,2522.77
+1991-01-04,2573.51,2601.98,2540.84,2566.09,140820000,2566.09
+1991-01-03,2610.64,2622.28,2567.57,2573.51,141450000,2573.51
+1991-01-02,2633.66,2651.73,2600.99,2610.64,126280000,2610.64
+1990-12-31,2629.21,2641.09,2611.14,2633.66,114130000,2633.66
+1990-12-28,2625.50,2639.11,2607.92,2629.21,111030000,2629.21
+1990-12-27,2637.13,2652.23,2616.58,2625.50,102900000,2625.50
+1990-12-26,2621.29,2653.96,2613.37,2637.13,78730000,2637.13
+1990-12-24,2633.66,2638.12,2609.65,2621.29,57200000,2621.29
+1990-12-21,2629.46,2662.62,2619.55,2633.66,233400000,2633.66
+1990-12-20,2626.73,2645.81,2591.58,2629.46,174700000,2629.46
+1990-12-19,2626.73,2648.51,2602.48,2626.73,180380000,2626.73
+1990-12-18,2593.32,2639.36,2583.17,2626.73,176460000,2626.73
+1990-12-17,2593.81,2600.74,2563.61,2593.32,118560000,2593.32
+1990-12-14,2614.36,2617.82,2572.03,2593.81,150880000,2593.81
+1990-12-13,2622.28,2640.59,2598.76,2614.36,162110000,2614.36
+1990-12-12,2586.14,2630.69,2578.22,2622.28,182270000,2622.28
+1990-12-11,2596.78,2606.93,2565.59,2586.14,145330000,2586.14
+1990-12-10,2590.10,2609.40,2566.58,2596.78,138650000,2596.78
+1990-12-07,2602.48,2618.07,2571.78,2590.10,164950000,2590.10
+1990-12-06,2610.40,2656.44,2589.36,2602.48,256380000,2602.48
+1990-12-05,2579.70,2615.84,2558.42,2610.40,205820000,2610.40
+1990-12-04,2565.59,2592.08,2534.65,2579.70,185820000,2579.70
+1990-12-03,2559.65,2589.60,2543.56,2565.59,177010000,2565.59
+1990-11-30,2518.81,2577.23,2498.51,2559.65,192350000,2559.65
+1990-11-29,2535.15,2544.31,2501.23,2518.81,140920000,2518.81
+1990-11-28,2543.81,2564.60,2521.04,2535.15,145490000,2535.15
+1990-11-27,2533.17,2562.62,2516.09,2543.81,147590000,2543.81
+1990-11-26,2527.23,2541.58,2489.85,2533.17,131540000,2533.17
+1990-11-23,2539.36,2557.92,2521.04,2527.23,63350000,2527.23
+1990-11-21,2530.20,2552.23,2502.72,2539.36,140660000,2539.36
+1990-11-20,2565.35,2574.50,2524.01,2530.20,161170000,2530.20
+1990-11-19,2550.25,2580.69,2543.07,2565.35,140950000,2565.35
+1990-11-16,2545.05,2570.79,2522.28,2550.25,165440000,2550.25
+1990-11-15,2559.65,2567.33,2528.71,2545.05,151370000,2545.05
+1990-11-14,2535.40,2581.19,2522.77,2559.65,179310000,2559.65
+1990-11-13,2540.35,2559.90,2512.38,2535.40,160240000,2535.40
+1990-11-12,2490.10,2550.99,2490.10,2540.35,161390000,2540.35
+1990-11-09,2443.81,2500.74,2438.61,2488.61,145160000,2488.61
+1990-11-08,2440.84,2468.81,2415.84,2443.81,155570000,2443.81
+1990-11-07,2485.15,2490.35,2430.94,2440.84,149130000,2440.84
+1990-11-06,2502.23,2516.83,2471.53,2485.15,141130000,2485.15
+1990-11-05,2490.84,2519.06,2472.77,2502.23,147510000,2502.23
+1990-11-02,2454.95,2501.73,2447.28,2490.84,168700000,2490.84
+1990-11-01,2442.33,2473.02,2415.59,2454.95,159270000,2454.95
+1990-10-31,2448.02,2475.99,2419.55,2442.33,156060000,2442.33
+1990-10-30,2430.20,2462.87,2400.50,2448.02,153450000,2448.02
+1990-10-29,2436.14,2470.30,2407.67,2430.20,133980000,2430.20
+1990-10-26,2482.18,2482.18,2429.21,2436.14,130190000,2436.14
+1990-10-25,2504.21,2525.99,2464.11,2484.41,141460000,2484.41
+1990-10-24,2494.06,2523.02,2470.54,2504.21,149290000,2504.21
+1990-10-23,2516.09,2527.97,2480.20,2494.06,146300000,2494.06
+1990-10-22,2520.79,2535.40,2476.73,2516.09,152650000,2516.09
+1990-10-19,2453.47,2536.88,2453.47,2520.79,221480000,2520.79
+1990-10-18,2391.83,2461.63,2391.83,2452.72,204110000,2452.72
+1990-10-17,2381.19,2418.56,2358.17,2387.87,161260000,2387.87
+1990-10-16,2416.34,2434.41,2366.83,2381.19,149570000,2381.19
+1990-10-15,2398.02,2451.24,2354.95,2416.34,164980000,2416.34
+1990-10-12,2365.10,2428.71,2349.75,2398.02,187940000,2398.02
+1990-10-11,2407.92,2427.23,2344.31,2365.10,180060000,2365.10
+1990-10-10,2445.54,2472.03,2388.36,2407.92,167890000,2407.92
+1990-10-09,2514.60,2514.60,2437.87,2445.54,145610000,2445.54
+1990-10-08,2510.64,2548.02,2507.18,2523.76,99470000,2523.76
+1990-10-05,2516.83,2544.55,2453.47,2510.64,153380000,2510.64
+1990-10-04,2489.36,2528.22,2464.85,2516.83,145410000,2516.83
+1990-10-03,2505.20,2534.65,2470.79,2489.36,135490000,2489.36
+1990-10-02,2515.84,2565.35,2487.62,2505.20,188360000,2505.20
+1990-10-01,2452.48,2534.65,2446.53,2515.84,202210000,2515.84
+1990-09-28,2427.48,2465.59,2367.82,2452.48,201010000,2452.48
+1990-09-27,2459.65,2492.33,2396.29,2427.48,182690000,2427.48
+1990-09-26,2485.64,2496.04,2435.40,2459.65,155570000,2459.65
+1990-09-25,2452.97,2501.24,2437.38,2485.64,155940000,2485.64
+1990-09-24,2498.02,2498.02,2438.12,2452.97,162210000,2452.97
+1990-09-21,2518.32,2538.37,2479.95,2512.38,201050000,2512.38
+1990-09-20,2549.01,2549.01,2495.54,2518.32,145100000,2518.32
+1990-09-19,2571.29,2594.55,2534.41,2557.43,147530000,2557.43
+1990-09-18,2567.33,2587.87,2524.26,2571.29,141130000,2571.29
+1990-09-17,2564.11,2585.89,2537.13,2567.33,110600000,2567.33
+1990-09-14,2582.67,2585.15,2545.54,2564.11,133390000,2564.11
+1990-09-13,2625.74,2629.21,2570.54,2582.67,123370000,2582.67
+1990-09-12,2612.62,2639.11,2592.33,2625.74,129890000,2625.74
+1990-09-11,2615.59,2635.64,2586.88,2612.62,113220000,2612.62
+1990-09-10,2619.55,2665.35,2600.99,2615.59,119730000,2615.59
+1990-09-07,2596.29,2635.89,2577.72,2619.55,123800000,2619.55
+1990-09-06,2628.22,2633.17,2575.99,2596.29,125620000,2596.29
+1990-09-05,2613.37,2643.07,2588.61,2628.22,120610000,2628.22
+1990-09-04,2614.36,2618.07,2573.02,2613.37,92940000,2613.37
+1990-08-31,2593.32,2624.50,2569.31,2614.36,96480000,2614.36
+1990-08-30,2632.43,2641.34,2578.47,2593.32,120890000,2593.32
+1990-08-29,2614.85,2651.24,2596.53,2632.43,134240000,2632.43
+1990-08-28,2611.63,2629.95,2582.92,2614.85,127660000,2614.85
+1990-08-27,2590.59,2645.05,2590.59,2611.63,160150000,2611.63
+1990-08-24,2483.42,2555.69,2480.45,2532.92,199040000,2532.92
+1990-08-23,2539.60,2539.60,2459.41,2483.42,250440000,2483.42
+1990-08-22,2603.96,2630.69,2553.22,2560.15,175550000,2560.15
+1990-08-21,2645.53,2645.53,2566.09,2603.96,194630000,2603.96
+1990-08-20,2644.80,2679.21,2632.43,2656.44,129630000,2656.44
+1990-08-17,2679.21,2679.21,2598.02,2644.80,212560000,2644.80
+1990-08-16,2746.53,2746.53,2676.24,2681.44,138850000,2681.44
+1990-08-15,2747.77,2778.71,2736.38,2748.27,135210000,2748.27
+1990-08-14,2746.78,2773.02,2720.54,2747.77,130320000,2747.77
+1990-08-13,2716.58,2752.23,2676.73,2746.78,122820000,2746.78
+1990-08-10,2758.91,2763.61,2692.82,2716.58,145340000,2716.58
+1990-08-09,2734.90,2774.26,2716.58,2758.91,155810000,2758.91
+1990-08-08,2710.64,2763.37,2691.34,2734.90,190400000,2734.90
+1990-08-07,2716.34,2763.86,2676.24,2710.64,231580000,2710.64
+1990-08-06,2758.42,2758.42,2683.17,2716.34,240400000,2716.34
+1990-08-03,2863.86,2863.86,2722.03,2809.65,292360000,2809.65
+1990-08-02,2899.26,2903.71,2833.17,2864.60,253090000,2864.60
+1990-08-01,2905.20,2931.19,2875.00,2899.26,176810000,2899.26
+1990-07-31,2917.33,2940.10,2878.47,2905.20,173810000,2905.20
+1990-07-30,2898.51,2922.52,2861.14,2917.33,146470000,2917.33
+1990-07-27,2920.79,2938.36,2877.72,2898.51,149070000,2898.51
+1990-07-26,2930.94,2945.79,2888.12,2920.79,155040000,2920.79
+1990-07-25,2922.52,2946.53,2896.78,2930.94,163530000,2930.94
+1990-07-24,2904.70,2939.60,2866.83,2922.52,181920000,2922.52
+1990-07-23,2961.14,2961.39,2833.17,2904.70,209030000,2904.70
+1990-07-20,2993.81,3019.31,2953.71,2961.14,177810000,2961.14
+1990-07-19,2981.68,3006.19,2948.27,2993.81,161990000,2993.81
+1990-07-18,2999.75,3009.65,2963.61,2981.68,168760000,2981.68
+1990-07-17,2999.75,3024.26,2970.05,2999.75,176790000,2999.75
+1990-07-16,2980.20,3017.08,2971.78,2999.75,149450000,2999.75
+1990-07-13,2969.80,3012.38,2956.68,2980.20,215600000,2980.20
+1990-07-12,2932.67,2980.69,2917.82,2969.80,211510000,2969.80
+1990-07-11,2890.84,2942.33,2890.10,2932.67,162220000,2932.67
+1990-07-10,2914.11,2928.22,2882.18,2890.84,147630000,2890.84
+1990-07-09,2904.95,2927.97,2890.84,2914.11,119390000,2914.11
+1990-07-06,2879.21,2919.80,2867.57,2904.95,111730000,2904.95
+1990-07-05,2906.44,2906.44,2863.61,2879.21,128320000,2879.21
+1990-07-03,2899.26,2925.74,2891.09,2911.63,130050000,2911.63
+1990-07-02,2880.69,2908.66,2869.80,2899.26,130200000,2899.26
+1990-06-29,2878.71,2901.98,2865.84,2880.69,145510000,2880.69
+1990-06-28,2862.13,2896.04,2850.50,2878.71,136120000,2878.71
+1990-06-27,2842.33,2878.96,2821.53,2862.13,146620000,2862.13
+1990-06-26,2845.05,2882.92,2832.67,2842.33,141420000,2842.33
+1990-06-25,2857.18,2882.18,2834.90,2845.05,133100000,2845.05
+1990-06-22,2901.73,2931.93,2848.02,2857.18,172570000,2857.18
+1990-06-21,2895.30,2916.58,2870.05,2901.73,138570000,2901.73
+1990-06-20,2893.56,2914.60,2868.81,2895.30,137420000,2895.30
+1990-06-19,2882.18,2907.92,2866.58,2893.56,134930000,2893.56
+1990-06-18,2930.45,2930.45,2877.48,2882.18,133470000,2882.18
+1990-06-15,2928.22,2947.77,2902.72,2935.89,205130000,2935.89
+1990-06-14,2929.95,2943.56,2902.97,2928.22,135770000,2928.22
+1990-06-13,2933.42,2956.93,2910.15,2929.95,158910000,2929.95
+1990-06-12,2892.57,2947.52,2877.97,2933.42,157100000,2933.42
+1990-06-11,2862.38,2901.98,2852.97,2892.57,119550000,2892.57
+1990-06-08,2897.33,2908.50,2850.73,2862.38,142600000,2862.38
+1990-06-07,2911.65,2930.58,2880.34,2897.33,160360000,2897.33
+1990-06-06,2925.00,2936.65,2891.99,2911.65,164030000,2911.65
+1990-06-05,2935.19,2956.55,2911.89,2925.00,199720000,2925.00
+1990-06-04,2900.97,2943.69,2883.98,2935.19,175520000,2935.19
+1990-06-01,2876.66,2919.90,2868.69,2900.97,187860000,2900.97
+1990-05-31,2878.56,2900.62,2854.64,2876.66,165690000,2876.66
+1990-05-30,2870.49,2908.21,2853.89,2878.56,199540000,2878.56
+1990-05-29,2820.92,2876.19,2812.62,2870.49,137410000,2870.49
+1990-05-25,2855.55,2856.50,2806.69,2820.92,120250000,2820.92
+1990-05-24,2856.26,2878.08,2828.04,2855.55,155140000,2855.55
+1990-05-23,2852.23,2869.07,2824.95,2856.26,172330000,2856.26
+1990-05-22,2844.68,2877.13,2828.51,2852.23,203350000,2852.23
+1990-05-21,2819.91,2859.72,2802.08,2844.68,166280000,2844.68
+1990-05-18,2831.71,2838.43,2804.63,2819.91,162520000,2819.91
+1990-05-17,2819.68,2856.25,2811.57,2831.71,164770000,2831.71
+1990-05-16,2822.45,2841.44,2800.23,2819.68,159810000,2819.68
+1990-05-15,2821.53,2840.74,2798.15,2822.45,165730000,2822.45
+1990-05-14,2801.58,2857.87,2793.75,2821.53,225410000,2821.53
+1990-05-11,2743.02,2810.36,2743.02,2801.58,234040000,2801.58
+1990-05-10,2732.88,2755.63,2716.44,2738.51,158460000,2738.51
+1990-05-09,2733.56,2745.50,2710.14,2732.88,152220000,2732.88
+1990-05-08,2721.62,2739.41,2710.36,2733.56,144230000,2733.56
+1990-05-07,2710.36,2739.19,2698.87,2721.62,132760000,2721.62
+1990-05-04,2696.17,2718.92,2682.43,2710.36,140550000,2710.36
+1990-05-03,2689.64,2716.22,2682.88,2696.17,145560000,2696.17
+1990-05-02,2668.92,2697.30,2659.01,2689.64,141610000,2689.64
+1990-05-01,2656.76,2687.39,2651.35,2668.92,149020000,2668.92
+1990-04-30,2645.05,2667.79,2627.70,2656.76,122750000,2656.76
+1990-04-27,2676.58,2687.39,2639.19,2645.05,130630000,2645.05
+1990-04-26,2666.44,2691.89,2650.22,2676.58,141330000,2676.58
+1990-04-25,2654.50,2685.36,2649.32,2666.44,133480000,2666.44
+1990-04-24,2666.67,2686.04,2643.69,2654.50,137360000,2654.50
+1990-04-23,2690.77,2690.77,2650.90,2666.67,136150000,2666.67
+1990-04-20,2711.94,2722.07,2668.47,2695.95,174260000,2695.95
+1990-04-19,2732.88,2742.12,2700.00,2711.94,152930000,2711.94
+1990-04-18,2765.77,2775.68,2722.75,2732.88,147130000,2732.88
+1990-04-17,2763.06,2774.77,2738.29,2765.77,127990000,2765.77
+1990-04-16,2751.80,2793.47,2748.87,2763.06,142810000,2763.06
+1990-04-12,2729.73,2763.96,2729.50,2751.80,142470000,2751.80
+1990-04-11,2731.08,2751.35,2713.29,2729.73,141080000,2729.73
+1990-04-10,2722.07,2741.67,2707.88,2731.08,136020000,2731.08
+1990-04-09,2717.12,2737.39,2701.35,2722.07,114970000,2722.07
+1990-04-06,2721.17,2732.43,2695.50,2717.12,137490000,2717.12
+1990-04-05,2719.37,2746.17,2709.01,2721.17,144170000,2721.17
+1990-04-04,2736.71,2755.86,2708.56,2719.37,159540000,2719.37
+1990-04-03,2700.45,2747.30,2699.55,2736.71,154310000,2736.71
+1990-04-02,2707.21,2708.78,2668.69,2700.45,124360000,2700.45
+1990-03-30,2727.70,2736.71,2692.34,2707.21,139340000,2707.21
+1990-03-29,2743.69,2753.38,2711.49,2727.70,132190000,2727.70
+1990-03-28,2736.94,2755.63,2716.21,2743.69,142300000,2743.69
+1990-03-27,2707.66,2738.96,2691.89,2736.94,131610000,2736.94
+1990-03-26,2704.28,2735.81,2697.97,2707.66,116110000,2707.66
+1990-03-23,2695.72,2722.75,2688.06,2704.28,132070000,2704.28
+1990-03-22,2727.93,2734.01,2674.32,2695.72,175930000,2695.72
+1990-03-21,2738.74,2759.68,2718.24,2727.93,130990000,2727.93
+1990-03-20,2755.63,2775.00,2724.10,2738.74,177320000,2738.74
+1990-03-19,2741.22,2761.71,2706.53,2755.63,142300000,2755.63
+1990-03-16,2699.32,2745.50,2699.32,2741.22,222520000,2741.22
+1990-03-15,2687.84,2714.86,2677.93,2695.72,144410000,2695.72
+1990-03-14,2674.55,2705.18,2662.39,2687.84,145060000,2687.84
+1990-03-13,2686.71,2699.55,2657.88,2674.55,145440000,2674.55
+1990-03-12,2683.33,2698.65,2661.94,2686.71,114790000,2686.71
+1990-03-09,2696.17,2705.63,2665.54,2683.33,150410000,2683.33
+1990-03-08,2669.59,2705.18,2661.26,2696.17,170900000,2696.17
+1990-03-07,2676.80,2696.85,2656.08,2669.59,163580000,2669.59
+1990-03-06,2649.55,2684.46,2638.06,2676.80,143640000,2676.80
+1990-03-05,2660.36,2675.22,2636.71,2649.55,140110000,2649.55
+1990-03-02,2635.59,2669.82,2630.18,2660.36,164330000,2660.36
+1990-03-01,2627.25,2655.63,2607.88,2635.59,157930000,2635.59
+1990-02-28,2617.12,2652.48,2603.60,2627.25,184410000,2627.25
+1990-02-27,2602.48,2637.84,2592.12,2617.12,152590000,2617.12
+1990-02-26,2564.19,2606.30,2560.13,2602.48,148910000,2602.48
+1990-02-23,2574.77,2591.44,2540.99,2564.19,148490000,2564.19
+1990-02-22,2583.56,2622.30,2568.02,2574.77,184320000,2574.77
+1990-02-21,2596.85,2602.48,2556.31,2583.56,159240000,2583.56
+1990-02-20,2619.14,2619.14,2579.05,2596.85,147300000,2596.85
+1990-02-16,2649.55,2669.37,2623.65,2635.59,166840000,2635.59
+1990-02-15,2624.32,2658.78,2614.86,2649.55,174630000,2649.55
+1990-02-14,2624.10,2643.69,2608.11,2624.32,138530000,2624.32
+1990-02-13,2619.14,2639.19,2592.57,2624.10,144490000,2624.10
+1990-02-12,2648.20,2652.48,2610.59,2619.14,118390000,2619.14
+1990-02-09,2644.37,2666.67,2628.15,2648.20,146910000,2648.20
+1990-02-08,2640.09,2674.32,2622.30,2644.37,176240000,2644.37
+1990-02-07,2606.31,2651.35,2579.28,2640.09,186710000,2640.09
+1990-02-06,2622.52,2629.50,2588.29,2606.31,134070000,2606.31
+1990-02-05,2602.70,2633.56,2592.12,2622.52,130950000,2622.52
+1990-02-02,2586.26,2623.65,2577.03,2602.70,164400000,2602.70
+1990-02-01,2590.54,2611.49,2571.85,2586.26,154580000,2586.26
+1990-01-31,2546.85,2600.90,2546.85,2590.54,189660000,2590.54
+1990-01-30,2553.38,2576.13,2513.06,2543.24,186030000,2543.24
+1990-01-29,2559.23,2583.56,2522.97,2553.38,150770000,2553.38
+1990-01-26,2561.04,2591.67,2516.89,2559.23,198190000,2559.23
+1990-01-25,2604.50,2628.83,2546.17,2561.04,172270000,2561.04
+1990-01-24,2615.32,2619.59,2534.23,2604.50,207830000,2604.50
+1990-01-23,2600.45,2639.64,2584.01,2615.32,179300000,2615.32
+1990-01-22,2677.90,2683.33,2595.27,2600.45,148380000,2600.45
+1990-01-19,2666.38,2696.89,2657.85,2677.90,185590000,2677.90
+1990-01-18,2659.13,2678.11,2625.85,2666.38,178590000,2666.38
+1990-01-17,2692.62,2711.39,2643.77,2659.13,170470000,2659.13
+1990-01-16,2669.37,2698.38,2634.17,2692.62,186070000,2692.62
+1990-01-15,2689.21,2698.11,2656.36,2669.37,140590000,2669.37
+1990-01-12,2735.92,2735.92,2675.98,2689.21,183880000,2689.21
+1990-01-11,2750.64,2783.27,2748.29,2760.67,154390000,2760.67
+1990-01-10,2766.00,2772.82,2725.47,2750.64,175990000,2750.64
+1990-01-09,2794.37,2810.79,2760.03,2766.00,155210000,2766.00
+1990-01-08,2773.25,2803.97,2753.41,2794.37,140110000,2794.37
+1990-01-05,2796.08,2810.15,2758.11,2773.25,158530000,2773.25
+1990-01-04,2809.73,2821.46,2766.42,2796.08,177000000,2796.08
+1990-01-03,2810.15,2834.04,2786.26,2809.73,192330000,2809.73
+1990-01-02,2753.20,2811.65,2732.51,2810.15,162070000,2810.15
Index: Dev/branches/Demo/d3/examples/calendar/dji.html
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/dji.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/dji.html	(revision 225)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>DJI</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.csv.js"></script>
+    <script type="text/javascript" src="../../d3.time.js"></script>
+    <script type="text/javascript" src="calendar.js"></script>
+    <link type="text/css" rel="stylesheet" href="../../lib/colorbrewer/colorbrewer.css"/>
+    <link type="text/css" rel="stylesheet" href="calendar.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="dji.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/calendar/dji.js
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/dji.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/dji.js	(revision 225)
@@ -0,0 +1,61 @@
+var w = 960,
+    pw = 14,
+    z = ~~((w - pw * 2) / 53),
+    ph = z >> 1,
+    h = z * 7;
+
+var vis = d3.select("#chart")
+  .selectAll("svg")
+    .data(d3.range(1990, 2011))
+  .enter().append("svg:svg")
+    .attr("width", w)
+    .attr("height", h + ph * 2)
+    .attr("class", "RdYlGn")
+  .append("svg:g")
+    .attr("transform", "translate(" + pw + "," + ph + ")");
+
+vis.append("svg:text")
+    .attr("transform", "translate(-6," + h / 2 + ")rotate(-90)")
+    .attr("text-anchor", "middle")
+    .text(function(d) { return d; });
+
+vis.selectAll("rect.day")
+    .data(calendar.dates)
+  .enter().append("svg:rect")
+    .attr("x", function(d) { return d.week * z; })
+    .attr("y", function(d) { return d.day * z; })
+    .attr("class", "day")
+    .attr("width", z)
+    .attr("height", z);
+
+vis.selectAll("path.month")
+    .data(calendar.months)
+  .enter().append("svg:path")
+    .attr("class", "month")
+    .attr("d", function(d) {
+      return "M" + (d.firstWeek + 1) * z + "," + d.firstDay * z
+          + "H" + d.firstWeek * z
+          + "V" + 7 * z
+          + "H" + d.lastWeek * z
+          + "V" + (d.lastDay + 1) * z
+          + "H" + (d.lastWeek + 1) * z
+          + "V" + 0
+          + "H" + (d.firstWeek + 1) * z
+          + "Z";
+    });
+
+d3.csv("dji.csv", function(csv) {
+  var data = d3.nest()
+      .key(function(d) { return d.Date; })
+      .rollup(function(d) { return (d[0].Close - d[0].Open) / d[0].Open; })
+      .map(csv);
+
+  var color = d3.scale.quantize()
+      .domain([-.05, .05])
+      .range(d3.range(9));
+
+  vis.selectAll("rect.day")
+      .attr("class", function(d) { return "day q" + color(data[d.Date]) + "-9"; })
+    .append("svg:title")
+      .text(function(d) { return d.Date + ": " + (data[d.Date] * 100).toFixed(1) + "%"; });
+});
Index: Dev/branches/Demo/d3/examples/calendar/vix.csv
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/vix.csv	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/vix.csv	(revision 225)
@@ -0,0 +1,5231 @@
+Date,Open,High,Low,Close,Volume,Adj Close
+2010-10-04,23.63,24.34,23.30,23.53,000,23.53
+2010-10-01,22.90,23.67,22.46,22.50,000,22.50
+2010-09-30,22.85,24.52,22.39,23.70,000,23.70
+2010-09-29,23.14,23.45,22.72,23.25,000,23.25
+2010-09-28,22.92,24.28,22.40,22.60,000,22.60
+2010-09-27,22.58,22.75,21.97,22.54,000,22.54
+2010-09-24,22.61,22.61,21.71,21.71,000,21.71
+2010-09-23,23.91,24.06,22.56,23.87,000,23.87
+2010-09-22,22.56,23.19,21.91,22.51,000,22.51
+2010-09-21,21.54,22.59,21.42,22.35,000,22.35
+2010-09-20,22.47,22.58,21.25,21.50,000,21.50
+2010-09-17,21.65,22.56,21.63,22.01,000,22.01
+2010-09-16,22.65,22.83,21.71,21.72,000,21.72
+2010-09-15,22.55,22.80,22.10,22.10,000,22.10
+2010-09-14,21.69,21.97,20.85,21.56,000,21.56
+2010-09-13,21.06,22.05,20.93,21.21,000,21.21
+2010-09-10,22.64,22.87,21.76,21.99,000,21.99
+2010-09-09,22.22,23.24,22.14,22.81,000,22.81
+2010-09-08,23.51,23.56,22.92,23.25,000,23.25
+2010-09-07,22.77,23.94,22.77,23.80,000,23.80
+2010-09-03,21.99,22.78,21.24,21.31,000,21.31
+2010-09-02,24.23,24.31,23.15,23.19,000,23.19
+2010-09-01,25.13,25.13,23.86,23.89,000,23.89
+2010-08-31,27.58,27.83,25.93,26.05,000,26.05
+2010-08-30,25.88,27.21,25.41,27.21,000,27.21
+2010-08-27,26.50,28.11,24.41,24.45,000,24.45
+2010-08-26,26.45,27.55,25.86,27.37,000,27.37
+2010-08-25,28.30,28.92,26.46,26.70,000,26.70
+2010-08-24,27.91,28.77,26.32,27.46,000,27.46
+2010-08-23,25.97,25.97,24.62,25.66,000,25.66
+2010-08-20,26.73,27.00,25.49,25.49,000,25.49
+2010-08-19,24.48,26.78,24.26,26.44,000,26.44
+2010-08-18,24.30,25.23,23.40,24.59,000,24.59
+2010-08-17,24.72,24.89,23.71,24.33,000,24.33
+2010-08-16,27.41,28.10,25.38,26.10,000,26.10
+2010-08-13,26.08,26.26,25.45,26.24,000,26.24
+2010-08-12,27.21,27.21,25.18,25.73,000,25.73
+2010-08-11,24.96,26.10,24.96,25.39,000,25.39
+2010-08-10,23.30,24.24,22.17,22.37,000,22.37
+2010-08-09,21.85,22.87,21.36,22.14,000,22.14
+2010-08-06,23.34,23.89,21.72,21.74,000,21.74
+2010-08-05,23.04,23.13,22.07,22.10,000,22.10
+2010-08-04,22.69,23.69,22.16,22.21,000,22.21
+2010-08-03,22.44,23.06,21.98,22.63,000,22.63
+2010-08-02,23.07,23.24,21.74,22.01,000,22.01
+2010-07-30,25.47,27.32,23.35,23.50,000,23.50
+2010-07-29,23.40,25.54,23.04,24.13,000,24.13
+2010-07-28,23.93,24.54,22.24,24.25,000,24.25
+2010-07-27,21.89,23.57,21.86,23.19,000,23.19
+2010-07-26,24.37,24.61,22.70,22.73,000,22.73
+2010-07-23,24.79,25.17,23.32,23.47,000,23.47
+2010-07-22,24.37,24.85,23.72,24.63,000,24.63
+2010-07-21,23.61,26.63,23.59,25.64,000,25.64
+2010-07-20,27.35,27.40,23.79,23.93,000,23.93
+2010-07-19,27.02,27.30,25.12,25.97,000,25.97
+2010-07-16,25.77,28.16,25.71,26.25,000,26.25
+2010-07-15,25.08,27.24,24.74,25.14,000,25.14
+2010-07-14,24.61,25.80,24.18,24.89,000,24.89
+2010-07-13,23.29,24.57,23.12,24.56,000,24.56
+2010-07-12,24.66,25.14,23.53,24.43,000,24.43
+2010-07-09,25.35,25.67,24.37,24.98,000,24.98
+2010-07-08,26.50,27.42,24.22,25.71,000,25.71
+2010-07-07,29.56,29.56,26.84,26.84,000,26.84
+2010-07-06,28.82,31.15,27.96,29.65,000,29.65
+2010-07-02,31.71,31.88,29.35,30.12,000,30.12
+2010-07-01,34.41,37.58,32.72,32.86,000,32.86
+2010-06-30,33.95,34.63,31.74,34.54,000,34.54
+2010-06-29,31.22,35.39,31.22,34.13,000,34.13
+2010-06-28,29.20,29.90,28.47,29.00,000,29.00
+2010-06-25,29.64,30.41,28.07,28.53,000,28.53
+2010-06-24,27.61,30.27,27.53,29.74,000,29.74
+2010-06-23,26.93,28.55,26.54,26.91,000,26.91
+2010-06-22,25.14,27.05,24.41,27.05,000,27.05
+2010-06-21,22.90,25.64,22.87,24.88,000,24.88
+2010-06-18,24.87,24.88,23.30,23.95,000,23.95
+2010-06-17,25.59,26.64,25.05,25.05,000,25.05
+2010-06-16,26.72,26.72,25.34,25.92,000,25.92
+2010-06-15,27.68,27.84,25.68,25.87,000,25.87
+2010-06-14,27.94,28.72,26.98,28.58,000,28.58
+2010-06-11,31.79,31.79,28.60,28.79,000,28.79
+2010-06-10,31.00,31.77,29.69,30.57,000,30.57
+2010-06-09,32.33,34.12,30.23,33.73,000,33.73
+2010-06-08,36.53,37.38,33.36,33.70,000,33.70
+2010-06-07,35.66,36.80,34.43,36.57,000,36.57
+2010-06-04,32.93,36.12,31.81,35.48,000,35.48
+2010-06-03,29.65,31.20,29.12,29.46,000,29.46
+2010-06-02,34.39,34.57,29.94,30.17,000,30.17
+2010-06-01,34.87,35.68,31.82,35.54,000,35.54
+2010-05-28,30.23,33.30,29.53,32.07,000,32.07
+2010-05-27,30.24,31.03,29.54,29.68,000,29.68
+2010-05-26,32.54,35.02,29.39,35.02,000,35.02
+2010-05-25,43.15,43.74,34.59,34.61,000,34.61
+2010-05-24,41.74,41.74,35.57,38.32,000,38.32
+2010-05-21,47.66,48.20,38.95,40.10,000,40.10
+2010-05-20,41.79,46.37,40.30,45.79,000,45.79
+2010-05-19,34.65,38.42,33.07,35.32,000,35.32
+2010-05-18,28.67,34.17,28.09,33.55,000,33.55
+2010-05-17,31.33,35.25,30.76,30.84,000,30.84
+2010-05-14,28.40,33.24,28.40,31.24,000,31.24
+2010-05-13,26.17,26.85,24.30,26.68,000,26.68
+2010-05-12,26.56,26.67,24.98,25.52,000,25.52
+2010-05-11,31.04,31.04,25.86,28.32,000,28.32
+2010-05-10,28.65,30.89,25.68,28.84,000,28.84
+2010-05-07,32.76,42.15,31.71,40.95,000,40.95
+2010-05-06,25.88,40.71,24.43,32.80,000,32.80
+2010-05-05,25.96,27.23,23.75,24.91,000,24.91
+2010-05-04,22.46,25.70,22.46,23.84,000,23.84
+2010-05-03,22.41,22.41,19.61,20.19,000,20.19
+2010-04-30,18.75,22.39,18.41,22.05,000,22.05
+2010-04-29,20.37,20.37,18.44,18.44,000,18.44
+2010-04-28,22.08,23.03,20.86,21.08,000,21.08
+2010-04-27,18.13,23.20,17.94,22.81,000,22.81
+2010-04-26,17.52,17.53,17.07,17.47,000,17.47
+2010-04-23,16.62,16.71,16.12,16.62,000,16.62
+2010-04-22,17.48,18.19,16.20,16.47,000,16.47
+2010-04-21,15.94,16.85,15.50,16.32,000,16.32
+2010-04-20,16.84,16.89,15.73,15.73,000,15.73
+2010-04-19,19.14,19.55,17.34,17.34,000,17.34
+2010-04-16,16.19,19.70,16.11,18.36,000,18.36
+2010-04-15,15.87,16.50,15.68,15.89,000,15.89
+2010-04-14,15.80,16.38,15.55,15.59,000,15.59
+2010-04-13,15.98,16.77,15.81,16.20,000,16.20
+2010-04-12,15.67,16.00,15.23,15.58,000,15.58
+2010-04-09,16.32,16.65,16.06,16.14,000,16.14
+2010-04-08,17.21,17.80,16.30,16.48,000,16.48
+2010-04-07,16.72,17.21,16.16,16.62,000,16.62
+2010-04-06,17.39,17.54,16.08,16.23,000,16.23
+2010-04-05,17.96,18.16,17.02,17.02,000,17.02
+2010-04-01,17.01,18.09,16.79,17.47,000,17.47
+2010-03-31,17.66,17.92,17.29,17.59,000,17.59
+2010-03-30,17.64,18.08,17.13,17.13,000,17.13
+2010-03-29,18.17,18.28,17.57,17.59,000,17.59
+2010-03-26,18.27,18.69,17.35,17.77,000,17.77
+2010-03-25,17.07,18.54,16.62,18.40,000,18.40
+2010-03-24,16.85,17.92,16.83,17.55,000,17.55
+2010-03-23,16.84,17.09,16.21,16.35,000,16.35
+2010-03-22,18.30,18.34,16.77,16.87,000,16.87
+2010-03-19,16.17,17.57,16.17,16.97,000,16.97
+2010-03-18,16.96,16.99,16.31,16.62,000,16.62
+2010-03-17,16.97,17.17,16.52,16.91,000,16.91
+2010-03-16,17.78,18.01,17.42,17.69,000,17.69
+2010-03-15,18.28,18.78,17.96,18.00,000,18.00
+2010-03-12,17.97,18.53,17.58,17.58,000,17.58
+2010-03-11,18.90,19.34,18.06,18.06,000,18.06
+2010-03-10,18.00,18.60,17.43,18.57,000,18.57
+2010-03-09,18.18,18.19,17.51,17.92,000,17.92
+2010-03-08,17.95,17.96,17.56,17.79,000,17.79
+2010-03-05,18.06,18.15,17.23,17.42,000,17.42
+2010-03-04,18.86,19.27,18.58,18.72,000,18.72
+2010-03-03,18.95,19.30,18.42,18.83,000,18.83
+2010-03-02,18.83,19.36,18.60,19.06,000,19.06
+2010-03-01,19.93,19.94,19.18,19.26,000,19.26
+2010-02-26,19.88,20.53,19.32,19.50,000,19.50
+2010-02-25,22.03,22.68,20.06,20.10,000,20.10
+2010-02-24,21.23,21.58,20.22,20.27,000,20.27
+2010-02-23,20.39,21.94,20.06,21.37,000,21.37
+2010-02-22,20.16,21.00,19.59,19.94,000,19.94
+2010-02-19,21.07,21.14,19.71,20.02,000,20.02
+2010-02-18,21.72,22.21,20.60,20.63,000,20.63
+2010-02-17,22.47,22.60,21.70,21.72,000,21.72
+2010-02-16,23.51,23.57,22.13,22.25,000,22.25
+2010-02-12,23.96,25.54,22.73,22.73,000,22.73
+2010-02-11,25.82,26.11,23.87,23.96,000,23.96
+2010-02-10,26.36,26.77,24.80,25.40,000,25.40
+2010-02-09,26.51,26.56,24.78,26.00,000,26.00
+2010-02-08,26.11,27.11,25.48,26.51,000,26.51
+2010-02-05,25.69,29.22,25.37,26.11,000,26.11
+2010-02-04,22.63,26.32,22.63,26.08,000,26.08
+2010-02-03,22.11,22.11,21.33,21.60,000,21.60
+2010-02-02,22.59,22.99,21.08,21.48,000,21.48
+2010-02-01,24.33,24.33,22.58,22.59,000,22.59
+2010-01-29,23.73,25.03,22.11,24.62,000,24.62
+2010-01-28,22.79,25.30,22.69,23.73,000,23.73
+2010-01-27,24.81,25.69,23.14,23.14,000,23.14
+2010-01-26,26.03,26.22,22.77,24.55,000,24.55
+2010-01-25,27.32,27.32,24.61,25.41,000,25.41
+2010-01-22,22.27,28.01,22.27,27.31,000,27.31
+2010-01-21,18.59,22.30,18.27,22.27,000,22.27
+2010-01-20,18.51,19.69,18.44,18.68,000,18.68
+2010-01-19,18.63,18.85,17.33,17.58,000,17.58
+2010-01-15,17.63,19.02,17.63,17.91,000,17.91
+2010-01-14,18.16,18.27,17.38,17.63,000,17.63
+2010-01-13,17.94,18.72,17.56,17.85,000,17.85
+2010-01-12,17.95,19.46,17.95,18.25,000,18.25
+2010-01-11,16.93,17.74,16.86,17.55,000,17.55
+2010-01-08,19.27,19.27,18.11,18.13,000,18.13
+2010-01-07,19.68,19.71,18.70,19.06,000,19.06
+2010-01-06,19.59,19.68,18.77,19.16,000,19.16
+2010-01-05,20.05,20.13,19.34,19.35,000,19.35
+2010-01-04,21.68,21.68,20.03,20.04,000,20.04
+2009-12-31,19.96,21.83,19.89,21.68,000,21.68
+2009-12-30,20.36,20.44,19.93,19.96,000,19.96
+2009-12-29,19.87,20.12,19.62,20.01,000,20.01
+2009-12-28,20.29,20.53,19.90,19.93,000,19.93
+2009-12-24,19.67,19.67,19.25,19.47,000,19.47
+2009-12-23,19.54,19.97,19.35,19.71,000,19.71
+2009-12-22,20.39,20.40,19.54,19.54,000,19.54
+2009-12-21,21.46,21.51,20.28,20.49,000,20.49
+2009-12-18,21.84,23.02,21.68,21.68,000,21.68
+2009-12-17,21.89,22.86,21.40,22.57,000,22.57
+2009-12-16,21.50,21.50,20.46,20.54,000,20.54
+2009-12-15,21.09,21.87,20.91,21.50,000,21.50
+2009-12-14,21.59,21.59,20.57,21.15,000,21.15
+2009-12-11,21.45,22.31,21.39,21.59,000,21.59
+2009-12-10,22.66,22.66,21.77,22.32,000,22.32
+2009-12-09,23.21,24.20,22.54,22.66,000,22.66
+2009-12-08,23.28,23.97,22.84,23.69,000,23.69
+2009-12-07,22.32,22.46,21.60,22.10,000,22.10
+2009-12-04,21.18,22.76,20.62,21.25,000,21.25
+2009-12-03,21.15,22.50,20.61,22.46,000,22.46
+2009-12-02,21.89,22.19,21.01,21.12,000,21.12
+2009-12-01,24.51,24.51,21.88,21.92,000,21.92
+2009-11-30,24.95,25.57,24.19,24.51,000,24.51
+2009-11-27,25.75,25.93,23.12,24.74,000,24.74
+2009-11-25,20.23,20.57,20.05,20.48,000,20.48
+2009-11-24,21.28,21.87,20.35,20.47,000,20.47
+2009-11-23,21.98,21.98,20.90,21.16,000,21.16
+2009-11-20,23.45,23.45,22.14,22.19,000,22.19
+2009-11-19,21.63,24.20,21.63,22.63,000,22.63
+2009-11-18,22.35,22.65,21.63,21.63,000,21.63
+2009-11-17,22.81,23.33,22.27,22.41,000,22.41
+2009-11-16,23.36,23.42,22.02,22.89,000,22.89
+2009-11-13,24.25,24.43,23.22,23.36,000,23.36
+2009-11-12,23.04,24.61,22.91,24.24,000,24.24
+2009-11-11,22.84,23.68,21.61,23.00,000,23.00
+2009-11-10,23.15,23.53,22.78,22.84,000,22.84
+2009-11-09,24.19,24.24,22.78,23.15,000,23.15
+2009-11-06,26.17,26.17,24.06,24.19,000,24.19
+2009-11-05,27.28,27.39,25.41,25.43,000,25.43
+2009-11-04,28.81,28.81,26.61,27.72,000,27.72
+2009-11-03,30.62,30.80,28.77,28.81,000,28.81
+2009-11-02,30.70,31.84,28.07,29.78,000,29.78
+2009-10-30,24.76,31.59,24.76,30.69,000,30.69
+2009-10-29,27.16,27.19,24.68,24.76,000,24.76
+2009-10-28,24.83,27.94,24.83,27.91,000,27.91
+2009-10-27,24.38,25.22,24.03,24.83,000,24.83
+2009-10-26,23.06,24.86,21.89,24.31,000,24.31
+2009-10-23,20.70,22.59,20.34,22.27,000,22.27
+2009-10-22,22.22,22.77,20.33,20.69,000,20.69
+2009-10-21,20.90,22.48,20.10,22.22,000,22.22
+2009-10-20,21.55,21.76,20.90,20.90,000,20.90
+2009-10-19,21.41,22.46,20.91,21.49,000,21.49
+2009-10-16,21.72,22.60,20.98,21.43,000,21.43
+2009-10-15,23.51,23.53,21.49,21.72,000,21.72
+2009-10-14,22.08,22.89,21.55,22.86,000,22.86
+2009-10-13,23.00,24.07,22.74,22.99,000,22.99
+2009-10-12,23.12,23.53,22.67,23.01,000,23.01
+2009-10-09,24.39,24.54,22.99,23.12,000,23.12
+2009-10-08,24.68,24.69,23.90,24.18,000,24.18
+2009-10-07,25.78,25.82,24.57,24.68,000,24.68
+2009-10-06,26.39,26.41,25.19,25.70,000,25.70
+2009-10-05,29.34,29.34,26.57,26.84,000,26.84
+2009-10-02,29.34,29.56,27.98,28.68,000,28.68
+2009-10-01,25.98,28.42,25.98,28.27,000,28.27
+2009-09-30,25.19,26.45,24.76,25.61,000,25.61
+2009-09-29,24.88,25.28,24.54,25.19,000,25.19
+2009-09-28,26.26,26.40,24.85,24.88,000,24.88
+2009-09-25,25.18,26.34,24.81,25.61,000,25.61
+2009-09-24,23.67,25.37,23.44,24.95,000,24.95
+2009-09-23,22.90,23.69,22.19,23.49,000,23.49
+2009-09-22,23.81,23.98,23.06,23.08,000,23.08
+2009-09-21,25.34,25.51,23.71,24.06,000,24.06
+2009-09-18,23.65,24.43,23.14,23.92,000,23.92
+2009-09-17,23.99,24.07,22.79,23.65,000,23.65
+2009-09-16,23.29,23.92,22.78,23.69,000,23.69
+2009-09-15,23.90,24.27,23.07,23.42,000,23.42
+2009-09-14,25.39,25.39,23.32,23.86,000,23.86
+2009-09-11,23.49,24.33,22.48,24.15,000,24.15
+2009-09-10,24.40,24.76,22.82,23.55,000,23.55
+2009-09-09,25.66,25.93,24.23,24.32,000,24.32
+2009-09-08,25.26,26.15,25.26,25.62,000,25.62
+2009-09-04,26.98,26.98,24.86,25.26,000,25.26
+2009-09-03,28.90,28.90,26.98,27.10,000,27.10
+2009-09-02,29.14,29.57,28.41,28.90,000,28.90
+2009-09-01,26.01,29.23,26.00,29.15,000,29.15
+2009-08-31,24.76,27.01,24.76,26.01,000,26.01
+2009-08-28,24.44,25.50,24.28,24.76,000,24.76
+2009-08-27,25.13,25.89,24.43,24.68,000,24.68
+2009-08-26,24.91,25.56,24.69,24.95,000,24.95
+2009-08-25,25.13,25.13,22.58,24.92,000,24.92
+2009-08-24,25.01,25.70,25.01,25.14,000,25.14
+2009-08-21,24.49,25.06,23.91,25.01,000,25.01
+2009-08-20,26.45,26.45,24.75,25.09,000,25.09
+2009-08-19,28.08,28.14,26.14,26.26,000,26.26
+2009-08-18,27.89,27.89,26.08,26.18,000,26.18
+2009-08-17,24.27,28.39,24.27,27.89,000,27.89
+2009-08-14,24.77,25.94,24.26,24.27,000,24.27
+2009-08-13,25.34,26.15,24.71,24.71,000,24.71
+2009-08-12,25.99,26.50,25.11,25.45,000,25.45
+2009-08-11,24.98,26.98,24.98,25.99,000,25.99
+2009-08-10,24.76,25.82,24.76,24.99,000,24.99
+2009-08-07,24.71,24.95,23.98,24.76,000,24.76
+2009-08-06,24.90,26.15,24.47,25.67,000,25.67
+2009-08-05,24.91,25.85,24.86,24.90,000,24.90
+2009-08-04,25.55,26.16,24.89,24.89,000,24.89
+2009-08-03,25.92,26.49,25.56,25.56,000,25.56
+2009-07-31,25.40,26.22,24.93,25.92,000,25.92
+2009-07-30,25.40,25.76,24.85,25.40,000,25.40
+2009-07-29,25.47,26.18,25.41,25.61,000,25.61
+2009-07-28,24.28,25.61,24.28,25.01,000,25.01
+2009-07-27,24.06,24.86,24.02,24.28,000,24.28
+2009-07-24,23.87,23.87,23.00,23.09,000,23.09
+2009-07-23,23.71,24.05,23.21,23.43,000,23.43
+2009-07-22,24.05,24.14,23.24,23.47,000,23.47
+2009-07-21,24.28,25.14,23.81,23.87,000,23.87
+2009-07-20,25.06,25.42,24.26,24.40,000,24.40
+2009-07-17,25.42,25.55,23.88,24.34,000,24.34
+2009-07-16,25.96,26.18,24.51,25.42,000,25.42
+2009-07-15,25.05,26.06,23.83,25.89,000,25.89
+2009-07-14,26.31,26.84,24.99,25.02,000,25.02
+2009-07-13,28.36,29.24,25.42,26.31,000,26.31
+2009-07-10,29.78,30.34,28.82,29.02,000,29.02
+2009-07-09,30.23,30.49,29.28,29.78,000,29.78
+2009-07-08,30.85,33.05,30.43,31.30,000,31.30
+2009-07-07,29.00,30.94,28.90,30.85,000,30.85
+2009-07-06,30.32,30.60,28.99,29.00,000,29.00
+2009-07-02,26.22,28.62,26.22,27.95,000,27.95
+2009-07-01,25.73,26.31,24.80,26.22,000,26.22
+2009-06-30,25.36,27.38,25.02,26.35,000,26.35
+2009-06-29,25.93,27.18,25.29,25.35,000,25.35
+2009-06-26,27.09,27.22,25.76,25.93,000,25.93
+2009-06-25,29.45,29.56,26.30,26.36,000,26.36
+2009-06-24,30.58,30.58,28.79,29.05,000,29.05
+2009-06-23,31.30,31.54,27.83,30.58,000,30.58
+2009-06-22,30.40,32.05,30.30,31.17,000,31.17
+2009-06-19,29.16,29.32,27.56,27.99,000,27.99
+2009-06-18,31.54,31.54,29.60,30.03,000,30.03
+2009-06-17,31.19,32.77,30.64,31.54,000,31.54
+2009-06-16,30.81,32.75,30.07,32.68,000,32.68
+2009-06-15,29.70,31.09,29.64,30.81,000,30.81
+2009-06-12,28.08,28.50,27.73,28.15,000,28.15
+2009-06-11,27.36,28.11,26.81,28.11,000,28.11
+2009-06-10,26.90,29.74,26.90,28.46,000,28.46
+2009-06-09,29.77,29.77,27.79,28.27,000,28.27
+2009-06-08,30.84,31.82,26.41,29.77,000,29.77
+2009-06-05,29.39,30.81,28.85,29.62,000,29.62
+2009-06-04,31.02,31.02,29.92,30.18,000,30.18
+2009-06-03,29.62,31.79,29.62,31.02,000,31.02
+2009-06-02,30.04,30.13,28.30,29.63,000,29.63
+2009-06-01,28.70,30.05,28.45,30.04,000,30.04
+2009-05-29,31.67,31.67,28.85,28.92,000,28.92
+2009-05-28,31.54,33.32,31.10,31.67,000,31.67
+2009-05-27,30.80,32.53,29.62,32.36,000,32.36
+2009-05-26,34.57,34.57,30.38,30.62,000,30.62
+2009-05-22,31.36,32.71,30.57,32.63,000,32.63
+2009-05-21,29.03,32.77,29.03,31.35,000,31.35
+2009-05-20,27.47,29.16,26.57,29.03,000,29.03
+2009-05-19,30.23,30.32,28.35,28.80,000,28.80
+2009-05-18,32.91,32.91,30.00,30.24,000,30.24
+2009-05-15,31.36,33.61,30.59,33.12,000,33.12
+2009-05-14,33.65,33.96,31.32,31.37,000,31.37
+2009-05-13,32.97,33.99,32.56,33.65,000,33.65
+2009-05-12,32.68,33.29,31.57,31.80,000,31.80
+2009-05-11,32.05,34.08,32.05,32.87,000,32.87
+2009-05-08,32.36,32.72,31.19,32.05,000,32.05
+2009-05-07,32.10,34.56,31.91,33.44,000,33.44
+2009-05-06,33.36,33.70,32.43,32.45,000,32.45
+2009-05-05,34.54,35.14,33.36,33.36,000,33.36
+2009-05-04,35.30,36.24,34.31,34.53,000,34.53
+2009-05-01,36.50,36.88,34.88,35.30,000,35.30
+2009-04-30,36.09,36.71,34.50,36.50,000,36.50
+2009-04-29,37.95,37.95,35.37,36.08,000,36.08
+2009-04-28,39.43,39.64,37.42,37.95,000,37.95
+2009-04-27,39.46,39.52,37.97,38.32,000,38.32
+2009-04-24,36.86,37.53,36.37,36.82,000,36.82
+2009-04-23,38.10,38.52,37.01,37.15,000,37.15
+2009-04-22,37.14,38.19,36.01,38.10,000,38.10
+2009-04-21,40.27,40.29,36.95,37.14,000,37.14
+2009-04-20,33.94,39.58,33.94,39.18,000,39.18
+2009-04-17,35.36,35.52,33.68,33.94,000,33.94
+2009-04-16,36.04,36.80,34.88,35.79,000,35.79
+2009-04-15,37.85,38.06,36.10,36.17,000,36.17
+2009-04-14,37.95,38.50,36.88,37.67,000,37.67
+2009-04-13,38.32,38.91,37.51,37.81,000,37.81
+2009-04-09,37.22,37.74,36.53,36.53,000,36.53
+2009-04-08,40.39,40.86,38.70,38.85,000,38.85
+2009-04-07,41.48,42.50,40.36,40.39,000,40.39
+2009-04-06,41.96,43.02,40.83,40.93,000,40.93
+2009-04-03,42.03,42.03,39.64,39.70,000,39.70
+2009-04-02,42.28,42.68,40.30,42.04,000,42.04
+2009-04-01,45.42,45.60,42.26,42.28,000,42.28
+2009-03-31,45.54,45.54,42.27,44.14,000,44.14
+2009-03-30,44.86,46.28,44.86,45.54,000,45.54
+2009-03-27,40.36,42.13,40.36,41.04,000,41.04
+2009-03-26,42.25,42.25,40.17,40.36,000,40.36
+2009-03-25,42.35,44.20,40.81,42.25,000,42.25
+2009-03-24,43.24,44.00,41.63,42.93,000,42.93
+2009-03-23,45.89,45.89,41.27,43.23,000,43.23
+2009-03-20,43.60,47.63,43.07,45.89,000,45.89
+2009-03-19,40.06,44.17,38.79,43.68,000,43.68
+2009-03-18,41.14,42.39,38.98,40.06,000,40.06
+2009-03-17,44.23,44.59,40.74,40.80,000,40.80
+2009-03-16,42.36,44.23,42.36,43.74,000,43.74
+2009-03-13,40.99,43.52,40.03,42.36,000,42.36
+2009-03-12,43.53,43.98,40.75,41.18,000,41.18
+2009-03-11,43.35,44.26,42.36,43.61,000,43.61
+2009-03-10,49.68,49.68,43.88,44.37,000,44.37
+2009-03-09,49.35,51.34,48.40,49.68,000,49.68
+2009-03-06,50.17,51.95,47.65,49.33,000,49.33
+2009-03-05,47.56,51.95,46.98,50.17,000,50.17
+2009-03-04,48.02,48.83,45.02,47.56,000,47.56
+2009-03-03,52.65,52.76,48.50,50.93,000,50.93
+2009-03-02,49.96,53.25,48.35,52.65,000,52.65
+2009-02-27,44.66,47.34,44.46,46.35,000,46.35
+2009-02-26,43.75,45.33,41.91,44.66,000,44.66
+2009-02-25,45.73,47.23,42.84,44.67,000,44.67
+2009-02-24,52.50,52.56,44.28,45.49,000,45.49
+2009-02-23,49.30,53.16,48.97,52.62,000,52.62
+2009-02-20,47.08,52.04,42.02,49.30,000,49.30
+2009-02-19,48.54,48.54,44.81,47.08,000,47.08
+2009-02-18,48.66,50.29,46.00,48.46,000,48.46
+2009-02-17,48.14,51.18,46.96,48.66,000,48.66
+2009-02-13,41.60,43.02,40.73,42.93,000,42.93
+2009-02-12,44.52,48.63,41.21,41.25,000,41.25
+2009-02-11,46.67,46.67,44.50,44.53,000,44.53
+2009-02-10,45.14,48.12,44.18,46.67,000,46.67
+2009-02-09,45.40,45.45,43.04,43.64,000,43.64
+2009-02-06,43.71,43.71,41.20,43.37,000,43.37
+2009-02-05,43.83,46.23,42.32,43.73,000,43.73
+2009-02-04,43.06,44.52,41.39,43.85,000,43.85
+2009-02-03,45.52,45.52,42.43,43.06,000,43.06
+2009-02-02,49.42,49.54,45.26,45.52,000,45.52
+2009-01-30,42.63,45.53,42.09,44.84,000,44.84
+2009-01-29,41.34,43.03,41.12,42.63,000,42.63
+2009-01-28,42.25,42.25,33.76,39.66,000,39.66
+2009-01-27,45.11,45.93,42.20,42.25,000,42.25
+2009-01-26,47.89,47.93,44.29,45.69,000,45.69
+2009-01-23,50.39,51.11,46.43,47.27,000,47.27
+2009-01-22,50.65,51.76,46.51,47.29,000,47.29
+2009-01-21,51.52,54.12,46.15,46.42,000,46.42
+2009-01-20,50.12,57.36,49.27,56.65,000,56.65
+2009-01-16,51.00,51.00,45.96,46.11,000,46.11
+2009-01-15,49.14,55.16,49.14,51.00,000,51.00
+2009-01-14,46.24,51.55,46.14,49.14,000,49.14
+2009-01-13,45.84,47.08,43.23,43.27,000,43.27
+2009-01-12,42.06,46.62,41.94,45.84,000,45.84
+2009-01-09,41.18,43.13,41.05,42.82,000,42.82
+2009-01-08,43.38,44.60,42.56,42.56,000,42.56
+2009-01-07,40.29,43.82,40.12,43.39,000,43.39
+2009-01-06,38.06,39.33,37.34,38.56,000,38.56
+2009-01-05,39.24,40.22,38.30,39.08,000,39.08
+2009-01-02,39.58,39.82,36.88,39.19,000,39.19
+2008-12-31,41.63,41.63,37.96,40.00,000,40.00
+2008-12-30,43.99,44.29,41.63,41.63,000,41.63
+2008-12-29,43.35,46.24,42.16,43.90,000,43.90
+2008-12-26,44.27,44.36,42.92,43.38,000,43.38
+2008-12-24,45.02,45.02,44.15,44.21,000,44.21
+2008-12-23,43.19,45.39,41.68,45.02,000,45.02
+2008-12-22,44.93,46.69,42.75,44.56,000,44.56
+2008-12-19,46.01,46.01,41.29,44.93,000,44.93
+2008-12-18,49.84,49.84,44.50,47.34,000,47.34
+2008-12-17,52.00,52.19,49.36,49.84,000,49.84
+2008-12-16,56.76,56.76,50.91,52.37,000,52.37
+2008-12-15,55.68,58.49,55.68,56.76,000,56.76
+2008-12-12,55.78,58.84,54.26,54.28,000,54.28
+2008-12-11,55.08,56.44,52.94,55.78,000,55.78
+2008-12-10,58.91,58.91,53.79,55.73,000,55.73
+2008-12-09,59.48,59.57,56.37,58.91,000,58.91
+2008-12-08,58.86,59.87,57.35,58.49,000,58.49
+2008-12-05,63.64,66.54,59.26,59.93,000,59.93
+2008-12-04,62.19,65.08,60.21,63.64,000,63.64
+2008-12-03,62.98,65.37,60.18,60.72,000,60.72
+2008-12-02,66.68,67.01,62.31,62.98,000,62.98
+2008-12-01,60.47,68.60,60.36,68.51,000,68.51
+2008-11-28,56.02,56.82,50.50,55.28,000,55.28
+2008-11-26,60.90,62.50,54.62,54.92,000,54.92
+2008-11-25,64.76,65.49,60.25,60.90,000,60.90
+2008-11-24,71.19,71.35,61.81,64.70,000,64.70
+2008-11-21,80.74,80.74,71.63,72.67,000,72.67
+2008-11-20,74.26,81.48,72.76,80.86,000,80.86
+2008-11-19,68.46,75.00,67.34,74.26,000,74.26
+2008-11-18,70.09,73.13,67.18,67.64,000,67.64
+2008-11-17,69.57,69.59,65.10,69.15,000,69.15
+2008-11-14,62.60,66.31,59.75,66.31,000,66.31
+2008-11-13,66.45,69.99,58.66,59.83,000,59.83
+2008-11-12,61.52,67.19,61.52,66.46,000,66.46
+2008-11-11,59.98,64.73,58.58,61.44,000,61.44
+2008-11-10,56.09,62.09,54.63,59.98,000,59.98
+2008-11-07,63.68,63.68,56.03,56.10,000,56.10
+2008-11-06,56.71,64.78,55.60,63.68,000,63.68
+2008-11-05,47.73,55.62,46.87,54.56,000,54.56
+2008-11-04,53.68,53.68,44.25,47.73,000,47.73
+2008-11-03,60.17,60.77,53.63,53.68,000,53.68
+2008-10-31,62.93,65.85,56.73,59.89,000,59.89
+2008-10-30,69.83,69.83,62.67,62.90,000,62.90
+2008-10-29,66.96,71.14,62.72,69.96,000,69.96
+2008-10-28,73.30,78.98,65.66,66.96,000,66.96
+2008-10-27,79.13,81.65,65.90,80.06,000,80.06
+2008-10-24,67.80,89.53,67.80,79.13,000,79.13
+2008-10-23,68.03,79.43,51.83,67.80,000,67.80
+2008-10-22,53.00,80.64,53.00,69.65,000,69.65
+2008-10-21,52.95,56.37,50.91,53.11,000,53.11
+2008-10-20,70.40,70.40,52.70,52.97,000,52.97
+2008-10-17,67.65,74.48,59.82,70.33,000,70.33
+2008-10-16,69.21,81.17,66.51,67.61,000,67.61
+2008-10-15,55.69,69.47,55.69,69.25,000,69.25
+2008-10-14,55.10,59.81,47.29,55.13,000,55.13
+2008-10-13,69.95,71.42,54.69,54.99,000,54.99
+2008-10-10,65.85,76.94,59.96,69.95,000,69.95
+2008-10-09,57.57,64.92,52.54,63.92,000,63.92
+2008-10-08,53.68,59.06,51.90,57.53,000,57.53
+2008-10-07,52.05,54.19,47.03,53.68,000,53.68
+2008-10-06,45.12,58.24,45.12,52.05,000,52.05
+2008-10-03,45.22,45.52,41.51,45.14,000,45.14
+2008-10-02,39.82,46.48,39.82,45.26,000,45.26
+2008-10-01,39.39,42.38,39.39,39.81,000,39.81
+2008-09-30,43.77,43.80,38.86,39.39,000,39.39
+2008-09-29,36.92,48.40,36.92,46.72,000,46.72
+2008-09-26,32.82,36.40,32.82,34.74,000,34.74
+2008-09-25,35.19,35.19,32.45,32.82,000,32.82
+2008-09-24,35.70,36.71,34.16,35.19,000,35.19
+2008-09-23,33.85,36.08,32.63,35.72,000,35.72
+2008-09-22,32.40,34.22,30.81,33.85,000,33.85
+2008-09-19,33.07,33.08,27.95,32.07,000,32.07
+2008-09-18,36.10,42.16,33.10,33.10,000,33.10
+2008-09-17,30.25,36.40,30.25,36.22,000,36.22
+2008-09-16,31.70,33.70,30.24,30.30,000,30.30
+2008-09-15,25.66,31.87,25.66,31.70,000,31.70
+2008-09-12,24.80,26.67,24.80,25.66,000,25.66
+2008-09-11,25.38,26.25,24.39,24.39,000,24.39
+2008-09-10,25.47,25.48,23.80,24.52,000,24.52
+2008-09-09,22.69,25.68,22.58,25.47,000,25.47
+2008-09-08,22.22,24.06,22.12,22.64,000,22.64
+2008-09-05,24.54,24.71,22.97,23.06,000,23.06
+2008-09-04,22.02,24.15,21.91,24.03,000,24.03
+2008-09-03,21.99,22.30,21.39,21.43,000,21.43
+2008-09-02,20.65,22.30,20.47,21.99,000,21.99
+2008-08-29,19.43,20.71,19.43,20.65,000,20.65
+2008-08-28,19.36,19.66,19.22,19.43,000,19.43
+2008-08-27,20.48,20.67,19.53,19.76,000,19.76
+2008-08-26,20.98,21.27,20.48,20.49,000,20.49
+2008-08-25,18.78,21.22,18.78,20.97,000,20.97
+2008-08-22,19.83,19.83,18.64,18.81,000,18.81
+2008-08-21,20.43,21.08,18.94,19.82,000,19.82
+2008-08-20,21.30,21.67,20.39,20.42,000,20.42
+2008-08-19,21.76,22.14,21.28,21.28,000,21.28
+2008-08-18,19.58,21.44,19.58,20.98,000,20.98
+2008-08-15,20.24,20.65,19.57,19.58,000,19.58
+2008-08-14,22.30,22.30,20.07,20.34,000,20.34
+2008-08-13,21.57,22.11,20.80,21.55,000,21.55
+2008-08-12,20.64,21.51,20.38,21.17,000,21.17
+2008-08-11,20.66,20.96,19.66,20.12,000,20.12
+2008-08-08,21.15,21.69,20.11,20.66,000,20.66
+2008-08-07,20.23,21.46,20.23,21.15,000,21.15
+2008-08-06,21.14,21.66,19.75,20.23,000,20.23
+2008-08-05,22.99,22.99,20.06,21.14,000,21.14
+2008-08-04,23.77,23.86,22.94,23.49,000,23.49
+2008-08-01,22.66,23.37,22.35,22.57,000,22.57
+2008-07-31,22.33,22.96,21.45,22.94,000,22.94
+2008-07-30,22.03,22.31,20.99,21.21,000,21.21
+2008-07-29,24.20,24.22,21.96,22.03,000,22.03
+2008-07-28,22.91,24.62,19.65,24.23,000,24.23
+2008-07-25,23.45,23.45,22.31,22.91,000,22.91
+2008-07-24,21.31,23.61,21.31,23.44,000,23.44
+2008-07-23,21.23,22.08,20.73,21.31,000,21.31
+2008-07-22,24.02,24.08,21.05,21.18,000,21.18
+2008-07-21,24.05,24.58,23.04,23.05,000,23.05
+2008-07-18,25.01,25.19,23.78,24.05,000,24.05
+2008-07-17,24.58,25.50,23.99,25.01,000,25.01
+2008-07-16,28.19,28.19,24.87,25.10,000,25.10
+2008-07-15,28.47,30.81,27.01,28.54,000,28.54
+2008-07-14,27.49,29.30,26.90,28.48,000,28.48
+2008-07-11,25.56,29.44,25.56,27.49,000,27.49
+2008-07-10,25.22,26.62,25.07,25.59,000,25.59
+2008-07-09,23.16,25.39,22.59,25.23,000,25.23
+2008-07-08,25.72,26.05,23.02,23.15,000,23.15
+2008-07-07,25.48,26.91,24.73,25.78,000,25.78
+2008-07-03,25.92,26.08,24.44,24.79,000,24.79
+2008-07-02,23.40,25.96,22.70,25.92,000,25.92
+2008-07-01,25.14,25.57,23.64,23.65,000,23.65
+2008-06-30,24.25,24.26,23.27,23.95,000,23.95
+2008-06-27,23.75,24.56,23.30,23.44,000,23.44
+2008-06-26,22.23,23.99,22.15,23.93,000,23.93
+2008-06-25,22.42,22.42,20.34,21.14,000,21.14
+2008-06-24,22.69,23.48,21.68,22.42,000,22.42
+2008-06-23,22.89,23.14,22.52,22.64,000,22.64
+2008-06-20,21.58,23.70,21.58,22.87,000,22.87
+2008-06-19,22.24,22.61,20.91,21.58,000,21.58
+2008-06-18,21.67,22.86,21.26,22.24,000,22.24
+2008-06-17,20.96,21.42,20.02,21.13,000,21.13
+2008-06-16,21.22,22.84,20.73,20.95,000,20.95
+2008-06-13,23.02,23.14,21.04,21.22,000,21.22
+2008-06-12,23.61,23.98,21.91,23.33,000,23.33
+2008-06-11,23.44,24.30,22.86,24.12,000,24.12
+2008-06-10,24.37,24.42,22.31,23.18,000,23.18
+2008-06-09,23.56,24.47,20.78,23.12,000,23.12
+2008-06-06,18.63,23.79,18.63,23.56,000,23.56
+2008-06-05,20.54,20.59,18.62,18.63,000,18.63
+2008-06-04,20.64,21.31,19.76,20.80,000,20.80
+2008-06-03,19.80,21.00,18.89,20.24,000,20.24
+2008-06-02,17.83,20.45,17.83,19.83,000,19.83
+2008-05-30,18.14,18.21,17.56,17.83,000,17.83
+2008-05-29,19.08,19.17,17.54,18.14,000,18.14
+2008-05-28,19.64,20.03,19.01,19.07,000,19.07
+2008-05-27,20.78,20.95,19.42,19.64,000,19.64
+2008-05-23,18.58,19.80,18.38,19.55,000,19.55
+2008-05-22,18.92,19.11,17.82,18.05,000,18.05
+2008-05-21,17.64,18.89,17.01,18.59,000,18.59
+2008-05-20,17.02,18.42,17.02,17.58,000,17.58
+2008-05-19,16.47,17.89,15.82,17.01,000,17.01
+2008-05-16,16.30,17.92,16.30,16.47,000,16.47
+2008-05-15,17.65,17.84,16.25,16.30,000,16.30
+2008-05-14,17.98,17.98,16.19,17.66,000,17.66
+2008-05-13,17.79,18.63,17.76,17.98,000,17.98
+2008-05-12,19.17,19.48,16.92,17.79,000,17.79
+2008-05-09,19.98,20.01,19.30,19.41,000,19.41
+2008-05-08,19.73,19.92,18.62,19.40,000,19.40
+2008-05-07,18.48,19.98,18.42,19.73,000,19.73
+2008-05-06,18.90,19.57,18.11,18.21,000,18.21
+2008-05-05,18.68,19.29,18.68,18.90,000,18.90
+2008-05-02,18.87,19.11,17.97,18.18,000,18.18
+2008-05-01,20.78,20.83,18.87,18.88,000,18.88
+2008-04-30,20.24,20.81,19.69,20.79,000,20.79
+2008-04-29,19.86,20.54,19.63,20.24,000,20.24
+2008-04-28,20.14,20.25,19.37,19.64,000,19.64
+2008-04-25,19.60,20.36,19.28,19.59,000,19.59
+2008-04-24,20.26,20.77,19.21,20.06,000,20.06
+2008-04-23,20.63,20.95,19.88,20.26,000,20.26
+2008-04-22,20.47,21.60,20.47,20.87,000,20.87
+2008-04-21,20.15,21.12,20.15,20.50,000,20.50
+2008-04-18,20.37,20.37,19.21,20.13,000,20.13
+2008-04-17,21.13,21.54,20.35,20.37,000,20.37
+2008-04-16,22.03,22.09,20.50,20.53,000,20.53
+2008-04-15,23.84,23.99,22.72,22.78,000,22.78
+2008-04-14,23.46,24.35,23.46,23.82,000,23.82
+2008-04-11,23.03,23.59,22.65,23.46,000,23.46
+2008-04-10,22.80,23.22,21.63,21.98,000,21.98
+2008-04-09,22.36,23.57,22.36,22.81,000,22.81
+2008-04-08,22.42,23.16,22.36,22.36,000,22.36
+2008-04-07,22.45,22.73,21.21,22.42,000,22.42
+2008-04-04,23.00,23.31,21.75,22.45,000,22.45
+2008-04-03,23.84,24.15,23.00,23.21,000,23.21
+2008-04-02,22.64,23.65,22.39,23.43,000,23.43
+2008-04-01,25.61,25.61,22.52,22.68,000,22.68
+2008-03-31,25.71,26.77,25.35,25.61,000,25.61
+2008-03-28,25.81,25.96,25.04,25.71,000,25.71
+2008-03-27,25.55,25.98,24.91,25.88,000,25.88
+2008-03-26,25.75,26.85,25.51,26.08,000,26.08
+2008-03-25,25.75,26.42,25.17,25.72,000,25.72
+2008-03-24,26.64,27.04,24.75,25.73,000,25.73
+2008-03-20,29.84,29.84,25.80,26.62,000,26.62
+2008-03-19,25.78,29.95,25.16,29.84,000,29.84
+2008-03-18,32.24,32.24,25.58,25.79,000,25.79
+2008-03-17,35.14,35.60,31.10,32.24,000,32.24
+2008-03-14,27.31,32.89,26.02,31.16,000,31.16
+2008-03-13,27.22,29.62,25.65,27.29,000,27.29
+2008-03-12,26.39,27.25,24.90,27.22,000,27.22
+2008-03-11,27.25,28.64,26.35,26.36,000,26.36
+2008-03-10,28.13,29.73,27.92,29.38,000,29.38
+2008-03-07,28.52,29.29,26.48,27.49,000,27.49
+2008-03-06,25.45,27.90,25.04,27.55,000,27.55
+2008-03-05,25.52,25.77,23.30,24.60,000,24.60
+2008-03-04,27.19,27.42,25.51,25.52,000,25.52
+2008-03-03,27.54,28.13,26.27,26.28,000,26.28
+2008-02-29,23.54,26.91,23.54,26.54,000,26.54
+2008-02-28,22.69,23.79,22.69,23.53,000,23.53
+2008-02-27,21.90,23.01,21.83,22.69,000,22.69
+2008-02-26,23.44,23.45,21.64,21.90,000,21.90
+2008-02-25,24.06,25.07,22.69,23.03,000,23.03
+2008-02-22,24.99,25.93,23.62,24.06,000,24.06
+2008-02-21,24.42,25.45,23.74,25.12,000,25.12
+2008-02-20,25.60,26.95,24.21,24.40,000,24.40
+2008-02-19,25.39,26.59,24.73,25.59,000,25.59
+2008-02-15,25.58,25.67,24.45,25.02,000,25.02
+2008-02-14,24.64,25.64,23.98,25.54,000,25.54
+2008-02-13,25.67,26.06,24.57,24.88,000,24.88
+2008-02-12,26.56,27.17,25.25,26.33,000,26.33
+2008-02-11,29.14,29.57,27.32,27.60,000,27.60
+2008-02-08,27.98,28.89,27.22,28.01,000,28.01
+2008-02-07,29.51,29.70,26.78,27.66,000,27.66
+2008-02-06,27.75,29.31,27.04,28.97,000,28.97
+2008-02-05,27.20,28.49,27.20,28.24,000,28.24
+2008-02-04,25.09,26.03,24.85,25.99,000,25.99
+2008-02-01,25.66,25.75,24.02,24.02,000,24.02
+2008-01-31,28.78,28.81,25.45,26.20,000,26.20
+2008-01-30,27.53,28.34,24.74,27.62,000,27.62
+2008-01-29,26.61,27.96,26.55,27.32,000,27.32
+2008-01-28,29.67,30.26,27.57,27.78,000,27.78
+2008-01-25,26.19,29.76,25.93,29.08,000,29.08
+2008-01-24,28.07,28.48,27.03,27.78,000,27.78
+2008-01-23,33.84,34.42,22.82,29.02,000,29.02
+2008-01-22,35.12,37.57,29.71,31.01,000,31.01
+2008-01-18,27.55,29.30,26.27,27.18,000,27.18
+2008-01-17,24.11,28.51,23.87,28.46,000,28.46
+2008-01-16,23.90,24.38,22.85,24.38,000,24.38
+2008-01-15,24.10,24.59,22.97,23.34,000,23.34
+2008-01-14,23.76,23.93,22.65,22.90,000,22.90
+2008-01-11,24.04,24.41,23.22,23.68,000,23.68
+2008-01-10,24.56,24.61,22.62,23.45,000,23.45
+2008-01-09,25.61,25.95,23.90,24.12,000,24.12
+2008-01-08,23.27,25.60,22.63,25.43,000,25.43
+2008-01-07,24.62,24.88,23.30,23.79,000,23.79
+2008-01-04,23.50,24.30,23.25,23.94,000,23.94
+2008-01-03,23.11,23.27,22.11,22.49,000,22.49
+2008-01-02,22.58,24.05,22.40,23.17,000,23.17
+2007-12-31,21.87,22.75,21.79,22.50,000,22.50
+2007-12-28,19.59,21.05,19.44,20.74,000,20.74
+2007-12-27,19.15,20.51,19.15,20.26,000,20.26
+2007-12-26,19.37,19.47,18.60,18.66,000,18.66
+2007-12-24,19.08,19.42,18.48,18.60,000,18.60
+2007-12-21,19.82,19.82,18.28,18.47,000,18.47
+2007-12-20,21.02,21.67,20.58,20.58,000,20.58
+2007-12-19,22.62,22.68,21.30,21.68,000,21.68
+2007-12-18,23.70,24.60,22.41,22.64,000,22.64
+2007-12-17,24.13,24.86,23.42,24.52,000,24.52
+2007-12-14,23.53,23.53,22.26,23.27,000,23.27
+2007-12-13,23.53,24.04,22.41,22.56,000,22.56
+2007-12-12,20.82,24.22,20.49,22.47,000,22.47
+2007-12-11,20.69,23.70,19.77,23.59,000,23.59
+2007-12-10,21.16,21.46,20.36,20.74,000,20.74
+2007-12-07,20.69,21.01,20.29,20.85,000,20.85
+2007-12-06,22.68,22.75,19.65,20.96,000,20.96
+2007-12-05,22.72,23.03,21.87,22.53,000,22.53
+2007-12-04,24.30,24.59,23.32,23.79,000,23.79
+2007-12-03,23.59,24.49,23.40,23.61,000,23.61
+2007-11-30,22.67,23.39,22.00,22.87,000,22.87
+2007-11-29,24.59,24.61,23.35,23.97,000,23.97
+2007-11-28,25.14,25.14,23.55,24.11,000,24.11
+2007-11-27,28.14,28.24,26.23,26.28,000,26.28
+2007-11-26,26.46,28.95,25.84,28.91,000,28.91
+2007-11-23,26.42,26.42,25.35,25.96,000,25.96
+2007-11-21,26.30,27.77,24.55,26.84,000,26.84
+2007-11-20,26.12,27.35,23.62,24.88,000,24.88
+2007-11-19,26.74,27.18,25.74,26.01,000,26.01
+2007-11-16,27.04,28.12,25.12,25.49,000,25.49
+2007-11-15,26.96,29.31,25.98,28.06,000,28.06
+2007-11-14,23.35,27.03,23.07,25.94,000,25.94
+2007-11-13,27.47,27.50,23.82,24.10,000,24.10
+2007-11-12,30.57,31.09,24.47,31.09,000,31.09
+2007-11-09,27.96,28.84,26.21,28.50,000,28.50
+2007-11-08,26.45,29.15,25.32,26.16,000,26.16
+2007-11-07,23.15,26.85,22.75,26.49,000,26.49
+2007-11-06,23.50,23.74,21.24,21.39,000,21.39
+2007-11-05,25.25,25.46,23.61,24.31,000,24.31
+2007-11-02,22.56,25.17,22.56,23.01,000,23.01
+2007-11-01,19.89,24.15,17.38,23.21,000,23.21
+2007-10-31,20.53,22.09,18.30,18.53,000,18.53
+2007-10-30,20.46,21.15,20.31,21.07,000,21.07
+2007-10-29,19.93,20.24,16.84,19.87,000,19.87
+2007-10-26,19.84,20.97,19.48,19.56,000,19.56
+2007-10-25,20.84,22.40,20.04,21.17,000,21.17
+2007-10-24,21.16,24.15,20.59,20.80,000,20.80
+2007-10-23,21.29,21.43,20.13,20.41,000,20.41
+2007-10-22,23.89,23.94,21.38,21.64,000,21.64
+2007-10-19,19.15,22.96,19.02,22.96,000,22.96
+2007-10-18,19.16,19.56,17.73,18.50,000,18.50
+2007-10-17,18.76,20.11,18.28,18.54,000,18.54
+2007-10-16,20.07,20.75,19.73,20.02,000,20.02
+2007-10-15,18.14,20.01,17.95,19.25,000,19.25
+2007-10-12,18.68,18.74,17.49,17.73,000,17.73
+2007-10-11,16.15,19.73,16.08,18.88,000,18.88
+2007-10-10,16.42,17.35,16.39,16.67,000,16.67
+2007-10-09,17.15,17.28,16.09,16.12,000,16.12
+2007-10-08,17.73,17.83,17.32,17.46,000,17.46
+2007-10-05,17.55,17.56,16.44,16.91,000,16.91
+2007-10-04,18.65,18.65,18.26,18.44,000,18.44
+2007-10-03,18.88,18.99,18.31,18.80,000,18.80
+2007-10-02,17.67,18.89,17.60,18.49,000,18.49
+2007-10-01,18.44,18.44,17.11,17.84,000,17.84
+2007-09-28,17.23,18.22,16.91,18.00,000,18.00
+2007-09-27,17.12,17.47,16.95,17.00,000,17.00
+2007-09-26,17.92,18.18,17.30,17.63,000,17.63
+2007-09-25,20.25,20.46,18.44,18.60,000,18.60
+2007-09-24,19.04,19.62,18.32,19.37,000,19.37
+2007-09-21,19.44,19.81,18.37,19.00,000,19.00
+2007-09-20,20.47,20.82,19.55,20.45,000,20.45
+2007-09-19,19.96,20.57,19.17,20.03,000,20.03
+2007-09-18,25.79,26.23,20.27,20.35,000,20.35
+2007-09-17,26.45,27.08,25.80,26.48,000,26.48
+2007-09-14,26.38,26.48,24.68,24.92,000,24.92
+2007-09-13,25.01,25.32,23.83,24.76,000,24.76
+2007-09-12,25.97,26.21,24.57,24.96,000,24.96
+2007-09-11,27.11,27.21,25.19,25.27,000,25.27
+2007-09-10,26.91,28.82,26.56,27.38,000,27.38
+2007-09-07,25.98,26.97,25.60,26.23,000,26.23
+2007-09-06,24.43,25.14,23.66,23.99,000,23.99
+2007-09-05,24.03,25.45,23.80,24.58,000,24.58
+2007-09-04,21.93,24.81,21.71,22.78,000,22.78
+2007-08-31,23.53,24.07,22.47,23.38,000,23.38
+2007-08-30,25.40,25.58,23.69,25.06,000,25.06
+2007-08-29,25.87,26.02,23.44,23.81,000,23.81
+2007-08-28,23.87,26.57,23.72,26.30,000,26.30
+2007-08-27,22.24,22.83,21.96,22.72,000,22.72
+2007-08-24,22.75,23.03,20.44,20.72,000,20.72
+2007-08-23,22.47,23.61,22.05,22.62,000,22.62
+2007-08-22,24.33,24.44,22.87,22.89,000,22.89
+2007-08-21,26.39,26.72,24.77,25.25,000,25.25
+2007-08-20,29.87,29.95,25.80,26.33,000,26.33
+2007-08-17,25.25,31.46,25.23,29.99,000,29.99
+2007-08-16,32.68,37.50,30.44,30.83,000,30.83
+2007-08-15,28.22,31.76,26.16,30.67,000,30.67
+2007-08-14,25.56,28.29,25.31,27.68,000,27.68
+2007-08-13,28.02,28.02,25.48,26.57,000,26.57
+2007-08-10,28.04,29.84,26.91,28.30,000,28.30
+2007-08-09,24.46,26.90,23.84,26.48,000,26.48
+2007-08-08,20.97,22.95,19.33,21.45,000,21.45
+2007-08-07,23.33,23.74,21.37,21.56,000,21.56
+2007-08-06,25.32,26.47,22.44,22.60,000,22.60
+2007-08-03,21.52,25.55,21.09,25.16,000,25.16
+2007-08-02,22.94,23.00,21.20,21.22,000,21.22
+2007-08-01,23.71,26.22,23.26,23.67,000,23.67
+2007-07-31,20.08,23.93,19.68,23.52,000,23.52
+2007-07-30,23.64,23.64,20.86,20.87,000,20.87
+2007-07-27,20.34,24.17,19.60,24.17,000,24.17
+2007-07-26,19.41,23.36,19.30,20.74,000,20.74
+2007-07-25,17.77,19.46,17.38,18.10,000,18.10
+2007-07-24,17.63,19.09,17.48,18.55,000,18.55
+2007-07-23,16.62,17.09,16.39,16.81,000,16.81
+2007-07-20,15.39,18.53,15.36,16.95,000,16.95
+2007-07-19,15.43,15.62,15.06,15.23,000,15.23
+2007-07-18,16.38,17.06,15.95,16.00,000,16.00
+2007-07-17,15.58,15.78,15.31,15.63,000,15.63
+2007-07-16,15.57,15.83,15.27,15.59,000,15.59
+2007-07-13,15.39,15.51,14.79,15.15,000,15.15
+2007-07-12,16.39,16.39,14.93,15.54,000,15.54
+2007-07-11,17.69,17.91,16.64,16.64,000,16.64
+2007-07-10,15.88,17.68,15.83,17.57,000,17.57
+2007-07-09,15.34,15.69,15.03,15.16,000,15.16
+2007-07-06,15.36,15.59,14.67,14.72,000,14.72
+2007-07-05,15.37,15.95,15.17,15.48,000,15.48
+2007-07-03,15.29,15.40,14.85,15.29,000,15.29
+2007-07-02,16.48,16.48,15.31,15.40,000,15.40
+2007-06-29,15.25,17.13,14.62,16.23,000,16.23
+2007-06-28,15.70,15.71,14.98,15.54,000,15.54
+2007-06-27,18.87,18.98,15.44,15.53,000,15.53
+2007-06-26,16.46,18.89,16.21,18.89,000,18.89
+2007-06-25,16.50,17.24,15.41,16.65,000,16.65
+2007-06-22,14.45,16.58,14.31,15.75,000,15.75
+2007-06-21,14.80,15.56,14.17,14.21,000,14.21
+2007-06-20,12.77,14.76,12.75,14.67,000,14.67
+2007-06-19,13.78,13.80,12.79,12.85,000,12.85
+2007-06-18,14.42,14.51,13.35,13.42,000,13.42
+2007-06-15,13.01,13.97,12.58,13.94,000,13.94
+2007-06-14,14.76,14.82,13.59,13.64,000,13.64
+2007-06-13,16.05,16.10,14.67,14.73,000,14.73
+2007-06-12,15.46,16.70,14.77,16.67,000,16.67
+2007-06-11,15.31,15.47,14.24,14.71,000,14.71
+2007-06-08,16.75,17.06,14.73,14.84,000,14.84
+2007-06-07,15.08,17.09,14.89,17.06,000,17.06
+2007-06-06,14.07,15.06,13.63,14.87,000,14.87
+2007-06-05,13.58,14.17,13.29,13.63,000,13.63
+2007-06-04,13.47,13.54,12.78,13.29,000,13.29
+2007-06-01,12.77,13.01,12.43,12.78,000,12.78
+2007-05-31,12.78,13.18,12.62,13.05,000,13.05
+2007-05-30,14.18,14.29,12.82,12.83,000,12.83
+2007-05-29,13.86,13.95,13.31,13.53,000,13.53
+2007-05-25,13.81,13.87,13.23,13.34,000,13.34
+2007-05-24,13.15,14.36,12.92,14.08,000,14.08
+2007-05-23,12.77,13.28,12.55,13.24,000,13.24
+2007-05-22,13.29,13.38,12.70,13.02,000,13.02
+2007-05-21,13.24,13.30,12.70,13.30,000,13.30
+2007-05-18,13.01,13.22,12.69,12.76,000,12.76
+2007-05-17,13.62,13.82,13.25,13.51,000,13.51
+2007-05-16,14.02,14.18,13.47,13.50,000,13.50
+2007-05-15,13.88,14.30,13.27,14.01,000,14.01
+2007-05-14,13.26,14.43,13.01,13.96,000,13.96
+2007-05-11,13.47,13.47,12.63,12.95,000,12.95
+2007-05-10,13.31,13.85,12.88,13.60,000,13.60
+2007-05-09,13.43,13.50,12.54,12.88,000,12.88
+2007-05-08,13.48,13.69,13.15,13.21,000,13.21
+2007-05-07,13.34,13.37,12.91,13.15,000,13.15
+2007-05-04,12.91,13.36,12.59,12.91,000,12.91
+2007-05-03,13.01,13.36,12.89,13.09,000,13.09
+2007-05-02,13.52,13.52,12.55,13.08,000,13.08
+2007-05-01,14.10,14.60,13.48,13.51,000,13.51
+2007-04-30,12.90,14.31,12.45,14.22,000,14.22
+2007-04-27,13.12,13.26,12.41,12.45,000,12.45
+2007-04-26,13.16,13.67,12.67,12.79,000,12.79
+2007-04-25,12.74,13.23,12.58,13.21,000,13.21
+2007-04-24,13.12,13.89,13.04,13.12,000,13.12
+2007-04-23,12.60,13.08,12.07,13.04,000,13.04
+2007-04-20,12.03,12.67,11.97,12.07,000,12.07
+2007-04-19,13.16,13.27,12.41,12.54,000,12.54
+2007-04-18,12.48,12.57,11.95,12.42,000,12.42
+2007-04-17,11.70,12.17,11.50,12.14,000,12.14
+2007-04-16,11.86,12.10,11.46,11.98,000,11.98
+2007-04-13,12.67,13.00,12.13,12.20,000,12.20
+2007-04-12,13.65,14.15,12.58,12.71,000,12.71
+2007-04-11,12.72,14.08,12.68,13.49,000,13.49
+2007-04-10,13.33,13.33,12.56,12.68,000,12.68
+2007-04-09,13.26,13.56,12.89,13.14,000,13.14
+2007-04-05,13.57,13.66,12.69,13.23,000,13.23
+2007-04-04,13.82,13.91,13.20,13.24,000,13.24
+2007-04-03,14.02,14.53,12.81,13.46,000,13.46
+2007-04-02,14.91,15.46,14.40,14.53,000,14.53
+2007-03-30,15.14,15.82,14.14,14.64,000,14.64
+2007-03-29,14.98,16.05,14.34,15.14,1988300,15.14
+2007-03-28,14.28,15.51,14.22,14.98,000,14.98
+2007-03-27,13.56,13.90,13.40,13.48,000,13.48
+2007-03-26,13.39,14.70,12.91,13.11,000,13.11
+2007-03-23,13.13,13.18,12.46,12.95,000,12.95
+2007-03-22,12.29,12.95,12.04,12.93,000,12.93
+2007-03-21,13.27,13.67,11.21,12.19,000,12.19
+2007-03-20,15.01,15.16,13.25,13.27,000,13.27
+2007-03-19,15.82,15.82,14.58,14.59,000,14.59
+2007-03-16,15.38,17.71,15.29,16.79,000,16.79
+2007-03-15,16.91,16.91,15.27,16.43,000,16.43
+2007-03-14,17.63,21.25,16.75,17.27,000,17.27
+2007-03-13,14.87,18.42,14.60,18.13,000,18.13
+2007-03-12,14.96,14.96,13.76,13.99,000,13.99
+2007-03-09,13.70,14.62,13.67,14.09,000,14.09
+2007-03-08,14.34,14.70,13.48,14.29,000,14.29
+2007-03-07,16.25,16.27,14.52,15.24,000,15.24
+2007-03-06,18.31,18.34,15.76,15.96,000,15.96
+2007-03-05,20.40,20.41,18.13,19.63,000,19.63
+2007-03-02,16.70,18.63,16.04,18.61,000,18.61
+2007-03-01,17.76,19.40,15.36,15.82,000,15.82
+2007-02-28,17.21,17.29,14.50,15.42,000,15.42
+2007-02-27,12.12,19.01,12.10,18.31,000,18.31
+2007-02-26,10.59,11.44,10.52,11.15,000,11.15
+2007-02-23,10.41,10.70,10.36,10.58,000,10.58
+2007-02-22,10.23,10.52,10.01,10.18,000,10.18
+2007-02-21,10.48,10.53,10.17,10.20,000,10.20
+2007-02-20,10.62,10.72,10.14,10.24,000,10.24
+2007-02-16,10.42,10.44,9.98,10.02,000,10.02
+2007-02-15,10.28,10.32,10.05,10.22,000,10.22
+2007-02-14,10.19,10.26,9.70,10.23,000,10.23
+2007-02-13,11.42,11.42,10.33,10.34,000,10.34
+2007-02-12,11.33,11.88,11.30,11.61,000,11.61
+2007-02-09,10.42,11.56,10.25,11.10,000,11.10
+2007-02-08,10.49,10.91,10.40,10.44,000,10.44
+2007-02-07,10.31,10.56,10.24,10.32,000,10.32
+2007-02-06,10.55,10.88,10.44,10.65,000,10.65
+2007-02-05,10.53,10.70,10.44,10.55,000,10.55
+2007-02-02,10.30,10.36,9.96,10.08,000,10.08
+2007-02-01,10.32,10.43,10.14,10.31,000,10.31
+2007-01-31,11.09,11.26,10.27,10.42,000,10.42
+2007-01-30,11.28,11.49,10.95,10.96,000,10.96
+2007-01-29,11.50,11.60,10.92,11.45,000,11.45
+2007-01-26,10.95,11.60,10.92,11.13,000,11.13
+2007-01-25,9.99,11.38,9.95,11.22,000,11.22
+2007-01-24,10.41,10.41,9.87,9.89,000,9.89
+2007-01-23,10.77,10.94,10.22,10.34,000,10.34
+2007-01-22,10.77,11.08,10.62,10.77,000,10.77
+2007-01-19,10.80,11.03,10.24,10.40,000,10.40
+2007-01-18,10.65,11.04,10.45,10.85,000,10.85
+2007-01-17,10.90,10.90,10.35,10.59,000,10.59
+2007-01-16,10.64,10.89,10.40,10.74,000,10.74
+2007-01-12,10.93,10.93,10.14,10.15,000,10.15
+2007-01-11,11.42,11.48,10.50,10.87,000,10.87
+2007-01-10,12.34,12.50,11.43,11.47,000,11.47
+2007-01-09,11.86,12.47,11.69,11.91,000,11.91
+2007-01-08,12.48,12.83,11.78,12.00,000,12.00
+2007-01-05,11.84,12.25,11.68,12.14,000,12.14
+2007-01-04,12.40,12.42,11.28,11.51,000,11.51
+2007-01-03,12.16,12.75,11.53,12.04,000,12.04
+2006-12-29,10.95,11.65,10.71,11.56,000,11.56
+2006-12-28,10.84,11.06,10.73,10.99,000,10.99
+2006-12-27,11.12,11.12,10.59,10.64,000,10.64
+2006-12-26,12.03,12.03,11.24,11.26,000,11.26
+2006-12-22,10.59,11.46,10.59,11.36,000,11.36
+2006-12-21,10.36,10.89,10.13,10.53,000,10.53
+2006-12-20,10.30,10.33,10.03,10.26,000,10.26
+2006-12-19,11.06,11.31,10.27,10.30,000,10.30
+2006-12-18,10.64,10.91,10.46,10.60,000,10.60
+2006-12-15,9.68,10.07,9.39,10.05,000,10.05
+2006-12-14,10.74,10.75,9.64,9.97,000,9.97
+2006-12-13,10.45,10.58,10.15,10.18,000,10.18
+2006-12-12,11.20,11.39,10.35,10.65,000,10.65
+2006-12-11,11.88,11.93,10.71,10.71,000,10.71
+2006-12-08,12.58,12.67,11.91,12.08,000,12.08
+2006-12-07,11.35,12.68,11.17,12.67,000,12.67
+2006-12-06,11.39,11.55,11.19,11.33,000,11.33
+2006-12-05,11.13,11.59,10.85,11.27,000,11.27
+2006-12-04,12.01,12.01,10.98,11.23,000,11.23
+2006-12-01,11.07,12.28,10.96,11.66,000,11.66
+2006-11-30,10.88,11.30,10.58,10.91,000,10.91
+2006-11-29,11.41,11.43,10.67,10.83,000,10.83
+2006-11-28,12.48,12.55,11.56,11.62,000,11.62
+2006-11-27,11.26,12.33,11.14,12.30,000,12.30
+2006-11-24,10.81,10.86,10.56,10.73,000,10.73
+2006-11-22,10.02,10.15,9.81,10.14,000,10.14
+2006-11-21,10.05,10.06,9.84,9.90,000,9.90
+2006-11-20,10.42,10.48,9.91,9.97,000,9.97
+2006-11-17,10.37,10.48,10.05,10.05,000,10.05
+2006-11-16,10.13,10.35,10.04,10.16,000,10.16
+2006-11-15,10.47,10.61,10.13,10.31,000,10.31
+2006-11-14,10.89,11.31,10.14,10.50,000,10.50
+2006-11-13,11.19,11.26,10.69,10.86,000,10.86
+2006-11-10,11.01,11.12,10.77,10.79,000,10.79
+2006-11-09,10.65,11.07,10.57,11.01,000,11.01
+2006-11-08,11.41,11.49,10.70,10.75,000,10.75
+2006-11-07,11.06,11.19,10.87,11.09,000,11.09
+2006-11-06,11.39,11.41,10.99,11.16,000,11.16
+2006-11-03,11.16,11.43,10.34,11.16,000,11.16
+2006-11-02,11.61,11.76,11.41,11.42,000,11.42
+2006-11-01,10.93,11.68,10.89,11.51,000,11.51
+2006-10-31,11.10,11.39,10.99,11.10,000,11.10
+2006-10-30,11.36,11.43,10.92,11.20,000,11.20
+2006-10-27,10.66,10.99,10.53,10.80,000,10.80
+2006-10-26,10.56,10.96,10.47,10.56,000,10.56
+2006-10-25,10.88,10.88,10.60,10.66,000,10.66
+2006-10-24,11.25,11.27,10.78,10.78,000,10.78
+2006-10-23,11.15,11.25,10.62,11.08,000,11.08
+2006-10-20,11.06,11.23,10.44,10.63,000,10.63
+2006-10-19,11.51,11.57,10.78,10.90,000,10.90
+2006-10-18,11.44,11.83,11.33,11.34,000,11.34
+2006-10-17,11.36,12.03,11.35,11.75,000,11.75
+2006-10-16,11.07,11.20,10.91,11.09,000,11.09
+2006-10-13,11.17,11.35,10.75,10.75,000,10.75
+2006-10-12,11.50,11.51,11.09,11.09,000,11.09
+2006-10-11,11.75,12.03,11.31,11.62,000,11.62
+2006-10-10,11.77,11.89,11.47,11.52,000,11.52
+2006-10-09,12.07,12.09,11.58,11.68,000,11.68
+2006-10-06,11.99,12.17,11.55,11.56,000,11.56
+2006-10-05,11.94,12.06,11.65,11.98,000,11.98
+2006-10-04,12.64,12.64,11.62,11.86,000,11.86
+2006-10-03,12.68,12.91,11.97,12.24,000,12.24
+2006-10-02,12.45,12.72,12.11,12.57,000,12.57
+2006-09-29,11.75,12.10,11.72,11.98,000,11.98
+2006-09-28,11.64,12.06,11.59,11.72,000,11.72
+2006-09-27,11.65,11.90,11.42,11.58,000,11.58
+2006-09-26,12.23,12.23,11.51,11.53,000,11.53
+2006-09-25,12.97,13.41,11.93,12.12,000,12.12
+2006-09-22,12.47,13.28,12.47,12.59,000,12.59
+2006-09-21,11.43,12.60,11.28,12.25,000,12.25
+2006-09-20,11.75,11.75,11.34,11.39,000,11.39
+2006-09-19,11.96,12.69,11.86,11.98,000,11.98
+2006-09-18,12.28,12.41,11.58,11.78,000,11.78
+2006-09-15,11.49,12.54,11.40,11.76,000,11.76
+2006-09-14,11.36,12.02,10.74,11.55,000,11.55
+2006-09-13,11.40,11.56,10.99,11.18,000,11.18
+2006-09-12,13.04,13.14,11.55,11.92,000,11.92
+2006-09-11,13.95,13.95,12.75,12.99,000,12.99
+2006-09-08,13.79,13.80,13.05,13.16,000,13.16
+2006-09-07,14.07,14.49,13.67,13.88,000,13.88
+2006-09-06,13.06,13.88,13.06,13.74,000,13.74
+2006-09-05,12.80,12.86,12.43,12.63,000,12.63
+2006-09-01,12.14,12.33,11.91,11.96,000,11.96
+2006-08-31,12.23,12.33,12.07,12.31,000,12.31
+2006-08-30,12.14,12.35,12.10,12.22,000,12.22
+2006-08-29,12.27,12.83,12.21,12.28,000,12.28
+2006-08-28,12.92,12.92,12.07,12.18,000,12.18
+2006-08-25,12.41,12.47,12.08,12.31,000,12.31
+2006-08-24,12.24,12.58,12.21,12.40,000,12.40
+2006-08-23,12.26,12.73,12.16,12.40,000,12.40
+2006-08-22,12.42,12.42,11.93,12.19,000,12.19
+2006-08-21,12.40,12.62,12.21,12.22,000,12.22
+2006-08-18,12.11,12.52,11.57,11.64,000,11.64
+2006-08-17,12.69,12.72,12.21,12.24,000,12.24
+2006-08-16,12.69,12.95,12.11,12.41,000,12.41
+2006-08-15,13.57,13.72,13.15,13.42,000,13.42
+2006-08-14,14.15,14.43,13.41,14.26,000,14.26
+2006-08-11,14.72,14.85,14.30,14.30,000,14.30
+2006-08-10,15.56,15.73,14.45,14.46,000,14.46
+2006-08-09,14.76,15.41,14.07,15.20,000,15.20
+2006-08-08,15.20,15.55,14.86,15.23,000,15.23
+2006-08-07,14.98,15.53,14.97,15.23,000,15.23
+2006-08-04,14.03,14.91,13.65,14.34,000,14.34
+2006-08-03,15.10,15.19,14.20,14.46,000,14.46
+2006-08-02,14.93,14.93,13.92,14.34,000,14.34
+2006-08-01,15.49,16.15,15.03,15.05,000,15.05
+2006-07-31,15.01,15.13,14.86,14.95,000,14.95
+2006-07-28,14.73,14.75,14.06,14.33,000,14.33
+2006-07-27,14.26,15.39,14.07,14.94,000,14.94
+2006-07-26,15.04,15.21,14.09,14.62,000,14.62
+2006-07-25,15.44,15.68,14.31,14.85,000,14.85
+2006-07-24,17.08,17.08,14.89,14.98,000,14.98
+2006-07-21,16.23,17.56,16.23,17.40,000,17.40
+2006-07-20,15.10,16.37,14.87,16.21,000,16.21
+2006-07-19,17.62,17.62,14.47,15.55,000,15.55
+2006-07-18,18.20,19.58,17.66,17.74,000,17.74
+2006-07-17,18.73,18.76,17.75,18.64,000,18.64
+2006-07-14,17.57,18.79,17.28,18.05,000,18.05
+2006-07-13,15.17,17.83,15.17,17.79,000,17.79
+2006-07-12,13.39,14.85,13.26,14.49,000,14.49
+2006-07-11,14.31,14.68,13.10,13.14,000,13.14
+2006-07-10,14.17,14.50,13.67,14.02,000,14.02
+2006-07-07,13.90,14.45,13.43,13.97,000,13.97
+2006-07-06,14.04,14.04,13.25,13.65,000,13.65
+2006-07-05,13.92,14.77,13.86,14.15,000,14.15
+2006-07-03,13.29,13.51,12.77,13.05,000,13.05
+2006-06-30,12.90,13.47,12.74,13.08,000,13.08
+2006-06-29,15.28,15.30,12.93,13.03,000,13.03
+2006-06-28,16.02,17.00,15.78,15.79,000,15.79
+2006-06-27,15.58,16.55,15.27,16.40,000,16.40
+2006-06-26,16.55,16.61,15.49,15.62,000,15.62
+2006-06-23,16.41,16.58,14.94,15.89,000,15.89
+2006-06-22,15.95,16.66,15.56,15.88,000,15.88
+2006-06-21,16.67,16.72,14.88,15.52,000,15.52
+2006-06-20,17.52,17.65,16.39,16.69,000,16.69
+2006-06-19,16.06,18.10,15.73,17.83,000,17.83
+2006-06-16,16.56,18.13,16.52,17.25,000,17.25
+2006-06-15,21.05,21.14,15.65,15.90,000,15.90
+2006-06-14,23.45,23.49,21.45,21.46,000,21.46
+2006-06-13,20.95,23.81,20.27,23.81,000,23.81
+2006-06-12,18.13,21.25,17.89,20.96,000,20.96
+2006-06-09,17.90,18.45,17.07,18.12,000,18.12
+2006-06-08,17.92,20.75,17.88,18.35,000,18.35
+2006-06-07,17.21,17.86,16.07,17.80,000,17.80
+2006-06-06,16.72,18.56,16.65,17.34,000,17.34
+2006-06-05,14.97,17.14,14.97,16.65,000,16.65
+2006-06-02,14.17,14.97,13.92,14.32,000,14.32
+2006-06-01,16.47,16.56,14.48,14.52,000,14.52
+2006-05-31,18.09,18.09,16.41,16.44,000,16.44
+2006-05-30,15.39,18.72,15.39,18.66,000,18.66
+2006-05-26,14.92,15.04,14.26,14.26,000,14.26
+2006-05-25,16.67,16.67,15.31,15.50,000,15.50
+2006-05-24,17.87,19.87,17.13,17.36,000,17.36
+2006-05-23,16.70,18.26,15.36,18.26,000,18.26
+2006-05-22,18.55,19.62,16.73,17.72,000,17.72
+2006-05-19,16.16,18.01,15.90,17.18,000,17.18
+2006-05-18,15.54,17.09,14.96,16.99,000,16.99
+2006-05-17,13.83,16.26,13.39,16.26,000,16.26
+2006-05-16,13.49,13.61,12.98,13.35,000,13.35
+2006-05-15,15.12,15.13,13.44,13.57,000,13.57
+2006-05-12,12.71,14.26,12.71,14.19,000,14.19
+2006-05-11,12.33,12.92,11.99,12.49,000,12.49
+2006-05-10,12.22,12.32,11.78,11.78,000,11.78
+2006-05-09,12.10,12.15,11.88,11.99,000,11.99
+2006-05-08,11.98,12.06,11.81,12.00,000,12.00
+2006-05-05,11.39,11.62,11.18,11.62,000,11.62
+2006-05-04,11.92,12.16,11.71,11.86,000,11.86
+2006-05-03,12.21,12.45,11.95,11.99,000,11.99
+2006-05-02,12.20,12.27,11.93,11.99,000,11.99
+2006-05-01,11.83,12.59,11.75,12.54,000,12.54
+2006-04-28,12.13,12.13,11.42,11.59,000,11.59
+2006-04-27,12.27,12.52,11.55,11.84,000,11.84
+2006-04-26,11.76,11.79,11.34,11.76,000,11.76
+2006-04-25,11.71,12.19,11.59,11.75,000,11.75
+2006-04-24,12.26,12.42,11.67,11.75,000,11.75
+2006-04-21,11.24,11.98,11.19,11.59,000,11.59
+2006-04-20,11.30,11.67,11.02,11.64,000,11.64
+2006-04-19,11.52,11.80,11.23,11.32,000,11.32
+2006-04-18,12.55,12.55,11.31,11.40,000,11.40
+2006-04-17,12.80,13.02,12.27,12.58,000,12.58
+2006-04-13,12.93,13.00,12.28,12.38,000,12.38
+2006-04-12,13.08,13.09,12.66,12.76,000,12.76
+2006-04-11,12.09,13.06,12.06,13.00,000,13.00
+2006-04-10,12.44,12.49,12.04,12.19,000,12.19
+2006-04-07,11.44,12.31,11.20,12.26,000,12.26
+2006-04-06,11.34,11.74,11.25,11.45,000,11.45
+2006-04-05,11.24,11.36,11.06,11.13,000,11.13
+2006-04-04,11.66,11.80,11.09,11.14,000,11.14
+2006-04-03,11.47,11.62,11.03,11.57,000,11.57
+2006-03-31,11.42,11.65,11.27,11.39,000,11.39
+2006-03-30,11.03,11.73,10.70,11.57,000,11.57
+2006-03-29,11.46,11.57,10.79,10.95,000,10.95
+2006-03-28,11.69,11.90,11.38,11.58,000,11.58
+2006-03-27,11.46,11.72,11.41,11.46,000,11.46
+2006-03-24,11.23,11.48,11.09,11.19,000,11.19
+2006-03-23,11.19,11.57,11.11,11.17,000,11.17
+2006-03-22,11.71,11.79,11.11,11.21,000,11.21
+2006-03-21,11.71,11.89,11.17,11.62,000,11.62
+2006-03-20,12.11,12.21,10.79,11.79,000,11.79
+2006-03-17,11.56,12.20,11.53,12.12,000,12.12
+2006-03-16,10.59,12.05,10.57,11.98,000,11.98
+2006-03-15,11.17,11.54,10.98,11.35,000,11.35
+2006-03-14,11.61,11.72,10.53,10.74,000,10.74
+2006-03-13,11.72,11.75,10.89,11.37,000,11.37
+2006-03-10,12.52,12.60,11.79,11.85,000,11.85
+2006-03-09,12.21,12.69,12.01,12.68,000,12.68
+2006-03-08,12.83,13.34,12.26,12.32,000,12.32
+2006-03-07,12.92,13.34,12.64,12.66,000,12.66
+2006-03-06,12.22,12.91,12.22,12.74,000,12.74
+2006-03-03,12.03,12.10,11.36,11.96,000,11.96
+2006-03-02,11.79,11.95,11.56,11.72,000,11.72
+2006-03-01,12.05,12.07,11.52,11.54,000,11.54
+2006-02-28,11.74,12.36,11.71,12.34,000,12.34
+2006-02-27,11.79,11.83,11.40,11.59,000,11.59
+2006-02-24,11.94,12.06,11.42,11.46,000,11.46
+2006-02-23,11.86,11.97,11.58,11.87,000,11.87
+2006-02-22,12.27,12.30,11.68,11.88,000,11.88
+2006-02-21,12.36,12.64,12.28,12.41,000,12.41
+2006-02-17,11.64,12.21,11.52,12.01,000,12.01
+2006-02-16,12.19,12.29,11.13,11.48,000,11.48
+2006-02-15,12.43,12.95,12.21,12.31,000,12.31
+2006-02-14,13.09,13.15,12.01,12.25,000,12.25
+2006-02-13,13.34,13.70,13.05,13.35,000,13.35
+2006-02-10,13.35,13.73,12.69,12.87,000,12.87
+2006-02-09,12.56,13.15,12.27,13.12,000,13.12
+2006-02-08,13.41,13.61,12.76,12.83,000,12.83
+2006-02-07,13.20,13.67,12.97,13.59,000,13.59
+2006-02-06,13.43,13.43,12.99,13.04,000,13.04
+2006-02-03,13.37,13.70,12.64,12.96,000,12.96
+2006-02-02,12.54,13.47,12.48,13.23,000,13.23
+2006-02-01,13.03,13.03,12.34,12.36,000,12.36
+2006-01-31,12.45,13.06,12.45,12.95,000,12.95
+2006-01-30,12.22,12.46,12.07,12.39,000,12.39
+2006-01-27,12.27,12.33,11.72,11.97,000,11.97
+2006-01-26,12.89,12.91,12.19,12.42,000,12.42
+2006-01-25,12.95,13.38,12.62,12.87,000,12.87
+2006-01-24,13.79,13.83,13.14,13.31,000,13.31
+2006-01-23,14.44,14.48,13.58,13.93,000,13.93
+2006-01-20,12.10,14.56,11.89,14.56,000,14.56
+2006-01-19,12.12,12.34,11.65,11.98,000,11.98
+2006-01-18,12.62,12.70,12.20,12.25,000,12.25
+2006-01-17,12.13,12.46,11.87,11.91,000,11.91
+2006-01-13,11.40,11.61,11.11,11.23,000,11.23
+2006-01-12,10.98,11.38,10.94,11.20,000,11.20
+2006-01-11,11.03,11.16,10.83,10.94,000,10.94
+2006-01-10,11.39,11.39,10.84,10.86,000,10.86
+2006-01-09,11.35,11.35,10.98,11.13,000,11.13
+2006-01-06,11.23,11.50,10.81,11.00,000,11.00
+2006-01-05,11.43,11.84,11.31,11.31,000,11.31
+2006-01-04,11.22,11.71,10.97,11.37,000,11.37
+2006-01-03,12.25,12.51,10.99,11.14,000,11.14
+2005-12-30,11.96,12.07,11.55,12.07,000,12.07
+2005-12-29,11.36,11.67,11.14,11.61,000,11.61
+2005-12-28,11.55,11.64,11.26,11.35,000,11.35
+2005-12-27,10.97,11.65,10.83,11.57,000,11.57
+2005-12-23,10.37,10.48,10.24,10.27,000,10.27
+2005-12-22,10.82,10.89,10.28,10.29,000,10.29
+2005-12-21,10.71,11.07,10.34,10.81,000,10.81
+2005-12-20,11.32,11.45,11.00,11.19,000,11.19
+2005-12-19,11.11,11.38,10.65,11.38,000,11.38
+2005-12-16,10.70,10.75,10.15,10.68,000,10.68
+2005-12-15,10.66,11.11,10.37,10.73,000,10.73
+2005-12-14,10.75,10.79,10.39,10.48,000,10.48
+2005-12-13,10.57,11.42,10.57,11.11,000,11.11
+2005-12-12,10.86,11.81,10.83,11.47,000,11.47
+2005-12-09,11.91,12.20,11.56,11.69,000,11.69
+2005-12-08,11.88,12.41,11.73,12.21,000,12.21
+2005-12-07,11.49,12.44,11.45,12.18,000,12.18
+2005-12-06,11.16,11.59,10.96,11.52,000,11.52
+2005-12-05,11.45,11.68,11.40,11.60,000,11.60
+2005-12-02,11.10,11.23,10.94,11.01,000,11.01
+2005-12-01,12.09,12.23,11.14,11.24,000,11.24
+2005-11-30,11.84,12.13,11.55,12.06,000,12.06
+2005-11-29,11.77,11.96,11.61,11.89,000,11.89
+2005-11-28,11.34,11.99,11.33,11.84,000,11.84
+2005-11-25,11.04,11.24,10.88,10.88,000,10.88
+2005-11-23,10.96,11.03,10.67,10.96,000,10.96
+2005-11-22,11.01,11.10,10.50,10.60,000,10.60
+2005-11-21,11.18,11.38,10.71,10.82,000,10.82
+2005-11-18,11.19,11.67,10.96,11.12,000,11.12
+2005-11-17,11.92,12.20,11.25,11.25,000,11.25
+2005-11-16,12.22,12.68,12.17,12.26,000,12.26
+2005-11-15,12.16,12.69,11.70,12.23,000,12.23
+2005-11-14,11.99,12.34,11.77,12.18,000,12.18
+2005-11-11,11.82,11.96,11.63,11.63,000,11.63
+2005-11-10,12.68,13.17,11.73,11.90,000,11.90
+2005-11-09,13.14,13.36,12.42,12.80,000,12.80
+2005-11-08,13.61,13.61,13.04,13.08,000,13.08
+2005-11-07,13.11,13.65,12.76,13.10,000,13.10
+2005-11-04,12.88,13.62,12.69,13.17,000,13.17
+2005-11-03,13.12,13.23,12.50,13.00,000,13.00
+2005-11-02,14.99,14.99,13.38,13.48,000,13.48
+2005-11-01,14.85,15.66,14.65,14.85,000,14.85
+2005-10-31,14.04,15.39,13.93,15.32,000,15.32
+2005-10-28,15.45,15.61,14.11,14.25,000,14.25
+2005-10-27,14.73,16.30,14.57,16.02,000,16.02
+2005-10-26,14.80,14.88,13.72,14.59,000,14.59
+2005-10-25,14.96,15.30,14.20,14.53,000,14.53
+2005-10-24,16.18,16.44,14.61,14.74,000,14.74
+2005-10-21,15.53,16.27,15.26,16.13,000,16.13
+2005-10-20,14.18,16.19,13.98,16.11,000,16.11
+2005-10-19,15.63,15.86,13.47,13.50,000,13.50
+2005-10-18,14.92,15.40,14.79,15.33,000,15.33
+2005-10-17,15.30,15.30,14.58,14.67,000,14.67
+2005-10-14,15.99,16.03,14.83,14.87,000,14.87
+2005-10-13,16.32,17.19,15.98,16.47,000,16.47
+2005-10-12,15.56,16.27,15.04,16.22,000,16.22
+2005-10-11,15.35,15.70,15.06,15.63,000,15.63
+2005-10-10,14.93,15.61,14.87,15.55,000,15.55
+2005-10-07,14.56,14.82,14.30,14.59,000,14.59
+2005-10-06,14.53,15.63,14.04,14.96,000,14.96
+2005-10-05,13.15,14.58,12.97,14.55,000,14.55
+2005-10-04,12.50,13.21,12.11,13.20,000,13.20
+2005-10-03,12.37,12.62,11.98,12.46,000,12.46
+2005-09-30,12.42,12.44,11.92,11.92,000,11.92
+2005-09-29,12.92,13.23,12.15,12.24,000,12.24
+2005-09-28,12.60,12.98,12.37,12.63,000,12.63
+2005-09-27,13.06,13.46,12.51,12.76,000,12.76
+2005-09-26,13.27,13.47,12.64,13.04,000,13.04
+2005-09-23,13.64,13.88,12.75,12.96,000,12.96
+2005-09-22,13.85,14.39,13.31,13.33,000,13.33
+2005-09-21,13.07,13.91,12.96,13.79,000,13.79
+2005-09-20,12.23,12.96,11.83,12.64,000,12.64
+2005-09-19,12.17,12.46,12.04,12.14,000,12.14
+2005-09-16,11.89,11.93,11.07,11.22,000,11.22
+2005-09-15,12.72,13.17,12.28,12.49,000,12.49
+2005-09-14,12.79,13.26,12.67,12.91,000,12.91
+2005-09-13,11.76,12.48,11.75,12.39,000,12.39
+2005-09-12,11.66,11.89,11.45,11.65,000,11.65
+2005-09-09,12.46,12.65,11.96,11.98,000,11.98
+2005-09-08,12.72,12.94,12.37,12.93,000,12.93
+2005-09-07,13.06,13.20,12.44,12.52,000,12.52
+2005-09-06,14.17,14.18,12.90,12.93,000,12.93
+2005-09-02,13.21,13.72,13.03,13.57,000,13.57
+2005-09-01,12.86,13.37,12.31,13.15,000,13.15
+2005-08-31,13.37,13.63,12.56,12.60,000,12.60
+2005-08-30,13.49,14.18,13.47,13.65,000,13.65
+2005-08-29,14.34,14.41,13.38,13.52,000,13.52
+2005-08-26,13.79,14.20,13.65,13.72,000,13.72
+2005-08-25,13.92,14.12,13.66,13.73,000,13.73
+2005-08-24,13.56,14.18,13.00,14.17,000,14.17
+2005-08-23,13.63,14.05,13.30,13.34,000,13.34
+2005-08-22,13.67,13.89,13.20,13.42,000,13.42
+2005-08-19,12.84,13.85,12.61,13.42,000,13.42
+2005-08-18,13.47,13.88,13.01,13.42,000,13.42
+2005-08-17,13.35,13.76,12.78,13.30,000,13.30
+2005-08-16,12.37,13.89,12.28,13.52,000,13.52
+2005-08-15,12.87,12.99,12.08,12.26,000,12.26
+2005-08-12,12.36,12.98,12.18,12.74,000,12.74
+2005-08-11,12.34,12.94,11.88,12.42,000,12.42
+2005-08-10,12.03,12.56,11.51,12.38,000,12.38
+2005-08-09,12.25,12.78,12.24,12.40,000,12.40
+2005-08-08,12.56,13.29,12.56,13.21,000,13.21
+2005-08-05,11.82,12.92,11.82,12.48,000,12.48
+2005-08-04,12.12,12.57,11.99,12.52,000,12.52
+2005-08-03,11.90,12.01,11.62,11.83,000,11.83
+2005-08-02,12.00,12.03,11.69,11.75,000,11.75
+2005-08-01,11.75,12.23,11.36,12.08,000,12.08
+2005-07-29,10.24,11.73,10.24,11.57,000,11.57
+2005-07-28,10.40,10.58,10.27,10.52,000,10.52
+2005-07-27,11.03,11.03,10.34,10.36,000,10.36
+2005-07-26,11.11,11.25,10.92,10.99,000,10.99
+2005-07-25,11.12,11.28,10.70,11.10,000,11.10
+2005-07-22,11.01,11.05,10.51,10.52,161600,10.52
+2005-07-21,10.23,11.21,10.23,10.97,161600,10.97
+2005-07-20,10.80,10.94,9.88,10.23,161700,10.23
+2005-07-19,10.63,10.79,10.36,10.45,161600,10.45
+2005-07-18,11.09,11.09,10.77,10.77,111400,10.77
+2005-07-15,10.61,10.90,10.13,10.33,161100,10.33
+2005-07-14,10.87,11.13,10.50,10.81,161600,10.81
+2005-07-13,11.09,11.44,10.80,10.84,161500,10.84
+2005-07-12,11.03,11.37,10.85,10.95,161600,10.95
+2005-07-11,10.96,11.41,10.53,11.28,161500,11.28
+2005-07-08,12.24,12.29,11.09,11.45,161600,11.45
+2005-07-07,13.91,13.92,12.48,12.49,161300,12.49
+2005-07-06,11.67,12.33,11.54,12.27,161600,12.27
+2005-07-05,12.41,12.41,11.53,11.68,161400,11.68
+2005-07-01,11.75,11.92,11.38,11.40,158400,11.40
+2005-06-30,11.72,12.10,11.50,12.04,161600,12.04
+2005-06-29,11.54,11.78,11.44,11.77,161600,11.77
+2005-06-28,12.31,12.31,11.55,11.58,161200,11.58
+2005-06-27,12.73,12.78,12.38,12.52,000,12.52
+2005-06-24,12.27,12.32,11.95,12.18,161600,12.18
+2005-06-23,11.19,12.13,10.96,12.13,161600,12.13
+2005-06-22,10.96,11.31,10.81,11.05,161600,11.05
+2005-06-21,11.52,11.67,11.01,11.08,161600,11.08
+2005-06-20,12.51,12.53,11.31,11.47,161600,11.47
+2005-06-17,10.83,11.64,10.78,11.48,161600,11.48
+2005-06-16,11.24,11.36,11.04,11.15,161600,11.15
+2005-06-15,11.22,11.96,11.05,11.46,161600,11.46
+2005-06-14,11.65,12.02,11.52,11.79,161600,11.79
+2005-06-13,12.12,12.12,11.31,11.65,161600,11.65
+2005-06-10,12.16,12.40,11.90,11.96,158900,11.96
+2005-06-09,12.69,13.07,12.06,12.08,161500,12.08
+2005-06-08,12.05,12.83,12.05,12.70,000,12.70
+2005-06-07,12.22,12.43,11.47,12.39,161300,12.39
+2005-06-06,12.68,13.00,12.21,12.28,161200,12.28
+2005-06-03,11.78,12.49,11.52,12.15,161600,12.15
+2005-06-02,12.35,12.43,11.80,11.84,161600,11.84
+2005-06-01,13.34,13.34,12.17,12.36,161500,12.36
+2005-05-31,12.69,13.45,12.67,13.29,161100,13.29
+2005-05-27,12.06,12.43,12.06,12.15,161600,12.15
+2005-05-26,12.23,12.38,11.65,12.24,161200,12.24
+2005-05-25,12.83,13.11,12.58,12.58,161600,12.58
+2005-05-24,13.12,13.30,12.53,12.69,161600,12.69
+2005-05-23,13.38,13.45,12.75,12.95,161600,12.95
+2005-05-20,13.57,13.73,13.07,13.14,159500,13.14
+2005-05-19,13.35,14.02,13.25,13.32,161600,13.32
+2005-05-18,14.11,14.13,13.30,13.63,000,13.63
+2005-05-17,15.92,16.21,14.45,14.57,161600,14.57
+2005-05-16,16.87,16.87,15.67,15.68,161600,15.68
+2005-05-13,15.88,17.70,15.40,16.32,161600,16.32
+2005-05-12,14.43,16.23,14.16,16.12,161500,16.12
+2005-05-11,14.69,15.80,14.31,14.45,160700,14.45
+2005-05-10,14.05,15.11,14.03,14.91,161600,14.91
+2005-05-09,14.11,14.56,13.53,13.75,161600,13.75
+2005-05-06,13.29,14.06,13.11,14.05,161600,14.05
+2005-05-05,13.48,15.82,13.43,13.98,161600,13.98
+2005-05-04,14.44,15.38,13.70,13.85,161600,13.85
+2005-05-03,15.19,15.31,14.53,14.53,000,14.53
+2005-05-02,15.45,16.01,15.08,15.12,161600,15.12
+2005-04-29,15.75,16.92,15.26,15.31,149200,15.31
+2005-04-28,14.19,16.87,14.19,16.86,161600,16.86
+2005-04-27,14.62,15.93,14.43,14.87,161600,14.87
+2005-04-26,14.27,15.15,14.27,14.91,161600,14.91
+2005-04-25,15.29,15.47,14.60,14.62,161600,14.62
+2005-04-22,14.54,16.32,14.20,15.38,161600,15.38
+2005-04-21,16.22,16.22,14.26,14.41,161600,14.41
+2005-04-20,14.86,17.25,14.52,16.92,160700,16.92
+2005-04-19,15.28,15.97,14.81,14.96,161600,14.96
+2005-04-18,18.33,18.59,16.41,16.56,161600,16.56
+2005-04-15,14.92,18.05,14.71,17.74,161200,17.74
+2005-04-14,13.40,14.60,12.67,14.53,161500,14.53
+2005-04-13,11.68,13.44,11.27,13.31,161600,13.31
+2005-04-12,12.12,12.83,11.20,11.30,000,11.30
+2005-04-11,12.09,12.46,11.82,11.98,161600,11.98
+2005-04-08,12.06,12.65,11.52,12.62,161600,12.62
+2005-04-07,12.92,12.96,12.30,12.33,161600,12.33
+2005-04-06,13.75,13.76,12.89,13.15,161500,13.15
+2005-04-05,14.10,14.11,13.66,13.68,161600,13.68
+2005-04-04,14.53,14.76,13.96,14.11,161600,14.11
+2005-04-01,13.64,14.38,12.92,14.09,160900,14.09
+2005-03-31,13.71,14.10,13.57,14.02,160900,14.02
+2005-03-30,14.47,14.47,13.64,13.64,161600,13.64
+2005-03-29,13.96,14.68,13.38,14.49,161600,14.49
+2005-03-28,14.01,14.01,13.44,13.75,161500,13.75
+2005-03-24,13.86,13.88,12.97,13.42,161600,13.42
+2005-03-23,14.61,14.89,13.88,14.06,161600,14.06
+2005-03-22,13.76,14.28,13.15,14.27,161600,14.27
+2005-03-21,13.62,13.98,13.33,13.61,161600,13.61
+2005-03-18,13.65,13.67,13.08,13.14,161600,13.14
+2005-03-17,13.25,13.67,13.20,13.29,161600,13.29
+2005-03-16,13.30,13.81,13.19,13.49,161600,13.49
+2005-03-15,12.44,13.22,12.33,13.15,161600,13.15
+2005-03-14,12.82,12.99,12.36,12.39,161600,12.39
+2005-03-11,12.29,12.98,12.11,12.80,161600,12.80
+2005-03-10,12.62,12.97,12.42,12.49,160400,12.49
+2005-03-09,12.23,12.72,12.20,12.70,161600,12.70
+2005-03-08,12.06,12.50,11.95,12.40,161500,12.40
+2005-03-07,12.36,12.60,12.05,12.26,161600,12.26
+2005-03-04,12.49,12.50,11.94,11.94,161600,11.94
+2005-03-03,12.28,13.07,12.23,12.93,161600,12.93
+2005-03-02,12.88,12.91,12.20,12.50,161400,12.50
+2005-03-01,11.95,12.10,11.66,12.04,161400,12.04
+2005-02-28,11.89,12.50,11.73,12.08,161600,12.08
+2005-02-25,11.75,11.78,10.92,11.49,159000,11.49
+2005-02-24,12.51,12.51,11.48,11.57,161600,11.57
+2005-02-23,12.94,12.94,12.30,12.39,161500,12.39
+2005-02-22,12.18,13.20,12.09,13.14,161600,13.14
+2005-02-18,11.99,12.12,11.18,11.18,161400,11.18
+2005-02-17,11.25,11.91,11.21,11.77,161500,11.77
+2005-02-16,11.40,11.50,11.03,11.10,161600,11.10
+2005-02-15,11.57,11.76,11.13,11.27,161600,11.27
+2005-02-14,11.28,11.86,11.18,11.52,161400,11.52
+2005-02-11,11.64,11.82,11.25,11.43,161600,11.43
+2005-02-10,11.98,11.99,11.38,11.51,161500,11.51
+2005-02-09,11.52,12.02,11.41,12.00,161600,12.00
+2005-02-08,11.66,11.67,11.45,11.60,161600,11.60
+2005-02-07,11.53,11.75,11.36,11.73,161500,11.73
+2005-02-04,11.97,11.97,10.90,11.21,161600,11.21
+2005-02-03,12.03,12.12,11.72,11.79,161500,11.79
+2005-02-02,12.01,12.06,11.52,11.66,161600,11.66
+2005-02-01,12.80,13.02,12.02,12.03,000,12.03
+2005-01-31,13.63,13.63,12.79,12.82,161600,12.82
+2005-01-28,13.15,13.56,12.83,13.24,160800,13.24
+2005-01-27,13.50,13.57,12.96,13.24,159600,13.24
+2005-01-26,13.84,13.84,13.06,13.44,000,13.44
+2005-01-25,14.34,14.36,13.88,14.06,000,14.06
+2005-01-24,14.38,14.75,14.17,14.65,000,14.65
+2005-01-21,13.75,14.46,13.40,14.36,1000,14.36
+2005-01-20,13.37,14.11,13.28,13.83,000,13.83
+2005-01-19,12.47,13.21,12.41,13.18,000,13.18
+2005-01-18,13.13,13.15,12.30,12.47,000,12.47
+2005-01-14,12.68,12.82,12.29,12.43,000,12.43
+2005-01-13,12.70,12.86,12.37,12.84,000,12.84
+2005-01-12,13.94,13.94,12.54,12.56,000,12.56
+2005-01-11,13.44,13.68,13.05,13.19,000,13.19
+2005-01-10,13.92,13.93,12.94,13.23,000,13.23
+2005-01-07,13.47,13.51,12.94,13.49,000,13.49
+2005-01-06,14.09,14.09,13.33,13.58,000,13.58
+2005-01-05,13.98,14.09,13.26,14.09,000,14.09
+2005-01-04,14.01,14.45,13.93,13.98,000,13.98
+2005-01-03,13.39,14.23,13.25,14.08,000,14.08
+2004-12-31,12.42,13.29,12.42,13.29,000,13.29
+2004-12-30,12.25,12.61,12.18,12.56,000,12.56
+2004-12-29,11.61,11.79,11.61,11.62,000,11.62
+2004-12-28,12.25,12.40,11.97,12.00,000,12.00
+2004-12-27,11.53,12.16,11.53,12.14,000,12.14
+2004-12-23,11.41,11.64,11.14,11.23,000,11.23
+2004-12-22,11.42,11.71,11.37,11.45,000,11.45
+2004-12-21,11.78,12.00,11.37,11.55,000,11.55
+2004-12-20,12.26,12.34,11.77,11.83,000,11.83
+2004-12-17,12.34,12.75,11.87,11.95,000,11.95
+2004-12-16,12.34,12.59,11.96,12.27,000,12.27
+2004-12-15,12.41,12.88,12.23,12.35,000,12.35
+2004-12-14,12.55,12.97,12.21,12.73,000,12.73
+2004-12-13,12.37,12.61,12.13,12.54,000,12.54
+2004-12-10,13.05,13.15,12.68,12.76,000,12.76
+2004-12-09,13.52,13.71,12.77,12.88,000,12.88
+2004-12-08,13.52,13.68,13.18,13.19,000,13.19
+2004-12-07,13.07,13.74,12.96,13.67,000,13.67
+2004-12-06,12.95,13.40,12.93,13.19,1300,13.19
+2004-12-03,13.02,13.06,12.40,12.96,000,12.96
+2004-12-02,12.97,13.04,12.72,12.98,000,12.98
+2004-12-01,13.10,13.12,12.77,12.97,000,12.97
+2004-11-30,13.27,13.38,13.07,13.24,1300,13.24
+2004-11-29,12.99,13.69,12.93,13.30,000,13.30
+2004-11-26,12.76,12.90,12.59,12.78,000,12.78
+2004-11-24,12.58,12.89,12.56,12.72,000,12.72
+2004-11-23,12.78,12.91,12.57,12.67,000,12.67
+2004-11-22,13.71,13.71,12.94,12.97,000,12.97
+2004-11-19,12.79,13.83,12.77,13.50,000,13.50
+2004-11-18,13.22,13.29,12.96,12.98,000,12.98
+2004-11-17,13.20,13.39,12.77,13.21,000,13.21
+2004-11-16,13.41,13.67,13.20,13.21,000,13.21
+2004-11-15,14.05,14.06,13.25,13.38,000,13.38
+2004-11-12,13.24,13.48,13.04,13.33,000,13.33
+2004-11-11,13.11,13.12,12.64,13.04,1300,13.04
+2004-11-10,13.16,13.51,12.79,13.08,000,13.08
+2004-11-09,12.89,13.96,12.89,13.61,000,13.61
+2004-11-08,14.11,14.48,13.68,13.80,000,13.80
+2004-11-05,13.67,14.10,13.23,13.84,000,13.84
+2004-11-04,13.83,14.02,12.95,13.97,000,13.97
+2004-11-03,15.05,15.18,13.79,14.04,000,14.04
+2004-11-02,15.99,16.32,15.21,16.18,000,16.18
+2004-11-01,16.43,16.76,16.18,16.27,000,16.27
+2004-10-29,15.83,16.29,14.96,16.27,000,16.27
+2004-10-28,16.02,16.05,15.36,15.39,000,15.39
+2004-10-27,16.48,16.53,15.66,15.72,000,15.72
+2004-10-26,16.72,16.87,15.97,16.39,000,16.39
+2004-10-25,16.07,16.71,16.02,16.58,000,16.58
+2004-10-22,14.59,15.41,14.31,15.28,000,15.28
+2004-10-21,14.98,15.19,14.28,14.54,000,14.54
+2004-10-20,15.46,15.53,14.80,14.85,1200,14.85
+2004-10-19,16.32,16.32,14.32,15.13,000,15.13
+2004-10-18,16.16,16.16,14.64,14.71,000,14.71
+2004-10-15,16.28,16.49,14.72,15.04,000,15.04
+2004-10-14,15.22,16.56,15.22,16.43,000,16.43
+2004-10-13,13.92,15.63,13.92,15.42,000,15.42
+2004-10-12,15.21,15.69,14.91,15.05,000,15.05
+2004-10-11,14.69,15.27,14.28,14.71,000,14.71
+2004-10-08,14.70,15.52,13.78,15.05,000,15.05
+2004-10-07,13.33,14.66,13.32,14.50,000,14.50
+2004-10-06,14.01,14.10,13.24,13.28,000,13.28
+2004-10-05,13.51,14.19,13.51,13.95,000,13.95
+2004-10-04,13.05,13.45,12.99,13.41,000,13.41
+2004-10-01,13.11,13.11,12.60,12.75,000,12.75
+2004-09-30,13.49,13.67,13.20,13.34,000,13.34
+2004-09-29,14.09,14.14,13.20,13.21,000,13.21
+2004-09-28,14.73,14.84,13.69,13.83,000,13.83
+2004-09-27,14.86,15.09,14.55,14.62,000,14.62
+2004-09-24,14.93,14.94,14.08,14.28,000,14.28
+2004-09-23,14.85,15.08,14.61,14.80,000,14.80
+2004-09-22,15.28,15.30,13.95,14.74,000,14.74
+2004-09-21,15.98,15.98,13.38,13.66,000,13.66
+2004-09-20,13.98,15.29,13.98,14.43,000,14.43
+2004-09-17,14.11,14.43,13.93,14.03,000,14.03
+2004-09-16,14.29,14.66,14.27,14.39,000,14.39
+2004-09-15,13.88,14.67,13.68,14.64,000,14.64
+2004-09-14,13.50,13.89,13.50,13.56,000,13.56
+2004-09-13,13.64,13.78,13.16,13.17,000,13.17
+2004-09-10,13.90,14.23,13.69,13.76,000,13.76
+2004-09-09,14.12,14.41,13.70,14.01,000,14.01
+2004-09-08,14.16,14.31,13.88,14.06,000,14.06
+2004-09-07,14.52,14.64,14.03,14.07,1400,14.07
+2004-09-03,14.36,14.38,13.79,13.91,1500,13.91
+2004-09-02,14.97,15.05,14.18,14.28,000,14.28
+2004-09-01,15.39,15.39,14.72,14.91,000,14.91
+2004-08-31,15.64,15.85,15.28,15.29,000,15.29
+2004-08-30,15.35,15.58,15.30,15.44,000,15.44
+2004-08-27,14.91,15.02,14.67,14.71,000,14.71
+2004-08-26,15.22,15.22,14.76,14.91,000,14.91
+2004-08-25,15.40,15.76,14.81,14.98,000,14.98
+2004-08-24,15.63,15.81,15.33,15.33,000,15.33
+2004-08-23,16.68,16.71,15.79,15.88,000,15.88
+2004-08-20,16.99,17.04,15.78,16.00,000,16.00
+2004-08-19,16.54,17.55,16.31,16.96,000,16.96
+2004-08-18,17.55,17.55,16.13,16.23,1400,16.23
+2004-08-17,16.58,17.28,16.16,17.02,000,17.02
+2004-08-16,19.28,19.28,17.42,17.57,1500,17.57
+2004-08-13,18.91,19.25,17.97,17.98,000,17.98
+2004-08-12,18.61,19.30,18.36,19.08,000,19.08
+2004-08-11,18.15,18.49,17.84,18.04,000,18.04
+2004-08-10,18.80,18.86,17.25,17.47,000,17.47
+2004-08-09,19.97,19.97,18.63,18.89,000,18.89
+2004-08-06,18.21,19.68,18.18,19.34,000,19.34
+2004-08-05,16.19,18.41,16.17,18.32,000,18.32
+2004-08-04,16.33,16.65,15.82,16.21,000,16.21
+2004-08-03,15.56,16.05,15.28,16.03,000,16.03
+2004-08-02,16.42,16.58,15.22,15.37,000,15.37
+2004-07-30,15.85,15.89,15.27,15.32,000,15.32
+2004-07-29,16.00,16.12,15.42,15.68,000,15.68
+2004-07-28,16.77,17.41,15.94,16.15,000,16.15
+2004-07-27,17.24,17.34,16.30,16.55,000,16.55
+2004-07-26,17.22,17.93,16.98,17.30,000,17.30
+2004-07-23,15.82,16.94,15.82,16.50,000,16.50
+2004-07-22,16.65,17.10,15.29,15.75,000,15.75
+2004-07-21,14.00,16.46,13.91,16.41,000,16.41
+2004-07-20,15.53,15.57,13.98,14.17,000,14.17
+2004-07-19,15.17,15.83,14.86,15.17,000,15.17
+2004-07-16,14.27,14.58,13.95,14.34,000,14.34
+2004-07-15,13.94,14.73,13.60,14.71,000,14.71
+2004-07-14,14.90,16.59,13.34,13.76,000,13.76
+2004-07-13,14.86,15.08,14.28,14.46,000,14.46
+2004-07-12,15.25,15.61,14.61,14.96,000,14.96
+2004-07-09,16.01,16.03,15.71,15.78,000,15.78
+2004-07-08,15.86,16.36,15.50,16.20,000,16.20
+2004-07-07,16.36,16.47,15.59,15.81,000,15.81
+2004-07-06,16.25,16.75,16.13,16.25,000,16.25
+2004-07-02,15.23,15.45,14.80,15.08,000,15.08
+2004-07-01,14.74,15.57,14.41,15.20,000,15.20
+2004-06-30,15.27,15.73,14.25,14.34,000,14.34
+2004-06-29,15.22,16.28,15.22,15.47,000,15.47
+2004-06-28,15.28,16.13,15.19,16.07,000,16.07
+2004-06-25,14.78,15.29,14.47,15.19,000,15.19
+2004-06-24,14.39,14.97,14.16,14.81,000,14.81
+2004-06-23,14.60,14.82,13.75,13.98,000,13.98
+2004-06-22,15.44,15.64,14.31,14.31,000,14.31
+2004-06-21,15.61,15.62,14.96,15.26,000,15.26
+2004-06-18,14.74,15.25,14.51,14.99,000,14.99
+2004-06-17,15.06,15.58,15.00,15.15,000,15.15
+2004-06-16,14.83,15.22,14.48,14.79,000,14.79
+2004-06-15,15.34,15.35,14.72,15.05,000,15.05
+2004-06-14,15.54,16.36,15.54,16.07,000,16.07
+2004-06-10,15.33,15.35,14.92,15.04,000,15.04
+2004-06-09,14.56,15.46,14.56,15.39,000,15.39
+2004-06-08,15.79,15.88,15.00,15.01,000,15.01
+2004-06-07,16.60,16.70,15.33,15.39,1600,15.39
+2004-06-04,16.24,16.90,15.82,16.78,000,16.78
+2004-06-03,16.43,17.04,16.16,17.03,000,17.03
+2004-06-02,16.05,16.70,15.95,16.08,000,16.08
+2004-06-01,16.60,16.96,16.19,16.30,000,16.30
+2004-05-28,15.44,15.65,15.39,15.50,000,15.50
+2004-05-27,15.74,15.86,15.19,15.28,000,15.28
+2004-05-26,16.09,16.30,15.78,15.97,000,15.97
+2004-05-25,18.41,18.42,15.73,15.96,000,15.96
+2004-05-24,18.79,18.82,17.96,18.08,000,18.08
+2004-05-21,18.73,18.74,18.00,18.49,000,18.49
+2004-05-20,18.60,19.25,18.55,18.67,000,18.67
+2004-05-19,18.48,18.93,17.58,18.93,000,18.93
+2004-05-18,19.60,19.70,19.14,19.33,000,19.33
+2004-05-17,19.70,20.45,19.65,19.96,000,19.96
+2004-05-14,18.66,19.27,18.06,18.47,000,18.47
+2004-05-13,18.78,18.92,17.97,18.86,000,18.86
+2004-05-12,18.79,20.41,18.14,18.14,1400,18.14
+2004-05-11,19.23,19.28,17.94,18.57,000,18.57
+2004-05-10,19.44,20.20,18.99,19.77,000,19.77
+2004-05-07,17.22,18.17,16.44,18.13,000,18.13
+2004-05-06,16.45,17.67,16.45,17.05,000,17.05
+2004-05-05,16.43,16.55,15.64,15.77,000,15.77
+2004-05-04,16.80,17.13,15.97,16.55,000,16.55
+2004-05-03,17.69,17.72,16.61,16.62,000,16.62
+2004-04-30,16.27,17.23,16.14,17.19,000,17.19
+2004-04-29,16.36,17.27,15.87,16.60,000,16.60
+2004-04-28,15.55,16.54,15.55,16.29,000,16.29
+2004-04-27,15.05,15.17,14.37,15.07,000,15.07
+2004-04-26,14.75,15.22,14.39,14.77,1600,14.77
+2004-04-23,14.42,14.56,13.89,14.01,000,14.01
+2004-04-22,15.89,15.98,13.86,14.61,000,14.61
+2004-04-21,16.61,16.94,15.55,15.60,000,15.60
+2004-04-20,15.24,16.72,14.79,16.67,000,16.67
+2004-04-19,15.73,16.08,15.33,15.42,000,15.42
+2004-04-16,15.59,15.69,14.77,14.94,1500,14.94
+2004-04-15,16.02,16.78,15.22,15.74,000,15.74
+2004-04-14,17.29,17.71,15.60,15.62,000,15.62
+2004-04-13,15.29,17.98,15.29,17.26,000,17.26
+2004-04-12,15.71,16.12,15.00,15.28,000,15.28
+2004-04-08,14.96,16.82,14.96,16.26,000,16.26
+2004-04-07,15.41,16.36,15.34,15.76,000,15.76
+2004-04-06,15.35,15.53,15.07,15.32,000,15.32
+2004-04-05,16.17,16.64,14.81,14.97,1700,14.97
+2004-04-02,15.21,16.55,15.21,15.64,000,15.64
+2004-04-01,16.76,17.25,16.65,16.65,000,16.65
+2004-03-31,16.33,16.96,16.23,16.74,000,16.74
+2004-03-30,16.68,16.80,16.13,16.28,000,16.28
+2004-03-29,17.11,17.17,16.29,16.50,000,16.50
+2004-03-26,18.19,18.23,16.67,17.33,000,17.33
+2004-03-25,19.58,19.58,17.61,17.88,000,17.88
+2004-03-24,20.24,20.83,19.45,19.81,000,19.81
+2004-03-23,21.06,21.33,20.01,20.67,000,20.67
+2004-03-22,20.61,22.67,20.61,21.58,000,21.58
+2004-03-19,17.98,19.25,17.89,19.15,000,19.15
+2004-03-18,18.38,19.23,18.35,18.53,000,18.53
+2004-03-17,19.54,19.55,17.98,18.11,000,18.11
+2004-03-16,20.27,20.94,19.86,20.34,000,20.34
+2004-03-15,18.98,21.39,18.86,21.13,000,21.13
+2004-03-12,19.94,20.08,18.06,18.30,000,18.30
+2004-03-11,18.81,20.69,17.63,20.67,000,20.67
+2004-03-10,16.12,18.70,16.11,18.67,000,18.67
+2004-03-09,15.57,16.74,15.56,16.60,000,16.60
+2004-03-08,14.83,15.83,14.54,15.79,000,15.79
+2004-03-05,14.81,14.82,13.83,14.48,000,14.48
+2004-03-04,14.45,14.50,14.19,14.40,000,14.40
+2004-03-03,14.73,15.27,14.47,14.55,000,14.55
+2004-03-02,14.59,14.89,14.18,14.86,000,14.86
+2004-03-01,14.91,15.05,14.40,14.44,000,14.44
+2004-02-27,13.80,14.77,13.80,14.55,000,14.55
+2004-02-26,15.32,15.33,14.69,14.83,000,14.83
+2004-02-25,15.58,16.05,14.93,14.93,000,14.93
+2004-02-24,16.38,16.76,15.77,15.90,000,15.90
+2004-02-23,16.50,16.78,16.25,16.29,000,16.29
+2004-02-20,15.85,16.55,15.82,16.04,000,16.04
+2004-02-19,15.33,15.97,15.20,15.80,000,15.80
+2004-02-18,15.51,15.76,15.30,15.59,000,15.59
+2004-02-17,15.63,15.96,15.32,15.40,000,15.40
+2004-02-13,15.12,16.03,14.86,15.58,000,15.58
+2004-02-12,15.36,15.72,15.23,15.31,000,15.31
+2004-02-11,15.90,16.16,15.26,15.39,1600,15.39
+2004-02-10,16.41,16.76,15.84,15.94,000,15.94
+2004-02-09,16.54,16.82,16.12,16.39,000,16.39
+2004-02-06,17.71,17.71,15.94,16.00,000,16.00
+2004-02-05,17.91,17.99,17.60,17.71,000,17.71
+2004-02-04,17.84,18.06,17.46,17.87,000,17.87
+2004-02-03,17.29,17.78,17.17,17.34,000,17.34
+2004-02-02,17.45,17.56,16.67,17.11,000,17.11
+2004-01-30,16.55,17.35,16.55,16.63,000,16.63
+2004-01-29,16.88,17.66,16.79,17.14,000,17.14
+2004-01-28,15.37,17.06,15.29,16.78,000,16.78
+2004-01-27,15.28,15.44,14.74,15.35,000,15.35
+2004-01-26,15.78,15.78,14.52,14.55,000,14.55
+2004-01-23,14.73,15.05,14.56,14.84,000,14.84
+2004-01-22,14.20,14.87,14.01,14.71,000,14.71
+2004-01-21,15.63,15.63,14.24,14.34,000,14.34
+2004-01-20,15.77,16.13,15.09,15.21,000,15.21
+2004-01-16,15.40,15.44,14.90,15.00,000,15.00
+2004-01-15,17.07,17.31,15.49,15.56,000,15.56
+2004-01-14,17.29,17.30,16.40,16.75,000,16.75
+2004-01-13,16.60,18.33,16.53,18.04,000,18.04
+2004-01-12,17.32,17.46,16.79,16.82,000,16.82
+2004-01-09,16.15,16.88,15.57,16.75,000,16.75
+2004-01-08,15.42,15.68,15.32,15.61,000,15.61
+2004-01-07,16.72,16.75,15.50,15.50,000,15.50
+2004-01-06,17.66,17.67,16.19,16.73,000,16.73
+2004-01-05,18.45,18.49,17.44,17.49,000,17.49
+2004-01-02,17.96,18.68,17.54,18.22,000,18.22
+2003-12-31,17.49,18.86,17.41,18.31,000,18.31
+2003-12-30,17.32,17.97,17.20,17.68,000,17.68
+2003-12-29,17.81,17.86,17.07,17.09,000,17.09
+2003-12-26,16.76,17.49,16.63,17.45,000,17.45
+2003-12-24,16.65,16.77,16.24,16.66,000,16.66
+2003-12-23,17.32,17.40,16.29,16.49,000,16.49
+2003-12-22,17.06,17.31,16.63,16.94,000,16.94
+2003-12-19,16.66,16.81,15.71,16.42,000,16.42
+2003-12-18,15.59,16.19,14.66,16.16,000,16.16
+2003-12-17,16.12,16.27,15.52,15.58,000,15.58
+2003-12-16,17.27,17.42,15.90,15.93,000,15.93
+2003-12-15,15.80,17.42,15.79,17.23,000,17.23
+2003-12-12,16.19,16.98,16.09,16.41,000,16.41
+2003-12-11,17.95,17.95,16.51,16.73,000,16.73
+2003-12-10,17.66,18.27,17.58,17.87,000,17.87
+2003-12-09,16.63,17.80,16.56,17.63,000,17.63
+2003-12-08,17.55,17.59,16.52,16.54,000,16.54
+2003-12-05,16.76,17.32,16.50,17.09,000,17.09
+2003-12-04,16.48,16.83,16.29,16.30,000,16.30
+2003-12-03,16.08,16.68,15.77,16.63,000,16.63
+2003-12-02,16.89,16.89,16.17,16.27,000,16.27
+2003-12-01,16.74,17.00,16.17,16.77,000,16.77
+2003-11-28,16.51,16.62,16.16,16.32,000,16.32
+2003-11-26,16.11,17.26,16.02,16.23,000,16.23
+2003-11-25,17.40,17.87,16.40,16.71,000,16.71
+2003-11-24,18.91,18.98,17.19,17.44,000,17.44
+2003-11-21,19.10,19.40,18.82,18.98,000,18.98
+2003-11-20,19.09,19.61,18.46,19.48,000,19.48
+2003-11-19,19.14,19.51,18.65,18.80,000,18.80
+2003-11-18,18.09,19.17,17.78,19.11,000,19.11
+2003-11-17,18.14,19.36,18.04,18.60,000,18.60
+2003-11-14,16.63,17.00,16.17,16.94,000,16.94
+2003-11-13,17.05,17.12,16.43,16.47,000,16.47
+2003-11-12,17.78,17.85,16.55,16.75,000,16.75
+2003-11-11,18.14,18.53,17.50,17.54,000,17.54
+2003-11-10,17.79,17.88,17.53,17.62,1600,17.62
+2003-11-07,16.63,16.93,16.50,16.93,000,16.93
+2003-11-06,17.00,17.37,16.62,16.74,1600,16.74
+2003-11-05,16.99,17.32,16.55,16.86,000,16.86
+2003-11-04,16.57,16.78,16.45,16.55,000,16.55
+2003-11-03,16.33,16.70,16.22,16.55,000,16.55
+2003-10-31,16.11,16.18,15.79,16.10,000,16.10
+2003-10-30,18.45,18.45,16.01,16.33,000,16.33
+2003-10-29,16.85,17.02,16.34,16.43,000,16.43
+2003-10-28,17.79,17.89,16.77,16.82,000,16.82
+2003-10-27,17.97,18.18,17.74,18.05,000,18.05
+2003-10-24,18.25,18.68,17.67,17.71,000,17.71
+2003-10-23,18.51,18.51,17.48,17.68,000,17.68
+2003-10-22,17.10,17.98,17.10,17.67,000,17.67
+2003-10-21,17.16,17.20,16.19,16.55,000,16.55
+2003-10-20,17.84,18.07,17.04,17.04,000,17.04
+2003-10-17,16.97,17.85,16.97,17.62,000,17.62
+2003-10-16,17.58,18.05,16.86,17.19,1600,17.19
+2003-10-15,17.73,17.96,17.10,17.69,000,17.69
+2003-10-14,17.40,17.79,17.20,17.37,000,17.37
+2003-10-13,17.67,17.91,17.42,17.55,000,17.55
+2003-10-10,18.92,18.92,18.42,18.45,000,18.45
+2003-10-09,18.53,19.28,18.26,18.82,000,18.82
+2003-10-08,19.31,19.61,19.08,19.18,000,19.18
+2003-10-07,20.11,20.14,19.40,19.41,000,19.41
+2003-10-06,20.69,20.69,19.45,19.51,000,19.51
+2003-10-03,19.94,20.09,18.95,19.50,000,19.50
+2003-10-02,21.23,21.44,20.71,20.80,000,20.80
+2003-10-01,22.81,22.82,20.99,21.07,000,21.07
+2003-09-30,22.04,23.26,22.03,22.72,000,22.72
+2003-09-29,22.85,22.85,21.64,21.67,000,21.67
+2003-09-26,22.28,22.73,21.85,22.23,000,22.23
+2003-09-25,21.11,22.27,21.04,22.26,000,22.26
+2003-09-24,19.53,21.26,19.44,21.22,000,21.22
+2003-09-23,19.91,19.97,19.31,19.47,000,19.47
+2003-09-22,19.08,20.03,19.03,19.65,000,19.65
+2003-09-19,17.54,17.54,17.54,17.54,000,17.54
+2003-09-18,17.57,17.57,17.57,17.57,000,17.57
+2003-09-17,18.15,18.15,18.15,18.15,000,18.15
+2003-09-16,18.03,18.03,18.03,18.03,000,18.03
+2003-09-15,19.28,19.28,19.28,19.28,000,19.28
+2003-09-12,18.68,18.68,18.68,18.68,000,18.68
+2003-09-11,19.25,19.25,19.25,19.25,000,19.25
+2003-09-10,20.01,20.01,20.01,20.01,000,20.01
+2003-09-09,18.85,18.85,18.85,18.85,000,18.85
+2003-09-08,18.26,18.26,18.26,18.26,000,18.26
+2003-09-05,18.17,18.17,18.17,18.17,000,18.17
+2003-09-04,18.71,18.71,18.71,18.71,000,18.71
+2003-09-03,19.44,19.44,19.44,19.44,000,19.44
+2003-09-02,19.02,19.02,19.02,19.02,000,19.02
+2003-08-29,18.63,18.63,18.63,18.63,000,18.63
+2003-08-28,18.48,18.48,18.48,18.48,000,18.48
+2003-08-27,19.13,19.13,19.13,19.13,000,19.13
+2003-08-26,19.49,19.49,19.49,19.49,000,19.49
+2003-08-25,19.53,19.53,19.53,19.53,000,19.53
+2003-08-22,18.55,18.55,18.55,18.55,000,18.55
+2003-08-21,17.84,17.84,17.84,17.84,000,17.84
+2003-08-20,17.82,17.82,17.82,17.82,000,17.82
+2003-08-19,17.86,17.86,17.86,17.86,000,17.86
+2003-08-18,18.18,18.18,18.18,18.18,000,18.18
+2003-08-15,18.27,18.27,18.27,18.27,000,18.27
+2003-08-14,18.47,18.47,18.47,18.47,000,18.47
+2003-08-13,18.77,18.77,18.77,18.77,000,18.77
+2003-08-12,17.94,17.94,17.94,17.94,000,17.94
+2003-08-11,19.75,19.75,19.75,19.75,000,19.75
+2003-08-08,19.59,19.59,19.59,19.59,000,19.59
+2003-08-07,20.26,20.26,20.26,20.26,000,20.26
+2003-08-06,21.50,21.50,21.50,21.50,000,21.50
+2003-08-05,22.68,22.68,22.68,22.68,000,22.68
+2003-08-04,21.27,21.27,21.27,21.27,000,21.27
+2003-08-01,20.75,20.75,20.75,20.75,000,20.75
+2003-07-31,19.49,19.49,19.49,19.49,000,19.49
+2003-07-30,18.85,18.85,18.85,18.85,000,18.85
+2003-07-29,18.67,18.67,18.67,18.67,000,18.67
+2003-07-28,18.36,18.36,18.36,18.36,000,18.36
+2003-07-25,17.75,17.75,17.75,17.75,000,17.75
+2003-07-24,18.60,18.60,18.60,18.60,000,18.60
+2003-07-23,18.64,18.64,18.64,18.64,000,18.64
+2003-07-22,19.17,19.17,19.17,19.17,000,19.17
+2003-07-21,19.78,19.78,19.78,19.78,000,19.78
+2003-07-18,19.11,19.11,19.11,19.11,000,19.11
+2003-07-17,20.22,20.22,20.22,20.22,000,20.22
+2003-07-16,19.76,19.76,19.76,19.76,000,19.76
+2003-07-15,19.55,19.55,19.55,19.55,000,19.55
+2003-07-14,19.59,19.59,19.59,19.59,000,19.59
+2003-07-11,18.47,18.47,18.47,18.47,000,18.47
+2003-07-10,19.19,19.19,19.19,19.19,000,19.19
+2003-07-09,18.93,18.93,18.93,18.93,000,18.93
+2003-07-08,19.48,19.48,19.48,19.48,000,19.48
+2003-07-07,20.06,20.06,20.06,20.06,000,20.06
+2003-07-03,19.39,19.39,19.39,19.39,000,19.39
+2003-07-02,19.03,19.03,19.03,19.03,000,19.03
+2003-07-01,19.46,19.46,19.46,19.46,000,19.46
+2003-06-30,19.52,19.52,19.52,19.52,000,19.52
+2003-06-27,19.16,19.16,19.16,19.16,000,19.16
+2003-06-26,19.40,19.40,19.40,19.40,000,19.40
+2003-06-25,20.81,20.81,20.81,20.81,000,20.81
+2003-06-24,20.75,20.75,20.75,20.75,000,20.75
+2003-06-23,20.58,20.58,20.58,20.58,000,20.58
+2003-06-20,19.14,19.14,19.14,19.14,000,19.14
+2003-06-19,19.80,19.80,19.80,19.80,000,19.80
+2003-06-18,19.76,19.76,19.76,19.76,000,19.76
+2003-06-17,20.01,20.01,20.01,20.01,000,20.01
+2003-06-16,20.22,20.22,20.22,20.22,000,20.22
+2003-06-13,20.66,20.66,20.66,20.66,000,20.66
+2003-06-12,20.41,20.41,20.41,20.41,000,20.41
+2003-06-11,20.21,20.21,20.21,20.21,000,20.21
+2003-06-10,20.64,20.64,20.64,20.64,000,20.64
+2003-06-09,22.15,22.15,22.15,22.15,000,22.15
+2003-06-06,21.25,21.25,21.25,21.25,000,21.25
+2003-06-05,20.83,20.83,20.83,20.83,000,20.83
+2003-06-04,20.62,20.62,20.62,20.62,000,20.62
+2003-06-03,20.84,20.84,20.84,20.84,000,20.84
+2003-06-02,20.85,20.85,20.85,20.85,000,20.85
+2003-05-30,19.47,19.47,19.47,19.47,000,19.47
+2003-05-29,20.43,20.43,20.43,20.43,000,20.43
+2003-05-28,20.03,20.03,20.03,20.03,000,20.03
+2003-05-27,19.99,19.99,19.99,19.99,000,19.99
+2003-05-23,19.17,19.17,19.17,19.17,000,19.17
+2003-05-22,19.78,19.78,19.78,19.78,000,19.78
+2003-05-21,21.21,21.21,21.21,21.21,000,21.21
+2003-05-20,21.29,21.29,21.29,21.29,000,21.29
+2003-05-19,20.51,20.51,20.51,20.51,000,20.51
+2003-05-16,18.40,18.40,18.40,18.40,000,18.40
+2003-05-15,19.24,19.24,19.24,19.24,000,19.24
+2003-05-14,20.00,20.00,20.00,20.00,000,20.00
+2003-05-13,19.91,19.91,19.91,19.91,000,19.91
+2003-05-12,19.52,19.52,19.52,19.52,000,19.52
+2003-05-09,19.69,19.69,19.69,19.69,000,19.69
+2003-05-08,21.24,21.24,21.24,21.24,000,21.24
+2003-05-07,21.00,21.00,21.00,21.00,000,21.00
+2003-05-06,20.80,20.80,20.80,20.80,000,20.80
+2003-05-05,21.13,21.13,21.13,21.13,000,21.13
+2003-05-02,20.63,20.63,20.63,20.63,000,20.63
+2003-05-01,21.59,21.59,21.59,21.59,000,21.59
+2003-04-30,21.21,21.21,21.21,21.21,000,21.21
+2003-04-29,20.76,20.76,20.76,20.76,000,20.76
+2003-04-28,20.84,20.84,20.84,20.84,000,20.84
+2003-04-25,20.80,20.80,20.80,20.80,000,20.80
+2003-04-24,20.33,20.33,20.33,20.33,000,20.33
+2003-04-23,20.80,20.80,20.80,20.80,000,20.80
+2003-04-22,20.70,20.70,20.70,20.70,000,20.70
+2003-04-21,21.95,21.95,21.95,21.95,000,21.95
+2003-04-17,21.50,21.50,21.50,21.50,000,21.50
+2003-04-16,22.52,22.52,22.52,22.52,000,22.52
+2003-04-15,22.56,22.56,22.56,22.56,000,22.56
+2003-04-14,23.41,23.41,23.41,23.41,000,23.41
+2003-04-11,24.44,24.44,24.44,24.44,000,24.44
+2003-04-10,25.60,25.60,25.60,25.60,000,25.60
+2003-04-09,27.11,27.11,27.11,27.11,000,27.11
+2003-04-08,27.13,27.13,27.13,27.13,000,27.13
+2003-04-07,28.45,28.45,28.45,28.45,000,28.45
+2003-04-04,29.13,29.13,29.13,29.13,000,29.13
+2003-04-03,28.21,28.21,28.21,28.21,000,28.21
+2003-04-02,28.02,28.02,28.02,28.02,000,28.02
+2003-04-01,28.36,28.36,28.36,28.36,000,28.36
+2003-03-31,29.15,29.15,29.15,29.15,000,29.15
+2003-03-28,27.75,27.75,27.75,27.75,000,27.75
+2003-03-27,27.96,27.96,27.96,27.96,000,27.96
+2003-03-26,28.23,28.23,28.23,28.23,000,28.23
+2003-03-25,28.75,28.75,28.75,28.75,000,28.75
+2003-03-24,30.39,30.39,30.39,30.39,000,30.39
+2003-03-21,28.67,28.67,28.67,28.67,000,28.67
+2003-03-20,30.44,30.44,30.44,30.44,000,30.44
+2003-03-19,31.54,31.54,31.54,31.54,000,31.54
+2003-03-18,30.43,30.43,30.43,30.43,000,30.43
+2003-03-17,31.75,31.75,31.75,31.75,000,31.75
+2003-03-14,30.98,30.98,30.98,30.98,000,30.98
+2003-03-13,31.76,31.76,31.76,31.76,000,31.76
+2003-03-12,33.51,33.51,33.51,33.51,000,33.51
+2003-03-11,33.61,33.61,33.61,33.61,000,33.61
+2003-03-10,33.31,33.31,33.31,33.31,000,33.31
+2003-03-07,31.08,31.08,31.08,31.08,000,31.08
+2003-03-06,31.37,31.37,31.37,31.37,000,31.37
+2003-03-05,30.38,30.38,30.38,30.38,000,30.38
+2003-03-04,31.83,31.83,31.83,31.83,000,31.83
+2003-03-03,30.43,30.43,30.43,30.43,000,30.43
+2003-02-28,29.63,29.63,29.63,29.63,000,29.63
+2003-02-27,30.53,30.53,30.53,30.53,000,30.53
+2003-02-26,31.94,31.94,31.94,31.94,000,31.94
+2003-02-25,31.74,31.74,31.74,31.74,000,31.74
+2003-02-24,31.98,31.98,31.98,31.98,000,31.98
+2003-02-21,30.25,30.25,30.25,30.25,000,30.25
+2003-02-20,31.16,31.16,31.16,31.16,000,31.16
+2003-02-19,31.31,31.31,31.31,31.31,000,31.31
+2003-02-18,31.11,31.11,31.11,31.11,000,31.11
+2003-02-14,32.62,32.62,32.62,32.62,000,32.62
+2003-02-13,33.70,33.70,33.70,33.70,000,33.70
+2003-02-12,34.33,34.33,34.33,34.33,000,34.33
+2003-02-11,33.68,33.68,33.68,33.68,000,33.68
+2003-02-10,33.99,33.99,33.99,33.99,000,33.99
+2003-02-07,34.01,34.01,34.01,34.01,000,34.01
+2003-02-06,33.35,33.35,33.35,33.35,000,33.35
+2003-02-05,33.04,33.04,33.04,33.04,000,33.04
+2003-02-04,32.76,32.76,32.76,32.76,000,32.76
+2003-02-03,31.02,31.02,31.02,31.02,000,31.02
+2003-01-31,31.17,31.17,31.17,31.17,000,31.17
+2003-01-30,31.32,31.32,31.32,31.32,000,31.32
+2003-01-29,31.26,31.26,31.26,31.26,000,31.26
+2003-01-28,31.93,31.93,31.93,31.93,000,31.93
+2003-01-27,34.69,34.69,34.69,34.69,000,34.69
+2003-01-24,31.51,31.51,31.51,31.51,000,31.51
+2003-01-23,27.53,27.53,27.53,27.53,000,27.53
+2003-01-22,29.01,29.01,29.01,29.01,000,29.01
+2003-01-21,27.59,27.59,27.59,27.59,000,27.59
+2003-01-17,25.70,25.70,25.70,25.70,000,25.70
+2003-01-16,25.01,25.01,25.01,25.01,000,25.01
+2003-01-15,25.51,25.51,25.51,25.51,000,25.51
+2003-01-14,24.57,24.57,24.57,24.57,000,24.57
+2003-01-13,24.90,24.90,24.90,24.90,000,24.90
+2003-01-10,24.32,24.32,24.32,24.32,000,24.32
+2003-01-09,24.25,24.25,24.25,24.25,000,24.25
+2003-01-08,25.53,25.53,25.53,25.53,000,25.53
+2003-01-07,25.13,25.13,25.13,25.13,000,25.13
+2003-01-06,24.91,24.91,24.91,24.91,000,24.91
+2003-01-03,24.68,24.68,24.68,24.68,000,24.68
+2003-01-02,25.39,25.39,25.39,25.39,000,25.39
+2002-12-31,28.62,28.62,28.62,28.62,000,28.62
+2002-12-30,29.62,29.62,29.62,29.62,000,29.62
+2002-12-27,29.55,29.55,29.55,29.55,000,29.55
+2002-12-26,27.37,27.37,27.37,27.37,000,27.37
+2002-12-24,26.49,26.49,26.49,26.49,000,26.49
+2002-12-23,26.20,26.20,26.20,26.20,000,26.20
+2002-12-20,26.71,26.71,26.71,26.71,000,26.71
+2002-12-19,30.21,30.21,30.21,30.21,000,30.21
+2002-12-18,28.29,28.29,28.29,28.29,000,28.29
+2002-12-17,26.66,26.66,26.66,26.66,000,26.66
+2002-12-16,26.24,26.24,26.24,26.24,000,26.24
+2002-12-13,28.18,28.18,28.18,28.18,000,28.18
+2002-12-12,27.29,27.29,27.29,27.29,000,27.29
+2002-12-11,27.76,27.76,27.76,27.76,000,27.76
+2002-12-10,28.76,28.76,28.76,28.76,000,28.76
+2002-12-09,30.78,30.78,30.78,30.78,000,30.78
+2002-12-06,28.88,28.88,28.88,28.88,000,28.88
+2002-12-05,30.10,30.10,30.10,30.10,000,30.10
+2002-12-04,28.92,28.92,28.92,28.92,000,28.92
+2002-12-03,28.33,28.33,28.33,28.33,000,28.33
+2002-12-02,27.46,27.46,27.46,27.46,000,27.46
+2002-11-29,27.50,27.50,27.50,27.50,000,27.50
+2002-11-27,27.25,27.25,27.25,27.25,000,27.25
+2002-11-26,25.97,25.97,25.97,25.97,000,25.97
+2002-11-25,24.07,24.07,24.07,24.07,000,24.07
+2002-11-22,23.16,23.16,23.16,23.16,000,23.16
+2002-11-21,23.81,23.81,23.81,23.81,000,23.81
+2002-11-20,25.32,25.32,25.32,25.32,000,25.32
+2002-11-19,27.41,27.41,27.41,27.41,000,27.41
+2002-11-18,27.66,27.66,27.66,27.66,000,27.66
+2002-11-15,26.65,26.65,26.65,26.65,000,26.65
+2002-11-14,28.67,28.67,28.67,28.67,000,28.67
+2002-11-13,31.24,31.24,31.24,31.24,000,31.24
+2002-11-12,30.58,30.58,30.58,30.58,000,30.58
+2002-11-11,31.30,31.30,31.30,31.30,000,31.30
+2002-11-08,29.41,29.41,29.41,29.41,000,29.41
+2002-11-07,30.26,30.26,30.26,30.26,000,30.26
+2002-11-06,30.31,30.31,30.31,30.31,000,30.31
+2002-11-05,31.23,31.23,31.23,31.23,000,31.23
+2002-11-04,30.82,30.82,30.82,30.82,000,30.82
+2002-11-01,29.30,29.30,29.30,29.30,000,29.30
+2002-10-31,31.14,31.14,31.14,31.14,000,31.14
+2002-10-30,31.23,31.23,31.23,31.23,000,31.23
+2002-10-29,32.27,32.27,32.27,32.27,000,32.27
+2002-10-28,31.07,31.07,31.07,31.07,000,31.07
+2002-10-25,30.00,30.00,30.00,30.00,000,30.00
+2002-10-24,34.03,34.03,34.03,34.03,000,34.03
+2002-10-23,33.20,33.20,33.20,33.20,000,33.20
+2002-10-22,34.09,34.09,34.09,34.09,000,34.09
+2002-10-21,33.11,33.11,33.11,33.11,000,33.11
+2002-10-18,33.53,33.53,33.53,33.53,000,33.53
+2002-10-17,34.10,34.10,34.10,34.10,000,34.10
+2002-10-16,36.00,36.00,36.00,36.00,000,36.00
+2002-10-15,34.02,34.02,34.02,34.02,000,34.02
+2002-10-14,36.04,36.04,36.04,36.04,000,36.04
+2002-10-11,35.70,35.70,35.70,35.70,000,35.70
+2002-10-10,37.55,37.55,37.55,37.55,000,37.55
+2002-10-09,42.13,42.13,42.13,42.13,000,42.13
+2002-10-08,41.02,41.02,41.02,41.02,000,41.02
+2002-10-07,42.64,42.64,42.64,42.64,000,42.64
+2002-10-04,39.46,39.46,39.46,39.46,000,39.46
+2002-10-03,37.31,37.31,37.31,37.31,000,37.31
+2002-10-02,36.83,36.83,36.83,36.83,000,36.83
+2002-10-01,34.12,34.12,34.12,34.12,000,34.12
+2002-09-30,39.69,39.69,39.69,39.69,000,39.69
+2002-09-27,36.97,36.97,36.97,36.97,000,36.97
+2002-09-26,34.60,34.60,34.60,34.60,000,34.60
+2002-09-25,37.33,37.33,37.33,37.33,000,37.33
+2002-09-24,40.52,40.52,40.52,40.52,000,40.52
+2002-09-23,39.68,39.68,39.68,39.68,000,39.68
+2002-09-20,38.98,38.98,38.98,38.98,000,38.98
+2002-09-19,40.65,40.65,40.65,40.65,000,40.65
+2002-09-18,37.52,37.52,37.52,37.52,000,37.52
+2002-09-17,38.01,38.01,38.01,38.01,000,38.01
+2002-09-16,36.74,36.74,36.74,36.74,000,36.74
+2002-09-13,35.82,35.82,35.82,35.82,000,35.82
+2002-09-12,37.50,37.50,37.50,37.50,000,37.50
+2002-09-11,34.81,34.81,34.81,34.81,000,34.81
+2002-09-10,35.08,35.08,35.08,35.08,000,35.08
+2002-09-09,36.45,36.45,36.45,36.45,000,36.45
+2002-09-06,36.33,36.33,36.33,36.33,000,36.33
+2002-09-05,38.86,38.86,38.86,38.86,000,38.86
+2002-09-04,37.44,37.44,37.44,37.44,000,37.44
+2002-09-03,39.97,39.97,39.97,39.97,000,39.97
+2002-08-30,32.64,32.64,32.64,32.64,000,32.64
+2002-08-29,33.67,33.67,33.67,33.67,000,33.67
+2002-08-28,33.32,33.32,33.32,33.32,000,33.32
+2002-08-27,30.11,30.11,30.11,30.11,000,30.11
+2002-08-26,29.89,29.89,29.89,29.89,000,29.89
+2002-08-23,29.32,29.32,29.32,29.32,000,29.32
+2002-08-22,27.75,27.75,27.75,27.75,000,27.75
+2002-08-21,28.23,28.23,28.23,28.23,000,28.23
+2002-08-20,29.59,29.59,29.59,29.59,000,29.59
+2002-08-19,28.61,28.61,28.61,28.61,000,28.61
+2002-08-16,28.81,28.81,28.81,28.81,000,28.81
+2002-08-15,29.43,29.43,29.43,29.43,000,29.43
+2002-08-14,32.36,32.36,32.36,32.36,000,32.36
+2002-08-13,35.82,35.82,35.82,35.82,000,35.82
+2002-08-12,37.05,37.05,37.05,37.05,000,37.05
+2002-08-09,35.33,35.33,35.33,35.33,000,35.33
+2002-08-08,36.33,36.33,36.33,36.33,000,36.33
+2002-08-07,38.73,38.73,38.73,38.73,000,38.73
+2002-08-06,42.03,42.03,42.03,42.03,000,42.03
+2002-08-05,45.08,45.08,45.08,45.08,000,45.08
+2002-08-02,41.29,41.29,41.29,41.29,000,41.29
+2002-08-01,36.95,36.95,36.95,36.95,000,36.95
+2002-07-31,32.03,32.03,32.03,32.03,000,32.03
+2002-07-30,31.92,31.92,31.92,31.92,000,31.92
+2002-07-29,31.33,31.33,31.33,31.33,000,31.33
+2002-07-26,35.51,35.51,35.51,35.51,000,35.51
+2002-07-25,39.27,39.27,39.27,39.27,000,39.27
+2002-07-24,39.86,39.86,39.86,39.86,000,39.86
+2002-07-23,44.92,44.92,44.92,44.92,000,44.92
+2002-07-22,41.87,41.87,41.87,41.87,000,41.87
+2002-07-19,38.17,38.17,38.17,38.17,000,38.17
+2002-07-18,35.12,35.12,35.12,35.12,000,35.12
+2002-07-17,35.45,35.45,35.45,35.45,000,35.45
+2002-07-16,36.65,36.65,36.65,36.65,000,36.65
+2002-07-15,35.03,35.03,35.03,35.03,000,35.03
+2002-07-12,32.94,32.94,32.94,32.94,000,32.94
+2002-07-11,33.85,33.85,33.85,33.85,000,33.85
+2002-07-10,34.10,34.10,34.10,34.10,000,34.10
+2002-07-09,30.22,30.22,30.22,30.22,000,30.22
+2002-07-08,28.25,28.25,28.25,28.25,000,28.25
+2002-07-05,27.11,27.11,27.11,27.11,000,27.11
+2002-07-03,29.42,29.42,29.42,29.42,000,29.42
+2002-07-02,28.96,28.96,28.96,28.96,000,28.96
+2002-07-01,27.11,27.11,27.11,27.11,000,27.11
+2002-06-28,25.40,25.40,25.40,25.40,000,25.40
+2002-06-27,26.29,26.29,26.29,26.29,000,26.29
+2002-06-26,28.42,28.42,28.42,28.42,000,28.42
+2002-06-25,27.84,27.84,27.84,27.84,000,27.84
+2002-06-24,26.98,26.98,26.98,26.98,000,26.98
+2002-06-21,27.23,27.23,27.23,27.23,000,27.23
+2002-06-20,27.48,27.48,27.48,27.48,000,27.48
+2002-06-19,26.06,26.06,26.06,26.06,000,26.06
+2002-06-18,24.24,24.24,24.24,24.24,000,24.24
+2002-06-17,24.64,24.64,24.64,24.64,000,24.64
+2002-06-14,25.96,25.96,25.96,25.96,000,25.96
+2002-06-13,25.02,25.02,25.02,25.02,000,25.02
+2002-06-12,24.15,24.15,24.15,24.15,000,24.15
+2002-06-11,24.45,24.45,24.45,24.45,000,24.45
+2002-06-10,23.72,23.72,23.72,23.72,000,23.72
+2002-06-07,23.51,23.51,23.51,23.51,000,23.51
+2002-06-06,24.16,24.16,24.16,24.16,000,24.16
+2002-06-05,22.61,22.61,22.61,22.61,000,22.61
+2002-06-04,23.89,23.89,23.89,23.89,000,23.89
+2002-06-03,23.37,23.37,23.37,23.37,000,23.37
+2002-05-31,19.98,19.98,19.98,19.98,000,19.98
+2002-05-30,20.61,20.61,20.61,20.61,000,20.61
+2002-05-29,20.39,20.39,20.39,20.39,000,20.39
+2002-05-28,20.31,20.31,20.31,20.31,000,20.31
+2002-05-24,18.90,18.90,18.90,18.90,000,18.90
+2002-05-23,18.23,18.23,18.23,18.23,000,18.23
+2002-05-22,19.58,19.58,19.58,19.58,000,19.58
+2002-05-21,20.05,20.05,20.05,20.05,000,20.05
+2002-05-20,19.24,19.24,19.24,19.24,000,19.24
+2002-05-17,17.70,17.70,17.70,17.70,000,17.70
+2002-05-16,18.50,18.50,18.50,18.50,000,18.50
+2002-05-15,19.19,19.19,19.19,19.19,000,19.19
+2002-05-14,19.35,19.35,19.35,19.35,000,19.35
+2002-05-13,20.72,20.72,20.72,20.72,000,20.72
+2002-05-10,22.41,22.41,22.41,22.41,000,22.41
+2002-05-09,21.56,21.56,21.56,21.56,000,21.56
+2002-05-08,20.39,20.39,20.39,20.39,000,20.39
+2002-05-07,21.94,21.94,21.94,21.94,000,21.94
+2002-05-06,22.56,22.56,22.56,22.56,000,22.56
+2002-05-03,20.19,20.19,20.19,20.19,000,20.19
+2002-05-02,20.07,20.07,20.07,20.07,000,20.07
+2002-05-01,20.06,20.06,20.06,20.06,000,20.06
+2002-04-30,21.91,21.91,21.91,21.91,000,21.91
+2002-04-29,24.05,24.05,24.05,24.05,000,24.05
+2002-04-26,22.14,22.14,22.14,22.14,000,22.14
+2002-04-25,20.95,20.95,20.95,20.95,000,20.95
+2002-04-24,20.77,20.77,20.77,20.77,000,20.77
+2002-04-23,20.28,20.28,20.28,20.28,000,20.28
+2002-04-22,19.77,19.77,19.77,19.77,000,19.77
+2002-04-19,18.30,18.30,18.30,18.30,000,18.30
+2002-04-18,19.29,19.29,19.29,19.29,000,19.29
+2002-04-17,18.43,18.43,18.43,18.43,000,18.43
+2002-04-16,18.11,18.11,18.11,18.11,000,18.11
+2002-04-15,19.82,19.82,19.82,19.82,000,19.82
+2002-04-12,19.42,19.42,19.42,19.42,000,19.42
+2002-04-11,20.30,20.30,20.30,20.30,000,20.30
+2002-04-10,18.19,18.19,18.19,18.19,000,18.19
+2002-04-09,19.47,19.47,19.47,19.47,000,19.47
+2002-04-08,19.61,19.61,19.61,19.61,000,19.61
+2002-04-05,19.13,19.13,19.13,19.13,000,19.13
+2002-04-04,19.78,19.78,19.78,19.78,000,19.78
+2002-04-03,20.20,20.20,20.20,20.20,000,20.20
+2002-04-02,19.16,19.16,19.16,19.16,000,19.16
+2002-04-01,18.73,18.73,18.73,18.73,000,18.73
+2002-03-28,17.40,17.40,17.40,17.40,000,17.40
+2002-03-27,17.70,17.70,17.70,17.70,000,17.70
+2002-03-26,18.13,18.13,18.13,18.13,000,18.13
+2002-03-25,18.48,18.48,18.48,18.48,000,18.48
+2002-03-22,17.77,17.77,17.77,17.77,000,17.77
+2002-03-21,18.15,18.15,18.15,18.15,000,18.15
+2002-03-20,18.46,18.46,18.46,18.46,000,18.46
+2002-03-19,18.16,18.16,18.16,18.16,000,18.16
+2002-03-18,18.93,18.93,18.93,18.93,000,18.93
+2002-03-15,18.42,18.42,18.42,18.42,000,18.42
+2002-03-14,19.20,19.20,19.20,19.20,000,19.20
+2002-03-13,19.46,19.46,19.46,19.46,000,19.46
+2002-03-12,19.59,19.59,19.59,19.59,000,19.59
+2002-03-11,19.84,19.84,19.84,19.84,000,19.84
+2002-03-08,19.27,19.27,19.27,19.27,000,19.27
+2002-03-07,20.04,20.04,20.04,20.04,000,20.04
+2002-03-06,19.94,19.94,19.94,19.94,000,19.94
+2002-03-05,20.30,20.30,20.30,20.30,000,20.30
+2002-03-04,20.50,20.50,20.50,20.50,000,20.50
+2002-03-01,19.96,19.96,19.96,19.96,000,19.96
+2002-02-28,21.59,21.59,21.59,21.59,000,21.59
+2002-02-27,21.49,21.49,21.49,21.49,000,21.49
+2002-02-26,21.68,21.68,21.68,21.68,000,21.68
+2002-02-25,21.84,21.84,21.84,21.84,000,21.84
+2002-02-22,22.86,22.86,22.86,22.86,000,22.86
+2002-02-21,23.80,23.80,23.80,23.80,000,23.80
+2002-02-20,22.66,22.66,22.66,22.66,000,22.66
+2002-02-19,24.43,24.43,24.43,24.43,000,24.43
+2002-02-15,22.37,22.37,22.37,22.37,000,22.37
+2002-02-14,21.77,21.77,21.77,21.77,000,21.77
+2002-02-13,20.85,20.85,20.85,20.85,000,20.85
+2002-02-12,21.62,21.62,21.62,21.62,000,21.62
+2002-02-11,21.78,21.78,21.78,21.78,000,21.78
+2002-02-08,23.26,23.26,23.26,23.26,000,23.26
+2002-02-07,25.11,25.11,25.11,25.11,000,25.11
+2002-02-06,26.09,26.09,26.09,26.09,000,26.09
+2002-02-05,25.45,25.45,25.45,25.45,000,25.45
+2002-02-04,24.87,24.87,24.87,24.87,000,24.87
+2002-02-01,21.12,21.12,21.12,21.12,000,21.12
+2002-01-31,21.09,21.09,21.09,21.09,000,21.09
+2002-01-30,23.22,23.22,23.22,23.22,000,23.22
+2002-01-29,24.35,24.35,24.35,24.35,000,24.35
+2002-01-28,21.14,21.14,21.14,21.14,000,21.14
+2002-01-25,21.01,21.01,21.01,21.01,000,21.01
+2002-01-24,21.15,21.15,21.15,21.15,000,21.15
+2002-01-23,21.88,21.88,21.88,21.88,000,21.88
+2002-01-22,23.61,23.61,23.61,23.61,000,23.61
+2002-01-18,22.52,22.52,22.52,22.52,000,22.52
+2002-01-17,22.25,22.25,22.25,22.25,000,22.25
+2002-01-16,23.45,23.45,23.45,23.45,000,23.45
+2002-01-15,22.70,22.70,22.70,22.70,000,22.70
+2002-01-14,23.58,23.58,23.58,23.58,000,23.58
+2002-01-11,22.60,22.60,22.60,22.60,000,22.60
+2002-01-10,22.03,22.03,22.03,22.03,000,22.03
+2002-01-09,22.13,22.13,22.13,22.13,000,22.13
+2002-01-08,21.83,21.83,21.83,21.83,000,21.83
+2002-01-07,21.67,21.67,21.67,21.67,000,21.67
+2002-01-04,20.45,20.45,20.45,20.45,000,20.45
+2002-01-03,21.34,21.34,21.34,21.34,000,21.34
+2002-01-02,22.71,22.71,22.71,22.71,000,22.71
+2001-12-31,23.80,23.80,23.80,23.80,000,23.80
+2001-12-28,21.40,21.40,21.40,21.40,000,21.40
+2001-12-27,21.59,21.59,21.59,21.59,000,21.59
+2001-12-26,22.29,22.29,22.29,22.29,000,22.29
+2001-12-24,22.62,22.62,22.62,22.62,000,22.62
+2001-12-21,22.50,22.50,22.50,22.50,000,22.50
+2001-12-20,23.67,23.67,23.67,23.67,000,23.67
+2001-12-19,22.58,22.58,22.58,22.58,000,22.58
+2001-12-18,23.29,23.29,23.29,23.29,000,23.29
+2001-12-17,24.26,24.26,24.26,24.26,000,24.26
+2001-12-14,24.63,24.63,24.63,24.63,000,24.63
+2001-12-13,25.91,25.91,25.91,25.91,000,25.91
+2001-12-12,24.87,24.87,24.87,24.87,000,24.87
+2001-12-11,25.30,25.30,25.30,25.30,000,25.30
+2001-12-10,25.62,25.62,25.62,25.62,000,25.62
+2001-12-07,23.49,23.49,23.49,23.49,000,23.49
+2001-12-06,23.71,23.71,23.71,23.71,000,23.71
+2001-12-05,23.02,23.02,23.02,23.02,000,23.02
+2001-12-04,24.08,24.08,24.08,24.08,000,24.08
+2001-12-03,25.77,25.77,25.77,25.77,000,25.77
+2001-11-30,24.92,24.92,24.92,24.92,000,24.92
+2001-11-29,25.18,25.18,25.18,25.18,000,25.18
+2001-11-28,25.90,25.90,25.90,25.90,000,25.90
+2001-11-27,24.00,24.00,24.00,24.00,000,24.00
+2001-11-26,23.79,23.79,23.79,23.79,000,23.79
+2001-11-23,23.25,23.25,23.25,23.25,000,23.25
+2001-11-21,24.19,24.19,24.19,24.19,000,24.19
+2001-11-20,24.12,24.12,24.12,24.12,000,24.12
+2001-11-19,24.46,24.46,24.46,24.46,000,24.46
+2001-11-16,25.07,25.07,25.07,25.07,000,25.07
+2001-11-15,25.56,25.56,25.56,25.56,000,25.56
+2001-11-14,26.56,26.56,26.56,26.56,000,26.56
+2001-11-13,26.47,26.47,26.47,26.47,000,26.47
+2001-11-12,29.35,29.35,29.35,29.35,000,29.35
+2001-11-09,27.44,27.44,27.44,27.44,000,27.44
+2001-11-08,28.62,28.62,28.62,28.62,000,28.62
+2001-11-07,29.13,29.13,29.13,29.13,000,29.13
+2001-11-06,28.80,28.80,28.80,28.80,000,28.80
+2001-11-05,30.50,30.50,30.50,30.50,000,30.50
+2001-11-02,30.71,30.71,30.71,30.71,000,30.71
+2001-11-01,32.31,32.31,32.31,32.31,000,32.31
+2001-10-31,33.56,33.56,33.56,33.56,000,33.56
+2001-10-30,33.46,33.46,33.46,33.46,000,33.46
+2001-10-29,31.64,31.64,31.64,31.64,000,31.64
+2001-10-26,28.42,28.42,28.42,28.42,000,28.42
+2001-10-25,29.46,29.46,29.46,29.46,000,29.46
+2001-10-24,30.95,30.95,30.95,30.95,000,30.95
+2001-10-23,32.00,32.00,32.00,32.00,000,32.00
+2001-10-22,32.25,32.25,32.25,32.25,000,32.25
+2001-10-19,34.11,34.11,34.11,34.11,000,34.11
+2001-10-18,34.95,34.95,34.95,34.95,000,34.95
+2001-10-17,35.08,35.08,35.08,35.08,000,35.08
+2001-10-16,32.88,32.88,32.88,32.88,000,32.88
+2001-10-15,35.31,35.31,35.31,35.31,000,35.31
+2001-10-12,35.27,35.27,35.27,35.27,000,35.27
+2001-10-11,31.50,31.50,31.50,31.50,000,31.50
+2001-10-10,31.60,31.60,31.60,31.60,000,31.60
+2001-10-09,34.83,34.83,34.83,34.83,000,34.83
+2001-10-08,35.12,35.12,35.12,35.12,000,35.12
+2001-10-05,33.39,33.39,33.39,33.39,000,33.39
+2001-10-04,31.97,31.97,31.97,31.97,000,31.97
+2001-10-03,31.34,31.34,31.34,31.34,000,31.34
+2001-10-02,31.18,31.18,31.18,31.18,000,31.18
+2001-10-01,32.32,32.32,32.32,32.32,000,32.32
+2001-09-28,31.93,31.93,31.93,31.93,000,31.93
+2001-09-27,34.00,34.00,34.00,34.00,000,34.00
+2001-09-26,35.26,35.26,35.26,35.26,000,35.26
+2001-09-25,35.81,35.81,35.81,35.81,000,35.81
+2001-09-24,37.75,37.75,37.75,37.75,000,37.75
+2001-09-21,42.66,42.66,42.66,42.66,000,42.66
+2001-09-20,43.74,43.74,43.74,43.74,000,43.74
+2001-09-19,40.56,40.56,40.56,40.56,000,40.56
+2001-09-18,38.87,38.87,38.87,38.87,000,38.87
+2001-09-17,41.76,41.76,41.76,41.76,000,41.76
+2001-09-10,31.84,31.84,31.84,31.84,000,31.84
+2001-09-07,30.99,30.99,30.99,30.99,000,30.99
+2001-09-06,28.61,28.61,28.61,28.61,000,28.61
+2001-09-05,26.35,26.35,26.35,26.35,000,26.35
+2001-09-04,25.85,25.85,25.85,25.85,000,25.85
+2001-08-31,24.92,24.92,24.92,24.92,000,24.92
+2001-08-30,25.41,25.41,25.41,25.41,000,25.41
+2001-08-29,23.03,23.03,23.03,23.03,000,23.03
+2001-08-28,22.00,22.00,22.00,22.00,000,22.00
+2001-08-27,20.56,20.56,20.56,20.56,000,20.56
+2001-08-24,19.71,19.71,19.71,19.71,000,19.71
+2001-08-23,22.23,22.23,22.23,22.23,000,22.23
+2001-08-22,22.44,22.44,22.44,22.44,000,22.44
+2001-08-21,24.40,24.40,24.40,24.40,000,24.40
+2001-08-20,22.87,22.87,22.87,22.87,000,22.87
+2001-08-17,23.84,23.84,23.84,23.84,000,23.84
+2001-08-16,21.54,21.54,21.54,21.54,000,21.54
+2001-08-15,20.91,20.91,20.91,20.91,000,20.91
+2001-08-14,20.48,20.48,20.48,20.48,000,20.48
+2001-08-13,20.42,20.42,20.42,20.42,000,20.42
+2001-08-10,20.55,20.55,20.55,20.55,000,20.55
+2001-08-09,21.02,21.02,21.02,21.02,000,21.02
+2001-08-08,22.32,22.32,22.32,22.32,000,22.32
+2001-08-07,21.01,21.01,21.01,21.01,000,21.01
+2001-08-06,21.89,21.89,21.89,21.89,000,21.89
+2001-08-03,19.89,19.89,19.89,19.89,000,19.89
+2001-08-02,20.09,20.09,20.09,20.09,000,20.09
+2001-08-01,20.56,20.56,20.56,20.56,000,20.56
+2001-07-31,21.62,21.62,21.62,21.62,000,21.62
+2001-07-30,22.69,22.69,22.69,22.69,000,22.69
+2001-07-27,22.00,22.00,22.00,22.00,000,22.00
+2001-07-26,23.01,23.01,23.01,23.01,000,23.01
+2001-07-25,24.00,24.00,24.00,24.00,000,24.00
+2001-07-24,25.24,25.24,25.24,25.24,000,25.24
+2001-07-23,23.74,23.74,23.74,23.74,000,23.74
+2001-07-20,22.34,22.34,22.34,22.34,000,22.34
+2001-07-19,22.51,22.51,22.51,22.51,000,22.51
+2001-07-18,23.60,23.60,23.60,23.60,000,23.60
+2001-07-17,22.61,22.61,22.61,22.61,000,22.61
+2001-07-16,22.91,22.91,22.91,22.91,000,22.91
+2001-07-13,21.14,21.14,21.14,21.14,000,21.14
+2001-07-12,22.09,22.09,22.09,22.09,000,22.09
+2001-07-11,24.01,24.01,24.01,24.01,000,24.01
+2001-07-10,23.25,23.25,23.25,23.25,000,23.25
+2001-07-09,22.48,22.48,22.48,22.48,000,22.48
+2001-07-06,21.63,21.63,21.63,21.63,000,21.63
+2001-07-05,20.09,20.09,20.09,20.09,000,20.09
+2001-07-03,18.92,18.92,18.92,18.92,000,18.92
+2001-07-02,18.76,18.76,18.76,18.76,000,18.76
+2001-06-29,19.06,19.06,19.06,19.06,000,19.06
+2001-06-28,20.01,20.01,20.01,20.01,000,20.01
+2001-06-27,20.88,20.88,20.88,20.88,000,20.88
+2001-06-26,21.20,21.20,21.20,21.20,000,21.20
+2001-06-25,20.67,20.67,20.67,20.67,000,20.67
+2001-06-22,20.02,20.02,20.02,20.02,000,20.02
+2001-06-21,19.38,19.38,19.38,19.38,000,19.38
+2001-06-20,21.71,21.71,21.71,21.71,000,21.71
+2001-06-19,22.34,22.34,22.34,22.34,000,22.34
+2001-06-18,23.17,23.17,23.17,23.17,000,23.17
+2001-06-15,22.81,22.81,22.81,22.81,000,22.81
+2001-06-14,23.12,23.12,23.12,23.12,000,23.12
+2001-06-13,21.45,21.45,21.45,21.45,000,21.45
+2001-06-12,20.70,20.70,20.70,20.70,000,20.70
+2001-06-11,20.70,20.70,20.70,20.70,000,20.70
+2001-06-08,19.92,19.92,19.92,19.92,000,19.92
+2001-06-07,19.67,19.67,19.67,19.67,000,19.67
+2001-06-06,20.39,20.39,20.39,20.39,000,20.39
+2001-06-05,19.58,19.58,19.58,19.58,000,19.58
+2001-06-04,21.38,21.38,21.38,21.38,000,21.38
+2001-06-01,21.59,21.59,21.59,21.59,000,21.59
+2001-05-31,22.64,22.64,22.64,22.64,000,22.64
+2001-05-30,22.76,22.76,22.76,22.76,000,22.76
+2001-05-29,22.14,22.14,22.14,22.14,000,22.14
+2001-05-25,20.60,20.60,20.60,20.60,000,20.60
+2001-05-24,20.57,20.57,20.57,20.57,000,20.57
+2001-05-23,22.08,22.08,22.08,22.08,000,22.08
+2001-05-22,21.35,21.35,21.35,21.35,000,21.35
+2001-05-21,20.76,20.76,20.76,20.76,000,20.76
+2001-05-18,21.23,21.23,21.23,21.23,000,21.23
+2001-05-17,21.47,21.47,21.47,21.47,000,21.47
+2001-05-16,21.89,21.89,21.89,21.89,000,21.89
+2001-05-15,23.71,23.71,23.71,23.71,000,23.71
+2001-05-14,24.26,24.26,24.26,24.26,000,24.26
+2001-05-11,23.54,23.54,23.54,23.54,000,23.54
+2001-05-10,24.00,24.00,24.00,24.00,000,24.00
+2001-05-09,24.35,24.35,24.35,24.35,000,24.35
+2001-05-08,24.44,24.44,24.44,24.44,000,24.44
+2001-05-07,24.86,24.86,24.86,24.86,000,24.86
+2001-05-04,23.91,23.91,23.91,23.91,000,23.91
+2001-05-03,25.78,25.78,25.78,25.78,000,25.78
+2001-05-02,24.23,24.23,24.23,24.23,000,24.23
+2001-05-01,24.20,24.20,24.20,24.20,000,24.20
+2001-04-30,25.48,25.48,25.48,25.48,000,25.48
+2001-04-27,26.61,26.61,26.61,26.61,000,26.61
+2001-04-26,27.49,27.49,27.49,27.49,000,27.49
+2001-04-25,27.40,27.40,27.40,27.40,000,27.40
+2001-04-24,28.49,28.49,28.49,28.49,000,28.49
+2001-04-23,28.16,28.16,28.16,28.16,000,28.16
+2001-04-20,25.38,25.38,25.38,25.38,000,25.38
+2001-04-19,24.16,24.16,24.16,24.16,000,24.16
+2001-04-18,24.13,24.13,24.13,24.13,000,24.13
+2001-04-17,25.61,25.61,25.61,25.61,000,25.61
+2001-04-16,26.33,26.33,26.33,26.33,000,26.33
+2001-04-12,26.12,26.12,26.12,26.12,000,26.12
+2001-04-11,28.46,28.46,28.46,28.46,000,28.46
+2001-04-10,29.44,29.44,29.44,29.44,000,29.44
+2001-04-09,31.91,31.91,31.91,31.91,000,31.91
+2001-04-06,31.69,31.69,31.69,31.69,000,31.69
+2001-04-05,29.94,29.94,29.94,29.94,000,29.94
+2001-04-04,34.07,34.07,34.07,34.07,000,34.07
+2001-04-03,34.72,34.72,34.72,34.72,000,34.72
+2001-04-02,31.21,31.21,31.21,31.21,000,31.21
+2001-03-30,28.64,28.64,28.64,28.64,000,28.64
+2001-03-29,29.17,29.17,29.17,29.17,000,29.17
+2001-03-28,28.58,28.58,28.58,28.58,000,28.58
+2001-03-27,27.04,27.04,27.04,27.04,000,27.04
+2001-03-26,29.04,29.04,29.04,29.04,000,29.04
+2001-03-23,30.45,30.45,30.45,30.45,000,30.45
+2001-03-22,32.84,32.84,32.84,32.84,000,32.84
+2001-03-21,31.93,31.93,31.93,31.93,000,31.93
+2001-03-20,30.96,30.96,30.96,30.96,000,30.96
+2001-03-19,29.78,29.78,29.78,29.78,000,29.78
+2001-03-16,29.91,29.91,29.91,29.91,000,29.91
+2001-03-15,28.56,28.56,28.56,28.56,000,28.56
+2001-03-14,29.61,29.61,29.61,29.61,000,29.61
+2001-03-13,27.55,27.55,27.55,27.55,000,27.55
+2001-03-12,30.32,30.32,30.32,30.32,000,30.32
+2001-03-09,25.62,25.62,25.62,25.62,000,25.62
+2001-03-08,24.29,24.29,24.29,24.29,000,24.29
+2001-03-07,24.12,24.12,24.12,24.12,000,24.12
+2001-03-06,25.89,25.89,25.89,25.89,000,25.89
+2001-03-05,27.12,27.12,27.12,27.12,000,27.12
+2001-03-02,27.43,27.43,27.43,27.43,000,27.43
+2001-03-01,28.08,28.08,28.08,28.08,000,28.08
+2001-02-28,28.35,28.35,28.35,28.35,000,28.35
+2001-02-27,26.49,26.49,26.49,26.49,000,26.49
+2001-02-26,25.43,25.43,25.43,25.43,000,25.43
+2001-02-23,27.21,27.21,27.21,27.21,000,27.21
+2001-02-22,26.76,26.76,26.76,26.76,000,26.76
+2001-02-21,25.75,25.75,25.75,25.75,000,25.75
+2001-02-20,24.69,24.69,24.69,24.69,000,24.69
+2001-02-16,22.12,22.12,22.12,22.12,000,22.12
+2001-02-15,20.27,20.27,20.27,20.27,000,20.27
+2001-02-14,21.52,21.52,21.52,21.52,000,21.52
+2001-02-13,21.37,21.37,21.37,21.37,000,21.37
+2001-02-12,21.92,21.92,21.92,21.92,000,21.92
+2001-02-09,22.03,22.03,22.03,22.03,000,22.03
+2001-02-08,21.46,21.46,21.46,21.46,000,21.46
+2001-02-07,21.67,21.67,21.67,21.67,000,21.67
+2001-02-06,21.98,21.98,21.98,21.98,000,21.98
+2001-02-05,22.19,22.19,22.19,22.19,000,22.19
+2001-02-02,23.19,23.19,23.19,23.19,000,23.19
+2001-02-01,21.66,21.66,21.66,21.66,000,21.66
+2001-01-31,22.02,22.02,22.02,22.02,000,22.02
+2001-01-30,22.57,22.57,22.57,22.57,000,22.57
+2001-01-29,22.61,22.61,22.61,22.61,000,22.61
+2001-01-26,22.57,22.57,22.57,22.57,000,22.57
+2001-01-25,22.64,22.64,22.64,22.64,000,22.64
+2001-01-24,22.03,22.03,22.03,22.03,000,22.03
+2001-01-23,21.57,21.57,21.57,21.57,000,21.57
+2001-01-22,23.25,23.25,23.25,23.25,000,23.25
+2001-01-19,23.24,23.24,23.24,23.24,000,23.24
+2001-01-18,23.37,23.37,23.37,23.37,000,23.37
+2001-01-17,24.93,24.93,24.93,24.93,000,24.93
+2001-01-16,25.28,25.28,25.28,25.28,000,25.28
+2001-01-12,24.56,24.56,24.56,24.56,000,24.56
+2001-01-11,25.79,25.79,25.79,25.79,000,25.79
+2001-01-10,26.80,26.80,26.80,26.80,000,26.80
+2001-01-09,27.99,27.99,27.99,27.99,000,27.99
+2001-01-08,29.84,29.84,29.84,29.84,000,29.84
+2001-01-05,28.67,28.67,28.67,28.67,000,28.67
+2001-01-04,26.97,26.97,26.97,26.97,000,26.97
+2001-01-03,26.60,26.60,26.60,26.60,000,26.60
+2001-01-02,29.99,29.99,29.99,29.99,000,29.99
+2000-12-29,26.85,26.85,26.85,26.85,000,26.85
+2000-12-28,26.57,26.57,26.57,26.57,000,26.57
+2000-12-27,28.14,28.14,28.14,28.14,000,28.14
+2000-12-26,28.73,28.73,28.73,28.73,000,28.73
+2000-12-22,27.55,27.55,27.55,27.55,000,27.55
+2000-12-21,29.66,29.66,29.66,29.66,000,29.66
+2000-12-20,31.74,31.74,31.74,31.74,000,31.74
+2000-12-19,27.17,27.17,27.17,27.17,000,27.17
+2000-12-18,27.70,27.70,27.70,27.70,000,27.70
+2000-12-15,26.55,26.55,26.55,26.55,000,26.55
+2000-12-14,24.86,24.86,24.86,24.86,000,24.86
+2000-12-13,23.63,23.63,23.63,23.63,000,23.63
+2000-12-12,24.88,24.88,24.88,24.88,000,24.88
+2000-12-11,23.51,23.51,23.51,23.51,000,23.51
+2000-12-08,22.41,22.41,22.41,22.41,000,22.41
+2000-12-07,25.34,25.34,25.34,25.34,000,25.34
+2000-12-06,25.07,25.07,25.07,25.07,000,25.07
+2000-12-05,24.99,24.99,24.99,24.99,000,24.99
+2000-12-04,27.78,27.78,27.78,27.78,000,27.78
+2000-12-01,27.48,27.48,27.48,27.48,000,27.48
+2000-11-30,29.65,29.65,29.65,29.65,000,29.65
+2000-11-29,27.49,27.49,27.49,27.49,000,27.49
+2000-11-28,27.64,27.64,27.64,27.64,000,27.64
+2000-11-27,26.93,26.93,26.93,26.93,000,26.93
+2000-11-24,26.00,26.00,26.00,26.00,000,26.00
+2000-11-22,27.71,27.71,27.71,27.71,000,27.71
+2000-11-21,26.62,26.62,26.62,26.62,000,26.62
+2000-11-20,27.43,27.43,27.43,27.43,000,27.43
+2000-11-17,24.81,24.81,24.81,24.81,000,24.81
+2000-11-16,25.05,25.05,25.05,25.05,000,25.05
+2000-11-15,26.15,26.15,26.15,26.15,000,26.15
+2000-11-14,26.81,26.81,26.81,26.81,000,26.81
+2000-11-13,29.06,29.06,29.06,29.06,000,29.06
+2000-11-10,28.53,28.53,28.53,28.53,000,28.53
+2000-11-09,27.20,27.20,27.20,27.20,000,27.20
+2000-11-08,25.66,25.66,25.66,25.66,000,25.66
+2000-11-07,24.91,24.91,24.91,24.91,000,24.91
+2000-11-06,24.52,24.52,24.52,24.52,000,24.52
+2000-11-03,23.67,23.67,23.67,23.67,000,23.67
+2000-11-02,23.92,23.92,23.92,23.92,000,23.92
+2000-11-01,24.28,24.28,24.28,24.28,000,24.28
+2000-10-31,23.63,23.63,23.63,23.63,000,23.63
+2000-10-30,25.46,25.46,25.46,25.46,000,25.46
+2000-10-27,26.47,26.47,26.47,26.47,000,26.47
+2000-10-26,28.62,28.62,28.62,28.62,000,28.62
+2000-10-25,26.65,26.65,26.65,26.65,000,26.65
+2000-10-24,24.28,24.28,24.28,24.28,000,24.28
+2000-10-23,24.69,24.69,24.69,24.69,000,24.69
+2000-10-20,24.24,24.24,24.24,24.24,000,24.24
+2000-10-19,25.09,25.09,25.09,25.09,000,25.09
+2000-10-18,28.72,28.72,28.72,28.72,000,28.72
+2000-10-17,27.84,27.84,27.84,27.84,000,27.84
+2000-10-16,26.79,26.79,26.79,26.79,000,26.79
+2000-10-13,27.60,27.60,27.60,27.60,000,27.60
+2000-10-12,29.47,29.47,29.47,29.47,000,29.47
+2000-10-11,26.57,26.57,26.57,26.57,000,26.57
+2000-10-10,24.86,24.86,24.86,24.86,000,24.86
+2000-10-09,24.02,24.02,24.02,24.02,000,24.02
+2000-10-06,22.71,22.71,22.71,22.71,000,22.71
+2000-10-05,21.03,21.03,21.03,21.03,000,21.03
+2000-10-04,21.54,21.54,21.54,21.54,000,21.54
+2000-10-03,21.85,21.85,21.85,21.85,000,21.85
+2000-10-02,21.23,21.23,21.23,21.23,000,21.23
+2000-09-29,20.57,20.57,20.57,20.57,000,20.57
+2000-09-28,19.47,19.47,19.47,19.47,000,19.47
+2000-09-27,21.67,21.67,21.67,21.67,000,21.67
+2000-09-26,21.88,21.88,21.88,21.88,000,21.88
+2000-09-25,21.41,21.41,21.41,21.41,000,21.41
+2000-09-22,20.74,20.74,20.74,20.74,000,20.74
+2000-09-21,20.18,20.18,20.18,20.18,000,20.18
+2000-09-20,19.93,19.93,19.93,19.93,000,19.93
+2000-09-19,19.54,19.54,19.54,19.54,000,19.54
+2000-09-18,20.25,20.25,20.25,20.25,000,20.25
+2000-09-15,18.52,18.52,18.52,18.52,000,18.52
+2000-09-14,18.26,18.26,18.26,18.26,000,18.26
+2000-09-13,18.32,18.32,18.32,18.32,000,18.32
+2000-09-12,18.59,18.59,18.59,18.59,000,18.59
+2000-09-11,18.40,18.40,18.40,18.40,000,18.40
+2000-09-08,18.46,18.46,18.46,18.46,000,18.46
+2000-09-07,19.42,19.42,19.42,19.42,000,19.42
+2000-09-06,20.79,20.79,20.79,20.79,000,20.79
+2000-09-05,19.82,19.82,19.82,19.82,000,19.82
+2000-09-01,17.53,17.53,17.53,17.53,000,17.53
+2000-08-31,16.84,16.84,16.84,16.84,000,16.84
+2000-08-30,17.69,17.69,17.69,17.69,000,17.69
+2000-08-29,16.89,16.89,16.89,16.89,000,16.89
+2000-08-28,16.54,16.54,16.54,16.54,000,16.54
+2000-08-25,16.53,16.53,16.53,16.53,000,16.53
+2000-08-24,17.04,17.04,17.04,17.04,000,17.04
+2000-08-23,17.38,17.38,17.38,17.38,000,17.38
+2000-08-22,17.47,17.47,17.47,17.47,000,17.47
+2000-08-21,17.35,17.35,17.35,17.35,000,17.35
+2000-08-18,17.05,17.05,17.05,17.05,000,17.05
+2000-08-17,17.48,17.48,17.48,17.48,000,17.48
+2000-08-16,18.02,18.02,18.02,18.02,000,18.02
+2000-08-15,17.98,17.98,17.98,17.98,000,17.98
+2000-08-14,17.88,17.88,17.88,17.88,000,17.88
+2000-08-11,18.55,18.55,18.55,18.55,000,18.55
+2000-08-10,19.19,19.19,19.19,19.19,000,19.19
+2000-08-09,19.18,19.18,19.18,19.18,000,19.18
+2000-08-08,18.79,18.79,18.79,18.79,000,18.79
+2000-08-07,19.03,19.03,19.03,19.03,000,19.03
+2000-08-04,18.62,18.62,18.62,18.62,000,18.62
+2000-08-03,19.99,19.99,19.99,19.99,000,19.99
+2000-08-02,20.00,20.00,20.00,20.00,000,20.00
+2000-08-01,20.55,20.55,20.55,20.55,000,20.55
+2000-07-31,20.74,20.74,20.74,20.74,000,20.74
+2000-07-28,20.84,20.84,20.84,20.84,000,20.84
+2000-07-27,19.60,19.60,19.60,19.60,000,19.60
+2000-07-26,19.67,19.67,19.67,19.67,000,19.67
+2000-07-25,19.39,19.39,19.39,19.39,000,19.39
+2000-07-24,19.92,19.92,19.92,19.92,000,19.92
+2000-07-21,18.94,18.94,18.94,18.94,000,18.94
+2000-07-20,18.94,18.94,18.94,18.94,000,18.94
+2000-07-19,19.65,19.65,19.65,19.65,000,19.65
+2000-07-18,19.75,19.75,19.75,19.75,000,19.75
+2000-07-17,19.45,19.45,19.45,19.45,000,19.45
+2000-07-14,19.32,19.32,19.32,19.32,000,19.32
+2000-07-13,20.03,20.03,20.03,20.03,000,20.03
+2000-07-12,20.03,20.03,20.03,20.03,000,20.03
+2000-07-11,20.11,20.11,20.11,20.11,000,20.11
+2000-07-10,20.33,20.33,20.33,20.33,000,20.33
+2000-07-07,19.22,19.22,19.22,19.22,000,19.22
+2000-07-06,20.94,20.94,20.94,20.94,000,20.94
+2000-07-05,21.16,21.16,21.16,21.16,000,21.16
+2000-07-03,19.83,19.83,19.83,19.83,000,19.83
+2000-06-30,19.54,19.54,19.54,19.54,000,19.54
+2000-06-29,19.70,19.70,19.70,19.70,000,19.70
+2000-06-28,20.29,20.29,20.29,20.29,000,20.29
+2000-06-27,21.80,21.80,21.80,21.80,000,21.80
+2000-06-26,22.45,22.45,22.45,22.45,000,22.45
+2000-06-23,22.34,22.34,22.34,22.34,000,22.34
+2000-06-22,22.00,22.00,22.00,22.00,000,22.00
+2000-06-21,20.61,20.61,20.61,20.61,000,20.61
+2000-06-20,20.88,20.88,20.88,20.88,000,20.88
+2000-06-19,20.63,20.63,20.63,20.63,000,20.63
+2000-06-16,20.50,20.50,20.50,20.50,000,20.50
+2000-06-15,20.68,20.68,20.68,20.68,000,20.68
+2000-06-14,21.48,21.48,21.48,21.48,000,21.48
+2000-06-13,21.67,21.67,21.67,21.67,000,21.67
+2000-06-12,22.32,22.32,22.32,22.32,000,22.32
+2000-06-09,22.14,22.14,22.14,22.14,000,22.14
+2000-06-08,22.04,22.04,22.04,22.04,000,22.04
+2000-06-07,22.48,22.48,22.48,22.48,000,22.48
+2000-06-06,23.05,23.05,23.05,23.05,000,23.05
+2000-06-05,22.71,22.71,22.71,22.71,000,22.71
+2000-06-02,21.48,21.48,21.48,21.48,000,21.48
+2000-06-01,22.36,22.36,22.36,22.36,000,22.36
+2000-05-31,23.65,23.65,23.65,23.65,000,23.65
+2000-05-30,23.62,23.62,23.62,23.62,000,23.62
+2000-05-26,24.47,24.47,24.47,24.47,000,24.47
+2000-05-25,24.58,24.58,24.58,24.58,000,24.58
+2000-05-24,24.32,24.32,24.32,24.32,000,24.32
+2000-05-23,25.87,25.87,25.87,25.87,000,25.87
+2000-05-22,26.00,26.00,26.00,26.00,000,26.00
+2000-05-19,25.44,25.44,25.44,25.44,000,25.44
+2000-05-18,23.96,23.96,23.96,23.96,000,23.96
+2000-05-17,23.98,23.98,23.98,23.98,000,23.98
+2000-05-16,24.34,24.34,24.34,24.34,000,24.34
+2000-05-15,24.86,24.86,24.86,24.86,000,24.86
+2000-05-12,26.05,26.05,26.05,26.05,000,26.05
+2000-05-11,27.76,27.76,27.76,27.76,000,27.76
+2000-05-10,29.87,29.87,29.87,29.87,000,29.87
+2000-05-09,28.93,28.93,28.93,28.93,000,28.93
+2000-05-08,28.20,28.20,28.20,28.20,000,28.20
+2000-05-05,27.53,27.53,27.53,27.53,000,27.53
+2000-05-04,30.77,30.77,30.77,30.77,000,30.77
+2000-05-03,31.63,31.63,31.63,31.63,000,31.63
+2000-05-02,28.50,28.50,28.50,28.50,000,28.50
+2000-05-01,25.88,25.88,25.88,25.88,000,25.88
+2000-04-28,26.20,26.20,26.20,26.20,000,26.20
+2000-04-27,26.19,26.19,26.19,26.19,000,26.19
+2000-04-26,26.97,26.97,26.97,26.97,000,26.97
+2000-04-25,25.24,25.24,25.24,25.24,000,25.24
+2000-04-24,27.37,27.37,27.37,27.37,000,27.37
+2000-04-20,25.85,25.85,25.85,25.85,000,25.85
+2000-04-19,27.02,27.02,27.02,27.02,000,27.02
+2000-04-18,26.12,26.12,26.12,26.12,000,26.12
+2000-04-17,28.95,28.95,28.95,28.95,000,28.95
+2000-04-14,33.49,33.49,33.49,33.49,000,33.49
+2000-04-13,29.40,29.40,29.40,29.40,000,29.40
+2000-04-12,27.85,27.85,27.85,27.85,000,27.85
+2000-04-11,27.25,27.25,27.25,27.25,000,27.25
+2000-04-10,25.99,25.99,25.99,25.99,000,25.99
+2000-04-07,24.39,24.39,24.39,24.39,000,24.39
+2000-04-06,27.15,27.15,27.15,27.15,000,27.15
+2000-04-05,28.41,28.41,28.41,28.41,000,28.41
+2000-04-04,27.12,27.12,27.12,27.12,000,27.12
+2000-04-03,24.03,24.03,24.03,24.03,000,24.03
+2000-03-31,23.67,23.67,23.67,23.67,000,23.67
+2000-03-30,24.42,24.42,24.42,24.42,000,24.42
+2000-03-29,24.10,24.10,24.10,24.10,000,24.10
+2000-03-28,24.86,24.86,24.86,24.86,000,24.86
+2000-03-27,24.53,24.53,24.53,24.53,000,24.53
+2000-03-24,23.31,23.31,23.31,23.31,000,23.31
+2000-03-23,22.26,22.26,22.26,22.26,000,22.26
+2000-03-22,21.49,21.49,21.49,21.49,000,21.49
+2000-03-21,21.70,21.70,21.70,21.70,000,21.70
+2000-03-20,22.96,22.96,22.96,22.96,000,22.96
+2000-03-17,22.37,22.37,22.37,22.37,000,22.37
+2000-03-16,20.77,20.77,20.77,20.77,000,20.77
+2000-03-15,22.34,22.34,22.34,22.34,000,22.34
+2000-03-14,24.41,24.41,24.41,24.41,000,24.41
+2000-03-13,22.85,22.85,22.85,22.85,000,22.85
+2000-03-10,21.24,21.24,21.24,21.24,000,21.24
+2000-03-09,22.21,22.21,22.21,22.21,000,22.21
+2000-03-08,23.82,23.82,23.82,23.82,000,23.82
+2000-03-07,24.31,24.31,24.31,24.31,000,24.31
+2000-03-06,21.50,21.50,21.50,21.50,000,21.50
+2000-03-03,19.21,19.21,19.21,19.21,000,19.21
+2000-03-02,21.06,21.06,21.06,21.06,000,21.06
+2000-03-01,21.64,21.64,21.64,21.64,000,21.64
+2000-02-29,23.37,23.37,23.37,23.37,000,23.37
+2000-02-28,24.68,24.68,24.68,24.68,000,24.68
+2000-02-25,25.20,25.20,25.20,25.20,000,25.20
+2000-02-24,24.38,24.38,24.38,24.38,000,24.38
+2000-02-23,23.89,23.89,23.89,23.89,000,23.89
+2000-02-22,25.86,25.86,25.86,25.86,000,25.86
+2000-02-18,26.00,26.00,26.00,26.00,000,26.00
+2000-02-17,23.17,23.17,23.17,23.17,000,23.17
+2000-02-16,23.51,23.51,23.51,23.51,000,23.51
+2000-02-15,22.92,22.92,22.92,22.92,000,22.92
+2000-02-14,24.38,24.38,24.38,24.38,000,24.38
+2000-02-11,24.42,24.42,24.42,24.42,000,24.42
+2000-02-10,23.07,23.07,23.07,23.07,000,23.07
+2000-02-09,22.90,22.90,22.90,22.90,000,22.90
+2000-02-08,21.25,21.25,21.25,21.25,000,21.25
+2000-02-07,22.79,22.79,22.79,22.79,000,22.79
+2000-02-04,21.54,21.54,21.54,21.54,000,21.54
+2000-02-03,22.01,22.01,22.01,22.01,000,22.01
+2000-02-02,23.12,23.12,23.12,23.12,000,23.12
+2000-02-01,23.45,23.45,23.45,23.45,000,23.45
+2000-01-31,24.95,24.95,24.95,24.95,000,24.95
+2000-01-28,26.14,26.14,26.14,26.14,000,26.14
+2000-01-27,23.54,23.54,23.54,23.54,000,23.54
+2000-01-26,23.03,23.03,23.03,23.03,000,23.03
+2000-01-25,23.02,23.02,23.02,23.02,000,23.02
+2000-01-24,24.07,24.07,24.07,24.07,000,24.07
+2000-01-21,20.82,20.82,20.82,20.82,000,20.82
+2000-01-20,21.75,21.75,21.75,21.75,000,21.75
+2000-01-19,21.72,21.72,21.72,21.72,000,21.72
+2000-01-18,21.50,21.50,21.50,21.50,000,21.50
+2000-01-14,19.66,19.66,19.66,19.66,000,19.66
+2000-01-13,21.71,21.71,21.71,21.71,000,21.71
+2000-01-12,22.84,22.84,22.84,22.84,000,22.84
+2000-01-11,22.50,22.50,22.50,22.50,000,22.50
+2000-01-10,21.71,21.71,21.71,21.71,000,21.71
+2000-01-07,21.72,21.72,21.72,21.72,000,21.72
+2000-01-06,25.73,25.73,25.73,25.73,000,25.73
+2000-01-05,26.41,26.41,26.41,26.41,000,26.41
+2000-01-04,27.01,27.01,27.01,27.01,000,27.01
+2000-01-03,24.21,24.21,24.21,24.21,000,24.21
+1999-12-31,23.40,23.40,23.40,23.40,000,23.40
+1999-12-30,23.91,23.91,23.91,23.91,000,23.91
+1999-12-29,23.09,23.09,23.09,23.09,000,23.09
+1999-12-28,22.97,22.97,22.97,22.97,000,22.97
+1999-12-27,23.07,23.07,23.07,23.07,000,23.07
+1999-12-23,21.12,21.12,21.12,21.12,000,21.12
+1999-12-22,22.43,22.43,22.43,22.43,000,22.43
+1999-12-21,22.66,22.66,22.66,22.66,000,22.66
+1999-12-20,23.78,23.78,23.78,23.78,000,23.78
+1999-12-17,21.35,21.35,21.35,21.35,000,21.35
+1999-12-16,21.91,21.91,21.91,21.91,000,21.91
+1999-12-15,22.03,22.03,22.03,22.03,000,22.03
+1999-12-14,23.06,23.06,23.06,23.06,000,23.06
+1999-12-13,21.72,21.72,21.72,21.72,000,21.72
+1999-12-10,21.48,21.48,21.48,21.48,000,21.48
+1999-12-09,21.19,21.19,21.19,21.19,000,21.19
+1999-12-08,21.25,21.25,21.25,21.25,000,21.25
+1999-12-07,21.09,21.09,21.09,21.09,000,21.09
+1999-12-06,20.58,20.58,20.58,20.58,000,20.58
+1999-12-03,19.32,19.32,19.32,19.32,000,19.32
+1999-12-02,21.77,21.77,21.77,21.77,000,21.77
+1999-12-01,22.23,22.23,22.23,22.23,000,22.23
+1999-11-30,24.18,24.18,24.18,24.18,000,24.18
+1999-11-29,23.57,23.57,23.57,23.57,000,23.57
+1999-11-26,22.33,22.33,22.33,22.33,000,22.33
+1999-11-24,20.26,20.26,20.26,20.26,000,20.26
+1999-11-23,21.00,21.00,21.00,21.00,000,21.00
+1999-11-22,19.98,19.98,19.98,19.98,000,19.98
+1999-11-19,19.11,19.11,19.11,19.11,000,19.11
+1999-11-18,19.76,19.76,19.76,19.76,000,19.76
+1999-11-17,20.96,20.96,20.96,20.96,000,20.96
+1999-11-16,20.73,20.73,20.73,20.73,000,20.73
+1999-11-15,22.74,22.74,22.74,22.74,000,22.74
+1999-11-12,21.65,21.65,21.65,21.65,000,21.65
+1999-11-11,22.07,22.07,22.07,22.07,000,22.07
+1999-11-10,22.26,22.26,22.26,22.26,000,22.26
+1999-11-09,22.70,22.70,22.70,22.70,000,22.70
+1999-11-08,21.87,21.87,21.87,21.87,000,21.87
+1999-11-05,21.66,21.66,21.66,21.66,000,21.66
+1999-11-04,23.00,23.00,23.00,23.00,000,23.00
+1999-11-03,23.16,23.16,23.16,23.16,000,23.16
+1999-11-02,23.10,23.10,23.10,23.10,000,23.10
+1999-11-01,22.09,22.09,22.09,22.09,000,22.09
+1999-10-29,22.20,22.20,22.20,22.20,000,22.20
+1999-10-28,21.34,21.34,21.34,21.34,000,21.34
+1999-10-27,24.20,24.20,24.20,24.20,000,24.20
+1999-10-26,24.26,24.26,24.26,24.26,000,24.26
+1999-10-25,23.60,23.60,23.60,23.60,000,23.60
+1999-10-22,21.64,21.64,21.64,21.64,000,21.64
+1999-10-21,24.02,24.02,24.02,24.02,000,24.02
+1999-10-20,23.90,23.90,23.90,23.90,000,23.90
+1999-10-19,26.56,26.56,26.56,26.56,000,26.56
+1999-10-18,28.19,28.19,28.19,28.19,000,28.19
+1999-10-15,28.75,28.75,28.75,28.75,000,28.75
+1999-10-14,26.05,26.05,26.05,26.05,000,26.05
+1999-10-13,25.96,25.96,25.96,25.96,000,25.96
+1999-10-12,22.84,22.84,22.84,22.84,000,22.84
+1999-10-11,20.63,20.63,20.63,20.63,000,20.63
+1999-10-08,20.49,20.49,20.49,20.49,000,20.49
+1999-10-07,23.58,23.58,23.58,23.58,000,23.58
+1999-10-06,22.06,22.06,22.06,22.06,000,22.06
+1999-10-05,24.79,24.79,24.79,24.79,000,24.79
+1999-10-04,24.46,24.46,24.46,24.46,000,24.46
+1999-10-01,24.93,24.93,24.93,24.93,000,24.93
+1999-09-30,25.41,25.41,25.41,25.41,000,25.41
+1999-09-29,26.49,26.49,26.49,26.49,000,26.49
+1999-09-28,26.06,26.06,26.06,26.06,000,26.06
+1999-09-27,26.40,26.40,26.40,26.40,000,26.40
+1999-09-24,27.79,27.79,27.79,27.79,000,27.79
+1999-09-23,27.84,27.84,27.84,27.84,000,27.84
+1999-09-22,25.19,25.19,25.19,25.19,000,25.19
+1999-09-21,25.65,25.65,25.65,25.65,000,25.65
+1999-09-20,24.03,24.03,24.03,24.03,000,24.03
+1999-09-17,23.30,23.30,23.30,23.30,000,23.30
+1999-09-16,25.25,25.25,25.25,25.25,000,25.25
+1999-09-15,24.56,24.56,24.56,24.56,000,24.56
+1999-09-14,23.77,23.77,23.77,23.77,000,23.77
+1999-09-13,22.89,22.89,22.89,22.89,000,22.89
+1999-09-10,22.03,22.03,22.03,22.03,000,22.03
+1999-09-09,23.01,23.01,23.01,23.01,000,23.01
+1999-09-08,23.82,23.82,23.82,23.82,000,23.82
+1999-09-07,23.44,23.44,23.44,23.44,000,23.44
+1999-09-03,20.98,20.98,20.98,20.98,000,20.98
+1999-09-02,24.53,24.53,24.53,24.53,000,24.53
+1999-09-01,22.93,22.93,22.93,22.93,000,22.93
+1999-08-31,24.45,24.45,24.45,24.45,000,24.45
+1999-08-30,24.63,24.63,24.63,24.63,000,24.63
+1999-08-27,21.83,21.83,21.83,21.83,000,21.83
+1999-08-26,21.21,21.21,21.21,21.21,000,21.21
+1999-08-25,20.96,20.96,20.96,20.96,000,20.96
+1999-08-24,22.40,22.40,22.40,22.40,000,22.40
+1999-08-23,22.55,22.55,22.55,22.55,000,22.55
+1999-08-20,22.95,22.95,22.95,22.95,000,22.95
+1999-08-19,24.39,24.39,24.39,24.39,000,24.39
+1999-08-18,23.30,23.30,23.30,23.30,000,23.30
+1999-08-17,21.67,21.67,21.67,21.67,000,21.67
+1999-08-16,23.07,23.07,23.07,23.07,000,23.07
+1999-08-13,22.31,22.31,22.31,22.31,000,22.31
+1999-08-12,25.03,25.03,25.03,25.03,000,25.03
+1999-08-11,25.39,25.39,25.39,25.39,000,25.39
+1999-08-10,28.45,28.45,28.45,28.45,000,28.45
+1999-08-09,27.66,27.66,27.66,27.66,000,27.66
+1999-08-06,26.60,26.60,26.60,26.60,000,26.60
+1999-08-05,27.01,27.01,27.01,27.01,000,27.01
+1999-08-04,27.40,27.40,27.40,27.40,000,27.40
+1999-08-03,26.27,26.27,26.27,26.27,000,26.27
+1999-08-02,25.59,25.59,25.59,25.59,000,25.59
+1999-07-30,24.64,24.64,24.64,24.64,000,24.64
+1999-07-29,24.52,24.52,24.52,24.52,000,24.52
+1999-07-28,22.85,22.85,22.85,22.85,000,22.85
+1999-07-27,23.23,23.23,23.23,23.23,000,23.23
+1999-07-26,24.98,24.98,24.98,24.98,000,24.98
+1999-07-23,23.32,23.32,23.32,23.32,000,23.32
+1999-07-22,23.05,23.05,23.05,23.05,000,23.05
+1999-07-21,21.46,21.46,21.46,21.46,000,21.46
+1999-07-20,21.79,21.79,21.79,21.79,000,21.79
+1999-07-19,19.07,19.07,19.07,19.07,000,19.07
+1999-07-16,17.42,17.42,17.42,17.42,000,17.42
+1999-07-15,18.68,18.68,18.68,18.68,000,18.68
+1999-07-14,19.71,19.71,19.71,19.71,000,19.71
+1999-07-13,19.95,19.95,19.95,19.95,000,19.95
+1999-07-12,19.73,19.73,19.73,19.73,000,19.73
+1999-07-09,17.96,17.96,17.96,17.96,000,17.96
+1999-07-08,19.47,19.47,19.47,19.47,000,19.47
+1999-07-07,20.35,20.35,20.35,20.35,000,20.35
+1999-07-06,20.73,20.73,20.73,20.73,000,20.73
+1999-07-02,18.66,18.66,18.66,18.66,000,18.66
+1999-07-01,19.69,19.69,19.69,19.69,000,19.69
+1999-06-30,21.09,21.09,21.09,21.09,000,21.09
+1999-06-29,22.51,22.51,22.51,22.51,000,22.51
+1999-06-28,22.63,22.63,22.63,22.63,000,22.63
+1999-06-25,21.76,21.76,21.76,21.76,000,21.76
+1999-06-24,23.06,23.06,23.06,23.06,000,23.06
+1999-06-23,21.32,21.32,21.32,21.32,000,21.32
+1999-06-22,21.70,21.70,21.70,21.70,000,21.70
+1999-06-21,21.81,21.81,21.81,21.81,000,21.81
+1999-06-18,21.75,21.75,21.75,21.75,000,21.75
+1999-06-17,21.95,21.95,21.95,21.95,000,21.95
+1999-06-16,22.40,22.40,22.40,22.40,000,22.40
+1999-06-15,25.91,25.91,25.91,25.91,000,25.91
+1999-06-14,26.51,26.51,26.51,26.51,000,26.51
+1999-06-11,25.90,25.90,25.90,25.90,000,25.90
+1999-06-10,25.32,25.32,25.32,25.32,000,25.32
+1999-06-09,23.90,23.90,23.90,23.90,000,23.90
+1999-06-08,24.02,24.02,24.02,24.02,000,24.02
+1999-06-07,23.78,23.78,23.78,23.78,000,23.78
+1999-06-04,23.43,23.43,23.43,23.43,000,23.43
+1999-06-03,26.20,26.20,26.20,26.20,000,26.20
+1999-06-02,26.21,26.21,26.21,26.21,000,26.21
+1999-06-01,26.62,26.62,26.62,26.62,000,26.62
+1999-05-28,25.39,25.39,25.39,25.39,000,25.39
+1999-05-27,28.12,28.12,28.12,28.12,000,28.12
+1999-05-26,27.57,27.57,27.57,27.57,000,27.57
+1999-05-25,28.90,28.90,28.90,28.90,000,28.90
+1999-05-24,27.62,27.62,27.62,27.62,000,27.62
+1999-05-21,24.40,24.40,24.40,24.40,000,24.40
+1999-05-20,24.46,24.46,24.46,24.46,000,24.46
+1999-05-19,25.08,25.08,25.08,25.08,000,25.08
+1999-05-18,27.26,27.26,27.26,27.26,000,27.26
+1999-05-17,27.28,27.28,27.28,27.28,000,27.28
+1999-05-14,26.86,26.86,26.86,26.86,000,26.86
+1999-05-13,25.02,25.02,25.02,25.02,000,25.02
+1999-05-12,26.13,26.13,26.13,26.13,000,26.13
+1999-05-11,25.62,25.62,25.62,25.62,000,25.62
+1999-05-10,26.62,26.62,26.62,26.62,000,26.62
+1999-05-07,25.36,25.36,25.36,25.36,000,25.36
+1999-05-06,27.44,27.44,27.44,27.44,000,27.44
+1999-05-05,25.19,25.19,25.19,25.19,000,25.19
+1999-05-04,25.62,25.62,25.62,25.62,000,25.62
+1999-05-03,24.15,24.15,24.15,24.15,000,24.15
+1999-04-30,25.07,25.07,25.07,25.07,000,25.07
+1999-04-29,25.06,25.06,25.06,25.06,000,25.06
+1999-04-28,24.40,24.40,24.40,24.40,000,24.40
+1999-04-27,23.36,23.36,23.36,23.36,000,23.36
+1999-04-26,23.53,23.53,23.53,23.53,000,23.53
+1999-04-23,22.76,22.76,22.76,22.76,000,22.76
+1999-04-22,22.62,22.62,22.62,22.62,000,22.62
+1999-04-21,23.31,23.31,23.31,23.31,000,23.31
+1999-04-20,25.02,25.02,25.02,25.02,000,25.02
+1999-04-19,26.42,26.42,26.42,26.42,000,26.42
+1999-04-16,23.90,23.90,23.90,23.90,000,23.90
+1999-04-15,23.93,23.93,23.93,23.93,000,23.93
+1999-04-14,24.94,24.94,24.94,24.94,000,24.94
+1999-04-13,22.73,22.73,22.73,22.73,000,22.73
+1999-04-12,21.93,21.93,21.93,21.93,000,21.93
+1999-04-09,21.77,21.77,21.77,21.77,000,21.77
+1999-04-08,22.59,22.59,22.59,22.59,000,22.59
+1999-04-07,22.81,22.81,22.81,22.81,000,22.81
+1999-04-06,22.65,22.65,22.65,22.65,000,22.65
+1999-04-05,22.19,22.19,22.19,22.19,000,22.19
+1999-04-01,22.06,22.06,22.06,22.06,000,22.06
+1999-03-31,23.26,23.26,23.26,23.26,000,23.26
+1999-03-30,22.73,22.73,22.73,22.73,000,22.73
+1999-03-29,23.54,23.54,23.54,23.54,000,23.54
+1999-03-26,24.04,24.04,24.04,24.04,000,24.04
+1999-03-25,24.33,24.33,24.33,24.33,000,24.33
+1999-03-24,26.60,26.60,26.60,26.60,000,26.60
+1999-03-23,27.27,27.27,27.27,27.27,000,27.27
+1999-03-22,25.00,25.00,25.00,25.00,000,25.00
+1999-03-19,24.32,24.32,24.32,24.32,000,24.32
+1999-03-18,24.13,24.13,24.13,24.13,000,24.13
+1999-03-17,25.57,25.57,25.57,25.57,000,25.57
+1999-03-16,25.15,25.15,25.15,25.15,000,25.15
+1999-03-15,25.24,25.24,25.24,25.24,000,25.24
+1999-03-12,24.84,24.84,24.84,24.84,000,24.84
+1999-03-11,24.37,24.37,24.37,24.37,000,24.37
+1999-03-10,24.79,24.79,24.79,24.79,000,24.79
+1999-03-09,25.02,25.02,25.02,25.02,000,25.02
+1999-03-08,24.54,24.54,24.54,24.54,000,24.54
+1999-03-05,24.08,24.08,24.08,24.08,000,24.08
+1999-03-04,26.67,26.67,26.67,26.67,000,26.67
+1999-03-03,29.04,29.04,29.04,29.04,000,29.04
+1999-03-02,29.22,29.22,29.22,29.22,000,29.22
+1999-03-01,28.37,28.37,28.37,28.37,000,28.37
+1999-02-26,27.88,27.88,27.88,27.88,000,27.88
+1999-02-25,28.01,28.01,28.01,28.01,000,28.01
+1999-02-24,27.21,27.21,27.21,27.21,000,27.21
+1999-02-23,26.49,26.49,26.49,26.49,000,26.49
+1999-02-22,25.87,25.87,25.87,25.87,000,25.87
+1999-02-19,29.30,29.30,29.30,29.30,000,29.30
+1999-02-18,30.45,30.45,30.45,30.45,000,30.45
+1999-02-17,30.65,30.65,30.65,30.65,000,30.65
+1999-02-16,29.65,29.65,29.65,29.65,000,29.65
+1999-02-12,29.76,29.76,29.76,29.76,000,29.76
+1999-02-11,27.42,27.42,27.42,27.42,000,27.42
+1999-02-10,30.45,30.45,30.45,30.45,000,30.45
+1999-02-09,31.36,31.36,31.36,31.36,000,31.36
+1999-02-08,30.27,30.27,30.27,30.27,000,30.27
+1999-02-05,29.67,29.67,29.67,29.67,000,29.67
+1999-02-04,29.48,29.48,29.48,29.48,000,29.48
+1999-02-03,27.88,27.88,27.88,27.88,000,27.88
+1999-02-02,28.16,28.16,28.16,28.16,000,28.16
+1999-02-01,27.67,27.67,27.67,27.67,000,27.67
+1999-01-29,26.25,26.25,26.25,26.25,000,26.25
+1999-01-28,28.11,28.11,28.11,28.11,000,28.11
+1999-01-27,29.73,29.73,29.73,29.73,000,29.73
+1999-01-26,29.23,29.23,29.23,29.23,000,29.23
+1999-01-25,31.13,31.13,31.13,31.13,000,31.13
+1999-01-22,31.95,31.95,31.95,31.95,000,31.95
+1999-01-21,30.92,30.92,30.92,30.92,000,30.92
+1999-01-20,28.60,28.60,28.60,28.60,000,28.60
+1999-01-19,29.24,29.24,29.24,29.24,000,29.24
+1999-01-15,29.24,29.24,29.24,29.24,000,29.24
+1999-01-14,32.98,32.98,32.98,32.98,000,32.98
+1999-01-13,30.11,30.11,30.11,30.11,000,30.11
+1999-01-12,28.10,28.10,28.10,28.10,000,28.10
+1999-01-11,25.46,25.46,25.46,25.46,000,25.46
+1999-01-08,23.28,23.28,23.28,23.28,000,23.28
+1999-01-07,24.37,24.37,24.37,24.37,000,24.37
+1999-01-06,23.34,23.34,23.34,23.34,000,23.34
+1999-01-05,24.46,24.46,24.46,24.46,000,24.46
+1999-01-04,26.17,26.17,26.17,26.17,000,26.17
+1998-12-31,24.42,24.42,24.42,24.42,000,24.42
+1998-12-30,23.34,23.34,23.34,23.34,000,23.34
+1998-12-29,22.18,22.18,22.18,22.18,000,22.18
+1998-12-28,23.50,23.50,23.50,23.50,000,23.50
+1998-12-24,21.48,21.48,21.48,21.48,000,21.48
+1998-12-23,20.21,20.21,20.21,20.21,000,20.21
+1998-12-22,22.78,22.78,22.78,22.78,000,22.78
+1998-12-21,23.86,23.86,23.86,23.86,000,23.86
+1998-12-18,25.04,25.04,25.04,25.04,000,25.04
+1998-12-17,27.96,27.96,27.96,27.96,000,27.96
+1998-12-16,29.96,29.96,29.96,29.96,000,29.96
+1998-12-15,29.42,29.42,29.42,29.42,000,29.42
+1998-12-14,31.31,31.31,31.31,31.31,000,31.31
+1998-12-11,27.72,27.72,27.72,27.72,000,27.72
+1998-12-10,26.81,26.81,26.81,26.81,000,26.81
+1998-12-09,25.66,25.66,25.66,25.66,000,25.66
+1998-12-08,25.58,25.58,25.58,25.58,000,25.58
+1998-12-07,24.90,24.90,24.90,24.90,000,24.90
+1998-12-04,25.31,25.31,25.31,25.31,000,25.31
+1998-12-03,28.70,28.70,28.70,28.70,000,28.70
+1998-12-02,25.43,25.43,25.43,25.43,000,25.43
+1998-12-01,24.97,24.97,24.97,24.97,000,24.97
+1998-11-30,26.01,26.01,26.01,26.01,000,26.01
+1998-11-27,22.09,22.09,22.09,22.09,000,22.09
+1998-11-25,22.15,22.15,22.15,22.15,000,22.15
+1998-11-24,23.28,23.28,23.28,23.28,000,23.28
+1998-11-23,21.84,21.84,21.84,21.84,000,21.84
+1998-11-20,22.47,22.47,22.47,22.47,000,22.47
+1998-11-19,25.50,25.50,25.50,25.50,000,25.50
+1998-11-18,27.13,27.13,27.13,27.13,000,27.13
+1998-11-17,27.95,27.95,27.95,27.95,000,27.95
+1998-11-16,28.90,28.90,28.90,28.90,000,28.90
+1998-11-13,29.03,29.03,29.03,29.03,000,29.03
+1998-11-12,29.28,29.28,29.28,29.28,000,29.28
+1998-11-11,28.47,28.47,28.47,28.47,000,28.47
+1998-11-10,28.17,28.17,28.17,28.17,000,28.17
+1998-11-09,28.09,28.09,28.09,28.09,000,28.09
+1998-11-06,25.70,25.70,25.70,25.70,000,25.70
+1998-11-05,26.01,26.01,26.01,26.01,000,26.01
+1998-11-04,27.37,27.37,27.37,27.37,000,27.37
+1998-11-03,27.76,27.76,27.76,27.76,000,27.76
+1998-11-02,27.26,27.26,27.26,27.26,000,27.26
+1998-10-30,28.05,28.05,28.05,28.05,000,28.05
+1998-10-29,29.50,29.50,29.50,29.50,000,29.50
+1998-10-28,32.42,32.42,32.42,32.42,000,32.42
+1998-10-27,32.95,32.95,32.95,32.95,000,32.95
+1998-10-26,32.38,32.38,32.38,32.38,000,32.38
+1998-10-23,32.27,32.27,32.27,32.27,000,32.27
+1998-10-22,31.53,31.53,31.53,31.53,000,31.53
+1998-10-21,33.21,33.21,33.21,33.21,000,33.21
+1998-10-20,33.11,33.11,33.11,33.11,000,33.11
+1998-10-19,33.13,33.13,33.13,33.13,000,33.13
+1998-10-16,34.82,34.82,34.82,34.82,000,34.82
+1998-10-15,33.34,33.34,33.34,33.34,000,33.34
+1998-10-14,38.96,38.96,38.96,38.96,000,38.96
+1998-10-13,40.23,40.23,40.23,40.23,000,40.23
+1998-10-12,40.07,40.07,40.07,40.07,000,40.07
+1998-10-09,41.78,41.78,41.78,41.78,000,41.78
+1998-10-08,45.74,45.74,45.74,45.74,000,45.74
+1998-10-07,43.51,43.51,43.51,43.51,000,43.51
+1998-10-06,41.20,41.20,41.20,41.20,000,41.20
+1998-10-05,42.81,42.81,42.81,42.81,000,42.81
+1998-10-02,40.47,40.47,40.47,40.47,000,40.47
+1998-10-01,43.48,43.48,43.48,43.48,000,43.48
+1998-09-30,40.95,40.95,40.95,40.95,000,40.95
+1998-09-29,36.08,36.08,36.08,36.08,000,36.08
+1998-09-28,34.87,34.87,34.87,34.87,000,34.87
+1998-09-25,34.55,34.55,34.55,34.55,000,34.55
+1998-09-24,34.66,34.66,34.66,34.66,000,34.66
+1998-09-23,32.47,32.47,32.47,32.47,000,32.47
+1998-09-22,36.62,36.62,36.62,36.62,000,36.62
+1998-09-21,38.58,38.58,38.58,38.58,000,38.58
+1998-09-18,38.63,38.63,38.63,38.63,000,38.63
+1998-09-17,39.23,39.23,39.23,39.23,000,39.23
+1998-09-16,35.94,35.94,35.94,35.94,000,35.94
+1998-09-15,36.58,36.58,36.58,36.58,000,36.58
+1998-09-14,38.57,38.57,38.57,38.57,000,38.57
+1998-09-11,43.74,43.74,43.74,43.74,000,43.74
+1998-09-10,45.29,45.29,45.29,45.29,000,45.29
+1998-09-09,39.66,39.66,39.66,39.66,000,39.66
+1998-09-08,37.90,37.90,37.90,37.90,000,37.90
+1998-09-04,43.31,43.31,43.31,43.31,000,43.31
+1998-09-03,41.43,41.43,41.43,41.43,000,41.43
+1998-09-02,36.76,36.76,36.76,36.76,000,36.76
+1998-09-01,36.48,36.48,36.48,36.48,000,36.48
+1998-08-31,44.28,44.28,44.28,44.28,000,44.28
+1998-08-28,39.60,39.60,39.60,39.60,000,39.60
+1998-08-27,38.55,38.55,38.55,38.55,000,38.55
+1998-08-26,31.14,31.14,31.14,31.14,000,31.14
+1998-08-25,30.33,30.33,30.33,30.33,000,30.33
+1998-08-24,31.80,31.80,31.80,31.80,000,31.80
+1998-08-21,33.14,33.14,33.14,33.14,000,33.14
+1998-08-20,30.00,30.00,30.00,30.00,000,30.00
+1998-08-19,28.69,28.69,28.69,28.69,000,28.69
+1998-08-18,28.40,28.40,28.40,28.40,000,28.40
+1998-08-17,31.86,31.86,31.86,31.86,000,31.86
+1998-08-14,34.75,34.75,34.75,34.75,000,34.75
+1998-08-13,29.92,29.92,29.92,29.92,000,29.92
+1998-08-12,28.55,28.55,28.55,28.55,000,28.55
+1998-08-11,31.91,31.91,31.91,31.91,000,31.91
+1998-08-10,28.75,28.75,28.75,28.75,000,28.75
+1998-08-07,27.02,27.02,27.02,27.02,000,27.02
+1998-08-06,28.20,28.20,28.20,28.20,000,28.20
+1998-08-05,29.83,29.83,29.83,29.83,000,29.83
+1998-08-04,31.06,31.06,31.06,31.06,000,31.06
+1998-08-03,25.98,25.98,25.98,25.98,000,25.98
+1998-07-31,24.80,24.80,24.80,24.80,000,24.80
+1998-07-30,22.66,22.66,22.66,22.66,000,22.66
+1998-07-29,24.79,24.79,24.79,24.79,000,24.79
+1998-07-28,25.25,25.25,25.25,25.25,000,25.25
+1998-07-27,23.13,23.13,23.13,23.13,000,23.13
+1998-07-24,23.01,23.01,23.01,23.01,000,23.01
+1998-07-23,23.01,23.01,23.01,23.01,000,23.01
+1998-07-22,20.32,20.32,20.32,20.32,000,20.32
+1998-07-21,20.10,20.10,20.10,20.10,000,20.10
+1998-07-20,17.34,17.34,17.34,17.34,000,17.34
+1998-07-17,16.23,16.23,16.23,16.23,000,16.23
+1998-07-16,16.97,16.97,16.97,16.97,000,16.97
+1998-07-15,17.89,17.89,17.89,17.89,000,17.89
+1998-07-14,17.88,17.88,17.88,17.88,000,17.88
+1998-07-13,18.26,18.26,18.26,18.26,000,18.26
+1998-07-10,17.92,17.92,17.92,17.92,000,17.92
+1998-07-09,18.16,18.16,18.16,18.16,000,18.16
+1998-07-08,17.82,17.82,17.82,17.82,000,17.82
+1998-07-07,18.62,18.62,18.62,18.62,000,18.62
+1998-07-06,18.63,18.63,18.63,18.63,000,18.63
+1998-07-02,17.67,17.67,17.67,17.67,000,17.67
+1998-07-01,18.00,18.00,18.00,18.00,000,18.00
+1998-06-30,19.71,19.71,19.71,19.71,000,19.71
+1998-06-29,19.57,19.57,19.57,19.57,000,19.57
+1998-06-26,19.36,19.36,19.36,19.36,000,19.36
+1998-06-25,20.25,20.25,20.25,20.25,000,20.25
+1998-06-24,20.02,20.02,20.02,20.02,000,20.02
+1998-06-23,20.17,20.17,20.17,20.17,000,20.17
+1998-06-22,21.94,21.94,21.94,21.94,000,21.94
+1998-06-19,21.61,21.61,21.61,21.61,000,21.61
+1998-06-18,22.09,22.09,22.09,22.09,000,22.09
+1998-06-17,22.59,22.59,22.59,22.59,000,22.59
+1998-06-16,24.80,24.80,24.80,24.80,000,24.80
+1998-06-15,26.20,26.20,26.20,26.20,000,26.20
+1998-06-12,22.78,22.78,22.78,22.78,000,22.78
+1998-06-11,23.57,23.57,23.57,23.57,000,23.57
+1998-06-10,21.48,21.48,21.48,21.48,000,21.48
+1998-06-09,20.52,20.52,20.52,20.52,000,20.52
+1998-06-08,20.58,20.58,20.58,20.58,000,20.58
+1998-06-05,19.78,19.78,19.78,19.78,000,19.78
+1998-06-04,21.22,21.22,21.22,21.22,000,21.22
+1998-06-03,22.85,22.85,22.85,22.85,000,22.85
+1998-06-02,22.00,22.00,22.00,22.00,000,22.00
+1998-06-01,22.83,22.83,22.83,22.83,000,22.83
+1998-05-29,21.32,21.32,21.32,21.32,000,21.32
+1998-05-28,20.74,20.74,20.74,20.74,000,20.74
+1998-05-27,22.59,22.59,22.59,22.59,000,22.59
+1998-05-26,22.07,22.07,22.07,22.07,000,22.07
+1998-05-22,18.99,18.99,18.99,18.99,000,18.99
+1998-05-21,19.38,19.38,19.38,19.38,000,19.38
+1998-05-20,19.89,19.89,19.89,19.89,000,19.89
+1998-05-19,20.39,20.39,20.39,20.39,000,20.39
+1998-05-18,21.69,21.69,21.69,21.69,000,21.69
+1998-05-15,20.44,20.44,20.44,20.44,000,20.44
+1998-05-14,19.64,19.64,19.64,19.64,000,19.64
+1998-05-13,20.44,20.44,20.44,20.44,000,20.44
+1998-05-12,20.98,20.98,20.98,20.98,000,20.98
+1998-05-11,21.05,21.05,21.05,21.05,000,21.05
+1998-05-08,20.57,20.57,20.57,20.57,000,20.57
+1998-05-07,23.39,23.39,23.39,23.39,000,23.39
+1998-05-06,22.79,22.79,22.79,22.79,000,22.79
+1998-05-05,21.46,21.46,21.46,21.46,000,21.46
+1998-05-04,20.32,20.32,20.32,20.32,000,20.32
+1998-05-01,19.34,19.34,19.34,19.34,000,19.34
+1998-04-30,21.18,21.18,21.18,21.18,000,21.18
+1998-04-29,22.78,22.78,22.78,22.78,000,22.78
+1998-04-28,24.17,24.17,24.17,24.17,000,24.17
+1998-04-27,26.09,26.09,26.09,26.09,000,26.09
+1998-04-24,21.97,21.97,21.97,21.97,000,21.97
+1998-04-23,20.60,20.60,20.60,20.60,000,20.60
+1998-04-22,19.87,19.87,19.87,19.87,000,19.87
+1998-04-21,19.91,19.91,19.91,19.91,000,19.91
+1998-04-20,20.39,20.39,20.39,20.39,000,20.39
+1998-04-17,20.76,20.76,20.76,20.76,000,20.76
+1998-04-16,22.06,22.06,22.06,22.06,000,22.06
+1998-04-15,20.89,20.89,20.89,20.89,000,20.89
+1998-04-14,21.61,21.61,21.61,21.61,000,21.61
+1998-04-13,22.77,22.77,22.77,22.77,000,22.77
+1998-04-09,21.51,21.51,21.51,21.51,000,21.51
+1998-04-08,23.17,23.17,23.17,23.17,000,23.17
+1998-04-07,23.66,23.66,23.66,23.66,000,23.66
+1998-04-06,22.47,22.47,22.47,22.47,000,22.47
+1998-04-03,21.82,21.82,21.82,21.82,000,21.82
+1998-04-02,21.98,21.98,21.98,21.98,000,21.98
+1998-04-01,23.37,23.37,23.37,23.37,000,23.37
+1998-03-31,24.22,24.22,24.22,24.22,000,24.22
+1998-03-30,24.66,24.66,24.66,24.66,000,24.66
+1998-03-27,23.47,23.47,23.47,23.47,000,23.47
+1998-03-26,22.81,22.81,22.81,22.81,000,22.81
+1998-03-25,22.54,22.54,22.54,22.54,000,22.54
+1998-03-24,20.51,20.51,20.51,20.51,000,20.51
+1998-03-23,19.98,19.98,19.98,19.98,000,19.98
+1998-03-20,18.69,18.69,18.69,18.69,000,18.69
+1998-03-19,17.76,17.76,17.76,17.76,000,17.76
+1998-03-18,18.29,18.29,18.29,18.29,000,18.29
+1998-03-17,18.66,18.66,18.66,18.66,000,18.66
+1998-03-16,18.51,18.51,18.51,18.51,000,18.51
+1998-03-13,18.71,18.71,18.71,18.71,000,18.71
+1998-03-12,18.25,18.25,18.25,18.25,000,18.25
+1998-03-11,18.89,18.89,18.89,18.89,000,18.89
+1998-03-10,19.43,19.43,19.43,19.43,000,19.43
+1998-03-09,20.23,20.23,20.23,20.23,000,20.23
+1998-03-06,19.14,19.14,19.14,19.14,000,19.14
+1998-03-05,20.93,20.93,20.93,20.93,000,20.93
+1998-03-04,19.58,19.58,19.58,19.58,000,19.58
+1998-03-03,19.04,19.04,19.04,19.04,000,19.04
+1998-03-02,19.19,19.19,19.19,19.19,000,19.19
+1998-02-27,18.55,18.55,18.55,18.55,000,18.55
+1998-02-26,18.63,18.63,18.63,18.63,000,18.63
+1998-02-25,18.62,18.62,18.62,18.62,000,18.62
+1998-02-24,19.35,19.35,19.35,19.35,000,19.35
+1998-02-23,18.99,18.99,18.99,18.99,000,18.99
+1998-02-20,19.00,19.00,19.00,19.00,000,19.00
+1998-02-19,19.88,19.88,19.88,19.88,000,19.88
+1998-02-18,19.66,19.66,19.66,19.66,000,19.66
+1998-02-17,20.76,20.76,20.76,20.76,000,20.76
+1998-02-13,19.84,19.84,19.84,19.84,000,19.84
+1998-02-12,19.73,19.73,19.73,19.73,000,19.73
+1998-02-11,20.38,20.38,20.38,20.38,000,20.38
+1998-02-10,20.66,20.66,20.66,20.66,000,20.66
+1998-02-09,21.55,21.55,21.55,21.55,000,21.55
+1998-02-06,20.51,20.51,20.51,20.51,000,20.51
+1998-02-05,21.29,21.29,21.29,21.29,000,21.29
+1998-02-04,20.55,20.55,20.55,20.55,000,20.55
+1998-02-03,20.67,20.67,20.67,20.67,000,20.67
+1998-02-02,21.36,21.36,21.36,21.36,000,21.36
+1998-01-30,21.47,21.47,21.47,21.47,000,21.47
+1998-01-29,21.65,21.65,21.65,21.65,000,21.65
+1998-01-28,22.06,22.06,22.06,22.06,000,22.06
+1998-01-27,22.27,22.27,22.27,22.27,000,22.27
+1998-01-26,23.97,23.97,23.97,23.97,000,23.97
+1998-01-23,23.32,23.32,23.32,23.32,000,23.32
+1998-01-22,23.16,23.16,23.16,23.16,000,23.16
+1998-01-21,22.53,22.53,22.53,22.53,000,22.53
+1998-01-20,21.65,21.65,21.65,21.65,000,21.65
+1998-01-16,21.65,21.65,21.65,21.65,000,21.65
+1998-01-15,23.45,23.45,23.45,23.45,000,23.45
+1998-01-14,23.75,23.75,23.75,23.75,000,23.75
+1998-01-13,25.17,25.17,25.17,25.17,000,25.17
+1998-01-12,28.02,28.02,28.02,28.02,000,28.02
+1998-01-09,28.69,28.69,28.69,28.69,000,28.69
+1998-01-08,26.01,26.01,26.01,26.01,000,26.01
+1998-01-07,25.07,25.07,25.07,25.07,000,25.07
+1998-01-06,25.66,25.66,25.66,25.66,000,25.66
+1998-01-05,24.36,24.36,24.36,24.36,000,24.36
+1998-01-02,23.42,23.42,23.42,23.42,000,23.42
+1997-12-31,24.01,24.01,24.01,24.01,000,24.01
+1997-12-30,24.38,24.38,24.38,24.38,000,24.38
+1997-12-29,26.79,26.79,26.79,26.79,000,26.79
+1997-12-26,29.27,29.27,29.27,29.27,000,29.27
+1997-12-24,30.27,30.27,30.27,30.27,000,30.27
+1997-12-23,29.86,29.86,29.86,29.86,000,29.86
+1997-12-22,28.56,28.56,28.56,28.56,000,28.56
+1997-12-19,29.18,29.18,29.18,29.18,000,29.18
+1997-12-18,27.19,27.19,27.19,27.19,000,27.19
+1997-12-17,26.33,26.33,26.33,26.33,000,26.33
+1997-12-16,26.11,26.11,26.11,26.11,000,26.11
+1997-12-15,27.37,27.37,27.37,27.37,000,27.37
+1997-12-12,27.92,27.92,27.92,27.92,000,27.92
+1997-12-11,27.63,27.63,27.63,27.63,000,27.63
+1997-12-10,24.55,24.55,24.55,24.55,000,24.55
+1997-12-09,23.36,23.36,23.36,23.36,000,23.36
+1997-12-08,23.22,23.22,23.22,23.22,000,23.22
+1997-12-05,22.65,22.65,22.65,22.65,000,22.65
+1997-12-04,23.84,23.84,23.84,23.84,000,23.84
+1997-12-03,23.92,23.92,23.92,23.92,000,23.92
+1997-12-02,25.66,25.66,25.66,25.66,000,25.66
+1997-12-01,26.01,26.01,26.01,26.01,000,26.01
+1997-11-28,27.43,27.43,27.43,27.43,000,27.43
+1997-11-25,28.95,28.95,28.95,28.95,000,28.95
+1997-11-24,29.80,29.80,29.80,29.80,000,29.80
+1997-11-21,26.65,26.65,26.65,26.65,000,26.65
+1997-11-20,27.32,27.32,27.32,27.32,000,27.32
+1997-11-19,29.93,29.93,29.93,29.93,000,29.93
+1997-11-18,31.55,31.55,31.55,31.55,000,31.55
+1997-11-17,31.58,31.58,31.58,31.58,000,31.58
+1997-11-14,33.66,33.66,33.66,33.66,000,33.66
+1997-11-13,36.64,36.64,36.64,36.64,000,36.64
+1997-11-12,37.57,37.57,37.57,37.57,000,37.57
+1997-11-11,36.38,36.38,36.38,36.38,000,36.38
+1997-11-10,36.63,36.63,36.63,36.63,000,36.63
+1997-11-07,36.27,36.27,36.27,36.27,000,36.27
+1997-11-06,32.57,32.57,32.57,32.57,000,32.57
+1997-11-05,32.18,32.18,32.18,32.18,000,32.18
+1997-11-04,32.24,32.24,32.24,32.24,000,32.24
+1997-11-03,32.09,32.09,32.09,32.09,000,32.09
+1997-10-31,35.09,35.09,35.09,35.09,000,35.09
+1997-10-30,38.20,38.20,38.20,38.20,000,38.20
+1997-10-29,33.75,33.75,33.75,33.75,000,33.75
+1997-10-28,31.22,31.22,31.22,31.22,000,31.22
+1997-10-27,31.12,31.12,31.12,31.12,000,31.12
+1997-10-24,23.17,23.17,23.17,23.17,000,23.17
+1997-10-23,22.99,22.99,22.99,22.99,000,22.99
+1997-10-22,19.86,19.86,19.86,19.86,000,19.86
+1997-10-21,19.53,19.53,19.53,19.53,000,19.53
+1997-10-20,20.72,20.72,20.72,20.72,000,20.72
+1997-10-17,21.69,21.69,21.69,21.69,000,21.69
+1997-10-16,20.53,20.53,20.53,20.53,000,20.53
+1997-10-15,20.05,20.05,20.05,20.05,000,20.05
+1997-10-14,19.99,19.99,19.99,19.99,000,19.99
+1997-10-13,20.26,20.26,20.26,20.26,000,20.26
+1997-10-10,19.75,19.75,19.75,19.75,000,19.75
+1997-10-09,22.31,22.31,22.31,22.31,000,22.31
+1997-10-08,21.04,21.04,21.04,21.04,000,21.04
+1997-10-07,20.29,20.29,20.29,20.29,000,20.29
+1997-10-06,21.61,21.61,21.61,21.61,000,21.61
+1997-10-03,21.54,21.54,21.54,21.54,000,21.54
+1997-10-02,22.27,22.27,22.27,22.27,000,22.27
+1997-10-01,22.32,22.32,22.32,22.32,000,22.32
+1997-09-30,22.91,22.91,22.91,22.91,000,22.91
+1997-09-29,22.23,22.23,22.23,22.23,000,22.23
+1997-09-26,22.26,22.26,22.26,22.26,000,22.26
+1997-09-25,22.96,22.96,22.96,22.96,000,22.96
+1997-09-24,22.64,22.64,22.64,22.64,000,22.64
+1997-09-23,22.00,22.00,22.00,22.00,000,22.00
+1997-09-22,22.08,22.08,22.08,22.08,000,22.08
+1997-09-19,22.74,22.74,22.74,22.74,000,22.74
+1997-09-18,23.48,23.48,23.48,23.48,000,23.48
+1997-09-17,24.10,24.10,24.10,24.10,000,24.10
+1997-09-16,23.77,23.77,23.77,23.77,000,23.77
+1997-09-15,25.74,25.74,25.74,25.74,000,25.74
+1997-09-12,25.17,25.17,25.17,25.17,000,25.17
+1997-09-11,25.99,25.99,25.99,25.99,000,25.99
+1997-09-10,24.64,24.64,24.64,24.64,000,24.64
+1997-09-09,23.89,23.89,23.89,23.89,000,23.89
+1997-09-08,24.40,24.40,24.40,24.40,000,24.40
+1997-09-05,24.31,24.31,24.31,24.31,000,24.31
+1997-09-04,25.27,25.27,25.27,25.27,000,25.27
+1997-09-03,24.95,24.95,24.95,24.95,000,24.95
+1997-09-02,24.53,24.53,24.53,24.53,000,24.53
+1997-08-29,24.76,24.76,24.76,24.76,000,24.76
+1997-08-28,24.51,24.51,24.51,24.51,000,24.51
+1997-08-27,24.26,24.26,24.26,24.26,000,24.26
+1997-08-26,24.73,24.73,24.73,24.73,000,24.73
+1997-08-25,24.10,24.10,24.10,24.10,000,24.10
+1997-08-22,24.74,24.74,24.74,24.74,000,24.74
+1997-08-21,23.83,23.83,23.83,23.83,000,23.83
+1997-08-20,21.09,21.09,21.09,21.09,000,21.09
+1997-08-19,22.64,22.64,22.64,22.64,000,22.64
+1997-08-18,24.37,24.37,24.37,24.37,000,24.37
+1997-08-15,24.45,24.45,24.45,24.45,000,24.45
+1997-08-14,23.11,23.11,23.11,23.11,000,23.11
+1997-08-13,24.52,24.52,24.52,24.52,000,24.52
+1997-08-12,23.75,23.75,23.75,23.75,000,23.75
+1997-08-11,22.77,22.77,22.77,22.77,000,22.77
+1997-08-08,22.46,22.46,22.46,22.46,000,22.46
+1997-08-07,19.77,19.77,19.77,19.77,000,19.77
+1997-08-06,20.05,20.05,20.05,20.05,000,20.05
+1997-08-05,20.64,20.64,20.64,20.64,000,20.64
+1997-08-04,21.94,21.94,21.94,21.94,000,21.94
+1997-08-01,22.29,22.29,22.29,22.29,000,22.29
+1997-07-31,21.48,21.48,21.48,21.48,000,21.48
+1997-07-30,21.39,21.39,21.39,21.39,000,21.39
+1997-07-29,22.02,22.02,22.02,22.02,000,22.02
+1997-07-28,21.84,21.84,21.84,21.84,000,21.84
+1997-07-25,20.82,20.82,20.82,20.82,000,20.82
+1997-07-24,20.96,20.96,20.96,20.96,000,20.96
+1997-07-23,21.30,21.30,21.30,21.30,000,21.30
+1997-07-22,21.77,21.77,21.77,21.77,000,21.77
+1997-07-21,23.51,23.51,23.51,23.51,000,23.51
+1997-07-18,22.28,22.28,22.28,22.28,000,22.28
+1997-07-17,20.54,20.54,20.54,20.54,000,20.54
+1997-07-16,19.36,19.36,19.36,19.36,000,19.36
+1997-07-15,19.00,19.00,19.00,19.00,000,19.00
+1997-07-14,19.58,19.58,19.58,19.58,000,19.58
+1997-07-11,19.06,19.06,19.06,19.06,000,19.06
+1997-07-10,19.92,19.92,19.92,19.92,000,19.92
+1997-07-09,20.40,20.40,20.40,20.40,000,20.40
+1997-07-08,18.76,18.76,18.76,18.76,000,18.76
+1997-07-07,19.13,19.13,19.13,19.13,000,19.13
+1997-07-03,17.82,17.82,17.82,17.82,000,17.82
+1997-07-02,19.70,19.70,19.70,19.70,000,19.70
+1997-07-01,21.00,21.00,21.00,21.00,000,21.00
+1997-06-30,21.53,21.53,21.53,21.53,000,21.53
+1997-06-27,21.22,21.22,21.22,21.22,000,21.22
+1997-06-26,21.82,21.82,21.82,21.82,000,21.82
+1997-06-25,21.50,21.50,21.50,21.50,000,21.50
+1997-06-24,20.74,20.74,20.74,20.74,000,20.74
+1997-06-23,21.19,21.19,21.19,21.19,000,21.19
+1997-06-20,20.20,20.20,20.20,20.20,000,20.20
+1997-06-19,20.10,20.10,20.10,20.10,000,20.10
+1997-06-18,20.45,20.45,20.45,20.45,000,20.45
+1997-06-17,20.17,20.17,20.17,20.17,000,20.17
+1997-06-16,19.77,19.77,19.77,19.77,000,19.77
+1997-06-13,19.27,19.27,19.27,19.27,000,19.27
+1997-06-12,18.51,18.51,18.51,18.51,000,18.51
+1997-06-11,18.85,18.85,18.85,18.85,000,18.85
+1997-06-10,19.04,19.04,19.04,19.04,000,19.04
+1997-06-09,19.46,19.46,19.46,19.46,000,19.46
+1997-06-06,18.94,18.94,18.94,18.94,000,18.94
+1997-06-05,20.36,20.36,20.36,20.36,000,20.36
+1997-06-04,20.10,20.10,20.10,20.10,000,20.10
+1997-06-03,20.01,20.01,20.01,20.01,000,20.01
+1997-06-02,20.85,20.85,20.85,20.85,000,20.85
+1997-05-30,19.19,19.19,19.19,19.19,000,19.19
+1997-05-29,19.02,19.02,19.02,19.02,000,19.02
+1997-05-28,19.28,19.28,19.28,19.28,000,19.28
+1997-05-27,19.36,19.36,19.36,19.36,000,19.36
+1997-05-23,18.08,18.08,18.08,18.08,000,18.08
+1997-05-22,18.77,18.77,18.77,18.77,000,18.77
+1997-05-21,19.28,19.28,19.28,19.28,000,19.28
+1997-05-20,19.26,19.26,19.26,19.26,000,19.26
+1997-05-19,21.48,21.48,21.48,21.48,000,21.48
+1997-05-16,21.57,21.57,21.57,21.57,000,21.57
+1997-05-15,19.91,19.91,19.91,19.91,000,19.91
+1997-05-14,21.09,21.09,21.09,21.09,000,21.09
+1997-05-13,20.81,20.81,20.81,20.81,000,20.81
+1997-05-12,20.25,20.25,20.25,20.25,000,20.25
+1997-05-09,20.11,20.11,20.11,20.11,000,20.11
+1997-05-08,21.26,21.26,21.26,21.26,000,21.26
+1997-05-07,21.34,21.34,21.34,21.34,000,21.34
+1997-05-06,20.85,20.85,20.85,20.85,000,20.85
+1997-05-05,20.13,20.13,20.13,20.13,000,20.13
+1997-05-02,17.51,17.51,17.51,17.51,000,17.51
+1997-05-01,19.87,19.87,19.87,19.87,000,19.87
+1997-04-30,20.06,20.06,20.06,20.06,000,20.06
+1997-04-29,19.81,19.81,19.81,19.81,000,19.81
+1997-04-28,21.34,21.34,21.34,21.34,000,21.34
+1997-04-25,21.15,21.15,21.15,21.15,000,21.15
+1997-04-24,20.83,20.83,20.83,20.83,000,20.83
+1997-04-23,20.48,20.48,20.48,20.48,000,20.48
+1997-04-22,19.52,19.52,19.52,19.52,000,19.52
+1997-04-21,20.10,20.10,20.10,20.10,000,20.10
+1997-04-18,18.75,18.75,18.75,18.75,000,18.75
+1997-04-17,18.71,18.71,18.71,18.71,000,18.71
+1997-04-16,17.64,17.64,17.64,17.64,000,17.64
+1997-04-15,18.25,18.25,18.25,18.25,000,18.25
+1997-04-14,19.09,19.09,19.09,19.09,000,19.09
+1997-04-11,19.76,19.76,19.76,19.76,000,19.76
+1997-04-10,19.01,19.01,19.01,19.01,000,19.01
+1997-04-09,18.56,18.56,18.56,18.56,000,18.56
+1997-04-08,18.44,18.44,18.44,18.44,000,18.44
+1997-04-07,18.51,18.51,18.51,18.51,000,18.51
+1997-04-04,19.23,19.23,19.23,19.23,000,19.23
+1997-04-03,21.19,21.19,21.19,21.19,000,21.19
+1997-04-02,21.30,21.30,21.30,21.30,000,21.30
+1997-04-01,20.84,20.84,20.84,20.84,000,20.84
+1997-03-31,22.14,22.14,22.14,22.14,000,22.14
+1997-03-27,20.50,20.50,20.50,20.50,000,20.50
+1997-03-26,18.32,18.32,18.32,18.32,000,18.32
+1997-03-25,19.26,19.26,19.26,19.26,000,19.26
+1997-03-24,20.06,20.06,20.06,20.06,000,20.06
+1997-03-21,19.69,19.69,19.69,19.69,000,19.69
+1997-03-20,21.22,21.22,21.22,21.22,000,21.22
+1997-03-19,21.74,21.74,21.74,21.74,000,21.74
+1997-03-18,21.26,21.26,21.26,21.26,000,21.26
+1997-03-17,20.95,20.95,20.95,20.95,000,20.95
+1997-03-14,19.81,19.81,19.81,19.81,000,19.81
+1997-03-13,19.79,19.79,19.79,19.79,000,19.79
+1997-03-12,19.61,19.61,19.61,19.61,000,19.61
+1997-03-11,19.25,19.25,19.25,19.25,000,19.25
+1997-03-10,19.00,19.00,19.00,19.00,000,19.00
+1997-03-07,19.32,19.32,19.32,19.32,000,19.32
+1997-03-06,20.48,20.48,20.48,20.48,000,20.48
+1997-03-05,19.49,19.49,19.49,19.49,000,19.49
+1997-03-04,20.62,20.62,20.62,20.62,000,20.62
+1997-03-03,20.89,20.89,20.89,20.89,000,20.89
+1997-02-28,21.10,21.10,21.10,21.10,000,21.10
+1997-02-27,21.08,21.08,21.08,21.08,000,21.08
+1997-02-26,20.74,20.74,20.74,20.74,000,20.74
+1997-02-25,20.49,20.49,20.49,20.49,000,20.49
+1997-02-24,19.84,19.84,19.84,19.84,000,19.84
+1997-02-21,20.55,20.55,20.55,20.55,000,20.55
+1997-02-20,21.41,21.41,21.41,21.41,000,21.41
+1997-02-19,20.61,20.61,20.61,20.61,000,20.61
+1997-02-18,19.70,19.70,19.70,19.70,000,19.70
+1997-02-14,19.18,19.18,19.18,19.18,000,19.18
+1997-02-13,19.23,19.23,19.23,19.23,000,19.23
+1997-02-12,19.48,19.48,19.48,19.48,000,19.48
+1997-02-11,19.97,19.97,19.97,19.97,000,19.97
+1997-02-10,20.65,20.65,20.65,20.65,000,20.65
+1997-02-07,18.90,18.90,18.90,18.90,000,18.90
+1997-02-06,20.16,20.16,20.16,20.16,000,20.16
+1997-02-05,21.06,21.06,21.06,21.06,000,21.06
+1997-02-04,19.43,19.43,19.43,19.43,000,19.43
+1997-02-03,19.58,19.58,19.58,19.58,000,19.58
+1997-01-30,19.47,19.47,19.47,19.47,000,19.47
+1997-01-29,20.23,20.23,20.23,20.23,000,20.23
+1997-01-28,20.74,20.74,20.74,20.74,000,20.74
+1997-01-27,20.16,20.16,20.16,20.16,000,20.16
+1997-01-24,19.33,19.33,19.33,19.33,000,19.33
+1997-01-23,18.47,18.47,18.47,18.47,000,18.47
+1997-01-22,17.09,17.09,17.09,17.09,000,17.09
+1997-01-21,17.81,17.81,17.81,17.81,000,17.81
+1997-01-20,18.60,18.60,18.60,18.60,000,18.60
+1997-01-17,18.63,18.63,18.63,18.63,000,18.63
+1997-01-16,19.61,19.61,19.61,19.61,000,19.61
+1997-01-15,19.40,19.40,19.40,19.40,000,19.40
+1997-01-14,19.27,19.27,19.27,19.27,000,19.27
+1997-01-13,19.84,19.84,19.84,19.84,000,19.84
+1997-01-10,19.63,19.63,19.63,19.63,000,19.63
+1997-01-09,20.91,20.91,20.91,20.91,000,20.91
+1997-01-08,20.24,20.24,20.24,20.24,000,20.24
+1997-01-07,19.35,19.35,19.35,19.35,000,19.35
+1997-01-06,19.89,19.89,19.89,19.89,000,19.89
+1997-01-03,19.13,19.13,19.13,19.13,000,19.13
+1997-01-02,21.14,21.14,21.14,21.14,000,21.14
+1996-12-31,20.92,20.92,20.92,20.92,000,20.92
+1996-12-30,19.51,19.51,19.51,19.51,000,19.51
+1996-12-27,19.13,19.13,19.13,19.13,000,19.13
+1996-12-26,18.59,18.59,18.59,18.59,000,18.59
+1996-12-24,18.68,18.68,18.68,18.68,000,18.68
+1996-12-23,19.50,19.50,19.50,19.50,000,19.50
+1996-12-20,18.85,18.85,18.85,18.85,000,18.85
+1996-12-19,18.77,18.77,18.77,18.77,000,18.77
+1996-12-18,19.42,19.42,19.42,19.42,000,19.42
+1996-12-17,20.77,20.77,20.77,20.77,000,20.77
+1996-12-16,21.99,21.99,21.99,21.99,000,21.99
+1996-12-13,21.09,21.09,21.09,21.09,000,21.09
+1996-12-12,20.45,20.45,20.45,20.45,000,20.45
+1996-12-11,19.68,19.68,19.68,19.68,000,19.68
+1996-12-10,17.88,17.88,17.88,17.88,000,17.88
+1996-12-09,17.75,17.75,17.75,17.75,000,17.75
+1996-12-06,18.82,18.82,18.82,18.82,000,18.82
+1996-12-05,18.14,18.14,18.14,18.14,000,18.14
+1996-12-04,17.93,17.93,17.93,17.93,000,17.93
+1996-12-03,18.68,18.68,18.68,18.68,000,18.68
+1996-12-02,17.93,17.93,17.93,17.93,000,17.93
+1996-11-29,17.14,17.14,17.14,17.14,000,17.14
+1996-11-27,16.96,16.96,16.96,16.96,000,16.96
+1996-11-26,16.97,16.97,16.97,16.97,000,16.97
+1996-11-25,15.91,15.91,15.91,15.91,000,15.91
+1996-11-22,14.92,14.92,14.92,14.92,000,14.92
+1996-11-21,15.77,15.77,15.77,15.77,000,15.77
+1996-11-20,15.94,15.94,15.94,15.94,000,15.94
+1996-11-19,15.23,15.23,15.23,15.23,000,15.23
+1996-11-18,15.12,15.12,15.12,15.12,000,15.12
+1996-11-15,14.36,14.36,14.36,14.36,000,14.36
+1996-11-14,13.79,13.79,13.79,13.79,000,13.79
+1996-11-13,14.89,14.89,14.89,14.89,000,14.89
+1996-11-12,15.36,15.36,15.36,15.36,000,15.36
+1996-11-11,15.01,15.01,15.01,15.01,000,15.01
+1996-11-08,15.78,15.78,15.78,15.78,000,15.78
+1996-11-07,17.21,17.21,17.21,17.21,000,17.21
+1996-11-06,16.97,16.97,16.97,16.97,000,16.97
+1996-11-05,17.65,17.65,17.65,17.65,000,17.65
+1996-11-04,18.04,18.04,18.04,18.04,000,18.04
+1996-11-01,17.89,17.89,17.89,17.89,000,17.89
+1996-10-31,18.11,18.11,18.11,18.11,000,18.11
+1996-10-30,18.48,18.48,18.48,18.48,000,18.48
+1996-10-29,18.28,18.28,18.28,18.28,000,18.28
+1996-10-28,18.34,18.34,18.34,18.34,000,18.34
+1996-10-25,17.29,17.29,17.29,17.29,000,17.29
+1996-10-24,16.89,16.89,16.89,16.89,000,16.89
+1996-10-23,16.45,16.45,16.45,16.45,000,16.45
+1996-10-22,16.40,16.40,16.40,16.40,000,16.40
+1996-10-21,15.98,15.98,15.98,15.98,000,15.98
+1996-10-18,15.08,15.08,15.08,15.08,000,15.08
+1996-10-17,15.41,15.41,15.41,15.41,000,15.41
+1996-10-16,15.60,15.60,15.60,15.60,000,15.60
+1996-10-15,15.83,15.83,15.83,15.83,000,15.83
+1996-10-14,15.13,15.13,15.13,15.13,000,15.13
+1996-10-11,15.07,15.07,15.07,15.07,000,15.07
+1996-10-10,16.26,16.26,16.26,16.26,000,16.26
+1996-10-09,16.09,16.09,16.09,16.09,000,16.09
+1996-10-08,15.58,15.58,15.58,15.58,000,15.58
+1996-10-07,15.11,15.11,15.11,15.11,000,15.11
+1996-10-04,14.80,14.80,14.80,14.80,000,14.80
+1996-10-03,16.77,16.77,16.77,16.77,000,16.77
+1996-10-02,16.78,16.78,16.78,16.78,000,16.78
+1996-10-01,17.05,17.05,17.05,17.05,000,17.05
+1996-09-30,16.95,16.95,16.95,16.95,000,16.95
+1996-09-27,16.10,16.10,16.10,16.10,000,16.10
+1996-09-26,16.11,16.11,16.11,16.11,000,16.11
+1996-09-25,16.22,16.22,16.22,16.22,000,16.22
+1996-09-24,16.45,16.45,16.45,16.45,000,16.45
+1996-09-23,16.46,16.46,16.46,16.46,000,16.46
+1996-09-20,15.65,15.65,15.65,15.65,000,15.65
+1996-09-19,16.03,16.03,16.03,16.03,000,16.03
+1996-09-18,15.86,15.86,15.86,15.86,000,15.86
+1996-09-17,15.74,15.74,15.74,15.74,000,15.74
+1996-09-16,15.43,15.43,15.43,15.43,000,15.43
+1996-09-13,15.20,15.20,15.20,15.20,000,15.20
+1996-09-12,15.97,15.97,15.97,15.97,000,15.97
+1996-09-11,16.06,16.06,16.06,16.06,000,16.06
+1996-09-10,16.25,16.25,16.25,16.25,000,16.25
+1996-09-09,16.36,16.36,16.36,16.36,000,16.36
+1996-09-06,17.10,17.10,17.10,17.10,000,17.10
+1996-09-05,20.51,20.51,20.51,20.51,000,20.51
+1996-09-04,18.64,18.64,18.64,18.64,000,18.64
+1996-09-03,18.47,18.47,18.47,18.47,000,18.47
+1996-08-30,17.01,17.01,17.01,17.01,000,17.01
+1996-08-29,16.22,16.22,16.22,16.22,000,16.22
+1996-08-28,15.10,15.10,15.10,15.10,000,15.10
+1996-08-27,15.11,15.11,15.11,15.11,000,15.11
+1996-08-26,15.38,15.38,15.38,15.38,000,15.38
+1996-08-23,14.18,14.18,14.18,14.18,000,14.18
+1996-08-22,13.71,13.71,13.71,13.71,000,13.71
+1996-08-21,14.52,14.52,14.52,14.52,000,14.52
+1996-08-20,14.73,14.73,14.73,14.73,000,14.73
+1996-08-19,15.27,15.27,15.27,15.27,000,15.27
+1996-08-16,14.81,14.81,14.81,14.81,000,14.81
+1996-08-15,15.46,15.46,15.46,15.46,000,15.46
+1996-08-14,15.96,15.96,15.96,15.96,000,15.96
+1996-08-13,16.41,16.41,16.41,16.41,000,16.41
+1996-08-12,15.57,15.57,15.57,15.57,000,15.57
+1996-08-09,15.77,15.77,15.77,15.77,000,15.77
+1996-08-08,16.04,16.04,16.04,16.04,000,16.04
+1996-08-07,16.24,16.24,16.24,16.24,000,16.24
+1996-08-06,16.93,16.93,16.93,16.93,000,16.93
+1996-08-05,17.36,17.36,17.36,17.36,000,17.36
+1996-08-02,16.19,16.19,16.19,16.19,000,16.19
+1996-08-01,18.76,18.76,18.76,18.76,000,18.76
+1996-07-31,19.46,19.46,19.46,19.46,000,19.46
+1996-07-30,20.53,20.53,20.53,20.53,000,20.53
+1996-07-29,20.09,20.09,20.09,20.09,000,20.09
+1996-07-26,17.45,17.45,17.45,17.45,000,17.45
+1996-07-25,19.39,19.39,19.39,19.39,000,19.39
+1996-07-24,21.44,21.44,21.44,21.44,000,21.44
+1996-07-23,21.55,21.55,21.55,21.55,000,21.55
+1996-07-22,20.41,20.41,20.41,20.41,000,20.41
+1996-07-19,17.26,17.26,17.26,17.26,000,17.26
+1996-07-18,17.93,17.93,17.93,17.93,000,17.93
+1996-07-17,19.22,19.22,19.22,19.22,000,19.22
+1996-07-16,20.10,20.10,20.10,20.10,000,20.10
+1996-07-15,20.11,20.11,20.11,20.11,000,20.11
+1996-07-12,17.09,17.09,17.09,17.09,000,17.09
+1996-07-11,17.81,17.81,17.81,17.81,000,17.81
+1996-07-10,15.51,15.51,15.51,15.51,000,15.51
+1996-07-09,15.49,15.49,15.49,15.49,000,15.49
+1996-07-08,16.42,16.42,16.42,16.42,000,16.42
+1996-07-05,16.09,16.09,16.09,16.09,000,16.09
+1996-07-03,14.21,14.21,14.21,14.21,000,14.21
+1996-07-02,14.19,14.19,14.19,14.19,000,14.19
+1996-07-01,13.78,13.78,13.78,13.78,000,13.78
+1996-06-28,13.68,13.68,13.68,13.68,000,13.68
+1996-06-27,14.19,14.19,14.19,14.19,000,14.19
+1996-06-26,15.23,15.23,15.23,15.23,000,15.23
+1996-06-25,15.43,15.43,15.43,15.43,000,15.43
+1996-06-24,15.91,15.91,15.91,15.91,000,15.91
+1996-06-21,15.80,15.80,15.80,15.80,000,15.80
+1996-06-20,16.97,16.97,16.97,16.97,000,16.97
+1996-06-19,17.54,17.54,17.54,17.54,000,17.54
+1996-06-18,17.45,17.45,17.45,17.45,000,17.45
+1996-06-17,17.46,17.46,17.46,17.46,000,17.46
+1996-06-14,18.64,18.64,18.64,18.64,000,18.64
+1996-06-13,17.12,17.12,17.12,17.12,000,17.12
+1996-06-12,17.00,17.00,17.00,17.00,000,17.00
+1996-06-11,16.68,16.68,16.68,16.68,000,16.68
+1996-06-10,16.78,16.78,16.78,16.78,000,16.78
+1996-06-07,16.10,16.10,16.10,16.10,000,16.10
+1996-06-06,16.84,16.84,16.84,16.84,000,16.84
+1996-06-05,16.04,16.04,16.04,16.04,000,16.04
+1996-06-04,16.18,16.18,16.18,16.18,000,16.18
+1996-06-03,16.86,16.86,16.86,16.86,000,16.86
+1996-05-31,16.07,16.07,16.07,16.07,000,16.07
+1996-05-30,16.02,16.02,16.02,16.02,000,16.02
+1996-05-29,17.15,17.15,17.15,17.15,000,17.15
+1996-05-28,16.92,16.92,16.92,16.92,000,16.92
+1996-05-24,15.54,15.54,15.54,15.54,000,15.54
+1996-05-23,16.17,16.17,16.17,16.17,000,16.17
+1996-05-22,15.50,15.50,15.50,15.50,000,15.50
+1996-05-21,16.00,16.00,16.00,16.00,000,16.00
+1996-05-20,15.80,15.80,15.80,15.80,000,15.80
+1996-05-17,15.13,15.13,15.13,15.13,000,15.13
+1996-05-16,15.71,15.71,15.71,15.71,000,15.71
+1996-05-15,15.59,15.59,15.59,15.59,000,15.59
+1996-05-14,14.90,14.90,14.90,14.90,000,14.90
+1996-05-13,15.16,15.16,15.16,15.16,000,15.16
+1996-05-10,15.61,15.61,15.61,15.61,000,15.61
+1996-05-09,16.99,16.99,16.99,16.99,000,16.99
+1996-05-08,15.78,15.78,15.78,15.78,000,15.78
+1996-05-07,16.87,16.87,16.87,16.87,000,16.87
+1996-05-06,16.92,16.92,16.92,16.92,000,16.92
+1996-05-03,16.70,16.70,16.70,16.70,000,16.70
+1996-05-02,18.62,18.62,18.62,18.62,000,18.62
+1996-05-01,16.07,16.07,16.07,16.07,000,16.07
+1996-04-30,15.83,15.83,15.83,15.83,000,15.83
+1996-04-29,15.45,15.45,15.45,15.45,000,15.45
+1996-04-26,14.75,14.75,14.75,14.75,000,14.75
+1996-04-25,14.72,14.72,14.72,14.72,000,14.72
+1996-04-24,14.91,14.91,14.91,14.91,000,14.91
+1996-04-23,15.01,15.01,15.01,15.01,000,15.01
+1996-04-22,15.38,15.38,15.38,15.38,000,15.38
+1996-04-19,15.12,15.12,15.12,15.12,000,15.12
+1996-04-18,16.41,16.41,16.41,16.41,000,16.41
+1996-04-17,17.07,17.07,17.07,17.07,000,17.07
+1996-04-16,16.45,16.45,16.45,16.45,000,16.45
+1996-04-15,16.83,16.83,16.83,16.83,000,16.83
+1996-04-12,17.38,17.38,17.38,17.38,000,17.38
+1996-04-11,19.65,19.65,19.65,19.65,000,19.65
+1996-04-10,20.22,20.22,20.22,20.22,000,20.22
+1996-04-09,17.32,17.32,17.32,17.32,000,17.32
+1996-04-08,18.72,18.72,18.72,18.72,000,18.72
+1996-04-04,16.18,16.18,16.18,16.18,000,16.18
+1996-04-03,16.33,16.33,16.33,16.33,000,16.33
+1996-04-02,16.45,16.45,16.45,16.45,000,16.45
+1996-04-01,17.90,17.90,17.90,17.90,000,17.90
+1996-03-29,18.88,18.88,18.88,18.88,000,18.88
+1996-03-28,18.16,18.16,18.16,18.16,000,18.16
+1996-03-27,17.89,17.89,17.89,17.89,000,17.89
+1996-03-26,17.80,17.80,17.80,17.80,000,17.80
+1996-03-25,17.84,17.84,17.84,17.84,000,17.84
+1996-03-22,17.05,17.05,17.05,17.05,000,17.05
+1996-03-21,17.74,17.74,17.74,17.74,000,17.74
+1996-03-20,18.66,18.66,18.66,18.66,000,18.66
+1996-03-19,18.35,18.35,18.35,18.35,000,18.35
+1996-03-18,17.31,17.31,17.31,17.31,000,17.31
+1996-03-15,16.54,16.54,16.54,16.54,000,16.54
+1996-03-14,16.93,16.93,16.93,16.93,000,16.93
+1996-03-13,18.13,18.13,18.13,18.13,000,18.13
+1996-03-12,19.09,19.09,19.09,19.09,000,19.09
+1996-03-11,20.33,20.33,20.33,20.33,000,20.33
+1996-03-08,20.70,20.70,20.70,20.70,000,20.70
+1996-03-07,16.49,16.49,16.49,16.49,000,16.49
+1996-03-06,16.56,16.56,16.56,16.56,000,16.56
+1996-03-05,16.10,16.10,16.10,16.10,000,16.10
+1996-03-04,16.67,16.67,16.67,16.67,000,16.67
+1996-03-01,16.72,16.72,16.72,16.72,000,16.72
+1996-02-29,17.04,17.04,17.04,17.04,000,17.04
+1996-02-28,16.72,16.72,16.72,16.72,000,16.72
+1996-02-27,16.63,16.63,16.63,16.63,000,16.63
+1996-02-26,16.38,16.38,16.38,16.38,000,16.38
+1996-02-23,14.78,14.78,14.78,14.78,000,14.78
+1996-02-22,14.56,14.56,14.56,14.56,000,14.56
+1996-02-21,14.47,14.47,14.47,14.47,000,14.47
+1996-02-20,16.80,16.80,16.80,16.80,000,16.80
+1996-02-16,15.37,15.37,15.37,15.37,000,15.37
+1996-02-15,16.13,16.13,16.13,16.13,000,16.13
+1996-02-14,15.59,15.59,15.59,15.59,000,15.59
+1996-02-13,17.12,17.12,17.12,17.12,000,17.12
+1996-02-12,14.69,14.69,14.69,14.69,000,14.69
+1996-02-09,14.63,14.63,14.63,14.63,000,14.63
+1996-02-08,13.89,13.89,13.89,13.89,000,13.89
+1996-02-07,14.11,14.11,14.11,14.11,000,14.11
+1996-02-06,14.59,14.59,14.59,14.59,000,14.59
+1996-02-05,13.46,13.46,13.46,13.46,000,13.46
+1996-02-02,13.23,13.23,13.23,13.23,000,13.23
+1996-02-01,12.65,12.65,12.65,12.65,000,12.65
+1996-01-31,12.53,12.53,12.53,12.53,000,12.53
+1996-01-30,12.42,12.42,12.42,12.42,000,12.42
+1996-01-29,12.19,12.19,12.19,12.19,000,12.19
+1996-01-26,12.00,12.00,12.00,12.00,000,12.00
+1996-01-25,12.94,12.94,12.94,12.94,000,12.94
+1996-01-24,12.54,12.54,12.54,12.54,000,12.54
+1996-01-23,13.56,13.56,13.56,13.56,000,13.56
+1996-01-22,13.34,13.34,13.34,13.34,000,13.34
+1996-01-19,12.70,12.70,12.70,12.70,000,12.70
+1996-01-18,13.58,13.58,13.58,13.58,000,13.58
+1996-01-17,14.25,14.25,14.25,14.25,000,14.25
+1996-01-16,14.09,14.09,14.09,14.09,000,14.09
+1996-01-15,14.99,14.99,14.99,14.99,000,14.99
+1996-01-12,15.30,15.30,15.30,15.30,000,15.30
+1996-01-11,15.42,15.42,15.42,15.42,000,15.42
+1996-01-10,16.88,16.88,16.88,16.88,000,16.88
+1996-01-09,15.21,15.21,15.21,15.21,000,15.21
+1996-01-08,13.11,13.11,13.11,13.11,000,13.11
+1996-01-05,13.58,13.58,13.58,13.58,000,13.58
+1996-01-04,13.78,13.78,13.78,13.78,000,13.78
+1996-01-03,12.10,12.10,12.10,12.10,000,12.10
+1996-01-02,12.19,12.19,12.19,12.19,000,12.19
+1995-12-29,12.52,12.52,12.52,12.52,000,12.52
+1995-12-28,12.25,12.25,12.25,12.25,000,12.25
+1995-12-27,11.98,11.98,11.98,11.98,000,11.98
+1995-12-26,11.49,11.49,11.49,11.49,000,11.49
+1995-12-22,11.51,11.51,11.51,11.51,000,11.51
+1995-12-21,10.77,10.77,10.77,10.77,000,10.77
+1995-12-20,12.20,12.20,12.20,12.20,000,12.20
+1995-12-19,13.16,13.16,13.16,13.16,000,13.16
+1995-12-18,14.55,14.55,14.55,14.55,000,14.55
+1995-12-15,11.44,11.44,11.44,11.44,000,11.44
+1995-12-14,11.07,11.07,11.07,11.07,000,11.07
+1995-12-13,10.36,10.36,10.36,10.36,000,10.36
+1995-12-12,10.63,10.63,10.63,10.63,000,10.63
+1995-12-11,11.06,11.06,11.06,11.06,000,11.06
+1995-12-08,11.12,11.12,11.12,11.12,000,11.12
+1995-12-07,12.74,12.74,12.74,12.74,000,12.74
+1995-12-06,12.70,12.70,12.70,12.70,000,12.70
+1995-12-05,11.65,11.65,11.65,11.65,000,11.65
+1995-12-04,10.66,10.66,10.66,10.66,000,10.66
+1995-12-01,11.11,11.11,11.11,11.11,000,11.11
+1995-11-30,11.58,11.58,11.58,11.58,000,11.58
+1995-11-29,11.65,11.65,11.65,11.65,000,11.65
+1995-11-28,11.57,11.57,11.57,11.57,000,11.57
+1995-11-27,12.43,12.43,12.43,12.43,000,12.43
+1995-11-24,11.87,11.87,11.87,11.87,000,11.87
+1995-11-22,11.81,11.81,11.81,11.81,000,11.81
+1995-11-21,11.74,11.74,11.74,11.74,000,11.74
+1995-11-20,12.37,12.37,12.37,12.37,000,12.37
+1995-11-17,12.49,12.49,12.49,12.49,000,12.49
+1995-11-16,12.57,12.57,12.57,12.57,000,12.57
+1995-11-15,12.95,12.95,12.95,12.95,000,12.95
+1995-11-14,13.38,13.38,13.38,13.38,000,13.38
+1995-11-13,13.20,13.20,13.20,13.20,000,13.20
+1995-11-10,12.97,12.97,12.97,12.97,000,12.97
+1995-11-09,12.46,12.46,12.46,12.46,000,12.46
+1995-11-08,12.16,12.16,12.16,12.16,000,12.16
+1995-11-07,13.05,13.05,13.05,13.05,000,13.05
+1995-11-06,12.74,12.74,12.74,12.74,000,12.74
+1995-11-03,12.26,12.26,12.26,12.26,000,12.26
+1995-11-02,13.19,13.19,13.19,13.19,000,13.19
+1995-11-01,13.41,13.41,13.41,13.41,000,13.41
+1995-10-31,13.83,13.83,13.83,13.83,000,13.83
+1995-10-30,14.26,14.26,14.26,14.26,000,14.26
+1995-10-27,14.63,14.63,14.63,14.63,000,14.63
+1995-10-26,15.59,15.59,15.59,15.59,000,15.59
+1995-10-25,14.49,14.49,14.49,14.49,000,14.49
+1995-10-24,13.85,13.85,13.85,13.85,000,13.85
+1995-10-23,14.17,14.17,14.17,14.17,000,14.17
+1995-10-20,13.46,13.46,13.46,13.46,000,13.46
+1995-10-19,13.55,13.55,13.55,13.55,000,13.55
+1995-10-18,14.05,14.05,14.05,14.05,000,14.05
+1995-10-17,14.03,14.03,14.03,14.03,000,14.03
+1995-10-16,14.62,14.62,14.62,14.62,000,14.62
+1995-10-13,13.67,13.67,13.67,13.67,000,13.67
+1995-10-12,14.24,14.24,14.24,14.24,000,14.24
+1995-10-11,14.57,14.57,14.57,14.57,000,14.57
+1995-10-10,14.97,14.97,14.97,14.97,000,14.97
+1995-10-09,14.85,14.85,14.85,14.85,000,14.85
+1995-10-06,13.98,13.98,13.98,13.98,000,13.98
+1995-10-05,15.74,15.74,15.74,15.74,000,15.74
+1995-10-04,14.86,14.86,14.86,14.86,000,14.86
+1995-10-03,14.50,14.50,14.50,14.50,000,14.50
+1995-10-02,13.95,13.95,13.95,13.95,000,13.95
+1995-09-29,12.74,12.74,12.74,12.74,000,12.74
+1995-09-28,12.46,12.46,12.46,12.46,000,12.46
+1995-09-27,12.90,12.90,12.90,12.90,000,12.90
+1995-09-26,12.90,12.90,12.90,12.90,000,12.90
+1995-09-25,13.22,13.22,13.22,13.22,000,13.22
+1995-09-22,12.46,12.46,12.46,12.46,000,12.46
+1995-09-21,12.50,12.50,12.50,12.50,000,12.50
+1995-09-20,12.35,12.35,12.35,12.35,000,12.35
+1995-09-19,12.67,12.67,12.67,12.67,000,12.67
+1995-09-18,12.34,12.34,12.34,12.34,000,12.34
+1995-09-15,11.58,11.58,11.58,11.58,000,11.58
+1995-09-14,11.10,11.10,11.10,11.10,000,11.10
+1995-09-13,11.35,11.35,11.35,11.35,000,11.35
+1995-09-12,11.46,11.46,11.46,11.46,000,11.46
+1995-09-11,11.51,11.51,11.51,11.51,000,11.51
+1995-09-08,11.16,11.16,11.16,11.16,000,11.16
+1995-09-07,11.85,11.85,11.85,11.85,000,11.85
+1995-09-06,11.65,11.65,11.65,11.65,000,11.65
+1995-09-05,11.65,11.65,11.65,11.65,000,11.65
+1995-09-01,11.29,11.29,11.29,11.29,000,11.29
+1995-08-31,11.52,11.52,11.52,11.52,000,11.52
+1995-08-30,12.03,12.03,12.03,12.03,000,12.03
+1995-08-29,12.65,12.65,12.65,12.65,000,12.65
+1995-08-28,12.48,12.48,12.48,12.48,000,12.48
+1995-08-25,12.33,12.33,12.33,12.33,000,12.33
+1995-08-24,12.94,12.94,12.94,12.94,000,12.94
+1995-08-23,13.17,13.17,13.17,13.17,000,13.17
+1995-08-22,12.60,12.60,12.60,12.60,000,12.60
+1995-08-21,13.42,13.42,13.42,13.42,000,13.42
+1995-08-18,12.03,12.03,12.03,12.03,000,12.03
+1995-08-17,12.13,12.13,12.13,12.13,000,12.13
+1995-08-16,12.45,12.45,12.45,12.45,000,12.45
+1995-08-15,12.35,12.35,12.35,12.35,000,12.35
+1995-08-14,13.24,13.24,13.24,13.24,000,13.24
+1995-08-11,12.90,12.90,12.90,12.90,000,12.90
+1995-08-10,13.00,13.00,13.00,13.00,000,13.00
+1995-08-09,12.75,12.75,12.75,12.75,000,12.75
+1995-08-08,13.06,13.06,13.06,13.06,000,13.06
+1995-08-07,13.10,13.10,13.10,13.10,000,13.10
+1995-08-04,13.21,13.21,13.21,13.21,000,13.21
+1995-08-03,13.78,13.78,13.78,13.78,000,13.78
+1995-08-02,13.66,13.66,13.66,13.66,000,13.66
+1995-08-01,13.56,13.56,13.56,13.56,000,13.56
+1995-07-31,13.49,13.49,13.49,13.49,000,13.49
+1995-07-28,13.18,13.18,13.18,13.18,000,13.18
+1995-07-27,13.18,13.18,13.18,13.18,000,13.18
+1995-07-26,13.18,13.18,13.18,13.18,000,13.18
+1995-07-25,12.77,12.77,12.77,12.77,000,12.77
+1995-07-24,12.55,12.55,12.55,12.55,000,12.55
+1995-07-21,12.37,12.37,12.37,12.37,000,12.37
+1995-07-20,13.86,13.86,13.86,13.86,000,13.86
+1995-07-19,13.49,13.49,13.49,13.49,000,13.49
+1995-07-18,12.68,12.68,12.68,12.68,000,12.68
+1995-07-17,12.26,12.26,12.26,12.26,000,12.26
+1995-07-14,12.08,12.08,12.08,12.08,000,12.08
+1995-07-13,12.56,12.56,12.56,12.56,000,12.56
+1995-07-12,12.31,12.31,12.31,12.31,000,12.31
+1995-07-11,12.25,12.25,12.25,12.25,000,12.25
+1995-07-10,12.19,12.19,12.19,12.19,000,12.19
+1995-07-07,11.77,11.77,11.77,11.77,000,11.77
+1995-07-06,11.52,11.52,11.52,11.52,000,11.52
+1995-07-05,12.10,12.10,12.10,12.10,000,12.10
+1995-07-03,11.57,11.57,11.57,11.57,000,11.57
+1995-06-30,11.38,11.38,11.38,11.38,000,11.38
+1995-06-29,11.59,11.59,11.59,11.59,000,11.59
+1995-06-28,11.74,11.74,11.74,11.74,000,11.74
+1995-06-27,12.37,12.37,12.37,12.37,000,12.37
+1995-06-26,11.80,11.80,11.80,11.80,000,11.80
+1995-06-23,11.12,11.12,11.12,11.12,000,11.12
+1995-06-22,11.44,11.44,11.44,11.44,000,11.44
+1995-06-21,11.32,11.32,11.32,11.32,000,11.32
+1995-06-20,11.16,11.16,11.16,11.16,000,11.16
+1995-06-19,11.21,11.21,11.21,11.21,000,11.21
+1995-06-16,10.75,10.75,10.75,10.75,000,10.75
+1995-06-15,11.23,11.23,11.23,11.23,000,11.23
+1995-06-14,11.29,11.29,11.29,11.29,000,11.29
+1995-06-13,11.29,11.29,11.29,11.29,000,11.29
+1995-06-12,11.91,11.91,11.91,11.91,000,11.91
+1995-06-09,12.76,12.76,12.76,12.76,000,12.76
+1995-06-08,14.12,14.12,14.12,14.12,000,14.12
+1995-06-07,12.84,12.84,12.84,12.84,000,12.84
+1995-06-06,13.00,13.00,13.00,13.00,000,13.00
+1995-06-05,13.45,13.45,13.45,13.45,000,13.45
+1995-06-02,12.98,12.98,12.98,12.98,000,12.98
+1995-06-01,12.21,12.21,12.21,12.21,000,12.21
+1995-05-31,13.77,13.77,13.77,13.77,000,13.77
+1995-05-30,12.52,12.52,12.52,12.52,000,12.52
+1995-05-26,12.20,12.20,12.20,12.20,000,12.20
+1995-05-25,11.63,11.63,11.63,11.63,000,11.63
+1995-05-24,11.26,11.26,11.26,11.26,000,11.26
+1995-05-23,11.55,11.55,11.55,11.55,000,11.55
+1995-05-22,11.68,11.68,11.68,11.68,000,11.68
+1995-05-19,12.81,12.81,12.81,12.81,000,12.81
+1995-05-18,13.13,13.13,13.13,13.13,000,13.13
+1995-05-17,12.36,12.36,12.36,12.36,000,12.36
+1995-05-16,12.20,12.20,12.20,12.20,000,12.20
+1995-05-15,12.38,12.38,12.38,12.38,000,12.38
+1995-05-12,11.84,11.84,11.84,11.84,000,11.84
+1995-05-11,12.98,12.98,12.98,12.98,000,12.98
+1995-05-10,13.08,13.08,13.08,13.08,000,13.08
+1995-05-09,12.75,12.75,12.75,12.75,000,12.75
+1995-05-08,12.22,12.22,12.22,12.22,000,12.22
+1995-05-05,12.06,12.06,12.06,12.06,000,12.06
+1995-05-04,12.64,12.64,12.64,12.64,000,12.64
+1995-05-03,11.69,11.69,11.69,11.69,000,11.69
+1995-05-02,11.88,11.88,11.88,11.88,000,11.88
+1995-05-01,12.14,12.14,12.14,12.14,000,12.14
+1995-04-28,11.75,11.75,11.75,11.75,000,11.75
+1995-04-27,11.93,11.93,11.93,11.93,000,11.93
+1995-04-26,12.28,12.28,12.28,12.28,000,12.28
+1995-04-25,12.41,12.41,12.41,12.41,000,12.41
+1995-04-24,11.92,11.92,11.92,11.92,000,11.92
+1995-04-21,11.86,11.86,11.86,11.86,000,11.86
+1995-04-20,12.10,12.10,12.10,12.10,000,12.10
+1995-04-19,13.09,13.09,13.09,13.09,000,13.09
+1995-04-18,12.96,12.96,12.96,12.96,000,12.96
+1995-04-17,12.33,12.33,12.33,12.33,000,12.33
+1995-04-13,11.48,11.48,11.48,11.48,000,11.48
+1995-04-12,12.04,12.04,12.04,12.04,000,12.04
+1995-04-11,12.73,12.73,12.73,12.73,000,12.73
+1995-04-10,12.79,12.79,12.79,12.79,000,12.79
+1995-04-07,12.85,12.85,12.85,12.85,000,12.85
+1995-04-06,12.81,12.81,12.81,12.81,000,12.81
+1995-04-05,12.96,12.96,12.96,12.96,000,12.96
+1995-04-04,12.62,12.62,12.62,12.62,000,12.62
+1995-04-03,13.50,13.50,13.50,13.50,000,13.50
+1995-03-31,13.37,13.37,13.37,13.37,000,13.37
+1995-03-30,12.62,12.62,12.62,12.62,000,12.62
+1995-03-29,12.51,12.51,12.51,12.51,000,12.51
+1995-03-28,11.33,11.33,11.33,11.33,000,11.33
+1995-03-27,11.83,11.83,11.83,11.83,000,11.83
+1995-03-24,11.19,11.19,11.19,11.19,000,11.19
+1995-03-23,11.43,11.43,11.43,11.43,000,11.43
+1995-03-22,11.29,11.29,11.29,11.29,000,11.29
+1995-03-21,11.53,11.53,11.53,11.53,000,11.53
+1995-03-20,11.34,11.34,11.34,11.34,000,11.34
+1995-03-17,11.80,11.80,11.80,11.80,000,11.80
+1995-03-16,11.95,11.95,11.95,11.95,000,11.95
+1995-03-15,12.42,12.42,12.42,12.42,000,12.42
+1995-03-14,12.10,12.10,12.10,12.10,000,12.10
+1995-03-13,12.15,12.15,12.15,12.15,000,12.15
+1995-03-10,12.38,12.38,12.38,12.38,000,12.38
+1995-03-09,13.77,13.77,13.77,13.77,000,13.77
+1995-03-08,14.11,14.11,14.11,14.11,000,14.11
+1995-03-07,14.22,14.22,14.22,14.22,000,14.22
+1995-03-06,12.17,12.17,12.17,12.17,000,12.17
+1995-03-03,11.45,11.45,11.45,11.45,000,11.45
+1995-03-02,12.30,12.30,12.30,12.30,000,12.30
+1995-03-01,12.29,12.29,12.29,12.29,000,12.29
+1995-02-28,11.75,11.75,11.75,11.75,000,11.75
+1995-02-27,12.51,12.51,12.51,12.51,000,12.51
+1995-02-24,10.84,10.84,10.84,10.84,000,10.84
+1995-02-23,11.15,11.15,11.15,11.15,000,11.15
+1995-02-22,11.72,11.72,11.72,11.72,000,11.72
+1995-02-21,12.05,12.05,12.05,12.05,000,12.05
+1995-02-17,12.42,12.42,12.42,12.42,000,12.42
+1995-02-16,11.61,11.61,11.61,11.61,000,11.61
+1995-02-15,11.90,11.90,11.90,11.90,000,11.90
+1995-02-14,11.43,11.43,11.43,11.43,000,11.43
+1995-02-13,11.41,11.41,11.41,11.41,000,11.41
+1995-02-10,11.57,11.57,11.57,11.57,000,11.57
+1995-02-09,11.63,11.63,11.63,11.63,000,11.63
+1995-02-08,11.42,11.42,11.42,11.42,000,11.42
+1995-02-07,11.17,11.17,11.17,11.17,000,11.17
+1995-02-06,11.22,11.22,11.22,11.22,000,11.22
+1995-02-03,10.98,10.98,10.98,10.98,000,10.98
+1995-02-02,11.13,11.13,11.13,11.13,000,11.13
+1995-02-01,11.73,11.73,11.73,11.73,000,11.73
+1995-01-31,11.96,11.96,11.96,11.96,000,11.96
+1995-01-30,12.26,12.26,12.26,12.26,000,12.26
+1995-01-27,11.25,11.25,11.25,11.25,000,11.25
+1995-01-26,11.25,11.25,11.25,11.25,000,11.25
+1995-01-25,11.46,11.46,11.46,11.46,000,11.46
+1995-01-24,11.94,11.94,11.94,11.94,000,11.94
+1995-01-23,12.79,12.79,12.79,12.79,000,12.79
+1995-01-20,12.15,12.15,12.15,12.15,000,12.15
+1995-01-19,11.86,11.86,11.86,11.86,000,11.86
+1995-01-18,11.57,11.57,11.57,11.57,000,11.57
+1995-01-17,11.79,11.79,11.79,11.79,000,11.79
+1995-01-16,11.14,11.14,11.14,11.14,000,11.14
+1995-01-13,11.10,11.10,11.10,11.10,000,11.10
+1995-01-12,12.83,12.83,12.83,12.83,000,12.83
+1995-01-11,12.15,12.15,12.15,12.15,000,12.15
+1995-01-10,12.52,12.52,12.52,12.52,000,12.52
+1995-01-09,13.33,13.33,13.33,13.33,000,13.33
+1995-01-06,13.13,13.13,13.13,13.13,000,13.13
+1995-01-05,13.50,13.50,13.50,13.50,000,13.50
+1995-01-04,13.53,13.53,13.53,13.53,000,13.53
+1995-01-03,14.25,14.25,14.25,14.25,000,14.25
+1994-12-30,13.20,13.20,13.20,13.20,000,13.20
+1994-12-29,12.86,12.86,12.86,12.86,000,12.86
+1994-12-28,12.81,12.81,12.81,12.81,000,12.81
+1994-12-27,12.07,12.07,12.07,12.07,000,12.07
+1994-12-23,11.82,11.82,11.82,11.82,000,11.82
+1994-12-22,12.42,12.42,12.42,12.42,000,12.42
+1994-12-21,12.05,12.05,12.05,12.05,000,12.05
+1994-12-20,12.98,12.98,12.98,12.98,000,12.98
+1994-12-19,13.02,13.02,13.02,13.02,000,13.02
+1994-12-16,12.79,12.79,12.79,12.79,000,12.79
+1994-12-15,12.87,12.87,12.87,12.87,000,12.87
+1994-12-14,13.03,13.03,13.03,13.03,000,13.03
+1994-12-13,14.94,14.94,14.94,14.94,000,14.94
+1994-12-12,15.46,15.46,15.46,15.46,000,15.46
+1994-12-09,15.76,15.76,15.76,15.76,000,15.76
+1994-12-08,17.23,17.23,17.23,17.23,000,17.23
+1994-12-07,16.28,16.28,16.28,16.28,000,16.28
+1994-12-06,16.05,16.05,16.05,16.05,000,16.05
+1994-12-05,16.10,16.10,16.10,16.10,000,16.10
+1994-12-02,16.55,16.55,16.55,16.55,000,16.55
+1994-12-01,16.69,16.69,16.69,16.69,000,16.69
+1994-11-30,15.95,15.95,15.95,15.95,000,15.95
+1994-11-29,16.15,16.15,16.15,16.15,000,16.15
+1994-11-28,16.83,16.83,16.83,16.83,000,16.83
+1994-11-25,17.44,17.44,17.44,17.44,000,17.44
+1994-11-23,18.41,18.41,18.41,18.41,000,18.41
+1994-11-22,17.24,17.24,17.24,17.24,000,17.24
+1994-11-21,16.13,16.13,16.13,16.13,000,16.13
+1994-11-18,16.00,16.00,16.00,16.00,000,16.00
+1994-11-17,15.38,15.38,15.38,15.38,000,15.38
+1994-11-16,15.56,15.56,15.56,15.56,000,15.56
+1994-11-15,16.66,16.66,16.66,16.66,000,16.66
+1994-11-14,16.68,16.68,16.68,16.68,000,16.68
+1994-11-11,16.50,16.50,16.50,16.50,000,16.50
+1994-11-10,16.00,16.00,16.00,16.00,000,16.00
+1994-11-09,16.42,16.42,16.42,16.42,000,16.42
+1994-11-08,16.30,16.30,16.30,16.30,000,16.30
+1994-11-07,17.37,17.37,17.37,17.37,000,17.37
+1994-11-04,16.75,16.75,16.75,16.75,000,16.75
+1994-11-03,15.58,15.58,15.58,15.58,000,15.58
+1994-11-02,15.34,15.34,15.34,15.34,000,15.34
+1994-11-01,14.84,14.84,14.84,14.84,000,14.84
+1994-10-31,14.56,14.56,14.56,14.56,000,14.56
+1994-10-28,14.56,14.56,14.56,14.56,000,14.56
+1994-10-27,15.67,15.67,15.67,15.67,000,15.67
+1994-10-26,15.70,15.70,15.70,15.70,000,15.70
+1994-10-25,16.13,16.13,16.13,16.13,000,16.13
+1994-10-24,16.97,16.97,16.97,16.97,000,16.97
+1994-10-21,15.91,15.91,15.91,15.91,000,15.91
+1994-10-20,15.99,15.99,15.99,15.99,000,15.99
+1994-10-19,15.13,15.13,15.13,15.13,000,15.13
+1994-10-18,14.59,14.59,14.59,14.59,000,14.59
+1994-10-17,14.76,14.76,14.76,14.76,000,14.76
+1994-10-14,13.71,13.71,13.71,13.71,000,13.71
+1994-10-13,14.90,14.90,14.90,14.90,000,14.90
+1994-10-12,14.51,14.51,14.51,14.51,000,14.51
+1994-10-11,13.55,13.55,13.55,13.55,000,13.55
+1994-10-10,14.72,14.72,14.72,14.72,000,14.72
+1994-10-07,14.92,14.92,14.92,14.92,000,14.92
+1994-10-06,16.24,16.24,16.24,16.24,000,16.24
+1994-10-05,15.92,15.92,15.92,15.92,000,15.92
+1994-10-04,16.66,16.66,16.66,16.66,000,16.66
+1994-10-03,15.44,15.44,15.44,15.44,000,15.44
+1994-09-30,14.28,14.28,14.28,14.28,000,14.28
+1994-09-29,13.97,13.97,13.97,13.97,000,13.97
+1994-09-28,13.25,13.25,13.25,13.25,000,13.25
+1994-09-27,14.13,14.13,14.13,14.13,000,14.13
+1994-09-26,14.56,14.56,14.56,14.56,000,14.56
+1994-09-23,14.53,14.53,14.53,14.53,000,14.53
+1994-09-22,13.89,13.89,13.89,13.89,000,13.89
+1994-09-21,14.49,14.49,14.49,14.49,000,14.49
+1994-09-20,14.45,14.45,14.45,14.45,000,14.45
+1994-09-19,13.06,13.06,13.06,13.06,000,13.06
+1994-09-16,13.54,13.54,13.54,13.54,000,13.54
+1994-09-15,12.42,12.42,12.42,12.42,000,12.42
+1994-09-14,12.84,12.84,12.84,12.84,000,12.84
+1994-09-13,13.77,13.77,13.77,13.77,000,13.77
+1994-09-12,14.49,14.49,14.49,14.49,000,14.49
+1994-09-09,13.60,13.60,13.60,13.60,000,13.60
+1994-09-08,11.86,11.86,11.86,11.86,000,11.86
+1994-09-07,11.81,11.81,11.81,11.81,000,11.81
+1994-09-06,11.69,11.69,11.69,11.69,000,11.69
+1994-09-02,11.40,11.40,11.40,11.40,000,11.40
+1994-09-01,11.86,11.86,11.86,11.86,000,11.86
+1994-08-31,11.97,11.97,11.97,11.97,000,11.97
+1994-08-30,11.86,11.86,11.86,11.86,000,11.86
+1994-08-29,11.82,11.82,11.82,11.82,000,11.82
+1994-08-26,12.69,12.69,12.69,12.69,000,12.69
+1994-08-25,12.02,12.02,12.02,12.02,000,12.02
+1994-08-24,11.57,11.57,11.57,11.57,000,11.57
+1994-08-23,11.75,11.75,11.75,11.75,000,11.75
+1994-08-22,12.62,12.62,12.62,12.62,000,12.62
+1994-08-19,12.83,12.83,12.83,12.83,000,12.83
+1994-08-18,12.07,12.07,12.07,12.07,000,12.07
+1994-08-17,11.54,11.54,11.54,11.54,000,11.54
+1994-08-16,11.39,11.39,11.39,11.39,000,11.39
+1994-08-15,12.06,12.06,12.06,12.06,000,12.06
+1994-08-12,11.09,11.09,11.09,11.09,000,11.09
+1994-08-11,12.13,12.13,12.13,12.13,000,12.13
+1994-08-10,11.91,11.91,11.91,11.91,000,11.91
+1994-08-09,12.54,12.54,12.54,12.54,000,12.54
+1994-08-08,12.41,12.41,12.41,12.41,000,12.41
+1994-08-05,12.34,12.34,12.34,12.34,000,12.34
+1994-08-04,12.18,12.18,12.18,12.18,000,12.18
+1994-08-03,11.35,11.35,11.35,11.35,000,11.35
+1994-08-02,11.27,11.27,11.27,11.27,000,11.27
+1994-08-01,11.17,11.17,11.17,11.17,000,11.17
+1994-07-29,11.13,11.13,11.13,11.13,000,11.13
+1994-07-28,12.03,12.03,12.03,12.03,000,12.03
+1994-07-27,11.93,11.93,11.93,11.93,000,11.93
+1994-07-26,11.66,11.66,11.66,11.66,000,11.66
+1994-07-25,11.46,11.46,11.46,11.46,000,11.46
+1994-07-22,11.22,11.22,11.22,11.22,000,11.22
+1994-07-21,11.65,11.65,11.65,11.65,000,11.65
+1994-07-20,11.70,11.70,11.70,11.70,000,11.70
+1994-07-19,11.65,11.65,11.65,11.65,000,11.65
+1994-07-18,11.44,11.44,11.44,11.44,000,11.44
+1994-07-15,11.28,11.28,11.28,11.28,000,11.28
+1994-07-14,11.64,11.64,11.64,11.64,000,11.64
+1994-07-13,12.42,12.42,12.42,12.42,000,12.42
+1994-07-12,13.40,13.40,13.40,13.40,000,13.40
+1994-07-11,13.83,13.83,13.83,13.83,000,13.83
+1994-07-08,13.26,13.26,13.26,13.26,000,13.26
+1994-07-07,14.01,14.01,14.01,14.01,000,14.01
+1994-07-06,14.70,14.70,14.70,14.70,000,14.70
+1994-07-05,14.92,14.92,14.92,14.92,000,14.92
+1994-07-01,14.36,14.36,14.36,14.36,000,14.36
+1994-06-30,14.97,14.97,14.97,14.97,000,14.97
+1994-06-29,14.42,14.42,14.42,14.42,000,14.42
+1994-06-28,15.04,15.04,15.04,15.04,000,15.04
+1994-06-27,15.53,15.53,15.53,15.53,000,15.53
+1994-06-24,16.72,16.72,16.72,16.72,000,16.72
+1994-06-23,14.12,14.12,14.12,14.12,000,14.12
+1994-06-22,14.02,14.02,14.02,14.02,000,14.02
+1994-06-21,14.70,14.70,14.70,14.70,000,14.70
+1994-06-20,13.96,13.96,13.96,13.96,000,13.96
+1994-06-17,12.31,12.31,12.31,12.31,000,12.31
+1994-06-16,11.22,11.22,11.22,11.22,000,11.22
+1994-06-15,11.52,11.52,11.52,11.52,000,11.52
+1994-06-14,11.60,11.60,11.60,11.60,000,11.60
+1994-06-13,11.92,11.92,11.92,11.92,000,11.92
+1994-06-10,12.69,12.69,12.69,12.69,000,12.69
+1994-06-09,13.21,13.21,13.21,13.21,000,13.21
+1994-06-08,13.32,13.32,13.32,13.32,000,13.32
+1994-06-07,13.05,13.05,13.05,13.05,000,13.05
+1994-06-06,13.03,13.03,13.03,13.03,000,13.03
+1994-06-03,12.44,12.44,12.44,12.44,000,12.44
+1994-06-02,12.73,12.73,12.73,12.73,000,12.73
+1994-06-01,12.72,12.72,12.72,12.72,000,12.72
+1994-05-31,13.03,13.03,13.03,13.03,000,13.03
+1994-05-27,12.49,12.49,12.49,12.49,000,12.49
+1994-05-26,12.50,12.50,12.50,12.50,000,12.50
+1994-05-25,12.43,12.43,12.43,12.43,000,12.43
+1994-05-24,12.73,12.73,12.73,12.73,000,12.73
+1994-05-23,13.49,13.49,13.49,13.49,000,13.49
+1994-05-20,13.05,13.05,13.05,13.05,000,13.05
+1994-05-19,11.94,11.94,11.94,11.94,000,11.94
+1994-05-18,12.55,12.55,12.55,12.55,000,12.55
+1994-05-17,14.08,14.08,14.08,14.08,000,14.08
+1994-05-16,14.67,14.67,14.67,14.67,000,14.67
+1994-05-13,14.54,14.54,14.54,14.54,000,14.54
+1994-05-12,15.46,15.46,15.46,15.46,000,15.46
+1994-05-11,15.55,15.55,15.55,15.55,000,15.55
+1994-05-10,15.52,15.52,15.52,15.52,000,15.52
+1994-05-09,16.16,16.16,16.16,16.16,000,16.16
+1994-05-06,15.08,15.08,15.08,15.08,000,15.08
+1994-05-05,14.56,14.56,14.56,14.56,000,14.56
+1994-05-04,14.29,14.29,14.29,14.29,000,14.29
+1994-05-03,13.81,13.81,13.81,13.81,000,13.81
+1994-05-02,14.11,14.11,14.11,14.11,000,14.11
+1994-04-29,13.77,13.77,13.77,13.77,000,13.77
+1994-04-28,14.51,14.51,14.51,14.51,000,14.51
+1994-04-26,13.80,13.80,13.80,13.80,000,13.80
+1994-04-25,14.26,14.26,14.26,14.26,000,14.26
+1994-04-22,14.94,14.94,14.94,14.94,000,14.94
+1994-04-21,14.93,14.93,14.93,14.93,000,14.93
+1994-04-20,17.01,17.01,17.01,17.01,000,17.01
+1994-04-19,16.93,16.93,16.93,16.93,000,16.93
+1994-04-18,17.22,17.22,17.22,17.22,000,17.22
+1994-04-15,15.98,15.98,15.98,15.98,000,15.98
+1994-04-14,16.27,16.27,16.27,16.27,000,16.27
+1994-04-13,17.02,17.02,17.02,17.02,000,17.02
+1994-04-12,16.42,16.42,16.42,16.42,000,16.42
+1994-04-11,16.61,16.61,16.61,16.61,000,16.61
+1994-04-08,16.92,16.92,16.92,16.92,000,16.92
+1994-04-07,16.98,16.98,16.98,16.98,000,16.98
+1994-04-06,17.38,17.38,17.38,17.38,000,17.38
+1994-04-05,18.13,18.13,18.13,18.13,000,18.13
+1994-04-04,23.87,23.87,23.87,23.87,000,23.87
+1994-03-31,20.45,20.45,20.45,20.45,000,20.45
+1994-03-30,18.59,18.59,18.59,18.59,000,18.59
+1994-03-29,16.49,16.49,16.49,16.49,000,16.49
+1994-03-28,14.90,14.90,14.90,14.90,000,14.90
+1994-03-25,13.67,13.67,13.67,13.67,000,13.67
+1994-03-24,13.43,13.43,13.43,13.43,000,13.43
+1994-03-23,12.31,12.31,12.31,12.31,000,12.31
+1994-03-22,13.39,13.39,13.39,13.39,000,13.39
+1994-03-21,14.34,14.34,14.34,14.34,000,14.34
+1994-03-18,13.32,13.32,13.32,13.32,000,13.32
+1994-03-17,12.76,12.76,12.76,12.76,000,12.76
+1994-03-16,14.16,14.16,14.16,14.16,000,14.16
+1994-03-15,14.78,14.78,14.78,14.78,000,14.78
+1994-03-14,16.61,16.61,16.61,16.61,000,16.61
+1994-03-11,14.87,14.87,14.87,14.87,000,14.87
+1994-03-10,16.55,16.55,16.55,16.55,000,16.55
+1994-03-09,14.41,14.41,14.41,14.41,000,14.41
+1994-03-08,16.23,16.23,16.23,16.23,000,16.23
+1994-03-07,14.26,14.26,14.26,14.26,000,14.26
+1994-03-04,16.00,16.00,16.00,16.00,000,16.00
+1994-03-03,16.36,16.36,16.36,16.36,000,16.36
+1994-03-02,16.08,16.08,16.08,16.08,000,16.08
+1994-03-01,15.83,15.83,15.83,15.83,000,15.83
+1994-02-28,14.87,14.87,14.87,14.87,000,14.87
+1994-02-25,15.28,15.28,15.28,15.28,000,15.28
+1994-02-24,16.34,16.34,16.34,16.34,000,16.34
+1994-02-23,13.91,13.91,13.91,13.91,000,13.91
+1994-02-22,13.52,13.52,13.52,13.52,000,13.52
+1994-02-18,14.70,14.70,14.70,14.70,000,14.70
+1994-02-17,13.79,13.79,13.79,13.79,000,13.79
+1994-02-16,13.42,13.42,13.42,13.42,000,13.42
+1994-02-15,13.14,13.14,13.14,13.14,000,13.14
+1994-02-14,14.64,14.64,14.64,14.64,000,14.64
+1994-02-11,14.46,14.46,14.46,14.46,000,14.46
+1994-02-10,14.24,14.24,14.24,14.24,000,14.24
+1994-02-09,12.41,12.41,12.41,12.41,000,12.41
+1994-02-08,13.66,13.66,13.66,13.66,000,13.66
+1994-02-07,13.96,13.96,13.96,13.96,000,13.96
+1994-02-04,15.25,15.25,15.25,15.25,000,15.25
+1994-02-03,10.75,10.75,10.75,10.75,000,10.75
+1994-02-02,10.61,10.61,10.61,10.61,000,10.61
+1994-02-01,10.65,10.65,10.65,10.65,000,10.65
+1994-01-31,10.63,10.63,10.63,10.63,000,10.63
+1994-01-28,9.94,9.94,9.94,9.94,000,9.94
+1994-01-27,10.30,10.30,10.30,10.30,000,10.30
+1994-01-26,11.17,11.17,11.17,11.17,000,11.17
+1994-01-25,11.38,11.38,11.38,11.38,000,11.38
+1994-01-24,11.60,11.60,11.60,11.60,000,11.60
+1994-01-21,11.49,11.49,11.49,11.49,000,11.49
+1994-01-20,11.16,11.16,11.16,11.16,000,11.16
+1994-01-19,11.32,11.32,11.32,11.32,000,11.32
+1994-01-18,11.63,11.63,11.63,11.63,000,11.63
+1994-01-17,11.35,11.35,11.35,11.35,000,11.35
+1994-01-14,11.42,11.42,11.42,11.42,000,11.42
+1994-01-13,12.08,12.08,12.08,12.08,000,12.08
+1994-01-12,11.65,11.65,11.65,11.65,000,11.65
+1994-01-11,11.29,11.29,11.29,11.29,000,11.29
+1994-01-10,10.74,10.74,10.74,10.74,000,10.74
+1994-01-07,10.96,10.96,10.96,10.96,000,10.96
+1994-01-06,11.27,11.27,11.27,11.27,000,11.27
+1994-01-05,10.94,10.94,10.94,10.94,000,10.94
+1994-01-04,11.91,11.91,11.91,11.91,000,11.91
+1994-01-03,12.57,12.57,12.57,12.57,000,12.57
+1993-12-31,11.66,11.66,11.66,11.66,000,11.66
+1993-12-30,10.69,10.69,10.69,10.69,000,10.69
+1993-12-29,10.46,10.46,10.46,10.46,000,10.46
+1993-12-28,9.82,9.82,9.82,9.82,000,9.82
+1993-12-27,9.70,9.70,9.70,9.70,000,9.70
+1993-12-23,9.48,9.48,9.48,9.48,000,9.48
+1993-12-22,9.31,9.31,9.31,9.31,000,9.31
+1993-12-21,10.08,10.08,10.08,10.08,000,10.08
+1993-12-20,10.75,10.75,10.75,10.75,000,10.75
+1993-12-17,11.08,11.08,11.08,11.08,000,11.08
+1993-12-16,10.90,10.90,10.90,10.90,000,10.90
+1993-12-15,11.03,11.03,11.03,11.03,000,11.03
+1993-12-14,11.13,11.13,11.13,11.13,000,11.13
+1993-12-13,10.98,10.98,10.98,10.98,000,10.98
+1993-12-10,12.60,12.60,12.60,12.60,000,12.60
+1993-12-09,12.43,12.43,12.43,12.43,000,12.43
+1993-12-08,12.46,12.46,12.46,12.46,000,12.46
+1993-12-07,12.41,12.41,12.41,12.41,000,12.41
+1993-12-06,12.84,12.84,12.84,12.84,000,12.84
+1993-12-03,12.69,12.69,12.69,12.69,000,12.69
+1993-12-02,13.51,13.51,13.51,13.51,000,13.51
+1993-12-01,13.83,13.83,13.83,13.83,000,13.83
+1993-11-30,13.76,13.76,13.76,13.76,000,13.76
+1993-11-29,14.12,14.12,14.12,14.12,000,14.12
+1993-11-26,13.77,13.77,13.77,13.77,000,13.77
+1993-11-24,13.51,13.51,13.51,13.51,000,13.51
+1993-11-23,14.27,14.27,14.27,14.27,000,14.27
+1993-11-22,15.90,15.90,15.90,15.90,000,15.90
+1993-11-19,15.03,15.03,15.03,15.03,000,15.03
+1993-11-18,14.65,14.65,14.65,14.65,000,14.65
+1993-11-17,15.57,15.57,15.57,15.57,000,15.57
+1993-11-16,15.11,15.11,15.11,15.11,000,15.11
+1993-11-15,14.46,14.46,14.46,14.46,000,14.46
+1993-11-12,13.33,13.33,13.33,13.33,000,13.33
+1993-11-11,13.88,13.88,13.88,13.88,000,13.88
+1993-11-10,13.72,13.72,13.72,13.72,000,13.72
+1993-11-09,13.94,13.94,13.94,13.94,000,13.94
+1993-11-08,14.31,14.31,14.31,14.31,000,14.31
+1993-11-05,14.97,14.97,14.97,14.97,000,14.97
+1993-11-04,14.68,14.68,14.68,14.68,000,14.68
+1993-11-03,13.26,13.26,13.26,13.26,000,13.26
+1993-11-02,11.74,11.74,11.74,11.74,000,11.74
+1993-11-01,11.78,11.78,11.78,11.78,000,11.78
+1993-10-29,11.46,11.46,11.46,11.46,000,11.46
+1993-10-28,11.88,11.88,11.88,11.88,000,11.88
+1993-10-27,12.01,12.01,12.01,12.01,000,12.01
+1993-10-26,11.83,11.83,11.83,11.83,000,11.83
+1993-10-25,11.83,11.83,11.83,11.83,000,11.83
+1993-10-22,11.48,11.48,11.48,11.48,000,11.48
+1993-10-21,11.20,11.20,11.20,11.20,000,11.20
+1993-10-20,11.32,11.32,11.32,11.32,000,11.32
+1993-10-19,11.61,11.61,11.61,11.61,000,11.61
+1993-10-18,11.33,11.33,11.33,11.33,000,11.33
+1993-10-15,10.87,10.87,10.87,10.87,000,10.87
+1993-10-14,11.00,11.00,11.00,11.00,000,11.00
+1993-10-13,11.38,11.38,11.38,11.38,000,11.38
+1993-10-12,12.41,12.41,12.41,12.41,000,12.41
+1993-10-11,12.26,12.26,12.26,12.26,000,12.26
+1993-10-08,12.04,12.04,12.04,12.04,000,12.04
+1993-10-07,13.14,13.14,13.14,13.14,000,13.14
+1993-10-06,12.68,12.68,12.68,12.68,000,12.68
+1993-10-05,12.97,12.97,12.97,12.97,000,12.97
+1993-10-04,12.85,12.85,12.85,12.85,000,12.85
+1993-10-01,11.83,11.83,11.83,11.83,000,11.83
+1993-09-30,12.99,12.99,12.99,12.99,000,12.99
+1993-09-29,12.63,12.63,12.63,12.63,000,12.63
+1993-09-28,12.19,12.19,12.19,12.19,000,12.19
+1993-09-27,12.49,12.49,12.49,12.49,000,12.49
+1993-09-24,12.47,12.47,12.47,12.47,000,12.47
+1993-09-23,13.36,13.36,13.36,13.36,000,13.36
+1993-09-22,13.75,13.75,13.75,13.75,000,13.75
+1993-09-21,17.30,17.30,17.30,17.30,000,17.30
+1993-09-20,14.60,14.60,14.60,14.60,000,14.60
+1993-09-17,13.39,13.39,13.39,13.39,000,13.39
+1993-09-16,13.36,13.36,13.36,13.36,000,13.36
+1993-09-15,12.70,12.70,12.70,12.70,000,12.70
+1993-09-14,13.15,13.15,13.15,13.15,000,13.15
+1993-09-13,12.16,12.16,12.16,12.16,000,12.16
+1993-09-10,11.70,11.70,11.70,11.70,000,11.70
+1993-09-09,12.67,12.67,12.67,12.67,000,12.67
+1993-09-08,13.24,13.24,13.24,13.24,000,13.24
+1993-09-07,12.90,12.90,12.90,12.90,000,12.90
+1993-09-03,11.16,11.16,11.16,11.16,000,11.16
+1993-09-02,11.87,11.87,11.87,11.87,000,11.87
+1993-09-01,11.48,11.48,11.48,11.48,000,11.48
+1993-08-31,11.85,11.85,11.85,11.85,000,11.85
+1993-08-30,11.74,11.74,11.74,11.74,000,11.74
+1993-08-27,11.91,11.91,11.91,11.91,000,11.91
+1993-08-26,12.14,12.14,12.14,12.14,000,12.14
+1993-08-25,12.10,12.10,12.10,12.10,000,12.10
+1993-08-24,11.80,11.80,11.80,11.80,000,11.80
+1993-08-23,12.15,12.15,12.15,12.15,000,12.15
+1993-08-20,11.62,11.62,11.62,11.62,000,11.62
+1993-08-19,11.63,11.63,11.63,11.63,000,11.63
+1993-08-18,11.52,11.52,11.52,11.52,000,11.52
+1993-08-17,11.59,11.59,11.59,11.59,000,11.59
+1993-08-16,11.69,11.69,11.69,11.69,000,11.69
+1993-08-13,12.19,12.19,12.19,12.19,000,12.19
+1993-08-12,12.38,12.38,12.38,12.38,000,12.38
+1993-08-11,12.07,12.07,12.07,12.07,000,12.07
+1993-08-10,12.31,12.31,12.31,12.31,000,12.31
+1993-08-09,12.39,12.39,12.39,12.39,000,12.39
+1993-08-06,12.33,12.33,12.33,12.33,000,12.33
+1993-08-05,12.03,12.03,12.03,12.03,000,12.03
+1993-08-04,11.71,11.71,11.71,11.71,000,11.71
+1993-08-03,11.49,11.49,11.49,11.49,000,11.49
+1993-08-02,11.47,11.47,11.47,11.47,000,11.47
+1993-07-30,11.73,11.73,11.73,11.73,000,11.73
+1993-07-29,11.25,11.25,11.25,11.25,000,11.25
+1993-07-28,11.37,11.37,11.37,11.37,000,11.37
+1993-07-27,11.34,11.34,11.34,11.34,000,11.34
+1993-07-26,11.32,11.32,11.32,11.32,000,11.32
+1993-07-23,11.32,11.32,11.32,11.32,000,11.32
+1993-07-22,11.69,11.69,11.69,11.69,000,11.69
+1993-07-21,11.97,11.97,11.97,11.97,000,11.97
+1993-07-20,11.05,11.05,11.05,11.05,000,11.05
+1993-07-19,11.46,11.46,11.46,11.46,000,11.46
+1993-07-16,10.96,10.96,10.96,10.96,000,10.96
+1993-07-15,10.60,10.60,10.60,10.60,000,10.60
+1993-07-14,10.78,10.78,10.78,10.78,000,10.78
+1993-07-13,11.02,11.02,11.02,11.02,000,11.02
+1993-07-12,10.85,10.85,10.85,10.85,000,10.85
+1993-07-09,10.80,10.80,10.80,10.80,000,10.80
+1993-07-08,12.24,12.24,12.24,12.24,000,12.24
+1993-07-07,13.05,13.05,13.05,13.05,000,13.05
+1993-07-06,13.87,13.87,13.87,13.87,000,13.87
+1993-07-02,11.33,11.33,11.33,11.33,000,11.33
+1993-07-01,11.51,11.51,11.51,11.51,000,11.51
+1993-06-30,11.26,11.26,11.26,11.26,000,11.26
+1993-06-29,11.29,11.29,11.29,11.29,000,11.29
+1993-06-28,11.11,11.11,11.11,11.11,000,11.11
+1993-06-25,11.25,11.25,11.25,11.25,000,11.25
+1993-06-24,12.25,12.25,12.25,12.25,000,12.25
+1993-06-23,12.04,12.04,12.04,12.04,000,12.04
+1993-06-22,11.65,11.65,11.65,11.65,000,11.65
+1993-06-21,12.25,12.25,12.25,12.25,000,12.25
+1993-06-18,12.24,12.24,12.24,12.24,000,12.24
+1993-06-17,11.66,11.66,11.66,11.66,000,11.66
+1993-06-16,11.87,11.87,11.87,11.87,000,11.87
+1993-06-15,11.99,11.99,11.99,11.99,000,11.99
+1993-06-14,12.33,12.33,12.33,12.33,000,12.33
+1993-06-11,12.71,12.71,12.71,12.71,000,12.71
+1993-06-10,13.31,13.31,13.31,13.31,000,13.31
+1993-06-09,13.96,13.96,13.96,13.96,000,13.96
+1993-06-08,14.74,14.74,14.74,14.74,000,14.74
+1993-06-07,14.07,14.07,14.07,14.07,000,14.07
+1993-06-04,12.86,12.86,12.86,12.86,000,12.86
+1993-06-03,13.54,13.54,13.54,13.54,000,13.54
+1993-06-02,13.48,13.48,13.48,13.48,000,13.48
+1993-06-01,13.67,13.67,13.67,13.67,000,13.67
+1993-05-28,13.47,13.47,13.47,13.47,000,13.47
+1993-05-27,13.10,13.10,13.10,13.10,000,13.10
+1993-05-26,12.88,12.88,12.88,12.88,000,12.88
+1993-05-25,14.04,14.04,14.04,14.04,000,14.04
+1993-05-24,14.10,14.10,14.10,14.10,000,14.10
+1993-05-21,14.51,14.51,14.51,14.51,000,14.51
+1993-05-20,13.98,13.98,13.98,13.98,000,13.98
+1993-05-19,14.29,14.29,14.29,14.29,000,14.29
+1993-05-18,14.19,14.19,14.19,14.19,000,14.19
+1993-05-17,14.13,14.13,14.13,14.13,000,14.13
+1993-05-14,14.39,14.39,14.39,14.39,000,14.39
+1993-05-13,14.76,14.76,14.76,14.76,000,14.76
+1993-05-12,13.56,13.56,13.56,13.56,000,13.56
+1993-05-11,13.35,13.35,13.35,13.35,000,13.35
+1993-05-10,13.72,13.72,13.72,13.72,000,13.72
+1993-05-07,13.01,13.01,13.01,13.01,000,13.01
+1993-05-06,13.22,13.22,13.22,13.22,000,13.22
+1993-05-05,12.38,12.38,12.38,12.38,000,12.38
+1993-05-04,12.14,12.14,12.14,12.14,000,12.14
+1993-05-03,12.90,12.90,12.90,12.90,000,12.90
+1993-04-30,12.42,12.42,12.42,12.42,000,12.42
+1993-04-29,12.80,12.80,12.80,12.80,000,12.80
+1993-04-28,13.12,13.12,13.12,13.12,000,13.12
+1993-04-27,13.93,13.93,13.93,13.93,000,13.93
+1993-04-26,15.25,15.25,15.25,15.25,000,15.25
+1993-04-23,13.36,13.36,13.36,13.36,000,13.36
+1993-04-22,12.68,12.68,12.68,12.68,000,12.68
+1993-04-21,12.11,12.11,12.11,12.11,000,12.11
+1993-04-20,11.94,11.94,11.94,11.94,000,11.94
+1993-04-19,12.06,12.06,12.06,12.06,000,12.06
+1993-04-16,11.29,11.29,11.29,11.29,000,11.29
+1993-04-15,10.96,10.96,10.96,10.96,000,10.96
+1993-04-14,11.76,11.76,11.76,11.76,000,11.76
+1993-04-13,11.70,11.70,11.70,11.70,000,11.70
+1993-04-12,11.93,11.93,11.93,11.93,000,11.93
+1993-04-08,12.83,12.83,12.83,12.83,000,12.83
+1993-04-07,13.64,13.64,13.64,13.64,000,13.64
+1993-04-06,14.24,14.24,14.24,14.24,000,14.24
+1993-04-05,14.12,14.12,14.12,14.12,000,14.12
+1993-04-02,14.50,14.50,14.50,14.50,000,14.50
+1993-04-01,13.02,13.02,13.02,13.02,000,13.02
+1993-03-31,12.53,12.53,12.53,12.53,000,12.53
+1993-03-30,12.23,12.23,12.23,12.23,000,12.23
+1993-03-29,12.63,12.63,12.63,12.63,000,12.63
+1993-03-26,12.21,12.21,12.21,12.21,000,12.21
+1993-03-25,12.08,12.08,12.08,12.08,000,12.08
+1993-03-24,12.44,12.44,12.44,12.44,000,12.44
+1993-03-23,13.02,13.02,13.02,13.02,000,13.02
+1993-03-22,13.66,13.66,13.66,13.66,000,13.66
+1993-03-19,13.23,13.23,13.23,13.23,000,13.23
+1993-03-18,14.17,14.17,14.17,14.17,000,14.17
+1993-03-17,14.53,14.53,14.53,14.53,000,14.53
+1993-03-16,14.51,14.51,14.51,14.51,000,14.51
+1993-03-15,14.74,14.74,14.74,14.74,000,14.74
+1993-03-12,15.66,15.66,15.66,15.66,000,15.66
+1993-03-11,14.26,14.26,14.26,14.26,000,14.26
+1993-03-10,13.91,13.91,13.91,13.91,000,13.91
+1993-03-09,14.17,14.17,14.17,14.17,000,14.17
+1993-03-08,16.22,16.22,16.22,16.22,000,16.22
+1993-03-05,14.08,14.08,14.08,14.08,000,14.08
+1993-03-04,13.44,13.44,13.44,13.44,000,13.44
+1993-03-03,13.13,13.13,13.13,13.13,000,13.13
+1993-03-02,12.49,12.49,12.49,12.49,000,12.49
+1993-03-01,13.60,13.60,13.60,13.60,000,13.60
+1993-02-26,13.16,13.16,13.16,13.16,000,13.16
+1993-02-25,13.76,13.76,13.76,13.76,000,13.76
+1993-02-24,14.72,14.72,14.72,14.72,000,14.72
+1993-02-23,15.04,15.04,15.04,15.04,000,15.04
+1993-02-22,14.70,14.70,14.70,14.70,000,14.70
+1993-02-19,15.02,15.02,15.02,15.02,000,15.02
+1993-02-18,15.56,15.56,15.56,15.56,000,15.56
+1993-02-17,15.90,15.90,15.90,15.90,000,15.90
+1993-02-16,15.76,15.76,15.76,15.76,000,15.76
+1993-02-12,12.38,12.38,12.38,12.38,000,12.38
+1993-02-11,12.69,12.69,12.69,12.69,000,12.69
+1993-02-10,13.43,13.43,13.43,13.43,000,13.43
+1993-02-09,13.48,13.48,13.48,13.48,000,13.48
+1993-02-08,13.22,13.22,13.22,13.22,000,13.22
+1993-02-05,12.90,12.90,12.90,12.90,000,12.90
+1993-02-04,12.29,12.29,12.29,12.29,000,12.29
+1993-02-03,12.12,12.12,12.12,12.12,000,12.12
+1993-02-02,12.25,12.25,12.25,12.25,000,12.25
+1993-02-01,12.33,12.33,12.33,12.33,000,12.33
+1993-01-29,12.42,12.42,12.42,12.42,000,12.42
+1993-01-28,12.04,12.04,12.04,12.04,000,12.04
+1993-01-27,12.01,12.01,12.01,12.01,000,12.01
+1993-01-26,11.45,11.45,11.45,11.45,000,11.45
+1993-01-25,11.38,11.38,11.38,11.38,000,11.38
+1993-01-22,11.30,11.30,11.30,11.30,000,11.30
+1993-01-21,11.69,11.69,11.69,11.69,000,11.69
+1993-01-20,12.15,12.15,12.15,12.15,000,12.15
+1993-01-19,12.06,12.06,12.06,12.06,000,12.06
+1993-01-18,11.49,11.49,11.49,11.49,000,11.49
+1993-01-15,11.57,11.57,11.57,11.57,000,11.57
+1993-01-14,11.99,11.99,11.99,11.99,000,11.99
+1993-01-13,12.42,12.42,12.42,12.42,000,12.42
+1993-01-12,12.78,12.78,12.78,12.78,000,12.78
+1993-01-11,12.86,12.86,12.86,12.86,000,12.86
+1993-01-08,13.77,13.77,13.77,13.77,000,13.77
+1993-01-07,14.72,14.72,14.72,14.72,000,14.72
+1993-01-06,13.37,13.37,13.37,13.37,000,13.37
+1993-01-05,13.35,13.35,13.35,13.35,000,13.35
+1993-01-04,13.36,13.36,13.36,13.36,000,13.36
+1992-12-31,12.57,12.57,12.57,12.57,000,12.57
+1992-12-30,12.60,12.60,12.60,12.60,000,12.60
+1992-12-29,12.29,12.29,12.29,12.29,000,12.29
+1992-12-28,12.22,12.22,12.22,12.22,000,12.22
+1992-12-24,11.57,11.57,11.57,11.57,000,11.57
+1992-12-23,11.51,11.51,11.51,11.51,000,11.51
+1992-12-22,11.75,11.75,11.75,11.75,000,11.75
+1992-12-21,11.65,11.65,11.65,11.65,000,11.65
+1992-12-18,11.66,11.66,11.66,11.66,000,11.66
+1992-12-17,12.14,12.14,12.14,12.14,000,12.14
+1992-12-16,12.58,12.58,12.58,12.58,000,12.58
+1992-12-15,12.41,12.41,12.41,12.41,000,12.41
+1992-12-14,12.66,12.66,12.66,12.66,000,12.66
+1992-12-11,12.34,12.34,12.34,12.34,000,12.34
+1992-12-10,12.75,12.75,12.75,12.75,000,12.75
+1992-12-09,12.58,12.58,12.58,12.58,000,12.58
+1992-12-08,11.73,11.73,11.73,11.73,000,11.73
+1992-12-07,12.00,12.00,12.00,12.00,000,12.00
+1992-12-04,11.81,11.81,11.81,11.81,000,11.81
+1992-12-03,12.03,12.03,12.03,12.03,000,12.03
+1992-12-02,12.56,12.56,12.56,12.56,000,12.56
+1992-12-01,12.80,12.80,12.80,12.80,000,12.80
+1992-11-30,13.01,13.01,13.01,13.01,000,13.01
+1992-11-27,12.58,12.58,12.58,12.58,000,12.58
+1992-11-25,12.50,12.50,12.50,12.50,000,12.50
+1992-11-24,12.66,12.66,12.66,12.66,000,12.66
+1992-11-23,13.40,13.40,13.40,13.40,000,13.40
+1992-11-20,13.67,13.67,13.67,13.67,000,13.67
+1992-11-19,14.33,14.33,14.33,14.33,000,14.33
+1992-11-18,14.55,14.55,14.55,14.55,000,14.55
+1992-11-17,15.01,15.01,15.01,15.01,000,15.01
+1992-11-16,14.86,14.86,14.86,14.86,000,14.86
+1992-11-13,14.61,14.61,14.61,14.61,000,14.61
+1992-11-12,14.37,14.37,14.37,14.37,000,14.37
+1992-11-11,13.99,13.99,13.99,13.99,000,13.99
+1992-11-10,14.37,14.37,14.37,14.37,000,14.37
+1992-11-09,14.23,14.23,14.23,14.23,000,14.23
+1992-11-06,14.69,14.69,14.69,14.69,000,14.69
+1992-11-05,15.38,15.38,15.38,15.38,000,15.38
+1992-11-04,16.28,16.28,16.28,16.28,000,16.28
+1992-11-03,17.33,17.33,17.33,17.33,000,17.33
+1992-11-02,16.67,16.67,16.67,16.67,000,16.67
+1992-10-30,16.15,16.15,16.15,16.15,000,16.15
+1992-10-29,15.47,15.47,15.47,15.47,000,15.47
+1992-10-28,15.95,15.95,15.95,15.95,000,15.95
+1992-10-27,16.24,16.24,16.24,16.24,000,16.24
+1992-10-26,16.32,16.32,16.32,16.32,000,16.32
+1992-10-23,16.46,16.46,16.46,16.46,000,16.46
+1992-10-22,15.84,15.84,15.84,15.84,000,15.84
+1992-10-21,16.62,16.62,16.62,16.62,000,16.62
+1992-10-20,16.87,16.87,16.87,16.87,000,16.87
+1992-10-19,17.31,17.31,17.31,17.31,000,17.31
+1992-10-16,17.01,17.01,17.01,17.01,000,17.01
+1992-10-15,17.11,17.11,17.11,17.11,000,17.11
+1992-10-14,18.42,18.42,18.42,18.42,000,18.42
+1992-10-13,17.90,17.90,17.90,17.90,000,17.90
+1992-10-12,19.49,19.49,19.49,19.49,000,19.49
+1992-10-09,20.51,20.51,20.51,20.51,000,20.51
+1992-10-08,19.26,19.26,19.26,19.26,000,19.26
+1992-10-07,20.23,20.23,20.23,20.23,000,20.23
+1992-10-06,19.42,19.42,19.42,19.42,000,19.42
+1992-10-05,20.01,20.01,20.01,20.01,000,20.01
+1992-10-02,17.79,17.79,17.79,17.79,000,17.79
+1992-10-01,16.31,16.31,16.31,16.31,000,16.31
+1992-09-30,14.28,14.28,14.28,14.28,000,14.28
+1992-09-29,14.97,14.97,14.97,14.97,000,14.97
+1992-09-28,15.19,15.19,15.19,15.19,000,15.19
+1992-09-25,14.80,14.80,14.80,14.80,000,14.80
+1992-09-24,13.44,13.44,13.44,13.44,000,13.44
+1992-09-23,13.83,13.83,13.83,13.83,000,13.83
+1992-09-22,13.88,13.88,13.88,13.88,000,13.88
+1992-09-21,13.45,13.45,13.45,13.45,000,13.45
+1992-09-18,13.74,13.74,13.74,13.74,000,13.74
+1992-09-17,14.31,14.31,14.31,14.31,000,14.31
+1992-09-16,14.72,14.72,14.72,14.72,000,14.72
+1992-09-15,13.63,13.63,13.63,13.63,000,13.63
+1992-09-14,13.00,13.00,13.00,13.00,000,13.00
+1992-09-11,12.47,12.47,12.47,12.47,000,12.47
+1992-09-10,12.92,12.92,12.92,12.92,000,12.92
+1992-09-09,13.36,13.36,13.36,13.36,000,13.36
+1992-09-08,13.65,13.65,13.65,13.65,000,13.65
+1992-09-04,12.98,12.98,12.98,12.98,000,12.98
+1992-09-03,12.88,12.88,12.88,12.88,000,12.88
+1992-09-02,12.73,12.73,12.73,12.73,000,12.73
+1992-09-01,13.40,13.40,13.40,13.40,000,13.40
+1992-08-31,13.58,13.58,13.58,13.58,000,13.58
+1992-08-28,13.14,13.14,13.14,13.14,000,13.14
+1992-08-27,13.66,13.66,13.66,13.66,000,13.66
+1992-08-26,14.50,14.50,14.50,14.50,000,14.50
+1992-08-25,15.88,15.88,15.88,15.88,000,15.88
+1992-08-24,15.31,15.31,15.31,15.31,000,15.31
+1992-08-21,15.01,15.01,15.01,15.01,000,15.01
+1992-08-20,14.48,14.48,14.48,14.48,000,14.48
+1992-08-19,14.35,14.35,14.35,14.35,000,14.35
+1992-08-18,13.84,13.84,13.84,13.84,000,13.84
+1992-08-17,14.61,14.61,14.61,14.61,000,14.61
+1992-08-14,14.66,14.66,14.66,14.66,000,14.66
+1992-08-13,15.34,15.34,15.34,15.34,000,15.34
+1992-08-12,14.88,14.88,14.88,14.88,000,14.88
+1992-08-11,15.09,15.09,15.09,15.09,000,15.09
+1992-08-10,14.51,14.51,14.51,14.51,000,14.51
+1992-08-07,13.94,13.94,13.94,13.94,000,13.94
+1992-08-06,14.23,14.23,14.23,14.23,000,14.23
+1992-08-05,13.82,13.82,13.82,13.82,000,13.82
+1992-08-04,13.58,13.58,13.58,13.58,000,13.58
+1992-08-03,13.83,13.83,13.83,13.83,000,13.83
+1992-07-31,13.17,13.17,13.17,13.17,000,13.17
+1992-07-30,13.50,13.50,13.50,13.50,000,13.50
+1992-07-29,13.44,13.44,13.44,13.44,000,13.44
+1992-07-28,13.05,13.05,13.05,13.05,000,13.05
+1992-07-27,13.90,13.90,13.90,13.90,000,13.90
+1992-07-24,13.37,13.37,13.37,13.37,000,13.37
+1992-07-23,13.33,13.33,13.33,13.33,000,13.33
+1992-07-22,13.57,13.57,13.57,13.57,000,13.57
+1992-07-21,12.60,12.60,12.60,12.60,000,12.60
+1992-07-20,12.66,12.66,12.66,12.66,000,12.66
+1992-07-17,12.60,12.60,12.60,12.60,000,12.60
+1992-07-16,12.27,12.27,12.27,12.27,000,12.27
+1992-07-15,12.52,12.52,12.52,12.52,000,12.52
+1992-07-14,12.85,12.85,12.85,12.85,000,12.85
+1992-07-13,14.01,14.01,14.01,14.01,000,14.01
+1992-07-10,13.70,13.70,13.70,13.70,000,13.70
+1992-07-09,14.60,14.60,14.60,14.60,000,14.60
+1992-07-08,15.53,15.53,15.53,15.53,000,15.53
+1992-07-07,15.83,15.83,15.83,15.83,000,15.83
+1992-07-06,14.87,14.87,14.87,14.87,000,14.87
+1992-07-02,13.88,13.88,13.88,13.88,000,13.88
+1992-07-01,13.34,13.34,13.34,13.34,000,13.34
+1992-06-30,13.35,13.35,13.35,13.35,000,13.35
+1992-06-29,13.21,13.21,13.21,13.21,000,13.21
+1992-06-26,14.67,14.67,14.67,14.67,000,14.67
+1992-06-25,14.40,14.40,14.40,14.40,000,14.40
+1992-06-24,14.40,14.40,14.40,14.40,000,14.40
+1992-06-23,14.53,14.53,14.53,14.53,000,14.53
+1992-06-22,16.66,16.66,16.66,16.66,000,16.66
+1992-06-19,16.31,16.31,16.31,16.31,000,16.31
+1992-06-18,18.20,18.20,18.20,18.20,000,18.20
+1992-06-17,18.08,18.08,18.08,18.08,000,18.08
+1992-06-16,15.22,15.22,15.22,15.22,000,15.22
+1992-06-15,14.76,14.76,14.76,14.76,000,14.76
+1992-06-12,14.95,14.95,14.95,14.95,000,14.95
+1992-06-11,16.29,16.29,16.29,16.29,000,16.29
+1992-06-10,16.62,16.62,16.62,16.62,000,16.62
+1992-06-09,15.97,15.97,15.97,15.97,000,15.97
+1992-06-08,15.45,15.45,15.45,15.45,000,15.45
+1992-06-05,14.65,14.65,14.65,14.65,000,14.65
+1992-06-04,13.66,13.66,13.66,13.66,000,13.66
+1992-06-03,14.35,14.35,14.35,14.35,000,14.35
+1992-06-02,14.57,14.57,14.57,14.57,000,14.57
+1992-06-01,14.43,14.43,14.43,14.43,000,14.43
+1992-05-29,13.86,13.86,13.86,13.86,000,13.86
+1992-05-28,13.77,13.77,13.77,13.77,000,13.77
+1992-05-27,13.99,13.99,13.99,13.99,000,13.99
+1992-05-26,14.92,14.92,14.92,14.92,000,14.92
+1992-05-22,13.73,13.73,13.73,13.73,000,13.73
+1992-05-21,13.92,13.92,13.92,13.92,000,13.92
+1992-05-20,13.62,13.62,13.62,13.62,000,13.62
+1992-05-19,13.57,13.57,13.57,13.57,000,13.57
+1992-05-18,14.62,14.62,14.62,14.62,000,14.62
+1992-05-15,14.82,14.82,14.82,14.82,000,14.82
+1992-05-14,15.49,15.49,15.49,15.49,000,15.49
+1992-05-13,15.19,15.19,15.19,15.19,000,15.19
+1992-05-12,15.68,15.68,15.68,15.68,000,15.68
+1992-05-11,15.17,15.17,15.17,15.17,000,15.17
+1992-05-08,15.65,15.65,15.65,15.65,000,15.65
+1992-05-07,16.54,16.54,16.54,16.54,000,16.54
+1992-05-06,16.81,16.81,16.81,16.81,000,16.81
+1992-05-05,16.66,16.66,16.66,16.66,000,16.66
+1992-05-04,16.92,16.92,16.92,16.92,000,16.92
+1992-05-01,16.61,16.61,16.61,16.61,000,16.61
+1992-04-30,15.53,15.53,15.53,15.53,000,15.53
+1992-04-29,15.95,15.95,15.95,15.95,000,15.95
+1992-04-28,16.24,16.24,16.24,16.24,000,16.24
+1992-04-27,16.49,16.49,16.49,16.49,000,16.49
+1992-04-24,16.31,16.31,16.31,16.31,000,16.31
+1992-04-23,15.83,15.83,15.83,15.83,000,15.83
+1992-04-22,15.96,15.96,15.96,15.96,000,15.96
+1992-04-21,16.53,16.53,16.53,16.53,000,16.53
+1992-04-20,15.93,15.93,15.93,15.93,000,15.93
+1992-04-16,14.85,14.85,14.85,14.85,000,14.85
+1992-04-15,16.03,16.03,16.03,16.03,000,16.03
+1992-04-14,15.98,15.98,15.98,15.98,000,15.98
+1992-04-13,15.65,15.65,15.65,15.65,000,15.65
+1992-04-10,16.85,16.85,16.85,16.85,000,16.85
+1992-04-09,17.89,17.89,17.89,17.89,000,17.89
+1992-04-08,20.15,20.15,20.15,20.15,000,20.15
+1992-04-07,18.81,18.81,18.81,18.81,000,18.81
+1992-04-06,16.72,16.72,16.72,16.72,000,16.72
+1992-04-03,17.46,17.46,17.46,17.46,000,17.46
+1992-04-02,17.06,17.06,17.06,17.06,000,17.06
+1992-04-01,16.48,16.48,16.48,16.48,000,16.48
+1992-03-31,16.18,16.18,16.18,16.18,000,16.18
+1992-03-30,15.97,15.97,15.97,15.97,000,15.97
+1992-03-27,16.02,16.02,16.02,16.02,000,16.02
+1992-03-26,15.69,15.69,15.69,15.69,000,15.69
+1992-03-25,16.19,16.19,16.19,16.19,000,16.19
+1992-03-24,16.32,16.32,16.32,16.32,000,16.32
+1992-03-23,16.73,16.73,16.73,16.73,000,16.73
+1992-03-20,16.31,16.31,16.31,16.31,000,16.31
+1992-03-19,14.57,14.57,14.57,14.57,000,14.57
+1992-03-18,16.69,16.69,16.69,16.69,000,16.69
+1992-03-17,16.79,16.79,16.79,16.79,000,16.79
+1992-03-16,18.46,18.46,18.46,18.46,000,18.46
+1992-03-13,18.35,18.35,18.35,18.35,000,18.35
+1992-03-12,19.72,19.72,19.72,19.72,000,19.72
+1992-03-11,19.79,19.79,19.79,19.79,000,19.79
+1992-03-10,18.68,18.68,18.68,18.68,000,18.68
+1992-03-09,19.68,19.68,19.68,19.68,000,19.68
+1992-03-06,19.75,19.75,19.75,19.75,000,19.75
+1992-03-05,18.47,18.47,18.47,18.47,000,18.47
+1992-03-04,17.55,17.55,17.55,17.55,000,17.55
+1992-03-03,17.26,17.26,17.26,17.26,000,17.26
+1992-03-02,16.88,16.88,16.88,16.88,000,16.88
+1992-02-28,16.68,16.68,16.68,16.68,000,16.68
+1992-02-27,16.51,16.51,16.51,16.51,000,16.51
+1992-02-26,16.64,16.64,16.64,16.64,000,16.64
+1992-02-25,16.35,16.35,16.35,16.35,000,16.35
+1992-02-24,17.13,17.13,17.13,17.13,000,17.13
+1992-02-21,16.87,16.87,16.87,16.87,000,16.87
+1992-02-20,16.72,16.72,16.72,16.72,000,16.72
+1992-02-19,17.16,17.16,17.16,17.16,000,17.16
+1992-02-18,18.22,18.22,18.22,18.22,000,18.22
+1992-02-14,17.03,17.03,17.03,17.03,000,17.03
+1992-02-13,17.45,17.45,17.45,17.45,000,17.45
+1992-02-12,17.37,17.37,17.37,17.37,000,17.37
+1992-02-11,17.70,17.70,17.70,17.70,000,17.70
+1992-02-10,18.56,18.56,18.56,18.56,000,18.56
+1992-02-07,18.51,18.51,18.51,18.51,000,18.51
+1992-02-06,18.79,18.79,18.79,18.79,000,18.79
+1992-02-05,18.22,18.22,18.22,18.22,000,18.22
+1992-02-04,17.96,17.96,17.96,17.96,000,17.96
+1992-02-03,18.20,18.20,18.20,18.20,000,18.20
+1992-01-31,17.40,17.40,17.40,17.40,000,17.40
+1992-01-30,17.49,17.49,17.49,17.49,000,17.49
+1992-01-29,17.62,17.62,17.62,17.62,000,17.62
+1992-01-28,17.67,17.67,17.67,17.67,000,17.67
+1992-01-27,16.67,16.67,16.67,16.67,000,16.67
+1992-01-24,16.24,16.24,16.24,16.24,000,16.24
+1992-01-23,16.46,16.46,16.46,16.46,000,16.46
+1992-01-22,16.75,16.75,16.75,16.75,000,16.75
+1992-01-21,17.92,17.92,17.92,17.92,000,17.92
+1992-01-20,16.42,16.42,16.42,16.42,000,16.42
+1992-01-17,16.32,16.32,16.32,16.32,000,16.32
+1992-01-16,17.64,17.64,17.64,17.64,000,17.64
+1992-01-15,17.39,17.39,17.39,17.39,000,17.39
+1992-01-14,17.01,17.01,17.01,17.01,000,17.01
+1992-01-13,16.80,16.80,16.80,16.80,000,16.80
+1992-01-10,18.45,18.45,18.45,18.45,000,18.45
+1992-01-09,18.96,18.96,18.96,18.96,000,18.96
+1992-01-08,18.72,18.72,18.72,18.72,000,18.72
+1992-01-07,19.23,19.23,19.23,19.23,000,19.23
+1992-01-06,18.96,18.96,18.96,18.96,000,18.96
+1992-01-03,18.75,18.75,18.75,18.75,000,18.75
+1992-01-02,18.95,18.95,18.95,18.95,000,18.95
+1991-12-31,19.31,19.31,19.31,19.31,000,19.31
+1991-12-30,17.63,17.63,17.63,17.63,000,17.63
+1991-12-27,15.70,15.70,15.70,15.70,000,15.70
+1991-12-26,15.44,15.44,15.44,15.44,000,15.44
+1991-12-24,15.67,15.67,15.67,15.67,000,15.67
+1991-12-23,16.61,16.61,16.61,16.61,000,16.61
+1991-12-20,17.65,17.65,17.65,17.65,000,17.65
+1991-12-19,17.96,17.96,17.96,17.96,000,17.96
+1991-12-18,17.78,17.78,17.78,17.78,000,17.78
+1991-12-17,18.12,18.12,18.12,18.12,000,18.12
+1991-12-16,17.62,17.62,17.62,17.62,000,17.62
+1991-12-13,17.88,17.88,17.88,17.88,000,17.88
+1991-12-12,19.08,19.08,19.08,19.08,000,19.08
+1991-12-11,20.57,20.57,20.57,20.57,000,20.57
+1991-12-10,19.89,19.89,19.89,19.89,000,19.89
+1991-12-09,19.74,19.74,19.74,19.74,000,19.74
+1991-12-06,19.04,19.04,19.04,19.04,000,19.04
+1991-12-05,20.19,20.19,20.19,20.19,000,20.19
+1991-12-04,19.54,19.54,19.54,19.54,000,19.54
+1991-12-03,19.70,19.70,19.70,19.70,000,19.70
+1991-12-02,20.18,20.18,20.18,20.18,000,20.18
+1991-11-29,20.26,20.26,20.26,20.26,000,20.26
+1991-11-27,19.84,19.84,19.84,19.84,000,19.84
+1991-11-26,19.80,19.80,19.80,19.80,000,19.80
+1991-11-25,21.92,21.92,21.92,21.92,000,21.92
+1991-11-22,21.20,21.20,21.20,21.20,000,21.20
+1991-11-21,19.11,19.11,19.11,19.11,000,19.11
+1991-11-20,20.40,20.40,20.40,20.40,000,20.40
+1991-11-19,20.34,20.34,20.34,20.34,000,20.34
+1991-11-18,18.28,18.28,18.28,18.28,000,18.28
+1991-11-15,21.18,21.18,21.18,21.18,000,21.18
+1991-11-14,13.96,13.96,13.96,13.96,000,13.96
+1991-11-13,13.95,13.95,13.95,13.95,000,13.95
+1991-11-12,14.04,14.04,14.04,14.04,000,14.04
+1991-11-11,14.89,14.89,14.89,14.89,000,14.89
+1991-11-08,15.43,15.43,15.43,15.43,000,15.43
+1991-11-07,15.97,15.97,15.97,15.97,000,15.97
+1991-11-06,16.47,16.47,16.47,16.47,000,16.47
+1991-11-05,16.48,16.48,16.48,16.48,000,16.48
+1991-11-04,16.35,16.35,16.35,16.35,000,16.35
+1991-11-01,15.60,15.60,15.60,15.60,000,15.60
+1991-10-31,15.48,15.48,15.48,15.48,000,15.48
+1991-10-30,15.46,15.46,15.46,15.46,000,15.46
+1991-10-29,15.55,15.55,15.55,15.55,000,15.55
+1991-10-28,15.45,15.45,15.45,15.45,000,15.45
+1991-10-25,15.75,15.75,15.75,15.75,000,15.75
+1991-10-24,15.62,15.62,15.62,15.62,000,15.62
+1991-10-23,16.26,16.26,16.26,16.26,000,16.26
+1991-10-22,16.55,16.55,16.55,16.55,000,16.55
+1991-10-21,16.66,16.66,16.66,16.66,000,16.66
+1991-10-18,15.87,15.87,15.87,15.87,000,15.87
+1991-10-17,16.32,16.32,16.32,16.32,000,16.32
+1991-10-16,14.85,14.85,14.85,14.85,000,14.85
+1991-10-15,16.22,16.22,16.22,16.22,000,16.22
+1991-10-14,16.71,16.71,16.71,16.71,000,16.71
+1991-10-11,17.60,17.60,17.60,17.60,000,17.60
+1991-10-10,17.80,17.80,17.80,17.80,000,17.80
+1991-10-09,18.54,18.54,18.54,18.54,000,18.54
+1991-10-08,17.81,17.81,17.81,17.81,000,17.81
+1991-10-07,18.58,18.58,18.58,18.58,000,18.58
+1991-10-04,15.63,15.63,15.63,15.63,000,15.63
+1991-10-03,17.04,17.04,17.04,17.04,000,17.04
+1991-10-02,15.81,15.81,15.81,15.81,000,15.81
+1991-10-01,14.81,14.81,14.81,14.81,000,14.81
+1991-09-30,15.85,15.85,15.85,15.85,000,15.85
+1991-09-27,16.31,16.31,16.31,16.31,000,16.31
+1991-09-26,15.35,15.35,15.35,15.35,000,15.35
+1991-09-25,15.68,15.68,15.68,15.68,000,15.68
+1991-09-24,16.04,16.04,16.04,16.04,000,16.04
+1991-09-23,16.38,16.38,16.38,16.38,000,16.38
+1991-09-20,17.08,17.08,17.08,17.08,000,17.08
+1991-09-19,17.56,17.56,17.56,17.56,000,17.56
+1991-09-18,17.56,17.56,17.56,17.56,000,17.56
+1991-09-17,17.68,17.68,17.68,17.68,000,17.68
+1991-09-16,17.82,17.82,17.82,17.82,000,17.82
+1991-09-13,17.88,17.88,17.88,17.88,000,17.88
+1991-09-12,16.21,16.21,16.21,16.21,000,16.21
+1991-09-11,17.96,17.96,17.96,17.96,000,17.96
+1991-09-10,18.22,18.22,18.22,18.22,000,18.22
+1991-09-09,17.73,17.73,17.73,17.73,000,17.73
+1991-09-06,16.76,16.76,16.76,16.76,000,16.76
+1991-09-05,17.31,17.31,17.31,17.31,000,17.31
+1991-09-04,17.18,17.18,17.18,17.18,000,17.18
+1991-09-03,16.57,16.57,16.57,16.57,000,16.57
+1991-08-30,14.46,14.46,14.46,14.46,000,14.46
+1991-08-29,14.82,14.82,14.82,14.82,000,14.82
+1991-08-28,15.31,15.31,15.31,15.31,000,15.31
+1991-08-27,15.46,15.46,15.46,15.46,000,15.46
+1991-08-26,14.81,14.81,14.81,14.81,000,14.81
+1991-08-23,14.41,14.41,14.41,14.41,000,14.41
+1991-08-22,14.59,14.59,14.59,14.59,000,14.59
+1991-08-21,15.62,15.62,15.62,15.62,000,15.62
+1991-08-20,18.86,18.86,18.86,18.86,000,18.86
+1991-08-19,21.19,21.19,21.19,21.19,000,21.19
+1991-08-16,16.01,16.01,16.01,16.01,000,16.01
+1991-08-15,15.19,15.19,15.19,15.19,000,15.19
+1991-08-14,15.09,15.09,15.09,15.09,000,15.09
+1991-08-13,14.73,14.73,14.73,14.73,000,14.73
+1991-08-12,15.26,15.26,15.26,15.26,000,15.26
+1991-08-09,15.45,15.45,15.45,15.45,000,15.45
+1991-08-08,15.98,15.98,15.98,15.98,000,15.98
+1991-08-07,15.56,15.56,15.56,15.56,000,15.56
+1991-08-06,15.54,15.54,15.54,15.54,000,15.54
+1991-08-05,15.92,15.92,15.92,15.92,000,15.92
+1991-08-02,15.26,15.26,15.26,15.26,000,15.26
+1991-08-01,15.47,15.47,15.47,15.47,000,15.47
+1991-07-31,15.18,15.18,15.18,15.18,000,15.18
+1991-07-30,15.47,15.47,15.47,15.47,000,15.47
+1991-07-29,15.67,15.67,15.67,15.67,000,15.67
+1991-07-26,15.45,15.45,15.45,15.45,000,15.45
+1991-07-25,15.74,15.74,15.74,15.74,000,15.74
+1991-07-24,16.41,16.41,16.41,16.41,000,16.41
+1991-07-23,16.58,16.58,16.58,16.58,000,16.58
+1991-07-22,16.90,16.90,16.90,16.90,000,16.90
+1991-07-19,15.50,15.50,15.50,15.50,000,15.50
+1991-07-18,15.77,15.77,15.77,15.77,000,15.77
+1991-07-17,17.52,17.52,17.52,17.52,000,17.52
+1991-07-16,17.49,17.49,17.49,17.49,000,17.49
+1991-07-15,17.78,17.78,17.78,17.78,000,17.78
+1991-07-12,18.29,18.29,18.29,18.29,000,18.29
+1991-07-11,17.39,17.39,17.39,17.39,000,17.39
+1991-07-10,19.19,19.19,19.19,19.19,000,19.19
+1991-07-09,19.76,19.76,19.76,19.76,000,19.76
+1991-07-08,20.29,20.29,20.29,20.29,000,20.29
+1991-07-05,18.35,18.35,18.35,18.35,000,18.35
+1991-07-03,19.47,19.47,19.47,19.47,000,19.47
+1991-07-02,17.63,17.63,17.63,17.63,000,17.63
+1991-07-01,18.64,18.64,18.64,18.64,000,18.64
+1991-06-28,19.55,19.55,19.55,19.55,000,19.55
+1991-06-27,17.87,17.87,17.87,17.87,000,17.87
+1991-06-26,17.98,17.98,17.98,17.98,000,17.98
+1991-06-25,17.85,17.85,17.85,17.85,000,17.85
+1991-06-24,18.28,18.28,18.28,18.28,000,18.28
+1991-06-21,16.51,16.51,16.51,16.51,000,16.51
+1991-06-20,16.75,16.75,16.75,16.75,000,16.75
+1991-06-19,17.44,17.44,17.44,17.44,000,17.44
+1991-06-18,16.14,16.14,16.14,16.14,000,16.14
+1991-06-17,15.50,15.50,15.50,15.50,000,15.50
+1991-06-14,15.98,15.98,15.98,15.98,000,15.98
+1991-06-13,16.99,16.99,16.99,16.99,000,16.99
+1991-06-12,17.72,17.72,17.72,17.72,000,17.72
+1991-06-11,17.32,17.32,17.32,17.32,000,17.32
+1991-06-10,17.47,17.47,17.47,17.47,000,17.47
+1991-06-07,16.98,16.98,16.98,16.98,000,16.98
+1991-06-06,16.93,16.93,16.93,16.93,000,16.93
+1991-06-05,16.40,16.40,16.40,16.40,000,16.40
+1991-06-04,16.17,16.17,16.17,16.17,000,16.17
+1991-06-03,16.87,16.87,16.87,16.87,000,16.87
+1991-05-31,15.93,15.93,15.93,15.93,000,15.93
+1991-05-30,16.02,16.02,16.02,16.02,000,16.02
+1991-05-29,15.90,15.90,15.90,15.90,000,15.90
+1991-05-28,15.67,15.67,15.67,15.67,000,15.67
+1991-05-24,15.23,15.23,15.23,15.23,000,15.23
+1991-05-23,16.11,16.11,16.11,16.11,000,16.11
+1991-05-22,16.16,16.16,16.16,16.16,000,16.16
+1991-05-21,16.07,16.07,16.07,16.07,000,16.07
+1991-05-20,17.10,17.10,17.10,17.10,000,17.10
+1991-05-17,16.64,16.64,16.64,16.64,000,16.64
+1991-05-16,17.24,17.24,17.24,17.24,000,17.24
+1991-05-15,18.38,18.38,18.38,18.38,000,18.38
+1991-05-14,18.00,18.00,18.00,18.00,000,18.00
+1991-05-13,17.66,17.66,17.66,17.66,000,17.66
+1991-05-10,17.54,17.54,17.54,17.54,000,17.54
+1991-05-09,17.17,17.17,17.17,17.17,000,17.17
+1991-05-08,17.78,17.78,17.78,17.78,000,17.78
+1991-05-07,17.46,17.46,17.46,17.46,000,17.46
+1991-05-06,17.92,17.92,17.92,17.92,000,17.92
+1991-05-03,17.24,17.24,17.24,17.24,000,17.24
+1991-05-02,17.52,17.52,17.52,17.52,000,17.52
+1991-05-01,17.77,17.77,17.77,17.77,000,17.77
+1991-04-30,18.24,18.24,18.24,18.24,000,18.24
+1991-04-29,18.27,18.27,18.27,18.27,000,18.27
+1991-04-26,17.27,17.27,17.27,17.27,000,17.27
+1991-04-25,17.15,17.15,17.15,17.15,000,17.15
+1991-04-24,16.72,16.72,16.72,16.72,000,16.72
+1991-04-23,17.02,17.02,17.02,17.02,000,17.02
+1991-04-22,16.78,16.78,16.78,16.78,000,16.78
+1991-04-19,15.68,15.68,15.68,15.68,000,15.68
+1991-04-18,16.26,16.26,16.26,16.26,000,16.26
+1991-04-17,15.47,15.47,15.47,15.47,000,15.47
+1991-04-16,15.82,15.82,15.82,15.82,000,15.82
+1991-04-15,16.50,16.50,16.50,16.50,000,16.50
+1991-04-12,18.45,18.45,18.45,18.45,000,18.45
+1991-04-11,17.24,17.24,17.24,17.24,000,17.24
+1991-04-10,19.73,19.73,19.73,19.73,000,19.73
+1991-04-09,20.12,20.12,20.12,20.12,000,20.12
+1991-04-08,17.41,17.41,17.41,17.41,000,17.41
+1991-04-05,17.63,17.63,17.63,17.63,000,17.63
+1991-04-04,18.01,18.01,18.01,18.01,000,18.01
+1991-04-03,17.61,17.61,17.61,17.61,000,17.61
+1991-04-02,17.40,17.40,17.40,17.40,000,17.40
+1991-04-01,17.42,17.42,17.42,17.42,000,17.42
+1991-03-28,16.88,16.88,16.88,16.88,000,16.88
+1991-03-27,16.55,16.55,16.55,16.55,000,16.55
+1991-03-26,16.31,16.31,16.31,16.31,000,16.31
+1991-03-25,16.76,16.76,16.76,16.76,000,16.76
+1991-03-22,16.49,16.49,16.49,16.49,000,16.49
+1991-03-21,16.86,16.86,16.86,16.86,000,16.86
+1991-03-20,16.04,16.04,16.04,16.04,000,16.04
+1991-03-19,16.11,16.11,16.11,16.11,000,16.11
+1991-03-18,15.79,15.79,15.79,15.79,000,15.79
+1991-03-15,14.90,14.90,14.90,14.90,000,14.90
+1991-03-14,14.94,14.94,14.94,14.94,000,14.94
+1991-03-13,16.09,16.09,16.09,16.09,000,16.09
+1991-03-12,18.82,18.82,18.82,18.82,000,18.82
+1991-03-11,20.88,20.88,20.88,20.88,000,20.88
+1991-03-08,20.81,20.81,20.81,20.81,000,20.81
+1991-03-07,21.05,21.05,21.05,21.05,000,21.05
+1991-03-06,20.55,20.55,20.55,20.55,000,20.55
+1991-03-05,20.45,20.45,20.45,20.45,000,20.45
+1991-03-04,20.86,20.86,20.86,20.86,000,20.86
+1991-02-28,21.23,21.23,21.23,21.23,000,21.23
+1991-02-27,21.26,21.26,21.26,21.26,000,21.26
+1991-02-26,20.38,20.38,20.38,20.38,000,20.38
+1991-02-25,22.86,22.86,22.86,22.86,000,22.86
+1991-02-22,21.01,21.01,21.01,21.01,000,21.01
+1991-02-21,20.78,20.78,20.78,20.78,000,20.78
+1991-02-20,22.26,22.26,22.26,22.26,000,22.26
+1991-02-19,19.84,19.84,19.84,19.84,000,19.84
+1991-02-15,19.57,19.57,19.57,19.57,000,19.57
+1991-02-14,21.48,21.48,21.48,21.48,000,21.48
+1991-02-13,20.86,20.86,20.86,20.86,000,20.86
+1991-02-12,22.26,22.26,22.26,22.26,000,22.26
+1991-02-11,22.56,22.56,22.56,22.56,000,22.56
+1991-02-08,23.38,23.38,23.38,23.38,000,23.38
+1991-02-07,23.60,23.60,23.60,23.60,000,23.60
+1991-02-06,22.68,22.68,22.68,22.68,000,22.68
+1991-02-05,21.46,21.46,21.46,21.46,000,21.46
+1991-02-04,21.86,21.86,21.86,21.86,000,21.86
+1991-02-01,21.04,21.04,21.04,21.04,000,21.04
+1991-01-31,20.91,20.91,20.91,20.91,000,20.91
+1991-01-30,21.37,21.37,21.37,21.37,000,21.37
+1991-01-29,23.17,23.17,23.17,23.17,000,23.17
+1991-01-28,23.05,23.05,23.05,23.05,000,23.05
+1991-01-25,22.20,22.20,22.20,22.20,000,22.20
+1991-01-24,22.86,22.86,22.86,22.86,000,22.86
+1991-01-23,23.92,23.92,23.92,23.92,000,23.92
+1991-01-22,24.90,24.90,24.90,24.90,000,24.90
+1991-01-21,24.33,24.33,24.33,24.33,000,24.33
+1991-01-18,25.39,25.39,25.39,25.39,000,25.39
+1991-01-17,27.45,27.45,27.45,27.45,000,27.45
+1991-01-16,33.20,33.20,33.20,33.20,000,33.20
+1991-01-15,36.16,36.16,36.16,36.16,000,36.16
+1991-01-14,36.20,36.20,36.20,36.20,000,36.20
+1991-01-11,32.63,32.63,32.63,32.63,000,32.63
+1991-01-10,31.33,31.33,31.33,31.33,000,31.33
+1991-01-09,33.30,33.30,33.30,33.30,000,33.30
+1991-01-08,30.38,30.38,30.38,30.38,000,30.38
+1991-01-07,28.95,28.95,28.95,28.95,000,28.95
+1991-01-04,27.19,27.19,27.19,27.19,000,27.19
+1991-01-03,27.93,27.93,27.93,27.93,000,27.93
+1991-01-02,26.62,26.62,26.62,26.62,000,26.62
+1990-12-31,26.38,26.38,26.38,26.38,000,26.38
+1990-12-28,25.05,25.05,25.05,25.05,000,25.05
+1990-12-27,24.81,24.81,24.81,24.81,000,24.81
+1990-12-26,24.18,24.18,24.18,24.18,000,24.18
+1990-12-24,24.03,24.03,24.03,24.03,000,24.03
+1990-12-21,22.66,22.66,22.66,22.66,000,22.66
+1990-12-20,23.13,23.13,23.13,23.13,000,23.13
+1990-12-19,23.08,23.08,23.08,23.08,000,23.08
+1990-12-18,23.11,23.11,23.11,23.11,000,23.11
+1990-12-17,24.85,24.85,24.85,24.85,000,24.85
+1990-12-14,23.85,23.85,23.85,23.85,000,23.85
+1990-12-13,23.05,23.05,23.05,23.05,000,23.05
+1990-12-12,21.28,21.28,21.28,21.28,000,21.28
+1990-12-11,23.75,23.75,23.75,23.75,000,23.75
+1990-12-10,23.58,23.58,23.58,23.58,000,23.58
+1990-12-07,22.59,22.59,22.59,22.59,000,22.59
+1990-12-06,22.62,22.62,22.62,22.62,000,22.62
+1990-12-05,20.94,20.94,20.94,20.94,000,20.94
+1990-12-04,22.03,22.03,22.03,22.03,000,22.03
+1990-12-03,22.29,22.29,22.29,22.29,000,22.29
+1990-11-30,22.16,22.16,22.16,22.16,000,22.16
+1990-11-29,23.91,23.91,23.91,23.91,000,23.91
+1990-11-28,22.96,22.96,22.96,22.96,000,22.96
+1990-11-27,22.86,22.86,22.86,22.86,000,22.86
+1990-11-26,22.76,22.76,22.76,22.76,000,22.76
+1990-11-23,20.98,20.98,20.98,20.98,000,20.98
+1990-11-21,21.09,21.09,21.09,21.09,000,21.09
+1990-11-20,20.09,20.09,20.09,20.09,000,20.09
+1990-11-19,20.95,20.95,20.95,20.95,000,20.95
+1990-11-16,21.34,21.34,21.34,21.34,000,21.34
+1990-11-15,22.57,22.57,22.57,22.57,000,22.57
+1990-11-14,22.89,22.89,22.89,22.89,000,22.89
+1990-11-13,24.58,24.58,24.58,24.58,000,24.58
+1990-11-12,25.60,25.60,25.60,25.60,000,25.60
+1990-11-09,26.96,26.96,26.96,26.96,000,26.96
+1990-11-08,30.79,30.79,30.79,30.79,000,30.79
+1990-11-07,30.87,30.87,30.87,30.87,000,30.87
+1990-11-06,29.11,29.11,29.11,29.11,000,29.11
+1990-11-05,29.85,29.85,29.85,29.85,000,29.85
+1990-11-02,30.03,30.03,30.03,30.03,000,30.03
+1990-11-01,30.25,30.25,30.25,30.25,000,30.25
+1990-10-31,30.04,30.04,30.04,30.04,000,30.04
+1990-10-30,30.52,30.52,30.52,30.52,000,30.52
+1990-10-29,31.54,31.54,31.54,31.54,000,31.54
+1990-10-26,30.75,30.75,30.75,30.75,000,30.75
+1990-10-25,29.04,29.04,29.04,29.04,000,29.04
+1990-10-24,28.28,28.28,28.28,28.28,000,28.28
+1990-10-23,27.57,27.57,27.57,27.57,000,27.57
+1990-10-22,27.27,27.27,27.27,27.27,000,27.27
+1990-10-19,27.86,27.86,27.86,27.86,000,27.86
+1990-10-18,29.60,29.60,29.60,29.60,000,29.60
+1990-10-17,31.37,31.37,31.37,31.37,000,31.37
+1990-10-16,31.45,31.45,31.45,31.45,000,31.45
+1990-10-15,31.64,31.64,31.64,31.64,000,31.64
+1990-10-12,31.94,31.94,31.94,31.94,000,31.94
+1990-10-11,33.98,33.98,33.98,33.98,000,33.98
+1990-10-10,31.19,31.19,31.19,31.19,000,31.19
+1990-10-09,30.71,30.71,30.71,30.71,000,30.71
+1990-10-08,28.04,28.04,28.04,28.04,000,28.04
+1990-10-05,27.85,27.85,27.85,27.85,000,27.85
+1990-10-04,27.51,27.51,27.51,27.51,000,27.51
+1990-10-03,27.90,27.90,27.90,27.90,000,27.90
+1990-10-02,27.28,27.28,27.28,27.28,000,27.28
+1990-10-01,28.06,28.06,28.06,28.06,000,28.06
+1990-09-28,29.11,29.11,29.11,29.11,000,29.11
+1990-09-27,28.67,28.67,28.67,28.67,000,28.67
+1990-09-26,28.19,28.19,28.19,28.19,000,28.19
+1990-09-25,28.81,28.81,28.81,28.81,000,28.81
+1990-09-24,30.56,30.56,30.56,30.56,000,30.56
+1990-09-21,30.04,30.04,30.04,30.04,000,30.04
+1990-09-20,28.66,28.66,28.66,28.66,000,28.66
+1990-09-19,27.88,27.88,27.88,27.88,000,27.88
+1990-09-18,28.82,28.82,28.82,28.82,000,28.82
+1990-09-17,29.55,29.55,29.55,29.55,000,29.55
+1990-09-14,30.56,30.56,30.56,30.56,000,30.56
+1990-09-13,29.33,29.33,29.33,29.33,000,29.33
+1990-09-12,28.12,28.12,28.12,28.12,000,28.12
+1990-09-11,28.38,28.38,28.38,28.38,000,28.38
+1990-09-10,29.34,29.34,29.34,29.34,000,29.34
+1990-09-07,28.73,28.73,28.73,28.73,000,28.73
+1990-09-06,30.19,30.19,30.19,30.19,000,30.19
+1990-09-05,28.52,28.52,28.52,28.52,000,28.52
+1990-09-04,29.58,29.58,29.58,29.58,000,29.58
+1990-08-31,29.90,29.90,29.90,29.90,000,29.90
+1990-08-30,29.89,29.89,29.89,29.89,000,29.89
+1990-08-29,27.38,27.38,27.38,27.38,000,27.38
+1990-08-28,29.12,29.12,29.12,29.12,000,29.12
+1990-08-27,29.63,29.63,29.63,29.63,000,29.63
+1990-08-24,33.93,33.93,33.93,33.93,000,33.93
+1990-08-23,36.47,36.47,36.47,36.47,000,36.47
+1990-08-22,30.55,30.55,30.55,30.55,000,30.55
+1990-08-21,28.90,28.90,28.90,28.90,000,28.90
+1990-08-20,26.46,26.46,26.46,26.46,000,26.46
+1990-08-17,27.53,27.53,27.53,27.53,000,27.53
+1990-08-16,27.16,27.16,27.16,27.16,000,27.16
+1990-08-15,23.31,23.31,23.31,23.31,000,23.31
+1990-08-14,24.18,24.18,24.18,24.18,000,24.18
+1990-08-13,25.74,25.74,25.74,25.74,000,25.74
+1990-08-10,25.75,25.75,25.75,25.75,000,25.75
+1990-08-09,24.39,24.39,24.39,24.39,000,24.39
+1990-08-08,28.27,28.27,28.27,28.27,000,28.27
+1990-08-07,32.75,32.75,32.75,32.75,000,32.75
+1990-08-06,35.91,35.91,35.91,35.91,000,35.91
+1990-08-03,28.74,28.74,28.74,28.74,000,28.74
+1990-08-02,20.43,20.43,20.43,20.43,000,20.43
+1990-08-01,21.64,21.64,21.64,21.64,000,21.64
+1990-07-31,21.11,21.11,21.11,21.11,000,21.11
+1990-07-30,21.16,21.16,21.16,21.16,000,21.16
+1990-07-27,21.12,21.12,21.12,21.12,000,21.12
+1990-07-26,20.26,20.26,20.26,20.26,000,20.26
+1990-07-25,20.19,20.19,20.19,20.19,000,20.19
+1990-07-24,21.79,21.79,21.79,21.79,000,21.79
+1990-07-23,23.68,23.68,23.68,23.68,000,23.68
+1990-07-20,15.63,15.63,15.63,15.63,000,15.63
+1990-07-19,18.56,18.56,18.56,18.56,000,18.56
+1990-07-18,18.90,18.90,18.90,18.90,000,18.90
+1990-07-17,16.66,16.66,16.66,16.66,000,16.66
+1990-07-16,16.75,16.75,16.75,16.75,000,16.75
+1990-07-13,17.09,17.09,17.09,17.09,000,17.09
+1990-07-12,17.06,17.06,17.06,17.06,000,17.06
+1990-07-11,16.68,16.68,16.68,16.68,000,16.68
+1990-07-10,16.92,16.92,16.92,16.92,000,16.92
+1990-07-09,16.66,16.66,16.66,16.66,000,16.66
+1990-07-06,16.41,16.41,16.41,16.41,000,16.41
+1990-07-05,17.25,17.25,17.25,17.25,000,17.25
+1990-07-03,16.11,16.11,16.11,16.11,000,16.11
+1990-07-02,16.26,16.26,16.26,16.26,000,16.26
+1990-06-29,15.50,15.50,15.50,15.50,000,15.50
+1990-06-28,16.18,16.18,16.18,16.18,000,16.18
+1990-06-27,16.00,16.00,16.00,16.00,000,16.00
+1990-06-26,16.29,16.29,16.29,16.29,000,16.29
+1990-06-25,17.06,17.06,17.06,17.06,000,17.06
+1990-06-22,19.36,19.36,19.36,19.36,000,19.36
+1990-06-21,14.72,14.72,14.72,14.72,000,14.72
+1990-06-20,15.27,15.27,15.27,15.27,000,15.27
+1990-06-19,15.23,15.23,15.23,15.23,000,15.23
+1990-06-18,17.71,17.71,17.71,17.71,000,17.71
+1990-06-15,15.90,15.90,15.90,15.90,000,15.90
+1990-06-14,17.40,17.40,17.40,17.40,000,17.40
+1990-06-13,17.38,17.38,17.38,17.38,000,17.38
+1990-06-12,16.60,16.60,16.60,16.60,000,16.60
+1990-06-11,16.34,16.34,16.34,16.34,000,16.34
+1990-06-08,17.58,17.58,17.58,17.58,000,17.58
+1990-06-07,16.88,16.88,16.88,16.88,000,16.88
+1990-06-06,17.42,17.42,17.42,17.42,000,17.42
+1990-06-05,18.97,18.97,18.97,18.97,000,18.97
+1990-06-04,18.39,18.39,18.39,18.39,000,18.39
+1990-06-01,17.09,17.09,17.09,17.09,000,17.09
+1990-05-31,17.37,17.37,17.37,17.37,000,17.37
+1990-05-30,17.44,17.44,17.44,17.44,000,17.44
+1990-05-29,18.75,18.75,18.75,18.75,000,18.75
+1990-05-25,17.32,17.32,17.32,17.32,000,17.32
+1990-05-24,17.70,17.70,17.70,17.70,000,17.70
+1990-05-23,17.18,17.18,17.18,17.18,000,17.18
+1990-05-22,17.84,17.84,17.84,17.84,000,17.84
+1990-05-21,16.72,16.72,16.72,16.72,000,16.72
+1990-05-18,17.20,17.20,17.20,17.20,000,17.20
+1990-05-17,17.27,17.27,17.27,17.27,000,17.27
+1990-05-16,17.71,17.71,17.71,17.71,000,17.71
+1990-05-15,19.49,19.49,19.49,19.49,000,19.49
+1990-05-14,20.14,20.14,20.14,20.14,000,20.14
+1990-05-11,19.81,19.81,19.81,19.81,000,19.81
+1990-05-10,18.59,18.59,18.59,18.59,000,18.59
+1990-05-09,18.64,18.64,18.64,18.64,000,18.64
+1990-05-08,18.49,18.49,18.49,18.49,000,18.49
+1990-05-07,17.65,17.65,17.65,17.65,000,17.65
+1990-05-04,17.28,17.28,17.28,17.28,000,17.28
+1990-05-03,17.81,17.81,17.81,17.81,000,17.81
+1990-05-02,19.32,19.32,19.32,19.32,000,19.32
+1990-05-01,18.43,18.43,18.43,18.43,000,18.43
+1990-04-30,19.52,19.52,19.52,19.52,000,19.52
+1990-04-27,22.19,22.19,22.19,22.19,000,22.19
+1990-04-26,20.25,20.25,20.25,20.25,000,20.25
+1990-04-25,20.86,20.86,20.86,20.86,000,20.86
+1990-04-24,21.70,21.70,21.70,21.70,000,21.70
+1990-04-23,24.16,24.16,24.16,24.16,000,24.16
+1990-04-20,23.33,23.33,23.33,23.33,000,23.33
+1990-04-19,22.46,22.46,22.46,22.46,000,22.46
+1990-04-18,22.67,22.67,22.67,22.67,000,22.67
+1990-04-17,20.38,20.38,20.38,20.38,000,20.38
+1990-04-16,20.75,20.75,20.75,20.75,000,20.75
+1990-04-12,19.80,19.80,19.80,19.80,000,19.80
+1990-04-11,17.73,17.73,17.73,17.73,000,17.73
+1990-04-10,21.69,21.69,21.69,21.69,000,21.69
+1990-04-09,22.30,22.30,22.30,22.30,000,22.30
+1990-04-06,21.76,21.76,21.76,21.76,000,21.76
+1990-04-05,21.21,21.21,21.21,21.21,000,21.21
+1990-04-04,22.03,22.03,22.03,22.03,000,22.03
+1990-04-03,20.44,20.44,20.44,20.44,000,20.44
+1990-04-02,22.84,22.84,22.84,22.84,000,22.84
+1990-03-30,19.73,19.73,19.73,19.73,000,19.73
+1990-03-29,18.46,18.46,18.46,18.46,000,18.46
+1990-03-28,19.77,19.77,19.77,19.77,000,19.77
+1990-03-27,21.01,21.01,21.01,21.01,000,21.01
+1990-03-26,19.59,19.59,19.59,19.59,000,19.59
+1990-03-23,20.46,20.46,20.46,20.46,000,20.46
+1990-03-22,22.74,22.74,22.74,22.74,000,22.74
+1990-03-21,20.10,20.10,20.10,20.10,000,20.10
+1990-03-20,19.06,19.06,19.06,19.06,000,19.06
+1990-03-19,18.29,18.29,18.29,18.29,000,18.29
+1990-03-16,17.62,17.62,17.62,17.62,000,17.62
+1990-03-15,18.81,18.81,18.81,18.81,000,18.81
+1990-03-14,19.65,19.65,19.65,19.65,000,19.65
+1990-03-13,21.05,21.05,21.05,21.05,000,21.05
+1990-03-12,20.07,20.07,20.07,20.07,000,20.07
+1990-03-09,20.30,20.30,20.30,20.30,000,20.30
+1990-03-08,19.74,19.74,19.74,19.74,000,19.74
+1990-03-07,19.10,19.10,19.10,19.10,000,19.10
+1990-03-06,20.55,20.55,20.55,20.55,000,20.55
+1990-03-05,22.03,22.03,22.03,22.03,000,22.03
+1990-03-02,21.34,21.34,21.34,21.34,000,21.34
+1990-03-01,21.90,21.90,21.90,21.90,000,21.90
+1990-02-28,21.99,21.99,21.99,21.99,000,21.99
+1990-02-27,22.69,22.69,22.69,22.69,000,22.69
+1990-02-26,23.56,23.56,23.56,23.56,000,23.56
+1990-02-23,23.69,23.69,23.69,23.69,000,23.69
+1990-02-22,22.54,22.54,22.54,22.54,000,22.54
+1990-02-21,23.89,23.89,23.89,23.89,000,23.89
+1990-02-20,22.78,22.78,22.78,22.78,000,22.78
+1990-02-16,20.78,20.78,20.78,20.78,000,20.78
+1990-02-15,19.71,19.71,19.71,19.71,000,19.71
+1990-02-14,22.05,22.05,22.05,22.05,000,22.05
+1990-02-13,23.76,23.76,23.76,23.76,000,23.76
+1990-02-12,24.38,24.38,24.38,24.38,000,24.38
+1990-02-09,23.69,23.69,23.69,23.69,000,23.69
+1990-02-08,23.77,23.77,23.77,23.77,000,23.77
+1990-02-07,24.29,24.29,24.29,24.29,000,24.29
+1990-02-06,24.69,24.69,24.69,24.69,000,24.69
+1990-02-05,24.54,24.54,24.54,24.54,000,24.54
+1990-02-02,24.32,24.32,24.32,24.32,000,24.32
+1990-02-01,24.87,24.87,24.87,24.87,000,24.87
+1990-01-31,25.36,25.36,25.36,25.36,000,25.36
+1990-01-30,27.25,27.25,27.25,27.25,000,27.25
+1990-01-29,26.44,26.44,26.44,26.44,000,26.44
+1990-01-26,26.28,26.28,26.28,26.28,000,26.28
+1990-01-25,25.63,25.63,25.63,25.63,000,25.63
+1990-01-24,25.39,25.39,25.39,25.39,000,25.39
+1990-01-23,24.72,24.72,24.72,24.72,000,24.72
+1990-01-22,26.70,26.70,26.70,26.70,000,26.70
+1990-01-19,22.50,22.50,22.50,22.50,000,22.50
+1990-01-18,24.34,24.34,24.34,24.34,000,24.34
+1990-01-17,24.16,24.16,24.16,24.16,000,24.16
+1990-01-16,24.18,24.18,24.18,24.18,000,24.18
+1990-01-15,26.34,26.34,26.34,26.34,000,26.34
+1990-01-12,24.64,24.64,24.64,24.64,000,24.64
+1990-01-11,20.05,20.05,20.05,20.05,000,20.05
+1990-01-10,22.44,22.44,22.44,22.44,000,22.44
+1990-01-09,22.20,22.20,22.20,22.20,000,22.20
+1990-01-08,20.26,20.26,20.26,20.26,000,20.26
+1990-01-05,20.11,20.11,20.11,20.11,000,20.11
+1990-01-04,19.22,19.22,19.22,19.22,000,19.22
+1990-01-03,18.19,18.19,18.19,18.19,000,18.19
+1990-01-02,17.24,17.24,17.24,17.24,000,17.24
Index: Dev/branches/Demo/d3/examples/calendar/vix.html
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/vix.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/vix.html	(revision 225)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>VIX</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.csv.js"></script>
+    <script type="text/javascript" src="../../d3.time.js"></script>
+    <script type="text/javascript" src="calendar.js"></script>
+    <link type="text/css" rel="stylesheet" href="../../lib/colorbrewer/colorbrewer.css"/>
+    <link type="text/css" rel="stylesheet" href="calendar.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="vix.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/calendar/vix.js
===================================================================
--- Dev/branches/Demo/d3/examples/calendar/vix.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/calendar/vix.js	(revision 225)
@@ -0,0 +1,60 @@
+var w = 960,
+    pw = 14,
+    z = ~~((w - pw * 2) / 53),
+    ph = z >> 1,
+    h = z * 7;
+
+var vis = d3.select("#chart")
+  .selectAll("svg")
+    .data(d3.range(1993, 2011))
+  .enter().append("svg:svg")
+    .attr("width", w)
+    .attr("height", h + ph * 2)
+    .attr("class", "RdYlGn")
+  .append("svg:g")
+    .attr("transform", "translate(" + pw + "," + ph + ")");
+
+vis.append("svg:text")
+    .attr("transform", "translate(-6," + h / 2 + ")rotate(-90)")
+    .text(function(d) { return d; });
+
+vis.selectAll("rect.day")
+    .data(calendar.dates)
+  .enter().append("svg:rect")
+    .attr("x", function(d) { return d.week * z; })
+    .attr("y", function(d) { return d.day * z; })
+    .attr("class", "day")
+    .attr("width", z)
+    .attr("height", z);
+
+vis.selectAll("path.month")
+    .data(calendar.months)
+  .enter().append("svg:path")
+    .attr("class", "month")
+    .attr("d", function(d) {
+      return "M" + (d.firstWeek + 1) * z + "," + d.firstDay * z
+          + "H" + d.firstWeek * z
+          + "V" + 7 * z
+          + "H" + d.lastWeek * z
+          + "V" + (d.lastDay + 1) * z
+          + "H" + (d.lastWeek + 1) * z
+          + "V" + 0
+          + "H" + (d.firstWeek + 1) * z
+          + "Z";
+    });
+
+d3.csv("vix.csv", function(csv) {
+  var data = d3.nest()
+      .key(function(d) { return d.Date; })
+      .rollup(function(d) { return d[0].Open; })
+      .map(csv);
+
+  var color = d3.scale.quantile()
+      .domain(d3.values(data))
+      .range(d3.range(9).reverse());
+
+  vis.selectAll("rect.day")
+      .attr("class", function(d) { return "day q" + color(data[d.Date]) + "-9"; })
+    .append("svg:title")
+      .text(function(d) { return d.Date + ": " + data[d.Date]; });
+});
Index: Dev/branches/Demo/d3/examples/cartogram/cartogram.css
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/cartogram.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/cartogram.css	(revision 225)
@@ -0,0 +1,20 @@
+#chart {
+  width: 960px;
+  height: 500px;
+}
+
+.black path {
+  fill: none;
+  stroke: #ccc;
+  stroke-width: 3px;
+}
+
+.white path {
+  fill: #fff;
+  stroke: #fff;
+}
+
+.grey path {
+  fill: #ccc;
+  stroke: #666;
+}
Index: Dev/branches/Demo/d3/examples/cartogram/cartogram.html
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/cartogram.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/cartogram.html	(revision 225)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Non-Contiguous Cartogram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <link type="text/css" rel="stylesheet" href="cartogram.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="cartogram.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/cartogram/cartogram.js
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/cartogram.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/cartogram.js	(revision 225)
@@ -0,0 +1,50 @@
+// Ratio of Obese (BMI >= 30) in U.S. Adults, CDC 2008
+var data = [
+  , .187, .198, , .133, .175, .151, , .1, .125, .171, , .172, .133, , .108,
+  .142, .167, .201, .175, .159, .169, .177, .141, .163, .117, .182, .153, .195,
+  .189, .134, .163, .133, .151, .145, .13, .139, .169, .164, .175, .135, .152,
+  .169, , .132, .167, .139, .184, .159, .14, .146, .157, , .139, .183, .16, .143
+];
+
+var svg = d3.select("#chart")
+  .append("svg:svg");
+
+d3.json("../data/us-states.json", function(json) {
+  var path = d3.geo.path();
+
+  // A thick black stroke for the exterior.
+  svg.append("svg:g")
+      .attr("class", "black")
+    .selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("d", path);
+
+  // A white overlay to hide interior black strokes.
+  svg.append("svg:g")
+      .attr("class", "white")
+    .selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("d", path);
+
+  // The polygons, scaled!
+  svg.append("svg:g")
+      .attr("class", "grey")
+    .selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("transform", function(d) {
+        var centroid = path.centroid(d),
+            x = centroid[0],
+            y = centroid[1];
+        return "translate(" + x + "," + y + ")"
+            + "scale(" + Math.sqrt(data[+d.id] * 5 || 0) + ")"
+            + "translate(" + -x + "," + -y + ")";
+      })
+      .style("stroke-width", function(d) {
+        return 1 / Math.sqrt(data[+d.id] * 5);
+      })
+      .attr("d", path);
+
+});
Index: Dev/branches/Demo/d3/examples/cartogram/demers.css
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/demers.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/demers.css	(revision 225)
@@ -0,0 +1,9 @@
+#chart {
+  width: 960px;
+  height: 500px;
+}
+
+rect {
+  stroke: #000;
+  stroke-width: .5px;
+}
Index: Dev/branches/Demo/d3/examples/cartogram/demers.html
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/demers.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/demers.html	(revision 225)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Demers Cartogram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="demers.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="demers.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/cartogram/demers.js
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/demers.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/demers.js	(revision 225)
@@ -0,0 +1,79 @@
+// Ratio of Obese (BMI >= 30) in U.S. Adults, CDC 2008
+var data = [
+  , .187, .198, , .133, .175, .151, , .1, .125, .171, , .172, .133, , .108,
+  .142, .167, .201, .175, .159, .169, .177, .141, .163, .117, .182, .153, .195,
+  .189, .134, .163, .133, .151, .145, .13, .139, .169, .164, .175, .135, .152,
+  .169, , .132, .167, .139, .184, .159, .14, .146, .157, , .139, .183, .16, .143
+];
+
+var color = d3.scale.linear()
+    .domain([d3.min(data), d3.max(data)])
+    .range(["#aad", "#556"]); 
+
+var force = d3.layout.force()
+    .charge(0)
+    .gravity(0)
+    .size([960, 500]);
+
+var svg = d3.select("#chart").append("svg:svg");
+
+d3.json("../data/us-state-centroids.json", function(states) {
+  var project = d3.geo.albersUsa(),
+      idToNode = {},
+      links = [],
+      nodes = states.features.map(function(d) {
+    var xy = project(d.geometry.coordinates);
+    return idToNode[d.id] = {
+      x: xy[0],
+      y: xy[1],
+      gravity: {x: xy[0], y: xy[1]},
+      r: Math.sqrt(data[+d.id] * 2500),
+      value: data[+d.id]
+    };
+  });
+
+  force
+      .nodes(nodes)
+      .links(links)
+      .start()
+      .on("tick", function(e) {
+    var k = e.alpha * .5,
+        kg = k * .1;
+    nodes.forEach(function(a, i) {
+      // Apply gravity forces.
+      a.x += (a.gravity.x - a.x) * kg;
+      a.y += (a.gravity.y - a.y) * kg;
+      nodes.slice(i + 1).forEach(function(b) {
+        // Check for collision
+        var dx = a.x - b.x,
+            dy = a.y - b.y,
+            d = a.r + b.r,
+            lx = Math.abs(dx),
+            ly = Math.abs(dy);
+        if (lx < d && ly < d) {
+          lx = (lx - d) / lx * k;
+          ly = (ly - d) / ly * k;
+          dx *= lx;
+          dy *= ly;
+          a.x -= dx;
+          a.y -= dy;
+          b.x += dx;
+          b.y += dy;
+        }
+      });
+    });
+
+    svg.selectAll("rect")
+        .attr("x", function(d) { return d.x - d.r; })
+        .attr("y", function(d) { return d.y - d.r; });
+  });
+
+  svg.selectAll("rect")
+      .data(nodes)
+    .enter().append("svg:rect")
+      .style("fill", function(d) { return color(d.value); })
+      .attr("x", function(d) { return d.x - d.r; })
+      .attr("y", function(d) { return d.y - d.r; })
+      .attr("width", function(d) { return d.r * 2; })
+      .attr("height", function(d) { return d.r * 2; });
+});
Index: Dev/branches/Demo/d3/examples/cartogram/dorling.css
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/dorling.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/dorling.css	(revision 225)
@@ -0,0 +1,9 @@
+#chart {
+  width: 960px;
+  height: 500px;
+}
+
+circle {
+  stroke: #000;
+  stroke-width: .5px;
+}
Index: Dev/branches/Demo/d3/examples/cartogram/dorling.html
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/dorling.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/dorling.html	(revision 225)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Dorling Cartogram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="dorling.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="dorling.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/cartogram/dorling.js
===================================================================
--- Dev/branches/Demo/d3/examples/cartogram/dorling.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/cartogram/dorling.js	(revision 225)
@@ -0,0 +1,80 @@
+// Ratio of Obese (BMI >= 30) in U.S. Adults, CDC 2008
+var data = [
+  , .187, .198, , .133, .175, .151, , .1, .125, .171, , .172, .133, , .108,
+  .142, .167, .201, .175, .159, .169, .177, .141, .163, .117, .182, .153, .195,
+  .189, .134, .163, .133, .151, .145, .13, .139, .169, .164, .175, .135, .152,
+  .169, , .132, .167, .139, .184, .159, .14, .146, .157, , .139, .183, .16, .143
+];
+
+var color = d3.scale.linear()
+    .domain([d3.min(data), d3.max(data)])
+    .range(["#aad", "#556"]); 
+
+var force = d3.layout.force()
+    .charge(0)
+    .gravity(0)
+    .size([960, 500]);
+
+var svg = d3.select("#chart").append("svg:svg")
+    .attr("width", 960 + 100)
+    .attr("height", 500 + 100)
+  .append("svg:g")
+    .attr("transform", "translate(50,50)");
+
+d3.json("../data/us-state-centroids.json", function(states) {
+  var project = d3.geo.albersUsa(),
+      idToNode = {},
+      links = [],
+      nodes = states.features.map(function(d) {
+    var xy = project(d.geometry.coordinates);
+    return idToNode[d.id] = {
+      x: xy[0],
+      y: xy[1],
+      gravity: {x: xy[0], y: xy[1]},
+      r: Math.sqrt(data[+d.id] * 5000),
+      value: data[+d.id]
+    };
+  });
+
+  force
+      .nodes(nodes)
+      .links(links)
+      .start()
+      .on("tick", function(e) {
+    var k = e.alpha,
+        kg = k * .02;
+    nodes.forEach(function(a, i) {
+      // Apply gravity forces.
+      a.x += (a.gravity.x - a.x) * kg;
+      a.y += (a.gravity.y - a.y) * kg;
+      nodes.slice(i + 1).forEach(function(b) {
+        // Check for collisions.
+        var dx = a.x - b.x,
+            dy = a.y - b.y,
+            l = Math.sqrt(dx * dx + dy * dy),
+            d = a.r + b.r;
+        if (l < d) {
+          l = (l - d) / l * k;
+          dx *= l;
+          dy *= l;
+          a.x -= dx;
+          a.y -= dy;
+          b.x += dx;
+          b.y += dy;
+        }
+      });
+    });
+
+    svg.selectAll("circle")
+        .attr("cx", function(d) { return d.x; })
+        .attr("cy", function(d) { return d.y; });
+  });
+
+  svg.selectAll("circle")
+      .data(nodes)
+    .enter().append("svg:circle")
+      .style("fill", function(d) { return color(d.value); })
+      .attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; })
+      .attr("r", function(d, i) { return d.r; });
+});
Index: Dev/branches/Demo/d3/examples/chord/chord-flare.html
===================================================================
--- Dev/branches/Demo/d3/examples/chord/chord-flare.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/chord/chord-flare.html	(revision 225)
@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <title>Chord Diagram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+path.chord {
+  fill-opacity: .67;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var r1 = 960 / 2,
+    r0 = r1 - 120;
+
+var fill = d3.scale.category20c();
+
+var chord = d3.layout.chord()
+    .padding(.04)
+    .sortSubgroups(d3.descending)
+    .sortChords(d3.descending);
+
+var arc = d3.svg.arc()
+    .innerRadius(r0)
+    .outerRadius(r0 + 20);
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", r1 * 2)
+    .attr("height", r1 * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + r1 + "," + r1 + ")");
+
+d3.json("../data/flare-imports.json", function(imports) {
+  var indexByName = {},
+      nameByIndex = {},
+      matrix = [],
+      n = 0;
+
+  // Returns the Flare package name for the given class name.
+  function name(name) {
+    return name.substring(0, name.lastIndexOf(".")).substring(6);
+  }
+
+  // Compute a unique index for each package name.
+  imports.forEach(function(d) {
+    d = name(d.name);
+    if (!(d in indexByName)) {
+      nameByIndex[n] = d;
+      indexByName[d] = n++;
+    }
+  });
+
+  // Construct a square matrix counting package imports.
+  imports.forEach(function(d) {
+    var source = indexByName[name(d.name)],
+        row = matrix[source];
+    if (!row) {
+     row = matrix[source] = [];
+     for (var i = -1; ++i < n;) row[i] = 0;
+    }
+    d.imports.forEach(function(d) { row[indexByName[name(d)]]++; });
+  });
+
+  chord.matrix(matrix);
+
+  var g = svg.selectAll("g.group")
+      .data(chord.groups)
+    .enter().append("svg:g")
+      .attr("class", "group");
+
+  g.append("svg:path")
+      .style("fill", function(d) { return fill(d.index); })
+      .style("stroke", function(d) { return fill(d.index); })
+      .attr("d", arc);
+
+  g.append("svg:text")
+      .each(function(d) { d.angle = (d.startAngle + d.endAngle) / 2; })
+      .attr("dy", ".35em")
+      .attr("text-anchor", function(d) { return d.angle > Math.PI ? "end" : null; })
+      .attr("transform", function(d) {
+        return "rotate(" + (d.angle * 180 / Math.PI - 90) + ")"
+            + "translate(" + (r0 + 26) + ")"
+            + (d.angle > Math.PI ? "rotate(180)" : "");
+      })
+      .text(function(d) { return nameByIndex[d.index]; });
+
+  svg.selectAll("path.chord")
+      .data(chord.chords)
+    .enter().append("svg:path")
+      .attr("class", "chord")
+      .style("stroke", function(d) { return d3.rgb(fill(d.source.index)).darker(); })
+      .style("fill", function(d) { return fill(d.source.index); })
+      .attr("d", d3.svg.chord().radius(r0));
+
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/chord/chord.css
===================================================================
--- Dev/branches/Demo/d3/examples/chord/chord.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/chord/chord.css	(revision 225)
@@ -0,0 +1,9 @@
+#chart {
+  font: 10px sans-serif;
+}
+
+.chord path {
+  fill-opacity: .67;
+  stroke: #000;
+  stroke-width: .5px;
+}
Index: Dev/branches/Demo/d3/examples/chord/chord.html
===================================================================
--- Dev/branches/Demo/d3/examples/chord/chord.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/chord/chord.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <title>Chord Diagram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="chord.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="chord.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/chord/chord.js
===================================================================
--- Dev/branches/Demo/d3/examples/chord/chord.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/chord/chord.js	(revision 225)
@@ -0,0 +1,98 @@
+// From http://mkweb.bcgsc.ca/circos/guide/tables/
+var chord = d3.layout.chord()
+  .padding(.05)
+  .sortSubgroups(d3.descending)
+  .matrix([
+    [11975,  5871, 8916, 2868],
+    [ 1951, 10048, 2060, 6171],
+    [ 8010, 16145, 8090, 8045],
+    [ 1013,   990,  940, 6907]
+  ]);
+
+var w = 600,
+    h = 600,
+    r0 = Math.min(w, h) * .41,
+    r1 = r0 * 1.1;
+
+var fill = d3.scale.ordinal()
+    .domain(d3.range(4))
+    .range(["#000000", "#FFDD89", "#957244", "#F26223"]);
+
+var svg = d3.select("#chart")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(" + w / 2 + "," + h / 2 + ")");
+
+svg.append("svg:g")
+  .selectAll("path")
+    .data(chord.groups)
+  .enter().append("svg:path")
+    .style("fill", function(d) { return fill(d.index); })
+    .style("stroke", function(d) { return fill(d.index); })
+    .attr("d", d3.svg.arc().innerRadius(r0).outerRadius(r1))
+    .on("mouseover", fade(.1))
+    .on("mouseout", fade(1));
+
+var ticks = svg.append("svg:g")
+  .selectAll("g")
+    .data(chord.groups)
+  .enter().append("svg:g")
+  .selectAll("g")
+    .data(groupTicks)
+  .enter().append("svg:g")
+    .attr("transform", function(d) {
+      return "rotate(" + (d.angle * 180 / Math.PI - 90) + ")"
+          + "translate(" + r1 + ",0)";
+    });
+
+ticks.append("svg:line")
+    .attr("x1", 1)
+    .attr("y1", 0)
+    .attr("x2", 5)
+    .attr("y2", 0)
+    .style("stroke", "#000");
+
+ticks.append("svg:text")
+    .attr("x", 8)
+    .attr("dy", ".35em")
+    .attr("text-anchor", function(d) {
+      return d.angle > Math.PI ? "end" : null;
+    })
+    .attr("transform", function(d) {
+      return d.angle > Math.PI ? "rotate(180)translate(-16)" : null;
+    })
+    .text(function(d) { return d.label; });
+
+svg.append("svg:g")
+    .attr("class", "chord")
+  .selectAll("path")
+    .data(chord.chords)
+  .enter().append("svg:path")
+    .style("fill", function(d) { return fill(d.target.index); })
+    .attr("d", d3.svg.chord().radius(r0))
+    .style("opacity", 1);
+
+/** Returns an array of tick angles and labels, given a group. */
+function groupTicks(d) {
+  var k = (d.endAngle - d.startAngle) / d.value;
+  return d3.range(0, d.value, 1000).map(function(v, i) {
+    return {
+      angle: v * k + d.startAngle,
+      label: i % 5 ? null : v / 1000 + "k"
+    };
+  });
+}
+
+/** Returns an event handler for fading a given chord group. */
+function fade(opacity) {
+  return function(g, i) {
+    svg.selectAll("g.chord path")
+        .filter(function(d) {
+          return d.source.index != i && d.target.index != i;
+        })
+      .transition()
+        .style("opacity", opacity);
+  };
+}
Index: Dev/branches/Demo/d3/examples/choropleth/choropleth-area.html
===================================================================
--- Dev/branches/Demo/d3/examples/choropleth/choropleth-area.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/choropleth/choropleth-area.html	(revision 225)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.behavior.js"></script>
+    <style type="text/css">
+
+svg {
+  background: #eee;
+  width: 960px;
+  height: 500px;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var svg = d3.select("body")
+  .append("svg:svg")
+    .call(d3.behavior.zoom()
+    .on("zoom", redraw))
+  .append("svg:g");
+
+var counties = svg.append("svg:g")
+    .attr("id", "counties");
+
+var path = d3.geo.path();
+
+var fill = d3.scale.log()
+    .domain([10, 500])
+    .range(["brown", "steelblue"]);
+
+d3.json("../data/us-counties.json", function(json) {
+  counties.selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("d", path)
+      .attr("fill", function(d) { return fill(path.area(d)); });
+});
+
+function redraw() {
+  svg.attr("transform", "translate(" + d3.event.translate + ")scale(" + d3.event.scale + ")");
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/choropleth/choropleth-bounds.html
===================================================================
--- Dev/branches/Demo/d3/examples/choropleth/choropleth-bounds.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/choropleth/choropleth-bounds.html	(revision 225)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <style type="text/css">
+
+svg {
+  background: #eee;
+  width: 960px;
+  height: 500px;
+}
+
+#counties path {
+  stroke: steelblue;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var svg = d3.select("body")
+  .append("svg:svg");
+
+var counties = svg.append("svg:g")
+    .attr("id", "counties");
+
+var path = d3.geo.path();
+
+d3.json("../data/us-counties.json", function(json) {
+  counties.selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("d", function(d) {
+        return path({
+          type: "LineString",
+          coordinates: d3.geo.bounds(d)
+        });
+      });
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/choropleth/choropleth.css
===================================================================
--- Dev/branches/Demo/d3/examples/choropleth/choropleth.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/choropleth/choropleth.css	(revision 225)
@@ -0,0 +1,16 @@
+svg {
+  background: #eee;
+  width: 960px;
+  height: 500px;
+}
+
+#counties path {
+  stroke: #fff;
+  stroke-width: .25px;
+}
+
+#states path {
+  fill: none;
+  stroke: #fff;
+  stroke-width: 1.5px;
+}
Index: Dev/branches/Demo/d3/examples/choropleth/choropleth.html
===================================================================
--- Dev/branches/Demo/d3/examples/choropleth/choropleth.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/choropleth/choropleth.html	(revision 225)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>U.S. Unemployment by County</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <link type="text/css" rel="stylesheet" href="choropleth.css"/>
+    <link type="text/css" rel="stylesheet" href="../../lib/colorbrewer/colorbrewer.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="choropleth.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/choropleth/choropleth.js
===================================================================
--- Dev/branches/Demo/d3/examples/choropleth/choropleth.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/choropleth/choropleth.js	(revision 225)
@@ -0,0 +1,38 @@
+var data; // loaded asynchronously
+
+var path = d3.geo.path();
+
+var svg = d3.select("#chart")
+  .append("svg:svg");
+
+var counties = svg.append("svg:g")
+    .attr("id", "counties")
+    .attr("class", "Blues");
+
+var states = svg.append("svg:g")
+    .attr("id", "states");
+
+d3.json("../data/us-counties.json", function(json) {
+  counties.selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("class", data ? quantize : null)
+      .attr("d", path);
+});
+
+d3.json("../data/us-states.json", function(json) {
+  states.selectAll("path")
+      .data(json.features)
+    .enter().append("svg:path")
+      .attr("d", path);
+});
+
+d3.json("unemployment.json", function(json) {
+  data = json;
+  counties.selectAll("path")
+      .attr("class", quantize);
+});
+
+function quantize(d) {
+  return "q" + Math.min(8, ~~(data[d.id] * 9 / 12)) + "-9";
+}
Index: Dev/branches/Demo/d3/examples/choropleth/unemployment.json
===================================================================
--- Dev/branches/Demo/d3/examples/choropleth/unemployment.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/choropleth/unemployment.json	(revision 225)
@@ -0,0 +1,1 @@
+{"01001":9.7,"01003":9.1,"01005":13.4,"01007":12.1,"01009":9.9,"01011":16.4,"01013":16.7,"01015":10.8,"01017":18.6,"01019":11.8,"01021":9.9,"01023":12.7,"01025":17.0,"01027":15.9,"01029":10.4,"01031":8.5,"01033":11.4,"01035":19.5,"01037":14.0,"01039":10.1,"01041":9.7,"01043":9.6,"01045":9.3,"01047":21.1,"01049":14.3,"01051":9.0,"01053":12.9,"01055":10.7,"01057":12.8,"01059":12.3,"01061":10.0,"01063":14.7,"01065":12.7,"01067":9.9,"01069":8.9,"01071":11.8,"01073":10.7,"01075":14.8,"01077":10.5,"01079":13.6,"01081":8.6,"01083":9.3,"01085":18.5,"01087":11.4,"01089":7.5,"01091":14.8,"01093":15.2,"01095":9.2,"01097":11.1,"01099":18.7,"01101":10.2,"01103":10.4,"01105":19.8,"01107":13.0,"01109":8.7,"01111":15.1,"01113":12.6,"01115":10.7,"01117":7.6,"01119":13.9,"01121":13.6,"01123":13.7,"01125":9.0,"01127":11.9,"01129":15.1,"01131":25.6,"01133":17.5,"02013":10.1,"02016":8.4,"02020":7.0,"02050":14.8,"02060":3.6,"02068":3.4,"02070":8.4,"02090":6.9,"02100":6.2,"02110":5.7,"02122":9.7,"02130":6.1,"02150":6.6,"02164":5.9,"02170":8.8,"02180":12.1,"02185":5.7,"02188":13.2,"02201":13.6,"02220":5.9,"02232":7.3,"02240":8.1,"02261":6.4,"02270":20.4,"02280":9.8,"02282":6.3,"02290":13.6,"04001":14.8,"04003":7.4,"04005":7.7,"04007":10.9,"04009":14.4,"04011":21.5,"04012":8.9,"04013":8.5,"04015":10.2,"04017":14.2,"04019":8.4,"04021":11.8,"04023":17.2,"04025":9.5,"04027":24.2,"05001":14.3,"05003":9.1,"05005":8.2,"05007":5.3,"05009":6.4,"05011":7.8,"05013":6.2,"05015":4.3,"05017":9.6,"05019":6.3,"05021":10.4,"05023":5.9,"05025":6.0,"05027":8.1,"05029":6.5,"05031":5.9,"05033":6.6,"05035":9.9,"05037":7.1,"05039":7.6,"05041":9.9,"05043":9.1,"05045":6.0,"05047":5.9,"05049":6.1,"05051":6.6,"05053":5.7,"05055":8.2,"05057":8.6,"05059":7.3,"05061":7.2,"05063":7.8,"05065":7.7,"05067":9.2,"05069":9.2,"05071":6.1,"05073":8.6,"05075":7.9,"05077":8.2,"05079":8.2,"05081":5.6,"05083":7.7,"05085":5.2,"05087":5.3,"05089":11.2,"05091":4.5,"05093":11.3,"05095":7.4,"05097":5.8,"05099":8.7,"05101":6.2,"05103":7.1,"05105":5.6,"05107":8.8,"05109":6.3,"05111":7.5,"05113":6.4,"05115":6.2,"05117":6.7,"05119":6.0,"05121":7.3,"05123":9.4,"05125":5.8,"05127":6.3,"05129":5.9,"05131":6.2,"05133":5.1,"05135":7.8,"05137":6.6,"05139":9.5,"05141":9.1,"05143":5.0,"05145":6.7,"05147":9.1,"05149":6.4,"06001":11.3,"06003":15.2,"06005":12.1,"06007":12.2,"06009":14.3,"06011":14.5,"06013":11.2,"06015":11.9,"06017":11.2,"06019":14.1,"06021":13.8,"06023":10.3,"06025":30.1,"06027":9.5,"06029":13.9,"06031":13.9,"06033":14.7,"06035":11.8,"06037":12.7,"06039":12.3,"06041":8.0,"06043":8.8,"06045":10.1,"06047":15.7,"06049":11.1,"06051":10.3,"06053":10.0,"06055":8.7,"06057":10.9,"06059":9.4,"06061":11.3,"06063":13.9,"06065":14.7,"06067":12.2,"06069":12.5,"06071":13.6,"06073":10.2,"06075":9.7,"06077":15.5,"06079":9.0,"06081":9.0,"06083":8.5,"06085":11.8,"06087":10.2,"06089":14.7,"06091":13.7,"06093":13.5,"06095":11.5,"06097":9.9,"06099":15.3,"06101":15.1,"06103":13.7,"06105":15.9,"06107":14.9,"06109":12.7,"06111":11.0,"06113":10.9,"06115":17.8,"08001":8.1,"08003":5.5,"08005":6.9,"08007":6.2,"08009":3.4,"08011":5.0,"08013":5.5,"08014":6.6,"08015":5.1,"08017":2.0,"08019":7.0,"08021":5.1,"08023":8.4,"08025":7.6,"08027":5.2,"08029":6.6,"08031":7.7,"08033":13.2,"08035":5.9,"08037":6.2,"08039":6.0,"08041":7.2,"08043":7.7,"08045":5.8,"08047":6.0,"08049":5.8,"08051":4.4,"08053":2.2,"08055":7.2,"08057":3.3,"08059":6.7,"08061":2.8,"08063":2.9,"08065":7.1,"08067":4.7,"08069":5.6,"08071":7.0,"08073":3.7,"08075":4.6,"08077":8.2,"08079":5.3,"08081":5.6,"08083":6.3,"08085":6.9,"08087":4.9,"08089":5.8,"08091":4.1,"08093":6.1,"08095":2.6,"08097":5.0,"08099":5.0,"08101":7.5,"08103":3.9,"08105":4.8,"08107":6.0,"08109":7.8,"08111":5.3,"08113":4.2,"08115":3.3,"08117":5.8,"08119":6.7,"08121":3.2,"08123":7.5,"08125":2.6,"09001":7.8,"09003":8.8,"09005":7.9,"09007":6.7,"09009":8.9,"09011":7.6,"09013":6.7,"09015":9.0,"10001":7.9,"10003":8.6,"10005":7.3,"11001":11.7,"12001":7.1,"12003":11.4,"12005":8.9,"12007":8.3,"12009":11.1,"12011":9.8,"12013":8.2,"12015":12.7,"12017":12.1,"12019":9.8,"12021":13.1,"12023":9.0,"12027":11.7,"12029":12.3,"12031":11.2,"12033":9.8,"12035":16.2,"12037":7.1,"12039":9.6,"12041":10.0,"12043":10.0,"12045":9.8,"12047":11.3,"12049":12.6,"12051":16.8,"12053":13.8,"12055":11.6,"12057":11.5,"12059":7.2,"12061":15.2,"12063":7.2,"12065":8.5,"12067":7.2,"12069":12.3,"12071":13.9,"12073":7.2,"12075":12.1,"12077":5.3,"12079":11.7,"12081":12.7,"12083":13.3,"12085":11.9,"12086":11.3,"12087":7.0,"12089":10.7,"12091":7.2,"12093":13.3,"12095":11.4,"12097":12.8,"12099":11.7,"12101":12.5,"12103":11.2,"12105":12.7,"12107":12.2,"12109":9.0,"12111":15.3,"12113":9.4,"12115":12.3,"12117":10.6,"12119":9.0,"12121":9.8,"12123":10.4,"12125":8.4,"12127":11.7,"12129":7.2,"12131":6.8,"12133":9.6,"13001":9.7,"13003":12.6,"13005":8.5,"13007":9.1,"13009":11.6,"13011":6.7,"13013":11.1,"13015":13.3,"13017":15.3,"13019":12.4,"13021":10.0,"13023":9.7,"13025":11.6,"13027":8.7,"13029":8.1,"13031":9.0,"13033":12.2,"13035":12.7,"13037":11.1,"13039":9.1,"13043":9.3,"13045":10.8,"13047":8.0,"13049":10.6,"13051":8.5,"13053":14.6,"13055":11.4,"13057":9.5,"13059":7.0,"13061":8.2,"13063":12.3,"13065":11.0,"13067":9.6,"13069":16.8,"13071":9.0,"13073":7.0,"13075":11.9,"13077":10.0,"13079":9.5,"13081":12.1,"13083":9.0,"13085":10.1,"13087":12.7,"13089":10.7,"13091":11.2,"13093":10.1,"13095":11.1,"13097":11.4,"13099":10.5,"13101":6.7,"13103":7.9,"13105":12.2,"13107":10.3,"13109":8.9,"13111":10.0,"13113":8.4,"13115":11.1,"13117":8.6,"13119":11.8,"13121":10.7,"13123":9.8,"13125":11.1,"13127":8.2,"13129":13.1,"13131":9.8,"13133":11.1,"13135":9.4,"13137":9.4,"13139":9.1,"13141":17.7,"13143":11.3,"13145":7.2,"13147":13.8,"13149":12.4,"13151":10.4,"13153":7.3,"13155":14.5,"13157":10.9,"13159":12.7,"13161":13.5,"13163":14.9,"13165":19.6,"13167":11.9,"13169":8.6,"13171":15.3,"13173":8.4,"13175":10.8,"13177":7.9,"13179":8.5,"13181":10.3,"13183":5.9,"13185":8.2,"13187":11.1,"13189":12.1,"13191":9.6,"13193":13.0,"13195":8.3,"13197":9.9,"13199":13.2,"13201":8.7,"13205":10.4,"13207":10.2,"13209":8.5,"13211":9.8,"13213":12.3,"13215":9.2,"13217":12.6,"13219":6.2,"13221":8.2,"13223":10.7,"13225":10.2,"13227":10.8,"13229":9.3,"13231":11.8,"13233":10.8,"13235":7.1,"13237":10.4,"13239":11.8,"13241":10.4,"13243":13.0,"13245":10.3,"13247":12.0,"13249":13.8,"13251":13.7,"13253":10.7,"13255":15.4,"13257":10.7,"13259":10.7,"13261":12.9,"13263":9.8,"13265":12.4,"13267":8.7,"13269":13.0,"13271":16.2,"13273":11.6,"13275":9.3,"13277":10.6,"13279":9.8,"13281":7.8,"13283":11.9,"13285":12.9,"13287":13.0,"13289":11.4,"13291":9.0,"13293":13.3,"13295":9.6,"13297":11.0,"13299":10.7,"13301":18.8,"13303":14.0,"13305":11.7,"13307":9.1,"13309":9.1,"13311":9.5,"13313":12.5,"13315":11.6,"13317":11.7,"13319":10.7,"13321":10.8,"15001":10.8,"15003":6.3,"15007":9.6,"15009":9.7,"16001":9.1,"16003":12.1,"16005":8.4,"16007":5.2,"16009":12.1,"16011":5.9,"16013":7.7,"16015":7.1,"16017":9.5,"16019":5.9,"16021":12.0,"16023":4.5,"16025":11.0,"16027":10.6,"16029":6.0,"16031":5.9,"16033":4.1,"16035":11.8,"16037":3.9,"16039":7.7,"16041":4.0,"16043":6.6,"16045":10.4,"16047":5.5,"16049":8.3,"16051":6.8,"16053":5.9,"16055":8.7,"16057":5.9,"16059":6.5,"16061":5.2,"16063":9.7,"16065":5.5,"16067":6.0,"16069":5.5,"16071":5.0,"16073":4.1,"16075":7.7,"16077":6.7,"16079":11.9,"16081":5.1,"16083":6.8,"16085":11.4,"16087":8.4,"17001":7.9,"17003":11.2,"17005":9.3,"17007":13.8,"17009":4.5,"17011":10.9,"17013":9.5,"17015":10.5,"17017":7.3,"17019":8.2,"17021":9.9,"17023":13.1,"17025":11.4,"17027":7.9,"17029":9.1,"17031":10.6,"17033":10.5,"17035":9.7,"17037":9.2,"17039":9.2,"17041":9.1,"17043":8.6,"17045":10.7,"17047":9.1,"17049":7.9,"17051":11.6,"17053":10.4,"17055":14.6,"17057":12.5,"17059":11.0,"17061":9.2,"17063":11.4,"17065":9.3,"17067":11.3,"17069":12.8,"17071":9.4,"17073":8.6,"17075":10.0,"17077":7.3,"17079":9.5,"17081":10.0,"17083":8.8,"17085":8.1,"17087":10.4,"17089":9.9,"17091":12.8,"17093":10.4,"17095":10.3,"17097":10.0,"17099":12.4,"17101":10.3,"17103":10.9,"17105":10.7,"17107":9.5,"17109":7.7,"17111":9.3,"17113":7.4,"17115":12.4,"17117":10.5,"17119":9.7,"17121":11.9,"17123":10.6,"17125":14.3,"17127":8.0,"17129":7.8,"17131":8.9,"17133":7.8,"17135":12.2,"17137":8.4,"17139":9.0,"17141":11.9,"17143":11.6,"17145":11.9,"17147":8.2,"17149":8.1,"17151":10.6,"17153":11.9,"17155":15.0,"17157":9.4,"17159":10.5,"17161":9.5,"17163":10.8,"17165":11.2,"17167":7.9,"17169":6.6,"17171":7.5,"17173":10.0,"17175":9.8,"17177":11.6,"17179":11.3,"17181":10.8,"17183":12.0,"17185":10.3,"17187":8.0,"17189":8.0,"17191":9.7,"17193":8.6,"17195":10.6,"17197":9.9,"17199":9.6,"17201":15.5,"17203":8.6,"18001":13.4,"18003":9.3,"18005":8.8,"18007":9.0,"18009":13.3,"18011":6.8,"18013":7.8,"18015":9.9,"18017":10.5,"18019":8.2,"18021":9.6,"18023":9.2,"18025":10.5,"18027":4.9,"18029":8.9,"18031":11.0,"18033":12.4,"18035":9.5,"18037":8.0,"18039":15.0,"18041":13.4,"18043":7.4,"18045":11.6,"18047":8.9,"18049":11.2,"18051":6.7,"18053":11.1,"18055":7.1,"18057":6.1,"18059":7.8,"18061":7.8,"18063":6.8,"18065":12.0,"18067":11.9,"18069":11.1,"18071":10.1,"18073":8.7,"18075":10.4,"18077":9.5,"18079":12.2,"18081":7.4,"18083":6.6,"18085":11.0,"18087":14.0,"18089":9.4,"18091":10.7,"18093":11.1,"18095":9.7,"18097":8.4,"18099":11.4,"18101":6.3,"18103":12.3,"18105":5.6,"18107":9.7,"18109":7.5,"18111":8.9,"18113":14.5,"18115":10.5,"18117":9.2,"18119":8.1,"18121":8.3,"18123":8.8,"18125":8.7,"18127":8.2,"18129":7.0,"18131":9.5,"18133":8.2,"18135":10.2,"18137":9.1,"18139":9.5,"18141":10.4,"18143":12.1,"18145":8.8,"18147":8.1,"18149":12.6,"18151":12.9,"18153":9.3,"18155":7.0,"18157":8.5,"18159":10.3,"18161":8.6,"18163":7.4,"18165":10.8,"18167":9.2,"18169":12.0,"18171":10.1,"18173":6.9,"18175":11.2,"18177":10.9,"18179":9.1,"18181":9.4,"18183":11.6,"19001":5.1,"19003":6.0,"19005":9.3,"19007":9.4,"19009":5.1,"19011":5.8,"19013":5.8,"19015":5.9,"19017":5.0,"19019":5.9,"19021":5.5,"19023":6.0,"19025":5.4,"19027":4.2,"19029":5.8,"19031":5.7,"19033":6.7,"19035":4.4,"19037":8.4,"19039":7.4,"19041":6.2,"19043":7.9,"19045":7.7,"19047":4.7,"19049":5.1,"19051":10.1,"19053":6.6,"19055":6.8,"19057":8.2,"19059":5.8,"19061":6.0,"19063":8.6,"19065":8.5,"19067":8.7,"19069":7.0,"19071":7.0,"19073":6.3,"19075":4.9,"19077":5.6,"19079":8.1,"19081":9.0,"19083":6.0,"19085":4.4,"19087":8.8,"19089":8.6,"19091":6.2,"19093":5.8,"19095":5.8,"19097":7.7,"19099":8.1,"19101":8.7,"19103":4.4,"19105":6.3,"19107":7.1,"19109":5.6,"19111":11.4,"19113":6.5,"19115":8.0,"19117":6.0,"19119":4.3,"19121":5.8,"19123":7.7,"19125":5.7,"19127":7.0,"19129":4.3,"19131":5.4,"19133":7.1,"19135":7.5,"19137":8.7,"19139":8.9,"19141":5.3,"19143":5.4,"19145":8.7,"19147":7.0,"19149":4.7,"19151":5.2,"19153":6.2,"19155":4.8,"19157":6.6,"19159":5.3,"19161":4.7,"19163":7.3,"19165":3.9,"19167":4.1,"19169":4.5,"19171":6.6,"19173":6.7,"19175":6.0,"19177":8.0,"19179":9.4,"19181":5.8,"19183":4.9,"19185":6.4,"19187":8.3,"19189":9.1,"19191":5.8,"19193":5.7,"19195":6.3,"19197":8.4,"20001":7.8,"20003":7.9,"20005":8.1,"20007":5.1,"20009":6.1,"20011":6.5,"20013":5.6,"20015":7.2,"20017":5.4,"20019":8.4,"20021":8.5,"20023":3.7,"20025":3.7,"20027":4.2,"20029":4.5,"20031":5.7,"20033":3.8,"20035":7.6,"20037":8.1,"20039":3.3,"20041":5.1,"20043":8.8,"20045":5.4,"20047":4.4,"20049":11.0,"20051":3.6,"20053":4.1,"20055":4.3,"20057":3.8,"20059":7.1,"20061":6.9,"20063":3.5,"20065":4.3,"20067":4.2,"20069":3.4,"20071":4.5,"20073":7.2,"20075":4.2,"20077":5.6,"20079":7.4,"20081":3.7,"20083":4.2,"20085":6.0,"20087":6.7,"20089":4.9,"20091":6.8,"20093":4.5,"20095":6.3,"20097":4.9,"20099":7.8,"20101":3.4,"20103":7.3,"20105":6.3,"20107":8.4,"20109":4.0,"20111":5.7,"20113":5.1,"20115":6.3,"20117":4.9,"20119":4.2,"20121":6.8,"20123":5.8,"20125":9.4,"20127":6.8,"20129":4.7,"20131":4.3,"20133":7.0,"20135":4.0,"20137":4.7,"20139":7.0,"20141":4.4,"20143":6.5,"20145":3.7,"20147":6.0,"20149":4.1,"20151":5.3,"20153":3.5,"20155":6.3,"20157":4.1,"20159":5.1,"20161":3.2,"20163":7.3,"20165":5.9,"20167":4.6,"20169":5.7,"20171":3.2,"20173":8.8,"20175":5.1,"20177":6.4,"20179":3.2,"20181":3.9,"20183":4.3,"20185":6.1,"20187":3.4,"20189":5.3,"20191":9.0,"20193":3.6,"20195":3.6,"20197":6.6,"20199":5.9,"20201":4.5,"20203":3.5,"20205":10.2,"20207":8.9,"20209":10.4,"21001":10.1,"21003":14.3,"21005":10.9,"21007":10.2,"21009":11.6,"21011":13.3,"21013":12.5,"21015":9.2,"21017":9.1,"21019":8.3,"21021":11.0,"21023":10.2,"21025":10.0,"21027":12.1,"21029":10.8,"21031":13.7,"21033":10.9,"21035":8.0,"21037":10.7,"21039":9.1,"21041":12.4,"21043":13.5,"21045":10.2,"21047":12.9,"21049":11.4,"21051":13.5,"21053":9.0,"21055":10.8,"21057":13.0,"21059":9.1,"21061":12.8,"21063":12.6,"21065":12.9,"21067":7.7,"21069":12.2,"21071":12.4,"21073":9.1,"21075":14.4,"21077":11.1,"21079":11.9,"21081":10.1,"21083":10.3,"21085":16.4,"21087":12.4,"21089":9.8,"21091":13.6,"21093":10.0,"21095":12.5,"21097":11.1,"21099":10.6,"21101":9.8,"21103":10.7,"21105":9.2,"21107":9.1,"21109":17.5,"21111":10.5,"21113":8.8,"21115":11.1,"21117":10.0,"21119":12.0,"21121":11.5,"21123":10.7,"21125":10.1,"21127":13.1,"21129":12.3,"21131":13.7,"21133":12.0,"21135":15.1,"21137":12.1,"21139":9.8,"21141":10.4,"21143":12.2,"21145":9.1,"21147":13.3,"21149":10.6,"21151":8.7,"21153":21.4,"21155":12.9,"21157":10.7,"21159":12.4,"21161":11.1,"21163":12.4,"21165":14.7,"21167":10.8,"21169":15.8,"21171":14.0,"21173":12.6,"21175":14.5,"21177":10.7,"21179":11.5,"21181":12.5,"21183":9.4,"21185":8.6,"21187":10.1,"21189":11.2,"21191":11.7,"21193":12.5,"21195":10.7,"21197":16.7,"21199":10.0,"21201":9.6,"21203":12.8,"21205":8.6,"21207":10.8,"21209":9.1,"21211":9.6,"21213":11.8,"21215":10.2,"21217":10.2,"21219":12.6,"21221":16.0,"21223":10.7,"21225":10.8,"21227":9.2,"21229":12.7,"21231":13.6,"21233":8.8,"21235":11.4,"21237":13.9,"21239":8.3,"22001":7.1,"22003":10.1,"22005":6.7,"22007":8.8,"22009":8.1,"22011":8.0,"22013":10.5,"22015":6.4,"22017":7.9,"22019":7.2,"22021":10.7,"22023":5.6,"22025":10.3,"22027":10.3,"22029":11.3,"22031":9.0,"22033":6.8,"22035":14.2,"22037":8.0,"22039":8.6,"22041":11.3,"22043":8.2,"22045":7.6,"22047":10.4,"22049":7.8,"22051":6.5,"22053":6.4,"22055":5.9,"22057":4.9,"22059":7.3,"22061":7.8,"22063":7.0,"22065":9.3,"22067":15.1,"22069":8.4,"22071":10.7,"22073":7.6,"22075":6.2,"22077":7.9,"22079":6.9,"22081":9.6,"22083":10.7,"22085":8.1,"22087":10.5,"22089":6.5,"22091":11.8,"22093":10.0,"22095":8.4,"22097":8.3,"22099":7.5,"22101":8.6,"22103":5.2,"22105":8.1,"22107":13.5,"22109":5.2,"22111":12.2,"22113":7.2,"22115":6.7,"22117":9.6,"22119":9.1,"22121":7.4,"22123":17.0,"22125":8.2,"22127":9.1,"23001":8.4,"23003":9.3,"23005":6.5,"23007":11.2,"23009":6.8,"23011":7.3,"23013":7.0,"23015":6.3,"23017":10.9,"23019":8.0,"23021":11.6,"23023":6.7,"23025":10.7,"23027":7.8,"23029":10.4,"23031":7.4,"24001":7.5,"24003":6.5,"24005":7.7,"24009":5.9,"24011":8.8,"24013":6.0,"24015":8.6,"24017":5.9,"24019":10.9,"24021":5.9,"24023":6.9,"24025":7.1,"24027":5.4,"24029":7.1,"24031":5.3,"24033":7.3,"24035":6.6,"24037":5.6,"24039":9.5,"24041":6.8,"24043":9.4,"24045":7.7,"24047":7.5,"24510":10.6,"25001":8.0,"25003":8.4,"25005":11.8,"25007":5.0,"25009":10.1,"25011":8.7,"25013":10.5,"25015":7.3,"25017":8.1,"25019":5.0,"25021":8.5,"25023":9.7,"25025":9.3,"25027":10.1,"26001":16.7,"26003":12.0,"26005":13.2,"26007":13.9,"26009":14.7,"26011":15.8,"26013":24.3,"26015":10.5,"26017":12.3,"26019":12.0,"26021":13.5,"26023":14.0,"26025":12.4,"26027":11.4,"26029":13.9,"26031":8.6,"26033":11.6,"26035":16.8,"26037":9.4,"26039":13.7,"26041":11.5,"26043":12.0,"26045":10.3,"26047":12.2,"26049":15.8,"26051":16.5,"26053":13.3,"26055":12.0,"26057":13.7,"26059":17.2,"26061":10.2,"26063":14.8,"26065":11.6,"26067":13.4,"26069":16.4,"26071":11.7,"26073":8.5,"26075":14.9,"26077":11.2,"26079":14.3,"26081":11.7,"26083":11.9,"26085":17.5,"26087":18.1,"26089":9.0,"26091":16.1,"26093":13.6,"26095":13.2,"26097":6.1,"26099":18.1,"26101":12.6,"26103":10.1,"26105":12.9,"26107":13.0,"26109":12.5,"26111":10.2,"26113":15.0,"26115":14.2,"26117":17.6,"26119":18.9,"26121":16.0,"26123":13.8,"26125":15.6,"26127":15.2,"26129":12.7,"26131":13.8,"26133":15.3,"26135":19.1,"26137":14.7,"26139":12.8,"26141":16.0,"26143":14.6,"26145":12.9,"26147":19.0,"26149":13.9,"26151":17.8,"26153":12.7,"26155":15.2,"26157":16.3,"26159":13.2,"26161":9.3,"26163":18.3,"26165":18.3,"27001":8.1,"27003":7.9,"27005":6.4,"27007":7.2,"27009":7.0,"27011":4.5,"27013":6.3,"27015":5.5,"27017":7.3,"27019":7.0,"27021":7.9,"27023":6.1,"27025":8.4,"27027":3.6,"27029":9.1,"27031":4.7,"27033":5.2,"27035":7.4,"27037":6.9,"27039":6.1,"27041":5.6,"27043":7.6,"27045":7.0,"27047":7.6,"27049":6.7,"27051":6.8,"27053":7.3,"27055":7.1,"27057":7.3,"27059":8.3,"27061":9.2,"27063":4.7,"27065":10.3,"27067":5.5,"27069":5.2,"27071":7.3,"27073":5.4,"27075":7.5,"27077":6.9,"27079":8.6,"27081":4.5,"27083":4.9,"27085":8.0,"27087":6.0,"27089":6.2,"27091":6.9,"27093":7.8,"27095":10.5,"27097":9.0,"27099":5.5,"27101":3.9,"27103":6.1,"27105":4.5,"27107":5.1,"27109":5.5,"27111":6.3,"27113":5.6,"27115":9.1,"27117":5.3,"27119":4.4,"27121":6.4,"27123":7.4,"27125":6.7,"27127":6.1,"27129":6.4,"27131":7.5,"27133":5.1,"27135":5.0,"27137":8.2,"27139":6.8,"27141":8.1,"27143":6.5,"27145":6.8,"27147":7.7,"27149":4.3,"27151":6.6,"27153":7.5,"27155":6.2,"27157":7.1,"27159":8.8,"27161":7.0,"27163":6.8,"27165":7.5,"27167":4.7,"27169":7.0,"27171":8.2,"27173":5.1,"28001":8.0,"28003":11.3,"28005":8.6,"28007":11.8,"28009":12.6,"28011":9.0,"28013":9.7,"28015":9.8,"28017":13.2,"28019":11.3,"28021":15.0,"28023":10.0,"28025":17.8,"28027":11.1,"28029":9.9,"28031":7.7,"28033":7.2,"28035":7.7,"28037":9.0,"28039":10.0,"28041":9.9,"28043":11.0,"28045":7.5,"28047":7.2,"28049":7.9,"28051":16.6,"28053":10.2,"28055":9.2,"28057":9.6,"28059":8.0,"28061":10.2,"28063":15.5,"28065":10.6,"28067":7.1,"28069":10.3,"28071":6.9,"28073":6.6,"28075":8.7,"28077":10.2,"28079":8.7,"28081":9.8,"28083":11.6,"28085":8.8,"28087":10.2,"28089":6.3,"28091":10.1,"28093":11.2,"28095":13.7,"28097":12.7,"28099":8.4,"28101":7.9,"28103":17.6,"28105":8.0,"28107":11.9,"28109":8.3,"28111":10.4,"28113":9.8,"28115":8.7,"28117":11.5,"28119":11.1,"28121":5.6,"28123":5.9,"28125":9.0,"28127":8.2,"28129":8.2,"28131":7.2,"28133":11.8,"28135":9.9,"28137":10.3,"28139":12.5,"28141":10.1,"28143":13.0,"28145":8.8,"28147":10.3,"28149":9.1,"28151":11.3,"28153":9.4,"28155":13.5,"28157":10.1,"28159":15.1,"28161":12.9,"28163":10.5,"29001":6.5,"29003":7.6,"29005":7.9,"29007":9.2,"29009":8.1,"29011":11.7,"29013":10.8,"29015":9.3,"29017":8.8,"29019":6.2,"29021":8.7,"29023":8.0,"29025":8.6,"29027":8.0,"29029":7.9,"29031":6.9,"29033":9.8,"29035":8.7,"29037":9.7,"29039":8.6,"29041":10.5,"29043":8.0,"29045":11.3,"29047":8.6,"29049":8.7,"29051":6.7,"29053":8.4,"29055":10.7,"29057":10.1,"29059":9.4,"29061":8.7,"29063":9.3,"29065":9.4,"29067":9.8,"29069":11.1,"29071":11.5,"29073":10.8,"29075":6.8,"29077":8.3,"29079":6.9,"29081":7.8,"29083":9.6,"29085":12.3,"29087":7.1,"29089":8.3,"29091":9.2,"29093":8.7,"29095":10.9,"29097":8.4,"29099":10.6,"29101":8.0,"29103":5.9,"29105":11.0,"29107":9.0,"29109":7.8,"29111":8.3,"29113":11.3,"29115":10.3,"29117":7.8,"29119":7.0,"29121":7.9,"29123":9.8,"29125":8.7,"29127":8.9,"29129":7.9,"29131":10.6,"29133":9.7,"29135":7.8,"29137":11.0,"29139":10.3,"29141":11.3,"29143":8.9,"29145":7.9,"29147":5.9,"29149":9.0,"29151":9.9,"29153":7.6,"29155":12.1,"29157":7.2,"29159":8.1,"29161":7.1,"29163":8.3,"29165":8.0,"29167":8.9,"29169":6.8,"29171":7.4,"29173":8.0,"29175":9.4,"29177":8.3,"29179":12.7,"29181":9.5,"29183":8.7,"29185":10.3,"29186":9.3,"29187":10.9,"29189":9.6,"29195":7.9,"29197":7.8,"29199":12.2,"29201":9.2,"29203":9.6,"29205":8.1,"29207":9.0,"29209":9.0,"29211":6.4,"29213":8.6,"29215":8.8,"29217":7.9,"29219":11.2,"29221":13.7,"29223":9.5,"29225":9.0,"29227":8.4,"29229":9.6,"29510":11.1,"30001":4.4,"30003":10.2,"30005":5.0,"30007":6.2,"30009":4.8,"30011":3.9,"30013":5.2,"30015":4.2,"30017":4.6,"30019":4.2,"30021":4.8,"30023":6.5,"30025":3.7,"30027":4.7,"30029":8.8,"30031":5.5,"30033":3.4,"30035":7.2,"30037":4.7,"30039":8.2,"30041":5.1,"30043":5.8,"30045":4.6,"30047":8.3,"30049":4.3,"30051":4.7,"30053":11.1,"30055":3.2,"30057":4.8,"30059":7.8,"30061":8.6,"30063":5.6,"30065":7.5,"30067":6.1,"30069":4.5,"30071":4.8,"30073":6.0,"30075":4.0,"30077":7.3,"30079":3.1,"30081":7.5,"30083":4.6,"30085":7.5,"30087":7.3,"30089":11.2,"30091":4.3,"30093":5.5,"30095":5.2,"30097":3.1,"30099":4.0,"30101":4.1,"30103":5.1,"30105":4.6,"30107":4.3,"30109":4.1,"30111":4.7,"31001":5.6,"31003":3.6,"31005":4.4,"31007":3.5,"31009":5.2,"31011":3.9,"31013":7.1,"31015":3.6,"31017":3.1,"31019":3.5,"31021":5.7,"31023":3.9,"31025":4.6,"31027":3.2,"31029":3.0,"31031":2.5,"31033":4.1,"31035":4.3,"31037":4.0,"31039":3.5,"31041":3.1,"31043":5.5,"31045":4.4,"31047":4.8,"31049":3.8,"31051":3.7,"31053":4.9,"31055":5.0,"31057":4.0,"31059":4.4,"31061":3.7,"31063":3.0,"31065":4.1,"31067":5.9,"31069":4.4,"31071":2.5,"31073":3.8,"31075":3.1,"31077":3.3,"31079":4.4,"31081":3.4,"31083":3.6,"31085":4.2,"31087":6.6,"31089":3.2,"31091":4.0,"31093":3.8,"31095":4.6,"31097":3.9,"31099":3.8,"31101":3.9,"31103":4.4,"31105":4.3,"31107":3.6,"31109":4.2,"31111":4.0,"31113":4.3,"31115":3.2,"31117":4.0,"31119":4.2,"31121":4.0,"31123":4.1,"31125":3.6,"31127":5.4,"31129":4.7,"31131":5.0,"31133":4.1,"31135":3.1,"31137":3.8,"31139":3.6,"31141":4.4,"31143":4.2,"31145":4.2,"31147":5.7,"31149":3.1,"31151":4.0,"31153":4.7,"31155":4.5,"31157":4.8,"31159":3.7,"31161":3.5,"31163":3.0,"31165":3.8,"31167":3.6,"31169":4.3,"31171":3.8,"31173":13.8,"31175":2.9,"31177":4.1,"31179":3.8,"31181":4.2,"31183":3.2,"31185":5.7,"32001":9.9,"32003":13.9,"32005":12.6,"32007":6.8,"32009":8.3,"32011":9.3,"32013":8.6,"32015":7.2,"32017":9.4,"32019":16.3,"32021":10.5,"32023":16.1,"32027":10.6,"32029":14.8,"32031":13.1,"32033":8.4,"32510":12.8,"33001":7.0,"33003":5.4,"33005":6.5,"33007":7.8,"33009":5.6,"33011":7.5,"33013":6.3,"33015":7.5,"33017":6.6,"33019":6.5,"34001":12.2,"34003":8.4,"34005":9.1,"34007":10.9,"34009":8.5,"34011":12.6,"34013":11.1,"34015":10.0,"34017":11.6,"34019":6.9,"34021":8.1,"34023":9.2,"34025":8.7,"34027":7.6,"34029":9.6,"34031":11.7,"34033":10.1,"34035":7.9,"34037":8.5,"34039":9.8,"34041":8.8,"35001":7.5,"35003":8.1,"35005":6.8,"35006":6.3,"35007":8.0,"35009":4.4,"35011":4.3,"35013":6.9,"35015":6.0,"35017":12.3,"35019":7.5,"35021":4.5,"35023":7.6,"35025":8.3,"35027":5.1,"35028":2.9,"35029":13.4,"35031":8.6,"35033":13.1,"35035":6.8,"35037":5.9,"35039":7.2,"35041":4.4,"35043":9.0,"35045":8.3,"35047":7.8,"35049":6.5,"35051":4.8,"35053":5.0,"35055":8.7,"35057":8.8,"35059":5.5,"35061":8.5,"36001":7.1,"36003":7.9,"36005":13.3,"36007":8.5,"36009":8.5,"36011":8.0,"36013":7.8,"36015":8.9,"36017":8.7,"36019":9.0,"36021":7.7,"36023":8.5,"36025":8.4,"36027":8.2,"36029":8.3,"36031":7.8,"36033":7.8,"36035":9.1,"36037":7.2,"36039":8.4,"36041":5.6,"36043":7.6,"36045":7.8,"36047":11.0,"36049":7.6,"36051":7.5,"36053":7.4,"36055":8.3,"36057":8.8,"36059":7.2,"36061":9.2,"36063":8.8,"36065":7.3,"36067":7.9,"36069":6.7,"36071":8.2,"36073":8.2,"36075":9.3,"36077":6.8,"36079":7.0,"36081":9.1,"36083":7.7,"36085":8.9,"36087":7.4,"36089":8.9,"36091":6.4,"36093":7.8,"36095":7.6,"36097":7.4,"36099":7.3,"36101":9.5,"36103":7.5,"36105":8.6,"36107":7.9,"36109":5.6,"36111":8.1,"36113":7.2,"36115":7.4,"36117":7.8,"36119":7.4,"36121":7.8,"36123":6.0,"37001":11.8,"37003":13.6,"37005":10.9,"37007":14.8,"37009":10.0,"37011":7.9,"37013":11.2,"37015":10.5,"37017":12.0,"37019":10.5,"37021":8.2,"37023":14.1,"37025":11.4,"37027":15.2,"37029":7.1,"37031":7.6,"37033":12.4,"37035":13.6,"37037":8.0,"37039":14.2,"37041":11.9,"37043":10.8,"37045":14.3,"37047":12.5,"37049":10.0,"37051":9.1,"37053":5.0,"37055":6.8,"37057":12.5,"37059":12.1,"37061":8.7,"37063":8.0,"37065":16.3,"37067":9.5,"37069":9.7,"37071":13.3,"37073":7.1,"37075":13.4,"37077":10.2,"37079":10.2,"37081":11.0,"37083":13.1,"37085":10.9,"37087":8.5,"37089":8.6,"37091":9.4,"37093":8.3,"37095":5.9,"37097":12.1,"37099":7.8,"37101":9.5,"37103":10.9,"37105":13.5,"37107":11.4,"37109":13.2,"37111":14.1,"37113":9.2,"37115":9.3,"37117":10.6,"37119":11.0,"37121":11.0,"37123":13.3,"37125":9.5,"37127":11.9,"37129":9.1,"37131":10.7,"37133":8.3,"37135":6.3,"37137":10.1,"37139":9.1,"37141":10.8,"37143":10.3,"37145":10.8,"37147":10.0,"37149":8.2,"37151":11.0,"37153":13.2,"37155":11.5,"37157":11.7,"37159":12.8,"37161":14.3,"37163":8.3,"37165":16.5,"37167":11.9,"37169":10.1,"37171":11.8,"37173":9.1,"37175":8.5,"37177":8.8,"37179":10.0,"37181":13.0,"37183":8.3,"37185":12.7,"37187":11.7,"37189":6.9,"37191":8.8,"37193":12.9,"37195":11.9,"37197":9.3,"37199":10.9,"38001":2.7,"38003":3.4,"38005":5.3,"38007":1.3,"38009":2.9,"38011":2.7,"38013":2.2,"38015":2.8,"38017":3.7,"38019":2.5,"38021":4.1,"38023":3.4,"38025":3.6,"38027":3.8,"38029":5.1,"38031":2.8,"38033":2.5,"38035":3.5,"38037":3.2,"38039":3.6,"38041":2.7,"38043":3.4,"38045":4.3,"38047":2.7,"38049":2.9,"38051":3.1,"38053":2.2,"38055":3.4,"38057":3.3,"38059":3.0,"38061":4.4,"38063":2.9,"38065":3.1,"38067":5.1,"38069":4.0,"38071":3.2,"38073":6.0,"38075":3.3,"38077":4.3,"38079":9.7,"38081":6.5,"38083":3.7,"38085":4.3,"38087":1.2,"38089":2.8,"38091":2.1,"38093":3.2,"38095":2.6,"38097":3.5,"38099":4.5,"38101":2.8,"38103":3.8,"38105":2.0,"39001":13.8,"39003":10.2,"39005":11.4,"39007":12.6,"39009":8.6,"39011":10.1,"39013":9.2,"39015":11.9,"39017":9.1,"39019":13.2,"39021":11.4,"39023":9.9,"39025":9.4,"39027":13.9,"39029":12.5,"39031":12.3,"39033":13.2,"39035":8.5,"39037":9.9,"39039":11.7,"39041":6.7,"39043":9.5,"39045":8.2,"39047":11.7,"39049":8.2,"39051":12.1,"39053":9.5,"39055":6.5,"39057":9.4,"39059":10.8,"39061":8.9,"39063":9.1,"39065":11.2,"39067":10.6,"39069":10.9,"39071":15.3,"39073":10.4,"39075":6.3,"39077":12.8,"39079":10.5,"39081":12.7,"39083":8.7,"39085":7.9,"39087":8.4,"39089":8.9,"39091":11.2,"39093":9.1,"39095":11.3,"39097":8.5,"39099":11.8,"39101":10.2,"39103":7.5,"39105":15.2,"39107":7.8,"39109":11.0,"39111":11.5,"39113":11.0,"39115":14.6,"39117":10.0,"39119":11.9,"39121":14.0,"39123":10.7,"39125":11.5,"39127":12.8,"39129":10.3,"39131":14.7,"39133":9.2,"39135":11.1,"39137":9.0,"39139":11.8,"39141":11.5,"39143":10.8,"39145":12.1,"39147":12.0,"39149":11.9,"39151":11.0,"39153":9.6,"39155":13.5,"39157":10.2,"39159":8.0,"39161":13.2,"39163":11.3,"39165":8.5,"39167":9.4,"39169":8.9,"39171":14.1,"39173":10.0,"39175":11.2,"40001":7.6,"40003":5.5,"40005":8.4,"40007":3.3,"40009":5.9,"40011":5.7,"40013":5.2,"40015":6.1,"40017":5.5,"40019":5.7,"40021":5.6,"40023":7.6,"40025":3.5,"40027":5.2,"40029":8.8,"40031":5.1,"40033":4.0,"40035":5.5,"40037":8.1,"40039":4.9,"40041":6.0,"40043":4.6,"40045":4.5,"40047":4.5,"40049":5.9,"40051":7.4,"40053":4.2,"40055":7.9,"40057":6.9,"40059":4.3,"40061":8.4,"40063":10.7,"40065":4.8,"40067":8.6,"40069":7.0,"40071":8.1,"40073":4.3,"40075":6.2,"40077":10.4,"40079":8.7,"40081":6.7,"40083":5.6,"40085":5.4,"40087":5.6,"40089":11.6,"40091":8.2,"40093":4.5,"40095":7.5,"40097":8.1,"40099":4.7,"40101":8.1,"40103":7.7,"40105":9.3,"40107":8.9,"40109":6.1,"40111":8.5,"40113":7.4,"40115":6.2,"40117":8.2,"40119":6.3,"40121":6.5,"40123":5.1,"40125":6.5,"40127":8.9,"40129":4.5,"40131":7.2,"40133":9.2,"40135":8.7,"40137":8.4,"40139":3.8,"40141":5.6,"40143":6.8,"40145":6.6,"40147":5.9,"40149":6.3,"40151":4.2,"40153":6.5,"41001":8.5,"41003":7.5,"41005":10.4,"41007":8.2,"41009":12.6,"41011":11.7,"41013":16.1,"41015":11.2,"41017":13.5,"41019":14.0,"41021":5.6,"41023":9.9,"41025":15.0,"41027":6.6,"41029":11.5,"41031":12.9,"41033":13.3,"41035":12.0,"41037":10.1,"41039":11.5,"41041":9.4,"41043":13.6,"41045":9.3,"41047":10.3,"41049":7.4,"41051":10.9,"41053":9.3,"41055":7.6,"41057":8.2,"41059":7.8,"41061":10.2,"41063":8.7,"41065":8.0,"41067":9.6,"41069":6.7,"41071":11.0,"42001":7.4,"42003":7.2,"42005":8.0,"42007":8.4,"42009":10.9,"42011":9.1,"42013":7.4,"42015":7.6,"42017":7.3,"42019":7.1,"42021":8.8,"42023":16.7,"42025":10.0,"42027":5.6,"42029":6.3,"42031":8.3,"42033":9.8,"42035":8.2,"42037":8.2,"42039":10.1,"42041":6.8,"42043":8.1,"42045":7.9,"42047":12.9,"42049":9.2,"42051":9.1,"42053":10.2,"42055":8.6,"42057":14.3,"42059":7.8,"42061":10.2,"42063":7.8,"42065":9.5,"42067":7.6,"42069":8.3,"42071":7.5,"42073":8.9,"42075":7.0,"42077":9.3,"42079":9.2,"42081":9.3,"42083":10.0,"42085":11.3,"42087":10.4,"42089":9.0,"42091":7.0,"42093":5.9,"42095":8.8,"42097":9.4,"42099":8.1,"42101":11.0,"42103":8.6,"42105":10.3,"42107":10.1,"42109":8.6,"42111":8.5,"42113":7.9,"42115":7.8,"42117":7.8,"42119":8.8,"42121":8.7,"42123":7.3,"42125":7.9,"42127":6.6,"42129":7.8,"42131":6.9,"42133":8.4,"44001":11.1,"44003":11.9,"44005":10.0,"44007":13.5,"44009":9.2,"45001":14.8,"45003":9.4,"45005":22.5,"45007":12.5,"45009":18.1,"45011":19.0,"45013":8.7,"45015":10.7,"45017":14.4,"45019":9.0,"45021":16.2,"45023":21.1,"45025":16.8,"45027":16.1,"45029":14.2,"45031":13.0,"45033":17.2,"45035":10.3,"45037":10.7,"45039":12.9,"45041":11.7,"45043":12.5,"45045":10.2,"45047":13.7,"45049":16.1,"45051":10.9,"45053":10.7,"45055":10.4,"45057":17.9,"45059":11.7,"45061":15.7,"45063":8.3,"45065":15.7,"45067":21.0,"45069":20.2,"45071":11.7,"45073":14.2,"45075":18.7,"45077":10.6,"45079":9.5,"45081":9.4,"45083":12.2,"45085":13.9,"45087":20.6,"45089":15.4,"45091":14.1,"46003":4.0,"46005":3.0,"46007":6.0,"46009":4.9,"46011":3.2,"46013":3.1,"46015":2.7,"46017":17.2,"46019":3.9,"46021":4.5,"46023":4.8,"46025":4.7,"46027":3.7,"46029":5.8,"46031":5.6,"46033":3.0,"46035":4.3,"46037":5.3,"46039":4.8,"46041":10.4,"46043":3.1,"46045":2.7,"46047":4.9,"46049":3.1,"46051":3.5,"46053":3.1,"46055":3.6,"46057":5.1,"46059":2.8,"46061":3.0,"46063":2.3,"46065":2.7,"46067":3.9,"46069":3.6,"46071":6.2,"46073":2.6,"46075":2.4,"46077":5.1,"46079":5.8,"46081":3.8,"46083":3.9,"46085":5.7,"46087":4.5,"46089":5.0,"46091":4.7,"46093":4.0,"46095":6.8,"46097":5.7,"46099":4.7,"46101":6.1,"46103":4.4,"46105":3.9,"46107":3.2,"46109":4.8,"46111":3.8,"46113":12.6,"46115":3.4,"46117":2.1,"46119":2.4,"46121":8.4,"46123":2.9,"46125":4.4,"46127":5.3,"46129":4.0,"46135":5.3,"46137":7.8,"47001":9.7,"47003":12.1,"47005":12.8,"47007":13.7,"47009":9.3,"47011":9.3,"47013":13.1,"47015":10.8,"47017":16.4,"47019":9.8,"47021":9.4,"47023":11.5,"47025":11.1,"47027":12.6,"47029":12.2,"47031":10.2,"47033":13.4,"47035":10.8,"47037":9.2,"47039":14.2,"47041":10.2,"47043":9.8,"47045":14.0,"47047":10.8,"47049":13.0,"47051":10.4,"47053":15.7,"47055":14.0,"47057":13.5,"47059":14.3,"47061":13.0,"47063":12.5,"47065":8.7,"47067":18.3,"47069":12.7,"47071":11.1,"47073":10.3,"47075":18.0,"47077":18.1,"47079":13.1,"47081":12.4,"47083":11.6,"47085":11.9,"47087":12.7,"47089":11.8,"47091":12.2,"47093":8.1,"47095":10.7,"47097":18.9,"47099":14.6,"47101":14.9,"47103":6.9,"47105":9.5,"47107":13.0,"47109":12.7,"47111":11.2,"47113":11.0,"47115":12.1,"47117":16.3,"47119":11.9,"47121":13.6,"47123":16.1,"47125":9.0,"47127":9.7,"47129":11.6,"47131":10.4,"47133":12.0,"47135":17.6,"47137":13.4,"47139":11.4,"47141":9.7,"47143":12.7,"47145":8.9,"47147":10.1,"47149":9.5,"47151":18.4,"47153":12.8,"47155":9.2,"47157":10.2,"47159":12.8,"47161":11.1,"47163":8.8,"47165":9.7,"47167":11.6,"47169":12.0,"47171":10.3,"47173":10.7,"47175":14.2,"47177":12.5,"47179":8.6,"47181":12.9,"47183":13.0,"47185":13.5,"47187":7.5,"47189":9.0,"48001":9.4,"48003":7.6,"48005":8.9,"48007":7.3,"48009":6.5,"48011":5.1,"48013":7.9,"48015":8.4,"48017":5.2,"48019":6.8,"48021":8.0,"48023":5.1,"48025":10.3,"48027":7.1,"48029":7.2,"48031":5.8,"48033":6.2,"48035":8.6,"48037":7.8,"48039":8.9,"48041":6.2,"48043":5.1,"48045":5.9,"48047":9.9,"48049":7.2,"48051":7.4,"48053":6.3,"48055":8.2,"48057":9.5,"48059":6.3,"48061":10.8,"48063":9.6,"48065":6.7,"48067":12.5,"48069":5.3,"48071":10.7,"48073":9.7,"48075":6.4,"48077":7.4,"48079":7.2,"48081":8.6,"48083":6.9,"48085":7.8,"48087":5.9,"48089":6.6,"48091":6.6,"48093":6.1,"48095":8.2,"48097":6.5,"48099":8.7,"48101":5.6,"48103":9.5,"48105":9.7,"48107":7.0,"48109":4.5,"48111":4.4,"48113":8.7,"48115":8.7,"48117":5.8,"48119":8.4,"48121":7.7,"48123":8.3,"48125":6.0,"48127":11.0,"48129":7.0,"48131":12.5,"48133":8.4,"48135":9.2,"48137":6.7,"48139":8.6,"48141":9.8,"48143":7.1,"48145":9.5,"48147":9.0,"48149":5.7,"48151":6.4,"48153":6.9,"48155":5.7,"48157":8.3,"48159":7.3,"48161":6.7,"48163":8.4,"48165":6.8,"48167":8.5,"48169":5.7,"48171":4.9,"48173":5.2,"48175":7.9,"48177":6.1,"48179":8.9,"48181":8.7,"48183":8.0,"48185":10.0,"48187":6.7,"48189":6.4,"48191":8.9,"48193":6.0,"48195":5.5,"48197":7.2,"48199":10.1,"48201":8.5,"48203":8.7,"48205":4.3,"48207":5.2,"48209":6.8,"48211":3.0,"48213":8.5,"48215":11.6,"48217":8.5,"48219":7.0,"48221":7.6,"48223":6.5,"48225":10.3,"48227":7.5,"48229":6.5,"48231":8.5,"48233":8.0,"48235":5.4,"48237":6.4,"48239":7.6,"48241":11.9,"48243":5.6,"48245":10.8,"48247":10.0,"48249":10.0,"48251":9.1,"48253":8.2,"48255":10.5,"48257":8.8,"48259":6.0,"48261":6.1,"48263":6.2,"48265":6.0,"48267":5.4,"48269":5.4,"48271":8.9,"48273":7.7,"48275":6.4,"48277":7.8,"48279":6.6,"48281":6.1,"48283":9.9,"48285":6.4,"48287":6.9,"48289":7.9,"48291":11.2,"48293":7.2,"48295":6.1,"48297":7.6,"48299":7.3,"48301":11.5,"48303":5.7,"48305":6.8,"48307":9.1,"48309":7.1,"48311":7.8,"48313":8.7,"48315":11.8,"48317":5.0,"48319":5.4,"48321":11.2,"48323":13.6,"48325":7.1,"48327":9.0,"48329":6.2,"48331":10.2,"48333":6.0,"48335":8.7,"48337":7.8,"48339":7.9,"48341":5.3,"48343":15.6,"48345":5.3,"48347":7.0,"48349":8.4,"48351":12.4,"48353":6.4,"48355":7.7,"48357":6.3,"48359":5.5,"48361":11.1,"48363":9.1,"48365":7.5,"48367":8.4,"48369":4.8,"48371":11.7,"48373":10.3,"48375":6.6,"48377":17.8,"48379":8.5,"48381":5.1,"48383":5.8,"48385":6.1,"48387":10.5,"48389":14.0,"48391":7.0,"48393":6.2,"48395":8.7,"48397":7.8,"48399":10.1,"48401":9.1,"48403":15.9,"48405":10.8,"48407":10.0,"48409":9.8,"48411":7.8,"48413":11.1,"48415":7.2,"48417":4.3,"48419":8.1,"48421":4.9,"48423":8.3,"48425":7.3,"48427":17.8,"48429":6.9,"48431":4.6,"48433":4.8,"48435":7.8,"48437":6.7,"48439":8.2,"48441":6.1,"48443":7.8,"48445":7.7,"48447":5.6,"48449":7.7,"48451":7.0,"48453":7.0,"48455":8.8,"48457":10.5,"48459":8.1,"48461":5.6,"48463":8.9,"48465":9.6,"48467":7.4,"48469":7.9,"48471":7.8,"48473":9.0,"48475":8.5,"48477":6.9,"48479":9.1,"48481":7.9,"48483":5.6,"48485":8.1,"48487":5.5,"48489":13.9,"48491":7.8,"48493":6.9,"48495":9.0,"48497":9.6,"48499":8.4,"48501":7.1,"48503":6.4,"48505":12.6,"48507":16.3,"49001":4.2,"49003":5.6,"49005":4.2,"49007":6.5,"49009":2.7,"49011":5.6,"49013":6.9,"49015":6.2,"49017":4.9,"49019":5.2,"49021":6.3,"49023":6.8,"49025":4.4,"49027":4.0,"49029":5.3,"49031":3.8,"49033":2.8,"49035":6.0,"49037":8.6,"49039":5.6,"49041":5.7,"49043":5.8,"49045":6.4,"49047":6.6,"49049":5.4,"49051":6.0,"49053":7.8,"49055":4.2,"49057":7.0,"50001":5.8,"50003":6.8,"50005":7.0,"50007":5.7,"50009":7.8,"50011":6.2,"50013":7.0,"50015":6.6,"50017":5.5,"50019":8.3,"50021":8.7,"50023":6.1,"50025":6.3,"50027":5.8,"51001":6.1,"51003":5.0,"51005":8.7,"51007":7.0,"51009":7.0,"51011":6.7,"51013":4.2,"51015":5.8,"51017":5.4,"51019":6.2,"51021":7.5,"51023":6.2,"51025":11.4,"51027":8.8,"51029":7.8,"51031":6.6,"51033":8.2,"51035":11.3,"51036":8.7,"51037":9.1,"51041":6.8,"51043":6.1,"51045":7.2,"51047":7.5,"51049":7.0,"51051":8.3,"51053":8.3,"51057":7.7,"51059":4.7,"51061":5.0,"51063":7.1,"51065":5.8,"51067":7.8,"51069":7.3,"51071":8.5,"51073":5.5,"51075":6.7,"51077":10.4,"51079":5.8,"51081":9.1,"51083":11.5,"51085":6.6,"51087":7.2,"51089":13.4,"51091":5.9,"51093":6.3,"51095":4.6,"51097":7.5,"51099":7.5,"51101":6.4,"51103":7.3,"51105":7.1,"51107":4.7,"51109":8.1,"51111":9.1,"51113":6.0,"51115":4.8,"51117":10.5,"51119":6.4,"51121":6.3,"51125":6.2,"51127":6.9,"51131":6.6,"51133":6.5,"51135":7.9,"51137":7.6,"51139":9.8,"51141":9.9,"51143":10.3,"51145":6.0,"51147":8.4,"51149":7.3,"51153":5.3,"51155":10.8,"51157":5.6,"51159":7.2,"51161":5.9,"51163":5.6,"51165":5.3,"51167":9.6,"51169":9.9,"51171":7.6,"51173":10.2,"51175":7.7,"51177":5.1,"51179":5.1,"51181":7.3,"51183":9.5,"51185":7.9,"51187":6.6,"51191":8.2,"51193":7.1,"51195":6.7,"51197":9.7,"51199":5.0,"51510":4.8,"51515":8.9,"51520":9.9,"51530":8.7,"51540":6.2,"51550":6.4,"51570":8.2,"51580":9.1,"51590":13.0,"51595":11.8,"51600":5.4,"51610":7.3,"51620":10.7,"51630":9.1,"51640":10.3,"51650":7.7,"51660":6.4,"51670":10.4,"51678":9.2,"51680":7.7,"51683":6.8,"51685":5.4,"51690":20.0,"51700":7.3,"51710":8.4,"51720":5.5,"51730":13.8,"51735":5.0,"51740":8.4,"51750":8.5,"51760":10.0,"51770":8.6,"51775":6.3,"51790":7.3,"51800":6.6,"51810":5.9,"51820":8.2,"51830":13.5,"51840":7.9,"53001":6.5,"53003":8.1,"53005":5.8,"53007":6.5,"53009":8.5,"53011":12.7,"53013":8.4,"53015":12.8,"53017":6.6,"53019":11.3,"53021":6.2,"53023":5.3,"53025":7.3,"53027":11.7,"53029":8.1,"53031":7.4,"53033":8.8,"53035":7.1,"53037":7.3,"53039":8.1,"53041":12.0,"53043":7.4,"53045":9.4,"53047":7.4,"53049":10.7,"53051":12.1,"53053":8.8,"53055":4.7,"53057":9.1,"53059":9.4,"53061":10.1,"53063":8.3,"53065":10.5,"53067":7.1,"53069":11.4,"53071":5.5,"53073":7.8,"53075":4.7,"53077":6.8,"54001":9.2,"54003":8.5,"54005":9.4,"54007":8.0,"54009":11.1,"54011":6.6,"54013":12.1,"54015":11.9,"54017":7.4,"54019":8.6,"54021":6.5,"54023":11.2,"54025":8.3,"54027":7.8,"54029":11.8,"54031":9.7,"54033":7.1,"54035":12.9,"54037":6.6,"54039":7.1,"54041":7.5,"54043":10.6,"54045":9.8,"54047":12.7,"54049":6.5,"54051":8.7,"54053":12.1,"54055":6.9,"54057":7.9,"54059":10.7,"54061":4.6,"54063":6.5,"54065":9.1,"54067":9.1,"54069":7.8,"54071":7.5,"54073":10.2,"54075":11.3,"54077":7.0,"54079":6.3,"54081":8.0,"54083":8.5,"54085":8.8,"54087":13.0,"54089":7.8,"54091":7.9,"54093":10.9,"54095":10.8,"54097":8.9,"54099":7.7,"54101":10.4,"54103":12.3,"54105":11.4,"54107":8.8,"54109":11.5,"55001":8.3,"55003":8.3,"55005":7.1,"55007":6.2,"55009":7.1,"55011":5.7,"55013":9.1,"55015":6.7,"55017":6.6,"55019":7.6,"55021":7.1,"55023":8.1,"55025":5.4,"55027":8.4,"55029":6.6,"55031":6.5,"55033":5.8,"55035":6.0,"55037":8.1,"55039":7.8,"55041":8.1,"55043":6.1,"55045":7.8,"55047":7.5,"55049":6.2,"55051":9.4,"55053":7.2,"55055":8.0,"55057":8.5,"55059":9.8,"55061":7.3,"55063":5.9,"55065":6.0,"55067":8.5,"55069":9.6,"55071":8.5,"55073":7.7,"55075":10.2,"55077":8.3,"55078":12.7,"55079":9.3,"55081":6.4,"55083":9.1,"55085":7.4,"55087":7.5,"55089":7.2,"55091":5.4,"55093":6.1,"55095":8.4,"55097":5.8,"55099":9.4,"55101":9.3,"55103":7.5,"55105":11.1,"55107":10.1,"55109":6.8,"55111":7.0,"55113":7.1,"55115":8.2,"55117":8.3,"55119":9.6,"55121":6.4,"55123":6.6,"55125":7.1,"55127":7.7,"55129":7.8,"55131":8.1,"55133":7.2,"55135":8.2,"55137":8.2,"55139":7.0,"55141":7.4,"56001":3.6,"56003":8.2,"56005":5.7,"56007":6.8,"56009":5.9,"56011":4.9,"56013":7.4,"56015":5.3,"56017":5.8,"56019":6.7,"56021":6.3,"56023":6.5,"56025":7.3,"56027":4.5,"56029":5.1,"56031":6.2,"56033":6.6,"56035":4.5,"56037":7.4,"56039":5.2,"56041":7.2,"56043":5.9,"56045":5.9,"72001":21.7,"72003":17.9,"72005":17.8,"72007":18.2,"72009":19.2,"72011":18.3,"72013":16.7,"72015":22.7,"72017":20.1,"72019":19.6,"72021":13.6,"72023":13.5,"72025":15.8,"72027":15.6,"72029":21.2,"72031":13.3,"72033":18.3,"72035":18.1,"72037":17.6,"72039":23.6,"72041":17.3,"72043":23.1,"72045":23.4,"72047":17.7,"72049":11.6,"72051":15.2,"72053":17.8,"72054":21.5,"72055":19.9,"72057":22.0,"72059":22.6,"72061":10.6,"72063":16.3,"72065":16.5,"72067":16.4,"72069":20.8,"72071":19.1,"72073":21.9,"72075":18.6,"72077":19.1,"72079":18.6,"72081":17.5,"72083":18.1,"72085":19.2,"72087":20.4,"72089":20.2,"72091":19.2,"72093":19.9,"72095":25.9,"72097":17.9,"72099":18.0,"72101":21.6,"72103":23.2,"72105":18.9,"72107":22.8,"72109":23.6,"72111":20.2,"72113":15.9,"72115":16.8,"72117":17.9,"72119":17.1,"72121":18.9,"72123":25.2,"72125":17.8,"72127":11.9,"72129":18.5,"72131":18.2,"72133":25.7,"72135":12.9,"72137":13.4,"72139":11.1,"72141":25.8,"72143":16.3,"72145":17.6,"72147":27.7,"72149":19.8,"72151":24.1,"72153":16.0}
Index: Dev/branches/Demo/d3/examples/clock/clock.css
===================================================================
--- Dev/branches/Demo/d3/examples/clock/clock.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/clock/clock.css	(revision 225)
@@ -0,0 +1,23 @@
+#clock {
+  position: relative;
+  background: #222;
+  width: 960px;
+  height: 700px;
+}
+
+#clock div {
+  position: absolute;
+  right: 4px;
+  bottom: 4px;
+  color: #ddd;
+  font: 10px sans-serif;
+}
+
+#clock a {
+  color: #fff;
+  font-weight: bold;
+}
+
+text {
+  font: bold 13px sans-serif;
+}
Index: Dev/branches/Demo/d3/examples/clock/clock.html
===================================================================
--- Dev/branches/Demo/d3/examples/clock/clock.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/clock/clock.html	(revision 225)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Polar Clock</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.time.js"></script>
+    <link type="text/css" rel="stylesheet" href="clock.css"/>
+  </head>
+  <body>
+    <div id="clock">
+      <div>
+        Inspired by <a href="http://blog.pixelbreaker.com/polarclock/">pixelbreaker</a>.
+      </div>
+    </div>
+    <script type="text/javascript" src="clock.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/clock/clock.js
===================================================================
--- Dev/branches/Demo/d3/examples/clock/clock.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/clock/clock.js	(revision 225)
@@ -0,0 +1,87 @@
+// Based on http://vis.stanford.edu/protovis/ex/clock.html
+// Based on http://blog.pixelbreaker.com/polarclock
+
+var w = 960,
+    h = 700,
+    r = Math.min(w, h) / 1.8,
+    s = .09,
+    fsec = d3.time.format("%S s"),
+    fmin = d3.time.format("%M m"),
+    fhou = d3.time.format("%H h"),
+    fwee = d3.time.format("%a"),
+    fdat = d3.time.format("%d d"),
+    fmon = d3.time.format("%b");
+
+var fill = d3.scale.linear()
+    .range(["hsl(-180, 50%, 50%)", "hsl(180, 50%, 50%)"])
+    .interpolate(d3.interpolateHsl);
+
+var arc = d3.svg.arc()
+    .startAngle(0)
+    .endAngle(function(d) { return d.value * 2 * Math.PI; })
+    .innerRadius(function(d) { return d.index * r; })
+    .outerRadius(function(d) { return (d.index + s) * r; });
+
+var vis = d3.select("#clock").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(" + w / 2 + "," + h / 2 + ")");
+
+var g = vis.selectAll("g")
+    .data(fields)
+  .enter().append("svg:g");
+
+g.append("svg:path")
+    .style("fill", function(d) { return fill(d.value); })
+    .attr("d", arc);
+
+g.append("svg:text")
+    .attr("text-anchor", "middle")
+    .attr("dy", "1em")
+    .text(function(d) { return d.text; });
+
+
+// Update arcs.
+d3.timer(function() {
+  var g = vis.selectAll("g")
+      .data(fields);
+
+  g.select("path")
+      .style("fill", function(d) { return fill(d.value); })
+      .attr("d", arc);
+
+  g.select("text")
+      .attr("dy", function(d) { return d.value < .5 ? "-.5em" : "1em"; })
+      .attr("transform", function(d) {
+        return "rotate(" + 360 * d.value + ")"
+            + "translate(0," + -(d.index + s / 2) * r + ")"
+            + "rotate(" + (d.value < .5 ? -90 : 90) + ")"
+      })
+      .text(function(d) { return d.text; });
+});
+
+// Generate the fields for the current date/time.
+function fields() {
+  var d = new Date;
+
+  function days() {
+    return 32 - new Date(d.getYear(), d.getMonth(), 32).getDate();
+  }
+
+  var second = (d.getSeconds() + d.getMilliseconds() / 1000) / 60,
+      minute = (d.getMinutes() + second) / 60,
+      hour = (d.getHours() + minute) / 24,
+      weekday = (d.getDay() + hour) / 7,
+      date = (d.getDate() - 1 + hour) / days(),
+      month = (d.getMonth() + date) / 12;
+
+  return [
+    {value: second,  index: .7, text: fsec(d)},
+    {value: minute,  index: .6, text: fmin(d)},
+    {value: hour,    index: .5, text: fhou(d)},
+    {value: weekday, index: .3, text: fwee(d)},
+    {value: date,    index: .2, text: fdat(d)},
+    {value: month,   index: .1, text: fmon(d)},
+  ];
+}
Index: Dev/branches/Demo/d3/examples/cluster/cluster-radial.html
===================================================================
--- Dev/branches/Demo/d3/examples/cluster/cluster-radial.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/cluster/cluster-radial.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Flare Dendogram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="cluster.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="cluster-radial.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/cluster/cluster-radial.js
===================================================================
--- Dev/branches/Demo/d3/examples/cluster/cluster-radial.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/cluster/cluster-radial.js	(revision 225)
@@ -0,0 +1,39 @@
+var r = 960 / 2;
+
+var cluster = d3.layout.cluster()
+    .size([360, r - 120]);
+
+var diagonal = d3.svg.diagonal.radial()
+    .projection(function(d) { return [d.y, d.x / 180 * Math.PI]; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", r * 2)
+    .attr("height", r * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + r + "," + r + ")");
+
+d3.json("../data/flare.json", function(json) {
+  var nodes = cluster.nodes(json);
+
+  var link = vis.selectAll("path.link")
+      .data(cluster.links(nodes))
+    .enter().append("svg:path")
+      .attr("class", "link")
+      .attr("d", diagonal);
+
+  var node = vis.selectAll("g.node")
+      .data(nodes)
+    .enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; })
+
+  node.append("svg:circle")
+      .attr("r", 4.5);
+
+  node.append("svg:text")
+      .attr("dx", function(d) { return d.x < 180 ? 8 : -8; })
+      .attr("dy", ".31em")
+      .attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; })
+      .attr("transform", function(d) { return d.x < 180 ? null : "rotate(180)"; })
+      .text(function(d) { return d.name; });
+});
Index: Dev/branches/Demo/d3/examples/cluster/cluster.css
===================================================================
--- Dev/branches/Demo/d3/examples/cluster/cluster.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/cluster/cluster.css	(revision 225)
@@ -0,0 +1,15 @@
+.node circle {
+  fill: #fff;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+.node {
+  font: 10px sans-serif;
+}
+
+.link {
+  fill: none;
+  stroke: #ccc;
+  stroke-width: 1.5px;
+}
Index: Dev/branches/Demo/d3/examples/cluster/cluster.html
===================================================================
--- Dev/branches/Demo/d3/examples/cluster/cluster.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/cluster/cluster.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Flare Dendogram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="cluster.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="cluster.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/cluster/cluster.js
===================================================================
--- Dev/branches/Demo/d3/examples/cluster/cluster.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/cluster/cluster.js	(revision 225)
@@ -0,0 +1,39 @@
+var w = 960,
+    h = 2200;
+
+var cluster = d3.layout.cluster()
+    .size([h, w - 160]);
+
+var diagonal = d3.svg.diagonal()
+    .projection(function(d) { return [d.y, d.x]; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(40, 0)");
+
+d3.json("../data/flare.json", function(json) {
+  var nodes = cluster.nodes(json);
+
+  var link = vis.selectAll("path.link")
+      .data(cluster.links(nodes))
+    .enter().append("svg:path")
+      .attr("class", "link")
+      .attr("d", diagonal);
+
+  var node = vis.selectAll("g.node")
+      .data(nodes)
+    .enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; })
+
+  node.append("svg:circle")
+      .attr("r", 4.5);
+
+  node.append("svg:text")
+      .attr("dx", function(d) { return d.children ? -8 : 8; })
+      .attr("dy", 3)
+      .attr("text-anchor", function(d) { return d.children ? "end" : "start"; })
+      .text(function(d) { return d.name; });
+});
Index: Dev/branches/Demo/d3/examples/contour/contour.html
===================================================================
--- Dev/branches/Demo/d3/examples/contour/contour.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/contour/contour.html	(revision 225)
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Contour</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <style type="text/css">
+svg {
+  border: solid 1px #aaa;
+}
+path {
+  stroke: red;
+  stroke-width: 2px;
+  fill: none;
+}
+rect {
+  fill: lightsteelblue;
+  stroke: #eee;
+  stroke-width: 2px;
+}
+rect.d1 {
+  fill: steelblue;
+}
+rect.d2 {
+  fill: darkblue;
+}
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+function grid0(x,y) {
+  if (x < 0 || y < 0 || x >= dw || y >= dh) return 0;
+  return data[y][x];
+}
+function grid1(x,y) {
+  if (x < 0 || y < 0 || x >= dw || y >= dh) return 0;
+  return data[y][x]==1;
+}
+function grid2(x,y) {
+  if (x < 0 || y < 0 || x >= dw || y >= dh) return 0;
+  return data[y][x]==2;
+}
+	
+var data = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 2, 2, 2, 0, 0, 0, 0],
+            [0, 0, 0, 2, 2, 2, 2, 0, 0, 0],
+            [0, 0, 2, 2, 2, 2, 2, 2, 0, 0],
+            [0, 0, 2, 2, 2, 2, 2, 2, 2, 0],
+            [0, 0, 2, 1, 0, 0, 2, 2, 2, 0],
+            [0, 0, 1, 1, 0, 0, 2, 2, 2, 0],
+            [0, 0, 0, 0, 1, 1, 2, 2, 0, 0],
+            [0, 0, 0, 0, 1, 2, 2, 2, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
+    fn = [grid0, grid1, grid2],
+    dw = data[0].length,
+    dh = data.length;
+    sz = 30,
+    grid = grid0;
+
+function translateY(d, i) { return "translate(0,"+(i*sz)+")"; }
+function translateX(d, i) { return "translate("+(i*sz)+",0)"; }
+function scale(p) { return [p[0]*sz, p[1]*sz]; }
+
+var svg = d3.select("body")
+ .append("svg:svg")
+  .attr("width", dw*sz)
+  .attr("height", dh*sz);
+
+var g = svg.selectAll("g")
+  .data(data)
+ .enter().append("svg:g")
+  .attr("transform", translateY);
+
+g.selectAll("rect")
+  .data(function(d) { return d; })
+ .enter().append("svg:rect")
+  .attr("transform", translateX)
+  .attr("width", sz)
+  .attr("height", sz)
+  .attr("class", function(d) { return "d"+d; })
+  .on("mouseover", mouseover);
+
+contour(grid);
+
+function contour(grid, start) {
+  svg.selectAll("path")
+    .data([d3.geom.contour(grid, start).map(scale)])
+    .attr("d", function(d) { return "M" + d.join("L") + "Z"; })
+   .enter().append("svg:path")
+    .attr("d", function(d) { return "M" + d.join("L") + "Z"; });
+}
+
+function mouseover(d,i) {
+  var s = undefined;
+  grid = fn[d];
+  if (d > 0) {
+	// map mouse to grid coords, then find left edge
+    var p = d3.svg.mouse(svg[0][0]);
+    s = [Math.floor(p[0]/sz), Math.floor(p[1]/sz)];
+    while (grid(s[0]-1,s[1])) s[0]--;
+  }
+  contour(grid, s);
+}
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/data/README
===================================================================
--- Dev/branches/Demo/d3/examples/data/README	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/README	(revision 225)
@@ -0,0 +1,5 @@
+These are derived from the cartographic boundary files from the 2000 U.S. Census:
+
+http://www.census.gov/geo/www/cob/bdy_files.html
+
+Then, MapShaper was used to simplify the geometry, and ogr2ogr to convert the shapefiles to GeoJSON. Some additional work was done to preserve the FIPS codes, which are dropped from the shapefiles by MapShaper.
Index: Dev/branches/Demo/d3/examples/data/faithful.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/faithful.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/faithful.json	(revision 225)
@@ -0,0 +1,8 @@
+[
+  79, 54, 74, 62, 85, 55, 88, 85, 51, 85, 54, 84, 78, 47, 83, 52, 62, 84, 52, 79, 51, 47, 78, 69, 74, 83, 55, 76, 78, 79, 73, 77, 66, 80, 74, 52, 48, 80, 59, 90, 80, 58, 84, 58, 73, 83, 64, 53,
+  82, 59, 75, 90, 54, 80, 54, 83, 71, 64, 77, 81, 59, 84, 48, 82, 60, 92, 78, 78, 65, 73, 82, 56, 79, 71, 62, 76, 60, 78, 76, 83, 75, 82, 70, 65, 73, 88, 76, 80, 48, 86, 60, 90, 50, 78, 63, 72,
+  84, 75, 51, 82, 62, 88, 49, 83, 81, 47, 84, 52, 86, 81, 75, 59, 89, 79, 59, 81, 50, 85, 59, 87, 53, 69, 77, 56, 88, 81, 45, 82, 55, 90, 45, 83, 56, 89, 46, 82, 51, 86, 53, 79, 81, 60, 82, 77,
+  76, 59, 80, 49, 96, 53, 77, 77, 65, 81, 71, 70, 81, 93, 53, 89, 45, 86, 58, 78, 66, 76, 63, 88, 52, 93, 49, 57, 77, 68, 81, 81, 73, 50, 85, 74, 55, 77, 83, 83, 51, 78, 84, 46, 83, 55, 81, 57,
+  76, 84, 77, 81, 87, 77, 51, 78, 60, 82, 91, 53, 78, 46, 77, 84, 49, 83, 71, 80, 49, 75, 64, 76, 53, 94, 55, 76, 50, 82, 54, 75, 78, 79, 78, 78, 70, 79, 70, 54, 86, 50, 90, 54, 54, 77, 79, 64,
+  75, 47, 86, 63, 85, 82, 57, 82, 67, 74, 54, 83, 73, 73, 88, 80, 71, 83, 56, 79, 78, 84, 58, 83, 43, 60, 75, 81, 46, 90, 46, 74
+]
Index: Dev/branches/Demo/d3/examples/data/flare-imports.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/flare-imports.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/flare-imports.json	(revision 225)
@@ -0,0 +1,222 @@
+[
+{"name":"flare.analytics.cluster.AgglomerativeCluster","size":3938,"imports":["flare.animate.Transitioner","flare.vis.data.DataList","flare.util.math.IMatrix","flare.analytics.cluster.MergeEdge","flare.analytics.cluster.HierarchicalCluster","flare.vis.data.Data"]},
+{"name":"flare.analytics.cluster.CommunityStructure","size":3812,"imports":["flare.analytics.cluster.HierarchicalCluster","flare.animate.Transitioner","flare.vis.data.DataList","flare.analytics.cluster.MergeEdge","flare.util.math.IMatrix"]},
+{"name":"flare.analytics.cluster.HierarchicalCluster","size":6714,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.Tree","flare.util.Arrays","flare.analytics.cluster.MergeEdge","flare.util.Sort","flare.vis.operator.Operator","flare.util.Property","flare.vis.data.Data"]},
+{"name":"flare.analytics.cluster.MergeEdge","size":743,"imports":[]},
+{"name":"flare.analytics.graph.BetweennessCentrality","size":3534,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.util.Arrays","flare.vis.data.Data","flare.util.Property","flare.vis.operator.Operator"]},
+{"name":"flare.analytics.graph.LinkDistance","size":5731,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.EdgeSprite","flare.analytics.graph.ShortestPaths","flare.vis.data.Data","flare.util.Property","flare.vis.operator.Operator"]},
+{"name":"flare.analytics.graph.MaxFlowMinCut","size":7840,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.EdgeSprite","flare.vis.data.Data","flare.util.Property","flare.vis.operator.Operator"]},
+{"name":"flare.analytics.graph.ShortestPaths","size":5914,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.animate.Transitioner","flare.vis.operator.Operator","flare.util.heap.HeapNode","flare.util.heap.FibonacciHeap","flare.util.Property","flare.vis.data.Data"]},
+{"name":"flare.analytics.graph.SpanningTree","size":3416,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.operator.IOperator","flare.vis.Visualization","flare.vis.data.TreeBuilder","flare.vis.operator.Operator"]},
+{"name":"flare.analytics.optimization.AspectRatioBanker","size":7074,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.data.DataSprite","flare.scale.Scale","flare.vis.axis.CartesianAxes","flare.vis.Visualization","flare.util.Property","flare.vis.operator.Operator"]},
+{"name":"flare.animate.Easing","size":17010,"imports":["flare.animate.Transition"]},
+{"name":"flare.animate.FunctionSequence","size":5842,"imports":["flare.util.Maths","flare.animate.Transition","flare.util.Arrays","flare.animate.Sequence","flare.animate.Transitioner"]},
+{"name":"flare.animate.interpolate.ArrayInterpolator","size":1983,"imports":["flare.util.Arrays","flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.ColorInterpolator","size":2047,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.DateInterpolator","size":1375,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.Interpolator","size":8746,"imports":["flare.animate.interpolate.NumberInterpolator","flare.animate.interpolate.ColorInterpolator","flare.animate.interpolate.PointInterpolator","flare.animate.interpolate.ObjectInterpolator","flare.animate.interpolate.MatrixInterpolator","flare.animate.interpolate.RectangleInterpolator","flare.animate.interpolate.DateInterpolator","flare.util.Property","flare.animate.interpolate.ArrayInterpolator"]},
+{"name":"flare.animate.interpolate.MatrixInterpolator","size":2202,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.NumberInterpolator","size":1382,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.ObjectInterpolator","size":1629,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.PointInterpolator","size":1675,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.interpolate.RectangleInterpolator","size":2042,"imports":["flare.animate.interpolate.Interpolator"]},
+{"name":"flare.animate.ISchedulable","size":1041,"imports":["flare.animate.Scheduler"]},
+{"name":"flare.animate.Parallel","size":5176,"imports":["flare.animate.Easing","flare.animate.Transition","flare.util.Arrays"]},
+{"name":"flare.animate.Pause","size":449,"imports":["flare.animate.Transition"]},
+{"name":"flare.animate.Scheduler","size":5593,"imports":["flare.animate.ISchedulable","flare.animate.Pause","flare.animate.Transition"]},
+{"name":"flare.animate.Sequence","size":5534,"imports":["flare.animate.Easing","flare.util.Maths","flare.animate.Transition","flare.util.Arrays"]},
+{"name":"flare.animate.Transition","size":9201,"imports":["flare.animate.Transitioner","flare.animate.TransitionEvent","flare.animate.Scheduler","flare.animate.Pause","flare.animate.Parallel","flare.animate.Easing","flare.animate.Sequence","flare.animate.ISchedulable","flare.util.Maths","flare.animate.Tween"]},
+{"name":"flare.animate.Transitioner","size":19975,"imports":["flare.util.IValueProxy","flare.animate.Parallel","flare.animate.Easing","flare.animate.Sequence","flare.animate.Transition","flare.animate.Tween","flare.util.Property"]},
+{"name":"flare.animate.TransitionEvent","size":1116,"imports":["flare.animate.Transition"]},
+{"name":"flare.animate.Tween","size":6006,"imports":["flare.animate.Transitioner","flare.animate.Transition","flare.animate.interpolate.Interpolator","flare.util.Property"]},
+{"name":"flare.data.converters.Converters","size":721,"imports":["flare.data.converters.IDataConverter","flare.data.converters.GraphMLConverter","flare.data.converters.JSONConverter","flare.data.converters.DelimitedTextConverter"]},
+{"name":"flare.data.converters.DelimitedTextConverter","size":4294,"imports":["flare.data.DataSet","flare.data.DataUtil","flare.data.DataTable","flare.data.converters.IDataConverter","flare.data.DataSchema","flare.data.DataField"]},
+{"name":"flare.data.converters.GraphMLConverter","size":9800,"imports":["flare.data.DataSet","flare.data.DataUtil","flare.data.DataTable","flare.data.converters.IDataConverter","flare.data.DataSchema","flare.data.DataField"]},
+{"name":"flare.data.converters.IDataConverter","size":1314,"imports":["flare.data.DataSet","flare.data.DataSchema"]},
+{"name":"flare.data.converters.JSONConverter","size":2220,"imports":["flare.data.DataSet","flare.data.DataUtil","flare.data.DataTable","flare.data.converters.IDataConverter","flare.data.DataSchema","flare.data.DataField","flare.util.Property"]},
+{"name":"flare.data.DataField","size":1759,"imports":["flare.data.DataUtil"]},
+{"name":"flare.data.DataSchema","size":2165,"imports":["flare.data.DataField","flare.util.Arrays"]},
+{"name":"flare.data.DataSet","size":586,"imports":["flare.data.DataTable"]},
+{"name":"flare.data.DataSource","size":3331,"imports":["flare.data.converters.IDataConverter","flare.data.converters.Converters","flare.data.DataSchema"]},
+{"name":"flare.data.DataTable","size":772,"imports":["flare.data.DataSchema"]},
+{"name":"flare.data.DataUtil","size":3322,"imports":["flare.data.DataField","flare.data.DataSchema"]},
+{"name":"flare.display.DirtySprite","size":8833,"imports":[]},
+{"name":"flare.display.LineSprite","size":1732,"imports":["flare.display.DirtySprite"]},
+{"name":"flare.display.RectSprite","size":3623,"imports":["flare.util.Colors","flare.display.DirtySprite"]},
+{"name":"flare.display.TextSprite","size":10066,"imports":["flare.display.DirtySprite"]},
+{"name":"flare.flex.FlareVis","size":4116,"imports":["flare.display.DirtySprite","flare.data.DataSet","flare.vis.Visualization","flare.vis.axis.CartesianAxes","flare.vis.axis.Axes","flare.vis.data.Data"]},
+{"name":"flare.physics.DragForce","size":1082,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.IForce"]},
+{"name":"flare.physics.GravityForce","size":1336,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.IForce"]},
+{"name":"flare.physics.IForce","size":319,"imports":["flare.physics.Simulation"]},
+{"name":"flare.physics.NBodyForce","size":10498,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.IForce"]},
+{"name":"flare.physics.Particle","size":2822,"imports":[]},
+{"name":"flare.physics.Simulation","size":9983,"imports":["flare.physics.Particle","flare.physics.NBodyForce","flare.physics.DragForce","flare.physics.GravityForce","flare.physics.Spring","flare.physics.SpringForce","flare.physics.IForce"]},
+{"name":"flare.physics.Spring","size":2213,"imports":["flare.physics.Particle"]},
+{"name":"flare.physics.SpringForce","size":1681,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.Spring","flare.physics.IForce"]},
+{"name":"flare.query.AggregateExpression","size":1616,"imports":["flare.query.Expression"]},
+{"name":"flare.query.And","size":1027,"imports":["flare.query.CompositeExpression","flare.query.Expression"]},
+{"name":"flare.query.Arithmetic","size":3891,"imports":["flare.query.BinaryExpression","flare.query.Expression"]},
+{"name":"flare.query.Average","size":891,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.BinaryExpression","size":2893,"imports":["flare.query.Expression"]},
+{"name":"flare.query.Comparison","size":5103,"imports":["flare.query.Not","flare.query.BinaryExpression","flare.query.Expression","flare.query.Or"]},
+{"name":"flare.query.CompositeExpression","size":3677,"imports":["flare.query.Expression","flare.query.If"]},
+{"name":"flare.query.Count","size":781,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.DateUtil","size":4141,"imports":["flare.query.Fn"]},
+{"name":"flare.query.Distinct","size":933,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.Expression","size":5130,"imports":["flare.query.Variable","flare.query.IsA","flare.query.ExpressionIterator","flare.util.IPredicate","flare.query.Literal","flare.util.IEvaluable","flare.query.If"]},
+{"name":"flare.query.ExpressionIterator","size":3617,"imports":["flare.query.Expression"]},
+{"name":"flare.query.Fn","size":3240,"imports":["flare.query.DateUtil","flare.query.CompositeExpression","flare.query.Expression","flare.query.StringUtil"]},
+{"name":"flare.query.If","size":2732,"imports":["flare.query.Expression"]},
+{"name":"flare.query.IsA","size":2039,"imports":["flare.query.Expression","flare.query.If"]},
+{"name":"flare.query.Literal","size":1214,"imports":["flare.query.Expression"]},
+{"name":"flare.query.Match","size":3748,"imports":["flare.query.BinaryExpression","flare.query.Expression","flare.query.StringUtil"]},
+{"name":"flare.query.Maximum","size":843,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.methods.add","size":593,"imports":["flare.query.methods.or","flare.query.Arithmetic"]},
+{"name":"flare.query.methods.and","size":330,"imports":["flare.query.And","flare.query.methods.or"]},
+{"name":"flare.query.methods.average","size":287,"imports":["flare.query.Average","flare.query.methods.or"]},
+{"name":"flare.query.methods.count","size":277,"imports":["flare.query.Count","flare.query.methods.or"]},
+{"name":"flare.query.methods.distinct","size":292,"imports":["flare.query.Distinct","flare.query.methods.or"]},
+{"name":"flare.query.methods.div","size":595,"imports":["flare.query.methods.or","flare.query.Arithmetic"]},
+{"name":"flare.query.methods.eq","size":594,"imports":["flare.query.Comparison","flare.query.methods.or"]},
+{"name":"flare.query.methods.fn","size":460,"imports":["flare.query.methods.or","flare.query.Fn"]},
+{"name":"flare.query.methods.gt","size":603,"imports":["flare.query.Comparison","flare.query.methods.or"]},
+{"name":"flare.query.methods.gte","size":625,"imports":["flare.query.Comparison","flare.query.methods.gt","flare.query.methods.eq","flare.query.methods.or"]},
+{"name":"flare.query.methods.iff","size":748,"imports":["flare.query.methods.or","flare.query.If"]},
+{"name":"flare.query.methods.isa","size":461,"imports":["flare.query.IsA","flare.query.methods.or"]},
+{"name":"flare.query.methods.lt","size":597,"imports":["flare.query.Comparison","flare.query.methods.or"]},
+{"name":"flare.query.methods.lte","size":619,"imports":["flare.query.Comparison","flare.query.methods.lt","flare.query.methods.eq","flare.query.methods.or"]},
+{"name":"flare.query.methods.max","size":283,"imports":["flare.query.Maximum","flare.query.methods.or"]},
+{"name":"flare.query.methods.min","size":283,"imports":["flare.query.Minimum","flare.query.methods.or"]},
+{"name":"flare.query.methods.mod","size":591,"imports":["flare.query.methods.or","flare.query.Arithmetic"]},
+{"name":"flare.query.methods.mul","size":603,"imports":["flare.query.methods.lt","flare.query.methods.or","flare.query.Arithmetic"]},
+{"name":"flare.query.methods.neq","size":599,"imports":["flare.query.Comparison","flare.query.methods.eq","flare.query.methods.or"]},
+{"name":"flare.query.methods.not","size":386,"imports":["flare.query.Not","flare.query.methods.or"]},
+{"name":"flare.query.methods.or","size":323,"imports":["flare.query.Or"]},
+{"name":"flare.query.methods.orderby","size":307,"imports":["flare.query.Query","flare.query.methods.or"]},
+{"name":"flare.query.methods.range","size":772,"imports":["flare.query.methods.max","flare.query.Range","flare.query.methods.or","flare.query.methods.min"]},
+{"name":"flare.query.methods.select","size":296,"imports":["flare.query.Query"]},
+{"name":"flare.query.methods.stddev","size":363,"imports":["flare.query.methods.and","flare.query.Variance","flare.query.methods.or"]},
+{"name":"flare.query.methods.sub","size":600,"imports":["flare.query.methods.or","flare.query.Arithmetic"]},
+{"name":"flare.query.methods.sum","size":280,"imports":["flare.query.Sum","flare.query.methods.or"]},
+{"name":"flare.query.methods.update","size":307,"imports":["flare.query.Query"]},
+{"name":"flare.query.methods.variance","size":335,"imports":["flare.query.Variance","flare.query.methods.or"]},
+{"name":"flare.query.methods.where","size":299,"imports":["flare.query.Query","flare.query.methods.lt","flare.query.methods.lte"]},
+{"name":"flare.query.methods.xor","size":354,"imports":["flare.query.Xor","flare.query.methods.or"]},
+{"name":"flare.query.methods._","size":264,"imports":["flare.query.Literal","flare.query.methods.or"]},
+{"name":"flare.query.Minimum","size":843,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.Not","size":1554,"imports":["flare.query.Expression"]},
+{"name":"flare.query.Or","size":970,"imports":["flare.query.CompositeExpression","flare.query.Expression"]},
+{"name":"flare.query.Query","size":13896,"imports":["flare.query.Variable","flare.query.Sum","flare.query.Expression","flare.util.Sort","flare.query.Not","flare.query.AggregateExpression","flare.query.Literal","flare.util.Filter","flare.util.Property","flare.query.If"]},
+{"name":"flare.query.Range","size":1594,"imports":["flare.query.And","flare.query.Comparison","flare.query.Expression"]},
+{"name":"flare.query.StringUtil","size":4130,"imports":["flare.query.Fn"]},
+{"name":"flare.query.Sum","size":791,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.Variable","size":1124,"imports":["flare.query.Expression","flare.util.Property"]},
+{"name":"flare.query.Variance","size":1876,"imports":["flare.query.Expression","flare.query.AggregateExpression"]},
+{"name":"flare.query.Xor","size":1101,"imports":["flare.query.CompositeExpression","flare.query.Expression"]},
+{"name":"flare.scale.IScaleMap","size":2105,"imports":["flare.scale.Scale"]},
+{"name":"flare.scale.LinearScale","size":1316,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.QuantitativeScale","flare.scale.ScaleType"]},
+{"name":"flare.scale.LogScale","size":3151,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.QuantitativeScale","flare.scale.ScaleType"]},
+{"name":"flare.scale.OrdinalScale","size":3770,"imports":["flare.scale.ScaleType","flare.util.Arrays","flare.scale.Scale"]},
+{"name":"flare.scale.QuantileScale","size":2435,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.ScaleType"]},
+{"name":"flare.scale.QuantitativeScale","size":4839,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale"]},
+{"name":"flare.scale.RootScale","size":1756,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.QuantitativeScale","flare.scale.ScaleType"]},
+{"name":"flare.scale.Scale","size":4268,"imports":["flare.scale.ScaleType","flare.util.Strings"]},
+{"name":"flare.scale.ScaleType","size":1821,"imports":["flare.scale.Scale"]},
+{"name":"flare.scale.TimeScale","size":5833,"imports":["flare.util.Maths","flare.util.Dates","flare.scale.Scale","flare.scale.ScaleType"]},
+{"name":"flare.util.Arrays","size":8258,"imports":["flare.util.IValueProxy","flare.util.Property","flare.util.IEvaluable"]},
+{"name":"flare.util.Colors","size":10001,"imports":["flare.util.Filter"]},
+{"name":"flare.util.Dates","size":8217,"imports":["flare.util.Maths"]},
+{"name":"flare.util.Displays","size":12555,"imports":["flare.util.IValueProxy","flare.util.Filter","flare.util.Property","flare.util.IEvaluable","flare.util.Sort"]},
+{"name":"flare.util.Filter","size":2324,"imports":["flare.util.IPredicate","flare.util.Property"]},
+{"name":"flare.util.Geometry","size":10993,"imports":[]},
+{"name":"flare.util.heap.FibonacciHeap","size":9354,"imports":["flare.util.heap.HeapNode"]},
+{"name":"flare.util.heap.HeapNode","size":1233,"imports":["flare.util.heap.FibonacciHeap"]},
+{"name":"flare.util.IEvaluable","size":335,"imports":[]},
+{"name":"flare.util.IPredicate","size":383,"imports":[]},
+{"name":"flare.util.IValueProxy","size":874,"imports":[]},
+{"name":"flare.util.math.DenseMatrix","size":3165,"imports":["flare.util.math.IMatrix"]},
+{"name":"flare.util.math.IMatrix","size":2815,"imports":[]},
+{"name":"flare.util.math.SparseMatrix","size":3366,"imports":["flare.util.math.IMatrix"]},
+{"name":"flare.util.Maths","size":17705,"imports":["flare.util.Arrays"]},
+{"name":"flare.util.Orientation","size":1486,"imports":[]},
+{"name":"flare.util.palette.ColorPalette","size":6367,"imports":["flare.util.palette.Palette","flare.util.Colors"]},
+{"name":"flare.util.palette.Palette","size":1229,"imports":[]},
+{"name":"flare.util.palette.ShapePalette","size":2059,"imports":["flare.util.palette.Palette","flare.util.Shapes"]},
+{"name":"flare.util.palette.SizePalette","size":2291,"imports":["flare.util.palette.Palette"]},
+{"name":"flare.util.Property","size":5559,"imports":["flare.util.IPredicate","flare.util.IValueProxy","flare.util.IEvaluable"]},
+{"name":"flare.util.Shapes","size":19118,"imports":["flare.util.Arrays"]},
+{"name":"flare.util.Sort","size":6887,"imports":["flare.util.Arrays","flare.util.Property"]},
+{"name":"flare.util.Stats","size":6557,"imports":["flare.util.Arrays","flare.util.Property"]},
+{"name":"flare.util.Strings","size":22026,"imports":["flare.util.Dates","flare.util.Property"]},
+{"name":"flare.vis.axis.Axes","size":1302,"imports":["flare.animate.Transitioner","flare.vis.Visualization"]},
+{"name":"flare.vis.axis.Axis","size":24593,"imports":["flare.animate.Transitioner","flare.scale.LinearScale","flare.util.Arrays","flare.scale.ScaleType","flare.util.Strings","flare.display.TextSprite","flare.scale.Scale","flare.util.Stats","flare.scale.IScaleMap","flare.vis.axis.AxisLabel","flare.vis.axis.AxisGridLine"]},
+{"name":"flare.vis.axis.AxisGridLine","size":652,"imports":["flare.vis.axis.Axis","flare.display.LineSprite"]},
+{"name":"flare.vis.axis.AxisLabel","size":636,"imports":["flare.vis.axis.Axis","flare.display.TextSprite"]},
+{"name":"flare.vis.axis.CartesianAxes","size":6703,"imports":["flare.animate.Transitioner","flare.display.RectSprite","flare.vis.axis.Axis","flare.display.TextSprite","flare.vis.axis.Axes","flare.vis.Visualization","flare.vis.axis.AxisGridLine"]},
+{"name":"flare.vis.controls.AnchorControl","size":2138,"imports":["flare.vis.controls.Control","flare.vis.Visualization","flare.vis.operator.layout.Layout"]},
+{"name":"flare.vis.controls.ClickControl","size":3824,"imports":["flare.vis.events.SelectionEvent","flare.vis.controls.Control"]},
+{"name":"flare.vis.controls.Control","size":1353,"imports":["flare.vis.controls.IControl","flare.util.Filter"]},
+{"name":"flare.vis.controls.ControlList","size":4665,"imports":["flare.vis.controls.IControl","flare.util.Arrays","flare.vis.Visualization","flare.vis.controls.Control"]},
+{"name":"flare.vis.controls.DragControl","size":2649,"imports":["flare.vis.controls.Control","flare.vis.data.DataSprite"]},
+{"name":"flare.vis.controls.ExpandControl","size":2832,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.controls.Control","flare.vis.Visualization"]},
+{"name":"flare.vis.controls.HoverControl","size":4896,"imports":["flare.vis.events.SelectionEvent","flare.vis.controls.Control"]},
+{"name":"flare.vis.controls.IControl","size":763,"imports":["flare.vis.controls.Control"]},
+{"name":"flare.vis.controls.PanZoomControl","size":5222,"imports":["flare.util.Displays","flare.vis.controls.Control"]},
+{"name":"flare.vis.controls.SelectionControl","size":7862,"imports":["flare.vis.events.SelectionEvent","flare.vis.controls.Control"]},
+{"name":"flare.vis.controls.TooltipControl","size":8435,"imports":["flare.animate.Tween","flare.display.TextSprite","flare.vis.controls.Control","flare.vis.events.TooltipEvent"]},
+{"name":"flare.vis.data.Data","size":20544,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.data.DataSprite","flare.vis.data.Tree","flare.vis.events.DataEvent","flare.data.DataSet","flare.vis.data.TreeBuilder","flare.vis.data.DataList","flare.data.DataSchema","flare.util.Sort","flare.data.DataField","flare.util.Property"]},
+{"name":"flare.vis.data.DataList","size":19788,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Arrays","flare.util.math.DenseMatrix","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.events.DataEvent","flare.util.Stats","flare.util.math.IMatrix","flare.util.Sort","flare.util.Filter","flare.util.Property","flare.util.IEvaluable","flare.vis.data.Data"]},
+{"name":"flare.vis.data.DataSprite","size":10349,"imports":["flare.util.Colors","flare.vis.data.Data","flare.display.DirtySprite","flare.vis.data.render.IRenderer","flare.vis.data.render.ShapeRenderer"]},
+{"name":"flare.vis.data.EdgeSprite","size":3301,"imports":["flare.vis.data.render.EdgeRenderer","flare.vis.data.DataSprite","flare.vis.data.NodeSprite","flare.vis.data.render.ArrowType","flare.vis.data.Data"]},
+{"name":"flare.vis.data.NodeSprite","size":19382,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.data.Tree","flare.util.Sort","flare.util.Filter","flare.util.IEvaluable","flare.vis.data.Data"]},
+{"name":"flare.vis.data.render.ArrowType","size":698,"imports":[]},
+{"name":"flare.vis.data.render.EdgeRenderer","size":5569,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.DataSprite","flare.vis.data.render.IRenderer","flare.util.Shapes","flare.util.Geometry","flare.vis.data.render.ArrowType"]},
+{"name":"flare.vis.data.render.IRenderer","size":353,"imports":["flare.vis.data.DataSprite"]},
+{"name":"flare.vis.data.render.ShapeRenderer","size":2247,"imports":["flare.util.Shapes","flare.vis.data.render.IRenderer","flare.vis.data.DataSprite"]},
+{"name":"flare.vis.data.ScaleBinding","size":11275,"imports":["flare.scale.TimeScale","flare.scale.ScaleType","flare.scale.LinearScale","flare.scale.LogScale","flare.scale.OrdinalScale","flare.scale.RootScale","flare.scale.Scale","flare.scale.QuantileScale","flare.util.Stats","flare.scale.QuantitativeScale","flare.vis.events.DataEvent","flare.vis.data.Data"]},
+{"name":"flare.vis.data.Tree","size":7147,"imports":["flare.vis.data.EdgeSprite","flare.vis.events.DataEvent","flare.vis.data.NodeSprite","flare.vis.data.Data"]},
+{"name":"flare.vis.data.TreeBuilder","size":9930,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.Tree","flare.util.heap.HeapNode","flare.util.heap.FibonacciHeap","flare.util.Property","flare.util.IEvaluable","flare.vis.data.Data"]},
+{"name":"flare.vis.events.DataEvent","size":2313,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.DataSprite"]},
+{"name":"flare.vis.events.SelectionEvent","size":1880,"imports":["flare.vis.events.DataEvent"]},
+{"name":"flare.vis.events.TooltipEvent","size":1701,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite"]},
+{"name":"flare.vis.events.VisualizationEvent","size":1117,"imports":["flare.animate.Transitioner"]},
+{"name":"flare.vis.legend.Legend","size":20859,"imports":["flare.animate.Transitioner","flare.vis.data.ScaleBinding","flare.util.palette.SizePalette","flare.scale.ScaleType","flare.vis.legend.LegendItem","flare.display.RectSprite","flare.display.TextSprite","flare.scale.Scale","flare.vis.legend.LegendRange","flare.util.Displays","flare.util.Orientation","flare.util.palette.ShapePalette","flare.util.palette.Palette","flare.util.palette.ColorPalette"]},
+{"name":"flare.vis.legend.LegendItem","size":4614,"imports":["flare.util.Shapes","flare.display.TextSprite","flare.vis.legend.Legend","flare.display.RectSprite"]},
+{"name":"flare.vis.legend.LegendRange","size":10530,"imports":["flare.util.Colors","flare.vis.legend.Legend","flare.display.RectSprite","flare.display.TextSprite","flare.scale.Scale","flare.util.Stats","flare.scale.IScaleMap","flare.util.Orientation","flare.util.palette.ColorPalette"]},
+{"name":"flare.vis.operator.distortion.BifocalDistortion","size":4461,"imports":["flare.vis.operator.distortion.Distortion"]},
+{"name":"flare.vis.operator.distortion.Distortion","size":6314,"imports":["flare.animate.Transitioner","flare.vis.data.DataSprite","flare.vis.events.VisualizationEvent","flare.vis.axis.Axis","flare.vis.axis.CartesianAxes","flare.vis.operator.layout.Layout","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.distortion.FisheyeDistortion","size":3444,"imports":["flare.vis.operator.distortion.Distortion"]},
+{"name":"flare.vis.operator.encoder.ColorEncoder","size":3179,"imports":["flare.animate.Transitioner","flare.scale.ScaleType","flare.vis.operator.encoder.Encoder","flare.util.palette.Palette","flare.util.palette.ColorPalette","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.encoder.Encoder","size":4060,"imports":["flare.animate.Transitioner","flare.vis.data.DataSprite","flare.vis.operator.Operator","flare.vis.data.ScaleBinding","flare.util.palette.Palette","flare.util.Filter","flare.util.Property","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.encoder.PropertyEncoder","size":4138,"imports":["flare.animate.Transitioner","flare.vis.data.DataList","flare.vis.data.Data","flare.vis.operator.encoder.Encoder","flare.util.Filter","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.encoder.ShapeEncoder","size":1690,"imports":["flare.util.palette.Palette","flare.scale.ScaleType","flare.util.palette.ShapePalette","flare.vis.operator.encoder.Encoder","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.encoder.SizeEncoder","size":1830,"imports":["flare.util.palette.Palette","flare.scale.ScaleType","flare.vis.operator.encoder.Encoder","flare.util.palette.SizePalette","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.filter.FisheyeTreeFilter","size":5219,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.data.Tree","flare.vis.operator.Operator","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.filter.GraphDistanceFilter","size":3165,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.operator.Operator","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite"]},
+{"name":"flare.vis.operator.filter.VisibilityFilter","size":3509,"imports":["flare.vis.operator.Operator","flare.animate.Transitioner","flare.util.Filter","flare.vis.data.DataSprite","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.IOperator","size":1286,"imports":["flare.animate.Transitioner","flare.vis.Visualization","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.label.Labeler","size":9956,"imports":["flare.animate.Transitioner","flare.vis.data.DataSprite","flare.display.TextSprite","flare.vis.operator.Operator","flare.util.Shapes","flare.util.Filter","flare.util.Property","flare.util.IEvaluable","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.label.RadialLabeler","size":3899,"imports":["flare.vis.operator.label.Labeler","flare.util.Shapes","flare.display.TextSprite","flare.vis.data.DataSprite","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.label.StackedAreaLabeler","size":3202,"imports":["flare.vis.operator.label.Labeler","flare.display.TextSprite","flare.vis.data.DataSprite","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.AxisLayout","size":6725,"imports":["flare.scale.ScaleType","flare.vis.data.DataSprite","flare.vis.axis.CartesianAxes","flare.vis.data.ScaleBinding","flare.util.Property","flare.vis.operator.layout.Layout","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.BundledEdgeRouter","size":3727,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.util.Shapes","flare.vis.operator.layout.Layout","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.layout.CircleLayout","size":9317,"imports":["flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.ScaleBinding","flare.util.Property","flare.vis.operator.layout.Layout","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.CirclePackingLayout","size":12003,"imports":["flare.vis.data.NodeSprite","flare.vis.data.render.ShapeRenderer","flare.util.Shapes","flare.util.Sort","flare.vis.operator.layout.Layout","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.DendrogramLayout","size":4853,"imports":["flare.util.Property","flare.vis.data.NodeSprite","flare.util.Orientation","flare.vis.operator.layout.Layout","flare.vis.data.EdgeSprite"]},
+{"name":"flare.vis.operator.layout.ForceDirectedLayout","size":8411,"imports":["flare.physics.Simulation","flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataSprite","flare.physics.Particle","flare.physics.Spring","flare.vis.operator.layout.Layout","flare.vis.data.EdgeSprite","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.IcicleTreeLayout","size":4864,"imports":["flare.vis.data.NodeSprite","flare.util.Orientation","flare.vis.operator.layout.Layout"]},
+{"name":"flare.vis.operator.layout.IndentedTreeLayout","size":3174,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.operator.layout.Layout","flare.vis.data.EdgeSprite"]},
+{"name":"flare.vis.operator.layout.Layout","size":7881,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.Visualization","flare.vis.axis.CartesianAxes","flare.vis.axis.Axes","flare.animate.TransitionEvent","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.layout.NodeLinkTreeLayout","size":12870,"imports":["flare.vis.data.NodeSprite","flare.util.Arrays","flare.util.Orientation","flare.vis.operator.layout.Layout"]},
+{"name":"flare.vis.operator.layout.PieLayout","size":2728,"imports":["flare.vis.data.DataList","flare.vis.data.DataSprite","flare.util.Shapes","flare.util.Property","flare.vis.operator.layout.Layout","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.RadialTreeLayout","size":12348,"imports":["flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.operator.layout.Layout"]},
+{"name":"flare.vis.operator.layout.RandomLayout","size":870,"imports":["flare.vis.operator.layout.Layout","flare.vis.data.DataSprite","flare.vis.data.Data"]},
+{"name":"flare.vis.operator.layout.StackedAreaLayout","size":9121,"imports":["flare.scale.TimeScale","flare.scale.LinearScale","flare.util.Arrays","flare.scale.OrdinalScale","flare.vis.data.NodeSprite","flare.scale.Scale","flare.vis.axis.CartesianAxes","flare.util.Stats","flare.util.Orientation","flare.scale.QuantitativeScale","flare.util.Maths","flare.vis.operator.layout.Layout"]},
+{"name":"flare.vis.operator.layout.TreeMapLayout","size":9191,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Property","flare.vis.operator.layout.Layout"]},
+{"name":"flare.vis.operator.Operator","size":2490,"imports":["flare.animate.Transitioner","flare.vis.operator.IOperator","flare.util.Property","flare.util.IEvaluable","flare.vis.Visualization"]},
+{"name":"flare.vis.operator.OperatorList","size":5248,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.operator.IOperator","flare.vis.Visualization","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.OperatorSequence","size":4190,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.operator.IOperator","flare.vis.operator.OperatorList","flare.animate.FunctionSequence","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.OperatorSwitch","size":2581,"imports":["flare.animate.Transitioner","flare.vis.operator.OperatorList","flare.vis.operator.IOperator","flare.vis.operator.Operator"]},
+{"name":"flare.vis.operator.SortOperator","size":2023,"imports":["flare.vis.operator.Operator","flare.animate.Transitioner","flare.util.Arrays","flare.vis.data.Data"]},
+{"name":"flare.vis.Visualization","size":16540,"imports":["flare.animate.Transitioner","flare.vis.operator.IOperator","flare.animate.Scheduler","flare.vis.events.VisualizationEvent","flare.vis.data.Tree","flare.vis.events.DataEvent","flare.vis.axis.Axes","flare.vis.axis.CartesianAxes","flare.util.Displays","flare.vis.operator.OperatorList","flare.vis.controls.ControlList","flare.animate.ISchedulable","flare.vis.data.Data"]}
+]
Index: Dev/branches/Demo/d3/examples/data/flare.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/flare.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/flare.json	(revision 225)
@@ -0,0 +1,380 @@
+{
+ "name": "flare",
+ "children": [
+  {
+   "name": "analytics",
+   "children": [
+    {
+     "name": "cluster",
+     "children": [
+      {"name": "AgglomerativeCluster", "size": 3938},
+      {"name": "CommunityStructure", "size": 3812},
+      {"name": "HierarchicalCluster", "size": 6714},
+      {"name": "MergeEdge", "size": 743}
+     ]
+    },
+    {
+     "name": "graph",
+     "children": [
+      {"name": "BetweennessCentrality", "size": 3534},
+      {"name": "LinkDistance", "size": 5731},
+      {"name": "MaxFlowMinCut", "size": 7840},
+      {"name": "ShortestPaths", "size": 5914},
+      {"name": "SpanningTree", "size": 3416}
+     ]
+    },
+    {
+     "name": "optimization",
+     "children": [
+      {"name": "AspectRatioBanker", "size": 7074}
+     ]
+    }
+   ]
+  },
+  {
+   "name": "animate",
+   "children": [
+    {"name": "Easing", "size": 17010},
+    {"name": "FunctionSequence", "size": 5842},
+    {
+     "name": "interpolate",
+     "children": [
+      {"name": "ArrayInterpolator", "size": 1983},
+      {"name": "ColorInterpolator", "size": 2047},
+      {"name": "DateInterpolator", "size": 1375},
+      {"name": "Interpolator", "size": 8746},
+      {"name": "MatrixInterpolator", "size": 2202},
+      {"name": "NumberInterpolator", "size": 1382},
+      {"name": "ObjectInterpolator", "size": 1629},
+      {"name": "PointInterpolator", "size": 1675},
+      {"name": "RectangleInterpolator", "size": 2042}
+     ]
+    },
+    {"name": "ISchedulable", "size": 1041},
+    {"name": "Parallel", "size": 5176},
+    {"name": "Pause", "size": 449},
+    {"name": "Scheduler", "size": 5593},
+    {"name": "Sequence", "size": 5534},
+    {"name": "Transition", "size": 9201},
+    {"name": "Transitioner", "size": 19975},
+    {"name": "TransitionEvent", "size": 1116},
+    {"name": "Tween", "size": 6006}
+   ]
+  },
+  {
+   "name": "data",
+   "children": [
+    {
+     "name": "converters",
+     "children": [
+      {"name": "Converters", "size": 721},
+      {"name": "DelimitedTextConverter", "size": 4294},
+      {"name": "GraphMLConverter", "size": 9800},
+      {"name": "IDataConverter", "size": 1314},
+      {"name": "JSONConverter", "size": 2220}
+     ]
+    },
+    {"name": "DataField", "size": 1759},
+    {"name": "DataSchema", "size": 2165},
+    {"name": "DataSet", "size": 586},
+    {"name": "DataSource", "size": 3331},
+    {"name": "DataTable", "size": 772},
+    {"name": "DataUtil", "size": 3322}
+   ]
+  },
+  {
+   "name": "display",
+   "children": [
+    {"name": "DirtySprite", "size": 8833},
+    {"name": "LineSprite", "size": 1732},
+    {"name": "RectSprite", "size": 3623},
+    {"name": "TextSprite", "size": 10066}
+   ]
+  },
+  {
+   "name": "flex",
+   "children": [
+    {"name": "FlareVis", "size": 4116}
+   ]
+  },
+  {
+   "name": "physics",
+   "children": [
+    {"name": "DragForce", "size": 1082},
+    {"name": "GravityForce", "size": 1336},
+    {"name": "IForce", "size": 319},
+    {"name": "NBodyForce", "size": 10498},
+    {"name": "Particle", "size": 2822},
+    {"name": "Simulation", "size": 9983},
+    {"name": "Spring", "size": 2213},
+    {"name": "SpringForce", "size": 1681}
+   ]
+  },
+  {
+   "name": "query",
+   "children": [
+    {"name": "AggregateExpression", "size": 1616},
+    {"name": "And", "size": 1027},
+    {"name": "Arithmetic", "size": 3891},
+    {"name": "Average", "size": 891},
+    {"name": "BinaryExpression", "size": 2893},
+    {"name": "Comparison", "size": 5103},
+    {"name": "CompositeExpression", "size": 3677},
+    {"name": "Count", "size": 781},
+    {"name": "DateUtil", "size": 4141},
+    {"name": "Distinct", "size": 933},
+    {"name": "Expression", "size": 5130},
+    {"name": "ExpressionIterator", "size": 3617},
+    {"name": "Fn", "size": 3240},
+    {"name": "If", "size": 2732},
+    {"name": "IsA", "size": 2039},
+    {"name": "Literal", "size": 1214},
+    {"name": "Match", "size": 3748},
+    {"name": "Maximum", "size": 843},
+    {
+     "name": "methods",
+     "children": [
+      {"name": "add", "size": 593},
+      {"name": "and", "size": 330},
+      {"name": "average", "size": 287},
+      {"name": "count", "size": 277},
+      {"name": "distinct", "size": 292},
+      {"name": "div", "size": 595},
+      {"name": "eq", "size": 594},
+      {"name": "fn", "size": 460},
+      {"name": "gt", "size": 603},
+      {"name": "gte", "size": 625},
+      {"name": "iff", "size": 748},
+      {"name": "isa", "size": 461},
+      {"name": "lt", "size": 597},
+      {"name": "lte", "size": 619},
+      {"name": "max", "size": 283},
+      {"name": "min", "size": 283},
+      {"name": "mod", "size": 591},
+      {"name": "mul", "size": 603},
+      {"name": "neq", "size": 599},
+      {"name": "not", "size": 386},
+      {"name": "or", "size": 323},
+      {"name": "orderby", "size": 307},
+      {"name": "range", "size": 772},
+      {"name": "select", "size": 296},
+      {"name": "stddev", "size": 363},
+      {"name": "sub", "size": 600},
+      {"name": "sum", "size": 280},
+      {"name": "update", "size": 307},
+      {"name": "variance", "size": 335},
+      {"name": "where", "size": 299},
+      {"name": "xor", "size": 354},
+      {"name": "_", "size": 264}
+     ]
+    },
+    {"name": "Minimum", "size": 843},
+    {"name": "Not", "size": 1554},
+    {"name": "Or", "size": 970},
+    {"name": "Query", "size": 13896},
+    {"name": "Range", "size": 1594},
+    {"name": "StringUtil", "size": 4130},
+    {"name": "Sum", "size": 791},
+    {"name": "Variable", "size": 1124},
+    {"name": "Variance", "size": 1876},
+    {"name": "Xor", "size": 1101}
+   ]
+  },
+  {
+   "name": "scale",
+   "children": [
+    {"name": "IScaleMap", "size": 2105},
+    {"name": "LinearScale", "size": 1316},
+    {"name": "LogScale", "size": 3151},
+    {"name": "OrdinalScale", "size": 3770},
+    {"name": "QuantileScale", "size": 2435},
+    {"name": "QuantitativeScale", "size": 4839},
+    {"name": "RootScale", "size": 1756},
+    {"name": "Scale", "size": 4268},
+    {"name": "ScaleType", "size": 1821},
+    {"name": "TimeScale", "size": 5833}
+   ]
+  },
+  {
+   "name": "util",
+   "children": [
+    {"name": "Arrays", "size": 8258},
+    {"name": "Colors", "size": 10001},
+    {"name": "Dates", "size": 8217},
+    {"name": "Displays", "size": 12555},
+    {"name": "Filter", "size": 2324},
+    {"name": "Geometry", "size": 10993},
+    {
+     "name": "heap",
+     "children": [
+      {"name": "FibonacciHeap", "size": 9354},
+      {"name": "HeapNode", "size": 1233}
+     ]
+    },
+    {"name": "IEvaluable", "size": 335},
+    {"name": "IPredicate", "size": 383},
+    {"name": "IValueProxy", "size": 874},
+    {
+     "name": "math",
+     "children": [
+      {"name": "DenseMatrix", "size": 3165},
+      {"name": "IMatrix", "size": 2815},
+      {"name": "SparseMatrix", "size": 3366}
+     ]
+    },
+    {"name": "Maths", "size": 17705},
+    {"name": "Orientation", "size": 1486},
+    {
+     "name": "palette",
+     "children": [
+      {"name": "ColorPalette", "size": 6367},
+      {"name": "Palette", "size": 1229},
+      {"name": "ShapePalette", "size": 2059},
+      {"name": "SizePalette", "size": 2291}
+     ]
+    },
+    {"name": "Property", "size": 5559},
+    {"name": "Shapes", "size": 19118},
+    {"name": "Sort", "size": 6887},
+    {"name": "Stats", "size": 6557},
+    {"name": "Strings", "size": 22026}
+   ]
+  },
+  {
+   "name": "vis",
+   "children": [
+    {
+     "name": "axis",
+     "children": [
+      {"name": "Axes", "size": 1302},
+      {"name": "Axis", "size": 24593},
+      {"name": "AxisGridLine", "size": 652},
+      {"name": "AxisLabel", "size": 636},
+      {"name": "CartesianAxes", "size": 6703}
+     ]
+    },
+    {
+     "name": "controls",
+     "children": [
+      {"name": "AnchorControl", "size": 2138},
+      {"name": "ClickControl", "size": 3824},
+      {"name": "Control", "size": 1353},
+      {"name": "ControlList", "size": 4665},
+      {"name": "DragControl", "size": 2649},
+      {"name": "ExpandControl", "size": 2832},
+      {"name": "HoverControl", "size": 4896},
+      {"name": "IControl", "size": 763},
+      {"name": "PanZoomControl", "size": 5222},
+      {"name": "SelectionControl", "size": 7862},
+      {"name": "TooltipControl", "size": 8435}
+     ]
+    },
+    {
+     "name": "data",
+     "children": [
+      {"name": "Data", "size": 20544},
+      {"name": "DataList", "size": 19788},
+      {"name": "DataSprite", "size": 10349},
+      {"name": "EdgeSprite", "size": 3301},
+      {"name": "NodeSprite", "size": 19382},
+      {
+       "name": "render",
+       "children": [
+        {"name": "ArrowType", "size": 698},
+        {"name": "EdgeRenderer", "size": 5569},
+        {"name": "IRenderer", "size": 353},
+        {"name": "ShapeRenderer", "size": 2247}
+       ]
+      },
+      {"name": "ScaleBinding", "size": 11275},
+      {"name": "Tree", "size": 7147},
+      {"name": "TreeBuilder", "size": 9930}
+     ]
+    },
+    {
+     "name": "events",
+     "children": [
+      {"name": "DataEvent", "size": 2313},
+      {"name": "SelectionEvent", "size": 1880},
+      {"name": "TooltipEvent", "size": 1701},
+      {"name": "VisualizationEvent", "size": 1117}
+     ]
+    },
+    {
+     "name": "legend",
+     "children": [
+      {"name": "Legend", "size": 20859},
+      {"name": "LegendItem", "size": 4614},
+      {"name": "LegendRange", "size": 10530}
+     ]
+    },
+    {
+     "name": "operator",
+     "children": [
+      {
+       "name": "distortion",
+       "children": [
+        {"name": "BifocalDistortion", "size": 4461},
+        {"name": "Distortion", "size": 6314},
+        {"name": "FisheyeDistortion", "size": 3444}
+       ]
+      },
+      {
+       "name": "encoder",
+       "children": [
+        {"name": "ColorEncoder", "size": 3179},
+        {"name": "Encoder", "size": 4060},
+        {"name": "PropertyEncoder", "size": 4138},
+        {"name": "ShapeEncoder", "size": 1690},
+        {"name": "SizeEncoder", "size": 1830}
+       ]
+      },
+      {
+       "name": "filter",
+       "children": [
+        {"name": "FisheyeTreeFilter", "size": 5219},
+        {"name": "GraphDistanceFilter", "size": 3165},
+        {"name": "VisibilityFilter", "size": 3509}
+       ]
+      },
+      {"name": "IOperator", "size": 1286},
+      {
+       "name": "label",
+       "children": [
+        {"name": "Labeler", "size": 9956},
+        {"name": "RadialLabeler", "size": 3899},
+        {"name": "StackedAreaLabeler", "size": 3202}
+       ]
+      },
+      {
+       "name": "layout",
+       "children": [
+        {"name": "AxisLayout", "size": 6725},
+        {"name": "BundledEdgeRouter", "size": 3727},
+        {"name": "CircleLayout", "size": 9317},
+        {"name": "CirclePackingLayout", "size": 12003},
+        {"name": "DendrogramLayout", "size": 4853},
+        {"name": "ForceDirectedLayout", "size": 8411},
+        {"name": "IcicleTreeLayout", "size": 4864},
+        {"name": "IndentedTreeLayout", "size": 3174},
+        {"name": "Layout", "size": 7881},
+        {"name": "NodeLinkTreeLayout", "size": 12870},
+        {"name": "PieLayout", "size": 2728},
+        {"name": "RadialTreeLayout", "size": 12348},
+        {"name": "RandomLayout", "size": 870},
+        {"name": "StackedAreaLayout", "size": 9121},
+        {"name": "TreeMapLayout", "size": 9191}
+       ]
+      },
+      {"name": "Operator", "size": 2490},
+      {"name": "OperatorList", "size": 5248},
+      {"name": "OperatorSequence", "size": 4190},
+      {"name": "OperatorSwitch", "size": 2581},
+      {"name": "SortOperator", "size": 2023}
+     ]
+    },
+    {"name": "Visualization", "size": 16540}
+   ]
+  }
+ ]
+}
Index: Dev/branches/Demo/d3/examples/data/morley.csv
===================================================================
--- Dev/branches/Demo/d3/examples/data/morley.csv	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/morley.csv	(revision 225)
@@ -0,0 +1,101 @@
+Expt,Run,Speed
+1,1,850
+1,2,740
+1,3,900
+1,4,1070
+1,5,930
+1,6,850
+1,7,950
+1,8,980
+1,9,980
+1,10,880
+1,11,1000
+1,12,980
+1,13,930
+1,14,650
+1,15,760
+1,16,810
+1,17,1000
+1,18,1000
+1,19,960
+1,20,960
+2,1,960
+2,2,940
+2,3,960
+2,4,940
+2,5,880
+2,6,800
+2,7,850
+2,8,880
+2,9,900
+2,10,840
+2,11,830
+2,12,790
+2,13,810
+2,14,880
+2,15,880
+2,16,830
+2,17,800
+2,18,790
+2,19,760
+2,20,800
+3,1,880
+3,2,880
+3,3,880
+3,4,860
+3,5,720
+3,6,720
+3,7,620
+3,8,860
+3,9,970
+3,10,950
+3,11,880
+3,12,910
+3,13,850
+3,14,870
+3,15,840
+3,16,840
+3,17,850
+3,18,840
+3,19,840
+3,20,840
+4,1,890
+4,2,810
+4,3,810
+4,4,820
+4,5,800
+4,6,770
+4,7,760
+4,8,740
+4,9,750
+4,10,760
+4,11,910
+4,12,920
+4,13,890
+4,14,860
+4,15,880
+4,16,720
+4,17,840
+4,18,850
+4,19,850
+4,20,780
+5,1,890
+5,2,840
+5,3,780
+5,4,810
+5,5,760
+5,6,810
+5,7,790
+5,8,810
+5,9,820
+5,10,850
+5,11,870
+5,12,870
+5,13,810
+5,14,740
+5,15,810
+5,16,940
+5,17,950
+5,18,800
+5,19,810
+5,20,870
Index: Dev/branches/Demo/d3/examples/data/us-borders.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/us-borders.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/us-borders.json	(revision 225)
@@ -0,0 +1,1 @@
+{"30":["38","46","56","16"],"51":["24","37","47","21","54"],"45":["37","13"],"50":["33","25","36"],"19":["27","55","17","29","31","46"],"26":["39","18","55"],"35":["08","40","48","04"],"41":["53","16","32","06"],"04":["35","49","32","06"],"02":[],"25":["33","44","09","36"],"23":["33"],"01":["28","13","12","47"],"06":["41","32","04"],"21":["39","54","51","47","29","17","18"],"22":["05","28","48"],"05":["28","22","48","40","29","47"],"46":["38","27","19","31","56","30"],"47":["21","51","37","13","01","28","05","29"],"08":["35","49","56","31","20","40"],"09":["25","44","36"],"42":["36","34","10","24","54","39"],"29":["19","17","21","47","05","40","20","31"],"40":["20","29","05","48","35","08"],"18":["26","39","21","17"],"27":["55","19","46","38"],"28":["47","01","22","05"],"24":["10","42","54","51","11"],"39":["42","54","21","18","26"],"38":["68","46","30"],"20":["31","29","40","08"],"11":["24","51"],"10":["34","42","24"],"13":["12","01","47","37","45"],"12":["13","01"],"15":[],"48":["27","40","05","22"],"17":["18","21","29","19","55"],"16":["30","56","49","32","41","53"],"55":["26","17","19","27"],"54":["42","24","51","21","39"],"31":["46","19","29","20","08","56"],"56":["30","46","31","08","49","16"],"37":["51","45","13","47"],"36":["50","25","09","34","42"],"53":["16","41"],"34":["36","10","42"],"33":["23","25","50"],"32":["16","49","04","06","41"],"49":["16","56","08","04","32"],"44":["25","09"]}
Index: Dev/branches/Demo/d3/examples/data/us-counties.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/us-counties.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/us-counties.json	(revision 225)
@@ -0,0 +1,3216 @@
+{"type":"FeatureCollection","features":[
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-141.00045,68.498147],[-146.000897,68.487193],[-145.99542,67.999745],[-146.970315,67.999745],[-155.300742,67.999745],[-157.157424,68.207869],[-161.993563,68.2243],[-162.683657,68.300977],[-164.502001,68.229777],[-164.496525,68.021653],[-165.361881,68.02713],[-166.681824,68.339316],[-166.216284,68.881533],[-164.255539,68.930825],[-163.110859,69.374457],[-163.034181,69.724981],[-161.851162,70.311014],[-161.396576,70.239814],[-159.649432,70.792985],[-158.033735,70.831323],[-156.812377,71.285909],[-155.585543,71.170894],[-155.974405,70.809416],[-155.032372,71.148986],[-154.183446,70.7656],[-153.235935,70.924431],[-152.26104,70.842277],[-152.419871,70.606769],[-151.877654,70.431507],[-149.462323,70.519138],[-147.682318,70.201475],[-145.858496,70.168614],[-144.620708,69.971444],[-143.914183,70.130275],[-142.747594,70.042644],[-141.378359,69.63735],[-141.00045,69.648304],[-141.00045,68.498147]]]},"id":"02185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-146.970315,67.999745],[-145.99542,67.999745],[-146.000897,68.487193],[-141.00045,68.498147],[-141.00045,65.841831],[-141.838422,65.463922],[-142.605194,65.392722],[-144.06206,64.680719],[-143.886798,65.09149],[-145.644896,65.031244],[-146.19259,65.452968],[-146.696468,65.321521],[-148.66269,65.211983],[-148.646259,64.604042],[-147.99998,64.341149],[-149.232292,64.35758],[-150.749404,64.363057],[-151.302575,64.012533],[-152.047439,64.001579],[-152.244609,63.656532],[-152.852549,63.651055],[-152.436302,63.169084],[-153.000427,62.725452],[-153.000427,62.292773],[-153.734337,62.02988],[-157.064316,62.02988],[-158.532136,62.117511],[-159.266046,61.947726],[-160.536697,61.947726],[-161.046052,62.205142],[-160.848882,63.010253],[-160.690051,63.536039],[-159.698725,63.793455],[-159.956141,64.050871],[-159.978049,64.746443],[-159.578232,64.921705],[-159.594663,65.524168],[-159.594663,65.956846],[-158.964815,66.121155],[-157.896811,66.126632],[-157.891334,66.477156],[-155.563635,66.307371],[-155.514342,66.570264],[-154.199877,66.718141],[-154.145107,67.161773],[-154.747571,67.254881],[-154.687324,67.599929],[-155.350034,67.775191],[-155.300742,67.999745],[-146.970315,67.999745]]]},"id":"02290"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-162.683657,68.300977],[-161.993563,68.2243],[-157.157424,68.207869],[-155.300742,67.999745],[-155.350034,67.775191],[-154.687324,67.599929],[-154.747571,67.254881],[-154.145107,67.161773],[-154.199877,66.718141],[-155.514342,66.570264],[-155.563635,66.307371],[-157.891334,66.477156],[-157.896811,66.126632],[-158.964815,66.121155],[-159.594663,65.956846],[-159.594663,65.524168],[-159.802787,65.436537],[-163.757138,65.436537],[-164.244585,65.781584],[-164.403417,66.581218],[-163.751661,66.553833],[-163.768091,66.060908],[-161.840208,66.02257],[-160.991283,66.23617],[-162.502918,66.740049],[-161.884024,66.718141],[-161.851162,67.052235],[-162.902735,67.008419],[-163.740707,67.128912],[-164.009077,67.534205],[-165.361881,68.02713],[-164.496525,68.021653],[-164.502001,68.229777],[-162.683657,68.300977]]]},"id":"02188"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-164.403417,66.581218],[-164.244585,65.781584],[-163.757138,65.436537],[-159.802787,65.436537],[-159.594663,65.524168],[-159.578232,64.921705],[-159.978049,64.746443],[-159.956141,64.050871],[-159.698725,63.793455],[-160.690051,63.536039],[-160.848882,63.010253],[-161.993563,63.010253],[-162.585072,63.273146],[-162.294794,63.541516],[-161.13916,63.503177],[-160.766728,63.771547],[-161.374669,64.532842],[-160.783159,64.719058],[-161.144637,64.921705],[-162.541257,64.532842],[-162.787719,64.324718],[-163.598306,64.565704],[-165.000403,64.434257],[-166.188899,64.576658],[-166.884471,65.140782],[-166.34773,65.277706],[-167.47598,65.414629],[-168.105828,65.682999],[-165.88219,66.312848],[-164.403417,66.581218]]]},"id":"02180"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-141.838422,65.463922],[-141.00045,65.841831],[-141.00045,61.903911],[-141.827468,61.898434],[-141.964392,62.511851],[-142.314916,62.681636],[-143.103595,62.615913],[-143.125503,63.114314],[-145.146494,63.136222],[-145.360095,63.223853],[-146.482868,63.174561],[-146.488345,63.481269],[-146.975792,63.481269],[-147.003177,64.258995],[-146.236405,64.308287],[-144.06206,64.680719],[-142.605194,65.392722],[-141.838422,65.463922]]]},"id":"02240"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-146.696468,65.321521],[-146.19259,65.452968],[-145.644896,65.031244],[-143.886798,65.09149],[-144.06206,64.680719],[-146.236405,64.308287],[-147.003177,64.258995],[-147.99998,64.341149],[-148.646259,64.604042],[-148.66269,65.211983],[-146.696468,65.321521]]]},"id":"02090"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-149.232292,64.35758],[-147.99998,64.341149],[-147.003177,64.258995],[-146.975792,63.481269],[-148.038319,63.333392],[-149.506139,63.333392],[-151.888608,62.796652],[-153.000427,62.725452],[-152.436302,63.169084],[-152.852549,63.651055],[-152.244609,63.656532],[-152.047439,64.001579],[-151.302575,64.012533],[-150.749404,64.363057],[-149.232292,64.35758]]]},"id":"02068"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-171.742517,63.716778],[-170.94836,63.5689],[-170.488297,63.69487],[-169.518879,63.366254],[-168.686384,63.295053],[-169.639372,62.939052],[-170.866206,63.415546],[-171.463193,63.306007],[-171.742517,63.716778]]]},"id":"02180"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-153.000427,62.725452],[-151.888608,62.796652],[-149.506139,63.333392],[-148.038319,63.333392],[-146.975792,63.481269],[-146.488345,63.481269],[-146.482868,63.174561],[-146.428098,62.248958],[-146.981269,62.248958],[-146.942931,61.476709],[-148.460043,61.427417],[-149.259676,61.482186],[-149.988109,61.230247],[-150.973959,61.191908],[-151.335437,61.42194],[-153.000427,61.427417],[-153.000427,62.292773],[-153.000427,62.725452]]]},"id":"02170"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-162.585072,63.273146],[-161.993563,63.010253],[-160.848882,63.010253],[-161.046052,62.205142],[-160.536697,61.947726],[-160.40525,61.810803],[-161.900455,61.482186],[-162.508395,61.558863],[-163.992646,61.372647],[-164.156954,61.022123],[-165.159234,60.918061],[-164.962064,61.022123],[-166.106745,61.49314],[-165.59739,61.860095],[-165.674067,62.139419],[-165.044219,62.539236],[-164.633448,63.097884],[-164.069323,63.262192],[-163.313505,63.037637],[-162.585072,63.273146]]]},"id":"02270"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-145.360095,63.223853],[-145.146494,63.136222],[-143.125503,63.114314],[-143.103595,62.615913],[-142.314916,62.681636],[-141.964392,62.511851],[-141.827468,61.898434],[-141.00045,61.903911],[-141.00045,60.392275],[-141.78913,60.518245],[-143.169319,60.518245],[-143.886798,59.997935],[-144.231845,60.140336],[-146.110436,60.468952],[-146.044712,60.742799],[-146.669084,60.693507],[-146.745761,60.9564],[-148.366935,60.764707],[-147.961642,60.140336],[-148.586013,59.959597],[-148.744844,60.731845],[-148.470997,60.852338],[-148.460043,61.427417],[-146.942931,61.476709],[-146.981269,62.248958],[-146.428098,62.248958],[-146.482868,63.174561],[-145.360095,63.223853]]]},"id":"02261"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-153.000427,62.292773],[-153.000427,61.427417],[-153.427628,61.427417],[-153.438582,60.907107],[-155.963451,60.907107],[-158.942907,60.901631],[-159.364631,60.644214],[-160.021864,59.784335],[-160.821498,59.264025],[-161.035098,58.842301],[-161.095345,58.820393],[-161.347284,58.732762],[-161.752577,58.552023],[-162.048332,59.253071],[-161.703285,59.48858],[-162.234548,60.091043],[-163.171105,59.844581],[-164.113139,59.839104],[-164.189816,60.02532],[-165.361881,60.507291],[-165.159234,60.918061],[-164.156954,61.022123],[-163.992646,61.372647],[-162.508395,61.558863],[-161.900455,61.482186],[-160.40525,61.810803],[-160.536697,61.947726],[-159.266046,61.947726],[-158.532136,62.117511],[-157.064316,62.02988],[-153.734337,62.02988],[-153.000427,62.292773]]]},"id":"02050"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-149.259676,61.482186],[-148.460043,61.427417],[-148.470997,60.852338],[-148.744844,60.731845],[-149.730693,60.994739],[-149.73617,60.994739],[-149.988109,61.230247],[-149.259676,61.482186]]]},"id":"02020"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-153.427628,61.427417],[-153.000427,61.427417],[-151.335437,61.42194],[-150.973959,61.191908],[-152.080301,60.693507],[-152.567748,60.069136],[-153.214027,59.636457],[-153.608367,59.620026],[-154.260123,59.143533],[-153.312612,58.847778],[-153.329043,58.853255],[-154.303938,58.645131],[-154.638032,58.645131],[-154.747571,59.253071],[-153.652183,59.784335],[-153.438582,60.907107],[-153.427628,61.427417]]]},"id":"02122"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-149.730693,60.994739],[-148.744844,60.731845],[-148.586013,59.959597],[-149.358261,60.101997],[-149.741647,59.729565],[-151.592853,59.159963],[-151.888608,59.422857],[-151.160175,59.592642],[-151.8667,59.778858],[-151.423068,60.211536],[-151.406637,60.720892],[-150.404357,61.038554],[-149.73617,60.994739],[-149.730693,60.994739]]]},"id":"02122"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-155.963451,60.907107],[-155.957974,59.674796],[-157.245055,59.247595],[-157.157424,58.858732],[-158.039212,58.634177],[-158.619768,58.913501],[-158.701922,58.480823],[-159.0634,58.420577],[-159.731586,58.929932],[-160.317619,59.072332],[-161.035098,58.842301],[-160.821498,59.264025],[-160.021864,59.784335],[-159.364631,60.644214],[-158.942907,60.901631],[-155.963451,60.907107]]]},"id":"02070"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-153.438582,60.907107],[-153.652183,59.784335],[-154.747571,59.253071],[-154.638032,58.645131],[-154.303938,58.645131],[-154.468247,58.36033],[-155.333603,58.190545],[-155.328126,57.878359],[-156.752131,57.16088],[-156.357791,57.16088],[-157.464133,56.62414],[-158.32949,56.48174],[-158.115889,56.2298],[-158.510229,55.977861],[-159.496078,55.857368],[-159.561801,55.632814],[-159.86851,55.89023],[-159.901372,56.492694],[-158.893615,56.793925],[-158.893615,56.804879],[-158.378782,57.264942],[-157.601057,57.609989],[-157.453179,58.508208],[-157.266963,58.612269],[-156.319453,58.612269],[-156.319453,58.89707],[-156.987639,58.886116],[-157.157424,58.858732],[-157.245055,59.247595],[-155.957974,59.674796],[-155.963451,60.907107],[-153.438582,60.907107]]]},"id":"02164"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-137.522593,58.908024],[-137.944318,58.803962],[-138.11958,59.02304],[-139.85577,59.537872],[-139.625738,59.88292],[-140.315833,59.696704],[-141.46599,59.970551],[-142.906426,60.091043],[-143.886798,59.997935],[-143.169319,60.518245],[-141.78913,60.518245],[-141.00045,60.392275],[-139.987216,60.184151],[-139.088998,60.359413],[-139.198537,60.091043],[-137.604747,59.242118],[-137.522593,58.908024]]]},"id":"02282"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-166.364161,60.359413],[-165.685021,60.277259],[-165.575482,59.904827],[-166.062929,59.745996],[-167.344534,60.074613],[-166.364161,60.359413]]]},"id":"02050"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-147.079854,60.200582],[-147.874011,59.784335],[-147.112716,60.381321],[-147.079854,60.200582]]]},"id":"02261"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-135.030585,59.346179],[-135.72068,59.729565],[-135.025108,59.565257],[-135.030585,59.346179]]]},"id":"02232"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-135.72068,59.729565],[-135.030585,59.346179],[-134.329537,58.962794],[-135.178463,58.973748],[-135.38111,59.033994],[-135.05797,58.190545],[-135.446833,58.398669],[-135.567326,58.946363],[-136.487451,59.258548],[-136.25742,59.625503],[-135.72068,59.729565]]]},"id":"02100"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-135.567326,58.946363],[-135.446833,58.398669],[-136.591513,58.21793],[-137.944318,58.803962],[-137.522593,58.908024],[-136.487451,59.258548],[-135.567326,58.946363]]]},"id":"02232"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-135.178463,58.973748],[-134.329537,58.962794],[-133.382026,58.426053],[-133.173903,58.152206],[-133.529904,57.911221],[-133.601104,57.861929],[-135.074401,58.502731],[-135.178463,58.973748]]]},"id":"02110"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-156.987639,58.886116],[-156.319453,58.89707],[-156.319453,58.612269],[-157.266963,58.612269],[-156.987639,58.886116]]]},"id":"02060"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-153.329043,58.853255],[-153.312612,58.847778],[-154.062953,58.4863],[-154.210831,58.135776],[-155.120003,57.955037],[-156.357791,57.16088],[-156.752131,57.16088],[-155.328126,57.878359],[-155.333603,58.190545],[-154.468247,58.36033],[-154.303938,58.645131],[-153.329043,58.853255]]]},"id":"02150"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-152.94018,58.026237],[-152.666333,58.562977],[-152.080301,58.152206],[-152.94018,58.026237]]]},"id":"02150"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-134.712923,58.223407],[-134.176183,58.157683],[-133.869474,57.363527],[-134.565045,57.023957],[-134.712923,58.223407]]]},"id":"02232"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-135.589233,57.89479],[-136.372436,57.829067],[-136.377913,58.267222],[-135.780926,58.28913],[-134.91557,57.976944],[-135.589233,57.89479]]]},"id":"02232"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-133.529904,57.911221],[-133.173903,58.152206],[-132.368792,57.347096],[-133.12461,57.188265],[-133.51895,57.177311],[-133.601104,57.861929],[-133.529904,57.911221]]]},"id":"02232"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-136.372436,57.829067],[-135.589233,57.89479],[-134.937477,57.763344],[-134.822462,57.500451],[-135.572802,57.675713],[-135.890465,57.407343],[-136.372436,57.829067]]]},"id":"02220"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-153.958891,57.538789],[-153.936983,57.812636],[-153.301658,57.993375],[-152.151501,57.620943],[-153.695998,56.859649],[-154.303938,56.848695],[-154.742094,57.314235],[-154.227261,57.659282],[-153.958891,57.538789]]]},"id":"02150"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-134.66363,56.28457],[-134.669107,56.169554],[-135.413971,56.810356],[-135.687818,57.369004],[-135.419448,57.566174],[-134.849846,57.407343],[-134.636246,56.28457],[-134.66363,56.28457]]]},"id":"02220"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-133.12461,57.188265],[-132.368792,57.347096],[-131.837529,56.602232],[-131.065281,56.405062],[-130.99408,56.262662],[-132.220915,55.736876],[-132.719317,56.218847],[-132.450946,56.673433],[-133.51895,57.177311],[-133.12461,57.188265]]]},"id":"02280"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-133.907813,56.930849],[-133.102702,57.007526],[-132.538577,56.585802],[-133.66135,56.448878],[-133.907813,56.930849]]]},"id":"02280"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-134.115936,56.48174],[-134.417168,56.848695],[-133.880428,56.722725],[-134.115936,56.48174]]]},"id":"02280"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-158.893615,56.793925],[-159.901372,56.492694],[-159.86851,55.89023],[-159.561801,55.632814],[-159.813741,55.857368],[-160.536697,55.473983],[-161.506115,55.364444],[-161.960701,55.107028],[-163.034181,54.942719],[-163.587352,54.614103],[-164.847049,54.416933],[-164.551294,54.88795],[-162.880827,55.183705],[-161.807347,55.89023],[-160.585989,55.988815],[-159.813741,56.547463],[-158.893615,56.804879],[-158.893615,56.793925]]]},"id":"02013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-130.99408,56.262662],[-131.065281,56.405062],[-130.101339,56.114785],[-129.980846,55.28229],[-130.336847,54.920812],[-130.917403,54.789365],[-131.092665,55.189182],[-130.900972,55.698537],[-131.240543,55.977861],[-131.706083,55.89023],[-131.974453,55.49589],[-132.220915,55.736876],[-130.99408,56.262662]]]},"id":"02201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-133.595627,56.350293],[-133.162949,56.317431],[-131.97993,55.178228],[-132.029222,54.701734],[-132.544054,55.096074],[-132.867194,54.701734],[-133.157472,54.95915],[-133.102702,55.42469],[-133.694212,55.780691],[-133.32178,55.81903],[-133.595627,56.350293]]]},"id":"02201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-134.66363,56.28457],[-134.636246,56.28457],[-134.669107,56.169554],[-134.66363,56.28457]]]},"id":"02280"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-131.706083,55.89023],[-131.240543,55.977861],[-131.032419,55.28229],[-131.843006,55.457552],[-131.706083,55.89023]]]},"id":"02130"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-166.375115,54.01164],[-166.117699,53.852808],[-166.878994,53.431084],[-167.032348,53.945916],[-166.375115,54.01164]]]},"id":"02016"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-168.790446,53.157237],[-168.007243,53.568007],[-167.842935,53.387268],[-168.971185,52.877913],[-168.790446,53.157237]]]},"id":"02016"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.430026,48.699007],[-94.430026,48.364914],[-95.344675,48.540176],[-95.322768,49.000239],[-94.824366,49.295994],[-94.430026,48.699007]]]},"id":"27077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.850787,49.000239],[-120.752202,48.655192],[-122.329561,48.644238],[-122.488392,48.644238],[-122.756762,49.000239],[-120.850787,49.000239]]]},"id":"53073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.070335,49.000239],[-113.347378,48.310145],[-113.018762,48.134883],[-112.9859,47.954144],[-113.144732,47.598142],[-113.467871,47.598142],[-113.632179,47.598142],[-114.010088,48.052728],[-114.601598,47.789835],[-115.012368,48.019867],[-114.727567,49.000239],[-114.070335,49.000239]]]},"id":"30029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.727567,49.000239],[-115.012368,48.019867],[-115.521724,47.910328],[-115.844863,48.21156],[-116.04751,48.217037],[-116.04751,48.501838],[-116.04751,49.000239],[-114.727567,49.000239]]]},"id":"30053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.04751,49.000239],[-116.04751,48.501838],[-116.786897,48.501838],[-116.836189,48.846885],[-117.033359,48.846885],[-117.033359,49.000239],[-116.04751,49.000239]]]},"id":"16021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.237393,49.000239],[-108.434563,47.976051],[-108.889149,47.735066],[-109.540905,47.740543],[-109.535428,48.134883],[-109.491612,49.000239],[-108.237393,49.000239]]]},"id":"30005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.427699,49.000239],[-117.438653,48.047251],[-117.537238,48.047251],[-117.822039,47.822697],[-118.342348,47.893897],[-118.139701,48.266329],[-118.194471,49.000239],[-117.427699,49.000239]]]},"id":"53065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.835273,49.000239],[-118.851704,47.95962],[-118.972196,47.94319],[-118.98315,47.95962],[-119.021489,48.069159],[-119.870414,47.95962],[-120.702909,48.529222],[-120.752202,48.655192],[-120.850787,49.000239],[-118.835273,49.000239]]]},"id":"53047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.228743,49.000239],[-97.16302,48.545653],[-97.16302,48.540176],[-97.929791,48.545653],[-97.951699,49.000239],[-97.228743,49.000239]]]},"id":"38067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.407202,49.000239],[-96.385294,48.545653],[-97.16302,48.545653],[-97.228743,49.000239],[-96.407202,49.000239]]]},"id":"27069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.491612,49.000239],[-109.535428,48.134883],[-110.389831,48.304668],[-110.756786,48.217037],[-110.745832,49.000239],[-109.491612,49.000239]]]},"id":"30041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.951699,49.000239],[-97.929791,48.545653],[-98.017422,48.545653],[-98.318654,48.545653],[-98.838963,48.545653],[-98.97041,48.545653],[-98.997795,49.000239],[-97.951699,49.000239]]]},"id":"38019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.194471,49.000239],[-118.139701,48.266329],[-118.342348,47.893897],[-118.851704,47.95962],[-118.835273,49.000239],[-118.194471,49.000239]]]},"id":"53019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.033359,49.000239],[-117.033359,48.846885],[-117.044313,48.047251],[-117.438653,48.047251],[-117.427699,49.000239],[-117.033359,49.000239]]]},"id":"53051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.180344,49.000239],[-107.415852,47.69125],[-107.908777,47.450265],[-108.105947,47.592665],[-108.31407,47.581712],[-108.889149,47.735066],[-108.434563,47.976051],[-108.237393,49.000239],[-107.180344,49.000239]]]},"id":"30071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.997795,49.000239],[-98.97041,48.545653],[-99.200441,48.370391],[-99.490719,48.370391],[-99.490719,48.545653],[-99.523581,49.000239],[-98.997795,49.000239]]]},"id":"38095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.322768,49.000239],[-95.344675,48.540176],[-95.602092,48.540176],[-96.259324,48.545653],[-96.385294,48.545653],[-96.407202,49.000239],[-95.322768,49.000239]]]},"id":"27135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.11234,49.000239],[-105.805632,48.562084],[-105.84397,48.008913],[-106.419049,47.95962],[-106.490249,47.95962],[-107.415852,47.69125],[-107.180344,49.000239],[-106.11234,49.000239]]]},"id":"30105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.047534,49.000239],[-104.047534,48.633284],[-104.047534,48.386822],[-104.973137,48.562084],[-105.055291,49.000239],[-104.047534,49.000239]]]},"id":"30091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.941192,49.000239],[-102.886422,48.633284],[-104.047534,48.633284],[-104.047534,49.000239],[-102.941192,49.000239]]]},"id":"38023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.055291,49.000239],[-104.973137,48.562084],[-105.756339,48.562084],[-105.805632,48.562084],[-106.11234,49.000239],[-105.055291,49.000239]]]},"id":"30019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.495279,49.000239],[-101.451464,48.545653],[-101.057124,48.545653],[-101.062601,48.458022],[-101.840327,48.458022],[-102.021066,48.808546],[-102.021066,49.000239],[-101.495279,49.000239]]]},"id":"38075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.180814,49.000239],[-100.147952,48.545653],[-100.279399,48.545653],[-100.668261,48.633284],[-101.057124,48.545653],[-101.451464,48.545653],[-101.495279,49.000239],[-100.180814,49.000239]]]},"id":"38009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.021066,49.000239],[-102.021066,48.808546],[-102.152512,48.808546],[-102.234666,48.545653],[-102.886422,48.545653],[-102.886422,48.633284],[-102.941192,49.000239],[-102.021066,49.000239]]]},"id":"38013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.523581,49.000239],[-99.490719,48.545653],[-99.616689,48.545653],[-100.147952,48.545653],[-100.180814,49.000239],[-99.523581,49.000239]]]},"id":"38079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.271618,48.994762],[-111.408542,48.217037],[-112.186267,48.47993],[-112.191744,49.000239],[-111.271618,48.994762]]]},"id":"30101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.191744,49.000239],[-112.186267,48.47993],[-112.57513,48.485407],[-113.347378,48.310145],[-114.070335,49.000239],[-112.191744,49.000239]]]},"id":"30035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.745832,49.000239],[-110.756786,48.217037],[-111.408542,48.129406],[-111.408542,48.217037],[-111.271618,48.994762],[-110.745832,49.000239]]]},"id":"30051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.836189,48.846885],[-116.786897,48.501838],[-116.04751,48.501838],[-116.04751,48.217037],[-116.04751,47.976051],[-116.310403,48.030821],[-116.321357,47.88842],[-116.567819,47.992482],[-117.044313,47.976051],[-117.044313,48.047251],[-117.033359,48.846885],[-116.836189,48.846885]]]},"id":"16017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.152512,48.808546],[-102.021066,48.808546],[-101.840327,48.458022],[-101.062601,48.458022],[-100.969493,47.850082],[-101.873188,47.850082],[-101.971773,48.545653],[-102.234666,48.545653],[-102.152512,48.808546]]]},"id":"38101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.088176,48.627807],[-93.088176,48.55113],[-93.082699,47.893897],[-93.597531,47.899374],[-94.419073,47.844605],[-94.430026,48.364914],[-94.430026,48.699007],[-93.794701,48.518268],[-93.088176,48.627807]]]},"id":"27071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.329561,48.644238],[-120.752202,48.655192],[-120.702909,48.529222],[-121.004141,48.293714],[-121.836636,48.299191],[-122.378853,48.299191],[-122.488392,48.644238],[-122.329561,48.644238]]]},"id":"53057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.047534,48.633284],[-102.886422,48.633284],[-102.886422,48.545653],[-102.826176,48.123929],[-103.171223,48.134883],[-104.042057,47.997959],[-104.047534,48.386822],[-104.047534,48.633284]]]},"id":"38105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.668261,48.633284],[-100.279399,48.545653],[-100.197245,47.850082],[-100.520384,47.850082],[-100.586107,47.850082],[-100.969493,47.850082],[-101.062601,48.458022],[-101.057124,48.545653],[-100.668261,48.633284]]]},"id":"38049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.088176,48.55113],[-93.088176,48.627807],[-92.370697,48.222514],[-91.795618,48.200606],[-91.801095,47.866512],[-91.795618,46.94091],[-92.014696,46.705401],[-92.29402,46.661586],[-92.49119,46.765647],[-93.060791,46.765647],[-93.055314,47.028541],[-93.082699,47.893897],[-93.088176,48.55113]]]},"id":"27137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.756339,48.562084],[-104.973137,48.562084],[-104.047534,48.386822],[-104.042057,47.997959],[-104.567843,48.118452],[-105.192214,48.063682],[-105.84397,48.008913],[-105.805632,48.562084],[-105.756339,48.562084]]]},"id":"30085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.702909,48.529222],[-119.870414,47.95962],[-120.319524,47.455742],[-120.094969,47.264049],[-121.11368,47.598142],[-121.119157,47.778881],[-121.004141,48.293714],[-120.702909,48.529222]]]},"id":"53007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.886422,48.545653],[-102.234666,48.545653],[-101.971773,48.545653],[-101.873188,47.850082],[-102.388021,47.756974],[-102.63996,47.822697],[-102.826176,48.123929],[-102.886422,48.545653]]]},"id":"38061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.616689,48.545653],[-99.490719,48.545653],[-99.490719,48.370391],[-99.819336,48.370391],[-99.813859,47.850082],[-100.000075,47.850082],[-100.071275,47.844605],[-100.197245,47.850082],[-100.279399,48.545653],[-100.147952,48.545653],[-99.616689,48.545653]]]},"id":"38069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.259324,48.545653],[-95.602092,48.540176],[-95.591138,48.173221],[-96.50031,48.173221],[-97.020619,48.173221],[-97.146589,48.173221],[-97.141112,48.195129],[-97.16302,48.540176],[-97.16302,48.545653],[-96.385294,48.545653],[-96.259324,48.545653]]]},"id":"27089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.838963,48.545653],[-98.318654,48.545653],[-98.291269,48.195129],[-98.526778,47.915805],[-98.992318,47.992482],[-99.200441,48.370391],[-98.97041,48.545653],[-98.838963,48.545653]]]},"id":"38071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.017422,48.545653],[-97.929791,48.545653],[-97.16302,48.540176],[-97.141112,48.195129],[-97.825729,48.195129],[-97.902407,48.195129],[-97.91336,48.195129],[-98.291269,48.195129],[-98.318654,48.545653],[-98.017422,48.545653]]]},"id":"38099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.344675,48.540176],[-94.430026,48.364914],[-94.419073,47.844605],[-94.413596,47.444788],[-94.671012,47.411926],[-95.185844,47.411926],[-95.22966,48.019867],[-95.580184,48.019867],[-95.591138,48.173221],[-95.602092,48.540176],[-95.344675,48.540176]]]},"id":"27007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.57513,48.485407],[-112.186267,48.47993],[-111.408542,48.217037],[-111.408542,48.129406],[-111.408542,47.987005],[-112.898269,48.134883],[-113.018762,48.134883],[-113.347378,48.310145],[-112.57513,48.485407]]]},"id":"30073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.926547,48.063682],[-122.948455,47.866512],[-124.613445,47.882943],[-124.597014,48.381345],[-123.983597,48.162267],[-122.926547,48.063682]]]},"id":"53009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.819336,48.370391],[-99.490719,48.370391],[-99.200441,48.370391],[-98.992318,47.992482],[-98.526778,47.915805],[-98.526778,47.844605],[-98.636317,47.850082],[-99.299026,47.844605],[-99.813859,47.850082],[-99.819336,48.370391]]]},"id":"38005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.389831,48.304668],[-109.535428,48.134883],[-109.540905,47.740543],[-110.214569,47.417403],[-110.504846,47.417403],[-110.64177,47.417403],[-111.408542,47.696727],[-111.408542,47.987005],[-111.408542,48.129406],[-110.756786,48.217037],[-110.389831,48.304668]]]},"id":"30015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.836636,48.299191],[-121.004141,48.293714],[-121.119157,47.778881],[-121.234173,47.778881],[-122.395284,47.778881],[-122.395284,48.227991],[-122.406238,48.249898],[-122.378853,48.299191],[-121.836636,48.299191]]]},"id":"53061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.844863,48.21156],[-115.521724,47.910328],[-115.012368,48.019867],[-114.601598,47.789835],[-114.18535,47.138079],[-114.798768,47.269526],[-115.499816,47.488604],[-115.658647,47.466696],[-116.04751,47.976051],[-116.04751,48.217037],[-115.844863,48.21156]]]},"id":"30089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.023369,47.466696],[-91.034323,48.189652],[-89.582934,47.997959],[-91.023369,47.466696]]]},"id":"27031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.801095,47.866512],[-91.795618,48.200606],[-91.034323,48.189652],[-91.023369,47.466696],[-91.795618,46.94091],[-91.801095,47.866512]]]},"id":"27075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.91336,48.195129],[-97.902407,48.195129],[-97.880499,47.67482],[-97.979084,47.67482],[-97.984561,47.67482],[-98.11053,47.67482],[-98.499393,47.67482],[-98.526778,47.844605],[-98.526778,47.915805],[-98.291269,48.195129],[-97.91336,48.195129]]]},"id":"38063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.825729,48.195129],[-97.141112,48.195129],[-97.146589,48.173221],[-96.889173,47.67482],[-97.475205,47.669343],[-97.880499,47.67482],[-97.902407,48.195129],[-97.825729,48.195129]]]},"id":"38035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.50031,48.173221],[-95.591138,48.173221],[-95.580184,48.019867],[-95.580184,47.932236],[-95.71163,47.937713],[-95.8376,47.965097],[-96.483879,47.965097],[-96.50031,48.173221]]]},"id":"27113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.020619,48.173221],[-96.50031,48.173221],[-96.483879,47.965097],[-96.352432,47.762451],[-95.71163,47.937713],[-95.580184,47.932236],[-95.552799,47.499557],[-96.067632,47.499557],[-96.23194,47.499557],[-96.850834,47.499557],[-96.889173,47.67482],[-97.146589,48.173221],[-97.020619,48.173221]]]},"id":"27119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.021489,48.069159],[-118.98315,47.95962],[-119.213182,47.861036],[-120.007338,47.220233],[-120.094969,47.264049],[-120.319524,47.455742],[-119.870414,47.95962],[-119.021489,48.069159]]]},"id":"53017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.567843,48.118452],[-104.042057,47.997959],[-104.047534,47.395496],[-104.419966,47.357157],[-105.022429,47.702204],[-105.23603,47.789835],[-105.192214,48.063682],[-104.567843,48.118452]]]},"id":"30083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.171223,48.134883],[-102.826176,48.123929],[-102.63996,47.822697],[-103.100023,47.67482],[-103.100023,47.329772],[-103.664148,47.329772],[-103.992764,47.329772],[-104.047534,47.329772],[-104.047534,47.395496],[-104.042057,47.997959],[-103.171223,48.134883]]]},"id":"38053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.751285,47.740543],[-122.948455,47.603619],[-123.507103,47.515988],[-124.323167,47.532419],[-124.356029,47.532419],[-124.613445,47.882943],[-122.948455,47.866512],[-122.926547,48.063682],[-122.751285,47.740543]]]},"id":"53031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.898269,48.134883],[-111.408542,47.987005],[-111.408542,47.696727],[-111.419495,47.696727],[-112.049344,47.515988],[-112.816115,47.609096],[-112.9859,47.954144],[-113.018762,48.134883],[-112.898269,48.134883]]]},"id":"30099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.192214,48.063682],[-105.23603,47.789835],[-105.405815,47.181895],[-105.789201,47.181895],[-106.084956,47.181895],[-106.419049,47.95962],[-105.84397,48.008913],[-105.192214,48.063682]]]},"id":"30055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.310403,48.030821],[-116.04751,47.976051],[-115.658647,47.466696],[-114.963076,46.935433],[-116.332311,46.935433],[-116.332311,47.023064],[-116.326834,47.411926],[-116.321357,47.88842],[-116.310403,48.030821]]]},"id":"16079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.010088,48.052728],[-113.632179,47.598142],[-113.91698,47.499557],[-114.18535,47.138079],[-114.601598,47.789835],[-114.010088,48.052728]]]},"id":"30047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.537238,48.047251],[-117.438653,48.047251],[-117.044313,48.047251],[-117.044313,47.976051],[-117.038836,47.368111],[-117.038836,47.258572],[-117.822039,47.258572],[-117.822039,47.822697],[-117.537238,48.047251]]]},"id":"53063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.580184,48.019867],[-95.22966,48.019867],[-95.185844,47.411926],[-95.169413,47.15451],[-95.552799,47.149033],[-95.552799,47.499557],[-95.580184,47.932236],[-95.580184,48.019867]]]},"id":"27029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.567819,47.992482],[-116.321357,47.88842],[-116.326834,47.411926],[-117.038836,47.368111],[-117.044313,47.976051],[-116.567819,47.992482]]]},"id":"16055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.490249,47.95962],[-106.419049,47.95962],[-106.084956,47.181895],[-106.084956,46.858755],[-106.084956,46.847802],[-107.459668,46.858755],[-107.892346,46.853278],[-107.908777,47.450265],[-107.415852,47.69125],[-106.490249,47.95962]]]},"id":"30033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.8376,47.965097],[-95.71163,47.937713],[-96.352432,47.762451],[-96.483879,47.965097],[-95.8376,47.965097]]]},"id":"27125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.213182,47.861036],[-118.98315,47.95962],[-118.972196,47.94319],[-118.977673,47.264049],[-119.372013,46.738263],[-119.454167,46.678016],[-119.875891,46.628724],[-119.875891,46.628724],[-119.974476,46.738263],[-120.007338,47.220233],[-119.213182,47.861036]]]},"id":"53025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.972196,47.94319],[-118.851704,47.95962],[-118.342348,47.893897],[-117.822039,47.822697],[-117.822039,47.258572],[-117.958962,47.258572],[-118.950288,47.264049],[-118.977673,47.264049],[-118.972196,47.94319]]]},"id":"53043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.9859,47.954144],[-112.816115,47.609096],[-112.049344,47.515988],[-111.660481,46.913525],[-111.496173,46.760171],[-111.638573,46.716355],[-111.78645,46.568478],[-111.967189,46.568478],[-112.312237,46.4206],[-112.794207,46.831371],[-113.144732,47.598142],[-112.9859,47.954144]]]},"id":"30049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.482915,47.510511],[-122.537684,47.400973],[-122.800578,47.406449],[-122.948455,47.603619],[-122.751285,47.740543],[-122.482915,47.510511]]]},"id":"53035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.597531,47.899374],[-93.082699,47.893897],[-93.055314,47.028541],[-93.712547,47.028541],[-93.772794,47.028541],[-94.052118,47.428357],[-94.413596,47.444788],[-94.419073,47.844605],[-93.597531,47.899374]]]},"id":"27061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.969493,47.850082],[-100.586107,47.850082],[-100.673738,47.329772],[-100.964016,47.15451],[-101.254294,47.264049],[-101.429556,47.559804],[-102.081312,47.576235],[-102.207282,47.576235],[-102.388021,47.756974],[-101.873188,47.850082],[-100.969493,47.850082]]]},"id":"38055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.000075,47.850082],[-99.813859,47.850082],[-99.299026,47.844605],[-99.266165,47.587189],[-99.266165,47.329772],[-99.479765,47.329772],[-99.863151,47.329772],[-100.032936,47.329772],[-100.071275,47.844605],[-100.000075,47.850082]]]},"id":"38103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.520384,47.850082],[-100.197245,47.850082],[-100.071275,47.844605],[-100.032936,47.329772],[-100.115091,47.329772],[-100.608015,47.329772],[-100.673738,47.329772],[-100.586107,47.850082],[-100.520384,47.850082]]]},"id":"38083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.636317,47.850082],[-98.526778,47.844605],[-98.499393,47.67482],[-98.499393,47.587189],[-99.200441,47.587189],[-99.266165,47.587189],[-99.299026,47.844605],[-98.636317,47.850082]]]},"id":"38027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.63996,47.822697],[-102.388021,47.756974],[-102.207282,47.576235],[-102.147035,47.01211],[-103.0343,46.979248],[-103.100023,47.329772],[-103.100023,47.67482],[-102.63996,47.822697]]]},"id":"38025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.214569,47.417403],[-109.540905,47.740543],[-108.889149,47.735066],[-108.31407,47.581712],[-108.719364,47.269526],[-108.631733,46.749217],[-109.009642,46.749217],[-109.387551,46.694447],[-109.743552,46.694447],[-109.754506,47.187372],[-110.214569,47.417403]]]},"id":"30027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.022429,47.702204],[-104.419966,47.357157],[-104.606182,46.858755],[-105.405815,47.181895],[-105.23603,47.789835],[-105.022429,47.702204]]]},"id":"30021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.234173,47.778881],[-121.119157,47.778881],[-121.11368,47.598142],[-121.11368,47.598142],[-121.38205,47.088787],[-122.417192,47.318818],[-122.395284,47.778881],[-121.234173,47.778881]]]},"id":"53033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.419495,47.696727],[-111.408542,47.696727],[-110.64177,47.417403],[-110.652724,46.825894],[-111.079925,47.088787],[-111.660481,46.913525],[-112.049344,47.515988],[-111.419495,47.696727]]]},"id":"30013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.11053,47.67482],[-97.984561,47.67482],[-97.962653,47.242141],[-98.088623,47.242141],[-98.466531,47.242141],[-98.499393,47.324295],[-98.499393,47.587189],[-98.499393,47.67482],[-98.11053,47.67482]]]},"id":"38039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.979084,47.67482],[-97.880499,47.67482],[-97.475205,47.669343],[-97.453297,47.236664],[-97.705237,47.242141],[-97.962653,47.242141],[-97.984561,47.67482],[-97.979084,47.67482]]]},"id":"38091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.475205,47.669343],[-96.889173,47.67482],[-96.850834,47.499557],[-96.834403,47.236664],[-97.453297,47.236664],[-97.475205,47.669343]]]},"id":"38097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.507103,47.515988],[-122.948455,47.603619],[-122.800578,47.406449],[-122.822485,47.192849],[-122.904639,47.15451],[-123.200394,47.08331],[-123.507103,47.515988]]]},"id":"53045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.91698,47.499557],[-113.632179,47.598142],[-113.467871,47.598142],[-113.303563,46.831371],[-113.829349,46.661586],[-113.851257,46.661586],[-114.333228,46.661586],[-114.596121,46.634201],[-114.672798,46.738263],[-114.798768,47.269526],[-114.18535,47.138079],[-113.91698,47.499557]]]},"id":"30063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.467871,47.598142],[-113.144732,47.598142],[-112.794207,46.831371],[-112.312237,46.4206],[-112.558699,46.267246],[-112.887315,46.267246],[-113.035193,46.267246],[-113.303563,46.831371],[-113.467871,47.598142]]]},"id":"30077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.105947,47.592665],[-107.908777,47.450265],[-107.892346,46.853278],[-107.826623,46.754694],[-107.837576,46.754694],[-108.631733,46.749217],[-108.719364,47.269526],[-108.31407,47.581712],[-108.105947,47.592665]]]},"id":"30069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.11368,47.598142],[-121.11368,47.598142],[-120.094969,47.264049],[-120.007338,47.220233],[-119.974476,46.738263],[-120.511216,46.738263],[-121.38205,47.088787],[-121.11368,47.598142]]]},"id":"53037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.200441,47.587189],[-98.499393,47.587189],[-98.499393,47.324295],[-99.266165,47.329772],[-99.266165,47.587189],[-99.200441,47.587189]]]},"id":"38031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.081312,47.576235],[-101.429556,47.559804],[-101.254294,47.264049],[-101.76365,46.979248],[-102.097743,46.979248],[-102.147035,47.01211],[-102.207282,47.576235],[-102.081312,47.576235]]]},"id":"38057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.323167,47.532419],[-123.507103,47.515988],[-123.200394,47.08331],[-123.162056,46.793032],[-123.183963,46.793032],[-123.370179,46.793032],[-124.098612,46.793032],[-124.356029,47.532419],[-124.323167,47.532419]]]},"id":"53027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.537684,47.357157],[-122.537684,47.400973],[-122.482915,47.510511],[-122.537684,47.357157]]]},"id":"53033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.552799,47.149033],[-96.067632,47.149033],[-96.067632,47.499557],[-95.552799,47.499557],[-95.552799,47.149033]]]},"id":"27087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.23194,47.499557],[-96.067632,47.499557],[-96.067632,47.149033],[-96.193601,47.149033],[-96.582464,47.149033],[-96.828926,47.149033],[-96.834403,47.236664],[-96.850834,47.499557],[-96.23194,47.499557]]]},"id":"27107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.499816,47.488604],[-114.798768,47.269526],[-114.672798,46.738263],[-114.963076,46.935433],[-115.658647,47.466696],[-115.499816,47.488604]]]},"id":"30061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.052118,47.428357],[-93.772794,47.028541],[-93.778271,46.803986],[-94.282149,46.803986],[-94.342395,46.2782],[-94.654581,46.3494],[-94.731258,46.371308],[-94.786028,46.803986],[-94.671012,47.411926],[-94.413596,47.444788],[-94.052118,47.428357]]]},"id":"27021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.23013,47.198326],[-88.383484,47.285957],[-88.514931,47.285957],[-88.23013,47.198326]]]},"id":"26083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.806619,45.681213],[-68.047605,45.637398],[-68.43099,45.577151],[-68.513145,46.382262],[-68.819853,46.393216],[-68.819853,46.573955],[-69.723548,46.573955],[-70.02478,46.573955],[-69.225147,47.461219],[-68.902007,47.176418],[-68.233821,47.357157],[-67.790188,47.066879],[-67.806619,45.681213]]]},"id":"23003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.504846,47.417403],[-110.214569,47.417403],[-109.754506,47.187372],[-109.743552,46.694447],[-110.148845,46.716355],[-110.274815,46.710878],[-110.652724,46.825894],[-110.64177,47.417403],[-110.504846,47.417403]]]},"id":"30045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.326834,47.411926],[-116.332311,47.023064],[-117.000498,47.132602],[-117.038836,47.127126],[-117.038836,47.258572],[-117.038836,47.368111],[-116.326834,47.411926]]]},"id":"16009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.185844,47.411926],[-94.671012,47.411926],[-94.786028,46.803986],[-95.037967,46.803986],[-95.163936,46.803986],[-95.169413,47.15451],[-95.185844,47.411926]]]},"id":"27057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.800578,47.406449],[-122.537684,47.400973],[-122.537684,47.357157],[-122.417192,47.318818],[-121.38205,47.088787],[-121.45325,46.782078],[-122.203591,46.760171],[-122.822485,47.192849],[-122.800578,47.406449]]]},"id":"53053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.047534,47.395496],[-104.047534,47.329772],[-104.047534,46.639678],[-104.606182,46.683493],[-104.606182,46.858755],[-104.419966,47.357157],[-104.047534,47.395496]]]},"id":"30109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.992764,47.329772],[-103.664148,47.329772],[-103.609378,46.628724],[-104.047534,46.541093],[-104.047534,46.639678],[-104.047534,47.329772],[-103.992764,47.329772]]]},"id":"38033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.664148,47.329772],[-103.100023,47.329772],[-103.0343,46.979248],[-103.23147,46.628724],[-103.609378,46.628724],[-103.664148,47.329772]]]},"id":"38007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.608015,47.329772],[-100.115091,47.329772],[-100.082229,46.634201],[-100.586107,46.634201],[-100.662785,46.634201],[-100.936632,46.984725],[-100.964016,47.15451],[-100.673738,47.329772],[-100.608015,47.329772]]]},"id":"38015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.863151,47.329772],[-99.479765,47.329772],[-99.452381,46.634201],[-99.917921,46.634201],[-100.082229,46.634201],[-100.115091,47.329772],[-100.032936,47.329772],[-99.863151,47.329772]]]},"id":"38043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.479765,47.329772],[-99.266165,47.329772],[-98.499393,47.324295],[-98.466531,47.242141],[-98.439147,46.628724],[-99.036133,46.628724],[-99.452381,46.634201],[-99.479765,47.329772]]]},"id":"38093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.254294,47.264049],[-100.964016,47.15451],[-100.936632,46.984725],[-101.76365,46.979248],[-101.254294,47.264049]]]},"id":"38065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.383484,47.285957],[-88.23013,47.198326],[-88.449208,46.94091],[-88.679239,46.4206],[-88.712101,46.4206],[-88.991425,46.4206],[-88.931178,47.034018],[-88.514931,47.285957],[-88.383484,47.285957]]]},"id":"26061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.950288,47.264049],[-117.958962,47.258572],[-118.210901,46.738263],[-119.213182,46.738263],[-119.372013,46.738263],[-118.977673,47.264049],[-118.950288,47.264049]]]},"id":"53001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.822039,47.258572],[-117.038836,47.258572],[-117.038836,47.127126],[-117.038836,46.541093],[-117.038836,46.426077],[-117.230529,46.464416],[-117.849423,46.623247],[-118.216378,46.590385],[-118.210901,46.738263],[-117.958962,47.258572],[-117.822039,47.258572]]]},"id":"53075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.088623,47.242141],[-97.962653,47.242141],[-97.705237,47.242141],[-97.683329,46.628724],[-97.957176,46.628724],[-98.033853,46.628724],[-98.439147,46.628724],[-98.466531,47.242141],[-98.088623,47.242141]]]},"id":"38003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.453297,47.236664],[-96.834403,47.236664],[-96.828926,47.149033],[-96.790588,46.628724],[-97.278035,46.628724],[-97.683329,46.628724],[-97.705237,47.242141],[-97.453297,47.236664]]]},"id":"38017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.904639,47.15451],[-122.822485,47.192849],[-122.203591,46.760171],[-123.162056,46.793032],[-123.200394,47.08331],[-122.904639,47.15451]]]},"id":"53067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.789201,47.181895],[-105.405815,47.181895],[-104.606182,46.858755],[-104.606182,46.683493],[-104.732151,46.612293],[-105.44963,46.568478],[-106.084956,46.858755],[-106.084956,47.181895],[-105.789201,47.181895]]]},"id":"30079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.169413,47.15451],[-95.163936,46.803986],[-95.163936,46.716355],[-96.17717,46.716355],[-96.193601,47.149033],[-96.067632,47.149033],[-95.552799,47.149033],[-95.169413,47.15451]]]},"id":"27005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.582464,47.149033],[-96.193601,47.149033],[-96.17717,46.716355],[-96.281232,46.628724],[-96.790588,46.628724],[-96.790588,46.628724],[-96.828926,47.149033],[-96.582464,47.149033]]]},"id":"27027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.000498,47.132602],[-116.332311,47.023064],[-116.332311,46.935433],[-116.458281,46.628724],[-116.644497,46.61777],[-117.038836,46.541093],[-117.038836,47.127126],[-117.000498,47.132602]]]},"id":"16057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.38205,47.088787],[-120.511216,46.738263],[-119.974476,46.738263],[-119.875891,46.628724],[-119.864937,46.042691],[-119.990907,46.042691],[-121.52445,46.042691],[-121.52445,46.387739],[-121.45325,46.782078],[-121.38205,47.088787]]]},"id":"53077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.079925,47.088787],[-110.652724,46.825894],[-110.274815,46.710878],[-110.280292,46.217953],[-110.280292,46.185092],[-110.78417,46.190569],[-111.063494,46.190569],[-111.496173,46.760171],[-111.660481,46.913525],[-111.079925,47.088787]]]},"id":"30059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.931178,47.034018],[-88.991425,46.4206],[-88.991425,46.332969],[-89.741765,46.502754],[-89.889643,46.765647],[-88.931178,47.034018]]]},"id":"26131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.712547,47.028541],[-93.055314,47.028541],[-93.060791,46.765647],[-93.055314,46.4206],[-93.055314,46.157707],[-93.307254,46.157707],[-93.433223,46.15223],[-93.553716,46.245338],[-93.794701,46.245338],[-93.778271,46.803986],[-93.772794,47.028541],[-93.712547,47.028541]]]},"id":"27001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.147035,47.01211],[-102.097743,46.979248],[-102.097743,46.716355],[-102.097743,46.628724],[-102.17442,46.628724],[-102.930238,46.628724],[-103.23147,46.628724],[-103.0343,46.979248],[-102.147035,47.01211]]]},"id":"38089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.936632,46.984725],[-100.662785,46.634201],[-100.591584,46.426077],[-101.024263,46.283677],[-101.29811,46.628724],[-102.097743,46.716355],[-102.097743,46.979248],[-101.76365,46.979248],[-100.936632,46.984725]]]},"id":"38059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.043914,46.913525],[-88.115114,46.4206],[-88.679239,46.4206],[-88.449208,46.94091],[-88.043914,46.913525]]]},"id":"26013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.924785,46.584908],[-90.924785,46.15223],[-91.302693,46.157707],[-91.549156,46.157707],[-91.549156,46.754694],[-90.870015,46.962817],[-90.924785,46.584908]]]},"id":"55007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.963076,46.935433],[-114.672798,46.738263],[-114.596121,46.634201],[-116.168003,46.371308],[-116.31588,46.426077],[-116.37065,46.464416],[-116.458281,46.628724],[-116.332311,46.935433],[-114.963076,46.935433]]]},"id":"16035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.118311,46.497277],[-87.118311,46.157707],[-87.37025,45.987922],[-87.616713,45.987922],[-87.802929,46.245338],[-88.115114,46.245338],[-88.115114,46.4206],[-88.043914,46.913525],[-87.118311,46.497277]]]},"id":"26103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.084956,46.858755],[-105.44963,46.568478],[-104.732151,46.612293],[-104.885506,46.135799],[-104.98409,45.785275],[-106.128771,45.790752],[-106.194494,45.790752],[-106.084956,46.847802],[-106.084956,46.858755]]]},"id":"30017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.459668,46.858755],[-106.084956,46.847802],[-106.194494,45.790752],[-106.282125,45.177335],[-106.769573,45.177335],[-106.939358,45.867429],[-107.026989,46.393216],[-107.738991,46.480847],[-107.782807,46.497277],[-107.826623,46.754694],[-107.892346,46.853278],[-107.459668,46.858755]]]},"id":"30087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.303563,46.831371],[-113.035193,46.267246],[-113.517164,45.938629],[-113.801964,46.037214],[-113.829349,46.661586],[-113.303563,46.831371]]]},"id":"30039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.037967,46.803986],[-94.786028,46.803986],[-94.731258,46.371308],[-95.152983,46.371308],[-95.163936,46.716355],[-95.163936,46.803986],[-95.037967,46.803986]]]},"id":"27159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.282149,46.803986],[-93.778271,46.803986],[-93.794701,46.245338],[-93.811132,46.157707],[-94.342395,46.2782],[-94.282149,46.803986]]]},"id":"27035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.183963,46.793032],[-123.162056,46.793032],[-122.203591,46.760171],[-121.45325,46.782078],[-121.52445,46.387739],[-122.24193,46.387739],[-123.216825,46.387739],[-123.359225,46.382262],[-123.370179,46.793032],[-123.183963,46.793032]]]},"id":"53041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.098612,46.793032],[-123.370179,46.793032],[-123.359225,46.382262],[-123.72618,46.289154],[-124.098612,46.793032]]]},"id":"53049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.638573,46.716355],[-111.496173,46.760171],[-111.063494,46.190569],[-111.660481,45.834568],[-111.78645,46.568478],[-111.638573,46.716355]]]},"id":"30007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.116948,45.976968],[-85.23972,46.245338],[-85.23972,46.754694],[-85.015166,46.480847],[-84.127902,46.530139],[-84.116948,45.976968]]]},"id":"26033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.49119,46.765647],[-92.29402,46.661586],[-92.29402,46.415123],[-92.962206,46.4206],[-93.055314,46.4206],[-93.060791,46.765647],[-92.49119,46.765647]]]},"id":"27017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.889643,46.765647],[-89.741765,46.502754],[-88.991425,46.332969],[-88.991425,46.097461],[-89.927981,46.300108],[-90.415429,46.568478],[-89.889643,46.765647]]]},"id":"26053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.549156,46.754694],[-91.549156,46.157707],[-92.020173,46.157707],[-92.047557,46.157707],[-92.29402,46.157707],[-92.29402,46.415123],[-92.29402,46.661586],[-92.014696,46.705401],[-91.549156,46.754694]]]},"id":"55031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.837576,46.754694],[-107.826623,46.754694],[-107.782807,46.497277],[-108.77961,46.130322],[-109.009642,46.749217],[-108.631733,46.749217],[-107.837576,46.754694]]]},"id":"30065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.23972,46.754694],[-85.23972,46.245338],[-85.36569,46.245338],[-85.864092,46.245338],[-85.864092,46.502754],[-85.864092,46.68897],[-85.23972,46.754694]]]},"id":"26095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.148845,46.716355],[-109.743552,46.694447],[-109.387551,46.694447],[-109.655921,46.217953],[-110.006445,46.217953],[-110.280292,46.217953],[-110.274815,46.710878],[-110.148845,46.716355]]]},"id":"30107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.387551,46.694447],[-109.009642,46.749217],[-108.77961,46.130322],[-108.922011,46.130322],[-109.17395,46.130322],[-109.414935,46.042691],[-109.655921,46.217953],[-109.387551,46.694447]]]},"id":"30037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.213182,46.738263],[-118.210901,46.738263],[-118.216378,46.590385],[-118.227332,46.595862],[-118.698349,46.371308],[-119.043396,46.190569],[-119.454167,46.678016],[-119.372013,46.738263],[-119.213182,46.738263]]]},"id":"53021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.875891,46.628724],[-119.454167,46.678016],[-119.043396,46.190569],[-118.988627,45.998876],[-119.432259,45.916722],[-119.870414,45.834568],[-119.864937,46.042691],[-119.875891,46.628724],[-119.875891,46.628724]]]},"id":"53005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.17717,46.716355],[-95.163936,46.716355],[-95.152983,46.371308],[-95.147506,46.108415],[-95.393968,46.108415],[-95.771877,46.108415],[-96.264801,46.108415],[-96.281232,46.628724],[-96.17717,46.716355]]]},"id":"27111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.097743,46.716355],[-101.29811,46.628724],[-101.024263,46.283677],[-101.999158,46.053645],[-101.999158,46.207],[-102.097743,46.628724],[-102.097743,46.716355]]]},"id":"38037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.849423,46.623247],[-117.230529,46.464416],[-117.482468,45.998876],[-117.602961,45.998876],[-117.849423,46.623247]]]},"id":"53023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.546876,46.584908],[-90.300413,45.982445],[-90.678322,45.982445],[-90.924785,46.15223],[-90.924785,46.584908],[-90.546876,46.584908]]]},"id":"55003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.864092,46.68897],[-85.864092,46.502754],[-86.001015,46.502754],[-86.614433,46.157707],[-87.118311,46.157707],[-87.118311,46.497277],[-86.696587,46.437031],[-85.864092,46.68897]]]},"id":"26003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.732151,46.612293],[-104.606182,46.683493],[-104.047534,46.639678],[-104.047534,46.541093],[-104.047534,46.2782],[-104.047534,45.944106],[-104.042057,45.88386],[-104.885506,46.135799],[-104.732151,46.612293]]]},"id":"30025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.333228,46.661586],[-114.557782,45.566198],[-114.694706,45.199243],[-115.828432,45.193766],[-116.146095,45.106135],[-116.688312,45.270443],[-116.463758,45.61549],[-116.792374,45.856475],[-116.699266,45.998876],[-116.168003,46.371308],[-114.596121,46.634201],[-114.333228,46.661586]]]},"id":"16049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.851257,46.661586],[-113.829349,46.661586],[-113.801964,46.037214],[-113.517164,45.938629],[-113.517164,45.938629],[-113.944365,45.68669],[-114.557782,45.566198],[-114.333228,46.661586],[-113.851257,46.661586]]]},"id":"30081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.586107,46.634201],[-100.082229,46.634201],[-99.917921,46.634201],[-99.879582,46.283677],[-99.879582,45.944106],[-100.432753,45.944106],[-100.498476,45.944106],[-100.50943,45.944106],[-100.591584,46.426077],[-100.662785,46.634201],[-100.586107,46.634201]]]},"id":"38029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.917921,46.634201],[-99.452381,46.634201],[-99.036133,46.628724],[-99.036133,46.283677],[-99.348319,46.283677],[-99.879582,46.283677],[-99.917921,46.634201]]]},"id":"38047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.790588,46.628724],[-96.790588,46.628724],[-96.576987,46.020784],[-96.560556,45.933153],[-96.735818,45.933153],[-97.228743,45.933153],[-97.278035,46.283677],[-97.278035,46.628724],[-96.790588,46.628724]]]},"id":"38077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.033853,46.628724],[-98.033853,46.283677],[-98.335085,46.283677],[-99.003272,46.283677],[-99.036133,46.283677],[-99.036133,46.628724],[-98.439147,46.628724],[-98.033853,46.628724]]]},"id":"38045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.17442,46.628724],[-102.097743,46.628724],[-101.999158,46.207],[-102.49756,46.283677],[-102.924761,46.283677],[-102.930238,46.628724],[-102.17442,46.628724]]]},"id":"38041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.281232,46.628724],[-96.264801,46.108415],[-96.264801,46.020784],[-96.390771,46.020784],[-96.576987,46.020784],[-96.790588,46.628724],[-96.281232,46.628724]]]},"id":"27167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.644497,46.61777],[-116.458281,46.628724],[-116.37065,46.464416],[-116.699266,45.998876],[-116.792374,45.856475],[-116.918344,45.993399],[-117.038836,46.426077],[-117.038836,46.541093],[-116.644497,46.61777]]]},"id":"16069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.957176,46.628724],[-97.683329,46.628724],[-97.278035,46.628724],[-97.278035,46.283677],[-98.006468,46.283677],[-98.033853,46.283677],[-98.033853,46.628724],[-97.957176,46.628724]]]},"id":"38073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.23147,46.628724],[-102.930238,46.628724],[-102.924761,46.283677],[-102.995961,46.2782],[-104.047534,46.2782],[-104.047534,46.541093],[-103.609378,46.628724],[-103.23147,46.628724]]]},"id":"38087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.227332,46.595862],[-118.216378,46.590385],[-117.849423,46.623247],[-117.602961,45.998876],[-117.975393,45.998876],[-117.997301,45.998876],[-118.227332,46.595862]]]},"id":"53013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.698349,46.371308],[-118.227332,46.595862],[-117.997301,45.998876],[-118.58881,45.998876],[-118.988627,45.998876],[-119.043396,46.190569],[-118.698349,46.371308]]]},"id":"53071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.415429,46.568478],[-89.927981,46.300108],[-90.042997,45.982445],[-90.300413,45.982445],[-90.546876,46.584908],[-90.415429,46.568478]]]},"id":"55051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-69.723548,46.573955],[-69.822133,45.74146],[-69.619487,45.013027],[-69.356593,45.073273],[-69.268962,44.722749],[-69.471609,44.695364],[-69.581148,44.706318],[-69.931672,44.61321],[-70.41912,45.144473],[-70.550566,45.670259],[-70.02478,46.573955],[-69.723548,46.573955]]]},"id":"23025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-68.819853,46.393216],[-68.776038,45.243058],[-69.356593,45.073273],[-69.619487,45.013027],[-69.822133,45.74146],[-69.723548,46.573955],[-68.819853,46.573955],[-68.819853,46.393216]]]},"id":"23021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.967189,46.568478],[-111.78645,46.568478],[-111.660481,45.834568],[-111.802881,45.796229],[-111.967189,45.850998],[-112.191744,45.746937],[-112.57513,46.179615],[-112.558699,46.267246],[-112.312237,46.4206],[-111.967189,46.568478]]]},"id":"30043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.001015,46.502754],[-85.864092,46.502754],[-85.864092,46.245338],[-85.864092,45.966014],[-86.461078,45.75789],[-86.614433,46.157707],[-86.001015,46.502754]]]},"id":"26153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.782807,46.497277],[-107.738991,46.480847],[-107.50896,46.042691],[-108.0457,45.900291],[-108.067608,45.516905],[-108.642687,45.462136],[-108.806995,45.626444],[-108.845333,45.610013],[-108.922011,46.130322],[-108.77961,46.130322],[-107.782807,46.497277]]]},"id":"30111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.738991,46.480847],[-107.026989,46.393216],[-106.939358,45.867429],[-107.426806,45.976968],[-107.50896,46.042691],[-107.738991,46.480847]]]},"id":"30103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.31588,46.426077],[-116.168003,46.371308],[-116.699266,45.998876],[-116.37065,46.464416],[-116.31588,46.426077]]]},"id":"16061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.038836,46.426077],[-116.918344,45.993399],[-117.482468,45.998876],[-117.230529,46.464416],[-117.038836,46.426077]]]},"id":"53003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.591584,46.426077],[-100.50943,45.944106],[-101.999158,45.944106],[-101.999158,46.053645],[-101.024263,46.283677],[-100.591584,46.426077]]]},"id":"38085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.712101,46.4206],[-88.679239,46.4206],[-88.115114,46.4206],[-88.115114,46.245338],[-88.115114,45.922199],[-88.493023,45.993399],[-88.684716,46.015307],[-88.931178,46.075553],[-88.991425,46.097461],[-88.991425,46.332969],[-88.991425,46.4206],[-88.712101,46.4206]]]},"id":"26071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.962206,46.4206],[-92.29402,46.415123],[-92.29402,46.157707],[-92.841714,45.730506],[-93.066268,45.730506],[-93.142945,45.730506],[-93.055314,46.157707],[-93.055314,46.4206],[-92.962206,46.4206]]]},"id":"27115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-68.513145,46.382262],[-68.43099,45.577151],[-68.047605,45.637398],[-68.058559,45.254012],[-68.814376,44.68441],[-69.268962,44.722749],[-69.356593,45.073273],[-68.776038,45.243058],[-68.819853,46.393216],[-68.513145,46.382262]]]},"id":"23019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.52445,46.387739],[-121.52445,46.042691],[-121.52445,45.725029],[-121.924267,45.648352],[-122.247407,45.549767],[-122.247407,46.053645],[-122.24193,46.387739],[-121.52445,46.387739]]]},"id":"53059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.216825,46.387739],[-122.24193,46.387739],[-122.247407,46.053645],[-122.433623,45.976968],[-122.784147,45.850998],[-123.211348,46.174138],[-123.216825,46.387739]]]},"id":"53015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.359225,46.382262],[-123.216825,46.387739],[-123.211348,46.174138],[-123.364702,46.146753],[-123.545441,46.261769],[-123.72618,46.289154],[-123.359225,46.382262]]]},"id":"53069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.152983,46.371308],[-94.731258,46.371308],[-94.654581,46.3494],[-94.643627,45.774321],[-95.142029,45.774321],[-95.147506,46.108415],[-95.152983,46.371308]]]},"id":"27153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.654581,46.3494],[-94.342395,46.2782],[-93.811132,46.157707],[-93.76184,45.823614],[-94.008302,45.823614],[-94.271195,45.774321],[-94.451934,45.774321],[-94.643627,45.774321],[-94.654581,46.3494]]]},"id":"27097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.927981,46.300108],[-88.991425,46.097461],[-88.931178,46.075553],[-89.046194,45.894814],[-89.298133,45.872906],[-90.042997,45.894814],[-90.042997,45.982445],[-89.927981,46.300108]]]},"id":"55125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.348319,46.283677],[-99.036133,46.283677],[-99.003272,46.283677],[-99.003272,45.938629],[-99.720751,45.938629],[-99.879582,45.944106],[-99.879582,46.283677],[-99.348319,46.283677]]]},"id":"38051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.335085,46.283677],[-98.033853,46.283677],[-98.006468,46.283677],[-98.006468,45.938629],[-98.723948,45.938629],[-99.003272,45.938629],[-99.003272,46.283677],[-98.335085,46.283677]]]},"id":"38021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.49756,46.283677],[-101.999158,46.207],[-101.999158,46.053645],[-101.999158,45.944106],[-101.999158,45.944106],[-102.623529,45.944106],[-102.941192,45.944106],[-102.995961,45.944106],[-102.995961,46.2782],[-102.924761,46.283677],[-102.49756,46.283677]]]},"id":"38001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.006468,46.283677],[-97.278035,46.283677],[-97.228743,45.933153],[-97.853114,45.933153],[-97.979084,45.938629],[-98.006468,45.938629],[-98.006468,46.283677]]]},"id":"38081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.995961,46.2782],[-102.995961,45.944106],[-104.047534,45.944106],[-104.047534,46.2782],[-102.995961,46.2782]]]},"id":"38011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.364702,46.146753],[-123.359225,45.779798],[-123.841196,45.785275],[-123.967166,45.785275],[-124.010981,46.22343],[-123.545441,46.261769],[-123.364702,46.146753]]]},"id":"41007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.887315,46.267246],[-112.558699,46.267246],[-112.57513,46.179615],[-113.084485,45.861952],[-113.517164,45.938629],[-113.517164,45.938629],[-113.035193,46.267246],[-112.887315,46.267246]]]},"id":"30023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.802929,46.245338],[-87.616713,45.987922],[-87.846744,45.725029],[-88.060345,45.779798],[-88.115114,45.922199],[-88.115114,46.245338],[-87.802929,46.245338]]]},"id":"26043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.553716,46.245338],[-93.433223,46.15223],[-93.515377,45.735983],[-93.5099,45.560721],[-93.652301,45.560721],[-93.76184,45.560721],[-93.76184,45.823614],[-93.811132,46.157707],[-93.794701,46.245338],[-93.553716,46.245338]]]},"id":"27095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.36569,46.245338],[-85.23972,46.245338],[-84.116948,45.976968],[-84.70298,45.850998],[-85.513567,46.097461],[-85.864092,45.966014],[-85.864092,46.245338],[-85.36569,46.245338]]]},"id":"26097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.006445,46.217953],[-109.655921,46.217953],[-109.414935,46.042691],[-109.562813,45.610013],[-110.061214,45.171858],[-110.230999,45.171858],[-110.280292,46.185092],[-110.280292,46.217953],[-110.006445,46.217953]]]},"id":"30097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.063494,46.190569],[-110.78417,46.190569],[-111.041587,45.002073],[-111.058017,44.667979],[-111.047063,44.476286],[-111.37568,44.750133],[-111.353772,45.642875],[-111.802881,45.796229],[-111.660481,45.834568],[-111.063494,46.190569]]]},"id":"30031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.78417,46.190569],[-110.280292,46.185092],[-110.230999,45.171858],[-110.061214,45.171858],[-109.798321,45.166381],[-109.798321,45.002073],[-111.041587,45.002073],[-110.78417,46.190569]]]},"id":"30067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.784147,45.850998],[-122.762239,45.730506],[-122.926547,45.725029],[-123.134671,45.779798],[-123.359225,45.779798],[-123.364702,46.146753],[-123.211348,46.174138],[-122.784147,45.850998]]]},"id":"41009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.57513,46.179615],[-112.191744,45.746937],[-112.684669,45.626444],[-113.084485,45.861952],[-112.57513,46.179615]]]},"id":"30093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.307254,46.157707],[-93.055314,46.157707],[-93.142945,45.730506],[-93.498947,45.735983],[-93.515377,45.735983],[-93.433223,46.15223],[-93.307254,46.157707]]]},"id":"27065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.118311,46.157707],[-86.614433,46.157707],[-86.461078,45.75789],[-86.784218,45.861952],[-87.266188,45.549767],[-87.37025,45.987922],[-87.118311,46.157707]]]},"id":"26041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.020173,46.157707],[-91.549156,46.157707],[-91.538202,45.637398],[-92.031127,45.637398],[-92.047557,46.157707],[-92.020173,46.157707]]]},"id":"55129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.302693,46.157707],[-90.924785,46.15223],[-90.678322,45.982445],[-90.678322,45.637398],[-91.538202,45.637398],[-91.549156,46.157707],[-91.302693,46.157707]]]},"id":"55113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.29402,46.157707],[-92.047557,46.157707],[-92.031127,45.637398],[-92.157096,45.637398],[-92.529528,45.730506],[-92.885529,45.642875],[-92.841714,45.730506],[-92.29402,46.157707]]]},"id":"55013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.885506,46.135799],[-104.042057,45.88386],[-104.042057,45.210196],[-104.058488,44.996596],[-105.03886,45.002073],[-104.98409,45.785275],[-104.885506,46.135799]]]},"id":"30011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.17395,46.130322],[-108.922011,46.130322],[-108.845333,45.610013],[-109.798321,45.166381],[-110.061214,45.171858],[-109.562813,45.610013],[-109.414935,46.042691],[-109.17395,46.130322]]]},"id":"30095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.264801,46.108415],[-95.771877,46.108415],[-95.760923,45.75789],[-96.253848,45.75789],[-96.264801,46.020784],[-96.264801,46.108415]]]},"id":"27051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.393968,46.108415],[-95.147506,46.108415],[-95.142029,45.774321],[-95.142029,45.75789],[-95.42683,45.75789],[-95.760923,45.75789],[-95.771877,46.108415],[-95.393968,46.108415]]]},"id":"27041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.931178,46.075553],[-88.684716,46.015307],[-88.4273,45.725029],[-88.4273,45.374505],[-88.679239,45.379982],[-89.046194,45.462136],[-89.046194,45.894814],[-88.931178,46.075553]]]},"id":"55041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.433623,45.976968],[-122.247407,46.053645],[-122.247407,45.549767],[-122.762239,45.730506],[-122.784147,45.850998],[-122.433623,45.976968]]]},"id":"53011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.990907,46.042691],[-119.864937,46.042691],[-119.870414,45.834568],[-120.001861,45.81266],[-120.653617,45.735983],[-120.834356,45.675736],[-120.91651,45.642875],[-121.442296,45.697644],[-121.52445,45.725029],[-121.52445,46.042691],[-119.990907,46.042691]]]},"id":"53039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.426806,45.976968],[-106.939358,45.867429],[-106.769573,45.177335],[-106.282125,45.177335],[-106.265695,44.991119],[-107.914254,45.002073],[-108.248347,45.002073],[-108.642687,45.462136],[-108.067608,45.516905],[-108.0457,45.900291],[-107.50896,46.042691],[-107.426806,45.976968]]]},"id":"30003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.390771,46.020784],[-96.264801,46.020784],[-96.253848,45.75789],[-96.253848,45.588105],[-96.828926,45.588105],[-96.834403,45.588105],[-96.560556,45.933153],[-96.576987,46.020784],[-96.390771,46.020784]]]},"id":"27155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.493023,45.993399],[-88.115114,45.922199],[-88.060345,45.779798],[-88.4273,45.725029],[-88.684716,46.015307],[-88.493023,45.993399]]]},"id":"55037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.58881,45.998876],[-117.997301,45.998876],[-117.975393,45.998876],[-117.975393,45.861952],[-118.117793,45.47309],[-118.698349,45.34712],[-118.51761,44.996596],[-118.676441,44.996596],[-119.163889,44.996596],[-119.147458,45.516905],[-119.432259,45.916722],[-118.988627,45.998876],[-118.58881,45.998876]]]},"id":"41059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.975393,45.998876],[-117.602961,45.998876],[-117.482468,45.998876],[-116.918344,45.993399],[-116.792374,45.856475],[-116.463758,45.61549],[-116.688312,45.270443],[-116.78142,45.07875],[-117.268868,45.07875],[-117.898716,45.861952],[-117.975393,45.861952],[-117.975393,45.998876]]]},"id":"41063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.616713,45.987922],[-87.37025,45.987922],[-87.266188,45.549767],[-87.589328,45.095181],[-87.846744,45.725029],[-87.616713,45.987922]]]},"id":"26109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.300413,45.982445],[-90.042997,45.982445],[-90.042997,45.894814],[-90.042997,45.555244],[-90.042997,45.379982],[-90.168967,45.379982],[-90.678322,45.379982],[-90.678322,45.637398],[-90.678322,45.982445],[-90.300413,45.982445]]]},"id":"55099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.623529,45.944106],[-101.999158,45.944106],[-101.999158,45.47309],[-101.999158,45.040411],[-102.042974,45.040411],[-102.957623,45.040411],[-102.957623,45.210196],[-102.941192,45.944106],[-102.623529,45.944106]]]},"id":"46105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.047534,45.944106],[-102.995961,45.944106],[-102.941192,45.944106],[-102.957623,45.210196],[-104.042057,45.210196],[-104.042057,45.88386],[-104.047534,45.944106]]]},"id":"46063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.999158,45.944106],[-100.50943,45.944106],[-100.498476,45.944106],[-100.432753,45.593582],[-100.339645,45.47309],[-100.772323,45.47309],[-101.467895,45.47309],[-101.714357,45.47309],[-101.999158,45.47309],[-101.999158,45.944106],[-101.999158,45.944106]]]},"id":"46031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.432753,45.944106],[-99.879582,45.944106],[-99.720751,45.938629],[-99.715274,45.593582],[-100.339645,45.593582],[-100.432753,45.593582],[-100.498476,45.944106],[-100.432753,45.944106]]]},"id":"46021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.517164,45.938629],[-113.084485,45.861952],[-112.684669,45.626444],[-112.169836,44.826811],[-111.479742,44.711795],[-111.616665,44.547487],[-112.816115,44.377701],[-113.456917,44.865149],[-113.944365,45.68669],[-113.517164,45.938629]]]},"id":"30001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.720751,45.938629],[-99.003272,45.938629],[-98.723948,45.938629],[-98.723948,45.593582],[-99.709797,45.593582],[-99.715274,45.593582],[-99.720751,45.938629]]]},"id":"46089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.723948,45.938629],[-98.006468,45.938629],[-97.979084,45.938629],[-97.979084,45.588105],[-97.979084,45.243058],[-98.532255,45.243058],[-98.718471,45.243058],[-98.723948,45.243058],[-98.723948,45.593582],[-98.723948,45.938629]]]},"id":"46013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.735818,45.933153],[-96.560556,45.933153],[-96.834403,45.588105],[-96.472925,45.325212],[-96.681049,45.325212],[-97.228743,45.297827],[-97.228743,45.560721],[-97.228743,45.933153],[-96.735818,45.933153]]]},"id":"46109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.853114,45.933153],[-97.228743,45.933153],[-97.228743,45.560721],[-97.979084,45.588105],[-97.979084,45.938629],[-97.853114,45.933153]]]},"id":"46091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.432259,45.916722],[-119.147458,45.516905],[-119.163889,44.996596],[-119.673245,44.996596],[-119.78826,45.067796],[-120.001861,45.81266],[-119.870414,45.834568],[-119.432259,45.916722]]]},"id":"41049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.298133,45.872906],[-89.046194,45.894814],[-89.046194,45.462136],[-89.237887,45.467613],[-89.424103,45.467613],[-90.042997,45.555244],[-90.042997,45.894814],[-89.298133,45.872906]]]},"id":"55085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.898716,45.861952],[-117.268868,45.07875],[-117.778223,44.991119],[-118.243763,44.958257],[-118.51761,44.996596],[-118.698349,45.34712],[-118.117793,45.47309],[-117.975393,45.861952],[-117.898716,45.861952]]]},"id":"41061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.967189,45.850998],[-111.802881,45.796229],[-111.353772,45.642875],[-111.37568,44.750133],[-111.479742,44.711795],[-112.169836,44.826811],[-112.684669,45.626444],[-112.191744,45.746937],[-111.967189,45.850998]]]},"id":"30057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.008302,45.823614],[-93.76184,45.823614],[-93.76184,45.560721],[-94.150702,45.560721],[-94.271195,45.774321],[-94.008302,45.823614]]]},"id":"27009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.653617,45.735983],[-120.001861,45.81266],[-119.78826,45.067796],[-119.870414,45.067796],[-120.494786,45.067796],[-120.505739,45.084227],[-120.653617,45.735983]]]},"id":"41021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.060345,45.779798],[-87.846744,45.725029],[-87.589328,45.095181],[-87.76459,44.963734],[-88.4273,45.374505],[-88.4273,45.725029],[-88.060345,45.779798]]]},"id":"55075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.730365,45.785275],[-84.730365,45.779798],[-84.730365,45.286874],[-85.09732,45.363551],[-85.09732,45.369028],[-84.730365,45.785275]]]},"id":"26047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.128771,45.790752],[-104.98409,45.785275],[-105.03886,45.002073],[-105.088152,45.002073],[-106.024709,44.991119],[-106.265695,44.991119],[-106.282125,45.177335],[-106.194494,45.790752],[-106.128771,45.790752]]]},"id":"30075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.730365,45.779798],[-84.730365,45.785275],[-84.204579,45.626444],[-84.248394,45.199243],[-84.368887,45.199243],[-84.735842,45.204719],[-84.730365,45.286874],[-84.730365,45.779798]]]},"id":"26031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.841196,45.785275],[-123.359225,45.779798],[-123.463287,45.434751],[-123.72618,45.07875],[-123.72618,45.045888],[-124.000027,45.045888],[-124.005504,45.045888],[-123.967166,45.785275],[-123.841196,45.785275]]]},"id":"41057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.134671,45.779798],[-122.926547,45.725029],[-122.745808,45.434751],[-122.866301,45.319735],[-123.063471,45.401889],[-123.463287,45.434751],[-123.359225,45.779798],[-123.134671,45.779798]]]},"id":"41067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.451934,45.774321],[-94.271195,45.774321],[-94.150702,45.560721],[-94.046641,45.423797],[-94.052118,45.423797],[-94.260241,45.281397],[-94.534088,45.325212],[-94.76412,45.325212],[-94.884612,45.412843],[-95.131075,45.412843],[-95.142029,45.75789],[-95.142029,45.774321],[-94.643627,45.774321],[-94.451934,45.774321]]]},"id":"27145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.253848,45.75789],[-95.760923,45.75789],[-95.749969,45.412843],[-95.974524,45.412843],[-96.116924,45.412843],[-96.253848,45.588105],[-96.253848,45.75789]]]},"id":"27149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.42683,45.75789],[-95.142029,45.75789],[-95.131075,45.412843],[-95.257044,45.412843],[-95.749969,45.412843],[-95.760923,45.75789],[-95.42683,45.75789]]]},"id":"27121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.834356,45.675736],[-120.653617,45.735983],[-120.505739,45.084227],[-121.026049,45.22115],[-120.91651,45.642875],[-120.834356,45.675736]]]},"id":"41055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.498947,45.735983],[-93.142945,45.730506],[-93.016976,45.412843],[-93.159376,45.412843],[-93.5099,45.412843],[-93.5099,45.560721],[-93.515377,45.735983],[-93.498947,45.735983]]]},"id":"27059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.066268,45.730506],[-92.841714,45.730506],[-92.885529,45.642875],[-92.743129,45.297827],[-93.016976,45.297827],[-93.016976,45.412843],[-93.142945,45.730506],[-93.066268,45.730506]]]},"id":"27025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.529528,45.730506],[-92.157096,45.637398],[-92.157096,45.210196],[-92.650021,45.210196],[-92.75956,45.210196],[-92.743129,45.297827],[-92.885529,45.642875],[-92.529528,45.730506]]]},"id":"55095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.926547,45.725029],[-122.762239,45.730506],[-122.247407,45.549767],[-121.924267,45.648352],[-121.820205,45.462136],[-122.356945,45.462136],[-122.745808,45.434751],[-122.926547,45.725029]]]},"id":"41051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.924267,45.648352],[-121.52445,45.725029],[-121.442296,45.697644],[-121.694236,45.259489],[-121.820205,45.462136],[-121.924267,45.648352]]]},"id":"41027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.442296,45.697644],[-120.91651,45.642875],[-121.026049,45.22115],[-120.505739,45.084227],[-120.494786,45.067796],[-120.374293,44.821334],[-120.998664,44.821334],[-121.759959,44.826811],[-121.732574,44.887057],[-121.694236,45.259489],[-121.442296,45.697644]]]},"id":"41065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.944365,45.68669],[-113.456917,44.865149],[-112.816115,44.377701],[-112.996854,44.235301],[-113.002331,44.235301],[-113.319994,44.235301],[-114.196304,44.859672],[-114.563259,44.574871],[-114.809722,44.81038],[-114.694706,45.199243],[-114.557782,45.566198],[-113.944365,45.68669]]]},"id":"16059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.954497,44.41604],[-68.058559,45.254012],[-68.047605,45.637398],[-67.806619,45.681213],[-66.979601,44.804903],[-67.954497,44.41604]]]},"id":"23029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.550566,45.670259],[-70.41912,45.144473],[-69.931672,44.61321],[-70.128842,44.48724],[-70.172658,44.481763],[-70.238381,44.459856],[-70.769644,44.733703],[-70.835367,45.27592],[-70.550566,45.670259]]]},"id":"23007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.157096,45.637398],[-92.031127,45.637398],[-91.538202,45.637398],[-91.543679,45.29235],[-91.664172,45.210196],[-92.157096,45.210196],[-92.157096,45.637398]]]},"id":"55005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.678322,45.637398],[-90.678322,45.379982],[-90.924785,45.29235],[-91.089093,45.29235],[-91.543679,45.29235],[-91.538202,45.637398],[-90.678322,45.637398]]]},"id":"55107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.806995,45.626444],[-108.642687,45.462136],[-108.248347,45.002073],[-108.620779,45.002073],[-109.798321,45.002073],[-109.798321,45.166381],[-108.845333,45.610013],[-108.806995,45.626444]]]},"id":"30009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.388515,45.204719],[-83.4871,45.204719],[-83.881439,45.204719],[-84.199102,45.199243],[-84.248394,45.199243],[-84.204579,45.626444],[-83.388515,45.204719]]]},"id":"26141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.339645,45.593582],[-99.715274,45.593582],[-99.709797,45.593582],[-99.709797,45.243058],[-100.257491,45.248535],[-100.339645,45.47309],[-100.432753,45.593582],[-100.339645,45.593582]]]},"id":"46129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.709797,45.593582],[-98.723948,45.593582],[-98.723948,45.243058],[-99.572873,45.243058],[-99.709797,45.243058],[-99.709797,45.593582]]]},"id":"46045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.979084,45.588105],[-97.228743,45.560721],[-97.228743,45.297827],[-97.228743,45.14995],[-97.23422,45.14995],[-97.491636,45.14995],[-97.924314,45.155427],[-97.979084,45.155427],[-97.979084,45.243058],[-97.979084,45.588105]]]},"id":"46037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.828926,45.588105],[-96.253848,45.588105],[-96.116924,45.412843],[-96.10597,45.177335],[-96.368863,45.259489],[-96.451017,45.270443],[-96.451017,45.297827],[-96.456494,45.303304],[-96.472925,45.325212],[-96.834403,45.588105],[-96.828926,45.588105]]]},"id":"27011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.652301,45.560721],[-93.5099,45.560721],[-93.5099,45.412843],[-93.5099,45.243058],[-93.520854,45.248535],[-94.046641,45.423797],[-94.150702,45.560721],[-93.76184,45.560721],[-93.652301,45.560721]]]},"id":"27141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.424103,45.467613],[-89.424103,45.117088],[-90.042997,45.122565],[-90.042997,45.379982],[-90.042997,45.555244],[-89.424103,45.467613]]]},"id":"55069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.772323,45.47309],[-100.339645,45.47309],[-100.257491,45.248535],[-100.405368,44.898011],[-100.717554,44.772041],[-101.139278,44.744656],[-101.500756,44.991119],[-101.467895,45.47309],[-100.772323,45.47309]]]},"id":"46041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.714357,45.47309],[-101.467895,45.47309],[-101.500756,44.991119],[-101.139278,44.744656],[-101.380264,44.657025],[-101.999158,44.509148],[-101.999158,45.040411],[-101.999158,45.47309],[-101.714357,45.47309]]]},"id":"46137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.237887,45.467613],[-89.046194,45.462136],[-88.679239,45.379982],[-88.6409,45.117088],[-88.974994,45.117088],[-88.980471,45.029457],[-88.991425,45.029457],[-89.221456,45.029457],[-89.424103,45.117088],[-89.424103,45.467613],[-89.237887,45.467613]]]},"id":"55067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.356945,45.462136],[-121.820205,45.462136],[-121.694236,45.259489],[-121.732574,44.887057],[-122.395284,44.887057],[-122.84987,45.259489],[-122.866301,45.319735],[-122.745808,45.434751],[-122.356945,45.462136]]]},"id":"41005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.063471,45.401889],[-122.866301,45.319735],[-122.84987,45.259489],[-122.964886,45.286874],[-123.068948,45.073273],[-123.622119,45.07875],[-123.72618,45.07875],[-123.463287,45.434751],[-123.063471,45.401889]]]},"id":"41071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.052118,45.423797],[-94.046641,45.423797],[-93.520854,45.248535],[-93.767317,44.980165],[-94.013779,44.980165],[-94.254764,44.980165],[-94.260241,45.281397],[-94.052118,45.423797]]]},"id":"27171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.159376,45.412843],[-93.016976,45.412843],[-93.016976,45.297827],[-93.022453,45.122565],[-93.230576,45.122565],[-93.2251,45.034934],[-93.5099,45.243058],[-93.5099,45.412843],[-93.159376,45.412843]]]},"id":"27003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.884612,45.412843],[-94.76412,45.325212],[-94.758643,44.892534],[-95.246091,44.892534],[-95.246091,45.14995],[-95.257044,45.412843],[-95.131075,45.412843],[-94.884612,45.412843]]]},"id":"27067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.974524,45.412843],[-95.749969,45.412843],[-95.257044,45.412843],[-95.246091,45.14995],[-95.574707,45.14995],[-96.03477,45.14995],[-96.10597,45.177335],[-96.116924,45.412843],[-95.974524,45.412843]]]},"id":"27151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.168967,45.379982],[-90.042997,45.379982],[-90.042997,45.122565],[-90.196352,45.122565],[-90.316844,45.034934],[-90.815246,45.029457],[-90.924785,45.029457],[-90.924785,45.29235],[-90.678322,45.379982],[-90.168967,45.379982]]]},"id":"55119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.4273,45.374505],[-87.76459,44.963734],[-87.989145,44.678933],[-88.235607,44.678933],[-88.241084,44.678933],[-88.487546,44.854195],[-88.6409,45.117088],[-88.679239,45.379982],[-88.4273,45.374505]]]},"id":"55083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.09732,45.363551],[-84.730365,45.286874],[-84.735842,45.204719],[-84.856335,45.117088],[-85.321875,45.204719],[-85.387598,45.210196],[-85.09732,45.369028],[-85.09732,45.363551]]]},"id":"26029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.835367,45.27592],[-70.769644,44.733703],[-70.238381,44.459856],[-70.479366,44.032654],[-70.676536,44.142193],[-70.780598,43.813577],[-70.988722,43.791669],[-71.010629,44.284593],[-71.08183,45.303304],[-70.835367,45.27592]]]},"id":"23017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.681049,45.325212],[-96.472925,45.325212],[-96.456494,45.303304],[-96.451017,45.297827],[-96.451017,45.270443],[-96.451017,44.980165],[-96.883696,44.974688],[-97.228743,45.14995],[-97.228743,45.297827],[-96.681049,45.325212]]]},"id":"46051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.534088,45.325212],[-94.260241,45.281397],[-94.254764,44.980165],[-94.501227,44.892534],[-94.758643,44.892534],[-94.76412,45.325212],[-94.534088,45.325212]]]},"id":"27093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.08183,45.303304],[-71.010629,44.284593],[-71.415923,44.213393],[-71.766447,44.405086],[-71.503554,45.013027],[-71.08183,45.303304]]]},"id":"33007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.375727,44.673456],[-87.737205,44.678933],[-86.981388,45.297827],[-87.375727,44.673456]]]},"id":"55029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.016976,45.297827],[-92.743129,45.297827],[-92.75956,45.210196],[-92.770513,44.859672],[-92.803375,44.744656],[-93.016976,44.892534],[-93.022453,45.122565],[-93.016976,45.297827]]]},"id":"27163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.089093,45.29235],[-90.924785,45.29235],[-90.924785,45.029457],[-90.924785,44.859672],[-91.499863,44.859672],[-91.653218,44.854195],[-91.664172,45.210196],[-91.543679,45.29235],[-91.089093,45.29235]]]},"id":"55017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.964886,45.286874],[-122.84987,45.259489],[-122.395284,44.887057],[-121.732574,44.887057],[-121.759959,44.826811],[-121.79282,44.68441],[-122.658177,44.777518],[-123.145625,44.750133],[-123.068948,45.073273],[-122.964886,45.286874]]]},"id":"41047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.368863,45.259489],[-96.10597,45.177335],[-96.03477,45.14995],[-95.739015,44.936349],[-96.451017,44.804903],[-96.451017,44.980165],[-96.451017,45.270443],[-96.368863,45.259489]]]},"id":"27073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.688312,45.270443],[-116.146095,45.106135],[-116.157049,44.498194],[-116.299449,44.443425],[-116.901913,44.843241],[-116.78142,45.07875],[-116.688312,45.270443]]]},"id":"16003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-68.058559,45.254012],[-67.954497,44.41604],[-68.797945,44.470809],[-68.814376,44.68441],[-68.058559,45.254012]]]},"id":"23009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.257491,45.248535],[-99.709797,45.243058],[-99.572873,45.243058],[-99.572873,44.898011],[-99.676935,44.898011],[-100.405368,44.898011],[-100.257491,45.248535]]]},"id":"46107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.520854,45.248535],[-93.5099,45.243058],[-93.2251,45.034934],[-93.175807,44.887057],[-93.329161,44.788472],[-93.433223,44.81038],[-93.520854,44.804903],[-93.767317,44.980165],[-93.520854,45.248535]]]},"id":"27053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.572873,45.243058],[-98.723948,45.243058],[-98.718471,45.243058],[-98.718471,44.898011],[-99.30998,44.898011],[-99.572873,44.898011],[-99.572873,45.243058]]]},"id":"46049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.532255,45.243058],[-97.979084,45.243058],[-97.979084,45.155427],[-97.979084,44.629641],[-98.088623,44.629641],[-98.707517,44.635118],[-98.718471,44.898011],[-98.718471,45.243058],[-98.532255,45.243058]]]},"id":"46115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.828432,45.193766],[-114.694706,45.199243],[-114.809722,44.81038],[-115.04523,44.750133],[-115.297169,44.339363],[-115.680555,44.235301],[-116.211818,44.153147],[-116.157049,44.498194],[-116.146095,45.106135],[-115.828432,45.193766]]]},"id":"16085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.042057,45.210196],[-102.957623,45.210196],[-102.957623,45.040411],[-102.963099,44.602256],[-103.565563,44.602256],[-103.812025,44.602256],[-104.058488,44.569394],[-104.058488,44.996596],[-104.042057,45.210196]]]},"id":"46019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.639537,44.777518],[-85.814799,44.772041],[-86.039354,44.777518],[-86.072215,44.777518],[-85.617629,45.188289],[-85.639537,44.777518]]]},"id":"26089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.650021,45.210196],[-92.157096,45.210196],[-92.135188,44.859672],[-92.600728,44.865149],[-92.770513,44.859672],[-92.75956,45.210196],[-92.650021,45.210196]]]},"id":"55109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.157096,45.210196],[-91.664172,45.210196],[-91.653218,44.854195],[-91.647741,44.68441],[-91.894203,44.68441],[-92.135188,44.68441],[-92.135188,44.859672],[-92.157096,45.210196]]]},"id":"55033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.321875,45.204719],[-84.856335,45.117088],[-84.845381,44.859672],[-85.250674,44.859672],[-85.332828,44.81038],[-85.42046,44.859672],[-85.442367,44.859672],[-85.387598,45.210196],[-85.321875,45.204719]]]},"id":"26009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.4871,45.204719],[-83.388515,45.204719],[-83.322791,44.859672],[-83.547346,44.859672],[-83.886916,44.854195],[-83.881439,45.204719],[-83.4871,45.204719]]]},"id":"26007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.199102,45.199243],[-83.881439,45.204719],[-83.886916,44.854195],[-83.952639,44.854195],[-84.374364,44.854195],[-84.368887,45.199243],[-84.248394,45.199243],[-84.199102,45.199243]]]},"id":"26119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.735842,45.204719],[-84.368887,45.199243],[-84.374364,44.854195],[-84.774181,44.859672],[-84.845381,44.859672],[-84.856335,45.117088],[-84.735842,45.204719]]]},"id":"26137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.924314,45.155427],[-97.491636,45.14995],[-97.491636,44.804903],[-97.491636,44.54201],[-97.732621,44.54201],[-97.853114,44.54201],[-97.979084,44.629641],[-97.979084,45.155427],[-97.924314,45.155427]]]},"id":"46025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.574707,45.14995],[-95.246091,45.14995],[-95.246091,44.892534],[-95.481599,44.75561],[-95.733538,44.930872],[-95.739015,44.936349],[-96.03477,45.14995],[-95.574707,45.14995]]]},"id":"27023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.23422,45.14995],[-97.228743,45.14995],[-96.883696,44.974688],[-96.883696,44.804903],[-97.491636,44.804903],[-97.491636,45.14995],[-97.23422,45.14995]]]},"id":"46029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.230576,45.122565],[-93.022453,45.122565],[-93.016976,44.892534],[-93.088176,44.919919],[-93.175807,44.887057],[-93.2251,45.034934],[-93.230576,45.122565]]]},"id":"27123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.196352,45.122565],[-90.042997,45.122565],[-89.424103,45.117088],[-89.221456,45.029457],[-89.221456,44.678933],[-89.347426,44.678933],[-89.845827,44.68441],[-90.207305,44.68441],[-90.316844,44.68441],[-90.316844,45.034934],[-90.196352,45.122565]]]},"id":"55073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.974994,45.117088],[-88.6409,45.117088],[-88.487546,44.854195],[-88.980471,45.029457],[-88.974994,45.117088]]]},"id":"55078"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.778223,44.991119],[-117.268868,45.07875],[-116.78142,45.07875],[-116.901913,44.843241],[-117.219575,44.301024],[-117.608438,44.443425],[-118.232809,44.257209],[-118.495702,44.257209],[-118.243763,44.958257],[-117.778223,44.991119]]]},"id":"41001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.622119,45.07875],[-123.068948,45.073273],[-123.145625,44.750133],[-123.151102,44.722749],[-123.561872,44.722749],[-123.600211,44.722749],[-123.72618,45.045888],[-123.72618,45.07875],[-123.622119,45.07875]]]},"id":"41053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.870414,45.067796],[-119.78826,45.067796],[-119.673245,44.996596],[-119.656814,44.306501],[-120.385247,44.563917],[-120.374293,44.821334],[-120.494786,45.067796],[-119.870414,45.067796]]]},"id":"41069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.000027,45.045888],[-123.72618,45.045888],[-123.600211,44.722749],[-123.775473,44.284593],[-124.010981,44.279117],[-124.115043,44.27364],[-124.005504,45.045888],[-124.000027,45.045888]]]},"id":"41041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.042974,45.040411],[-101.999158,45.040411],[-101.999158,44.509148],[-101.999158,44.509148],[-102.119651,44.437948],[-102.388021,44.142193],[-103.450547,44.142193],[-103.565563,44.602256],[-102.963099,44.602256],[-102.957623,45.040411],[-102.042974,45.040411]]]},"id":"46093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.815246,45.029457],[-90.316844,45.034934],[-90.316844,44.68441],[-90.316844,44.426994],[-90.924785,44.596779],[-90.924785,44.859672],[-90.924785,45.029457],[-90.815246,45.029457]]]},"id":"55019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.991425,45.029457],[-88.980471,45.029457],[-88.487546,44.854195],[-88.241084,44.678933],[-88.246561,44.585825],[-88.575177,44.591302],[-88.608039,44.591302],[-89.221456,44.678933],[-89.221456,45.029457],[-88.991425,45.029457]]]},"id":"55115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.555127,45.00755],[-72.577034,44.782995],[-72.675619,44.793949],[-72.922082,44.635118],[-73.22879,44.722749],[-73.190452,45.013027],[-72.555127,45.00755]]]},"id":"50011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.723995,44.996596],[-74.537779,44.098377],[-74.855442,44.070993],[-75.167627,44.098377],[-75.446951,44.21887],[-75.857722,44.405086],[-75.238827,44.865149],[-74.723995,44.996596]]]},"id":"36089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.503554,45.013027],[-71.766447,44.405086],[-71.837647,44.350317],[-71.941709,44.766564],[-71.897894,45.00755],[-71.503554,45.013027]]]},"id":"50009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.190452,45.013027],[-73.22879,44.722749],[-73.360237,44.563917],[-73.343806,45.013027],[-73.190452,45.013027]]]},"id":"50013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.343806,45.013027],[-73.360237,44.563917],[-73.338329,44.547487],[-73.907931,44.426994],[-74.028424,44.996596],[-73.343806,45.013027]]]},"id":"36019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.897894,45.00755],[-71.941709,44.766564],[-72.374388,44.585825],[-72.577034,44.782995],[-72.555127,45.00755],[-71.897894,45.00755]]]},"id":"50019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.798321,45.002073],[-108.620779,45.002073],[-108.549579,44.169578],[-108.549579,44.081947],[-109.310873,43.813577],[-110.055737,44.010746],[-110.3734,44.580348],[-111.058017,44.667979],[-111.041587,45.002073],[-109.798321,45.002073]]]},"id":"56029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.028424,44.996596],[-73.907931,44.426994],[-74.280363,44.120285],[-74.537779,44.098377],[-74.723995,44.996596],[-74.028424,44.996596]]]},"id":"36033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.914254,45.002073],[-107.372036,44.55844],[-107.147482,44.164101],[-108.549579,44.169578],[-108.620779,45.002073],[-108.248347,45.002073],[-107.914254,45.002073]]]},"id":"56003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.914254,45.002073],[-106.265695,44.991119],[-106.024709,44.991119],[-106.008278,44.563917],[-107.372036,44.55844],[-107.914254,45.002073]]]},"id":"56033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.024709,44.991119],[-105.088152,45.002073],[-105.077198,44.175055],[-105.077198,43.495914],[-106.019232,43.495914],[-106.008278,44.563917],[-106.024709,44.991119]]]},"id":"56005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.088152,45.002073],[-105.03886,45.002073],[-104.058488,44.996596],[-104.058488,44.569394],[-104.053011,44.180532],[-104.392581,44.180532],[-105.077198,44.175055],[-105.088152,45.002073]]]},"id":"56011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.676441,44.996596],[-118.51761,44.996596],[-118.243763,44.958257],[-118.495702,44.257209],[-118.232809,44.257209],[-118.227332,44.038131],[-118.468318,44.038131],[-119.656814,43.961454],[-119.656814,44.306501],[-119.673245,44.996596],[-119.163889,44.996596],[-118.676441,44.996596]]]},"id":"41023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.42046,44.859672],[-85.332828,44.81038],[-85.332828,44.514625],[-85.694307,44.514625],[-85.814799,44.514625],[-85.814799,44.772041],[-85.639537,44.777518],[-85.442367,44.859672],[-85.42046,44.859672]]]},"id":"26055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.254764,44.980165],[-94.013779,44.980165],[-94.008302,44.717272],[-94.134272,44.717272],[-94.49575,44.717272],[-94.49575,44.892534],[-94.501227,44.892534],[-94.254764,44.980165]]]},"id":"27085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.013779,44.980165],[-93.767317,44.980165],[-93.520854,44.804903],[-93.767317,44.640595],[-94.008302,44.717272],[-94.013779,44.980165]]]},"id":"27019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.451017,44.980165],[-96.451017,44.804903],[-96.451017,44.629641],[-96.451017,44.54201],[-96.883696,44.54201],[-96.883696,44.804903],[-96.883696,44.974688],[-96.451017,44.980165]]]},"id":"46039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.733538,44.930872],[-95.481599,44.75561],[-95.361106,44.700841],[-95.596615,44.54201],[-95.936185,44.629641],[-96.095016,44.629641],[-96.44554,44.629641],[-96.451017,44.629641],[-96.451017,44.804903],[-95.739015,44.936349],[-95.733538,44.930872]]]},"id":"27173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.088176,44.919919],[-93.016976,44.892534],[-92.803375,44.744656],[-92.732175,44.711795],[-93.038884,44.470809],[-93.279869,44.54201],[-93.329161,44.788472],[-93.175807,44.887057],[-93.088176,44.919919]]]},"id":"27037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.405368,44.898011],[-99.676935,44.898011],[-99.676935,44.547487],[-99.857674,44.547487],[-100.525861,44.547487],[-100.717554,44.772041],[-100.405368,44.898011]]]},"id":"46119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.572873,44.898011],[-99.30998,44.898011],[-99.299026,44.196962],[-99.57835,44.191485],[-99.665981,44.21887],[-99.676935,44.547487],[-99.676935,44.898011],[-99.572873,44.898011]]]},"id":"46069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.30998,44.898011],[-98.718471,44.898011],[-98.707517,44.635118],[-98.70204,44.196962],[-98.926594,44.196962],[-99.299026,44.196962],[-99.30998,44.898011]]]},"id":"46059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.49575,44.892534],[-94.49575,44.717272],[-94.621719,44.454379],[-94.780551,44.454379],[-94.851751,44.498194],[-94.868182,44.498194],[-95.295383,44.662502],[-95.361106,44.700841],[-95.481599,44.75561],[-95.246091,44.892534],[-94.758643,44.892534],[-94.501227,44.892534],[-94.49575,44.892534]]]},"id":"27129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.04523,44.750133],[-114.809722,44.81038],[-114.563259,44.574871],[-114.196304,44.859672],[-113.319994,44.235301],[-113.374763,43.8081],[-113.796488,43.567114],[-114.656367,43.917638],[-114.968553,43.939546],[-114.990461,43.9505],[-115.297169,44.339363],[-115.04523,44.750133]]]},"id":"16037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.600728,44.865149],[-92.135188,44.859672],[-92.135188,44.68441],[-92.315927,44.54201],[-92.732175,44.711795],[-92.803375,44.744656],[-92.770513,44.859672],[-92.600728,44.865149]]]},"id":"55093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.250674,44.859672],[-84.845381,44.859672],[-84.850858,44.509148],[-85.332828,44.514625],[-85.332828,44.81038],[-85.250674,44.859672]]]},"id":"26079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.547346,44.859672],[-83.322791,44.859672],[-83.317314,44.509148],[-83.886916,44.509148],[-83.886916,44.854195],[-83.547346,44.859672]]]},"id":"26001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.774181,44.859672],[-84.374364,44.854195],[-84.368887,44.509148],[-84.735842,44.509148],[-84.850858,44.509148],[-84.845381,44.859672],[-84.774181,44.859672]]]},"id":"26039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.499863,44.859672],[-90.924785,44.859672],[-90.924785,44.596779],[-91.16577,44.596779],[-91.286263,44.596779],[-91.527248,44.596779],[-91.647741,44.596779],[-91.647741,44.68441],[-91.653218,44.854195],[-91.499863,44.859672]]]},"id":"55035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.952639,44.854195],[-83.886916,44.854195],[-83.886916,44.509148],[-83.925255,44.509148],[-84.368887,44.509148],[-84.374364,44.854195],[-83.952639,44.854195]]]},"id":"26135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.901913,44.843241],[-116.299449,44.443425],[-116.452804,44.153147],[-116.896436,44.153147],[-117.219575,44.301024],[-116.901913,44.843241]]]},"id":"16087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.998664,44.821334],[-120.374293,44.821334],[-120.385247,44.563917],[-121.108203,44.388655],[-121.842113,44.394132],[-121.79282,44.68441],[-121.759959,44.826811],[-120.998664,44.821334]]]},"id":"41031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.433223,44.81038],[-93.329161,44.788472],[-93.279869,44.54201],[-93.301777,44.54201],[-93.526331,44.54201],[-93.701593,44.54201],[-93.909717,44.54201],[-93.767317,44.640595],[-93.520854,44.804903],[-93.433223,44.81038]]]},"id":"27139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.883696,44.804903],[-96.883696,44.54201],[-97.130158,44.54201],[-97.491636,44.54201],[-97.491636,44.804903],[-96.883696,44.804903]]]},"id":"46057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.675619,44.793949],[-72.577034,44.782995],[-72.374388,44.585825],[-72.434634,44.503671],[-72.807066,44.454379],[-72.922082,44.635118],[-72.675619,44.793949]]]},"id":"50015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.658177,44.777518],[-121.79282,44.68441],[-121.842113,44.394132],[-121.798297,44.257209],[-123.200394,44.284593],[-123.151102,44.722749],[-123.145625,44.750133],[-122.658177,44.777518]]]},"id":"41043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.717554,44.772041],[-100.525861,44.547487],[-99.939828,44.196962],[-100.224629,44.196962],[-100.36703,44.169578],[-101.013309,44.169578],[-101.04617,44.169578],[-101.139278,44.744656],[-100.717554,44.772041]]]},"id":"46117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.039354,44.777518],[-85.814799,44.772041],[-85.814799,44.514625],[-86.181754,44.520102],[-86.231047,44.520102],[-86.072215,44.777518],[-86.039354,44.777518]]]},"id":"26019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.941709,44.766564],[-71.837647,44.350317],[-72.040294,44.153147],[-72.368911,44.202439],[-72.42368,44.503671],[-72.434634,44.503671],[-72.374388,44.585825],[-71.941709,44.766564]]]},"id":"50005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.37568,44.750133],[-111.047063,44.476286],[-111.047063,43.983362],[-111.397588,43.923115],[-111.978143,43.928592],[-112.153405,44.060039],[-111.616665,44.547487],[-111.479742,44.711795],[-111.37568,44.750133]]]},"id":"16043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-69.471609,44.695364],[-69.268962,44.722749],[-68.814376,44.68441],[-68.797945,44.470809],[-69.027977,44.251732],[-69.411363,44.328409],[-69.504471,44.34484],[-69.471609,44.695364]]]},"id":"23027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.380264,44.657025],[-101.139278,44.744656],[-101.04617,44.169578],[-101.062601,43.994316],[-101.407648,43.994316],[-102.004635,43.994316],[-101.999158,44.509148],[-101.999158,44.509148],[-101.380264,44.657025]]]},"id":"46055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.22879,44.722749],[-72.922082,44.635118],[-72.807066,44.454379],[-72.954943,44.164101],[-73.22879,44.262686],[-73.310944,44.262686],[-73.338329,44.547487],[-73.360237,44.563917],[-73.22879,44.722749]]]},"id":"50007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.561872,44.722749],[-123.151102,44.722749],[-123.200394,44.284593],[-123.775473,44.284593],[-123.600211,44.722749],[-123.561872,44.722749]]]},"id":"41003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-69.581148,44.706318],[-69.471609,44.695364],[-69.504471,44.34484],[-69.75641,44.136716],[-70.002872,44.125762],[-70.128842,44.48724],[-69.931672,44.61321],[-69.581148,44.706318]]]},"id":"23011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.134272,44.717272],[-94.008302,44.717272],[-93.767317,44.640595],[-93.909717,44.54201],[-93.931625,44.454379],[-94.112364,44.454379],[-94.621719,44.454379],[-94.49575,44.717272],[-94.134272,44.717272]]]},"id":"27143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.732175,44.711795],[-92.315927,44.54201],[-92.244727,44.454379],[-92.430943,44.454379],[-92.551436,44.196962],[-92.666452,44.196962],[-92.677405,44.196962],[-92.918391,44.196962],[-93.038884,44.196962],[-93.038884,44.470809],[-92.732175,44.711795]]]},"id":"27049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.295383,44.662502],[-94.868182,44.498194],[-95.109167,44.196962],[-95.459691,44.196962],[-95.591138,44.196962],[-95.596615,44.54201],[-95.361106,44.700841],[-95.295383,44.662502]]]},"id":"27127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.347426,44.678933],[-89.221456,44.678933],[-89.226933,44.246255],[-89.599365,44.246255],[-89.725335,44.246255],[-89.845827,44.68441],[-89.347426,44.678933]]]},"id":"55097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.207305,44.68441],[-89.845827,44.68441],[-89.725335,44.246255],[-89.818443,44.251732],[-89.900597,44.251732],[-90.081336,44.246255],[-90.311367,44.246255],[-90.316844,44.426994],[-90.316844,44.68441],[-90.207305,44.68441]]]},"id":"55141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.894203,44.68441],[-91.647741,44.68441],[-91.647741,44.596779],[-92.085896,44.405086],[-92.244727,44.454379],[-92.315927,44.54201],[-92.135188,44.68441],[-91.894203,44.68441]]]},"id":"55091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.221456,44.678933],[-88.608039,44.591302],[-88.739485,44.240778],[-88.887363,44.240778],[-89.226933,44.246255],[-89.221456,44.678933]]]},"id":"55135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.235607,44.678933],[-87.989145,44.678933],[-87.76459,44.646072],[-87.76459,44.328409],[-87.885083,44.328409],[-88.043914,44.240778],[-88.191791,44.240778],[-88.246561,44.585825],[-88.241084,44.678933],[-88.235607,44.678933]]]},"id":"55009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.737205,44.678933],[-87.375727,44.673456],[-87.545512,44.328409],[-87.76459,44.328409],[-87.76459,44.646072],[-87.737205,44.678933]]]},"id":"55061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.058017,44.667979],[-110.3734,44.580348],[-110.055737,44.010746],[-110.05026,43.463052],[-110.576047,43.233021],[-111.047063,43.315175],[-111.047063,43.501391],[-111.047063,43.983362],[-111.047063,44.476286],[-111.058017,44.667979]]]},"id":"56039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.088623,44.629641],[-97.979084,44.629641],[-97.853114,44.54201],[-97.853114,44.196962],[-98.209115,44.196962],[-98.329608,44.196962],[-98.691086,44.196962],[-98.70204,44.196962],[-98.707517,44.635118],[-98.088623,44.629641]]]},"id":"46005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.44554,44.629641],[-96.095016,44.629641],[-96.078585,44.196962],[-96.242894,44.196962],[-96.451017,44.196962],[-96.451017,44.54201],[-96.451017,44.629641],[-96.44554,44.629641]]]},"id":"27081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.936185,44.629641],[-95.596615,44.54201],[-95.591138,44.196962],[-96.012862,44.196962],[-96.062155,44.196962],[-96.078585,44.196962],[-96.095016,44.629641],[-95.936185,44.629641]]]},"id":"27083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.812025,44.602256],[-103.565563,44.602256],[-103.450547,44.142193],[-104.053011,44.142193],[-104.053011,44.180532],[-104.058488,44.569394],[-103.812025,44.602256]]]},"id":"46081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.286263,44.596779],[-91.16577,44.596779],[-91.149339,44.081947],[-91.176724,44.087424],[-91.423186,43.983362],[-91.56011,44.027177],[-91.527248,44.596779],[-91.286263,44.596779]]]},"id":"55121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.16577,44.596779],[-90.924785,44.596779],[-90.316844,44.426994],[-90.311367,44.246255],[-90.311367,44.153147],[-90.492106,44.158624],[-90.974077,44.070993],[-91.149339,44.081947],[-91.16577,44.596779]]]},"id":"55053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.647741,44.596779],[-91.527248,44.596779],[-91.56011,44.027177],[-91.855864,44.191485],[-92.085896,44.405086],[-91.647741,44.596779]]]},"id":"55011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.575177,44.591302],[-88.246561,44.585825],[-88.191791,44.240778],[-88.405392,44.246255],[-88.471115,44.246255],[-88.739485,44.240778],[-88.608039,44.591302],[-88.575177,44.591302]]]},"id":"55087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.616665,44.547487],[-112.153405,44.060039],[-112.50393,44.060039],[-112.695623,43.972408],[-112.996854,44.235301],[-112.816115,44.377701],[-111.616665,44.547487]]]},"id":"16033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.008278,44.563917],[-106.019232,43.495914],[-106.079479,43.495914],[-107.109143,43.501391],[-107.147482,44.164101],[-107.372036,44.55844],[-106.008278,44.563917]]]},"id":"56019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.385247,44.563917],[-119.656814,44.306501],[-119.656814,43.961454],[-119.897799,43.698561],[-120.98771,43.961454],[-121.108203,44.388655],[-120.385247,44.563917]]]},"id":"41013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.857674,44.547487],[-99.676935,44.547487],[-99.665981,44.21887],[-99.939828,44.196962],[-100.525861,44.547487],[-99.857674,44.547487]]]},"id":"46065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.338329,44.547487],[-73.310944,44.262686],[-73.376668,43.8081],[-73.436914,43.802623],[-73.853161,43.764284],[-74.055808,43.742376],[-74.280363,44.120285],[-73.907931,44.426994],[-73.338329,44.547487]]]},"id":"36031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.732621,44.54201],[-97.491636,44.54201],[-97.130158,44.54201],[-97.130158,44.196962],[-97.217789,44.196962],[-97.371143,44.196962],[-97.727145,44.196962],[-97.847637,44.196962],[-97.853114,44.196962],[-97.853114,44.54201],[-97.732621,44.54201]]]},"id":"46077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.301777,44.54201],[-93.279869,44.54201],[-93.038884,44.470809],[-93.038884,44.196962],[-93.04436,44.196962],[-93.164853,44.196962],[-93.405839,44.196962],[-93.526331,44.196962],[-93.526331,44.54201],[-93.301777,44.54201]]]},"id":"27131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.451017,44.54201],[-96.451017,44.196962],[-96.648187,44.196962],[-96.889173,44.196962],[-97.130158,44.196962],[-97.130158,44.54201],[-96.883696,44.54201],[-96.451017,44.54201]]]},"id":"46011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.701593,44.54201],[-93.526331,44.54201],[-93.526331,44.196962],[-93.679686,44.196962],[-93.767317,44.196962],[-94.013779,44.240778],[-93.931625,44.454379],[-93.909717,44.54201],[-93.701593,44.54201]]]},"id":"27079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.181754,44.520102],[-85.814799,44.514625],[-85.820276,44.164101],[-86.044831,44.169578],[-86.384401,44.180532],[-86.231047,44.520102],[-86.181754,44.520102]]]},"id":"26101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.694307,44.514625],[-85.332828,44.514625],[-85.332828,44.164101],[-85.486183,44.164101],[-85.56286,44.164101],[-85.820276,44.164101],[-85.814799,44.514625],[-85.694307,44.514625]]]},"id":"26165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.332828,44.514625],[-84.850858,44.509148],[-84.850858,44.158624],[-85.086366,44.164101],[-85.332828,44.164101],[-85.332828,44.514625]]]},"id":"26113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.563777,44.164101],[-83.569254,44.164101],[-83.886916,44.164101],[-83.886916,44.509148],[-83.317314,44.509148],[-83.563777,44.164101]]]},"id":"26069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.735842,44.509148],[-84.368887,44.509148],[-84.368887,44.158624],[-84.609872,44.158624],[-84.850858,44.158624],[-84.850858,44.509148],[-84.735842,44.509148]]]},"id":"26143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.119651,44.437948],[-101.999158,44.509148],[-102.004635,43.994316],[-102.141558,43.698561],[-102.256574,43.687607],[-102.809745,43.687607],[-103.417686,43.857392],[-104.053011,43.851915],[-104.053011,44.142193],[-103.450547,44.142193],[-102.388021,44.142193],[-102.119651,44.437948]]]},"id":"46103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.925255,44.509148],[-83.886916,44.509148],[-83.886916,44.164101],[-84.16624,44.164101],[-84.248394,44.164101],[-84.368887,44.158624],[-84.368887,44.509148],[-83.925255,44.509148]]]},"id":"26129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.42368,44.503671],[-72.368911,44.202439],[-72.434634,44.153147],[-72.741343,44.027177],[-72.954943,44.164101],[-72.807066,44.454379],[-72.434634,44.503671],[-72.42368,44.503671]]]},"id":"50023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.157049,44.498194],[-116.211818,44.153147],[-116.283018,43.8081],[-116.51305,43.8081],[-116.71022,43.8081],[-116.452804,44.153147],[-116.299449,44.443425],[-116.157049,44.498194]]]},"id":"16045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.851751,44.498194],[-94.780551,44.454379],[-94.36978,44.262686],[-94.36978,44.109331],[-94.490273,44.109331],[-94.857228,44.109331],[-95.109167,44.196962],[-94.868182,44.498194],[-94.851751,44.498194]]]},"id":"27015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.172658,44.481763],[-70.128842,44.48724],[-70.002872,44.125762],[-70.035734,43.977885],[-70.479366,44.032654],[-70.238381,44.459856],[-70.172658,44.481763]]]},"id":"23001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.112364,44.454379],[-93.931625,44.454379],[-94.013779,44.240778],[-94.331441,44.251732],[-94.36978,44.262686],[-94.780551,44.454379],[-94.621719,44.454379],[-94.112364,44.454379]]]},"id":"27103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.430943,44.454379],[-92.244727,44.454379],[-92.085896,44.405086],[-91.855864,44.191485],[-92.069465,44.191485],[-92.080419,44.109331],[-92.551436,44.196962],[-92.430943,44.454379]]]},"id":"27157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.608438,44.443425],[-117.219575,44.301024],[-116.896436,44.153147],[-116.97859,43.8793],[-117.027882,43.68213],[-117.027882,42.000709],[-118.194471,41.995232],[-118.227332,44.038131],[-118.232809,44.257209],[-117.608438,44.443425]]]},"id":"41045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.837647,44.350317],[-71.766447,44.405086],[-71.415923,44.213393],[-71.530939,43.764284],[-71.728109,43.561637],[-71.81574,43.545207],[-71.936232,43.528776],[-72.330572,43.599976],[-72.204602,43.769761],[-72.040294,44.153147],[-71.837647,44.350317]]]},"id":"33009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.857722,44.405086],[-75.446951,44.21887],[-75.775568,43.687607],[-76.087753,43.671176],[-76.202769,43.68213],[-76.312308,44.196962],[-75.857722,44.405086]]]},"id":"36045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.108203,44.388655],[-120.98771,43.961454],[-119.897799,43.698561],[-119.897799,43.61093],[-121.130111,43.616407],[-121.332757,43.616407],[-121.486112,43.616407],[-122.000944,43.616407],[-121.798297,44.257209],[-121.842113,44.394132],[-121.108203,44.388655]]]},"id":"41017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-69.411363,44.328409],[-69.027977,44.251732],[-69.373024,43.966931],[-69.411363,44.328409]]]},"id":"23013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.680555,44.235301],[-115.297169,44.339363],[-114.990461,43.9505],[-115.1712,44.087424],[-115.97631,43.589022],[-116.283018,43.8081],[-116.211818,44.153147],[-115.680555,44.235301]]]},"id":"16015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-69.411363,44.328409],[-69.373024,43.966931],[-69.696164,43.82453],[-69.75641,44.136716],[-69.504471,44.34484],[-69.411363,44.328409]]]},"id":"23015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.885083,44.328409],[-87.76459,44.328409],[-87.545512,44.328409],[-87.731728,43.890254],[-87.770067,43.890254],[-88.043914,43.890254],[-88.043914,44.240778],[-87.885083,44.328409]]]},"id":"55071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.22879,44.262686],[-72.954943,44.164101],[-72.741343,44.027177],[-72.790635,43.961454],[-72.96042,43.82453],[-73.365714,43.75333],[-73.376668,43.8081],[-73.310944,44.262686],[-73.22879,44.262686]]]},"id":"50001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.010981,44.279117],[-123.775473,44.284593],[-123.200394,44.284593],[-121.798297,44.257209],[-122.000944,43.616407],[-122.132391,43.441145],[-123.107286,43.53973],[-123.140148,43.780715],[-123.824765,43.945023],[-124.158859,43.862869],[-124.115043,44.27364],[-124.010981,44.279117]]]},"id":"41039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.010629,44.284593],[-70.988722,43.791669],[-70.961337,43.53973],[-71.109214,43.506868],[-71.163984,43.53973],[-71.530939,43.764284],[-71.415923,44.213393],[-71.010629,44.284593]]]},"id":"33003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.331441,44.251732],[-94.013779,44.240778],[-93.767317,44.196962],[-93.767317,43.846438],[-93.893286,43.846438],[-94.249287,43.846438],[-94.36978,43.846438],[-94.36978,44.109331],[-94.36978,44.262686],[-94.331441,44.251732]]]},"id":"27013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.818443,44.251732],[-89.725335,44.246255],[-89.599365,44.246255],[-89.599365,43.983362],[-89.599365,43.643791],[-89.785581,43.638314],[-89.900597,44.251732],[-89.818443,44.251732]]]},"id":"55001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.081336,44.246255],[-89.900597,44.251732],[-89.785581,43.638314],[-90.294936,43.643791],[-90.311367,43.638314],[-90.311367,43.731422],[-90.311367,44.153147],[-90.311367,44.246255],[-90.081336,44.246255]]]},"id":"55057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.599365,44.246255],[-89.226933,44.246255],[-88.887363,44.240778],[-88.887363,43.983362],[-88.936655,43.983362],[-89.166687,43.983362],[-89.599365,43.983362],[-89.599365,44.246255]]]},"id":"55137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.471115,44.246255],[-88.405392,44.246255],[-88.405392,43.939546],[-88.887363,43.895731],[-88.887363,43.983362],[-88.887363,44.240778],[-88.739485,44.240778],[-88.471115,44.246255]]]},"id":"55139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.405392,44.246255],[-88.191791,44.240778],[-88.043914,44.240778],[-88.043914,43.890254],[-88.164407,43.890254],[-88.405392,43.939546],[-88.405392,44.246255]]]},"id":"55015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.002331,44.235301],[-112.996854,44.235301],[-112.695623,43.972408],[-112.695623,43.621884],[-113.007808,43.282313],[-113.796488,43.567114],[-113.374763,43.8081],[-113.319994,44.235301],[-113.002331,44.235301]]]},"id":"16023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.434634,44.153147],[-72.368911,44.202439],[-72.040294,44.153147],[-72.204602,43.769761],[-72.790635,43.961454],[-72.741343,44.027177],[-72.434634,44.153147]]]},"id":"50017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.446951,44.21887],[-75.167627,44.098377],[-75.112858,43.616407],[-75.75366,43.468529],[-75.775568,43.687607],[-75.446951,44.21887]]]},"id":"36049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.224629,44.196962],[-99.939828,44.196962],[-99.665981,44.21887],[-99.57835,44.191485],[-99.353796,43.934069],[-99.299026,43.501391],[-99.299026,43.501391],[-99.534535,43.501391],[-99.665981,43.75333],[-100.230106,43.714992],[-100.339645,43.714992],[-100.36703,44.169578],[-100.224629,44.196962]]]},"id":"46085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.242894,44.196962],[-96.078585,44.196962],[-96.062155,44.196962],[-96.062155,43.846438],[-96.451017,43.851915],[-96.451017,44.196962],[-96.242894,44.196962]]]},"id":"27117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.918391,44.196962],[-92.677405,44.196962],[-92.688359,43.846438],[-92.880052,43.846438],[-93.04436,43.846438],[-93.04436,44.196962],[-93.038884,44.196962],[-92.918391,44.196962]]]},"id":"27039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.648187,44.196962],[-96.451017,44.196962],[-96.451017,43.851915],[-96.489356,43.846438],[-96.889173,43.846438],[-96.889173,44.196962],[-96.648187,44.196962]]]},"id":"46101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.691086,44.196962],[-98.329608,44.196962],[-98.329608,43.939546],[-98.806102,43.934069],[-98.926594,43.934069],[-98.926594,44.196962],[-98.70204,44.196962],[-98.691086,44.196962]]]},"id":"46073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.209115,44.196962],[-97.853114,44.196962],[-97.847637,44.196962],[-97.853114,43.851915],[-97.96813,43.851915],[-98.203638,43.851915],[-98.324131,43.851915],[-98.329608,43.939546],[-98.329608,44.196962],[-98.209115,44.196962]]]},"id":"46111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.926594,44.196962],[-98.926594,43.934069],[-99.353796,43.934069],[-99.57835,44.191485],[-99.299026,44.196962],[-98.926594,44.196962]]]},"id":"46017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.012862,44.196962],[-95.591138,44.196962],[-95.459691,44.196962],[-95.465168,43.846438],[-96.051201,43.846438],[-96.062155,43.846438],[-96.062155,44.196962],[-96.012862,44.196962]]]},"id":"27101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.164853,44.196962],[-93.04436,44.196962],[-93.04436,43.846438],[-93.049837,43.846438],[-93.164853,43.846438],[-93.405839,43.846438],[-93.405839,44.196962],[-93.164853,44.196962]]]},"id":"27147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.679686,44.196962],[-93.526331,44.196962],[-93.405839,44.196962],[-93.405839,43.846438],[-93.646824,43.846438],[-93.767317,43.846438],[-93.767317,44.196962],[-93.679686,44.196962]]]},"id":"27161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.459691,44.196962],[-95.109167,44.196962],[-94.857228,44.109331],[-94.857228,43.846438],[-95.114644,43.846438],[-95.454214,43.846438],[-95.465168,43.846438],[-95.459691,44.196962]]]},"id":"27033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.217789,44.196962],[-97.130158,44.196962],[-96.889173,44.196962],[-96.889173,43.846438],[-97.130158,43.846438],[-97.371143,43.846438],[-97.371143,44.196962],[-97.217789,44.196962]]]},"id":"46079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.666452,44.196962],[-92.551436,44.196962],[-92.080419,44.109331],[-92.080419,43.846438],[-92.381651,43.846438],[-92.447374,43.835484],[-92.688359,43.846438],[-92.677405,44.196962],[-92.666452,44.196962]]]},"id":"27109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.727145,44.196962],[-97.371143,44.196962],[-97.371143,43.846438],[-97.491636,43.846438],[-97.606652,43.846438],[-97.853114,43.851915],[-97.847637,44.196962],[-97.727145,44.196962]]]},"id":"46097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.069465,44.191485],[-91.855864,44.191485],[-91.56011,44.027177],[-91.423186,43.983362],[-91.286263,43.846438],[-91.373894,43.846438],[-91.729895,43.846438],[-92.080419,43.846438],[-92.080419,44.109331],[-92.069465,44.191485]]]},"id":"27169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.392581,44.180532],[-104.053011,44.180532],[-104.053011,44.142193],[-104.053011,43.851915],[-104.053011,43.501391],[-104.901936,43.501391],[-105.077198,43.495914],[-105.077198,44.175055],[-104.392581,44.180532]]]},"id":"56045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.384401,44.180532],[-86.044831,44.169578],[-86.039354,43.813577],[-86.433693,43.819054],[-86.384401,44.180532]]]},"id":"26105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.676536,44.142193],[-70.479366,44.032654],[-70.035734,43.977885],[-69.887857,43.775238],[-70.353397,43.534253],[-70.780598,43.813577],[-70.676536,44.142193]]]},"id":"23005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.013309,44.169578],[-100.36703,44.169578],[-100.339645,43.714992],[-101.062601,43.840961],[-101.062601,43.994316],[-101.04617,44.169578],[-101.013309,44.169578]]]},"id":"46075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.147482,44.164101],[-107.109143,43.501391],[-107.536345,43.501391],[-107.596591,43.501391],[-108.527671,44.081947],[-108.549579,44.081947],[-108.549579,44.169578],[-107.147482,44.164101]]]},"id":"56043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.044831,44.169578],[-85.820276,44.164101],[-85.56286,44.164101],[-85.56286,43.813577],[-85.63406,43.813577],[-86.039354,43.813577],[-86.044831,44.169578]]]},"id":"26085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-69.75641,44.136716],[-69.696164,43.82453],[-69.887857,43.775238],[-70.035734,43.977885],[-70.002872,44.125762],[-69.75641,44.136716]]]},"id":"23023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.486183,44.164101],[-85.332828,44.164101],[-85.086366,44.164101],[-85.086366,43.813577],[-85.540952,43.813577],[-85.56286,43.813577],[-85.56286,44.164101],[-85.486183,44.164101]]]},"id":"26133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.086366,44.164101],[-84.850858,44.158624],[-84.609872,44.158624],[-84.604395,43.813577],[-84.752273,43.813577],[-85.086366,43.813577],[-85.086366,44.164101]]]},"id":"26035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.569254,44.164101],[-83.563777,44.164101],[-83.908824,43.912162],[-84.105994,43.999793],[-84.16624,43.994316],[-84.16624,44.164101],[-83.886916,44.164101],[-83.569254,44.164101]]]},"id":"26011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.248394,44.164101],[-84.16624,44.164101],[-84.16624,43.994316],[-84.16624,43.82453],[-84.368887,43.830007],[-84.604395,43.813577],[-84.609872,44.158624],[-84.368887,44.158624],[-84.248394,44.164101]]]},"id":"26051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.492106,44.158624],[-90.311367,44.153147],[-90.311367,43.731422],[-90.908354,43.725946],[-90.974077,44.070993],[-90.492106,44.158624]]]},"id":"55081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.452804,44.153147],[-116.71022,43.8081],[-116.97859,43.8793],[-116.896436,44.153147],[-116.452804,44.153147]]]},"id":"16075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.280363,44.120285],[-74.055808,43.742376],[-74.15987,43.369944],[-74.137962,43.254929],[-74.713041,43.28779],[-74.855442,44.070993],[-74.537779,44.098377],[-74.280363,44.120285]]]},"id":"36041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.490273,44.109331],[-94.36978,44.109331],[-94.36978,43.846438],[-94.616242,43.846438],[-94.851751,43.846438],[-94.857228,43.846438],[-94.857228,44.109331],[-94.490273,44.109331]]]},"id":"27165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.990461,43.9505],[-114.968553,43.939546],[-114.990461,43.857392],[-115.089045,43.200159],[-115.039753,42.909881],[-115.039753,42.767481],[-116.266588,43.112528],[-115.97631,43.589022],[-115.1712,44.087424],[-114.990461,43.9505]]]},"id":"16039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.167627,44.098377],[-74.855442,44.070993],[-74.713041,43.28779],[-74.762334,43.046805],[-74.762334,42.860589],[-75.096427,42.904404],[-75.211443,42.882497],[-75.112858,43.616407],[-75.167627,44.098377]]]},"id":"36043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.176724,44.087424],[-91.149339,44.081947],[-90.974077,44.070993],[-90.908354,43.725946],[-91.258878,43.725946],[-91.286263,43.846438],[-91.423186,43.983362],[-91.176724,44.087424]]]},"id":"55063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.527671,44.081947],[-107.596591,43.501391],[-108.335978,43.457575],[-109.310873,43.813577],[-108.549579,44.081947],[-108.527671,44.081947]]]},"id":"56017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.605312,43.693084],[-82.69842,43.687607],[-83.120145,43.676653],[-83.465192,43.725946],[-83.465192,43.731422],[-82.917498,44.070993],[-82.605312,43.693084]]]},"id":"26063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.50393,44.060039],[-112.153405,44.060039],[-111.978143,43.928592],[-111.627619,43.627361],[-111.775497,43.627361],[-112.52036,43.627361],[-112.695623,43.621884],[-112.695623,43.972408],[-112.50393,44.060039]]]},"id":"16051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.468318,44.038131],[-118.227332,44.038131],[-118.194471,41.995232],[-119.32272,41.995232],[-119.361059,41.995232],[-119.366536,42.75105],[-119.941615,42.745573],[-119.897799,43.61093],[-119.897799,43.698561],[-119.656814,43.961454],[-118.468318,44.038131]]]},"id":"41025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.055737,44.010746],[-109.310873,43.813577],[-108.335978,43.457575],[-107.596591,43.501391],[-107.536345,43.501391],[-107.525391,42.433388],[-107.525391,42.263602],[-109.042503,42.263602],[-109.075365,42.690804],[-110.05026,43.463052],[-110.055737,44.010746]]]},"id":"56013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.105994,43.999793],[-83.908824,43.912162],[-83.7007,43.594499],[-83.7007,43.479483],[-84.138855,43.567114],[-84.16624,43.567114],[-84.16624,43.82453],[-84.16624,43.994316],[-84.105994,43.999793]]]},"id":"26017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.407648,43.994316],[-101.062601,43.994316],[-101.062601,43.840961],[-101.226909,43.391852],[-101.900573,43.391852],[-102.108697,43.391852],[-102.141558,43.698561],[-102.004635,43.994316],[-101.407648,43.994316]]]},"id":"46071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.656367,43.917638],[-113.796488,43.567114],[-113.007808,43.282313],[-113.007808,43.112528],[-113.23784,42.625081],[-113.473348,42.668896],[-113.413102,43.200159],[-113.714333,43.200159],[-114.377043,43.200159],[-114.716614,43.813577],[-114.990461,43.857392],[-114.968553,43.939546],[-114.656367,43.917638]]]},"id":"16013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.047063,43.983362],[-111.047063,43.501391],[-111.397588,43.621884],[-111.397588,43.923115],[-111.047063,43.983362]]]},"id":"16081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.936655,43.983362],[-88.887363,43.983362],[-88.887363,43.895731],[-88.887363,43.632838],[-89.007855,43.632838],[-89.243364,43.643791],[-89.166687,43.983362],[-88.936655,43.983362]]]},"id":"55047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.166687,43.983362],[-89.243364,43.643791],[-89.599365,43.643791],[-89.599365,43.983362],[-89.166687,43.983362]]]},"id":"55077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.790635,43.961454],[-72.204602,43.769761],[-72.330572,43.599976],[-72.434634,43.233021],[-72.81802,43.254929],[-72.867312,43.298744],[-72.96042,43.82453],[-72.790635,43.961454]]]},"id":"50027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.824765,43.945023],[-123.140148,43.780715],[-123.107286,43.53973],[-122.132391,43.441145],[-122.280268,42.997512],[-123.227779,42.701758],[-123.715227,42.783912],[-123.813811,42.789389],[-123.874058,43.61093],[-124.147905,43.61093],[-124.219105,43.61093],[-124.158859,43.862869],[-123.824765,43.945023]]]},"id":"41019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.405392,43.939546],[-88.164407,43.890254],[-88.15893,43.545207],[-88.399915,43.545207],[-88.887363,43.632838],[-88.887363,43.895731],[-88.405392,43.939546]]]},"id":"55039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.329608,43.939546],[-98.324131,43.851915],[-98.318654,43.501391],[-98.685609,43.501391],[-98.707517,43.501391],[-98.795148,43.501391],[-98.806102,43.934069],[-98.329608,43.939546]]]},"id":"46003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.806102,43.934069],[-98.795148,43.501391],[-99.299026,43.501391],[-99.353796,43.934069],[-98.926594,43.934069],[-98.806102,43.934069]]]},"id":"46015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.978143,43.928592],[-111.397588,43.923115],[-111.397588,43.621884],[-111.627619,43.627361],[-111.978143,43.928592]]]},"id":"16065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.770067,43.890254],[-87.731728,43.890254],[-87.791975,43.545207],[-87.923421,43.545207],[-88.038437,43.53973],[-88.15893,43.545207],[-88.164407,43.890254],[-88.043914,43.890254],[-87.770067,43.890254]]]},"id":"55117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.97859,43.8793],[-116.71022,43.8081],[-116.51305,43.8081],[-116.51305,43.28779],[-116.989544,43.671176],[-117.027882,43.68213],[-116.97859,43.8793]]]},"id":"16027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.990461,43.857392],[-114.716614,43.813577],[-114.377043,43.200159],[-114.596121,43.200159],[-114.875445,43.200159],[-115.089045,43.200159],[-114.990461,43.857392]]]},"id":"16025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.365714,43.75333],[-72.96042,43.82453],[-72.867312,43.298744],[-73.256175,43.315175],[-73.365714,43.75333]]]},"id":"50021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.062601,43.840961],[-100.339645,43.714992],[-100.230106,43.714992],[-100.213675,43.391852],[-100.235583,43.391852],[-101.226909,43.391852],[-101.062601,43.840961]]]},"id":"46095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.417686,43.857392],[-102.809745,43.687607],[-103.001438,43.479483],[-103.937995,43.479483],[-104.053011,43.479483],[-104.053011,43.501391],[-104.053011,43.851915],[-103.417686,43.857392]]]},"id":"46033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.203638,43.851915],[-97.96813,43.851915],[-97.962653,43.501391],[-98.116007,43.495914],[-98.318654,43.501391],[-98.324131,43.851915],[-98.203638,43.851915]]]},"id":"46035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.853114,43.851915],[-97.606652,43.846438],[-97.606652,43.501391],[-97.962653,43.501391],[-97.96813,43.851915],[-97.853114,43.851915]]]},"id":"46061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.489356,43.846438],[-96.451017,43.851915],[-96.451017,43.501391],[-96.598895,43.501391],[-96.779634,43.501391],[-96.922034,43.501391],[-97.130158,43.501391],[-97.130158,43.846438],[-96.889173,43.846438],[-96.489356,43.846438]]]},"id":"46099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.451017,43.851915],[-96.062155,43.846438],[-96.051201,43.846438],[-96.051201,43.501391],[-96.451017,43.501391],[-96.451017,43.851915]]]},"id":"27133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.051201,43.846438],[-95.465168,43.846438],[-95.454214,43.846438],[-95.454214,43.501391],[-95.859508,43.501391],[-96.051201,43.501391],[-96.051201,43.846438]]]},"id":"27105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.491636,43.846438],[-97.371143,43.846438],[-97.130158,43.846438],[-97.130158,43.501391],[-97.404005,43.501391],[-97.606652,43.501391],[-97.606652,43.846438],[-97.491636,43.846438]]]},"id":"46087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.880052,43.846438],[-92.688359,43.846438],[-92.447374,43.835484],[-92.447374,43.501391],[-92.551436,43.501391],[-93.022453,43.501391],[-93.049837,43.501391],[-93.049837,43.846438],[-93.04436,43.846438],[-92.880052,43.846438]]]},"id":"27099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.164853,43.846438],[-93.049837,43.846438],[-93.049837,43.501391],[-93.498947,43.501391],[-93.646824,43.501391],[-93.646824,43.846438],[-93.405839,43.846438],[-93.164853,43.846438]]]},"id":"27047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.381651,43.846438],[-92.080419,43.846438],[-91.729895,43.846438],[-91.729895,43.501391],[-91.850387,43.501391],[-92.080419,43.501391],[-92.447374,43.501391],[-92.447374,43.835484],[-92.381651,43.846438]]]},"id":"27045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.893286,43.846438],[-93.767317,43.846438],[-93.646824,43.846438],[-93.646824,43.501391],[-93.969963,43.501391],[-94.249287,43.501391],[-94.249287,43.846438],[-93.893286,43.846438]]]},"id":"27043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.114644,43.846438],[-94.857228,43.846438],[-94.851751,43.846438],[-94.851751,43.501391],[-94.917474,43.501391],[-95.092736,43.501391],[-95.388491,43.501391],[-95.454214,43.501391],[-95.454214,43.846438],[-95.114644,43.846438]]]},"id":"27063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.616242,43.846438],[-94.36978,43.846438],[-94.249287,43.846438],[-94.249287,43.501391],[-94.44098,43.501391],[-94.676489,43.501391],[-94.851751,43.501391],[-94.851751,43.846438],[-94.616242,43.846438]]]},"id":"27091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.373894,43.846438],[-91.286263,43.846438],[-91.258878,43.725946],[-91.215062,43.501391],[-91.368417,43.501391],[-91.609402,43.501391],[-91.729895,43.501391],[-91.729895,43.846438],[-91.373894,43.846438]]]},"id":"27055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.368887,43.830007],[-84.16624,43.82453],[-84.16624,43.567114],[-84.368887,43.468529],[-84.609872,43.468529],[-84.604395,43.813577],[-84.368887,43.830007]]]},"id":"26111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.433693,43.819054],[-86.039354,43.813577],[-86.039354,43.468529],[-86.411786,43.474006],[-86.461078,43.474006],[-86.433693,43.819054]]]},"id":"26127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.63406,43.813577],[-85.56286,43.813577],[-85.56286,43.468529],[-85.56286,43.293267],[-85.792891,43.293267],[-86.039354,43.468529],[-86.039354,43.813577],[-85.63406,43.813577]]]},"id":"26123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.540952,43.813577],[-85.086366,43.813577],[-85.086366,43.468529],[-85.551906,43.468529],[-85.56286,43.468529],[-85.56286,43.813577],[-85.540952,43.813577]]]},"id":"26107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.752273,43.813577],[-84.604395,43.813577],[-84.609872,43.468529],[-84.774181,43.468529],[-84.845381,43.468529],[-85.086366,43.468529],[-85.086366,43.813577],[-84.752273,43.813577]]]},"id":"26073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.780598,43.813577],[-70.353397,43.534253],[-70.703921,43.057759],[-70.818936,43.123482],[-70.961337,43.53973],[-70.988722,43.791669],[-70.780598,43.813577]]]},"id":"23031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.376668,43.8081],[-73.365714,43.75333],[-73.256175,43.315175],[-73.272606,42.942743],[-73.387622,42.94822],[-73.634084,42.942743],[-73.595745,43.304221],[-73.436914,43.802623],[-73.376668,43.8081]]]},"id":"36115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.51305,43.8081],[-116.283018,43.8081],[-115.97631,43.589022],[-116.266588,43.112528],[-116.51305,43.28779],[-116.51305,43.8081]]]},"id":"16001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.853161,43.764284],[-73.436914,43.802623],[-73.595745,43.304221],[-73.886023,43.397329],[-74.15987,43.369944],[-74.055808,43.742376],[-73.853161,43.764284]]]},"id":"36113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.665981,43.75333],[-99.534535,43.501391],[-99.534535,42.997512],[-100.126044,42.997512],[-100.197245,42.997512],[-100.213675,43.391852],[-100.230106,43.714992],[-99.665981,43.75333]]]},"id":"46123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.530939,43.764284],[-71.163984,43.53973],[-71.235184,43.282313],[-71.728109,43.561637],[-71.530939,43.764284]]]},"id":"33001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.311367,43.731422],[-90.311367,43.638314],[-90.311367,43.55616],[-90.667368,43.424714],[-90.9686,43.424714],[-91.204109,43.424714],[-91.215062,43.501391],[-91.258878,43.725946],[-90.908354,43.725946],[-90.311367,43.731422]]]},"id":"55123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.465192,43.725946],[-83.120145,43.676653],[-83.120145,43.326129],[-83.191345,43.326129],[-83.459715,43.222067],[-83.465192,43.222067],[-83.695223,43.222067],[-83.7007,43.479483],[-83.7007,43.594499],[-83.465192,43.731422],[-83.465192,43.725946]]]},"id":"26157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.087753,43.671176],[-75.775568,43.687607],[-75.75366,43.468529],[-75.885106,43.156344],[-75.994645,43.183728],[-76.169907,43.249452],[-76.476616,43.227544],[-76.619016,43.419237],[-76.202769,43.68213],[-76.087753,43.671176]]]},"id":"36075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.256574,43.687607],[-102.141558,43.698561],[-102.108697,43.391852],[-102.081312,42.997512],[-102.081312,42.997512],[-102.793314,42.997512],[-103.001438,43.002989],[-103.001438,43.479483],[-102.809745,43.687607],[-102.256574,43.687607]]]},"id":"46113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.69842,43.687607],[-82.605312,43.693084],[-82.50125,43.167298],[-82.566974,43.167298],[-82.994175,43.156344],[-83.120145,43.326129],[-83.120145,43.676653],[-82.69842,43.687607]]]},"id":"26151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.989544,43.671176],[-116.51305,43.28779],[-116.266588,43.112528],[-115.039753,42.767481],[-115.039753,41.995232],[-117.016928,42.000709],[-117.027882,42.000709],[-117.027882,43.68213],[-116.989544,43.671176]]]},"id":"16073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.243364,43.643791],[-89.007855,43.632838],[-89.007855,43.282313],[-89.413149,43.293267],[-89.719858,43.293267],[-89.785581,43.638314],[-89.599365,43.643791],[-89.243364,43.643791]]]},"id":"55021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.294936,43.643791],[-89.785581,43.638314],[-89.719858,43.293267],[-89.84035,43.205636],[-90.196352,43.161821],[-90.190875,43.55616],[-90.311367,43.55616],[-90.311367,43.638314],[-90.294936,43.643791]]]},"id":"55111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.887363,43.632838],[-88.399915,43.545207],[-88.416346,43.194682],[-88.536839,43.194682],[-88.991425,43.200159],[-89.007855,43.200159],[-89.007855,43.282313],[-89.007855,43.632838],[-88.887363,43.632838]]]},"id":"55027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.775497,43.627361],[-111.627619,43.627361],[-111.397588,43.621884],[-111.047063,43.501391],[-111.047063,43.315175],[-111.041587,43.01942],[-111.589281,43.01942],[-111.589281,43.282313],[-112.52036,43.424714],[-112.52036,43.627361],[-111.775497,43.627361]]]},"id":"16019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.695623,43.621884],[-112.52036,43.627361],[-112.52036,43.424714],[-111.589281,43.282313],[-111.589281,43.01942],[-112.065774,43.024897],[-112.388914,43.01942],[-112.750392,42.953697],[-113.007808,43.112528],[-113.007808,43.282313],[-112.695623,43.621884]]]},"id":"16011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.130111,43.616407],[-119.897799,43.61093],[-119.941615,42.745573],[-119.366536,42.75105],[-119.361059,41.995232],[-120.001861,41.995232],[-120.878171,41.995232],[-120.883648,42.745573],[-121.349188,42.745573],[-121.332757,43.616407],[-121.130111,43.616407]]]},"id":"41037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.486112,43.616407],[-121.332757,43.616407],[-121.349188,42.745573],[-120.883648,42.745573],[-120.878171,41.995232],[-121.316327,41.995232],[-121.447773,41.995232],[-122.291222,42.006186],[-122.280268,42.992036],[-122.280268,42.997512],[-122.132391,43.441145],[-122.000944,43.616407],[-121.486112,43.616407]]]},"id":"41035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.112858,43.616407],[-75.211443,42.882497],[-75.249781,42.871543],[-75.885106,43.156344],[-75.75366,43.468529],[-75.112858,43.616407]]]},"id":"36065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.81574,43.545207],[-71.728109,43.561637],[-71.235184,43.282313],[-71.246138,43.276836],[-71.394015,43.008466],[-71.914325,43.205636],[-72.007433,43.189205],[-71.936232,43.528776],[-71.81574,43.545207]]]},"id":"33013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.147905,43.61093],[-123.874058,43.61093],[-123.813811,42.789389],[-124.295782,42.953697],[-124.481998,42.953697],[-124.219105,43.61093],[-124.147905,43.61093]]]},"id":"41011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.330572,43.599976],[-71.936232,43.528776],[-72.007433,43.189205],[-72.040294,43.128959],[-72.199125,43.178252],[-72.451065,43.161821],[-72.434634,43.233021],[-72.330572,43.599976]]]},"id":"33019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.109214,43.506868],[-70.961337,43.53973],[-70.818936,43.123482],[-71.246138,43.276836],[-71.235184,43.282313],[-71.163984,43.53973],[-71.109214,43.506868]]]},"id":"33017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.138855,43.567114],[-83.7007,43.479483],[-83.695223,43.222067],[-83.930732,43.134436],[-83.941686,43.134436],[-84.368887,43.128959],[-84.368887,43.468529],[-84.16624,43.567114],[-84.138855,43.567114]]]},"id":"26145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.190875,43.55616],[-90.196352,43.161821],[-90.294936,43.205636],[-90.43186,43.200159],[-90.552353,43.205636],[-90.667368,43.172775],[-90.667368,43.424714],[-90.311367,43.55616],[-90.190875,43.55616]]]},"id":"55103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.399915,43.545207],[-88.15893,43.545207],[-88.038437,43.53973],[-88.065822,43.194682],[-88.416346,43.194682],[-88.399915,43.545207]]]},"id":"55131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.923421,43.545207],[-87.791975,43.545207],[-87.89056,43.194682],[-87.972714,43.194682],[-88.065822,43.194682],[-88.038437,43.53973],[-87.923421,43.545207]]]},"id":"55089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.053011,43.501391],[-104.053011,43.479483],[-104.053011,43.002989],[-104.053011,42.614127],[-104.655474,42.60865],[-104.890983,42.60865],[-104.901936,43.501391],[-104.053011,43.501391]]]},"id":"56027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.536345,43.501391],[-107.109143,43.501391],[-106.079479,43.495914],[-106.074002,42.433388],[-107.037943,42.433388],[-107.525391,42.433388],[-107.536345,43.501391]]]},"id":"56025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.092736,43.501391],[-94.917474,43.501391],[-94.911997,43.254929],[-95.169413,43.254929],[-95.388491,43.254929],[-95.388491,43.501391],[-95.092736,43.501391]]]},"id":"19059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.368417,43.501391],[-91.215062,43.501391],[-91.204109,43.424714],[-91.176724,43.079667],[-91.565587,43.079667],[-91.603925,43.079667],[-91.609402,43.501391],[-91.368417,43.501391]]]},"id":"19005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.850387,43.501391],[-91.729895,43.501391],[-91.609402,43.501391],[-91.603925,43.079667],[-92.080419,43.085144],[-92.080419,43.211113],[-92.080419,43.501391],[-91.850387,43.501391]]]},"id":"19191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.080419,43.501391],[-92.080419,43.211113],[-92.255681,43.211113],[-92.556913,43.211113],[-92.551436,43.501391],[-92.447374,43.501391],[-92.080419,43.501391]]]},"id":"19089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.454214,43.501391],[-95.388491,43.501391],[-95.388491,43.254929],[-95.574707,43.254929],[-95.859508,43.254929],[-95.859508,43.501391],[-95.454214,43.501391]]]},"id":"19143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.676489,43.501391],[-94.44098,43.501391],[-94.44098,43.254929],[-94.588858,43.254929],[-94.911997,43.254929],[-94.917474,43.501391],[-94.851751,43.501391],[-94.676489,43.501391]]]},"id":"19063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.249287,43.501391],[-93.969963,43.501391],[-93.969963,43.254929],[-93.969963,42.909881],[-94.090456,42.909881],[-94.44098,42.909881],[-94.44098,43.254929],[-94.44098,43.501391],[-94.249287,43.501391]]]},"id":"19109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.779634,43.501391],[-96.598895,43.501391],[-96.555079,43.260406],[-96.456494,43.085144],[-96.626279,43.085144],[-96.807019,43.085144],[-96.922034,43.085144],[-96.922034,43.501391],[-96.779634,43.501391]]]},"id":"46083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.451017,43.501391],[-96.051201,43.501391],[-95.859508,43.501391],[-95.859508,43.254929],[-96.555079,43.260406],[-96.598895,43.501391],[-96.451017,43.501391]]]},"id":"19119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.922034,43.501391],[-96.922034,43.085144],[-97.157543,43.085144],[-97.343759,43.167298],[-97.398528,43.167298],[-97.404005,43.501391],[-97.130158,43.501391],[-96.922034,43.501391]]]},"id":"46125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.551436,43.501391],[-92.556913,43.211113],[-92.797898,43.211113],[-93.022453,43.211113],[-93.022453,43.254929],[-93.022453,43.501391],[-92.551436,43.501391]]]},"id":"19131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.299026,43.501391],[-98.795148,43.501391],[-98.707517,43.501391],[-98.11053,43.194682],[-98.077669,43.167298],[-98.154346,42.838681],[-98.3077,42.882497],[-98.499393,42.997512],[-99.299026,43.501391],[-99.299026,43.501391]]]},"id":"46023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.606652,43.501391],[-97.404005,43.501391],[-97.398528,43.167298],[-97.639513,43.167298],[-97.754529,43.167298],[-98.077669,43.167298],[-98.11053,43.194682],[-98.116007,43.495914],[-97.962653,43.501391],[-97.606652,43.501391]]]},"id":"46067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.534535,43.501391],[-99.299026,43.501391],[-98.499393,42.997512],[-99.255211,42.997512],[-99.534535,42.997512],[-99.534535,43.501391]]]},"id":"46053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.901936,43.501391],[-104.890983,42.60865],[-105.285322,42.433388],[-106.074002,42.433388],[-106.074002,42.433388],[-106.079479,43.495914],[-106.019232,43.495914],[-105.077198,43.495914],[-104.901936,43.501391]]]},"id":"56009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.646824,43.501391],[-93.498947,43.501391],[-93.498947,43.254929],[-93.570147,43.254929],[-93.969963,43.254929],[-93.969963,43.501391],[-93.646824,43.501391]]]},"id":"19189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.022453,43.501391],[-93.022453,43.254929],[-93.055314,43.254929],[-93.498947,43.254929],[-93.498947,43.501391],[-93.049837,43.501391],[-93.022453,43.501391]]]},"id":"19195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.685609,43.501391],[-98.318654,43.501391],[-98.116007,43.495914],[-98.11053,43.194682],[-98.707517,43.501391],[-98.685609,43.501391]]]},"id":"46043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.937995,43.479483],[-103.001438,43.479483],[-103.001438,43.002989],[-103.324578,43.002989],[-103.505317,43.002989],[-104.053011,43.002989],[-104.053011,43.479483],[-103.937995,43.479483]]]},"id":"46047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.411786,43.474006],[-86.039354,43.468529],[-85.792891,43.293267],[-85.792891,43.205636],[-86.269385,43.118005],[-86.461078,43.474006],[-86.411786,43.474006]]]},"id":"26121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.551906,43.468529],[-85.086366,43.468529],[-84.845381,43.468529],[-84.834427,43.118005],[-85.075412,43.118005],[-85.310921,43.118005],[-85.524521,43.293267],[-85.56286,43.293267],[-85.56286,43.468529],[-85.551906,43.468529]]]},"id":"26117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.774181,43.468529],[-84.609872,43.468529],[-84.368887,43.468529],[-84.368887,43.128959],[-84.368887,43.118005],[-84.719411,43.118005],[-84.834427,43.118005],[-84.845381,43.468529],[-84.774181,43.468529]]]},"id":"26057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.05026,43.463052],[-109.075365,42.690804],[-109.042503,42.263602],[-110.055737,42.269079],[-110.543185,42.280033],[-110.576047,43.233021],[-110.05026,43.463052]]]},"id":"56035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.9686,43.424714],[-90.667368,43.424714],[-90.667368,43.172775],[-91.154816,42.986559],[-91.176724,43.079667],[-91.204109,43.424714],[-90.9686,43.424714]]]},"id":"55023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.619016,43.419237],[-76.476616,43.227544],[-76.273969,42.772958],[-76.263015,42.625081],[-76.460185,42.625081],[-76.668309,42.625081],[-76.712124,43.024897],[-76.723078,43.34256],[-76.619016,43.419237]]]},"id":"36011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.886023,43.397329],[-73.595745,43.304221],[-73.634084,42.942743],[-73.677899,42.783912],[-73.809346,42.778435],[-74.094147,42.953697],[-74.099624,42.981082],[-74.137962,43.254929],[-74.15987,43.369944],[-73.886023,43.397329]]]},"id":"36091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.235583,43.391852],[-100.213675,43.391852],[-100.197245,42.997512],[-101.226909,42.997512],[-101.226909,43.391852],[-100.235583,43.391852]]]},"id":"46121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.900573,43.391852],[-101.226909,43.391852],[-101.226909,42.997512],[-102.081312,42.997512],[-102.108697,43.391852],[-101.900573,43.391852]]]},"id":"46007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.993728,43.364467],[-77.999205,43.134436],[-78.464745,43.128959],[-78.464745,43.369944],[-77.993728,43.364467]]]},"id":"36073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.464745,43.369944],[-78.464745,43.128959],[-78.464745,43.09062],[-78.552376,43.096097],[-79.023393,43.068713],[-78.464745,43.369944]]]},"id":"36063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.374834,43.276836],[-77.369357,43.035851],[-77.582958,42.942743],[-77.823943,42.986559],[-77.911574,42.986559],[-77.906097,43.128959],[-77.999205,43.134436],[-77.993728,43.364467],[-77.374834,43.276836]]]},"id":"36055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.723078,43.34256],[-76.712124,43.024897],[-76.964064,43.013943],[-77.122895,43.013943],[-77.369357,43.035851],[-77.374834,43.276836],[-76.723078,43.34256]]]},"id":"36117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.191345,43.326129],[-83.120145,43.326129],[-82.994175,43.156344],[-82.983221,42.893451],[-83.098237,42.887974],[-83.454238,42.882497],[-83.459715,43.222067],[-83.191345,43.326129]]]},"id":"26087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.047063,43.315175],[-110.576047,43.233021],[-110.543185,42.280033],[-110.055737,42.269079],[-110.05026,41.578985],[-111.047063,41.578985],[-111.047063,42.000709],[-111.047063,42.515542],[-111.041587,43.01942],[-111.047063,43.315175]]]},"id":"56023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.256175,43.315175],[-72.867312,43.298744],[-72.81802,43.254929],[-72.927559,42.740096],[-73.020667,42.740096],[-73.267129,42.745573],[-73.272606,42.942743],[-73.256175,43.315175]]]},"id":"50003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.524521,43.293267],[-85.310921,43.118005],[-85.310921,42.767481],[-85.546429,42.767481],[-85.781938,42.767481],[-85.792891,43.205636],[-85.792891,43.293267],[-85.56286,43.293267],[-85.524521,43.293267]]]},"id":"26081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.413149,43.293267],[-89.007855,43.282313],[-89.007855,43.200159],[-89.013332,42.849635],[-89.051671,42.849635],[-89.369334,42.844158],[-89.84035,42.855112],[-89.84035,43.205636],[-89.719858,43.293267],[-89.413149,43.293267]]]},"id":"55025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.713041,43.28779],[-74.137962,43.254929],[-74.099624,42.981082],[-74.581595,42.997512],[-74.762334,43.046805],[-74.713041,43.28779]]]},"id":"36035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.246138,43.276836],[-70.818936,43.123482],[-70.703921,43.057759],[-70.818936,42.871543],[-70.917521,42.887974],[-71.246138,42.740096],[-71.394015,43.008466],[-71.246138,43.276836]]]},"id":"33015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.169907,43.249452],[-75.994645,43.183728],[-75.978214,43.167298],[-75.89606,42.789389],[-75.917968,42.789389],[-76.273969,42.772958],[-76.476616,43.227544],[-76.169907,43.249452]]]},"id":"36067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.81802,43.254929],[-72.434634,43.233021],[-72.451065,43.161821],[-72.456542,42.729142],[-72.927559,42.740096],[-72.81802,43.254929]]]},"id":"50025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.555079,43.260406],[-95.859508,43.254929],[-95.859508,42.909881],[-96.17717,42.909881],[-96.538648,42.909881],[-96.456494,43.085144],[-96.555079,43.260406]]]},"id":"19167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.574707,43.254929],[-95.388491,43.254929],[-95.388491,42.909881],[-95.415876,42.909881],[-95.859508,42.909881],[-95.859508,43.254929],[-95.574707,43.254929]]]},"id":"19141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.055314,43.254929],[-93.022453,43.254929],[-93.022453,43.211113],[-93.022453,42.909881],[-93.487993,42.909881],[-93.498947,42.909881],[-93.498947,43.254929],[-93.055314,43.254929]]]},"id":"19033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.570147,43.254929],[-93.498947,43.254929],[-93.498947,42.909881],[-93.526331,42.909881],[-93.969963,42.909881],[-93.969963,43.254929],[-93.570147,43.254929]]]},"id":"19081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.169413,43.254929],[-94.911997,43.254929],[-94.911997,42.909881],[-95.251567,42.909881],[-95.388491,42.909881],[-95.388491,43.254929],[-95.169413,43.254929]]]},"id":"19041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.588858,43.254929],[-94.44098,43.254929],[-94.44098,42.909881],[-94.911997,42.909881],[-94.911997,43.254929],[-94.588858,43.254929]]]},"id":"19147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.465192,43.222067],[-83.459715,43.222067],[-83.454238,42.882497],[-83.684269,42.783912],[-83.925255,42.778435],[-83.930732,43.134436],[-83.695223,43.222067],[-83.465192,43.222067]]]},"id":"26049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.255681,43.211113],[-92.080419,43.211113],[-92.080419,43.085144],[-92.080419,42.904404],[-92.387128,42.909881],[-92.556913,42.904404],[-92.556913,43.211113],[-92.255681,43.211113]]]},"id":"19037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.797898,43.211113],[-92.556913,43.211113],[-92.556913,42.904404],[-93.022453,42.909881],[-93.022453,43.211113],[-92.797898,43.211113]]]},"id":"19067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.552353,43.205636],[-90.43186,43.200159],[-90.426383,42.811297],[-90.426383,42.504588],[-90.639984,42.510065],[-90.8974,42.674373],[-91.154816,42.986559],[-90.667368,43.172775],[-90.552353,43.205636]]]},"id":"55043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.294936,43.205636],[-90.196352,43.161821],[-89.84035,43.205636],[-89.84035,42.855112],[-89.84035,42.811297],[-90.30589,42.816773],[-90.426383,42.811297],[-90.43186,43.200159],[-90.294936,43.205636]]]},"id":"55049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.914325,43.205636],[-71.394015,43.008466],[-71.246138,42.740096],[-71.257092,42.734619],[-71.897894,42.712712],[-71.930755,42.712712],[-72.040294,43.128959],[-72.007433,43.189205],[-71.914325,43.205636]]]},"id":"33011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.792891,43.205636],[-85.781938,42.767481],[-86.044831,42.767481],[-86.209139,42.767481],[-86.269385,43.118005],[-85.792891,43.205636]]]},"id":"26139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.377043,43.200159],[-113.714333,43.200159],[-113.933411,42.767481],[-114.596121,42.849635],[-114.596121,43.200159],[-114.377043,43.200159]]]},"id":"16063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.714333,43.200159],[-113.413102,43.200159],[-113.473348,42.668896],[-113.933411,42.537449],[-113.933411,42.767481],[-113.714333,43.200159]]]},"id":"16067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.875445,43.200159],[-114.596121,43.200159],[-114.596121,42.849635],[-114.618029,42.646988],[-115.039753,42.909881],[-115.089045,43.200159],[-114.875445,43.200159]]]},"id":"16047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.991425,43.200159],[-88.536839,43.194682],[-88.542316,42.844158],[-88.547792,42.844158],[-88.777824,42.844158],[-89.013332,42.849635],[-89.007855,43.200159],[-88.991425,43.200159]]]},"id":"55055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.536839,43.194682],[-88.416346,43.194682],[-88.065822,43.194682],[-88.071299,42.844158],[-88.306807,42.844158],[-88.542316,42.844158],[-88.536839,43.194682]]]},"id":"55133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.972714,43.194682],[-87.89056,43.194682],[-87.824836,42.844158],[-87.956283,42.844158],[-88.071299,42.844158],[-88.065822,43.194682],[-87.972714,43.194682]]]},"id":"55079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.978214,43.167298],[-75.994645,43.183728],[-75.885106,43.156344],[-75.249781,42.871543],[-75.293597,42.745573],[-75.310028,42.745573],[-75.890583,42.723665],[-75.89606,42.789389],[-75.978214,43.167298]]]},"id":"36053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.199125,43.178252],[-72.040294,43.128959],[-71.930755,42.712712],[-72.28128,42.723665],[-72.456542,42.729142],[-72.451065,43.161821],[-72.199125,43.178252]]]},"id":"33005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.343759,43.167298],[-97.157543,43.085144],[-97.16302,42.800343],[-97.486159,42.849635],[-97.634037,42.849635],[-97.639513,43.167298],[-97.398528,43.167298],[-97.343759,43.167298]]]},"id":"46135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.754529,43.167298],[-97.639513,43.167298],[-97.634037,42.849635],[-98.154346,42.838681],[-98.077669,43.167298],[-97.754529,43.167298]]]},"id":"46009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.566974,43.167298],[-82.50125,43.167298],[-82.703897,42.685327],[-82.742236,42.898928],[-82.983221,42.893451],[-82.994175,43.156344],[-82.566974,43.167298]]]},"id":"26147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.906097,43.128959],[-77.911574,42.986559],[-77.95539,42.860589],[-78.09779,42.871543],[-78.464745,42.866066],[-78.464745,43.09062],[-78.464745,43.128959],[-77.999205,43.134436],[-77.906097,43.128959]]]},"id":"36037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.941686,43.134436],[-83.930732,43.134436],[-83.925255,42.778435],[-84.160763,42.778435],[-84.270302,42.778435],[-84.36341,42.778435],[-84.368887,43.118005],[-84.368887,43.128959],[-83.941686,43.134436]]]},"id":"26155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.075412,43.118005],[-84.834427,43.118005],[-84.834427,42.772958],[-85.075412,42.772958],[-85.130182,42.772958],[-85.310921,42.767481],[-85.310921,43.118005],[-85.075412,43.118005]]]},"id":"26067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.719411,43.118005],[-84.368887,43.118005],[-84.36341,42.778435],[-84.604395,42.767481],[-84.834427,42.772958],[-84.834427,43.118005],[-84.719411,43.118005]]]},"id":"26037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.421776,42.504588],[-113.002331,42.329326],[-113.23784,42.625081],[-113.007808,43.112528],[-112.750392,42.953697],[-112.421776,42.504588]]]},"id":"16077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.552376,43.096097],[-78.464745,43.09062],[-78.464745,42.866066],[-78.464745,42.537449],[-79.001485,42.531973],[-79.061732,42.537449],[-79.138409,42.570311],[-79.138409,42.570311],[-79.023393,43.068713],[-78.552376,43.096097]]]},"id":"36029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.807019,43.085144],[-96.807019,42.701758],[-97.015142,42.762004],[-97.16302,42.800343],[-97.157543,43.085144],[-96.922034,43.085144],[-96.807019,43.085144]]]},"id":"46027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.626279,43.085144],[-96.456494,43.085144],[-96.538648,42.909881],[-96.50031,42.559357],[-96.44554,42.488157],[-96.631756,42.526496],[-96.807019,42.701758],[-96.807019,43.085144],[-96.626279,43.085144]]]},"id":"46127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.080419,43.085144],[-91.603925,43.079667],[-91.609402,42.641511],[-91.905157,42.641511],[-92.080419,42.641511],[-92.080419,42.904404],[-92.080419,43.085144]]]},"id":"19065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.565587,43.079667],[-91.176724,43.079667],[-91.154816,42.986559],[-90.8974,42.674373],[-90.8974,42.657942],[-91.132908,42.646988],[-91.204109,42.646988],[-91.609402,42.641511],[-91.603925,43.079667],[-91.565587,43.079667]]]},"id":"19043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.581595,42.997512],[-74.099624,42.981082],[-74.094147,42.953697],[-74.263932,42.794866],[-74.647318,42.827727],[-74.762334,42.860589],[-74.762334,43.046805],[-74.581595,42.997512]]]},"id":"36057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.122895,43.013943],[-76.964064,43.013943],[-76.975017,42.762004],[-77.36388,42.575788],[-77.48985,42.575788],[-77.582958,42.942743],[-77.369357,43.035851],[-77.122895,43.013943]]]},"id":"36069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.712124,43.024897],[-76.668309,42.625081],[-76.695693,42.548403],[-76.70117,42.548403],[-76.892863,42.542926],[-76.975017,42.762004],[-76.964064,43.013943],[-76.712124,43.024897]]]},"id":"36099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.065774,43.024897],[-111.589281,43.01942],[-111.041587,43.01942],[-111.047063,42.515542],[-111.468788,42.592219],[-111.600234,42.416957],[-111.835743,42.416957],[-111.874081,42.416957],[-112.065774,43.024897]]]},"id":"16029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.388914,43.01942],[-112.065774,43.024897],[-111.874081,42.416957],[-112.126021,42.28551],[-112.421776,42.504588],[-112.750392,42.953697],[-112.388914,43.01942]]]},"id":"16005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.505317,43.002989],[-103.44507,42.438865],[-103.401255,42.006186],[-103.456024,42.006186],[-104.053011,42.000709],[-104.053011,42.614127],[-104.053011,43.002989],[-103.505317,43.002989]]]},"id":"31165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.324578,43.002989],[-103.001438,43.002989],[-102.793314,42.997512],[-102.771407,42.438865],[-103.44507,42.438865],[-103.505317,43.002989],[-103.324578,43.002989]]]},"id":"31045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.081312,42.997512],[-102.004635,42.093817],[-102.064881,42.011663],[-102.240143,42.006186],[-102.678299,42.006186],[-102.700206,42.006186],[-102.771407,42.438865],[-102.793314,42.997512],[-102.081312,42.997512]]]},"id":"31161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.081312,42.997512],[-102.081312,42.997512],[-101.226909,42.997512],[-100.197245,42.997512],[-100.197245,42.844158],[-100.16986,42.08834],[-100.268445,42.08834],[-100.843524,42.08834],[-101.424079,42.093817],[-102.004635,42.093817],[-102.081312,42.997512]]]},"id":"31031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.126044,42.997512],[-99.534535,42.997512],[-99.255211,42.997512],[-99.255211,42.80582],[-99.676935,42.729142],[-100.175337,42.833204],[-100.197245,42.844158],[-100.197245,42.997512],[-100.126044,42.997512]]]},"id":"31103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.499393,42.997512],[-98.3077,42.882497],[-98.3077,42.762004],[-98.997795,42.887974],[-99.255211,42.80582],[-99.255211,42.997512],[-98.499393,42.997512]]]},"id":"31015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.280268,42.992036],[-122.291222,42.006186],[-123.233256,42.006186],[-123.227779,42.701758],[-122.280268,42.997512],[-122.280268,42.992036]]]},"id":"41029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.823943,42.986559],[-77.582958,42.942743],[-77.48985,42.575788],[-77.648681,42.581265],[-77.725358,42.471726],[-78.037544,42.521019],[-77.95539,42.860589],[-77.911574,42.986559],[-77.823943,42.986559]]]},"id":"36051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.387622,42.94822],[-73.272606,42.942743],[-73.267129,42.745573],[-73.35476,42.510065],[-73.398575,42.504588],[-73.781961,42.466249],[-73.677899,42.783912],[-73.634084,42.942743],[-73.387622,42.94822]]]},"id":"36083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.094147,42.953697],[-73.809346,42.778435],[-74.181778,42.729142],[-74.263932,42.794866],[-74.094147,42.953697]]]},"id":"36093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.295782,42.953697],[-123.813811,42.789389],[-123.715227,42.783912],[-124.027412,42.35671],[-123.819288,41.995232],[-124.213628,42.000709],[-124.481998,42.953697],[-124.295782,42.953697]]]},"id":"41015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.039753,42.909881],[-114.618029,42.646988],[-113.999134,42.526496],[-114.283935,41.995232],[-115.039753,41.995232],[-115.039753,42.767481],[-115.039753,42.909881]]]},"id":"16083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.415876,42.909881],[-95.388491,42.909881],[-95.388491,42.559357],[-95.465168,42.559357],[-95.739015,42.559357],[-95.859508,42.559357],[-95.859508,42.909881],[-95.415876,42.909881]]]},"id":"19035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.17717,42.909881],[-95.859508,42.909881],[-95.859508,42.559357],[-96.50031,42.559357],[-96.538648,42.909881],[-96.17717,42.909881]]]},"id":"19149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.251567,42.909881],[-94.911997,42.909881],[-94.911997,42.559357],[-95.388491,42.559357],[-95.388491,42.909881],[-95.251567,42.909881]]]},"id":"19021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.44098,42.909881],[-94.44098,42.646988],[-94.44098,42.559357],[-94.616242,42.559357],[-94.911997,42.559357],[-94.911997,42.909881],[-94.44098,42.909881]]]},"id":"19151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.526331,42.909881],[-93.498947,42.909881],[-93.498947,42.559357],[-93.893286,42.559357],[-93.969963,42.559357],[-93.969963,42.646988],[-93.969963,42.909881],[-93.526331,42.909881]]]},"id":"19197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.487993,42.909881],[-93.022453,42.909881],[-93.02793,42.55388],[-93.263438,42.559357],[-93.498947,42.559357],[-93.498947,42.909881],[-93.487993,42.909881]]]},"id":"19069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.096427,42.904404],[-74.762334,42.860589],[-74.647318,42.827727],[-74.713041,42.515542],[-74.844488,42.510065],[-75.414089,42.312895],[-75.293597,42.745573],[-75.249781,42.871543],[-75.211443,42.882497],[-75.096427,42.904404]]]},"id":"36077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.090456,42.909881],[-93.969963,42.909881],[-93.969963,42.646988],[-94.44098,42.646988],[-94.44098,42.909881],[-94.090456,42.909881]]]},"id":"19091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.022453,42.909881],[-92.556913,42.904404],[-92.556913,42.641511],[-92.551436,42.55388],[-92.907437,42.55388],[-93.02793,42.55388],[-93.022453,42.909881]]]},"id":"19023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.387128,42.909881],[-92.080419,42.904404],[-92.080419,42.641511],[-92.469282,42.641511],[-92.556913,42.641511],[-92.556913,42.904404],[-92.387128,42.909881]]]},"id":"19017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.742236,42.898928],[-82.703897,42.685327],[-82.868205,42.449818],[-82.879159,42.449818],[-83.081806,42.449818],[-83.098237,42.887974],[-82.983221,42.893451],[-82.742236,42.898928]]]},"id":"26099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.997795,42.887974],[-98.3077,42.762004],[-98.302223,42.438865],[-98.302223,42.08834],[-98.762286,42.08834],[-99.222349,42.08834],[-99.233303,42.08834],[-99.255211,42.80582],[-98.997795,42.887974]]]},"id":"31089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.098237,42.887974],[-83.081806,42.449818],[-83.552823,42.433388],[-83.662362,42.433388],[-83.684269,42.783912],[-83.454238,42.882497],[-83.098237,42.887974]]]},"id":"26125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.917521,42.887974],[-70.818936,42.871543],[-70.961337,42.444341],[-71.02706,42.444341],[-71.257092,42.734619],[-71.246138,42.740096],[-70.917521,42.887974]]]},"id":"25009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.3077,42.882497],[-98.154346,42.838681],[-97.634037,42.849635],[-97.486159,42.849635],[-97.486159,42.438865],[-97.836683,42.438865],[-98.302223,42.438865],[-98.3077,42.762004],[-98.3077,42.882497]]]},"id":"31107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.09779,42.871543],[-77.95539,42.860589],[-78.037544,42.521019],[-78.22376,42.521019],[-78.311391,42.521019],[-78.464745,42.537449],[-78.464745,42.866066],[-78.09779,42.871543]]]},"id":"36121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.486159,42.849635],[-97.16302,42.800343],[-97.015142,42.762004],[-97.015142,42.351234],[-97.365666,42.351234],[-97.365666,42.438865],[-97.486159,42.438865],[-97.486159,42.849635]]]},"id":"31027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.84035,42.855112],[-89.369334,42.844158],[-89.363857,42.499111],[-89.402195,42.499111],[-89.84035,42.504588],[-89.84035,42.811297],[-89.84035,42.855112]]]},"id":"55045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.596121,42.849635],[-113.933411,42.767481],[-113.933411,42.537449],[-113.999134,42.526496],[-114.618029,42.646988],[-114.596121,42.849635]]]},"id":"16053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.051671,42.849635],[-89.013332,42.849635],[-88.777824,42.844158],[-88.777824,42.493634],[-88.942132,42.493634],[-89.363857,42.499111],[-89.369334,42.844158],[-89.051671,42.849635]]]},"id":"55105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.175337,42.833204],[-99.676935,42.729142],[-99.660504,42.08834],[-99.687889,42.08834],[-100.16986,42.08834],[-100.197245,42.844158],[-100.175337,42.833204]]]},"id":"31017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.956283,42.844158],[-87.824836,42.844158],[-87.808406,42.668896],[-88.027483,42.668896],[-88.306807,42.60865],[-88.306807,42.844158],[-88.071299,42.844158],[-87.956283,42.844158]]]},"id":"55101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.547792,42.844158],[-88.542316,42.844158],[-88.306807,42.844158],[-88.306807,42.60865],[-88.306807,42.493634],[-88.706624,42.493634],[-88.777824,42.493634],[-88.777824,42.844158],[-88.547792,42.844158]]]},"id":"55127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.647318,42.827727],[-74.263932,42.794866],[-74.181778,42.729142],[-74.252978,42.406003],[-74.444671,42.35671],[-74.713041,42.515542],[-74.647318,42.827727]]]},"id":"36095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.809346,42.778435],[-73.677899,42.783912],[-73.781961,42.466249],[-74.252978,42.406003],[-74.181778,42.729142],[-73.809346,42.778435]]]},"id":"36001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.30589,42.816773],[-89.84035,42.811297],[-89.84035,42.504588],[-89.927981,42.504588],[-90.426383,42.504588],[-90.426383,42.811297],[-90.30589,42.816773]]]},"id":"55065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.255211,42.80582],[-99.233303,42.08834],[-99.660504,42.08834],[-99.676935,42.729142],[-99.255211,42.80582]]]},"id":"31149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.917968,42.789389],[-75.89606,42.789389],[-75.890583,42.723665],[-75.863199,42.416957],[-76.131569,42.41148],[-76.252061,42.406003],[-76.263015,42.625081],[-76.273969,42.772958],[-75.917968,42.789389]]]},"id":"36023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.715227,42.783912],[-123.227779,42.701758],[-123.233256,42.006186],[-123.518057,42.000709],[-123.819288,41.995232],[-124.027412,42.35671],[-123.715227,42.783912]]]},"id":"41033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.684269,42.783912],[-83.662362,42.433388],[-84.133379,42.422434],[-84.138855,42.422434],[-84.160763,42.778435],[-83.925255,42.778435],[-83.684269,42.783912]]]},"id":"26093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.270302,42.778435],[-84.160763,42.778435],[-84.138855,42.422434],[-84.598918,42.422434],[-84.604395,42.767481],[-84.36341,42.778435],[-84.270302,42.778435]]]},"id":"26065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.130182,42.772958],[-85.075412,42.772958],[-85.069935,42.422434],[-85.299967,42.416957],[-85.540952,42.422434],[-85.546429,42.767481],[-85.310921,42.767481],[-85.130182,42.772958]]]},"id":"26015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.834427,42.772958],[-84.604395,42.767481],[-84.598918,42.422434],[-84.719411,42.422434],[-84.883719,42.422434],[-85.069935,42.422434],[-85.075412,42.772958],[-84.834427,42.772958]]]},"id":"26045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.044831,42.767481],[-85.781938,42.767481],[-85.546429,42.767481],[-85.540952,42.422434],[-85.765507,42.422434],[-85.776461,42.422434],[-86.274862,42.416957],[-86.209139,42.767481],[-86.044831,42.767481]]]},"id":"26005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.975017,42.762004],[-76.892863,42.542926],[-77.106464,42.48268],[-77.36388,42.575788],[-76.975017,42.762004]]]},"id":"36123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.015142,42.762004],[-96.807019,42.701758],[-96.631756,42.526496],[-96.724864,42.395049],[-96.724864,42.280033],[-96.823449,42.263602],[-97.015142,42.351234],[-97.015142,42.762004]]]},"id":"31051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.267129,42.745573],[-73.020667,42.740096],[-72.976851,42.55388],[-72.998759,42.312895],[-73.053528,42.039048],[-73.486206,42.050002],[-73.49716,42.050002],[-73.35476,42.510065],[-73.267129,42.745573]]]},"id":"25003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.310028,42.745573],[-75.293597,42.745573],[-75.414089,42.312895],[-75.419566,42.192402],[-75.863199,42.416957],[-75.890583,42.723665],[-75.310028,42.745573]]]},"id":"36017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.020667,42.740096],[-72.927559,42.740096],[-72.456542,42.729142],[-72.28128,42.723665],[-72.314141,42.345757],[-72.976851,42.55388],[-73.020667,42.740096]]]},"id":"25011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.257092,42.734619],[-71.02706,42.444341],[-71.158507,42.329326],[-71.163984,42.301941],[-71.191368,42.280033],[-71.262569,42.329326],[-71.476169,42.154064],[-71.897894,42.712712],[-71.257092,42.734619]]]},"id":"25017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.28128,42.723665],[-71.930755,42.712712],[-71.897894,42.712712],[-71.476169,42.154064],[-71.498077,42.01714],[-71.799309,42.006186],[-72.100541,42.028094],[-72.133402,42.028094],[-72.221033,42.247172],[-72.314141,42.345757],[-72.28128,42.723665]]]},"id":"25027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.473348,42.668896],[-113.23784,42.625081],[-113.002331,42.329326],[-113.002331,42.000709],[-114.04295,41.995232],[-114.283935,41.995232],[-113.999134,42.526496],[-113.933411,42.537449],[-113.473348,42.668896]]]},"id":"16031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.8974,42.657942],[-90.8974,42.674373],[-90.639984,42.510065],[-90.475675,42.384095],[-90.8974,42.296464],[-91.127431,42.296464],[-91.132908,42.646988],[-90.8974,42.657942]]]},"id":"19061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.027483,42.668896],[-87.808406,42.668896],[-87.802929,42.493634],[-88.202745,42.493634],[-88.219176,42.493634],[-88.306807,42.493634],[-88.306807,42.60865],[-88.027483,42.668896]]]},"id":"55059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.204109,42.646988],[-91.132908,42.646988],[-91.127431,42.296464],[-91.36294,42.296464],[-91.598448,42.296464],[-91.609402,42.641511],[-91.204109,42.646988]]]},"id":"19055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.44098,42.646988],[-93.969963,42.646988],[-93.969963,42.559357],[-93.931625,42.208833],[-94.167133,42.208833],[-94.397165,42.208833],[-94.44098,42.559357],[-94.44098,42.646988]]]},"id":"19187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.905157,42.641511],[-91.609402,42.641511],[-91.598448,42.296464],[-91.713464,42.296464],[-91.82848,42.296464],[-91.888726,42.296464],[-92.063988,42.296464],[-92.080419,42.641511],[-91.905157,42.641511]]]},"id":"19019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.469282,42.641511],[-92.080419,42.641511],[-92.063988,42.296464],[-92.299497,42.296464],[-92.535005,42.296464],[-92.551436,42.55388],[-92.556913,42.641511],[-92.469282,42.641511]]]},"id":"19013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.460185,42.625081],[-76.263015,42.625081],[-76.252061,42.406003],[-76.536862,42.280033],[-76.619016,42.28551],[-76.695693,42.548403],[-76.668309,42.625081],[-76.460185,42.625081]]]},"id":"36109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.053011,42.614127],[-104.053011,42.000709],[-104.053011,41.699478],[-104.053011,41.562554],[-104.655474,41.655662],[-104.655474,42.60865],[-104.053011,42.614127]]]},"id":"56015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.655474,42.60865],[-104.655474,41.655662],[-105.279845,41.655662],[-105.285322,42.433388],[-104.890983,42.60865],[-104.655474,42.60865]]]},"id":"56031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.468788,42.592219],[-111.047063,42.515542],[-111.047063,42.000709],[-111.507126,42.000709],[-111.600234,42.416957],[-111.468788,42.592219]]]},"id":"16007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.648681,42.581265],[-77.48985,42.575788],[-77.36388,42.575788],[-77.106464,42.48268],[-76.964064,42.280033],[-76.964064,42.000709],[-77.610343,42.000709],[-77.747266,42.000709],[-77.725358,42.471726],[-77.648681,42.581265]]]},"id":"36101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.138409,42.570311],[-79.061732,42.537449],[-79.061732,42.000709],[-79.609426,42.000709],[-79.76278,42.252649],[-79.76278,42.269079],[-79.138409,42.570311],[-79.138409,42.570311]]]},"id":"36013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.50031,42.559357],[-95.859508,42.559357],[-95.739015,42.559357],[-95.673292,42.208833],[-96.133355,42.21431],[-96.357909,42.21431],[-96.357909,42.274556],[-96.44554,42.488157],[-96.50031,42.559357]]]},"id":"19193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.465168,42.559357],[-95.388491,42.559357],[-95.322768,42.208833],[-95.64043,42.208833],[-95.673292,42.208833],[-95.739015,42.559357],[-95.465168,42.559357]]]},"id":"19093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.388491,42.559357],[-94.911997,42.559357],[-94.857228,42.208833],[-95.092736,42.208833],[-95.322768,42.208833],[-95.388491,42.559357]]]},"id":"19161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.616242,42.559357],[-94.44098,42.559357],[-94.397165,42.208833],[-94.627196,42.208833],[-94.857228,42.208833],[-94.911997,42.559357],[-94.616242,42.559357]]]},"id":"19025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.893286,42.559357],[-93.498947,42.559357],[-93.460608,42.208833],[-93.696116,42.208833],[-93.931625,42.208833],[-93.969963,42.559357],[-93.893286,42.559357]]]},"id":"19079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.263438,42.559357],[-93.02793,42.55388],[-93.000545,42.208833],[-93.230576,42.208833],[-93.362023,42.208833],[-93.460608,42.208833],[-93.498947,42.559357],[-93.263438,42.559357]]]},"id":"19083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.907437,42.55388],[-92.551436,42.55388],[-92.535005,42.296464],[-92.765037,42.208833],[-92.77599,42.208833],[-93.000545,42.208833],[-93.02793,42.55388],[-92.907437,42.55388]]]},"id":"19075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.976851,42.55388],[-72.314141,42.345757],[-72.221033,42.247172],[-72.998759,42.312895],[-72.998759,42.312895],[-72.976851,42.55388]]]},"id":"25015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.70117,42.548403],[-76.695693,42.548403],[-76.619016,42.28551],[-76.766894,42.296464],[-76.964064,42.280033],[-77.106464,42.48268],[-76.892863,42.542926],[-76.70117,42.548403]]]},"id":"36097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.001485,42.531973],[-78.464745,42.537449],[-78.311391,42.521019],[-78.305914,42.000709],[-78.919331,42.000709],[-79.061732,42.000709],[-79.061732,42.537449],[-79.001485,42.531973]]]},"id":"36009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.724864,42.395049],[-96.631756,42.526496],[-96.44554,42.488157],[-96.357909,42.274556],[-96.724864,42.280033],[-96.724864,42.395049]]]},"id":"31043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.22376,42.521019],[-78.037544,42.521019],[-77.725358,42.471726],[-77.747266,42.000709],[-78.207329,42.000709],[-78.305914,42.000709],[-78.311391,42.521019],[-78.22376,42.521019]]]},"id":"36003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.844488,42.510065],[-74.713041,42.515542],[-74.444671,42.35671],[-74.450148,42.170494],[-74.778764,42.01714],[-74.789718,42.011663],[-75.145719,41.852832],[-75.35932,42.000709],[-75.419566,42.192402],[-75.414089,42.312895],[-74.844488,42.510065]]]},"id":"36025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.398575,42.504588],[-73.35476,42.510065],[-73.49716,42.050002],[-73.929839,42.077386],[-73.913408,42.126679],[-73.781961,42.466249],[-73.398575,42.504588]]]},"id":"36021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.639984,42.510065],[-90.426383,42.504588],[-89.927981,42.504588],[-89.917028,42.197879],[-90.316844,42.192402],[-90.475675,42.384095],[-90.639984,42.510065]]]},"id":"17085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.927981,42.504588],[-89.84035,42.504588],[-89.402195,42.499111],[-89.396718,42.203356],[-89.686996,42.197879],[-89.917028,42.197879],[-89.927981,42.504588]]]},"id":"17177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.421776,42.504588],[-112.126021,42.28551],[-112.10959,41.995232],[-112.164359,41.995232],[-113.002331,42.000709],[-113.002331,42.329326],[-112.421776,42.504588]]]},"id":"16071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.363857,42.499111],[-88.942132,42.493634],[-88.942132,42.154064],[-89.281702,42.203356],[-89.396718,42.203356],[-89.402195,42.499111],[-89.363857,42.499111]]]},"id":"17201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.202745,42.493634],[-87.802929,42.493634],[-87.759113,42.154064],[-88.120591,42.154064],[-88.197268,42.154064],[-88.202745,42.493634]]]},"id":"17097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.219176,42.493634],[-88.202745,42.493634],[-88.197268,42.154064],[-88.235607,42.154064],[-88.454684,42.154064],[-88.586131,42.154064],[-88.706624,42.154064],[-88.706624,42.493634],[-88.306807,42.493634],[-88.219176,42.493634]]]},"id":"17111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.942132,42.493634],[-88.777824,42.493634],[-88.706624,42.493634],[-88.706624,42.154064],[-88.942132,42.154064],[-88.942132,42.493634]]]},"id":"17007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.781961,42.466249],[-73.913408,42.126679],[-74.01747,42.159541],[-74.450148,42.170494],[-74.444671,42.35671],[-74.252978,42.406003],[-73.781961,42.466249]]]},"id":"36039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.879159,42.449818],[-82.868205,42.449818],[-83.185868,42.033571],[-83.421376,42.093817],[-83.541869,42.082863],[-83.552823,42.433388],[-83.081806,42.449818],[-82.879159,42.449818]]]},"id":"26163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.02706,42.444341],[-70.961337,42.444341],[-71.005152,42.307418],[-71.191368,42.280033],[-71.163984,42.301941],[-71.109214,42.351234],[-71.158507,42.329326],[-71.02706,42.444341]]]},"id":"25025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.771407,42.438865],[-102.700206,42.006186],[-103.362916,42.000709],[-103.401255,42.006186],[-103.44507,42.438865],[-102.771407,42.438865]]]},"id":"31013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.365666,42.438865],[-97.365666,42.351234],[-97.365666,42.08834],[-97.425913,42.08834],[-97.836683,42.08834],[-97.836683,42.438865],[-97.486159,42.438865],[-97.365666,42.438865]]]},"id":"31139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.836683,42.438865],[-97.836683,42.08834],[-97.831206,41.918555],[-97.91336,41.918555],[-98.296746,41.913078],[-98.302223,42.08834],[-98.302223,42.438865],[-97.836683,42.438865]]]},"id":"31003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.552823,42.433388],[-83.541869,42.082863],[-83.7719,42.082863],[-84.133379,42.07191],[-84.133379,42.422434],[-83.662362,42.433388],[-83.552823,42.433388]]]},"id":"26161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.037943,42.433388],[-106.074002,42.433388],[-106.074002,42.433388],[-106.068525,41.392769],[-106.320464,40.998429],[-106.857204,41.003906],[-107.317267,41.003906],[-107.919731,41.003906],[-107.930684,41.661139],[-107.50896,41.655662],[-107.525391,42.263602],[-107.525391,42.433388],[-107.037943,42.433388]]]},"id":"56007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.074002,42.433388],[-105.285322,42.433388],[-105.279845,41.655662],[-105.279845,40.998429],[-106.189017,40.998429],[-106.320464,40.998429],[-106.068525,41.392769],[-106.074002,42.433388]]]},"id":"56001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.835743,42.416957],[-111.600234,42.416957],[-111.507126,42.000709],[-112.10959,41.995232],[-112.126021,42.28551],[-111.874081,42.416957],[-111.835743,42.416957]]]},"id":"16041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.598918,42.422434],[-84.138855,42.422434],[-84.133379,42.422434],[-84.133379,42.07191],[-84.36341,42.07191],[-84.708457,42.07191],[-84.719411,42.422434],[-84.598918,42.422434]]]},"id":"26075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.883719,42.422434],[-84.719411,42.422434],[-84.708457,42.07191],[-84.82895,42.07191],[-85.053504,42.07191],[-85.29449,42.07191],[-85.299967,42.416957],[-85.069935,42.422434],[-84.883719,42.422434]]]},"id":"26025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.540952,42.422434],[-85.299967,42.416957],[-85.29449,42.07191],[-85.299967,42.07191],[-85.765507,42.07191],[-85.765507,42.422434],[-85.540952,42.422434]]]},"id":"26077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.776461,42.422434],[-85.765507,42.422434],[-85.765507,42.07191],[-86.22557,42.07191],[-86.302247,42.241695],[-86.362493,42.241695],[-86.274862,42.416957],[-85.776461,42.422434]]]},"id":"26159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.863199,42.416957],[-75.419566,42.192402],[-75.35932,42.000709],[-75.479813,42.000709],[-75.48529,42.000709],[-75.890583,42.000709],[-76.104184,42.000709],[-76.131569,42.41148],[-75.863199,42.416957]]]},"id":"36007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.131569,42.41148],[-76.104184,42.000709],[-76.147999,42.000709],[-76.55877,42.000709],[-76.536862,42.280033],[-76.252061,42.406003],[-76.131569,42.41148]]]},"id":"36107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.475675,42.384095],[-90.316844,42.192402],[-90.152536,42.033571],[-90.366137,42.033571],[-90.8974,42.033571],[-90.8974,42.296464],[-90.475675,42.384095]]]},"id":"19097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.365666,42.351234],[-97.015142,42.351234],[-96.823449,42.263602],[-96.823449,42.08834],[-96.89465,42.08834],[-97.020619,42.08834],[-97.36019,42.08834],[-97.365666,42.08834],[-97.365666,42.351234]]]},"id":"31179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.109214,42.351234],[-71.163984,42.301941],[-71.158507,42.329326],[-71.109214,42.351234]]]},"id":"25021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.998759,42.312895],[-72.221033,42.247172],[-72.133402,42.028094],[-72.511311,42.033571],[-73.009713,42.039048],[-73.053528,42.039048],[-72.998759,42.312895],[-72.998759,42.312895]]]},"id":"25013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.262569,42.329326],[-71.191368,42.280033],[-71.005152,42.307418],[-70.906568,42.269079],[-70.901091,42.269079],[-71.08183,42.093817],[-71.08183,42.093817],[-71.383061,41.984279],[-71.498077,42.01714],[-71.476169,42.154064],[-71.262569,42.329326]]]},"id":"25021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.901091,42.269079],[-70.906568,42.269079],[-70.824413,42.263602],[-70.780598,42.252649],[-70.539613,41.809016],[-70.643674,41.715908],[-70.840844,41.628277],[-71.08183,42.093817],[-70.901091,42.269079]]]},"id":"25023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.888726,42.296464],[-91.82848,42.296464],[-91.833957,41.863786],[-92.063988,41.863786],[-92.299497,41.863786],[-92.299497,42.296464],[-92.063988,42.296464],[-91.888726,42.296464]]]},"id":"19011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.713464,42.296464],[-91.598448,42.296464],[-91.36294,42.296464],[-91.368417,41.94594],[-91.368417,41.858309],[-91.664172,41.863786],[-91.833957,41.863786],[-91.82848,42.296464],[-91.713464,42.296464]]]},"id":"19113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.299497,42.296464],[-92.299497,41.863786],[-92.765037,41.863786],[-92.765037,42.208833],[-92.535005,42.296464],[-92.299497,42.296464]]]},"id":"19171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.36294,42.296464],[-91.127431,42.296464],[-90.8974,42.296464],[-90.8974,42.033571],[-90.8974,41.94594],[-91.012416,41.94594],[-91.368417,41.94594],[-91.36294,42.296464]]]},"id":"19105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.766894,42.296464],[-76.619016,42.28551],[-76.536862,42.280033],[-76.55877,42.000709],[-76.920248,42.000709],[-76.925725,42.000709],[-76.964064,42.000709],[-76.964064,42.280033],[-76.766894,42.296464]]]},"id":"36015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.724864,42.280033],[-96.357909,42.274556],[-96.357909,42.21431],[-96.270278,42.044525],[-96.555079,42.01714],[-96.823449,42.08834],[-96.823449,42.263602],[-96.724864,42.280033]]]},"id":"31173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.055737,42.269079],[-109.042503,42.263602],[-107.525391,42.263602],[-107.50896,41.655662],[-107.930684,41.661139],[-107.919731,41.003906],[-109.04798,40.998429],[-109.677828,40.998429],[-110.000968,40.998429],[-110.05026,40.998429],[-110.05026,41.578985],[-110.055737,42.269079]]]},"id":"56037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.76278,42.252649],[-79.609426,42.000709],[-79.609426,41.847355],[-79.708011,41.852832],[-80.518598,41.847355],[-80.518598,41.978802],[-80.518598,41.978802],[-79.76278,42.269079],[-79.76278,42.252649]]]},"id":"42049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.302247,42.241695],[-86.22557,42.07191],[-86.22557,41.759724],[-86.521325,41.759724],[-86.822556,41.759724],[-86.362493,42.241695],[-86.302247,42.241695]]]},"id":"26021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.133355,42.21431],[-95.673292,42.208833],[-95.673292,41.863786],[-96.122401,41.863786],[-96.138832,41.863786],[-96.270278,42.044525],[-96.357909,42.21431],[-96.133355,42.21431]]]},"id":"19133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.64043,42.208833],[-95.322768,42.208833],[-95.092736,42.208833],[-95.092736,41.863786],[-95.322768,41.863786],[-95.558276,41.863786],[-95.673292,41.863786],[-95.673292,42.208833],[-95.64043,42.208833]]]},"id":"19047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.092736,42.208833],[-94.857228,42.208833],[-94.627196,42.208833],[-94.627196,41.863786],[-94.742212,41.863786],[-95.092736,41.863786],[-95.092736,42.208833]]]},"id":"19027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.77599,42.208833],[-92.765037,42.208833],[-92.765037,41.863786],[-93.230576,41.863786],[-93.230576,42.208833],[-93.000545,42.208833],[-92.77599,42.208833]]]},"id":"19127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.931625,42.208833],[-93.696116,42.208833],[-93.696116,41.863786],[-93.772794,41.863786],[-93.816609,41.863786],[-94.161656,41.863786],[-94.167133,42.208833],[-93.931625,42.208833]]]},"id":"19015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.167133,42.208833],[-94.161656,41.863786],[-94.282149,41.863786],[-94.484796,41.863786],[-94.627196,41.863786],[-94.627196,42.208833],[-94.397165,42.208833],[-94.167133,42.208833]]]},"id":"19073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.362023,42.208833],[-93.230576,42.208833],[-93.230576,41.863786],[-93.268915,41.863786],[-93.345592,41.863786],[-93.696116,41.863786],[-93.696116,42.208833],[-93.460608,42.208833],[-93.362023,42.208833]]]},"id":"19169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.281702,42.203356],[-88.942132,42.154064],[-88.942132,41.891171],[-89.544596,41.902124],[-89.632227,41.902124],[-89.686996,41.929509],[-89.686996,42.197879],[-89.396718,42.203356],[-89.281702,42.203356]]]},"id":"17141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.686996,42.197879],[-89.686996,41.929509],[-89.889643,41.929509],[-90.152536,41.929509],[-90.152536,42.033571],[-90.316844,42.192402],[-89.917028,42.197879],[-89.686996,42.197879]]]},"id":"17015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.01747,42.159541],[-73.913408,42.126679],[-73.929839,42.077386],[-73.951746,41.589939],[-74.263932,41.633754],[-74.367994,41.589939],[-74.778764,42.01714],[-74.450148,42.170494],[-74.01747,42.159541]]]},"id":"36111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.454684,42.154064],[-88.235607,42.154064],[-88.262992,41.984279],[-88.262992,41.726862],[-88.602562,41.721385],[-88.586131,42.154064],[-88.454684,42.154064]]]},"id":"17089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.120591,42.154064],[-87.759113,42.154064],[-87.523605,41.710431],[-87.523605,41.469446],[-88.027483,41.683047],[-87.928898,41.995232],[-88.262992,41.984279],[-88.235607,42.154064],[-88.197268,42.154064],[-88.120591,42.154064]]]},"id":"17031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.586131,42.154064],[-88.602562,41.721385],[-88.602562,41.633754],[-88.618993,41.633754],[-88.936655,41.628277],[-88.942132,41.891171],[-88.942132,42.154064],[-88.706624,42.154064],[-88.586131,42.154064]]]},"id":"17037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.004635,42.093817],[-101.424079,42.093817],[-101.424079,41.743293],[-101.988204,41.743293],[-102.064881,42.011663],[-102.004635,42.093817]]]},"id":"31075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.08183,42.093817],[-71.08183,42.093817],[-70.840844,41.628277],[-71.120168,41.496831],[-71.196845,41.67757],[-71.22423,41.710431],[-71.317338,41.776155],[-71.383061,41.984279],[-71.08183,42.093817]]]},"id":"25005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.421376,42.093817],[-83.185868,42.033571],[-83.454238,41.732339],[-83.760947,41.721385],[-83.7719,42.082863],[-83.541869,42.082863],[-83.421376,42.093817]]]},"id":"26115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.424079,42.093817],[-100.843524,42.08834],[-100.843524,41.737816],[-101.407648,41.743293],[-101.424079,41.743293],[-101.424079,42.093817]]]},"id":"31091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.425913,42.08834],[-97.365666,42.08834],[-97.365666,41.743293],[-97.425913,41.743293],[-97.831206,41.743293],[-97.831206,41.918555],[-97.836683,42.08834],[-97.425913,42.08834]]]},"id":"31119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.36019,42.08834],[-97.020619,42.08834],[-97.020619,41.743293],[-97.250651,41.743293],[-97.250651,41.743293],[-97.365666,41.743293],[-97.365666,42.08834],[-97.36019,42.08834]]]},"id":"31167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.89465,42.08834],[-96.823449,42.08834],[-96.555079,42.01714],[-96.555079,41.743293],[-96.905603,41.743293],[-97.020619,41.743293],[-97.020619,42.08834],[-96.89465,42.08834]]]},"id":"31039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.302223,42.08834],[-98.296746,41.913078],[-98.296746,41.743293],[-98.521301,41.743293],[-98.751332,41.737816],[-98.756809,41.737816],[-98.762286,42.08834],[-98.302223,42.08834]]]},"id":"31183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.762286,42.08834],[-98.756809,41.737816],[-99.074472,41.737816],[-99.211395,41.743293],[-99.222349,41.743293],[-99.222349,42.08834],[-98.762286,42.08834]]]},"id":"31071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.843524,42.08834],[-100.268445,42.08834],[-100.262968,41.737816],[-100.712077,41.737816],[-100.843524,41.737816],[-100.843524,42.08834]]]},"id":"31171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.222349,42.08834],[-99.222349,41.743293],[-99.687889,41.737816],[-99.687889,42.08834],[-99.660504,42.08834],[-99.233303,42.08834],[-99.222349,42.08834]]]},"id":"31115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.268445,42.08834],[-100.16986,42.08834],[-99.687889,42.08834],[-99.687889,41.737816],[-100.252014,41.737816],[-100.262968,41.737816],[-100.268445,42.08834]]]},"id":"31009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.7719,42.082863],[-83.760947,41.721385],[-83.881439,41.721385],[-83.89787,41.721385],[-84.357933,41.704955],[-84.36341,42.07191],[-84.133379,42.07191],[-83.7719,42.082863]]]},"id":"26091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.671059,41.513262],[-70.692967,41.524216],[-70.643674,41.715908],[-70.539613,41.809016],[-69.926195,41.694001],[-70.671059,41.513262]]]},"id":"25001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.929839,42.077386],[-73.49716,42.050002],[-73.486206,42.050002],[-73.519068,41.666616],[-73.530022,41.529692],[-73.979131,41.436584],[-73.951746,41.589939],[-73.929839,42.077386]]]},"id":"36027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.36341,42.07191],[-84.357933,41.704955],[-84.401749,41.704955],[-84.807042,41.694001],[-84.823473,41.759724],[-84.82895,42.07191],[-84.708457,42.07191],[-84.36341,42.07191]]]},"id":"26059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.053504,42.07191],[-84.82895,42.07191],[-84.823473,41.759724],[-85.195905,41.759724],[-85.29449,41.759724],[-85.29449,42.07191],[-85.053504,42.07191]]]},"id":"26023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.299967,42.07191],[-85.29449,42.07191],[-85.29449,41.759724],[-85.371167,41.759724],[-85.661445,41.759724],[-85.792891,41.759724],[-85.765507,42.07191],[-85.299967,42.07191]]]},"id":"26149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.22557,42.07191],[-85.765507,42.07191],[-85.792891,41.759724],[-85.990061,41.759724],[-86.061262,41.759724],[-86.22557,41.759724],[-86.22557,42.07191]]]},"id":"26027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.053528,42.039048],[-73.009713,42.039048],[-72.982328,41.639231],[-73.310944,41.469446],[-73.519068,41.666616],[-73.486206,42.050002],[-73.053528,42.039048]]]},"id":"09005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.270278,42.044525],[-96.138832,41.863786],[-96.122401,41.683047],[-96.407202,41.683047],[-96.44554,41.683047],[-96.555079,41.743293],[-96.555079,42.01714],[-96.270278,42.044525]]]},"id":"31021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.009713,42.039048],[-72.511311,42.033571],[-72.412726,41.600893],[-72.467496,41.584462],[-72.544173,41.644708],[-72.752296,41.578985],[-72.949466,41.644708],[-72.982328,41.639231],[-73.009713,42.039048]]]},"id":"09003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.133402,42.028094],[-72.100541,42.028094],[-72.237464,41.715908],[-72.412726,41.600893],[-72.511311,42.033571],[-72.133402,42.028094]]]},"id":"09013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.366137,42.033571],[-90.152536,42.033571],[-90.152536,41.929509],[-90.240167,41.781632],[-90.316844,41.726862],[-90.798815,41.770678],[-90.8974,41.770678],[-90.8974,41.94594],[-90.8974,42.033571],[-90.366137,42.033571]]]},"id":"19045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.799309,42.006186],[-71.788355,41.726862],[-71.788355,41.639231],[-72.237464,41.715908],[-72.100541,42.028094],[-71.799309,42.006186]]]},"id":"09015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.498077,42.01714],[-71.383061,41.984279],[-71.317338,41.776155],[-71.366631,41.737816],[-71.4214,41.765201],[-71.788355,41.726862],[-71.799309,42.006186],[-71.498077,42.01714]]]},"id":"44007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.789718,42.011663],[-74.778764,42.01714],[-74.367994,41.589939],[-74.756857,41.425631],[-75.069042,41.600893],[-75.145719,41.852832],[-74.789718,42.011663]]]},"id":"36105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.233256,42.006186],[-122.291222,42.006186],[-121.447773,41.995232],[-121.447773,41.184645],[-122.499346,41.184645],[-122.586977,41.35443],[-122.915593,40.992952],[-123.408518,41.179168],[-123.660457,41.381815],[-123.518057,42.000709],[-123.233256,42.006186]]]},"id":"06093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.240143,42.006186],[-102.064881,42.011663],[-101.988204,41.743293],[-101.982727,41.392769],[-102.053927,41.222984],[-102.119651,41.222984],[-102.612575,41.222984],[-102.634483,41.436584],[-102.678299,42.006186],[-102.240143,42.006186]]]},"id":"31069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.700206,42.006186],[-102.678299,42.006186],[-102.634483,41.436584],[-102.754976,41.436584],[-103.368393,41.436584],[-103.368393,41.699478],[-103.362916,42.000709],[-102.700206,42.006186]]]},"id":"31123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.456024,42.006186],[-103.401255,42.006186],[-103.362916,42.000709],[-103.368393,41.699478],[-104.053011,41.699478],[-104.053011,42.000709],[-103.456024,42.006186]]]},"id":"31157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-115.039753,41.995232],[-114.283935,41.995232],[-114.04295,41.995232],[-114.04295,40.998429],[-114.048427,40.116642],[-115.833909,40.127596],[-116.157049,40.998429],[-116.58425,40.998429],[-117.016928,40.998429],[-117.016928,42.000709],[-115.039753,41.995232]]]},"id":"32007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.920248,42.000709],[-76.55877,42.000709],[-76.147999,42.000709],[-76.115138,41.650185],[-76.2192,41.540646],[-76.816186,41.589939],[-76.876433,41.595416],[-76.925725,42.000709],[-76.920248,42.000709]]]},"id":"42015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.925725,42.000709],[-76.876433,41.595416],[-77.599389,41.540646],[-77.610343,42.000709],[-76.964064,42.000709],[-76.925725,42.000709]]]},"id":"42117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.047063,42.000709],[-111.047063,41.578985],[-111.047063,41.250368],[-111.266141,41.146307],[-111.419495,41.359907],[-111.512603,41.425631],[-111.507126,42.000709],[-111.047063,42.000709]]]},"id":"49033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.164359,41.995232],[-111.885035,41.425631],[-112.492976,41.075106],[-113.073531,40.998429],[-114.04295,40.998429],[-114.04295,41.995232],[-113.002331,42.000709],[-112.164359,41.995232]]]},"id":"49003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.213628,42.000709],[-123.819288,41.995232],[-123.518057,42.000709],[-123.660457,41.381815],[-124.054797,41.463969],[-124.065751,41.463969],[-124.213628,42.000709]]]},"id":"06015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.207329,42.000709],[-77.747266,42.000709],[-77.610343,42.000709],[-77.599389,41.540646],[-77.599389,41.4804],[-77.747266,41.474923],[-77.988251,41.474923],[-78.201852,41.617324],[-78.207329,42.000709]]]},"id":"42105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.027882,42.000709],[-117.016928,42.000709],[-117.016928,40.998429],[-117.301729,40.527412],[-118.013732,40.856029],[-119.311766,40.960091],[-119.32272,41.995232],[-118.194471,41.995232],[-117.027882,42.000709]]]},"id":"32013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.919331,42.000709],[-78.305914,42.000709],[-78.207329,42.000709],[-78.201852,41.617324],[-78.42093,41.600893],[-78.95767,41.6228],[-78.919331,42.000709]]]},"id":"42083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.507126,42.000709],[-111.512603,41.425631],[-111.655004,41.4092],[-111.885035,41.425631],[-112.164359,41.995232],[-112.10959,41.995232],[-111.507126,42.000709]]]},"id":"49005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.061732,42.000709],[-78.919331,42.000709],[-78.95767,41.6228],[-78.996008,41.6228],[-79.510841,41.6228],[-79.614903,41.6228],[-79.609426,41.847355],[-79.609426,42.000709],[-79.061732,42.000709]]]},"id":"42123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.479813,42.000709],[-75.35932,42.000709],[-75.145719,41.852832],[-75.069042,41.600893],[-75.35932,41.239415],[-75.507197,41.233938],[-75.463382,41.639231],[-75.48529,42.000709],[-75.479813,42.000709]]]},"id":"42127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.890583,42.000709],[-75.48529,42.000709],[-75.463382,41.639231],[-75.720798,41.644708],[-76.115138,41.650185],[-76.147999,42.000709],[-76.104184,42.000709],[-75.890583,42.000709]]]},"id":"42115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.361059,41.995232],[-119.32272,41.995232],[-119.311766,40.960091],[-119.224135,40.001626],[-119.191274,39.629194],[-119.196751,39.623717],[-119.284382,39.623717],[-119.689675,39.519655],[-119.711583,39.251285],[-120.001861,39.163654],[-120.007338,39.317009],[-120.001861,39.442978],[-120.001861,39.722302],[-120.001861,41.184645],[-120.001861,41.995232],[-119.361059,41.995232]]]},"id":"32031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.316327,41.995232],[-120.878171,41.995232],[-120.001861,41.995232],[-120.001861,41.184645],[-120.943895,41.184645],[-121.332757,41.184645],[-121.447773,41.184645],[-121.447773,41.995232],[-121.316327,41.995232]]]},"id":"06049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.928898,41.995232],[-88.027483,41.683047],[-88.03296,41.726862],[-88.262992,41.726862],[-88.262992,41.726862],[-88.262992,41.984279],[-87.928898,41.995232]]]},"id":"17043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.518598,41.978802],[-80.518598,41.847355],[-80.518598,41.502308],[-81.000569,41.502308],[-81.006046,41.715908],[-81.000569,41.852832],[-80.518598,41.978802],[-80.518598,41.978802]]]},"id":"39007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.012416,41.94594],[-90.8974,41.94594],[-90.8974,41.770678],[-90.8974,41.595416],[-91.30817,41.595416],[-91.368417,41.600893],[-91.368417,41.858309],[-91.368417,41.94594],[-91.012416,41.94594]]]},"id":"19031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.889643,41.929509],[-89.686996,41.929509],[-89.632227,41.902124],[-89.632227,41.584462],[-89.862258,41.584462],[-90.179921,41.584462],[-90.185398,41.584462],[-90.240167,41.781632],[-90.152536,41.929509],[-89.889643,41.929509]]]},"id":"17195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.91336,41.918555],[-97.831206,41.918555],[-97.831206,41.743293],[-97.831206,41.524216],[-98.291269,41.4804],[-98.296746,41.743293],[-98.296746,41.913078],[-97.91336,41.918555]]]},"id":"31011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.544596,41.902124],[-88.942132,41.891171],[-88.936655,41.628277],[-89.166687,41.584462],[-89.254318,41.584462],[-89.632227,41.584462],[-89.632227,41.902124],[-89.544596,41.902124]]]},"id":"17103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.122401,41.863786],[-95.673292,41.863786],[-95.558276,41.863786],[-95.49803,41.507785],[-95.848554,41.507785],[-95.996431,41.507785],[-96.122401,41.683047],[-96.138832,41.863786],[-96.122401,41.863786]]]},"id":"19085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.322768,41.863786],[-95.092736,41.863786],[-95.043444,41.502308],[-95.152983,41.507785],[-95.49803,41.507785],[-95.558276,41.863786],[-95.322768,41.863786]]]},"id":"19165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.816609,41.863786],[-93.789224,41.513262],[-93.822086,41.507785],[-94.24381,41.502308],[-94.282149,41.863786],[-94.161656,41.863786],[-93.816609,41.863786]]]},"id":"19049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.772794,41.863786],[-93.696116,41.863786],[-93.345592,41.863786],[-93.329161,41.507785],[-93.329161,41.491354],[-93.70707,41.513262],[-93.789224,41.513262],[-93.816609,41.863786],[-93.772794,41.863786]]]},"id":"19153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.092736,41.863786],[-94.742212,41.863786],[-94.698396,41.502308],[-95.043444,41.502308],[-95.092736,41.863786]]]},"id":"19009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.484796,41.863786],[-94.282149,41.863786],[-94.24381,41.502308],[-94.660058,41.502308],[-94.698396,41.502308],[-94.742212,41.863786],[-94.627196,41.863786],[-94.484796,41.863786]]]},"id":"19077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.268915,41.863786],[-93.230576,41.863786],[-92.765037,41.863786],[-92.754083,41.507785],[-92.869098,41.507785],[-93.329161,41.507785],[-93.345592,41.863786],[-93.268915,41.863786]]]},"id":"19099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.063988,41.863786],[-91.833957,41.863786],[-91.82848,41.513262],[-91.943495,41.513262],[-92.299497,41.507785],[-92.299497,41.863786],[-92.063988,41.863786]]]},"id":"19095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.299497,41.863786],[-92.299497,41.507785],[-92.414512,41.507785],[-92.458328,41.507785],[-92.754083,41.507785],[-92.765037,41.863786],[-92.299497,41.863786]]]},"id":"19157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.664172,41.863786],[-91.368417,41.858309],[-91.368417,41.600893],[-91.368417,41.425631],[-91.483432,41.425631],[-91.790141,41.513262],[-91.82848,41.513262],[-91.833957,41.863786],[-91.664172,41.863786]]]},"id":"19103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.000569,41.852832],[-81.006046,41.715908],[-81.389431,41.568031],[-81.488016,41.633754],[-81.000569,41.852832]]]},"id":"39085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.708011,41.852832],[-79.609426,41.847355],[-79.614903,41.6228],[-79.998289,41.491354],[-80.003765,41.491354],[-80.518598,41.491354],[-80.518598,41.502308],[-80.518598,41.847355],[-79.708011,41.852832]]]},"id":"42039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.240167,41.781632],[-90.185398,41.584462],[-90.43186,41.327046],[-91.050754,41.332523],[-91.072662,41.332523],[-91.072662,41.332523],[-90.787861,41.453015],[-90.316844,41.726862],[-90.240167,41.781632]]]},"id":"17161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.798815,41.770678],[-90.316844,41.726862],[-90.787861,41.453015],[-90.8974,41.595416],[-90.8974,41.770678],[-90.798815,41.770678]]]},"id":"19163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.317338,41.776155],[-71.22423,41.710431],[-71.355677,41.726862],[-71.366631,41.737816],[-71.317338,41.776155]]]},"id":"44001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.4214,41.765201],[-71.366631,41.737816],[-71.355677,41.726862],[-71.410446,41.655662],[-71.470692,41.633754],[-71.788355,41.595416],[-71.788355,41.639231],[-71.788355,41.726862],[-71.4214,41.765201]]]},"id":"44003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.061262,41.759724],[-86.061262,41.4804],[-86.247477,41.4804],[-86.466555,41.431108],[-86.526801,41.431108],[-86.521325,41.759724],[-86.22557,41.759724],[-86.061262,41.759724]]]},"id":"18141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.990061,41.759724],[-85.792891,41.759724],[-85.661445,41.759724],[-85.655968,41.524216],[-85.655968,41.436584],[-86.061262,41.436584],[-86.061262,41.4804],[-86.061262,41.759724],[-85.990061,41.759724]]]},"id":"18039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.822556,41.759724],[-86.521325,41.759724],[-86.526801,41.431108],[-86.932095,41.239415],[-86.932095,41.710431],[-86.822556,41.759724]]]},"id":"18091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.823473,41.759724],[-84.807042,41.694001],[-84.807042,41.529692],[-84.916581,41.529692],[-85.195905,41.524216],[-85.195905,41.759724],[-84.823473,41.759724]]]},"id":"18151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.371167,41.759724],[-85.29449,41.759724],[-85.195905,41.759724],[-85.195905,41.524216],[-85.655968,41.524216],[-85.661445,41.759724],[-85.371167,41.759724]]]},"id":"18087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.407648,41.743293],[-100.843524,41.737816],[-100.712077,41.737816],[-100.712077,41.392769],[-101.270725,41.392769],[-101.363833,41.392769],[-101.407648,41.392769],[-101.407648,41.743293]]]},"id":"31117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.250651,41.743293],[-97.020619,41.743293],[-96.905603,41.743293],[-96.905603,41.453015],[-97.256128,41.376338],[-97.250651,41.743293],[-97.250651,41.743293]]]},"id":"31037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.424079,41.743293],[-101.407648,41.743293],[-101.407648,41.392769],[-101.982727,41.392769],[-101.988204,41.743293],[-101.424079,41.743293]]]},"id":"31005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.425913,41.743293],[-97.365666,41.743293],[-97.250651,41.743293],[-97.256128,41.376338],[-97.365666,41.392769],[-97.601175,41.332523],[-97.705237,41.392769],[-97.716191,41.524216],[-97.831206,41.524216],[-97.831206,41.743293],[-97.425913,41.743293]]]},"id":"31141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.905603,41.743293],[-96.555079,41.743293],[-96.44554,41.683047],[-96.330525,41.392769],[-96.461971,41.392769],[-96.472925,41.392769],[-96.905603,41.453015],[-96.905603,41.453015],[-96.905603,41.743293]]]},"id":"31053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.222349,41.743293],[-99.211395,41.743293],[-99.205918,41.392769],[-99.205918,41.047722],[-99.424996,41.047722],[-99.994598,41.047722],[-100.224629,41.047722],[-100.252014,41.392769],[-100.252014,41.737816],[-99.687889,41.737816],[-99.222349,41.743293]]]},"id":"31041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.521301,41.743293],[-98.296746,41.743293],[-98.291269,41.4804],[-98.291269,41.392769],[-98.521301,41.392769],[-98.745855,41.392769],[-98.751332,41.392769],[-98.751332,41.737816],[-98.521301,41.743293]]]},"id":"31077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.074472,41.737816],[-98.756809,41.737816],[-98.751332,41.737816],[-98.751332,41.392769],[-98.822533,41.392769],[-99.205918,41.392769],[-99.211395,41.743293],[-99.074472,41.737816]]]},"id":"31175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.712077,41.737816],[-100.262968,41.737816],[-100.252014,41.737816],[-100.252014,41.392769],[-100.712077,41.392769],[-100.712077,41.737816]]]},"id":"31113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.16396,41.6228],[-83.180391,41.6228],[-83.415899,41.617324],[-83.881439,41.414677],[-83.881439,41.485877],[-83.881439,41.721385],[-83.760947,41.721385],[-83.454238,41.732339],[-83.16396,41.6228]]]},"id":"39095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.03296,41.726862],[-88.027483,41.683047],[-87.523605,41.469446],[-87.529082,41.299661],[-87.786498,41.294184],[-88.246561,41.201076],[-88.252038,41.463969],[-88.262992,41.726862],[-88.03296,41.726862]]]},"id":"17197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.262992,41.726862],[-88.262992,41.726862],[-88.252038,41.463969],[-88.279422,41.463969],[-88.597085,41.458492],[-88.602562,41.633754],[-88.602562,41.721385],[-88.262992,41.726862]]]},"id":"17093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.89787,41.721385],[-83.881439,41.721385],[-83.881439,41.485877],[-83.886916,41.485877],[-84.341502,41.485877],[-84.401749,41.704955],[-84.357933,41.704955],[-83.89787,41.721385]]]},"id":"39051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.006046,41.715908],[-81.000569,41.502308],[-81.000569,41.348953],[-81.389431,41.348953],[-81.389431,41.568031],[-81.006046,41.715908]]]},"id":"39055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.237464,41.715908],[-71.788355,41.639231],[-71.788355,41.595416],[-71.859555,41.321569],[-72.341526,41.277753],[-72.467496,41.584462],[-72.412726,41.600893],[-72.237464,41.715908]]]},"id":"09011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.932095,41.710431],[-86.932095,41.239415],[-87.036157,41.255845],[-87.216896,41.239415],[-87.222373,41.6228],[-86.932095,41.710431]]]},"id":"18127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.222373,41.6228],[-87.216896,41.239415],[-87.277142,41.217507],[-87.529082,41.168214],[-87.529082,41.299661],[-87.523605,41.469446],[-87.523605,41.710431],[-87.222373,41.6228]]]},"id":"18089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.401749,41.704955],[-84.341502,41.485877],[-84.341502,41.425631],[-84.801565,41.425631],[-84.807042,41.529692],[-84.807042,41.694001],[-84.401749,41.704955]]]},"id":"39171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.053011,41.699478],[-103.368393,41.699478],[-103.368393,41.436584],[-103.379347,41.392769],[-104.053011,41.392769],[-104.053011,41.562554],[-104.053011,41.699478]]]},"id":"31007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.407202,41.683047],[-96.122401,41.683047],[-95.996431,41.507785],[-95.936185,41.392769],[-96.330525,41.392769],[-96.44554,41.683047],[-96.407202,41.683047]]]},"id":"31177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.519068,41.666616],[-73.310944,41.469446],[-73.108298,41.168214],[-73.655992,40.987475],[-73.546453,41.365384],[-73.530022,41.529692],[-73.519068,41.666616]]]},"id":"09001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.279845,41.655662],[-104.655474,41.655662],[-104.053011,41.562554],[-104.053011,41.392769],[-104.053011,41.003906],[-104.945752,40.998429],[-105.279845,40.998429],[-105.279845,41.655662]]]},"id":"56021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.470692,41.633754],[-71.410446,41.655662],[-71.859555,41.321569],[-71.788355,41.595416],[-71.470692,41.633754]]]},"id":"44009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.2192,41.540646],[-76.115138,41.650185],[-75.720798,41.644708],[-75.835814,41.425631],[-75.835814,41.425631],[-76.284923,41.376338],[-76.2192,41.540646]]]},"id":"42131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.544173,41.644708],[-72.467496,41.584462],[-72.341526,41.277753],[-72.538696,41.255845],[-72.752296,41.578985],[-72.544173,41.644708]]]},"id":"09007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-72.949466,41.644708],[-72.752296,41.578985],[-72.538696,41.255845],[-73.108298,41.168214],[-73.310944,41.469446],[-72.982328,41.639231],[-72.949466,41.644708]]]},"id":"09009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.720798,41.644708],[-75.463382,41.639231],[-75.507197,41.233938],[-75.600305,41.162737],[-75.835814,41.425631],[-75.720798,41.644708]]]},"id":"42069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.263932,41.633754],[-73.951746,41.589939],[-73.979131,41.436584],[-73.979131,41.327046],[-74.236547,41.14083],[-74.367994,41.201076],[-74.69661,41.359907],[-74.756857,41.425631],[-74.367994,41.589939],[-74.263932,41.633754]]]},"id":"36071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.618993,41.633754],[-88.602562,41.633754],[-88.597085,41.458492],[-88.586131,41.107968],[-88.931178,40.927229],[-89.046194,40.927229],[-89.16121,41.102491],[-89.16121,41.310615],[-89.166687,41.584462],[-88.936655,41.628277],[-88.618993,41.633754]]]},"id":"17099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.488016,41.633754],[-81.389431,41.568031],[-81.389431,41.348953],[-81.389431,41.348953],[-81.537309,41.348953],[-81.685186,41.277753],[-81.876879,41.277753],[-81.969987,41.507785],[-81.488016,41.633754]]]},"id":"39035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.95767,41.6228],[-78.42093,41.600893],[-78.234714,41.228461],[-78.711208,41.201076],[-78.95767,41.370861],[-79.094593,41.343476],[-78.95767,41.6228]]]},"id":"42047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.996008,41.6228],[-78.95767,41.6228],[-79.094593,41.343476],[-79.209609,41.332523],[-79.357487,41.431108],[-79.477979,41.387292],[-79.510841,41.6228],[-78.996008,41.6228]]]},"id":"42053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.510841,41.6228],[-79.477979,41.387292],[-79.697057,41.173691],[-79.998289,41.173691],[-79.998289,41.491354],[-79.614903,41.6228],[-79.510841,41.6228]]]},"id":"42121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.180391,41.6228],[-83.16396,41.6228],[-82.692943,41.491354],[-82.775097,41.4804],[-82.955836,41.458492],[-83.415899,41.502308],[-83.415899,41.617324],[-83.180391,41.6228]]]},"id":"39123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.415899,41.617324],[-83.415899,41.502308],[-83.421376,41.255845],[-83.421376,41.168214],[-83.881439,41.168214],[-83.881439,41.414677],[-83.415899,41.617324]]]},"id":"39173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.42093,41.600893],[-78.201852,41.617324],[-77.988251,41.474923],[-78.092313,41.217507],[-78.234714,41.228461],[-78.42093,41.600893]]]},"id":"42023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.069042,41.600893],[-74.756857,41.425631],[-74.69661,41.359907],[-74.992365,41.091537],[-75.271689,41.244892],[-75.35932,41.239415],[-75.069042,41.600893]]]},"id":"42103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.30817,41.595416],[-90.8974,41.595416],[-90.787861,41.453015],[-91.072662,41.332523],[-91.368417,41.425631],[-91.368417,41.600893],[-91.30817,41.595416]]]},"id":"19139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.876433,41.595416],[-76.816186,41.589939],[-76.449231,41.277753],[-76.640924,41.157261],[-76.734032,41.173691],[-76.799755,41.173691],[-76.89834,41.14083],[-77.144803,41.069629],[-77.599389,41.4804],[-77.599389,41.540646],[-76.876433,41.595416]]]},"id":"42081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.816186,41.589939],[-76.2192,41.540646],[-76.284923,41.376338],[-76.312308,41.310615],[-76.317785,41.310615],[-76.449231,41.277753],[-76.816186,41.589939]]]},"id":"42113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.254318,41.584462],[-89.166687,41.584462],[-89.16121,41.310615],[-89.467918,41.146307],[-89.522688,41.146307],[-89.637704,41.146307],[-89.856781,41.233938],[-89.862258,41.584462],[-89.632227,41.584462],[-89.254318,41.584462]]]},"id":"17011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.179921,41.584462],[-89.862258,41.584462],[-89.856781,41.233938],[-89.982751,41.151784],[-90.207305,41.151784],[-90.437337,41.151784],[-90.43186,41.327046],[-90.185398,41.584462],[-90.179921,41.584462]]]},"id":"17073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.047063,41.578985],[-110.05026,41.578985],[-110.05026,40.998429],[-111.047063,40.998429],[-111.047063,41.250368],[-111.047063,41.578985]]]},"id":"56041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.916581,41.529692],[-84.807042,41.529692],[-84.801565,41.425631],[-84.801565,41.272276],[-84.845381,41.272276],[-85.190428,41.266799],[-85.195905,41.524216],[-84.916581,41.529692]]]},"id":"18033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.530022,41.529692],[-73.546453,41.365384],[-73.661469,41.35443],[-73.984608,41.321569],[-73.979131,41.327046],[-73.979131,41.436584],[-73.530022,41.529692]]]},"id":"36079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.716191,41.524216],[-97.705237,41.392769],[-98.285792,41.392769],[-98.291269,41.392769],[-98.291269,41.4804],[-97.831206,41.524216],[-97.716191,41.524216]]]},"id":"31125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.195905,41.524216],[-85.190428,41.266799],[-85.305444,41.266799],[-85.650491,41.294184],[-85.655968,41.436584],[-85.655968,41.524216],[-85.195905,41.524216]]]},"id":"18113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.969987,41.507785],[-81.876879,41.277753],[-82.172634,41.064153],[-82.336942,41.064153],[-82.342419,41.28323],[-82.347896,41.431108],[-81.969987,41.507785]]]},"id":"39093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.70707,41.513262],[-93.329161,41.491354],[-93.329161,41.162737],[-93.559193,41.162737],[-93.674209,41.162737],[-93.789224,41.162737],[-93.789224,41.513262],[-93.70707,41.513262]]]},"id":"19181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.822086,41.507785],[-93.789224,41.513262],[-93.789224,41.162737],[-94.013779,41.157261],[-94.24381,41.157261],[-94.24381,41.502308],[-93.822086,41.507785]]]},"id":"19121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.790141,41.513262],[-91.483432,41.425631],[-91.483432,41.162737],[-91.598448,41.162737],[-91.713464,41.162737],[-91.943495,41.162737],[-91.943495,41.513262],[-91.82848,41.513262],[-91.790141,41.513262]]]},"id":"19183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.943495,41.513262],[-91.943495,41.162737],[-92.179004,41.162737],[-92.261158,41.162737],[-92.409035,41.162737],[-92.414512,41.507785],[-92.299497,41.507785],[-91.943495,41.513262]]]},"id":"19107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.458328,41.507785],[-92.414512,41.507785],[-92.409035,41.162737],[-92.639067,41.162737],[-92.655498,41.162737],[-92.869098,41.162737],[-92.869098,41.507785],[-92.754083,41.507785],[-92.458328,41.507785]]]},"id":"19123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.869098,41.507785],[-92.869098,41.162737],[-93.09913,41.162737],[-93.329161,41.162737],[-93.329161,41.491354],[-93.329161,41.507785],[-92.869098,41.507785]]]},"id":"19125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.848554,41.507785],[-95.49803,41.507785],[-95.152983,41.507785],[-95.158459,41.157261],[-95.267998,41.157261],[-95.383014,41.157261],[-95.673292,41.157261],[-95.881416,41.157261],[-95.925231,41.190122],[-95.936185,41.392769],[-95.996431,41.507785],[-95.848554,41.507785]]]},"id":"19155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.152983,41.507785],[-95.043444,41.502308],[-94.698396,41.502308],[-94.698396,41.157261],[-94.813412,41.157261],[-94.928428,41.157261],[-95.158459,41.157261],[-95.152983,41.507785]]]},"id":"19029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.660058,41.502308],[-94.24381,41.502308],[-94.24381,41.157261],[-94.468365,41.157261],[-94.698396,41.157261],[-94.698396,41.502308],[-94.660058,41.502308]]]},"id":"19001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.000569,41.502308],[-80.518598,41.502308],[-80.518598,41.491354],[-80.518598,41.135353],[-80.786968,41.135353],[-81.000569,41.135353],[-81.000569,41.348953],[-81.000569,41.502308]]]},"id":"39155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.415899,41.502308],[-82.955836,41.458492],[-82.840821,41.288707],[-82.840821,41.255845],[-83.070852,41.255845],[-83.421376,41.255845],[-83.415899,41.502308]]]},"id":"39143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.775097,41.4804],[-82.692943,41.491354],[-82.347896,41.431108],[-82.342419,41.28323],[-82.840821,41.288707],[-82.955836,41.458492],[-82.775097,41.4804]]]},"id":"39043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.003765,41.491354],[-79.998289,41.491354],[-79.998289,41.173691],[-80.096873,41.069629],[-80.518598,41.124399],[-80.518598,41.135353],[-80.518598,41.491354],[-80.003765,41.491354]]]},"id":"42085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.886916,41.485877],[-83.881439,41.485877],[-83.881439,41.414677],[-83.881439,41.168214],[-84.029317,41.168214],[-84.226487,41.168214],[-84.270302,41.425631],[-84.341502,41.425631],[-84.341502,41.485877],[-83.886916,41.485877]]]},"id":"39069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.247477,41.4804],[-86.061262,41.4804],[-86.061262,41.436584],[-86.077692,41.173691],[-86.242001,41.173691],[-86.466555,41.173691],[-86.466555,41.431108],[-86.247477,41.4804]]]},"id":"18099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.747266,41.474923],[-77.599389,41.4804],[-77.144803,41.069629],[-77.144803,41.042245],[-77.708927,41.113445],[-78.037544,41.151784],[-78.092313,41.217507],[-77.988251,41.474923],[-77.747266,41.474923]]]},"id":"42035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.054797,41.463969],[-123.660457,41.381815],[-123.408518,41.179168],[-123.545441,40.001626],[-124.021935,40.001626],[-124.410798,40.439781],[-124.065751,41.463969],[-124.054797,41.463969]]]},"id":"06023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.279422,41.463969],[-88.252038,41.463969],[-88.246561,41.201076],[-88.252038,41.113445],[-88.410869,41.107968],[-88.586131,41.107968],[-88.597085,41.458492],[-88.279422,41.463969]]]},"id":"17063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.905603,41.453015],[-96.905603,41.453015],[-96.91108,41.047722],[-96.91108,41.047722],[-97.349236,41.047722],[-97.365666,41.047722],[-97.365666,41.392769],[-97.256128,41.376338],[-96.905603,41.453015]]]},"id":"31023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.905603,41.453015],[-96.472925,41.392769],[-96.325048,41.190122],[-96.319571,41.047722],[-96.461971,41.01486],[-96.91108,41.047722],[-96.905603,41.453015]]]},"id":"31155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.754976,41.436584],[-102.634483,41.436584],[-102.612575,41.222984],[-102.623529,41.003906],[-102.650914,41.003906],[-103.384824,41.003906],[-103.379347,41.392769],[-103.368393,41.436584],[-102.754976,41.436584]]]},"id":"31033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.655968,41.436584],[-85.650491,41.294184],[-85.683353,41.047722],[-85.946246,41.042245],[-86.077692,41.173691],[-86.061262,41.436584],[-85.655968,41.436584]]]},"id":"18085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.357487,41.431108],[-79.209609,41.332523],[-79.215086,41.053199],[-79.603949,41.020337],[-79.69158,41.168214],[-79.697057,41.173691],[-79.477979,41.387292],[-79.357487,41.431108]]]},"id":"42031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.655004,41.4092],[-111.512603,41.425631],[-111.419495,41.359907],[-111.857651,41.14083],[-112.011005,41.151784],[-112.492976,41.075106],[-111.885035,41.425631],[-111.655004,41.4092]]]},"id":"49057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.466555,41.431108],[-86.466555,41.173691],[-86.669202,41.173691],[-86.932095,41.173691],[-86.932095,41.239415],[-86.526801,41.431108],[-86.466555,41.431108]]]},"id":"18149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.270302,41.425631],[-84.226487,41.168214],[-84.341502,41.162737],[-84.577011,41.250368],[-84.801565,41.250368],[-84.801565,41.272276],[-84.801565,41.425631],[-84.341502,41.425631],[-84.270302,41.425631]]]},"id":"39039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.835814,41.425631],[-75.835814,41.425631],[-75.600305,41.162737],[-75.649598,41.124399],[-75.687936,41.129876],[-75.994645,40.910798],[-76.208246,40.949137],[-76.312308,41.310615],[-76.284923,41.376338],[-75.835814,41.425631]]]},"id":"42079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.483432,41.425631],[-91.368417,41.425631],[-91.072662,41.332523],[-91.072662,41.332523],[-90.946692,41.075106],[-91.324601,41.075106],[-91.368417,41.075106],[-91.483432,41.162737],[-91.483432,41.425631]]]},"id":"19115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.365666,41.392769],[-97.365666,41.047722],[-97.825729,41.047722],[-97.825729,41.173691],[-97.601175,41.332523],[-97.365666,41.392769]]]},"id":"31143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.363833,41.392769],[-101.270725,41.392769],[-101.248817,41.003906],[-101.878665,41.003906],[-102.053927,41.003906],[-102.053927,41.222984],[-101.982727,41.392769],[-101.407648,41.392769],[-101.363833,41.392769]]]},"id":"31101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.705237,41.392769],[-97.601175,41.332523],[-97.825729,41.173691],[-98.280315,40.87246],[-98.285792,41.047722],[-98.285792,41.392769],[-97.705237,41.392769]]]},"id":"31121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.270725,41.392769],[-100.712077,41.392769],[-100.252014,41.392769],[-100.224629,41.047722],[-100.224629,40.702674],[-100.449184,40.702674],[-100.7778,40.702674],[-101.248817,40.697198],[-101.248817,41.003906],[-101.270725,41.392769]]]},"id":"31111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.379347,41.392769],[-103.384824,41.003906],[-103.576517,41.003906],[-104.053011,41.003906],[-104.053011,41.392769],[-103.379347,41.392769]]]},"id":"31105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.822533,41.392769],[-98.751332,41.392769],[-98.745855,41.392769],[-98.745855,41.047722],[-99.052564,41.047722],[-99.205918,41.047722],[-99.205918,41.392769],[-98.822533,41.392769]]]},"id":"31163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.521301,41.392769],[-98.291269,41.392769],[-98.285792,41.392769],[-98.285792,41.047722],[-98.70204,41.047722],[-98.723948,41.047722],[-98.745855,41.047722],[-98.745855,41.392769],[-98.521301,41.392769]]]},"id":"31093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.461971,41.392769],[-96.330525,41.392769],[-95.936185,41.392769],[-95.925231,41.190122],[-95.936185,41.190122],[-96.325048,41.190122],[-96.472925,41.392769],[-96.461971,41.392769]]]},"id":"31055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.95767,41.370861],[-78.711208,41.201076],[-78.804316,40.905321],[-79.215086,40.910798],[-79.215086,41.053199],[-79.209609,41.332523],[-79.094593,41.343476],[-78.95767,41.370861]]]},"id":"42065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.419495,41.359907],[-111.266141,41.146307],[-111.638573,40.801259],[-111.737158,40.861506],[-111.857651,41.14083],[-111.419495,41.359907]]]},"id":"49029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.586977,41.35443],[-122.499346,41.184645],[-122.691039,40.576705],[-123.063471,40.286427],[-122.932024,39.979718],[-123.545441,40.001626],[-123.408518,41.179168],[-122.915593,40.992952],[-122.586977,41.35443]]]},"id":"06105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.661469,41.35443],[-73.546453,41.365384],[-73.655992,40.987475],[-73.781961,40.883413],[-73.918885,40.916275],[-73.8915,40.998429],[-73.984608,41.321569],[-73.661469,41.35443]]]},"id":"36119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.367994,41.201076],[-74.504917,41.08606],[-74.76781,40.910798],[-74.96498,41.091537],[-74.96498,41.097014],[-74.992365,41.091537],[-74.69661,41.359907],[-74.367994,41.201076]]]},"id":"34037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.537309,41.348953],[-81.389431,41.348953],[-81.394908,40.987475],[-81.646848,40.916275],[-81.690663,40.987475],[-81.685186,41.277753],[-81.537309,41.348953]]]},"id":"39153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.389431,41.348953],[-81.000569,41.348953],[-81.000569,41.135353],[-81.0882,40.987475],[-81.394908,40.987475],[-81.389431,41.348953],[-81.389431,41.348953]]]},"id":"39133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.050754,41.332523],[-90.43186,41.327046],[-90.437337,41.151784],[-90.437337,41.064153],[-90.667368,41.069629],[-90.787861,41.069629],[-90.946692,41.069629],[-90.946692,41.075106],[-91.072662,41.332523],[-91.050754,41.332523]]]},"id":"17131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.984608,41.321569],[-73.8915,40.998429],[-74.21464,41.135353],[-74.236547,41.14083],[-73.979131,41.327046],[-73.984608,41.321569]]]},"id":"36087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.16121,41.310615],[-89.16121,41.102491],[-89.467918,41.146307],[-89.16121,41.310615]]]},"id":"17155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.317785,41.310615],[-76.312308,41.310615],[-76.208246,40.949137],[-76.378031,40.773875],[-76.525908,40.883413],[-76.640924,41.157261],[-76.449231,41.277753],[-76.317785,41.310615]]]},"id":"42037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.786498,41.294184],[-87.529082,41.299661],[-87.529082,41.168214],[-87.523605,41.009383],[-88.131545,40.998429],[-88.246561,40.992952],[-88.252038,41.113445],[-88.246561,41.201076],[-87.786498,41.294184]]]},"id":"17091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.650491,41.294184],[-85.305444,41.266799],[-85.332828,41.003906],[-85.376644,41.003906],[-85.645014,41.003906],[-85.683353,41.047722],[-85.650491,41.294184]]]},"id":"18183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.840821,41.288707],[-82.342419,41.28323],[-82.336942,41.064153],[-82.375281,41.064153],[-82.435527,40.992952],[-82.687466,40.992952],[-82.725805,40.998429],[-82.829867,40.998429],[-82.840821,41.255845],[-82.840821,41.288707]]]},"id":"39077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.036157,41.255845],[-86.932095,41.239415],[-86.932095,41.173691],[-86.932095,40.910798],[-87.096403,40.735536],[-87.266188,40.735536],[-87.277142,41.21203],[-87.277142,41.217507],[-87.216896,41.239415],[-87.036157,41.255845]]]},"id":"18073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.685186,41.277753],[-81.690663,40.987475],[-82.079526,40.992952],[-82.128818,40.992952],[-82.172634,41.064153],[-81.876879,41.277753],[-81.685186,41.277753]]]},"id":"39103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.845381,41.272276],[-84.801565,41.272276],[-84.801565,41.250368],[-84.801565,40.987475],[-84.801565,40.921752],[-84.878242,40.921752],[-85.075412,40.916275],[-85.108274,40.916275],[-85.338305,40.916275],[-85.332828,41.003906],[-85.305444,41.266799],[-85.190428,41.266799],[-84.845381,41.272276]]]},"id":"18003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.070852,41.255845],[-82.840821,41.255845],[-82.829867,40.998429],[-83.114668,40.992952],[-83.421376,40.992952],[-83.421376,41.168214],[-83.421376,41.255845],[-83.070852,41.255845]]]},"id":"39147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.234714,41.228461],[-78.092313,41.217507],[-78.037544,41.151784],[-78.360683,40.735536],[-78.349729,40.724582],[-78.804316,40.724582],[-78.804316,40.905321],[-78.711208,41.201076],[-78.234714,41.228461]]]},"id":"42033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.577011,41.250368],[-84.341502,41.162737],[-84.401749,40.992952],[-84.456518,40.987475],[-84.801565,40.987475],[-84.801565,41.250368],[-84.577011,41.250368]]]},"id":"39125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.708927,41.113445],[-77.144803,41.042245],[-77.36388,40.845075],[-77.681543,40.730059],[-78.114221,40.741013],[-78.360683,40.735536],[-78.037544,41.151784],[-77.708927,41.113445]]]},"id":"42027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.271689,41.244892],[-74.992365,41.091537],[-74.96498,41.097014],[-75.118335,40.965568],[-75.474336,40.812213],[-75.649598,41.124399],[-75.600305,41.162737],[-75.507197,41.233938],[-75.35932,41.239415],[-75.271689,41.244892]]]},"id":"42089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.047063,41.250368],[-111.047063,40.998429],[-110.05026,40.998429],[-110.000968,40.998429],[-110.000968,40.812213],[-110.148845,40.812213],[-110.904663,40.680767],[-111.430449,40.686244],[-111.550942,40.609566],[-111.638573,40.801259],[-111.266141,41.146307],[-111.047063,41.250368]]]},"id":"49043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.856781,41.233938],[-89.637704,41.146307],[-89.637704,40.976521],[-89.96632,40.976521],[-89.988228,40.976521],[-89.982751,41.151784],[-89.856781,41.233938]]]},"id":"17175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.119651,41.222984],[-102.053927,41.222984],[-102.053927,41.003906],[-102.053927,41.003906],[-102.623529,41.003906],[-102.612575,41.222984],[-102.119651,41.222984]]]},"id":"31049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.277142,41.21203],[-87.266188,40.735536],[-87.326435,40.735536],[-87.523605,40.735536],[-87.523605,41.009383],[-87.529082,41.168214],[-87.277142,41.217507],[-87.277142,41.21203]]]},"id":"18111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.367994,41.201076],[-74.236547,41.14083],[-74.21464,41.135353],[-74.132485,40.81769],[-74.269409,40.899844],[-74.504917,41.08606],[-74.367994,41.201076]]]},"id":"34031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.936185,41.190122],[-95.925231,41.190122],[-95.881416,41.157261],[-95.881416,41.053199],[-96.040247,41.064153],[-96.319571,41.047722],[-96.325048,41.190122],[-95.936185,41.190122]]]},"id":"31153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.447773,41.184645],[-121.332757,41.184645],[-121.327281,40.445258],[-121.497066,40.445258],[-123.063471,40.286427],[-122.691039,40.576705],[-122.499346,41.184645],[-121.447773,41.184645]]]},"id":"06089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.943895,41.184645],[-120.001861,41.184645],[-120.001861,39.722302],[-120.149738,39.705871],[-120.209985,40.08378],[-121.119157,40.445258],[-121.327281,40.445258],[-121.332757,41.184645],[-120.943895,41.184645]]]},"id":"06035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.799755,41.173691],[-76.734032,41.173691],[-76.525908,40.883413],[-76.378031,40.773875],[-76.70117,40.658859],[-76.947633,40.625997],[-76.936679,40.636951],[-76.799755,40.883413],[-76.89834,41.14083],[-76.799755,41.173691]]]},"id":"42097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.825729,41.047722],[-97.825729,40.697198],[-98.280315,40.697198],[-98.280315,40.697198],[-98.280315,40.87246],[-97.825729,41.173691],[-97.825729,41.047722]]]},"id":"31081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.998289,41.173691],[-79.697057,41.173691],[-79.69158,41.168214],[-79.69158,40.669813],[-80.146166,40.67529],[-80.15712,40.856029],[-80.096873,41.069629],[-79.998289,41.173691]]]},"id":"42019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.242001,41.173691],[-86.077692,41.173691],[-85.946246,41.042245],[-85.946246,40.998429],[-86.1708,40.910798],[-86.466555,40.910798],[-86.466555,41.173691],[-86.242001,41.173691]]]},"id":"18049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.669202,41.173691],[-86.466555,41.173691],[-86.466555,40.910798],[-86.581571,40.910798],[-86.877326,40.910798],[-86.932095,40.910798],[-86.932095,41.173691],[-86.669202,41.173691]]]},"id":"18131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.734032,41.173691],[-76.640924,41.157261],[-76.525908,40.883413],[-76.734032,41.173691]]]},"id":"42093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.603949,41.020337],[-79.215086,41.053199],[-79.215086,40.910798],[-79.450595,40.527412],[-79.538226,40.54932],[-79.69158,40.669813],[-79.69158,40.669813],[-79.69158,41.168214],[-79.603949,41.020337]]]},"id":"42005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.881439,41.168214],[-83.421376,41.168214],[-83.421376,40.992952],[-83.514484,40.81769],[-83.574731,40.81769],[-83.881439,40.81769],[-83.881439,40.921752],[-83.881439,41.168214]]]},"id":"39063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.029317,41.168214],[-83.881439,41.168214],[-83.881439,40.921752],[-84.341502,40.861506],[-84.401749,40.992952],[-84.341502,41.162737],[-84.226487,41.168214],[-84.029317,41.168214]]]},"id":"39137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.943495,41.162737],[-91.713464,41.162737],[-91.718941,40.899844],[-92.118758,40.899844],[-92.179004,40.899844],[-92.179004,41.162737],[-91.943495,41.162737]]]},"id":"19101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.598448,41.162737],[-91.483432,41.162737],[-91.368417,41.075106],[-91.406755,40.812213],[-91.603925,40.812213],[-91.718941,40.812213],[-91.718941,40.899844],[-91.713464,41.162737],[-91.598448,41.162737]]]},"id":"19087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.261158,41.162737],[-92.179004,41.162737],[-92.179004,40.899844],[-92.639067,40.899844],[-92.639067,41.162737],[-92.409035,41.162737],[-92.261158,41.162737]]]},"id":"19179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.674209,41.162737],[-93.559193,41.162737],[-93.559193,40.899844],[-93.663255,40.899844],[-94.013779,40.894367],[-94.013779,41.157261],[-93.789224,41.162737],[-93.674209,41.162737]]]},"id":"19039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.655498,41.162737],[-92.639067,41.162737],[-92.639067,40.899844],[-93.09913,40.899844],[-93.09913,41.162737],[-92.869098,41.162737],[-92.655498,41.162737]]]},"id":"19135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.09913,41.162737],[-93.09913,40.899844],[-93.559193,40.899844],[-93.559193,41.162737],[-93.329161,41.162737],[-93.09913,41.162737]]]},"id":"19117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.42596,40.609566],[-73.49716,40.921752],[-72.100541,40.992952],[-73.42596,40.609566]]]},"id":"36103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.673292,41.157261],[-95.383014,41.157261],[-95.383014,40.899844],[-95.519938,40.899844],[-95.815692,40.899844],[-95.881416,41.053199],[-95.881416,41.157261],[-95.673292,41.157261]]]},"id":"19129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.267998,41.157261],[-95.158459,41.157261],[-94.928428,41.157261],[-94.928428,40.899844],[-95.289906,40.899844],[-95.383014,40.899844],[-95.383014,41.157261],[-95.267998,41.157261]]]},"id":"19137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.813412,41.157261],[-94.698396,41.157261],[-94.468365,41.157261],[-94.468365,40.899844],[-94.857228,40.899844],[-94.928428,40.899844],[-94.928428,41.157261],[-94.813412,41.157261]]]},"id":"19003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.468365,41.157261],[-94.24381,41.157261],[-94.013779,41.157261],[-94.013779,40.894367],[-94.358826,40.899844],[-94.468365,40.899844],[-94.468365,41.157261]]]},"id":"19175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.011005,41.151784],[-111.857651,41.14083],[-111.737158,40.861506],[-111.98362,40.921752],[-112.262944,40.773875],[-112.492976,41.075106],[-112.011005,41.151784]]]},"id":"49011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.207305,41.151784],[-89.982751,41.151784],[-89.988228,40.976521],[-89.988228,40.713628],[-90.442814,40.713628],[-90.437337,41.064153],[-90.437337,41.151784],[-90.207305,41.151784]]]},"id":"17095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.144803,41.069629],[-76.89834,41.14083],[-76.799755,40.883413],[-76.854525,40.88889],[-77.358403,40.806736],[-77.36388,40.845075],[-77.144803,41.042245],[-77.144803,41.069629]]]},"id":"42119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.522688,41.146307],[-89.467918,41.146307],[-89.16121,41.102491],[-89.046194,40.927229],[-89.111917,40.927229],[-89.473395,40.921752],[-89.637704,40.976521],[-89.637704,41.146307],[-89.522688,41.146307]]]},"id":"17123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.786968,41.135353],[-80.518598,41.135353],[-80.518598,41.124399],[-80.518598,40.899844],[-80.858168,40.927229],[-81.0882,40.905321],[-81.0882,40.987475],[-81.000569,41.135353],[-80.786968,41.135353]]]},"id":"39099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.21464,41.135353],[-73.8915,40.998429],[-73.918885,40.916275],[-73.918885,40.910798],[-73.935316,40.883413],[-73.984608,40.795782],[-74.011993,40.823167],[-74.148916,40.784829],[-74.132485,40.81769],[-74.21464,41.135353]]]},"id":"34003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.687936,41.129876],[-75.649598,41.124399],[-75.474336,40.812213],[-75.611259,40.784829],[-75.759137,40.735536],[-75.994645,40.910798],[-75.687936,41.129876]]]},"id":"42025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.518598,41.124399],[-80.096873,41.069629],[-80.15712,40.856029],[-80.255705,40.856029],[-80.518598,40.850552],[-80.518598,40.899844],[-80.518598,41.124399]]]},"id":"42073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.410869,41.107968],[-88.252038,41.113445],[-88.246561,40.992952],[-88.460161,40.615043],[-88.712101,40.757444],[-88.931178,40.751967],[-88.931178,40.927229],[-88.586131,41.107968],[-88.410869,41.107968]]]},"id":"17105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.96498,41.091537],[-74.76781,40.910798],[-74.888303,40.790306],[-75.189535,40.593136],[-75.195012,40.609566],[-75.118335,40.965568],[-74.96498,41.097014],[-74.96498,41.091537]]]},"id":"34041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.504917,41.08606],[-74.269409,40.899844],[-74.28584,40.894367],[-74.373471,40.741013],[-74.461102,40.67529],[-74.718518,40.719105],[-74.723995,40.719105],[-74.888303,40.790306],[-74.76781,40.910798],[-74.504917,41.08606]]]},"id":"34027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.073531,40.998429],[-112.492976,41.075106],[-112.262944,40.773875],[-112.175313,40.467166],[-112.18079,40.01258],[-112.339621,39.903041],[-114.048427,39.908518],[-114.048427,40.116642],[-114.04295,40.998429],[-113.073531,40.998429]]]},"id":"49045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.324601,41.075106],[-90.946692,41.075106],[-90.946692,41.069629],[-91.111001,40.697198],[-91.406755,40.812213],[-91.368417,41.075106],[-91.324601,41.075106]]]},"id":"19057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.946692,41.069629],[-90.787861,41.069629],[-90.787861,40.636951],[-90.8974,40.636951],[-90.902877,40.636951],[-91.187678,40.636951],[-91.111001,40.697198],[-90.946692,41.069629]]]},"id":"17071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.667368,41.069629],[-90.437337,41.064153],[-90.442814,40.713628],[-90.442814,40.625997],[-90.787861,40.636951],[-90.787861,41.069629],[-90.667368,41.069629]]]},"id":"17187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.040247,41.064153],[-95.881416,41.053199],[-95.815692,40.899844],[-95.832123,40.784829],[-95.892369,40.784829],[-96.461971,40.784829],[-96.461971,41.01486],[-96.319571,41.047722],[-96.040247,41.064153]]]},"id":"31025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.375281,41.064153],[-82.336942,41.064153],[-82.172634,41.064153],[-82.128818,40.992952],[-82.128818,40.669813],[-82.221926,40.565751],[-82.336942,40.554797],[-82.435527,40.992952],[-82.375281,41.064153]]]},"id":"39005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.994598,41.047722],[-99.424996,41.047722],[-99.419519,40.669813],[-99.644074,40.686244],[-99.983644,40.697198],[-100.224629,40.702674],[-100.224629,41.047722],[-99.994598,41.047722]]]},"id":"31047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.052564,41.047722],[-98.745855,41.047722],[-98.723948,41.047722],[-98.723948,40.697198],[-98.723948,40.691721],[-98.953979,40.653382],[-99.178534,40.658859],[-99.419519,40.669813],[-99.424996,41.047722],[-99.205918,41.047722],[-99.052564,41.047722]]]},"id":"31019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.365666,41.047722],[-97.365666,40.697198],[-97.798345,40.697198],[-97.825729,40.697198],[-97.825729,40.697198],[-97.825729,41.047722],[-97.365666,41.047722]]]},"id":"31185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.349236,41.047722],[-96.91108,41.047722],[-96.91108,40.697198],[-97.365666,40.697198],[-97.365666,41.047722],[-97.349236,41.047722]]]},"id":"31159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.683353,41.047722],[-85.645014,41.003906],[-85.639537,40.653382],[-85.864092,40.653382],[-85.946246,40.998429],[-85.946246,41.042245],[-85.683353,41.047722]]]},"id":"18169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.70204,41.047722],[-98.285792,41.047722],[-98.280315,40.87246],[-98.280315,40.697198],[-98.723948,40.697198],[-98.723948,41.047722],[-98.70204,41.047722]]]},"id":"31079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.91108,41.047722],[-96.461971,41.01486],[-96.461971,40.784829],[-96.461971,40.521935],[-96.478402,40.521935],[-96.91108,40.521935],[-96.91108,40.697198],[-96.91108,41.047722],[-96.91108,41.047722]]]},"id":"31109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.523605,41.009383],[-87.523605,40.735536],[-87.529082,40.489074],[-87.841267,40.489074],[-87.934375,40.483597],[-88.131545,40.998429],[-88.131545,40.998429],[-87.523605,41.009383]]]},"id":"17075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.376644,41.003906],[-85.332828,41.003906],[-85.338305,40.916275],[-85.447844,40.653382],[-85.639537,40.653382],[-85.645014,41.003906],[-85.376644,41.003906]]]},"id":"18069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.878665,41.003906],[-101.248817,41.003906],[-101.248817,40.697198],[-101.347402,40.697198],[-101.571957,40.697198],[-102.053927,40.697198],[-102.053927,40.751967],[-102.053927,41.003906],[-102.053927,41.003906],[-101.878665,41.003906]]]},"id":"31135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.317267,41.003906],[-106.857204,41.003906],[-106.654557,40.445258],[-106.627173,39.924949],[-107.032466,39.919472],[-107.037943,40.089257],[-107.109143,40.226181],[-107.43776,40.220704],[-107.317267,41.003906]]]},"id":"08107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.919731,41.003906],[-107.317267,41.003906],[-107.43776,40.220704],[-109.053457,40.220704],[-109.04798,40.653382],[-109.04798,40.998429],[-107.919731,41.003906]]]},"id":"08081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.857204,41.003906],[-106.320464,40.998429],[-106.189017,40.998429],[-105.854924,40.483597],[-106.654557,40.445258],[-106.857204,41.003906]]]},"id":"08057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.623529,41.003906],[-102.053927,41.003906],[-102.053927,40.751967],[-102.327774,40.74649],[-102.650914,40.751967],[-102.650914,41.003906],[-102.623529,41.003906]]]},"id":"08115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.650914,41.003906],[-102.650914,40.751967],[-102.667345,40.439781],[-102.78236,40.439781],[-103.466978,40.434304],[-103.581994,40.521935],[-103.576517,41.003906],[-103.384824,41.003906],[-102.650914,41.003906]]]},"id":"08075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.677828,40.998429],[-109.04798,40.998429],[-109.04798,40.653382],[-109.283489,40.856029],[-109.97906,40.812213],[-110.000968,40.812213],[-110.000968,40.998429],[-109.677828,40.998429]]]},"id":"49009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.576517,41.003906],[-103.581994,40.521935],[-104.091349,40.521935],[-104.151596,40.001626],[-105.055291,40.001626],[-105.055291,40.264519],[-104.945752,40.998429],[-104.053011,41.003906],[-103.576517,41.003906]]]},"id":"08123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.016928,40.998429],[-116.58425,40.998429],[-116.600681,39.163654],[-117.772746,39.092454],[-117.493422,39.530609],[-117.542715,40.001626],[-117.301729,40.527412],[-117.016928,40.998429]]]},"id":"32015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.58425,40.998429],[-116.157049,40.998429],[-115.833909,40.127596],[-115.90511,39.163654],[-116.233726,39.163654],[-116.600681,39.163654],[-116.58425,40.998429]]]},"id":"32011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.946246,40.998429],[-85.864092,40.653382],[-85.864092,40.565751],[-85.875046,40.565751],[-86.165323,40.560274],[-86.1708,40.910798],[-85.946246,40.998429]]]},"id":"18103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.279845,40.998429],[-104.945752,40.998429],[-105.055291,40.264519],[-105.340092,40.259042],[-105.652277,40.259042],[-105.854924,40.483597],[-106.189017,40.998429],[-105.279845,40.998429]]]},"id":"08069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.131545,40.998429],[-87.934375,40.483597],[-87.934375,40.401443],[-88.109637,40.401443],[-88.460161,40.401443],[-88.460161,40.615043],[-88.246561,40.992952],[-88.131545,40.998429],[-88.131545,40.998429]]]},"id":"17053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.725805,40.998429],[-82.725805,40.713628],[-82.857251,40.713628],[-82.857251,40.702674],[-82.977744,40.702674],[-83.109191,40.702674],[-83.114668,40.992952],[-82.829867,40.998429],[-82.725805,40.998429]]]},"id":"39033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.687466,40.992952],[-82.435527,40.992952],[-82.336942,40.554797],[-82.621743,40.54932],[-82.725805,40.713628],[-82.725805,40.998429],[-82.687466,40.992952]]]},"id":"39139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.114668,40.992952],[-83.109191,40.702674],[-83.421376,40.686244],[-83.514484,40.81769],[-83.421376,40.992952],[-83.114668,40.992952]]]},"id":"39175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.079526,40.992952],[-81.690663,40.987475],[-81.646848,40.916275],[-81.652325,40.669813],[-81.657801,40.669813],[-82.128818,40.669813],[-82.128818,40.992952],[-82.079526,40.992952]]]},"id":"39169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.456518,40.987475],[-84.401749,40.992952],[-84.341502,40.861506],[-84.396272,40.686244],[-84.456518,40.686244],[-84.774181,40.730059],[-84.801565,40.730059],[-84.801565,40.921752],[-84.801565,40.987475],[-84.456518,40.987475]]]},"id":"39161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.394908,40.987475],[-81.0882,40.987475],[-81.0882,40.905321],[-81.0882,40.730059],[-81.121061,40.730059],[-81.318231,40.653382],[-81.42777,40.653382],[-81.652325,40.636951],[-81.652325,40.669813],[-81.646848,40.916275],[-81.394908,40.987475]]]},"id":"39151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.96632,40.976521],[-89.637704,40.976521],[-89.473395,40.921752],[-89.555549,40.74649],[-89.873212,40.510982],[-89.988228,40.713628],[-89.988228,40.976521],[-89.96632,40.976521]]]},"id":"17143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.118335,40.965568],[-75.195012,40.609566],[-75.331935,40.538366],[-75.611259,40.784829],[-75.474336,40.812213],[-75.118335,40.965568]]]},"id":"42095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.013732,40.856029],[-117.301729,40.527412],[-117.542715,40.001626],[-117.948008,40.001626],[-119.224135,40.001626],[-119.311766,40.960091],[-118.013732,40.856029]]]},"id":"32027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.208246,40.949137],[-75.994645,40.910798],[-75.759137,40.735536],[-75.890583,40.67529],[-76.438277,40.494551],[-76.536862,40.554797],[-76.70117,40.658859],[-76.378031,40.773875],[-76.208246,40.949137]]]},"id":"42107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.858168,40.927229],[-80.518598,40.899844],[-80.518598,40.850552],[-80.518598,40.636951],[-80.666475,40.582182],[-80.863645,40.598613],[-81.0882,40.730059],[-81.0882,40.905321],[-80.858168,40.927229]]]},"id":"39029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.111917,40.927229],[-89.046194,40.927229],[-88.931178,40.927229],[-88.931178,40.751967],[-89.270749,40.593136],[-89.50078,40.74649],[-89.555549,40.74649],[-89.473395,40.921752],[-89.111917,40.927229]]]},"id":"17203"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.49716,40.921752],[-73.42596,40.609566],[-73.754577,40.587659],[-73.76553,40.801259],[-73.49716,40.921752]]]},"id":"36059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.878242,40.921752],[-84.801565,40.921752],[-84.801565,40.730059],[-84.801565,40.571228],[-85.069935,40.565751],[-85.075412,40.916275],[-84.878242,40.921752]]]},"id":"18001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.98362,40.921752],[-111.737158,40.861506],[-111.638573,40.801259],[-111.550942,40.609566],[-111.594758,40.576705],[-111.594758,40.576705],[-112.175313,40.467166],[-112.262944,40.773875],[-111.98362,40.921752]]]},"id":"49035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.881439,40.921752],[-83.881439,40.81769],[-83.881439,40.642428],[-84.253871,40.686244],[-84.396272,40.686244],[-84.341502,40.861506],[-83.881439,40.921752]]]},"id":"39003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.108274,40.916275],[-85.075412,40.916275],[-85.069935,40.565751],[-85.201382,40.565751],[-85.22329,40.565751],[-85.447844,40.565751],[-85.447844,40.653382],[-85.338305,40.916275],[-85.108274,40.916275]]]},"id":"18179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.918885,40.910798],[-73.918885,40.916275],[-73.781961,40.883413],[-73.787438,40.801259],[-73.814823,40.806736],[-73.913408,40.795782],[-73.924362,40.877937],[-73.935316,40.883413],[-73.918885,40.910798]]]},"id":"36005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.877326,40.910798],[-86.581571,40.910798],[-86.581571,40.735536],[-86.773264,40.560274],[-87.096403,40.560274],[-87.096403,40.735536],[-86.932095,40.910798],[-86.877326,40.910798]]]},"id":"18181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.215086,40.910798],[-78.804316,40.905321],[-78.804316,40.724582],[-78.974101,40.395966],[-79.450595,40.527412],[-79.215086,40.910798]]]},"id":"42063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.581571,40.910798],[-86.466555,40.910798],[-86.1708,40.910798],[-86.165323,40.560274],[-86.373447,40.560274],[-86.581571,40.735536],[-86.581571,40.910798]]]},"id":"18017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.28584,40.894367],[-74.269409,40.899844],[-74.132485,40.81769],[-74.148916,40.784829],[-74.137962,40.67529],[-74.362517,40.735536],[-74.373471,40.741013],[-74.28584,40.894367]]]},"id":"34013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.519938,40.899844],[-95.383014,40.899844],[-95.37206,40.582182],[-95.7664,40.587659],[-95.832123,40.784829],[-95.815692,40.899844],[-95.519938,40.899844]]]},"id":"19071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.289906,40.899844],[-94.928428,40.899844],[-94.917474,40.576705],[-95.163936,40.576705],[-95.202275,40.576705],[-95.37206,40.582182],[-95.383014,40.899844],[-95.289906,40.899844]]]},"id":"19145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.118758,40.899844],[-91.718941,40.899844],[-91.718941,40.812213],[-91.718941,40.598613],[-91.833957,40.609566],[-91.943495,40.60409],[-92.179004,40.598613],[-92.179004,40.899844],[-92.118758,40.899844]]]},"id":"19177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.857228,40.899844],[-94.468365,40.899844],[-94.473842,40.571228],[-94.632673,40.571228],[-94.917474,40.576705],[-94.928428,40.899844],[-94.857228,40.899844]]]},"id":"19173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.179004,40.899844],[-92.179004,40.598613],[-92.348789,40.598613],[-92.452851,40.593136],[-92.639067,40.593136],[-92.639067,40.899844],[-92.179004,40.899844]]]},"id":"19051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.358826,40.899844],[-94.013779,40.894367],[-94.013779,40.571228],[-94.232857,40.571228],[-94.287626,40.571228],[-94.473842,40.571228],[-94.468365,40.899844],[-94.358826,40.899844]]]},"id":"19159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.663255,40.899844],[-93.559193,40.899844],[-93.559193,40.582182],[-93.772794,40.576705],[-94.013779,40.571228],[-94.013779,40.894367],[-93.663255,40.899844]]]},"id":"19053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.639067,40.899844],[-92.639067,40.593136],[-92.715744,40.587659],[-92.748606,40.587659],[-93.09913,40.582182],[-93.09913,40.899844],[-92.639067,40.899844]]]},"id":"19007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.09913,40.899844],[-93.09913,40.582182],[-93.372977,40.582182],[-93.526331,40.582182],[-93.559193,40.582182],[-93.559193,40.899844],[-93.09913,40.899844]]]},"id":"19185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.854525,40.88889],[-76.799755,40.883413],[-76.936679,40.636951],[-77.133849,40.686244],[-77.287203,40.691721],[-77.358403,40.806736],[-76.854525,40.88889]]]},"id":"42109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.924362,40.877937],[-73.913408,40.795782],[-73.9627,40.735536],[-74.022947,40.680767],[-74.022947,40.708151],[-73.984608,40.795782],[-73.935316,40.883413],[-73.924362,40.877937]]]},"id":"36061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.283489,40.856029],[-109.04798,40.653382],[-109.053457,40.220704],[-109.053457,39.662056],[-109.053457,39.497748],[-110.022876,39.459409],[-110.022876,39.470363],[-109.968106,39.804456],[-109.97906,40.812213],[-109.283489,40.856029]]]},"id":"49047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.255705,40.856029],[-80.15712,40.856029],[-80.146166,40.67529],[-80.359767,40.47812],[-80.398105,40.47812],[-80.518598,40.47812],[-80.518598,40.636951],[-80.518598,40.850552],[-80.255705,40.856029]]]},"id":"42007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.36388,40.845075],[-77.358403,40.806736],[-77.287203,40.691721],[-77.752743,40.379535],[-77.681543,40.730059],[-77.36388,40.845075]]]},"id":"42087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.148845,40.812213],[-110.000968,40.812213],[-109.97906,40.812213],[-109.968106,39.804456],[-110.855371,39.81541],[-110.893709,39.897564],[-110.904663,40.680767],[-110.148845,40.812213]]]},"id":"49013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.011993,40.823167],[-73.984608,40.795782],[-74.022947,40.708151],[-74.15987,40.642428],[-74.137962,40.67529],[-74.148916,40.784829],[-74.011993,40.823167]]]},"id":"34017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.574731,40.81769],[-83.514484,40.81769],[-83.421376,40.686244],[-83.415899,40.505505],[-83.519961,40.505505],[-83.881439,40.538366],[-83.881439,40.642428],[-83.881439,40.81769],[-83.574731,40.81769]]]},"id":"39065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.603925,40.812213],[-91.406755,40.812213],[-91.111001,40.697198],[-91.187678,40.636951],[-91.417709,40.379535],[-91.718941,40.598613],[-91.718941,40.812213],[-91.603925,40.812213]]]},"id":"19111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.814823,40.806736],[-73.787438,40.801259],[-73.76553,40.801259],[-73.754577,40.587659],[-73.940792,40.565751],[-73.951746,40.741013],[-73.9627,40.735536],[-73.913408,40.795782],[-73.814823,40.806736]]]},"id":"36081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.888303,40.790306],[-74.723995,40.719105],[-74.745903,40.423351],[-74.800672,40.417874],[-74.943073,40.341196],[-75.189535,40.593136],[-74.888303,40.790306]]]},"id":"34019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.611259,40.784829],[-75.331935,40.538366],[-75.48529,40.417874],[-75.490767,40.423351],[-75.529105,40.445258],[-75.890583,40.67529],[-75.759137,40.735536],[-75.611259,40.784829]]]},"id":"42077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.892369,40.784829],[-95.832123,40.784829],[-95.7664,40.587659],[-95.71163,40.521935],[-96.023816,40.521935],[-96.067632,40.521935],[-96.461971,40.521935],[-96.461971,40.784829],[-95.892369,40.784829]]]},"id":"31131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.718518,40.719105],[-74.461102,40.67529],[-74.461102,40.598613],[-74.619933,40.374058],[-74.745903,40.423351],[-74.723995,40.719105],[-74.718518,40.719105]]]},"id":"34035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.712101,40.757444],[-88.460161,40.615043],[-88.460161,40.401443],[-88.460161,40.28095],[-88.575177,40.28095],[-88.920224,40.28095],[-89.150256,40.28095],[-89.265272,40.324766],[-89.270749,40.593136],[-88.931178,40.751967],[-88.712101,40.757444]]]},"id":"17113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.327774,40.74649],[-102.053927,40.751967],[-102.053927,40.697198],[-102.053927,40.439781],[-102.426359,40.439781],[-102.667345,40.439781],[-102.650914,40.751967],[-102.327774,40.74649]]]},"id":"08095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.50078,40.74649],[-89.270749,40.593136],[-89.265272,40.324766],[-89.604842,40.319289],[-89.89512,40.434304],[-89.922504,40.434304],[-89.873212,40.510982],[-89.555549,40.74649],[-89.50078,40.74649]]]},"id":"17179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.114221,40.741013],[-77.681543,40.730059],[-77.752743,40.379535],[-77.703451,40.264519],[-77.862282,40.061872],[-78.136129,40.165934],[-78.256622,40.297381],[-78.114221,40.741013]]]},"id":"42061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.360683,40.735536],[-78.114221,40.741013],[-78.256622,40.297381],[-78.6181,40.324766],[-78.349729,40.724582],[-78.360683,40.735536]]]},"id":"42013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.362517,40.735536],[-74.137962,40.67529],[-74.15987,40.642428],[-74.209163,40.593136],[-74.291317,40.593136],[-74.461102,40.598613],[-74.461102,40.67529],[-74.373471,40.741013],[-74.362517,40.735536]]]},"id":"34039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.951746,40.741013],[-73.940792,40.565751],[-74.022947,40.680767],[-73.9627,40.735536],[-73.951746,40.741013]]]},"id":"36047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.773264,40.560274],[-86.581571,40.735536],[-86.373447,40.560274],[-86.373447,40.434304],[-86.696587,40.434304],[-86.773264,40.560274]]]},"id":"18015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.326435,40.735536],[-87.266188,40.735536],[-87.096403,40.735536],[-87.096403,40.560274],[-87.096403,40.47812],[-87.452404,40.47812],[-87.529082,40.47812],[-87.529082,40.489074],[-87.523605,40.735536],[-87.326435,40.735536]]]},"id":"18007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.121061,40.730059],[-81.0882,40.730059],[-80.863645,40.598613],[-80.940322,40.423351],[-81.186785,40.434304],[-81.268939,40.434304],[-81.318231,40.653382],[-81.121061,40.730059]]]},"id":"39019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.774181,40.730059],[-84.456518,40.686244],[-84.43461,40.35215],[-84.43461,40.35215],[-84.456518,40.35215],[-84.801565,40.35215],[-84.801565,40.571228],[-84.801565,40.730059],[-84.774181,40.730059]]]},"id":"39107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.804316,40.724582],[-78.349729,40.724582],[-78.6181,40.324766],[-78.656438,40.242611],[-79.001485,40.286427],[-79.056255,40.286427],[-78.974101,40.395966],[-78.804316,40.724582]]]},"id":"42021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.442814,40.713628],[-89.988228,40.713628],[-89.873212,40.510982],[-89.922504,40.434304],[-90.201828,40.182365],[-90.448291,40.275473],[-90.442814,40.625997],[-90.442814,40.713628]]]},"id":"17057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.857251,40.713628],[-82.725805,40.713628],[-82.621743,40.54932],[-82.742236,40.346673],[-83.02156,40.434304],[-82.857251,40.702674],[-82.857251,40.713628]]]},"id":"39117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.977744,40.702674],[-82.857251,40.702674],[-83.02156,40.434304],[-83.246114,40.445258],[-83.273499,40.505505],[-83.415899,40.505505],[-83.421376,40.686244],[-83.109191,40.702674],[-82.977744,40.702674]]]},"id":"39101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.449184,40.702674],[-100.224629,40.702674],[-99.983644,40.697198],[-100.093183,40.35215],[-100.197245,40.35215],[-100.383461,40.35215],[-100.755893,40.35215],[-100.7778,40.35215],[-100.7778,40.702674],[-100.449184,40.702674]]]},"id":"31063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.7778,40.702674],[-100.7778,40.35215],[-101.111894,40.35215],[-101.325494,40.35215],[-101.325494,40.35215],[-101.341925,40.35215],[-101.347402,40.697198],[-101.248817,40.697198],[-100.7778,40.702674]]]},"id":"31085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.571957,40.697198],[-101.347402,40.697198],[-101.341925,40.35215],[-102.053927,40.346673],[-102.053927,40.439781],[-102.053927,40.697198],[-101.571957,40.697198]]]},"id":"31029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.983644,40.697198],[-99.644074,40.686244],[-99.644074,40.35215],[-99.989121,40.35215],[-100.093183,40.35215],[-99.983644,40.697198]]]},"id":"31073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.723948,40.697198],[-98.280315,40.697198],[-98.280315,40.697198],[-98.280315,40.35215],[-98.291269,40.35215],[-98.723948,40.35215],[-98.723948,40.691721],[-98.723948,40.697198]]]},"id":"31001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.798345,40.697198],[-97.365666,40.697198],[-97.365666,40.35215],[-97.50259,40.35215],[-97.820252,40.35215],[-97.825729,40.35215],[-97.825729,40.697198],[-97.798345,40.697198]]]},"id":"31059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.825729,40.697198],[-97.825729,40.35215],[-98.011945,40.35215],[-98.274839,40.35215],[-98.280315,40.35215],[-98.280315,40.697198],[-97.825729,40.697198],[-97.825729,40.697198]]]},"id":"31035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.365666,40.697198],[-96.91108,40.697198],[-96.91108,40.521935],[-96.916557,40.35215],[-97.365666,40.35215],[-97.365666,40.697198]]]},"id":"31151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.133849,40.686244],[-76.936679,40.636951],[-76.947633,40.625997],[-77.670589,40.291904],[-77.703451,40.264519],[-77.752743,40.379535],[-77.287203,40.691721],[-77.133849,40.686244]]]},"id":"42067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.430449,40.686244],[-110.904663,40.680767],[-110.893709,39.897564],[-111.594758,40.576705],[-111.550942,40.609566],[-111.430449,40.686244]]]},"id":"49051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.953979,40.653382],[-98.723948,40.691721],[-98.723948,40.35215],[-98.729425,40.35215],[-99.11281,40.35215],[-99.178534,40.35215],[-99.178534,40.658859],[-98.953979,40.653382]]]},"id":"31099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.644074,40.686244],[-99.419519,40.669813],[-99.178534,40.658859],[-99.178534,40.35215],[-99.63312,40.35215],[-99.644074,40.35215],[-99.644074,40.686244]]]},"id":"31137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.253871,40.686244],[-83.881439,40.642428],[-83.881439,40.538366],[-84.001932,40.483597],[-84.105994,40.483597],[-84.43461,40.35215],[-84.456518,40.686244],[-84.396272,40.686244],[-84.253871,40.686244]]]},"id":"39011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.538226,40.54932],[-79.450595,40.527412],[-78.974101,40.395966],[-79.056255,40.286427],[-79.291763,40.039965],[-79.499887,40.13855],[-79.877796,40.127596],[-79.872319,40.198796],[-79.69158,40.669813],[-79.538226,40.54932]]]},"id":"42129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.890583,40.67529],[-75.529105,40.445258],[-75.69889,40.242611],[-75.874152,40.13855],[-76.153476,40.313812],[-76.438277,40.494551],[-75.890583,40.67529]]]},"id":"42011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.146166,40.67529],[-79.69158,40.669813],[-79.69158,40.669813],[-79.872319,40.198796],[-80.359767,40.47812],[-80.146166,40.67529]]]},"id":"42003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.657801,40.669813],[-81.652325,40.669813],[-81.652325,40.636951],[-81.707094,40.445258],[-82.183588,40.456212],[-82.221926,40.565751],[-82.128818,40.669813],[-81.657801,40.669813]]]},"id":"39075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.42777,40.653382],[-81.318231,40.653382],[-81.268939,40.434304],[-81.340139,40.215227],[-81.62494,40.220704],[-81.707094,40.445258],[-81.652325,40.636951],[-81.42777,40.653382]]]},"id":"39157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.536862,40.554797],[-76.564247,40.198796],[-76.723078,40.122119],[-76.860002,40.226181],[-76.914771,40.330243],[-76.95311,40.60409],[-76.947633,40.625997],[-76.70117,40.658859],[-76.536862,40.554797]]]},"id":"42043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.447844,40.653382],[-85.447844,40.565751],[-85.442367,40.379535],[-85.513567,40.379535],[-85.579291,40.379535],[-85.672399,40.379535],[-85.864092,40.379535],[-85.864092,40.40692],[-85.864092,40.565751],[-85.864092,40.653382],[-85.639537,40.653382],[-85.447844,40.653382]]]},"id":"18053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.187678,40.636951],[-90.902877,40.636951],[-90.908354,40.286427],[-90.913831,40.193319],[-91.204109,40.198796],[-91.50534,40.198796],[-91.499863,40.248088],[-91.417709,40.379535],[-91.187678,40.636951]]]},"id":"17067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.8974,40.636951],[-90.787861,40.636951],[-90.442814,40.625997],[-90.448291,40.275473],[-90.908354,40.286427],[-90.902877,40.636951],[-90.8974,40.636951]]]},"id":"17109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.518598,40.636951],[-80.518598,40.47812],[-80.518598,40.401443],[-80.633614,40.395966],[-80.666475,40.582182],[-80.518598,40.636951]]]},"id":"54029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.95311,40.60409],[-76.914771,40.330243],[-77.122895,40.297381],[-77.615819,40.198796],[-77.670589,40.291904],[-76.947633,40.625997],[-76.95311,40.60409]]]},"id":"42099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.833957,40.609566],[-91.718941,40.598613],[-91.417709,40.379535],[-91.499863,40.248088],[-91.948972,40.259042],[-91.948972,40.302858],[-91.943495,40.60409],[-91.833957,40.609566]]]},"id":"29045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.291317,40.593136],[-74.209163,40.593136],[-74.225593,40.450735],[-74.48301,40.253565],[-74.619933,40.374058],[-74.461102,40.598613],[-74.291317,40.593136]]]},"id":"34023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.195012,40.609566],[-75.189535,40.593136],[-74.943073,40.341196],[-74.723995,40.149503],[-74.975934,40.050919],[-75.014273,40.13855],[-75.48529,40.417874],[-75.331935,40.538366],[-75.195012,40.609566]]]},"id":"42017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.943495,40.60409],[-91.948972,40.302858],[-92.140665,40.302858],[-92.348789,40.302858],[-92.348789,40.346673],[-92.348789,40.598613],[-92.179004,40.598613],[-91.943495,40.60409]]]},"id":"29199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.863645,40.598613],[-80.666475,40.582182],[-80.633614,40.395966],[-80.682906,40.187842],[-80.704814,40.15498],[-80.885553,40.160457],[-80.940322,40.423351],[-80.863645,40.598613]]]},"id":"39081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.452851,40.593136],[-92.348789,40.598613],[-92.348789,40.346673],[-92.682882,40.341196],[-92.715744,40.587659],[-92.639067,40.593136],[-92.452851,40.593136]]]},"id":"29197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.748606,40.587659],[-92.715744,40.587659],[-92.682882,40.341196],[-92.858145,40.341196],[-93.186761,40.385012],[-93.3675,40.385012],[-93.372977,40.582182],[-93.09913,40.582182],[-92.748606,40.587659]]]},"id":"29171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.7664,40.587659],[-95.37206,40.582182],[-95.202275,40.576705],[-95.180367,40.264519],[-95.503507,40.264519],[-95.552799,40.264519],[-95.71163,40.521935],[-95.7664,40.587659]]]},"id":"29005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.526331,40.582182],[-93.372977,40.582182],[-93.3675,40.385012],[-93.3675,40.264519],[-93.76184,40.264519],[-93.772794,40.576705],[-93.559193,40.582182],[-93.526331,40.582182]]]},"id":"29129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.163936,40.576705],[-94.917474,40.576705],[-94.632673,40.571228],[-94.599812,40.385012],[-94.605288,40.127596],[-95.043444,40.127596],[-95.180367,40.264519],[-95.202275,40.576705],[-95.163936,40.576705]]]},"id":"29147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.594758,40.576705],[-111.594758,40.576705],[-110.893709,39.897564],[-110.855371,39.81541],[-111.014202,39.81541],[-111.24971,39.81541],[-111.556419,39.81541],[-111.64405,39.81541],[-112.18079,40.01258],[-112.175313,40.467166],[-111.594758,40.576705]]]},"id":"49049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.772794,40.576705],[-93.76184,40.264519],[-93.76184,40.133073],[-94.216426,40.13855],[-94.216426,40.385012],[-94.232857,40.571228],[-94.013779,40.571228],[-93.772794,40.576705]]]},"id":"29081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.221926,40.565751],[-82.183588,40.456212],[-82.194542,40.237135],[-82.75319,40.275473],[-82.742236,40.346673],[-82.621743,40.54932],[-82.336942,40.554797],[-82.221926,40.565751]]]},"id":"39083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.801565,40.571228],[-84.801565,40.35215],[-84.801565,40.308335],[-84.807042,40.308335],[-85.217813,40.308335],[-85.217813,40.379535],[-85.201382,40.565751],[-85.069935,40.565751],[-84.801565,40.571228]]]},"id":"18075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.287626,40.571228],[-94.232857,40.571228],[-94.216426,40.385012],[-94.325965,40.385012],[-94.599812,40.385012],[-94.632673,40.571228],[-94.473842,40.571228],[-94.287626,40.571228]]]},"id":"29227"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.22329,40.565751],[-85.201382,40.565751],[-85.217813,40.379535],[-85.442367,40.379535],[-85.447844,40.565751],[-85.22329,40.565751]]]},"id":"18009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.875046,40.565751],[-85.864092,40.565751],[-85.864092,40.40692],[-86.242001,40.374058],[-86.357016,40.434304],[-86.373447,40.434304],[-86.373447,40.560274],[-86.165323,40.560274],[-85.875046,40.565751]]]},"id":"18067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.096403,40.560274],[-86.773264,40.560274],[-86.696587,40.434304],[-86.696587,40.215227],[-86.921141,40.215227],[-87.090926,40.215227],[-87.090926,40.368581],[-87.096403,40.47812],[-87.096403,40.560274]]]},"id":"18157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.023816,40.521935],[-95.71163,40.521935],[-95.552799,40.264519],[-95.552799,40.264519],[-95.673292,40.264519],[-96.012862,40.259042],[-96.067632,40.264519],[-96.067632,40.521935],[-96.023816,40.521935]]]},"id":"31127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.536862,40.554797],[-76.438277,40.494551],[-76.153476,40.313812],[-76.306831,40.253565],[-76.564247,40.198796],[-76.536862,40.554797]]]},"id":"42075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.881439,40.538366],[-83.519961,40.505505],[-83.552823,40.231658],[-83.881439,40.264519],[-84.012886,40.275473],[-84.001932,40.483597],[-83.881439,40.538366]]]},"id":"39091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.091349,40.521935],[-103.581994,40.521935],[-103.466978,40.434304],[-103.707963,40.001626],[-103.795594,40.001626],[-104.151596,40.001626],[-104.091349,40.521935]]]},"id":"08087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.478402,40.521935],[-96.461971,40.521935],[-96.461971,40.264519],[-96.461971,40.001626],[-96.692003,40.001626],[-96.807019,40.001626],[-96.916557,40.001626],[-96.916557,40.35215],[-96.91108,40.521935],[-96.478402,40.521935]]]},"id":"31067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.067632,40.521935],[-96.067632,40.264519],[-96.325048,40.264519],[-96.461971,40.264519],[-96.461971,40.521935],[-96.067632,40.521935]]]},"id":"31097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.273499,40.505505],[-83.246114,40.445258],[-83.169437,40.144027],[-83.207776,40.105688],[-83.50353,40.111165],[-83.552823,40.231658],[-83.519961,40.505505],[-83.415899,40.505505],[-83.273499,40.505505]]]},"id":"39159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.841267,40.489074],[-87.529082,40.489074],[-87.529082,40.47812],[-87.529082,40.149503],[-87.534558,39.881133],[-87.939852,39.881133],[-87.934375,40.401443],[-87.934375,40.483597],[-87.841267,40.489074]]]},"id":"17183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.854924,40.483597],[-105.652277,40.259042],[-105.674185,39.930426],[-105.690616,39.853749],[-105.926124,39.700394],[-106.43548,39.924949],[-106.627173,39.924949],[-106.654557,40.445258],[-105.854924,40.483597]]]},"id":"08049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.105994,40.483597],[-84.001932,40.483597],[-84.012886,40.275473],[-84.02384,40.182365],[-84.22101,40.198796],[-84.43461,40.198796],[-84.43461,40.35215],[-84.43461,40.35215],[-84.105994,40.483597]]]},"id":"39149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.398105,40.47812],[-80.359767,40.47812],[-79.872319,40.198796],[-79.877796,40.127596],[-79.998289,39.985195],[-80.064012,40.007103],[-80.518598,39.963288],[-80.518598,40.018057],[-80.518598,40.160457],[-80.518598,40.401443],[-80.518598,40.47812],[-80.398105,40.47812]]]},"id":"42125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.452404,40.47812],[-87.096403,40.47812],[-87.090926,40.368581],[-87.255235,40.297381],[-87.408589,40.127596],[-87.529082,40.149503],[-87.529082,40.47812],[-87.452404,40.47812]]]},"id":"18171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.0339,40.100211],[-74.406332,40.171411],[-74.55421,40.078303],[-74.587071,40.13855],[-74.48301,40.253565],[-74.225593,40.450735],[-74.0339,40.100211]]]},"id":"34025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.183588,40.456212],[-81.707094,40.445258],[-81.62494,40.220704],[-81.652325,40.220704],[-81.718048,40.149503],[-82.189065,40.165934],[-82.194542,40.237135],[-82.183588,40.456212]]]},"id":"39031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.497066,40.445258],[-121.436819,40.149503],[-121.584697,40.100211],[-122.04476,39.798979],[-122.937501,39.798979],[-122.932024,39.979718],[-123.063471,40.286427],[-121.497066,40.445258]]]},"id":"06103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.119157,40.445258],[-120.209985,40.08378],[-120.149738,39.705871],[-121.009618,39.640148],[-121.075341,39.596333],[-121.436819,40.149503],[-121.497066,40.445258],[-121.327281,40.445258],[-121.119157,40.445258]]]},"id":"06063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.490767,40.423351],[-75.48529,40.417874],[-75.014273,40.13855],[-75.025227,40.133073],[-75.277166,39.974241],[-75.353843,40.056395],[-75.35932,40.067349],[-75.676983,40.242611],[-75.69889,40.242611],[-75.529105,40.445258],[-75.490767,40.423351]]]},"id":"42091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.246114,40.445258],[-83.02156,40.434304],[-82.742236,40.346673],[-82.75319,40.275473],[-82.764143,40.127596],[-83.03799,40.13855],[-83.169437,40.144027],[-83.246114,40.445258]]]},"id":"39041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.426359,40.439781],[-102.053927,40.439781],[-102.053927,40.346673],[-102.053927,40.001626],[-102.04845,39.574425],[-102.426359,39.568948],[-102.804268,39.568948],[-102.78236,40.439781],[-102.667345,40.439781],[-102.426359,40.439781]]]},"id":"08125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.78236,40.439781],[-102.804268,39.568948],[-103.154792,39.563471],[-103.707963,39.568948],[-103.707963,39.738733],[-103.707963,40.001626],[-103.466978,40.434304],[-102.78236,40.439781]]]},"id":"08121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.89512,40.434304],[-89.604842,40.319289],[-89.599365,40.122119],[-89.670565,40.160457],[-89.993705,40.105688],[-90.355183,40.122119],[-90.201828,40.182365],[-89.922504,40.434304],[-89.89512,40.434304]]]},"id":"17125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.186785,40.434304],[-80.940322,40.423351],[-80.885553,40.160457],[-81.219646,40.171411],[-81.225123,40.171411],[-81.340139,40.215227],[-81.268939,40.434304],[-81.186785,40.434304]]]},"id":"39067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.357016,40.434304],[-86.242001,40.374058],[-86.242001,40.215227],[-86.242001,40.182365],[-86.696587,40.176888],[-86.696587,40.215227],[-86.696587,40.434304],[-86.373447,40.434304],[-86.357016,40.434304]]]},"id":"18023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.800672,40.417874],[-74.745903,40.423351],[-74.619933,40.374058],[-74.48301,40.253565],[-74.587071,40.13855],[-74.702087,40.182365],[-74.723995,40.149503],[-74.943073,40.341196],[-74.800672,40.417874]]]},"id":"34021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.864092,40.40692],[-85.864092,40.379535],[-85.864092,40.220704],[-85.875046,40.220704],[-86.242001,40.215227],[-86.242001,40.374058],[-85.864092,40.40692]]]},"id":"18159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.109637,40.401443],[-87.934375,40.401443],[-87.939852,39.881133],[-88.126068,39.881133],[-88.460161,39.881133],[-88.460161,40.28095],[-88.460161,40.401443],[-88.109637,40.401443]]]},"id":"17019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.518598,40.401443],[-80.518598,40.160457],[-80.682906,40.187842],[-80.633614,40.395966],[-80.518598,40.401443]]]},"id":"54009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.325965,40.385012],[-94.216426,40.385012],[-94.216426,40.13855],[-94.216426,40.034488],[-94.577904,40.039965],[-94.605288,40.039965],[-94.605288,40.127596],[-94.599812,40.385012],[-94.325965,40.385012]]]},"id":"29075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.186761,40.385012],[-92.858145,40.341196],[-92.858145,40.039965],[-93.362023,40.034488],[-93.3675,40.264519],[-93.3675,40.385012],[-93.186761,40.385012]]]},"id":"29211"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.672399,40.379535],[-85.579291,40.379535],[-85.573814,40.078303],[-85.573814,39.946857],[-85.617629,39.946857],[-85.864092,39.94138],[-85.864092,40.220704],[-85.864092,40.379535],[-85.672399,40.379535]]]},"id":"18095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.513567,40.379535],[-85.442367,40.379535],[-85.217813,40.379535],[-85.217813,40.308335],[-85.212336,40.078303],[-85.327352,40.078303],[-85.573814,40.078303],[-85.579291,40.379535],[-85.513567,40.379535]]]},"id":"18035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.255235,40.297381],[-87.090926,40.368581],[-87.090926,40.215227],[-87.090926,39.952334],[-87.205942,39.952334],[-87.419543,39.952334],[-87.408589,40.127596],[-87.255235,40.297381]]]},"id":"18045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.456518,40.35215],[-84.43461,40.35215],[-84.43461,40.198796],[-84.423656,39.919472],[-84.483903,39.919472],[-84.812519,39.919472],[-84.812519,40.007103],[-84.801565,40.308335],[-84.801565,40.35215],[-84.456518,40.35215]]]},"id":"39037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.383461,40.35215],[-100.197245,40.35215],[-100.191768,40.001626],[-100.739462,40.001626],[-100.761369,40.001626],[-100.755893,40.35215],[-100.383461,40.35215]]]},"id":"31145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.989121,40.35215],[-99.644074,40.35215],[-99.63312,40.35215],[-99.627643,40.001626],[-100.175337,40.001626],[-100.191768,40.001626],[-100.197245,40.35215],[-100.093183,40.35215],[-99.989121,40.35215]]]},"id":"31065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.63312,40.35215],[-99.178534,40.35215],[-99.178534,40.001626],[-99.627643,40.001626],[-99.627643,40.001626],[-99.63312,40.35215]]]},"id":"31083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.111894,40.35215],[-100.7778,40.35215],[-100.755893,40.35215],[-100.761369,40.001626],[-101.325494,40.001626],[-101.325494,40.35215],[-101.111894,40.35215]]]},"id":"31087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.011945,40.35215],[-97.825729,40.35215],[-97.820252,40.35215],[-97.820252,40.001626],[-97.875022,40.001626],[-97.929791,40.001626],[-98.269362,40.001626],[-98.274839,40.001626],[-98.274839,40.35215],[-98.011945,40.35215]]]},"id":"31129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.11281,40.35215],[-98.729425,40.35215],[-98.723948,40.001626],[-99.068995,40.001626],[-99.123764,40.001626],[-99.178534,40.001626],[-99.178534,40.35215],[-99.11281,40.35215]]]},"id":"31061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.50259,40.35215],[-97.365666,40.35215],[-97.371143,40.001626],[-97.820252,40.001626],[-97.820252,40.35215],[-97.50259,40.35215]]]},"id":"31169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.291269,40.35215],[-98.280315,40.35215],[-98.274839,40.35215],[-98.274839,40.001626],[-98.50487,40.001626],[-98.691086,40.001626],[-98.723948,40.001626],[-98.729425,40.35215],[-98.723948,40.35215],[-98.291269,40.35215]]]},"id":"31181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.325494,40.35215],[-101.325494,40.35215],[-101.325494,40.001626],[-101.413125,40.001626],[-101.90605,40.001626],[-102.053927,40.001626],[-102.053927,40.346673],[-101.341925,40.35215],[-101.325494,40.35215]]]},"id":"31057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.365666,40.35215],[-96.916557,40.35215],[-96.916557,40.001626],[-97.349236,40.001626],[-97.371143,40.001626],[-97.365666,40.35215]]]},"id":"31095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.348789,40.346673],[-92.348789,40.302858],[-92.343312,40.039965],[-92.677405,40.039965],[-92.847191,40.039965],[-92.858145,40.039965],[-92.858145,40.341196],[-92.682882,40.341196],[-92.348789,40.346673]]]},"id":"29001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.122895,40.297381],[-76.914771,40.330243],[-76.860002,40.226181],[-76.903817,40.220704],[-77.139326,40.067349],[-77.473419,39.946857],[-77.615819,40.198796],[-77.122895,40.297381]]]},"id":"42041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.6181,40.324766],[-78.256622,40.297381],[-78.136129,40.165934],[-78.382591,39.722302],[-78.809792,39.722302],[-78.656438,40.242611],[-78.6181,40.324766]]]},"id":"42009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.265272,40.324766],[-89.150256,40.28095],[-89.144779,40.050919],[-89.215979,39.919472],[-89.489826,39.974241],[-89.577457,39.974241],[-89.599365,40.122119],[-89.604842,40.319289],[-89.265272,40.324766]]]},"id":"17107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.306831,40.253565],[-76.153476,40.313812],[-75.874152,40.13855],[-76.137046,39.722302],[-76.235631,39.722302],[-76.241107,39.722302],[-76.723078,40.122119],[-76.564247,40.198796],[-76.306831,40.253565]]]},"id":"42071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.807042,40.308335],[-84.801565,40.308335],[-84.812519,40.007103],[-84.856335,40.007103],[-85.201382,40.007103],[-85.212336,40.078303],[-85.217813,40.308335],[-84.807042,40.308335]]]},"id":"18135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.140665,40.302858],[-91.948972,40.302858],[-91.948972,40.259042],[-91.954449,39.946857],[-91.998265,39.952334],[-92.288543,39.952334],[-92.343312,40.039965],[-92.348789,40.302858],[-92.140665,40.302858]]]},"id":"29103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.670589,40.291904],[-77.615819,40.198796],[-77.473419,39.946857],[-77.456988,39.722302],[-77.467942,39.722302],[-78.09779,39.722302],[-77.862282,40.061872],[-77.703451,40.264519],[-77.670589,40.291904]]]},"id":"42055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.001485,40.286427],[-78.656438,40.242611],[-78.809792,39.722302],[-78.930285,39.722302],[-79.390348,39.722302],[-79.291763,40.039965],[-79.056255,40.286427],[-79.001485,40.286427]]]},"id":"42111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.908354,40.286427],[-90.448291,40.275473],[-90.201828,40.182365],[-90.355183,40.122119],[-90.514014,39.985195],[-90.913831,40.105688],[-90.913831,40.193319],[-90.908354,40.286427]]]},"id":"17169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.920224,40.28095],[-88.575177,40.28095],[-88.744962,40.056395],[-88.805209,40.056395],[-89.144779,40.050919],[-89.150256,40.28095],[-88.920224,40.28095]]]},"id":"17039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.575177,40.28095],[-88.460161,40.28095],[-88.460161,39.881133],[-88.471115,39.793502],[-88.744962,39.793502],[-88.744962,40.056395],[-88.575177,40.28095]]]},"id":"17147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.75319,40.275473],[-82.194542,40.237135],[-82.189065,40.165934],[-82.23288,39.913995],[-82.462912,39.930426],[-82.780574,39.94138],[-82.764143,40.127596],[-82.75319,40.275473]]]},"id":"39089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.881439,40.264519],[-83.552823,40.231658],[-83.50353,40.111165],[-83.514484,40.01258],[-84.034794,40.039965],[-84.02384,40.182365],[-84.012886,40.275473],[-83.881439,40.264519]]]},"id":"39021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.3675,40.264519],[-93.362023,40.034488],[-93.362023,39.968764],[-93.76184,39.957811],[-93.76184,40.133073],[-93.76184,40.264519],[-93.3675,40.264519]]]},"id":"29079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.503507,40.264519],[-95.180367,40.264519],[-95.043444,40.127596],[-94.994151,39.897564],[-95.306337,40.001626],[-95.552799,40.264519],[-95.552799,40.264519],[-95.503507,40.264519]]]},"id":"29087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.340092,40.259042],[-105.055291,40.264519],[-105.055291,40.001626],[-105.055291,39.913995],[-105.055291,39.913995],[-105.400338,39.913995],[-105.674185,39.930426],[-105.652277,40.259042],[-105.340092,40.259042]]]},"id":"08013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.325048,40.264519],[-96.067632,40.264519],[-96.012862,40.259042],[-96.012862,40.001626],[-96.237417,40.001626],[-96.237417,40.001626],[-96.461971,40.001626],[-96.461971,40.264519],[-96.325048,40.264519]]]},"id":"31133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.673292,40.264519],[-95.552799,40.264519],[-95.306337,40.001626],[-95.339199,40.001626],[-95.788308,40.001626],[-96.012862,40.001626],[-96.012862,40.259042],[-95.673292,40.264519]]]},"id":"31147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.948972,40.259042],[-91.499863,40.248088],[-91.50534,40.198796],[-91.43414,39.946857],[-91.784664,39.946857],[-91.839434,39.946857],[-91.954449,39.946857],[-91.948972,40.259042]]]},"id":"29111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.676983,40.242611],[-75.35932,40.067349],[-75.594828,39.837318],[-75.786521,39.722302],[-75.808429,39.722302],[-76.137046,39.722302],[-75.874152,40.13855],[-75.69889,40.242611],[-75.676983,40.242611]]]},"id":"42029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.903817,40.220704],[-76.860002,40.226181],[-76.723078,40.122119],[-76.241107,39.722302],[-76.569724,39.722302],[-76.70117,39.722302],[-76.788801,39.722302],[-76.996925,39.722302],[-77.139326,40.067349],[-76.903817,40.220704]]]},"id":"42133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.109143,40.226181],[-107.037943,40.089257],[-107.936161,39.694917],[-109.053457,39.662056],[-109.053457,40.220704],[-107.43776,40.220704],[-107.109143,40.226181]]]},"id":"08103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.652325,40.220704],[-81.62494,40.220704],[-81.340139,40.215227],[-81.225123,40.171411],[-81.236077,39.952334],[-81.471585,39.892087],[-81.69614,39.842795],[-81.718048,40.149503],[-81.652325,40.220704]]]},"id":"39059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.875046,40.220704],[-85.864092,40.220704],[-85.864092,39.94138],[-85.935292,39.924949],[-86.110554,39.924949],[-86.242001,39.924949],[-86.242001,40.182365],[-86.242001,40.215227],[-85.875046,40.220704]]]},"id":"18057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.921141,40.215227],[-86.696587,40.215227],[-86.696587,40.176888],[-86.696587,39.924949],[-86.696587,39.864703],[-87.008772,39.864703],[-87.090926,39.952334],[-87.090926,40.215227],[-86.921141,40.215227]]]},"id":"18107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.204109,40.198796],[-90.913831,40.193319],[-90.913831,40.105688],[-90.919308,39.842795],[-91.36294,39.760641],[-91.43414,39.946857],[-91.50534,40.198796],[-91.204109,40.198796]]]},"id":"17001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.22101,40.198796],[-84.02384,40.182365],[-84.034794,40.039965],[-84.051224,39.881133],[-84.155286,39.924949],[-84.423656,39.919472],[-84.43461,40.198796],[-84.22101,40.198796]]]},"id":"39109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.682906,40.187842],[-80.518598,40.160457],[-80.518598,40.018057],[-80.726722,40.034488],[-80.732199,40.034488],[-80.704814,40.15498],[-80.682906,40.187842]]]},"id":"54069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.702087,40.182365],[-74.587071,40.13855],[-74.55421,40.078303],[-74.417286,39.557994],[-74.734949,39.727779],[-75.030704,39.990672],[-75.058088,39.990672],[-74.975934,40.050919],[-74.723995,40.149503],[-74.702087,40.182365]]]},"id":"34005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.242001,40.182365],[-86.242001,39.924949],[-86.324155,39.924949],[-86.433693,39.924949],[-86.696587,39.924949],[-86.696587,40.176888],[-86.242001,40.182365]]]},"id":"18011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.219646,40.171411],[-80.885553,40.160457],[-80.704814,40.15498],[-80.732199,40.034488],[-80.81983,39.848272],[-81.236077,39.87018],[-81.236077,39.952334],[-81.225123,40.171411],[-81.219646,40.171411]]]},"id":"39013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.406332,40.171411],[-74.0339,40.100211],[-74.313224,39.497748],[-74.417286,39.557994],[-74.55421,40.078303],[-74.406332,40.171411]]]},"id":"34029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.189065,40.165934],[-81.718048,40.149503],[-81.69614,39.842795],[-81.69614,39.755164],[-82.074049,39.771595],[-82.23288,39.913995],[-82.189065,40.165934]]]},"id":"39119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.136129,40.165934],[-77.862282,40.061872],[-78.09779,39.722302],[-78.284006,39.722302],[-78.344253,39.722302],[-78.382591,39.722302],[-78.136129,40.165934]]]},"id":"42057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.670565,40.160457],[-89.599365,40.122119],[-89.577457,39.974241],[-89.993705,39.903041],[-89.993705,40.105688],[-89.670565,40.160457]]]},"id":"17129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.584697,40.100211],[-121.436819,40.149503],[-121.075341,39.596333],[-121.623035,39.295101],[-121.907836,39.306055],[-121.891405,39.382732],[-122.04476,39.798979],[-121.584697,40.100211]]]},"id":"06007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.408589,40.127596],[-87.419543,39.952334],[-87.381204,39.607286],[-87.534558,39.607286],[-87.534558,39.881133],[-87.529082,40.149503],[-87.408589,40.127596]]]},"id":"18165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.499887,40.13855],[-79.291763,40.039965],[-79.390348,39.722302],[-79.477979,39.722302],[-79.609426,39.722302],[-79.76278,39.722302],[-79.916134,39.722302],[-79.998289,39.985195],[-79.877796,40.127596],[-79.499887,40.13855]]]},"id":"42051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.03799,40.13855],[-82.764143,40.127596],[-82.780574,39.94138],[-82.797005,39.94138],[-82.82439,39.793502],[-83.246114,39.81541],[-83.207776,40.105688],[-83.169437,40.144027],[-83.03799,40.13855]]]},"id":"39049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.025227,40.133073],[-75.014273,40.13855],[-74.975934,40.050919],[-75.058088,39.990672],[-75.140242,39.88661],[-75.211443,39.864703],[-75.277166,39.974241],[-75.025227,40.133073]]]},"id":"42101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.216426,40.13855],[-93.76184,40.133073],[-93.76184,39.957811],[-93.756363,39.782548],[-93.871378,39.788025],[-94.205472,39.788025],[-94.216426,40.034488],[-94.216426,40.13855]]]},"id":"29061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.043444,40.127596],[-94.605288,40.127596],[-94.605288,40.039965],[-94.605288,39.820887],[-94.769597,39.820887],[-94.879136,39.820887],[-94.994151,39.897564],[-95.043444,40.127596]]]},"id":"29003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.048427,40.116642],[-114.048427,39.908518],[-114.048427,39.541563],[-114.048427,38.676207],[-114.70566,38.676207],[-115.001414,38.676207],[-115.90511,39.163654],[-115.833909,40.127596],[-114.048427,40.116642]]]},"id":"32033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.355183,40.122119],[-89.993705,40.105688],[-89.993705,39.903041],[-89.993705,39.87018],[-90.585214,39.875656],[-90.514014,39.985195],[-90.355183,40.122119]]]},"id":"17017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.50353,40.111165],[-83.207776,40.105688],[-83.246114,39.81541],[-83.246114,39.809933],[-83.251591,39.694917],[-83.651408,39.716825],[-83.645931,39.771595],[-83.514484,40.01258],[-83.50353,40.111165]]]},"id":"39097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.913831,40.105688],[-90.514014,39.985195],[-90.585214,39.875656],[-90.57426,39.837318],[-90.919308,39.842795],[-90.913831,40.105688]]]},"id":"17009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.037943,40.089257],[-107.032466,39.919472],[-107.11462,39.366301],[-107.432283,39.366301],[-108.774133,39.366301],[-109.053457,39.366301],[-109.053457,39.497748],[-109.053457,39.662056],[-107.936161,39.694917],[-107.037943,40.089257]]]},"id":"08045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.327352,40.078303],[-85.212336,40.078303],[-85.201382,40.007103],[-85.22329,39.788025],[-85.299967,39.788025],[-85.321875,39.788025],[-85.595722,39.788025],[-85.573814,39.946857],[-85.573814,40.078303],[-85.327352,40.078303]]]},"id":"18065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.139326,40.067349],[-76.996925,39.722302],[-77.216003,39.722302],[-77.456988,39.722302],[-77.473419,39.946857],[-77.139326,40.067349]]]},"id":"42001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.353843,40.056395],[-75.277166,39.974241],[-75.211443,39.864703],[-75.414089,39.804456],[-75.578398,39.837318],[-75.594828,39.837318],[-75.594828,39.837318],[-75.35932,40.067349],[-75.353843,40.056395]]]},"id":"42045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.805209,40.056395],[-88.744962,40.056395],[-88.744962,39.793502],[-88.761393,39.793502],[-88.810686,39.651102],[-89.024286,39.656579],[-89.215979,39.81541],[-89.215979,39.919472],[-89.144779,40.050919],[-88.805209,40.056395]]]},"id":"17115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.034794,40.039965],[-83.514484,40.01258],[-83.645931,39.771595],[-84.029317,39.848272],[-84.051224,39.848272],[-84.051224,39.881133],[-84.034794,40.039965]]]},"id":"39023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.577904,40.039965],[-94.216426,40.034488],[-94.205472,39.788025],[-94.205472,39.74421],[-94.506704,39.749687],[-94.599812,39.749687],[-94.605288,39.820887],[-94.605288,40.039965],[-94.577904,40.039965]]]},"id":"29063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.677405,40.039965],[-92.343312,40.039965],[-92.288543,39.952334],[-92.299497,39.607286],[-92.299497,39.607286],[-92.693836,39.612763],[-92.858145,39.700394],[-92.847191,40.039965],[-92.677405,40.039965]]]},"id":"29121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.858145,40.039965],[-92.847191,40.039965],[-92.858145,39.700394],[-93.04436,39.705871],[-93.268915,39.705871],[-93.362023,39.968764],[-93.362023,40.034488],[-92.858145,40.039965]]]},"id":"29115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.726722,40.034488],[-80.518598,40.018057],[-80.518598,39.963288],[-80.518598,39.722302],[-80.830783,39.722302],[-80.81983,39.848272],[-80.732199,40.034488],[-80.726722,40.034488]]]},"id":"54051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.064012,40.007103],[-79.998289,39.985195],[-79.916134,39.722302],[-80.420013,39.722302],[-80.518598,39.722302],[-80.518598,39.963288],[-80.064012,40.007103]]]},"id":"42059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.18079,40.01258],[-111.64405,39.81541],[-112.016482,39.317009],[-112.23556,39.552517],[-114.048427,39.541563],[-114.048427,39.908518],[-112.339621,39.903041],[-112.18079,40.01258]]]},"id":"49023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.856335,40.007103],[-84.812519,40.007103],[-84.812519,39.919472],[-84.812519,39.727779],[-85.037074,39.716825],[-85.22329,39.788025],[-85.201382,40.007103],[-84.856335,40.007103]]]},"id":"18177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.90605,40.001626],[-101.413125,40.001626],[-101.413125,39.568948],[-102.004635,39.568948],[-102.04845,39.568948],[-102.04845,39.574425],[-102.053927,40.001626],[-101.90605,40.001626]]]},"id":"20023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.325494,40.001626],[-100.761369,40.001626],[-100.739462,40.001626],[-100.739462,39.568948],[-101.391218,39.568948],[-101.413125,39.568948],[-101.413125,40.001626],[-101.325494,40.001626]]]},"id":"20153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.948008,40.001626],[-117.542715,40.001626],[-117.493422,39.530609],[-117.772746,39.092454],[-117.865854,39.076023],[-118.753119,39.076023],[-119.191274,39.629194],[-119.224135,40.001626],[-117.948008,40.001626]]]},"id":"32001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.269362,40.001626],[-97.929791,40.001626],[-97.929791,39.656579],[-97.929791,39.568948],[-98.488439,39.568948],[-98.50487,39.568948],[-98.50487,40.001626],[-98.274839,40.001626],[-98.269362,40.001626]]]},"id":"20089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.691086,40.001626],[-98.50487,40.001626],[-98.50487,39.568948],[-98.849917,39.568948],[-99.04161,39.568948],[-99.063518,39.568948],[-99.068995,40.001626],[-98.723948,40.001626],[-98.691086,40.001626]]]},"id":"20183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.739462,40.001626],[-100.191768,40.001626],[-100.175337,40.001626],[-100.180814,39.568948],[-100.668261,39.568948],[-100.717554,39.568948],[-100.739462,39.568948],[-100.739462,40.001626]]]},"id":"20039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.123764,40.001626],[-99.068995,40.001626],[-99.063518,39.568948],[-99.600258,39.568948],[-99.627643,39.568948],[-99.627643,40.001626],[-99.178534,40.001626],[-99.123764,40.001626]]]},"id":"20147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.875022,40.001626],[-97.820252,40.001626],[-97.371143,40.001626],[-97.371143,39.656579],[-97.69976,39.656579],[-97.929791,39.656579],[-97.929791,40.001626],[-97.875022,40.001626]]]},"id":"20157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.021935,40.001626],[-123.545441,40.001626],[-122.932024,39.979718],[-122.937501,39.798979],[-122.882732,39.579902],[-123.090855,39.070546],[-122.822485,38.851469],[-123.074425,38.851469],[-123.534488,38.769315],[-123.737134,38.95553],[-124.021935,40.001626]]]},"id":"06045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.349236,40.001626],[-96.916557,40.001626],[-96.807019,40.001626],[-96.807019,39.568948],[-96.960373,39.568948],[-97.299943,39.568948],[-97.371143,39.568948],[-97.371143,39.656579],[-97.371143,40.001626],[-97.349236,40.001626]]]},"id":"20201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.627643,40.001626],[-99.627643,39.568948],[-100.164383,39.568948],[-100.180814,39.568948],[-100.175337,40.001626],[-99.627643,40.001626],[-99.627643,40.001626]]]},"id":"20137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.795594,40.001626],[-103.707963,40.001626],[-103.707963,39.738733],[-104.830736,39.738733],[-104.885506,39.738733],[-104.704767,39.903041],[-105.055291,39.793502],[-105.055291,39.913995],[-105.055291,40.001626],[-104.151596,40.001626],[-103.795594,40.001626]]]},"id":"08001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.692003,40.001626],[-96.461971,40.001626],[-96.237417,40.001626],[-96.237417,39.568948],[-96.582464,39.568948],[-96.582464,39.568948],[-96.692003,39.568948],[-96.807019,39.568948],[-96.807019,40.001626],[-96.692003,40.001626]]]},"id":"20117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.237417,40.001626],[-96.012862,40.001626],[-95.788308,40.001626],[-95.788308,39.651102],[-96.03477,39.563471],[-96.237417,39.568948],[-96.237417,40.001626],[-96.237417,40.001626]]]},"id":"20131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.788308,40.001626],[-95.339199,40.001626],[-95.339199,39.651102],[-95.393968,39.651102],[-95.563753,39.651102],[-95.728061,39.651102],[-95.788308,39.651102],[-95.788308,40.001626]]]},"id":"20013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.339199,40.001626],[-95.306337,40.001626],[-94.994151,39.897564],[-94.879136,39.820887],[-95.054398,39.623717],[-95.339199,39.651102],[-95.339199,40.001626]]]},"id":"20043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.030704,39.990672],[-74.734949,39.727779],[-74.877349,39.607286],[-75.140242,39.88661],[-75.058088,39.990672],[-75.030704,39.990672]]]},"id":"34007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.489826,39.974241],[-89.215979,39.919472],[-89.215979,39.81541],[-89.254318,39.820887],[-89.533642,39.525132],[-89.588411,39.525132],[-89.703427,39.525132],[-89.758196,39.525132],[-89.927981,39.519655],[-89.993705,39.87018],[-89.993705,39.903041],[-89.577457,39.974241],[-89.489826,39.974241]]]},"id":"17167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.362023,39.968764],[-93.268915,39.705871],[-93.279869,39.61824],[-93.422269,39.612763],[-93.756363,39.612763],[-93.756363,39.782548],[-93.76184,39.957811],[-93.362023,39.968764]]]},"id":"29117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.998265,39.952334],[-91.954449,39.946857],[-91.839434,39.946857],[-91.844911,39.656579],[-92.299497,39.607286],[-92.288543,39.952334],[-91.998265,39.952334]]]},"id":"29205"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.471585,39.892087],[-81.236077,39.952334],[-81.236077,39.87018],[-81.307277,39.87018],[-81.28537,39.607286],[-81.449678,39.634671],[-81.586601,39.585379],[-81.69614,39.755164],[-81.69614,39.842795],[-81.471585,39.892087]]]},"id":"39121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.205942,39.952334],[-87.090926,39.952334],[-87.008772,39.864703],[-87.014249,39.607286],[-87.200465,39.607286],[-87.331912,39.607286],[-87.381204,39.607286],[-87.419543,39.952334],[-87.205942,39.952334]]]},"id":"18121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.784664,39.946857],[-91.43414,39.946857],[-91.36294,39.760641],[-91.30817,39.683964],[-91.686079,39.683964],[-91.713464,39.656579],[-91.844911,39.656579],[-91.839434,39.946857],[-91.784664,39.946857]]]},"id":"29127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.617629,39.946857],[-85.573814,39.946857],[-85.595722,39.788025],[-85.63406,39.700394],[-85.951723,39.694917],[-85.935292,39.924949],[-85.864092,39.94138],[-85.617629,39.946857]]]},"id":"18059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.797005,39.94138],[-82.780574,39.94138],[-82.462912,39.930426],[-82.375281,39.656579],[-82.731282,39.552517],[-82.82439,39.793502],[-82.797005,39.94138]]]},"id":"39045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.674185,39.930426],[-105.400338,39.913995],[-105.400338,39.749687],[-105.690616,39.853749],[-105.674185,39.930426]]]},"id":"08047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.462912,39.930426],[-82.23288,39.913995],[-82.074049,39.771595],[-82.046664,39.552517],[-82.16168,39.557994],[-82.375281,39.656579],[-82.462912,39.930426]]]},"id":"39127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.110554,39.924949],[-85.935292,39.924949],[-85.951723,39.694917],[-85.951723,39.640148],[-85.97363,39.640148],[-86.247477,39.634671],[-86.324155,39.629194],[-86.324155,39.924949],[-86.242001,39.924949],[-86.110554,39.924949]]]},"id":"18097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.627173,39.924949],[-106.43548,39.924949],[-106.205448,39.377255],[-106.424526,39.360824],[-107.04342,39.366301],[-107.11462,39.366301],[-107.032466,39.919472],[-106.627173,39.924949]]]},"id":"08037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.43548,39.924949],[-105.926124,39.700394],[-105.827539,39.563471],[-106.134248,39.377255],[-106.205448,39.377255],[-106.43548,39.924949]]]},"id":"08117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.433693,39.924949],[-86.324155,39.924949],[-86.324155,39.629194],[-86.658248,39.601809],[-86.696587,39.864703],[-86.696587,39.924949],[-86.433693,39.924949]]]},"id":"18063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.155286,39.924949],[-84.051224,39.881133],[-84.051224,39.848272],[-84.111471,39.579902],[-84.36341,39.590856],[-84.478426,39.590856],[-84.483903,39.919472],[-84.423656,39.919472],[-84.155286,39.924949]]]},"id":"39113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.483903,39.919472],[-84.478426,39.590856],[-84.812519,39.568948],[-84.812519,39.727779],[-84.812519,39.919472],[-84.483903,39.919472]]]},"id":"39135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.055291,39.913995],[-105.055291,39.913995],[-105.055291,39.793502],[-105.055291,39.623717],[-105.049814,39.563471],[-105.329138,39.130793],[-105.329138,39.130793],[-105.400338,39.563471],[-105.400338,39.749687],[-105.400338,39.913995],[-105.055291,39.913995]]]},"id":"08059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.704767,39.903041],[-104.885506,39.738733],[-105.055291,39.629194],[-105.055291,39.629194],[-105.055291,39.623717],[-105.055291,39.793502],[-104.704767,39.903041]]]},"id":"08031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.211443,39.864703],[-75.140242,39.88661],[-74.877349,39.607286],[-74.986888,39.514178],[-75.058088,39.568948],[-75.063565,39.568948],[-75.446951,39.771595],[-75.414089,39.804456],[-75.211443,39.864703]]]},"id":"34015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.534558,39.881133],[-87.534558,39.607286],[-87.529082,39.47584],[-87.76459,39.486794],[-87.96176,39.481317],[-87.967237,39.683964],[-87.939852,39.881133],[-87.534558,39.881133]]]},"id":"17045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.126068,39.881133],[-87.939852,39.881133],[-87.967237,39.683964],[-88.065822,39.651102],[-88.471115,39.651102],[-88.471115,39.793502],[-88.460161,39.881133],[-88.126068,39.881133]]]},"id":"17041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.585214,39.875656],[-89.993705,39.87018],[-89.927981,39.519655],[-90.152536,39.519655],[-90.300413,39.519655],[-90.371614,39.667533],[-90.601645,39.788025],[-90.57426,39.837318],[-90.585214,39.875656]]]},"id":"17137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.307277,39.87018],[-81.236077,39.87018],[-80.81983,39.848272],[-80.830783,39.722302],[-80.945799,39.607286],[-81.038907,39.541563],[-81.28537,39.607286],[-81.307277,39.87018]]]},"id":"39111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.008772,39.864703],[-86.696587,39.864703],[-86.658248,39.601809],[-86.685633,39.470363],[-86.937572,39.47584],[-87.014249,39.607286],[-87.008772,39.864703]]]},"id":"18133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.926124,39.700394],[-105.690616,39.853749],[-105.400338,39.749687],[-105.400338,39.563471],[-105.827539,39.563471],[-105.926124,39.700394]]]},"id":"08019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.029317,39.848272],[-83.645931,39.771595],[-83.651408,39.716825],[-83.667839,39.552517],[-83.974547,39.568948],[-83.974547,39.568948],[-84.111471,39.579902],[-84.051224,39.848272],[-84.029317,39.848272]]]},"id":"39057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.919308,39.842795],[-90.57426,39.837318],[-90.601645,39.788025],[-90.579737,39.519655],[-90.612599,39.393686],[-90.935738,39.399163],[-91.176724,39.596333],[-91.30817,39.683964],[-91.36294,39.760641],[-90.919308,39.842795]]]},"id":"17149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.414089,39.804456],[-75.446951,39.771595],[-75.507197,39.683964],[-75.512674,39.366301],[-75.616736,39.311532],[-75.759137,39.295101],[-75.764614,39.377255],[-75.786521,39.722302],[-75.594828,39.837318],[-75.594828,39.837318],[-75.578398,39.837318],[-75.414089,39.804456]]]},"id":"10003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.254318,39.820887],[-89.215979,39.81541],[-89.024286,39.656579],[-89.139302,39.34987],[-89.533642,39.525132],[-89.254318,39.820887]]]},"id":"17021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.769597,39.820887],[-94.605288,39.820887],[-94.599812,39.749687],[-94.599812,39.530609],[-95.10369,39.530609],[-95.054398,39.623717],[-94.879136,39.820887],[-94.769597,39.820887]]]},"id":"29021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.014202,39.81541],[-110.855371,39.81541],[-109.968106,39.804456],[-110.022876,39.470363],[-111.079925,39.464886],[-111.24971,39.705871],[-111.24971,39.81541],[-111.014202,39.81541]]]},"id":"49007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.246114,39.809933],[-83.246114,39.81541],[-82.82439,39.793502],[-82.731282,39.552517],[-82.742236,39.470363],[-83.268022,39.514178],[-83.251591,39.694917],[-83.246114,39.809933]]]},"id":"39129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.556419,39.81541],[-111.24971,39.81541],[-111.24971,39.705871],[-111.299003,39.032208],[-111.978143,39.043162],[-112.016482,39.043162],[-112.016482,39.317009],[-111.64405,39.81541],[-111.556419,39.81541]]]},"id":"49039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.937501,39.798979],[-122.04476,39.798979],[-121.891405,39.382732],[-122.077621,39.415593],[-122.740331,39.382732],[-122.882732,39.579902],[-122.937501,39.798979]]]},"id":"06021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.761393,39.793502],[-88.744962,39.793502],[-88.471115,39.793502],[-88.471115,39.651102],[-88.471115,39.448455],[-88.810686,39.651102],[-88.761393,39.793502]]]},"id":"17139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.371614,39.667533],[-90.300413,39.519655],[-90.579737,39.519655],[-90.601645,39.788025],[-90.371614,39.667533]]]},"id":"17171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.871378,39.788025],[-93.756363,39.782548],[-93.756363,39.612763],[-93.76184,39.525132],[-94.10141,39.525132],[-94.210949,39.525132],[-94.205472,39.74421],[-94.205472,39.788025],[-93.871378,39.788025]]]},"id":"29025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.22329,39.788025],[-85.037074,39.716825],[-85.037074,39.525132],[-85.23972,39.525132],[-85.299967,39.525132],[-85.299967,39.788025],[-85.22329,39.788025]]]},"id":"18041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.321875,39.788025],[-85.299967,39.788025],[-85.299967,39.525132],[-85.299967,39.453932],[-85.628583,39.453932],[-85.63406,39.700394],[-85.595722,39.788025],[-85.321875,39.788025]]]},"id":"18139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.446951,39.771595],[-75.063565,39.568948],[-75.408613,39.382732],[-75.55649,39.607286],[-75.561967,39.629194],[-75.507197,39.683964],[-75.446951,39.771595]]]},"id":"34033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.149738,39.705871],[-120.001861,39.722302],[-120.001861,39.442978],[-120.555032,39.508701],[-121.020572,39.393686],[-121.009618,39.640148],[-120.149738,39.705871]]]},"id":"06091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.074049,39.771595],[-81.69614,39.755164],[-81.586601,39.585379],[-81.844017,39.448455],[-82.046664,39.552517],[-82.074049,39.771595]]]},"id":"39115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.506704,39.749687],[-94.205472,39.74421],[-94.210949,39.525132],[-94.210949,39.453932],[-94.56695,39.453932],[-94.599812,39.453932],[-94.599812,39.530609],[-94.599812,39.749687],[-94.506704,39.749687]]]},"id":"29049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.830736,39.738733],[-103.707963,39.738733],[-103.707963,39.568948],[-103.71344,39.568948],[-104.195411,39.563471],[-104.660951,39.563471],[-104.989567,39.568948],[-105.049814,39.563471],[-105.055291,39.623717],[-105.055291,39.629194],[-105.055291,39.629194],[-104.885506,39.738733],[-104.830736,39.738733]]]},"id":"08005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.196751,39.623717],[-119.191274,39.629194],[-118.753119,39.076023],[-118.764072,39.076023],[-118.906473,38.413313],[-119.158412,38.413313],[-119.328197,38.533806],[-119.552752,39.086977],[-119.580137,39.196516],[-119.711583,39.251285],[-119.284382,39.623717],[-119.196751,39.623717]]]},"id":"32019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.734949,39.727779],[-74.417286,39.557994],[-74.313224,39.497748],[-74.548733,39.295101],[-74.860918,39.322485],[-74.986888,39.514178],[-74.877349,39.607286],[-74.734949,39.727779]]]},"id":"34001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.812519,39.727779],[-84.812519,39.568948],[-84.817996,39.519655],[-85.037074,39.525132],[-85.037074,39.716825],[-84.812519,39.727779]]]},"id":"18161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.809792,39.722302],[-78.382591,39.722302],[-78.344253,39.722302],[-78.333299,39.634671],[-78.470222,39.514178],[-78.656438,39.536086],[-78.738592,39.623717],[-79.067209,39.47584],[-78.930285,39.722302],[-78.809792,39.722302]]]},"id":"24001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.930285,39.722302],[-79.067209,39.47584],[-79.275332,39.327962],[-79.488933,39.20747],[-79.477979,39.722302],[-79.390348,39.722302],[-78.930285,39.722302]]]},"id":"24023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.284006,39.722302],[-78.09779,39.722302],[-77.467942,39.722302],[-77.676066,39.322485],[-77.719881,39.322485],[-77.823943,39.492271],[-78.021113,39.61824],[-78.185421,39.694917],[-78.333299,39.634671],[-78.344253,39.722302],[-78.284006,39.722302]]]},"id":"24043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.808429,39.722302],[-75.786521,39.722302],[-75.764614,39.377255],[-76.000122,39.377255],[-76.076799,39.541563],[-76.235631,39.722302],[-76.137046,39.722302],[-75.808429,39.722302]]]},"id":"24015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.830783,39.722302],[-80.518598,39.722302],[-80.420013,39.722302],[-80.398105,39.634671],[-80.49669,39.470363],[-80.545983,39.426547],[-80.617183,39.448455],[-80.945799,39.607286],[-80.830783,39.722302]]]},"id":"54103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.916134,39.722302],[-79.76278,39.722302],[-79.894227,39.437501],[-79.938042,39.453932],[-80.398105,39.634671],[-80.420013,39.722302],[-79.916134,39.722302]]]},"id":"54061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.241107,39.722302],[-76.235631,39.722302],[-76.076799,39.541563],[-76.328738,39.355347],[-76.569724,39.722302],[-76.241107,39.722302]]]},"id":"24025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.609426,39.722302],[-79.477979,39.722302],[-79.488933,39.20747],[-79.488933,39.196516],[-79.812073,39.229378],[-79.894227,39.300578],[-79.894227,39.437501],[-79.76278,39.722302],[-79.609426,39.722302]]]},"id":"54077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.70117,39.722302],[-76.569724,39.722302],[-76.328738,39.355347],[-76.525908,39.218424],[-76.651878,39.371778],[-76.619016,39.234854],[-76.695693,39.212947],[-76.881909,39.34987],[-76.788801,39.722302],[-76.70117,39.722302]]]},"id":"24005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.788801,39.722302],[-76.881909,39.34987],[-77.079079,39.366301],[-77.16671,39.355347],[-77.216003,39.722302],[-76.996925,39.722302],[-76.788801,39.722302]]]},"id":"24013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.467942,39.722302],[-77.456988,39.722302],[-77.216003,39.722302],[-77.16671,39.355347],[-77.16671,39.355347],[-77.243388,39.317009],[-77.456988,39.218424],[-77.676066,39.322485],[-77.467942,39.722302]]]},"id":"24021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.651408,39.716825],[-83.251591,39.694917],[-83.268022,39.514178],[-83.372084,39.377255],[-83.591161,39.377255],[-83.667839,39.552517],[-83.651408,39.716825]]]},"id":"39047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.04436,39.705871],[-92.858145,39.700394],[-92.693836,39.612763],[-92.70479,39.322485],[-92.847191,39.223901],[-93.104607,39.382732],[-93.279869,39.61824],[-93.268915,39.705871],[-93.04436,39.705871]]]},"id":"29041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.24971,39.705871],[-111.079925,39.464886],[-110.022876,39.470363],[-110.022876,39.459409],[-110.022876,38.500944],[-111.30448,38.511898],[-111.299003,39.032208],[-111.24971,39.705871]]]},"id":"49015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.63406,39.700394],[-85.628583,39.453932],[-85.683353,39.34987],[-85.798368,39.34987],[-85.951723,39.34987],[-85.951723,39.640148],[-85.951723,39.694917],[-85.63406,39.700394]]]},"id":"18145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.185421,39.694917],[-78.021113,39.61824],[-78.229237,39.393686],[-78.349729,39.464886],[-78.470222,39.514178],[-78.333299,39.634671],[-78.185421,39.694917]]]},"id":"54065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.686079,39.683964],[-91.30817,39.683964],[-91.176724,39.596333],[-91.198632,39.596333],[-91.439617,39.317009],[-91.718941,39.338916],[-91.713464,39.656579],[-91.686079,39.683964]]]},"id":"29173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.065822,39.651102],[-87.967237,39.683964],[-87.96176,39.481317],[-88.011052,39.377255],[-88.142499,39.377255],[-88.471115,39.371778],[-88.471115,39.448455],[-88.471115,39.651102],[-88.065822,39.651102]]]},"id":"17029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.299497,39.607286],[-91.844911,39.656579],[-91.713464,39.656579],[-91.718941,39.338916],[-92.31045,39.34987],[-92.299497,39.607286],[-92.299497,39.607286]]]},"id":"29137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.375281,39.656579],[-82.16168,39.557994],[-82.28765,39.382732],[-82.747713,39.366301],[-82.742236,39.470363],[-82.731282,39.552517],[-82.375281,39.656579]]]},"id":"39073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.024286,39.656579],[-88.810686,39.651102],[-88.471115,39.448455],[-88.471115,39.371778],[-88.471115,39.212947],[-88.580654,39.212947],[-88.805209,39.218424],[-89.139302,39.218424],[-89.139302,39.34987],[-89.024286,39.656579]]]},"id":"17173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.69976,39.656579],[-97.371143,39.656579],[-97.371143,39.568948],[-97.371143,39.306055],[-97.590221,39.306055],[-97.929791,39.306055],[-97.929791,39.568948],[-97.929791,39.656579],[-97.69976,39.656579]]]},"id":"20029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.728061,39.651102],[-95.563753,39.651102],[-95.56923,39.42107],[-95.591138,39.218424],[-95.886893,39.218424],[-96.03477,39.218424],[-96.03477,39.563471],[-95.788308,39.651102],[-95.728061,39.651102]]]},"id":"20085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.393968,39.651102],[-95.339199,39.651102],[-95.054398,39.623717],[-95.10369,39.530609],[-94.966767,39.42107],[-95.065351,39.42107],[-95.180367,39.42107],[-95.465168,39.42107],[-95.56923,39.42107],[-95.563753,39.651102],[-95.393968,39.651102]]]},"id":"20005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.738592,39.623717],[-78.656438,39.536086],[-78.979578,39.240331],[-79.275332,39.327962],[-79.067209,39.47584],[-78.738592,39.623717]]]},"id":"54057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.449678,39.634671],[-81.28537,39.607286],[-81.038907,39.541563],[-81.121061,39.459409],[-81.373001,39.344393],[-81.723525,39.218424],[-81.844017,39.448455],[-81.586601,39.585379],[-81.449678,39.634671]]]},"id":"39167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.398105,39.634671],[-79.938042,39.453932],[-80.195458,39.393686],[-80.49669,39.470363],[-80.398105,39.634671]]]},"id":"54049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.075341,39.596333],[-121.009618,39.640148],[-121.020572,39.393686],[-121.277988,39.032208],[-121.414912,38.999346],[-121.623035,39.295101],[-121.075341,39.596333]]]},"id":"06115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.97363,39.640148],[-85.951723,39.640148],[-85.951723,39.34987],[-86.083169,39.344393],[-86.252954,39.344393],[-86.247477,39.634671],[-85.97363,39.640148]]]},"id":"18081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.247477,39.634671],[-86.252954,39.344393],[-86.378924,39.338916],[-86.630863,39.34987],[-86.685633,39.470363],[-86.658248,39.601809],[-86.324155,39.629194],[-86.247477,39.634671]]]},"id":"18109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.689675,39.519655],[-119.284382,39.623717],[-119.711583,39.251285],[-119.689675,39.519655]]]},"id":"32029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.021113,39.61824],[-77.823943,39.492271],[-77.823943,39.492271],[-78.032067,39.262239],[-78.229237,39.393686],[-78.021113,39.61824]]]},"id":"54003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.422269,39.612763],[-93.279869,39.61824],[-93.104607,39.382732],[-93.274392,39.317009],[-93.477039,39.295101],[-93.597531,39.240331],[-93.756363,39.20747],[-93.76184,39.525132],[-93.756363,39.612763],[-93.422269,39.612763]]]},"id":"29033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.693836,39.612763],[-92.299497,39.607286],[-92.31045,39.34987],[-92.315927,39.245808],[-92.430943,39.251285],[-92.70479,39.322485],[-92.693836,39.612763]]]},"id":"29175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.331912,39.607286],[-87.200465,39.607286],[-87.238804,39.256762],[-87.578374,39.256762],[-87.605759,39.256762],[-87.529082,39.47584],[-87.534558,39.607286],[-87.381204,39.607286],[-87.331912,39.607286]]]},"id":"18167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.200465,39.607286],[-87.014249,39.607286],[-86.937572,39.47584],[-87.052588,39.169131],[-87.211419,39.169131],[-87.238804,39.169131],[-87.238804,39.256762],[-87.200465,39.607286]]]},"id":"18021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.945799,39.607286],[-80.617183,39.448455],[-80.89103,39.295101],[-81.006046,39.34987],[-81.038907,39.470363],[-81.121061,39.459409],[-81.038907,39.541563],[-80.945799,39.607286]]]},"id":"54095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.198632,39.596333],[-91.176724,39.596333],[-90.935738,39.399163],[-90.722138,39.223901],[-91.149339,39.229378],[-91.258878,39.141746],[-91.406755,39.141746],[-91.439617,39.317009],[-91.198632,39.596333]]]},"id":"29163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.478426,39.590856],[-84.36341,39.590856],[-84.352456,39.289624],[-84.598918,39.306055],[-84.817996,39.306055],[-84.817996,39.519655],[-84.812519,39.568948],[-84.478426,39.590856]]]},"id":"39017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.36341,39.590856],[-84.111471,39.579902],[-83.974547,39.568948],[-84.007409,39.256762],[-84.259348,39.273193],[-84.352456,39.289624],[-84.36341,39.590856]]]},"id":"39165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.882732,39.579902],[-122.740331,39.382732],[-122.340515,38.922669],[-122.395284,38.862422],[-122.625315,38.665253],[-122.822485,38.851469],[-123.090855,39.070546],[-122.882732,39.579902]]]},"id":"06033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.426359,39.568948],[-102.04845,39.574425],[-102.04845,39.568948],[-102.04845,39.130793],[-102.04845,39.048638],[-103.165746,39.037685],[-103.154792,39.563471],[-102.804268,39.568948],[-102.426359,39.568948]]]},"id":"08063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.974547,39.568948],[-83.667839,39.552517],[-83.591161,39.377255],[-83.865008,39.245808],[-83.990978,39.256762],[-84.007409,39.256762],[-83.974547,39.568948],[-83.974547,39.568948]]]},"id":"39027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.058088,39.568948],[-74.986888,39.514178],[-74.860918,39.322485],[-74.915688,39.180085],[-75.408613,39.382732],[-75.063565,39.568948],[-75.058088,39.568948]]]},"id":"34011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.004635,39.568948],[-101.413125,39.568948],[-101.391218,39.568948],[-101.391218,39.13627],[-101.478849,39.13627],[-102.04845,39.130793],[-102.04845,39.568948],[-102.004635,39.568948]]]},"id":"20181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.391218,39.568948],[-100.739462,39.568948],[-100.717554,39.568948],[-100.723031,39.130793],[-100.739462,39.130793],[-100.810662,39.130793],[-101.391218,39.13627],[-101.391218,39.568948]]]},"id":"20193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.827539,39.563471],[-105.400338,39.563471],[-105.329138,39.130793],[-105.329138,38.698114],[-105.96994,38.692637],[-106.189017,39.054115],[-106.134248,39.377255],[-105.827539,39.563471]]]},"id":"08093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.668261,39.568948],[-100.180814,39.568948],[-100.164383,39.568948],[-100.164383,39.130793],[-100.723031,39.130793],[-100.717554,39.568948],[-100.668261,39.568948]]]},"id":"20179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.063518,39.568948],[-99.04161,39.568948],[-99.047087,39.130793],[-99.408565,39.130793],[-99.589304,39.130793],[-99.605735,39.130793],[-99.600258,39.568948],[-99.063518,39.568948]]]},"id":"20163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.849917,39.568948],[-98.50487,39.568948],[-98.488439,39.568948],[-98.488439,39.218424],[-98.488439,39.130793],[-98.510347,39.130793],[-99.036133,39.130793],[-99.047087,39.130793],[-99.04161,39.568948],[-98.849917,39.568948]]]},"id":"20141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.488439,39.568948],[-97.929791,39.568948],[-97.929791,39.306055],[-97.929791,39.218424],[-98.477485,39.218424],[-98.488439,39.218424],[-98.488439,39.568948]]]},"id":"20123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.600258,39.568948],[-99.605735,39.130793],[-100.147952,39.130793],[-100.164383,39.130793],[-100.164383,39.568948],[-99.627643,39.568948],[-99.600258,39.568948]]]},"id":"20065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.299943,39.568948],[-96.960373,39.568948],[-96.960373,39.218424],[-96.96585,39.130793],[-97.261605,39.130793],[-97.371143,39.130793],[-97.371143,39.306055],[-97.371143,39.568948],[-97.299943,39.568948]]]},"id":"20027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.692003,39.568948],[-96.582464,39.568948],[-96.390771,39.174608],[-96.50031,39.043162],[-96.943942,39.218424],[-96.960373,39.218424],[-96.960373,39.568948],[-96.807019,39.568948],[-96.692003,39.568948]]]},"id":"20161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.71344,39.568948],[-103.707963,39.568948],[-103.154792,39.563471],[-103.165746,39.037685],[-103.171223,38.610483],[-103.505317,38.517375],[-104.053011,38.522852],[-104.053011,38.867899],[-103.718917,38.867899],[-103.71344,39.568948]]]},"id":"08073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.195411,39.563471],[-103.71344,39.568948],[-103.718917,38.867899],[-104.053011,38.867899],[-104.053011,39.130793],[-104.660951,39.130793],[-104.660951,39.563471],[-104.195411,39.563471]]]},"id":"08039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.582464,39.568948],[-96.237417,39.568948],[-96.03477,39.563471],[-96.03477,39.218424],[-96.040247,39.125316],[-96.390771,39.174608],[-96.582464,39.568948],[-96.582464,39.568948]]]},"id":"20149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.989567,39.568948],[-104.660951,39.563471],[-104.660951,39.130793],[-104.995044,39.130793],[-105.033383,39.130793],[-105.329138,39.130793],[-105.049814,39.563471],[-104.989567,39.568948]]]},"id":"08035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.048427,39.541563],[-112.23556,39.552517],[-112.016482,39.317009],[-112.016482,39.043162],[-112.514883,38.572145],[-113.97175,38.572145],[-114.048427,38.572145],[-114.048427,38.676207],[-114.048427,39.541563]]]},"id":"49027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.046664,39.552517],[-81.844017,39.448455],[-81.723525,39.218424],[-81.756386,39.180085],[-82.271219,39.201993],[-82.28765,39.382732],[-82.16168,39.557994],[-82.046664,39.552517]]]},"id":"39009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.656438,39.536086],[-78.470222,39.514178],[-78.349729,39.464886],[-78.508561,39.086977],[-78.979578,39.240331],[-78.656438,39.536086]]]},"id":"54027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.10369,39.530609],[-94.599812,39.530609],[-94.599812,39.453932],[-94.599812,39.158177],[-94.775074,39.201993],[-94.966767,39.42107],[-95.10369,39.530609]]]},"id":"29165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.10141,39.525132],[-93.76184,39.525132],[-93.756363,39.20747],[-94.106887,39.141746],[-94.210949,39.20747],[-94.210949,39.453932],[-94.210949,39.525132],[-94.10141,39.525132]]]},"id":"29177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.23972,39.525132],[-85.037074,39.525132],[-84.817996,39.519655],[-84.817996,39.306055],[-85.031597,39.306055],[-85.064458,39.306055],[-85.09732,39.311532],[-85.29449,39.267716],[-85.299967,39.453932],[-85.299967,39.525132],[-85.23972,39.525132]]]},"id":"18047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.555032,39.508701],[-120.001861,39.442978],[-120.007338,39.317009],[-120.149738,39.317009],[-121.277988,39.032208],[-121.020572,39.393686],[-120.555032,39.508701]]]},"id":"06057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.588411,39.525132],[-89.533642,39.525132],[-89.139302,39.34987],[-89.139302,39.218424],[-89.248841,39.026731],[-89.637704,38.999346],[-89.69795,38.999346],[-89.703427,39.525132],[-89.588411,39.525132]]]},"id":"17135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.758196,39.525132],[-89.703427,39.525132],[-89.69795,38.999346],[-90.147059,38.999346],[-90.147059,39.262239],[-90.152536,39.519655],[-89.927981,39.519655],[-89.758196,39.525132]]]},"id":"17117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.579737,39.519655],[-90.300413,39.519655],[-90.152536,39.519655],[-90.147059,39.262239],[-90.601645,39.119839],[-90.612599,39.393686],[-90.579737,39.519655]]]},"id":"17061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.268022,39.514178],[-82.742236,39.470363],[-82.747713,39.366301],[-82.764143,39.20747],[-82.786051,39.169131],[-83.355653,39.196516],[-83.372084,39.377255],[-83.268022,39.514178]]]},"id":"39141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.053457,39.497748],[-109.053457,39.366301],[-109.058934,38.500944],[-110.022876,38.500944],[-110.022876,39.459409],[-109.053457,39.497748]]]},"id":"49019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.823943,39.492271],[-77.823943,39.492271],[-77.719881,39.322485],[-77.82942,39.130793],[-78.032067,39.262239],[-77.823943,39.492271]]]},"id":"54037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.76459,39.486794],[-87.529082,39.47584],[-87.605759,39.256762],[-87.644097,39.158177],[-87.786498,39.180085],[-87.950806,39.174608],[-88.005575,39.174608],[-88.011052,39.377255],[-87.96176,39.481317],[-87.76459,39.486794]]]},"id":"17023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.038907,39.470363],[-81.006046,39.34987],[-81.016999,39.34987],[-81.241554,39.267716],[-81.373001,39.344393],[-81.121061,39.459409],[-81.038907,39.470363]]]},"id":"54073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.937572,39.47584],[-86.685633,39.470363],[-86.630863,39.34987],[-86.685633,39.163654],[-87.052588,39.169131],[-86.937572,39.47584]]]},"id":"18119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.49669,39.470363],[-80.195458,39.393686],[-80.168074,39.240331],[-80.22832,39.114362],[-80.29952,39.103408],[-80.452875,39.141746],[-80.595275,39.169131],[-80.545983,39.426547],[-80.49669,39.470363]]]},"id":"54033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.349729,39.464886],[-78.229237,39.393686],[-78.032067,39.262239],[-78.032067,39.262239],[-78.15256,39.037685],[-78.311391,39.0103],[-78.338776,39.103408],[-78.541422,39.054115],[-78.508561,39.086977],[-78.349729,39.464886]]]},"id":"51069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.56695,39.453932],[-94.210949,39.453932],[-94.210949,39.20747],[-94.419073,39.147223],[-94.605288,39.114362],[-94.599812,39.158177],[-94.599812,39.453932],[-94.56695,39.453932]]]},"id":"29047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.299967,39.453932],[-85.29449,39.267716],[-85.442367,39.196516],[-85.68883,39.130793],[-85.683353,39.34987],[-85.628583,39.453932],[-85.299967,39.453932]]]},"id":"18031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.938042,39.453932],[-79.894227,39.437501],[-79.894227,39.300578],[-79.976381,39.262239],[-80.168074,39.240331],[-80.195458,39.393686],[-79.938042,39.453932]]]},"id":"54091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.617183,39.448455],[-80.545983,39.426547],[-80.595275,39.169131],[-80.726722,39.097931],[-80.814353,39.108885],[-80.89103,39.295101],[-80.617183,39.448455]]]},"id":"54017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.465168,39.42107],[-95.180367,39.42107],[-95.185844,39.043162],[-95.49803,39.054115],[-95.591138,39.218424],[-95.56923,39.42107],[-95.465168,39.42107]]]},"id":"20087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.065351,39.42107],[-94.966767,39.42107],[-94.775074,39.201993],[-94.862705,39.201993],[-94.90652,38.988392],[-95.054398,38.982915],[-95.185844,39.043162],[-95.180367,39.42107],[-95.065351,39.42107]]]},"id":"20103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.077621,39.415593],[-121.891405,39.382732],[-121.907836,39.306055],[-121.836636,38.922669],[-122.061191,38.928146],[-122.340515,38.922669],[-122.740331,39.382732],[-122.077621,39.415593]]]},"id":"06011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.274392,39.317009],[-93.104607,39.382732],[-92.847191,39.223901],[-92.934822,39.065069],[-93.049837,38.928146],[-93.498947,38.944577],[-93.477039,39.295101],[-93.274392,39.317009]]]},"id":"29195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.373001,39.344393],[-81.241554,39.267716],[-81.296323,39.185562],[-81.42777,39.13627],[-81.581124,39.026731],[-81.739956,39.092454],[-81.745433,39.097931],[-81.756386,39.180085],[-81.723525,39.218424],[-81.373001,39.344393]]]},"id":"54107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.935738,39.399163],[-90.612599,39.393686],[-90.601645,39.119839],[-90.448291,38.966484],[-90.667368,38.933623],[-90.722138,39.223901],[-90.935738,39.399163]]]},"id":"17013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.747713,39.366301],[-82.28765,39.382732],[-82.271219,39.201993],[-82.28765,39.201993],[-82.320511,39.026731],[-82.435527,39.037685],[-82.671035,39.201993],[-82.764143,39.20747],[-82.747713,39.366301]]]},"id":"39163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.016999,39.34987],[-81.006046,39.34987],[-80.89103,39.295101],[-80.814353,39.108885],[-81.03343,39.0103],[-81.115584,39.037685],[-81.164877,39.032208],[-81.296323,39.185562],[-81.241554,39.267716],[-81.016999,39.34987]]]},"id":"54085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.000122,39.377255],[-75.764614,39.377255],[-75.759137,39.295101],[-75.75366,39.245808],[-75.846768,39.256762],[-76.158953,39.092454],[-76.000122,39.377255]]]},"id":"24029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.134248,39.377255],[-106.189017,39.054115],[-106.375233,39.054115],[-106.57788,39.059592],[-106.424526,39.360824],[-106.205448,39.377255],[-106.134248,39.377255]]]},"id":"08065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.142499,39.377255],[-88.011052,39.377255],[-88.005575,39.174608],[-88.361576,39.169131],[-88.471115,39.212947],[-88.471115,39.371778],[-88.142499,39.377255]]]},"id":"17035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.591161,39.377255],[-83.372084,39.377255],[-83.355653,39.196516],[-83.383038,39.054115],[-83.673316,39.021254],[-83.865008,39.245808],[-83.591161,39.377255]]]},"id":"39071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.651878,39.371778],[-76.525908,39.218424],[-76.531385,39.20747],[-76.619016,39.234854],[-76.619016,39.234854],[-76.651878,39.371778]]]},"id":"24510"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.079079,39.366301],[-76.881909,39.34987],[-76.695693,39.212947],[-76.838094,39.103408],[-76.887386,39.130793],[-77.16671,39.355347],[-77.16671,39.355347],[-77.079079,39.366301]]]},"id":"24027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.774133,39.366301],[-107.432283,39.366301],[-107.393944,39.256762],[-107.503483,39.218424],[-107.514437,39.212947],[-108.379794,38.67073],[-109.058934,38.500944],[-109.053457,39.366301],[-108.774133,39.366301]]]},"id":"08077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.04342,39.366301],[-106.424526,39.360824],[-106.57788,39.059592],[-106.599788,38.999346],[-107.393944,39.256762],[-107.432283,39.366301],[-107.11462,39.366301],[-107.04342,39.366301]]]},"id":"08097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.616736,39.311532],[-75.512674,39.366301],[-75.310028,38.944577],[-75.720798,38.829561],[-75.748183,39.141746],[-75.75366,39.245808],[-75.759137,39.295101],[-75.616736,39.311532]]]},"id":"10001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.630863,39.34987],[-86.378924,39.338916],[-86.318678,39.048638],[-86.318678,38.988392],[-86.680156,38.993869],[-86.685633,39.163654],[-86.630863,39.34987]]]},"id":"18105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.243388,39.317009],[-77.16671,39.355347],[-76.887386,39.130793],[-77.002402,38.966484],[-77.035264,38.993869],[-77.117418,38.933623],[-77.331019,39.059592],[-77.456988,39.218424],[-77.243388,39.317009]]]},"id":"24031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.798368,39.34987],[-85.683353,39.34987],[-85.68883,39.130793],[-85.798368,39.070546],[-86.077692,39.048638],[-86.083169,39.344393],[-85.951723,39.34987],[-85.798368,39.34987]]]},"id":"18005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.31045,39.34987],[-91.718941,39.338916],[-91.439617,39.317009],[-91.406755,39.141746],[-91.625833,39.147223],[-91.63131,39.059592],[-92.107804,39.065069],[-92.315927,39.245808],[-92.31045,39.34987]]]},"id":"29007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.252954,39.344393],[-86.083169,39.344393],[-86.077692,39.048638],[-86.318678,39.048638],[-86.378924,39.338916],[-86.252954,39.344393]]]},"id":"18013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.847191,39.223901],[-92.70479,39.322485],[-92.430943,39.251285],[-92.556913,38.971961],[-92.918391,39.032208],[-92.934822,39.065069],[-92.847191,39.223901]]]},"id":"29089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.979578,39.240331],[-79.132932,38.81313],[-79.35201,38.95553],[-79.357487,38.966484],[-79.488933,39.196516],[-79.488933,39.20747],[-79.275332,39.327962],[-78.979578,39.240331]]]},"id":"54023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.860918,39.322485],[-74.548733,39.295101],[-74.915688,39.180085],[-74.860918,39.322485]]]},"id":"34009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.719881,39.322485],[-77.676066,39.322485],[-77.456988,39.218424],[-77.331019,39.059592],[-77.533665,38.845992],[-77.654158,38.944577],[-77.960867,39.015777],[-77.82942,39.130793],[-77.719881,39.322485]]]},"id":"51107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.149738,39.317009],[-120.007338,39.317009],[-120.001861,39.163654],[-120.001861,39.114362],[-120.001861,39.065069],[-121.04248,38.917192],[-121.141065,38.714545],[-121.486112,38.736453],[-121.414912,38.999346],[-121.277988,39.032208],[-120.149738,39.317009]]]},"id":"06061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.598918,39.306055],[-84.352456,39.289624],[-84.259348,39.273193],[-84.319594,39.021254],[-84.50581,39.092454],[-84.620826,39.076023],[-84.817996,39.103408],[-84.817996,39.306055],[-84.598918,39.306055]]]},"id":"39061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.09732,39.311532],[-85.064458,39.306055],[-85.130182,38.950054],[-85.135659,38.928146],[-85.201382,38.911715],[-85.299967,38.911715],[-85.442367,38.911715],[-85.442367,39.196516],[-85.29449,39.267716],[-85.09732,39.311532]]]},"id":"18137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.031597,39.306055],[-84.817996,39.306055],[-84.817996,39.103408],[-84.878242,39.032208],[-84.933012,39.0103],[-85.130182,38.950054],[-85.064458,39.306055],[-85.031597,39.306055]]]},"id":"18029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.590221,39.306055],[-97.371143,39.306055],[-97.371143,39.130793],[-97.371143,38.95553],[-97.486159,38.95553],[-97.929791,38.95553],[-97.929791,39.218424],[-97.929791,39.306055],[-97.590221,39.306055]]]},"id":"20143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.623035,39.295101],[-121.414912,38.999346],[-121.486112,38.736453],[-121.557312,38.736453],[-121.601128,38.736453],[-121.836636,38.922669],[-121.907836,39.306055],[-121.623035,39.295101]]]},"id":"06101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.976381,39.262239],[-79.894227,39.300578],[-79.812073,39.229378],[-79.823026,39.114362],[-80.08592,38.944577],[-80.22832,39.114362],[-80.168074,39.240331],[-79.976381,39.262239]]]},"id":"54001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.597531,39.240331],[-93.477039,39.295101],[-93.498947,38.944577],[-93.498947,38.928146],[-93.800178,38.9391],[-94.112364,38.917192],[-94.106887,39.141746],[-93.756363,39.20747],[-93.597531,39.240331]]]},"id":"29107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.812073,39.229378],[-79.488933,39.196516],[-79.357487,38.966484],[-79.757303,39.032208],[-79.823026,39.114362],[-79.812073,39.229378]]]},"id":"54093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.259348,39.273193],[-84.007409,39.256762],[-83.990978,39.256762],[-84.051224,38.769315],[-84.231963,38.829561],[-84.231963,38.873376],[-84.319594,39.021254],[-84.259348,39.273193]]]},"id":"39025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.032067,39.262239],[-78.032067,39.262239],[-77.82942,39.130793],[-77.960867,39.015777],[-78.004682,38.977438],[-78.15256,39.037685],[-78.032067,39.262239]]]},"id":"51043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.147059,39.262239],[-90.147059,38.999346],[-90.240167,38.999346],[-90.278506,38.922669],[-90.448291,38.966484],[-90.601645,39.119839],[-90.147059,39.262239]]]},"id":"17083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.846768,39.256762],[-75.75366,39.245808],[-75.748183,39.141746],[-75.748183,39.141746],[-75.95083,38.917192],[-76.071322,38.9391],[-76.197292,38.851469],[-76.158953,39.092454],[-75.846768,39.256762]]]},"id":"24035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.578374,39.256762],[-87.238804,39.256762],[-87.238804,39.169131],[-87.238804,38.906238],[-87.534558,38.900761],[-87.644097,39.158177],[-87.605759,39.256762],[-87.578374,39.256762]]]},"id":"18153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.503483,39.218424],[-107.393944,39.256762],[-106.599788,38.999346],[-106.249264,38.424267],[-106.999605,38.424267],[-106.999605,38.144943],[-107.569206,38.144943],[-107.63493,38.303775],[-107.498006,38.67073],[-107.503483,39.218424]]]},"id":"08051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.990978,39.256762],[-83.865008,39.245808],[-83.673316,39.021254],[-83.706177,38.637868],[-83.848578,38.747407],[-83.903347,38.769315],[-84.051224,38.769315],[-83.990978,39.256762]]]},"id":"39015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.580137,39.196516],[-119.552752,39.086977],[-119.760876,39.114362],[-120.001861,39.114362],[-120.001861,39.163654],[-119.711583,39.251285],[-119.580137,39.196516]]]},"id":"32510"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.430943,39.251285],[-92.315927,39.245808],[-92.107804,39.065069],[-92.222819,38.643345],[-92.392605,38.736453],[-92.463805,38.862422],[-92.496666,38.922669],[-92.556913,38.971961],[-92.430943,39.251285]]]},"id":"29019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.979578,39.240331],[-78.508561,39.086977],[-78.541422,39.054115],[-78.870039,38.763838],[-78.990532,38.845992],[-79.056255,38.763838],[-79.132932,38.81313],[-78.979578,39.240331]]]},"id":"54031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.619016,39.234854],[-76.531385,39.20747],[-76.531385,38.714545],[-76.635447,38.769315],[-76.68474,38.747407],[-76.838094,39.103408],[-76.695693,39.212947],[-76.619016,39.234854],[-76.619016,39.234854]]]},"id":"24003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.419073,39.147223],[-94.210949,39.20747],[-94.106887,39.141746],[-94.112364,38.917192],[-94.117841,38.835038],[-94.583381,38.845992],[-94.610765,38.845992],[-94.605288,39.043162],[-94.605288,39.114362],[-94.419073,39.147223]]]},"id":"29095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.149339,39.229378],[-90.722138,39.223901],[-90.667368,38.933623],[-90.957646,38.873376],[-91.111001,38.895284],[-91.264355,38.993869],[-91.258878,39.141746],[-91.149339,39.229378]]]},"id":"29113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.943942,39.218424],[-96.50031,39.043162],[-96.50031,38.867899],[-96.686526,38.867899],[-96.889173,38.867899],[-96.96585,39.130793],[-96.960373,39.218424],[-96.943942,39.218424]]]},"id":"20061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.477485,39.218424],[-97.929791,39.218424],[-97.929791,38.95553],[-97.929791,38.873376],[-98.482962,38.873376],[-98.488439,39.130793],[-98.488439,39.218424],[-98.477485,39.218424]]]},"id":"20105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.514437,39.212947],[-107.503483,39.218424],[-107.498006,38.67073],[-108.001885,38.67073],[-108.379794,38.67073],[-107.514437,39.212947]]]},"id":"08029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.139302,39.218424],[-88.805209,39.218424],[-88.69567,38.917192],[-88.69567,38.824084],[-88.777824,38.824084],[-89.139302,38.736453],[-89.254318,38.74193],[-89.248841,39.026731],[-89.139302,39.218424]]]},"id":"17051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.886893,39.218424],[-95.591138,39.218424],[-95.49803,39.054115],[-95.49803,38.867899],[-95.667815,38.867899],[-95.947139,38.867899],[-96.040247,39.125316],[-96.03477,39.218424],[-95.886893,39.218424]]]},"id":"20177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.580654,39.212947],[-88.471115,39.212947],[-88.361576,39.169131],[-88.361576,38.911715],[-88.613516,38.917192],[-88.69567,38.917192],[-88.805209,39.218424],[-88.580654,39.212947]]]},"id":"17049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.040247,39.125316],[-95.947139,38.867899],[-95.947139,38.736453],[-96.336002,38.74193],[-96.352432,38.74193],[-96.50031,38.867899],[-96.50031,39.043162],[-96.390771,39.174608],[-96.040247,39.125316]]]},"id":"20197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.671035,39.201993],[-82.435527,39.037685],[-82.577927,38.845992],[-82.649128,38.851469],[-82.807959,38.950054],[-82.786051,39.169131],[-82.764143,39.20747],[-82.671035,39.201993]]]},"id":"39079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.28765,39.201993],[-82.271219,39.201993],[-81.756386,39.180085],[-81.745433,39.097931],[-81.909741,38.878853],[-82.101434,38.95553],[-82.320511,39.026731],[-82.28765,39.201993]]]},"id":"39105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.862705,39.201993],[-94.775074,39.201993],[-94.599812,39.158177],[-94.605288,39.114362],[-94.605288,39.043162],[-94.90652,38.988392],[-94.862705,39.201993]]]},"id":"20209"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.355653,39.196516],[-82.786051,39.169131],[-82.807959,38.950054],[-83.273499,39.015777],[-83.383038,39.054115],[-83.355653,39.196516]]]},"id":"39131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.442367,39.196516],[-85.442367,38.911715],[-85.683353,38.81313],[-85.792891,38.807653],[-85.798368,39.070546],[-85.68883,39.130793],[-85.442367,39.196516]]]},"id":"18079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.42777,39.13627],[-81.296323,39.185562],[-81.164877,39.032208],[-81.279893,38.917192],[-81.433247,38.933623],[-81.504447,38.917192],[-81.581124,39.026731],[-81.42777,39.13627]]]},"id":"54105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.786498,39.180085],[-87.644097,39.158177],[-87.534558,38.900761],[-87.534558,38.851469],[-87.90699,38.851469],[-87.945329,38.851469],[-87.950806,39.174608],[-87.786498,39.180085]]]},"id":"17033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.005575,39.174608],[-87.950806,39.174608],[-87.945329,38.851469],[-88.257515,38.845992],[-88.361576,38.911715],[-88.361576,39.169131],[-88.005575,39.174608]]]},"id":"17079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.211419,39.169131],[-87.052588,39.169131],[-86.685633,39.163654],[-86.680156,38.993869],[-86.680156,38.906238],[-86.756833,38.906238],[-86.90471,38.906238],[-87.096403,38.906238],[-87.238804,38.906238],[-87.238804,39.169131],[-87.211419,39.169131]]]},"id":"18055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.452875,39.141746],[-80.29952,39.103408],[-80.392628,38.725499],[-80.458352,38.74193],[-80.606229,38.906238],[-80.726722,39.097931],[-80.595275,39.169131],[-80.452875,39.141746]]]},"id":"54041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.233726,39.163654],[-115.90511,39.163654],[-115.001414,38.676207],[-115.001414,38.051835],[-115.894156,38.051835],[-115.894156,36.841432],[-115.899633,36.00346],[-117.164806,36.972878],[-117.164806,38.002543],[-117.690592,38.47356],[-118.194471,38.917192],[-117.865854,39.076023],[-117.772746,39.092454],[-116.600681,39.163654],[-116.233726,39.163654]]]},"id":"32023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.625833,39.147223],[-91.406755,39.141746],[-91.258878,39.141746],[-91.264355,38.993869],[-91.417709,38.709068],[-91.642264,38.703591],[-91.647741,38.703591],[-91.63131,39.059592],[-91.625833,39.147223]]]},"id":"29139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.620826,39.076023],[-84.615349,38.802176],[-84.659165,38.774791],[-84.779657,38.856946],[-84.796088,38.856946],[-84.872765,38.900761],[-84.878242,39.032208],[-84.817996,39.103408],[-84.620826,39.076023]]]},"id":"21015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.748183,39.141746],[-75.748183,39.141746],[-75.720798,38.829561],[-75.709844,38.637868],[-75.841291,38.703591],[-75.945353,38.676207],[-75.95083,38.917192],[-75.748183,39.141746]]]},"id":"24011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.391218,39.13627],[-100.810662,39.130793],[-100.816139,38.698114],[-101.128324,38.698114],[-101.259771,38.703591],[-101.484326,38.698114],[-101.478849,39.13627],[-101.391218,39.13627]]]},"id":"20109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.478849,39.13627],[-101.484326,38.698114],[-101.56648,38.698114],[-102.042974,38.698114],[-102.04845,39.048638],[-102.04845,39.130793],[-101.478849,39.13627]]]},"id":"20199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.510347,39.130793],[-98.488439,39.130793],[-98.482962,38.873376],[-98.488439,38.698114],[-98.811579,38.698114],[-99.030656,38.698114],[-99.04161,38.698114],[-99.036133,39.130793],[-98.510347,39.130793]]]},"id":"20167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.261605,39.130793],[-96.96585,39.130793],[-96.889173,38.867899],[-96.932988,38.610483],[-97.261605,38.610483],[-97.371143,38.610483],[-97.371143,38.95553],[-97.371143,39.130793],[-97.261605,39.130793]]]},"id":"20041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.408565,39.130793],[-99.047087,39.130793],[-99.036133,39.130793],[-99.04161,38.698114],[-99.583827,38.698114],[-99.600258,38.698114],[-99.589304,39.130793],[-99.408565,39.130793]]]},"id":"20051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.739462,39.130793],[-100.723031,39.130793],[-100.164383,39.130793],[-100.147952,39.130793],[-100.153429,38.698114],[-100.246537,38.698114],[-100.58063,38.698114],[-100.690169,38.698114],[-100.816139,38.698114],[-100.810662,39.130793],[-100.739462,39.130793]]]},"id":"20063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.589304,39.130793],[-99.600258,38.698114],[-100.153429,38.698114],[-100.147952,39.130793],[-99.605735,39.130793],[-99.589304,39.130793]]]},"id":"20195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.887386,39.130793],[-76.838094,39.103408],[-76.68474,38.747407],[-76.673786,38.533806],[-77.046218,38.61596],[-77.084556,38.709068],[-77.040741,38.785745],[-77.040741,38.791222],[-77.002402,38.966484],[-76.887386,39.130793]]]},"id":"24033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.995044,39.130793],[-104.660951,39.130793],[-104.053011,39.130793],[-104.053011,38.867899],[-104.053011,38.522852],[-104.940275,38.517375],[-104.940275,38.648822],[-105.033383,39.130793],[-104.995044,39.130793]]]},"id":"08041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.329138,39.130793],[-105.329138,39.130793],[-105.033383,39.130793],[-104.940275,38.648822],[-105.329138,38.698114],[-105.329138,39.130793]]]},"id":"08119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.319594,39.021254],[-84.231963,38.873376],[-84.418179,38.807653],[-84.50581,39.092454],[-84.319594,39.021254]]]},"id":"21037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.757303,39.032208],[-79.357487,38.966484],[-79.35201,38.95553],[-79.625857,38.665253],[-80.244751,38.385929],[-80.277612,38.692637],[-80.08592,38.944577],[-79.823026,39.114362],[-79.757303,39.032208]]]},"id":"54083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.22832,39.114362],[-80.08592,38.944577],[-80.277612,38.692637],[-80.392628,38.725499],[-80.29952,39.103408],[-80.22832,39.114362]]]},"id":"54097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.760876,39.114362],[-119.552752,39.086977],[-119.328197,38.533806],[-119.585614,38.714545],[-119.903276,38.933623],[-120.001861,39.065069],[-120.001861,39.114362],[-119.760876,39.114362]]]},"id":"32005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.726722,39.097931],[-80.606229,38.906238],[-80.984138,38.720022],[-81.03343,39.0103],[-80.814353,39.108885],[-80.726722,39.097931]]]},"id":"54021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.338776,39.103408],[-78.311391,39.0103],[-78.388068,38.829561],[-78.640007,38.605006],[-78.870039,38.763838],[-78.541422,39.054115],[-78.338776,39.103408]]]},"id":"51171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.50581,39.092454],[-84.418179,38.807653],[-84.533195,38.791222],[-84.615349,38.802176],[-84.620826,39.076023],[-84.50581,39.092454]]]},"id":"21117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.739956,39.092454],[-81.581124,39.026731],[-81.504447,38.917192],[-81.520878,38.610483],[-81.69614,38.626914],[-81.772817,38.681683],[-81.909741,38.878853],[-81.745433,39.097931],[-81.739956,39.092454]]]},"id":"54035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.764072,39.076023],[-118.753119,39.076023],[-117.865854,39.076023],[-118.194471,38.917192],[-117.690592,38.47356],[-118.429979,37.898481],[-119.158412,38.413313],[-118.906473,38.413313],[-118.764072,39.076023]]]},"id":"32021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.798368,39.070546],[-85.792891,38.807653],[-85.885999,38.736453],[-86.274862,38.763838],[-86.318678,38.988392],[-86.318678,39.048638],[-86.077692,39.048638],[-85.798368,39.070546]]]},"id":"18071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.49803,39.054115],[-95.185844,39.043162],[-95.054398,38.982915],[-95.054398,38.736453],[-95.49803,38.736453],[-95.503507,38.736453],[-95.49803,38.867899],[-95.49803,39.054115]]]},"id":"20045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.001861,39.065069],[-119.903276,38.933623],[-120.073061,38.703591],[-121.026049,38.506421],[-121.141065,38.714545],[-121.04248,38.917192],[-120.001861,39.065069]]]},"id":"06017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.107804,39.065069],[-91.63131,39.059592],[-91.647741,38.703591],[-92.009219,38.572145],[-92.222819,38.643345],[-92.107804,39.065069]]]},"id":"29027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.918391,39.032208],[-92.556913,38.971961],[-92.496666,38.922669],[-92.841714,38.681683],[-93.060791,38.692637],[-93.049837,38.928146],[-92.934822,39.065069],[-92.918391,39.032208]]]},"id":"29053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.90652,38.988392],[-94.605288,39.043162],[-94.610765,38.845992],[-94.610765,38.736453],[-94.966767,38.736453],[-95.054398,38.736453],[-95.054398,38.982915],[-94.90652,38.988392]]]},"id":"20091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.375233,39.054115],[-106.189017,39.054115],[-105.96994,38.692637],[-106.008278,38.446175],[-106.249264,38.424267],[-106.599788,38.999346],[-106.57788,39.059592],[-106.375233,39.054115]]]},"id":"08015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.331019,39.059592],[-77.117418,38.933623],[-77.172187,38.895284],[-77.15028,38.878853],[-77.111941,38.845992],[-77.040741,38.785745],[-77.084556,38.709068],[-77.128372,38.632391],[-77.22148,38.637868],[-77.533665,38.845992],[-77.331019,39.059592]]]},"id":"51059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.383038,39.054115],[-83.273499,39.015777],[-83.273499,39.0103],[-83.268022,38.61596],[-83.645931,38.637868],[-83.706177,38.637868],[-83.673316,39.021254],[-83.383038,39.054115]]]},"id":"39001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.04845,39.048638],[-102.042974,38.698114],[-102.042974,38.61596],[-103.171223,38.610483],[-103.165746,39.037685],[-102.04845,39.048638]]]},"id":"08017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.978143,39.043162],[-111.299003,39.032208],[-111.30448,38.511898],[-111.764543,38.500944],[-111.857651,38.500944],[-112.52036,38.511898],[-112.514883,38.572145],[-112.016482,39.043162],[-111.978143,39.043162]]]},"id":"49041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.115584,39.037685],[-81.03343,39.0103],[-80.984138,38.720022],[-81.03343,38.665253],[-81.055338,38.643345],[-81.082723,38.610483],[-81.279893,38.917192],[-81.164877,39.032208],[-81.115584,39.037685]]]},"id":"54013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.15256,39.037685],[-78.004682,38.977438],[-78.130652,38.862422],[-78.256622,38.758361],[-78.284006,38.758361],[-78.388068,38.829561],[-78.311391,39.0103],[-78.15256,39.037685]]]},"id":"51187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.435527,39.037685],[-82.320511,39.026731],[-82.101434,38.95553],[-82.216449,38.594052],[-82.265742,38.599529],[-82.28765,38.583099],[-82.577927,38.845992],[-82.435527,39.037685]]]},"id":"39053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.933012,39.0103],[-84.878242,39.032208],[-84.872765,38.900761],[-85.135659,38.928146],[-85.130182,38.950054],[-84.933012,39.0103]]]},"id":"18115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.909741,38.878853],[-81.772817,38.681683],[-82.057618,38.47356],[-82.216449,38.594052],[-82.101434,38.95553],[-81.909741,38.878853]]]},"id":"54053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.248841,39.026731],[-89.254318,38.74193],[-89.593888,38.74193],[-89.599365,38.74193],[-89.637704,38.999346],[-89.248841,39.026731]]]},"id":"17005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.273499,39.0103],[-83.273499,39.015777],[-82.807959,38.950054],[-82.649128,38.851469],[-82.813436,38.572145],[-83.032514,38.725499],[-83.268022,38.61596],[-83.273499,39.0103]]]},"id":"39145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.960867,39.015777],[-77.654158,38.944577],[-77.533665,38.555714],[-77.637727,38.407836],[-77.933482,38.698114],[-78.130652,38.862422],[-78.004682,38.977438],[-77.960867,39.015777]]]},"id":"51061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.240167,38.999346],[-90.147059,38.999346],[-89.69795,38.999346],[-89.637704,38.999346],[-89.599365,38.74193],[-89.708904,38.654299],[-90.179921,38.659776],[-90.168967,38.774791],[-90.119674,38.807653],[-90.278506,38.922669],[-90.240167,38.999346]]]},"id":"17119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.035264,38.993869],[-77.002402,38.966484],[-77.040741,38.791222],[-77.046218,38.840515],[-77.117418,38.933623],[-77.035264,38.993869]]]},"id":"11001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.111001,38.895284],[-90.957646,38.873376],[-90.963123,38.550237],[-91.368417,38.698114],[-91.417709,38.709068],[-91.264355,38.993869],[-91.111001,38.895284]]]},"id":"29219"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.680156,38.993869],[-86.318678,38.988392],[-86.274862,38.763838],[-86.307724,38.68716],[-86.685633,38.68716],[-86.680156,38.906238],[-86.680156,38.993869]]]},"id":"18093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.448291,38.966484],[-90.278506,38.922669],[-90.119674,38.807653],[-90.283983,38.878853],[-90.733092,38.637868],[-90.963123,38.550237],[-90.957646,38.873376],[-90.667368,38.933623],[-90.448291,38.966484]]]},"id":"29183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.047134,38.451652],[-75.342889,38.451652],[-75.69889,38.561191],[-75.709844,38.637868],[-75.720798,38.829561],[-75.310028,38.944577],[-75.047134,38.451652]]]},"id":"10005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.486159,38.95553],[-97.371143,38.95553],[-97.371143,38.610483],[-97.924314,38.610483],[-97.929791,38.873376],[-97.929791,38.95553],[-97.486159,38.95553]]]},"id":"20169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.35201,38.95553],[-79.132932,38.81313],[-79.056255,38.763838],[-79.22604,38.479037],[-79.313671,38.413313],[-79.647764,38.594052],[-79.625857,38.665253],[-79.35201,38.95553]]]},"id":"54071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.071322,38.9391],[-75.95083,38.917192],[-75.945353,38.676207],[-76.153476,38.632391],[-76.197292,38.851469],[-76.071322,38.9391]]]},"id":"24041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.654158,38.944577],[-77.533665,38.845992],[-77.22148,38.637868],[-77.303634,38.506421],[-77.533665,38.555714],[-77.654158,38.944577]]]},"id":"51153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.498947,38.944577],[-93.049837,38.928146],[-93.060791,38.692637],[-93.066268,38.528329],[-93.159376,38.533806],[-93.515377,38.511898],[-93.5099,38.555714],[-93.498947,38.928146],[-93.498947,38.944577]]]},"id":"29159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.433247,38.933623],[-81.279893,38.917192],[-81.082723,38.610483],[-81.192262,38.528329],[-81.520878,38.610483],[-81.504447,38.917192],[-81.433247,38.933623]]]},"id":"54087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.800178,38.9391],[-93.498947,38.928146],[-93.5099,38.555714],[-93.794701,38.561191],[-94.063071,38.566668],[-94.117841,38.835038],[-94.112364,38.917192],[-93.800178,38.9391]]]},"id":"29101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.117418,38.933623],[-77.046218,38.840515],[-77.084556,38.845992],[-77.111941,38.845992],[-77.15028,38.878853],[-77.172187,38.895284],[-77.117418,38.933623]]]},"id":"51013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.585614,38.714545],[-119.640383,38.325682],[-120.018292,38.435221],[-120.073061,38.506421],[-120.073061,38.511898],[-120.073061,38.698114],[-120.073061,38.703591],[-119.903276,38.933623],[-119.585614,38.714545]]]},"id":"06003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.135659,38.928146],[-84.872765,38.900761],[-84.796088,38.856946],[-85.02612,38.763838],[-85.201382,38.692637],[-85.201382,38.911715],[-85.135659,38.928146]]]},"id":"18155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.061191,38.928146],[-121.836636,38.922669],[-121.601128,38.736453],[-121.590174,38.314728],[-121.738051,38.539283],[-122.105006,38.511898],[-122.395284,38.862422],[-122.340515,38.922669],[-122.061191,38.928146]]]},"id":"06113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.463805,38.862422],[-92.392605,38.736453],[-92.496666,38.429744],[-92.611682,38.429744],[-92.622636,38.429744],[-92.841714,38.681683],[-92.496666,38.922669],[-92.463805,38.862422]]]},"id":"29135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.613516,38.917192],[-88.361576,38.911715],[-88.257515,38.845992],[-88.252038,38.599529],[-88.586131,38.605006],[-88.701147,38.605006],[-88.69567,38.824084],[-88.69567,38.917192],[-88.613516,38.917192]]]},"id":"17025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.299967,38.911715],[-85.201382,38.911715],[-85.201382,38.692637],[-85.332828,38.736453],[-85.425936,38.588575],[-85.568337,38.605006],[-85.683353,38.81313],[-85.442367,38.911715],[-85.299967,38.911715]]]},"id":"18077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.238804,38.906238],[-87.096403,38.906238],[-87.244281,38.54476],[-87.463358,38.533806],[-87.605759,38.446175],[-87.742682,38.413313],[-87.649574,38.566668],[-87.534558,38.851469],[-87.534558,38.900761],[-87.238804,38.906238]]]},"id":"18083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.756833,38.906238],[-86.680156,38.906238],[-86.685633,38.68716],[-86.680156,38.528329],[-86.926618,38.506421],[-86.90471,38.906238],[-86.756833,38.906238]]]},"id":"18101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.096403,38.906238],[-86.90471,38.906238],[-86.926618,38.506421],[-87.074495,38.517375],[-87.244281,38.54476],[-87.096403,38.906238]]]},"id":"18027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.606229,38.906238],[-80.458352,38.74193],[-80.650044,38.528329],[-80.677429,38.533806],[-80.880076,38.506421],[-81.03343,38.665253],[-80.984138,38.720022],[-80.606229,38.906238]]]},"id":"54007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.283983,38.878853],[-90.119674,38.807653],[-90.168967,38.774791],[-90.256598,38.533806],[-90.262075,38.522852],[-90.344229,38.385929],[-90.464722,38.500944],[-90.738569,38.47356],[-90.733092,38.637868],[-90.283983,38.878853]]]},"id":"29189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.231963,38.829561],[-84.204579,38.583099],[-84.401749,38.561191],[-84.478426,38.54476],[-84.533195,38.791222],[-84.418179,38.807653],[-84.231963,38.873376],[-84.231963,38.829561]]]},"id":"21191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.929791,38.873376],[-97.924314,38.610483],[-97.924314,38.522852],[-98.017422,38.522852],[-98.482962,38.522852],[-98.488439,38.698114],[-98.482962,38.873376],[-97.929791,38.873376]]]},"id":"20053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.686526,38.867899],[-96.50031,38.867899],[-96.352432,38.74193],[-96.352432,38.522852],[-96.817972,38.522852],[-96.932988,38.610483],[-96.889173,38.867899],[-96.686526,38.867899]]]},"id":"20127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.667815,38.867899],[-95.49803,38.867899],[-95.503507,38.736453],[-95.508984,38.435221],[-95.656861,38.435221],[-95.952616,38.435221],[-95.947139,38.736453],[-95.947139,38.867899],[-95.667815,38.867899]]]},"id":"20139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.395284,38.862422],[-122.105006,38.511898],[-122.406238,38.155897],[-122.625315,38.665253],[-122.395284,38.862422]]]},"id":"06055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.256622,38.758361],[-78.130652,38.862422],[-77.933482,38.698114],[-78.229237,38.533806],[-78.338776,38.626914],[-78.284006,38.758361],[-78.256622,38.758361]]]},"id":"51157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.779657,38.856946],[-84.659165,38.774791],[-84.785134,38.720022],[-84.817996,38.709068],[-84.933012,38.659776],[-85.02612,38.763838],[-84.796088,38.856946],[-84.779657,38.856946]]]},"id":"21077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.074425,38.851469],[-122.822485,38.851469],[-122.625315,38.665253],[-122.406238,38.155897],[-122.406238,38.15042],[-122.488392,38.112082],[-122.844393,38.27639],[-123.003224,38.298298],[-123.534488,38.769315],[-123.074425,38.851469]]]},"id":"06097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.534558,38.851469],[-87.649574,38.566668],[-87.912467,38.572145],[-87.90699,38.851469],[-87.534558,38.851469]]]},"id":"17101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.90699,38.851469],[-87.912467,38.572145],[-87.956283,38.572145],[-88.005575,38.572145],[-88.147976,38.566668],[-88.252038,38.599529],[-88.257515,38.845992],[-87.945329,38.851469],[-87.90699,38.851469]]]},"id":"17159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.990532,38.845992],[-78.870039,38.763838],[-78.640007,38.605006],[-78.486653,38.41879],[-78.661915,38.27639],[-78.749546,38.20519],[-79.22604,38.479037],[-79.056255,38.763838],[-78.990532,38.845992]]]},"id":"51165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.649128,38.851469],[-82.577927,38.845992],[-82.28765,38.583099],[-82.506727,38.413313],[-82.561497,38.40236],[-82.594358,38.424267],[-82.665558,38.506421],[-82.813436,38.572145],[-82.649128,38.851469]]]},"id":"39087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.583381,38.845992],[-94.117841,38.835038],[-94.063071,38.566668],[-94.063071,38.446175],[-94.610765,38.479037],[-94.610765,38.479037],[-94.610765,38.736453],[-94.610765,38.845992],[-94.583381,38.845992]]]},"id":"29037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.084556,38.845992],[-77.046218,38.840515],[-77.040741,38.791222],[-77.040741,38.785745],[-77.111941,38.845992],[-77.084556,38.845992]]]},"id":"51510"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.683353,38.81313],[-85.568337,38.605006],[-85.590245,38.605006],[-85.847661,38.561191],[-85.885999,38.736453],[-85.792891,38.807653],[-85.683353,38.81313]]]},"id":"18143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.388068,38.829561],[-78.284006,38.758361],[-78.338776,38.626914],[-78.448314,38.500944],[-78.453791,38.47356],[-78.459268,38.468083],[-78.486653,38.41879],[-78.640007,38.605006],[-78.388068,38.829561]]]},"id":"51139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.051224,38.769315],[-83.903347,38.769315],[-83.990978,38.594052],[-84.160763,38.555714],[-84.204579,38.583099],[-84.231963,38.829561],[-84.051224,38.769315]]]},"id":"21023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.777824,38.824084],[-88.69567,38.824084],[-88.701147,38.605006],[-88.701147,38.47356],[-88.914747,38.479037],[-89.144779,38.47356],[-89.144779,38.500944],[-89.139302,38.736453],[-88.777824,38.824084]]]},"id":"17121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.615349,38.802176],[-84.533195,38.791222],[-84.478426,38.54476],[-84.555103,38.495467],[-84.582488,38.47356],[-84.785134,38.720022],[-84.659165,38.774791],[-84.615349,38.802176]]]},"id":"21081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.274862,38.763838],[-85.885999,38.736453],[-85.847661,38.561191],[-85.995538,38.41879],[-86.011969,38.41879],[-86.033877,38.41879],[-86.198185,38.424267],[-86.252954,38.424267],[-86.307724,38.424267],[-86.307724,38.68716],[-86.274862,38.763838]]]},"id":"18175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.168967,38.774791],[-90.179921,38.659776],[-90.256598,38.533806],[-90.168967,38.774791]]]},"id":"29510"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.635447,38.769315],[-76.531385,38.714545],[-76.405416,38.320205],[-76.673786,38.500944],[-76.673786,38.533806],[-76.68474,38.747407],[-76.635447,38.769315]]]},"id":"24009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.848578,38.747407],[-83.706177,38.637868],[-83.645931,38.637868],[-83.640454,38.522852],[-83.930732,38.489991],[-83.96907,38.583099],[-83.990978,38.594052],[-83.903347,38.769315],[-83.848578,38.747407]]]},"id":"21161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.02612,38.763838],[-84.933012,38.659776],[-85.075412,38.599529],[-85.16852,38.583099],[-85.332828,38.736453],[-85.201382,38.692637],[-85.02612,38.763838]]]},"id":"21041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.813436,38.572145],[-82.665558,38.506421],[-82.818913,38.374975],[-83.16396,38.506421],[-83.032514,38.725499],[-82.813436,38.572145]]]},"id":"21089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.593888,38.74193],[-89.254318,38.74193],[-89.139302,38.736453],[-89.144779,38.500944],[-89.320041,38.511898],[-89.703427,38.41879],[-89.708904,38.654299],[-89.599365,38.74193],[-89.593888,38.74193]]]},"id":"17027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.625857,38.665253],[-79.647764,38.594052],[-79.795642,38.265436],[-79.95995,38.062789],[-80.359767,38.227097],[-80.244751,38.385929],[-79.625857,38.665253]]]},"id":"54075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.336002,38.74193],[-95.947139,38.736453],[-95.952616,38.435221],[-95.958093,38.172328],[-96.281232,38.172328],[-96.357909,38.172328],[-96.352432,38.522852],[-96.352432,38.74193],[-96.336002,38.74193]]]},"id":"20111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.458352,38.74193],[-80.392628,38.725499],[-80.277612,38.692637],[-80.244751,38.385929],[-80.359767,38.227097],[-80.414536,38.254482],[-80.436444,38.265436],[-80.650044,38.528329],[-80.458352,38.74193]]]},"id":"54101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.392605,38.736453],[-92.222819,38.643345],[-92.009219,38.572145],[-92.195435,38.336636],[-92.496666,38.429744],[-92.392605,38.736453]]]},"id":"29051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.49803,38.736453],[-95.054398,38.736453],[-95.065351,38.391406],[-95.235137,38.391406],[-95.508984,38.391406],[-95.508984,38.435221],[-95.503507,38.736453],[-95.49803,38.736453]]]},"id":"20059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.966767,38.736453],[-94.610765,38.736453],[-94.610765,38.479037],[-94.610765,38.391406],[-95.010582,38.391406],[-95.065351,38.391406],[-95.054398,38.736453],[-94.966767,38.736453]]]},"id":"20121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.425936,38.588575],[-85.332828,38.736453],[-85.16852,38.583099],[-85.316398,38.489991],[-85.431413,38.522852],[-85.425936,38.588575]]]},"id":"21223"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.557312,38.736453],[-121.486112,38.736453],[-121.141065,38.714545],[-121.026049,38.506421],[-121.026049,38.298298],[-121.097249,38.287344],[-121.57922,38.095651],[-121.628512,38.101128],[-121.864021,38.068266],[-121.590174,38.314728],[-121.601128,38.736453],[-121.557312,38.736453]]]},"id":"06067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.268022,38.61596],[-83.032514,38.725499],[-83.16396,38.506421],[-83.339222,38.320205],[-83.410422,38.396883],[-83.454238,38.380452],[-83.602115,38.506421],[-83.640454,38.522852],[-83.645931,38.637868],[-83.268022,38.61596]]]},"id":"21135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.817996,38.709068],[-84.785134,38.720022],[-84.582488,38.47356],[-84.741319,38.353067],[-84.861812,38.358544],[-84.872765,38.358544],[-85.075412,38.599529],[-84.933012,38.659776],[-84.817996,38.709068]]]},"id":"21187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.417709,38.709068],[-91.368417,38.698114],[-91.368417,38.210667],[-91.532725,38.210667],[-91.532725,38.15042],[-91.63131,38.155897],[-91.642264,38.287344],[-91.642264,38.703591],[-91.417709,38.709068]]]},"id":"29073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.585614,38.714545],[-119.328197,38.533806],[-119.158412,38.413313],[-118.429979,37.898481],[-117.832993,37.465803],[-117.937054,37.465803],[-118.775026,37.460326],[-119.021489,37.586295],[-119.267951,37.73965],[-119.640383,38.325682],[-119.585614,38.714545]]]},"id":"06051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.073061,38.698114],[-120.073061,38.511898],[-120.993187,38.227097],[-121.026049,38.298298],[-121.026049,38.506421],[-120.073061,38.703591],[-120.073061,38.698114]]]},"id":"06005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.963123,38.550237],[-90.733092,38.637868],[-90.738569,38.47356],[-90.782384,38.20519],[-91.09457,38.20519],[-91.368417,38.210667],[-91.368417,38.698114],[-90.963123,38.550237]]]},"id":"29071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.647741,38.703591],[-91.642264,38.703591],[-91.642264,38.287344],[-91.954449,38.287344],[-92.195435,38.292821],[-92.195435,38.336636],[-92.009219,38.572145],[-91.647741,38.703591]]]},"id":"29151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.046218,38.61596],[-76.673786,38.533806],[-76.673786,38.500944],[-76.706647,38.506421],[-76.832617,38.298298],[-77.128372,38.632391],[-77.084556,38.709068],[-77.046218,38.61596]]]},"id":"24017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.841291,38.703591],[-75.709844,38.637868],[-75.69889,38.561191],[-75.813906,38.489991],[-75.923445,38.265436],[-76.153476,38.632391],[-75.945353,38.676207],[-75.841291,38.703591]]]},"id":"24019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.259771,38.703591],[-101.128324,38.698114],[-101.122848,38.265436],[-101.544572,38.265436],[-101.56648,38.265436],[-101.56648,38.698114],[-101.484326,38.698114],[-101.259771,38.703591]]]},"id":"20203"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.128324,38.698114],[-100.816139,38.698114],[-100.690169,38.698114],[-100.684692,38.265436],[-100.881862,38.265436],[-101.10094,38.265436],[-101.122848,38.265436],[-101.128324,38.698114]]]},"id":"20171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.58063,38.698114],[-100.246537,38.698114],[-100.246537,38.259959],[-100.684692,38.265436],[-100.690169,38.698114],[-100.58063,38.698114]]]},"id":"20101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.56648,38.698114],[-101.56648,38.265436],[-102.042974,38.259959],[-102.042974,38.270913],[-102.042974,38.61596],[-102.042974,38.698114],[-101.56648,38.698114]]]},"id":"20071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.246537,38.698114],[-100.153429,38.698114],[-99.600258,38.698114],[-99.583827,38.698114],[-99.583827,38.34759],[-99.583827,38.259959],[-100.224629,38.259959],[-100.246537,38.259959],[-100.246537,38.698114]]]},"id":"20135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.933482,38.698114],[-77.637727,38.407836],[-77.621296,38.369498],[-77.703451,38.358544],[-77.895143,38.391406],[-78.092313,38.309252],[-78.229237,38.533806],[-77.933482,38.698114]]]},"id":"51047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.329138,38.698114],[-104.940275,38.648822],[-104.940275,38.517375],[-105.049814,38.259959],[-105.794678,38.265436],[-106.008278,38.446175],[-105.96994,38.692637],[-105.329138,38.698114]]]},"id":"08043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.04161,38.698114],[-99.030656,38.698114],[-99.030656,38.34759],[-99.359273,38.34759],[-99.583827,38.34759],[-99.583827,38.698114],[-99.04161,38.698114]]]},"id":"20165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.811579,38.698114],[-98.488439,38.698114],[-98.482962,38.522852],[-98.477485,38.259959],[-98.800625,38.259959],[-98.910164,38.259959],[-99.030656,38.34759],[-99.030656,38.698114],[-98.811579,38.698114]]]},"id":"20009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.060791,38.692637],[-92.841714,38.681683],[-92.622636,38.429744],[-92.693836,38.22162],[-93.077222,38.259959],[-93.066268,38.528329],[-93.060791,38.692637]]]},"id":"29141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.307724,38.68716],[-86.307724,38.424267],[-86.680156,38.396883],[-86.680156,38.528329],[-86.685633,38.68716],[-86.307724,38.68716]]]},"id":"18117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.69614,38.626914],[-81.69614,38.626914],[-81.915218,38.325682],[-82.046664,38.374975],[-82.057618,38.47356],[-81.772817,38.681683],[-81.69614,38.626914]]]},"id":"54079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.70566,38.676207],[-114.048427,38.676207],[-114.048427,38.572145],[-114.048427,38.15042],[-114.053904,37.602726],[-114.048427,37.000263],[-114.048427,36.841432],[-114.081288,36.841432],[-115.894156,36.841432],[-115.894156,38.051835],[-115.001414,38.051835],[-115.001414,38.676207],[-114.70566,38.676207]]]},"id":"32017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.001885,38.67073],[-107.498006,38.67073],[-107.63493,38.303775],[-107.963546,38.15042],[-109.042503,38.15042],[-109.058934,38.500944],[-108.379794,38.67073],[-108.001885,38.67073]]]},"id":"08085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.055338,38.643345],[-81.03343,38.665253],[-80.880076,38.506421],[-81.2306,38.265436],[-81.192262,38.528329],[-81.082723,38.610483],[-81.055338,38.643345]]]},"id":"54015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.179921,38.659776],[-89.708904,38.654299],[-89.703427,38.41879],[-89.703427,38.22162],[-89.900597,38.22162],[-90.207305,38.47356],[-90.262075,38.522852],[-90.256598,38.533806],[-90.179921,38.659776]]]},"id":"17163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.448314,38.500944],[-78.338776,38.626914],[-78.229237,38.533806],[-78.092313,38.309252],[-78.289483,38.270913],[-78.453791,38.47356],[-78.448314,38.500944]]]},"id":"51113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.69614,38.626914],[-81.69614,38.626914],[-81.520878,38.610483],[-81.192262,38.528329],[-81.2306,38.265436],[-81.2306,38.265436],[-81.378478,37.969681],[-81.455155,37.986112],[-81.756386,38.20519],[-81.833064,38.210667],[-81.915218,38.325682],[-81.69614,38.626914]]]},"id":"54039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.042974,38.61596],[-102.042974,38.270913],[-102.212759,38.265436],[-102.744022,38.265436],[-103.401255,38.265436],[-103.49984,38.265436],[-103.505317,38.517375],[-103.171223,38.610483],[-102.042974,38.61596]]]},"id":"08061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.924314,38.610483],[-97.371143,38.610483],[-97.371143,38.172328],[-97.69976,38.172328],[-97.924314,38.172328],[-97.924314,38.522852],[-97.924314,38.610483]]]},"id":"20113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.261605,38.610483],[-96.932988,38.610483],[-96.817972,38.522852],[-96.83988,38.084697],[-97.113727,38.084697],[-97.152066,38.090174],[-97.152066,38.172328],[-97.371143,38.172328],[-97.371143,38.610483],[-97.261605,38.610483]]]},"id":"20115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.96907,38.583099],[-83.930732,38.489991],[-83.980024,38.440698],[-84.001932,38.440698],[-84.100517,38.457129],[-84.160763,38.555714],[-83.990978,38.594052],[-83.96907,38.583099]]]},"id":"21201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.586131,38.605006],[-88.252038,38.599529],[-88.147976,38.566668],[-88.153453,38.254482],[-88.37253,38.254482],[-88.591608,38.254482],[-88.701147,38.254482],[-88.701147,38.47356],[-88.701147,38.605006],[-88.586131,38.605006]]]},"id":"17191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.590245,38.605006],[-85.568337,38.605006],[-85.425936,38.588575],[-85.431413,38.522852],[-85.639537,38.380452],[-85.792891,38.287344],[-85.995538,38.41879],[-85.847661,38.561191],[-85.590245,38.605006]]]},"id":"18019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.265742,38.599529],[-82.216449,38.594052],[-82.057618,38.47356],[-82.046664,38.374975],[-82.265742,38.227097],[-82.506727,38.413313],[-82.28765,38.583099],[-82.265742,38.599529]]]},"id":"54011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.16852,38.583099],[-85.075412,38.599529],[-84.872765,38.358544],[-84.998735,38.336636],[-85.283536,38.358544],[-85.316398,38.489991],[-85.16852,38.583099]]]},"id":"21103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.533665,38.555714],[-77.303634,38.506421],[-77.287203,38.34759],[-77.325542,38.243528],[-77.369357,38.249005],[-77.446034,38.281867],[-77.528188,38.309252],[-77.621296,38.369498],[-77.637727,38.407836],[-77.533665,38.555714]]]},"id":"51179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.647764,38.594052],[-79.313671,38.413313],[-79.510841,38.177805],[-79.795642,38.265436],[-79.647764,38.594052]]]},"id":"51091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.401749,38.561191],[-84.204579,38.583099],[-84.160763,38.555714],[-84.100517,38.457129],[-84.193625,38.369498],[-84.264825,38.325682],[-84.440087,38.281867],[-84.555103,38.495467],[-84.478426,38.54476],[-84.401749,38.561191]]]},"id":"21097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.97175,38.572145],[-112.514883,38.572145],[-112.52036,38.511898],[-112.443683,38.15042],[-112.476545,38.144943],[-112.876362,38.15042],[-114.048427,38.15042],[-114.048427,38.572145],[-113.97175,38.572145]]]},"id":"49001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.912467,38.572145],[-87.649574,38.566668],[-87.742682,38.413313],[-87.972714,38.232574],[-87.989145,38.259959],[-87.956283,38.572145],[-87.912467,38.572145]]]},"id":"17185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.005575,38.572145],[-87.956283,38.572145],[-87.989145,38.259959],[-88.005575,38.259959],[-88.153453,38.254482],[-88.147976,38.566668],[-88.005575,38.572145]]]},"id":"17047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.794701,38.561191],[-93.5099,38.555714],[-93.515377,38.511898],[-93.520854,38.20519],[-93.772794,38.20519],[-94.052118,38.216144],[-94.063071,38.446175],[-94.063071,38.566668],[-93.794701,38.561191]]]},"id":"29083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.813906,38.489991],[-75.69889,38.561191],[-75.342889,38.451652],[-75.611259,38.27639],[-75.62769,38.281867],[-75.863199,38.238051],[-75.923445,38.265436],[-75.813906,38.489991]]]},"id":"24045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.677429,38.533806],[-80.650044,38.528329],[-80.436444,38.265436],[-80.880076,38.101128],[-81.192262,38.232574],[-81.2306,38.265436],[-81.2306,38.265436],[-80.880076,38.506421],[-80.677429,38.533806]]]},"id":"54067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.074495,38.517375],[-87.074495,38.232574],[-87.310004,38.243528],[-87.315481,38.243528],[-87.463358,38.533806],[-87.244281,38.54476],[-87.074495,38.517375]]]},"id":"18125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.738051,38.539283],[-121.590174,38.314728],[-121.864021,38.068266],[-122.269314,38.062789],[-122.406238,38.15042],[-122.406238,38.155897],[-122.105006,38.511898],[-121.738051,38.539283]]]},"id":"06095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.159376,38.533806],[-93.066268,38.528329],[-93.077222,38.259959],[-93.066268,38.062789],[-93.411315,38.068266],[-93.504423,38.073743],[-93.520854,38.20519],[-93.515377,38.511898],[-93.159376,38.533806]]]},"id":"29015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.605759,38.446175],[-87.463358,38.533806],[-87.315481,38.243528],[-87.468835,38.166851],[-87.687913,38.166851],[-87.972714,38.232574],[-87.978191,38.232574],[-87.972714,38.232574],[-87.742682,38.413313],[-87.605759,38.446175]]]},"id":"18051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.680156,38.528329],[-86.680156,38.396883],[-86.680156,38.265436],[-86.789695,38.20519],[-86.866372,38.20519],[-87.019726,38.20519],[-87.074495,38.232574],[-87.074495,38.517375],[-86.926618,38.506421],[-86.680156,38.528329]]]},"id":"18037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.602115,38.506421],[-83.454238,38.380452],[-83.634977,38.188759],[-83.848578,38.298298],[-83.980024,38.440698],[-83.930732,38.489991],[-83.640454,38.522852],[-83.602115,38.506421]]]},"id":"21069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.639537,38.380452],[-85.431413,38.522852],[-85.316398,38.489991],[-85.283536,38.358544],[-85.469752,38.287344],[-85.639537,38.380452]]]},"id":"21185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.053011,38.522852],[-103.505317,38.517375],[-103.49984,38.265436],[-104.058488,38.144943],[-104.053011,38.522852]]]},"id":"08025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.017422,38.522852],[-97.924314,38.522852],[-97.924314,38.172328],[-97.929791,38.172328],[-98.472008,38.172328],[-98.477485,38.259959],[-98.482962,38.522852],[-98.017422,38.522852]]]},"id":"20159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.053011,38.522852],[-104.058488,38.144943],[-104.058488,37.734173],[-104.348765,37.816327],[-105.049814,37.914912],[-105.049814,38.259959],[-104.940275,38.517375],[-104.053011,38.522852]]]},"id":"08101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.817972,38.522852],[-96.352432,38.522852],[-96.357909,38.172328],[-96.522218,38.084697],[-96.83988,38.084697],[-96.817972,38.522852]]]},"id":"20017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.207305,38.47356],[-89.900597,38.22162],[-90.03752,38.22162],[-90.207305,38.090174],[-90.251121,38.128512],[-90.344229,38.385929],[-90.262075,38.522852],[-90.207305,38.47356]]]},"id":"17133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.320041,38.511898],[-89.144779,38.500944],[-89.144779,38.47356],[-89.144779,38.210667],[-89.593888,38.22162],[-89.703427,38.22162],[-89.703427,38.41879],[-89.320041,38.511898]]]},"id":"17189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.706647,38.506421],[-76.673786,38.500944],[-76.405416,38.320205],[-76.832617,38.298298],[-76.706647,38.506421]]]},"id":"24037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.857651,38.500944],[-111.764543,38.500944],[-111.84122,38.15042],[-112.443683,38.15042],[-112.52036,38.511898],[-111.857651,38.500944]]]},"id":"49031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.764543,38.500944],[-111.30448,38.511898],[-110.022876,38.500944],[-109.929768,38.15042],[-111.84122,38.15042],[-111.764543,38.500944]]]},"id":"49055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.073061,38.506421],[-120.018292,38.435221],[-120.045677,38.424267],[-120.653617,37.832758],[-120.927464,38.07922],[-120.993187,38.227097],[-120.073061,38.511898],[-120.073061,38.506421]]]},"id":"06009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.594358,38.424267],[-82.605312,38.249005],[-82.791528,38.243528],[-82.818913,38.374975],[-82.665558,38.506421],[-82.594358,38.424267]]]},"id":"21019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.16396,38.506421],[-82.818913,38.374975],[-82.791528,38.243528],[-82.922975,38.177805],[-83.246114,38.194236],[-83.339222,38.320205],[-83.16396,38.506421]]]},"id":"21043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.464722,38.500944],[-90.344229,38.385929],[-90.251121,38.128512],[-90.415429,38.040881],[-90.639984,38.07922],[-90.782384,38.20519],[-90.738569,38.47356],[-90.464722,38.500944]]]},"id":"29099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.022876,38.500944],[-109.058934,38.500944],[-109.042503,38.15042],[-109.042503,37.88205],[-109.042503,37.482234],[-109.042503,37.000263],[-110.000968,37.000263],[-110.751309,37.00574],[-111.414018,37.000263],[-110.647247,37.54248],[-109.929768,38.15042],[-110.022876,38.500944]]]},"id":"49037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.555103,38.495467],[-84.440087,38.281867],[-84.401749,38.20519],[-84.626303,38.117559],[-84.724888,38.194236],[-84.741319,38.353067],[-84.582488,38.47356],[-84.555103,38.495467]]]},"id":"21209"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.313671,38.413313],[-79.22604,38.479037],[-78.749546,38.20519],[-78.837177,38.046358],[-78.859085,38.029928],[-79.15484,37.893004],[-79.483456,38.084697],[-79.510841,38.177805],[-79.313671,38.413313]]]},"id":"51015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.610765,38.479037],[-94.063071,38.446175],[-94.052118,38.216144],[-94.057594,38.035405],[-94.501227,38.057312],[-94.616242,38.062789],[-94.610765,38.391406],[-94.610765,38.479037],[-94.610765,38.479037]]]},"id":"29013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.914747,38.479037],[-88.701147,38.47356],[-88.701147,38.254482],[-88.706624,38.123036],[-88.816163,38.128512],[-89.128348,38.123036],[-89.144779,38.210667],[-89.144779,38.47356],[-88.914747,38.479037]]]},"id":"17081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.459268,38.468083],[-78.453791,38.47356],[-78.289483,38.270913],[-78.371637,38.183282],[-78.661915,38.27639],[-78.486653,38.41879],[-78.459268,38.468083]]]},"id":"51079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.690592,38.47356],[-117.164806,38.002543],[-117.164806,36.972878],[-117.832993,37.465803],[-118.429979,37.898481],[-117.690592,38.47356]]]},"id":"32009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.001932,38.440698],[-83.980024,38.440698],[-83.848578,38.298298],[-83.980024,38.194236],[-84.193625,38.369498],[-84.100517,38.457129],[-84.001932,38.440698]]]},"id":"21181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.008278,38.446175],[-105.794678,38.265436],[-105.471538,37.898481],[-105.455107,37.750604],[-105.707047,37.750604],[-106.04114,37.750604],[-106.692896,37.832758],[-106.999605,37.958727],[-106.999605,38.144943],[-106.999605,38.424267],[-106.249264,38.424267],[-106.008278,38.446175]]]},"id":"08109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.342889,38.451652],[-75.047134,38.451652],[-75.244304,38.029928],[-75.397659,38.013497],[-75.622213,37.991589],[-75.611259,38.27639],[-75.342889,38.451652]]]},"id":"24047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.656861,38.435221],[-95.508984,38.435221],[-95.508984,38.391406],[-95.519938,38.040881],[-95.810215,38.040881],[-95.958093,38.040881],[-95.958093,38.172328],[-95.952616,38.435221],[-95.656861,38.435221]]]},"id":"20031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.045677,38.424267],[-120.018292,38.435221],[-119.640383,38.325682],[-119.267951,37.73965],[-119.30629,37.777988],[-120.084015,37.827281],[-120.385247,37.635588],[-120.653617,37.832758],[-120.045677,38.424267]]]},"id":"06109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.611682,38.429744],[-92.496666,38.429744],[-92.195435,38.336636],[-92.195435,38.292821],[-92.184481,38.018974],[-92.359743,38.018974],[-92.403558,38.018974],[-92.693836,38.22162],[-92.622636,38.429744],[-92.611682,38.429744]]]},"id":"29131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.307724,38.424267],[-86.252954,38.424267],[-86.307724,38.166851],[-86.461078,38.117559],[-86.570617,38.265436],[-86.680156,38.265436],[-86.680156,38.396883],[-86.307724,38.424267]]]},"id":"18025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.198185,38.424267],[-86.033877,38.41879],[-85.90243,38.177805],[-85.946246,38.00802],[-86.001015,37.997066],[-86.307724,38.166851],[-86.252954,38.424267],[-86.198185,38.424267]]]},"id":"18061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.561497,38.40236],[-82.506727,38.413313],[-82.265742,38.227097],[-82.30408,37.942297],[-82.413619,37.854665],[-82.495773,37.947773],[-82.605312,38.249005],[-82.594358,38.424267],[-82.561497,38.40236]]]},"id":"54099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.011969,38.41879],[-85.995538,38.41879],[-85.792891,38.287344],[-85.90243,38.177805],[-86.033877,38.41879],[-86.011969,38.41879]]]},"id":"18043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.996925,38.27639],[-77.062649,38.161374],[-77.117418,38.15042],[-77.325542,38.243528],[-77.287203,38.34759],[-76.996925,38.27639]]]},"id":"51099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.410422,38.396883],[-83.339222,38.320205],[-83.246114,38.194236],[-83.262545,38.117559],[-83.355653,38.068266],[-83.43233,38.035405],[-83.498053,38.051835],[-83.634977,38.188759],[-83.454238,38.380452],[-83.410422,38.396883]]]},"id":"21205"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.895143,38.391406],[-77.703451,38.358544],[-77.95539,38.117559],[-78.207329,38.133989],[-78.371637,38.183282],[-78.289483,38.270913],[-78.092313,38.309252],[-77.895143,38.391406]]]},"id":"51137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.235137,38.391406],[-95.065351,38.391406],[-95.076305,38.035405],[-95.465168,38.040881],[-95.519938,38.040881],[-95.508984,38.391406],[-95.235137,38.391406]]]},"id":"20003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.010582,38.391406],[-94.610765,38.391406],[-94.616242,38.062789],[-94.616242,38.035405],[-94.933905,38.035405],[-95.076305,38.035405],[-95.065351,38.391406],[-95.010582,38.391406]]]},"id":"20107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.639537,38.380452],[-85.469752,38.287344],[-85.425936,38.144943],[-85.431413,38.117559],[-85.699783,38.084697],[-85.940769,37.997066],[-85.946246,38.00802],[-85.90243,38.177805],[-85.792891,38.287344],[-85.639537,38.380452]]]},"id":"21111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.621296,38.369498],[-77.528188,38.309252],[-77.446034,38.281867],[-77.369357,38.249005],[-77.643204,37.991589],[-77.68702,38.00802],[-77.95539,38.117559],[-77.703451,38.358544],[-77.621296,38.369498]]]},"id":"51177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.046664,38.374975],[-81.915218,38.325682],[-81.833064,38.210667],[-81.931648,38.024451],[-82.189065,37.975158],[-82.30408,37.942297],[-82.265742,38.227097],[-82.046664,38.374975]]]},"id":"54043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.861812,38.358544],[-84.741319,38.353067],[-84.724888,38.194236],[-84.867289,38.117559],[-84.998735,38.128512],[-85.02612,38.128512],[-84.998735,38.336636],[-84.872765,38.358544],[-84.861812,38.358544]]]},"id":"21073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.264825,38.325682],[-84.193625,38.369498],[-83.980024,38.194236],[-84.040271,38.144943],[-84.078609,38.117559],[-84.286733,38.068266],[-84.401749,38.20519],[-84.440087,38.281867],[-84.264825,38.325682]]]},"id":"21017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.283536,38.358544],[-84.998735,38.336636],[-85.02612,38.128512],[-85.102797,38.035405],[-85.425936,38.144943],[-85.469752,38.287344],[-85.283536,38.358544]]]},"id":"21211"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.359273,38.34759],[-99.030656,38.34759],[-98.910164,38.259959],[-99.019702,38.002543],[-99.348319,38.002543],[-99.567396,38.084697],[-99.57835,38.259959],[-99.583827,38.259959],[-99.583827,38.34759],[-99.359273,38.34759]]]},"id":"20145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.63493,38.303775],[-107.569206,38.144943],[-107.569206,37.964204],[-107.738991,37.903958],[-107.963546,38.15042],[-107.63493,38.303775]]]},"id":"08091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.844393,38.27639],[-122.488392,38.112082],[-122.504823,37.821804],[-123.014178,38.002543],[-123.003224,38.298298],[-122.844393,38.27639]]]},"id":"06041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.848578,38.298298],[-83.634977,38.188759],[-83.498053,38.051835],[-83.760947,37.997066],[-83.980024,38.194236],[-83.848578,38.298298]]]},"id":"21011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.62769,38.281867],[-75.611259,38.27639],[-75.622213,37.991589],[-75.671506,37.95325],[-75.863199,38.238051],[-75.62769,38.281867]]]},"id":"24039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.097249,38.287344],[-121.026049,38.298298],[-120.993187,38.227097],[-120.927464,38.07922],[-120.921987,37.805373],[-121.469681,37.482234],[-121.557312,37.821804],[-121.57922,38.095651],[-121.097249,38.287344]]]},"id":"06077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.954449,38.287344],[-91.642264,38.287344],[-91.63131,38.155897],[-92.020173,38.00802],[-92.184481,38.018974],[-92.195435,38.292821],[-91.954449,38.287344]]]},"id":"29125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.520431,38.035405],[-76.635447,37.964204],[-76.914771,38.095651],[-76.936679,38.07922],[-77.062649,38.161374],[-76.996925,38.27639],[-76.520431,38.035405]]]},"id":"51193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.371637,38.183282],[-78.207329,38.133989],[-78.305914,38.00802],[-78.49213,37.794419],[-78.645484,37.734173],[-78.837177,38.046358],[-78.749546,38.20519],[-78.661915,38.27639],[-78.371637,38.183282]]]},"id":"51003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.077222,38.259959],[-92.693836,38.22162],[-92.403558,38.018974],[-92.409035,37.860142],[-92.852668,37.893004],[-93.071745,37.903958],[-93.066268,38.062789],[-93.077222,38.259959]]]},"id":"29029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.212759,38.265436],[-102.042974,38.270913],[-102.042974,38.259959],[-102.042974,37.73965],[-102.042974,37.646542],[-102.749499,37.641065],[-102.744022,38.265436],[-102.212759,38.265436]]]},"id":"08099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.744022,38.265436],[-102.749499,37.641065],[-103.078115,37.641065],[-103.406732,37.641065],[-103.401255,38.265436],[-102.744022,38.265436]]]},"id":"08011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.791528,38.243528],[-82.605312,38.249005],[-82.495773,37.947773],[-82.610789,37.876573],[-82.851774,37.975158],[-82.988698,37.964204],[-83.02156,38.00802],[-82.922975,38.177805],[-82.791528,38.243528]]]},"id":"21127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.414536,38.254482],[-80.359767,38.227097],[-79.95995,38.062789],[-80.058535,37.95325],[-80.294043,37.690357],[-80.660998,37.734173],[-80.808876,37.871096],[-80.880076,38.101128],[-80.436444,38.265436],[-80.414536,38.254482]]]},"id":"54025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.922975,38.177805],[-83.02156,38.00802],[-83.262545,38.117559],[-83.246114,38.194236],[-82.922975,38.177805]]]},"id":"21063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.570617,38.265436],[-86.461078,38.117559],[-86.488463,38.046358],[-86.652771,37.843712],[-86.811602,37.997066],[-86.789695,38.20519],[-86.680156,38.265436],[-86.570617,38.265436]]]},"id":"18123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.795642,38.265436],[-79.510841,38.177805],[-79.483456,38.084697],[-79.653241,37.871096],[-79.998289,37.958727],[-80.058535,37.95325],[-79.95995,38.062789],[-79.795642,38.265436]]]},"id":"51017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.401255,38.265436],[-103.406732,37.641065],[-104.058488,37.734173],[-104.058488,38.144943],[-103.49984,38.265436],[-103.401255,38.265436]]]},"id":"08089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.881862,38.265436],[-100.684692,38.265436],[-100.246537,38.259959],[-100.224629,38.259959],[-100.224629,38.002543],[-100.651831,37.734173],[-101.089986,37.734173],[-101.10094,38.265436],[-100.881862,38.265436]]]},"id":"20055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.794678,38.265436],[-105.049814,38.259959],[-105.049814,37.914912],[-105.186737,38.00802],[-105.471538,37.898481],[-105.794678,38.265436]]]},"id":"08027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.122848,38.265436],[-101.10094,38.265436],[-101.089986,37.734173],[-101.17214,37.734173],[-101.528141,37.734173],[-101.544572,38.265436],[-101.122848,38.265436]]]},"id":"20093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.192262,38.232574],[-80.880076,38.101128],[-80.808876,37.871096],[-80.945799,37.821804],[-81.378478,37.969681],[-81.2306,38.265436],[-81.192262,38.232574]]]},"id":"54019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.56648,38.265436],[-101.544572,38.265436],[-101.528141,37.734173],[-102.042974,37.73965],[-102.042974,38.259959],[-101.56648,38.265436]]]},"id":"20075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.57835,38.259959],[-99.567396,38.084697],[-99.567396,37.914912],[-99.874105,37.914912],[-100.224629,37.914912],[-100.224629,38.002543],[-100.224629,38.259959],[-99.583827,38.259959],[-99.57835,38.259959]]]},"id":"20083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.800625,38.259959],[-98.477485,38.259959],[-98.472008,38.172328],[-98.472008,37.827281],[-98.904687,37.827281],[-99.014225,37.827281],[-99.019702,38.002543],[-98.910164,38.259959],[-98.800625,38.259959]]]},"id":"20185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.005575,38.259959],[-87.989145,38.259959],[-87.972714,38.232574],[-87.978191,38.232574],[-88.054868,37.88205],[-88.137022,37.909435],[-88.37253,37.909435],[-88.37253,38.254482],[-88.153453,38.254482],[-88.005575,38.259959]]]},"id":"17193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.591608,38.254482],[-88.37253,38.254482],[-88.37253,37.909435],[-88.37253,37.909435],[-88.4273,37.909435],[-88.706624,37.909435],[-88.706624,38.123036],[-88.701147,38.254482],[-88.591608,38.254482]]]},"id":"17065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.325542,38.243528],[-77.117418,38.15042],[-77.068125,37.964204],[-77.073602,37.964204],[-77.183141,37.893004],[-77.347449,37.788942],[-77.643204,37.991589],[-77.369357,38.249005],[-77.325542,38.243528]]]},"id":"51033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.310004,38.243528],[-87.074495,38.232574],[-87.019726,38.20519],[-87.266188,37.876573],[-87.304527,37.898481],[-87.452404,37.942297],[-87.468835,38.166851],[-87.315481,38.243528],[-87.310004,38.243528]]]},"id":"18173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.756386,38.20519],[-81.455155,37.986112],[-81.564693,37.931343],[-81.515401,37.788942],[-81.608509,37.788942],[-81.931648,38.024451],[-81.833064,38.210667],[-81.756386,38.20519]]]},"id":"54005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.972714,38.232574],[-87.687913,38.166851],[-87.698867,37.898481],[-87.928898,37.903958],[-88.027483,37.799896],[-88.054868,37.88205],[-87.978191,38.232574],[-87.972714,38.232574]]]},"id":"18129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.03752,38.22162],[-89.900597,38.22162],[-89.703427,38.22162],[-89.593888,38.22162],[-89.593888,37.95325],[-89.676042,37.805373],[-89.938935,37.876573],[-90.207305,38.090174],[-90.03752,38.22162]]]},"id":"17157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.772794,38.20519],[-93.520854,38.20519],[-93.504423,38.073743],[-93.575624,37.827281],[-93.630393,37.827281],[-94.063071,37.898481],[-94.057594,38.035405],[-94.052118,38.216144],[-93.772794,38.20519]]]},"id":"29185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.593888,38.22162],[-89.144779,38.210667],[-89.128348,38.123036],[-89.177641,37.947773],[-89.566503,37.95325],[-89.593888,37.95325],[-89.593888,38.22162]]]},"id":"17145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.532725,38.210667],[-91.368417,38.210667],[-91.09457,38.20519],[-91.100047,37.73965],[-91.154816,37.695834],[-91.527248,37.788942],[-91.532725,38.15042],[-91.532725,38.210667]]]},"id":"29055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.401749,38.20519],[-84.286733,38.068266],[-84.336025,37.893004],[-84.43461,37.849189],[-84.659165,38.002543],[-84.626303,38.117559],[-84.401749,38.20519]]]},"id":"21067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.09457,38.20519],[-90.782384,38.20519],[-90.639984,38.07922],[-90.645461,37.734173],[-91.100047,37.73965],[-91.09457,38.20519]]]},"id":"29221"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.866372,38.20519],[-86.789695,38.20519],[-86.811602,37.997066],[-86.981388,37.931343],[-87.266188,37.876573],[-87.019726,38.20519],[-86.866372,38.20519]]]},"id":"18147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.867289,38.117559],[-84.724888,38.194236],[-84.626303,38.117559],[-84.659165,38.002543],[-84.708457,37.860142],[-84.796088,37.969681],[-84.867289,38.117559]]]},"id":"21239"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.040271,38.144943],[-83.980024,38.194236],[-83.760947,37.997066],[-83.766424,37.920389],[-83.96907,37.931343],[-84.078609,38.117559],[-84.040271,38.144943]]]},"id":"21173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.152066,38.172328],[-97.152066,38.090174],[-97.152066,37.914912],[-97.157543,37.914912],[-97.69976,37.914912],[-97.69976,38.172328],[-97.371143,38.172328],[-97.152066,38.172328]]]},"id":"20079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.929791,38.172328],[-97.924314,38.172328],[-97.69976,38.172328],[-97.69976,37.914912],[-97.809299,37.734173],[-97.918837,37.734173],[-98.466531,37.734173],[-98.472008,37.827281],[-98.472008,38.172328],[-97.929791,38.172328]]]},"id":"20155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.281232,38.172328],[-95.958093,38.172328],[-95.958093,38.040881],[-95.96357,37.734173],[-95.96357,37.602726],[-96.308617,37.608203],[-96.527695,37.608203],[-96.522218,38.084697],[-96.357909,38.172328],[-96.281232,38.172328]]]},"id":"20073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.687913,38.166851],[-87.468835,38.166851],[-87.452404,37.942297],[-87.698867,37.898481],[-87.687913,38.166851]]]},"id":"18163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.307724,38.166851],[-86.001015,37.997066],[-86.148893,37.799896],[-86.488463,38.046358],[-86.461078,38.117559],[-86.307724,38.166851]]]},"id":"21163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.062649,38.161374],[-76.936679,38.07922],[-76.777848,37.876573],[-76.68474,37.772511],[-76.750463,37.728696],[-77.068125,37.964204],[-77.117418,38.15042],[-77.062649,38.161374]]]},"id":"51057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.042503,38.15042],[-107.963546,38.15042],[-107.738991,37.903958],[-107.859484,37.777988],[-109.042503,37.88205],[-109.042503,38.15042]]]},"id":"08113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.84122,38.15042],[-109.929768,38.15042],[-110.647247,37.54248],[-112.684669,37.54248],[-112.476545,38.144943],[-112.443683,38.15042],[-111.84122,38.15042]]]},"id":"49017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.63131,38.155897],[-91.532725,38.15042],[-91.527248,37.788942],[-91.806572,37.597249],[-92.031127,37.602726],[-92.020173,38.00802],[-91.63131,38.155897]]]},"id":"29161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.95539,38.117559],[-77.68702,38.00802],[-77.796559,37.728696],[-78.064929,37.903958],[-78.305914,38.00802],[-78.207329,38.133989],[-77.95539,38.117559]]]},"id":"51109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.876362,38.15042],[-112.476545,38.144943],[-112.684669,37.54248],[-112.903746,37.498664],[-112.898269,37.498664],[-114.053904,37.602726],[-114.048427,38.15042],[-112.876362,38.15042]]]},"id":"49021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.425936,38.144943],[-85.102797,38.035405],[-85.16852,37.969681],[-85.49166,37.991589],[-85.431413,38.117559],[-85.425936,38.144943]]]},"id":"21215"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.999605,38.144943],[-106.999605,37.958727],[-107.103666,37.95325],[-107.131051,37.421987],[-107.481575,37.421987],[-107.481575,37.641065],[-107.569206,37.964204],[-107.569206,38.144943],[-106.999605,38.144943]]]},"id":"08053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.998735,38.128512],[-84.867289,38.117559],[-84.796088,37.969681],[-85.031597,37.893004],[-85.152089,37.898481],[-85.16852,37.969681],[-85.102797,38.035405],[-85.02612,38.128512],[-84.998735,38.128512]]]},"id":"21005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.251121,38.128512],[-90.207305,38.090174],[-89.938935,37.876573],[-90.10872,37.673926],[-90.415429,38.040881],[-90.251121,38.128512]]]},"id":"29186"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.816163,38.128512],[-88.706624,38.123036],[-88.706624,37.909435],[-88.706624,37.865619],[-88.728531,37.865619],[-89.150256,37.860142],[-89.177641,37.947773],[-89.128348,38.123036],[-88.816163,38.128512]]]},"id":"17055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.914771,38.095651],[-76.635447,37.964204],[-76.509478,37.838235],[-76.640924,37.794419],[-76.777848,37.876573],[-76.936679,38.07922],[-76.914771,38.095651]]]},"id":"51159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.699783,38.084697],[-85.431413,38.117559],[-85.49166,37.991589],[-85.497137,37.986112],[-85.738122,37.81085],[-85.940769,37.997066],[-85.699783,38.084697]]]},"id":"21029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.355653,38.068266],[-83.262545,38.117559],[-83.02156,38.00802],[-82.988698,37.964204],[-83.005129,37.860142],[-83.262545,37.712265],[-83.492576,37.860142],[-83.43233,38.035405],[-83.355653,38.068266]]]},"id":"21175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.078609,38.117559],[-83.96907,37.931343],[-83.990978,37.914912],[-84.001932,37.838235],[-84.078609,37.854665],[-84.270302,37.914912],[-84.336025,37.893004],[-84.286733,38.068266],[-84.078609,38.117559]]]},"id":"21049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.628512,38.101128],[-121.57922,38.095651],[-121.557312,37.821804],[-122.269314,37.903958],[-122.31313,37.898481],[-122.269314,38.062789],[-121.864021,38.068266],[-121.628512,38.101128]]]},"id":"06013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.348319,38.002543],[-99.019702,38.002543],[-99.014225,37.827281],[-99.014225,37.734173],[-99.56192,37.734173],[-99.567396,37.914912],[-99.567396,38.084697],[-99.348319,38.002543]]]},"id":"20047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.113727,38.084697],[-96.83988,38.084697],[-96.522218,38.084697],[-96.527695,37.608203],[-96.527695,37.476757],[-97.080866,37.476757],[-97.152066,37.476757],[-97.152066,37.914912],[-97.152066,38.090174],[-97.113727,38.084697]]]},"id":"20015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.483456,38.084697],[-79.15484,37.893004],[-79.171271,37.805373],[-79.439641,37.619157],[-79.499887,37.531526],[-79.675149,37.761557],[-79.653241,37.871096],[-79.483456,38.084697]]]},"id":"51163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.921987,37.805373],[-120.927464,38.07922],[-120.653617,37.832758],[-120.385247,37.635588],[-120.385247,37.635588],[-121.228696,37.137186],[-121.475158,37.482234],[-121.469681,37.482234],[-120.921987,37.805373]]]},"id":"06099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.639984,38.07922],[-90.415429,38.040881],[-90.10872,37.673926],[-90.147059,37.641065],[-90.535922,37.641065],[-90.645461,37.734173],[-90.639984,38.07922]]]},"id":"29187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.411315,38.068266],[-93.066268,38.062789],[-93.071745,37.903958],[-93.126515,37.903958],[-93.186761,37.805373],[-93.575624,37.827281],[-93.504423,38.073743],[-93.411315,38.068266]]]},"id":"29085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.501227,38.057312],[-94.057594,38.035405],[-94.063071,37.898481],[-94.074025,37.641065],[-94.490273,37.652019],[-94.616242,37.652019],[-94.616242,37.673926],[-94.616242,38.035405],[-94.616242,38.062789],[-94.501227,38.057312]]]},"id":"29217"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.498053,38.051835],[-83.43233,38.035405],[-83.492576,37.860142],[-83.607592,37.827281],[-83.6295,37.827281],[-83.766424,37.920389],[-83.760947,37.997066],[-83.498053,38.051835]]]},"id":"21165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.859085,38.029928],[-78.837177,38.046358],[-78.645484,37.734173],[-78.826223,37.553434],[-78.870039,37.54248],[-79.171271,37.805373],[-79.15484,37.893004],[-78.859085,38.029928]]]},"id":"51125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.652771,37.843712],[-86.488463,38.046358],[-86.148893,37.799896],[-86.274862,37.591772],[-86.472032,37.602726],[-86.592525,37.564388],[-86.63634,37.662973],[-86.652771,37.843712]]]},"id":"21027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.810215,38.040881],[-95.519938,38.040881],[-95.525414,37.734173],[-95.919754,37.734173],[-95.96357,37.734173],[-95.958093,38.040881],[-95.810215,38.040881]]]},"id":"20207"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.994645,37.95325],[-76.016553,37.95325],[-76.043938,37.95325],[-75.994645,37.95325]]]},"id":"24039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.465168,38.040881],[-95.076305,38.035405],[-95.087259,37.734173],[-95.399445,37.734173],[-95.525414,37.734173],[-95.519938,38.040881],[-95.465168,38.040881]]]},"id":"20001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.933905,38.035405],[-94.616242,38.035405],[-94.616242,37.673926],[-94.884612,37.673926],[-95.087259,37.673926],[-95.087259,37.734173],[-95.076305,38.035405],[-94.933905,38.035405]]]},"id":"20011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.317785,37.679403],[-76.48757,37.838235],[-76.509478,37.838235],[-76.635447,37.964204],[-76.520431,38.035405],[-76.317785,37.679403]]]},"id":"51133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.397659,38.013497],[-75.244304,38.029928],[-75.666029,37.465803],[-75.939876,37.547957],[-75.671506,37.95325],[-75.622213,37.991589],[-75.397659,38.013497]]]},"id":"51001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.931648,38.024451],[-81.608509,37.788942],[-81.800202,37.662973],[-82.189065,37.975158],[-81.931648,38.024451]]]},"id":"54045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.359743,38.018974],[-92.184481,38.018974],[-92.020173,38.00802],[-92.031127,37.602726],[-92.250204,37.602726],[-92.409035,37.860142],[-92.403558,38.018974],[-92.359743,38.018974]]]},"id":"29169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.186737,38.00802],[-105.049814,37.914912],[-104.348765,37.816327],[-105.153876,37.290541],[-105.23603,37.624634],[-105.487969,37.575342],[-105.455107,37.750604],[-105.471538,37.898481],[-105.186737,38.00802]]]},"id":"08055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.68702,38.00802],[-77.643204,37.991589],[-77.347449,37.788942],[-77.122895,37.624634],[-77.226957,37.537003],[-77.63225,37.706788],[-77.796559,37.728696],[-77.68702,38.00802]]]},"id":"51085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.946246,38.00802],[-85.940769,37.997066],[-85.738122,37.81085],[-85.677876,37.734173],[-85.891476,37.438418],[-86.017446,37.449372],[-86.044831,37.449372],[-86.274862,37.591772],[-86.148893,37.799896],[-86.001015,37.997066],[-85.946246,38.00802]]]},"id":"21093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.305914,38.00802],[-78.064929,37.903958],[-78.158037,37.750604],[-78.163514,37.750604],[-78.240191,37.690357],[-78.49213,37.794419],[-78.305914,38.00802]]]},"id":"51065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.659165,38.002543],[-84.43461,37.849189],[-84.527718,37.767034],[-84.648211,37.81085],[-84.713934,37.816327],[-84.708457,37.860142],[-84.659165,38.002543]]]},"id":"21113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.224629,38.002543],[-100.224629,37.914912],[-100.213675,37.476757],[-100.651831,37.476757],[-100.651831,37.734173],[-100.224629,38.002543]]]},"id":"20069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.851774,37.975158],[-82.610789,37.876573],[-82.638174,37.717742],[-82.786051,37.745127],[-82.939406,37.717742],[-83.005129,37.860142],[-82.988698,37.964204],[-82.851774,37.975158]]]},"id":"21115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.811602,37.997066],[-86.652771,37.843712],[-86.63634,37.662973],[-86.822556,37.73965],[-86.981388,37.931343],[-86.811602,37.997066]]]},"id":"21091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.497137,37.986112],[-85.49166,37.991589],[-85.16852,37.969681],[-85.152089,37.898481],[-85.404029,37.728696],[-85.519044,37.553434],[-85.677876,37.734173],[-85.738122,37.81085],[-85.497137,37.986112]]]},"id":"21179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.564693,37.931343],[-81.455155,37.986112],[-81.378478,37.969681],[-80.945799,37.821804],[-81.093677,37.586295],[-81.126538,37.591772],[-81.219646,37.509618],[-81.515401,37.788942],[-81.564693,37.931343]]]},"id":"54081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.698867,37.898481],[-87.452404,37.942297],[-87.304527,37.898481],[-87.408589,37.68488],[-87.49622,37.646542],[-87.731728,37.635588],[-87.928898,37.903958],[-87.698867,37.898481]]]},"id":"21101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.103666,37.95325],[-106.999605,37.958727],[-106.692896,37.832758],[-106.709327,37.405556],[-107.131051,37.421987],[-107.103666,37.95325]]]},"id":"08079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.30408,37.942297],[-82.189065,37.975158],[-81.800202,37.662973],[-81.854971,37.547957],[-81.926172,37.509618],[-81.969987,37.537003],[-82.145249,37.569865],[-82.331465,37.73965],[-82.413619,37.854665],[-82.30408,37.942297]]]},"id":"54059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.073602,37.964204],[-77.068125,37.964204],[-76.750463,37.728696],[-76.651878,37.602726],[-76.712124,37.432941],[-76.739509,37.465803],[-76.794278,37.515095],[-77.177664,37.893004],[-77.183141,37.893004],[-77.073602,37.964204]]]},"id":"51097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.796088,37.969681],[-84.708457,37.860142],[-84.713934,37.816327],[-84.746796,37.712265],[-84.856335,37.695834],[-85.02612,37.679403],[-85.031597,37.893004],[-84.796088,37.969681]]]},"id":"21167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.569206,37.964204],[-107.481575,37.641065],[-107.804715,37.641065],[-107.9745,37.641065],[-107.859484,37.777988],[-107.738991,37.903958],[-107.569206,37.964204]]]},"id":"08111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.413619,37.854665],[-82.331465,37.73965],[-82.561497,37.68488],[-82.638174,37.717742],[-82.610789,37.876573],[-82.495773,37.947773],[-82.413619,37.854665]]]},"id":"21159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.998289,37.958727],[-79.653241,37.871096],[-79.675149,37.761557],[-79.790165,37.794419],[-80.020196,37.646542],[-80.222843,37.630111],[-80.294043,37.690357],[-80.058535,37.95325],[-79.998289,37.958727]]]},"id":"51005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.566503,37.95325],[-89.177641,37.947773],[-89.150256,37.860142],[-89.155733,37.602726],[-89.522688,37.569865],[-89.676042,37.805373],[-89.593888,37.95325],[-89.566503,37.95325]]]},"id":"17077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.016553,37.95325],[-75.994645,37.95325],[-76.043938,37.95325],[-76.016553,37.95325]]]},"id":"51001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.990978,37.914912],[-83.96907,37.931343],[-83.766424,37.920389],[-83.6295,37.827281],[-83.706177,37.717742],[-83.722608,37.717742],[-84.001932,37.838235],[-83.990978,37.914912]]]},"id":"21197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.266188,37.876573],[-86.981388,37.931343],[-86.822556,37.73965],[-87.036157,37.558911],[-87.408589,37.68488],[-87.304527,37.898481],[-87.266188,37.876573]]]},"id":"21059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.270302,37.914912],[-84.078609,37.854665],[-84.089563,37.564388],[-84.199102,37.520572],[-84.231963,37.520572],[-84.346979,37.537003],[-84.527718,37.767034],[-84.43461,37.849189],[-84.336025,37.893004],[-84.270302,37.914912]]]},"id":"21151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.152089,37.898481],[-85.031597,37.893004],[-85.02612,37.679403],[-85.031597,37.630111],[-85.404029,37.728696],[-85.152089,37.898481]]]},"id":"21229"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.137022,37.909435],[-88.054868,37.88205],[-88.027483,37.799896],[-88.131545,37.575342],[-88.378007,37.597249],[-88.37253,37.909435],[-88.37253,37.909435],[-88.137022,37.909435]]]},"id":"17059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.874105,37.914912],[-99.567396,37.914912],[-99.56192,37.734173],[-99.556443,37.465803],[-100.054844,37.47128],[-100.109614,37.476757],[-100.213675,37.476757],[-100.224629,37.914912],[-99.874105,37.914912]]]},"id":"20057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.157543,37.914912],[-97.152066,37.914912],[-97.152066,37.476757],[-97.349236,37.476757],[-97.809299,37.476757],[-97.809299,37.734173],[-97.69976,37.914912],[-97.157543,37.914912]]]},"id":"20173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.177664,37.893004],[-76.794278,37.515095],[-77.122895,37.624634],[-77.347449,37.788942],[-77.183141,37.893004],[-77.177664,37.893004]]]},"id":"51101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.4273,37.909435],[-88.37253,37.909435],[-88.378007,37.597249],[-88.410869,37.597249],[-88.706624,37.597249],[-88.706624,37.865619],[-88.706624,37.909435],[-88.4273,37.909435]]]},"id":"17165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.938935,37.876573],[-89.676042,37.805373],[-89.522688,37.569865],[-89.522688,37.564388],[-89.796535,37.602726],[-89.862258,37.597249],[-90.147059,37.597249],[-90.147059,37.641065],[-90.10872,37.673926],[-89.938935,37.876573]]]},"id":"29157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.064929,37.903958],[-77.796559,37.728696],[-77.63225,37.706788],[-77.654158,37.564388],[-78.015636,37.641065],[-78.070406,37.657496],[-78.158037,37.750604],[-78.064929,37.903958]]]},"id":"51075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.269314,37.903958],[-121.557312,37.821804],[-121.469681,37.482234],[-121.475158,37.482234],[-121.853067,37.482234],[-122.083098,37.476757],[-122.11596,37.504141],[-122.31313,37.898481],[-122.269314,37.903958]]]},"id":"06001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.126515,37.903958],[-93.071745,37.903958],[-92.852668,37.893004],[-92.852668,37.482234],[-93.071745,37.48771],[-93.071745,37.41651],[-93.181284,37.41651],[-93.186761,37.805373],[-93.126515,37.903958]]]},"id":"29059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.084015,37.827281],[-119.30629,37.777988],[-120.051153,37.181002],[-120.385247,37.635588],[-120.385247,37.635588],[-120.084015,37.827281]]]},"id":"06043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.027483,37.799896],[-87.928898,37.903958],[-87.731728,37.635588],[-87.934375,37.482234],[-88.060345,37.504141],[-88.131545,37.575342],[-88.027483,37.799896]]]},"id":"21225"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.063071,37.898481],[-93.630393,37.827281],[-93.613962,37.575342],[-94.074025,37.580818],[-94.074025,37.641065],[-94.063071,37.898481]]]},"id":"29039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.852668,37.893004],[-92.409035,37.860142],[-92.250204,37.602726],[-92.250204,37.47128],[-92.688359,37.482234],[-92.852668,37.482234],[-92.852668,37.893004]]]},"id":"29105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.042503,37.88205],[-107.859484,37.777988],[-107.9745,37.641065],[-109.042503,37.482234],[-109.042503,37.88205]]]},"id":"08033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.005129,37.860142],[-82.939406,37.717742],[-82.922975,37.48771],[-82.944882,37.498664],[-82.950359,37.504141],[-83.246114,37.668449],[-83.262545,37.712265],[-83.005129,37.860142]]]},"id":"21153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.808876,37.871096],[-80.660998,37.734173],[-80.858168,37.427464],[-80.858168,37.427464],[-81.093677,37.586295],[-80.945799,37.821804],[-80.808876,37.871096]]]},"id":"54089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.728531,37.865619],[-88.706624,37.865619],[-88.706624,37.597249],[-88.876409,37.597249],[-89.040717,37.597249],[-89.155733,37.602726],[-89.150256,37.860142],[-88.728531,37.865619]]]},"id":"17199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.607592,37.827281],[-83.492576,37.860142],[-83.262545,37.712265],[-83.246114,37.668449],[-83.377561,37.695834],[-83.519961,37.641065],[-83.706177,37.717742],[-83.6295,37.827281],[-83.607592,37.827281]]]},"id":"21237"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.078609,37.854665],[-84.001932,37.838235],[-83.722608,37.717742],[-83.903347,37.54248],[-83.963593,37.580818],[-84.089563,37.564388],[-84.078609,37.854665]]]},"id":"21065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.48757,37.838235],[-76.317785,37.679403],[-76.640924,37.794419],[-76.509478,37.838235],[-76.48757,37.838235]]]},"id":"51103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.692896,37.832758],[-106.04114,37.750604],[-106.04114,37.400079],[-106.523111,37.400079],[-106.676465,37.405556],[-106.709327,37.405556],[-106.692896,37.832758]]]},"id":"08105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.648211,37.81085],[-84.527718,37.767034],[-84.346979,37.537003],[-84.445564,37.48771],[-84.659165,37.635588],[-84.746796,37.712265],[-84.713934,37.816327],[-84.648211,37.81085]]]},"id":"21079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.630393,37.827281],[-93.575624,37.827281],[-93.186761,37.805373],[-93.181284,37.41651],[-93.619439,37.427464],[-93.613962,37.575342],[-93.630393,37.827281]]]},"id":"29167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.904687,37.827281],[-98.472008,37.827281],[-98.466531,37.734173],[-98.466531,37.47128],[-98.482962,37.47128],[-99.014225,37.47128],[-99.014225,37.734173],[-99.014225,37.827281],[-98.904687,37.827281]]]},"id":"20151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.348765,37.816327],[-104.058488,37.734173],[-103.406732,37.641065],[-103.078115,37.641065],[-103.083592,37.000263],[-104.009195,36.994786],[-105.153876,36.994786],[-105.153876,37.290541],[-104.348765,37.816327]]]},"id":"08071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.439641,37.619157],[-79.171271,37.805373],[-78.870039,37.54248],[-79.017916,37.427464],[-79.083639,37.394602],[-79.187701,37.465803],[-79.439641,37.619157]]]},"id":"51009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.428146,37.706788],[-122.504823,37.706788],[-122.389807,37.706788],[-122.428146,37.706788]]]},"id":"06075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.790165,37.794419],[-79.675149,37.761557],[-79.499887,37.531526],[-79.844934,37.306971],[-80.074966,37.421987],[-80.020196,37.646542],[-79.790165,37.794419]]]},"id":"51023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.49213,37.794419],[-78.240191,37.690357],[-78.464745,37.339833],[-78.596192,37.400079],[-78.826223,37.553434],[-78.645484,37.734173],[-78.49213,37.794419]]]},"id":"51029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.515401,37.788942],[-81.219646,37.509618],[-81.312754,37.421987],[-81.838541,37.547957],[-81.854971,37.547957],[-81.800202,37.662973],[-81.608509,37.788942],[-81.515401,37.788942]]]},"id":"54109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.806572,37.597249],[-91.527248,37.788942],[-91.154816,37.695834],[-91.154816,37.586295],[-91.209585,37.41651],[-91.554633,37.421987],[-91.647741,37.421987],[-91.806572,37.597249]]]},"id":"29065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.267951,37.73965],[-119.021489,37.586295],[-119.821122,36.846908],[-120.281185,36.764754],[-120.544078,37.044078],[-120.051153,37.181002],[-119.30629,37.777988],[-119.267951,37.73965]]]},"id":"06039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.356123,37.526049],[-76.356123,37.526049],[-76.438277,37.515095],[-76.62997,37.591772],[-76.651878,37.602726],[-76.750463,37.728696],[-76.68474,37.772511],[-76.356123,37.526049]]]},"id":"51119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.786051,37.745127],[-82.638174,37.717742],[-82.561497,37.68488],[-82.709374,37.285064],[-82.922975,37.48771],[-82.939406,37.717742],[-82.786051,37.745127]]]},"id":"21071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.707047,37.750604],[-105.455107,37.750604],[-105.487969,37.575342],[-105.745385,37.356264],[-106.04114,37.400079],[-106.04114,37.750604],[-105.707047,37.750604]]]},"id":"08003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.163514,37.750604],[-78.158037,37.750604],[-78.070406,37.657496],[-78.130652,37.454849],[-78.234714,37.367218],[-78.262098,37.34531],[-78.464745,37.339833],[-78.240191,37.690357],[-78.163514,37.750604]]]},"id":"51049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.145249,37.569865],[-81.969987,37.537003],[-82.315034,37.296018],[-82.55602,37.20291],[-82.566974,37.197433],[-82.731282,37.27411],[-82.709374,37.285064],[-82.561497,37.68488],[-82.331465,37.73965],[-82.145249,37.569865]]]},"id":"21195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.645461,37.734173],[-90.535922,37.641065],[-90.552353,37.317925],[-90.733092,37.268633],[-90.77143,37.476757],[-91.154816,37.586295],[-91.154816,37.695834],[-91.100047,37.73965],[-90.645461,37.734173]]]},"id":"29093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.042974,37.73965],[-101.528141,37.734173],[-101.528141,37.389126],[-101.555526,37.389126],[-101.884142,37.389126],[-102.042974,37.389126],[-102.042974,37.646542],[-102.042974,37.73965]]]},"id":"20187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.822556,37.73965],[-86.63634,37.662973],[-86.592525,37.564388],[-86.614433,37.394602],[-86.899233,37.213863],[-87.10188,37.41651],[-87.036157,37.558911],[-86.822556,37.73965]]]},"id":"21183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.651831,37.734173],[-100.651831,37.476757],[-100.651831,37.389126],[-100.750416,37.389126],[-101.068078,37.389126],[-101.089986,37.389126],[-101.089986,37.734173],[-100.651831,37.734173]]]},"id":"20081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.17214,37.734173],[-101.089986,37.734173],[-101.089986,37.389126],[-101.528141,37.389126],[-101.528141,37.734173],[-101.17214,37.734173]]]},"id":"20067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.56192,37.734173],[-99.014225,37.734173],[-99.014225,37.47128],[-99.014225,37.383649],[-99.545489,37.383649],[-99.556443,37.465803],[-99.56192,37.734173]]]},"id":"20097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.919754,37.734173],[-95.525414,37.734173],[-95.525414,37.383649],[-95.96357,37.389126],[-95.96357,37.602726],[-95.96357,37.734173],[-95.919754,37.734173]]]},"id":"20205"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.399445,37.734173],[-95.087259,37.734173],[-95.087259,37.673926],[-95.087259,37.383649],[-95.125598,37.383649],[-95.519938,37.383649],[-95.525414,37.383649],[-95.525414,37.734173],[-95.399445,37.734173]]]},"id":"20133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.918837,37.734173],[-97.809299,37.734173],[-97.809299,37.476757],[-97.809299,37.383649],[-98.351516,37.383649],[-98.466531,37.47128],[-98.466531,37.734173],[-97.918837,37.734173]]]},"id":"20095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.677876,37.734173],[-85.519044,37.553434],[-85.464275,37.465803],[-85.584768,37.47128],[-85.590245,37.47128],[-85.655968,37.421987],[-85.891476,37.438418],[-85.677876,37.734173]]]},"id":"21123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.660998,37.734173],[-80.294043,37.690357],[-80.222843,37.630111],[-80.474782,37.421987],[-80.858168,37.427464],[-80.660998,37.734173]]]},"id":"54063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.404029,37.728696],[-85.031597,37.630111],[-85.037074,37.54248],[-85.075412,37.411033],[-85.464275,37.465803],[-85.519044,37.553434],[-85.404029,37.728696]]]},"id":"21155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.706177,37.717742],[-83.519961,37.641065],[-83.580208,37.504141],[-83.651408,37.537003],[-83.886916,37.520572],[-83.903347,37.54248],[-83.722608,37.717742],[-83.706177,37.717742]]]},"id":"21129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.856335,37.695834],[-84.746796,37.712265],[-84.659165,37.635588],[-84.845381,37.547957],[-85.037074,37.54248],[-85.031597,37.630111],[-85.02612,37.679403],[-84.856335,37.695834]]]},"id":"21021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.63225,37.706788],[-77.226957,37.537003],[-77.177664,37.493187],[-77.248864,37.383649],[-77.41865,37.449372],[-77.473419,37.597249],[-77.593912,37.553434],[-77.654158,37.564388],[-77.63225,37.706788]]]},"id":"51087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.428146,37.706788],[-122.389807,37.706788],[-122.11596,37.504141],[-122.083098,37.476757],[-122.154299,37.285064],[-122.291222,37.109802],[-122.504823,37.706788],[-122.428146,37.706788]]]},"id":"06081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.377561,37.695834],[-83.246114,37.668449],[-82.950359,37.504141],[-83.125621,37.405556],[-83.547346,37.334356],[-83.580208,37.504141],[-83.519961,37.641065],[-83.377561,37.695834]]]},"id":"21025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.015636,37.641065],[-77.654158,37.564388],[-77.856805,37.41651],[-77.988251,37.48771],[-78.130652,37.454849],[-78.070406,37.657496],[-78.015636,37.641065]]]},"id":"51145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.408589,37.68488],[-87.036157,37.558911],[-87.10188,37.41651],[-87.293573,37.389126],[-87.375727,37.569865],[-87.49622,37.646542],[-87.408589,37.68488]]]},"id":"21149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.884612,37.673926],[-94.616242,37.673926],[-94.616242,37.652019],[-94.616242,37.361741],[-94.616242,37.339833],[-94.829843,37.339833],[-95.076305,37.339833],[-95.087259,37.383649],[-95.087259,37.673926],[-94.884612,37.673926]]]},"id":"20037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.020196,37.646542],[-80.074966,37.421987],[-80.173551,37.378172],[-80.261182,37.339833],[-80.430967,37.312448],[-80.474782,37.421987],[-80.222843,37.630111],[-80.020196,37.646542]]]},"id":"51045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.23603,37.624634],[-105.153876,37.290541],[-105.153876,36.994786],[-105.219599,36.994786],[-105.718001,36.994786],[-105.745385,37.356264],[-105.487969,37.575342],[-105.23603,37.624634]]]},"id":"08023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.490273,37.652019],[-94.074025,37.641065],[-94.074025,37.580818],[-94.079502,37.350787],[-94.577904,37.361741],[-94.616242,37.361741],[-94.616242,37.652019],[-94.490273,37.652019]]]},"id":"29011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.49622,37.646542],[-87.375727,37.569865],[-87.813882,37.350787],[-87.802929,37.378172],[-87.934375,37.482234],[-87.731728,37.635588],[-87.49622,37.646542]]]},"id":"21233"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.749499,37.641065],[-102.042974,37.646542],[-102.042974,37.389126],[-102.042974,36.994786],[-103.001438,37.000263],[-103.083592,37.000263],[-103.078115,37.641065],[-102.749499,37.641065]]]},"id":"08009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.535922,37.641065],[-90.147059,37.641065],[-90.147059,37.597249],[-90.218259,37.312448],[-90.552353,37.317925],[-90.535922,37.641065]]]},"id":"29123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.659165,37.635588],[-84.445564,37.48771],[-84.500334,37.328879],[-84.670119,37.27411],[-84.719411,37.235771],[-84.845381,37.547957],[-84.659165,37.635588]]]},"id":"21137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.804715,37.641065],[-107.481575,37.641065],[-107.481575,37.421987],[-107.481575,37.000263],[-108.379794,37.000263],[-107.9745,37.641065],[-107.804715,37.641065]]]},"id":"08067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.9745,37.641065],[-108.379794,37.000263],[-109.042503,37.000263],[-109.042503,37.482234],[-107.9745,37.641065]]]},"id":"08083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.385247,37.635588],[-120.051153,37.181002],[-120.544078,37.044078],[-120.91651,36.742847],[-121.217742,36.961924],[-121.228696,37.137186],[-120.385247,37.635588]]]},"id":"06047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.122895,37.624634],[-76.794278,37.515095],[-76.739509,37.465803],[-76.903817,37.378172],[-77.040741,37.427464],[-77.177664,37.493187],[-77.226957,37.537003],[-77.122895,37.624634]]]},"id":"51127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.472032,37.602726],[-86.274862,37.591772],[-86.044831,37.449372],[-86.159846,37.334356],[-86.466555,37.323402],[-86.614433,37.394602],[-86.592525,37.564388],[-86.472032,37.602726]]]},"id":"21085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.053904,37.602726],[-112.898269,37.498664],[-112.898269,37.000263],[-114.048427,37.000263],[-114.053904,37.602726]]]},"id":"49053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.439641,37.619157],[-79.187701,37.465803],[-79.187701,37.465803],[-79.258902,37.356264],[-79.445118,37.055032],[-79.592995,37.044078],[-79.784688,37.230294],[-79.844934,37.224817],[-79.844934,37.306971],[-79.499887,37.531526],[-79.439641,37.619157]]]},"id":"51019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.308617,37.608203],[-95.96357,37.602726],[-95.96357,37.389126],[-95.96357,37.301494],[-96.522218,37.301494],[-96.527695,37.476757],[-96.527695,37.608203],[-96.308617,37.608203]]]},"id":"20049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.796535,37.602726],[-89.522688,37.564388],[-89.484349,37.334356],[-89.489826,37.252202],[-89.763673,37.126232],[-89.867735,37.126232],[-89.867735,37.126232],[-89.862258,37.597249],[-89.796535,37.602726]]]},"id":"29031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.250204,37.602726],[-92.031127,37.602726],[-91.806572,37.597249],[-91.647741,37.421987],[-91.653218,37.049555],[-92.074942,37.055032],[-92.091373,37.055032],[-92.250204,37.060509],[-92.250204,37.47128],[-92.250204,37.602726]]]},"id":"29215"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.77143,37.476757],[-90.733092,37.268633],[-90.776907,37.049555],[-91.017893,37.093371],[-91.209585,37.41651],[-91.154816,37.586295],[-90.77143,37.476757]]]},"id":"29179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.62997,37.591772],[-76.438277,37.515095],[-76.405416,37.400079],[-76.498524,37.241248],[-76.657355,37.378172],[-76.712124,37.432941],[-76.651878,37.602726],[-76.62997,37.591772]]]},"id":"51073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.473419,37.597249],[-77.41865,37.449372],[-77.593912,37.553434],[-77.473419,37.597249]]]},"id":"51760"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.876409,37.597249],[-88.706624,37.597249],[-88.712101,37.334356],[-88.931178,37.301494],[-89.046194,37.328879],[-89.040717,37.597249],[-88.876409,37.597249]]]},"id":"17087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.155733,37.602726],[-89.040717,37.597249],[-89.046194,37.328879],[-89.248841,37.334356],[-89.259795,37.334356],[-89.484349,37.334356],[-89.522688,37.564388],[-89.522688,37.569865],[-89.155733,37.602726]]]},"id":"17181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.410869,37.597249],[-88.416346,37.421987],[-88.487546,37.065986],[-88.712101,37.334356],[-88.706624,37.597249],[-88.410869,37.597249]]]},"id":"17151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.378007,37.597249],[-88.131545,37.575342],[-88.060345,37.504141],[-88.3561,37.405556],[-88.361576,37.405556],[-88.416346,37.421987],[-88.410869,37.597249],[-88.378007,37.597249]]]},"id":"17069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.862258,37.597249],[-89.867735,37.126232],[-90.10872,37.038601],[-90.218259,37.312448],[-90.147059,37.597249],[-89.862258,37.597249]]]},"id":"29017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.126538,37.591772],[-81.093677,37.586295],[-80.858168,37.427464],[-80.978661,37.290541],[-81.225123,37.235771],[-81.362047,37.339833],[-81.312754,37.421987],[-81.219646,37.509618],[-81.126538,37.591772]]]},"id":"54055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.021489,37.586295],[-118.775026,37.460326],[-118.358779,36.742847],[-118.98315,36.742847],[-119.57466,36.490907],[-119.958045,36.403276],[-120.314047,35.904875],[-120.681002,36.266353],[-120.91651,36.742847],[-120.544078,37.044078],[-120.281185,36.764754],[-119.821122,36.846908],[-119.021489,37.586295]]]},"id":"06019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.074025,37.580818],[-93.613962,37.575342],[-93.619439,37.427464],[-93.619439,37.427464],[-93.624916,37.279587],[-94.008302,37.290541],[-94.052118,37.290541],[-94.079502,37.350787],[-94.074025,37.580818]]]},"id":"29057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.963593,37.580818],[-83.903347,37.54248],[-83.886916,37.520572],[-83.782854,37.350787],[-83.941686,37.252202],[-84.138855,37.317925],[-84.199102,37.520572],[-84.089563,37.564388],[-83.963593,37.580818]]]},"id":"21109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.375727,37.569865],[-87.293573,37.389126],[-87.331912,37.159094],[-87.682436,37.14814],[-87.813882,37.350787],[-87.375727,37.569865]]]},"id":"21107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.654158,37.564388],[-77.593912,37.553434],[-77.41865,37.449372],[-77.248864,37.383649],[-77.270772,37.323402],[-77.281726,37.312448],[-77.298157,37.312448],[-77.298157,37.312448],[-77.336496,37.312448],[-77.374834,37.246725],[-77.402219,37.241248],[-77.402219,37.235771],[-77.41865,37.235771],[-77.446034,37.224817],[-77.648681,37.263156],[-77.856805,37.41651],[-77.654158,37.564388]]]},"id":"51041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.826223,37.553434],[-78.596192,37.400079],[-78.683823,37.246725],[-78.6893,37.246725],[-78.826223,37.20291],[-79.001485,37.400079],[-79.017916,37.427464],[-78.870039,37.54248],[-78.826223,37.553434]]]},"id":"51011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.037074,37.54248],[-84.845381,37.547957],[-84.719411,37.235771],[-84.90015,37.115279],[-85.042551,37.186479],[-85.163043,37.312448],[-85.075412,37.411033],[-85.037074,37.54248]]]},"id":"21045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.838541,37.547957],[-81.312754,37.421987],[-81.362047,37.339833],[-81.373001,37.323402],[-81.739956,37.241248],[-81.926172,37.509618],[-81.854971,37.547957],[-81.838541,37.547957]]]},"id":"54047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.060345,37.504141],[-87.934375,37.482234],[-87.802929,37.378172],[-88.098683,37.181002],[-88.191791,37.14814],[-88.3561,37.405556],[-88.060345,37.504141]]]},"id":"21055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.903746,37.498664],[-112.684669,37.54248],[-110.647247,37.54248],[-111.414018,37.000263],[-112.542268,37.000263],[-112.898269,37.000263],[-112.898269,37.498664],[-112.903746,37.498664]]]},"id":"49025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.651408,37.537003],[-83.580208,37.504141],[-83.547346,37.334356],[-83.525438,37.257679],[-83.574731,37.279587],[-83.782854,37.350787],[-83.886916,37.520572],[-83.651408,37.537003]]]},"id":"21189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.231963,37.520572],[-84.199102,37.520572],[-84.138855,37.317925],[-84.138855,37.306971],[-84.286733,37.153617],[-84.500334,37.328879],[-84.445564,37.48771],[-84.346979,37.537003],[-84.231963,37.520572]]]},"id":"21203"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.969987,37.537003],[-81.926172,37.509618],[-81.739956,37.241248],[-81.898787,37.142663],[-82.150726,37.044078],[-82.315034,37.296018],[-82.315034,37.296018],[-81.969987,37.537003]]]},"id":"51027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.356123,37.526049],[-76.356123,37.526049],[-76.405416,37.400079],[-76.438277,37.515095],[-76.356123,37.526049]]]},"id":"51115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.944882,37.498664],[-82.922975,37.48771],[-82.709374,37.285064],[-82.731282,37.27411],[-82.999652,37.197433],[-83.125621,37.405556],[-82.950359,37.504141],[-82.944882,37.498664]]]},"id":"21119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.988251,37.48771],[-77.856805,37.41651],[-77.648681,37.263156],[-77.796559,37.191956],[-78.229237,37.296018],[-78.234714,37.367218],[-78.130652,37.454849],[-77.988251,37.48771]]]},"id":"51007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.040741,37.427464],[-76.903817,37.378172],[-76.881909,37.224817],[-76.975017,37.246725],[-77.270772,37.323402],[-77.248864,37.383649],[-77.177664,37.493187],[-77.040741,37.427464]]]},"id":"51036"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.071745,37.48771],[-92.852668,37.482234],[-92.688359,37.482234],[-92.688359,37.065986],[-92.90196,37.071463],[-93.066268,37.087894],[-93.071745,37.41651],[-93.071745,37.48771]]]},"id":"29225"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.853067,37.482234],[-121.475158,37.482234],[-121.228696,37.137186],[-121.217742,36.961924],[-121.447773,36.989309],[-121.57922,36.901678],[-122.154299,37.285064],[-122.083098,37.476757],[-121.853067,37.482234]]]},"id":"06085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.584768,37.47128],[-85.464275,37.465803],[-85.075412,37.411033],[-85.163043,37.312448],[-85.354736,37.191956],[-85.584768,37.47128]]]},"id":"21217"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.474782,37.421987],[-80.430967,37.312448],[-80.606229,37.246725],[-80.852691,37.14814],[-80.978661,37.290541],[-80.858168,37.427464],[-80.858168,37.427464],[-80.474782,37.421987]]]},"id":"51071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.688359,37.482234],[-92.250204,37.47128],[-92.250204,37.060509],[-92.688359,37.065986],[-92.688359,37.482234]]]},"id":"29229"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.349236,37.476757],[-97.152066,37.476757],[-97.146589,37.000263],[-97.464251,37.000263],[-97.650467,37.000263],[-97.803822,37.000263],[-97.803822,37.389126],[-97.809299,37.383649],[-97.809299,37.476757],[-97.349236,37.476757]]]},"id":"20191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.080866,37.476757],[-96.527695,37.476757],[-96.522218,37.301494],[-96.527695,37.000263],[-96.730341,37.000263],[-96.752249,37.000263],[-96.867265,37.000263],[-97.146589,37.000263],[-97.152066,37.476757],[-97.080866,37.476757]]]},"id":"20035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.213675,37.476757],[-100.109614,37.476757],[-100.087706,37.000263],[-100.6354,37.000263],[-100.651831,37.389126],[-100.651831,37.476757],[-100.213675,37.476757]]]},"id":"20119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.054844,37.47128],[-99.556443,37.465803],[-99.545489,37.383649],[-99.540012,37.000263],[-100.000075,37.000263],[-100.087706,37.000263],[-100.109614,37.476757],[-100.054844,37.47128]]]},"id":"20025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.590245,37.47128],[-85.584768,37.47128],[-85.354736,37.191956],[-85.524521,37.109802],[-85.68883,37.181002],[-85.655968,37.421987],[-85.590245,37.47128]]]},"id":"21087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.482962,37.47128],[-98.466531,37.47128],[-98.351516,37.383649],[-98.346039,37.000263],[-98.543209,37.000263],[-99.003272,37.000263],[-99.014225,37.383649],[-99.014225,37.47128],[-98.482962,37.47128]]]},"id":"20007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.187701,37.465803],[-79.187701,37.465803],[-79.083639,37.394602],[-79.258902,37.356264],[-79.187701,37.465803]]]},"id":"51680"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.739509,37.465803],[-76.712124,37.432941],[-76.657355,37.378172],[-76.728555,37.306971],[-76.679263,37.268633],[-76.591632,37.213863],[-76.613539,37.164571],[-76.794278,37.208387],[-76.881909,37.224817],[-76.903817,37.378172],[-76.739509,37.465803]]]},"id":"51095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.937054,37.465803],[-117.832993,37.465803],[-117.164806,36.972878],[-115.899633,36.00346],[-115.647693,35.80629],[-117.630346,35.795336],[-118.008255,35.789859],[-118.358779,36.742847],[-118.775026,37.460326],[-117.937054,37.465803]]]},"id":"06027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.017446,37.449372],[-85.891476,37.438418],[-85.655968,37.421987],[-85.68883,37.181002],[-85.743599,37.170048],[-86.055785,37.164571],[-86.159846,37.334356],[-86.044831,37.449372],[-86.017446,37.449372]]]},"id":"21099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.125621,37.405556],[-82.999652,37.197433],[-83.120145,37.000263],[-83.180391,37.022171],[-83.509007,37.235771],[-83.525438,37.257679],[-83.547346,37.334356],[-83.125621,37.405556]]]},"id":"21193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.001485,37.400079],[-78.826223,37.20291],[-78.9029,37.022171],[-78.974101,37.049555],[-79.094593,37.060509],[-79.302717,37.109802],[-79.445118,37.055032],[-79.258902,37.356264],[-79.083639,37.394602],[-79.017916,37.427464],[-79.001485,37.400079]]]},"id":"51031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.619439,37.427464],[-93.619439,37.427464],[-93.181284,37.41651],[-93.071745,37.41651],[-93.066268,37.087894],[-93.482516,37.098848],[-93.608485,37.098848],[-93.624916,37.279587],[-93.619439,37.427464]]]},"id":"29077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.361576,37.405556],[-88.3561,37.405556],[-88.191791,37.14814],[-88.241084,36.983832],[-88.432777,37.049555],[-88.482069,37.022171],[-88.564223,37.082417],[-88.487546,37.065986],[-88.416346,37.421987],[-88.361576,37.405556]]]},"id":"21139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.131051,37.421987],[-106.709327,37.405556],[-106.676465,37.405556],[-106.473818,36.994786],[-107.421329,37.000263],[-107.481575,37.000263],[-107.481575,37.421987],[-107.131051,37.421987]]]},"id":"08007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.554633,37.421987],[-91.209585,37.41651],[-91.017893,37.093371],[-91.220539,37.038601],[-91.220539,36.885247],[-91.658695,36.890724],[-91.653218,37.049555],[-91.647741,37.421987],[-91.554633,37.421987]]]},"id":"29203"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.173551,37.378172],[-80.074966,37.421987],[-79.844934,37.306971],[-79.844934,37.224817],[-80.129735,37.120755],[-80.179028,37.115279],[-80.261182,37.339833],[-80.173551,37.378172]],[[-79.981858,37.328879],[-80.020196,37.306971],[-80.03115,37.263156],[-79.981858,37.328879]]]},"id":"51161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.10188,37.41651],[-86.899233,37.213863],[-86.943049,37.071463],[-86.954003,37.071463],[-87.052588,37.060509],[-87.260711,37.071463],[-87.331912,37.159094],[-87.293573,37.389126],[-87.10188,37.41651]]]},"id":"21177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.523111,37.400079],[-106.04114,37.400079],[-105.745385,37.356264],[-105.718001,36.994786],[-106.008278,36.994786],[-106.473818,36.994786],[-106.676465,37.405556],[-106.523111,37.400079]]]},"id":"08021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.262098,37.34531],[-78.234714,37.367218],[-78.229237,37.296018],[-78.240191,37.120755],[-78.399022,37.087894],[-78.442837,37.07694],[-78.683823,37.246725],[-78.596192,37.400079],[-78.464745,37.339833],[-78.262098,37.34531]]]},"id":"51147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.614433,37.394602],[-86.466555,37.323402],[-86.400832,37.170048],[-86.674679,37.000263],[-86.943049,37.071463],[-86.899233,37.213863],[-86.614433,37.394602]]]},"id":"21031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.884142,37.389126],[-101.555526,37.389126],[-101.555526,36.994786],[-102.026543,36.994786],[-102.042974,36.994786],[-102.042974,37.389126],[-101.884142,37.389126]]]},"id":"20129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.528141,37.389126],[-101.089986,37.389126],[-101.068078,37.389126],[-101.068078,37.000263],[-101.555526,36.994786],[-101.555526,37.389126],[-101.528141,37.389126]]]},"id":"20189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.750416,37.389126],[-100.651831,37.389126],[-100.6354,37.000263],[-100.947585,37.000263],[-101.068078,37.000263],[-101.068078,37.389126],[-100.750416,37.389126]]]},"id":"20175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.96357,37.389126],[-95.525414,37.383649],[-95.519938,37.383649],[-95.519938,37.000263],[-95.613046,37.000263],[-95.788308,37.000263],[-95.9088,37.000263],[-95.96357,37.000263],[-95.96357,37.301494],[-95.96357,37.389126]]]},"id":"20125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.803822,37.389126],[-97.803822,37.000263],[-98.11053,37.000263],[-98.346039,37.000263],[-98.351516,37.383649],[-97.809299,37.383649],[-97.803822,37.389126]]]},"id":"20077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.125598,37.383649],[-95.087259,37.383649],[-95.076305,37.339833],[-95.070828,37.000263],[-95.152983,37.000263],[-95.410399,37.000263],[-95.519938,37.000263],[-95.519938,37.383649],[-95.125598,37.383649]]]},"id":"20099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.014225,37.383649],[-99.003272,37.000263],[-99.457858,37.000263],[-99.540012,37.000263],[-99.545489,37.383649],[-99.014225,37.383649]]]},"id":"20033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.657355,37.378172],[-76.498524,37.241248],[-76.399939,37.164571],[-76.394462,37.104325],[-76.4328,37.093371],[-76.55877,37.213863],[-76.591632,37.213863],[-76.679263,37.268633],[-76.728555,37.306971],[-76.657355,37.378172]]]},"id":"51199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.802929,37.378172],[-87.813882,37.350787],[-87.682436,37.14814],[-87.731728,37.000263],[-87.879606,36.961924],[-88.098683,37.181002],[-87.802929,37.378172]]]},"id":"21033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.261182,37.339833],[-80.179028,37.115279],[-80.545983,36.983832],[-80.578844,37.087894],[-80.529552,37.131709],[-80.606229,37.246725],[-80.430967,37.312448],[-80.261182,37.339833]]]},"id":"51121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.577904,37.361741],[-94.079502,37.350787],[-94.052118,37.290541],[-94.057594,37.049555],[-94.616242,37.055032],[-94.616242,37.339833],[-94.616242,37.361741],[-94.577904,37.361741]]]},"id":"29097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.574731,37.279587],[-83.525438,37.257679],[-83.509007,37.235771],[-83.509007,36.940016],[-83.591161,36.956447],[-83.788331,37.033124],[-83.870485,37.055032],[-83.941686,37.252202],[-83.782854,37.350787],[-83.574731,37.279587]]]},"id":"21051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.670119,37.27411],[-84.500334,37.328879],[-84.286733,37.153617],[-84.357933,36.961924],[-84.577011,36.868816],[-84.807042,36.989309],[-84.834427,36.994786],[-84.90015,37.115279],[-84.719411,37.235771],[-84.670119,37.27411]]]},"id":"21199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.466555,37.323402],[-86.159846,37.334356],[-86.055785,37.164571],[-86.116031,37.060509],[-86.400832,37.170048],[-86.466555,37.323402]]]},"id":"21061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.829843,37.339833],[-94.616242,37.339833],[-94.616242,37.055032],[-94.616242,37.055032],[-94.616242,37.000263],[-94.994151,37.000263],[-95.005105,37.000263],[-95.070828,37.000263],[-95.076305,37.339833],[-94.829843,37.339833]]]},"id":"20021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.373001,37.323402],[-81.362047,37.339833],[-81.225123,37.235771],[-81.438724,37.011217],[-81.477062,36.989309],[-81.778294,36.956447],[-81.898787,37.142663],[-81.739956,37.241248],[-81.373001,37.323402]]]},"id":"51185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.931178,37.301494],[-88.712101,37.334356],[-88.487546,37.065986],[-88.564223,37.082417],[-88.925701,37.224817],[-88.931178,37.301494]]]},"id":"17127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.981858,37.328879],[-80.03115,37.263156],[-80.020196,37.306971],[-79.981858,37.328879]]]},"id":"51770"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.138855,37.306971],[-84.138855,37.317925],[-83.941686,37.252202],[-83.870485,37.055032],[-84.089563,36.956447],[-84.122425,36.967401],[-84.297687,36.945493],[-84.357933,36.961924],[-84.286733,37.153617],[-84.138855,37.306971]]]},"id":"21125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.259795,37.334356],[-89.248841,37.334356],[-89.172164,37.065986],[-89.133825,36.983832],[-89.314564,37.011217],[-89.489826,37.252202],[-89.484349,37.334356],[-89.259795,37.334356]]]},"id":"17003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.046194,37.328879],[-88.931178,37.301494],[-88.925701,37.224817],[-88.936655,37.230294],[-89.172164,37.065986],[-89.248841,37.334356],[-89.046194,37.328879]]]},"id":"17153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.281726,37.312448],[-77.270772,37.323402],[-76.975017,37.246725],[-77.155756,37.109802],[-77.396742,36.994786],[-77.396742,37.170048],[-77.374834,37.246725],[-77.336496,37.312448],[-77.281726,37.312448]]]},"id":"51149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.509007,37.235771],[-83.180391,37.022171],[-83.492576,36.896201],[-83.509007,36.940016],[-83.509007,37.235771]]]},"id":"21131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.552353,37.317925],[-90.218259,37.312448],[-90.10872,37.038601],[-90.256598,36.923586],[-90.568783,36.929063],[-90.678322,36.929063],[-90.776907,37.049555],[-90.733092,37.268633],[-90.552353,37.317925]]]},"id":"29223"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.298157,37.312448],[-77.281726,37.312448],[-77.336496,37.312448],[-77.298157,37.312448],[-77.298157,37.312448]]]},"id":"51670"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.163043,37.312448],[-85.042551,37.186479],[-85.234244,36.923586],[-85.447844,36.940016],[-85.453321,36.940016],[-85.524521,37.109802],[-85.354736,37.191956],[-85.163043,37.312448]]]},"id":"21001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.315034,37.296018],[-82.150726,37.044078],[-82.325988,36.972878],[-82.55602,37.20291],[-82.315034,37.296018],[-82.315034,37.296018]]]},"id":"51051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.522218,37.301494],[-95.96357,37.301494],[-95.96357,37.000263],[-96.001908,37.000263],[-96.527695,37.000263],[-96.522218,37.301494]]]},"id":"20019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.225123,37.235771],[-80.978661,37.290541],[-80.852691,37.14814],[-80.912938,37.071463],[-81.378478,36.95097],[-81.438724,37.011217],[-81.225123,37.235771]]]},"id":"51021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.229237,37.296018],[-77.796559,37.191956],[-77.889666,36.989309],[-78.004682,37.022171],[-78.240191,37.120755],[-78.229237,37.296018]]]},"id":"51135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.008302,37.290541],[-93.624916,37.279587],[-93.608485,37.098848],[-93.608485,36.994786],[-93.608485,36.923586],[-94.008302,36.929063],[-94.063071,36.929063],[-94.057594,37.049555],[-94.052118,37.290541],[-94.008302,37.290541]]]},"id":"29109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.154299,37.285064],[-121.57922,36.901678],[-121.644943,36.896201],[-121.699712,36.918109],[-121.809251,36.852385],[-122.291222,37.109802],[-122.154299,37.285064]]]},"id":"06087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.731282,37.27411],[-82.566974,37.197433],[-82.868205,36.972878],[-82.912021,37.000263],[-83.120145,37.000263],[-82.999652,37.197433],[-82.731282,37.27411]]]},"id":"21133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.648681,37.263156],[-77.446034,37.224817],[-77.396742,37.170048],[-77.396742,36.994786],[-77.621296,36.87977],[-77.659635,36.896201],[-77.889666,36.989309],[-77.796559,37.191956],[-77.648681,37.263156]]]},"id":"51053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.489826,37.252202],[-89.314564,37.011217],[-89.517211,36.868816],[-89.528165,36.868816],[-89.692473,36.857862],[-89.763673,37.126232],[-89.489826,37.252202]]]},"id":"29201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.6893,37.246725],[-78.683823,37.246725],[-78.442837,37.07694],[-78.49213,36.890724],[-78.650961,36.699031],[-78.9029,37.022171],[-78.826223,37.20291],[-78.6893,37.246725]]]},"id":"51037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.975017,37.246725],[-76.881909,37.224817],[-76.794278,37.208387],[-76.673786,37.142663],[-76.849048,36.994786],[-76.95311,36.945493],[-77.155756,37.109802],[-76.975017,37.246725]]]},"id":"51181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.402219,37.241248],[-77.374834,37.246725],[-77.396742,37.170048],[-77.446034,37.224817],[-77.41865,37.235771],[-77.402219,37.235771],[-77.402219,37.241248]]]},"id":"51730"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.606229,37.246725],[-80.529552,37.131709],[-80.578844,37.087894],[-80.545983,36.983832],[-80.633614,36.929063],[-80.743152,36.87977],[-80.912938,37.071463],[-80.852691,37.14814],[-80.606229,37.246725]]]},"id":"51155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.784688,37.230294],[-79.592995,37.044078],[-79.642287,36.857862],[-79.647764,36.852385],[-80.042104,36.792139],[-80.233797,36.874293],[-80.129735,37.120755],[-79.844934,37.224817],[-79.784688,37.230294]]]},"id":"51067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.936655,37.230294],[-88.816163,36.956447],[-89.100963,36.945493],[-89.133825,36.983832],[-89.172164,37.065986],[-88.936655,37.230294]]]},"id":"21007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.925701,37.224817],[-88.564223,37.082417],[-88.482069,37.022171],[-88.482069,36.940016],[-88.723055,36.945493],[-88.810686,36.945493],[-88.816163,36.956447],[-88.936655,37.230294],[-88.925701,37.224817]]]},"id":"21145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.55877,37.213863],[-76.4328,37.093371],[-76.388985,36.989309],[-76.613539,37.164571],[-76.591632,37.213863],[-76.55877,37.213863]]]},"id":"51700"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.55602,37.20291],[-82.325988,36.972878],[-82.408142,36.874293],[-82.479343,36.885247],[-82.76962,36.797616],[-82.868205,36.885247],[-82.879159,36.890724],[-82.868205,36.972878],[-82.566974,37.197433],[-82.55602,37.20291]]]},"id":"51195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.400832,37.170048],[-86.116031,37.060509],[-86.165323,36.934539],[-86.22557,36.912632],[-86.406309,36.775708],[-86.608956,36.885247],[-86.674679,37.000263],[-86.400832,37.170048]]]},"id":"21227"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.042551,37.186479],[-84.90015,37.115279],[-84.834427,36.994786],[-85.064458,36.857862],[-85.217813,36.852385],[-85.234244,36.923586],[-85.042551,37.186479]]]},"id":"21207"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.68883,37.181002],[-85.524521,37.109802],[-85.453321,36.940016],[-85.595722,36.819524],[-85.738122,36.841432],[-85.743599,37.170048],[-85.68883,37.181002]]]},"id":"21169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.191791,37.14814],[-88.098683,37.181002],[-87.879606,36.961924],[-88.15893,36.868816],[-88.241084,36.983832],[-88.191791,37.14814]]]},"id":"21143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.394462,37.104325],[-76.399939,37.164571],[-76.284923,37.115279],[-76.394462,37.104325]]]},"id":"51735"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.743599,37.170048],[-85.738122,36.841432],[-85.979107,36.720939],[-86.165323,36.934539],[-86.116031,37.060509],[-86.055785,37.164571],[-85.743599,37.170048]]]},"id":"21009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.682436,37.14814],[-87.331912,37.159094],[-87.260711,37.071463],[-87.260711,37.071463],[-87.337389,36.644262],[-87.63862,36.638785],[-87.69339,36.638785],[-87.731728,37.000263],[-87.682436,37.14814]]]},"id":"21047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.898787,37.142663],[-81.778294,36.956447],[-81.838541,36.929063],[-82.331465,36.709985],[-82.408142,36.874293],[-82.325988,36.972878],[-82.150726,37.044078],[-81.898787,37.142663]]]},"id":"51167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.482093,36.929063],[-76.89834,36.644262],[-76.909294,36.649739],[-76.925725,36.709985],[-76.860002,36.961924],[-76.849048,36.994786],[-76.673786,37.142663],[-76.482093,36.929063]]]},"id":"51093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.302717,37.109802],[-79.094593,37.060509],[-79.220563,36.5402],[-79.341056,36.5402],[-79.401302,36.638785],[-79.472502,36.5402],[-79.510841,36.5402],[-79.713488,36.5402],[-79.642287,36.857862],[-79.592995,37.044078],[-79.445118,37.055032],[-79.302717,37.109802]]]},"id":"51143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.867735,37.126232],[-89.763673,37.126232],[-89.692473,36.857862],[-89.960843,36.627831],[-90.048474,36.627831],[-90.147059,36.633308],[-90.256598,36.923586],[-90.10872,37.038601],[-89.867735,37.126232],[-89.867735,37.126232]]]},"id":"29207"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.129735,37.120755],[-80.233797,36.874293],[-80.463828,36.709985],[-80.633614,36.929063],[-80.545983,36.983832],[-80.179028,37.115279],[-80.129735,37.120755]]]},"id":"51063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.399022,37.087894],[-78.240191,37.120755],[-78.004682,37.022171],[-78.02659,36.775708],[-78.475699,36.885247],[-78.49213,36.890724],[-78.442837,37.07694],[-78.399022,37.087894]]]},"id":"51111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.394462,37.104325],[-76.284923,37.115279],[-76.388985,36.989309],[-76.4328,37.093371],[-76.394462,37.104325]]]},"id":"51650"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.155756,37.109802],[-76.95311,36.945493],[-77.429604,36.709985],[-77.621296,36.87977],[-77.396742,36.994786],[-77.155756,37.109802]]]},"id":"51183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.220539,37.038601],[-91.017893,37.093371],[-90.776907,37.049555],[-90.678322,36.929063],[-90.661891,36.814047],[-90.935738,36.814047],[-91.116477,36.825001],[-91.220539,36.885247],[-91.220539,37.038601]]]},"id":"29035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.482516,37.098848],[-93.066268,37.087894],[-92.90196,37.071463],[-92.907437,36.80857],[-93.301777,36.819524],[-93.592055,36.994786],[-93.608485,36.994786],[-93.608485,37.098848],[-93.482516,37.098848]]]},"id":"29043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.260711,37.071463],[-87.260711,37.071463],[-87.052588,37.060509],[-87.058065,36.644262],[-87.112834,36.644262],[-87.337389,36.644262],[-87.260711,37.071463]]]},"id":"21219"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.954003,37.071463],[-86.943049,37.071463],[-86.674679,37.000263],[-86.608956,36.885247],[-86.76231,36.649739],[-87.058065,36.644262],[-87.052588,37.060509],[-86.954003,37.071463]]]},"id":"21141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.912938,37.071463],[-80.743152,36.87977],[-81.044384,36.80857],[-81.263462,36.764754],[-81.378478,36.95097],[-80.912938,37.071463]]]},"id":"51197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.314564,37.011217],[-89.133825,36.983832],[-89.100963,36.945493],[-89.122871,36.786662],[-89.172164,36.649739],[-89.325518,36.633308],[-89.517211,36.868816],[-89.314564,37.011217]]]},"id":"29133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.688359,37.065986],[-92.250204,37.060509],[-92.091373,37.055032],[-92.113281,36.792139],[-92.529528,36.803093],[-92.765037,36.80857],[-92.907437,36.80857],[-92.90196,37.071463],[-92.688359,37.065986]]]},"id":"29067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.432777,37.049555],[-88.241084,36.983832],[-88.15893,36.868816],[-88.109637,36.748324],[-88.487546,36.748324],[-88.482069,36.940016],[-88.482069,37.022171],[-88.432777,37.049555]]]},"id":"21157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.974101,37.049555],[-78.9029,37.022171],[-78.650961,36.699031],[-78.733115,36.5402],[-78.798839,36.5402],[-79.138409,36.5402],[-79.220563,36.5402],[-79.094593,37.060509],[-78.974101,37.049555]]]},"id":"51083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.616242,37.055032],[-94.616242,37.055032],[-94.057594,37.049555],[-94.063071,36.929063],[-94.068548,36.748324],[-94.539565,36.764754],[-94.616242,36.764754],[-94.616242,37.000263],[-94.616242,37.055032]]]},"id":"29145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.074942,37.055032],[-91.653218,37.049555],[-91.658695,36.890724],[-91.669648,36.501861],[-92.118758,36.496384],[-92.113281,36.792139],[-92.091373,37.055032],[-92.074942,37.055032]]]},"id":"29091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.788331,37.033124],[-83.591161,36.956447],[-83.875962,36.688077],[-84.089563,36.956447],[-83.870485,37.055032],[-83.788331,37.033124]]]},"id":"21121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.004682,37.022171],[-77.889666,36.989309],[-77.659635,36.896201],[-77.769174,36.545677],[-77.90062,36.545677],[-78.048498,36.545677],[-78.02659,36.775708],[-78.004682,37.022171]]]},"id":"51025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.912021,37.000263],[-82.868205,36.972878],[-82.879159,36.890724],[-83.459715,36.666169],[-83.492576,36.896201],[-83.180391,37.022171],[-83.120145,37.000263],[-82.912021,37.000263]]]},"id":"21095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.477062,36.989309],[-81.438724,37.011217],[-81.378478,36.95097],[-81.263462,36.764754],[-81.608509,36.638785],[-81.838541,36.929063],[-81.778294,36.956447],[-81.477062,36.989309]]]},"id":"51173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.000968,37.000263],[-110.000968,35.663889],[-109.842137,35.516012],[-109.891429,33.566221],[-110.000968,33.577175],[-110.000968,33.998899],[-110.751309,33.998899],[-110.751309,34.261793],[-110.751309,37.00574],[-110.000968,37.000263]]]},"id":"04017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.751309,37.00574],[-110.751309,34.261793],[-111.556419,34.469916],[-111.775497,34.979272],[-112.334144,34.973795],[-112.438206,35.258596],[-113.336425,35.526966],[-113.352855,36.047275],[-112.629899,36.392322],[-112.542268,37.000263],[-111.414018,37.000263],[-110.751309,37.00574]]]},"id":"04005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.087706,37.000263],[-100.000075,37.000263],[-100.005552,36.594969],[-100.005552,36.501861],[-100.547769,36.501861],[-100.805185,36.501861],[-100.953062,36.501861],[-100.947585,37.000263],[-100.6354,37.000263],[-100.087706,37.000263]]]},"id":"40007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.731728,37.000263],[-87.69339,36.638785],[-88.071299,36.677123],[-88.109637,36.748324],[-88.15893,36.868816],[-87.879606,36.961924],[-87.731728,37.000263]]]},"id":"21221"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.000075,37.000263],[-99.540012,37.000263],[-99.457858,37.000263],[-99.293549,36.819524],[-99.605735,36.594969],[-100.005552,36.594969],[-100.000075,37.000263]]]},"id":"40059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.042974,36.994786],[-102.026543,36.994786],[-102.03202,36.501861],[-102.163466,36.501861],[-103.001438,36.501861],[-103.001438,37.000263],[-102.042974,36.994786]]]},"id":"40025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.898269,37.000263],[-112.542268,37.000263],[-112.629899,36.392322],[-113.352855,36.047275],[-113.336425,35.526966],[-113.330948,34.316562],[-113.418579,34.300131],[-114.136058,34.305608],[-114.634459,35.00118],[-114.754952,36.085614],[-114.048427,36.195153],[-114.048427,36.841432],[-114.048427,37.000263],[-112.898269,37.000263]]]},"id":"04015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.001438,37.000263],[-103.001438,36.501861],[-103.039777,36.052752],[-103.039777,35.740566],[-103.37387,35.740566],[-103.362916,36.085614],[-104.009195,36.21706],[-104.009195,36.994786],[-103.083592,37.000263],[-103.001438,37.000263]]]},"id":"35059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.457858,37.000263],[-99.003272,37.000263],[-98.543209,37.000263],[-98.532255,36.463523],[-98.959456,36.507338],[-99.293549,36.819524],[-99.457858,37.000263]]]},"id":"40151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.421329,37.000263],[-106.473818,36.994786],[-106.008278,36.994786],[-105.958986,36.353984],[-105.531785,36.014414],[-105.718001,35.976075],[-106.068525,35.997983],[-106.243787,35.932259],[-106.249264,35.965121],[-106.884589,36.21706],[-107.623976,36.222537],[-107.421329,37.000263]]]},"id":"35039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.421329,37.000263],[-107.623976,36.222537],[-107.623976,35.997983],[-108.883672,36.00346],[-109.04798,36.00346],[-109.042503,37.000263],[-108.379794,37.000263],[-107.481575,37.000263],[-107.421329,37.000263]]]},"id":"35045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.152983,37.000263],[-95.070828,37.000263],[-95.005105,37.000263],[-94.999628,36.671646],[-95.005105,36.507338],[-95.322768,36.512815],[-95.328245,36.512815],[-95.432306,36.594969],[-95.410399,37.000263],[-95.152983,37.000263]]]},"id":"40035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.994151,37.000263],[-94.616242,37.000263],[-94.616242,36.764754],[-94.616242,36.666169],[-94.890089,36.671646],[-94.999628,36.671646],[-95.005105,37.000263],[-94.994151,37.000263]]]},"id":"40115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.613046,37.000263],[-95.519938,37.000263],[-95.410399,37.000263],[-95.432306,36.594969],[-95.810215,36.594969],[-95.788308,37.000263],[-95.613046,37.000263]]]},"id":"40105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.000968,37.000263],[-109.042503,37.000263],[-109.04798,36.00346],[-109.04798,34.957364],[-109.04798,34.579455],[-109.04798,33.779822],[-109.497089,33.653852],[-109.743552,33.500498],[-109.891429,33.566221],[-109.842137,35.516012],[-110.000968,35.663889],[-110.000968,37.000263]]]},"id":"04001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.9088,37.000263],[-95.788308,37.000263],[-95.810215,36.594969],[-95.810215,36.425184],[-95.919754,36.425184],[-96.001908,36.425184],[-96.001908,37.000263],[-95.96357,37.000263],[-95.9088,37.000263]]]},"id":"40147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.730341,37.000263],[-96.527695,37.000263],[-96.001908,37.000263],[-96.001908,36.425184],[-96.270278,36.162291],[-96.724864,36.529246],[-97.009665,36.507338],[-97.058958,36.594969],[-96.752249,37.000263],[-96.730341,37.000263]]]},"id":"40113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.867265,37.000263],[-96.752249,37.000263],[-97.058958,36.594969],[-97.464251,36.594969],[-97.464251,36.594969],[-97.464251,37.000263],[-97.146589,37.000263],[-96.867265,37.000263]]]},"id":"40071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.650467,37.000263],[-97.464251,37.000263],[-97.464251,36.594969],[-97.984561,36.594969],[-98.105053,36.594969],[-98.11053,37.000263],[-97.803822,37.000263],[-97.650467,37.000263]]]},"id":"40053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.543209,37.000263],[-98.346039,37.000263],[-98.11053,37.000263],[-98.105053,36.594969],[-98.105053,36.463523],[-98.532255,36.463523],[-98.543209,37.000263]]]},"id":"40003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.947585,37.000263],[-100.953062,36.501861],[-101.084509,36.501861],[-101.621249,36.501861],[-101.812942,36.501861],[-102.03202,36.501861],[-102.026543,36.994786],[-101.555526,36.994786],[-101.068078,37.000263],[-100.947585,37.000263]]]},"id":"40139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.807042,36.989309],[-84.577011,36.868816],[-84.779657,36.605923],[-84.785134,36.605923],[-84.976827,36.616877],[-85.064458,36.857862],[-84.834427,36.994786],[-84.807042,36.989309]]]},"id":"21231"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.860002,36.961924],[-76.925725,36.709985],[-76.909294,36.649739],[-76.89834,36.644262],[-76.914771,36.551154],[-76.914771,36.545677],[-77.16671,36.545677],[-77.298157,36.545677],[-77.429604,36.709985],[-76.95311,36.945493],[-76.849048,36.994786],[-76.860002,36.961924]]]},"id":"51175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.009195,36.994786],[-104.009195,36.21706],[-104.436396,36.21706],[-105.340092,36.260876],[-105.219599,36.994786],[-105.153876,36.994786],[-104.009195,36.994786]]]},"id":"35007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.219599,36.994786],[-105.340092,36.260876],[-105.531785,36.014414],[-105.958986,36.353984],[-106.008278,36.994786],[-105.718001,36.994786],[-105.219599,36.994786]]]},"id":"35055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.592055,36.994786],[-93.301777,36.819524],[-93.312731,36.496384],[-93.586578,36.496384],[-93.608485,36.923586],[-93.608485,36.994786],[-93.592055,36.994786]]]},"id":"29209"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.447773,36.989309],[-121.217742,36.961924],[-120.91651,36.742847],[-120.681002,36.266353],[-121.31085,36.501861],[-121.644943,36.896201],[-121.57922,36.901678],[-121.447773,36.989309]]]},"id":"06069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.122425,36.967401],[-84.089563,36.956447],[-83.875962,36.688077],[-83.930732,36.589492],[-83.985501,36.589492],[-84.226487,36.589492],[-84.297687,36.945493],[-84.122425,36.967401]]]},"id":"21235"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.175384,36.929063],[-76.180861,36.923586],[-76.224677,36.841432],[-76.2904,36.819524],[-76.345169,36.918109],[-76.175384,36.929063]]]},"id":"51710"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.357933,36.961924],[-84.297687,36.945493],[-84.226487,36.589492],[-84.259348,36.589492],[-84.779657,36.605923],[-84.577011,36.868816],[-84.357933,36.961924]]]},"id":"21147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.509007,36.940016],[-83.492576,36.896201],[-83.459715,36.666169],[-83.673316,36.600446],[-83.930732,36.589492],[-83.875962,36.688077],[-83.591161,36.956447],[-83.509007,36.940016]]]},"id":"21013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.810686,36.945493],[-88.810686,36.775708],[-89.122871,36.786662],[-89.100963,36.945493],[-88.816163,36.956447],[-88.810686,36.945493]]]},"id":"21039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.723055,36.945493],[-88.482069,36.940016],[-88.487546,36.748324],[-88.487546,36.501861],[-88.514931,36.501861],[-88.816163,36.501861],[-88.810686,36.775708],[-88.810686,36.945493],[-88.723055,36.945493]]]},"id":"21083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.447844,36.940016],[-85.234244,36.923586],[-85.217813,36.852385],[-85.29449,36.627831],[-85.43689,36.616877],[-85.595722,36.819524],[-85.453321,36.940016],[-85.447844,36.940016]]]},"id":"21057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.22557,36.912632],[-86.165323,36.934539],[-85.979107,36.720939],[-85.979107,36.627831],[-86.203662,36.638785],[-86.411786,36.649739],[-86.406309,36.775708],[-86.22557,36.912632]]]},"id":"21003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.180861,36.923586],[-76.175384,36.929063],[-75.868676,36.551154],[-75.901537,36.551154],[-76.120615,36.551154],[-76.224677,36.841432],[-76.180861,36.923586]]]},"id":"51810"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.008302,36.929063],[-93.608485,36.923586],[-93.586578,36.496384],[-93.728978,36.496384],[-93.865902,36.496384],[-94.079502,36.496384],[-94.068548,36.748324],[-94.063071,36.929063],[-94.008302,36.929063]]]},"id":"29009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.633614,36.929063],[-80.463828,36.709985],[-80.611706,36.556631],[-80.83626,36.556631],[-80.83626,36.556631],[-80.912938,36.649739],[-80.934845,36.671646],[-81.044384,36.80857],[-80.743152,36.87977],[-80.633614,36.929063]]]},"id":"51035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.838541,36.929063],[-81.608509,36.638785],[-81.646848,36.6114],[-81.827587,36.616877],[-82.145249,36.594969],[-82.145249,36.671646],[-82.243834,36.594969],[-82.293127,36.594969],[-82.331465,36.709985],[-81.838541,36.929063]]]},"id":"51191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.405416,36.896201],[-76.421846,36.868816],[-76.493047,36.551154],[-76.542339,36.551154],[-76.914771,36.551154],[-76.89834,36.644262],[-76.482093,36.929063],[-76.405416,36.896201]]]},"id":"51800"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.568783,36.929063],[-90.256598,36.923586],[-90.147059,36.633308],[-90.218259,36.496384],[-90.57426,36.496384],[-90.661891,36.814047],[-90.678322,36.929063],[-90.568783,36.929063]]]},"id":"29023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.345169,36.918109],[-76.2904,36.819524],[-76.405416,36.868816],[-76.421846,36.868816],[-76.405416,36.896201],[-76.345169,36.918109]]]},"id":"51740"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.699712,36.918109],[-121.644943,36.896201],[-121.31085,36.501861],[-120.681002,36.266353],[-120.314047,35.904875],[-120.215462,35.789859],[-121.343711,35.795336],[-121.896882,36.315645],[-121.809251,36.852385],[-121.699712,36.918109]]]},"id":"06053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.621296,36.87977],[-77.429604,36.709985],[-77.298157,36.545677],[-77.769174,36.545677],[-77.659635,36.896201],[-77.621296,36.87977]]]},"id":"51081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.868205,36.885247],[-82.76962,36.797616],[-82.983221,36.594969],[-83.470669,36.594969],[-83.673316,36.600446],[-83.459715,36.666169],[-82.879159,36.890724],[-82.868205,36.885247]]]},"id":"51105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.475699,36.885247],[-78.02659,36.775708],[-78.048498,36.545677],[-78.322345,36.545677],[-78.459268,36.5402],[-78.470222,36.5402],[-78.733115,36.5402],[-78.650961,36.699031],[-78.49213,36.890724],[-78.475699,36.885247]]]},"id":"51117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.658695,36.890724],[-91.220539,36.885247],[-91.116477,36.825001],[-91.127431,36.496384],[-91.406755,36.496384],[-91.450571,36.496384],[-91.450571,36.496384],[-91.669648,36.501861],[-91.658695,36.890724]]]},"id":"29149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.217813,36.852385],[-85.064458,36.857862],[-84.976827,36.616877],[-85.278059,36.627831],[-85.29449,36.627831],[-85.217813,36.852385]]]},"id":"21053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.479343,36.885247],[-82.408142,36.874293],[-82.331465,36.709985],[-82.293127,36.594969],[-82.610789,36.594969],[-82.654605,36.594969],[-82.829867,36.594969],[-82.983221,36.594969],[-82.76962,36.797616],[-82.479343,36.885247]]]},"id":"51169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.608956,36.885247],[-86.406309,36.775708],[-86.411786,36.649739],[-86.56514,36.633308],[-86.76231,36.649739],[-86.608956,36.885247]]]},"id":"21213"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.233797,36.874293],[-80.042104,36.792139],[-80.053058,36.5402],[-80.441921,36.551154],[-80.611706,36.556631],[-80.463828,36.709985],[-80.233797,36.874293]]]},"id":"51141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.528165,36.868816],[-89.517211,36.868816],[-89.325518,36.633308],[-89.418626,36.496384],[-89.484349,36.496384],[-89.539119,36.496384],[-89.544596,36.337553],[-89.714381,36.425184],[-89.960843,36.386845],[-89.960843,36.627831],[-89.692473,36.857862],[-89.528165,36.868816]]]},"id":"29143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.405416,36.868816],[-76.2904,36.819524],[-76.224677,36.841432],[-76.120615,36.551154],[-76.312308,36.551154],[-76.493047,36.551154],[-76.421846,36.868816],[-76.405416,36.868816]]]},"id":"51550"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.647764,36.852385],[-79.642287,36.857862],[-79.713488,36.5402],[-79.965427,36.5402],[-80.025673,36.5402],[-80.053058,36.5402],[-80.042104,36.792139],[-79.647764,36.852385]]]},"id":"51089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.081288,36.841432],[-114.048427,36.841432],[-114.048427,36.195153],[-114.754952,36.085614],[-114.634459,35.00118],[-115.647693,35.80629],[-115.899633,36.00346],[-115.894156,36.841432],[-114.081288,36.841432]]]},"id":"32003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.738122,36.841432],[-85.595722,36.819524],[-85.43689,36.616877],[-85.787415,36.622354],[-85.979107,36.627831],[-85.979107,36.720939],[-85.738122,36.841432]]]},"id":"21171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.935738,36.814047],[-90.661891,36.814047],[-90.57426,36.496384],[-90.782384,36.496384],[-90.848107,36.496384],[-91.127431,36.496384],[-91.116477,36.825001],[-90.935738,36.814047]]]},"id":"29181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.293549,36.819524],[-98.959456,36.507338],[-98.959456,36.501861],[-98.953979,36.162291],[-99.38118,36.162291],[-99.605735,36.594969],[-99.293549,36.819524]]]},"id":"40153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.301777,36.819524],[-92.907437,36.80857],[-92.765037,36.80857],[-92.770513,36.496384],[-92.852668,36.496384],[-93.066268,36.496384],[-93.2963,36.496384],[-93.312731,36.496384],[-93.301777,36.819524]]]},"id":"29213"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.044384,36.80857],[-80.934845,36.671646],[-80.912938,36.649739],[-80.83626,36.556631],[-80.901984,36.562108],[-80.978661,36.562108],[-81.351093,36.573061],[-81.679709,36.589492],[-81.646848,36.6114],[-81.608509,36.638785],[-81.263462,36.764754],[-81.044384,36.80857]]]},"id":"51077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.529528,36.803093],[-92.113281,36.792139],[-92.118758,36.496384],[-92.151619,36.496384],[-92.529528,36.496384],[-92.770513,36.496384],[-92.765037,36.80857],[-92.529528,36.803093]]]},"id":"29153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.122871,36.786662],[-88.810686,36.775708],[-88.816163,36.501861],[-88.827116,36.501861],[-88.832593,36.501861],[-89.095486,36.622354],[-89.172164,36.649739],[-89.122871,36.786662]]]},"id":"21105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.539565,36.764754],[-94.068548,36.748324],[-94.079502,36.496384],[-94.473842,36.501861],[-94.616242,36.501861],[-94.616242,36.666169],[-94.616242,36.764754],[-94.539565,36.764754]]]},"id":"29119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.109637,36.748324],[-88.071299,36.677123],[-88.054868,36.496384],[-88.487546,36.501861],[-88.487546,36.748324],[-88.109637,36.748324]]]},"id":"21035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.358779,36.742847],[-118.008255,35.789859],[-119.536321,35.789859],[-119.57466,36.490907],[-118.98315,36.742847],[-118.358779,36.742847]]]},"id":"06107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.071299,36.677123],[-87.69339,36.638785],[-87.63862,36.638785],[-87.594805,36.364938],[-87.753636,36.34303],[-87.983668,36.353984],[-87.989145,36.359461],[-88.054868,36.496384],[-88.071299,36.677123]]]},"id":"47161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.145249,36.671646],[-82.145249,36.594969],[-82.243834,36.594969],[-82.145249,36.671646]]]},"id":"51520"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.890089,36.671646],[-94.616242,36.666169],[-94.616242,36.501861],[-94.561473,36.162291],[-94.769597,36.162291],[-94.796981,36.162291],[-95.010582,36.162291],[-95.005105,36.507338],[-94.999628,36.671646],[-94.890089,36.671646]]]},"id":"40041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.76231,36.649739],[-86.56514,36.633308],[-86.756833,36.403276],[-86.76231,36.403276],[-86.915664,36.381369],[-87.118311,36.458046],[-87.112834,36.644262],[-87.058065,36.644262],[-86.76231,36.649739]]]},"id":"47147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.411786,36.649739],[-86.203662,36.638785],[-86.231047,36.48543],[-86.285816,36.348507],[-86.36797,36.353984],[-86.592525,36.244445],[-86.756833,36.403276],[-86.56514,36.633308],[-86.411786,36.649739]]]},"id":"47165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.095486,36.622354],[-88.832593,36.501861],[-89.117394,36.501861],[-89.347426,36.501861],[-89.418626,36.496384],[-89.325518,36.633308],[-89.172164,36.649739],[-89.095486,36.622354]]]},"id":"21075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.401302,36.638785],[-79.341056,36.5402],[-79.472502,36.5402],[-79.401302,36.638785]]]},"id":"51590"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.112834,36.644262],[-87.118311,36.458046],[-87.288096,36.321122],[-87.512651,36.332076],[-87.594805,36.364938],[-87.63862,36.638785],[-87.337389,36.644262],[-87.112834,36.644262]]]},"id":"47125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.203662,36.638785],[-85.979107,36.627831],[-85.787415,36.622354],[-85.814799,36.501861],[-85.825753,36.41423],[-85.979107,36.425184],[-86.231047,36.48543],[-86.203662,36.638785]]]},"id":"47111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.048474,36.627831],[-89.960843,36.627831],[-89.960843,36.386845],[-89.960843,35.997983],[-90.289459,35.997983],[-90.377091,35.997983],[-90.190875,36.200629],[-90.218259,36.496384],[-90.147059,36.633308],[-90.048474,36.627831]]]},"id":"29069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.278059,36.627831],[-85.283536,36.529246],[-85.497137,36.403276],[-85.814799,36.501861],[-85.787415,36.622354],[-85.43689,36.616877],[-85.29449,36.627831],[-85.278059,36.627831]]]},"id":"47027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.278059,36.627831],[-84.976827,36.616877],[-84.785134,36.605923],[-84.730365,36.523769],[-85.009689,36.567584],[-85.119228,36.408753],[-85.283536,36.534723],[-85.283536,36.529246],[-85.278059,36.627831]]]},"id":"47137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.827587,36.616877],[-81.986418,36.507338],[-82.298603,36.397799],[-82.473866,36.441615],[-82.681989,36.430661],[-82.610789,36.594969],[-82.293127,36.594969],[-82.243834,36.594969],[-82.145249,36.594969],[-81.827587,36.616877]]]},"id":"47163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.827587,36.616877],[-81.646848,36.6114],[-81.679709,36.589492],[-81.734479,36.392322],[-81.920695,36.288261],[-81.931648,36.266353],[-81.986418,36.507338],[-81.827587,36.616877]]]},"id":"47091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.785134,36.605923],[-84.779657,36.605923],[-84.259348,36.589492],[-84.374364,36.21706],[-84.440087,36.162291],[-84.70298,36.370415],[-84.730365,36.523769],[-84.785134,36.605923]]]},"id":"47151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.673316,36.600446],[-83.470669,36.594969],[-83.388515,36.41423],[-83.667839,36.34303],[-83.903347,36.419707],[-83.985501,36.589492],[-83.930732,36.589492],[-83.673316,36.600446]]]},"id":"47025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.464251,36.594969],[-97.058958,36.594969],[-97.009665,36.507338],[-96.927511,36.244445],[-97.031573,36.244445],[-97.354713,36.156814],[-97.458774,36.162291],[-97.464251,36.594969]]]},"id":"40103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.983221,36.594969],[-82.829867,36.594969],[-83.278976,36.392322],[-83.388515,36.41423],[-83.470669,36.594969],[-82.983221,36.594969]]]},"id":"47067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.810215,36.594969],[-95.432306,36.594969],[-95.328245,36.512815],[-95.437783,36.07466],[-95.618522,36.162291],[-95.760923,36.162291],[-95.810215,36.425184],[-95.810215,36.594969]]]},"id":"40131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.654605,36.594969],[-82.610789,36.594969],[-82.681989,36.430661],[-82.703897,36.408753],[-83.081806,36.244445],[-83.158483,36.332076],[-83.257068,36.288261],[-83.278976,36.392322],[-82.829867,36.594969],[-82.654605,36.594969]]]},"id":"47073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.984561,36.594969],[-97.464251,36.594969],[-97.464251,36.594969],[-97.458774,36.162291],[-97.677852,36.162291],[-98.0941,36.167768],[-98.105053,36.162291],[-98.105053,36.463523],[-98.105053,36.594969],[-97.984561,36.594969]]]},"id":"40047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.605735,36.594969],[-99.38118,36.162291],[-99.38118,36.014414],[-100.000075,35.882967],[-100.000075,36.058229],[-100.005552,36.501861],[-100.005552,36.594969],[-99.605735,36.594969]]]},"id":"40045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.226487,36.589492],[-83.985501,36.589492],[-83.903347,36.419707],[-84.001932,36.27183],[-84.374364,36.21706],[-84.259348,36.589492],[-84.226487,36.589492]]]},"id":"47013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.351093,36.573061],[-81.252508,36.364938],[-81.477062,36.238968],[-81.734479,36.392322],[-81.679709,36.589492],[-81.351093,36.573061]]]},"id":"37009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.009689,36.567584],[-84.730365,36.523769],[-84.70298,36.370415],[-84.724888,36.375892],[-84.905627,36.156814],[-84.987781,36.162291],[-85.102797,36.140383],[-85.119228,36.14586],[-85.119228,36.408753],[-85.009689,36.567584]]]},"id":"47049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.978661,36.562108],[-80.901984,36.562108],[-80.967707,36.403276],[-81.082723,36.430661],[-81.252508,36.364938],[-81.351093,36.573061],[-80.978661,36.562108]]]},"id":"37005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.724864,36.529246],[-96.270278,36.162291],[-96.297663,36.162291],[-96.620803,36.162291],[-96.927511,36.244445],[-97.009665,36.507338],[-96.724864,36.529246]]]},"id":"40117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.83626,36.556631],[-80.611706,36.556631],[-80.441921,36.551154],[-80.452875,36.260876],[-80.452875,36.238968],[-80.874599,36.238968],[-80.967707,36.403276],[-80.901984,36.562108],[-80.83626,36.556631],[-80.83626,36.556631]]]},"id":"37171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.914771,36.551154],[-76.542339,36.551154],[-76.493047,36.512815],[-76.454708,36.375892],[-76.55877,36.353984],[-76.695693,36.293737],[-76.914771,36.545677],[-76.914771,36.551154]]]},"id":"37073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.493047,36.551154],[-76.312308,36.551154],[-75.885106,36.162291],[-76.049415,36.184199],[-76.493047,36.512815],[-76.542339,36.551154],[-76.493047,36.551154]]]},"id":"37029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.901537,36.551154],[-75.868676,36.551154],[-75.775568,36.233491],[-75.791998,36.228014],[-75.885106,36.162291],[-76.312308,36.551154],[-76.120615,36.551154],[-75.901537,36.551154]]]},"id":"37053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.441921,36.551154],[-80.053058,36.5402],[-80.025673,36.5402],[-80.036627,36.255399],[-80.036627,36.255399],[-80.452875,36.260876],[-80.441921,36.551154]]]},"id":"37169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.298157,36.545677],[-77.16671,36.545677],[-77.210526,36.244445],[-77.29268,36.167768],[-77.90062,36.507338],[-77.90062,36.545677],[-77.769174,36.545677],[-77.298157,36.545677]]]},"id":"37131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.914771,36.545677],[-76.695693,36.293737],[-76.706647,36.244445],[-77.210526,36.244445],[-77.16671,36.545677],[-76.914771,36.545677]]]},"id":"37091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.322345,36.545677],[-78.048498,36.545677],[-77.90062,36.545677],[-77.90062,36.507338],[-78.004682,36.200629],[-78.163514,36.249922],[-78.305914,36.266353],[-78.322345,36.545677]]]},"id":"37185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.322345,36.545677],[-78.305914,36.266353],[-78.497607,36.173245],[-78.459268,36.5402],[-78.322345,36.545677]]]},"id":"37181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.965427,36.5402],[-79.713488,36.5402],[-79.510841,36.5402],[-79.532749,36.249922],[-79.532749,36.238968],[-80.036627,36.255399],[-80.025673,36.5402],[-79.965427,36.5402]]]},"id":"37157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.470222,36.5402],[-78.459268,36.5402],[-78.497607,36.173245],[-78.546899,36.01989],[-78.749546,36.069183],[-78.804316,36.233491],[-78.798839,36.5402],[-78.733115,36.5402],[-78.470222,36.5402]]]},"id":"37077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.138409,36.5402],[-78.798839,36.5402],[-78.804316,36.233491],[-78.952193,36.238968],[-79.15484,36.244445],[-79.138409,36.5402]]]},"id":"37145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.138409,36.5402],[-79.15484,36.244445],[-79.247948,36.244445],[-79.258902,36.244445],[-79.532749,36.249922],[-79.510841,36.5402],[-79.472502,36.5402],[-79.341056,36.5402],[-79.220563,36.5402],[-79.138409,36.5402]]]},"id":"37033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.283536,36.534723],[-85.119228,36.408753],[-85.119228,36.14586],[-85.497137,36.304691],[-85.497137,36.403276],[-85.283536,36.529246],[-85.283536,36.534723]]]},"id":"47133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.814799,36.501861],[-85.497137,36.403276],[-85.497137,36.304691],[-85.497137,36.299214],[-85.781938,36.238968],[-85.825753,36.41423],[-85.814799,36.501861]]]},"id":"47087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.90062,36.507338],[-77.29268,36.167768],[-77.325542,36.07466],[-77.402219,36.00346],[-77.697974,36.151337],[-78.004682,36.200629],[-77.90062,36.507338]]]},"id":"37083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.986418,36.507338],[-81.931648,36.266353],[-82.079526,36.107521],[-82.221926,36.156814],[-82.320511,36.260876],[-82.342419,36.255399],[-82.298603,36.397799],[-81.986418,36.507338]]]},"id":"47019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.493047,36.512815],[-76.049415,36.184199],[-76.191815,36.118475],[-76.454708,36.375892],[-76.493047,36.512815]]]},"id":"37139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.322768,36.512815],[-95.005105,36.507338],[-95.010582,36.162291],[-95.027013,36.162291],[-95.207752,36.07466],[-95.437783,36.07466],[-95.328245,36.512815],[-95.322768,36.512815]]]},"id":"40097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.117394,36.501861],[-88.832593,36.501861],[-88.827116,36.501861],[-88.958563,36.222537],[-89.155733,36.206106],[-89.265272,36.206106],[-89.484349,36.211583],[-89.347426,36.501861],[-89.117394,36.501861]]]},"id":"47131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.959456,36.501861],[-98.959456,36.507338],[-98.532255,36.463523],[-98.105053,36.463523],[-98.105053,36.162291],[-98.209115,36.162291],[-98.488439,36.162291],[-98.636317,36.162291],[-98.953979,36.162291],[-98.959456,36.501861]]]},"id":"40093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.347426,36.501861],[-89.484349,36.211583],[-89.62675,36.184199],[-89.544596,36.337553],[-89.539119,36.496384],[-89.484349,36.496384],[-89.418626,36.496384],[-89.347426,36.501861]]]},"id":"47095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.827116,36.501861],[-88.816163,36.501861],[-88.514931,36.501861],[-88.531362,36.151337],[-88.690193,36.063706],[-88.958563,36.222537],[-88.827116,36.501861]]]},"id":"47183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.514931,36.501861],[-88.487546,36.501861],[-88.054868,36.496384],[-87.989145,36.359461],[-88.213699,36.118475],[-88.531362,36.151337],[-88.514931,36.501861]]]},"id":"47079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.001438,36.501861],[-102.163466,36.501861],[-102.163466,36.052752],[-102.30039,36.052752],[-103.039777,36.052752],[-103.001438,36.501861]]]},"id":"48111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.812942,36.501861],[-101.621249,36.501861],[-101.621249,36.052752],[-102.125128,36.058229],[-102.163466,36.052752],[-102.163466,36.501861],[-102.03202,36.501861],[-101.812942,36.501861]]]},"id":"48421"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.005552,36.501861],[-100.000075,36.058229],[-100.542292,36.058229],[-100.547769,36.058229],[-100.547769,36.501861],[-100.005552,36.501861]]]},"id":"48295"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.805185,36.501861],[-100.547769,36.501861],[-100.547769,36.058229],[-100.947585,36.058229],[-101.084509,36.058229],[-101.084509,36.501861],[-100.953062,36.501861],[-100.805185,36.501861]]]},"id":"48357"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.473842,36.501861],[-94.079502,36.496384],[-93.865902,36.496384],[-93.816609,36.304691],[-93.887809,36.233491],[-94.013779,36.206106],[-94.550519,36.102045],[-94.561473,36.162291],[-94.616242,36.501861],[-94.473842,36.501861]]]},"id":"05007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.084509,36.501861],[-101.084509,36.058229],[-101.084509,36.052752],[-101.621249,36.052752],[-101.621249,36.501861],[-101.084509,36.501861]]]},"id":"48195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.669648,36.501861],[-91.450571,36.496384],[-91.691556,36.255399],[-92.124235,36.260876],[-92.157096,36.260876],[-92.151619,36.496384],[-92.118758,36.496384],[-91.669648,36.501861]]]},"id":"05049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.728978,36.496384],[-93.586578,36.496384],[-93.312731,36.496384],[-93.2963,36.496384],[-93.301777,36.123952],[-93.477039,36.123952],[-93.816609,36.304691],[-93.865902,36.496384],[-93.728978,36.496384]]]},"id":"05015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.529528,36.496384],[-92.151619,36.496384],[-92.157096,36.260876],[-92.195435,36.134906],[-92.414512,35.976075],[-92.409035,36.063706],[-92.529528,36.496384]]]},"id":"05005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.770513,36.496384],[-92.529528,36.496384],[-92.409035,36.063706],[-92.891006,36.112998],[-92.852668,36.496384],[-92.770513,36.496384]]]},"id":"05089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.782384,36.496384],[-90.57426,36.496384],[-90.218259,36.496384],[-90.190875,36.200629],[-90.804292,36.266353],[-90.782384,36.496384]]]},"id":"05021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.848107,36.496384],[-90.782384,36.496384],[-90.804292,36.266353],[-90.809769,36.151337],[-91.242447,36.255399],[-91.258878,36.255399],[-91.406755,36.496384],[-91.127431,36.496384],[-90.848107,36.496384]]]},"id":"05121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.066268,36.496384],[-92.852668,36.496384],[-92.891006,36.112998],[-92.945776,36.112998],[-93.301777,36.123952],[-93.2963,36.496384],[-93.066268,36.496384]]]},"id":"05009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.450571,36.496384],[-91.406755,36.496384],[-91.258878,36.255399],[-91.357463,35.888444],[-91.707987,35.943213],[-91.691556,36.255399],[-91.450571,36.496384],[-91.450571,36.496384]]]},"id":"05135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.57466,36.490907],[-119.536321,35.789859],[-120.193554,35.789859],[-120.215462,35.789859],[-120.314047,35.904875],[-119.958045,36.403276],[-119.57466,36.490907]]]},"id":"06031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.231047,36.48543],[-85.979107,36.425184],[-86.137939,36.293737],[-86.285816,36.348507],[-86.231047,36.48543]]]},"id":"47169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.118311,36.458046],[-86.915664,36.381369],[-87.052588,36.047275],[-87.184034,36.047275],[-87.288096,36.321122],[-87.118311,36.458046]]]},"id":"47021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.473866,36.441615],[-82.298603,36.397799],[-82.342419,36.255399],[-82.594358,36.096568],[-82.632697,36.419707],[-82.703897,36.408753],[-82.681989,36.430661],[-82.473866,36.441615]]]},"id":"47179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.082723,36.430661],[-80.967707,36.403276],[-80.874599,36.238968],[-80.880076,36.058229],[-81.027953,36.047275],[-81.329185,35.997983],[-81.542786,36.118475],[-81.477062,36.238968],[-81.252508,36.364938],[-81.082723,36.430661]]]},"id":"37193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.903347,36.419707],[-83.667839,36.34303],[-83.733562,36.162291],[-83.925255,36.173245],[-83.941686,36.184199],[-84.001932,36.27183],[-83.903347,36.419707]]]},"id":"47173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.714381,36.425184],[-89.544596,36.337553],[-89.62675,36.184199],[-89.730812,35.997983],[-89.960843,35.997983],[-89.960843,36.386845],[-89.714381,36.425184]]]},"id":"29155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.979107,36.425184],[-85.825753,36.41423],[-85.781938,36.238968],[-85.809322,36.129429],[-86.061262,36.085614],[-86.137939,36.293737],[-85.979107,36.425184]]]},"id":"47159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.919754,36.425184],[-95.810215,36.425184],[-95.760923,36.162291],[-95.821169,35.855582],[-96.03477,35.855582],[-96.297663,36.162291],[-96.270278,36.162291],[-96.001908,36.425184],[-95.919754,36.425184]]]},"id":"40143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.278976,36.392322],[-83.257068,36.288261],[-83.465192,36.173245],[-83.602115,36.151337],[-83.667839,36.080137],[-83.733562,36.162291],[-83.667839,36.34303],[-83.388515,36.41423],[-83.278976,36.392322]]]},"id":"47057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.632697,36.419707],[-82.594358,36.096568],[-82.605312,36.041798],[-82.786051,35.987029],[-82.901067,35.943213],[-83.16396,36.178722],[-83.081806,36.244445],[-82.703897,36.408753],[-82.632697,36.419707]]]},"id":"47059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.76231,36.403276],[-86.756833,36.403276],[-86.592525,36.244445],[-86.515848,36.102045],[-86.619909,35.970598],[-86.921141,36.052752],[-87.052588,36.047275],[-86.915664,36.381369],[-86.76231,36.403276]]]},"id":"47037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.734479,36.392322],[-81.477062,36.238968],[-81.542786,36.118475],[-81.685186,36.123952],[-81.811156,36.112998],[-81.920695,36.288261],[-81.734479,36.392322]]]},"id":"37189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.454708,36.375892],[-76.191815,36.118475],[-76.410893,36.07466],[-76.55877,36.353984],[-76.454708,36.375892]]]},"id":"37143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.724888,36.375892],[-84.70298,36.370415],[-84.440087,36.162291],[-84.341502,36.047275],[-84.681073,35.910352],[-84.905627,36.156814],[-84.724888,36.375892]]]},"id":"47129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.753636,36.34303],[-87.594805,36.364938],[-87.512651,36.332076],[-87.56742,36.178722],[-87.879606,36.233491],[-87.950806,36.244445],[-87.983668,36.353984],[-87.753636,36.34303]]]},"id":"47083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.989145,36.359461],[-87.983668,36.353984],[-87.950806,36.244445],[-87.96176,35.839151],[-87.972714,35.817244],[-88.175361,35.844628],[-88.213699,36.118475],[-87.989145,36.359461]]]},"id":"47005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.36797,36.353984],[-86.285816,36.348507],[-86.137939,36.293737],[-86.061262,36.085614],[-86.017446,35.959644],[-86.15437,35.954167],[-86.515848,36.102045],[-86.592525,36.244445],[-86.36797,36.353984]]]},"id":"47189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.695693,36.293737],[-76.55877,36.353984],[-76.410893,36.07466],[-76.668309,36.01989],[-76.706647,36.244445],[-76.695693,36.293737]]]},"id":"37041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.158483,36.332076],[-83.081806,36.244445],[-83.16396,36.178722],[-83.23516,36.085614],[-83.465192,36.173245],[-83.257068,36.288261],[-83.158483,36.332076]]]},"id":"47063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.512651,36.332076],[-87.288096,36.321122],[-87.184034,36.047275],[-87.205942,35.959644],[-87.512651,35.992506],[-87.534558,35.992506],[-87.56742,36.178722],[-87.512651,36.332076]]]},"id":"47043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.816609,36.304691],[-93.477039,36.123952],[-93.520854,35.762474],[-93.696116,35.767951],[-93.909717,35.762474],[-93.964486,35.762474],[-93.887809,36.233491],[-93.816609,36.304691]]]},"id":"05087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.497137,36.299214],[-85.497137,36.304691],[-85.119228,36.14586],[-85.102797,36.140383],[-85.261628,35.981552],[-85.508091,36.080137],[-85.645014,36.014414],[-85.809322,36.129429],[-85.781938,36.238968],[-85.497137,36.299214]]]},"id":"47141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.001932,36.27183],[-83.941686,36.184199],[-84.270302,35.910352],[-84.341502,36.047275],[-84.440087,36.162291],[-84.374364,36.21706],[-84.001932,36.27183]]]},"id":"47001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.452875,36.238968],[-80.49669,36.047275],[-80.69386,36.052752],[-80.880076,36.058229],[-80.874599,36.238968],[-80.452875,36.238968]]]},"id":"37197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.931648,36.266353],[-81.920695,36.288261],[-81.811156,36.112998],[-81.805679,35.959644],[-81.898787,35.997983],[-81.942602,35.959644],[-81.948079,35.954167],[-81.980941,35.910352],[-82.079526,36.107521],[-81.931648,36.266353]]]},"id":"37011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.804292,36.266353],[-90.190875,36.200629],[-90.377091,35.997983],[-90.853584,35.970598],[-90.809769,36.151337],[-90.804292,36.266353]]]},"id":"05055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.163514,36.249922],[-78.004682,36.200629],[-78.053975,36.134906],[-78.256622,35.817244],[-78.546899,36.01989],[-78.497607,36.173245],[-78.305914,36.266353],[-78.163514,36.249922]]]},"id":"37069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.340092,36.260876],[-104.436396,36.21706],[-104.365196,35.778905],[-105.718001,35.872013],[-105.718001,35.976075],[-105.531785,36.014414],[-105.340092,36.260876]]]},"id":"35033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.452875,36.260876],[-80.036627,36.255399],[-80.042104,36.008937],[-80.211889,36.008937],[-80.398105,35.970598],[-80.49669,36.047275],[-80.452875,36.238968],[-80.452875,36.260876]]]},"id":"37067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.124235,36.260876],[-91.691556,36.255399],[-91.707987,35.943213],[-91.850387,35.866536],[-92.195435,36.134906],[-92.157096,36.260876],[-92.124235,36.260876]]]},"id":"05065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.320511,36.260876],[-82.221926,36.156814],[-82.419096,36.07466],[-82.506727,35.976075],[-82.605312,36.041798],[-82.594358,36.096568],[-82.342419,36.255399],[-82.320511,36.260876]]]},"id":"47171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.242447,36.255399],[-90.809769,36.151337],[-90.853584,35.970598],[-91.034323,35.882967],[-91.198632,35.888444],[-91.357463,35.888444],[-91.258878,36.255399],[-91.242447,36.255399]]]},"id":"05075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.036627,36.255399],[-80.036627,36.255399],[-79.532749,36.238968],[-79.543702,35.899398],[-80.036627,35.921306],[-80.047581,35.921306],[-80.042104,36.008937],[-80.036627,36.255399]]]},"id":"37081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.532749,36.249922],[-79.258902,36.244445],[-79.247948,35.87749],[-79.543702,35.844628],[-79.543702,35.899398],[-79.532749,36.238968],[-79.532749,36.249922]]]},"id":"37001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.706647,36.244445],[-76.668309,36.01989],[-76.690217,35.943213],[-76.761417,35.866536],[-77.325542,36.07466],[-77.29268,36.167768],[-77.210526,36.244445],[-76.706647,36.244445]]]},"id":"37015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.031573,36.244445],[-96.927511,36.244445],[-96.620803,36.162291],[-96.620803,35.943213],[-97.080866,35.943213],[-97.141112,35.943213],[-97.354713,36.156814],[-97.031573,36.244445]]]},"id":"40119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.879606,36.233491],[-87.56742,36.178722],[-87.534558,35.992506],[-87.715298,35.839151],[-87.96176,35.839151],[-87.950806,36.244445],[-87.879606,36.233491]]]},"id":"47085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.247948,36.244445],[-79.15484,36.244445],[-78.952193,36.238968],[-79.017916,35.861059],[-79.187701,35.872013],[-79.247948,35.87749],[-79.258902,36.244445],[-79.247948,36.244445]]]},"id":"37135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.952193,36.238968],[-78.804316,36.233491],[-78.749546,36.069183],[-78.908377,35.866536],[-79.017916,35.861059],[-78.952193,36.238968]]]},"id":"37063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.013779,36.206106],[-93.887809,36.233491],[-93.964486,35.762474],[-94.490273,35.756997],[-94.550519,36.102045],[-94.013779,36.206106]]]},"id":"05143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.155733,36.206106],[-88.958563,36.222537],[-88.690193,36.063706],[-88.706624,35.789859],[-88.914747,35.795336],[-89.188594,35.997983],[-89.188594,35.997983],[-89.155733,36.206106]]]},"id":"47053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.623976,36.222537],[-106.884589,36.21706],[-106.249264,35.965121],[-106.249264,35.756997],[-106.243787,35.21478],[-107.196774,35.220257],[-107.31179,35.307888],[-107.306313,35.997983],[-107.623976,35.997983],[-107.623976,36.222537]]]},"id":"35043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.436396,36.21706],[-104.009195,36.21706],[-103.362916,36.085614],[-103.37387,35.740566],[-103.636763,35.390042],[-103.976333,35.800813],[-104.365196,35.778905],[-104.436396,36.21706]]]},"id":"35021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.265272,36.206106],[-89.155733,36.206106],[-89.188594,35.997983],[-89.341949,35.882967],[-89.489826,35.94869],[-89.643181,35.904875],[-89.730812,35.997983],[-89.62675,36.184199],[-89.484349,36.211583],[-89.265272,36.206106]]]},"id":"47045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.053975,36.134906],[-78.004682,36.200629],[-77.697974,36.151337],[-77.82942,35.866536],[-78.190898,35.729613],[-78.256622,35.817244],[-78.053975,36.134906]]]},"id":"37127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.602115,36.151337],[-83.465192,36.173245],[-83.23516,36.085614],[-83.311837,35.893921],[-83.673316,36.036321],[-83.667839,36.080137],[-83.602115,36.151337]]]},"id":"47089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.925255,36.173245],[-83.733562,36.162291],[-83.667839,36.080137],[-83.673316,36.036321],[-83.678792,36.030844],[-83.793808,35.888444],[-84.16624,35.80629],[-84.264825,35.899398],[-84.270302,35.910352],[-83.941686,36.184199],[-83.925255,36.173245]]]},"id":"47093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.16396,36.178722],[-82.901067,35.943213],[-82.961313,35.789859],[-83.257068,35.713182],[-83.311837,35.893921],[-83.23516,36.085614],[-83.16396,36.178722]]]},"id":"47029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.987781,36.162291],[-84.905627,36.156814],[-84.681073,35.910352],[-84.779657,35.822721],[-84.916581,35.762474],[-85.256151,35.767951],[-85.256151,35.767951],[-85.272582,35.789859],[-85.267105,35.795336],[-85.261628,35.981552],[-85.102797,36.140383],[-84.987781,36.162291]]]},"id":"47035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.488439,36.162291],[-98.209115,36.162291],[-98.209115,35.724136],[-98.313177,35.548874],[-98.587024,35.548874],[-98.625363,35.548874],[-98.63084,35.811767],[-98.636317,36.162291],[-98.488439,36.162291]]]},"id":"40011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.0941,36.167768],[-97.677852,36.162291],[-97.672375,35.724136],[-97.973607,35.724136],[-98.209115,35.724136],[-98.209115,36.162291],[-98.105053,36.162291],[-98.0941,36.167768]]]},"id":"40073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.636317,36.162291],[-98.63084,35.811767],[-98.817056,35.811767],[-99.375704,35.811767],[-99.38118,36.014414],[-99.38118,36.162291],[-98.953979,36.162291],[-98.636317,36.162291]]]},"id":"40043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.677852,36.162291],[-97.458774,36.162291],[-97.354713,36.156814],[-97.141112,35.943213],[-97.141112,35.724136],[-97.672375,35.724136],[-97.677852,36.162291]]]},"id":"40083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.620803,36.162291],[-96.297663,36.162291],[-96.03477,35.855582],[-96.138832,35.855582],[-96.193601,35.636505],[-96.478402,35.636505],[-96.620803,35.636505],[-96.620803,35.943213],[-96.620803,36.162291]]]},"id":"40037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.618522,36.162291],[-95.437783,36.07466],[-95.207752,36.07466],[-95.267998,35.811767],[-95.656861,35.855582],[-95.7664,35.855582],[-95.821169,35.855582],[-95.760923,36.162291],[-95.618522,36.162291]]]},"id":"40145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.027013,36.162291],[-95.010582,36.162291],[-94.796981,36.162291],[-94.807935,35.636505],[-94.851751,35.636505],[-95.125598,35.636505],[-95.267998,35.811767],[-95.207752,36.07466],[-95.027013,36.162291]]]},"id":"40021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.769597,36.162291],[-94.561473,36.162291],[-94.550519,36.102045],[-94.490273,35.756997],[-94.473842,35.636505],[-94.807935,35.636505],[-94.796981,36.162291],[-94.769597,36.162291]]]},"id":"40001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.079526,36.107521],[-81.980941,35.910352],[-82.134295,35.822721],[-82.419096,36.07466],[-82.221926,36.156814],[-82.079526,36.107521]]]},"id":"37121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.697974,36.151337],[-77.402219,36.00346],[-77.352926,35.817244],[-77.413173,35.822721],[-77.659635,35.674843],[-77.82942,35.866536],[-77.82942,35.866536],[-77.697974,36.151337]]]},"id":"37065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.531362,36.151337],[-88.213699,36.118475],[-88.175361,35.844628],[-88.180837,35.817244],[-88.514931,35.822721],[-88.608039,35.789859],[-88.706624,35.789859],[-88.690193,36.063706],[-88.531362,36.151337]]]},"id":"47017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.195435,36.134906],[-91.850387,35.866536],[-91.839434,35.702228],[-91.998265,35.707705],[-92.23925,35.713182],[-92.414512,35.789859],[-92.414512,35.976075],[-92.195435,36.134906]]]},"id":"05137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.809322,36.129429],[-85.645014,36.014414],[-85.683353,35.833674],[-85.885999,35.839151],[-86.017446,35.959644],[-86.061262,36.085614],[-85.809322,36.129429]]]},"id":"47041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.301777,36.123952],[-92.945776,36.112998],[-92.951253,35.724136],[-93.016976,35.724136],[-93.164853,35.729613],[-93.520854,35.762474],[-93.477039,36.123952],[-93.301777,36.123952]]]},"id":"05101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.685186,36.123952],[-81.542786,36.118475],[-81.329185,35.997983],[-81.334662,35.795336],[-81.362047,35.767951],[-81.805679,35.959644],[-81.811156,36.112998],[-81.685186,36.123952]]]},"id":"37027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.945776,36.112998],[-92.891006,36.112998],[-92.409035,36.063706],[-92.414512,35.976075],[-92.414512,35.789859],[-92.611682,35.789859],[-92.808852,35.724136],[-92.951253,35.724136],[-92.945776,36.112998]]]},"id":"05129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.515848,36.102045],[-86.15437,35.954167],[-86.209139,35.702228],[-86.247477,35.631028],[-86.521325,35.691274],[-86.641817,35.685797],[-86.685633,35.707705],[-86.619909,35.970598],[-86.515848,36.102045]]]},"id":"47149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.419096,36.07466],[-82.134295,35.822721],[-82.276696,35.702228],[-82.408142,35.817244],[-82.506727,35.976075],[-82.419096,36.07466]]]},"id":"37199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.508091,36.080137],[-85.261628,35.981552],[-85.267105,35.795336],[-85.42046,35.817244],[-85.601199,35.795336],[-85.683353,35.833674],[-85.645014,36.014414],[-85.508091,36.080137]]]},"id":"47185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.749546,36.069183],[-78.546899,36.01989],[-78.256622,35.817244],[-78.711208,35.521489],[-78.913854,35.581735],[-78.908377,35.866536],[-78.749546,36.069183]]]},"id":"37183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.325542,36.07466],[-76.761417,35.866536],[-76.843571,35.707705],[-77.172187,35.73509],[-77.352926,35.817244],[-77.402219,36.00346],[-77.325542,36.07466]]]},"id":"37117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.786051,35.987029],[-82.605312,36.041798],[-82.506727,35.976075],[-82.408142,35.817244],[-82.884636,35.68032],[-82.961313,35.789859],[-82.901067,35.943213],[-82.786051,35.987029]]]},"id":"37115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.69386,36.052752],[-80.49669,36.047275],[-80.398105,35.970598],[-80.458352,35.740566],[-80.688383,35.861059],[-80.710291,35.850105],[-80.69386,36.052752]]]},"id":"37059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.947585,36.058229],[-100.547769,36.058229],[-100.542292,36.058229],[-100.542292,35.620074],[-101.084509,35.620074],[-101.084509,35.625551],[-101.084509,35.625551],[-101.084509,36.052752],[-101.084509,36.058229],[-100.947585,36.058229]]]},"id":"48393"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.880076,36.058229],[-80.69386,36.052752],[-80.710291,35.850105],[-80.737675,35.505058],[-80.781491,35.505058],[-80.907461,35.516012],[-80.945799,35.488627],[-80.96223,35.548874],[-81.110107,35.778905],[-81.027953,36.047275],[-80.880076,36.058229]]]},"id":"37097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.000075,36.058229],[-100.000075,35.882967],[-100.000075,35.620074],[-100.542292,35.620074],[-100.542292,36.058229],[-100.000075,36.058229]]]},"id":"48211"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.125128,36.058229],[-101.621249,36.052752],[-101.621249,35.625551],[-101.621249,35.620074],[-101.659588,35.620074],[-102.163466,35.620074],[-102.163466,35.625551],[-102.163466,36.052752],[-102.125128,36.058229]]]},"id":"48341"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.30039,36.052752],[-102.163466,36.052752],[-102.163466,35.625551],[-103.039777,35.620074],[-103.039777,35.740566],[-103.039777,36.052752],[-102.30039,36.052752]]]},"id":"48205"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.621249,36.052752],[-101.084509,36.052752],[-101.084509,35.625551],[-101.621249,35.625551],[-101.621249,36.052752]]]},"id":"48233"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.921141,36.052752],[-86.619909,35.970598],[-86.685633,35.707705],[-86.784218,35.707705],[-87.216896,35.850105],[-87.205942,35.959644],[-87.184034,36.047275],[-87.052588,36.047275],[-86.921141,36.052752]]]},"id":"47187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.582488,35.641982],[-84.620826,35.641982],[-84.724888,35.75152],[-84.768704,35.80629],[-84.779657,35.822721],[-84.681073,35.910352],[-84.341502,36.047275],[-84.270302,35.910352],[-84.264825,35.899398],[-84.582488,35.641982]]]},"id":"47145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.027953,36.047275],[-81.110107,35.778905],[-81.192262,35.822721],[-81.334662,35.795336],[-81.329185,35.997983],[-81.027953,36.047275]]]},"id":"37003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.678792,36.030844],[-83.673316,36.036321],[-83.311837,35.893921],[-83.257068,35.713182],[-83.257068,35.696751],[-83.662362,35.570781],[-83.793808,35.888444],[-83.678792,36.030844]]]},"id":"47155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.211889,36.008937],[-80.042104,36.008937],[-80.047581,35.921306],[-80.064012,35.505058],[-80.184505,35.505058],[-80.458352,35.740566],[-80.398105,35.970598],[-80.211889,36.008937]]]},"id":"37057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.38118,36.014414],[-99.375704,35.811767],[-99.36475,35.510535],[-100.000075,35.422904],[-100.000075,35.620074],[-100.000075,35.882967],[-99.38118,36.014414]]]},"id":"40129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.883672,36.00346],[-107.623976,35.997983],[-107.306313,35.997983],[-107.31179,35.307888],[-107.985454,35.307888],[-108.467425,35.307888],[-108.467425,34.957364],[-109.04798,34.957364],[-109.04798,36.00346],[-108.883672,36.00346]]]},"id":"35031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.068525,35.997983],[-105.718001,35.976075],[-105.718001,35.872013],[-105.712524,35.039518],[-106.243787,35.039518],[-106.243787,35.21478],[-106.249264,35.756997],[-106.249264,35.839151],[-106.249264,35.855582],[-106.243787,35.932259],[-106.068525,35.997983]]]},"id":"35049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.730812,35.997983],[-89.643181,35.904875],[-89.911551,35.53792],[-90.141582,35.439335],[-90.289459,35.439335],[-90.289459,35.702228],[-90.289459,35.997983],[-89.960843,35.997983],[-89.730812,35.997983]]]},"id":"05093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.188594,35.997983],[-88.914747,35.795336],[-89.068102,35.691274],[-89.341949,35.789859],[-89.35838,35.817244],[-89.341949,35.882967],[-89.188594,35.997983],[-89.188594,35.997983]]]},"id":"47033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.898787,35.997983],[-81.805679,35.959644],[-81.362047,35.767951],[-81.531832,35.570781],[-81.537309,35.565304],[-81.586601,35.565304],[-81.690663,35.581735],[-81.82211,35.576258],[-81.942602,35.959644],[-81.898787,35.997983]]]},"id":"37023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.289459,35.997983],[-90.289459,35.702228],[-90.930262,35.707705],[-91.034323,35.707705],[-91.034323,35.882967],[-90.853584,35.970598],[-90.377091,35.997983],[-90.289459,35.997983]]]},"id":"05031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.512651,35.992506],[-87.205942,35.959644],[-87.216896,35.850105],[-87.337389,35.658412],[-87.660528,35.60912],[-87.720774,35.795336],[-87.715298,35.839151],[-87.534558,35.992506],[-87.512651,35.992506]]]},"id":"47081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.000122,35.904875],[-76.027507,35.669366],[-76.394462,35.696751],[-76.367077,35.943213],[-76.000122,35.904875]]]},"id":"37177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.367077,35.943213],[-76.394462,35.696751],[-76.635447,35.707705],[-76.640924,35.707705],[-76.843571,35.707705],[-76.761417,35.866536],[-76.690217,35.943213],[-76.367077,35.943213]]]},"id":"37187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.868676,35.581735],[-76.027507,35.669366],[-76.000122,35.904875],[-75.868676,35.581735]]]},"id":"37055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.017446,35.959644],[-85.885999,35.839151],[-85.984584,35.658412],[-86.209139,35.702228],[-86.15437,35.954167],[-86.017446,35.959644]]]},"id":"47015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.249264,35.965121],[-106.243787,35.932259],[-106.249264,35.855582],[-106.249264,35.839151],[-106.249264,35.756997],[-106.249264,35.965121]]]},"id":"35028"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.948079,35.954167],[-81.942602,35.959644],[-81.82211,35.576258],[-82.167157,35.526966],[-82.276696,35.702228],[-82.134295,35.822721],[-81.980941,35.910352],[-81.948079,35.954167]]]},"id":"37111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.489826,35.94869],[-89.341949,35.882967],[-89.35838,35.817244],[-89.50078,35.581735],[-89.643181,35.647459],[-89.911551,35.53792],[-89.643181,35.904875],[-89.489826,35.94869]]]},"id":"47097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.850387,35.866536],[-91.707987,35.943213],[-91.357463,35.888444],[-91.198632,35.888444],[-91.582017,35.532443],[-91.795618,35.532443],[-91.839434,35.702228],[-91.850387,35.866536]]]},"id":"05063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.080866,35.943213],[-96.620803,35.943213],[-96.620803,35.636505],[-96.626279,35.461243],[-97.141112,35.466719],[-97.141112,35.724136],[-97.141112,35.943213],[-97.080866,35.943213]]]},"id":"40081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.036627,35.921306],[-79.543702,35.899398],[-79.543702,35.844628],[-79.554656,35.516012],[-79.768257,35.510535],[-80.064012,35.505058],[-80.047581,35.921306],[-80.036627,35.921306]]]},"id":"37151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.264825,35.899398],[-84.16624,35.80629],[-84.188148,35.60912],[-84.43461,35.669366],[-84.527718,35.625551],[-84.582488,35.641982],[-84.264825,35.899398]]]},"id":"47105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.198632,35.888444],[-91.034323,35.882967],[-91.034323,35.707705],[-91.0398,35.444812],[-91.0398,35.351704],[-91.346509,35.439335],[-91.582017,35.532443],[-91.198632,35.888444]]]},"id":"05067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.793808,35.888444],[-83.662362,35.570781],[-83.952639,35.461243],[-83.963593,35.461243],[-84.188148,35.60912],[-84.16624,35.80629],[-83.793808,35.888444]]]},"id":"47009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.187701,35.872013],[-79.017916,35.861059],[-78.908377,35.866536],[-78.913854,35.581735],[-78.968624,35.521489],[-79.242471,35.570781],[-79.35201,35.516012],[-79.554656,35.516012],[-79.543702,35.844628],[-79.247948,35.87749],[-79.187701,35.872013]]]},"id":"37037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.365196,35.778905],[-103.976333,35.800813],[-103.636763,35.390042],[-104.124211,35.14358],[-105.290799,35.21478],[-105.290799,35.039518],[-105.712524,35.039518],[-105.718001,35.872013],[-104.365196,35.778905]]]},"id":"35047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.82942,35.866536],[-77.659635,35.674843],[-77.697974,35.652935],[-77.823943,35.570781],[-78.064929,35.587212],[-78.190898,35.729613],[-77.82942,35.866536],[-77.82942,35.866536]]]},"id":"37195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.688383,35.861059],[-80.458352,35.740566],[-80.184505,35.505058],[-80.233797,35.505058],[-80.294043,35.505058],[-80.737675,35.505058],[-80.710291,35.850105],[-80.688383,35.861059]]]},"id":"37159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.138832,35.855582],[-96.03477,35.855582],[-95.821169,35.855582],[-95.7664,35.855582],[-95.71163,35.554351],[-95.980001,35.379088],[-96.193601,35.636505],[-96.138832,35.855582]]]},"id":"40111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.656861,35.855582],[-95.267998,35.811767],[-95.125598,35.636505],[-95.048921,35.461243],[-95.344675,35.291457],[-95.476122,35.554351],[-95.71163,35.554351],[-95.7664,35.855582],[-95.656861,35.855582]]]},"id":"40101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.683353,35.833674],[-85.601199,35.795336],[-85.557383,35.532443],[-85.606675,35.532443],[-85.875046,35.521489],[-85.984584,35.658412],[-85.885999,35.839151],[-85.683353,35.833674]]]},"id":"47177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.216896,35.850105],[-86.784218,35.707705],[-86.95948,35.417427],[-87.129265,35.455766],[-87.205942,35.433858],[-87.293573,35.444812],[-87.337389,35.658412],[-87.216896,35.850105]]]},"id":"47119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.175361,35.844628],[-87.972714,35.817244],[-88.005575,35.422904],[-88.022006,35.390042],[-88.241084,35.422904],[-88.180837,35.817244],[-88.175361,35.844628]]]},"id":"47039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.720774,35.795336],[-87.660528,35.60912],[-87.715298,35.48315],[-87.956283,35.461243],[-88.005575,35.422904],[-87.972714,35.817244],[-87.96176,35.839151],[-87.715298,35.839151],[-87.720774,35.795336]]]},"id":"47135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.413173,35.822721],[-77.352926,35.817244],[-77.172187,35.73509],[-77.188618,35.417427],[-77.391265,35.34075],[-77.446034,35.379088],[-77.473419,35.428381],[-77.681543,35.636505],[-77.697974,35.652935],[-77.659635,35.674843],[-77.413173,35.822721]]]},"id":"37147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.192262,35.822721],[-81.110107,35.778905],[-80.96223,35.548874],[-81.488016,35.570781],[-81.531832,35.570781],[-81.362047,35.767951],[-81.334662,35.795336],[-81.192262,35.822721]]]},"id":"37035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.768704,35.80629],[-84.724888,35.75152],[-85.015166,35.41195],[-85.130182,35.455766],[-85.135659,35.455766],[-84.916581,35.762474],[-84.779657,35.822721],[-84.768704,35.80629]]]},"id":"47143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.514931,35.822721],[-88.180837,35.817244],[-88.241084,35.422904],[-88.361576,35.417427],[-88.613516,35.587212],[-88.608039,35.789859],[-88.514931,35.822721]]]},"id":"47077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.276696,35.702228],[-82.167157,35.526966],[-82.265742,35.466719],[-82.408142,35.472196],[-82.747713,35.422904],[-82.884636,35.68032],[-82.408142,35.817244],[-82.276696,35.702228]]]},"id":"37021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.341949,35.789859],[-89.068102,35.691274],[-89.079056,35.433858],[-89.150256,35.433858],[-89.183118,35.395519],[-89.473395,35.400996],[-89.50078,35.581735],[-89.35838,35.817244],[-89.341949,35.789859]]]},"id":"47075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.42046,35.817244],[-85.267105,35.795336],[-85.272582,35.789859],[-85.256151,35.767951],[-85.256151,35.767951],[-85.256151,35.767951],[-85.425936,35.565304],[-85.557383,35.532443],[-85.601199,35.795336],[-85.42046,35.817244]]]},"id":"47175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.256622,35.817244],[-78.190898,35.729613],[-78.064929,35.587212],[-78.305914,35.28598],[-78.541422,35.313365],[-78.711208,35.521489],[-78.256622,35.817244]]]},"id":"37101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.817056,35.811767],[-98.63084,35.811767],[-98.625363,35.548874],[-98.625363,35.466719],[-99.16758,35.466719],[-99.36475,35.466719],[-99.36475,35.510535],[-99.375704,35.811767],[-98.817056,35.811767]]]},"id":"40039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.630346,35.795336],[-115.647693,35.80629],[-114.634459,35.00118],[-114.136058,34.305608],[-114.43729,34.081054],[-114.733044,34.081054],[-117.559146,34.031761],[-117.674161,33.87293],[-117.7837,33.94413],[-117.668684,34.820441],[-117.630346,35.795336]]]},"id":"06071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-118.008255,35.789859],[-117.630346,35.795336],[-117.668684,34.820441],[-118.884565,34.793056],[-119.443213,34.902595],[-119.470598,34.902595],[-120.193554,35.789859],[-119.536321,35.789859],[-118.008255,35.789859]]]},"id":"06029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.914747,35.795336],[-88.706624,35.789859],[-88.608039,35.789859],[-88.613516,35.587212],[-88.701147,35.477673],[-88.843547,35.428381],[-89.079056,35.433858],[-89.068102,35.691274],[-88.914747,35.795336]]]},"id":"47113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-121.343711,35.795336],[-120.215462,35.789859],[-120.193554,35.789859],[-119.470598,34.902595],[-120.094969,35.116195],[-120.64814,34.973795],[-121.343711,35.795336]]]},"id":"06079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.961313,35.789859],[-82.884636,35.68032],[-82.747713,35.422904],[-82.922975,35.291457],[-83.185868,35.516012],[-83.257068,35.696751],[-83.257068,35.713182],[-82.961313,35.789859]]]},"id":"37087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.611682,35.789859],[-92.414512,35.789859],[-92.23925,35.713182],[-92.250204,35.362658],[-92.480236,35.368135],[-92.480236,35.368135],[-92.852668,35.461243],[-92.808852,35.724136],[-92.611682,35.789859]]]},"id":"05141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.909717,35.762474],[-93.696116,35.767951],[-93.712547,35.373611],[-94.03021,35.21478],[-94.074025,35.444812],[-93.909717,35.762474]]]},"id":"05047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.256151,35.767951],[-85.256151,35.767951],[-84.916581,35.762474],[-85.135659,35.455766],[-85.22329,35.351704],[-85.425936,35.565304],[-85.256151,35.767951]]]},"id":"47007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.696116,35.767951],[-93.520854,35.762474],[-93.164853,35.729613],[-93.2963,35.329796],[-93.422269,35.329796],[-93.712547,35.373611],[-93.696116,35.767951]]]},"id":"05071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.964486,35.762474],[-93.909717,35.762474],[-94.074025,35.444812],[-94.380734,35.444812],[-94.430026,35.395519],[-94.473842,35.636505],[-94.490273,35.756997],[-93.964486,35.762474]]]},"id":"05033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.620826,35.641982],[-84.861812,35.351704],[-84.872765,35.357181],[-84.943966,35.28598],[-85.015166,35.41195],[-84.724888,35.75152],[-84.620826,35.641982]]]},"id":"47121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.37387,35.740566],[-103.039777,35.740566],[-103.039777,35.620074],[-103.039777,35.181919],[-103.045254,34.951887],[-103.264331,34.951887],[-103.740825,34.60684],[-103.948949,34.60684],[-104.129688,34.776625],[-104.124211,35.14358],[-103.636763,35.390042],[-103.37387,35.740566]]]},"id":"35037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.172187,35.73509],[-76.843571,35.707705],[-76.640924,35.707705],[-76.547816,35.390042],[-76.602586,35.335273],[-76.624493,35.253119],[-76.89834,35.253119],[-77.188618,35.417427],[-77.172187,35.73509]]]},"id":"37013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.016976,35.724136],[-92.951253,35.724136],[-92.808852,35.724136],[-92.852668,35.461243],[-92.896483,35.170965],[-93.279869,35.318842],[-93.2963,35.329796],[-93.164853,35.729613],[-93.016976,35.724136]]]},"id":"05115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.973607,35.724136],[-97.672375,35.724136],[-97.672375,35.379088],[-97.672375,35.335273],[-97.672375,35.335273],[-98.0941,35.379088],[-98.313177,35.548874],[-98.209115,35.724136],[-97.973607,35.724136]]]},"id":"40017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.672375,35.724136],[-97.141112,35.724136],[-97.141112,35.466719],[-97.141112,35.379088],[-97.425913,35.379088],[-97.672375,35.379088],[-97.672375,35.724136]]]},"id":"40109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.998265,35.707705],[-91.839434,35.702228],[-91.795618,35.532443],[-92.113281,35.362658],[-92.250204,35.362658],[-92.23925,35.713182],[-91.998265,35.707705]]]},"id":"05023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.784218,35.707705],[-86.685633,35.707705],[-86.641817,35.685797],[-86.598002,35.362658],[-86.828033,35.264073],[-86.95948,35.417427],[-86.784218,35.707705]]]},"id":"47117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.930262,35.707705],[-90.289459,35.702228],[-90.289459,35.439335],[-90.50306,35.439335],[-90.744046,35.444812],[-91.0398,35.444812],[-91.034323,35.707705],[-90.930262,35.707705]]]},"id":"05111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.635447,35.707705],[-76.394462,35.696751],[-76.027507,35.669366],[-75.868676,35.581735],[-76.547816,35.390042],[-76.640924,35.707705],[-76.635447,35.707705]]]},"id":"37095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.209139,35.702228],[-85.984584,35.658412],[-85.875046,35.521489],[-85.913384,35.291457],[-86.214616,35.346227],[-86.263908,35.335273],[-86.258431,35.41195],[-86.258431,35.41195],[-86.247477,35.631028],[-86.209139,35.702228]]]},"id":"47031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.521325,35.691274],[-86.247477,35.631028],[-86.258431,35.41195],[-86.526801,35.357181],[-86.598002,35.362658],[-86.641817,35.685797],[-86.521325,35.691274]]]},"id":"47003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.662362,35.570781],[-83.257068,35.696751],[-83.185868,35.516012],[-83.207776,35.516012],[-83.339222,35.329796],[-83.678792,35.280503],[-83.952639,35.461243],[-83.662362,35.570781]]]},"id":"37173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.43461,35.669366],[-84.188148,35.60912],[-83.963593,35.461243],[-84.029317,35.291457],[-84.29221,35.209303],[-84.494857,35.28598],[-84.522241,35.60912],[-84.522241,35.620074],[-84.527718,35.625551],[-84.43461,35.669366]]]},"id":"47123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.337389,35.658412],[-87.293573,35.444812],[-87.435974,35.455766],[-87.572897,35.400996],[-87.715298,35.48315],[-87.660528,35.60912],[-87.337389,35.658412]]]},"id":"47101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.681543,35.636505],[-77.473419,35.428381],[-77.807512,35.368135],[-77.823943,35.570781],[-77.697974,35.652935],[-77.681543,35.636505]]]},"id":"37079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.643181,35.647459],[-89.50078,35.581735],[-89.473395,35.400996],[-89.550073,35.400996],[-89.632227,35.373611],[-89.774627,35.406473],[-90.075859,35.384565],[-90.141582,35.439335],[-89.911551,35.53792],[-89.643181,35.647459]]]},"id":"47167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.582488,35.641982],[-84.527718,35.625551],[-84.522241,35.620074],[-84.522241,35.60912],[-84.494857,35.28598],[-84.686549,35.253119],[-84.70298,35.242165],[-84.861812,35.351704],[-84.620826,35.641982],[-84.582488,35.641982]]]},"id":"47107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.478402,35.636505],[-96.193601,35.636505],[-95.980001,35.379088],[-95.980001,35.291457],[-96.199078,35.291457],[-96.440064,35.291457],[-96.440064,35.466719],[-96.626279,35.400996],[-96.626279,35.461243],[-96.620803,35.636505],[-96.478402,35.636505]]]},"id":"40107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.851751,35.636505],[-94.807935,35.636505],[-94.473842,35.636505],[-94.430026,35.395519],[-94.430026,35.379088],[-94.813412,35.324319],[-95.048921,35.461243],[-95.125598,35.636505],[-94.851751,35.636505]]]},"id":"40135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.242471,35.570781],[-78.968624,35.521489],[-79.182224,35.307888],[-79.35201,35.516012],[-79.242471,35.570781]]]},"id":"37105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.163466,35.625551],[-102.163466,35.620074],[-102.168943,35.181919],[-102.579714,35.187396],[-103.039777,35.181919],[-103.039777,35.620074],[-102.163466,35.625551]]]},"id":"48359"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.084509,35.625551],[-101.084509,35.620074],[-101.084509,35.181919],[-101.621249,35.181919],[-101.621249,35.620074],[-101.621249,35.625551],[-101.084509,35.625551],[-101.084509,35.625551]]]},"id":"48065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.084509,35.620074],[-100.542292,35.620074],[-100.536815,35.181919],[-100.969493,35.181919],[-101.084509,35.181919],[-101.084509,35.620074]]]},"id":"48179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.659588,35.620074],[-101.621249,35.620074],[-101.621249,35.181919],[-101.988204,35.181919],[-102.168943,35.181919],[-102.163466,35.620074],[-101.659588,35.620074]]]},"id":"48375"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.542292,35.620074],[-100.000075,35.620074],[-100.000075,35.422904],[-100.000075,35.181919],[-100.093183,35.181919],[-100.536815,35.181919],[-100.542292,35.620074]]]},"id":"48483"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.82211,35.576258],[-81.690663,35.581735],[-81.76734,35.181919],[-81.876879,35.181919],[-81.969987,35.187396],[-82.09048,35.357181],[-82.260265,35.395519],[-82.265742,35.466719],[-82.167157,35.526966],[-81.82211,35.576258]]]},"id":"37161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.064929,35.587212],[-77.823943,35.570781],[-77.807512,35.368135],[-77.834897,35.176442],[-78.043021,35.192872],[-78.163514,35.187396],[-78.305914,35.28598],[-78.064929,35.587212]]]},"id":"37191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.701147,35.477673],[-88.613516,35.587212],[-88.361576,35.417427],[-88.361576,35.379088],[-88.378007,35.373611],[-88.783301,35.247642],[-88.843547,35.428381],[-88.701147,35.477673]]]},"id":"47023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.586601,35.565304],[-81.537309,35.565304],[-81.455155,35.417427],[-81.329185,35.165488],[-81.367524,35.165488],[-81.76734,35.181919],[-81.690663,35.581735],[-81.586601,35.565304]]]},"id":"37045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.913854,35.581735],[-78.711208,35.521489],[-78.541422,35.313365],[-78.6181,35.247642],[-78.952193,35.21478],[-79.094593,35.192872],[-79.182224,35.307888],[-78.968624,35.521489],[-78.913854,35.581735]]]},"id":"37085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.488016,35.570781],[-80.96223,35.548874],[-80.945799,35.488627],[-80.956753,35.400996],[-81.455155,35.417427],[-81.537309,35.565304],[-81.531832,35.570781],[-81.488016,35.570781]]]},"id":"37109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.425936,35.565304],[-85.22329,35.351704],[-85.387598,35.149057],[-85.557383,35.318842],[-85.590245,35.521489],[-85.606675,35.532443],[-85.557383,35.532443],[-85.425936,35.565304]]]},"id":"47153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.476122,35.554351],[-95.344675,35.291457],[-95.448737,35.296934],[-95.706154,35.203826],[-95.985477,35.149057],[-95.980001,35.291457],[-95.980001,35.379088],[-95.71163,35.554351],[-95.476122,35.554351]]]},"id":"40091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.587024,35.548874],[-98.313177,35.548874],[-98.0941,35.379088],[-98.0941,34.853302],[-98.619886,34.853302],[-98.619886,35.099764],[-98.625363,35.466719],[-98.625363,35.548874],[-98.587024,35.548874]]]},"id":"40015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.795618,35.532443],[-91.582017,35.532443],[-91.346509,35.439335],[-91.467002,35.088811],[-91.587494,35.023087],[-91.801095,35.028564],[-92.118758,35.066903],[-92.113281,35.362658],[-91.795618,35.532443]]]},"id":"05145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.590245,35.521489],[-85.557383,35.318842],[-85.601199,35.307888],[-85.875046,35.225734],[-85.913384,35.291457],[-85.875046,35.521489],[-85.606675,35.532443],[-85.590245,35.521489]]]},"id":"47061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.336425,35.526966],[-112.438206,35.258596],[-112.334144,34.973795],[-111.775497,34.979272],[-111.556419,34.469916],[-111.496173,33.998899],[-112.273898,33.883884],[-113.336425,33.998899],[-113.330948,34.316562],[-113.336425,35.526966]]]},"id":"04025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.207776,35.516012],[-83.185868,35.516012],[-82.922975,35.291457],[-83.010606,35.028564],[-83.109191,35.00118],[-83.339222,35.329796],[-83.207776,35.516012]]]},"id":"37099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.35201,35.516012],[-79.182224,35.307888],[-79.094593,35.192872],[-79.10007,35.176442],[-79.127455,35.165488],[-79.461548,35.044995],[-79.614903,35.165488],[-79.768257,35.510535],[-79.554656,35.516012],[-79.35201,35.516012]]]},"id":"37125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.907461,35.516012],[-80.781491,35.505058],[-80.55146,35.209303],[-80.841737,35.00118],[-80.907461,35.077857],[-81.044384,35.149057],[-80.956753,35.400996],[-80.945799,35.488627],[-80.907461,35.516012]]]},"id":"37119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.768257,35.510535],[-79.614903,35.165488],[-79.729918,35.176442],[-80.074966,35.14358],[-80.184505,35.505058],[-80.064012,35.505058],[-79.768257,35.510535]]]},"id":"37123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.36475,35.510535],[-99.36475,35.466719],[-99.359273,35.116195],[-99.408565,35.116195],[-99.709797,35.116195],[-99.890536,35.028564],[-99.934351,35.028564],[-100.000075,35.028564],[-100.000075,35.181919],[-100.000075,35.422904],[-99.36475,35.510535]]]},"id":"40009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.737675,35.505058],[-80.294043,35.505058],[-80.507644,35.187396],[-80.55146,35.209303],[-80.781491,35.505058],[-80.737675,35.505058]]]},"id":"37025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.233797,35.505058],[-80.184505,35.505058],[-80.074966,35.14358],[-80.173551,35.149057],[-80.277612,35.198349],[-80.507644,35.187396],[-80.294043,35.505058],[-80.233797,35.505058]]]},"id":"37167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.408142,35.472196],[-82.265742,35.466719],[-82.260265,35.395519],[-82.353373,35.192872],[-82.572451,35.14358],[-82.747713,35.422904],[-82.408142,35.472196]]]},"id":"37089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.956283,35.461243],[-87.715298,35.48315],[-87.572897,35.400996],[-87.605759,35.00118],[-87.983668,35.006656],[-88.022006,35.390042],[-88.005575,35.422904],[-87.956283,35.461243]]]},"id":"47181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.440064,35.466719],[-96.440064,35.291457],[-96.489356,34.908072],[-96.774157,34.902595],[-96.626279,35.400996],[-96.440064,35.466719]]]},"id":"40133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.952639,35.461243],[-83.678792,35.280503],[-83.7007,35.247642],[-84.029317,35.291457],[-83.963593,35.461243],[-83.952639,35.461243]]]},"id":"37075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.16758,35.466719],[-98.625363,35.466719],[-98.619886,35.099764],[-99.184011,35.116195],[-99.359273,35.116195],[-99.36475,35.466719],[-99.16758,35.466719]]]},"id":"40149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.141112,35.466719],[-96.626279,35.461243],[-96.626279,35.400996],[-96.774157,34.902595],[-96.932988,34.962841],[-97.141112,34.929979],[-97.141112,35.379088],[-97.141112,35.466719]]]},"id":"40125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.852668,35.461243],[-92.480236,35.368135],[-92.556913,35.110718],[-93.038884,35.077857],[-92.896483,35.170965],[-92.852668,35.461243]]]},"id":"05029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.130182,35.455766],[-85.015166,35.41195],[-84.943966,35.28598],[-84.976827,34.990226],[-84.982304,34.990226],[-85.267105,34.984749],[-85.272582,34.984749],[-85.36569,34.984749],[-85.475229,34.984749],[-85.387598,35.149057],[-85.22329,35.351704],[-85.135659,35.455766],[-85.130182,35.455766]]]},"id":"47065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.048921,35.461243],[-94.813412,35.324319],[-94.928428,35.055949],[-95.333722,35.055949],[-95.350152,35.055949],[-95.448737,35.296934],[-95.344675,35.291457],[-95.048921,35.461243]]]},"id":"40061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.435974,35.455766],[-87.293573,35.444812],[-87.205942,35.433858],[-87.222373,35.00118],[-87.605759,35.00118],[-87.572897,35.400996],[-87.435974,35.455766]]]},"id":"47099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.129265,35.455766],[-86.95948,35.417427],[-86.828033,35.264073],[-86.838987,34.990226],[-87.211419,35.00118],[-87.222373,35.00118],[-87.205942,35.433858],[-87.129265,35.455766]]]},"id":"47055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.380734,35.444812],[-94.074025,35.444812],[-94.03021,35.21478],[-94.139749,35.099764],[-94.183564,35.083334],[-94.446457,34.935456],[-94.430026,35.379088],[-94.430026,35.395519],[-94.380734,35.444812]]]},"id":"05131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.744046,35.444812],[-90.50306,35.439335],[-90.50306,35.14358],[-90.831677,35.149057],[-91.045277,35.149057],[-91.0398,35.351704],[-91.0398,35.444812],[-90.744046,35.444812]]]},"id":"05037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.346509,35.439335],[-91.0398,35.351704],[-91.045277,35.149057],[-91.149339,35.00118],[-91.275309,34.984749],[-91.368417,34.913548],[-91.467002,35.088811],[-91.346509,35.439335]]]},"id":"05147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.50306,35.439335],[-90.289459,35.439335],[-90.141582,35.439335],[-90.075859,35.384565],[-90.311367,34.995703],[-90.30589,34.858779],[-90.409952,34.831394],[-90.409952,34.902595],[-90.50306,35.14358],[-90.50306,35.439335]]]},"id":"05035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.150256,35.433858],[-89.079056,35.433858],[-88.843547,35.428381],[-88.783301,35.247642],[-88.788778,34.995703],[-88.821639,34.995703],[-89.018809,34.995703],[-89.199548,34.995703],[-89.183118,35.395519],[-89.150256,35.433858]]]},"id":"47069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.422269,35.329796],[-93.2963,35.329796],[-93.279869,35.318842],[-93.70707,35.01761],[-94.139749,35.099764],[-94.03021,35.21478],[-93.712547,35.373611],[-93.422269,35.329796]]]},"id":"05083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.446034,35.379088],[-77.391265,35.34075],[-77.473419,35.231211],[-77.730835,35.006656],[-77.834897,35.176442],[-77.807512,35.368135],[-77.473419,35.428381],[-77.446034,35.379088]]]},"id":"37107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.361576,35.417427],[-88.241084,35.422904],[-88.022006,35.390042],[-87.983668,35.006656],[-88.202745,34.995703],[-88.252038,34.995703],[-88.361576,34.995703],[-88.378007,34.995703],[-88.361576,35.379088],[-88.361576,35.417427]]]},"id":"47071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.747713,35.422904],[-82.572451,35.14358],[-82.764143,35.066903],[-82.89559,35.055949],[-83.010606,35.028564],[-82.922975,35.291457],[-82.747713,35.422904]]]},"id":"37175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.455155,35.417427],[-80.956753,35.400996],[-81.044384,35.149057],[-81.329185,35.165488],[-81.455155,35.417427]]]},"id":"37071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.188618,35.417427],[-76.89834,35.253119],[-76.712124,34.979272],[-77.090033,34.80401],[-77.473419,35.231211],[-77.391265,35.34075],[-77.188618,35.417427]]]},"id":"37049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.258431,35.41195],[-86.263908,35.335273],[-86.318678,35.127149],[-86.526801,35.357181],[-86.258431,35.41195],[-86.258431,35.41195]]]},"id":"47127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.774627,35.406473],[-89.632227,35.373611],[-89.643181,34.995703],[-89.725335,34.995703],[-89.829396,34.995703],[-90.311367,34.995703],[-90.075859,35.384565],[-89.774627,35.406473]]]},"id":"47157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.09048,35.357181],[-81.969987,35.187396],[-82.216449,35.198349],[-82.353373,35.192872],[-82.260265,35.395519],[-82.09048,35.357181]]]},"id":"37149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.550073,35.400996],[-89.473395,35.400996],[-89.183118,35.395519],[-89.199548,34.995703],[-89.352903,34.995703],[-89.643181,34.995703],[-89.632227,35.373611],[-89.550073,35.400996]]]},"id":"47047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.378007,35.373611],[-88.361576,35.379088],[-88.378007,34.995703],[-88.471115,34.995703],[-88.788778,34.995703],[-88.783301,35.247642],[-88.378007,35.373611]]]},"id":"47109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.0941,35.379088],[-97.672375,35.335273],[-97.666898,34.853302],[-97.666898,34.683517],[-97.995515,34.683517],[-98.088623,34.683517],[-98.0941,34.853302],[-98.0941,35.379088]]]},"id":"40051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.430026,35.379088],[-94.446457,34.935456],[-94.451934,34.727333],[-94.462888,34.508255],[-94.616242,34.508255],[-94.939382,34.508255],[-95.059875,34.67804],[-94.928428,35.055949],[-94.813412,35.324319],[-94.430026,35.379088]]]},"id":"40079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.425913,35.379088],[-97.141112,35.379088],[-97.141112,34.929979],[-97.672375,35.335273],[-97.672375,35.379088],[-97.425913,35.379088]]]},"id":"40027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.598002,35.362658],[-86.526801,35.357181],[-86.318678,35.127149],[-86.318678,34.990226],[-86.784218,34.990226],[-86.838987,34.990226],[-86.828033,35.264073],[-86.598002,35.362658]]]},"id":"47103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.480236,35.368135],[-92.250204,35.362658],[-92.113281,35.362658],[-92.118758,35.066903],[-92.118758,35.012133],[-92.228296,34.957364],[-92.545959,34.951887],[-92.556913,35.110718],[-92.480236,35.368135],[-92.480236,35.368135]]]},"id":"05045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.214616,35.346227],[-85.913384,35.291457],[-85.875046,35.225734],[-85.864092,34.990226],[-86.313201,34.990226],[-86.318678,34.990226],[-86.318678,35.127149],[-86.263908,35.335273],[-86.214616,35.346227]]]},"id":"47051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.872765,35.357181],[-84.861812,35.351704],[-84.70298,35.242165],[-84.774181,34.990226],[-84.812519,34.990226],[-84.976827,34.990226],[-84.943966,35.28598],[-84.872765,35.357181]]]},"id":"47011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.985454,35.307888],[-107.31179,35.307888],[-107.196774,35.220257],[-107.065328,34.957364],[-107.196774,34.957364],[-107.202251,34.579455],[-107.536345,34.579455],[-107.722561,34.579455],[-108.987734,34.579455],[-109.04798,34.579455],[-109.04798,34.957364],[-108.467425,34.957364],[-108.467425,35.307888],[-107.985454,35.307888]]]},"id":"35006"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-76.624493,35.253119],[-76.602586,35.335273],[-76.646401,35.01761],[-76.712124,34.979272],[-76.89834,35.253119],[-76.624493,35.253119]]]},"id":"37137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.672375,35.335273],[-97.141112,34.929979],[-96.932988,34.962841],[-96.932988,34.853302],[-97.425913,34.853302],[-97.666898,34.853302],[-97.672375,35.335273],[-97.672375,35.335273]]]},"id":"40087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.339222,35.329796],[-83.109191,35.00118],[-83.481623,34.995703],[-83.739039,35.154534],[-83.7007,35.247642],[-83.678792,35.280503],[-83.339222,35.329796]]]},"id":"37113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.601199,35.307888],[-85.557383,35.318842],[-85.387598,35.149057],[-85.475229,34.984749],[-85.606675,34.984749],[-85.864092,34.990226],[-85.875046,35.225734],[-85.601199,35.307888]]]},"id":"47115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.279869,35.318842],[-92.896483,35.170965],[-93.038884,35.077857],[-93.285346,34.771148],[-93.394885,34.743763],[-93.570147,34.743763],[-93.712547,34.743763],[-93.70707,35.01761],[-93.279869,35.318842]]]},"id":"05149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.541422,35.313365],[-78.305914,35.28598],[-78.163514,35.187396],[-78.114221,34.721856],[-78.256622,34.55207],[-78.49213,34.847825],[-78.49213,34.858779],[-78.6181,35.247642],[-78.541422,35.313365]]]},"id":"37163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.706154,35.203826],[-95.448737,35.296934],[-95.350152,35.055949],[-95.514461,34.683517],[-95.673292,34.595886],[-96.089539,34.67804],[-96.089539,34.765671],[-95.985477,35.149057],[-95.706154,35.203826]]]},"id":"40121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.7007,35.247642],[-83.739039,35.154534],[-84.007409,34.984749],[-84.127902,34.990226],[-84.319594,34.990226],[-84.29221,35.209303],[-84.029317,35.291457],[-83.7007,35.247642]]]},"id":"37039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.199078,35.291457],[-95.980001,35.291457],[-95.985477,35.149057],[-96.089539,34.765671],[-96.407202,34.765671],[-96.489356,34.908072],[-96.440064,35.291457],[-96.199078,35.291457]]]},"id":"40063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.686549,35.253119],[-84.494857,35.28598],[-84.29221,35.209303],[-84.319594,34.990226],[-84.620826,34.990226],[-84.774181,34.990226],[-84.70298,35.242165],[-84.686549,35.253119]]]},"id":"47139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.952193,35.21478],[-78.6181,35.247642],[-78.49213,34.858779],[-78.9029,34.836871],[-79.034347,34.951887],[-79.10007,35.176442],[-79.094593,35.192872],[-78.952193,35.21478]]]},"id":"37051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.473419,35.231211],[-77.090033,34.80401],[-77.16671,34.787579],[-77.676066,34.973795],[-77.730835,35.006656],[-77.473419,35.231211]]]},"id":"37103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.196774,35.220257],[-106.243787,35.21478],[-106.243787,35.039518],[-106.413572,34.869733],[-107.065328,34.957364],[-107.196774,35.220257]]]},"id":"35001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.124211,35.14358],[-104.129688,34.776625],[-104.890983,34.60684],[-104.890983,34.349424],[-105.312707,34.349424],[-105.290799,35.039518],[-105.290799,35.21478],[-104.124211,35.14358]]]},"id":"35019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.353373,35.192872],[-82.216449,35.198349],[-82.145249,34.787579],[-82.315034,34.486347],[-82.484819,34.820441],[-82.621743,35.066903],[-82.764143,35.066903],[-82.572451,35.14358],[-82.353373,35.192872]]]},"id":"45045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.127455,35.165488],[-79.10007,35.176442],[-79.034347,34.951887],[-79.346533,34.836871],[-79.461548,35.044995],[-79.127455,35.165488]]]},"id":"37093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.173551,35.149057],[-80.074966,35.14358],[-79.927088,34.80401],[-80.321428,34.814964],[-80.277612,35.198349],[-80.173551,35.149057]]]},"id":"37007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.55146,35.209303],[-80.507644,35.187396],[-80.277612,35.198349],[-80.321428,34.814964],[-80.562413,34.814964],[-80.841737,35.00118],[-80.55146,35.209303]]]},"id":"37179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.216449,35.198349],[-81.969987,35.187396],[-81.876879,35.181919],[-81.712571,34.913548],[-81.712571,34.913548],[-81.854971,34.595886],[-82.145249,34.787579],[-82.216449,35.198349]]]},"id":"45083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.043021,35.192872],[-77.834897,35.176442],[-77.730835,35.006656],[-77.676066,34.973795],[-77.681543,34.721856],[-78.015636,34.732809],[-78.114221,34.721856],[-78.163514,35.187396],[-78.043021,35.192872]]]},"id":"37061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.579714,35.187396],[-102.168943,35.181919],[-102.168943,34.74924],[-102.524944,34.74924],[-103.045254,34.74924],[-103.045254,34.951887],[-103.039777,35.181919],[-102.579714,35.187396]]]},"id":"48117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.76734,35.181919],[-81.367524,35.165488],[-81.455155,34.836871],[-81.712571,34.913548],[-81.876879,35.181919],[-81.76734,35.181919]]]},"id":"45021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.729918,35.176442],[-79.614903,35.165488],[-79.461548,35.044995],[-79.686103,34.80401],[-79.927088,34.80401],[-80.074966,35.14358],[-79.729918,35.176442]]]},"id":"37153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.988204,35.181919],[-101.621249,35.181919],[-101.626726,34.74924],[-101.999158,34.74924],[-102.004635,34.74924],[-102.168943,34.74924],[-102.168943,35.181919],[-101.988204,35.181919]]]},"id":"48381"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.969493,35.181919],[-100.536815,35.181919],[-100.542292,34.74924],[-100.947585,34.74924],[-101.089986,34.74924],[-101.084509,35.181919],[-100.969493,35.181919]]]},"id":"48129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.093183,35.181919],[-100.000075,35.181919],[-100.000075,35.028564],[-100.000075,34.743763],[-100.416322,34.74924],[-100.542292,34.74924],[-100.536815,35.181919],[-100.093183,35.181919]]]},"id":"48087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.621249,35.181919],[-101.084509,35.181919],[-101.089986,34.74924],[-101.473372,34.74924],[-101.626726,34.74924],[-101.621249,35.181919]]]},"id":"48011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.367524,35.165488],[-81.329185,35.165488],[-81.044384,35.149057],[-80.907461,35.077857],[-80.907461,35.077857],[-80.896507,34.820441],[-81.28537,34.820441],[-81.477062,34.820441],[-81.455155,34.836871],[-81.367524,35.165488]]]},"id":"45091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.739039,35.154534],[-83.481623,34.995703],[-83.547346,34.990226],[-83.936209,34.984749],[-84.007409,34.984749],[-83.739039,35.154534]]]},"id":"37043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.831677,35.149057],[-90.50306,35.14358],[-90.409952,34.902595],[-91.100047,34.869733],[-91.149339,35.00118],[-91.045277,35.149057],[-90.831677,35.149057]]]},"id":"05123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.184011,35.116195],[-98.619886,35.099764],[-98.619886,34.853302],[-98.795148,34.853302],[-98.82801,34.595886],[-99.101857,34.639701],[-99.244257,34.820441],[-99.408565,35.116195],[-99.359273,35.116195],[-99.184011,35.116195]]]},"id":"40075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.709797,35.116195],[-99.408565,35.116195],[-99.244257,34.820441],[-99.397611,34.814964],[-99.665981,34.727333],[-99.890536,35.028564],[-99.709797,35.116195]]]},"id":"40055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.038884,35.077857],[-92.556913,35.110718],[-92.545959,34.951887],[-92.737652,34.853302],[-92.967683,34.858779],[-93.077222,34.771148],[-93.285346,34.771148],[-93.038884,35.077857]]]},"id":"05105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-120.094969,35.116195],[-119.470598,34.902595],[-119.443213,34.902595],[-119.476075,34.376808],[-120.64814,34.579455],[-120.64814,34.973795],[-120.094969,35.116195]]]},"id":"06083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.183564,35.083334],[-94.139749,35.099764],[-93.70707,35.01761],[-93.712547,34.743763],[-93.931625,34.667086],[-94.451934,34.727333],[-94.446457,34.935456],[-94.183564,35.083334]]]},"id":"05127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.587494,35.023087],[-91.467002,35.088811],[-91.368417,34.913548],[-91.379371,34.563024],[-91.587494,34.568501],[-91.680602,34.48087],[-91.801095,35.028564],[-91.587494,35.023087]]]},"id":"05117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.621743,35.066903],[-82.484819,34.820441],[-82.490296,34.820441],[-82.840821,34.623271],[-82.89559,35.055949],[-82.764143,35.066903],[-82.621743,35.066903]]]},"id":"45077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.111941,34.639701],[-77.16671,34.787579],[-77.090033,34.80401],[-76.712124,34.979272],[-76.646401,35.01761],[-76.279446,34.940933],[-76.536862,34.590409],[-77.111941,34.639701]]]},"id":"37031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.907461,35.077857],[-80.907461,35.077857],[-80.841737,35.00118],[-80.562413,34.814964],[-80.409059,34.612317],[-80.880076,34.458962],[-80.880076,34.541117],[-80.896507,34.820441],[-80.907461,35.077857]]]},"id":"45057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.801095,35.028564],[-91.680602,34.48087],[-91.70251,34.48087],[-92.031127,34.491824],[-92.118758,35.012133],[-92.118758,35.066903],[-91.801095,35.028564]]]},"id":"05085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.333722,35.055949],[-94.928428,35.055949],[-95.059875,34.67804],[-95.311814,34.683517],[-95.514461,34.683517],[-95.350152,35.055949],[-95.333722,35.055949]]]},"id":"40077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.89559,35.055949],[-82.840821,34.623271],[-82.846298,34.617794],[-82.857251,34.60684],[-82.994175,34.48087],[-83.048944,34.497301],[-83.103714,34.53564],[-83.278976,34.645178],[-83.339222,34.688994],[-83.350176,34.716379],[-83.109191,35.00118],[-83.010606,35.028564],[-82.89559,35.055949]]]},"id":"45073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.461548,35.044995],[-79.346533,34.836871],[-79.461548,34.628748],[-79.686103,34.80401],[-79.461548,35.044995]]]},"id":"37165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.290799,35.039518],[-105.312707,34.349424],[-105.926124,34.261793],[-106.419049,34.442532],[-106.413572,34.869733],[-106.243787,35.039518],[-105.712524,35.039518],[-105.290799,35.039518]]]},"id":"35057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.934351,35.028564],[-99.890536,35.028564],[-99.665981,34.727333],[-99.84672,34.508255],[-100.000075,34.563024],[-100.000075,34.743763],[-100.000075,35.028564],[-99.934351,35.028564]]]},"id":"40057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.228296,34.957364],[-92.118758,35.012133],[-92.031127,34.491824],[-92.069465,34.491824],[-92.206389,34.491824],[-92.244727,34.491824],[-92.737652,34.853302],[-92.545959,34.951887],[-92.228296,34.957364]]]},"id":"05119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.983668,35.006656],[-87.605759,35.00118],[-87.222373,35.00118],[-87.211419,35.00118],[-87.260711,34.760194],[-87.42502,34.798533],[-88.098683,34.891641],[-88.202745,34.995703],[-87.983668,35.006656]]]},"id":"01077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.275309,34.984749],[-91.149339,35.00118],[-91.100047,34.869733],[-91.050754,34.645178],[-91.056231,34.33847],[-91.379371,34.563024],[-91.368417,34.913548],[-91.275309,34.984749]]]},"id":"05095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.109191,35.00118],[-83.350176,34.716379],[-83.651408,34.820441],[-83.547346,34.990226],[-83.481623,34.995703],[-83.109191,35.00118]]]},"id":"13241"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.211419,35.00118],[-86.838987,34.990226],[-86.784218,34.990226],[-86.789695,34.55207],[-87.03068,34.650655],[-87.107357,34.683517],[-87.260711,34.760194],[-87.211419,35.00118]]]},"id":"01083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.471115,34.995703],[-88.378007,34.995703],[-88.361576,34.995703],[-88.367053,34.754717],[-88.717578,34.754717],[-88.821639,34.995703],[-88.788778,34.995703],[-88.471115,34.995703]]]},"id":"28003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.018809,34.995703],[-88.821639,34.995703],[-88.717578,34.754717],[-88.734008,34.595886],[-89.09001,34.595886],[-89.018809,34.995703]]]},"id":"28139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.829396,34.995703],[-89.725335,34.995703],[-89.725335,34.771148],[-89.845827,34.771148],[-90.201828,34.721856],[-90.267552,34.858779],[-90.30589,34.858779],[-90.311367,34.995703],[-89.829396,34.995703]]]},"id":"28033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.252038,34.995703],[-88.202745,34.995703],[-88.098683,34.891641],[-88.142499,34.579455],[-88.15893,34.464439],[-88.328715,34.464439],[-88.367053,34.754717],[-88.361576,34.995703],[-88.252038,34.995703]]]},"id":"28141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.643181,34.995703],[-89.352903,34.995703],[-89.243364,34.584932],[-89.248841,34.497301],[-89.62675,34.557547],[-89.670565,34.55207],[-89.725335,34.771148],[-89.725335,34.995703],[-89.643181,34.995703]]]},"id":"28093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.199548,34.995703],[-89.018809,34.995703],[-89.09001,34.595886],[-89.243364,34.584932],[-89.352903,34.995703],[-89.199548,34.995703]]]},"id":"28009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.936209,34.984749],[-83.547346,34.990226],[-83.651408,34.820441],[-83.684269,34.798533],[-83.782854,34.793056],[-83.936209,34.984749]]]},"id":"13281"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.784218,34.990226],[-86.318678,34.990226],[-86.313201,34.990226],[-86.329632,34.601363],[-86.548709,34.546593],[-86.789695,34.55207],[-86.784218,34.990226]]]},"id":"01089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.864092,34.990226],[-85.606675,34.984749],[-85.584768,34.858779],[-86.055785,34.475393],[-86.329632,34.601363],[-86.313201,34.990226],[-85.864092,34.990226]]]},"id":"01071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.319594,34.990226],[-84.127902,34.990226],[-84.155286,34.650655],[-84.188148,34.601363],[-84.199102,34.617794],[-84.620826,34.853302],[-84.620826,34.990226],[-84.319594,34.990226]]]},"id":"13111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.620826,34.990226],[-84.620826,34.853302],[-84.653688,34.584932],[-84.916581,34.634225],[-84.812519,34.990226],[-84.774181,34.990226],[-84.620826,34.990226]]]},"id":"13213"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.976827,34.990226],[-84.812519,34.990226],[-84.916581,34.634225],[-85.048028,34.623271],[-85.146612,34.765671],[-84.982304,34.990226],[-84.976827,34.990226]]]},"id":"13313"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.267105,34.984749],[-84.982304,34.990226],[-85.146612,34.765671],[-85.267105,34.984749]]]},"id":"13047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.007409,34.984749],[-83.936209,34.984749],[-83.782854,34.793056],[-83.854055,34.721856],[-84.155286,34.650655],[-84.127902,34.990226],[-84.007409,34.984749]]]},"id":"13291"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.272582,34.984749],[-85.267105,34.984749],[-85.146612,34.765671],[-85.048028,34.623271],[-85.069935,34.584932],[-85.09732,34.584932],[-85.108274,34.584932],[-85.529998,34.590409],[-85.535475,34.623271],[-85.36569,34.984749],[-85.272582,34.984749]]]},"id":"13295"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.475229,34.984749],[-85.36569,34.984749],[-85.535475,34.623271],[-85.584768,34.858779],[-85.606675,34.984749],[-85.475229,34.984749]]]},"id":"13083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.676066,34.973795],[-77.16671,34.787579],[-77.111941,34.639701],[-77.517235,34.442532],[-77.681543,34.721856],[-77.676066,34.973795]]]},"id":"37133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.932988,34.962841],[-96.774157,34.902595],[-96.489356,34.908072],[-96.407202,34.765671],[-96.511264,34.502778],[-96.828926,34.508255],[-96.932988,34.634225],[-96.932988,34.853302],[-96.932988,34.962841]]]},"id":"40123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.196774,34.957364],[-107.065328,34.957364],[-106.413572,34.869733],[-106.419049,34.442532],[-107.202251,34.579455],[-107.196774,34.957364]]]},"id":"35061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.264331,34.951887],[-103.045254,34.951887],[-103.045254,34.74924],[-103.045254,34.311085],[-103.045254,34.300131],[-103.740825,34.305608],[-103.740825,34.60684],[-103.264331,34.951887]]]},"id":"35009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.034347,34.951887],[-78.9029,34.836871],[-78.870039,34.48087],[-79.072686,34.300131],[-79.450595,34.623271],[-79.461548,34.628748],[-79.346533,34.836871],[-79.034347,34.951887]]]},"id":"37155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.712571,34.913548],[-81.712571,34.913548],[-81.455155,34.836871],[-81.477062,34.820441],[-81.422293,34.573978],[-81.422293,34.491824],[-81.641371,34.53564],[-81.854971,34.595886],[-81.712571,34.913548]]]},"id":"45087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.100047,34.869733],[-90.409952,34.902595],[-90.409952,34.831394],[-90.585214,34.639701],[-91.050754,34.645178],[-91.100047,34.869733]]]},"id":"05077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.098683,34.891641],[-87.42502,34.798533],[-87.529082,34.568501],[-88.142499,34.579455],[-88.098683,34.891641]]]},"id":"01033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-119.443213,34.902595],[-118.884565,34.793056],[-118.638103,34.289177],[-118.944811,34.042715],[-119.476075,34.376808],[-119.443213,34.902595]]]},"id":"06111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.267552,34.858779],[-90.201828,34.721856],[-90.196352,34.55207],[-90.196352,34.508255],[-90.398998,34.426101],[-90.568783,34.524686],[-90.585214,34.639701],[-90.409952,34.831394],[-90.30589,34.858779],[-90.267552,34.858779]]]},"id":"28143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.584768,34.858779],[-85.535475,34.623271],[-85.529998,34.590409],[-85.513567,34.524686],[-85.842184,34.201546],[-86.105077,34.201546],[-86.055785,34.475393],[-85.584768,34.858779]]]},"id":"01049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.397611,34.814964],[-99.244257,34.820441],[-99.101857,34.639701],[-99.211395,34.33847],[-99.474288,34.398716],[-99.84672,34.508255],[-99.665981,34.727333],[-99.397611,34.814964]]]},"id":"40065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.967683,34.858779],[-92.737652,34.853302],[-92.244727,34.491824],[-92.392605,34.497301],[-92.666452,34.415147],[-92.792421,34.502778],[-93.077222,34.771148],[-92.967683,34.858779]]]},"id":"05125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.49213,34.847825],[-78.256622,34.55207],[-78.256622,34.398716],[-78.870039,34.48087],[-78.9029,34.836871],[-78.49213,34.858779],[-78.49213,34.847825]]]},"id":"37017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.795148,34.853302],[-98.619886,34.853302],[-98.0941,34.853302],[-98.088623,34.683517],[-98.143392,34.508255],[-98.663701,34.404193],[-98.82801,34.595886],[-98.795148,34.853302]]]},"id":"40031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.620826,34.853302],[-84.199102,34.617794],[-84.346979,34.563024],[-84.653688,34.546593],[-84.653688,34.584932],[-84.620826,34.853302]]]},"id":"13123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.425913,34.853302],[-96.932988,34.853302],[-96.932988,34.634225],[-97.091819,34.639701],[-97.354713,34.508255],[-97.562836,34.508255],[-97.666898,34.683517],[-97.666898,34.853302],[-97.425913,34.853302]]]},"id":"40049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.651408,34.820441],[-83.350176,34.716379],[-83.339222,34.688994],[-83.459715,34.48087],[-83.552823,34.486347],[-83.613069,34.431578],[-83.667839,34.502778],[-83.684269,34.798533],[-83.651408,34.820441]]]},"id":"13137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.668684,34.820441],[-117.7837,33.94413],[-118.117793,33.741483],[-118.944811,34.042715],[-118.638103,34.289177],[-118.884565,34.793056],[-117.668684,34.820441]]]},"id":"06037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.28537,34.820441],[-80.896507,34.820441],[-80.880076,34.541117],[-81.416816,34.573978],[-81.422293,34.573978],[-81.477062,34.820441],[-81.28537,34.820441]]]},"id":"45023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.490296,34.820441],[-82.484819,34.820441],[-82.315034,34.486347],[-82.325988,34.475393],[-82.742236,34.207023],[-82.775097,34.289177],[-82.994175,34.48087],[-82.857251,34.60684],[-82.846298,34.617794],[-82.840821,34.623271],[-82.490296,34.820441]]]},"id":"45007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.562413,34.814964],[-80.321428,34.814964],[-79.927088,34.80401],[-79.828503,34.530163],[-79.866842,34.508255],[-80.288566,34.365854],[-80.387151,34.595886],[-80.409059,34.612317],[-80.562413,34.814964]]]},"id":"45025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.927088,34.80401],[-79.686103,34.80401],[-79.461548,34.628748],[-79.450595,34.623271],[-79.631334,34.300131],[-79.658718,34.305608],[-79.828503,34.530163],[-79.927088,34.80401]]]},"id":"45069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.42502,34.798533],[-87.260711,34.760194],[-87.107357,34.683517],[-87.112834,34.311085],[-87.107357,34.300131],[-87.529082,34.305608],[-87.529082,34.568501],[-87.42502,34.798533]]]},"id":"01079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.782854,34.793056],[-83.684269,34.798533],[-83.667839,34.502778],[-83.788331,34.513732],[-83.843101,34.502778],[-83.854055,34.721856],[-83.782854,34.793056]]]},"id":"13311"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.145249,34.787579],[-81.854971,34.595886],[-81.641371,34.53564],[-81.646848,34.519209],[-81.942602,34.201546],[-82.243834,34.40967],[-82.315034,34.486347],[-82.145249,34.787579]]]},"id":"45059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.129688,34.776625],[-103.948949,34.60684],[-103.943472,34.081054],[-104.890983,34.08653],[-104.890983,34.349424],[-104.890983,34.60684],[-104.129688,34.776625]]]},"id":"35011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.285346,34.771148],[-93.077222,34.771148],[-92.792421,34.502778],[-93.405839,34.398716],[-93.394885,34.743763],[-93.285346,34.771148]]]},"id":"05051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.845827,34.771148],[-89.725335,34.771148],[-89.670565,34.55207],[-89.719858,34.55207],[-90.097767,34.55207],[-90.196352,34.55207],[-90.201828,34.721856],[-89.845827,34.771148]]]},"id":"28137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.089539,34.765671],[-96.089539,34.67804],[-96.407202,34.420624],[-96.511264,34.502778],[-96.407202,34.765671],[-96.089539,34.765671]]]},"id":"40029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.717578,34.754717],[-88.367053,34.754717],[-88.328715,34.464439],[-88.493023,34.464439],[-88.542316,34.464439],[-88.635423,34.508255],[-88.734008,34.508255],[-88.734008,34.595886],[-88.717578,34.754717]]]},"id":"28117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.473372,34.74924],[-101.089986,34.74924],[-100.947585,34.74924],[-100.947585,34.311085],[-101.040693,34.311085],[-101.473372,34.311085],[-101.473372,34.74924]]]},"id":"48045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.947585,34.74924],[-100.542292,34.74924],[-100.416322,34.74924],[-100.416322,34.311085],[-100.514907,34.316562],[-100.673738,34.311085],[-100.947585,34.311085],[-100.947585,34.74924]]]},"id":"48191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.999158,34.74924],[-101.626726,34.74924],[-101.473372,34.74924],[-101.473372,34.311085],[-101.56648,34.311085],[-101.999158,34.311085],[-101.999158,34.74924]]]},"id":"48437"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.004635,34.74924],[-101.999158,34.74924],[-101.999158,34.311085],[-102.092266,34.311085],[-102.327774,34.311085],[-102.524944,34.311085],[-102.524944,34.74924],[-102.168943,34.74924],[-102.004635,34.74924]]]},"id":"48069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.045254,34.74924],[-102.524944,34.74924],[-102.524944,34.311085],[-102.612575,34.311085],[-103.045254,34.311085],[-103.045254,34.74924]]]},"id":"48369"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.416322,34.74924],[-100.000075,34.743763],[-100.000075,34.563024],[-100.000075,34.311085],[-100.416322,34.311085],[-100.416322,34.74924]]]},"id":"48075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.570147,34.743763],[-93.394885,34.743763],[-93.405839,34.398716],[-93.405839,34.33847],[-93.477039,34.33847],[-93.750886,34.349424],[-93.937102,34.349424],[-93.931625,34.667086],[-93.712547,34.743763],[-93.570147,34.743763]]]},"id":"05097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.854055,34.721856],[-83.843101,34.502778],[-83.980024,34.420624],[-84.188148,34.601363],[-84.155286,34.650655],[-83.854055,34.721856]]]},"id":"13187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.015636,34.732809],[-77.681543,34.721856],[-77.517235,34.442532],[-77.714404,34.294654],[-77.960867,34.376808],[-78.032067,34.332993],[-78.125175,34.365854],[-78.163514,34.354901],[-78.256622,34.398716],[-78.256622,34.55207],[-78.114221,34.721856],[-78.015636,34.732809]]]},"id":"37141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.451934,34.727333],[-93.931625,34.667086],[-93.937102,34.349424],[-94.24381,34.190592],[-94.468365,34.190592],[-94.462888,34.508255],[-94.451934,34.727333]]]},"id":"05113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.278976,34.645178],[-83.103714,34.53564],[-83.125621,34.519209],[-83.399469,34.458962],[-83.459715,34.48087],[-83.339222,34.688994],[-83.278976,34.645178]]]},"id":"13257"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.03068,34.650655],[-86.789695,34.55207],[-86.548709,34.546593],[-86.581571,34.305608],[-86.986864,34.311085],[-87.112834,34.311085],[-87.107357,34.683517],[-87.03068,34.650655]]]},"id":"01103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.995515,34.683517],[-97.666898,34.683517],[-97.562836,34.508255],[-97.562836,34.289177],[-98.061238,34.289177],[-98.137915,34.289177],[-98.143392,34.508255],[-98.143392,34.508255],[-98.088623,34.683517],[-97.995515,34.683517]]]},"id":"40137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.311814,34.683517],[-95.059875,34.67804],[-94.939382,34.508255],[-95.158459,34.157731],[-95.383014,34.157731],[-95.777354,34.157731],[-95.673292,34.595886],[-95.514461,34.683517],[-95.311814,34.683517]]]},"id":"40127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.673292,34.595886],[-95.777354,34.157731],[-95.990954,34.157731],[-96.407202,34.157731],[-96.407202,34.420624],[-96.089539,34.67804],[-95.673292,34.595886]]]},"id":"40005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.050754,34.645178],[-90.585214,34.639701],[-90.568783,34.524686],[-90.957646,34.119392],[-90.952169,34.119392],[-91.116477,34.119392],[-91.056231,34.33847],[-91.050754,34.645178]]]},"id":"05107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.101857,34.639701],[-98.82801,34.595886],[-98.663701,34.404193],[-98.608932,34.157731],[-98.953979,34.2125],[-99.211395,34.33847],[-99.101857,34.639701]]]},"id":"40141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.091819,34.639701],[-96.932988,34.634225],[-96.828926,34.508255],[-96.878219,34.502778],[-96.932988,34.332993],[-97.354713,34.508255],[-97.091819,34.639701]]]},"id":"40099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.916581,34.634225],[-84.653688,34.584932],[-84.653688,34.546593],[-84.653688,34.415147],[-84.933012,34.398716],[-85.004212,34.393239],[-85.069935,34.584932],[-85.048028,34.623271],[-84.916581,34.634225]]]},"id":"13129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.450595,34.623271],[-79.072686,34.300131],[-79.078163,34.294654],[-79.127455,34.256316],[-79.36844,34.300131],[-79.549179,34.228931],[-79.631334,34.300131],[-79.450595,34.623271]]]},"id":"45033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.199102,34.617794],[-84.188148,34.601363],[-83.980024,34.420624],[-83.958116,34.332993],[-84.259348,34.332993],[-84.259348,34.382285],[-84.346979,34.563024],[-84.199102,34.617794]]]},"id":"13085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.387151,34.595886],[-80.288566,34.365854],[-80.288566,34.365854],[-80.480259,34.168685],[-80.617183,34.097484],[-80.825307,34.26727],[-80.880076,34.458962],[-80.409059,34.612317],[-80.387151,34.595886]]]},"id":"45055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.740825,34.60684],[-103.740825,34.305608],[-103.045254,34.300131],[-103.045254,33.823637],[-103.050731,33.571698],[-103.510794,33.571698],[-103.877749,34.081054],[-103.943472,34.081054],[-103.948949,34.60684],[-103.740825,34.60684]]]},"id":"35041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.329632,34.601363],[-86.055785,34.475393],[-86.105077,34.201546],[-86.302247,34.097484],[-86.455601,34.261793],[-86.581571,34.305608],[-86.548709,34.546593],[-86.329632,34.601363]]]},"id":"01095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.09001,34.595886],[-88.734008,34.595886],[-88.734008,34.508255],[-88.827116,34.365854],[-89.09001,34.382285],[-89.248841,34.376808],[-89.248841,34.497301],[-89.243364,34.584932],[-89.09001,34.595886]]]},"id":"28145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.108274,34.584932],[-85.464275,34.2837],[-85.513567,34.524686],[-85.529998,34.590409],[-85.108274,34.584932]]]},"id":"13055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.09732,34.584932],[-85.069935,34.584932],[-85.004212,34.393239],[-85.048028,34.097484],[-85.42046,34.081054],[-85.464275,34.2837],[-85.108274,34.584932],[-85.09732,34.584932]]]},"id":"13115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.142499,34.579455],[-87.529082,34.568501],[-87.529082,34.305608],[-87.633143,34.305608],[-88.175361,34.322039],[-88.15893,34.464439],[-88.142499,34.579455]]]},"id":"01059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.987734,34.579455],[-107.722561,34.579455],[-107.711607,33.47859],[-108.001885,33.199266],[-108.182624,33.199266],[-109.04798,33.21022],[-109.04798,33.779822],[-109.04798,34.579455],[-108.987734,34.579455]]]},"id":"35003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.536345,34.579455],[-107.202251,34.579455],[-106.419049,34.442532],[-105.926124,34.261793],[-106.052094,33.648375],[-106.375233,33.47859],[-107.711607,33.47859],[-107.722561,34.579455],[-107.536345,34.579455]]]},"id":"35053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.84672,34.508255],[-99.474288,34.398716],[-99.474288,34.08653],[-100.000075,34.223454],[-100.000075,34.311085],[-100.000075,34.563024],[-99.84672,34.508255]]]},"id":"48197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.416816,34.573978],[-80.880076,34.541117],[-80.880076,34.458962],[-80.825307,34.26727],[-80.863645,34.261793],[-81.318231,34.239885],[-81.422293,34.491824],[-81.422293,34.573978],[-81.416816,34.573978]]]},"id":"45039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.587494,34.568501],[-91.379371,34.563024],[-91.056231,34.33847],[-91.116477,34.119392],[-91.423186,34.01533],[-91.445094,34.081054],[-91.70251,34.48087],[-91.680602,34.48087],[-91.587494,34.568501]]]},"id":"05001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.346979,34.563024],[-84.259348,34.382285],[-84.582488,34.387762],[-84.653688,34.415147],[-84.653688,34.546593],[-84.346979,34.563024]]]},"id":"13227"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.62675,34.557547],[-89.248841,34.497301],[-89.248841,34.376808],[-89.243364,34.163208],[-89.511734,34.163208],[-89.719858,34.190592],[-89.719858,34.55207],[-89.670565,34.55207],[-89.62675,34.557547]]]},"id":"28071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.097767,34.55207],[-89.719858,34.55207],[-89.719858,34.190592],[-89.933458,34.163208],[-90.136105,34.157731],[-90.196352,34.508255],[-90.196352,34.55207],[-90.097767,34.55207]]]},"id":"28107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.125621,34.519209],[-83.103714,34.53564],[-83.048944,34.497301],[-83.114668,34.272746],[-83.120145,34.272746],[-83.355653,34.223454],[-83.399469,34.458962],[-83.125621,34.519209]]]},"id":"13119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.866842,34.508255],[-79.828503,34.530163],[-79.658718,34.305608],[-80.074966,34.08653],[-80.244751,34.322039],[-80.288566,34.365854],[-80.288566,34.365854],[-79.866842,34.508255]]]},"id":"45031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.646848,34.519209],[-81.641371,34.53564],[-81.422293,34.491824],[-81.318231,34.239885],[-81.340139,34.196069],[-81.471585,34.075577],[-81.739956,34.185115],[-81.871402,34.135823],[-81.942602,34.201546],[-81.646848,34.519209]]]},"id":"45071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.513567,34.524686],[-85.464275,34.2837],[-85.42046,34.081054],[-85.398552,33.966038],[-85.529998,33.94413],[-85.738122,33.966038],[-85.842184,34.201546],[-85.513567,34.524686]]]},"id":"01019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.568783,34.524686],[-90.398998,34.426101],[-90.448291,34.075577],[-90.448291,33.987946],[-90.656414,33.987946],[-90.738569,34.119392],[-90.957646,34.119392],[-90.568783,34.524686]]]},"id":"28027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.788331,34.513732],[-83.667839,34.502778],[-83.613069,34.431578],[-83.618546,34.294654],[-83.815716,34.124869],[-83.990978,34.1413],[-84.062178,34.168685],[-83.958116,34.332993],[-83.980024,34.420624],[-83.843101,34.502778],[-83.788331,34.513732]]]},"id":"13139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.196352,34.508255],[-90.136105,34.157731],[-90.448291,34.075577],[-90.398998,34.426101],[-90.196352,34.508255]]]},"id":"28119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.635423,34.508255],[-88.542316,34.464439],[-88.542316,34.08653],[-88.706624,34.092007],[-88.717578,34.075577],[-88.827116,34.075577],[-88.827116,34.365854],[-88.734008,34.508255],[-88.635423,34.508255]]]},"id":"28081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.616242,34.508255],[-94.462888,34.508255],[-94.468365,34.190592],[-94.479319,33.938653],[-94.484796,33.637421],[-94.736735,33.703145],[-95.158459,33.938653],[-95.158459,34.157731],[-94.939382,34.508255],[-94.616242,34.508255]]]},"id":"40089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.143392,34.508255],[-98.137915,34.289177],[-98.137915,34.1413],[-98.422716,34.081054],[-98.608932,34.157731],[-98.663701,34.404193],[-98.143392,34.508255],[-98.143392,34.508255]]]},"id":"40033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.562836,34.508255],[-97.354713,34.508255],[-96.932988,34.332993],[-96.932988,34.174162],[-96.971327,34.0701],[-97.562836,34.0701],[-97.562836,34.289177],[-97.562836,34.508255]]]},"id":"40019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.878219,34.502778],[-96.828926,34.508255],[-96.511264,34.502778],[-96.407202,34.420624],[-96.407202,34.157731],[-96.412679,34.157731],[-96.587941,34.113915],[-96.932988,34.174162],[-96.932988,34.332993],[-96.878219,34.502778]]]},"id":"40069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.792421,34.502778],[-92.666452,34.415147],[-92.677405,34.152254],[-92.885529,34.157731],[-93.405839,34.33847],[-93.405839,34.398716],[-92.792421,34.502778]]]},"id":"05059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.556419,34.469916],[-110.751309,34.261793],[-110.751309,33.998899],[-110.000968,33.998899],[-110.000968,33.577175],[-110.450077,33.193789],[-110.778693,32.985665],[-111.041587,33.467636],[-111.496173,33.998899],[-111.556419,34.469916]]]},"id":"04007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.048944,34.497301],[-82.994175,34.48087],[-82.775097,34.289177],[-83.076329,34.228931],[-83.114668,34.272746],[-83.048944,34.497301]]]},"id":"13147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.392605,34.497301],[-92.244727,34.491824],[-92.206389,34.491824],[-92.233773,34.064623],[-92.337835,34.059146],[-92.677405,34.152254],[-92.666452,34.415147],[-92.392605,34.497301]]]},"id":"05053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.069465,34.491824],[-92.031127,34.491824],[-91.70251,34.48087],[-91.445094,34.081054],[-91.603925,34.113915],[-91.954449,34.064623],[-92.058511,34.064623],[-92.233773,34.064623],[-92.206389,34.491824],[-92.069465,34.491824]]]},"id":"05069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.552823,34.486347],[-83.459715,34.48087],[-83.399469,34.458962],[-83.355653,34.223454],[-83.404945,34.196069],[-83.618546,34.289177],[-83.618546,34.294654],[-83.613069,34.431578],[-83.552823,34.486347]]]},"id":"13011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.325988,34.475393],[-82.315034,34.486347],[-82.243834,34.40967],[-82.325988,34.064623],[-82.594358,34.01533],[-82.742236,34.207023],[-82.325988,34.475393]]]},"id":"45001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.870039,34.48087],[-78.256622,34.398716],[-78.163514,34.354901],[-78.650961,33.94413],[-79.072686,34.300131],[-78.870039,34.48087]]]},"id":"37047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.493023,34.464439],[-88.328715,34.464439],[-88.15893,34.464439],[-88.175361,34.322039],[-88.202745,34.08653],[-88.542316,34.08653],[-88.542316,34.464439],[-88.493023,34.464439]]]},"id":"28057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.211395,34.33847],[-98.953979,34.2125],[-98.953979,33.834591],[-98.992318,33.834591],[-99.474288,33.834591],[-99.474288,34.08653],[-99.474288,34.398716],[-99.211395,34.33847]]]},"id":"48487"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.933012,34.398716],[-84.653688,34.415147],[-84.659165,34.075577],[-84.735842,34.081054],[-84.922058,34.081054],[-85.048028,34.097484],[-85.004212,34.393239],[-84.933012,34.398716]]]},"id":"13015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.582488,34.387762],[-84.259348,34.382285],[-84.259348,34.332993],[-84.259348,34.185115],[-84.407226,34.108438],[-84.418179,34.075577],[-84.615349,34.081054],[-84.659165,34.075577],[-84.653688,34.415147],[-84.582488,34.387762]]]},"id":"13057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.243834,34.40967],[-81.942602,34.201546],[-81.871402,34.135823],[-82.008326,33.960561],[-82.046664,33.955084],[-82.325988,34.064623],[-82.243834,34.40967]]]},"id":"45047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.960867,34.376808],[-77.714404,34.294654],[-77.938959,33.927699],[-78.032067,34.332993],[-77.960867,34.376808]]]},"id":"37129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.09001,34.382285],[-88.827116,34.365854],[-88.827116,34.075577],[-89.139302,34.075577],[-89.243364,34.163208],[-89.248841,34.376808],[-89.09001,34.382285]]]},"id":"28115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-78.125175,34.365854],[-78.032067,34.332993],[-77.938959,33.927699],[-78.541422,33.851022],[-78.650961,33.94413],[-78.163514,34.354901],[-78.125175,34.365854]]]},"id":"37019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.244751,34.322039],[-80.074966,34.08653],[-79.998289,34.048192],[-80.480259,34.168685],[-80.288566,34.365854],[-80.244751,34.322039]]]},"id":"45061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.24381,34.190592],[-93.937102,34.349424],[-93.822086,34.009853],[-93.95901,33.752437],[-93.95901,33.752437],[-94.189041,34.190592],[-94.24381,34.190592]]]},"id":"05061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.750886,34.349424],[-93.477039,34.33847],[-93.372977,33.955084],[-93.455131,33.955084],[-93.811132,34.009853],[-93.822086,34.009853],[-93.937102,34.349424],[-93.750886,34.349424]]]},"id":"05109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.890983,34.349424],[-104.890983,34.08653],[-104.907413,33.13902],[-105.318184,33.133543],[-105.728954,33.390959],[-106.347849,33.390959],[-106.375233,33.47859],[-106.052094,33.648375],[-105.926124,34.261793],[-105.312707,34.349424],[-104.890983,34.349424]]]},"id":"35027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.477039,34.33847],[-93.405839,34.33847],[-92.885529,34.157731],[-92.891006,33.807207],[-93.104607,33.779822],[-93.372977,33.955084],[-93.477039,34.33847]]]},"id":"05019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.259348,34.332993],[-83.958116,34.332993],[-84.062178,34.168685],[-84.09504,34.048192],[-84.259348,34.185115],[-84.259348,34.332993]]]},"id":"13117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.175361,34.322039],[-87.633143,34.305608],[-87.63862,34.004376],[-87.63862,33.916745],[-87.950806,33.922222],[-88.208222,34.059146],[-88.202745,34.08653],[-88.175361,34.322039]]]},"id":"01093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.418579,34.300131],[-113.330948,34.316562],[-113.336425,33.998899],[-113.336425,33.380005],[-113.993657,33.462159],[-114.513967,33.029481],[-114.628982,33.434775],[-114.43729,34.081054],[-114.136058,34.305608],[-113.418579,34.300131]]]},"id":"04012"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.673738,34.311085],[-100.514907,34.316562],[-100.520384,33.834591],[-100.90377,33.834591],[-101.040693,33.834591],[-101.040693,34.311085],[-100.947585,34.311085],[-100.673738,34.311085]]]},"id":"48345"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.514907,34.316562],[-100.416322,34.311085],[-100.000075,34.311085],[-100.000075,34.223454],[-100.049367,33.834591],[-100.520384,33.834591],[-100.514907,34.316562]]]},"id":"48101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.986864,34.311085],[-86.581571,34.305608],[-86.455601,34.261793],[-86.488463,34.261793],[-86.964957,33.856499],[-87.151173,33.993423],[-87.107357,34.300131],[-87.112834,34.311085],[-86.986864,34.311085]]]},"id":"01043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.327774,34.311085],[-102.092266,34.311085],[-102.086789,33.823637],[-102.618052,33.823637],[-102.612575,34.311085],[-102.524944,34.311085],[-102.327774,34.311085]]]},"id":"48279"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.092266,34.311085],[-101.999158,34.311085],[-101.56648,34.311085],[-101.561003,33.829114],[-101.571957,33.829114],[-102.086789,33.823637],[-102.092266,34.311085]]]},"id":"48189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.612575,34.311085],[-102.618052,33.823637],[-103.001438,33.823637],[-103.045254,33.823637],[-103.045254,34.300131],[-103.045254,34.311085],[-102.612575,34.311085]]]},"id":"48017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.473372,34.311085],[-101.040693,34.311085],[-101.040693,33.834591],[-101.561003,33.829114],[-101.56648,34.311085],[-101.473372,34.311085]]]},"id":"48153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.658718,34.305608],[-79.631334,34.300131],[-79.549179,34.228931],[-79.324625,33.80173],[-79.83398,33.883884],[-79.877796,33.883884],[-79.976381,33.94413],[-79.998289,34.048192],[-80.074966,34.08653],[-79.658718,34.305608]]]},"id":"45041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.633143,34.305608],[-87.529082,34.305608],[-87.107357,34.300131],[-87.151173,33.993423],[-87.627666,34.004376],[-87.63862,34.004376],[-87.633143,34.305608]]]},"id":"01133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.36844,34.300131],[-79.127455,34.256316],[-79.187701,33.703145],[-79.319148,33.779822],[-79.324625,33.80173],[-79.549179,34.228931],[-79.36844,34.300131]]]},"id":"45067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.078163,34.294654],[-79.072686,34.300131],[-78.650961,33.94413],[-78.541422,33.851022],[-79.001485,33.571698],[-79.187701,33.703145],[-79.127455,34.256316],[-79.078163,34.294654]]]},"id":"45051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.618546,34.289177],[-83.404945,34.196069],[-83.36113,34.042715],[-83.536392,33.966038],[-83.815716,34.124869],[-83.618546,34.294654],[-83.618546,34.289177]]]},"id":"13157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.061238,34.289177],[-97.562836,34.289177],[-97.562836,34.0701],[-97.562836,33.894838],[-97.979084,33.889361],[-98.137915,34.1413],[-98.137915,34.289177],[-98.061238,34.289177]]]},"id":"40067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.775097,34.289177],[-82.742236,34.207023],[-82.594358,34.01533],[-82.566974,33.955084],[-82.643651,33.982469],[-82.731282,33.982469],[-82.780574,33.971515],[-82.977744,34.042715],[-83.076329,34.228931],[-82.775097,34.289177]]]},"id":"13105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.120145,34.272746],[-83.114668,34.272746],[-83.076329,34.228931],[-82.977744,34.042715],[-83.098237,34.026284],[-83.257068,33.998899],[-83.36113,34.042715],[-83.404945,34.196069],[-83.355653,34.223454],[-83.120145,34.272746]]]},"id":"13195"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.863645,34.261793],[-80.825307,34.26727],[-80.617183,34.097484],[-80.62266,33.741483],[-81.011523,33.878407],[-81.340139,34.196069],[-81.318231,34.239885],[-80.863645,34.261793]]]},"id":"45079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.488463,34.261793],[-86.455601,34.261793],[-86.302247,34.097484],[-86.324155,33.938653],[-86.576094,33.763391],[-86.685633,33.796253],[-86.954003,33.812683],[-86.964957,33.856499],[-86.488463,34.261793]]]},"id":"01009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.000075,34.223454],[-99.474288,34.08653],[-99.474288,33.834591],[-99.474288,33.736006],[-99.868628,33.834591],[-99.994598,33.834591],[-100.049367,33.834591],[-100.000075,34.223454]]]},"id":"48155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.608932,34.157731],[-98.422716,34.081054],[-98.422716,33.834591],[-98.43367,33.834591],[-98.953979,33.834591],[-98.953979,34.2125],[-98.608932,34.157731]]]},"id":"48485"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.105077,34.201546],[-85.842184,34.201546],[-85.738122,33.966038],[-86.066738,33.840068],[-86.291293,33.982469],[-86.324155,33.938653],[-86.302247,34.097484],[-86.105077,34.201546]]]},"id":"01055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.340139,34.196069],[-81.011523,33.878407],[-81.044384,33.796253],[-81.044384,33.708622],[-81.186785,33.653852],[-81.57017,33.878407],[-81.471585,34.075577],[-81.340139,34.196069]]]},"id":"45063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.189041,34.190592],[-93.95901,33.752437],[-94.446457,33.927699],[-94.479319,33.938653],[-94.468365,34.190592],[-94.24381,34.190592],[-94.189041,34.190592]]]},"id":"05133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.511734,34.163208],[-89.506257,33.867453],[-89.927981,33.900315],[-89.933458,34.163208],[-89.719858,34.190592],[-89.511734,34.163208]]]},"id":"28161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.739956,34.185115],[-81.471585,34.075577],[-81.57017,33.878407],[-81.652325,33.812683],[-82.008326,33.960561],[-81.871402,34.135823],[-81.739956,34.185115]]]},"id":"45081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.407226,34.108438],[-84.259348,34.185115],[-84.09504,34.048192],[-84.275779,33.955084],[-84.352456,33.648375],[-84.456518,33.54979],[-84.609872,33.500498],[-84.681073,33.511452],[-84.850858,33.511452],[-84.807042,33.571698],[-84.577011,33.741483],[-84.418179,34.075577],[-84.407226,34.108438]]]},"id":"13121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.603925,34.113915],[-91.445094,34.081054],[-91.423186,34.01533],[-91.56011,33.785299],[-91.664172,33.790776],[-91.976357,33.790776],[-91.954449,34.064623],[-91.603925,34.113915]]]},"id":"05079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.932988,34.174162],[-96.587941,34.113915],[-96.587941,33.894838],[-96.932988,33.955084],[-96.971327,34.0701],[-96.932988,34.174162]]]},"id":"40095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.480259,34.168685],[-79.998289,34.048192],[-79.976381,33.94413],[-80.332382,33.779822],[-80.535029,33.642898],[-80.62266,33.741483],[-80.617183,34.097484],[-80.480259,34.168685]]]},"id":"45085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.990978,34.1413],[-83.815716,34.124869],[-83.799285,33.927699],[-83.980024,33.785299],[-84.02384,33.752437],[-84.275779,33.955084],[-84.275779,33.955084],[-84.09504,34.048192],[-84.062178,34.168685],[-83.990978,34.1413]]]},"id":"13135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.933458,34.163208],[-89.927981,33.900315],[-90.136105,33.719575],[-90.453768,33.812683],[-90.448291,33.987946],[-90.448291,34.075577],[-90.136105,34.157731],[-89.933458,34.163208]]]},"id":"28135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.511734,34.163208],[-89.243364,34.163208],[-89.139302,34.075577],[-89.194071,33.736006],[-89.506257,33.719575],[-89.506257,33.867453],[-89.511734,34.163208]]]},"id":"28013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.412679,34.157731],[-96.407202,34.157731],[-95.990954,34.157731],[-95.760923,33.87293],[-95.843077,33.840068],[-96.379817,33.725052],[-96.587941,33.894838],[-96.587941,34.113915],[-96.412679,34.157731]]]},"id":"40013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.137915,34.1413],[-97.979084,33.889361],[-97.979084,33.467636],[-98.422716,33.467636],[-98.422716,33.834591],[-98.422716,34.081054],[-98.137915,34.1413]]]},"id":"48077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.383014,34.157731],[-95.158459,34.157731],[-95.158459,33.938653],[-95.311814,33.878407],[-95.760923,33.87293],[-95.990954,34.157731],[-95.777354,34.157731],[-95.383014,34.157731]]]},"id":"40023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.885529,34.157731],[-92.677405,34.152254],[-92.337835,34.059146],[-92.332358,33.796253],[-92.584298,33.80173],[-92.891006,33.807207],[-92.885529,34.157731]]]},"id":"05039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.799285,33.927699],[-83.815716,34.124869],[-83.536392,33.966038],[-83.645931,33.905791],[-83.799285,33.927699]]]},"id":"13013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.738569,34.119392],[-90.656414,33.987946],[-90.765953,33.527883],[-91.001462,33.527883],[-91.215062,33.527883],[-91.231493,33.560744],[-90.952169,34.119392],[-90.957646,34.119392],[-90.738569,34.119392]]]},"id":"28011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.116477,34.119392],[-90.952169,34.119392],[-91.231493,33.560744],[-91.390325,33.560744],[-91.456048,33.566221],[-91.56011,33.785299],[-91.423186,34.01533],[-91.116477,34.119392]]]},"id":"05041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.42046,34.081054],[-85.048028,34.097484],[-84.922058,34.081054],[-85.048028,33.905791],[-85.310921,33.900315],[-85.387598,33.900315],[-85.398552,33.966038],[-85.42046,34.081054]]]},"id":"13233"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.706624,34.092007],[-88.542316,34.08653],[-88.202745,34.08653],[-88.208222,34.059146],[-88.246561,33.74696],[-88.514931,33.648375],[-88.717578,33.812683],[-88.717578,34.075577],[-88.706624,34.092007]]]},"id":"28095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.877749,34.081054],[-103.510794,33.571698],[-103.812025,32.963758],[-104.102303,32.963758],[-104.84169,32.963758],[-104.852644,32.520126],[-105.356522,32.520126],[-105.318184,33.133543],[-104.907413,33.13902],[-104.890983,34.08653],[-103.943472,34.081054],[-103.877749,34.081054]]]},"id":"35005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.922058,34.081054],[-84.735842,34.081054],[-84.724888,33.807207],[-84.90015,33.779822],[-85.037074,33.812683],[-85.048028,33.905791],[-84.922058,34.081054]]]},"id":"13223"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.615349,34.081054],[-84.418179,34.075577],[-84.577011,33.741483],[-84.724888,33.807207],[-84.735842,34.081054],[-84.659165,34.075577],[-84.615349,34.081054]]]},"id":"13067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.594358,34.01533],[-82.325988,34.064623],[-82.046664,33.955084],[-82.117864,33.599083],[-82.216449,33.686714],[-82.566974,33.955084],[-82.594358,34.01533]]]},"id":"45065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.733044,34.081054],[-114.43729,34.081054],[-114.628982,33.434775],[-114.733044,33.434775],[-116.085849,33.423821],[-117.476991,33.505975],[-117.509853,33.505975],[-117.674161,33.87293],[-117.559146,34.031761],[-114.733044,34.081054]]]},"id":"06065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.827116,34.075577],[-88.717578,34.075577],[-88.717578,33.812683],[-88.887363,33.812683],[-89.03524,33.741483],[-89.117394,33.741483],[-89.194071,33.736006],[-89.139302,34.075577],[-88.827116,34.075577]]]},"id":"28017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.562836,34.0701],[-96.971327,34.0701],[-96.932988,33.955084],[-96.943942,33.949607],[-97.486159,33.916745],[-97.562836,33.894838],[-97.562836,34.0701]]]},"id":"40085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.058511,34.064623],[-91.954449,34.064623],[-91.976357,33.790776],[-91.976357,33.703145],[-92.332358,33.708622],[-92.332358,33.796253],[-92.337835,34.059146],[-92.233773,34.064623],[-92.058511,34.064623]]]},"id":"05025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.208222,34.059146],[-87.950806,33.922222],[-87.945329,33.522406],[-88.273945,33.53336],[-88.246561,33.74696],[-88.208222,34.059146]]]},"id":"01075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.496173,33.998899],[-111.041587,33.467636],[-111.578327,33.467636],[-111.583804,33.204743],[-112.202698,33.308805],[-112.202698,32.509172],[-113.336425,32.503695],[-113.336425,33.380005],[-113.336425,33.998899],[-112.273898,33.883884],[-111.496173,33.998899]]]},"id":"04013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.098237,34.026284],[-82.977744,34.042715],[-82.780574,33.971515],[-82.950359,33.736006],[-82.994175,33.692191],[-83.278976,33.763391],[-83.273499,33.845545],[-83.257068,33.998899],[-83.098237,34.026284]]]},"id":"13221"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.36113,34.042715],[-83.257068,33.998899],[-83.273499,33.845545],[-83.530915,33.960561],[-83.536392,33.966038],[-83.36113,34.042715]]]},"id":"13059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.811132,34.009853],[-93.455131,33.955084],[-93.482516,33.47859],[-93.723501,33.484067],[-93.827563,33.610037],[-93.95901,33.752437],[-93.822086,34.009853],[-93.811132,34.009853]]]},"id":"05057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.627666,34.004376],[-87.151173,33.993423],[-86.964957,33.856499],[-86.954003,33.812683],[-87.266188,33.511452],[-87.42502,33.60456],[-87.63862,33.916745],[-87.63862,34.004376],[-87.627666,34.004376]]]},"id":"01127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.562836,33.894838],[-97.486159,33.916745],[-97.486159,33.434775],[-97.50259,33.434775],[-97.918837,33.434775],[-97.979084,33.467636],[-97.979084,33.889361],[-97.562836,33.894838]]]},"id":"48337"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.731282,33.982469],[-82.643651,33.982469],[-82.479343,33.637421],[-82.649128,33.610037],[-82.681989,33.599083],[-82.950359,33.736006],[-82.780574,33.971515],[-82.731282,33.982469]]]},"id":"13317"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.291293,33.982469],[-86.066738,33.840068],[-86.143416,33.681237],[-86.198185,33.697668],[-86.378924,33.390959],[-86.515848,33.544313],[-86.576094,33.763391],[-86.324155,33.938653],[-86.291293,33.982469]]]},"id":"01115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.448291,33.987946],[-90.453768,33.812683],[-90.453768,33.330713],[-90.716661,33.270466],[-90.765953,33.527883],[-90.656414,33.987946],[-90.448291,33.987946]]]},"id":"28133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.643651,33.982469],[-82.566974,33.955084],[-82.216449,33.686714],[-82.424573,33.648375],[-82.479343,33.637421],[-82.643651,33.982469]]]},"id":"13181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.008326,33.960561],[-81.652325,33.812683],[-82.013803,33.53336],[-82.030233,33.544313],[-82.117864,33.599083],[-82.046664,33.955084],[-82.008326,33.960561]]]},"id":"45037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.275779,33.955084],[-84.02384,33.752437],[-84.182671,33.648375],[-84.226487,33.637421],[-84.281256,33.648375],[-84.352456,33.648375],[-84.275779,33.955084],[-84.275779,33.955084]]]},"id":"13089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.738122,33.966038],[-85.529998,33.94413],[-85.798368,33.555267],[-86.143416,33.681237],[-86.066738,33.840068],[-85.738122,33.966038]]]},"id":"01015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.530915,33.960561],[-83.273499,33.845545],[-83.278976,33.763391],[-83.28993,33.736006],[-83.404945,33.697668],[-83.50353,33.81816],[-83.645931,33.905791],[-83.536392,33.966038],[-83.530915,33.960561]]]},"id":"13219"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.398552,33.966038],[-85.387598,33.900315],[-85.338305,33.653852],[-85.305444,33.484067],[-85.645014,33.495021],[-85.853138,33.500498],[-85.798368,33.555267],[-85.529998,33.94413],[-85.398552,33.966038]]]},"id":"01029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.158459,33.938653],[-94.736735,33.703145],[-94.747689,33.330713],[-94.807935,33.363574],[-95.125598,33.390959],[-95.306337,33.380005],[-95.306337,33.380005],[-95.311814,33.878407],[-95.158459,33.938653]]]},"id":"48387"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.455131,33.955084],[-93.372977,33.955084],[-93.104607,33.779822],[-93.115561,33.451205],[-93.247007,33.440252],[-93.3675,33.445728],[-93.482516,33.47859],[-93.455131,33.955084]]]},"id":"05099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.587941,33.894838],[-96.379817,33.725052],[-96.385294,33.396436],[-96.834403,33.40739],[-96.943942,33.418344],[-96.943942,33.949607],[-96.932988,33.955084],[-96.587941,33.894838]]]},"id":"48181"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.943942,33.949607],[-96.943942,33.418344],[-97.382097,33.429298],[-97.486159,33.434775],[-97.486159,33.916745],[-96.943942,33.949607]]]},"id":"48097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.7837,33.94413],[-117.674161,33.87293],[-117.509853,33.505975],[-117.597484,33.385482],[-118.117793,33.741483],[-117.7837,33.94413]]]},"id":"06059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.332382,33.779822],[-79.976381,33.94413],[-79.877796,33.883884],[-80.10235,33.495021],[-80.222843,33.445728],[-80.49669,33.560744],[-80.535029,33.642898],[-80.332382,33.779822]]]},"id":"45027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.446457,33.927699],[-93.95901,33.752437],[-93.95901,33.752437],[-93.827563,33.610037],[-94.041164,33.54979],[-94.484796,33.637421],[-94.479319,33.938653],[-94.446457,33.927699]]]},"id":"05081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.311814,33.878407],[-95.306337,33.380005],[-95.651384,33.484067],[-95.859508,33.462159],[-95.843077,33.840068],[-95.760923,33.87293],[-95.311814,33.878407]]]},"id":"48277"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.799285,33.927699],[-83.645931,33.905791],[-83.50353,33.81816],[-83.509007,33.812683],[-83.678792,33.599083],[-83.914301,33.74696],[-83.980024,33.785299],[-83.799285,33.927699]]]},"id":"13297"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.950806,33.922222],[-87.63862,33.916745],[-87.42502,33.60456],[-87.841267,33.522406],[-87.945329,33.522406],[-87.950806,33.922222]]]},"id":"01057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.310921,33.900315],[-85.048028,33.905791],[-85.037074,33.812683],[-85.338305,33.653852],[-85.387598,33.900315],[-85.310921,33.900315]]]},"id":"13143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.927981,33.900315],[-89.506257,33.867453],[-89.506257,33.719575],[-89.506257,33.67576],[-89.785581,33.67576],[-90.114197,33.67576],[-90.130628,33.67576],[-90.136105,33.719575],[-89.927981,33.900315]]]},"id":"28043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.83398,33.883884],[-79.324625,33.80173],[-79.319148,33.779822],[-79.319148,33.779822],[-79.675149,33.303328],[-80.053058,33.505975],[-80.10235,33.495021],[-79.877796,33.883884],[-79.83398,33.883884]]]},"id":"45089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.843077,33.840068],[-95.859508,33.462159],[-95.859508,33.40739],[-96.297663,33.35262],[-96.385294,33.396436],[-96.379817,33.725052],[-95.843077,33.840068]]]},"id":"48147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.044384,33.796253],[-81.011523,33.878407],[-80.62266,33.741483],[-80.535029,33.642898],[-80.49669,33.560744],[-81.044384,33.708622],[-81.044384,33.796253]]]},"id":"45017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.57017,33.878407],[-81.186785,33.653852],[-81.373001,33.489544],[-81.756386,33.199266],[-81.849494,33.248559],[-82.013803,33.53336],[-81.652325,33.812683],[-81.57017,33.878407]]]},"id":"45003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.685633,33.796253],[-86.576094,33.763391],[-86.515848,33.544313],[-87.025203,33.248559],[-87.063542,33.248559],[-87.266188,33.511452],[-86.954003,33.812683],[-86.685633,33.796253]]]},"id":"01073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.43367,33.834591],[-98.422716,33.834591],[-98.422716,33.467636],[-98.422716,33.396436],[-98.953979,33.396436],[-98.953979,33.834591],[-98.43367,33.834591]]]},"id":"48009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.994598,33.834591],[-99.989121,33.396436],[-100.197245,33.396436],[-100.514907,33.396436],[-100.520384,33.834591],[-100.049367,33.834591],[-99.994598,33.834591]]]},"id":"48269"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.868628,33.834591],[-99.474288,33.736006],[-99.474288,33.396436],[-99.518104,33.396436],[-99.989121,33.396436],[-99.994598,33.834591],[-99.868628,33.834591]]]},"id":"48275"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.90377,33.834591],[-100.520384,33.834591],[-100.514907,33.396436],[-100.816139,33.396436],[-101.040693,33.396436],[-101.040693,33.834591],[-100.90377,33.834591]]]},"id":"48125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.992318,33.834591],[-98.953979,33.834591],[-98.953979,33.396436],[-99.474288,33.396436],[-99.474288,33.736006],[-99.474288,33.834591],[-98.992318,33.834591]]]},"id":"48023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.561003,33.829114],[-101.040693,33.834591],[-101.040693,33.396436],[-101.111894,33.396436],[-101.555526,33.396436],[-101.561003,33.829114]]]},"id":"48107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.571957,33.829114],[-101.561003,33.829114],[-101.555526,33.396436],[-102.075835,33.390959],[-102.086789,33.823637],[-101.571957,33.829114]]]},"id":"48303"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.001438,33.823637],[-102.618052,33.823637],[-102.596144,33.390959],[-103.056207,33.390959],[-103.050731,33.571698],[-103.045254,33.823637],[-103.001438,33.823637]]]},"id":"48079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.618052,33.823637],[-102.086789,33.823637],[-102.075835,33.390959],[-102.366113,33.390959],[-102.596144,33.390959],[-102.618052,33.823637]]]},"id":"48219"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.891006,33.807207],[-92.584298,33.80173],[-92.567867,33.369051],[-92.737652,33.385482],[-92.978637,33.380005],[-93.115561,33.451205],[-93.104607,33.779822],[-92.891006,33.807207]]]},"id":"05103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.509007,33.812683],[-83.50353,33.81816],[-83.404945,33.697668],[-83.278976,33.484067],[-83.278976,33.484067],[-83.536392,33.434775],[-83.684269,33.527883],[-83.678792,33.599083],[-83.509007,33.812683]]]},"id":"13211"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.037074,33.812683],[-84.90015,33.779822],[-84.807042,33.571698],[-84.850858,33.511452],[-85.015166,33.423821],[-85.29449,33.429298],[-85.305444,33.484067],[-85.338305,33.653852],[-85.037074,33.812683]]]},"id":"13045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.887363,33.812683],[-88.717578,33.812683],[-88.514931,33.648375],[-88.673762,33.505975],[-89.018809,33.560744],[-89.03524,33.741483],[-88.887363,33.812683]]]},"id":"28025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.453768,33.812683],[-90.136105,33.719575],[-90.130628,33.67576],[-90.174444,33.330713],[-90.333275,33.303328],[-90.453768,33.330713],[-90.453768,33.812683]]]},"id":"28083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.724888,33.807207],[-84.577011,33.741483],[-84.807042,33.571698],[-84.90015,33.779822],[-84.724888,33.807207]]]},"id":"13097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.584298,33.80173],[-92.332358,33.796253],[-92.332358,33.708622],[-92.348789,33.297851],[-92.567867,33.369051],[-92.584298,33.80173]]]},"id":"05013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.664172,33.790776],[-91.56011,33.785299],[-91.456048,33.566221],[-91.456048,33.390959],[-91.992788,33.396436],[-91.976357,33.703145],[-91.976357,33.790776],[-91.664172,33.790776]]]},"id":"05043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.980024,33.785299],[-83.914301,33.74696],[-84.045747,33.527883],[-84.182671,33.648375],[-84.02384,33.752437],[-83.980024,33.785299]]]},"id":"13247"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.319148,33.779822],[-79.319148,33.779822],[-79.187701,33.703145],[-79.001485,33.571698],[-79.291763,33.111635],[-79.445118,33.215697],[-79.675149,33.303328],[-79.319148,33.779822]]]},"id":"45043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.497089,33.653852],[-109.04798,33.779822],[-109.04798,33.21022],[-109.04798,32.777542],[-109.04798,32.427018],[-109.113704,32.427018],[-109.497089,33.078773],[-109.497089,33.653852]]]},"id":"04011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.28993,33.736006],[-83.278976,33.763391],[-82.994175,33.692191],[-83.010606,33.467636],[-83.16396,33.35262],[-83.278976,33.484067],[-83.404945,33.697668],[-83.28993,33.736006]]]},"id":"13133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.246561,33.74696],[-88.273945,33.53336],[-88.306807,33.286897],[-88.668285,33.286897],[-88.673762,33.505975],[-88.514931,33.648375],[-88.246561,33.74696]]]},"id":"28087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.914301,33.74696],[-83.678792,33.599083],[-83.684269,33.527883],[-83.865008,33.369051],[-83.925255,33.451205],[-84.045747,33.527883],[-83.914301,33.74696]]]},"id":"13217"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.117394,33.741483],[-89.03524,33.741483],[-89.018809,33.560744],[-89.051671,33.560744],[-89.09001,33.53336],[-89.139302,33.53336],[-89.380287,33.462159],[-89.506257,33.67576],[-89.506257,33.719575],[-89.194071,33.736006],[-89.117394,33.741483]]]},"id":"28155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.950359,33.736006],[-82.681989,33.599083],[-82.851774,33.445728],[-83.010606,33.467636],[-83.010606,33.467636],[-82.994175,33.692191],[-82.950359,33.736006]]]},"id":"13265"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.736735,33.703145],[-94.484796,33.637421],[-94.041164,33.54979],[-94.041164,33.270466],[-94.194518,33.297851],[-94.654581,33.270466],[-94.747689,33.330713],[-94.736735,33.703145]]]},"id":"48037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.332358,33.708622],[-91.976357,33.703145],[-91.992788,33.396436],[-92.135188,33.160928],[-92.348789,33.297851],[-92.332358,33.708622]]]},"id":"05011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.044384,33.708622],[-80.49669,33.560744],[-80.222843,33.445728],[-80.359767,33.259513],[-80.502167,33.33619],[-80.792445,33.182835],[-80.797922,33.177358],[-81.10463,33.380005],[-81.225123,33.440252],[-81.373001,33.489544],[-81.186785,33.653852],[-81.044384,33.708622]]]},"id":"45075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.216449,33.686714],[-82.117864,33.599083],[-82.030233,33.544313],[-82.293127,33.35262],[-82.424573,33.648375],[-82.216449,33.686714]]]},"id":"13073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.198185,33.697668],[-86.143416,33.681237],[-85.798368,33.555267],[-85.853138,33.500498],[-85.875046,33.500498],[-86.176277,33.106158],[-86.488463,33.100681],[-86.378924,33.390959],[-86.198185,33.697668]]]},"id":"01121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.506257,33.67576],[-89.380287,33.462159],[-89.451488,33.286897],[-89.643181,33.286897],[-89.785581,33.67576],[-89.506257,33.67576]]]},"id":"28097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.114197,33.67576],[-89.785581,33.67576],[-89.643181,33.286897],[-89.747242,33.215697],[-90.174444,33.330713],[-90.130628,33.67576],[-90.114197,33.67576]]]},"id":"28015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.424573,33.648375],[-82.293127,33.35262],[-82.353373,33.314282],[-82.386235,33.314282],[-82.649128,33.610037],[-82.479343,33.637421],[-82.424573,33.648375]]]},"id":"13189"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.743552,33.500498],[-109.497089,33.653852],[-109.497089,33.078773],[-109.113704,32.427018],[-109.831183,32.427018],[-110.450077,32.427018],[-110.450077,32.514649],[-110.450077,33.193789],[-110.000968,33.577175],[-109.891429,33.566221],[-109.743552,33.500498]]]},"id":"04009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.352456,33.648375],[-84.281256,33.648375],[-84.352456,33.35262],[-84.368887,33.35262],[-84.385318,33.35262],[-84.451041,33.54979],[-84.456518,33.54979],[-84.352456,33.648375]]]},"id":"13063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.226487,33.637421],[-84.182671,33.648375],[-84.045747,33.527883],[-83.925255,33.451205],[-84.100517,33.297851],[-84.352456,33.35262],[-84.281256,33.648375],[-84.226487,33.637421]]]},"id":"13151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.827563,33.610037],[-93.723501,33.484067],[-93.805655,33.018527],[-93.816609,33.018527],[-94.041164,33.018527],[-94.041164,33.270466],[-94.041164,33.54979],[-93.827563,33.610037]]]},"id":"05091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.649128,33.610037],[-82.386235,33.314282],[-82.43005,33.275943],[-82.687466,33.270466],[-82.75319,33.254036],[-82.851774,33.445728],[-82.681989,33.599083],[-82.649128,33.610037]]]},"id":"13301"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.841267,33.522406],[-87.42502,33.60456],[-87.266188,33.511452],[-87.063542,33.248559],[-87.419543,33.002096],[-87.644097,33.007573],[-87.715298,33.007573],[-87.83579,33.155451],[-87.841267,33.522406]]]},"id":"01125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.050731,33.571698],[-103.056207,33.390959],[-103.067161,32.958281],[-103.067161,32.520126],[-103.061684,32.087447],[-103.324578,31.999816],[-103.71344,31.999816],[-103.724394,31.999816],[-103.812025,32.963758],[-103.510794,33.571698],[-103.050731,33.571698]]]},"id":"35025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.051671,33.560744],[-89.018809,33.560744],[-88.673762,33.505975],[-88.668285,33.286897],[-88.810686,33.286897],[-89.09001,33.286897],[-89.09001,33.53336],[-89.051671,33.560744]]]},"id":"28105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.390325,33.560744],[-91.231493,33.560744],[-91.215062,33.527883],[-91.16577,33.01305],[-91.16577,33.002096],[-91.264355,33.007573],[-91.30817,33.007573],[-91.43414,33.007573],[-91.461525,33.007573],[-91.456048,33.390959],[-91.456048,33.566221],[-91.390325,33.560744]]]},"id":"05017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.451041,33.54979],[-84.385318,33.35262],[-84.494857,33.259513],[-84.609872,33.500498],[-84.456518,33.54979],[-84.451041,33.54979]]]},"id":"13113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.515848,33.544313],[-86.378924,33.390959],[-86.488463,33.100681],[-86.515848,33.018527],[-86.882803,33.051389],[-87.025203,33.248559],[-86.515848,33.544313]]]},"id":"01117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.030233,33.544313],[-82.013803,33.53336],[-81.849494,33.248559],[-82.189065,33.292374],[-82.265742,33.264989],[-82.353373,33.314282],[-82.293127,33.35262],[-82.030233,33.544313]]]},"id":"13245"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.273945,33.53336],[-87.945329,33.522406],[-87.841267,33.522406],[-87.83579,33.155451],[-88.169884,32.996619],[-88.339669,32.991142],[-88.306807,33.286897],[-88.273945,33.53336]]]},"id":"01107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.139302,33.53336],[-89.09001,33.53336],[-89.09001,33.286897],[-89.320041,33.106158],[-89.396718,33.286897],[-89.451488,33.286897],[-89.380287,33.462159],[-89.139302,33.53336]]]},"id":"28019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.001462,33.527883],[-90.765953,33.527883],[-90.716661,33.270466],[-90.70023,33.095204],[-90.913831,33.095204],[-90.913831,33.007573],[-91.16577,33.01305],[-91.215062,33.527883],[-91.001462,33.527883]]]},"id":"28151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.684269,33.527883],[-83.536392,33.434775],[-83.547346,33.171881],[-83.815716,33.133543],[-83.821193,33.182835],[-83.865008,33.369051],[-83.684269,33.527883]]]},"id":"13159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.681073,33.511452],[-84.609872,33.500498],[-84.494857,33.259513],[-84.500334,33.221174],[-84.861812,33.193789],[-84.938489,33.226651],[-85.015166,33.423821],[-84.850858,33.511452],[-84.681073,33.511452]]]},"id":"13077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.053058,33.505975],[-79.675149,33.303328],[-79.445118,33.215697],[-79.49441,33.188312],[-79.927088,32.821357],[-80.151643,33.024004],[-80.359767,33.259513],[-80.222843,33.445728],[-80.10235,33.495021],[-80.053058,33.505975]]]},"id":"45015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.476991,33.505975],[-116.085849,33.423821],[-116.107756,32.61871],[-117.126467,32.536556],[-117.597484,33.385482],[-117.509853,33.505975],[-117.476991,33.505975]]]},"id":"06073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.645014,33.495021],[-85.305444,33.484067],[-85.29449,33.429298],[-85.234244,33.128066],[-85.234244,33.106158],[-85.404029,33.106158],[-85.595722,33.106158],[-85.655968,33.106158],[-85.645014,33.495021]]]},"id":"01111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.875046,33.500498],[-85.853138,33.500498],[-85.645014,33.495021],[-85.655968,33.106158],[-86.006492,33.089727],[-86.176277,33.106158],[-85.875046,33.500498]]]},"id":"01027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.651384,33.484067],[-95.306337,33.380005],[-95.306337,33.380005],[-95.306337,33.374528],[-95.492553,33.35262],[-95.859508,33.221174],[-95.859508,33.40739],[-95.859508,33.462159],[-95.651384,33.484067]]]},"id":"48119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.373001,33.489544],[-81.225123,33.440252],[-81.192262,33.117112],[-81.613986,33.095204],[-81.756386,33.199266],[-81.373001,33.489544]]]},"id":"45011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.278976,33.484067],[-83.278976,33.484067],[-83.16396,33.35262],[-83.273499,33.188312],[-83.426853,33.182835],[-83.547346,33.171881],[-83.536392,33.434775],[-83.278976,33.484067]]]},"id":"13237"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.723501,33.484067],[-93.482516,33.47859],[-93.3675,33.445728],[-93.487993,33.018527],[-93.49347,33.018527],[-93.520854,33.018527],[-93.805655,33.018527],[-93.723501,33.484067]]]},"id":"05073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.375233,33.47859],[-106.347849,33.390959],[-106.342372,33.051389],[-107.300836,32.777542],[-107.300836,32.607757],[-107.607545,32.607757],[-108.001885,33.199266],[-107.711607,33.47859],[-106.375233,33.47859]]]},"id":"35051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.010606,33.467636],[-82.851774,33.445728],[-82.75319,33.254036],[-82.747713,33.237605],[-83.054421,33.078773],[-83.273499,33.188312],[-83.16396,33.35262],[-83.010606,33.467636],[-83.010606,33.467636]]]},"id":"13141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.422716,33.467636],[-97.979084,33.467636],[-97.918837,33.434775],[-97.924314,33.002096],[-98.055761,33.002096],[-98.055761,33.002096],[-98.428193,33.007573],[-98.422716,33.396436],[-98.422716,33.467636]]]},"id":"48237"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.578327,33.467636],[-111.041587,33.467636],[-110.778693,32.985665],[-110.450077,33.193789],[-110.450077,32.514649],[-110.696539,32.514649],[-112.202698,32.509172],[-112.202698,33.308805],[-111.583804,33.204743],[-111.578327,33.467636]]]},"id":"04021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-113.993657,33.462159],[-113.336425,33.380005],[-113.336425,32.503695],[-113.336425,32.038155],[-114.815198,32.492741],[-114.72209,32.717295],[-114.513967,33.029481],[-113.993657,33.462159]]]},"id":"04027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.247007,33.440252],[-93.115561,33.451205],[-92.978637,33.380005],[-92.989591,33.018527],[-93.236053,33.018527],[-93.487993,33.018527],[-93.3675,33.445728],[-93.247007,33.440252]]]},"id":"05027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.925255,33.451205],[-83.865008,33.369051],[-83.821193,33.182835],[-84.001932,33.204743],[-84.040271,33.204743],[-84.122425,33.204743],[-84.100517,33.297851],[-83.925255,33.451205]]]},"id":"13035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.10463,33.380005],[-80.797922,33.177358],[-81.082723,33.024004],[-81.192262,33.117112],[-81.225123,33.440252],[-81.10463,33.380005]]]},"id":"45009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.50259,33.434775],[-97.486159,33.434775],[-97.382097,33.429298],[-97.398528,32.991142],[-97.535452,32.996619],[-97.546405,32.996619],[-97.924314,33.002096],[-97.918837,33.434775],[-97.50259,33.434775]]]},"id":"48497"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-114.733044,33.434775],[-114.628982,33.434775],[-114.513967,33.029481],[-114.72209,32.717295],[-116.107756,32.61871],[-116.085849,33.423821],[-114.733044,33.434775]]]},"id":"06025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.382097,33.429298],[-96.943942,33.418344],[-96.834403,33.40739],[-96.834403,33.40739],[-96.845357,32.985665],[-96.856311,32.985665],[-97.031573,32.985665],[-97.398528,32.991142],[-97.382097,33.429298]]]},"id":"48121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.015166,33.423821],[-84.938489,33.226651],[-84.938489,33.226651],[-85.234244,33.128066],[-85.29449,33.429298],[-85.015166,33.423821]]]},"id":"13149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.859508,33.40739],[-95.859508,33.221174],[-95.864985,32.980189],[-95.936185,32.837788],[-96.062155,32.837788],[-96.078585,32.837788],[-96.297663,32.843265],[-96.297663,32.980189],[-96.297663,33.35262],[-95.859508,33.40739]]]},"id":"48231"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.834403,33.40739],[-96.834403,33.40739],[-96.385294,33.396436],[-96.297663,33.35262],[-96.297663,32.980189],[-96.440064,32.980189],[-96.516741,32.980189],[-96.845357,32.985665],[-96.834403,33.40739]]]},"id":"48085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.816139,33.396436],[-100.514907,33.396436],[-100.520384,32.963758],[-100.657308,32.963758],[-101.040693,32.969235],[-101.040693,33.396436],[-100.816139,33.396436]]]},"id":"48263"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.518104,33.396436],[-99.474288,33.396436],[-99.468812,32.958281],[-99.611212,32.958281],[-99.989121,32.958281],[-99.989121,33.396436],[-99.518104,33.396436]]]},"id":"48207"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.474288,33.396436],[-98.953979,33.396436],[-98.948502,32.958281],[-99.09638,32.958281],[-99.233303,32.958281],[-99.468812,32.958281],[-99.474288,33.396436]]]},"id":"48447"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.992788,33.396436],[-91.456048,33.390959],[-91.461525,33.007573],[-92.069465,33.007573],[-92.135188,33.160928],[-91.992788,33.396436]]]},"id":"05003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.197245,33.396436],[-99.989121,33.396436],[-99.989121,32.958281],[-100.109614,32.958281],[-100.142475,32.958281],[-100.520384,32.963758],[-100.514907,33.396436],[-100.197245,33.396436]]]},"id":"48433"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.807935,33.363574],[-94.818889,32.980189],[-95.125598,33.034958],[-95.125598,33.390959],[-94.807935,33.363574]]]},"id":"48449"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.953979,33.396436],[-98.422716,33.396436],[-98.428193,33.007573],[-98.57607,32.952804],[-98.762286,32.958281],[-98.948502,32.958281],[-98.953979,33.396436]]]},"id":"48503"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.111894,33.396436],[-101.040693,33.396436],[-101.040693,32.969235],[-101.17214,32.963758],[-101.555526,32.963758],[-101.555526,33.396436],[-101.111894,33.396436]]]},"id":"48169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.555526,33.396436],[-101.555526,32.963758],[-101.692449,32.963758],[-102.075835,32.958281],[-102.075835,33.390959],[-101.555526,33.396436]]]},"id":"48305"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.728954,33.390959],[-105.318184,33.133543],[-105.356522,32.520126],[-104.852644,32.520126],[-104.847167,31.999816],[-104.918367,31.999816],[-105.997324,31.999816],[-106.375233,31.999816],[-106.342372,33.051389],[-106.347849,33.390959],[-105.728954,33.390959]]]},"id":"35035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.366113,33.390959],[-102.075835,33.390959],[-102.075835,32.958281],[-102.207282,32.958281],[-102.596144,32.958281],[-102.596144,33.390959],[-102.366113,33.390959]]]},"id":"48445"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.306337,33.380005],[-95.125598,33.390959],[-95.125598,33.034958],[-95.152983,33.01305],[-95.306337,32.963758],[-95.306337,33.374528],[-95.306337,33.380005]]]},"id":"48159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.056207,33.390959],[-102.596144,33.390959],[-102.596144,32.958281],[-103.067161,32.958281],[-103.056207,33.390959]]]},"id":"48501"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.737652,33.385482],[-92.567867,33.369051],[-92.348789,33.297851],[-92.135188,33.160928],[-92.069465,33.007573],[-92.710267,33.01305],[-92.726698,33.01305],[-92.989591,33.018527],[-92.978637,33.380005],[-92.737652,33.385482]]]},"id":"05139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.492553,33.35262],[-95.306337,33.374528],[-95.306337,32.963758],[-95.667815,32.958281],[-95.864985,32.980189],[-95.859508,33.221174],[-95.492553,33.35262]]]},"id":"48223"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.174444,33.330713],[-89.747242,33.215697],[-89.96632,32.881604],[-90.366137,33.01305],[-90.333275,33.303328],[-90.174444,33.330713]]]},"id":"28051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.807935,33.363574],[-94.747689,33.330713],[-94.654581,33.270466],[-94.654581,32.881604],[-94.703873,32.881604],[-94.720304,32.903511],[-94.818889,32.980189],[-94.807935,33.363574]]]},"id":"48343"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.368887,33.35262],[-84.352456,33.35262],[-84.100517,33.297851],[-84.122425,33.204743],[-84.248394,33.188312],[-84.494857,33.182835],[-84.500334,33.221174],[-84.494857,33.259513],[-84.385318,33.35262],[-84.368887,33.35262]]]},"id":"13255"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.502167,33.33619],[-80.359767,33.259513],[-80.151643,33.024004],[-80.403582,32.859696],[-80.792445,33.182835],[-80.502167,33.33619]]]},"id":"45035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.453768,33.330713],[-90.333275,33.303328],[-90.366137,33.01305],[-90.656414,32.919942],[-90.70023,33.095204],[-90.716661,33.270466],[-90.453768,33.330713]]]},"id":"28053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.687466,33.270466],[-82.43005,33.275943],[-82.660082,33.128066],[-82.747713,33.237605],[-82.75319,33.254036],[-82.687466,33.270466]]]},"id":"13125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.386235,33.314282],[-82.353373,33.314282],[-82.265742,33.264989],[-82.315034,32.837788],[-82.435527,32.761111],[-82.523158,32.821357],[-82.660082,33.128066],[-82.43005,33.275943],[-82.386235,33.314282]]]},"id":"13163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.194518,33.297851],[-94.041164,33.270466],[-94.041164,33.018527],[-94.041164,32.881604],[-94.249287,32.881604],[-94.654581,32.881604],[-94.654581,33.270466],[-94.194518,33.297851]]]},"id":"48067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.189065,33.292374],[-81.849494,33.248559],[-81.756386,33.199266],[-81.613986,33.095204],[-81.542786,33.045912],[-81.76734,32.908988],[-81.860448,32.952804],[-82.145249,32.810403],[-82.315034,32.837788],[-82.265742,33.264989],[-82.189065,33.292374]]]},"id":"13033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.668285,33.286897],[-88.306807,33.286897],[-88.339669,32.991142],[-88.345146,32.930896],[-88.810686,32.925419],[-88.810686,33.286897],[-88.668285,33.286897]]]},"id":"28103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.09001,33.286897],[-88.810686,33.286897],[-88.810686,32.925419],[-88.914747,32.925419],[-89.155733,32.930896],[-89.320041,32.930896],[-89.320041,33.106158],[-89.09001,33.286897]]]},"id":"28159"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.396718,33.286897],[-89.320041,33.106158],[-89.320041,32.930896],[-89.473395,32.930896],[-89.730812,32.887081],[-89.96632,32.881604],[-89.747242,33.215697],[-89.643181,33.286897],[-89.451488,33.286897],[-89.396718,33.286897]]]},"id":"28007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.063542,33.248559],[-87.025203,33.248559],[-86.882803,33.051389],[-87.019726,32.837788],[-87.326435,32.876127],[-87.419543,32.876127],[-87.419543,33.002096],[-87.063542,33.248559]]]},"id":"01007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.747713,33.237605],[-82.660082,33.128066],[-82.523158,32.821357],[-82.944882,32.761111],[-83.076329,32.947327],[-83.054421,33.078773],[-82.747713,33.237605]]]},"id":"13303"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.861812,33.193789],[-84.500334,33.221174],[-84.494857,33.182835],[-84.527718,32.969235],[-84.50581,32.881604],[-84.70298,32.843265],[-84.861812,32.87065],[-84.861812,32.87065],[-84.861812,33.193789]]]},"id":"13199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.938489,33.226651],[-84.938489,33.226651],[-84.861812,33.193789],[-84.861812,32.87065],[-85.184951,32.87065],[-85.234244,33.106158],[-85.234244,33.128066],[-84.938489,33.226651]]]},"id":"13285"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.49441,33.188312],[-79.445118,33.215697],[-79.291763,33.111635],[-80.250228,32.531079],[-80.403582,32.859696],[-80.151643,33.024004],[-79.927088,32.821357],[-79.49441,33.188312]]]},"id":"45019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-108.182624,33.199266],[-108.001885,33.199266],[-107.607545,32.607757],[-108.231916,32.514649],[-108.215485,31.862893],[-108.522194,31.862893],[-108.538625,32.514649],[-109.04798,32.777542],[-109.04798,33.21022],[-108.182624,33.199266]]]},"id":"35017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.494857,33.182835],[-84.248394,33.188312],[-84.270302,32.991142],[-84.36341,32.991142],[-84.527718,32.969235],[-84.494857,33.182835]]]},"id":"13231"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.040271,33.204743],[-84.122425,32.930896],[-84.270302,32.991142],[-84.248394,33.188312],[-84.122425,33.204743],[-84.040271,33.204743]]]},"id":"13171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.001932,33.204743],[-83.821193,33.182835],[-83.815716,33.133543],[-83.711654,32.952804],[-83.722608,32.952804],[-83.892393,32.848742],[-84.122425,32.848742],[-84.122425,32.930896],[-84.040271,33.204743],[-84.001932,33.204743]]]},"id":"13207"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.273499,33.188312],[-83.054421,33.078773],[-83.076329,32.947327],[-83.355653,32.925419],[-83.426853,33.182835],[-83.273499,33.188312]]]},"id":"13009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.426853,33.182835],[-83.355653,32.925419],[-83.404945,32.898034],[-83.514484,32.843265],[-83.711654,32.952804],[-83.815716,33.133543],[-83.547346,33.171881],[-83.426853,33.182835]]]},"id":"13169"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.792445,33.182835],[-80.403582,32.859696],[-80.250228,32.531079],[-80.474782,32.487264],[-80.825307,32.706342],[-81.055338,33.002096],[-81.082723,33.024004],[-80.797922,33.177358],[-80.792445,33.182835]]]},"id":"45029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.613986,33.095204],[-81.192262,33.117112],[-81.082723,33.024004],[-81.411339,32.74468],[-81.542786,33.045912],[-81.613986,33.095204]]]},"id":"45005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.83579,33.155451],[-87.715298,33.007573],[-87.813882,32.525602],[-87.852221,32.531079],[-88.169884,32.996619],[-87.83579,33.155451]]]},"id":"01063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.404029,33.106158],[-85.234244,33.106158],[-85.184951,32.87065],[-85.130182,32.74468],[-85.184951,32.74468],[-85.595722,32.728249],[-85.595722,33.106158],[-85.404029,33.106158]]]},"id":"01017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.655968,33.106158],[-85.595722,33.106158],[-85.595722,32.728249],[-85.694307,32.596803],[-85.885999,32.492741],[-86.006492,32.755634],[-86.006492,33.089727],[-85.655968,33.106158]]]},"id":"01123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.176277,33.106158],[-86.006492,33.089727],[-86.006492,32.755634],[-86.378924,32.755634],[-86.515848,33.018527],[-86.488463,33.100681],[-86.176277,33.106158]]]},"id":"01037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.913831,33.095204],[-90.70023,33.095204],[-90.656414,32.919942],[-90.722138,32.662526],[-90.913831,33.007573],[-90.913831,33.095204]]]},"id":"28125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.125598,33.034958],[-94.818889,32.980189],[-94.720304,32.903511],[-94.780551,32.903511],[-95.152983,32.903511],[-95.152983,33.01305],[-95.125598,33.034958]]]},"id":"48063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.515848,33.018527],[-86.378924,32.755634],[-86.411786,32.706342],[-86.915664,32.662526],[-87.019726,32.728249],[-87.019726,32.837788],[-86.882803,33.051389],[-86.515848,33.018527]]]},"id":"01021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-106.342372,33.051389],[-106.375233,31.999816],[-106.528588,31.786216],[-107.295359,31.786216],[-107.300836,32.607757],[-107.300836,32.777542],[-106.342372,33.051389]]]},"id":"35013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.542786,33.045912],[-81.411339,32.74468],[-81.389431,32.596803],[-81.548263,32.487264],[-81.827587,32.651572],[-81.838541,32.651572],[-81.76734,32.908988],[-81.542786,33.045912]]]},"id":"13251"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.055338,33.002096],[-80.825307,32.706342],[-80.869122,32.662526],[-81.142969,32.657049],[-81.279893,32.558464],[-81.389431,32.596803],[-81.411339,32.74468],[-81.082723,33.024004],[-81.055338,33.002096]]]},"id":"45049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.366137,33.01305],[-89.96632,32.881604],[-90.448291,32.574895],[-90.486629,32.542033],[-90.552353,32.509172],[-90.722138,32.61871],[-90.722138,32.662526],[-90.656414,32.919942],[-90.366137,33.01305]]]},"id":"28163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.805655,33.018527],[-93.520854,33.018527],[-93.372977,32.410587],[-93.427746,32.235325],[-93.471562,32.235325],[-93.816609,33.018527],[-93.805655,33.018527]]]},"id":"22015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.816609,33.018527],[-93.471562,32.235325],[-93.613962,32.235325],[-93.750886,32.339387],[-94.041164,32.196986],[-94.041164,32.394156],[-94.041164,32.695388],[-94.041164,32.881604],[-94.041164,33.018527],[-93.816609,33.018527]]]},"id":"22017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.49347,33.018527],[-93.487993,33.018527],[-93.236053,33.018527],[-93.181284,32.585849],[-93.372977,32.410587],[-93.520854,33.018527],[-93.49347,33.018527]]]},"id":"22119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.236053,33.018527],[-92.989591,33.018527],[-92.726698,33.01305],[-92.726698,32.761111],[-92.880052,32.585849],[-92.912914,32.585849],[-93.181284,32.585849],[-93.236053,33.018527]]]},"id":"22027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.710267,33.01305],[-92.069465,33.007573],[-92.063988,32.722772],[-92.414512,32.580372],[-92.726698,32.761111],[-92.726698,33.01305],[-92.710267,33.01305]]]},"id":"22111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.152983,33.01305],[-95.152983,32.903511],[-95.152983,32.569418],[-95.574707,32.67348],[-95.596615,32.684434],[-95.634953,32.722772],[-95.667815,32.958281],[-95.306337,32.963758],[-95.152983,33.01305]]]},"id":"48499"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.913831,33.007573],[-90.722138,32.662526],[-90.722138,32.61871],[-91.045277,32.574895],[-91.16577,33.002096],[-91.16577,33.01305],[-90.913831,33.007573]]]},"id":"28055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.076329,32.947327],[-82.944882,32.761111],[-82.955836,32.706342],[-83.224206,32.585849],[-83.393992,32.876127],[-83.404945,32.898034],[-83.355653,32.925419],[-83.076329,32.947327]]]},"id":"13319"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.069465,33.007573],[-91.461525,33.007573],[-91.43414,33.007573],[-91.636787,32.668003],[-91.910634,32.503695],[-91.998265,32.706342],[-92.063988,32.722772],[-92.069465,33.007573]]]},"id":"22067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.428193,33.007573],[-98.055761,33.002096],[-98.066715,32.558464],[-98.066715,32.509172],[-98.477485,32.514649],[-98.57607,32.514649],[-98.57607,32.952804],[-98.428193,33.007573]]]},"id":"48363"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.644097,33.007573],[-87.419543,33.002096],[-87.419543,32.876127],[-87.523605,32.481787],[-87.813882,32.525602],[-87.715298,33.007573],[-87.644097,33.007573]]]},"id":"01065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.30817,33.007573],[-91.264355,33.007573],[-91.445094,32.580372],[-91.598448,32.668003],[-91.636787,32.668003],[-91.43414,33.007573],[-91.30817,33.007573]]]},"id":"22123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.16577,33.002096],[-91.045277,32.574895],[-91.067185,32.563941],[-91.368417,32.536556],[-91.456048,32.536556],[-91.445094,32.580372],[-91.264355,33.007573],[-91.16577,33.002096]]]},"id":"22035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.055761,33.002096],[-97.924314,33.002096],[-97.546405,32.996619],[-97.551882,32.552987],[-97.617606,32.552987],[-98.066715,32.558464],[-98.055761,33.002096],[-98.055761,33.002096]]]},"id":"48367"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.36341,32.991142],[-84.270302,32.991142],[-84.122425,32.930896],[-84.122425,32.848742],[-84.204579,32.689911],[-84.286733,32.750157],[-84.50581,32.881604],[-84.527718,32.969235],[-84.36341,32.991142]]]},"id":"13293"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.339669,32.991142],[-88.169884,32.996619],[-87.852221,32.531079],[-87.928898,32.312002],[-87.994621,32.312002],[-88.421823,32.306525],[-88.388961,32.580372],[-88.345146,32.930896],[-88.339669,32.991142]]]},"id":"01119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.535452,32.996619],[-97.398528,32.991142],[-97.031573,32.985665],[-97.03705,32.54751],[-97.086342,32.54751],[-97.551882,32.552987],[-97.546405,32.996619],[-97.535452,32.996619]]]},"id":"48439"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.856311,32.985665],[-96.845357,32.985665],[-96.516741,32.980189],[-96.516741,32.81588],[-96.527695,32.54751],[-97.03705,32.54751],[-97.031573,32.985665],[-96.856311,32.985665]]]},"id":"48113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.440064,32.980189],[-96.297663,32.980189],[-96.297663,32.843265],[-96.516741,32.81588],[-96.516741,32.980189],[-96.440064,32.980189]]]},"id":"48397"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.864985,32.980189],[-95.667815,32.958281],[-95.634953,32.722772],[-95.936185,32.837788],[-95.864985,32.980189]]]},"id":"48379"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.040693,32.969235],[-100.657308,32.963758],[-100.662785,32.525602],[-101.17214,32.525602],[-101.17214,32.963758],[-101.040693,32.969235]]]},"id":"48415"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.102303,32.963758],[-103.812025,32.963758],[-103.724394,31.999816],[-103.98181,31.999816],[-104.025626,31.999816],[-104.847167,31.999816],[-104.852644,32.520126],[-104.84169,32.963758],[-104.102303,32.963758]]]},"id":"35015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.17214,32.963758],[-101.17214,32.525602],[-101.17214,32.525602],[-101.686972,32.525602],[-101.692449,32.963758],[-101.555526,32.963758],[-101.17214,32.963758]]]},"id":"48033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.520384,32.963758],[-100.142475,32.958281],[-100.147952,32.520126],[-100.662785,32.525602],[-100.657308,32.963758],[-100.520384,32.963758]]]},"id":"48151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.692449,32.963758],[-101.686972,32.525602],[-102.201805,32.525602],[-102.207282,32.958281],[-102.075835,32.958281],[-101.692449,32.963758]]]},"id":"48115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.109614,32.958281],[-99.989121,32.958281],[-99.611212,32.958281],[-99.611212,32.514649],[-99.627643,32.514649],[-100.136998,32.520126],[-100.147952,32.520126],[-100.142475,32.958281],[-100.109614,32.958281]]]},"id":"48253"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.067161,32.958281],[-102.596144,32.958281],[-102.207282,32.958281],[-102.201805,32.525602],[-102.212759,32.525602],[-102.995961,32.525602],[-103.067161,32.520126],[-103.067161,32.958281]]]},"id":"48165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.762286,32.958281],[-98.57607,32.952804],[-98.57607,32.514649],[-98.740378,32.514649],[-99.09638,32.514649],[-99.09638,32.958281],[-98.948502,32.958281],[-98.762286,32.958281]]]},"id":"48429"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.233303,32.958281],[-99.09638,32.958281],[-99.09638,32.514649],[-99.11281,32.514649],[-99.194965,32.514649],[-99.611212,32.514649],[-99.611212,32.958281],[-99.468812,32.958281],[-99.233303,32.958281]]]},"id":"48417"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.860448,32.952804],[-81.76734,32.908988],[-81.838541,32.651572],[-82.002849,32.607757],[-82.145249,32.810403],[-81.860448,32.952804]]]},"id":"13165"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.722608,32.952804],[-83.711654,32.952804],[-83.514484,32.843265],[-83.596638,32.662526],[-83.7007,32.689911],[-83.892393,32.848742],[-83.722608,32.952804]]]},"id":"13021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.155733,32.930896],[-88.914747,32.925419],[-88.914747,32.574895],[-89.133825,32.574895],[-89.320041,32.574895],[-89.320041,32.930896],[-89.155733,32.930896]]]},"id":"28099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.473395,32.930896],[-89.320041,32.930896],[-89.320041,32.574895],[-89.320041,32.574895],[-89.730812,32.635141],[-89.730812,32.887081],[-89.473395,32.930896]]]},"id":"28079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.345146,32.930896],[-88.388961,32.580372],[-88.651854,32.574895],[-88.914747,32.574895],[-88.914747,32.925419],[-88.810686,32.925419],[-88.345146,32.930896]]]},"id":"28069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.780551,32.903511],[-94.720304,32.903511],[-94.703873,32.881604],[-94.703873,32.793973],[-94.703873,32.651572],[-94.988674,32.536556],[-95.152983,32.569418],[-95.152983,32.903511],[-94.780551,32.903511]]]},"id":"48459"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.393992,32.876127],[-83.224206,32.585849],[-83.498053,32.454402],[-83.596638,32.662526],[-83.514484,32.843265],[-83.404945,32.898034],[-83.393992,32.876127]]]},"id":"13289"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.96632,32.881604],[-89.730812,32.887081],[-89.730812,32.635141],[-89.785581,32.585849],[-90.03752,32.448925],[-90.064905,32.399633],[-90.448291,32.574895],[-89.96632,32.881604]]]},"id":"28089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.50581,32.881604],[-84.286733,32.750157],[-84.445564,32.563941],[-84.637257,32.536556],[-84.692026,32.520126],[-84.692026,32.585849],[-84.70298,32.843265],[-84.50581,32.881604]]]},"id":"13263"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.249287,32.881604],[-94.041164,32.881604],[-94.041164,32.695388],[-94.703873,32.793973],[-94.703873,32.881604],[-94.654581,32.881604],[-94.249287,32.881604]]]},"id":"48315"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.326435,32.876127],[-87.019726,32.837788],[-87.019726,32.728249],[-87.025203,32.717295],[-87.474312,32.306525],[-87.523605,32.481787],[-87.419543,32.876127],[-87.326435,32.876127]]]},"id":"01105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.861812,32.87065],[-84.70298,32.843265],[-84.692026,32.585849],[-85.02612,32.607757],[-85.080889,32.607757],[-85.130182,32.74468],[-85.184951,32.87065],[-84.861812,32.87065],[-84.861812,32.87065]]]},"id":"13145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.122425,32.848742],[-83.892393,32.848742],[-83.7007,32.689911],[-83.7007,32.689911],[-83.766424,32.695388],[-84.001932,32.531079],[-84.204579,32.689911],[-84.122425,32.848742]]]},"id":"13079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.297663,32.843265],[-96.078585,32.837788],[-96.078585,32.355817],[-96.215509,32.361294],[-96.451017,32.361294],[-96.527695,32.54751],[-96.516741,32.81588],[-96.297663,32.843265]]]},"id":"48257"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.315034,32.837788],[-82.145249,32.810403],[-82.002849,32.607757],[-82.030233,32.536556],[-82.23288,32.317479],[-82.408142,32.355817],[-82.550543,32.498218],[-82.649128,32.514649],[-82.435527,32.761111],[-82.315034,32.837788]]]},"id":"13107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.062155,32.837788],[-95.936185,32.837788],[-95.634953,32.722772],[-95.596615,32.684434],[-95.448737,32.355817],[-96.078585,32.355817],[-96.078585,32.837788],[-96.062155,32.837788]]]},"id":"48467"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.523158,32.821357],[-82.435527,32.761111],[-82.649128,32.514649],[-82.955836,32.706342],[-82.944882,32.761111],[-82.523158,32.821357]]]},"id":"13167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.703873,32.793973],[-94.041164,32.695388],[-94.041164,32.394156],[-94.462888,32.377725],[-94.490273,32.394156],[-94.577904,32.394156],[-94.703873,32.651572],[-94.703873,32.793973]]]},"id":"48203"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.04798,32.777542],[-108.538625,32.514649],[-108.522194,31.862893],[-108.215485,31.862893],[-108.210008,31.786216],[-108.210008,31.331629],[-109.04798,31.331629],[-109.04798,32.427018],[-109.04798,32.777542]]]},"id":"35023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.006492,32.755634],[-85.885999,32.492741],[-86.022923,32.421541],[-86.307724,32.416064],[-86.411786,32.410587],[-86.411786,32.706342],[-86.378924,32.755634],[-86.006492,32.755634]]]},"id":"01051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.726698,32.761111],[-92.414512,32.580372],[-92.414512,32.498218],[-92.578821,32.498218],[-92.77599,32.454402],[-92.880052,32.585849],[-92.726698,32.761111]]]},"id":"22061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.142969,32.657049],[-80.869122,32.662526],[-80.880076,32.08197],[-80.885553,32.032678],[-81.148446,32.224371],[-81.279893,32.558464],[-81.142969,32.657049]]]},"id":"45053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.286733,32.750157],[-84.204579,32.689911],[-84.001932,32.531079],[-84.051224,32.520126],[-84.253871,32.372248],[-84.36341,32.399633],[-84.390795,32.416064],[-84.445564,32.563941],[-84.286733,32.750157]]]},"id":"13269"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.184951,32.74468],[-85.130182,32.74468],[-85.080889,32.607757],[-84.998735,32.509172],[-85.020643,32.509172],[-85.431413,32.410587],[-85.694307,32.580372],[-85.694307,32.596803],[-85.595722,32.728249],[-85.184951,32.74468]]]},"id":"01081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.025203,32.717295],[-87.019726,32.728249],[-86.915664,32.662526],[-86.817079,32.339387],[-86.90471,32.049109],[-87.277142,32.147694],[-87.474312,32.262709],[-87.474312,32.306525],[-87.025203,32.717295]]]},"id":"01047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.998265,32.706342],[-91.910634,32.503695],[-92.036603,32.27914],[-92.16805,32.27914],[-92.31045,32.27914],[-92.414512,32.498218],[-92.414512,32.580372],[-92.063988,32.722772],[-91.998265,32.706342]]]},"id":"22073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.224206,32.585849],[-82.955836,32.706342],[-82.649128,32.514649],[-82.720328,32.312002],[-82.884636,32.196986],[-83.136575,32.421541],[-83.224206,32.585849]]]},"id":"13175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.411786,32.706342],[-86.411786,32.410587],[-86.499417,32.344863],[-86.817079,32.339387],[-86.915664,32.662526],[-86.411786,32.706342]]]},"id":"01001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.825307,32.706342],[-80.474782,32.487264],[-80.880076,32.08197],[-80.869122,32.662526],[-80.825307,32.706342]]]},"id":"45013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.766424,32.695388],[-83.7007,32.689911],[-83.848578,32.465356],[-84.018363,32.503695],[-84.007409,32.520126],[-84.001932,32.531079],[-83.766424,32.695388]]]},"id":"13225"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.7007,32.689911],[-83.7007,32.689911],[-83.596638,32.662526],[-83.498053,32.454402],[-83.498053,32.399633],[-83.613069,32.290094],[-83.848578,32.290094],[-83.848578,32.465356],[-83.7007,32.689911]]]},"id":"13153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.574707,32.67348],[-95.152983,32.569418],[-94.988674,32.536556],[-94.988674,32.366771],[-94.983197,32.13674],[-95.459691,32.13674],[-95.448737,32.355817],[-95.596615,32.684434],[-95.574707,32.67348]]]},"id":"48423"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.598448,32.668003],[-91.445094,32.580372],[-91.456048,32.536556],[-91.477956,32.40511],[-91.57654,32.40511],[-91.894203,32.153171],[-92.036603,32.27914],[-91.910634,32.503695],[-91.636787,32.668003],[-91.598448,32.668003]]]},"id":"22083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.703873,32.651572],[-94.577904,32.394156],[-94.988674,32.366771],[-94.988674,32.536556],[-94.703873,32.651572]]]},"id":"48183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.827587,32.651572],[-81.548263,32.487264],[-81.433247,32.240802],[-81.783771,32.153171],[-81.969987,32.268186],[-82.030233,32.536556],[-82.002849,32.607757],[-81.838541,32.651572],[-81.827587,32.651572]]]},"id":"13031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.730812,32.635141],[-89.320041,32.574895],[-89.320041,32.224371],[-89.456965,32.224371],[-89.730812,32.224371],[-89.785581,32.585849],[-89.730812,32.635141]]]},"id":"28123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.045277,32.574895],[-90.722138,32.61871],[-90.552353,32.509172],[-90.727615,32.224371],[-91.028846,32.114832],[-91.028846,32.120309],[-91.050754,32.125786],[-91.121954,32.213417],[-91.067185,32.563941],[-91.045277,32.574895]]]},"id":"28149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.02612,32.607757],[-84.692026,32.585849],[-84.692026,32.520126],[-84.982304,32.372248],[-84.998735,32.509172],[-85.080889,32.607757],[-85.02612,32.607757]]]},"id":"13215"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.607545,32.607757],[-107.300836,32.607757],[-107.295359,31.786216],[-108.210008,31.786216],[-108.215485,31.862893],[-108.231916,32.514649],[-107.607545,32.607757]]]},"id":"35029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.694307,32.580372],[-85.431413,32.410587],[-85.431413,32.235325],[-85.918861,32.273663],[-86.022923,32.421541],[-85.885999,32.492741],[-85.694307,32.596803],[-85.694307,32.580372]]]},"id":"01087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.389431,32.596803],[-81.279893,32.558464],[-81.148446,32.224371],[-81.1594,32.229848],[-81.389431,32.098401],[-81.42777,32.235325],[-81.433247,32.240802],[-81.548263,32.487264],[-81.389431,32.596803]]]},"id":"13103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.03752,32.448925],[-89.785581,32.585849],[-89.730812,32.224371],[-89.730812,32.049109],[-90.190875,32.049109],[-90.229213,32.049109],[-90.064905,32.399633],[-90.03752,32.448925]]]},"id":"28121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.912914,32.585849],[-92.880052,32.585849],[-92.77599,32.454402],[-92.814329,32.147694],[-92.940299,32.147694],[-93.131992,32.147694],[-93.186761,32.147694],[-93.427746,32.235325],[-93.372977,32.410587],[-93.181284,32.585849],[-92.912914,32.585849]]]},"id":"22013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.224206,32.585849],[-83.136575,32.421541],[-83.344699,32.273663],[-83.498053,32.399633],[-83.498053,32.454402],[-83.224206,32.585849]]]},"id":"13023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.651854,32.574895],[-88.388961,32.580372],[-88.421823,32.306525],[-88.432777,32.229848],[-88.914747,32.224371],[-88.914747,32.574895],[-88.651854,32.574895]]]},"id":"28075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.133825,32.574895],[-88.914747,32.574895],[-88.914747,32.224371],[-89.018809,32.224371],[-89.320041,32.224371],[-89.320041,32.574895],[-89.320041,32.574895],[-89.133825,32.574895]]]},"id":"28101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.486629,32.542033],[-90.448291,32.574895],[-90.064905,32.399633],[-90.229213,32.049109],[-90.716661,32.049109],[-90.727615,32.224371],[-90.552353,32.509172],[-90.486629,32.542033]]]},"id":"28049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.368417,32.536556],[-91.067185,32.563941],[-91.121954,32.213417],[-91.494386,32.202463],[-91.477956,32.40511],[-91.456048,32.536556],[-91.368417,32.536556]]]},"id":"22065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.637257,32.536556],[-84.445564,32.563941],[-84.390795,32.416064],[-84.429133,32.164124],[-84.429133,32.13674],[-84.648211,32.235325],[-84.659165,32.235325],[-84.637257,32.536556]]]},"id":"13197"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.030233,32.536556],[-81.969987,32.268186],[-82.024756,32.27914],[-82.23288,32.317479],[-82.030233,32.536556]]]},"id":"13043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.066715,32.558464],[-97.617606,32.552987],[-97.617606,32.317479],[-97.946222,32.235325],[-98.066715,32.509172],[-98.066715,32.558464]]]},"id":"48221"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.551882,32.552987],[-97.086342,32.54751],[-97.086342,32.268186],[-97.113727,32.257232],[-97.475205,32.175078],[-97.617606,32.202463],[-97.617606,32.317479],[-97.617606,32.552987],[-97.551882,32.552987]]]},"id":"48251"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.086342,32.54751],[-97.03705,32.54751],[-96.527695,32.54751],[-96.451017,32.361294],[-96.385294,32.328433],[-96.89465,32.076493],[-97.086342,32.268186],[-97.086342,32.54751]]]},"id":"48139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.813882,32.525602],[-87.523605,32.481787],[-87.474312,32.306525],[-87.474312,32.262709],[-87.666005,31.988862],[-87.819359,31.988862],[-88.071299,31.988862],[-87.928898,32.312002],[-87.852221,32.531079],[-87.813882,32.525602]]]},"id":"01091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.637257,32.536556],[-84.659165,32.235325],[-84.922058,32.229848],[-84.982304,32.372248],[-84.692026,32.520126],[-84.637257,32.536556]]]},"id":"13053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.001932,32.531079],[-84.007409,32.520126],[-84.051224,32.520126],[-84.051224,32.520126],[-84.001932,32.531079]]]},"id":"13193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.662785,32.525602],[-100.662785,32.087447],[-100.821616,32.087447],[-101.183094,32.087447],[-101.17214,32.525602],[-101.17214,32.525602],[-100.662785,32.525602]]]},"id":"48335"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.686972,32.525602],[-101.692449,32.087447],[-101.747219,32.087447],[-101.774603,32.087447],[-101.933435,32.087447],[-102.212759,32.087447],[-102.212759,32.525602],[-102.201805,32.525602],[-101.686972,32.525602]]]},"id":"48317"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.147952,32.520126],[-100.153429,32.08197],[-100.235583,32.08197],[-100.662785,32.087447],[-100.662785,32.525602],[-100.147952,32.520126]]]},"id":"48353"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.17214,32.525602],[-101.183094,32.087447],[-101.265248,32.087447],[-101.692449,32.087447],[-101.686972,32.525602],[-101.17214,32.525602]]]},"id":"48227"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.995961,32.525602],[-102.212759,32.525602],[-102.212759,32.087447],[-102.289436,32.087447],[-102.798791,32.087447],[-103.061684,32.087447],[-103.067161,32.520126],[-102.995961,32.525602]]]},"id":"48003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.136998,32.520126],[-99.627643,32.514649],[-99.63312,32.08197],[-99.715274,32.08197],[-100.054844,32.08197],[-100.153429,32.08197],[-100.147952,32.520126],[-100.136998,32.520126]]]},"id":"48441"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.018363,32.503695],[-83.848578,32.465356],[-83.848578,32.290094],[-84.029317,32.169601],[-84.182671,32.229848],[-84.253871,32.372248],[-84.051224,32.520126],[-84.018363,32.503695]]]},"id":"13193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.051224,32.520126],[-84.007409,32.520126],[-84.018363,32.503695],[-84.051224,32.520126],[-84.051224,32.520126]]]},"id":"13269"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.740378,32.514649],[-98.57607,32.514649],[-98.477485,32.514649],[-98.548686,32.262709],[-98.926594,32.076493],[-99.118287,32.08197],[-99.11281,32.514649],[-99.09638,32.514649],[-98.740378,32.514649]]]},"id":"48133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.194965,32.514649],[-99.11281,32.514649],[-99.118287,32.08197],[-99.194965,32.08197],[-99.63312,32.08197],[-99.627643,32.514649],[-99.611212,32.514649],[-99.194965,32.514649]]]},"id":"48059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.696539,32.514649],[-110.450077,32.514649],[-110.450077,32.427018],[-110.450077,31.731446],[-110.789647,31.731446],[-111.364726,31.424737],[-113.336425,32.038155],[-113.336425,32.503695],[-112.202698,32.509172],[-110.696539,32.514649]]]},"id":"04019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.066715,32.509172],[-97.946222,32.235325],[-97.864068,32.087447],[-98.006468,32.016247],[-98.209115,31.917662],[-98.548686,32.262709],[-98.477485,32.514649],[-98.066715,32.509172]]]},"id":"48143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.550543,32.498218],[-82.408142,32.355817],[-82.654605,32.295571],[-82.720328,32.312002],[-82.649128,32.514649],[-82.550543,32.498218]]]},"id":"13283"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.020643,32.509172],[-84.998735,32.509172],[-84.982304,32.372248],[-84.922058,32.229848],[-85.053504,32.06554],[-85.354736,32.147694],[-85.409506,32.147694],[-85.431413,32.235325],[-85.431413,32.410587],[-85.020643,32.509172]]]},"id":"01113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.307724,32.416064],[-86.022923,32.421541],[-85.918861,32.273663],[-85.995538,32.049109],[-86.192708,31.966955],[-86.302247,31.988862],[-86.406309,32.049109],[-86.499417,32.344863],[-86.411786,32.410587],[-86.307724,32.416064]]]},"id":"01101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.578821,32.498218],[-92.414512,32.498218],[-92.31045,32.27914],[-92.31045,32.147694],[-92.814329,32.147694],[-92.77599,32.454402],[-92.578821,32.498218]]]},"id":"22049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.136575,32.421541],[-82.884636,32.196986],[-82.928452,32.13674],[-82.950359,32.120309],[-83.207776,31.901231],[-83.339222,32.103878],[-83.344699,32.273663],[-83.136575,32.421541]]]},"id":"13091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.36341,32.399633],[-84.253871,32.372248],[-84.182671,32.229848],[-84.429133,32.164124],[-84.390795,32.416064],[-84.36341,32.399633]]]},"id":"13249"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.831183,32.427018],[-109.113704,32.427018],[-109.04798,32.427018],[-109.04798,31.331629],[-110.461031,31.331629],[-110.450077,31.731446],[-110.450077,32.427018],[-109.831183,32.427018]]]},"id":"04003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.577904,32.394156],[-94.490273,32.394156],[-94.512181,31.972432],[-94.451934,31.846462],[-94.512181,31.846462],[-94.939382,31.846462],[-94.983197,32.13674],[-94.988674,32.366771],[-94.577904,32.394156]]]},"id":"48401"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.499417,32.344863],[-86.406309,32.049109],[-86.450124,31.966955],[-86.477509,31.966955],[-86.855418,31.961478],[-86.90471,32.049109],[-86.817079,32.339387],[-86.499417,32.344863]]]},"id":"01085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.57654,32.40511],[-91.477956,32.40511],[-91.494386,32.202463],[-91.57654,31.8848],[-91.647741,31.972432],[-91.888726,31.972432],[-91.894203,32.153171],[-91.57654,32.40511]]]},"id":"22041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.613069,32.290094],[-83.498053,32.399633],[-83.344699,32.273663],[-83.339222,32.103878],[-83.607592,32.120309],[-83.613069,32.290094]]]},"id":"13235"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.462888,32.377725],[-94.041164,32.394156],[-94.041164,32.196986],[-94.013779,31.977908],[-94.134272,31.977908],[-94.512181,31.972432],[-94.490273,32.394156],[-94.462888,32.377725]]]},"id":"48365"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.215509,32.361294],[-96.078585,32.355817],[-95.448737,32.355817],[-95.459691,32.13674],[-95.42683,32.08197],[-96.051201,32.005293],[-96.056678,32.01077],[-96.385294,32.328433],[-96.451017,32.361294],[-96.215509,32.361294]]]},"id":"48213"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.408142,32.355817],[-82.23288,32.317479],[-82.227403,31.912185],[-82.43005,31.966955],[-82.468389,31.966955],[-82.479343,31.972432],[-82.408142,32.355817]]]},"id":"13279"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.408142,32.355817],[-82.479343,31.972432],[-82.545066,31.961478],[-82.654605,32.295571],[-82.408142,32.355817]]]},"id":"13209"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.750886,32.339387],[-93.613962,32.235325],[-93.356546,31.934093],[-93.4387,31.846462],[-93.619439,31.846462],[-93.882332,31.846462],[-94.013779,31.977908],[-94.041164,32.196986],[-93.750886,32.339387]]]},"id":"22031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.385294,32.328433],[-96.056678,32.01077],[-96.494833,31.797169],[-96.719387,31.8136],[-96.89465,32.076493],[-96.385294,32.328433]]]},"id":"48349"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.23288,32.317479],[-82.024756,32.27914],[-81.761863,32.049109],[-81.82211,32.016247],[-81.969987,31.791692],[-82.046664,31.824554],[-82.227403,31.912185],[-82.23288,32.317479]]]},"id":"13267"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.946222,32.235325],[-97.617606,32.317479],[-97.617606,32.202463],[-97.62856,32.20794],[-97.864068,32.087447],[-97.946222,32.235325]]]},"id":"48425"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.994621,32.312002],[-87.928898,32.312002],[-88.071299,31.988862],[-88.087729,31.698584],[-88.186314,31.698584],[-88.465638,31.698584],[-88.471115,31.895754],[-88.432777,32.229848],[-88.421823,32.306525],[-87.994621,32.312002]]]},"id":"01023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.720328,32.312002],[-82.654605,32.295571],[-82.545066,31.961478],[-82.643651,31.917662],[-82.928452,32.13674],[-82.884636,32.196986],[-82.720328,32.312002]]]},"id":"13309"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.918861,32.273663],[-85.431413,32.235325],[-85.409506,32.147694],[-85.655968,31.879324],[-85.995538,32.049109],[-85.918861,32.273663]]]},"id":"01011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.848578,32.290094],[-83.613069,32.290094],[-83.607592,32.120309],[-83.607592,32.027201],[-83.963593,32.032678],[-84.029317,32.169601],[-83.848578,32.290094]]]},"id":"13093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.024756,32.27914],[-81.969987,32.268186],[-81.783771,32.153171],[-81.718048,32.087447],[-81.761863,32.049109],[-82.024756,32.27914]]]},"id":"13109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.16805,32.27914],[-92.036603,32.27914],[-91.894203,32.153171],[-91.888726,31.972432],[-92.003742,31.928616],[-92.184481,31.928616],[-92.31045,31.928616],[-92.31045,32.147694],[-92.31045,32.27914],[-92.16805,32.27914]]]},"id":"22021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.277142,32.147694],[-86.90471,32.049109],[-86.855418,31.961478],[-86.90471,31.830031],[-87.501697,31.830031],[-87.666005,31.988862],[-87.474312,32.262709],[-87.277142,32.147694]]]},"id":"01131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.113727,32.257232],[-97.086342,32.268186],[-96.89465,32.076493],[-96.719387,31.8136],[-96.932988,31.709538],[-97.080866,31.840985],[-97.278035,31.747877],[-97.475205,32.175078],[-97.113727,32.257232]]]},"id":"48217"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.548686,32.262709],[-98.209115,31.917662],[-98.461055,31.682154],[-98.669178,31.698584],[-98.926594,32.076493],[-98.548686,32.262709]]]},"id":"48093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.494386,32.202463],[-91.121954,32.213417],[-91.050754,32.125786],[-91.028846,32.120309],[-91.028846,32.114832],[-91.247924,31.86837],[-91.346509,31.753354],[-91.379371,31.731446],[-91.428663,31.753354],[-91.543679,31.753354],[-91.57654,31.8848],[-91.494386,32.202463]]]},"id":"22107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.42777,32.235325],[-81.389431,32.098401],[-81.153923,31.725969],[-81.197738,31.725969],[-81.707094,32.087447],[-81.718048,32.087447],[-81.783771,32.153171],[-81.433247,32.240802],[-81.42777,32.235325]]]},"id":"13029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.471562,32.235325],[-93.427746,32.235325],[-93.186761,32.147694],[-93.356546,31.934093],[-93.613962,32.235325],[-93.471562,32.235325]]]},"id":"22081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.1594,32.229848],[-81.148446,32.224371],[-80.885553,32.032678],[-81.153923,31.725969],[-81.389431,32.098401],[-81.1594,32.229848]]]},"id":"13051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.648211,32.235325],[-84.429133,32.13674],[-84.445564,31.966955],[-84.598918,31.917662],[-84.653688,31.917662],[-84.648211,32.235325]]]},"id":"13307"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.659165,32.235325],[-84.648211,32.235325],[-84.653688,31.917662],[-84.905627,31.923139],[-85.069935,31.994339],[-85.053504,32.06554],[-84.922058,32.229848],[-84.659165,32.235325]]]},"id":"13259"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.182671,32.229848],[-84.029317,32.169601],[-83.963593,32.032678],[-83.925255,31.912185],[-84.259348,31.917662],[-84.336025,31.873847],[-84.445564,31.966955],[-84.429133,32.13674],[-84.429133,32.164124],[-84.182671,32.229848]]]},"id":"13261"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.914747,32.224371],[-88.432777,32.229848],[-88.471115,31.895754],[-88.909271,31.824554],[-88.914747,32.224371]]]},"id":"28023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.727615,32.224371],[-90.716661,32.049109],[-90.738569,31.786216],[-91.247924,31.86837],[-91.028846,32.114832],[-90.727615,32.224371]]]},"id":"28021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.018809,32.224371],[-88.914747,32.224371],[-88.909271,31.824554],[-88.942132,31.824554],[-89.314564,31.802646],[-89.320041,32.224371],[-89.018809,32.224371]]]},"id":"28061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.456965,32.224371],[-89.320041,32.224371],[-89.314564,31.802646],[-89.402195,31.797169],[-89.654134,31.780739],[-89.730812,32.049109],[-89.730812,32.224371],[-89.456965,32.224371]]]},"id":"28129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.62856,32.20794],[-97.617606,32.202463],[-97.475205,32.175078],[-97.278035,31.747877],[-97.606652,31.589046],[-97.688806,31.709538],[-97.765483,31.6712],[-98.006468,32.016247],[-97.864068,32.087447],[-97.62856,32.20794]]]},"id":"48035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.950359,32.120309],[-82.928452,32.13674],[-82.643651,31.917662],[-82.835344,31.8136],[-82.994175,31.780739],[-83.180391,31.846462],[-83.207776,31.901231],[-82.950359,32.120309]]]},"id":"13271"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.131992,32.147694],[-92.940299,32.147694],[-92.97316,31.709538],[-92.721221,31.517845],[-92.984114,31.34806],[-93.236053,31.364491],[-93.4387,31.846462],[-93.356546,31.934093],[-93.186761,32.147694],[-93.131992,32.147694]]]},"id":"22069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.354736,32.147694],[-85.053504,32.06554],[-85.069935,31.994339],[-85.141136,31.780739],[-85.124705,31.764308],[-85.414983,31.621907],[-85.694307,31.61643],[-85.749076,31.61643],[-85.655968,31.879324],[-85.409506,32.147694],[-85.354736,32.147694]]]},"id":"01005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.940299,32.147694],[-92.814329,32.147694],[-92.31045,32.147694],[-92.31045,31.928616],[-92.36522,31.797169],[-92.97316,31.709538],[-92.940299,32.147694]]]},"id":"22127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.983197,32.13674],[-94.939382,31.846462],[-94.868182,31.528799],[-95.005105,31.424737],[-95.273475,31.594523],[-95.42683,32.08197],[-95.459691,32.13674],[-94.983197,32.13674]]]},"id":"48073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.607592,32.120309],[-83.339222,32.103878],[-83.207776,31.901231],[-83.180391,31.846462],[-83.481623,31.846462],[-83.613069,31.851939],[-83.607592,32.027201],[-83.607592,32.120309]]]},"id":"13315"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.707094,32.087447],[-81.197738,31.725969],[-81.192262,31.567138],[-81.493493,31.698584],[-81.811156,31.999816],[-81.82211,32.016247],[-81.761863,32.049109],[-81.718048,32.087447],[-81.707094,32.087447]]]},"id":"13179"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.747219,32.087447],[-101.692449,32.087447],[-101.265248,32.087447],[-101.265248,31.649292],[-101.686972,31.649292],[-101.774603,31.649292],[-101.774603,32.087447],[-101.747219,32.087447]]]},"id":"48173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.265248,32.087447],[-101.183094,32.087447],[-100.821616,32.087447],[-100.827093,31.698584],[-101.265248,31.556184],[-101.265248,31.649292],[-101.265248,32.087447]]]},"id":"48431"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.061684,32.087447],[-102.798791,32.087447],[-102.798791,31.649292],[-103.330055,31.649292],[-103.324578,31.999816],[-103.061684,32.087447]]]},"id":"48495"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.933435,32.087447],[-101.774603,32.087447],[-101.774603,31.649292],[-102.223713,31.649292],[-102.289436,31.649292],[-102.289436,32.087447],[-102.212759,32.087447],[-101.933435,32.087447]]]},"id":"48329"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.289436,32.087447],[-102.289436,31.649292],[-102.316821,31.649292],[-102.76593,31.649292],[-102.798791,31.649292],[-102.798791,32.087447],[-102.289436,32.087447]]]},"id":"48135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.821616,32.087447],[-100.662785,32.087447],[-100.235583,32.08197],[-100.235583,31.693108],[-100.827093,31.698584],[-100.821616,32.087447]]]},"id":"48081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.42683,32.08197],[-95.273475,31.594523],[-95.623999,31.54523],[-95.739015,31.501415],[-95.728061,31.643815],[-95.788308,31.61643],[-96.051201,32.005293],[-95.42683,32.08197]]]},"id":"48001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.054844,32.08197],[-99.715274,32.08197],[-99.720751,31.578092],[-99.726228,31.578092],[-100.109614,31.578092],[-100.235583,31.693108],[-100.235583,32.08197],[-100.153429,32.08197],[-100.054844,32.08197]]]},"id":"48399"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.63312,32.08197],[-99.194965,32.08197],[-99.200441,31.468553],[-99.430473,31.468553],[-99.600258,31.490461],[-99.720751,31.578092],[-99.715274,32.08197],[-99.63312,32.08197]]]},"id":"48083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.118287,32.08197],[-98.926594,32.076493],[-98.669178,31.698584],[-98.992318,31.484984],[-99.090903,31.463076],[-99.200441,31.468553],[-99.194965,32.08197],[-99.118287,32.08197]]]},"id":"48049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.995538,32.049109],[-85.655968,31.879324],[-85.749076,31.61643],[-85.787415,31.61643],[-86.055785,31.61643],[-86.143416,31.61643],[-86.192708,31.966955],[-85.995538,32.049109]]]},"id":"01109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.302247,31.988862],[-86.192708,31.966955],[-86.143416,31.61643],[-86.192708,31.441168],[-86.400832,31.47403],[-86.499417,31.523322],[-86.450124,31.966955],[-86.406309,32.049109],[-86.302247,31.988862]]]},"id":"01041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.716661,32.049109],[-90.229213,32.049109],[-90.125151,31.753354],[-90.245644,31.715015],[-90.311367,31.698584],[-90.738569,31.698584],[-90.738569,31.786216],[-90.716661,32.049109]]]},"id":"28029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.190875,32.049109],[-89.730812,32.049109],[-89.654134,31.780739],[-89.752719,31.775262],[-89.977274,31.764308],[-90.125151,31.753354],[-90.229213,32.049109],[-90.190875,32.049109]]]},"id":"28127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.963593,32.032678],[-83.607592,32.027201],[-83.613069,31.851939],[-83.804762,31.802646],[-83.941686,31.846462],[-83.925255,31.912185],[-83.963593,32.032678]]]},"id":"13081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.006468,32.016247],[-97.765483,31.6712],[-98.181731,31.463076],[-98.269362,31.413784],[-98.461055,31.682154],[-98.209115,31.917662],[-98.006468,32.016247]]]},"id":"48193"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.811156,31.999816],[-81.493493,31.698584],[-81.663278,31.539753],[-81.969987,31.791692],[-81.82211,32.016247],[-81.811156,31.999816]]]},"id":"13183"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.051201,32.005293],[-95.788308,31.61643],[-96.237417,31.413784],[-96.494833,31.797169],[-96.056678,32.01077],[-96.051201,32.005293]]]},"id":"48161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.997324,31.999816],[-105.997324,31.386399],[-106.528588,31.786216],[-106.375233,31.999816],[-105.997324,31.999816]]]},"id":"48141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-105.997324,31.999816],[-104.918367,31.999816],[-104.918367,30.663443],[-104.98409,30.630581],[-104.98409,30.630581],[-105.997324,31.386399],[-105.997324,31.999816]]]},"id":"48229"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.71344,31.999816],[-103.324578,31.999816],[-103.330055,31.649292],[-103.609378,31.649292],[-103.98181,31.999816],[-103.724394,31.999816],[-103.71344,31.999816]]]},"id":"48301"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.847167,31.999816],[-104.025626,31.999816],[-104.102303,31.107075],[-104.918367,30.663443],[-104.918367,31.999816],[-104.847167,31.999816]]]},"id":"48109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.025626,31.999816],[-103.98181,31.999816],[-103.609378,31.649292],[-103.012392,31.369968],[-103.587471,30.767505],[-104.102303,31.107075],[-104.025626,31.999816]]]},"id":"48389"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.069935,31.994339],[-84.905627,31.923139],[-84.960397,31.775262],[-85.124705,31.780739],[-85.141136,31.780739],[-85.069935,31.994339]]]},"id":"13239"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.819359,31.988862],[-87.666005,31.988862],[-87.501697,31.830031],[-87.76459,31.298768],[-87.945329,31.194706],[-88.087729,31.698584],[-88.071299,31.988862],[-87.819359,31.988862]]]},"id":"01025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.134272,31.977908],[-94.013779,31.977908],[-93.882332,31.846462],[-93.83304,31.583569],[-93.843994,31.589046],[-93.986394,31.567138],[-94.002825,31.578092],[-94.397165,31.654769],[-94.451934,31.846462],[-94.512181,31.972432],[-94.134272,31.977908]]]},"id":"48419"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.468389,31.966955],[-82.43005,31.966955],[-82.523158,31.709538],[-82.62722,31.6712],[-82.835344,31.8136],[-82.643651,31.917662],[-82.545066,31.961478],[-82.479343,31.972432],[-82.468389,31.966955]]]},"id":"13161"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.647741,31.972432],[-91.57654,31.8848],[-91.543679,31.753354],[-91.833957,31.265906],[-92.009219,31.326153],[-92.003742,31.928616],[-91.888726,31.972432],[-91.647741,31.972432]]]},"id":"22025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.297687,31.621907],[-84.451041,31.621907],[-84.544149,31.621907],[-84.598918,31.917662],[-84.445564,31.966955],[-84.336025,31.873847],[-84.297687,31.621907]]]},"id":"13273"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.43005,31.966955],[-82.227403,31.912185],[-82.046664,31.824554],[-82.134295,31.632861],[-82.134295,31.468553],[-82.227403,31.528799],[-82.523158,31.709538],[-82.43005,31.966955]]]},"id":"13001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.477509,31.966955],[-86.450124,31.966955],[-86.499417,31.523322],[-86.702064,31.523322],[-86.90471,31.753354],[-86.90471,31.830031],[-86.855418,31.961478],[-86.477509,31.966955]]]},"id":"01013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.905627,31.923139],[-84.653688,31.917662],[-84.598918,31.917662],[-84.544149,31.621907],[-84.817996,31.621907],[-84.960397,31.775262],[-84.905627,31.923139]]]},"id":"13243"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.184481,31.928616],[-92.003742,31.928616],[-92.009219,31.326153],[-92.085896,31.337106],[-92.195435,31.479507],[-92.36522,31.797169],[-92.31045,31.928616],[-92.184481,31.928616]]]},"id":"22059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.259348,31.917662],[-83.925255,31.912185],[-83.941686,31.846462],[-84.018363,31.649292],[-84.297687,31.621907],[-84.336025,31.873847],[-84.259348,31.917662]]]},"id":"13177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.471115,31.895754],[-88.465638,31.698584],[-88.449208,31.435691],[-88.460161,31.435691],[-88.843547,31.435691],[-88.942132,31.435691],[-88.942132,31.824554],[-88.909271,31.824554],[-88.471115,31.895754]]]},"id":"28153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.247924,31.86837],[-90.738569,31.786216],[-90.738569,31.698584],[-90.738569,31.610953],[-91.154816,31.610953],[-91.319124,31.758831],[-91.346509,31.753354],[-91.247924,31.86837]]]},"id":"28063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.080866,31.840985],[-96.932988,31.709538],[-96.801542,31.523322],[-97.278035,31.282337],[-97.404005,31.304245],[-97.420436,31.320676],[-97.606652,31.589046],[-97.278035,31.747877],[-97.080866,31.840985]]]},"id":"48309"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.613069,31.851939],[-83.481623,31.846462],[-83.454238,31.758831],[-83.498053,31.594523],[-83.645931,31.594523],[-83.651408,31.567138],[-83.804762,31.802646],[-83.613069,31.851939]]]},"id":"13287"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.481623,31.846462],[-83.180391,31.846462],[-82.994175,31.780739],[-82.999652,31.6712],[-83.454238,31.758831],[-83.481623,31.846462]]]},"id":"13017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.941686,31.846462],[-83.804762,31.802646],[-83.651408,31.567138],[-83.651408,31.331629],[-83.974547,31.337106],[-84.001932,31.337106],[-83.996455,31.441168],[-84.018363,31.649292],[-83.941686,31.846462]]]},"id":"13321"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.512181,31.846462],[-94.451934,31.846462],[-94.397165,31.654769],[-94.325965,31.222091],[-94.868182,31.528799],[-94.939382,31.846462],[-94.512181,31.846462]]]},"id":"48347"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.619439,31.846462],[-93.4387,31.846462],[-93.236053,31.364491],[-93.553716,31.183752],[-93.603008,31.178275],[-93.83304,31.583569],[-93.882332,31.846462],[-93.619439,31.846462]]]},"id":"22085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.501697,31.830031],[-86.90471,31.830031],[-86.90471,31.753354],[-86.910187,31.753354],[-87.42502,31.260429],[-87.616713,31.243998],[-87.76459,31.298768],[-87.501697,31.830031]]]},"id":"01099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.134295,31.632861],[-82.046664,31.824554],[-81.969987,31.791692],[-81.663278,31.539753],[-81.62494,31.452122],[-81.729002,31.331629],[-82.041187,31.375445],[-82.134295,31.468553],[-82.134295,31.632861]]]},"id":"13305"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.942132,31.824554],[-88.942132,31.435691],[-89.144779,31.435691],[-89.396718,31.435691],[-89.402195,31.797169],[-89.314564,31.802646],[-88.942132,31.824554]]]},"id":"28067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.994175,31.780739],[-82.835344,31.8136],[-82.62722,31.6712],[-82.599835,31.468553],[-82.62722,31.364491],[-83.142052,31.419261],[-83.147529,31.47403],[-82.999652,31.6712],[-82.994175,31.780739]]]},"id":"13069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.719387,31.8136],[-96.494833,31.797169],[-96.237417,31.413784],[-96.319571,31.359014],[-96.598895,31.222091],[-96.801542,31.523322],[-96.932988,31.709538],[-96.719387,31.8136]]]},"id":"48293"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.36522,31.797169],[-92.195435,31.479507],[-92.721221,31.517845],[-92.97316,31.709538],[-92.36522,31.797169]]]},"id":"22043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.402195,31.797169],[-89.396718,31.435691],[-89.42958,31.435691],[-89.451488,31.435691],[-89.588411,31.435691],[-89.752719,31.775262],[-89.654134,31.780739],[-89.402195,31.797169]]]},"id":"28031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.124705,31.780739],[-84.960397,31.775262],[-84.817996,31.621907],[-84.817996,31.501415],[-85.048028,31.517845],[-85.124705,31.764308],[-85.141136,31.780739],[-85.124705,31.780739]]]},"id":"13061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.977274,31.764308],[-89.752719,31.775262],[-89.588411,31.435691],[-89.654134,31.435691],[-89.659611,31.435691],[-89.960843,31.391876],[-89.977274,31.753354],[-89.977274,31.764308]]]},"id":"28065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.414983,31.621907],[-85.124705,31.764308],[-85.048028,31.517845],[-85.086366,31.309722],[-85.414983,31.315199],[-85.414983,31.621907]]]},"id":"01067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.454238,31.758831],[-82.999652,31.6712],[-83.147529,31.47403],[-83.240637,31.47403],[-83.339222,31.47403],[-83.498053,31.594523],[-83.454238,31.758831]]]},"id":"13155"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.428663,31.753354],[-91.379371,31.731446],[-91.587494,31.189229],[-91.636787,30.997536],[-91.664172,30.970151],[-91.658695,30.992059],[-91.724418,31.046829],[-91.833957,31.265906],[-91.543679,31.753354],[-91.428663,31.753354]]]},"id":"22029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.977274,31.753354],[-89.960843,31.391876],[-90.042997,31.337106],[-90.190875,31.34806],[-90.245644,31.34806],[-90.245644,31.715015],[-90.125151,31.753354],[-89.977274,31.764308],[-89.977274,31.753354]]]},"id":"28077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.319124,31.758831],[-91.154816,31.610953],[-91.160293,31.34806],[-91.264355,31.369968],[-91.587494,31.189229],[-91.379371,31.731446],[-91.346509,31.753354],[-91.319124,31.758831]]]},"id":"28001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.910187,31.753354],[-86.90471,31.753354],[-86.702064,31.523322],[-86.702064,31.194706],[-86.948526,31.260429],[-87.42502,31.260429],[-86.910187,31.753354]]]},"id":"01035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-110.789647,31.731446],[-110.450077,31.731446],[-110.461031,31.331629],[-111.364726,31.424737],[-110.789647,31.731446]]]},"id":"04023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.669178,31.698584],[-98.461055,31.682154],[-98.269362,31.413784],[-98.565116,31.233045],[-98.992318,31.484984],[-98.669178,31.698584]]]},"id":"48333"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.311367,31.698584],[-90.245644,31.715015],[-90.245644,31.34806],[-90.262075,31.34806],[-90.355183,31.34806],[-90.546876,31.34806],[-90.634507,31.34806],[-90.738569,31.610953],[-90.738569,31.698584],[-90.311367,31.698584]]]},"id":"28085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.688806,31.709538],[-97.606652,31.589046],[-97.420436,31.320676],[-97.907884,31.068736],[-98.181731,31.463076],[-97.765483,31.6712],[-97.688806,31.709538]]]},"id":"48099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.523158,31.709538],[-82.227403,31.528799],[-82.419096,31.419261],[-82.473866,31.419261],[-82.599835,31.468553],[-82.62722,31.6712],[-82.523158,31.709538]]]},"id":"13005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.827093,31.698584],[-100.235583,31.693108],[-100.109614,31.578092],[-100.115091,31.090644],[-100.690169,31.085167],[-100.695646,31.523322],[-101.265248,31.528799],[-101.265248,31.556184],[-100.827093,31.698584]]]},"id":"48451"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.493493,31.698584],[-81.192262,31.567138],[-81.268939,31.293291],[-81.279893,31.293291],[-81.62494,31.452122],[-81.663278,31.539753],[-81.493493,31.698584]]]},"id":"13191"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.186314,31.698584],[-88.087729,31.698584],[-87.945329,31.194706],[-87.972714,31.161844],[-88.432777,31.112552],[-88.449208,31.435691],[-88.465638,31.698584],[-88.186314,31.698584]]]},"id":"01129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.728061,31.643815],[-95.739015,31.501415],[-95.7664,31.096121],[-95.903323,31.090644],[-96.242894,30.975628],[-96.319571,31.359014],[-96.237417,31.413784],[-95.788308,31.61643],[-95.728061,31.643815]]]},"id":"48289"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.002825,31.578092],[-93.986394,31.567138],[-94.041164,31.13446],[-94.128795,31.101598],[-94.325965,31.222091],[-94.397165,31.654769],[-94.002825,31.578092]]]},"id":"48405"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.223713,31.649292],[-101.774603,31.649292],[-101.774603,31.07969],[-102.30039,31.085167],[-102.316821,31.649292],[-102.289436,31.649292],[-102.223713,31.649292]]]},"id":"48461"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.798791,31.649292],[-102.76593,31.649292],[-102.76593,31.293291],[-102.83713,31.282337],[-103.012392,31.369968],[-103.609378,31.649292],[-103.330055,31.649292],[-102.798791,31.649292]]]},"id":"48475"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.76593,31.649292],[-102.316821,31.649292],[-102.30039,31.085167],[-102.388021,31.085167],[-102.76593,31.293291],[-102.76593,31.649292]]]},"id":"48103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.686972,31.649292],[-101.265248,31.649292],[-101.265248,31.556184],[-101.265248,31.528799],[-101.276202,31.07969],[-101.774603,31.07969],[-101.774603,31.649292],[-101.686972,31.649292]]]},"id":"48383"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.018363,31.649292],[-83.996455,31.441168],[-84.062178,31.441168],[-84.138855,31.441168],[-84.429133,31.435691],[-84.451041,31.621907],[-84.297687,31.621907],[-84.018363,31.649292]]]},"id":"13095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.544149,31.621907],[-84.451041,31.621907],[-84.429133,31.435691],[-84.637257,31.435691],[-84.817996,31.501415],[-84.817996,31.621907],[-84.544149,31.621907]]]},"id":"13037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.694307,31.61643],[-85.414983,31.621907],[-85.414983,31.315199],[-85.710737,31.194706],[-85.792891,31.194706],[-85.787415,31.61643],[-85.749076,31.61643],[-85.694307,31.61643]]]},"id":"01045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.055785,31.61643],[-85.787415,31.61643],[-85.792891,31.194706],[-86.192708,31.194706],[-86.192708,31.441168],[-86.143416,31.61643],[-86.055785,31.61643]]]},"id":"01031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.843994,31.589046],[-93.83304,31.583569],[-93.603008,31.178275],[-93.909717,31.156367],[-93.997348,31.139937],[-94.041164,31.13446],[-93.986394,31.567138],[-93.843994,31.589046]]]},"id":"48403"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.154816,31.610953],[-90.738569,31.610953],[-90.634507,31.34806],[-90.722138,31.34806],[-91.09457,31.320676],[-91.160293,31.34806],[-91.154816,31.610953]]]},"id":"28037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.645931,31.594523],[-83.498053,31.594523],[-83.339222,31.47403],[-83.43233,31.34806],[-83.514484,31.326153],[-83.651408,31.331629],[-83.651408,31.567138],[-83.645931,31.594523]]]},"id":"13277"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.623999,31.54523],[-95.273475,31.594523],[-95.005105,31.424737],[-94.955813,31.386399],[-95.432306,31.057782],[-95.618522,30.931813],[-95.7664,31.096121],[-95.739015,31.501415],[-95.623999,31.54523]]]},"id":"48225"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.726228,31.578092],[-99.720751,31.578092],[-99.600258,31.490461],[-99.605735,31.085167],[-100.115091,31.090644],[-100.109614,31.578092],[-99.726228,31.578092]]]},"id":"48095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.227403,31.528799],[-82.134295,31.468553],[-82.041187,31.375445],[-82.041187,31.369968],[-82.282173,31.227568],[-82.419096,31.419261],[-82.227403,31.528799]]]},"id":"13229"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.265248,31.528799],[-100.695646,31.523322],[-100.690169,31.085167],[-100.964016,31.085167],[-101.276202,31.07969],[-101.265248,31.528799]]]},"id":"48235"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.400832,31.47403],[-86.192708,31.441168],[-86.192708,31.194706],[-86.187231,30.992059],[-86.389878,30.992059],[-86.685633,30.992059],[-86.702064,31.194706],[-86.702064,31.523322],[-86.499417,31.523322],[-86.400832,31.47403]]]},"id":"01039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.868182,31.528799],[-94.325965,31.222091],[-94.128795,31.101598],[-94.457411,31.035875],[-94.561473,31.057782],[-94.813412,31.13446],[-94.840797,31.145414],[-94.950336,31.342583],[-94.955813,31.386399],[-95.005105,31.424737],[-94.868182,31.528799]]]},"id":"48005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.801542,31.523322],[-96.598895,31.222091],[-96.828926,31.107075],[-97.069912,30.986582],[-97.278035,31.282337],[-96.801542,31.523322]]]},"id":"48145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.086366,31.309722],[-85.048028,31.517845],[-84.817996,31.501415],[-84.637257,31.435691],[-84.642734,31.260429],[-84.922058,31.074213],[-85.02612,31.074213],[-85.086366,31.309722]]]},"id":"13099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.721221,31.517845],[-92.195435,31.479507],[-92.085896,31.337106],[-92.283066,30.964674],[-92.387128,31.003013],[-92.595251,30.893474],[-92.660975,30.898951],[-92.825283,30.887997],[-92.984114,31.34806],[-92.721221,31.517845]]]},"id":"22079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.430473,31.468553],[-99.200441,31.468553],[-99.090903,31.463076],[-99.090903,30.942767],[-99.485242,30.942767],[-99.605735,31.085167],[-99.600258,31.490461],[-99.430473,31.468553]]]},"id":"48307"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.992318,31.484984],[-98.565116,31.233045],[-98.439147,31.030398],[-98.444624,30.920859],[-98.515824,30.920859],[-98.964933,30.920859],[-99.090903,30.942767],[-99.090903,31.463076],[-98.992318,31.484984]]]},"id":"48411"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.240637,31.47403],[-83.147529,31.47403],[-83.142052,31.419261],[-83.048944,31.183752],[-83.196822,31.024921],[-83.295407,31.024921],[-83.43233,31.34806],[-83.339222,31.47403],[-83.240637,31.47403]]]},"id":"13019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.473866,31.419261],[-82.419096,31.419261],[-82.282173,31.227568],[-82.134295,31.00849],[-82.216449,30.570335],[-82.419096,30.581289],[-82.671035,31.183752],[-82.62722,31.364491],[-82.599835,31.468553],[-82.473866,31.419261]]]},"id":"13299"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.181731,31.463076],[-97.907884,31.068736],[-97.91336,31.035875],[-98.017422,31.035875],[-98.439147,31.030398],[-98.565116,31.233045],[-98.269362,31.413784],[-98.181731,31.463076]]]},"id":"48281"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.429133,31.435691],[-84.138855,31.441168],[-84.50581,31.07969],[-84.544149,31.07969],[-84.642734,31.260429],[-84.637257,31.435691],[-84.429133,31.435691]]]},"id":"13007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.279893,31.293291],[-81.268939,31.293291],[-81.444201,31.013967],[-81.76734,31.167321],[-81.729002,31.331629],[-81.62494,31.452122],[-81.279893,31.293291]]]},"id":"13127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.062178,31.441168],[-83.996455,31.441168],[-84.001932,31.337106],[-84.001932,31.07969],[-84.100517,31.07969],[-84.116948,31.07969],[-84.270302,31.07969],[-84.374364,31.07969],[-84.50581,31.07969],[-84.138855,31.441168],[-84.062178,31.441168]]]},"id":"13205"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.460161,31.435691],[-88.449208,31.435691],[-88.432777,31.112552],[-88.4273,30.997536],[-88.679239,30.997536],[-88.832593,30.997536],[-88.843547,31.435691],[-88.460161,31.435691]]]},"id":"28041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.42958,31.435691],[-89.396718,31.435691],[-89.144779,31.435691],[-89.139302,30.909905],[-89.341949,30.909905],[-89.347426,31.00849],[-89.451488,31.435691],[-89.42958,31.435691]]]},"id":"28035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.659611,31.435691],[-89.654134,31.435691],[-89.654134,31.003013],[-89.730812,31.003013],[-89.834873,31.003013],[-90.042997,31.337106],[-89.960843,31.391876],[-89.659611,31.435691]]]},"id":"28091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.144779,31.435691],[-88.942132,31.435691],[-88.843547,31.435691],[-88.832593,30.997536],[-88.887363,30.909905],[-88.996902,30.909905],[-89.139302,30.909905],[-89.144779,31.435691]]]},"id":"28111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.451488,31.435691],[-89.347426,31.00849],[-89.599365,31.003013],[-89.654134,31.003013],[-89.654134,31.435691],[-89.588411,31.435691],[-89.451488,31.435691]]]},"id":"28073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.142052,31.419261],[-82.62722,31.364491],[-82.671035,31.183752],[-82.972267,31.183752],[-83.032514,31.183752],[-83.048944,31.183752],[-83.142052,31.419261]]]},"id":"13003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.950336,31.342583],[-94.840797,31.145414],[-95.202275,30.822274],[-95.311814,30.88252],[-95.328245,30.860613],[-95.432306,31.057782],[-94.955813,31.386399],[-94.950336,31.342583]]]},"id":"48455"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.264355,31.369968],[-91.160293,31.34806],[-91.09457,31.320676],[-91.061708,30.997536],[-91.176724,30.997536],[-91.636787,30.997536],[-91.587494,31.189229],[-91.264355,31.369968]]]},"id":"28157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.041187,31.369968],[-82.041187,31.375445],[-81.729002,31.331629],[-81.76734,31.167321],[-81.937125,31.046829],[-81.986418,31.057782],[-82.134295,31.00849],[-82.282173,31.227568],[-82.041187,31.369968]]]},"id":"13025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.83713,31.282337],[-102.76593,31.293291],[-102.388021,31.085167],[-101.769126,30.652489],[-102.344205,30.597719],[-102.56876,30.050025],[-103.346485,30.603196],[-103.439593,30.663443],[-103.587471,30.767505],[-103.012392,31.369968],[-102.83713,31.282337]]]},"id":"48371"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.236053,31.364491],[-92.984114,31.34806],[-92.825283,30.887997],[-92.978637,30.877043],[-93.011499,30.877043],[-93.559193,30.86609],[-93.553716,31.183752],[-93.236053,31.364491]]]},"id":"22115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.319571,31.359014],[-96.242894,30.975628],[-96.566033,30.696304],[-96.620803,30.729166],[-96.828926,31.107075],[-96.598895,31.222091],[-96.319571,31.359014]]]},"id":"48395"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.190875,31.34806],[-90.042997,31.337106],[-89.834873,31.003013],[-90.262075,31.003013],[-90.262075,31.34806],[-90.245644,31.34806],[-90.190875,31.34806]]]},"id":"28147"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.43233,31.34806],[-83.295407,31.024921],[-83.383038,31.030398],[-83.476146,31.030398],[-83.498053,31.052306],[-83.574731,31.07969],[-83.514484,31.326153],[-83.43233,31.34806]]]},"id":"13075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.355183,31.34806],[-90.262075,31.34806],[-90.262075,31.003013],[-90.349706,31.003013],[-90.371614,30.997536],[-90.546876,30.997536],[-90.546876,31.34806],[-90.355183,31.34806]]]},"id":"28113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.722138,31.34806],[-90.634507,31.34806],[-90.546876,31.34806],[-90.546876,30.997536],[-90.568783,30.997536],[-90.8262,30.997536],[-91.061708,30.997536],[-91.09457,31.320676],[-90.722138,31.34806]]]},"id":"28005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.085896,31.337106],[-92.009219,31.326153],[-91.833957,31.265906],[-91.724418,31.046829],[-91.751803,31.019444],[-91.762756,31.00849],[-91.817526,30.849659],[-92.085896,30.849659],[-92.211866,30.849659],[-92.283066,30.964674],[-92.085896,31.337106]]]},"id":"22009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.974547,31.337106],[-83.651408,31.331629],[-83.514484,31.326153],[-83.574731,31.07969],[-83.739039,31.035875],[-84.001932,31.07969],[-84.001932,31.337106],[-83.974547,31.337106]]]},"id":"13071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.404005,31.304245],[-97.278035,31.282337],[-97.069912,30.986582],[-97.316374,30.751074],[-97.831206,30.904428],[-97.91336,31.035875],[-97.907884,31.068736],[-97.420436,31.320676],[-97.404005,31.304245]]]},"id":"48027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.76459,31.298768],[-87.616713,31.243998],[-87.600282,30.997536],[-87.518128,30.280057],[-88.005575,30.685351],[-87.972714,31.161844],[-87.945329,31.194706],[-87.76459,31.298768]]]},"id":"01003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.414983,31.315199],[-85.086366,31.309722],[-85.02612,31.074213],[-85.004212,31.003013],[-85.486183,30.997536],[-85.486183,31.200183],[-85.710737,31.194706],[-85.414983,31.315199]]]},"id":"01069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.948526,31.260429],[-86.702064,31.194706],[-86.685633,30.992059],[-86.784218,30.997536],[-87.162127,30.997536],[-87.249758,30.997536],[-87.600282,30.997536],[-87.616713,31.243998],[-87.42502,31.260429],[-86.948526,31.260429]]]},"id":"01053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.642734,31.260429],[-84.544149,31.07969],[-84.544149,31.07969],[-84.730365,31.068736],[-84.922058,31.074213],[-84.642734,31.260429]]]},"id":"13201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.486183,31.200183],[-85.486183,30.997536],[-85.497137,30.997536],[-86.033877,30.992059],[-86.187231,30.992059],[-86.192708,31.194706],[-85.792891,31.194706],[-85.710737,31.194706],[-85.486183,31.200183]]]},"id":"01061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.603008,31.178275],[-93.553716,31.183752],[-93.559193,30.86609],[-93.739932,30.40055],[-93.70707,30.247195],[-93.898763,30.241718],[-93.909717,31.156367],[-93.603008,31.178275]]]},"id":"48351"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.972267,31.183752],[-82.671035,31.183752],[-82.419096,30.581289],[-82.457435,30.586766],[-82.583404,30.592243],[-82.972267,30.871567],[-82.972267,31.183752]]]},"id":"13065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.032514,31.183752],[-82.972267,31.183752],[-82.972267,30.871567],[-83.02156,30.849659],[-83.196822,31.024921],[-83.048944,31.183752],[-83.032514,31.183752]]]},"id":"13173"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.972714,31.161844],[-88.005575,30.685351],[-88.394438,30.367688],[-88.410869,30.734643],[-88.4273,30.997536],[-88.432777,31.112552],[-87.972714,31.161844]]]},"id":"01097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.76734,31.167321],[-81.444201,31.013967],[-81.444201,30.707258],[-81.904264,30.816797],[-81.937125,31.046829],[-81.76734,31.167321]]]},"id":"13039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.997348,31.139937],[-93.909717,31.156367],[-93.898763,30.241718],[-94.117841,30.241718],[-94.074025,30.526519],[-94.29858,31.035875],[-94.457411,31.035875],[-94.128795,31.101598],[-94.041164,31.13446],[-93.997348,31.139937]]]},"id":"48241"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.813412,31.13446],[-94.561473,31.057782],[-94.545042,30.526519],[-94.731258,30.488181],[-94.851751,30.493658],[-95.202275,30.822274],[-94.840797,31.145414],[-94.813412,31.13446]]]},"id":"48373"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.828926,31.107075],[-96.620803,30.729166],[-96.96585,30.559381],[-97.157543,30.455319],[-97.316374,30.751074],[-97.069912,30.986582],[-96.828926,31.107075]]]},"id":"48331"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.102303,31.107075],[-103.587471,30.767505],[-103.439593,30.663443],[-103.801071,30.411504],[-104.98409,30.630581],[-104.918367,30.663443],[-104.102303,31.107075]]]},"id":"48243"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.903323,31.090644],[-95.7664,31.096121],[-95.618522,30.931813],[-95.864985,30.86609],[-96.166217,30.822274],[-96.237417,30.964674],[-96.242894,30.975628],[-95.903323,31.090644]]]},"id":"48313"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.690169,31.085167],[-100.115091,31.090644],[-100.115091,30.712735],[-100.958539,30.707258],[-100.964016,31.085167],[-100.690169,31.085167]]]},"id":"48413"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.115091,31.090644],[-99.605735,31.085167],[-99.485242,30.942767],[-99.485242,30.712735],[-99.759089,30.712735],[-100.115091,30.712735],[-100.115091,31.090644]]]},"id":"48327"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.388021,31.085167],[-102.30039,31.085167],[-101.774603,31.07969],[-101.276202,31.07969],[-100.964016,31.085167],[-100.958539,30.707258],[-100.958539,30.285534],[-101.544572,30.285534],[-101.758173,30.285534],[-101.769126,30.652489],[-102.388021,31.085167]]]},"id":"48105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.544149,31.07969],[-84.544149,31.07969],[-84.50581,31.07969],[-84.374364,31.07969],[-84.379841,30.690827],[-84.861812,30.712735],[-84.730365,31.068736],[-84.544149,31.07969]]]},"id":"13087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.270302,31.07969],[-84.116948,31.07969],[-84.084086,30.674397],[-84.281256,30.685351],[-84.379841,30.690827],[-84.374364,31.07969],[-84.270302,31.07969]]]},"id":"13131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.498053,31.052306],[-83.476146,31.030398],[-83.355653,30.636058],[-83.613069,30.652489],[-83.744516,30.657966],[-83.739039,31.035875],[-83.574731,31.07969],[-83.498053,31.052306]]]},"id":"13027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.100517,31.07969],[-84.001932,31.07969],[-83.739039,31.035875],[-83.744516,30.657966],[-84.007409,30.674397],[-84.084086,30.674397],[-84.116948,31.07969],[-84.100517,31.07969]]]},"id":"13275"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.986418,31.057782],[-81.937125,31.046829],[-81.904264,30.816797],[-82.052141,30.362211],[-82.216449,30.570335],[-82.134295,31.00849],[-81.986418,31.057782]]]},"id":"13049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.02612,31.074213],[-84.922058,31.074213],[-84.730365,31.068736],[-84.861812,30.712735],[-84.867289,30.712735],[-85.004212,31.003013],[-85.02612,31.074213]]]},"id":"13253"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.29858,31.035875],[-94.074025,30.526519],[-94.44098,30.526519],[-94.545042,30.526519],[-94.561473,31.057782],[-94.457411,31.035875],[-94.29858,31.035875]]]},"id":"48457"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.432306,31.057782],[-95.328245,30.860613],[-95.361106,30.504611],[-95.832123,30.630581],[-95.864985,30.86609],[-95.618522,30.931813],[-95.432306,31.057782]]]},"id":"48471"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.724418,31.046829],[-91.658695,30.992059],[-91.751803,31.019444],[-91.724418,31.046829]]]},"id":"22125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.017422,31.035875],[-97.91336,31.035875],[-97.831206,30.904428],[-98.050284,30.625104],[-98.126961,30.427934],[-98.351516,30.488181],[-98.444624,30.920859],[-98.439147,31.030398],[-98.017422,31.035875]]]},"id":"48053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.383038,31.030398],[-83.295407,31.024921],[-83.196822,31.024921],[-83.02156,30.849659],[-83.136575,30.625104],[-83.311837,30.636058],[-83.355653,30.636058],[-83.476146,31.030398],[-83.383038,31.030398]]]},"id":"13185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.762756,31.00849],[-91.751803,31.019444],[-91.658695,30.992059],[-91.664172,30.970151],[-91.330078,30.657966],[-91.483432,30.499135],[-91.521771,30.499135],[-91.70251,30.499135],[-91.75728,30.499135],[-91.817526,30.849659],[-91.762756,31.00849]]]},"id":"22077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.599365,31.003013],[-89.347426,31.00849],[-89.341949,30.909905],[-89.341949,30.647012],[-89.495303,30.647012],[-89.686996,30.460796],[-89.84035,30.663443],[-89.730812,31.003013],[-89.654134,31.003013],[-89.599365,31.003013]]]},"id":"28109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.834873,31.003013],[-89.730812,31.003013],[-89.84035,30.663443],[-90.256598,30.712735],[-90.349706,31.003013],[-90.262075,31.003013],[-89.834873,31.003013]]]},"id":"22117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.387128,31.003013],[-92.283066,30.964674],[-92.211866,30.849659],[-92.49119,30.482704],[-92.63359,30.482704],[-92.628113,30.488181],[-92.595251,30.893474],[-92.387128,31.003013]]]},"id":"22039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.486183,30.997536],[-85.004212,31.003013],[-84.867289,30.712735],[-84.933012,30.608673],[-85.16852,30.608673],[-85.382121,30.564858],[-85.43689,30.570335],[-85.601199,30.833228],[-85.497137,30.997536],[-85.486183,30.997536]]]},"id":"12063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.371614,30.997536],[-90.349706,31.003013],[-90.256598,30.712735],[-90.245644,30.225288],[-90.278506,30.230764],[-90.398998,30.285534],[-90.568783,30.652489],[-90.568783,30.997536],[-90.546876,30.997536],[-90.371614,30.997536]]]},"id":"22105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.568783,30.997536],[-90.568783,30.652489],[-90.744046,30.652489],[-90.908354,30.647012],[-90.848107,30.718212],[-90.8262,30.997536],[-90.568783,30.997536]]]},"id":"22091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.061708,30.997536],[-90.8262,30.997536],[-90.848107,30.718212],[-90.864538,30.718212],[-91.297217,30.647012],[-91.302693,30.652489],[-91.176724,30.997536],[-91.061708,30.997536]]]},"id":"22037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.162127,30.997536],[-86.784218,30.997536],[-86.800648,30.384119],[-86.921141,30.373165],[-87.310004,30.734643],[-87.162127,30.997536]]]},"id":"12113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.636787,30.997536],[-91.176724,30.997536],[-91.302693,30.652489],[-91.330078,30.657966],[-91.664172,30.970151],[-91.636787,30.997536]]]},"id":"22125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.249758,30.997536],[-87.162127,30.997536],[-87.310004,30.734643],[-86.921141,30.373165],[-87.518128,30.280057],[-87.600282,30.997536],[-87.249758,30.997536]]]},"id":"12033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.679239,30.997536],[-88.4273,30.997536],[-88.410869,30.734643],[-88.865455,30.734643],[-88.881886,30.734643],[-88.887363,30.909905],[-88.832593,30.997536],[-88.679239,30.997536]]]},"id":"28039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.685633,30.992059],[-86.389878,30.992059],[-86.395355,30.378642],[-86.800648,30.384119],[-86.784218,30.997536],[-86.685633,30.992059]]]},"id":"12091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.033877,30.992059],[-85.497137,30.997536],[-85.601199,30.833228],[-85.842184,30.701781],[-86.033877,30.992059]]]},"id":"12059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-86.389878,30.992059],[-86.187231,30.992059],[-86.033877,30.992059],[-85.842184,30.701781],[-85.990061,30.389596],[-85.995538,30.269103],[-86.395355,30.378642],[-86.389878,30.992059]]]},"id":"12131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.237417,30.964674],[-96.166217,30.822274],[-96.155263,30.329349],[-96.297663,30.378642],[-96.566033,30.696304],[-96.242894,30.975628],[-96.237417,30.964674]]]},"id":"48041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.485242,30.942767],[-99.090903,30.942767],[-98.964933,30.920859],[-98.964933,30.499135],[-99.304503,30.499135],[-99.485242,30.712735],[-99.485242,30.942767]]]},"id":"48319"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.515824,30.920859],[-98.444624,30.920859],[-98.351516,30.488181],[-98.411762,30.504611],[-98.592501,30.499135],[-98.964933,30.499135],[-98.964933,30.920859],[-98.515824,30.920859]]]},"id":"48299"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.996902,30.909905],[-88.887363,30.909905],[-88.881886,30.734643],[-88.881886,30.679874],[-89.341949,30.647012],[-89.341949,30.909905],[-89.139302,30.909905],[-88.996902,30.909905]]]},"id":"28131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.311814,30.88252],[-95.202275,30.822274],[-94.851751,30.493658],[-95.163936,30.34578],[-95.361106,30.504611],[-95.328245,30.860613],[-95.311814,30.88252]]]},"id":"48407"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.831206,30.904428],[-97.316374,30.751074],[-97.157543,30.455319],[-97.332805,30.40055],[-97.371143,30.41698],[-97.973607,30.625104],[-98.050284,30.625104],[-97.831206,30.904428]]]},"id":"48491"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.660975,30.898951],[-92.595251,30.893474],[-92.628113,30.488181],[-92.770513,30.488181],[-93.131992,30.422457],[-92.978637,30.877043],[-92.825283,30.887997],[-92.660975,30.898951]]]},"id":"22003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.011499,30.877043],[-92.978637,30.877043],[-93.131992,30.422457],[-93.131992,30.40055],[-93.460608,30.488181],[-93.739932,30.40055],[-93.559193,30.86609],[-93.011499,30.877043]]]},"id":"22011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.972267,30.871567],[-82.583404,30.592243],[-82.687466,30.597719],[-83.136575,30.625104],[-83.02156,30.849659],[-82.972267,30.871567]]]},"id":"13101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.166217,30.822274],[-95.864985,30.86609],[-95.832123,30.630581],[-95.804738,30.247195],[-95.821169,30.247195],[-96.095016,30.225288],[-96.155263,30.329349],[-96.166217,30.822274]]]},"id":"48185"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.085896,30.849659],[-91.817526,30.849659],[-91.75728,30.499135],[-91.987311,30.367688],[-92.053034,30.378642],[-92.140665,30.296488],[-92.49119,30.482704],[-92.211866,30.849659],[-92.085896,30.849659]]]},"id":"22097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.601199,30.833228],[-85.43689,30.570335],[-85.990061,30.389596],[-85.842184,30.701781],[-85.601199,30.833228]]]},"id":"12133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.904264,30.816797],[-81.444201,30.707258],[-81.444201,30.510088],[-81.608509,30.586766],[-82.046664,30.27458],[-82.052141,30.362211],[-81.904264,30.816797]]]},"id":"12089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.865455,30.734643],[-88.410869,30.734643],[-88.394438,30.367688],[-88.843547,30.406027],[-88.881886,30.679874],[-88.881886,30.734643],[-88.865455,30.734643]]]},"id":"28059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.620803,30.729166],[-96.566033,30.696304],[-96.297663,30.378642],[-96.64271,30.296488],[-96.96585,30.559381],[-96.620803,30.729166]]]},"id":"48051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.864538,30.718212],[-90.848107,30.718212],[-90.908354,30.647012],[-90.891923,30.34578],[-91.023369,30.323872],[-91.143862,30.323872],[-91.297217,30.647012],[-90.864538,30.718212]]]},"id":"22033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.256598,30.712735],[-89.84035,30.663443],[-89.686996,30.460796],[-89.522688,30.181472],[-89.62675,30.14861],[-89.900597,30.192426],[-90.103244,30.192426],[-90.245644,30.225288],[-90.256598,30.712735]]]},"id":"22103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.867289,30.712735],[-84.861812,30.712735],[-84.379841,30.690827],[-84.281256,30.685351],[-84.648211,30.389596],[-84.933012,30.608673],[-84.867289,30.712735]]]},"id":"12039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.759089,30.712735],[-99.485242,30.712735],[-99.304503,30.499135],[-99.304503,30.285534],[-99.605735,30.291011],[-99.753612,30.291011],[-100.115091,30.291011],[-100.115091,30.712735],[-99.759089,30.712735]]]},"id":"48267"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.115091,30.712735],[-100.115091,30.291011],[-100.701123,30.291011],[-100.958539,30.285534],[-100.958539,30.707258],[-100.115091,30.712735]]]},"id":"48435"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.084086,30.674397],[-84.007409,30.674397],[-84.073132,30.27458],[-84.303164,30.301965],[-84.713934,30.301965],[-84.648211,30.389596],[-84.281256,30.685351],[-84.084086,30.674397]]]},"id":"12073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.881886,30.679874],[-88.843547,30.406027],[-89.341949,30.373165],[-89.341949,30.647012],[-88.881886,30.679874]]]},"id":"28047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.744516,30.657966],[-83.613069,30.652489],[-83.821193,30.301965],[-83.990978,30.082887],[-84.078609,30.093841],[-84.073132,30.27458],[-84.007409,30.674397],[-83.744516,30.657966]]]},"id":"12065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.346485,30.603196],[-102.56876,30.050025],[-102.322297,29.88024],[-102.678299,29.73784],[-102.919284,29.190146],[-103.280762,28.982022],[-103.790117,29.261346],[-103.801071,30.411504],[-103.439593,30.663443],[-103.346485,30.603196]]]},"id":"48043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.330078,30.657966],[-91.302693,30.652489],[-91.297217,30.647012],[-91.143862,30.323872],[-91.483432,30.499135],[-91.330078,30.657966]]]},"id":"22121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-102.56876,30.050025],[-102.344205,30.597719],[-101.769126,30.652489],[-101.758173,30.285534],[-101.76365,29.781655],[-102.322297,29.88024],[-102.56876,30.050025]]]},"id":"48443"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.355653,30.636058],[-83.311837,30.636058],[-83.169437,30.384119],[-83.246114,30.258149],[-83.366607,30.258149],[-83.509007,30.301965],[-83.821193,30.301965],[-83.613069,30.652489],[-83.355653,30.636058]]]},"id":"12079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.744046,30.652489],[-90.568783,30.652489],[-90.398998,30.285534],[-90.634507,30.219811],[-90.891923,30.34578],[-90.908354,30.647012],[-90.744046,30.652489]]]},"id":"22063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.495303,30.647012],[-89.341949,30.647012],[-89.341949,30.373165],[-89.522688,30.181472],[-89.686996,30.460796],[-89.495303,30.647012]]]},"id":"28045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.311837,30.636058],[-83.136575,30.625104],[-82.687466,30.597719],[-82.69842,30.597719],[-82.797005,30.334826],[-83.081806,30.438888],[-83.169437,30.384119],[-83.311837,30.636058]]]},"id":"12047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.832123,30.630581],[-95.361106,30.504611],[-95.163936,30.34578],[-95.098213,30.165041],[-95.218706,30.066456],[-95.804738,30.088364],[-95.804738,30.247195],[-95.832123,30.630581]]]},"id":"48339"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.98409,30.630581],[-103.801071,30.411504],[-103.790117,29.261346],[-104.507597,29.639255],[-104.98409,30.630581],[-104.98409,30.630581]]]},"id":"48377"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.973607,30.625104],[-97.371143,30.41698],[-97.650467,30.071933],[-97.666898,30.066456],[-97.710714,30.022641],[-98.170777,30.356734],[-98.126961,30.427934],[-98.050284,30.625104],[-97.973607,30.625104]]]},"id":"48453"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.16852,30.608673],[-84.933012,30.608673],[-85.113751,30.197903],[-85.22329,30.20338],[-85.387598,30.20338],[-85.382121,30.564858],[-85.16852,30.608673]]]},"id":"12013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.933012,30.608673],[-84.648211,30.389596],[-84.713934,30.301965],[-84.544149,30.011687],[-85.004212,30.011687],[-85.02612,29.973348],[-85.113751,30.197903],[-84.933012,30.608673]]]},"id":"12077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.69842,30.597719],[-82.687466,30.597719],[-82.583404,30.592243],[-82.457435,30.586766],[-82.457435,30.137656],[-82.528635,29.940487],[-82.660082,29.830948],[-82.802482,29.93501],[-82.797005,30.334826],[-82.69842,30.597719]]]},"id":"12023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.608509,30.586766],[-81.444201,30.510088],[-81.378478,30.252672],[-81.389431,30.252672],[-81.679709,30.121226],[-81.701617,30.192426],[-82.052141,30.186949],[-82.046664,30.27458],[-81.608509,30.586766]]]},"id":"12031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.419096,30.581289],[-82.216449,30.570335],[-82.052141,30.362211],[-82.046664,30.27458],[-82.052141,30.186949],[-82.052141,30.143133],[-82.145249,30.143133],[-82.298603,30.143133],[-82.457435,30.137656],[-82.457435,30.586766],[-82.419096,30.581289]]]},"id":"12003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.382121,30.564858],[-85.387598,30.20338],[-85.387598,29.924056],[-85.995538,30.269103],[-85.990061,30.389596],[-85.43689,30.570335],[-85.382121,30.564858]]]},"id":"12005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.157543,30.455319],[-96.96585,30.559381],[-96.64271,30.296488],[-96.796065,30.159564],[-96.801542,30.154087],[-97.026096,30.050025],[-97.332805,30.40055],[-97.157543,30.455319]]]},"id":"48287"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.44098,30.526519],[-94.074025,30.526519],[-94.117841,30.241718],[-94.117841,30.159564],[-94.216426,30.175995],[-94.446457,30.110272],[-94.731258,30.488181],[-94.545042,30.526519],[-94.44098,30.526519]]]},"id":"48199"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.411762,30.504611],[-98.351516,30.488181],[-98.126961,30.427934],[-98.170777,30.356734],[-98.296746,30.039072],[-98.411762,29.93501],[-98.587024,30.137656],[-98.592501,30.499135],[-98.411762,30.504611]]]},"id":"48031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.304503,30.499135],[-98.964933,30.499135],[-98.592501,30.499135],[-98.587024,30.137656],[-98.921118,30.137656],[-99.304503,30.285534],[-99.304503,30.499135]]]},"id":"48171"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.75728,30.499135],[-91.70251,30.499135],[-91.368417,30.060979],[-91.724418,30.121226],[-91.948972,30.071933],[-91.987311,30.367688],[-91.75728,30.499135]]]},"id":"22099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.521771,30.499135],[-91.483432,30.499135],[-91.143862,30.323872],[-91.023369,30.323872],[-91.105524,30.060979],[-91.226016,30.022641],[-91.368417,30.060979],[-91.70251,30.499135],[-91.521771,30.499135]]]},"id":"22047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.851751,30.493658],[-94.731258,30.488181],[-94.446457,30.110272],[-94.44098,29.891194],[-94.97772,29.885717],[-95.098213,30.165041],[-95.163936,30.34578],[-94.851751,30.493658]]]},"id":"48291"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.460608,30.488181],[-93.131992,30.40055],[-92.995068,30.039072],[-93.372977,30.050025],[-93.723501,30.050025],[-93.70707,30.247195],[-93.739932,30.40055],[-93.460608,30.488181]]]},"id":"22019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.770513,30.488181],[-92.628113,30.488181],[-92.63359,30.482704],[-92.628113,30.093841],[-92.737652,30.039072],[-92.995068,30.039072],[-93.131992,30.40055],[-93.131992,30.422457],[-92.770513,30.488181]]]},"id":"22053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.63359,30.482704],[-92.49119,30.482704],[-92.140665,30.296488],[-92.283066,30.14861],[-92.628113,30.093841],[-92.63359,30.482704]]]},"id":"22001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.081806,30.438888],[-82.797005,30.334826],[-82.802482,29.93501],[-82.879159,29.885717],[-83.246114,30.258149],[-83.169437,30.384119],[-83.081806,30.438888]]]},"id":"12121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.332805,30.40055],[-97.026096,30.050025],[-97.316374,29.787132],[-97.650467,30.071933],[-97.371143,30.41698],[-97.332805,30.40055]]]},"id":"48021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.297663,30.378642],[-96.155263,30.329349],[-96.095016,30.225288],[-96.144309,30.071933],[-96.379817,30.082887],[-96.620803,30.044549],[-96.796065,30.159564],[-96.64271,30.296488],[-96.297663,30.378642]]]},"id":"48477"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.053034,30.378642],[-91.987311,30.367688],[-91.948972,30.071933],[-91.965403,30.033595],[-92.250204,30.143133],[-92.283066,30.14861],[-92.140665,30.296488],[-92.053034,30.378642]]]},"id":"22055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.170777,30.356734],[-97.710714,30.022641],[-97.875022,29.858333],[-98.000992,29.754271],[-98.296746,30.039072],[-98.170777,30.356734]]]},"id":"48209"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.891923,30.34578],[-90.634507,30.219811],[-90.639984,30.165041],[-90.963123,30.066456],[-91.078139,30.07741],[-91.105524,30.060979],[-91.023369,30.323872],[-90.891923,30.34578]]]},"id":"22005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.509007,30.301965],[-83.366607,30.258149],[-83.317314,29.819994],[-83.410422,29.66664],[-83.990978,30.082887],[-83.821193,30.301965],[-83.509007,30.301965]]]},"id":"12123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-84.303164,30.301965],[-84.073132,30.27458],[-84.078609,30.093841],[-84.341502,29.962394],[-84.544149,30.011687],[-84.713934,30.301965],[-84.303164,30.301965]]]},"id":"12129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.398998,30.285534],[-90.278506,30.230764],[-90.420906,30.060979],[-90.541399,29.891194],[-90.656414,29.891194],[-90.639984,30.165041],[-90.634507,30.219811],[-90.398998,30.285534]]]},"id":"22095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.605735,30.291011],[-99.304503,30.285534],[-98.921118,30.137656],[-98.915641,29.781655],[-99.600258,29.907625],[-99.759089,30.071933],[-99.753612,30.291011],[-99.605735,30.291011]]]},"id":"48265"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.753612,30.291011],[-99.759089,30.071933],[-100.016506,29.622824],[-100.109614,29.622824],[-100.575153,29.622824],[-100.701123,29.622824],[-100.701123,30.291011],[-100.115091,30.291011],[-99.753612,30.291011]]]},"id":"48137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.544572,30.285534],[-100.958539,30.285534],[-100.701123,30.291011],[-100.701123,29.622824],[-100.794231,29.239438],[-101.413125,29.754271],[-101.76365,29.781655],[-101.758173,30.285534],[-101.544572,30.285534]]]},"id":"48465"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.246114,30.258149],[-82.879159,29.885717],[-82.906544,29.825471],[-82.917498,29.825471],[-82.922975,29.825471],[-82.939406,29.825471],[-83.317314,29.819994],[-83.366607,30.258149],[-83.246114,30.258149]]]},"id":"12067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.389431,30.252672],[-81.378478,30.252672],[-81.214169,29.672117],[-81.214169,29.672117],[-81.526355,29.622824],[-81.581124,29.841902],[-81.679709,30.121226],[-81.389431,30.252672]]]},"id":"12109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.821169,30.247195],[-95.804738,30.247195],[-95.804738,30.088364],[-95.826646,29.787132],[-95.826646,29.787132],[-96.03477,29.726886],[-96.144309,30.071933],[-96.095016,30.225288],[-95.821169,30.247195]]]},"id":"48473"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.70707,30.247195],[-93.723501,30.050025],[-93.854948,29.863809],[-94.117841,30.159564],[-94.117841,30.241718],[-93.898763,30.241718],[-93.70707,30.247195]]]},"id":"48361"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.420906,30.060979],[-90.278506,30.230764],[-90.229213,29.694024],[-90.541399,29.891194],[-90.420906,30.060979]]]},"id":"22089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.278506,30.230764],[-90.245644,30.225288],[-90.103244,30.192426],[-90.010136,29.896671],[-89.977274,29.447562],[-90.032043,29.431131],[-90.229213,29.694024],[-90.278506,30.230764]]]},"id":"22051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.22329,30.20338],[-85.113751,30.197903],[-85.02612,29.973348],[-85.217813,29.694024],[-85.387598,29.924056],[-85.387598,30.20338],[-85.22329,30.20338]]]},"id":"12045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.900597,30.192426],[-89.62675,30.14861],[-89.856781,30.00621],[-89.862258,30.000733],[-89.911551,29.869286],[-89.988228,29.907625],[-90.010136,29.896671],[-90.103244,30.192426],[-89.900597,30.192426]]]},"id":"22071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.701617,30.192426],[-81.679709,30.121226],[-81.581124,29.841902],[-82.046664,29.715932],[-82.052141,30.143133],[-82.052141,30.186949],[-81.701617,30.192426]]]},"id":"12019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.216426,30.175995],[-94.117841,30.159564],[-93.854948,29.863809],[-93.838517,29.688547],[-94.353349,29.562578],[-94.44098,29.891194],[-94.446457,30.110272],[-94.216426,30.175995]]]},"id":"48245"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.218706,30.066456],[-95.098213,30.165041],[-94.97772,29.885717],[-94.928428,29.672117],[-95.016059,29.557101],[-95.202275,29.562578],[-95.218706,29.557101],[-95.295383,29.595439],[-95.42683,29.579009],[-95.826646,29.787132],[-95.804738,30.088364],[-95.218706,30.066456]]]},"id":"48201"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.639984,30.165041],[-90.656414,29.891194],[-90.727615,29.913102],[-90.886446,29.907625],[-90.963123,30.066456],[-90.639984,30.165041]]]},"id":"22093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.801542,30.154087],[-96.796065,30.159564],[-96.620803,30.044549],[-96.57151,29.962394],[-96.872742,29.633778],[-97.141112,29.628301],[-97.316374,29.787132],[-97.316374,29.787132],[-97.026096,30.050025],[-96.801542,30.154087]]]},"id":"48149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.250204,30.143133],[-91.965403,30.033595],[-91.97088,29.803563],[-91.998265,29.61187],[-92.04208,29.579009],[-92.617159,29.579009],[-92.737652,30.039072],[-92.628113,30.093841],[-92.283066,30.14861],[-92.250204,30.143133]]]},"id":"22113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.145249,30.143133],[-82.052141,30.143133],[-82.046664,29.715932],[-82.052141,29.715932],[-82.419096,29.924056],[-82.145249,30.143133]]]},"id":"12007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.298603,30.143133],[-82.145249,30.143133],[-82.419096,29.924056],[-82.506727,29.940487],[-82.528635,29.940487],[-82.457435,30.137656],[-82.298603,30.143133]]]},"id":"12125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.921118,30.137656],[-98.587024,30.137656],[-98.411762,29.93501],[-98.64727,29.743317],[-98.778717,29.721409],[-98.915641,29.781655],[-98.921118,30.137656]]]},"id":"48259"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.724418,30.121226],[-91.368417,30.060979],[-91.226016,30.022641],[-91.253401,29.973348],[-91.472479,29.956917],[-91.532725,29.951441],[-91.877772,29.721409],[-91.97088,29.803563],[-91.965403,30.033595],[-91.948972,30.071933],[-91.724418,30.121226]]]},"id":"22045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.379817,30.082887],[-96.144309,30.071933],[-96.03477,29.726886],[-96.089539,29.600916],[-96.17717,29.633778],[-96.57151,29.962394],[-96.620803,30.044549],[-96.379817,30.082887]]]},"id":"48015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.759089,30.071933],[-99.600258,29.907625],[-99.605735,29.628301],[-100.016506,29.622824],[-99.759089,30.071933]]]},"id":"48385"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.078139,30.07741],[-90.963123,30.066456],[-90.886446,29.907625],[-91.006939,29.715932],[-91.083616,29.628301],[-91.100047,29.699501],[-91.253401,29.973348],[-91.226016,30.022641],[-91.105524,30.060979],[-91.078139,30.07741]]]},"id":"22007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.862258,30.000733],[-89.856781,30.00621],[-89.369334,29.913102],[-89.484349,29.622824],[-89.911551,29.869286],[-89.862258,30.000733]]]},"id":"22087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.666898,30.066456],[-97.650467,30.071933],[-97.316374,29.787132],[-97.316374,29.787132],[-97.634037,29.650209],[-97.798345,29.754271],[-97.875022,29.858333],[-97.710714,30.022641],[-97.666898,30.066456]]]},"id":"48055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.372977,30.050025],[-92.995068,30.039072],[-92.737652,30.039072],[-92.617159,29.579009],[-93.2251,29.776178],[-93.838517,29.688547],[-93.854948,29.863809],[-93.723501,30.050025],[-93.372977,30.050025]]]},"id":"22023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.296746,30.039072],[-98.000992,29.754271],[-98.313177,29.595439],[-98.64727,29.743317],[-98.411762,29.93501],[-98.296746,30.039072]]]},"id":"48091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.004212,30.011687],[-84.544149,30.011687],[-84.341502,29.962394],[-85.217813,29.694024],[-85.02612,29.973348],[-85.004212,30.011687]]]},"id":"12037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.472479,29.956917],[-91.253401,29.973348],[-91.100047,29.699501],[-91.472479,29.956917]]]},"id":"22099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.57151,29.962394],[-96.17717,29.633778],[-96.64271,29.250392],[-96.659141,29.261346],[-96.872742,29.633778],[-96.57151,29.962394]]]},"id":"48089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.532725,29.951441],[-91.472479,29.956917],[-91.100047,29.699501],[-91.083616,29.628301],[-91.275309,29.474947],[-91.877772,29.721409],[-91.532725,29.951441]]]},"id":"22101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.506727,29.940487],[-82.419096,29.924056],[-82.052141,29.715932],[-82.057618,29.46947],[-82.408142,29.485901],[-82.654605,29.562578],[-82.660082,29.830948],[-82.528635,29.940487],[-82.506727,29.940487]]]},"id":"12001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.879159,29.885717],[-82.802482,29.93501],[-82.660082,29.830948],[-82.654605,29.562578],[-82.873682,29.589962],[-82.939406,29.589962],[-82.922975,29.825471],[-82.917498,29.825471],[-82.906544,29.825471],[-82.879159,29.885717]]]},"id":"12041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.727615,29.913102],[-90.656414,29.891194],[-90.541399,29.891194],[-90.229213,29.694024],[-90.032043,29.431131],[-90.064905,29.212054],[-90.086813,29.162761],[-90.409952,29.195623],[-90.815246,29.776178],[-91.006939,29.715932],[-90.886446,29.907625],[-90.727615,29.913102]]]},"id":"22057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.600258,29.907625],[-98.915641,29.781655],[-98.778717,29.721409],[-98.806102,29.688547],[-99.414042,29.628301],[-99.605735,29.628301],[-99.600258,29.907625]]]},"id":"48019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-89.988228,29.907625],[-89.911551,29.869286],[-89.484349,29.622824],[-89.002379,29.179192],[-89.16121,29.009407],[-89.977274,29.447562],[-90.010136,29.896671],[-89.988228,29.907625]]]},"id":"22075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.44098,29.891194],[-94.353349,29.562578],[-94.36978,29.557101],[-94.36978,29.595439],[-94.512181,29.54067],[-94.928428,29.672117],[-94.97772,29.885717],[-94.44098,29.891194]]]},"id":"48071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.798345,29.754271],[-97.634037,29.650209],[-97.84216,29.376362],[-98.132438,29.442085],[-98.313177,29.595439],[-98.000992,29.754271],[-97.875022,29.858333],[-97.798345,29.754271]]]},"id":"48187"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.581124,29.841902],[-81.526355,29.622824],[-81.433247,29.39827],[-81.679709,29.327069],[-81.844017,29.518762],[-82.057618,29.46947],[-82.052141,29.715932],[-82.046664,29.715932],[-81.581124,29.841902]]]},"id":"12107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.939406,29.825471],[-82.922975,29.825471],[-82.939406,29.589962],[-83.16396,29.288731],[-83.410422,29.66664],[-83.317314,29.819994],[-82.939406,29.825471]]]},"id":"12029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.826646,29.787132],[-95.826646,29.787132],[-95.42683,29.579009],[-95.848554,29.261346],[-96.089539,29.600916],[-96.03477,29.726886],[-95.826646,29.787132]]]},"id":"48157"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.316374,29.787132],[-97.141112,29.628301],[-97.239697,29.381839],[-97.612129,29.107992],[-97.727145,29.223007],[-97.84216,29.376362],[-97.634037,29.650209],[-97.316374,29.787132]]]},"id":"48177"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.815246,29.776178],[-90.409952,29.195623],[-90.837154,29.036791],[-91.275309,29.474947],[-91.083616,29.628301],[-91.006939,29.715932],[-90.815246,29.776178]]]},"id":"22109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.64727,29.743317],[-98.313177,29.595439],[-98.132438,29.442085],[-98.285792,29.255869],[-98.406285,29.113469],[-98.800625,29.250392],[-98.806102,29.250392],[-98.806102,29.688547],[-98.778717,29.721409],[-98.64727,29.743317]]]},"id":"48029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.806102,29.688547],[-98.806102,29.250392],[-98.806102,29.091561],[-98.904687,29.091561],[-99.414042,29.091561],[-99.414042,29.628301],[-98.806102,29.688547]]]},"id":"48325"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.214169,29.672117],[-81.214169,29.672117],[-81.10463,29.425654],[-81.110107,29.425654],[-81.433247,29.39827],[-81.526355,29.622824],[-81.214169,29.672117]]]},"id":"12035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.17717,29.633778],[-96.089539,29.600916],[-95.848554,29.261346],[-95.875939,29.228484],[-96.308617,28.965591],[-96.64271,29.250392],[-96.17717,29.633778]]]},"id":"48481"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.872742,29.633778],[-96.659141,29.261346],[-96.938465,29.064176],[-96.976804,29.102515],[-97.239697,29.381839],[-97.141112,29.628301],[-96.872742,29.633778]]]},"id":"48285"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.605735,29.628301],[-99.414042,29.628301],[-99.414042,29.091561],[-100.109614,29.086084],[-100.109614,29.622824],[-100.016506,29.622824],[-99.605735,29.628301]]]},"id":"48463"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.575153,29.622824],[-100.109614,29.622824],[-100.109614,29.086084],[-100.668261,29.086084],[-100.794231,29.239438],[-100.701123,29.622824],[-100.575153,29.622824]]]},"id":"48271"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.295383,29.595439],[-95.218706,29.557101],[-95.120121,29.07513],[-95.508984,28.823191],[-95.864985,29.223007],[-95.875939,29.228484],[-95.848554,29.261346],[-95.42683,29.579009],[-95.295383,29.595439]]]},"id":"48039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.36978,29.595439],[-94.36978,29.557101],[-94.512181,29.54067],[-94.36978,29.595439]]]},"id":"48167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.873682,29.589962],[-82.654605,29.562578],[-82.408142,29.485901],[-82.534112,29.042268],[-82.758666,28.992976],[-83.16396,29.288731],[-82.939406,29.589962],[-82.873682,29.589962]]]},"id":"12075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.202275,29.562578],[-95.016059,29.557101],[-95.120121,29.07513],[-95.218706,29.557101],[-95.202275,29.562578]]]},"id":"48167"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.844017,29.518762],[-81.679709,29.327069],[-81.641371,29.277777],[-81.953556,28.960114],[-82.013803,28.960114],[-82.309557,28.960114],[-82.523158,29.042268],[-82.534112,29.042268],[-82.408142,29.485901],[-82.057618,29.46947],[-81.844017,29.518762]]]},"id":"12083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.285792,29.255869],[-98.132438,29.442085],[-97.84216,29.376362],[-97.727145,29.223007],[-98.192684,28.883437],[-98.406285,29.113469],[-98.285792,29.255869]]]},"id":"48493"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.110107,29.425654],[-81.10463,29.425654],[-80.732199,28.790329],[-80.989615,28.615067],[-81.367524,28.87796],[-81.641371,29.277777],[-81.679709,29.327069],[-81.433247,29.39827],[-81.110107,29.425654]]]},"id":"12127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.239697,29.381839],[-96.976804,29.102515],[-97.30542,28.861529],[-97.57379,28.812237],[-97.612129,29.107992],[-97.239697,29.381839]]]},"id":"48123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.641371,29.277777],[-81.367524,28.87796],[-81.411339,28.784852],[-81.542786,28.784852],[-81.657801,28.346697],[-81.959033,28.346697],[-81.953556,28.960114],[-81.641371,29.277777]]]},"id":"12069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.659141,29.261346],[-96.64271,29.250392],[-96.308617,28.965591],[-96.325048,28.675313],[-96.576987,28.708175],[-96.576987,28.702698],[-96.64271,28.713652],[-96.938465,29.064176],[-96.659141,29.261346]]]},"id":"48239"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.800625,29.250392],[-98.406285,29.113469],[-98.192684,28.883437],[-98.099576,28.784852],[-98.335085,28.615067],[-98.581547,28.642452],[-98.800625,28.636975],[-98.800625,28.647929],[-98.806102,29.091561],[-98.806102,29.250392],[-98.800625,29.250392]]]},"id":"48013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-95.864985,29.223007],[-95.508984,28.823191],[-96.379817,28.385036],[-96.37434,28.401466],[-96.325048,28.642452],[-96.325048,28.675313],[-96.308617,28.965591],[-95.875939,29.228484],[-95.864985,29.223007]]]},"id":"48321"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.727145,29.223007],[-97.612129,29.107992],[-97.57379,28.812237],[-97.776437,28.669836],[-97.935268,28.713652],[-98.006468,28.691744],[-98.099576,28.784852],[-98.192684,28.883437],[-97.727145,29.223007]]]},"id":"48255"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.976804,29.102515],[-96.938465,29.064176],[-96.64271,28.713652],[-96.653664,28.702698],[-96.889173,28.505528],[-97.146589,28.549344],[-97.16302,28.554821],[-97.30542,28.861529],[-96.976804,29.102515]]]},"id":"48469"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.904687,29.091561],[-98.806102,29.091561],[-98.800625,28.647929],[-99.397611,28.642452],[-99.408565,28.642452],[-99.414042,29.091561],[-98.904687,29.091561]]]},"id":"48163"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.414042,29.091561],[-99.408565,28.642452],[-99.780997,28.642452],[-100.115091,28.647929],[-100.109614,29.086084],[-99.414042,29.091561]]]},"id":"48507"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.109614,29.086084],[-100.115091,28.647929],[-100.115091,28.19882],[-100.213675,28.19882],[-100.668261,29.086084],[-100.109614,29.086084]]]},"id":"48323"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.523158,29.042268],[-82.309557,28.960114],[-82.265742,28.669836],[-82.649128,28.691744],[-82.758666,28.992976],[-82.534112,29.042268],[-82.523158,29.042268]]]},"id":"12017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.013803,28.960114],[-81.953556,28.960114],[-81.959033,28.346697],[-82.057618,28.313835],[-82.057618,28.478144],[-82.265742,28.669836],[-82.309557,28.960114],[-82.013803,28.960114]]]},"id":"12119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.30542,28.861529],[-97.16302,28.554821],[-97.37662,28.390513],[-97.776437,28.669836],[-97.57379,28.812237],[-97.30542,28.861529]]]},"id":"48175"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.411339,28.784852],[-81.367524,28.87796],[-80.989615,28.615067],[-81.411339,28.784852]]]},"id":"12117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.447398,27.859249],[-80.869122,27.820911],[-80.863645,28.346697],[-80.989615,28.615067],[-80.732199,28.790329],[-80.447398,27.859249]]]},"id":"12009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.099576,28.784852],[-98.006468,28.691744],[-97.820252,28.176912],[-97.880499,28.056419],[-98.2365,28.056419],[-98.335085,28.056419],[-98.335085,28.615067],[-98.099576,28.784852]]]},"id":"48297"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.542786,28.784852],[-81.411339,28.784852],[-80.989615,28.615067],[-80.863645,28.346697],[-81.2306,28.346697],[-81.657801,28.346697],[-81.542786,28.784852]]]},"id":"12095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.576987,28.708175],[-96.325048,28.675313],[-96.325048,28.642452],[-96.576987,28.702698],[-96.576987,28.708175]]]},"id":"48057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.935268,28.713652],[-97.776437,28.669836],[-97.37662,28.390513],[-97.540929,28.165958],[-97.820252,28.176912],[-98.006468,28.691744],[-97.935268,28.713652]]]},"id":"48025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.763203,28.41242],[-96.889173,28.505528],[-96.653664,28.702698],[-96.763203,28.41242]]]},"id":"48057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.265742,28.669836],[-82.057618,28.478144],[-82.254788,28.478144],[-82.676512,28.434328],[-82.649128,28.691744],[-82.265742,28.669836]]]},"id":"12053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.780997,28.642452],[-99.408565,28.642452],[-99.397611,28.642452],[-99.392134,28.204297],[-100.115091,28.19882],[-100.115091,28.647929],[-99.780997,28.642452]]]},"id":"48127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.800625,28.647929],[-98.800625,28.636975],[-98.800625,28.056419],[-99.392134,28.204297],[-99.397611,28.642452],[-98.800625,28.647929]]]},"id":"48283"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.581547,28.642452],[-98.335085,28.615067],[-98.335085,28.056419],[-98.800625,28.056419],[-98.800625,28.636975],[-98.581547,28.642452]]]},"id":"48311"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.146589,28.549344],[-96.889173,28.505528],[-96.763203,28.41242],[-96.790588,28.319312],[-97.261605,28.078327],[-97.540929,28.165958],[-97.37662,28.390513],[-97.16302,28.554821],[-97.146589,28.549344]]]},"id":"48391"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.254788,28.478144],[-82.057618,28.478144],[-82.057618,28.313835],[-82.106911,28.171435],[-82.649128,28.171435],[-82.802482,28.171435],[-82.676512,28.434328],[-82.254788,28.478144]]]},"id":"12101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.657801,28.346697],[-81.142969,27.645649],[-81.49897,27.645649],[-81.564693,27.645649],[-82.052141,27.645649],[-82.106911,28.171435],[-82.057618,28.313835],[-81.959033,28.346697],[-81.657801,28.346697]]]},"id":"12105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.2306,28.346697],[-80.863645,28.346697],[-80.869122,27.820911],[-80.874599,27.640172],[-81.142969,27.645649],[-81.657801,28.346697],[-81.2306,28.346697]]]},"id":"12097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.801542,28.275497],[-96.812495,28.21525],[-97.135635,27.903065],[-97.261605,28.078327],[-96.790588,28.319312],[-96.801542,28.275497]]]},"id":"48007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.115091,28.19882],[-99.392134,28.204297],[-98.800625,28.056419],[-98.800625,27.355371],[-98.953979,27.26774],[-99.359273,27.306078],[-99.452381,27.262263],[-100.213675,28.19882],[-100.115091,28.19882]]]},"id":"48479"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.820252,28.176912],[-97.540929,28.165958],[-97.261605,28.078327],[-97.135635,27.903065],[-97.365666,27.848295],[-97.803822,27.979742],[-97.798345,27.996173],[-97.880499,28.056419],[-97.820252,28.176912]]]},"id":"48409"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.649128,28.171435],[-82.106911,28.171435],[-82.052141,27.645649],[-82.28765,27.645649],[-82.55602,27.645649],[-82.649128,27.968788],[-82.649128,28.171435]]]},"id":"12057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.649128,28.171435],[-82.649128,27.968788],[-82.802482,28.171435],[-82.649128,28.171435]]]},"id":"12103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-96.828926,28.111189],[-96.856311,28.061896],[-97.048004,27.837342],[-97.053481,27.842818],[-96.828926,28.111189]]]},"id":"48007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.335085,28.056419],[-98.2365,28.056419],[-98.231023,27.262263],[-98.521301,27.26774],[-98.800625,27.355371],[-98.800625,28.056419],[-98.335085,28.056419]]]},"id":"48131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.2365,28.056419],[-97.880499,28.056419],[-97.798345,27.996173],[-97.940745,27.634695],[-98.011945,27.634695],[-98.055761,27.262263],[-98.231023,27.262263],[-98.2365,28.056419]]]},"id":"48249"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.803822,27.979742],[-97.365666,27.848295],[-97.327328,27.563495],[-97.940745,27.634695],[-97.798345,27.996173],[-97.803822,27.979742]]]},"id":"48355"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.321428,27.558018],[-80.677429,27.558018],[-80.792445,27.645649],[-80.874599,27.640172],[-80.869122,27.820911],[-80.447398,27.859249],[-80.321428,27.558018]]]},"id":"12061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.053481,27.842818],[-97.048004,27.837342],[-97.223266,27.574448],[-97.245174,27.579925],[-97.053481,27.842818]]]},"id":"48355"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.49897,27.645649],[-81.142969,27.645649],[-80.945799,27.21297],[-81.564693,27.032231],[-81.564693,27.33894],[-81.564693,27.645649],[-81.49897,27.645649]]]},"id":"12055"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.28765,27.645649],[-82.052141,27.645649],[-82.057618,27.33894],[-82.057618,27.207493],[-82.62722,27.388232],[-82.643651,27.388232],[-82.55602,27.645649],[-82.28765,27.645649]]]},"id":"12081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.052141,27.645649],[-81.564693,27.645649],[-81.564693,27.33894],[-81.581124,27.33894],[-82.057618,27.33894],[-82.052141,27.645649]]]},"id":"12049"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.792445,27.645649],[-80.677429,27.558018],[-80.677429,27.207493],[-80.885553,26.961031],[-80.945799,27.21297],[-81.142969,27.645649],[-80.874599,27.640172],[-80.792445,27.645649]]]},"id":"12093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.011945,27.634695],[-97.940745,27.634695],[-97.327328,27.563495],[-97.634037,27.284171],[-97.738098,27.273217],[-97.984561,27.207493],[-98.055761,27.262263],[-98.011945,27.634695]]]},"id":"48273"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.245174,27.579925],[-97.223266,27.574448],[-97.349236,27.278694],[-97.371143,27.278694],[-97.245174,27.579925]]]},"id":"48273"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.677429,27.558018],[-80.321428,27.558018],[-80.200935,27.262263],[-80.677429,27.207493],[-80.677429,27.558018]]]},"id":"12111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.62722,27.388232],[-82.057618,27.207493],[-82.057618,27.032231],[-82.375281,26.9446],[-82.643651,27.388232],[-82.62722,27.388232]]]},"id":"12115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.521301,27.26774],[-98.422716,26.785769],[-98.953979,26.785769],[-98.953979,27.26774],[-98.800625,27.355371],[-98.521301,27.26774]]]},"id":"48247"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.581124,27.33894],[-81.564693,27.33894],[-81.564693,27.032231],[-82.041187,27.032231],[-82.057618,27.032231],[-82.057618,27.207493],[-82.057618,27.33894],[-81.581124,27.33894]]]},"id":"12027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99.359273,27.306078],[-98.953979,27.26774],[-98.953979,26.785769],[-99.16758,26.572168],[-99.452381,27.262263],[-99.359273,27.306078]]]},"id":"48505"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.738098,27.273217],[-97.634037,27.284171],[-97.442344,26.599553],[-97.655944,26.599553],[-97.957176,26.610507],[-97.984561,26.780292],[-97.984561,27.207493],[-97.738098,27.273217]]]},"id":"48261"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.371143,27.278694],[-97.349236,27.278694],[-97.288989,26.599553],[-97.316374,26.599553],[-97.371143,27.278694]]]},"id":"48261"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.521301,27.26774],[-98.231023,27.262263],[-98.055761,27.262263],[-97.984561,27.207493],[-97.984561,26.780292],[-98.318654,26.785769],[-98.422716,26.785769],[-98.521301,27.26774]]]},"id":"48047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.080443,26.971985],[-80.885553,26.961031],[-80.677429,27.207493],[-80.200935,27.262263],[-80.080443,26.971985]]]},"id":"12085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.945799,27.21297],[-80.885553,26.961031],[-80.96223,26.769338],[-81.564693,26.769338],[-81.564693,27.032231],[-80.945799,27.21297]]]},"id":"12043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.041187,27.032231],[-81.564693,27.032231],[-81.564693,26.769338],[-82.063095,26.769338],[-82.210972,26.774815],[-82.23288,26.780292],[-82.23288,26.785769],[-82.271219,26.791246],[-82.375281,26.9446],[-82.057618,27.032231],[-82.041187,27.032231]]]},"id":"12015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.885553,26.961031],[-80.080443,26.971985],[-80.074966,26.320229],[-80.250228,26.33666],[-80.880076,26.331183],[-80.885553,26.961031]]]},"id":"12099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.96223,26.769338],[-80.885553,26.961031],[-80.880076,26.331183],[-80.880076,26.259983],[-81.564693,26.511922],[-81.564693,26.769338],[-80.96223,26.769338]]]},"id":"12051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.953979,26.785769],[-98.422716,26.785769],[-98.318654,26.785769],[-98.587024,26.254506],[-99.16758,26.572168],[-98.953979,26.785769]]]},"id":"48427"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.318654,26.785769],[-97.984561,26.780292],[-97.957176,26.610507],[-97.864068,26.347614],[-97.864068,26.051859],[-98.587024,26.254506],[-98.318654,26.785769]]]},"id":"48215"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.063095,26.769338],[-81.564693,26.769338],[-81.564693,26.511922],[-81.844017,26.331183],[-82.063095,26.769338]]]},"id":"12071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.655944,26.599553],[-97.442344,26.599553],[-97.382097,26.413337],[-97.864068,26.347614],[-97.957176,26.610507],[-97.655944,26.599553]]]},"id":"48489"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.316374,26.599553],[-97.288989,26.599553],[-97.223266,26.413337],[-97.239697,26.413337],[-97.316374,26.599553]]]},"id":"48489"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-81.564693,26.511922],[-80.880076,26.259983],[-80.874599,25.980659],[-80.874599,25.805397],[-81.345616,25.805397],[-81.679709,25.843735],[-81.844017,26.331183],[-81.564693,26.511922]]]},"id":"12021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.864068,26.347614],[-97.382097,26.413337],[-97.371143,25.838258],[-97.864068,26.051859],[-97.864068,26.347614]]]},"id":"48061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.250228,26.33666],[-80.074966,26.320229],[-80.118781,25.975182],[-80.874599,25.980659],[-80.880076,26.259983],[-80.880076,26.331183],[-80.250228,26.33666]]]},"id":"12011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.874599,25.980659],[-80.118781,25.975182],[-80.304997,25.383672],[-80.858168,25.175549],[-80.874599,25.805397],[-80.874599,25.980659]]]},"id":"12086"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.874599,25.805397],[-80.858168,25.175549],[-81.077246,25.120779],[-81.345616,25.805397],[-80.874599,25.805397]]]},"id":"12087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-157.951581,21.697691],[-157.655826,21.303352],[-158.110412,21.303352],[-157.951581,21.697691]]]},"id":"15003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-156.587823,21.029505],[-156.00179,20.793996],[-156.379699,20.580396],[-156.587823,21.029505]]]},"id":"15009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-155.634835,18.948267],[-155.881297,19.035898],[-156.062036,19.73147],[-155.87582,20.26821],[-155.284311,20.021748],[-154.807817,19.523346],[-155.634835,18.948267]]]},"id":"15001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.105571,18.515589],[-67.105571,18.515589],[-66.957694,18.488204],[-66.919355,18.395096],[-67.012463,18.395096],[-67.028894,18.395096],[-67.056278,18.46082],[-67.105571,18.515589]]]},"id":"72071"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.105571,18.515589],[-67.056278,18.46082],[-67.132956,18.389619],[-67.16034,18.417004],[-67.105571,18.515589],[-67.105571,18.515589]]]},"id":"72005"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.585262,18.482727],[-66.585262,18.482727],[-66.590739,18.389619],[-66.590739,18.340327],[-66.607169,18.329373],[-66.711231,18.312942],[-66.771478,18.323896],[-66.766001,18.482727],[-66.585262,18.482727]]]},"id":"72013"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.766001,18.482727],[-66.771478,18.323896],[-66.826247,18.323896],[-66.826247,18.340327],[-66.837201,18.488204],[-66.766001,18.482727]]]},"id":"72065"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.902924,18.482727],[-66.897447,18.367712],[-66.919355,18.395096],[-66.957694,18.488204],[-66.902924,18.482727]]]},"id":"72115"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.837201,18.488204],[-66.826247,18.340327],[-66.89197,18.367712],[-66.897447,18.367712],[-66.902924,18.482727],[-66.837201,18.488204]]]},"id":"72027"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.585262,18.482727],[-66.585262,18.482727],[-66.535969,18.482727],[-66.541446,18.40605],[-66.590739,18.389619],[-66.585262,18.482727]]]},"id":"72017"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.349753,18.488204],[-66.377138,18.345804],[-66.442861,18.373189],[-66.437384,18.482727],[-66.437384,18.488204],[-66.349753,18.488204]]]},"id":"72145"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.316892,18.47725],[-66.305938,18.384142],[-66.316892,18.367712],[-66.366184,18.33485],[-66.377138,18.345804],[-66.349753,18.488204],[-66.316892,18.47725]]]},"id":"72143"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.437384,18.482727],[-66.442861,18.373189],[-66.464769,18.373189],[-66.475723,18.367712],[-66.535969,18.351281],[-66.541446,18.400573],[-66.541446,18.40605],[-66.535969,18.482727],[-66.437384,18.488204],[-66.437384,18.482727]]]},"id":"72091"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.196399,18.466297],[-66.251168,18.395096],[-66.305938,18.384142],[-66.316892,18.47725],[-66.196399,18.466297]]]},"id":"72051"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.037568,18.449866],[-65.999229,18.378666],[-66.043044,18.312942],[-66.064952,18.301988],[-66.081383,18.296511],[-66.108768,18.438912],[-66.125199,18.46082],[-66.037568,18.449866]]]},"id":"72127"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.141629,18.46082],[-66.169014,18.433435],[-66.196399,18.389619],[-66.218307,18.395096],[-66.251168,18.395096],[-66.196399,18.466297],[-66.141629,18.46082]]]},"id":"72137"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.125199,18.46082],[-66.108768,18.438912],[-66.130676,18.422481],[-66.130676,18.422481],[-66.169014,18.433435],[-66.141629,18.46082],[-66.125199,18.46082]]]},"id":"72033"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.056278,18.46082],[-67.028894,18.395096],[-67.050802,18.307465],[-67.122002,18.323896],[-67.127479,18.318419],[-67.132956,18.389619],[-67.056278,18.46082]]]},"id":"72099"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.829444,18.422481],[-65.867782,18.378666],[-65.911598,18.400573],[-65.917075,18.400573],[-65.993752,18.46082],[-65.829444,18.422481]]]},"id":"72087"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.993752,18.46082],[-65.917075,18.400573],[-65.917075,18.269127],[-65.94446,18.291034],[-65.999229,18.378666],[-66.037568,18.449866],[-65.993752,18.46082]]]},"id":"72031"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.130676,18.422481],[-66.108768,18.438912],[-66.081383,18.296511],[-66.141629,18.280081],[-66.130676,18.422481],[-66.130676,18.422481]]]},"id":"72061"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.169014,18.433435],[-66.130676,18.422481],[-66.141629,18.280081],[-66.190922,18.258173],[-66.207353,18.274604],[-66.207353,18.318419],[-66.196399,18.389619],[-66.169014,18.433435]]]},"id":"72021"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.752767,18.384142],[-65.758244,18.291034],[-65.769197,18.280081],[-65.823967,18.274604],[-65.834921,18.274604],[-65.867782,18.378666],[-65.829444,18.422481],[-65.752767,18.384142]]]},"id":"72119"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.16034,18.417004],[-67.132956,18.389619],[-67.127479,18.318419],[-67.182248,18.312942],[-67.237017,18.373189],[-67.16034,18.417004]]]},"id":"72003"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.911598,18.400573],[-65.867782,18.378666],[-65.834921,18.274604],[-65.851352,18.252696],[-65.917075,18.269127],[-65.917075,18.400573],[-65.911598,18.400573]]]},"id":"72029"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.541446,18.400573],[-66.535969,18.351281],[-66.590739,18.340327],[-66.590739,18.389619],[-66.541446,18.40605],[-66.541446,18.400573]]]},"id":"72054"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.218307,18.395096],[-66.196399,18.389619],[-66.207353,18.318419],[-66.256645,18.329373],[-66.278553,18.329373],[-66.305938,18.367712],[-66.316892,18.367712],[-66.305938,18.384142],[-66.251168,18.395096],[-66.218307,18.395096]]]},"id":"72135"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.012463,18.395096],[-66.919355,18.395096],[-66.897447,18.367712],[-66.89197,18.367712],[-66.908401,18.252696],[-67.039848,18.291034],[-67.050802,18.307465],[-67.028894,18.395096],[-67.012463,18.395096]]]},"id":"72131"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.632274,18.285558],[-65.752767,18.296511],[-65.670613,18.362235],[-65.632274,18.285558]]]},"id":"72053"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.758244,18.291034],[-65.752767,18.384142],[-65.670613,18.362235],[-65.752767,18.296511],[-65.758244,18.291034]]]},"id":"72089"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.999229,18.378666],[-65.94446,18.291034],[-65.982798,18.312942],[-66.021137,18.307465],[-66.043044,18.312942],[-65.999229,18.378666]]]},"id":"72139"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.442861,18.373189],[-66.377138,18.345804],[-66.366184,18.33485],[-66.377138,18.296511],[-66.453815,18.258173],[-66.464769,18.373189],[-66.442861,18.373189]]]},"id":"72101"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.237017,18.373189],[-67.182248,18.312942],[-67.226064,18.296511],[-67.237017,18.373189]]]},"id":"72117"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.475723,18.367712],[-66.464769,18.373189],[-66.453815,18.258173],[-66.541446,18.165065],[-66.568831,18.296511],[-66.607169,18.329373],[-66.590739,18.340327],[-66.535969,18.351281],[-66.475723,18.367712]]]},"id":"72039"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.305938,18.367712],[-66.278553,18.329373],[-66.311415,18.247219],[-66.349753,18.241742],[-66.377138,18.296511],[-66.366184,18.33485],[-66.316892,18.367712],[-66.305938,18.367712]]]},"id":"72047"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.89197,18.367712],[-66.826247,18.340327],[-66.826247,18.323896],[-66.815293,18.230788],[-66.826247,18.170542],[-66.837201,18.170542],[-66.897447,18.186973],[-66.908401,18.252696],[-66.89197,18.367712]]]},"id":"72081"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.711231,18.312942],[-66.607169,18.329373],[-66.568831,18.296511],[-66.650985,18.159588],[-66.672893,18.154111],[-66.722185,18.219834],[-66.815293,18.230788],[-66.826247,18.323896],[-66.771478,18.323896],[-66.711231,18.312942]]]},"id":"72141"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.256645,18.329373],[-66.207353,18.318419],[-66.207353,18.274604],[-66.267599,18.247219],[-66.311415,18.247219],[-66.278553,18.329373],[-66.256645,18.329373]]]},"id":"72105"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.122002,18.323896],[-67.050802,18.307465],[-67.039848,18.291034],[-67.083663,18.252696],[-67.16034,18.274604],[-67.187725,18.269127],[-67.226064,18.296511],[-67.182248,18.312942],[-67.127479,18.318419],[-67.122002,18.323896]]]},"id":"72011"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.021137,18.307465],[-65.999229,18.20888],[-66.053998,18.115772],[-66.097814,18.170542],[-66.119722,18.20888],[-66.064952,18.301988],[-66.043044,18.312942],[-66.021137,18.307465]]]},"id":"72025"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.982798,18.312942],[-65.94446,18.291034],[-65.917075,18.269127],[-65.949936,18.230788],[-65.966367,18.230788],[-65.999229,18.20888],[-66.021137,18.307465],[-65.982798,18.312942]]]},"id":"72063"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.064952,18.301988],[-66.119722,18.20888],[-66.147106,18.230788],[-66.169014,18.225311],[-66.190922,18.258173],[-66.141629,18.280081],[-66.081383,18.296511],[-66.064952,18.301988]]]},"id":"72007"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.568831,18.296511],[-66.541446,18.165065],[-66.546923,18.154111],[-66.5524,18.154111],[-66.650985,18.159588],[-66.568831,18.296511]]]},"id":"72073"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.752767,18.296511],[-65.632274,18.285558],[-65.659659,18.20888],[-65.769197,18.280081],[-65.758244,18.291034],[-65.752767,18.296511]]]},"id":"72037"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.823967,18.274604],[-65.769197,18.280081],[-65.659659,18.20888],[-65.741813,18.176019],[-65.823967,18.197926],[-65.823967,18.274604]]]},"id":"72103"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.377138,18.296511],[-66.349753,18.241742],[-66.371661,18.176019],[-66.442861,18.176019],[-66.453815,18.176019],[-66.519538,18.154111],[-66.546923,18.154111],[-66.541446,18.165065],[-66.453815,18.258173],[-66.377138,18.296511]]]},"id":"72107"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.039848,18.291034],[-66.908401,18.252696],[-66.897447,18.186973],[-66.913878,18.19245],[-67.01794,18.197926],[-67.083663,18.252696],[-67.039848,18.291034]]]},"id":"72083"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.207353,18.274604],[-66.190922,18.258173],[-66.169014,18.225311],[-66.240214,18.186973],[-66.267599,18.247219],[-66.207353,18.274604]]]},"id":"72045"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.823967,18.274604],[-65.823967,18.197926],[-65.878736,18.115772],[-65.906121,18.126726],[-65.928029,18.121249],[-65.928029,18.143157],[-65.851352,18.252696],[-65.834921,18.274604],[-65.823967,18.274604]]]},"id":"72085"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.16034,18.274604],[-67.083663,18.252696],[-67.01794,18.197926],[-67.050802,18.176019],[-67.083663,18.148634],[-67.116525,18.159588],[-67.16034,18.154111],[-67.182248,18.170542],[-67.187725,18.269127],[-67.16034,18.274604]]]},"id":"72097"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.917075,18.269127],[-65.851352,18.252696],[-65.928029,18.143157],[-65.949936,18.230788],[-65.917075,18.269127]]]},"id":"72077"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.722185,18.219834],[-66.672893,18.154111],[-66.6948,18.132203],[-66.716708,18.132203],[-66.771478,18.13768],[-66.798862,18.132203],[-66.826247,18.170542],[-66.815293,18.230788],[-66.722185,18.219834]]]},"id":"72001"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.311415,18.247219],[-66.267599,18.247219],[-66.240214,18.186973],[-66.240214,18.181496],[-66.278553,18.176019],[-66.316892,18.154111],[-66.371661,18.176019],[-66.349753,18.241742],[-66.311415,18.247219]]]},"id":"72019"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.147106,18.230788],[-66.119722,18.20888],[-66.097814,18.170542],[-66.097814,18.159588],[-66.218307,18.143157],[-66.240214,18.181496],[-66.240214,18.186973],[-66.169014,18.225311],[-66.147106,18.230788]]]},"id":"72041"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.966367,18.230788],[-65.949936,18.230788],[-65.928029,18.143157],[-65.928029,18.121249],[-66.010183,18.077434],[-66.053998,18.110295],[-66.053998,18.115772],[-65.999229,18.20888],[-65.966367,18.230788]]]},"id":"72129"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.913878,18.19245],[-66.897447,18.186973],[-66.837201,18.170542],[-66.924832,18.148634],[-66.979601,18.143157],[-67.050802,18.176019],[-67.01794,18.197926],[-66.913878,18.19245]]]},"id":"72093"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.823967,18.197926],[-65.741813,18.176019],[-65.796582,18.071957],[-65.878736,18.115772],[-65.823967,18.197926]]]},"id":"72069"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.278553,18.176019],[-66.240214,18.181496],[-66.218307,18.143157],[-66.223784,18.093865],[-66.256645,18.077434],[-66.316892,18.154111],[-66.278553,18.176019]]]},"id":"72009"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.453815,18.176019],[-66.442861,18.176019],[-66.431907,18.082911],[-66.519538,18.154111],[-66.453815,18.176019]]]},"id":"72149"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.371661,18.176019],[-66.316892,18.154111],[-66.256645,18.077434],[-66.333322,18.017187],[-66.382615,18.039095],[-66.42643,18.044572],[-66.431907,18.082911],[-66.442861,18.176019],[-66.371661,18.176019]]]},"id":"72043"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.050802,18.176019],[-66.979601,18.143157],[-66.985078,18.050049],[-67.067232,18.06648],[-67.111048,18.055526],[-67.100094,18.104819],[-67.083663,18.148634],[-67.050802,18.176019]]]},"id":"72125"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.650985,18.159588],[-66.5524,18.154111],[-66.535969,17.978849],[-66.700277,17.978849],[-66.6948,18.132203],[-66.672893,18.154111],[-66.650985,18.159588]]]},"id":"72113"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.826247,18.170542],[-66.798862,18.132203],[-66.853632,17.956941],[-66.859109,17.956941],[-66.886493,18.022664],[-66.924832,18.148634],[-66.837201,18.170542],[-66.826247,18.170542]]]},"id":"72153"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.097814,18.159588],[-66.097814,18.170542],[-66.053998,18.115772],[-66.053998,18.110295],[-66.053998,18.104819],[-66.075906,18.104819],[-66.163537,18.050049],[-66.223784,18.093865],[-66.218307,18.143157],[-66.097814,18.159588]]]},"id":"72035"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.182248,18.170542],[-67.16034,18.154111],[-67.100094,18.104819],[-67.111048,18.055526],[-67.111048,17.945987],[-67.182248,18.170542]]]},"id":"72023"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.116525,18.159588],[-67.083663,18.148634],[-67.100094,18.104819],[-67.16034,18.154111],[-67.116525,18.159588]]]},"id":"72067"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.546923,18.154111],[-66.519538,18.154111],[-66.431907,18.082911],[-66.42643,18.044572],[-66.448338,17.984326],[-66.535969,17.978849],[-66.5524,18.154111],[-66.546923,18.154111]]]},"id":"72075"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.924832,18.148634],[-66.886493,18.022664],[-66.957694,18.033618],[-66.985078,18.050049],[-66.979601,18.143157],[-66.924832,18.148634]]]},"id":"72121"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.798862,18.132203],[-66.771478,18.13768],[-66.755047,18.000757],[-66.853632,17.956941],[-66.798862,18.132203]]]},"id":"72059"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.716708,18.132203],[-66.6948,18.132203],[-66.700277,17.978849],[-66.755047,18.000757],[-66.771478,18.13768],[-66.716708,18.132203]]]},"id":"72111"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.906121,18.126726],[-65.878736,18.115772],[-65.796582,18.071957],[-65.851352,18.011711],[-65.988275,18.061003],[-66.010183,18.077434],[-65.928029,18.121249],[-65.906121,18.126726]]]},"id":"72151"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.053998,18.104819],[-66.053998,18.110295],[-66.010183,18.077434],[-65.988275,18.061003],[-65.911598,17.984326],[-66.021137,17.978849],[-66.059475,18.039095],[-66.081383,18.033618],[-66.053998,18.104819]]]},"id":"72109"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.075906,18.104819],[-66.053998,18.104819],[-66.081383,18.033618],[-66.070429,17.967895],[-66.207353,17.962418],[-66.163537,18.050049],[-66.075906,18.104819]]]},"id":"72057"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.223784,18.093865],[-66.163537,18.050049],[-66.207353,17.962418],[-66.338799,17.978849],[-66.333322,18.017187],[-66.256645,18.077434],[-66.223784,18.093865]]]},"id":"72123"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-67.067232,18.06648],[-66.985078,18.050049],[-66.957694,18.033618],[-66.979601,17.951464],[-67.111048,17.945987],[-67.111048,18.055526],[-67.067232,18.06648]]]},"id":"72079"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-65.988275,18.061003],[-65.851352,18.011711],[-65.911598,17.984326],[-65.988275,18.061003]]]},"id":"72095"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.382615,18.039095],[-66.333322,18.017187],[-66.338799,17.978849],[-66.448338,17.984326],[-66.42643,18.044572],[-66.382615,18.039095]]]},"id":"72133"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.059475,18.039095],[-66.021137,17.978849],[-66.070429,17.967895],[-66.081383,18.033618],[-66.059475,18.039095]]]},"id":"72015"},
+{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.957694,18.033618],[-66.886493,18.022664],[-66.859109,17.956941],[-66.979601,17.951464],[-66.957694,18.033618]]]},"id":"72055"}]}
Index: Dev/branches/Demo/d3/examples/data/us-state-centroids.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/us-state-centroids.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/us-state-centroids.json	(revision 225)
@@ -0,0 +1,1 @@
+{"type":"FeatureCollection","features":[{"type":"Feature","id":"01","geometry":{"type":"Point","coordinates":[-86.766233,33.001471]},"properties":{"name":"Alabama              ","population":4447100}},{"type":"Feature","id":"02","geometry":{"type":"Point","coordinates":[-148.716968,61.288254]},"properties":{"name":"Alaska                ","population":626932}},{"type":"Feature","id":"04","geometry":{"type":"Point","coordinates":[-111.828711,33.373506]},"properties":{"name":"Arizona              ","population":5130632}},{"type":"Feature","id":"05","geometry":{"type":"Point","coordinates":[-92.576816,35.080251]},"properties":{"name":"Arkansas             ","population":2673400}},{"type":"Feature","id":"06","geometry":{"type":"Point","coordinates":[-119.355165,35.458606]},"properties":{"name":"California          ","population":33871648}},{"type":"Feature","id":"08","geometry":{"type":"Point","coordinates":[-105.203628,39.500656]},"properties":{"name":"Colorado             ","population":4301261}},{"type":"Feature","id":"09","geometry":{"type":"Point","coordinates":[-72.874365,41.494852]},"properties":{"name":"Connecticut          ","population":3405565}},{"type":"Feature","id":"10","geometry":{"type":"Point","coordinates":[-75.561908,39.397164]},"properties":{"name":"Delaware              ","population":783600}},{"type":"Feature","id":"11","geometry":{"type":"Point","coordinates":[-77.014001,38.910092]},"properties":{"name":"District of Columbia  ","population":572059}},{"type":"Feature","id":"12","geometry":{"type":"Point","coordinates":[-81.634622,27.795850]},"properties":{"name":"Florida             ","population":15982378}},{"type":"Feature","id":"13","geometry":{"type":"Point","coordinates":[-83.868887,33.332208]},"properties":{"name":"Georgia              ","population":8186453}},{"type":"Feature","id":"15","geometry":{"type":"Point","coordinates":[-157.524452,21.146768]},"properties":{"name":"Hawaii               ","population":1211537}},{"type":"Feature","id":"16","geometry":{"type":"Point","coordinates":[-115.133222,44.242605]},"properties":{"name":"Idaho                ","population":1293953}},{"type":"Feature","id":"17","geometry":{"type":"Point","coordinates":[-88.380238,41.278216]},"properties":{"name":"Illinois            ","population":12419293}},{"type":"Feature","id":"18","geometry":{"type":"Point","coordinates":[-86.261515,40.163935]},"properties":{"name":"Indiana              ","population":6080485}},{"type":"Feature","id":"19","geometry":{"type":"Point","coordinates":[-93.049161,41.960392]},"properties":{"name":"Iowa                 ","population":2926324}},{"type":"Feature","id":"20","geometry":{"type":"Point","coordinates":[-96.536052,38.454303]},"properties":{"name":"Kansas               ","population":2688418}},{"type":"Feature","id":"21","geometry":{"type":"Point","coordinates":[-85.241819,37.808159]},"properties":{"name":"Kentucky             ","population":4041769}},{"type":"Feature","id":"22","geometry":{"type":"Point","coordinates":[-91.457133,30.699270]},"properties":{"name":"Louisiana            ","population":4468976}},{"type":"Feature","id":"23","geometry":{"type":"Point","coordinates":[-69.719931,44.313614]},"properties":{"name":"Maine                ","population":1274923}},{"type":"Feature","id":"24","geometry":{"type":"Point","coordinates":[-76.797396,39.145653]},"properties":{"name":"Maryland             ","population":5296486}},{"type":"Feature","id":"25","geometry":{"type":"Point","coordinates":[-71.363628,42.271831]},"properties":{"name":"Massachusetts        ","population":6349097}},{"type":"Feature","id":"26","geometry":{"type":"Point","coordinates":[-84.170753,42.866412]},"properties":{"name":"Michigan             ","population":9938444}},{"type":"Feature","id":"27","geometry":{"type":"Point","coordinates":[-93.583003,45.210782]},"properties":{"name":"Minnesota            ","population":4919479}},{"type":"Feature","id":"28","geometry":{"type":"Point","coordinates":[-89.593164,32.566420]},"properties":{"name":"Mississippi          ","population":2844658}},{"type":"Feature","id":"29","geometry":{"type":"Point","coordinates":[-92.153770,38.437715]},"properties":{"name":"Missouri             ","population":5595211}},{"type":"Feature","id":"30","geometry":{"type":"Point","coordinates":[-111.209708,46.813302]},"properties":{"name":"Montana               ","population":902195}},{"type":"Feature","id":"31","geometry":{"type":"Point","coordinates":[-97.403875,41.183753]},"properties":{"name":"Nebraska             ","population":1711263}},{"type":"Feature","id":"32","geometry":{"type":"Point","coordinates":[-116.304648,37.165965]},"properties":{"name":"Nevada               ","population":1998257}},{"type":"Feature","id":"33","geometry":{"type":"Point","coordinates":[-71.463342,43.153046]},"properties":{"name":"New Hampshire        ","population":1235786}},{"type":"Feature","id":"34","geometry":{"type":"Point","coordinates":[-74.428055,40.438458]},"properties":{"name":"New Jersey           ","population":8414350}},{"type":"Feature","id":"35","geometry":{"type":"Point","coordinates":[-106.342108,34.623012]},"properties":{"name":"New Mexico           ","population":1819046}},{"type":"Feature","id":"36","geometry":{"type":"Point","coordinates":[-74.645228,41.507548]},"properties":{"name":"New York            ","population":18976457}},{"type":"Feature","id":"37","geometry":{"type":"Point","coordinates":[-79.667654,35.553334]},"properties":{"name":"North Carolina       ","population":8049313}},{"type":"Feature","id":"38","geometry":{"type":"Point","coordinates":[-99.334736,47.375168]},"properties":{"name":"North Dakota          ","population":642200}},{"type":"Feature","id":"39","geometry":{"type":"Point","coordinates":[-82.749366,40.480854]},"properties":{"name":"Ohio                ","population":11353140}},{"type":"Feature","id":"40","geometry":{"type":"Point","coordinates":[-96.834653,35.597940]},"properties":{"name":"Oklahoma             ","population":3450654}},{"type":"Feature","id":"41","geometry":{"type":"Point","coordinates":[-122.579524,44.732273]},"properties":{"name":"Oregon               ","population":3421399}},{"type":"Feature","id":"42","geometry":{"type":"Point","coordinates":[-77.075925,40.463528]},"properties":{"name":"Pennsylvania        ","population":12281054}},{"type":"Feature","id":"44","geometry":{"type":"Point","coordinates":[-71.448902,41.753318]},"properties":{"name":"Rhode Island         ","population":1048319}},{"type":"Feature","id":"45","geometry":{"type":"Point","coordinates":[-81.032387,34.034551]},"properties":{"name":"South Carolina       ","population":4012012}},{"type":"Feature","id":"46","geometry":{"type":"Point","coordinates":[-99.043799,44.047502]},"properties":{"name":"South Dakota          ","population":754844}},{"type":"Feature","id":"47","geometry":{"type":"Point","coordinates":[-86.397772,35.795862]},"properties":{"name":"Tennessee            ","population":5689283}},{"type":"Feature","id":"48","geometry":{"type":"Point","coordinates":[-97.388631,30.943149]},"properties":{"name":"Texas               ","population":20851820}},{"type":"Feature","id":"49","geometry":{"type":"Point","coordinates":[-111.900160,40.438987]},"properties":{"name":"Utah                 ","population":2233169}},{"type":"Feature","id":"50","geometry":{"type":"Point","coordinates":[-72.814309,44.081127]},"properties":{"name":"Vermont               ","population":608827}},{"type":"Feature","id":"51","geometry":{"type":"Point","coordinates":[-77.835857,37.750345]},"properties":{"name":"Virginia             ","population":7078515}},{"type":"Feature","id":"53","geometry":{"type":"Point","coordinates":[-121.624501,47.341728]},"properties":{"name":"Washington           ","population":5894121}},{"type":"Feature","id":"54","geometry":{"type":"Point","coordinates":[-80.820221,38.767195]},"properties":{"name":"West Virginia        ","population":1808344}},{"type":"Feature","id":"55","geometry":{"type":"Point","coordinates":[-89.001006,43.728544]},"properties":{"name":"Wisconsin            ","population":5363675}},{"type":"Feature","id":"56","geometry":{"type":"Point","coordinates":[-107.008835,42.675762]},"properties":{"name":"Wyoming               ","population":493782}},{"type":"Feature","id":"72","geometry":{"type":"Point","coordinates":[-66.58765,18.19958]},"properties":{"code":"PR","name":"Puerto Rico","population":3808610}}]}
Index: Dev/branches/Demo/d3/examples/data/us-states.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/us-states.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/us-states.json	(revision 225)
@@ -0,0 +1,54 @@
+{"type":"FeatureCollection","features":[
+{"type":"Feature","id":"01","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-87.359296,35.00118],[-85.606675,34.984749],[-85.431413,34.124869],[-85.184951,32.859696],[-85.069935,32.580372],[-84.960397,32.421541],[-85.004212,32.322956],[-84.889196,32.262709],[-85.058981,32.13674],[-85.053504,32.01077],[-85.141136,31.840985],[-85.042551,31.539753],[-85.113751,31.27686],[-85.004212,31.003013],[-85.497137,30.997536],[-87.600282,30.997536],[-87.633143,30.86609],[-87.408589,30.674397],[-87.446927,30.510088],[-87.37025,30.427934],[-87.518128,30.280057],[-87.655051,30.247195],[-87.90699,30.411504],[-87.934375,30.657966],[-88.011052,30.685351],[-88.10416,30.499135],[-88.137022,30.318396],[-88.394438,30.367688],[-88.471115,31.895754],[-88.241084,33.796253],[-88.098683,34.891641],[-88.202745,34.995703],[-87.359296,35.00118]]]}},
+{"type":"Feature","id":"02","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-131.602021,55.117982],[-131.569159,55.28229],[-131.355558,55.183705],[-131.38842,55.01392],[-131.645836,55.035827],[-131.602021,55.117982]]],[[[-131.832052,55.42469],[-131.645836,55.304197],[-131.749898,55.128935],[-131.832052,55.189182],[-131.832052,55.42469]]],[[[-132.976733,56.437924],[-132.735747,56.459832],[-132.631685,56.421493],[-132.664547,56.273616],[-132.878148,56.240754],[-133.069841,56.333862],[-132.976733,56.437924]]],[[[-133.595627,56.350293],[-133.162949,56.317431],[-133.05341,56.125739],[-132.620732,55.912138],[-132.472854,55.780691],[-132.4619,55.671152],[-132.357838,55.649245],[-132.341408,55.506844],[-132.166146,55.364444],[-132.144238,55.238474],[-132.029222,55.276813],[-131.97993,55.178228],[-131.958022,54.789365],[-132.029222,54.701734],[-132.308546,54.718165],[-132.385223,54.915335],[-132.483808,54.898904],[-132.686455,55.046781],[-132.746701,54.997489],[-132.916486,55.046781],[-132.889102,54.898904],[-132.73027,54.937242],[-132.626209,54.882473],[-132.675501,54.679826],[-132.867194,54.701734],[-133.157472,54.95915],[-133.239626,55.090597],[-133.223195,55.22752],[-133.453227,55.216566],[-133.453227,55.320628],[-133.277964,55.331582],[-133.102702,55.42469],[-133.17938,55.588998],[-133.387503,55.62186],[-133.420365,55.884753],[-133.497042,56.0162],[-133.639442,55.923092],[-133.694212,56.070969],[-133.546335,56.142169],[-133.666827,56.311955],[-133.595627,56.350293]]],[[[-133.738027,55.556137],[-133.546335,55.490413],[-133.414888,55.572568],[-133.283441,55.534229],[-133.420365,55.386352],[-133.633966,55.430167],[-133.738027,55.556137]]],[[[-133.907813,56.930849],[-134.050213,57.029434],[-133.885905,57.095157],[-133.343688,57.002049],[-133.102702,57.007526],[-132.932917,56.82131],[-132.620732,56.667956],[-132.653593,56.55294],[-132.817901,56.492694],[-133.042456,56.520078],[-133.201287,56.448878],[-133.420365,56.492694],[-133.66135,56.448878],[-133.710643,56.684386],[-133.688735,56.837741],[-133.869474,56.843218],[-133.907813,56.930849]]],[[[-134.115936,56.48174],[-134.25286,56.558417],[-134.400737,56.722725],[-134.417168,56.848695],[-134.296675,56.908941],[-134.170706,56.848695],[-134.143321,56.952757],[-133.748981,56.772017],[-133.710643,56.596755],[-133.847566,56.574848],[-133.935197,56.377678],[-133.836612,56.322908],[-133.957105,56.092877],[-134.110459,56.142169],[-134.132367,55.999769],[-134.230952,56.070969],[-134.291198,56.350293],[-134.115936,56.48174]]],[[[-134.636246,56.28457],[-134.669107,56.169554],[-134.806031,56.235277],[-135.178463,56.67891],[-135.413971,56.810356],[-135.331817,56.914418],[-135.424925,57.166357],[-135.687818,57.369004],[-135.419448,57.566174],[-135.298955,57.48402],[-135.063447,57.418296],[-134.849846,57.407343],[-134.844369,57.248511],[-134.636246,56.728202],[-134.636246,56.28457]]],[[[-134.712923,58.223407],[-134.373353,58.14673],[-134.176183,58.157683],[-134.187137,58.081006],[-133.902336,57.807159],[-134.099505,57.850975],[-134.148798,57.757867],[-133.935197,57.615466],[-133.869474,57.363527],[-134.083075,57.297804],[-134.154275,57.210173],[-134.499322,57.029434],[-134.603384,57.034911],[-134.6472,57.226604],[-134.575999,57.341619],[-134.608861,57.511404],[-134.729354,57.719528],[-134.707446,57.829067],[-134.784123,58.097437],[-134.91557,58.212453],[-134.953908,58.409623],[-134.712923,58.223407]]],[[[-135.857603,57.330665],[-135.715203,57.330665],[-135.567326,57.149926],[-135.633049,57.023957],[-135.857603,56.996572],[-135.824742,57.193742],[-135.857603,57.330665]]],[[[-136.279328,58.206976],[-135.978096,58.201499],[-135.780926,58.28913],[-135.496125,58.168637],[-135.64948,58.037191],[-135.59471,57.987898],[-135.45231,58.135776],[-135.107263,58.086483],[-134.91557,57.976944],[-135.025108,57.779775],[-134.937477,57.763344],[-134.822462,57.500451],[-135.085355,57.462112],[-135.572802,57.675713],[-135.556372,57.456635],[-135.709726,57.369004],[-135.890465,57.407343],[-136.000004,57.544266],[-136.208128,57.637374],[-136.366959,57.829067],[-136.569606,57.916698],[-136.558652,58.075529],[-136.421728,58.130299],[-136.377913,58.267222],[-136.279328,58.206976]]],[[[-147.079854,60.200582],[-147.501579,59.948643],[-147.53444,59.850058],[-147.874011,59.784335],[-147.80281,59.937689],[-147.435855,60.09652],[-147.205824,60.271782],[-147.079854,60.200582]]],[[[-147.561825,60.578491],[-147.616594,60.370367],[-147.758995,60.156767],[-147.956165,60.227967],[-147.791856,60.474429],[-147.561825,60.578491]]],[[[-147.786379,70.245291],[-147.682318,70.201475],[-147.162008,70.15766],[-146.888161,70.185044],[-146.510252,70.185044],[-146.099482,70.146706],[-145.858496,70.168614],[-145.622988,70.08646],[-145.195787,69.993352],[-144.620708,69.971444],[-144.461877,70.026213],[-144.078491,70.059075],[-143.914183,70.130275],[-143.497935,70.141229],[-143.503412,70.091936],[-143.25695,70.119321],[-142.747594,70.042644],[-142.402547,69.916674],[-142.079408,69.856428],[-142.008207,69.801659],[-141.712453,69.790705],[-141.433129,69.697597],[-141.378359,69.63735],[-141.208574,69.686643],[-141.00045,69.648304],[-141.00045,60.304644],[-140.53491,60.22249],[-140.474664,60.310121],[-139.987216,60.184151],[-139.696939,60.342983],[-139.088998,60.359413],[-139.198537,60.091043],[-139.045183,59.997935],[-138.700135,59.910304],[-138.623458,59.767904],[-137.604747,59.242118],[-137.445916,58.908024],[-137.265177,59.001132],[-136.827022,59.159963],[-136.580559,59.16544],[-136.465544,59.285933],[-136.476498,59.466672],[-136.301236,59.466672],[-136.25742,59.625503],[-135.945234,59.663842],[-135.479694,59.800766],[-135.025108,59.565257],[-135.068924,59.422857],[-134.959385,59.280456],[-134.701969,59.247595],[-134.378829,59.033994],[-134.400737,58.973748],[-134.25286,58.858732],[-133.842089,58.727285],[-133.173903,58.152206],[-133.075318,57.998852],[-132.867194,57.845498],[-132.560485,57.505928],[-132.253777,57.21565],[-132.368792,57.095157],[-132.05113,57.051341],[-132.127807,56.876079],[-131.870391,56.804879],[-131.837529,56.602232],[-131.580113,56.613186],[-131.087188,56.405062],[-130.78048,56.366724],[-130.621648,56.268139],[-130.468294,56.240754],[-130.424478,56.142169],[-130.101339,56.114785],[-130.002754,55.994292],[-130.150631,55.769737],[-130.128724,55.583521],[-129.986323,55.276813],[-130.095862,55.200136],[-130.336847,54.920812],[-130.687372,54.718165],[-130.785957,54.822227],[-130.917403,54.789365],[-131.010511,54.997489],[-130.983126,55.08512],[-131.092665,55.189182],[-130.862634,55.298721],[-130.928357,55.337059],[-131.158389,55.200136],[-131.284358,55.287767],[-131.426759,55.238474],[-131.843006,55.457552],[-131.700606,55.698537],[-131.963499,55.616383],[-131.974453,55.49589],[-132.182576,55.588998],[-132.226392,55.704014],[-132.083991,55.829984],[-132.127807,55.955953],[-132.324977,55.851892],[-132.522147,56.076446],[-132.642639,56.032631],[-132.719317,56.218847],[-132.527624,56.339339],[-132.341408,56.339339],[-132.396177,56.487217],[-132.297592,56.67891],[-132.450946,56.673433],[-132.768609,56.837741],[-132.993164,57.034911],[-133.51895,57.177311],[-133.507996,57.577128],[-133.677781,57.62642],[-133.639442,57.790728],[-133.814705,57.834544],[-134.072121,58.053622],[-134.143321,58.168637],[-134.586953,58.206976],[-135.074401,58.502731],[-135.282525,59.192825],[-135.38111,59.033994],[-135.337294,58.891593],[-135.140124,58.617746],[-135.189417,58.573931],[-135.05797,58.349376],[-135.085355,58.201499],[-135.277048,58.234361],[-135.430402,58.398669],[-135.633049,58.426053],[-135.91785,58.382238],[-135.912373,58.617746],[-136.087635,58.814916],[-136.246466,58.75467],[-136.876314,58.962794],[-136.931084,58.902547],[-136.586036,58.836824],[-136.317666,58.672516],[-136.213604,58.667039],[-136.180743,58.535592],[-136.043819,58.382238],[-136.388867,58.294607],[-136.591513,58.349376],[-136.59699,58.212453],[-136.859883,58.316515],[-136.947514,58.393192],[-137.111823,58.393192],[-137.566409,58.590362],[-137.900502,58.765624],[-137.933364,58.869686],[-138.11958,59.02304],[-138.634412,59.132579],[-138.919213,59.247595],[-139.417615,59.379041],[-139.746231,59.505011],[-139.718846,59.641934],[-139.625738,59.598119],[-139.5162,59.68575],[-139.625738,59.88292],[-139.488815,59.992458],[-139.554538,60.041751],[-139.801,59.833627],[-140.315833,59.696704],[-140.92925,59.745996],[-141.444083,59.871966],[-141.46599,59.970551],[-141.706976,59.948643],[-141.964392,60.019843],[-142.539471,60.085566],[-142.873564,60.091043],[-143.623905,60.036274],[-143.892275,59.997935],[-144.231845,60.140336],[-144.65357,60.206059],[-144.785016,60.29369],[-144.834309,60.441568],[-145.124586,60.430614],[-145.223171,60.299167],[-145.738004,60.474429],[-145.820158,60.551106],[-146.351421,60.408706],[-146.608837,60.238921],[-146.718376,60.397752],[-146.608837,60.485383],[-146.455483,60.463475],[-145.951604,60.578491],[-146.017328,60.666122],[-146.252836,60.622307],[-146.345944,60.737322],[-146.565022,60.753753],[-146.784099,61.044031],[-146.866253,60.972831],[-147.172962,60.934492],[-147.271547,60.972831],[-147.375609,60.879723],[-147.758995,60.912584],[-147.775426,60.808523],[-148.032842,60.781138],[-148.153334,60.819476],[-148.065703,61.005692],[-148.175242,61.000215],[-148.350504,60.803046],[-148.109519,60.737322],[-148.087611,60.594922],[-147.939734,60.441568],[-148.027365,60.277259],[-148.219058,60.332029],[-148.273827,60.249875],[-148.087611,60.217013],[-147.983549,59.997935],[-148.251919,59.95412],[-148.399797,59.997935],[-148.635305,59.937689],[-148.755798,59.986981],[-149.067984,59.981505],[-149.05703,60.063659],[-149.204907,60.008889],[-149.287061,59.904827],[-149.418508,59.997935],[-149.582816,59.866489],[-149.511616,59.806242],[-149.741647,59.729565],[-149.949771,59.718611],[-150.031925,59.61455],[-150.25648,59.521442],[-150.409834,59.554303],[-150.579619,59.444764],[-150.716543,59.450241],[-151.001343,59.225687],[-151.308052,59.209256],[-151.406637,59.280456],[-151.592853,59.159963],[-151.976239,59.253071],[-151.888608,59.422857],[-151.636669,59.483103],[-151.47236,59.472149],[-151.423068,59.537872],[-151.127313,59.669319],[-151.116359,59.778858],[-151.505222,59.63098],[-151.828361,59.718611],[-151.8667,59.778858],[-151.702392,60.030797],[-151.423068,60.211536],[-151.379252,60.359413],[-151.297098,60.386798],[-151.264237,60.545629],[-151.406637,60.720892],[-151.06159,60.786615],[-150.404357,61.038554],[-150.245526,60.939969],[-150.042879,60.912584],[-149.741647,61.016646],[-150.075741,61.15357],[-150.207187,61.257632],[-150.47008,61.246678],[-150.656296,61.29597],[-150.711066,61.252155],[-151.023251,61.180954],[-151.165652,61.044031],[-151.477837,61.011169],[-151.800977,60.852338],[-151.833838,60.748276],[-152.080301,60.693507],[-152.13507,60.578491],[-152.310332,60.507291],[-152.392486,60.304644],[-152.732057,60.173197],[-152.567748,60.069136],[-152.704672,59.915781],[-153.022334,59.888397],[-153.049719,59.691227],[-153.345474,59.620026],[-153.438582,59.702181],[-153.586459,59.548826],[-153.761721,59.543349],[-153.72886,59.433811],[-154.117723,59.368087],[-154.1944,59.066856],[-153.750768,59.050425],[-153.400243,58.968271],[-153.301658,58.869686],[-153.444059,58.710854],[-153.679567,58.612269],[-153.898645,58.606793],[-153.920553,58.519161],[-154.062953,58.4863],[-153.99723,58.376761],[-154.145107,58.212453],[-154.46277,58.059098],[-154.643509,58.059098],[-154.818771,58.004329],[-154.988556,58.015283],[-155.120003,57.955037],[-155.081664,57.872883],[-155.328126,57.829067],[-155.377419,57.708574],[-155.547204,57.785251],[-155.73342,57.549743],[-156.045606,57.566174],[-156.023698,57.440204],[-156.209914,57.473066],[-156.34136,57.418296],[-156.34136,57.248511],[-156.549484,56.985618],[-156.883577,56.952757],[-157.157424,56.832264],[-157.20124,56.766541],[-157.376502,56.859649],[-157.672257,56.607709],[-157.754411,56.67891],[-157.918719,56.657002],[-157.957058,56.514601],[-158.126843,56.459832],[-158.32949,56.48174],[-158.488321,56.339339],[-158.208997,56.295524],[-158.510229,55.977861],[-159.375585,55.873799],[-159.616571,55.594475],[-159.676817,55.654722],[-159.643955,55.829984],[-159.813741,55.857368],[-160.027341,55.791645],[-160.060203,55.720445],[-160.394296,55.605429],[-160.536697,55.473983],[-160.580512,55.567091],[-160.668143,55.457552],[-160.865313,55.528752],[-161.232268,55.358967],[-161.506115,55.364444],[-161.467776,55.49589],[-161.588269,55.62186],[-161.697808,55.517798],[-161.686854,55.408259],[-162.053809,55.074166],[-162.179779,55.15632],[-162.218117,55.03035],[-162.470057,55.052258],[-162.508395,55.249428],[-162.661749,55.293244],[-162.716519,55.222043],[-162.579595,55.134412],[-162.645319,54.997489],[-162.847965,54.926289],[-163.00132,55.079643],[-163.187536,55.090597],[-163.220397,55.03035],[-163.034181,54.942719],[-163.373752,54.800319],[-163.14372,54.76198],[-163.138243,54.696257],[-163.329936,54.74555],[-163.587352,54.614103],[-164.085754,54.61958],[-164.332216,54.531949],[-164.354124,54.466226],[-164.638925,54.389548],[-164.847049,54.416933],[-164.918249,54.603149],[-164.710125,54.663395],[-164.551294,54.88795],[-164.34317,54.893427],[-163.894061,55.041304],[-163.532583,55.046781],[-163.39566,54.904381],[-163.291598,55.008443],[-163.313505,55.128935],[-163.105382,55.183705],[-162.880827,55.183705],[-162.579595,55.446598],[-162.245502,55.682106],[-161.807347,55.89023],[-161.292514,55.983338],[-161.078914,55.939523],[-160.87079,55.999769],[-160.816021,55.912138],[-160.931036,55.813553],[-160.805067,55.736876],[-160.766728,55.857368],[-160.509312,55.868322],[-160.438112,55.791645],[-160.27928,55.76426],[-160.273803,55.857368],[-160.536697,55.939523],[-160.558604,55.994292],[-160.383342,56.251708],[-160.147834,56.399586],[-159.830171,56.541986],[-159.326293,56.667956],[-158.959338,56.848695],[-158.784076,56.782971],[-158.641675,56.810356],[-158.701922,56.925372],[-158.658106,57.034911],[-158.378782,57.264942],[-157.995396,57.41282],[-157.688688,57.609989],[-157.705118,57.719528],[-157.458656,58.497254],[-157.07527,58.705377],[-157.119086,58.869686],[-158.039212,58.634177],[-158.32949,58.661562],[-158.40069,58.760147],[-158.564998,58.803962],[-158.619768,58.913501],[-158.767645,58.864209],[-158.860753,58.694424],[-158.701922,58.480823],[-158.893615,58.387715],[-159.0634,58.420577],[-159.392016,58.760147],[-159.616571,58.929932],[-159.731586,58.929932],[-159.808264,58.803962],[-159.906848,58.782055],[-160.054726,58.886116],[-160.235465,58.902547],[-160.317619,59.072332],[-160.854359,58.88064],[-161.33633,58.743716],[-161.374669,58.667039],[-161.752577,58.552023],[-161.938793,58.656085],[-161.769008,58.776578],[-161.829255,59.061379],[-161.955224,59.36261],[-161.703285,59.48858],[-161.911409,59.740519],[-162.092148,59.88292],[-162.234548,60.091043],[-162.448149,60.178674],[-162.502918,59.997935],[-162.760334,59.959597],[-163.171105,59.844581],[-163.66403,59.795289],[-163.9324,59.806242],[-164.162431,59.866489],[-164.189816,60.02532],[-164.386986,60.074613],[-164.699171,60.29369],[-164.962064,60.337506],[-165.268773,60.578491],[-165.060649,60.68803],[-165.016834,60.890677],[-165.175665,60.846861],[-165.197573,60.972831],[-165.120896,61.076893],[-165.323543,61.170001],[-165.34545,61.071416],[-165.591913,61.109754],[-165.624774,61.279539],[-165.816467,61.301447],[-165.920529,61.416463],[-165.915052,61.558863],[-166.106745,61.49314],[-166.139607,61.630064],[-165.904098,61.662925],[-166.095791,61.81628],[-165.756221,61.827233],[-165.756221,62.013449],[-165.674067,62.139419],[-165.044219,62.539236],[-164.912772,62.659728],[-164.819664,62.637821],[-164.874433,62.807606],[-164.633448,63.097884],[-164.425324,63.212899],[-164.036462,63.262192],[-163.73523,63.212899],[-163.313505,63.037637],[-163.039658,63.059545],[-162.661749,63.22933],[-162.272887,63.486746],[-162.075717,63.514131],[-162.026424,63.448408],[-161.555408,63.448408],[-161.13916,63.503177],[-160.766728,63.771547],[-160.766728,63.837271],[-160.952944,64.08921],[-160.974852,64.237087],[-161.26513,64.395918],[-161.374669,64.532842],[-161.078914,64.494503],[-160.79959,64.609519],[-160.783159,64.719058],[-161.144637,64.921705],[-161.413007,64.762873],[-161.664946,64.790258],[-161.900455,64.702627],[-162.168825,64.680719],[-162.234548,64.620473],[-162.541257,64.532842],[-162.634365,64.384965],[-162.787719,64.324718],[-162.858919,64.49998],[-163.045135,64.538319],[-163.176582,64.401395],[-163.253259,64.467119],[-163.598306,64.565704],[-164.304832,64.560227],[-164.80871,64.450688],[-165.000403,64.434257],[-165.411174,64.49998],[-166.188899,64.576658],[-166.391546,64.636904],[-166.484654,64.735489],[-166.413454,64.872412],[-166.692778,64.987428],[-166.638008,65.113398],[-166.462746,65.179121],[-166.517516,65.337952],[-166.796839,65.337952],[-167.026871,65.381768],[-167.47598,65.414629],[-167.711489,65.496784],[-168.072967,65.578938],[-168.105828,65.682999],[-167.541703,65.819923],[-166.829701,66.049954],[-166.3313,66.186878],[-166.046499,66.110201],[-165.756221,66.09377],[-165.690498,66.203309],[-165.86576,66.21974],[-165.88219,66.312848],[-165.186619,66.466202],[-164.403417,66.581218],[-163.981692,66.592172],[-163.751661,66.553833],[-163.872153,66.389525],[-163.828338,66.274509],[-163.915969,66.192355],[-163.768091,66.060908],[-163.494244,66.082816],[-163.149197,66.060908],[-162.749381,66.088293],[-162.634365,66.039001],[-162.371472,66.028047],[-162.14144,66.077339],[-161.840208,66.02257],[-161.549931,66.241647],[-161.341807,66.252601],[-161.199406,66.208786],[-161.128206,66.334755],[-161.528023,66.395002],[-161.911409,66.345709],[-161.87307,66.510017],[-162.174302,66.68528],[-162.502918,66.740049],[-162.601503,66.89888],[-162.344087,66.937219],[-162.015471,66.778388],[-162.075717,66.652418],[-161.916886,66.553833],[-161.571838,66.438817],[-161.489684,66.55931],[-161.884024,66.718141],[-161.714239,67.002942],[-161.851162,67.052235],[-162.240025,66.991988],[-162.639842,67.008419],[-162.700088,67.057712],[-162.902735,67.008419],[-163.740707,67.128912],[-163.757138,67.254881],[-164.009077,67.534205],[-164.211724,67.638267],[-164.534863,67.725898],[-165.192096,67.966884],[-165.493328,68.059992],[-165.794559,68.081899],[-166.243668,68.246208],[-166.681824,68.339316],[-166.703731,68.372177],[-166.375115,68.42147],[-166.227238,68.574824],[-166.216284,68.881533],[-165.329019,68.859625],[-164.255539,68.930825],[-163.976215,68.985595],[-163.532583,69.138949],[-163.110859,69.374457],[-163.023228,69.609966],[-162.842489,69.812613],[-162.470057,69.982398],[-162.311225,70.108367],[-161.851162,70.311014],[-161.779962,70.256245],[-161.396576,70.239814],[-160.837928,70.343876],[-160.487404,70.453415],[-159.649432,70.792985],[-159.33177,70.809416],[-159.298908,70.760123],[-158.975769,70.798462],[-158.658106,70.787508],[-158.033735,70.831323],[-157.420318,70.979201],[-156.812377,71.285909],[-156.565915,71.351633],[-156.522099,71.296863],[-155.585543,71.170894],[-155.508865,71.083263],[-155.832005,70.968247],[-155.979882,70.96277],[-155.974405,70.809416],[-155.503388,70.858708],[-155.476004,70.940862],[-155.262403,71.017539],[-155.191203,70.973724],[-155.032372,71.148986],[-154.566832,70.990155],[-154.643509,70.869662],[-154.353231,70.8368],[-154.183446,70.7656],[-153.931507,70.880616],[-153.487874,70.886093],[-153.235935,70.924431],[-152.589656,70.886093],[-152.26104,70.842277],[-152.419871,70.606769],[-151.817408,70.546523],[-151.773592,70.486276],[-151.187559,70.382214],[-151.182082,70.431507],[-150.760358,70.49723],[-150.355064,70.491753],[-150.349588,70.436984],[-150.114079,70.431507],[-149.867617,70.508184],[-149.462323,70.519138],[-149.177522,70.486276],[-148.78866,70.404122],[-148.607921,70.420553],[-148.350504,70.305537],[-148.202627,70.349353],[-147.961642,70.316491],[-147.786379,70.245291]]],[[[-152.94018,58.026237],[-152.945657,57.982421],[-153.290705,58.048145],[-153.044242,58.305561],[-152.819688,58.327469],[-152.666333,58.562977],[-152.496548,58.354853],[-152.354148,58.426053],[-152.080301,58.311038],[-152.080301,58.152206],[-152.480117,58.130299],[-152.655379,58.059098],[-152.94018,58.026237]]],[[[-153.958891,57.538789],[-153.67409,57.670236],[-153.931507,57.69762],[-153.936983,57.812636],[-153.723383,57.889313],[-153.570028,57.834544],[-153.548121,57.719528],[-153.46049,57.796205],[-153.455013,57.96599],[-153.268797,57.889313],[-153.235935,57.998852],[-153.071627,57.933129],[-152.874457,57.933129],[-152.721103,57.993375],[-152.469163,57.889313],[-152.469163,57.599035],[-152.151501,57.620943],[-152.359625,57.42925],[-152.74301,57.505928],[-152.60061,57.379958],[-152.710149,57.275896],[-152.907319,57.325188],[-152.912796,57.128019],[-153.214027,57.073249],[-153.312612,56.991095],[-153.498828,57.067772],[-153.695998,56.859649],[-153.849352,56.837741],[-154.013661,56.744633],[-154.073907,56.969187],[-154.303938,56.848695],[-154.314892,56.919895],[-154.523016,56.991095],[-154.539447,57.193742],[-154.742094,57.275896],[-154.627078,57.511404],[-154.227261,57.659282],[-153.980799,57.648328],[-153.958891,57.538789]]],[[[-154.53397,56.602232],[-154.742094,56.399586],[-154.807817,56.432447],[-154.53397,56.602232]]],[[[-155.634835,55.923092],[-155.476004,55.912138],[-155.530773,55.704014],[-155.793666,55.731399],[-155.837482,55.802599],[-155.634835,55.923092]]],[[[-159.890418,55.28229],[-159.950664,55.068689],[-160.257373,54.893427],[-160.109495,55.161797],[-160.005433,55.134412],[-159.890418,55.28229]]],[[[-160.520266,55.358967],[-160.33405,55.358967],[-160.339527,55.249428],[-160.525743,55.128935],[-160.690051,55.211089],[-160.794113,55.134412],[-160.854359,55.320628],[-160.79959,55.380875],[-160.520266,55.358967]]],[[[-162.256456,54.981058],[-162.234548,54.893427],[-162.349564,54.838658],[-162.437195,54.931766],[-162.256456,54.981058]]],[[[-162.415287,63.634624],[-162.563165,63.536039],[-162.612457,63.62367],[-162.415287,63.634624]]],[[[-162.80415,54.488133],[-162.590549,54.449795],[-162.612457,54.367641],[-162.782242,54.373118],[-162.80415,54.488133]]],[[[-165.548097,54.29644],[-165.476897,54.181425],[-165.630251,54.132132],[-165.685021,54.252625],[-165.548097,54.29644]]],[[[-165.73979,54.15404],[-166.046499,54.044501],[-166.112222,54.121178],[-165.980775,54.219763],[-165.73979,54.15404]]],[[[-166.364161,60.359413],[-166.13413,60.397752],[-166.084837,60.326552],[-165.88219,60.342983],[-165.685021,60.277259],[-165.646682,59.992458],[-165.750744,59.89935],[-166.00816,59.844581],[-166.062929,59.745996],[-166.440838,59.855535],[-166.6161,59.850058],[-166.994009,59.992458],[-167.125456,59.992458],[-167.344534,60.074613],[-167.421211,60.206059],[-167.311672,60.238921],[-166.93924,60.206059],[-166.763978,60.310121],[-166.577762,60.321075],[-166.495608,60.392275],[-166.364161,60.359413]]],[[[-166.375115,54.01164],[-166.210807,53.934962],[-166.5449,53.748746],[-166.539423,53.715885],[-166.117699,53.852808],[-166.112222,53.776131],[-166.282007,53.683023],[-166.555854,53.622777],[-166.583239,53.529669],[-166.878994,53.431084],[-167.13641,53.425607],[-167.306195,53.332499],[-167.623857,53.250345],[-167.793643,53.337976],[-167.459549,53.442038],[-167.355487,53.425607],[-167.103548,53.513238],[-167.163794,53.611823],[-167.021394,53.715885],[-166.807793,53.666592],[-166.785886,53.732316],[-167.015917,53.754223],[-167.141887,53.825424],[-167.032348,53.945916],[-166.643485,54.017116],[-166.561331,53.880193],[-166.375115,54.01164]]],[[[-168.790446,53.157237],[-168.40706,53.34893],[-168.385152,53.431084],[-168.237275,53.524192],[-168.007243,53.568007],[-167.886751,53.518715],[-167.842935,53.387268],[-168.270136,53.244868],[-168.500168,53.036744],[-168.686384,52.965544],[-168.790446,53.157237]]],[[[-169.74891,52.894344],[-169.705095,52.795759],[-169.962511,52.790282],[-169.989896,52.856005],[-169.74891,52.894344]]],[[[-170.148727,57.221127],[-170.28565,57.128019],[-170.313035,57.221127],[-170.148727,57.221127]]],[[[-170.669036,52.697174],[-170.603313,52.604066],[-170.789529,52.538343],[-170.816914,52.636928],[-170.669036,52.697174]]],[[[-171.742517,63.716778],[-170.94836,63.5689],[-170.488297,63.69487],[-170.280174,63.683916],[-170.093958,63.612716],[-170.044665,63.492223],[-169.644848,63.4265],[-169.518879,63.366254],[-168.99857,63.338869],[-168.686384,63.295053],[-168.856169,63.147176],[-169.108108,63.180038],[-169.376478,63.152653],[-169.513402,63.08693],[-169.639372,62.939052],[-169.831064,63.075976],[-170.055619,63.169084],[-170.263743,63.180038],[-170.362328,63.2841],[-170.866206,63.415546],[-171.101715,63.421023],[-171.463193,63.306007],[-171.73704,63.366254],[-171.852055,63.486746],[-171.742517,63.716778]]],[[[-172.432611,52.390465],[-172.41618,52.275449],[-172.607873,52.253542],[-172.569535,52.352127],[-172.432611,52.390465]]],[[[-173.626584,52.14948],[-173.495138,52.105664],[-173.122706,52.111141],[-173.106275,52.07828],[-173.549907,52.028987],[-173.626584,52.14948]]],[[[-174.322156,52.280926],[-174.327632,52.379511],[-174.185232,52.41785],[-173.982585,52.319265],[-174.059262,52.226157],[-174.179755,52.231634],[-174.141417,52.127572],[-174.333109,52.116618],[-174.738403,52.007079],[-174.968435,52.039941],[-174.902711,52.116618],[-174.656249,52.105664],[-174.322156,52.280926]]],[[[-176.469116,51.853725],[-176.288377,51.870156],[-176.288377,51.744186],[-176.518409,51.760617],[-176.80321,51.61274],[-176.912748,51.80991],[-176.792256,51.815386],[-176.775825,51.963264],[-176.627947,51.968741],[-176.627947,51.859202],[-176.469116,51.853725]]],[[[-177.153734,51.946833],[-177.044195,51.897541],[-177.120872,51.727755],[-177.274226,51.678463],[-177.279703,51.782525],[-177.153734,51.946833]]],[[[-178.123152,51.919448],[-177.953367,51.913971],[-177.800013,51.793479],[-177.964321,51.651078],[-178.123152,51.919448]]],[[[173.107557,52.992929],[173.293773,52.927205],[173.304726,52.823143],[172.90491,52.762897],[172.642017,52.927205],[172.642017,53.003883],[173.107557,52.992929]]]]}},
+{"type":"Feature","id":"04","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.042503,37.000263],[-109.04798,31.331629],[-111.074448,31.331629],[-112.246513,31.704061],[-114.815198,32.492741],[-114.72209,32.717295],[-114.524921,32.755634],[-114.470151,32.843265],[-114.524921,33.029481],[-114.661844,33.034958],[-114.727567,33.40739],[-114.524921,33.54979],[-114.497536,33.697668],[-114.535874,33.933176],[-114.415382,34.108438],[-114.256551,34.174162],[-114.136058,34.305608],[-114.333228,34.448009],[-114.470151,34.710902],[-114.634459,34.87521],[-114.634459,35.00118],[-114.574213,35.138103],[-114.596121,35.324319],[-114.678275,35.516012],[-114.738521,36.102045],[-114.371566,36.140383],[-114.251074,36.01989],[-114.152489,36.025367],[-114.048427,36.195153],[-114.048427,37.000263],[-110.499369,37.00574],[-109.042503,37.000263]]]}},
+{"type":"Feature","id":"05","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-94.473842,36.501861],[-90.152536,36.496384],[-90.064905,36.304691],[-90.218259,36.184199],[-90.377091,35.997983],[-89.730812,35.997983],[-89.763673,35.811767],[-89.911551,35.756997],[-89.944412,35.603643],[-90.130628,35.439335],[-90.114197,35.198349],[-90.212782,35.023087],[-90.311367,34.995703],[-90.251121,34.908072],[-90.409952,34.831394],[-90.481152,34.661609],[-90.585214,34.617794],[-90.568783,34.420624],[-90.749522,34.365854],[-90.744046,34.300131],[-90.952169,34.135823],[-90.891923,34.026284],[-91.072662,33.867453],[-91.231493,33.560744],[-91.056231,33.429298],[-91.143862,33.347144],[-91.089093,33.13902],[-91.16577,33.002096],[-93.608485,33.018527],[-94.041164,33.018527],[-94.041164,33.54979],[-94.183564,33.593606],[-94.380734,33.544313],[-94.484796,33.637421],[-94.430026,35.395519],[-94.616242,36.501861],[-94.473842,36.501861]]]}},
+{"type":"Feature","id":"06","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.233256,42.006186],[-122.378853,42.011663],[-121.037003,41.995232],[-120.001861,41.995232],[-119.996384,40.264519],[-120.001861,38.999346],[-118.71478,38.101128],[-117.498899,37.21934],[-116.540435,36.501861],[-115.85034,35.970598],[-114.634459,35.00118],[-114.634459,34.87521],[-114.470151,34.710902],[-114.333228,34.448009],[-114.136058,34.305608],[-114.256551,34.174162],[-114.415382,34.108438],[-114.535874,33.933176],[-114.497536,33.697668],[-114.524921,33.54979],[-114.727567,33.40739],[-114.661844,33.034958],[-114.524921,33.029481],[-114.470151,32.843265],[-114.524921,32.755634],[-114.72209,32.717295],[-116.04751,32.624187],[-117.126467,32.536556],[-117.24696,32.668003],[-117.252437,32.876127],[-117.329114,33.122589],[-117.471515,33.297851],[-117.7837,33.538836],[-118.183517,33.763391],[-118.260194,33.703145],[-118.413548,33.741483],[-118.391641,33.840068],[-118.566903,34.042715],[-118.802411,33.998899],[-119.218659,34.146777],[-119.278905,34.26727],[-119.558229,34.415147],[-119.875891,34.40967],[-120.138784,34.475393],[-120.472878,34.448009],[-120.64814,34.579455],[-120.609801,34.858779],[-120.670048,34.902595],[-120.631709,35.099764],[-120.894602,35.247642],[-120.905556,35.450289],[-121.004141,35.461243],[-121.168449,35.636505],[-121.283465,35.674843],[-121.332757,35.784382],[-121.716143,36.195153],[-121.896882,36.315645],[-121.935221,36.638785],[-121.858544,36.6114],[-121.787344,36.803093],[-121.929744,36.978355],[-122.105006,36.956447],[-122.335038,37.115279],[-122.417192,37.241248],[-122.400761,37.361741],[-122.515777,37.520572],[-122.515777,37.783465],[-122.329561,37.783465],[-122.406238,38.15042],[-122.488392,38.112082],[-122.504823,37.931343],[-122.701993,37.893004],[-122.937501,38.029928],[-122.97584,38.265436],[-123.129194,38.451652],[-123.331841,38.566668],[-123.44138,38.698114],[-123.737134,38.95553],[-123.687842,39.032208],[-123.824765,39.366301],[-123.764519,39.552517],[-123.85215,39.831841],[-124.109566,40.105688],[-124.361506,40.259042],[-124.410798,40.439781],[-124.158859,40.877937],[-124.109566,41.025814],[-124.158859,41.14083],[-124.065751,41.442061],[-124.147905,41.715908],[-124.257444,41.781632],[-124.213628,42.000709],[-123.233256,42.006186]]]}},
+{"type":"Feature","id":"08","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.919731,41.003906],[-105.728954,40.998429],[-104.053011,41.003906],[-102.053927,41.003906],[-102.053927,40.001626],[-102.042974,36.994786],[-103.001438,37.000263],[-104.337812,36.994786],[-106.868158,36.994786],[-107.421329,37.000263],[-109.042503,37.000263],[-109.042503,38.166851],[-109.058934,38.27639],[-109.053457,39.125316],[-109.04798,40.998429],[-107.919731,41.003906]]]}},
+{"type":"Feature","id":"09","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.053528,42.039048],[-71.799309,42.022617],[-71.799309,42.006186],[-71.799309,41.414677],[-71.859555,41.321569],[-71.947186,41.338],[-72.385341,41.261322],[-72.905651,41.28323],[-73.130205,41.146307],[-73.371191,41.102491],[-73.655992,40.987475],[-73.727192,41.102491],[-73.48073,41.21203],[-73.55193,41.294184],[-73.486206,42.050002],[-73.053528,42.039048]]]}},
+{"type":"Feature","id":"10","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-75.414089,39.804456],[-75.507197,39.683964],[-75.611259,39.61824],[-75.589352,39.459409],[-75.441474,39.311532],[-75.403136,39.065069],[-75.189535,38.807653],[-75.09095,38.796699],[-75.047134,38.451652],[-75.693413,38.462606],[-75.786521,39.722302],[-75.616736,39.831841],[-75.414089,39.804456]]]}},
+{"type":"Feature","id":"11","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-77.035264,38.993869],[-76.909294,38.895284],[-77.040741,38.791222],[-77.117418,38.933623],[-77.035264,38.993869]]]}},
+{"type":"Feature","id":"12","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.497137,30.997536],[-85.004212,31.003013],[-84.867289,30.712735],[-83.498053,30.647012],[-82.216449,30.570335],[-82.167157,30.356734],[-82.046664,30.362211],[-82.002849,30.564858],[-82.041187,30.751074],[-81.948079,30.827751],[-81.718048,30.745597],[-81.444201,30.707258],[-81.383954,30.27458],[-81.257985,29.787132],[-80.967707,29.14633],[-80.524075,28.461713],[-80.589798,28.41242],[-80.56789,28.094758],[-80.381674,27.738757],[-80.091397,27.021277],[-80.03115,26.796723],[-80.036627,26.566691],[-80.146166,25.739673],[-80.239274,25.723243],[-80.337859,25.465826],[-80.304997,25.383672],[-80.49669,25.197456],[-80.573367,25.241272],[-80.759583,25.164595],[-81.077246,25.120779],[-81.170354,25.224841],[-81.126538,25.378195],[-81.351093,25.821827],[-81.526355,25.903982],[-81.679709,25.843735],[-81.800202,26.090198],[-81.833064,26.292844],[-82.041187,26.517399],[-82.09048,26.665276],[-82.057618,26.878877],[-82.172634,26.917216],[-82.145249,26.791246],[-82.249311,26.758384],[-82.566974,27.300601],[-82.692943,27.437525],[-82.391711,27.837342],[-82.588881,27.815434],[-82.720328,27.689464],[-82.851774,27.886634],[-82.676512,28.434328],[-82.643651,28.888914],[-82.764143,28.998453],[-82.802482,29.14633],[-82.994175,29.179192],[-83.218729,29.420177],[-83.399469,29.518762],[-83.410422,29.66664],[-83.536392,29.721409],[-83.640454,29.885717],[-84.02384,30.104795],[-84.357933,30.055502],[-84.341502,29.902148],[-84.451041,29.929533],[-84.867289,29.743317],[-85.310921,29.699501],[-85.299967,29.80904],[-85.404029,29.940487],[-85.924338,30.236241],[-86.29677,30.362211],[-86.630863,30.395073],[-86.910187,30.373165],[-87.518128,30.280057],[-87.37025,30.427934],[-87.446927,30.510088],[-87.408589,30.674397],[-87.633143,30.86609],[-87.600282,30.997536],[-85.497137,30.997536]]]}},
+{"type":"Feature","id":"13","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.109191,35.00118],[-83.322791,34.787579],[-83.339222,34.683517],[-83.005129,34.469916],[-82.901067,34.486347],[-82.747713,34.26727],[-82.714851,34.152254],[-82.55602,33.94413],[-82.325988,33.81816],[-82.194542,33.631944],[-81.926172,33.462159],[-81.937125,33.347144],[-81.761863,33.160928],[-81.493493,33.007573],[-81.42777,32.843265],[-81.416816,32.629664],[-81.279893,32.558464],[-81.121061,32.290094],[-81.115584,32.120309],[-80.885553,32.032678],[-81.132015,31.693108],[-81.175831,31.517845],[-81.279893,31.364491],[-81.290846,31.20566],[-81.400385,31.13446],[-81.444201,30.707258],[-81.718048,30.745597],[-81.948079,30.827751],[-82.041187,30.751074],[-82.002849,30.564858],[-82.046664,30.362211],[-82.167157,30.356734],[-82.216449,30.570335],[-83.498053,30.647012],[-84.867289,30.712735],[-85.004212,31.003013],[-85.113751,31.27686],[-85.042551,31.539753],[-85.141136,31.840985],[-85.053504,32.01077],[-85.058981,32.13674],[-84.889196,32.262709],[-85.004212,32.322956],[-84.960397,32.421541],[-85.069935,32.580372],[-85.184951,32.859696],[-85.431413,34.124869],[-85.606675,34.984749],[-84.319594,34.990226],[-83.618546,34.984749],[-83.109191,35.00118]]]}},
+{"type":"Feature","id":"15","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-155.634835,18.948267],[-155.881297,19.035898],[-155.919636,19.123529],[-155.886774,19.348084],[-156.062036,19.73147],[-155.925113,19.857439],[-155.826528,20.032702],[-155.897728,20.147717],[-155.87582,20.26821],[-155.596496,20.12581],[-155.284311,20.021748],[-155.092618,19.868393],[-155.092618,19.736947],[-154.807817,19.523346],[-154.983079,19.348084],[-155.295265,19.26593],[-155.514342,19.134483],[-155.634835,18.948267]]],[[[-156.587823,21.029505],[-156.472807,20.892581],[-156.324929,20.952827],[-156.00179,20.793996],[-156.051082,20.651596],[-156.379699,20.580396],[-156.445422,20.60778],[-156.461853,20.783042],[-156.631638,20.821381],[-156.697361,20.919966],[-156.587823,21.029505]]],[[[-156.982162,21.210244],[-157.080747,21.106182],[-157.310779,21.106182],[-157.239579,21.221198],[-156.982162,21.210244]]],[[[-157.951581,21.697691],[-157.842042,21.462183],[-157.896811,21.325259],[-158.110412,21.303352],[-158.252813,21.582676],[-158.126843,21.588153],[-157.951581,21.697691]]],[[[-159.468693,22.228955],[-159.353678,22.218001],[-159.298908,22.113939],[-159.33177,21.966061],[-159.446786,21.872953],[-159.764448,21.987969],[-159.726109,22.152277],[-159.468693,22.228955]]]]}},
+{"type":"Feature","id":"16","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-116.04751,49.000239],[-116.04751,47.976051],[-115.724371,47.696727],[-115.718894,47.42288],[-115.527201,47.302388],[-115.324554,47.258572],[-115.302646,47.187372],[-114.930214,46.919002],[-114.886399,46.809463],[-114.623506,46.705401],[-114.612552,46.639678],[-114.322274,46.645155],[-114.464674,46.272723],[-114.492059,46.037214],[-114.387997,45.88386],[-114.568736,45.774321],[-114.497536,45.670259],[-114.546828,45.560721],[-114.333228,45.456659],[-114.086765,45.593582],[-113.98818,45.703121],[-113.807441,45.604536],[-113.834826,45.522382],[-113.736241,45.330689],[-113.571933,45.128042],[-113.45144,45.056842],[-113.456917,44.865149],[-113.341901,44.782995],[-113.133778,44.772041],[-113.002331,44.448902],[-112.887315,44.394132],[-112.783254,44.48724],[-112.471068,44.481763],[-112.241036,44.569394],[-112.104113,44.520102],[-111.868605,44.563917],[-111.819312,44.509148],[-111.616665,44.547487],[-111.386634,44.75561],[-111.227803,44.580348],[-111.047063,44.476286],[-111.047063,42.000709],[-112.164359,41.995232],[-114.04295,41.995232],[-117.027882,42.000709],[-117.027882,43.830007],[-116.896436,44.158624],[-116.97859,44.240778],[-117.170283,44.257209],[-117.241483,44.394132],[-117.038836,44.750133],[-116.934774,44.782995],[-116.830713,44.930872],[-116.847143,45.02398],[-116.732128,45.144473],[-116.671881,45.319735],[-116.463758,45.61549],[-116.545912,45.752413],[-116.78142,45.823614],[-116.918344,45.993399],[-116.92382,46.168661],[-117.055267,46.343923],[-117.038836,46.426077],[-117.044313,47.762451],[-117.033359,49.000239],[-116.04751,49.000239]]]}},
+{"type":"Feature","id":"17","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.639984,42.510065],[-88.788778,42.493634],[-87.802929,42.493634],[-87.83579,42.301941],[-87.682436,42.077386],[-87.523605,41.710431],[-87.529082,39.34987],[-87.63862,39.169131],[-87.512651,38.95553],[-87.49622,38.780268],[-87.62219,38.637868],[-87.655051,38.506421],[-87.83579,38.292821],[-87.950806,38.27639],[-87.923421,38.15042],[-88.000098,38.101128],[-88.060345,37.865619],[-88.027483,37.799896],[-88.15893,37.657496],[-88.065822,37.482234],[-88.476592,37.389126],[-88.514931,37.285064],[-88.421823,37.153617],[-88.547792,37.071463],[-88.914747,37.224817],[-89.029763,37.213863],[-89.183118,37.038601],[-89.133825,36.983832],[-89.292656,36.994786],[-89.517211,37.279587],[-89.435057,37.34531],[-89.517211,37.537003],[-89.517211,37.690357],[-89.84035,37.903958],[-89.949889,37.88205],[-90.059428,38.013497],[-90.355183,38.216144],[-90.349706,38.374975],[-90.179921,38.632391],[-90.207305,38.725499],[-90.10872,38.845992],[-90.251121,38.917192],[-90.470199,38.961007],[-90.585214,38.867899],[-90.661891,38.928146],[-90.727615,39.256762],[-91.061708,39.470363],[-91.368417,39.727779],[-91.494386,40.034488],[-91.50534,40.237135],[-91.417709,40.379535],[-91.401278,40.560274],[-91.121954,40.669813],[-91.09457,40.823167],[-90.963123,40.921752],[-90.946692,41.097014],[-91.111001,41.239415],[-91.045277,41.414677],[-90.656414,41.463969],[-90.344229,41.589939],[-90.311367,41.743293],[-90.179921,41.809016],[-90.141582,42.000709],[-90.168967,42.126679],[-90.393521,42.225264],[-90.420906,42.329326],[-90.639984,42.510065]]]}},
+{"type":"Feature","id":"18","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-85.990061,41.759724],[-84.807042,41.759724],[-84.807042,41.694001],[-84.801565,40.500028],[-84.817996,39.103408],[-84.894673,39.059592],[-84.812519,38.785745],[-84.987781,38.780268],[-85.173997,38.68716],[-85.431413,38.730976],[-85.42046,38.533806],[-85.590245,38.451652],[-85.655968,38.325682],[-85.83123,38.27639],[-85.924338,38.024451],[-86.039354,37.958727],[-86.263908,38.051835],[-86.302247,38.166851],[-86.521325,38.040881],[-86.504894,37.931343],[-86.729448,37.893004],[-86.795172,37.991589],[-87.047111,37.893004],[-87.129265,37.788942],[-87.381204,37.93682],[-87.512651,37.903958],[-87.600282,37.975158],[-87.682436,37.903958],[-87.934375,37.893004],[-88.027483,37.799896],[-88.060345,37.865619],[-88.000098,38.101128],[-87.923421,38.15042],[-87.950806,38.27639],[-87.83579,38.292821],[-87.655051,38.506421],[-87.62219,38.637868],[-87.49622,38.780268],[-87.512651,38.95553],[-87.63862,39.169131],[-87.529082,39.34987],[-87.523605,41.710431],[-87.42502,41.644708],[-87.118311,41.644708],[-86.822556,41.759724],[-85.990061,41.759724]]]}},
+{"type":"Feature","id":"19","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.368417,43.501391],[-91.215062,43.501391],[-91.204109,43.353514],[-91.056231,43.254929],[-91.176724,43.134436],[-91.143862,42.909881],[-91.067185,42.75105],[-90.711184,42.636034],[-90.639984,42.510065],[-90.420906,42.329326],[-90.393521,42.225264],[-90.168967,42.126679],[-90.141582,42.000709],[-90.179921,41.809016],[-90.311367,41.743293],[-90.344229,41.589939],[-90.656414,41.463969],[-91.045277,41.414677],[-91.111001,41.239415],[-90.946692,41.097014],[-90.963123,40.921752],[-91.09457,40.823167],[-91.121954,40.669813],[-91.401278,40.560274],[-91.417709,40.379535],[-91.527248,40.412397],[-91.729895,40.615043],[-91.833957,40.609566],[-93.257961,40.582182],[-94.632673,40.571228],[-95.7664,40.587659],[-95.881416,40.719105],[-95.826646,40.976521],[-95.925231,41.201076],[-95.919754,41.453015],[-96.095016,41.540646],[-96.122401,41.67757],[-96.062155,41.798063],[-96.127878,41.973325],[-96.264801,42.039048],[-96.44554,42.488157],[-96.631756,42.707235],[-96.544125,42.855112],[-96.511264,43.052282],[-96.434587,43.123482],[-96.560556,43.222067],[-96.527695,43.397329],[-96.582464,43.479483],[-96.451017,43.501391],[-91.368417,43.501391]]]}},
+{"type":"Feature","id":"20","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.90605,40.001626],[-95.306337,40.001626],[-95.207752,39.908518],[-94.884612,39.831841],[-95.109167,39.541563],[-94.983197,39.442978],[-94.824366,39.20747],[-94.610765,39.158177],[-94.616242,37.000263],[-100.087706,37.000263],[-102.042974,36.994786],[-102.053927,40.001626],[-101.90605,40.001626]]]}},
+{"type":"Feature","id":"21","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-83.903347,38.769315],[-83.678792,38.632391],[-83.519961,38.703591],[-83.142052,38.626914],[-83.032514,38.725499],[-82.890113,38.758361],[-82.846298,38.588575],[-82.731282,38.561191],[-82.594358,38.424267],[-82.621743,38.123036],[-82.50125,37.931343],[-82.342419,37.783465],[-82.293127,37.668449],[-82.101434,37.553434],[-81.969987,37.537003],[-82.353373,37.268633],[-82.720328,37.120755],[-82.720328,37.044078],[-82.868205,36.978355],[-82.879159,36.890724],[-83.070852,36.852385],[-83.136575,36.742847],[-83.673316,36.600446],[-83.689746,36.584015],[-84.544149,36.594969],[-85.289013,36.627831],[-85.486183,36.616877],[-86.592525,36.655216],[-87.852221,36.633308],[-88.071299,36.677123],[-88.054868,36.496384],[-89.298133,36.507338],[-89.418626,36.496384],[-89.363857,36.622354],[-89.215979,36.578538],[-89.133825,36.983832],[-89.183118,37.038601],[-89.029763,37.213863],[-88.914747,37.224817],[-88.547792,37.071463],[-88.421823,37.153617],[-88.514931,37.285064],[-88.476592,37.389126],[-88.065822,37.482234],[-88.15893,37.657496],[-88.027483,37.799896],[-87.934375,37.893004],[-87.682436,37.903958],[-87.600282,37.975158],[-87.512651,37.903958],[-87.381204,37.93682],[-87.129265,37.788942],[-87.047111,37.893004],[-86.795172,37.991589],[-86.729448,37.893004],[-86.504894,37.931343],[-86.521325,38.040881],[-86.302247,38.166851],[-86.263908,38.051835],[-86.039354,37.958727],[-85.924338,38.024451],[-85.83123,38.27639],[-85.655968,38.325682],[-85.590245,38.451652],[-85.42046,38.533806],[-85.431413,38.730976],[-85.173997,38.68716],[-84.987781,38.780268],[-84.812519,38.785745],[-84.894673,39.059592],[-84.817996,39.103408],[-84.43461,39.103408],[-84.231963,38.895284],[-84.215533,38.807653],[-83.903347,38.769315]]]}},
+{"type":"Feature","id":"22","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-93.608485,33.018527],[-91.16577,33.002096],[-91.072662,32.887081],[-91.143862,32.843265],[-91.154816,32.640618],[-91.006939,32.514649],[-90.985031,32.218894],[-91.105524,31.988862],[-91.341032,31.846462],[-91.401278,31.621907],[-91.499863,31.643815],[-91.516294,31.27686],[-91.636787,31.265906],[-91.565587,31.068736],[-91.636787,30.997536],[-89.747242,30.997536],[-89.845827,30.66892],[-89.681519,30.449842],[-89.643181,30.285534],[-89.522688,30.181472],[-89.818443,30.044549],[-89.84035,29.945964],[-89.599365,29.88024],[-89.495303,30.039072],[-89.287179,29.88024],[-89.30361,29.754271],[-89.424103,29.699501],[-89.648657,29.748794],[-89.621273,29.655686],[-89.69795,29.513285],[-89.506257,29.387316],[-89.199548,29.348977],[-89.09001,29.2011],[-89.002379,29.179192],[-89.16121,29.009407],[-89.336472,29.042268],[-89.484349,29.217531],[-89.851304,29.310638],[-89.851304,29.480424],[-90.032043,29.425654],[-90.021089,29.283254],[-90.103244,29.151807],[-90.23469,29.129899],[-90.333275,29.277777],[-90.563307,29.283254],[-90.645461,29.129899],[-90.798815,29.086084],[-90.963123,29.179192],[-91.09457,29.190146],[-91.220539,29.436608],[-91.445094,29.546147],[-91.532725,29.529716],[-91.620356,29.73784],[-91.883249,29.710455],[-91.888726,29.836425],[-92.146142,29.715932],[-92.113281,29.622824],[-92.31045,29.535193],[-92.617159,29.579009],[-92.97316,29.715932],[-93.2251,29.776178],[-93.767317,29.726886],[-93.838517,29.688547],[-93.926148,29.787132],[-93.690639,30.143133],[-93.767317,30.334826],[-93.696116,30.438888],[-93.728978,30.575812],[-93.630393,30.679874],[-93.526331,30.93729],[-93.542762,31.15089],[-93.816609,31.556184],[-93.822086,31.775262],[-94.041164,31.994339],[-94.041164,33.018527],[-93.608485,33.018527]]]}},
+{"type":"Feature","id":"23","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.703921,43.057759],[-70.824413,43.128959],[-70.807983,43.227544],[-70.966814,43.34256],[-71.032537,44.657025],[-71.08183,45.303304],[-70.649151,45.440228],[-70.720352,45.511428],[-70.556043,45.664782],[-70.386258,45.735983],[-70.41912,45.796229],[-70.260289,45.889337],[-70.309581,46.064599],[-70.210996,46.327492],[-70.057642,46.415123],[-69.997395,46.694447],[-69.225147,47.461219],[-69.044408,47.428357],[-69.033454,47.242141],[-68.902007,47.176418],[-68.578868,47.285957],[-68.376221,47.285957],[-68.233821,47.357157],[-67.954497,47.198326],[-67.790188,47.066879],[-67.779235,45.944106],[-67.801142,45.675736],[-67.456095,45.604536],[-67.505388,45.48952],[-67.417757,45.379982],[-67.488957,45.281397],[-67.346556,45.128042],[-67.16034,45.160904],[-66.979601,44.804903],[-67.187725,44.646072],[-67.308218,44.706318],[-67.406803,44.596779],[-67.549203,44.624164],[-67.565634,44.531056],[-67.75185,44.54201],[-68.047605,44.328409],[-68.118805,44.476286],[-68.222867,44.48724],[-68.173574,44.328409],[-68.403606,44.251732],[-68.458375,44.377701],[-68.567914,44.311978],[-68.82533,44.311978],[-68.830807,44.459856],[-68.984161,44.426994],[-68.956777,44.322932],[-69.099177,44.103854],[-69.071793,44.043608],[-69.258008,43.923115],[-69.444224,43.966931],[-69.553763,43.840961],[-69.707118,43.82453],[-69.833087,43.720469],[-69.986442,43.742376],[-70.030257,43.851915],[-70.254812,43.676653],[-70.194565,43.567114],[-70.358873,43.528776],[-70.369827,43.435668],[-70.556043,43.320652],[-70.703921,43.057759]]]}},
+{"type":"Feature","id":"24","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-75.994645,37.95325],[-76.016553,37.95325],[-76.043938,37.95325],[-75.994645,37.95325]]],[[[-79.477979,39.722302],[-75.786521,39.722302],[-75.693413,38.462606],[-75.047134,38.451652],[-75.244304,38.029928],[-75.397659,38.013497],[-75.671506,37.95325],[-75.885106,37.909435],[-75.879629,38.073743],[-75.961783,38.139466],[-75.846768,38.210667],[-76.000122,38.374975],[-76.049415,38.303775],[-76.257538,38.320205],[-76.328738,38.500944],[-76.263015,38.500944],[-76.257538,38.736453],[-76.191815,38.829561],[-76.279446,39.147223],[-76.169907,39.333439],[-76.000122,39.366301],[-75.972737,39.557994],[-76.098707,39.536086],[-76.104184,39.437501],[-76.367077,39.311532],[-76.443754,39.196516],[-76.460185,38.906238],[-76.55877,38.769315],[-76.514954,38.539283],[-76.383508,38.380452],[-76.399939,38.259959],[-76.317785,38.139466],[-76.3616,38.057312],[-76.591632,38.216144],[-76.920248,38.292821],[-77.018833,38.446175],[-77.205049,38.358544],[-77.276249,38.479037],[-77.128372,38.632391],[-77.040741,38.791222],[-76.909294,38.895284],[-77.035264,38.993869],[-77.117418,38.933623],[-77.248864,39.026731],[-77.456988,39.076023],[-77.456988,39.223901],[-77.566527,39.306055],[-77.719881,39.322485],[-77.834897,39.601809],[-78.004682,39.601809],[-78.174467,39.694917],[-78.267575,39.61824],[-78.431884,39.623717],[-78.470222,39.514178],[-78.765977,39.585379],[-78.963147,39.437501],[-79.094593,39.470363],[-79.291763,39.300578],[-79.488933,39.20747],[-79.477979,39.722302]]]]}},
+{"type":"Feature","id":"25","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-70.917521,42.887974],[-70.818936,42.871543],[-70.780598,42.696281],[-70.824413,42.55388],[-70.983245,42.422434],[-70.988722,42.269079],[-70.769644,42.247172],[-70.638197,42.08834],[-70.660105,41.962371],[-70.550566,41.929509],[-70.539613,41.814493],[-70.260289,41.715908],[-69.937149,41.809016],[-70.008349,41.672093],[-70.484843,41.5516],[-70.660105,41.546123],[-70.764167,41.639231],[-70.928475,41.611847],[-70.933952,41.540646],[-71.120168,41.496831],[-71.196845,41.67757],[-71.22423,41.710431],[-71.328292,41.781632],[-71.383061,42.01714],[-71.530939,42.01714],[-71.799309,42.006186],[-71.799309,42.022617],[-73.053528,42.039048],[-73.486206,42.050002],[-73.508114,42.08834],[-73.267129,42.745573],[-72.456542,42.729142],[-71.29543,42.696281],[-71.185891,42.789389],[-70.917521,42.887974]]]}},
+{"type":"Feature","id":"26","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-83.454238,41.732339],[-84.807042,41.694001],[-84.807042,41.759724],[-85.990061,41.759724],[-86.822556,41.759724],[-86.619909,41.891171],[-86.482986,42.115725],[-86.357016,42.252649],[-86.263908,42.444341],[-86.209139,42.718189],[-86.231047,43.013943],[-86.526801,43.594499],[-86.433693,43.813577],[-86.499417,44.07647],[-86.269385,44.34484],[-86.220093,44.569394],[-86.252954,44.689887],[-86.088646,44.73918],[-86.066738,44.903488],[-85.809322,44.947303],[-85.612152,45.128042],[-85.628583,44.766564],[-85.524521,44.750133],[-85.393075,44.930872],[-85.387598,45.237581],[-85.305444,45.314258],[-85.031597,45.363551],[-85.119228,45.577151],[-84.938489,45.75789],[-84.713934,45.768844],[-84.461995,45.653829],[-84.215533,45.637398],[-84.09504,45.494997],[-83.908824,45.484043],[-83.596638,45.352597],[-83.4871,45.358074],[-83.317314,45.144473],[-83.454238,45.029457],[-83.322791,44.88158],[-83.273499,44.711795],[-83.333745,44.339363],[-83.536392,44.246255],[-83.585684,44.054562],[-83.82667,43.988839],[-83.958116,43.758807],[-83.908824,43.671176],[-83.667839,43.589022],[-83.481623,43.714992],[-83.262545,43.972408],[-82.917498,44.070993],[-82.747713,43.994316],[-82.643651,43.851915],[-82.539589,43.435668],[-82.523158,43.227544],[-82.413619,42.975605],[-82.517681,42.614127],[-82.681989,42.559357],[-82.687466,42.690804],[-82.797005,42.652465],[-82.922975,42.351234],[-83.125621,42.236218],[-83.185868,42.006186],[-83.437807,41.814493],[-83.454238,41.732339]]],[[[-85.508091,45.730506],[-85.49166,45.610013],[-85.623106,45.588105],[-85.568337,45.75789],[-85.508091,45.730506]]],[[[-87.589328,45.095181],[-87.742682,45.199243],[-87.649574,45.341643],[-87.885083,45.363551],[-87.791975,45.500474],[-87.781021,45.675736],[-87.989145,45.796229],[-88.10416,45.922199],[-88.531362,46.020784],[-88.662808,45.987922],[-89.09001,46.135799],[-90.119674,46.338446],[-90.229213,46.508231],[-90.415429,46.568478],[-90.026566,46.672539],[-89.851304,46.793032],[-89.413149,46.842325],[-89.128348,46.990202],[-88.996902,46.995679],[-88.887363,47.099741],[-88.575177,47.247618],[-88.416346,47.373588],[-88.180837,47.455742],[-87.956283,47.384542],[-88.350623,47.077833],[-88.443731,46.973771],[-88.438254,46.787555],[-88.246561,46.929956],[-87.901513,46.908048],[-87.633143,46.809463],[-87.392158,46.535616],[-87.260711,46.486323],[-87.008772,46.530139],[-86.948526,46.469893],[-86.696587,46.437031],[-86.159846,46.667063],[-85.880522,46.68897],[-85.508091,46.678016],[-85.256151,46.754694],[-85.064458,46.760171],[-85.02612,46.480847],[-84.82895,46.442508],[-84.63178,46.486323],[-84.549626,46.4206],[-84.418179,46.502754],[-84.127902,46.530139],[-84.122425,46.179615],[-83.990978,46.031737],[-83.793808,45.993399],[-83.7719,46.091984],[-83.580208,46.091984],[-83.476146,45.987922],[-83.563777,45.911245],[-84.111471,45.976968],[-84.374364,45.933153],[-84.659165,46.053645],[-84.741319,45.944106],[-84.70298,45.850998],[-84.82895,45.872906],[-85.015166,46.00983],[-85.338305,46.091984],[-85.502614,46.097461],[-85.661445,45.966014],[-85.924338,45.933153],[-86.209139,45.960537],[-86.324155,45.905768],[-86.351539,45.796229],[-86.663725,45.703121],[-86.647294,45.834568],[-86.784218,45.861952],[-86.838987,45.725029],[-87.069019,45.719552],[-87.17308,45.659305],[-87.326435,45.423797],[-87.611236,45.122565],[-87.589328,45.095181]]],[[[-88.805209,47.976051],[-89.057148,47.850082],[-89.188594,47.833651],[-89.177641,47.937713],[-88.547792,48.173221],[-88.668285,48.008913],[-88.805209,47.976051]]]]}},
+{"type":"Feature","id":"27","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-92.014696,46.705401],[-92.091373,46.749217],[-92.29402,46.667063],[-92.29402,46.075553],[-92.354266,46.015307],[-92.639067,45.933153],[-92.869098,45.719552],[-92.885529,45.577151],[-92.770513,45.566198],[-92.644544,45.440228],[-92.75956,45.286874],[-92.737652,45.117088],[-92.808852,44.750133],[-92.545959,44.569394],[-92.337835,44.552964],[-92.233773,44.443425],[-91.927065,44.333886],[-91.877772,44.202439],[-91.592971,44.032654],[-91.43414,43.994316],[-91.242447,43.775238],[-91.269832,43.616407],[-91.215062,43.501391],[-91.368417,43.501391],[-96.451017,43.501391],[-96.451017,45.297827],[-96.681049,45.412843],[-96.856311,45.604536],[-96.582464,45.818137],[-96.560556,45.933153],[-96.598895,46.332969],[-96.719387,46.437031],[-96.801542,46.656109],[-96.785111,46.924479],[-96.823449,46.968294],[-96.856311,47.609096],[-97.053481,47.948667],[-97.130158,48.140359],[-97.16302,48.545653],[-97.097296,48.682577],[-97.228743,49.000239],[-95.152983,49.000239],[-95.152983,49.383625],[-94.955813,49.372671],[-94.824366,49.295994],[-94.69292,48.775685],[-94.588858,48.715438],[-94.260241,48.699007],[-94.221903,48.649715],[-93.838517,48.627807],[-93.794701,48.518268],[-93.466085,48.545653],[-93.466085,48.589469],[-93.208669,48.644238],[-92.984114,48.62233],[-92.726698,48.540176],[-92.655498,48.436114],[-92.50762,48.447068],[-92.370697,48.222514],[-92.304974,48.315622],[-92.053034,48.359437],[-92.009219,48.266329],[-91.713464,48.200606],[-91.713464,48.112975],[-91.565587,48.041775],[-91.264355,48.080113],[-91.083616,48.178698],[-90.837154,48.238944],[-90.749522,48.091067],[-90.579737,48.123929],[-90.377091,48.091067],[-90.141582,48.112975],[-89.873212,47.987005],[-89.615796,48.008913],[-89.637704,47.954144],[-89.971797,47.828174],[-90.437337,47.729589],[-90.738569,47.625527],[-91.171247,47.368111],[-91.357463,47.20928],[-91.642264,47.028541],[-92.091373,46.787555],[-92.014696,46.705401]]]}},
+{"type":"Feature","id":"28","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.471115,34.995703],[-88.202745,34.995703],[-88.098683,34.891641],[-88.241084,33.796253],[-88.471115,31.895754],[-88.394438,30.367688],[-88.503977,30.323872],[-88.744962,30.34578],[-88.843547,30.411504],[-89.084533,30.367688],[-89.418626,30.252672],[-89.522688,30.181472],[-89.643181,30.285534],[-89.681519,30.449842],[-89.845827,30.66892],[-89.747242,30.997536],[-91.636787,30.997536],[-91.565587,31.068736],[-91.636787,31.265906],[-91.516294,31.27686],[-91.499863,31.643815],[-91.401278,31.621907],[-91.341032,31.846462],[-91.105524,31.988862],[-90.985031,32.218894],[-91.006939,32.514649],[-91.154816,32.640618],[-91.143862,32.843265],[-91.072662,32.887081],[-91.16577,33.002096],[-91.089093,33.13902],[-91.143862,33.347144],[-91.056231,33.429298],[-91.231493,33.560744],[-91.072662,33.867453],[-90.891923,34.026284],[-90.952169,34.135823],[-90.744046,34.300131],[-90.749522,34.365854],[-90.568783,34.420624],[-90.585214,34.617794],[-90.481152,34.661609],[-90.409952,34.831394],[-90.251121,34.908072],[-90.311367,34.995703],[-88.471115,34.995703]]]}},
+{"type":"Feature","id":"29","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-91.833957,40.609566],[-91.729895,40.615043],[-91.527248,40.412397],[-91.417709,40.379535],[-91.50534,40.237135],[-91.494386,40.034488],[-91.368417,39.727779],[-91.061708,39.470363],[-90.727615,39.256762],[-90.661891,38.928146],[-90.585214,38.867899],[-90.470199,38.961007],[-90.251121,38.917192],[-90.10872,38.845992],[-90.207305,38.725499],[-90.179921,38.632391],[-90.349706,38.374975],[-90.355183,38.216144],[-90.059428,38.013497],[-89.949889,37.88205],[-89.84035,37.903958],[-89.517211,37.690357],[-89.517211,37.537003],[-89.435057,37.34531],[-89.517211,37.279587],[-89.292656,36.994786],[-89.133825,36.983832],[-89.215979,36.578538],[-89.363857,36.622354],[-89.418626,36.496384],[-89.484349,36.496384],[-89.539119,36.496384],[-89.533642,36.249922],[-89.730812,35.997983],[-90.377091,35.997983],[-90.218259,36.184199],[-90.064905,36.304691],[-90.152536,36.496384],[-94.473842,36.501861],[-94.616242,36.501861],[-94.616242,37.000263],[-94.610765,39.158177],[-94.824366,39.20747],[-94.983197,39.442978],[-95.109167,39.541563],[-94.884612,39.831841],[-95.207752,39.908518],[-95.306337,40.001626],[-95.552799,40.264519],[-95.7664,40.587659],[-94.632673,40.571228],[-93.257961,40.582182],[-91.833957,40.609566]]]}},
+{"type":"Feature","id":"30","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.047534,49.000239],[-104.042057,47.861036],[-104.047534,45.944106],[-104.042057,44.996596],[-104.058488,44.996596],[-105.91517,45.002073],[-109.080842,45.002073],[-111.05254,45.002073],[-111.047063,44.476286],[-111.227803,44.580348],[-111.386634,44.75561],[-111.616665,44.547487],[-111.819312,44.509148],[-111.868605,44.563917],[-112.104113,44.520102],[-112.241036,44.569394],[-112.471068,44.481763],[-112.783254,44.48724],[-112.887315,44.394132],[-113.002331,44.448902],[-113.133778,44.772041],[-113.341901,44.782995],[-113.456917,44.865149],[-113.45144,45.056842],[-113.571933,45.128042],[-113.736241,45.330689],[-113.834826,45.522382],[-113.807441,45.604536],[-113.98818,45.703121],[-114.086765,45.593582],[-114.333228,45.456659],[-114.546828,45.560721],[-114.497536,45.670259],[-114.568736,45.774321],[-114.387997,45.88386],[-114.492059,46.037214],[-114.464674,46.272723],[-114.322274,46.645155],[-114.612552,46.639678],[-114.623506,46.705401],[-114.886399,46.809463],[-114.930214,46.919002],[-115.302646,47.187372],[-115.324554,47.258572],[-115.527201,47.302388],[-115.718894,47.42288],[-115.724371,47.696727],[-116.04751,47.976051],[-116.04751,49.000239],[-111.50165,48.994762],[-109.453274,49.000239],[-104.047534,49.000239]]]}},
+{"type":"Feature","id":"31","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-103.324578,43.002989],[-101.626726,42.997512],[-98.499393,42.997512],[-98.466531,42.94822],[-97.951699,42.767481],[-97.831206,42.866066],[-97.688806,42.844158],[-97.217789,42.844158],[-96.692003,42.657942],[-96.626279,42.515542],[-96.44554,42.488157],[-96.264801,42.039048],[-96.127878,41.973325],[-96.062155,41.798063],[-96.122401,41.67757],[-96.095016,41.540646],[-95.919754,41.453015],[-95.925231,41.201076],[-95.826646,40.976521],[-95.881416,40.719105],[-95.7664,40.587659],[-95.552799,40.264519],[-95.306337,40.001626],[-101.90605,40.001626],[-102.053927,40.001626],[-102.053927,41.003906],[-104.053011,41.003906],[-104.053011,43.002989],[-103.324578,43.002989]]]}},
+{"type":"Feature","id":"32","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-117.027882,42.000709],[-114.04295,41.995232],[-114.048427,37.000263],[-114.048427,36.195153],[-114.152489,36.025367],[-114.251074,36.01989],[-114.371566,36.140383],[-114.738521,36.102045],[-114.678275,35.516012],[-114.596121,35.324319],[-114.574213,35.138103],[-114.634459,35.00118],[-115.85034,35.970598],[-116.540435,36.501861],[-117.498899,37.21934],[-118.71478,38.101128],[-120.001861,38.999346],[-119.996384,40.264519],[-120.001861,41.995232],[-118.698349,41.989755],[-117.027882,42.000709]]]}},
+{"type":"Feature","id":"33","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.08183,45.303304],[-71.032537,44.657025],[-70.966814,43.34256],[-70.807983,43.227544],[-70.824413,43.128959],[-70.703921,43.057759],[-70.818936,42.871543],[-70.917521,42.887974],[-71.185891,42.789389],[-71.29543,42.696281],[-72.456542,42.729142],[-72.544173,42.80582],[-72.533219,42.953697],[-72.445588,43.008466],[-72.456542,43.150867],[-72.379864,43.572591],[-72.204602,43.769761],[-72.116971,43.994316],[-72.02934,44.07647],[-72.034817,44.322932],[-71.700724,44.41604],[-71.536416,44.585825],[-71.629524,44.750133],[-71.4926,44.914442],[-71.503554,45.013027],[-71.361154,45.270443],[-71.131122,45.243058],[-71.08183,45.303304]]]}},
+{"type":"Feature","id":"34","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-74.236547,41.14083],[-73.902454,40.998429],[-74.022947,40.708151],[-74.187255,40.642428],[-74.274886,40.489074],[-74.001039,40.412397],[-73.979131,40.297381],[-74.099624,39.760641],[-74.411809,39.360824],[-74.614456,39.245808],[-74.795195,38.993869],[-74.888303,39.158177],[-75.178581,39.240331],[-75.534582,39.459409],[-75.55649,39.607286],[-75.561967,39.629194],[-75.507197,39.683964],[-75.414089,39.804456],[-75.145719,39.88661],[-75.129289,39.963288],[-74.82258,40.127596],[-74.773287,40.215227],[-75.058088,40.417874],[-75.069042,40.543843],[-75.195012,40.576705],[-75.205966,40.691721],[-75.052611,40.866983],[-75.134765,40.971045],[-74.882826,41.179168],[-74.828057,41.288707],[-74.69661,41.359907],[-74.236547,41.14083]]]}},
+{"type":"Feature","id":"35","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-107.421329,37.000263],[-106.868158,36.994786],[-104.337812,36.994786],[-103.001438,37.000263],[-103.001438,36.501861],[-103.039777,36.501861],[-103.045254,34.01533],[-103.067161,33.002096],[-103.067161,31.999816],[-106.616219,31.999816],[-106.643603,31.901231],[-106.528588,31.786216],[-108.210008,31.786216],[-108.210008,31.331629],[-109.04798,31.331629],[-109.042503,37.000263],[-107.421329,37.000263]]]}},
+{"type":"Feature","id":"36","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-73.343806,45.013027],[-73.332852,44.804903],[-73.387622,44.618687],[-73.294514,44.437948],[-73.321898,44.246255],[-73.436914,44.043608],[-73.349283,43.769761],[-73.404052,43.687607],[-73.245221,43.523299],[-73.278083,42.833204],[-73.267129,42.745573],[-73.508114,42.08834],[-73.486206,42.050002],[-73.55193,41.294184],[-73.48073,41.21203],[-73.727192,41.102491],[-73.655992,40.987475],[-73.22879,40.905321],[-73.141159,40.965568],[-72.774204,40.965568],[-72.587988,40.998429],[-72.28128,41.157261],[-72.259372,41.042245],[-72.100541,40.992952],[-72.467496,40.845075],[-73.239744,40.625997],[-73.562884,40.582182],[-73.776484,40.593136],[-73.935316,40.543843],[-74.022947,40.708151],[-73.902454,40.998429],[-74.236547,41.14083],[-74.69661,41.359907],[-74.740426,41.431108],[-74.89378,41.436584],[-75.074519,41.60637],[-75.052611,41.754247],[-75.173104,41.869263],[-75.249781,41.863786],[-75.35932,42.000709],[-79.76278,42.000709],[-79.76278,42.252649],[-79.76278,42.269079],[-79.149363,42.55388],[-79.050778,42.690804],[-78.853608,42.783912],[-78.930285,42.953697],[-79.012439,42.986559],[-79.072686,43.260406],[-78.486653,43.375421],[-77.966344,43.369944],[-77.75822,43.34256],[-77.533665,43.233021],[-77.391265,43.276836],[-76.958587,43.271359],[-76.695693,43.34256],[-76.41637,43.523299],[-76.235631,43.528776],[-76.230154,43.802623],[-76.137046,43.961454],[-76.3616,44.070993],[-76.312308,44.196962],[-75.912491,44.366748],[-75.764614,44.514625],[-75.282643,44.848718],[-74.828057,45.018503],[-74.148916,44.991119],[-73.343806,45.013027]]]}},
+{"type":"Feature","id":"37","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.978661,36.562108],[-80.294043,36.545677],[-79.510841,36.5402],[-75.868676,36.551154],[-75.75366,36.151337],[-76.032984,36.189676],[-76.071322,36.140383],[-76.410893,36.080137],[-76.460185,36.025367],[-76.68474,36.008937],[-76.673786,35.937736],[-76.399939,35.987029],[-76.3616,35.943213],[-76.060368,35.992506],[-75.961783,35.899398],[-75.781044,35.937736],[-75.715321,35.696751],[-75.775568,35.581735],[-75.89606,35.570781],[-76.147999,35.324319],[-76.482093,35.313365],[-76.536862,35.14358],[-76.394462,34.973795],[-76.279446,34.940933],[-76.493047,34.661609],[-76.673786,34.694471],[-76.991448,34.667086],[-77.210526,34.60684],[-77.555573,34.415147],[-77.82942,34.163208],[-77.971821,33.845545],[-78.179944,33.916745],[-78.541422,33.851022],[-79.675149,34.80401],[-80.797922,34.820441],[-80.781491,34.935456],[-80.934845,35.105241],[-81.038907,35.044995],[-81.044384,35.149057],[-82.276696,35.198349],[-82.550543,35.160011],[-82.764143,35.066903],[-83.109191,35.00118],[-83.618546,34.984749],[-84.319594,34.990226],[-84.29221,35.225734],[-84.09504,35.247642],[-84.018363,35.41195],[-83.7719,35.559827],[-83.498053,35.565304],[-83.251591,35.718659],[-82.994175,35.773428],[-82.775097,35.997983],[-82.638174,36.063706],[-82.610789,35.965121],[-82.216449,36.156814],[-82.03571,36.118475],[-81.909741,36.304691],[-81.723525,36.353984],[-81.679709,36.589492],[-80.978661,36.562108]]]}},
+{"type":"Feature","id":"38","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.228743,49.000239],[-97.097296,48.682577],[-97.16302,48.545653],[-97.130158,48.140359],[-97.053481,47.948667],[-96.856311,47.609096],[-96.823449,46.968294],[-96.785111,46.924479],[-96.801542,46.656109],[-96.719387,46.437031],[-96.598895,46.332969],[-96.560556,45.933153],[-104.047534,45.944106],[-104.042057,47.861036],[-104.047534,49.000239],[-97.228743,49.000239]]]}},
+{"type":"Feature","id":"39","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.518598,41.978802],[-80.518598,40.636951],[-80.666475,40.582182],[-80.595275,40.472643],[-80.600752,40.319289],[-80.737675,40.078303],[-80.830783,39.711348],[-81.219646,39.388209],[-81.345616,39.344393],[-81.455155,39.410117],[-81.57017,39.267716],[-81.685186,39.273193],[-81.811156,39.0815],[-81.783771,38.966484],[-81.887833,38.873376],[-82.03571,39.026731],[-82.221926,38.785745],[-82.172634,38.632391],[-82.293127,38.577622],[-82.331465,38.446175],[-82.594358,38.424267],[-82.731282,38.561191],[-82.846298,38.588575],[-82.890113,38.758361],[-83.032514,38.725499],[-83.142052,38.626914],[-83.519961,38.703591],[-83.678792,38.632391],[-83.903347,38.769315],[-84.215533,38.807653],[-84.231963,38.895284],[-84.43461,39.103408],[-84.817996,39.103408],[-84.801565,40.500028],[-84.807042,41.694001],[-83.454238,41.732339],[-83.065375,41.595416],[-82.933929,41.513262],[-82.835344,41.589939],[-82.616266,41.431108],[-82.479343,41.381815],[-82.013803,41.513262],[-81.739956,41.485877],[-81.444201,41.672093],[-81.011523,41.852832],[-80.518598,41.978802],[-80.518598,41.978802]]]}},
+{"type":"Feature","id":"40","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-100.087706,37.000263],[-94.616242,37.000263],[-94.616242,36.501861],[-94.430026,35.395519],[-94.484796,33.637421],[-94.868182,33.74696],[-94.966767,33.861976],[-95.224183,33.960561],[-95.289906,33.87293],[-95.547322,33.878407],[-95.602092,33.933176],[-95.8376,33.834591],[-95.936185,33.889361],[-96.149786,33.840068],[-96.346956,33.686714],[-96.423633,33.774345],[-96.631756,33.845545],[-96.850834,33.845545],[-96.922034,33.960561],[-97.173974,33.736006],[-97.256128,33.861976],[-97.371143,33.823637],[-97.458774,33.905791],[-97.694283,33.982469],[-97.869545,33.851022],[-97.946222,33.987946],[-98.088623,34.004376],[-98.170777,34.113915],[-98.36247,34.157731],[-98.488439,34.064623],[-98.570593,34.146777],[-98.767763,34.135823],[-98.986841,34.223454],[-99.189488,34.2125],[-99.260688,34.404193],[-99.57835,34.415147],[-99.698843,34.382285],[-99.923398,34.573978],[-100.000075,34.563024],[-100.000075,36.501861],[-101.812942,36.501861],[-103.001438,36.501861],[-103.001438,37.000263],[-102.042974,36.994786],[-100.087706,37.000263]]]}},
+{"type":"Feature","id":"41","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-123.211348,46.174138],[-123.11824,46.185092],[-122.904639,46.08103],[-122.811531,45.960537],[-122.762239,45.659305],[-122.247407,45.549767],[-121.809251,45.708598],[-121.535404,45.725029],[-121.217742,45.670259],[-121.18488,45.604536],[-120.637186,45.746937],[-120.505739,45.697644],[-120.209985,45.725029],[-119.963522,45.823614],[-119.525367,45.911245],[-119.125551,45.933153],[-118.988627,45.998876],[-116.918344,45.993399],[-116.78142,45.823614],[-116.545912,45.752413],[-116.463758,45.61549],[-116.671881,45.319735],[-116.732128,45.144473],[-116.847143,45.02398],[-116.830713,44.930872],[-116.934774,44.782995],[-117.038836,44.750133],[-117.241483,44.394132],[-117.170283,44.257209],[-116.97859,44.240778],[-116.896436,44.158624],[-117.027882,43.830007],[-117.027882,42.000709],[-118.698349,41.989755],[-120.001861,41.995232],[-121.037003,41.995232],[-122.378853,42.011663],[-123.233256,42.006186],[-124.213628,42.000709],[-124.356029,42.115725],[-124.432706,42.438865],[-124.416275,42.663419],[-124.553198,42.838681],[-124.454613,43.002989],[-124.383413,43.271359],[-124.235536,43.55616],[-124.169813,43.8081],[-124.060274,44.657025],[-124.076705,44.772041],[-123.97812,45.144473],[-123.939781,45.659305],[-123.994551,45.944106],[-123.945258,46.113892],[-123.545441,46.261769],[-123.370179,46.146753],[-123.211348,46.174138]]]}},
+{"type":"Feature","id":"42","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-79.76278,42.252649],[-79.76278,42.000709],[-75.35932,42.000709],[-75.249781,41.863786],[-75.173104,41.869263],[-75.052611,41.754247],[-75.074519,41.60637],[-74.89378,41.436584],[-74.740426,41.431108],[-74.69661,41.359907],[-74.828057,41.288707],[-74.882826,41.179168],[-75.134765,40.971045],[-75.052611,40.866983],[-75.205966,40.691721],[-75.195012,40.576705],[-75.069042,40.543843],[-75.058088,40.417874],[-74.773287,40.215227],[-74.82258,40.127596],[-75.129289,39.963288],[-75.145719,39.88661],[-75.414089,39.804456],[-75.616736,39.831841],[-75.786521,39.722302],[-79.477979,39.722302],[-80.518598,39.722302],[-80.518598,40.636951],[-80.518598,41.978802],[-80.518598,41.978802],[-80.332382,42.033571],[-79.76278,42.269079],[-79.76278,42.252649]]]}},
+{"type":"Feature","id":"44","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-71.196845,41.67757],[-71.120168,41.496831],[-71.317338,41.474923],[-71.196845,41.67757]]],[[[-71.530939,42.01714],[-71.383061,42.01714],[-71.328292,41.781632],[-71.22423,41.710431],[-71.344723,41.726862],[-71.448785,41.578985],[-71.481646,41.370861],[-71.859555,41.321569],[-71.799309,41.414677],[-71.799309,42.006186],[-71.530939,42.01714]]]]}},
+{"type":"Feature","id":"45","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-82.764143,35.066903],[-82.550543,35.160011],[-82.276696,35.198349],[-81.044384,35.149057],[-81.038907,35.044995],[-80.934845,35.105241],[-80.781491,34.935456],[-80.797922,34.820441],[-79.675149,34.80401],[-78.541422,33.851022],[-78.716684,33.80173],[-78.935762,33.637421],[-79.149363,33.380005],[-79.187701,33.171881],[-79.357487,33.007573],[-79.582041,33.007573],[-79.631334,32.887081],[-79.866842,32.755634],[-79.998289,32.613234],[-80.206412,32.552987],[-80.430967,32.399633],[-80.452875,32.328433],[-80.660998,32.246279],[-80.885553,32.032678],[-81.115584,32.120309],[-81.121061,32.290094],[-81.279893,32.558464],[-81.416816,32.629664],[-81.42777,32.843265],[-81.493493,33.007573],[-81.761863,33.160928],[-81.937125,33.347144],[-81.926172,33.462159],[-82.194542,33.631944],[-82.325988,33.81816],[-82.55602,33.94413],[-82.714851,34.152254],[-82.747713,34.26727],[-82.901067,34.486347],[-83.005129,34.469916],[-83.339222,34.683517],[-83.322791,34.787579],[-83.109191,35.00118],[-82.764143,35.066903]]]}},
+{"type":"Feature","id":"46","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-104.047534,45.944106],[-96.560556,45.933153],[-96.582464,45.818137],[-96.856311,45.604536],[-96.681049,45.412843],[-96.451017,45.297827],[-96.451017,43.501391],[-96.582464,43.479483],[-96.527695,43.397329],[-96.560556,43.222067],[-96.434587,43.123482],[-96.511264,43.052282],[-96.544125,42.855112],[-96.631756,42.707235],[-96.44554,42.488157],[-96.626279,42.515542],[-96.692003,42.657942],[-97.217789,42.844158],[-97.688806,42.844158],[-97.831206,42.866066],[-97.951699,42.767481],[-98.466531,42.94822],[-98.499393,42.997512],[-101.626726,42.997512],[-103.324578,43.002989],[-104.053011,43.002989],[-104.058488,44.996596],[-104.042057,44.996596],[-104.047534,45.944106]]]}},
+{"type":"Feature","id":"47","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-88.054868,36.496384],[-88.071299,36.677123],[-87.852221,36.633308],[-86.592525,36.655216],[-85.486183,36.616877],[-85.289013,36.627831],[-84.544149,36.594969],[-83.689746,36.584015],[-83.673316,36.600446],[-81.679709,36.589492],[-81.723525,36.353984],[-81.909741,36.304691],[-82.03571,36.118475],[-82.216449,36.156814],[-82.610789,35.965121],[-82.638174,36.063706],[-82.775097,35.997983],[-82.994175,35.773428],[-83.251591,35.718659],[-83.498053,35.565304],[-83.7719,35.559827],[-84.018363,35.41195],[-84.09504,35.247642],[-84.29221,35.225734],[-84.319594,34.990226],[-85.606675,34.984749],[-87.359296,35.00118],[-88.202745,34.995703],[-88.471115,34.995703],[-90.311367,34.995703],[-90.212782,35.023087],[-90.114197,35.198349],[-90.130628,35.439335],[-89.944412,35.603643],[-89.911551,35.756997],[-89.763673,35.811767],[-89.730812,35.997983],[-89.533642,36.249922],[-89.539119,36.496384],[-89.484349,36.496384],[-89.418626,36.496384],[-89.298133,36.507338],[-88.054868,36.496384]]]}},
+{"type":"Feature","id":"48","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-101.812942,36.501861],[-100.000075,36.501861],[-100.000075,34.563024],[-99.923398,34.573978],[-99.698843,34.382285],[-99.57835,34.415147],[-99.260688,34.404193],[-99.189488,34.2125],[-98.986841,34.223454],[-98.767763,34.135823],[-98.570593,34.146777],[-98.488439,34.064623],[-98.36247,34.157731],[-98.170777,34.113915],[-98.088623,34.004376],[-97.946222,33.987946],[-97.869545,33.851022],[-97.694283,33.982469],[-97.458774,33.905791],[-97.371143,33.823637],[-97.256128,33.861976],[-97.173974,33.736006],[-96.922034,33.960561],[-96.850834,33.845545],[-96.631756,33.845545],[-96.423633,33.774345],[-96.346956,33.686714],[-96.149786,33.840068],[-95.936185,33.889361],[-95.8376,33.834591],[-95.602092,33.933176],[-95.547322,33.878407],[-95.289906,33.87293],[-95.224183,33.960561],[-94.966767,33.861976],[-94.868182,33.74696],[-94.484796,33.637421],[-94.380734,33.544313],[-94.183564,33.593606],[-94.041164,33.54979],[-94.041164,33.018527],[-94.041164,31.994339],[-93.822086,31.775262],[-93.816609,31.556184],[-93.542762,31.15089],[-93.526331,30.93729],[-93.630393,30.679874],[-93.728978,30.575812],[-93.696116,30.438888],[-93.767317,30.334826],[-93.690639,30.143133],[-93.926148,29.787132],[-93.838517,29.688547],[-94.002825,29.68307],[-94.523134,29.546147],[-94.70935,29.622824],[-94.742212,29.787132],[-94.873659,29.672117],[-94.966767,29.699501],[-95.016059,29.557101],[-94.911997,29.496854],[-94.895566,29.310638],[-95.081782,29.113469],[-95.383014,28.867006],[-95.985477,28.604113],[-96.045724,28.647929],[-96.226463,28.582205],[-96.23194,28.642452],[-96.478402,28.598636],[-96.593418,28.724606],[-96.664618,28.697221],[-96.401725,28.439805],[-96.593418,28.357651],[-96.774157,28.406943],[-96.801542,28.226204],[-97.026096,28.039988],[-97.256128,27.694941],[-97.404005,27.333463],[-97.513544,27.360848],[-97.540929,27.229401],[-97.425913,27.262263],[-97.480682,26.99937],[-97.557359,26.988416],[-97.562836,26.840538],[-97.469728,26.758384],[-97.442344,26.457153],[-97.332805,26.353091],[-97.30542,26.161398],[-97.217789,25.991613],[-97.524498,25.887551],[-97.650467,26.018997],[-97.885976,26.06829],[-98.198161,26.057336],[-98.466531,26.221644],[-98.669178,26.238075],[-98.822533,26.369522],[-99.030656,26.413337],[-99.173057,26.539307],[-99.266165,26.840538],[-99.446904,27.021277],[-99.424996,27.174632],[-99.50715,27.33894],[-99.479765,27.48134],[-99.605735,27.640172],[-99.709797,27.656603],[-99.879582,27.799003],[-99.934351,27.979742],[-100.082229,28.14405],[-100.29583,28.280974],[-100.399891,28.582205],[-100.498476,28.66436],[-100.629923,28.905345],[-100.673738,29.102515],[-100.799708,29.244915],[-101.013309,29.370885],[-101.062601,29.458516],[-101.259771,29.535193],[-101.413125,29.754271],[-101.851281,29.803563],[-102.114174,29.792609],[-102.338728,29.869286],[-102.388021,29.765225],[-102.629006,29.732363],[-102.809745,29.524239],[-102.919284,29.190146],[-102.97953,29.184669],[-103.116454,28.987499],[-103.280762,28.982022],[-103.527224,29.135376],[-104.146119,29.381839],[-104.266611,29.513285],[-104.507597,29.639255],[-104.677382,29.924056],[-104.688336,30.181472],[-104.858121,30.389596],[-104.896459,30.570335],[-105.005998,30.685351],[-105.394861,30.855136],[-105.602985,31.085167],[-105.77277,31.167321],[-105.953509,31.364491],[-106.205448,31.468553],[-106.38071,31.731446],[-106.528588,31.786216],[-106.643603,31.901231],[-106.616219,31.999816],[-103.067161,31.999816],[-103.067161,33.002096],[-103.045254,34.01533],[-103.039777,36.501861],[-103.001438,36.501861],[-101.812942,36.501861]]]}},
+{"type":"Feature","id":"49","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-112.164359,41.995232],[-111.047063,42.000709],[-111.047063,40.998429],[-109.04798,40.998429],[-109.053457,39.125316],[-109.058934,38.27639],[-109.042503,38.166851],[-109.042503,37.000263],[-110.499369,37.00574],[-114.048427,37.000263],[-114.04295,41.995232],[-112.164359,41.995232]]]}},
+{"type":"Feature","id":"50","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-71.503554,45.013027],[-71.4926,44.914442],[-71.629524,44.750133],[-71.536416,44.585825],[-71.700724,44.41604],[-72.034817,44.322932],[-72.02934,44.07647],[-72.116971,43.994316],[-72.204602,43.769761],[-72.379864,43.572591],[-72.456542,43.150867],[-72.445588,43.008466],[-72.533219,42.953697],[-72.544173,42.80582],[-72.456542,42.729142],[-73.267129,42.745573],[-73.278083,42.833204],[-73.245221,43.523299],[-73.404052,43.687607],[-73.349283,43.769761],[-73.436914,44.043608],[-73.321898,44.246255],[-73.294514,44.437948],[-73.387622,44.618687],[-73.332852,44.804903],[-73.343806,45.013027],[-72.308664,45.002073],[-71.503554,45.013027]]]}},
+{"type":"Feature","id":"51","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-75.397659,38.013497],[-75.244304,38.029928],[-75.375751,37.860142],[-75.512674,37.799896],[-75.594828,37.569865],[-75.802952,37.197433],[-75.972737,37.120755],[-76.027507,37.257679],[-75.939876,37.564388],[-75.671506,37.95325],[-75.397659,38.013497]]],[[[-76.016553,37.95325],[-75.994645,37.95325],[-76.043938,37.95325],[-76.016553,37.95325]]],[[[-78.349729,39.464886],[-77.82942,39.130793],[-77.719881,39.322485],[-77.566527,39.306055],[-77.456988,39.223901],[-77.456988,39.076023],[-77.248864,39.026731],[-77.117418,38.933623],[-77.040741,38.791222],[-77.128372,38.632391],[-77.248864,38.588575],[-77.325542,38.446175],[-77.281726,38.342113],[-77.013356,38.374975],[-76.964064,38.216144],[-76.613539,38.15042],[-76.514954,38.024451],[-76.235631,37.887527],[-76.3616,37.608203],[-76.246584,37.389126],[-76.383508,37.285064],[-76.399939,37.159094],[-76.273969,37.082417],[-76.410893,36.961924],[-76.619016,37.120755],[-76.668309,37.065986],[-76.48757,36.95097],[-75.994645,36.923586],[-75.868676,36.551154],[-79.510841,36.5402],[-80.294043,36.545677],[-80.978661,36.562108],[-81.679709,36.589492],[-83.673316,36.600446],[-83.136575,36.742847],[-83.070852,36.852385],[-82.879159,36.890724],[-82.868205,36.978355],[-82.720328,37.044078],[-82.720328,37.120755],[-82.353373,37.268633],[-81.969987,37.537003],[-81.986418,37.454849],[-81.849494,37.285064],[-81.679709,37.20291],[-81.55374,37.208387],[-81.362047,37.339833],[-81.225123,37.235771],[-80.967707,37.290541],[-80.513121,37.482234],[-80.474782,37.421987],[-80.29952,37.509618],[-80.294043,37.690357],[-80.184505,37.849189],[-79.998289,37.997066],[-79.921611,38.177805],[-79.724442,38.364021],[-79.647764,38.594052],[-79.477979,38.457129],[-79.313671,38.413313],[-79.209609,38.495467],[-78.996008,38.851469],[-78.870039,38.763838],[-78.404499,39.169131],[-78.349729,39.464886]]]]}},
+{"type":"Feature","id":"53","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-117.033359,49.000239],[-117.044313,47.762451],[-117.038836,46.426077],[-117.055267,46.343923],[-116.92382,46.168661],[-116.918344,45.993399],[-118.988627,45.998876],[-119.125551,45.933153],[-119.525367,45.911245],[-119.963522,45.823614],[-120.209985,45.725029],[-120.505739,45.697644],[-120.637186,45.746937],[-121.18488,45.604536],[-121.217742,45.670259],[-121.535404,45.725029],[-121.809251,45.708598],[-122.247407,45.549767],[-122.762239,45.659305],[-122.811531,45.960537],[-122.904639,46.08103],[-123.11824,46.185092],[-123.211348,46.174138],[-123.370179,46.146753],[-123.545441,46.261769],[-123.72618,46.300108],[-123.874058,46.239861],[-124.065751,46.327492],[-124.027412,46.464416],[-123.895966,46.535616],[-124.098612,46.74374],[-124.235536,47.285957],[-124.31769,47.357157],[-124.427229,47.740543],[-124.624399,47.88842],[-124.706553,48.184175],[-124.597014,48.381345],[-124.394367,48.288237],[-123.983597,48.162267],[-123.704273,48.167744],[-123.424949,48.118452],[-123.162056,48.167744],[-123.036086,48.080113],[-122.800578,48.08559],[-122.636269,47.866512],[-122.515777,47.882943],[-122.493869,47.587189],[-122.422669,47.318818],[-122.324084,47.346203],[-122.422669,47.576235],[-122.395284,47.800789],[-122.230976,48.030821],[-122.362422,48.123929],[-122.373376,48.288237],[-122.471961,48.468976],[-122.422669,48.600422],[-122.488392,48.753777],[-122.647223,48.775685],[-122.795101,48.8907],[-122.756762,49.000239],[-117.033359,49.000239]]],[[[-122.718423,48.310145],[-122.586977,48.35396],[-122.608885,48.151313],[-122.767716,48.227991],[-122.718423,48.310145]]],[[[-123.025132,48.583992],[-122.915593,48.715438],[-122.767716,48.556607],[-122.811531,48.419683],[-123.041563,48.458022],[-123.025132,48.583992]]]]}},
+{"type":"Feature","id":"54","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-80.518598,40.636951],[-80.518598,39.722302],[-79.477979,39.722302],[-79.488933,39.20747],[-79.291763,39.300578],[-79.094593,39.470363],[-78.963147,39.437501],[-78.765977,39.585379],[-78.470222,39.514178],[-78.431884,39.623717],[-78.267575,39.61824],[-78.174467,39.694917],[-78.004682,39.601809],[-77.834897,39.601809],[-77.719881,39.322485],[-77.82942,39.130793],[-78.349729,39.464886],[-78.404499,39.169131],[-78.870039,38.763838],[-78.996008,38.851469],[-79.209609,38.495467],[-79.313671,38.413313],[-79.477979,38.457129],[-79.647764,38.594052],[-79.724442,38.364021],[-79.921611,38.177805],[-79.998289,37.997066],[-80.184505,37.849189],[-80.294043,37.690357],[-80.29952,37.509618],[-80.474782,37.421987],[-80.513121,37.482234],[-80.967707,37.290541],[-81.225123,37.235771],[-81.362047,37.339833],[-81.55374,37.208387],[-81.679709,37.20291],[-81.849494,37.285064],[-81.986418,37.454849],[-81.969987,37.537003],[-82.101434,37.553434],[-82.293127,37.668449],[-82.342419,37.783465],[-82.50125,37.931343],[-82.621743,38.123036],[-82.594358,38.424267],[-82.331465,38.446175],[-82.293127,38.577622],[-82.172634,38.632391],[-82.221926,38.785745],[-82.03571,39.026731],[-81.887833,38.873376],[-81.783771,38.966484],[-81.811156,39.0815],[-81.685186,39.273193],[-81.57017,39.267716],[-81.455155,39.410117],[-81.345616,39.344393],[-81.219646,39.388209],[-80.830783,39.711348],[-80.737675,40.078303],[-80.600752,40.319289],[-80.595275,40.472643],[-80.666475,40.582182],[-80.518598,40.636951]]]}},
+{"type":"Feature","id":"55","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-90.415429,46.568478],[-90.229213,46.508231],[-90.119674,46.338446],[-89.09001,46.135799],[-88.662808,45.987922],[-88.531362,46.020784],[-88.10416,45.922199],[-87.989145,45.796229],[-87.781021,45.675736],[-87.791975,45.500474],[-87.885083,45.363551],[-87.649574,45.341643],[-87.742682,45.199243],[-87.589328,45.095181],[-87.627666,44.974688],[-87.819359,44.95278],[-87.983668,44.722749],[-88.043914,44.563917],[-87.928898,44.536533],[-87.775544,44.640595],[-87.611236,44.837764],[-87.403112,44.914442],[-87.238804,45.166381],[-87.03068,45.22115],[-87.047111,45.089704],[-87.189511,44.969211],[-87.468835,44.552964],[-87.545512,44.322932],[-87.540035,44.158624],[-87.644097,44.103854],[-87.737205,43.8793],[-87.704344,43.687607],[-87.791975,43.561637],[-87.912467,43.249452],[-87.885083,43.002989],[-87.76459,42.783912],[-87.802929,42.493634],[-88.788778,42.493634],[-90.639984,42.510065],[-90.711184,42.636034],[-91.067185,42.75105],[-91.143862,42.909881],[-91.176724,43.134436],[-91.056231,43.254929],[-91.204109,43.353514],[-91.215062,43.501391],[-91.269832,43.616407],[-91.242447,43.775238],[-91.43414,43.994316],[-91.592971,44.032654],[-91.877772,44.202439],[-91.927065,44.333886],[-92.233773,44.443425],[-92.337835,44.552964],[-92.545959,44.569394],[-92.808852,44.750133],[-92.737652,45.117088],[-92.75956,45.286874],[-92.644544,45.440228],[-92.770513,45.566198],[-92.885529,45.577151],[-92.869098,45.719552],[-92.639067,45.933153],[-92.354266,46.015307],[-92.29402,46.075553],[-92.29402,46.667063],[-92.091373,46.749217],[-92.014696,46.705401],[-91.790141,46.694447],[-91.09457,46.864232],[-90.837154,46.95734],[-90.749522,46.88614],[-90.886446,46.754694],[-90.55783,46.584908],[-90.415429,46.568478]]]}},
+{"type":"Feature","id":"56","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-109.080842,45.002073],[-105.91517,45.002073],[-104.058488,44.996596],[-104.053011,43.002989],[-104.053011,41.003906],[-105.728954,40.998429],[-107.919731,41.003906],[-109.04798,40.998429],[-111.047063,40.998429],[-111.047063,42.000709],[-111.047063,44.476286],[-111.05254,45.002073],[-109.080842,45.002073]]]}},
+{"type":"Feature","id":"72","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-66.448338,17.984326],[-66.771478,18.006234],[-66.924832,17.929556],[-66.985078,17.973372],[-67.209633,17.956941],[-67.154863,18.19245],[-67.269879,18.362235],[-67.094617,18.515589],[-66.957694,18.488204],[-66.409999,18.488204],[-65.840398,18.433435],[-65.632274,18.367712],[-65.626797,18.203403],[-65.730859,18.186973],[-65.834921,18.017187],[-66.234737,17.929556],[-66.448338,17.984326]]]}}
+]}
Index: Dev/branches/Demo/d3/examples/data/world-countries.json
===================================================================
--- Dev/branches/Demo/d3/examples/data/world-countries.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/data/world-countries.json	(revision 225)
@@ -0,0 +1,246 @@
+{"type":"FeatureCollection","features":[
+{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-163.71289063,-78.59559631],[-163.1056366,-78.22330475],[-161.24511719,-78.38008118],[-160.24621582,-78.69356537],[-159.48219299,-79.0463028],[-159.20806885,-79.49697876],[-161.12753296,-79.6341095],[-162.43980408,-79.2813797],[-163.02728271,-78.92876434],[-163.06645203,-78.86988068],[-163.71289063,-78.59559631],[-163.71289063,-78.59559631]],[[-127.28314209,-73.46179199],[-126.55847168,-73.24619293],[-125.55957031,-73.48126984],[-124.03182983,-73.87317657],[-124.61942291,-73.83399963],[-125.91217041,-73.7360611],[-127.28314209,-73.46179199],[-127.28314209,-73.46179199]],[[-122.62168121,-73.65766907],[-122.40625,-73.32454681],[-121.2114563,-73.50097656],[-119.9187851,-73.65769196],[-118.72410583,-73.48126984],[-119.29199982,-73.83399963],[-120.23213196,-74.08878326],[-121.62276459,-74.01042175],[-122.62168121,-73.65766907],[-122.62168121,-73.65766907]],[[-102.33065796,-71.89414978],[-101.70388031,-71.71773529],[-100.4309082,-71.85498047],[-98.98146057,-71.93334198],[-97.88466644,-72.07045746],[-96.78787231,-71.95292664],[-96.20027161,-72.52114868],[-96.98365021,-72.44277954],[-98.19802856,-72.48195648],[-99.43199158,-72.44277954],[-100.78344727,-72.5015564],[-101.80187988,-72.30565643],[-102.33065796,-71.89414978],[-102.33065796,-71.89414978]],[[-74.06821442,-71.34552002],[-73.38273621,-71.22786713],[-72.22717285,-71.2670517],[-71.93340302,-70.75760651],[-71.87463379,-70.38527679],[-71.89421844,-69.58197021],[-71.32620239,-69.11161041],[-70.40558624,-68.95488739],[-69.87688446,-69.32720947],[-69.64182281,-69.69941711],[-69.21091461,-70.15009308],[-68.87798309,-70.58129883],[-68.60372925,-71.03197479],[-68.48626709,-71.48265839],[-68.6625061,-71.87456512],[-68.93667603,-72.24688721],[-70.11182404,-72.38401794],[-71.22833252,-72.57991028],[-72.54047394,-72.56031799],[-72.05086517,-72.16841125],[-73.22595978,-72.30565643],[-74.342453,-72.44277954],[-75.10629272,-72.14881897],[-75.16500854,-71.73731995],[-74.06821442,-71.34552002],[-74.06821442,-71.34552002]],[[-66.89974976,-80.06528473],[-64.64746094,-80.10449219],[-62.49300385,-80.20244598],[-61.74874878,-79.79094696],[-61.21990967,-79.43821716],[-60.18182755,-79.84971619],[-60.47559357,-80.35915375],[-60.76942825,-80.80983734],[-62.86512375,-80.67272186],[-65.0978775,-80.73148346],[-66.35144043,-80.39834595],[-66.35144043,-80.35915375],[-66.89974976,-80.06528473],[-66.89974976,-80.06528473]],[[-49.19412613,-78.04699707],[-48.68492126,-78.04694366],[-47.19641113,-77.83146667],[-45.6882782,-78.04694366],[-44.45436096,-78.47808838],[-44.02349854,-79.08547974],[-43.90596008,-79.51657104],[-43.86681366,-80.02602386],[-45.41407776,-80.33956909],[-47.03967667,-80.59436035],[-48.91992569,-80.82943726],[-51.01564026,-81.02544403],[-53.38555908,-80.96656036],[-54.69781113,-80.63353729],[-54.52148819,-80.22203827],[-52.38668823,-79.94765472],[-51.52484512,-79.61452484],[-50.89810562,-79.18343353],[-50.44764328,-78.81111145],[-49.84051132,-78.45844269],[-49.19412613,-78.04699707],[-49.19412613,-78.04699707]],[[166.6000061,-77],[168.36000061,-77.25894165],[169.44999695,-77.3499527],[169.55000305,-77.5999527],[168.25,-77.79997253],[166.8999939,-77.89992523],[166.1499939,-77.5999527],[166.1499939,-77.25],[166.6000061,-77],[166.6000061,-77]],[[180,-90],[-180,-90],[-180,-84.71335602],[-179.94250488,-84.72142792],[-179.0585022,-84.13928986],[-177.25665283,-84.45284271],[-176.02278137,-84.08053589],[-174.29908752,-84.41366577],[-172.88896179,-84.06093597],[-169.95111084,-83.88463593],[-169,-84.11782074],[-168.53010559,-84.23735809],[-167.02207947,-84.57038116],[-164.18212891,-84.82517242],[-161.92959595,-85.13872528],[-158.07121277,-85.37378693],[-155.19226074,-85.09954834],[-150.94192505,-85.29544067],[-148.53285217,-85.6089859],[-145.88891602,-85.31502533],[-143.10760498,-85.04077148],[-142.89215088,-84.57038116],[-146.82887268,-84.53121185],[-150.06060791,-84.29613495],[-150.90274048,-83.90422058],[-153.58616638,-83.68862152],[-153.40968323,-83.2379303],[-153.03767395,-82.82643127],[-152.66542053,-82.45411682],[-152.8613739,-82.0426178],[-154.52618408,-81.76836395],[-155.29014587,-81.41564178],[-156.83735657,-81.1020813],[-154.40858459,-81.16085052],[-152.09765625,-81.00414276],[-150.64808655,-81.33727264],[-148.86592102,-81.04331207],[-147.22065735,-80.67098999],[-146.41769409,-80.33785248],[-146.77023315,-79.92634583],[-148.06278992,-79.65209961],[-149.53181458,-79.35813141],[-151.58834839,-79.29936218],[-153.39021301,-79.16223145],[-155.32931519,-79.06417084],[-155.97550964,-78.69184875],[-157.26831055,-78.37830353],[-158.05174255,-78.02568817],[-158.36509705,-76.88910675],[-157.8752594,-76.98714447],[-156.97441101,-77.30069733],[-155.32931519,-77.2026825],[-153.74275208,-77.06550598],[-152.92007446,-77.49664307],[-151.33369446,-77.39864349],[-150.00195313,-77.1831665],[-148.74833679,-76.90879059],[-147.61236572,-76.57564545],[-146.1043396,-76.47770691],[-146.14334106,-76.1053772],[-146.49586487,-75.73305511],[-146.20222473,-75.38033295],[-144.9094696,-75.20401764],[-144.32199097,-75.53716278],[-142.79426575,-75.34114075],[-141.63858032,-75.08648682],[-140.20895386,-75.06678009],[-138.85751343,-74.96883392],[-137.50601196,-74.73374939],[-136.42875671,-74.51815033],[-135.21437073,-74.30266571],[-134.43112183,-74.36144257],[-133.74555969,-74.43978882],[-132.25700378,-74.30266571],[-130.92527771,-74.47896576],[-129.55410767,-74.4593811],[-128.24183655,-74.32225037],[-126.89051819,-74.42020416],[-125.40200806,-74.51815033],[-124.01145935,-74.47896576],[-122.56212616,-74.49856567],[-121.07349396,-74.51815033],[-119.70246887,-74.47896576],[-118.68414307,-74.18500519],[-117.46977234,-74.02828979],[-116.21619415,-74.24389648],[-115.02153015,-74.06746674],[-113.94432831,-73.71473694],[-113.29795837,-74.02828979],[-112.94541931,-74.38102722],[-112.29905701,-74.71416473],[-111.2610321,-74.42020416],[-110.0662384,-74.79252625],[-108.71479034,-74.91005707],[-107.55930328,-75.18443298],[-106.14907837,-75.12566376],[-104.87599182,-74.94924164],[-103.36789703,-74.98841858],[-102.0164566,-75.12566376],[-100.64548492,-75.30196381],[-100.11658478,-74.87088013],[-100.76295471,-74.53773499],[-101.25267029,-74.18500519],[-102.54523468,-74.10665131],[-103.11325073,-73.73432922],[-103.32872009,-73.36201477],[-103.68125916,-72.61745453],[-102.91748047,-72.75461578],[-101.60520935,-72.81337738],[-100.31246948,-72.75461578],[-99.13739014,-72.91132355],[-98.11889648,-73.20529175],[-97.68795013,-73.55802917],[-96.33649445,-73.61679077],[-95.04393768,-73.47966003],[-93.67290497,-73.28365326],[-92.4389267,-73.16611481],[-91.42050171,-73.40119171],[-90.08864594,-73.32282257],[-89.22692108,-72.55870056],[-88.42383575,-73.00939941],[-87.26828003,-73.18569946],[-86.01472473,-73.0877533],[-85.19216919,-73.47966003],[-83.8799057,-73.51883698],[-82.66564941,-73.63637543],[-81.47085571,-73.85198975],[-80.68741608,-73.47966003],[-80.29576111,-73.12693787],[-79.29685211,-73.51883698],[-77.92581177,-73.42089844],[-76.90732574,-73.63637543],[-76.22184753,-73.9695282],[-74.88999176,-73.8715744],[-73.85195923,-73.65597534],[-72.83346558,-73.40119171],[-71.61920166,-73.26406097],[-70.20893097,-73.14653015],[-68.93590546,-73.00939941],[-67.95658875,-72.79379272],[-67.36898041,-72.48023987],[-67.1340332,-72.04914856],[-67.25151062,-71.63764954],[-67.56493378,-71.24573517],[-67.91747284,-70.85394287],[-68.23082733,-70.46192169],[-68.48536682,-70.10930634],[-68.54418182,-69.71740723],[-68.44618225,-69.32549286],[-67.9761734,-68.95317078],[-67.5844574,-68.54166412],[-67.42774963,-68.14982605],[-67.62363434,-67.71874237],[-67.74111176,-67.326828],[-67.25151062,-66.87613678],[-66.70307922,-66.58217621],[-66.05671692,-66.20986176],[-65.37122345,-65.89631653],[-64.56820679,-65.60246277],[-64.17649078,-65.17137146],[-63.62812805,-64.8970108],[-63.00134659,-64.64222717],[-62.0416832,-64.58345032],[-61.41490555,-64.27001953],[-60.70982742,-64.07401276],[-59.88721466,-63.95646286],[-59.16255569,-63.70174408],[-58.59453583,-63.38818741],[-57.81110382,-63.2706604],[-57.22356415,-63.525383],[-57.59568787,-63.85852051],[-58.61412048,-64.15235901],[-59.04501724,-64.36797333],[-59.78933334,-64.21124268],[-60.61193848,-64.30919647],[-61.2973671,-64.54427338],[-62.02209091,-64.79905701],[-62.51174927,-65.09290314],[-62.64880753,-65.48480988],[-62.59010696,-65.85712433],[-62.12003326,-66.1902771],[-62.80552292,-66.42546082],[-63.74565125,-66.50382996],[-64.29402161,-66.83695984],[-64.88162231,-67.15040588],[-65.50840759,-67.58148956],[-65.66500092,-67.95380402],[-65.31246185,-68.365242],[-64.78368378,-68.6788559],[-63.96107101,-68.91399384],[-63.19724274,-69.22753906],[-62.78593063,-69.61933136],[-62.57052231,-69.99164581],[-62.27668762,-70.38356018],[-61.80667114,-70.71670532],[-61.51290894,-71.0890274],[-61.37578583,-72.00997162],[-61.08195114,-72.38230133],[-61.00365448,-72.77420044],[-60.69023132,-73.16611481],[-60.82735443,-73.69515228],[-61.37578583,-74.10665131],[-61.9633255,-74.43978882],[-63.29518127,-74.57691956],[-63.74565125,-74.92964172],[-64.3527298,-75.26279449],[-65.86094666,-75.63511658],[-67.19280243,-75.79183197],[-68.44618225,-76.00743103],[-69.79763031,-76.22292328],[-70.60070801,-76.6344223],[-72.2066803,-76.67359924],[-73.96943665,-76.6344223],[-75.55594635,-76.71289063],[-77.24034119,-76.71289063],[-76.9269104,-77.10468292],[-75.39929199,-77.28104401],[-74.28279114,-77.55541992],[-73.65601349,-77.90803528],[-74.77251434,-78.22158813],[-76.49608612,-78.12363434],[-77.92581177,-78.37830353],[-77.98458862,-78.78980255],[-78.02370453,-79.18171692],[-76.84862518,-79.5148468],[-76.63314819,-79.88717651],[-75.35999298,-80.25949097],[-73.24476624,-80.41620636],[-71.44290161,-80.69058228],[-70.01309204,-81.00414276],[-68.19165039,-81.31768799],[-65.70417786,-81.47440338],[-63.25599289,-81.7487793],[-61.55202484,-82.0426178],[-59.69138336,-82.37575531],[-58.71212387,-82.84603119],[-58.22246552,-83.21834564],[-57.00811386,-82.86562347],[-55.36285782,-82.57177734],[-53.6197319,-82.25823212],[-51.54362106,-82.00344086],[-49.76129532,-81.72918701],[-47.27391052,-81.70948029],[-44.82566833,-81.84671783],[-42.80834961,-82.08179474],[-42.16201401,-81.65070343],[-40.77136612,-81.35686493],[-38.24479294,-81.33727264],[-36.26660538,-81.12166595],[-34.38635635,-80.90618896],[-32.3102951,-80.76893616],[-30.09708405,-80.59263611],[-28.54979897,-80.33785248],[-29.25488663,-79.98511505],[-29.68578148,-79.63239288],[-29.68578148,-79.26018524],[-31.62479401,-79.29936218],[-33.68128967,-79.45608521],[-35.6398735,-79.45608521],[-35.91407776,-79.08376312],[-35.77700424,-78.3392334],[-35.32653427,-78.12363434],[-33.89675903,-77.88843536],[-32.21237183,-77.65343475],[-30.99804306,-77.35946655],[-29.78371429,-77.06550598],[-28.88276291,-76.67359924],[-27.51173782,-76.49729156],[-26.16031837,-76.36016846],[-25.47481537,-76.28168488],[-23.92752266,-76.24250793],[-22.4585762,-76.1053772],[-21.22468185,-75.90937042],[-20.01036072,-75.67429352],[-18.91353798,-75.43909454],[-17.52293777,-75.12566376],[-16.64158249,-74.79252625],[-15.70147419,-74.49856567],[-15.40767384,-74.10665131],[-16.46531296,-73.8715744],[-16.11275482,-73.46007538],[-15.44684219,-73.14653015],[-14.40879631,-72.95051575],[-13.31198788,-72.71543884],[-12.29351044,-72.40188599],[-11.51007652,-72.00997162],[-11.02043819,-71.539711],[-10.29576778,-71.26533508],[-9.10102654,-71.32410431],[-8.61136246,-71.65723419],[-7.41662979,-71.69642639],[-7.3774662,-71.32410431],[-6.86822796,-70.93231201],[-5.79099321,-71.03025818],[-5.53638697,-71.40257263],[-4.34165907,-71.46134186],[-3.04898667,-71.28491974],[-1.7954886,-71.16738129],[-0.65948927,-71.22615051],[-0.22861987,-71.63764954],[0.86821002,-71.30451202],[1.88668001,-71.12821198],[3.02265,-70.99108124],[4.13905001,-70.85394287],[5.15751982,-70.61875916],[6.27392006,-70.46192169],[7.13569021,-70.24642944],[7.74285984,-69.89370728],[8.48711967,-70.14848328],[9.52515984,-70.01124573],[10.24985981,-70.48151398],[10.81783009,-70.83423615],[11.95382977,-70.63834381],[12.40429974,-70.24642944],[13.42276001,-69.97206116],[14.73501015,-70.03083038],[15.12674046,-70.40314484],[15.94933987,-70.03083038],[17.02656937,-69.91329956],[18.20170975,-69.87412262],[19.2593708,-69.89370728],[20.37574959,-70.01124573],[21.45298004,-70.07001495],[21.92304993,-70.40314484],[22.56937981,-70.69712067],[23.66617966,-70.52081299],[24.84133911,-70.48151398],[25.97731972,-70.48151398],[27.09371948,-70.46192169],[28.09259033,-70.32479858],[29.15023041,-70.20726013],[30.03160095,-69.93288422],[30.97172928,-69.75658417],[31.99019051,-69.65863037],[32.75403976,-69.38425446],[33.30245972,-68.83562469],[33.87044144,-68.50255585],[34.90850067,-68.65921021],[35.30020142,-69.01193237],[36.16199875,-69.24713135],[37.20003891,-69.1686554],[37.90513992,-69.52138519],[38.6493988,-69.77616882],[39.66786957,-69.54096985],[40.02040863,-69.10988617],[40.92137146,-68.93357849],[41.95941162,-68.60044098],[42.93870926,-68.46331787],[44.11386108,-68.26735687],[44.89730835,-68.05187988],[45.71990967,-67.81668091],[46.5033493,-67.60108185],[47.44345856,-67.71874237],[48.34442139,-67.36600494],[48.99074936,-67.09162903],[49.9308815,-67.11122131],[50.75349045,-66.87613678],[50.94932938,-66.52341461],[51.79153061,-66.2490387],[52.61412811,-66.05314636],[53.61302948,-65.89631653],[54.53356934,-65.81794739],[55.41492844,-65.87671661],[56.3550415,-65.97478485],[57.15806961,-66.2490387],[57.25600052,-66.68013],[58.13734818,-67.01326752],[58.74451065,-67.28765106],[59.93930054,-67.40518188],[60.60519028,-67.67955017],[61.4277916,-67.95380402],[62.38748932,-68.01258087],[63.19049835,-67.81668091],[64.05233765,-67.40518188],[64.99243927,-67.62072754],[65.97174072,-67.73832703],[66.9118576,-67.85586548],[67.89115143,-67.93421936],[68.8900528,-67.93421936],[69.71263885,-68.97275543],[69.67344666,-69.22753906],[69.55593872,-69.67822266],[68.59622955,-69.93288422],[67.81276703,-70.3052063],[67.94988251,-70.69712067],[69.06629181,-70.67753601],[68.92917633,-71.06943512],[68.41999817,-71.4417572],[67.94988251,-71.85325623],[68.71375275,-72.16680908],[69.86929321,-72.26474762],[71.02488708,-72.0883255],[71.57327271,-71.69642639],[71.90627289,-71.32410431],[72.45465088,-71.01066589],[73.08141327,-70.71670532],[73.33602905,-70.36397552],[73.86486816,-69.87412262],[74.49156952,-69.77616882],[75.62757111,-69.73699188],[76.62647247,-69.61933136],[77.64489746,-69.4626236],[78.134552,-69.07070923],[78.42835999,-68.69838715],[79.11385345,-68.32613373],[80.09314728,-68.07146454],[80.93534088,-67.87545013],[81.48377991,-67.54230499],[82.05175018,-67.36600494],[82.77642059,-67.20928955],[83.77532196,-67.30724335],[84.67623138,-67.20928955],[85.65553284,-67.09162903],[86.75234985,-67.15040588],[87.47702789,-66.87613678],[87.98626709,-66.20989227],[88.3584137,-66.48423767],[88.82846069,-66.95450592],[89.67064667,-67.15040588],[90.63036346,-67.22887421],[91.59011841,-67.11122131],[92.60855103,-67.18969727],[93.54866028,-67.20928955],[94.17542267,-67.11122131],[95.01760864,-67.16999054],[95.78147888,-67.3855896],[96.68240356,-67.24846649],[97.75961304,-67.24846649],[98.68019104,-67.11122131],[99.71820831,-67.24846649],[100.3841629,-66.91532898],[100.89334869,-66.58217621],[101.57888794,-66.30781555],[102.83241272,-65.5632782],[103.47870636,-65.70041656],[104.2425766,-65.97478485],[104.90846252,-66.32740021],[106.18157959,-66.93482971],[107.16088104,-66.95450592],[108.08139038,-66.95450592],[109.15860748,-66.83695984],[110.23583221,-66.69972992],[111.05847931,-66.42546082],[111.74397278,-66.13150024],[112.86038208,-66.0923233],[113.6046524,-65.87671661],[114.38804626,-66.07273865],[114.89729309,-66.38628387],[115.60237885,-66.69972992],[116.69918823,-66.66053772],[117.38468933,-66.91532898],[118.57946014,-67.16999054],[119.83293152,-67.26805115],[120.87101746,-67.18969727],[121.65441132,-66.87613678],[122.32037354,-66.56259155],[123.22129059,-66.48423767],[124.12226105,-66.62136078],[125.16027832,-66.71930695],[126.10040283,-66.56259155],[127.0014267,-66.56259155],[127.88275146,-66.66053772],[128.80326843,-66.75849152],[129.70423889,-66.58217621],[130.78146362,-66.42546082],[131.79995728,-66.38628387],[132.93588257,-66.38628387],[133.85647583,-66.28821564],[134.75738525,-66.20986176],[135.03161621,-65.72000122],[135.07078552,-65.3085022],[135.69749451,-65.58287811],[135.87379456,-66.03356171],[136.20675659,-66.4450531],[136.61807251,-66.77819824],[137.46026611,-66.95450592],[138.59625244,-66.89573669],[139.90844727,-66.87613678],[140.80943298,-66.81737518],[142.12167358,-66.81737518],[143.06184387,-66.79779053],[144.37408447,-66.83695984],[145.49043274,-66.91532898],[146.1955719,-67.22887421],[145.99967957,-67.60108185],[146.64604187,-67.89503479],[147.72325134,-68.13024139],[148.83966064,-68.38489532],[150.13230896,-68.56125641],[151.48374939,-68.71804047],[152.50224304,-68.87481689],[153.63818359,-68.89446259],[154.2845459,-68.56125641],[155.16592407,-68.83562469],[155.92977905,-69.14913177],[156.81111145,-69.38425446],[158.02549744,-69.48220825],[159.18103027,-69.5997467],[159.67068481,-69.99164581],[160.80662537,-70.22684479],[161.57049561,-70.57958221],[162.68690491,-70.73629761],[163.84243774,-70.71670532],[164.91966248,-70.77547455],[166.11445618,-70.75588226],[167.30912781,-70.83423615],[168.42559814,-70.97149658],[169.46362305,-71.20655823],[170.50164795,-71.40257263],[171.20678711,-71.69642639],[171.08921814,-72.0883255],[170.5604248,-72.44106293],[170.10992432,-72.89173889],[169.75737,-73.24447632],[169.287323,-73.65597534],[167.9750824,-73.81269073],[167.38749695,-74.16542053],[166.0947876,-74.38102722],[165.64439392,-74.77294159],[164.95884705,-75.14524841],[164.23417664,-75.45868683],[163.82286072,-75.87018585],[163.5682373,-76.24250793],[163.4703064,-76.6931839],[163.48991394,-77.06550598],[164.05787659,-77.45735168],[164.27337646,-77.82967377],[164.74342346,-78.18247223],[166.60411072,-78.31952667],[166.99577332,-78.75073242],[165.19387817,-78.90744781],[163.66619873,-79.12294006],[161.76638794,-79.16223145],[160.9241333,-79.73046112],[160.74789429,-80.20072937],[160.31697083,-80.57303619],[159.78819275,-80.94536591],[161.11999512,-81.27850342],[161.62928772,-81.69000244],[162.49101257,-82.06221008],[163.70533752,-82.39533997],[165.09596252,-82.70890808],[166.60411072,-83.02245331],[168.89564514,-83.33588409],[169.40484619,-83.8258667],[172.28393555,-84.04134369],[173.22412109,-84.41366577],[175.98570251,-84.15888214],[177.13999939,-84.31687164],[178.27726746,-84.472435],[180,-84.71335602],[180,-90],[180,-90]]]},"properties":{"name":"Antarctica"},"id":"AQ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,32.1],[9.54,30.23],[9.95,27.82],[9.87,26.51],[9.4,26.15],[10.25,24.61],[11.56,24.3],[11.99,23.52],[5.81,19.45],[4.25,19.15],[3.33,18.98],[3.23,19.82],[1.8,20.31],[-4.81,25],[-6.66,26.13],[-8.67,27.29],[-8.67,27.67],[-8.67,28.71],[-3.63,30.97],[-3.82,31.7],[-1.18,32.11],[-1.75,34.75],[-2.21,35.09],[0.95,36.45],[2.96,36.8]]]]},"properties":{"name":"Algeria"},"id":"DZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-170.64,-14.29],[-170.83,-14.33],[-170.56,-14.27],[-170.64,-14.29]]],[[[-169.44,-14.26],[-169.51,-14.28],[-169.54,-14.23],[-169.44,-14.26]]]]},"properties":{"name":"Samoa"},"id":"WS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[1.78,42.57],[1.72,42.51],[1.45,42.6],[1.78,42.57]]]]},"properties":{"name":"Andorra"},"id":"AD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[14,-5.85],[16.58,-5.9],[17.62,-8.1],[19.37,-8],[19.54,-7],[21.78,-7.28],[22.25,-11.21],[23.99,-10.87],[24.02,-13.01],[22,-13],[22,-16.17],[23.48,-17.63],[23.28,-17.66],[20.85,-18.02],[18.45,-17.39],[13.99,-17.42],[13.16,-16.95],[11.75,-17.25],[12.51,-13.43],[13.79,-11.79],[12.98,-9.09],[13.39,-8.39],[12.24,-6.1],[13.18,-5.86],[14,-5.85]]],[[[13.09,-4.66],[12.21,-5.77],[12.03,-5.01],[12.78,-4.39],[13.09,-4.63],[13.09,-4.66]]]]},"properties":{"name":"Angola"},"id":"AO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-61.69,17.02],[-61.89,17.11],[-61.79,17.16],[-61.69,17.02]]],[[[-61.73,17.61],[-61.85,17.58],[-61.87,17.7],[-61.73,17.61]]]]},"properties":{"name":"Antigua and Barbuda"},"id":"AG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[45.08,39.77],[45.82,39.55],[46.18,38.84],[45,39.42],[44.81,39.63],[44.78,39.71],[45.08,39.77]]],[[[45.51,40.61],[45.52,40.67],[45.57,40.63],[45.51,40.61]]],[[[46.57,41.87],[47.77,41.2],[48.58,41.84],[50.37,40.26],[49.49,40.15],[48.89,38.44],[48.02,38.84],[48.36,39.39],[47.98,39.72],[46.54,38.88],[46.54,39.56],[45.6,39.98],[46,40.23],[45.15,41.2],[45.02,41.3],[46.52,41.05],[46.45,41.9],[46.57,41.87]]]]},"properties":{"name":"Azerbaijan"},"id":"AZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-68.26,-52.99],[-68.54,-53.23],[-67.36,-54.03],[-65.14,-54.65],[-66.45,-55.05],[-68.64,-54.79],[-68.62,-52.64],[-68.26,-52.99]]],[[[-65.75,-22.11],[-65.19,-22.09],[-64.59,-22.21],[-64.32,-22.87],[-63.94,-22],[-62.64,-22.24],[-61.01,-23.81],[-57.76,-25.18],[-57.58,-25.55],[-58.6,-27.32],[-55.74,-27.44],[-54.7,-26.44],[-54.6,-25.57],[-53.86,-25.68],[-53.81,-27.13],[-55.77,-28.23],[-57.61,-30.18],[-57.81,-30.75],[-58.2,-32.45],[-58.15,-33.05],[-58.43,-33.1],[-58.53,-33.52],[-58.47,-34.54],[-57.19,-35.32],[-57.38,-35.96],[-56.66,-36.9],[-58.3,-38.49],[-62.38,-38.8],[-62.02,-39.38],[-62.39,-40.9],[-65.13,-40.85],[-65.01,-42.09],[-64.45,-42.45],[-63.75,-42.09],[-63.58,-42.62],[-64.96,-42.67],[-64.3,-42.99],[-65.32,-43.65],[-65.6,-45.02],[-66.95,-45.26],[-67.58,-46],[-66.82,-46.99],[-65.78,-47.19],[-66.24,-47.86],[-65.79,-47.96],[-67.58,-49.03],[-67.9,-49.99],[-69.01,-50.01],[-68.37,-50.15],[-69.41,-51.08],[-68.97,-51.57],[-69.61,-51.63],[-68.99,-51.62],[-68.44,-52.38],[-71.91,-52],[-72.4,-51.51],[-72.29,-50.65],[-73.17,-50.75],[-73.58,-49.54],[-72.56,-48.8],[-72.36,-47.47],[-71.67,-46.68],[-71.78,-45.65],[-71.3,-45.29],[-72.08,-44.77],[-71.11,-44.54],[-71.86,-44.37],[-72.13,-42.29],[-71.73,-42.1],[-71.7,-39.58],[-70.82,-38.57],[-71.19,-36.84],[-70.42,-36.14],[-70.57,-35.25],[-69.81,-34.24],[-70.53,-31.19],[-69.83,-30.19],[-69.66,-28.4],[-68.29,-26.92],[-68.57,-24.77],[-67.34,-24.02],[-67.18,-22.82],[-66.22,-21.78],[-65.75,-22.11]]]]},"properties":{"name":"Argentina"},"id":"AR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[145.11,-40.82],[146.59,-41.19],[148.22,-40.85],[148,-43.23],[147.32,-42.85],[146.92,-43.62],[146.04,-43.5],[144.68,-41.22],[144.7,-40.76],[145.11,-40.82]]],[[[142.51,-10.87],[143.78,-14.41],[144.51,-14.17],[145.32,-14.95],[146.28,-18.88],[148.78,-20.23],[149.66,-22.5],[150.64,-22.34],[150.87,-23.51],[153.18,-25.95],[153.03,-27.18],[153.63,-28.67],[153.05,-31.04],[150.16,-35.94],[149.97,-37.52],[147.76,-37.98],[146.22,-38.71],[146.39,-39.15],[145.45,-38.23],[144.9,-38.5],[144.93,-37.87],[143.54,-38.86],[141.57,-38.42],[139.81,-37.3],[139.82,-36.55],[139.08,-35.68],[139.67,-36.23],[139.1,-35.62],[139.36,-35.37],[138.09,-35.62],[138.51,-35.03],[138.1,-34.14],[137.74,-35.14],[136.83,-35.25],[137.44,-34.93],[137.95,-33.56],[137.77,-32.52],[135.95,-35.01],[135.11,-34.6],[135.51,-34.62],[134.18,-32.49],[131.15,-31.47],[125.97,-32.27],[124.28,-32.99],[123.54,-33.91],[120,-33.93],[117.93,-35.13],[115.01,-34.26],[114.99,-33.52],[115.71,-33.27],[115.74,-31.87],[114.89,-29.2],[113.22,-26.24],[113.86,-26.51],[113.47,-25.54],[114.22,-26.31],[113.39,-24.43],[114.02,-21.85],[114.15,-22.53],[116.71,-20.65],[121.03,-19.59],[122.35,-18.11],[122.17,-17.24],[122.92,-16.42],[123.58,-17.6],[123.6,-16.99],[123.92,-17.2],[123.57,-16.17],[123.73,-16.14],[123.89,-16.38],[123.96,-16.25],[124.24,-16.41],[124.9,-16.42],[124.4,-16.33],[124.43,-16.1],[124.59,-16.11],[124.73,-15.81],[124.4,-15.87],[124.45,-15.49],[125.18,-15.52],[124.83,-15.16],[125.43,-15.14],[125.14,-14.74],[125.61,-14.22],[125.64,-14.64],[126.04,-14.52],[126.02,-13.92],[126.29,-14.23],[126.86,-13.75],[127.42,-13.95],[128.17,-14.7],[128.01,-15.5],[128.53,-14.76],[129.73,-15.2],[129.94,-14.77],[129.37,-14.33],[130.58,-12.4],[132.75,-12.13],[131.98,-11.13],[135.23,-12.29],[135.91,-11.76],[135.67,-12.2],[136.04,-12.47],[136.56,-11.93],[136.98,-12.36],[136.46,-13.25],[135.92,-13.28],[135.46,-14.94],[139.26,-17.34],[140.49,-17.64],[141.43,-16.08],[141.58,-12.99],[141.94,-12.88],[141.59,-12.55],[142.51,-10.87]]]]},"properties":{"name":"Australia"},"id":"AU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[13.83,48.77],[14.7,48.58],[15.03,49.02],[16.95,48.62],[17.17,48.01],[16.45,47.7],[16.51,47.01],[16.11,46.87],[13.72,46.53],[12.13,47],[10.47,46.87],[9.6,47.06],[9.53,47.27],[9.57,47.54],[13.02,47.47],[12.76,48.12],[13.83,48.77]]]]},"properties":{"name":"Austria"},"id":"AT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-73.04,21.14],[-73.69,20.94],[-73.02,21.33],[-73.04,21.14]]],[[[-77.74,24.03],[-77.68,24.3],[-77.57,23.74],[-77.74,24.03]]],[[[-78.19,25.2],[-77.72,24.51],[-78.02,24.27],[-78.44,24.61],[-78.19,25.2]]],[[[-77.92,26.75],[-78.71,26.49],[-78.98,26.7],[-77.92,26.75]]],[[[-77.74,26.91],[-77.04,26.51],[-77.2,25.88],[-77.15,26.55],[-77.74,26.91]]]]},"properties":{"name":"Bahamas, The"},"id":"BS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[50.53,26.23],[50.57,25.81],[50.46,25.97],[50.53,26.23]]]]},"properties":{"name":"Bahrain"},"id":"BH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[90.76,22.06],[90.6,22.78],[90.88,22.46],[90.76,22.06]]],[[[88.43,26.55],[89.74,26.16],[89.85,25.29],[92.41,25.03],[91.16,23.64],[91.61,22.94],[92.28,23.71],[92.6,21.98],[92.26,21.05],[92.32,20.74],[91.7,22.49],[90.83,22.69],[90.59,23.6],[90.27,21.85],[90.02,21.86],[90.07,22.16],[89.93,22],[90,22.48],[89.58,21.7],[89.62,22.32],[89.25,21.64],[89.06,22.12],[88.75,24.22],[88.04,24.68],[89.01,25.29],[88.11,25.84],[88.43,26.55]],[[90.24,22.19],[90.06,21.99],[90.22,22.11],[90.24,22.19]]]]},"properties":{"name":"Bangladesh"},"id":"BD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[45.15,41.2],[46,40.23],[45.6,39.98],[46.54,39.56],[46.54,38.88],[46.18,38.84],[45.82,39.55],[45.08,39.77],[44.78,39.71],[43.66,40.11],[43.46,41.11],[45.02,41.3],[45.15,41.2]],[[45.57,40.63],[45.52,40.67],[45.51,40.61],[45.57,40.63]]]]},"properties":{"name":"Armenia"},"id":"AM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-59.53,13.05],[-59.64,13.33],[-59.43,13.16],[-59.53,13.05]]]]},"properties":{"name":"Barbados"},"id":"BB"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[4.3,51.26],[4.25,51.38],[5.04,51.49],[6.01,50.76],[6.13,50.13],[6.03,50.18],[5.81,49.55],[4.83,50.17],[4.15,49.98],[2.54,51.09],[3.37,51.37],[4.24,51.35],[4.3,51.26]]]]},"properties":{"name":"Belgium"},"id":"BE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-64.78,32.27],[-64.86,32.27],[-64.67,32.38],[-64.78,32.27]]]]},"properties":{"name":"Bermuda"},"id":"BM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[90.47,28.07],[91.66,27.76],[92.07,26.86],[89.64,26.72],[88.92,27.32],[89.59,28.14],[90.47,28.07]]]]},"properties":{"name":"Bhutan"},"id":"BT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-65.19,-22.09],[-65.75,-22.11],[-66.22,-21.78],[-67.18,-22.82],[-67.88,-22.83],[-68.76,-20.41],[-68.44,-19.43],[-69.48,-17.64],[-69.5,-17.51],[-68.82,-16.34],[-69.42,-15.62],[-68.67,-12.5],[-69.57,-10.95],[-68.58,-11.11],[-66.63,-9.91],[-65.38,-9.7],[-64.99,-12.01],[-60.47,-13.81],[-60.16,-16.26],[-58.33,-16.28],[-58.4,-17.25],[-57.52,-18.2],[-58.16,-20.17],[-59.1,-19.35],[-61.74,-19.65],[-62.64,-22.24],[-63.94,-22],[-64.32,-22.87],[-64.59,-22.21],[-65.19,-22.09]]]]},"properties":{"name":"Bolivia"},"id":"BO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[17.65,42.89],[17.58,42.94],[16.14,44.2],[15.79,45.17],[19.04,44.86],[19.62,44.05],[19.23,43.51],[18.46,42.57],[17.65,42.89]]]]},"properties":{"name":"Bosnia and Herzegovina"},"id":"BA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[26.96,-23.75],[25.51,-25.68],[23.01,-25.3],[21.67,-26.86],[20.64,-26.83],[20.81,-25.88],[20,-24.77],[20,-22.01],[20.99,-22],[20.99,-18.32],[23.3,-18],[23.62,-18.49],[25.26,-17.8],[26.17,-19.53],[27.71,-20.51],[28.02,-21.57],[29.37,-22.19],[26.96,-23.75]]]]},"properties":{"name":"Botswana"},"id":"BW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[3.36,-54.46],[3.37,-54.4],[3.48,-54.4],[3.36,-54.46]]]]},"properties":{"name":"Bouvet Island"},"id":"BV"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-51.9,-1.48],[-51.89,-1.18],[-51.66,-1.08],[-51.61,-0.73],[-51.2,-0.53],[-51.27,-1.01],[-51.9,-1.48]]],[[[-49.71,-0.23],[-48.37,-0.29],[-48.63,-1.06],[-49.17,-1.61],[-50.58,-1.8],[-50.66,-0.28],[-49.71,-0.23]]],[[[-60.1,5.22],[-60.15,4.52],[-59.57,3.9],[-59.99,2.69],[-59.64,1.73],[-58.81,1.19],[-56.47,1.94],[-55.9,1.89],[-55.97,2.53],[-54.6,2.33],[-52.91,2.2],[-51.68,4.03],[-51.54,4.39],[-51.09,3.91],[-50.68,2.16],[-49.93,1.71],[-49.9,1.17],[-51.26,-0.14],[-51.7,-0.75],[-51.71,-1.03],[-51.92,-1.17],[-51.94,-1.34],[-52.71,-1.6],[-52.21,-1.69],[-50.85,-0.92],[-50.66,-1.77],[-51.34,-1.65],[-51.45,-2.27],[-51.31,-1.76],[-50.85,-2.51],[-50.68,-1.81],[-49.29,-1.71],[-49.49,-2.56],[-48.7,-1.47],[-48.18,-1.47],[-48.5,-1.46],[-48.24,-0.87],[-47.43,-0.58],[-45.33,-1.31],[-45.35,-1.74],[-44.86,-1.43],[-44.36,-2.34],[-44.79,-3.3],[-44.06,-2.41],[-44.34,-2.83],[-43.35,-2.37],[-41.25,-3.02],[-40,-2.85],[-37.17,-4.92],[-35.42,-5.21],[-34.8,-7.63],[-35.29,-9.18],[-37.15,-10.75],[-38.04,-12.63],[-38.49,-13.02],[-38.9,-12.71],[-39.13,-17.68],[-40.97,-21.99],[-42.03,-22.92],[-43.08,-22.67],[-44.66,-23.05],[-44.58,-23.36],[-46.38,-23.87],[-48.21,-25.46],[-48.72,-25.42],[-48.36,-25.58],[-48.8,-26.07],[-48.49,-27.21],[-48.77,-28.52],[-52.07,-32.17],[-50.57,-30.46],[-51.28,-30.01],[-51.27,-30.8],[-53.37,-33.74],[-53.52,-33.15],[-53.09,-32.73],[-53.88,-31.97],[-55.58,-30.85],[-56.01,-31.08],[-56.81,-30.11],[-57.61,-30.18],[-55.77,-28.23],[-53.81,-27.13],[-53.86,-25.68],[-54.6,-25.57],[-54.33,-24.68],[-54.41,-23.92],[-55.41,-23.96],[-55.85,-22.29],[-57.99,-22.09],[-58.16,-20.17],[-57.52,-18.2],[-58.4,-17.25],[-58.33,-16.28],[-60.16,-16.26],[-60.47,-13.81],[-64.99,-12.01],[-65.38,-9.7],[-66.63,-9.91],[-68.58,-11.11],[-69.57,-10.95],[-70.63,-11.01],[-70.51,-9.43],[-72.14,-10],[-72.37,-9.49],[-73.21,-9.41],[-72.96,-8.98],[-74.01,-7.54],[-73.12,-6.45],[-72.85,-5.12],[-70.77,-4.15],[-69.96,-4.24],[-69.38,-1.34],[-70.04,0.59],[-69.12,0.65],[-69.84,1.07],[-69.85,1.71],[-67.91,1.75],[-67.42,2.14],[-66.87,1.22],[-65.52,0.65],[-63.39,2.15],[-64.05,2.48],[-64.8,4.28],[-62.88,3.56],[-62.75,4.03],[-60.99,4.52],[-60.73,5.2],[-60.1,5.22]]]]},"properties":{"name":"Brazil"},"id":"BR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-88.38,18.48],[-88.3,18.48],[-88.21,16.97],[-88.91,15.89],[-89.22,15.89],[-89.14,17.82],[-88.38,18.48]]]]},"properties":{"name":"Belize"},"id":"BZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[72.49,-7.38],[72.36,-7.27],[72.45,-7.23],[72.49,-7.38]]]]},"properties":{"name":"British Indian Ocean Territory"},"id":"IO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[161.55,-10.28],[162.39,-10.84],[161.28,-10.33],[161.55,-10.28]]],[[[159.94,-9.43],[160.83,-9.86],[159.83,-9.8],[159.6,-9.32],[159.94,-9.43]]],[[[160.97,-8.85],[161.38,-9.64],[160.58,-8.33],[160.97,-8.85]]],[[[157.63,-8.24],[157.81,-8.62],[157.21,-8.24],[157.63,-8.24]]],[[[159.85,-8.33],[159.89,-8.57],[158.49,-7.55],[159.85,-8.33]]],[[[157.43,-7.32],[156.94,-7.22],[156.44,-6.64],[157.43,-7.32]]]]},"properties":{"name":"Solomon Islands"},"id":"SB"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-64.42,18.44],[-64.41,18.51],[-64.32,18.51],[-64.42,18.44]]]]},"properties":{"name":"British Virgin Islands"},"id":"VG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[115.22,4.8],[115.34,4.31],[115.03,4.82],[115.15,4.9],[115.22,4.8]]],[[[114.98,4.89],[115.02,4.9],[114.64,4.02],[114.1,4.59],[114.98,4.89]]]]},"properties":{"name":"Brunei"},"id":"BN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[27.88,42.84],[27.45,42.47],[28.01,41.98],[27.39,42.01],[26.36,41.71],[26.29,41.71],[25.29,41.24],[22.94,41.34],[22.37,42.32],[23,43.19],[22.37,43.83],[22.68,44.22],[24.18,43.68],[27.04,44.15],[28.58,43.75],[27.88,42.84]]]]},"properties":{"name":"Bulgaria"},"id":"BG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[97.81,28.34],[98.7,27.54],[98.78,26.64],[98.71,25.86],[97.55,24.74],[97.54,23.94],[98.89,24.16],[98.93,23.19],[99.57,22.94],[99.16,22.16],[99.96,22.05],[100.21,21.43],[101.15,21.57],[100.09,20.35],[100.08,20.35],[98.05,19.81],[97.77,18.57],[97.35,18.56],[98.93,16.39],[98.2,15.07],[99.17,13.73],[99.66,11.83],[98.74,10.35],[98.55,9.98],[98.89,11.7],[97.8,14.88],[97.74,16.56],[97.38,16.49],[96.88,17.45],[96.78,16.7],[96.24,16.8],[95.43,15.73],[95.36,16.14],[94.85,15.78],[94.99,16.25],[94.65,15.85],[94.63,16.34],[94.25,15.96],[94.61,17.55],[93.99,19.46],[93.73,19.93],[93.13,19.84],[93.08,20.55],[92.86,20.12],[92.26,21.05],[92.6,21.98],[93.2,22.26],[93.34,24.08],[94.15,23.86],[95.14,26.61],[96.19,27.27],[97.14,27.09],[96.89,27.61],[97.35,28.22],[97.81,28.34]]]]},"properties":{"name":"Burma"},"id":"MM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[29.23,-3.75],[29.02,-2.74],[29.85,-2.76],[29.95,-2.31],[30.57,-2.4],[30.83,-3.26],[29.42,-4.45],[29.23,-3.75]]]]},"properties":{"name":"Burundi"},"id":"BI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[26.61,55.67],[28.17,56.15],[30.93,55.6],[30.78,54.79],[32.74,53.46],[31.27,53.02],[31.78,52.11],[30.94,52.07],[30.55,51.25],[25.78,51.94],[23.6,51.53],[23.64,52.08],[23.17,52.28],[23.94,52.73],[23.5,53.95],[25.79,54.16],[25.79,54.87],[26.82,55.28],[26.61,55.67]]]]},"properties":{"name":"Belarus"},"id":"BY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[107.49,14.45],[107.55,12.35],[105.85,11.66],[106.2,10.77],[105.1,10.96],[104.45,10.42],[103.62,10.5],[103.56,11.16],[103.13,10.88],[102.92,11.64],[102.38,13.57],[103.18,14.33],[105.21,14.35],[106.06,13.93],[106,14.37],[107.55,14.71],[107.49,14.45]]]]},"properties":{"name":"Cambodia"},"id":"KH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[14.58,12.74],[15.68,9.99],[13.96,9.64],[15.2,8.49],[15.5,7.53],[14.42,6.04],[14.73,4.62],[16.21,2.22],[16.07,1.65],[13.29,2.16],[12.52,2.28],[11.34,2.17],[10.03,2.17],[9.81,2.34],[9.72,3.87],[8.98,4.1],[8.59,4.81],[9.8,6.8],[10.62,7.07],[11.34,6.44],[11.86,7.08],[13.81,11.06],[14.65,11.58],[14.07,13.08],[14.5,13],[14.58,12.74]]]]},"properties":{"name":"Cameroon"},"id":"CM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-127.23,50.64],[-125.45,50.32],[-123.29,48.41],[-125.11,48.73],[-124.81,49.24],[-125.48,48.92],[-125.9,49.44],[-126.54,49.37],[-126.09,49.66],[-127.9,50.11],[-127.41,50.59],[-128.42,50.77],[-127.23,50.64]]],[[[-53.76,48.5],[-52.98,48.6],[-53.95,48.18],[-53.55,47.53],[-52.83,48.1],[-53.27,47.61],[-52.61,47.52],[-53.1,46.64],[-53.62,46.64],[-53.59,47.16],[-54.19,46.82],[-53.87,47.4],[-54.2,47.86],[-55.69,46.86],[-55.98,46.95],[-54.94,47.78],[-55.59,47.4],[-56.17,47.5],[-55.77,47.96],[-56.84,47.52],[-59.41,47.89],[-58.42,48.49],[-59.26,48.48],[-58.4,49.13],[-57.88,48.97],[-58.22,49.39],[-57.7,49.46],[-57.38,50.69],[-55.9,51.63],[-55.41,51.56],[-56.09,51.37],[-55.73,51.08],[-56.85,49.54],[-56.15,50.15],[-55.49,50.01],[-56.13,49.43],[-55.14,49.55],[-55.38,49.04],[-53.78,49.4],[-53.49,49.22],[-54.1,48.81],[-53.76,48.5]],[[-53.76,48.5],[-54.09,48.43],[-54.14,48.36],[-53.76,48.5]]],[[[-85.48,65.79],[-84.92,65.21],[-84.44,65.46],[-81.76,64.5],[-81.99,63.99],[-80.17,63.77],[-81.08,63.45],[-83.07,64.19],[-85.27,63.12],[-85.72,63.72],[-87.19,63.59],[-86.19,64.1],[-86.1,65.53],[-85.48,65.79]]],[[[-95.9,66.95],[-95.22,66.97],[-95.71,67.73],[-95.47,68.06],[-93.55,68.59],[-93.67,68.97],[-94.63,68.76],[-94.3,69.3],[-93.36,69.37],[-96.53,70.13],[-95.79,70.54],[-96.61,70.79],[-96.5,71.28],[-94.61,71.86],[-95.22,71.94],[-93.71,71.76],[-92.97,71.34],[-93.03,70.85],[-91.51,70.17],[-92.92,69.67],[-90.31,69.45],[-91.45,69.35],[-90.44,68.87],[-90.27,68.24],[-89.31,69.25],[-88.05,68.82],[-87.79,68.33],[-88.37,67.96],[-87.51,67.11],[-86.52,67.35],[-85.66,68.73],[-84.53,69.02],[-85.47,69.27],[-85.57,69.86],[-82.26,69.64],[-83.23,69.54],[-81.33,69.18],[-82.06,68.87],[-81.27,68.63],[-82.64,68.5],[-81.24,67.47],[-81.5,67],[-83.4,66.35],[-83.92,66.88],[-84.27,66.72],[-84.37,66.97],[-84.92,67.06],[-84.64,66.98],[-85.23,66.88],[-84.6,66.94],[-83.69,66.19],[-86.78,66.53],[-85.9,66.17],[-87.4,65.32],[-91.43,65.95],[-86.93,65.14],[-88.11,64.14],[-90.12,64.13],[-89.81,63.94],[-90.28,64],[-90.21,63.61],[-92.48,63.81],[-90.63,63.06],[-92.42,62.83],[-91.89,62.6],[-93.62,61.94],[-93.24,61.78],[-93.98,61.46],[-94.82,59.64],[-94.23,58.78],[-94.36,58.22],[-94.14,58.76],[-93.15,58.74],[-92.42,57.34],[-92.88,56.91],[-90.82,57.26],[-85.71,55.63],[-85.12,55.34],[-85.42,54.99],[-82.31,55.15],[-82.3,53.02],[-81.55,52.44],[-81.88,52.19],[-80.44,51.46],[-81.02,51.03],[-80.12,51.3],[-79.33,50.72],[-79.75,51.18],[-79.32,51.66],[-78.85,51.17],[-79.04,51.77],[-78.51,52.46],[-79.05,54.18],[-79.76,54.65],[-77.75,55.3],[-76.53,56.32],[-76.86,57.72],[-78.57,58.64],[-77.77,59.71],[-77.31,59.56],[-77.43,59.91],[-76.76,60.16],[-77.59,60.06],[-77.41,60.54],[-77.83,60.64],[-77.51,60.84],[-78.19,60.79],[-77.47,61.54],[-78.16,62.28],[-77.51,62.56],[-74.57,62.1],[-73.68,62.48],[-72.01,61.68],[-72.3,61.57],[-71.58,61.61],[-71.89,61.43],[-71.39,61.14],[-69.52,61.07],[-69.62,60.07],[-70.95,60.06],[-69.6,59.83],[-69.76,59.32],[-69.23,59.23],[-70.15,58.78],[-69.82,58.59],[-68.36,58.78],[-68.34,58.13],[-69.37,57.77],[-68.4,58.04],[-68,58.58],[-68.13,58.07],[-67.72,58.46],[-67.71,57.92],[-66.39,58.85],[-66.06,58.32],[-65.99,58.9],[-65.32,59.04],[-65.56,59.49],[-64.98,59.38],[-65.53,59.72],[-64.47,60.28],[-64.83,59.99],[-64.17,60.02],[-63.72,59.51],[-64.06,59.38],[-63.36,59.2],[-64.04,59.02],[-62.85,58.69],[-63.59,58.3],[-62.56,58.48],[-63.34,57.98],[-62.45,58.18],[-62.67,57.93],[-61.88,57.63],[-62.55,57.5],[-61.36,57.09],[-61.67,56.62],[-62.57,56.79],[-60.67,55.59],[-60.33,55.78],[-60.68,54.99],[-59.78,55.33],[-59.43,55.14],[-59.94,54.75],[-59.16,55.24],[-59.39,54.98],[-57.35,54.58],[-60.13,53.53],[-60.86,53.79],[-60.1,53.5],[-60.42,53.27],[-57.79,54.07],[-58.18,54.24],[-57.38,54.15],[-57.34,53.44],[-56.46,53.78],[-55.81,53.34],[-56.17,53.03],[-55.76,52.61],[-56.5,52.59],[-55.65,52.44],[-56.2,52.44],[-55.7,52.08],[-56.95,51.42],[-58.63,51.28],[-60.01,50.25],[-66.47,50.26],[-67.38,49.33],[-69.06,48.77],[-71.3,46.74],[-68.21,48.64],[-65,49.22],[-64.22,48.9],[-64.55,48.88],[-64.25,48.49],[-66.84,47.99],[-64.8,47.81],[-65.37,47.09],[-64.8,47.08],[-64.5,46.24],[-62.46,45.61],[-61.92,45.89],[-60.96,45.31],[-64.2,44.58],[-65.48,43.46],[-66.17,43.86],[-65.84,44.58],[-66.19,44.42],[-64.49,45.34],[-64.16,44.98],[-63.36,45.36],[-64.94,45.33],[-64.28,45.8],[-64.75,46.09],[-64.78,45.61],[-67.21,45.18],[-67.8,45.7],[-67.79,47.07],[-69.23,47.47],[-70.88,45.24],[-74.99,44.99],[-76.8,43.63],[-78.72,43.63],[-79.18,43.47],[-78.99,42.82],[-82.7,41.68],[-83.17,42.05],[-82.13,43.59],[-82.54,45.36],[-84.13,46.53],[-88.37,48.31],[-91.42,48.04],[-94.61,48.72],[-95.08,49.36],[-95.15,49],[-122.76,49],[-123.21,49.13],[-122.85,49.44],[-123.24,49.34],[-123.16,49.7],[-123.96,49.51],[-123.53,49.7],[-123.83,50.16],[-123.98,49.8],[-124.77,49.99],[-124.35,50.5],[-125.08,50.32],[-124.81,50.92],[-125.71,50.43],[-126.27,50.63],[-125.62,50.75],[-125.63,51.1],[-126.13,50.68],[-126.56,50.84],[-126.18,50.95],[-127.18,50.93],[-127.03,50.82],[-127.54,51.01],[-126.66,51.19],[-127.79,51.17],[-126.62,51.68],[-127.88,51.67],[-127.17,52.31],[-126.67,51.98],[-126.73,52.37],[-127.19,52.38],[-127.02,52.85],[-128.39,52.29],[-128.13,52.88],[-128.97,53.55],[-127.87,53.24],[-128.81,53.62],[-128.6,54.03],[-129.27,53.38],[-130.05,53.89],[-129.47,54.24],[-130.48,54.36],[-129.96,54.32],[-130.37,54.65],[-129.91,54.61],[-130.17,54.85],[-129.47,55.47],[-130.11,55],[-130.16,55.09],[-129.94,55.28],[-130.1,55.56],[-130.13,55.72],[-130.02,55.91],[-131.82,56.6],[-133.43,58.46],[-135.47,59.8],[-137.48,58.91],[-139.07,60.35],[-141,60.31],[-141,69.64],[-134.31,68.68],[-134.55,69.09],[-132.89,69.65],[-129.4,70.12],[-133.49,68.83],[-132.92,68.69],[-133.35,68.83],[-127.52,70.22],[-128,70.59],[-125.43,69.31],[-124.82,69.71],[-125.2,70],[-124.44,70.15],[-124.5,69.73],[-124.04,69.7],[-124.45,69.37],[-121.68,69.79],[-114.07,68.48],[-115.54,67.92],[-115.1,67.8],[-110.08,68.01],[-108.02,67.29],[-108.62,67.15],[-107.25,66.35],[-107.75,66.92],[-107.08,66.82],[-107.89,68.08],[-106.43,68.15],[-106.47,68.34],[-105.74,68.42],[-105.64,68.63],[-106.54,68.51],[-106.54,68.29],[-107.89,68.27],[-107.6,68.17],[-108.82,68.27],[-106.23,68.94],[-105.49,68.73],[-105.54,68.41],[-104.61,68.24],[-104.5,68.03],[-102.25,67.73],[-98.35,67.8],[-98.62,68.07],[-97.51,67.6],[-97.12,67.79],[-98.71,68.37],[-95.98,68.25],[-96.46,67.48],[-95.33,67.03],[-95.9,66.95]],[[-95.9,66.95],[-96.46,67.06],[-95.63,66.68],[-95.9,66.95]],[[-93.52,63.84],[-92.51,63.82],[-93.78,64.19],[-93.52,63.84]],[[-70.78,48.38],[-69.83,48.17],[-71.05,48.45],[-70.78,48.38]]],[[[-114,72.8],[-114.6,72.6],[-113.03,73.01],[-111.22,72.72],[-111.66,72.28],[-109.78,72.43],[-110.76,72.97],[-109.66,72.92],[-108.62,72.55],[-107.83,71.6],[-107.25,71.9],[-108.29,73.15],[-106.76,73.29],[-105.33,72.75],[-104.36,71.57],[-104.59,71.07],[-101,70.17],[-100.87,69.79],[-103.48,69.69],[-103.02,69.49],[-103.19,69.11],[-102.31,69.5],[-101.75,69.18],[-102.89,68.8],[-105.14,68.9],[-106.6,69.5],[-109.1,68.71],[-113.27,68.45],[-113.52,69.18],[-116.53,69.41],[-117.44,69.99],[-111.49,70.34],[-117.56,70.6],[-118.42,70.99],[-115.06,71.52],[-118.11,71.37],[-117.7,71.67],[-119.13,71.77],[-117.35,72.92],[-114.56,73.38],[-114,72.8]]],[[[-73.35,68.33],[-74.82,69.08],[-76.66,68.7],[-75.59,69.22],[-77.2,69.65],[-76.98,69.94],[-77.63,69.74],[-77.68,70.19],[-79.01,70.68],[-79.59,70.4],[-78.79,69.89],[-81.76,70.12],[-80.95,69.71],[-82.1,70.11],[-83.01,70.3],[-81.71,69.93],[-81.74,69.87],[-82.02,69.87],[-82.14,69.78],[-83.07,70.01],[-85.82,70],[-86.55,70.23],[-86.37,70.53],[-87.92,70.24],[-89.55,71.09],[-87,70.99],[-89.83,71.33],[-90.05,71.95],[-88.41,73.52],[-85.07,73.8],[-86.73,72.72],[-86.24,72.42],[-86.42,72.01],[-84.83,71.27],[-86.82,70.99],[-84.8,70.92],[-84.63,71.67],[-86.05,72.01],[-84.16,72.02],[-85.69,72.89],[-83.95,72.75],[-85.45,73.12],[-83.63,72.98],[-85.19,73.23],[-81.55,73.72],[-80.25,72.73],[-81.38,72.24],[-80.52,72.5],[-80.97,71.88],[-79.67,72.13],[-80.17,72.32],[-79.8,72.5],[-79.01,72.27],[-79.2,71.96],[-77.79,71.79],[-78.87,72.23],[-77,72.13],[-78.56,72.44],[-77.61,72.75],[-75.19,72.49],[-74.95,72.25],[-76.35,71.89],[-74.12,71.98],[-75.39,71.68],[-74.63,71.66],[-75.08,71.18],[-73.75,71.78],[-74.24,71.2],[-73.62,71.58],[-73.38,71.39],[-73.9,71.06],[-73.05,71.27],[-73.38,70.98],[-72.54,71.66],[-71.12,71.26],[-72.57,70.61],[-70.6,71.05],[-71.8,70.43],[-71.16,70.53],[-71.54,70.02],[-69.9,70.88],[-70.5,70.48],[-68.31,70.56],[-70.47,69.84],[-67.79,70.26],[-67.13,69.73],[-70.03,69.54],[-66.8,69.34],[-69.02,69.35],[-68.08,69.22],[-69.03,68.97],[-68.18,69.15],[-67.71,69.02],[-68.56,68.96],[-67.77,68.78],[-69.4,68.86],[-68.04,68.68],[-68.9,68.6],[-68.47,68.61],[-68.71,68.57],[-67.5,68.54],[-67.61,68.38],[-66.71,68.44],[-67.88,68.27],[-67.23,68.36],[-67.01,68.32],[-67.6,68.16],[-67.01,68.29],[-66.77,68.24],[-66.95,68.01],[-66.18,68.02],[-66.73,67.87],[-66.36,67.82],[-65.91,68.16],[-66.01,67.63],[-64.72,67.99],[-65.2,67.65],[-64.51,67.81],[-63.9,67.31],[-64.8,67.36],[-63.96,67.27],[-64.69,67],[-63.11,67.33],[-63.77,66.81],[-62.1,67.05],[-61.26,66.63],[-62.9,66.33],[-61.95,66.02],[-62.97,66.15],[-62.32,65.81],[-63.72,65.68],[-63.32,65.59],[-63.55,64.89],[-65.51,65.74],[-64.36,66.35],[-65.92,65.95],[-65.47,66.39],[-66.07,66.12],[-67.05,66.64],[-67.74,66.57],[-67.28,66.28],[-67.99,66.51],[-67.19,65.91],[-68.85,66.19],[-64.66,64.03],[-64.99,63.82],[-64.53,63.25],[-65.3,63.81],[-64.63,62.9],[-65.25,62.99],[-65.19,62.56],[-66.64,63.37],[-66.55,62.99],[-67.91,63.76],[-67.69,63.37],[-69,63.75],[-65.99,62.24],[-66.07,61.87],[-71.4,63.05],[-72.15,63.45],[-71.23,63.6],[-72.32,63.68],[-73.38,64.27],[-73.3,64.66],[-74.06,64.33],[-74.64,64.9],[-74.99,64.8],[-74.69,64.37],[-75.82,64.61],[-76.67,64.18],[-78.18,64.57],[-77.42,65.46],[-75.77,65.22],[-75.37,64.71],[-75.19,65.1],[-75.95,65.32],[-73.5,65.47],[-74.47,66.15],[-72.26,67.25],[-73.35,68.33]],[[-73.35,68.33],[-73.21,68.38],[-73.32,68.39],[-73.35,68.33]]],[[[-99.8,73.89],[-96.96,73.74],[-98.45,72.87],[-96.52,72.71],[-96.3,72.42],[-96.87,72.04],[-96.49,71.91],[-98.27,71.9],[-98.04,71.53],[-98.73,71.27],[-102.74,72.72],[-102.14,73.09],[-100.41,72.74],[-100.03,72.93],[-100.58,73.17],[-99.77,73.21],[-101.62,73.49],[-100.43,73.41],[-101.12,73.73],[-99.8,73.89]]],[[[-92.64,74.1],[-90.19,73.9],[-92.1,72.74],[-94.32,72.76],[-93.46,72.46],[-94.06,71.98],[-95.21,71.99],[-94.75,72.15],[-95.67,72.81],[-95.67,73.72],[-92.64,74.1]]],[[[-120.15,74.27],[-117.42,74.23],[-115.32,73.48],[-119.14,72.63],[-120.25,72.26],[-120.54,71.52],[-122.78,71.09],[-126,71.97],[-123.77,73.76],[-124.77,74.34],[-120.15,74.27]]],[[[-94.36,75.59],[-93.49,75.26],[-93.47,74.7],[-96.62,74.99],[-94.36,75.59]]],[[[-98.42,76.67],[-97.51,76.19],[-97.94,75.74],[-97.28,75.4],[-98.17,75.33],[-97.58,75.14],[-100.15,74.99],[-100.78,75.35],[-98.95,75.71],[-102.88,75.62],[-101.18,75.78],[-101.91,76.08],[-101.39,76.25],[-102.17,76.24],[-101.89,76.44],[-99.89,75.89],[-99.44,75.97],[-100.15,76.13],[-99.41,76.16],[-100.98,76.5],[-98.42,76.67]]],[[[-108.65,76.81],[-108.08,76.28],[-108.4,76.05],[-107.63,75.99],[-108.02,75.78],[-106.34,76.05],[-105.39,75.64],[-106.01,75.05],[-112.75,74.4],[-114.45,74.67],[-110.91,75.23],[-117.68,75.25],[-115,75.69],[-117.25,75.6],[-114.82,75.88],[-116.73,75.92],[-114.66,76.16],[-115.93,76.29],[-114.9,76.52],[-112.45,76.18],[-111.25,75.52],[-108.9,75.48],[-110.06,75.89],[-109.31,76.11],[-110.39,76.39],[-108.65,76.81]]],[[[-95.66,77.06],[-93.18,76.74],[-93.55,76.39],[-91.41,76.69],[-89.29,76.3],[-91.61,76.26],[-88.95,75.43],[-81.54,75.81],[-79.57,75.45],[-80.44,75.04],[-79.33,74.89],[-81.81,74.46],[-83.51,74.9],[-83.47,74.58],[-84.29,74.5],[-88.5,74.5],[-88.55,74.91],[-91.54,74.65],[-92.49,75.21],[-92.11,75.86],[-93.08,76.36],[-95.38,76.23],[-94.8,76.32],[-96.96,76.73],[-95.66,77.06]]],[[[-116.35,77.54],[-115.39,77.31],[-116.28,77.18],[-115.9,76.69],[-117.1,76.3],[-118.06,76.41],[-117.84,76.82],[-118.97,76.51],[-118.57,76.34],[-119.08,76.08],[-119.65,76.3],[-119.48,75.97],[-119.87,75.86],[-123.04,76.08],[-119.15,77.33],[-116.35,77.54]]],[[[-96.77,78.68],[-94.89,78.1],[-97.1,77.8],[-97.78,78.03],[-96.87,78.13],[-98.41,78.5],[-96.77,78.68]]],[[[-103.59,79.33],[-99.95,78.73],[-98.95,78.06],[-99.91,77.78],[-104.47,78.27],[-105.05,78.49],[-103.32,78.73],[-105.63,79.16],[-103.59,79.33]]],[[[-92.73,81.31],[-88.78,80.13],[-87.68,80.41],[-88.07,80.12],[-86.96,79.9],[-87.46,79.53],[-84.9,79.27],[-87.62,78.65],[-88,78.81],[-87.72,79.08],[-88.16,78.99],[-87.91,78.55],[-88.8,78.61],[-88.82,78.15],[-89.98,78.61],[-89.45,78.16],[-92.06,78.21],[-92.99,78.47],[-91.64,78.55],[-94.29,78.99],[-90.36,79.25],[-95.09,79.27],[-95.78,79.43],[-94.28,79.76],[-95.85,79.65],[-96.8,80.09],[-94.38,79.98],[-94.75,80.08],[-94.08,80.18],[-96.68,80.34],[-93.79,80.53],[-95.53,80.82],[-93.09,81.16],[-94.27,81.35],[-92.73,81.31]]],[[[-70.11,83.11],[-66.3,82.93],[-68.64,82.63],[-64.73,82.9],[-61.08,82.32],[-64.36,81.73],[-69.29,81.72],[-66.61,81.51],[-70.21,81.17],[-64.44,81.48],[-69.43,80.38],[-70.83,80.56],[-70.15,80.19],[-72.42,80.21],[-70.5,80.08],[-71.46,79.9],[-71.18,79.78],[-78.05,79.35],[-74.44,79.06],[-78.89,79.06],[-74.72,78.71],[-76.69,78.51],[-75.06,78.31],[-76.91,78.2],[-75.58,78.11],[-75.92,77.96],[-78.26,78],[-77.72,77.61],[-78.69,77.32],[-81.93,77.68],[-81.17,77.34],[-82.17,77.29],[-81.83,77.16],[-77.78,76.79],[-81.05,76.13],[-80.77,76.42],[-82.73,76.82],[-82.13,76.44],[-89.68,76.57],[-86.74,77.17],[-88.07,77.82],[-84.48,77.29],[-84.61,77.39],[-83.46,77.35],[-83.84,77.46],[-82.32,78.07],[-83.9,77.49],[-84.78,77.52],[-84.43,77.72],[-84.95,77.6],[-85.35,77.73],[-85.05,77.83],[-85.4,77.82],[-84.33,77.9],[-85.68,77.93],[-84.13,78.17],[-84.97,78.2],[-84.64,78.59],[-85.49,78.1],[-87.54,78.14],[-86.86,78.73],[-82.34,78.57],[-83.25,78.83],[-81.48,79.05],[-84.75,79.03],[-83.36,79.05],[-86.49,79.76],[-85.26,79.92],[-86.51,80.3],[-79.9,79.65],[-83.2,80.32],[-78.04,80.57],[-79.96,80.61],[-76.48,80.87],[-78.93,80.88],[-76.75,81.44],[-80.92,80.66],[-85.07,80.51],[-86.74,80.6],[-82.36,81.18],[-87.59,80.63],[-89.47,80.91],[-84.73,81.28],[-89.82,81.01],[-90.35,81.17],[-87.24,81.49],[-91.96,81.66],[-88.08,82.1],[-84.6,81.89],[-86.88,82.2],[-85.05,82.48],[-79.23,81.82],[-82.73,82.4],[-80.58,82.55],[-81.47,82.82],[-78.5,82.68],[-80.43,82.89],[-79.79,82.96],[-75.89,82.59],[-76.23,82.44],[-75.4,82.61],[-77.38,82.99],[-72.63,82.69],[-73.65,82.93],[-70.11,83.11]]]]},"properties":{"name":"Canada"},"id":"CA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-24.37,14.81],[-24.53,14.92],[-24.38,15.05],[-24.37,14.81]]],[[[-23.45,14.98],[-23.68,14.94],[-23.77,15.25],[-23.45,14.98]]],[[[-22.71,16.04],[-22.96,16.09],[-22.8,16.24],[-22.71,16.04]]],[[[-24.03,16.59],[-24.32,16.48],[-24.43,16.64],[-24.03,16.59]]],[[[-25.28,16.91],[-25.33,17.1],[-24.97,17.11],[-25.28,16.91]]]]},"properties":{"name":"Cape Verde"},"id":"CV"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-81.1,19.31],[-81.4,19.29],[-81.25,19.35],[-81.1,19.31]]]]},"properties":{"name":"Cayman Islands"},"id":"KY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.06,8.58],[18.99,8.96],[20.37,9.11],[21.72,10.64],[22.87,10.92],[23.67,9.87],[23.52,8.71],[25.25,7.85],[27.46,5.02],[25.89,5.19],[22.9,4.82],[22.38,4.13],[20.59,4.41],[19.42,5.13],[18.54,4.34],[18.62,3.48],[16.66,3.53],[16.21,2.22],[14.73,4.62],[14.42,6.04],[15.5,7.53],[18.59,8.04],[19.06,8.58]]]]},"properties":{"name":"Central African Republic"},"id":"CF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[80.27,9.78],[80.82,9.26],[81.13,8.5],[81.36,8.49],[81.88,7.29],[81.66,6.44],[80.59,5.92],[80.05,6.24],[79.7,8.08],[80.05,9.59],[80.61,9.44],[79.93,9.74],[80.27,9.78]]]]},"properties":{"name":"Sri Lanka"},"id":"LK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[14.5,13],[14.07,13.08],[13.63,13.72],[13.47,14.46],[15.49,16.91],[16,20.35],[15.2,21.5],[15,23],[16,23.45],[24,19.5],[24,15.7],[22.94,15.56],[21.83,12.8],[22.47,12.62],[22.87,10.92],[21.72,10.64],[20.37,9.11],[18.99,8.96],[19.06,8.58],[18.59,8.04],[15.5,7.53],[15.2,8.49],[13.96,9.64],[15.68,9.99],[14.58,12.74],[14.5,13]]]]},"properties":{"name":"Chad"},"id":"TD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-68.4,-54.96],[-69.06,-55.06],[-68.21,-55.27],[-68.75,-55.27],[-68.16,-55.4],[-68.05,-55.71],[-68.38,-55.48],[-68.94,-55.46],[-68.78,-55.38],[-68.91,-55.34],[-68.8,-55.19],[-69.43,-55.16],[-69.17,-55.51],[-70.03,-55.16],[-68.4,-54.96]]],[[[-67.78,-54.92],[-67.05,-55.14],[-68.36,-54.94],[-67.78,-54.92]]],[[[-71.26,-54.08],[-71.12,-54.38],[-71.7,-54.16],[-71.26,-54.08]]],[[[-71.67,-53.94],[-71.85,-54.34],[-72.26,-53.94],[-71.67,-53.94]]],[[[-70.44,-53.86],[-70.37,-54.04],[-70.67,-53.93],[-70.52,-54.23],[-70.88,-54.05],[-70.53,-53.56],[-70.44,-53.86]]],[[[-72.91,-53.43],[-72.14,-53.8],[-72.87,-54.14],[-72.73,-53.84],[-73.59,-53.76],[-72.91,-53.43]]],[[[-74.36,-52.95],[-74.75,-52.76],[-73.09,-53.35],[-74.36,-52.95]]],[[[-70.92,-54.71],[-70.77,-54.68],[-70.87,-54.69],[-70.92,-54.71],[-72,-54.46],[-70.13,-54.55],[-70.88,-54.13],[-70.14,-54.43],[-70.06,-54.25],[-69.77,-54.56],[-69.86,-54.28],[-69.24,-54.45],[-69.38,-54.69],[-69.18,-54.58],[-69.16,-54.46],[-68.99,-54.43],[-70.04,-54.1],[-70.18,-53.81],[-69.36,-53.35],[-70.45,-53.37],[-70.1,-52.9],[-70.42,-52.77],[-68.62,-52.64],[-68.64,-54.79],[-70.92,-54.71]]],[[[-74.26,-51.25],[-74.32,-50.92],[-74.19,-51.2],[-74.26,-51.25]]],[[[-74.4,-50.86],[-74.41,-51.09],[-74.96,-50.97],[-74.4,-50.86]]],[[[-74.69,-50.89],[-74.95,-50.73],[-74.75,-50.7],[-74.69,-50.89]]],[[[-74.36,-50.49],[-74.19,-50.85],[-74.67,-50.48],[-74.36,-50.49]]],[[[-75.05,-50.17],[-75.46,-50.36],[-75.4,-50.04],[-75.05,-50.17]]],[[[-75.29,-49.1],[-75.66,-49.22],[-75.36,-48.99],[-75.29,-49.1]]],[[[-74.61,-48.46],[-74.41,-49.73],[-74.77,-50.06],[-74.65,-49.36],[-75.02,-49.9],[-75.47,-49.33],[-74.92,-49.34],[-75.05,-48.8],[-74.61,-48.7],[-75.03,-48.5],[-74.74,-48.12],[-74.61,-48.46]]],[[[-75.24,-48.27],[-75.23,-48.71],[-75.58,-48.09],[-75.24,-48.27]]],[[[-74.93,-48.16],[-75.04,-48.44],[-75.26,-48.07],[-74.93,-48.16]]],[[[-74.46,-45.78],[-74.39,-45.44],[-74.21,-45.64],[-74.46,-45.78]]],[[[-73.65,-45.76],[-73.78,-45.67],[-73.7,-45.44],[-73.65,-45.76]]],[[[-74.02,-45.43],[-73.82,-45.48],[-74.14,-45.58],[-74.02,-45.43]]],[[[-73.98,-45.27],[-73.78,-45.34],[-74.17,-45.25],[-73.98,-45.27]]],[[[-73.85,-45],[-73.73,-45.28],[-74.24,-45.16],[-73.85,-45]]],[[[-74.21,-44.78],[-74.41,-44.63],[-73.87,-44.69],[-74.21,-44.78]]],[[[-72.72,-44.55],[-72.98,-44.61],[-72.83,-44.69],[-73.22,-44.94],[-73.41,-44.82],[-73.21,-44.8],[-73.39,-44.79],[-73.46,-44.64],[-73.23,-44.42],[-72.72,-44.55]]],[[[-73.89,-41.82],[-73.37,-42.25],[-73.82,-42.51],[-73.49,-43.11],[-73.86,-43.4],[-74.41,-43.24],[-73.89,-41.82]]],[[[-69.48,-17.64],[-68.44,-19.43],[-68.76,-20.41],[-67.88,-22.83],[-67.18,-22.82],[-67.34,-24.02],[-68.57,-24.77],[-68.29,-26.92],[-69.66,-28.4],[-69.83,-30.19],[-70.53,-31.19],[-69.81,-34.24],[-70.57,-35.25],[-70.42,-36.14],[-71.19,-36.84],[-70.82,-38.57],[-71.7,-39.58],[-71.73,-42.1],[-72.13,-42.29],[-71.86,-44.37],[-71.11,-44.54],[-72.08,-44.77],[-71.3,-45.29],[-71.78,-45.65],[-71.67,-46.68],[-72.36,-47.47],[-72.56,-48.8],[-73.58,-49.54],[-73.17,-50.75],[-72.29,-50.65],[-72.4,-51.51],[-71.91,-52],[-68.44,-52.38],[-70.81,-52.73],[-71.28,-53.89],[-72.45,-53.4],[-71.8,-53.52],[-71.17,-52.81],[-72.55,-53.07],[-72.19,-53.18],[-72.65,-53.32],[-72.4,-53.54],[-73.22,-53.23],[-71.48,-52.63],[-72.8,-52.54],[-72.98,-53.07],[-73.45,-53.01],[-72.89,-52.52],[-73.69,-52.73],[-73.73,-52.03],[-73.33,-52.22],[-72.99,-52.07],[-72.86,-52.26],[-72.78,-52.06],[-72.94,-52.09],[-72.7,-51.98],[-72.9,-52.46],[-72.47,-51.79],[-73.24,-51.46],[-72.56,-51.78],[-73.28,-51.61],[-72.92,-51.86],[-73.24,-52.09],[-73.39,-51.66],[-73.28,-52.16],[-73.56,-52.05],[-73.64,-51.82],[-73.4,-52.02],[-73.46,-51.69],[-73.91,-51.62],[-73.89,-51.37],[-73.6,-51.62],[-73.71,-51.16],[-74.25,-50.94],[-73.53,-50.71],[-73.72,-50.56],[-73.57,-50.4],[-74.05,-50.83],[-74.29,-50.48],[-73.88,-50.54],[-74.69,-50.2],[-73.87,-50.29],[-74.33,-49.63],[-73.71,-49.76],[-74.11,-49.48],[-73.83,-49.03],[-74.37,-49.43],[-74.02,-48.41],[-74.65,-48.02],[-73.22,-48],[-73.72,-47.53],[-73.93,-47.85],[-74.74,-47.72],[-74.04,-47.62],[-74.53,-47.44],[-73.93,-47.04],[-74.27,-46.79],[-75.01,-46.75],[-74.94,-46.44],[-75.41,-46.93],[-75.72,-46.73],[-74.36,-45.79],[-74.14,-45.81],[-73.97,-46.09],[-74.08,-46.19],[-74.31,-46.25],[-74.49,-46.19],[-74.34,-46.27],[-74.05,-46.2],[-74,-46.29],[-73.85,-46.35],[-74.02,-46.22],[-73.88,-46.14],[-73.76,-46.24],[-73.77,-46.3],[-73.81,-46.39],[-74,-46.56],[-73.91,-46.6],[-73.84,-46.59],[-73.18,-45.67],[-73.59,-45.78],[-73.52,-45.46],[-72.83,-45.42],[-73.39,-44.98],[-73.14,-44.94],[-72.77,-44.75],[-72.61,-44.47],[-73.29,-44.14],[-72.54,-42.56],[-72.85,-42.28],[-72.42,-42.45],[-72.86,-41.91],[-72.31,-41.44],[-73.75,-41.75],[-73.49,-41.52],[-74,-40.97],[-73.22,-39.41],[-73.64,-37.21],[-73.19,-37.14],[-71.44,-32.64],[-71.52,-28.97],[-70.45,-25.36],[-70.62,-23.49],[-70.05,-21.43],[-70.41,-18.35],[-69.5,-17.51],[-69.48,-17.64]],[[-74.07,-46.01],[-74.16,-46.14],[-74.07,-46.1],[-74.07,-46.01]]]]},"properties":{"name":"Chile"},"id":"CL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[110.72,20.06],[111.03,19.64],[110.05,18.38],[108.69,18.51],[108.63,19.28],[109.26,19.9],[110.72,20.06]]],[[[123.38,53.53],[126.1,52.76],[127.53,49.79],[130.67,48.86],[130.99,47.69],[134.74,48.27],[133.12,45.13],[131.86,45.35],[130.95,44.84],[131.31,43.39],[130.41,42.72],[130.6,42.42],[129.91,43.01],[129.71,42.44],[128.06,42],[128.16,41.38],[126.91,41.8],[124.37,40.09],[121.15,38.72],[121.75,39.35],[121.23,39.54],[122.3,40.51],[121.18,40.92],[118.92,39.13],[117.74,39.1],[117.67,38.39],[118.84,38.15],[119.23,37.14],[120.74,37.84],[122.56,37.4],[122.5,36.89],[120.09,36.2],[119.18,34.88],[120.25,34.31],[120.84,32.64],[121.9,31.75],[119.63,32.26],[121.88,30.97],[120.15,30.19],[122.13,29.89],[121.45,29.51],[121.98,29.59],[121.41,29.16],[121.61,28.72],[121.14,28.84],[121.58,28.27],[120.59,28.08],[120.84,27.88],[120.13,26.64],[119.55,26.75],[119.94,26.35],[119.09,26.14],[119.71,25.99],[119.65,25.36],[119.31,25.61],[118.62,24.54],[117.79,24.46],[118.12,24.26],[116.52,23.42],[116.48,22.94],[114.22,22.55],[114.03,22.51],[113.48,23.05],[113.55,22.21],[113.53,22.19],[113.17,22.57],[113.39,22.18],[112.94,21.87],[110.4,21.38],[110.28,20.25],[109.92,20.23],[109.57,21.72],[109.14,21.4],[108.48,21.94],[107.99,21.54],[106.69,22.03],[106.71,22.86],[105.58,23.06],[105.35,23.33],[103.96,22.5],[102.48,22.77],[102.14,22.4],[101.57,22.21],[101.79,21.14],[101.15,21.57],[100.21,21.43],[99.96,22.05],[99.16,22.16],[99.57,22.94],[98.93,23.19],[98.89,24.16],[97.54,23.94],[97.55,24.74],[98.71,25.86],[98.78,26.64],[98.7,27.54],[97.81,28.34],[97.35,28.22],[96.4,28.35],[96.62,28.79],[96.08,29.47],[95.39,29.04],[94.65,29.33],[92.54,27.86],[91.66,27.76],[90.47,28.07],[89.59,28.14],[88.92,27.32],[88.83,28.01],[88.14,27.87],[86.01,27.88],[82.1,30.34],[81.03,30.2],[78.77,31.31],[78.4,32.55],[79.53,32.75],[78.08,35.45],[77.82,35.5],[76.17,35.82],[75.86,36.66],[74.82,37.02],[74.57,37.03],[74.92,37.24],[74.86,38.47],[73.82,38.61],[73.66,39.45],[74.86,40.52],[76.35,40.35],[76.87,41.01],[78.08,41.04],[80.23,42.2],[80.38,43.03],[80.82,43.16],[80.52,44.73],[79.87,44.9],[82.56,45.13],[82.32,45.57],[83.04,47.21],[85.53,47.06],[85.76,48.39],[87.35,49.09],[87.84,49.17],[88.65,48.18],[90.07,47.89],[91.02,46.6],[90.9,45.25],[95.42,44.29],[96.38,42.73],[100.84,42.68],[105.01,41.58],[107.47,42.47],[110.44,42.78],[111.96,43.69],[111.42,44.38],[111.98,45.09],[113.64,44.75],[117.42,46.58],[119.9,46.68],[118.54,47.99],[117.37,47.65],[115.59,47.92],[116.71,49.83],[117.87,49.52],[119.21,50.02],[120.78,52.11],[120.03,52.77],[120.86,53.28],[123.38,53.53]]]]},"properties":{"name":"China"},"id":"CN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[121.73,25.14],[121.84,24.48],[120.72,21.93],[120.11,23.62],[121.01,25.01],[121.73,25.14]]]]},"properties":{"name":"Taiwan"},"id":"TW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[105.7,-10.51],[105.63,-10.44],[105.74,-10.38],[105.7,-10.51]]]]},"properties":{"name":"Christmas Island"},"id":"CX"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[96.86,-12.2],[96.82,-12.18],[96.83,-12.13],[96.86,-12.2]]]]},"properties":{"name":"Cocos (Keeling) Islands"},"id":"CC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-71.56,12.45],[-71.32,11.85],[-71.98,11.66],[-72.49,11.12],[-73.38,9.17],[-72.78,9.08],[-72,7.02],[-70.12,6.98],[-69.25,6.08],[-67.45,6.19],[-67.86,4.56],[-67.29,3.4],[-67.83,2.83],[-67.19,2.39],[-66.87,1.22],[-67.42,2.14],[-67.91,1.75],[-69.85,1.71],[-69.84,1.07],[-69.12,0.65],[-70.04,0.59],[-69.38,-1.34],[-69.96,-4.24],[-70.72,-3.78],[-70.29,-2.51],[-71.7,-2.15],[-72.88,-2.51],[-73.56,-1.37],[-75.29,-0.12],[-77.38,0.38],[-78.59,1.24],[-78.81,1.44],[-78.57,2.43],[-77.74,2.6],[-77.03,3.92],[-77.43,4.03],[-77.34,6.57],[-77.89,7.23],[-77.22,7.94],[-77.37,8.67],[-76.76,7.92],[-76.93,8.57],[-75.63,9.45],[-75.27,10.8],[-74.86,11.13],[-74.39,10.74],[-74.16,11.33],[-73.28,11.3],[-71.56,12.45]]]]},"properties":{"name":"Colombia"},"id":"CO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[44.49,-12.09],[44.51,-12.38],[44.21,-12.16],[44.49,-12.09]]],[[[43.46,-11.94],[43.22,-11.76],[43.28,-11.38],[43.46,-11.94]]]]},"properties":{"name":"Comoros"},"id":"KM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[45.2,-12.85],[45.1,-12.99],[45.08,-12.66],[45.2,-12.85]]]]},"properties":{"name":"Mayotte"},"id":"YT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[12.78,-4.39],[12.03,-5.01],[11.14,-3.93],[11.93,-3.64],[11.57,-2.33],[12.48,-2.33],[12.65,-1.82],[13,-2.37],[13.76,-2.09],[14.11,-2.49],[14.43,-1.89],[14.52,-0.61],[13.85,-0.2],[14.49,0.91],[14.19,1.39],[13.19,1.22],[13.29,2.16],[16.07,1.65],[16.21,2.22],[16.66,3.53],[18.62,3.48],[17.71,-0.54],[16.2,-2.18],[15.89,-3.94],[14.66,-4.91],[14.4,-4.28],[13.41,-4.88],[13.09,-4.63],[12.78,-4.39]]]]},"properties":{"name":"Congo, Republic of the"},"id":"CG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[25.89,5.19],[27.46,5.02],[28.36,4.29],[29.64,4.64],[30.86,3.49],[30.73,2.45],[31.3,2.12],[29.96,0.83],[29.6,-1.39],[29.02,-2.74],[29.23,-3.75],[29.42,-4.45],[29.55,-6.3],[30.77,-8.19],[28.9,-8.48],[28.37,-9.26],[28.7,-10.65],[28.36,-11.55],[29.03,-12.38],[29.81,-12.16],[29.8,-13.45],[29.02,-13.4],[27.2,-11.57],[26.87,-11.97],[26,-11.9],[25.33,-11.19],[24.45,-11.46],[23.99,-10.87],[22.25,-11.21],[21.78,-7.28],[19.54,-7],[19.37,-8],[17.62,-8.1],[16.58,-5.9],[14,-5.85],[13.18,-5.86],[12.21,-5.77],[13.09,-4.66],[13.09,-4.63],[13.41,-4.88],[14.4,-4.28],[14.66,-4.91],[15.89,-3.94],[16.2,-2.18],[17.71,-0.54],[18.62,3.48],[18.54,4.34],[19.42,5.13],[20.59,4.41],[22.38,4.13],[22.9,4.82],[25.89,5.19]]]]},"properties":{"name":"Congo, Democratic Republic of the"},"id":"CD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-157.89,-21.94],[-157.96,-21.9],[-157.92,-21.88],[-157.89,-21.94]]],[[[-159.74,-21.25],[-159.83,-21.2],[-159.75,-21.19],[-159.74,-21.25]]],[[[-157.32,-20.19],[-157.33,-20.13],[-157.31,-20.15],[-157.32,-20.19]]]]},"properties":{"name":"Cook Islands"},"id":"CK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-85.09,11.01],[-83.65,10.92],[-82.56,9.56],[-82.93,9.47],[-82.9,8.03],[-84.74,9.97],[-85.24,10.2],[-85.14,9.59],[-85.66,9.91],[-85.69,11.08],[-85.09,11.01]]]]},"properties":{"name":"Costa Rica"},"id":"CR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[17.3,43.01],[17.65,42.89],[18.46,42.57],[18.5,42.45],[17.3,43.01]]],[[[16.85,43.27],[16.4,43.33],[16.75,43.36],[16.85,43.27]]],[[[14.46,44.91],[14.49,44.61],[14.29,44.91],[14.4,44.92],[14.32,45.17],[14.46,44.91]]],[[[14.76,44.94],[14.43,45.08],[14.54,45.24],[14.76,44.94]]],[[[16.57,46.48],[16.61,46.48],[17.67,45.83],[18.82,45.91],[19.42,45.23],[19.04,44.86],[15.79,45.17],[16.14,44.2],[17.58,42.94],[16.88,43.4],[15.99,43.5],[14.48,45.31],[14.29,45.32],[14.17,44.98],[13.9,44.77],[13.59,45.48],[15.17,45.43],[15.65,46.22],[16.57,46.48]]]]},"properties":{"name":"Croatia"},"id":"HR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-82.55,21.57],[-83.19,21.62],[-82.97,21.94],[-82.55,21.57]]],[[[-82,23.19],[-80.03,22.95],[-74.13,20.19],[-77.72,19.83],[-77.24,20.66],[-78.05,20.7],[-78.75,21.64],[-81.82,22.18],[-82.16,22.4],[-81.65,22.49],[-81.89,22.68],[-82.76,22.7],[-83.37,22.2],[-83.93,22.16],[-84.03,21.91],[-84.95,21.86],[-84.34,22.01],[-84.4,22.33],[-84.08,22.66],[-82,23.19]]]]},"properties":{"name":"Cuba"},"id":"CU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[33.65,35.35],[34.59,35.69],[33.03,34.56],[32.27,35.04],[33.65,35.35]]]]},"properties":{"name":"Cyprus"},"id":"CY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[14.7,48.58],[13.83,48.77],[12.09,50.32],[14.83,50.87],[16.34,50.66],[16.64,50.11],[17.72,50.32],[18.85,49.52],[16.95,48.62],[15.03,49.02],[14.7,48.58]]]]},"properties":{"name":"Czech Republic"},"id":"CZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.48,6.34],[1.64,6.22],[1.4,9.43],[0.78,10.38],[0.92,11],[2.4,11.9],[2.84,12.4],[3.6,11.69],[3.86,10.58],[2.79,9.04],[2.72,6.37],[2.48,6.34]]]]},"properties":{"name":"Benin"},"id":"BJ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[10.75,55.48],[10.5,55.03],[9.68,55.5],[10.75,55.48]]],[[[12.57,55.99],[12.07,54.97],[10.87,55.73],[12.57,55.99]]],[[[8.92,56.92],[8.77,56.69],[8.51,56.74],[8.92,56.92]]],[[[9.97,57.07],[10.31,56.98],[10.31,56.75],[9.87,56.65],[10.96,56.44],[9.55,55.71],[9.77,54.89],[9.45,54.83],[8.66,54.91],[8.62,55.43],[8.09,55.55],[8.17,56.65],[8.73,56.48],[8.68,56.62],[9.08,56.81],[9.15,56.7],[9.06,56.57],[9.27,56.63],[9.32,56.53],[9.18,56.92],[9.97,57.07]]],[[[10.43,57.59],[10.34,56.99],[10.01,57.09],[9.12,57.05],[8.67,56.95],[8.42,56.68],[8.59,56.69],[8.55,56.58],[8.24,56.71],[8.62,57.12],[9.39,57.15],[9.95,57.58],[10.65,57.74],[10.43,57.59]]]]},"properties":{"name":"Denmark"},"id":"DK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-61.36,15.2],[-61.45,15.63],[-61.25,15.46],[-61.36,15.2]]]]},"properties":{"name":"Dominica"},"id":"DM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-70.78,19.85],[-69.22,19.36],[-69.63,19.1],[-68.73,18.95],[-68.45,18.36],[-70.69,18.43],[-71.42,17.6],[-71.77,18.04],[-71.75,19.71],[-70.78,19.85]]]]},"properties":{"name":"Dominican Republic"},"id":"DO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-91.22,-0.01],[-90.81,-0.73],[-91.38,-1.03],[-91.08,-0.59],[-91.61,0],[-91.22,-0.01]]],[[[-78.59,1.24],[-77.38,0.38],[-75.29,-0.12],[-75.63,-0.11],[-75.22,-0.97],[-75.56,-1.53],[-78.34,-3.42],[-78.71,-4.58],[-79.05,-5.01],[-79.65,-4.43],[-80.47,-4.44],[-80.34,-3.38],[-79.76,-2.01],[-80.26,-2.74],[-80.89,-2.32],[-80.91,-1.03],[-80.26,-0.63],[-80.06,0.83],[-78.81,1.44],[-78.59,1.24]]]]},"properties":{"name":"Ecuador"},"id":"EC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-89.34,14.42],[-87.75,13.86],[-87.82,13.41],[-88.54,13.19],[-90.1,13.75],[-89.35,14.43],[-89.34,14.42]]]]},"properties":{"name":"El Salvador"},"id":"SV"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[10.03,2.17],[11.34,2.17],[11.35,1],[9.8,1],[9.36,1.17],[9.81,2.34],[10.03,2.17]]]]},"properties":{"name":"Equatorial Guinea"},"id":"GQ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[36.54,14.26],[37.29,14.45],[37.57,14.1],[37.91,14.88],[38.45,14.42],[40.23,14.44],[42.4,12.47],[41.79,11.01],[42.94,11],[42.85,10.22],[44.01,9.01],[47.99,8],[44.95,4.9],[43.69,4.89],[41.91,3.98],[40.78,4.29],[39.52,3.41],[35.94,4.62],[34.7,6.68],[32.99,7.92],[33.25,8.46],[34.12,8.58],[34.29,10.55],[34.86,10.73],[35.1,11.83],[36.14,12.71],[36.54,14.26]]]]},"properties":{"name":"Ethiopia"},"id":"ET"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[38.8,17.65],[39.72,15.08],[39.88,15.49],[41.17,14.63],[43.12,12.71],[42.4,12.47],[40.23,14.44],[38.45,14.42],[37.91,14.88],[37.57,14.1],[37.29,14.45],[36.54,14.26],[37,17.07],[38.6,17.99],[38.8,17.65]]]]},"properties":{"name":"Eritrea"},"id":"ER"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[22.99,58.6],[23.33,58.44],[21.99,57.92],[21.83,58.5],[22.99,58.6]]],[[[22.75,59],[23.05,58.84],[22.04,58.94],[22.75,59]]],[[[25.78,59.63],[28.02,59.48],[27.43,58.81],[27.82,57.87],[27.37,57.54],[25.29,58.08],[24.31,57.87],[24.56,58.33],[23.73,58.37],[23.46,59.21],[25.78,59.63]]]]},"properties":{"name":"Estonia"},"id":"EE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-7.05,62.07],[-7.2,62.02],[-7.44,62.14],[-7.05,62.07]]],[[[-6.71,61.94],[-7.23,62.17],[-7.21,62.28],[-6.71,61.94]]],[[[-6.66,62.09],[-7.06,62.31],[-6.6,62.2],[-6.66,62.09]]]]},"properties":{"name":"Faroe Islands"},"id":"FO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-59.21,-51.41],[-60.37,-52.16],[-60.98,-52.06],[-60.18,-51.76],[-60.64,-51.36],[-59.21,-51.41]]],[[[-58.7,-51.34],[-57.73,-51.69],[-59.72,-52.12],[-58.7,-51.34]]]]},"properties":{"name":"Falkland Islands (Islas Malvinas)"},"id":"FK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-37.5,-54.01],[-35.78,-54.77],[-38.03,-54.05],[-37.5,-54.01]]]]},"properties":{"name":"South Georgia South Sandwich Islands"},"id":"GS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[179.96,-16.2],[179.48,-16.7],[179.93,-16.46],[179.9,-16.77],[178.48,-16.78],[179.96,-16.2]]],[[[-179.97,-16.17],[-180,-16.15],[-179.94,-16.13],[-179.97,-16.17]]]]},"properties":{"name":"Fiji"},"id":"FJ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[28.17,69.91],[29.18,69.64],[28.96,69.05],[28.43,68.9],[28.82,68.84],[28.69,68.2],[30.03,67.69],[29.07,66.9],[30.13,65.72],[29.64,64.93],[30.58,64.22],[29.99,63.74],[31.59,62.91],[27.81,60.55],[22.91,59.8],[23.34,60.02],[23.09,60.35],[21.36,60.65],[21.67,61.55],[21.06,62.61],[21.5,63.21],[25.45,64.95],[25.31,65.51],[24.17,65.81],[23.66,66.31],[24.01,66.8],[23.43,67.47],[23.67,67.94],[21.81,68.57],[20.58,69.06],[21.32,69.33],[22.4,68.71],[24.93,68.58],[26.45,69.93],[28.17,69.91]]]]},"properties":{"name":"Finland"},"id":"FI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[20.08,60.35],[19.94,60.04],[19.65,60.26],[20.08,60.35]]]]},"properties":{"name":"Aland Islands"},"id":"AX"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[9.45,42.68],[9.18,41.36],[8.58,42.38],[9.35,43],[9.45,42.68]]],[[[2.54,51.09],[4.15,49.98],[4.83,50.17],[5.81,49.55],[6.36,49.46],[8.23,48.96],[7.59,47.58],[6.99,47.5],[5.97,46.21],[6.79,46.43],[7.04,45.93],[7.13,45.26],[6.62,45.11],[6.98,44.28],[7.66,44.17],[7.53,43.79],[7.44,43.76],[7.42,43.77],[7.39,43.73],[6.17,43.05],[3.96,43.54],[3.08,43.07],[3.18,42.44],[1.72,42.51],[1.78,42.57],[1.45,42.6],[-1.78,43.36],[-1.04,44.68],[-1.25,44.66],[-1.08,45.56],[-0.54,44.9],[-0.78,45.46],[-1.24,45.7],[-1.11,46.32],[-2.13,46.84],[-2.13,47.28],[-1.73,47.21],[-4.37,47.8],[-4.73,48.04],[-4.19,48.3],[-4.78,48.51],[-1.37,48.64],[-1.94,49.72],[0.42,49.45],[0.07,49.53],[1.46,50.12],[1.63,50.88],[2.54,51.09]]]]},"properties":{"name":"France"},"id":"FR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-53.49,5.57],[-52.29,4.94],[-52.04,4.33],[-51.85,4.65],[-51.68,4.03],[-52.91,2.2],[-54.6,2.33],[-54,3.45],[-54.48,4.75],[-54.17,5.35],[-53.94,5.74],[-53.49,5.57]]]]},"properties":{"name":"French Guiana"},"id":"GF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-149.21,-17.73],[-149.18,-17.87],[-149.63,-17.55],[-149.21,-17.73]]],[[[-151.4,-16.89],[-151.48,-16.9],[-151.48,-16.74],[-151.4,-16.89]]],[[[-138.96,-9.74],[-138.81,-9.74],[-139.17,-9.78],[-138.96,-9.74]]],[[[-140.03,-8.9],[-140.19,-8.95],[-140.25,-8.8],[-140.03,-8.9]]]]},"properties":{"name":"French Polynesia"},"id":"PF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[69,-48.8],[69.58,-49.3],[70.57,-49.25],[69.77,-49.39],[70.25,-49.69],[68.8,-49.72],[69,-48.8]]]]},"properties":{"name":"French Southern and Antarctic Lands"},"id":"TF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[42.87,11.59],[43.25,11.47],[42.94,11],[41.79,11.01],[42.4,12.47],[43.12,12.71],[43.41,12.06],[42.51,11.57],[42.87,11.59]]]]},"properties":{"name":"Djibouti"},"id":"DJ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[12.52,2.28],[13.29,2.16],[13.19,1.22],[14.19,1.39],[14.49,0.91],[13.85,-0.2],[14.52,-0.61],[14.43,-1.89],[14.11,-2.49],[13.76,-2.09],[13,-2.37],[12.65,-1.82],[12.48,-2.33],[11.57,-2.33],[11.93,-3.64],[11.14,-3.93],[9.62,-2.38],[8.71,-0.64],[9.3,-0.37],[9.35,0.36],[9.92,0.19],[9.3,0.53],[9.8,1],[11.35,1],[11.34,2.17],[12.52,2.28]]]]},"properties":{"name":"Gabon"},"id":"GA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[41.55,42.41],[40,43.38],[42.85,43.18],[43.91,42.58],[44.93,42.76],[46.45,41.9],[46.52,41.05],[45.02,41.3],[43.46,41.11],[42.83,41.58],[41.53,41.52],[41.55,42.41]]]]},"properties":{"name":"Georgia"},"id":"GE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-16.73,13.45],[-16.2,13.25],[-16.16,13.43],[-15.3,13.49],[-16.14,13.45],[-16.39,13.33],[-16.57,13.59],[-15.07,13.83],[-13.8,13.41],[-15.11,13.6],[-15.29,13.37],[-15.8,13.35],[-15.81,13.16],[-16.75,13.06],[-16.73,13.45]]]]},"properties":{"name":"Gambia, The"},"id":"GM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[34.33,31.26],[34.27,31.22],[34.22,31.32],[34.49,31.6],[34.33,31.26]]],[[[35.28,32.52],[35.55,32.39],[35.48,31.5],[34.88,31.39],[35.28,32.52]],[[35.25,31.79],[35.26,31.79],[35.25,31.81],[35.25,31.79]]]]},"properties":{"name":"Palestine"},"id":"PS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[10.98,54.38],[10.82,53.89],[12.53,54.47],[14.28,53.7],[14.83,50.87],[12.09,50.32],[13.83,48.77],[12.76,48.12],[13.02,47.47],[9.57,47.54],[7.7,47.54],[7.59,47.58],[8.23,48.96],[6.36,49.46],[6.13,50.13],[6.01,50.76],[5.96,51.81],[6.83,51.97],[7.07,52.39],[6.69,52.55],[7.21,53.24],[7.3,53.69],[8.5,53.35],[8.67,53.89],[9.83,53.54],[8.9,53.94],[8.6,54.33],[9.02,54.5],[8.28,54.75],[8.66,54.91],[9.45,54.83],[10.98,54.38]]]]},"properties":{"name":"Germany"},"id":"DE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[0.64,5.85],[0.66,5.75],[0.26,5.76],[-0.8,5.21],[-1.61,5.02],[-2.06,4.73],[-2.93,5.1],[-3.25,6.61],[-2.49,8.2],[-2.69,9.48],[-2.83,11],[-0.15,11.14],[0.73,8.32],[0.53,6.95],[1.2,6.1],[0.69,5.75],[0.63,5.95],[0.51,6.06],[0.41,6.08],[0.37,6.04],[0.26,6.1],[0.21,6.09],[0.36,6.02],[0.42,6.07],[0.49,6.04],[0.61,5.95],[0.64,5.85]]]]},"properties":{"name":"Ghana"},"id":"GH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-5.33,36.16],[-5.34,36.11],[-5.36,36.16],[-5.33,36.16]]]]},"properties":{"name":"Gibraltar"},"id":"GI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[175.59,-1.92],[175.55,-1.82],[175.59,-1.88],[175.59,-1.92]]],[[[175.04,-1.55],[175,-1.53],[175.05,-1.43],[175.04,-1.55]]],[[[173.62,0.13],[173.6,0.21],[173.63,0.22],[173.62,0.13]]],[[[173.02,1.01],[173.08,0.95],[172.98,0.82],[173.02,1.01]]],[[[173.01,1.71],[172.93,1.94],[173.03,1.82],[173.01,1.71]]],[[[172.87,3.06],[172.77,3],[172.75,3.02],[172.87,3.06]]]]},"properties":{"name":"Kiribati"},"id":"KI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[23.86,35.52],[26.29,35.13],[24.75,34.94],[23.52,35.29],[23.86,35.52]]],[[[23.46,38.85],[24.56,37.99],[22.83,38.83],[23.46,38.85]]],[[[26.29,41.71],[26.36,41.71],[26.63,41.35],[26.04,40.74],[23.74,40.75],[24.4,40.15],[23.35,40.25],[23.71,39.91],[22.59,40.48],[23.34,39.18],[22.94,39.36],[23.07,39.04],[22.52,38.86],[24.07,38.2],[24.03,37.65],[23.52,38.04],[22.99,37.88],[23.51,37.43],[22.73,37.57],[23.2,36.43],[22.63,36.8],[22.49,36.39],[22.15,37.02],[21.7,36.82],[21.11,37.85],[21.86,38.34],[23.23,38.15],[22.4,38.45],[21.15,38.3],[20.73,38.8],[21.15,39],[20.01,39.69],[20.98,40.86],[22.94,41.34],[25.29,41.24],[26.29,41.71]]]]},"properties":{"name":"Greece"},"id":"GR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-52.69,69.92],[-51.83,69.63],[-53.57,69.23],[-54.27,69.4],[-53.35,69.58],[-54.99,69.69],[-54.39,69.68],[-54.94,69.85],[-54.23,69.91],[-54.83,70.08],[-54.43,70.31],[-52.69,69.92]]],[[[-23.61,72.83],[-21.93,72.4],[-22.76,72.44],[-22.13,72.27],[-22.56,72.14],[-24.48,72.83],[-23.61,72.83]]],[[[-32.3,83.57],[-25.65,83.29],[-35.62,82.9],[-25.14,83.16],[-24.75,83],[-25.9,82.78],[-21.31,82.61],[-25.07,82.15],[-31.62,82.21],[-29.9,82.09],[-33.1,81.77],[-25.2,81.99],[-27.63,81.49],[-27.33,81.38],[-22.02,81.93],[-22.23,81.47],[-24.51,80.54],[-19.94,81.68],[-20.31,81.45],[-16.7,81.93],[-12.16,81.6],[-16.01,80.73],[-21.25,80.58],[-16.11,80.5],[-20.55,80.11],[-20.33,79.76],[-17.45,80.06],[-19.63,79.66],[-19.87,79.15],[-19.08,79.2],[-21.18,78.81],[-20.91,78.62],[-22.04,77.69],[-19.24,77.76],[-18.96,77.63],[-21.05,77.54],[-18.4,77.34],[-18.31,76.81],[-22.74,76.7],[-19.81,76.23],[-21.98,75.99],[-19.83,75.91],[-19.34,75.4],[-19.88,75.15],[-22.25,75.66],[-20.52,75.14],[-22.44,75.16],[-18.98,74.48],[-22.48,74.31],[-21.82,73.65],[-21.75,74.06],[-20.28,73.88],[-20.5,73.45],[-22.38,73.25],[-24.03,73.7],[-22.18,73.62],[-24.04,73.81],[-24.46,73.54],[-25.69,73.95],[-24.67,73.51],[-27.34,73.49],[-26.39,73.24],[-27.73,73.13],[-25.05,73.08],[-27.39,72.84],[-24.84,72.72],[-24.61,72.52],[-25.91,72.41],[-22.49,71.89],[-23.13,71.63],[-21.9,71.74],[-22.47,71.26],[-21.81,71.51],[-21.69,71.15],[-22.33,71.05],[-21.68,71.07],[-21.93,70.8],[-21.47,70.54],[-22.38,70.44],[-22.51,70.85],[-22.62,70.45],[-23.35,70.44],[-24.74,71.33],[-28.64,72.12],[-27.33,71.71],[-28.47,71.55],[-25.41,71.35],[-28.41,70.98],[-27.91,70.87],[-29.21,70.39],[-26.32,70.37],[-28.54,70.04],[-25.23,70.41],[-22.08,70.13],[-26.36,68.67],[-29.38,68.2],[-31.57,68.07],[-32.49,68.62],[-32.12,67.86],[-33.2,67.69],[-34.72,66.34],[-35.85,66.43],[-35.59,66.11],[-37.19,65.77],[-37.81,66.03],[-37.18,66.34],[-38.11,66.39],[-37.69,66.26],[-38.48,66.01],[-38.24,65.63],[-40.1,65.57],[-39.76,65.24],[-41.16,64.96],[-40.36,64.35],[-41.57,64.27],[-40.57,64.11],[-40.52,63.7],[-41.62,63.79],[-40.75,63.51],[-41.91,63.46],[-41.43,63.13],[-42.17,63.2],[-41.76,62.84],[-43.15,62.76],[-42.16,62.38],[-42.98,62.52],[-42.12,62.01],[-43.08,61.59],[-42.51,61.36],[-43.25,61.34],[-42.63,61.1],[-43.61,61.13],[-42.7,61.06],[-43.53,60.84],[-42.75,60.68],[-44.2,60.59],[-43.14,60.08],[-44.1,60.38],[-45.15,60.07],[-44.47,60.56],[-45.19,60.13],[-44.63,60.73],[-45.98,60.57],[-45.25,60.9],[-46.22,60.75],[-45.2,61.19],[-46.07,60.92],[-45.77,61.33],[-46.86,60.8],[-48.24,60.82],[-47.69,61],[-48.41,60.99],[-47.92,61.32],[-49.3,61.56],[-48.6,61.64],[-49.15,61.72],[-48.76,61.98],[-49.44,61.84],[-48.84,62.08],[-49.67,62],[-49.29,62.17],[-50.32,62.5],[-49.7,63.06],[-50.38,62.78],[-50.15,63.02],[-50.61,63.09],[-50.06,63.23],[-51.11,63.34],[-50.28,63.4],[-51.22,63.44],[-50.5,63.67],[-51.56,63.71],[-50.92,63.93],[-51.6,64.03],[-50.05,64.19],[-51.76,64.18],[-50.17,64.45],[-50.86,64.63],[-49.58,64.34],[-50,64.87],[-50.98,65.22],[-50.64,64.75],[-52.01,64.2],[-52.12,64.72],[-51.25,65.02],[-52.21,64.81],[-52.1,65.24],[-52.56,65.33],[-50.55,65.71],[-52.5,65.39],[-53.27,65.75],[-51.83,66.06],[-53.46,66.03],[-50,66.98],[-53.48,66.1],[-53.12,66.29],[-53.63,66.5],[-52.42,66.55],[-53.45,66.64],[-52.23,66.84],[-53.97,67.07],[-50.35,67.18],[-53.88,67.26],[-52.5,67.77],[-50.07,67.51],[-51.23,67.7],[-50.42,67.84],[-51.06,67.97],[-53.75,67.6],[-53.19,68.04],[-52.06,67.98],[-53.32,68.18],[-50.15,67.93],[-51.43,68.2],[-50.82,68.5],[-53.39,68.33],[-50.87,68.61],[-51.29,68.75],[-51.07,69.13],[-50.21,68.96],[-50.69,69.12],[-50.38,69.34],[-51.12,69.2],[-50.2,69.52],[-50.88,69.49],[-50.21,70.02],[-54.63,70.65],[-50.49,70.51],[-51.95,71.02],[-50.93,70.99],[-51.23,71.14],[-52.25,71.12],[-51.65,71.36],[-52.56,71.17],[-51.35,71.49],[-52.98,71.42],[-51.64,71.71],[-53.25,71.7],[-52.68,72],[-53.32,71.82],[-53.56,72.36],[-53.96,72.32],[-53.4,71.85],[-54.1,71.71],[-53.92,71.44],[-55.91,71.68],[-54.38,72.22],[-55.3,71.93],[-54.68,72.37],[-55.63,72.46],[-54.3,72.48],[-55.7,73.07],[-55.09,73.36],[-56.08,73.65],[-55.61,73.72],[-56.41,74.07],[-56.13,74.28],[-57.33,74.11],[-56.19,74.55],[-58.7,75.35],[-58.21,75.44],[-58.41,75.72],[-60.88,76.15],[-68.5,76.09],[-69.63,76.38],[-67.98,76.68],[-71.38,77.06],[-66.45,77.13],[-69.1,77.27],[-66.06,77.49],[-69.25,77.45],[-73.05,78.16],[-65.98,79.1],[-64.82,79.53],[-65.07,80.01],[-63.78,80.15],[-67.48,80.33],[-63.68,81.14],[-62.79,80.75],[-63.37,81.16],[-61.06,81.12],[-61.31,81.36],[-60.77,81.5],[-61.45,81.75],[-60.81,81.88],[-56.48,81.33],[-59.47,82],[-54.51,82.37],[-53.56,82.12],[-53.63,81.51],[-52.9,82.03],[-49.61,81.64],[-51.07,81.93],[-49.43,81.93],[-51.12,82.49],[-50.32,82.52],[-44.64,81.75],[-44.18,81.83],[-44.93,81.99],[-44.62,82.28],[-42.3,82.22],[-45.77,82.76],[-39.75,82.4],[-46.89,82.96],[-43.39,82.91],[-45.52,83.12],[-42.7,83.27],[-38.57,82.74],[-39.15,82.98],[-36.88,83.15],[-38.86,83.43],[-32.3,83.57]]]]},"properties":{"name":"Greenland"},"id":"GL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-61.75,12],[-61.61,12.23],[-61.63,12.05],[-61.75,12]]],[[[-61.43,12.45],[-61.5,12.44],[-61.43,12.53],[-61.43,12.45]]]]},"properties":{"name":"Grenada"},"id":"GD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-61.35,16.33],[-61.7,15.95],[-61.78,16.33],[-61.35,16.33]]]]},"properties":{"name":"Guadeloupe"},"id":"GP"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[144.71,13.23],[144.66,13.43],[144.88,13.65],[144.71,13.23]]]]},"properties":{"name":"Guam"},"id":"GU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-90.63,13.93],[-92.25,14.55],[-91.73,16.07],[-90.44,16.09],[-91.44,17.24],[-90.98,17.26],[-90.98,17.82],[-89.14,17.82],[-89.22,15.89],[-88.91,15.89],[-88.21,15.72],[-89.35,14.43],[-90.1,13.75],[-90.63,13.93]]]]},"properties":{"name":"Guatemala"},"id":"GT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-13.6,9.73],[-15.02,10.96],[-14.69,11.51],[-13.71,11.72],[-13.71,12.68],[-11.37,12.41],[-10.65,11.89],[-9.16,12.49],[-8.53,11.49],[-8.68,10.97],[-8.29,11.01],[-7.97,10.17],[-7.65,8.38],[-8.2,8.5],[-7.95,8.02],[-8.47,7.56],[-9.49,7.36],[-9.48,8.35],[-10.27,8.49],[-10.7,8.3],[-10.57,9.06],[-11.21,10],[-12.46,9.89],[-13.3,9.03],[-13.6,9.73]]]]},"properties":{"name":"Guinea"},"id":"GN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-59.79,8.34],[-58.47,7.35],[-58.65,6.43],[-58.31,6.89],[-57.2,6.15],[-57.25,5.49],[-58.05,4.01],[-56.47,1.94],[-58.81,1.19],[-59.64,1.73],[-59.99,2.69],[-59.57,3.9],[-60.15,4.52],[-60.1,5.22],[-60.73,5.2],[-61.39,5.94],[-61.13,6.71],[-60.29,7.06],[-60.72,7.54],[-59.83,8.24],[-59.99,8.54],[-59.79,8.34]]]]},"properties":{"name":"Guyana"},"id":"GY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-72.67,19.92],[-71.75,19.71],[-71.77,18.04],[-74.45,18.34],[-74.27,18.67],[-72.35,18.53],[-72.72,19.45],[-73.47,19.69],[-72.67,19.92]]]]},"properties":{"name":"Haiti"},"id":"HT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[73.77,-53.13],[73.47,-53.19],[73.23,-52.99],[73.77,-53.13]]]]},"properties":{"name":"Heard Island and McDonald Islands"},"id":"HM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[12.45,41.9],[12.45,41.91],[12.46,41.9],[12.45,41.9]]]]},"properties":{"name":"Holy See (Vatican City)"},"id":"VA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-85.84,16.01],[-84.26,15.83],[-83.13,14.99],[-83.24,14.98],[-84.91,14.81],[-87.3,12.99],[-87.82,13.41],[-87.75,13.86],[-89.34,14.42],[-89.35,14.43],[-88.21,15.72],[-85.84,16.01]]]]},"properties":{"name":"Honduras"},"id":"HN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[114.25,22.2],[114.12,22.28],[114.2,22.29],[114.25,22.2]]],[[[113.9,22.2],[113.83,22.23],[114.05,22.34],[113.9,22.2]]],[[[114.22,22.47],[114.03,22.51],[114.22,22.55],[114.22,22.47]]]]},"properties":{"name":"Hong Kong"},"id":"HK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[18.82,45.91],[17.67,45.83],[16.61,46.48],[16.11,46.87],[16.51,47.01],[16.45,47.7],[17.17,48.01],[17.25,48.02],[18.66,47.76],[20.66,48.56],[22.15,48.41],[22.89,47.95],[20.73,46.18],[20.26,46.11],[18.82,45.91]]]]},"properties":{"name":"Hungary"},"id":"HU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-15.07,66.14],[-14.34,65.78],[-14.56,65.49],[-13.61,65.51],[-14.03,65.19],[-13.5,65.07],[-14.93,64.26],[-18.71,63.39],[-21.05,63.95],[-22.69,63.81],[-21.51,64.65],[-24.06,64.89],[-21.84,65.03],[-22.56,65.17],[-21.7,65.45],[-24.54,65.5],[-23.23,65.74],[-23.87,65.87],[-23.21,65.84],[-23.82,66.01],[-23.47,66.2],[-22.42,65.85],[-22.94,66.47],[-21.4,66.03],[-21.78,65.77],[-21.08,65.16],[-20.18,66.13],[-19.45,65.73],[-18.78,66.19],[-18.07,65.64],[-18.3,66.17],[-16.59,66.09],[-16.53,66.51],[-14.71,66.37],[-15.07,66.14]]]]},"properties":{"name":"Iceland"},"id":"IS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[78.08,35.45],[79.53,32.75],[78.4,32.55],[78.77,31.31],[81.03,30.2],[80.06,28.84],[82.07,27.91],[83.29,27.34],[84.15,27.51],[85.86,26.57],[88.01,26.36],[88.14,27.87],[88.83,28.01],[88.92,27.32],[89.64,26.72],[92.07,26.86],[91.66,27.76],[92.54,27.86],[94.65,29.33],[95.39,29.04],[96.08,29.47],[96.62,28.79],[96.4,28.35],[97.35,28.22],[96.89,27.61],[97.14,27.09],[96.19,27.27],[95.14,26.61],[94.15,23.86],[93.34,24.08],[93.2,22.26],[92.6,21.98],[92.28,23.71],[91.61,22.94],[91.16,23.64],[92.41,25.03],[89.85,25.29],[89.74,26.16],[88.43,26.55],[88.11,25.84],[89.01,25.29],[88.04,24.68],[88.75,24.22],[89.06,22.12],[89.07,21.61],[88.71,21.57],[88.67,22.2],[88.25,21.55],[88.2,22.16],[87.91,22.42],[88.17,22.09],[86.96,21.38],[87.03,20.67],[86.42,19.98],[85.43,19.89],[82.36,17.1],[82.3,16.58],[80.28,15.7],[79.86,10.29],[79.32,10.28],[78.91,9.48],[79.45,9.15],[78.4,9.09],[77.54,8.07],[76.58,8.88],[73.45,16.06],[72.66,19.87],[72.93,20.77],[72.56,21.38],[73.13,21.75],[72.5,21.98],[72.92,22.27],[72.15,22.28],[72.11,21.2],[70.82,20.7],[68.94,22.29],[70.17,22.55],[70.51,23.1],[69.22,22.84],[68.43,23.43],[68.74,23.84],[68.2,23.77],[68.78,24.33],[71.11,24.42],[69.58,27.17],[70.37,28.02],[71.9,27.96],[74.69,31.05],[74.61,31.88],[75.38,32.21],[74.02,33.19],[74.3,33.98],[73.94,34.65],[76.87,34.66],[77.82,35.5],[78.08,35.45]]]]},"properties":{"name":"India"},"id":"IN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[120.03,-9.38],[120.72,-10.2],[118.93,-9.56],[120.03,-9.38]]],[[[125.16,-9.07],[125.13,-9.44],[124.44,-10.16],[123.49,-10.32],[124.05,-9.34],[124.34,-9.46],[124.45,-9.18],[124.95,-8.95],[125.16,-9.07]]],[[[116.55,-8.78],[115.84,-8.76],[116.39,-8.2],[116.55,-8.78]]],[[[124.58,-8.14],[125.14,-8.33],[124.35,-8.45],[124.58,-8.14]]],[[[118.31,-8.37],[119,-8.31],[119.18,-8.72],[116.75,-9.01],[117.12,-8.38],[117.97,-8.75],[118.28,-8.59],[117.74,-8.15],[118.31,-8.37]]],[[[122.98,-8.15],[122.83,-8.6],[121.77,-8.89],[119.8,-8.72],[120.52,-8.26],[122.29,-8.64],[122.98,-8.15]]],[[[115.5,-8.18],[115.13,-8.85],[114.45,-8.1],[115.5,-8.18]]],[[[126.72,-7.67],[125.77,-8.01],[125.97,-7.66],[126.72,-7.67]]],[[[138.97,-7.56],[138.44,-8.38],[137.64,-8.43],[138.15,-7.51],[138.97,-7.56]]],[[[131.74,-7.21],[131.11,-8],[131.24,-7.48],[131.74,-7.21]]],[[[113.99,-6.88],[113.5,-7.23],[112.69,-7.05],[113.99,-6.88]]],[[[106.16,-6.01],[108.31,-6.26],[108.73,-6.82],[110.39,-6.98],[110.92,-6.41],[112.56,-6.91],[112.85,-7.6],[114.45,-7.8],[114.37,-8.52],[114.62,-8.75],[108.16,-7.78],[105.24,-6.81],[106.16,-6.01]]],[[[134.58,-5.43],[134.73,-5.97],[134.3,-6.03],[134.58,-5.43]]],[[[123.21,-4.7],[122.65,-5.69],[122.9,-4.49],[123.21,-4.7]]],[[[126.99,-3.14],[127.24,-3.62],[126.7,-3.83],[126.02,-3.35],[126.99,-3.14]]],[[[129.81,-2.92],[130.58,-3.13],[130.83,-3.87],[128.17,-3.07],[127.91,-3.54],[128.17,-2.86],[129.81,-2.92]]],[[[107.83,-2.54],[108.27,-2.76],[108.07,-3.24],[107.61,-3.21],[107.83,-2.54]]],[[[133.59,-2.53],[133.5,-2.43],[133.61,-2.48],[133.59,-2.53]]],[[[134.57,-2.45],[134.52,-2.4],[134.57,-2.29],[134.57,-2.45]]],[[[134.37,-2.16],[134.33,-2.09],[134.39,-2],[134.37,-2.16]]],[[[130.19,-2.06],[129.72,-1.89],[130.35,-1.68],[130.19,-2.06]]],[[[125.01,-1.72],[125.32,-1.89],[124.33,-1.88],[125.01,-1.72]]],[[[136.29,-1.69],[136.9,-1.8],[135.42,-1.61],[136.29,-1.69]]],[[[106.09,-1.77],[106.72,-3.1],[105.13,-2.07],[105.57,-1.53],[106.09,-1.77]]],[[[127.88,-1.43],[128.15,-1.68],[127.38,-1.63],[127.88,-1.43]]],[[[133.11,-0.54],[134.11,-0.84],[134.16,-2.32],[135,-3.34],[137.86,-1.47],[141,-2.61],[141.01,-9.13],[139.99,-8.19],[140.15,-7.88],[138.91,-8.3],[139.1,-7.56],[138.66,-7.2],[139.22,-7.16],[138.56,-6.91],[139.19,-6.97],[138.06,-5.41],[134.22,-3.96],[133.64,-3.49],[133.83,-2.96],[132.9,-4.09],[132.82,-3.3],[131.96,-2.78],[133.24,-2.42],[133.68,-2.72],[133.94,-2.1],[132.3,-2.27],[130.96,-1.4],[132.27,-0.38],[133.11,-0.54]]],[[[130.88,-0.02],[131.26,-0.39],[130.21,-0.21],[130.88,-0.02]]],[[[97.53,1.42],[97.81,0.55],[97.11,1.39],[97.53,1.42]]],[[[125.14,1.42],[124.25,0.38],[120.24,0.35],[120.07,-0.61],[120.67,-1.4],[121.62,-0.8],[123.45,-0.84],[121.3,-1.8],[122.9,-4.4],[121.55,-4.75],[120.77,-2.61],[120.2,-2.96],[120.46,-5.62],[119.46,-5.56],[119.51,-3.53],[118.92,-3.57],[118.76,-2.77],[119.86,-0.84],[119.62,-0.01],[120.03,0.71],[120.95,1.34],[123.84,0.83],[124.97,1.69],[125.14,1.42]]],[[[127.89,1.8],[127.79,0.8],[128.73,1.56],[128.21,0.78],[128.91,0.2],[127.88,0.31],[128.4,-0.89],[127.67,-0.23],[127.39,1.05],[128.05,2.2],[127.89,1.8]]],[[[116.05,4.28],[117.59,4.17],[117.83,3.7],[117.03,3.59],[118.1,2.31],[117.87,1.88],[119.01,0.98],[117.89,1.12],[117.62,-0.78],[116.74,-1.02],[116.22,-1.78],[116.6,-2.23],[115.98,-3.59],[114.71,-4.18],[114.48,-3.5],[113.06,-2.99],[111.89,-3.57],[111.75,-2.74],[110.24,-2.98],[110.06,-1.33],[109.27,-0.86],[108.85,0.81],[109.65,2.07],[110.56,0.85],[111.83,1],[112.47,1.57],[114.56,1.43],[116.05,4.28]]],[[[95.74,5.59],[97.52,5.25],[100,2.6],[100.94,1.82],[101.06,2.29],[102.93,0.7],[102.54,0.17],[103.74,0.28],[103.36,-0.7],[104.38,-1.04],[104.88,-2.15],[104.53,-2.77],[104.86,-2.29],[105.61,-2.39],[106.06,-3.03],[105.73,-5.9],[105.27,-5.44],[105.14,-5.8],[104.54,-5.51],[104.56,-5.93],[101.63,-3.25],[100.29,-0.81],[99.14,0.26],[98.77,1.75],[95.53,4.68],[95.23,5.57],[95.74,5.59]]]]},"properties":{"name":"Indonesia"},"id":"ID"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[45,39.42],[46.18,38.84],[46.54,38.88],[47.98,39.72],[48.36,39.39],[48.02,38.84],[48.89,38.44],[49.1,37.64],[51.1,36.73],[53.94,36.8],[53.91,37.35],[57.21,38.28],[59.34,37.54],[60.33,36.66],[61.16,36.65],[61.28,35.61],[60.51,34.14],[60.94,33.52],[60.58,33.07],[60.84,31.5],[61.85,31.02],[60.87,29.86],[61.91,28.55],[62.78,28.27],[62.78,27.26],[63.34,27.12],[63.18,26.63],[61.86,26.23],[61.61,25.2],[57.32,25.77],[56.69,27.15],[54.79,26.49],[53.75,26.71],[51.43,27.94],[50.05,30.21],[49.55,30.01],[48.98,30.51],[48.55,29.96],[47.69,31],[47.86,31.8],[47.43,32.4],[46.11,32.97],[45.4,33.98],[45.8,34.91],[46.35,35.82],[45.41,35.99],[44.79,37.15],[44.03,39.38],[44.81,39.63],[45,39.42]]]]},"properties":{"name":"Iran"},"id":"IR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[45.8,34.91],[45.4,33.98],[46.11,32.97],[47.43,32.4],[47.86,31.8],[47.69,31],[48.55,29.96],[47.94,30.02],[47.93,30.02],[47.17,30.02],[46.55,29.1],[44.72,29.2],[42.08,31.11],[39.2,32.15],[38.79,33.38],[41,34.42],[41.29,36.36],[42.36,37.11],[44.79,37.15],[45.41,35.99],[46.35,35.82],[45.8,34.91]]]]},"properties":{"name":"Iraq"},"id":"IQ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-7.41,54.95],[-8.16,54.44],[-6.27,54.1],[-6.01,52.95],[-6.36,52.18],[-9.23,51.48],[-10.34,51.78],[-9.76,52.15],[-10.46,52.18],[-8.82,52.67],[-9.94,52.56],[-8.94,53.26],[-10.18,53.41],[-9.56,53.86],[-10.11,54.23],[-8.47,54.27],[-8.19,54.63],[-8.8,54.69],[-8.32,55.11],[-6.93,55.24],[-7.25,55.07],[-7.41,54.95]]]]},"properties":{"name":"Ireland"},"id":"IE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[35.26,31.79],[35.25,31.79],[35.25,31.81],[35.26,31.79]]],[[[35.62,33.25],[35.65,32.69],[35.55,32.39],[35.28,32.52],[34.88,31.39],[35.48,31.5],[34.98,29.55],[34.9,29.49],[34.27,31.22],[34.33,31.26],[34.49,31.6],[35.1,33.09],[35.62,33.25]]]]},"properties":{"name":"Israel"},"id":"IL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[15.53,38.14],[15.08,36.65],[12.42,37.8],[13.32,38.22],[15.53,38.14]]],[[[9.51,41.15],[9.57,39.15],[8.41,38.96],[8.19,40.91],[9.51,41.15]]],[[[12.13,47],[13.72,46.53],[13.38,46.3],[13.72,45.6],[12.28,45.47],[12.37,44.25],[13.62,43.55],[14.74,42.09],[16.14,41.91],[15.93,41.48],[18.51,40.14],[18.35,39.79],[16.91,40.45],[16.49,39.77],[17.17,38.96],[16.06,37.92],[15.63,38.01],[16.22,38.91],[15.67,40.03],[11.1,42.39],[10.11,44.01],[8.75,44.43],[7.53,43.79],[7.66,44.17],[6.98,44.28],[6.62,45.11],[7.13,45.26],[7.04,45.93],[7.86,45.92],[8.44,46.46],[9.04,45.84],[9.28,46.5],[10.13,46.23],[10.47,46.87],[12.13,47]],[[12.46,43.9],[12.51,43.99],[12.42,43.96],[12.46,43.9]],[[12.45,41.9],[12.46,41.9],[12.45,41.91],[12.45,41.9]]]]},"properties":{"name":"Italy"},"id":"IT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-4.79,5.17],[-7.53,4.35],[-7.42,5.84],[-8.61,6.51],[-8.47,7.56],[-7.95,8.02],[-8.2,8.5],[-7.65,8.38],[-7.97,10.17],[-6.99,10.15],[-6.24,10.74],[-6.11,10.2],[-5.52,10.44],[-4.7,9.7],[-3.63,9.95],[-2.69,9.48],[-2.49,8.2],[-3.25,6.61],[-2.93,5.1],[-4.79,5.17]]]]},"properties":{"name":"Cote d'Ivoire"},"id":"CI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-77.13,17.88],[-78.34,18.36],[-76.95,18.39],[-76.22,17.9],[-77.13,17.88]]]]},"properties":{"name":"Jamaica"},"id":"JM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[131.21,33.6],[131.67,33.65],[131.99,32.83],[131.34,31.37],[130.67,31],[130.81,31.68],[130.64,31.18],[130.23,31.25],[130.16,32.01],[130.61,32.79],[130.21,33.17],[130.35,32.66],[129.75,32.56],[129.58,33.35],[130.69,33.94],[131.21,33.6]]],[[[134.22,34.34],[134.75,33.83],[134.19,33.24],[133.6,33.5],[132.8,32.74],[132.37,33.47],[132.02,33.34],[132.9,34.11],[134.22,34.34]]],[[[141.27,41.34],[142.07,39.55],[141.53,38.27],[140.95,38.15],[140.84,35.74],[140.33,35.13],[139.77,34.95],[139.97,35.66],[138.85,34.59],[138.74,35.12],[138.21,34.6],[137.04,34.56],[137.35,34.72],[136.85,35.08],[136.52,34.69],[136.9,34.27],[135.77,33.45],[135.06,33.88],[135.33,34.72],[132.37,34.36],[132.05,33.77],[130.89,33.92],[130.95,34.42],[133.09,35.58],[136.07,35.65],[136.79,37.36],[137.36,37.5],[136.86,37.09],[137.3,36.75],[138.58,37.4],[140.02,39.38],[139.85,40.6],[140.35,41.25],[141.15,40.86],[141.23,41.23],[140.76,41.17],[141.27,41.34]]],[[[142.05,45.4],[143.77,44.09],[144.78,43.91],[145.34,44.34],[145.26,43.31],[145.82,43.37],[143.99,42.91],[143.24,41.92],[141.79,42.61],[140.46,42.57],[140.28,42.25],[141.2,41.8],[140.07,41.42],[139.84,42.62],[140.47,43.37],[141.41,43.29],[141.58,45.23],[142.05,45.4]]]]},"properties":{"name":"Japan"},"id":"JP"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[69.19,55.34],[70.84,55.3],[71.19,54.1],[73.76,54.07],[73.44,53.44],[76.81,54.45],[76.52,53.99],[77.91,53.27],[80.08,50.76],[80.69,51.31],[81.47,50.74],[83.46,51],[85.26,49.59],[86.77,49.79],[87.35,49.09],[85.76,48.39],[85.53,47.06],[83.04,47.21],[82.32,45.57],[82.56,45.13],[79.87,44.9],[80.52,44.73],[80.82,43.16],[80.38,43.03],[80.23,42.2],[79.19,42.8],[74.29,43.22],[73.58,43.04],[73.52,42.41],[71.75,42.82],[70.97,42.25],[69.06,41.38],[68.46,40.6],[67.94,41.18],[66.72,41.17],[66.53,42],[66.03,42],[66.12,43],[64.93,43.74],[62.03,43.48],[58.57,45.57],[56,45],[56,41.33],[54.17,42.34],[53.01,42.14],[52.44,41.74],[52.74,42.71],[51.27,43.15],[50.24,44.58],[51.57,44.51],[50.95,44.86],[51.41,45.37],[53.23,45.34],[52.73,45.55],[53.19,46.71],[51.19,47.11],[49.22,46.35],[48.56,46.56],[49.03,46.78],[48.2,47.7],[47.38,47.69],[46.5,48.42],[47.52,50.44],[48.8,49.94],[48.7,50.59],[50.77,51.77],[53.43,51.49],[54.52,50.53],[54.65,51.04],[55.69,50.53],[56.51,51.08],[58.34,51.16],[59.54,50.48],[61.38,50.78],[61.69,51.27],[60,51.96],[61.06,52.34],[60.69,52.68],[61.1,52.98],[62.12,53],[61.18,53.31],[61.58,53.51],[60.91,53.62],[61.01,53.95],[65.22,54.32],[69.19,55.34]]]]},"properties":{"name":"Kazakhstan"},"id":"KZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[34.96,29.36],[34.98,29.55],[35.48,31.5],[35.55,32.39],[35.65,32.69],[36.84,32.31],[38.79,33.38],[39.2,32.15],[37.01,31.51],[38,30.5],[37.5,30],[36.07,29.19],[34.96,29.36]]]]},"properties":{"name":"Jordan"},"id":"JO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[35.94,4.62],[39.52,3.41],[40.78,4.29],[41.91,3.98],[40.99,2.83],[41,-0.87],[41.56,-1.67],[40.24,-2.66],[39.2,-4.67],[37.61,-3.5],[37.6,-3],[33.92,-1],[33.91,0.1],[35.01,1.9],[34,4.22],[34.39,4.61],[35.94,4.62]]]]},"properties":{"name":"Kenya"},"id":"KE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[130.64,42.41],[130.7,42.29],[129.7,41.65],[129.71,40.83],[127.51,39.72],[127.39,39.2],[128.36,38.63],[126.69,37.83],[125.59,38.03],[125.34,37.67],[124.66,38.12],[125.65,38.63],[125.14,38.8],[125.45,39.58],[124.62,39.59],[124.37,40.09],[126.91,41.8],[128.16,41.38],[128.06,42],[129.71,42.44],[129.91,43.01],[130.6,42.42],[130.64,42.41]]]]},"properties":{"name":"Korea, North"},"id":"KP"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[128.53,38.33],[129.43,37.06],[129.44,35.48],[126.56,34.3],[126.25,35.12],[126.87,36.05],[126.12,36.71],[126.99,36.91],[126.69,37.83],[128.36,38.63],[128.53,38.33]]]]},"properties":{"name":"Korea, South"},"id":"KR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[47.93,30.02],[47.94,30.02],[48.17,29.55],[47.71,29.38],[48.42,28.55],[46.55,29.1],[47.17,30.02],[47.93,30.02]]]]},"properties":{"name":"Kuwait"},"id":"KW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[80.23,42.2],[78.08,41.04],[76.87,41.01],[76.35,40.35],[74.86,40.52],[73.66,39.45],[69.31,39.54],[69.54,40.13],[70.98,40.24],[73.17,40.82],[71.69,41.56],[71.42,41.12],[70.19,41.53],[71.28,42.2],[70.97,42.25],[71.75,42.82],[73.52,42.41],[73.58,43.04],[74.29,43.22],[79.19,42.8],[80.23,42.2]]]]},"properties":{"name":"Kyrgyzstan"},"id":"KG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[107.55,14.71],[106,14.37],[106.06,13.93],[105.21,14.35],[105.64,15.66],[104.75,16.53],[104.72,17.5],[103.4,18.43],[102.68,17.82],[102.09,18.21],[100.92,17.57],[101.28,19.56],[100.5,19.53],[100.58,20.16],[100.09,20.35],[101.15,21.57],[101.79,21.14],[101.57,22.21],[102.14,22.4],[102.98,21.74],[103.17,20.85],[104.64,20.66],[104.38,20.44],[104.98,20],[103.88,19.29],[105.19,18.64],[106.69,16.46],[107.46,16.08],[107.18,15.78],[107.7,15.27],[107.55,14.71]]]]},"properties":{"name":"Laos"},"id":"LA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[35.62,33.25],[35.1,33.09],[35.97,34.65],[36.62,34.2],[35.62,33.25]]]]},"properties":{"name":"Lebanon"},"id":"LB"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[27.56,-30.4],[27.01,-29.63],[28.57,-28.61],[29.43,-29.28],[29.17,-29.91],[28.08,-30.65],[27.56,-30.4]]]]},"properties":{"name":"Lesotho"},"id":"LS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[21.07,56.44],[21.73,57.58],[22.61,57.76],[23.79,56.97],[24.41,57.26],[24.31,57.87],[25.29,58.08],[27.37,57.54],[27.86,57.3],[28.17,56.15],[26.61,55.67],[25,56.3],[21.05,56.08],[21.07,56.44]]]]},"properties":{"name":"Latvia"},"id":"LV"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-10.81,6.4],[-11.49,6.93],[-10.27,8.49],[-9.48,8.35],[-9.49,7.36],[-8.47,7.56],[-8.61,6.51],[-7.42,5.84],[-7.53,4.35],[-10.81,6.4]]]]},"properties":{"name":"Liberia"},"id":"LR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[9.95,27.82],[9.54,30.23],[10.21,30.73],[10.29,31.69],[11.57,32.44],[11.53,33.17],[15.17,32.4],[15.76,31.39],[19,30.27],[20.06,30.86],[20.08,32.18],[21.62,32.93],[25.15,31.65],[24.71,30.17],[25,22],[25,20],[24,20],[24,19.5],[16,23.45],[15,23],[14.23,22.61],[11.99,23.52],[11.56,24.3],[10.25,24.61],[9.4,26.15],[9.87,26.51],[9.95,27.82]]]]},"properties":{"name":"Libya"},"id":"LY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[9.53,47.27],[9.6,47.06],[9.47,47.06],[9.53,47.27]]]]},"properties":{"name":"Liechtenstein"},"id":"LI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[25,56.3],[26.61,55.67],[26.82,55.28],[25.79,54.87],[25.79,54.16],[23.5,53.95],[22.79,54.36],[22.84,54.9],[21.43,55.25],[21.26,55.25],[21.05,56.08],[25,56.3]]]]},"properties":{"name":"Lithuania"},"id":"LT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[6.03,50.18],[6.13,50.13],[6.36,49.46],[5.81,49.55],[6.03,50.18]]]]},"properties":{"name":"Luxembourg"},"id":"LU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[113.53,22.19],[113.55,22.21],[113.55,22.18],[113.53,22.19]]]]},"properties":{"name":"Macau"},"id":"MO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[49.36,-12.09],[50.43,-15.58],[50.17,-15.98],[49.63,-15.56],[49.79,-16.83],[47.13,-24.93],[45.21,-25.59],[44.02,-24.99],[43.24,-22.28],[44.48,-19.97],[43.94,-17.48],[44.46,-16.18],[46.48,-15.97],[46.34,-15.62],[47.22,-15.45],[47.45,-14.67],[47.43,-15.11],[48,-14.77],[47.91,-13.6],[48.74,-13.43],[48.73,-12.43],[49.36,-12.09]]]]},"properties":{"name":"Madagascar"},"id":"MG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[34.73,-12.1],[34.7,-12.08],[34.72,-12.03],[34.75,-12.04],[34.73,-12.1]]],[[[34.62,-12.04],[34.6,-12.01],[34.63,-12.01],[34.62,-12.04]]],[[[33.13,-9.49],[34.33,-9.73],[34.97,-11.57],[34.38,-12.16],[34.57,-13.34],[35.92,-14.89],[35.81,-16.02],[35.14,-16.55],[35.29,-17.13],[34.26,-15.9],[34.52,-14.57],[33.63,-14.54],[33.22,-14.01],[32.68,-13.61],[33.55,-12.36],[33.25,-10.89],[33.7,-10.56],[32.94,-9.41],[33.13,-9.49]]]]},"properties":{"name":"Malawi"},"id":"MW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[100.65,6.45],[101.14,5.63],[102.1,6.24],[103.41,4.86],[103.44,2.93],[104.28,1.37],[103.96,1.65],[103.51,1.27],[101.28,2.84],[100.13,6.42],[100.65,6.45]]],[[[116.79,6.58],[117.18,6.99],[117.74,6.39],[117.5,5.9],[118.01,6.06],[117.96,5.68],[119.28,5.34],[118.14,4.89],[118.55,4.35],[117.59,4.17],[116.05,4.28],[114.56,1.43],[112.47,1.57],[111.83,1],[110.56,0.85],[109.65,2.07],[111.38,1.34],[111,1.58],[111.44,2.69],[113.01,3.16],[114.1,4.59],[114.64,4.02],[115.02,4.9],[115.03,4.82],[115.34,4.31],[115.22,4.8],[115.15,4.9],[116.76,7.02],[116.79,6.58]]]]},"properties":{"name":"Malaysia"},"id":"MY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[73.18,-0.69],[73.16,-0.68],[73.17,-0.68],[73.18,-0.69]]],[[[73.2,-0.68],[73.19,-0.68],[73.2,-0.67],[73.2,-0.68]]],[[[73.13,-0.67],[73.13,-0.67],[73.12,-0.65],[73.13,-0.67]]],[[[73.23,-0.65],[73.23,-0.63],[73.24,-0.62],[73.23,-0.65]]],[[[73.12,-0.64],[73.09,-0.61],[73.09,-0.58],[73.12,-0.64]]],[[[73.25,-0.61],[73.24,-0.59],[73.25,-0.58],[73.25,-0.61]]]]},"properties":{"name":"Maldives"},"id":"MV"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-8.53,11.49],[-9.16,12.49],[-10.65,11.89],[-11.37,12.41],[-12.24,14.76],[-11.49,15.65],[-10.9,15.11],[-9.34,15.7],[-5.5,15.5],[-6.58,25],[-4.81,25],[1.8,20.31],[3.23,19.82],[3.33,18.98],[4.25,19.15],[4.25,18.65],[4.2,16.39],[3.52,15.36],[0.24,14.92],[-0.73,15.08],[-2.47,14.29],[-3.44,13.17],[-3.96,13.5],[-4.42,12.3],[-5.27,11.84],[-5.52,10.44],[-6.11,10.2],[-6.24,10.74],[-6.99,10.15],[-7.97,10.17],[-8.29,11.01],[-8.68,10.97],[-8.53,11.49]]]]},"properties":{"name":"Mali"},"id":"ML"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[14.56,35.82],[14.37,35.85],[14.33,35.98],[14.56,35.82]]],[[[14.27,36.01],[14.18,36.06],[14.34,36.03],[14.27,36.01]]]]},"properties":{"name":"Malta"},"id":"MT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-60.86,14.4],[-61.17,14.88],[-60.94,14.74],[-60.86,14.4]]]]},"properties":{"name":"Martinique"},"id":"MQ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-6.66,26.13],[-4.81,25],[-6.58,25],[-5.5,15.5],[-9.34,15.7],[-10.9,15.11],[-11.49,15.65],[-12.24,14.76],[-14.35,16.64],[-16.28,16.52],[-16.53,16.06],[-16.04,17.73],[-16.51,19.35],[-16.2,20.22],[-16.92,21.16],[-17.05,20.76],[-16.95,21.34],[-15.74,21.34],[-13,21.34],[-13.11,22.89],[-12,23.45],[-12,26],[-8.67,26],[-8.67,27.29],[-6.66,26.13]]]]},"properties":{"name":"Mauritania"},"id":"MR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[57.57,-20.51],[57.3,-20.45],[57.62,-19.99],[57.57,-20.51]]]]},"properties":{"name":"Mauritius"},"id":"MU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-113.05,31.97],[-111.05,31.33],[-106.4,31.75],[-103.38,29.02],[-102.31,29.89],[-101.41,29.77],[-99.51,27.57],[-99.1,26.43],[-97.14,25.97],[-97.89,22.6],[-95.91,18.83],[-94.48,18.15],[-92,18.73],[-91.48,18.44],[-90.45,19.98],[-90.33,21.03],[-87.03,21.59],[-86.77,21.15],[-87.74,19.67],[-87.41,19.58],[-87.85,18.19],[-88.04,18.87],[-88.3,18.48],[-88.38,18.48],[-89.14,17.82],[-90.98,17.82],[-90.98,17.26],[-91.44,17.24],[-90.44,16.09],[-91.73,16.07],[-92.25,14.55],[-92.77,15.17],[-93.93,16.09],[-94.37,16.29],[-94.06,16.04],[-94.72,16.2],[-94.58,16.32],[-94.79,16.26],[-94.86,16.43],[-96.48,15.64],[-97.79,15.97],[-104.98,19.34],[-105.68,20.39],[-105.24,20.57],[-105.54,20.79],[-105.19,21.44],[-105.82,22.66],[-108.04,25.07],[-109.11,25.53],[-108.83,25.8],[-109.39,25.76],[-109.1,26.28],[-110.53,27.37],[-110.51,27.87],[-112.16,28.97],[-113.09,31.23],[-115.03,31.97],[-114.55,30],[-111.56,26.72],[-110.66,24.34],[-109.41,23.47],[-110,22.89],[-112.09,24.76],[-112.4,26.27],[-114.99,27.72],[-113.98,27.7],[-114.31,27.87],[-114.06,28.53],[-115.69,29.77],[-117.12,32.54],[-114.72,32.72],[-113.05,31.97]]]]},"properties":{"name":"Mexico"},"id":"MX"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[7.44,43.76],[7.39,43.73],[7.42,43.77],[7.44,43.76]]]]},"properties":{"name":"Monaco"},"id":"MC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[91.02,46.6],[90.07,47.89],[88.65,48.18],[87.84,49.17],[92.32,50.81],[97.34,49.73],[98.29,50.29],[97.83,51],[98.93,52.14],[102.22,51.33],[102.33,50.57],[102.92,50.32],[106.66,50.34],[108.57,49.33],[110.79,49.15],[114.31,50.28],[116.71,49.83],[115.59,47.92],[117.37,47.65],[118.54,47.99],[119.9,46.68],[117.42,46.58],[113.64,44.75],[111.98,45.09],[111.42,44.38],[111.96,43.69],[110.44,42.78],[107.47,42.47],[105.01,41.58],[100.84,42.68],[96.38,42.73],[95.42,44.29],[90.9,45.25],[91.02,46.6]]]]},"properties":{"name":"Mongolia"},"id":"MN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[28.12,46.85],[26.63,48.26],[27.76,48.45],[29.14,47.99],[29.95,46.81],[30.12,46.39],[28.99,46.48],[28.21,45.45],[28.12,46.85]]]]},"properties":{"name":"Moldova"},"id":"MD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[18.46,42.57],[19.23,43.51],[20.35,42.89],[20.07,42.56],[19.65,42.62],[19.37,41.85],[18.5,42.45],[18.46,42.57]]]]},"properties":{"name":"Montenegro"},"id":"ME"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-62.17,16.67],[-62.24,16.71],[-62.2,16.81],[-62.17,16.67]]]]},"properties":{"name":"Montserrat"},"id":"MS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-9.05,32.73],[-6.81,34.05],[-5.92,35.79],[-5.4,35.92],[-4.42,35.15],[-2.99,35.42],[-2.21,35.09],[-1.75,34.75],[-1.18,32.11],[-3.82,31.7],[-3.63,30.97],[-8.67,28.71],[-8.67,27.67],[-13.17,27.67],[-10.14,29.43],[-9.64,30.17],[-9.81,31.45],[-9.05,32.73]]]]},"properties":{"name":"Morocco"},"id":"MA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[40.5,-11.03],[40.59,-15.48],[39.09,-16.99],[36.84,-17.88],[36.25,-18.89],[34.9,-19.86],[34.62,-19.62],[35.55,-22.23],[35.5,-24.11],[32.81,-25.61],[32.89,-26.85],[32.13,-26.84],[31.97,-25.96],[32.02,-24.46],[31.3,-22.41],[32.49,-21.34],[33.02,-19.94],[32.7,-18.94],[32.99,-17.27],[32.98,-16.71],[30.42,-16.01],[30.42,-15.63],[30.21,-14.98],[33.22,-14.01],[33.63,-14.54],[34.52,-14.57],[34.26,-15.9],[35.29,-17.13],[35.14,-16.55],[35.81,-16.02],[35.92,-14.89],[34.57,-13.34],[34.38,-12.16],[34.97,-11.57],[37.46,-11.73],[40.44,-10.48],[40.5,-11.03]],[[34.6,-12.01],[34.62,-12.04],[34.63,-12.01],[34.6,-12.01]],[[34.72,-12.03],[34.7,-12.08],[34.73,-12.1],[34.75,-12.04],[34.72,-12.03]]]]},"properties":{"name":"Mozambique"},"id":"MZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[56.04,24.94],[56.37,24.98],[57.16,23.94],[58.61,23.63],[59.81,22.23],[58.52,20.41],[57.83,20.22],[57.8,18.97],[56.81,18.75],[56.35,17.93],[55.44,17.83],[55.04,17.02],[53.11,16.64],[52,19],[55,20],[55.67,22],[55.2,22.7],[56.04,24.94]]],[[[56.37,26.38],[56.27,25.64],[56.18,25.65],[56.08,26.07],[56.37,26.38]]]]},"properties":{"name":"Oman"},"id":"OM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[23.28,-17.66],[23.48,-17.63],[24.97,-17.56],[25.26,-17.8],[23.62,-18.49],[23.3,-18],[20.99,-18.32],[20.99,-22],[20,-22.01],[20,-24.77],[20,-28.42],[18.18,-28.91],[17.4,-28.71],[17.06,-28.03],[16.49,-28.58],[15.29,-27.32],[14.51,-22.55],[11.8,-18.08],[11.75,-17.25],[13.16,-16.95],[13.99,-17.42],[18.45,-17.39],[20.85,-18.02],[23.28,-17.66]]]]},"properties":{"name":"Namibia"},"id":"NA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[166.93,-0.55],[166.93,-0.49],[166.96,-0.51],[166.93,-0.55]]]]},"properties":{"name":"Nauru"},"id":"NR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[82.07,27.91],[80.06,28.84],[81.03,30.2],[82.1,30.34],[86.01,27.88],[88.14,27.87],[88.01,26.36],[85.86,26.57],[84.15,27.51],[83.29,27.34],[82.07,27.91]]]]},"properties":{"name":"Nepal"},"id":"NP"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[3.76,51.35],[3.37,51.37],[4.24,51.35],[3.76,51.35]]],[[[5.76,52.42],[5.43,52.26],[5.14,52.38],[5.64,52.6],[5.86,52.54],[5.76,52.42]]],[[[5.42,52.64],[5.05,52.39],[5.04,52.63],[5.42,52.64]]],[[[6.87,53.42],[7.21,53.24],[6.69,52.55],[7.07,52.39],[6.83,51.97],[5.96,51.81],[6.01,50.76],[5.04,51.49],[4.25,51.38],[3.44,51.54],[4.29,51.45],[3.69,51.71],[4.17,51.69],[3.87,51.81],[4.58,52.46],[5.42,52.25],[5.77,52.41],[5.88,52.51],[5.86,52.61],[5.6,52.66],[5.6,52.76],[5.72,52.84],[5.37,52.88],[5.42,52.96],[5.36,53.07],[5.1,52.95],[5.3,52.71],[5.03,52.63],[5.03,52.38],[4.58,52.47],[4.73,52.96],[6.87,53.42]]]]},"properties":{"name":"Netherlands"},"id":"NL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-68.2,12.22],[-68.25,12.02],[-68.42,12.26],[-68.2,12.22]]],[[[-68.97,12.2],[-69.16,12.37],[-68.75,12.04],[-68.97,12.2]]]]},"properties":{"name":"Netherlands Antilles"},"id":"AN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-69.88,12.41],[-70.06,12.54],[-70.06,12.63],[-69.88,12.41]]]]},"properties":{"name":"Aruba"},"id":"AW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[164.32,-20.33],[167.01,-22.32],[165.26,-21.56],[163.99,-20.09],[164.32,-20.33]]]]},"properties":{"name":"New Caledonia"},"id":"NC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[167.42,-16.11],[167.77,-16.54],[167.18,-15.9],[167.42,-16.11]]],[[[166.8,-15.16],[167.06,-14.95],[167.24,-15.52],[166.76,-15.64],[166.59,-14.62],[166.8,-15.16]]]]},"properties":{"name":"Vanuatu"},"id":"VU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[172.86,-40.51],[173.11,-41.31],[174.32,-41],[174.29,-41.75],[172.76,-43.24],[173.09,-43.86],[171.29,-44.34],[170.78,-45.88],[169.01,-46.68],[166.48,-46.01],[168.37,-44.04],[170.79,-42.9],[172.11,-40.89],[172.86,-40.51]]],[[[173.04,-34.44],[173.27,-35.02],[174.32,-35.23],[174.85,-36.85],[175.58,-37.24],[175.35,-36.48],[175.84,-36.75],[175.99,-37.64],[177.16,-38.01],[178.57,-37.71],[177.91,-39.26],[177.05,-39.2],[176.83,-40.18],[175.32,-41.61],[174.59,-41.28],[175.16,-40.1],[173.75,-39.29],[174.59,-38.82],[174.97,-37.75],[174.55,-37.07],[174.89,-37.06],[174.19,-36.5],[174.51,-36.23],[173.91,-35.87],[174.08,-36.41],[173.4,-35.57],[173.66,-35.31],[173.09,-35.21],[172.72,-34.5],[173.04,-34.44]]]]},"properties":{"name":"New Zealand"},"id":"NZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-83.24,14.98],[-83.13,14.99],[-83.83,11.87],[-83.65,10.92],[-85.09,11.01],[-85.69,11.08],[-87.69,12.91],[-87.3,12.99],[-84.91,14.81],[-83.24,14.98]]]]},"properties":{"name":"Nicaragua"},"id":"NI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[4.25,18.65],[4.25,19.15],[5.81,19.45],[11.99,23.52],[14.23,22.61],[15,23],[15.2,21.5],[16,20.35],[15.49,16.91],[13.47,14.46],[13.63,13.72],[12.46,13.07],[10.72,13.39],[9.63,12.8],[7.82,13.35],[6.93,13],[5.87,13.75],[4.14,13.48],[3.6,11.69],[2.84,12.4],[2.4,11.9],[2.14,12.69],[0.99,13.05],[1.29,13.35],[0.6,13.7],[0.24,14.92],[3.52,15.36],[4.2,16.39],[4.25,18.65]]]]},"properties":{"name":"Niger"},"id":"NE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[5.87,13.75],[6.93,13],[7.82,13.35],[9.63,12.8],[10.72,13.39],[12.46,13.07],[13.63,13.72],[14.07,13.08],[14.65,11.58],[13.81,11.06],[11.86,7.08],[11.34,6.44],[10.62,7.07],[9.8,6.8],[8.59,4.81],[6.96,4.73],[7.01,4.37],[6.77,4.77],[6.85,4.35],[6.1,4.27],[5.45,4.92],[5.64,5.54],[5.26,5.44],[5.5,5.62],[4.53,6.3],[2.72,6.37],[2.79,9.04],[3.86,10.58],[3.6,11.69],[4.14,13.48],[5.87,13.75]]]]},"properties":{"name":"Nigeria"},"id":"NG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-169.89,-19.15],[-169.93,-19.02],[-169.82,-18.97],[-169.89,-19.15]]]]},"properties":{"name":"Niue"},"id":"NU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[167.96,-29.08],[167.91,-29.01],[168,-29.03],[167.96,-29.08]]]]},"properties":{"name":"Norfolk Island"},"id":"NF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[13.97,68.24],[14.14,68.24],[13.45,68.07],[13.97,68.24]]],[[[15.03,68.35],[14.2,68.15],[15.17,68.45],[15.03,68.35]]],[[[15.38,68.85],[15.06,68.57],[14.37,68.68],[15.38,68.85]]],[[[15.99,68.75],[15.74,68.53],[16.57,68.65],[14.99,68.25],[15.64,68.95],[15.99,68.75]]],[[[17.64,69.52],[18.07,69.43],[17.88,69.24],[18,69.19],[16.78,69.06],[17.64,69.52]]],[[[18.89,69.69],[18,69.59],[18.69,69.88],[18.89,69.69]]],[[[23.6,70.58],[23.23,70.28],[22.85,70.41],[23.6,70.58]]],[[[23.45,70.78],[22.78,70.52],[21.95,70.65],[23.45,70.78]]],[[[5.34,61.59],[4.94,61.68],[6.76,61.87],[5.15,61.89],[5.15,62.21],[6.36,62.06],[5.92,62.22],[6.31,62.37],[6.54,62.1],[6.39,62.37],[6.7,62.45],[6.87,62.42],[7,62.25],[6.94,62.11],[7.04,62.09],[7.42,62.23],[6.98,62.31],[6.92,62.36],[6.97,62.37],[6.78,62.48],[6.26,62.45],[6.65,62.5],[6.25,62.57],[8.15,62.69],[7.04,62.97],[8.55,62.65],[7.88,63.01],[8.53,62.84],[8.16,63.12],[9.65,63.62],[10.26,63.26],[10.05,63.41],[10.91,63.45],[11.49,64.02],[11.31,64.12],[10.57,63.8],[11.08,63.84],[10.94,63.74],[10.05,63.5],[9.79,63.66],[10.1,63.76],[9.54,63.76],[12.94,65.31],[12.25,65.23],[12.67,65.92],[13.18,65.85],[12.67,66.07],[14.15,66.32],[13.03,66.19],[13.54,66.3],[12.97,66.52],[13.73,66.6],[13.23,66.71],[13.99,66.78],[13.55,66.93],[15.74,67.17],[14.36,67.23],[15.9,67.56],[14.76,67.81],[15.97,68.25],[16.22,67.89],[16.5,67.79],[16.21,68],[16.52,67.95],[16.36,68.03],[16.72,68.07],[16.1,68.28],[16.81,68.13],[16.32,68.37],[17.35,68.17],[17.55,68.52],[16.46,68.51],[17.68,68.65],[17.24,68.75],[17.79,68.76],[17.43,68.91],[18.15,69.15],[18,69.28],[18.26,69.49],[19.44,69.23],[18.94,69.61],[19.76,69.81],[19.68,69.43],[20.3,69.97],[19.95,69.26],[21.31,70.02],[22.1,69.74],[21.8,70.03],[22.1,70.11],[21.3,70.25],[23.31,69.94],[24.73,70.62],[24.25,70.78],[24.59,70.96],[25.91,70.89],[25.07,70.5],[25.23,70.09],[26.57,70.94],[26.5,70.36],[27.03,70.47],[27.65,71.11],[28.55,70.97],[27.65,70.61],[28.3,70.71],[27.85,70.48],[28.34,70.51],[28.04,70.06],[29.04,70.87],[31.08,70.29],[28.61,70.11],[29.67,69.97],[29.49,69.66],[30.85,69.79],[28.96,69.05],[29.18,69.64],[28.17,69.91],[26.45,69.93],[24.93,68.58],[22.4,68.71],[21.32,69.33],[20.58,69.06],[20.1,69.04],[20.35,68.79],[19.94,68.34],[18.09,68.51],[17.88,67.95],[16.73,67.9],[15.47,66.28],[14.5,66.13],[14.49,65.31],[13.66,64.58],[14.12,64.47],[13.99,64.02],[12.14,63.58],[12.12,61.73],[12.86,61.36],[12.21,61],[12.49,60.11],[11.82,59.85],[11.43,58.99],[10.8,59.19],[10.53,59.88],[10.23,59.04],[9.54,59.11],[8.21,58.12],[6.6,58.07],[5.46,58.74],[6.62,59.05],[5.87,59.07],[6.47,59.56],[5.18,59.51],[7.11,60.49],[5.75,59.99],[5.73,60.39],[5.14,60.35],[5.7,60.69],[4.93,60.8],[6.59,61.15],[7.11,60.86],[7.57,61.48],[5.4,61.07],[4.95,61.26],[5.63,61.36],[4.95,61.41],[5.8,61.45],[5.34,61.59]],[[5.34,61.59],[5.35,61.59],[5.28,61.59],[5.34,61.59]]]]},"properties":{"name":"Norway"},"id":"NO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[145.28,14.16],[145.12,14.12],[145.24,14.19],[145.28,14.16]]],[[[145.62,14.91],[145.57,15.01],[145.63,15.08],[145.62,14.91]]],[[[145.74,15.13],[145.68,15.11],[145.82,15.27],[145.74,15.13]]],[[[145.74,18.04],[145.78,18.17],[145.82,18.16],[145.74,18.04]]],[[[145.68,18.72],[145.66,18.81],[145.71,18.77],[145.68,18.72]]]]},"properties":{"name":"Northern Mariana Islands"},"id":"MP"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[163.01,5.26],[162.9,5.31],[163.02,5.38],[163.01,5.26]]],[[[158.3,6.79],[158.12,6.93],[158.32,6.93],[158.3,6.79]]],[[[138.21,9.52],[138.06,9.42],[138.13,9.57],[138.21,9.52]]]]},"properties":{"name":"Micronesia, Federated States of"},"id":"FM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[168.77,7.3],[168.79,7.29],[168.67,7.33],[168.77,7.3]]],[[[168.57,7.4],[168.55,7.42],[168.56,7.47],[168.57,7.4]]],[[[168.97,7.57],[168.94,7.62],[168.97,7.6],[168.97,7.57]]]]},"properties":{"name":"Marshall Islands"},"id":"MH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[134.56,7.37],[134.49,7.44],[134.63,7.73],[134.56,7.37]]]]},"properties":{"name":"Palau"},"id":"PW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.82,37.02],[75.86,36.66],[76.17,35.82],[77.82,35.5],[76.87,34.66],[73.94,34.65],[74.3,33.98],[74.02,33.19],[75.38,32.21],[74.61,31.88],[74.69,31.05],[71.9,27.96],[70.37,28.02],[69.58,27.17],[71.11,24.42],[68.78,24.33],[68.2,23.77],[67.49,23.89],[66.36,25.61],[64.65,25.16],[61.61,25.2],[61.86,26.23],[63.18,26.63],[63.34,27.12],[62.78,27.26],[62.78,28.27],[61.91,28.55],[60.87,29.86],[62.48,29.41],[66.26,29.85],[66.72,31.21],[69.33,31.94],[69.51,33.03],[70.33,33.33],[69.91,34.04],[71.08,34.06],[71.65,35.42],[71.24,36.13],[72.56,36.82],[74.57,37.03],[74.82,37.02]]]]},"properties":{"name":"Pakistan"},"id":"PK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-79.46,9.57],[-77.37,8.67],[-77.22,7.94],[-77.89,7.23],[-78.43,8.05],[-78.14,8.4],[-77.78,8.15],[-78.98,9.14],[-80.47,8.21],[-79.99,7.52],[-80.43,7.24],[-81.74,8.16],[-82.9,8.03],[-82.93,9.47],[-82.56,9.56],[-82.24,9],[-81.2,8.78],[-79.46,9.57]]]]},"properties":{"name":"Panama"},"id":"PA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[152.24,-4.21],[152.1,-5.46],[150.47,-6.28],[148.32,-5.68],[149.88,-5.54],[150.09,-5.01],[150.16,-5.55],[150.92,-5.49],[151.68,-4.91],[151.51,-4.2],[152.24,-4.21]]],[[[141.89,-2.97],[144.51,-3.82],[145.74,-4.8],[145.77,-5.49],[147.48,-5.97],[147.87,-6.66],[146.96,-6.75],[147.18,-7.46],[148.14,-8.07],[148.6,-9.08],[149.31,-9.02],[149.22,-9.47],[150.01,-9.63],[149.91,-10.05],[150.88,-10.23],[150.21,-10.7],[147.95,-10.15],[146.09,-8.09],[144.52,-7.5],[144.21,-7.8],[143.66,-7.47],[143.96,-7.98],[143.36,-7.9],[143.61,-8.24],[142.14,-8.23],[143.11,-8.47],[143.33,-9.03],[141.01,-9.13],[141,-2.61],[141.89,-2.97]]]]},"properties":{"name":"Papua New Guinea"},"id":"PG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-54.33,-24.68],[-54.6,-25.57],[-54.7,-26.44],[-55.74,-27.44],[-58.6,-27.32],[-57.58,-25.55],[-57.76,-25.18],[-61.01,-23.81],[-62.64,-22.24],[-61.74,-19.65],[-59.1,-19.35],[-58.16,-20.17],[-57.99,-22.09],[-55.85,-22.29],[-55.41,-23.96],[-54.41,-23.92],[-54.33,-24.68]]]]},"properties":{"name":"Paraguay"},"id":"PY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-78.71,-4.58],[-78.34,-3.42],[-75.56,-1.53],[-75.22,-0.97],[-75.63,-0.11],[-75.29,-0.12],[-73.56,-1.37],[-72.88,-2.51],[-71.7,-2.15],[-70.29,-2.51],[-70.72,-3.78],[-69.96,-4.24],[-70.77,-4.15],[-72.85,-5.12],[-73.12,-6.45],[-74.01,-7.54],[-72.96,-8.98],[-73.21,-9.41],[-72.37,-9.49],[-72.14,-10],[-70.51,-9.43],[-70.63,-11.01],[-69.57,-10.95],[-68.67,-12.5],[-69.42,-15.62],[-68.82,-16.34],[-69.5,-17.51],[-70.41,-18.35],[-75.93,-14.66],[-78.99,-8.23],[-79.98,-6.76],[-81.17,-6.09],[-80.87,-5.65],[-81.29,-4.31],[-80.34,-3.38],[-80.47,-4.44],[-79.65,-4.43],[-79.05,-5.01],[-78.71,-4.58]]]]},"properties":{"name":"Peru"},"id":"PE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[126.05,9.23],[126.59,7.28],[126.19,6.27],[125.65,7.24],[125.41,5.56],[125.26,6.09],[124.19,6.21],[124.27,7.37],[123.68,7.81],[122.83,7.28],[122.62,7.77],[121.92,6.99],[122.22,7.96],[123.38,8.73],[123.82,8.48],[123.67,7.95],[124.73,8.49],[124.8,9],[125.51,9.01],[125.44,9.81],[126.05,9.23]]],[[[124.48,10.05],[124.37,9.63],[123.79,9.73],[124.48,10.05]]],[[[123.56,10.79],[123.01,9.03],[122.45,9.97],[122.95,10.89],[123.56,10.79]]],[[[124.02,11.12],[124.03,10.38],[123.31,9.41],[124.02,11.12]]],[[[119.51,11.34],[119.71,10.5],[117.19,8.33],[119.31,10.58],[119.22,10.96],[119.46,10.72],[119.51,11.34]]],[[[124.64,11.29],[125.03,11.2],[125.01,10.03],[124.29,11.54],[124.64,11.29]]],[[[122.23,11.8],[123.15,11.6],[123.13,11.17],[121.94,10.42],[121.85,11.76],[122.23,11.8]]],[[[124.46,12.52],[125.3,12.46],[125.76,11.01],[124.84,11.47],[124.46,12.52]]],[[[123.67,12.35],[124.08,11.72],[123.53,12.21],[123.16,11.91],[123.24,12.61],[123.67,12.35]]],[[[120.72,13.48],[121.5,13.15],[121.22,12.23],[120.3,13.44],[120.72,13.48]]],[[[121.26,18.57],[122.24,18.51],[122.53,17.1],[121.38,15.33],[121.73,14.17],[122.23,13.9],[122.71,14.34],[123.1,13.67],[123.34,14.09],[123.92,13.79],[123.53,13.58],[124.2,13.06],[124.08,12.54],[122.56,13.94],[122.61,13.16],[121.75,13.96],[120.66,13.77],[120.96,14.64],[120.09,14.79],[119.79,16.32],[120.42,16.16],[120.57,18.49],[121.26,18.57]]]]},"properties":{"name":"Philippines"},"id":"PH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-128.29,-24.41],[-128.34,-24.33],[-128.3,-24.33],[-128.29,-24.41]]]]},"properties":{"name":"Pitcairn Islands"},"id":"PN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[18.85,49.52],[17.72,50.32],[16.64,50.11],[16.34,50.66],[14.83,50.87],[14.28,53.7],[17.9,54.82],[19.8,54.44],[22.79,54.36],[23.5,53.95],[23.94,52.73],[23.17,52.28],[23.64,52.08],[23.6,51.53],[24.11,50.57],[22.56,49.08],[18.85,49.52]]]]},"properties":{"name":"Poland"},"id":"PL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-8.2,41.87],[-6.59,41.95],[-6.19,41.58],[-6.93,41.02],[-7.02,39.67],[-7.53,39.67],[-6.95,39.03],[-7.43,37.25],[-8.99,37.02],[-8.67,38.41],[-9.18,38.42],[-8.98,38.95],[-9.48,38.71],[-8.66,40.69],[-8.75,41.95],[-8.2,41.87]]]]},"properties":{"name":"Portugal"},"id":"PT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-14.52,12.68],[-13.71,12.68],[-13.71,11.72],[-14.69,11.51],[-15.02,10.96],[-15.51,11.34],[-15.03,11.59],[-15.56,11.72],[-15,11.97],[-15.96,11.73],[-15.7,12],[-16.25,11.93],[-16.11,12.33],[-16.72,12.32],[-14.52,12.68]]]]},"properties":{"name":"Guinea-Bissau"},"id":"GW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[124.45,-9.18],[124.34,-9.46],[124.05,-9.34],[124.45,-9.18]]],[[[127.25,-8.48],[125.13,-9.44],[125.16,-9.07],[124.95,-8.95],[127.25,-8.48]]]]},"properties":{"name":"Timor-Leste"},"id":"TL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-67,18.5],[-65.6,18.23],[-67.19,17.93],[-67,18.5]]]]},"properties":{"name":"Puerto Rico"},"id":"PR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[51.52,25.38],[51.22,24.62],[50.83,24.75],[51.04,26.05],[51.57,25.91],[51.52,25.38]]]]},"properties":{"name":"Qatar"},"id":"QA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[55.71,-21],[55.67,-21.37],[55.22,-21.03],[55.71,-21]]]]},"properties":{"name":"Reunion"},"id":"RE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[20.73,46.18],[22.89,47.95],[24.92,47.71],[26.63,48.26],[28.12,46.85],[28.21,45.45],[29.66,45.21],[29.55,44.82],[28.87,44.94],[28.58,43.75],[27.04,44.15],[24.18,43.68],[22.68,44.22],[22.48,44.71],[21.4,44.78],[21.51,45.15],[20.26,46.11],[20.73,46.18]]]]},"properties":{"name":"Romania"},"id":"RO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[143.66,49.31],[143.02,49.14],[142.53,48],[143.09,46.8],[143.49,46.81],[143.47,46.09],[142.71,46.74],[142.08,45.89],[141.85,48.75],[142.27,51.12],[141.64,52.32],[141.77,53.37],[142.8,53.7],[142.39,54.24],[142.7,54.42],[143.29,53.13],[143.22,51.52],[144.75,48.64],[143.66,49.31]],[[143.66,49.31],[143.25,49.38],[143.32,49.31],[143.66,49.31]]],[[[21.43,55.25],[22.84,54.9],[22.79,54.36],[19.8,54.44],[20.4,54.68],[19.87,54.64],[19.97,54.96],[20.94,55.29],[20.53,54.97],[21.09,54.89],[21.26,55.25],[21.43,55.25]]],[[[-179.63,68.91],[-175.46,67.71],[-174.83,67.38],[-175,66.67],[-174.46,66.3],[-173.76,66.45],[-174.65,67.06],[-173.67,67.13],[-171.73,66.96],[-169.69,66.07],[-170.64,65.61],[-171.54,65.83],[-171.12,65.48],[-172.8,65.68],[-172.13,65.09],[-173.2,64.79],[-172.36,64.46],[-173.19,64.25],[-173.41,64.62],[-175.45,64.78],[-176.08,65.47],[-178.56,65.52],[-178.91,65.99],[-178.52,66.4],[-179.7,66.18],[-179.32,65.54],[-180,65.07],[-180,68.98],[-179.63,68.91]]],[[[55.33,73.33],[56.59,73.14],[55.62,72.96],[56.26,72.96],[55.43,72.78],[55.95,72.67],[55.12,72.45],[55.58,72.2],[55.22,71.93],[57.64,70.73],[53.46,70.81],[54.24,71.13],[51.42,71.74],[53.22,72.65],[52.38,72.72],[53.38,72.88],[53.15,73.16],[55.33,73.33]]],[[[139.19,76.07],[140.48,75.64],[141.62,76.01],[141.36,76.18],[145.39,75.52],[143.95,75.03],[142.9,75.13],[142.5,75.36],[142.51,75.45],[143.04,75.67],[142.45,75.71],[142.16,75.38],[142.61,75.1],[143.71,74.94],[139.1,74.65],[136.86,75.35],[137.4,75.35],[136.96,75.6],[137.74,75.75],[137.45,75.95],[139.19,76.07]]],[[[68.27,76.96],[68.86,76.54],[61.29,75.33],[59.15,74.44],[58.18,74.57],[58.74,74.27],[57.26,74.08],[57.72,73.71],[56.56,73.88],[57.61,73.66],[56.72,73.67],[57.25,73.49],[56.76,73.25],[55.91,73.44],[54.22,73.32],[55.18,73.71],[53.63,73.76],[55.87,74.1],[55.07,74.26],[56.98,74.69],[55.83,74.8],[56.68,74.95],[55.8,75.15],[58,75.67],[68.27,76.96]]],[[[104.27,77.68],[106.29,77.36],[104.12,77.09],[107.5,76.92],[106.4,76.51],[111.1,76.76],[113.89,75.85],[113.51,75.53],[112.34,75.85],[113.72,75.41],[105.21,72.76],[110.91,73.7],[109.53,73.77],[110.2,74.02],[112.89,73.96],[113.5,73.33],[113.49,72.96],[113.1,72.85],[113.18,72.72],[113.53,72.63],[114.04,72.6],[113.36,72.69],[113.23,72.74],[113.15,72.83],[113.53,72.96],[113.55,73.24],[114.03,73.34],[113.48,73.5],[118.63,73.57],[118.99,73.49],[118.39,73.24],[119.82,72.94],[126.37,72.35],[127.22,71.39],[127.33,71.9],[126.72,72.39],[127.66,72.35],[131.13,70.73],[132.73,71.94],[133.68,71.43],[135.86,71.64],[137.85,71.11],[138.07,71.57],[139.93,71.48],[139.34,71.95],[140.2,72.2],[139.09,72.23],[141.02,72.59],[140.75,72.89],[146.85,72.35],[144.39,72.17],[146.93,72.31],[144.96,71.96],[145.32,71.66],[147.14,72.32],[149.19,72.22],[150.08,71.88],[148.82,71.67],[152.54,70.84],[159.05,70.87],[160.04,70.41],[159.73,69.83],[161,69.59],[161.41,68.98],[160.85,68.52],[161.58,68.91],[161.45,69.39],[164.01,69.77],[167.79,69.78],[168.28,69.24],[170.61,68.76],[171.03,69.04],[170.12,69.61],[170.47,70.13],[176.11,69.89],[180,68.98],[180,65.07],[178.52,64.59],[176.9,65.08],[176.3,65.05],[177.3,64.83],[174.44,64.69],[177.49,64.76],[179.56,62.62],[179.06,62.28],[176.98,62.87],[177.27,62.57],[172.71,61.43],[170.25,59.91],[169.21,60.62],[166.14,59.82],[166.35,60.49],[164.83,59.78],[163.64,60.05],[163.19,59.05],[161.94,58.07],[162.35,57.68],[163.21,57.84],[162.74,57.36],[163.35,56.2],[162.39,56.4],[161.71,55.5],[162.11,54.76],[160.01,54.14],[160.06,53.09],[158.43,53.02],[158.28,51.94],[156.67,50.88],[155.54,55.3],[155.95,56.67],[156.98,57.41],[156.75,57.73],[158.23,58.02],[161.91,60.42],[163.66,60.87],[164.13,62.28],[165.64,62.45],[163.26,62.54],[162.95,61.81],[163.29,61.66],[160.14,60.58],[160.39,61.03],[159.78,60.94],[159.83,61.26],[160.35,61.95],[157.49,61.8],[154.23,59.88],[154.11,59.46],[155.19,59.36],[154.74,59.13],[151.31,58.84],[151.07,59.11],[152.29,59.23],[149.6,59.77],[148.9,59.24],[142.16,59.07],[135.15,54.86],[136.82,54.65],[136.76,53.77],[137.74,54.32],[137.31,53.53],[138.55,53.99],[138.44,53.51],[138.64,54.3],[139.75,54.31],[141.42,53.29],[140.71,53.11],[141.51,52.21],[140.46,50.71],[140.7,50.09],[140.18,48.45],[135.13,43.5],[133.15,42.68],[131.81,43.33],[130.7,42.29],[130.64,42.41],[130.6,42.42],[130.41,42.72],[131.31,43.39],[130.95,44.84],[131.86,45.35],[133.12,45.13],[134.74,48.27],[130.99,47.69],[130.67,48.86],[127.53,49.79],[126.1,52.76],[123.38,53.53],[120.86,53.28],[120.03,52.77],[120.78,52.11],[119.21,50.02],[117.87,49.52],[116.71,49.83],[114.31,50.28],[110.79,49.15],[108.57,49.33],[106.66,50.34],[102.92,50.32],[102.33,50.57],[102.22,51.33],[98.93,52.14],[97.83,51],[98.29,50.29],[97.34,49.73],[92.32,50.81],[87.84,49.17],[87.35,49.09],[86.77,49.79],[85.26,49.59],[83.46,51],[81.47,50.74],[80.69,51.31],[80.08,50.76],[77.91,53.27],[76.52,53.99],[76.81,54.45],[73.44,53.44],[73.76,54.07],[71.19,54.1],[70.84,55.3],[69.19,55.34],[65.22,54.32],[61.01,53.95],[60.91,53.62],[61.58,53.51],[61.18,53.31],[62.12,53],[61.1,52.98],[60.69,52.68],[61.06,52.34],[60,51.96],[61.69,51.27],[61.38,50.78],[59.54,50.48],[58.34,51.16],[56.51,51.08],[55.69,50.53],[54.65,51.04],[54.52,50.53],[53.43,51.49],[50.77,51.77],[48.7,50.59],[48.8,49.94],[47.52,50.44],[46.5,48.42],[47.38,47.69],[48.2,47.7],[49.03,46.78],[48.56,46.56],[49.22,46.35],[48.71,45.83],[47.38,45.74],[46.68,44.52],[47.41,43.5],[47.7,43.87],[47.46,43.02],[48.58,41.84],[47.77,41.2],[46.57,41.87],[46.45,41.9],[44.93,42.76],[43.91,42.58],[42.85,43.18],[40,43.38],[36.58,45.18],[37.74,45.3],[37.94,46.03],[38.57,46.09],[37.73,46.67],[39.3,47.08],[38.24,47.11],[38.85,47.86],[39.8,47.86],[39.66,48.62],[40.08,48.87],[39.7,49.01],[40.14,49.6],[38.02,49.9],[37.46,50.44],[35.61,50.37],[35.37,51.04],[34.38,51.26],[34.1,51.65],[34.42,51.81],[33.42,52.36],[31.78,52.11],[31.27,53.02],[32.74,53.46],[30.78,54.79],[30.93,55.6],[28.17,56.15],[27.86,57.3],[27.37,57.54],[27.82,57.87],[27.43,58.81],[28.02,59.48],[30.25,59.98],[28.6,60.38],[28.69,60.74],[27.81,60.55],[31.59,62.91],[29.99,63.74],[30.58,64.22],[29.64,64.93],[30.13,65.72],[29.07,66.9],[30.03,67.69],[28.69,68.2],[28.82,68.84],[28.43,68.9],[28.96,69.05],[30.85,69.79],[33.09,69.75],[32.03,69.64],[33.52,69.42],[33.02,68.95],[33.72,69.33],[35.97,69.17],[40.99,67.72],[41.22,66.84],[38.61,66.05],[31.85,67.15],[34.85,65.9],[34.38,65.38],[34.79,64.55],[37.41,63.8],[37.98,64.32],[36.44,64.94],[37.03,65.21],[38.41,64.86],[38.05,64.64],[40.51,64.54],[39.75,65.55],[42.17,66.52],[44.17,65.87],[44.5,66.91],[43.75,67.32],[44.25,68.27],[43.31,68.68],[46.52,68.14],[46.71,67.81],[44.91,67.37],[46.39,66.74],[47.7,66.99],[47.99,67.65],[49.1,67.63],[48.59,67.93],[52.27,68.31],[52.73,68.47],[52.49,68.59],[52.65,68.65],[52.29,68.61],[53.78,68.97],[54.56,68.99],[53.59,68.9],[54.02,68.86],[53.95,68.4],[53.21,68.26],[54.79,68.16],[58.9,69],[59.43,68.75],[59.07,68.42],[59.84,68.37],[60.91,68.9],[60.14,69.57],[60.87,69.86],[64.15,69.54],[68.44,68.22],[69.22,68.96],[66.8,69.57],[67.34,70.75],[66.62,71.05],[68.47,71.82],[69.33,72.95],[71.56,72.91],[72.83,72.71],[72.88,72.28],[71.8,71.47],[72.84,70.87],[72.42,70.27],[72.55,68.98],[73.65,68.46],[71.41,66.97],[71.56,66.65],[68.97,66.8],[72,66.22],[74.74,67.69],[74.33,68.38],[74.64,68.77],[76.59,68.97],[77.32,68.52],[77.09,67.78],[79.04,67.57],[77.46,67.76],[78.17,68.26],[77.63,68.91],[73.75,69.17],[73.52,69.76],[74.31,70.67],[73.02,71.42],[74.96,72.11],[74.83,72.83],[75.72,72.56],[75.24,71.38],[76.92,71.07],[79.11,71],[76.1,71.93],[78.1,71.88],[77.37,72.1],[78.54,72.4],[83.26,71.72],[82.26,71.26],[82.08,70.57],[82.35,70.2],[82.16,70.58],[83.12,70.89],[82.64,70.17],[83.11,70.07],[83.75,70.46],[83.15,71.24],[83.63,71.62],[80.72,72.53],[80.82,72.97],[80.23,73.17],[80.51,73.57],[87.09,73.86],[85.78,73.46],[86.78,72.99],[85.85,73.48],[87.66,73.89],[85.95,74.28],[87.13,74.37],[85.79,74.63],[86.03,74.81],[86.91,74.61],[87.79,75.02],[86.99,75.15],[94.16,75.94],[92.87,75.95],[93.16,76.1],[99.28,76.21],[99.77,76.03],[99.09,75.55],[100.19,75.17],[99.17,75.57],[99.88,76.09],[98.81,76.49],[102.23,76.38],[100.85,76.88],[104.27,77.68]]],[[[102.97,79.33],[102.39,78.83],[103.95,79.13],[105.41,78.56],[99.34,78.02],[101.62,78.98],[100.99,79.06],[101.55,79.35],[102.97,79.33]]],[[[97.61,80.17],[98.03,80.07],[97.19,79.7],[100.02,79.82],[99.04,79.29],[99.94,78.95],[97.3,78.85],[92.85,79.55],[97.61,80.17]]]]},"properties":{"name":"Russia"},"id":"RU"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[29.95,-2.31],[29.85,-2.76],[29.02,-2.74],[29.6,-1.39],[30.48,-1.06],[30.89,-2.08],[30.57,-2.4],[29.95,-2.31]]]]},"properties":{"name":"Rwanda"},"id":"RW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-63.03,18.02],[-63.14,18.06],[-63.01,18.07],[-63.03,18.02]]]]},"properties":{"name":"Saint Barthelemy"},"id":"BL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-5.66,-15.99],[-5.79,-15.99],[-5.7,-15.9],[-5.66,-15.99]]]]},"properties":{"name":"Saint Helena"},"id":"SH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-62.55,17.09],[-62.62,17.11],[-62.6,17.2],[-62.55,17.09]]],[[[-62.7,17.34],[-62.63,17.22],[-62.86,17.37],[-62.7,17.34]]]]},"properties":{"name":"Saint Kitts and Nevis"},"id":"KN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-63.17,18.16],[-62.97,18.27],[-62.99,18.23],[-63.17,18.16]]]]},"properties":{"name":"Anguilla"},"id":"AI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-60.95,13.71],[-61.08,13.88],[-60.93,14.11],[-60.95,13.71]]]]},"properties":{"name":"Saint Lucia"},"id":"LC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-63.01,18.08],[-63.01,18.07],[-63.14,18.06],[-63.01,18.08]]]]},"properties":{"name":"Saint Martin"},"id":"MF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-56.15,46.76],[-56.24,46.76],[-56.17,46.81],[-56.15,46.76]]],[[[-56.27,46.99],[-56.37,46.78],[-56.39,47.12],[-56.27,46.99]]]]},"properties":{"name":"Saint Pierre and Miquelon"},"id":"PM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-61.17,13.13],[-61.28,13.21],[-61.18,13.38],[-61.17,13.13]]]]},"properties":{"name":"Saint Vincent and the Grenadines"},"id":"VC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[12.42,43.96],[12.51,43.99],[12.46,43.9],[12.42,43.96]]]]},"properties":{"name":"San Marino"},"id":"SM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[6.52,0.02],[6.47,0.26],[6.69,0.4],[6.52,0.02]]],[[[7.42,1.56],[7.33,1.61],[7.41,1.7],[7.42,1.56]]]]},"properties":{"name":"Sao Tome and Principe"},"id":"ST"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[44.72,29.2],[46.55,29.1],[48.42,28.55],[48.84,27.62],[50.16,26.66],[49.99,26.02],[50.83,24.75],[51.22,24.62],[51.58,24.26],[52.58,22.94],[55.2,22.7],[55.67,22],[55,20],[52,19],[48.77,18.27],[46.33,15.62],[46.33,16.67],[44.47,17.41],[43.31,17.46],[42.79,16.38],[40.76,19.76],[39.18,21.1],[38.45,23.78],[37.44,24.37],[35.16,28.06],[34.57,28.09],[34.96,29.36],[36.07,29.19],[37.5,30],[38,30.5],[37.01,31.51],[39.2,32.15],[42.08,31.11],[44.72,29.2]]]]},"properties":{"name":"Saudi Arabia"},"id":"SA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-17.15,14.61],[-17.54,14.76],[-16.53,16.06],[-16.28,16.52],[-14.35,16.64],[-12.24,14.76],[-11.37,12.41],[-13.71,12.68],[-14.52,12.68],[-16.72,12.32],[-15.39,12.83],[-16.76,12.56],[-16.75,13.06],[-15.81,13.16],[-15.8,13.35],[-15.29,13.37],[-15.11,13.6],[-13.8,13.41],[-15.07,13.83],[-16.57,13.59],[-16.36,14.17],[-16.78,14.01],[-17.15,14.61]]]]},"properties":{"name":"Senegal"},"id":"SN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[20.07,42.56],[20.35,42.89],[19.23,43.51],[19.62,44.05],[19.04,44.86],[19.42,45.23],[18.82,45.91],[20.26,46.11],[21.51,45.15],[21.4,44.78],[22.48,44.71],[22.68,44.22],[22.37,43.83],[23,43.19],[22.37,42.32],[20.59,41.88],[20.07,42.56]]]]},"properties":{"name":"Serbia"},"id":"RS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[55.54,-4.76],[55.38,-4.63],[55.46,-4.55],[55.54,-4.76]]]]},"properties":{"name":"Seychelles"},"id":"SC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-11.21,10],[-10.57,9.06],[-10.7,8.3],[-10.27,8.49],[-11.49,6.93],[-12.96,7.9],[-13.3,9.03],[-12.46,9.89],[-11.21,10]]]]},"properties":{"name":"Sierra Leone"},"id":"SL"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[103.99,1.38],[103.64,1.32],[103.71,1.43],[103.99,1.38]]]]},"properties":{"name":"Singapore"},"id":"SG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[17.25,48.02],[17.17,48.01],[16.95,48.62],[18.85,49.52],[22.56,49.08],[22.15,48.41],[20.66,48.56],[18.66,47.76],[17.25,48.02]]]]},"properties":{"name":"Slovakia"},"id":"SK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[105.58,23.06],[106.71,22.86],[106.69,22.03],[107.99,21.54],[106.64,21.02],[105.61,18.98],[108.83,15.42],[109.47,12.89],[109.27,11.89],[108,10.7],[107.27,10.38],[106.74,10.67],[106.42,10.31],[106.78,10.08],[106.29,10.25],[106.62,9.81],[106.12,10.24],[106.54,9.58],[105.82,10],[106.19,9.37],[105.02,8.59],[105.11,9.95],[104.45,10.42],[105.1,10.96],[106.2,10.77],[105.85,11.66],[107.55,12.35],[107.49,14.45],[107.55,14.71],[107.7,15.27],[107.18,15.78],[107.46,16.08],[106.69,16.46],[105.19,18.64],[103.88,19.29],[104.98,20],[104.38,20.44],[104.64,20.66],[103.17,20.85],[102.98,21.74],[102.14,22.4],[102.48,22.77],[103.96,22.5],[105.35,23.33],[105.58,23.06]]]]},"properties":{"name":"Vietnam"},"id":"VN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[13.72,46.53],[16.11,46.87],[16.61,46.48],[16.57,46.48],[15.65,46.22],[15.17,45.43],[13.59,45.48],[13.72,45.6],[13.38,46.3],[13.72,46.53]]]]},"properties":{"name":"Slovenia"},"id":"SI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[42.94,11],[43.25,11.47],[44.28,10.45],[44.9,10.42],[50.77,11.98],[51.28,11.84],[51.01,10.44],[51.41,10.45],[50.9,10.32],[50.84,9.43],[47.95,4.46],[43.49,0.65],[41.56,-1.67],[41,-0.87],[40.99,2.83],[41.91,3.98],[43.69,4.89],[44.95,4.9],[47.99,8],[44.01,9.01],[42.85,10.22],[42.94,11]]]]},"properties":{"name":"Somalia"},"id":"SO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[29.89,-22.19],[31.3,-22.41],[32.02,-24.46],[31.97,-25.96],[31.33,-25.75],[30.9,-26.31],[31.16,-27.2],[31.99,-27.32],[32.13,-26.84],[32.89,-26.85],[32.39,-28.54],[27.9,-33.04],[25.7,-34.03],[22.54,-34.01],[20,-34.82],[18.79,-34.09],[18.4,-34.3],[17.85,-32.83],[18.29,-32.62],[18.28,-31.89],[16.49,-28.58],[17.06,-28.03],[17.4,-28.71],[18.18,-28.91],[20,-28.42],[20,-24.77],[20.81,-25.88],[20.64,-26.83],[21.67,-26.86],[23.01,-25.3],[25.51,-25.68],[26.96,-23.75],[29.37,-22.19],[29.89,-22.19]],[[28.57,-28.61],[27.01,-29.63],[27.56,-30.4],[28.08,-30.65],[29.17,-29.91],[29.43,-29.28],[28.57,-28.61]]]]},"properties":{"name":"South Africa"},"id":"ZA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[32.99,-17.27],[32.7,-18.94],[33.02,-19.94],[32.49,-21.34],[31.3,-22.41],[29.89,-22.19],[29.37,-22.19],[28.02,-21.57],[27.71,-20.51],[26.17,-19.53],[25.26,-17.8],[27.04,-17.96],[28.93,-15.97],[30.42,-15.63],[30.42,-16.01],[32.98,-16.71],[32.99,-17.27]]]]},"properties":{"name":"Zimbabwe"},"id":"ZW"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-16.34,28.37],[-16.67,27.98],[-16.91,28.34],[-16.34,28.37]]],[[[3.25,39.73],[3.06,39.26],[2.36,39.56],[3.25,39.73]]],[[[-7.86,43.76],[-1.78,43.36],[1.45,42.6],[1.72,42.51],[3.18,42.44],[3.18,41.87],[0.96,41.03],[0.05,40.04],[-0.34,39.44],[0.21,38.73],[-0.72,37.61],[-2.13,36.73],[-4.4,36.72],[-5.33,36.16],[-5.36,36.16],[-6.04,36.18],[-6.36,36.86],[-7.43,37.25],[-6.95,39.03],[-7.53,39.67],[-7.02,39.67],[-6.93,41.02],[-6.19,41.58],[-6.59,41.95],[-8.2,41.87],[-8.75,41.95],[-9.21,43.15],[-7.86,43.76]]]]},"properties":{"name":"Spain"},"id":"ES"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-15.74,21.34],[-16.95,21.34],[-17.05,20.76],[-16.92,21.94],[-16.49,22.33],[-16.36,22.57],[-16.28,22.9],[-16.16,22.99],[-16.18,23.08],[-16.08,23.32],[-15.77,23.78],[-15.78,23.91],[-16.01,23.67],[-15.84,23.9],[-15.58,24.06],[-15.18,24.49],[-15.03,24.54],[-14.9,24.69],[-14.48,26.17],[-13.57,26.73],[-13.17,27.67],[-8.67,27.67],[-8.67,27.29],[-8.67,26],[-12,26],[-12,23.45],[-13.11,22.89],[-13,21.34],[-15.74,21.34]]]]},"properties":{"name":"Western Sahara"},"id":"EH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[31.45,22],[36.89,22],[37.43,18.86],[38.6,17.99],[37,17.07],[36.54,14.26],[36.14,12.71],[35.1,11.83],[34.86,10.73],[34.29,10.55],[34.12,8.58],[33.25,8.46],[32.99,7.92],[34.7,6.68],[35.94,4.62],[34.39,4.61],[34,4.22],[33.52,3.75],[30.86,3.49],[29.64,4.64],[28.36,4.29],[27.46,5.02],[25.25,7.85],[23.52,8.71],[23.67,9.87],[22.87,10.92],[22.47,12.62],[21.83,12.8],[22.94,15.56],[24,15.7],[24,19.5],[24,20],[25,20],[25,22],[31.45,22]]]]},"properties":{"name":"Sudan"},"id":"SD"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-55.13,5.82],[-54.03,5.82],[-54.17,5.35],[-54.48,4.75],[-54,3.45],[-54.6,2.33],[-55.97,2.53],[-55.9,1.89],[-56.47,1.94],[-58.05,4.01],[-57.25,5.49],[-56.97,6],[-55.13,5.82]]]]},"properties":{"name":"Suriname"},"id":"SR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[23.34,78.2],[23.06,78.02],[24.91,77.75],[22.64,77.25],[22.78,77.55],[20.86,77.46],[21.64,77.91],[20.9,78.11],[23.34,78.2]]],[[[21.5,78.57],[22.27,78.26],[20.12,78.47],[21.5,78.57]]],[[[16.82,79.87],[18.1,79.72],[17.64,79.37],[18.36,79.63],[18.92,79.16],[21.55,78.77],[18.97,78.46],[19.09,78.1],[16.61,76.57],[15.5,76.88],[16.52,77],[13.91,77.53],[16.22,77.43],[14.74,77.66],[17.01,77.93],[13.94,77.72],[13.59,78.05],[17.3,78.42],[16.33,78.45],[16.83,78.67],[15.46,78.45],[15.38,78.84],[13.01,78.2],[12.36,78.48],[13.2,78.54],[11.33,78.96],[12.51,78.91],[11.76,79.08],[12.11,79.3],[11.24,79.09],[10.68,79.54],[13.82,79.88],[12.45,79.57],[14.06,79.26],[13.89,79.54],[14.58,79.8],[16.45,78.9],[15.64,79.83],[16.82,79.87]]],[[[20.04,80.46],[22.23,79.98],[22.89,80.49],[23.36,80.43],[23.1,80.12],[24.84,80.35],[27.24,79.9],[23.51,79.18],[19.64,79.6],[22.31,79.8],[18.77,79.72],[17.78,80.13],[20.04,80.46]]]]},"properties":{"name":"Svalbard"},"id":"SJ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[30.9,-26.31],[31.33,-25.75],[31.97,-25.96],[32.13,-26.84],[31.99,-27.32],[31.16,-27.2],[30.9,-26.31]]]]},"properties":{"name":"Swaziland"},"id":"SZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[21.81,68.57],[23.67,67.94],[23.43,67.47],[24.01,66.8],[23.66,66.31],[24.17,65.81],[21.77,65.72],[22.2,65.55],[21.26,65.34],[21.62,65.14],[21.04,64.82],[21.58,64.44],[20.78,63.87],[18.21,62.78],[17.7,62.99],[18.05,62.6],[17.33,62.49],[17.65,62.23],[17.15,60.95],[19.08,59.76],[17.94,59.34],[17.59,59.81],[17.73,59.44],[16.02,59.49],[17.38,59.25],[18.65,59.32],[16.19,58.63],[16.94,58.48],[16.41,58.47],[16.82,58.2],[16.42,57.89],[16.69,57.47],[15.87,56.09],[14.7,56.16],[14.19,55.39],[12.98,55.4],[12.45,56.3],[12.89,56.64],[11.7,57.7],[11.8,58.32],[11.2,58.4],[11.11,59],[11.43,58.99],[11.82,59.85],[12.49,60.11],[12.21,61],[12.86,61.36],[12.12,61.73],[12.14,63.58],[13.99,64.02],[14.12,64.47],[13.66,64.58],[14.49,65.31],[14.5,66.13],[15.47,66.28],[16.73,67.9],[17.88,67.95],[18.09,68.51],[19.94,68.34],[20.35,68.79],[20.1,69.04],[20.58,69.06],[21.81,68.57]]]]},"properties":{"name":"Sweden"},"id":"SE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[7.7,47.54],[9.57,47.54],[9.53,47.27],[9.47,47.06],[9.6,47.06],[10.47,46.87],[10.13,46.23],[9.28,46.5],[9.04,45.84],[8.44,46.46],[7.86,45.92],[7.04,45.93],[6.79,46.43],[5.97,46.21],[6.99,47.5],[7.59,47.58],[7.7,47.54]]],[[[8.71,47.7],[8.68,47.69],[8.67,47.71],[8.71,47.7]]]]},"properties":{"name":"Switzerland"},"id":"CH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[42.36,37.11],[41.29,36.36],[41,34.42],[38.79,33.38],[36.84,32.31],[35.65,32.69],[35.62,33.25],[36.62,34.2],[35.97,34.65],[35.92,35.93],[36.69,36.24],[36.66,36.83],[42.36,37.11]]]]},"properties":{"name":"Syria"},"id":"SY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[73.31,37.46],[71.68,36.68],[71.59,37.9],[70.97,38.47],[69.32,37.12],[67.78,37.19],[68.38,38.2],[67.44,39.48],[68.54,39.55],[69.01,40.09],[68.6,40.18],[70.42,41.05],[70.8,40.73],[70.38,40.38],[70.98,40.24],[69.54,40.13],[69.31,39.54],[73.66,39.45],[73.82,38.61],[74.86,38.47],[74.92,37.24]]]]},"properties":{"name":"Tajikistan"},"id":"TJ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[100.08,20.35],[100.09,20.35],[100.58,20.16],[100.5,19.53],[101.28,19.56],[100.92,17.57],[102.09,18.21],[102.68,17.82],[103.4,18.43],[104.72,17.5],[104.75,16.53],[105.64,15.66],[105.21,14.35],[103.18,14.33],[102.38,13.57],[102.92,11.64],[102.06,12.57],[100.85,12.68],[100.98,13.46],[100.07,13.42],[100.02,12.19],[99.15,10.37],[99.24,9.25],[99.85,9.3],[100.42,7.16],[102.1,6.24],[101.14,5.63],[100.65,6.45],[100.13,6.42],[98.66,8.38],[98.27,8.27],[98.74,10.35],[99.66,11.83],[99.17,13.73],[98.2,15.07],[98.93,16.39],[97.35,18.56],[97.77,18.57],[98.05,19.81],[100.08,20.35]]]]},"properties":{"name":"Thailand"},"id":"TH"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[1.4,9.43],[1.64,6.22],[1.2,6.1],[0.53,6.95],[0.73,8.32],[-0.15,11.14],[0.92,11],[0.78,10.38],[1.4,9.43]]]]},"properties":{"name":"Togo"},"id":"TG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-171.84,-9.21],[-171.86,-9.21],[-171.85,-9.17],[-171.84,-9.21]]]]},"properties":{"name":"Tokelau"},"id":"TK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-175.15,-21.18],[-175.36,-21.1],[-175.05,-21.14],[-175.15,-21.18]]]]},"properties":{"name":"Tonga"},"id":"TO"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-60.92,10.8],[-61.01,10.14],[-61.92,10.04],[-61.46,10.28],[-61.66,10.71],[-60.92,10.8]]],[[[-60.64,11.2],[-60.85,11.16],[-60.53,11.35],[-60.64,11.2]]]]},"properties":{"name":"Trinidad and Tobago"},"id":"TT"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[56.18,25.65],[56.27,25.64],[56.37,24.98],[56.04,24.94],[55.2,22.7],[52.58,22.94],[51.58,24.26],[54.12,24.14],[56.08,26.07],[56.18,25.65]]]]},"properties":{"name":"United Arab Emirates"},"id":"AE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[9.85,37.14],[10.38,36.72],[11.07,37.05],[10.46,36.12],[11.13,35.24],[10.01,34.17],[11.53,33.17],[11.57,32.44],[10.29,31.69],[10.21,30.73],[9.54,30.23],[9.06,32.1],[7.49,33.89],[8.25,34.64],[8.18,36.52],[8.62,36.94],[9.85,37.14]]]]},"properties":{"name":"Tunisia"},"id":"TN"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[35.1,41.96],[38.36,40.91],[40.15,40.92],[41.53,41.52],[42.83,41.58],[43.46,41.11],[43.66,40.11],[44.78,39.71],[44.81,39.63],[44.03,39.38],[44.79,37.15],[42.36,37.11],[36.66,36.83],[36.69,36.24],[35.92,35.93],[36.02,36.93],[32.81,36.03],[31.05,36.85],[29.68,36.12],[28.45,36.88],[27.38,36.68],[28.33,37.04],[27.25,36.97],[27.6,37.23],[27.19,37.35],[27.27,37.96],[26.28,38.26],[26.37,38.66],[27.16,38.44],[26.73,38.65],[26.95,39.55],[26.07,39.48],[26.71,40.38],[29.94,40.72],[29.17,41.23],[31.23,41.09],[33.33,42.02],[35.1,41.96]]],[[[27.39,42.01],[28.01,41.98],[29.04,41.06],[27.51,40.98],[26.18,40.05],[26.83,40.59],[26.04,40.74],[26.63,41.35],[26.36,41.71],[27.39,42.01]]]]},"properties":{"name":"Turkey"},"id":"TR"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[58.78,42.66],[60.01,42.22],[60.14,41.38],[61.87,41.13],[62.55,39.93],[64.38,38.95],[66.64,38],[66.54,37.37],[64.8,37.12],[64.5,36.28],[63.12,35.86],[62.72,35.25],[61.28,35.61],[61.16,36.65],[60.33,36.66],[59.34,37.54],[57.21,38.28],[53.91,37.35],[53.98,38.92],[53.16,39.18],[53.26,39.66],[53.73,39.52],[53.58,39.97],[53,39.76],[52.72,40.45],[52.92,41.08],[53.75,40.62],[54.73,41.1],[53.8,42.12],[52.95,41.97],[52.88,41.05],[52.44,41.74],[53.01,42.14],[54.17,42.34],[56,41.33],[57.04,41.26],[56.99,41.89],[58.78,42.66]]]]},"properties":{"name":"Turkmenistan"},"id":"TM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-71.66,21.82],[-71.66,21.74],[-71.85,21.85],[-71.66,21.82]]],[[[-71.88,21.85],[-72.03,21.94],[-71.91,21.94],[-71.88,21.85]]]]},"properties":{"name":"Turks and Caicos Islands"},"id":"TC"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[179.22,-8.55],[179.2,-8.46],[179.23,-8.5],[179.22,-8.55]]]]},"properties":{"name":"Tuvalu"},"id":"TV"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[34,4.22],[35.01,1.9],[33.91,0.1],[33.92,-1],[31.68,-1],[30.48,-1.06],[29.6,-1.39],[29.96,0.83],[31.3,2.12],[30.73,2.45],[30.86,3.49],[33.52,3.75],[34,4.22]]]]},"properties":{"name":"Uganda"},"id":"UG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[33.42,52.36],[34.42,51.81],[34.1,51.65],[34.38,51.26],[35.37,51.04],[35.61,50.37],[37.46,50.44],[38.02,49.9],[40.14,49.6],[39.7,49.01],[40.08,48.87],[39.66,48.62],[39.8,47.86],[38.85,47.86],[38.24,47.11],[35.91,46.65],[34.99,46.08],[35.34,46.32],[35.2,46.44],[35.21,46.39],[35.05,46.26],[34.7,46.18],[34.56,45.98],[33.67,46.22],[35.13,45.33],[35.34,45.33],[35.05,45.61],[34.76,46.02],[34.67,46.09],[34.83,46.07],[34.9,45.88],[35.05,45.65],[35.31,45.38],[35.48,45.29],[36.64,45.38],[33.96,44.38],[33.37,44.58],[33.54,45.11],[32.48,45.4],[33.61,46.15],[31.79,46.28],[32.06,46.4],[31.51,46.58],[32.36,46.46],[32.65,46.64],[32.02,46.63],[31.75,47.25],[31.91,46.65],[31.48,46.63],[31.59,46.8],[30.83,46.55],[30.25,45.88],[29.75,45.62],[29.63,45.82],[29.66,45.21],[28.21,45.45],[28.99,46.48],[30.12,46.39],[29.95,46.81],[29.14,47.99],[27.76,48.45],[26.63,48.26],[24.92,47.71],[22.89,47.95],[22.15,48.41],[22.56,49.08],[24.11,50.57],[23.6,51.53],[25.78,51.94],[30.55,51.25],[30.94,52.07],[31.78,52.11],[33.42,52.36]]]]},"properties":{"name":"Ukraine"},"id":"UA"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[20.82,40.91],[20.59,41.88],[22.37,42.32],[22.94,41.34],[20.98,40.86],[20.82,40.91]]]]},"properties":{"name":"Macedonia"},"id":"MK"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[25.32,31.5],[29.07,30.82],[31.03,31.6],[31.92,31.53],[32.14,31.07],[34.22,31.32],[34.27,31.22],[34.9,29.49],[34.25,27.73],[33.24,28.55],[32.57,30.01],[32.34,29.6],[35.81,23.92],[35.48,23.94],[35.67,22.97],[36.89,22],[31.45,22],[25,22],[24.71,30.17],[25.15,31.65],[25.32,31.5]]]]},"properties":{"name":"Egypt"},"id":"EG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-6.35,55.24],[-5.43,54.48],[-6.27,54.1],[-8.16,54.44],[-7.41,54.95],[-7.25,55.07],[-6.35,55.24]]],[[[-5.78,56.51],[-6.37,56.31],[-6.32,56.6],[-5.78,56.51]]],[[[-6.14,57.57],[-5.66,57.2],[-6.79,57.45],[-6.14,57.57]]],[[[-6.2,58.36],[-7.12,57.82],[-7.04,58.23],[-6.2,58.36]]],[[[-3.01,58.63],[-4.44,57.57],[-1.77,57.46],[-3.28,56.36],[-2.58,56.27],[-3.73,56.03],[-1.63,55.58],[-1.3,54.76],[-0.07,54.11],[0.12,53.56],[-0.72,53.7],[0.24,53.4],[0.000037000000134,52.88],[1.68,52.75],[1.59,52.08],[0.38,51.45],[1.41,51.18],[-5.68,50.04],[-4.23,51.19],[-3.03,51.21],[-2.38,51.76],[-3.35,51.38],[-5.25,51.73],[-4.13,52.33],[-4.13,52.91],[-4.76,52.79],[-4.2,53.21],[-2.7,53.35],[-3.11,53.55],[-2.81,54.22],[-3.63,54.51],[-3.04,54.98],[-4.95,54.65],[-5.17,55],[-4.61,55.49],[-4.92,55.7],[-4.88,55.94],[-4.48,55.92],[-4.83,56.11],[-5.3,55.85],[-5.03,56.23],[-5.78,55.3],[-5.12,56.82],[-6.24,56.71],[-5.4,57.11],[-5.82,57.82],[-5.1,57.85],[-5.46,58.08],[-5,58.62],[-3.01,58.63]]],[[[-2.79,58.95],[-3.19,58.91],[-3.35,59.11],[-2.79,58.95]]],[[[-1.3,60.49],[-1.27,59.85],[-1.69,60.28],[-1.3,60.49]]]]},"properties":{"name":"United Kingdom"},"id":"GB"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-2.59,49.42],[-2.67,49.43],[-2.5,49.51],[-2.59,49.42]]]]},"properties":{"name":"Guernsey"},"id":"GG"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-2.01,49.21],[-2.21,49.18],[-2.25,49.25],[-2.01,49.21]]]]},"properties":{"name":"Jersey"},"id":"JE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-4.78,54.06],[-4.35,54.41],[-4.39,54.19],[-4.78,54.06]]]]},"properties":{"name":"Isle of Man"},"id":"IM"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[31.68,-1],[33.92,-1],[37.6,-3],[37.61,-3.5],[39.2,-4.67],[38.78,-6.05],[39.55,-6.99],[39.39,-8.9],[40.44,-10.48],[37.46,-11.73],[34.97,-11.57],[34.33,-9.73],[33.13,-9.49],[32.94,-9.41],[30.77,-8.19],[29.55,-6.3],[29.42,-4.45],[30.83,-3.26],[30.57,-2.4],[30.89,-2.08],[30.48,-1.06],[31.68,-1]]]]},"properties":{"name":"Tanzania"},"id":"TZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-155.01,19.33],[-155.86,19.03],[-155.86,20.27],[-155.16,19.96],[-155.01,19.33]]],[[[-156.47,20.9],[-155.99,20.75],[-156.42,20.59],[-156.47,20.9]]],[[[-157.73,21.41],[-158.1,21.3],[-158.27,21.58],[-157.73,21.41]]],[[[-159.43,21.88],[-159.79,22.06],[-159.35,22.22],[-159.43,21.88]]],[[[-95.08,49.36],[-94.61,48.72],[-91.42,48.04],[-88.37,48.31],[-84.13,46.53],[-82.54,45.36],[-82.13,43.59],[-83.17,42.05],[-82.7,41.68],[-78.99,42.82],[-79.18,43.47],[-78.72,43.63],[-76.8,43.63],[-74.99,44.99],[-70.88,45.24],[-69.23,47.47],[-67.79,47.07],[-67.8,45.7],[-67.21,45.18],[-67.19,44.66],[-68.8,44.58],[-70.73,43.12],[-70.58,42.65],[-71.04,42.31],[-69.94,41.67],[-71.19,41.47],[-71.39,41.81],[-71.51,41.37],[-74,40.71],[-73.96,41.31],[-74.42,39.36],[-74.96,38.92],[-75.56,39.62],[-75.03,40.01],[-75.59,39.65],[-75.04,38.42],[-75.96,37.15],[-75.64,37.96],[-76.36,38.86],[-75.83,39.58],[-76.62,39.25],[-76.31,38.05],[-77.24,38.4],[-77.06,38.91],[-77.32,38.35],[-76.24,37.9],[-76.35,37.62],[-77.13,38.17],[-76.27,37.08],[-77.23,37.3],[-75.99,36.91],[-75.53,35.8],[-75.94,36.72],[-75.79,36.07],[-76.71,36.26],[-76.73,35.94],[-75.72,35.81],[-76.15,35.34],[-77.05,35.53],[-76.47,35.27],[-76.94,34.98],[-76.34,34.89],[-77.43,34.74],[-77.93,33.93],[-78.83,33.73],[-80.47,32.32],[-80.84,32.52],[-81.5,31.13],[-80.03,26.79],[-80.4,25.18],[-81.09,25.12],[-81.74,25.96],[-81.78,26.71],[-82.06,26.54],[-82.66,27.46],[-82.42,27.92],[-82.85,27.86],[-82.63,28.88],[-83.67,29.91],[-85.35,29.68],[-86.26,30.5],[-88.02,30.22],[-88.02,30.7],[-88.13,30.31],[-90.42,30.2],[-89.4,30.05],[-89.75,29.63],[-89.01,29.18],[-89.4,28.93],[-90.18,29.57],[-90.21,29.09],[-91.25,29.24],[-91.84,29.83],[-92.31,29.54],[-93.85,29.99],[-93.86,29.68],[-94.77,29.36],[-94.48,29.56],[-95.06,29.72],[-95.14,29.06],[-96.21,28.49],[-96.64,28.72],[-96.4,28.44],[-97.52,27.87],[-97.41,27.33],[-97.77,27.46],[-97.14,25.97],[-99.1,26.43],[-99.51,27.57],[-101.41,29.77],[-102.31,29.89],[-103.38,29.02],[-106.4,31.75],[-111.05,31.33],[-113.05,31.97],[-114.72,32.72],[-117.12,32.54],[-118.53,34.05],[-120.62,34.57],[-120.61,35.14],[-122.49,37.52],[-122.39,37.82],[-122.01,37.47],[-122.39,37.96],[-122.24,38.06],[-121.42,38.01],[-122.37,38.16],[-122.49,37.83],[-123,38.01],[-124.33,40.27],[-124.04,41.43],[-124.52,42.87],[-123.95,46.18],[-123.16,46.2],[-124,46.32],[-123.8,46.98],[-124.16,46.94],[-124.72,48.4],[-122.75,48.16],[-123.15,47.37],[-122.45,47.77],[-122.88,47.06],[-122.31,47.4],[-122.76,49],[-95.15,49],[-95.08,49.36]]],[[[-156.45,71.26],[-155.59,71.16],[-155.97,70.76],[-155.09,71.15],[-152.25,70.84],[-152.5,70.65],[-152.08,70.57],[-152.63,70.56],[-151.97,70.44],[-143.28,70.12],[-141,69.64],[-141,60.31],[-139.07,60.35],[-137.48,58.91],[-135.47,59.8],[-133.43,58.46],[-131.82,56.6],[-130.02,55.91],[-130.17,55.75],[-130.14,55.54],[-129.99,55.28],[-130.36,54.91],[-130.69,54.76],[-131.01,55],[-130.46,55.33],[-131.06,55.12],[-130.61,55.3],[-131.01,56.11],[-132.16,55.58],[-131.77,56.2],[-133.51,57.19],[-133.06,57.35],[-133.64,57.7],[-133,57.51],[-133.56,57.9],[-133.12,57.86],[-134.05,58.07],[-133.77,58.52],[-134.76,58.38],[-135.34,59.47],[-135.09,58.23],[-135.92,58.38],[-135.77,58.9],[-137.06,59.07],[-136.03,58.39],[-136.65,58.22],[-139.71,59.5],[-139.49,59.98],[-139.29,59.57],[-138.89,59.81],[-139.5,60.03],[-140.4,59.7],[-141.39,60.14],[-143.92,59.99],[-144.94,60.3],[-144.61,60.72],[-145.29,60.35],[-146.65,60.7],[-146.12,60.84],[-146.76,60.96],[-146.3,61.13],[-147.87,60.83],[-147.72,61.28],[-148.7,60.79],[-148.2,60.63],[-148.68,60.45],[-147.94,60.46],[-148.44,59.95],[-149.42,60.12],[-150.91,59.24],[-151.98,59.28],[-150.99,59.78],[-151.88,59.75],[-151.41,60.73],[-149.03,60.85],[-150.06,61.15],[-149.42,61.51],[-153.1,60.29],[-152.58,60.06],[-154.26,59.14],[-153.27,58.85],[-156.55,56.98],[-158.42,56.44],[-158.12,56.23],[-158.51,55.99],[-161.25,55.35],[-161.56,55.62],[-161.97,55.1],[-162.63,55.3],[-162.56,54.96],[-163.36,54.81],[-161.8,55.89],[-160.25,55.77],[-160.35,56.29],[-157.4,57.49],[-157.61,58.09],[-157.14,58.16],[-157.55,58.38],[-156.78,59.15],[-158.19,58.61],[-158.49,59],[-157.99,58.9],[-158.54,59.18],[-158.9,58.4],[-160.33,59.06],[-162.17,58.65],[-161.57,59.1],[-161.99,59.14],[-161.71,59.5],[-162.24,60.06],[-162.15,60.25],[-162.37,60.18],[-161.88,60.7],[-162.57,60.32],[-162.52,59.99],[-164.07,59.82],[-165.43,60.56],[-163.55,60.9],[-165.15,60.93],[-164.82,61.11],[-165.12,61.08],[-165.14,61.26],[-165.16,61.17],[-165.37,61.2],[-165.29,61.25],[-165.15,61.42],[-165.06,61.42],[-165,61.47],[-164.85,61.49],[-164.72,61.63],[-164.76,61.63],[-165.02,61.5],[-165.08,61.43],[-165.16,61.43],[-165.29,61.33],[-165.27,61.31],[-165.31,61.26],[-165.41,61.21],[-165.34,61.16],[-165.39,61.07],[-166.2,61.59],[-165.25,62.45],[-164.64,62.42],[-164.48,62.75],[-164.88,62.84],[-164.41,63.21],[-161.15,63.51],[-160.78,63.87],[-161.53,64.42],[-160.78,64.72],[-162.79,64.34],[-166.12,64.57],[-166.96,65.19],[-166.06,65.26],[-168.13,65.67],[-164.35,66.59],[-163.63,66.57],[-164.19,66.2],[-163.66,66.07],[-161,66.2],[-161.91,66.27],[-162.64,66.87],[-162.34,66.96],[-161.6,66.45],[-160.23,66.4],[-161.51,66.53],[-161.9,66.73],[-161.5,66.98],[-162.35,67.16],[-163.73,67.11],[-164.12,67.61],[-166.83,68.35],[-166.22,68.88],[-163.65,69.11],[-161.94,70.31],[-159.94,70.59],[-159.84,70.27],[-159.29,70.53],[-160.12,70.62],[-159.67,70.8],[-156.45,71.26]]]]},"properties":{"name":"United States"},"id":"US"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-64.76,17.77],[-64.56,17.75],[-64.9,17.68],[-64.76,17.77]]]]},"properties":{"name":"Virgin Islands"},"id":"VI"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-2.83,11],[-2.69,9.48],[-3.63,9.95],[-4.7,9.7],[-5.52,10.44],[-5.27,11.84],[-4.42,12.3],[-3.96,13.5],[-3.44,13.17],[-2.47,14.29],[-0.73,15.08],[0.24,14.92],[0.6,13.7],[1.29,13.35],[0.99,13.05],[2.14,12.69],[2.4,11.9],[0.92,11],[-0.15,11.14],[-2.83,11]]]]},"properties":{"name":"Burkina Faso"},"id":"BF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-57.81,-30.75],[-57.61,-30.18],[-56.81,-30.11],[-56.01,-31.08],[-55.58,-30.85],[-53.88,-31.97],[-53.09,-32.73],[-53.52,-33.15],[-53.37,-33.74],[-54.15,-34.67],[-56.32,-34.91],[-57.12,-34.46],[-57.84,-34.49],[-58.4,-33.93],[-58.36,-33.13],[-58.15,-33.1],[-58.05,-32.93],[-58.2,-32.45],[-57.81,-30.75]]]]},"properties":{"name":"Uruguay"},"id":"UY"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[64.38,38.95],[62.55,39.93],[61.87,41.13],[60.14,41.38],[60.01,42.22],[58.78,42.66],[56.99,41.89],[57.04,41.26],[56,41.33],[56,45],[58.57,45.57],[62.03,43.48],[64.93,43.74],[66.12,43],[66.03,42],[66.53,42],[66.72,41.17],[67.94,41.18],[68.46,40.6],[69.06,41.38],[70.97,42.25],[71.28,42.2],[70.19,41.53],[71.42,41.12],[71.69,41.56],[73.17,40.82],[70.98,40.24],[70.38,40.38],[70.8,40.73],[70.42,41.05],[68.6,40.18],[69.01,40.09],[68.54,39.55],[67.44,39.48],[68.38,38.2],[67.78,37.19],[66.54,37.37],[66.64,38],[64.38,38.95]]]]},"properties":{"name":"Uzbekistan"},"id":"UZ"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-69.77,11.7],[-68.42,11.18],[-68.16,10.5],[-66.24,10.64],[-65.08,10.06],[-63.7,10.49],[-64.26,10.66],[-61.88,10.73],[-62.92,10.53],[-62.62,10.12],[-63.02,10.1],[-60.85,9.44],[-61.6,8.55],[-59.99,8.54],[-59.83,8.24],[-60.72,7.54],[-60.29,7.06],[-61.13,6.71],[-61.39,5.94],[-60.73,5.2],[-60.99,4.52],[-62.75,4.03],[-62.88,3.56],[-64.8,4.28],[-64.05,2.48],[-63.39,2.15],[-65.52,0.65],[-66.87,1.22],[-67.19,2.39],[-67.83,2.83],[-67.29,3.4],[-67.86,4.56],[-67.45,6.19],[-69.25,6.08],[-70.12,6.98],[-72,7.02],[-72.78,9.08],[-73.38,9.17],[-72.49,11.12],[-71.98,11.66],[-71.32,11.85],[-71.97,11.56],[-71.58,10.71],[-72.13,9.81],[-71.62,9.04],[-71.06,9.34],[-71.5,10.96],[-69.8,11.43],[-70.24,11.63],[-70.03,12.2],[-69.77,11.7]]]]},"properties":{"name":"Venezuela"},"id":"VE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-178.04,-14.32],[-178.14,-14.32],[-178.19,-14.24],[-178.04,-14.32]]],[[[-176.16,-13.35],[-176.16,-13.21],[-176.12,-13.26],[-176.16,-13.35]]]]},"properties":{"name":"Wallis and Futuna"},"id":"WF"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-171.43,-14.02],[-172.06,-13.87],[-171.82,-13.81],[-171.43,-14.02]]],[[[-172.29,-13.49],[-172.21,-13.81],[-172.78,-13.53],[-172.29,-13.49]]]]},"properties":{"name":"Samoa"},"id":"WS"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[52.23,15.67],[43.96,12.59],[43.25,13.21],[42.79,16.38],[43.31,17.46],[44.47,17.41],[46.33,16.67],[46.33,15.62],[48.77,18.27],[52,19],[53.11,16.64],[52.3,16.27],[52.23,15.67]]]]},"properties":{"name":"Yemen"},"id":"YE"},
+{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[24.97,-17.56],[23.48,-17.63],[22,-16.17],[22,-13],[24.02,-13.01],[23.99,-10.87],[24.45,-11.46],[25.33,-11.19],[26,-11.9],[26.87,-11.97],[27.2,-11.57],[29.02,-13.4],[29.8,-13.45],[29.81,-12.16],[29.03,-12.38],[28.36,-11.55],[28.7,-10.65],[28.37,-9.26],[28.9,-8.48],[30.77,-8.19],[32.94,-9.41],[33.7,-10.56],[33.25,-10.89],[33.55,-12.36],[32.68,-13.61],[33.22,-14.01],[30.21,-14.98],[30.42,-15.63],[28.93,-15.97],[27.04,-17.96],[25.26,-17.8],[24.97,-17.56]]]]},"properties":{"name":"Zambia"},"id":"ZM"}]}
Index: Dev/branches/Demo/d3/examples/delaunay/delaunay.html
===================================================================
--- Dev/branches/Demo/d3/examples/delaunay/delaunay.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/delaunay/delaunay.html	(revision 225)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Delaunay Triangulation</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <style type="text/css">
+
+@import url("../../lib/colorbrewer/colorbrewer.css");
+
+path {
+  stroke: #000;
+  stroke-width: .5px;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500;
+
+var vertices = d3.range(500).map(function(d) {
+  return [Math.random() * w, Math.random() * h];
+});
+
+var svg = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+    .attr("class", "PiYG");
+
+svg.append("svg:g")
+  .selectAll("path")
+    .data(d3.geom.delaunay(vertices))
+  .enter().append("svg:path")
+    .attr("class", function(d, i) { return "q" + (i % 9) + "-9"; })
+    .attr("d", function(d) { return "M" + d.join("L") + "Z"; });
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/donut/donut.html
===================================================================
--- Dev/branches/Demo/d3/examples/donut/donut.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/donut/donut.html	(revision 225)
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Donut Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 400,
+    h = 400,
+    r1 = Math.min(w, h) / 2,
+    r0 = r1 * .6,
+    n = 10,
+    q = 0,
+    data0 = d3.range(n).map(Math.random),
+    data1 = d3.range(n).map(Math.random),
+    data,
+    color = d3.scale.category20(),
+    arc = d3.svg.arc(),
+    donut = d3.layout.pie();
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+vis.selectAll("g.arc")
+    .data(arcs(data0, data1))
+  .enter().append("svg:g")
+    .attr("class", "arc")
+    .attr("transform", "translate(" + r1 + "," + r1 + ")")
+  .append("svg:path")
+    .attr("fill", function(d, i) { return color(i); })
+    .attr("d", arc);
+
+window.addEventListener("keypress", swap, false);
+
+function arcs(data0, data1) {
+  var arcs0 = donut(data0),
+      arcs1 = donut(data1),
+      i = -1,
+      arc;
+  while (++i < n) {
+    arc = arcs0[i];
+    arc.innerRadius = r0;
+    arc.outerRadius = r1;
+    arc.next = arcs1[i];
+  }
+  return arcs0;
+}
+
+function swap() {
+  d3.selectAll("g.arc > path")
+      .data(++q & 1 ? arcs(data0, data1) : arcs(data1, data0))
+      .each(transitionSplit);
+}
+
+// 1. Wedges split into two rings.
+function transitionSplit(d, i) {
+  d3.select(this)
+    .transition().duration(1000)
+      .attrTween("d", tweenArc({
+        innerRadius: i & 1 ? r0 : (r0 + r1) / 2,
+        outerRadius: i & 1 ? (r0 + r1) / 2 : r1
+      }))
+      .each("end", transitionRotate);
+}
+
+// 2. Wedges translate to be centered on their final position.
+function transitionRotate(d, i) {
+  var a0 = d.next.startAngle + d.next.endAngle,
+      a1 = d.startAngle - d.endAngle;
+  d3.select(this)
+    .transition().duration(1000)
+      .attrTween("d", tweenArc({
+        startAngle: (a0 + a1) / 2,
+        endAngle: (a0 - a1) / 2
+      }))
+      .each("end", transitionResize);
+}
+
+// 3. Wedges then update their values, changing size.
+function transitionResize(d, i) {
+  d3.select(this)
+    .transition().duration(1000)
+      .attrTween("d", tweenArc({
+        startAngle: d.next.startAngle,
+        endAngle: d.next.endAngle
+      }))
+      .each("end", transitionUnite);
+}
+
+// 4. Wedges reunite into a single ring.
+function transitionUnite(d, i) {
+  d3.select(this)
+    .transition().duration(1000)
+      .attrTween("d", tweenArc({
+        innerRadius: r0,
+        outerRadius: r1
+      }));
+}
+
+function tweenArc(b) {
+  return function(a) {
+    var i = d3.interpolate(a, b);
+    for (var key in b) a[key] = b[key]; // update data
+    return function(t) {
+      return arc(i(t));
+    };
+  };
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/dot/dot.html
===================================================================
--- Dev/branches/Demo/d3/examples/dot/dot.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/dot/dot.html	(revision 225)
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Dot Plot</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+path.dot {
+  fill: white;
+  stroke-width: 1.5px;
+}
+
+rect {
+  fill: none;
+  stroke: black;
+  shape-rendering: crispEdges;
+}
+
+.x line, .y line {
+  stroke: #ccc;
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var data = d3.range(100).map(function(i) {
+  return {x: i / 99, y: Math.random()};
+});
+
+var w = 450,
+    h = 450,
+    p = 20,
+    x = d3.scale.linear().range([0, w]),
+    y = d3.scale.linear().range([h, 0]),
+    symbol = d3.scale.ordinal().range(d3.svg.symbolTypes),
+    color = d3.scale.category10();
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w + p * 2)
+    .attr("height", h + p * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + p + "," + p + ")");
+
+var xrule = vis.selectAll("g.x")
+    .data(x.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "x");
+
+xrule.append("svg:line")
+    .attr("x1", x)
+    .attr("x2", x)
+    .attr("y1", 0)
+    .attr("y2", h);
+
+xrule.append("svg:text")
+    .attr("x", x)
+    .attr("y", h + 3)
+    .attr("dy", ".71em")
+    .attr("text-anchor", "middle")
+    .text(x.tickFormat(10));
+
+var yrule = vis.selectAll("g.y")
+    .data(y.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "y");
+
+yrule.append("svg:line")
+    .attr("x1", 0)
+    .attr("x2", w)
+    .attr("y1", y)
+    .attr("y2", y);
+
+yrule.append("svg:text")
+    .attr("x", -3)
+    .attr("y", y)
+    .attr("dy", ".35em")
+    .attr("text-anchor", "end")
+    .text(y.tickFormat(10));
+
+vis.append("svg:rect")
+    .attr("width", w)
+    .attr("height", h);
+
+vis.selectAll("path.dot")
+    .data(data)
+  .enter().append("svg:path")
+    .attr("class", "dot")
+    .attr("stroke", function(d, i) { return color(i); })
+    .attr("transform", function(d) { return "translate(" + x(d.x) + "," + y(d.y) + ")"; })
+    .attr("d", d3.svg.symbol()
+    .type(function(d, i) { return symbol(i); }));
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/README
===================================================================
--- Dev/branches/Demo/d3/examples/force/README	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/README	(revision 225)
@@ -0,0 +1,10 @@
+The miserables.json file contains the weighted network of coappearances of
+characters in Victor Hugo's novel /Les Miserables/. Nodes represent characters
+as indicated by the labels, and edges connect any pair of characters that
+appear in the same chapter of the book. The values on the edges are the number
+of such coappearances. The data on coappearances were taken from D. E. Knuth,
+"The Stanford GraphBase: A Platform for Combinatorial Computing",
+Addison-Wesley, Reading, MA (1993).
+
+The group labels were transcribed from "Finding and evaluating community
+structure in networks" by M. E. J. Newman and M. Girvan.
Index: Dev/branches/Demo/d3/examples/force/force-cluster.html
===================================================================
--- Dev/branches/Demo/d3/examples/force/force-cluster.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force-cluster.html	(revision 225)
@@ -0,0 +1,251 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Clustered Network</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+svg {
+  border: 1px solid #ccc;
+}
+body {
+  font: 10px sans-serif;
+}
+circle.node {
+  fill: lightsteelblue;
+  stroke: #fff;
+  stroke-width: 1.5px;
+}
+path.hull {
+  fill: lightsteelblue;
+  fill-opacity: 0.3;
+}
+line.link {
+  stroke: #333;
+  stroke-opacity: 0.5;
+  pointer-events: none;
+}
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+var w = 960,     // svg width
+    h = 600,     // svg height
+    dr = 4,      // default point radius
+    off = 15,    // cluster hull offset
+    expand = {}, // expanded clusters
+    data, net, force, hullg, hull, linkg, link, nodeg, node,
+    curve = d3.svg.line().interpolate("cardinal-closed").tension(.85),
+    fill = d3.scale.category20();
+
+function noop() { return false; }
+
+function nodeid(n) {
+  return n.size ? "_g_"+n.group : n.name;
+}
+
+function linkid(l) {
+  var u = nodeid(l.source),
+      v = nodeid(l.target);
+  return u<v ? u+"|"+v : v+"|"+u;
+}
+
+function getGroup(n) { return n.group; }
+
+// constructs the network to visualize
+function network(data, prev, index, expand) {
+  expand = expand || {};
+  var gm = {},    // group map
+      nm = {},    // node map
+      lm = {},    // link map
+      gn = {},    // previous group nodes
+      gc = {},    // previous group centroids
+      nodes = [], // output nodes
+      links = []; // output links
+
+  // process previous nodes for reuse or centroid calculation
+  if (prev) {
+    prev.nodes.forEach(function(n) {
+      var i = index(n), o;
+      if (n.size > 0) {
+        gn[i] = n;
+        n.size = 0;
+      } else {
+        o = gc[i] || (gc[i] = {x:0,y:0,count:0});
+        o.x += n.x;
+        o.y += n.y;
+        o.count += 1;
+      }
+    });
+  }
+
+  // determine nodes
+  for (var k=0; k<data.nodes.length; ++k) {
+    var n = data.nodes[k],
+        i = index(n);
+
+    if (expand[i]) {
+      // the node should be directly visible
+      nm[n.name] = nodes.length;
+      nodes.push(n);
+      if (gn[i]) {
+        // place new nodes at cluster location (plus jitter)
+        n.x = gn[i].x + Math.random();
+        n.y = gn[i].y + Math.random();
+      }
+    } else {
+      // the node is part of a collapsed cluster
+      var l = gm[i] || (gm[i]=gn[i]) || (gm[i]={group:i, size:0, nodes:[]});
+      if (l.size == 0) {
+        // if new cluster, add to set and position at centroid of leaf nodes
+        nm[i] = nodes.length;
+        nodes.push(l);
+        if (gc[i]) {
+          l.x = gc[i].x / gc[i].count;
+          l.y = gc[i].y / gc[i].count;
+        }
+      }
+      l.size += 1;
+      l.nodes.push(n);
+    }
+  }
+
+  // determine links
+  for (k=0; k<data.links.length; ++k) {
+    var e = data.links[k],
+        u = index(e.source),
+        v = index(e.target);
+    u = expand[u] ? nm[e.source.name] : nm[u];
+    v = expand[v] ? nm[e.target.name] : nm[v];
+    var i = (u<v ? u+"|"+v : v+"|"+u),
+        l = lm[i] || (lm[i] = {source:u, target:v, size:0});
+    l.size += 1;
+  }
+  for (i in lm) { links.push(lm[i]); }
+
+  return {nodes: nodes, links: links};
+}
+
+function convexHulls(nodes, index, offset) {
+  var h = {};
+
+  // create point sets
+  for (var k=0; k<nodes.length; ++k) {
+    var n = nodes[k];
+    if (n.size) continue;
+    var i = index(n),
+        l = h[i] || (h[i] = []);
+    l.push([n.x-offset, n.y-offset]);
+    l.push([n.x-offset, n.y+offset]);
+    l.push([n.x+offset, n.y-offset]);
+    l.push([n.x+offset, n.y+offset]);
+  }
+
+  // create convex hulls
+  var hulls = [];
+  for (i in h) {
+    hulls.push({group: i, path: d3.geom.hull(h[i])});
+  }
+
+  return hulls;
+}
+
+function drawCluster(d) {
+  return curve(d.path); // 0.8
+}
+
+// --------------------------------------------------------
+
+var body = d3.select("body");
+
+var vis = body.append("svg:svg")
+   .attr("width", w)
+   .attr("height", h);
+
+d3.json("miserables.json", function(json) {
+  data = json;
+  for (var i=0; i<data.links.length; ++i) {
+    o = data.links[i];
+    o.source = data.nodes[o.source];
+    o.target = data.nodes[o.target];
+  }
+
+  hullg = vis.append("svg:g");
+  linkg = vis.append("svg:g");
+  nodeg = vis.append("svg:g");
+
+  init();
+
+  vis.attr("opacity", 1e-6)
+    .transition()
+      .duration(1000)
+      .attr("opacity", 1);
+});
+
+function init() {
+  if (force) force.stop();
+
+  net = network(data, net, getGroup, expand);
+
+  force = d3.layout.force()
+      .nodes(net.nodes)
+      .links(net.links)
+      .size([w, h])
+      .linkDistance(50)
+      .start();
+
+  hullg.selectAll("path.hull").remove();
+  hull = hullg.selectAll("path.hull")
+     .data(convexHulls(net.nodes, getGroup, off))
+    .enter().append("svg:path")
+     .attr("class", "hull")
+     .attr("d", drawCluster)
+     .style("fill", function(d) { return fill(d.group); })
+     .on("dblclick", function(d) { expand[d.group] = false; init(); });
+
+  link = linkg.selectAll("line.link").data(net.links, linkid);
+  link.exit().remove();
+  link.enter().append("svg:line")
+      .attr("class", "link")
+      .attr("x1", function(d) { return d.source.x; })
+      .attr("y1", function(d) { return d.source.y; })
+      .attr("x2", function(d) { return d.target.x; })
+      .attr("y2", function(d) { return d.target.y; })
+      .style("stroke-width", function(d) { return d.size || 1; });
+  link = linkg.selectAll("line.link");
+
+  node = nodeg.selectAll("circle.node").data(net.nodes, nodeid);
+  node.exit().remove();
+  node.enter().append("svg:circle")
+      .attr("class", function(d) { return "node" + (d.size?"":" leaf"); })
+      .attr("r", function(d) { return d.size ? d.size + dr : dr+1; })
+      .attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; })
+      .style("fill", function(d) { return fill(d.group); })
+      .on("dblclick", function(d) {
+        if (d.size) { expand[d.group] = true; init(); }
+      });
+
+  node = nodeg.selectAll("circle.node")
+      .call(force.drag);
+
+  force.on("tick", function() {
+    if (!hull.empty()) {
+      hull.data(convexHulls(net.nodes, getGroup, off))
+          .attr("d", drawCluster);
+    }
+
+    link.attr("x1", function(d) { return d.source.x; })
+        .attr("y1", function(d) { return d.source.y; })
+        .attr("x2", function(d) { return d.target.x; })
+        .attr("y2", function(d) { return d.target.y; });
+
+    node.attr("cx", function(d) { return d.x; })
+        .attr("cy", function(d) { return d.y; });
+  });
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/force-dynamic.html
===================================================================
--- Dev/branches/Demo/d3/examples/force/force-dynamic.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force-dynamic.html	(revision 225)
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Force-Directed Layout (Dynamic)</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+rect {
+  fill: #fff;
+}
+
+.node {
+  fill: #000;
+}
+
+.cursor {
+  fill: none;
+  stroke: brown;
+  pointer-events: none;
+}
+
+.link {
+  stroke: #999;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500,
+    fill = d3.scale.category20(),
+    nodes = [],
+    links = [];
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+vis.append("svg:rect")
+    .attr("width", w)
+    .attr("height", h);
+
+var force = d3.layout.force()
+    .distance(30)
+    .nodes(nodes)
+    .links(links)
+    .size([w, h]);
+
+var cursor = vis.append("svg:circle")
+    .attr("r", 30)
+    .attr("transform", "translate(-100,-100)")
+    .attr("class", "cursor");
+
+force.on("tick", function() {
+  vis.selectAll("line.link")
+      .attr("x1", function(d) { return d.source.x; })
+      .attr("y1", function(d) { return d.source.y; })
+      .attr("x2", function(d) { return d.target.x; })
+      .attr("y2", function(d) { return d.target.y; });
+
+  vis.selectAll("circle.node")
+      .attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; });
+});
+
+vis.on("mousemove", function() {
+  cursor.attr("transform", "translate(" + d3.svg.mouse(this) + ")");
+});
+
+vis.on("mousedown", function() {
+  var point = d3.svg.mouse(this),
+      node = {x: point[0], y: point[1]},
+      n = nodes.push(node);
+
+  // add links to any nearby nodes
+  nodes.forEach(function(target) {
+    var x = target.x - node.x,
+        y = target.y - node.y;
+    if (Math.sqrt(x * x + y * y) < 30) {
+      links.push({source: node, target: target});
+    }
+  });
+
+  restart();
+});
+
+restart();
+
+function restart() {
+  force.start();
+
+  vis.selectAll("line.link")
+      .data(links)
+    .enter().insert("svg:line", "circle.node")
+      .attr("class", "link")
+      .attr("x1", function(d) { return d.source.x; })
+      .attr("y1", function(d) { return d.source.y; })
+      .attr("x2", function(d) { return d.target.x; })
+      .attr("y2", function(d) { return d.target.y; });
+
+  vis.selectAll("circle.node")
+      .data(nodes)
+    .enter().insert("svg:circle", "circle.cursor")
+      .attr("class", "node")
+      .attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; })
+      .attr("r", 4.5)
+      .call(force.drag);
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/force-interactive.html
===================================================================
--- Dev/branches/Demo/d3/examples/force/force-interactive.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force-interactive.html	(revision 225)
@@ -0,0 +1,136 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Force-Directed Graph</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+circle.node {
+  cursor: pointer;
+  stroke: #3182bd;
+  stroke-width: 1.5px;
+}
+
+line.link {
+  fill: none;
+  stroke: #9ecae1;
+  stroke-width: 1.5px;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500,
+    root;
+
+var force = d3.layout.force()
+    .size([w, h]);
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+d3.json("../data/flare.json", function(json) {
+  root = json;
+  update();
+});
+
+function update() {
+  var nodes = flatten(root),
+      links = d3.layout.tree().links(nodes);
+
+  // Restart the force layout.
+  force
+      .nodes(nodes)
+      .links(links)
+      .start();
+
+  // Update the linksâŠ
+  var link = vis.selectAll("line.link")
+      .data(links, function(d) { return d.target.id; });
+
+  // Enter any new links.
+  link.enter().insert("svg:line", ".node")
+      .attr("class", "link")
+      .attr("x1", function(d) { return d.source.x; })
+      .attr("y1", function(d) { return d.source.y; })
+      .attr("x2", function(d) { return d.target.x; })
+      .attr("y2", function(d) { return d.target.y; });
+
+  // Exit any old links.
+  link.exit().remove();
+
+  // Update the nodesâŠ
+  var node = vis.selectAll("circle.node")
+      .data(nodes, function(d) { return d.id; })
+      .style("fill", color);
+
+  // Enter any new nodes.
+  node.enter().append("svg:circle")
+      .attr("class", "node")
+      .attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; })
+      .attr("r", function(d) { return Math.sqrt(d.size) / 10 || 4.5; })
+      .style("fill", color)
+      .on("click", click)
+      .call(force.drag);
+
+  // Exit any old nodes.
+  node.exit().remove();
+
+  // Re-select for update.
+  link = vis.selectAll("line.link");
+  node = vis.selectAll("circle.node");
+
+  force.on("tick", function() {
+    link.attr("x1", function(d) { return d.source.x; })
+        .attr("y1", function(d) { return d.source.y; })
+        .attr("x2", function(d) { return d.target.x; })
+        .attr("y2", function(d) { return d.target.y; });
+
+    node.attr("cx", function(d) { return d.x; })
+        .attr("cy", function(d) { return d.y; });
+  });
+}
+
+// Color leaf nodes orange, and packages white or blue.
+function color(d) {
+  return d._children ? "#3182bd" : d.children ? "#c6dbef" : "#fd8d3c";
+}
+
+// Toggle children on click.
+function click(d) {
+  if (d.children) {
+    d._children = d.children;
+    d.children = null;
+  } else {
+    d.children = d._children;
+    d._children = null;
+  }
+  update();
+}
+
+// Returns a list of all nodes under the root.
+function flatten(root) {
+  var nodes = [], i = 0;
+
+  function recurse(node) {
+    if (node.children) node.children.forEach(recurse);
+    if (!node.id) node.id = ++i;
+    nodes.push(node);
+  }
+
+  recurse(root);
+  return nodes;
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/force-map.html
===================================================================
--- Dev/branches/Demo/d3/examples/force/force-map.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force-map.html	(revision 225)
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Force-Directed Map</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+path {
+  fill: #ddd;
+  fill-opacity: .8;
+  stroke: #fff;
+  stroke-width: 1.5px;
+}
+
+line {
+  stroke: #999;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500;
+
+var path = d3.geo.path(),
+    force = d3.layout.force().size([w, h]);
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+d3.json("../data/us-states.json", function(states) {
+  var nodes = [],
+      links = [];
+
+  states.features.forEach(function(d, i) {
+    if (d.id == "02" || d.id == "15" || d.id == "72") return;
+    var centroid = path.centroid(d);
+    centroid.x = centroid[0];
+    centroid.y = centroid[1];
+    centroid.feature = d;
+    nodes.push(centroid);
+  });
+
+  d3.geom.delaunay(nodes).forEach(function(d) {
+    links.push(edge(d[0], d[1]));
+    links.push(edge(d[1], d[2]));
+    links.push(edge(d[2], d[0]));
+  });
+
+  force
+      .gravity(0)
+      .charge(0)
+      .nodes(nodes)
+      .links(links)
+      .linkDistance(function(d) { return d.distance; })
+      .start();
+
+  var link = svg.selectAll("line")
+      .data(links)
+    .enter().append("svg:line")
+      .attr("x1", function(d) { return d.source.x; })
+      .attr("y1", function(d) { return d.source.y; })
+      .attr("x2", function(d) { return d.target.x; })
+      .attr("y2", function(d) { return d.target.y; });
+
+  var node = svg.selectAll("g")
+      .data(nodes)
+    .enter().append("svg:g")
+      .attr("transform", function(d) { return "translate(" + -d.x + "," + -d.y + ")"; })
+      .call(force.drag)
+    .append("svg:path")
+      .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; })
+      .attr("d", function(d) { return path(d.feature); });
+
+  force.on("tick", function(e) {
+    link.attr("x1", function(d) { return d.source.x; })
+        .attr("y1", function(d) { return d.source.y; })
+        .attr("x2", function(d) { return d.target.x; })
+        .attr("y2", function(d) { return d.target.y; });
+
+    node.attr("transform", function(d) {
+      return "translate(" + d.x + "," + d.y + ")";
+    });
+  });
+});
+
+function edge(a, b) {
+  var dx = a[0] - b[0], dy = a[1] - b[1];
+  return {
+    source: a,
+    target: b,
+    distance: Math.sqrt(dx * dx + dy * dy)
+  };
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/force-multi-foci.html
===================================================================
--- Dev/branches/Demo/d3/examples/force/force-multi-foci.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force-multi-foci.html	(revision 225)
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Force-Directed Layout (Multiple Foci)</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500,
+    fill = d3.scale.category10(),
+    nodes = d3.range(100).map(Object);
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+var force = d3.layout.force()
+    .nodes(nodes)
+    .links([])
+    .size([w, h])
+    .start();
+
+var node = vis.selectAll("circle.node")
+    .data(nodes)
+  .enter().append("svg:circle")
+    .attr("class", "node")
+    .attr("cx", function(d) { return d.x; })
+    .attr("cy", function(d) { return d.y; })
+    .attr("r", 8)
+    .style("fill", function(d, i) { return fill(i & 3); })
+    .style("stroke", function(d, i) { return d3.rgb(fill(i & 3)).darker(2); })
+    .style("stroke-width", 1.5)
+    .call(force.drag);
+
+vis.style("opacity", 1e-6)
+  .transition()
+    .duration(1000)
+    .style("opacity", 1);
+
+force.on("tick", function(e) {
+
+  // Push different nodes in different directions for clustering.
+  var k = 6 * e.alpha;
+  nodes.forEach(function(o, i) {
+    o.x += i & 2 ? k : -k;
+    o.y += i & 1 ? k : -k;
+  });
+
+  node.attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; });
+});
+
+d3.select("body").on("click", function() {
+  nodes.forEach(function(o, i) {
+    o.x += (Math.random() - .5) * 40;
+    o.y += (Math.random() - .5) * 40;
+  });
+  force.resume();
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/force.css
===================================================================
--- Dev/branches/Demo/d3/examples/force/force.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force.css	(revision 225)
@@ -0,0 +1,9 @@
+circle.node {
+  stroke: #fff;
+  stroke-width: 1.5px;
+}
+
+line.link {
+  stroke: #999;
+  stroke-opacity: .6;
+}
Index: Dev/branches/Demo/d3/examples/force/force.html
===================================================================
--- Dev/branches/Demo/d3/examples/force/force.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Force-Directed Layout</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="force.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="force.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/force/force.js
===================================================================
--- Dev/branches/Demo/d3/examples/force/force.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/force.js	(revision 225)
@@ -0,0 +1,56 @@
+var w = 960,
+    h = 500,
+    fill = d3.scale.category20();
+
+var vis = d3.select("#chart")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+d3.json("miserables.json", function(json) {
+  var force = d3.layout.force()
+      .charge(-120)
+      .linkDistance(30)
+      .nodes(json.nodes)
+      .links(json.links)
+      .size([w, h])
+      .start();
+
+  var link = vis.selectAll("line.link")
+      .data(json.links)
+    .enter().append("svg:line")
+      .attr("class", "link")
+      .style("stroke-width", function(d) { return Math.sqrt(d.value); })
+      .attr("x1", function(d) { return d.source.x; })
+      .attr("y1", function(d) { return d.source.y; })
+      .attr("x2", function(d) { return d.target.x; })
+      .attr("y2", function(d) { return d.target.y; });
+
+  var node = vis.selectAll("circle.node")
+      .data(json.nodes)
+    .enter().append("svg:circle")
+      .attr("class", "node")
+      .attr("cx", function(d) { return d.x; })
+      .attr("cy", function(d) { return d.y; })
+      .attr("r", 5)
+      .style("fill", function(d) { return fill(d.group); })
+      .call(force.drag);
+
+  node.append("svg:title")
+      .text(function(d) { return d.name; });
+
+  vis.style("opacity", 1e-6)
+    .transition()
+      .duration(1000)
+      .style("opacity", 1);
+
+  force.on("tick", function() {
+    link.attr("x1", function(d) { return d.source.x; })
+        .attr("y1", function(d) { return d.source.y; })
+        .attr("x2", function(d) { return d.target.x; })
+        .attr("y2", function(d) { return d.target.y; });
+
+    node.attr("cx", function(d) { return d.x; })
+        .attr("cy", function(d) { return d.y; });
+  });
+});
Index: Dev/branches/Demo/d3/examples/force/miserables.json
===================================================================
--- Dev/branches/Demo/d3/examples/force/miserables.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/force/miserables.json	(revision 225)
@@ -0,0 +1,1 @@
+{"nodes":[{"name":"Myriel","group":1},{"name":"Napoleon","group":1},{"name":"Mlle.Baptistine","group":1},{"name":"Mme.Magloire","group":1},{"name":"CountessdeLo","group":1},{"name":"Geborand","group":1},{"name":"Champtercier","group":1},{"name":"Cravatte","group":1},{"name":"Count","group":1},{"name":"OldMan","group":1},{"name":"Labarre","group":2},{"name":"Valjean","group":2},{"name":"Marguerite","group":3},{"name":"Mme.deR","group":2},{"name":"Isabeau","group":2},{"name":"Gervais","group":2},{"name":"Tholomyes","group":3},{"name":"Listolier","group":3},{"name":"Fameuil","group":3},{"name":"Blacheville","group":3},{"name":"Favourite","group":3},{"name":"Dahlia","group":3},{"name":"Zephine","group":3},{"name":"Fantine","group":3},{"name":"Mme.Thenardier","group":4},{"name":"Thenardier","group":4},{"name":"Cosette","group":5},{"name":"Javert","group":4},{"name":"Fauchelevent","group":0},{"name":"Bamatabois","group":2},{"name":"Perpetue","group":3},{"name":"Simplice","group":2},{"name":"Scaufflaire","group":2},{"name":"Woman1","group":2},{"name":"Judge","group":2},{"name":"Champmathieu","group":2},{"name":"Brevet","group":2},{"name":"Chenildieu","group":2},{"name":"Cochepaille","group":2},{"name":"Pontmercy","group":4},{"name":"Boulatruelle","group":6},{"name":"Eponine","group":4},{"name":"Anzelma","group":4},{"name":"Woman2","group":5},{"name":"MotherInnocent","group":0},{"name":"Gribier","group":0},{"name":"Jondrette","group":7},{"name":"Mme.Burgon","group":7},{"name":"Gavroche","group":8},{"name":"Gillenormand","group":5},{"name":"Magnon","group":5},{"name":"Mlle.Gillenormand","group":5},{"name":"Mme.Pontmercy","group":5},{"name":"Mlle.Vaubois","group":5},{"name":"Lt.Gillenormand","group":5},{"name":"Marius","group":8},{"name":"BaronessT","group":5},{"name":"Mabeuf","group":8},{"name":"Enjolras","group":8},{"name":"Combeferre","group":8},{"name":"Prouvaire","group":8},{"name":"Feuilly","group":8},{"name":"Courfeyrac","group":8},{"name":"Bahorel","group":8},{"name":"Bossuet","group":8},{"name":"Joly","group":8},{"name":"Grantaire","group":8},{"name":"MotherPlutarch","group":9},{"name":"Gueulemer","group":4},{"name":"Babet","group":4},{"name":"Claquesous","group":4},{"name":"Montparnasse","group":4},{"name":"Toussaint","group":5},{"name":"Child1","group":10},{"name":"Child2","group":10},{"name":"Brujon","group":4},{"name":"Mme.Hucheloup","group":8}],"links":[{"source":1,"target":0,"value":1},{"source":2,"target":0,"value":8},{"source":3,"target":0,"value":10},{"source":3,"target":2,"value":6},{"source":4,"target":0,"value":1},{"source":5,"target":0,"value":1},{"source":6,"target":0,"value":1},{"source":7,"target":0,"value":1},{"source":8,"target":0,"value":2},{"source":9,"target":0,"value":1},{"source":11,"target":10,"value":1},{"source":11,"target":3,"value":3},{"source":11,"target":2,"value":3},{"source":11,"target":0,"value":5},{"source":12,"target":11,"value":1},{"source":13,"target":11,"value":1},{"source":14,"target":11,"value":1},{"source":15,"target":11,"value":1},{"source":17,"target":16,"value":4},{"source":18,"target":16,"value":4},{"source":18,"target":17,"value":4},{"source":19,"target":16,"value":4},{"source":19,"target":17,"value":4},{"source":19,"target":18,"value":4},{"source":20,"target":16,"value":3},{"source":20,"target":17,"value":3},{"source":20,"target":18,"value":3},{"source":20,"target":19,"value":4},{"source":21,"target":16,"value":3},{"source":21,"target":17,"value":3},{"source":21,"target":18,"value":3},{"source":21,"target":19,"value":3},{"source":21,"target":20,"value":5},{"source":22,"target":16,"value":3},{"source":22,"target":17,"value":3},{"source":22,"target":18,"value":3},{"source":22,"target":19,"value":3},{"source":22,"target":20,"value":4},{"source":22,"target":21,"value":4},{"source":23,"target":16,"value":3},{"source":23,"target":17,"value":3},{"source":23,"target":18,"value":3},{"source":23,"target":19,"value":3},{"source":23,"target":20,"value":4},{"source":23,"target":21,"value":4},{"source":23,"target":22,"value":4},{"source":23,"target":12,"value":2},{"source":23,"target":11,"value":9},{"source":24,"target":23,"value":2},{"source":24,"target":11,"value":7},{"source":25,"target":24,"value":13},{"source":25,"target":23,"value":1},{"source":25,"target":11,"value":12},{"source":26,"target":24,"value":4},{"source":26,"target":11,"value":31},{"source":26,"target":16,"value":1},{"source":26,"target":25,"value":1},{"source":27,"target":11,"value":17},{"source":27,"target":23,"value":5},{"source":27,"target":25,"value":5},{"source":27,"target":24,"value":1},{"source":27,"target":26,"value":1},{"source":28,"target":11,"value":8},{"source":28,"target":27,"value":1},{"source":29,"target":23,"value":1},{"source":29,"target":27,"value":1},{"source":29,"target":11,"value":2},{"source":30,"target":23,"value":1},{"source":31,"target":30,"value":2},{"source":31,"target":11,"value":3},{"source":31,"target":23,"value":2},{"source":31,"target":27,"value":1},{"source":32,"target":11,"value":1},{"source":33,"target":11,"value":2},{"source":33,"target":27,"value":1},{"source":34,"target":11,"value":3},{"source":34,"target":29,"value":2},{"source":35,"target":11,"value":3},{"source":35,"target":34,"value":3},{"source":35,"target":29,"value":2},{"source":36,"target":34,"value":2},{"source":36,"target":35,"value":2},{"source":36,"target":11,"value":2},{"source":36,"target":29,"value":1},{"source":37,"target":34,"value":2},{"source":37,"target":35,"value":2},{"source":37,"target":36,"value":2},{"source":37,"target":11,"value":2},{"source":37,"target":29,"value":1},{"source":38,"target":34,"value":2},{"source":38,"target":35,"value":2},{"source":38,"target":36,"value":2},{"source":38,"target":37,"value":2},{"source":38,"target":11,"value":2},{"source":38,"target":29,"value":1},{"source":39,"target":25,"value":1},{"source":40,"target":25,"value":1},{"source":41,"target":24,"value":2},{"source":41,"target":25,"value":3},{"source":42,"target":41,"value":2},{"source":42,"target":25,"value":2},{"source":42,"target":24,"value":1},{"source":43,"target":11,"value":3},{"source":43,"target":26,"value":1},{"source":43,"target":27,"value":1},{"source":44,"target":28,"value":3},{"source":44,"target":11,"value":1},{"source":45,"target":28,"value":2},{"source":47,"target":46,"value":1},{"source":48,"target":47,"value":2},{"source":48,"target":25,"value":1},{"source":48,"target":27,"value":1},{"source":48,"target":11,"value":1},{"source":49,"target":26,"value":3},{"source":49,"target":11,"value":2},{"source":50,"target":49,"value":1},{"source":50,"target":24,"value":1},{"source":51,"target":49,"value":9},{"source":51,"target":26,"value":2},{"source":51,"target":11,"value":2},{"source":52,"target":51,"value":1},{"source":52,"target":39,"value":1},{"source":53,"target":51,"value":1},{"source":54,"target":51,"value":2},{"source":54,"target":49,"value":1},{"source":54,"target":26,"value":1},{"source":55,"target":51,"value":6},{"source":55,"target":49,"value":12},{"source":55,"target":39,"value":1},{"source":55,"target":54,"value":1},{"source":55,"target":26,"value":21},{"source":55,"target":11,"value":19},{"source":55,"target":16,"value":1},{"source":55,"target":25,"value":2},{"source":55,"target":41,"value":5},{"source":55,"target":48,"value":4},{"source":56,"target":49,"value":1},{"source":56,"target":55,"value":1},{"source":57,"target":55,"value":1},{"source":57,"target":41,"value":1},{"source":57,"target":48,"value":1},{"source":58,"target":55,"value":7},{"source":58,"target":48,"value":7},{"source":58,"target":27,"value":6},{"source":58,"target":57,"value":1},{"source":58,"target":11,"value":4},{"source":59,"target":58,"value":15},{"source":59,"target":55,"value":5},{"source":59,"target":48,"value":6},{"source":59,"target":57,"value":2},{"source":60,"target":48,"value":1},{"source":60,"target":58,"value":4},{"source":60,"target":59,"value":2},{"source":61,"target":48,"value":2},{"source":61,"target":58,"value":6},{"source":61,"target":60,"value":2},{"source":61,"target":59,"value":5},{"source":61,"target":57,"value":1},{"source":61,"target":55,"value":1},{"source":62,"target":55,"value":9},{"source":62,"target":58,"value":17},{"source":62,"target":59,"value":13},{"source":62,"target":48,"value":7},{"source":62,"target":57,"value":2},{"source":62,"target":41,"value":1},{"source":62,"target":61,"value":6},{"source":62,"target":60,"value":3},{"source":63,"target":59,"value":5},{"source":63,"target":48,"value":5},{"source":63,"target":62,"value":6},{"source":63,"target":57,"value":2},{"source":63,"target":58,"value":4},{"source":63,"target":61,"value":3},{"source":63,"target":60,"value":2},{"source":63,"target":55,"value":1},{"source":64,"target":55,"value":5},{"source":64,"target":62,"value":12},{"source":64,"target":48,"value":5},{"source":64,"target":63,"value":4},{"source":64,"target":58,"value":10},{"source":64,"target":61,"value":6},{"source":64,"target":60,"value":2},{"source":64,"target":59,"value":9},{"source":64,"target":57,"value":1},{"source":64,"target":11,"value":1},{"source":65,"target":63,"value":5},{"source":65,"target":64,"value":7},{"source":65,"target":48,"value":3},{"source":65,"target":62,"value":5},{"source":65,"target":58,"value":5},{"source":65,"target":61,"value":5},{"source":65,"target":60,"value":2},{"source":65,"target":59,"value":5},{"source":65,"target":57,"value":1},{"source":65,"target":55,"value":2},{"source":66,"target":64,"value":3},{"source":66,"target":58,"value":3},{"source":66,"target":59,"value":1},{"source":66,"target":62,"value":2},{"source":66,"target":65,"value":2},{"source":66,"target":48,"value":1},{"source":66,"target":63,"value":1},{"source":66,"target":61,"value":1},{"source":66,"target":60,"value":1},{"source":67,"target":57,"value":3},{"source":68,"target":25,"value":5},{"source":68,"target":11,"value":1},{"source":68,"target":24,"value":1},{"source":68,"target":27,"value":1},{"source":68,"target":48,"value":1},{"source":68,"target":41,"value":1},{"source":69,"target":25,"value":6},{"source":69,"target":68,"value":6},{"source":69,"target":11,"value":1},{"source":69,"target":24,"value":1},{"source":69,"target":27,"value":2},{"source":69,"target":48,"value":1},{"source":69,"target":41,"value":1},{"source":70,"target":25,"value":4},{"source":70,"target":69,"value":4},{"source":70,"target":68,"value":4},{"source":70,"target":11,"value":1},{"source":70,"target":24,"value":1},{"source":70,"target":27,"value":1},{"source":70,"target":41,"value":1},{"source":70,"target":58,"value":1},{"source":71,"target":27,"value":1},{"source":71,"target":69,"value":2},{"source":71,"target":68,"value":2},{"source":71,"target":70,"value":2},{"source":71,"target":11,"value":1},{"source":71,"target":48,"value":1},{"source":71,"target":41,"value":1},{"source":71,"target":25,"value":1},{"source":72,"target":26,"value":2},{"source":72,"target":27,"value":1},{"source":72,"target":11,"value":1},{"source":73,"target":48,"value":2},{"source":74,"target":48,"value":2},{"source":74,"target":73,"value":3},{"source":75,"target":69,"value":3},{"source":75,"target":68,"value":3},{"source":75,"target":25,"value":3},{"source":75,"target":48,"value":1},{"source":75,"target":41,"value":1},{"source":75,"target":70,"value":1},{"source":75,"target":71,"value":1},{"source":76,"target":64,"value":1},{"source":76,"target":65,"value":1},{"source":76,"target":66,"value":1},{"source":76,"target":63,"value":1},{"source":76,"target":62,"value":1},{"source":76,"target":48,"value":1},{"source":76,"target":58,"value":1}]}
Index: Dev/branches/Demo/d3/examples/hello-world/hello-data-key.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-data-key.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-data-key.html	(revision 225)
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, data!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <script type="text/javascript">
+
+var i = 0, data = [
+  {id: i++, value: 4},
+  {id: i++, value: 8},
+  {id: i++, value: 15},
+  {id: i++, value: 16},
+  {id: i++, value: 23},
+  {id: i++, value: 42}
+];
+
+transform();
+
+function transform() {
+  var t = d3.select("body")
+    .selectAll("span")
+      .data(data, function(d) { return d.id; });
+
+  t.enter().append("span")
+      .attr("id", function(d) { return "span-" + d.id; })
+    .append("svg:svg")
+      .attr("width", 100)
+      .attr("height", 100)
+    .append("svg:text")
+      .attr("x", "50%")
+      .attr("y", "50%")
+      .attr("dy", ".35em")
+      .attr("text-anchor", "middle")
+      .attr("fill", "white")
+      .attr("stroke", "black")
+      .attr("stroke-width", 1.5)
+      .style("font", "36pt Comic Sans MS")
+      .style("text-shadow", "3px 3px 3px rgba(0,0,0,.4)")
+      .text(function(d) { return d.value; });
+
+  t.select("text")
+      .text(function(d) { return d.value; });
+
+  t.exit().remove();
+}
+
+function refresh() {
+  data.shift();
+  data.push({id: i++ % 7, value: ~~(Math.random() * 100)});
+  transform();
+}
+
+window.addEventListener("keypress", refresh, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-data-nested-key.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-data-nested-key.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-data-nested-key.html	(revision 225)
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, data!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body, td {
+  font: 14px Helvetica Neue;
+  text-rendering: optimizeLegibility;
+  margin: 1em;
+}
+
+table {
+  border-collapse: collapse;
+  margin-top: .5em;
+}
+
+td {
+  border: solid 1px #fff;
+  text-align: center;
+  width: 30px;
+  height: 30px;
+}
+
+    </style>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <table id="table"></table>
+    <script type="text/javascript">
+
+var data = [];
+
+for (var i = 0; i < 10; i++) {
+  for (var j = 0, a = []; j < 10; j++) {
+    a.push(~~(Math.random() * 100));
+  }
+  data.push(a);
+}
+
+transform();
+
+function transform() {
+  var t = d3.select("#table")
+    .selectAll("tr")
+      .data(data);
+
+  t.enter().append("tr")
+    .selectAll("td")
+      .data(function(d) { return d; })
+    .enter().append("td")
+      .style("background-color", function(d) { return "hsl(" + d + ",100%,50%)"; })
+      .text(function(d) { return d; });
+
+  t.selectAll("td")
+      .data(function(d) { return d; })
+      .style("background-color", function(d) { return "hsl(" + d + ",100%,50%)"; })
+      .text(function(d) { return d; });
+}
+
+function refresh() {
+  for (var i = 0; i < 10; i++) {
+    for (var j = 0; j < 10; j++) {
+      data[i][j] = (data[i][j] + 1) % 360;
+    }
+  }
+  transform();
+}
+
+window.addEventListener("keypress", refresh, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-data-nested.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-data-nested.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-data-nested.html	(revision 225)
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, data!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body, td {
+  font: 14px Helvetica Neue;
+  text-rendering: optimizeLegibility;
+  margin: 1em;
+}
+
+table {
+  border-collapse: collapse;
+  margin-top: .5em;
+}
+
+td {
+  border: solid 1px #fff;
+  color: #ccc;
+  text-align: center;
+  width: 30px;
+  height: 30px;
+}
+
+    </style>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <table>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+      <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
+    </table>
+    <script type="text/javascript">
+
+var data = [];
+
+for (var i = 0; i < 10; i++) {
+  for (var j = 0, a = []; j < 10; j++) {
+    a.push(~~(Math.random() * 100));
+  }
+  data.push(a);
+}
+
+transform();
+
+function transform() {
+  d3.selectAll("tr")
+      .data(data)
+    .selectAll("td")
+      .data(function(d) { return d; })
+      .style("background-color", function(d) { return "hsl(0,50%," + d + "%)"; })
+      .text(function(d) { return d; });
+}
+
+function refresh() {
+  for (var i = 0; i < data.length; i++) {
+    var z = data[i], d = z.shift();
+    z.push(~~(Math.random() * 100));
+  }
+  transform();
+}
+
+window.addEventListener("keypress", refresh, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-data.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-data.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-data.html	(revision 225)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, data!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <span></span>
+    <span></span>
+    <span></span>
+    <span></span>
+    <span></span>
+    <script type="text/javascript">
+
+var data = [4, 8, 15, 16, 23, 42];
+
+d3.selectAll("span")
+    .data(data)
+  .append("svg:svg")
+    .attr("width", 100)
+    .attr("height", 100)
+  .append("svg:text")
+    .attr("x", "50%")
+    .attr("y", "50%")
+    .attr("dy", ".35em")
+    .attr("text-anchor", "middle")
+    .attr("fill", "white")
+    .attr("stroke", "black")
+    .attr("stroke-width", 1.5)
+    .style("font", "36pt Comic Sans MS")
+    .style("text-shadow", "3px 3px 3px rgba(0,0,0,.4)")
+    .text(function(d) { return d; });
+
+function refresh() {
+  for (var i = 0; i < data.length; i++) data[i] = (data[i] + 1) % 100;
+  d3.selectAll("text")
+      .data(data)
+      .text(function(d) { return d; });
+}
+
+window.addEventListener("keypress", refresh, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-event.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-event.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-event.html	(revision 225)
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, world!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <span></span>
+    <script type="text/javascript">
+
+var data = [4, 8, 15, 16, 23, 42];
+
+d3.select("span")
+  .selectAll("svg")
+    .data(data)
+  .enter().append("svg:svg")
+    .attr("width", 100)
+    .attr("height", 100)
+  .append("svg:text")
+    .attr("x", "50%")
+    .attr("y", "50%")
+    .attr("dy", ".35em")
+    .attr("text-anchor", "middle")
+    .attr("fill", "white")
+    .attr("stroke", "black")
+    .attr("stroke-width", 1.5)
+    .attr("cursor", "pointer")
+    .style("font", "36pt Comic Sans MS")
+    .style("text-shadow", "3px 3px 3px rgba(0,0,0,.4)")
+    .text(function(d) { return d; })
+    .on("click", click)
+    .on("mouseover", mouseover)
+    .on("mouseout", mouseout);
+
+function click(d, i) {
+  console.log("click", d, i);
+}
+
+function mouseover(d, i) {
+  d3.select(this)
+      .attr("fill", "brown")
+      .attr("stroke", "grey");
+}
+
+function mouseout(d, i) {
+  d3.select(this)
+      .attr("fill", "orange");
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-node-key.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-node-key.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-node-key.html	(revision 225)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, node!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <span value="42"></span>
+    <span value="4"></span>
+    <span value="8"></span>
+    <span value="15"></span>
+    <span value="16"></span>
+    <span value="23"></span>
+    <script type="text/javascript">
+
+var data = [4, 8, 15, 16, 23, 42];
+
+d3.selectAll("span")
+    .data(data, function(d) { return d || this.getAttribute("value"); })
+    .text(String);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-sort.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-sort.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-sort.html	(revision 225)
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, sort!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+html, body, svg {
+  font: 14px Helvetica Neue;
+  margin: 0;
+  width: 100%;
+  height: 100%;
+  display: block;
+}
+
+circle {
+  fill: steelblue;
+  fill-opacity: .8;
+  stroke: #fff;
+}
+
+div {
+  position: fixed;
+  top: 10px;
+  left: 10px;
+}
+
+    </style>
+  </head>
+  <body>
+    <div>
+      <input id="sort" type="checkbox" checked>
+      <label for="sort">Ascending</label>
+    </div>
+    <script type="text/javascript">
+
+d3.select("body")
+  .append("svg:svg")
+    .attr("viewBox", "0 0 1000 1000");
+
+d3.select("#sort")
+    .on("change", sort);
+
+transform();
+
+function transform() {
+  var circle = d3.select("svg")
+    .selectAll("circle")
+      .data(d3.range(400).map(Math.random));
+
+  circle.enter().append("svg:circle")
+      .attr("cx", function() { return 100 + Math.random() * 800; })
+      .attr("cy", function() { return 100 + Math.random() * 800; })
+      .attr("r", function(d) { return 50 * d; });
+
+  circle
+    .transition()
+      .duration(750)
+      .attr("r", function(d) { return 50 * d; });
+
+  sort();
+}
+
+function sort() {
+  d3.selectAll("circle")
+      .sort(d3.select("#sort").property("checked")
+      ? function(a, b) { return b - a; }
+      : function(a, b) { return a - b; });
+}
+
+window.addEventListener("keypress", transform, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-transform.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-transform.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-transform.html	(revision 225)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, world!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <span></span>
+    <span></span>
+    <span></span>
+    <span></span>
+    <span></span>
+    <script type="text/javascript">
+
+d3.selectAll("span")
+  .append("svg:svg")
+    .attr("width", 100)
+    .attr("height", 100)
+  .append("svg:text")
+    .attr("x", "50%")
+    .attr("y", "50%")
+    .attr("dy", ".35em")
+    .attr("text-anchor", "middle")
+    .attr("fill", "white")
+    .attr("stroke", "black")
+    .attr("stroke-width", 1.5)
+    .style("font", "36pt Comic Sans MS")
+    .style("text-shadow", "3px 3px 3px rgba(0,0,0,.4)")
+    .text(function() { return ~~(Math.random() * 100); });
+
+function transform() {
+  d3.selectAll("text")
+      .text(function() { return ~~(Math.random() * 100); });
+}
+
+window.addEventListener("keypress", transform, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-transition-undefined.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-transition-undefined.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-transition-undefined.html	(revision 225)
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, transition undefined!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  font: 14px Helvetica Neue;
+  text-rendering: optimizeLegibility;
+  margin: 1em;
+}
+
+div {
+  font-size: 42px;
+  margin-top: .5em;
+  text-align: right;
+}
+
+    </style>
+  </head>
+  <body>
+    Your lucky number is:<br>
+    <div>hello</div>
+    <script type="text/javascript">
+
+transform();
+
+function transform() {
+  d3.select("div")
+      .style("width", "0%")
+    .transition()
+      .ease("bounce")
+      .duration(2000)
+      .style("width", "100%")
+      .style("background-color", function() { return d3.hsl(180, Math.random(), .5); });
+}
+
+window.addEventListener("keypress", transform, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-transition.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-transition.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-transition.html	(revision 225)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, transition!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  font: 14px Helvetica Neue;
+  text-rendering: optimizeLegibility;
+  margin: 1em;
+}
+
+div {
+  font-size: 42px;
+  margin-top: .5em;
+  background-color: steelblue;
+  color: white;
+  text-align: right;
+}
+
+    </style>
+  </head>
+  <body>
+    Your lucky number is:<br>
+    <div></div>
+    <script type="text/javascript">
+
+transform();
+
+function transform() {
+  d3.select("div")
+      .style("width", "0%")
+      .style("background-color", "steelblue")
+      .text("hello\u00a0")
+    .transition()
+      .ease("bounce")
+      .duration(2000)
+      .style("width", "100%")
+      .style("background-color", "brown");
+}
+
+window.addEventListener("keypress", transform, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/hello-webkit-transition.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/hello-webkit-transition.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/hello-webkit-transition.html	(revision 225)
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Hello, data!</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  font: 14px Helvetica Neue;
+  text-rendering: optimizeLegibility;
+  margin: 1em;
+}
+
+#cells {
+  position: relative;
+  margin-top: .5em;
+  height: 300px;
+  overflow: hidden;
+}
+
+.cell {
+  position: absolute;
+  background: steelblue;
+  color: white;
+  width: 28px;
+  text-align: center;
+  padding-top: 6px;
+  top: 300px;
+  bottom: 0;
+  background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(steelblue));
+  -webkit-transition-property: top, background-color;
+  -webkit-transition-duration: 500ms;
+  -webkit-transition-timing-function: ease, linear;
+}
+
+    </style>
+  </head>
+  <body>
+    Your lucky numbers are:<br>
+    <div id="cells"></div>
+    <script type="text/javascript">
+
+var n = 10;
+
+d3.select("#cells")
+  .selectAll("div")
+    .data(d3.range(n))
+  .enter().append("div")
+    .attr("class", "cell")
+    .style("left", function(i) { return i * 30; });
+
+function transform() {
+  d3.selectAll(".cell")
+      .data(d3.range(n).map(Math.random))
+      .style("top", function(d) { return (1 - d) * 300; })
+      .style("background-color", function(d) { return "rgb(" + ~~(d * 255) + ",50,100)"; })
+      .text(function(d) { return ~~(d * 100); });
+}
+
+window.addEventListener("keypress", transform, false);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/select-enter-add.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/select-enter-add.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/select-enter-add.html	(revision 225)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Test - select > enter > append</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    <span></span>
+    <span></span>
+    <script type="text/javascript">
+
+var s = d3.select("body")
+  .selectAll("span")
+    .data("The test passed, hooray!".split(/\b/));
+
+// Add missing <span>s.
+s.enter().append("span")
+  .append("b")
+    .text(function(d) { return d; });
+
+// Add missing <b>s.
+s.selectAll("b")
+    .data(function(d) { return [d]; })
+  .enter().append("b")
+    .text(function(d) { return d; });
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/hello-world/selectAll-enter-add.html
===================================================================
--- Dev/branches/Demo/d3/examples/hello-world/selectAll-enter-add.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hello-world/selectAll-enter-add.html	(revision 225)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Test - selectAll > enter > append</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    <span></span>
+    <script type="text/javascript">
+
+d3.select("body")
+  .selectAll("span")
+    .data(["Test", "passed."])
+    .text(function(d) { return d; })
+  .enter().append("span")
+    .text(function(d) { return d; });
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/histogram/histogram.html
===================================================================
--- Dev/branches/Demo/d3/examples/histogram/histogram.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/histogram/histogram.html	(revision 225)
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Histogram</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+rect {
+  fill: steelblue;
+  stroke: white;
+}
+
+line {
+  stroke: black;
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var n = 10000, // number of trials
+    m = 10,    // number of random variables
+    data = [];
+
+// Generate an Irwin-Hall distribution.
+for (var i = 0; i < n; i++) {
+  for (var s = 0, j = 0; j < m; j++) {
+    s += Math.random();
+  }
+  data.push(s);
+}
+
+var w = 400,
+    h = 400;
+
+var histogram = d3.layout.histogram()
+    (data);
+
+var x = d3.scale.ordinal()
+    .domain(histogram.map(function(d) { return d.x; }))
+    .rangeRoundBands([0, w]);
+
+var y = d3.scale.linear()
+    .domain([0, d3.max(histogram, function(d) { return d.y; })])
+    .range([0, h]);
+
+var vis = d3.select("body").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(.5)");
+
+vis.selectAll("rect")
+    .data(histogram)
+  .enter().append("svg:rect")
+    .attr("transform", function(d) { return "translate(" + x(d.x) + "," + (h - y(d.y)) + ")"; })
+    .attr("width", x.rangeBand())
+    .attr("y", function(d) { return y(d.y); })
+    .attr("height", 0)
+  .transition()
+    .duration(750)
+    .attr("y", 0)
+    .attr("height", function(d) { return y(d.y); });
+
+vis.append("svg:line")
+    .attr("x1", 0)
+    .attr("x2", w)
+    .attr("y1", h)
+    .attr("y2", h);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/horizon/horizon.css
===================================================================
--- Dev/branches/Demo/d3/examples/horizon/horizon.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/horizon/horizon.css	(revision 225)
@@ -0,0 +1,9 @@
+#controls {
+  position: relative;
+  width: 960px;
+}
+
+#bands {
+  position: absolute;
+  right: 0;
+}
Index: Dev/branches/Demo/d3/examples/horizon/horizon.html
===================================================================
--- Dev/branches/Demo/d3/examples/horizon/horizon.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/horizon/horizon.html	(revision 225)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Horizon Chart</title>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+    <link type="text/css" rel="stylesheet" href="horizon.css"/>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.chart.js"></script>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <div id="controls">
+      <span id="mode">
+        <button class="first active">Offset</button
+        ><button class="last">Mirror</button>
+      </span>
+      <span id="bands">
+        <button class="first">&#x2212;</button
+        ><button class="last">+</button>
+      </span>
+    </div>
+    <script type="text/javascript" src="horizon.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/horizon/horizon.js
===================================================================
--- Dev/branches/Demo/d3/examples/horizon/horizon.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/horizon/horizon.js	(revision 225)
@@ -0,0 +1,43 @@
+var w = 960,
+    h = 40;
+
+var chart = d3.chart.horizon()
+    .width(w)
+    .height(h)
+    .bands(5)
+    .mode("offset")
+    .interpolate("basis");
+
+var svg = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+d3.json("unemployment.json", function(data) {
+
+  // Offset so that positive is above-average and negative is below-average.
+  var mean = data.rate.reduce(function(p, v) { return p + v; }, 0) / data.rate.length;
+
+  // Transpose column values to rows.
+  data = data.rate.map(function(rate, i) {
+    return [Date.UTC(data.year[i], data.month[i] - 1), rate - mean];
+  });
+
+  // Render the chart.
+  svg.data([data]).call(chart);
+
+  // Enable mode buttons.
+  d3.selectAll("#mode button")
+      .data(["offset", "mirror"])
+      .on("click", function(m) {
+        svg.call(chart.duration(0).mode(m));
+        d3.selectAll("#mode button")
+            .classed("active", function(d) { return d == m; });
+      });
+
+  // Enable bands buttons.
+  d3.selectAll("#bands button")
+      .data([-1, 1])
+      .on("click", function bands(db) {
+        svg.call(chart.duration(1000).bands(Math.max(1, chart.bands() + db)));
+      });
+});
Index: Dev/branches/Demo/d3/examples/horizon/unemployment.json
===================================================================
--- Dev/branches/Demo/d3/examples/horizon/unemployment.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/horizon/unemployment.json	(revision 225)
@@ -0,0 +1,1 @@
+{"year":[2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2001,2001,2001,2001,2001,2001,2001,2001,2001,2001,2001,2001,2002,2002,2002,2002,2002,2002,2002,2002,2002,2002,2002,2002,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2003,2004,2004,2004,2004,2004,2004,2004,2004,2004,2004,2004,2004,2005,2005,2005,2005,2005,2005,2005,2005,2005,2005,2005,2005,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2007,2007,2007,2007,2007,2007,2007,2007,2007,2007,2007,2007,2008,2008,2008,2008,2008,2008,2008,2008,2008,2008,2008,2008,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2010,2010],"month":[1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2],"rate":[4.5,4.4,4.3,3.7,3.8,4.1,4.2,4.1,3.8,3.6,3.7,3.7,4.7,4.6,4.5,4.2,4.1,4.7,4.7,4.9,4.7,5,5.3,5.4,6.3,6.1,6.1,5.7,5.5,6,5.9,5.7,5.4,5.3,5.6,5.7,6.5,6.4,6.2,5.8,5.8,6.5,6.3,6,5.8,5.6,5.6,5.4,6.3,6,6,5.4,5.3,5.8,5.7,5.4,5.1,5.1,5.2,5.1,5.7,5.8,5.4,4.9,4.9,5.2,5.2,4.9,4.8,4.6,4.8,4.6,5.1,5.1,4.8,4.5,4.4,4.8,5,4.6,4.4,4.1,4.3,4.3,5,4.9,4.5,4.3,4.3,4.7,4.9,4.6,4.5,4.4,4.5,4.8,5.4,5.2,5.2,4.8,5.2,5.7,6,6.1,6,6.1,6.5,7.1,8.5,8.9,9,8.6,9.1,9.7,9.7,9.6,9.5,9.5,9.4,9.7,10.6,10.4]}
Index: Dev/branches/Demo/d3/examples/hull/hull.html
===================================================================
--- Dev/branches/Demo/d3/examples/hull/hull.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/hull/hull.html	(revision 225)
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Convex Hull</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <style type="text/css">
+
+svg {
+  border: solid 1px #aaa;
+  background: #eee;
+}
+
+path {
+  fill: lightsteelblue;
+  stroke: #000;
+}
+
+circle {
+  fill: #fff;
+  stroke: #000;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500;
+
+var vertices = d3.range(15).map(function(d) {
+  return [
+    w / 4 + Math.random() * w / 2,
+    h / 4 + Math.random() * h / 2
+  ];
+});
+
+var svg = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+    .attr("pointer-events", "all")
+    .on("mousemove", move)
+    .on("click", click);
+
+update();
+
+function update() {
+  svg.selectAll("path")
+      .data([d3.geom.hull(vertices)])
+      .attr("d", function(d) { return "M" + d.join("L") + "Z"; })
+	  .enter().append("svg:path")
+	    .attr("d", function(d) { return "M" + d.join("L") + "Z"; });
+
+  svg.selectAll("circle")
+      .data(vertices.slice(1))
+    .enter().append("svg:circle")
+      .attr("transform", function(d) { return "translate(" + d + ")"; })
+      .attr("r", 3);
+}
+
+function move() {
+  vertices[0] = d3.svg.mouse(this);
+  update();
+}
+
+function click() {
+  vertices.push(d3.svg.mouse(this));
+  update();
+}
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/kde/kde.css
===================================================================
--- Dev/branches/Demo/d3/examples/kde/kde.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/kde/kde.css	(revision 225)
@@ -0,0 +1,9 @@
+body {
+  font: 10px sans-serif;
+}
+
+path {
+  stroke: #000;
+  stroke-width: 1.5px;
+  fill: none;
+}
Index: Dev/branches/Demo/d3/examples/kde/kde.html
===================================================================
--- Dev/branches/Demo/d3/examples/kde/kde.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/kde/kde.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Kernel Density Estimation</title>
+    <link rel="stylesheet" type="text/css" href="kde.css"/>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <script type="text/javascript" src="../../lib/science/science.js"></script>
+    <script type="text/javascript" src="../../lib/science/science.stats.js"></script>
+  </head>
+  <body>
+    <script type="text/javascript" src="kde.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/kde/kde.js
===================================================================
--- Dev/branches/Demo/d3/examples/kde/kde.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/kde/kde.js	(revision 225)
@@ -0,0 +1,40 @@
+// Based on http://bl.ocks.org/900762 by John Firebaugh
+d3.json("../data/faithful.json", function(faithful) {
+  data = faithful;
+  var w = 800,
+      h = 400,
+      x = d3.scale.linear().domain([30, 110]).range([0, w]);
+      bins = d3.layout.histogram().frequency(true).bins(x.ticks(60))(data),
+      max = d3.max(bins, function(d) { return d.y; }),
+      y = d3.scale.linear().domain([0, .1]).range([0, h]),
+      kde = science.stats.kde().sample(data);
+
+  var vis = d3.select("body")
+    .append("svg:svg")
+      .attr("width", w)
+      .attr("height", h);
+
+  var bars = vis.selectAll("g.bar")
+      .data(bins)
+    .enter().append("svg:g")
+      .attr("class", "bar")
+      .attr("transform", function(d, i) {
+        return "translate(" + x(d.x) + "," + (h - y(d.y)) + ")";
+      });
+
+  bars.append("svg:rect")
+      .attr("fill", "steelblue")
+      .attr("width", function(d) { return x(d.dx + 30) - 1; })
+      .attr("height", function(d) { return y(d.y); });
+
+  var line = d3.svg.line()
+      .x(function(d) { return x(d[0]); })
+      .y(function(d) { return h - y(d[1]); });
+
+  vis.selectAll("path")
+      .data(d3.values(science.stats.bandwidth))
+    .enter().append("svg:path")
+      .attr("d", function(h) {
+        return line(kde.bandwidth(h)(d3.range(30, 110, .1)));
+      });
+});
Index: Dev/branches/Demo/d3/examples/line/line.css
===================================================================
--- Dev/branches/Demo/d3/examples/line/line.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/line/line.css	(revision 225)
@@ -0,0 +1,22 @@
+body {
+  font: 10px sans-serif;
+}
+
+.rule line {
+  stroke: #eee;
+  shape-rendering: crispEdges;
+}
+
+.rule line.axis {
+  stroke: #000;
+}
+
+.line {
+  fill: none;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+circle.line {
+  fill: #fff;
+}
Index: Dev/branches/Demo/d3/examples/line/line.html
===================================================================
--- Dev/branches/Demo/d3/examples/line/line.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/line/line.html	(revision 225)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Line Chart</title>
+    <link type="text/css" rel="stylesheet" href="line.css"/>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    <script type="text/javascript" src="line.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/line/line.js
===================================================================
--- Dev/branches/Demo/d3/examples/line/line.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/line/line.js	(revision 225)
@@ -0,0 +1,63 @@
+var data = d3.range(20).map(function(i) {
+  return {x: i / 19, y: (Math.sin(i / 3) + 1) / 2};
+});
+
+var w = 450,
+    h = 275,
+    p = 20,
+    x = d3.scale.linear().domain([0, 1]).range([0, w]),
+    y = d3.scale.linear().domain([0, 1]).range([h, 0]);
+
+var vis = d3.select("body")
+    .data([data])
+  .append("svg:svg")
+    .attr("width", w + p * 2)
+    .attr("height", h + p * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + p + "," + p + ")");
+
+var rules = vis.selectAll("g.rule")
+    .data(x.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "rule");
+
+rules.append("svg:line")
+    .attr("x1", x)
+    .attr("x2", x)
+    .attr("y1", 0)
+    .attr("y2", h - 1);
+
+rules.append("svg:line")
+    .attr("class", function(d) { return d ? null : "axis"; })
+    .attr("y1", y)
+    .attr("y2", y)
+    .attr("x1", 0)
+    .attr("x2", w + 1);
+
+rules.append("svg:text")
+    .attr("x", x)
+    .attr("y", h + 3)
+    .attr("dy", ".71em")
+    .attr("text-anchor", "middle")
+    .text(x.tickFormat(10));
+
+rules.append("svg:text")
+    .attr("y", y)
+    .attr("x", -3)
+    .attr("dy", ".35em")
+    .attr("text-anchor", "end")
+    .text(y.tickFormat(10));
+
+vis.append("svg:path")
+    .attr("class", "line")
+    .attr("d", d3.svg.line()
+    .x(function(d) { return x(d.x); })
+    .y(function(d) { return y(d.y); }));
+
+vis.selectAll("circle.line")
+    .data(data)
+  .enter().append("svg:circle")
+    .attr("class", "line")
+    .attr("cx", function(d) { return x(d.x); })
+    .attr("cy", function(d) { return y(d.y); })
+    .attr("r", 3.5);
Index: Dev/branches/Demo/d3/examples/marimekko/marimekko.html
===================================================================
--- Dev/branches/Demo/d3/examples/marimekko/marimekko.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/marimekko/marimekko.html	(revision 225)
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Marimekko Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+rect {
+  stroke: #000;
+}
+
+svg {
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500,
+    m = 20,
+    x = d3.scale.linear().range([0, w - 3 * m]),
+    y = d3.scale.linear().range([0, h - 2 * m]),
+    z = d3.scale.category10(),
+    n = d3.format(",d"),
+    p = d3.format("%");
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(" + 2 * m + "," + m + ")");
+
+d3.json("marimekko.json", function(data) {
+  var offset = 0;
+
+  // Nest values by segment. We assume each segment+market is unique.
+  var segments = d3.nest()
+      .key(function(d) { return d.segment; })
+      .entries(data);
+
+  // Compute the total sum, the per-segment sum, and the per-market offset.
+  // You can use reduce rather than reduceRight to reverse the ordering.
+  // We also record a reference to the parent segment for each market.
+  var sum = segments.reduce(function(v, p) {
+    return (p.offset = v) + (p.sum = p.values.reduceRight(function(v, d) {
+      d.parent = p;
+      return (d.offset = v) + d.value;
+    }, 0));
+  }, 0);
+
+  // Add x-axis ticks.
+  var xtick = svg.selectAll(".x")
+      .data(x.ticks(10))
+    .enter().append("svg:g")
+      .attr("class", "x")
+      .attr("transform", function(d) { return "translate(" + x(d) + "," + y(1) + ")"; });
+
+  xtick.append("svg:line")
+      .attr("y2", 6)
+      .style("stroke", "#000");
+
+  xtick.append("svg:text")
+      .attr("y", 8)
+      .attr("text-anchor", "middle")
+      .attr("dy", ".71em")
+      .text(p);
+
+  // Add y-axis ticks.
+  var ytick = svg.selectAll(".y")
+      .data(y.ticks(10))
+    .enter().append("svg:g")
+      .attr("class", "y")
+      .attr("transform", function(d) { return "translate(0," + y(1 - d) + ")"; });
+
+  ytick.append("svg:line")
+      .attr("x1", -6)
+      .style("stroke", "#000");
+
+  ytick.append("svg:text")
+      .attr("x", -8)
+      .attr("text-anchor", "end")
+      .attr("dy", ".35em")
+      .text(p);
+
+  // Add a group for each segment.
+  var segments = svg.selectAll(".segment")
+      .data(segments)
+    .enter().append("svg:g")
+      .attr("class", "segment")
+      .attr("xlink:title", function(d) { return d.key; })
+      .attr("transform", function(d) { return "translate(" + x(d.offset / sum) + ")"; });
+
+  // Add a rect for each market.
+  var markets = segments.selectAll(".market")
+      .data(function(d) { return d.values; })
+    .enter().append("svg:a")
+      .attr("class", "market")
+      .attr("xlink:title", function(d) { return d.market + " " + d.parent.key + ": " + n(d.value); })
+    .append("svg:rect")
+      .attr("y", function(d) { return y(d.offset / d.parent.sum); })
+      .attr("height", function(d) { return y(d.value / d.parent.sum); })
+      .attr("width", function(d) { return x(d.parent.sum / sum); })
+      .style("fill", function(d) { return z(d.market); });
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/marimekko/marimekko.json
===================================================================
--- Dev/branches/Demo/d3/examples/marimekko/marimekko.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/marimekko/marimekko.json	(revision 225)
@@ -0,0 +1,18 @@
+[
+{"market": "Auburn, AL", "segment": "Almond lovers", "value": 3840},
+{"market": "Auburn, AL", "segment": "Berry buyers", "value": 1920},
+{"market": "Auburn, AL", "segment": "Carrots-n-more", "value": 960},
+{"market": "Auburn, AL", "segment": "Delicious-n-new", "value": 400},
+{"market": "Birmingham, AL", "segment": "Almond lovers", "value": 1600},
+{"market": "Birmingham, AL", "segment": "Berry buyers", "value": 1440},
+{"market": "Birmingham, AL", "segment": "Carrots-n-more", "value": 960},
+{"market": "Birmingham, AL", "segment": "Delicious-n-new", "value": 400},
+{"market": "Gainesville, FL", "segment": "Almond lovers", "value": 640},
+{"market": "Gainesville, FL", "segment": "Berry buyers", "value": 960},
+{"market": "Gainesville, FL", "segment": "Carrots-n-more", "value": 640},
+{"market": "Gainesville, FL", "segment": "Delicious-n-new", "value": 400},
+{"market": "Durham, NC", "segment": "Almond lovers", "value": 320},
+{"market": "Durham, NC", "segment": "Berry buyers", "value": 480},
+{"market": "Durham, NC", "segment": "Carrots-n-more", "value": 640},
+{"market": "Durham, NC", "segment": "Delicious-n-new", "value": 400}
+]
Index: Dev/branches/Demo/d3/examples/mercator/mercator.html
===================================================================
--- Dev/branches/Demo/d3/examples/mercator/mercator.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/mercator/mercator.html	(revision 225)
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Mercator Projection</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <script type="text/javascript" src="../../lib/jquery/jquery.min.js"></script>
+    <script type="text/javascript" src="../../lib/jquery-ui/jquery-ui.min.js"></script>
+    <style type="text/css">
+
+@import url("../../lib/jquery-ui/jquery-ui.css");
+
+body, .ui-widget {
+  font: 14px Helvetica Neue;
+}
+
+svg {
+  width: 960px;
+  height: 500px;
+  border: solid 1px #ccc;
+  background: #eee;
+}
+
+line {
+  stroke: brown;
+  stroke-dasharray: 4,2;
+}
+
+path {
+  fill: #ccc;
+  stroke: #fff;
+}
+
+div {
+  width: 960px;
+}
+
+    </style>
+  </head>
+  <body>
+    <h3>Mercator Projection</h3>
+    <script type="text/javascript">
+
+// Our projection.
+var xy = d3.geo.mercator(),
+    path = d3.geo.path().projection(xy);
+
+var states = d3.select("body")
+  .append("svg:svg")
+  .append("svg:g")
+    .attr("id", "states");
+
+var equator = d3.select("svg")
+  .append("svg:line")
+    .attr("x1", "0%")
+    .attr("x2", "100%");
+
+d3.json("../data/world-countries.json", function(collection) {
+
+  states
+    .selectAll("path")
+      .data(collection.features)
+    .enter().append("svg:path")
+      .attr("d", path)
+    .append("svg:title")
+      .text(function(d) { return d.properties.name; });
+
+  equator
+      .attr("y1", xy([0, 0])[1])
+      .attr("y2", xy([0, 0])[1])
+});
+
+function refresh() {
+  states
+    .selectAll("path")
+      .attr("d", path);
+
+  equator
+      .attr("y1", xy([0, 0])[1])
+      .attr("y2", xy([0, 0])[1])
+
+  d3.select("#scale span")
+      .text(xy.scale());
+  d3.select("#translate-x span")
+      .text(xy.translate()[0]);
+  d3.select("#translate-y span")
+      .text(xy.translate()[1]);
+}
+
+    </script><p>
+    <div id="scale">scale: <span>500</span></div><p>
+    <div id="translate-x">translate.x: <span>480</span></div>
+    <div id="translate-y">translate.y: <span>250</span></div>
+    <script type="text/javascript">
+
+$("#scale").slider({
+  min: 0,
+  max: 3000,
+  value: 500,
+  slide: function(event, ui) {
+    xy.scale(ui.value);
+    refresh();
+  }
+});
+
+$("#translate-x").slider({
+  min: -2000,
+  max: 2000,
+  value: 480,
+  slide: function(event, ui) {
+    var translate = xy.translate();
+    translate[0] = ui.value;
+    xy.translate(translate);
+    refresh();
+  }
+});
+
+$("#translate-y").slider({
+  min: -2000,
+  max: 2000,
+  value: 250,
+  slide: function(event, ui) {
+    var translate = xy.translate();
+    translate[1] = ui.value;
+    xy.translate(translate);
+    refresh();
+  }
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/moire/moire.html
===================================================================
--- Dev/branches/Demo/d3/examples/moire/moire.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/moire/moire.html	(revision 225)
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>MoirÃ© Patterns</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+circle {
+  fill: none;
+  stroke: #000;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500;
+
+var svg = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+    .attr("pointer-events", "all");
+
+svg.append("svg:g")
+  .selectAll("circle")
+    .data(d3.range(110))
+  .enter().append("svg:circle")
+    .attr("transform", "translate(" + w / 2 + "," + h / 2 + ")")
+    .attr("r", function(d) { return d * 5; });
+
+var circle = svg.append("svg:g")
+  .selectAll("circle")
+    .data(d3.range(60))
+  .enter().append("svg:circle")
+    .attr("transform", "translate(" + w / 2 + "," + h / 2 + ")")
+    .attr("r", function(d) { return d * 3; });
+
+svg.on("mousemove", function() {
+  var mouse = d3.svg.mouse(this),
+      r = (Math.sqrt(mouse[0]) + 10) / 10;
+
+  circle
+      .attr("transform", "translate(" + mouse + ")")
+      .attr("r", function(d) { return d * r; });
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/pack/pack.css
===================================================================
--- Dev/branches/Demo/d3/examples/pack/pack.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/pack/pack.css	(revision 225)
@@ -0,0 +1,15 @@
+circle {
+  fill: rgb(31, 119, 180);
+  fill-opacity: .25;
+  stroke: rgb(31, 119, 180);
+  stroke-width: 1px;
+}
+
+.leaf circle {
+  fill: #ff7f0e;
+  fill-opacity: 1;
+}
+
+text {
+  font: 10px sans-serif;
+}
Index: Dev/branches/Demo/d3/examples/pack/pack.html
===================================================================
--- Dev/branches/Demo/d3/examples/pack/pack.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/pack/pack.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Circle Packing</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="pack.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="pack.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/pack/pack.js
===================================================================
--- Dev/branches/Demo/d3/examples/pack/pack.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/pack/pack.js	(revision 225)
@@ -0,0 +1,33 @@
+var w = 960,
+    h = 960,
+    format = d3.format(",d");
+
+var pack = d3.layout.pack()
+    .size([w - 4, h - 4])
+    .value(function(d) { return d.size; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+    .attr("class", "pack")
+  .append("svg:g")
+    .attr("transform", "translate(2, 2)");
+
+d3.json("../data/flare.json", function(json) {
+  var node = vis.data([json]).selectAll("g.node")
+      .data(pack.nodes)
+    .enter().append("svg:g")
+      .attr("class", function(d) { return d.children ? "node" : "leaf node"; })
+      .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
+
+  node.append("svg:title")
+      .text(function(d) { return d.name + (d.children ? "" : ": " + format(d.size)); });
+
+  node.append("svg:circle")
+      .attr("r", function(d) { return d.r; });
+
+  node.filter(function(d) { return !d.children; }).append("svg:text")
+      .attr("text-anchor", "middle")
+      .attr("dy", ".3em")
+      .text(function(d) { return d.name.substring(0, d.r / 3); });
+});
Index: Dev/branches/Demo/d3/examples/partition/partition-icicle-zoom.html
===================================================================
--- Dev/branches/Demo/d3/examples/partition/partition-icicle-zoom.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/partition/partition-icicle-zoom.html	(revision 225)
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Partition - Icicle</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+rect {
+  stroke: #fff;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 250,
+    x = d3.scale.linear().range([0, w]),
+    y = d3.scale.linear().range([0, h]),
+    color = d3.scale.category20c();
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+var partition = d3.layout.partition()
+    .value(function(d) { return d.size; });
+
+d3.json("../data/flare.json", function(json) {
+  var rect = vis.data([json]).selectAll("rect")
+      .data(partition.nodes)
+    .enter().append("svg:rect")
+      .attr("x", function(d) { return x(d.x); })
+      .attr("y", function(d) { return y(d.y); })
+      .attr("width", function(d) { return x(d.dx); })
+      .attr("height", function(d) { return y(d.dy); })
+      .attr("fill", function(d) { return color((d.children ? d : d.parent).name); })
+      .on("click", click);
+
+  function click(d) {
+    x.domain([d.x, d.x + d.dx]);
+    y.domain([d.y, 1]).range([d.y ? 20 : 0, h]);
+
+    rect.transition()
+      .duration(750)
+      .attr("x", function(d) { return x(d.x); })
+      .attr("y", function(d) { return y(d.y); })
+      .attr("width", function(d) { return x(d.x + d.dx) - x(d.x); })
+      .attr("height", function(d) { return y(d.y + d.dy) - y(d.y); });
+  }
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/partition/partition-icicle.html
===================================================================
--- Dev/branches/Demo/d3/examples/partition/partition-icicle.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/partition/partition-icicle.html	(revision 225)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Partition - Icicle</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+rect {
+  stroke: #fff;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 250,
+    color = d3.scale.category20c();
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+var partition = d3.layout.partition()
+    .size([w, h])
+    .value(function(d) { return d.size; });
+
+d3.json("../data/flare.json", function(json) {
+  vis.data([json]).selectAll("rect")
+      .data(partition.nodes)
+    .enter().append("svg:rect")
+      .attr("x", function(d) { return d.x; })
+      .attr("y", function(d) { return d.y; })
+      .attr("width", function(d) { return d.dx; })
+      .attr("height", function(d) { return d.dy; })
+      .style("fill", function(d) { return color((d.children ? d : d.parent).name); });
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/partition/partition-sunburst-zoom.html
===================================================================
--- Dev/branches/Demo/d3/examples/partition/partition-sunburst-zoom.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/partition/partition-sunburst-zoom.html	(revision 225)
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Partition - Sunburst</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+path {
+  stroke: #fff;
+  fill-rule: evenodd;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 700,
+    r = Math.min(w, h) / 2,
+    x = d3.scale.linear().range([0, 2 * Math.PI]),
+    y = d3.scale.sqrt().range([0, r]),
+    color = d3.scale.category20c();
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(" + w / 2 + "," + h / 2 + ")");
+
+var partition = d3.layout.partition()
+    .value(function(d) { return d.size; });
+
+var arc = d3.svg.arc()
+    .startAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x))); })
+    .endAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx))); })
+    .innerRadius(function(d) { return Math.max(0, y(d.y)); })
+    .outerRadius(function(d) { return Math.max(0, y(d.y + d.dy)); });
+
+d3.json("../data/flare.json", function(json) {
+  var path = vis.data([json]).selectAll("path")
+      .data(partition.nodes)
+    .enter().append("svg:path")
+      .attr("d", arc)
+      .style("fill", function(d) { return color((d.children ? d : d.parent).name); })
+      .on("click", click);
+
+  function click(d) {
+    path.transition()
+      .duration(750)
+      .attrTween("d", arcTween(d));
+  }
+});
+
+// Interpolate the scales!
+function arcTween(d) {
+  var xd = d3.interpolate(x.domain(), [d.x, d.x + d.dx]),
+      yd = d3.interpolate(y.domain(), [d.y, 1]),
+      yr = d3.interpolate(y.range(), [d.y ? 20 : 0, r]);
+  return function(d, i) {
+    return i
+        ? function(t) { return arc(d); }
+        : function(t) { x.domain(xd(t)); y.domain(yd(t)).range(yr(t)); return arc(d); };
+  };
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/partition/partition-sunburst.html
===================================================================
--- Dev/branches/Demo/d3/examples/partition/partition-sunburst.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/partition/partition-sunburst.html	(revision 225)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Partition - Sunburst</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button id="size" class="first">
+        Size
+      </button
+      ><button id="count" class="active last">
+        Count
+      </button><p>
+    </div>
+    <script type="text/javascript" src="partition-sunburst.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/partition/partition-sunburst.js
===================================================================
--- Dev/branches/Demo/d3/examples/partition/partition-sunburst.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/partition/partition-sunburst.js	(revision 225)
@@ -0,0 +1,72 @@
+var w = 960,
+    h = 700,
+    r = Math.min(w, h) / 2,
+    color = d3.scale.category20c();
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(" + w / 2 + "," + h / 2 + ")");
+
+var partition = d3.layout.partition()
+    .sort(null)
+    .size([2 * Math.PI, r * r])
+    .value(function(d) { return 1; });
+
+var arc = d3.svg.arc()
+    .startAngle(function(d) { return d.x; })
+    .endAngle(function(d) { return d.x + d.dx; })
+    .innerRadius(function(d) { return Math.sqrt(d.y); })
+    .outerRadius(function(d) { return Math.sqrt(d.y + d.dy); });
+
+d3.json("../data/flare.json", function(json) {
+  var path = vis.data([json]).selectAll("path")
+      .data(partition.nodes)
+    .enter().append("svg:path")
+      .attr("display", function(d) { return d.depth ? null : "none"; }) // hide inner ring
+      .attr("d", arc)
+      .attr("fill-rule", "evenodd")
+      .style("stroke", "#fff")
+      .style("fill", function(d) { return color((d.children ? d : d.parent).name); })
+      .each(stash);
+
+  d3.select("#size").on("click", function() {
+    path
+        .data(partition.value(function(d) { return d.size; }))
+      .transition()
+        .duration(1500)
+        .attrTween("d", arcTween);
+
+    d3.select("#size").classed("active", true);
+    d3.select("#count").classed("active", false);
+  });
+
+  d3.select("#count").on("click", function() {
+    path
+        .data(partition.value(function(d) { return 1; }))
+      .transition()
+        .duration(1500)
+        .attrTween("d", arcTween);
+
+    d3.select("#size").classed("active", false);
+    d3.select("#count").classed("active", true);
+  });
+});
+
+// Stash the old values for transition.
+function stash(d) {
+  d.x0 = d.x;
+  d.dx0 = d.dx;
+}
+
+// Interpolate the arcs in data space.
+function arcTween(a) {
+  var i = d3.interpolate({x: a.x0, dx: a.dx0}, a);
+  return function(t) {
+    var b = i(t);
+    a.x0 = b.x;
+    a.dx0 = b.dx;
+    return arc(b);
+  };
+}
Index: Dev/branches/Demo/d3/examples/pie/pie-transition.html
===================================================================
--- Dev/branches/Demo/d3/examples/pie/pie-transition.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/pie/pie-transition.html	(revision 225)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Pie Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 400,
+    h = 400,
+    r = Math.min(w, h) / 2,
+    data = d3.range(10).map(Math.random),
+    color = d3.scale.category20(),
+    arc = d3.svg.arc().outerRadius(r),
+    donut = d3.layout.pie();
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .data([data.sort(d3.descending)])
+    .attr("width", w)
+    .attr("height", h);
+
+var arcs = vis.selectAll("g.arc")
+    .data(donut)
+  .enter().append("svg:g")
+    .attr("class", "arc")
+    .attr("transform", "translate(" + r + "," + r + ")");
+
+var paths = arcs.append("svg:path")
+    .attr("fill", function(d, i) { return color(i); });
+
+paths.transition()
+    .ease("bounce")
+    .duration(2000)
+    .attrTween("d", tweenPie);
+
+paths.transition()
+    .ease("elastic")
+    .delay(function(d, i) { return 2000 + i * 50; })
+    .duration(750)
+    .attrTween("d", tweenDonut);
+
+function tweenPie(b) {
+  b.innerRadius = 0;
+  var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
+  return function(t) {
+    return arc(i(t));
+  };
+}
+
+function tweenDonut(b) {
+  b.innerRadius = r * .6;
+  var i = d3.interpolate({innerRadius: 0}, b);
+  return function(t) {
+    return arc(i(t));
+  };
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/pie/pie.html
===================================================================
--- Dev/branches/Demo/d3/examples/pie/pie.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/pie/pie.html	(revision 225)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Pie Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 400,
+    h = 400,
+    r = Math.min(w, h) / 2,
+    data = d3.range(10).map(Math.random),
+    color = d3.scale.category20(),
+    donut = d3.layout.pie().sort(d3.descending),
+    arc = d3.svg.arc().innerRadius(r * .6).outerRadius(r);
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .data([data])
+    .attr("width", w)
+    .attr("height", h);
+
+var arcs = vis.selectAll("g.arc")
+    .data(donut)
+  .enter().append("svg:g")
+    .attr("class", "arc")
+    .attr("transform", "translate(" + r + "," + r + ")");
+
+arcs.append("svg:path")
+    .attr("fill", function(d, i) { return color(i); })
+    .attr("d", arc);
+
+arcs.append("svg:text")
+    .attr("transform", function(d) { return "translate(" + arc.centroid(d) + ")"; })
+    .attr("dy", ".35em")
+    .attr("text-anchor", "middle")
+    .attr("display", function(d) { return d.value > .15 ? null : "none"; })
+    .text(function(d, i) { return d.value.toFixed(2); });
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/qq/qq.css
===================================================================
--- Dev/branches/Demo/d3/examples/qq/qq.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/qq/qq.css	(revision 225)
@@ -0,0 +1,18 @@
+#chart {
+  font: 10px sans-serif;
+  width: 960px;
+  height: 310px;
+}
+
+.qq .box, .qq .tick line, .qq .quantile, .qq .diagonal {
+  stroke: #aaa;
+  fill: none;
+}
+
+.qq .quantile {
+  stroke: #000;
+}
+
+.qq g + g .y.tick {
+  display: none;
+}
Index: Dev/branches/Demo/d3/examples/qq/qq.html
===================================================================
--- Dev/branches/Demo/d3/examples/qq/qq.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/qq/qq.html	(revision 225)
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Q-Q Plots</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.chart.js"></script>
+    <script type="text/javascript" src="../../lib/science/science.js"></script>
+    <script type="text/javascript" src="../../lib/science/science.stats.js"></script>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+    <link type="text/css" rel="stylesheet" href="qq.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button class="first last" onclick="transition()">
+        Update
+      </button>
+    </div>
+    <script type="text/javascript" src="stats.js"></script>
+    <script type="text/javascript" src="qq.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/qq/qq.js
===================================================================
--- Dev/branches/Demo/d3/examples/qq/qq.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/qq/qq.js	(revision 225)
@@ -0,0 +1,66 @@
+var w = 280,
+    h = 280,
+    m = [10, 0, 20, 35], // top right bottom left
+    n = 10000; // number of samples to generate
+
+var chart = d3.chart.qq()
+    .width(w)
+    .height(h)
+    .domain([-.1, 1.1])
+    .tickFormat(function(d) { return ~~(d * 100); });
+
+var vis = d3.select("#chart")
+  .append("svg:svg")
+  .append("svg:g")
+    .attr("transform", "translate(" + m[3] + "," + m[0] + ")");
+
+d3.json("turkers.json", function(turkers) {
+  var tm = science.stats.mean(turkers),
+      td = Math.sqrt(science.stats.variance(turkers)),
+      dd = [
+        [0.10306430789206111, 0.0036139086950272735, 0.30498647327844536],
+        [0.5924252668569606, 0.0462763685758622, 0.4340870312025223],
+        [0.9847627827855167, 2.352350767874714e-4, 0.2609264955190324]
+      ];
+
+  var g = vis.selectAll("g")
+      .data([{
+        x: d3.range(n).map(Math.random),
+        y: turkers,
+        label: "Uniform Distribution"
+      }, {
+        x: d3.range(n).map(normal1(tm, td)),
+        y: turkers,
+        label: "Gaussian (Normal) Distribution"
+      }, {
+        x: d3.range(n).map(normal3(dd)),
+        y: turkers,
+        label: "Mixture of 3 Gaussians"
+      }])
+    .enter().append("svg:g")
+      .attr("class", "qq")
+      .attr("transform", function(d, i) { return "translate(" + (w + m[1] + m[3]) * i + ")"; });
+
+  g.append("svg:rect")
+      .attr("class", "box")
+      .attr("width", w)
+      .attr("height", h);
+
+  g.call(chart);
+
+  g.append("svg:text")
+      .attr("dy", "1.3em")
+      .attr("dx", ".6em")
+      .text(function(d) { return d.label; });
+
+  chart.duration(1000);
+
+  window.transition = function() {
+    g.map(randomize).call(chart);
+  };
+});
+
+function randomize(d) {
+  d.y = d3.range(n).map(Math.random);
+  return d;
+}
Index: Dev/branches/Demo/d3/examples/qq/stats.js
===================================================================
--- Dev/branches/Demo/d3/examples/qq/stats.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/qq/stats.js	(revision 225)
@@ -0,0 +1,28 @@
+// Sample from a normal distribution with mean 0, stddev 1.
+function normal() {
+  var x = 0, y = 0, rds, c;
+  do {
+    x = Math.random() * 2 - 1;
+    y = Math.random() * 2 - 1;
+    rds = x * x + y * y;
+  } while (rds == 0 || rds > 1);
+  c = Math.sqrt(-2 * Math.log(rds) / rds); // Box-Muller transform
+  return x * c; // throw away extra sample y * c
+}
+
+// Simple 1D Gaussian (normal) distribution
+function normal1(mean, deviation) {
+  return function() {
+    return mean + deviation * normal();
+  };
+}
+
+// Gaussian Mixture Model (k=3) fit using E-M algorithm
+function normal3(dd) {
+  return function() {
+    var r = Math.random(),
+        i = r < dd[0][2] ? 0 : r < dd[0][2] + dd[1][2] ? 1 : 2,
+        d = dd[i];
+    return d[0] + Math.sqrt(d[1]) * normal();
+  }
+}
Index: Dev/branches/Demo/d3/examples/qq/turkers.json
===================================================================
--- Dev/branches/Demo/d3/examples/qq/turkers.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/qq/turkers.json	(revision 225)
@@ -0,0 +1,1 @@
+[0.009259259,0.014285714,0.014285714,0.016666667,0.016666667,0.017857143,0.018518519,0.027777778,0.028571429,0.028571429,0.028571429,0.033333333,0.033333333,0.035714286,0.0375,0.041666667,0.041666667,0.041666667,0.041666667,0.042857143,0.042857143,0.042857143,0.05,0.055555556,0.069444444,0.083333333,0.083333333,0.083333333,0.083333333,0.083333333,0.083333333,0.085714286,0.1,0.1,0.101851852,0.104166667,0.111111111,0.111111111,0.114285714,0.114285714,0.116666667,0.12037037,0.125,0.125,0.128571429,0.133333333,0.138888889,0.141666667,0.142857143,0.142857143,0.15,0.152777778,0.158333333,0.166666667,0.171428571,0.183333333,0.185714286,0.185714286,0.1875,0.190140845,0.194444444,0.2,0.204545455,0.208333333,0.214285714,0.214285714,0.253521127,0.271428571,0.277777778,0.291666667,0.3,0.3,0.307017544,0.324074074,0.328571429,0.333333333,0.333333333,0.342857143,0.357142857,0.358333333,0.378787879,0.381355932,0.395833333,0.4,0.414285714,0.414285714,0.414285714,0.414285714,0.43,0.433333333,0.4375,0.445833333,0.450704225,0.453333333,0.458333333,0.466666667,0.476666667,0.494736842,0.5,0.516666667,0.533333333,0.55,0.557142857,0.56884058,0.569444444,0.571428571,0.585714286,0.61,0.622222222,0.657407407,0.666666667,0.678947368,0.685714286,0.685714286,0.69047619,0.7,0.7,0.7,0.711538462,0.763888889,0.771428571,0.788888889,0.8,0.8,0.808333333,0.824712644,0.828571429,0.836842105,0.839285714,0.839285714,0.84,0.842857143,0.842857143,0.842857143,0.85,0.859649123,0.869791667,0.871428571,0.871428571,0.892344498,0.914285714,0.928571429,0.933908046,0.953703704,0.973684211,0.975,0.981481481,0.983333333,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.985714286,0.987096774,0.990740741,0.991666667,0.992,0.994047619,0.996666667,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
Index: Dev/branches/Demo/d3/examples/quadtree/quadtree.html
===================================================================
--- Dev/branches/Demo/d3/examples/quadtree/quadtree.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/quadtree/quadtree.html	(revision 225)
@@ -0,0 +1,114 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Quadtree</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <style type="text/css">
+
+svg {
+  padding: 2px;
+}
+
+circle {
+  fill: lightsteelblue;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+rect {
+  fill: none;
+  stroke: #000;
+  stroke-opacity: .3;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 500;
+
+// Generate random points.
+var data = d3.range(500).map(function() {
+  return {
+    x: Math.random() * w,
+    y: Math.random() * w
+  };
+});
+
+// Generate a quadtree of the specified data.
+var quadtree = d3.geom.quadtree(data, 0, w);
+
+var vis = d3.select("body").append("svg:svg")
+    .attr("width", w)
+    .attr("height", w)
+    .style("pointer-events", "all");
+
+vis.selectAll("rect")
+    .data(nodes(quadtree))
+  .enter().append("svg:rect")
+    .attr("x", function(d) { return d.x; })
+    .attr("y", function(d) { return d.y; })
+    .attr("width", function(d) { return d.width; })
+    .attr("height", function(d) { return d.height; });
+
+vis.selectAll("circle")
+    .data(data)
+  .enter().append("svg:circle")
+    .attr("cx", function(d) { return d.x; })
+    .attr("cy", function(d) { return d.y; })
+    .attr("r", 4.5);
+
+// Highlight selected nodes using the quadtree.
+vis.on("mousedown", function() {
+  var m0 = d3.svg.mouse(this);
+
+  var rect = d3.select(this).append("svg:rect")
+      .style("fill", "#999")
+      .style("fill-opacity", .5);
+
+  d3.select(window).on("mousemove", function() {
+    var m1 = d3.svg.mouse(rect.node()),
+        x0 = Math.min(w, m0[0], m1[0]),
+        y0 = Math.min(w, m0[1], m1[1]),
+        x1 = Math.max(0, m0[0], m1[0]),
+        y1 = Math.max(0, m0[1], m1[1]);
+
+    data.forEach(function(d) { d.z = 0; })
+    find(quadtree, x0, y0, x1, y1).forEach(function(d) { d.z = 1; });
+    vis.selectAll("circle").style("fill", function(d) { return d.z ? "red" : null; });
+    rect.attr("x", x0).attr("y", y0).attr("width", x1 - x0).attr("height", y1 - y0);
+  });
+
+  d3.select(window).on("mouseup", function() {
+    rect.remove();
+    d3.select(window).on("mousemove", null).on("mouseup", null);
+  });
+
+  d3.event.preventDefault();
+});
+
+// Collapse the quadtree into an array of rectangles.
+function nodes(quadtree) {
+  var nodes = [];
+  quadtree.visit(function(node, x1, y1, x2, y2) {
+    nodes.push({x: x1, y: y1, width: x2 - x1, height: y2 - y1});
+  });
+  return nodes;
+}
+
+// Find the nodes within the specified rectangle.
+function find(quadtree, x0, y0, x3, y3) {
+  var points = [];
+  quadtree.visit(function(node, x1, y1, x2, y2) {
+    var p = node.point;
+    if (p && (p.x >= x0) && (p.x < x3) && (p.y >= y0) && (p.y < y3)) points.push(p);
+    return x1 >= x3 || y1 >= y3 || x2 < x0 || y2 < y0;
+  });
+  return points;
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/sizzle/sizzle.html
===================================================================
--- Dev/branches/Demo/d3/examples/sizzle/sizzle.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/sizzle/sizzle.html	(revision 225)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Sizzle</title>
+    <script type="text/javascript" src="../../lib/sizzle/sizzle.js"></script>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+body {
+  margin: 2em;
+  text-align: center;
+  font: 300 36px helvetica neue;
+}
+
+    </style>
+  </head>
+  <body>
+    Sizzle.js disabled.
+    <script type="text/javascript">
+
+// The :first psuedo-class is a custom Sizzle extension.
+d3.select("body:first")
+    .html("Sizzle.js enabled!");
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/sort/sort.css
===================================================================
--- Dev/branches/Demo/d3/examples/sort/sort.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/sort/sort.css	(revision 225)
@@ -0,0 +1,4 @@
+line {
+  stroke: #000;
+  stroke-width: 1.5px;
+}
Index: Dev/branches/Demo/d3/examples/sort/sort.html
===================================================================
--- Dev/branches/Demo/d3/examples/sort/sort.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/sort/sort.html	(revision 225)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Merge Sort</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <link type="text/css" rel="stylesheet" href="sort.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="sort.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/sort/sort.js
===================================================================
--- Dev/branches/Demo/d3/examples/sort/sort.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/sort/sort.js	(revision 225)
@@ -0,0 +1,112 @@
+// Based on http://vis.stanford.edu/protovis/ex/sort.html
+// Based on work by Robert Sedgewick
+
+var w = 960,
+    h = 50,
+    n = 240,
+    x = d3.scale.linear().domain([0, n]).range([h, w - h]),
+    a = d3.scale.linear().domain([0, n - 1]).range([90 + 60, 270 - 60]),
+    data = shuffle(d3.range(n)),
+    duration = 250;
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+var line = vis.selectAll("line")
+    .data(data)
+  .enter().append("svg:line")
+    .attr("x1", 0)
+    .attr("y1", 0)
+    .attr("x2", 0)
+    .attr("y2", h)
+    .attr("transform", transform);
+
+start();
+
+// Start the animation!
+function start() {
+  var passes = mergesort(data).reverse();
+
+  update();
+
+  function update() {
+    var pass = passes.pop();
+
+    line.data(pass, Number)
+      .transition()
+        .duration(duration)
+        .attr("transform", transform);
+
+    if (passes.length) {
+      setTimeout(update, duration);
+    } else {
+      shuffle(data);
+      setTimeout(start, duration + 4000);
+    }
+  }
+}
+
+function transform(d, i) {
+  return "translate(" + x(i) + "," + h + ")rotate(" + a(d) + ")";
+}
+
+// Fisher-Yates shuffle
+function shuffle(array) {
+  var i = array.length, j, t;
+  while (--i > 0) {
+    j = ~~(Math.random() * (i + 1));
+    t = array[j];
+    array[j] = array[i];
+    array[i] = t;
+  }
+  return array;
+}
+
+//
+// Sorts the specified array using bottom-up mergesort, returning an array of
+// arrays representing the state of the specified array after each insertion for
+// each parallel pass. The first pass is performed at size = 2.
+//
+function mergesort(array) {
+  var passes = [],
+      i,
+      j,
+      n = array.length,
+      m = 1;
+
+  // double the size each pass
+  while (m < array.length) {
+    i = j = 0; while (i < array.length) j += merge(i, i += m, i += m);
+    if (j) passes.push(array.slice());
+    else m <<= 1;
+  }
+
+  // Merges two adjacent sorted arrays in-place.
+  function merge(start, middle, end) {
+    middle = Math.min(array.length, middle);
+    end = Math.min(array.length, end);
+    for (; start < middle; start++) {
+      if (array[start] > array[middle]) {
+        var v = array[start];
+        array[start] = array[middle];
+        insert(middle, end, v);
+        return true;
+      }
+    }
+    return false;
+  }
+
+  // Inserts the value v into the subarray specified by start and end.
+  function insert(start, end, v) {
+    while (start + 1 < end && array[start + 1] < v) {
+      var tmp = array[start];
+      array[start] = array[start + 1];
+      array[start + 1] = tmp;
+      start++;
+    }
+    array[start] = v;
+  }
+
+  return passes;
+}
Index: Dev/branches/Demo/d3/examples/spline/spline.css
===================================================================
--- Dev/branches/Demo/d3/examples/spline/spline.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/spline/spline.css	(revision 225)
@@ -0,0 +1,30 @@
+body {
+  font: 13px sans-serif;
+}
+
+#chart svg {
+  width: 960px;
+  height: 500px;
+  border: solid 1px #ccc;
+}
+
+rect {
+  fill: #fff;
+}
+
+circle, .line {
+  fill: none;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+circle {
+  fill: #fff;
+  fill-opacity: .2;
+  cursor: move;
+}
+
+circle.selected {
+  fill: #ff7f0e;
+  stroke: #ff7f0e;
+}
Index: Dev/branches/Demo/d3/examples/spline/spline.html
===================================================================
--- Dev/branches/Demo/d3/examples/spline/spline.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/spline/spline.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Spline Editor</title>
+    <link type="text/css" rel="stylesheet" href="spline.css"/>
+    <script type="text/javascript" src="../../d3.js"></script>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <label for="interpolate">Interpolate:</label>
+    <select id="interpolate"></select>
+    <script type="text/javascript" src="spline.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/spline/spline.js
===================================================================
--- Dev/branches/Demo/d3/examples/spline/spline.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/spline/spline.js	(revision 225)
@@ -0,0 +1,113 @@
+var w = 960,
+    h = 500,
+    line = d3.svg.line(),
+    points = d3.range(1, 5).map(function(i) { return [i * w / 5, 50 + Math.random() * (h - 100)]; }),
+    dragged = null,
+    selected = points[0];
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+vis.append("svg:rect")
+    .attr("width", w)
+    .attr("height", h)
+    .on("mousedown", function() {
+      points.push(selected = dragged = d3.svg.mouse(vis.node()));
+      update();
+    });
+
+vis.append("svg:path")
+    .data([points])
+    .attr("class", "line")
+    .call(update);
+
+d3.select(window)
+    .on("mousemove", mousemove)
+    .on("mouseup", mouseup)
+    .on("keydown", keydown);
+
+// Add interpolator dropdown
+d3.select("#interpolate")
+    .on("change", function() {
+      line.interpolate(this.value);
+      update();
+    })
+  .selectAll("option")
+    .data([
+      "linear",
+      "step-before",
+      "step-after",
+      "basis",
+      "basis-open",
+      "basis-closed",
+      "cardinal",
+      "cardinal-open",
+      "cardinal-closed",
+      "monotone"
+    ])
+  .enter().append("option")
+    .attr("value", String)
+    .text(String);
+
+function update() {
+  vis.select("path").attr("d", line);
+
+  var circle = vis.selectAll("circle")
+      .data(points, function(d) { return d; });
+
+  circle.enter().append("svg:circle")
+      .attr("class", function(d) { return d === selected ? "selected" : null; })
+      .attr("cx", function(d) { return d[0]; })
+      .attr("cy", function(d) { return d[1]; })
+      .attr("r", 1e-6)
+      .on("mousedown", function(d) {
+        selected = dragged = d;
+        update();
+      })
+    .transition()
+      .duration(750)
+      .ease("elastic")
+      .attr("r", 6.5);
+
+  circle
+      .attr("class", function(d) { return d === selected ? "selected" : null; })
+      .attr("cx", function(d) { return d[0]; })
+      .attr("cy", function(d) { return d[1]; });
+
+  circle.exit().remove();
+
+  if (d3.event) {
+    d3.event.preventDefault();
+    d3.event.stopPropagation();
+  }
+}
+
+
+function mousemove() {
+  if (!dragged) return;
+  var m = d3.svg.mouse(vis.node());
+  dragged[0] = Math.max(0, Math.min(w, m[0]));
+  dragged[1] = Math.max(0, Math.min(h, m[1]));
+  update();
+}
+
+function mouseup() {
+  if (!dragged) return;
+  mousemove();
+  dragged = null;
+}
+
+function keydown() {
+  if (!selected) return;
+  switch (d3.event.keyCode) {
+    case 8: // backspace
+    case 46: { // delete
+      var i = points.indexOf(selected);
+      points.splice(i, 1);
+      selected = points.length ? points[i > 0 ? i - 1 : 0] : null;
+      update();
+      break;
+    }
+  }
+}
Index: Dev/branches/Demo/d3/examples/splom/cross.js
===================================================================
--- Dev/branches/Demo/d3/examples/splom/cross.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/splom/cross.js	(revision 225)
@@ -0,0 +1,7 @@
+function cross(a) {
+  return function(d) {
+    var c = [];
+    for (var i = 0, n = a.length; i < n; i++) c.push({x: d, y: a[i]});
+    return c;
+  };
+}
Index: Dev/branches/Demo/d3/examples/splom/flowers.json
===================================================================
--- Dev/branches/Demo/d3/examples/splom/flowers.json	(revision 225)
+++ Dev/branches/Demo/d3/examples/splom/flowers.json	(revision 225)
@@ -0,0 +1,1 @@
+{"traits":["sepalLength","sepalWidth","petalLength","petalWidth"],"species":["setosa","versicolor","virginica"],"values":[{"sepalLength":5.1,"sepalWidth":3.5,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.9,"sepalWidth":3.0,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.7,"sepalWidth":3.2,"petalLength":1.3,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.6,"sepalWidth":3.1,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.6,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.4,"sepalWidth":3.9,"petalLength":1.7,"petalWidth":0.4,"species":"setosa"},{"sepalLength":4.6,"sepalWidth":3.4,"petalLength":1.4,"petalWidth":0.3,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.4,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.4,"sepalWidth":2.9,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.9,"sepalWidth":3.1,"petalLength":1.5,"petalWidth":0.1,"species":"setosa"},{"sepalLength":5.4,"sepalWidth":3.7,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.8,"sepalWidth":3.4,"petalLength":1.6,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.8,"sepalWidth":3.0,"petalLength":1.4,"petalWidth":0.1,"species":"setosa"},{"sepalLength":4.3,"sepalWidth":3.0,"petalLength":1.1,"petalWidth":0.1,"species":"setosa"},{"sepalLength":5.8,"sepalWidth":4.0,"petalLength":1.2,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.7,"sepalWidth":4.4,"petalLength":1.5,"petalWidth":0.4,"species":"setosa"},{"sepalLength":5.4,"sepalWidth":3.9,"petalLength":1.3,"petalWidth":0.4,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.5,"petalLength":1.4,"petalWidth":0.3,"species":"setosa"},{"sepalLength":5.7,"sepalWidth":3.8,"petalLength":1.7,"petalWidth":0.3,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.8,"petalLength":1.5,"petalWidth":0.3,"species":"setosa"},{"sepalLength":5.4,"sepalWidth":3.4,"petalLength":1.7,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.7,"petalLength":1.5,"petalWidth":0.4,"species":"setosa"},{"sepalLength":4.6,"sepalWidth":3.6,"petalLength":1.0,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.3,"petalLength":1.7,"petalWidth":0.5,"species":"setosa"},{"sepalLength":4.8,"sepalWidth":3.4,"petalLength":1.9,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.0,"petalLength":1.6,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.4,"petalLength":1.6,"petalWidth":0.4,"species":"setosa"},{"sepalLength":5.2,"sepalWidth":3.5,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.2,"sepalWidth":3.4,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.7,"sepalWidth":3.2,"petalLength":1.6,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.8,"sepalWidth":3.1,"petalLength":1.6,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.4,"sepalWidth":3.4,"petalLength":1.5,"petalWidth":0.4,"species":"setosa"},{"sepalLength":5.2,"sepalWidth":4.1,"petalLength":1.5,"petalWidth":0.1,"species":"setosa"},{"sepalLength":5.5,"sepalWidth":4.2,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.9,"sepalWidth":3.1,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.2,"petalLength":1.2,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.5,"sepalWidth":3.5,"petalLength":1.3,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.9,"sepalWidth":3.6,"petalLength":1.4,"petalWidth":0.1,"species":"setosa"},{"sepalLength":4.4,"sepalWidth":3.0,"petalLength":1.3,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.4,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.5,"petalLength":1.3,"petalWidth":0.3,"species":"setosa"},{"sepalLength":4.5,"sepalWidth":2.3,"petalLength":1.3,"petalWidth":0.3,"species":"setosa"},{"sepalLength":4.4,"sepalWidth":3.2,"petalLength":1.3,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.5,"petalLength":1.6,"petalWidth":0.6,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.8,"petalLength":1.9,"petalWidth":0.4,"species":"setosa"},{"sepalLength":4.8,"sepalWidth":3.0,"petalLength":1.4,"petalWidth":0.3,"species":"setosa"},{"sepalLength":5.1,"sepalWidth":3.8,"petalLength":1.6,"petalWidth":0.2,"species":"setosa"},{"sepalLength":4.6,"sepalWidth":3.2,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.3,"sepalWidth":3.7,"petalLength":1.5,"petalWidth":0.2,"species":"setosa"},{"sepalLength":5.0,"sepalWidth":3.3,"petalLength":1.4,"petalWidth":0.2,"species":"setosa"},{"sepalLength":7.0,"sepalWidth":3.2,"petalLength":4.7,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":6.4,"sepalWidth":3.2,"petalLength":4.5,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":6.9,"sepalWidth":3.1,"petalLength":4.9,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":5.5,"sepalWidth":2.3,"petalLength":4.0,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.5,"sepalWidth":2.8,"petalLength":4.6,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":5.7,"sepalWidth":2.8,"petalLength":4.5,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.3,"sepalWidth":3.3,"petalLength":4.7,"petalWidth":1.6,"species":"versicolor"},{"sepalLength":4.9,"sepalWidth":2.4,"petalLength":3.3,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":6.6,"sepalWidth":2.9,"petalLength":4.6,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":5.2,"sepalWidth":2.7,"petalLength":3.9,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":5.0,"sepalWidth":2.0,"petalLength":3.5,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":5.9,"sepalWidth":3.0,"petalLength":4.2,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":6.0,"sepalWidth":2.2,"petalLength":4.0,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":6.1,"sepalWidth":2.9,"petalLength":4.7,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":5.6,"sepalWidth":2.9,"petalLength":3.6,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.7,"sepalWidth":3.1,"petalLength":4.4,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":5.6,"sepalWidth":3.0,"petalLength":4.5,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":5.8,"sepalWidth":2.7,"petalLength":4.1,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":6.2,"sepalWidth":2.2,"petalLength":4.5,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":5.6,"sepalWidth":2.5,"petalLength":3.9,"petalWidth":1.1,"species":"versicolor"},{"sepalLength":5.9,"sepalWidth":3.2,"petalLength":4.8,"petalWidth":1.8,"species":"versicolor"},{"sepalLength":6.1,"sepalWidth":2.8,"petalLength":4.0,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.3,"sepalWidth":2.5,"petalLength":4.9,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":6.1,"sepalWidth":2.8,"petalLength":4.7,"petalWidth":1.2,"species":"versicolor"},{"sepalLength":6.4,"sepalWidth":2.9,"petalLength":4.3,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.6,"sepalWidth":3.0,"petalLength":4.4,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":6.8,"sepalWidth":2.8,"petalLength":4.8,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":6.7,"sepalWidth":3.0,"petalLength":5.0,"petalWidth":1.7,"species":"versicolor"},{"sepalLength":6.0,"sepalWidth":2.9,"petalLength":4.5,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":5.7,"sepalWidth":2.6,"petalLength":3.5,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":5.5,"sepalWidth":2.4,"petalLength":3.8,"petalWidth":1.1,"species":"versicolor"},{"sepalLength":5.5,"sepalWidth":2.4,"petalLength":3.7,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":5.8,"sepalWidth":2.7,"petalLength":3.9,"petalWidth":1.2,"species":"versicolor"},{"sepalLength":6.0,"sepalWidth":2.7,"petalLength":5.1,"petalWidth":1.6,"species":"versicolor"},{"sepalLength":5.4,"sepalWidth":3.0,"petalLength":4.5,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":6.0,"sepalWidth":3.4,"petalLength":4.5,"petalWidth":1.6,"species":"versicolor"},{"sepalLength":6.7,"sepalWidth":3.1,"petalLength":4.7,"petalWidth":1.5,"species":"versicolor"},{"sepalLength":6.3,"sepalWidth":2.3,"petalLength":4.4,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":5.6,"sepalWidth":3.0,"petalLength":4.1,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":5.5,"sepalWidth":2.5,"petalLength":4.0,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":5.5,"sepalWidth":2.6,"petalLength":4.4,"petalWidth":1.2,"species":"versicolor"},{"sepalLength":6.1,"sepalWidth":3.0,"petalLength":4.6,"petalWidth":1.4,"species":"versicolor"},{"sepalLength":5.8,"sepalWidth":2.6,"petalLength":4.0,"petalWidth":1.2,"species":"versicolor"},{"sepalLength":5.0,"sepalWidth":2.3,"petalLength":3.3,"petalWidth":1.0,"species":"versicolor"},{"sepalLength":5.6,"sepalWidth":2.7,"petalLength":4.2,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":5.7,"sepalWidth":3.0,"petalLength":4.2,"petalWidth":1.2,"species":"versicolor"},{"sepalLength":5.7,"sepalWidth":2.9,"petalLength":4.2,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.2,"sepalWidth":2.9,"petalLength":4.3,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":5.1,"sepalWidth":2.5,"petalLength":3.0,"petalWidth":1.1,"species":"versicolor"},{"sepalLength":5.7,"sepalWidth":2.8,"petalLength":4.1,"petalWidth":1.3,"species":"versicolor"},{"sepalLength":6.3,"sepalWidth":3.3,"petalLength":6.0,"petalWidth":2.5,"species":"virginica"},{"sepalLength":5.8,"sepalWidth":2.7,"petalLength":5.1,"petalWidth":1.9,"species":"virginica"},{"sepalLength":7.1,"sepalWidth":3.0,"petalLength":5.9,"petalWidth":2.1,"species":"virginica"},{"sepalLength":6.3,"sepalWidth":2.9,"petalLength":5.6,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.5,"sepalWidth":3.0,"petalLength":5.8,"petalWidth":2.2,"species":"virginica"},{"sepalLength":7.6,"sepalWidth":3.0,"petalLength":6.6,"petalWidth":2.1,"species":"virginica"},{"sepalLength":4.9,"sepalWidth":2.5,"petalLength":4.5,"petalWidth":1.7,"species":"virginica"},{"sepalLength":7.3,"sepalWidth":2.9,"petalLength":6.3,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.7,"sepalWidth":2.5,"petalLength":5.8,"petalWidth":1.8,"species":"virginica"},{"sepalLength":7.2,"sepalWidth":3.6,"petalLength":6.1,"petalWidth":2.5,"species":"virginica"},{"sepalLength":6.5,"sepalWidth":3.2,"petalLength":5.1,"petalWidth":2.0,"species":"virginica"},{"sepalLength":6.4,"sepalWidth":2.7,"petalLength":5.3,"petalWidth":1.9,"species":"virginica"},{"sepalLength":6.8,"sepalWidth":3.0,"petalLength":5.5,"petalWidth":2.1,"species":"virginica"},{"sepalLength":5.7,"sepalWidth":2.5,"petalLength":5.0,"petalWidth":2.0,"species":"virginica"},{"sepalLength":5.8,"sepalWidth":2.8,"petalLength":5.1,"petalWidth":2.4,"species":"virginica"},{"sepalLength":6.4,"sepalWidth":3.2,"petalLength":5.3,"petalWidth":2.3,"species":"virginica"},{"sepalLength":6.5,"sepalWidth":3.0,"petalLength":5.5,"petalWidth":1.8,"species":"virginica"},{"sepalLength":7.7,"sepalWidth":3.8,"petalLength":6.7,"petalWidth":2.2,"species":"virginica"},{"sepalLength":7.7,"sepalWidth":2.6,"petalLength":6.9,"petalWidth":2.3,"species":"virginica"},{"sepalLength":6.0,"sepalWidth":2.2,"petalLength":5.0,"petalWidth":1.5,"species":"virginica"},{"sepalLength":6.9,"sepalWidth":3.2,"petalLength":5.7,"petalWidth":2.3,"species":"virginica"},{"sepalLength":5.6,"sepalWidth":2.8,"petalLength":4.9,"petalWidth":2.0,"species":"virginica"},{"sepalLength":7.7,"sepalWidth":2.8,"petalLength":6.7,"petalWidth":2.0,"species":"virginica"},{"sepalLength":6.3,"sepalWidth":2.7,"petalLength":4.9,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.7,"sepalWidth":3.3,"petalLength":5.7,"petalWidth":2.1,"species":"virginica"},{"sepalLength":7.2,"sepalWidth":3.2,"petalLength":6.0,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.2,"sepalWidth":2.8,"petalLength":4.8,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.1,"sepalWidth":3.0,"petalLength":4.9,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.4,"sepalWidth":2.8,"petalLength":5.6,"petalWidth":2.1,"species":"virginica"},{"sepalLength":7.2,"sepalWidth":3.0,"petalLength":5.8,"petalWidth":1.6,"species":"virginica"},{"sepalLength":7.4,"sepalWidth":2.8,"petalLength":6.1,"petalWidth":1.9,"species":"virginica"},{"sepalLength":7.9,"sepalWidth":3.8,"petalLength":6.4,"petalWidth":2.0,"species":"virginica"},{"sepalLength":6.4,"sepalWidth":2.8,"petalLength":5.6,"petalWidth":2.2,"species":"virginica"},{"sepalLength":6.3,"sepalWidth":2.8,"petalLength":5.1,"petalWidth":1.5,"species":"virginica"},{"sepalLength":6.1,"sepalWidth":2.6,"petalLength":5.6,"petalWidth":1.4,"species":"virginica"},{"sepalLength":7.7,"sepalWidth":3.0,"petalLength":6.1,"petalWidth":2.3,"species":"virginica"},{"sepalLength":6.3,"sepalWidth":3.4,"petalLength":5.6,"petalWidth":2.4,"species":"virginica"},{"sepalLength":6.4,"sepalWidth":3.1,"petalLength":5.5,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.0,"sepalWidth":3.0,"petalLength":4.8,"petalWidth":1.8,"species":"virginica"},{"sepalLength":6.9,"sepalWidth":3.1,"petalLength":5.4,"petalWidth":2.1,"species":"virginica"},{"sepalLength":6.7,"sepalWidth":3.1,"petalLength":5.6,"petalWidth":2.4,"species":"virginica"},{"sepalLength":6.9,"sepalWidth":3.1,"petalLength":5.1,"petalWidth":2.3,"species":"virginica"},{"sepalLength":5.8,"sepalWidth":2.7,"petalLength":5.1,"petalWidth":1.9,"species":"virginica"},{"sepalLength":6.8,"sepalWidth":3.2,"petalLength":5.9,"petalWidth":2.3,"species":"virginica"},{"sepalLength":6.7,"sepalWidth":3.3,"petalLength":5.7,"petalWidth":2.5,"species":"virginica"},{"sepalLength":6.7,"sepalWidth":3.0,"petalLength":5.2,"petalWidth":2.3,"species":"virginica"},{"sepalLength":6.3,"sepalWidth":2.5,"petalLength":5.0,"petalWidth":1.9,"species":"virginica"},{"sepalLength":6.5,"sepalWidth":3.0,"petalLength":5.2,"petalWidth":2.0,"species":"virginica"},{"sepalLength":6.2,"sepalWidth":3.4,"petalLength":5.4,"petalWidth":2.3,"species":"virginica"},{"sepalLength":5.9,"sepalWidth":3.0,"petalLength":5.1,"petalWidth":1.8,"species":"virginica"}]}
Index: Dev/branches/Demo/d3/examples/splom/splom.css
===================================================================
--- Dev/branches/Demo/d3/examples/splom/splom.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/splom/splom.css	(revision 225)
@@ -0,0 +1,8 @@
+line {
+  stroke: #eee;
+  shape-rendering: crispEdges;
+}
+
+rect {
+  cursor: crosshair;
+}
Index: Dev/branches/Demo/d3/examples/splom/splom.html
===================================================================
--- Dev/branches/Demo/d3/examples/splom/splom.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/splom/splom.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Scatterplot Matrix</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="cross.js"></script>
+    <link type="text/css" rel="stylesheet" href="splom.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="splom.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/splom/splom.js
===================================================================
--- Dev/branches/Demo/d3/examples/splom/splom.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/splom/splom.js	(revision 225)
@@ -0,0 +1,149 @@
+d3.json("flowers.json", function(flower) {
+
+  // Size parameters.
+  var size = 150,
+      padding = 20;
+
+  // Color scale.
+  var color = d3.scale.ordinal().range([
+    "rgb(50%, 0%, 0%)",
+    "rgb(0%, 50%, 0%)",
+    "rgb(0%, 0%, 50%)"
+  ]);
+
+  // Position scales.
+  var position = {};
+  flower.traits.forEach(function(trait) {
+    function value(d) { return d[trait]; }
+    position[trait] = d3.scale.linear()
+        .domain([d3.min(flower.values, value), d3.max(flower.values, value)])
+        .range([padding / 2, size - padding / 2]);
+  });
+
+  // Root panel.
+  var svg = d3.select("#chart")
+    .append("svg:svg")
+      .attr("width", size * flower.traits.length)
+      .attr("height", size * flower.traits.length);
+
+  // One column per trait.
+  var column = svg.selectAll("g")
+      .data(flower.traits)
+    .enter().append("svg:g")
+      .attr("transform", function(d, i) { return "translate(" + i * size + ",0)"; });
+
+  // One row per trait.
+  var row = column.selectAll("g")
+      .data(cross(flower.traits))
+    .enter().append("svg:g")
+      .attr("transform", function(d, i) { return "translate(0," + i * size + ")"; });
+
+  // X-ticks. TODO Cross the trait into the tick data?
+  row.selectAll("line.x")
+      .data(function(d) { return position[d.x].ticks(5).map(position[d.x]); })
+    .enter().append("svg:line")
+      .attr("class", "x")
+      .attr("x1", function(d) { return d; })
+      .attr("x2", function(d) { return d; })
+      .attr("y1", padding / 2)
+      .attr("y2", size - padding / 2);
+
+  // Y-ticks. TODO Cross the trait into the tick data?
+  row.selectAll("line.y")
+      .data(function(d) { return position[d.y].ticks(5).map(position[d.y]); })
+    .enter().append("svg:line")
+      .attr("class", "y")
+      .attr("x1", padding / 2)
+      .attr("x2", size - padding / 2)
+      .attr("y1", function(d) { return d; })
+      .attr("y2", function(d) { return d; });
+
+  // Frame.
+  row.append("svg:rect")
+      .attr("x", padding / 2)
+      .attr("y", padding / 2)
+      .attr("width", size - padding)
+      .attr("height", size - padding)
+      .style("fill", "none")
+      .style("stroke", "#aaa")
+      .style("stroke-width", 1.5)
+      .attr("pointer-events", "all")
+      .on("mousedown", mousedown);
+
+  // Dot plot.
+  var dot = row.selectAll("circle")
+      .data(cross(flower.values))
+    .enter().append("svg:circle")
+      .attr("cx", function(d) { return position[d.x.x](d.y[d.x.x]); })
+      .attr("cy", function(d) { return size - position[d.x.y](d.y[d.x.y]); })
+      .attr("r", 3)
+      .style("fill", function(d) { return color(d.y.species); })
+      .style("fill-opacity", .5)
+      .attr("pointer-events", "none");
+
+  d3.select(window)
+      .on("mousemove", mousemove)
+      .on("mouseup", mouseup);
+
+  var rect, x0, x1, count;
+
+  function mousedown() {
+    x0 = d3.svg.mouse(this);
+    count = 0;
+
+    rect = d3.select(this.parentNode)
+      .append("svg:rect")
+        .style("fill", "#999")
+        .style("fill-opacity", .5);
+
+    d3.event.preventDefault();
+  }
+
+  function mousemove() {
+    if (!rect) return;
+    x1 = d3.svg.mouse(rect.node());
+
+    x1[0] = Math.max(padding / 2, Math.min(size - padding / 2, x1[0]));
+    x1[1] = Math.max(padding / 2, Math.min(size - padding / 2, x1[1]));
+
+    var minx = Math.min(x0[0], x1[0]),
+        maxx = Math.max(x0[0], x1[0]),
+        miny = Math.min(x0[1], x1[1]),
+        maxy = Math.max(x0[1], x1[1]);
+
+    rect
+        .attr("x", minx - .5)
+        .attr("y", miny - .5)
+        .attr("width", maxx - minx + 1)
+        .attr("height", maxy - miny + 1);
+
+    var v = rect.node().__data__,
+        x = position[v.x],
+        y = position[v.y],
+        mins = x.invert(minx),
+        maxs = x.invert(maxx),
+        mint = y.invert(size - maxy),
+        maxt = y.invert(size - miny);
+
+    count = 0;
+    svg.selectAll("circle")
+        .style("fill", function(d) {
+          return mins <= d.y[v.x] && maxs >= d.y[v.x]
+              && mint <= d.y[v.y] && maxt >= d.y[v.y]
+              ? (count++, color(d.y.species))
+              : "#ccc";
+        });
+  }
+
+  function mouseup() {
+    if (!rect) return;
+    rect.remove();
+    rect = null;
+
+    if (!count) svg.selectAll("circle")
+        .style("fill", function(d) {
+          return color(d.y.species);
+        });
+  }
+
+});
Index: Dev/branches/Demo/d3/examples/stream/stack.css
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stack.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stack.css	(revision 225)
@@ -0,0 +1,7 @@
+#chart {
+  font: 10px sans-serif;
+}
+
+line {
+  stroke: black;
+}
Index: Dev/branches/Demo/d3/examples/stream/stack.html
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stack.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stack.html	(revision 225)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Stacked Bar Chart</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <script type="text/javascript" src="stream_layers.js"></script>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+    <link type="text/css" rel="stylesheet" href="stack.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button id="group" class="first" onclick="transitionGroup()">
+        Group
+      </button
+      ><button id="stack" class="active last" onclick="transitionStack()">
+        Stack
+      </button><p>
+    </div>
+    <script type="text/javascript" src="stack.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/stream/stack.js
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stack.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stack.js	(revision 225)
@@ -0,0 +1,119 @@
+var n = 4, // number of layers
+    m = 64, // number of samples per layer
+    data = d3.layout.stack()(stream_layers(n, m, .1)),
+    color = d3.interpolateRgb("#aad", "#556");
+
+var p = 20,
+    w = 960,
+    h = 500 - .5 - p,
+    mx = m,
+    my = d3.max(data, function(d) {
+      return d3.max(d, function(d) {
+        return d.y0 + d.y;
+      });
+    }),
+    mz = d3.max(data, function(d) {
+      return d3.max(d, function(d) {
+        return d.y;
+      });
+    }),
+    x = function(d) { return d.x * w / mx; },
+    y0 = function(d) { return h - d.y0 * h / my; },
+    y1 = function(d) { return h - (d.y + d.y0) * h / my; },
+    y2 = function(d) { return d.y * h / mz; }; // or `my` to not rescale
+
+var vis = d3.select("#chart")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h + p);
+
+var layers = vis.selectAll("g.layer")
+    .data(data)
+  .enter().append("svg:g")
+    .style("fill", function(d, i) { return color(i / (n - 1)); })
+    .attr("class", "layer");
+
+var bars = layers.selectAll("g.bar")
+    .data(function(d) { return d; })
+  .enter().append("svg:g")
+    .attr("class", "bar")
+    .attr("transform", function(d) { return "translate(" + x(d) + ",0)"; });
+
+bars.append("svg:rect")
+    .attr("width", x({x: .9}))
+    .attr("x", 0)
+    .attr("y", h)
+    .attr("height", 0)
+  .transition()
+    .delay(function(d, i) { return i * 10; })
+    .attr("y", y1)
+    .attr("height", function(d) { return y0(d) - y1(d); });
+
+var labels = vis.selectAll("text.label")
+    .data(data[0])
+  .enter().append("svg:text")
+    .attr("class", "label")
+    .attr("x", x)
+    .attr("y", h + 6)
+    .attr("dx", x({x: .45}))
+    .attr("dy", ".71em")
+    .attr("text-anchor", "middle")
+    .text(function(d, i) { return i; });
+
+vis.append("svg:line")
+    .attr("x1", 0)
+    .attr("x2", w - x({x: .1}))
+    .attr("y1", h)
+    .attr("y2", h);
+
+function transitionGroup() {
+  var group = d3.selectAll("#chart");
+
+  group.select("#group")
+      .attr("class", "first active");
+
+  group.select("#stack")
+      .attr("class", "last");
+
+  group.selectAll("g.layer rect")
+    .transition()
+      .duration(500)
+      .delay(function(d, i) { return (i % m) * 10; })
+      .attr("x", function(d, i) { return x({x: .9 * ~~(i / m) / n}); })
+      .attr("width", x({x: .9 / n}))
+      .each("end", transitionEnd);
+
+  function transitionEnd() {
+    d3.select(this)
+      .transition()
+        .duration(500)
+        .attr("y", function(d) { return h - y2(d); })
+        .attr("height", y2);
+  }
+}
+
+function transitionStack() {
+  var stack = d3.select("#chart");
+
+  stack.select("#group")
+      .attr("class", "first");
+
+  stack.select("#stack")
+      .attr("class", "last active");
+
+  stack.selectAll("g.layer rect")
+    .transition()
+      .duration(500)
+      .delay(function(d, i) { return (i % m) * 10; })
+      .attr("y", y1)
+      .attr("height", function(d) { return y0(d) - y1(d); })
+      .each("end", transitionEnd);
+
+  function transitionEnd() {
+    d3.select(this)
+      .transition()
+        .duration(500)
+        .attr("x", 0)
+        .attr("width", x({x: .9}));
+  }
+}
Index: Dev/branches/Demo/d3/examples/stream/stream.css
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stream.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stream.css	(revision 225)
@@ -0,0 +1,3 @@
+#chart {
+  font: 10px sans-serif;
+}
Index: Dev/branches/Demo/d3/examples/stream/stream.html
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stream.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stream.html	(revision 225)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Streamgraph</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <script type="text/javascript" src="stream_layers.js"></script>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+    <link type="text/css" rel="stylesheet" href="stream.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button class="first last" onclick="transition()">
+        Update
+      </button><p>
+    </div>
+    <script type="text/javascript" src="stream.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/stream/stream.js
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stream.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stream.js	(revision 225)
@@ -0,0 +1,42 @@
+var n = 20, // number of layers
+    m = 200, // number of samples per layer
+    data0 = d3.layout.stack().offset("wiggle")(stream_layers(n, m)),
+    data1 = d3.layout.stack().offset("wiggle")(stream_layers(n, m)),
+    color = d3.interpolateRgb("#aad", "#556");
+
+var w = 960,
+    h = 500,
+    mx = m - 1,
+    my = d3.max(data0.concat(data1), function(d) {
+      return d3.max(d, function(d) {
+        return d.y0 + d.y;
+      });
+    });
+
+var area = d3.svg.area()
+    .x(function(d) { return d.x * w / mx; })
+    .y0(function(d) { return h - d.y0 * h / my; })
+    .y1(function(d) { return h - (d.y + d.y0) * h / my; });
+
+var vis = d3.select("#chart")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h);
+
+vis.selectAll("path")
+    .data(data0)
+  .enter().append("svg:path")
+    .style("fill", function() { return color(Math.random()); })
+    .attr("d", area);
+
+function transition() {
+  d3.selectAll("path")
+      .data(function() {
+        var d = data1;
+        data1 = data0;
+        return data0 = d;
+      })
+    .transition()
+      .duration(2500)
+      .attr("d", area);
+}
Index: Dev/branches/Demo/d3/examples/stream/stream_layers.js
===================================================================
--- Dev/branches/Demo/d3/examples/stream/stream_layers.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/stream/stream_layers.js	(revision 225)
@@ -0,0 +1,33 @@
+/* Inspired by Lee Byron's test data generator. */
+function stream_layers(n, m, o) {
+  if (arguments.length < 3) o = 0;
+  function bump(a) {
+    var x = 1 / (.1 + Math.random()),
+        y = 2 * Math.random() - .5,
+        z = 10 / (.1 + Math.random());
+    for (var i = 0; i < m; i++) {
+      var w = (i / m - y) * z;
+      a[i] += x * Math.exp(-w * w);
+    }
+  }
+  return d3.range(n).map(function() {
+      var a = [], i;
+      for (i = 0; i < m; i++) a[i] = o + o * Math.random();
+      for (i = 0; i < 5; i++) bump(a);
+      return a.map(stream_index);
+    });
+}
+
+/* Another layer generator using gamma distributions. */
+function stream_waves(n, m) {
+  return d3.range(n).map(function(i) {
+    return d3.range(m).map(function(j) {
+        var x = 20 * j / m - i / 3;
+        return 2 * x * Math.exp(-.5 * x);
+      }).map(stream_index);
+    });
+}
+
+function stream_index(d, i) {
+  return {x: i, y: Math.max(0, d)};
+}
Index: Dev/branches/Demo/d3/examples/superformula/dot.html
===================================================================
--- Dev/branches/Demo/d3/examples/superformula/dot.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/superformula/dot.html	(revision 225)
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Dot Plot</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="superformula.js"></script>
+    <style type="text/css">
+
+body {
+  font: 10px sans-serif;
+}
+
+path.dot {
+  fill: white;
+  stroke-width: 1.5px;
+}
+
+rect {
+  fill: none;
+  stroke: black;
+  shape-rendering: crispEdges;
+}
+
+.x line, .y line {
+  stroke: #ccc;
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var data = d3.range(100).map(function(i) {
+  return {x: i / 99, y: Math.random()};
+});
+
+var w = 450,
+    h = 450,
+    p = 20,
+    x = d3.scale.linear().range([0, w]),
+    y = d3.scale.linear().range([h, 0]),
+    type = d3.scale.ordinal().range(superformulaTypes),
+    color = d3.scale.category10();
+
+var vis = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w + p * 2)
+    .attr("height", h + p * 2)
+  .append("svg:g")
+    .attr("transform", "translate(" + p + "," + p + ")");
+
+var xrule = vis.selectAll("g.x")
+    .data(x.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "x");
+
+xrule.append("svg:line")
+    .attr("x1", x)
+    .attr("x2", x)
+    .attr("y1", 0)
+    .attr("y2", h);
+
+xrule.append("svg:text")
+    .attr("x", x)
+    .attr("y", h + 3)
+    .attr("dy", ".71em")
+    .attr("text-anchor", "middle")
+    .text(x.tickFormat(10));
+
+var yrule = vis.selectAll("g.y")
+    .data(y.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "y");
+
+yrule.append("svg:line")
+    .attr("x1", 0)
+    .attr("x2", w)
+    .attr("y1", y)
+    .attr("y2", y);
+
+yrule.append("svg:text")
+    .attr("x", -3)
+    .attr("y", y)
+    .attr("dy", ".35em")
+    .attr("text-anchor", "end")
+    .text(y.tickFormat(10));
+
+vis.append("svg:rect")
+    .attr("width", w)
+    .attr("height", h);
+
+vis.selectAll("path.dot")
+    .data(data)
+  .enter().append("svg:path")
+    .attr("class", "dot")
+    .attr("stroke", function(d, i) { return color(i); })
+    .attr("transform", function(d) { return "translate(" + x(d.x) + "," + y(d.y) + ")"; })
+    .attr("d", superformula()
+    .type(function(d, i) { return type(i); }));
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/superformula/explorer.html
===================================================================
--- Dev/branches/Demo/d3/examples/superformula/explorer.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/superformula/explorer.html	(revision 225)
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+  <html>
+  <head>
+    <title>Superformula</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="superformula.js"></script>
+    <style type="text/css">
+
+path {
+  stroke-width: 1.5px;
+  stroke: #666;
+  fill: #ddd;
+}
+
+#controls {
+  position: absolute;
+  width: 240px;
+  font: 10px sans-serif;
+}
+
+#controls span, #controls label {
+  position: relative;
+  top: -5px;
+  padding: 5px;
+  display: inline-block;
+  width: 20px;
+}
+
+#controls button {
+  font: 10px sans-serif;
+  padding: 5px;
+  width: 70px;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="controls"></div>
+    <script type="text/javascript">
+
+var types = {
+  asterisk: {m: 12, n1: .3, n2: 0, n3: 10, a: 1, b: 1},
+  bean: {m: 2, n1: 1, n2: 4, n3: 8, a: 1, b: 1},
+  butterfly: {m: 3, n1: 1, n2: 6, n3: 2, a: .6, b: 1},
+  circle: {m: 4, n1: 2, n2: 2, n3: 2, a: 1, b: 1},
+  clover: {m: 6, n1: .3, n2: 0, n3: 10, a: 1, b: 1},
+  cloverFour: {m: 8, n1: 10, n2: -1, n3: -8, a: 1, b: 1},
+  cross: {m: 8, n1: 1.3, n2: .01, n3: 8, a: 1, b: 1},
+  diamond: {m: 4, n1: 1, n2: 1, n3: 1, a: 1, b: 1},
+  drop: {m: 1, n1: .5, n2: .5, n3: .5, a: 1, b: 1},
+  ellipse: {m: 4, n1: 2, n2: 2, n3: 2, a: 9, b: 6},
+  gear: {m: 19, n1: 100, n2: 50, n3: 50, a: 1, b: 1},
+  heart: {m: 1, n1: .8, n2: 1, n3: -8, a: 1, b: .18},
+  heptagon: {m: 7, n1: 1000, n2: 400, n3: 400, a: 1, b: 1},
+  hexagon: {m: 6, n1: 1000, n2: 400, n3: 400, a: 1, b: 1},
+  malteseCross: {m: 8, n1: .9, n2: .1, n3: 100, a: 1, b: 1},
+  pentagon: {m: 5, n1: 1000, n2: 600, n3: 600, a: 1, b: 1},
+  rectangle: {m: 4, n1: 100, n2: 100, n3: 100, a: 2, b: 1},
+  roundedStar: {m: 5, n1: 2, n2: 7, n3: 7, a: 1, b: 1},
+  square: {m: 4, n1: 100, n2: 100, n3: 100, a: 1, b: 1},
+  star: {m: 5, n1: 30, n2: 100, n3: 100, a: 1, b: 1},
+  triangle: {m: 3, n1: 100, n2: 200, n3: 200, a: 1, b: 1}
+};
+
+var format = d3.format(".4n"),
+    scale = d3.scale.linear().domain([-10, 20, 1000]).range([0, 800, 1000]);
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", 960)
+    .attr("height", 500);
+
+var shape = superformula()
+    .type("asterisk")
+    .size(100000)
+    .segments(3600);
+
+var path = svg.append("svg:path")
+    .attr("class", "big")
+    .attr("transform", "translate(480,250)")
+    .attr("d", shape);
+
+var control = d3.select("#controls").selectAll("div")
+    .data(d3.entries(types.asterisk))
+  .enter().append("div")
+    .attr("id", function(d) { return d.key; });
+
+control.append("label")
+    .text(function(d) { return d.key; });
+
+control.append("input")
+    .attr("type", "range")
+    .attr("max", 1000)
+    .attr("min", 0)
+    .property("value", function(d) { return scale(d.value); })
+    .on("change", function(d) {
+      var v = scale.invert(this.value);
+      path.attr("d", shape.param(d.key, v));
+      d3.select(this.nextSibling).text(format(v));
+    });
+
+control.append("span")
+    .text(function(d) { return format(d.value); });
+
+var types = d3.select("#controls").append("div").selectAll("button")
+    .data(d3.entries(types))
+  .enter().append("button")
+    .text(function(d) { return d.key; })
+    .on("click", function(d) {
+      for (var param in d.value) {
+        var control = d3.select("#" + param);
+        control.select("input").property("value", scale(d.value[param]));
+        control.select("span").text(format(d.value[param]));
+        shape.param(param, d.value[param]);
+      }
+      path.attr("d", shape);
+    });
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/superformula/superformula.html
===================================================================
--- Dev/branches/Demo/d3/examples/superformula/superformula.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/superformula/superformula.html	(revision 225)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+  <html>
+  <head>
+    <title>Superformula</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="superformula.js"></script>
+    <style type="text/css">
+
+path {
+  stroke-width: 1.5px;
+}
+
+path.small {
+  fill: steelblue;
+}
+
+path.big {
+  stroke: #666;
+  fill: #ddd;
+}
+
+path.small:hover {
+  stroke: steelblue;
+  fill: lightsteelblue;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var size = 1000;
+
+var x = d3.scale.ordinal()
+    .domain(superformulaTypes)
+    .rangePoints([0, 960], 1);
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", 960)
+    .attr("height", 500);
+
+var small = superformula()
+    .type(String)
+    .size(size);
+
+var big = superformula()
+    .type("square")
+    .size(size * 50)
+    .segments(360);
+
+svg.selectAll("a")
+    .data(superformulaTypes)
+  .enter().append("svg:a")
+    .attr("xlink:title", String)
+    .attr("transform", function(d, i) { return "translate("+ x(d) + ",40)"; })
+  .append("svg:path")
+    .attr("class", "small")
+    .attr("d", small)
+    .on("mousedown", function() { d3.select(this).style("fill", "aliceblue"); })
+    .on("mouseup", function() { d3.select(this).style("fill", null); })
+    .on("click", function(d) { d3.select(".big").transition().duration(500).attr("d", big.type(d)); });
+
+svg.append("svg:path")
+    .attr("class", "big")
+    .attr("transform", "translate(450,250)")
+    .attr("d", big);
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/superformula/superformula.js
===================================================================
--- Dev/branches/Demo/d3/examples/superformula/superformula.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/superformula/superformula.js	(revision 225)
@@ -0,0 +1,98 @@
+(function() {
+  var _symbol = d3.svg.symbol(),
+      _line = d3.svg.line();
+
+  superformula = function() {
+    var type = _symbol.type(),
+        size = _symbol.size(),
+        segments = size,
+        params = {};
+
+    function superformula(d, i) {
+      var n, p = _superformulaTypes[type.call(this, d, i)];
+      for (n in params) p[n] = params[n].call(this, d, i);
+      return _superformulaPath(p, segments.call(this, d, i), Math.sqrt(size.call(this, d, i)));
+    }
+
+    superformula.type = function(x) {
+      if (!arguments.length) return type;
+      type = d3.functor(x);
+      return superformula;
+    };
+
+    superformula.param = function(name, value) {
+      if (arguments.length < 2) return params[name];
+      params[name] = d3.functor(value);
+      return superformula;
+    };
+
+    // size of superformula in square pixels
+    superformula.size = function(x) {
+      if (!arguments.length) return size;
+      size = d3.functor(x);
+      return superformula;
+    };
+
+    // number of discrete line segments
+    superformula.segments = function(x) {
+      if (!arguments.length) return segments;
+      segments = d3.functor(x);
+      return superformula;
+    };
+
+    return superformula;
+  };
+
+  function _superformulaPath(params, n, diameter) {
+    var i = -1,
+        dt = 2 * Math.PI / n,
+        t,
+        r = 0,
+        x,
+        y,
+        points = [];
+
+    while (++i < n) {
+      t = params.m * (i * dt - Math.PI) / 4;
+      t = Math.pow(Math.abs(Math.pow(Math.abs(Math.cos(t) / params.a), params.n2)
+        + Math.pow(Math.abs(Math.sin(t) / params.b), params.n3)), -1 / params.n1);
+      if (t > r) r = t;
+      points.push(t);
+    }
+
+    r = diameter * Math.SQRT1_2 / r;
+    i = -1; while (++i < n) {
+      x = (t = points[i] * r) * Math.cos(i * dt);
+      y = t * Math.sin(i * dt);
+      points[i] = [Math.abs(x) < 1e-6 ? 0 : x, Math.abs(y) < 1e-6 ? 0 : y];
+    }
+
+    return _line(points) + "Z";
+  }
+
+  var _superformulaTypes = {
+    asterisk: {m: 12, n1: .3, n2: 0, n3: 10, a: 1, b: 1},
+    bean: {m: 2, n1: 1, n2: 4, n3: 8, a: 1, b: 1},
+    butterfly: {m: 3, n1: 1, n2: 6, n3: 2, a: .6, b: 1},
+    circle: {m: 4, n1: 2, n2: 2, n3: 2, a: 1, b: 1},
+    clover: {m: 6, n1: .3, n2: 0, n3: 10, a: 1, b: 1},
+    cloverFour: {m: 8, n1: 10, n2: -1, n3: -8, a: 1, b: 1},
+    cross: {m: 8, n1: 1.3, n2: .01, n3: 8, a: 1, b: 1},
+    diamond: {m: 4, n1: 1, n2: 1, n3: 1, a: 1, b: 1},
+    drop: {m: 1, n1: .5, n2: .5, n3: .5, a: 1, b: 1},
+    ellipse: {m: 4, n1: 2, n2: 2, n3: 2, a: 9, b: 6},
+    gear: {m: 19, n1: 100, n2: 50, n3: 50, a: 1, b: 1},
+    heart: {m: 1, n1: .8, n2: 1, n3: -8, a: 1, b: .18},
+    heptagon: {m: 7, n1: 1000, n2: 400, n3: 400, a: 1, b: 1},
+    hexagon: {m: 6, n1: 1000, n2: 400, n3: 400, a: 1, b: 1},
+    malteseCross: {m: 8, n1: .9, n2: .1, n3: 100, a: 1, b: 1},
+    pentagon: {m: 5, n1: 1000, n2: 600, n3: 600, a: 1, b: 1},
+    rectangle: {m: 4, n1: 100, n2: 100, n3: 100, a: 2, b: 1},
+    roundedStar: {m: 5, n1: 2, n2: 7, n3: 7, a: 1, b: 1},
+    square: {m: 4, n1: 100, n2: 100, n3: 100, a: 1, b: 1},
+    star: {m: 5, n1: 30, n2: 100, n3: 100, a: 1, b: 1},
+    triangle: {m: 3, n1: 100, n2: 200, n3: 200, a: 1, b: 1}
+  };
+
+  superformulaTypes = d3.keys(_superformulaTypes);
+})();
Index: Dev/branches/Demo/d3/examples/symbol-map/symbol-map.html
===================================================================
--- Dev/branches/Demo/d3/examples/symbol-map/symbol-map.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/symbol-map/symbol-map.html	(revision 225)
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>U.S. States</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geo.js"></script>
+    <style type="text/css">
+
+svg {
+  width: 960px;
+  height: 500px;
+}
+
+#states path, #state-centroids circle {
+  fill: #ccc;
+  stroke: #fff;
+  stroke-width: 1.5px;
+}
+
+#state-centroids circle {
+  fill: steelblue;
+  fill-opacity: .8;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+// The radius scale for the centroids.
+var r = d3.scale.sqrt()
+    .domain([0, 1e6])
+    .range([0, 10]);
+
+// Our projection.
+var xy = d3.geo.albersUsa();
+
+var svg = d3.select("body").append("svg:svg");
+svg.append("svg:g").attr("id", "states");
+svg.append("svg:g").attr("id", "state-centroids");
+
+d3.json("../data/us-states.json", function(collection) {
+  svg.select("#states")
+    .selectAll("path")
+      .data(collection.features)
+    .enter().append("svg:path")
+      .attr("d", d3.geo.path().projection(xy));
+});
+
+d3.json("../data/us-state-centroids.json", function(collection) {
+  svg.select("#state-centroids")
+    .selectAll("circle")
+      .data(collection.features
+      .sort(function(a, b) { return b.properties.population - a.properties.population; }))
+    .enter().append("svg:circle")
+      .attr("transform", function(d) { return "translate(" + xy(d.geometry.coordinates) + ")"; })
+      .attr("r", 0)
+    .transition()
+      .duration(1000)
+      .delay(function(d, i) { return i * 50; })
+      .attr("r", function(d) { return r(d.properties.population); });
+});
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/touch/touch.html
===================================================================
--- Dev/branches/Demo/d3/examples/touch/touch.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/touch/touch.html	(revision 225)
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta name="viewport" content="initial-scale=1,maximum-scale=1"/>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <style type="text/css">
+
+html, body {
+  height: 100%;
+}
+
+body {
+  margin: 0;
+}
+
+svg {
+  display: block;
+  overflow: hidden;
+  width: 100%;
+  height: 100%;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var color = d3.scale.category10();
+
+var svg = d3.select("body").append("svg:svg");
+
+d3.select("body")
+    .on("touchstart", touch)
+    .on("touchmove", touch)
+    .on("touchend", touch);
+
+function touch() {
+  d3.event.preventDefault();
+
+  var circle = svg.selectAll("circle.touch")
+      .data(d3.svg.touches(svg.node()), function(d) { return d.identifier; })
+      .attr("cx", function(d) { return d[0]; })
+      .attr("cy", function(d) { return d[1]; });
+
+  circle.enter().append("svg:circle")
+      .attr("class", "touch")
+      .attr("cx", function(d) { return d[0]; })
+      .attr("cy", function(d) { return d[1]; })
+      .style("fill", function(d) { return color(d.identifier); })
+      .attr("r", 1e-6)
+    .transition()
+      .duration(500)
+      .ease("elastic")
+      .attr("r", 48);
+
+  circle.exit()
+      .attr("class", null)
+    .transition()
+      .attr("r", 1e-6)
+      .remove();
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/tree/tree-dynamic.html
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree-dynamic.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree-dynamic.html	(revision 225)
@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Node-Link Tree</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+.node {
+  stroke: #fff;
+  stroke-width: 2px;
+}
+
+.link {
+  fill: none;
+  stroke: #000;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 500,
+    root = {},
+    data = [root],
+    tree = d3.layout.tree().size([w - 20, h - 20]),
+    diagonal = d3.svg.diagonal(),
+    duration = 750,
+    timer = setInterval(update, duration);
+
+var vis = d3.select("body").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(10, 10)");
+
+vis.selectAll("circle")
+    .data(tree(root))
+  .enter().append("svg:circle")
+    .attr("class", "node")
+    .attr("r", 3.5)
+    .attr("cx", x)
+    .attr("cy", y);
+
+function update() {
+  if (data.length >= 500) return clearInterval(timer);
+
+  // Add a new datum to a random parent.
+  var d = {id: data.length}, parent = data[~~(Math.random() * data.length)];
+  if (parent.children) parent.children.push(d); else parent.children = [d];
+  data.push(d);
+
+  // Compute the new tree layout. We'll stash the old layout in the data.
+  var nodes = tree.nodes(root);
+
+  // Update the nodesâŠ
+  var node = vis.selectAll("circle.node")
+      .data(nodes, function(d) { return d.id; });
+
+  // Enter any new nodes at the parent's previous position.
+  node.enter().append("svg:circle")
+      .attr("class", "node")
+      .attr("r", 3.5)
+      .attr("cx", function(d) { return d.parent.x0; })
+      .attr("cy", function(d) { return d.parent.y0; })
+    .transition()
+      .duration(duration)
+      .attr("cx", x)
+      .attr("cy", y);
+
+  // Transition nodes to their new position.
+  node.transition()
+      .duration(duration)
+      .attr("cx", x)
+      .attr("cy", y);
+
+  // Update the linksâŠ
+  var link = vis.selectAll("path.link")
+      .data(tree.links(nodes), function(d) { return d.target.id; });
+
+  // Enter any new links at the parent's previous position.
+  link.enter().insert("svg:path", "circle")
+      .attr("class", "link")
+      .attr("d", function(d) {
+        var o = {x: d.source.x0, y: d.source.y0};
+        return diagonal({source: o, target: o});
+      })
+    .transition()
+      .duration(duration)
+      .attr("d", diagonal);
+
+  // Transition links to their new position.
+  link.transition()
+      .duration(duration)
+      .attr("d", diagonal);
+}
+
+function x(d) {
+  return d.x0 = d.x;
+}
+
+function y(d) {
+  return d.y0 = d.y;
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/tree/tree-interactive.html
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree-interactive.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree-interactive.html	(revision 225)
@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Node-Link Tree</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+circle.node {
+  cursor: pointer;
+  fill: #fff;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+path.link {
+  fill: none;
+  stroke: #ccc;
+  stroke-width: 1.5px;
+}
+
+    </style>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript">
+
+var w = 960,
+    h = 2000,
+    i = 0,
+    duration = 500,
+    root;
+
+var tree = d3.layout.tree()
+    .size([h, w - 160]);
+
+var diagonal = d3.svg.diagonal()
+    .projection(function(d) { return [d.y, d.x]; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(40,0)");
+
+d3.json("../data/flare.json", function(json) {
+  json.x0 = 800;
+  json.y0 = 0;
+  update(root = json);
+});
+
+function update(source) {
+
+  // Compute the new tree layout.
+  var nodes = tree.nodes(root).reverse();
+
+  // Update the nodesâŠ
+  var node = vis.selectAll("circle.node")
+      .data(nodes, function(d) { return d.id || (d.id = ++i); });
+
+  // Enter any new nodes at the parent's previous position.
+  node.enter().append("svg:circle")
+      .attr("class", "node")
+      .attr("cx", function(d) { return source.y0; })
+      .attr("cy", function(d) { return source.x0; })
+      .attr("r", 4.5)
+      .style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; })
+      .on("click", click)
+    .transition()
+      .duration(duration)
+      .attr("cx", function(d) { return d.y; })
+      .attr("cy", function(d) { return d.x; });
+
+  // Transition nodes to their new position.
+  node.transition()
+      .duration(duration)
+      .attr("cx", function(d) { return d.y; })
+      .attr("cy", function(d) { return d.x; })
+      .style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; });
+
+  // Transition exiting nodes to the parent's new position.
+  node.exit().transition()
+      .duration(duration)
+      .attr("cx", function(d) { return source.y; })
+      .attr("cy", function(d) { return source.x; })
+      .remove();
+
+  // Update the linksâŠ
+  var link = vis.selectAll("path.link")
+      .data(tree.links(nodes), function(d) { return d.target.id; });
+
+  // Enter any new links at the parent's previous position.
+  link.enter().insert("svg:path", "circle")
+      .attr("class", "link")
+      .attr("d", function(d) {
+        var o = {x: source.x0, y: source.y0};
+        return diagonal({source: o, target: o});
+      })
+    .transition()
+      .duration(duration)
+      .attr("d", diagonal);
+
+  // Transition links to their new position.
+  link.transition()
+      .duration(duration)
+      .attr("d", diagonal);
+
+  // Transition exiting nodes to the parent's new position.
+  link.exit().transition()
+      .duration(duration)
+      .attr("d", function(d) {
+        var o = {x: source.x, y: source.y};
+        return diagonal({source: o, target: o});
+      })
+      .remove();
+
+  // Stash the old positions for transition.
+  nodes.forEach(function(d) {
+    d.x0 = d.x;
+    d.y0 = d.y;
+  });
+}
+
+// Toggle children on click.
+function click(d) {
+  if (d.children) {
+    d._children = d.children;
+    d.children = null;
+  } else {
+    d.children = d._children;
+    d._children = null;
+  }
+  update(d);
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/tree/tree-radial.html
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree-radial.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree-radial.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Node-Link Tree (Radial)</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="tree.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="tree-radial.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/tree/tree-radial.js
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree-radial.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree-radial.js	(revision 225)
@@ -0,0 +1,40 @@
+var r = 960 / 2;
+
+var tree = d3.layout.tree()
+    .size([360, r - 120])
+    .separation(function(a, b) { return (a.parent == b.parent ? 1 : 2) / a.depth; });
+
+var diagonal = d3.svg.diagonal.radial()
+    .projection(function(d) { return [d.y, d.x / 180 * Math.PI]; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", r * 2)
+    .attr("height", r * 2 - 150)
+  .append("svg:g")
+    .attr("transform", "translate(" + r + "," + r + ")");
+
+d3.json("../data/flare.json", function(json) {
+  var nodes = tree.nodes(json);
+
+  var link = vis.selectAll("path.link")
+      .data(tree.links(nodes))
+    .enter().append("svg:path")
+      .attr("class", "link")
+      .attr("d", diagonal);
+
+  var node = vis.selectAll("g.node")
+      .data(nodes)
+    .enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; })
+
+  node.append("svg:circle")
+      .attr("r", 4.5);
+
+  node.append("svg:text")
+      .attr("dx", function(d) { return d.x < 180 ? 8 : -8; })
+      .attr("dy", ".31em")
+      .attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; })
+      .attr("transform", function(d) { return d.x < 180 ? null : "rotate(180)"; })
+      .text(function(d) { return d.name; });
+});
Index: Dev/branches/Demo/d3/examples/tree/tree.css
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree.css	(revision 225)
@@ -0,0 +1,15 @@
+.node circle {
+  fill: #fff;
+  stroke: steelblue;
+  stroke-width: 1.5px;
+}
+
+.node {
+  font: 10px sans-serif;
+}
+
+.link {
+  fill: none;
+  stroke: #ccc;
+  stroke-width: 1.5px;
+}
Index: Dev/branches/Demo/d3/examples/tree/tree.html
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Node-Link Tree</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="tree.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="tree.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/tree/tree.js
===================================================================
--- Dev/branches/Demo/d3/examples/tree/tree.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/tree/tree.js	(revision 225)
@@ -0,0 +1,39 @@
+var w = 960,
+    h = 2000;
+
+var tree = d3.layout.tree()
+    .size([h, w - 160]);
+
+var diagonal = d3.svg.diagonal()
+    .projection(function(d) { return [d.y, d.x]; });
+
+var vis = d3.select("#chart").append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(40, 0)");
+
+d3.json("../data/flare.json", function(json) {
+  var nodes = tree.nodes(json);
+
+  var link = vis.selectAll("path.link")
+      .data(tree.links(nodes))
+    .enter().append("svg:path")
+      .attr("class", "link")
+      .attr("d", diagonal);
+
+  var node = vis.selectAll("g.node")
+      .data(nodes)
+    .enter().append("svg:g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; })
+
+  node.append("svg:circle")
+      .attr("r", 4.5);
+
+  node.append("svg:text")
+      .attr("dx", function(d) { return d.children ? -8 : 8; })
+      .attr("dy", 3)
+      .attr("text-anchor", function(d) { return d.children ? "end" : "start"; })
+      .text(function(d) { return d.name; });
+});
Index: Dev/branches/Demo/d3/examples/treemap/treemap-svg.html
===================================================================
--- Dev/branches/Demo/d3/examples/treemap/treemap-svg.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/treemap/treemap-svg.html	(revision 225)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <style type="text/css">
+
+rect {
+  fill: none;
+  stroke: #fff;
+}
+
+text {
+  font: 10px sans-serif;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript" src="treemap-svg.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/treemap/treemap-svg.js
===================================================================
--- Dev/branches/Demo/d3/examples/treemap/treemap-svg.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/treemap/treemap-svg.js	(revision 225)
@@ -0,0 +1,34 @@
+var w = 960,
+    h = 500,
+    color = d3.scale.category20c();
+
+var treemap = d3.layout.treemap()
+    .padding(4)
+    .size([w, h])
+    .value(function(d) { return d.size; });
+
+var svg = d3.select("body").append("svg:svg")
+    .style("width", w)
+    .style("height", h)
+  .append("svg:g")
+    .attr("transform", "translate(-.5,-.5)");
+
+d3.json("../data/flare.json", function(json) {
+  var cell = svg.data([json]).selectAll("g")
+      .data(treemap)
+    .enter().append("svg:g")
+      .attr("class", "cell")
+      .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
+
+  cell.append("svg:rect")
+      .attr("width", function(d) { return d.dx; })
+      .attr("height", function(d) { return d.dy; })
+      .style("fill", function(d) { return d.children ? color(d.data.name) : null; });
+
+  cell.append("svg:text")
+      .attr("x", function(d) { return d.dx / 2; })
+      .attr("y", function(d) { return d.dy / 2; })
+      .attr("dy", ".35em")
+      .attr("text-anchor", "middle")
+      .text(function(d) { return d.children ? null : d.data.name; });
+});
Index: Dev/branches/Demo/d3/examples/treemap/treemap.css
===================================================================
--- Dev/branches/Demo/d3/examples/treemap/treemap.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/treemap/treemap.css	(revision 225)
@@ -0,0 +1,8 @@
+.cell {
+  border: solid 1px white;
+  font: 10px sans-serif;
+  line-height: 12px;
+  overflow: hidden;
+  position: absolute;
+  text-indent: 2px;
+}
Index: Dev/branches/Demo/d3/examples/treemap/treemap.html
===================================================================
--- Dev/branches/Demo/d3/examples/treemap/treemap.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/treemap/treemap.html	(revision 225)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Treemap</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.layout.js"></script>
+    <link type="text/css" rel="stylesheet" href="treemap.css"/>
+    <link type="text/css" rel="stylesheet" href="../button.css"/>
+  </head>
+  <body>
+    <div id="chart">
+      <button id="size" class="first active">
+        Size
+      </button
+      ><button id="count" class="last">
+        Count
+      </button><p>
+    </div>
+    <script type="text/javascript" src="treemap.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/treemap/treemap.js
===================================================================
--- Dev/branches/Demo/d3/examples/treemap/treemap.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/treemap/treemap.js	(revision 225)
@@ -0,0 +1,53 @@
+var w = 960,
+    h = 500,
+    color = d3.scale.category20c();
+
+var treemap = d3.layout.treemap()
+    .size([w, h])
+    .sticky(true)
+    .value(function(d) { return d.size; });
+
+var div = d3.select("#chart").append("div")
+    .style("position", "relative")
+    .style("width", w + "px")
+    .style("height", h + "px");
+
+d3.json("../data/flare.json", function(json) {
+  div.data([json]).selectAll("div")
+      .data(treemap.nodes)
+    .enter().append("div")
+      .attr("class", "cell")
+      .style("background", function(d) { return d.children ? color(d.name) : null; })
+      .call(cell)
+      .text(function(d) { return d.children ? null : d.name; });
+
+  d3.select("#size").on("click", function() {
+    div.selectAll("div")
+        .data(treemap.value(function(d) { return d.size; }))
+      .transition()
+        .duration(1500)
+        .call(cell);
+
+    d3.select("#size").classed("active", true);
+    d3.select("#count").classed("active", false);
+  });
+
+  d3.select("#count").on("click", function() {
+    div.selectAll("div")
+        .data(treemap.value(function(d) { return 1; }))
+      .transition()
+        .duration(1500)
+        .call(cell);
+
+    d3.select("#size").classed("active", false);
+    d3.select("#count").classed("active", true);
+  });
+});
+
+function cell() {
+  this
+      .style("left", function(d) { return d.x + "px"; })
+      .style("top", function(d) { return d.y + "px"; })
+      .style("width", function(d) { return d.dx - 1 + "px"; })
+      .style("height", function(d) { return d.dy - 1 + "px"; });
+}
Index: Dev/branches/Demo/d3/examples/voroboids/boid.js
===================================================================
--- Dev/branches/Demo/d3/examples/voroboids/boid.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/voroboids/boid.js	(revision 225)
@@ -0,0 +1,235 @@
+// Boid flocking based on http://harry.me/2011/02/17/neat-algorithms---flocking
+var boid = (function() {
+  function boid() {
+    var position = [0, 0],
+        velocity = [0, 0],
+        gravityCenter = null,
+        neighborRadius = 50,
+        maxForce = .1,
+        maxSpeed = 1,
+        separationWeight = 2,
+        alignmentWeight = 1,
+        cohesionWeight = 1,
+        desiredSeparation = 10;
+
+    function boid(neighbors) {
+      var accel = flock(neighbors);
+      d3_ai_boidWrap(position);
+      velocity[0] += accel[0];
+      velocity[1] += accel[1];
+      if (gravityCenter) {
+        var g = d3_ai_boidGravity(gravityCenter, position, neighborRadius);
+        velocity[0] += g[0];
+        velocity[1] += g[1];
+      }
+      d3_ai_boidLimit(velocity, maxSpeed);
+      position[0] += velocity[0];
+      position[1] += velocity[1];
+      return position;
+    }
+
+    function flock(neighbors) {
+      var separation = [0, 0],
+          alignment = [0, 0],
+          cohesion = [0, 0],
+          separationCount = 0,
+          alignmentCount = 0,
+          cohesionCount = 0,
+          i = -1,
+          l = neighbors.length;
+      while (++i < l) {
+        var n = neighbors[i];
+        if (n === this) continue;
+        var npos = n.position(),
+            d = d3_ai_boidDistance(position, npos);
+        if (d > 0) {
+          if (d < desiredSeparation) {
+            var tmp = d3_ai_boidNormalize(d3_ai_boidSubtract(position.slice(), npos));
+            separation[0] += tmp[0] / d;
+            separation[1] += tmp[1] / d;
+            separationCount++;
+          }
+          if (d < neighborRadius) {
+            var nvel = n.velocity();
+            alignment[0] += nvel[0];
+            alignment[1] += nvel[1];
+            alignmentCount++;
+            cohesion[0] += npos[0];
+            cohesion[1] += npos[1];
+            cohesionCount++;
+          }
+        }
+      }
+
+      if (separationCount > 0) {
+        separation[0] /= separationCount;
+        separation[1] /= separationCount;
+      }
+
+      if (alignmentCount > 0) {
+        alignment[0] /= alignmentCount;
+        alignment[1] /= alignmentCount;
+      }
+      d3_ai_boidLimit(alignment, maxForce);
+
+      if (cohesionCount > 0) {
+        cohesion[0] /= cohesionCount;
+        cohesion[1] /= cohesionCount;
+      } else {
+        cohesion = position.slice();
+      }
+      cohesion = steerTo(cohesion);
+
+      return [
+        separation[0] * separationWeight +
+         alignment[0] * alignmentWeight +
+          cohesion[0] * cohesionWeight,
+        separation[1] * separationWeight +
+         alignment[1] * alignmentWeight +
+          cohesion[1] * cohesionWeight
+      ];
+    }
+
+    function steerTo(target) {
+      var desired = d3_ai_boidSubtract(target, position),
+          d = d3_ai_boidMagnitude(desired);
+
+      if (d > 0) {
+        d3_ai_boidNormalize(desired);
+
+        // Two options for desired vector magnitude (1 -- based on distance, 2 -- maxspeed)
+        var mul = maxSpeed * (d < 100 ? d / 100 : 1);
+        desired[0] *= mul;
+        desired[1] *= mul;
+
+        // Steering = Desired minus Velocity
+        var steer = d3_ai_boidSubtract(desired, velocity);
+        d3_ai_boidLimit(steer, maxForce)  // Limit to maximum steering force
+      } else {
+        steer = [0, 0];
+      }
+      return steer;
+    }
+
+    boid.position = function(x) {
+      if (!arguments.length) return position;
+      position = x;
+      return boid;
+    }
+
+    boid.velocity = function(x) {
+      if (!arguments.length) return velocity;
+      velocity = x;
+      return boid;
+    }
+
+    boid.gravityCenter = function(x) {
+      if (!arguments.length) return gravityCenter;
+      gravityCenter = x;
+      return boid;
+    }
+
+    boid.neighborRadius = function(x) {
+      if (!arguments.length) return neighborRadius;
+      neighborRadius = x;
+      return boid;
+    }
+
+    boid.maxForce = function(x) {
+      if (!arguments.length) return maxForce;
+      maxForce = x;
+      return boid;
+    }
+
+    boid.maxSpeed = function(x) {
+      if (!arguments.length) return maxSpeed;
+      maxSpeed = x;
+      return boid;
+    }
+
+    boid.separationWeight = function(x) {
+      if (!arguments.length) return separationWeight;
+      separationWeight = x;
+      return boid;
+    }
+
+    boid.alignmentWeight = function(x) {
+      if (!arguments.length) return alignmentWeight;
+      alignmentWeight = x;
+      return boid;
+    }
+
+    boid.cohesionWeight = function(x) {
+      if (!arguments.length) return cohesionWeight;
+      cohesionWeight = x;
+      return boid;
+    }
+
+    boid.desiredSeparation = function(x) {
+      if (!arguments.length) return desiredSeparation;
+      desiredSeparation = x;
+      return boid;
+    }
+
+    return boid;
+  }
+
+  function d3_ai_boidNormalize(a) {
+    var m = d3_ai_boidMagnitude(a);
+    if (m > 0) {
+      a[0] /= m;
+      a[1] /= m;
+    }
+    return a;
+  }
+
+  function d3_ai_boidWrap(position) {
+    if (position[0] > w) position[0] = 0;
+    else if (position[0] < 0) position[0] = w;
+    if (position[1] > h) position[1] = 0;
+    else if (position[1] < 0) position[1] = h;
+  }
+
+  function d3_ai_boidGravity(center, position, neighborRadius) {
+    if (center[0] != null) {
+      var m = d3_ai_boidSubtract(center.slice(), position),
+          d = d3_ai_boidMagnitude(m) - 10;
+      if (d > 0 && d < neighborRadius * 5) {
+        d3_ai_boidNormalize(m);
+        m[0] /= d;
+        m[1] /= d;
+        return m;
+      }
+    }
+    return [0, 0];
+  }
+
+  function d3_ai_boidDistance(a, b) {
+    var dx = a[0] - b[0],
+        dy = a[1] - b[1];
+    if (dx > w / 2) dx = w - dx;
+    if (dy > h / 2) dy = h - dy;
+    return Math.sqrt(dx * dx + dy * dy);
+  }
+
+  function d3_ai_boidSubtract(a, b) {
+    a[0] -= b[0];
+    a[1] -= b[1];
+    return a;
+  }
+
+  function d3_ai_boidMagnitude(v) {
+    return Math.sqrt(v[0] * v[0] + v[1] * v[1]);
+  }
+
+  function d3_ai_boidLimit(a, max) {
+    if (d3_ai_boidMagnitude(a) > max) {
+      d3_ai_boidNormalize(a);
+      a[0] *= max;
+      a[1] *= max;
+    }
+    return a;
+  }
+
+  return boid;
+})();
Index: Dev/branches/Demo/d3/examples/voroboids/voroboids.css
===================================================================
--- Dev/branches/Demo/d3/examples/voroboids/voroboids.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/voroboids/voroboids.css	(revision 225)
@@ -0,0 +1,15 @@
+svg {
+  display: block;
+  border: solid 1px #666;
+  overflow: hidden;
+}
+
+path {
+  stroke: #000;
+  stroke-width: .5px;
+}
+
+circle {
+  fill: none;
+  stroke: #fff;
+}
Index: Dev/branches/Demo/d3/examples/voroboids/voroboids.html
===================================================================
--- Dev/branches/Demo/d3/examples/voroboids/voroboids.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/voroboids/voroboids.html	(revision 225)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Voroboids</title>
+    <link type="text/css" rel="stylesheet" href="voroboids.css"/>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+  </head>
+  <body>
+    <div id="vis"></div>
+    <script type="text/javascript" src="boid.js"></script>
+    <script type="text/javascript" src="voroboids.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/voroboids/voroboids.js
===================================================================
--- Dev/branches/Demo/d3/examples/voroboids/voroboids.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/voroboids/voroboids.js	(revision 225)
@@ -0,0 +1,65 @@
+var w = 960,
+    h = 500,
+    mouse = [null, null],
+    fill = d3.scale.linear().domain([0, 1e4]).range(["brown", "steelblue"]);
+
+// Initialise boids.
+var boids = d3.range(100).map(function() {
+  return boid()
+      .position([Math.random() * w, Math.random() * h])
+      .velocity([Math.random() * 2 - 1, Math.random() * 2 - 1])
+      .gravityCenter(mouse);
+});
+
+// Compute initial positions.
+var vertices = boids.map(function(boid) {
+  return boid(boids);
+});
+
+d3.select(window).on("blur", nullGravity);
+
+var svg = d3.select("#vis")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+    .attr("class", "PiYG")
+    .on("mousemove", function() {
+      var m = d3.svg.mouse(this);
+      mouse[0] = m[0];
+      mouse[1] = m[1];
+    })
+    .on("mouseout", nullGravity);
+
+svg.selectAll("path")
+    .data(d3.geom.voronoi(vertices))
+  .enter().append("svg:path")
+    .attr("class", function(d, i) { return i ? "q" + (i % 9) + "-9" : null; })
+    .attr("d", function(d) { return "M" + d.join("L") + "Z"; });
+
+svg.selectAll("circle")
+    .data(vertices)
+  .enter().append("svg:circle")
+    .attr("transform", function(d) { return "translate(" + d + ")"; })
+    .attr("r", 2);
+
+d3.timer(function() {
+  // Update boid positions.
+  boids.forEach(function(boid, i) {
+    vertices[i] = boid(boids);
+  });
+
+  // Update circle positions.
+  svg.selectAll("circle")
+      .data(vertices)
+      .attr("transform", function(d) { return "translate(" + d + ")"; });
+
+  // Update voronoi diagram.
+  svg.selectAll("path")
+      .data(d3.geom.voronoi(vertices))
+      .attr("d", function(d) { return "M" + d.join("L") + "Z"; })
+      .style("fill", function(d) { return fill((d3.geom.polygon(d).area())); });
+});
+
+function nullGravity() {
+  mouse[0] = mouse[1] = null;
+}
Index: Dev/branches/Demo/d3/examples/voronoi/voronoi.css
===================================================================
--- Dev/branches/Demo/d3/examples/voronoi/voronoi.css	(revision 225)
+++ Dev/branches/Demo/d3/examples/voronoi/voronoi.css	(revision 225)
@@ -0,0 +1,16 @@
+svg {
+  border: solid 1px #666;
+  overflow: hidden;
+}
+
+path {
+  fill: yellow;
+  stroke: #000;
+  stroke-width: .5px;
+}
+
+circle {
+  fill: #ccc;
+  stroke: #000;
+  pointer-events: none;
+}
Index: Dev/branches/Demo/d3/examples/voronoi/voronoi.html
===================================================================
--- Dev/branches/Demo/d3/examples/voronoi/voronoi.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/voronoi/voronoi.html	(revision 225)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Voronoi Tesselation</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.geom.js"></script>
+    <link type="text/css" rel="stylesheet" href="../../lib/colorbrewer/colorbrewer.css"/>
+    <link type="text/css" rel="stylesheet" href="voronoi.css"/>
+  </head>
+  <body>
+    <div id="chart"></div>
+    <script type="text/javascript" src="voronoi.js"></script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/voronoi/voronoi.js
===================================================================
--- Dev/branches/Demo/d3/examples/voronoi/voronoi.js	(revision 225)
+++ Dev/branches/Demo/d3/examples/voronoi/voronoi.js	(revision 225)
@@ -0,0 +1,34 @@
+var w = 960,
+    h = 500;
+
+var vertices = d3.range(100).map(function(d) {
+  return [Math.random() * w, Math.random() * h];
+});
+
+var svg = d3.select("#chart")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h)
+    .attr("class", "PiYG")
+    .on("mousemove", update);
+
+svg.selectAll("path")
+    .data(d3.geom.voronoi(vertices))
+  .enter().append("svg:path")
+    .attr("class", function(d, i) { return i ? "q" + (i % 9) + "-9" : null; })
+    .attr("d", function(d) { return "M" + d.join("L") + "Z"; });
+
+svg.selectAll("circle")
+    .data(vertices.slice(1))
+  .enter().append("svg:circle")
+    .attr("transform", function(d) { return "translate(" + d + ")"; })
+    .attr("r", 2);
+
+function update() {
+  vertices[0] = d3.svg.mouse(this);
+  svg.selectAll("path")
+      .data(d3.geom.voronoi(vertices)
+      .map(function(d) { return "M" + d.join("L") + "Z"; }))
+      .filter(function(d) { return this.getAttribute("d") != d; })
+      .attr("d", function(d) { return d; });
+}
Index: Dev/branches/Demo/d3/examples/zoom-pan/zoom-pan-transform.html
===================================================================
--- Dev/branches/Demo/d3/examples/zoom-pan/zoom-pan-transform.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/zoom-pan/zoom-pan-transform.html	(revision 225)
@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Zoom + Pan</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.behavior.js"></script>
+    <style type="text/css">
+
+svg {
+  font: 10px sans-serif;
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var size = [710, 500], // width height
+    padding = [4, 4, 20, 40], // top right bottom left
+    tx = function(d) { return "translate(" + x(d) + ",0)"; },
+    ty = function(d) { return "translate(0," + y(d) + ")"; },
+    stroke = function(d) { return d ? "#ccc" : "#666"; };
+
+// x-scale (1.42 = 710/500)
+var x = d3.scale.linear()
+    .domain([-1.42, +1.42])
+    .range([0, size[0]]);
+
+// y-scale (inverted domain)
+var y = d3.scale.linear()
+    .domain([+1.00, -1.00])
+    .range([0, size[1]]);
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", size[0] + padding[3] + padding[1])
+    .attr("height", size[1] + padding[0] + padding[2])
+    .attr("pointer-events", "all")
+  .append("svg:g")
+    .attr("transform", "translate(" + padding[3] + "," + padding[0] + ")")
+    .call(d3.behavior.zoom().on("zoom", redraw))
+  .append("svg:g");
+
+// Generate x-ticksâŠ
+var gx = svg.selectAll("g.x")
+    .data(x.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "x")
+    .attr("transform", tx);
+
+gx.append("svg:line")
+    .attr("stroke", stroke)
+    .attr("y1", 0)
+    .attr("y2", size[1]);
+
+gx.append("svg:text")
+    .attr("y", size[1])
+    .attr("dy", "1em")
+    .attr("text-anchor", "middle")
+    .text(x.tickFormat(10));
+
+// Generate y-ticksâŠ
+var gy = svg.selectAll("g.y")
+    .data(y.ticks(10))
+  .enter().append("svg:g")
+    .attr("class", "y")
+    .attr("transform", ty);
+
+gy.append("svg:line")
+    .attr("stroke", stroke)
+    .attr("x1", 0)
+    .attr("x2", size[0]);
+
+gy.append("svg:text")
+    .attr("x", -3)
+    .attr("dy", ".35em")
+    .attr("text-anchor", "end")
+    .text(y.tickFormat(10));
+
+svg.append("svg:rect")
+    .attr("width", size[0])
+    .attr("height", size[1])
+    .attr("stroke", stroke)
+    .attr("fill", "none");
+
+function redraw() {
+  svg.attr("transform",
+      "translate(" + d3.event.translate + ")"
+      + "scale(" + d3.event.scale + ")");
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/zoom-pan/zoom-pan.html
===================================================================
--- Dev/branches/Demo/d3/examples/zoom-pan/zoom-pan.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/zoom-pan/zoom-pan.html	(revision 225)
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Zoom + Pan</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.behavior.js"></script>
+    <style type="text/css">
+
+svg {
+  font: 10px sans-serif;
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var size = [710, 500], // width height
+    padding = [4, 4, 20, 40], // top right bottom left
+    tx = function(d) { return "translate(" + x(d) + ",0)"; },
+    ty = function(d) { return "translate(0," + y(d) + ")"; },
+    stroke = function(d) { return d ? "#ccc" : "#666"; };
+
+// x-scale (1.42 = 710/500)
+var x = d3.scale.linear()
+    .domain([-1.42, +1.42])
+    .range([0, size[0]]);
+
+// y-scale (inverted domain)
+var y = d3.scale.linear()
+    .domain([+1.00, -1.00])
+    .range([0, size[1]]);
+
+var svg = d3.select("body").append("svg:svg")
+    .attr("width", size[0] + padding[3] + padding[1])
+    .attr("height", size[1] + padding[0] + padding[2])
+    .attr("pointer-events", "all")
+  .append("svg:g")
+    .attr("transform", "translate(" + padding[3] + "," + padding[0] + ")")
+    .call(d3.behavior.zoom().on("zoom", redraw));
+
+svg.append("svg:rect")
+    .attr("width", size[0])
+    .attr("height", size[1])
+    .attr("stroke", stroke)
+    .attr("fill", "none");
+
+redraw();
+
+function redraw() {
+  if (d3.event) d3.event.transform(x, y);
+
+  var fx = x.tickFormat(10),
+      fy = y.tickFormat(10);
+
+  // Regenerate x-ticksâŠ
+  var gx = svg.selectAll("g.x")
+      .data(x.ticks(10), String)
+      .attr("transform", tx);
+
+  gx.select("text")
+      .text(fx);
+
+  var gxe = gx.enter().insert("svg:g", "rect")
+      .attr("class", "x")
+      .attr("transform", tx);
+
+  gxe.append("svg:line")
+      .attr("stroke", stroke)
+      .attr("y1", 0)
+      .attr("y2", size[1]);
+
+  gxe.append("svg:text")
+      .attr("y", size[1])
+      .attr("dy", "1em")
+      .attr("text-anchor", "middle")
+      .text(fx);
+
+  gx.exit().remove();
+
+  // Regenerate y-ticksâŠ
+  var gy = svg.selectAll("g.y")
+      .data(y.ticks(10), String)
+      .attr("transform", ty);
+
+  gy.select("text")
+      .text(fy);
+
+  var gye = gy.enter().insert("svg:g", "rect")
+      .attr("class", "y")
+      .attr("transform", ty);
+
+  gye.append("svg:line")
+      .attr("stroke", stroke)
+      .attr("x1", 0)
+      .attr("x2", size[0]);
+
+  gye.append("svg:text")
+      .attr("x", -3)
+      .attr("dy", ".35em")
+      .attr("text-anchor", "end")
+      .text(fy);
+
+  gy.exit().remove();
+
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/examples/zoom/dji.csv
===================================================================
--- Dev/branches/Demo/d3/examples/zoom/dji.csv	(revision 225)
+++ Dev/branches/Demo/d3/examples/zoom/dji.csv	(revision 225)
@@ -0,0 +1,5233 @@
+Date,Open,High,Low,Close,Volume,Adj Close
+2010-10-01,10789.72,10907.41,10759.14,10829.68,4298910000,10829.68
+2010-09-30,10835.96,10960.99,10732.27,10788.05,4284160000,10788.05
+2010-09-29,10857.98,10901.96,10759.75,10835.28,3990280000,10835.28
+2010-09-28,10809.85,10905.44,10714.03,10858.14,4025840000,10858.14
+2010-09-27,10860.03,10902.52,10776.44,10812.04,3587860000,10812.04
+2010-09-24,10664.39,10897.83,10664.39,10860.26,4123950000,10860.26
+2010-09-23,10738.48,10779.65,10610.12,10662.42,3847850000,10662.42
+2010-09-22,10761.11,10829.75,10682.40,10739.31,3911070000,10739.31
+2010-09-21,10753.39,10844.89,10674.83,10761.03,4175660000,10761.03
+2010-09-20,10608.08,10783.51,10594.38,10753.62,3364080000,10753.62
+2010-09-17,10595.44,10689.29,10529.67,10607.85,4086140000,10607.85
+2010-09-16,10571.75,10624.58,10499.43,10594.83,3364080000,10594.83
+2010-09-15,10526.42,10609.21,10453.15,10572.73,3369840000,10572.73
+2010-09-14,10544.81,10622.69,10460.34,10526.49,4521050000,10526.49
+2010-09-13,10458.60,10605.73,10458.45,10544.13,4521050000,10544.13
+2010-09-10,10415.01,10502.80,10376.34,10462.77,3061160000,10462.77
+2010-09-09,10388.22,10515.86,10359.23,10415.24,3387770000,10415.24
+2010-09-08,10338.57,10460.50,10318.93,10387.01,3224640000,10387.01
+2010-09-07,10446.80,10448.99,10304.44,10340.69,3107380000,10340.69
+2010-09-03,10321.92,10484.71,10321.92,10447.93,3534500000,10447.93
+2010-09-02,10270.08,10350.98,10211.80,10320.10,3704210000,10320.10
+2010-09-01,10016.01,10305.87,10016.01,10269.47,4396880000,10269.47
+2010-08-31,10006.42,10101.53,9915.73,10014.72,4038770000,10014.72
+2010-08-30,10145.58,10170.10,10005.56,10009.73,2917990000,10009.73
+2010-08-27,9982.40,10176.30,9925.11,10150.65,4102460000,10150.65
+2010-08-26,10059.83,10138.12,9959.17,9985.81,3646710000,9985.81
+2010-08-25,10040.15,10104.18,9925.34,10060.06,4360190000,10060.06
+2010-08-24,10170.86,10170.86,9975.86,10040.45,4436330000,10040.45
+2010-08-23,10215.51,10328.88,10146.18,10174.41,3210950000,10174.41
+2010-08-20,10270.98,10276.13,10131.88,10213.62,3761570000,10213.62
+2010-08-19,10411.15,10412.29,10202.34,10271.21,4290540000,10271.21
+2010-08-18,10398.59,10486.38,10308.83,10415.54,3724260000,10415.54
+2010-08-17,10297.55,10501.67,10297.55,10405.85,3968210000,10405.85
+2010-08-16,10303.07,10354.39,10193.26,10302.01,3142450000,10302.01
+2010-08-13,10320.33,10381.86,10254.18,10303.15,3328890000,10303.15
+2010-08-12,10361.58,10388.37,10222.85,10319.95,4521050000,10319.95
+2010-08-11,10631.82,10631.82,10339.63,10378.83,4511860000,10378.83
+2010-08-10,10696.63,10717.21,10522.63,10644.25,3979360000,10644.25
+2010-08-09,10654.62,10755.66,10618.26,10698.75,3191630000,10698.75
+2010-08-06,10668.55,10688.08,10491.37,10653.56,3857890000,10653.56
+2010-08-05,10679.67,10712.37,10571.60,10674.98,3685560000,10674.98
+2010-08-04,10630.20,10738.48,10583.10,10680.43,4057850000,10680.43
+2010-08-03,10673.92,10714.19,10564.18,10636.38,4071820000,10636.38
+2010-08-02,10468.82,10715.21,10468.82,10674.38,4144180000,10674.38
+2010-07-30,10465.19,10528.84,10327.37,10465.94,4006450000,10465.94
+2010-07-29,10498.94,10609.74,10383.45,10467.16,4612420000,10467.16
+2010-07-28,10537.01,10586.36,10445.17,10497.88,4002390000,10497.88
+2010-07-27,10525.28,10632.52,10460.65,10537.69,4725690000,10537.69
+2010-07-26,10424.17,10545.94,10391.02,10525.43,4009650000,10525.43
+2010-07-23,10321.16,10465.19,10237.84,10424.62,4524570000,10424.62
+2010-07-22,10121.81,10391.78,10121.81,10322.30,4826900000,10322.30
+2010-07-21,10226.02,10310.04,10053.85,10120.53,4747180000,10120.53
+2010-07-20,10151.48,10248.20,9973.17,10229.96,4713280000,10229.96
+2010-07-19,10098.12,10213.09,10051.28,10154.43,4089500000,10154.43
+2010-07-16,10356.20,10356.20,10071.63,10097.90,5297350000,10097.90
+2010-07-15,10367.10,10409.49,10216.04,10359.31,4552470000,10359.31
+2010-07-14,10370.96,10423.03,10265.16,10366.72,4521050000,10366.72
+2010-07-13,10217.55,10436.20,10217.55,10363.02,4640460000,10363.02
+2010-07-12,10199.24,10260.62,10121.13,10216.27,3426990000,10216.27
+2010-07-09,10137.93,10226.48,10079.05,10198.03,3506570000,10198.03
+2010-07-08,10019.26,10175.02,9987.02,10138.99,4548460000,10138.99
+2010-07-07,9736.85,10029.93,9716.38,10018.28,4931220000,10018.28
+2010-07-06,9689.21,9880.76,9648.26,9743.62,4691240000,9743.62
+2010-07-02,9732.23,9798.19,9603.80,9686.48,3968500000,9686.48
+2010-07-01,9773.27,9834.71,9596.04,9732.53,6435770000,9732.53
+2010-06-30,9868.34,9951.47,9741.07,9774.02,5067080000,9774.02
+2010-06-29,10135.72,10135.72,9786.45,9870.30,6136700000,9870.30
+2010-06-28,10143.05,10246.82,10070.12,10138.52,3896410000,10138.52
+2010-06-25,10153.48,10261.10,10039.97,10143.81,5128840000,10143.81
+2010-06-24,10297.08,10314.31,10112.60,10152.80,4814830000,10152.80
+2010-06-23,10293.30,10393.89,10195.81,10298.44,4526150000,10298.44
+2010-06-22,10441.95,10524.78,10276.14,10293.52,4514380000,10293.52
+2010-06-21,10452.46,10627.19,10387.54,10442.41,4514360000,10442.41
+2010-06-18,10435.00,10513.75,10379.60,10450.64,4555360000,10450.64
+2010-06-17,10409.98,10479.74,10293.49,10434.17,4557760000,10434.17
+2010-06-16,10404.24,10456.39,10289.37,10409.46,5002600000,10409.46
+2010-06-15,10192.40,10416.11,10192.40,10404.77,4644490000,10404.77
+2010-06-14,10211.83,10354.97,10175.02,10190.89,4425830000,10190.89
+2010-06-11,10166.78,10235.10,10038.31,10211.07,4059280000,10211.07
+2010-06-10,9901.67,10206.61,9901.67,10172.53,5144780000,10172.53
+2010-06-09,9941.57,10093.33,9859.04,9899.25,5983200000,9899.25
+2010-06-08,9812.94,9971.57,9726.33,9939.98,6192750000,9939.98
+2010-06-07,9931.75,10025.84,9798.73,9816.49,5467560000,9816.49
+2010-06-04,10249.61,10249.61,9881.11,9931.97,6180580000,9931.97
+2010-06-03,10250.67,10348.84,10158.92,10255.28,4995970000,10255.28
+2010-06-02,10025.61,10256.57,10007.09,10249.54,5026360000,10249.54
+2010-06-01,10133.94,10249.27,9976.56,10024.02,5271480000,10024.02
+2010-05-28,10258.00,10293.45,10078.66,10136.63,4871210000,10136.63
+2010-05-27,9971.73,10279.01,9971.73,10258.99,5698460000,10258.99
+2010-05-26,10045.11,10211.60,9937.79,9974.45,4521050000,9974.45
+2010-05-25,10061.43,10061.43,9756.11,10043.75,7329580000,10043.75
+2010-05-24,10193.46,10235.63,10028.78,10066.57,5224040000,10066.57
+2010-05-21,10063.93,10225.88,9860.93,10193.39,5452130000,10193.39
+2010-05-20,10440.21,10440.21,10042.46,10068.01,8328569600,10068.01
+2010-05-19,10505.70,10558.56,10306.22,10444.37,6765800000,10444.37
+2010-05-18,10625.45,10760.05,10463.15,10510.95,6170840000,10510.95
+2010-05-17,10616.98,10707.30,10424.72,10625.83,5922920000,10625.83
+2010-05-14,10780.68,10780.68,10509.89,10620.16,6126400000,10620.16
+2010-05-13,10896.61,10952.84,10752.72,10782.95,4870640000,10782.95
+2010-05-12,10742.15,10941.88,10725.81,10896.91,5225460000,10896.91
+2010-05-11,10780.00,10888.30,10653.71,10748.26,5842550000,10748.26
+2010-05-10,10386.18,10880.14,10386.18,10785.14,6893700000,10785.14
+2010-05-07,10519.42,10622.27,10221.50,10380.43,9472910400,10380.43
+2010-05-06,10862.22,10925.86,9787.17,10520.32,10617809600,10520.32
+2010-05-05,10918.40,10984.05,10754.30,10868.12,6795940000,10868.12
+2010-05-04,11149.48,11149.48,10843.71,10926.77,6594720000,10926.77
+2010-05-03,11009.60,11203.37,11004.15,11151.83,4938050000,11151.83
+2010-04-30,11168.23,11235.94,10984.35,11008.61,6048260000,11008.61
+2010-04-29,11045.64,11232.54,11045.64,11167.32,6059410000,11167.32
+2010-04-28,10988.87,11115.63,10938.48,11045.27,6342310000,11045.27
+2010-04-27,11203.67,11260.88,10962.81,10991.99,7454540000,10991.99
+2010-04-26,11205.11,11308.95,11150.01,11205.03,5647760000,11205.03
+2010-04-23,11132.18,11247.20,11058.87,11204.28,5326060000,11204.28
+2010-04-22,11119.78,11175.33,10975.66,11134.29,6035780000,11134.29
+2010-04-21,11116.91,11217.35,11018.59,11124.92,5724310000,11124.92
+2010-04-20,11093.11,11190.22,11045.80,11117.06,5316590000,11117.06
+2010-04-19,11018.36,11116.76,10940.60,11092.05,6597740000,11092.05
+2010-04-16,11143.66,11186.82,10947.55,11018.66,8108470400,11018.66
+2010-04-15,11122.96,11189.61,11051.31,11144.57,5995330000,11144.57
+2010-04-14,11020.70,11147.14,11004.61,11123.11,5760040000,11123.11
+2010-04-13,11006.72,11072.70,10925.86,11019.42,5403580000,11019.42
+2010-04-12,10996.75,11066.96,10957.22,11005.97,4607090000,11005.97
+2010-04-09,10926.92,11032.12,10894.19,10997.35,4511570000,10997.35
+2010-04-08,10896.99,10969.92,10810.15,10927.07,4726970000,10927.07
+2010-04-07,10961.95,11000.22,10835.77,10897.52,5101430000,10897.52
+2010-04-06,10972.49,11017.76,10893.89,10969.99,4086180000,10969.99
+2010-04-05,10927.45,11026.75,10880.36,10973.55,3881620000,10973.55
+2010-04-01,10857.31,10983.14,10851.57,10927.07,4006870000,10927.07
+2010-03-31,10907.34,10933.19,10802.22,10856.63,4484340000,10856.63
+2010-03-30,10895.02,10968.56,10837.21,10907.42,4085000000,10907.42
+2010-03-29,10849.23,10954.43,10827.91,10895.86,4375580000,10895.86
+2010-03-26,10841.29,10934.85,10801.84,10850.36,4708420000,10850.36
+2010-03-25,10837.51,10985.26,10818.77,10841.21,5668900000,10841.21
+2010-03-24,10887.62,10925.48,10788.77,10836.15,4705750000,10836.15
+2010-03-23,10787.18,10906.06,10752.41,10888.83,4411640000,10888.83
+2010-03-22,10741.00,10836.68,10672.23,10785.89,4261680000,10785.89
+2010-03-19,10780.00,10869.55,10665.35,10741.98,5212410000,10741.98
+2010-03-18,10733.44,10821.49,10686.89,10779.17,4234510000,10779.17
+2010-03-17,10686.36,10787.86,10658.10,10733.67,4963200000,10733.67
+2010-03-16,10642.53,10717.42,10594.16,10685.98,4369770000,10685.98
+2010-03-15,10623.41,10680.32,10540.65,10642.15,4164110000,10642.15
+2010-03-12,10611.77,10690.90,10561.66,10624.69,4928160000,10624.69
+2010-03-11,10560.98,10626.73,10489.87,10611.84,4669060000,10611.84
+2010-03-10,10560.13,10639.05,10502.64,10567.33,5469120000,10567.33
+2010-03-09,10552.24,10637.46,10493.49,10564.38,5185570000,10564.38
+2010-03-08,10563.78,10632.48,10500.90,10552.52,3774680000,10552.52
+2010-03-05,10445.13,10587.13,10445.13,10566.20,4133000000,10566.20
+2010-03-04,10396.53,10484.05,10363.88,10444.14,3945010000,10444.14
+2010-03-03,10406.28,10496.22,10359.58,10396.76,3951320000,10396.76
+2010-03-02,10404.16,10493.80,10359.80,10405.98,4134680000,10405.98
+2010-03-01,10326.10,10444.60,10320.05,10403.79,3847640000,10403.79
+2010-02-26,10321.41,10391.24,10250.45,10325.26,3945190000,10325.26
+2010-02-25,10366.60,10366.60,10155.75,10321.03,4521130000,10321.03
+2010-02-24,10284.00,10416.94,10271.61,10374.16,4168360000,10374.16
+2010-02-23,10383.16,10430.16,10239.34,10282.41,4521050000,10282.41
+2010-02-22,10402.43,10468.55,10333.05,10383.38,3814440000,10383.38
+2010-02-19,10387.77,10459.18,10316.50,10402.35,3944280000,10402.35
+2010-02-18,10309.39,10416.79,10255.58,10392.90,3878620000,10392.90
+2010-02-17,10261.48,10366.83,10223.16,10309.24,4259230000,10309.24
+2010-02-16,10100.81,10292.62,10100.81,10268.81,4080770000,10268.81
+2010-02-12,10137.23,10140.18,9962.13,10099.14,4160680000,10099.14
+2010-02-11,10037.85,10184.85,9963.19,10144.19,4400870000,10144.19
+2010-02-10,10055.46,10120.15,9946.26,10038.38,4251450000,10038.38
+2010-02-09,9910.28,10154.24,9910.28,10058.64,5114260000,10058.64
+2010-02-08,10005.43,10059.24,9882.85,9908.39,4089820000,9908.39
+2010-02-05,10003.69,10078.89,9822.84,10012.23,6438900000,10012.23
+2010-02-04,10273.12,10273.12,9984.35,10002.18,5859690000,10002.18
+2010-02-03,10291.73,10356.86,10192.03,10270.55,4285450000,10270.55
+2010-02-02,10186.13,10333.35,10138.75,10296.85,4749540000,10296.85
+2010-02-01,10068.99,10227.24,10068.99,10185.53,4077610000,10185.53
+2010-01-29,10122.04,10272.29,10014.35,10067.33,5412850000,10067.33
+2010-01-28,10236.92,10310.68,10023.80,10120.46,5452400000,10120.46
+2010-01-27,10194.29,10294.13,10060.98,10236.16,5319120000,10236.16
+2010-01-26,10195.35,10323.00,10102.17,10194.29,4731910000,10194.29
+2010-01-25,10175.10,10316.65,10135.95,10196.86,4481390000,10196.86
+2010-01-22,10389.58,10450.04,10133.15,10172.98,6208650000,10172.98
+2010-01-21,10603.91,10651.14,10334.18,10389.88,6874289600,10389.88
+2010-01-20,10719.69,10719.69,10492.36,10603.15,4810560000,10603.15
+2010-01-19,10608.37,10763.45,10555.47,10725.43,4724830000,10725.43
+2010-01-15,10706.99,10736.54,10529.09,10609.65,4758730000,10609.65
+2010-01-14,10680.16,10767.15,10619.02,10710.55,3915200000,10710.55
+2010-01-13,10628.09,10747.12,10569.07,10680.77,4170360000,10680.77
+2010-01-12,10662.86,10701.48,10523.35,10627.26,4716160000,10627.26
+2010-01-11,10620.31,10739.87,10538.91,10663.99,4255780000,10663.99
+2010-01-08,10606.40,10653.11,10509.74,10618.19,4389590000,10618.19
+2010-01-07,10571.11,10655.60,10471.73,10606.86,5270680000,10606.86
+2010-01-06,10564.72,10655.22,10488.28,10573.68,4972660000,10573.68
+2010-01-05,10584.56,10647.14,10468.86,10572.02,2491020000,10572.02
+2010-01-04,10430.69,10641.62,10430.69,10583.96,3991400000,10583.96
+2009-12-31,10548.51,10578.74,10420.56,10428.05,2076990000,10428.05
+2009-12-30,10544.36,10583.28,10470.75,10548.51,2277300000,10548.51
+2009-12-29,10547.83,10605.65,10518.59,10545.41,2491020000,10545.41
+2009-12-28,10517.91,10585.02,10477.25,10547.08,2716400000,10547.08
+2009-12-24,10467.12,10541.26,10450.95,10520.10,1267710000,10520.10
+2009-12-23,10464.32,10520.93,10409.00,10466.44,3166870000,10466.44
+2009-12-22,10414.67,10511.56,10399.33,10464.93,3641130000,10464.93
+2009-12-21,10330.10,10489.41,10330.10,10414.14,3977340000,10414.14
+2009-12-18,10309.39,10412.55,10237.75,10328.89,6325890000,10328.89
+2009-12-17,10439.99,10439.99,10279.39,10308.26,7615070400,10308.26
+2009-12-16,10449.81,10552.75,10401.90,10441.12,4829820000,10441.12
+2009-12-15,10499.31,10542.09,10380.96,10452.00,5045100000,10452.00
+2009-12-14,10471.28,10566.88,10431.60,10501.05,4548490000,10501.05
+2009-12-11,10403.41,10516.47,10385.42,10471.50,3791090000,10471.50
+2009-12-10,10336.00,10479.06,10332.14,10405.83,3996490000,10405.83
+2009-12-09,10282.85,10377.11,10207.29,10337.05,4115410000,10337.05
+2009-12-08,10385.42,10385.42,10216.44,10285.97,4748030000,10285.97
+2009-12-07,10386.86,10478.23,10321.11,10390.11,4103360000,10390.11
+2009-12-04,10368.57,10549.04,10285.44,10388.90,5781140000,10388.90
+2009-12-03,10455.63,10533.55,10338.49,10366.15,4810030000,10366.15
+2009-12-02,10470.44,10537.63,10386.03,10452.68,3941340000,10452.68
+2009-12-01,10343.82,10537.03,10343.82,10471.58,4249310000,10471.58
+2009-11-30,10309.77,10394.34,10238.05,10344.84,3895520000,10344.84
+2009-11-27,10452.23,10452.23,10179.33,10309.92,2362910000,10309.92
+2009-11-25,10432.96,10513.60,10385.65,10464.40,3036350000,10464.40
+2009-11-24,10451.25,10488.66,10335.62,10433.71,3700820000,10433.71
+2009-11-23,10320.13,10524.40,10320.13,10450.95,3827920000,10450.95
+2009-11-20,10327.91,10377.41,10237.60,10318.16,3751230000,10318.16
+2009-11-19,10425.33,10425.33,10226.41,10332.44,4178030000,10332.44
+2009-11-18,10426.27,10471.28,10330.33,10426.31,4293340000,10426.31
+2009-11-17,10404.77,10465.76,10318.69,10437.42,3824070000,10437.42
+2009-11-16,10267.53,10465.83,10267.53,10406.96,4565850000,10406.96
+2009-11-13,10197.85,10332.29,10162.93,10270.47,3792610000,10270.47
+2009-11-12,10289.82,10341.21,10157.64,10197.47,4160250000,10197.47
+2009-11-11,10247.42,10357.38,10217.19,10291.26,4286700000,10291.26
+2009-11-10,10223.01,10300.33,10148.12,10246.97,4394770000,10246.97
+2009-11-09,10020.62,10248.93,10020.62,10226.94,4460030000,10226.94
+2009-11-06,10001.35,10077.08,9898.49,10023.42,4277130000,10023.42
+2009-11-05,9807.80,10043.75,9807.80,10005.96,4848350000,10005.96
+2009-11-04,9767.30,9962.35,9745.76,9802.14,5635510000,9802.14
+2009-11-03,9787.47,9844.84,9649.78,9771.91,5487500000,9771.91
+2009-11-02,9712.13,9883.68,9647.06,9789.44,6202640000,9789.44
+2009-10-30,9961.52,9980.19,9664.89,9712.73,6512420000,9712.73
+2009-10-29,9762.91,9996.67,9762.91,9962.58,5595040000,9962.58
+2009-10-28,9881.11,9940.89,9723.31,9762.69,6600350000,9762.69
+2009-10-27,9868.34,9994.55,9802.36,9882.17,5337380000,9882.17
+2009-10-26,9972.33,10107.99,9817.55,9867.96,6363380000,9867.96
+2009-10-23,10099.90,10138.59,9908.70,9972.18,4767460000,9972.18
+2009-10-22,9946.18,10133.08,9879.07,10081.31,5192410000,10081.31
+2009-10-21,10038.84,10157.94,9909.83,9949.36,5616290000,9949.36
+2009-10-20,10092.42,10157.26,9952.98,10041.48,5396930000,10041.48
+2009-10-19,9996.67,10146.61,9967.49,10092.19,4619240000,10092.19
+2009-10-16,10061.36,10072.62,9884.51,9995.91,4894740000,9995.91
+2009-10-15,10014.88,10087.43,9916.93,10062.94,5369780000,10062.94
+2009-10-14,9873.55,10064.98,9873.55,10015.86,5406420000,10015.86
+2009-10-13,9883.98,9935.53,9780.90,9871.06,4320480000,9871.06
+2009-10-12,9865.24,9978.07,9814.45,9885.80,3710430000,9885.80
+2009-10-09,9786.04,9890.41,9731.32,9864.94,3763780000,9864.94
+2009-10-08,9728.22,9872.50,9709.78,9786.87,4988400000,9786.87
+2009-10-07,9725.69,9782.56,9634.96,9725.58,4238220000,9725.58
+2009-10-06,9601.26,9793.37,9601.26,9731.25,5029840000,9731.25
+2009-10-05,9488.73,9640.33,9449.81,9599.75,4313310000,9599.75
+2009-10-02,9507.62,9571.71,9378.77,9487.67,5583240000,9487.67
+2009-10-01,9711.60,9714.70,9482.98,9509.28,5791450000,9509.28
+2009-09-30,9741.83,9817.17,9583.04,9712.28,5998860000,9712.28
+2009-09-29,9789.74,9861.99,9705.10,9742.20,4949900000,9742.20
+2009-09-28,9663.23,9861.39,9658.09,9789.36,3726950000,9789.36
+2009-09-25,9706.68,9781.73,9605.19,9665.19,4507090000,9665.19
+2009-09-24,9749.99,9836.82,9637.53,9707.44,5505610000,9707.44
+2009-09-23,9830.63,9937.72,9724.90,9748.55,5531930000,9748.55
+2009-09-22,9779.61,9890.71,9742.96,9829.87,5246600000,9829.87
+2009-09-21,9818.61,9846.12,9688.40,9778.86,4615280000,9778.86
+2009-09-18,9784.75,9898.57,9751.27,9820.20,5607970000,9820.20
+2009-09-17,9789.82,9896.38,9706.23,9783.92,6668110000,9783.92
+2009-09-16,9683.71,9837.05,9648.95,9791.71,6793529600,9791.71
+2009-09-15,9626.42,9745.91,9553.80,9683.41,6185620000,9683.41
+2009-09-14,9598.08,9662.10,9492.96,9626.80,4979610000,9626.80
+2009-09-11,9625.44,9698.67,9532.11,9605.41,4922600000,9605.41
+2009-09-10,9546.54,9666.55,9479.20,9627.48,5191380000,9627.48
+2009-09-09,9496.59,9604.43,9435.45,9547.22,5202550000,9547.22
+2009-09-08,9440.13,9564.45,9402.80,9497.34,5235160000,9497.34
+2009-09-04,9345.36,9465.37,9302.28,9441.27,4097370000,9441.27
+2009-09-03,9282.03,9350.27,9252.93,9344.61,4624280000,9344.61
+2009-09-02,9306.21,9378.77,9223.08,9280.67,5842730000,9280.67
+2009-09-01,9492.32,9573.67,9275.15,9310.60,6862360000,9310.60
+2009-08-31,9542.91,9552.97,9389.27,9496.28,5004560000,9496.28
+2009-08-28,9582.74,9666.71,9476.63,9544.20,5785780000,9544.20
+2009-08-27,9541.63,9629.98,9440.43,9580.63,5785880000,9580.63
+2009-08-26,9538.61,9613.65,9446.71,9543.52,5080060000,9543.52
+2009-08-25,9509.21,9646.53,9485.70,9539.29,5768740000,9539.29
+2009-08-24,9506.18,9625.89,9442.17,9509.28,6302450000,9509.28
+2009-08-21,9347.86,9549.19,9347.86,9505.96,5885550000,9505.96
+2009-08-20,9278.55,9385.72,9237.52,9350.05,4893160000,9350.05
+2009-08-19,9208.68,9333.34,9099.14,9279.16,4257000000,9279.16
+2009-08-18,9134.36,9262.08,9124.08,9217.94,4198970000,9217.94
+2009-08-17,9313.85,9313.85,9078.28,9135.34,4854970000,9135.34
+2009-08-14,9398.04,9425.17,9214.47,9321.40,4940750000,9321.40
+2009-08-13,9362.29,9448.97,9269.26,9398.19,5250660000,9398.19
+2009-08-12,9236.06,9442.47,9199.80,9361.61,5498170000,9361.61
+2009-08-11,9334.33,9351.86,9180.23,9241.45,5773160000,9241.45
+2009-08-10,9368.41,9420.56,9249.99,9337.95,5406080000,9337.95
+2009-08-07,9258.45,9466.89,9258.45,9370.07,6827089600,9370.07
+2009-08-06,9277.19,9378.01,9168.44,9256.26,6753380000,9256.26
+2009-08-05,9315.36,9374.38,9173.20,9280.97,7242120000,9280.97
+2009-08-04,9285.05,9370.30,9207.21,9320.19,5713700000,9320.19
+2009-08-03,9173.65,9342.11,9162.09,9286.56,5603440000,9286.56
+2009-07-31,9154.61,9264.65,9081.30,9171.61,5139070000,9171.61
+2009-07-30,9072.84,9298.13,9072.84,9154.46,6035180000,9154.46
+2009-07-29,9092.34,9141.23,8967.26,9070.72,5178770000,9070.72
+2009-07-28,9106.92,9154.76,8980.03,9096.72,5490350000,9096.72
+2009-07-27,9093.09,9154.23,8996.58,9108.51,4631290000,9108.51
+2009-07-24,9066.11,9144.48,8955.77,9093.24,4458300000,9093.24
+2009-07-23,8882.31,9143.05,8837.95,9069.29,5761650000,9069.29
+2009-07-22,8912.39,8993.48,8802.13,8881.26,4634100000,8881.26
+2009-07-21,8848.15,8991.07,8780.82,8915.94,5309300000,8915.94
+2009-07-20,8746.05,8884.43,8717.26,8848.15,4853150000,8848.15
+2009-07-17,8711.89,8797.97,8638.81,8743.94,5141380000,8743.94
+2009-07-16,8612.66,8750.28,8543.97,8711.82,4898640000,8711.82
+2009-07-15,8363.95,8643.04,8363.95,8616.21,5238830000,8616.21
+2009-07-14,8331.37,8407.48,8255.27,8359.49,4149030000,8359.49
+2009-07-13,8146.82,8348.08,8106.16,8331.68,4499440000,8331.68
+2009-07-10,8182.49,8216.65,8057.57,8146.52,3912080000,8146.52
+2009-07-09,8179.01,8273.48,8117.27,8183.17,4347170000,8183.17
+2009-07-08,8157.02,8259.05,8057.94,8178.41,5721780000,8178.41
+2009-07-07,8324.95,8355.48,8138.51,8163.60,4673300000,8163.60
+2009-07-06,8279.30,8364.02,8156.49,8324.87,4712580000,8324.87
+2009-07-02,8503.00,8503.00,8260.41,8280.74,3931000000,8280.74
+2009-07-01,8447.53,8610.32,8447.00,8504.06,3919400000,8504.06
+2009-06-30,8528.93,8584.17,8369.99,8447.00,4627570000,8447.00
+2009-06-29,8440.13,8569.59,8406.57,8529.38,4211760000,8529.38
+2009-06-26,8468.54,8509.73,8364.17,8438.39,6076660000,8438.39
+2009-06-25,8299.25,8512.60,8236.07,8472.40,4911240000,8472.40
+2009-06-24,8323.51,8456.83,8246.20,8299.86,4636720000,8299.86
+2009-06-23,8340.44,8413.22,8239.17,8322.91,5071020000,8322.91
+2009-06-22,8538.52,8538.52,8306.66,8339.01,4903940000,8339.01
+2009-06-19,8556.96,8665.26,8476.02,8539.73,5713390000,8539.73
+2009-06-18,8496.73,8634.28,8438.61,8555.60,4684010000,8555.60
+2009-06-17,8504.36,8602.99,8421.46,8497.18,5523650000,8497.18
+2009-06-16,8612.44,8688.69,8483.58,8504.67,4951200000,8504.67
+2009-06-15,8798.50,8798.50,8540.87,8612.13,4697880000,8612.13
+2009-06-12,8770.01,8850.95,8671.61,8799.26,4528120000,8799.26
+2009-06-11,8736.23,8911.11,8697.99,8770.92,5500840000,8770.92
+2009-06-10,8763.66,8871.36,8625.21,8739.02,5379420000,8739.02
+2009-06-09,8764.83,8854.80,8688.99,8763.06,4439950000,8763.06
+2009-06-08,8759.35,8832.13,8593.84,8764.49,4483430000,8764.49
+2009-06-05,8751.75,8900.48,8673.41,8763.13,5277910000,8763.13
+2009-06-04,8665.72,8802.59,8609.17,8750.24,5352890000,8750.24
+2009-06-03,8740.07,8750.83,8556.90,8675.24,5323770000,8675.24
+2009-06-02,8721.60,8832.16,8635.25,8740.87,5987340000,8740.87
+2009-06-01,8501.53,8797.58,8501.53,8721.44,6370440000,8721.44
+2009-05-29,8404.04,8541.27,8323.91,8500.33,6050420000,8500.33
+2009-05-28,8300.50,8463.70,8221.65,8403.80,5738980000,8403.80
+2009-05-27,8473.65,8534.66,8280.82,8300.02,5698800000,8300.02
+2009-05-26,8275.33,8523.59,8194.33,8473.49,5667050000,8473.49
+2009-05-22,8292.21,8415.75,8218.86,8277.32,5155320000,8277.32
+2009-05-21,8416.07,8416.07,8185.25,8292.13,6019840000,8292.13
+2009-05-20,8471.82,8645.85,8376.40,8422.04,8205060000,8422.04
+2009-05-19,8502.48,8594.16,8402.61,8474.85,6616270000,8474.85
+2009-05-18,8270.15,8534.66,8270.15,8504.08,5702150000,8504.08
+2009-05-15,8326.22,8422.28,8206.67,8268.64,5439720000,8268.64
+2009-05-14,8285.92,8427.93,8218.94,8331.32,6134870000,8331.32
+2009-05-13,8461.80,8461.80,8208.74,8284.89,7091820000,8284.89
+2009-05-12,8419.17,8574.88,8306.47,8469.11,6871750400,8469.11
+2009-05-11,8569.23,8569.23,8347.41,8418.77,6150600000,8418.77
+2009-05-08,8410.73,8657.96,8388.11,8574.65,8163280000,8574.65
+2009-05-07,8513.56,8651.51,8296.04,8409.85,9120100000,8409.85
+2009-05-06,8403.48,8608.26,8350.12,8512.28,8555040000,8512.28
+2009-05-05,8425.55,8520.80,8321.37,8410.65,6882860000,8410.65
+2009-05-04,8213.60,8488.87,8213.60,8426.74,7038840000,8426.74
+2009-05-01,8167.41,8278.28,8047.54,8212.41,5312170000,8212.41
+2009-04-30,8188.51,8383.81,8083.62,8168.12,6862540000,8168.12
+2009-04-29,8018.31,8278.12,8018.31,8185.73,6101620000,8185.73
+2009-04-28,8023.56,8136.74,7898.75,8016.95,6328000000,8016.95
+2009-04-27,8073.82,8152.27,7920.42,8025.00,5613460000,8025.00
+2009-04-24,7957.45,8182.30,7905.60,8076.29,7114440000,8076.29
+2009-04-23,7886.81,8015.36,7762.80,7957.06,6563100000,7957.06
+2009-04-22,7964.78,8111.02,7802.46,7886.57,7327860000,7886.57
+2009-04-21,7841.73,8027.54,7699.79,7969.56,7436489600,7969.56
+2009-04-20,8128.94,8128.94,7801.58,7841.73,6973960000,7841.73
+2009-04-17,8125.43,8251.20,8024.92,8131.33,7352009600,8131.33
+2009-04-16,8029.14,8201.81,7933.08,8125.43,6598670000,8125.43
+2009-04-15,7914.92,8069.92,7808.19,8029.62,6241100000,8029.62
+2009-04-14,8057.41,8076.05,7840.53,7920.18,7569840000,7920.18
+2009-04-13,8082.02,8146.86,7888.96,8057.81,6434890000,8057.81
+2009-04-09,7839.89,8150.44,7839.89,8083.38,7600710400,8083.38
+2009-04-08,7788.68,7925.36,7715.09,7837.11,5938460000,7837.11
+2009-04-07,7968.92,7968.92,7733.56,7789.56,5155580000,7789.56
+2009-04-06,8016.16,8037.42,7830.66,7975.85,6210000000,7975.85
+2009-04-03,7980.63,8090.71,7850.33,8017.59,5855640000,8017.59
+2009-04-02,7763.99,8129.33,7763.99,7978.08,7542809600,7978.08
+2009-04-01,7606.13,7804.77,7450.74,7761.60,6034140000,7761.60
+2009-03-31,7523.77,7744.24,7502.98,7608.92,6089100000,7608.92
+2009-03-30,7773.31,7773.31,7406.85,7522.02,5912660000,7522.02
+2009-03-27,7922.57,7922.57,7695.97,7776.18,5600210000,7776.18
+2009-03-26,7752.36,7969.00,7709.19,7924.56,6992960000,7924.56
+2009-03-25,7659.81,7897.48,7539.54,7749.81,7687180000,7749.81
+2009-03-24,7773.47,7837.11,7585.98,7660.21,6767980000,7660.21
+2009-03-23,7279.25,7789.24,7279.25,7775.86,7715769600,7775.86
+2009-03-20,7402.31,7524.81,7215.77,7278.38,7643720000,7278.38
+2009-03-19,7489.68,7624.45,7325.13,7400.80,9033870400,7400.80
+2009-03-18,7395.70,7592.03,7218.24,7486.58,9098449600,7486.58
+2009-03-17,7218.00,7407.41,7129.60,7395.70,6156800000,7395.70
+2009-03-16,7225.33,7428.75,7171.41,7216.97,7883540000,7216.97
+2009-03-13,7219.20,7241.98,7106.34,7223.98,6787089600,7223.98
+2009-03-12,6932.39,7198.25,6840.79,7170.06,7326630400,7170.06
+2009-03-11,6923.13,7078.22,6804.55,6930.40,7287809600,6930.40
+2009-03-10,6547.01,6951.50,6547.01,6926.49,8618329600,6926.49
+2009-03-09,6625.74,6758.44,6440.08,6547.05,7277320000,6547.05
+2009-03-06,6595.16,6776.44,6443.27,6626.94,7331830400,6626.94
+2009-03-05,6874.01,6874.01,6531.28,6594.44,7507249600,6594.44
+2009-03-04,6726.50,7012.19,6715.11,6875.84,7673620000,6875.84
+2009-03-03,6764.81,6922.59,6661.74,6726.02,7583230400,6726.02
+2009-03-02,7056.48,7056.48,6736.69,6763.29,7868289600,6763.29
+2009-02-27,7180.97,7244.61,6952.06,7062.93,8926480000,7062.93
+2009-02-26,7269.06,7451.13,7135.25,7182.08,7599969600,7182.08
+2009-02-25,7349.58,7442.13,7123.94,7270.89,7483640000,7270.89
+2009-02-24,7115.34,7396.34,7077.35,7350.94,7234489600,7350.94
+2009-02-23,7365.99,7477.10,7092.64,7114.78,6509300000,7114.78
+2009-02-20,7461.49,7500.44,7226.29,7365.67,8210590400,7365.67
+2009-02-19,7555.23,7679.01,7420.63,7465.95,5746940000,7465.95
+2009-02-18,7546.35,7661.56,7451.37,7555.63,5740710000,7555.63
+2009-02-17,7845.63,7845.63,7502.59,7552.60,5907820000,7552.60
+2009-02-13,7933.00,8005.96,7811.38,7850.41,5296650000,7850.41
+2009-02-12,7931.97,7956.02,7662.04,7932.76,6476460000,7932.76
+2009-02-11,7887.05,8042.36,7820.14,7939.53,5926460000,7939.53
+2009-02-10,8269.36,8293.17,7835.83,7888.88,6770169600,7888.88
+2009-02-09,8281.38,8376.56,8137.70,8270.87,5574370000,8270.87
+2009-02-06,8056.38,8360.07,8044.03,8280.59,6484100000,8280.59
+2009-02-05,7954.83,8138.65,7811.70,8063.07,6624030000,8063.07
+2009-02-04,8070.32,8197.04,7899.79,7956.66,6420450000,7956.66
+2009-02-03,7936.99,8157.13,7855.19,8078.36,5886310000,8078.36
+2009-02-02,8000.62,8053.43,7796.17,7936.83,5673270000,7936.83
+2009-01-30,8149.01,8243.95,7924.88,8000.86,5350580000,8000.86
+2009-01-29,8373.06,8373.06,8092.14,8149.01,5067060000,8149.01
+2009-01-28,8175.93,8446.33,8175.93,8375.45,6199180000,8375.45
+2009-01-27,8117.39,8264.10,8042.60,8174.73,5353260000,8174.73
+2009-01-26,8078.04,8278.12,7971.15,8116.03,6039940000,8116.03
+2009-01-23,8108.79,8187.88,7856.86,8077.56,5832160000,8077.56
+2009-01-22,8224.43,8239.33,7925.75,8122.80,5843830000,8122.80
+2009-01-21,7949.17,8286.40,7890.63,8228.10,6467830000,8228.10
+2009-01-20,8279.63,8309.02,7920.66,7949.09,6375230000,7949.09
+2009-01-16,8215.67,8424.59,8086.01,8281.22,6786040000,8281.22
+2009-01-15,8196.24,8326.06,7949.65,8212.49,7807350400,8212.49
+2009-01-14,8446.01,8446.01,8097.95,8200.14,5407880000,8200.14
+2009-01-13,8474.61,8584.68,8325.59,8448.56,5567460000,8448.56
+2009-01-12,8599.26,8653.97,8391.85,8473.97,4725050000,8473.97
+2009-01-09,8738.80,8800.45,8541.75,8599.18,4716500000,8599.18
+2009-01-08,8769.94,8807.14,8593.52,8742.46,4991550000,8742.46
+2009-01-07,8996.94,8996.94,8690.45,8769.70,4704940000,8769.70
+2009-01-06,8954.57,9175.19,8868.07,9015.10,5392620000,9015.10
+2009-01-05,9027.13,9093.47,8841.70,8952.89,5413910000,8952.89
+2009-01-02,8772.25,9080.57,8725.10,9034.69,4048270000,9034.69
+2008-12-31,8666.48,8862.65,8634.06,8776.39,4172940000,8776.39
+2008-12-30,8487.51,8700.89,8463.70,8668.39,3627800000,8668.39
+2008-12-29,8515.87,8575.60,8349.24,8483.93,3323430000,8483.93
+2008-12-26,8468.71,8581.58,8434.94,8515.55,1880050000,8515.55
+2008-12-24,8428.17,8498.26,8417.02,8468.48,1546550000,8468.48
+2008-12-23,8518.65,8647.60,8376.80,8419.49,4051970000,8419.49
+2008-12-22,8573.37,8672.06,8351.79,8519.69,4869850000,8519.69
+2008-12-19,8606.50,8823.78,8499.06,8579.11,6705310000,8579.11
+2008-12-18,8823.94,8946.36,8516.02,8604.99,5675000000,8604.99
+2008-12-17,8921.91,9001.96,8701.13,8824.34,5907380000,8824.34
+2008-12-16,8565.65,8985.63,8534.03,8924.14,6009780000,8924.14
+2008-12-15,8628.81,8738.40,8431.04,8564.53,4982390000,8564.53
+2008-12-12,8563.10,8705.43,8272.22,8629.68,5959590000,8629.68
+2008-12-11,8750.13,8861.86,8480.18,8565.09,5513840000,8565.09
+2008-12-10,8693.00,8942.46,8589.86,8761.42,5942130000,8761.42
+2008-12-09,8934.10,8978.14,8591.69,8691.33,5693110000,8691.33
+2008-12-08,8637.65,9151.61,8637.65,8934.18,6553600000,8934.18
+2008-12-05,8376.08,8722.47,8084.25,8635.42,6165370000,8635.42
+2008-12-04,8587.07,8705.98,8222.84,8376.24,5860390000,8376.24
+2008-12-03,8409.14,8654.77,8170.19,8591.69,6221880000,8591.69
+2008-12-02,8153.75,8490.62,8072.47,8419.09,6170100000,8419.09
+2008-12-01,8826.89,8826.89,8123.04,8149.09,6052010000,8149.09
+2008-11-28,8690.24,8840.33,8687.05,8829.04,2740860000,8829.04
+2008-11-26,8464.49,8760.46,8250.80,8726.61,5793260000,8726.61
+2008-11-25,8445.14,8682.09,8244.43,8479.47,6952700000,8479.47
+2008-11-24,8048.09,8624.27,8023.32,8443.39,7879440000,8443.39
+2008-11-21,7552.37,8121.45,7392.27,8046.42,9495900000,8046.42
+2008-11-20,7995.53,8224.35,7464.51,7552.29,9093740000,7552.29
+2008-11-19,8420.69,8534.34,7967.33,7997.28,6548600000,7997.28
+2008-11-18,8273.34,8540.08,8075.81,8424.75,6679470000,8424.75
+2008-11-17,8494.84,8596.31,8197.12,8273.58,4927490000,8273.58
+2008-11-14,8822.19,8980.93,8421.08,8497.31,5881030000,8497.31
+2008-11-13,8281.14,8898.41,7947.74,8835.25,7849120000,8835.25
+2008-11-12,8684.52,8684.52,8235.66,8282.66,5764180000,8282.66
+2008-11-11,8864.32,8892.20,8499.62,8693.96,4998340000,8693.96
+2008-11-10,8946.60,9212.94,8735.61,8870.54,4572000000,8870.54
+2008-11-07,8696.03,9032.54,8661.22,8943.81,4931640000,8943.81
+2008-11-06,9134.01,9216.37,8607.14,8695.79,6102230000,8695.79
+2008-11-05,9616.60,9628.15,9086.06,9139.27,5426640000,9139.27
+2008-11-04,9323.89,9711.46,9323.89,9625.28,5531290000,9625.28
+2008-11-03,9326.04,9488.92,9175.03,9319.83,4492280000,9319.83
+2008-10-31,9179.09,9498.48,9014.78,9325.01,6394350000,9325.01
+2008-10-30,9004.66,9380.36,8916.81,9180.69,6175830000,9180.69
+2008-10-29,9062.33,9405.05,8800.61,8990.96,7077800000,8990.96
+2008-10-28,8178.72,9112.51,8153.79,9065.12,7096950400,9065.12
+2008-10-27,8375.92,8639.64,8085.37,8175.77,5558050000,8175.77
+2008-10-24,8683.21,8683.21,8088.63,8378.95,6550050000,8378.95
+2008-10-23,8519.77,8864.48,8200.06,8691.25,7189900000,8691.25
+2008-10-22,9027.84,9027.84,8324.07,8519.21,6147980000,8519.21
+2008-10-21,9179.11,9293.07,9017.30,9045.21,5121830000,9045.21
+2008-10-20,8852.30,9305.89,8799.49,9265.43,5175640000,9265.43
+2008-10-17,8975.35,9304.38,8640.83,8852.22,6581780000,8852.22
+2008-10-16,8577.04,9073.64,8176.17,8979.26,7984500000,8979.26
+2008-10-15,9301.91,9301.91,8516.50,8577.91,6542330000,8577.91
+2008-10-14,9388.97,9924.28,9050.06,9310.99,8161990400,9310.99
+2008-10-13,8462.42,9501.91,8462.42,9387.61,7263369600,9387.61
+2008-10-10,8568.67,8989.13,7773.71,8451.19,11456230400,8451.19
+2008-10-09,9261.69,9522.77,8523.27,8579.19,8285670400,8579.19
+2008-10-08,9437.23,9778.04,9042.97,9258.10,8716329600,9258.10
+2008-10-07,9955.42,10205.04,9391.67,9447.11,7069209600,9447.11
+2008-10-06,10322.52,10322.52,9503.10,9955.50,7956020000,9955.50
+2008-10-03,10483.96,10844.69,10261.75,10325.38,6716120000,10325.38
+2008-10-02,10825.54,10843.10,10368.08,10482.85,6285640000,10482.85
+2008-10-01,10847.40,11022.06,10495.99,10831.07,5782130000,10831.07
+2008-09-30,10371.58,10922.03,10371.58,10850.66,6065000000,10850.66
+2008-09-29,11139.62,11139.62,10266.76,10365.45,7305060000,10365.45
+2008-09-26,11019.04,11218.48,10781.37,11143.13,5383610000,11143.13
+2008-09-25,10827.17,11206.05,10799.77,11022.06,5877640000,11022.06
+2008-09-24,10850.02,11041.02,10696.38,10825.17,4820360000,10825.17
+2008-09-23,11015.69,11214.65,10763.77,10854.17,5185730000,10854.17
+2008-09-22,11394.42,11450.81,10956.43,11015.69,5368130000,11015.69
+2008-09-19,11027.51,11415.48,11027.51,11388.44,9387169600,11388.44
+2008-09-18,10609.01,11149.07,10403.75,11019.69,10082689600,11019.69
+2008-09-17,11056.58,11068.87,10521.81,10609.66,9431870400,10609.66
+2008-09-16,10905.62,11193.12,10604.70,11059.02,9459830400,11059.02
+2008-09-15,11416.37,11416.37,10849.85,10917.51,8279510400,10917.51
+2008-09-12,11429.32,11532.72,11191.08,11421.99,6273260000,11421.99
+2008-09-11,11264.44,11461.15,11018.72,11433.71,6869249600,11433.71
+2008-09-10,11233.91,11453.50,11135.64,11268.92,6543440000,11268.92
+2008-09-09,11514.73,11623.50,11209.81,11230.73,7380630400,11230.73
+2008-09-08,11224.87,11656.64,11224.87,11510.74,7351340000,11510.74
+2008-09-05,11185.63,11301.73,10998.77,11220.96,5017080000,11220.96
+2008-09-04,11532.48,11532.48,11130.26,11188.23,5212500000,11188.23
+2008-09-03,11506.01,11629.69,11328.84,11532.88,5056980000,11532.88
+2008-09-02,11545.63,11831.29,11444.79,11516.92,4783560000,11516.92
+2008-08-29,11713.23,11730.49,11508.78,11543.55,3288120000,11543.55
+2008-08-28,11499.87,11756.46,11493.72,11715.18,3854280000,11715.18
+2008-08-27,11412.46,11575.14,11349.69,11502.51,3499610000,11502.51
+2008-08-26,11383.56,11483.62,11284.47,11412.87,3587570000,11412.87
+2008-08-25,11626.19,11626.19,11336.82,11386.25,3420600000,11386.25
+2008-08-22,11426.79,11684.00,11426.79,11628.06,3741070000,11628.06
+2008-08-21,11415.23,11501.29,11263.63,11430.21,4032590000,11430.21
+2008-08-20,11345.94,11511.06,11240.18,11417.43,4555030000,11417.43
+2008-08-19,11478.09,11501.45,11260.53,11348.55,4159760000,11348.55
+2008-08-18,11659.65,11744.49,11410.18,11479.39,3829290000,11479.39
+2008-08-15,11611.21,11776.41,11540.05,11659.90,4041820000,11659.90
+2008-08-14,11532.07,11744.33,11399.84,11615.93,4064000000,11615.93
+2008-08-13,11632.81,11689.05,11377.37,11532.96,4787600000,11532.96
+2008-08-12,11781.70,11830.39,11541.43,11642.47,4711290000,11642.47
+2008-08-11,11729.67,11933.55,11580.19,11782.35,5067310000,11782.35
+2008-08-08,11432.09,11808.49,11344.23,11734.32,4966810000,11734.32
+2008-08-07,11655.42,11680.50,11355.63,11431.43,5319380000,11431.43
+2008-08-06,11603.64,11745.71,11454.64,11656.07,4873420000,11656.07
+2008-08-05,11286.02,11652.24,11286.02,11615.77,1219310000,11615.77
+2008-08-04,11326.32,11449.67,11144.59,11284.15,4562280000,11284.15
+2008-08-01,11379.89,11512.61,11205.41,11326.32,4684870000,11326.32
+2008-07-31,11577.99,11631.16,11317.69,11378.02,5346050000,11378.02
+2008-07-30,11397.56,11681.47,11328.68,11583.69,5631330000,11583.69
+2008-07-29,11133.44,11444.05,11086.13,11397.56,5414240000,11397.56
+2008-07-28,11369.47,11439.25,11094.76,11131.08,4282960000,11131.08
+2008-07-25,11341.14,11540.78,11252.47,11370.69,4672560000,11370.69
+2008-07-24,11630.34,11714.21,11288.79,11349.28,6127980000,11349.28
+2008-07-23,11603.39,11820.21,11410.02,11632.38,6705830000,11632.38
+2008-07-22,11457.90,11692.79,11273.32,11602.50,6180230000,11602.50
+2008-07-21,11495.02,11663.40,11339.02,11467.34,4630640000,11467.34
+2008-07-18,11436.56,11599.57,11290.50,11496.57,5653280000,11496.57
+2008-07-17,11238.39,11538.50,11118.46,11446.66,7365209600,11446.66
+2008-07-16,10961.89,11308.41,10831.61,11239.28,6738630400,11239.28
+2008-07-15,11050.80,11201.67,10731.96,10962.54,7363640000,10962.54
+2008-07-14,11103.64,11299.70,10972.63,11055.19,5434860000,11055.19
+2008-07-11,11226.17,11292.04,10908.64,11100.54,6742200000,11100.54
+2008-07-10,11148.01,11351.24,11006.01,11229.02,5840430000,11229.02
+2008-07-09,11381.93,11505.12,11115.61,11147.44,5181000000,11147.44
+2008-07-08,11225.03,11459.52,11101.19,11384.21,6034110000,11384.21
+2008-07-07,11289.19,11477.52,11094.44,11231.96,5265420000,11231.96
+2008-07-03,11297.33,11336.49,11158.02,11288.53,3247590000,11288.53
+2008-07-02,11382.34,11510.41,11180.58,11215.51,5276090000,11215.51
+2008-07-01,11344.64,11465.79,11106.65,11382.26,5846290000,11382.26
+2008-06-30,11345.70,11504.55,11226.34,11350.01,5032330000,11350.01
+2008-06-27,11452.85,11556.33,11248.48,11346.51,6208260000,11346.51
+2008-06-26,11808.57,11808.57,11431.92,11453.42,5231280000,11453.42
+2008-06-25,11805.31,12008.70,11683.75,11811.83,4825640000,11811.83
+2008-06-24,11842.36,11962.37,11668.53,11807.43,4705050000,11807.43
+2008-06-23,11843.83,11986.96,11731.06,11842.36,4186370000,11842.36
+2008-06-20,12062.19,12078.23,11785.04,11842.69,5324900000,11842.69
+2008-06-19,12022.54,12188.31,11881.03,12063.09,4811670000,12063.09
+2008-06-18,12158.68,12212.33,11947.07,12029.06,4573570000,12029.06
+2008-06-17,12269.65,12378.67,12114.14,12160.30,3801960000,12160.30
+2008-06-16,12306.86,12381.44,12139.79,12269.08,3706940000,12269.08
+2008-06-13,12144.59,12376.72,12096.23,12307.35,4080420000,12307.35
+2008-06-12,12089.63,12337.72,12041.43,12141.58,4734240000,12141.58
+2008-06-11,12286.34,12317.20,12029.46,12083.77,4779980000,12083.77
+2008-06-10,12277.71,12425.98,12116.58,12289.76,4635070000,12289.76
+2008-06-09,12210.13,12406.36,12102.50,12280.32,4404570000,12280.32
+2008-06-06,12602.74,12602.74,12180.50,12209.81,4771660000,12209.81
+2008-06-05,12388.81,12652.81,12358.07,12604.45,4350790000,12604.45
+2008-06-04,12391.86,12540.37,12283.74,12390.48,4338640000,12390.48
+2008-06-03,12503.20,12620.98,12317.61,12402.85,4396380000,12402.85
+2008-06-02,12637.67,12645.40,12385.76,12503.82,3714320000,12503.82
+2008-05-30,12647.36,12750.84,12555.60,12638.32,3845630000,12638.32
+2008-05-29,12593.87,12760.21,12493.47,12646.22,3894440000,12646.22
+2008-05-28,12542.90,12693.77,12437.38,12594.03,3927240000,12594.03
+2008-05-27,12479.63,12626.84,12397.56,12548.35,3588860000,12548.35
+2008-05-23,12620.90,12637.43,12420.20,12479.63,3516380000,12479.63
+2008-05-22,12597.69,12743.68,12515.78,12625.62,3955960000,12625.62
+2008-05-21,12824.94,12926.71,12550.39,12601.19,4517990000,12601.19
+2008-05-20,13026.04,13026.04,12742.29,12828.68,3854320000,12828.68
+2008-05-19,12985.41,13170.97,12899.19,13028.16,3683970000,13028.16
+2008-05-16,12992.74,13069.52,12860.60,12986.80,3842590000,12986.80
+2008-05-15,12891.29,13028.16,12798.39,12992.66,3836480000,12992.66
+2008-05-14,12825.12,13037.44,12806.21,12898.38,3979370000,12898.38
+2008-05-13,12872.08,12957.65,12716.16,12832.18,4018590000,12832.18
+2008-05-12,12768.38,12903.33,12746.36,12876.05,3370630000,12876.05
+2008-05-09,12860.68,12871.75,12648.09,12745.88,3518620000,12745.88
+2008-05-08,12814.84,12965.95,12727.56,12866.78,3827550000,12866.78
+2008-05-07,13010.82,13097.77,12756.14,12814.35,4075860000,12814.35
+2008-05-06,12968.89,13071.07,12817.53,13020.83,3924100000,13020.83
+2008-05-05,13056.57,13105.75,12896.50,12969.54,3410090000,12969.54
+2008-05-02,13012.53,13191.49,12931.35,13058.20,3953030000,13058.20
+2008-05-01,12818.34,13079.94,12721.94,13010.00,4448780000,13010.00
+2008-04-30,12831.45,13052.91,12746.45,12820.13,4508890000,12820.13
+2008-04-29,12870.37,12970.27,12737.82,12831.94,3815320000,12831.94
+2008-04-28,12890.76,13015.62,12791.55,12871.75,3607000000,12871.75
+2008-04-25,12848.38,12987.29,12703.70,12891.86,3891150000,12891.86
+2008-04-24,12764.68,12979.88,12651.51,12848.95,4461660000,12848.95
+2008-04-23,12721.45,12883.80,12627.00,12763.22,4103610000,12763.22
+2008-04-22,12825.02,12870.86,12604.53,12720.23,3821900000,12720.23
+2008-04-21,12850.91,12902.69,12666.08,12825.02,3420570000,12825.02
+2008-04-18,12626.76,12965.47,12626.76,12849.36,4222380000,12849.36
+2008-04-17,12617.40,12725.93,12472.71,12620.49,3713880000,12620.49
+2008-04-16,12371.51,12670.56,12371.51,12619.27,4260370000,12619.27
+2008-04-15,12303.60,12459.36,12223.97,12362.47,3581230000,12362.47
+2008-04-14,12324.77,12430.86,12208.42,12302.06,3565020000,12302.06
+2008-04-11,12579.78,12579.78,12280.89,12325.42,3723790000,12325.42
+2008-04-10,12526.78,12705.90,12447.96,12581.98,3686150000,12581.98
+2008-04-09,12574.65,12686.93,12416.53,12527.26,3556670000,12527.26
+2008-04-08,12602.66,12664.38,12440.55,12576.44,3602500000,12576.44
+2008-04-07,12612.59,12786.83,12550.22,12612.43,3747780000,12612.43
+2008-04-04,12626.35,12738.30,12489.40,12609.42,3703100000,12609.42
+2008-04-03,12604.69,12734.97,12455.04,12626.03,3920100000,12626.03
+2008-04-02,12651.67,12790.28,12488.22,12608.92,4320440000,12608.92
+2008-04-01,12266.64,12693.93,12266.64,12654.36,4745120000,12654.36
+2008-03-31,12215.92,12384.84,12095.18,12262.89,4188990000,12262.89
+2008-03-28,12303.92,12441.67,12164.22,12216.40,3686980000,12216.40
+2008-03-27,12421.88,12528.13,12264.76,12302.46,4037930000,12302.46
+2008-03-26,12531.79,12531.79,12309.62,12422.86,4055670000,12422.86
+2008-03-25,12547.34,12639.82,12397.62,12532.60,4145120000,12532.60
+2008-03-24,12361.97,12687.61,12346.17,12548.64,4499000000,12548.64
+2008-03-20,12102.43,12434.34,12024.68,12361.32,6145220000,12361.32
+2008-03-19,12391.52,12525.19,12077.27,12099.66,5358550000,12099.66
+2008-03-18,11975.92,12411.63,11975.92,12392.66,5335630000,12392.66
+2008-03-17,11946.45,12119.69,11650.44,11972.25,5683010000,11972.25
+2008-03-14,12146.39,12249.86,11781.43,11951.09,5153780000,11951.09
+2008-03-13,12096.49,12242.29,11832.88,12145.74,5073360000,12145.74
+2008-03-12,12148.61,12360.58,12037.79,12110.24,4414280000,12110.24
+2008-03-11,11741.33,12205.98,11741.33,12156.81,5109080000,12156.81
+2008-03-10,11893.04,11993.75,11691.47,11740.15,4261240000,11740.15
+2008-03-07,12039.09,12131.33,11778.66,11893.69,4565410000,11893.69
+2008-03-06,12254.59,12267.86,12010.03,12040.39,4323460000,12040.39
+2008-03-05,12204.93,12392.74,12105.36,12254.99,4277710000,12254.99
+2008-03-04,12259.14,12291.22,11991.06,12213.80,4757180000,12213.80
+2008-03-03,12264.36,12344.71,12101.29,12258.90,4117570000,12258.90
+2008-02-29,12579.58,12579.58,12210.30,12266.39,4426730000,12266.39
+2008-02-28,12689.28,12713.99,12463.32,12582.18,3938580000,12582.18
+2008-02-27,12683.54,12815.59,12527.64,12694.28,3904700000,12694.28
+2008-02-26,12569.48,12771.14,12449.08,12684.92,4096060000,12684.92
+2008-02-25,12380.77,12612.47,12292.03,12570.22,3866350000,12570.22
+2008-02-22,12281.09,12429.05,12116.92,12381.02,3572660000,12381.02
+2008-02-21,12426.85,12545.79,12225.36,12284.30,3696660000,12284.30
+2008-02-20,12333.31,12489.29,12159.42,12427.26,3870520000,12427.26
+2008-02-19,12349.59,12571.11,12276.81,12337.22,3613550000,12337.22
+2008-02-15,12376.66,12441.20,12216.68,12348.21,3583300000,12348.21
+2008-02-14,12551.51,12611.26,12332.03,12376.98,3644760000,12376.98
+2008-02-13,12368.12,12627.76,12354.22,12552.24,3856420000,12552.24
+2008-02-12,12241.56,12524.12,12207.90,12373.41,4044640000,12373.41
+2008-02-11,12181.89,12332.76,12006.79,12240.01,3593140000,12240.01
+2008-02-08,12248.47,12330.97,12058.01,12182.13,3768490000,12182.13
+2008-02-07,12196.20,12366.99,12045.00,12247.00,4589160000,12247.00
+2008-02-06,12257.25,12436.33,12142.14,12200.10,4008120000,12200.10
+2008-02-05,12631.85,12631.85,12234.97,12265.13,4315740000,12265.13
+2008-02-04,12743.11,12810.34,12557.61,12635.16,3495780000,12635.16
+2008-02-01,12638.17,12841.88,12510.05,12743.19,4650770000,12743.19
+2008-01-31,12438.28,12734.74,12197.09,12650.36,4970290000,12650.36
+2008-01-30,12480.14,12715.96,12311.55,12442.83,4742760000,12442.83
+2008-01-29,12385.19,12604.92,12262.29,12480.30,4232960000,12480.30
+2008-01-28,12205.71,12423.81,12061.42,12383.89,4100930000,12383.89
+2008-01-25,12391.70,12590.69,12103.61,12207.17,4882250000,12207.17
+2008-01-24,12272.69,12522.82,12114.83,12378.61,5735300000,12378.61
+2008-01-23,11969.08,12339.10,11530.12,12270.17,3241680000,12270.17
+2008-01-22,12092.72,12167.42,11508.74,11971.19,6544690000,11971.19
+2008-01-18,12159.94,12441.85,11953.71,12099.30,6004840000,12099.30
+2008-01-17,12467.05,12597.85,12089.38,12159.21,5303130000,12159.21
+2008-01-16,12476.81,12699.05,12294.48,12466.16,5440620000,12466.16
+2008-01-15,12777.50,12777.50,12425.92,12501.11,4601640000,12501.11
+2008-01-14,12613.78,12866.10,12596.95,12778.15,3682090000,12778.15
+2008-01-11,12850.74,12863.34,12495.91,12606.30,4495840000,12606.30
+2008-01-10,12733.11,12931.29,12632.15,12853.09,5170490000,12853.09
+2008-01-09,12590.21,12814.97,12431.53,12735.31,5351030000,12735.31
+2008-01-08,12820.90,12998.11,12511.03,12589.07,4705390000,12589.07
+2008-01-07,12801.15,12984.95,12640.44,12827.49,4221260000,12827.49
+2008-01-04,13046.56,13049.65,12740.51,12800.18,4166000000,12800.18
+2008-01-03,13044.12,13197.43,12968.44,13056.72,3429500000,13056.72
+2008-01-02,13261.82,13338.23,12969.42,13043.96,3452650000,13043.96
+2007-12-31,13364.16,13423.91,13197.35,13264.82,2440880000,13264.82
+2007-12-28,13361.23,13494.30,13272.14,13365.87,2420510000,13365.87
+2007-12-27,13549.17,13551.53,13325.71,13359.61,2365770000,13359.61
+2007-12-26,13547.95,13614.53,13440.16,13551.69,2010500000,13551.69
+2007-12-24,13487.12,13562.72,13451.35,13550.04,2200000,13550.04
+2007-12-21,13241.66,13518.20,13241.66,13450.65,4508590000,13450.65
+2007-12-20,13206.46,13354.00,13112.98,13245.64,3526890000,13245.64
+2007-12-19,13231.98,13368.79,13097.77,13207.27,3401300000,13207.27
+2007-12-18,13168.66,13346.84,13059.32,13232.47,3723690000,13232.47
+2007-12-17,13339.20,13378.38,13111.92,13167.20,3569030000,13167.20
+2007-12-14,13515.11,13557.54,13284.66,13339.85,3401050000,13339.85
+2007-12-13,13473.98,13586.73,13281.00,13517.96,3635170000,13517.96
+2007-12-12,13434.80,13778.98,13299.61,13473.90,4482120000,13473.90
+2007-12-11,13726.87,13850.92,13374.89,13432.77,4080180000,13432.77
+2007-12-10,13623.55,13807.02,13582.50,13727.03,2911760000,13727.03
+2007-12-07,13618.27,13744.02,13514.22,13625.58,3177710000,13625.58
+2007-12-06,13445.85,13652.49,13362.37,13619.89,3568570000,13619.89
+2007-12-05,13244.01,13513.00,13244.01,13444.96,3663660000,13444.96
+2007-12-04,13311.24,13395.21,13139.56,13248.73,3343620000,13248.73
+2007-12-03,13368.22,13490.24,13207.60,13314.57,3323250000,13314.57
+2007-11-30,13314.25,13570.31,13225.32,13371.72,4422200000,13371.72
+2007-11-29,13287.91,13399.03,13150.21,13311.73,3524730000,13311.73
+2007-11-28,12958.04,13353.51,12958.04,13289.45,4508020000,13289.45
+2007-11-27,12744.78,13040.38,12711.98,12958.44,4320720000,12958.44
+2007-11-26,12979.99,13104.44,12707.26,12743.44,3706470000,12743.44
+2007-11-23,12889.45,12981.56,12796.29,12980.88,1612720000,12980.88
+2007-11-21,13006.65,13055.59,12725.39,12799.04,4076230000,12799.04
+2007-11-20,12955.92,13179.23,12800.74,13010.14,4875150000,13010.14
+2007-11-19,13176.30,13195.48,12871.14,12958.44,4119650000,12958.44
+2007-11-16,13109.48,13293.44,12987.22,13176.79,4168870000,13176.79
+2007-11-15,13230.68,13333.59,13007.95,13110.05,3941010000,13110.05
+2007-11-14,13305.47,13465.20,13159.88,13231.01,4031470000,13231.01
+2007-11-13,12975.11,13357.57,12975.11,13307.09,4141310000,13307.09
+2007-11-12,13039.16,13238.73,12910.40,12987.55,4192520000,12987.55
+2007-11-09,13261.17,13321.81,12920.65,13042.74,4587050000,13042.74
+2007-11-08,13299.70,13463.66,13001.93,13266.29,5439720000,13266.29
+2007-11-07,13646.72,13646.72,13269.46,13300.02,4353160000,13300.02
+2007-11-06,13542.34,13716.55,13460.73,13660.94,3879160000,13660.94
+2007-11-05,13592.58,13666.15,13393.67,13543.40,3819330000,13543.40
+2007-11-02,13569.90,13708.58,13381.64,13595.10,4285990000,13595.10
+2007-11-01,13924.16,13924.16,13522.75,13567.87,4241470000,13567.87
+2007-10-31,13792.06,13990.65,13711.59,13930.01,3953070000,13930.01
+2007-10-30,13869.04,13930.91,13719.80,13792.47,3212520000,13792.47
+2007-10-29,13807.35,13966.18,13748.33,13870.26,3124480000,13870.26
+2007-10-26,13675.66,13885.95,13622.01,13806.70,3612120000,13806.70
+2007-10-25,13677.85,13819.78,13471.87,13671.92,4183960000,13671.92
+2007-10-24,13675.58,13751.50,13423.74,13675.25,4003300000,13675.25
+2007-10-23,13568.93,13754.91,13494.95,13676.23,3309120000,13676.23
+2007-10-22,13521.62,13636.80,13337.90,13566.97,3471830000,13566.97
+2007-10-19,13888.47,13888.47,13478.94,13522.02,4160970000,13522.02
+2007-10-18,13887.90,13984.39,13746.22,13888.96,3203210000,13888.96
+2007-10-17,13920.66,14075.84,13738.66,13892.54,3638070000,13892.54
+2007-10-16,13986.34,14061.37,13810.68,13912.94,3234560000,13912.94
+2007-10-15,14092.43,14157.38,13877.82,13984.80,3139290000,13984.80
+2007-10-12,14016.34,14168.51,13949.85,14093.08,2788690000,14093.08
+2007-10-11,14079.10,14279.96,13917.82,14015.12,3911260000,14015.12
+2007-10-10,14165.02,14225.66,13963.26,14078.69,3044760000,14078.69
+2007-10-09,14043.73,14198.83,13980.90,14164.53,2932040000,14164.53
+2007-10-08,14065.36,14134.05,13747.41,14043.73,2040650000,14043.73
+2007-10-05,13969.07,14169.49,13965.05,14066.01,2919030000,14066.01
+2007-10-04,13967.89,14074.54,13894.98,13974.31,2690430000,13974.31
+2007-10-03,14038.86,14090.48,13883.43,13968.05,3065320000,13968.05
+2007-10-02,14087.14,14166.16,13951.72,14047.31,3101910000,14047.31
+2007-10-01,13895.71,14147.30,13869.86,14087.55,3281990000,14087.55
+2007-09-28,13912.94,13994.64,13802.96,13895.63,2925350000,13895.63
+2007-09-27,13879.53,13991.63,13811.17,13912.94,2872180000,13912.94
+2007-09-26,13779.30,13962.61,13741.26,13878.15,3237390000,13878.15
+2007-09-25,13757.84,13847.10,13629.16,13778.65,3187770000,13778.65
+2007-09-24,13821.57,13930.74,13702.89,13759.06,3131310000,13759.06
+2007-09-21,13768.33,13948.95,13740.61,13820.19,3679460000,13820.19
+2007-09-20,13813.52,13893.02,13680.21,13766.70,2957700000,13766.70
+2007-09-19,13740.61,13936.68,13689.80,13815.56,3846750000,13815.56
+2007-09-18,13403.18,13772.15,13379.68,13739.39,3708940000,13739.39
+2007-09-17,13441.95,13514.71,13306.69,13403.42,2598390000,13403.42
+2007-09-14,13421.39,13507.55,13273.68,13442.52,2641740000,13442.52
+2007-09-13,13292.38,13519.91,13292.38,13424.88,2877080000,13424.88
+2007-09-12,13298.31,13408.62,13195.40,13291.65,2885720000,13291.65
+2007-09-11,13129.40,13369.77,13124.68,13308.39,3015330000,13308.39
+2007-09-10,13116.39,13280.67,12992.02,13127.85,2835720000,13127.85
+2007-09-07,13360.74,13360.74,13059.16,13113.38,3191080000,13113.38
+2007-09-06,13306.44,13464.79,13217.11,13363.35,2459590000,13363.35
+2007-09-05,13442.85,13442.85,13203.86,13305.47,2991600000,13305.47
+2007-09-04,13358.39,13521.86,13248.57,13448.86,2766600000,13448.86
+2007-08-31,13240.84,13472.35,13240.84,13357.74,2731610000,13357.74
+2007-08-30,13287.91,13355.46,13126.39,13238.73,2582960000,13238.73
+2007-08-29,13043.07,13336.93,13020.63,13289.29,2824070000,13289.29
+2007-08-28,13318.43,13319.61,13024.29,13041.85,3078090000,13041.85
+2007-08-27,13377.16,13438.46,13248.32,13322.13,2406180000,13322.13
+2007-08-24,13231.78,13402.20,13174.27,13378.87,2541400000,13378.87
+2007-08-23,13237.27,13358.22,13127.69,13235.88,3084390000,13235.88
+2007-08-22,13088.26,13304.33,13075.34,13236.13,3309120000,13236.13
+2007-08-21,13120.05,13228.57,12975.68,13090.86,3012150000,13090.86
+2007-08-20,13078.51,13245.80,12938.77,13121.35,3321340000,13121.35
+2007-08-17,12848.05,13289.70,12847.24,13079.08,3570040000,13079.08
+2007-08-16,12859.52,12996.73,12455.92,12845.78,6509300000,12845.78
+2007-08-15,13021.93,13184.51,12800.83,12861.47,4290930000,12861.47
+2007-08-14,13235.72,13309.04,12974.30,13028.92,3814630000,13028.92
+2007-08-13,13238.24,13440.08,13163.54,13236.53,3696280000,13236.53
+2007-08-10,13270.59,13386.43,12958.04,13239.54,5345780000,13239.54
+2007-08-09,13652.33,13675.66,13196.05,13270.68,5889600000,13270.68
+2007-08-08,13497.23,13769.63,13386.92,13657.86,5499560000,13657.86
+2007-08-07,13467.72,13635.09,13282.38,13504.30,4909390000,13504.30
+2007-08-06,13183.13,13501.86,13077.05,13468.78,5067200000,13468.78
+2007-08-03,13462.25,13539.50,13156.79,13181.91,4272110000,13181.91
+2007-08-02,13357.82,13547.47,13272.79,13463.33,4368850000,13463.33
+2007-08-01,13211.09,13431.06,13041.77,13362.37,5256780000,13362.37
+2007-07-31,13360.66,13579.41,13182.15,13211.99,4524520000,13211.99
+2007-07-30,13266.21,13445.12,13143.87,13358.31,4128780000,13358.31
+2007-07-27,13472.68,13589.17,13228.57,13265.47,4784650000,13265.47
+2007-07-26,13783.12,13793.61,13307.74,13473.57,4472550000,13473.57
+2007-07-25,13718.25,13919.77,13607.70,13785.07,4283200000,13785.07
+2007-07-24,13940.90,13967.65,13661.51,13716.95,4115830000,13716.95
+2007-07-23,13851.73,14039.59,13819.54,13943.42,3102700000,13943.42
+2007-07-20,14000.73,14039.67,13745.65,13851.08,3745780000,13851.08
+2007-07-19,13918.79,14121.04,13860.18,14000.41,3251450000,14000.41
+2007-07-18,13955.05,14020.89,13768.73,13918.22,3609220000,13918.22
+2007-07-17,13951.96,14095.60,13880.67,13971.55,3007140000,13971.55
+2007-07-16,13907.09,14053.57,13834.33,13950.98,2704110000,13950.98
+2007-07-13,13859.86,13982.93,13784.83,13907.25,2801120000,13907.25
+2007-07-12,13579.33,13889.45,13579.33,13861.73,3489600000,13861.73
+2007-07-11,13500.40,13638.75,13435.45,13577.87,3082920000,13577.87
+2007-07-10,13648.59,13685.90,13463.57,13501.70,3244280000,13501.70
+2007-07-09,13612.66,13739.06,13563.89,13649.97,2715330000,13649.97
+2007-07-06,13559.01,13670.46,13501.54,13611.68,2441520000,13611.68
+2007-07-05,13576.24,13637.78,13459.84,13565.84,2622950000,13565.84
+2007-07-03,13556.87,13592.07,13531.83,13577.30,1560790000,13577.30
+2007-07-02,13409.60,13586.97,13406.59,13535.43,2648990000,13535.43
+2007-06-29,13422.61,13556.16,13291.32,13408.62,3165410000,13408.62
+2007-06-28,13427.48,13537.47,13342.05,13422.28,3006710000,13422.28
+2007-06-27,13336.93,13455.36,13205.08,13427.73,3398150000,13427.73
+2007-06-26,13352.37,13491.70,13272.79,13337.66,3398530000,13337.66
+2007-06-25,13360.09,13519.34,13273.68,13352.05,3287250000,13352.05
+2007-06-22,13545.03,13564.13,13323.51,13360.26,4284320000,13360.26
+2007-06-21,13486.66,13596.56,13368.79,13545.84,3161110000,13545.84
+2007-06-20,13636.56,13735.08,13469.43,13489.42,3286900000,13489.42
+2007-06-19,13611.68,13705.41,13527.14,13635.42,2873590000,13635.42
+2007-06-18,13639.00,13720.29,13560.15,13612.98,2480240000,13612.98
+2007-06-15,13556.65,13741.18,13556.65,13639.48,3406030000,13639.48
+2007-06-14,13482.43,13622.66,13444.07,13553.73,2813630000,13553.73
+2007-06-13,13287.62,13502.76,13287.62,13482.35,3077930000,13482.35
+2007-06-12,13424.39,13474.12,13264.05,13295.01,3056200000,13295.01
+2007-06-11,13423.74,13519.88,13335.16,13424.96,2525280000,13424.96
+2007-06-08,13267.14,13445.19,13207.73,13424.39,2993460000,13424.39
+2007-06-07,13463.48,13517.85,13236.34,13266.73,3538470000,13266.73
+2007-06-06,13590.66,13606.75,13403.10,13465.67,2964190000,13465.67
+2007-06-05,13673.19,13689.40,13523.70,13595.46,2939450000,13595.46
+2007-06-04,13667.21,13723.37,13575.14,13676.32,2738930000,13676.32
+2007-06-01,13628.69,13756.69,13562.54,13668.11,2927020000,13668.11
+2007-05-31,13633.00,13718.82,13564.49,13627.64,3335530000,13627.64
+2007-05-30,13517.89,13650.64,13403.26,13633.08,2980210000,13633.08
+2007-05-29,13507.28,13603.26,13428.86,13521.34,2571790000,13521.34
+2007-05-25,13441.94,13571.48,13410.00,13507.28,2316250000,13507.28
+2007-05-24,13522.60,13645.52,13391.56,13441.13,3365530000,13441.13
+2007-05-23,13540.84,13648.69,13476.72,13525.65,3084260000,13525.65
+2007-05-22,13544.99,13632.03,13466.57,13539.95,2860500000,13539.95
+2007-05-21,13556.53,13636.98,13473.31,13542.88,3465360000,13542.88
+2007-05-18,13476.40,13611.95,13454.46,13556.53,2959050000,13556.53
+2007-05-17,13486.96,13558.24,13384.89,13476.72,2868640000,13476.72
+2007-05-16,13374.13,13526.54,13325.49,13487.53,2915350000,13487.53
+2007-05-15,13346.05,13518.33,13302.65,13383.84,3071020000,13383.84
+2007-05-14,13325.81,13432.84,13265.02,13346.78,2776130000,13346.78
+2007-05-11,13212.20,13373.35,13192.62,13326.22,2720780000,13326.22
+2007-05-10,13359.05,13376.20,13161.08,13215.13,3031240000,13215.13
+2007-05-09,13300.62,13410.17,13229.92,13362.87,2935550000,13362.87
+2007-05-08,13309.40,13359.05,13192.45,13309.07,2795720000,13309.07
+2007-05-07,13264.13,13385.06,13218.87,13312.97,2545090000,13312.97
+2007-05-04,13243.08,13340.60,13176.61,13264.62,2761930000,13264.62
+2007-05-03,13206.65,13306.55,13131.42,13241.38,3007970000,13241.38
+2007-05-02,13133.94,13291.60,13105.34,13211.88,3189800000,13211.88
+2007-05-01,13062.75,13188.96,12993.02,13136.14,3400350000,13136.14
+2007-04-30,13120.21,13226.99,13003.91,13062.91,3093420000,13062.91
+2007-04-27,13104.04,13195.05,13002.37,13120.94,2732810000,13120.94
+2007-04-26,13088.84,13197.49,13016.43,13105.50,3211800000,13105.50
+2007-04-25,12951.42,13142.31,12929.80,13089.89,3252590000,13089.89
+2007-04-24,12919.64,13033.66,12845.12,12953.94,3119750000,12953.94
+2007-04-23,12961.49,13029.59,12867.96,12919.40,2575020000,12919.40
+2007-04-20,12811.15,13035.77,12811.15,12961.98,3329940000,12961.98
+2007-04-19,12799.77,12889.17,12677.47,12808.63,2913610000,12808.63
+2007-04-18,12771.08,12871.21,12691.20,12803.84,2971330000,12803.84
+2007-04-17,12719.56,12837.40,12669.50,12773.04,2920570000,12773.04
+2007-04-16,12611.64,12770.60,12596.36,12720.46,2870140000,12720.46
+2007-04-13,12551.91,12654.47,12504.04,12612.13,2690020000,12612.13
+2007-04-12,12483.64,12580.92,12407.50,12552.96,2770570000,12552.96
+2007-04-11,12573.12,12618.63,12432.53,12484.62,2950190000,12484.62
+2007-04-10,12568.49,12641.87,12496.48,12573.85,2510110000,12573.85
+2007-04-09,12562.64,12641.22,12505.83,12569.14,2349410000,12569.14
+2007-04-05,12505.73,12573.02,12501.25,12560.83,2357230000,12560.83
+2007-04-04,12511.36,12591.81,12444.55,12530.05,2616320000,12530.05
+2007-04-03,12431.28,12534.49,12378.94,12510.93,2921760000,12510.93
+2007-04-02,12354.52,12450.81,12284.54,12382.30,2875880000,12382.30
+2007-03-30,12348.91,12442.40,12237.87,12354.35,2903960000,12354.35
+2007-03-29,12301.48,12424.77,12251.89,12348.75,2854710000,12348.75
+2007-03-28,12396.49,12415.56,12234.50,12300.36,3000440000,12300.36
+2007-03-27,12468.59,12484.54,12336.89,12397.29,2673040000,12397.29
+2007-03-26,12480.37,12526.27,12339.53,12469.07,2754660000,12469.07
+2007-03-23,12460.50,12550.07,12396.89,12481.01,2619020000,12481.01
+2007-03-22,12446.72,12524.03,12364.21,12461.14,3129970000,12461.14
+2007-03-21,12288.98,12489.02,12220.49,12447.52,3184770000,12447.52
+2007-03-20,12226.81,12324.31,12172.66,12288.10,2795940000,12288.10
+2007-03-19,12110.41,12273.52,12110.41,12226.17,2777180000,12226.17
+2007-03-16,12160.16,12226.01,12053.05,12110.41,3393640000,12110.41
+2007-03-15,12133.16,12228.42,12060.10,12159.68,2821900000,12159.68
+2007-03-14,12074.52,12187.88,11926.79,12133.40,3758350000,12133.40
+2007-03-13,12307.49,12319.66,12049.85,12075.96,3485570000,12075.96
+2007-03-12,12275.68,12385.44,12205.58,12318.62,2664000000,12318.62
+2007-03-09,12262.06,12379.51,12200.62,12276.32,2623050000,12276.32
+2007-03-08,12193.33,12355.47,12183.79,12260.70,3014850000,12260.70
+2007-03-07,12204.46,12315.18,12122.11,12192.45,3141350000,12192.45
+2007-03-06,12051.17,12252.61,12051.17,12207.59,3358160000,12207.59
+2007-03-05,12111.61,12220.16,11973.58,12050.41,3480520000,12050.41
+2007-03-02,12233.78,12293.15,12064.91,12114.10,3312260000,12114.10
+2007-03-01,12265.59,12338.89,11996.17,12234.34,3874910000,12234.34
+2007-02-28,12214.92,12396.81,12122.03,12268.63,3925250000,12268.63
+2007-02-27,12628.90,12628.90,12078.85,12216.24,4065230000,12216.24
+2007-02-26,12647.88,12746.34,12562.72,12632.26,2822170000,12632.26
+2007-02-23,12679.89,12726.79,12578.51,12647.48,2579950000,12647.48
+2007-02-22,12735.77,12792.97,12621.93,12686.02,1950770000,12686.02
+2007-02-21,12782.87,12813.88,12662.79,12738.41,2606980000,12738.41
+2007-02-20,12766.85,12845.76,12675.04,12786.64,2337860000,12786.64
+2007-02-16,12764.13,12829.42,12685.86,12767.57,2399450000,12767.57
+2007-02-15,12741.70,12828.38,12681.85,12765.01,2490920000,12765.01
+2007-02-14,12651.29,12793.29,12623.21,12741.86,2699290000,12741.86
+2007-02-13,12549.19,12702.36,12549.19,12654.85,2652150000,12654.85
+2007-02-12,12595.90,12605.11,12536.77,12552.55,2395680000,12552.55
+2007-02-09,12638.03,12725.59,12518.58,12580.83,2951810000,12580.83
+2007-02-08,12639.16,12666.88,12576.59,12637.63,2816180000,12637.63
+2007-02-07,12656.86,12748.99,12589.56,12666.87,2618820000,12666.87
+2007-02-06,12661.66,12738.41,12586.44,12666.31,2608710000,12666.31
+2007-02-05,12641.08,12681.06,12630.50,12661.74,2439430000,12661.74
+2007-02-02,12673.84,12740.65,12582.99,12653.49,2569450000,12653.49
+2007-02-01,12617.20,12741.30,12563.85,12673.68,2914890000,12673.68
+2007-01-31,12520.03,12685.54,12461.30,12621.69,2976690000,12621.69
+2007-01-30,12484.70,12538.06,12463.07,12523.31,2706250000,12523.31
+2007-01-29,12487.10,12599.74,12422.93,12490.78,2730480000,12490.78
+2007-01-26,12503.28,12582.67,12391.44,12487.02,2626620000,12487.02
+2007-01-25,12621.77,12670.48,12461.54,12502.56,2994330000,12502.56
+2007-01-24,12534.37,12659.42,12489.98,12621.77,2783180000,12621.77
+2007-01-23,12467.96,12553.44,12467.96,12533.80,2975070000,12533.80
+2007-01-22,12566.33,12619.04,12389.68,12477.16,2540120000,12477.16
+2007-01-19,12567.93,12649.89,12462.50,12565.53,2777480000,12565.53
+2007-01-18,12575.06,12674.16,12487.90,12567.93,2822430000,12567.93
+2007-01-17,12563.53,12613.28,12550.95,12577.15,2690270000,12577.15
+2007-01-16,12555.84,12638.27,12489.90,12582.59,2599530000,12582.59
+2007-01-12,12514.66,12616.08,12432.30,12556.08,2686480000,12556.08
+2007-01-11,12442.96,12586.12,12413.72,12514.98,2857870000,12514.98
+2007-01-10,12417.00,12487.18,12313.01,12442.16,2764660000,12442.16
+2007-01-09,12424.77,12516.66,12337.85,12416.60,3038380000,12416.60
+2007-01-08,12393.93,12445.37,12337.53,12423.49,2763340000,12423.49
+2007-01-05,12480.05,12504.40,12326.79,12398.01,2919400000,12398.01
+2007-01-04,12467.32,12510.26,12405.47,12480.69,3004460000,12480.69
+2007-01-03,12459.54,12630.34,12373.82,12474.52,3429160000,12474.52
+2006-12-29,12500.48,12560.16,12423.81,12463.15,1678200000,12463.15
+2006-12-28,12510.57,12566.17,12440.23,12501.52,1508570000,12501.52
+2006-12-27,12463.46,12518.34,12407.62,12510.57,1667370000,12510.57
+2006-12-26,12341.94,12439.19,12301.40,12407.63,1310310000,12407.63
+2006-12-22,12407.87,12417.96,12341.77,12343.21,1647590000,12343.21
+2006-12-21,12461.62,12526.59,12369.97,12421.25,2322410000,12421.25
+2006-12-20,12471.32,12549.35,12393.45,12463.87,2387630000,12463.87
+2006-12-19,12439.51,12517.78,12348.50,12471.32,2717060000,12471.32
+2006-12-18,12446.24,12545.74,12372.30,12441.27,2568140000,12441.27
+2006-12-15,12417.96,12536.37,12377.35,12445.52,3229580000,12445.52
+2006-12-14,12317.50,12472.76,12271.44,12416.76,2729700000,12416.76
+2006-12-13,12312.71,12411.55,12263.19,12317.50,2552260000,12317.50
+2006-12-12,12328.24,12396.01,12222.65,12315.58,2738170000,12315.58
+2006-12-11,12306.21,12399.54,12245.32,12328.48,2289900000,12328.48
+2006-12-08,12256.21,12332.16,12243.31,12307.48,2440460000,12307.48
+2006-12-07,12310.13,12396.33,12233.06,12278.41,2743150000,12278.41
+2006-12-06,12328.72,12390.88,12239.95,12309.25,2725280000,12309.25
+2006-12-05,12283.69,12398.57,12218.24,12331.60,2755700000,12331.60
+2006-12-04,12195.57,12349.87,12149.27,12283.85,2766320000,12283.85
+2006-12-01,12220.97,12289.30,12070.52,12194.13,2800980000,12194.13
+2006-11-30,12226.73,12317.10,12118.42,12221.93,4006230000,12221.93
+2006-11-29,12134.40,12283.05,12119.70,12226.73,2790970000,12226.73
+2006-11-28,12095.27,12148.78,12073.40,12136.44,2639750000,12136.44
+2006-11-27,12279.13,12303.32,12079.01,12121.71,2711210000,12121.71
+2006-11-24,12321.71,12340.89,12219.28,12280.17,832550000,12280.17
+2006-11-22,12321.91,12403.54,12238.43,12326.95,2237710000,12326.95
+2006-11-21,12312.13,12409.31,12233.94,12321.59,2597940000,12321.59
+2006-11-20,12340.71,12400.10,12257.34,12316.54,2546710000,12316.54
+2006-11-17,12293.49,12342.55,12278.20,12342.55,2726100000,12342.55
+2006-11-16,12250.05,12375.37,12204.00,12305.82,2835730000,12305.82
+2006-11-15,12214.37,12326.07,12156.37,12251.71,2831130000,12251.71
+2006-11-14,12132.44,12261.15,12051.68,12218.01,3027480000,12218.01
+2006-11-13,12084.89,12164.22,12084.89,12131.88,2386340000,12131.88
+2006-11-10,12102.74,12173.08,12074.01,12108.43,2290200000,12108.43
+2006-11-09,12174.70,12236.10,12039.59,12103.30,3012050000,12103.30
+2006-11-08,12147.38,12233.54,12051.60,12176.54,2814820000,12176.54
+2006-11-07,12104.75,12239.94,12065.20,12156.77,2636390000,12156.77
+2006-11-06,11985.16,12146.45,11973.23,12105.55,2533550000,12105.55
+2006-11-03,12018.30,12095.30,11928.97,11986.04,2419730000,11986.04
+2006-11-02,12023.98,12070.25,11938.89,12018.54,2646180000,12018.54
+2006-11-01,12080.25,12160.70,11972.99,12031.02,2821160000,12031.02
+2006-10-31,12086.18,12160.46,11986.84,12080.73,2803030000,12080.73
+2006-10-30,12074.01,12117.07,12050.23,12086.49,2770440000,12086.49
+2006-10-27,12164.78,12202.72,12024.78,12090.26,2458450000,12090.26
+2006-10-26,12134.84,12236.10,12037.99,12163.66,2793350000,12163.66
+2006-10-25,12127.24,12212.16,12017.66,12134.68,2953540000,12134.68
+2006-10-24,12116.51,12204.80,12028.14,12127.88,2876890000,12127.88
+2006-10-23,12001.33,12177.35,11940.41,12116.91,2480430000,12116.91
+2006-10-20,12013.01,12087.38,11881.34,12002.37,2526410000,12002.37
+2006-10-19,11988.92,12082.33,11911.44,12011.73,2619830000,12011.73
+2006-10-18,11947.62,12108.91,11900.79,11992.68,2658840000,11992.68
+2006-10-17,11977.40,12024.54,11849.16,11950.02,2519620000,11950.02
+2006-10-16,11957.70,11996.92,11945.70,11980.59,2305920000,11980.59
+2006-10-13,11947.22,12009.97,11862.29,11960.51,2482920000,11960.51
+2006-10-12,11896.63,11959.14,11852.12,11947.70,2514350000,11947.70
+2006-10-11,11865.49,11907.60,11762.72,11852.13,2521000000,11852.13
+2006-10-10,11857.73,11930.33,11778.09,11867.17,2376140000,11867.17
+2006-10-09,11849.56,11923.53,11759.36,11857.81,1935170000,11857.81
+2006-10-06,11865.49,11921.04,11743.35,11850.21,2523000000,11850.21
+2006-10-05,11832.51,11869.33,11821.55,11866.69,2817240000,11866.69
+2006-10-04,11722.94,11879.18,11654.02,11850.61,3019880000,11850.61
+2006-10-03,11670.11,11794.41,11608.23,11727.34,2682690000,11727.34
+2006-10-02,11678.99,11773.60,11608.79,11670.35,2154480000,11670.35
+2006-09-29,11718.05,11782.49,11642.17,11679.07,2273430000,11679.07
+2006-09-28,11689.40,11775.36,11625.92,11718.45,2397820000,11718.45
+2006-09-27,11670.19,11775.60,11595.75,11689.24,2749190000,11689.24
+2006-09-26,11575.73,11723.74,11517.54,11669.39,2673350000,11669.39
+2006-09-25,11536.67,11616.23,11486.00,11575.81,2710240000,11575.81
+2006-09-22,11532.91,11588.62,11423.57,11508.10,2162880000,11508.10
+2006-09-21,11611.67,11677.39,11471.76,11533.23,2627440000,11533.23
+2006-09-20,11542.28,11680.19,11514.50,11613.19,2543070000,11613.19
+2006-09-19,11554.60,11605.67,11450.30,11540.91,2390850000,11540.91
+2006-09-18,11538.35,11588.22,11528.43,11555.00,2325080000,11555.00
+2006-09-15,11528.75,11661.38,11504.57,11560.77,3198030000,11560.77
+2006-09-14,11508.82,11548.84,11495.77,11527.39,2351220000,11527.39
+2006-09-13,11487.69,11605.59,11423.73,11543.32,2597220000,11543.32
+2006-09-12,11412.52,11512.74,11396.83,11498.09,2791580000,11498.09
+2006-09-11,11389.87,11468.88,11295.90,11396.84,2506430000,11396.84
+2006-09-08,11332.24,11448.30,11295.18,11392.11,2132890000,11392.11
+2006-09-07,11405.16,11443.66,11273.89,11331.44,2325850000,11331.44
+2006-09-06,11421.33,11469.27,11395.15,11406.20,2329870000,11406.20
+2006-09-05,11461.83,11533.87,11385.95,11469.28,2114480000,11469.28
+2006-09-01,11427.41,11476.40,11381.14,11464.15,1800520000,11464.15
+2006-08-31,11383.47,11451.03,11326.80,11381.15,1974540000,11381.15
+2006-08-30,11365.98,11452.95,11309.99,11382.91,2060690000,11382.91
+2006-08-29,11352.65,11432.38,11255.88,11369.94,2093720000,11369.94
+2006-08-28,11285.33,11411.24,11240.91,11352.01,1834920000,11352.01
+2006-08-25,11301.22,11350.09,11218.66,11284.05,1667580000,11284.05
+2006-08-24,11297.82,11386.59,11232.83,11304.46,1930320000,11304.46
+2006-08-23,11337.12,11394.75,11238.67,11297.90,1893670000,11297.90
+2006-08-22,11344.41,11426.13,11279.25,11339.84,1908740000,11339.84
+2006-08-21,11353.29,11381.46,11322.31,11345.04,1759240000,11345.04
+2006-08-18,11333.76,11437.66,11273.49,11381.47,2033910000,11381.47
+2006-08-17,11321.19,11372.34,11298.54,11334.96,2458340000,11334.96
+2006-08-16,11224.91,11373.78,11207.85,11327.12,2554570000,11327.12
+2006-08-15,11098.03,11271.25,11098.03,11230.26,2334100000,11230.26
+2006-08-14,11089.07,11242.83,11049.68,11097.87,2118020000,11097.87
+2006-08-11,11103.55,11121.40,11042.88,11088.02,2004540000,11088.02
+2006-08-10,11073.14,11176.47,10998.06,11124.37,2402190000,11124.37
+2006-08-09,11168.47,11296.22,11044.64,11076.18,2555180000,11076.18
+2006-08-08,11218.18,11319.51,11117.80,11173.59,2457840000,11173.59
+2006-08-07,11239.47,11294.14,11143.02,11219.38,2045660000,11219.38
+2006-08-04,11244.59,11367.94,11165.11,11240.35,2530970000,11240.35
+2006-08-03,11195.28,11304.78,11101.55,11242.59,2728440000,11242.59
+2006-08-02,11167.91,11228.98,11124.52,11199.92,2610750000,11199.92
+2006-08-01,11184.80,11210.65,11035.92,11125.73,2527690000,11125.73
+2006-07-31,11218.90,11265.80,11115.24,11185.68,2461300000,11185.68
+2006-07-28,11102.11,11282.05,11102.11,11219.70,2480420000,11219.70
+2006-07-27,11104.19,11245.47,11040.80,11100.43,2776710000,11100.43
+2006-07-26,11102.91,11208.09,10987.41,11102.51,2667710000,11102.51
+2006-07-25,11037.59,11133.73,11000.05,11103.71,2563930000,11103.71
+2006-07-24,10868.70,11096.35,10868.70,11051.05,2312720000,11051.05
+2006-07-21,10937.94,10995.73,10778.58,10868.38,2704090000,10868.38
+2006-07-20,11007.26,11098.75,10884.47,10928.10,2345580000,10928.10
+2006-07-19,10854.22,11038.16,10796.74,11011.42,2701980000,11011.42
+2006-07-18,10745.84,10867.02,10658.35,10799.23,2481750000,10799.23
+2006-07-17,10739.35,10858.22,10668.35,10747.36,2146410000,10747.36
+2006-07-14,10846.53,10892.64,10664.43,10739.35,2467120000,10739.35
+2006-07-13,11012.62,11015.19,10790.82,10846.29,2545760000,10846.29
+2006-07-12,11133.97,11181.12,10973.37,11013.18,2250450000,11013.18
+2006-07-11,11102.59,11186.32,10987.33,11134.77,2310850000,11134.77
+2006-07-10,11130.53,11174.47,11090.10,11103.55,1854590000,11103.55
+2006-07-07,11224.18,11227.62,11040.32,11090.67,1988150000,11090.67
+2006-07-06,11147.12,11301.58,11117.16,11225.30,2009160000,11225.30
+2006-07-05,11225.06,11239.47,11083.94,11151.82,2165070000,11151.82
+2006-07-03,11149.34,11277.09,11146.06,11228.02,1114470000,11228.02
+2006-06-30,11190.80,11288.86,11100.11,11150.22,3049560000,11150.22
+2006-06-29,10974.36,11225.06,10974.36,11190.80,2621250000,11190.80
+2006-06-28,10925.30,11026.07,10869.02,10973.56,2085490000,10973.56
+2006-06-27,11048.24,11064.09,10920.73,10924.74,2203130000,10924.74
+2006-06-26,10990.29,11089.07,10937.06,11045.28,1878580000,11045.28
+2006-06-23,11019.19,11098.67,10932.82,10989.09,2017270000,10989.09
+2006-06-22,11077.78,11127.73,10954.83,11019.11,2148180000,11019.11
+2006-06-21,10975.24,11165.91,10952.43,11079.46,2361230000,11079.46
+2006-06-20,10942.03,11066.73,10895.28,10974.84,2232950000,10974.84
+2006-06-19,11014.87,11098.99,10886.63,10942.11,2517200000,10942.11
+2006-06-16,11009.10,11045.04,10984.29,11014.54,2783390000,11014.54
+2006-06-15,10817.48,11049.85,10788.34,11015.19,2775480000,11015.19
+2006-06-14,10713.10,10816.99,10699.25,10816.91,2667990000,10816.91
+2006-06-13,10783.14,10893.04,10653.23,10706.14,3215770000,10706.14
+2006-06-12,10892.00,10969.32,10767.61,10792.58,2247010000,10792.58
+2006-06-09,10939.14,11015.67,10842.89,10891.92,2214000000,10891.92
+2006-06-08,10929.70,11032.15,10726.15,10938.82,3543790000,10938.82
+2006-06-07,11002.06,11107.48,10897.76,10930.90,2644170000,10930.90
+2006-06-06,11048.24,11140.45,10890.24,11002.14,2697650000,11002.14
+2006-06-05,11247.55,11259.96,11025.75,11048.72,2313470000,11048.72
+2006-06-02,11260.52,11329.28,11158.06,11247.87,2295540000,11247.87
+2006-06-01,11169.03,11290.86,11115.40,11260.28,2360160000,11260.28
+2006-05-31,11091.15,11225.78,11050.40,11168.31,2692160000,11168.31
+2006-05-30,11277.25,11277.25,11071.70,11094.43,2176190000,11094.43
+2006-05-26,11211.69,11329.36,11177.43,11278.61,1814020000,11278.61
+2006-05-25,11114.96,11258.12,11089.55,11211.05,2372730000,11211.05
+2006-05-24,11100.11,11241.15,10980.29,11117.32,2999030000,11117.32
+2006-05-23,11126.29,11254.68,11068.49,11098.35,2605250000,11098.35
+2006-05-22,11092.90,11175.03,11040.16,11125.32,2773010000,11125.32
+2006-05-19,11124.37,11254.60,11009.98,11144.06,2982300000,11144.06
+2006-05-18,11206.17,11301.26,11096.35,11128.29,2537490000,11128.29
+2006-05-17,11410.13,11412.28,11139.17,11205.61,2830200000,11205.61
+2006-05-16,11428.21,11520.42,11334.64,11419.89,2386210000,11419.89
+2006-05-15,11380.43,11485.61,11273.65,11428.77,2505660000,11428.77
+2006-05-12,11500.01,11551.40,11336.96,11380.99,2567970000,11380.99
+2006-05-11,11639.29,11660.58,11449.74,11500.73,2531520000,11500.73
+2006-05-10,11630.48,11709.09,11545.64,11642.65,2268550000,11642.65
+2006-05-09,11584.62,11684.28,11535.71,11639.77,2157290000,11639.77
+2006-05-08,11576.37,11665.14,11504.09,11584.54,2151300000,11584.54
+2006-05-05,11440.62,11616.16,11440.62,11577.74,2294760000,11577.74
+2006-05-04,11401.80,11512.18,11366.82,11438.86,2431450000,11438.86
+2006-05-03,11414.69,11472.96,11308.55,11400.28,2395230000,11400.28
+2006-05-02,11372.74,11427.43,11343.28,11416.44,2403470000,11416.44
+2006-05-01,11367.78,11476.96,11304.30,11343.29,2437040000,11343.29
+2006-04-28,11358.33,11462.95,11278.13,11367.14,2419920000,11367.14
+2006-04-27,11349.53,11465.75,11220.74,11382.51,2772010000,11382.51
+2006-04-26,11283.25,11428.77,11256.12,11354.49,2502690000,11354.49
+2006-04-25,11336.56,11401.32,11213.05,11283.25,2366380000,11283.25
+2006-04-24,11346.81,11420.05,11246.35,11336.32,2117330000,11336.32
+2006-04-21,11343.45,11468.16,11272.61,11347.45,2392630000,11347.45
+2006-04-20,11278.53,11429.25,11221.30,11342.89,2512920000,11342.89
+2006-04-19,11265.40,11379.79,11181.84,11278.77,2447310000,11278.77
+2006-04-18,11074.58,11302.30,11064.01,11268.77,2595440000,11268.77
+2006-04-17,11137.33,11203.13,11017.43,11073.78,1794650000,11073.78
+2006-04-13,11130.13,11210.73,11053.29,11137.65,1891940000,11137.65
+2006-04-12,11089.47,11194.00,11052.17,11129.97,1938100000,11129.97
+2006-04-11,11141.33,11220.98,11017.99,11089.63,2232880000,11089.63
+2006-04-10,11119.88,11211.37,11083.06,11141.33,1898320000,11141.33
+2006-04-07,11228.10,11268.92,11108.75,11120.04,2082470000,11120.04
+2006-04-06,11233.01,11294.30,11137.57,11216.50,2281680000,11216.50
+2006-04-05,11203.21,11290.30,11141.82,11239.55,2420020000,11239.55
+2006-04-04,11142.54,11269.17,11094.03,11203.85,2147660000,11203.85
+2006-04-03,11113.00,11287.02,11101.07,11144.94,2494080000,11144.94
+2006-03-31,11151.34,11229.47,11069.78,11109.32,2236710000,11109.32
+2006-03-30,11195.36,11259.08,11118.12,11150.70,2294560000,11150.70
+2006-03-29,11154.94,11283.97,11117.48,11215.70,2143540000,11215.70
+2006-03-28,11250.11,11312.31,11132.05,11154.54,2148580000,11154.54
+2006-03-27,11280.13,11314.96,11194.07,11250.11,2029700000,11250.11
+2006-03-24,11270.61,11353.21,11197.21,11279.97,2326070000,11279.97
+2006-03-23,11317.35,11363.46,11207.85,11270.29,1980940000,11270.29
+2006-03-22,11234.51,11358.01,11200.22,11317.43,2039810000,11317.43
+2006-03-21,11275.89,11364.34,11188.56,11235.47,2147370000,11235.47
+2006-03-20,11278.93,11350.73,11208.33,11274.53,1976830000,11274.53
+2006-03-17,11294.94,11294.94,11253.23,11279.65,2549620000,11279.65
+2006-03-16,11210.97,11324.80,11176.07,11253.24,2292180000,11253.24
+2006-03-15,11149.76,11258.28,11097.23,11209.77,2293000000,11209.77
+2006-03-14,11076.02,11190.96,11030.23,11151.34,2165270000,11151.34
+2006-03-13,11067.61,11157.82,11019.75,11076.02,2070330000,11076.02
+2006-03-10,10972.92,11125.41,10948.43,11076.34,2123450000,11076.34
+2006-03-09,11005.66,11093.39,10923.86,10972.28,2140110000,10972.28
+2006-03-08,10977.08,11065.61,10885.99,11005.74,2442870000,11005.74
+2006-03-07,10957.31,11032.31,10885.35,10980.69,2268050000,10980.69
+2006-03-06,11022.47,11084.66,10899.76,10958.59,2280190000,10958.59
+2006-03-03,11024.23,11125.01,10942.99,11021.59,2152950000,11021.59
+2006-03-02,11052.57,11090.91,10951.71,11025.51,2494590000,11025.51
+2006-03-01,10993.25,11115.80,10960.60,11053.53,2308320000,11053.53
+2006-02-28,11096.75,11115.24,10947.07,10993.41,2370860000,10993.41
+2006-02-27,11062.81,11180.48,11038.72,11097.55,1975320000,11097.55
+2006-02-24,11068.33,11085.38,11010.46,11061.85,1933010000,11061.85
+2006-02-23,11133.52,11167.83,11017.27,11069.22,2144210000,11069.22
+2006-02-22,11086.98,11159.02,11064.25,11137.17,2222380000,11137.17
+2006-02-21,11115.48,11182.68,11011.18,11069.06,2104320000,11069.06
+2006-02-17,11119.56,11178.80,11035.44,11115.32,2128260000,11115.32
+2006-02-16,11059.05,11154.14,10997.66,11120.68,2251490000,11120.68
+2006-02-15,11025.67,11115.56,10940.18,11058.97,2317590000,11058.97
+2006-02-14,10890.72,11071.54,10873.62,11028.39,2437940000,11028.39
+2006-02-13,10915.21,10982.93,10824.60,10892.32,1850080000,10892.32
+2006-02-10,10883.51,10972.76,10787.62,10919.05,2290050000,10919.05
+2006-02-09,10859.42,11003.50,10800.91,10883.35,2441920000,10883.35
+2006-02-08,10742.16,10897.44,10712.30,10858.62,2456860000,10858.62
+2006-02-07,10796.42,10874.79,10691.97,10749.76,2366370000,10749.76
+2006-02-06,10793.30,10868.62,10725.91,10798.27,2132360000,10798.27
+2006-02-03,10849.57,10905.28,10725.35,10793.62,2282210000,10793.62
+2006-02-02,10950.11,10987.73,10800.35,10851.98,2565300000,10851.98
+2006-02-01,10862.14,11001.82,10815.39,10953.95,2589410000,10953.95
+2006-01-31,10900.40,10970.28,10807.55,10864.86,2708310000,10864.86
+2006-01-30,10913.13,10930.34,10887.67,10899.92,2282730000,10899.92
+2006-01-27,10815.32,10988.29,10766.01,10907.21,2623620000,10907.21
+2006-01-26,10768.17,10827.96,10709.73,10809.47,2856780000,10809.47
+2006-01-25,10713.26,10832.93,10615.20,10709.74,2617060000,10709.74
+2006-01-24,10690.21,10804.75,10624.49,10712.22,2608720000,10712.22
+2006-01-23,10668.75,10783.70,10607.36,10688.77,2256070000,10688.77
+2006-01-20,10880.71,10890.08,10637.21,10667.39,2845810000,10667.39
+2006-01-19,10855.18,10965.00,10796.66,10880.71,2444020000,10880.71
+2006-01-18,10890.08,10934.90,10778.33,10854.86,2233200000,10854.86
+2006-01-17,10957.55,10977.01,10841.17,10896.32,2179970000,10896.32
+2006-01-13,10961.48,11033.04,10888.88,10959.87,2206510000,10959.87
+2006-01-12,11043.12,11070.10,10918.09,10962.36,2318350000,10962.36
+2006-01-11,11011.66,11099.15,10939.86,11043.44,2406130000,11043.44
+2006-01-10,11010.46,11054.49,10902.96,11011.58,2373080000,11011.58
+2006-01-09,10959.47,11053.93,10906.33,11011.90,2301490000,11011.90
+2006-01-06,10875.45,11005.98,10846.21,10959.31,2446560000,10959.31
+2006-01-05,10880.39,10951.39,10797.55,10882.15,2433340000,10882.15
+2006-01-04,10843.97,10946.27,10772.89,10880.15,2515330000,10880.15
+2006-01-03,10718.30,10888.40,10650.18,10847.41,2554570000,10847.41
+2005-12-30,10783.86,10801.87,10675.64,10717.50,1443500000,10717.50
+2005-12-29,10795.70,10870.71,10747.76,10784.82,1382540000,10784.82
+2005-12-28,10778.25,10858.07,10750.40,10796.26,1422360000,10796.26
+2005-12-27,10883.75,10956.99,10754.16,10777.77,1540470000,10777.77
+2005-12-23,10901.68,10904.40,10869.98,10883.27,1285810000,10883.27
+2005-12-22,10831.56,10928.34,10785.93,10889.44,1888500000,10889.44
+2005-12-21,10805.63,10933.70,10776.01,10833.73,2065170000,10833.73
+2005-12-20,10836.93,10905.28,10754.56,10805.55,1996690000,10805.55
+2005-12-19,10875.51,10970.04,10781.70,10836.53,2208810000,10836.53
+2005-12-16,10881.67,10978.21,10830.84,10875.59,2584190000,10875.59
+2005-12-15,10883.43,10985.01,10803.55,10881.67,2180590000,10881.67
+2005-12-14,10821.32,10953.07,10786.34,10883.51,2145520000,10883.51
+2005-12-13,10765.69,10902.64,10694.29,10823.72,2390020000,10823.72
+2005-12-12,10778.66,10857.02,10707.18,10767.77,1876550000,10767.77
+2005-12-09,10751.76,10845.33,10694.05,10778.58,1896290000,10778.58
+2005-12-08,10808.43,10871.11,10705.17,10755.12,2178300000,10755.12
+2005-12-07,10856.86,10916.89,10737.27,10810.91,2093830000,10810.91
+2005-12-06,10835.41,10956.13,10809.15,10856.86,2110740000,10856.86
+2005-12-05,10876.95,10923.37,10766.57,10835.01,2325840000,10835.01
+2005-12-02,10912.01,10952.83,10818.36,10877.51,2125580000,10877.51
+2005-12-01,10806.03,10969.97,10806.03,10912.57,2614830000,10912.57
+2005-11-30,10883.91,10959.80,10789.38,10805.87,2374690000,10805.87
+2005-11-29,10888.48,10994.85,10850.29,10888.16,2268340000,10888.16
+2005-11-28,10932.74,10992.39,10839.37,10890.72,2016900000,10890.72
+2005-11-25,10915.13,10997.50,10883.55,10931.62,724940000,10931.62
+2005-11-23,10865.90,10950.59,10855.42,10916.09,1985400000,10916.09
+2005-11-22,10815.96,10907.77,10729.99,10871.43,2291420000,10871.43
+2005-11-21,10766.33,10871.11,10708.86,10820.28,2117350000,10820.28
+2005-11-18,10719.34,10865.58,10663.79,10766.33,2453290000,10766.33
+2005-11-17,10677.00,10778.50,10619.61,10720.22,2298040000,10720.22
+2005-11-16,10697.81,10710.78,10653.14,10674.76,2121580000,10674.76
+2005-11-15,10697.01,10783.62,10610.08,10686.44,2359370000,10686.44
+2005-11-14,10686.60,10756.88,10618.89,10697.17,1899780000,10697.17
+2005-11-11,10641.30,10725.99,10595.89,10686.04,1773140000,10686.04
+2005-11-10,10550.61,10655.22,10519.71,10640.10,2378460000,10640.10
+2005-11-09,10539.24,10637.78,10466.24,10546.21,2214460000,10546.21
+2005-11-08,10574.18,10606.80,10478.49,10539.72,1965050000,10539.72
+2005-11-07,10531.24,10632.34,10488.74,10586.23,1987580000,10586.23
+2005-11-04,10523.23,10593.51,10441.59,10530.76,2050510000,10530.76
+2005-11-03,10470.49,10613.84,10421.98,10522.59,2716630000,10522.59
+2005-11-02,10406.29,10527.32,10347.70,10472.73,2648090000,10472.73
+2005-11-01,10437.51,10510.03,10352.42,10406.77,2457850000,10406.77
+2005-10-31,10403.17,10539.16,10372.67,10440.07,2567470000,10440.07
+2005-10-28,10231.15,10433.51,10213.14,10402.77,2379400000,10402.77
+2005-10-27,10334.81,10348.66,10229.95,10229.95,2395370000,10229.95
+2005-10-26,10377.39,10474.18,10283.10,10344.98,2467750000,10344.98
+2005-10-25,10383.88,10457.52,10282.78,10377.87,2312470000,10377.87
+2005-10-24,10219.15,10411.57,10219.15,10385.00,2197790000,10385.00
+2005-10-21,10282.22,10354.02,10161.60,10215.22,2470920000,10215.22
+2005-10-20,10411.73,10483.21,10230.27,10281.10,2617250000,10281.10
+2005-10-19,10277.18,10444.15,10173.52,10414.13,2703590000,10414.13
+2005-10-18,10349.14,10412.85,10233.47,10285.26,2197010000,10285.26
+2005-10-17,10287.42,10419.58,10213.06,10348.10,2054570000,10348.10
+2005-10-14,10216.59,10327.21,10165.12,10287.34,2188940000,10287.34
+2005-10-13,10216.91,10309.20,10098.18,10216.59,2351150000,10216.59
+2005-10-12,10247.40,10308.23,10186.17,10216.90,2491280000,10216.90
+2005-10-11,10239.16,10361.15,10195.13,10253.17,2299040000,10253.17
+2005-10-10,10292.95,10378.19,10184.09,10238.76,2195990000,10238.76
+2005-10-07,10287.42,10387.48,10221.47,10292.31,2126080000,10292.31
+2005-10-06,10317.36,10425.98,10200.81,10287.10,2792030000,10287.10
+2005-10-05,10434.81,10477.21,10299.27,10317.36,2546780000,10317.36
+2005-10-04,10534.36,10618.41,10409.89,10441.11,2341420000,10441.11
+2005-10-03,10569.50,10637.00,10486.17,10535.48,2097490000,10535.48
+2005-09-30,10540.51,10569.81,10526.34,10568.70,2097520000,10568.70
+2005-09-29,10472.61,10583.43,10389.01,10552.78,2176120000,10552.78
+2005-09-28,10456.61,10560.02,10390.05,10473.08,2106980000,10473.08
+2005-09-27,10444.58,10534.31,10376.83,10456.21,1976270000,10456.21
+2005-09-26,10420.22,10544.98,10381.53,10443.63,2022220000,10443.63
+2005-09-23,10421.81,10494.42,10328.59,10419.59,1973020000,10419.59
+2005-09-22,10376.20,10489.64,10303.51,10422.05,2424720000,10422.05
+2005-09-21,10484.23,10512.02,10335.28,10378.03,2548150000,10378.03
+2005-09-20,10558.19,10642.26,10453.98,10481.52,2319250000,10481.52
+2005-09-19,10641.87,10656.75,10497.29,10557.63,2076540000,10557.63
+2005-09-16,10560.50,10696.24,10539.64,10641.94,3152470000,10641.94
+2005-09-15,10545.85,10627.85,10488.05,10558.75,2079340000,10558.75
+2005-09-14,10545.85,10627.85,10488.05,10558.75,1986750000,10558.75
+2005-09-13,10673.71,10701.57,10561.61,10597.44,2082360000,10597.44
+2005-09-12,10678.41,10743.77,10618.13,10682.94,1938050000,10682.94
+2005-09-09,10594.10,10727.53,10573.47,10678.56,1992560000,10678.56
+2005-09-08,10633.11,10670.60,10530.01,10595.93,1955380000,10595.93
+2005-09-07,10588.68,10667.10,10534.23,10633.50,2067700000,10633.50
+2005-09-06,10447.69,10621.96,10447.69,10589.24,1932090000,10589.24
+2005-09-02,10460.67,10536.14,10400.88,10447.37,1640160000,10447.37
+2005-09-01,10481.44,10557.47,10382.09,10459.63,2229860000,10459.63
+2005-08-31,10415.84,10484.55,10357.65,10481.60,2365510000,10481.60
+2005-08-30,10461.54,10476.83,10329.15,10412.82,1916470000,10412.82
+2005-08-29,10396.90,10508.35,10321.42,10463.05,1599450000,10463.05
+2005-08-26,10450.95,10480.01,10355.02,10397.29,1541090000,10397.29
+2005-08-25,10434.39,10506.60,10391.71,10450.63,1571110000,10450.63
+2005-08-24,10519.34,10584.30,10407.56,10434.87,1930800000,10434.87
+2005-08-23,10571.01,10604.29,10475.63,10519.58,1678620000,10519.58
+2005-08-22,10559.78,10669.81,10509.07,10569.89,1621330000,10569.89
+2005-08-19,10552.70,10656.59,10503.90,10559.23,1558790000,10559.23
+2005-08-18,10531.12,10592.34,10517.67,10554.92,1808170000,10554.92
+2005-08-17,10505.60,10625.86,10472.45,10550.71,1859150000,10550.71
+2005-08-16,10631.59,10650.14,10489.24,10513.45,1820410000,10513.45
+2005-08-15,10599.19,10687.72,10532.48,10634.38,1562880000,10634.38
+2005-08-12,10682.70,10688.68,10549.19,10600.30,1709300000,10600.30
+2005-08-11,10591.83,10721.56,10549.43,10685.89,1941560000,10685.89
+2005-08-10,10606.52,10746.87,10553.81,10594.41,2172320000,10594.41
+2005-08-09,10537.65,10662.80,10537.01,10615.67,1897520000,10615.67
+2005-08-08,10557.24,10635.65,10497.45,10536.93,1804140000,10536.93
+2005-08-05,10610.34,10643.46,10512.49,10558.03,1930280000,10558.03
+2005-08-04,10696.80,10709.77,10568.70,10610.10,1981220000,10610.10
+2005-08-03,10681.51,10735.17,10600.02,10697.59,1999980000,10697.59
+2005-08-02,10623.79,10729.60,10600.62,10683.74,2043120000,10683.74
+2005-08-01,10641.78,10713.51,10578.97,10623.15,1716870000,10623.15
+2005-07-29,10705.16,10754.60,10608.27,10640.91,1789600000,10640.91
+2005-07-28,10633.50,10745.68,10603.49,10705.55,2001680000,10705.55
+2005-07-27,10579.45,10689.31,10530.50,10637.09,1945800000,10637.09
+2005-07-26,10597.60,10667.90,10535.58,10579.77,1934180000,10579.77
+2005-07-25,10651.66,10709.69,10565.12,10596.48,1717580000,10596.48
+2005-07-22,10624.19,10702.21,10552.54,10651.18,1766990000,10651.18
+2005-07-21,10690.03,10735.33,10567.98,10627.77,2129840000,10627.77
+2005-07-20,10629.52,10726.81,10535.10,10689.15,2063340000,10689.15
+2005-07-19,10576.90,10718.69,10573.00,10646.56,2041280000,10646.56
+2005-07-18,10640.19,10681.99,10533.59,10574.99,1582100000,10574.99
+2005-07-15,10629.44,10698.07,10559.46,10640.83,1716400000,10640.83
+2005-07-14,10559.86,10696.96,10559.86,10628.88,2048710000,10628.88
+2005-07-13,10513.36,10596.98,10481.36,10557.39,1812500000,10557.39
+2005-07-12,10519.49,10583.02,10444.46,10513.89,1932010000,10513.89
+2005-07-11,10449.60,10570.67,10425.97,10519.72,1846300000,10519.72
+2005-07-08,10302.90,10486.50,10279.65,10449.14,1900810000,10449.14
+2005-07-07,10269.76,10337.84,10142.24,10302.29,1952440000,10302.29
+2005-07-06,10366.52,10413.23,10242.21,10270.68,1883470000,10270.68
+2005-07-05,10292.62,10388.91,10282.64,10371.80,1805820000,10371.80
+2005-07-01,10273.59,10380.78,10239.91,10303.44,1593820000,10303.44
+2005-06-30,10374.18,10458.19,10253.49,10274.97,2109490000,10274.97
+2005-06-29,10405.94,10472.46,10332.52,10374.48,1769280000,10374.48
+2005-06-28,10291.01,10434.18,10285.86,10405.63,1772410000,10405.63
+2005-06-27,10298.07,10377.55,10229.40,10290.78,1738620000,10290.78
+2005-06-24,10422.28,10452.82,10266.30,10297.83,2418800000,10297.83
+2005-06-23,10587.09,10617.39,10401.49,10421.44,2029920000,10421.44
+2005-06-22,10599.36,10676.24,10543.28,10587.93,1823250000,10587.93
+2005-06-21,10608.88,10670.56,10545.89,10599.67,1720700000,10599.67
+2005-06-20,10621.54,10656.66,10539.21,10609.10,1714530000,10609.10
+2005-06-17,10580.41,10710.38,10561.00,10623.07,2407370000,10623.07
+2005-06-16,10566.76,10632.20,10501.92,10578.65,1776040000,10578.65
+2005-06-15,10548.65,10628.67,10471.69,10566.37,1840440000,10566.37
+2005-06-14,10521.95,10617.01,10473.92,10547.57,1698150000,10547.57
+2005-06-13,10503.57,10611.10,10437.32,10522.56,1661350000,10522.56
+2005-06-10,10503.02,10581.13,10410.50,10512.63,1664180000,10512.63
+2005-06-09,10477.75,10556.90,10410.80,10503.02,1824120000,10503.02
+2005-06-08,10484.84,10575.81,10439.77,10476.86,1715490000,10476.86
+2005-06-07,10466.00,10603.15,10454.18,10483.07,1851370000,10483.07
+2005-06-06,10461.64,10519.79,10410.28,10467.03,1547120000,10467.03
+2005-06-03,10552.82,10572.18,10427.35,10460.97,1627520000,10460.97
+2005-06-02,10548.83,10590.07,10478.26,10553.49,1813790000,10553.49
+2005-06-01,10462.86,10616.15,10433.48,10549.87,1810100000,10549.87
+2005-05-31,10541.89,10574.92,10437.77,10467.48,1840680000,10467.48
+2005-05-27,10537.08,10579.94,10489.35,10542.55,1381430000,10542.55
+2005-05-26,10458.68,10581.87,10450.55,10537.60,1654110000,10537.60
+2005-05-25,10503.17,10516.17,10396.46,10457.80,1742180000,10457.80
+2005-05-24,10522.68,10550.24,10433.78,10503.68,1681000000,10503.68
+2005-05-23,10472.80,10589.92,10438.36,10523.56,1681170000,10523.56
+2005-05-20,10492.75,10535.24,10400.60,10471.91,1631750000,10471.91
+2005-05-19,10464.45,10538.71,10394.39,10493.19,1775860000,10493.19
+2005-05-18,10323.19,10518.17,10323.19,10464.45,2266320000,10464.45
+2005-05-17,10247.49,10357.30,10175.81,10331.88,1887260000,10331.88
+2005-05-16,10139.61,10274.39,10118.32,10252.29,1856860000,10252.29
+2005-05-13,10188.23,10268.85,10062.76,10140.12,2188590000,10140.12
+2005-05-12,10299.74,10357.37,10155.86,10189.48,1995290000,10189.48
+2005-05-11,10272.91,10355.31,10172.86,10300.25,1834970000,10300.25
+2005-05-10,10382.94,10389.96,10230.35,10281.11,1889660000,10281.11
+2005-05-09,10345.40,10416.56,10288.95,10384.34,1857020000,10384.34
+2005-05-06,10339.71,10454.40,10300.70,10345.40,1707200000,10345.40
+2005-05-05,10384.49,10447.08,10276.75,10340.38,1997100000,10340.38
+2005-05-04,10255.25,10412.20,10239.95,10384.64,2306480000,10384.64
+2005-05-03,10251.04,10327.37,10169.39,10256.95,2167020000,10256.95
+2005-05-02,10192.00,10309.86,10149.06,10251.70,1980040000,10251.70
+2005-04-29,10073.47,10231.31,10021.23,10192.51,2362360000,10192.51
+2005-04-28,10194.58,10229.09,10036.74,10070.37,2182270000,10070.37
+2005-04-27,10150.32,10250.23,10048.27,10198.80,2151520000,10198.80
+2005-04-26,10240.99,10298.85,10108.79,10151.13,1959740000,10151.13
+2005-04-25,10158.52,10305.87,10148.25,10242.47,1795030000,10242.47
+2005-04-22,10216.68,10266.48,10055.29,10157.71,2045880000,10157.71
+2005-04-21,10010.51,10250.30,10010.51,10218.60,2308560000,10218.60
+2005-04-20,10131.18,10232.34,9978.74,10012.36,2217050000,10012.36
+2005-04-19,10071.55,10220.21,10021.08,10127.41,2142700000,10127.41
+2005-04-18,10088.54,10183.50,9961.52,10071.25,2180670000,10071.25
+2005-04-15,10276.61,10311.26,10059.36,10087.51,2689960000,10087.51
+2005-04-14,10403.71,10457.06,10248.23,10278.75,2355040000,10278.75
+2005-04-13,10507.45,10567.38,10355.16,10403.93,2049740000,10403.93
+2005-04-12,10448.63,10552.60,10331.21,10507.97,1979830000,10507.97
+2005-04-11,10462.08,10530.58,10393.36,10448.56,1525310000,10448.56
+2005-04-08,10546.32,10584.60,10445.31,10461.34,1661330000,10461.34
+2005-04-07,10485.88,10589.99,10434.30,10546.32,1900620000,10546.32
+2005-04-06,10453.45,10557.18,10434.22,10486.02,1797400000,10486.02
+2005-04-05,10421.14,10530.14,10372.59,10458.46,1870800000,10458.46
+2005-04-04,10401.71,10496.44,10307.64,10421.14,2079770000,10421.14
+2005-04-01,10504.57,10600.56,10349.02,10404.30,2168690000,10404.30
+2005-03-31,10541.59,10586.15,10448.19,10503.76,2214230000,10503.76
+2005-03-30,10405.77,10564.80,10395.21,10540.93,2097110000,10540.93
+2005-03-29,10486.10,10565.46,10351.76,10405.70,2223250000,10405.70
+2005-03-28,10444.13,10568.05,10412.79,10485.65,1746220000,10485.65
+2005-03-24,10457.06,10554.60,10415.16,10442.87,1721720000,10442.87
+2005-03-23,10470.58,10558.51,10384.34,10456.02,2246870000,10456.02
+2005-03-22,10565.39,10651.41,10446.78,10470.51,2114470000,10470.51
+2005-03-21,10629.90,10662.93,10503.46,10565.39,1819440000,10565.39
+2005-03-18,10627.83,10709.85,10520.60,10629.67,2344370000,10629.67
+2005-03-17,10633.30,10707.86,10561.10,10626.35,1581930000,10626.35
+2005-03-16,10741.63,10764.16,10569.30,10633.07,1653190000,10633.07
+2005-03-15,10804.29,10884.76,10716.87,10745.10,1513530000,10745.10
+2005-03-14,10773.92,10859.12,10709.26,10804.51,1437430000,10804.51
+2005-03-11,10845.30,10897.68,10728.62,10774.36,1449820000,10774.36
+2005-03-10,10806.28,10907.45,10757.36,10851.51,1604020000,10851.51
+2005-03-09,10912.32,10949.20,10768.66,10805.62,1704970000,10805.62
+2005-03-08,10935.60,10996.56,10863.40,10912.62,1523090000,10912.62
+2005-03-07,10940.55,11027.15,10886.09,10936.86,1488830000,10936.86
+2005-03-04,10834.51,10996.93,10834.51,10940.55,1636820000,10940.55
+2005-03-03,10812.27,10904.34,10744.14,10833.03,1616240000,10833.03
+2005-03-02,10825.68,10896.66,10736.16,10811.97,1568540000,10811.97
+2005-03-01,10794.98,10849.14,10769.04,10830.00,1708060000,10830.00
+2005-02-28,10842.05,10877.07,10709.41,10766.23,1795480000,10766.23
+2005-02-25,10748.42,10871.53,10698.32,10841.60,1523680000,10841.60
+2005-02-24,10672.24,10779.39,10612.24,10748.79,1518750000,10748.79
+2005-02-23,10609.28,10735.42,10583.64,10673.79,1501090000,10673.79
+2005-02-22,10783.38,10806.36,10596.79,10611.20,1744940000,10611.20
+2005-02-18,10755.15,10854.98,10682.29,10785.22,1551200000,10785.22
+2005-02-17,10835.03,10873.60,10729.95,10754.26,1580120000,10754.26
+2005-02-16,10832.03,10889.78,10746.21,10834.88,1490100000,10834.88
+2005-02-15,10791.06,10886.31,10745.10,10837.32,1527080000,10837.32
+2005-02-14,10795.72,10853.80,10722.63,10791.13,1290180000,10791.13
+2005-02-11,10742.92,10865.69,10680.15,10796.01,1562300000,10796.01
+2005-02-10,10665.00,10803.92,10633.67,10749.61,1491670000,10749.61
+2005-02-09,10717.76,10781.38,10621.84,10664.11,1511040000,10664.11
+2005-02-08,10712.51,10783.97,10647.85,10724.63,1416170000,10724.63
+2005-02-07,10715.76,10774.80,10650.59,10715.76,1347270000,10715.76
+2005-02-04,10593.17,10750.94,10553.93,10716.13,1648160000,10716.13
+2005-02-03,10592.21,10640.69,10511.96,10593.10,1554460000,10593.10
+2005-02-02,10551.05,10638.25,10501.02,10596.79,1561740000,10596.79
+2005-02-01,10489.72,10609.73,10464.38,10551.94,1681980000,10551.94
+2005-01-31,10428.76,10559.77,10414.49,10489.94,1679800000,10489.94
+2005-01-28,10470.58,10520.61,10331.58,10427.20,1641800000,10427.20
+2005-01-27,10498.14,10535.16,10379.47,10467.40,1600600000,10467.40
+2005-01-26,10463.19,10571.66,10433.56,10498.59,1635900000,10498.59
+2005-01-25,10369.42,10534.72,10369.42,10461.56,1610400000,10461.56
+2005-01-24,10393.58,10491.71,10317.10,10368.61,1494600000,10368.61
+2005-01-21,10471.98,10541.30,10370.97,10392.99,1643500000,10392.99
+2005-01-20,10538.90,10582.09,10414.72,10471.47,1692000000,10471.47
+2005-01-19,10626.05,10668.40,10519.20,10539.97,1498700000,10539.97
+2005-01-18,10554.23,10665.44,10456.61,10628.79,1596800000,10628.79
+2005-01-14,10506.71,10606.47,10475.01,10558.00,1335400000,10558.00
+2005-01-13,10617.41,10650.96,10463.26,10505.83,1510300000,10505.83
+2005-01-12,10561.32,10648.52,10481.37,10617.78,1562100000,10617.78
+2005-01-11,10619.77,10632.63,10504.72,10556.22,1488800000,10556.22
+2005-01-10,10603.44,10696.85,10544.99,10621.03,1490400000,10621.03
+2005-01-07,10624.80,10697.81,10545.80,10603.96,1477900000,10603.96
+2005-01-06,10593.19,10708.37,10555.48,10622.88,1569100000,10622.88
+2005-01-05,10629.53,10736.16,10561.03,10597.83,1738900000,10597.83
+2005-01-04,10727.81,10803.62,10587.48,10630.78,1720200000,10630.78
+2005-01-03,10783.75,10892.67,10694.18,10729.43,1505900000,10729.43
+2004-12-31,10800.30,10849.81,10759.94,10783.01,786900000,10783.01
+2004-12-30,10829.12,10880.03,10781.67,10800.30,829800000,10800.30
+2004-12-29,10853.72,10872.71,10771.26,10829.19,924900000,10829.19
+2004-12-28,10776.06,10890.82,10774.51,10854.54,984200000,10854.54
+2004-12-27,10828.01,10892.52,10755.67,10776.13,922000000,10776.13
+2004-12-23,10815.00,10895.10,10780.12,10827.12,956100000,10827.12
+2004-12-22,10752.34,10861.33,10709.78,10815.89,1390800000,10815.89
+2004-12-21,10661.89,10789.66,10646.60,10759.43,1483700000,10759.43
+2004-12-20,10652.14,10769.13,10622.20,10661.60,1422800000,10661.60
+2004-12-17,10704.83,10766.01,10562.76,10649.92,2335000000,10649.92
+2004-12-16,10691.71,10776.43,10612.31,10705.64,1793900000,10705.64
+2004-12-15,10675.71,10749.53,10601.74,10691.45,1695800000,10691.45
+2004-12-14,10640.53,10715.76,10571.67,10676.45,1544400000,10676.45
+2004-12-13,10543.44,10678.52,10520.61,10638.32,1436100000,10638.32
+2004-12-10,10552.16,10616.23,10469.62,10543.22,1443700000,10543.22
+2004-12-09,10492.45,10579.94,10389.81,10552.82,1624700000,10552.82
+2004-12-08,10438.77,10550.16,10395.05,10494.23,1525200000,10494.23
+2004-12-07,10546.80,10612.90,10423.21,10440.58,1533900000,10440.58
+2004-12-06,10591.32,10614.82,10490.31,10547.06,1354400000,10547.06
+2004-12-03,10597.90,10670.47,10515.73,10592.21,1566700000,10592.21
+2004-12-02,10590.44,10670.02,10485.21,10585.12,1774900000,10585.12
+2004-12-01,10425.80,10618.59,10421.66,10590.22,1772800000,10590.22
+2004-11-30,10475.27,10530.80,10380.58,10428.02,1553500000,10428.02
+2004-11-29,10520.64,10590.73,10390.92,10475.90,1378500000,10475.90
+2004-11-26,10518.69,10574.70,10479.52,10522.23,504580000,10522.23
+2004-11-24,10493.86,10565.76,10451.66,10520.31,1149600000,10520.31
+2004-11-23,10486.69,10547.28,10407.18,10492.60,1428300000,10492.60
+2004-11-22,10455.73,10535.46,10380.95,10489.42,1392700000,10489.42
+2004-11-19,10571.63,10588.29,10419.89,10456.91,1526600000,10456.91
+2004-11-18,10549.20,10639.43,10499.62,10572.55,1456700000,10572.55
+2004-11-17,10481.83,10655.09,10470.21,10549.57,1684200000,10549.57
+2004-11-16,10549.79,10570.56,10445.31,10487.65,1364400000,10487.65
+2004-11-15,10541.89,10612.31,10463.34,10550.24,1453300000,10550.24
+2004-11-12,10469.21,10565.48,10419.77,10539.01,1531600000,10539.01
+2004-11-11,10386.95,10513.42,10364.10,10469.84,1393000000,10469.84
+2004-11-10,10378.59,10470.21,10330.54,10385.48,1504300000,10385.48
+2004-11-09,10387.62,10466.81,10327.00,10386.37,1450800000,10386.37
+2004-11-08,10385.15,10452.58,10313.51,10391.31,1358700000,10391.31
+2004-11-05,10317.05,10458.10,10279.96,10387.54,1724400000,10387.54
+2004-11-04,10132.48,10352.81,10076.36,10314.76,1782700000,10314.76
+2004-11-03,10137.05,10253.27,10062.80,10137.05,1767500000,10137.05
+2004-11-02,10053.87,10180.85,9976.29,10035.73,1659000000,10035.73
+2004-11-01,10028.73,10124.44,9953.29,10054.39,1395900000,10054.39
+2004-10-29,10004.69,10083.44,9936.77,10027.47,1500800000,10027.47
+2004-10-28,9998.94,10074.89,9900.42,10004.54,1628200000,10004.54
+2004-10-27,9888.25,10051.96,9807.80,10002.03,1741900000,10002.03
+2004-10-26,9750.59,9914.65,9718.94,9888.48,1685400000,9888.48
+2004-10-25,9757.22,9827.20,9660.18,9749.99,1380500000,9749.99
+2004-10-22,9863.85,9920.99,9732.81,9757.81,1469600000,9757.81
+2004-10-21,9884.65,9969.07,9769.16,9865.76,1673000000,9865.76
+2004-10-20,9895.19,9957.05,9766.95,9886.93,1685700000,9886.93
+2004-10-19,9958.38,10064.20,9854.19,9897.62,1737500000,9897.62
+2004-10-18,9932.98,10002.18,9816.73,9956.32,1373300000,9956.32
+2004-10-15,9895.63,10022.31,9845.56,9933.38,1645100000,9933.38
+2004-10-14,10002.54,10048.48,9837.22,9894.45,1489500000,9894.45
+2004-10-13,10085.21,10157.11,9935.08,10002.33,1546200000,10002.33
+2004-10-12,10080.42,10121.49,9985.44,10077.18,1320100000,10077.18
+2004-10-11,10056.09,10142.74,10017.67,10081.97,943800000,10081.97
+2004-10-08,10124.11,10177.53,10013.91,10055.20,1291600000,10055.20
+2004-10-07,10239.84,10267.57,10086.83,10125.40,1447500000,10125.40
+2004-10-06,10170.70,10267.14,10112.20,10239.92,1416700000,10239.92
+2004-10-05,10216.76,10253.93,10123.19,10177.68,1418400000,10177.68
+2004-10-04,10191.40,10313.81,10153.79,10216.54,1534000000,10216.54
+2004-10-01,10082.04,10237.05,10081.38,10192.65,1582200000,10192.65
+2004-09-30,10136.38,10155.49,9987.36,10080.27,1748000000,10080.27
+2004-09-29,10078.06,10160.50,10002.57,10136.24,1402900000,10136.24
+2004-09-28,9989.73,10132.04,9950.71,10077.40,1396600000,10077.40
+2004-09-27,10046.65,10077.32,9952.78,9988.54,1263500000,9988.54
+2004-09-24,10039.42,10111.39,9993.92,10047.24,1255400000,10047.24
+2004-09-23,10108.29,10134.84,9999.67,10038.90,1286300000,10038.90
+2004-09-22,10244.05,10244.05,10075.33,10109.18,1379900000,10109.18
+2004-09-21,10204.52,10291.39,10159.54,10244.93,1325000000,10244.93
+2004-09-20,10283.87,10293.23,10152.90,10204.89,1197600000,10204.89
+2004-09-17,10245.82,10352.37,10219.71,10284.46,1422600000,10284.46
+2004-09-16,10231.59,10315.72,10194.35,10244.49,1113900000,10244.49
+2004-09-15,10316.90,10324.87,10195.60,10231.36,1256000000,10231.36
+2004-09-14,10315.13,10374.79,10260.93,10318.16,1204500000,10318.16
+2004-09-13,10306.65,10380.47,10250.61,10314.76,1299800000,10314.76
+2004-09-10,10289.47,10348.68,10196.19,10313.07,1261200000,10313.07
+2004-09-09,10313.36,10337.33,10269.49,10289.10,1371300000,10289.10
+2004-09-08,10342.42,10390.64,10267.94,10313.36,1246300000,10313.36
+2004-09-07,10261.52,10388.95,10255.62,10341.16,1214400000,10341.16
+2004-09-03,10277.82,10346.99,10229.52,10260.20,924170000,10260.20
+2004-09-02,10168.39,10312.99,10129.01,10290.28,1118400000,10290.28
+2004-09-01,10170.12,10230.48,10092.37,10168.46,1142100000,10168.46
+2004-08-31,10121.97,10198.03,10056.09,10173.92,1138200000,10173.92
+2004-08-30,10193.83,10226.87,10110.43,10122.52,843100000,10122.52
+2004-08-27,10174.07,10235.49,10143.91,10195.01,845400000,10195.01
+2004-08-26,10181.07,10225.61,10124.88,10173.41,1023600000,10173.41
+2004-08-25,10098.49,10224.29,10041.93,10181.74,1192200000,10181.74
+2004-08-24,10074.89,10165.07,10044.66,10098.63,1092500000,10098.63
+2004-08-23,10111.10,10159.54,10046.72,10073.05,1021900000,10073.05
+2004-08-20,10040.81,10143.76,9989.65,10110.14,1199900000,10110.14
+2004-08-19,10082.78,10111.91,9972.39,10040.82,1249400000,10040.82
+2004-08-18,9964.22,10097.01,9910.82,10083.15,1282500000,10083.15
+2004-08-17,9955.50,10053.21,9916.05,9972.83,1267800000,9972.83
+2004-08-16,9825.35,9987.58,9807.44,9954.55,1206200000,9954.55
+2004-08-13,9814.11,9897.34,9746.60,9825.35,1175100000,9825.35
+2004-08-12,9936.48,9940.02,9780.52,9814.59,1405100000,9814.59
+2004-08-11,9931.24,9981.61,9804.63,9938.32,1410400000,9938.32
+2004-08-10,9815.55,9961.70,9798.44,9944.67,1245600000,9944.67
+2004-08-09,9816.14,9902.49,9773.74,9814.66,1086000000,9814.66
+2004-08-06,9960.67,9963.47,9767.54,9815.33,1521000000,9815.33
+2004-08-05,10127.10,10158.44,9945.84,9963.03,1397400000,9963.03
+2004-08-04,10117.96,10186.16,10029.02,10126.51,1369200000,10126.51
+2004-08-03,10178.27,10228.49,10064.57,10120.24,1338300000,10120.24
+2004-08-02,10138.45,10224.29,10063.75,10179.16,1276000000,10179.16
+2004-07-30,10129.12,10194.13,10045.76,10139.71,1298200000,10139.71
+2004-07-29,10115.52,10213.08,10049.74,10129.24,1530100000,10129.24
+2004-07-28,10084.03,10170.31,9966.34,10117.07,1554300000,10117.07
+2004-07-27,9963.54,10133.95,9942.75,10085.14,1610800000,10085.14
+2004-07-26,9964.71,10054.32,9874.38,9961.92,1413400000,9961.92
+2004-07-23,10045.46,10069.51,9893.93,9962.22,1337500000,9962.22
+2004-07-22,10047.60,10114.41,9906.62,10050.33,1680800000,10050.33
+2004-07-21,10156.30,10279.96,10027.92,10046.13,1679500000,10046.13
+2004-07-20,10094.43,10186.90,10031.24,10149.07,1445800000,10149.07
+2004-07-19,10140.95,10211.60,10027.33,10094.06,1319900000,10094.06
+2004-07-16,10162.34,10289.40,10095.32,10139.78,1450300000,10139.78
+2004-07-15,10208.20,10275.27,10115.81,10163.16,1408700000,10163.16
+2004-07-14,10232.84,10313.95,10129.31,10208.80,1462000000,10208.80
+2004-07-13,10238.37,10297.58,10188.45,10247.59,1199700000,10247.59
+2004-07-12,10211.75,10284.39,10130.42,10238.22,1114600000,10238.22
+2004-07-09,10173.12,10277.16,10150.32,10213.22,1186300000,10213.22
+2004-07-08,10238.52,10297.73,10134.99,10171.56,1401100000,10171.56
+2004-07-07,10211.92,10300.53,10156.45,10240.29,1328600000,10240.29
+2004-07-06,10280.26,10308.43,10163.60,10219.34,1283300000,10219.34
+2004-07-02,10334.00,10371.40,10228.71,10282.83,1085000000,10282.83
+2004-07-01,10434.00,10473.23,10255.55,10334.16,1495700000,10334.16
+2004-06-30,10413.43,10489.16,10348.98,10435.48,1473800000,10435.48
+2004-06-29,10356.35,10460.25,10315.65,10413.43,1375000000,10413.43
+2004-06-28,10377.52,10505.16,10317.64,10357.09,1354600000,10357.09
+2004-06-25,10444.24,10514.67,10329.88,10371.84,1812900000,10371.84
+2004-06-24,10477.43,10530.01,10398.16,10443.81,1394900000,10443.81
+2004-06-23,10395.14,10498.67,10323.32,10479.57,1444200000,10479.57
+2004-06-22,10370.21,10431.05,10284.24,10395.07,1382300000,10395.07
+2004-06-21,10417.82,10471.76,10336.44,10371.47,1123900000,10371.47
+2004-06-18,10375.82,10471.84,10328.20,10416.41,1500600000,10416.41
+2004-06-17,10378.59,10417.69,10308.25,10377.52,1296700000,10377.52
+2004-06-16,10380.23,10433.52,10320.60,10379.58,1168400000,10379.58
+2004-06-15,10336.51,10464.04,10319.89,10380.43,1345900000,10380.43
+2004-06-14,10401.23,10403.50,10283.48,10334.73,1179400000,10334.73
+2004-06-10,10367.80,10448.00,10333.94,10410.10,1160600000,10410.10
+2004-06-09,10431.10,10466.59,10325.07,10368.44,1276800000,10368.44
+2004-06-08,10389.41,10462.97,10323.94,10432.52,1190300000,10432.52
+2004-06-07,10243.31,10410.81,10243.31,10391.08,1211800000,10391.08
+2004-06-04,10196.83,10327.84,10196.83,10242.82,1115300000,10242.82
+2004-06-03,10261.85,10309.46,10163.40,10195.91,1232400000,10195.91
+2004-06-02,10199.78,10310.10,10170.57,10262.97,1251700000,10262.97
+2004-06-01,10187.18,10254.17,10104.07,10202.65,1238000000,10202.65
+2004-05-28,10205.83,10250.27,10137.14,10188.45,1172600000,10188.45
+2004-05-27,10109.89,10267.66,10106.13,10205.20,1447500000,10205.20
+2004-05-26,10116.84,10175.75,10034.16,10109.89,1369400000,10109.89
+2004-05-25,9958.08,10139.27,9895.41,10117.62,1545700000,10117.62
+2004-05-24,9968.02,10084.91,9891.22,9958.43,1227500000,9958.43
+2004-05-21,9939.34,10058.50,9910.81,9966.74,1258600000,9966.74
+2004-05-20,9939.12,10014.50,9867.73,9937.64,1211000000,9937.64
+2004-05-19,9962.55,10124.79,9919.90,9937.71,1548600000,9937.71
+2004-05-18,9906.71,10028.27,9895.77,9968.51,1353000000,9968.51
+2004-05-17,10009.92,10009.92,9827.21,9906.91,1430100000,9906.91
+2004-05-14,10008.43,10096.69,9912.45,10012.87,1335900000,10012.87
+2004-05-13,10044.31,10100.24,9924.94,10010.74,1411100000,10010.74
+2004-05-12,10011.52,10089.87,9822.10,10045.16,1697600000,10045.16
+2004-05-11,9989.24,10092.78,9928.91,10019.47,1533800000,10019.47
+2004-05-10,10116.28,10116.28,9881.86,9990.02,1918400000,9990.02
+2004-05-07,10240.62,10302.93,10086.94,10117.34,1653600000,10117.34
+2004-05-06,10308.20,10332.10,10147.21,10241.26,1509300000,10241.26
+2004-05-05,10316.98,10382.98,10249.63,10310.95,1469000000,10310.95
+2004-05-04,10314.32,10403.14,10232.31,10317.20,1662100000,10317.20
+2004-05-03,10227.27,10365.74,10199.67,10314.00,1571600000,10314.00
+2004-04-30,10273.06,10374.61,10198.39,10225.57,1634700000,10225.57
+2004-04-29,10339.41,10443.81,10199.31,10272.27,1859000000,10272.27
+2004-04-28,10476.67,10479.58,10301.65,10342.60,1855600000,10342.60
+2004-04-27,10445.38,10570.92,10410.52,10478.16,1518000000,10478.16
+2004-04-26,10472.91,10540.26,10396.75,10444.73,1290600000,10444.73
+2004-04-23,10463.11,10543.95,10362.97,10472.84,1396100000,10472.84
+2004-04-22,10314.99,10529.12,10255.88,10461.20,1826700000,10461.20
+2004-04-21,10311.87,10398.53,10200.38,10317.27,1738100000,10317.27
+2004-04-20,10437.85,10530.61,10297.39,10314.50,1508500000,10314.50
+2004-04-19,10451.62,10501.79,10351.97,10437.85,1194900000,10437.85
+2004-04-16,10398.32,10500.57,10343.74,10451.97,1487800000,10451.97
+2004-04-15,10377.95,10481.21,10279.37,10397.46,1568700000,10397.46
+2004-04-14,10378.10,10453.39,10259.35,10377.95,1547700000,10377.95
+2004-04-13,10516.05,10572.13,10343.17,10381.28,1423200000,10381.28
+2004-04-12,10444.38,10559.28,10439.27,10515.56,1102400000,10515.56
+2004-04-08,10482.77,10590.15,10383.84,10442.03,1199800000,10442.03
+2004-04-07,10569.26,10580.51,10422.74,10480.15,1458800000,10480.15
+2004-04-06,10553.76,10596.37,10467.26,10570.81,1397700000,10570.81
+2004-04-05,10470.59,10582.22,10423.33,10558.37,1413700000,10558.37
+2004-04-02,10375.33,10548.74,10375.33,10470.59,1629200000,10470.59
+2004-04-01,10357.52,10449.33,10299.48,10373.33,1560700000,10373.33
+2004-03-31,10380.89,10428.59,10287.11,10357.70,1560700000,10357.70
+2004-03-30,10327.63,10411.41,10264.15,10381.70,1332400000,10381.70
+2004-03-29,10212.91,10389.93,10212.91,10329.63,1405500000,10329.63
+2004-03-26,10218.37,10306.22,10145.63,10212.97,1319100000,10212.97
+2004-03-25,10049.56,10246.15,10049.56,10218.82,1471700000,10218.82
+2004-03-24,10065.41,10140.23,9975.86,10048.23,1527800000,10048.23
+2004-03-23,10066.67,10177.04,10020.75,10063.64,1458200000,10063.64
+2004-03-22,10185.93,10185.93,9985.19,10064.75,1452300000,10064.75
+2004-03-19,10295.85,10355.41,10163.71,10186.60,1457400000,10186.60
+2004-03-18,10298.96,10355.04,10187.78,10295.78,1369200000,10295.78
+2004-03-17,10184.30,10356.59,10184.30,10300.30,1490100000,10300.30
+2004-03-16,10103.41,10253.26,10085.34,10184.67,1500700000,10184.67
+2004-03-15,10238.45,10252.68,10066.08,10102.89,1600600000,10102.89
+2004-03-12,10130.67,10281.63,10097.04,10240.08,1388500000,10240.08
+2004-03-11,10288.85,10356.22,10102.75,10128.38,1889900000,10128.38
+2004-03-10,10457.59,10523.11,10259.34,10296.89,1648400000,10296.89
+2004-03-09,10529.52,10567.03,10391.48,10456.96,1499400000,10456.96
+2004-03-08,10595.37,10677.85,10505.85,10529.48,1254400000,10529.48
+2004-03-05,10582.59,10681.40,10497.11,10595.55,1398200000,10595.55
+2004-03-04,10593.48,10645.33,10522.59,10588.00,1265800000,10588.00
+2004-03-03,10588.59,10651.03,10506.66,10593.11,1334500000,10593.11
+2004-03-02,10678.36,10713.92,10539.40,10591.48,1476000000,10591.48
+2004-03-01,10582.25,10720.14,10568.74,10678.14,1497100000,10678.14
+2004-02-27,10581.55,10689.55,10519.03,10583.92,1540400000,10583.92
+2004-02-26,10598.14,10652.96,10493.70,10580.14,1383900000,10580.14
+2004-02-25,10566.59,10660.73,10509.40,10601.62,1360700000,10601.62
+2004-02-24,10609.55,10681.40,10479.33,10566.37,1543600000,10566.37
+2004-02-23,10619.55,10711.84,10508.89,10609.62,1380400000,10609.62
+2004-02-20,10666.29,10722.77,10559.11,10619.03,1479600000,10619.03
+2004-02-19,10674.59,10794.95,10626.44,10664.73,1562800000,10664.73
+2004-02-18,10706.68,10764.36,10623.62,10671.99,1382400000,10671.99
+2004-02-17,10628.88,10762.07,10628.88,10714.88,1396500000,10714.88
+2004-02-13,10696.22,10755.47,10578.66,10627.85,1329200000,10627.85
+2004-02-12,10735.18,10775.03,10636.44,10694.07,1464300000,10694.07
+2004-02-11,10605.48,10779.40,10561.55,10737.70,1699300000,10737.70
+2004-02-10,10578.74,10667.03,10511.18,10613.85,1403900000,10613.85
+2004-02-09,10592.00,10634.81,10433.70,10579.03,1303500000,10579.03
+2004-02-06,10494.89,10634.81,10433.70,10593.03,1477600000,10593.03
+2004-02-05,10469.33,10566.37,10399.92,10495.55,1566600000,10495.55
+2004-02-04,10503.11,10567.85,10394.81,10470.74,1634800000,10470.74
+2004-02-03,10499.48,10571.48,10414.15,10505.18,1476900000,10505.18
+2004-02-02,10487.78,10614.44,10395.55,10499.18,1599200000,10499.18
+2004-01-30,10510.22,10551.03,10385.56,10488.07,1635000000,10488.07
+2004-01-29,10467.41,10611.56,10369.92,10510.29,1921900000,10510.29
+2004-01-28,10610.07,10703.25,10412.44,10468.37,1842000000,10468.37
+2004-01-27,10701.10,10748.81,10579.33,10609.92,1673100000,10609.92
+2004-01-26,10568.00,10725.18,10510.44,10702.51,1480600000,10702.51
+2004-01-23,10625.25,10691.77,10490.14,10568.29,1561200000,10568.29
+2004-01-22,10624.22,10717.40,10545.03,10623.18,1693700000,10623.18
+2004-01-21,10522.77,10665.70,10453.11,10623.62,1757600000,10623.62
+2004-01-20,10601.40,10676.96,10447.92,10528.66,1698200000,10528.66
+2004-01-16,10556.37,10666.88,10503.70,10600.51,1721100000,10600.51
+2004-01-15,10534.52,10639.03,10454.52,10553.85,1695000000,10553.85
+2004-01-14,10428.67,10573.85,10426.89,10538.37,1514600000,10538.37
+2004-01-13,10485.18,10539.25,10341.19,10427.18,1595900000,10427.18
+2004-01-12,10461.55,10543.03,10389.85,10485.18,1510200000,10485.18
+2004-01-09,10589.25,10603.48,10420.52,10458.89,1720700000,10458.89
+2004-01-08,10530.07,10651.99,10480.59,10592.44,1868400000,10592.44
+2004-01-07,10535.46,10587.55,10432.00,10529.03,1704900000,10529.03
+2004-01-06,10543.85,10584.07,10454.37,10538.66,1494500000,10538.66
+2004-01-05,10411.85,10575.92,10411.85,10544.07,1578200000,10544.07
+2004-01-02,10452.74,10554.96,10367.41,10409.85,1153200000,10409.85
+2003-12-31,10426.30,10494.44,10382.89,10453.92,1027500000,10453.92
+2003-12-30,10449.70,10493.11,10374.52,10425.04,1012600000,10425.04
+2003-12-29,10321.35,10457.78,10319.70,10450.00,1058800000,10450.00
+2003-12-26,10305.85,10368.89,10282.22,10324.67,356070000,10324.67
+2003-12-24,10341.41,10365.63,10263.04,10305.19,518060000,10305.19
+2003-12-23,10337.56,10421.48,10265.71,10341.26,1145300000,10341.26
+2003-12-22,10276.48,10371.11,10216.08,10338.00,1251700000,10338.00
+2003-12-19,10249.48,10345.44,10189.63,10278.22,1657300000,10278.22
+2003-12-18,10141.41,10278.82,10117.78,10248.08,1579900000,10248.08
+2003-12-17,10128.75,10186.67,10040.08,10145.26,1441700000,10145.26
+2003-12-16,10023.34,10173.19,9986.23,10129.56,1547900000,10129.56
+2003-12-15,10046.53,10180.97,9994.38,10022.82,1520800000,10022.82
+2003-12-12,10008.75,10091.71,9946.60,10042.16,1223100000,10042.16
+2003-12-11,9922.45,10056.97,9896.16,10008.16,1441100000,10008.16
+2003-12-10,9922.38,10000.53,9848.97,9921.86,1444000000,9921.86
+2003-12-09,9966.45,10048.75,9887.57,9923.42,1465500000,9923.42
+2003-12-08,9862.01,9997.34,9824.83,9965.27,1218900000,9965.27
+2003-12-05,9923.27,9954.16,9819.05,9862.68,1265900000,9862.68
+2003-12-04,9874.83,9978.08,9814.97,9930.82,1463100000,9930.82
+2003-12-03,9851.94,9974.45,9824.31,9873.42,1441700000,9873.42
+2003-12-02,9899.64,9936.97,9798.83,9853.64,1383200000,9853.64
+2003-12-01,9785.35,9943.34,9777.64,9899.05,1375000000,9899.05
+2003-11-28,9779.72,9832.16,9733.20,9782.46,487220000,9782.46
+2003-11-26,9763.49,9838.01,9689.05,9779.57,1097700000,9779.57
+2003-11-25,9748.68,9821.94,9679.13,9763.94,1333700000,9763.94
+2003-11-24,9629.87,9788.60,9629.87,9747.79,1302800000,9747.79
+2003-11-21,9622.02,9692.53,9556.68,9628.53,1273800000,9628.53
+2003-11-20,9688.46,9756.09,9576.91,9619.42,1326700000,9619.42
+2003-11-19,9620.68,9731.94,9584.31,9690.46,1326200000,9690.46
+2003-11-18,9711.44,9792.16,9601.35,9624.16,1354300000,9624.16
+2003-11-17,9765.64,9775.35,9603.57,9710.83,1374300000,9710.83
+2003-11-14,9836.46,9919.19,9709.13,9768.68,1356100000,9768.68
+2003-11-13,9846.97,9895.71,9740.53,9837.94,1383000000,9837.94
+2003-11-12,9729.50,9882.60,9700.02,9848.83,1349300000,9848.83
+2003-11-11,9756.53,9801.21,9673.64,9737.79,1162500000,9737.79
+2003-11-10,9807.49,9861.05,9702.46,9756.53,1243600000,9756.53
+2003-11-07,9857.12,9945.71,9770.31,9809.79,1440500000,9809.79
+2003-11-06,9820.68,9888.90,9738.53,9856.97,1453900000,9856.97
+2003-11-05,9837.64,9883.86,9746.98,9820.83,1401800000,9820.83
+2003-11-04,9857.49,9905.94,9770.46,9838.83,1417600000,9838.83
+2003-11-03,9802.46,9936.31,9792.60,9858.46,1378200000,9858.46
+2003-10-31,9786.75,9880.08,9745.94,9801.12,1498900000,9801.12
+2003-10-30,9772.01,9882.97,9719.20,9786.61,1629700000,9786.61
+2003-10-29,9747.05,9830.23,9663.27,9774.53,1562600000,9774.53
+2003-10-28,9609.72,9769.57,9592.54,9748.31,1629200000,9748.31
+2003-10-27,9584.54,9696.98,9553.80,9608.16,1371800000,9608.16
+2003-10-24,9600.98,9631.50,9463.28,9582.46,1420300000,9582.46
+2003-10-23,9597.20,9661.05,9517.50,9613.13,1604300000,9613.13
+2003-10-22,9741.98,9741.98,9551.65,9598.24,1647200000,9598.24
+2003-10-21,9778.31,9824.90,9697.94,9747.64,1498000000,9747.64
+2003-10-20,9721.50,9816.97,9665.35,9777.94,1172600000,9777.94
+2003-10-17,9791.86,9833.12,9679.72,9721.79,1352000000,9721.79
+2003-10-16,9798.68,9838.53,9679.13,9791.72,1417700000,9791.72
+2003-10-15,9824.09,9901.64,9731.57,9803.05,1521100000,9803.05
+2003-10-14,9763.27,9833.42,9696.90,9812.98,1271900000,9812.98
+2003-10-13,9675.72,9814.97,9675.72,9764.38,1040500000,9764.38
+2003-10-10,9682.90,9743.12,9622.31,9674.68,1108100000,9674.68
+2003-10-09,9633.35,9798.08,9617.35,9680.01,1578700000,9680.01
+2003-10-08,9653.33,9699.35,9571.35,9630.90,1262500000,9630.90
+2003-10-07,9593.28,9672.68,9512.76,9654.61,1279500000,9654.61
+2003-10-06,9572.39,9656.09,9524.39,9594.98,1025800000,9594.98
+2003-10-03,9492.54,9701.87,9492.54,9572.31,1570500000,9572.31
+2003-10-02,9464.76,9539.20,9397.87,9487.80,1269300000,9487.80
+2003-10-01,9275.06,9472.69,9275.06,9469.20,1566300000,9469.20
+2003-09-30,9378.10,9393.35,9199.43,9275.06,1590500000,9275.06
+2003-09-29,9314.42,9431.54,9259.68,9380.24,1366500000,9380.24
+2003-09-26,9342.43,9407.89,9257.99,9313.08,1472500000,9313.08
+2003-09-25,9425.58,9493.44,9311.47,9343.96,1530000000,9343.96
+2003-09-24,9575.97,9612.53,9400.67,9425.51,1556000000,9425.51
+2003-09-23,9535.76,9623.34,9479.41,9576.04,1301700000,9576.04
+2003-09-22,9641.80,9641.87,9467.83,9535.41,1278800000,9535.41
+2003-09-19,9661.80,9719.49,9582.64,9644.82,1518600000,9644.82
+2003-09-18,9544.04,9691.55,9513.37,9659.13,1498800000,9659.13
+2003-09-17,9566.08,9641.45,9510.28,9545.65,1338210000,9545.65
+2003-09-16,9449.16,9587.90,9426.84,9567.34,1403200000,9567.34
+2003-09-15,9471.19,9541.02,9396.03,9448.81,1151300000,9448.81
+2003-09-12,9456.88,9517.37,9348.59,9471.55,1236700000,9471.55
+2003-09-11,9415.05,9540.60,9374.49,9459.76,1335900000,9459.76
+2003-09-10,9504.88,9545.51,9373.08,9420.46,1582100000,9420.46
+2003-09-09,9584.92,9617.02,9459.85,9507.20,1414800000,9507.20
+2003-09-08,9503.41,9638.57,9492.25,9586.29,1299300000,9586.29
+2003-09-05,9589.52,9602.22,9441.93,9503.34,1465200000,9503.34
+2003-09-04,9569.09,9661.80,9492.74,9587.90,1453900000,9587.90
+2003-09-03,9521.86,9632.75,9465.72,9568.46,1675600000,9568.46
+2003-09-02,9416.67,9563.83,9357.44,9523.27,1470500000,9523.27
+2003-08-29,9373.33,9444.25,9320.52,9415.82,945100000,9415.82
+2003-08-28,9334.35,9415.68,9246.48,9374.21,1165200000,9374.21
+2003-08-27,9339.82,9387.82,9280.03,9333.79,1051400000,9333.79
+2003-08-26,9316.03,9372.45,9203.54,9340.45,1178700000,9340.45
+2003-08-25,9349.44,9381.51,9242.56,9317.64,971700000,9317.64
+2003-08-22,9436.04,9535.97,9323.26,9348.87,1308900000,9348.87
+2003-08-21,9399.96,9517.37,9345.71,9423.68,1407100000,9423.68
+2003-08-20,9420.13,9454.49,9324.03,9397.51,1210800000,9397.51
+2003-08-19,9412.17,9490.60,9315.25,9428.90,1300600000,9428.90
+2003-08-18,9320.66,9466.79,9309.16,9412.45,1127600000,9412.45
+2003-08-15,9308.52,9360.27,9253.20,9321.69,636370000,9321.69
+2003-08-14,9272.25,9356.63,9193.33,9310.56,1186800000,9310.56
+2003-08-13,9303.69,9350.19,9213.43,9271.76,1208800000,9271.76
+2003-08-12,9218.12,9329.04,9163.29,9310.06,1132300000,9310.06
+2003-08-11,9189.62,9275.61,9124.00,9217.35,1022200000,9217.35
+2003-08-08,9127.36,9230.37,9097.74,9191.09,1086600000,9191.09
+2003-08-07,9060.48,9171.13,9003.63,9126.45,1389300000,9126.45
+2003-08-06,9032.96,9151.38,8964.13,9061.74,1491000000,9061.74
+2003-08-05,9185.27,9210.21,9024.77,9036.32,1351700000,9036.32
+2003-08-04,9154.18,9231.84,9033.66,9186.04,1318700000,9186.04
+2003-08-01,9232.68,9266.37,9100.12,9153.97,1390600000,9153.97
+2003-07-31,9199.35,9398.02,9183.80,9233.80,1608000000,9233.80
+2003-07-30,9204.39,9272.88,9131.70,9200.05,1391900000,9200.05
+2003-07-29,9268.19,9327.36,9135.62,9204.46,1508900000,9204.46
+2003-07-28,9284.92,9356.77,9182.96,9266.51,1328600000,9266.51
+2003-07-25,9113.85,9296.62,9062.38,9284.57,1397500000,9284.57
+2003-07-24,9196.56,9313.99,9092.98,9112.51,1559000000,9112.51
+2003-07-23,9159.08,9249.91,9064.69,9194.24,1362700000,9194.24
+2003-07-22,9098.65,9221.83,9008.60,9158.45,1439700000,9158.45
+2003-07-21,9187.80,9219.87,9025.12,9096.69,1254200000,9096.69
+2003-07-18,9052.29,9212.31,9034.36,9188.15,1365200000,9188.15
+2003-07-17,9089.34,9160.27,8968.82,9050.82,1661400000,9050.82
+2003-07-16,9133.70,9185.63,9005.23,9094.59,1662000000,9094.59
+2003-07-15,9179.18,9260.42,9054.60,9128.97,1518600000,9128.97
+2003-07-14,9126.45,9316.44,9126.45,9177.15,1448900000,9177.15
+2003-07-11,9036.39,9176.59,9009.01,9119.59,1212700000,9119.59
+2003-07-10,9154.53,9154.53,8978.13,9036.04,1465700000,9036.04
+2003-07-09,9221.90,9270.22,9077.91,9156.21,1618000000,9156.21
+2003-07-08,9213.48,9281.77,9122.24,9223.09,1565700000,9223.09
+2003-07-07,9073.92,9289.90,9073.92,9216.79,1429100000,9216.79
+2003-07-03,9141.16,9164.48,9014.06,9070.21,775900000,9070.21
+2003-07-02,9043.54,9168.82,9025.12,9142.84,1519300000,9142.84
+2003-07-01,8983.66,9068.05,8843.61,9040.95,1460200000,9040.95
+2003-06-30,8990.74,9100.12,8934.71,8985.44,1587200000,8985.44
+2003-06-27,9079.74,9135.91,8938.26,8989.05,1267800000,8989.05
+2003-06-26,9011.06,9118.82,8953.83,9079.04,1387400000,9079.04
+2003-06-25,9109.57,9195.20,8984.29,9011.53,1459200000,9011.53
+2003-06-24,9071.48,9179.25,9020.08,9109.85,1388300000,9109.85
+2003-06-23,9199.49,9215.32,9003.83,9072.95,1398100000,9072.95
+2003-06-20,9180.93,9306.36,9149.21,9200.75,1698000000,9200.75
+2003-06-19,9293.80,9346.34,9134.50,9179.53,1530100000,9179.53
+2003-06-18,9322.67,9363.15,9185.17,9293.80,1488900000,9293.80
+2003-06-17,9319.66,9406.50,9234.78,9323.02,1479700000,9323.02
+2003-06-16,9117.56,9335.49,9117.56,9318.96,1345900000,9318.96
+2003-06-13,9197.88,9234.23,9042.63,9117.12,1271600000,9117.12
+2003-06-12,9184.29,9270.64,9089.38,9196.55,1553100000,9196.55
+2003-06-11,9048.85,9202.08,9010.13,9183.22,1520000000,9183.22
+2003-06-10,8980.79,9111.11,8946.06,9054.89,1275400000,9054.89
+2003-06-09,9061.18,9109.43,8909.78,8980.00,1307000000,8980.00
+2003-06-06,9045.57,9248.71,9008.87,9062.79,1837200000,9062.79
+2003-06-05,9036.67,9106.70,8905.37,9041.30,1693100000,9041.30
+2003-06-04,8919.94,9076.94,8882.75,9038.98,1618700000,9038.98
+2003-06-03,8898.23,8973.02,8823.51,8922.95,1450200000,8922.95
+2003-06-02,8851.45,9040.46,8833.66,8897.81,1662500000,8897.81
+2003-05-30,8711.46,8897.04,8711.46,8850.26,1688800000,8850.26
+2003-05-29,8787.23,8895.99,8657.96,8711.18,1685800000,8711.18
+2003-05-28,8781.84,8885.34,8721.90,8793.12,1559000000,8793.12
+2003-05-27,8600.54,8812.30,8523.64,8781.35,1532000000,8781.35
+2003-05-23,8594.02,8668.47,8513.98,8601.38,1201000000,8601.38
+2003-05-22,8516.99,8650.33,8495.35,8594.02,1448500000,8594.02
+2003-05-21,8485.62,8577.64,8389.68,8516.43,1457800000,8516.43
+2003-05-20,8494.09,8593.61,8394.51,8491.36,1505300000,8491.36
+2003-05-19,8676.52,8676.52,8455.72,8493.39,1375700000,8493.39
+2003-05-16,8710.36,8766.36,8614.33,8678.97,1505500000,8678.97
+2003-05-15,8649.22,8766.58,8613.84,8713.14,1508700000,8713.14
+2003-05-14,8673.29,8744.94,8575.96,8647.82,1401800000,8647.82
+2003-05-13,8722.88,8757.40,8611.18,8679.25,1418100000,8679.25
+2003-05-12,8603.90,8764.12,8544.24,8726.73,1378800000,8726.73
+2003-05-09,8492.69,8637.58,8482.89,8604.60,1326100000,8604.60
+2003-05-08,8558.67,8591.01,8435.61,8491.22,1379600000,8491.22
+2003-05-07,8585.42,8650.82,8494.87,8560.63,1531900000,8560.63
+2003-05-06,8531.28,8658.18,8486.88,8588.36,1649600000,8588.36
+2003-05-05,8583.17,8643.11,8472.67,8531.57,1446300000,8531.57
+2003-05-02,8453.48,8612.86,8389.40,8582.68,1554300000,8582.68
+2003-05-01,8478.48,8519.09,8328.55,8454.25,1397500000,8454.25
+2003-04-30,8501.38,8557.62,8402.36,8480.09,1788510000,8480.09
+2003-04-29,8472.88,8578.55,8414.61,8502.99,1525600000,8502.99
+2003-04-28,8306.84,8515.80,8290.46,8471.61,1273000000,8471.61
+2003-04-25,8438.98,8453.06,8258.80,8306.35,1335800000,8306.35
+2003-04-24,8512.44,8527.99,8363.28,8440.04,1648100000,8440.04
+2003-04-23,8484.92,8587.72,8398.65,8515.66,1667200000,8515.66
+2003-04-22,8326.38,8509.43,8238.14,8484.99,1631200000,8484.99
+2003-04-21,8336.67,8423.09,8270.56,8328.90,1118700000,8328.90
+2003-04-17,8255.79,8388.28,8172.52,8337.65,1430600000,8337.65
+2003-04-16,8405.72,8459.15,8217.27,8257.61,1587600000,8257.61
+2003-04-15,8347.66,8443.11,8251.38,8402.36,1460200000,8402.36
+2003-04-14,8203.97,8375.19,8175.60,8351.10,1131000000,8351.10
+2003-04-11,8223.22,8360.76,8156.77,8203.41,1141600000,8203.41
+2003-04-10,8198.99,8274.56,8109.85,8221.33,1275300000,8221.33
+2003-04-09,8299.28,8404.25,8174.90,8197.94,1293700000,8197.94
+2003-04-08,8299.12,8382.43,8222.24,8298.92,1235400000,8298.92
+2003-04-07,8284.15,8550.40,8272.24,8300.41,1494000000,8300.41
+2003-04-04,8240.59,8348.29,8176.66,8277.15,1241200000,8277.15
+2003-04-03,8285.76,8378.76,8199.49,8240.38,1351500000,8240.38
+2003-04-02,8070.98,8342.27,8070.98,8285.06,1589800000,8285.06
+2003-04-01,7992.83,8133.03,7947.38,8069.86,1461600000,8069.86
+2003-03-31,8142.83,8142.83,7903.97,7992.13,1495500000,7992.13
+2003-03-28,8198.85,8224.83,8070.77,8145.77,1227000000,8145.77
+2003-03-27,8226.39,8272.03,8085.40,8201.45,1232900000,8201.45
+2003-03-26,8279.88,8323.01,8165.52,8229.88,1319700000,8229.88
+2003-03-25,8216.85,8355.93,8155.65,8280.23,1333400000,8280.23
+2003-03-24,8514.82,8514.82,8166.78,8214.68,1293000000,8214.68
+2003-03-21,8290.38,8552.08,8290.38,8521.97,1883710000,8521.97
+2003-03-20,8264.68,8335.20,8122.59,8286.60,1439100000,8286.60
+2003-03-19,8193.04,8304.04,8116.01,8265.45,1473400000,8265.45
+2003-03-18,8142.69,8253.48,8057.54,8194.23,1555100000,8194.23
+2003-03-17,7857.96,8163.56,7763.56,8141.92,1700420000,8141.92
+2003-03-14,7822.17,7961.60,7761.25,7859.71,1541900000,7859.71
+2003-03-13,7555.29,7847.03,7555.29,7821.75,1816300000,7821.75
+2003-03-12,7517.76,7582.96,7397.31,7552.07,1620000000,7552.07
+2003-03-11,7568.53,7673.98,7488.00,7524.06,1427700000,7524.06
+2003-03-10,7739.40,7739.40,7545.77,7568.18,1255000000,7568.18
+2003-03-07,7671.75,7780.57,7536.18,7740.03,1368500000,7740.03
+2003-03-06,7774.76,7795.07,7624.97,7673.99,1299200000,7673.99
+2003-03-05,7702.35,7801.79,7639.82,7775.60,1332700000,7775.60
+2003-03-04,7838.14,7859.08,7688.98,7704.87,1256600000,7704.87
+2003-03-03,7890.24,7997.66,7809.05,7837.86,1208900000,7837.86
+2003-02-28,7886.11,7987.80,7826.72,7891.08,1373300000,7891.08
+2003-02-27,7807.96,7950.46,7774.34,7884.99,1287800000,7884.99
+2003-02-26,7907.39,7944.93,7767.62,7806.98,1374400000,7806.98
+2003-02-25,7856.42,7931.14,7700.53,7909.50,1483700000,7909.50
+2003-02-24,8017.34,8017.34,7828.06,7858.24,1229200000,7858.24
+2003-02-21,7915.52,8055.79,7843.81,8018.11,1398200000,8018.11
+2003-02-20,8002.70,8051.37,7858.24,7914.96,1194100000,7914.96
+2003-02-19,8033.80,8079.11,7913.70,8000.60,1075600000,8000.60
+2003-02-18,7909.30,8114.82,7909.30,8041.15,1250800000,8041.15
+2003-02-14,7750.90,7936.56,7704.96,7908.80,1404600000,7908.80
+2003-02-13,7756.55,7817.88,7602.81,7749.87,1489300000,7749.87
+2003-02-12,7836.36,7892.96,7720.39,7758.17,1260500000,7758.17
+2003-02-11,7920.93,8010.89,7798.69,7843.11,1307000000,7843.11
+2003-02-10,7865.74,7963.03,7777.98,7920.11,1238200000,7920.11
+2003-02-07,7932.45,8019.46,7811.10,7864.23,1276800000,7864.23
+2003-02-06,7981.95,8031.66,7855.87,7929.30,1430900000,7929.30
+2003-02-05,8014.45,8162.96,7950.42,7985.18,1450800000,7985.18
+2003-02-04,8104.61,8104.61,7915.93,8013.29,1451600000,8013.29
+2003-02-03,8053.74,8189.35,8032.90,8109.82,1258500000,8109.82
+2003-01-31,7939.72,8121.37,7884.66,8053.81,1578530000,8053.81
+2003-01-30,8109.14,8169.81,7918.19,7945.13,1510300000,7945.13
+2003-01-29,8087.95,8173.31,7916.89,8110.71,1595400000,8110.71
+2003-01-28,7991.07,8153.36,7954.95,8088.84,1459100000,8088.84
+2003-01-27,8128.54,8167.41,7929.16,7989.56,1435900000,7989.56
+2003-01-24,8367.89,8367.89,8092.00,8131.01,1574800000,8131.01
+2003-01-23,8320.72,8437.69,8215.61,8369.47,1744550000,8369.47
+2003-01-22,8439.54,8493.50,8270.94,8318.73,1560800000,8318.73
+2003-01-21,8586.26,8650.43,8421.03,8442.90,1335200000,8442.90
+2003-01-17,8695.82,8695.82,8523.60,8586.74,1358200000,8586.74
+2003-01-16,8721.12,8837.47,8634.46,8697.87,1534600000,8697.87
+2003-01-15,8843.64,8865.65,8674.43,8723.18,1432100000,8723.18
+2003-01-14,8787.22,8865.41,8717.56,8842.62,1379400000,8842.62
+2003-01-13,8787.83,8896.09,8721.12,8785.98,1396300000,8785.98
+2003-01-10,8776.04,8846.25,8654.21,8784.89,1485400000,8784.89
+2003-01-09,8596.68,8814.09,8596.68,8776.18,1560300000,8776.18
+2003-01-08,8735.93,8749.44,8549.72,8595.31,1467600000,8595.31
+2003-01-07,8775.84,8843.37,8661.20,8740.59,1545200000,8740.59
+2003-01-06,8602.78,8826.71,8578.86,8773.57,1435900000,8773.57
+2003-01-03,8607.38,8669.91,8503.71,8601.69,1130800000,8601.69
+2003-01-02,8342.38,8633.02,8342.38,8607.52,1229200000,8607.52
+2002-12-31,8332.24,8400.46,8216.44,8341.63,1088500000,8341.63
+2002-12-30,8304.06,8405.67,8214.93,8332.85,1057800000,8332.85
+2002-12-27,8429.28,8470.05,8272.31,8303.78,758400000,8303.78
+2002-12-26,8448.86,8587.98,8392.23,8432.61,721100000,8432.61
+2002-12-24,8491.99,8522.98,8407.45,8448.11,458310000,8448.11
+2002-12-23,8511.39,8573.92,8418.90,8493.29,1112100000,8493.29
+2002-12-20,8367.41,8557.47,8367.41,8511.32,1782730000,8511.32
+2002-12-19,8441.94,8530.25,8302.41,8364.80,1385900000,8364.80
+2002-12-18,8531.31,8553.76,8367.89,8447.35,1446200000,8447.35
+2002-12-17,8626.99,8672.38,8495.21,8535.39,1251800000,8535.39
+2002-12-16,8436.59,8649.06,8421.58,8627.40,1271600000,8627.40
+2002-12-13,8536.07,8563.16,8374.68,8433.71,1330800000,8433.71
+2002-12-12,8590.99,8662.71,8466.21,8538.40,1255300000,8538.40
+2002-12-11,8571.52,8669.91,8452.84,8589.14,1285100000,8589.14
+2002-12-10,8473.61,8624.93,8419.86,8574.26,1286600000,8574.26
+2002-12-09,8643.99,8643.99,8438.24,8473.41,1320800000,8473.41
+2002-12-06,8620.88,8707.21,8469.16,8645.77,1241100000,8645.77
+2002-12-05,8740.66,8796.68,8572.00,8623.28,1250200000,8623.28
+2002-12-04,8734.22,8834.04,8600.93,8737.85,1588900000,8737.85
+2002-12-03,8861.13,8882.04,8649.89,8742.93,1488400000,8742.93
+2002-12-02,8902.95,9076.35,8757.60,8862.57,1612000000,8862.57
+2002-11-29,8933.67,8995.78,8847.42,8896.09,643460000,8896.09
+2002-11-27,8678.96,8975.08,8678.96,8931.68,1350300000,8931.68
+2002-11-26,8844.12,8845.01,8634.53,8676.42,1543600000,8676.42
+2002-11-25,8804.97,8918.03,8717.63,8849.40,1574000000,8849.40
+2002-11-22,8842.41,8944.16,8732.23,8804.84,1626800000,8804.84
+2002-11-21,8625.48,8910.83,8619.58,8845.15,2415100000,8845.15
+2002-11-20,8469.57,8675.12,8402.72,8623.01,1517300000,8623.01
+2002-11-19,8484.93,8566.45,8355.62,8474.78,1337400000,8474.78
+2002-11-18,8579.74,8671.41,8444.26,8486.57,1282600000,8486.57
+2002-11-15,8535.64,8622.30,8421.10,8579.09,1400100000,8579.09
+2002-11-14,8403.69,8596.50,8396.27,8542.13,1488100000,8542.13
+2002-11-13,8380.32,8523.47,8237.65,8398.49,1463400000,8398.49
+2002-11-12,8356.73,8557.25,8286.13,8386.00,1377100000,8386.00
+2002-11-11,8535.81,8541.09,8315.40,8358.95,1113000000,8358.95
+2002-11-08,8585.75,8688.96,8455.01,8537.13,1446500000,8537.13
+2002-11-07,8766.08,8766.08,8517.78,8586.24,1466900000,8586.24
+2002-11-06,8677.17,8841.61,8561.48,8771.01,1623700000,8771.01
+2002-11-05,8568.76,8730.92,8497.60,8678.27,1354100000,8678.27
+2002-11-04,8521.60,8787.30,8510.08,8571.60,1645900000,8571.60
+2002-11-01,8395.64,8569.24,8271.77,8517.64,1450400000,8517.64
+2002-10-31,8427.34,8538.17,8293.17,8397.03,1641300000,8397.03
+2002-10-30,8363.95,8502.32,8273.99,8427.41,1422300000,8427.41
+2002-10-29,8367.28,8456.19,8161.01,8368.94,1529700000,8368.94
+2002-10-28,8448.98,8601.01,8281.34,8368.04,1382600000,8368.04
+2002-10-25,8317.48,8474.92,8210.74,8443.99,1340400000,8443.99
+2002-10-24,8495.38,8607.04,8253.60,8317.34,1700570000,8317.34
+2002-10-23,8448.56,8546.57,8256.79,8494.27,1593900000,8494.27
+2002-10-22,8534.08,8543.65,8303.33,8450.16,1549200000,8450.16
+2002-10-21,8320.74,8580.13,8191.87,8538.24,1447000000,8538.24
+2002-10-18,8287.72,8383.16,8115.72,8322.40,1423100000,8322.40
+2002-10-17,8038.31,8395.99,8038.31,8275.04,1780390000,8275.04
+2002-10-16,8232.10,8232.10,7958.34,8036.03,1585000000,8036.03
+2002-10-15,7883.23,8304.58,7883.23,8255.68,1956000000,8255.68
+2002-10-14,7848.21,7948.91,7725.23,7877.40,1200300000,7877.40
+2002-10-11,7540.74,7919.57,7540.74,7850.29,1854130000,7850.29
+2002-10-10,7286.34,7588.25,7181.47,7533.95,2090230000,7533.95
+2002-10-09,7499.96,7500.03,7215.39,7286.27,1885030000,7286.27
+2002-10-08,7425.82,7680.57,7294.53,7501.49,1938430000,7501.49
+2002-10-07,7528.68,7685.42,7368.46,7422.84,1576500000,7422.84
+2002-10-04,7719.34,7817.06,7428.32,7528.40,1835930000,7528.40
+2002-10-03,7753.46,7943.64,7638.47,7717.19,1674500000,7717.19
+2002-10-02,7936.57,7996.77,7696.66,7755.61,1668900000,7755.61
+2002-10-01,7593.04,7964.24,7558.36,7938.79,1780900000,7938.79
+2002-09-30,7698.81,7729.53,7422.28,7591.93,1721870000,7591.93
+2002-09-27,7996.01,7997.12,7664.89,7701.45,1507300000,7701.45
+2002-09-26,7844.62,8086.86,7800.97,7997.12,1650000000,7997.12
+2002-09-25,7687.16,7939.90,7641.87,7841.82,1651500000,7841.82
+2002-09-24,7871.23,7893.36,7606.77,7683.13,1670240000,7683.13
+2002-09-23,7984.77,7984.77,7738.06,7872.15,1381100000,7872.15
+2002-09-20,7945.93,8081.04,7868.60,7986.02,1792800000,7986.02
+2002-09-19,8170.65,8170.65,7904.87,7942.39,1524000000,7942.39
+2002-09-18,8203.07,8283.49,8013.42,8172.45,1501000000,8172.45
+2002-09-17,8386.35,8508.61,8169.88,8207.55,1448600000,8207.55
+2002-09-16,8311.79,8435.04,8214.27,8380.18,1001400000,8380.18
+2002-09-13,8377.68,8414.79,8175.85,8312.69,1271000000,8312.69
+2002-09-12,8574.94,8574.94,8334.82,8379.41,1191600000,8379.41
+2002-09-11,8604.27,8767.82,8545.11,8581.17,846600000,8581.17
+2002-09-10,8520.14,8660.94,8447.73,8602.61,1186400000,8602.61
+2002-09-09,8425.88,8584.30,8288.28,8519.38,1130600000,8519.38
+2002-09-06,8296.46,8526.80,8296.46,8427.20,1184500000,8427.20
+2002-09-05,8420.20,8420.20,8173.56,8283.70,1401300000,8283.70
+2002-09-04,8308.53,8495.03,8216.98,8425.12,1372100000,8425.12
+2002-09-03,8659.27,8659.27,8282.87,8308.05,1323400000,8308.05
+2002-08-30,8669.26,8811.72,8572.85,8663.50,929900000,8663.50
+2002-08-29,8690.69,8769.34,8514.10,8670.99,1271100000,8670.99
+2002-08-28,8823.93,8832.18,8610.79,8694.09,1146600000,8694.09
+2002-08-27,8917.49,9040.04,8747.77,8824.41,1307700000,8824.41
+2002-08-26,8873.93,8981.23,8723.43,8919.01,1016900000,8919.01
+2002-08-23,9051.49,9051.49,8806.38,8872.96,1071500000,8872.96
+2002-08-22,8961.18,9129.10,8860.34,9053.64,1373000000,9053.64
+2002-08-21,8866.14,9033.52,8768.51,8957.23,1353100000,8957.23
+2002-08-20,8986.50,8989.69,8789.13,8872.07,1308500000,8872.07
+2002-08-19,8777.09,9037.38,8720.81,8990.79,1299800000,8990.79
+2002-08-16,8813.07,8899.42,8644.59,8778.06,1265300000,8778.06
+2002-08-15,8745.04,8914.37,8620.98,8818.14,1505100000,8818.14
+2002-08-14,8479.14,8778.89,8295.34,8743.31,1533800000,8743.31
+2002-08-13,8683.15,8801.87,8445.91,8482.39,1297700000,8482.39
+2002-08-12,8741.92,8753.14,8528.15,8688.89,1036500000,8688.89
+2002-08-09,8707.24,8824.92,8538.46,8745.45,1294900000,8745.45
+2002-08-08,8456.29,8755.70,8364.29,8712.02,1646700000,8712.02
+2002-08-07,8282.25,8520.95,8171.70,8456.15,1490400000,8456.15
+2002-08-06,8049.93,8472.28,8049.93,8274.09,1514100000,8274.09
+2002-08-05,8312.92,8371.00,7991.43,8043.63,1425500000,8043.63
+2002-08-02,8504.96,8566.36,8179.80,8313.13,1538100000,8313.13
+2002-08-01,8732.58,8758.40,8430.68,8506.62,1672200000,8506.62
+2002-07-31,8678.65,8793.36,8463.21,8736.59,2049360000,8736.59
+2002-07-30,8707.03,8806.86,8484.05,8680.03,1826090000,8680.03
+2002-07-29,8267.99,8749.12,8267.99,8711.88,1778650000,8711.88
+2002-07-26,8192.61,8350.10,8039.89,8264.39,1796100000,8264.39
+2002-07-25,8185.89,8390.39,7893.34,8186.31,2424700000,8186.31
+2002-07-24,7698.46,8243.07,7489.53,8191.29,2775560000,8191.29
+2002-07-23,7785.55,8007.91,7590.75,7702.34,2441020000,7702.34
+2002-07-22,8015.04,8173.08,7668.35,7784.58,2248060000,7784.58
+2002-07-19,8356.74,8356.74,7940.83,8019.26,2654100000,8019.26
+2002-07-18,8540.47,8683.84,8350.72,8409.49,1736300000,8409.49
+2002-07-17,8476.21,8765.39,8401.12,8542.48,2566500000,8542.48
+2002-07-16,8635.31,8697.69,8346.29,8473.11,1843700000,8473.11
+2002-07-15,8681.28,8720.18,8220.78,8639.19,2574800000,8639.19
+2002-07-12,8805.33,8903.00,8555.15,8684.53,1607400000,8684.53
+2002-07-11,8812.12,8937.87,8557.84,8801.53,2080480000,8801.53
+2002-07-10,9098.16,9188.71,8772.94,8813.50,1816900000,8813.50
+2002-07-09,9273.38,9357.35,9065.88,9096.09,1348900000,9096.09
+2002-07-08,9375.70,9433.08,9184.90,9274.90,1184400000,9274.90
+2002-07-05,9061.54,9399.65,9054.97,9379.50,699400000,9379.50
+2002-07-03,9006.37,9140.32,8832.89,9054.97,1527800000,9054.97
+2002-07-02,9104.95,9185.88,8918.11,9007.75,1823000000,9007.75
+2002-07-01,9239.25,9381.37,9059.88,9109.79,1425500000,9109.79
+2002-06-28,9270.33,9435.44,9131.49,9243.26,2117000000,9243.26
+2002-06-27,9122.12,9342.33,8992.32,9269.92,1908600000,9269.92
+2002-06-26,9108.22,9207.07,8831.92,9120.11,336570000,9120.11
+2002-06-25,9285.56,9457.38,9089.17,9126.82,1513700000,9126.82
+2002-06-24,9252.47,9417.23,9046.04,9281.82,1552600000,9281.82
+2002-06-21,9430.66,9456.76,9186.71,9253.79,1497200000,9253.79
+2002-06-20,9561.64,9628.11,9390.10,9431.77,1389700000,9431.77
+2002-06-19,9702.00,9760.20,9514.29,9561.57,1336100000,9561.57
+2002-06-18,9684.52,9775.83,9588.29,9706.12,1193100000,9706.12
+2002-06-17,9476.50,9736.58,9462.30,9687.42,1236600000,9687.42
+2002-06-14,9498.92,9538.93,9229.63,9474.21,1549000000,9474.21
+2002-06-13,9612.87,9671.64,9454.41,9502.80,1405500000,9502.80
+2002-06-12,9515.12,9682.37,9380.82,9617.71,1795720000,9617.71
+2002-06-11,9647.62,9794.17,9487.91,9517.26,1212400000,9517.26
+2002-06-10,9587.38,9744.33,9509.91,9645.40,1226200000,9645.40
+2002-06-07,9592.38,9668.18,9416.33,9589.67,1341300000,9589.67
+2002-06-06,9795.70,9820.41,9552.85,9624.64,1601500000,9624.64
+2002-06-05,9688.53,9860.91,9636.82,9796.80,1300100000,9796.80
+2002-06-04,9710.34,9798.74,9541.36,9687.84,1466600000,9687.84
+2002-06-03,9923.94,10016.04,9685.49,9709.79,1324300000,9709.79
+2002-05-31,9915.15,10074.16,9865.89,9925.25,1277300000,9925.25
+2002-05-30,9915.01,9995.76,9769.64,9911.69,1286600000,9911.69
+2002-05-29,9976.94,10056.31,9860.42,9923.04,1081800000,9923.04
+2002-05-28,10106.54,10144.53,9917.64,9981.58,996500000,9981.58
+2002-05-24,10211.92,10255.93,10054.58,10104.26,885400000,10104.26
+2002-05-23,10158.30,10268.87,10044.20,10216.08,1192900000,10216.08
+2002-05-22,10098.58,10200.78,10004.41,10157.88,1136300000,10157.88
+2002-05-21,10229.08,10322.15,10060.46,10105.71,1169200000,10105.71
+2002-05-20,10348.93,10357.44,10164.39,10229.50,989800000,10229.50
+2002-05-17,10291.05,10400.62,10209.49,10353.08,1274400000,10353.08
+2002-05-16,10242.11,10374.05,10168.64,10289.21,1256600000,10289.21
+2002-05-15,10288.56,10382.97,10152.97,10243.68,1420200000,10243.68
+2002-05-14,10119.34,10346.59,10119.34,10298.14,1414500000,10298.14
+2002-05-13,9938.82,10148.71,9892.73,10109.66,1088600000,10109.66
+2002-05-10,10040.25,10115.23,9891.04,9939.92,1171900000,9939.92
+2002-05-09,10137.96,10185.08,9966.63,10037.42,1153000000,10037.42
+2002-05-08,9847.96,10203.76,9847.96,10141.83,1502000000,10141.83
+2002-05-07,9810.53,9985.32,9749.73,9836.55,1354700000,9836.55
+2002-05-06,10005.80,10081.98,9780.29,9808.04,1122600000,9808.04
+2002-05-03,10091.73,10130.97,9891.49,10006.63,1284500000,10006.63
+2002-05-02,10057.62,10182.94,9970.92,10091.87,1364000000,10091.87
+2002-05-01,9944.90,10121.21,9778.42,10059.63,1451400000,10059.63
+2002-04-30,9818.90,10063.64,9775.10,9946.22,1628600000,9946.22
+2002-04-29,9910.52,10012.16,9767.15,9819.87,1314700000,9819.87
+2002-04-26,10037.42,10127.85,9875.44,9910.72,1374200000,9910.72
+2002-04-25,10028.70,10103.64,9864.08,10035.06,1517400000,10035.06
+2002-04-24,10090.07,10209.64,9984.00,10030.43,1373200000,10030.43
+2002-04-23,10137.20,10243.06,10003.84,10089.24,1388500000,10089.24
+2002-04-22,10256.00,10299.39,10056.45,10136.43,1181800000,10136.43
+2002-04-19,10212.69,10338.83,10151.52,10257.11,1185000000,10257.11
+2002-04-18,10219.47,10334.67,10010.22,10205.28,1359300000,10205.28
+2002-04-17,10299.66,10379.51,10137.47,10220.78,1376900000,10220.78
+2002-04-16,10100.38,10365.12,10100.38,10301.32,1341300000,10301.32
+2002-04-15,10189.57,10261.05,10037.90,10093.67,1120400000,10093.67
+2002-04-12,10178.57,10312.26,10083.92,10190.82,1282100000,10190.82
+2002-04-11,10378.89,10425.87,10116.37,10176.08,1505600000,10176.08
+2002-04-10,10210.40,10437.43,10175.18,10381.73,1447900000,10381.73
+2002-04-09,10249.84,10362.98,10156.57,10208.67,1235400000,10208.67
+2002-04-08,10258.91,10300.78,10049.94,10249.08,1095300000,10249.08
+2002-04-05,10235.80,10403.66,10169.79,10271.64,1110200000,10271.64
+2002-04-04,10199.54,10301.53,10118.10,10235.17,1283800000,10235.17
+2002-04-03,10311.81,10377.09,10116.02,10198.29,1219700000,10198.29
+2002-04-02,10352.46,10394.94,10204.66,10313.71,1176700000,10313.71
+2002-04-01,10402.07,10434.52,10226.59,10362.70,1050900000,10362.70
+2002-03-28,10429.68,10537.48,10341.59,10403.94,1147600000,10403.94
+2002-03-27,10351.28,10490.15,10300.29,10426.91,1180100000,10426.91
+2002-03-26,10280.51,10475.00,10233.65,10353.36,1223600000,10353.36
+2002-03-25,10428.43,10497.76,10255.59,10281.67,1057900000,10281.67
+2002-03-22,10477.70,10537.62,10324.23,10427.67,1243300000,10427.67
+2002-03-21,10501.99,10577.82,10326.99,10479.84,1339200000,10479.84
+2002-03-20,10626.85,10634.84,10455.56,10501.57,1304900000,10501.57
+2002-03-19,10578.38,10722.78,10530.63,10635.25,1255000000,10635.25
+2002-03-18,10608.54,10707.01,10488.84,10577.75,1169500000,10577.75
+2002-03-15,10516.45,10663.69,10452.10,10607.23,1493900000,10607.23
+2002-03-14,10501.29,10615.74,10421.17,10517.14,1208800000,10517.14
+2002-03-13,10620.17,10648.68,10427.67,10501.85,1354000000,10501.85
+2002-03-12,10604.32,10682.72,10462.34,10632.35,1304400000,10632.35
+2002-03-11,10570.07,10679.68,10470.85,10611.24,1210200000,10611.24
+2002-03-08,10531.67,10728.87,10480.33,10572.49,1412000000,10572.49
+2002-03-07,10578.10,10663.82,10405.95,10525.37,1517400000,10525.37
+2002-03-06,10431.96,10637.19,10393.84,10574.29,1541300000,10574.29
+2002-03-05,10591.38,10639.96,10349.90,10433.41,1549300000,10433.41
+2002-03-04,10368.10,10656.50,10313.01,10586.82,1594300000,10586.82
+2002-03-01,10111.04,10397.09,10086.51,10368.86,1456500000,10368.86
+2002-02-28,10130.28,10283.89,10055.34,10106.13,1392200000,10106.13
+2002-02-27,10117.65,10315.72,10025.86,10127.58,1393800000,10127.58
+2002-02-26,10145.86,10241.89,9986.84,10115.26,1309200000,10115.26
+2002-02-25,9969.75,10204.04,9934.94,10145.71,1367400000,10145.71
+2002-02-22,9834.89,10032.45,9726.67,9968.15,1411000000,9968.15
+2002-02-21,9933.56,10072.98,9788.11,9834.68,1381600000,9834.68
+2002-02-20,9742.37,9990.78,9674.91,9941.17,1438900000,9941.17
+2002-02-19,9899.24,9923.39,9704.03,9745.14,1189900000,9745.14
+2002-02-15,10000.83,10065.37,9843.54,9903.04,1359200000,9903.04
+2002-02-14,9989.67,10092.29,9905.95,10001.99,1272500000,10001.99
+2002-02-13,9856.99,10056.24,9839.18,9989.67,1215900000,9989.67
+2002-02-12,9880.35,9943.24,9766.18,9863.74,1094200000,9863.74
+2002-02-11,9739.81,9933.07,9668.34,9884.78,1159400000,9884.78
+2002-02-08,9627.65,9795.38,9503.52,9744.24,1371900000,9744.24
+2002-02-07,9650.97,9799.67,9562.12,9625.44,1441600000,9625.44
+2002-02-06,9682.04,9801.33,9558.18,9653.39,1665800000,9653.39
+2002-02-05,9684.74,9842.77,9553.96,9685.43,1778300000,9685.43
+2002-02-04,9905.46,9940.96,9648.55,9687.09,1437600000,9687.09
+2002-02-01,9923.04,10022.82,9795.45,9907.26,1367200000,9907.26
+2002-01-31,9763.20,9963.79,9701.76,9920.00,1557000000,9920.00
+2002-01-30,9619.14,9821.81,9443.32,9762.86,2019600000,9762.86
+2002-01-29,9865.54,9952.59,9576.65,9618.24,1812000000,9618.24
+2002-01-28,9843.05,9959.44,9746.66,9865.75,1186800000,9865.75
+2002-01-25,9793.23,9949.54,9697.47,9840.08,1345100000,9840.08
+2002-01-24,9734.21,9926.71,9670.99,9796.07,1552800000,9796.07
+2002-01-23,9710.96,9853.64,9588.49,9730.96,1479200000,9730.96
+2002-01-22,9772.34,9905.26,9652.01,9713.80,1311600000,9713.80
+2002-01-18,9830.94,9873.98,9673.11,9771.85,1333300000,9771.85
+2002-01-17,9712.21,9910.11,9684.39,9850.04,1380100000,9850.04
+2002-01-16,9916.54,9923.32,9661.00,9712.27,1482500000,9712.27
+2002-01-15,9892.73,10038.94,9805.33,9924.15,1386900000,9924.15
+2002-01-14,9985.38,10038.87,9831.98,9891.42,1286400000,9891.42
+2002-01-11,10069.52,10163.77,9938.12,9987.53,1211900000,9987.53
+2002-01-10,10092.50,10174.91,9956.67,10067.86,1299000000,10067.86
+2002-01-09,10153.18,10311.98,10049.25,10094.09,1452000000,10094.09
+2002-01-08,10195.76,10270.53,10063.43,10150.55,1258800000,10150.55
+2002-01-07,10261.33,10345.40,10137.61,10197.05,1308300000,10197.05
+2002-01-04,10176.84,10341.87,10132.14,10259.74,1513000000,10259.74
+2002-01-03,10073.88,10227.36,10002.54,10172.14,1398900000,10172.14
+2002-01-02,10021.71,10125.85,9889.69,10073.40,1171000000,10073.40
+2001-12-31,10136.36,10178.71,10002.96,10021.57,943600000,10021.57
+2001-12-28,10133.94,10220.78,10067.17,10136.99,917400000,10136.99
+2001-12-27,10088.71,10187.71,10036.10,10131.31,876300000,10131.31
+2001-12-26,10035.55,10203.28,10014.10,10088.14,791100000,10088.14
+2001-12-24,10036.59,10114.91,9987.39,10035.34,439670000,10035.34
+2001-12-21,9986.84,10148.13,9935.70,10035.34,1694000000,10035.34
+2001-12-20,10064.13,10141.21,9912.76,9985.18,1490500000,9985.18
+2001-12-19,9994.59,10142.95,9876.96,10070.49,1484900000,10070.49
+2001-12-18,9893.22,10066.27,9876.19,9998.39,1354000000,9998.39
+2001-12-17,9809.42,9996.25,9747.77,9891.97,1260400000,9891.97
+2001-12-14,9764.72,9888.44,9661.14,9811.15,1306800000,9811.15
+2001-12-13,9889.13,9927.95,9691.30,9766.45,1511500000,9766.45
+2001-12-12,9887.27,9985.59,9745.42,9894.81,1449700000,9894.81
+2001-12-11,9925.60,10063.98,9794.48,9888.37,1367200000,9888.37
+2001-12-10,10047.04,10123.78,9868.03,9921.45,1218700000,9921.45
+2001-12-07,10099.14,10160.24,9938.54,10049.46,1248200000,10049.46
+2001-12-06,10113.53,10220.23,9997.98,10099.14,1487900000,10099.14
+2001-12-05,9891.35,10195.04,9875.92,10114.29,1765300000,10114.29
+2001-12-04,9765.55,9937.29,9700.24,9893.84,1318500000,9893.84
+2001-12-03,9848.93,9861.94,9651.87,9763.96,1202900000,9763.96
+2001-11-30,9828.80,9945.80,9752.26,9851.56,1343600000,9851.56
+2001-11-29,9710.34,9873.29,9629.72,9829.42,1375700000,9829.42
+2001-11-28,9867.06,9889.13,9662.80,9711.86,1423700000,9711.86
+2001-11-27,9980.33,10021.48,9776.07,9872.60,1288000000,9872.60
+2001-11-26,9961.58,10054.58,9862.22,9982.75,1129800000,9982.75
+2001-11-23,9833.09,9983.24,9804.37,9959.71,410300000,9959.71
+2001-11-21,9894.19,9932.31,9746.45,9834.68,1029300000,9834.68
+2001-11-20,9968.64,10023.37,9825.06,9901.38,1330200000,9901.38
+2001-11-19,9870.45,10040.46,9826.96,9976.46,1316800000,9976.46
+2001-11-16,9871.51,9967.94,9754.07,9866.99,1337400000,9866.99
+2001-11-15,9824.65,9967.46,9745.43,9872.39,1454500000,9872.39
+2001-11-14,9751.13,9943.18,9683.97,9823.61,1443400000,9823.61
+2001-11-13,9551.43,9811.29,9551.43,9750.95,1370100000,9750.95
+2001-11-12,9606.13,9642.25,9347.76,9554.37,991600000,9554.37
+2001-11-09,9586.96,9692.35,9478.75,9608.00,1093800000,9608.00
+2001-11-08,9558.39,9765.00,9506.91,9587.52,1517500000,9587.52
+2001-11-07,9584.68,9695.67,9457.99,9554.37,1411300000,9554.37
+2001-11-06,9437.09,9627.44,9315.79,9591.12,1356000000,9591.12
+2001-11-05,9326.59,9534.58,9326.59,9441.03,1267700000,9441.03
+2001-11-02,9264.52,9406.93,9152.91,9323.54,1121900000,9323.54
+2001-11-01,9087.45,9320.77,8987.61,9263.90,1317400000,9263.90
+2001-10-31,9123.64,9281.68,9018.26,9075.14,1352500000,9075.14
+2001-10-30,9264.52,9265.34,9011.96,9121.98,1297400000,9121.98
+2001-10-29,9543.37,9543.37,9232.83,9269.50,1106100000,9269.50
+2001-10-26,9462.28,9626.54,9369.35,9545.17,1244500000,9545.17
+2001-10-25,9342.29,9491.48,9143.09,9462.90,1364400000,9462.90
+2001-10-24,9341.40,9456.40,9218.29,9345.62,1336200000,9345.62
+2001-10-23,9379.17,9499.78,9249.02,9340.08,1317300000,9340.08
+2001-10-22,9203.91,9438.75,9101.08,9377.03,1105700000,9377.03
+2001-10-19,9162.81,9278.36,9027.74,9204.11,1294900000,9204.11
+2001-10-18,9230.75,9310.33,9061.02,9163.22,1262900000,9163.22
+2001-10-17,9389.76,9539.22,9199.89,9232.97,1452200000,9232.97
+2001-10-16,9346.31,9479.37,9239.68,9384.23,1210500000,9384.23
+2001-10-15,9340.84,9417.51,9181.07,9347.62,1024700000,9347.62
+2001-10-12,9409.07,9426.30,9146.34,9344.16,1331400000,9344.16
+2001-10-11,9242.63,9522.61,9204.04,9410.45,1704580000,9410.45
+2001-10-10,9052.30,9305.97,8975.15,9240.86,1312400000,9240.86
+2001-10-09,9066.56,9168.42,8927.34,9052.44,1227800000,9052.44
+2001-10-08,9115.75,9187.85,8937.86,9067.94,979000000,9067.94
+2001-10-05,9058.83,9208.41,8894.47,9119.77,1301700000,9119.77
+2001-10-04,9127.24,9259.61,8982.28,9060.88,1609100000,9060.88
+2001-10-03,8946.02,9193.32,8800.99,9123.78,1650600000,9123.78
+2001-10-02,8836.69,9001.03,8737.61,8950.59,1289800000,8950.59
+2001-10-01,8845.97,8931.70,8659.90,8836.83,1175600000,8836.83
+2001-09-28,8679.07,8945.68,8633.75,8847.56,1727400000,8847.56
+2001-09-27,8567.46,8757.47,8398.14,8681.42,1467000000,8681.42
+2001-09-26,8660.06,8766.81,8457.37,8567.39,1519100000,8567.39
+2001-09-25,8605.59,8778.23,8435.56,8659.97,1613800000,8659.97
+2001-09-24,8242.32,8733.39,8242.32,8603.86,1746600000,8603.86
+2001-09-21,8356.56,8484.22,7926.93,8235.81,2317300000,8235.81
+2001-09-20,8375.72,8711.38,8304.45,8376.21,2004800000,8376.21
+2001-09-19,8903.54,8990.37,8453.01,8759.13,2120550000,8759.13
+2001-09-18,8922.70,9126.89,8743.91,8903.40,1650410000,8903.40
+2001-09-17,9294.55,9294.55,8755.46,8920.70,2330830000,8920.70
+2001-09-10,9603.36,9740.44,9431.07,9605.51,1276600000,9605.51
+2001-09-07,9841.25,9842.08,9507.04,9605.85,1424300000,9605.85
+2001-09-06,10028.35,10053.73,9762.03,9840.84,1359700000,9840.84
+2001-09-05,9998.12,10140.79,9820.98,10033.27,1384500000,10033.27
+2001-09-04,9946.98,10238.50,9858.34,9997.49,1178300000,9997.49
+2001-08-31,9918.96,10072.22,9846.72,9949.75,920100000,9949.75
+2001-08-30,10077.07,10149.10,9829.35,9919.58,1157000000,9919.58
+2001-08-29,10224.45,10292.60,10030.43,10090.90,963700000,10090.90
+2001-08-28,10382.56,10405.88,10175.60,10222.03,987100000,10222.03
+2001-08-27,10422.76,10498.03,10334.88,10382.35,842600000,10382.35
+2001-08-24,10232.48,10487.52,10190.34,10423.17,1043600000,10423.17
+2001-08-23,10276.41,10357.09,10142.66,10229.15,986200000,10229.15
+2001-08-22,10170.30,10340.76,10099.07,10276.90,1110800000,10276.90
+2001-08-21,10320.07,10436.39,10132.92,10174.14,1041600000,10174.14
+2001-08-20,10239.33,10388.23,10146.05,10320.07,897100000,10320.07
+2001-08-17,10385.46,10418.68,10143.49,10240.78,974300000,10240.78
+2001-08-16,10342.10,10460.82,10198.15,10392.52,1055400000,10392.52
+2001-08-15,10407.05,10530.36,10289.01,10345.95,1065600000,10345.95
+2001-08-14,10416.95,10513.68,10333.29,10412.17,964600000,10412.17
+2001-08-13,10411.90,10504.82,10314.95,10415.91,837600000,10415.91
+2001-08-10,10296.89,10473.34,10164.67,10416.25,960900000,10416.25
+2001-08-09,10291.15,10361.52,10160.51,10298.56,1104200000,10298.56
+2001-08-08,10456.18,10509.80,10245.68,10293.50,1124600000,10293.50
+2001-08-07,10399.03,10520.11,10324.50,10458.74,1012000000,10458.74
+2001-08-06,10504.13,10549.59,10337.23,10401.31,811700000,10401.31
+2001-08-03,10550.01,10592.98,10381.10,10512.78,939900000,10512.78
+2001-08-02,10513.47,10663.07,10454.53,10551.18,1218300000,10551.18
+2001-08-01,10527.38,10659.33,10423.31,10510.01,1340300000,10510.01
+2001-07-31,10403.18,10639.40,10364.84,10522.81,1129200000,10522.81
+2001-07-30,10418.68,10513.26,10301.05,10401.72,909100000,10401.72
+2001-07-27,10451.89,10516.38,10316.27,10416.67,1015300000,10416.67
+2001-07-26,10403.46,10498.73,10237.46,10455.63,1213900000,10455.63
+2001-07-25,10241.75,10466.28,10159.34,10405.67,1280700000,10405.67
+2001-07-24,10423.80,10469.40,10170.82,10241.12,1198700000,10241.12
+2001-07-23,10576.92,10644.73,10374.81,10424.42,986900000,10424.42
+2001-07-20,10606.19,10668.33,10456.25,10576.65,1170900000,10576.65
+2001-07-19,10574.33,10758.14,10480.54,10610.00,1343500000,10610.00
+2001-07-18,10594.54,10676.83,10374.55,10569.83,1316300000,10569.83
+2001-07-17,10468.62,10683.76,10363.51,10606.39,1238100000,10606.39
+2001-07-16,10537.98,10649.02,10374.55,10472.12,1039800000,10472.12
+2001-07-13,10478.39,10615.42,10374.01,10539.06,1121700000,10539.06
+2001-07-12,10269.31,10542.02,10249.58,10478.99,1394000000,10478.99
+2001-07-11,10174.70,10355.83,10049.38,10241.02,1384100000,10241.02
+2001-07-10,10300.82,10406.87,10104.06,10175.64,1263800000,10175.64
+2001-07-09,10253.62,10389.91,10166.55,10299.40,1045700000,10299.40
+2001-07-06,10476.73,10483.82,10176.26,10252.68,1056700000,10252.68
+2001-07-05,10566.23,10617.47,10403.57,10479.86,934900000,10479.86
+2001-07-03,10588.89,10648.00,10479.99,10571.11,622110000,10571.11
+2001-07-02,10504.95,10707.24,10397.20,10593.72,1128300000,10593.72
+2001-06-29,10565.27,10729.18,10374.32,10502.40,1832360000,10502.40
+2001-06-28,10438.73,10736.43,10429.74,10566.21,1327300000,10566.21
+2001-06-27,10470.35,10608.48,10351.10,10434.84,1162100000,10434.84
+2001-06-26,10497.30,10600.90,10313.40,10472.48,1198900000,10472.48
+2001-06-25,10607.88,10711.19,10417.93,10504.22,1050100000,10504.22
+2001-06-22,10716.50,10753.27,10513.61,10604.59,1189200000,10604.59
+2001-06-21,10646.39,10848.47,10512.67,10715.43,1546820000,10715.43
+2001-06-20,10593.79,10770.88,10480.20,10647.33,1350100000,10647.33
+2001-06-19,10654.30,10793.46,10514.74,10596.67,1184900000,10596.67
+2001-06-18,10622.50,10781.45,10531.78,10645.38,1111600000,10645.38
+2001-06-15,10690.13,10792.25,10495.69,10623.64,1635550000,10623.64
+2001-06-14,10868.27,10874.91,10604.45,10690.13,1242900000,10690.13
+2001-06-13,10942.00,11065.92,10817.21,10871.62,1063600000,10871.62
+2001-06-12,10914.67,11009.93,10744.99,10948.38,1136500000,10948.38
+2001-06-11,10974.79,11038.56,10819.29,10922.09,870100000,10922.09
+2001-06-08,11095.62,11096.46,10882.92,10977.00,726200000,10977.00
+2001-06-07,11069.58,11169.34,10940.11,11090.74,1089600000,11090.74
+2001-06-06,11177.73,11236.68,10998.48,11070.24,1061900000,11070.24
+2001-06-05,11061.39,11234.98,10973.10,11175.84,1116800000,11175.84
+2001-06-04,10991.77,11125.99,10898.80,11061.52,836500000,11061.52
+2001-06-01,10913.57,11063.61,10793.46,10990.41,1015000000,10990.41
+2001-05-31,10873.23,11023.25,10798.53,10911.94,1226600000,10911.94
+2001-05-30,11032.96,11089.89,10819.74,10872.64,1158600000,10872.64
+2001-05-29,11004.66,11162.96,10913.44,11039.14,1026000000,11039.14
+2001-05-25,11122.03,11166.92,10949.01,11005.37,828100000,11005.37
+2001-05-24,11107.07,11248.19,10977.20,11122.42,1100700000,11122.42
+2001-05-23,11257.76,11308.44,11033.16,11105.51,1134800000,11105.51
+2001-05-22,11339.80,11411.63,11162.83,11257.24,1260400000,11257.24
+2001-05-21,11299.14,11436.42,11149.82,11337.92,1174900000,11337.92
+2001-05-18,11245.78,11374.87,11123.01,11301.74,1130800000,11301.74
+2001-05-17,11218.65,11413.46,11104.34,11248.58,1355600000,11248.58
+2001-05-16,10864.74,11258.21,10779.66,11215.92,1405300000,11215.92
+2001-05-15,10877.46,10979.35,10752.73,10872.97,1071800000,10872.97
+2001-05-14,10819.55,10930.09,10730.74,10877.33,858200000,10877.33
+2001-05-11,10908.30,10969.39,10716.16,10821.31,906200000,10821.31
+2001-05-10,10868.87,11049.39,10826.90,10910.44,1056700000,10910.44
+2001-05-09,10875.96,10964.84,10739.78,10866.98,1132400000,10866.98
+2001-05-08,10936.66,11001.66,10755.07,10883.51,1006300000,10883.51
+2001-05-07,10952.35,11059.51,10822.74,10935.17,949000000,10935.17
+2001-05-04,10793.20,10989.95,10638.48,10951.24,1082100000,10951.24
+2001-05-03,10872.32,10911.06,10657.99,10796.65,1137900000,10796.65
+2001-05-02,10902.77,11024.31,10726.77,10876.68,1342200000,10876.68
+2001-05-01,10734.05,10966.07,10669.32,10898.34,1181300000,10898.34
+2001-04-30,10814.41,10973.15,10666.13,10734.97,1226000000,10734.97
+2001-04-27,10694.95,10894.60,10632.36,10810.05,1091300000,10810.05
+2001-04-26,10633.01,10820.72,10533.98,10692.35,1345200000,10692.35
+2001-04-25,10453.43,10675.95,10373.14,10625.20,1203600000,10625.20
+2001-04-24,10529.75,10694.61,10401.45,10454.34,1216500000,10454.34
+2001-04-23,10571.00,10669.71,10393.05,10532.23,1012600000,10532.23
+2001-04-20,10690.33,10755.46,10445.43,10579.85,1338700000,10579.85
+2001-04-19,10616.09,10768.28,10468.79,10693.71,1486800000,10693.71
+2001-04-18,10226.88,10806.41,10215.69,10615.83,1918900000,10615.83
+2001-04-17,10151.73,10286.61,9980.22,10216.73,1109600000,10216.73
+2001-04-16,10118.16,10282.38,9991.14,10158.56,913900000,10158.56
+2001-04-12,10013.08,10178.22,9862.71,10126.94,1102000000,10126.94
+2001-04-11,10109.05,10246.59,9898.77,10013.47,1290300000,10013.47
+2001-04-10,9850.35,10226.85,9850.35,10102.74,1349600000,10102.74
+2001-04-09,9793.58,9999.35,9699.92,9845.15,1062800000,9845.15
+2001-04-06,9913.94,9951.73,9600.91,9791.09,1266800000,9791.09
+2001-04-05,9527.21,9969.92,9527.21,9918.05,1368000000,9918.05
+2001-04-04,9480.95,9693.05,9303.48,9515.42,1425590000,9515.42
+2001-04-03,9774.78,9779.74,9385.43,9485.71,1386100000,9485.71
+2001-04-02,9877.16,10043.02,9638.35,9777.93,1204200000,9777.93
+2001-03-30,9799.47,9998.49,9685.07,9878.78,1280800000,9878.78
+2001-03-29,9784.94,9950.22,9583.67,9799.06,1234500000,9799.06
+2001-03-28,9939.68,9939.68,9607.06,9785.35,1333400000,9785.35
+2001-03-27,9687.93,10012.98,9584.29,9947.54,1314200000,9947.54
+2001-03-26,9509.25,9820.50,9489.75,9687.53,1114000000,9687.53
+2001-03-23,9395.58,9631.80,9249.63,9504.78,1364900000,9504.78
+2001-03-22,9490.66,9565.40,9047.56,9389.48,1723950000,9389.48
+2001-03-21,9717.46,9807.08,9391.42,9487.00,1346300000,9487.00
+2001-03-20,9961.14,10130.45,9675.51,9720.76,1235900000,9720.76
+2001-03-19,9820.05,10059.08,9720.94,9959.11,1126200000,9959.11
+2001-03-16,10023.55,10119.44,9720.17,9823.41,1543560000,9823.41
+2001-03-15,9982.92,10190.80,9887.68,10031.28,1259500000,10031.28
+2001-03-14,10279.42,10279.42,9817.74,9973.46,1397400000,9973.46
+2001-03-13,10206.89,10397.83,10021.60,10290.80,1360900000,10290.80
+2001-03-12,10638.52,10638.63,10138.90,10208.25,1229000000,10208.25
+2001-03-09,10850.11,10874.15,10520.42,10644.62,1085900000,10644.62
+2001-03-08,10727.16,10940.45,10625.95,10858.25,1114100000,10858.25
+2001-03-07,10591.86,10822.23,10524.76,10729.60,1132200000,10729.60
+2001-03-06,10570.17,10759.40,10508.43,10591.22,1091800000,10591.22
+2001-03-05,10468.93,10659.52,10393.59,10562.30,929200000,10562.30
+2001-03-02,10438.04,10645.57,10239.81,10466.31,1294000000,10466.31
+2001-03-01,10493.25,10605.23,10236.92,10450.14,1294900000,10450.14
+2001-02-28,10639.32,10750.23,10374.62,10495.28,1225300000,10495.28
+2001-02-27,10638.44,10787.29,10463.92,10636.88,1114100000,10636.88
+2001-02-26,10447.59,10701.92,10347.59,10642.53,1130800000,10642.53
+2001-02-23,10529.25,10595.01,10225.14,10441.90,1231300000,10441.90
+2001-02-22,10527.80,10694.50,10278.93,10526.81,1365900000,10526.81
+2001-02-21,10721.29,10828.48,10468.32,10526.58,1208500000,10526.58
+2001-02-20,10800.23,10988.29,10612.25,10730.88,1112200000,10730.88
+2001-02-16,10884.11,10946.11,10652.33,10799.82,1257200000,10799.82
+2001-02-15,10800.65,11023.44,10694.43,10891.02,1153700000,10891.02
+2001-02-14,10899.42,10989.61,10683.39,10795.41,1150300000,10795.41
+2001-02-13,10950.18,11114.44,10774.98,10903.32,1075200000,10903.32
+2001-02-12,10779.42,11024.92,10727.02,10946.77,1039100000,10946.77
+2001-02-09,10878.51,10979.12,10682.77,10781.45,1075500000,10781.45
+2001-02-08,10940.62,11080.42,10776.04,10880.55,1107200000,10880.55
+2001-02-07,10948.95,11140.09,10794.29,10946.72,1158300000,10946.72
+2001-02-06,10965.03,11117.80,10820.28,10957.42,1059600000,10957.42
+2001-02-05,10860.44,11061.42,10759.98,10965.85,1013000000,10965.85
+2001-02-02,10982.71,11093.01,10786.69,10864.10,1048400000,10864.10
+2001-02-01,10884.82,11063.95,10759.85,10983.63,1118800000,10983.63
+2001-01-31,10882.25,11072.28,10705.23,10887.36,1295300000,10887.36
+2001-01-30,10702.19,10950.38,10609.77,10881.20,1149800000,10881.20
+2001-01-29,10657.13,10832.56,10515.99,10702.19,1053100000,10702.19
+2001-01-26,10727.08,10874.28,10506.26,10659.98,1098000000,10659.98
+2001-01-25,10644.53,10882.42,10520.90,10729.52,1258000000,10729.52
+2001-01-24,10651.85,10795.80,10483.49,10646.97,1309000000,10646.97
+2001-01-23,10575.80,10773.94,10459.91,10649.81,1232600000,10649.81
+2001-01-22,10581.90,10749.44,10371.66,10578.24,1164000000,10578.24
+2001-01-19,10686.00,10792.14,10448.93,10587.59,1407800000,10587.59
+2001-01-18,10584.57,10834.43,10466.01,10678.28,1445000000,10678.28
+2001-01-17,10660.95,10817.35,10442.83,10584.34,1349100000,10584.34
+2001-01-16,10525.78,10751.48,10362.72,10652.66,1205700000,10652.66
+2001-01-12,10608.74,10743.75,10339.94,10525.38,1276000000,10525.38
+2001-01-11,10600.20,10808.00,10400.94,10609.55,1411200000,10609.55
+2001-01-10,10568.48,10728.30,10325.71,10604.27,1296500000,10604.27
+2001-01-09,10625.21,10801.09,10387.12,10572.55,1191300000,10572.55
+2001-01-08,10658.73,10818.98,10407.85,10621.35,1115500000,10621.35
+2001-01-05,10912.81,10990.59,10492.84,10662.01,1430800000,10662.01
+2001-01-04,10944.94,11224.41,10672.58,10912.41,216940000,10912.41
+2001-01-03,10637.42,11212.62,10367.19,10945.75,188070000,10945.75
+2001-01-02,10790.92,10916.98,10450.55,10646.15,1129400000,10646.15
+2000-12-29,10868.76,11031.05,10675.75,10787.99,1035500000,10787.99
+2000-12-28,10795.20,11009.44,10645.42,10868.76,1015300000,10868.76
+2000-12-27,10690.10,10944.60,10551.00,10803.16,1092700000,10803.16
+2000-12-26,10638.21,10813.78,10479.71,10692.44,806500000,10692.44
+2000-12-22,10495.26,10772.07,10364.06,10635.56,1087100000,10635.56
+2000-12-21,10314.38,10651.96,10158.16,10487.29,1449900000,10487.29
+2000-12-20,10580.97,10604.08,10197.59,10318.93,1421600000,10318.93
+2000-12-19,10643.14,10865.35,10441.41,10584.37,1324900000,10584.37
+2000-12-18,10433.34,10783.82,10417.43,10645.42,1189900000,10645.42
+2000-12-15,10647.98,10706.84,10324.24,10434.96,156110000,10434.96
+2000-12-14,10794.82,10864.49,10508.53,10674.99,1061300000,10674.99
+2000-12-13,10777.95,11002.23,10653.76,10794.44,1195100000,10794.44
+2000-12-12,10722.77,10968.77,10582.09,10768.27,1083400000,10768.27
+2000-12-11,10719.36,10931.33,10521.04,10725.80,1202400000,10725.80
+2000-12-08,10632.14,10896.82,10534.69,10712.91,1358300000,10712.91
+2000-12-07,10644.66,10791.40,10448.99,10617.36,1128000000,10617.36
+2000-12-06,10896.14,10995.41,10513.84,10664.38,1399300000,10664.38
+2000-12-05,10576.78,11044.70,10504.36,10898.72,900300000,10898.72
+2000-12-04,10377.33,10701.35,10227.17,10560.95,1103000000,10560.95
+2000-12-01,10416.76,10645.42,10238.54,10373.54,1195200000,10373.54
+2000-11-30,10610.53,10690.16,10204.80,10414.49,1186530000,10414.49
+2000-11-29,10502.74,10746.66,10383.02,10629.11,402100000,10629.11
+2000-11-28,10537.86,10730.35,10356.47,10507.58,1028200000,10507.58
+2000-11-27,10479.33,10758.04,10411.08,10546.07,946100000,10546.07
+2000-11-24,10403.87,10596.50,10354.20,10470.23,404870000,10470.23
+2000-11-22,10484.26,10589.67,10251.06,10399.32,963200000,10399.32
+2000-11-21,10465.57,10676.13,10303.39,10494.50,1137100000,10494.50
+2000-11-20,10624.18,10707.22,10331.45,10462.65,955800000,10462.65
+2000-11-17,10657.13,10824.77,10462.55,10629.87,1070400000,10629.87
+2000-11-16,10705.33,10857.38,10536.30,10656.03,956300000,10656.03
+2000-11-15,10681.21,10863.83,10544.17,10707.60,1066800000,10707.60
+2000-11-14,10528.25,10809.61,10484.64,10681.06,1118800000,10681.06
+2000-11-13,10595.35,10701.54,10273.24,10517.25,1129300000,10517.25
+2000-11-10,10813.78,10886.20,10497.53,10602.95,962500000,10602.95
+2000-11-09,10902.11,10989.34,10576.40,10834.25,1111000000,10834.25
+2000-11-08,10954.34,11152.02,10779.27,10907.06,909300000,10907.06
+2000-11-07,10978.72,11105.75,10825.15,10952.18,880900000,10952.18
+2000-11-06,10820.60,11092.10,10741.73,10977.21,930900000,10977.21
+2000-11-03,10883.17,10996.17,10650.72,10817.95,997700000,10817.95
+2000-11-02,10903.17,11071.06,10731.49,10880.51,1167700000,10880.51
+2000-11-01,10966.21,11103.10,10736.42,10899.47,1206800000,10899.47
+2000-10-31,10835.39,11108.79,10681.06,10971.14,1366400000,10971.14
+2000-10-30,10588.06,10944.98,10506.25,10835.77,1186500000,10835.77
+2000-10-27,10381.60,10696.43,10296.70,10590.62,1086300000,10590.62
+2000-10-26,10330.18,10563.25,10128.18,10380.12,1303800000,10380.12
+2000-10-25,10395.66,10563.99,10170.08,10326.48,1315600000,10326.48
+2000-10-24,10273.57,10583.96,10136.69,10393.07,1158600000,10393.07
+2000-10-23,10230.29,10496.28,10078.24,10271.72,1046800000,10271.72
+2000-10-20,10141.13,10406.76,9925.82,10226.59,1177400000,10226.59
+2000-10-19,10014.61,10317.23,9901.77,10142.98,1297900000,10142.98
+2000-10-18,10085.99,10171.47,9571.40,9975.02,1441700000,9975.02
+2000-10-17,10242.87,10402.32,9924.34,10089.71,1161500000,10089.71
+2000-10-16,10184.78,10428.95,10033.84,10238.80,1005400000,10238.80
+2000-10-13,10031.62,10325.37,9883.27,10192.18,1223900000,10192.18
+2000-10-12,10424.14,10462.25,9873.66,10034.58,1388600000,10034.58
+2000-10-11,10521.07,10647.23,10228.44,10413.79,1387500000,10413.79
+2000-10-10,10569.17,10744.52,10377.16,10524.40,1044000000,10524.40
+2000-10-09,10596.91,10762.10,10438.94,10568.43,716600000,10568.43
+2000-10-06,10726.76,10871.42,10440.05,10596.54,1150100000,10596.54
+2000-10-05,10783.72,10940.23,10570.28,10724.92,1176100000,10724.92
+2000-10-04,10723.33,10972.41,10596.54,10784.48,1167400000,10784.48
+2000-10-03,10709.84,10976.11,10561.03,10719.74,1098100000,10719.74
+2000-10-02,10659.06,10876.23,10479.27,10700.13,1051200000,10700.13
+2000-09-29,10821.40,10923.21,10552.15,10650.92,1197100000,10650.92
+2000-09-28,10629.84,10948.00,10539.48,10824.06,1206200000,10824.06
+2000-09-27,10634.45,10821.10,10439.31,10628.36,1174700000,10628.36
+2000-09-26,10806.30,10915.44,10499.61,10631.32,1106600000,10631.32
+2000-09-25,10847.37,11039.47,10664.24,10808.15,982400000,10808.15
+2000-09-22,10678.30,10936.53,10505.16,10847.37,1185500000,10847.37
+2000-09-21,10680.52,10902.12,10548.08,10765.52,1105400000,10765.52
+2000-09-20,10794.47,10906.93,10500.35,10687.92,1104000000,10687.92
+2000-09-19,10812.22,10960.95,10645.38,10789.29,1024900000,10789.29
+2000-09-18,10926.42,11053.80,10693.84,10808.52,962500000,10808.52
+2000-09-15,11087.84,11203.26,10857.73,10927.00,1268400000,10927.00
+2000-09-14,11189.58,11285.39,10986.47,11087.47,1014000000,11087.47
+2000-09-13,11225.03,11350.87,11020.14,11182.18,1068300000,11182.18
+2000-09-12,11197.71,11351.98,11015.70,11233.23,991200000,11233.23
+2000-09-11,11219.54,11367.15,11043.07,11195.49,899300000,11195.49
+2000-09-08,11261.72,11381.95,11059.72,11220.65,961000000,11220.65
+2000-09-07,11316.01,11444.84,11124.83,11259.87,985500000,11259.87
+2000-09-06,11253.58,11518.83,11186.25,11310.64,995100000,11310.64
+2000-09-05,11221.76,11382.69,11094.50,11260.61,838500000,11260.61
+2000-09-01,11219.54,11406.74,11130.01,11238.78,767700000,11238.78
+2000-08-31,11105.23,11415.99,11040.85,11215.10,1056600000,11215.10
+2000-08-30,11209.01,11282.06,11034.57,11103.01,818400000,11103.01
+2000-08-29,11249.27,11356.42,11100.79,11215.10,795600000,11215.10
+2000-08-28,11194.48,11410.44,11123.35,11252.84,733600000,11252.84
+2000-08-25,11180.54,11301.41,11073.59,11192.63,685600000,11192.63
+2000-08-24,11143.91,11302.51,11009.12,11182.74,837100000,11182.74
+2000-08-23,11130.55,11253.06,10990.44,11144.65,871000000,11144.65
+2000-08-22,11082.20,11274.67,11000.33,11139.15,818800000,11139.15
+2000-08-21,11058.85,11193.73,10945.39,11079.81,731600000,11079.81
+2000-08-18,11051.20,11180.54,10933.30,11046.48,821400000,11046.48
+2000-08-17,11010.95,11180.91,10899.24,11055.64,922400000,11055.64
+2000-08-16,11068.83,11171.02,10888.62,11008.39,929800000,11008.39
+2000-08-15,11175.05,11227.06,10965.54,11067.00,895900000,11067.00
+2000-08-14,11027.07,11232.92,10928.91,11176.14,783800000,11176.14
+2000-08-11,10905.98,11131.83,10841.37,11027.80,835500000,11027.80
+2000-08-10,10901.06,11069.93,10779.47,10908.76,940800000,10908.76
+2000-08-09,10970.94,11097.03,10780.02,10905.83,1054000000,10905.83
+2000-08-08,10865.15,11083.11,10741.38,10976.89,992200000,10976.89
+2000-08-07,10773.98,10973.23,10657.50,10867.01,854800000,10867.01
+2000-08-04,10713.36,10873.97,10555.68,10767.75,956000000,10767.75
+2000-08-03,10679.37,10844.30,10518.68,10706.58,1095600000,10706.58
+2000-08-02,10609.15,10818.66,10514.29,10687.53,986300000,10687.53
+2000-08-01,10523.81,10728.92,10428.58,10606.95,938700000,10606.95
+2000-07-31,10514.29,10727.09,10374.00,10521.98,952600000,10521.98
+2000-07-28,10594.97,10732.14,10367.28,10511.17,980000000,10511.17
+2000-07-27,10516.83,10745.93,10450.01,10586.13,1156400000,10586.13
+2000-07-26,10689.36,10790.13,10447.18,10516.48,1235800000,10516.48
+2000-07-25,10689.28,10867.20,10557.49,10699.97,969400000,10699.97
+2000-07-24,10731.44,10895.84,10545.47,10685.12,880300000,10685.12
+2000-07-21,10843.51,10949.58,10614.06,10733.56,968300000,10733.56
+2000-07-20,10700.68,10980.34,10671.33,10843.87,1064600000,10843.87
+2000-07-19,10724.15,10907.15,10587.89,10696.08,909400000,10696.08
+2000-07-18,10799.16,10895.57,10613.00,10739.92,908300000,10739.92
+2000-07-17,10812.40,10969.38,10653.30,10804.27,906000000,10804.27
+2000-07-14,10793.31,10935.44,10661.43,10812.75,960600000,10812.75
+2000-07-13,10774.92,10963.02,10643.40,10788.71,1026800000,10788.71
+2000-07-12,10722.24,10930.84,10639.51,10783.76,1001200000,10783.76
+2000-07-11,10649.06,10877.46,10544.76,10727.19,980500000,10727.19
+2000-07-10,10627.14,10792.25,10520.01,10646.58,838700000,10646.58
+2000-07-07,10483.33,10742.04,10419.25,10635.98,931700000,10635.98
+2000-07-06,10481.45,10644.11,10303.28,10481.47,947300000,10481.47
+2000-07-05,10538.23,10674.16,10362.33,10483.60,1019300000,10483.60
+2000-07-03,10450.36,10610.17,10353.66,10560.67,451900000,10560.67
+2000-06-30,10393.09,10626.79,10161.51,10447.89,1459700000,10447.89
+2000-06-29,10523.90,10582.94,10279.24,10398.04,1110900000,10398.04
+2000-06-28,10506.39,10712.70,10399.10,10527.79,1095100000,10527.79
+2000-06-27,10541.58,10741.69,10384.60,10504.46,1042500000,10504.46
+2000-06-26,10403.69,10680.26,10365.15,10542.99,889000000,10542.99
+2000-06-23,10376.47,10555.37,10283.13,10404.75,847600000,10404.75
+2000-06-22,10495.97,10596.73,10256.97,10376.12,1022700000,10376.12
+2000-06-21,10446.83,10607.69,10312.48,10497.74,1009600000,10497.74
+2000-06-20,10558.90,10632.09,10318.84,10435.16,1031500000,10435.16
+2000-06-19,10448.40,10733.56,10322.02,10557.84,921700000,10557.84
+2000-06-16,10717.76,10784.47,10393.44,10449.30,1250800000,10449.30
+2000-06-15,10689.63,10889.48,10552.89,10714.82,1011400000,10714.82
+2000-06-14,10632.46,10860.84,10542.99,10687.95,929700000,10687.95
+2000-06-13,10562.31,10751.86,10395.56,10621.84,935900000,10621.84
+2000-06-12,10615.12,10757.60,10476.88,10564.21,774100000,10564.21
+2000-06-09,10678.47,10848.38,10515.52,10614.06,786000000,10614.06
+2000-06-08,10818.78,10887.72,10524.92,10668.72,854300000,10668.72
+2000-06-07,10733.48,10974.07,10588.64,10812.86,854600000,10812.86
+2000-06-06,10822.61,10916.97,10592.82,10735.57,950100000,10735.57
+2000-06-05,10793.11,10951.79,10629.03,10815.30,838600000,10815.30
+2000-06-02,10660.09,11013.05,10600.46,10794.76,1162400000,10794.76
+2000-06-01,10532.27,10780.37,10422.95,10652.20,960100000,10652.20
+2000-05-31,10528.28,10692.73,10377.37,10522.33,960500000,10522.33
+2000-05-30,10302.31,10596.00,10287.94,10527.13,844200000,10527.13
+2000-05-26,10322.89,10487.72,10163.20,10299.24,722600000,10299.24
+2000-05-25,10529.87,10644.32,10207.75,10323.92,984500000,10323.92
+2000-05-24,10420.90,10679.53,10240.99,10535.35,1152300000,10535.35
+2000-05-23,10539.12,10671.74,10325.63,10422.27,869900000,10422.27
+2000-05-22,10624.79,10718.00,10308.15,10542.55,869000000,10542.55
+2000-05-19,10764.22,10821.83,10468.18,10626.85,853700000,10626.85
+2000-05-18,10771.80,10938.34,10669.00,10777.28,807900000,10777.28
+2000-05-17,10930.64,10947.25,10648.78,10769.74,820500000,10769.74
+2000-05-16,10816.01,11086.72,10723.48,10934.57,955500000,10934.57
+2000-05-15,10606.97,10902.36,10509.31,10807.78,854600000,10807.78
+2000-05-12,10549.06,10780.37,10444.54,10609.37,858200000,10609.37
+2000-05-11,10369.27,10676.88,10315.69,10545.97,953600000,10545.97
+2000-05-10,10533.09,10649.95,10169.77,10367.78,1006400000,10367.78
+2000-05-09,10607.54,10765.75,10435.96,10536.75,896600000,10536.75
+2000-05-08,10571.31,10744.22,10400.40,10603.63,787600000,10603.63
+2000-05-05,10409.70,10688.61,10312.91,10577.86,805500000,10577.86
+2000-05-04,10478.89,10631.53,10293.05,10412.49,925800000,10412.49
+2000-05-03,10732.21,10754.39,10345.17,10480.13,991600000,10480.13
+2000-05-02,10805.58,10932.47,10580.65,10731.12,1011500000,10731.12
+2000-05-01,10749.42,11001.34,10622.22,10811.78,966300000,10811.78
+2000-04-28,10892.76,11005.07,10632.46,10733.91,984600000,10733.91
+2000-04-27,10941.91,11024.61,10650.14,10888.10,1111000000,10888.10
+2000-04-26,11127.92,11246.75,10816.44,10945.50,999600000,10945.50
+2000-04-25,10916.65,11265.67,10764.62,11124.82,1071100000,11124.82
+2000-04-24,10822.33,11060.29,10579.10,10906.10,868700000,10906.10
+2000-04-20,10668.19,10941.47,10582.51,10844.05,896200000,10844.05
+2000-04-19,10748.97,10909.20,10503.40,10674.96,1001400000,10674.96
+2000-04-18,10584.02,10941.78,10424.90,10767.42,1109400000,10767.42
+2000-04-17,10303.29,10721.50,10128.62,10582.51,1204700000,10582.51
+2000-04-14,10922.85,10922.85,10173.92,10305.77,1279700000,10305.77
+2000-04-13,11132.58,11290.80,10806.51,10923.55,1032000000,10923.55
+2000-04-12,11283.05,11600.43,11026.47,11125.13,1175900000,11125.13
+2000-04-11,11180.98,11459.58,11024.22,11287.08,971400000,11287.08
+2000-04-10,11114.89,11404.35,10955.43,11186.56,853700000,11186.56
+2000-04-07,11122.03,11317.79,10932.78,11111.48,891600000,11111.48
+2000-04-06,11029.56,11303.83,10921.07,11114.27,1008000000,11114.27
+2000-04-05,11163.29,11326.79,10894.00,11033.92,1110300000,11033.92
+2000-04-04,11225.34,11531.24,10682.72,11164.84,1515460000,11164.84
+2000-04-03,10863.28,11344.17,10821.71,11221.93,1021700000,11221.93
+2000-03-31,10993.28,11244.58,10801.23,10921.92,1227400000,10921.92
+2000-03-30,11008.17,11258.23,10796.58,10980.25,1193400000,10980.25
+2000-03-29,10939.05,11214.48,10792.24,11018.72,1061900000,11018.72
+2000-03-28,11023.68,11192.76,10804.65,10936.11,959100000,10936.11
+2000-03-27,11093.25,11274.98,10881.90,11025.85,901000000,11025.85
+2000-03-24,11107.45,11311.28,10901.44,11112.72,1052200000,11112.72
+2000-03-23,10884.38,11224.72,10737.63,11119.86,1078300000,11119.86
+2000-03-22,10916.96,11054.71,10671.86,10866.70,1075000000,10866.70
+2000-03-21,10680.24,11012.20,10515.50,10907.34,1065900000,10907.34
+2000-03-20,10594.75,10866.08,10456.86,10680.24,920800000,10680.24
+2000-03-17,10629.98,10849.32,10399.15,10595.23,1295100000,10595.23
+2000-03-16,10139.58,10716.23,10139.58,10630.60,1482300000,10630.60
+2000-03-15,9808.15,10294.60,9676.90,10131.41,1302800000,10131.41
+2000-03-14,9957.67,10149.41,9747.33,9811.24,1094000000,9811.24
+2000-03-13,9911.22,10111.25,9670.07,9947.13,1016100000,9947.13
+2000-03-10,10008.55,10211.77,9792.93,9928.82,1138800000,9928.82
+2000-03-09,9855.29,10097.28,9667.28,10010.73,1123000000,10010.73
+2000-03-08,9800.69,10037.41,9611.75,9856.53,1203000000,9856.53
+2000-03-07,10197.61,10208.66,9651.77,9796.03,1314100000,9796.03
+2000-03-06,10358.96,10518.91,10038.65,10170.50,1029000000,10170.50
+2000-03-03,10171.12,10581.89,10148.16,10367.20,1150300000,10367.20
+2000-03-02,10135.44,10361.61,9986.53,10164.92,1198600000,10164.92
+2000-03-01,10128.11,10355.72,9935.96,10137.93,1274100000,10137.93
+2000-02-29,10039.58,10332.14,9926.65,10128.31,1204300000,10128.31
+2000-02-28,9854.66,10228.52,9760.36,10038.65,1026500000,10038.65
+2000-02-25,10090.77,10196.02,9767.80,9862.12,1065200000,9862.12
+2000-02-24,10242.48,10321.90,9877.94,10092.63,1215000000,10092.63
+2000-02-23,10294.82,10443.21,10077.74,10225.73,993700000,10225.73
+2000-02-22,10219.83,10446.62,10011.66,10304.84,980000000,10304.84
+2000-02-18,10514.57,10562.34,10129.24,10219.52,1042300000,10219.52
+2000-02-17,10565.76,10768.66,10348.66,10514.57,1034800000,10514.57
+2000-02-16,10711.82,10831.64,10468.65,10561.41,1018800000,10561.41
+2000-02-15,10520.15,10821.09,10377.44,10718.09,1092100000,10718.09
+2000-02-14,10431.65,10674.96,10327.56,10519.84,927300000,10519.84
+2000-02-11,10638.64,10763.38,10301.12,10425.21,1025700000,10425.21
+2000-02-10,10697.92,10853.67,10491.30,10643.63,1058800000,10643.63
+2000-02-09,10948.82,11016.54,10647.97,10699.16,1050500000,10699.16
+2000-02-08,10904.26,11139.40,10826.67,10957.60,1047700000,10957.60
+2000-02-07,10965.97,11097.52,10732.67,10905.79,918100000,10905.79
+2000-02-04,11014.37,11200.83,10847.54,10963.80,1045100000,10963.80
+2000-02-03,11010.48,11207.97,10799.68,11013.44,1146500000,11013.44
+2000-02-02,11037.64,11228.44,10876.00,11003.20,1038600000,11003.20
+2000-02-01,10937.74,11187.18,10798.44,11041.05,981000000,11041.05
+2000-01-31,10735.77,11059.67,10610.43,10940.53,993800000,10940.53
+2000-01-28,11024.92,11115.20,10649.21,10738.87,1095800000,10738.87
+2000-01-27,11035.55,11274.36,10818.30,11028.02,1129500000,11028.02
+2000-01-26,11025.85,11280.87,10870.73,11032.99,1117300000,11032.99
+2000-01-25,11010.96,11228.75,10779.83,11029.89,1073700000,11029.89
+2000-01-24,11251.94,11501.15,10849.01,11008.17,1115800000,11008.17
+2000-01-21,11356.26,11513.87,11113.65,11251.71,1209800000,11251.71
+2000-01-20,11490.29,11654.72,11194.32,11351.30,1100700000,11351.30
+2000-01-19,11535.24,11710.57,11320.28,11489.36,1087800000,11489.36
+2000-01-18,11719.19,11834.67,11397.22,11560.72,1056700000,11560.72
+2000-01-14,11619.35,11908.50,11506.42,11722.98,1085900000,11722.98
+2000-01-13,11558.24,11761.14,11421.42,11582.43,1030400000,11582.43
+2000-01-12,11506.73,11751.83,11385.74,11551.10,974600000,11551.10
+2000-01-11,11568.47,11748.11,11398.30,11511.08,1014000000,11511.08
+2000-01-10,11532.48,11765.17,11427.00,11572.20,1064800000,11572.20
+2000-01-07,11247.06,11655.65,11168.26,11522.56,1225200000,11522.56
+2000-01-06,11113.37,11447.79,10963.18,11253.26,1092300000,11253.26
+2000-01-05,10989.37,11337.65,10862.66,11122.65,1085500000,11122.65
+2000-01-04,11349.75,11358.44,10907.03,10997.93,1009000000,10997.93
+2000-01-03,11501.85,11641.07,11180.98,11357.51,931800000,11357.51
+1999-12-31,11453.48,11598.26,11368.05,11497.12,374050000,11497.12
+1999-12-30,11484.36,11640.33,11388.94,11452.86,554680000,11452.86
+1999-12-29,11472.88,11658.68,11367.53,11484.66,567860000,11484.66
+1999-12-28,11389.24,11613.72,11302.08,11476.71,655400000,11476.71
+1999-12-27,11410.65,11603.02,11253.15,11391.08,722600000,11391.08
+1999-12-23,11202.07,11506.38,11202.07,11405.76,728600000,11405.76
+1999-12-22,11199.45,11375.17,11075.76,11203.60,850000000,11203.60
+1999-12-21,11142.43,11336.03,10973.61,11200.54,963500000,11200.54
+1999-12-20,11254.50,11417.38,11026.22,11144.27,904600000,11144.27
+1999-12-17,11259.26,11497.20,11103.59,11257.43,1349800000,11257.43
+1999-12-16,11224.40,11396.89,11016.13,11244.89,1070300000,11244.89
+1999-12-15,11158.78,11400.48,11014.60,11225.32,1033900000,11225.32
+1999-12-14,11195.34,11336.33,11027.13,11160.17,1027800000,11160.17
+1999-12-13,11217.46,11379.46,11024.38,11192.59,977600000,11192.59
+1999-12-10,11137.85,11358.66,11042.12,11224.70,987200000,11224.70
+1999-12-09,11073.62,11327.46,10962.60,11134.79,1122100000,11134.79
+1999-12-08,11107.26,11273.33,10957.41,11068.12,957000000,11068.12
+1999-12-07,11221.65,11351.32,10993.49,11106.65,1085800000,11106.65
+1999-12-06,11286.79,11412.79,11100.53,11225.01,916800000,11225.01
+1999-12-03,11046.10,11423.50,11046.10,11286.18,1006400000,11286.18
+1999-12-02,10995.02,11183.72,10896.24,11039.06,900700000,11039.06
+1999-12-01,10876.47,11111.24,10798.07,10998.39,884000000,10998.39
+1999-11-30,10945.49,11142.13,10785.22,10877.81,951500000,10877.81
+1999-11-29,10985.73,11059.25,10813.97,10947.92,866100000,10947.92
+1999-11-26,11007.26,11115.83,10938.44,10988.91,312120000,10988.91
+1999-11-24,11000.22,11131.12,10859.23,11008.17,734800000,11008.17
+1999-11-23,11090.29,11178.83,10899.60,10995.63,926100000,10995.63
+1999-11-22,11008.78,11195.34,10887.67,11089.52,873500000,11089.52
+1999-11-19,11033.25,11146.41,10871.77,11003.89,893800000,11003.89
+1999-11-18,10887.67,11147.02,10859.92,11035.70,1022800000,11035.70
+1999-11-17,10929.00,11040.90,10774.21,10883.09,960000000,10883.09
+1999-11-16,10762.89,10992.88,10691.94,10932.33,942200000,10932.33
+1999-11-15,10764.73,10899.22,10626.80,10760.75,795700000,10760.75
+1999-11-12,10593.51,10845.16,10513.03,10769.32,900200000,10769.32
+1999-11-11,10603.25,10716.71,10485.20,10595.30,891300000,10595.30
+1999-11-10,10611.94,10713.04,10449.42,10597.74,984700000,10597.74
+1999-11-09,10715.10,10806.02,10506.61,10617.32,854300000,10617.32
+1999-11-08,10668.42,10838.74,10548.20,10718.85,806800000,10718.85
+1999-11-05,10639.95,10885.53,10636.59,10704.48,1007300000,10704.48
+1999-11-04,10612.42,10817.95,10523.43,10639.64,981700000,10639.64
+1999-11-03,10582.54,10759.22,10485.50,10609.06,914400000,10609.06
+1999-11-02,10653.71,10816.11,10508.14,10581.84,904500000,10581.84
+1999-11-01,10730.78,10828.96,10568.08,10648.51,861000000,10648.51
+1999-10-29,10629.18,10883.10,10580.11,10729.86,1120500000,10729.86
+1999-10-28,10397.67,10726.70,10397.67,10622.53,1135100000,10622.53
+1999-10-27,10302.76,10515.21,10172.32,10394.89,950100000,10394.89
+1999-10-26,10350.88,10486.39,10208.73,10302.13,878300000,10302.13
+1999-10-25,10468.98,10518.37,10225.82,10349.93,777000000,10349.93
+1999-10-22,10581.69,10581.69,10301.18,10470.25,959200000,10470.25
+1999-10-21,10390.71,10414.52,10047.57,10297.69,1012500000,10297.69
+1999-10-20,10203.31,10485.13,10144.46,10392.36,928800000,10392.36
+1999-10-19,10117.54,10418.01,10093.80,10204.93,905700000,10204.93
+1999-10-18,10018.45,10221.08,9884.20,10116.28,818700000,10116.28
+1999-10-15,10286.61,10286.61,9911.43,10019.71,912600000,10019.71
+1999-10-14,10230.89,10416.74,10071.64,10286.61,892300000,10286.61
+1999-10-13,10412.31,10495.89,10173.58,10232.16,821500000,10232.16
+1999-10-12,10648.81,10659.58,10366.08,10417.06,778300000,10417.06
+1999-10-11,10649.76,10781.16,10545.60,10648.18,655900000,10648.18
+1999-10-08,10534.52,10743.48,10423.71,10649.76,897300000,10649.76
+1999-10-07,10588.34,10687.12,10430.99,10537.05,827800000,10537.05
+1999-10-06,10399.77,10655.46,10340.75,10588.34,895200000,10588.34
+1999-10-05,10401.23,10578.21,10250.20,10400.59,965700000,10400.59
+1999-10-04,10274.58,10538.32,10220.44,10401.23,803300000,10401.23
+1999-10-01,10335.69,10425.92,10108.05,10273.00,896200000,10273.00
+1999-09-30,10214.11,10456.32,10156.85,10336.95,1017600000,10336.95
+1999-09-29,10274.27,10408.51,10119.76,10213.48,856000000,10213.48
+1999-09-28,10300.51,10386.03,10055.17,10275.53,885400000,10275.53
+1999-09-27,10279.33,10498.74,10201.76,10303.39,780600000,10303.39
+1999-09-24,10311.94,10428.14,10128.63,10279.33,872800000,10279.33
+1999-09-23,10524.07,10643.75,10260.33,10318.59,890800000,10318.59
+1999-09-22,10599.42,10688.39,10407.56,10524.07,822200000,10524.07
+1999-09-21,10822.95,10822.95,10517.10,10598.47,817300000,10598.47
+1999-09-20,10801.87,10918.88,10715.93,10823.90,568000000,10823.90
+1999-09-17,10745.38,10946.74,10690.61,10803.63,861900000,10803.63
+1999-09-16,10795.77,10876.46,10592.46,10737.46,739000000,10737.46
+1999-09-15,10910.40,11049.96,10757.41,10801.42,787300000,10801.42
+1999-09-14,11028.74,11061.04,10815.67,10910.33,734500000,10910.33
+1999-09-13,11027.40,11146.52,10886.90,11030.33,657900000,11030.33
+1999-09-10,11087.00,11218.39,10965.74,11028.43,808500000,11028.43
+1999-09-09,11031.28,11172.17,10900.83,11079.40,773900000,11079.40
+1999-09-08,11034.13,11164.89,10898.62,11036.34,791200000,11036.34
+1999-09-07,11079.08,11191.80,10910.65,11034.13,715300000,11034.13
+1999-09-03,10922.36,11155.70,10922.36,11078.45,663200000,11078.45
+1999-09-02,10923.95,10923.95,10669.71,10843.21,687100000,10843.21
+1999-09-01,10828.44,11013.55,10784.32,10937.88,708200000,10937.88
+1999-08-31,10909.70,11079.08,10725.43,10829.28,861700000,10829.28
+1999-08-30,11087.69,11176.60,10869.81,10914.13,597900000,10914.13
+1999-08-27,11198.45,11295.33,11021.14,11090.17,570050000,11090.17
+1999-08-26,11326.04,11393.48,11133.86,11198.45,719000000,11198.45
+1999-08-25,11282.38,11428.94,11106.31,11326.04,864600000,11326.04
+1999-08-24,11297.54,11404.87,11135.76,11283.30,732700000,11283.30
+1999-08-23,11099.66,11344.09,11087.95,11299.76,682600000,11299.76
+1999-08-20,10963.84,11155.07,10916.35,11100.61,661200000,11100.61
+1999-08-19,10988.85,11037.29,10809.65,10963.84,684200000,10963.84
+1999-08-18,11109.66,11153.49,10913.50,10991.38,682800000,10991.38
+1999-08-17,11049.64,11180.08,10963.52,11117.08,691500000,11117.08
+1999-08-16,10980.11,11105.05,10853.98,11046.79,583550000,11046.79
+1999-08-13,10822.00,11049.64,10822.00,10973.65,691700000,10973.65
+1999-08-12,10785.65,10967.64,10688.07,10789.39,745600000,10789.39
+1999-08-11,10650.59,10878.99,10596.26,10787.80,792300000,10787.80
+1999-08-10,10704.22,10812.82,10487.34,10655.15,836200000,10655.15
+1999-08-09,10714.03,10854.61,10571.56,10707.70,684300000,10707.70
+1999-08-06,10792.58,10896.08,10584.54,10714.03,698900000,10714.03
+1999-08-05,10675.41,10876.77,10509.19,10793.82,859300000,10793.82
+1999-08-04,10675.66,10901.78,10585.17,10674.77,789300000,10674.77
+1999-08-03,10645.96,10812.82,10538.00,10677.31,739600000,10677.31
+1999-08-02,10654.83,10849.23,10551.30,10645.96,649550000,10645.96
+1999-07-30,10791.29,10897.98,10594.99,10655.15,736800000,10655.15
+1999-07-29,10920.15,10920.15,10672.24,10791.29,770100000,10791.29
+1999-07-28,10979.04,11090.48,10851.13,10972.07,690900000,10972.07
+1999-07-27,10863.16,11079.40,10834.35,10979.04,723800000,10979.04
+1999-07-26,10910.96,11014.50,10748.86,10863.16,613450000,10863.16
+1999-07-23,10979.67,11069.59,10813.77,10910.96,630580000,10910.96
+1999-07-22,11002.78,11140.51,10796.67,10969.22,771700000,10969.22
+1999-07-21,10998.94,11142.72,10865.69,11002.78,785500000,11002.78
+1999-07-20,11130.06,11245.62,10914.13,10996.13,754800000,10996.13
+1999-07-19,11209.84,11321.61,11069.90,11187.68,642330000,11187.68
+1999-07-16,11188.63,11300.08,11069.27,11209.84,714100000,11209.84
+1999-07-15,11200.03,11313.37,11072.75,11186.41,818800000,11186.41
+1999-07-14,11202.24,11289.95,11051.86,11148.10,756100000,11148.10
+1999-07-13,11106.31,11277.60,11013.55,11175.02,736000000,11175.02
+1999-07-12,11234.22,11314.64,11087.95,11200.98,685300000,11200.98
+1999-07-09,11142.72,11284.25,11050.59,11193.70,701000000,11193.70
+1999-07-08,11118.66,11290.58,10985.68,11126.89,830600000,11126.89
+1999-07-07,11129.74,11268.42,11008.16,11187.36,791200000,11187.36
+1999-07-06,11119.93,11291.21,11021.78,11135.12,722900000,11135.12
+1999-07-02,11089.53,11205.41,10995.50,11139.24,613570000,11139.24
+1999-07-01,10972.39,11156.65,10841.63,11066.42,843400000,11066.42
+1999-06-30,10805.22,11120.24,10657.36,10970.80,1117000000,10970.80
+1999-06-29,10673.83,10855.56,10589.61,10815.35,820100000,10815.35
+1999-06-28,10633.93,10792.24,10535.15,10655.15,652910000,10655.15
+1999-06-25,10586.44,10719.42,10477.21,10552.56,623460000,10552.56
+1999-06-24,10620.32,10736.83,10404.07,10534.83,690400000,10534.83
+1999-06-23,10702.32,10791.29,10542.75,10666.86,731800000,10666.86
+1999-06-22,10768.49,10879.94,10639.63,10721.63,716500000,10721.63
+1999-06-21,10865.06,10960.36,10684.91,10815.98,686600000,10815.98
+1999-06-18,10885.00,10978.09,10751.39,10855.56,914500000,10855.56
+1999-06-17,10732.71,10936.61,10642.80,10841.63,700300000,10841.63
+1999-06-16,10709.92,10883.74,10608.92,10784.95,806800000,10784.95
+1999-06-15,10612.09,10740.00,10500.01,10594.99,696600000,10594.99
+1999-06-14,10490.83,10691.24,10414.52,10563.33,669400000,10563.33
+1999-06-11,10619.69,10744.11,10386.98,10490.51,698200000,10490.51
+1999-06-10,10621.58,10736.20,10452.52,10621.27,716500000,10621.27
+1999-06-09,10780.84,10871.39,10602.59,10690.29,662000000,10690.29
+1999-06-08,10878.35,10954.66,10671.93,10765.64,685900000,10765.64
+1999-06-07,10805.20,11016.40,10718.47,10909.38,664300000,10909.38
+1999-06-04,10702.64,10892.60,10558.26,10799.84,694500000,10799.84
+1999-06-03,10629.18,10767.86,10515.52,10663.69,719600000,10663.69
+1999-06-02,10591.82,10694.09,10388.24,10577.89,728000000,10577.89
+1999-06-01,10549.08,10717.20,10334.42,10596.26,683800000,10596.26
+1999-05-28,10489.56,10690.07,10389.94,10559.74,649960000,10559.74
+1999-05-27,10643.04,10734.21,10372.96,10466.93,811400000,10466.93
+1999-05-26,10580.94,10818.08,10416.06,10702.16,870800000,10702.16
+1999-05-25,10651.73,10818.96,10494.52,10531.09,826700000,10531.09
+1999-05-24,10829.87,10924.26,10568.85,10654.67,754700000,10654.67
+1999-05-21,10879.13,10974.69,10728.12,10829.28,686600000,10829.28
+1999-05-20,10892.40,11020.70,10773.83,10866.74,752200000,10866.74
+1999-05-19,10836.67,10988.85,10722.81,10887.39,801100000,10887.39
+1999-05-18,10895.94,11017.75,10678.86,10836.95,753400000,10836.95
+1999-05-17,10864.35,10976.32,10677.64,10853.47,665500000,10853.47
+1999-05-14,10950.26,11076.55,10787.03,10913.32,727800000,10913.32
+1999-05-13,11087.71,11244.36,10931.36,11107.19,796900000,11107.19
+1999-05-12,11002.38,11146.71,10759.54,11000.37,825500000,11000.37
+1999-05-11,11059.65,11185.08,10882.11,11026.15,836100000,11026.15
+1999-05-10,11029.25,11173.05,10876.38,11007.25,773300000,11007.25
+1999-05-07,10967.16,11135.54,10838.29,11031.59,814900000,11031.59
+1999-05-06,10909.02,11093.44,10730.33,10946.82,875400000,10946.82
+1999-05-05,10902.72,11055.36,10711.15,10955.41,913500000,10955.41
+1999-05-04,11012.11,11140.12,10787.32,10886.11,933100000,10886.11
+1999-05-03,10788.75,11083.13,10701.12,11014.69,811400000,11014.69
+1999-04-30,10933.94,11072.25,10603.76,10789.04,936500000,10789.04
+1999-04-29,10864.64,11052.49,10710.00,10878.38,1003600000,10878.38
+1999-04-28,10806.22,11050.77,10665.90,10845.45,951700000,10845.45
+1999-04-27,10781.88,10977.46,10647.29,10831.71,891700000,10831.71
+1999-04-26,10721.17,10854.33,10540.47,10718.59,712000000,10718.59
+1999-04-23,10646.71,10858.34,10530.45,10689.67,744900000,10689.67
+1999-04-22,10735.77,10896.42,10517.85,10727.18,927900000,10727.18
+1999-04-21,10462.58,10702.56,10309.09,10581.42,920000000,10581.42
+1999-04-20,10440.53,10610.06,10212.87,10448.55,985400000,10448.55
+1999-04-19,10566.07,10879.76,10284.39,10440.53,1214400000,10440.53
+1999-04-16,10497.26,10632.90,10299.55,10493.89,1002300000,10493.89
+1999-04-15,10411.66,10673.90,10201.31,10462.72,1089800000,10462.72
+1999-04-14,10436.91,10692.49,10196.87,10411.66,952000000,10411.66
+1999-04-13,10340.62,10512.11,10239.33,10395.01,810900000,10395.01
+1999-04-12,10094.19,10384.46,10042.02,10339.51,810800000,10339.51
+1999-04-09,10166.62,10298.71,10035.09,10173.84,716100000,10173.84
+1999-04-08,10083.93,10282.62,9980.69,10197.70,850500000,10197.70
+1999-04-07,10023.43,10166.62,9859.98,10085.31,816400000,10085.31
+1999-04-06,9985.69,10097.25,9862.48,9963.49,787500000,9963.49
+1999-04-05,9893.84,10080.87,9826.40,10007.33,695800000,10007.33
+1999-04-01,9825.29,9927.69,9707.91,9832.51,703000000,9832.51
+1999-03-31,9968.21,10025.10,9744.82,9786.16,924300000,9786.16
+1999-03-30,10003.84,10035.36,9812.53,9913.26,729000000,9913.26
+1999-03-29,9879.41,10089.48,9837.78,10006.78,747900000,10006.78
+1999-03-26,9795.88,9923.53,9700.69,9822.24,707200000,9822.24
+1999-03-25,9735.66,9916.59,9666.28,9836.39,784200000,9836.39
+1999-03-24,9702.08,9803.09,9547.23,9666.84,761900000,9666.84
+1999-03-23,9846.66,9897.72,9593.85,9671.83,811300000,9671.83
+1999-03-22,9901.88,10005.95,9796.99,9890.51,658200000,9890.51
+1999-03-19,10107.79,10158.57,9856.37,9903.55,914700000,9903.55
+1999-03-18,9958.59,10060.62,9776.17,9997.62,831000000,9997.62
+1999-03-17,9939.90,10024.54,9792.55,9879.41,752300000,9879.41
+1999-03-16,9969.32,10062.84,9857.48,9930.47,751900000,9930.47
+1999-03-15,9880.24,10027.59,9807.53,9958.77,727200000,9958.77
+1999-03-12,9927.14,10042.58,9779.78,9876.35,825800000,9876.35
+1999-03-11,9815.86,9992.35,9742.32,9897.44,904800000,9897.44
+1999-03-10,9735.10,9849.71,9624.94,9772.84,841900000,9772.84
+1999-03-09,9703.47,9856.65,9586.08,9693.76,803700000,9693.76
+1999-03-08,9728.72,9825.02,9616.33,9727.61,714600000,9727.61
+1999-03-05,9636.65,9799.92,9558.41,9736.08,834900000,9736.08
+1999-03-04,9339.18,9549.99,9272.08,9467.40,770900000,9467.40
+1999-03-03,9311.74,9397.86,9163.41,9275.88,751700000,9275.88
+1999-03-02,9382.10,9494.57,9216.66,9297.61,753600000,9297.61
+1999-03-01,9315.27,9419.32,9167.76,9324.78,699500000,9324.78
+1999-02-26,9382.64,9459.52,9177.54,9306.58,784600000,9306.58
+1999-02-25,9395.66,9446.32,9200.27,9366.34,740500000,9366.34
+1999-02-24,9547.88,9662.77,9357.81,9399.67,782000000,9399.67
+1999-02-23,9549.21,9659.58,9425.26,9544.42,781100000,9544.42
+1999-02-22,9346.62,9596.13,9289.04,9552.68,718500000,9552.68
+1999-02-19,9284.51,9430.59,9218.13,9339.95,700000000,9339.95
+1999-02-18,9239.72,9368.48,9145.09,9298.63,742400000,9298.63
+1999-02-17,9240.79,9409.53,9124.03,9195.47,735100000,9195.47
+1999-02-16,9333.34,9458.46,9187.10,9297.03,653760000,9297.03
+1999-02-12,9346.47,9437.35,9161.35,9274.89,691500000,9274.89
+1999-02-11,9176.28,9423.19,9088.49,9363.46,815800000,9363.46
+1999-02-10,9135.86,9267.68,9025.41,9177.31,721400000,9177.31
+1999-02-09,9268.46,9361.92,9076.13,9133.03,736000000,9133.03
+1999-02-08,9318.66,9427.83,9148.99,9291.11,705400000,9291.11
+1999-02-05,9317.12,9457.43,9141.27,9304.24,872000000,9304.24
+1999-02-04,9389.72,9511.50,9178.60,9304.50,854400000,9304.50
+1999-02-03,9275.41,9454.09,9176.80,9366.81,876500000,9366.81
+1999-02-02,9318.40,9394.10,9146.16,9274.12,845500000,9274.12
+1999-02-01,9405.43,9513.05,9266.91,9345.70,799400000,9345.70
+1999-01-29,9317.37,9457.18,9172.16,9358.83,917000000,9358.83
+1999-01-28,9220.57,9384.83,9134.57,9281.33,848800000,9281.33
+1999-01-27,9378.65,9461.04,9135.86,9200.23,893800000,9200.23
+1999-01-26,9210.78,9408.77,9118.35,9324.58,896400000,9324.58
+1999-01-25,9117.58,9273.09,8994.26,9203.32,723900000,9203.32
+1999-01-22,9149.51,9289.31,8998.89,9120.67,785900000,9120.67
+1999-01-21,9371.96,9479.83,9150.28,9264.08,871800000,9264.08
+1999-01-20,9395.64,9555.01,9230.35,9335.91,905700000,9335.91
+1999-01-19,9408.52,9499.14,9165.73,9355.22,785500000,9355.22
+1999-01-15,9200.74,9381.74,9124.02,9340.55,798100000,9340.55
+1999-01-14,9315.06,9380.20,9052.44,9120.93,797200000,9120.93
+1999-01-13,9213.62,9485.24,9134.06,9349.56,931500000,9349.56
+1999-01-12,9599.55,9680.40,9394.87,9474.68,800200000,9474.68
+1999-01-11,9613.97,9751.46,9446.36,9619.89,818000000,9619.89
+1999-01-08,9612.17,9759.44,9447.91,9643.32,937800000,9643.32
+1999-01-07,9445.33,9616.29,9369.12,9537.76,863000000,9537.76
+1999-01-06,9399.25,9608.05,9331.02,9544.97,986900000,9544.97
+1999-01-05,9201.00,9389.46,9137.66,9311.19,775000000,9311.19
+1999-01-04,9212.84,9393.84,9089.00,9184.27,877000000,9184.27
+1998-12-31,9271.55,9343.64,9106.77,9181.43,719200000,9181.43
+1998-12-30,9310.17,9390.75,9211.30,9274.64,594220000,9274.64
+1998-12-29,9222.63,9375.30,9152.34,9320.98,586490000,9320.98
+1998-12-28,9251.21,9330.50,9133.54,9226.75,531560000,9226.75
+1998-12-24,9202.29,9289.57,9146.42,9217.99,246980000,9217.99
+1998-12-23,9085.91,9255.84,9022.58,9202.03,697500000,9202.03
+1998-12-22,9000.95,9122.99,8909.29,9044.46,680500000,9044.46
+1998-12-21,8903.89,9150.54,8874.28,8988.85,744800000,8988.85
+1998-12-18,8902.86,9012.28,8789.31,8903.63,839600000,8903.63
+1998-12-17,8787.55,8959.76,8725.21,8875.82,739400000,8875.82
+1998-12-16,8843.38,8922.94,8675.52,8790.60,725500000,8790.60
+1998-12-15,8725.72,8878.40,8614.75,8823.30,777900000,8823.30
+1998-12-14,8767.95,8868.10,8610.63,8695.60,741800000,8695.60
+1998-12-11,8814.29,8916.24,8680.41,8821.76,688900000,8821.76
+1998-12-10,9008.42,9034.42,8795.24,8841.58,748600000,8841.58
+1998-12-09,9025.41,9138.18,8881.23,9009.19,694200000,9009.19
+1998-12-08,9038.03,9153.63,8903.37,9027.98,727700000,9027.98
+1998-12-07,9031.59,9146.93,8946.11,9070.47,671200000,9070.47
+1998-12-04,8964.91,9078.70,8873.76,9016.14,709700000,9016.14
+1998-12-03,9031.33,9112.69,8839.78,8879.68,799100000,8879.68
+1998-12-02,9039.57,9154.40,8922.94,9064.54,727400000,9064.54
+1998-12-01,9039.57,9214.65,8934.52,9133.54,789200000,9133.54
+1998-11-30,9292.40,9348.53,9074.07,9116.55,687900000,9116.55
+1998-11-27,9333.85,9403.62,9263.82,9333.08,256950000,9333.08
+1998-11-25,9292.91,9387.66,9199.20,9314.28,583580000,9314.28
+1998-11-24,9327.93,9457.95,9219.28,9301.15,766200000,9301.15
+1998-11-23,9225.72,9425.77,9137.92,9374.27,774100000,9374.27
+1998-11-20,9129.94,9215.93,9048.32,9159.55,721200000,9159.55
+1998-11-19,9081.02,9147.96,8967.22,9056.05,671000000,9056.05
+1998-11-18,8988.85,9095.70,8897.96,9041.11,652510000,9041.11
+1998-11-17,8991.17,9158.26,8870.42,8986.28,705200000,8986.28
+1998-11-16,8921.14,9093.12,8885.09,9011.25,615580000,9011.25
+1998-11-13,8863.21,8982.16,8782.62,8919.59,602270000,8919.59
+1998-11-12,8823.04,8951.26,8733.70,8829.74,662300000,8829.74
+1998-11-11,8922.42,8980.35,8759.19,8823.82,715700000,8823.82
+1998-11-10,8895.17,9020.00,8760.99,8863.98,671300000,8863.98
+1998-11-09,8980.87,9024.89,8813.00,8897.96,592990000,8897.96
+1998-11-06,8902.86,9042.40,8831.02,8975.46,683100000,8975.46
+1998-11-05,8782.11,8943.79,8676.55,8915.47,770200000,8915.47
+1998-11-04,8801.93,8933.49,8660.33,8783.14,861100000,8783.14
+1998-11-03,8708.99,8819.18,8601.88,8706.15,704300000,8706.15
+1998-11-02,8645.65,8804.51,8573.56,8706.15,753800000,8706.15
+1998-10-30,8591.58,8718.25,8481.39,8592.10,785000000,8592.10
+1998-10-29,8371.22,8539.83,8305.54,8495.03,699400000,8495.03
+1998-10-28,8372.74,8504.04,8271.55,8371.97,677500000,8371.97
+1998-10-27,8503.79,8586.69,8309.92,8366.04,764500000,8366.04
+1998-10-26,8483.96,8564.03,8349.57,8432.21,609910000,8432.21
+1998-10-23,8531.34,8589.01,8366.04,8452.29,637640000,8452.29
+1998-10-22,8519.03,8629.17,8334.12,8533.14,754900000,8533.14
+1998-10-21,8504.67,8641.02,8380.72,8519.23,745100000,8519.23
+1998-10-20,8540.09,8713.62,8419.08,8505.85,958200000,8505.85
+1998-10-19,8415.48,8591.07,8321.50,8466.45,738600000,8466.45
+1998-10-16,8384.84,8521.29,8244.26,8416.76,1042200000,8416.76
+1998-10-15,7953.07,8375.57,7885.62,8299.36,937600000,8299.36
+1998-10-14,7925.01,8107.29,7812.75,7968.78,791200000,7968.78
+1998-10-13,7982.68,8093.90,7805.29,7938.14,733300000,7938.14
+1998-10-12,8038.03,8162.65,7931.19,8001.47,691100000,8001.47
+1998-10-09,7806.57,7976.76,7628.15,7899.52,878100000,7899.52
+1998-10-08,7734.48,7822.02,7399.78,7731.91,1114600000,7731.91
+1998-10-07,7754.82,7913.94,7558.89,7741.69,977000000,7741.69
+1998-10-06,7733.97,7951.53,7646.43,7742.98,845700000,7742.98
+1998-10-05,7760.75,7866.82,7507.14,7726.24,817500000,7726.24
+1998-10-02,7631.50,7866.31,7496.84,7784.69,902900000,7784.69
+1998-10-01,7749.42,7856.26,7540.87,7632.53,899700000,7632.53
+1998-09-30,8025.42,8097.51,7775.42,7842.62,800100000,7842.62
+1998-09-29,8141.28,8253.79,7946.63,8080.52,760100000,8080.52
+1998-09-28,8114.76,8239.37,7986.80,8108.84,690500000,8108.84
+1998-09-25,7911.10,8127.89,7849.06,8028.77,736800000,8028.77
+1998-09-24,8117.33,8227.53,7906.73,8001.99,805900000,8001.99
+1998-09-23,7988.60,8198.43,7891.79,8154.41,899700000,8154.41
+1998-09-22,7987.83,8038.29,7816.87,7897.20,694900000,7897.20
+1998-09-21,7739.12,8008.43,7653.64,7933.25,609880000,7933.25
+1998-09-18,7942.77,8012.03,7759.97,7895.66,794700000,7895.66
+1998-09-17,7905.96,8001.99,7795.50,7873.77,694500000,7873.77
+1998-09-16,8061.46,8159.30,7923.46,8089.78,797500000,8089.78
+1998-09-15,7918.83,8087.21,7840.30,8024.39,724600000,8024.39
+1998-09-14,7936.08,8081.29,7848.03,7945.35,714400000,7945.35
+1998-09-11,7583.61,7866.31,7497.10,7795.50,819100000,7795.50
+1998-09-10,7680.42,7761.00,7469.04,7615.54,880300000,7615.54
+1998-09-09,7995.04,8094.16,7796.79,7865.02,704300000,7865.02
+1998-09-08,7964.91,8103.69,7779.03,8020.78,814800000,8020.78
+1998-09-04,7737.32,7831.29,7450.24,7640.25,780300000,7640.25
+1998-09-03,7679.13,7841.59,7499.68,7682.22,880500000,7682.22
+1998-09-02,7901.06,8036.23,7710.54,7782.37,894600000,7782.37
+1998-09-01,7583.09,7937.37,7379.70,7827.43,1216600000,7827.43
+1998-08-31,8078.97,8149.00,7517.70,7539.07,917500000,7539.07
+1998-08-28,8193.54,8301.68,7951.27,8051.68,840300000,8051.68
+1998-08-27,8377.89,8448.69,8062.24,8165.99,938600000,8165.99
+1998-08-26,8492.97,8639.47,8396.68,8523.35,674100000,8523.35
+1998-08-25,8632.00,8740.91,8510.22,8602.65,664900000,8602.65
+1998-08-24,8584.63,8680.66,8452.29,8566.61,558100000,8566.61
+1998-08-21,8600.34,8600.34,8307.60,8533.65,725700000,8533.65
+1998-08-20,8639.47,8726.75,8538.29,8611.41,621630000,8611.41
+1998-08-19,8745.80,8797.81,8635.61,8693.28,633630000,8693.28
+1998-08-18,8593.90,8767.69,8551.93,8714.65,690600000,8714.65
+1998-08-17,8404.66,8613.98,8350.34,8574.85,584380000,8574.85
+1998-08-14,8531.85,8635.87,8342.10,8425.00,644030000,8425.00
+1998-08-13,8535.46,8656.46,8399.51,8459.50,660700000,8459.50
+1998-08-12,8528.76,8621.71,8437.10,8552.96,711700000,8552.96
+1998-08-11,8431.44,8538.29,8263.32,8462.85,774400000,8462.85
+1998-08-10,8585.40,8689.16,8491.17,8574.85,579180000,8574.85
+1998-08-07,8610.63,8745.03,8490.40,8598.02,759100000,8598.02
+1998-08-06,8513.83,8671.14,8415.22,8577.68,768400000,8577.68
+1998-08-05,8493.75,8641.79,8316.10,8546.78,851600000,8546.78
+1998-08-04,8859.86,8896.68,8463.37,8487.31,852600000,8487.31
+1998-08-03,8868.10,8948.17,8729.58,8786.74,620400000,8786.74
+1998-07-31,9024.64,9109.34,8810.94,8883.29,645910000,8883.29
+1998-07-30,8962.85,9113.20,8884.83,9026.95,687400000,9026.95
+1998-07-29,8976.49,9039.57,8831.28,8914.96,644350000,8914.96
+1998-07-28,8982.16,9065.57,8786.48,8934.78,703600000,8934.78
+1998-07-27,8905.17,9084.63,8806.05,9028.24,619990000,9028.24
+1998-07-24,9002.24,9077.67,8814.29,8937.36,698600000,8937.36
+1998-07-23,9130.46,9196.11,8892.56,8932.98,741600000,8932.98
+1998-07-22,9185.71,9264.85,8996.83,9128.91,739800000,9128.91
+1998-07-21,9296.26,9369.12,9145.65,9190.19,659700000,9190.19
+1998-07-20,9340.55,9408.26,9206.15,9295.75,560580000,9295.75
+1998-07-17,9328.19,9412.64,9259.96,9337.97,618030000,9337.97
+1998-07-16,9233.23,9368.35,9173.19,9328.19,677800000,9328.19
+1998-07-15,9246.57,9388.69,9165.99,9234.47,723900000,9234.47
+1998-07-14,9100.07,9314.54,9087.20,9245.54,700300000,9245.54
+1998-07-13,9107.03,9186.58,9020.52,9096.21,574880000,9096.21
+1998-07-10,9098.53,9194.82,8976.23,9105.74,576080000,9105.74
+1998-07-09,9135.36,9217.07,9014.30,9089.78,663600000,9089.78
+1998-07-08,9107.96,9231.27,9041.70,9174.97,607230000,9174.97
+1998-07-07,9094.76,9209.85,9001.84,9085.04,624890000,9085.04
+1998-07-06,9017.53,9137.11,8965.97,9091.77,514750000,9091.77
+1998-07-02,9037.71,9094.01,8956.25,9025.26,510210000,9025.26
+1998-07-01,9011.56,9103.23,8918.64,9048.67,701600000,9048.67
+1998-06-30,9010.81,9085.79,8868.57,8952.02,757200000,8952.02
+1998-06-29,9002.34,9099.24,8930.84,8997.36,564350000,8997.36
+1998-06-26,8948.28,9047.93,8879.78,8944.54,520050000,8944.54
+1998-06-25,8950.52,9079.56,8863.58,8935.58,669900000,8935.58
+1998-06-24,8828.46,8970.20,8740.52,8923.87,714900000,8923.87
+1998-06-23,8789.35,8877.78,8724.83,8828.46,657100000,8828.46
+1998-06-22,8705.65,8805.04,8639.38,8711.13,531550000,8711.13
+1998-06-19,8844.90,8885.01,8664.79,8712.87,715500000,8712.87
+1998-06-18,8825.72,8900.20,8740.77,8813.01,590440000,8813.01
+1998-06-17,8745.51,8932.34,8695.43,8829.46,744400000,8829.46
+1998-06-16,8666.04,8751.24,8524.55,8665.29,664600000,8665.29
+1998-06-15,8723.34,8818.99,8588.32,8627.93,595820000,8627.93
+1998-06-12,8812.77,8891.24,8660.56,8834.94,633300000,8834.94
+1998-06-11,8975.43,9015.54,8774.40,8811.77,627470000,8811.77
+1998-06-10,9031.98,9145.08,8891.98,8971.70,609410000,8971.70
+1998-06-09,9074.58,9130.13,8966.72,9049.92,563610000,9049.92
+1998-06-08,9052.66,9155.04,8994.12,9069.60,543390000,9069.60
+1998-06-05,8920.88,9057.39,8866.57,9037.71,558440000,9037.71
+1998-06-04,8798.07,8916.64,8719.85,8870.56,577470000,8870.56
+1998-06-03,8909.42,8970.20,8769.67,8803.80,584480000,8803.80
+1998-06-02,8961.48,9014.05,8838.92,8891.24,590930000,8891.24
+1998-06-01,8907.93,9023.01,8805.04,8922.37,537660000,8922.37
+1998-05-29,9004.83,9060.13,8859.60,8899.95,556780000,8899.95
+1998-05-28,8947.53,9040.70,8861.59,8970.20,588900000,8970.20
+1998-05-27,8902.45,9015.04,8760.95,8936.57,682040000,8936.57
+1998-05-26,9167.00,9201.63,8949.78,8963.73,541410000,8963.73
+1998-05-22,9153.05,9209.35,9040.70,9114.44,444070000,9114.44
+1998-05-21,9173.48,9248.96,9058.64,9132.37,551970000,9132.37
+1998-05-20,9101.98,9219.06,9010.56,9171.48,587240000,9171.48
+1998-05-19,9097.00,9164.51,8997.36,9054.65,566020000,9054.65
+1998-05-18,9088.53,9171.23,8972.20,9050.91,519100000,9050.91
+1998-05-15,9161.52,9240.74,9051.91,9096.00,621990000,9096.00
+1998-05-14,9136.86,9266.89,9077.07,9172.23,578380000,9172.23
+1998-05-13,9178.06,9283.09,9119.67,9211.84,600010000,9211.84
+1998-05-12,9098.00,9214.08,9023.51,9161.77,604420000,9161.77
+1998-05-11,9125.65,9231.52,9045.43,9091.52,560840000,9091.52
+1998-05-08,8981.91,9143.09,8951.27,9055.15,567890000,9055.15
+1998-05-07,9044.44,9102.98,8914.90,8976.68,582240000,8976.68
+1998-05-06,9174.72,9223.80,9017.28,9054.65,606540000,9054.65
+1998-05-05,9189.92,9251.95,9062.37,9147.57,583630000,9147.57
+1998-05-04,9201.38,9311.98,9134.86,9192.66,551700000,9192.66
+1998-05-01,9106.47,9211.84,9015.54,9147.07,581970000,9147.07
+1998-04-30,9018.28,9169.99,8970.95,9063.37,695600000,9063.37
+1998-04-29,8899.21,9036.47,8857.85,8951.52,638790000,8951.52
+1998-04-28,8920.88,9051.16,8828.71,8898.96,678600000,8898.96
+1998-04-27,8937.07,9026.25,8796.08,8917.64,685960000,8917.64
+1998-04-24,9143.83,9206.36,8983.65,9064.62,633890000,9064.62
+1998-04-23,9176.96,9269.88,9061.88,9143.33,653190000,9143.33
+1998-04-22,9184.93,9287.32,9083.80,9176.72,696740000,9176.72
+1998-04-21,9137.85,9250.20,9051.41,9184.94,675640000,9184.94
+1998-04-20,9166.75,9245.22,9027.25,9141.84,595190000,9141.84
+1998-04-17,9077.57,9213.58,9010.06,9167.50,672290000,9167.50
+1998-04-16,9162.27,9204.12,8978.92,9076.57,699570000,9076.57
+1998-04-15,9110.45,9249.95,9017.53,9162.27,685020000,9162.27
+1998-04-14,9014.30,9177.96,8971.45,9110.20,613730000,9110.20
+1998-04-13,8997.11,9107.21,8870.31,9012.30,564480000,9012.30
+1998-04-09,8891.48,9062.12,8891.48,8994.86,548940000,8994.86
+1998-04-08,8951.52,9023.51,8821.73,8891.48,616330000,8891.48
+1998-04-07,8995.36,9072.34,8862.34,8956.50,670760000,8956.50
+1998-04-06,9051.16,9170.74,8958.49,9033.23,625810000,9033.23
+1998-04-03,8986.64,9085.79,8896.22,8983.41,653880000,8983.41
+1998-04-02,8900.20,9025.26,8829.21,8986.64,674340000,8986.64
+1998-04-01,8818.50,8935.33,8715.61,8868.32,677310000,8868.32
+1998-03-31,8852.12,8937.57,8726.32,8799.81,674930000,8799.81
+1998-03-30,8802.30,8877.04,8701.66,8782.12,497400000,8782.12
+1998-03-27,8835.68,8941.31,8741.77,8796.08,582190000,8796.08
+1998-03-26,8847.89,8931.09,8769.92,8846.89,606770000,8846.89
+1998-03-25,8943.05,8997.11,8780.88,8872.80,676550000,8872.80
+1998-03-24,8887.00,8962.48,8815.01,8904.44,605720000,8904.44
+1998-03-23,8839.42,8939.31,8758.71,8816.25,631350000,8816.25
+1998-03-20,8814.01,8957.25,8766.43,8906.43,717310000,8906.43
+1998-03-19,8776.89,8855.11,8708.64,8803.05,598240000,8803.05
+1998-03-18,8749.24,8825.72,8655.83,8775.40,632690000,8775.40
+1998-03-17,8706.64,8812.52,8633.41,8749.99,680960000,8749.99
+1998-03-16,8647.36,8760.45,8573.37,8718.85,548980000,8718.85
+1998-03-13,8669.28,8733.30,8563.90,8602.52,597800000,8602.52
+1998-03-12,8622.20,8725.58,8576.86,8659.56,594940000,8659.56
+1998-03-11,8682.73,8740.52,8599.28,8675.75,655260000,8675.75
+1998-03-10,8623.19,8688.71,8550.45,8643.12,631920000,8643.12
+1998-03-09,8601.02,8661.56,8482.45,8567.14,624700000,8567.14
+1998-03-06,8505.86,8610.49,8432.62,8569.39,665500000,8569.39
+1998-03-05,8480.20,8536.80,8377.32,8444.33,648270000,8444.33
+1998-03-04,8524.55,8609.99,8454.79,8539.24,644280000,8539.24
+1998-03-03,8532.77,8632.16,8464.26,8584.83,612360000,8584.83
+1998-03-02,8528.78,8649.35,8427.89,8550.45,591470000,8550.45
+1998-02-27,8532.77,8616.72,8426.15,8545.72,574480000,8545.72
+1998-02-26,8471.48,8541.98,8377.82,8490.67,646280000,8490.67
+1998-02-25,8455.29,8510.60,8362.37,8457.78,611350000,8457.78
+1998-02-24,8370.10,8457.78,8303.83,8370.10,589880000,8370.10
+1998-02-23,8381.31,8490.92,8331.98,8410.20,550730000,8410.20
+1998-02-20,8350.67,8449.06,8291.88,8413.94,594300000,8413.94
+1998-02-19,8379.56,8463.26,8327.25,8375.58,581820000,8375.58
+1998-02-18,8419.17,8503.12,8326.75,8451.06,606000000,8451.06
+1998-02-17,8439.35,8483.94,8335.97,8398.50,605890000,8398.50
+1998-02-13,8346.68,8416.43,8269.21,8370.10,531940000,8370.10
+1998-02-12,8260.49,8412.20,8206.93,8369.60,611480000,8369.60
+1998-02-11,8298.60,8367.61,8223.87,8314.55,599300000,8314.55
+1998-02-10,8241.81,8368.10,8149.88,8295.61,642800000,8295.61
+1998-02-09,8185.26,8256.75,8104.55,8180.52,524810000,8180.52
+1998-02-06,8178.28,8255.26,8102.30,8189.49,569650000,8189.49
+1998-02-05,8129.71,8215.65,8037.54,8117.25,703980000,8117.25
+1998-02-04,8160.35,8188.00,8050.99,8129.71,695420000,8129.71
+1998-02-03,8107.78,8193.23,8010.63,8160.35,692120000,8160.35
+1998-02-02,7987.46,8157.86,7987.46,8107.78,724320000,8107.78
+1998-01-30,7973.02,8023.83,7850.95,7906.50,613380000,7906.50
+1998-01-29,7915.47,8015.12,7883.09,7973.02,750760000,7973.02
+1998-01-28,7815.08,7985.97,7761.52,7915.47,708470000,7915.47
+1998-01-27,7712.94,7890.56,7677.07,7815.08,679140000,7815.08
+1998-01-26,7700.74,7813.59,7629.99,7712.94,555080000,7712.94
+1998-01-23,7730.88,7814.08,7609.31,7700.74,635770000,7700.74
+1998-01-22,7794.40,7833.26,7637.71,7730.88,646570000,7730.88
+1998-01-21,7873.12,7874.87,7707.96,7794.40,626160000,7794.40
+1998-01-20,7753.55,7908.00,7696.01,7873.12,644790000,7873.12
+1998-01-16,7691.77,7846.47,7687.04,7753.55,670080000,7753.55
+1998-01-15,7784.69,7803.87,7651.66,7691.77,569050000,7691.77
+1998-01-14,7732.13,7836.25,7669.10,7784.69,603280000,7784.69
+1998-01-13,7647.18,7791.17,7610.31,7732.13,646740000,7732.13
+1998-01-12,7580.42,7706.22,7391.59,7647.18,705450000,7647.18
+1998-01-09,7802.62,7815.08,7513.41,7580.42,746420000,7580.42
+1998-01-08,7902.27,7935.40,7733.12,7802.62,652140000,7802.62
+1998-01-07,7906.25,7943.87,7751.56,7902.27,667390000,7902.27
+1998-01-06,7978.99,7999.17,7832.52,7906.25,618360000,7906.25
+1998-01-05,7965.04,8072.91,7865.40,7978.99,628070000,7978.99
+1998-01-02,7908.25,8001.41,7845.47,7965.04,366730000,7965.04
+1997-12-31,7915.97,7995.93,7833.76,7908.25,467280000,7908.25
+1997-12-30,7792.41,7958.32,7787.68,7915.97,499500000,7915.97
+1997-12-29,7712.94,7835.01,7712.94,7792.41,443160000,7792.41
+1997-12-26,7660.13,7743.34,7634.72,7679.31,154900000,7679.31
+1997-12-24,7691.77,7767.75,7624.26,7660.13,265980000,7660.13
+1997-12-23,7819.31,7874.12,7667.11,7691.77,515070000,7691.77
+1997-12-22,7756.29,7892.05,7710.45,7819.31,530670000,7819.31
+1997-12-19,7846.50,7878.60,7563.23,7756.29,793200000,7756.29
+1997-12-18,7957.41,7991.48,7781.35,7846.50,618870000,7846.50
+1997-12-17,7976.31,8068.81,7879.08,7957.41,618900000,7957.41
+1997-12-16,7922.59,8069.06,7889.52,7976.31,623320000,7976.31
+1997-12-15,7838.30,7992.72,7807.96,7922.59,597150000,7922.59
+1997-12-12,7848.99,7947.21,7756.73,7838.30,579280000,7838.30
+1997-12-11,7961.64,7961.64,7778.37,7848.99,631770000,7848.99
+1997-12-10,8049.66,8077.27,7881.07,7978.79,602290000,7978.79
+1997-12-09,8110.84,8142.67,7990.98,8049.66,539130000,8049.66
+1997-12-08,8149.13,8195.88,8057.37,8110.84,490320000,8110.84
+1997-12-05,8050.16,8209.56,7980.04,8149.13,563590000,8149.13
+1997-12-04,8032.01,8159.58,7978.30,8050.16,633470000,8050.16
+1997-12-03,8018.83,8118.30,7915.63,8032.01,624610000,8032.01
+1997-12-02,8013.11,8096.66,7935.03,8018.83,576120000,8018.83
+1997-12-01,7823.62,8048.92,7823.62,8013.11,590300000,8013.11
+1997-11-28,7794.78,7872.86,7786.08,7823.13,189070000,7823.13
+1997-11-26,7808.95,7893.50,7749.77,7794.78,487750000,7794.78
+1997-11-25,7767.92,7880.32,7706.00,7808.95,587890000,7808.95
+1997-11-24,7881.07,7887.28,7723.41,7767.92,514920000,7767.92
+1997-11-21,7826.61,7934.53,7758.47,7881.07,611000000,7881.07
+1997-11-20,7724.74,7889.77,7718.19,7826.61,602610000,7826.61
+1997-11-19,7650.82,7779.75,7599.50,7724.74,542720000,7724.74
+1997-11-18,7698.22,7772.62,7607.11,7650.82,521380000,7650.82
+1997-11-17,7613.49,7781.71,7613.49,7698.22,576540000,7698.22
+1997-11-14,7487.76,7634.61,7431.03,7572.48,635760000,7572.48
+1997-11-13,7401.32,7546.45,7334.77,7487.76,653960000,7487.76
+1997-11-12,7558.73,7573.22,7359.32,7401.32,585340000,7401.32
+1997-11-11,7552.59,7599.74,7518.21,7558.73,435660000,7558.73
+1997-11-10,7581.32,7687.90,7511.83,7552.59,464140000,7552.59
+1997-11-07,7646.89,7646.89,7460.99,7581.32,569980000,7581.32
+1997-11-06,7692.57,7758.63,7597.78,7683.24,522890000,7683.24
+1997-11-05,7689.13,7791.78,7628.96,7692.57,565680000,7692.57
+1997-11-04,7674.39,7757.15,7583.29,7689.13,541590000,7689.13
+1997-11-03,7443.07,7674.39,7443.07,7674.39,564740000,7674.39
+1997-10-31,7381.67,7544.24,7329.61,7442.08,638070000,7442.08
+1997-10-30,7506.67,7569.78,7340.42,7381.67,712230000,7381.67
+1997-10-29,7498.32,7664.08,7409.67,7506.67,777660000,7506.67
+1997-10-28,7161.15,7553.57,6936.45,7498.32,1202550000,7498.32
+1997-10-27,7715.41,7717.37,7150.10,7161.15,693730000,7161.15
+1997-10-24,7847.77,7975.47,7645.91,7715.41,677630000,7715.41
+1997-10-23,7957.05,7957.05,7767.22,7847.77,673270000,7847.77
+1997-10-22,8060.44,8124.78,7941.33,8034.65,613490000,8034.65
+1997-10-21,7921.44,8090.40,7909.41,8060.44,582310000,8060.44
+1997-10-20,7847.03,7966.63,7774.83,7921.44,483880000,7921.44
+1997-10-17,7938.88,7953.61,7731.12,7847.03,624980000,7847.03
+1997-10-16,8057.98,8146.14,7880.18,7938.88,597010000,7938.88
+1997-10-15,8096.29,8127.48,7997.57,8057.98,505310000,8057.98
+1997-10-14,8072.22,8168.24,7990.20,8096.29,510330000,8096.29
+1997-10-13,8045.21,8150.31,8026.30,8072.22,354800000,8072.22
+1997-10-10,8061.42,8091.38,7961.96,8045.21,500680000,8045.21
+1997-10-09,8095.06,8127.72,7980.87,8061.42,551840000,8061.42
+1997-10-08,8178.31,8208.52,8019.92,8095.06,573110000,8095.06
+1997-10-07,8100.22,8218.34,8058.96,8178.31,551970000,8178.31
+1997-10-06,8038.58,8160.63,8017.71,8100.22,495620000,8100.22
+1997-10-03,8027.53,8183.22,7937.89,8038.58,623370000,8038.58
+1997-10-02,8015.50,8087.45,7943.79,8027.53,474760000,8027.53
+1997-10-01,7945.26,8081.06,7909.41,8015.50,598660000,8015.50
+1997-09-30,7991.43,8045.70,7900.08,7945.26,587500000,7945.26
+1997-09-29,7922.18,8030.48,7862.99,7991.43,477100000,7991.43
+1997-09-26,7853.66,7970.80,7853.66,7922.18,505340000,7922.18
+1997-09-25,7906.71,7962.45,7802.34,7848.01,524880000,7848.01
+1997-09-24,7970.06,8065.84,7866.43,7906.71,639460000,7906.71
+1997-09-23,7996.83,8048.16,7885.34,7970.06,522930000,7970.06
+1997-09-22,7917.27,8078.36,7889.27,7996.83,490900000,7996.83
+1997-09-19,7922.72,7972.29,7821.69,7917.27,631040000,7917.27
+1997-09-18,7886.44,8049.36,7858.93,7922.72,566830000,7922.72
+1997-09-17,7895.92,7981.54,7816.47,7886.44,590550000,7886.44
+1997-09-16,7721.14,7951.18,7709.75,7895.92,636380000,7895.92
+1997-09-15,7742.97,7832.86,7680.95,7721.14,468030000,7721.14
+1997-09-12,7660.98,7779.67,7584.56,7742.97,544150000,7742.97
+1997-09-11,7719.28,7745.29,7556.23,7660.98,575020000,7660.98
+1997-09-10,7851.91,7868.16,7686.30,7719.28,517620000,7719.28
+1997-09-09,7835.18,7922.05,7768.52,7851.91,502200000,7851.91
+1997-09-08,7822.41,7921.35,7795.00,7835.18,466430000,7835.18
+1997-09-05,7867.24,7952.01,7765.27,7822.41,536400000,7822.41
+1997-09-04,7894.64,7936.45,7788.50,7867.24,559310000,7867.24
+1997-09-03,7879.78,7972.22,7828.45,7894.64,549060000,7894.64
+1997-09-02,7650.99,7903.47,7650.99,7879.78,491870000,7879.78
+1997-08-29,7694.43,7729.73,7580.85,7622.42,413910000,7622.42
+1997-08-28,7787.33,7831.70,7634.50,7694.43,486300000,7694.43
+1997-08-27,7782.22,7850.51,7666.55,7787.33,492150000,7787.33
+1997-08-26,7859.57,7891.62,7734.61,7782.22,449110000,7782.22
+1997-08-25,7887.91,7974.08,7791.75,7859.57,388990000,7859.57
+1997-08-22,7893.95,7904.86,7695.36,7887.91,460160000,7887.91
+1997-08-21,8021.23,8043.06,7834.02,7893.95,499000000,7893.95
+1997-08-20,7918.10,8037.95,7870.95,8021.23,521270000,8021.23
+1997-08-19,7803.36,7947.37,7776.65,7918.10,545630000,7918.10
+1997-08-18,7694.66,7847.49,7588.28,7803.36,514330000,7803.36
+1997-08-15,7919.26,7919.26,7685.14,7694.66,537820000,7694.66
+1997-08-14,7928.32,8027.73,7843.54,7942.03,530460000,7942.03
+1997-08-13,7960.84,8075.58,7848.19,7928.32,587210000,7928.32
+1997-08-12,8062.11,8132.49,7926.46,7960.84,499310000,7960.84
+1997-08-11,8031.22,8122.27,7922.52,8062.11,480340000,8062.11
+1997-08-08,8170.58,8170.58,7961.07,8031.22,563420000,8031.22
+1997-08-07,8259.31,8340.14,8158.73,8188.00,576030000,8188.00
+1997-08-06,8187.54,8302.05,8130.63,8259.31,565200000,8259.31
+1997-08-05,8198.45,8251.88,8129.93,8187.54,525710000,8187.54
+1997-08-04,8194.04,8261.40,8097.65,8198.45,456000000,8198.45
+1997-08-01,8222.61,8287.65,8062.11,8194.04,513750000,8194.04
+1997-07-31,8254.89,8328.99,8160.36,8222.61,547830000,8222.61
+1997-07-30,8174.53,8313.19,8156.88,8254.89,568470000,8254.89
+1997-07-29,8121.11,8232.36,8049.34,8174.53,544540000,8174.53
+1997-07-28,8113.44,8221.68,8051.89,8121.11,466920000,8121.11
+1997-07-25,8116.93,8200.31,8037.95,8113.44,521510000,8113.44
+1997-07-24,8088.36,8174.53,7968.51,8116.93,571020000,8116.93
+1997-07-23,8061.65,8199.15,8024.95,8088.36,616930000,8088.36
+1997-07-22,7906.72,8093.93,7870.72,8061.65,579590000,8061.65
+1997-07-21,7890.46,7981.51,7783.85,7906.72,459500000,7906.72
+1997-07-18,8020.77,8057.23,7829.61,7890.46,589710000,7890.46
+1997-07-17,8038.88,8136.67,7910.67,8020.77,629250000,8020.77
+1997-07-16,7975.71,8108.10,7919.73,8038.88,647390000,8038.88
+1997-07-15,7922.98,8037.03,7843.78,7975.71,598370000,7975.71
+1997-07-14,7921.82,8001.26,7831.00,7922.98,485960000,7922.98
+1997-07-11,7886.76,7984.02,7837.68,7921.82,500050000,7921.82
+1997-07-10,7842.43,7953.94,7777.06,7886.76,551340000,7886.76
+1997-07-09,7962.31,8027.68,7775.48,7842.43,589110000,7842.43
+1997-07-08,7858.49,8000.08,7824.33,7962.31,526010000,7962.31
+1997-07-07,7895.81,7983.79,7805.34,7858.49,518780000,7858.49
+1997-07-03,7805.79,7952.35,7805.79,7895.81,374680000,7895.81
+1997-07-02,7722.33,7814.38,7648.14,7795.38,526970000,7795.38
+1997-07-01,7672.79,7801.04,7613.53,7722.33,544190000,7722.33
+1997-06-30,7687.72,7768.01,7571.46,7672.79,561540000,7672.79
+1997-06-27,7654.25,7793.12,7627.33,7687.72,472540000,7687.72
+1997-06-26,7689.98,7754.22,7581.64,7654.25,499780000,7654.25
+1997-06-25,7758.06,7832.48,7615.57,7689.98,603040000,7689.98
+1997-06-24,7787.01,7787.01,7602.90,7758.06,542650000,7758.06
+1997-06-23,7796.51,7816.87,7592.04,7604.26,492940000,7604.26
+1997-06-20,7777.06,7868.44,7733.64,7796.51,653110000,7796.51
+1997-06-19,7718.71,7834.51,7697.45,7777.06,536940000,7777.06
+1997-06-18,7760.78,7789.28,7651.30,7718.71,491740000,7718.71
+1997-06-17,7772.09,7834.97,7680.71,7760.78,543010000,7760.78
+1997-06-16,7782.04,7829.99,7712.37,7772.09,414280000,7772.09
+1997-06-13,7711.47,7829.08,7683.42,7782.04,575810000,7782.04
+1997-06-12,7575.83,7741.42,7569.66,7711.47,592730000,7711.47
+1997-06-11,7539.27,7633.96,7476.29,7575.83,513740000,7575.83
+1997-06-10,7478.50,7599.61,7459.12,7539.27,526980000,7539.27
+1997-06-09,7435.78,7548.52,7412.44,7478.50,465810000,7478.50
+1997-06-06,7305.29,7473.98,7290.26,7435.78,488940000,7435.78
+1997-06-05,7269.66,7376.97,7241.33,7305.29,452610000,7305.29
+1997-06-04,7312.15,7350.36,7214.29,7269.66,466690000,7269.66
+1997-06-03,7289.40,7379.98,7225.02,7312.15,527120000,7312.15
+1997-06-02,7331.04,7383.84,7244.76,7289.40,435950000,7289.40
+1997-05-30,7330.18,7385.99,7203.99,7331.04,537200000,7331.04
+1997-05-29,7357.23,7404.44,7272.24,7330.18,462600000,7330.18
+1997-05-28,7383.41,7430.20,7287.26,7357.23,487340000,7357.23
+1997-05-27,7345.91,7421.32,7276.68,7383.41,436150000,7383.41
+1997-05-23,7260.61,7382.58,7260.61,7345.91,417030000,7345.91
+1997-05-22,7290.69,7348.79,7210.33,7258.13,426940000,7258.13
+1997-05-21,7303.46,7385.47,7218.99,7290.69,540730000,7290.69
+1997-05-20,7228.88,7336.02,7123.38,7303.46,450850000,7303.46
+1997-05-19,7194.67,7274.21,7140.69,7228.88,345140000,7228.88
+1997-05-16,7332.31,7332.31,7192.61,7194.67,486780000,7194.67
+1997-05-15,7286.16,7363.63,7225.99,7333.55,458180000,7333.55
+1997-05-14,7274.21,7381.76,7238.35,7286.16,504960000,7286.16
+1997-05-13,7292.75,7350.85,7211.16,7274.21,489760000,7274.21
+1997-05-12,7169.53,7317.47,7156.35,7292.75,459370000,7292.75
+1997-05-09,7136.62,7235.76,7079.63,7169.53,455690000,7169.53
+1997-05-08,7085.65,7236.96,7040.30,7136.62,534120000,7136.62
+1997-05-07,7225.32,7246.60,7064.78,7085.65,500580000,7085.65
+1997-05-06,7213.68,7299.98,7139.43,7225.32,603680000,7225.32
+1997-05-05,7071.20,7220.91,7029.46,7213.68,549410000,7213.68
+1997-05-02,6976.48,7104.51,6935.54,7071.20,499770000,7071.20
+1997-05-01,7008.99,7041.90,6891.39,6976.48,460380000,6976.48
+1997-04-30,6962.03,7081.23,6912.26,7008.99,562830000,7008.99
+1997-04-29,6820.75,6998.15,6820.75,6962.03,547690000,6962.03
+1997-04-28,6738.87,6826.37,6691.51,6783.02,404470000,6783.02
+1997-04-25,6792.25,6826.77,6681.08,6738.87,414350000,6738.87
+1997-04-24,6812.72,6923.90,6742.89,6792.25,493640000,6792.25
+1997-04-23,6833.59,6902.23,6746.50,6812.72,489350000,6812.72
+1997-04-22,6660.21,6858.08,6628.50,6833.59,507500000,6833.59
+1997-04-21,6703.55,6768.17,6594.38,6660.21,397300000,6660.21
+1997-04-18,6658.60,6749.71,6616.46,6703.55,468940000,6703.55
+1997-04-17,6679.87,6750.91,6600.80,6658.60,503760000,6658.60
+1997-04-16,6587.16,6708.77,6506.08,6679.87,498820000,6679.87
+1997-04-15,6457.92,6626.09,6457.92,6587.16,507370000,6587.16
+1997-04-14,6391.69,6487.22,6315.84,6451.90,406800000,6451.90
+1997-04-11,6529.48,6529.48,6358.42,6391.69,444380000,6391.69
+1997-04-10,6563.84,6626.91,6495.48,6540.05,421790000,6540.05
+1997-04-09,6609.16,6662.41,6521.16,6563.84,451500000,6563.84
+1997-04-08,6555.91,6638.62,6491.71,6609.16,450790000,6609.16
+1997-04-07,6526.07,6639.00,6508.70,6555.91,453790000,6555.91
+1997-04-04,6477.35,6561.57,6376.90,6526.07,544580000,6526.07
+1997-04-03,6517.01,6540.43,6379.16,6477.35,498010000,6477.35
+1997-04-02,6611.05,6636.73,6476.60,6517.01,478210000,6517.01
+1997-04-01,6583.48,6667.70,6482.64,6611.05,515770000,6611.05
+1997-03-31,6740.59,6743.23,6532.49,6583.48,555880000,6583.48
+1997-03-27,6880.70,6918.47,6654.86,6740.59,476790000,6740.59
+1997-03-26,6876.17,6954.72,6811.21,6880.70,506670000,6880.70
+1997-03-25,6905.25,6984.94,6832.74,6876.17,487520000,6876.17
+1997-03-24,6804.79,6933.58,6746.63,6905.25,451970000,6905.25
+1997-03-21,6820.28,6890.52,6742.85,6804.79,544830000,6804.79
+1997-03-20,6877.68,6901.47,6765.14,6820.28,497480000,6820.28
+1997-03-19,6896.56,6944.15,6794.22,6877.68,539200000,6877.68
+1997-03-18,6955.48,6997.40,6841.05,6896.56,467490000,6896.56
+1997-03-17,6935.46,7004.20,6820.28,6955.48,495260000,6955.48
+1997-03-14,6878.89,6996.27,6851.19,6935.46,491540000,6935.46
+1997-03-13,7023.59,7023.59,6852.72,6878.89,507560000,6878.89
+1997-03-12,7085.16,7111.72,6988.96,7039.37,490200000,7039.37
+1997-03-11,7079.39,7158.28,7026.28,7085.16,493250000,7085.16
+1997-03-10,7000.89,7103.25,6970.10,7079.39,468780000,7079.39
+1997-03-07,6944.70,7047.07,6927.00,7000.89,508270000,7000.89
+1997-03-06,6945.85,7017.05,6896.60,6944.70,540310000,6944.70
+1997-03-05,6852.72,6966.64,6836.95,6945.85,532500000,6945.85
+1997-03-04,6918.92,6983.95,6814.63,6852.72,537890000,6852.72
+1997-03-03,6877.74,6957.01,6798.46,6918.92,437220000,6918.92
+1997-02-28,6925.07,6978.18,6820.78,6877.74,508280000,6877.74
+1997-02-27,6983.18,7028.59,6885.44,6925.07,467190000,6925.07
+1997-02-26,7037.83,7076.31,6878.12,6983.18,573920000,6983.18
+1997-02-25,7008.20,7099.79,6935.08,7037.83,527450000,7037.83
+1997-02-24,6931.62,7049.76,6868.50,7008.20,462450000,7008.20
+1997-02-21,6927.38,6984.72,6869.27,6931.62,478450000,6931.62
+1997-02-20,7020.13,7035.91,6890.82,6927.38,492220000,6927.38
+1997-02-19,7067.46,7112.87,6980.87,7020.13,519350000,7020.13
+1997-02-18,6988.96,7084.39,6946.62,7067.46,474110000,7067.46
+1997-02-14,7022.44,7074.77,6935.85,6988.96,491540000,6988.96
+1997-02-13,6961.63,7074.39,6924.30,7022.44,593710000,7022.44
+1997-02-12,6858.11,6976.64,6844.26,6961.63,563890000,6961.63
+1997-02-11,6806.54,6887.36,6756.90,6858.11,483090000,6858.11
+1997-02-10,6855.80,6908.14,6771.14,6806.54,471590000,6806.54
+1997-02-07,6773.06,6906.22,6747.28,6855.80,540910000,6855.80
+1997-02-06,6746.90,6821.17,6683.40,6773.06,519660000,6773.06
+1997-02-05,6833.48,6913.14,6704.56,6746.90,580520000,6746.90
+1997-02-04,6806.16,6859.65,6738.43,6833.48,506530000,6833.48
+1997-02-03,6813.09,6858.11,6733.04,6806.16,463600000,6806.16
+1997-01-31,6823.86,6912.37,6769.99,6813.09,578550000,6813.09
+1997-01-30,6740.74,6845.03,6719.96,6823.86,524160000,6823.86
+1997-01-29,6656.08,6766.91,6627.98,6740.74,498390000,6740.74
+1997-01-28,6660.69,6823.48,6612.20,6656.08,541580000,6656.08
+1997-01-27,6696.48,6748.82,6598.73,6660.69,445760000,6660.69
+1997-01-24,6755.75,6798.08,6629.91,6696.48,542920000,6696.48
+1997-01-23,6850.03,6953.55,6724.19,6755.75,685070000,6755.75
+1997-01-22,6883.90,6913.14,6801.16,6850.03,587300000,6850.03
+1997-01-21,6843.87,6934.69,6771.14,6883.90,571280000,6883.90
+1997-01-20,6833.10,6893.13,6777.30,6843.87,440470000,6843.87
+1997-01-17,6765.37,6863.88,6732.66,6833.10,534640000,6833.10
+1997-01-16,6726.88,6818.47,6688.40,6765.37,537290000,6765.37
+1997-01-15,6762.29,6800.77,6669.93,6726.88,524990000,6726.88
+1997-01-14,6709.18,6816.17,6689.94,6762.29,531600000,6762.29
+1997-01-13,6703.79,6773.45,6647.99,6709.18,445400000,6709.18
+1997-01-10,6625.67,6725.35,6530.62,6703.79,545860000,6703.79
+1997-01-09,6549.48,6677.24,6520.23,6625.67,555370000,6625.67
+1997-01-08,6600.66,6650.30,6509.84,6549.48,557510000,6549.48
+1997-01-07,6567.18,6621.82,6481.75,6600.66,538220000,6600.66
+1997-01-06,6544.09,6647.22,6508.30,6567.18,531350000,6567.18
+1997-01-03,6442.49,6586.42,6437.10,6544.09,452970000,6544.09
+1997-01-02,6448.27,6511.38,6318.96,6442.49,463230000,6442.49
+1996-12-31,6549.37,6580.90,6421.74,6448.27,399760000,6448.27
+1996-12-30,6560.91,6623.96,6518.23,6549.37,339060000,6549.37
+1996-12-27,6546.68,6607.81,6510.93,6560.91,253810000,6560.91
+1996-12-26,6522.85,6594.74,6495.94,6546.68,254630000,6546.68
+1996-12-24,6489.02,6546.68,6467.10,6522.85,165140000,6522.85
+1996-12-23,6484.40,6539.76,6428.27,6489.02,343280000,6489.02
+1996-12-20,6473.64,6597.43,6445.19,6484.40,654340000,6484.40
+1996-12-19,6352.15,6499.40,6352.15,6473.64,526410000,6473.64
+1996-12-18,6308.33,6399.06,6272.96,6346.77,500490000,6346.77
+1996-12-17,6268.35,6354.46,6206.83,6308.33,519840000,6308.33
+1996-12-16,6304.87,6388.68,6227.98,6268.35,447560000,6268.35
+1996-12-13,6303.71,6377.14,6227.59,6304.87,458540000,6304.87
+1996-12-12,6402.52,6465.57,6283.72,6303.71,492920000,6303.71
+1996-12-11,6457.88,6457.88,6317.94,6402.52,494210000,6402.52
+1996-12-10,6463.94,6545.56,6427.04,6473.25,446120000,6473.25
+1996-12-09,6381.94,6496.73,6375.98,6463.94,381570000,6463.94
+1996-12-06,6437.10,6441.20,6274.24,6381.94,500860000,6381.94
+1996-12-05,6422.94,6491.14,6363.31,6437.10,483710000,6437.10
+1996-12-04,6442.69,6482.20,6339.46,6422.94,498240000,6422.94
+1996-12-03,6521.70,6577.23,6422.94,6442.69,516160000,6442.69
+1996-12-02,6521.70,6553.01,6439.34,6521.70,412520000,6521.70
+1996-11-29,6499.34,6551.15,6490.40,6521.70,151550000,6521.70
+1996-11-27,6528.41,6566.43,6457.97,6499.34,377780000,6499.34
+1996-11-26,6547.79,6606.30,6475.49,6528.41,527380000,6528.41
+1996-11-25,6471.76,6565.68,6443.44,6547.79,475260000,6547.79
+1996-11-22,6418.47,6498.22,6402.44,6471.76,525210000,6471.76
+1996-11-21,6430.02,6463.56,6370.02,6418.47,464430000,6418.47
+1996-11-20,6397.60,6482.20,6370.02,6430.02,497900000,6430.02
+1996-11-19,6346.91,6428.16,6323.06,6397.60,461980000,6397.60
+1996-11-18,6348.03,6407.66,6297.34,6346.91,388520000,6346.91
+1996-11-15,6313.00,6414.37,6277.22,6348.03,529100000,6348.03
+1996-11-14,6274.24,6350.64,6232.50,6313.00,480350000,6313.00
+1996-11-13,6266.04,6317.10,6206.78,6274.24,429840000,6274.24
+1996-11-12,6255.60,6314.49,6199.70,6266.04,472940000,6266.04
+1996-11-11,6219.82,6292.87,6198.58,6255.60,353960000,6255.60
+1996-11-08,6206.04,6247.40,6151.62,6219.82,402320000,6219.82
+1996-11-07,6177.71,6238.83,6130.38,6206.04,502530000,6206.04
+1996-11-06,6081.18,6200.44,6060.69,6177.71,509600000,6177.71
+1996-11-05,6041.68,6125.53,6029.01,6081.18,492860000,6081.18
+1996-11-04,6021.93,6083.05,5981.30,6041.68,398790000,6041.68
+1996-11-01,6029.38,6082.67,5975.34,6021.93,465510000,6021.93
+1996-10-31,5993.23,6063.67,5955.59,6029.38,488500000,6029.38
+1996-10-30,6007.02,6055.84,5956.71,5993.23,437770000,5993.23
+1996-10-29,5972.73,6054.72,5938.82,6007.02,443890000,6007.02
+1996-10-28,6007.02,6063.67,5952.61,5972.73,383630000,5972.73
+1996-10-25,5992.48,6047.64,5954.47,6007.02,367640000,6007.02
+1996-10-24,6036.46,6080.07,5953.72,5992.48,418970000,5992.48
+1996-10-23,6061.80,6081.93,5965.65,6036.46,442170000,6036.46
+1996-10-22,6090.87,6114.73,6015.59,6061.80,410790000,6061.80
+1996-10-21,6094.23,6162.80,6027.89,6090.87,414630000,6090.87
+1996-10-18,6059.20,6119.57,6011.49,6094.23,473020000,6094.23
+1996-10-17,6020.81,6101.31,5994.72,6059.20,478550000,6059.20
+1996-10-16,6004.78,6056.21,5943.66,6020.81,441410000,6020.81
+1996-10-15,6010.00,6077.83,5951.12,6004.78,458980000,6004.78
+1996-10-14,5969.38,6043.91,5952.61,6010.00,322000000,6010.00
+1996-10-11,5921.67,5999.56,5912.36,5969.38,396050000,5969.38
+1996-10-10,5930.62,5956.71,5876.58,5921.67,394950000,5921.67
+1996-10-09,5966.77,5985.03,5892.23,5930.62,408450000,5930.62
+1996-10-08,5979.81,6032.36,5930.24,5966.77,435070000,5966.77
+1996-10-07,5992.86,6025.28,5945.15,5979.81,380750000,5979.81
+1996-10-04,5932.85,6023.79,5917.20,5992.86,463940000,5992.86
+1996-10-03,5933.97,5972.36,5887.76,5932.85,386500000,5932.85
+1996-10-02,5904.90,5966.02,5888.88,5933.97,440130000,5933.97
+1996-10-01,5882.17,5942.17,5833.72,5904.90,421550000,5904.90
+1996-09-30,5845.18,5934.32,5845.18,5882.17,394260000,5882.17
+1996-09-27,5868.85,5903.99,5819.65,5872.92,414760000,5872.92
+1996-09-26,5877.36,5928.04,5828.90,5868.85,500870000,5868.85
+1996-09-25,5874.03,5928.77,5827.42,5877.36,451710000,5877.36
+1996-09-24,5894.74,5952.08,5831.86,5874.03,460150000,5874.03
+1996-09-23,5888.46,5913.24,5820.39,5894.74,297760000,5894.74
+1996-09-20,5867.74,5925.82,5840.74,5888.46,519420000,5888.46
+1996-09-19,5877.36,5908.80,5818.17,5867.74,398580000,5867.74
+1996-09-18,5888.83,5919.90,5838.15,5877.36,396600000,5877.36
+1996-09-17,5889.20,5929.51,5830.38,5888.83,449850000,5888.83
+1996-09-16,5838.52,5920.64,5823.72,5889.20,430080000,5889.20
+1996-09-13,5786.73,5871.44,5786.73,5838.52,488360000,5838.52
+1996-09-12,5754.92,5815.59,5739.76,5771.94,398820000,5771.94
+1996-09-11,5727.18,5777.49,5696.85,5754.92,376880000,5754.92
+1996-09-10,5733.84,5767.87,5681.68,5727.18,372960000,5727.18
+1996-09-09,5662.08,5756.40,5662.08,5733.84,311530000,5733.84
+1996-09-06,5606.96,5696.48,5585.51,5659.86,348710000,5659.86
+1996-09-05,5656.90,5669.47,5592.53,5606.96,361430000,5606.96
+1996-09-04,5648.39,5682.05,5608.81,5656.90,351290000,5656.90
+1996-09-03,5616.21,5667.99,5550.37,5648.39,345740000,5648.39
+1996-08-30,5647.65,5659.86,5571.45,5616.21,258380000,5616.21
+1996-08-29,5712.38,5716.82,5615.47,5647.65,321120000,5647.65
+1996-08-28,5711.27,5747.89,5678.72,5712.38,296440000,5712.38
+1996-08-27,5693.89,5735.32,5670.58,5711.27,310520000,5711.27
+1996-08-26,5722.74,5742.71,5665.41,5693.89,281430000,5693.89
+1996-08-23,5733.47,5761.58,5679.09,5722.74,308010000,5722.74
+1996-08-22,5689.82,5761.95,5662.45,5733.47,354950000,5733.47
+1996-08-21,5721.26,5734.95,5648.76,5689.82,348820000,5689.82
+1996-08-20,5699.44,5747.52,5670.21,5721.26,334960000,5721.26
+1996-08-19,5689.45,5728.66,5664.30,5699.44,294080000,5699.44
+1996-08-16,5665.78,5722.74,5646.54,5689.45,337650000,5689.45
+1996-08-15,5666.88,5701.66,5633.22,5665.78,323950000,5665.78
+1996-08-14,5647.28,5695.00,5614.36,5666.88,343470000,5666.88
+1996-08-13,5618.06,5713.86,5618.06,5647.28,362470000,5647.28
+1996-08-12,5681.31,5746.04,5625.83,5704.98,312170000,5704.98
+1996-08-09,5713.49,5747.15,5654.31,5681.31,327280000,5681.31
+1996-08-08,5718.67,5746.41,5661.34,5713.49,334570000,5713.49
+1996-08-07,5696.11,5754.55,5659.12,5718.67,394340000,5718.67
+1996-08-06,5674.28,5716.45,5630.26,5696.11,347290000,5696.11
+1996-08-05,5679.83,5719.04,5639.14,5674.28,307240000,5674.28
+1996-08-02,5601.41,5703.51,5601.41,5679.83,442080000,5679.83
+1996-08-01,5528.91,5628.79,5507.83,5594.75,439110000,5594.75
+1996-07-31,5481.93,5558.13,5460.48,5528.91,403560000,5528.91
+1996-07-30,5434.59,5503.73,5403.52,5481.93,341090000,5481.93
+1996-07-29,5473.06,5497.47,5414.61,5434.59,281560000,5434.59
+1996-07-26,5422.01,5503.02,5397.97,5473.06,349900000,5473.06
+1996-07-25,5355.80,5469.36,5355.80,5422.01,405390000,5422.01
+1996-07-24,5346.55,5402.04,5244.83,5354.69,463030000,5354.69
+1996-07-23,5390.94,5447.90,5313.63,5346.55,421900000,5346.55
+1996-07-22,5426.82,5446.05,5346.92,5390.94,327300000,5390.94
+1996-07-19,5464.18,5490.44,5393.53,5426.82,408070000,5426.82
+1996-07-18,5376.88,5500.43,5352.10,5464.18,474460000,5464.18
+1996-07-17,5358.76,5465.29,5325.10,5376.88,513830000,5376.88
+1996-07-16,5349.51,5438.66,5170.11,5358.76,68290000,5358.76
+1996-07-15,5510.56,5527.93,5326.98,5349.51,419020000,5349.51
+1996-07-12,5520.54,5562.65,5455.16,5510.56,397790000,5510.56
+1996-07-11,5600.33,5600.33,5447.77,5520.54,520470000,5520.54
+1996-07-10,5581.86,5628.03,5515.00,5603.65,421350000,5603.65
+1996-07-09,5550.83,5622.49,5540.12,5581.86,379200000,5581.86
+1996-07-08,5588.14,5622.12,5519.80,5550.83,367560000,5550.83
+1996-07-05,5657.58,5657.58,5570.77,5588.14,181470000,5588.14
+1996-07-03,5720.38,5749.93,5656.47,5703.02,336260000,5703.02
+1996-07-02,5729.98,5769.88,5668.29,5720.38,388000000,5720.38
+1996-07-01,5654.63,5749.19,5637.26,5729.98,345750000,5729.98
+1996-06-28,5677.53,5724.44,5625.81,5654.63,470460000,5654.63
+1996-06-27,5682.70,5715.21,5616.21,5677.53,405580000,5677.53
+1996-06-26,5719.27,5739.22,5652.04,5682.70,386520000,5682.70
+1996-06-25,5717.79,5760.27,5668.66,5719.27,391900000,5719.27
+1996-06-24,5705.23,5770.61,5688.61,5717.79,333840000,5717.79
+1996-06-21,5659.43,5722.22,5639.11,5705.23,520340000,5705.23
+1996-06-20,5648.35,5709.30,5606.97,5659.43,441060000,5659.43
+1996-06-19,5628.03,5693.78,5600.70,5648.35,383610000,5648.35
+1996-06-18,5652.78,5683.44,5607.71,5628.03,373290000,5628.03
+1996-06-17,5649.45,5689.72,5614.36,5652.78,298410000,5652.78
+1996-06-14,5657.95,5687.13,5609.93,5649.45,390630000,5649.45
+1996-06-13,5668.29,5714.84,5622.86,5657.95,397620000,5657.95
+1996-06-12,5668.66,5725.55,5637.63,5668.29,397190000,5668.29
+1996-06-11,5687.87,5747.71,5637.63,5668.66,405390000,5668.66
+1996-06-10,5697.11,5727.03,5643.54,5687.87,337480000,5687.87
+1996-06-07,5667.19,5708.93,5559.69,5697.11,445710000,5697.11
+1996-06-06,5697.48,5750.67,5639.48,5667.19,464800000,5667.19
+1996-06-05,5665.71,5718.53,5631.35,5697.48,380360000,5697.48
+1996-06-04,5624.71,5697.84,5616.58,5665.71,386040000,5665.71
+1996-06-03,5643.18,5662.75,5587.40,5624.71,318470000,5624.71
+1996-05-31,5693.41,5712.62,5614.36,5643.18,351750000,5643.18
+1996-05-30,5673.83,5734.41,5625.07,5693.41,381960000,5693.41
+1996-05-29,5709.67,5743.65,5632.46,5673.83,346730000,5673.83
+1996-05-28,5762.86,5798.69,5680.48,5709.67,341480000,5709.67
+1996-05-24,5762.12,5815.68,5722.59,5762.86,329150000,5762.86
+1996-05-23,5778.00,5833.04,5704.12,5762.12,431850000,5762.12
+1996-05-22,5736.26,5803.49,5687.87,5778.00,423670000,5778.00
+1996-05-21,5748.82,5794.63,5698.21,5736.26,409610000,5736.26
+1996-05-20,5687.50,5778.74,5657.58,5748.82,385000000,5748.82
+1996-05-17,5635.05,5729.61,5631.35,5687.50,429140000,5687.50
+1996-05-16,5625.44,5677.53,5577.42,5635.05,392070000,5635.05
+1996-05-15,5624.71,5691.57,5590.72,5625.44,447790000,5625.44
+1996-05-14,5582.60,5663.12,5566.71,5624.71,460440000,5624.71
+1996-05-13,5518.14,5601.80,5495.42,5582.60,394180000,5582.60
+1996-05-10,5478.03,5559.68,5478.03,5518.14,428370000,5518.14
+1996-05-09,5474.06,5534.76,5419.87,5475.14,404310000,5475.14
+1996-05-08,5420.95,5486.34,5327.74,5474.06,495460000,5474.06
+1996-05-07,5464.31,5486.34,5392.05,5420.95,410770000,5420.95
+1996-05-06,5478.03,5528.97,5397.83,5464.31,375820000,5464.31
+1996-05-03,5498.27,5555.71,5439.74,5478.03,434010000,5478.03
+1996-05-02,5575.22,5578.11,5455.27,5498.27,442960000,5498.27
+1996-05-01,5569.08,5619.29,5523.56,5575.22,404620000,5575.22
+1996-04-30,5573.41,5606.29,5522.83,5569.08,393390000,5569.08
+1996-04-29,5567.99,5611.71,5515.25,5573.41,344030000,5573.41
+1996-04-26,5566.91,5618.57,5517.78,5567.99,402530000,5567.99
+1996-04-25,5553.90,5601.23,5490.68,5566.91,461120000,5566.91
+1996-04-24,5588.59,5619.29,5512.36,5553.90,494220000,5553.90
+1996-04-23,5564.74,5621.82,5534.76,5588.59,452690000,5588.59
+1996-04-22,5535.48,5610.62,5516.33,5564.74,397460000,5564.74
+1996-04-19,5551.74,5593.64,5504.41,5535.48,435690000,5535.48
+1996-04-18,5549.93,5600.51,5493.93,5551.74,415150000,5551.74
+1996-04-17,5620.02,5653.25,5500.07,5549.93,465200000,5549.93
+1996-04-16,5592.92,5656.14,5554.99,5620.02,453310000,5620.02
+1996-04-15,5532.59,5614.60,5517.41,5592.92,346370000,5592.92
+1996-04-12,5487.07,5577.39,5445.16,5532.59,413270000,5532.59
+1996-04-11,5485.98,5540.17,5382.66,5487.07,519710000,5487.07
+1996-04-10,5560.41,5601.23,5452.02,5485.98,475150000,5485.98
+1996-04-09,5594.37,5644.58,5530.06,5560.41,426790000,5560.41
+1996-04-08,5624.71,5624.71,5518.14,5594.37,411810000,5594.37
+1996-04-04,5689.74,5737.07,5633.02,5682.88,383400000,5682.88
+1996-04-03,5671.68,5712.50,5619.29,5689.74,386620000,5689.74
+1996-04-02,5637.72,5706.72,5597.26,5671.68,406640000,5671.68
+1996-04-01,5587.14,5670.23,5562.57,5637.72,392120000,5637.72
+1996-03-29,5630.85,5682.88,5550.29,5587.14,413510000,5587.14
+1996-03-28,5626.88,5664.45,5564.74,5630.85,370750000,5630.85
+1996-03-27,5670.60,5703.47,5596.53,5626.88,406280000,5626.88
+1996-03-26,5643.86,5701.30,5595.81,5670.60,400090000,5670.60
+1996-03-25,5636.64,5712.14,5592.92,5643.86,336700000,5643.86
+1996-03-22,5626.88,5681.07,5589.67,5636.64,329390000,5636.64
+1996-03-21,5655.42,5696.25,5590.03,5626.88,367180000,5626.88
+1996-03-20,5669.51,5724.06,5590.39,5655.42,409780000,5655.42
+1996-03-19,5683.60,5755.86,5619.66,5669.51,438300000,5669.51
+1996-03-18,5584.97,5706.00,5573.41,5683.60,437100000,5683.60
+1996-03-15,5586.06,5628.69,5523.56,5584.97,529970000,5584.97
+1996-03-14,5568.72,5662.29,5536.56,5586.06,492630000,5586.06
+1996-03-13,5583.89,5626.52,5513.80,5568.72,413030000,5568.72
+1996-03-12,5581.00,5622.55,5464.67,5583.89,454980000,5583.89
+1996-03-11,5470.45,5605.20,5425.29,5581.00,449500000,5581.00
+1996-03-08,5612.79,5612.79,5395.30,5470.45,546550000,5470.45
+1996-03-07,5629.77,5667.34,5572.33,5641.69,425790000,5641.69
+1996-03-06,5642.42,5700.22,5585.70,5629.77,428220000,5629.77
+1996-03-05,5600.15,5655.78,5558.24,5642.42,445700000,5642.42
+1996-03-04,5536.56,5646.39,5511.99,5600.15,417270000,5600.15
+1996-03-01,5485.62,5573.41,5424.20,5536.56,471480000,5536.56
+1996-02-29,5506.21,5562.21,5440.46,5485.62,453170000,5485.62
+1996-02-28,5549.21,5625.07,5487.07,5506.21,447790000,5506.21
+1996-02-27,5565.10,5597.26,5478.76,5549.21,431340000,5549.21
+1996-02-26,5630.49,5647.83,5530.42,5565.10,399330000,5565.10
+1996-02-23,5608.46,5693.36,5546.32,5630.49,443130000,5630.49
+1996-02-22,5515.97,5638.44,5511.63,5608.46,494750000,5608.46
+1996-02-21,5458.53,5548.12,5440.82,5515.97,431220000,5515.97
+1996-02-20,5503.32,5515.97,5393.50,5458.53,395910000,5458.53
+1996-02-16,5551.37,5563.30,5470.45,5503.32,445570000,5503.32
+1996-02-15,5579.55,5623.27,5514.88,5551.37,415320000,5551.37
+1996-02-14,5601.23,5633.02,5534.39,5579.55,421790000,5579.55
+1996-02-13,5600.15,5644.94,5530.06,5601.23,441540000,5601.23
+1996-02-12,5541.62,5643.50,5531.14,5600.15,401490000,5600.15
+1996-02-09,5539.45,5603.76,5474.06,5541.62,477640000,5541.62
+1996-02-08,5492.12,5559.68,5441.55,5539.45,474970000,5539.45
+1996-02-07,5459.61,5520.30,5423.84,5492.12,462730000,5492.12
+1996-02-06,5407.59,5483.82,5371.82,5459.61,465940000,5459.61
+1996-02-05,5373.99,5433.96,5319.43,5407.59,377760000,5407.59
+1996-02-02,5405.06,5442.99,5338.94,5373.99,420020000,5373.99
+1996-02-01,5395.30,5438.29,5335.69,5405.06,461610000,5405.06
+1996-01-31,5381.21,5433.24,5314.38,5395.30,472210000,5395.30
+1996-01-30,5304.98,5409.75,5288.73,5381.21,464350000,5381.21
+1996-01-29,5271.75,5338.22,5246.82,5304.98,363330000,5304.98
+1996-01-26,5216.83,5293.78,5187.21,5271.75,385700000,5271.75
+1996-01-25,5242.84,5289.45,5173.84,5216.83,453270000,5216.83
+1996-01-24,5192.27,5297.04,5176.73,5242.84,476380000,5242.84
+1996-01-23,5219.36,5241.76,5141.33,5192.27,416910000,5192.27
+1996-01-22,5184.68,5254.77,5133.02,5219.36,398040000,5219.36
+1996-01-19,5124.35,5214.66,5087.49,5184.68,497720000,5184.68
+1996-01-18,5066.90,5166.98,5032.58,5124.35,450410000,5124.35
+1996-01-17,5088.22,5133.38,5028.61,5066.90,458720000,5066.90
+1996-01-16,5043.78,5116.04,5000.79,5088.22,425220000,5088.22
+1996-01-15,5061.12,5099.42,5012.71,5043.78,306180000,5043.78
+1996-01-12,5065.10,5114.23,5000.07,5061.12,383400000,5061.12
+1996-01-11,5032.94,5099.78,5002.96,5065.10,408800000,5065.10
+1996-01-10,5130.13,5151.69,5000.07,5032.94,496830000,5032.94
+1996-01-09,5197.70,5239.23,5100.86,5130.13,417400000,5130.13
+1996-01-08,5181.43,5207.08,5179.98,5197.70,130360000,5197.70
+1996-01-05,5173.84,5217.55,5107.00,5181.43,437110000,5181.43
+1996-01-04,5194.07,5259.46,5114.23,5173.84,512580000,5173.84
+1996-01-03,5177.45,5252.60,5143.13,5194.07,468950000,5194.07
+1996-01-02,5117.12,5208.16,5087.13,5177.45,364180000,5177.45
+1995-12-29,5095.80,5144.58,5063.65,5117.12,319680000,5117.12
+1995-12-28,5105.92,5132.65,5062.21,5095.80,288470000,5095.80
+1995-12-27,5110.26,5146.74,5077.74,5105.92,252270000,5105.92
+1995-12-26,5097.97,5149.27,5072.32,5110.26,217030000,5110.26
+1995-12-22,5096.53,5146.74,5064.01,5097.97,289600000,5097.97
+1995-12-21,5059.32,5135.91,5031.50,5096.53,415780000,5096.53
+1995-12-20,5109.89,5173.48,5047.39,5059.32,437650000,5059.32
+1995-12-19,5075.21,5146.02,5016.68,5109.89,18440000,5109.89
+1995-12-18,5159.39,5159.39,5042.70,5075.21,426230000,5075.21
+1995-12-15,5182.15,5217.55,5135.54,5176.73,636780000,5176.73
+1995-12-14,5216.47,5266.69,5148.55,5182.15,461960000,5182.15
+1995-12-13,5174.92,5246.10,5144.22,5216.47,414680000,5216.47
+1995-12-12,5184.32,5226.23,5132.29,5174.92,349410000,5174.92
+1995-12-11,5156.86,5225.50,5122.18,5184.32,342050000,5184.32
+1995-12-08,5159.39,5200.21,5115.31,5156.86,327500000,5156.86
+1995-12-07,5199.13,5211.05,5124.35,5159.39,379260000,5159.39
+1995-12-06,5177.45,5234.53,5147.47,5199.13,417750000,5199.13
+1995-12-05,5139.52,5216.83,5108.45,5177.45,434000000,5177.45
+1995-12-04,5087.13,5157.58,5057.87,5139.52,405080000,5139.52
+1995-12-01,5074.49,5133.02,5038.36,5087.13,392650000,5087.13
+1995-11-30,5105.56,5143.13,5033.17,5074.49,439470000,5074.49
+1995-11-29,5078.10,5126.51,5047.03,5105.56,398230000,5105.56
+1995-11-28,5070.88,5105.56,5006.21,5078.10,408860000,5078.10
+1995-11-27,5048.84,5114.23,5034.03,5070.88,356180000,5070.88
+1995-11-24,5041.61,5072.68,5028.61,5048.84,125870000,5048.84
+1995-11-22,5023.55,5096.17,4982.72,5041.61,404900000,5041.61
+1995-11-21,4983.09,5050.28,4948.04,5023.55,405860000,5023.55
+1995-11-20,4989.95,5030.77,4946.60,4983.09,333110000,4983.09
+1995-11-17,4969.36,5022.10,4934.31,4989.95,429990000,4989.95
+1995-11-16,4922.75,5003.68,4902.16,4969.36,418430000,4969.36
+1995-11-15,4871.81,4939.73,4835.69,4922.75,373090000,4922.75
+1995-11-14,4872.90,4923.11,4826.29,4871.81,353650000,4871.81
+1995-11-13,4870.37,4909.75,4821.23,4872.90,292390000,4872.90
+1995-11-10,4864.23,4896.02,4820.51,4870.37,297950000,4870.37
+1995-11-09,4852.67,4902.52,4811.84,4864.23,379500000,4864.23
+1995-11-08,4797.03,4877.59,4775.71,4852.67,359770000,4852.67
+1995-11-07,4814.01,4839.30,4770.66,4797.03,365720000,4797.03
+1995-11-06,4825.57,4862.78,4779.33,4814.01,309090000,4814.01
+1995-11-03,4808.59,4858.81,4774.63,4825.57,344360000,4825.57
+1995-11-02,4766.68,4833.16,4745.00,4808.59,396150000,4808.59
+1995-11-01,4755.48,4801.73,4719.72,4766.68,377930000,4766.68
+1995-10-31,4756.57,4821.96,4735.97,4755.48,377350000,4755.48
+1995-10-30,4741.75,4798.84,4716.46,4756.57,318840000,4756.57
+1995-10-27,4703.82,4766.68,4653.24,4741.75,378820000,4741.75
+1995-10-26,4753.68,4777.88,4655.05,4703.82,464190000,4703.82
+1995-10-25,4783.66,4824.49,4708.88,4753.68,433570000,4753.68
+1995-10-24,4755.48,4819.07,4730.92,4783.66,415400000,4783.66
+1995-10-23,4794.86,4805.70,4724.41,4755.48,329720000,4755.48
+1995-10-20,4802.45,4836.41,4758.37,4794.86,388140000,4794.86
+1995-10-19,4777.52,4830.27,4744.28,4802.45,406620000,4802.45
+1995-10-18,4795.95,4837.49,4747.53,4777.52,411270000,4777.52
+1995-10-17,4784.38,4831.35,4747.90,4795.95,352940000,4795.95
+1995-10-16,4793.78,4823.04,4751.51,4784.38,299520000,4784.38
+1995-10-13,4764.88,4845.08,4749.70,4793.78,373970000,4793.78
+1995-10-12,4735.25,4790.16,4709.24,4764.88,343930000,4764.88
+1995-10-11,4720.80,4773.91,4686.43,4735.25,343060000,4735.25
+1995-10-10,4726.22,4745.73,4638.43,4720.80,412670000,4720.80
+1995-10-09,4769.21,4781.13,4691.54,4726.22,275280000,4726.22
+1995-10-06,4762.71,4805.70,4731.64,4769.21,314170000,4769.21
+1995-10-05,4740.67,4794.86,4705.63,4762.71,367410000,4762.71
+1995-10-04,4749.70,4787.27,4689.01,4740.67,339350000,4740.67
+1995-10-03,4761.26,4791.61,4702.74,4749.70,385890000,4749.70
+1995-10-02,4789.08,4817.98,4732.72,4761.26,304990000,4761.26
+1995-09-29,4787.64,4834.96,4757.65,4789.08,337670000,4789.08
+1995-09-28,4762.35,4810.03,4731.64,4787.64,367610000,4787.64
+1995-09-27,4765.60,4790.16,4692.98,4762.35,410970000,4762.35
+1995-09-26,4769.93,4816.54,4738.86,4765.60,362550000,4765.60
+1995-09-25,4764.15,4804.62,4728.02,4769.93,273110000,4769.93
+1995-09-22,4767.40,4789.44,4706.35,4764.15,370750000,4764.15
+1995-09-21,4792.69,4820.15,4728.75,4767.40,367060000,4767.40
+1995-09-20,4767.04,4828.46,4746.45,4792.69,402530000,4792.69
+1995-09-19,4780.41,4798.11,4734.53,4767.04,371080000,4767.04
+1995-09-18,4797.57,4814.01,4729.47,4780.41,328630000,4780.41
+1995-09-15,4801.80,4839.48,4762.35,4797.57,459370000,4797.57
+1995-09-14,4765.52,4830.32,4731.36,4801.80,382860000,4801.80
+1995-09-13,4747.21,4801.09,4697.55,4765.52,381450000,4765.52
+1995-09-12,4704.94,4762.35,4689.45,4747.21,342580000,4747.21
+1995-09-11,4700.72,4744.04,4672.54,4704.94,296820000,4704.94
+1995-09-08,4669.72,4722.91,4648.59,4700.72,317260000,4700.72
+1995-09-07,4683.81,4710.58,4640.14,4669.72,321710000,4669.72
+1995-09-06,4670.08,4716.21,4648.95,4683.81,369510000,4683.81
+1995-09-05,4647.54,4697.90,4625.70,4670.08,332660000,4670.08
+1995-09-01,4610.56,4672.19,4594.71,4647.54,255710000,4647.54
+1995-08-31,4604.57,4634.51,4582.38,4610.56,300890000,4610.56
+1995-08-30,4608.44,4639.79,4582.38,4604.57,329780000,4604.57
+1995-08-29,4594.00,4625.35,4554.21,4608.44,311290000,4608.44
+1995-08-28,4601.40,4632.39,4566.53,4594.00,267860000,4594.00
+1995-08-25,4580.62,4629.93,4569.70,4601.40,255990000,4601.40
+1995-08-24,4584.85,4618.30,4552.80,4580.62,299200000,4580.62
+1995-08-23,4620.42,4636.27,4571.81,4584.85,291380000,4584.85
+1995-08-22,4614.78,4646.13,4580.62,4620.42,290350000,4620.42
+1995-08-21,4617.60,4676.42,4593.65,4614.78,303200000,4614.78
+1995-08-18,4630.63,4665.15,4597.88,4617.60,312030000,4617.60
+1995-08-17,4639.08,4659.16,4587.66,4630.63,354460000,4630.63
+1995-08-16,4640.84,4673.60,4593.30,4639.08,390070000,4639.08
+1995-08-15,4659.86,4672.89,4602.10,4640.84,330040000,4640.84
+1995-08-14,4618.30,4677.12,4601.75,4659.86,263750000,4659.86
+1995-08-11,4643.66,4659.51,4584.85,4618.30,267850000,4618.30
+1995-08-10,4671.49,4698.96,4621.47,4643.66,306660000,4643.66
+1995-08-09,4693.32,4712.34,4649.30,4671.49,303390000,4671.49
+1995-08-08,4693.32,4722.55,4654.23,4693.32,305150000,4693.32
+1995-08-07,4683.46,4727.84,4667.26,4693.32,276040000,4693.32
+1995-08-04,4701.42,4728.54,4660.57,4683.46,314730000,4683.46
+1995-08-03,4690.15,4720.44,4632.04,4701.42,353110000,4701.42
+1995-08-02,4700.37,4772.56,4667.96,4690.15,374310000,4690.15
+1995-08-01,4708.47,4742.98,4648.59,4700.37,334770000,4700.37
+1995-07-31,4715.51,4753.55,4671.13,4708.47,291950000,4708.47
+1995-07-28,4732.77,4762.70,4686.28,4715.51,311580000,4715.51
+1995-07-27,4707.06,4767.99,4691.56,4732.77,356570000,4732.77
+1995-07-26,4714.45,4750.73,4665.15,4707.06,393460000,4707.06
+1995-07-25,4668.67,4743.69,4651.76,4714.45,373210000,4714.45
+1995-07-24,4641.55,4701.42,4620.42,4668.67,315170000,4668.67
+1995-07-21,4641.55,4676.06,4596.82,4641.55,427770000,4641.55
+1995-07-20,4628.87,4684.52,4578.51,4641.55,383380000,4641.55
+1995-07-19,4686.28,4698.60,4530.26,4628.87,489850000,4628.87
+1995-07-18,4734.53,4734.53,4648.24,4686.28,372230000,4686.28
+1995-07-17,4708.82,4767.63,4681.35,4736.29,322540000,4736.29
+1995-07-14,4727.48,4736.99,4664.79,4708.82,312930000,4708.82
+1995-07-13,4727.29,4766.58,4676.06,4727.48,387470000,4727.48
+1995-07-12,4680.60,4747.00,4654.66,4727.29,416000000,4727.29
+1995-07-11,4702.39,4724.52,4647.74,4680.60,376770000,4680.60
+1995-07-10,4702.73,4747.69,4670.91,4702.39,409700000,4702.39
+1995-07-07,4664.00,4740.77,4628.38,4702.73,466540000,4702.73
+1995-07-06,4615.23,4681.98,4587.91,4664.00,420470000,4664.00
+1995-07-05,4585.15,4652.24,4561.63,4615.23,357810000,4615.23
+1995-07-03,4556.10,4594.83,4536.04,4585.15,117870000,4585.15
+1995-06-30,4550.56,4606.24,4513.90,4556.10,311320000,4556.10
+1995-06-29,4556.79,4592.76,4510.45,4550.56,313060000,4550.56
+1995-06-28,4542.61,4587.22,4512.87,4556.79,368060000,4556.79
+1995-06-27,4551.25,4592.41,4511.48,4542.61,346950000,4542.61
+1995-06-26,4585.84,4600.02,4536.38,4551.25,296720000,4551.25
+1995-06-23,4589.64,4609.70,4549.18,4585.84,321530000,4585.84
+1995-06-22,4547.10,4614.20,4535.35,4589.64,420950000,4589.64
+1995-06-21,4550.56,4583.07,4517.02,4547.10,398210000,4547.10
+1995-06-20,4553.68,4587.22,4497.99,4550.56,382290000,4550.56
+1995-06-19,4510.79,4577.19,4498.69,4553.68,322620000,4553.68
+1995-06-16,4496.27,4533.96,4482.43,4510.79,442740000,4510.79
+1995-06-15,4491.08,4527.74,4466.87,4496.27,334640000,4496.27
+1995-06-14,4484.51,4510.79,4449.23,4491.08,330750000,4491.08
+1995-06-13,4446.46,4504.91,4440.24,4484.51,339620000,4484.51
+1995-06-12,4423.99,4482.09,4415.69,4446.46,287830000,4446.46
+1995-06-09,4458.57,4466.87,4394.59,4423.99,328960000,4423.99
+1995-06-08,4462.03,4492.12,4431.59,4458.57,289880000,4458.57
+1995-06-07,4485.20,4497.65,4432.29,4462.03,327790000,4462.03
+1995-06-06,4476.55,4520.47,4446.46,4485.20,340470000,4485.20
+1995-06-05,4444.39,4510.45,4417.76,4476.55,337520000,4476.55
+1995-06-02,4472.75,4496.27,4406.35,4444.39,366000000,4444.39
+1995-06-01,4465.14,4499.72,4421.56,4472.75,345890000,4472.75
+1995-05-31,4378.68,4467.91,4360.70,4465.14,358160000,4465.14
+1995-05-30,4369.00,4412.92,4334.41,4378.68,283020000,4378.68
+1995-05-26,4412.23,4423.64,4338.91,4369.00,290730000,4369.00
+1995-05-25,4427.44,4451.31,4375.91,4412.23,341820000,4412.23
+1995-05-24,4436.44,4480.70,4390.78,4438.16,391750000,4438.16
+1995-05-23,4395.63,4451.65,4372.46,4436.44,362690000,4436.44
+1995-05-22,4341.33,4416.03,4337.87,4395.63,285600000,4395.63
+1995-05-19,4340.64,4368.65,4287.38,4341.33,354010000,4341.33
+1995-05-18,4422.60,4426.41,4330.95,4340.64,351850000,4340.64
+1995-05-17,4435.05,4452.69,4386.63,4422.60,347930000,4422.60
+1995-05-16,4437.47,4464.10,4408.08,4435.05,366180000,4435.05
+1995-05-15,4430.56,4468.94,4398.74,4437.47,316240000,4437.47
+1995-05-12,4411.19,4463.07,4371.07,4430.56,361000000,4430.56
+1995-05-11,4404.62,4446.12,4365.19,4411.19,339900000,4411.19
+1995-05-10,4390.78,4440.24,4347.55,4404.62,381990000,4404.62
+1995-05-09,4383.87,4421.22,4360.00,4390.78,361430000,4390.78
+1995-05-08,4343.40,4407.04,4316.43,4383.87,291810000,4383.87
+1995-05-05,4359.66,4389.75,4310.55,4343.40,342380000,4343.40
+1995-05-04,4373.15,4426.41,4329.92,4359.66,434920000,4359.66
+1995-05-03,4328.88,4392.51,4312.28,4373.15,392290000,4373.15
+1995-05-02,4316.08,4348.25,4288.42,4328.88,300660000,4328.88
+1995-05-01,4321.27,4352.74,4278.73,4316.08,296830000,4316.08
+1995-04-28,4314.70,4348.94,4270.78,4321.27,320270000,4321.27
+1995-04-27,4299.83,4335.10,4269.05,4314.70,350850000,4314.70
+1995-04-26,4300.17,4324.73,4267.32,4299.83,350790000,4299.83
+1995-04-25,4303.98,4337.18,4267.32,4300.17,351790000,4300.17
+1995-04-24,4270.09,4328.88,4239.65,4303.98,325760000,4303.98
+1995-04-21,4230.66,4296.37,4214.41,4270.09,403210000,4270.09
+1995-04-20,4207.49,4263.86,4186.39,4230.66,368440000,4230.66
+1995-04-19,4179.13,4232.39,4143.51,4207.49,377520000,4207.49
+1995-04-18,4195.38,4221.67,4152.15,4179.13,344680000,4179.13
+1995-04-17,4208.18,4260.06,4174.63,4195.38,333930000,4195.38
+1995-04-13,4197.81,4243.46,4173.94,4208.18,301510000,4208.18
+1995-04-12,4187.08,4221.67,4163.57,4197.81,327880000,4197.81
+1995-04-11,4198.15,4229.97,4168.06,4187.08,309710000,4187.08
+1995-04-10,4192.62,4219.94,4163.91,4198.15,260980000,4198.15
+1995-04-07,4205.41,4226.86,4154.23,4192.62,314750000,4192.62
+1995-04-06,4200.57,4239.31,4179.13,4205.41,320460000,4205.41
+1995-04-05,4201.61,4229.62,4166.33,4200.57,315170000,4200.57
+1995-04-04,4168.41,4220.98,4154.23,4201.61,330550000,4201.61
+1995-04-03,4157.69,4202.30,4129.68,4168.41,287380000,4168.41
+1995-03-31,4172.56,4194.00,4100.28,4157.69,352940000,4157.69
+1995-03-30,4160.80,4213.37,4128.29,4172.56,362020000,4172.56
+1995-03-29,4151.81,4213.71,4121.72,4160.80,385910000,4160.80
+1995-03-28,4157.34,4176.02,4120.68,4151.81,320360000,4151.81
+1995-03-27,4138.67,4177.40,4113.08,4157.34,296160000,4157.34
+1995-03-24,4087.83,4155.27,4087.14,4138.67,358370000,4138.67
+1995-03-23,4082.99,4107.89,4046.33,4087.83,318490000,4087.83
+1995-03-22,4072.61,4107.54,4039.07,4082.99,313120000,4082.99
+1995-03-21,4083.68,4122.41,4046.67,4072.61,367110000,4072.61
+1995-03-20,4073.65,4115.15,4051.17,4083.68,301720000,4083.68
+1995-03-17,4069.15,4101.66,4044.94,4073.65,415810000,4073.65
+1995-03-16,4038.37,4095.78,4021.77,4069.15,336330000,4069.15
+1995-03-15,4048.75,4070.19,4008.63,4038.37,309540000,4038.37
+1995-03-14,4025.23,4087.14,4014.86,4048.75,346140000,4048.75
+1995-03-13,4035.61,4060.85,3999.29,4025.23,275280000,4025.23
+1995-03-10,3983.39,4054.97,3978.20,4035.61,383000000,4035.61
+1995-03-09,3979.23,4011.40,3953.99,3983.39,319100000,3983.39
+1995-03-08,3962.63,4002.41,3944.65,3979.23,349700000,3979.23
+1995-03-07,3997.56,4009.67,3935.31,3962.63,355550000,3962.63
+1995-03-06,3989.61,4015.89,3944.31,3997.56,298850000,3997.56
+1995-03-03,3979.93,4004.83,3946.03,3989.61,330840000,3989.61
+1995-03-02,3994.80,4009.67,3947.07,3979.93,329430000,3979.93
+1995-03-01,4011.05,4033.19,3960.56,3994.80,362590000,3994.80
+1995-02-28,3988.57,4021.43,3967.48,4011.05,317120000,4011.05
+1995-02-27,4011.74,4033.19,3966.78,3988.57,285790000,3988.57
+1995-02-24,4003.33,4033.61,3974.06,4011.74,302850000,4011.74
+1995-02-23,3979.45,4034.62,3979.45,4003.33,394100000,4003.33
+1995-02-22,3963.97,4002.32,3944.46,3973.05,339140000,3973.05
+1995-02-21,3953.54,3989.88,3930.66,3963.97,308060000,3963.97
+1995-02-17,3987.52,4001.99,3937.05,3953.54,350560000,3953.54
+1995-02-16,3986.17,4011.07,3948.16,3987.52,360990000,3987.52
+1995-02-15,3958.25,4019.15,3937.73,3986.17,377940000,3986.17
+1995-02-14,3954.21,3984.83,3930.66,3958.25,300720000,3958.25
+1995-02-13,3939.07,3974.74,3920.57,3954.21,256210000,3954.21
+1995-02-10,3932.68,3962.96,3908.46,3939.07,295550000,3939.07
+1995-02-09,3935.37,3967.33,3904.76,3932.68,325570000,3932.68
+1995-02-08,3937.39,3967.67,3909.13,3935.37,317910000,3935.37
+1995-02-07,3937.73,3960.27,3907.45,3937.39,317110000,3937.39
+1995-02-06,3928.64,3964.31,3900.04,3937.73,325660000,3937.73
+1995-02-03,3876.16,3959.60,3876.16,3928.64,440950000,3928.64
+1995-02-02,3847.56,3884.23,3828.38,3870.77,322030000,3870.77
+1995-02-01,3843.86,3886.25,3809.21,3847.56,395300000,3847.56
+1995-01-31,3832.08,3872.12,3809.54,3843.86,411570000,3843.86
+1995-01-30,3857.99,3881.20,3794.40,3832.08,318530000,3832.08
+1995-01-27,3870.44,3914.18,3827.37,3857.99,339490000,3857.99
+1995-01-26,3871.45,3903.41,3839.15,3870.44,304650000,3870.44
+1995-01-25,3862.70,3908.79,3832.08,3871.45,342240000,3871.45
+1995-01-24,3867.41,3898.36,3840.16,3862.70,315410000,3862.70
+1995-01-23,3869.43,3885.58,3815.26,3867.41,325810000,3867.41
+1995-01-20,3882.21,3898.70,3826.70,3869.43,376870000,3869.43
+1995-01-19,3928.98,3929.99,3866.74,3882.21,297220000,3882.21
+1995-01-18,3930.66,3950.85,3889.95,3928.98,343100000,3928.98
+1995-01-17,3932.34,3953.88,3895.33,3930.66,330890000,3930.66
+1995-01-16,3908.46,3955.56,3889.95,3932.34,315800000,3932.34
+1995-01-13,3859.00,3924.27,3852.61,3908.46,336740000,3908.46
+1995-01-12,3862.03,3886.59,3831.41,3859.00,313040000,3859.00
+1995-01-11,3866.74,3899.71,3824.68,3862.03,346310000,3862.03
+1995-01-10,3861.35,3912.49,3844.87,3866.74,352440000,3866.74
+1995-01-09,3867.41,3889.28,3834.44,3861.35,278710000,3861.35
+1995-01-06,3850.92,3902.40,3823.67,3867.41,308070000,3867.41
+1995-01-05,3857.65,3876.83,3825.35,3850.92,309140000,3850.92
+1995-01-04,3838.48,3876.83,3815.26,3857.65,319510000,3857.65
+1995-01-03,3834.44,3864.72,3805.50,3838.48,262450000,3838.48
+1994-12-30,3833.43,3874.48,3812.91,3834.44,256260000,3834.44
+1994-12-29,3839.49,3867.41,3812.91,3833.43,250650000,3833.43
+1994-12-28,3861.69,3871.45,3816.94,3839.49,246260000,3839.49
+1994-12-27,3833.43,3882.21,3832.08,3861.69,211180000,3861.69
+1994-12-23,3814.92,3860.01,3808.53,3833.43,196540000,3833.43
+1994-12-22,3801.80,3850.59,3780.61,3814.92,339670000,3814.92
+1994-12-21,3767.15,3836.46,3761.77,3801.80,378790000,3801.80
+1994-12-20,3790.70,3807.19,3752.35,3767.15,325510000,3767.15
+1994-12-19,3807.19,3815.26,3764.46,3790.70,271850000,3790.70
+1994-12-16,3765.47,3817.95,3758.07,3807.19,481860000,3807.19
+1994-12-15,3746.29,3794.07,3729.13,3765.47,332790000,3765.47
+1994-12-14,3715.34,3772.20,3700.53,3746.29,355000000,3746.29
+1994-12-13,3718.37,3749.32,3690.78,3715.34,307110000,3715.34
+1994-12-12,3691.11,3734.52,3667.90,3718.37,285730000,3718.37
+1994-12-09,3685.73,3713.32,3638.97,3691.11,336440000,3691.11
+1994-12-08,3735.52,3757.39,3670.25,3685.73,362280000,3685.73
+1994-12-07,3745.95,3758.07,3700.87,3735.52,283490000,3735.52
+1994-12-06,3741.92,3762.10,3703.56,3745.95,298890000,3745.95
+1994-12-05,3745.62,3779.93,3715.67,3741.92,258480000,3741.92
+1994-12-02,3700.87,3755.04,3680.68,3745.62,284740000,3745.62
+1994-12-01,3739.23,3755.37,3680.68,3700.87,285920000,3700.87
+1994-11-30,3738.55,3783.30,3718.37,3739.23,300800000,3739.23
+1994-11-29,3739.56,3755.04,3703.90,3738.55,286580000,3738.55
+1994-11-28,3708.27,3759.41,3693.13,3739.56,265020000,3739.56
+1994-11-25,3675.97,3722.40,3675.97,3708.27,118290000,3708.27
+1994-11-23,3677.99,3704.91,3612.05,3674.63,430730000,3674.63
+1994-11-22,3769.51,3787.34,3669.58,3677.99,387270000,3677.99
+1994-11-21,3815.26,3845.20,3758.74,3769.51,293030000,3769.51
+1994-11-18,3828.05,3844.87,3773.21,3815.26,356730000,3815.26
+1994-11-17,3845.20,3868.08,3797.77,3828.05,323190000,3828.05
+1994-11-16,3826.36,3864.38,3803.82,3845.20,296980000,3845.20
+1994-11-15,3829.73,3871.45,3794.40,3826.36,336330000,3826.36
+1994-11-14,3801.47,3849.91,3795.07,3829.73,260380000,3829.73
+1994-11-11,3821.99,3830.06,3779.93,3801.47,220800000,3801.47
+1994-11-10,3831.75,3873.47,3821.99,3821.99,280910000,3821.99
+1994-11-09,3830.74,3882.89,3798.44,3831.75,341500000,3831.75
+1994-11-08,3808.87,3857.65,3798.75,3830.74,290860000,3830.74
+1994-11-07,3807.52,3830.40,3781.62,3808.87,255030000,3808.87
+1994-11-04,3845.88,3879.52,3802.81,3807.52,280560000,3807.52
+1994-11-03,3837.13,3872.46,3814.25,3845.88,284480000,3845.88
+1994-11-02,3863.37,3888.94,3820.31,3837.13,331360000,3837.13
+1994-11-01,3908.12,3919.90,3836.79,3863.37,314940000,3863.37
+1994-10-31,3930.66,3956.90,3889.28,3908.12,302810000,3908.12
+1994-10-28,3875.15,3953.54,3863.37,3930.66,381450000,3930.66
+1994-10-27,3848.23,3893.99,3834.44,3875.15,327790000,3875.15
+1994-10-26,3850.59,3891.97,3816.61,3848.23,322560000,3848.23
+1994-10-25,3855.30,3883.56,3803.49,3850.59,326100000,3850.59
+1994-10-24,3891.30,3925.61,3840.16,3855.30,282800000,3855.30
+1994-10-21,3911.15,3921.58,3861.35,3891.30,309410000,3891.30
+1994-10-20,3936.04,3954.89,3873.13,3911.15,326100000,3911.15
+1994-10-19,3917.54,3958.25,3887.93,3936.04,317030000,3936.04
+1994-10-18,3923.93,3945.46,3892.64,3917.54,259730000,3917.54
+1994-10-17,3910.47,3949.84,3883.22,3923.93,238490000,3923.93
+1994-10-14,3889.95,3927.97,3862.03,3910.47,251770000,3910.47
+1994-10-13,3878.18,3944.12,3878.18,3889.95,337900000,3889.95
+1994-10-12,3876.83,3903.07,3844.87,3875.15,269550000,3875.15
+1994-10-11,3828.96,3898.36,3828.96,3876.83,355540000,3876.83
+1994-10-10,3797.43,3843.19,3789.36,3821.32,213110000,3821.32
+1994-10-07,3775.56,3826.03,3754.37,3797.43,284230000,3797.43
+1994-10-06,3787.34,3810.89,3752.01,3775.56,272620000,3775.56
+1994-10-05,3801.13,3811.56,3736.20,3787.34,359670000,3787.34
+1994-10-04,3846.89,3873.47,3788.35,3801.13,325620000,3801.13
+1994-10-03,3843.19,3872.79,3809.21,3846.89,269130000,3846.89
+1994-09-30,3854.63,3891.30,3825.69,3843.19,292060000,3843.19
+1994-09-29,3878.18,3892.64,3834.78,3854.63,302280000,3854.63
+1994-09-28,3863.04,3904.76,3854.29,3878.18,330020000,3878.18
+1994-09-27,3849.24,3891.63,3828.72,3863.04,290330000,3863.04
+1994-09-26,3831.75,3869.43,3804.50,3849.24,272530000,3849.24
+1994-09-23,3837.13,3872.46,3806.51,3831.75,300060000,3831.75
+1994-09-22,3851.60,3882.55,3818.29,3837.13,305210000,3837.13
+1994-09-21,3869.09,3886.92,3806.85,3851.60,355330000,3851.60
+1994-09-20,3932.01,3932.01,3859.67,3869.09,326050000,3869.09
+1994-09-19,3933.35,3972.72,3909.80,3936.72,272920000,3936.72
+1994-09-16,3953.88,3955.22,3894.66,3933.35,410750000,3933.35
+1994-09-15,3895.33,3959.93,3883.90,3953.88,281890000,3953.88
+1994-09-14,3879.86,3918.55,3856.64,3895.33,297480000,3895.33
+1994-09-13,3860.34,3905.76,3854.29,3879.86,293370000,3879.86
+1994-09-12,3874.81,3897.02,3843.86,3860.34,244680000,3860.34
+1994-09-09,3902.06,3902.06,3844.20,3874.81,293330000,3874.81
+1994-09-08,3886.25,3926.96,3872.46,3908.46,295010000,3908.46
+1994-09-07,3898.70,3920.90,3860.68,3886.25,292110000,3886.25
+1994-09-06,3885.58,3918.55,3860.01,3898.70,199670000,3898.70
+1994-09-02,3901.44,3928.64,3871.98,3885.58,216150000,3885.58
+1994-09-01,3913.42,3927.99,3871.66,3901.44,285670000,3901.44
+1994-08-31,3917.30,3954.54,3878.78,3913.42,354650000,3913.42
+1994-08-30,3898.85,3934.14,3875.87,3917.30,294520000,3917.30
+1994-08-29,3881.05,3927.34,3869.39,3898.85,266080000,3898.85
+1994-08-26,3836.69,3903.38,3836.69,3881.05,305120000,3881.05
+1994-08-25,3846.73,3872.63,3810.47,3829.89,284200000,3829.89
+1994-08-24,3775.83,3852.56,3767.41,3846.73,309780000,3846.73
+1994-08-23,3751.22,3804.64,3745.07,3775.83,307240000,3775.83
+1994-08-22,3755.11,3771.94,3722.41,3751.22,235870000,3751.22
+1994-08-19,3755.43,3785.22,3727.59,3755.11,276630000,3755.11
+1994-08-18,3776.48,3793.63,3736.98,3755.43,287330000,3755.43
+1994-08-17,3784.57,3812.09,3754.46,3776.48,309250000,3776.48
+1994-08-16,3760.29,3804.64,3732.45,3784.57,306640000,3784.57
+1994-08-15,3768.71,3798.17,3742.16,3760.29,223210000,3760.29
+1994-08-12,3750.90,3792.66,3738.27,3768.71,249270000,3768.71
+1994-08-11,3766.76,3785.86,3728.56,3750.90,275690000,3750.90
+1994-08-10,3755.76,3793.97,3738.27,3766.76,279470000,3766.76
+1994-08-09,3753.81,3773.89,3728.56,3755.76,259130000,3755.76
+1994-08-08,3747.02,3780.68,3732.77,3753.81,217670000,3753.81
+1994-08-05,3765.79,3769.68,3725.00,3747.02,230270000,3747.02
+1994-08-04,3792.66,3807.23,3752.52,3765.79,289150000,3765.79
+1994-08-03,3796.22,3815.00,3762.88,3792.66,283840000,3792.66
+1994-08-02,3798.17,3829.25,3776.48,3796.22,294740000,3796.22
+1994-08-01,3764.50,3809.50,3749.28,3798.17,258180000,3798.17
+1994-07-29,3730.83,3782.63,3726.30,3764.50,269560000,3764.50
+1994-07-28,3720.47,3757.05,3701.69,3730.83,247560000,3730.83
+1994-07-27,3735.68,3753.17,3693.27,3720.47,251680000,3720.47
+1994-07-26,3741.84,3764.50,3706.22,3735.68,232670000,3735.68
+1994-07-25,3735.04,3762.56,3713.67,3741.84,213470000,3741.84
+1994-07-22,3732.45,3765.15,3707.19,3735.04,261090000,3735.04
+1994-07-21,3727.27,3763.20,3684.86,3732.45,292080000,3732.45
+1994-07-20,3748.31,3763.85,3706.22,3727.27,267740000,3727.27
+1994-07-19,3755.43,3777.45,3726.30,3748.31,251530000,3748.31
+1994-07-18,3753.81,3779.39,3725.00,3755.43,227480000,3755.43
+1994-07-15,3739.25,3769.35,3712.37,3753.81,275860000,3753.81
+1994-07-14,3704.28,3763.53,3697.48,3739.25,319950000,3739.25
+1994-07-13,3702.66,3738.27,3683.89,3704.28,265840000,3704.28
+1994-07-12,3702.99,3725.32,3660.90,3702.66,252250000,3702.66
+1994-07-11,3709.14,3735.36,3671.26,3702.99,222580000,3702.99
+1994-07-08,3688.42,3728.56,3660.90,3709.14,236520000,3709.14
+1994-07-07,3674.50,3714.32,3656.04,3688.42,258500000,3688.42
+1994-07-06,3652.48,3698.13,3631.11,3674.50,233640000,3674.50
+1994-07-05,3646.65,3680.65,3621.73,3652.48,193030000,3652.48
+1994-07-01,3624.96,3675.79,3611.04,3646.65,199030000,3646.65
+1994-06-30,3667.05,3683.56,3610.72,3624.96,294110000,3624.96
+1994-06-29,3669.64,3711.73,3645.68,3667.05,263890000,3667.05
+1994-06-28,3685.50,3705.58,3630.47,3669.64,265880000,3669.64
+1994-06-27,3636.94,3694.89,3603.92,3685.50,250110000,3685.50
+1994-06-24,3699.09,3704.80,3616.65,3636.94,261260000,3636.94
+1994-06-23,3724.77,3752.04,3685.14,3699.09,256480000,3699.09
+1994-06-22,3707.97,3748.87,3694.65,3724.77,251110000,3724.77
+1994-06-21,3741.90,3756.80,3674.68,3707.97,298730000,3707.97
+1994-06-20,3771.07,3771.07,3716.21,3741.90,229520000,3741.90
+1994-06-17,3811.34,3821.48,3764.09,3776.78,373400000,3776.78
+1994-06-16,3790.41,3830.68,3771.39,3811.34,254880000,3811.34
+1994-06-15,3814.83,3838.29,3772.02,3790.41,269740000,3790.41
+1994-06-14,3783.12,3839.88,3769.17,3814.83,288550000,3814.83
+1994-06-13,3773.45,3808.17,3741.26,3783.12,242810000,3783.12
+1994-06-10,3753.14,3798.68,3739.60,3773.45,222480000,3773.45
+1994-06-09,3749.45,3776.83,3721.45,3753.14,252870000,3753.14
+1994-06-08,3755.91,3780.83,3721.45,3749.45,256000000,3749.45
+1994-06-07,3768.52,3788.52,3733.14,3755.91,234680000,3755.91
+1994-06-06,3772.22,3812.83,3749.75,3768.52,259080000,3768.52
+1994-06-03,3758.99,3792.22,3732.52,3772.22,271490000,3772.22
+1994-06-02,3760.83,3791.60,3732.83,3758.99,271150000,3758.99
+1994-06-01,3758.37,3785.14,3717.76,3760.83,279910000,3760.83
+1994-05-31,3757.14,3783.29,3725.45,3758.37,216700000,3758.37
+1994-05-27,3753.46,3772.18,3723.68,3757.14,186430000,3757.14
+1994-05-26,3755.30,3785.07,3722.76,3753.46,255740000,3753.46
+1994-05-25,3745.17,3768.19,3710.79,3755.30,254410000,3755.30
+1994-05-24,3742.41,3786.30,3707.11,3745.17,280040000,3745.17
+1994-05-23,3766.35,3770.65,3711.40,3742.41,249390000,3742.41
+1994-05-20,3758.98,3788.76,3721.84,3766.35,295180000,3766.35
+1994-05-19,3732.89,3782.92,3707.72,3758.98,303680000,3758.98
+1994-05-18,3720.61,3761.74,3683.16,3732.89,339280000,3732.89
+1994-05-17,3671.50,3735.04,3653.70,3720.61,311280000,3720.61
+1994-05-16,3659.68,3694.21,3628.52,3671.50,234680000,3671.50
+1994-05-13,3652.84,3690.32,3626.37,3659.68,252070000,3659.68
+1994-05-12,3629.04,3682.58,3624.58,3652.84,272770000,3652.84
+1994-05-11,3656.41,3678.42,3609.71,3629.04,277400000,3629.04
+1994-05-10,3629.04,3684.67,3627.56,3656.41,297660000,3656.41
+1994-05-09,3669.50,3676.93,3612.39,3629.04,250870000,3629.04
+1994-05-06,3695.97,3702.51,3625.77,3669.50,291910000,3669.50
+1994-05-05,3697.75,3731.07,3675.45,3695.97,255690000,3695.97
+1994-05-04,3714.41,3730.17,3670.09,3697.75,267940000,3697.75
+1994-05-03,3701.02,3736.12,3669.79,3714.41,288270000,3714.41
+1994-05-02,3681.69,3734.04,3648.97,3701.02,296130000,3701.02
+1994-04-29,3668.31,3707.87,3642.13,3681.69,293970000,3681.69
+1994-04-28,3699.54,3723.93,3640.35,3668.31,325200000,3668.31
+1994-04-26,3705.78,3733.15,3669.79,3699.54,288110000,3699.54
+1994-04-25,3648.68,3721.25,3635.29,3705.78,262220000,3705.78
+1994-04-22,3652.54,3690.32,3621.01,3648.68,295710000,3648.68
+1994-04-21,3598.71,3673.96,3582.94,3652.54,378760000,3652.54
+1994-04-20,3619.82,3662.66,3546.65,3598.71,366540000,3598.71
+1994-04-19,3620.42,3670.39,3567.18,3619.82,323280000,3619.82
+1994-04-18,3661.47,3679.61,3593.35,3620.42,271450000,3620.42
+1994-04-15,3663.25,3699.24,3631.13,3661.47,309550000,3661.47
+1994-04-14,3661.47,3693.59,3625.77,3663.25,275130000,3663.25
+1994-04-13,3681.69,3704.30,3616.85,3661.47,278030000,3661.47
+1994-04-12,3688.83,3722.14,3661.17,3681.69,256250000,3681.69
+1994-04-11,3674.26,3720.66,3651.35,3688.83,243180000,3688.83
+1994-04-08,3693.26,3717.15,3644.03,3674.26,264090000,3674.26
+1994-04-07,3679.73,3712.83,3642.59,3693.26,289280000,3693.26
+1994-04-06,3675.41,3722.34,3643.16,3679.73,302000000,3679.73
+1994-04-05,3625.02,3698.15,3625.02,3675.41,366890000,3675.41
+1994-04-04,3633.08,3633.08,3520.80,3593.35,344390000,3593.35
+1994-03-31,3626.75,3673.10,3544.12,3635.96,403580000,3635.96
+1994-03-30,3699.02,3718.88,3612.36,3626.75,390520000,3626.75
+1994-03-29,3762.35,3771.86,3689.23,3699.02,301630000,3699.02
+1994-03-28,3774.73,3793.45,3719.74,3762.35,287360000,3762.35
+1994-03-25,3821.09,3845.85,3764.66,3774.73,249670000,3774.73
+1994-03-24,3865.42,3865.42,3792.58,3821.09,303800000,3821.09
+1994-03-23,3862.55,3901.41,3839.80,3869.46,284600000,3869.46
+1994-03-22,3864.85,3896.23,3840.66,3862.55,283090000,3862.55
+1994-03-21,3895.65,3898.25,3838.65,3864.85,247390000,3864.85
+1994-03-18,3865.14,3911.78,3838.65,3895.65,462240000,3895.65
+1994-03-17,3848.15,3891.34,3821.66,3865.14,303950000,3865.14
+1994-03-16,3849.59,3879.53,3819.94,3848.15,306820000,3848.15
+1994-03-15,3862.98,3888.46,3826.85,3849.59,329260000,3849.59
+1994-03-14,3862.70,3894.21,3835.96,3862.98,260160000,3862.98
+1994-03-11,3830.62,3872.83,3806.69,3862.70,303250000,3862.70
+1994-03-10,3853.41,3865.51,3801.63,3830.62,369370000,3830.62
+1994-03-09,3851.72,3874.52,3817.95,3853.41,309810000,3853.41
+1994-03-08,3856.22,3881.55,3822.45,3851.72,298110000,3851.72
+1994-03-07,3832.30,3882.40,3824.71,3856.22,285580000,3856.22
+1994-03-04,3824.42,3868.04,3800.50,3832.30,311850000,3832.30
+1994-03-03,3831.74,3862.13,3784.74,3824.42,291960000,3824.42
+1994-03-02,3809.23,3845.25,3741.69,3831.74,361130000,3831.74
+1994-03-01,3832.02,3848.34,3772.93,3809.23,304450000,3809.23
+1994-02-28,3838.78,3874.52,3817.95,3832.02,267610000,3832.02
+1994-02-25,3839.90,3868.89,3811.76,3838.78,273680000,3838.78
+1994-02-24,3891.68,3895.62,3823.86,3839.90,342940000,3839.90
+1994-02-23,3911.66,3931.36,3872.83,3891.68,309910000,3891.68
+1994-02-22,3887.46,3928.83,3873.39,3911.66,270900000,3911.66
+1994-02-18,3922.64,3931.92,3869.73,3887.46,293210000,3887.46
+1994-02-17,3937.27,3975.82,3894.21,3922.64,340030000,3922.64
+1994-02-16,3928.27,3964.85,3906.32,3937.27,295450000,3937.27
+1994-02-15,3904.06,3950.50,3891.40,3928.27,306790000,3928.27
+1994-02-14,3894.78,3935.86,3873.67,3904.06,263190000,3904.06
+1994-02-11,3895.34,3920.95,3855.94,3894.78,213740000,3894.78
+1994-02-10,3931.92,3953.59,3882.96,3895.34,327250000,3895.34
+1994-02-09,3906.03,3956.97,3887.74,3931.92,332670000,3931.92
+1994-02-08,3906.32,3951.34,3873.67,3906.03,318180000,3906.03
+1994-02-07,3871.42,3923.48,3840.75,3906.32,348270000,3906.32
+1994-02-04,3967.66,3979.76,3857.63,3871.42,378380000,3871.42
+1994-02-03,3975.54,3995.52,3932.77,3967.66,318350000,3967.66
+1994-02-02,3964.01,3997.78,3937.27,3975.54,328960000,3975.54
+1994-02-01,3978.36,3998.06,3938.12,3964.01,322510000,3964.01
+1994-01-31,3945.43,4002.84,3937.27,3978.36,322870000,3978.36
+1994-01-28,3926.30,3971.89,3919.54,3945.43,313140000,3945.43
+1994-01-27,3908.00,3951.34,3876.77,3926.30,346500000,3926.30
+1994-01-26,3895.34,3934.74,3863.82,3908.00,304660000,3908.00
+1994-01-25,3912.79,3937.55,3863.82,3895.34,326120000,3895.34
+1994-01-24,3914.48,3947.68,3882.11,3912.79,296900000,3912.79
+1994-01-21,3891.96,3933.33,3875.36,3914.48,346220000,3914.48
+1994-01-20,3884.37,3915.60,3857.91,3891.96,310450000,3891.96
+1994-01-19,3870.29,3909.97,3839.34,3884.37,311370000,3884.37
+1994-01-18,3870.29,3905.19,3840.75,3870.29,309730000,3870.29
+1994-01-17,3867.20,3896.75,3833.71,3870.29,233980000,3870.29
+1994-01-14,3842.43,3891.96,3830.62,3867.20,304910000,3867.20
+1994-01-13,3848.63,3864.67,3808.38,3842.43,277970000,3842.43
+1994-01-12,3850.31,3876.49,3809.79,3848.63,310690000,3848.63
+1994-01-11,3865.51,3885.21,3823.02,3850.31,305490000,3850.31
+1994-01-10,3820.77,3874.52,3804.72,3865.51,319490000,3865.51
+1994-01-07,3803.88,3842.15,3778.83,3820.77,324920000,3820.77
+1994-01-06,3798.82,3843.84,3771.52,3803.88,367880000,3803.88
+1994-01-05,3783.90,3821.33,3750.41,3798.82,400030000,3798.82
+1994-01-04,3756.60,3798.25,3718.89,3783.90,326600000,3783.90
+1994-01-03,3754.09,3790.70,3715.24,3756.60,270140000,3756.60
+1993-12-31,3775.88,3804.11,3745.15,3754.09,168590000,3754.09
+1993-12-30,3794.33,3806.34,3759.96,3775.88,195860000,3775.88
+1993-12-29,3793.77,3818.92,3764.43,3794.33,269570000,3794.33
+1993-12-28,3792.93,3813.33,3766.10,3793.77,200960000,3793.77
+1993-12-27,3757.72,3804.95,3750.46,3792.93,171200000,3792.93
+1993-12-23,3762.19,3791.81,3739.56,3757.72,227240000,3757.72
+1993-12-22,3745.15,3780.64,3725.86,3762.19,272440000,3762.19
+1993-12-21,3755.21,3774.77,3719.72,3745.15,273370000,3745.15
+1993-12-20,3751.57,3777.84,3728.66,3755.21,255900000,3755.21
+1993-12-17,3726.14,3768.90,3706.30,3751.57,363750000,3751.57
+1993-12-16,3716.92,3756.60,3694.29,3726.14,284620000,3726.14
+1993-12-15,3742.63,3776.44,3689.82,3716.92,331770000,3716.92
+1993-12-14,3764.43,3785.94,3726.70,3742.63,275050000,3742.63
+1993-12-13,3740.67,3780.64,3711.33,3764.43,256580000,3764.43
+1993-12-10,3729.78,3758.84,3704.91,3740.67,245620000,3740.67
+1993-12-09,3734.53,3764.43,3709.94,3729.78,287570000,3729.78
+1993-12-08,3718.88,3756.60,3693.73,3734.53,314460000,3734.53
+1993-12-07,3710.21,3746.82,3689.26,3718.88,285690000,3718.88
+1993-12-06,3704.07,3738.44,3687.30,3710.21,292370000,3710.21
+1993-12-03,3702.11,3726.98,3677.80,3704.07,268780000,3704.07
+1993-12-02,3697.08,3725.30,3674.17,3702.11,256370000,3702.11
+1993-12-01,3683.95,3731.73,3673.33,3697.08,293870000,3697.08
+1993-11-30,3677.80,3713.57,3654.88,3683.95,290250000,3683.95
+1993-11-29,3683.95,3721.67,3654.33,3677.80,272710000,3677.80
+1993-11-26,3687.58,3703.23,3660.75,3683.95,90220000,3683.95
+1993-11-24,3674.17,3709.94,3654.33,3687.58,230630000,3687.58
+1993-11-23,3670.25,3702.67,3649.57,3674.17,261590000,3674.17
+1993-11-22,3694.01,3697.92,3627.78,3670.25,280130000,3670.25
+1993-11-19,3685.34,3711.05,3640.07,3694.01,302970000,3694.01
+1993-11-18,3704.35,3721.95,3649.57,3685.34,313480000,3685.34
+1993-11-17,3710.77,3749.90,3660.19,3704.35,319560000,3704.35
+1993-11-16,3677.52,3723.91,3653.77,3710.77,303980000,3710.77
+1993-11-15,3684.51,3705.74,3653.49,3677.52,251030000,3677.52
+1993-11-12,3662.43,3707.42,3648.74,3684.51,326240000,3684.51
+1993-11-11,3663.55,3700.43,3638.40,3662.43,287110000,3662.43
+1993-11-10,3640.07,3683.39,3616.60,3663.55,283450000,3663.55
+1993-11-09,3647.90,3689.82,3623.03,3640.07,278290000,3640.07
+1993-11-08,3643.43,3674.17,3621.91,3647.90,232340000,3647.90
+1993-11-05,3624.98,3663.83,3585.86,3643.43,336900000,3643.43
+1993-11-04,3661.87,3681.99,3609.61,3624.98,323430000,3624.98
+1993-11-03,3697.64,3714.69,3638.40,3661.87,342110000,3661.87
+1993-11-02,3692.61,3724.75,3656.00,3697.64,304780000,3697.64
+1993-11-01,3680.59,3708.26,3656.84,3692.61,256030000,3692.61
+1993-10-29,3687.86,3712.45,3656.84,3680.59,270570000,3680.59
+1993-10-28,3664.66,3713.57,3657.96,3687.86,301220000,3687.86
+1993-10-27,3672.49,3692.33,3634.76,3664.66,279830000,3664.66
+1993-10-26,3673.61,3701.55,3636.16,3672.49,284530000,3672.49
+1993-10-25,3649.30,3694.01,3618.28,3673.61,260310000,3673.61
+1993-10-22,3636.16,3697.92,3612.13,3649.30,301440000,3649.30
+1993-10-21,3645.10,3678.36,3610.45,3636.16,288820000,3636.16
+1993-10-20,3635.32,3667.74,3611.85,3645.10,305670000,3645.10
+1993-10-19,3642.31,3669.97,3601.79,3635.32,304400000,3635.32
+1993-10-18,3629.73,3675.84,3595.92,3642.31,329570000,3642.31
+1993-10-15,3621.63,3664.66,3596.20,3629.73,366110000,3629.73
+1993-10-14,3603.19,3652.09,3574.40,3621.63,353820000,3621.63
+1993-10-13,3593.13,3628.34,3574.12,3603.19,290930000,3603.19
+1993-10-12,3593.41,3619.39,3575.24,3593.13,263970000,3593.13
+1993-10-11,3584.74,3611.01,3565.46,3593.41,183190000,3593.41
+1993-10-08,3583.63,3610.45,3550.37,3584.74,243590000,3584.74
+1993-10-07,3598.99,3616.32,3564.90,3583.63,255210000,3583.63
+1993-10-06,3587.26,3620.79,3570.21,3598.99,277070000,3598.99
+1993-10-05,3577.76,3616.88,3553.72,3587.26,294570000,3587.26
+1993-10-04,3581.11,3603.19,3550.65,3577.76,229380000,3577.76
+1993-10-01,3555.12,3605.14,3541.71,3581.11,256870000,3581.11
+1993-09-30,3566.30,3583.63,3528.57,3555.12,282740000,3555.12
+1993-09-29,3566.02,3596.48,3538.91,3566.30,277690000,3566.30
+1993-09-28,3567.70,3589.49,3542.27,3566.02,243320000,3566.02
+1993-09-27,3543.11,3589.49,3539.47,3567.70,244920000,3567.70
+1993-09-24,3539.75,3568.54,3507.90,3543.11,248270000,3543.11
+1993-09-23,3547.02,3567.70,3513.48,3539.75,276660000,3539.75
+1993-09-22,3537.24,3577.20,3516.56,3547.02,288960000,3547.02
+1993-09-21,3575.80,3592.57,3501.47,3537.24,301740000,3537.24
+1993-09-20,3613.25,3632.81,3567.98,3575.80,228040000,3575.80
+1993-09-17,3630.85,3637.28,3580.83,3613.25,369600000,3613.25
+1993-09-16,3633.65,3651.25,3601.79,3630.85,229700000,3630.85
+1993-09-15,3615.76,3644.82,3573.84,3633.65,294410000,3633.65
+1993-09-14,3634.21,3639.51,3590.61,3615.76,258620000,3615.76
+1993-09-13,3621.63,3655.16,3607.66,3634.21,244970000,3634.21
+1993-09-10,3589.49,3636.16,3576.64,3621.63,269950000,3621.63
+1993-09-09,3588.93,3616.04,3556.52,3589.49,258070000,3589.49
+1993-09-08,3607.10,3623.31,3561.27,3588.93,283100000,3588.93
+1993-09-07,3633.93,3649.02,3592.57,3607.10,229500000,3607.10
+1993-09-03,3626.10,3651.53,3603.75,3633.93,197160000,3633.93
+1993-09-02,3645.10,3660.19,3610.17,3626.10,259870000,3626.10
+1993-09-01,3651.25,3665.50,3619.67,3645.10,245040000,3645.10
+1993-08-31,3643.99,3662.99,3619.67,3651.25,252830000,3651.25
+1993-08-30,3640.63,3667.46,3621.63,3643.99,194180000,3643.99
+1993-08-27,3648.18,3656.28,3606.54,3640.63,196140000,3640.63
+1993-08-26,3652.09,3681.71,3620.23,3648.18,247800000,3648.18
+1993-08-25,3638.96,3674.17,3620.51,3652.09,301640000,3652.09
+1993-08-24,3605.98,3648.18,3590.89,3638.96,270700000,3638.96
+1993-08-23,3615.48,3630.57,3578.87,3605.98,212500000,3605.98
+1993-08-20,3612.13,3633.37,3580.55,3615.48,276800000,3615.48
+1993-08-19,3604.86,3632.25,3581.11,3612.13,293330000,3612.13
+1993-08-18,3586.98,3638.96,3577.48,3604.86,312940000,3604.86
+1993-08-17,3579.15,3611.29,3554.00,3586.98,261320000,3586.98
+1993-08-16,3569.65,3606.54,3547.86,3579.15,229190000,3579.15
+1993-08-13,3569.09,3594.52,3547.58,3569.65,214370000,3569.65
+1993-08-12,3583.35,3607.66,3537.24,3569.09,278530000,3569.09
+1993-08-11,3572.73,3607.94,3550.93,3583.35,268330000,3583.35
+1993-08-10,3576.08,3599.83,3547.02,3572.73,255520000,3572.73
+1993-08-09,3560.43,3599.83,3541.15,3576.08,232750000,3576.08
+1993-08-06,3548.97,3583.35,3536.12,3560.43,221150000,3560.43
+1993-08-05,3552.05,3574.12,3523.54,3548.97,249650000,3548.97
+1993-08-04,3561.27,3579.99,3530.25,3552.05,230040000,3552.05
+1993-08-03,3560.99,3588.10,3530.81,3561.27,254540000,3561.27
+1993-08-02,3539.47,3578.32,3524.94,3560.99,230380000,3560.99
+1993-07-30,3567.42,3581.11,3515.72,3539.47,254420000,3539.47
+1993-07-29,3553.45,3593.41,3531.37,3567.42,261240000,3567.42
+1993-07-28,3565.46,3588.38,3524.38,3553.45,270530000,3553.45
+1993-07-27,3567.70,3604.86,3533.60,3565.46,256750000,3565.46
+1993-07-26,3546.74,3584.74,3541.43,3567.70,223280000,3567.70
+1993-07-23,3525.22,3569.37,3508.17,3546.74,222170000,3546.74
+1993-07-22,3555.40,3566.86,3514.32,3525.22,249630000,3525.22
+1993-07-21,3544.78,3573.84,3516.84,3555.40,278590000,3555.40
+1993-07-20,3535.28,3567.98,3500.63,3544.78,275130000,3544.78
+1993-07-19,3528.29,3563.23,3502.87,3535.28,216370000,3535.28
+1993-07-16,3550.93,3571.61,3505.94,3528.29,263100000,3528.29
+1993-07-15,3542.55,3573.01,3509.85,3550.93,277810000,3550.93
+1993-07-14,3515.44,3562.39,3507.34,3542.55,285890000,3542.55
+1993-07-13,3524.38,3544.22,3491.13,3515.44,236720000,3515.44
+1993-07-12,3521.06,3545.97,3495.04,3524.38,202310000,3524.38
+1993-07-09,3514.42,3544.03,3490.89,3521.06,235210000,3521.06
+1993-07-08,3475.67,3532.41,3462.38,3514.42,282910000,3514.42
+1993-07-07,3449.93,3495.32,3443.28,3475.67,253170000,3475.67
+1993-07-06,3483.97,3502.52,3443.28,3449.93,233420000,3449.93
+1993-07-02,3510.54,3511.65,3468.47,3483.97,220750000,3483.97
+1993-07-01,3516.08,3542.10,3487.29,3510.54,292040000,3510.54
+1993-06-30,3518.85,3543.48,3493.11,3516.08,281120000,3516.08
+1993-06-29,3530.20,3544.87,3491.44,3518.85,276310000,3518.85
+1993-06-28,3490.89,3542.10,3486.74,3530.20,242090000,3530.20
+1993-06-25,3490.61,3512.76,3473.18,3490.89,210430000,3490.89
+1993-06-24,3466.81,3504.73,3449.10,3490.61,267450000,3490.61
+1993-06-23,3497.53,3514.14,3445.77,3466.81,278260000,3466.81
+1993-06-22,3510.82,3530.47,3474.28,3497.53,259530000,3497.53
+1993-06-21,3494.77,3531.86,3477.05,3510.82,223650000,3510.82
+1993-06-18,3521.89,3539.88,3478.44,3494.77,300500000,3494.77
+1993-06-17,3511.65,3539.61,3488.68,3521.89,239810000,3521.89
+1993-06-16,3492.00,3527.43,3460.17,3511.65,264500000,3511.65
+1993-06-15,3514.69,3531.86,3471.24,3492.00,234110000,3492.00
+1993-06-14,3505.01,3538.22,3486.74,3514.69,210440000,3514.69
+1993-06-11,3491.72,3536.01,3479.27,3505.01,255200000,3505.01
+1993-06-10,3511.93,3538.22,3461.83,3491.72,231760000,3491.72
+1993-06-09,3510.54,3541.54,3490.89,3511.93,249030000,3511.93
+1993-06-08,3532.13,3543.48,3494.21,3510.54,238170000,3510.54
+1993-06-07,3545.14,3570.33,3510.82,3532.13,236930000,3532.13
+1993-06-04,3544.87,3563.13,3516.63,3545.14,226440000,3545.14
+1993-06-03,3553.45,3569.50,3516.08,3544.87,285770000,3544.87
+1993-06-02,3552.34,3576.14,3530.47,3553.45,287120000,3553.45
+1993-06-01,3527.43,3577.25,3518.02,3552.34,229690000,3552.34
+1993-05-28,3554.83,3563.41,3503.62,3527.43,207820000,3527.43
+1993-05-27,3540.16,3582.23,3523.28,3554.83,300810000,3554.83
+1993-05-26,3516.63,3558.98,3498.64,3540.16,274230000,3540.16
+1993-05-25,3507.78,3534.35,3486.46,3516.63,222090000,3516.63
+1993-05-24,3492.83,3526.60,3472.35,3507.78,197990000,3507.78
+1993-05-21,3523.28,3532.96,3468.47,3492.83,279120000,3492.83
+1993-05-20,3500.03,3539.88,3475.39,3523.28,289160000,3523.28
+1993-05-19,3444.39,3511.10,3405.09,3500.03,342420000,3500.03
+1993-05-18,3449.93,3468.47,3409.79,3444.39,264300000,3444.39
+1993-05-17,3443.01,3465.98,3421.42,3449.93,227580000,3449.93
+1993-05-14,3447.99,3472.62,3421.14,3443.01,252910000,3443.01
+1993-05-13,3482.31,3486.74,3428.89,3447.99,289860000,3447.99
+1993-05-12,3468.75,3501.69,3441.07,3482.31,255680000,3482.31
+1993-05-11,3443.28,3481.76,3421.42,3468.75,218480000,3468.75
+1993-05-10,3437.19,3485.36,3420.31,3443.28,235580000,3443.28
+1993-05-07,3441.90,3468.47,3413.67,3437.19,223570000,3437.19
+1993-05-06,3449.10,3475.67,3418.93,3441.90,255460000,3441.90
+1993-05-05,3446.19,3478.44,3420.86,3449.10,270960000,3449.10
+1993-05-04,3446.46,3477.26,3424.04,3446.19,268310000,3446.19
+1993-05-03,3427.55,3462.94,3402.42,3446.46,220860000,3446.46
+1993-04-30,3425.12,3466.18,3405.39,3427.55,247460000,3427.55
+1993-04-29,3413.50,3444.57,3377.57,3425.12,249760000,3425.12
+1993-04-28,3415.93,3445.65,3372.16,3413.50,267980000,3413.50
+1993-04-27,3398.37,3433.76,3364.06,3415.93,284140000,3415.93
+1993-04-26,3413.77,3442.14,3369.46,3398.37,281180000,3398.37
+1993-04-23,3429.17,3448.08,3385.67,3413.77,259810000,3413.77
+1993-04-22,3439.44,3488.33,3399.99,3429.17,310390000,3429.17
+1993-04-21,3443.49,3480.77,3401.34,3439.44,287300000,3439.44
+1993-04-20,3466.99,3486.71,3400.26,3443.49,317990000,3443.49
+1993-04-19,3478.61,3499.41,3436.73,3466.99,244710000,3466.99
+1993-04-16,3455.92,3498.60,3437.54,3478.61,305160000,3478.61
+1993-04-15,3455.64,3484.28,3419.17,3455.92,259500000,3455.92
+1993-04-14,3444.03,3482.93,3424.85,3455.64,257340000,3455.64
+1993-04-13,3428.09,3469.42,3408.37,3444.03,286690000,3444.03
+1993-04-12,3396.48,3452.67,3391.08,3428.09,259610000,3428.09
+1993-04-08,3397.02,3429.44,3357.58,3396.48,282470000,3396.48
+1993-04-07,3377.57,3417.55,3355.41,3397.02,296290000,3397.02
+1993-04-06,3379.19,3417.55,3339.75,3377.57,289640000,3377.57
+1993-04-05,3370.81,3411.61,3338.39,3379.19,238630000,3379.19
+1993-04-02,3439.44,3439.44,3344.88,3370.81,323330000,3370.81
+1993-04-01,3435.11,3466.45,3419.98,3439.44,231950000,3439.44
+1993-03-31,3457.27,3484.82,3424.85,3435.11,275710000,3435.11
+1993-03-30,3455.10,3481.58,3422.14,3457.27,233330000,3457.27
+1993-03-29,3439.98,3487.52,3431.87,3455.10,199890000,3455.10
+1993-03-26,3461.32,3484.28,3428.63,3439.98,219130000,3439.98
+1993-03-25,3445.38,3485.36,3429.44,3461.32,250040000,3461.32
+1993-03-24,3461.86,3489.14,3417.55,3445.38,271980000,3445.38
+1993-03-23,3463.48,3488.60,3438.08,3461.86,231900000,3461.86
+1993-03-22,3471.58,3483.20,3429.71,3463.48,231900000,3463.48
+1993-03-19,3465.64,3493.20,3446.46,3471.58,295510000,3471.58
+1993-03-18,3427.01,3486.17,3427.01,3465.64,240490000,3465.64
+1993-03-17,3442.95,3458.35,3408.91,3426.74,237850000,3426.74
+1993-03-16,3442.41,3466.72,3423.77,3442.95,217730000,3442.95
+1993-03-15,3427.82,3460.51,3412.96,3442.41,192690000,3442.41
+1993-03-12,3447.81,3447.81,3385.40,3427.82,244740000,3427.82
+1993-03-11,3478.34,3493.74,3437.27,3457.00,250720000,3457.00
+1993-03-10,3472.12,3497.25,3432.68,3478.34,255190000,3478.34
+1993-03-09,3469.42,3495.63,3443.76,3472.12,290120000,3472.12
+1993-03-08,3404.58,3476.99,3401.34,3469.42,274560000,3469.42
+1993-03-05,3398.91,3447.81,3373.25,3404.58,247130000,3404.58
+1993-03-04,3404.04,3423.77,3372.43,3398.91,230780000,3398.91
+1993-03-03,3400.53,3437.00,3368.92,3404.04,272290000,3404.04
+1993-03-02,3355.41,3406.21,3334.07,3400.53,269640000,3400.53
+1993-03-01,3370.81,3404.58,3336.23,3355.41,232090000,3355.41
+1993-02-26,3365.14,3396.21,3336.23,3370.81,234160000,3370.81
+1993-02-25,3356.50,3387.02,3326.78,3365.14,252790000,3365.14
+1993-02-24,3323.27,3371.89,3311.92,3356.50,298940000,3356.50
+1993-02-23,3342.99,3373.52,3296.79,3323.27,321050000,3323.27
+1993-02-22,3322.18,3367.30,3297.06,3342.99,311510000,3342.99
+1993-02-19,3302.19,3347.04,3270.04,3322.18,307960000,3322.18
+1993-02-18,3312.19,3362.98,3262.48,3302.19,309570000,3302.19
+1993-02-17,3309.49,3338.12,3273.56,3312.19,287240000,3312.19
+1993-02-16,3391.62,3391.62,3285.98,3309.49,325350000,3309.49
+1993-02-12,3422.69,3436.19,3378.11,3392.43,215750000,3392.43
+1993-02-11,3412.42,3455.64,3395.94,3422.69,252780000,3422.69
+1993-02-10,3414.58,3438.08,3379.19,3412.42,248480000,3412.42
+1993-02-09,3437.54,3449.16,3394.86,3414.58,233670000,3414.58
+1993-02-08,3442.14,3472.94,3408.91,3437.54,240350000,3437.54
+1993-02-05,3416.74,3463.21,3391.62,3442.14,320960000,3442.14
+1993-02-04,3373.79,3441.33,3367.03,3416.74,346480000,3416.74
+1993-02-03,3328.67,3397.83,3322.73,3373.79,342530000,3373.79
+1993-02-02,3332.18,3355.68,3300.30,3328.67,269250000,3328.67
+1993-02-01,3310.03,3343.80,3300.30,3332.18,238260000,3332.18
+1993-01-29,3306.25,3331.10,3287.06,3310.03,247010000,3310.03
+1993-01-28,3291.39,3327.86,3270.58,3306.25,255550000,3306.25
+1993-01-27,3298.95,3318.67,3260.05,3291.39,276880000,3291.39
+1993-01-26,3292.20,3331.91,3272.47,3298.95,311450000,3298.95
+1993-01-25,3256.81,3324.89,3243.84,3292.20,288010000,3292.20
+1993-01-22,3253.02,3292.74,3225.74,3256.81,293250000,3256.81
+1993-01-21,3241.95,3269.77,3219.25,3253.02,257350000,3253.02
+1993-01-20,3255.99,3278.96,3231.41,3241.95,267740000,3241.95
+1993-01-19,3274.91,3299.49,3239.52,3255.99,283110000,3255.99
+1993-01-18,3271.12,3296.52,3244.65,3274.91,195980000,3274.91
+1993-01-15,3267.88,3300.03,3238.70,3271.12,306140000,3271.12
+1993-01-14,3263.56,3297.06,3230.87,3267.88,280020000,3267.88
+1993-01-13,3264.64,3283.01,3225.47,3263.56,245020000,3263.56
+1993-01-12,3262.75,3287.06,3229.79,3264.64,239250000,3264.64
+1993-01-11,3251.67,3284.09,3228.98,3262.75,217150000,3262.75
+1993-01-08,3268.96,3280.31,3221.68,3251.67,262620000,3251.67
+1993-01-07,3305.16,3333.51,3250.30,3268.96,303140000,3268.96
+1993-01-06,3307.87,3330.29,3276.53,3305.16,282850000,3305.16
+1993-01-05,3309.22,3338.12,3279.23,3307.87,240550000,3307.87
+1993-01-04,3301.11,3335.69,3282.74,3309.22,199680000,3309.22
+1992-12-31,3321.10,3340.29,3294.36,3301.11,165910000,3301.11
+1992-12-30,3310.84,3340.54,3298.93,3321.10,183870000,3321.10
+1992-12-29,3333.26,3364.87,3295.71,3310.84,213660000,3310.84
+1992-12-28,3326.24,3352.17,3297.33,3333.26,143800000,3333.26
+1992-12-24,3313.54,3339.48,3303.27,3326.24,95240000,3326.24
+1992-12-23,3321.10,3350.55,3293.01,3313.54,227980000,3313.54
+1992-12-22,3312.46,3347.04,3286.52,3321.10,249670000,3321.10
+1992-12-21,3313.27,3335.15,3280.85,3312.46,224680000,3312.46
+1992-12-18,3269.23,3325.97,3261.94,3313.27,371080000,3313.27
+1992-12-17,3255.18,3289.22,3229.79,3269.23,248590000,3269.23
+1992-12-16,3284.36,3303.00,3238.70,3255.18,241910000,3255.18
+1992-12-15,3292.20,3313.27,3260.32,3284.36,225880000,3284.36
+1992-12-14,3304.08,3324.89,3279.50,3292.20,183510000,3292.20
+1992-12-11,3312.19,3324.89,3280.85,3304.08,164450000,3304.08
+1992-12-10,3323.81,3335.69,3285.17,3312.19,240570000,3312.19
+1992-12-09,3322.18,3345.42,3295.98,3323.81,229980000,3323.81
+1992-12-08,3307.33,3331.64,3288.41,3322.18,234300000,3322.18
+1992-12-07,3288.68,3320.56,3274.37,3307.33,217700000,3307.33
+1992-12-04,3276.53,3312.46,3261.40,3288.68,227410000,3288.68
+1992-12-03,3286.25,3302.73,3252.48,3276.53,238200000,3276.53
+1992-12-02,3294.36,3310.84,3265.18,3286.25,241860000,3286.25
+1992-12-01,3305.16,3321.64,3268.15,3294.36,259020000,3294.36
+1992-11-30,3282.20,3326.51,3270.31,3305.16,230190000,3305.16
+1992-11-27,3266.26,3304.62,3259.24,3282.20,106010000,3282.20
+1992-11-25,3248.70,3285.71,3243.57,3266.26,206700000,3266.26
+1992-11-24,3223.04,3277.88,3209.26,3248.70,241520000,3248.70
+1992-11-23,3227.36,3251.13,3196.83,3223.04,190490000,3223.04
+1992-11-20,3209.53,3249.78,3197.64,3227.36,256340000,3227.36
+1992-11-19,3207.37,3231.14,3190.35,3209.53,218700000,3209.53
+1992-11-18,3193.32,3227.09,3176.84,3207.37,218660000,3207.37
+1992-11-17,3205.74,3223.31,3178.19,3193.32,185460000,3193.32
+1992-11-16,3233.03,3241.41,3191.16,3205.74,173500000,3205.74
+1992-11-13,3239.79,3252.48,3211.69,3233.03,192320000,3233.03
+1992-11-12,3240.33,3264.91,3214.39,3239.79,224580000,3239.79
+1992-11-11,3225.47,3258.70,3203.31,3240.33,240160000,3240.33
+1992-11-10,3240.87,3268.15,3212.50,3225.47,221990000,3225.47
+1992-11-09,3240.06,3268.69,3220.33,3240.87,197490000,3240.87
+1992-11-06,3243.84,3264.64,3216.82,3240.06,204870000,3240.06
+1992-11-05,3223.04,3259.78,3203.58,3243.84,219580000,3243.84
+1992-11-04,3252.48,3274.10,3211.15,3223.04,193980000,3223.04
+1992-11-03,3262.21,3285.44,3226.82,3252.48,209740000,3252.48
+1992-11-02,3226.28,3274.64,3211.42,3262.21,201620000,3262.21
+1992-10-30,3246.27,3260.59,3208.45,3226.28,196740000,3226.28
+1992-10-29,3251.40,3268.96,3224.39,3246.27,206300000,3246.27
+1992-10-28,3235.73,3262.48,3210.34,3251.40,203040000,3251.40
+1992-10-27,3244.11,3270.31,3210.88,3235.73,201650000,3235.73
+1992-10-26,3207.64,3256.00,3190.08,3244.11,187950000,3244.11
+1992-10-23,3200.88,3233.57,3175.76,3207.64,197400000,3207.64
+1992-10-22,3187.10,3221.14,3162.79,3200.88,216080000,3200.88
+1992-10-21,3186.02,3211.69,3163.33,3187.10,218990000,3187.10
+1992-10-20,3188.45,3223.31,3166.30,3186.02,258220000,3186.02
+1992-10-19,3174.41,3211.15,3154.14,3188.45,218670000,3188.45
+1992-10-16,3174.68,3203.85,3123.89,3174.41,234480000,3174.41
+1992-10-15,3195.48,3207.37,3147.66,3174.68,206990000,3174.68
+1992-10-14,3201.42,3225.74,3167.11,3195.48,175440000,3195.48
+1992-10-13,3174.41,3222.77,3159.28,3201.42,184120000,3201.42
+1992-10-12,3140.10,3186.29,3140.10,3174.41,126590000,3174.41
+1992-10-09,3176.03,3176.57,3120.37,3136.58,178910000,3136.58
+1992-10-08,3152.25,3195.48,3135.77,3176.03,203780000,3176.03
+1992-10-07,3178.19,3200.88,3136.85,3152.25,183100000,3152.25
+1992-10-06,3179.00,3205.20,3147.93,3178.19,196660000,3178.19
+1992-10-05,3197.10,3197.10,3087.41,3179.00,284380000,3179.00
+1992-10-02,3254.37,3259.51,3193.59,3200.61,187400000,3200.61
+1992-10-01,3271.66,3291.39,3237.35,3254.37,203670000,3254.37
+1992-09-30,3266.80,3291.66,3247.89,3271.66,184220000,3271.66
+1992-09-29,3276.26,3295.98,3247.08,3266.80,170350000,3266.80
+1992-09-28,3250.32,3283.01,3226.55,3276.26,157480000,3276.26
+1992-09-25,3287.87,3292.20,3226.82,3250.32,213650000,3250.32
+1992-09-24,3278.69,3310.84,3267.07,3287.87,187770000,3287.87
+1992-09-23,3280.85,3302.19,3252.48,3278.69,204350000,3278.69
+1992-09-22,3320.83,3327.05,3270.58,3280.85,186990000,3280.85
+1992-09-21,3327.05,3341.91,3295.71,3320.83,153900000,3320.83
+1992-09-18,3315.70,3340.56,3297.87,3327.05,236080000,3327.05
+1992-09-17,3319.21,3347.04,3292.20,3315.70,188270000,3315.70
+1992-09-16,3327.32,3353.52,3288.95,3319.21,229380000,3319.21
+1992-09-15,3372.98,3372.98,3317.86,3327.32,200220000,3327.32
+1992-09-14,3326.51,3391.35,3326.51,3376.22,250900000,3376.22
+1992-09-11,3305.16,3327.32,3285.44,3305.70,180640000,3305.70
+1992-09-10,3271.39,3318.94,3261.67,3305.16,221970000,3305.16
+1992-09-09,3260.59,3284.09,3244.92,3271.39,172890000,3271.39
+1992-09-08,3281.93,3292.20,3245.73,3260.59,160930000,3260.59
+1992-09-04,3292.20,3306.23,3265.16,3281.93,124340000,3281.93
+1992-09-03,3290.31,3325.95,3268.94,3292.20,212540000,3292.20
+1992-09-02,3266.26,3301.90,3249.76,3290.31,187010000,3290.31
+1992-09-01,3257.35,3279.21,3239.77,3266.26,172650000,3266.26
+1992-08-31,3267.61,3287.04,3244.90,3257.35,160230000,3257.35
+1992-08-28,3254.64,3280.56,3237.88,3267.61,152230000,3267.61
+1992-08-27,3246.81,3285.69,3237.06,3254.64,178490000,3254.64
+1992-08-26,3232.22,3261.38,3217.07,3246.81,171840000,3246.81
+1992-08-25,3228.17,3253.00,3200.86,3232.22,201630000,3232.22
+1992-08-24,3254.09,3258.41,3207.08,3228.17,165130000,3228.17
+1992-08-21,3304.89,3330.27,3243.55,3254.09,202640000,3254.09
+1992-08-20,3307.06,3326.22,3285.69,3304.89,183390000,3304.89
+1992-08-19,3329.48,3347.56,3302.44,3307.06,186710000,3307.06
+1992-08-18,3324.89,3343.80,3309.22,3329.48,169880000,3329.48
+1992-08-17,3328.94,3350.28,3310.03,3324.89,152750000,3324.89
+1992-08-14,3313.27,3342.16,3300.82,3328.94,166180000,3328.94
+1992-08-13,3320.83,3347.29,3294.07,3313.27,185700000,3313.27
+1992-08-12,3331.10,3349.72,3304.88,3320.83,176440000,3320.83
+1992-08-11,3337.58,3356.48,3304.34,3331.10,173810000,3331.10
+1992-08-10,3332.18,3350.26,3305.14,3337.58,142440000,3337.58
+1992-08-07,3340.56,3378.38,3318.40,3332.18,188340000,3332.18
+1992-08-06,3365.14,3374.33,3327.05,3340.56,181390000,3340.56
+1992-08-05,3384.32,3391.35,3347.58,3365.14,172410000,3365.14
+1992-08-04,3395.40,3405.12,3367.03,3384.32,166740000,3384.32
+1992-08-03,3393.78,3413.23,3365.14,3395.40,164360000,3395.40
+1992-07-31,3391.89,3414.85,3371.89,3393.78,172920000,3393.78
+1992-07-30,3379.19,3409.16,3351.07,3391.89,193280000,3391.89
+1992-07-29,3345.13,3399.70,3345.13,3379.19,275760000,3379.19
+1992-07-28,3282.20,3345.67,3277.59,3334.07,217950000,3334.07
+1992-07-27,3285.71,3311.38,3265.99,3282.20,164680000,3282.20
+1992-07-24,3290.04,3305.68,3261.94,3285.71,163870000,3285.71
+1992-07-23,3277.61,3308.39,3255.43,3290.04,175460000,3290.04
+1992-07-22,3308.41,3310.28,3262.19,3277.61,190130000,3277.61
+1992-07-21,3303.00,3335.94,3292.45,3308.41,173800000,3308.41
+1992-07-20,3318.38,3318.38,3271.11,3303.00,165730000,3303.00
+1992-07-17,3359.74,3359.74,3308.14,3331.64,187520000,3331.64
+1992-07-16,3345.42,3375.66,3318.65,3361.63,206040000,3361.63
+1992-07-15,3358.39,3381.87,3319.73,3345.42,206550000,3345.42
+1992-07-14,3337.31,3371.88,3315.95,3358.39,195310000,3358.39
+1992-07-13,3330.56,3357.55,3315.41,3337.31,148820000,3337.31
+1992-07-10,3324.08,3355.93,3304.88,3330.56,164750000,3330.56
+1992-07-09,3293.28,3345.40,3292.45,3324.08,207970000,3324.08
+1992-07-08,3295.17,3322.98,3258.70,3293.28,200020000,3293.28
+1992-07-07,3339.21,3360.80,3285.69,3295.17,218740000,3295.17
+1992-07-06,3330.29,3367.57,3295.96,3339.21,186410000,3339.21
+1992-07-02,3354.10,3385.43,3303.30,3330.29,220130000,3330.29
+1992-07-01,3318.52,3366.43,3305.45,3354.10,214240000,3354.10
+1992-06-30,3319.86,3347.71,3295.01,3318.52,195520000,3318.52
+1992-06-29,3282.41,3330.32,3278.16,3319.86,176710000,3319.86
+1992-06-26,3284.01,3303.04,3254.89,3282.41,154430000,3282.41
+1992-06-25,3290.70,3319.62,3261.31,3284.01,182310000,3284.01
+1992-06-24,3285.62,3317.75,3262.11,3290.70,193850000,3290.70
+1992-06-23,3280.80,3312.13,3263.45,3285.62,189170000,3285.62
+1992-06-22,3285.35,3298.22,3242.32,3280.80,169340000,3280.80
+1992-06-19,3274.12,3313.20,3264.79,3285.35,233440000,3285.35
+1992-06-18,3287.76,3313.74,3245.53,3274.12,215080000,3274.12
+1992-06-17,3329.49,3347.98,3271.21,3287.76,227650000,3287.76
+1992-06-16,3354.90,3379.01,3321.76,3329.49,178850000,3329.49
+1992-06-15,3354.36,3371.79,3327.11,3354.90,159100000,3354.90
+1992-06-12,3351.51,3397.68,3339.62,3354.36,181830000,3354.36
+1992-06-11,3343.22,3374.61,3301.51,3351.51,192940000,3351.51
+1992-06-10,3369.92,3385.76,3328.99,3343.22,206380000,3343.22
+1992-06-09,3404.14,3412.98,3350.25,3369.92,190780000,3369.92
+1992-06-08,3398.69,3422.83,3370.21,3404.14,161130000,3404.14
+1992-06-05,3399.73,3424.64,3356.98,3398.69,199050000,3398.69
+1992-06-04,3406.99,3428.02,3376.43,3399.73,204360000,3399.73
+1992-06-03,3396.10,3431.13,3378.76,3406.99,215730000,3406.99
+1992-06-02,3413.21,3435.27,3380.84,3396.10,200660000,3396.10
+1992-06-01,3396.88,3424.39,3365.02,3413.21,180780000,3413.21
+1992-05-29,3398.43,3433.98,3384.20,3396.88,202730000,3396.88
+1992-05-28,3370.44,3408.31,3354.91,3398.43,195230000,3398.43
+1992-05-27,3364.21,3396.65,3337.29,3370.44,179980000,3370.44
+1992-05-26,3386.77,3410.91,3338.84,3364.21,196950000,3364.21
+1992-05-22,3378.71,3408.49,3364.08,3386.77,146640000,3386.77
+1992-05-21,3393.84,3402.88,3354.80,3378.71,182190000,3378.71
+1992-05-20,3397.99,3421.42,3376.04,3393.84,198170000,3393.84
+1992-05-19,3376.03,3413.37,3350.41,3397.99,187030000,3397.99
+1992-05-18,3353.09,3398.24,3349.93,3376.03,149830000,3376.03
+1992-05-15,3368.88,3380.30,3330.43,3353.09,192040000,3353.09
+1992-05-14,3391.98,3397.46,3347.59,3368.88,187700000,3368.88
+1992-05-13,3385.12,3414.17,3362.93,3391.98,171610000,3391.98
+1992-05-12,3397.58,3414.81,3361.51,3385.12,192810000,3385.12
+1992-05-11,3369.41,3410.11,3363.82,3397.58,155730000,3397.58
+1992-05-08,3363.37,3388.41,3344.59,3369.41,168670000,3369.41
+1992-05-07,3369.41,3390.65,3343.25,3363.37,168910000,3363.37
+1992-05-06,3359.35,3398.70,3346.60,3369.41,199070000,3369.41
+1992-05-05,3378.13,3393.78,3346.15,3359.35,198860000,3359.35
+1992-05-04,3340.79,3394.68,3340.79,3378.13,174520000,3378.13
+1992-05-01,3359.12,3375.67,3316.64,3336.09,177360000,3336.09
+1992-04-30,3333.18,3377.01,3314.40,3359.12,223160000,3359.12
+1992-04-29,3307.92,3353.75,3295.39,3333.18,199740000,3333.18
+1992-04-28,3304.56,3329.83,3273.03,3307.92,186740000,3307.92
+1992-04-27,3324.46,3340.79,3284.66,3304.56,172820000,3304.56
+1992-04-24,3348.61,3381.48,3305.23,3324.46,198740000,3324.46
+1992-04-23,3338.77,3376.34,3298.52,3348.61,235740000,3348.61
+1992-04-22,3343.25,3366.72,3309.48,3338.77,218790000,3338.77
+1992-04-21,3336.31,3366.50,3305.68,3343.25,214400000,3343.25
+1992-04-20,3366.50,3375.67,3300.98,3336.31,191910000,3336.31
+1992-04-16,3353.76,3387.97,3321.33,3366.50,232480000,3366.50
+1992-04-15,3306.13,3370.08,3296.51,3353.76,228400000,3353.76
+1992-04-14,3269.90,3336.54,3259.39,3306.13,232040000,3306.13
+1992-04-13,3255.37,3293.60,3230.77,3269.90,143100000,3269.90
+1992-04-10,3227.64,3280.86,3227.64,3255.37,199450000,3255.37
+1992-04-09,3181.35,3245.08,3171.06,3224.96,231330000,3224.96
+1992-04-08,3213.55,3221.38,3141.77,3181.35,249210000,3181.35
+1992-04-07,3275.49,3291.81,3207.51,3213.55,205110000,3213.55
+1992-04-06,3249.11,3295.84,3238.37,3275.49,179330000,3275.49
+1992-04-03,3234.12,3271.91,3201.92,3249.11,188530000,3249.11
+1992-04-02,3249.33,3277.06,3209.08,3234.12,185110000,3234.12
+1992-04-01,3235.47,3262.52,3202.37,3249.33,186260000,3249.33
+1992-03-31,3235.24,3272.81,3216.46,3235.47,182200000,3235.47
+1992-03-30,3231.44,3260.06,3215.79,3235.24,133980000,3235.24
+1992-03-27,3267.67,3272.58,3218.92,3231.44,166140000,3231.44
+1992-03-26,3259.39,3288.91,3245.08,3267.67,176690000,3267.67
+1992-03-25,3260.96,3290.47,3238.15,3259.39,192080000,3259.39
+1992-03-24,3272.14,3296.96,3242.84,3260.96,191580000,3260.96
+1992-03-23,3276.39,3288.68,3249.33,3272.14,156620000,3272.14
+1992-03-20,3261.40,3292.48,3240.83,3276.39,246170000,3276.39
+1992-03-19,3254.25,3286.22,3240.38,3261.40,197240000,3261.40
+1992-03-18,3256.04,3281.98,3230.10,3254.25,190800000,3254.25
+1992-03-17,3236.36,3272.58,3222.27,3256.04,187240000,3256.04
+1992-03-16,3235.91,3249.11,3201.25,3236.36,151280000,3236.36
+1992-03-13,3208.63,3252.23,3203.71,3235.91,176000000,3235.91
+1992-03-12,3208.63,3232.33,3176.21,3208.63,180240000,3208.63
+1992-03-11,3230.99,3242.17,3189.85,3208.63,185320000,3208.63
+1992-03-10,3215.12,3259.17,3207.29,3230.99,194530000,3230.99
+1992-03-09,3221.60,3242.62,3188.95,3215.12,160620000,3215.12
+1992-03-06,3241.50,3262.97,3204.61,3221.60,185040000,3221.60
+1992-03-05,3268.56,3283.54,3226.74,3241.50,205730000,3241.50
+1992-03-04,3290.25,3318.42,3256.04,3268.56,206770000,3268.56
+1992-03-03,3275.27,3313.28,3258.50,3290.25,200860000,3290.25
+1992-03-02,3267.67,3298.97,3242.39,3275.27,180380000,3275.27
+1992-02-28,3269.45,3304.11,3247.09,3267.67,202130000,3267.67
+1992-02-27,3283.32,3300.54,3251.79,3269.45,215050000,3269.45
+1992-02-26,3257.83,3305.01,3246.20,3283.32,240690000,3283.32
+1992-02-25,3282.42,3293.60,3226.74,3257.83,208400000,3257.83
+1992-02-24,3280.19,3305.01,3253.58,3282.42,177470000,3282.42
+1992-02-21,3280.64,3307.47,3242.17,3280.19,258700000,3280.19
+1992-02-20,3230.32,3304.34,3224.28,3280.64,270550000,3280.64
+1992-02-19,3224.73,3259.17,3199.02,3230.32,232900000,3230.32
+1992-02-18,3245.97,3280.19,3195.66,3224.73,234270000,3224.73
+1992-02-14,3246.65,3271.91,3208.63,3245.97,214840000,3245.97
+1992-02-13,3276.83,3296.73,3226.07,3246.65,229360000,3246.65
+1992-02-12,3251.57,3291.37,3233.68,3276.83,230230000,3276.83
+1992-02-11,3245.08,3277.28,3222.49,3251.57,200110000,3251.57
+1992-02-10,3225.40,3269.00,3208.85,3245.08,184390000,3245.08
+1992-02-07,3255.59,3283.09,3199.91,3225.40,230950000,3225.40
+1992-02-06,3257.60,3285.55,3224.95,3255.59,238210000,3255.59
+1992-02-05,3272.81,3299.87,3233.68,3257.60,261960000,3257.60
+1992-02-04,3234.12,3283.09,3208.63,3272.81,231530000,3272.81
+1992-02-03,3223.39,3261.40,3193.42,3234.12,182150000,3234.12
+1992-01-31,3244.86,3274.37,3207.96,3223.39,197060000,3223.39
+1992-01-30,3224.96,3269.68,3200.58,3244.86,194670000,3244.86
+1992-01-29,3272.14,3313.51,3204.16,3224.96,248900000,3224.96
+1992-01-28,3240.61,3298.30,3230.99,3272.14,217070000,3272.14
+1992-01-27,3232.78,3267.44,3216.23,3240.61,190430000,3240.61
+1992-01-24,3226.74,3264.31,3203.71,3232.78,213600000,3232.78
+1992-01-23,3255.81,3279.52,3205.95,3226.74,229680000,3226.74
+1992-01-22,3223.39,3272.80,3190.96,3255.81,225030000,3255.81
+1992-01-21,3254.03,3275.49,3194.09,3223.39,218650000,3223.39
+1992-01-20,3264.98,3283.32,3230.99,3254.03,180870000,3254.03
+1992-01-17,3249.55,3297.63,3224.28,3264.98,284560000,3264.98
+1992-01-16,3258.50,3289.13,3200.80,3249.55,333750000,3249.55
+1992-01-15,3246.20,3299.19,3207.73,3258.50,312400000,3258.50
+1992-01-14,3185.60,3255.81,3167.93,3246.20,264540000,3246.20
+1992-01-13,3199.46,3215.56,3161.67,3185.60,200270000,3185.60
+1992-01-10,3209.53,3235.91,3165.92,3199.46,236060000,3199.46
+1992-01-09,3203.94,3246.64,3173.75,3209.53,291780000,3209.53
+1992-01-08,3204.83,3245.53,3164.58,3203.94,289690000,3203.94
+1992-01-07,3200.13,3224.73,3165.25,3204.83,251280000,3204.83
+1992-01-06,3201.48,3230.32,3166.37,3200.13,241980000,3200.13
+1992-01-03,3172.41,3221.38,3156.30,3201.48,219170000,3201.48
+1992-01-02,3168.83,3184.70,3119.86,3172.41,203610000,3172.41
+1991-12-31,3163.91,3204.61,3121.20,3168.83,247670000,3168.83
+1991-12-30,3101.52,3174.64,3090.79,3163.91,245450000,3163.91
+1991-12-27,3082.96,3121.65,3063.73,3101.52,157940000,3101.52
+1991-12-26,3050.98,3101.97,3036.23,3082.96,149200000,3082.96
+1991-12-24,3022.58,3087.88,3015.65,3050.98,162300000,3050.98
+1991-12-23,2934.48,3037.57,2919.05,3022.58,228730000,3022.58
+1991-12-20,2914.36,2965.79,2907.65,2934.48,313810000,2934.48
+1991-12-19,2908.09,2927.10,2881.48,2914.36,199830000,2914.36
+1991-12-18,2902.28,2921.29,2870.30,2908.09,192350000,2908.09
+1991-12-17,2919.05,2936.27,2886.40,2902.28,191280000,2902.28
+1991-12-16,2914.36,2946.33,2900.49,2919.05,173010000,2919.05
+1991-12-13,2895.13,2936.72,2893.34,2914.36,195790000,2914.36
+1991-12-12,2865.38,2911.67,2861.14,2895.13,192930000,2895.13
+1991-12-11,2863.82,2889.53,2832.29,2865.38,207410000,2865.38
+1991-12-10,2871.65,2891.10,2841.23,2863.82,191800000,2863.82
+1991-12-09,2886.40,2913.46,2856.22,2871.65,174700000,2871.65
+1991-12-06,2889.09,2924.87,2854.65,2886.40,198170000,2886.40
+1991-12-05,2911.67,2923.75,2874.77,2889.09,165660000,2889.09
+1991-12-04,2929.56,2945.66,2892.22,2911.67,186380000,2911.67
+1991-12-03,2935.38,2958.18,2904.74,2929.56,187160000,2929.56
+1991-12-02,2894.68,2941.64,2855.32,2935.38,188050000,2935.38
+1991-11-29,2900.04,2913.46,2877.46,2894.68,77420000,2894.68
+1991-11-27,2916.14,2929.11,2883.72,2900.04,159790000,2900.04
+1991-11-26,2902.06,2942.31,2861.14,2916.14,213650000,2916.14
+1991-11-25,2902.73,2921.96,2870.30,2902.06,173520000,2902.06
+1991-11-22,2932.69,2940.30,2880.81,2902.73,188110000,2902.73
+1991-11-21,2930.01,2953.94,2902.28,2932.69,195060000,2932.69
+1991-11-20,2931.57,2973.61,2912.12,2930.01,192670000,2930.01
+1991-11-19,2960.20,2960.20,2883.72,2931.57,243880000,2931.57
+1991-11-18,2943.20,2990.61,2923.30,2972.72,238170000,2972.72
+1991-11-15,3063.51,3069.54,2936.05,2943.20,236000000,2943.20
+1991-11-14,3065.30,3084.97,3037.34,3063.51,200030000,3063.51
+1991-11-13,3054.11,3075.58,3023.70,3065.30,184080000,3065.30
+1991-11-12,3042.26,3078.71,3028.62,3054.11,198600000,3054.11
+1991-11-11,3045.62,3057.69,3025.27,3042.26,128910000,3042.26
+1991-11-08,3054.11,3080.95,3034.66,3045.62,183260000,3045.62
+1991-11-07,3038.46,3066.19,3020.35,3054.11,205440000,3054.11
+1991-11-06,3031.31,3056.57,3010.51,3038.46,167370000,3038.46
+1991-11-05,3045.62,3062.84,3015.88,3031.31,171950000,3031.31
+1991-11-04,3056.35,3061.27,3019.01,3045.62,155530000,3045.62
+1991-11-01,3069.10,3091.91,3031.75,3056.35,205750000,3056.35
+1991-10-31,3071.78,3091.01,3045.62,3069.10,179490000,3069.10
+1991-10-30,3061.94,3090.12,3038.24,3071.78,195340000,3071.78
+1991-10-29,3045.62,3077.82,3020.13,3061.94,192700000,3061.94
+1991-10-28,3004.92,3055.23,3001.57,3045.62,160220000,3045.62
+1991-10-25,3016.32,3034.44,2983.01,3004.92,167260000,3004.92
+1991-10-24,3040.92,3047.63,2991.73,3016.32,178990000,3016.32
+1991-10-23,3039.80,3065.52,3015.21,3040.92,185340000,3040.92
+1991-10-22,3060.38,3084.53,3020.57,3039.80,194120000,3039.80
+1991-10-21,3077.15,3085.20,3042.49,3060.38,153770000,3060.38
+1991-10-18,3053.00,3089.45,3045.62,3077.15,204030000,3077.15
+1991-10-17,3061.72,3077.15,3027.06,3053.00,202780000,3053.00
+1991-10-16,3041.37,3082.29,3016.10,3061.72,225290000,3061.72
+1991-10-15,3019.45,3057.69,3000.22,3041.37,213440000,3041.37
+1991-10-14,2983.68,3026.39,2975.85,3019.45,130110000,3019.45
+1991-10-11,2976.52,3000.89,2957.51,2983.68,146560000,2983.68
+1991-10-10,2946.33,2985.47,2930.23,2976.52,164120000,2976.52
+1991-10-09,2963.77,2984.79,2925.54,2946.33,186590000,2946.33
+1991-10-08,2942.75,2983.68,2927.77,2963.77,170000000,2963.77
+1991-10-07,2961.76,2973.17,2926.21,2942.75,148430000,2942.75
+1991-10-04,2984.79,3007.16,2956.17,2961.76,163930000,2961.76
+1991-10-03,3012.52,3021.24,2972.50,2984.79,174230000,2984.79
+1991-10-02,3018.34,3040.25,2992.40,3012.52,166290000,3012.52
+1991-10-01,3016.77,3043.60,3002.46,3018.34,163520000,3018.34
+1991-09-30,3006.04,3032.87,2982.78,3016.77,146740000,3016.77
+1991-09-27,3017.22,3040.70,2989.49,3006.04,160430000,3006.04
+1991-09-26,3021.02,3040.70,2996.87,3017.22,160190000,3017.22
+1991-09-25,3029.07,3048.52,3004.92,3021.02,153800000,3021.02
+1991-09-24,3010.51,3043.38,2995.97,3029.07,170300000,3029.07
+1991-09-23,3019.23,3037.79,2997.76,3010.51,145530000,3010.51
+1991-09-20,3024.37,3045.39,3002.46,3019.23,241340000,3019.23
+1991-09-19,3017.89,3050.76,3002.91,3024.37,210770000,3024.37
+1991-09-18,3013.19,3025.49,2993.52,3017.89,141280000,3017.89
+1991-09-17,3015.21,3036.00,2992.62,3013.19,168310000,3013.19
+1991-09-16,2985.69,3023.03,2973.61,3015.21,171960000,3015.21
+1991-09-13,3007.83,3021.47,2963.10,2985.69,167800000,2985.69
+1991-09-12,2987.03,3023.26,2977.64,3007.83,160310000,3007.83
+1991-09-11,2982.56,3004.70,2964.67,2987.03,147910000,2987.03
+1991-09-10,3007.16,3012.97,2967.80,2982.56,146730000,2982.56
+1991-09-09,3011.63,3025.49,2987.70,3007.16,109250000,3007.16
+1991-09-06,3008.50,3033.32,2987.48,3011.63,166410000,3011.63
+1991-09-05,3008.50,3031.98,2989.71,3008.50,162250000,3008.50
+1991-09-04,3017.67,3034.66,2990.83,3008.50,156770000,3008.50
+1991-09-03,3043.60,3066.64,3013.64,3017.67,153550000,3017.67
+1991-08-30,3049.64,3059.26,3024.82,3043.60,125830000,3043.60
+1991-08-29,3055.23,3068.65,3030.86,3049.64,150180000,3049.64
+1991-08-28,3026.16,3064.85,3018.11,3055.23,169590000,3055.23
+1991-08-27,3039.36,3047.41,3007.83,3026.16,143920000,3026.16
+1991-08-26,3040.25,3057.02,3020.80,3039.36,128400000,3039.36
+1991-08-23,3007.38,3065.97,2999.11,3040.25,187010000,3040.25
+1991-08-22,3001.79,3029.96,2989.94,3007.38,172900000,3007.38
+1991-08-21,2941.64,3009.17,2941.64,3001.79,231720000,3001.79
+1991-08-20,2898.03,2937.39,2886.85,2913.69,184090000,2913.69
+1991-08-19,2924.42,2924.42,2836.31,2898.03,229590000,2898.03
+1991-08-16,2998.43,3013.64,2945.89,2968.02,188360000,2968.02
+1991-08-15,3005.37,3029.96,2985.24,2998.43,174310000,2998.43
+1991-08-14,3008.72,3036.67,2988.60,3005.37,195890000,3005.37
+1991-08-13,3001.34,3041.14,2989.27,3008.72,211890000,3008.72
+1991-08-12,2996.20,3013.42,2974.06,3001.34,145280000,3001.34
+1991-08-09,3013.86,3036.45,2986.81,2996.20,143610000,2996.20
+1991-08-08,3026.61,3045.17,2995.30,3013.86,163620000,3013.86
+1991-08-07,3027.28,3050.54,3008.50,3026.61,170820000,3026.61
+1991-08-06,2989.04,3034.88,2970.48,3027.28,174340000,3027.28
+1991-08-05,3006.26,3019.68,2978.76,2989.04,125790000,2989.04
+1991-08-02,3017.67,3042.26,2994.41,3006.26,162050000,3006.26
+1991-08-01,3024.82,3037.12,2997.76,3017.67,169920000,3017.67
+1991-07-31,3016.32,3039.58,2999.11,3024.82,166650000,3024.82
+1991-07-30,2985.24,3029.07,2983.68,3016.32,168950000,3016.32
+1991-07-29,2972.50,2996.20,2957.07,2985.24,135240000,2985.24
+1991-07-26,2980.10,2994.86,2953.26,2972.50,127690000,2972.50
+1991-07-25,2966.23,2999.11,2947.23,2980.10,145510000,2980.10
+1991-07-24,2983.23,3003.13,2950.80,2966.23,158530000,2966.23
+1991-07-23,3012.97,3038.24,2972.94,2983.23,160010000,2983.23
+1991-07-22,3016.32,3034.44,2990.83,3012.97,148880000,3012.97
+1991-07-19,3016.32,3036.23,2989.49,3016.32,187290000,3016.32
+1991-07-18,2978.76,3026.61,2970.93,3016.32,199470000,3016.32
+1991-07-17,2983.90,3011.18,2961.54,2978.76,194150000,2978.76
+1991-07-16,2990.61,3012.52,2962.88,2983.90,182740000,2983.90
+1991-07-15,2980.77,3007.38,2965.79,2990.61,159340000,2990.61
+1991-07-12,2959.75,3003.35,2942.98,2980.77,173060000,2980.77
+1991-07-11,2944.77,2975.63,2933.36,2959.75,157680000,2959.75
+1991-07-10,2947.23,2990.83,2927.77,2944.77,178170000,2944.77
+1991-07-09,2961.99,2980.10,2934.03,2947.23,151430000,2947.23
+1991-07-08,2932.47,2966.23,2897.36,2961.99,138210000,2961.99
+1991-07-05,2934.70,2953.26,2917.71,2932.47,69790000,2932.47
+1991-07-03,2957.07,2957.07,2915.03,2934.70,139290000,2934.70
+1991-07-02,2958.41,2987.03,2939.62,2972.72,157140000,2972.72
+1991-07-01,2911.67,2971.15,2911.67,2958.41,166880000,2958.41
+1991-06-28,2934.03,2934.03,2879.25,2906.75,162670000,2906.75
+1991-06-27,2913.01,2946.56,2909.21,2934.93,155820000,2934.93
+1991-06-26,2910.11,2934.03,2879.25,2913.01,186830000,2913.01
+1991-06-25,2913.01,2938.51,2887.97,2910.11,155450000,2910.11
+1991-06-24,2957.29,2957.29,2904.29,2913.01,137700000,2913.01
+1991-06-21,2953.94,2977.64,2937.84,2965.56,193110000,2965.56
+1991-06-20,2955.50,2969.81,2927.33,2953.94,163780000,2953.94
+1991-06-19,2978.31,2978.31,2933.59,2955.50,156070000,2955.50
+1991-06-18,2993.96,3022.14,2970.48,2986.81,154900000,2986.81
+1991-06-17,3000.45,3021.69,2977.86,2993.96,133910000,2993.96
+1991-06-14,2967.58,3014.98,2967.58,3000.45,167530000,3000.45
+1991-06-13,2961.99,2982.11,2942.53,2965.12,144870000,2965.12
+1991-06-12,2985.91,2987.25,2928.89,2961.99,165720000,2961.99
+1991-06-11,2975.40,3012.08,2963.10,2985.91,161240000,2985.91
+1991-06-10,2976.74,2992.84,2958.41,2975.40,127420000,2975.40
+1991-06-07,2994.86,3005.14,2954.61,2976.74,167830000,2976.74
+1991-06-06,3005.37,3027.06,2975.63,2994.86,168050000,2994.86
+1991-06-05,3027.95,3042.93,2989.49,3005.37,186300000,3005.37
+1991-06-04,3035.33,3042.04,2992.62,3027.95,180170000,3027.95
+1991-06-03,3027.50,3057.47,3000.67,3035.33,173710000,3035.33
+1991-05-31,3000.45,3044.50,2972.94,3027.50,231680000,3027.50
+1991-05-30,2969.59,3022.81,2950.58,3000.45,234090000,3000.45
+1991-05-29,2958.86,2987.92,2940.74,2969.59,188150000,2969.59
+1991-05-28,2913.91,2965.12,2903.85,2958.86,161950000,2958.86
+1991-05-24,2900.04,2931.13,2893.78,2913.91,124500000,2913.91
+1991-05-23,2910.33,2935.38,2881.04,2900.04,173080000,2900.04
+1991-05-22,2906.08,2930.01,2881.93,2910.33,159310000,2910.33
+1991-05-21,2892.22,2931.80,2875.00,2906.08,186860000,2906.08
+1991-05-20,2886.63,2910.78,2872.76,2892.22,109510000,2892.22
+1991-05-17,2894.01,2908.54,2860.02,2886.63,174210000,2886.63
+1991-05-16,2865.38,2905.64,2863.82,2894.01,154460000,2894.01
+1991-05-15,2886.85,2901.83,2834.53,2865.38,193110000,2865.38
+1991-05-14,2922.85,2922.85,2870.08,2886.85,207910000,2886.85
+1991-05-13,2920.17,2945.44,2896.24,2924.42,129620000,2924.42
+1991-05-10,2971.15,2986.14,2906.08,2920.17,172730000,2920.17
+1991-05-09,2930.90,2983.68,2926.88,2971.15,180210000,2971.15
+1991-05-08,2917.49,2945.21,2898.70,2930.90,157240000,2930.90
+1991-05-07,2941.64,2962.66,2906.53,2917.49,153290000,2917.49
+1991-05-06,2938.86,2956.84,2911.45,2941.64,128360000,2941.64
+1991-05-03,2938.61,2959.90,2906.93,2938.86,158160000,2938.86
+1991-05-02,2930.20,2966.34,2917.33,2938.61,187090000,2938.61
+1991-05-01,2887.87,2945.30,2882.43,2930.20,181900000,2930.20
+1991-04-30,2876.98,2929.21,2859.41,2887.87,204930000,2887.87
+1991-04-29,2912.38,2941.09,2869.55,2876.98,149860000,2876.98
+1991-04-26,2921.04,2934.90,2888.61,2912.38,154550000,2912.38
+1991-04-25,2949.51,2958.42,2905.20,2921.04,166940000,2921.04
+1991-04-24,2930.45,2965.10,2913.37,2949.51,166800000,2949.51
+1991-04-23,2927.72,2957.92,2905.94,2930.45,167840000,2930.45
+1991-04-22,2962.13,2962.13,2911.63,2927.72,164410000,2927.72
+1991-04-19,2999.26,3000.25,2943.56,2965.59,195510000,2965.59
+1991-04-18,3004.46,3027.72,2976.24,2999.26,217410000,2999.26
+1991-04-17,2986.88,3030.45,2963.12,3004.46,246930000,3004.46
+1991-04-16,2933.17,2995.79,2912.13,2986.88,214480000,2986.88
+1991-04-15,2920.79,2957.18,2896.29,2933.17,161800000,2933.17
+1991-04-12,2905.45,2946.53,2884.16,2920.79,198610000,2920.79
+1991-04-11,2877.72,2937.62,2877.72,2905.45,196570000,2905.45
+1991-04-10,2873.02,2902.48,2848.51,2874.50,167940000,2874.50
+1991-04-09,2918.56,2932.42,2863.36,2873.02,169940000,2873.02
+1991-04-08,2896.78,2929.21,2877.72,2918.56,138580000,2918.56
+1991-04-05,2924.50,2949.26,2876.98,2896.78,187410000,2896.78
+1991-04-04,2926.73,2959.41,2899.75,2924.50,198120000,2924.50
+1991-04-03,2945.05,2970.54,2915.84,2926.73,213720000,2926.73
+1991-04-02,2881.19,2951.98,2878.22,2945.05,189530000,2945.05
+1991-04-01,2913.86,2919.31,2868.32,2881.19,144010000,2881.19
+1991-03-28,2917.57,2942.08,2893.32,2913.86,150750000,2913.86
+1991-03-27,2914.85,2956.93,2886.14,2917.57,201830000,2917.57
+1991-03-26,2865.84,2924.01,2848.02,2914.85,198720000,2914.85
+1991-03-25,2858.91,2897.52,2837.87,2865.84,153920000,2865.84
+1991-03-22,2855.45,2879.95,2829.21,2858.91,160890000,2858.91
+1991-03-21,2872.03,2907.92,2841.58,2855.45,199830000,2855.45
+1991-03-20,2867.82,2897.03,2840.84,2872.03,196810000,2872.03
+1991-03-19,2908.17,2908.17,2840.84,2867.82,177070000,2867.82
+1991-03-18,2948.27,2960.64,2899.75,2929.95,163100000,2929.95
+1991-03-15,2952.23,2966.58,2918.81,2948.27,237660000,2948.27
+1991-03-14,2955.20,3000.00,2925.74,2952.23,231000000,2952.23
+1991-03-13,2922.52,2967.82,2910.89,2955.20,176000000,2955.20
+1991-03-12,2939.36,2962.13,2906.68,2922.52,176440000,2922.52
+1991-03-11,2955.20,2975.50,2923.27,2939.36,161600000,2939.36
+1991-03-08,2963.37,3003.47,2934.90,2955.20,206850000,2955.20
+1991-03-07,2973.27,2998.51,2948.51,2963.37,197060000,2963.37
+1991-03-06,2972.52,3017.82,2957.67,2973.27,262290000,2973.27
+1991-03-05,2914.11,2995.54,2913.86,2972.52,253700000,2972.52
+1991-03-04,2909.90,2950.74,2897.03,2914.11,199830000,2914.11
+1991-03-01,2882.18,2923.51,2846.78,2909.90,221510000,2909.90
+1991-02-28,2889.11,2923.51,2858.42,2882.18,223010000,2882.18
+1991-02-27,2864.60,2915.35,2839.85,2889.11,211410000,2889.11
+1991-02-26,2887.87,2895.30,2840.10,2864.60,164170000,2864.60
+1991-02-25,2889.36,2935.89,2865.35,2887.87,193820000,2887.87
+1991-02-22,2891.83,2945.79,2860.40,2889.36,218760000,2889.36
+1991-02-21,2899.01,2927.72,2871.29,2891.83,180770000,2891.83
+1991-02-20,2923.76,2923.76,2879.46,2899.01,185680000,2899.01
+1991-02-19,2934.65,2955.20,2895.30,2932.18,189900000,2932.18
+1991-02-15,2877.23,2947.28,2868.07,2934.65,222370000,2934.65
+1991-02-14,2909.16,2942.08,2852.48,2877.23,230750000,2877.23
+1991-02-13,2874.75,2918.32,2848.51,2909.16,209960000,2909.16
+1991-02-12,2902.23,2923.02,2848.27,2874.75,256160000,2874.75
+1991-02-11,2830.69,2910.64,2822.52,2902.23,265930000,2902.23
+1991-02-08,2810.64,2847.28,2787.13,2830.69,187830000,2830.69
+1991-02-07,2830.94,2875.50,2790.59,2810.64,292190000,2810.64
+1991-02-06,2788.37,2844.80,2760.15,2830.94,276940000,2830.94
+1991-02-05,2772.28,2805.20,2742.82,2788.37,290570000,2788.37
+1991-02-04,2730.69,2791.83,2714.85,2772.28,250750000,2772.28
+1991-02-01,2736.39,2764.60,2694.31,2730.69,246670000,2730.69
+1991-01-31,2713.12,2747.28,2691.58,2736.39,204240000,2736.39
+1991-01-30,2662.62,2725.99,2654.70,2713.12,226790000,2713.12
+1991-01-29,2654.46,2677.23,2627.23,2662.62,155740000,2662.62
+1991-01-28,2659.41,2688.61,2635.15,2654.46,141270000,2654.46
+1991-01-25,2643.07,2679.46,2623.27,2659.41,194350000,2659.41
+1991-01-24,2619.06,2667.33,2615.10,2643.07,223150000,2643.07
+1991-01-23,2603.22,2645.54,2584.65,2619.06,169440000,2619.06
+1991-01-22,2629.21,2645.05,2586.39,2603.22,175590000,2603.22
+1991-01-21,2646.29,2646.29,2602.97,2629.21,136290000,2629.21
+1991-01-18,2623.51,2663.37,2600.25,2646.78,226770000,2646.78
+1991-01-17,2571.78,2635.40,2571.78,2623.51,318890000,2623.51
+1991-01-16,2490.59,2525.25,2475.99,2508.91,134560000,2508.91
+1991-01-15,2483.91,2504.46,2470.05,2490.59,109980000,2490.59
+1991-01-14,2500.99,2500.99,2447.03,2483.91,120830000,2483.91
+1991-01-11,2498.76,2516.09,2472.77,2501.49,123050000,2501.49
+1991-01-10,2470.30,2512.13,2467.08,2498.76,124510000,2498.76
+1991-01-09,2509.41,2562.38,2456.19,2470.30,191100000,2470.30
+1991-01-08,2522.77,2544.06,2493.07,2509.41,143390000,2509.41
+1991-01-07,2563.37,2563.37,2514.11,2522.77,130610000,2522.77
+1991-01-04,2573.51,2601.98,2540.84,2566.09,140820000,2566.09
+1991-01-03,2610.64,2622.28,2567.57,2573.51,141450000,2573.51
+1991-01-02,2633.66,2651.73,2600.99,2610.64,126280000,2610.64
+1990-12-31,2629.21,2641.09,2611.14,2633.66,114130000,2633.66
+1990-12-28,2625.50,2639.11,2607.92,2629.21,111030000,2629.21
+1990-12-27,2637.13,2652.23,2616.58,2625.50,102900000,2625.50
+1990-12-26,2621.29,2653.96,2613.37,2637.13,78730000,2637.13
+1990-12-24,2633.66,2638.12,2609.65,2621.29,57200000,2621.29
+1990-12-21,2629.46,2662.62,2619.55,2633.66,233400000,2633.66
+1990-12-20,2626.73,2645.81,2591.58,2629.46,174700000,2629.46
+1990-12-19,2626.73,2648.51,2602.48,2626.73,180380000,2626.73
+1990-12-18,2593.32,2639.36,2583.17,2626.73,176460000,2626.73
+1990-12-17,2593.81,2600.74,2563.61,2593.32,118560000,2593.32
+1990-12-14,2614.36,2617.82,2572.03,2593.81,150880000,2593.81
+1990-12-13,2622.28,2640.59,2598.76,2614.36,162110000,2614.36
+1990-12-12,2586.14,2630.69,2578.22,2622.28,182270000,2622.28
+1990-12-11,2596.78,2606.93,2565.59,2586.14,145330000,2586.14
+1990-12-10,2590.10,2609.40,2566.58,2596.78,138650000,2596.78
+1990-12-07,2602.48,2618.07,2571.78,2590.10,164950000,2590.10
+1990-12-06,2610.40,2656.44,2589.36,2602.48,256380000,2602.48
+1990-12-05,2579.70,2615.84,2558.42,2610.40,205820000,2610.40
+1990-12-04,2565.59,2592.08,2534.65,2579.70,185820000,2579.70
+1990-12-03,2559.65,2589.60,2543.56,2565.59,177010000,2565.59
+1990-11-30,2518.81,2577.23,2498.51,2559.65,192350000,2559.65
+1990-11-29,2535.15,2544.31,2501.23,2518.81,140920000,2518.81
+1990-11-28,2543.81,2564.60,2521.04,2535.15,145490000,2535.15
+1990-11-27,2533.17,2562.62,2516.09,2543.81,147590000,2543.81
+1990-11-26,2527.23,2541.58,2489.85,2533.17,131540000,2533.17
+1990-11-23,2539.36,2557.92,2521.04,2527.23,63350000,2527.23
+1990-11-21,2530.20,2552.23,2502.72,2539.36,140660000,2539.36
+1990-11-20,2565.35,2574.50,2524.01,2530.20,161170000,2530.20
+1990-11-19,2550.25,2580.69,2543.07,2565.35,140950000,2565.35
+1990-11-16,2545.05,2570.79,2522.28,2550.25,165440000,2550.25
+1990-11-15,2559.65,2567.33,2528.71,2545.05,151370000,2545.05
+1990-11-14,2535.40,2581.19,2522.77,2559.65,179310000,2559.65
+1990-11-13,2540.35,2559.90,2512.38,2535.40,160240000,2535.40
+1990-11-12,2490.10,2550.99,2490.10,2540.35,161390000,2540.35
+1990-11-09,2443.81,2500.74,2438.61,2488.61,145160000,2488.61
+1990-11-08,2440.84,2468.81,2415.84,2443.81,155570000,2443.81
+1990-11-07,2485.15,2490.35,2430.94,2440.84,149130000,2440.84
+1990-11-06,2502.23,2516.83,2471.53,2485.15,141130000,2485.15
+1990-11-05,2490.84,2519.06,2472.77,2502.23,147510000,2502.23
+1990-11-02,2454.95,2501.73,2447.28,2490.84,168700000,2490.84
+1990-11-01,2442.33,2473.02,2415.59,2454.95,159270000,2454.95
+1990-10-31,2448.02,2475.99,2419.55,2442.33,156060000,2442.33
+1990-10-30,2430.20,2462.87,2400.50,2448.02,153450000,2448.02
+1990-10-29,2436.14,2470.30,2407.67,2430.20,133980000,2430.20
+1990-10-26,2482.18,2482.18,2429.21,2436.14,130190000,2436.14
+1990-10-25,2504.21,2525.99,2464.11,2484.41,141460000,2484.41
+1990-10-24,2494.06,2523.02,2470.54,2504.21,149290000,2504.21
+1990-10-23,2516.09,2527.97,2480.20,2494.06,146300000,2494.06
+1990-10-22,2520.79,2535.40,2476.73,2516.09,152650000,2516.09
+1990-10-19,2453.47,2536.88,2453.47,2520.79,221480000,2520.79
+1990-10-18,2391.83,2461.63,2391.83,2452.72,204110000,2452.72
+1990-10-17,2381.19,2418.56,2358.17,2387.87,161260000,2387.87
+1990-10-16,2416.34,2434.41,2366.83,2381.19,149570000,2381.19
+1990-10-15,2398.02,2451.24,2354.95,2416.34,164980000,2416.34
+1990-10-12,2365.10,2428.71,2349.75,2398.02,187940000,2398.02
+1990-10-11,2407.92,2427.23,2344.31,2365.10,180060000,2365.10
+1990-10-10,2445.54,2472.03,2388.36,2407.92,167890000,2407.92
+1990-10-09,2514.60,2514.60,2437.87,2445.54,145610000,2445.54
+1990-10-08,2510.64,2548.02,2507.18,2523.76,99470000,2523.76
+1990-10-05,2516.83,2544.55,2453.47,2510.64,153380000,2510.64
+1990-10-04,2489.36,2528.22,2464.85,2516.83,145410000,2516.83
+1990-10-03,2505.20,2534.65,2470.79,2489.36,135490000,2489.36
+1990-10-02,2515.84,2565.35,2487.62,2505.20,188360000,2505.20
+1990-10-01,2452.48,2534.65,2446.53,2515.84,202210000,2515.84
+1990-09-28,2427.48,2465.59,2367.82,2452.48,201010000,2452.48
+1990-09-27,2459.65,2492.33,2396.29,2427.48,182690000,2427.48
+1990-09-26,2485.64,2496.04,2435.40,2459.65,155570000,2459.65
+1990-09-25,2452.97,2501.24,2437.38,2485.64,155940000,2485.64
+1990-09-24,2498.02,2498.02,2438.12,2452.97,162210000,2452.97
+1990-09-21,2518.32,2538.37,2479.95,2512.38,201050000,2512.38
+1990-09-20,2549.01,2549.01,2495.54,2518.32,145100000,2518.32
+1990-09-19,2571.29,2594.55,2534.41,2557.43,147530000,2557.43
+1990-09-18,2567.33,2587.87,2524.26,2571.29,141130000,2571.29
+1990-09-17,2564.11,2585.89,2537.13,2567.33,110600000,2567.33
+1990-09-14,2582.67,2585.15,2545.54,2564.11,133390000,2564.11
+1990-09-13,2625.74,2629.21,2570.54,2582.67,123370000,2582.67
+1990-09-12,2612.62,2639.11,2592.33,2625.74,129890000,2625.74
+1990-09-11,2615.59,2635.64,2586.88,2612.62,113220000,2612.62
+1990-09-10,2619.55,2665.35,2600.99,2615.59,119730000,2615.59
+1990-09-07,2596.29,2635.89,2577.72,2619.55,123800000,2619.55
+1990-09-06,2628.22,2633.17,2575.99,2596.29,125620000,2596.29
+1990-09-05,2613.37,2643.07,2588.61,2628.22,120610000,2628.22
+1990-09-04,2614.36,2618.07,2573.02,2613.37,92940000,2613.37
+1990-08-31,2593.32,2624.50,2569.31,2614.36,96480000,2614.36
+1990-08-30,2632.43,2641.34,2578.47,2593.32,120890000,2593.32
+1990-08-29,2614.85,2651.24,2596.53,2632.43,134240000,2632.43
+1990-08-28,2611.63,2629.95,2582.92,2614.85,127660000,2614.85
+1990-08-27,2590.59,2645.05,2590.59,2611.63,160150000,2611.63
+1990-08-24,2483.42,2555.69,2480.45,2532.92,199040000,2532.92
+1990-08-23,2539.60,2539.60,2459.41,2483.42,250440000,2483.42
+1990-08-22,2603.96,2630.69,2553.22,2560.15,175550000,2560.15
+1990-08-21,2645.53,2645.53,2566.09,2603.96,194630000,2603.96
+1990-08-20,2644.80,2679.21,2632.43,2656.44,129630000,2656.44
+1990-08-17,2679.21,2679.21,2598.02,2644.80,212560000,2644.80
+1990-08-16,2746.53,2746.53,2676.24,2681.44,138850000,2681.44
+1990-08-15,2747.77,2778.71,2736.38,2748.27,135210000,2748.27
+1990-08-14,2746.78,2773.02,2720.54,2747.77,130320000,2747.77
+1990-08-13,2716.58,2752.23,2676.73,2746.78,122820000,2746.78
+1990-08-10,2758.91,2763.61,2692.82,2716.58,145340000,2716.58
+1990-08-09,2734.90,2774.26,2716.58,2758.91,155810000,2758.91
+1990-08-08,2710.64,2763.37,2691.34,2734.90,190400000,2734.90
+1990-08-07,2716.34,2763.86,2676.24,2710.64,231580000,2710.64
+1990-08-06,2758.42,2758.42,2683.17,2716.34,240400000,2716.34
+1990-08-03,2863.86,2863.86,2722.03,2809.65,292360000,2809.65
+1990-08-02,2899.26,2903.71,2833.17,2864.60,253090000,2864.60
+1990-08-01,2905.20,2931.19,2875.00,2899.26,176810000,2899.26
+1990-07-31,2917.33,2940.10,2878.47,2905.20,173810000,2905.20
+1990-07-30,2898.51,2922.52,2861.14,2917.33,146470000,2917.33
+1990-07-27,2920.79,2938.36,2877.72,2898.51,149070000,2898.51
+1990-07-26,2930.94,2945.79,2888.12,2920.79,155040000,2920.79
+1990-07-25,2922.52,2946.53,2896.78,2930.94,163530000,2930.94
+1990-07-24,2904.70,2939.60,2866.83,2922.52,181920000,2922.52
+1990-07-23,2961.14,2961.39,2833.17,2904.70,209030000,2904.70
+1990-07-20,2993.81,3019.31,2953.71,2961.14,177810000,2961.14
+1990-07-19,2981.68,3006.19,2948.27,2993.81,161990000,2993.81
+1990-07-18,2999.75,3009.65,2963.61,2981.68,168760000,2981.68
+1990-07-17,2999.75,3024.26,2970.05,2999.75,176790000,2999.75
+1990-07-16,2980.20,3017.08,2971.78,2999.75,149450000,2999.75
+1990-07-13,2969.80,3012.38,2956.68,2980.20,215600000,2980.20
+1990-07-12,2932.67,2980.69,2917.82,2969.80,211510000,2969.80
+1990-07-11,2890.84,2942.33,2890.10,2932.67,162220000,2932.67
+1990-07-10,2914.11,2928.22,2882.18,2890.84,147630000,2890.84
+1990-07-09,2904.95,2927.97,2890.84,2914.11,119390000,2914.11
+1990-07-06,2879.21,2919.80,2867.57,2904.95,111730000,2904.95
+1990-07-05,2906.44,2906.44,2863.61,2879.21,128320000,2879.21
+1990-07-03,2899.26,2925.74,2891.09,2911.63,130050000,2911.63
+1990-07-02,2880.69,2908.66,2869.80,2899.26,130200000,2899.26
+1990-06-29,2878.71,2901.98,2865.84,2880.69,145510000,2880.69
+1990-06-28,2862.13,2896.04,2850.50,2878.71,136120000,2878.71
+1990-06-27,2842.33,2878.96,2821.53,2862.13,146620000,2862.13
+1990-06-26,2845.05,2882.92,2832.67,2842.33,141420000,2842.33
+1990-06-25,2857.18,2882.18,2834.90,2845.05,133100000,2845.05
+1990-06-22,2901.73,2931.93,2848.02,2857.18,172570000,2857.18
+1990-06-21,2895.30,2916.58,2870.05,2901.73,138570000,2901.73
+1990-06-20,2893.56,2914.60,2868.81,2895.30,137420000,2895.30
+1990-06-19,2882.18,2907.92,2866.58,2893.56,134930000,2893.56
+1990-06-18,2930.45,2930.45,2877.48,2882.18,133470000,2882.18
+1990-06-15,2928.22,2947.77,2902.72,2935.89,205130000,2935.89
+1990-06-14,2929.95,2943.56,2902.97,2928.22,135770000,2928.22
+1990-06-13,2933.42,2956.93,2910.15,2929.95,158910000,2929.95
+1990-06-12,2892.57,2947.52,2877.97,2933.42,157100000,2933.42
+1990-06-11,2862.38,2901.98,2852.97,2892.57,119550000,2892.57
+1990-06-08,2897.33,2908.50,2850.73,2862.38,142600000,2862.38
+1990-06-07,2911.65,2930.58,2880.34,2897.33,160360000,2897.33
+1990-06-06,2925.00,2936.65,2891.99,2911.65,164030000,2911.65
+1990-06-05,2935.19,2956.55,2911.89,2925.00,199720000,2925.00
+1990-06-04,2900.97,2943.69,2883.98,2935.19,175520000,2935.19
+1990-06-01,2876.66,2919.90,2868.69,2900.97,187860000,2900.97
+1990-05-31,2878.56,2900.62,2854.64,2876.66,165690000,2876.66
+1990-05-30,2870.49,2908.21,2853.89,2878.56,199540000,2878.56
+1990-05-29,2820.92,2876.19,2812.62,2870.49,137410000,2870.49
+1990-05-25,2855.55,2856.50,2806.69,2820.92,120250000,2820.92
+1990-05-24,2856.26,2878.08,2828.04,2855.55,155140000,2855.55
+1990-05-23,2852.23,2869.07,2824.95,2856.26,172330000,2856.26
+1990-05-22,2844.68,2877.13,2828.51,2852.23,203350000,2852.23
+1990-05-21,2819.91,2859.72,2802.08,2844.68,166280000,2844.68
+1990-05-18,2831.71,2838.43,2804.63,2819.91,162520000,2819.91
+1990-05-17,2819.68,2856.25,2811.57,2831.71,164770000,2831.71
+1990-05-16,2822.45,2841.44,2800.23,2819.68,159810000,2819.68
+1990-05-15,2821.53,2840.74,2798.15,2822.45,165730000,2822.45
+1990-05-14,2801.58,2857.87,2793.75,2821.53,225410000,2821.53
+1990-05-11,2743.02,2810.36,2743.02,2801.58,234040000,2801.58
+1990-05-10,2732.88,2755.63,2716.44,2738.51,158460000,2738.51
+1990-05-09,2733.56,2745.50,2710.14,2732.88,152220000,2732.88
+1990-05-08,2721.62,2739.41,2710.36,2733.56,144230000,2733.56
+1990-05-07,2710.36,2739.19,2698.87,2721.62,132760000,2721.62
+1990-05-04,2696.17,2718.92,2682.43,2710.36,140550000,2710.36
+1990-05-03,2689.64,2716.22,2682.88,2696.17,145560000,2696.17
+1990-05-02,2668.92,2697.30,2659.01,2689.64,141610000,2689.64
+1990-05-01,2656.76,2687.39,2651.35,2668.92,149020000,2668.92
+1990-04-30,2645.05,2667.79,2627.70,2656.76,122750000,2656.76
+1990-04-27,2676.58,2687.39,2639.19,2645.05,130630000,2645.05
+1990-04-26,2666.44,2691.89,2650.22,2676.58,141330000,2676.58
+1990-04-25,2654.50,2685.36,2649.32,2666.44,133480000,2666.44
+1990-04-24,2666.67,2686.04,2643.69,2654.50,137360000,2654.50
+1990-04-23,2690.77,2690.77,2650.90,2666.67,136150000,2666.67
+1990-04-20,2711.94,2722.07,2668.47,2695.95,174260000,2695.95
+1990-04-19,2732.88,2742.12,2700.00,2711.94,152930000,2711.94
+1990-04-18,2765.77,2775.68,2722.75,2732.88,147130000,2732.88
+1990-04-17,2763.06,2774.77,2738.29,2765.77,127990000,2765.77
+1990-04-16,2751.80,2793.47,2748.87,2763.06,142810000,2763.06
+1990-04-12,2729.73,2763.96,2729.50,2751.80,142470000,2751.80
+1990-04-11,2731.08,2751.35,2713.29,2729.73,141080000,2729.73
+1990-04-10,2722.07,2741.67,2707.88,2731.08,136020000,2731.08
+1990-04-09,2717.12,2737.39,2701.35,2722.07,114970000,2722.07
+1990-04-06,2721.17,2732.43,2695.50,2717.12,137490000,2717.12
+1990-04-05,2719.37,2746.17,2709.01,2721.17,144170000,2721.17
+1990-04-04,2736.71,2755.86,2708.56,2719.37,159540000,2719.37
+1990-04-03,2700.45,2747.30,2699.55,2736.71,154310000,2736.71
+1990-04-02,2707.21,2708.78,2668.69,2700.45,124360000,2700.45
+1990-03-30,2727.70,2736.71,2692.34,2707.21,139340000,2707.21
+1990-03-29,2743.69,2753.38,2711.49,2727.70,132190000,2727.70
+1990-03-28,2736.94,2755.63,2716.21,2743.69,142300000,2743.69
+1990-03-27,2707.66,2738.96,2691.89,2736.94,131610000,2736.94
+1990-03-26,2704.28,2735.81,2697.97,2707.66,116110000,2707.66
+1990-03-23,2695.72,2722.75,2688.06,2704.28,132070000,2704.28
+1990-03-22,2727.93,2734.01,2674.32,2695.72,175930000,2695.72
+1990-03-21,2738.74,2759.68,2718.24,2727.93,130990000,2727.93
+1990-03-20,2755.63,2775.00,2724.10,2738.74,177320000,2738.74
+1990-03-19,2741.22,2761.71,2706.53,2755.63,142300000,2755.63
+1990-03-16,2699.32,2745.50,2699.32,2741.22,222520000,2741.22
+1990-03-15,2687.84,2714.86,2677.93,2695.72,144410000,2695.72
+1990-03-14,2674.55,2705.18,2662.39,2687.84,145060000,2687.84
+1990-03-13,2686.71,2699.55,2657.88,2674.55,145440000,2674.55
+1990-03-12,2683.33,2698.65,2661.94,2686.71,114790000,2686.71
+1990-03-09,2696.17,2705.63,2665.54,2683.33,150410000,2683.33
+1990-03-08,2669.59,2705.18,2661.26,2696.17,170900000,2696.17
+1990-03-07,2676.80,2696.85,2656.08,2669.59,163580000,2669.59
+1990-03-06,2649.55,2684.46,2638.06,2676.80,143640000,2676.80
+1990-03-05,2660.36,2675.22,2636.71,2649.55,140110000,2649.55
+1990-03-02,2635.59,2669.82,2630.18,2660.36,164330000,2660.36
+1990-03-01,2627.25,2655.63,2607.88,2635.59,157930000,2635.59
+1990-02-28,2617.12,2652.48,2603.60,2627.25,184410000,2627.25
+1990-02-27,2602.48,2637.84,2592.12,2617.12,152590000,2617.12
+1990-02-26,2564.19,2606.30,2560.13,2602.48,148910000,2602.48
+1990-02-23,2574.77,2591.44,2540.99,2564.19,148490000,2564.19
+1990-02-22,2583.56,2622.30,2568.02,2574.77,184320000,2574.77
+1990-02-21,2596.85,2602.48,2556.31,2583.56,159240000,2583.56
+1990-02-20,2619.14,2619.14,2579.05,2596.85,147300000,2596.85
+1990-02-16,2649.55,2669.37,2623.65,2635.59,166840000,2635.59
+1990-02-15,2624.32,2658.78,2614.86,2649.55,174630000,2649.55
+1990-02-14,2624.10,2643.69,2608.11,2624.32,138530000,2624.32
+1990-02-13,2619.14,2639.19,2592.57,2624.10,144490000,2624.10
+1990-02-12,2648.20,2652.48,2610.59,2619.14,118390000,2619.14
+1990-02-09,2644.37,2666.67,2628.15,2648.20,146910000,2648.20
+1990-02-08,2640.09,2674.32,2622.30,2644.37,176240000,2644.37
+1990-02-07,2606.31,2651.35,2579.28,2640.09,186710000,2640.09
+1990-02-06,2622.52,2629.50,2588.29,2606.31,134070000,2606.31
+1990-02-05,2602.70,2633.56,2592.12,2622.52,130950000,2622.52
+1990-02-02,2586.26,2623.65,2577.03,2602.70,164400000,2602.70
+1990-02-01,2590.54,2611.49,2571.85,2586.26,154580000,2586.26
+1990-01-31,2546.85,2600.90,2546.85,2590.54,189660000,2590.54
+1990-01-30,2553.38,2576.13,2513.06,2543.24,186030000,2543.24
+1990-01-29,2559.23,2583.56,2522.97,2553.38,150770000,2553.38
+1990-01-26,2561.04,2591.67,2516.89,2559.23,198190000,2559.23
+1990-01-25,2604.50,2628.83,2546.17,2561.04,172270000,2561.04
+1990-01-24,2615.32,2619.59,2534.23,2604.50,207830000,2604.50
+1990-01-23,2600.45,2639.64,2584.01,2615.32,179300000,2615.32
+1990-01-22,2677.90,2683.33,2595.27,2600.45,148380000,2600.45
+1990-01-19,2666.38,2696.89,2657.85,2677.90,185590000,2677.90
+1990-01-18,2659.13,2678.11,2625.85,2666.38,178590000,2666.38
+1990-01-17,2692.62,2711.39,2643.77,2659.13,170470000,2659.13
+1990-01-16,2669.37,2698.38,2634.17,2692.62,186070000,2692.62
+1990-01-15,2689.21,2698.11,2656.36,2669.37,140590000,2669.37
+1990-01-12,2735.92,2735.92,2675.98,2689.21,183880000,2689.21
+1990-01-11,2750.64,2783.27,2748.29,2760.67,154390000,2760.67
+1990-01-10,2766.00,2772.82,2725.47,2750.64,175990000,2750.64
+1990-01-09,2794.37,2810.79,2760.03,2766.00,155210000,2766.00
+1990-01-08,2773.25,2803.97,2753.41,2794.37,140110000,2794.37
+1990-01-05,2796.08,2810.15,2758.11,2773.25,158530000,2773.25
+1990-01-04,2809.73,2821.46,2766.42,2796.08,177000000,2796.08
+1990-01-03,2810.15,2834.04,2786.26,2809.73,192330000,2809.73
+1990-01-02,2753.20,2811.65,2732.51,2810.15,162070000,2810.15
Index: Dev/branches/Demo/d3/examples/zoom/zoom.html
===================================================================
--- Dev/branches/Demo/d3/examples/zoom/zoom.html	(revision 225)
+++ Dev/branches/Demo/d3/examples/zoom/zoom.html	(revision 225)
@@ -0,0 +1,162 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+    <title>Zoom</title>
+    <script type="text/javascript" src="../../d3.js"></script>
+    <script type="text/javascript" src="../../d3.csv.js"></script>
+    <script type="text/javascript" src="../../d3.time.js"></script>
+    <style type="text/css">
+
+path {
+  fill: steelblue;
+}
+
+line {
+  stroke: #000;
+  shape-rendering: crispEdges;
+}
+
+    </style>
+  </head>
+  <body>
+    <script type="text/javascript">
+
+var w = 960,
+    h1 = 400,
+    h2 = 40,
+    p = 20,
+    x0, // start of focus region
+    x1, // end of focus region
+    xx, // drag state
+    time = d3.time.format("%Y-%m-%d"),
+    x = d3.scale.linear().range([0, w]),
+    y1 = d3.scale.linear().range([h1 - p, 0]),
+    y2 = d3.scale.linear().range([h2, 0]);
+
+var svg = d3.select("body")
+  .append("svg:svg")
+    .attr("width", w)
+    .attr("height", h1 + h2);
+
+// Focus view.
+var focus = svg.append("svg:g");
+
+// Context view.
+var context = svg.append("svg:g")
+    .attr("transform", "translate(0," + h1 + ")");
+
+d3.csv("dji.csv", function(csv) {
+  var minX,
+      maxX,
+      maxY = -Infinity;
+
+  // Compute x- and y-extent.
+  csv.reverse();
+  for (var i = 0, n = csv.length, o; i < n; i++) {
+    o = csv[i];
+    o = csv[i] = {x: +time.parse(o.Date), y: +o.Close};
+    if (o.y > maxY) maxY = o.y;
+  }
+  minX = csv[0].x;
+  maxX = csv[n - 1].x;
+
+  // Update x- and y-scales.
+  x.domain([minX, maxX]);
+  y1.domain([0, maxY]);
+  y2.domain([0, maxY]);
+
+  // Focus view.
+  focus.append("svg:path")
+      .data([csv])
+      .attr("d", d3.svg.area()
+      .x(function(d) { return x(d.x); })
+      .y0(y1(0))
+      .y1(function(d) { return y1(d.y); }));
+
+  focus.append("svg:line")
+      .attr("x1", 0)
+      .attr("x2", w)
+      .attr("y1", y1(0))
+      .attr("y2", y1(0));
+
+  // Context view.
+  context.append("svg:rect")
+      .attr("width", w)
+      .attr("height", h2)
+      .attr("fill", "none")
+      .attr("pointer-events", "all")
+      .attr("cursor", "crosshair")
+      .on("mousedown", mousedown);
+
+  context.append("svg:path")
+      .data([csv])
+      .attr("pointer-events", "none")
+      .attr("d", d3.svg.area()
+      .x(function(d) { return x(d.x); })
+      .y0(y2(0))
+      .y1(function(d) { return y2(d.y); }));
+
+  context.append("svg:line")
+      .attr("x1", 0)
+      .attr("x2", w)
+      .attr("y1", y2(0))
+      .attr("y2", y2(0));
+
+  // Active focus region.
+  active = context.append("svg:rect")
+      .attr("pointer-events", "none")
+      .attr("id", "active")
+      .attr("x", x(x0 = minX))
+      .attr("y", 0)
+      .attr("height", h2)
+      .attr("width", x(x1 = (minX + 1e11)) - x(x0))
+      .attr("fill", "lightcoral")
+      .attr("fill-opacity", .5);
+});
+
+d3.select(window)
+    .on("mousemove", mousemove)
+    .on("mouseup", mouseup);
+
+function mousedown() {
+  xx = x.invert(d3.svg.mouse(this)[0]);
+}
+
+function mousemove() {
+  if (xx != null) {
+
+    // Compute the new (clamped) focus region.
+    var xy = x.invert(d3.svg.mouse(active[0][0])[0]);
+    if (xx < xy) { x0 = xx; x1 = xy; }
+    else if (xx > xy) { x0 = xy; x1 = xx; }
+    else return;
+    x0 = Math.max(x.domain()[0], x0);
+    x1 = Math.min(x.domain()[1], x1);
+
+    // Update the x-scale. TODO Recycle this scale?
+    var tx = d3.scale.linear()
+        .domain([x0, x1])
+        .range([0, w]);
+
+    // Recompute the focus path.
+    focus.select("path")
+        .attr("d", d3.svg.area()
+        .x(function(d) { return tx(d.x); })
+        .y0(y1(0))
+        .y1(function(d) { return y1(d.y); }));
+
+    // Reposition the active region rect.
+    active
+        .attr("x", x(x0))
+        .attr("width", x(x1) - x(x0));
+  }
+}
+
+function mouseup() {
+  xx = null;
+}
+
+    </script>
+  </body>
+</html>
Index: Dev/branches/Demo/d3/lib/colorbrewer/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/colorbrewer/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/colorbrewer/LICENSE	(revision 225)
@@ -0,0 +1,38 @@
+Apache-Style Software License for ColorBrewer software and ColorBrewer Color
+Schemes
+
+Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State
+University.
+
+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.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions as source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. The end-user documentation included with the redistribution, if any, must
+include the following acknowledgment: "This product includes color
+specifications and designs developed by Cynthia Brewer
+(http://colorbrewer.org/)." Alternately, this acknowledgment may appear in the
+software itself, if and wherever such third-party acknowledgments normally
+appear.
+
+4. The name "ColorBrewer" must not be used to endorse or promote products
+derived from this software without prior written permission. For written
+permission, please contact Cynthia Brewer at cbrewer@psu.edu.
+
+5. Products derived from this software may not be called "ColorBrewer", nor
+may "ColorBrewer" appear in their name, without prior written permission of
+Cynthia Brewer.
Index: Dev/branches/Demo/d3/lib/colorbrewer/colorbrewer.css
===================================================================
--- Dev/branches/Demo/d3/lib/colorbrewer/colorbrewer.css	(revision 225)
+++ Dev/branches/Demo/d3/lib/colorbrewer/colorbrewer.css	(revision 225)
@@ -0,0 +1,1327 @@
+/*
+ * This product includes color specifications and designs developed by Cynthia
+ * Brewer (http://colorbrewer.org/).
+ */
+.YlGn .q0-3{fill:rgb(247,252,185)}
+.YlGn .q1-3{fill:rgb(173,221,142)}
+.YlGn .q2-3{fill:rgb(49,163,84)}
+.YlGn .q0-4{fill:rgb(255,255,204)}
+.YlGn .q1-4{fill:rgb(194,230,153)}
+.YlGn .q2-4{fill:rgb(120,198,121)}
+.YlGn .q3-4{fill:rgb(35,132,67)}
+.YlGn .q0-5{fill:rgb(255,255,204)}
+.YlGn .q1-5{fill:rgb(194,230,153)}
+.YlGn .q2-5{fill:rgb(120,198,121)}
+.YlGn .q3-5{fill:rgb(49,163,84)}
+.YlGn .q4-5{fill:rgb(0,104,55)}
+.YlGn .q0-6{fill:rgb(255,255,204)}
+.YlGn .q1-6{fill:rgb(217,240,163)}
+.YlGn .q2-6{fill:rgb(173,221,142)}
+.YlGn .q3-6{fill:rgb(120,198,121)}
+.YlGn .q4-6{fill:rgb(49,163,84)}
+.YlGn .q5-6{fill:rgb(0,104,55)}
+.YlGn .q0-7{fill:rgb(255,255,204)}
+.YlGn .q1-7{fill:rgb(217,240,163)}
+.YlGn .q2-7{fill:rgb(173,221,142)}
+.YlGn .q3-7{fill:rgb(120,198,121)}
+.YlGn .q4-7{fill:rgb(65,171,93)}
+.YlGn .q5-7{fill:rgb(35,132,67)}
+.YlGn .q6-7{fill:rgb(0,90,50)}
+.YlGn .q0-8{fill:rgb(255,255,229)}
+.YlGn .q1-8{fill:rgb(247,252,185)}
+.YlGn .q2-8{fill:rgb(217,240,163)}
+.YlGn .q3-8{fill:rgb(173,221,142)}
+.YlGn .q4-8{fill:rgb(120,198,121)}
+.YlGn .q5-8{fill:rgb(65,171,93)}
+.YlGn .q6-8{fill:rgb(35,132,67)}
+.YlGn .q7-8{fill:rgb(0,90,50)}
+.YlGn .q0-9{fill:rgb(255,255,229)}
+.YlGn .q1-9{fill:rgb(247,252,185)}
+.YlGn .q2-9{fill:rgb(217,240,163)}
+.YlGn .q3-9{fill:rgb(173,221,142)}
+.YlGn .q4-9{fill:rgb(120,198,121)}
+.YlGn .q5-9{fill:rgb(65,171,93)}
+.YlGn .q6-9{fill:rgb(35,132,67)}
+.YlGn .q7-9{fill:rgb(0,104,55)}
+.YlGn .q8-9{fill:rgb(0,69,41)}
+.YlGnBu .q0-3{fill:rgb(237,248,177)}
+.YlGnBu .q1-3{fill:rgb(127,205,187)}
+.YlGnBu .q2-3{fill:rgb(44,127,184)}
+.YlGnBu .q0-4{fill:rgb(255,255,204)}
+.YlGnBu .q1-4{fill:rgb(161,218,180)}
+.YlGnBu .q2-4{fill:rgb(65,182,196)}
+.YlGnBu .q3-4{fill:rgb(34,94,168)}
+.YlGnBu .q0-5{fill:rgb(255,255,204)}
+.YlGnBu .q1-5{fill:rgb(161,218,180)}
+.YlGnBu .q2-5{fill:rgb(65,182,196)}
+.YlGnBu .q3-5{fill:rgb(44,127,184)}
+.YlGnBu .q4-5{fill:rgb(37,52,148)}
+.YlGnBu .q0-6{fill:rgb(255,255,204)}
+.YlGnBu .q1-6{fill:rgb(199,233,180)}
+.YlGnBu .q2-6{fill:rgb(127,205,187)}
+.YlGnBu .q3-6{fill:rgb(65,182,196)}
+.YlGnBu .q4-6{fill:rgb(44,127,184)}
+.YlGnBu .q5-6{fill:rgb(37,52,148)}
+.YlGnBu .q0-7{fill:rgb(255,255,204)}
+.YlGnBu .q1-7{fill:rgb(199,233,180)}
+.YlGnBu .q2-7{fill:rgb(127,205,187)}
+.YlGnBu .q3-7{fill:rgb(65,182,196)}
+.YlGnBu .q4-7{fill:rgb(29,145,192)}
+.YlGnBu .q5-7{fill:rgb(34,94,168)}
+.YlGnBu .q6-7{fill:rgb(12,44,132)}
+.YlGnBu .q0-8{fill:rgb(255,255,217)}
+.YlGnBu .q1-8{fill:rgb(237,248,177)}
+.YlGnBu .q2-8{fill:rgb(199,233,180)}
+.YlGnBu .q3-8{fill:rgb(127,205,187)}
+.YlGnBu .q4-8{fill:rgb(65,182,196)}
+.YlGnBu .q5-8{fill:rgb(29,145,192)}
+.YlGnBu .q6-8{fill:rgb(34,94,168)}
+.YlGnBu .q7-8{fill:rgb(12,44,132)}
+.YlGnBu .q0-9{fill:rgb(255,255,217)}
+.YlGnBu .q1-9{fill:rgb(237,248,177)}
+.YlGnBu .q2-9{fill:rgb(199,233,180)}
+.YlGnBu .q3-9{fill:rgb(127,205,187)}
+.YlGnBu .q4-9{fill:rgb(65,182,196)}
+.YlGnBu .q5-9{fill:rgb(29,145,192)}
+.YlGnBu .q6-9{fill:rgb(34,94,168)}
+.YlGnBu .q7-9{fill:rgb(37,52,148)}
+.YlGnBu .q8-9{fill:rgb(8,29,88)}
+.GnBu .q0-3{fill:rgb(224,243,219)}
+.GnBu .q1-3{fill:rgb(168,221,181)}
+.GnBu .q2-3{fill:rgb(67,162,202)}
+.GnBu .q0-4{fill:rgb(240,249,232)}
+.GnBu .q1-4{fill:rgb(186,228,188)}
+.GnBu .q2-4{fill:rgb(123,204,196)}
+.GnBu .q3-4{fill:rgb(43,140,190)}
+.GnBu .q0-5{fill:rgb(240,249,232)}
+.GnBu .q1-5{fill:rgb(186,228,188)}
+.GnBu .q2-5{fill:rgb(123,204,196)}
+.GnBu .q3-5{fill:rgb(67,162,202)}
+.GnBu .q4-5{fill:rgb(8,104,172)}
+.GnBu .q0-6{fill:rgb(240,249,232)}
+.GnBu .q1-6{fill:rgb(204,235,197)}
+.GnBu .q2-6{fill:rgb(168,221,181)}
+.GnBu .q3-6{fill:rgb(123,204,196)}
+.GnBu .q4-6{fill:rgb(67,162,202)}
+.GnBu .q5-6{fill:rgb(8,104,172)}
+.GnBu .q0-7{fill:rgb(240,249,232)}
+.GnBu .q1-7{fill:rgb(204,235,197)}
+.GnBu .q2-7{fill:rgb(168,221,181)}
+.GnBu .q3-7{fill:rgb(123,204,196)}
+.GnBu .q4-7{fill:rgb(78,179,211)}
+.GnBu .q5-7{fill:rgb(43,140,190)}
+.GnBu .q6-7{fill:rgb(8,88,158)}
+.GnBu .q0-8{fill:rgb(247,252,240)}
+.GnBu .q1-8{fill:rgb(224,243,219)}
+.GnBu .q2-8{fill:rgb(204,235,197)}
+.GnBu .q3-8{fill:rgb(168,221,181)}
+.GnBu .q4-8{fill:rgb(123,204,196)}
+.GnBu .q5-8{fill:rgb(78,179,211)}
+.GnBu .q6-8{fill:rgb(43,140,190)}
+.GnBu .q7-8{fill:rgb(8,88,158)}
+.GnBu .q0-9{fill:rgb(247,252,240)}
+.GnBu .q1-9{fill:rgb(224,243,219)}
+.GnBu .q2-9{fill:rgb(204,235,197)}
+.GnBu .q3-9{fill:rgb(168,221,181)}
+.GnBu .q4-9{fill:rgb(123,204,196)}
+.GnBu .q5-9{fill:rgb(78,179,211)}
+.GnBu .q6-9{fill:rgb(43,140,190)}
+.GnBu .q7-9{fill:rgb(8,104,172)}
+.GnBu .q8-9{fill:rgb(8,64,129)}
+.BuGn .q0-3{fill:rgb(229,245,249)}
+.BuGn .q1-3{fill:rgb(153,216,201)}
+.BuGn .q2-3{fill:rgb(44,162,95)}
+.BuGn .q0-4{fill:rgb(237,248,251)}
+.BuGn .q1-4{fill:rgb(178,226,226)}
+.BuGn .q2-4{fill:rgb(102,194,164)}
+.BuGn .q3-4{fill:rgb(35,139,69)}
+.BuGn .q0-5{fill:rgb(237,248,251)}
+.BuGn .q1-5{fill:rgb(178,226,226)}
+.BuGn .q2-5{fill:rgb(102,194,164)}
+.BuGn .q3-5{fill:rgb(44,162,95)}
+.BuGn .q4-5{fill:rgb(0,109,44)}
+.BuGn .q0-6{fill:rgb(237,248,251)}
+.BuGn .q1-6{fill:rgb(204,236,230)}
+.BuGn .q2-6{fill:rgb(153,216,201)}
+.BuGn .q3-6{fill:rgb(102,194,164)}
+.BuGn .q4-6{fill:rgb(44,162,95)}
+.BuGn .q5-6{fill:rgb(0,109,44)}
+.BuGn .q0-7{fill:rgb(237,248,251)}
+.BuGn .q1-7{fill:rgb(204,236,230)}
+.BuGn .q2-7{fill:rgb(153,216,201)}
+.BuGn .q3-7{fill:rgb(102,194,164)}
+.BuGn .q4-7{fill:rgb(65,174,118)}
+.BuGn .q5-7{fill:rgb(35,139,69)}
+.BuGn .q6-7{fill:rgb(0,88,36)}
+.BuGn .q0-8{fill:rgb(247,252,253)}
+.BuGn .q1-8{fill:rgb(229,245,249)}
+.BuGn .q2-8{fill:rgb(204,236,230)}
+.BuGn .q3-8{fill:rgb(153,216,201)}
+.BuGn .q4-8{fill:rgb(102,194,164)}
+.BuGn .q5-8{fill:rgb(65,174,118)}
+.BuGn .q6-8{fill:rgb(35,139,69)}
+.BuGn .q7-8{fill:rgb(0,88,36)}
+.BuGn .q0-9{fill:rgb(247,252,253)}
+.BuGn .q1-9{fill:rgb(229,245,249)}
+.BuGn .q2-9{fill:rgb(204,236,230)}
+.BuGn .q3-9{fill:rgb(153,216,201)}
+.BuGn .q4-9{fill:rgb(102,194,164)}
+.BuGn .q5-9{fill:rgb(65,174,118)}
+.BuGn .q6-9{fill:rgb(35,139,69)}
+.BuGn .q7-9{fill:rgb(0,109,44)}
+.BuGn .q8-9{fill:rgb(0,68,27)}
+.PuBuGn .q0-3{fill:rgb(236,226,240)}
+.PuBuGn .q1-3{fill:rgb(166,189,219)}
+.PuBuGn .q2-3{fill:rgb(28,144,153)}
+.PuBuGn .q0-4{fill:rgb(246,239,247)}
+.PuBuGn .q1-4{fill:rgb(189,201,225)}
+.PuBuGn .q2-4{fill:rgb(103,169,207)}
+.PuBuGn .q3-4{fill:rgb(2,129,138)}
+.PuBuGn .q0-5{fill:rgb(246,239,247)}
+.PuBuGn .q1-5{fill:rgb(189,201,225)}
+.PuBuGn .q2-5{fill:rgb(103,169,207)}
+.PuBuGn .q3-5{fill:rgb(28,144,153)}
+.PuBuGn .q4-5{fill:rgb(1,108,89)}
+.PuBuGn .q0-6{fill:rgb(246,239,247)}
+.PuBuGn .q1-6{fill:rgb(208,209,230)}
+.PuBuGn .q2-6{fill:rgb(166,189,219)}
+.PuBuGn .q3-6{fill:rgb(103,169,207)}
+.PuBuGn .q4-6{fill:rgb(28,144,153)}
+.PuBuGn .q5-6{fill:rgb(1,108,89)}
+.PuBuGn .q0-7{fill:rgb(246,239,247)}
+.PuBuGn .q1-7{fill:rgb(208,209,230)}
+.PuBuGn .q2-7{fill:rgb(166,189,219)}
+.PuBuGn .q3-7{fill:rgb(103,169,207)}
+.PuBuGn .q4-7{fill:rgb(54,144,192)}
+.PuBuGn .q5-7{fill:rgb(2,129,138)}
+.PuBuGn .q6-7{fill:rgb(1,100,80)}
+.PuBuGn .q0-8{fill:rgb(255,247,251)}
+.PuBuGn .q1-8{fill:rgb(236,226,240)}
+.PuBuGn .q2-8{fill:rgb(208,209,230)}
+.PuBuGn .q3-8{fill:rgb(166,189,219)}
+.PuBuGn .q4-8{fill:rgb(103,169,207)}
+.PuBuGn .q5-8{fill:rgb(54,144,192)}
+.PuBuGn .q6-8{fill:rgb(2,129,138)}
+.PuBuGn .q7-8{fill:rgb(1,100,80)}
+.PuBuGn .q0-9{fill:rgb(255,247,251)}
+.PuBuGn .q1-9{fill:rgb(236,226,240)}
+.PuBuGn .q2-9{fill:rgb(208,209,230)}
+.PuBuGn .q3-9{fill:rgb(166,189,219)}
+.PuBuGn .q4-9{fill:rgb(103,169,207)}
+.PuBuGn .q5-9{fill:rgb(54,144,192)}
+.PuBuGn .q6-9{fill:rgb(2,129,138)}
+.PuBuGn .q7-9{fill:rgb(1,108,89)}
+.PuBuGn .q8-9{fill:rgb(1,70,54)}
+.PuBu .q0-3{fill:rgb(236,231,242)}
+.PuBu .q1-3{fill:rgb(166,189,219)}
+.PuBu .q2-3{fill:rgb(43,140,190)}
+.PuBu .q0-4{fill:rgb(241,238,246)}
+.PuBu .q1-4{fill:rgb(189,201,225)}
+.PuBu .q2-4{fill:rgb(116,169,207)}
+.PuBu .q3-4{fill:rgb(5,112,176)}
+.PuBu .q0-5{fill:rgb(241,238,246)}
+.PuBu .q1-5{fill:rgb(189,201,225)}
+.PuBu .q2-5{fill:rgb(116,169,207)}
+.PuBu .q3-5{fill:rgb(43,140,190)}
+.PuBu .q4-5{fill:rgb(4,90,141)}
+.PuBu .q0-6{fill:rgb(241,238,246)}
+.PuBu .q1-6{fill:rgb(208,209,230)}
+.PuBu .q2-6{fill:rgb(166,189,219)}
+.PuBu .q3-6{fill:rgb(116,169,207)}
+.PuBu .q4-6{fill:rgb(43,140,190)}
+.PuBu .q5-6{fill:rgb(4,90,141)}
+.PuBu .q0-7{fill:rgb(241,238,246)}
+.PuBu .q1-7{fill:rgb(208,209,230)}
+.PuBu .q2-7{fill:rgb(166,189,219)}
+.PuBu .q3-7{fill:rgb(116,169,207)}
+.PuBu .q4-7{fill:rgb(54,144,192)}
+.PuBu .q5-7{fill:rgb(5,112,176)}
+.PuBu .q6-7{fill:rgb(3,78,123)}
+.PuBu .q0-8{fill:rgb(255,247,251)}
+.PuBu .q1-8{fill:rgb(236,231,242)}
+.PuBu .q2-8{fill:rgb(208,209,230)}
+.PuBu .q3-8{fill:rgb(166,189,219)}
+.PuBu .q4-8{fill:rgb(116,169,207)}
+.PuBu .q5-8{fill:rgb(54,144,192)}
+.PuBu .q6-8{fill:rgb(5,112,176)}
+.PuBu .q7-8{fill:rgb(3,78,123)}
+.PuBu .q0-9{fill:rgb(255,247,251)}
+.PuBu .q1-9{fill:rgb(236,231,242)}
+.PuBu .q2-9{fill:rgb(208,209,230)}
+.PuBu .q3-9{fill:rgb(166,189,219)}
+.PuBu .q4-9{fill:rgb(116,169,207)}
+.PuBu .q5-9{fill:rgb(54,144,192)}
+.PuBu .q6-9{fill:rgb(5,112,176)}
+.PuBu .q7-9{fill:rgb(4,90,141)}
+.PuBu .q8-9{fill:rgb(2,56,88)}
+.BuPu .q0-3{fill:rgb(224,236,244)}
+.BuPu .q1-3{fill:rgb(158,188,218)}
+.BuPu .q2-3{fill:rgb(136,86,167)}
+.BuPu .q0-4{fill:rgb(237,248,251)}
+.BuPu .q1-4{fill:rgb(179,205,227)}
+.BuPu .q2-4{fill:rgb(140,150,198)}
+.BuPu .q3-4{fill:rgb(136,65,157)}
+.BuPu .q0-5{fill:rgb(237,248,251)}
+.BuPu .q1-5{fill:rgb(179,205,227)}
+.BuPu .q2-5{fill:rgb(140,150,198)}
+.BuPu .q3-5{fill:rgb(136,86,167)}
+.BuPu .q4-5{fill:rgb(129,15,124)}
+.BuPu .q0-6{fill:rgb(237,248,251)}
+.BuPu .q1-6{fill:rgb(191,211,230)}
+.BuPu .q2-6{fill:rgb(158,188,218)}
+.BuPu .q3-6{fill:rgb(140,150,198)}
+.BuPu .q4-6{fill:rgb(136,86,167)}
+.BuPu .q5-6{fill:rgb(129,15,124)}
+.BuPu .q0-7{fill:rgb(237,248,251)}
+.BuPu .q1-7{fill:rgb(191,211,230)}
+.BuPu .q2-7{fill:rgb(158,188,218)}
+.BuPu .q3-7{fill:rgb(140,150,198)}
+.BuPu .q4-7{fill:rgb(140,107,177)}
+.BuPu .q5-7{fill:rgb(136,65,157)}
+.BuPu .q6-7{fill:rgb(110,1,107)}
+.BuPu .q0-8{fill:rgb(247,252,253)}
+.BuPu .q1-8{fill:rgb(224,236,244)}
+.BuPu .q2-8{fill:rgb(191,211,230)}
+.BuPu .q3-8{fill:rgb(158,188,218)}
+.BuPu .q4-8{fill:rgb(140,150,198)}
+.BuPu .q5-8{fill:rgb(140,107,177)}
+.BuPu .q6-8{fill:rgb(136,65,157)}
+.BuPu .q7-8{fill:rgb(110,1,107)}
+.BuPu .q0-9{fill:rgb(247,252,253)}
+.BuPu .q1-9{fill:rgb(224,236,244)}
+.BuPu .q2-9{fill:rgb(191,211,230)}
+.BuPu .q3-9{fill:rgb(158,188,218)}
+.BuPu .q4-9{fill:rgb(140,150,198)}
+.BuPu .q5-9{fill:rgb(140,107,177)}
+.BuPu .q6-9{fill:rgb(136,65,157)}
+.BuPu .q7-9{fill:rgb(129,15,124)}
+.BuPu .q8-9{fill:rgb(77,0,75)}
+.RdPu .q0-3{fill:rgb(253,224,221)}
+.RdPu .q1-3{fill:rgb(250,159,181)}
+.RdPu .q2-3{fill:rgb(197,27,138)}
+.RdPu .q0-4{fill:rgb(254,235,226)}
+.RdPu .q1-4{fill:rgb(251,180,185)}
+.RdPu .q2-4{fill:rgb(247,104,161)}
+.RdPu .q3-4{fill:rgb(174,1,126)}
+.RdPu .q0-5{fill:rgb(254,235,226)}
+.RdPu .q1-5{fill:rgb(251,180,185)}
+.RdPu .q2-5{fill:rgb(247,104,161)}
+.RdPu .q3-5{fill:rgb(197,27,138)}
+.RdPu .q4-5{fill:rgb(122,1,119)}
+.RdPu .q0-6{fill:rgb(254,235,226)}
+.RdPu .q1-6{fill:rgb(252,197,192)}
+.RdPu .q2-6{fill:rgb(250,159,181)}
+.RdPu .q3-6{fill:rgb(247,104,161)}
+.RdPu .q4-6{fill:rgb(197,27,138)}
+.RdPu .q5-6{fill:rgb(122,1,119)}
+.RdPu .q0-7{fill:rgb(254,235,226)}
+.RdPu .q1-7{fill:rgb(252,197,192)}
+.RdPu .q2-7{fill:rgb(250,159,181)}
+.RdPu .q3-7{fill:rgb(247,104,161)}
+.RdPu .q4-7{fill:rgb(221,52,151)}
+.RdPu .q5-7{fill:rgb(174,1,126)}
+.RdPu .q6-7{fill:rgb(122,1,119)}
+.RdPu .q0-8{fill:rgb(255,247,243)}
+.RdPu .q1-8{fill:rgb(253,224,221)}
+.RdPu .q2-8{fill:rgb(252,197,192)}
+.RdPu .q3-8{fill:rgb(250,159,181)}
+.RdPu .q4-8{fill:rgb(247,104,161)}
+.RdPu .q5-8{fill:rgb(221,52,151)}
+.RdPu .q6-8{fill:rgb(174,1,126)}
+.RdPu .q7-8{fill:rgb(122,1,119)}
+.RdPu .q0-9{fill:rgb(255,247,243)}
+.RdPu .q1-9{fill:rgb(253,224,221)}
+.RdPu .q2-9{fill:rgb(252,197,192)}
+.RdPu .q3-9{fill:rgb(250,159,181)}
+.RdPu .q4-9{fill:rgb(247,104,161)}
+.RdPu .q5-9{fill:rgb(221,52,151)}
+.RdPu .q6-9{fill:rgb(174,1,126)}
+.RdPu .q7-9{fill:rgb(122,1,119)}
+.RdPu .q8-9{fill:rgb(73,0,106)}
+.PuRd .q0-3{fill:rgb(231,225,239)}
+.PuRd .q1-3{fill:rgb(201,148,199)}
+.PuRd .q2-3{fill:rgb(221,28,119)}
+.PuRd .q0-4{fill:rgb(241,238,246)}
+.PuRd .q1-4{fill:rgb(215,181,216)}
+.PuRd .q2-4{fill:rgb(223,101,176)}
+.PuRd .q3-4{fill:rgb(206,18,86)}
+.PuRd .q0-5{fill:rgb(241,238,246)}
+.PuRd .q1-5{fill:rgb(215,181,216)}
+.PuRd .q2-5{fill:rgb(223,101,176)}
+.PuRd .q3-5{fill:rgb(221,28,119)}
+.PuRd .q4-5{fill:rgb(152,0,67)}
+.PuRd .q0-6{fill:rgb(241,238,246)}
+.PuRd .q1-6{fill:rgb(212,185,218)}
+.PuRd .q2-6{fill:rgb(201,148,199)}
+.PuRd .q3-6{fill:rgb(223,101,176)}
+.PuRd .q4-6{fill:rgb(221,28,119)}
+.PuRd .q5-6{fill:rgb(152,0,67)}
+.PuRd .q0-7{fill:rgb(241,238,246)}
+.PuRd .q1-7{fill:rgb(212,185,218)}
+.PuRd .q2-7{fill:rgb(201,148,199)}
+.PuRd .q3-7{fill:rgb(223,101,176)}
+.PuRd .q4-7{fill:rgb(231,41,138)}
+.PuRd .q5-7{fill:rgb(206,18,86)}
+.PuRd .q6-7{fill:rgb(145,0,63)}
+.PuRd .q0-8{fill:rgb(247,244,249)}
+.PuRd .q1-8{fill:rgb(231,225,239)}
+.PuRd .q2-8{fill:rgb(212,185,218)}
+.PuRd .q3-8{fill:rgb(201,148,199)}
+.PuRd .q4-8{fill:rgb(223,101,176)}
+.PuRd .q5-8{fill:rgb(231,41,138)}
+.PuRd .q6-8{fill:rgb(206,18,86)}
+.PuRd .q7-8{fill:rgb(145,0,63)}
+.PuRd .q0-9{fill:rgb(247,244,249)}
+.PuRd .q1-9{fill:rgb(231,225,239)}
+.PuRd .q2-9{fill:rgb(212,185,218)}
+.PuRd .q3-9{fill:rgb(201,148,199)}
+.PuRd .q4-9{fill:rgb(223,101,176)}
+.PuRd .q5-9{fill:rgb(231,41,138)}
+.PuRd .q6-9{fill:rgb(206,18,86)}
+.PuRd .q7-9{fill:rgb(152,0,67)}
+.PuRd .q8-9{fill:rgb(103,0,31)}
+.OrRd .q0-3{fill:rgb(254,232,200)}
+.OrRd .q1-3{fill:rgb(253,187,132)}
+.OrRd .q2-3{fill:rgb(227,74,51)}
+.OrRd .q0-4{fill:rgb(254,240,217)}
+.OrRd .q1-4{fill:rgb(253,204,138)}
+.OrRd .q2-4{fill:rgb(252,141,89)}
+.OrRd .q3-4{fill:rgb(215,48,31)}
+.OrRd .q0-5{fill:rgb(254,240,217)}
+.OrRd .q1-5{fill:rgb(253,204,138)}
+.OrRd .q2-5{fill:rgb(252,141,89)}
+.OrRd .q3-5{fill:rgb(227,74,51)}
+.OrRd .q4-5{fill:rgb(179,0,0)}
+.OrRd .q0-6{fill:rgb(254,240,217)}
+.OrRd .q1-6{fill:rgb(253,212,158)}
+.OrRd .q2-6{fill:rgb(253,187,132)}
+.OrRd .q3-6{fill:rgb(252,141,89)}
+.OrRd .q4-6{fill:rgb(227,74,51)}
+.OrRd .q5-6{fill:rgb(179,0,0)}
+.OrRd .q0-7{fill:rgb(254,240,217)}
+.OrRd .q1-7{fill:rgb(253,212,158)}
+.OrRd .q2-7{fill:rgb(253,187,132)}
+.OrRd .q3-7{fill:rgb(252,141,89)}
+.OrRd .q4-7{fill:rgb(239,101,72)}
+.OrRd .q5-7{fill:rgb(215,48,31)}
+.OrRd .q6-7{fill:rgb(153,0,0)}
+.OrRd .q0-8{fill:rgb(255,247,236)}
+.OrRd .q1-8{fill:rgb(254,232,200)}
+.OrRd .q2-8{fill:rgb(253,212,158)}
+.OrRd .q3-8{fill:rgb(253,187,132)}
+.OrRd .q4-8{fill:rgb(252,141,89)}
+.OrRd .q5-8{fill:rgb(239,101,72)}
+.OrRd .q6-8{fill:rgb(215,48,31)}
+.OrRd .q7-8{fill:rgb(153,0,0)}
+.OrRd .q0-9{fill:rgb(255,247,236)}
+.OrRd .q1-9{fill:rgb(254,232,200)}
+.OrRd .q2-9{fill:rgb(253,212,158)}
+.OrRd .q3-9{fill:rgb(253,187,132)}
+.OrRd .q4-9{fill:rgb(252,141,89)}
+.OrRd .q5-9{fill:rgb(239,101,72)}
+.OrRd .q6-9{fill:rgb(215,48,31)}
+.OrRd .q7-9{fill:rgb(179,0,0)}
+.OrRd .q8-9{fill:rgb(127,0,0)}
+.YlOrRd .q0-3{fill:rgb(255,237,160)}
+.YlOrRd .q1-3{fill:rgb(254,178,76)}
+.YlOrRd .q2-3{fill:rgb(240,59,32)}
+.YlOrRd .q0-4{fill:rgb(255,255,178)}
+.YlOrRd .q1-4{fill:rgb(254,204,92)}
+.YlOrRd .q2-4{fill:rgb(253,141,60)}
+.YlOrRd .q3-4{fill:rgb(227,26,28)}
+.YlOrRd .q0-5{fill:rgb(255,255,178)}
+.YlOrRd .q1-5{fill:rgb(254,204,92)}
+.YlOrRd .q2-5{fill:rgb(253,141,60)}
+.YlOrRd .q3-5{fill:rgb(240,59,32)}
+.YlOrRd .q4-5{fill:rgb(189,0,38)}
+.YlOrRd .q0-6{fill:rgb(255,255,178)}
+.YlOrRd .q1-6{fill:rgb(254,217,118)}
+.YlOrRd .q2-6{fill:rgb(254,178,76)}
+.YlOrRd .q3-6{fill:rgb(253,141,60)}
+.YlOrRd .q4-6{fill:rgb(240,59,32)}
+.YlOrRd .q5-6{fill:rgb(189,0,38)}
+.YlOrRd .q0-7{fill:rgb(255,255,178)}
+.YlOrRd .q1-7{fill:rgb(254,217,118)}
+.YlOrRd .q2-7{fill:rgb(254,178,76)}
+.YlOrRd .q3-7{fill:rgb(253,141,60)}
+.YlOrRd .q4-7{fill:rgb(252,78,42)}
+.YlOrRd .q5-7{fill:rgb(227,26,28)}
+.YlOrRd .q6-7{fill:rgb(177,0,38)}
+.YlOrRd .q0-8{fill:rgb(255,255,204)}
+.YlOrRd .q1-8{fill:rgb(255,237,160)}
+.YlOrRd .q2-8{fill:rgb(254,217,118)}
+.YlOrRd .q3-8{fill:rgb(254,178,76)}
+.YlOrRd .q4-8{fill:rgb(253,141,60)}
+.YlOrRd .q5-8{fill:rgb(252,78,42)}
+.YlOrRd .q6-8{fill:rgb(227,26,28)}
+.YlOrRd .q7-8{fill:rgb(177,0,38)}
+.YlOrRd .q0-9{fill:rgb(255,255,204)}
+.YlOrRd .q1-9{fill:rgb(255,237,160)}
+.YlOrRd .q2-9{fill:rgb(254,217,118)}
+.YlOrRd .q3-9{fill:rgb(254,178,76)}
+.YlOrRd .q4-9{fill:rgb(253,141,60)}
+.YlOrRd .q5-9{fill:rgb(252,78,42)}
+.YlOrRd .q6-9{fill:rgb(227,26,28)}
+.YlOrRd .q7-9{fill:rgb(189,0,38)}
+.YlOrRd .q8-9{fill:rgb(128,0,38)}
+.YlOrBr .q0-3{fill:rgb(255,247,188)}
+.YlOrBr .q1-3{fill:rgb(254,196,79)}
+.YlOrBr .q2-3{fill:rgb(217,95,14)}
+.YlOrBr .q0-4{fill:rgb(255,255,212)}
+.YlOrBr .q1-4{fill:rgb(254,217,142)}
+.YlOrBr .q2-4{fill:rgb(254,153,41)}
+.YlOrBr .q3-4{fill:rgb(204,76,2)}
+.YlOrBr .q0-5{fill:rgb(255,255,212)}
+.YlOrBr .q1-5{fill:rgb(254,217,142)}
+.YlOrBr .q2-5{fill:rgb(254,153,41)}
+.YlOrBr .q3-5{fill:rgb(217,95,14)}
+.YlOrBr .q4-5{fill:rgb(153,52,4)}
+.YlOrBr .q0-6{fill:rgb(255,255,212)}
+.YlOrBr .q1-6{fill:rgb(254,227,145)}
+.YlOrBr .q2-6{fill:rgb(254,196,79)}
+.YlOrBr .q3-6{fill:rgb(254,153,41)}
+.YlOrBr .q4-6{fill:rgb(217,95,14)}
+.YlOrBr .q5-6{fill:rgb(153,52,4)}
+.YlOrBr .q0-7{fill:rgb(255,255,212)}
+.YlOrBr .q1-7{fill:rgb(254,227,145)}
+.YlOrBr .q2-7{fill:rgb(254,196,79)}
+.YlOrBr .q3-7{fill:rgb(254,153,41)}
+.YlOrBr .q4-7{fill:rgb(236,112,20)}
+.YlOrBr .q5-7{fill:rgb(204,76,2)}
+.YlOrBr .q6-7{fill:rgb(140,45,4)}
+.YlOrBr .q0-8{fill:rgb(255,255,229)}
+.YlOrBr .q1-8{fill:rgb(255,247,188)}
+.YlOrBr .q2-8{fill:rgb(254,227,145)}
+.YlOrBr .q3-8{fill:rgb(254,196,79)}
+.YlOrBr .q4-8{fill:rgb(254,153,41)}
+.YlOrBr .q5-8{fill:rgb(236,112,20)}
+.YlOrBr .q6-8{fill:rgb(204,76,2)}
+.YlOrBr .q7-8{fill:rgb(140,45,4)}
+.YlOrBr .q0-9{fill:rgb(255,255,229)}
+.YlOrBr .q1-9{fill:rgb(255,247,188)}
+.YlOrBr .q2-9{fill:rgb(254,227,145)}
+.YlOrBr .q3-9{fill:rgb(254,196,79)}
+.YlOrBr .q4-9{fill:rgb(254,153,41)}
+.YlOrBr .q5-9{fill:rgb(236,112,20)}
+.YlOrBr .q6-9{fill:rgb(204,76,2)}
+.YlOrBr .q7-9{fill:rgb(153,52,4)}
+.YlOrBr .q8-9{fill:rgb(102,37,6)}
+.Purples .q0-3{fill:rgb(239,237,245)}
+.Purples .q1-3{fill:rgb(188,189,220)}
+.Purples .q2-3{fill:rgb(117,107,177)}
+.Purples .q0-4{fill:rgb(242,240,247)}
+.Purples .q1-4{fill:rgb(203,201,226)}
+.Purples .q2-4{fill:rgb(158,154,200)}
+.Purples .q3-4{fill:rgb(106,81,163)}
+.Purples .q0-5{fill:rgb(242,240,247)}
+.Purples .q1-5{fill:rgb(203,201,226)}
+.Purples .q2-5{fill:rgb(158,154,200)}
+.Purples .q3-5{fill:rgb(117,107,177)}
+.Purples .q4-5{fill:rgb(84,39,143)}
+.Purples .q0-6{fill:rgb(242,240,247)}
+.Purples .q1-6{fill:rgb(218,218,235)}
+.Purples .q2-6{fill:rgb(188,189,220)}
+.Purples .q3-6{fill:rgb(158,154,200)}
+.Purples .q4-6{fill:rgb(117,107,177)}
+.Purples .q5-6{fill:rgb(84,39,143)}
+.Purples .q0-7{fill:rgb(242,240,247)}
+.Purples .q1-7{fill:rgb(218,218,235)}
+.Purples .q2-7{fill:rgb(188,189,220)}
+.Purples .q3-7{fill:rgb(158,154,200)}
+.Purples .q4-7{fill:rgb(128,125,186)}
+.Purples .q5-7{fill:rgb(106,81,163)}
+.Purples .q6-7{fill:rgb(74,20,134)}
+.Purples .q0-8{fill:rgb(252,251,253)}
+.Purples .q1-8{fill:rgb(239,237,245)}
+.Purples .q2-8{fill:rgb(218,218,235)}
+.Purples .q3-8{fill:rgb(188,189,220)}
+.Purples .q4-8{fill:rgb(158,154,200)}
+.Purples .q5-8{fill:rgb(128,125,186)}
+.Purples .q6-8{fill:rgb(106,81,163)}
+.Purples .q7-8{fill:rgb(74,20,134)}
+.Purples .q0-9{fill:rgb(252,251,253)}
+.Purples .q1-9{fill:rgb(239,237,245)}
+.Purples .q2-9{fill:rgb(218,218,235)}
+.Purples .q3-9{fill:rgb(188,189,220)}
+.Purples .q4-9{fill:rgb(158,154,200)}
+.Purples .q5-9{fill:rgb(128,125,186)}
+.Purples .q6-9{fill:rgb(106,81,163)}
+.Purples .q7-9{fill:rgb(84,39,143)}
+.Purples .q8-9{fill:rgb(63,0,125)}
+.Blues .q0-3{fill:rgb(222,235,247)}
+.Blues .q1-3{fill:rgb(158,202,225)}
+.Blues .q2-3{fill:rgb(49,130,189)}
+.Blues .q0-4{fill:rgb(239,243,255)}
+.Blues .q1-4{fill:rgb(189,215,231)}
+.Blues .q2-4{fill:rgb(107,174,214)}
+.Blues .q3-4{fill:rgb(33,113,181)}
+.Blues .q0-5{fill:rgb(239,243,255)}
+.Blues .q1-5{fill:rgb(189,215,231)}
+.Blues .q2-5{fill:rgb(107,174,214)}
+.Blues .q3-5{fill:rgb(49,130,189)}
+.Blues .q4-5{fill:rgb(8,81,156)}
+.Blues .q0-6{fill:rgb(239,243,255)}
+.Blues .q1-6{fill:rgb(198,219,239)}
+.Blues .q2-6{fill:rgb(158,202,225)}
+.Blues .q3-6{fill:rgb(107,174,214)}
+.Blues .q4-6{fill:rgb(49,130,189)}
+.Blues .q5-6{fill:rgb(8,81,156)}
+.Blues .q0-7{fill:rgb(239,243,255)}
+.Blues .q1-7{fill:rgb(198,219,239)}
+.Blues .q2-7{fill:rgb(158,202,225)}
+.Blues .q3-7{fill:rgb(107,174,214)}
+.Blues .q4-7{fill:rgb(66,146,198)}
+.Blues .q5-7{fill:rgb(33,113,181)}
+.Blues .q6-7{fill:rgb(8,69,148)}
+.Blues .q0-8{fill:rgb(247,251,255)}
+.Blues .q1-8{fill:rgb(222,235,247)}
+.Blues .q2-8{fill:rgb(198,219,239)}
+.Blues .q3-8{fill:rgb(158,202,225)}
+.Blues .q4-8{fill:rgb(107,174,214)}
+.Blues .q5-8{fill:rgb(66,146,198)}
+.Blues .q6-8{fill:rgb(33,113,181)}
+.Blues .q7-8{fill:rgb(8,69,148)}
+.Blues .q0-9{fill:rgb(247,251,255)}
+.Blues .q1-9{fill:rgb(222,235,247)}
+.Blues .q2-9{fill:rgb(198,219,239)}
+.Blues .q3-9{fill:rgb(158,202,225)}
+.Blues .q4-9{fill:rgb(107,174,214)}
+.Blues .q5-9{fill:rgb(66,146,198)}
+.Blues .q6-9{fill:rgb(33,113,181)}
+.Blues .q7-9{fill:rgb(8,81,156)}
+.Blues .q8-9{fill:rgb(8,48,107)}
+.Greens .q0-3{fill:rgb(229,245,224)}
+.Greens .q1-3{fill:rgb(161,217,155)}
+.Greens .q2-3{fill:rgb(49,163,84)}
+.Greens .q0-4{fill:rgb(237,248,233)}
+.Greens .q1-4{fill:rgb(186,228,179)}
+.Greens .q2-4{fill:rgb(116,196,118)}
+.Greens .q3-4{fill:rgb(35,139,69)}
+.Greens .q0-5{fill:rgb(237,248,233)}
+.Greens .q1-5{fill:rgb(186,228,179)}
+.Greens .q2-5{fill:rgb(116,196,118)}
+.Greens .q3-5{fill:rgb(49,163,84)}
+.Greens .q4-5{fill:rgb(0,109,44)}
+.Greens .q0-6{fill:rgb(237,248,233)}
+.Greens .q1-6{fill:rgb(199,233,192)}
+.Greens .q2-6{fill:rgb(161,217,155)}
+.Greens .q3-6{fill:rgb(116,196,118)}
+.Greens .q4-6{fill:rgb(49,163,84)}
+.Greens .q5-6{fill:rgb(0,109,44)}
+.Greens .q0-7{fill:rgb(237,248,233)}
+.Greens .q1-7{fill:rgb(199,233,192)}
+.Greens .q2-7{fill:rgb(161,217,155)}
+.Greens .q3-7{fill:rgb(116,196,118)}
+.Greens .q4-7{fill:rgb(65,171,93)}
+.Greens .q5-7{fill:rgb(35,139,69)}
+.Greens .q6-7{fill:rgb(0,90,50)}
+.Greens .q0-8{fill:rgb(247,252,245)}
+.Greens .q1-8{fill:rgb(229,245,224)}
+.Greens .q2-8{fill:rgb(199,233,192)}
+.Greens .q3-8{fill:rgb(161,217,155)}
+.Greens .q4-8{fill:rgb(116,196,118)}
+.Greens .q5-8{fill:rgb(65,171,93)}
+.Greens .q6-8{fill:rgb(35,139,69)}
+.Greens .q7-8{fill:rgb(0,90,50)}
+.Greens .q0-9{fill:rgb(247,252,245)}
+.Greens .q1-9{fill:rgb(229,245,224)}
+.Greens .q2-9{fill:rgb(199,233,192)}
+.Greens .q3-9{fill:rgb(161,217,155)}
+.Greens .q4-9{fill:rgb(116,196,118)}
+.Greens .q5-9{fill:rgb(65,171,93)}
+.Greens .q6-9{fill:rgb(35,139,69)}
+.Greens .q7-9{fill:rgb(0,109,44)}
+.Greens .q8-9{fill:rgb(0,68,27)}
+.Oranges .q0-3{fill:rgb(254,230,206)}
+.Oranges .q1-3{fill:rgb(253,174,107)}
+.Oranges .q2-3{fill:rgb(230,85,13)}
+.Oranges .q0-4{fill:rgb(254,237,222)}
+.Oranges .q1-4{fill:rgb(253,190,133)}
+.Oranges .q2-4{fill:rgb(253,141,60)}
+.Oranges .q3-4{fill:rgb(217,71,1)}
+.Oranges .q0-5{fill:rgb(254,237,222)}
+.Oranges .q1-5{fill:rgb(253,190,133)}
+.Oranges .q2-5{fill:rgb(253,141,60)}
+.Oranges .q3-5{fill:rgb(230,85,13)}
+.Oranges .q4-5{fill:rgb(166,54,3)}
+.Oranges .q0-6{fill:rgb(254,237,222)}
+.Oranges .q1-6{fill:rgb(253,208,162)}
+.Oranges .q2-6{fill:rgb(253,174,107)}
+.Oranges .q3-6{fill:rgb(253,141,60)}
+.Oranges .q4-6{fill:rgb(230,85,13)}
+.Oranges .q5-6{fill:rgb(166,54,3)}
+.Oranges .q0-7{fill:rgb(254,237,222)}
+.Oranges .q1-7{fill:rgb(253,208,162)}
+.Oranges .q2-7{fill:rgb(253,174,107)}
+.Oranges .q3-7{fill:rgb(253,141,60)}
+.Oranges .q4-7{fill:rgb(241,105,19)}
+.Oranges .q5-7{fill:rgb(217,72,1)}
+.Oranges .q6-7{fill:rgb(140,45,4)}
+.Oranges .q0-8{fill:rgb(255,245,235)}
+.Oranges .q1-8{fill:rgb(254,230,206)}
+.Oranges .q2-8{fill:rgb(253,208,162)}
+.Oranges .q3-8{fill:rgb(253,174,107)}
+.Oranges .q4-8{fill:rgb(253,141,60)}
+.Oranges .q5-8{fill:rgb(241,105,19)}
+.Oranges .q6-8{fill:rgb(217,72,1)}
+.Oranges .q7-8{fill:rgb(140,45,4)}
+.Oranges .q0-9{fill:rgb(255,245,235)}
+.Oranges .q1-9{fill:rgb(254,230,206)}
+.Oranges .q2-9{fill:rgb(253,208,162)}
+.Oranges .q3-9{fill:rgb(253,174,107)}
+.Oranges .q4-9{fill:rgb(253,141,60)}
+.Oranges .q5-9{fill:rgb(241,105,19)}
+.Oranges .q6-9{fill:rgb(217,72,1)}
+.Oranges .q7-9{fill:rgb(166,54,3)}
+.Oranges .q8-9{fill:rgb(127,39,4)}
+.Reds .q0-3{fill:rgb(254,224,210)}
+.Reds .q1-3{fill:rgb(252,146,114)}
+.Reds .q2-3{fill:rgb(222,45,38)}
+.Reds .q0-4{fill:rgb(254,229,217)}
+.Reds .q1-4{fill:rgb(252,174,145)}
+.Reds .q2-4{fill:rgb(251,106,74)}
+.Reds .q3-4{fill:rgb(203,24,29)}
+.Reds .q0-5{fill:rgb(254,229,217)}
+.Reds .q1-5{fill:rgb(252,174,145)}
+.Reds .q2-5{fill:rgb(251,106,74)}
+.Reds .q3-5{fill:rgb(222,45,38)}
+.Reds .q4-5{fill:rgb(165,15,21)}
+.Reds .q0-6{fill:rgb(254,229,217)}
+.Reds .q1-6{fill:rgb(252,187,161)}
+.Reds .q2-6{fill:rgb(252,146,114)}
+.Reds .q3-6{fill:rgb(251,106,74)}
+.Reds .q4-6{fill:rgb(222,45,38)}
+.Reds .q5-6{fill:rgb(165,15,21)}
+.Reds .q0-7{fill:rgb(254,229,217)}
+.Reds .q1-7{fill:rgb(252,187,161)}
+.Reds .q2-7{fill:rgb(252,146,114)}
+.Reds .q3-7{fill:rgb(251,106,74)}
+.Reds .q4-7{fill:rgb(239,59,44)}
+.Reds .q5-7{fill:rgb(203,24,29)}
+.Reds .q6-7{fill:rgb(153,0,13)}
+.Reds .q0-8{fill:rgb(255,245,240)}
+.Reds .q1-8{fill:rgb(254,224,210)}
+.Reds .q2-8{fill:rgb(252,187,161)}
+.Reds .q3-8{fill:rgb(252,146,114)}
+.Reds .q4-8{fill:rgb(251,106,74)}
+.Reds .q5-8{fill:rgb(239,59,44)}
+.Reds .q6-8{fill:rgb(203,24,29)}
+.Reds .q7-8{fill:rgb(153,0,13)}
+.Reds .q0-9{fill:rgb(255,245,240)}
+.Reds .q1-9{fill:rgb(254,224,210)}
+.Reds .q2-9{fill:rgb(252,187,161)}
+.Reds .q3-9{fill:rgb(252,146,114)}
+.Reds .q4-9{fill:rgb(251,106,74)}
+.Reds .q5-9{fill:rgb(239,59,44)}
+.Reds .q6-9{fill:rgb(203,24,29)}
+.Reds .q7-9{fill:rgb(165,15,21)}
+.Reds .q8-9{fill:rgb(103,0,13)}
+.Greys .q0-3{fill:rgb(240,240,240)}
+.Greys .q1-3{fill:rgb(189,189,189)}
+.Greys .q2-3{fill:rgb(99,99,99)}
+.Greys .q0-4{fill:rgb(247,247,247)}
+.Greys .q1-4{fill:rgb(204,204,204)}
+.Greys .q2-4{fill:rgb(150,150,150)}
+.Greys .q3-4{fill:rgb(82,82,82)}
+.Greys .q0-5{fill:rgb(247,247,247)}
+.Greys .q1-5{fill:rgb(204,204,204)}
+.Greys .q2-5{fill:rgb(150,150,150)}
+.Greys .q3-5{fill:rgb(99,99,99)}
+.Greys .q4-5{fill:rgb(37,37,37)}
+.Greys .q0-6{fill:rgb(247,247,247)}
+.Greys .q1-6{fill:rgb(217,217,217)}
+.Greys .q2-6{fill:rgb(189,189,189)}
+.Greys .q3-6{fill:rgb(150,150,150)}
+.Greys .q4-6{fill:rgb(99,99,99)}
+.Greys .q5-6{fill:rgb(37,37,37)}
+.Greys .q0-7{fill:rgb(247,247,247)}
+.Greys .q1-7{fill:rgb(217,217,217)}
+.Greys .q2-7{fill:rgb(189,189,189)}
+.Greys .q3-7{fill:rgb(150,150,150)}
+.Greys .q4-7{fill:rgb(115,115,115)}
+.Greys .q5-7{fill:rgb(82,82,82)}
+.Greys .q6-7{fill:rgb(37,37,37)}
+.Greys .q0-8{fill:rgb(255,255,255)}
+.Greys .q1-8{fill:rgb(240,240,240)}
+.Greys .q2-8{fill:rgb(217,217,217)}
+.Greys .q3-8{fill:rgb(189,189,189)}
+.Greys .q4-8{fill:rgb(150,150,150)}
+.Greys .q5-8{fill:rgb(115,115,115)}
+.Greys .q6-8{fill:rgb(82,82,82)}
+.Greys .q7-8{fill:rgb(37,37,37)}
+.Greys .q0-9{fill:rgb(255,255,255)}
+.Greys .q1-9{fill:rgb(240,240,240)}
+.Greys .q2-9{fill:rgb(217,217,217)}
+.Greys .q3-9{fill:rgb(189,189,189)}
+.Greys .q4-9{fill:rgb(150,150,150)}
+.Greys .q5-9{fill:rgb(115,115,115)}
+.Greys .q6-9{fill:rgb(82,82,82)}
+.Greys .q7-9{fill:rgb(37,37,37)}
+.Greys .q8-9{fill:rgb(0,0,0)}
+.PuOr .q0-3{fill:rgb(241,163,64)}
+.PuOr .q1-3{fill:rgb(247,247,247)}
+.PuOr .q2-3{fill:rgb(153,142,195)}
+.PuOr .q0-4{fill:rgb(230,97,1)}
+.PuOr .q1-4{fill:rgb(253,184,99)}
+.PuOr .q2-4{fill:rgb(178,171,210)}
+.PuOr .q3-4{fill:rgb(94,60,153)}
+.PuOr .q0-5{fill:rgb(230,97,1)}
+.PuOr .q1-5{fill:rgb(253,184,99)}
+.PuOr .q2-5{fill:rgb(247,247,247)}
+.PuOr .q3-5{fill:rgb(178,171,210)}
+.PuOr .q4-5{fill:rgb(94,60,153)}
+.PuOr .q0-6{fill:rgb(179,88,6)}
+.PuOr .q1-6{fill:rgb(241,163,64)}
+.PuOr .q2-6{fill:rgb(254,224,182)}
+.PuOr .q3-6{fill:rgb(216,218,235)}
+.PuOr .q4-6{fill:rgb(153,142,195)}
+.PuOr .q5-6{fill:rgb(84,39,136)}
+.PuOr .q0-7{fill:rgb(179,88,6)}
+.PuOr .q1-7{fill:rgb(241,163,64)}
+.PuOr .q2-7{fill:rgb(254,224,182)}
+.PuOr .q3-7{fill:rgb(247,247,247)}
+.PuOr .q4-7{fill:rgb(216,218,235)}
+.PuOr .q5-7{fill:rgb(153,142,195)}
+.PuOr .q6-7{fill:rgb(84,39,136)}
+.PuOr .q0-8{fill:rgb(179,88,6)}
+.PuOr .q1-8{fill:rgb(224,130,20)}
+.PuOr .q2-8{fill:rgb(253,184,99)}
+.PuOr .q3-8{fill:rgb(254,224,182)}
+.PuOr .q4-8{fill:rgb(216,218,235)}
+.PuOr .q5-8{fill:rgb(178,171,210)}
+.PuOr .q6-8{fill:rgb(128,115,172)}
+.PuOr .q7-8{fill:rgb(84,39,136)}
+.PuOr .q0-9{fill:rgb(179,88,6)}
+.PuOr .q1-9{fill:rgb(224,130,20)}
+.PuOr .q2-9{fill:rgb(253,184,99)}
+.PuOr .q3-9{fill:rgb(254,224,182)}
+.PuOr .q4-9{fill:rgb(247,247,247)}
+.PuOr .q5-9{fill:rgb(216,218,235)}
+.PuOr .q6-9{fill:rgb(178,171,210)}
+.PuOr .q7-9{fill:rgb(128,115,172)}
+.PuOr .q8-9{fill:rgb(84,39,136)}
+.PuOr .q0-10{fill:rgb(127,59,8)}
+.PuOr .q1-10{fill:rgb(179,88,6)}
+.PuOr .q2-10{fill:rgb(224,130,20)}
+.PuOr .q3-10{fill:rgb(253,184,99)}
+.PuOr .q4-10{fill:rgb(254,224,182)}
+.PuOr .q5-10{fill:rgb(216,218,235)}
+.PuOr .q6-10{fill:rgb(178,171,210)}
+.PuOr .q7-10{fill:rgb(128,115,172)}
+.PuOr .q8-10{fill:rgb(84,39,136)}
+.PuOr .q9-10{fill:rgb(45,0,75)}
+.PuOr .q0-11{fill:rgb(127,59,8)}
+.PuOr .q1-11{fill:rgb(179,88,6)}
+.PuOr .q2-11{fill:rgb(224,130,20)}
+.PuOr .q3-11{fill:rgb(253,184,99)}
+.PuOr .q4-11{fill:rgb(254,224,182)}
+.PuOr .q5-11{fill:rgb(247,247,247)}
+.PuOr .q6-11{fill:rgb(216,218,235)}
+.PuOr .q7-11{fill:rgb(178,171,210)}
+.PuOr .q8-11{fill:rgb(128,115,172)}
+.PuOr .q9-11{fill:rgb(84,39,136)}
+.PuOr .q10-11{fill:rgb(45,0,75)}
+.BrBG .q0-3{fill:rgb(216,179,101)}
+.BrBG .q1-3{fill:rgb(245,245,245)}
+.BrBG .q2-3{fill:rgb(90,180,172)}
+.BrBG .q0-4{fill:rgb(166,97,26)}
+.BrBG .q1-4{fill:rgb(223,194,125)}
+.BrBG .q2-4{fill:rgb(128,205,193)}
+.BrBG .q3-4{fill:rgb(1,133,113)}
+.BrBG .q0-5{fill:rgb(166,97,26)}
+.BrBG .q1-5{fill:rgb(223,194,125)}
+.BrBG .q2-5{fill:rgb(245,245,245)}
+.BrBG .q3-5{fill:rgb(128,205,193)}
+.BrBG .q4-5{fill:rgb(1,133,113)}
+.BrBG .q0-6{fill:rgb(140,81,10)}
+.BrBG .q1-6{fill:rgb(216,179,101)}
+.BrBG .q2-6{fill:rgb(246,232,195)}
+.BrBG .q3-6{fill:rgb(199,234,229)}
+.BrBG .q4-6{fill:rgb(90,180,172)}
+.BrBG .q5-6{fill:rgb(1,102,94)}
+.BrBG .q0-7{fill:rgb(140,81,10)}
+.BrBG .q1-7{fill:rgb(216,179,101)}
+.BrBG .q2-7{fill:rgb(246,232,195)}
+.BrBG .q3-7{fill:rgb(245,245,245)}
+.BrBG .q4-7{fill:rgb(199,234,229)}
+.BrBG .q5-7{fill:rgb(90,180,172)}
+.BrBG .q6-7{fill:rgb(1,102,94)}
+.BrBG .q0-8{fill:rgb(140,81,10)}
+.BrBG .q1-8{fill:rgb(191,129,45)}
+.BrBG .q2-8{fill:rgb(223,194,125)}
+.BrBG .q3-8{fill:rgb(246,232,195)}
+.BrBG .q4-8{fill:rgb(199,234,229)}
+.BrBG .q5-8{fill:rgb(128,205,193)}
+.BrBG .q6-8{fill:rgb(53,151,143)}
+.BrBG .q7-8{fill:rgb(1,102,94)}
+.BrBG .q0-9{fill:rgb(140,81,10)}
+.BrBG .q1-9{fill:rgb(191,129,45)}
+.BrBG .q2-9{fill:rgb(223,194,125)}
+.BrBG .q3-9{fill:rgb(246,232,195)}
+.BrBG .q4-9{fill:rgb(245,245,245)}
+.BrBG .q5-9{fill:rgb(199,234,229)}
+.BrBG .q6-9{fill:rgb(128,205,193)}
+.BrBG .q7-9{fill:rgb(53,151,143)}
+.BrBG .q8-9{fill:rgb(1,102,94)}
+.BrBG .q0-10{fill:rgb(84,48,5)}
+.BrBG .q1-10{fill:rgb(140,81,10)}
+.BrBG .q2-10{fill:rgb(191,129,45)}
+.BrBG .q3-10{fill:rgb(223,194,125)}
+.BrBG .q4-10{fill:rgb(246,232,195)}
+.BrBG .q5-10{fill:rgb(199,234,229)}
+.BrBG .q6-10{fill:rgb(128,205,193)}
+.BrBG .q7-10{fill:rgb(53,151,143)}
+.BrBG .q8-10{fill:rgb(1,102,94)}
+.BrBG .q9-10{fill:rgb(0,60,48)}
+.BrBG .q0-11{fill:rgb(84,48,5)}
+.BrBG .q1-11{fill:rgb(140,81,10)}
+.BrBG .q2-11{fill:rgb(191,129,45)}
+.BrBG .q3-11{fill:rgb(223,194,125)}
+.BrBG .q4-11{fill:rgb(246,232,195)}
+.BrBG .q5-11{fill:rgb(245,245,245)}
+.BrBG .q6-11{fill:rgb(199,234,229)}
+.BrBG .q7-11{fill:rgb(128,205,193)}
+.BrBG .q8-11{fill:rgb(53,151,143)}
+.BrBG .q9-11{fill:rgb(1,102,94)}
+.BrBG .q10-11{fill:rgb(0,60,48)}
+.PRGn .q0-3{fill:rgb(175,141,195)}
+.PRGn .q1-3{fill:rgb(247,247,247)}
+.PRGn .q2-3{fill:rgb(127,191,123)}
+.PRGn .q0-4{fill:rgb(123,50,148)}
+.PRGn .q1-4{fill:rgb(194,165,207)}
+.PRGn .q2-4{fill:rgb(166,219,160)}
+.PRGn .q3-4{fill:rgb(0,136,55)}
+.PRGn .q0-5{fill:rgb(123,50,148)}
+.PRGn .q1-5{fill:rgb(194,165,207)}
+.PRGn .q2-5{fill:rgb(247,247,247)}
+.PRGn .q3-5{fill:rgb(166,219,160)}
+.PRGn .q4-5{fill:rgb(0,136,55)}
+.PRGn .q0-6{fill:rgb(118,42,131)}
+.PRGn .q1-6{fill:rgb(175,141,195)}
+.PRGn .q2-6{fill:rgb(231,212,232)}
+.PRGn .q3-6{fill:rgb(217,240,211)}
+.PRGn .q4-6{fill:rgb(127,191,123)}
+.PRGn .q5-6{fill:rgb(27,120,55)}
+.PRGn .q0-7{fill:rgb(118,42,131)}
+.PRGn .q1-7{fill:rgb(175,141,195)}
+.PRGn .q2-7{fill:rgb(231,212,232)}
+.PRGn .q3-7{fill:rgb(247,247,247)}
+.PRGn .q4-7{fill:rgb(217,240,211)}
+.PRGn .q5-7{fill:rgb(127,191,123)}
+.PRGn .q6-7{fill:rgb(27,120,55)}
+.PRGn .q0-8{fill:rgb(118,42,131)}
+.PRGn .q1-8{fill:rgb(153,112,171)}
+.PRGn .q2-8{fill:rgb(194,165,207)}
+.PRGn .q3-8{fill:rgb(231,212,232)}
+.PRGn .q4-8{fill:rgb(217,240,211)}
+.PRGn .q5-8{fill:rgb(166,219,160)}
+.PRGn .q6-8{fill:rgb(90,174,97)}
+.PRGn .q7-8{fill:rgb(27,120,55)}
+.PRGn .q0-9{fill:rgb(118,42,131)}
+.PRGn .q1-9{fill:rgb(153,112,171)}
+.PRGn .q2-9{fill:rgb(194,165,207)}
+.PRGn .q3-9{fill:rgb(231,212,232)}
+.PRGn .q4-9{fill:rgb(247,247,247)}
+.PRGn .q5-9{fill:rgb(217,240,211)}
+.PRGn .q6-9{fill:rgb(166,219,160)}
+.PRGn .q7-9{fill:rgb(90,174,97)}
+.PRGn .q8-9{fill:rgb(27,120,55)}
+.PRGn .q0-10{fill:rgb(64,0,75)}
+.PRGn .q1-10{fill:rgb(118,42,131)}
+.PRGn .q2-10{fill:rgb(153,112,171)}
+.PRGn .q3-10{fill:rgb(194,165,207)}
+.PRGn .q4-10{fill:rgb(231,212,232)}
+.PRGn .q5-10{fill:rgb(217,240,211)}
+.PRGn .q6-10{fill:rgb(166,219,160)}
+.PRGn .q7-10{fill:rgb(90,174,97)}
+.PRGn .q8-10{fill:rgb(27,120,55)}
+.PRGn .q9-10{fill:rgb(0,68,27)}
+.PRGn .q0-11{fill:rgb(64,0,75)}
+.PRGn .q1-11{fill:rgb(118,42,131)}
+.PRGn .q2-11{fill:rgb(153,112,171)}
+.PRGn .q3-11{fill:rgb(194,165,207)}
+.PRGn .q4-11{fill:rgb(231,212,232)}
+.PRGn .q5-11{fill:rgb(247,247,247)}
+.PRGn .q6-11{fill:rgb(217,240,211)}
+.PRGn .q7-11{fill:rgb(166,219,160)}
+.PRGn .q8-11{fill:rgb(90,174,97)}
+.PRGn .q9-11{fill:rgb(27,120,55)}
+.PRGn .q10-11{fill:rgb(0,68,27)}
+.PiYG .q0-3{fill:rgb(233,163,201)}
+.PiYG .q1-3{fill:rgb(247,247,247)}
+.PiYG .q2-3{fill:rgb(161,215,106)}
+.PiYG .q0-4{fill:rgb(208,28,139)}
+.PiYG .q1-4{fill:rgb(241,182,218)}
+.PiYG .q2-4{fill:rgb(184,225,134)}
+.PiYG .q3-4{fill:rgb(77,172,38)}
+.PiYG .q0-5{fill:rgb(208,28,139)}
+.PiYG .q1-5{fill:rgb(241,182,218)}
+.PiYG .q2-5{fill:rgb(247,247,247)}
+.PiYG .q3-5{fill:rgb(184,225,134)}
+.PiYG .q4-5{fill:rgb(77,172,38)}
+.PiYG .q0-6{fill:rgb(197,27,125)}
+.PiYG .q1-6{fill:rgb(233,163,201)}
+.PiYG .q2-6{fill:rgb(253,224,239)}
+.PiYG .q3-6{fill:rgb(230,245,208)}
+.PiYG .q4-6{fill:rgb(161,215,106)}
+.PiYG .q5-6{fill:rgb(77,146,33)}
+.PiYG .q0-7{fill:rgb(197,27,125)}
+.PiYG .q1-7{fill:rgb(233,163,201)}
+.PiYG .q2-7{fill:rgb(253,224,239)}
+.PiYG .q3-7{fill:rgb(247,247,247)}
+.PiYG .q4-7{fill:rgb(230,245,208)}
+.PiYG .q5-7{fill:rgb(161,215,106)}
+.PiYG .q6-7{fill:rgb(77,146,33)}
+.PiYG .q0-8{fill:rgb(197,27,125)}
+.PiYG .q1-8{fill:rgb(222,119,174)}
+.PiYG .q2-8{fill:rgb(241,182,218)}
+.PiYG .q3-8{fill:rgb(253,224,239)}
+.PiYG .q4-8{fill:rgb(230,245,208)}
+.PiYG .q5-8{fill:rgb(184,225,134)}
+.PiYG .q6-8{fill:rgb(127,188,65)}
+.PiYG .q7-8{fill:rgb(77,146,33)}
+.PiYG .q0-9{fill:rgb(197,27,125)}
+.PiYG .q1-9{fill:rgb(222,119,174)}
+.PiYG .q2-9{fill:rgb(241,182,218)}
+.PiYG .q3-9{fill:rgb(253,224,239)}
+.PiYG .q4-9{fill:rgb(247,247,247)}
+.PiYG .q5-9{fill:rgb(230,245,208)}
+.PiYG .q6-9{fill:rgb(184,225,134)}
+.PiYG .q7-9{fill:rgb(127,188,65)}
+.PiYG .q8-9{fill:rgb(77,146,33)}
+.PiYG .q0-10{fill:rgb(142,1,82)}
+.PiYG .q1-10{fill:rgb(197,27,125)}
+.PiYG .q2-10{fill:rgb(222,119,174)}
+.PiYG .q3-10{fill:rgb(241,182,218)}
+.PiYG .q4-10{fill:rgb(253,224,239)}
+.PiYG .q5-10{fill:rgb(230,245,208)}
+.PiYG .q6-10{fill:rgb(184,225,134)}
+.PiYG .q7-10{fill:rgb(127,188,65)}
+.PiYG .q8-10{fill:rgb(77,146,33)}
+.PiYG .q9-10{fill:rgb(39,100,25)}
+.PiYG .q0-11{fill:rgb(142,1,82)}
+.PiYG .q1-11{fill:rgb(197,27,125)}
+.PiYG .q2-11{fill:rgb(222,119,174)}
+.PiYG .q3-11{fill:rgb(241,182,218)}
+.PiYG .q4-11{fill:rgb(253,224,239)}
+.PiYG .q5-11{fill:rgb(247,247,247)}
+.PiYG .q6-11{fill:rgb(230,245,208)}
+.PiYG .q7-11{fill:rgb(184,225,134)}
+.PiYG .q8-11{fill:rgb(127,188,65)}
+.PiYG .q9-11{fill:rgb(77,146,33)}
+.PiYG .q10-11{fill:rgb(39,100,25)}
+.RdBu .q0-3{fill:rgb(239,138,98)}
+.RdBu .q1-3{fill:rgb(247,247,247)}
+.RdBu .q2-3{fill:rgb(103,169,207)}
+.RdBu .q0-4{fill:rgb(202,0,32)}
+.RdBu .q1-4{fill:rgb(244,165,130)}
+.RdBu .q2-4{fill:rgb(146,197,222)}
+.RdBu .q3-4{fill:rgb(5,113,176)}
+.RdBu .q0-5{fill:rgb(202,0,32)}
+.RdBu .q1-5{fill:rgb(244,165,130)}
+.RdBu .q2-5{fill:rgb(247,247,247)}
+.RdBu .q3-5{fill:rgb(146,197,222)}
+.RdBu .q4-5{fill:rgb(5,113,176)}
+.RdBu .q0-6{fill:rgb(178,24,43)}
+.RdBu .q1-6{fill:rgb(239,138,98)}
+.RdBu .q2-6{fill:rgb(253,219,199)}
+.RdBu .q3-6{fill:rgb(209,229,240)}
+.RdBu .q4-6{fill:rgb(103,169,207)}
+.RdBu .q5-6{fill:rgb(33,102,172)}
+.RdBu .q0-7{fill:rgb(178,24,43)}
+.RdBu .q1-7{fill:rgb(239,138,98)}
+.RdBu .q2-7{fill:rgb(253,219,199)}
+.RdBu .q3-7{fill:rgb(247,247,247)}
+.RdBu .q4-7{fill:rgb(209,229,240)}
+.RdBu .q5-7{fill:rgb(103,169,207)}
+.RdBu .q6-7{fill:rgb(33,102,172)}
+.RdBu .q0-8{fill:rgb(178,24,43)}
+.RdBu .q1-8{fill:rgb(214,96,77)}
+.RdBu .q2-8{fill:rgb(244,165,130)}
+.RdBu .q3-8{fill:rgb(253,219,199)}
+.RdBu .q4-8{fill:rgb(209,229,240)}
+.RdBu .q5-8{fill:rgb(146,197,222)}
+.RdBu .q6-8{fill:rgb(67,147,195)}
+.RdBu .q7-8{fill:rgb(33,102,172)}
+.RdBu .q0-9{fill:rgb(178,24,43)}
+.RdBu .q1-9{fill:rgb(214,96,77)}
+.RdBu .q2-9{fill:rgb(244,165,130)}
+.RdBu .q3-9{fill:rgb(253,219,199)}
+.RdBu .q4-9{fill:rgb(247,247,247)}
+.RdBu .q5-9{fill:rgb(209,229,240)}
+.RdBu .q6-9{fill:rgb(146,197,222)}
+.RdBu .q7-9{fill:rgb(67,147,195)}
+.RdBu .q8-9{fill:rgb(33,102,172)}
+.RdBu .q0-10{fill:rgb(103,0,31)}
+.RdBu .q1-10{fill:rgb(178,24,43)}
+.RdBu .q2-10{fill:rgb(214,96,77)}
+.RdBu .q3-10{fill:rgb(244,165,130)}
+.RdBu .q4-10{fill:rgb(253,219,199)}
+.RdBu .q5-10{fill:rgb(209,229,240)}
+.RdBu .q6-10{fill:rgb(146,197,222)}
+.RdBu .q7-10{fill:rgb(67,147,195)}
+.RdBu .q8-10{fill:rgb(33,102,172)}
+.RdBu .q9-10{fill:rgb(5,48,97)}
+.RdBu .q0-11{fill:rgb(103,0,31)}
+.RdBu .q1-11{fill:rgb(178,24,43)}
+.RdBu .q2-11{fill:rgb(214,96,77)}
+.RdBu .q3-11{fill:rgb(244,165,130)}
+.RdBu .q4-11{fill:rgb(253,219,199)}
+.RdBu .q5-11{fill:rgb(247,247,247)}
+.RdBu .q6-11{fill:rgb(209,229,240)}
+.RdBu .q7-11{fill:rgb(146,197,222)}
+.RdBu .q8-11{fill:rgb(67,147,195)}
+.RdBu .q9-11{fill:rgb(33,102,172)}
+.RdBu .q10-11{fill:rgb(5,48,97)}
+.RdGy .q0-3{fill:rgb(239,138,98)}
+.RdGy .q1-3{fill:rgb(255,255,255)}
+.RdGy .q2-3{fill:rgb(153,153,153)}
+.RdGy .q0-4{fill:rgb(202,0,32)}
+.RdGy .q1-4{fill:rgb(244,165,130)}
+.RdGy .q2-4{fill:rgb(186,186,186)}
+.RdGy .q3-4{fill:rgb(64,64,64)}
+.RdGy .q0-5{fill:rgb(202,0,32)}
+.RdGy .q1-5{fill:rgb(244,165,130)}
+.RdGy .q2-5{fill:rgb(255,255,255)}
+.RdGy .q3-5{fill:rgb(186,186,186)}
+.RdGy .q4-5{fill:rgb(64,64,64)}
+.RdGy .q0-6{fill:rgb(178,24,43)}
+.RdGy .q1-6{fill:rgb(239,138,98)}
+.RdGy .q2-6{fill:rgb(253,219,199)}
+.RdGy .q3-6{fill:rgb(224,224,224)}
+.RdGy .q4-6{fill:rgb(153,153,153)}
+.RdGy .q5-6{fill:rgb(77,77,77)}
+.RdGy .q0-7{fill:rgb(178,24,43)}
+.RdGy .q1-7{fill:rgb(239,138,98)}
+.RdGy .q2-7{fill:rgb(253,219,199)}
+.RdGy .q3-7{fill:rgb(255,255,255)}
+.RdGy .q4-7{fill:rgb(224,224,224)}
+.RdGy .q5-7{fill:rgb(153,153,153)}
+.RdGy .q6-7{fill:rgb(77,77,77)}
+.RdGy .q0-8{fill:rgb(178,24,43)}
+.RdGy .q1-8{fill:rgb(214,96,77)}
+.RdGy .q2-8{fill:rgb(244,165,130)}
+.RdGy .q3-8{fill:rgb(253,219,199)}
+.RdGy .q4-8{fill:rgb(224,224,224)}
+.RdGy .q5-8{fill:rgb(186,186,186)}
+.RdGy .q6-8{fill:rgb(135,135,135)}
+.RdGy .q7-8{fill:rgb(77,77,77)}
+.RdGy .q0-9{fill:rgb(178,24,43)}
+.RdGy .q1-9{fill:rgb(214,96,77)}
+.RdGy .q2-9{fill:rgb(244,165,130)}
+.RdGy .q3-9{fill:rgb(253,219,199)}
+.RdGy .q4-9{fill:rgb(255,255,255)}
+.RdGy .q5-9{fill:rgb(224,224,224)}
+.RdGy .q6-9{fill:rgb(186,186,186)}
+.RdGy .q7-9{fill:rgb(135,135,135)}
+.RdGy .q8-9{fill:rgb(77,77,77)}
+.RdGy .q0-10{fill:rgb(103,0,31)}
+.RdGy .q1-10{fill:rgb(178,24,43)}
+.RdGy .q2-10{fill:rgb(214,96,77)}
+.RdGy .q3-10{fill:rgb(244,165,130)}
+.RdGy .q4-10{fill:rgb(253,219,199)}
+.RdGy .q5-10{fill:rgb(224,224,224)}
+.RdGy .q6-10{fill:rgb(186,186,186)}
+.RdGy .q7-10{fill:rgb(135,135,135)}
+.RdGy .q8-10{fill:rgb(77,77,77)}
+.RdGy .q9-10{fill:rgb(26,26,26)}
+.RdGy .q0-11{fill:rgb(103,0,31)}
+.RdGy .q1-11{fill:rgb(178,24,43)}
+.RdGy .q2-11{fill:rgb(214,96,77)}
+.RdGy .q3-11{fill:rgb(244,165,130)}
+.RdGy .q4-11{fill:rgb(253,219,199)}
+.RdGy .q5-11{fill:rgb(255,255,255)}
+.RdGy .q6-11{fill:rgb(224,224,224)}
+.RdGy .q7-11{fill:rgb(186,186,186)}
+.RdGy .q8-11{fill:rgb(135,135,135)}
+.RdGy .q9-11{fill:rgb(77,77,77)}
+.RdGy .q10-11{fill:rgb(26,26,26)}
+.RdYlBu .q0-3{fill:rgb(252,141,89)}
+.RdYlBu .q1-3{fill:rgb(255,255,191)}
+.RdYlBu .q2-3{fill:rgb(145,191,219)}
+.RdYlBu .q0-4{fill:rgb(215,25,28)}
+.RdYlBu .q1-4{fill:rgb(253,174,97)}
+.RdYlBu .q2-4{fill:rgb(171,217,233)}
+.RdYlBu .q3-4{fill:rgb(44,123,182)}
+.RdYlBu .q0-5{fill:rgb(215,25,28)}
+.RdYlBu .q1-5{fill:rgb(253,174,97)}
+.RdYlBu .q2-5{fill:rgb(255,255,191)}
+.RdYlBu .q3-5{fill:rgb(171,217,233)}
+.RdYlBu .q4-5{fill:rgb(44,123,182)}
+.RdYlBu .q0-6{fill:rgb(215,48,39)}
+.RdYlBu .q1-6{fill:rgb(252,141,89)}
+.RdYlBu .q2-6{fill:rgb(254,224,144)}
+.RdYlBu .q3-6{fill:rgb(224,243,248)}
+.RdYlBu .q4-6{fill:rgb(145,191,219)}
+.RdYlBu .q5-6{fill:rgb(69,117,180)}
+.RdYlBu .q0-7{fill:rgb(215,48,39)}
+.RdYlBu .q1-7{fill:rgb(252,141,89)}
+.RdYlBu .q2-7{fill:rgb(254,224,144)}
+.RdYlBu .q3-7{fill:rgb(255,255,191)}
+.RdYlBu .q4-7{fill:rgb(224,243,248)}
+.RdYlBu .q5-7{fill:rgb(145,191,219)}
+.RdYlBu .q6-7{fill:rgb(69,117,180)}
+.RdYlBu .q0-8{fill:rgb(215,48,39)}
+.RdYlBu .q1-8{fill:rgb(244,109,67)}
+.RdYlBu .q2-8{fill:rgb(253,174,97)}
+.RdYlBu .q3-8{fill:rgb(254,224,144)}
+.RdYlBu .q4-8{fill:rgb(224,243,248)}
+.RdYlBu .q5-8{fill:rgb(171,217,233)}
+.RdYlBu .q6-8{fill:rgb(116,173,209)}
+.RdYlBu .q7-8{fill:rgb(69,117,180)}
+.RdYlBu .q0-9{fill:rgb(215,48,39)}
+.RdYlBu .q1-9{fill:rgb(244,109,67)}
+.RdYlBu .q2-9{fill:rgb(253,174,97)}
+.RdYlBu .q3-9{fill:rgb(254,224,144)}
+.RdYlBu .q4-9{fill:rgb(255,255,191)}
+.RdYlBu .q5-9{fill:rgb(224,243,248)}
+.RdYlBu .q6-9{fill:rgb(171,217,233)}
+.RdYlBu .q7-9{fill:rgb(116,173,209)}
+.RdYlBu .q8-9{fill:rgb(69,117,180)}
+.RdYlBu .q0-10{fill:rgb(165,0,38)}
+.RdYlBu .q1-10{fill:rgb(215,48,39)}
+.RdYlBu .q2-10{fill:rgb(244,109,67)}
+.RdYlBu .q3-10{fill:rgb(253,174,97)}
+.RdYlBu .q4-10{fill:rgb(254,224,144)}
+.RdYlBu .q5-10{fill:rgb(224,243,248)}
+.RdYlBu .q6-10{fill:rgb(171,217,233)}
+.RdYlBu .q7-10{fill:rgb(116,173,209)}
+.RdYlBu .q8-10{fill:rgb(69,117,180)}
+.RdYlBu .q9-10{fill:rgb(49,54,149)}
+.RdYlBu .q0-11{fill:rgb(165,0,38)}
+.RdYlBu .q1-11{fill:rgb(215,48,39)}
+.RdYlBu .q2-11{fill:rgb(244,109,67)}
+.RdYlBu .q3-11{fill:rgb(253,174,97)}
+.RdYlBu .q4-11{fill:rgb(254,224,144)}
+.RdYlBu .q5-11{fill:rgb(255,255,191)}
+.RdYlBu .q6-11{fill:rgb(224,243,248)}
+.RdYlBu .q7-11{fill:rgb(171,217,233)}
+.RdYlBu .q8-11{fill:rgb(116,173,209)}
+.RdYlBu .q9-11{fill:rgb(69,117,180)}
+.RdYlBu .q10-11{fill:rgb(49,54,149)}
+.Spectral .q0-3{fill:rgb(252,141,89)}
+.Spectral .q1-3{fill:rgb(255,255,191)}
+.Spectral .q2-3{fill:rgb(153,213,148)}
+.Spectral .q0-4{fill:rgb(215,25,28)}
+.Spectral .q1-4{fill:rgb(253,174,97)}
+.Spectral .q2-4{fill:rgb(171,221,164)}
+.Spectral .q3-4{fill:rgb(43,131,186)}
+.Spectral .q0-5{fill:rgb(215,25,28)}
+.Spectral .q1-5{fill:rgb(253,174,97)}
+.Spectral .q2-5{fill:rgb(255,255,191)}
+.Spectral .q3-5{fill:rgb(171,221,164)}
+.Spectral .q4-5{fill:rgb(43,131,186)}
+.Spectral .q0-6{fill:rgb(213,62,79)}
+.Spectral .q1-6{fill:rgb(252,141,89)}
+.Spectral .q2-6{fill:rgb(254,224,139)}
+.Spectral .q3-6{fill:rgb(230,245,152)}
+.Spectral .q4-6{fill:rgb(153,213,148)}
+.Spectral .q5-6{fill:rgb(50,136,189)}
+.Spectral .q0-7{fill:rgb(213,62,79)}
+.Spectral .q1-7{fill:rgb(252,141,89)}
+.Spectral .q2-7{fill:rgb(254,224,139)}
+.Spectral .q3-7{fill:rgb(255,255,191)}
+.Spectral .q4-7{fill:rgb(230,245,152)}
+.Spectral .q5-7{fill:rgb(153,213,148)}
+.Spectral .q6-7{fill:rgb(50,136,189)}
+.Spectral .q0-8{fill:rgb(213,62,79)}
+.Spectral .q1-8{fill:rgb(244,109,67)}
+.Spectral .q2-8{fill:rgb(253,174,97)}
+.Spectral .q3-8{fill:rgb(254,224,139)}
+.Spectral .q4-8{fill:rgb(230,245,152)}
+.Spectral .q5-8{fill:rgb(171,221,164)}
+.Spectral .q6-8{fill:rgb(102,194,165)}
+.Spectral .q7-8{fill:rgb(50,136,189)}
+.Spectral .q0-9{fill:rgb(213,62,79)}
+.Spectral .q1-9{fill:rgb(244,109,67)}
+.Spectral .q2-9{fill:rgb(253,174,97)}
+.Spectral .q3-9{fill:rgb(254,224,139)}
+.Spectral .q4-9{fill:rgb(255,255,191)}
+.Spectral .q5-9{fill:rgb(230,245,152)}
+.Spectral .q6-9{fill:rgb(171,221,164)}
+.Spectral .q7-9{fill:rgb(102,194,165)}
+.Spectral .q8-9{fill:rgb(50,136,189)}
+.Spectral .q0-10{fill:rgb(158,1,66)}
+.Spectral .q1-10{fill:rgb(213,62,79)}
+.Spectral .q2-10{fill:rgb(244,109,67)}
+.Spectral .q3-10{fill:rgb(253,174,97)}
+.Spectral .q4-10{fill:rgb(254,224,139)}
+.Spectral .q5-10{fill:rgb(230,245,152)}
+.Spectral .q6-10{fill:rgb(171,221,164)}
+.Spectral .q7-10{fill:rgb(102,194,165)}
+.Spectral .q8-10{fill:rgb(50,136,189)}
+.Spectral .q9-10{fill:rgb(94,79,162)}
+.Spectral .q0-11{fill:rgb(158,1,66)}
+.Spectral .q1-11{fill:rgb(213,62,79)}
+.Spectral .q2-11{fill:rgb(244,109,67)}
+.Spectral .q3-11{fill:rgb(253,174,97)}
+.Spectral .q4-11{fill:rgb(254,224,139)}
+.Spectral .q5-11{fill:rgb(255,255,191)}
+.Spectral .q6-11{fill:rgb(230,245,152)}
+.Spectral .q7-11{fill:rgb(171,221,164)}
+.Spectral .q8-11{fill:rgb(102,194,165)}
+.Spectral .q9-11{fill:rgb(50,136,189)}
+.Spectral .q10-11{fill:rgb(94,79,162)}
+.RdYlGn .q0-3{fill:rgb(252,141,89)}
+.RdYlGn .q1-3{fill:rgb(255,255,191)}
+.RdYlGn .q2-3{fill:rgb(145,207,96)}
+.RdYlGn .q0-4{fill:rgb(215,25,28)}
+.RdYlGn .q1-4{fill:rgb(253,174,97)}
+.RdYlGn .q2-4{fill:rgb(166,217,106)}
+.RdYlGn .q3-4{fill:rgb(26,150,65)}
+.RdYlGn .q0-5{fill:rgb(215,25,28)}
+.RdYlGn .q1-5{fill:rgb(253,174,97)}
+.RdYlGn .q2-5{fill:rgb(255,255,191)}
+.RdYlGn .q3-5{fill:rgb(166,217,106)}
+.RdYlGn .q4-5{fill:rgb(26,150,65)}
+.RdYlGn .q0-6{fill:rgb(215,48,39)}
+.RdYlGn .q1-6{fill:rgb(252,141,89)}
+.RdYlGn .q2-6{fill:rgb(254,224,139)}
+.RdYlGn .q3-6{fill:rgb(217,239,139)}
+.RdYlGn .q4-6{fill:rgb(145,207,96)}
+.RdYlGn .q5-6{fill:rgb(26,152,80)}
+.RdYlGn .q0-7{fill:rgb(215,48,39)}
+.RdYlGn .q1-7{fill:rgb(252,141,89)}
+.RdYlGn .q2-7{fill:rgb(254,224,139)}
+.RdYlGn .q3-7{fill:rgb(255,255,191)}
+.RdYlGn .q4-7{fill:rgb(217,239,139)}
+.RdYlGn .q5-7{fill:rgb(145,207,96)}
+.RdYlGn .q6-7{fill:rgb(26,152,80)}
+.RdYlGn .q0-8{fill:rgb(215,48,39)}
+.RdYlGn .q1-8{fill:rgb(244,109,67)}
+.RdYlGn .q2-8{fill:rgb(253,174,97)}
+.RdYlGn .q3-8{fill:rgb(254,224,139)}
+.RdYlGn .q4-8{fill:rgb(217,239,139)}
+.RdYlGn .q5-8{fill:rgb(166,217,106)}
+.RdYlGn .q6-8{fill:rgb(102,189,99)}
+.RdYlGn .q7-8{fill:rgb(26,152,80)}
+.RdYlGn .q0-9{fill:rgb(215,48,39)}
+.RdYlGn .q1-9{fill:rgb(244,109,67)}
+.RdYlGn .q2-9{fill:rgb(253,174,97)}
+.RdYlGn .q3-9{fill:rgb(254,224,139)}
+.RdYlGn .q4-9{fill:rgb(255,255,191)}
+.RdYlGn .q5-9{fill:rgb(217,239,139)}
+.RdYlGn .q6-9{fill:rgb(166,217,106)}
+.RdYlGn .q7-9{fill:rgb(102,189,99)}
+.RdYlGn .q8-9{fill:rgb(26,152,80)}
+.RdYlGn .q0-10{fill:rgb(165,0,38)}
+.RdYlGn .q1-10{fill:rgb(215,48,39)}
+.RdYlGn .q2-10{fill:rgb(244,109,67)}
+.RdYlGn .q3-10{fill:rgb(253,174,97)}
+.RdYlGn .q4-10{fill:rgb(254,224,139)}
+.RdYlGn .q5-10{fill:rgb(217,239,139)}
+.RdYlGn .q6-10{fill:rgb(166,217,106)}
+.RdYlGn .q7-10{fill:rgb(102,189,99)}
+.RdYlGn .q8-10{fill:rgb(26,152,80)}
+.RdYlGn .q9-10{fill:rgb(0,104,55)}
+.RdYlGn .q0-11{fill:rgb(165,0,38)}
+.RdYlGn .q1-11{fill:rgb(215,48,39)}
+.RdYlGn .q2-11{fill:rgb(244,109,67)}
+.RdYlGn .q3-11{fill:rgb(253,174,97)}
+.RdYlGn .q4-11{fill:rgb(254,224,139)}
+.RdYlGn .q5-11{fill:rgb(255,255,191)}
+.RdYlGn .q6-11{fill:rgb(217,239,139)}
+.RdYlGn .q7-11{fill:rgb(166,217,106)}
+.RdYlGn .q8-11{fill:rgb(102,189,99)}
+.RdYlGn .q9-11{fill:rgb(26,152,80)}
+.RdYlGn .q10-11{fill:rgb(0,104,55)}
Index: Dev/branches/Demo/d3/lib/colorbrewer/colorbrewer.js
===================================================================
--- Dev/branches/Demo/d3/lib/colorbrewer/colorbrewer.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/colorbrewer/colorbrewer.js	(revision 225)
@@ -0,0 +1,32 @@
+/*
+ * This product includes color specifications and designs developed by Cynthia
+ * Brewer (http://colorbrewer.org/).
+ */
+var colorbrewer = {
+YlGn:{3:["rgb(247,252,185)","rgb(173,221,142)","rgb(49,163,84)"],4:["rgb(255,255,204)","rgb(194,230,153)","rgb(120,198,121)","rgb(35,132,67)"],5:["rgb(255,255,204)","rgb(194,230,153)","rgb(120,198,121)","rgb(49,163,84)","rgb(0,104,55)"],6:["rgb(255,255,204)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(49,163,84)","rgb(0,104,55)"],7:["rgb(255,255,204)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,90,50)"],8:["rgb(255,255,229)","rgb(247,252,185)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,90,50)"],9:["rgb(255,255,229)","rgb(247,252,185)","rgb(217,240,163)","rgb(173,221,142)","rgb(120,198,121)","rgb(65,171,93)","rgb(35,132,67)","rgb(0,104,55)","rgb(0,69,41)"]},
+YlGnBu:{3:["rgb(237,248,177)","rgb(127,205,187)","rgb(44,127,184)"],4:["rgb(255,255,204)","rgb(161,218,180)","rgb(65,182,196)","rgb(34,94,168)"],5:["rgb(255,255,204)","rgb(161,218,180)","rgb(65,182,196)","rgb(44,127,184)","rgb(37,52,148)"],6:["rgb(255,255,204)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(44,127,184)","rgb(37,52,148)"],7:["rgb(255,255,204)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(12,44,132)"],8:["rgb(255,255,217)","rgb(237,248,177)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(12,44,132)"],9:["rgb(255,255,217)","rgb(237,248,177)","rgb(199,233,180)","rgb(127,205,187)","rgb(65,182,196)","rgb(29,145,192)","rgb(34,94,168)","rgb(37,52,148)","rgb(8,29,88)"]},
+GnBu:{3:["rgb(224,243,219)","rgb(168,221,181)","rgb(67,162,202)"],4:["rgb(240,249,232)","rgb(186,228,188)","rgb(123,204,196)","rgb(43,140,190)"],5:["rgb(240,249,232)","rgb(186,228,188)","rgb(123,204,196)","rgb(67,162,202)","rgb(8,104,172)"],6:["rgb(240,249,232)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(67,162,202)","rgb(8,104,172)"],7:["rgb(240,249,232)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,88,158)"],8:["rgb(247,252,240)","rgb(224,243,219)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,88,158)"],9:["rgb(247,252,240)","rgb(224,243,219)","rgb(204,235,197)","rgb(168,221,181)","rgb(123,204,196)","rgb(78,179,211)","rgb(43,140,190)","rgb(8,104,172)","rgb(8,64,129)"]},
+BuGn:{3:["rgb(229,245,249)","rgb(153,216,201)","rgb(44,162,95)"],4:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(35,139,69)"],5:["rgb(237,248,251)","rgb(178,226,226)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],6:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(44,162,95)","rgb(0,109,44)"],7:["rgb(237,248,251)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],8:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,88,36)"],9:["rgb(247,252,253)","rgb(229,245,249)","rgb(204,236,230)","rgb(153,216,201)","rgb(102,194,164)","rgb(65,174,118)","rgb(35,139,69)","rgb(0,109,44)","rgb(0,68,27)"]},
+PuBuGn:{3:["rgb(236,226,240)","rgb(166,189,219)","rgb(28,144,153)"],4:["rgb(246,239,247)","rgb(189,201,225)","rgb(103,169,207)","rgb(2,129,138)"],5:["rgb(246,239,247)","rgb(189,201,225)","rgb(103,169,207)","rgb(28,144,153)","rgb(1,108,89)"],6:["rgb(246,239,247)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(28,144,153)","rgb(1,108,89)"],7:["rgb(246,239,247)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,100,80)"],8:["rgb(255,247,251)","rgb(236,226,240)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,100,80)"],9:["rgb(255,247,251)","rgb(236,226,240)","rgb(208,209,230)","rgb(166,189,219)","rgb(103,169,207)","rgb(54,144,192)","rgb(2,129,138)","rgb(1,108,89)","rgb(1,70,54)"]},
+PuBu:{3:["rgb(236,231,242)","rgb(166,189,219)","rgb(43,140,190)"],4:["rgb(241,238,246)","rgb(189,201,225)","rgb(116,169,207)","rgb(5,112,176)"],5:["rgb(241,238,246)","rgb(189,201,225)","rgb(116,169,207)","rgb(43,140,190)","rgb(4,90,141)"],6:["rgb(241,238,246)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(43,140,190)","rgb(4,90,141)"],7:["rgb(241,238,246)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(3,78,123)"],8:["rgb(255,247,251)","rgb(236,231,242)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(3,78,123)"],9:["rgb(255,247,251)","rgb(236,231,242)","rgb(208,209,230)","rgb(166,189,219)","rgb(116,169,207)","rgb(54,144,192)","rgb(5,112,176)","rgb(4,90,141)","rgb(2,56,88)"]},
+BuPu:{3:["rgb(224,236,244)","rgb(158,188,218)","rgb(136,86,167)"],4:["rgb(237,248,251)","rgb(179,205,227)","rgb(140,150,198)","rgb(136,65,157)"],5:["rgb(237,248,251)","rgb(179,205,227)","rgb(140,150,198)","rgb(136,86,167)","rgb(129,15,124)"],6:["rgb(237,248,251)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(136,86,167)","rgb(129,15,124)"],7:["rgb(237,248,251)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(110,1,107)"],8:["rgb(247,252,253)","rgb(224,236,244)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(110,1,107)"],9:["rgb(247,252,253)","rgb(224,236,244)","rgb(191,211,230)","rgb(158,188,218)","rgb(140,150,198)","rgb(140,107,177)","rgb(136,65,157)","rgb(129,15,124)","rgb(77,0,75)"]},
+RdPu:{3:["rgb(253,224,221)","rgb(250,159,181)","rgb(197,27,138)"],4:["rgb(254,235,226)","rgb(251,180,185)","rgb(247,104,161)","rgb(174,1,126)"],5:["rgb(254,235,226)","rgb(251,180,185)","rgb(247,104,161)","rgb(197,27,138)","rgb(122,1,119)"],6:["rgb(254,235,226)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(197,27,138)","rgb(122,1,119)"],7:["rgb(254,235,226)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(221,52,151)","rgb(174,1,126)","rgb(122,1,119)"],8:["rgb(255,247,243)","rgb(253,224,221)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(221,52,151)","rgb(174,1,126)","rgb(122,1,119)"],9:["rgb(255,247,243)","rgb(253,224,221)","rgb(252,197,192)","rgb(250,159,181)","rgb(247,104,161)","rgb(221,52,151)","rgb(174,1,126)","rgb(122,1,119)","rgb(73,0,106)"]},
+PuRd:{3:["rgb(231,225,239)","rgb(201,148,199)","rgb(221,28,119)"],4:["rgb(241,238,246)","rgb(215,181,216)","rgb(223,101,176)","rgb(206,18,86)"],5:["rgb(241,238,246)","rgb(215,181,216)","rgb(223,101,176)","rgb(221,28,119)","rgb(152,0,67)"],6:["rgb(241,238,246)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(221,28,119)","rgb(152,0,67)"],7:["rgb(241,238,246)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(231,41,138)","rgb(206,18,86)","rgb(145,0,63)"],8:["rgb(247,244,249)","rgb(231,225,239)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(231,41,138)","rgb(206,18,86)","rgb(145,0,63)"],9:["rgb(247,244,249)","rgb(231,225,239)","rgb(212,185,218)","rgb(201,148,199)","rgb(223,101,176)","rgb(231,41,138)","rgb(206,18,86)","rgb(152,0,67)","rgb(103,0,31)"]},
+OrRd:{3:["rgb(254,232,200)","rgb(253,187,132)","rgb(227,74,51)"],4:["rgb(254,240,217)","rgb(253,204,138)","rgb(252,141,89)","rgb(215,48,31)"],5:["rgb(254,240,217)","rgb(253,204,138)","rgb(252,141,89)","rgb(227,74,51)","rgb(179,0,0)"],6:["rgb(254,240,217)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(227,74,51)","rgb(179,0,0)"],7:["rgb(254,240,217)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(239,101,72)","rgb(215,48,31)","rgb(153,0,0)"],8:["rgb(255,247,236)","rgb(254,232,200)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(239,101,72)","rgb(215,48,31)","rgb(153,0,0)"],9:["rgb(255,247,236)","rgb(254,232,200)","rgb(253,212,158)","rgb(253,187,132)","rgb(252,141,89)","rgb(239,101,72)","rgb(215,48,31)","rgb(179,0,0)","rgb(127,0,0)"]},
+YlOrRd:{3:["rgb(255,237,160)","rgb(254,178,76)","rgb(240,59,32)"],4:["rgb(255,255,178)","rgb(254,204,92)","rgb(253,141,60)","rgb(227,26,28)"],5:["rgb(255,255,178)","rgb(254,204,92)","rgb(253,141,60)","rgb(240,59,32)","rgb(189,0,38)"],6:["rgb(255,255,178)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(240,59,32)","rgb(189,0,38)"],7:["rgb(255,255,178)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(252,78,42)","rgb(227,26,28)","rgb(177,0,38)"],8:["rgb(255,255,204)","rgb(255,237,160)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(252,78,42)","rgb(227,26,28)","rgb(177,0,38)"],9:["rgb(255,255,204)","rgb(255,237,160)","rgb(254,217,118)","rgb(254,178,76)","rgb(253,141,60)","rgb(252,78,42)","rgb(227,26,28)","rgb(189,0,38)","rgb(128,0,38)"]},
+YlOrBr:{3:["rgb(255,247,188)","rgb(254,196,79)","rgb(217,95,14)"],4:["rgb(255,255,212)","rgb(254,217,142)","rgb(254,153,41)","rgb(204,76,2)"],5:["rgb(255,255,212)","rgb(254,217,142)","rgb(254,153,41)","rgb(217,95,14)","rgb(153,52,4)"],6:["rgb(255,255,212)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(217,95,14)","rgb(153,52,4)"],7:["rgb(255,255,212)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(236,112,20)","rgb(204,76,2)","rgb(140,45,4)"],8:["rgb(255,255,229)","rgb(255,247,188)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(236,112,20)","rgb(204,76,2)","rgb(140,45,4)"],9:["rgb(255,255,229)","rgb(255,247,188)","rgb(254,227,145)","rgb(254,196,79)","rgb(254,153,41)","rgb(236,112,20)","rgb(204,76,2)","rgb(153,52,4)","rgb(102,37,6)"]},
+Purples:{3:["rgb(239,237,245)","rgb(188,189,220)","rgb(117,107,177)"],4:["rgb(242,240,247)","rgb(203,201,226)","rgb(158,154,200)","rgb(106,81,163)"],5:["rgb(242,240,247)","rgb(203,201,226)","rgb(158,154,200)","rgb(117,107,177)","rgb(84,39,143)"],6:["rgb(242,240,247)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(117,107,177)","rgb(84,39,143)"],7:["rgb(242,240,247)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(128,125,186)","rgb(106,81,163)","rgb(74,20,134)"],8:["rgb(252,251,253)","rgb(239,237,245)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(128,125,186)","rgb(106,81,163)","rgb(74,20,134)"],9:["rgb(252,251,253)","rgb(239,237,245)","rgb(218,218,235)","rgb(188,189,220)","rgb(158,154,200)","rgb(128,125,186)","rgb(106,81,163)","rgb(84,39,143)","rgb(63,0,125)"]},
+Blues:{3:["rgb(222,235,247)","rgb(158,202,225)","rgb(49,130,189)"],4:["rgb(239,243,255)","rgb(189,215,231)","rgb(107,174,214)","rgb(33,113,181)"],5:["rgb(239,243,255)","rgb(189,215,231)","rgb(107,174,214)","rgb(49,130,189)","rgb(8,81,156)"],6:["rgb(239,243,255)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(49,130,189)","rgb(8,81,156)"],7:["rgb(239,243,255)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(66,146,198)","rgb(33,113,181)","rgb(8,69,148)"],8:["rgb(247,251,255)","rgb(222,235,247)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(66,146,198)","rgb(33,113,181)","rgb(8,69,148)"],9:["rgb(247,251,255)","rgb(222,235,247)","rgb(198,219,239)","rgb(158,202,225)","rgb(107,174,214)","rgb(66,146,198)","rgb(33,113,181)","rgb(8,81,156)","rgb(8,48,107)"]},
+Greens:{3:["rgb(229,245,224)","rgb(161,217,155)","rgb(49,163,84)"],4:["rgb(237,248,233)","rgb(186,228,179)","rgb(116,196,118)","rgb(35,139,69)"],5:["rgb(237,248,233)","rgb(186,228,179)","rgb(116,196,118)","rgb(49,163,84)","rgb(0,109,44)"],6:["rgb(237,248,233)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(49,163,84)","rgb(0,109,44)"],7:["rgb(237,248,233)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(65,171,93)","rgb(35,139,69)","rgb(0,90,50)"],8:["rgb(247,252,245)","rgb(229,245,224)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(65,171,93)","rgb(35,139,69)","rgb(0,90,50)"],9:["rgb(247,252,245)","rgb(229,245,224)","rgb(199,233,192)","rgb(161,217,155)","rgb(116,196,118)","rgb(65,171,93)","rgb(35,139,69)","rgb(0,109,44)","rgb(0,68,27)"]},
+Oranges:{3:["rgb(254,230,206)","rgb(253,174,107)","rgb(230,85,13)"],4:["rgb(254,237,222)","rgb(253,190,133)","rgb(253,141,60)","rgb(217,71,1)"],5:["rgb(254,237,222)","rgb(253,190,133)","rgb(253,141,60)","rgb(230,85,13)","rgb(166,54,3)"],6:["rgb(254,237,222)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(230,85,13)","rgb(166,54,3)"],7:["rgb(254,237,222)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(241,105,19)","rgb(217,72,1)","rgb(140,45,4)"],8:["rgb(255,245,235)","rgb(254,230,206)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(241,105,19)","rgb(217,72,1)","rgb(140,45,4)"],9:["rgb(255,245,235)","rgb(254,230,206)","rgb(253,208,162)","rgb(253,174,107)","rgb(253,141,60)","rgb(241,105,19)","rgb(217,72,1)","rgb(166,54,3)","rgb(127,39,4)"]},
+Reds:{3:["rgb(254,224,210)","rgb(252,146,114)","rgb(222,45,38)"],4:["rgb(254,229,217)","rgb(252,174,145)","rgb(251,106,74)","rgb(203,24,29)"],5:["rgb(254,229,217)","rgb(252,174,145)","rgb(251,106,74)","rgb(222,45,38)","rgb(165,15,21)"],6:["rgb(254,229,217)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(222,45,38)","rgb(165,15,21)"],7:["rgb(254,229,217)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(239,59,44)","rgb(203,24,29)","rgb(153,0,13)"],8:["rgb(255,245,240)","rgb(254,224,210)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(239,59,44)","rgb(203,24,29)","rgb(153,0,13)"],9:["rgb(255,245,240)","rgb(254,224,210)","rgb(252,187,161)","rgb(252,146,114)","rgb(251,106,74)","rgb(239,59,44)","rgb(203,24,29)","rgb(165,15,21)","rgb(103,0,13)"]},
+Greys:{3:["rgb(240,240,240)","rgb(189,189,189)","rgb(99,99,99)"],4:["rgb(247,247,247)","rgb(204,204,204)","rgb(150,150,150)","rgb(82,82,82)"],5:["rgb(247,247,247)","rgb(204,204,204)","rgb(150,150,150)","rgb(99,99,99)","rgb(37,37,37)"],6:["rgb(247,247,247)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(99,99,99)","rgb(37,37,37)"],7:["rgb(247,247,247)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(115,115,115)","rgb(82,82,82)","rgb(37,37,37)"],8:["rgb(255,255,255)","rgb(240,240,240)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(115,115,115)","rgb(82,82,82)","rgb(37,37,37)"],9:["rgb(255,255,255)","rgb(240,240,240)","rgb(217,217,217)","rgb(189,189,189)","rgb(150,150,150)","rgb(115,115,115)","rgb(82,82,82)","rgb(37,37,37)","rgb(0,0,0)"]},
+PuOr:{3:["rgb(241,163,64)","rgb(247,247,247)","rgb(153,142,195)"],4:["rgb(230,97,1)","rgb(253,184,99)","rgb(178,171,210)","rgb(94,60,153)"],5:["rgb(230,97,1)","rgb(253,184,99)","rgb(247,247,247)","rgb(178,171,210)","rgb(94,60,153)"],6:["rgb(179,88,6)","rgb(241,163,64)","rgb(254,224,182)","rgb(216,218,235)","rgb(153,142,195)","rgb(84,39,136)"],7:["rgb(179,88,6)","rgb(241,163,64)","rgb(254,224,182)","rgb(247,247,247)","rgb(216,218,235)","rgb(153,142,195)","rgb(84,39,136)"],8:["rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)"],9:["rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(247,247,247)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)"],10:["rgb(127,59,8)","rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)","rgb(45,0,75)"],11:["rgb(127,59,8)","rgb(179,88,6)","rgb(224,130,20)","rgb(253,184,99)","rgb(254,224,182)","rgb(247,247,247)","rgb(216,218,235)","rgb(178,171,210)","rgb(128,115,172)","rgb(84,39,136)","rgb(45,0,75)"]},
+BrBG:{3:["rgb(216,179,101)","rgb(245,245,245)","rgb(90,180,172)"],4:["rgb(166,97,26)","rgb(223,194,125)","rgb(128,205,193)","rgb(1,133,113)"],5:["rgb(166,97,26)","rgb(223,194,125)","rgb(245,245,245)","rgb(128,205,193)","rgb(1,133,113)"],6:["rgb(140,81,10)","rgb(216,179,101)","rgb(246,232,195)","rgb(199,234,229)","rgb(90,180,172)","rgb(1,102,94)"],7:["rgb(140,81,10)","rgb(216,179,101)","rgb(246,232,195)","rgb(245,245,245)","rgb(199,234,229)","rgb(90,180,172)","rgb(1,102,94)"],8:["rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)"],9:["rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(245,245,245)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)"],10:["rgb(84,48,5)","rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)","rgb(0,60,48)"],11:["rgb(84,48,5)","rgb(140,81,10)","rgb(191,129,45)","rgb(223,194,125)","rgb(246,232,195)","rgb(245,245,245)","rgb(199,234,229)","rgb(128,205,193)","rgb(53,151,143)","rgb(1,102,94)","rgb(0,60,48)"]},
+PRGn:{3:["rgb(175,141,195)","rgb(247,247,247)","rgb(127,191,123)"],4:["rgb(123,50,148)","rgb(194,165,207)","rgb(166,219,160)","rgb(0,136,55)"],5:["rgb(123,50,148)","rgb(194,165,207)","rgb(247,247,247)","rgb(166,219,160)","rgb(0,136,55)"],6:["rgb(118,42,131)","rgb(175,141,195)","rgb(231,212,232)","rgb(217,240,211)","rgb(127,191,123)","rgb(27,120,55)"],7:["rgb(118,42,131)","rgb(175,141,195)","rgb(231,212,232)","rgb(247,247,247)","rgb(217,240,211)","rgb(127,191,123)","rgb(27,120,55)"],8:["rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)"],9:["rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(247,247,247)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)"],10:["rgb(64,0,75)","rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)","rgb(0,68,27)"],11:["rgb(64,0,75)","rgb(118,42,131)","rgb(153,112,171)","rgb(194,165,207)","rgb(231,212,232)","rgb(247,247,247)","rgb(217,240,211)","rgb(166,219,160)","rgb(90,174,97)","rgb(27,120,55)","rgb(0,68,27)"]},
+PiYG:{3:["rgb(233,163,201)","rgb(247,247,247)","rgb(161,215,106)"],4:["rgb(208,28,139)","rgb(241,182,218)","rgb(184,225,134)","rgb(77,172,38)"],5:["rgb(208,28,139)","rgb(241,182,218)","rgb(247,247,247)","rgb(184,225,134)","rgb(77,172,38)"],6:["rgb(197,27,125)","rgb(233,163,201)","rgb(253,224,239)","rgb(230,245,208)","rgb(161,215,106)","rgb(77,146,33)"],7:["rgb(197,27,125)","rgb(233,163,201)","rgb(253,224,239)","rgb(247,247,247)","rgb(230,245,208)","rgb(161,215,106)","rgb(77,146,33)"],8:["rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)"],9:["rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(247,247,247)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)"],10:["rgb(142,1,82)","rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)","rgb(39,100,25)"],11:["rgb(142,1,82)","rgb(197,27,125)","rgb(222,119,174)","rgb(241,182,218)","rgb(253,224,239)","rgb(247,247,247)","rgb(230,245,208)","rgb(184,225,134)","rgb(127,188,65)","rgb(77,146,33)","rgb(39,100,25)"]},
+RdBu:{3:["rgb(239,138,98)","rgb(247,247,247)","rgb(103,169,207)"],4:["rgb(202,0,32)","rgb(244,165,130)","rgb(146,197,222)","rgb(5,113,176)"],5:["rgb(202,0,32)","rgb(244,165,130)","rgb(247,247,247)","rgb(146,197,222)","rgb(5,113,176)"],6:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(209,229,240)","rgb(103,169,207)","rgb(33,102,172)"],7:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(103,169,207)","rgb(33,102,172)"],8:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)"],9:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)"],10:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],11:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"]},
+RdGy:{3:["rgb(239,138,98)","rgb(255,255,255)","rgb(153,153,153)"],4:["rgb(202,0,32)","rgb(244,165,130)","rgb(186,186,186)","rgb(64,64,64)"],5:["rgb(202,0,32)","rgb(244,165,130)","rgb(255,255,255)","rgb(186,186,186)","rgb(64,64,64)"],6:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(224,224,224)","rgb(153,153,153)","rgb(77,77,77)"],7:["rgb(178,24,43)","rgb(239,138,98)","rgb(253,219,199)","rgb(255,255,255)","rgb(224,224,224)","rgb(153,153,153)","rgb(77,77,77)"],8:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)"],9:["rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(255,255,255)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)"],10:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)","rgb(26,26,26)"],11:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(255,255,255)","rgb(224,224,224)","rgb(186,186,186)","rgb(135,135,135)","rgb(77,77,77)","rgb(26,26,26)"]},
+RdYlBu:{3:["rgb(252,141,89)","rgb(255,255,191)","rgb(145,191,219)"],4:["rgb(215,25,28)","rgb(253,174,97)","rgb(171,217,233)","rgb(44,123,182)"],5:["rgb(215,25,28)","rgb(253,174,97)","rgb(255,255,191)","rgb(171,217,233)","rgb(44,123,182)"],6:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,144)","rgb(224,243,248)","rgb(145,191,219)","rgb(69,117,180)"],7:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,144)","rgb(255,255,191)","rgb(224,243,248)","rgb(145,191,219)","rgb(69,117,180)"],8:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)"],9:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(255,255,191)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)"],10:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)","rgb(49,54,149)"],11:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,144)","rgb(255,255,191)","rgb(224,243,248)","rgb(171,217,233)","rgb(116,173,209)","rgb(69,117,180)","rgb(49,54,149)"]},
+Spectral:{3:["rgb(252,141,89)","rgb(255,255,191)","rgb(153,213,148)"],4:["rgb(215,25,28)","rgb(253,174,97)","rgb(171,221,164)","rgb(43,131,186)"],5:["rgb(215,25,28)","rgb(253,174,97)","rgb(255,255,191)","rgb(171,221,164)","rgb(43,131,186)"],6:["rgb(213,62,79)","rgb(252,141,89)","rgb(254,224,139)","rgb(230,245,152)","rgb(153,213,148)","rgb(50,136,189)"],7:["rgb(213,62,79)","rgb(252,141,89)","rgb(254,224,139)","rgb(255,255,191)","rgb(230,245,152)","rgb(153,213,148)","rgb(50,136,189)"],8:["rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)"],9:["rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)"],10:["rgb(158,1,66)","rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)","rgb(94,79,162)"],11:["rgb(158,1,66)","rgb(213,62,79)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(230,245,152)","rgb(171,221,164)","rgb(102,194,165)","rgb(50,136,189)","rgb(94,79,162)"]},
+RdYlGn:{3:["rgb(252,141,89)","rgb(255,255,191)","rgb(145,207,96)"],4:["rgb(215,25,28)","rgb(253,174,97)","rgb(166,217,106)","rgb(26,150,65)"],5:["rgb(215,25,28)","rgb(253,174,97)","rgb(255,255,191)","rgb(166,217,106)","rgb(26,150,65)"],6:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,139)","rgb(217,239,139)","rgb(145,207,96)","rgb(26,152,80)"],7:["rgb(215,48,39)","rgb(252,141,89)","rgb(254,224,139)","rgb(255,255,191)","rgb(217,239,139)","rgb(145,207,96)","rgb(26,152,80)"],8:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)"],9:["rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)"],10:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)","rgb(0,104,55)"],11:["rgb(165,0,38)","rgb(215,48,39)","rgb(244,109,67)","rgb(253,174,97)","rgb(254,224,139)","rgb(255,255,191)","rgb(217,239,139)","rgb(166,217,106)","rgb(102,189,99)","rgb(26,152,80)","rgb(0,104,55)"]}};
Index: Dev/branches/Demo/d3/lib/env-js/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/LICENSE	(revision 225)
@@ -0,0 +1,20 @@
+Copyright (c) 2009 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: Dev/branches/Demo/d3/lib/env-js/bin/envjs
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/bin/envjs	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/bin/envjs	(revision 225)
@@ -0,0 +1,39 @@
+#!/bin/sh
+# 	Usage: envjs <platorm> file.js [file2.js ...]
+###########################################################################
+ENVJS_PLATFORM='node'
+
+# 	first arguments ($1) 
+#		may be a platform or is a file and the default platorm is used
+if [ -n "$1" ]; then 
+    if [ -n "$1" ]; then ENVJS_PLATFORM="$1"; shift; fi
+fi
+
+#   Run envjs with the given platform
+###########################################################################
+case "$ENVJS_PLATFORM" in
+
+    "node")
+        node envjs/node.js $@
+        ;;
+    "rhino")
+        java -Xmx512M -jar rhino/js.jar -opt -1 envjs/rhino.js $@
+        ;;
+    "rhino-debug")
+        java -cp rhino/js.jar org.mozilla.javascript.tools.debugger.Main envjs/rhino.js $@
+        ;;
+    "spyd")
+        python envjs/spydermonkey.py envjs/spydermonkey.js $@
+        ;;
+    "rubyracer")
+        ruby -rrubygems envjs/rubyracer.rb envjs/rubyracer.js $@
+        ;;
+    "johnson")
+        ruby -rrubygems envjs/johnson.rb envjs/johnson.js $@
+        ;;
+	*)
+		#	platform default means $1 was actually a file
+        node envjs/node.js $ENVJS_PLATFORM $@
+        ;;
+esac
+
Index: Dev/branches/Demo/d3/lib/env-js/envjs/console.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/console.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/console.js	(revision 225)
@@ -0,0 +1,278 @@
+
+/**
+ * @author envjs team
+ * @Console
+ */
+
+var Envjs = Envjs || require('./platform/core').Envjs;
+
+/*
+ * Envjs console.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+/**
+ * @author envjs team
+ * borrowed 99%-ish with love from firebug-lite
+ */
+
+//leaked globally on purpose;
+try{
+    console.log();
+}catch(e){
+
+
+function escapeHTML(value)
+{
+    return value;
+}
+
+function objectToString(object)
+{
+    try
+    {
+        return object+"";
+    }
+    catch (exc)
+    {
+        return null;
+    }
+}
+
+// ********************************************************************************************
+
+function appendText(object, html)
+{
+    html.push(escapeHTML(objectToString(object)));
+}
+
+function appendNull(object, html)
+{
+    html.push(escapeHTML(objectToString(object)));
+}
+
+function appendString(object, html)
+{
+    html.push(escapeHTML(objectToString(object)));
+}
+
+function appendInteger(object, html)
+{
+    html.push(escapeHTML(objectToString(object)));
+}
+
+function appendFloat(object, html)
+{
+    html.push(escapeHTML(objectToString(object)));
+}
+
+function appendFunction(object, html)
+{
+    var reName = /function ?(.*?)\(/;
+    var m = reName.exec(objectToString(object));
+    var name = m ? m[1] : "function";
+    html.push(escapeHTML(name));
+}
+
+function appendObjectFormatted(object, html)
+{
+    var text = objectToString(object);
+    var reObject = /\[object (.*?)\]/;
+
+    var m = reObject.exec(text);
+    html.push( m ? m[1] : text);
+}
+
+function appendSelector(object, html)
+{
+
+    html.push(escapeHTML(object.nodeName.toLowerCase()));
+    if (object.id) {
+        html.push(escapeHTML(object.id));
+    }
+    if (object.className) {
+        html.push(escapeHTML(object.className));
+    }
+}
+
+function appendNode(node, html)
+{
+    if (node.nodeType == 1)
+    {
+        html.push( node.nodeName.toLowerCase());
+
+        for (var i = 0; i < node.attributes.length; ++i)
+        {
+            var attr = node.attributes[i];
+            if (!attr.specified) {
+                continue;
+        }
+
+            html.push( attr.nodeName.toLowerCase(),escapeHTML(attr.nodeValue));
+        }
+
+        if (node.firstChild)
+        {
+            for (var child = node.firstChild; child; child = child.nextSibling) {
+                appendNode(child, html);
+        }
+
+            html.push( node.nodeName.toLowerCase());
+        }
+    }
+    else if (node.nodeType === 3)
+    {
+        html.push(escapeHTML(node.nodeValue));
+    }
+}
+
+function appendObject(object, html)
+{
+    try
+    {
+        if (object === undefined) {
+            appendNull("undefined", html);
+        } else if (object === null) {
+            appendNull("null", html);
+        } else if (typeof object == "string") {
+            appendString(object, html);
+    } else if (typeof object == "number") {
+            appendInteger(object, html);
+    } else if (typeof object == "function") {
+            appendFunction(object, html);
+        } else if (object.nodeType == 1) {
+            appendSelector(object, html);
+        } else if (typeof object == "object") {
+            appendObjectFormatted(object, html);
+        } else {
+            appendText(object, html);
+    }
+    }
+    catch (exc)
+    {
+    }
+}
+
+
+function parseFormat(format)
+{
+    var parts = [];
+
+    var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
+    var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
+
+    for (var m = reg.exec(format); m; m = reg.exec(format))
+    {
+        var type = m[8] ? m[8] : m[5];
+        var appender = type in appenderMap ? appenderMap[type] : appendObject;
+        var precision = m[3] ? parseInt(m[3], 10) : (m[4] == "." ? -1 : 0);
+
+        parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
+        parts.push({appender: appender, precision: precision});
+
+        format = format.substr(m.index+m[0].length);
+    }
+
+    parts.push(format);
+
+    return parts;
+}
+
+
+
+function logFormatted(objects, className)
+{
+    var html = [],
+        i= 0,
+        object;
+
+    var format = objects[0];
+    var objIndex = 0;
+
+    if (typeof(format) != "string")
+    {
+        format = "";
+        objIndex = -1;
+    }
+
+    var parts = parseFormat(format);
+    for (i = 0; i < parts.length; ++i)
+    {
+        var part = parts[i];
+        if (part && typeof(part) == "object")
+        {
+            object = objects[++objIndex];
+            part.appender(object, html);
+        }
+        else {
+            appendText(part, html);
+        }
+    }
+
+    for (i = objIndex+1; i < objects.length; ++i)
+    {
+        appendText(" ", html);
+
+        object = objects[i];
+        if (typeof(object) == "string") {
+            appendText(object, html);
+        } else {
+            appendObject(object, html);
+        }
+    }
+
+    Envjs.log(html.join(' '));
+}
+
+
+Console = function(module){
+    var $level,
+        $logger,
+        $null = function(){};
+    $logger = {
+        log: function(level){
+            logFormatted(arguments, "");
+        },
+        debug: function(level){
+            logFormatted(arguments, "DEBUG");
+        },
+        info:  function(level){
+            logFormatted(arguments, "INFO");
+        },
+        warn:  function(level){
+            logFormatted(arguments, "WARN");
+        },
+        error:  function(level){
+            logFormatted(arguments, "ERROR");
+        },
+        trace: function(){
+            Envjs.trace();
+        }
+    };
+
+    return $logger;
+};
+
+console = new Console();
+exports.console = console;
+
+}
+
+
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/css.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/css.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/css.js	(revision 225)
@@ -0,0 +1,695 @@
+
+/**
+ * DOM Style Level 2
+ 
+Leaked globally 
+
+var CSS2Properties,
+    CSSRule,
+    CSSStyleRule,
+    CSSImportRule,
+    CSSMediaRule,
+    CSSFontFaceRule,
+    CSSPageRule,
+    CSSRuleList,
+    CSSStyleSheet,
+    StyleSheet,
+    StyleSheetList;
+
+*/
+	
+var Envjs = Envjs || require('./platform/core').Envjs,
+	Document = require('./dom').Document,
+	HTMLElement = require('./html').HTMLElement;
+/*
+ * Envjs css.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    } 
+    return a;
+}
+
+/**
+ * @author john resig
+ */
+//from jQuery
+function __setArray__( target, array ) {
+    // Resetting the length to 0, then using the native Array push
+    // is a super-fast way to populate an object with array-like properties
+    target.length = 0;
+    Array.prototype.push.apply( target, array );
+}
+
+/**
+ * @author ariel flesler
+ *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
+ * @param {Object} str
+ */
+function __trim__( str ){
+    return (str || "").replace( /^\s+|\s+$/g, "" );
+}
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Document').debug('available'); 
+});
+
+/**
+ * Interface DocumentStyle (introduced in DOM Level 2)
+ * http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html#StyleSheets-StyleSheet-DocumentStyle
+ *
+ * interface DocumentStyle {
+ *   readonly attribute StyleSheetList   styleSheets;
+ * };
+ *
+ */
+
+__extend__(Document.prototype, {
+    get styleSheets() {
+        if (! this._styleSheets) {
+            this._styleSheets = new StyleSheetList();
+        }
+        return this._styleSheets;
+    }
+});
+
+}(/*Envjs.DOM.Document*/));
+/*
+ * CSS2Properties - DOM Level 2 CSS
+ * Renamed to CSSStyleDeclaration??
+ */
+
+var __toCamelCase__ = function(name) {
+    if (name) {
+        return name.replace(/\-(\w)/g, function(all, letter) {
+            return letter.toUpperCase();
+        });
+    }
+    return name;
+};
+
+var __toDashed__ = function(camelCaseName) {
+    if (camelCaseName) {
+        return camelCaseName.replace(/[A-Z]/g, function(all) {
+            return '-' + all.toLowerCase();
+        });
+    }
+    return camelCaseName;
+};
+
+var __cssTextToStyles__,
+    __supportedStyles__;
+    
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.CSS.CSS2Properties').debug('available'); 
+});
+
+exports.CSS2Properties = CSS2Properties = function(element){
+    //console.log('css2properties %s', __cssproperties__++);
+    this.styleIndex = __supportedStyles__;//non-standard
+    this.type = element.tagName;//non-standard
+    __setArray__(this, []);
+    __cssTextToStyles__(this, element.cssText || '');
+};
+__extend__(CSS2Properties.prototype, {
+    get cssText() {
+        var i, css = [];
+        for (i = 0; i < this.length; ++i) {
+            css.push(this[i] + ': ' + this.getPropertyValue(this[i]) + ';');
+        }
+        return css.join(' ');
+    },
+    set cssText(cssText) {
+        __cssTextToStyles__(this, cssText);
+    },
+    getPropertyCSSValue: function(name) {
+        //?
+    },
+    getPropertyPriority: function() {
+
+    },
+    getPropertyValue: function(name) {
+        var index, cname = __toCamelCase__(name);
+        if (cname in this.styleIndex) {
+            return this[cname];
+        } else {
+            index = Array.prototype.indexOf.apply(this, [name]);
+            if (index > -1) {
+                return this[index];
+            }
+        }
+        return null;
+    },
+    item: function(index) {
+        return this[index];
+    },
+    removeProperty: function(name) {
+        this.styleIndex[name] = null;
+        name = __toDashed__(name);
+        var index = Array.prototype.indexOf.apply(this, [name]);
+        if (index > -1) {
+            Array.prototype.splice.apply(this, [1,index]);
+        }
+    },
+    setProperty: function(name, value, priority) {
+        var nval;
+        name = __toCamelCase__(name);
+        if (value !== undefined && name in this.styleIndex) {
+            // NOTE:  parseFloat('300px') ==> 300  no
+            // NOTE:  Number('300px') ==> Nan      yes
+            nval = Number(value);
+            this.styleIndex[name] = isNaN(nval) ? value : nval;
+            name = __toDashed__(name);
+            if (Array.prototype.indexOf.apply(this, [name]) === -1 ){
+                Array.prototype.push.apply(this,[name]);
+            }
+        }
+    },
+    toString: function() {
+        return '[object CSS2Properties]';
+    }
+});
+
+
+
+__cssTextToStyles__ = function(css2props, cssText) {
+    //console.log('__cssTextToStyles__ %s %s', css2props, cssText);
+    var i, style, styles = cssText.split(';');
+    for (i = 0; i < styles.length; ++i) {
+        style = styles[i].split(':');
+        if (style.length === 2) {
+            css2props.setProperty(
+                style[0].replace(' ', '', 'g'),
+                style[1].replace(' ', '', 'g')
+            );
+        }
+    }
+};
+
+//Obviously these arent all supported but by commenting out various
+//sections this provides a single location to configure what is
+//exposed as supported.
+__supportedStyles__ = {
+    azimuth:                null,
+    background:             null,
+    backgroundAttachment:   null,
+    backgroundColor:        'rgb(0,0,0)',
+    backgroundImage:        null,
+    backgroundPosition:     null,
+    backgroundRepeat:       null,
+    border:                 null,
+    borderBottom:           null,
+    borderBottomColor:      null,
+    borderBottomStyle:      null,
+    borderBottomWidth:      null,
+    borderCollapse:         null,
+    borderColor:            null,
+    borderLeft:             null,
+    borderLeftColor:        null,
+    borderLeftStyle:        null,
+    borderLeftWidth:        null,
+    borderRight:            null,
+    borderRightColor:       null,
+    borderRightStyle:       null,
+    borderRightWidth:       null,
+    borderSpacing:          null,
+    borderStyle:            null,
+    borderTop:              null,
+    borderTopColor:         null,
+    borderTopStyle:         null,
+    borderTopWidth:         null,
+    borderWidth:            null,
+    bottom:                 null,
+    captionSide:            null,
+    clear:                  null,
+    clip:                   null,
+    color:                  null,
+    content:                null,
+    counterIncrement:       null,
+    counterReset:           null,
+    cssFloat:               null,
+    cue:                    null,
+    cueAfter:               null,
+    cueBefore:              null,
+    cursor:                 null,
+    direction:              'ltr',
+    display:                null,
+    elevation:              null,
+    emptyCells:             null,
+    font:                   null,
+    fontFamily:             null,
+    fontSize:               '1em',
+    fontSizeAdjust:         null,
+    fontStretch:            null,
+    fontStyle:              null,
+    fontVariant:            null,
+    fontWeight:             null,
+    height:                 '',
+    left:                   null,
+    letterSpacing:          null,
+    lineHeight:             null,
+    listStyle:              null,
+    listStyleImage:         null,
+    listStylePosition:      null,
+    listStyleType:          null,
+    margin:                 null,
+    marginBottom:           '0px',
+    marginLeft:             '0px',
+    marginRight:            '0px',
+    marginTop:              '0px',
+    markerOffset:           null,
+    marks:                  null,
+    maxHeight:              null,
+    maxWidth:               null,
+    minHeight:              null,
+    minWidth:               null,
+    opacity:                1,
+    orphans:                null,
+    outline:                null,
+    outlineColor:           null,
+    outlineOffset:          null,
+    outlineStyle:           null,
+    outlineWidth:           null,
+    overflow:               null,
+    overflowX:              null,
+    overflowY:              null,
+    padding:                null,
+    paddingBottom:          '0px',
+    paddingLeft:            '0px',
+    paddingRight:           '0px',
+    paddingTop:             '0px',
+    page:                   null,
+    pageBreakAfter:         null,
+    pageBreakBefore:        null,
+    pageBreakInside:        null,
+    pause:                  null,
+    pauseAfter:             null,
+    pauseBefore:            null,
+    pitch:                  null,
+    pitchRange:             null,
+    position:               null,
+    quotes:                 null,
+    richness:               null,
+    right:                  null,
+    size:                   null,
+    speak:                  null,
+    speakHeader:            null,
+    speakNumeral:           null,
+    speakPunctuation:       null,
+    speechRate:             null,
+    stress:                 null,
+    tableLayout:            null,
+    textAlign:              null,
+    textDecoration:         null,
+    textIndent:             null,
+    textShadow:             null,
+    textTransform:          null,
+    top:                    null,
+    unicodeBidi:            null,
+    verticalAlign:          null,
+    visibility:             '',
+    voiceFamily:            null,
+    volume:                 null,
+    whiteSpace:             null,
+    widows:                 null,
+    width:                  '1px',
+    wordSpacing:            null,
+    zIndex:                 1
+};
+
+var __displayMap__ = {
+    DIV      : 'block',
+    P        : 'block',
+    A        : 'inline',
+    CODE     : 'inline',
+    PRE      : 'block',
+    SPAN     : 'inline',
+    TABLE    : 'table',
+    THEAD    : 'table-header-group',
+    TBODY    : 'table-row-group',
+    TR       : 'table-row',
+    TH       : 'table-cell',
+    TD       : 'table-cell',
+    UL       : 'block',
+    LI       : 'list-item'
+};
+
+var __addStyleAccessor__ = function(name){
+    if (name === 'width' || name === 'height') {
+        CSS2Properties.prototype.__defineGetter__(name, function() {
+            if (this.display === 'none'){
+                return '0px';
+            }
+            return this.styleIndex[name];
+        });
+    } else if (name === 'display') {
+        //display will be set to a tagName specific value if ''
+        CSS2Properties.prototype.__defineGetter__(name, function() {
+            var val = this.styleIndex[name];
+            val = val ? val :__displayMap__[this.type];
+            return val;
+        });
+    } else {
+        CSS2Properties.prototype.__defineGetter__(name, function() {
+            return this.styleIndex[name];
+        });
+    }
+    CSS2Properties.prototype.__defineSetter__(name, function(value) {
+        this.setProperty(name, value);
+    });
+};
+
+for (var style in __supportedStyles__) {
+    if (__supportedStyles__.hasOwnProperty(style)) {
+        __addStyleAccessor__(style);
+    }
+}
+
+}(/*Envjs.CSS.CSS2Properties*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.CSS.CSSRule').debug('available'); 
+});
+
+/*
+ * CSSRule - DOM Level 2
+ */
+exports.CSSRule = CSSRule = function(options) {
+
+    var $style,
+        $selectorText = options.selectorText ? options.selectorText : '';
+        $style = new CSS2Properties({
+            cssText: options.cssText ? options.cssText : null
+        });
+
+    return __extend__(this, {
+        get style(){
+            return $style;
+        },
+        get selectorText(){
+            return $selectorText;
+        },
+        set selectorText(selectorText){
+            $selectorText = selectorText;
+        },
+        toString : function(){
+            return "[object CSSRule]";
+        }
+    });
+};
+
+CSSRule.STYLE_RULE     =  1;
+CSSRule.IMPORT_RULE    =  3;
+CSSRule.MEDIA_RULE     =  4;
+CSSRule.FONT_FACE_RULE =  5;
+CSSRule.PAGE_RULE      =  6;
+//CSSRule.NAMESPACE_RULE = 10;
+
+
+CSSStyleRule = function() {
+
+};
+
+CSSImportRule = function() {
+
+};
+
+CSSMediaRule = function() {
+
+};
+
+CSSFontFaceRule = function() {
+
+};
+
+CSSPageRule = function() {
+
+};
+
+
+CSSRuleList = function(data) {
+    this.length = 0;
+    __setArray__(this, data);
+};
+
+__extend__(CSSRuleList.prototype, {
+    item : function(index) {
+        if ((index >= 0) && (index < this.length)) {
+            // bounds check
+            return this[index];
+        }
+        return null;
+    },
+    toString: function() {
+        return '[object CSSRuleList]';
+    }
+});
+
+}(/*Envjs.CSS.CSSRuleList*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.CSS.CSSStyleSheet').debug('available'); 
+});
+
+/**
+ * StyleSheet
+ * http://dev.w3.org/csswg/cssom/#stylesheet
+ *
+ * interface StyleSheet {
+ *   readonly attribute DOMString type;
+ *   readonly attribute DOMString href;
+ *   readonly attribute Node ownerNode;
+ *   readonly attribute StyleSheet parentStyleSheet;
+ *   readonly attribute DOMString title;
+ *   [PutForwards=mediaText] readonly attribute MediaList media;
+ *          attribute boolean disabled;
+ * };
+ */
+StyleSheet = function() {};
+
+/*
+ * CSSStyleSheet
+ * http://dev.w3.org/csswg/cssom/#cssstylesheet
+ *
+ * interface CSSStyleSheet : StyleSheet {
+ *   readonly attribute CSSRule ownerRule;
+ *   readonly attribute CSSRuleList cssRules;
+ *   unsigned long insertRule(DOMString rule, unsigned long index);
+ *   void deleteRule(unsigned long index);
+ * };
+ */
+exports.CSSStyleSheets = CSSStyleSheet = function(options){
+    var $cssRules,
+        $disabled = options.disabled ? options.disabled : false,
+        $href = options.href ? options.href : null,
+        $parentStyleSheet = options.parentStyleSheet ? options.parentStyleSheet : null,
+        $title = options.title ? options.title : "",
+        $type = "text/css";
+
+    function parseStyleSheet(text){
+        //$debug("parsing css");
+        //this is pretty ugly, but text is the entire text of a stylesheet
+        var cssRules = [];
+        if (!text) {
+            text = '';
+        }
+        text = __trim__(text.replace(/\/\*(\r|\n|.)*\*\//g,""));
+        // TODO: @import
+        var blocks = text.split("}");
+        blocks.pop();
+        var i, j, len = blocks.length;
+        var definition_block, properties, selectors;
+        for (i=0; i<len; i++) {
+            definition_block = blocks[i].split("{");
+            if (definition_block.length === 2) {
+                selectors = definition_block[0].split(",");
+                for (j=0; j<selectors.length; j++) {
+                    cssRules.push(new CSSRule({
+                        selectorText : __trim__(selectors[j]),
+                        cssText      : definition_block[1]
+                    }));
+                }
+            }
+        }
+        return cssRules;
+    }
+
+    $cssRules = new CSSRuleList(parseStyleSheet(options.textContent));
+
+    return __extend__(this, {
+        get cssRules(){
+            return $cssRules;
+        },
+        get rule(){
+            return $cssRules;
+        },//IE - may be deprecated
+        get href(){
+            return $href;
+        },
+        get parentStyleSheet(){
+            return $parentStyleSheet;
+        },
+        get title(){
+            return $title;
+        },
+        get type(){
+            return $type;
+        },
+        addRule: function(selector, style, index){/*TODO*/},
+        deleteRule: function(index){/*TODO*/},
+        insertRule: function(rule, index){/*TODO*/},
+        //IE - may be deprecated
+        removeRule: function(index){
+            this.deleteRule(index);
+        }
+    });
+};
+
+exports.StyleSheetList = StyleSheetList = function() {};
+
+StyleSheetList.prototype = [];
+
+__extend__(StyleSheetList.prototype, {
+    item : function(index) {
+        if ((index >= 0) && (index < this.length)) {
+            // bounds check
+            return this[index];
+        }
+        return null;
+    },
+    toString: function() {
+        return '[object StyleSheetList]';
+    }
+});
+
+}(/*Envjs.CSS.CSSStyleSheet*/));
+/**
+ * This extends HTMLElement to handle CSS-specific interfaces.
+ *
+ * More work / research would be needed to extend just (DOM) Element
+ * for xml use and additional changes for just HTMLElement.
+ */
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.HTML.HTMLElement').debug('available'); 
+});
+
+
+/**
+ * Replace or add  the getter for 'style'
+ *
+ * This could be wrapped in a closure
+ */
+var $css2properties = [{}];
+
+__extend__(HTMLElement.prototype, {
+    get style(){
+        if ( !this.css2uuid ) {
+            this.css2uuid = $css2properties.length;
+            $css2properties[this.css2uuid] = new CSS2Properties(this);
+        }
+        return $css2properties[this.css2uuid];
+    }
+});
+
+/**
+ * Change for how 'setAttribute("style", ...)' works
+ *
+ * We are truly adding functionality to HtmlElement.setAttribute, not
+ * replacing it.  So we need to save the old one first, call it, then
+ * do our stuff.  If we need to do more hacks like this, HTMLElement
+ * (or regular Element) needs to have a hooks array or dispatch table
+ * for global changes.
+ *
+ * This could be wrapped in a closure if desired.
+ */
+var updateCss2Props = function(elem, values) {
+    //console.log('__updateCss2Props__ %s %s', elem, values);
+    if ( !elem.css2uuid ) {
+        elem.css2uuid = $css2properties.length;
+        $css2properties[elem.css2uuid] = new CSS2Properties(elem);
+    }
+    __cssTextToStyles__($css2properties[elem.css2uuid], values);
+};
+
+var origSetAttribute =  HTMLElement.prototype.setAttribute;
+
+HTMLElement.prototype.setAttribute = function(name, value) {
+    //console.log("CSS set attribute: " + name + ", " + value);
+    origSetAttribute.apply(this, arguments);
+    if (name === "style") {
+        updateCss2Props(this, value);
+    }
+};
+
+var origGetAttribute =  HTMLElement.prototype.getAttribute;
+
+HTMLElement.prototype.getAttribute = function(name) {
+    //console.log("CSS set attribute: " + name + ", " + value);
+	var style;
+    if (name === "style") {
+        style = this.style.cssText;
+		return style===""?null:style;
+    }else{
+	    return origGetAttribute.apply(this, arguments);
+	}
+};
+
+}(/*Envjs.HTML.HTMLElement*/));
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/dom.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/dom.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/dom.js	(revision 225)
@@ -0,0 +1,8972 @@
+/*
+ * Envjs dom.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ * 
+ * Parts of the implementation were originally written by:\
+ * and Jon van Noort   (jon@webarcana.com.au) \
+ * and David Joham     (djoham@yahoo.com)",\ 
+ * and Scott Severtson
+ * 
+ * This file simply provides the global definitions we need to \
+ * be able to correctly implement to core browser DOM interfaces."
+
+The following are leaked globally intentionally
+
+var Attr,
+    CDATASection,
+    CharacterData,
+    Comment,
+    Document,
+    DocumentFragment,
+    DocumentType,
+    DOMException,
+    DOMImplementation,
+    Element,
+    Entity,
+    EntityReference,
+    NamedNodeMap,
+    Namespace,
+    Node,
+    NodeList,
+    Notation,
+    ProcessingInstruction,
+    Text,
+    Range,
+    XMLSerializer,
+    DOMParser,
+	XPathResult,
+	XPathExpression;
+
+*/
+
+var Envjs = Envjs || require('./platform/core').Envjs,
+	After = After || require('./platform/core').After;
+
+/*
+ * Envjs dom.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    } 
+    return a;
+}
+
+/**
+ * @author john resig
+ */
+//from jQuery
+function __setArray__( target, array ) {
+    // Resetting the length to 0, then using the native Array push
+    // is a super-fast way to populate an object with array-like properties
+    target.length = 0;
+    Array.prototype.push.apply( target, array );
+}
+var __findItemIndex__,
+	__insertBefore__,
+	__replaceChild__,
+	__removeChild__,
+	__appendChild__,
+	__addToIndexes__,
+	__removeFromIndexes__,
+	__cloneNodes__;
+	
+//see namednodemap for these implementations
+var __addToNamedIndexes__, 
+	__removeFromNamedIndexes__;
+	
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.NodeList').debug('available'); 
+});
+/**
+ * @class  NodeList -
+ *      provides the abstraction of an ordered collection of nodes
+ *
+ * @param  ownerDocument : Document - the ownerDocument
+ * @param  parentNode    : Node - the node that the NodeList is attached to (or null)
+ */
+exports.NodeList = NodeList = function(ownerDocument, parentNode) {
+    this.parentNode = parentNode;
+    this.ownerDocument = ownerDocument;
+    this._readonly = false;
+};
+NodeList.prototype = [];
+__extend__(NodeList.prototype, {
+    item : function(index) {
+        var ret = null;
+        if ((index >= 0) && (index < this.length)) {
+            // bounds check
+            ret = this[index];
+        }
+        // if the index is out of bounds, default value null is returned
+        return ret;
+    },
+    get xml() {
+        var ret = "",
+            j;
+
+        // create string containing the concatenation of the string values of each child
+        for (j=0; j < this.length; j++) {
+            if(this[j] !== null){
+                if(this[j].nodeType == Node.TEXT_NODE && j>0 &&
+                   this[j-1].nodeType == Node.TEXT_NODE){
+                    //add a single space between adjacent text nodes
+                    ret += " "+this[j].xml;
+                }else{
+                    ret += this[j].xml;
+                }
+            }
+        }
+        return ret;
+    },
+    toArray: function () {
+		return this;
+    },
+    toString: function(){
+        return "[object NodeList]";
+    }
+});
+
+
+/**
+ * @method __findItemIndex__
+ *      find the item index of the node
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  node : Node
+ * @return : int
+ */
+__findItemIndex__ = function (nodelist, node) {
+    // if node is not found, default value -1 is returned
+    // return ret;
+	return nodelist.indexOf(node);
+};
+
+/**
+ * @method __insertBefore__
+ *      insert the specified Node into the NodeList before the specified index
+ *      Used by Node.insertBefore(). Note: Node.insertBefore() is responsible
+ *      for Node Pointer surgery __insertBefore__ simply modifies the internal
+ *      data structure (Array).
+ * @param  newChild      : Node - the Node to be inserted
+ * @param  refChildIndex : int     - the array index to insert the Node before
+ */
+__insertBefore__ = function(nodelist, newChild, refChildIndex) {
+    if ((refChildIndex >= 0) && (refChildIndex <= nodelist.length)) {
+        // bounds check
+        if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+            // node is a DocumentFragment
+            // append the children of DocumentFragment
+            Array.prototype.splice.apply(nodelist,
+                [refChildIndex, 0].concat(newChild.childNodes.toArray()));
+        }
+        else {
+            // append the newChild
+            Array.prototype.splice.apply(nodelist,[refChildIndex, 0, newChild]);
+			__addToIndexes__(newChild, nodelist.parentNode);
+        }
+    }
+};
+
+/**
+ * @method __replaceChild__
+ *      replace the specified Node in the NodeList at the specified index
+ *      Used by Node.replaceChild(). Note: Node.replaceChild() is responsible
+ *      for Node Pointer surgery __replaceChild__ simply modifies the internal
+ *      data structure (Array).
+ *
+ * @param  newChild      : Node - the Node to be inserted
+ * @param  refChildIndex : int     - the array index to hold the Node
+ */
+__replaceChild__ = function(nodelist, newChild, refChildIndex) {
+    var ret = null;
+
+    // bounds check
+    if ((refChildIndex >= 0) && (refChildIndex < nodelist.length)) {
+        // preserve old child for return
+        ret = nodelist[refChildIndex];
+
+        if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+            // node is a DocumentFragment
+            // get array containing children prior to refChild
+            Array.prototype.splice.apply(nodelist,
+                [refChildIndex, 1].concat(newChild.childNodes.toArray()));
+        }
+        else {
+            // simply replace node in array (links between Nodes are
+            // made at higher level)
+            nodelist[refChildIndex] = newChild;
+        }
+    }
+    // return replaced node
+    return ret;
+};
+
+/**
+ * @method __removeChild__
+ *      remove the specified Node in the NodeList at the specified index
+ *      Used by Node.removeChild(). Note: Node.removeChild() is responsible
+ *      for Node Pointer surgery __removeChild__ simply modifies the internal
+ *      data structure (Array).
+ * @param  refChildIndex : int - the array index holding the Node to be removed
+ */
+__removeChild__ = function(nodelist, refChildIndex) {
+    var ret = null;
+
+    if (refChildIndex > -1) {
+        // found it!
+        // return removed node
+        ret = nodelist[refChildIndex];
+        // rebuild array without removed child
+        Array.prototype.splice.apply(nodelist,[refChildIndex, 1]);
+		__removeFromIndexes__(ret, nodelist.parentNode);
+    }
+    // return removed node
+    return ret;
+};
+
+/**
+ * @method __appendChild__
+ *      append the specified Node to the NodeList. Used by Node.appendChild().
+ *      Note: Node.appendChild() is responsible for Node Pointer surgery
+ *      __appendChild__ simply modifies the internal data structure (Array).
+ * @param  newChild      : Node - the Node to be inserted
+ */
+__appendChild__ = function(nodelist, newChild) {
+	log.debug('Appending child %s to nodelist %s', newChild.nodeName, nodelist.length);
+	var i;
+    if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+        // newChild is a DocumentFragment
+        // append the children of DocumentFragment
+        Array.prototype.push.apply(nodelist, newChild.childNodes.toArray() );
+		for(i=0;i< newChild.childNodes.length;i++){
+			__addToIndexes__(newChild.childNodes[i], nodelist.parentNode);
+		}
+    } else {
+        // simply add node to array (links between Nodes are made at higher level)
+        Array.prototype.push.apply(nodelist, [newChild]);
+		__addToIndexes__(newChild, nodelist.parentNode);
+    }
+
+};
+
+__addToIndexes__ = function(node, ancestor){
+	var indexes, index, normalizedName, i, j, descendingIndex, offset, sibling, children, id, name;
+	if(node.nodeType == Node.ELEMENT_NODE){
+		log.debug('updating node indexes for node %s ancestor %s', node.tagName, ancestor.nodeName);
+		//now we need to walk up all ancestors updating nodelist indexes
+		normalizedName = (node.tagName+'').toLowerCase();
+		
+		//if the node doesnt have a parentNode yet then it has been imported
+		//into the document, but it is just now being appended.  This means we
+		//need to merge the nodes indexes into the ancestors (which will become
+		//the parentNode just after this operation completes)
+		if(!node.parentNode){
+			indexes = node._indexes_;
+			for(name in indexes){
+				//this is the index of all descendants of the ancestor with the given tagname
+				if(!ancestor._indexes_.hasOwnProperty(name) && name != normalizedName ){
+					
+					ancestor._indexes_[name] = [];
+					for(j=0;j<indexes[name].length;j++){
+						ancestor._indexes_[name].push(indexes[name][j]);
+					}
+					
+				}else if(name != '*' && name != normalizedName){
+					
+					offset = 0;
+					//this is the index of all descendants with the given tagname
+					index = ancestor._indexes_[name];
+					children = ancestor.childNodes;
+					for(i=0;i<children.length;i++){
+						sibling = children[i];
+						if(sibling !== node && sibling.nodeType === Node.ELEMENT_NODE && sibling.tagName === node.tagName){
+							//find the first child, if any, that exist in this index so we can determine
+							//the document offset at which to update this index
+							offset += (sibling._indexes_[name]?sibling._indexes_[name].length:0)+1;
+						}else if(sibling === node){
+							break;
+						}
+					}
+					//the descending index is additively a part of the new index
+					descendingIndex = node._indexes_[name]?node._indexes_[name]:[];
+					Array.prototype.splice.apply(	
+						index, 
+						Array.prototype.concat.apply(
+							[offset, 0],
+							descendingIndex.slice(0,descendingIndex.length)
+						)
+					);
+					log.debug('added %s to index %s -> %s', node.tagName, ancestor.tagName||'document', offset);
+					
+				}
+			}
+		}
+		//now we basically need to crawl up the ancestor chain, merging indexes
+		//using some smarts
+		while(ancestor){
+			//these are all the indexes already built on the ancestor
+			indexes = ancestor._indexes_;
+			if(!(normalizedName in indexes)){
+				//make sure we have an index for this particular tagname
+				indexes[normalizedName] = 
+					new NodeList(node.ownerDocument, ancestor);
+			}
+			
+			offset = 1;
+			//this is the index of all descendants with the given tagname
+			index = indexes[normalizedName];
+			children = ancestor.childNodes;
+			for(i=0;i<children.length;i++){
+				sibling = children[i];
+				if(sibling !== node && sibling.nodeType === Node.ELEMENT_NODE && sibling.tagName === node.tagName){
+					//find the first child, if any, that exist in this index so we can determine
+					//the document offset at which to update this index
+					offset += (sibling._indexes_[normalizedName]?sibling._indexes_[normalizedName].length:0)+1;
+				}else if(sibling === node){
+					break;
+				}
+			}
+			//the descending index is additively a part of the new index
+			descendingIndex = node._indexes_[normalizedName]?node._indexes_[normalizedName]:[];
+			Array.prototype.splice.apply(	
+				index, 
+				[offset, 0, node].concat(
+					descendingIndex.slice(0,descendingIndex.length)
+				)
+			);
+			log.debug('added %s to index %s -> %s', node.tagName, ancestor.tagName||'document', offset);
+			
+			
+			offset = 0;
+			//this is the index of all descendants with the given tagname, so simply follow
+			//the same procedure as above but use the '*' index
+			index = indexes['*'];
+			children = ancestor.childNodes;
+			for(i=0;i<children.length;i++){
+				sibling = children[i];
+				if(sibling !== node && sibling.nodeType === Node.ELEMENT_NODE ){
+					offset += (sibling._indexes_['*']?sibling._indexes_['*'].length:0)+1;
+				}else if(sibling === node){
+					break;
+				}
+			}
+			descendingIndex = node._indexes_['*']?node._indexes_['*']:[];
+			Array.prototype.splice.apply(
+				index, 
+				[offset, 0, node].concat(
+					descendingIndex.slice(0,descendingIndex.length)
+				)
+			);
+			//console.log('added %s to index * -> %s', node.tagName,  offset);
+			
+			//handle input type elements and their ancestor form elements
+			//So far we dont bother with maintaining document order for this index
+			if('FORM' == ancestor.nodeName){
+				switch (node.nodeName) {
+	            case 'BUTTON':
+	            case 'FIELDSET':
+	            case 'INPUT':
+	            case 'KEYGEN':
+	            case 'OBJECT':
+	            case 'OUTPUT':
+	            case 'SELECT':
+	            case 'TEXTAREA':
+					if(!indexes.hasOwnProperty('$elements')){
+						//make sure we have an index for the form.elements
+						indexes.$elements = 
+							new NodeList(node.ownerDocument, ancestor);
+					}
+					Array.prototype.push.apply(indexes.$elements, [node]);
+					name = node.getAttribute('name');
+					if( name && !ancestor[name] ){
+						//<form name='foo'><input name='bar' is available via document.foo.bar
+						ancestor[name] = node;
+					}
+	            }
+			}
+			//walk straight up the dom updating other indexes
+			log.debug('walking up node chain, node %s has parentNode %s', ancestor.nodeName, ancestor.parentNode);
+			ancestor = ancestor.parentNode;
+			
+		}
+	}
+};
+
+__removeFromIndexes__ = function(node, ancestor){
+	var indexes, index, normalizedName, i, length, offset, id, name, doc;
+	
+	if(node.nodeType == Node.ELEMENT_NODE){
+		normalizedName = (node.tagName+'').toLowerCase();
+		//console.log('removing node from live indexes for node %s', node.tagName);
+		id = node.getAttribute('id');
+		if(id){
+			node.ownerDocument._indexes_["#"+id] = null;
+		}	
+		name = node.getAttribute('name');
+		if(name){
+			__removeFromNamedIndexes__('name', name, node);
+		}
+		while(ancestor){
+			indexes = ancestor._indexes_;
+			if(!(normalizedName in indexes)){
+				indexes[normalizedName] = 
+					new NodeList(node.ownerDocument, ancestor);
+				//the index did not exist on the ancestor until now so
+				//dont bother cleaning it, just move up the ancestor chain
+				ancestor = ancestor.parentNode;
+				continue;
+			}
+			index = indexes[normalizedName];
+			i = Array.prototype.indexOf.apply(index, [node]);
+			if(i>-1){
+				offset = node._indexes_[normalizedName];
+				offset = offset?offset.length:0;
+				length = 1+offset;
+				//console.log('removing %s[%s] from index %s -> %s', node.tagName, i, ancestor.tagName, index.toArray());
+				Array.prototype.splice.apply(index, [i,length]); 
+			}
+			
+			index = indexes['*'];
+			i = Array.prototype.indexOf.apply(index, [node]);
+			if(i>-1){
+				offset = node._indexes_['*'];
+				offset = offset?offset.length:0;
+				length = 1+offset;
+				//console.log('removing %s from index * -> %s', node.tagName,  index.toArray());
+				Array.prototype.splice.apply(index, [i,length]); 
+			}
+			
+			//handle input type elements and their ancestor form elements
+			//So far we dont bother with maintaining document order for this index
+			if('FORM' == ancestor.nodeName){
+				switch (node.nodeName) {
+	            case 'BUTTON':
+	            case 'FIELDSET':
+	            case 'INPUT':
+	            case 'KEYGEN':
+	            case 'OBJECT':
+	            case 'OUTPUT':
+	            case 'SELECT':
+	            case 'TEXTAREA':
+	                doc = node.ownerDocument;
+					if(!indexes.hasOwnProperty('$elements')){
+						//make sure we have an index for the form.elements
+						indexes.$elements = 
+							new NodeList(node.ownerDocument, ancestor);
+					}
+					offset = Array.prototype.indexOf.apply(doc._indexes_.$elements, [node]);
+					if(index > -1){
+						Array.prototype.splice.apply(doc._indexes_.$elements,[offset,1]);
+					}
+					name = node.getAttribute('name');
+					if( name && ancestor[name] == node ){
+						//<form name='foo'><input name='bar' is no longer available via document.foo.bar
+						delete ancestor[name];
+					}
+	            }
+			}
+			ancestor = ancestor.parentNode;
+		}
+	}
+};
+
+/**
+ * @method __cloneNodes__ -
+ *      Returns a NodeList containing clones of the Nodes in this NodeList
+ * @param  deep : boolean -
+ *      If true, recursively clone the subtree under each of the nodes;
+ *      if false, clone only the nodes themselves (and their attributes,
+ *      if it is an Element).
+ * @param  parentNode : Node - the new parent of the cloned NodeList
+ * @return : NodeList - NodeList containing clones of the Nodes in this NodeList
+ */
+__cloneNodes__ = function(nodelist, deep, parentNode) {
+    var cloneNodeList = new NodeList(nodelist.ownerDocument, parentNode);
+
+    // create list containing clones of each child
+    for (var i=0; i < nodelist.length; i++) {
+        __appendChild__(cloneNodeList, nodelist[i].cloneNode(deep));
+    }
+
+    return cloneNodeList;
+};
+
+}(/*Envjs.DOM.Nodelist*/));
+
+
+
+
+
+var __ownerDocument__ = function(node){
+        return (node.nodeType == Node.DOCUMENT_NODE)?node:node.ownerDocument;
+    },
+    __recursivelyGatherText__,
+    __isAncestor__,
+    __escapeXML__,
+    __unescapeXML__,
+    __getElementsByTagNameRecursive__,
+    __getElementsByTagNameNSRecursive__;
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Node').debug('available'); 
+});
+/**
+ * @class  Node -
+ *      The Node interface is the primary datatype for the entire
+ *      Document Object Model. It represents a single node in the
+ *      document tree.
+ * @param  ownerDocument : Document - The Document object associated with this node.
+ */
+
+exports.Node = Node = function(ownerDocument) {
+    this.baseURI = 'about:blank';
+    this.namespaceURI = null;
+    this.nodeName = "";
+    this.nodeValue = null;
+
+    // A NodeList that contains all children of this node. If there are no
+    // children, this is a NodeList containing no nodes.  The content of the
+    // returned NodeList is "live" in the sense that, for instance, changes to
+    // the children of the node object that it was created from are immediately
+    // reflected in the nodes returned by the NodeList accessors; it is not a
+    // static snapshot of the content of the node. This is true for every
+    // NodeList, including the ones returned by the getElementsByTagName method.
+    this.childNodes      = new NodeList(ownerDocument, this);
+
+    // The first child of this node. If there is no such node, this is null
+    this.firstChild      = null;
+    // The last child of this node. If there is no such node, this is null.
+    this.lastChild       = null;
+    // The node immediately preceding this node. If there is no such node,
+    // this is null.
+    this.previousSibling = null;
+    // The node immediately following this node. If there is no such node,
+    // this is null.
+    this.nextSibling     = null;
+
+    this.attributes = null;
+    // The namespaces in scope for this node
+    this._namespaces = new NamespaceNodeMap(ownerDocument, this);
+    this._readonly = false;
+
+
+    //IMPORTANT: These must come last so rhino will not iterate parent
+    //           properties before child properties.  (qunit.equiv issue)
+
+    // The parent of this node. All nodes, except Document, DocumentFragment,
+    // and Attr may have a parent.  However, if a node has just been created
+    // and not yet added to the tree, or if it has been removed from the tree,
+    // this is null
+    this.parentNode      = null;
+    // The Document object associated with this node
+    this.ownerDocument = ownerDocument;
+	this._indexes_ = {
+		'ancestors'	: new NodeList(ownerDocument, this),
+		'*': new NodeList(ownerDocument, this)
+	};
+
+};
+
+// nodeType constants
+Node.ELEMENT_NODE                = 1;
+Node.ATTRIBUTE_NODE              = 2;
+Node.TEXT_NODE                   = 3;
+Node.CDATA_SECTION_NODE          = 4;
+Node.ENTITY_REFERENCE_NODE       = 5;
+Node.ENTITY_NODE                 = 6;
+Node.PROCESSING_INSTRUCTION_NODE = 7;
+Node.COMMENT_NODE                = 8;
+Node.DOCUMENT_NODE               = 9;
+Node.DOCUMENT_TYPE_NODE          = 10;
+Node.DOCUMENT_FRAGMENT_NODE      = 11;
+Node.NOTATION_NODE               = 12;
+Node.NAMESPACE_NODE              = 13;
+
+Node.DOCUMENT_POSITION_EQUAL        = 0x00;
+Node.DOCUMENT_POSITION_DISCONNECTED = 0x01;
+Node.DOCUMENT_POSITION_PRECEDING    = 0x02;
+Node.DOCUMENT_POSITION_FOLLOWING    = 0x04;
+Node.DOCUMENT_POSITION_CONTAINS     = 0x08;
+Node.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
+Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC      = 0x20;
+
+
+__extend__(Node.prototype, {
+    get localName(){
+        return this.prefix?
+            this.nodeName.substring(this.prefix.length+1, this.nodeName.length):
+            this.nodeName;
+    },
+    get prefix(){
+        return this.nodeName.split(':').length>1?
+            this.nodeName.split(':')[0]:
+            null;
+    },
+    set prefix(value){
+        if(value === null){
+            this.nodeName = this.localName;
+        }else{
+            this.nodeName = value+':'+this.localName;
+        }
+    },
+    hasAttributes : function() {
+        return this.attributes.length ?
+            true :
+            false ;
+    },
+    get textContent(){
+        return __recursivelyGatherText__(this);
+    },
+    set textContent(newText){
+		log.debug('setText %s', newText);
+        while(this.firstChild){
+            this.removeChild( this.firstChild );
+        }
+        var text = this.ownerDocument.createTextNode(newText);
+        this.appendChild(text);
+    },
+    insertBefore : function(newChild, refChild) {
+		log.debug('insert %s Before %s', newChild.nodeName, refChild.nodeName);
+        var prevNode;
+
+        if(!newChild){
+            return newChild;
+        }
+        if(!refChild){
+            this.appendChild(newChild);
+            return this.newChild;
+        }
+
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if Node is readonly
+            if (this._readonly) {
+                throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if newChild was not created by this Document
+            if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
+                throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+            }
+
+            // throw Exception if the node is an ancestor
+            if (__isAncestor__(this, newChild)) {
+                throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+            }
+        }
+
+        // if refChild is specified, insert before it
+        if (refChild) {
+            // find index of refChild
+            var itemIndex = __findItemIndex__(this.childNodes, refChild);
+            // throw Exception if there is no child node with this id
+            if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
+                throw(new DOMException(DOMException.NOT_FOUND_ERR));
+            }
+
+            // if the newChild is already in the tree,
+            var newChildParent = newChild.parentNode;
+            if (newChildParent) {
+                // remove it
+                newChildParent.removeChild(newChild);
+            }
+
+            // insert newChild into childNodes
+            __insertBefore__(this.childNodes, newChild, itemIndex);
+
+            // do node pointer surgery
+            prevNode = refChild.previousSibling;
+
+            // handle DocumentFragment
+            if (newChild.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+                if (newChild.childNodes.length > 0) {
+                    // set the parentNode of DocumentFragment's children
+                    for (var ind = 0; ind < newChild.childNodes.length; ind++) {
+                        newChild.childNodes[ind].parentNode = this;
+                    }
+
+                    // link refChild to last child of DocumentFragment
+                    refChild.previousSibling = newChild.childNodes[newChild.childNodes.length-1];
+                }
+            }else {
+                // set the parentNode of the newChild
+                newChild.parentNode = this;
+                // link refChild to newChild
+                refChild.previousSibling = newChild;
+            }
+
+        }else {
+            // otherwise, append to end
+            prevNode = this.lastChild;
+            this.appendChild(newChild);
+        }
+
+        if (newChild.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+            // do node pointer surgery for DocumentFragment
+            if (newChild.childNodes.length > 0) {
+                if (prevNode) {
+                    prevNode.nextSibling = newChild.childNodes[0];
+                }else {
+                    // this is the first child in the list
+                    this.firstChild = newChild.childNodes[0];
+                }
+                newChild.childNodes[0].previousSibling = prevNode;
+                newChild.childNodes[newChild.childNodes.length-1].nextSibling = refChild;
+            }
+        }else {
+            // do node pointer surgery for newChild
+            if (prevNode) {
+                prevNode.nextSibling = newChild;
+            }else {
+                // this is the first child in the list
+                this.firstChild = newChild;
+            }
+            newChild.previousSibling = prevNode;
+            newChild.nextSibling     = refChild;
+        }
+
+        return newChild;
+    },
+    replaceChild : function(newChild, oldChild) {
+	
+		log.debug('replaceChild  %s with %s', oldChild.nodeName, newChild.nodeName);
+        var ret = null;
+
+        if(!newChild  || !oldChild ){
+            return oldChild;
+        }
+
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if Node is readonly
+            if (this._readonly) {
+                throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if newChild was not created by this Document
+            if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
+                throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+            }
+
+            // throw Exception if the node is an ancestor
+            if (__isAncestor__(this, newChild)) {
+                throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+            }
+        }
+
+        // get index of oldChild
+        var index = __findItemIndex__(this.childNodes, oldChild);
+
+        // throw Exception if there is no child node with this id
+        if (__ownerDocument__(this).implementation.errorChecking && (index < 0)) {
+            throw(new DOMException(DOMException.NOT_FOUND_ERR));
+        }
+
+        // if the newChild is already in the tree,
+        var newChildParent = newChild.parentNode;
+        if (newChildParent) {
+            // remove it
+            newChildParent.removeChild(newChild);
+        }
+
+        // add newChild to childNodes
+        ret = __replaceChild__(this.childNodes,newChild, index);
+
+
+        if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+            // do node pointer surgery for Document Fragment
+            if (newChild.childNodes.length > 0) {
+                for (var ind = 0; ind < newChild.childNodes.length; ind++) {
+                    newChild.childNodes[ind].parentNode = this;
+                }
+
+                if (oldChild.previousSibling) {
+                    oldChild.previousSibling.nextSibling = newChild.childNodes[0];
+                } else {
+                    this.firstChild = newChild.childNodes[0];
+                }
+
+                if (oldChild.nextSibling) {
+                    oldChild.nextSibling.previousSibling = newChild;
+                } else {
+                    this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
+                }
+
+                newChild.childNodes[0].previousSibling = oldChild.previousSibling;
+                newChild.childNodes[newChild.childNodes.length-1].nextSibling = oldChild.nextSibling;
+            }
+        } else {
+            // do node pointer surgery for newChild
+            newChild.parentNode = this;
+
+            if (oldChild.previousSibling) {
+                oldChild.previousSibling.nextSibling = newChild;
+            }else{
+                this.firstChild = newChild;
+            }
+            if (oldChild.nextSibling) {
+                oldChild.nextSibling.previousSibling = newChild;
+            }else{
+                this.lastChild = newChild;
+            }
+            newChild.previousSibling = oldChild.previousSibling;
+            newChild.nextSibling = oldChild.nextSibling;
+        }
+
+        return ret;
+    },
+    removeChild : function(oldChild) {
+		log.debug('removeChild  %s from %s', oldChild.nodeName, this.nodeName);
+        if(!oldChild){
+            return null;
+        }
+        // throw Exception if NamedNodeMap is readonly
+        if (__ownerDocument__(this).implementation.errorChecking &&
+            (this._readonly || oldChild._readonly)) {
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+
+        // get index of oldChild
+        var itemIndex = __findItemIndex__(this.childNodes, oldChild);
+
+        // throw Exception if there is no child node with this id
+        if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
+            throw(new DOMException(DOMException.NOT_FOUND_ERR));
+        }
+
+        // remove oldChild from childNodes
+        __removeChild__(this.childNodes, itemIndex);
+
+        // do node pointer surgery
+        oldChild.parentNode = null;
+
+        if (oldChild.previousSibling) {
+            oldChild.previousSibling.nextSibling = oldChild.nextSibling;
+        }else {
+            this.firstChild = oldChild.nextSibling;
+        }
+        if (oldChild.nextSibling) {
+            oldChild.nextSibling.previousSibling = oldChild.previousSibling;
+        }else {
+            this.lastChild = oldChild.previousSibling;
+        }
+
+        oldChild.previousSibling = null;
+        oldChild.nextSibling = null;
+
+        return oldChild;
+    },
+    appendChild : function(newChild) {
+		log.debug('appendChild  %s to %s', newChild.nodeName, this.nodeName);
+        if(!newChild){
+            return null;
+        }
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if Node is readonly
+            if (this._readonly) {
+                throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if arg was not created by this Document
+            if (__ownerDocument__(this) != __ownerDocument__(this)) {
+                throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+            }
+
+            // throw Exception if the node is an ancestor
+            if (__isAncestor__(this, newChild)) {
+              throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+            }
+        }
+
+        // if the newChild is already in the tree,
+        var newChildParent = newChild.parentNode;
+        if (newChildParent) {
+            // remove it
+           //console.debug('removing node %s', newChild);
+            newChildParent.removeChild(newChild);
+        }
+
+        // add newChild to childNodes
+        __appendChild__(this.childNodes, newChild);
+
+        if (newChild.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+            // do node pointer surgery for DocumentFragment
+            if (newChild.childNodes.length > 0) {
+                for (var ind = 0; ind < newChild.childNodes.length; ind++) {
+                    newChild.childNodes[ind].parentNode = this;
+                }
+
+                if (this.lastChild) {
+                    this.lastChild.nextSibling = newChild.childNodes[0];
+                    newChild.childNodes[0].previousSibling = this.lastChild;
+                    this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
+                } else {
+                    this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
+                    this.firstChild = newChild.childNodes[0];
+                }
+            }
+        } else {
+            // do node pointer surgery for newChild
+            if (this.lastChild) {
+                this.lastChild.nextSibling = newChild;
+                newChild.previousSibling = this.lastChild;
+                this.lastChild = newChild;
+            } else {
+                this.lastChild = newChild;
+                this.firstChild = newChild;
+            }
+       }
+       newChild.parentNode = this;
+       return newChild;
+    },
+    hasChildNodes : function() {
+        return (this.childNodes.length > 0);
+    },
+    cloneNode: function(deep) {
+		log.debug('cloneNode  %s', deep);
+        // use importNode to clone this Node
+        //do not throw any exceptions
+        try {
+            return __ownerDocument__(this).importNode(this, deep);
+        } catch (e) {
+            //there shouldn't be any exceptions, but if there are, return null
+            // may want to warn: $debug("could not clone node: "+e.code);
+            return null;
+        }
+    },
+    normalize : function() {
+		log.debug('normalize');
+        var i;
+        var inode;
+        var nodesToRemove = new NodeList();
+
+        if (this.nodeType == Node.ELEMENT_NODE || this.nodeType == Node.DOCUMENT_NODE) {
+            var adjacentTextNode = null;
+
+            // loop through all childNodes
+            for(i = 0; i < this.childNodes.length; i++) {
+                inode = this.childNodes.item(i);
+
+                if (inode.nodeType == Node.TEXT_NODE) {
+                    // this node is a text node
+                    if (inode.length < 1) {
+                        // this text node is empty
+                        // add this node to the list of nodes to be remove
+                        __appendChild__(nodesToRemove, inode);
+                    }else {
+                        if (adjacentTextNode) {
+                            // previous node was also text
+                            adjacentTextNode.appendData(inode.data);
+                            // merge the data in adjacent text nodes
+                            // add this node to the list of nodes to be removed
+                            __appendChild__(nodesToRemove, inode);
+                        } else {
+                            // remember this node for next cycle
+                            adjacentTextNode = inode;
+                        }
+                    }
+                } else {
+                    // (soon to be) previous node is not a text node
+                    adjacentTextNode = null;
+                    // normalize non Text childNodes
+                    inode.normalize();
+                }
+            }
+
+            // remove redundant Text Nodes
+            for(i = 0; i < nodesToRemove.length; i++) {
+                inode = nodesToRemove.item(i);
+                inode.parentNode.removeChild(inode);
+            }
+        }
+    },
+    isSupported : function(feature, version) {
+        // use Implementation.hasFeature to determine if this feature is supported
+        return __ownerDocument__(this).implementation.hasFeature(feature, version);
+    },
+    getElementsByTagName : function(tagname) {
+        // delegate to _getElementsByTagNameRecursive
+        // recurse childNodes
+		log.debug('getElementsByTagName %s',tagname);
+		var normalizedName = (tagname+'').toLowerCase();
+		if(!this._indexes_[normalizedName]){
+			this._indexes_[normalizedName] = new NodeList(__ownerDocument__(this));
+		}
+        return this._indexes_[normalizedName];
+    },
+    getElementsByTagNameNS : function(namespaceURI, localName) {
+        // delegate to _getElementsByTagNameNSRecursive
+		log.debug('getElementsByTagNameNS %s %s',namespaceURI, localName);
+        var nodelist = new NodeList(__ownerDocument__(this));
+        for (var i = 0; i < this.childNodes.length; i++) {
+            __getElementsByTagNameNSRecursive__(
+				this.childNodes.item(i),
+				namespaceURI, 
+				localName,
+                nodelist
+			);
+        }
+        return nodelist;
+    },
+    importNode : function(importedNode, deep) {
+		log.debug('importNode %s %s', importedNode.nodeName, deep);
+        var i,
+			importNode;
+
+        //there is no need to perform namespace checks since everything has already gone through them
+        //in order to have gotten into the DOM in the first place. The following line
+        //turns namespace checking off in ._isValidNamespace
+        __ownerDocument__(this).importing = true;
+
+        if (importedNode.nodeType == Node.ELEMENT_NODE) {
+            if (!__ownerDocument__(this).implementation.namespaceAware) {
+                // create a local Element (with the name of the importedNode)
+                importNode = __ownerDocument__(this).createElement(importedNode.tagName);
+
+                // create attributes matching those of the importedNode
+                for(i = 0; i < importedNode.attributes.length; i++) {
+                    importNode.setAttribute(importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
+                }
+            } else {
+                // create a local Element (with the name & namespaceURI of the importedNode)
+                importNode = __ownerDocument__(this).createElementNS(importedNode.namespaceURI, importedNode.nodeName);
+
+                // create attributes matching those of the importedNode
+                for(i = 0; i < importedNode.attributes.length; i++) {
+                    importNode.setAttributeNS(importedNode.attributes.item(i).namespaceURI,
+                        importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
+                }
+
+                // create namespace definitions matching those of the importedNode
+                for(i = 0; i < importedNode._namespaces.length; i++) {
+                    importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
+                    importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
+                }
+            }
+        } else if (importedNode.nodeType == Node.ATTRIBUTE_NODE) {
+            if (!__ownerDocument__(this).implementation.namespaceAware) {
+                // create a local Attribute (with the name of the importedAttribute)
+                importNode = __ownerDocument__(this).createAttribute(importedNode.name);
+            } else {
+                // create a local Attribute (with the name & namespaceURI of the importedAttribute)
+                importNode = __ownerDocument__(this).createAttributeNS(importedNode.namespaceURI, importedNode.nodeName);
+
+                // create namespace definitions matching those of the importedAttribute
+                for(i = 0; i < importedNode._namespaces.length; i++) {
+                    importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
+                    importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
+                }
+            }
+
+            // set the value of the local Attribute to match that of the importedAttribute
+            importNode.value = importedNode.value;
+
+        } else if (importedNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+            // create a local DocumentFragment
+            importNode = __ownerDocument__(this).createDocumentFragment();
+        } else if (importedNode.nodeType == Node.NAMESPACE_NODE) {
+            // create a local NamespaceNode (with the same name & value as the importedNode)
+            importNode = __ownerDocument__(this).createNamespace(importedNode.nodeName);
+            importNode.value = importedNode.value;
+        } else if (importedNode.nodeType == Node.TEXT_NODE) {
+            // create a local TextNode (with the same data as the importedNode)
+            importNode = __ownerDocument__(this).createTextNode(importedNode.data);
+        } else if (importedNode.nodeType == Node.CDATA_SECTION_NODE) {
+            // create a local CDATANode (with the same data as the importedNode)
+            importNode = __ownerDocument__(this).createCDATASection(importedNode.data);
+        } else if (importedNode.nodeType == Node.PROCESSING_INSTRUCTION_NODE) {
+            // create a local ProcessingInstruction (with the same target & data as the importedNode)
+            importNode = __ownerDocument__(this).createProcessingInstruction(importedNode.target, importedNode.data);
+        } else if (importedNode.nodeType == Node.COMMENT_NODE) {
+            // create a local Comment (with the same data as the importedNode)
+            importNode = __ownerDocument__(this).createComment(importedNode.data);
+        } else {  // throw Exception if nodeType is not supported
+            throw(new DOMException(DOMException.NOT_SUPPORTED_ERR));
+        }
+
+        if (deep) {
+            // recurse childNodes
+            for(i = 0; i < importedNode.childNodes.length; i++) {
+                importNode.appendChild(__ownerDocument__(this).importNode(importedNode.childNodes.item(i), true));
+            }
+        }
+
+        //reset importing
+        __ownerDocument__(this).importing = false;
+        return importNode;
+
+    },
+    contains : function(node){
+        log.debug("this %s contains %s ?", this.nodeName, node.nodeName);
+        while(node && node != this ){
+            node = node.parentNode;
+        }
+        return !!node;
+    },
+    compareDocumentPosition : function(b){
+        log.debug("compareDocumentPosition of this %s to %s", this.nodeName, b.nodeName);
+        var i,
+            length,
+            a = this,
+            parent,
+            aparents,
+            bparents;
+        //handle a couple simpler case first
+        if(a === b) {
+            return Node.DOCUMENT_POSITION_EQUAL;
+        }
+        if(a.ownerDocument !== b.ownerDocument) {
+            return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|
+               Node.DOCUMENT_POSITION_FOLLOWING|
+               Node.DOCUMENT_POSITION_DISCONNECTED;
+        }
+        if(a.parentNode === b.parentNode){
+            length = a.parentNode.childNodes.length;
+            for(i=0;i<length;i++){
+                if(a.parentNode.childNodes[i] === a){
+                    return Node.DOCUMENT_POSITION_FOLLOWING;
+                }else if(a.parentNode.childNodes[i] === b){
+                    return Node.DOCUMENT_POSITION_PRECEDING;
+                }
+            }
+        }
+
+        if(a.contains(b)) {
+            return Node.DOCUMENT_POSITION_CONTAINED_BY|
+                   Node.DOCUMENT_POSITION_FOLLOWING;
+        }
+        if(b.contains(a)) {
+            return Node.DOCUMENT_POSITION_CONTAINS|
+                   Node.DOCUMENT_POSITION_PRECEDING;
+        }
+        aparents = [];
+        parent = a.parentNode;
+        while(parent){
+            aparents[aparents.length] = parent;
+            parent = parent.parentNode;
+        }
+
+        bparents = [];
+        parent = b.parentNode;
+        while(parent){
+            i = aparents.indexOf(parent);
+            if(i < 0){
+                bparents[bparents.length] = parent;
+                parent = parent.parentNode;
+            }else{
+                //i cant be 0 since we already checked for equal parentNode
+                if(bparents.length > aparents.length){
+                    return Node.DOCUMENT_POSITION_FOLLOWING;
+                }else if(bparents.length < aparents.length){
+                    return Node.DOCUMENT_POSITION_PRECEDING;
+                }else{
+                    //common ancestor diverge point
+                    if (i === 0) {
+                        return Node.DOCUMENT_POSITION_FOLLOWING;
+                    } else {
+                        parent = aparents[i-1];
+                    }
+                    return parent.compareDocumentPosition(bparents.pop());
+                }
+            }
+        }
+
+        return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|
+               Node.DOCUMENT_POSITION_DISCONNECTED;
+
+    },
+    toString : function() {
+        return '[object Node]';
+    }
+
+});
+
+
+}(/*Envjs.DOM.Node*/));
+
+
+/**
+ * @method __getElementsByTagNameRecursive__ - implements getElementsByTagName()
+ * @param  elem     : Element  - The element which are checking and then recursing into
+ * @param  tagname  : string      - The name of the tag to match on. The special value "*" matches all tags
+ * @param  nodeList : NodeList - The accumulating list of matching nodes
+ *
+ * @return : NodeList
+ */
+__getElementsByTagNameRecursive__ = function (elem, tagname, nodeList) {
+
+    if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {
+
+        if(elem.nodeType !== Node.DOCUMENT_NODE &&
+            ((elem.nodeName.toUpperCase() == tagname.toUpperCase()) ||
+                (tagname == "*")) ){
+            // add matching node to nodeList
+            __appendChild__(nodeList, elem);
+        }
+
+        // recurse childNodes
+        for(var i = 0; i < elem.childNodes.length; i++) {
+            nodeList = __getElementsByTagNameRecursive__(elem.childNodes.item(i), tagname, nodeList);
+        }
+    }
+
+    return nodeList;
+};
+
+/**
+ * @method __getElementsByTagNameNSRecursive__
+ *      implements getElementsByTagName()
+ *
+ * @param  elem     : Element  - The element which are checking and then recursing into
+ * @param  namespaceURI : string - the namespace URI of the required node
+ * @param  localName    : string - the local name of the required node
+ * @param  nodeList     : NodeList - The accumulating list of matching nodes
+ *
+ * @return : NodeList
+ */
+__getElementsByTagNameNSRecursive__ = function(elem, namespaceURI, localName, nodeList) {
+    if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {
+
+        if (((elem.namespaceURI == namespaceURI) || (namespaceURI == "*")) &&
+            ((elem.localName == localName) || (localName == "*"))) {
+            // add matching node to nodeList
+            __appendChild__(nodeList, elem);
+        }
+
+        // recurse childNodes
+        for(var i = 0; i < elem.childNodes.length; i++) {
+            nodeList = __getElementsByTagNameNSRecursive__(
+                elem.childNodes.item(i), namespaceURI, localName, nodeList);
+        }
+    }
+
+    return nodeList;
+};
+
+/**
+ * @method __isAncestor__ - returns true if node is ancestor of target
+ * @param  target         : Node - The node we are using as context
+ * @param  node         : Node - The candidate ancestor node
+ * @return : boolean
+ */
+__isAncestor__ = function(target, node) {
+    // if this node matches, return true,
+    // otherwise recurse up (if there is a parentNode)
+    return ((target == node) || ((target.parentNode) && (__isAncestor__(target.parentNode, node))));
+};
+
+
+
+__recursivelyGatherText__ = function(aNode) {
+    var accumulateText = "",
+        idx,
+        node;
+    for (idx=0;idx < aNode.childNodes.length;idx++){
+        node = aNode.childNodes.item(idx);
+        if(node.nodeType == Node.TEXT_NODE){
+            accumulateText += node.data;
+        }else{
+            accumulateText += __recursivelyGatherText__(node);
+        }
+    }
+    return accumulateText;
+};
+
+/**
+ * function __escapeXML__
+ * @param  str : string - The string to be escaped
+ * @return : string - The escaped string
+ */
+var escAmpRegEx = /&(?!(amp;|lt;|gt;|quot|apos;))/g;
+var escLtRegEx = /</g;
+var escGtRegEx = />/g;
+var quotRegEx = /"/g;
+var aposRegEx = /'/g;
+__escapeXML__ = function(str) {
+    str = str.replace(escAmpRegEx, "&amp;").
+            replace(escLtRegEx, "&lt;").
+            replace(escGtRegEx, "&gt;").
+            replace(quotRegEx, "&quot;").
+            replace(aposRegEx, "&apos;");
+
+    return str;
+};
+
+/**
+ * function __unescapeXML__
+ * @param  str : string - The string to be unescaped
+ * @return : string - The unescaped string
+ */
+var unescAmpRegEx = /&amp;/g;
+var unescLtRegEx = /&lt;/g;
+var unescGtRegEx = /&gt;/g;
+var unquotRegEx = /&quot;/g;
+var unaposRegEx = /&apos;/g;
+__unescapeXML__ = function(str) {
+    str = str.replace(unescAmpRegEx, "&").
+            replace(unescLtRegEx, "<").
+            replace(unescGtRegEx, ">").
+            replace(unquotRegEx, "\"").
+            replace(unaposRegEx, "'");
+
+    return str;
+};
+
+var __findNamedItemIndex__,
+    __findNamedItemNSIndex__,
+    __hasAttribute__,
+    __hasAttributeNS__,
+    __cloneNamedNodes__;
+//see nodelist for these declarations
+/*var __addToNamedIndexes__, 
+    __removeFromNamedIndexes__;*/
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.NamedNodeMap').debug('available'); 
+});
+/**
+ * @class  NamedNodeMap -
+ *      used to represent collections of nodes that can be accessed by name
+ *      typically a set of Element attributes
+ *
+ * @extends NodeList -
+ *      note W3C spec says that this is not the case, but we need an item()
+ *      method identical to NodeList's, so why not?
+ * @param  ownerDocument : Document - the ownerDocument
+ * @param  parentNode    : Node - the node that the NamedNodeMap is attached to (or null)
+ */
+exports.NamedNodeMap = NamedNodeMap = function(ownerDocument, parentNode) {
+    NodeList.apply(this, arguments);
+};
+NamedNodeMap.prototype = new NodeList();
+__extend__(NamedNodeMap.prototype, {
+    add: function(name) {
+        this[this.length] = name;
+    },
+    getNamedItem: function(name) {
+        var ret = null;
+        log.debug('getNamedItem %s', name);
+        // test that Named Node exists
+        var itemIndex = __findNamedItemIndex__(this, name);
+
+        if (itemIndex > -1) {
+            //console.log('found it!');
+            ret = this[itemIndex];
+        }
+        // if node is not found, default value null is returned
+        return ret;
+    },
+    setNamedItem: function(arg) {
+        var doc = __ownerDocument__(this);
+        log.debug('setNamedItem %s', arg.name);
+        // test for exceptions
+        if (doc.implementation.errorChecking) {
+            // throw Exception if arg was not created by this Document
+            if (this.ownerDocument != arg.ownerDocument) {
+                throw (new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+            }
+
+            // throw Exception if DOMNamedNodeMap is readonly
+            if (this._readonly || (this.parentNode && this.parentNode._readonly)) {
+                throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if arg is already an attribute of another Element object
+            if (arg.ownerElement && (arg.ownerElement != this.parentNode)) {
+                throw (new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
+            }
+        }
+
+        // console.log('setNamedItem __findNamedItemIndex__ ');
+        // get item index
+        var itemIndex = __findNamedItemIndex__(this, arg.name);
+        var ret = null;
+
+        //console.log('setNamedItem __findNamedItemIndex__ %s', itemIndex);
+        if (itemIndex > -1) {
+            // found it!
+            ret = this[itemIndex];
+            // use existing Attribute
+            // throw Exception if DOMAttr is readonly
+            if (doc.implementation.errorChecking && ret._readonly) {
+                throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            } else {
+                this[itemIndex] = arg;
+                // over-write existing NamedNode
+                this[arg.name.toLowerCase()] = arg;
+            }
+        } else {
+            // add new NamedNode
+            //console.log('setNamedItem add new named node map (by index)');
+            Array.prototype.push.apply(this, [arg]);
+            this[arg.name] = arg;
+
+        }
+
+        arg.ownerElement = this.parentNode;
+        // update ownerElement
+        // return old node or new node
+        
+        //add to named node indexes on the document
+        __addToNamedIndexes__(arg.name, arg.value, arg.ownerElement);
+        
+        return ret;
+    },
+    removeNamedItem: function(name) {
+        var ret = null, doc = __ownerDocument__(this);
+        // test for exceptions
+        // throw Exception if NamedNodeMap is readonly
+        if (doc.implementation.errorChecking &&
+            (this._readonly || (this.parentNode && this.parentNode._readonly))) {
+            throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+
+        // get item index
+        var itemIndex = __findNamedItemIndex__(this, name);
+
+        // throw Exception if there is no node named name in this map
+        if (doc.implementation.errorChecking && (itemIndex < 0)) {
+            throw (new DOMException(DOMException.NOT_FOUND_ERR));
+        }
+
+        // get Node
+        var oldNode = this[itemIndex];
+        //this[oldNode.name] = undefined;
+        // throw Exception if Node is readonly
+        if (doc.implementation.errorChecking && oldNode._readonly) {
+            throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+        
+        //remove from named node indexes on the document
+        __removeFromNamedIndexes__(name, oldNode.value, oldNode.ownerElement);
+        
+        // return removed node
+        return __removeChild__(this, itemIndex);
+    },
+    getNamedItemNS: function(namespaceURI, localName) {
+        var ret = null;
+
+        // test that Named Node exists
+        var itemIndex = __findNamedItemNSIndex__(this, namespaceURI, localName);
+
+        if (itemIndex > -1) {
+            // found it! return NamedNode
+            ret = this[itemIndex];
+        }
+        // if node is not found, default value null is returned
+        return ret;
+    },
+    setNamedItemNS: function(arg) {
+        log.debug('setNamedItemNS %s %s', arg.namespaceURI, arg.localName);
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if NamedNodeMap is readonly
+            if (this._readonly || (this.parentNode && this.parentNode._readonly)) {
+                throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if arg was not created by this Document
+            if (__ownerDocument__(this) != __ownerDocument__(arg)) {
+                throw (new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+            }
+
+            // throw Exception if arg is already an attribute of another Element object
+            if (arg.ownerElement && (arg.ownerElement != this.parentNode)) {
+                throw (new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
+            }
+        }
+
+        // get item index
+        var itemIndex = __findNamedItemNSIndex__(this, arg.namespaceURI, arg.localName);
+        var ret = null;
+
+        if (itemIndex > -1) {
+            // found it!
+            // use existing Attribute
+            ret = this[itemIndex];
+            // throw Exception if Attr is readonly
+            if (__ownerDocument__(this).implementation.errorChecking && ret._readonly) {
+                throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            } else {
+                // over-write existing NamedNode
+                this[itemIndex] = arg;
+            }
+        } else {
+            // add new NamedNode
+            Array.prototype.push.apply(this, [arg]);
+        }
+        arg.ownerElement = this.parentNode;
+        
+        //add to named node indexes on the document
+        __addToNamedIndexes__(
+            arg.namespaceURI?arg.namespaceURI+':'+arg.localName:arg.localName, 
+            arg.value, 
+            arg.ownerElement
+        );
+        
+        // return old node or null
+        return ret;
+    },
+    removeNamedItemNS: function(namespaceURI, localName) {
+        var ret = null;
+
+        // test for exceptions
+        // throw Exception if NamedNodeMap is readonly
+        if (__ownerDocument__(this).implementation.errorChecking && (this._readonly || (this.parentNode && this.parentNode._readonly))) {
+            throw (new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+
+        // get item index
+        var itemIndex = __findNamedItemNSIndex__(this, namespaceURI, localName);
+
+        // throw Exception if there is no matching node in this map
+        if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
+            throw (new DOMException(DOMException.NOT_FOUND_ERR));
+        }
+
+        // get Node
+        var oldNode = this[itemIndex];
+
+        //remove from named node indexes on the document
+        __removeFromNamedIndexes__(
+            namespaceURI?namespaceURI+'::'+localName:localName, 
+            oldNode.value, 
+            oldNode.ownerElement
+        );
+        
+        // return removed node
+        return __removeChild__(this, itemIndex);
+    },
+    get xml() {
+        var ret = "";
+
+        // create string containing concatenation of all (but last) 
+        // Attribute string values (separated by spaces)
+        for (var i = 0; i < this.length - 1; i++) {
+            ret += this[i].xml + " ";
+        }
+
+        // add last Attribute to string (without trailing space)
+        if (this.length > 0) {
+            ret += this[this.length - 1].xml;
+        }
+
+        return ret;
+    },
+    toString: function() {
+        return "[object NamedNodeMap]";
+    }
+
+});
+
+__addToNamedIndexes__ = function(name, value, element){
+    log.debug('addToNamedIndexes %s %s', name, value);
+    var doc = __ownerDocument__(element);
+    switch(name.toLowerCase()){
+        case "id": 
+            log.debug('addToNamedIndexes #id %s', value);
+            doc._indexes_["#"+value] = element; break;
+        case "name":
+            log.debug('addToNamedIndexes @name %s', value);
+            if(!(doc._indexes_['@'+value])){
+                doc._indexes_["@"+value] = new NodeList(doc, null);
+            }
+            if(element.tagName.toLowerCase() === 'form'){
+                if( !doc[value] ){
+                    //<form name='foo' is available via document.foo
+                    doc[value] = element;
+                }
+            }
+            //also add to general name index for getElementsByName
+            Array.prototype.push.apply(doc._indexes_["@"+value],[element]);
+            break;
+    }
+};
+
+__removeFromNamedIndexes__ = function(name, value, element){
+    var index, doc = __ownerDocument__(element);
+    //console.log('checking named index for removing %s=%s', name, value);
+    switch(name.toLowerCase()){
+        case "id": 
+            //console.log('(%s) replacing id index value #%s = %s', doc, value, element?element.tagName:'no parent');
+            doc._indexes_["#"+value] = null; break;
+        case "name":
+            if(!(doc._indexes_['@'+value])){
+                doc._indexes_["@"+value] = new NodeList(doc, null);
+            }
+            if(element.tagName.toLowerCase() === 'form'){
+                if(doc[value]){
+                    //<form name='foo' is no longer available via document.foo
+                    delete doc[value];
+                }
+            }
+            //also remove from general name index for getElementsByName
+            index = Array.prototype.indexOf.apply(doc._indexes_["@"+value], [element]);
+            if(index > -1){
+                Array.prototype.splice.apply(doc._indexes_["@"+value],[index,1]);
+            }
+            break;
+    }
+};
+
+}(/*Envjs.DOM.NamedNodeMap*/));
+
+
+
+/**
+ * @method __findNamedItemIndex__
+ *      find the item index of the node with the specified name
+ *
+ * @param  name : string - the name of the required node
+ * @param  isnsmap : if its a NamespaceNodeMap
+ * @return : int
+ */
+__findNamedItemIndex__ = function(namednodemap, name, isnsmap) {
+    var ret = -1;
+    // loop through all nodes
+    for (var i = 0; i < namednodemap.length; i++) {
+        //console.log("namednodemap (local %s, name %s), name %s, isnsmap %s",
+        //      namednodemap.localName, namednodemap.name, name, isnsmap)
+        // compare name to each node's nodeName
+        if (namednodemap[i].localName && name && isnsmap) {
+            if (namednodemap[i].localName.toLowerCase() == name.toLowerCase()) {
+                // found it!
+                ret = i;
+                break;
+            }
+        } else {
+            if (namednodemap[i].name && name) {
+                if (namednodemap[i].name.toLowerCase() == name.toLowerCase()) {
+                    // found it!
+                    ret = i;
+                    break;
+                }
+            }
+        }
+    }
+    // if node is not found, default value -1 is returned
+    return ret;
+};
+
+
+/**
+ * @method __findNamedItemNSIndex__
+ *      find the item index of the node with the specified
+ *      namespaceURI and localName
+ *
+ * @param  namespaceURI : string - the namespace URI of the required node
+ * @param  localName    : string - the local name of the required node
+ * @return : int
+ */
+__findNamedItemNSIndex__ = function(namednodemap, namespaceURI, localName) {
+    var ret = -1;
+    // test that localName is not null
+    if (localName) {
+        // loop through all nodes
+        for (var i = 0; i < namednodemap.length; i++) {
+            if (namednodemap[i].namespaceURI && namednodemap[i].localName) {
+                // compare name to each node's namespaceURI and localName
+                if ((namednodemap[i].namespaceURI.toLowerCase() == namespaceURI.toLowerCase()) &&
+                (namednodemap[i].localName.toLowerCase() == localName.toLowerCase())) {
+                    // found it!
+                    ret = i;
+                    break;
+                }
+            }
+        }
+    }
+    // if node is not found, default value -1 is returned
+    return ret;
+};
+
+
+/**
+ * @method __hasAttribute__
+ *      Returns true if specified node exists
+ *
+ * @param  name : string - the name of the required node
+ * @return : boolean
+ */
+__hasAttribute__ = function(namednodemap, name) {
+    var ret = false;
+    // test that Named Node exists
+    var itemIndex = __findNamedItemIndex__(namednodemap, name);
+    if (itemIndex > -1) {
+        // found it!
+        ret = true;
+    }
+    // if node is not found, default value false is returned
+    return ret;
+};
+
+/**
+ * @method __hasAttributeNS__
+ *      Returns true if specified node exists
+ *
+ * @param  namespaceURI : string - the namespace URI of the required node
+ * @param  localName    : string - the local name of the required node
+ * @return : boolean
+ */
+__hasAttributeNS__ = function(namednodemap, namespaceURI, localName) {
+    var ret = false,
+        // test that Named Node exists
+        itemIndex = __findNamedItemNSIndex__(namednodemap, namespaceURI, localName);
+    if (itemIndex > -1) {
+        // found it!
+        ret = true;
+    }
+    // if node is not found, default value false is returned
+    return ret;
+};
+
+/**
+ * @method __cloneNamedNodes__
+ *      Returns a NamedNodeMap containing clones of the Nodes in this NamedNodeMap
+ *
+ * @param  parentNode : Node - the new parent of the cloned NodeList
+ * @param  isnsmap : bool - is this a NamespaceNodeMap
+ * @return NamedNodeMap containing clones of the Nodes in this NamedNodeMap
+ */
+__cloneNamedNodes__ = function(namednodemap, parentNode, isnsmap) {
+    var cloneNamedNodeMap = isnsmap ?
+    new NamespaceNodeMap(namednodemap.ownerDocument, parentNode) :
+    new NamedNodeMap(namednodemap.ownerDocument, parentNode);
+
+    // create list containing clones of all children
+    for (var i = 0; i < namednodemap.length; i++) {
+        __appendChild__(cloneNamedNodeMap, namednodemap[i].cloneNode(false));
+    }
+
+    return cloneNamedNodeMap;
+};
+
+
+/**
+ * @class  NamespaceNodeMap -
+ *      used to represent collections of namespace nodes that can be
+ *      accessed by name typically a set of Element attributes
+ *
+ * @extends NamedNodeMap
+ *
+ * @param  ownerDocument : Document - the ownerDocument
+ * @param  parentNode    : Node - the node that the NamespaceNodeMap is attached to (or null)
+ */
+NamespaceNodeMap = function(ownerDocument, parentNode) {
+    NamedNodeMap.apply(this, arguments);
+};
+NamespaceNodeMap.prototype = new NamedNodeMap();
+__extend__(NamespaceNodeMap.prototype, {
+    get xml() {
+        var ret = "",
+            ns,
+            ind,
+            namespaces,
+            i;
+        // identify namespaces declared local to this Element (ie, not inherited)
+        for (ind = 0; ind < this.length; ind++) {
+            // if namespace declaration does not exist in the containing node's, parentNode's namespaces
+            ns = this[ind];
+            namespaces = this.parentNode.parentNode._namespaces;
+            for(i=0;i<namespaces.length;i++){
+                if(namespaces[i].nodeName === this[ind].nodeName &&
+                    namespaces[i].nodeValue === this[ind].nodeValue){
+                    ns = null;
+                    break;
+                }
+            }
+            if(ns){
+                // display the namespace declaration
+                ret += " "+this[ind].xml;
+            }
+        }
+        return ret;
+    },
+    toString: function() {
+        return "[object NamespacedNodeMap]";
+    }
+});
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Namespace').debug('available'); 
+});
+
+/**
+ * @class  Namespace -
+ *      The Namespace interface represents an namespace in an Element object
+ *
+ * @param  ownerDocument : The Document object associated with this node.
+ */
+exports.Namespace = Namespace = function(ownerDocument) {
+    Node.apply(this, arguments);
+    // the name of this attribute
+    this.name      = "";
+
+    // If this attribute was explicitly given a value in the original document,
+    // this is true; otherwise, it is false.
+    // Note that the implementation is in charge of this attribute, not the user.
+    // If the user changes the value of the attribute (even if it ends up having
+    // the same value as the default value) then the specified flag is
+    // automatically flipped to true
+    this.specified = false;
+};
+Namespace.prototype = new Node();
+__extend__(Namespace.prototype, {
+    get value(){
+        // the value of the attribute is returned as a string
+        return this.nodeValue;
+    },
+    set value(value){
+        this.nodeValue = value+'';
+    },
+    get nodeType(){
+        return Node.NAMESPACE_NODE;
+    },
+    get xml(){
+        var ret = "";
+
+          // serialize Namespace Declaration
+          if (this.nodeName != "") {
+            ret += "xmlns:"+this.nodeName +"=\""+ __escapeXML__(this.nodeValue) +"\"";
+          }
+          else {  
+            // handle default namespace
+            ret += "xmlns=\""+ __escapeXML__(this.nodeValue) +"\"";
+          }
+
+          return ret;
+    },
+    toString: function(){
+        return '[object Namespace]';
+    }
+});
+
+}(/*Envjs.DOM.Namespace*/));
+
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.CharacterData').debug('available'); 
+});
+/**
+ * @class  CharacterData - parent abstract class for Text and Comment
+ * @extends Node
+ * @param  ownerDocument : The Document object associated with this node.
+ */
+exports.CharacterData = CharacterData = function(ownerDocument) {
+    Node.apply(this, arguments);
+};
+CharacterData.prototype = new Node();
+__extend__(CharacterData.prototype,{
+    get data(){
+        return this.nodeValue;
+    },
+    set data(data){
+        this.nodeValue = data;
+    },
+    get textContent(){
+        return this.nodeValue;
+    },
+    set textContent(newText){
+        this.nodeValue = newText;
+    },
+    get length(){return this.nodeValue.length;},
+    appendData: function(arg){
+        // throw Exception if CharacterData is readonly
+        if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+        // append data
+        this.data = "" + this.data + arg;
+    },
+    deleteData: function(offset, count){
+        // throw Exception if CharacterData is readonly
+        if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+        if (this.data) {
+            // throw Exception if offset is negative or greater than the data length,
+            if (__ownerDocument__(this).implementation.errorChecking &&
+                ((offset < 0) || (offset >  this.data.length) || (count < 0))) {
+                throw(new DOMException(DOMException.INDEX_SIZE_ERR));
+            }
+
+            // delete data
+            if(!count || (offset + count) > this.data.length) {
+              this.data = this.data.substring(0, offset);
+            }else {
+              this.data = this.data.substring(0, offset).
+                concat(this.data.substring(offset + count));
+            }
+        }
+    },
+    insertData: function(offset, arg){
+        // throw Exception if CharacterData is readonly
+        if(__ownerDocument__(this).implementation.errorChecking && this._readonly){
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+
+        if(this.data){
+            // throw Exception if offset is negative or greater than the data length,
+            if (__ownerDocument__(this).implementation.errorChecking &&
+                ((offset < 0) || (offset >  this.data.length))) {
+                throw(new DOMException(DOMException.INDEX_SIZE_ERR));
+            }
+
+            // insert data
+            this.data =  this.data.substring(0, offset).concat(arg, this.data.substring(offset));
+        }else {
+            // throw Exception if offset is negative or greater than the data length,
+            if (__ownerDocument__(this).implementation.errorChecking && (offset !== 0)) {
+               throw(new DOMException(DOMException.INDEX_SIZE_ERR));
+            }
+
+            // set data
+            this.data = arg;
+        }
+    },
+    replaceData: function(offset, count, arg){
+        // throw Exception if CharacterData is readonly
+        if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+
+        if (this.data) {
+            // throw Exception if offset is negative or greater than the data length,
+            if (__ownerDocument__(this).implementation.errorChecking &&
+                ((offset < 0) || (offset >  this.data.length) || (count < 0))) {
+                throw(new DOMException(DOMException.INDEX_SIZE_ERR));
+            }
+
+            // replace data
+            this.data = this.data.substring(0, offset).
+                concat(arg, this.data.substring(offset + count));
+        }else {
+            // set data
+            this.data = arg;
+        }
+    },
+    substringData: function(offset, count){
+        var ret = null;
+        if (this.data) {
+            // throw Exception if offset is negative or greater than the data length,
+            // or the count is negative
+            if (__ownerDocument__(this).implementation.errorChecking &&
+                ((offset < 0) || (offset > this.data.length) || (count < 0))) {
+                throw(new DOMException(DOMException.INDEX_SIZE_ERR));
+            }
+            // if count is not specified
+            if (!count) {
+                ret = this.data.substring(offset); // default to 'end of string'
+            }else{
+                ret = this.data.substring(offset, offset + count);
+            }
+        }
+        return ret;
+    },
+    toString : function(){
+        return "[object CharacterData]";
+    }
+});
+
+}(/*Envjs.DOM.CharacterData*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Text').debug('available'); 
+});
+/**
+ * @class  Text
+ *      The Text interface represents the textual content (termed
+ *      character data in XML) of an Element or Attr.
+ *      If there is no markup inside an element's content, the text is
+ *      contained in a single object implementing the Text interface that
+ *      is the only child of the element. If there is markup, it is
+ *      parsed into a list of elements and Text nodes that form the
+ *      list of children of the element.
+ * @extends CharacterData
+ * @param  ownerDocument The Document object associated with this node.
+ */
+exports.Text = Text = function(ownerDocument) {
+    CharacterData.apply(this, arguments);
+    this.nodeName  = "#text";
+};
+Text.prototype = new CharacterData();
+__extend__(Text.prototype,{
+    get localName(){
+        return null;
+    },
+    // Breaks this Text node into two Text nodes at the specified offset,
+    // keeping both in the tree as siblings. This node then only contains
+    // all the content up to the offset point.  And a new Text node, which
+    // is inserted as the next sibling of this node, contains all the
+    // content at and after the offset point.
+    splitText : function(offset) {
+        var data,
+            inode;
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if Node is readonly
+            if (this._readonly) {
+              throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+            // throw Exception if offset is negative or greater than the data length,
+            if ((offset < 0) || (offset > this.data.length)) {
+              throw(new DOMException(DOMException.INDEX_SIZE_ERR));
+            }
+        }
+        if (this.parentNode) {
+            // get remaining string (after offset)
+            data  = this.substringData(offset);
+            // create new TextNode with remaining string
+            inode = __ownerDocument__(this).createTextNode(data);
+            // attach new TextNode
+            if (this.nextSibling) {
+              this.parentNode.insertBefore(inode, this.nextSibling);
+            } else {
+              this.parentNode.appendChild(inode);
+            }
+            // remove remaining string from original TextNode
+            this.deleteData(offset);
+        }
+        return inode;
+    },
+    get nodeType(){
+        return Node.TEXT_NODE;
+    },
+    get xml(){
+        return __escapeXML__(""+ this.nodeValue);
+    },
+    toString: function(){
+        return "[object Text]";
+    }
+});
+
+}(/*Envjs.DOM.Text*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.CDATASection').debug('available'); 
+});
+/**
+ * @class CDATASection 
+ *      CDATA sections are used to escape blocks of text containing 
+ *      characters that would otherwise be regarded as markup.
+ *      The only delimiter that is recognized in a CDATA section is 
+ *      the "\]\]\>" string that ends the CDATA section
+ * @extends Text
+ * @param  ownerDocument : The Document object associated with this node.
+ */
+exports.CDATASection = CDATASection = function(ownerDocument) {
+    Text.apply(this, arguments);
+    this.nodeName = '#cdata-section';
+};
+CDATASection.prototype = new Text();
+__extend__(CDATASection.prototype,{
+    get nodeType(){
+        return Node.CDATA_SECTION_NODE;
+    },
+    get xml(){
+        return "<![CDATA[" + this.nodeValue + "]]>";
+    },
+    toString : function(){
+        return "[object CDATASection]";
+    }
+});
+
+}(/*Envjs.DOM.CDATASection*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Comment').debug('available'); 
+});
+/**
+ * @class  Comment
+ *      This represents the content of a comment, i.e., all the
+ *      characters between the starting '<!--' and ending '-->'
+ * @extends CharacterData
+ * @param  ownerDocument :  The Document object associated with this node.
+ */
+exports.Comment = Comment = function(ownerDocument) {
+    CharacterData.apply(this, arguments);
+    this.nodeName  = "#comment";
+};
+Comment.prototype = new CharacterData();
+__extend__(Comment.prototype, {
+    get localName(){
+        return null;
+    },
+    get nodeType(){
+        return Node.COMMENT_NODE;
+    },
+    get xml(){
+        return "<!--" + this.nodeValue + "-->";
+    },
+    toString : function(){
+        return "[object Comment]";
+    }
+});
+
+}(/*Envjs.DOM.Comment*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.DOMImplementation').debug('available'); 
+});
+/**
+ * @class  DOMImplementation -
+ *      provides a number of methods for performing operations
+ *      that are independent of any particular instance of the
+ *      document object model.
+ *
+ * @author Jon van Noort (jon@webarcana.com.au)
+ */
+exports.DOMImplementation = DOMImplementation = function() {
+    this.preserveWhiteSpace = true;  // by default, ignore whitespace
+    this.namespaceAware = true;       // by default, handle namespaces
+    this.errorChecking  = false;      // by default, test for exceptions
+};
+
+__extend__(DOMImplementation.prototype,{
+    // @param  feature : string - The package name of the feature to test.
+    //      the legal only values are "XML" and "HTML" (case-insensitive).
+    // @param  version : string - This is the version number of the package
+    //       name to test. In Level 1, this is the string "1.0".*
+    // @return : boolean
+    hasFeature : function(feature, version) {
+        var ret = false;
+        if (feature.toLowerCase() == "xml") {
+            ret = (!version || (version == "1.0") || (version == "2.0"));
+        }
+        else if (feature.toLowerCase() == "html") {
+            ret = (!version || (version == "1.0"));
+        }
+        else if (feature.toLowerCase() == "core") {
+            ret = (!version || (version == "2.0"));
+        }
+        else if (feature == "http://www.w3.org/TR/SVG11/feature#BasicStructure") {
+            ret = (version == "1.1");
+        }
+        return ret;
+    },
+    createDocumentType : function(qname, publicId, systemId){
+        var doctype = new DocumentType();
+        doctype.nodeName = qname?qname.toUpperCase():null;
+        doctype.publicId = publicId?publicId:null;
+        doctype.systemId = systemId?systemId:null;
+        return doctype;
+    },
+    createDocument : function(nsuri, qname, doctype){
+
+        var doc = null, documentElement;
+
+        doc = new Document(this, null);
+        if(doctype){
+            doc.doctype = doctype;
+        }
+
+        if(nsuri && qname){
+            documentElement = doc.createElementNS(nsuri, qname);
+        }else if(qname){
+            documentElement = doc.createElement(qname);
+        }
+        if(documentElement){
+            doc.appendChild(documentElement);
+        }
+        return doc;
+    },
+    createHTMLDocument : function(title){
+        var doc = new HTMLDocument(this, null, "");
+        var html = doc.createElement("html"); doc.appendChild(html);
+        var head = doc.createElement("head"); html.appendChild(head);
+        var body = doc.createElement("body"); html.appendChild(body);
+        var t = doc.createElement("title"); head.appendChild(t);
+        if( title) {
+            t.appendChild(doc.createTextNode(title));
+        }
+        return doc;
+    },
+    translateErrCode : function(code) {
+        //convert DOMException Code to human readable error message;
+      var msg = "";
+
+      switch (code) {
+        case DOMException.INDEX_SIZE_ERR :                // 1
+           msg = "INDEX_SIZE_ERR: Index out of bounds";
+           break;
+
+        case DOMException.DOMSTRING_SIZE_ERR :            // 2
+           msg = "DOMSTRING_SIZE_ERR: The resulting string is too long to fit in a DOMString";
+           break;
+
+        case DOMException.HIERARCHY_REQUEST_ERR :         // 3
+           msg = "HIERARCHY_REQUEST_ERR: The Node can not be inserted at this location";
+           break;
+
+        case DOMException.WRONG_DOCUMENT_ERR :            // 4
+           msg = "WRONG_DOCUMENT_ERR: The source and the destination Documents are not the same";
+           break;
+
+        case DOMException.INVALID_CHARACTER_ERR :         // 5
+           msg = "INVALID_CHARACTER_ERR: The string contains an invalid character";
+           break;
+
+        case DOMException.NO_DATA_ALLOWED_ERR :           // 6
+           msg = "NO_DATA_ALLOWED_ERR: This Node / NodeList does not support data";
+           break;
+
+        case DOMException.NO_MODIFICATION_ALLOWED_ERR :   // 7
+           msg = "NO_MODIFICATION_ALLOWED_ERR: This object cannot be modified";
+           break;
+
+        case DOMException.NOT_FOUND_ERR :                 // 8
+           msg = "NOT_FOUND_ERR: The item cannot be found";
+           break;
+
+        case DOMException.NOT_SUPPORTED_ERR :             // 9
+           msg = "NOT_SUPPORTED_ERR: This implementation does not support function";
+           break;
+
+        case DOMException.INUSE_ATTRIBUTE_ERR :           // 10
+           msg = "INUSE_ATTRIBUTE_ERR: The Attribute has already been assigned to another Element";
+           break;
+
+        // Introduced in DOM Level 2:
+        case DOMException.INVALID_STATE_ERR :             // 11
+           msg = "INVALID_STATE_ERR: The object is no longer usable";
+           break;
+
+        case DOMException.SYNTAX_ERR :                    // 12
+           msg = "SYNTAX_ERR: Syntax error";
+           break;
+
+        case DOMException.INVALID_MODIFICATION_ERR :      // 13
+           msg = "INVALID_MODIFICATION_ERR: Cannot change the type of the object";
+           break;
+
+        case DOMException.NAMESPACE_ERR :                 // 14
+           msg = "NAMESPACE_ERR: The namespace declaration is incorrect";
+           break;
+
+        case DOMException.INVALID_ACCESS_ERR :            // 15
+           msg = "INVALID_ACCESS_ERR: The object does not support this function";
+           break;
+
+        default :
+           msg = "UNKNOWN: Unknown Exception Code ("+ code +")";
+      }
+
+      return msg;
+    },
+    toString : function(){
+        return "[object DOMImplementation]";
+    }
+});
+
+}(/*Envjs.DOM.DOMImplementation*/));
+
+
+
+
+/**
+ * @method DOMImplementation._isNamespaceDeclaration - Return true, if attributeName is a namespace declaration
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  attributeName : string - the attribute name
+ * @return : boolean
+ */
+function __isNamespaceDeclaration__(attributeName) {
+  // test if attributeName is 'xmlns'
+  return (attributeName.indexOf('xmlns') > -1);
+}
+
+/**
+ * @method DOMImplementation._isIdDeclaration - Return true, if attributeName is an id declaration
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  attributeName : string - the attribute name
+ * @return : boolean
+ */
+function __isIdDeclaration__(attributeName) {
+  // test if attributeName is 'id' (case insensitive)
+  return attributeName?(attributeName.toLowerCase() == 'id'):false;
+}
+
+/**
+ * @method DOMImplementation._isValidName - Return true,
+ *   if name contains no invalid characters
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  name : string - the candidate name
+ * @return : boolean
+ */
+var re_validName = /^[a-zA-Z_:][a-zA-Z0-9\.\-_:]*$/;
+function __isValidName__(name) {
+  // test if name contains only valid characters
+  return name.match(re_validName);
+}
+
+/**
+ * @method DOMImplementation._isValidString - Return true, if string does not contain any illegal chars
+ *  All of the characters 0 through 31 and character 127 are nonprinting control characters.
+ *  With the exception of characters 09, 10, and 13, (Ox09, Ox0A, and Ox0D)
+ *  Note: different from _isValidName in that ValidStrings may contain spaces
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  name : string - the candidate string
+ * @return : boolean
+ */
+var re_invalidStringChars = /\x01|\x02|\x03|\x04|\x05|\x06|\x07|\x08|\x0B|\x0C|\x0E|\x0F|\x10|\x11|\x12|\x13|\x14|\x15|\x16|\x17|\x18|\x19|\x1A|\x1B|\x1C|\x1D|\x1E|\x1F|\x7F/;
+function __isValidString__(name) {
+  // test that string does not contains invalid characters
+  return (name.search(re_invalidStringChars) < 0);
+}
+
+/**
+ * @method DOMImplementation._parseNSName - parse the namespace name.
+ *  if there is no colon, the
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  qualifiedName : string - The qualified name
+ * @return : NSName - [
+         .prefix        : string - The prefix part of the qname
+         .namespaceName : string - The namespaceURI part of the qname
+    ]
+ */
+function __parseNSName__(qualifiedName) {
+    var resultNSName = {};
+    // unless the qname has a namespaceName, the prefix is the entire String
+    resultNSName.prefix          = qualifiedName;
+    resultNSName.namespaceName   = "";
+    // split on ':'
+    var delimPos = qualifiedName.indexOf(':');
+    if (delimPos > -1) {
+        // get prefix
+        resultNSName.prefix        = qualifiedName.substring(0, delimPos);
+        // get namespaceName
+        resultNSName.namespaceName = qualifiedName.substring(delimPos +1, qualifiedName.length);
+    }
+    return resultNSName;
+}
+
+/**
+ * @method DOMImplementation._parseQName - parse the qualified name
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  qualifiedName : string - The qualified name
+ * @return : QName
+ */
+function __parseQName__(qualifiedName) {
+    var resultQName = {};
+    // unless the qname has a prefix, the local name is the entire String
+    resultQName.localName = qualifiedName;
+    resultQName.prefix    = "";
+    // split on ':'
+    var delimPos = qualifiedName.indexOf(':');
+    if (delimPos > -1) {
+        // get prefix
+        resultQName.prefix    = qualifiedName.substring(0, delimPos);
+        // get localName
+        resultQName.localName = qualifiedName.substring(delimPos +1, qualifiedName.length);
+    }
+    return resultQName;
+}
+var __isValidNamespace__;
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Document').debug('available'); 
+});
+
+/**
+ * @class  Document - The Document interface represents the entire HTML
+ *      or XML document. Conceptually, it is the root of the document tree,
+ *      and provides the primary access to the document's data.
+ *
+ * @extends Node
+ * @param  implementation : DOMImplementation - the creator Implementation
+ */
+exports.Document = Document = function(implementation, docParentWindow) {
+    Node.apply(this, [this]);
+
+    this.async = true;
+    // The Document Type Declaration (see DocumentType) associated with this document
+    this.doctype = null;
+    // The DOMImplementation object that handles this document.
+    this.implementation = implementation;
+
+    this.nodeName  = "#document";
+    // initially false, set to true by parser
+    this.parsing = false;
+    this.baseURI = 'about:blank';
+    
+    this.ownerDocument = null;
+
+    this.importing = false;
+};
+
+Document.prototype = new Node();
+__extend__(Document.prototype,{
+    get localName(){
+        return null;
+    },
+    get textContent(){
+        return null;
+    },
+    get all(){
+        log.debug('all');
+        return this.getElementsByTagName('*');
+    },
+    get documentElement(){
+        var i, length = this.childNodes?this.childNodes.length:0;
+        for(i=0;i<length;i++){
+            if(this.childNodes[i].nodeType === Node.ELEMENT_NODE){
+                return this.childNodes[i];
+            }
+        }
+        return null;
+    },
+    get documentURI(){
+        log.debug('documentURI %s',this.baseURI);
+        return this.baseURI;
+    },
+    createExpression: function(xpath, nsuriMap){
+        log.debug('createExpression %s %s',xpath, nsuriMap);
+        return new XPathExpression(xpath, nsuriMap);
+    },
+    createDocumentFragment: function() {
+        log.debug('createDocumentFragment');
+        var node = new DocumentFragment(this);
+        return node;
+    },
+    createTextNode: function(data) {
+        log.debug('createTextNode %s', data);
+        var node = new Text(this);
+        node.data = data;
+        return node;
+    },
+    createComment: function(data) {
+        log.debug('createComment %s', data);
+        var node = new Comment(this);
+        node.data = data;
+        return node;
+    },
+    createCDATASection : function(data) {
+        log.debug('createCDATASection %s', data);
+        var node = new CDATASection(this);
+        node.data = data;
+        return node;
+    },
+    createProcessingInstruction: function(target, data) {
+        log.debug('createProcessingInstruction %s %s', target, data);
+        // throw Exception if the target string contains an illegal character
+        if (__ownerDocument__(this).implementation.errorChecking &&
+            (!__isValidName__(target))) {
+            throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+        }
+
+        var node = new ProcessingInstruction(this);
+        node.target = target;
+        node.data = data;
+        return node;
+    },
+    createElement: function(tagName) {
+        log.debug('createElement %s', tagName);
+        // throw Exception if the tagName string contains an illegal character
+        if (__ownerDocument__(this).implementation.errorChecking &&
+            (!__isValidName__(tagName))) {
+            throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+        }
+        var node = new Element(this);
+        node.nodeName = tagName;
+        return node;
+    },
+    createElementNS : function(namespaceURI, qualifiedName) {
+        //we use this as a parser flag to ignore the xhtml
+        //namespace assumed by the parser
+        log.debug('createElementNS %s %s', namespaceURI, qualifiedName);
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if the Namespace is invalid
+            if (!__isValidNamespace__(this, namespaceURI, qualifiedName)) {
+                throw(new DOMException(DOMException.NAMESPACE_ERR));
+            }
+
+            // throw Exception if the qualifiedName string contains an illegal character
+            if (!__isValidName__(qualifiedName)) {
+                throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+            }
+        }
+        var node  = new Element(this);
+        var qname = __parseQName__(qualifiedName);
+        node.namespaceURI = namespaceURI;
+        node.prefix       = qname.prefix;
+        node.nodeName     = qualifiedName;
+
+        return node;
+    },
+    createAttribute : function(name) {
+        log.debug('createAttribute %s ', name);
+        // throw Exception if the name string contains an illegal character
+        if (__ownerDocument__(this).implementation.errorChecking &&
+            (!__isValidName__(name))) {
+            throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+        }
+        var node = new Attr(this);
+        node.nodeName = name;
+        return node;
+    },
+    createAttributeNS : function(namespaceURI, qualifiedName) {
+        //we use this as a parser flag to ignore the xhtml
+        //namespace assumed by the parser
+        log.debug('createAttributeNS %s %s', namespaceURI, qualifiedName);
+        // test for exceptions
+        if (this.implementation.errorChecking) {
+            // throw Exception if the Namespace is invalid
+            if (!__isValidNamespace__(this, namespaceURI, qualifiedName, true)) {
+                throw(new DOMException(DOMException.NAMESPACE_ERR));
+            }
+
+            // throw Exception if the qualifiedName string contains an illegal character
+            if (!__isValidName__(qualifiedName)) {
+                throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+            }
+        }
+        var node  = new Attr(this);
+        var qname = __parseQName__(qualifiedName);
+        node.namespaceURI = namespaceURI === '' ? null : namespaceURI;
+        node.prefix       = qname.prefix;
+        node.nodeName     = qualifiedName;
+        node.nodeValue    = "";
+        return node;
+    },
+    createNamespace : function(qualifiedName) {
+        log.debug('createNamespace %s', qualifiedName);
+        // create Namespace specifying 'this' as ownerDocument
+        var node  = new Namespace(this);
+        var qname = __parseQName__(qualifiedName);
+
+        // assign values to properties (and aliases)
+        node.prefix       = qname.prefix;
+        node.nodeName    = qname.localName;
+        node.name         = qualifiedName;
+        node.nodeValue    = "";
+
+        return node;
+    },
+    createEntityReference: function(){
+        log.debug('createEntityReference');
+    },
+    createRange: function(){
+        log.debug('createRange');
+        return new Range();
+    },
+
+    evaluate: function(xpathText, contextNode, nsuriMapper, resultType, result){
+        //return new XPathExpression().evaluate();
+        throw 'Include src/dom/xpath.js for evaluate support.';
+    },
+
+    getElementById : function(elementId) {
+        log.debug('getElementById %s = %s', elementId, this._indexes_["#"+elementId]);
+        return this._indexes_["#"+elementId]||null;
+    },
+    normalizeDocument: function(){
+        log.debug('normalizeDocument');
+        this.normalize();
+    },
+    get nodeType(){
+        return Node.DOCUMENT_NODE;
+    },
+    get xml(){
+        return this.documentElement.xml;
+    },
+    toString: function(){
+        return "[object XMLDocument]";
+    },
+    get defaultView(){
+        log.debug('defaultView');
+        return { getComputedStyle: function(elem){
+            return window.getComputedStyle(elem);
+        }};
+    }
+});
+
+}(/*Envjs.DOM.Document*/));
+
+
+/*
+ * Helper function
+ *
+ */
+__isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribute) {
+
+    if (doc.importing === true) {
+        //we're doing an importNode operation (or a cloneNode) - in both cases, there
+        //is no need to perform any namespace checking since the nodes have to have been valid
+        //to have gotten into the DOM in the first place
+        return true;
+    }
+
+    var valid = true;
+    // parse QName
+    var qName = __parseQName__(qualifiedName);
+
+
+    //only check for namespaces if we're finished parsing
+    if (this.parsing === false) {
+
+        // if the qualifiedName is malformed
+        if (qName.localName.indexOf(":") > -1 ){
+            valid = false;
+        }
+
+        if ((valid) && (!isAttribute)) {
+            // if the namespaceURI is not null
+            if (!namespaceURI) {
+                valid = false;
+            }
+        }
+
+        // if the qualifiedName has a prefix
+        if ((valid) && (qName.prefix === "")) {
+            valid = false;
+        }
+    }
+
+    // if the qualifiedName has a prefix that is "xml" and the namespaceURI is
+    //  different from "http://www.w3.org/XML/1998/namespace" [Namespaces].
+    if ((valid) && (qName.prefix === "xml") && (namespaceURI !== "http://www.w3.org/XML/1998/namespace")) {
+        valid = false;
+    }
+
+    return valid;
+};
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.DocumentType').debug('available'); 
+});
+
+/**
+ * @author envjs team
+ * @param {Document} onwnerDocument
+ */
+exports.DocumentType = DocumentType = function(ownerDocument) {
+    Node.apply(this, arguments);
+    this.systemId = null;
+    this.publicId = null;
+};
+DocumentType.prototype = new Node();
+__extend__({
+    get name(){
+        return this.nodeName;
+    },
+    get entities(){
+        return null;
+    },
+    get internalSubsets(){
+        return null;
+    },
+    get notations(){
+        return null;
+    },
+    toString : function(){
+        return "[object DocumentType]";
+    }
+});
+
+}(/*Envjs.DOM.DocumentType*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.DocumentFragment').debug('available'); 
+});
+/**
+ * @class  DocumentFragment -
+ *      DocumentFragment is a "lightweight" or "minimal" Document object.
+ * @extends Node
+ * @param  ownerDocument :  The Document object associated with this node.
+ */
+exports.DocumentFragment = DocumentFragment =function(ownerDocument) {
+    Node.apply(this, arguments);
+    this.nodeName  = "#document-fragment";
+};
+DocumentFragment.prototype = new Node();
+__extend__(DocumentFragment.prototype,{
+    get nodeType(){
+        return Node.DOCUMENT_FRAGMENT_NODE;
+    },
+    get xml(){
+        var xml = "",
+        count = this.childNodes.length;
+
+        // create string concatenating the serialized ChildNodes
+        for (var i = 0; i < count; i++) {
+            xml += this.childNodes.item(i).xml;
+        }
+
+        return xml;
+    },
+    toString : function(){
+        return "[object DocumentFragment]";
+    },
+    get localName(){
+        return null;
+    }
+});
+
+}(/*Envjs.DOM.DocumentFragment*/));
+
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.DOMException').debug('available'); 
+});
+/**
+ * @class  DOMException - raised when an operation is impossible to perform
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  code : int - the exception code (one of the DOMException constants)
+ */
+exports.DOMException = DOMException = function(code) {
+    this.code = code;
+};
+
+// DOMException constants
+// Introduced in DOM Level 1:
+DOMException.INDEX_SIZE_ERR                 = 1;
+DOMException.DOMSTRING_SIZE_ERR             = 2;
+DOMException.HIERARCHY_REQUEST_ERR          = 3;
+DOMException.WRONG_DOCUMENT_ERR             = 4;
+DOMException.INVALID_CHARACTER_ERR          = 5;
+DOMException.NO_DATA_ALLOWED_ERR            = 6;
+DOMException.NO_MODIFICATION_ALLOWED_ERR    = 7;
+DOMException.NOT_FOUND_ERR                  = 8;
+DOMException.NOT_SUPPORTED_ERR              = 9;
+DOMException.INUSE_ATTRIBUTE_ERR            = 10;
+
+// Introduced in DOM Level 2:
+DOMException.INVALID_STATE_ERR              = 11;
+DOMException.SYNTAX_ERR                     = 12;
+DOMException.INVALID_MODIFICATION_ERR       = 13;
+DOMException.NAMESPACE_ERR                  = 14;
+DOMException.INVALID_ACCESS_ERR             = 15;
+
+//Introduced in DOM Level 3:
+DOMException.VALIDATION_ERR                 = 16;
+DOMException.TYPE_MISMATCH_ERR              = 17;
+
+}(/*Envjs.DOM.DOMException*/));
+var __E4XParser__,
+    __E4XtoDomNode__;
+    
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.DOMParser').debug('available'); 
+});
+
+/**
+ * @author ariel flesler
+ *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
+ * @param {Object} str
+ */
+function trim( str ){
+    return (str || "").replace( /^\s+|\s+$/g, "" );
+}
+
+// =========================================================================
+//
+// xmlsax.js - an XML SAX parser in JavaScript.
+//
+// version 3.1
+//
+// =========================================================================
+//
+// Copyright (C) 2001 - 2002 David Joham (djoham@yahoo.com) and Scott Severtson
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+//
+//
+// Visit the XML for <SCRIPT> home page at http://xmljs.sourceforge.net
+//
+
+// CONSTANTS
+var whitespace = "\n\r\t ";
+
+/**
+*   function:   SAXStrings
+*   Author:   Scott Severtson
+*   Description: a useful object containing string manipulation functions
+**/
+
+var SAXStrings = function() {};
+
+SAXStrings.WHITESPACE = " \t\n\r";
+SAXStrings.NONWHITESPACE = /\S/;
+SAXStrings.QUOTES = "\"'";
+
+SAXStrings.prototype.getColumnNumber = function(strD, iP) {
+    if((strD === null) || (strD.length === 0)) {
+        return -1;
+    }
+    iP = iP || strD.length;
+
+    var arrD = strD.substring(0, iP).split("\n");
+    var strLine = arrD[arrD.length - 1];
+    arrD.length--;
+    var iLinePos = arrD.join("\n").length;
+
+    return iP - iLinePos;
+};
+
+
+SAXStrings.prototype.getLineNumber = function(strD, iP) {
+    if((strD === null) || (strD.length === 0)) {
+        return -1;
+    }
+    iP = iP || strD.length;
+    return strD.substring(0, iP).split("\n").length;
+};
+
+
+SAXStrings.prototype.indexOfNonWhitespace = function(strD, iB, iE) {
+    if((strD === null) || (strD.length === 0)) {
+        return -1;
+    }
+    iB = iB || 0;
+    iE = iE || strD.length;
+
+    while( strD.charCodeAt(iB++) < 33 ){
+        continue;
+    }
+    return (iB > iE)?-1:iB-1;
+
+};
+
+
+SAXStrings.prototype.indexOfWhitespace = function(strD, iB, iE) {
+    if((strD === null) || (strD.length === 0)) {
+        return -1;
+    }
+    iB = iB || 0;
+    iE = iE || strD.length;
+
+    while( strD.charCodeAt(iB++) >= 33 ){
+        continue;
+    }
+    return (iB > iE)?-1:iB-1;
+};
+
+
+SAXStrings.prototype.isEmpty = function(strD) {
+    return (strD === null) || (strD.length === 0);
+};
+
+SAXStrings.prototype.lastIndexOfNonWhitespace = function(strD, iB, iE) {
+    if((strD === null) || (strD.length === 0)) {
+        return -1;
+    }
+    iB = iB || 0;
+    iE = iE || strD.length;
+
+    while( (iE >= iB) && strD.charCodeAt(--iE) < 33 ){
+        continue;
+    }
+    return (iE < iB)?-1:iE;
+};
+
+
+SAXStrings.prototype.replace = function(strD, iB, iE, strF, strR) {
+    if((strD === null) || (strD.length === 0)) {
+        return "";
+    }
+    iB = iB || 0;
+    iE = iE || strD.length;
+    return strD.substring(iB, iE).split(strF).join(strR);
+};
+
+var saxstrings = new SAXStrings();
+
+
+/***************************************************************************************************************
+Stack: A simple stack class, used for verifying document structure.
+
+    Author:   Scott Severtson
+*****************************************************************************************************************/
+
+var Stack = function() {
+    this.m_arr = [];
+};
+__extend__(Stack.prototype, {
+    clear : function() {
+        this.m_arr = [];
+    },
+    count : function() {
+        return this.m_arr.length;
+    },
+    destroy : function() {
+        this.m_arr = null;
+    },
+    peek : function() {
+        if(this.m_arr.length === 0) {
+            return null;
+        }
+        return this.m_arr[this.m_arr.length - 1];
+    },
+    pop : function() {
+        if(this.m_arr.length === 0) {
+            return null;
+        }
+        var o = this.m_arr[this.m_arr.length - 1];
+        this.m_arr.length--;
+        return o;
+    },
+    push : function(o) {
+        this.m_arr[this.m_arr.length] = o;
+    }
+});
+
+/**
+* function: isEmpty
+* Author: mike@idle.org
+* Description:  convenience function to identify an empty string
+**/
+function isEmpty(str) {
+    return (str===null) || (str.length===0);
+}
+
+/**
+ * function __escapeXML__
+ * author: David Joham djoham@yahoo.com
+ * @param  str : string - The string to be escaped
+ * @return : string - The escaped string
+ */
+var escAmpRegEx = /&/g;
+var escLtRegEx = /</g;
+var escGtRegEx = />/g;
+var quotRegEx = /"/g;
+var aposRegEx = /'/g;
+function __escapeXML__(str) {
+    str = str.replace(escAmpRegEx, "&amp;").
+            replace(escLtRegEx, "&lt;").
+            replace(escGtRegEx, "&gt;").
+            replace(quotRegEx, "&quot;").
+            replace(aposRegEx, "&apos;");
+
+    return str;
+}
+
+/**
+ * function __unescapeXML__
+ * author: David Joham djoham@yahoo.com
+ * @param  str : string - The string to be unescaped
+ * @return : string - The unescaped string
+ */
+var unescAmpRegEx = /&amp;/g;
+var unescLtRegEx = /&lt;/g;
+var unescGtRegEx = /&gt;/g;
+var unquotRegEx = /&quot;/g;
+var unaposRegEx = /&apos;/g;
+function __unescapeXML__(str) {
+    str = str.replace(unescAmpRegEx, "&").
+            replace(unescLtRegEx, "<").
+            replace(unescGtRegEx, ">").
+            replace(unquotRegEx, "\"").
+            replace(unaposRegEx, "'");
+
+    return str;
+}
+
+
+/**
+*   function:   this is the constructor to the XMLP Object
+*   Author:   Scott Severtson
+*   Description:XMLP is a pull-based parser. The calling application passes in a XML string
+*   to the constructor, then repeatedly calls .next() to parse the next segment.
+*   .next() returns a flag indicating what type of segment was found, and stores
+*   data temporarily in couple member variables (name, content, array of
+*   attributes), which can be accessed by several .get____() methods.
+*
+*   Basically, XMLP is the lowest common denominator parser - an very simple
+*   API which other wrappers can be built against.
+**/
+
+
+var XMLP = function(strXML) {
+    // Normalize line breaks
+    strXML = saxstrings.replace(strXML, null, null, "\r\n", "\n");
+    strXML = saxstrings.replace(strXML, null, null, "\r", "\n");
+
+    this.m_xml = strXML;
+    this.m_iP = 0;
+    this.m_iState = XMLP._STATE_PROLOG;
+    this.m_stack = new Stack();
+    this._clearAttributes();
+    this.replaceEntities = true;
+};
+
+
+// CONSTANTS    (these must be below the constructor)
+
+
+XMLP._NONE    = 0;
+XMLP._ELM_B   = 1;
+XMLP._ELM_E   = 2;
+XMLP._ELM_EMP = 3;
+XMLP._ATT     = 4;
+XMLP._TEXT    = 5;
+XMLP._ENTITY  = 6;
+XMLP._PI      = 7;
+XMLP._CDATA   = 8;
+XMLP._COMMENT = 9;
+XMLP._DTD     = 10;
+XMLP._ERROR   = 11;
+
+XMLP._CONT_XML = 0;
+XMLP._CONT_ALT = 1;
+
+XMLP._ATT_NAME = 0;
+XMLP._ATT_VAL  = 1;
+
+XMLP._STATE_PROLOG = 1;
+XMLP._STATE_DOCUMENT = 2;
+XMLP._STATE_MISC = 3;
+
+XMLP._errs = [];
+XMLP._errs[XMLP.ERR_CLOSE_PI       = 0 ] = "PI: missing closing sequence";
+XMLP._errs[XMLP.ERR_CLOSE_DTD      = 1 ] = "DTD: missing closing sequence";
+XMLP._errs[XMLP.ERR_CLOSE_COMMENT  = 2 ] = "Comment: missing closing sequence";
+XMLP._errs[XMLP.ERR_CLOSE_CDATA    = 3 ] = "CDATA: missing closing sequence";
+XMLP._errs[XMLP.ERR_CLOSE_ELM      = 4 ] = "Element: missing closing sequence";
+XMLP._errs[XMLP.ERR_CLOSE_ENTITY   = 5 ] = "Entity: missing closing sequence";
+XMLP._errs[XMLP.ERR_PI_TARGET      = 6 ] = "PI: target is required";
+XMLP._errs[XMLP.ERR_ELM_EMPTY      = 7 ] = "Element: cannot be both empty and closing";
+XMLP._errs[XMLP.ERR_ELM_NAME       = 8 ] = "Element: name must immediatly follow \"<\"";
+XMLP._errs[XMLP.ERR_ELM_LT_NAME    = 9 ] = "Element: \"<\" not allowed in element names";
+XMLP._errs[XMLP.ERR_ATT_VALUES     = 10] = "Attribute: values are required and must be in quotes";
+XMLP._errs[XMLP.ERR_ATT_LT_NAME    = 11] = "Element: \"<\" not allowed in attribute names";
+XMLP._errs[XMLP.ERR_ATT_LT_VALUE   = 12] = "Attribute: \"<\" not allowed in attribute values";
+XMLP._errs[XMLP.ERR_ATT_DUP        = 13] = "Attribute: duplicate attributes not allowed";
+XMLP._errs[XMLP.ERR_ENTITY_UNKNOWN = 14] = "Entity: unknown entity";
+XMLP._errs[XMLP.ERR_INFINITELOOP   = 15] = "Infininte loop";
+XMLP._errs[XMLP.ERR_DOC_STRUCTURE  = 16] = "Document: only comments, processing instructions, or whitespace allowed outside of document element";
+XMLP._errs[XMLP.ERR_ELM_NESTING    = 17] = "Element: must be nested correctly";
+
+
+
+XMLP.prototype._addAttribute = function(name, value) {
+    this.m_atts[this.m_atts.length] = [name, value];
+};
+
+
+XMLP.prototype._checkStructure = function(iEvent) {
+
+        if(XMLP._STATE_PROLOG == this.m_iState) {
+                if((XMLP._TEXT == iEvent) || (XMLP._ENTITY == iEvent)) {
+            if(saxstrings.indexOfNonWhitespace(this.getContent(), this.getContentBegin(), this.getContentEnd()) != -1) {
+                                return this._setErr(XMLP.ERR_DOC_STRUCTURE);
+            }
+        }
+
+        if((XMLP._ELM_B == iEvent) || (XMLP._ELM_EMP == iEvent)) {
+            this.m_iState = XMLP._STATE_DOCUMENT;
+            // Don't return - fall through to next state
+        }
+    }
+    if(XMLP._STATE_DOCUMENT == this.m_iState) {
+        if((XMLP._ELM_B == iEvent) || (XMLP._ELM_EMP == iEvent)) {
+            this.m_stack.push(this.getName());
+        }
+
+        if((XMLP._ELM_E == iEvent) || (XMLP._ELM_EMP == iEvent)) {
+            var strTop = this.m_stack.pop();
+            if((strTop === null) || (strTop != this.getName())) {
+                return this._setErr(XMLP.ERR_ELM_NESTING);
+            }
+        }
+
+        if(this.m_stack.count() === 0) {
+            this.m_iState = XMLP._STATE_MISC;
+            return iEvent;
+        }
+    }
+    if(XMLP._STATE_MISC == this.m_iState) {
+                if((XMLP._ELM_B == iEvent) || (XMLP._ELM_E == iEvent) || (XMLP._ELM_EMP == iEvent) || (XMLP.EVT_DTD == iEvent)) {
+                        return this._setErr(XMLP.ERR_DOC_STRUCTURE);
+        }
+
+        if((XMLP._TEXT == iEvent) || (XMLP._ENTITY == iEvent)) {
+                        if(saxstrings.indexOfNonWhitespace(this.getContent(), this.getContentBegin(), this.getContentEnd()) != -1) {
+                                return this._setErr(XMLP.ERR_DOC_STRUCTURE);
+            }
+        }
+    }
+
+    return iEvent;
+
+};
+
+
+XMLP.prototype._clearAttributes = function() {
+    this.m_atts = [];
+};
+
+
+XMLP.prototype._findAttributeIndex = function(name) {
+    for(var i = 0; i < this.m_atts.length; i++) {
+        if(this.m_atts[i][XMLP._ATT_NAME] == name) {
+            return i;
+        }
+    }
+    return -1;
+
+};
+
+XMLP.prototype.getAttributeCount = function() {
+    return this.m_atts ? this.m_atts.length : 0;
+};
+
+XMLP.prototype.getAttributeName = function(index) {
+    return ((index < 0) || (index >= this.m_atts.length)) ? null : this.m_atts[index][XMLP._ATT_NAME];
+};
+
+XMLP.prototype.getAttributeValue = function(index) {
+    return ((index < 0) || (index >= this.m_atts.length)) ? null : __unescapeXML__(this.m_atts[index][XMLP._ATT_VAL]);
+};
+
+XMLP.prototype.getAttributeValueByName = function(name) {
+    return this.getAttributeValue(this._findAttributeIndex(name));
+};
+
+
+XMLP.prototype.getColumnNumber = function() {
+    return saxstrings.getColumnNumber(this.m_xml, this.m_iP);
+};
+
+
+XMLP.prototype.getContent = function() {
+    return (this.m_cSrc == XMLP._CONT_XML) ? this.m_xml : this.m_cAlt;
+};
+
+
+XMLP.prototype.getContentBegin = function() {
+    return this.m_cB;
+};
+
+
+XMLP.prototype.getContentEnd = function() {
+    return this.m_cE;
+};
+
+
+XMLP.prototype.getLineNumber = function() {
+    return saxstrings.getLineNumber(this.m_xml, this.m_iP);
+};
+
+
+XMLP.prototype.getName = function() {
+    return this.m_name;
+};
+
+
+XMLP.prototype.next = function() {
+    return this._checkStructure(this._parse());
+};
+
+XMLP.prototype.appendFragment = function(xmlfragment) {
+    var start = this.m_xml.slice(0,this.m_iP);
+    var end = this.m_xml.slice(this.m_iP);
+    this.m_xml = start+xmlfragment+end;
+};
+
+
+XMLP.prototype._parse = function() {
+
+    if(this.m_iP == this.m_xml.length) {
+        return XMLP._NONE;
+    }
+
+    if(this.m_iP == this.m_xml.indexOf("<", this.m_iP)){
+        if(this.m_xml.charAt(this.m_iP+1) == "?") {
+            return this._parsePI(this.m_iP + 2);
+        }
+        else if(this.m_xml.charAt(this.m_iP+1) == "!") {
+            if(this.m_xml.charAt(this.m_iP+2) == "D") {
+                return this._parseDTD(this.m_iP + 9);
+            }
+            else if(this.m_xml.charAt(this.m_iP+2) == "-") {
+                return this._parseComment(this.m_iP + 4);
+            }
+            else if(this.m_xml.charAt(this.m_iP+2) == "[") {
+                return this._parseCDATA(this.m_iP + 9);
+            }
+        }
+        else{
+            return this._parseElement(this.m_iP + 1);
+        }
+    }
+    else if(this.m_iP == this.m_xml.indexOf("&", this.m_iP)) {
+        return this._parseEntity(this.m_iP + 1);
+    }
+    else{
+        return this._parseText(this.m_iP);
+    }
+
+
+};
+
+
+XMLP.prototype._parseAttribute = function(iB, iE) {
+    var iNB, iNE, iEq, iVB, iVE;
+    var cQuote, strN, strV, iRet;
+
+        this.m_cAlt = ""; //resets the value so we don't use an old one by accident (see testAttribute7 in the test suite)
+
+    iNB = saxstrings.indexOfNonWhitespace(this.m_xml, iB, iE);
+    if((iNB == -1) ||(iNB >= iE)) {
+        return iNB;
+    }
+
+    iEq = this.m_xml.indexOf("=", iNB);
+    if((iEq == -1) || (iEq > iE)) {
+        return this._setErr(XMLP.ERR_ATT_VALUES);
+    }
+
+    iNE = saxstrings.lastIndexOfNonWhitespace(this.m_xml, iNB, iEq);
+
+    iVB = saxstrings.indexOfNonWhitespace(this.m_xml, iEq + 1, iE);
+    if((iVB == -1) ||(iVB > iE)) {
+        return this._setErr(XMLP.ERR_ATT_VALUES);
+    }
+
+    cQuote = this.m_xml.charAt(iVB);
+    if(SAXStrings.QUOTES.indexOf(cQuote) == -1) {
+        return this._setErr(XMLP.ERR_ATT_VALUES);
+    }
+
+    iVE = this.m_xml.indexOf(cQuote, iVB + 1);
+    if((iVE == -1) ||(iVE > iE)) {
+        return this._setErr(XMLP.ERR_ATT_VALUES);
+    }
+
+    strN = this.m_xml.substring(iNB, iNE + 1);
+    strV = this.m_xml.substring(iVB + 1, iVE);
+
+    if(strN.indexOf("<") != -1) {
+        return this._setErr(XMLP.ERR_ATT_LT_NAME);
+    }
+
+    if(strV.indexOf("<") != -1) {
+        return this._setErr(XMLP.ERR_ATT_LT_VALUE);
+    }
+
+    strV = saxstrings.replace(strV, null, null, "\n", " ");
+    strV = saxstrings.replace(strV, null, null, "\t", " ");
+        iRet = this._replaceEntities(strV);
+    if(iRet == XMLP._ERROR) {
+        return iRet;
+    }
+
+    strV = this.m_cAlt;
+
+    if(this._findAttributeIndex(strN) == -1) {
+        this._addAttribute(strN, strV);
+    }else {
+        return this._setErr(XMLP.ERR_ATT_DUP);
+    }
+
+    this.m_iP = iVE + 2;
+
+    return XMLP._ATT;
+
+};
+
+
+XMLP.prototype._parseCDATA = function(iB) {
+    var iE = this.m_xml.indexOf("]]>", iB);
+    if (iE == -1) {
+        return this._setErr(XMLP.ERR_CLOSE_CDATA);
+    }
+
+    this._setContent(XMLP._CONT_XML, iB, iE);
+
+    this.m_iP = iE + 3;
+
+    return XMLP._CDATA;
+};
+
+
+XMLP.prototype._parseComment = function(iB) {
+    var iE = this.m_xml.indexOf("-" + "->", iB);
+    if (iE == -1) {
+        return this._setErr(XMLP.ERR_CLOSE_COMMENT);
+    }
+
+    this._setContent(XMLP._CONT_XML, iB, iE);
+
+    this.m_iP = iE + 3;
+
+    return XMLP._COMMENT;
+
+};
+
+
+XMLP.prototype._parseDTD = function(iB) {
+    // Eat DTD
+    var iE, strClose, iInt, iLast;
+
+    iE = this.m_xml.indexOf(">", iB);
+    if(iE == -1) {
+        return this._setErr(XMLP.ERR_CLOSE_DTD);
+    }
+
+    iInt = this.m_xml.indexOf("[", iB);
+    strClose = ((iInt != -1) && (iInt < iE)) ? "]>" : ">";
+
+    while(true) {
+
+        iE = this.m_xml.indexOf(strClose, iB);
+        if(iE == -1) {
+            return this._setErr(XMLP.ERR_CLOSE_DTD);
+        }
+
+        // Make sure it is not the end of a CDATA section
+        if (this.m_xml.substring(iE - 1, iE + 2) != "]]>") {
+            break;
+        }
+    }
+
+    this.m_iP = iE + strClose.length;
+
+    return XMLP._DTD;
+
+};
+
+
+XMLP.prototype._parseElement = function(iB) {
+    var iE, iDE, iNE, iRet;
+    var iType, strN, iLast;
+
+    iDE = iE = this.m_xml.indexOf(">", iB);
+    if(iE == -1) {
+        return this._setErr(XMLP.ERR_CLOSE_ELM);
+    }
+
+    if(this.m_xml.charAt(iB) == "/") {
+        iType = XMLP._ELM_E;
+        iB++;
+    } else {
+        iType = XMLP._ELM_B;
+    }
+
+    if(this.m_xml.charAt(iE - 1) == "/") {
+        if(iType == XMLP._ELM_E) {
+            return this._setErr(XMLP.ERR_ELM_EMPTY);
+        }
+        iType = XMLP._ELM_EMP;
+        iDE--;
+    }
+
+    iDE = saxstrings.lastIndexOfNonWhitespace(this.m_xml, iB, iDE);
+
+    this._clearAttributes();
+
+    iNE = saxstrings.indexOfWhitespace(this.m_xml, iB, iDE);
+    if(iNE == -1) {
+        iNE = iDE + 1;
+    } else {
+        this.m_iP = iNE;
+        while(this.m_iP < iDE) {
+            iRet = this._parseAttribute(this.m_iP, iDE);
+            if(iRet == XMLP._ERROR){ 
+                return iRet;
+            }
+        }
+    }
+
+    strN = this.m_xml.substring(iB, iNE);
+
+    this.m_name = strN;
+    this.m_iP = iE + 1;
+
+    return iType;
+
+};
+
+
+XMLP.prototype._parseEntity = function(iB) {
+    var iE = this.m_xml.indexOf(";", iB);
+    if(iE == -1) {
+        return this._setErr(XMLP.ERR_CLOSE_ENTITY);
+    }
+
+    this.m_iP = iE + 1;
+
+    return this._replaceEntity(this.m_xml, iB, iE);
+
+};
+
+
+XMLP.prototype._parsePI = function(iB) {
+
+    var iE, iTB, iTE, iCB, iCE;
+
+    iE = this.m_xml.indexOf("?>", iB);
+    if(iE   == -1) {
+        return this._setErr(XMLP.ERR_CLOSE_PI);
+    }
+
+    iTB = saxstrings.indexOfNonWhitespace(this.m_xml, iB, iE);
+    if(iTB == -1) {
+        return this._setErr(XMLP.ERR_PI_TARGET);
+    }
+
+    iTE = saxstrings.indexOfWhitespace(this.m_xml, iTB, iE);
+    if(iTE  == -1) {
+        iTE = iE;
+    }
+
+    iCB = saxstrings.indexOfNonWhitespace(this.m_xml, iTE, iE);
+    if(iCB == -1) {
+        iCB = iE;
+    }
+
+    iCE = saxstrings.lastIndexOfNonWhitespace(this.m_xml, iCB, iE);
+    if(iCE  == -1) {
+        iCE = iE - 1;
+    }
+
+    this.m_name = this.m_xml.substring(iTB, iTE);
+    this._setContent(XMLP._CONT_XML, iCB, iCE + 1);
+    this.m_iP = iE + 2;
+
+    return XMLP._PI;
+
+};
+
+
+XMLP.prototype._parseText = function(iB) {
+    var iE, iEE;
+
+    iE = this.m_xml.indexOf("<", iB);
+    if(iE == -1) {
+        iE = this.m_xml.length;
+    }
+
+    if(this.replaceEntities) {
+        iEE = this.m_xml.indexOf("&", iB);
+        if((iEE != -1) && (iEE <= iE)) {
+            iE = iEE;
+        }
+    }
+
+    this._setContent(XMLP._CONT_XML, iB, iE);
+
+    this.m_iP = iE;
+
+    return XMLP._TEXT;
+
+};
+
+
+XMLP.prototype._replaceEntities = function(strD, iB, iE) {
+    if(saxstrings.isEmpty(strD)){ 
+        return "";
+    }
+    iB = iB || 0;
+    iE = iE || strD.length;
+
+    var iEB, iEE, iRet, strRet = "";
+
+    iEB = strD.indexOf("&", iB);
+    iEE = iB;
+
+    while((iEB > 0) && (iEB < iE)) {
+        strRet += strD.substring(iEE, iEB);
+
+        iEE = strD.indexOf(";", iEB) + 1;
+
+        if((iEE === 0) || (iEE > iE)) {
+            return this._setErr(XMLP.ERR_CLOSE_ENTITY);
+        }
+
+        iRet = this._replaceEntity(strD, iEB + 1, iEE - 1);
+        if(iRet == XMLP._ERROR) {
+            return iRet;
+        }
+
+        strRet += this.m_cAlt;
+
+        iEB = strD.indexOf("&", iEE);
+    }
+
+    if(iEE != iE) {
+        strRet += strD.substring(iEE, iE);
+    }
+
+    this._setContent(XMLP._CONT_ALT, strRet);
+
+    return XMLP._ENTITY;
+
+};
+
+
+XMLP.prototype._replaceEntity = function(strD, iB, iE) {
+    var strEnt;
+    if(saxstrings.isEmpty(strD)){
+        return -1;
+    }
+    iB = iB || 0;
+    iE = iE || strD.length;
+
+    switch(strD.substring(iB, iE)) {
+        case "amp":  strEnt = "&";  break;
+        case "lt":   strEnt = "<";  break;
+        case "gt":   strEnt = ">";  break;
+        case "apos": strEnt = "'";  break;
+        case "quot": strEnt = "\""; break;
+        default:
+            if(strD.charAt(iB) == "#") {
+                strEnt = String.fromCharCode(parseInt(strD.substring(iB + 1, iE),10))+'';
+            } else {
+                return this._setErr(XMLP.ERR_ENTITY_UNKNOWN);
+            }
+        break;
+    }
+    this._setContent(XMLP._CONT_ALT, strEnt);
+
+    return XMLP._ENTITY;
+};
+
+
+XMLP.prototype._setContent = function(iSrc) {
+    var args = arguments;
+
+    if(XMLP._CONT_XML == iSrc) {
+        this.m_cAlt = null;
+        this.m_cB = args[1];
+        this.m_cE = args[2];
+    } else {
+        this.m_cAlt = args[1];
+        this.m_cB = 0;
+        this.m_cE = args[1].length;
+    }
+    this.m_cSrc = iSrc;
+
+};
+
+
+XMLP.prototype._setErr = function(iErr) {
+    var strErr = XMLP._errs[iErr];
+
+    this.m_cAlt = strErr;
+    this.m_cB = 0;
+    this.m_cE = strErr.length;
+    this.m_cSrc = XMLP._CONT_ALT;
+
+    return XMLP._ERROR;
+
+};
+
+
+
+
+/**
+* function:   SAXDriver
+* Author:   Scott Severtson
+* Description:
+*    SAXDriver is an object that basically wraps an XMLP instance, and provides an
+*   event-based interface for parsing. This is the object users interact with when coding
+*   with XML for <SCRIPT>
+**/
+
+var SAXDriver = function() {
+    this.m_hndDoc = null;
+    this.m_hndErr = null;
+    this.m_hndLex = null;
+};
+
+
+// CONSTANTS
+SAXDriver.DOC_B = 1;
+SAXDriver.DOC_E = 2;
+SAXDriver.ELM_B = 3;
+SAXDriver.ELM_E = 4;
+SAXDriver.CHARS = 5;
+SAXDriver.PI    = 6;
+SAXDriver.CD_B  = 7;
+SAXDriver.CD_E  = 8;
+SAXDriver.CMNT  = 9;
+SAXDriver.DTD_B = 10;
+SAXDriver.DTD_E = 11;
+
+
+
+SAXDriver.prototype.parse = function(strD) {
+    var parser = new XMLP(strD);
+
+    if(this.m_hndDoc && this.m_hndDoc.setDocumentLocator) {
+        this.m_hndDoc.setDocumentLocator(this);
+    }
+
+    this.m_parser = parser;
+    this.m_bErr = false;
+
+    if(!this.m_bErr) {
+        this._fireEvent(SAXDriver.DOC_B);
+    }
+    this._parseLoop();
+    if(!this.m_bErr) {
+        this._fireEvent(SAXDriver.DOC_E);
+    }
+
+    this.m_xml = null;
+    this.m_iP = 0;
+
+};
+
+
+SAXDriver.prototype.setDocumentHandler = function(hnd) {
+    this.m_hndDoc = hnd;
+};
+
+SAXDriver.prototype.setErrorHandler = function(hnd) {
+    this.m_hndErr = hnd;
+};
+
+SAXDriver.prototype.setLexicalHandler = function(hnd) {
+    this.m_hndLex = hnd;
+};
+
+/**
+ * LOCATOR/PARSE EXCEPTION INTERFACE
+ **/
+SAXDriver.prototype.getColumnNumber = function() {
+    return this.m_parser.getColumnNumber();
+};
+
+SAXDriver.prototype.getLineNumber = function() {
+    return this.m_parser.getLineNumber();
+};
+
+SAXDriver.prototype.getMessage = function() {
+    return this.m_strErrMsg;
+};
+
+
+SAXDriver.prototype.getPublicId = function() {
+    return null;
+};
+
+
+SAXDriver.prototype.getSystemId = function() {
+    return null;
+};
+
+/**
+ * Attribute List Interface
+ **/
+
+SAXDriver.prototype.getLength = function() {
+    return this.m_parser.getAttributeCount();
+};
+
+
+SAXDriver.prototype.getName = function(index) {
+    return this.m_parser.getAttributeName(index);
+};
+
+
+SAXDriver.prototype.getValue = function(index) {
+    return this.m_parser.getAttributeValue(index);
+};
+
+
+SAXDriver.prototype.getValueByName = function(name) {
+    return this.m_parser.getAttributeValueByName(name);
+};
+
+
+/**
+ *    Private functions
+ **/
+
+SAXDriver.prototype._fireError = function(strMsg) {
+    this.m_strErrMsg = strMsg;
+    this.m_bErr = true;
+
+    if(this.m_hndErr && this.m_hndErr.fatalError) {
+        this.m_hndErr.fatalError(this);
+    }
+};
+
+
+SAXDriver.prototype._fireEvent = function(iEvt) {
+    var hnd, func, args = arguments, iLen = args.length - 1;
+    
+    if(this.m_bErr){
+        return;
+    }
+
+    if(SAXDriver.DOC_B == iEvt) {
+        func = "startDocument";         
+        hnd = this.m_hndDoc;
+    }
+    else if (SAXDriver.DOC_E == iEvt) {
+        func = "endDocument";           
+        hnd = this.m_hndDoc;
+    }
+    else if (SAXDriver.ELM_B == iEvt) {
+        func = "startElement";          
+        hnd = this.m_hndDoc;
+    }
+    else if (SAXDriver.ELM_E == iEvt) {
+        func = "endElement";
+        hnd = this.m_hndDoc;
+    }
+    else if (SAXDriver.CHARS == iEvt) {
+        func = "characters";
+        hnd = this.m_hndDoc;
+    }
+    else if (SAXDriver.PI    == iEvt) {
+        func = "processingInstruction"; 
+        hnd = this.m_hndDoc;
+    }
+    else if (SAXDriver.CD_B  == iEvt) {
+        func = "startCDATA";            
+        hnd = this.m_hndLex;
+    }
+    else if (SAXDriver.CD_E  == iEvt) {
+        func = "endCDATA";              
+        hnd = this.m_hndLex;
+    }
+    else if (SAXDriver.CMNT  == iEvt) {
+        func = "comment";               
+        hnd = this.m_hndLex;
+    }
+
+    if(hnd && hnd[func]) {
+        if(0 === iLen) {
+            hnd[func]();
+        }
+        else if (1 == iLen) {
+            hnd[func](args[1]);
+        }
+        else if (2 == iLen) {
+            hnd[func](args[1], args[2]);
+        }
+        else if (3 == iLen) {
+            hnd[func](args[1], args[2], args[3]);
+        }
+    }
+};
+
+
+SAXDriver.prototype._parseLoop = function(parser) {
+    var iEvent;
+
+    parser = this.m_parser;
+    while(!this.m_bErr) {
+        iEvent = parser.next();
+
+        if(iEvent == XMLP._ELM_B) {
+            this._fireEvent(SAXDriver.ELM_B, parser.getName(), this);
+        }
+        else if(iEvent == XMLP._ELM_E) {
+            this._fireEvent(SAXDriver.ELM_E, parser.getName());
+        }
+        else if(iEvent == XMLP._ELM_EMP) {
+            this._fireEvent(SAXDriver.ELM_B, parser.getName(), this);
+            this._fireEvent(SAXDriver.ELM_E, parser.getName());
+        }
+        else if(iEvent == XMLP._TEXT) {
+            this._fireEvent(SAXDriver.CHARS, parser.getContent(), parser.getContentBegin(), parser.getContentEnd() - parser.getContentBegin());
+        }
+        else if(iEvent == XMLP._ENTITY) {
+            this._fireEvent(SAXDriver.CHARS, parser.getContent(), parser.getContentBegin(), parser.getContentEnd() - parser.getContentBegin());
+        }
+        else if(iEvent == XMLP._PI) {
+            this._fireEvent(SAXDriver.PI, parser.getName(), parser.getContent().substring(parser.getContentBegin(), parser.getContentEnd()));
+        }
+        else if(iEvent == XMLP._CDATA) {
+            this._fireEvent(SAXDriver.CD_B);
+            this._fireEvent(SAXDriver.CHARS, parser.getContent(), parser.getContentBegin(), parser.getContentEnd() - parser.getContentBegin());
+            this._fireEvent(SAXDriver.CD_E);
+        }
+        else if(iEvent == XMLP._COMMENT) {
+            this._fireEvent(SAXDriver.CMNT, parser.getContent(), parser.getContentBegin(), parser.getContentEnd() - parser.getContentBegin());
+        }
+        else if(iEvent == XMLP._DTD) {
+        }
+        else if(iEvent == XMLP._ERROR) {
+            this._fireError(parser.getContent());
+        }
+        else if(iEvent == XMLP._NONE) {
+            return;
+        }
+    }
+};
+
+/**
+* Defined 'globally' to this scope.  Remember everything is wrapped in a closure so this doesnt show up
+* in the outer most global scope.
+*/
+
+/**
+ *  process SAX events
+ *
+ * @author Jon van Noort (jon@webarcana.com.au), David Joham (djoham@yahoo.com) and Scott Severtson
+ *
+ * @param  impl : DOMImplementation
+ * @param  doc : DOMDocument - the Document to contain the parsed XML string
+ * @param  p   : XMLP        - the SAX Parser
+ *
+ * @return : DOMDocument
+ */
+function __parseLoop__(impl, doc, p) {
+    var iEvt, iNode, iAttr, iNS, strName;
+    var iNodeParent = doc;
+
+    var el_close_count = 0;
+
+    var entitiesList = [];
+    var textNodesList = [];
+    var i;
+    var pName;
+    var namespaceDec;
+    var pContent;
+    var textNode;
+
+    // if namespaceAware, add default namespace
+    if (impl.namespaceAware) {
+        // add the default-default namespace
+        iNS = doc.createNamespace(""); 
+        iNS.value = "http://www.w3.org/2000/xmlns/";
+        //doc._namespaces.setNamedItem(iNS);
+    }
+
+  // loop until SAX parser stops emitting events
+  while(true) {
+    // get next event
+    iEvt = p.next();
+
+    if (iEvt == XMLP._ELM_B) {                      // Begin-Element Event
+      pName = p.getName();                      // get the Element name
+      pName = trim(pName, true, true);              // strip spaces from Element name
+      if(pName.toLowerCase() == 'script'){
+        p.replaceEntities = false;
+      }
+
+      if (!impl.namespaceAware) {
+        iNode = doc.createElement(p.getName());     // create the Element
+
+        // add attributes to Element
+        for(i = 0; i < p.getAttributeCount(); i++) {
+          strName = p.getAttributeName(i);          // get Attribute name
+          iAttr = iNode.getAttributeNode(strName);  // if Attribute exists, use it
+
+          if(!iAttr) {
+            iAttr = doc.createAttribute(strName);   // otherwise create it
+          }
+
+          iAttr.value = p.getAttributeValue(i);   // set Attribute value
+          iNode.setAttributeNode(iAttr);            // attach Attribute to Element
+        }
+      }
+      else {  // Namespace Aware
+        // create element (with empty namespaceURI,
+        //  resolve after namespace 'attributes' have been parsed)
+        iNode = doc.createElementNS("", p.getName());
+
+        // duplicate ParentNode's Namespace definitions
+        iNode._namespaces = __cloneNamedNodes__(iNodeParent._namespaces, iNode, true);
+
+        // add attributes to Element
+        for(i = 0; i < p.getAttributeCount(); i++) {
+          strName = p.getAttributeName(i);          // get Attribute name
+
+          // if attribute is a namespace declaration
+          if (__isNamespaceDeclaration__(strName)) {
+            // parse Namespace Declaration
+            namespaceDec = __parseNSName__(strName);
+
+            if (strName != "xmlns") {
+              iNS = doc.createNamespace(strName);   // define namespace
+            }
+            else {
+              iNS = doc.createNamespace("");        // redefine default namespace
+            }
+            iNS.value = p.getAttributeValue(i);   // set value = namespaceURI
+
+            iNode._namespaces.setNamedItem(iNS);    // attach namespace to namespace collection
+          }
+          else {  // otherwise, it is a normal attribute
+            iAttr = iNode.getAttributeNode(strName);        // if Attribute exists, use it
+
+            if(!iAttr) {
+              iAttr = doc.createAttributeNS("", strName);   // otherwise create it
+            }
+
+            iAttr.value = p.getAttributeValue(i);         // set Attribute value
+            iNode.setAttributeNodeNS(iAttr);                // attach Attribute to Element
+
+            if (__isIdDeclaration__(strName)) {
+              iNode.id = p.getAttributeValue(i);    // cache ID for getElementById()
+            }
+          }
+        }
+
+        // resolve namespaceURIs for this Element
+        if (iNode._namespaces.getNamedItem(iNode.prefix)) {
+          iNode.namespaceURI = iNode._namespaces.getNamedItem(iNode.prefix).value;
+        }
+
+        //  for this Element's attributes
+        for (i = 0; i < iNode.attributes.length; i++) {
+          if (iNode.attributes.item(i).prefix != "") {  // attributes do not have a default namespace
+            if (iNode._namespaces.getNamedItem(iNode.attributes.item(i).prefix)) {
+              iNode.attributes.item(i).namespaceURI = iNode._namespaces.getNamedItem(iNode.attributes.item(i).prefix).value;
+            }
+          }
+        }
+      }
+
+      iNodeParent.appendChild(iNode);               // attach Element to parentNode
+      iNodeParent = iNode;                          // descend one level of the DOM Tree
+    }
+
+    else if(iEvt == XMLP._ELM_E) {                  // End-Element Event
+      
+      iNodeParent = iNodeParent.parentNode;         // ascend one level of the DOM Tree
+
+    }
+
+    else if(iEvt == XMLP._ELM_EMP) {                // Empty Element Event
+      pName = p.getName();                          // get the Element name
+      pName = trim(pName, true, true);              // strip spaces from Element name
+
+      if (!impl.namespaceAware) {
+        iNode = doc.createElement(pName);           // create the Element
+
+        // add attributes to Element
+        for(i = 0; i < p.getAttributeCount(); i++) {
+          strName = p.getAttributeName(i);          // get Attribute name
+          iAttr = iNode.getAttributeNode(strName);  // if Attribute exists, use it
+
+          if(!iAttr) {
+            iAttr = doc.createAttribute(strName);   // otherwise create it
+          }
+
+          iAttr.value = p.getAttributeValue(i);   // set Attribute value
+          iNode.setAttributeNode(iAttr);            // attach Attribute to Element
+        }
+      }
+      else {  // Namespace Aware
+        // create element (with empty namespaceURI,
+        //  resolve after namespace 'attributes' have been parsed)
+        iNode = doc.createElementNS("", p.getName());
+
+        // duplicate ParentNode's Namespace definitions
+        iNode._namespaces = __cloneNamedNodes__(iNodeParent._namespaces, iNode, true);
+
+        // add attributes to Element
+        for(i = 0; i < p.getAttributeCount(); i++) {
+          strName = p.getAttributeName(i);          // get Attribute name
+
+          // if attribute is a namespace declaration
+          if (__isNamespaceDeclaration__(strName)) {
+            // parse Namespace Declaration
+            namespaceDec = __parseNSName__(strName);
+
+            if (strName != "xmlns") {
+              iNS = doc.createNamespace(strName);   // define namespace
+            } else {
+              iNS = doc.createNamespace("");        // redefine default namespace
+            }
+            iNS.value = p.getAttributeValue(i);   // set value = namespaceURI
+
+            iNode._namespaces.setNamedItem(iNS);    // attach namespace to namespace collection
+          }
+          else {  // otherwise, it is a normal attribute
+            iAttr = iNode.getAttributeNode(strName);        // if Attribute exists, use it
+
+            if(!iAttr) {
+              iAttr = doc.createAttributeNS("", strName);   // otherwise create it
+            }
+
+            iAttr.value = p.getAttributeValue(i);         // set Attribute value
+            iNode.setAttributeNodeNS(iAttr);                // attach Attribute to Element
+
+            if (__isIdDeclaration__(strName)) {
+              iNode.id = p.getAttributeValue(i);    // cache ID for getElementById()
+            }
+          }
+        }
+
+        // resolve namespaceURIs for this Element
+        if (iNode._namespaces.getNamedItem(iNode.prefix)) {
+          iNode.namespaceURI = iNode._namespaces.getNamedItem(iNode.prefix).value;
+        }
+
+        //  for this Element's attributes
+        for (i = 0; i < iNode.attributes.length; i++) {
+          if (iNode.attributes.item(i).prefix != "") {  // attributes do not have a default namespace
+            if (iNode._namespaces.getNamedItem(iNode.attributes.item(i).prefix)) {
+              iNode.attributes.item(i).namespaceURI = iNode._namespaces.getNamedItem(iNode.attributes.item(i).prefix).value;
+            }
+          }
+        }
+      }
+
+      // if this is the Root Element
+      if (iNodeParent.nodeType == Node.DOCUMENT_NODE) {
+        iNodeParent.documentElement = iNode;        // register this Element as the Document.documentElement
+      }
+
+      iNodeParent.appendChild(iNode);               // attach Element to parentNode
+    }
+    else if(iEvt == XMLP._TEXT || iEvt == XMLP._ENTITY) {                   // TextNode and entity Events
+      // get Text content
+      pContent = p.getContent().substring(p.getContentBegin(), p.getContentEnd());
+
+      if (!impl.preserveWhiteSpace ) {
+        if (trim(pContent, true, true) == "") {
+            pContent = ""; //this will cause us not to create the text node below
+        }
+      }
+
+      if (pContent.length > 0) {                    // ignore empty TextNodes
+        textNode = doc.createTextNode(pContent);
+        iNodeParent.appendChild(textNode); // attach TextNode to parentNode
+
+        //the sax parser breaks up text nodes when it finds an entity. For
+        //example hello&lt;there will fire a text, an entity and another text
+        //this sucks for the dom parser because it looks to us in this logic
+        //as three text nodes. I fix this by keeping track of the entity nodes
+        //and when we're done parsing, calling normalize on their parent to
+        //turn the multiple text nodes into one, which is what DOM users expect
+        //the code to do this is at the bottom of this function
+        if (iEvt == XMLP._ENTITY) {
+            entitiesList[entitiesList.length] = textNode;
+        }
+        else {
+            //I can't properly decide how to handle preserve whitespace
+            //until the siblings of the text node are built due to
+            //the entitiy handling described above. I don't know that this
+            //will be all of the text node or not, so trimming is not appropriate
+            //at this time. Keep a list of all the text nodes for now
+            //and we'll process the preserve whitespace stuff at a later time.
+            textNodesList[textNodesList.length] = textNode;
+        }
+      }
+    }
+    else if(iEvt == XMLP._PI) {                     // ProcessingInstruction Event
+      // attach ProcessingInstruction to parentNode
+      iNodeParent.appendChild(doc.createProcessingInstruction(p.getName(), p.getContent().substring(p.getContentBegin(), p.getContentEnd())));
+    }
+    else if(iEvt == XMLP._CDATA) {                  // CDATA Event
+      // get CDATA data
+      pContent = p.getContent().substring(p.getContentBegin(), p.getContentEnd());
+
+      if (!impl.preserveWhiteSpace) {
+        pContent = trim(pContent, true, true);      // trim whitespace
+        pContent.replace(/ +/g, ' ');               // collapse multiple spaces to 1 space
+      }
+
+      if (pContent.length > 0) {                    // ignore empty CDATANodes
+        iNodeParent.appendChild(doc.createCDATASection(pContent)); // attach CDATA to parentNode
+      }
+    }
+    else if(iEvt == XMLP._COMMENT) {                // Comment Event
+      // get COMMENT data
+      pContent = p.getContent().substring(p.getContentBegin(), p.getContentEnd());
+
+      if (!impl.preserveWhiteSpace) {
+        pContent = trim(pContent, true, true);      // trim whitespace
+        pContent.replace(/ +/g, ' ');               // collapse multiple spaces to 1 space
+      }
+
+      if (pContent.length > 0) {                    // ignore empty CommentNodes
+        iNodeParent.appendChild(doc.createComment(pContent));  // attach Comment to parentNode
+      }
+    }
+    else if(iEvt == XMLP._DTD) {                    // ignore DTD events
+    }
+    else if(iEvt == XMLP._ERROR) {
+        console.log("Fatal Error: " + p.getContent() +
+                "\nLine: " + p.getLineNumber() +
+                "\nColumn: " + p.getColumnNumber() + "\n");
+        throw(new DOMException(DOMException.SYNTAX_ERR));
+    }
+    else if(iEvt == XMLP._NONE) {                   // no more events
+      if (iNodeParent == doc) {                     // confirm that we have recursed back up to root
+        break;
+      }
+      else {
+        throw(new DOMException(DOMException.SYNTAX_ERR));  // one or more Tags were not closed properly
+      }
+        break;
+
+    }
+  }
+
+  var entity,
+      parentNode,
+      children,
+      child,
+      childData,
+      j;
+  //normalize any entities in the DOM to a single textNode
+  for (i = 0; i < entitiesList.length; i++) {
+      entity = entitiesList[i];
+      //its possible (if for example two entities were in the
+      //same domnode, that the normalize on the first entitiy
+      //will remove the parent for the second. Only do normalize
+      //if I can find a parent node
+      parentNode = entity.parentNode;
+      if (parentNode) {
+          parentNode.normalize();
+
+          //now do whitespace (if necessary)
+          //it was not done for text nodes that have entities
+          if(!impl.preserveWhiteSpace) {
+                children = parentNode.childNodes;
+                for ( j = 0; j < children.length; j++) {
+                    child = children.item(j);
+                    if (child.nodeType == Node.TEXT_NODE) {
+                        childData = child.data;
+                        childData.replace(/\s/g, ' ');
+                        child.data = childData;
+                    }
+                }
+          }
+      }
+  }
+
+  //do the preserve whitespace processing on the rest of the text nodes
+  //It's possible (due to the processing above) that the node will have been
+  //removed from the tree. Only do whitespace checking if parentNode is not null.
+  //This may duplicate the whitespace processing for some nodes that had entities in them
+  //but there's no way around that
+  if (!impl.preserveWhiteSpace) {
+    for (i = 0; i < textNodesList.length; i++) {
+        var node = textNodesList[i];
+        if (node.parentNode !== null) {
+            var nodeData = node.data;
+            nodeData.replace(/\s/g, ' ');
+            node.data = nodeData;
+        }
+    }
+  }
+}
+
+
+/**
+ * @method DOMImplementation._isNamespaceDeclaration - Return true, if attributeName is a namespace declaration
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  attributeName : string - the attribute name
+ * @return : boolean
+ */
+function __isNamespaceDeclaration__(attributeName) {
+  // test if attributeName is 'xmlns'
+  return (attributeName.indexOf('xmlns') > -1);
+}
+
+/**
+ * @method DOMImplementation._isIdDeclaration - Return true, if attributeName is an id declaration
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  attributeName : string - the attribute name
+ * @return : boolean
+ */
+function __isIdDeclaration__(attributeName) {
+  // test if attributeName is 'id' (case insensitive)
+  return (attributeName.toLowerCase() == 'id');
+}
+
+/**
+ * @method DOMImplementation._isValidName - Return true,
+ *   if name contains no invalid characters
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  name : string - the candidate name
+ * @return : boolean
+ */
+function __isValidName__(name) {
+  // test if name contains only valid characters
+  return name.match(re_validName);
+}
+var re_validName = /^[a-zA-Z_:][a-zA-Z0-9\.\-_:]*$/;
+
+/**
+ * @method DOMImplementation._isValidString - Return true, if string does not contain any illegal chars
+ *  All of the characters 0 through 31 and character 127 are nonprinting control characters.
+ *  With the exception of characters 09, 10, and 13, (Ox09, Ox0A, and Ox0D)
+ *  Note: different from _isValidName in that ValidStrings may contain spaces
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  name : string - the candidate string
+ * @return : boolean
+ */
+function __isValidString__(name) {
+  // test that string does not contains invalid characters
+  return (name.search(re_invalidStringChars) < 0);
+}
+var re_invalidStringChars = /\x01|\x02|\x03|\x04|\x05|\x06|\x07|\x08|\x0B|\x0C|\x0E|\x0F|\x10|\x11|\x12|\x13|\x14|\x15|\x16|\x17|\x18|\x19|\x1A|\x1B|\x1C|\x1D|\x1E|\x1F|\x7F/;
+
+/**
+ * @method DOMImplementation._parseNSName - parse the namespace name.
+ *  if there is no colon, the
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  qualifiedName : string - The qualified name
+ * @return : NSName - [
+         .prefix        : string - The prefix part of the qname
+         .namespaceName : string - The namespaceURI part of the qname
+    ]
+ */
+function __parseNSName__(qualifiedName) {
+  var resultNSName = {};
+
+  resultNSName.prefix          = qualifiedName;  // unless the qname has a namespaceName, the prefix is the entire String
+  resultNSName.namespaceName   = "";
+
+  // split on ':'
+  var delimPos = qualifiedName.indexOf(':');
+  if (delimPos > -1) {
+    // get prefix
+    resultNSName.prefix        = qualifiedName.substring(0, delimPos);
+    // get namespaceName
+    resultNSName.namespaceName = qualifiedName.substring(delimPos +1, qualifiedName.length);
+  }
+  return resultNSName;
+}
+
+/**
+ * @method DOMImplementation._parseQName - parse the qualified name
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  qualifiedName : string - The qualified name
+ * @return : QName
+ */
+function __parseQName__(qualifiedName) {
+  var resultQName = {};
+
+  resultQName.localName = qualifiedName;  // unless the qname has a prefix, the local name is the entire String
+  resultQName.prefix    = "";
+
+  // split on ':'
+  var delimPos = qualifiedName.indexOf(':');
+
+  if (delimPos > -1) {
+    // get prefix
+    resultQName.prefix    = qualifiedName.substring(0, delimPos);
+
+    // get localName
+    resultQName.localName = qualifiedName.substring(delimPos +1, qualifiedName.length);
+  }
+
+  return resultQName;
+}
+
+
+/**
+ *
+ * This file only handles XML parser.
+ * It is extended by parser/domparser.js (and parser/htmlparser.js)
+ *
+ * This depends on e4x, which some engines may not have.
+ *
+ * @author thatcher
+ */
+exports.DOMParser = DOMParser = function(principle, documentURI, baseURI) {
+    // TODO: why/what should these 3 args do?
+};
+__extend__(DOMParser.prototype,{
+    parseFromString: function(xmlstring, mimetype){
+        // create SAX Parser
+        var parser = new XMLP(xmlstring+'');
+        var doc = new Document(new DOMImplementation());
+    
+        // populate Document with Parsed Nodes
+        //try {
+            __parseLoop__(doc.implementation, doc, parser);
+        /*} catch (e) {
+            console.log(
+                "Error parsing XML %s %s",  
+                doc.implementation.translateErrCode(e.code),
+                e
+            );
+        }*/
+
+        // set parseComplete flag, (Some validation Rules are relaxed if this is false)
+        doc._parseComplete = true;
+        return doc;
+    
+        /*var e4xsupport = false;
+        try{e4xsupport = new XML();}catch(e){}
+        if(e4xsupport){
+            return __E4XParser__(xmlstring, mimetype);
+        }else{
+            var doc = new Document(new DOMImplementation());
+            //requires envjs parser.js module/mixins
+            XMLParser.parseDocument(xmlstring, doc, mimetype);
+            //console.log('xml \n %s', doc.documentElement.xml);
+            return doc; 
+        }*/
+    }
+});
+
+__E4XParser__ = function(xmlstring, mimetype){
+    
+    var doc = new Document(new DOMImplementation()),
+        e4;
+
+    // The following are e4x directives.
+    // Full spec is here:
+    // http://www.ecma-international.org/publications/standards/Ecma-357.htm
+    //
+    // that is pretty gross, so checkout this summary
+    // http://rephrase.net/days/07/06/e4x
+    //
+    // also see the Mozilla Developer Center:
+    // https://developer.mozilla.org/en/E4X
+    //
+    XML.ignoreComments = false;
+    XML.ignoreProcessingInstructions = false;
+    XML.ignoreWhitespace = false;
+
+    // for some reason e4x can't handle initial xml declarations
+    // https://bugzilla.mozilla.org/show_bug.cgi?id=336551
+    // The official workaround is the big regexp below
+    // but simpler one seems to be ok
+    // xmlstring = xmlstring.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, "");
+    //
+    xmlstring = xmlstring.replace(/<\?xml.*\?>/, '');
+
+    e4 = new XMLList(xmlstring);
+
+    __E4XtoDomNode__(e4, doc, doc);
+
+    //console.log('xml \n %s', doc.documentElement.xml);
+    return doc;
+};
+
+__E4XtoDomNode__ = function(e4, parent, doc){
+    var xnode,
+        domnode,
+        children,
+        target,
+        value,
+        length,
+        element,
+        kind,
+        item;
+    //console.log('converting e4x node list \n %s', e4)
+
+    // not using the for each(item in e4) since some engines can't
+    // handle the syntax (i.e. says syntax error)
+    //
+    // for each(xnode in e4) {
+    for (item in e4) {
+        // NO do not do this if (e4.hasOwnProperty(item)) {
+        // breaks spidermonkey
+        if(item){
+            xnode = e4[item];
+
+            kind = xnode.nodeKind();
+            //console.log('treating node kind %s', kind);
+            switch(kind){
+            case 'element':
+                // add node
+                //console.log('creating element %s %s', xnode.localName(), xnode.namespace());
+                if(xnode.namespace() && (xnode.namespace()+'') !== ''){
+                    //console.log('createElementNS %s %s',xnode.namespace()+'', xnode.localName() );
+                    domnode = doc.createElementNS(xnode.namespace()+'', xnode.localName());
+                }else{
+                    domnode = doc.createElement(xnode.name()+'');
+                }
+                parent.appendChild(domnode);
+
+                // add attributes
+                __E4XtoDomNode__(xnode.attributes(), domnode, doc);
+
+                // add children
+                children = xnode.children();
+                length = children.length();
+                //console.log('recursing? %s', length ? 'yes' : 'no');
+                if (length > 0) {
+                    __E4XtoDomNode__(children, domnode, doc);
+                }
+                break;
+            case 'attribute':
+                // console.log('setting attribute %s %s %s',
+                //       xnode.localName(), xnode.namespace(), xnode.valueOf());
+
+                //
+                // cross-platform alert.  The original code used
+                //  xnode.text() to get the attribute value
+                //  This worked in Rhino, but did not in Spidermonkey
+                //  valueOf seemed to work in both
+                //
+                if(xnode.namespace() && xnode.namespace().prefix){
+                    //console.log("%s", xnode.namespace().prefix);
+                    parent.setAttributeNS(xnode.namespace()+'',
+                                          xnode.namespace().prefix+':'+xnode.localName(),
+                                          xnode.valueOf());
+                }else if((xnode.name()+'').match('http://www.w3.org/2000/xmlns/::')){
+                    if(xnode.localName()!=='xmlns'){
+                        parent.setAttributeNS('http://www.w3.org/2000/xmlns/',
+                                              'xmlns:'+xnode.localName(),
+                                              xnode.valueOf());
+                    }
+                }else{
+                    //console.log('setting attribute %s', xnode.localName());
+                    parent.setAttribute(xnode.localName()+'', xnode.valueOf());
+                }
+                break;
+            case 'text':
+                //console.log('creating text node : %s', xnode);
+                domnode = doc.createTextNode(xnode+'');
+                parent.appendChild(domnode);
+                break;
+            case 'comment':
+                //console.log('creating comment node : %s', xnode);
+                value = xnode+'';
+                domnode = doc.createComment(value.substring(4,value.length-3));
+                parent.appendChild(domnode);
+                break;
+            case 'processing-instruction':
+                //console.log('creating processing-instruction node : %s', xnode);
+                value = xnode+'';
+                target = value.split(' ')[0].substring(2);
+                value = value.split(' ').splice(1).join(' ').replace('?>','');
+                //console.log('creating processing-instruction data : %s', value);
+                domnode = doc.createProcessingInstruction(target, value);
+                parent.appendChild(domnode);
+                break;
+            default:
+                log.error('e4x DOM ERROR');
+                throw "Assertion failed in xml parser";
+            }
+        }
+    }
+};
+
+
+}(/*Envjs.DOM.DOMParser*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Attr').debug('available'); 
+});
+    
+/**
+ * @class  Attr
+ *      The Attr interface represents an attribute in an Element object
+ * @extends Node
+ * @param  ownerDocument : The Document object associated with this node.
+ */
+exports.Attr = Attr = function(ownerDocument) {
+    Node.apply(this, arguments);
+    // set when Attr is added to NamedNodeMap
+    this.ownerElement = null;
+    //TODO: our implementation of Attr is incorrect because we don't
+    //      treat the value of the attribute as a child text node.
+};
+Attr.prototype = new Node();
+__extend__(Attr.prototype, {
+    // the name of this attribute
+    get name(){
+        return this.nodeName;
+    },
+    // the value of the attribute is returned as a string
+    get value(){
+        return this.nodeValue||'';
+    },
+    set value(value){
+        // throw Exception if Attribute is readonly
+        if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+        // delegate to node
+        this.nodeValue = value;
+    },
+    get textContent(){
+        return this.nodeValue;
+    },
+    set textContent(newText){
+        this.nodeValue = newText;
+    },
+    get specified(){
+        return (this !== null && this !== undefined);
+    },
+    get nodeType(){
+        return Node.ATTRIBUTE_NODE;
+    },
+    get xml() {
+        if (this.nodeValue) {
+            return  __escapeXML__(this.nodeValue+"");
+        } else {
+            return '';
+        }
+    },
+    toString : function() {
+        return '[object Attr]';
+    }
+});
+
+}(/*Envjs.DOM.Attr*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Element').debug('available'); 
+});
+/**
+ * @class  Element -
+ *      By far the vast majority of objects (apart from text)
+ *      that authors encounter when traversing a document are
+ *      Element nodes.
+ * @extends Node
+ * @param  ownerDocument : The Document object associated with this node.
+ */
+exports.Element = Element = function(ownerDocument) {
+    Node.apply(this, arguments);
+    this.attributes = new NamedNodeMap(this.ownerDocument, this);
+};
+Element.prototype = new Node();
+__extend__(Element.prototype, {
+    // The name of the element.
+    get tagName(){
+        return this.nodeName;
+    },
+
+    getAttribute: function(name) {
+        var ret = null;
+        // if attribute exists, use it
+        var attr = this.attributes.getNamedItem(name);
+        if (attr) {
+            ret = attr.value;
+        }
+        // if Attribute exists, return its value, otherwise, return null
+        return ret;
+    },
+
+    setAttribute : function (name, value) {
+		log.debug('setting attribute %s = %s for element %s', name, value, this.nodeName);
+        // if attribute exists, use it
+        var attr = this.attributes.getNamedItem(name);
+        if (attr===null||attr===undefined) {
+            // otherwise create it
+            attr = __ownerDocument__(this).createAttribute(name);
+           //console.log('attr %s', attr);
+        }
+
+
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if Attribute is readonly
+            if (attr._readonly) {
+                throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if the value string contains an illegal character
+            if (!__isValidString__(value+'')) {
+                throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+            }
+        }
+
+        // assign values to properties (and aliases)
+        attr.value     = value + '';
+
+        // add/replace Attribute in NamedNodeMap
+        this.attributes.setNamedItem(attr);
+        //console.log('element setNamedItem %s = %s', attr.name, attr.value);
+    },
+    removeAttribute : function removeAttribute(name) {
+		log.debug('removing attribute %s for element %s', name, this.nodeName);
+        // delegate to NamedNodeMap.removeNamedItem
+        return this.attributes.removeNamedItem(name);
+    },
+    getAttributeNode : function getAttributeNode(name) {
+        // delegate to NamedNodeMap.getNamedItem
+        return this.attributes.getNamedItem(name);
+    },
+    setAttributeNode: function(newAttr) {
+        // delegate to NamedNodeMap.setNamedItem
+        return this.attributes.setNamedItem(newAttr);
+    },
+    removeAttributeNode: function(oldAttr) {
+      // throw Exception if Attribute is readonly
+      if (__ownerDocument__(this).implementation.errorChecking && oldAttr._readonly) {
+        throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+      }
+
+      // get item index
+      var itemIndex = this.attributes._findItemIndex(oldAttr._id);
+
+      // throw Exception if node does not exist in this map
+      if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
+        throw(new DOMException(DOMException.NOT_FOUND_ERR));
+      }
+
+      return this.attributes._removeChild(itemIndex);
+    },
+    getAttributeNS : function(namespaceURI, localName) {
+        var ret = "";
+        // delegate to NAmedNodeMap.getNamedItemNS
+        var attr = this.attributes.getNamedItemNS(namespaceURI, localName);
+        if (attr) {
+            ret = attr.value;
+        }
+        return ret;  // if Attribute exists, return its value, otherwise return ""
+    },
+    setAttributeNS : function(namespaceURI, qualifiedName, value) {
+		log.debug('setAttributeNS %s:%s for element %s', namespaceURI, qualifiedName, this.nodeName);
+        // call NamedNodeMap.getNamedItem
+        //console.log('setAttributeNS %s %s %s', namespaceURI, qualifiedName, value);
+        var attr = this.attributes.getNamedItem(namespaceURI, qualifiedName);
+
+        if (!attr) {  // if Attribute exists, use it
+            // otherwise create it
+            attr = __ownerDocument__(this).createAttributeNS(namespaceURI, qualifiedName);
+        }
+
+        value = '' + value;
+
+        // test for exceptions
+        if (__ownerDocument__(this).implementation.errorChecking) {
+            // throw Exception if Attribute is readonly
+            if (attr._readonly) {
+                throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+            }
+
+            // throw Exception if the Namespace is invalid
+            if (!__isValidNamespace__(this.ownerDocument, namespaceURI, qualifiedName, true)) {
+                throw(new DOMException(DOMException.NAMESPACE_ERR));
+            }
+
+            // throw Exception if the value string contains an illegal character
+            if (!__isValidString__(value)) {
+                throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
+            }
+        }
+
+        // assign values to properties (and aliases)
+        attr.value     = value;
+        attr.nodeValue = value;
+
+        // delegate to NamedNodeMap.setNamedItem
+        this.attributes.setNamedItemNS(attr);
+    },
+    removeAttributeNS : function(namespaceURI, localName) {
+        // delegate to NamedNodeMap.removeNamedItemNS
+        return this.attributes.removeNamedItemNS(namespaceURI, localName);
+    },
+    getAttributeNodeNS : function(namespaceURI, localName) {
+        // delegate to NamedNodeMap.getNamedItemNS
+        return this.attributes.getNamedItemNS(namespaceURI, localName);
+    },
+    setAttributeNodeNS : function(newAttr) {
+        // delegate to NamedNodeMap.setNamedItemNS
+        return this.attributes.setNamedItemNS(newAttr);
+    },
+    hasAttribute : function(name) {
+        // delegate to NamedNodeMap._hasAttribute
+        return __hasAttribute__(this.attributes,name);
+    },
+    hasAttributeNS : function(namespaceURI, localName) {
+        // delegate to NamedNodeMap._hasAttributeNS
+        return __hasAttributeNS__(this.attributes, namespaceURI, localName);
+    },
+    get nodeType(){
+        return Node.ELEMENT_NODE;
+    },
+    get xml() {
+        var ret = "",
+            ns = "",
+            attrs,
+            attrstring,
+            i;
+
+        // serialize namespace declarations
+        if (this.namespaceURI){
+            if((this === this.ownerDocument.documentElement) ||
+               (!this.parentNode)||
+               (this.parentNode && (this.parentNode.namespaceURI !== this.namespaceURI))) {
+                ns = ' xmlns' + (this.prefix?(':'+this.prefix):'') +
+                    '="' + this.namespaceURI + '"';
+            }
+        }
+        
+        attrstring = "";
+        if(this._namespaces && this._namespaces.length){
+           attrstring += this._namespaces.xml;
+        }
+        
+
+        // serialize Attribute declarations
+        attrs = this.attributes;
+        for(i=0;i< attrs.length;i++){
+            if(attrs[i].name.match('xmlns:')) {
+                attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
+            }
+        }
+        for(i=0;i< attrs.length;i++){
+            if(!attrs[i].name.match('xmlns:')) {
+                attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
+            }
+        }
+
+        if(this.hasChildNodes()){
+            // serialize this Element
+            ret += "<" + this.tagName + ns + attrstring +">";
+            ret += this.childNodes.xml;
+            ret += "</" + this.tagName + ">";
+        }else{
+            ret += "<" + this.tagName + ns + attrstring +"/>";
+        }
+
+        return ret;
+    },
+    toString : function(){
+        return '[object Element]';
+    }
+});
+
+}(/*Envjs.DOM.Element*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.ProcessingInstruction').debug('available'); 
+});
+/**
+ * @class  ProcessingInstruction -
+ *      The ProcessingInstruction interface represents a
+ *      "processing instruction", used in XML as a way to
+ *      keep processor-specific information in the text of
+ *      the document
+ * @extends Node
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param  ownerDocument :  The Document object associated with this node.
+ */
+exports.ProcessingInstruction = ProcessingInstruction = function(ownerDocument) {
+    Node.apply(this, arguments);
+};
+ProcessingInstruction.prototype = new Node();
+__extend__(ProcessingInstruction.prototype, {
+    get data(){
+        return this.nodeValue;
+    },
+    set data(data){
+        // throw Exception if Node is readonly
+        if (__ownerDocument__(this).errorChecking && this._readonly) {
+            throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+        }
+        this.nodeValue = data;
+    },
+    get textContent(){
+        return this.data;
+    },
+    get localName(){
+        return null;
+    },
+    get target(){
+      // The target of this processing instruction.
+      // XML defines this as being the first token following the markup that begins the processing instruction.
+      // The content of this processing instruction.
+        return this.nodeName;
+    },
+    set target(value){
+      // The target of this processing instruction.
+      // XML defines this as being the first token following the markup that begins the processing instruction.
+      // The content of this processing instruction.
+        this.nodeName = value;
+    },
+    get nodeType(){
+        return Node.PROCESSING_INSTRUCTION_NODE;
+    },
+    get xml(){
+        return "<?" + this.nodeName +" "+ this.nodeValue + "?>";
+    },
+    toString : function(){
+        return "[object ProcessingInstruction]";
+    }
+});
+
+}(/*Envjs.DOM.ProcessingInstruction*/));
+
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Entity').debug('available'); 
+});
+/**
+ * @author envjs team
+ */
+
+exports.Entity = Entity = function() {
+    throw new Error("Entity Not Implemented" );
+};
+
+Entity.constants = {
+        // content taken from W3C "HTML 4.01 Specification"
+        //                        "W3C Recommendation 24 December 1999"
+
+    nbsp: "\u00A0",
+    iexcl: "\u00A1",
+    cent: "\u00A2",
+    pound: "\u00A3",
+    curren: "\u00A4",
+    yen: "\u00A5",
+    brvbar: "\u00A6",
+    sect: "\u00A7",
+    uml: "\u00A8",
+    copy: "\u00A9",
+    ordf: "\u00AA",
+    laquo: "\u00AB",
+    not: "\u00AC",
+    shy: "\u00AD",
+    reg: "\u00AE",
+    macr: "\u00AF",
+    deg: "\u00B0",
+    plusmn: "\u00B1",
+    sup2: "\u00B2",
+    sup3: "\u00B3",
+    acute: "\u00B4",
+    micro: "\u00B5",
+    para: "\u00B6",
+    middot: "\u00B7",
+    cedil: "\u00B8",
+    sup1: "\u00B9",
+    ordm: "\u00BA",
+    raquo: "\u00BB",
+    frac14: "\u00BC",
+    frac12: "\u00BD",
+    frac34: "\u00BE",
+    iquest: "\u00BF",
+    Agrave: "\u00C0",
+    Aacute: "\u00C1",
+    Acirc: "\u00C2",
+    Atilde: "\u00C3",
+    Auml: "\u00C4",
+    Aring: "\u00C5",
+    AElig: "\u00C6",
+    Ccedil: "\u00C7",
+    Egrave: "\u00C8",
+    Eacute: "\u00C9",
+    Ecirc: "\u00CA",
+    Euml: "\u00CB",
+    Igrave: "\u00CC",
+    Iacute: "\u00CD",
+    Icirc: "\u00CE",
+    Iuml: "\u00CF",
+    ETH: "\u00D0",
+    Ntilde: "\u00D1",
+    Ograve: "\u00D2",
+    Oacute: "\u00D3",
+    Ocirc: "\u00D4",
+    Otilde: "\u00D5",
+    Ouml: "\u00D6",
+    times: "\u00D7",
+    Oslash: "\u00D8",
+    Ugrave: "\u00D9",
+    Uacute: "\u00DA",
+    Ucirc: "\u00DB",
+    Uuml: "\u00DC",
+    Yacute: "\u00DD",
+    THORN: "\u00DE",
+    szlig: "\u00DF",
+    agrave: "\u00E0",
+    aacute: "\u00E1",
+    acirc: "\u00E2",
+    atilde: "\u00E3",
+    auml: "\u00E4",
+    aring: "\u00E5",
+    aelig: "\u00E6",
+    ccedil: "\u00E7",
+    egrave: "\u00E8",
+    eacute: "\u00E9",
+    ecirc: "\u00EA",
+    euml: "\u00EB",
+    igrave: "\u00EC",
+    iacute: "\u00ED",
+    icirc: "\u00EE",
+    iuml: "\u00EF",
+    eth: "\u00F0",
+    ntilde: "\u00F1",
+    ograve: "\u00F2",
+    oacute: "\u00F3",
+    ocirc: "\u00F4",
+    otilde: "\u00F5",
+    ouml: "\u00F6",
+    divide: "\u00F7",
+    oslash: "\u00F8",
+    ugrave: "\u00F9",
+    uacute: "\u00FA",
+    ucirc: "\u00FB",
+    uuml: "\u00FC",
+    yacute: "\u00FD",
+    thorn: "\u00FE",
+    yuml: "\u00FF",
+    fnof: "\u0192",
+    Alpha: "\u0391",
+    Beta: "\u0392",
+    Gamma: "\u0393",
+    Delta: "\u0394",
+    Epsilon: "\u0395",
+    Zeta: "\u0396",
+    Eta: "\u0397",
+    Theta: "\u0398",
+    Iota: "\u0399",
+    Kappa: "\u039A",
+    Lambda: "\u039B",
+    Mu: "\u039C",
+    Nu: "\u039D",
+    Xi: "\u039E",
+    Omicron: "\u039F",
+    Pi: "\u03A0",
+    Rho: "\u03A1",
+    Sigma: "\u03A3",
+    Tau: "\u03A4",
+    Upsilon: "\u03A5",
+    Phi: "\u03A6",
+    Chi: "\u03A7",
+    Psi: "\u03A8",
+    Omega: "\u03A9",
+    alpha: "\u03B1",
+    beta: "\u03B2",
+    gamma: "\u03B3",
+    delta: "\u03B4",
+    epsilon: "\u03B5",
+    zeta: "\u03B6",
+    eta: "\u03B7",
+    theta: "\u03B8",
+    iota: "\u03B9",
+    kappa: "\u03BA",
+    lambda: "\u03BB",
+    mu: "\u03BC",
+    nu: "\u03BD",
+    xi: "\u03BE",
+    omicron: "\u03BF",
+    pi: "\u03C0",
+    rho: "\u03C1",
+    sigmaf: "\u03C2",
+    sigma: "\u03C3",
+    tau: "\u03C4",
+    upsilon: "\u03C5",
+    phi: "\u03C6",
+    chi: "\u03C7",
+    psi: "\u03C8",
+    omega: "\u03C9",
+    thetasym: "\u03D1",
+    upsih: "\u03D2",
+    piv: "\u03D6",
+    bull: "\u2022",
+    hellip: "\u2026",
+    prime: "\u2032",
+    Prime: "\u2033",
+    oline: "\u203E",
+    frasl: "\u2044",
+    weierp: "\u2118",
+    image: "\u2111",
+    real: "\u211C",
+    trade: "\u2122",
+    alefsym: "\u2135",
+    larr: "\u2190",
+    uarr: "\u2191",
+    rarr: "\u2192",
+    darr: "\u2193",
+    harr: "\u2194",
+    crarr: "\u21B5",
+    lArr: "\u21D0",
+    uArr: "\u21D1",
+    rArr: "\u21D2",
+    dArr: "\u21D3",
+    hArr: "\u21D4",
+    forall: "\u2200",
+    part: "\u2202",
+    exist: "\u2203",
+    empty: "\u2205",
+    nabla: "\u2207",
+    isin: "\u2208",
+    notin: "\u2209",
+    ni: "\u220B",
+    prod: "\u220F",
+    sum: "\u2211",
+    minus: "\u2212",
+    lowast: "\u2217",
+    radic: "\u221A",
+    prop: "\u221D",
+    infin: "\u221E",
+    ang: "\u2220",
+    and: "\u2227",
+    or: "\u2228",
+    cap: "\u2229",
+    cup: "\u222A",
+    intXX: "\u222B",
+    there4: "\u2234",
+    sim: "\u223C",
+    cong: "\u2245",
+    asymp: "\u2248",
+    ne: "\u2260",
+    equiv: "\u2261",
+    le: "\u2264",
+    ge: "\u2265",
+    sub: "\u2282",
+    sup: "\u2283",
+    nsub: "\u2284",
+    sube: "\u2286",
+    supe: "\u2287",
+    oplus: "\u2295",
+    otimes: "\u2297",
+    perp: "\u22A5",
+    sdot: "\u22C5",
+    lceil: "\u2308",
+    rceil: "\u2309",
+    lfloor: "\u230A",
+    rfloor: "\u230B",
+    lang: "\u2329",
+    rang: "\u232A",
+    loz: "\u25CA",
+    spades: "\u2660",
+    clubs: "\u2663",
+    hearts: "\u2665",
+    diams: "\u2666",
+    quot: "\u0022",
+    amp: "\u0026",
+    lt: "\u003C",
+    gt: "\u003E",
+    OElig: "\u0152",
+    oelig: "\u0153",
+    Scaron: "\u0160",
+    scaron: "\u0161",
+    Yuml: "\u0178",
+    circ: "\u02C6",
+    tilde: "\u02DC",
+    ensp: "\u2002",
+    emsp: "\u2003",
+    thinsp: "\u2009",
+    zwnj: "\u200C",
+    zwj: "\u200D",
+    lrm: "\u200E",
+    rlm: "\u200F",
+    ndash: "\u2013",
+    mdash: "\u2014",
+    lsquo: "\u2018",
+    rsquo: "\u2019",
+    sbquo: "\u201A",
+    ldquo: "\u201C",
+    rdquo: "\u201D",
+    bdquo: "\u201E",
+    dagger: "\u2020",
+    Dagger: "\u2021",
+    permil: "\u2030",
+    lsaquo: "\u2039",
+    rsaquo: "\u203A",
+    euro: "\u20AC",
+
+    // non-standard entities
+    apos: "'"
+};
+
+
+}(/*Envjs.DOM.Entity*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.EntityReference').debug('available'); 
+});
+/**
+ * @author envjs team
+ */
+
+exports.EntityReference = EntityReference = function() {
+    throw new Error("EntityReference Not Implemented" );
+};
+
+}(/*Envjs.DOM.EntityReference*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.NodeList').debug('available'); 
+});
+/**
+ * @author envjs team
+ */
+exports.Notation = Notation = function() {
+    throw new Error("Notation Not Implemented" );
+};
+
+}(/*Envjs.DOM.Notation*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Range').debug('available'); 
+});
+
+/**
+ * @author thatcher
+ */
+exports.Range = Range = function(){};
+
+__extend__(Range.prototype, {
+    get startContainer(){
+
+    },
+    get endContainer(){
+
+    },
+    get startOffset(){
+
+    },
+    get endOffset(){
+
+    },
+    get collapsed(){
+
+    },
+    get commonAncestorContainer(){
+
+    },
+    setStart: function(refNode, offset){//throws RangeException
+
+    },
+    setEnd: function(refNode, offset){//throws RangeException
+    
+    },
+    setStartBefore: function(refNode){//throws RangeException
+    
+    },
+    setStartAfter: function(refNode){//throws RangeException
+    
+    },
+    setEndBefore: function(refNode){//throws RangeException
+    
+    },
+    setEndAfter: function(refNode){//throws RangeException
+    
+    },
+    collapse: function(toStart){//throws RangeException
+    
+    },
+    selectNode: function(refNode){//throws RangeException
+    
+    },
+    selectNodeContents: function(refNode){//throws RangeException
+    
+    },
+    compareBoundaryPoints: function(how, sourceRange){
+
+    },
+    deleteContents: function(){
+
+    },
+    extractContents: function(){
+
+    },
+    cloneContents: function(){
+
+    },
+    insertNode: function(newNode){
+
+    },
+    surroundContents: function(newParent){
+
+    },
+    cloneRange: function(){
+
+    },
+    toString: function(){
+        return '[object Range]';
+    },
+    detach: function(){
+
+    }
+});
+
+
+// CompareHow
+Range.START_TO_START                 = 0;
+Range.START_TO_END                   = 1;
+Range.END_TO_END                     = 2;
+Range.END_TO_START                   = 3;
+  
+
+
+}(/*Envjs.DOM.Range*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.XMLSerializer').debug('available'); 
+});
+
+/**
+ * @author envjs team
+ * @class XMLSerializer
+ */
+
+exports.XMLSerializer = XMLSerializer = function() {};
+
+__extend__(XMLSerializer.prototype, {
+    serializeToString: function(node){
+        return node.xml;
+    },
+    toString : function(){
+        return "[object XMLSerializer]";
+    }
+});
+
+}(/*Envjs.DOM.XMLSerilaizer*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.XPathResult').debug('available'); 
+});
+
+/**
+ * @author envjs team
+ * @class XPathResult
+ */
+
+exports.XPathResult = XPathResult = function(resultType, results){
+    if( undefined === resultType){
+        resultType = XPathResult.ANY_TYPE;
+    }
+    this.type = resultType;
+    this.results = results;
+    this.currentIndex = -1;
+};
+
+XPathResult.ANY_TYPE = 0;
+XPathResult.NUMBER_TYPE  = 1;
+XPathResult.STRING_TYPE  = 2;
+XPathResult.BOOLEAN_TYPE  = 3;
+XPathResult.UNORDERED_NODE_ITERATOR_TYPE  = 4;
+XPathResult.ORDERED_NODE_ITERATOR_TYPE  = 5;
+XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+XPathResult.ORDERED_NODE_SNAPSHOT_TYPE  = 7;
+XPathResult.ANY_UNORDERED_NODE_TYPE = 8;
+XPathResult.FIRST_ORDERED_NODE_TYPE = 9;
+
+__extend__(XPathResult.prototype, {
+    get numberValue(){
+        return this.results.numberValue();
+    },
+    get stringValue(){
+        return this.results.stringValue();
+    },
+    get booleanValue(){
+        return this.results.booleanValue();
+    },
+    get singleNodeValue(){
+        var nodelist = this.results.nodeSetValue();
+        return nodelist.length?nodelist[0]:null;
+    },
+    get invalidIteratorState(){
+        return (this.currentIndex < this.results.length)?false:true;
+    },
+    get snapshotLength(){
+        return 'value' in this.results?this.results.value.length:0;
+    },
+    iterateNext: function(){
+        return (++this.currentIndex < this.results.value.length) ? 
+            this.results.value[this.currentIndex] : 
+            null;
+    },
+    snapshotItem: function(index){
+        return index < this.results.value.length ? 
+            this.results.value[index] : 
+            null;
+    }
+});
+
+var __compileXPath__;
+    
+exports.XPathResult = XPathExpression = function(xpathText, nsuriMap){
+    this.raw = xpathText;
+    this.compiled = __compileXPath__(xpathText, nsuriMap);
+};
+//redefined in closure below
+XPathExpression.prototype.evaluate = function(contextNode, resultType, result){
+    throw 'Not Implemented';
+};
+
+// Copyright 2005 Google
+//
+// Author: Steffen Meschkat <mesch@google.com>
+//
+// Miscellaneous utility and placeholder functions.
+
+// Dummy implmentation for the logging functions. Replace by something
+// useful when you want to debug.
+function xpathLog(msg) {}
+function xsltLog(msg) {}
+function xsltLogXml(msg) {}
+
+var ajaxsltIsIE6 = false;//navigator.appVersion.match(/MSIE 6.0/);
+
+// Based on <http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/
+// core.html#ID-1950641247>
+var DOM_ELEMENT_NODE = 1;
+var DOM_ATTRIBUTE_NODE = 2;
+var DOM_TEXT_NODE = 3;
+var DOM_CDATA_SECTION_NODE = 4;
+var DOM_ENTITY_REFERENCE_NODE = 5;
+var DOM_ENTITY_NODE = 6;
+var DOM_PROCESSING_INSTRUCTION_NODE = 7;
+var DOM_COMMENT_NODE = 8;
+var DOM_DOCUMENT_NODE = 9;
+var DOM_DOCUMENT_TYPE_NODE = 10;
+var DOM_DOCUMENT_FRAGMENT_NODE = 11;
+var DOM_NOTATION_NODE = 12;
+
+// Throws an exception if false.
+function assert(b) {
+  if (!b) {
+    throw "Assertion failed";
+  }
+}
+
+// Splits a string s at all occurrences of character c. This is like
+// the split() method of the string object, but IE omits empty
+// strings, which violates the invariant (s.split(x).join(x) == s).
+function stringSplit(s, c) {
+  var a = s.indexOf(c);
+  if (a == -1) {
+    return [ s ];
+  }
+  var parts = [];
+  parts.push(s.substr(0,a));
+  while (a != -1) {
+    var a1 = s.indexOf(c, a + 1);
+    if (a1 != -1) {
+      parts.push(s.substr(a + 1, a1 - a - 1));
+    } else {
+      parts.push(s.substr(a + 1));
+    }
+    a = a1;
+  }
+  return parts;
+}
+
+
+
+// Applies the given function to each element of the array, preserving
+// this, and passing the index.
+function mapExec(array, func) {
+  for (var i = 0; i < array.length; ++i) {
+    func.call(this, array[i], i);
+  }
+}
+
+// Returns an array that contains the return value of the given
+// function applied to every element of the input array.
+function mapExpr(array, func) {
+  var ret = [];
+  for (var i = 0; i < array.length; ++i) {
+    ret.push(func(array[i]));
+  }
+  return ret;
+}
+
+// Reverses the given array in place.
+function reverseInplace(array) {
+  for (var i = 0; i < array.length / 2; ++i) {
+    var h = array[i];
+    var ii = array.length - i - 1;
+    array[i] = array[ii];
+    array[ii] = h;
+  }
+}
+
+// Removes value from array. Returns the number of instances of value
+// that were removed from array.
+function removeFromArray(array, value, opt_notype) {
+  var shift = 0;
+  for (var i = 0; i < array.length; ++i) {
+    if (array[i] === value || (opt_notype && array[i] == value)) {
+      array.splice(i--, 1);
+      shift++;
+    }
+  }
+  return shift;
+}
+
+// Shallow-copies an array to the end of another array
+// Basically Array.concat, but works with other non-array collections
+function copyArray(dst, src) {
+  if (!src){ 
+      return; 
+  }
+  var dstLength = dst.length;
+  for (var i = src.length - 1; i >= 0; --i) {
+    dst[i+dstLength] = src[i];
+  }
+}
+
+/**
+ * This is an optimization for copying attribute lists in IE. IE includes many
+ * extraneous properties in its DOM attribute lists, which take require
+ * significant extra processing when evaluating attribute steps. With this
+ * function, we ignore any such attributes that has an empty string value.
+ */
+function copyArrayIgnoringAttributesWithoutValue(dst, src)
+{
+  if (!src){
+       return;
+   }
+  for (var i = src.length - 1; i >= 0; --i) {
+    // this test will pass so long as the attribute has a non-empty string
+    // value, even if that value is "false", "0", "undefined", etc.
+    if (src[i].nodeValue) {
+      dst.push(src[i]);
+    }
+  }
+}
+
+var JSURL_REGEX = /^javascript:/;
+function xmlValueIE6Hack(node) {
+    // Issue 19, IE6 mangles href attribute when it's a javascript: url
+    var nodeName = node.nodeName;
+    var nodeValue = node.nodeValue;
+    if (nodeName.length != 4){ 
+        return nodeValue; 
+    }
+    if (!/^href$/i.test(nodeName)){
+         return nodeValue;
+    }
+    if (!JSURL_REGEX.test(nodeValue)){
+         return nodeValue;
+    }
+    return unescape(nodeValue);
+}
+
+// Returns the text value of a node; for nodes without children this
+// is the nodeValue, for nodes with children this is the concatenation
+// of the value of all children.
+function xmlValue(node) {
+  if (!node) {
+    return '';
+  }
+
+  var ret = '';
+  if (node.nodeType == DOM_TEXT_NODE ||
+      node.nodeType == DOM_CDATA_SECTION_NODE) {
+    ret += node.nodeValue;
+
+  } else if (node.nodeType == DOM_ATTRIBUTE_NODE) {
+    if (ajaxsltIsIE6) {
+      ret += xmlValueIE6Hack(node);
+    } else {
+      ret += node.nodeValue;
+    }
+  } else if (node.nodeType == DOM_ELEMENT_NODE ||
+             node.nodeType == DOM_DOCUMENT_NODE ||
+             node.nodeType == DOM_DOCUMENT_FRAGMENT_NODE) {
+    for (var i = 0; i < node.childNodes.length; ++i) {
+      ret += arguments.callee(node.childNodes[i]);
+    }
+  }
+  return ret;
+}
+
+
+function xmlFullNodeName(n) {
+  if (n.prefix && n.nodeName.indexOf(n.prefix + ':') !== 0) {
+    return n.prefix + ':' + n.nodeName;
+  } else {
+    return n.nodeName;
+  }
+}
+
+// Escape XML special markup chracters: tag delimiter < > and entity
+// reference start delimiter &. The escaped string can be used in XML
+// text portions (i.e. between tags).
+function xmlEscapeText(s) {
+  return ('' + s).replace(/&/g, '&amp;').replace(/</g, '&lt;').
+    replace(/>/g, '&gt;');
+}
+
+// Escape XML special markup characters: tag delimiter < > entity
+// reference start delimiter & and quotes ". The escaped string can be
+// used in double quoted XML attribute value portions (i.e. in
+// attributes within start tags).
+function xmlEscapeAttr(s) {
+  return xmlEscapeText(s).replace(/\"/g, '&quot;');
+}
+
+// Escape markup in XML text, but don't touch entity references. The
+// escaped string can be used as XML text (i.e. between tags).
+function xmlEscapeTags(s) {
+  return s.replace(/</g, '&lt;').replace(/>/g, '&gt;');
+}
+
+/**
+ * Wrapper function to access the owner document uniformly for document
+ * and other nodes: for the document node, the owner document is the
+ * node itself, for all others it's the ownerDocument property.
+ *
+ * @param {Node} node
+ * @return {Document}
+ */
+function xmlOwnerDocument(node) {
+  if (node.nodeType == DOM_DOCUMENT_NODE) {
+    return node;
+  } else {
+    return node.ownerDocument;
+  }
+}
+
+
+function xmlTextR(node, buf, cdata) {
+    var i;
+  if (node.nodeType == DOM_TEXT_NODE) {
+    buf.push(xmlEscapeText(node.nodeValue));
+
+  } else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
+    if (cdata) {
+      buf.push(node.nodeValue);
+    } else {
+      buf.push('<![CDATA[' + node.nodeValue + ']]>');
+    }
+
+  } else if (node.nodeType == DOM_COMMENT_NODE) {
+    buf.push('<!--' + node.nodeValue + '-->');
+
+  } else if (node.nodeType == DOM_ELEMENT_NODE) {
+    buf.push('<' + xmlFullNodeName(node));
+    for (i = 0; i < node.attributes.length; ++i) {
+      var a = node.attributes[i];
+      if (a && a.nodeName && a.nodeValue) {
+        buf.push(' ' + xmlFullNodeName(a) + '="' +
+                 xmlEscapeAttr(a.nodeValue) + '"');
+      }
+    }
+
+    if (node.childNodes.length === 0) {
+      buf.push('/>');
+    } else {
+      buf.push('>');
+      for (i = 0; i < node.childNodes.length; ++i) {
+        arguments.callee(node.childNodes[i], buf, cdata);
+      }
+      buf.push('</' + xmlFullNodeName(node) + '>');
+    }
+
+  } else if (node.nodeType == DOM_DOCUMENT_NODE ||
+             node.nodeType == DOM_DOCUMENT_FRAGMENT_NODE) {
+    for (i = 0; i < node.childNodes.length; ++i) {
+      arguments.callee(node.childNodes[i], buf, cdata);
+    }
+  }
+}
+
+// Returns the representation of a node as XML text.
+function xmlText(node, opt_cdata) {
+  var buf = [];
+  xmlTextR(node, buf, opt_cdata);
+  return buf.join('');
+}
+
+// Wrapper around DOM methods so we can condense their invocations.
+function domGetAttribute(node, name) {
+  return node.getAttribute(name);
+}
+
+function domSetAttribute(node, name, value) {
+  return node.setAttribute(name, value);
+}
+
+function domRemoveAttribute(node, name) {
+  return node.removeAttribute(name);
+}
+
+function domAppendChild(node, child) {
+  return node.appendChild(child);
+}
+
+function domRemoveChild(node, child) {
+  return node.removeChild(child);
+}
+
+function domReplaceChild(node, newChild, oldChild) {
+  return node.replaceChild(newChild, oldChild);
+}
+
+function domInsertBefore(node, newChild, oldChild) {
+  return node.insertBefore(newChild, oldChild);
+}
+
+function domRemoveNode(node) {
+  return domRemoveChild(node.parentNode, node);
+}
+
+function domCreateTextNode(doc, text) {
+  return doc.createTextNode(text);
+}
+
+function domCreateElement(doc, name) {
+  return doc.createElement(name);
+}
+
+function domCreateAttribute(doc, name) {
+  return doc.createAttribute(name);
+}
+
+function domCreateCDATASection(doc, data) {
+  return doc.createCDATASection(data);
+}
+
+function domCreateComment(doc, text) {
+  return doc.createComment(text);
+}
+
+function domCreateDocumentFragment(doc) {
+  return doc.createDocumentFragment();
+}
+
+function domGetElementById(doc, id) {
+  return doc.getElementById(id);
+}
+
+// Same for window methods.
+function windowSetInterval(win, fun, time) {
+  return win.setInterval(fun, time);
+}
+
+function windowClearInterval(win, id) {
+  return win.clearInterval(id);
+}
+
+// The following function does what document.importNode(node, true)
+// would do for us here; however that method is broken in Safari/1.3,
+// so we have to emulate it.
+function xmlImportNode(doc, node) {
+  if (node.nodeType == DOM_TEXT_NODE) {
+    return domCreateTextNode(doc, node.nodeValue);
+
+  } else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
+    return domCreateCDATASection(doc, node.nodeValue);
+
+  } else if (node.nodeType == DOM_ELEMENT_NODE) {
+    var newNode = domCreateElement(doc, node.nodeName);
+    for (var i = 0; i < node.attributes.length; ++i) {
+      var an = node.attributes[i];
+      var name = an.nodeName;
+      var value = an.nodeValue;
+      domSetAttribute(newNode, name, value);
+    }
+
+    for (var c = node.firstChild; c; c = c.nextSibling) {
+      var cn = arguments.callee(doc, c);
+      domAppendChild(newNode, cn);
+    }
+
+    return newNode;
+
+  } else {
+    return domCreateComment(doc, node.nodeName);
+  }
+}
+
+
+
+
+
+// A set data structure. It can also be used as a map (i.e. the keys
+// can have values other than 1), but we don't call it map because it
+// would be ambiguous in this context. Also, the map is iterable, so
+// we can use it to replace for-in loops over core javascript Objects.
+// For-in iteration breaks when Object.prototype is modified, which
+// some clients of the maps API do.
+//
+// NOTE(mesch): The set keys by the string value of its element, NOT
+// by the typed value. In particular, objects can't be used as keys.
+//
+// @constructor
+function Set() {
+  this.keys = [];
+}
+
+Set.prototype.size = function() {
+  return this.keys.length;
+};
+
+// Adds the entry to the set, ignoring if it is present.
+Set.prototype.add = function(key, opt_value) {
+  var value = opt_value || 1;
+  if (!this.contains(key)) {
+    this[':' + key] = value;
+    this.keys.push(key);
+  }
+};
+
+// Sets the entry in the set, adding if it is not yet present.
+Set.prototype.set = function(key, opt_value) {
+  var value = opt_value || 1;
+  if (!this.contains(key)) {
+    this[':' + key] = value;
+    this.keys.push(key);
+  } else {
+    this[':' + key] = value;
+  }
+};
+
+// Increments the key's value by 1. This works around the fact that
+// numbers are always passed by value, never by reference, so that we
+// can't increment the value returned by get(), or the iterator
+// argument. Sets the key's value to 1 if it doesn't exist yet.
+Set.prototype.inc = function(key) {
+  if (!this.contains(key)) {
+    this[':' + key] = 1;
+    this.keys.push(key);
+  } else {
+    this[':' + key]++;
+  }
+};
+
+Set.prototype.get = function(key) {
+  if (this.contains(key)) {
+    return this[':' + key];
+  }
+};
+
+// Removes the entry from the set.
+Set.prototype.remove = function(key) {
+  if (this.contains(key)) {
+    delete this[':' + key];
+    removeFromArray(this.keys, key, true);
+  }
+};
+
+// Tests if an entry is in the set.
+Set.prototype.contains = function(entry) {
+  return typeof this[':' + entry] != 'undefined';
+};
+
+// Gets a list of values in the set.
+Set.prototype.items = function() {
+  var list = [];
+  for (var i = 0; i < this.keys.length; ++i) {
+    var k = this.keys[i];
+    var v = this[':' + k];
+    list.push(v);
+  }
+  return list;
+};
+
+
+// Invokes function f for every key value pair in the set as a method
+// of the set.
+Set.prototype.map = function(f) {
+  for (var i = 0; i < this.keys.length; ++i) {
+    var k = this.keys[i];
+    f.call(this, k, this[':' + k]);
+  }
+};
+
+Set.prototype.clear = function() {
+  for (var i = 0; i < this.keys.length; ++i) {
+    delete this[':' + this.keys[i]];
+  }
+  this.keys.length = 0;
+};
+
+
+// Copyright 2006 Google Inc.
+// All Rights Reserved
+//
+// Defines regular expression patterns to extract XML tokens from string.
+// See <http://www.w3.org/TR/REC-xml/#sec-common-syn>,
+// <http://www.w3.org/TR/xml11/#sec-common-syn> and
+// <http://www.w3.org/TR/REC-xml-names/#NT-NCName> for the specifications.
+//
+// Author: Junji Takagi <jtakagi@google.com>
+
+// Detect whether RegExp supports Unicode characters or not.
+
+var REGEXP_UNICODE = (function() {
+  var tests = [' ', '\u0120', -1,  // Konquerer 3.4.0 fails here.
+               '!', '\u0120', -1,
+               '\u0120', '\u0120', 0,
+               '\u0121', '\u0120', -1,
+               '\u0121', '\u0120|\u0121', 0,
+               '\u0122', '\u0120|\u0121', -1,
+               '\u0120', '[\u0120]', 0,  // Safari 2.0.3 fails here.
+               '\u0121', '[\u0120]', -1,
+               '\u0121', '[\u0120\u0121]', 0,  // Safari 2.0.3 fails here.
+               '\u0122', '[\u0120\u0121]', -1,
+               '\u0121', '[\u0120-\u0121]', 0,  // Safari 2.0.3 fails here.
+               '\u0122', '[\u0120-\u0121]', -1];
+  for (var i = 0; i < tests.length; i += 3) {
+    if (tests[i].search(new RegExp(tests[i + 1])) != tests[i + 2]) {
+      return false;
+    }
+  }
+  return true;
+}());
+
+// Common tokens in XML 1.0 and XML 1.1.
+
+var XML_S = '[ \t\r\n]+';
+var XML_EQ = '(' + XML_S + ')?=(' + XML_S + ')?';
+var XML_CHAR_REF = '&#[0-9]+;|&#x[0-9a-fA-F]+;';
+
+// XML 1.0 tokens.
+
+var XML10_VERSION_INFO = XML_S + 'version' + XML_EQ + '("1\\.0"|' + "'1\\.0')";
+var XML10_BASE_CHAR = (REGEXP_UNICODE) ?
+  '\u0041-\u005a\u0061-\u007a\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff' +
+  '\u0100-\u0131\u0134-\u013e\u0141-\u0148\u014a-\u017e\u0180-\u01c3' +
+  '\u01cd-\u01f0\u01f4-\u01f5\u01fa-\u0217\u0250-\u02a8\u02bb-\u02c1\u0386' +
+  '\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03ce\u03d0-\u03d6\u03da\u03dc' +
+  '\u03de\u03e0\u03e2-\u03f3\u0401-\u040c\u040e-\u044f\u0451-\u045c' +
+  '\u045e-\u0481\u0490-\u04c4\u04c7-\u04c8\u04cb-\u04cc\u04d0-\u04eb' +
+  '\u04ee-\u04f5\u04f8-\u04f9\u0531-\u0556\u0559\u0561-\u0586\u05d0-\u05ea' +
+  '\u05f0-\u05f2\u0621-\u063a\u0641-\u064a\u0671-\u06b7\u06ba-\u06be' +
+  '\u06c0-\u06ce\u06d0-\u06d3\u06d5\u06e5-\u06e6\u0905-\u0939\u093d' +
+  '\u0958-\u0961\u0985-\u098c\u098f-\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2' +
+  '\u09b6-\u09b9\u09dc-\u09dd\u09df-\u09e1\u09f0-\u09f1\u0a05-\u0a0a' +
+  '\u0a0f-\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32-\u0a33\u0a35-\u0a36' +
+  '\u0a38-\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8b\u0a8d' +
+  '\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2-\u0ab3\u0ab5-\u0ab9' +
+  '\u0abd\u0ae0\u0b05-\u0b0c\u0b0f-\u0b10\u0b13-\u0b28\u0b2a-\u0b30' +
+  '\u0b32-\u0b33\u0b36-\u0b39\u0b3d\u0b5c-\u0b5d\u0b5f-\u0b61\u0b85-\u0b8a' +
+  '\u0b8e-\u0b90\u0b92-\u0b95\u0b99-\u0b9a\u0b9c\u0b9e-\u0b9f\u0ba3-\u0ba4' +
+  '\u0ba8-\u0baa\u0bae-\u0bb5\u0bb7-\u0bb9\u0c05-\u0c0c\u0c0e-\u0c10' +
+  '\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c60-\u0c61\u0c85-\u0c8c' +
+  '\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cde\u0ce0-\u0ce1' +
+  '\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d60-\u0d61' +
+  '\u0e01-\u0e2e\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0e82\u0e84' +
+  '\u0e87-\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5' +
+  '\u0ea7\u0eaa-\u0eab\u0ead-\u0eae\u0eb0\u0eb2-\u0eb3\u0ebd\u0ec0-\u0ec4' +
+  '\u0f40-\u0f47\u0f49-\u0f69\u10a0-\u10c5\u10d0-\u10f6\u1100\u1102-\u1103' +
+  '\u1105-\u1107\u1109\u110b-\u110c\u110e-\u1112\u113c\u113e\u1140\u114c' +
+  '\u114e\u1150\u1154-\u1155\u1159\u115f-\u1161\u1163\u1165\u1167\u1169' +
+  '\u116d-\u116e\u1172-\u1173\u1175\u119e\u11a8\u11ab\u11ae-\u11af' +
+  '\u11b7-\u11b8\u11ba\u11bc-\u11c2\u11eb\u11f0\u11f9\u1e00-\u1e9b' +
+  '\u1ea0-\u1ef9\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d' +
+  '\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc' +
+  '\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec' +
+  '\u1ff2-\u1ff4\u1ff6-\u1ffc\u2126\u212a-\u212b\u212e\u2180-\u2182' +
+  '\u3041-\u3094\u30a1-\u30fa\u3105-\u312c\uac00-\ud7a3' :
+  'A-Za-z';
+var XML10_IDEOGRAPHIC = (REGEXP_UNICODE) ?
+  '\u4e00-\u9fa5\u3007\u3021-\u3029' :
+  '';
+var XML10_COMBINING_CHAR = (REGEXP_UNICODE) ?
+  '\u0300-\u0345\u0360-\u0361\u0483-\u0486\u0591-\u05a1\u05a3-\u05b9' +
+  '\u05bb-\u05bd\u05bf\u05c1-\u05c2\u05c4\u064b-\u0652\u0670\u06d6-\u06dc' +
+  '\u06dd-\u06df\u06e0-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0901-\u0903\u093c' +
+  '\u093e-\u094c\u094d\u0951-\u0954\u0962-\u0963\u0981-\u0983\u09bc\u09be' +
+  '\u09bf\u09c0-\u09c4\u09c7-\u09c8\u09cb-\u09cd\u09d7\u09e2-\u09e3\u0a02' +
+  '\u0a3c\u0a3e\u0a3f\u0a40-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a70-\u0a71' +
+  '\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0b01-\u0b03' +
+  '\u0b3c\u0b3e-\u0b43\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57\u0b82-\u0b83' +
+  '\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44' +
+  '\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c82-\u0c83\u0cbe-\u0cc4' +
+  '\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d43' +
+  '\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1' +
+  '\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39' +
+  '\u0f3e\u0f3f\u0f71-\u0f84\u0f86-\u0f8b\u0f90-\u0f95\u0f97\u0f99-\u0fad' +
+  '\u0fb1-\u0fb7\u0fb9\u20d0-\u20dc\u20e1\u302a-\u302f\u3099\u309a' :
+  '';
+var XML10_DIGIT = (REGEXP_UNICODE) ?
+  '\u0030-\u0039\u0660-\u0669\u06f0-\u06f9\u0966-\u096f\u09e6-\u09ef' +
+  '\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be7-\u0bef\u0c66-\u0c6f' +
+  '\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29' :
+  '0-9';
+var XML10_EXTENDER = (REGEXP_UNICODE) ?
+  '\u00b7\u02d0\u02d1\u0387\u0640\u0e46\u0ec6\u3005\u3031-\u3035' +
+  '\u309d-\u309e\u30fc-\u30fe' :
+  '';
+var XML10_LETTER = XML10_BASE_CHAR + XML10_IDEOGRAPHIC;
+var XML10_NAME_CHAR = XML10_LETTER + XML10_DIGIT + '\\._:' +
+                      XML10_COMBINING_CHAR + XML10_EXTENDER + '-';
+var XML10_NAME = '[' + XML10_LETTER + '_:][' + XML10_NAME_CHAR + ']*';
+
+var XML10_ENTITY_REF = '&' + XML10_NAME + ';';
+var XML10_REFERENCE = XML10_ENTITY_REF + '|' + XML_CHAR_REF;
+var XML10_ATT_VALUE = '"(([^<&"]|' + XML10_REFERENCE + ')*)"|' +
+                      "'(([^<&']|" + XML10_REFERENCE + ")*)'";
+var XML10_ATTRIBUTE =
+  '(' + XML10_NAME + ')' + XML_EQ + '(' + XML10_ATT_VALUE + ')';
+
+// XML 1.1 tokens.
+// TODO(jtakagi): NameStartChar also includes \u10000-\ueffff.
+// ECMAScript Language Specifiction defines UnicodeEscapeSequence as
+// "\u HexDigit HexDigit HexDigit HexDigit" and we may need to use
+// surrogate pairs, but any browser doesn't support surrogate paris in
+// character classes of regular expression, so avoid including them for now.
+
+var XML11_VERSION_INFO = XML_S + 'version' + XML_EQ + '("1\\.1"|' + "'1\\.1')";
+var XML11_NAME_START_CHAR = (REGEXP_UNICODE) ?
+  ':A-Z_a-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02ff\u0370-\u037d' +
+  '\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff' +
+  '\uf900-\ufdcf\ufdf0-\ufffd' :
+  ':A-Z_a-z';
+var XML11_NAME_CHAR = XML11_NAME_START_CHAR +
+  ((REGEXP_UNICODE) ? '\\.0-9\u00b7\u0300-\u036f\u203f-\u2040-' : '\\.0-9-');
+var XML11_NAME = '[' + XML11_NAME_START_CHAR + '][' + XML11_NAME_CHAR + ']*';
+
+var XML11_ENTITY_REF = '&' + XML11_NAME + ';';
+var XML11_REFERENCE = XML11_ENTITY_REF + '|' + XML_CHAR_REF;
+var XML11_ATT_VALUE = '"(([^<&"]|' + XML11_REFERENCE + ')*)"|' +
+                      "'(([^<&']|" + XML11_REFERENCE + ")*)'";
+var XML11_ATTRIBUTE =
+  '(' + XML11_NAME + ')' + XML_EQ + '(' + XML11_ATT_VALUE + ')';
+
+// XML Namespace tokens.
+// Used in XML parser and XPath parser.
+
+var XML_NC_NAME_CHAR = XML10_LETTER + XML10_DIGIT + '\\._' +
+                       XML10_COMBINING_CHAR + XML10_EXTENDER + '-';
+var XML_NC_NAME = '[' + XML10_LETTER + '_][' + XML_NC_NAME_CHAR + ']*';
+// Copyright 2005 Google Inc.
+// All Rights Reserved
+//
+// Author: Steffen Meschkat <mesch@google.com>
+//
+// An XML parse and a minimal DOM implementation that just supportes
+// the subset of the W3C DOM that is used in the XSLT implementation.
+
+// NOTE: The split() method in IE omits empty result strings. This is
+// utterly annoying. So we don't use it here.
+
+// Resolve entities in XML text fragments. According to the DOM
+// specification, the DOM is supposed to resolve entity references at
+// the API level. I.e. no entity references are passed through the
+// API. See "Entities and the DOM core", p.12, DOM 2 Core
+// Spec. However, different browsers actually pass very different
+// values at the API. See <http://mesch.nyc/test-xml-quote>.
+function xmlResolveEntities(s) {
+
+  var parts = stringSplit(s, '&');
+
+  var ret = parts[0];
+  for (var i = 1; i < parts.length; ++i) {
+    var rp = parts[i].indexOf(';');
+    if (rp == -1) {
+      // no entity reference: just a & but no ;
+      ret += parts[i];
+      continue;
+    }
+
+    var entityName = parts[i].substring(0, rp);
+    var remainderText = parts[i].substring(rp + 1);
+
+    var ch;
+    switch (entityName) {
+      case 'lt':
+        ch = '<';
+        break;
+      case 'gt':
+        ch = '>';
+        break;
+      case 'amp':
+        ch = '&';
+        break;
+      case 'quot':
+        ch = '"';
+        break;
+      case 'apos':
+        ch = '\'';
+        break;
+      case 'nbsp':
+        ch = String.fromCharCode(160);
+        break;
+      default:
+        // Cool trick: let the DOM do the entity decoding. We assign
+        // the entity text through non-W3C DOM properties and read it
+        // through the W3C DOM. W3C DOM access is specified to resolve
+        // entities.
+        var span = domCreateElement(window.document, 'span');
+        span.innerHTML = '&' + entityName + '; ';
+        ch = span.childNodes[0].nodeValue.charAt(0);
+    }
+    ret += ch + remainderText;
+  }
+
+  return ret;
+}
+
+var XML10_TAGNAME_REGEXP = new RegExp('^(' + XML10_NAME + ')');
+var XML10_ATTRIBUTE_REGEXP = new RegExp(XML10_ATTRIBUTE, 'g');
+
+var XML11_TAGNAME_REGEXP = new RegExp('^(' + XML11_NAME + ')');
+var XML11_ATTRIBUTE_REGEXP = new RegExp(XML11_ATTRIBUTE, 'g');
+
+
+
+
+// Traverses the element nodes in the DOM section underneath the given
+// node and invokes the given callbacks as methods on every element
+// node encountered. Function opt_pre is invoked before a node's
+// children are traversed; opt_post is invoked after they are
+// traversed. Traversal will not be continued if a callback function
+// returns boolean false. NOTE(mesch): copied from
+// <//google3/maps/webmaps/javascript/dom.js>.
+function domTraverseElements(node, opt_pre, opt_post) {
+  var ret;
+  if (opt_pre) {
+    ret = opt_pre.call(null, node);
+    if (typeof ret == 'boolean' && !ret) {
+      return false;
+    }
+  }
+
+  for (var c = node.firstChild; c; c = c.nextSibling) {
+    if (c.nodeType == DOM_ELEMENT_NODE) {
+      ret = arguments.callee.call(this, c, opt_pre, opt_post);
+      if (typeof ret == 'boolean' && !ret) {
+        return false;
+      }
+    }
+  }
+
+  if (opt_post) {
+    ret = opt_post.call(null, node);
+    if (typeof ret == 'boolean' && !ret) {
+      return false;
+    }
+  }
+}
+
+// Our W3C DOM Node implementation. Note we call it XNode because we
+// can't define the identifier Node. We do this mostly for Opera,
+// where we can't reuse the HTML DOM for parsing our own XML, and for
+// Safari, where it is too expensive to have the template processor
+// operate on native DOM nodes.
+function XNode(type, name, opt_value, opt_owner) {
+  this.attributes = [];
+  this.childNodes = [];
+
+  XNode.init.call(this, type, name, opt_value, opt_owner);
+}
+
+function XDocument() {
+  // NOTE(mesch): Acocording to the DOM Spec, ownerDocument of a
+  // document node is null.
+  XNode.call(this, DOM_DOCUMENT_NODE, '#document', null, null);
+  this.documentElement = null;
+}
+
+// Don't call as method, use apply() or call().
+XNode.init = function(type, name, value, owner) {
+  this.nodeType = type - 0;
+  this.nodeName = '' + name;
+  this.nodeValue = '' + value;
+  this.ownerDocument = owner;
+
+  this.firstChild = null;
+  this.lastChild = null;
+  this.nextSibling = null;
+  this.previousSibling = null;
+  this.parentNode = null;
+};
+
+XNode.unused_ = [];
+
+XNode.recycle = function(node) {
+  if (!node) {
+    return;
+  }
+
+  if (node.constructor == XDocument) {
+    XNode.recycle(node.documentElement);
+    return;
+  }
+
+  if (node.constructor != this) {
+    return;
+  }
+
+  XNode.unused_.push(node);
+  for (var a = 0; a < node.attributes.length; ++a) {
+    XNode.recycle(node.attributes[a]);
+  }
+  for (var c = 0; c < node.childNodes.length; ++c) {
+    XNode.recycle(node.childNodes[c]);
+  }
+  node.attributes.length = 0;
+  node.childNodes.length = 0;
+  XNode.init.call(node, 0, '', '', null);
+};
+
+XNode.create = function(type, name, value, owner) {
+  if (XNode.unused_.length > 0) {
+    var node = XNode.unused_.pop();
+    XNode.init.call(node, type, name, value, owner);
+    return node;
+  } else {
+    return new XNode(type, name, value, owner);
+  }
+};
+
+XNode.prototype.appendChild = function(node) {
+  // firstChild
+  if (this.childNodes.length === 0) {
+    this.firstChild = node;
+  }
+
+  // previousSibling
+  node.previousSibling = this.lastChild;
+
+  // nextSibling
+  node.nextSibling = null;
+  if (this.lastChild) {
+    this.lastChild.nextSibling = node;
+  }
+
+  // parentNode
+  node.parentNode = this;
+
+  // lastChild
+  this.lastChild = node;
+
+  // childNodes
+  this.childNodes.push(node);
+};
+
+
+XNode.prototype.replaceChild = function(newNode, oldNode) {
+  if (oldNode == newNode) {
+    return;
+  }
+
+  for (var i = 0; i < this.childNodes.length; ++i) {
+    if (this.childNodes[i] == oldNode) {
+      this.childNodes[i] = newNode;
+
+      var p = oldNode.parentNode;
+      oldNode.parentNode = null;
+      newNode.parentNode = p;
+
+      p = oldNode.previousSibling;
+      oldNode.previousSibling = null;
+      newNode.previousSibling = p;
+      if (newNode.previousSibling) {
+        newNode.previousSibling.nextSibling = newNode;
+      }
+
+      p = oldNode.nextSibling;
+      oldNode.nextSibling = null;
+      newNode.nextSibling = p;
+      if (newNode.nextSibling) {
+        newNode.nextSibling.previousSibling = newNode;
+      }
+
+      if (this.firstChild == oldNode) {
+        this.firstChild = newNode;
+      }
+
+      if (this.lastChild == oldNode) {
+        this.lastChild = newNode;
+      }
+
+      break;
+    }
+  }
+};
+
+
+XNode.prototype.insertBefore = function(newNode, oldNode) {
+  if (oldNode == newNode) {
+    return;
+  }
+
+  if (oldNode.parentNode != this) {
+    return;
+  }
+
+  if (newNode.parentNode) {
+    newNode.parentNode.removeChild(newNode);
+  }
+
+  var newChildren = [];
+  for (var i = 0; i < this.childNodes.length; ++i) {
+    var c = this.childNodes[i];
+    if (c == oldNode) {
+      newChildren.push(newNode);
+
+      newNode.parentNode = this;
+
+      newNode.previousSibling = oldNode.previousSibling;
+      oldNode.previousSibling = newNode;
+      if (newNode.previousSibling) {
+        newNode.previousSibling.nextSibling = newNode;
+      }
+
+      newNode.nextSibling = oldNode;
+
+      if (this.firstChild == oldNode) {
+        this.firstChild = newNode;
+      }
+    }
+    newChildren.push(c);
+  }
+  this.childNodes = newChildren;
+};
+
+
+XNode.prototype.removeChild = function(node) {
+  var newChildren = [];
+  for (var i = 0; i < this.childNodes.length; ++i) {
+    var c = this.childNodes[i];
+    if (c != node) {
+      newChildren.push(c);
+    } else {
+      if (c.previousSibling) {
+        c.previousSibling.nextSibling = c.nextSibling;
+      }
+      if (c.nextSibling) {
+        c.nextSibling.previousSibling = c.previousSibling;
+      }
+      if (this.firstChild == c) {
+        this.firstChild = c.nextSibling;
+      }
+      if (this.lastChild == c) {
+        this.lastChild = c.previousSibling;
+      }
+    }
+  }
+  this.childNodes = newChildren;
+};
+
+
+XNode.prototype.hasAttributes = function() {
+  return this.attributes.length > 0;
+};
+
+
+XNode.prototype.setAttribute = function(name, value) {
+  for (var i = 0; i < this.attributes.length; ++i) {
+    if (this.attributes[i].nodeName == name) {
+      this.attributes[i].nodeValue = '' + value;
+      return;
+    }
+  }
+  this.attributes.push(XNode.create(DOM_ATTRIBUTE_NODE, name, value, this));
+};
+
+
+XNode.prototype.getAttribute = function(name) {
+  for (var i = 0; i < this.attributes.length; ++i) {
+    if (this.attributes[i].nodeName == name) {
+      return this.attributes[i].nodeValue;
+    }
+  }
+  return null;
+};
+
+
+XNode.prototype.removeAttribute = function(name) {
+  var a = [];
+  for (var i = 0; i < this.attributes.length; ++i) {
+    if (this.attributes[i].nodeName != name) {
+      a.push(this.attributes[i]);
+    }
+  }
+  this.attributes = a;
+};
+
+
+XNode.prototype.getElementsByTagName = function(name) {
+  var ret = [];
+  var self = this;
+  if ("*" == name) {
+    domTraverseElements(this, function(node) {
+       if (self == node){
+           return;
+       }
+      ret.push(node);
+    }, null);
+  } else {
+    domTraverseElements(this, function(node) {
+      if (self == node){ 
+          return;
+      }
+      if (node.nodeName == name) {
+        ret.push(node);
+      }
+    }, null);
+  }
+  return ret;
+};
+
+
+XNode.prototype.getElementById = function(id) {
+  var ret = null;
+  domTraverseElements(this, function(node) {
+    if (node.getAttribute('id') == id) {
+      ret = node;
+      return false;
+    }
+  }, null);
+  return ret;
+};
+
+
+
+XDocument.prototype = new XNode(DOM_DOCUMENT_NODE, '#document');
+
+XDocument.prototype.clear = function() {
+  XNode.recycle(this.documentElement);
+  this.documentElement = null;
+};
+
+XDocument.prototype.appendChild = function(node) {
+  XNode.prototype.appendChild.call(this, node);
+  this.documentElement = this.childNodes[0];
+};
+
+XDocument.prototype.createElement = function(name) {
+  return XNode.create(DOM_ELEMENT_NODE, name, null, this);
+};
+
+XDocument.prototype.createDocumentFragment = function() {
+  return XNode.create(DOM_DOCUMENT_FRAGMENT_NODE, '#document-fragment',
+                    null, this);
+};
+
+XDocument.prototype.createTextNode = function(value) {
+  return XNode.create(DOM_TEXT_NODE, '#text', value, this);
+};
+
+XDocument.prototype.createAttribute = function(name) {
+  return XNode.create(DOM_ATTRIBUTE_NODE, name, null, this);
+};
+
+XDocument.prototype.createComment = function(data) {
+  return XNode.create(DOM_COMMENT_NODE, '#comment', data, this);
+};
+
+XDocument.prototype.createCDATASection = function(data) {
+  return XNode.create(DOM_CDATA_SECTION_NODE, '#cdata-section', data, this);
+};
+
+// Parses the given XML string with our custom, JavaScript XML parser. Written
+// by Steffen Meschkat (mesch@google.com).
+function xmlParse(xml) {
+  var regex_empty = /\/$/;
+
+  var regex_tagname;
+  var regex_attribute;
+  if (xml.match(/^<\?xml/)) {
+    // When an XML document begins with an XML declaration
+    // VersionInfo must appear.
+    if (xml.search(new RegExp(XML10_VERSION_INFO)) == 5) {
+      regex_tagname = XML10_TAGNAME_REGEXP;
+      regex_attribute = XML10_ATTRIBUTE_REGEXP;
+    } else if (xml.search(new RegExp(XML11_VERSION_INFO)) == 5) {
+      regex_tagname = XML11_TAGNAME_REGEXP;
+      regex_attribute = XML11_ATTRIBUTE_REGEXP;
+    } else {
+      // VersionInfo is missing, or unknown version number.
+      // TODO : Fallback to XML 1.0 or XML 1.1, or just return null?
+      // alert('VersionInfo is missing, or unknown version number.');
+    }
+  } else {
+    // When an XML declaration is missing it's an XML 1.0 document.
+    regex_tagname = XML10_TAGNAME_REGEXP;
+    regex_attribute = XML10_ATTRIBUTE_REGEXP;
+  }
+
+  var xmldoc = new XDocument();
+  var root = xmldoc;
+
+  // For the record: in Safari, we would create native DOM nodes, but
+  // in Opera that is not possible, because the DOM only allows HTML
+  // element nodes to be created, so we have to do our own DOM nodes.
+
+  // xmldoc = document.implementation.createDocument('','',null);
+  // root = xmldoc; // .createDocumentFragment();
+  // NOTE(mesch): using the DocumentFragment instead of the Document
+  // crashes my Safari 1.2.4 (v125.12).
+  var stack = [];
+
+  var parent = root;
+  stack.push(parent);
+
+  // The token that delimits a section that contains markup as
+  // content: CDATA or comments.
+  var slurp = '';
+
+  var x = stringSplit(xml, '<');
+  for (var i = 1; i < x.length; ++i) {
+    var xx = stringSplit(x[i], '>');
+    var tag = xx[0];
+    var text = xmlResolveEntities(xx[1] || '');
+    var end,
+        start,
+        data,
+        node;
+    
+    if (slurp) {
+      // In a "slurp" section (CDATA or comment): only check for the
+      // end of the section, otherwise append the whole text.
+      end = x[i].indexOf(slurp);
+      if (end != -1) {
+        data = x[i].substring(0, end);
+        parent.nodeValue += '<' + data;
+        stack.pop();
+        parent = stack[stack.length-1];
+        text = x[i].substring(end + slurp.length);
+        slurp = '';
+      } else {
+        parent.nodeValue += '<' + x[i];
+        text = null;
+      }
+
+    } else if (tag.indexOf('![CDATA[') === 0) {
+      start = '![CDATA['.length;
+      end = x[i].indexOf(']]>');
+      if (end != -1) {
+        data = x[i].substring(start, end);
+        node = domCreateCDATASection(xmldoc, data);
+        domAppendChild(parent, node);
+      } else {
+        data = x[i].substring(start);
+        text = null;
+        node = domCreateCDATASection(xmldoc, data);
+        domAppendChild(parent, node);
+        parent = node;
+        stack.push(node);
+        slurp = ']]>';
+      }
+
+    } else if (tag.indexOf('!--') === 0) {
+      start = '!--'.length;
+      end = x[i].indexOf('-->');
+      if (end != -1) {
+        data = x[i].substring(start, end);
+        node = domCreateComment(xmldoc, data);
+        domAppendChild(parent, node);
+      } else {
+        data = x[i].substring(start);
+        text = null;
+        node = domCreateComment(xmldoc, data);
+        domAppendChild(parent, node);
+        parent = node;
+        stack.push(node);
+        slurp = '-->';
+      }
+
+    } else if (tag.charAt(0) == '/') {
+      stack.pop();
+      parent = stack[stack.length-1];
+
+    } else if (tag.charAt(0) == '?') {
+      // Ignore XML declaration and processing instructions
+    } else if (tag.charAt(0) == '!') {
+      // Ignore notation and comments
+    } else {
+      var empty = tag.match(regex_empty);
+      var tagname = regex_tagname.exec(tag)[1];
+      node = domCreateElement(xmldoc, tagname);
+
+      var att = regex_attribute.exec(tag);
+      while (att) {
+        var val = xmlResolveEntities(att[5] || att[7] || '');
+        domSetAttribute(node, att[1], val);
+        att = regex_attribute.exec(tag);
+      }
+
+      domAppendChild(parent, node);
+      if (!empty) {
+        parent = node;
+        stack.push(node);
+      }
+    }
+
+    if (text && parent != root) {
+      domAppendChild(parent, domCreateTextNode(xmldoc, text));
+    }
+  }
+
+  return root;
+}
+
+// XPath expression values. They are what XPath expressions evaluate
+// to. Strangely, the different value types are not specified in the
+// XPath syntax, but only in the semantics, so they don't show up as
+// nonterminals in the grammar. Yet, some expressions are required to
+// evaluate to particular types, and not every type can be coerced
+// into every other type. Although the types of XPath values are
+// similar to the types present in JavaScript, the type coercion rules
+// are a bit peculiar, so we explicitly model XPath types instead of
+// mapping them onto JavaScript types. (See XPath spec.)
+//
+// The four types are:
+//
+//   StringValue
+//
+//   NumberValue
+//
+//   BooleanValue
+//
+//   NodeSetValue
+//
+// The common interface of the value classes consists of methods that
+// implement the XPath type coercion rules:
+//
+//   stringValue() -- returns the value as a JavaScript String,
+//
+//   numberValue() -- returns the value as a JavaScript Number,
+//
+//   booleanValue() -- returns the value as a JavaScript Boolean,
+//
+//   nodeSetValue() -- returns the value as a JavaScript Array of DOM
+//   Node objects.
+//
+
+function StringValue(value) {
+  this.value = value;
+  this.type = 'string';
+}
+
+StringValue.prototype.stringValue = function() {
+  return this.value;
+};
+
+StringValue.prototype.booleanValue = function() {
+  return this.value.length > 0;
+};
+
+StringValue.prototype.numberValue = function() {
+  return this.value - 0;
+};
+
+StringValue.prototype.nodeSetValue = function() {
+  throw this;
+};
+
+function BooleanValue(value) {
+  this.value = value;
+  this.type = 'boolean';
+}
+
+BooleanValue.prototype.stringValue = function() {
+  return '' + this.value;
+};
+
+BooleanValue.prototype.booleanValue = function() {
+  return this.value;
+};
+
+BooleanValue.prototype.numberValue = function() {
+  return this.value ? 1 : 0;
+};
+
+BooleanValue.prototype.nodeSetValue = function() {
+  throw this;
+};
+
+function NumberValue(value) {
+  this.value = value;
+  this.type = 'number';
+}
+
+NumberValue.prototype.stringValue = function() {
+  return '' + this.value;
+};
+
+NumberValue.prototype.booleanValue = function() {
+  return !!this.value;
+};
+
+NumberValue.prototype.numberValue = function() {
+  return this.value - 0;
+};
+
+NumberValue.prototype.nodeSetValue = function() {
+  throw this;
+};
+
+function NodeSetValue(value) {
+  this.value = value;
+  this.type = 'node-set';
+}
+
+NodeSetValue.prototype.stringValue = function() {
+  if (this.value.length === 0) {
+    return '';
+  } else {
+    return xmlValue(this.value[0]);
+  }
+};
+
+NodeSetValue.prototype.booleanValue = function() {
+  return this.value.length > 0;
+};
+
+NodeSetValue.prototype.numberValue = function() {
+  return this.stringValue() - 0;
+};
+
+NodeSetValue.prototype.nodeSetValue = function() {
+  return this.value;
+};
+
+// The axes of XPath expressions.
+
+var xpathAxis = {
+  ANCESTOR_OR_SELF: 'ancestor-or-self',
+  ANCESTOR: 'ancestor',
+  ATTRIBUTE: 'attribute',
+  CHILD: 'child',
+  DESCENDANT_OR_SELF: 'descendant-or-self',
+  DESCENDANT: 'descendant',
+  FOLLOWING_SIBLING: 'following-sibling',
+  FOLLOWING: 'following',
+  NAMESPACE: 'namespace',
+  PARENT: 'parent',
+  PRECEDING_SIBLING: 'preceding-sibling',
+  PRECEDING: 'preceding',
+  SELF: 'self'
+};
+
+var xpathAxesRe = [
+    xpathAxis.ANCESTOR_OR_SELF,
+    xpathAxis.ANCESTOR,
+    xpathAxis.ATTRIBUTE,
+    xpathAxis.CHILD,
+    xpathAxis.DESCENDANT_OR_SELF,
+    xpathAxis.DESCENDANT,
+    xpathAxis.FOLLOWING_SIBLING,
+    xpathAxis.FOLLOWING,
+    xpathAxis.NAMESPACE,
+    xpathAxis.PARENT,
+    xpathAxis.PRECEDING_SIBLING,
+    xpathAxis.PRECEDING,
+    xpathAxis.SELF
+].join('|');
+
+
+// The tokens of the language. The label property is just used for
+// generating debug output. The prec property is the precedence used
+// for shift/reduce resolution. Default precedence is 0 as a lookahead
+// token and 2 on the stack. TODO(mesch): this is certainly not
+// necessary and too complicated. Simplify this!
+
+// NOTE: tabular formatting is the big exception, but here it should
+// be OK.
+
+var TOK_PIPE =   { label: "|",   prec:   17, re: new RegExp("^\\|") };
+var TOK_DSLASH = { label: "//",  prec:   19, re: new RegExp("^//")  };
+var TOK_SLASH =  { label: "/",   prec:   30, re: new RegExp("^/")   };
+var TOK_AXIS =   { label: "::",  prec:   20, re: new RegExp("^::")  };
+var TOK_COLON =  { label: ":",   prec: 1000, re: new RegExp("^:")  };
+var TOK_AXISNAME = { label: "[axis]", re: new RegExp('^(' + xpathAxesRe + ')') };
+var TOK_PARENO = { label: "(",   prec:   34, re: new RegExp("^\\(") };
+var TOK_PARENC = { label: ")",               re: new RegExp("^\\)") };
+var TOK_DDOT =   { label: "..",  prec:   34, re: new RegExp("^\\.\\.") };
+var TOK_DOT =    { label: ".",   prec:   34, re: new RegExp("^\\.") };
+var TOK_AT =     { label: "@",   prec:   34, re: new RegExp("^@")   };
+
+var TOK_COMMA =  { label: ",",               re: new RegExp("^,") };
+
+var TOK_OR =     { label: "or",  prec:   10, re: new RegExp("^or\\b") };
+var TOK_AND =    { label: "and", prec:   11, re: new RegExp("^and\\b") };
+var TOK_EQ =     { label: "=",   prec:   12, re: new RegExp("^=")   };
+var TOK_NEQ =    { label: "!=",  prec:   12, re: new RegExp("^!=")  };
+var TOK_GE =     { label: ">=",  prec:   13, re: new RegExp("^>=")  };
+var TOK_GT =     { label: ">",   prec:   13, re: new RegExp("^>")   };
+var TOK_LE =     { label: "<=",  prec:   13, re: new RegExp("^<=")  };
+var TOK_LT =     { label: "<",   prec:   13, re: new RegExp("^<")   };
+var TOK_PLUS =   { label: "+",   prec:   14, re: new RegExp("^\\+"), left: true };
+var TOK_MINUS =  { label: "-",   prec:   14, re: new RegExp("^\\-"), left: true };
+var TOK_DIV =    { label: "div", prec:   15, re: new RegExp("^div\\b"), left: true };
+var TOK_MOD =    { label: "mod", prec:   15, re: new RegExp("^mod\\b"), left: true };
+
+var TOK_BRACKO = { label: "[",   prec:   32, re: new RegExp("^\\[") };
+var TOK_BRACKC = { label: "]",               re: new RegExp("^\\]") };
+var TOK_DOLLAR = { label: "$",               re: new RegExp("^\\$") };
+
+var TOK_NCNAME = { label: "[ncname]", re: new RegExp('^' + XML_NC_NAME) };
+
+var TOK_ASTERISK = { label: "*", prec: 15, re: new RegExp("^\\*"), left: true };
+var TOK_LITERALQ = { label: "[litq]", prec: 20, re: new RegExp("^'[^\\']*'") };
+var TOK_LITERALQQ = {
+  label: "[litqq]",
+  prec: 20,
+  re: new RegExp('^"[^\\"]*"')
+};
+
+var TOK_NUMBER  = {
+  label: "[number]",
+  prec: 35,
+  re: new RegExp('^\\d+(\\.\\d*)?') };
+
+var TOK_QNAME = {
+  label: "[qname]",
+  re: new RegExp('^(' + XML_NC_NAME + ':)?' + XML_NC_NAME)
+};
+
+var TOK_NODEO = {
+  label: "[nodetest-start]",
+  re: new RegExp('^(processing-instruction|comment|text|node)\\(')
+};
+
+// The table of the tokens of our grammar, used by the lexer: first
+// column the tag, second column a regexp to recognize it in the
+// input, third column the precedence of the token, fourth column a
+// factory function for the semantic value of the token.
+//
+// NOTE: order of this list is important, because the first match
+// counts. Cf. DDOT and DOT, and AXIS and COLON.
+
+var xpathTokenRules = [
+    TOK_DSLASH,
+    TOK_SLASH,
+    TOK_DDOT,
+    TOK_DOT,
+    TOK_AXIS,
+    TOK_COLON,
+    TOK_AXISNAME,
+    TOK_NODEO,
+    TOK_PARENO,
+    TOK_PARENC,
+    TOK_BRACKO,
+    TOK_BRACKC,
+    TOK_AT,
+    TOK_COMMA,
+    TOK_OR,
+    TOK_AND,
+    TOK_NEQ,
+    TOK_EQ,
+    TOK_GE,
+    TOK_GT,
+    TOK_LE,
+    TOK_LT,
+    TOK_PLUS,
+    TOK_MINUS,
+    TOK_ASTERISK,
+    TOK_PIPE,
+    TOK_MOD,
+    TOK_DIV,
+    TOK_LITERALQ,
+    TOK_LITERALQQ,
+    TOK_NUMBER,
+    TOK_QNAME,
+    TOK_NCNAME,
+    TOK_DOLLAR
+];
+
+// All the nonterminals of the grammar. The nonterminal objects are
+// identified by object identity; the labels are used in the debug
+// output only.
+var XPathLocationPath = { label: "LocationPath" };
+var XPathRelativeLocationPath = { label: "RelativeLocationPath" };
+var XPathAbsoluteLocationPath = { label: "AbsoluteLocationPath" };
+var XPathStep = { label: "Step" };
+var XPathNodeTest = { label: "NodeTest" };
+var XPathPredicate = { label: "Predicate" };
+var XPathLiteral = { label: "Literal" };
+var XPathExpr = { label: "Expr" };
+var XPathPrimaryExpr = { label: "PrimaryExpr" };
+var XPathVariableReference = { label: "Variablereference" };
+var XPathNumber = { label: "Number" };
+var XPathFunctionCall = { label: "FunctionCall" };
+var XPathArgumentRemainder = { label: "ArgumentRemainder" };
+var XPathPathExpr = { label: "PathExpr" };
+var XPathUnionExpr = { label: "UnionExpr" };
+var XPathFilterExpr = { label: "FilterExpr" };
+var XPathDigits = { label: "Digits" };
+
+var xpathNonTerminals = [
+    XPathLocationPath,
+    XPathRelativeLocationPath,
+    XPathAbsoluteLocationPath,
+    XPathStep,
+    XPathNodeTest,
+    XPathPredicate,
+    XPathLiteral,
+    XPathExpr,
+    XPathPrimaryExpr,
+    XPathVariableReference,
+    XPathNumber,
+    XPathFunctionCall,
+    XPathArgumentRemainder,
+    XPathPathExpr,
+    XPathUnionExpr,
+    XPathFilterExpr,
+    XPathDigits
+];
+
+// Quantifiers that are used in the productions of the grammar.
+var Q_01 = { label: "?" };
+var Q_MM = { label: "*" };
+var Q_1M = { label: "+" };
+
+// Tag for left associativity (right assoc is implied by undefined).
+var ASSOC_LEFT = true;
+
+
+   
+// XPath expressions. They are used as nodes in the parse tree and
+// possess an evaluate() method to compute an XPath value given an XPath
+// context. Expressions are returned from the parser. Teh set of
+// expression classes closely mirrors the set of non terminal symbols
+// in the grammar. Every non trivial nonterminal symbol has a
+// corresponding expression class.
+//
+// The common expression interface consists of the following methods:
+//
+// evaluate(context) -- evaluates the expression, returns a value.
+//
+// toString() -- returns the XPath text representation of the
+// expression (defined in xsltdebug.js).
+//
+// parseTree(indent) -- returns a parse tree representation of the
+// expression (defined in xsltdebug.js).
+
+function NodeTestAny() {
+  this.value = new BooleanValue(true);
+}
+
+NodeTestAny.prototype.evaluate = function(ctx) {
+  return this.value;
+};
+
+function NodeTestElementOrAttribute() {}
+
+NodeTestElementOrAttribute.prototype.evaluate = function(ctx) {
+  return new BooleanValue(
+      ctx.node.nodeType == DOM_ELEMENT_NODE ||
+      ctx.node.nodeType == DOM_ATTRIBUTE_NODE);
+};
+
+function NodeTestText() {}
+
+NodeTestText.prototype.evaluate = function(ctx) {
+  return new BooleanValue(ctx.node.nodeType == DOM_TEXT_NODE);
+};
+
+function NodeTestComment() {}
+
+NodeTestComment.prototype.evaluate = function(ctx) {
+  return new BooleanValue(ctx.node.nodeType == DOM_COMMENT_NODE);
+};
+
+function NodeTestPI(target) {
+  this.target = target;
+}
+
+NodeTestPI.prototype.evaluate = function(ctx) {
+  return new
+  BooleanValue(ctx.node.nodeType == DOM_PROCESSING_INSTRUCTION_NODE &&
+               (!this.target || ctx.node.nodeName == this.target));
+};
+
+function NodeTestNC(nsprefix) {
+  this.regex = new RegExp("^" + nsprefix + ":");
+  this.nsprefix = nsprefix;
+}
+
+NodeTestNC.prototype.evaluate = function(ctx) {
+  var n = ctx.node;
+  return new BooleanValue(this.regex.match(n.nodeName));
+};
+
+function NodeTestName(name) {
+  this.name = name;
+  this.re = new RegExp('^' + name + '$', "i");
+}
+
+NodeTestName.prototype.evaluate = function(ctx) {
+  var n = ctx.node;
+  if (ctx.caseInsensitive) {
+    if (n.nodeName.length != this.name.length){ 
+        return new BooleanValue(false);
+    }
+    return new BooleanValue(this.re.test(n.nodeName));
+  } else {
+    return new BooleanValue(n.nodeName == this.name);
+  }
+};
+
+function TokenExpr(m) {
+  this.value = m;
+}
+
+TokenExpr.prototype.evaluate = function() {
+  return new StringValue(this.value);
+};
+
+function LocationExpr() {
+  this.absolute = false;
+  this.steps = [];
+}
+
+LocationExpr.prototype.appendStep = function(s) {
+  var combinedStep = this._combineSteps(this.steps[this.steps.length-1], s);
+  if (combinedStep) {
+    this.steps[this.steps.length-1] = combinedStep;
+  } else {
+    this.steps.push(s);
+  }
+};
+
+LocationExpr.prototype.prependStep = function(s) {
+  var combinedStep = this._combineSteps(s, this.steps[0]);
+  if (combinedStep) {
+    this.steps[0] = combinedStep;
+  } else {
+    this.steps.unshift(s);
+  }
+};
+
+// DGF try to combine two steps into one step (perf enhancement)
+LocationExpr.prototype._combineSteps = function(prevStep, nextStep) {
+  if (!prevStep){ 
+      return null;
+  }
+  if (!nextStep) {
+      return null;
+  }
+  var hasPredicates = (prevStep.predicates && prevStep.predicates.length > 0);
+  if (prevStep.nodetest instanceof NodeTestAny && !hasPredicates) {
+    // maybe suitable to be combined
+    if (prevStep.axis == xpathAxis.DESCENDANT_OR_SELF) {
+      if (nextStep.axis == xpathAxis.CHILD) {
+        nextStep.axis = xpathAxis.DESCENDANT;
+        return nextStep;
+      } else if (nextStep.axis == xpathAxis.SELF) {
+        nextStep.axis = xpathAxis.DESCENDANT_OR_SELF;
+        return nextStep;
+      }
+    } else if (prevStep.axis == xpathAxis.DESCENDANT) {
+      if (nextStep.axis == xpathAxis.SELF) {
+        nextStep.axis = xpathAxis.DESCENDANT;
+        return nextStep;
+      }
+    }
+  }
+  return null;
+};
+
+
+function xPathStep(nodes, steps, step, input, ctx) {
+  var s = steps[step];
+  var ctx2 = ctx.clone(input);
+  var nodelist = s.evaluate(ctx2).nodeSetValue();
+
+  for (var i = 0; i < nodelist.length; ++i) {
+    if (step == steps.length - 1) {
+      nodes.push(nodelist[i]);
+    } else {
+      xPathStep(nodes, steps, step + 1, nodelist[i], ctx);
+    }
+  }
+}
+
+LocationExpr.prototype.evaluate = function(ctx) {
+  var start;
+  if (this.absolute) {
+    start = ctx.root;
+
+  } else {
+    start = ctx.node;
+  }
+
+  var nodes = [];
+  xPathStep(nodes, this.steps, 0, start, ctx);
+  return new NodeSetValue(nodes);
+};
+
+
+function StepExpr(axis, nodetest, opt_predicate) {
+  this.axis = axis;
+  this.nodetest = nodetest;
+  this.predicate = opt_predicate || [];
+}
+
+StepExpr.prototype.appendPredicate = function(p) {
+  this.predicate.push(p);
+};
+
+// Local utility functions that are used by the lexer or parser.
+
+function xpathCollectDescendants(nodelist, node, opt_tagName) {
+  if (opt_tagName && node.getElementsByTagName) {
+    copyArray(nodelist, node.getElementsByTagName(opt_tagName));
+    return;
+  }
+  for (var n = node.firstChild; n; n = n.nextSibling) {
+    nodelist.push(n);
+    xpathCollectDescendants(nodelist, n);
+  }
+}
+
+// DGF extract a tag name suitable for getElementsByTagName
+function xpathExtractTagNameFromNodeTest(nodetest) {
+  if (nodetest instanceof NodeTestName) {
+    return nodetest.name;
+  } else if (nodetest instanceof NodeTestAny || nodetest instanceof NodeTestElementOrAttribute) {
+    return "*";
+  }
+}
+
+function xpathCollectDescendantsReverse(nodelist, node) {
+  for (var n = node.lastChild; n; n = n.previousSibling) {
+    nodelist.push(n);
+    xpathCollectDescendantsReverse(nodelist, n);
+  }
+}
+
+StepExpr.prototype.evaluate = function(ctx) {
+  var input = ctx.node;
+  var nodelist = [];
+  var skipNodeTest = false;
+  var n, nn, i, nodelist0, tagName;
+
+  if (this.nodetest instanceof NodeTestAny) {
+    skipNodeTest = true;
+  }
+
+  // NOTE(mesch): When this was a switch() statement, it didn't work
+  // in Safari/2.0. Not sure why though; it resulted in the JavaScript
+  // console output "undefined" (without any line number or so).
+
+  if (this.axis ==  xpathAxis.ANCESTOR_OR_SELF) {
+    nodelist.push(input);
+    for (n = input.parentNode; n; n = n.parentNode) {
+      nodelist.push(n);
+    }
+
+  } else if (this.axis == xpathAxis.ANCESTOR) {
+    for (n = input.parentNode; n; n = n.parentNode) {
+      nodelist.push(n);
+    }
+
+  } else if (this.axis == xpathAxis.ATTRIBUTE) {
+    if (ctx.ignoreAttributesWithoutValue) {
+      copyArrayIgnoringAttributesWithoutValue(nodelist, input.attributes);
+    }
+    else {
+      copyArray(nodelist, input.attributes);
+    }
+
+  } else if (this.axis == xpathAxis.CHILD) {
+    copyArray(nodelist, input.childNodes);
+
+  } else if (this.axis == xpathAxis.DESCENDANT_OR_SELF) {
+    if (this.nodetest.evaluate(ctx).booleanValue()) {
+      nodelist.push(input);
+    }
+    tagName = xpathExtractTagNameFromNodeTest(this.nodetest);
+    xpathCollectDescendants(nodelist, input, tagName);
+    if (tagName){ 
+        skipNodeTest = true;
+    }
+
+  } else if (this.axis == xpathAxis.DESCENDANT) {
+    tagName = xpathExtractTagNameFromNodeTest(this.nodetest);
+    xpathCollectDescendants(nodelist, input, tagName);
+    if (tagName) {
+        skipNodeTest = true;
+    }
+
+  } else if (this.axis == xpathAxis.FOLLOWING) {
+    for (n = input; n; n = n.parentNode) {
+      for (nn = n.nextSibling; nn; nn = nn.nextSibling) {
+        nodelist.push(nn);
+        xpathCollectDescendants(nodelist, nn);
+      }
+    }
+
+  } else if (this.axis == xpathAxis.FOLLOWING_SIBLING) {
+    for (n = input.nextSibling; n; n = n.nextSibling) {
+      nodelist.push(n);
+    }
+
+  } else if (this.axis == xpathAxis.NAMESPACE) {
+    console.warn('not implemented: axis namespace');
+
+  } else if (this.axis == xpathAxis.PARENT) {
+    if (input.parentNode) {
+      nodelist.push(input.parentNode);
+    }
+
+  } else if (this.axis == xpathAxis.PRECEDING) {
+    for (n = input; n; n = n.parentNode) {
+      for (nn = n.previousSibling; nn; nn = nn.previousSibling) {
+        nodelist.push(nn);
+        xpathCollectDescendantsReverse(nodelist, nn);
+      }
+    }
+
+  } else if (this.axis == xpathAxis.PRECEDING_SIBLING) {
+    for (n = input.previousSibling; n; n = n.previousSibling) {
+      nodelist.push(n);
+    }
+
+  } else if (this.axis == xpathAxis.SELF) {
+    nodelist.push(input);
+
+  } else {
+    throw 'ERROR -- NO SUCH AXIS: ' + this.axis;
+  }
+
+  if (!skipNodeTest) {
+    // process node test
+    nodelist0 = nodelist;
+    nodelist = [];
+    for (i = 0; i < nodelist0.length; ++i) {
+      n = nodelist0[i];
+      if (this.nodetest.evaluate(ctx.clone(n, i, nodelist0)).booleanValue()) {
+        nodelist.push(n);
+      }
+    }
+  }
+
+  // process predicates
+  for (i = 0; i < this.predicate.length; ++i) {
+    nodelist0 = nodelist;
+    nodelist = [];
+    for (var ii = 0; ii < nodelist0.length; ++ii) {
+      n = nodelist0[ii];
+      if (this.predicate[i].evaluate(ctx.clone(n, ii, nodelist0)).booleanValue()) {
+        nodelist.push(n);
+      }
+    }
+  }
+
+  return new NodeSetValue(nodelist);
+};
+
+function PredicateExpr(expr) {
+  this.expr = expr;
+}
+
+PredicateExpr.prototype.evaluate = function(ctx) {
+  var v = this.expr.evaluate(ctx);
+  if (v.type == 'number') {
+    // NOTE(mesch): Internally, position is represented starting with
+    // 0, however in XPath position starts with 1. See functions
+    // position() and last().
+    return new BooleanValue(ctx.position == v.numberValue() - 1);
+  } else {
+    return new BooleanValue(v.booleanValue());
+  }
+};
+
+function FunctionCallExpr(name) {
+  this.name = name;
+  this.args = [];
+}
+
+FunctionCallExpr.prototype.appendArg = function(arg) {
+  this.args.push(arg);
+};
+
+FunctionCallExpr.prototype.evaluate = function(ctx) {
+  var fn = '' + this.name.value;
+  var f = this.xpathfunctions[fn];
+  if (f) {
+    return f.call(this, ctx);
+  } else {
+    xpathLog('XPath NO SUCH FUNCTION ' + fn);
+    return new BooleanValue(false);
+  }
+};
+
+FunctionCallExpr.prototype.xpathfunctions = {
+  'last': function(ctx) {
+    assert(this.args.length === 0);
+    // NOTE(mesch): XPath position starts at 1.
+    return new NumberValue(ctx.contextSize());
+  },
+
+  'position': function(ctx) {
+    assert(this.args.length === 0);
+    // NOTE(mesch): XPath position starts at 1.
+    return new NumberValue(ctx.position + 1);
+  },
+
+  'count': function(ctx) {
+    assert(this.args.length == 1);
+    var v = this.args[0].evaluate(ctx);
+    return new NumberValue(v.nodeSetValue().length);
+  },
+
+  'id': function(ctx) {
+    assert(this.args.length == 1);
+    var e = this.args[0].evaluate(ctx);
+    var ret = [];
+    var ids, i, ii, v, n;
+    if (e.type == 'node-set') {
+      ids = [];
+      var en = e.nodeSetValue();
+      for (i = 0; i < en.length; ++i) {
+        v = xmlValue(en[i]).split(/\s+/);
+        for (ii = 0; ii < v.length; ++ii) {
+          ids.push(v[ii]);
+        }
+      }
+    } else {
+      ids = e.stringValue().split(/\s+/);
+    }
+    var d = ctx.root;
+    for (i = 0; i < ids.length; ++i) {
+      n = d.getElementById(ids[i]);
+      if (n) {
+        ret.push(n);
+      }
+    }
+    return new NodeSetValue(ret);
+  },
+
+  'local-name': function(ctx) {
+    console.warn('not implmented yet: XPath function local-name()');
+  },
+
+  'namespace-uri': function(ctx) {
+    console.warn('not implmented yet: XPath function namespace-uri()');
+  },
+
+  'name': function(ctx) {
+    assert(this.args.length == 1 || this.args.length === 0);
+    var n;
+    if (this.args.length === 0) {
+      n = [ ctx.node ];
+    } else {
+      n = this.args[0].evaluate(ctx).nodeSetValue();
+    }
+
+    if (n.length === 0) {
+      return new StringValue('');
+    } else {
+      return new StringValue(n[0].nodeName);
+    }
+  },
+
+  'string':  function(ctx) {
+    assert(this.args.length == 1 || this.args.length === 0);
+    if (this.args.length === 0) {
+      return new StringValue(new NodeSetValue([ ctx.node ]).stringValue());
+    } else {
+      return new StringValue(this.args[0].evaluate(ctx).stringValue());
+    }
+  },
+
+  'concat': function(ctx) {
+    var ret = '';
+    for (var i = 0; i < this.args.length; ++i) {
+      ret += this.args[i].evaluate(ctx).stringValue();
+    }
+    return new StringValue(ret);
+  },
+
+  'starts-with': function(ctx) {
+    assert(this.args.length == 2);
+    var s0 = this.args[0].evaluate(ctx).stringValue();
+    var s1 = this.args[1].evaluate(ctx).stringValue();
+    return new BooleanValue(s0.indexOf(s1) === 0);
+  },
+
+  'contains': function(ctx) {
+    assert(this.args.length == 2);
+    var s0 = this.args[0].evaluate(ctx).stringValue();
+    var s1 = this.args[1].evaluate(ctx).stringValue();
+    return new BooleanValue(s0.indexOf(s1) != -1);
+  },
+
+  'substring-before': function(ctx) {
+    assert(this.args.length == 2);
+    var s0 = this.args[0].evaluate(ctx).stringValue();
+    var s1 = this.args[1].evaluate(ctx).stringValue();
+    var i = s0.indexOf(s1);
+    var ret;
+    if (i == -1) {
+      ret = '';
+    } else {
+      ret = s0.substr(0,i);
+    }
+    return new StringValue(ret);
+  },
+
+  'substring-after': function(ctx) {
+    assert(this.args.length == 2);
+    var s0 = this.args[0].evaluate(ctx).stringValue();
+    var s1 = this.args[1].evaluate(ctx).stringValue();
+    var i = s0.indexOf(s1);
+    var ret;
+    if (i == -1) {
+      ret = '';
+    } else {
+      ret = s0.substr(i + s1.length);
+    }
+    return new StringValue(ret);
+  },
+
+  'substring': function(ctx) {
+    // NOTE: XPath defines the position of the first character in a
+    // string to be 1, in JavaScript this is 0 ([XPATH] Section 4.2).
+    assert(this.args.length == 2 || this.args.length == 3);
+    var s0 = this.args[0].evaluate(ctx).stringValue();
+    var s1 = this.args[1].evaluate(ctx).numberValue();
+    var ret, i0, i1, i2, s2;
+    if (this.args.length == 2) {
+      i1 = Math.max(0, Math.round(s1) - 1);
+      ret = s0.substr(i1);
+
+    } else {
+      s2 = this.args[2].evaluate(ctx).numberValue();
+      i0 = Math.round(s1) - 1;
+      i1 = Math.max(0, i0);
+      i2 = Math.round(s2) - Math.max(0, -i0);
+      ret = s0.substr(i1, i2);
+    }
+    return new StringValue(ret);
+  },
+
+  'string-length': function(ctx) {
+    var s;
+    if (this.args.length > 0) {
+      s = this.args[0].evaluate(ctx).stringValue();
+    } else {
+      s = new NodeSetValue([ ctx.node ]).stringValue();
+    }
+    return new NumberValue(s.length);
+  },
+
+  'normalize-space': function(ctx) {
+    var s;
+    if (this.args.length > 0) {
+      s = this.args[0].evaluate(ctx).stringValue();
+    } else {
+      s = new NodeSetValue([ ctx.node ]).stringValue();
+    }
+    s = s.replace(/^\s*/,'').replace(/\s*$/,'').replace(/\s+/g, ' ');
+    return new StringValue(s);
+  },
+
+  'translate': function(ctx) {
+    assert(this.args.length == 3);
+    var s0 = this.args[0].evaluate(ctx).stringValue();
+    var s1 = this.args[1].evaluate(ctx).stringValue();
+    var s2 = this.args[2].evaluate(ctx).stringValue();
+
+    for (var i = 0; i < s1.length; ++i) {
+      s0 = s0.replace(new RegExp(s1.charAt(i), 'g'), s2.charAt(i));
+    }
+    return new StringValue(s0);
+  },
+
+  'boolean': function(ctx) {
+    assert(this.args.length == 1);
+    return new BooleanValue(this.args[0].evaluate(ctx).booleanValue());
+  },
+
+  'not': function(ctx) {
+    assert(this.args.length == 1);
+    var ret = !this.args[0].evaluate(ctx).booleanValue();
+    return new BooleanValue(ret);
+  },
+
+  'true': function(ctx) {
+    assert(this.args.length === 0);
+    return new BooleanValue(true);
+  },
+
+  'false': function(ctx) {
+    assert(this.args.length === 0);
+    return new BooleanValue(false);
+  },
+
+  'lang': function(ctx) {
+    assert(this.args.length == 1);
+    var lang = this.args[0].evaluate(ctx).stringValue();
+    var xmllang;
+    var n = ctx.node;
+    while (n && n != n.parentNode /* just in case ... */) {
+      xmllang = n.getAttribute('xml:lang');
+      if (xmllang) {
+        break;
+      }
+      n = n.parentNode;
+    }
+    if (!xmllang) {
+      return new BooleanValue(false);
+    } else {
+      var re = new RegExp('^' + lang + '$', 'i');
+      return new BooleanValue(xmllang.match(re) ||
+                              xmllang.replace(/_.*$/,'').match(re));
+    }
+  },
+
+  'number': function(ctx) {
+    assert(this.args.length == 1 || this.args.length === 0);
+
+    if (this.args.length == 1) {
+      return new NumberValue(this.args[0].evaluate(ctx).numberValue());
+    } else {
+      return new NumberValue(new NodeSetValue([ ctx.node ]).numberValue());
+    }
+  },
+
+  'sum': function(ctx) {
+    assert(this.args.length == 1);
+    var n = this.args[0].evaluate(ctx).nodeSetValue();
+    var sum = 0;
+    for (var i = 0; i < n.length; ++i) {
+      sum += xmlValue(n[i]) - 0;
+    }
+    return new NumberValue(sum);
+  },
+
+  'floor': function(ctx) {
+    assert(this.args.length == 1);
+    var num = this.args[0].evaluate(ctx).numberValue();
+    return new NumberValue(Math.floor(num));
+  },
+
+  'ceiling': function(ctx) {
+    assert(this.args.length == 1);
+    var num = this.args[0].evaluate(ctx).numberValue();
+    return new NumberValue(Math.ceil(num));
+  },
+
+  'round': function(ctx) {
+    assert(this.args.length == 1);
+    var num = this.args[0].evaluate(ctx).numberValue();
+    return new NumberValue(Math.round(num));
+  },
+
+  // TODO(mesch): The following functions are custom. There is a
+  // standard that defines how to add functions, which should be
+  // applied here.
+
+  'ext-join': function(ctx) {
+    assert(this.args.length == 2);
+    var nodes = this.args[0].evaluate(ctx).nodeSetValue();
+    var delim = this.args[1].evaluate(ctx).stringValue();
+    var ret = '';
+    for (var i = 0; i < nodes.length; ++i) {
+      if (ret) {
+        ret += delim;
+      }
+      ret += xmlValue(nodes[i]);
+    }
+    return new StringValue(ret);
+  },
+
+  // ext-if() evaluates and returns its second argument, if the
+  // boolean value of its first argument is true, otherwise it
+  // evaluates and returns its third argument.
+
+  'ext-if': function(ctx) {
+    assert(this.args.length == 3);
+    if (this.args[0].evaluate(ctx).booleanValue()) {
+      return this.args[1].evaluate(ctx);
+    } else {
+      return this.args[2].evaluate(ctx);
+    }
+  },
+
+  // ext-cardinal() evaluates its single argument as a number, and
+  // returns the current node that many times. It can be used in the
+  // select attribute to iterate over an integer range.
+
+  'ext-cardinal': function(ctx) {
+    assert(this.args.length >= 1);
+    var c = this.args[0].evaluate(ctx).numberValue();
+    var ret = [];
+    for (var i = 0; i < c; ++i) {
+      ret.push(ctx.node);
+    }
+    return new NodeSetValue(ret);
+  }
+};
+
+function UnionExpr(expr1, expr2) {
+  this.expr1 = expr1;
+  this.expr2 = expr2;
+}
+
+UnionExpr.prototype.evaluate = function(ctx) {
+  var nodes1 = this.expr1.evaluate(ctx).nodeSetValue();
+  var nodes2 = this.expr2.evaluate(ctx).nodeSetValue();
+  var I1 = nodes1.length;
+  for (var i2 = 0; i2 < nodes2.length; ++i2) {
+    var n = nodes2[i2];
+    var inBoth = false;
+    for (var i1 = 0; i1 < I1; ++i1) {
+      if (nodes1[i1] == n) {
+        inBoth = true;
+        i1 = I1; // break inner loop
+      }
+    }
+    if (!inBoth) {
+      nodes1.push(n);
+    }
+  }
+  return new NodeSetValue(nodes1);
+};
+
+function PathExpr(filter, rel) {
+  this.filter = filter;
+  this.rel = rel;
+}
+
+PathExpr.prototype.evaluate = function(ctx) {
+  var nodes = this.filter.evaluate(ctx).nodeSetValue();
+  var nodes1 = [];
+  for (var i = 0; i < nodes.length; ++i) {
+    var nodes0 = this.rel.evaluate(ctx.clone(nodes[i], i, nodes)).nodeSetValue();
+    for (var ii = 0; ii < nodes0.length; ++ii) {
+      nodes1.push(nodes0[ii]);
+    }
+  }
+  return new NodeSetValue(nodes1);
+};
+
+function FilterExpr(expr, predicate) {
+  this.expr = expr;
+  this.predicate = predicate;
+}
+
+FilterExpr.prototype.evaluate = function(ctx) {
+  var nodes = this.expr.evaluate(ctx).nodeSetValue();
+  for (var i = 0; i < this.predicate.length; ++i) {
+    var nodes0 = nodes;
+    nodes = [];
+    for (var j = 0; j < nodes0.length; ++j) {
+      var n = nodes0[j];
+      if (this.predicate[i].evaluate(ctx.clone(n, j, nodes0)).booleanValue()) {
+        nodes.push(n);
+      }
+    }
+  }
+
+  return new NodeSetValue(nodes);
+};
+
+function UnaryMinusExpr(expr) {
+  this.expr = expr;
+}
+
+UnaryMinusExpr.prototype.evaluate = function(ctx) {
+  return new NumberValue(-this.expr.evaluate(ctx).numberValue());
+};
+
+function BinaryExpr(expr1, op, expr2) {
+  this.expr1 = expr1;
+  this.expr2 = expr2;
+  this.op = op;
+}
+
+BinaryExpr.prototype.evaluate = function(ctx) {
+  var ret;
+  switch (this.op.value) {
+    case 'or':
+      ret = new BooleanValue(this.expr1.evaluate(ctx).booleanValue() ||
+                             this.expr2.evaluate(ctx).booleanValue());
+      break;
+
+    case 'and':
+      ret = new BooleanValue(this.expr1.evaluate(ctx).booleanValue() &&
+                             this.expr2.evaluate(ctx).booleanValue());
+      break;
+
+    case '+':
+      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() +
+                            this.expr2.evaluate(ctx).numberValue());
+      break;
+
+    case '-':
+      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() -
+                            this.expr2.evaluate(ctx).numberValue());
+      break;
+
+    case '*':
+      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() *
+                            this.expr2.evaluate(ctx).numberValue());
+      break;
+
+    case 'mod':
+      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() %
+                            this.expr2.evaluate(ctx).numberValue());
+      break;
+
+    case 'div':
+      ret = new NumberValue(this.expr1.evaluate(ctx).numberValue() /
+                            this.expr2.evaluate(ctx).numberValue());
+      break;
+
+    case '=':
+      ret = this.compare(ctx, function(x1, x2) { return x1 == x2; });
+      break;
+
+    case '!=':
+      ret = this.compare(ctx, function(x1, x2) { return x1 != x2; });
+      break;
+
+    case '<':
+      ret = this.compare(ctx, function(x1, x2) { return x1 < x2; });
+      break;
+
+    case '<=':
+      ret = this.compare(ctx, function(x1, x2) { return x1 <= x2; });
+      break;
+
+    case '>':
+      ret = this.compare(ctx, function(x1, x2) { return x1 > x2; });
+      break;
+
+    case '>=':
+      ret = this.compare(ctx, function(x1, x2) { return x1 >= x2; });
+      break;
+
+    default:
+      console.warn('BinaryExpr.evaluate: ' + this.op.value);
+  }
+  return ret;
+};
+
+BinaryExpr.prototype.compare = function(ctx, cmp) {
+  var v1 = this.expr1.evaluate(ctx);
+  var v2 = this.expr2.evaluate(ctx);
+  var i, n, s, n1, n2, i1, i2, nn;
+
+  var ret;
+  if (v1.type == 'node-set' && v2.type == 'node-set') {
+    n1 = v1.nodeSetValue();
+    n2 = v2.nodeSetValue();
+    ret = false;
+    for (i1 = 0; i1 < n1.length; ++i1) {
+      for (i2 = 0; i2 < n2.length; ++i2) {
+        if (cmp(xmlValue(n1[i1]), xmlValue(n2[i2]))) {
+          ret = true;
+          // Break outer loop. Labels confuse the jscompiler and we
+          // don't use them.
+          i2 = n2.length;
+          i1 = n1.length;
+        }
+      }
+    }
+
+  } else if (v1.type == 'node-set' || v2.type == 'node-set') {
+
+    if (v1.type == 'number') {
+      s = v1.numberValue();
+      n = v2.nodeSetValue();
+
+      ret = false;
+      for (i = 0;  i < n.length; ++i) {
+        nn = xmlValue(n[i]) - 0;
+        if (cmp(s, nn)) {
+          ret = true;
+          break;
+        }
+      }
+
+    } else if (v2.type == 'number') {
+      n = v1.nodeSetValue();
+      s = v2.numberValue();
+
+      ret = false;
+      for (i = 0;  i < n.length; ++i) {
+        nn = xmlValue(n[i]) - 0;
+        if (cmp(nn, s)) {
+          ret = true;
+          break;
+        }
+      }
+
+    } else if (v1.type == 'string') {
+      s = v1.stringValue();
+      n = v2.nodeSetValue();
+
+      ret = false;
+      for (i = 0;  i < n.length; ++i) {
+        nn = xmlValue(n[i]);
+        if (cmp(s, nn)) {
+          ret = true;
+          break;
+        }
+      }
+
+    } else if (v2.type == 'string') {
+      n = v1.nodeSetValue();
+      s = v2.stringValue();
+
+      ret = false;
+      for (i = 0;  i < n.length; ++i) {
+        nn = xmlValue(n[i]);
+        if (cmp(nn, s)) {
+          ret = true;
+          break;
+        }
+      }
+
+    } else {
+      ret = cmp(v1.booleanValue(), v2.booleanValue());
+    }
+
+  } else if (v1.type == 'boolean' || v2.type == 'boolean') {
+    ret = cmp(v1.booleanValue(), v2.booleanValue());
+
+  } else if (v1.type == 'number' || v2.type == 'number') {
+    ret = cmp(v1.numberValue(), v2.numberValue());
+
+  } else {
+    ret = cmp(v1.stringValue(), v2.stringValue());
+  }
+
+  return new BooleanValue(ret);
+};
+
+function LiteralExpr(value) {
+  this.value = value;
+}
+
+LiteralExpr.prototype.evaluate = function(ctx) {
+  return new StringValue(this.value);
+};
+
+function NumberExpr(value) {
+  this.value = value;
+}
+
+NumberExpr.prototype.evaluate = function(ctx) {
+  return new NumberValue(this.value);
+};
+
+function VariableExpr(name) {
+  this.name = name;
+}
+
+VariableExpr.prototype.evaluate = function(ctx) {
+  return ctx.getVariable(this.name);
+};
+
+// Factory functions for semantic values (i.e. Expressions) of the
+// productions in the grammar. When a production is matched to reduce
+// the current parse state stack, the function is called with the
+// semantic values of the matched elements as arguments, and returns
+// another semantic value. The semantic value is a node of the parse
+// tree, an expression object with an evaluate() method that evaluates the
+// expression in an actual context. These factory functions are used
+// in the specification of the grammar rules, below.
+
+function makeTokenExpr(m) {
+  return new TokenExpr(m);
+}
+
+function passExpr(e) {
+  return e;
+}
+
+function makeAbbrevStep(abbrev) {
+  switch (abbrev) {
+  case '//':
+    return new StepExpr('descendant-or-self', new NodeTestAny());
+
+  case '.':
+    return new StepExpr('self', new NodeTestAny());
+
+  case '..':
+    return new StepExpr('parent', new NodeTestAny());
+  }
+}
+
+function makeLocationExpr1(slash, rel) {
+  rel.absolute = true;
+  return rel;
+}
+
+function makeLocationExpr2(dslash, rel) {
+  rel.absolute = true;
+  rel.prependStep(makeAbbrevStep(dslash.value));
+  return rel;
+}
+
+function makeLocationExpr3(slash) {
+  var ret = new LocationExpr();
+  ret.appendStep(makeAbbrevStep('.'));
+  ret.absolute = true;
+  return ret;
+}
+
+function makeLocationExpr4(dslash) {
+  var ret = new LocationExpr();
+  ret.absolute = true;
+  ret.appendStep(makeAbbrevStep(dslash.value));
+  return ret;
+}
+
+function makeLocationExpr5(step) {
+  var ret = new LocationExpr();
+  ret.appendStep(step);
+  return ret;
+}
+
+function makeLocationExpr6(rel, slash, step) {
+  rel.appendStep(step);
+  return rel;
+}
+
+function makeLocationExpr7(rel, dslash, step) {
+  rel.appendStep(makeAbbrevStep(dslash.value));
+  rel.appendStep(step);
+  return rel;
+}
+
+function makeStepExpr1(dot) {
+  return makeAbbrevStep(dot.value);
+}
+
+function makeStepExpr2(ddot) {
+  return makeAbbrevStep(ddot.value);
+}
+
+function makeStepExpr3(axisname, axis, nodetest) {
+  return new StepExpr(axisname.value, nodetest);
+}
+
+function makeStepExpr4(at, nodetest) {
+  return new StepExpr('attribute', nodetest);
+}
+
+function makeStepExpr5(nodetest) {
+  return new StepExpr('child', nodetest);
+}
+
+function makeStepExpr6(step, predicate) {
+  step.appendPredicate(predicate);
+  return step;
+}
+
+
+function makeNodeTestExpr1(asterisk) {
+  return new NodeTestElementOrAttribute();
+}
+
+function makeNodeTestExpr2(ncname, colon, asterisk) {
+  return new NodeTestNC(ncname.value);
+}
+
+function makeNodeTestExpr3(qname) {
+  return new NodeTestName(qname.value);
+}
+
+function makeNodeTestExpr4(typeo, parenc) {
+  var type = typeo.value.replace(/\s*\($/, '');
+  switch(type) {
+  case 'node':
+    return new NodeTestAny();
+
+  case 'text':
+    return new NodeTestText();
+
+  case 'comment':
+    return new NodeTestComment();
+
+  case 'processing-instruction':
+    return new NodeTestPI('');
+  }
+}
+
+function makeNodeTestExpr5(typeo, target, parenc) {
+  var type = typeo.replace(/\s*\($/, '');
+  if (type != 'processing-instruction') {
+    throw type;
+  }
+  return new NodeTestPI(target.value);
+}
+
+function makePredicateExpr(pareno, expr, parenc) {
+  return new PredicateExpr(expr);
+}
+
+function makePrimaryExpr(pareno, expr, parenc) {
+  return expr;
+}
+
+function makeFunctionCallExpr1(name, pareno, parenc) {
+  return new FunctionCallExpr(name);
+}
+
+function makeFunctionCallExpr2(name, pareno, arg1, args, parenc) {
+  var ret = new FunctionCallExpr(name);
+  ret.appendArg(arg1);
+  for (var i = 0; i < args.length; ++i) {
+    ret.appendArg(args[i]);
+  }
+  return ret;
+}
+
+function makeArgumentExpr(comma, expr) {
+  return expr;
+}
+
+function makeUnionExpr(expr1, pipe, expr2) {
+  return new UnionExpr(expr1, expr2);
+}
+
+function makePathExpr1(filter, slash, rel) {
+  return new PathExpr(filter, rel);
+}
+
+function makePathExpr2(filter, dslash, rel) {
+  rel.prependStep(makeAbbrevStep(dslash.value));
+  return new PathExpr(filter, rel);
+}
+
+function makeFilterExpr(expr, predicates) {
+  if (predicates.length > 0) {
+    return new FilterExpr(expr, predicates);
+  } else {
+    return expr;
+  }
+}
+
+function makeUnaryMinusExpr(minus, expr) {
+  return new UnaryMinusExpr(expr);
+}
+
+function makeBinaryExpr(expr1, op, expr2) {
+  return new BinaryExpr(expr1, op, expr2);
+}
+
+function makeLiteralExpr(token) {
+  // remove quotes from the parsed value:
+  var value = token.value.substring(1, token.value.length - 1);
+  return new LiteralExpr(value);
+}
+
+function makeNumberExpr(token) {
+  return new NumberExpr(token.value);
+}
+
+function makeVariableReference(dollar, name) {
+  return new VariableExpr(name.value);
+}
+
+// Used before parsing for optimization of common simple cases. See
+// the begin of xpathParse() for which they are.
+function makeSimpleExpr(expr) {
+    var a,b,c;
+  if (expr.charAt(0) == '$') {
+    return new VariableExpr(expr.substr(1));
+  } else if (expr.charAt(0) == '@') {
+    a = new NodeTestName(expr.substr(1));
+    b = new StepExpr('attribute', a);
+    c = new LocationExpr();
+    c.appendStep(b);
+    return c;
+  } else if (expr.match(/^[0-9]+$/)) {
+    return new NumberExpr(expr);
+  } else {
+    a = new NodeTestName(expr);
+    b = new StepExpr('child', a);
+    c = new LocationExpr();
+    c.appendStep(b);
+    return c;
+  }
+}
+
+function makeSimpleExpr2(expr) {
+  var steps = stringSplit(expr, '/');
+  var c = new LocationExpr();
+  for (var i = 0; i < steps.length; ++i) {
+    var a = new NodeTestName(steps[i]);
+    var b = new StepExpr('child', a);
+    c.appendStep(b);
+  }
+  return c;
+}
+
+// The productions of the grammar. Columns of the table:
+//
+// - target nonterminal,
+// - pattern,
+// - precedence,
+// - semantic value factory
+//
+// The semantic value factory is a function that receives parse tree
+// nodes from the stack frames of the matched symbols as arguments and
+// returns an a node of the parse tree. The node is stored in the top
+// stack frame along with the target object of the rule. The node in
+// the parse tree is an expression object that has an evaluate() method
+// and thus evaluates XPath expressions.
+//
+// The precedence is used to decide between reducing and shifting by
+// comparing the precendence of the rule that is candidate for
+// reducing with the precedence of the look ahead token. Precedence of
+// -1 means that the precedence of the tokens in the pattern is used
+// instead. TODO: It shouldn't be necessary to explicitly assign
+// precedences to rules.
+
+// DGF As it stands, these precedences are purely empirical; we're
+// not sure they can be made to be consistent at all.
+
+var xpathGrammarRules =
+  [
+   [ XPathLocationPath, [ XPathRelativeLocationPath ], 18,
+     passExpr ],
+   [ XPathLocationPath, [ XPathAbsoluteLocationPath ], 18,
+     passExpr ],
+
+   [ XPathAbsoluteLocationPath, [ TOK_SLASH, XPathRelativeLocationPath ], 18,
+     makeLocationExpr1 ],
+   [ XPathAbsoluteLocationPath, [ TOK_DSLASH, XPathRelativeLocationPath ], 18,
+     makeLocationExpr2 ],
+
+   [ XPathAbsoluteLocationPath, [ TOK_SLASH ], 0,
+     makeLocationExpr3 ],
+   [ XPathAbsoluteLocationPath, [ TOK_DSLASH ], 0,
+     makeLocationExpr4 ],
+
+   [ XPathRelativeLocationPath, [ XPathStep ], 31,
+     makeLocationExpr5 ],
+   [ XPathRelativeLocationPath,
+     [ XPathRelativeLocationPath, TOK_SLASH, XPathStep ], 31,
+     makeLocationExpr6 ],
+   [ XPathRelativeLocationPath,
+     [ XPathRelativeLocationPath, TOK_DSLASH, XPathStep ], 31,
+     makeLocationExpr7 ],
+
+   [ XPathStep, [ TOK_DOT ], 33,
+     makeStepExpr1 ],
+   [ XPathStep, [ TOK_DDOT ], 33,
+     makeStepExpr2 ],
+   [ XPathStep,
+     [ TOK_AXISNAME, TOK_AXIS, XPathNodeTest ], 33,
+     makeStepExpr3 ],
+   [ XPathStep, [ TOK_AT, XPathNodeTest ], 33,
+     makeStepExpr4 ],
+   [ XPathStep, [ XPathNodeTest ], 33,
+     makeStepExpr5 ],
+   [ XPathStep, [ XPathStep, XPathPredicate ], 33,
+     makeStepExpr6 ],
+
+   [ XPathNodeTest, [ TOK_ASTERISK ], 33,
+     makeNodeTestExpr1 ],
+   [ XPathNodeTest, [ TOK_NCNAME, TOK_COLON, TOK_ASTERISK ], 33,
+     makeNodeTestExpr2 ],
+   [ XPathNodeTest, [ TOK_QNAME ], 33,
+     makeNodeTestExpr3 ],
+   [ XPathNodeTest, [ TOK_NODEO, TOK_PARENC ], 33,
+     makeNodeTestExpr4 ],
+   [ XPathNodeTest, [ TOK_NODEO, XPathLiteral, TOK_PARENC ], 33,
+     makeNodeTestExpr5 ],
+
+   [ XPathPredicate, [ TOK_BRACKO, XPathExpr, TOK_BRACKC ], 33,
+     makePredicateExpr ],
+
+   [ XPathPrimaryExpr, [ XPathVariableReference ], 33,
+     passExpr ],
+   [ XPathPrimaryExpr, [ TOK_PARENO, XPathExpr, TOK_PARENC ], 33,
+     makePrimaryExpr ],
+   [ XPathPrimaryExpr, [ XPathLiteral ], 30,
+     passExpr ],
+   [ XPathPrimaryExpr, [ XPathNumber ], 30,
+     passExpr ],
+   [ XPathPrimaryExpr, [ XPathFunctionCall ], 31,
+     passExpr ],
+
+   [ XPathFunctionCall, [ TOK_QNAME, TOK_PARENO, TOK_PARENC ], -1,
+     makeFunctionCallExpr1 ],
+   [ XPathFunctionCall,
+     [ TOK_QNAME, TOK_PARENO, XPathExpr, XPathArgumentRemainder, Q_MM,
+       TOK_PARENC ], -1,
+     makeFunctionCallExpr2 ],
+   [ XPathArgumentRemainder, [ TOK_COMMA, XPathExpr ], -1,
+     makeArgumentExpr ],
+
+   [ XPathUnionExpr, [ XPathPathExpr ], 20,
+     passExpr ],
+   [ XPathUnionExpr, [ XPathUnionExpr, TOK_PIPE, XPathPathExpr ], 20,
+     makeUnionExpr ],
+
+   [ XPathPathExpr, [ XPathLocationPath ], 20,
+     passExpr ],
+   [ XPathPathExpr, [ XPathFilterExpr ], 19,
+     passExpr ],
+   [ XPathPathExpr,
+     [ XPathFilterExpr, TOK_SLASH, XPathRelativeLocationPath ], 19,
+     makePathExpr1 ],
+   [ XPathPathExpr,
+     [ XPathFilterExpr, TOK_DSLASH, XPathRelativeLocationPath ], 19,
+     makePathExpr2 ],
+
+   [ XPathFilterExpr, [ XPathPrimaryExpr, XPathPredicate, Q_MM ], 31,
+     makeFilterExpr ],
+
+   [ XPathExpr, [ XPathPrimaryExpr ], 16,
+     passExpr ],
+   [ XPathExpr, [ XPathUnionExpr ], 16,
+     passExpr ],
+
+   [ XPathExpr, [ TOK_MINUS, XPathExpr ], -1,
+     makeUnaryMinusExpr ],
+
+   [ XPathExpr, [ XPathExpr, TOK_OR, XPathExpr ], -1,
+     makeBinaryExpr ],
+   [ XPathExpr, [ XPathExpr, TOK_AND, XPathExpr ], -1,
+     makeBinaryExpr ],
+
+   [ XPathExpr, [ XPathExpr, TOK_EQ, XPathExpr ], -1,
+     makeBinaryExpr ],
+   [ XPathExpr, [ XPathExpr, TOK_NEQ, XPathExpr ], -1,
+     makeBinaryExpr ],
+
+   [ XPathExpr, [ XPathExpr, TOK_LT, XPathExpr ], -1,
+     makeBinaryExpr ],
+   [ XPathExpr, [ XPathExpr, TOK_LE, XPathExpr ], -1,
+     makeBinaryExpr ],
+   [ XPathExpr, [ XPathExpr, TOK_GT, XPathExpr ], -1,
+     makeBinaryExpr ],
+   [ XPathExpr, [ XPathExpr, TOK_GE, XPathExpr ], -1,
+     makeBinaryExpr ],
+
+   [ XPathExpr, [ XPathExpr, TOK_PLUS, XPathExpr ], -1,
+     makeBinaryExpr, ASSOC_LEFT ],
+   [ XPathExpr, [ XPathExpr, TOK_MINUS, XPathExpr ], -1,
+     makeBinaryExpr, ASSOC_LEFT ],
+
+   [ XPathExpr, [ XPathExpr, TOK_ASTERISK, XPathExpr ], -1,
+     makeBinaryExpr, ASSOC_LEFT ],
+   [ XPathExpr, [ XPathExpr, TOK_DIV, XPathExpr ], -1,
+     makeBinaryExpr, ASSOC_LEFT ],
+   [ XPathExpr, [ XPathExpr, TOK_MOD, XPathExpr ], -1,
+     makeBinaryExpr, ASSOC_LEFT ],
+
+   [ XPathLiteral, [ TOK_LITERALQ ], -1,
+     makeLiteralExpr ],
+   [ XPathLiteral, [ TOK_LITERALQQ ], -1,
+     makeLiteralExpr ],
+
+   [ XPathNumber, [ TOK_NUMBER ], -1,
+     makeNumberExpr ],
+
+   [ XPathVariableReference, [ TOK_DOLLAR, TOK_QNAME ], 200,
+     makeVariableReference ]
+   ];
+
+// That function computes some optimizations of the above data
+// structures and will be called right here. It merely takes the
+// counter variables out of the global scope.
+
+
+// XPath expression evaluation context. An XPath context consists of a
+// DOM node, a list of DOM nodes that contains this node, a number
+// that represents the position of the single node in the list, and a
+// current set of variable bindings. (See XPath spec.)
+//
+// The interface of the expression context:
+//
+//   Constructor -- gets the node, its position, the node set it
+//   belongs to, and a parent context as arguments. The parent context
+//   is used to implement scoping rules for variables: if a variable
+//   is not found in the current context, it is looked for in the
+//   parent context, recursively. Except for node, all arguments have
+//   default values: default position is 0, default node set is the
+//   set that contains only the node, and the default parent is null.
+//
+//     Notice that position starts at 0 at the outside interface;
+//     inside XPath expressions this shows up as position()=1.
+//
+//   clone() -- creates a new context with the current context as
+//   parent. If passed as argument to clone(), the new context has a
+//   different node, position, or node set. What is not passed is
+//   inherited from the cloned context.
+//
+//   setVariable(name, expr) -- binds given XPath expression to the
+//   name.
+//
+//   getVariable(name) -- what the name says.
+//
+//   setNode(position) -- sets the context to the node at the given
+//   position. Needed to implement scoping rules for variables in
+//   XPath. (A variable is visible to all subsequent siblings, not
+//   only to its children.)
+//
+//   set/isCaseInsensitive -- specifies whether node name tests should
+//   be case sensitive.  If you're executing xpaths against a regular
+//   HTML DOM, you probably don't want case-sensitivity, because
+//   browsers tend to disagree about whether elements & attributes
+//   should be upper/lower case.  If you're running xpaths in an
+//   XSLT instance, you probably DO want case sensitivity, as per the
+//   XSL spec.
+
+function ExprContext(node, opt_position, opt_nodelist, opt_parent, opt_caseInsensitive, opt_ignoreAttributesWithoutValue) {
+  this.node = node;
+  this.position = opt_position || 0;
+  this.nodelist = opt_nodelist || [ node ];
+  this.variables = {};
+  this.parent = opt_parent || null;
+  this.caseInsensitive = opt_caseInsensitive || false;
+  this.ignoreAttributesWithoutValue = opt_ignoreAttributesWithoutValue || false;
+  if (opt_parent) {
+    this.root = opt_parent.root;
+  } else if (this.node.nodeType == DOM_DOCUMENT_NODE) {
+    // NOTE(mesch): DOM Spec stipulates that the ownerDocument of a
+    // document is null. Our root, however is the document that we are
+    // processing, so the initial context is created from its document
+    // node, which case we must handle here explcitly.
+    this.root = node;
+  } else {
+    this.root = node.ownerDocument;
+  }
+}
+
+ExprContext.prototype.clone = function(opt_node, opt_position, opt_nodelist) {
+  return new ExprContext(
+      opt_node || this.node,
+      typeof opt_position != 'undefined' ? opt_position : this.position,
+      opt_nodelist || this.nodelist, this, this.caseInsensitive,
+      this.ignoreAttributesWithoutValue);
+};
+
+ExprContext.prototype.setVariable = function(name, value) {
+  if (value instanceof StringValue || value instanceof BooleanValue || 
+    value instanceof NumberValue || value instanceof NodeSetValue) {
+    this.variables[name] = value;
+    return;
+  }
+  if ('true' === value) {
+    this.variables[name] = new BooleanValue(true);
+  } else if ('false' === value) {
+    this.variables[name] = new BooleanValue(false);
+  } else if (TOK_NUMBER.re.test(value)) {
+    this.variables[name] = new NumberValue(value);
+  } else {
+    // DGF What if it's null?
+    this.variables[name] = new StringValue(value);
+  }
+};
+
+ExprContext.prototype.getVariable = function(name) {
+  if (typeof this.variables[name] != 'undefined') {
+    return this.variables[name];
+
+  } else if (this.parent) {
+    return this.parent.getVariable(name);
+
+  } else {
+    return null;
+  }
+};
+
+ExprContext.prototype.setNode = function(position) {
+  this.node = this.nodelist[position];
+  this.position = position;
+};
+
+ExprContext.prototype.contextSize = function() {
+  return this.nodelist.length;
+};
+
+ExprContext.prototype.isCaseInsensitive = function() {
+  return this.caseInsensitive;
+};
+
+ExprContext.prototype.setCaseInsensitive = function(caseInsensitive) {
+  this.caseInsensitive = caseInsensitive;
+  return this.caseInsensitive;
+};
+
+ExprContext.prototype.isIgnoreAttributesWithoutValue = function() {
+  return this.ignoreAttributesWithoutValue;
+};
+
+ExprContext.prototype.setIgnoreAttributesWithoutValue = function(ignore) {
+   this.ignoreAttributesWithoutValue = ignore;
+   return ignore;
+};
+
+var xpathRules = [];
+
+function xpathParseInit() {
+  if (xpathRules.length) {
+    return;
+  }
+
+  // Some simple optimizations for the xpath expression parser: sort
+  // grammar rules descending by length, so that the longest match is
+  // first found.
+
+  xpathGrammarRules.sort(function(a,b) {
+    var la = a[1].length;
+    var lb = b[1].length;
+    if (la < lb) {
+      return 1;
+    } else if (la > lb) {
+      return -1;
+    } else {
+      return 0;
+    }
+  });
+
+  var k = 1;
+  for (var i = 0; i < xpathNonTerminals.length; ++i) {
+    xpathNonTerminals[i].key = k++;
+  }
+
+  for (i = 0; i < xpathTokenRules.length; ++i) {
+    xpathTokenRules[i].key = k++;
+  }
+
+  xpathLog('XPath parse INIT: ' + k + ' rules');
+
+  // Another slight optimization: sort the rules into bins according
+  // to the last element (observing quantifiers), so we can restrict
+  // the match against the stack to the subest of rules that match the
+  // top of the stack.
+  //
+  // TODO(mesch): What we actually want is to compute states as in
+  // bison, so that we don't have to do any explicit and iterated
+  // match against the stack.
+
+  function push_(array, position, element) {
+    if (!array[position]) {
+      array[position] = [];
+    }
+    array[position].push(element);
+  }
+
+  for (i = 0; i < xpathGrammarRules.length; ++i) {
+    var rule = xpathGrammarRules[i];
+    var pattern = rule[1];
+
+    for (var j = pattern.length - 1; j >= 0; --j) {
+      if (pattern[j] == Q_1M) {
+        push_(xpathRules, pattern[j-1].key, rule);
+        break;
+
+      } else if (pattern[j] == Q_MM || pattern[j] == Q_01) {
+        push_(xpathRules, pattern[j-1].key, rule);
+        --j;
+
+      } else {
+        push_(xpathRules, pattern[j].key, rule);
+        break;
+      }
+    }
+  }
+
+  xpathLog('XPath parse INIT: ' + xpathRules.length + ' rule bins');
+
+  var sum = 0;
+  mapExec(xpathRules, function(i) {
+    if (i) {
+      sum += i.length;
+    }
+  });
+
+  xpathLog('XPath parse INIT: ' + (sum / xpathRules.length) +
+           ' average bin size');
+}
+
+
+// Sorts by all order criteria defined. According to the JavaScript
+// spec ([ECMA] Section 11.8.5), the compare operators compare strings
+// as strings and numbers as numbers.
+//
+// NOTE: In browsers which do not follow the spec, this breaks only in
+// the case that numbers should be sorted as strings, which is very
+// uncommon.
+function xpathSortByKey(v1, v2) {
+  // NOTE: Sort key vectors of different length never occur in
+  // xsltSort.
+
+  for (var i = 0; i < v1.key.length; ++i) {
+    var o = v1.key[i].order == 'descending' ? -1 : 1;
+    if (v1.key[i].value > v2.key[i].value) {
+      return +1 * o;
+    } else if (v1.key[i].value < v2.key[i].value) {
+      return -1 * o;
+    }
+  }
+
+  return 0;
+}
+
+// Utility function to sort a list of nodes. Used by xsltSort() and
+// nxslSelect().
+function xpathSort(input, sort) {
+  if (sort.length === 0) {
+    return;
+  }
+
+  var sortlist = [], i;
+
+  for (i = 0; i < input.contextSize(); ++i) {
+    var node = input.nodelist[i];
+    var sortitem = { node: node, key: [] };
+    var context = input.clone(node, 0, [ node ]);
+
+    for (var j = 0; j < sort.length; ++j) {
+      var s = sort[j];
+      var value = s.expr.evaluate(context);
+
+      var evalue;
+      if (s.type == 'text') {
+        evalue = value.stringValue();
+      } else if (s.type == 'number') {
+        evalue = value.numberValue();
+      }
+      sortitem.key.push({ value: evalue, order: s.order });
+    }
+
+    // Make the sort stable by adding a lowest priority sort by
+    // id. This is very convenient and furthermore required by the
+    // spec ([XSLT] - Section 10 Sorting).
+    sortitem.key.push({ value: i, order: 'ascending' });
+
+    sortlist.push(sortitem);
+  }
+
+  sortlist.sort(xpathSortByKey);
+
+  var nodes = [];
+  for (i = 0; i < sortlist.length; ++i) {
+    nodes.push(sortlist[i].node);
+  }
+  input.nodelist = nodes;
+  input.setNode(0);
+}
+
+var xpathParseCache = {};
+
+function xpathCacheLookup(expr) {
+  return xpathParseCache[expr];
+}
+
+
+function xpathMatchStack(stack, pattern) {
+
+  // NOTE(mesch): The stack matches for variable cardinality are
+  // greedy but don't do backtracking. This would be an issue only
+  // with rules of the form A* A, i.e. with an element with variable
+  // cardinality followed by the same element. Since that doesn't
+  // occur in the grammar at hand, all matches on the stack are
+  // unambiguous.
+
+  var S = stack.length;
+  var P = pattern.length;
+  var p, s;
+  var match = [];
+  match.matchlength = 0;
+  var ds = 0;
+  var getExpr = function(m) { return m.expr; };
+  for (p = P - 1, s = S - 1; p >= 0 && s >= 0; --p, s -= ds) {
+    ds = 0;
+    var qmatch = [];
+    if (pattern[p] == Q_MM) {
+      p -= 1;
+      match.push(qmatch);
+      while (s - ds >= 0 && stack[s - ds].tag == pattern[p]) {
+        qmatch.push(stack[s - ds]);
+        ds += 1;
+        match.matchlength += 1;
+      }
+
+    } else if (pattern[p] == Q_01) {
+      p -= 1;
+      match.push(qmatch);
+      while (s - ds >= 0 && ds < 2 && stack[s - ds].tag == pattern[p]) {
+        qmatch.push(stack[s - ds]);
+        ds += 1;
+        match.matchlength += 1;
+      }
+
+    } else if (pattern[p] == Q_1M) {
+      p -= 1;
+      match.push(qmatch);
+      if (stack[s].tag == pattern[p]) {
+        while (s - ds >= 0 && stack[s - ds].tag == pattern[p]) {
+          qmatch.push(stack[s - ds]);
+          ds += 1;
+          match.matchlength += 1;
+        }
+      } else {
+        return [];
+      }
+
+    } else if (stack[s].tag == pattern[p]) {
+      match.push(stack[s]);
+      ds += 1;
+      match.matchlength += 1;
+
+    } else {
+      return [];
+    }
+
+    reverseInplace(qmatch);
+    qmatch.expr = mapExpr(qmatch, getExpr);
+  }
+
+  reverseInplace(match);
+
+  if (p == -1) {
+    return match;
+
+  } else {
+    return [];
+  }
+}
+
+function xpathTokenPrecedence(tag) {
+  return tag.prec || 2;
+}
+
+function xpathGrammarPrecedence(frame) {
+  var ret = 0, p;
+
+  if (frame.rule) { /* normal reduce */
+    if (frame.rule.length >= 3 && frame.rule[2] >= 0) {
+      ret = frame.rule[2];
+
+    } else {
+      for (var i = 0; i < frame.rule[1].length; ++i) {
+        p = xpathTokenPrecedence(frame.rule[1][i]);
+        ret = Math.max(ret, p);
+      }
+    }
+  } else if (frame.tag) { /* TOKEN match */
+    ret = xpathTokenPrecedence(frame.tag);
+
+  } else if (frame.length) { /* Q_ match */
+    for (var j = 0; j < frame.length; ++j) {
+      p = xpathGrammarPrecedence(frame[j]);
+      ret = Math.max(ret, p);
+    }
+  }
+
+  return ret;
+}
+/*DGF xpathReduce is where the magic happens in this parser.
+Skim down to the bottom of this file to find the table of 
+grammatical rules and precedence numbers, "The productions of the grammar".
+
+The idea here
+is that we want to take a stack of tokens and apply
+grammatical rules to them, "reducing" them to higher-level
+tokens.  Ultimately, any valid XPath should reduce to exactly one
+"Expr" token.
+
+Reduce too early or too late and you'll have two tokens that can't reduce
+to single Expr.  For example, you may hastily reduce a qname that
+should name a function, incorrectly treating it as a tag name.
+Or you may reduce too late, accidentally reducing the last part of the
+XPath into a top-level "Expr" that won't reduce with earlier parts of
+the XPath.
+
+A "cand" is a grammatical rule candidate, with a given precedence
+number.  "ahead" is the upcoming token, which also has a precedence
+number.  If the token has a higher precedence number than
+the rule candidate, we'll "shift" the token onto the token stack,
+instead of immediately applying the rule candidate.
+
+Some tokens have left associativity, in which case we shift when they
+have LOWER precedence than the candidate.
+*/
+function xpathReduce(stack, ahead) {
+  var cand = null, i;
+
+  if (stack.length > 0) {
+    var top = stack[stack.length-1];
+    var ruleset = xpathRules[top.tag.key];
+
+    if (ruleset) {
+      for (i = 0; i < ruleset.length; ++i) {
+        var rule = ruleset[i];
+        var match = xpathMatchStack(stack, rule[1]);
+        if (match.length) {
+          cand = {
+            tag: rule[0],
+            rule: rule,
+            match: match
+          };
+          cand.prec = xpathGrammarPrecedence(cand);
+          break;
+        }
+      }
+    }
+  }
+
+  var ret;
+  if (cand && (!ahead || cand.prec > ahead.prec ||
+               (ahead.tag.left && cand.prec >= ahead.prec))) {
+    for (i = 0; i < cand.match.matchlength; ++i) {
+      stack.pop();
+    }
+
+    xpathLog('reduce ' + cand.tag.label + ' ' + cand.prec +
+             ' ahead ' + (ahead ? ahead.tag.label + ' ' + ahead.prec +
+                          (ahead.tag.left ? ' left' : '')
+                          : ' none '));
+
+    var matchexpr = mapExpr(cand.match, function(m) { return m.expr; });
+    xpathLog('going to apply ' + cand.rule[3].toString());
+    cand.expr = cand.rule[3].apply(null, matchexpr);
+
+    stack.push(cand);
+    ret = true;
+
+  } else {
+    if (ahead) {
+      xpathLog('shift ' + ahead.tag.label + ' ' + ahead.prec +
+               (ahead.tag.left ? ' left' : '') +
+               ' over ' + (cand ? cand.tag.label + ' ' +
+                           cand.prec : ' none'));
+      stack.push(ahead);
+    }
+    ret = false;
+  }
+  return ret;
+}
+
+
+
+function stackToString(stack) {
+  var ret = '';
+  for (var i = 0; i < stack.length; ++i) {
+    if (ret) {
+      ret += '\n';
+    }
+    ret += stack[i].tag.label;
+  }
+  return ret;
+}
+
+// Copyright 2005 Google Inc.
+// All Rights Reserved
+//
+// An XPath parser and evaluator written in JavaScript. The
+// implementation is complete except for functions handling
+// namespaces.
+//
+// Reference: [XPATH] XPath Specification
+// <http://www.w3.org/TR/1999/REC-xpath-19991116>.
+//
+//
+// The API of the parser has several parts:
+//
+// 1. The parser function xpathParse() that takes a string and returns
+// an expession object.
+//
+// 2. The expression object that has an evaluate() method to evaluate the
+// XPath expression it represents. (It is actually a hierarchy of
+// objects that resembles the parse tree, but an application will call
+// evaluate() only on the top node of this hierarchy.)
+//
+// 3. The context object that is passed as an argument to the evaluate()
+// method, which represents the DOM context in which the expression is
+// evaluated.
+//
+// 4. The value object that is returned from evaluate() and represents
+// values of the different types that are defined by XPath (number,
+// string, boolean, and node-set), and allows to convert between them.
+//
+// These parts are near the top of the file, the functions and data
+// that are used internally follow after them.
+//
+//
+// Author: Steffen Meschkat <mesch@google.com>
+
+
+// The entry point for the parser.
+//
+// @param expr a string that contains an XPath expression.
+// @return an expression object that can be evaluated with an
+// expression context.
+
+function xpathParse(expr) {
+  xpathLog('parse ' + expr);
+  xpathParseInit();
+
+  var cached = xpathCacheLookup(expr);
+  var ret;
+  
+  if (cached) {
+    xpathLog(' ... cached');
+    return cached;
+  }
+
+  // Optimize for a few common cases: simple attribute node tests
+  // (@id), simple element node tests (page), variable references
+  // ($address), numbers (4), multi-step path expressions where each
+  // step is a plain element node test
+  // (page/overlay/locations/location).
+
+  if (expr.match(/^(\$|@)?\w+$/i)) {
+    ret = makeSimpleExpr(expr);
+    xpathParseCache[expr] = ret;
+    xpathLog(' ... simple');
+    return ret;
+  }
+
+  if (expr.match(/^\w+(\/\w+)*$/i)) {
+    ret = makeSimpleExpr2(expr);
+    xpathParseCache[expr] = ret;
+    xpathLog(' ... simple 2');
+    return ret;
+  }
+
+  var cachekey = expr; // expr is modified during parse
+
+  var stack = [];
+  var ahead = null;
+  var previous = null;
+  var done = false;
+
+  var parse_count = 0;
+  var lexer_count = 0;
+  var reduce_count = 0;
+  var result;
+  
+  while (!done) {
+    parse_count++;
+    expr = expr.replace(/^\s*/, '');
+    previous = ahead;
+    ahead = null;
+
+    var rule = null;
+    var match = '';
+    for (var i = 0; i < xpathTokenRules.length; ++i) {
+      result = xpathTokenRules[i].re.exec(expr);
+      lexer_count++;
+      if (result && result.length > 0 && result[0].length > match.length) {
+        rule = xpathTokenRules[i];
+        match = result[0];
+        break;
+      }
+    }
+
+    // Special case: allow operator keywords to be element and
+    // variable names.
+
+    // NOTE(mesch): The parser resolves conflicts by looking ahead,
+    // and this is the only case where we look back to
+    // disambiguate. So this is indeed something different, and
+    // looking back is usually done in the lexer (via states in the
+    // general case, called "start conditions" in flex(1)). Also,the
+    // conflict resolution in the parser is not as robust as it could
+    // be, so I'd like to keep as much off the parser as possible (all
+    // these precedence values should be computed from the grammar
+    // rules and possibly associativity declarations, as in bison(1),
+    // and not explicitly set.
+
+    if (rule &&
+        (rule == TOK_DIV ||
+         rule == TOK_MOD ||
+         rule == TOK_AND ||
+         rule == TOK_OR) &&
+        (!previous ||
+         previous.tag == TOK_AT ||
+         previous.tag == TOK_DSLASH ||
+         previous.tag == TOK_SLASH ||
+         previous.tag == TOK_AXIS ||
+         previous.tag == TOK_DOLLAR)) {
+      rule = TOK_QNAME;
+    }
+
+    if (rule) {
+      expr = expr.substr(match.length);
+      xpathLog('token: ' + match + ' -- ' + rule.label);
+      ahead = {
+        tag: rule,
+        match: match,
+        prec: rule.prec ?  rule.prec : 0, // || 0 is removed by the compiler
+        expr: makeTokenExpr(match)
+      };
+
+    } else {
+      xpathLog('DONE');
+      done = true;
+    }
+
+    while (xpathReduce(stack, ahead)) {
+      reduce_count++;
+      xpathLog('stack: ' + stackToString(stack));
+    }
+  }
+
+  xpathLog('stack: ' + stackToString(stack));
+
+  // DGF any valid XPath should "reduce" to a single Expr token
+  if (stack.length != 1) {
+    throw 'XPath parse error ' + cachekey + ':\n' + stackToString(stack);
+  }
+
+  result = stack[0].expr;
+  xpathParseCache[cachekey] = result;
+
+  xpathLog('XPath parse: ' + parse_count + ' / ' +
+           lexer_count + ' / ' + reduce_count);
+
+  return result;
+}
+
+
+// Parses and then evaluates the given XPath expression in the given
+// input context. Notice that parsed xpath expressions are cached.
+function xpathEval(select, context) {
+  var expr = xpathParse(select);
+  var ret = expr.evaluate(context);
+  return ret;
+}
+
+// The entry point for the library: match an expression against a DOM
+// node. Returns an XPath value.
+function xpathDomEval(expr, node) {
+  var expr1 = xpathParse(expr);
+  var ret = expr1.evaluate(new ExprContext(node));
+  return ret;
+}
+
+
+
+
+__extend__(Document.prototype,{
+    
+    evaluate: function(xpathText, contextNode, nsuriMapper, resultType, result){
+        log.debug('evaluate');
+        var context = new ExprContext(contextNode),
+            compiled = xpathParse(xpathText);
+        result = new XPathResult(
+            resultType, 
+            compiled.evaluate(context)
+        );
+        return result;
+    }
+
+});
+
+XPathExpression.prototype.evaluate = function(contextNode, resultType, result){
+    
+    var context = new ExprContext(contextNode);
+    result = new XPathResult(
+        resultType, 
+        this.compiled.evaluate(context)
+    );
+    return result;
+};
+
+__compileXPath__ = function(xpathText, nsuriMap){
+    return xpathParse(xpathText);
+};
+
+}());
+
+    
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/event.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/event.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/event.js	(revision 225)
@@ -0,0 +1,720 @@
+/*
+ * Envjs event.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ *
+ * This file simply provides the global definitions we need to
+ * be able to correctly implement to core browser DOM Event interfaces.
+
+ - leaked globally -
+
+var Event,
+    MouseEvent,
+    UIEvent,
+    KeyboardEvent,
+    MutationEvent,
+    DocumentEvent,
+    EventTarget,
+    EventException;
+    
+ */
+
+var Envjs = Envjs || require('./platform/core').Envjs,
+	After = After || require('./platform/core').After,
+	Document = Document || require('./dom').Document;
+/*
+ * Envjs event.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    } 
+    return a;
+}
+
+/**
+ * @author john resig
+ */
+//from jQuery
+function __setArray__( target, array ) {
+    // Resetting the length to 0, then using the native Array push
+    // is a super-fast way to populate an object with array-like properties
+    target.length = 0;
+    Array.prototype.push.apply( target, array );
+}
+var __addEventListener__,
+    __removeEventListener__,
+    __dispatchEvent__,
+    __captureEvent__,
+    __bubbleEvent__;
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.EventTarget').debug('available'); 
+});
+
+/**
+ * @name EventTarget
+ * @w3c:domlevel 2
+ * @uri -//TODO: paste dom event level 2 w3c spc uri here
+ */
+exports.EventTarget = EventTarget = function(){};
+EventTarget.prototype.addEventListener = function(type, fn, phase){
+    __addEventListener__(this, type, fn, phase);
+};
+EventTarget.prototype.removeEventListener = function(type, fn, phase){
+    __removeEventListener__(this, type, fn, phase);
+};
+EventTarget.prototype.dispatchEvent = function(event, bubbles){
+    __dispatchEvent__(this, event, bubbles);
+};
+
+__extend__(Node.prototype, EventTarget.prototype);
+
+var $events = [{}];
+
+__addEventListener__ = function(target, type, fn, phase){
+    phase = !!phase?"CAPTURING":"BUBBLING";
+    if ( !target.uuid ) {
+        target.uuid = $events.length+'';
+        log.debug('add event uuid for %s %s', target, target.uuid);
+    }
+    if ( !$events[target.uuid] ) {
+        log.debug('creating listener for target: %s %s', target, target.uuid);
+        $events[target.uuid] = {};
+    }
+    if ( !$events[target.uuid][type] ){
+        log.debug('creating listener for type: %s %s %s', target, target.uuid, type);
+        $events[target.uuid][type] = {
+            CAPTURING:[],
+            BUBBLING:[]
+        };
+    }
+    if ( $events[target.uuid][type][phase].indexOf( fn ) < 0 ){
+        log.debug( 'adding event listener %s %s %s %s', target, target.uuid, type, phase);
+        $events[target.uuid][type][phase].push( fn );
+    }
+    log.debug('registered event listeners %s', $events.length);
+};
+
+__removeEventListener__ = function(target, type, fn, phase){
+    phase = !!phase?"CAPTURING":"BUBBLING";
+    if ( !target.uuid ) {
+        log.debug('target has never had registered events %s', target);
+        return;
+    }
+    if ( !$events[target.uuid] ) {
+        log.debug('target has no registered events to remove %s %s', target, target.uuid);
+        return;
+    }
+    if(type == '*'){
+        //used to clean all event listeners for a given node
+        log.debug('cleaning all event listeners for node %s %s',target, target.uuid);
+        delete $events[target.uuid];
+        return;
+    }else if ( !$events[target.uuid][type] ){
+        log.debug('target has no registered events of type %s to remove %s %s', type, target, target.uuid);
+        return;
+    }
+    $events[target.uuid][type][phase] =
+        $events[target.uuid][type][phase].filter(function(f){
+            log.debug('removing event listener %s %s %s %s',  target, type, phase );
+            return f != fn;
+        });
+};
+
+var __eventuuid__ = 0;
+
+__dispatchEvent__ = function(target, event, bubbles){
+    
+    if (!event.uuid) {
+        event.uuid = __eventuuid__++;
+    }
+    //the window scope defines the $event object, for IE(^^^) compatibility;
+    //$event = event;
+
+    if (bubbles === undefined || bubbles === null) {
+        bubbles = true;
+    }
+
+    if (!event.target) {
+        event.target = target;
+    }
+
+    log.debug('dispatching %s %s %s %s', event.uuid, target, event.type, bubbles);
+    if ( event.type && (target.nodeType || target === window )) {
+
+        __captureEvent__(target, event);
+
+        event.eventPhase = Event.AT_TARGET;
+        if ( target.uuid && $events[target.uuid] && $events[target.uuid][event.type] ) {
+            event.currentTarget = target;
+
+            log.debug('begin dispatching capturing phase %s %s', target, event.type);
+            $events[target.uuid][event.type].CAPTURING.forEach(function(fn){
+                log.debug('capturing event %s', target);
+                var returnValue = fn.apply(target, [event]);
+                if(returnValue === false){
+                    event.stopPropagation();
+                }
+            });
+
+            log.debug('begin dispatching bubbling phase %s %s', target, event.type);
+            $events[target.uuid][event.type].BUBBLING.forEach(function(fn){
+                log.debug('bubbling event %s', target);
+                var returnValue = fn.apply(target, [event] );
+                if(returnValue === false){
+                    event.stopPropagation();
+                }
+            });
+        }
+        if (target["on" + event.type]) {
+            target["on" + event.type](event);
+        }
+        if (bubbles && !event.cancelled){
+            __bubbleEvent__(target, event);
+        }
+        if(!event._preventDefault){
+            //At this point I'm guessing that just HTMLEvents are concerned
+            //with default behavior being executed in a browser but I could be
+            //wrong as usual.  The goal is much more to filter at this point
+            //what events have no need to be handled
+            //console.log('triggering default behavior for %s', event.type);
+            if(event.type in Envjs.defaultEventBehaviors){
+                Envjs.defaultEventBehaviors[event.type](event);
+            }
+        }
+        log.debug('deleting event %s', event.uuid);
+        event.target = null;
+        event = null;
+    }else{
+        throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR);
+    }
+};
+
+__captureEvent__ = function(target, event){
+    var ancestorStack = [],
+        parent = target.parentNode,
+        stopevent = function(fn){
+            var returnValue = fn( event );
+            if(returnValue === false){
+                event.stopPropagation();
+            }
+        };
+
+    event.eventPhase = Event.CAPTURING_PHASE;
+    while(parent){
+        if(parent.uuid && $events[parent.uuid] && $events[parent.uuid][event.type]){
+            ancestorStack.push(parent);
+        }
+        parent = parent.parentNode;
+    }
+    while(ancestorStack.length && !event.cancelled){
+        event.currentTarget = ancestorStack.pop();
+        if($events[event.currentTarget.uuid] && $events[event.currentTarget.uuid][event.type]){
+            $events[event.currentTarget.uuid][event.type].CAPTURING.forEach(stopevent);
+        }
+    }
+};
+
+__bubbleEvent__ = function(target, event){
+    var parent = target.parentNode,
+        stopevent = function(fn){
+            var returnValue = fn( event );
+            if(returnValue === false){
+                event.stopPropagation();
+            }
+        };
+    event.eventPhase = Event.BUBBLING_PHASE;
+    while(parent){
+        if(parent.uuid && $events[parent.uuid] && $events[parent.uuid][event.type] ){
+            event.currentTarget = parent;
+            $events[event.currentTarget.uuid][event.type].BUBBLING.forEach(stopevent);
+        }
+        parent = parent.parentNode;
+    }
+};
+
+}(/*Envjs.DOM2.EventTarget*/));
+
+
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.Event').debug('available'); 
+});
+
+/**
+ * @class Event
+ */
+exports.Event = Event = function(options){
+    // event state is kept read-only by forcing
+    // a new object for each event.  This may not
+    // be appropriate in the long run and we'll
+    // have to decide if we simply dont adhere to
+    // the read-only restriction of the specification
+    this._bubbles = true;
+    this._cancelable = true;
+    this._cancelled = false;
+    this._currentTarget = null;
+    this._target = null;
+    this._eventPhase = Event.AT_TARGET;
+    this._timeStamp = new Date().getTime();
+    this._preventDefault = false;
+    this._stopPropogation = false;
+};
+
+__extend__(Event.prototype,{
+    get bubbles(){return this._bubbles;},
+    get cancelable(){return this._cancelable;},
+    get currentTarget(){return this._currentTarget;},
+    set currentTarget(currentTarget){ this._currentTarget = currentTarget; },
+    get eventPhase(){return this._eventPhase;},
+    set eventPhase(eventPhase){this._eventPhase = eventPhase;},
+    get target(){return this._target;},
+    set target(target){ this._target = target;},
+    get timeStamp(){return this._timeStamp;},
+    get type(){return this._type;},
+    initEvent: function(type, bubbles, cancelable){
+        this._type=type?type:'';
+        this._bubbles=!!bubbles;
+        this._cancelable=!!cancelable;
+    },
+    preventDefault: function(){
+        this._preventDefault = true;
+    },
+    stopPropagation: function(){
+        if(this._cancelable){
+            this._cancelled = true;
+            this._bubbles = false;
+        }
+    },
+    get cancelled(){
+        return this._cancelled;
+    },
+    toString: function(){
+        return '[object Event]';
+    }
+});
+
+__extend__(Event,{
+    CAPTURING_PHASE : 1,
+    AT_TARGET       : 2,
+    BUBBLING_PHASE  : 3
+});
+
+}(/*Envjs.DOM.Event*/));
+
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.UIEvent').debug('available'); 
+});
+
+/**
+ * @name UIEvent
+ * @param {Object} options
+ */
+exports.UIEvent = UIEvent = function(options) {
+    this._view = null;
+    this._detail = 0;
+};
+
+UIEvent.prototype = new Event();
+__extend__(UIEvent.prototype,{
+    get view(){
+        return this._view;
+    },
+    get detail(){
+        return this._detail;
+    },
+    initUIEvent: function(type, bubbles, cancelable, windowObject, detail){
+        this.initEvent(type, bubbles, cancelable);
+        this._detail = 0;
+        this._view = windowObject;
+    }
+});
+
+}(/*Envjs.DOM.UIEvent*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.MouseEvent').debug('available'); 
+});
+
+/**
+ * @name MouseEvent
+ * @w3c:domlevel 2 
+ * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
+ */
+exports.MouseEvent = MouseEvent = function(options) {
+    this._screenX= 0;
+    this._screenY= 0;
+    this._clientX= 0;
+    this._clientY= 0;
+    this._ctrlKey= false;
+    this._metaKey= false;
+    this._altKey= false;
+    this._button= null;
+    this._relatedTarget= null;
+};
+MouseEvent.prototype = new UIEvent();
+__extend__(MouseEvent.prototype,{
+    get screenX(){
+        return this._screenX;
+    },
+    get screenY(){
+        return this._screenY;
+    },
+    get clientX(){
+        return this._clientX;
+    },
+    get clientY(){
+        return this._clientY;
+    },
+    get ctrlKey(){
+        return this._ctrlKey;
+    },
+    get altKey(){
+        return this._altKey;
+    },
+    get shiftKey(){
+        return this._shiftKey;
+    },
+    get metaKey(){
+        return this._metaKey;
+    },
+    get button(){
+        return this._button;
+    },
+    get relatedTarget(){
+        return this._relatedTarget;
+    },
+    initMouseEvent: function(type, bubbles, cancelable, windowObject, detail,
+            screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, 
+            metaKey, button, relatedTarget){
+        this.initUIEvent(type, bubbles, cancelable, windowObject, detail);
+        this._screenX = screenX;
+        this._screenY = screenY;
+        this._clientX = clientX;
+        this._clientY = clientY;
+        this._ctrlKey = ctrlKey;
+        this._altKey = altKey;
+        this._shiftKey = shiftKey;
+        this._metaKey = metaKey;
+        this._button = button;
+        this._relatedTarget = relatedTarget;
+    }
+});
+
+}(/*Envjs.DOM2.MouseEvent*/));
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.KeyboardEvent').
+		debug('KeyboardEvent available'); 
+});
+
+/**
+ * Interface KeyboardEvent (introduced in DOM Level 3)
+ */
+exports.KeyboardEvent = KeyboardEvent = function(options) {
+    this._keyIdentifier = 0;
+    this._keyLocation = 0;
+    this._ctrlKey = false;
+    this._metaKey = false;
+    this._altKey = false;
+    this._metaKey = false;
+};
+KeyboardEvent.prototype = new UIEvent();
+
+__extend__(KeyboardEvent.prototype,{
+
+    get ctrlKey(){
+        return this._ctrlKey;
+    },
+    get altKey(){
+        return this._altKey;
+    },
+    get shiftKey(){
+        return this._shiftKey;
+    },
+    get metaKey(){
+        return this._metaKey;
+    },
+    get button(){
+        return this._button;
+    },
+    get relatedTarget(){
+        return this._relatedTarget;
+    },
+    getModifiersState: function(keyIdentifier){
+
+    },
+    initMouseEvent: function(type, bubbles, cancelable, windowObject,
+            keyIdentifier, keyLocation, modifiersList, repeat){
+        this.initUIEvent(type, bubbles, cancelable, windowObject, 0);
+        this._keyIdentifier = keyIdentifier;
+        this._keyLocation = keyLocation;
+        this._modifiersList = modifiersList;
+        this._repeat = repeat;
+    }
+});
+
+KeyboardEvent.DOM_KEY_LOCATION_STANDARD      = 0;
+KeyboardEvent.DOM_KEY_LOCATION_LEFT          = 1;
+KeyboardEvent.DOM_KEY_LOCATION_RIGHT         = 2;
+KeyboardEvent.DOM_KEY_LOCATION_NUMPAD        = 3;
+KeyboardEvent.DOM_KEY_LOCATION_MOBILE        = 4;
+KeyboardEvent.DOM_KEY_LOCATION_JOYSTICK      = 5;
+
+}(/*Envjs.DOM3.KeyboardEvent*/));
+
+
+//We dont fire mutation events until someone has registered for them
+var __supportedMutations__ = /DOMSubtreeModified|DOMNodeInserted|DOMNodeRemoved|DOMAttrModified|DOMCharacterDataModified/;
+
+var __fireMutationEvents__ = Aspect.before({
+    target: EventTarget,
+    method: 'addEventListener'
+}, function(target, type){
+    if(type && type.match(__supportedMutations__)){
+        //unweaving removes the __addEventListener__ aspect
+        __fireMutationEvents__.unweave();
+        // These two methods are enough to cover all dom 2 manipulations
+        Aspect.around({
+            target: Node,
+            method:"removeChild"
+        }, function(invocation){
+            var event,
+                node = invocation['arguments'][0];
+            event = node.ownerDocument.createEvent('MutationEvents');
+            event.initEvent('DOMNodeRemoved', true, false, node.parentNode, null, null, null, null);
+            node.dispatchEvent(event, false);
+            return invocation.proceed();
+
+        });
+        Aspect.around({
+            target: Node,
+            method:"appendChild"
+        }, function(invocation) {
+            var event,
+                node = invocation.proceed();
+            event = node.ownerDocument.createEvent('MutationEvents');
+            event.initEvent('DOMNodeInserted', true, false, node.parentNode, null, null, null, null);
+            node.dispatchEvent(event, false);
+            return node;
+        });
+    }
+});
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.MutationEvent').debug('available'); 
+});
+
+/**
+ * @name MutationEvent
+ * @param {Object} options
+ */
+exports.MutationEvent = MutationEvent = function(options) {
+    this._cancelable = false;
+    this._timeStamp = 0;
+};
+
+MutationEvent.prototype = new Event();
+__extend__(MutationEvent.prototype,{
+    get relatedNode(){
+        return this._relatedNode;
+    },
+    get prevValue(){
+        return this._prevValue;
+    },
+    get newValue(){
+        return this._newValue;
+    },
+    get attrName(){
+        return this._attrName;
+    },
+    get attrChange(){
+        return this._attrChange;
+    },
+    initMutationEvent: function( type, bubbles, cancelable,
+            relatedNode, prevValue, newValue, attrName, attrChange ){
+        this._relatedNode = relatedNode;
+        this._prevValue = prevValue;
+        this._newValue = newValue;
+        this._attrName = attrName;
+        this._attrChange = attrChange;
+        switch(type){
+            case "DOMSubtreeModified":
+                this.initEvent(type, true, false);
+                break;
+            case "DOMNodeInserted":
+                this.initEvent(type, true, false);
+                break;
+            case "DOMNodeRemoved":
+                this.initEvent(type, true, false);
+                break;
+            case "DOMNodeRemovedFromDocument":
+                this.initEvent(type, false, false);
+                break;
+            case "DOMNodeInsertedIntoDocument":
+                this.initEvent(type, false, false);
+                break;
+            case "DOMAttrModified":
+                this.initEvent(type, true, false);
+                break;
+            case "DOMCharacterDataModified":
+                this.initEvent(type, true, false);
+                break;
+            default:
+                this.initEvent(type, bubbles, cancelable);
+        }
+    }
+});
+
+// constants
+MutationEvent.ADDITION = 0;
+MutationEvent.MODIFICATION = 1;
+MutationEvent.REMOVAL = 2;
+
+}(/*Envjs.DOM.MutationEvent*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.EventException').debug('available'); 
+});
+
+/**
+ * @name EventException
+ */
+exports.EventException = EventException = function(code) {
+  this.code = code;
+};
+EventException.UNSPECIFIED_EVENT_TYPE_ERR = 0;
+
+}(/*Envjs.DOM2.EventException*/));
+/**
+ *
+ * DOM Level 2: http://www.w3.org/TR/DOM-Level-2-Events/events.html
+ * DOM Level 3: http://www.w3.org/TR/DOM-Level-3-Events/
+ *
+ * interface DocumentEvent {
+ *   Event createEvent (in DOMString eventType)
+ *      raises (DOMException);
+ * };
+ *
+ * Firefox (3.6) exposes DocumentEvent
+ * Safari (4) does NOT.
+ */
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+   log = Envjs.logger('Envjs.DOM.DocumentEvent').debug('available'); 
+});
+
+/**
+ * TODO: Not sure we need a full prototype.  We not just an regular object?
+ */
+exports.DocumentEvent = DocumentEvent = function(){};
+DocumentEvent.prototype.__EventMap__ = {
+    // Safari4: singular and plural forms accepted
+    // Firefox3.6: singular and plural forms accepted
+    'Event'          : Event,
+    'Events'         : Event,
+    'UIEvent'        : UIEvent,
+    'UIEvents'       : UIEvent,
+    'MouseEvent'     : MouseEvent,
+    'MouseEvents'    : MouseEvent,
+    'MutationEvent'  : MutationEvent,
+    'MutationEvents' : MutationEvent,
+
+    // Safari4: accepts HTMLEvents, but not HTMLEvent
+    // Firefox3.6: accepts HTMLEvents, but not HTMLEvent
+    'HTMLEvent'      : Event,
+    'HTMLEvents'     : Event,
+
+    // Safari4: both not accepted
+    // Firefox3.6, only KeyEvents is accepted
+    'KeyEvent'       : KeyboardEvent,
+    'KeyEvents'      : KeyboardEvent,
+
+    // Safari4: both accepted
+    // Firefox3.6: none accepted
+    'KeyboardEvent'  : KeyboardEvent,
+    'KeyboardEvents' : KeyboardEvent
+};
+
+DocumentEvent.prototype.createEvent = function(eventType) {
+    var Clazz = this.__EventMap__[eventType];
+    if (Clazz) {
+        return new Clazz();
+    }
+    throw(new DOMException(DOMException.NOT_SUPPORTED_ERR));
+};
+
+__extend__(Document.prototype, DocumentEvent.prototype);
+
+
+}(/*Envjs.DOM.DocumentEvent*/));
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/html.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/html.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/html.js	(revision 225)
@@ -0,0 +1,4997 @@
+/*
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ *
+ * This file simply provides the global definitions we need to
+ * be able to correctly implement to core browser DOM HTML interfaces.
+
+ // These are exported/leaked globally
+
+    HTMLDocument,
+    HTMLElement,
+    HTMLCollection,
+    HTMLAnchorElement,
+    HTMLAreaElement,
+    HTMLBaseElement,
+    HTMLQuoteElement,
+    HTMLBodyElement,
+    HTMLBRElement,
+    HTMLButtonElement,
+    CanvasRenderingContext2D,
+    HTMLCanvasElement,
+    HTMLTableColElement,
+    HTMLModElement,
+    HTMLDivElement,
+    HTMLDListElement,
+    HTMLFieldSetElement,
+    HTMLFormElement,
+    HTMLFrameElement,
+    HTMLFrameSetElement,
+    HTMLHeadElement,
+    HTMLHeadingElement,
+    HTMLHRElement,
+    HTMLHtmlElement,
+    HTMLIFrameElement,
+    HTMLImageElement,
+    HTMLInputElement,
+    HTMLLabelElement,
+    HTMLLegendElement,
+    HTMLLIElement,
+    HTMLLinkElement,
+    HTMLMapElement,
+    HTMLMetaElement,
+    HTMLObjectElement,
+    HTMLOListElement,
+    HTMLOptGroupElement,
+    HTMLOptionElement,
+    HTMLParagraphElement,
+    HTMLParamElement,
+    HTMLPreElement,
+    HTMLScriptElement,
+    HTMLSelectElement,
+    HTMLSpanElement,
+    HTMLStyleElement,
+    HTMLTableElement,
+    HTMLTableSectionElement,
+    HTMLTableCellElement,
+    HTMLTableDataCellElement,
+    HTMLTableHeaderCellElement,
+    HTMLTableRowElement,
+    HTMLTextAreaElement,
+    HTMLTitleElement,
+    HTMLUListElement,
+    HTMLUnknownElement,
+    Image,
+    Option,
+    __loadImage__,
+    __loadLink__;
+*/
+
+var Envjs = Envjs || require('./platform/core').Envjs,
+	After = After || require('./platform/core').After,
+	Document = Document || require('./dom').Document,
+	Element = Element || require('./dom').Element,
+	NodeList = NodeList || require('./dom').NodeList,
+	Node = Node || require('./dom').Node,
+	Event = Event || require('./event').Event;
+	
+/*
+ * Envjs html.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author ariel flesler
+ *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
+ * @param {Object} str
+ */
+function __trim__( str ){
+    return (str || "").replace( /^\s+|\s+$/g, "" );
+}
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    } 
+    return a;
+}
+
+/**
+ * @author john resig
+ */
+//from jQuery
+function __setArray__( target, array ) {
+    // Resetting the length to 0, then using the native Array push
+    // is a super-fast way to populate an object with array-like properties
+    target.length = 0;
+    Array.prototype.push.apply( target, array );
+}
+var __addNamedMap__,
+    __removeNamedMap__,
+    __isNamedElement__,
+    __selectparent__ ,//see option.js
+    __updateoptions__, //see option.js
+    __loadLink__; //see link.js 
+/**
+ * @class  HTMLDocument
+ *      The Document interface represents the entire HTML or XML document.
+ *      Conceptually, it is the root of the document tree, and provides
+ *      the primary access to the document's data.
+ *
+ * @extends Document
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLDocument').
+        debug('HTMLDocument available');    
+});
+
+exports.HTMLDocument = HTMLDocument = function(implementation, ownerWindow, referrer) {
+    Document.apply(this, arguments);
+    this.referrer = referrer || '';
+    this.baseURI = "about:blank";
+    this.ownerWindow = ownerWindow;
+};
+
+HTMLDocument.prototype = new Document();
+
+__extend__(HTMLDocument.prototype, {
+    createElement: function(tagName){
+        var node;
+        tagName = tagName.toUpperCase();
+        // create Element specifying 'this' as ownerDocument
+        // This is an html document so we need to use explicit interfaces per the
+        //TODO: would be much faster as a big switch
+        switch(tagName){
+        case "A":
+            node = new HTMLAnchorElement(this);break;
+        case "AREA":
+            node = new HTMLAreaElement(this);break;
+        case "BASE":
+            node = new HTMLBaseElement(this);break;
+        case "BLOCKQUOTE":
+            node = new HTMLQuoteElement(this);break;
+        case "CANVAS":
+            node = new HTMLCanvasElement(this);break;
+        case "Q":
+            node = new HTMLQuoteElement(this);break;
+        case "BODY":
+            node = new HTMLBodyElement(this);break;
+        case "BR":
+            node = new HTMLBRElement(this);break;
+        case "BUTTON":
+            node = new HTMLButtonElement(this);break;
+        case "CAPTION":
+            node = new HTMLElement(this);break;
+        case "COL":
+            node = new HTMLTableColElement(this);break;
+        case "COLGROUP":
+            node = new HTMLTableColElement(this);break;
+        case "DEL":
+            node = new HTMLModElement(this);break;
+        case "INS":
+            node = new HTMLModElement(this);break;
+        case "DIV":
+            node = new HTMLDivElement(this);break;
+        case "DL":
+            node = new HTMLDListElement(this);break;
+        case "DT":
+            node = new HTMLElement(this); break;
+        case "FIELDSET":
+            node = new HTMLFieldSetElement(this);break;
+        case "FORM":
+            node = new HTMLFormElement(this);break;
+        case "FRAME":
+            node = new HTMLFrameElement(this);break;
+        case "FRAMESET":
+            node = new HTMLFrameSetElement(this);break;
+        case "H1":
+            node = new HTMLHeadingElement(this);break;
+        case "H2":
+            node = new HTMLHeadingElement(this);break;
+        case "H3":
+            node = new HTMLHeadingElement(this);break;
+        case "H4":
+            node = new HTMLHeadingElement(this);break;
+        case "H5":
+            node = new HTMLHeadingElement(this);break;
+        case "H6":
+            node = new HTMLHeadingElement(this);break;
+        case "HEAD":
+            node = new HTMLHeadElement(this);break;
+        case "HR":
+            node = new HTMLHRElement(this);break;
+        case "HTML":
+            node = new HTMLHtmlElement(this);break;
+        case "IFRAME":
+            node = new HTMLIFrameElement(this);break;
+        case "IMG":
+            node = new HTMLImageElement(this);break;
+        case "INPUT":
+            node = new HTMLInputElement(this);break;
+        case "LABEL":
+            node = new HTMLLabelElement(this);break;
+        case "LEGEND":
+            node = new HTMLLegendElement(this);break;
+        case "LI":
+            node = new HTMLLIElement(this);break;
+        case "LINK":
+            node = new HTMLLinkElement(this);break;
+        case "MAP":
+            node = new HTMLMapElement(this);break;
+        case "META":
+            node = new HTMLMetaElement(this);break;
+        case "NOSCRIPT":
+            node = new HTMLElement(this);break;
+        case "OBJECT":
+            node = new HTMLObjectElement(this);break;
+        case "OPTGROUP":
+            node = new HTMLOptGroupElement(this);break;
+        case "OL":
+            node = new HTMLOListElement(this); break;
+        case "OPTION":
+            node = new HTMLOptionElement(this);break;
+        case "P":
+            node = new HTMLParagraphElement(this);break;
+        case "PARAM":
+            node = new HTMLParamElement(this);break;
+        case "PRE":
+            node = new HTMLPreElement(this);break;
+        case "SCRIPT":
+            node = new HTMLScriptElement(this);break;
+        case "SELECT":
+            node = new HTMLSelectElement(this);break;
+        case "SMALL":
+            node = new HTMLElement(this);break;
+        case "SPAN":
+            node = new HTMLSpanElement(this);break;
+        case "STRONG":
+            node = new HTMLElement(this);break;
+        case "STYLE":
+            node = new HTMLStyleElement(this);break;
+        case "TABLE":
+            node = new HTMLTableElement(this);break;
+        case "TBODY":
+            node = new HTMLTableSectionElement(this);break;
+        case "TFOOT":
+            node = new HTMLTableSectionElement(this);break;
+        case "THEAD":
+            node = new HTMLTableSectionElement(this);break;
+        case "TD":
+            node = new HTMLTableDataCellElement(this);break;
+        case "TH":
+            node = new HTMLTableHeaderCellElement(this);break;
+        case "TEXTAREA":
+            node = new HTMLTextAreaElement(this);break;
+        case "TITLE":
+            node = new HTMLTitleElement(this);break;
+        case "TR":
+            node = new HTMLTableRowElement(this);break;
+        case "UL":
+            node = new HTMLUListElement(this);break;
+        default:
+            node = new HTMLUnknownElement(this);
+        }
+        // assign values to properties (and aliases)
+        node.nodeName  = tagName;
+        return node;
+    },
+    createElementNS : function (uri, local) {
+        //print('createElementNS :'+uri+" "+local);
+        if(!uri){
+            return this.createElement(local);
+        }else if ("http://www.w3.org/1999/xhtml" == uri) {
+            return this.createElement(local);
+        } else if ("http://www.w3.org/1998/Math/MathML" == uri) {
+            return this.createElement(local);
+        } else if ("http://www.w3.org/2000/svg" == uri) {
+            return this.createElement(local);
+        } else {
+            return Document.prototype.createElementNS.apply(this,[uri, local]);
+        }
+    },
+    get anchors(){
+        return new HTMLCollection(this.getElementsByTagName('a'));
+    },
+    get applets(){
+        return new HTMLCollection(this.getElementsByTagName('applet'));
+    },
+    get documentElement(){
+        var html = Document.prototype.__lookupGetter__('documentElement').apply(this,[]);
+        if( html === null){
+            html = this.createElement('html');
+            this.appendChild(html);
+            html.appendChild(this.createElement('head'));
+            html.appendChild(this.createElement('body'));
+        }
+        return html;
+    },
+    //document.head is non-standard
+    get head(){
+        //console.log('get head');
+        if (!this.documentElement) {
+            this.appendChild(this.createElement('html'));
+        }
+        var element = this.documentElement,
+            length = element.childNodes.length,
+            i;
+        //check for the presence of the head element in this html doc
+        for(i=0;i<length;i++){
+            if(element.childNodes[i].nodeType === Node.ELEMENT_NODE){
+                if(element.childNodes[i].tagName.toLowerCase() === 'head'){
+                    return element.childNodes[i];
+                }
+            }
+        }
+        //no head?  ugh bad news html.. I guess we'll force the issue?
+        var head = element.appendChild(this.createElement('head'));
+        return head;
+    },
+    get title(){
+        //console.log('get title');
+        if (!this.documentElement) {
+            this.appendChild(this.createElement('html'));
+        }
+        var title,
+            head = this.head,
+            length = head.childNodes.length,
+            i;
+        //check for the presence of the title element in this head element
+        for(i=0;i<length;i++){
+            if(head.childNodes[i].nodeType === Node.ELEMENT_NODE){
+                if(head.childNodes[i].tagName.toLowerCase() === 'title'){
+                    return head.childNodes[i].textContent;
+                }
+            }
+        }
+        //no title?  ugh bad news html.. I guess we'll force the issue?
+        title = head.appendChild(this.createElement('title'));
+        return title.appendChild(this.createTextNode('Untitled Document')).nodeValue;
+    },
+    set title(titleStr){
+        //console.log('set title %s', titleStr);
+        if (!this.documentElement) {
+            this.appendChild(this.createElement('html'));
+        }
+        var title = this.title;
+        title.textContent = titleStr;
+    },
+
+    get body() {
+        var element = this.documentElement,
+            length = element.childNodes.length,
+            i;
+        for (i=0; i<length; i++) {
+            if (element.childNodes[i].nodeType === Node.ELEMENT_NODE &&
+                (element.childNodes[i].tagName === 'BODY' || 
+                 element.childNodes[i].tagName === 'FRAMESET')) {
+                return element.childNodes[i];
+            }
+        }
+        return null;
+    },
+    set body() {
+        /* in firefox this is a benevolent do nothing*/
+        console.log('set body');
+    },
+
+    get cookie(){
+        return Envjs.getCookies(this.location+'');
+    },
+    set cookie(cookie){
+        return Envjs.setCookie(this.location+'', cookie);
+    },
+
+    /**
+     * document.location
+     *
+     * should be identical to window.location
+     *
+     * HTML5:
+     * http://dev.w3.org/html5/spec/Overview.html#the-location-interface
+     *
+     * Mozilla MDC:
+     * https://developer.mozilla.org/en/DOM/document.location
+     *
+     */
+    get location() {
+        if (this.ownerWindow) {
+            return this.ownerWindow.location;
+        } else {
+            return this.baseURI;
+        }
+    },
+    set location(url) {
+        this.baseURI = url;
+        if (this.ownerWindow) {
+            this.ownerWindow.location = url;
+        }
+    },
+
+    /**
+     * document.URL (read-only)
+     *
+     * HTML DOM Level 2:
+     * http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-46183437
+     *
+     * HTML5:
+     * http://dev.w3.org/html5/spec/Overview.html#dom-document-url
+     *
+     * Mozilla MDC:
+     * https://developer.mozilla.org/en/DOM/document.URL
+     */
+    get URL() {
+        return this.location.href;
+    },
+
+    /**
+     * document.domain
+     *
+     * HTML5 Spec:
+     * http://dev.w3.org/html5/spec/Overview.html#dom-document-domain
+     *
+     * Mozilla MDC:
+     * https://developer.mozilla.org/en/DOM/document.domain
+     *
+     */
+    get domain(){
+        var HOSTNAME = new RegExp('//([^:/]+)'),
+            matches = HOSTNAME.exec(this.baseURI);
+        return matches&&matches.length>1?matches[1]:"";
+    },
+    set domain(value){
+        var i,
+            domainParts = this.domain.split('.').reverse(),
+            newDomainParts = value.split('.').reverse();
+        if(newDomainParts.length > 1){
+            for(i=0;i<newDomainParts.length;i++){
+                if(newDomainParts[i] !== domainParts[i]){
+                    return;
+                }
+            }
+            this.baseURI = this.baseURI.replace(domainParts.join('.'), value);
+        }
+    },
+
+    get forms(){
+        return new HTMLCollection(this.getElementsByTagName('form'));
+    },
+    get images(){
+        return new HTMLCollection(this.getElementsByTagName('img'));
+    },
+    get lastModified(){
+        /* TODO */
+        return this._lastModified;
+    },
+    get links(){
+        return new HTMLCollection(this.getElementsByTagName('a'));
+    },
+    getElementsByName : function(name){
+        //console.log('getting elements for name %s', name);
+        if(!(this._indexes_['@'+name])){
+            this._indexes_["@"+name] = new NodeList(this, this.documentElement);
+        }
+        return this._indexes_["@"+name];
+    },
+    toString: function(){
+        return "[object HTMLDocument]";
+    },
+    get innerHTML(){
+        return this.documentElement.outerHTML;
+    }
+});
+
+}(/*HTMLDocument*/));
+
+Aspect.around({
+    target: Node,
+    method:"appendChild"
+}, function(invocation) {
+    var event,
+        okay,
+        node = invocation.proceed(),
+        doc = node.ownerDocument,
+        target;
+
+    //console.log('element appended: %s %s %s', node+'', node.nodeName, node.namespaceURI);
+    if((node.nodeType !== Node.ELEMENT_NODE)){
+        //for now we are only handling element insertions.  probably
+        //we will need to handle text node changes to script tags and
+        //changes to src attributes
+        return node;
+    }
+    
+    if(node.tagName&&node.tagName.toLowerCase()=="input"){
+        target = node.parentNode;
+        //console.log('adding named map for input');
+        while(target&&target.tagName&&target.tagName.toLowerCase()!="form"){
+            //console.log('possible target for named map for input is %s', target);
+            target = target.parentNode;
+        }
+        if(target){
+            //console.log('target for named map for input is %s', target);
+            __addNamedMap__(target, node);
+        }
+    }
+    //console.log('appended html element %s %s %s', node.namespaceURI, node.nodeName, node);
+    switch(doc.parsing){
+        case true:
+
+            /**
+             * Very special case.  While in parsing mode, in head, a
+             * script can add another script tag to the head, and it will
+             * be evaluated.  This is tested in 'ant fulldoc-spec' tests.
+             *
+             * Not quite sure if the require that the new script tag must
+             * be in the head is correct or not.  NamespaceURI == null
+             * might also need to corrected too.
+             */
+            if (node.tagName.toLowerCase() === 'script' && 
+                (node.namespaceURI === "" || 
+                 node.namespaceURI === "http://www.w3.org/1999/xhtml" || 
+                 node.namespaceURI === null) ) {
+                //console.log('appending script while parsing');
+                if((this.nodeName.toLowerCase() === 'head')){
+                    try{
+                        okay = Envjs.loadLocalScript(node, null);
+                        //console.log('loaded script? %s %s', node.uuid, okay);
+                        // only fire event if we actually had something to load
+                        if (node.src && node.src.length > 0){
+                            event = doc.createEvent('HTMLEvents');
+                            event.initEvent( okay ? "load" : "error", false, false );
+                            node.dispatchEvent( event, false );
+                        }
+                    }catch(e){
+                        console.log('error loading html element %s %e', node, e.toString());
+                    }
+                }
+            }
+            break;
+        case false:
+            switch(node.namespaceURI){
+                case null:
+                    //fall through
+                case "":
+                    //fall through
+                case "http://www.w3.org/1999/xhtml":
+                    switch(node.tagName.toLowerCase()){
+                        case 'style':
+                            document.styleSheets.push(new CSSStyleSheet(node));
+                            break;
+                        case 'script':
+                            //console.log('appending script %s', node.src);
+                            if((this.nodeName.toLowerCase() === 'head')){
+                                try{
+                                    okay = Envjs.loadLocalScript(node, null);
+                                    //console.log('loaded script? %s %s', node.uuid, okay);
+                                    // only fire event if we actually had something to load
+                                    if (node.src && node.src.length > 0){
+                                        event = doc.createEvent('HTMLEvents');
+                                        event.initEvent( okay ? "load" : "error", false, false );
+                                        node.dispatchEvent( event, false );
+                                    }
+                                }catch(ee){
+                                    console.log('error loading html element %s %e', node, ee.toString());
+                                }
+                            }
+                            break;
+                        case 'frame':
+                        case 'iframe':
+                            node.contentWindow = { };
+                            node.contentDocument = new HTMLDocument(new DOMImplementation(), node.contentWindow);
+                            node.contentWindow.document = node.contentDocument;
+                            try{
+                                if(Window){
+                                    //console.log("iframe appended to document %s", node);
+                                }
+                            }catch(eee){
+                                node.contentDocument.addEventListener('DOMContentLoaded', function(){
+                                    event = node.contentDocument.createEvent('HTMLEvents');
+                                    event.initEvent("load", false, false);
+                                    node.dispatchEvent( event, false );
+                                });
+                                console.log('error loading html element %s %e', node, eee.toString());
+                            }
+                            try{
+                                if (node.src && node.src.length > 0){
+                                    //console.log("trigger load on frame from appendChild %s", node.src);
+                                    Envjs.loadFrame(node, Envjs.uri(node.src, doc.location+''));
+                                }else{
+                                    Envjs.loadFrame(node);
+                                }
+                            }catch(_e){
+                                console.log('error loading html element %s %e', node, _e.toString());
+                            }
+                            break;
+
+                        case 'link':
+                            if (node.href && node.href.length > 0) {
+                                Envjs.loadLink(node, node.href);
+                            }
+                            break;
+                            /*
+                              case 'img':
+                              if (node.src && node.src.length > 0){
+                              // don't actually load anything, so we're "done" immediately:
+                              event = doc.createEvent('HTMLEvents');
+                              event.initEvent("load", false, false);
+                              node.dispatchEvent( event, false );
+                              }
+                              break;
+                            */
+                        case 'option':
+                            __updateoptions__(node);
+                            break;
+                        default:
+                            if(node.getAttribute('onload')){
+                                //console.log('calling attribute onload %s | %s', node.onload, node.tagName);
+                                node.onload();
+                            }
+                    }//switch on name
+                    break;
+                default:
+                    break;
+            }//switch on ns
+            break;
+        default:
+            break;
+            // console.log('element appended: %s %s', node+'', node.namespaceURI);
+    }//switch on doc.parsing
+    return node;
+
+});
+
+Aspect.around({
+    target: Node,
+    method:"removeChild"
+}, function(invocation) {
+    var event,
+        okay,
+        target,
+        node = invocation.proceed(),
+        doc = node.ownerDocument;
+    if((node.nodeType !== Node.ELEMENT_NODE)){
+        //for now we are only handling element insertions.  probably we will need
+        //to handle text node changes to script tags and changes to src
+        //attributes
+        if(node.nodeType !== Node.DOCUMENT_NODE && node.uuid){
+            //console.log('removing event listeners, %s', node, node.uuid);
+            node.removeEventListener('*', null, null);
+        }
+        return node;
+    }
+    //console.log('appended html element %s %s %s', node.namespaceURI, node.nodeName, node);
+    if(node.tagName&&node.tagName.toLowerCase()=="input"){
+        target = node.parentNode;
+        //console.log('adding named map for input');
+        while(target&&target.tagName&&target.tagName.toLowerCase()!="form"){
+            //console.log('possible target for named map for input is %s', target);
+            target = target.parentNode;
+        }
+        if(target){
+            //console.log('target for named map for input is %s', target);
+            __removeNamedMap__(target, node);
+        }
+    }
+    switch(doc.parsing){
+        case true:
+            //handled by parser if included
+            break;
+        case false:
+            switch(node.namespaceURI){
+                case null:
+                    //fall through
+                case "":
+                    //fall through
+                case "http://www.w3.org/1999/xhtml":
+                    //this is interesting dillema since our event engine is
+                    //storing the registered events in an array accessed
+                    //by the uuid property of the node.  unforunately this
+                    //means listeners hang out way after(forever ;)) the node
+                    //has been removed and gone out of scope.
+                    //console.log('removing event listeners, %s', node, node.uuid);
+                    node.removeEventListener('*', null, null);
+                    switch(node.tagName.toLowerCase()){
+                        case 'frame':
+                        case 'iframe':
+                            try{
+                                //console.log('removing iframe document');
+                                try{
+                                    Envjs.unloadFrame(node);
+                                }catch(ee){
+                                    console.log('error freeing resources from frame %s', ee);
+                                }
+                                node.contentWindow = null;
+                                node.contentDocument = null;
+                            }catch(e){
+                                console.log('error unloading html element %s %e', node, e.toString());
+                            }
+                            break;
+                        default:
+                    }//switch on name
+                    break;
+                default:
+            }//switch on ns
+            break;
+        default:
+            console.log('element appended: %s %s', node+'', node.namespaceURI);
+    }//switch on doc.parsing
+    return node;
+
+});
+
+
+
+/**
+ * Named Element Support
+ *
+ *
+ */
+
+/*
+ *
+ * @returns 'name' if the node has a appropriate name
+ *          null if node does not have a name
+ */
+
+__isNamedElement__ = function(node) {
+    if (node.nodeType !== Node.ELEMENT_NODE) {
+        return null;
+    }
+    var tagName = node.tagName.toLowerCase();
+    var nodename = null;
+
+    switch (tagName) {
+        case 'embed':
+        case 'form':
+        case 'iframe':
+        case 'input':
+            nodename = node.getAttribute('name');
+            break;
+        case 'applet':
+            nodename = node.id;
+            break;
+        case 'object':
+            // TODO: object needs to be 'fallback free'
+            nodename = node.id;
+            break;
+        case 'img':
+            nodename = node.id;
+            if (!nodename || ! node.getAttribute('name')) {
+                nodename = null;
+            }
+            break;
+    }
+    return (nodename) ? nodename : null;
+};
+
+
+__addNamedMap__ = function(target, node) {
+    var nodename = __isNamedElement__(node);
+    if (nodename) {
+        target.__defineGetter__(nodename, function() {
+            return node;
+        }); 
+        target.__defineSetter__(nodename, function(value) {
+            return value;
+        });
+    }
+};
+
+__removeNamedMap__ = function(target, node) {
+    if (!node) {
+        return;
+    }
+    var nodename = __isNamedElement__(node);
+    if (nodename) {
+        delete target[nodename];
+    }
+};
+
+
+
+/**
+ * @name HTMLEvents
+ * @w3c:domlevel 2
+ * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
+ */
+
+var __eval__ = function(script, node){
+    if (script !== "" && Envjs.scriptTypes['']){
+        // don't assemble environment if no script...
+        try{
+            Envjs['eval'](node.ownerDocument.ownerWindow, script, script+" ("+node+")");
+        }catch(e){
+            console.log('error evaluating %s', e);
+        }
+    }
+};
+
+var HTMLEvents = function(){};
+HTMLEvents.prototype = {
+    onload: function(event){
+        __eval__(this.getAttribute('onload')||'', this);
+    },
+    onunload: function(event){
+        __eval__(this.getAttribute('onunload')||'', this);
+    },
+    onabort: function(event){
+        __eval__(this.getAttribute('onabort')||'', this);
+    },
+    onerror: function(event){
+        __eval__(this.getAttribute('onerror')||'', this);
+    },
+    onselect: function(event){
+        __eval__(this.getAttribute('onselect')||'', this);
+    },
+    onchange: function(event){
+        __eval__(this.getAttribute('onchange')||'', this);
+    },
+    onsubmit: function(event){
+        if (__eval__(this.getAttribute('onsubmit')||'', this)) {
+            this.submit();
+        }
+    },
+    onreset: function(event){
+        __eval__(this.getAttribute('onreset')||'', this);
+    },
+    onfocus: function(event){
+        __eval__(this.getAttribute('onfocus')||'', this);
+    },
+    onblur: function(event){
+        __eval__(this.getAttribute('onblur')||'', this);
+    },
+    onresize: function(event){
+        __eval__(this.getAttribute('onresize')||'', this);
+    },
+    onscroll: function(event){
+        __eval__(this.getAttribute('onscroll')||'', this);
+    }
+};
+
+//HTMLDocument, HTMLFramesetElement, HTMLObjectElement
+var  __load__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("load", false, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HTMLFramesetElement, HTMLBodyElement
+var  __unload__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("unload", false, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HTMLObjectElement
+var  __abort__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("abort", true, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HTMLFramesetElement, HTMLObjectElement, HTMLBodyElement
+var  __error__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("error", true, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HTMLInputElement, HTMLTextAreaElement
+var  __select__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("select", true, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
+var  __change__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("change", true, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HtmlFormElement
+var __submit__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("submit", true, true);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//HtmlFormElement
+var  __reset__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("reset", false, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//LABEL, INPUT, SELECT, TEXTAREA, and BUTTON
+var __focus__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("focus", false, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//LABEL, INPUT, SELECT, TEXTAREA, and BUTTON
+var __blur__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("blur", false, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//Window
+var __resize__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("resize", true, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+//Window
+var __scroll__ = function(element){
+    var event = new Event('HTMLEvents');
+    event.initEvent("scroll", true, false);
+    element.dispatchEvent(event);
+    return event;
+};
+
+/**
+ * @name KeyboardEvents
+ * @w3c:domlevel 2 
+ * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
+ */
+var KeyboardEvents= function(){};
+KeyboardEvents.prototype = {
+    onkeydown: function(event){
+        __eval__(this.getAttribute('onkeydown')||'', this);
+    },
+    onkeypress: function(event){
+        __eval__(this.getAttribute('onkeypress')||'', this);
+    },
+    onkeyup: function(event){
+        __eval__(this.getAttribute('onkeyup')||'', this);
+    }
+};
+
+
+var __registerKeyboardEventAttrs__ = function(elm){
+    if(elm.hasAttribute('onkeydown')){ 
+        elm.addEventListener('keydown', elm.onkeydown, false); 
+    }
+    if(elm.hasAttribute('onkeypress')){ 
+        elm.addEventListener('keypress', elm.onkeypress, false); 
+    }
+    if(elm.hasAttribute('onkeyup')){ 
+        elm.addEventListener('keyup', elm.onkeyup, false); 
+    }
+    return elm;
+};
+
+//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
+var  __keydown__ = function(element){
+    var event = new Event('KeyboardEvents');
+    event.initEvent("keydown", false, false);
+    element.dispatchEvent(event);
+};
+
+//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
+var  __keypress__ = function(element){
+    var event = new Event('KeyboardEvents');
+    event.initEvent("keypress", false, false);
+    element.dispatchEvent(event);
+};
+
+//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
+var  __keyup__ = function(element){
+    var event = new Event('KeyboardEvents');
+    event.initEvent("keyup", false, false);
+    element.dispatchEvent(event);
+};
+
+/**
+ * @name MaouseEvents
+ * @w3c:domlevel 2 
+ * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
+ */
+var MouseEvents= function(){};
+MouseEvents.prototype = {
+    onclick: function(event){
+        __eval__(this.getAttribute('onclick')||'', this);
+    },
+    ondblclick: function(event){
+        __eval__(this.getAttribute('ondblclick')||'', this);
+    },
+    onmousedown: function(event){
+        __eval__(this.getAttribute('onmousedown')||'', this);
+    },
+    onmousemove: function(event){
+        __eval__(this.getAttribute('onmousemove')||'', this);
+    },
+    onmouseout: function(event){
+        __eval__(this.getAttribute('onmouseout')||'', this);
+    },
+    onmouseover: function(event){
+        __eval__(this.getAttribute('onmouseover')||'', this);
+    },
+    onmouseup: function(event){
+        __eval__(this.getAttribute('onmouseup')||'', this);
+    }  
+};
+
+var __registerMouseEventAttrs__ = function(elm){
+    if(elm.hasAttribute('onclick')){ 
+        elm.addEventListener('click', elm.onclick, false); 
+    }
+    if(elm.hasAttribute('ondblclick')){ 
+        elm.addEventListener('dblclick', elm.ondblclick, false); 
+    }
+    if(elm.hasAttribute('onmousedown')){ 
+        elm.addEventListener('mousedown', elm.onmousedown, false); 
+    }
+    if(elm.hasAttribute('onmousemove')){ 
+        elm.addEventListener('mousemove', elm.onmousemove, false); 
+    }
+    if(elm.hasAttribute('onmouseout')){ 
+        elm.addEventListener('mouseout', elm.onmouseout, false); 
+    }
+    if(elm.hasAttribute('onmouseover')){ 
+        elm.addEventListener('mouseover', elm.onmouseover, false); 
+    }
+    if(elm.hasAttribute('onmouseup')){ 
+        elm.addEventListener('mouseup', elm.onmouseup, false); 
+    }
+    return elm;
+};
+
+
+var  __click__ = function(element){
+    var event = new Event('MouseEvents');
+    event.initEvent("click", true, true, null, 0,
+                0, 0, 0, 0, false, false, false, 
+                false, null, null);
+    element.dispatchEvent(event);
+};
+var  __mousedown__ = function(element){
+    var event = new Event('MouseEvents');
+    event.initEvent("mousedown", true, true, null, 0,
+                0, 0, 0, 0, false, false, false, 
+                false, null, null);
+    element.dispatchEvent(event);
+};
+var  __mouseup__ = function(element){
+    var event = new Event('MouseEvents');
+    event.initEvent("mouseup", true, true, null, 0,
+                0, 0, 0, 0, false, false, false, 
+                false, null, null);
+    element.dispatchEvent(event);
+};
+var  __mouseover__ = function(element){
+    var event = new Event('MouseEvents');
+    event.initEvent("mouseover", true, true, null, 0,
+                0, 0, 0, 0, false, false, false, 
+                false, null, null);
+    element.dispatchEvent(event);
+};
+var  __mousemove__ = function(element){
+    var event = new Event('MouseEvents');
+    event.initEvent("mousemove", true, true, null, 0,
+                0, 0, 0, 0, false, false, false, 
+                false, null, null);
+    element.dispatchEvent(event);
+};
+var  __mouseout__ = function(element){
+    var event = new Event('MouseEvents');
+    event.initEvent("mouseout", true, true, null, 0,
+                0, 0, 0, 0, false, false, false, 
+                false, null, null);
+    element.dispatchEvent(event);
+};
+
+/**
+ * HTMLElement - DOM Level 2
+ */
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLElement').
+		debug('HTMLElement available');    
+});
+
+/* Hack for http://www.prototypejs.org/
+ *
+ * Prototype 1.6 (the library) creates a new global Element, which causes
+ * envjs to use the wrong Element.
+ *
+ * http://envjs.lighthouseapp.com/projects/21590/tickets/108-prototypejs-wont-load-due-it-clobbering-element
+ *
+ * Options:
+ *  (1) Rename the dom/element to something else
+ *       rejected: been done before. people want Element.
+ *  (2) merge dom+html and not export Element to global namespace
+ *      (meaning we would use a local var Element in a closure, so prototype
+ *      can do what ever it wants)
+ *       rejected: want dom and html separate
+ *  (3) use global namespace (put everything under Envjs = {})
+ *       rejected: massive change
+ *  (4) use commonjs modules (similar to (3) in spirit)
+ *       rejected: massive change
+ *
+ *  or
+ *
+ *  (5) take a reference to Element during initial loading ("compile
+ *      time"), and use the reference instead of "Element".  That's
+ *      what the next line does.  We use __DOMElement__ if we need to
+ *      reference the parent class.  Only this file explcity uses
+ *      Element so this should work, and is the most minimal change I
+ *      could think of with no external API changes.
+ *
+ */
+var  __DOMElement__ = Element;
+
+exports.HTMLElement = HTMLElement = function(ownerDocument) {
+    __DOMElement__.apply(this, arguments);
+};
+
+HTMLElement.prototype = new Element();
+__extend__(HTMLElement.prototype, HTMLEvents.prototype);
+__extend__(HTMLElement.prototype, {
+    get className() {
+        return this.getAttribute("class")||'';
+    },
+    set className(value) {
+        return this.setAttribute("class",__trim__(value));
+    },
+    get dir() {
+        return this.getAttribute("dir")||"ltr";
+    },
+    set dir(val) {
+        return this.setAttribute("dir",val);
+    },
+    get id(){
+        return this.getAttribute('id') || '';
+    },
+    set id(id){
+        this.setAttribute('id', id);
+    },
+    get innerHTML(){
+        var ret = "",
+        i;
+
+        // create string containing the concatenation of the string
+        // values of each child
+        for (i=0; i < this.childNodes.length; i++) {
+            if(this.childNodes[i]){
+                if(this.childNodes[i].nodeType === Node.ELEMENT_NODE){
+                    ret += this.childNodes[i].xhtml;
+                } else if (this.childNodes[i].nodeType === Node.TEXT_NODE && i>0 &&
+                           this.childNodes[i-1].nodeType === Node.TEXT_NODE){
+                    //add a single space between adjacent text nodes
+                    ret += " "+this.childNodes[i].xml;
+                }else{
+                    ret += this.childNodes[i].xml;
+                }
+            }
+        }
+        return ret;
+    },
+    get lang() {
+        return this.getAttribute("lang");
+    },
+    set lang(val) {
+        return this.setAttribute("lang",val);
+    },
+    get offsetHeight(){
+        return Number((this.style.height || '').replace("px",""));
+    },
+    get offsetWidth(){
+        return Number((this.style.width || '').replace("px",""));
+    },
+    offsetLeft: 0,
+    offsetRight: 0,
+    get offsetParent(){
+        /* TODO */
+        return;
+    },
+    set offsetParent(element){
+        /* TODO */
+        return;
+    },
+    scrollHeight: 0,
+    scrollWidth: 0,
+    scrollLeft: 0,
+    scrollRight: 0,
+    get style(){
+        return this.getAttribute('style')||'';
+    },
+    get title() {
+        return this.getAttribute("title");
+    },
+    set title(value) {
+        return this.setAttribute("title", value);
+    },
+    get tabIndex(){
+        var tabindex = this.getAttribute('tabindex');
+        if(tabindex!==null){
+            return Number(tabindex);
+        } else {
+            return 0;
+        }
+    },
+    set tabIndex(value){
+        if (value === undefined || value === null) {
+            value = 0;
+        }
+        this.setAttribute('tabindex',Number(value));
+    },
+    get outerHTML(){
+        //Not in the specs but I'll leave it here for now.
+        return this.xhtml;
+    },
+    scrollIntoView: function(){
+        /*TODO*/
+        return;
+    },
+    toString: function(){
+        return '[object HTMLElement]';
+    },
+    get xhtml() {
+        // HTMLDocument.xhtml is non-standard
+        // This is exactly like Document.xml except the tagName has to be
+        // lower cased.  I dont like to duplicate this but its really not
+        // a simple work around between xml and html serialization via
+        // XMLSerializer (which uppercases html tags) and innerHTML (which
+        // lowercases tags)
+
+        var ret = "",
+            ns = "",
+            name = (this.tagName+"").toLowerCase(),
+            attrs,
+            attrstring = "",
+			style = false,
+            i;
+
+        // serialize namespace declarations
+        if (this.namespaceURI){
+            if((this === this.ownerDocument.documentElement) ||
+               (!this.parentNode) ||
+               (this.parentNode &&
+                (this.parentNode.namespaceURI !== this.namespaceURI))) {
+                ns = ' xmlns' + (this.prefix ? (':' + this.prefix) : '') +
+                    '="' + this.namespaceURI + '"';
+            }
+        }
+
+        // serialize Attribute declarations
+        attrs = this.attributes;
+        for(i=0;i< attrs.length;i++){
+            attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
+			if(attrs[i].name == 'style'){
+				style = true;
+			}
+        }
+		if(!style ){
+			style = this.getAttribute('style');
+			if(style){
+				attrstring += ' style="'+style+'"';
+			}
+		}
+
+        if(this.hasChildNodes()){
+            // serialize this Element
+	        //console.log('serializing childNodes for %s', name);
+            ret += "<" + name + ns + attrstring +">";
+            for(i=0;i< this.childNodes.length;i++){
+                //console.debug('xhtml for '+ this);
+                ret += 'xhtml' in this.childNodes[i] ?
+                    this.childNodes[i].xhtml :
+                    this.childNodes[i].xml;
+            }
+            ret += "</" + name + ">";
+        }else{	
+            //console.log('no childNodes to serialize for %s', name);
+            switch(name){
+            case 'script':
+            case 'noscript':
+                ret += "<" + name + ns + attrstring +"></"+name+">";
+                break;
+            default:
+                ret += "<" + name + ns + attrstring +"/>";
+            }
+        }
+
+        return ret;
+    },
+
+    /**
+     * setAttribute use a dispatch table that other tags can set to
+     *  "listen" to various values being set.  The dispatch table
+     * and registration functions are at the end of the file.
+     *
+     */
+
+    setAttribute: function(name, value) {
+        var result = __DOMElement__.prototype.setAttribute.apply(this, arguments);
+        __addNamedMap__(this.ownerDocument, this);
+        var tagname = this.tagName;
+        var callback = HTMLElement.getAttributeCallback('set', tagname, name);
+        if (callback) {
+            callback(this, value);
+        }
+    },
+    setAttributeNS: function(namespaceURI, name, value) {
+        var result = __DOMElement__.prototype.setAttributeNS.apply(this, arguments);
+        __addNamedMap__(this.ownerDocument, this);
+        var tagname = this.tagName;
+        var callback = HTMLElement.getAttributeCallback('set', tagname, name);
+        if (callback) {
+            callback(this, value);
+        }
+
+        return result;
+    },
+    setAttributeNode: function(newnode) {
+        var result = __DOMElement__.prototype.setAttributeNode.apply(this, arguments);
+        __addNamedMap__(this.ownerDocument, this);
+        var tagname = this.tagName;
+        var callback = HTMLElement.getAttributeCallback('set', tagname, newnode.name);
+        if (callback) {
+            callback(this, newnode.value);
+        }
+        return result;
+    },
+    setAttributeNodeNS: function(newnode) {
+        var result = __DOMElement__.prototype.setAttributeNodeNS.apply(this, arguments);
+        __addNamedMap__(this.ownerDocument, this);
+        var tagname = this.tagName;
+        var callback = HTMLElement.getAttributeCallback('set', tagname, newnode.name);
+        if (callback) {
+            callback(this, newnode.value);
+        }
+        return result;
+    },
+    removeAttribute: function(name) {
+        __removeNamedMap__(this.ownerDocument, this);
+        return __DOMElement__.prototype.removeAttribute.apply(this, arguments);
+    },
+    removeAttributeNS: function(namespace, localname) {
+        __removeNamedMap__(this.ownerDocument, this);
+        return __DOMElement__.prototype.removeAttributeNS.apply(this, arguments);
+    },
+    removeAttributeNode: function(name) {
+        __removeNamedMap__(this.ownerDocument, this);
+        return __DOMElement__.prototype.removeAttributeNode.apply(this, arguments);
+    },
+    removeChild: function(oldChild) {
+        __removeNamedMap__(this.ownerDocument, oldChild);
+        return __DOMElement__.prototype.removeChild.apply(this, arguments);
+    },
+    importNode: function(othernode, deep) {
+        var newnode = __DOMElement__.prototype.importNode.apply(this, arguments);
+        __addNamedMap__(this.ownerDocument, newnode);
+        return newnode;
+    },
+
+    // not actually sure if this is needed or not
+    replaceNode: function(newchild, oldchild) {
+        var newnode = __DOMElement__.prototype.replaceNode.apply(this, arguments);
+        __removeNamedMap__(this.ownerDocument, oldchild);
+        __addNamedMap__(this.ownerDocument, newnode);
+                return newnode;
+    }
+});
+
+
+HTMLElement.attributeCallbacks = {};
+HTMLElement.registerSetAttribute = function(tag, attrib, callbackfn) {
+    HTMLElement.attributeCallbacks[tag + ':set:' + attrib] = callbackfn;
+};
+HTMLElement.registerRemoveAttribute = function(tag, attrib, callbackfn) {
+    HTMLElement.attributeCallbacks[tag + ':remove:' + attrib] = callbackfn;
+};
+
+/**
+ * This is really only useful internally
+ *
+ */
+HTMLElement.getAttributeCallback = function(type, tag, attrib) {
+    return HTMLElement.attributeCallbacks[tag + ':' + type + ':' + attrib] || null;
+};
+
+}(/*HTMLElement*/));
+/*
+ * HTMLCollection
+ *
+ * HTML5 -- 2.7.2.1 HTMLCollection
+ * http://dev.w3.org/html5/spec/Overview.html#htmlcollection
+ * http://dev.w3.org/html5/spec/Overview.html#collections
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLCollection').
+		debug('HTMLCollection available');    
+});
+
+exports.HTMLCollection = HTMLCollection = function(nodelist, type) {
+	__extend__(nodelist,{
+		namedItem: function (name) {
+	        return this[name] || null;
+	    },
+
+	    toString: function() {
+	        return '[object HTMLCollection]';
+	    }
+	});
+    var n;
+    for (var i=0; i<nodelist.length; i++) {
+        n = nodelist[i].id;
+        if (n && !nodelist[n]) {
+            nodelist[n] = nodelist[i];
+        }
+        n = nodelist[i].name;
+        if (n && !nodelist[n]) {
+            nodelist[n] = nodelist[i];
+        }
+    }
+	return nodelist;
+};
+
+HTMLCollection.prototype = new NodeList();
+__extend__(HTMLCollection.prototype, {
+
+    namedItem: function (name) {
+        return this[name] || null;
+    },
+
+    toString: function() {
+        return '[object HTMLCollection]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLCollection*/));
+
+/*
+ *  a set of convenience classes to centralize implementation of
+ * properties and methods across multiple in-form elements
+ *
+ *  the hierarchy of related HTML elements and their members is as follows:
+ *
+ * Condensed Version
+ *
+ *  HTMLInputCommon
+ *     * legent (no value attr)
+ *     * fieldset (no value attr)
+ *     * label (no value attr)
+ *     * option (custom value)
+ *  HTMLTypeValueInputs (extends InputCommon)
+ *     * select  (custom value)
+ *     * button (just sets value)
+ *  HTMLInputAreaCommon (extends TypeValueIput)
+ *     * input  (custom)
+ *     * textarea (just sets value)
+ *
+ * -----------------------
+ *    HTMLInputCommon:  common to all elements
+ *       .form
+ *
+ *    <legend>
+ *          [common plus:]
+ *       .align
+ *
+ *    <fieldset>
+ *          [identical to "legend" plus:]
+ *       .margin
+ *
+ *
+ *  ****
+ *
+ *    <label>
+ *          [common plus:]
+ *       .dataFormatAs
+ *       .htmlFor
+ *       [plus data properties]
+ *
+ *    <option>
+ *          [common plus:]
+ *       .defaultSelected
+ *       .index
+ *       .label
+ *       .selected
+ *       .text
+ *       .value   // unique implementation, not duplicated
+ *       .form    // unique implementation, not duplicated
+ *  ****
+ *
+ *    HTMLTypeValueInputs:  common to remaining elements
+ *          [common plus:]
+ *       .name
+ *       .type
+ *       .value
+ *       [plus data properties]
+ *
+ *
+ *    <select>
+ *       .length
+ *       .multiple
+ *       .options[]
+ *       .selectedIndex
+ *       .add()
+ *       .remove()
+ *       .item()                                       // unimplemented
+ *       .namedItem()                                  // unimplemented
+ *       [plus ".onchange"]
+ *       [plus focus events]
+ *       [plus data properties]
+ *       [plus ".size"]
+ *
+ *    <button>
+ *       .dataFormatAs   // duplicated from above, oh well....
+ *       [plus ".status", ".createTextRange()"]
+ *
+ *  ****
+ *
+ *    HTMLInputAreaCommon:  common to remaining elements
+ *       .defaultValue
+ *       .readOnly
+ *       .handleEvent()                                // unimplemented
+ *       .select()
+ *       .onselect
+ *       [plus ".size"]
+ *       [plus ".status", ".createTextRange()"]
+ *       [plus focus events]
+ *       [plus ".onchange"]
+ *
+ *    <textarea>
+ *       .cols
+ *       .rows
+ *       .wrap                                         // unimplemented
+ *       .onscroll                                     // unimplemented
+ *
+ *    <input>
+ *       .alt
+ *       .accept                                       // unimplemented
+ *       .checked
+ *       .complete                                     // unimplemented
+ *       .defaultChecked
+ *       .dynsrc                                       // unimplemented
+ *       .height
+ *       .hspace                                       // unimplemented
+ *       .indeterminate                                // unimplemented
+ *       .loop                                         // unimplemented
+ *       .lowsrc                                       // unimplemented
+ *       .maxLength
+ *       .src
+ *       .start                                        // unimplemented
+ *       .useMap
+ *       .vspace                                       // unimplemented
+ *       .width
+ *       .onclick
+ *       [plus ".size"]
+ *       [plus ".status", ".createTextRange()"]
+
+ *    [data properties]                                // unimplemented
+ *       .dataFld
+ *       .dataSrc
+
+ *    [status stuff]                                   // unimplemented
+ *       .status
+ *       .createTextRange()
+
+ *    [focus events]
+ *       .onblur
+ *       .onfocus
+
+ */
+
+
+
+var inputElements_dataProperties = {};
+var inputElements_status = {};
+
+var inputElements_onchange = {
+    onchange: function(event){
+        __eval__(this.getAttribute('onchange')||'', this);
+    }
+};
+
+var inputElements_size = {
+    get size(){
+        return Number(this.getAttribute('size'));
+    },
+    set size(value){
+        this.setAttribute('size',value);
+    }
+};
+
+var inputElements_focusEvents = {
+    blur: function(){
+        __blur__(this);
+
+        if (this._oldValue != this.value){
+            var event = document.createEvent("HTMLEvents");
+            event.initEvent("change", true, true);
+            this.dispatchEvent( event );
+        }
+    },
+    focus: function(){
+        __focus__(this);
+        this._oldValue = this.value;
+    }
+};
+
+
+/*
+* HTMLInputCommon - convenience class, not DOM
+*/
+var HTMLInputCommon = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLInputCommon.prototype = new HTMLElement();
+__extend__(HTMLInputCommon.prototype, {
+    get form() {
+        // parent can be null if element is outside of a form
+        // or not yet added to the document
+        var parent = this.parentNode;
+        while (parent && parent.nodeName.toLowerCase() !== 'form') {
+            parent = parent.parentNode;
+        }
+        return parent;
+    },
+    get accessKey(){
+        return this.getAttribute('accesskey');
+    },
+    set accessKey(value){
+        this.setAttribute('accesskey',value);
+    },
+    get access(){
+        return this.getAttribute('access');
+    },
+    set access(value){
+        this.setAttribute('access', value);
+    },
+    get disabled(){
+        return (this.getAttribute('disabled') === 'disabled');
+    },
+    set disabled(value){
+        this.setAttribute('disabled', (value ? 'disabled' :''));
+    }
+});
+
+
+
+
+/*
+* HTMLTypeValueInputs - convenience class, not DOM
+*/
+var HTMLTypeValueInputs = function(ownerDocument) {
+
+    HTMLInputCommon.apply(this, arguments);
+
+    this._oldValue = "";
+};
+HTMLTypeValueInputs.prototype = new HTMLInputCommon();
+__extend__(HTMLTypeValueInputs.prototype, inputElements_size);
+__extend__(HTMLTypeValueInputs.prototype, inputElements_status);
+__extend__(HTMLTypeValueInputs.prototype, inputElements_dataProperties);
+__extend__(HTMLTypeValueInputs.prototype, {
+    get name(){
+        return this.getAttribute('name')||'';
+    },
+    set name(value){
+        this.setAttribute('name',value);
+    }
+});
+
+
+/*
+* HTMLInputAreaCommon - convenience class, not DOM
+*/
+var HTMLInputAreaCommon = function(ownerDocument) {
+    HTMLTypeValueInputs.apply(this, arguments);
+};
+HTMLInputAreaCommon.prototype = new HTMLTypeValueInputs();
+__extend__(HTMLInputAreaCommon.prototype, inputElements_focusEvents);
+__extend__(HTMLInputAreaCommon.prototype, inputElements_onchange);
+__extend__(HTMLInputAreaCommon.prototype, {
+    get readOnly(){
+        return (this.getAttribute('readonly')=='readonly');
+    },
+    set readOnly(value){
+        this.setAttribute('readonly', (value ? 'readonly' :''));
+    },
+    select:function(){
+        __select__(this);
+
+    }
+});
+
+
+var __updateFormForNamedElement__ = function(node, value) {
+    if (node.form) {
+        // to check for ID or NAME attribute too
+        // not, then nothing to do
+
+		//THATCHER - I believe this is deprecated by the new
+		//internally managed indexes on elements
+        //node.form._updateElements();
+    }
+};
+
+/**
+ * HTMLAnchorElement - DOM Level 2
+ *
+ * HTML5: 4.6.1 The a element
+ * http://dev.w3.org/html5/spec/Overview.html#the-a-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLAnchorElement').
+		debug('HTMLAnchorElement available');    
+});
+
+exports.HTMLAnchorElement = HTMLAnchorElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLAnchorElement.prototype = new HTMLElement();
+__extend__(HTMLAnchorElement.prototype, {
+    get accessKey() {
+        return this.getAttribute("accesskey")||'';
+    },
+    set accessKey(val) {
+        return this.setAttribute("accesskey",val);
+    },
+    get charset() {
+        return this.getAttribute("charset")||'';
+    },
+    set charset(val) {
+        return this.setAttribute("charset",val);
+    },
+    get coords() {
+        return this.getAttribute("coords")||'';
+    },
+    set coords(val) {
+        return this.setAttribute("coords",val);
+    },
+    get href() {
+        var link = this.getAttribute('href');
+        if (!link) {
+            return '';
+        }
+        return Envjs.uri(link, this.ownerDocument.location.toString());
+    },
+    set href(val) {
+        return this.setAttribute("href", val);
+    },
+    get hreflang() {
+        return this.getAttribute("hreflang")||'';
+    },
+    set hreflang(val) {
+        this.setAttribute("hreflang",val);
+    },
+    get name() {
+        return this.getAttribute("name")||'';
+    },
+    set name(val) {
+        this.setAttribute("name",val);
+    },
+    get rel() {
+        return this.getAttribute("rel")||'';
+    },
+    set rel(val) {
+        return this.setAttribute("rel", val);
+    },
+    get rev() {
+        return this.getAttribute("rev")||'';
+    },
+    set rev(val) {
+        return this.setAttribute("rev",val);
+    },
+    get shape() {
+        return this.getAttribute("shape")||'';
+    },
+    set shape(val) {
+        return this.setAttribute("shape",val);
+    },
+    get target() {
+        return this.getAttribute("target")||'';
+    },
+    set target(val) {
+        return this.setAttribute("target",val);
+    },
+    get type() {
+        return this.getAttribute("type")||'';
+    },
+    set type(val) {
+        return this.setAttribute("type",val);
+    },
+    blur: function() {
+        __blur__(this);
+    },
+    focus: function() {
+        __focus__(this);
+    },
+	click: function(){
+		__click__(this);
+	},
+    /**
+     * Unlike other elements, toString returns the href
+     */
+    toString: function() {
+        return this.href;
+    }
+});
+
+}(/*Envjs.HTML.HTMLAnchorElement*/));
+
+/*
+ * HTMLAreaElement - DOM Level 2
+ *
+ * HTML5: 4.8.13 The area element
+ * http://dev.w3.org/html5/spec/Overview.html#the-area-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLAreaElement').
+		debug('HTMLAreaElement available');    
+});
+
+exports.HTMLAreaElement = HTMLAreaElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLAreaElement.prototype = new HTMLElement();
+__extend__(HTMLAreaElement.prototype, {
+    get accessKey(){
+        return this.getAttribute('accesskey');
+    },
+    set accessKey(value){
+        this.setAttribute('accesskey',value);
+    },
+    get alt(){
+        return this.getAttribute('alt') || '';
+    },
+    set alt(value){
+        this.setAttribute('alt',value);
+    },
+    get coords(){
+        return this.getAttribute('coords');
+    },
+    set coords(value){
+        this.setAttribute('coords',value);
+    },
+    get href(){
+        return this.getAttribute('href') || '';
+    },
+    set href(value){
+        this.setAttribute('href',value);
+    },
+    get noHref(){
+        return this.hasAttribute('href');
+    },
+    get shape(){
+        //TODO
+        return 0;
+    },
+    /*get tabIndex(){
+      return this.getAttribute('tabindex');
+      },
+      set tabIndex(value){
+      this.setAttribute('tabindex',value);
+      },*/
+    get target(){
+        return this.getAttribute('target');
+    },
+    set target(value){
+        this.setAttribute('target',value);
+    },
+
+    /**
+     * toString like <a>, returns the href
+     */
+    toString: function() {
+        return this.href;
+    }
+});
+
+}(/*Envjs.HTML.HTMLElement*/));
+
+/*
+ * HTMLBaseElement - DOM Level 2
+ *
+ * HTML5: 4.2.3 The base element
+ * http://dev.w3.org/html5/spec/Overview.html#the-base-element
+ */
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLBaseElement').
+		debug('HTMLBaseElement available');    
+});
+
+exports.HTMLBaseElement = HTMLBaseElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLBaseElement.prototype = new HTMLElement();
+__extend__(HTMLBaseElement.prototype, {
+    get href(){
+        return this.getAttribute('href');
+    },
+    set href(value){
+        this.setAttribute('href',value);
+    },
+    get target(){
+        return this.getAttribute('target');
+    },
+    set target(value){
+        this.setAttribute('target',value);
+    },
+    toString: function() {
+        return '[object HTMLBaseElement]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLBaseElement*/));
+
+/*
+ * HTMLQuoteElement - DOM Level 2
+ * HTML5: 4.5.5 The blockquote element
+ * http://dev.w3.org/html5/spec/Overview.html#htmlquoteelement
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLQuoteElement').
+		debug('HTMLQuoteElement available');    
+});
+
+exports.HTMLQuoteElement = HTMLQuoteElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLQuoteElement.prototype = new HTMLElement();
+__extend__(HTMLQuoteElement.prototype, {
+    /**
+     * Quoth the spec:
+     * """
+     * If the cite attribute is present, it must be a valid URL. To
+     * obtain the corresponding citation link, the value of the
+     * attribute must be resolved relative to the element. User agents
+     * should allow users to follow such citation links.
+     * """
+     *
+     * TODO: normalize
+     *
+     */
+    get cite() {
+        return this.getAttribute('cite') || '';
+    },
+
+    set cite(value) {
+        this.setAttribute('cite', value);
+    },
+    toString: function() {
+        return '[object HTMLQuoteElement]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLQuoteElement*/));
+
+/*
+ * HTMLBodyElement - DOM Level 2
+ * HTML5: http://dev.w3.org/html5/spec/Overview.html#the-body-element-0
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLBodyElement').
+		debug('HTMLBodyElement available');    
+});
+
+exports.HTMLBodyElement = HTMLBodyElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLBodyElement.prototype = new HTMLElement();
+__extend__(HTMLBodyElement.prototype, {
+    onload: function(event){
+        __eval__(this.getAttribute('onload')||'', this);
+    },
+    onunload: function(event){
+        __eval__(this.getAttribute('onunload')||'', this);
+    },
+    toString: function() {
+        return '[object HTMLBodyElement]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLBodyElement*/));
+
+/*
+ * HTMLBRElement
+ * HTML5: 4.5.3 The hr Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-br-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLBRElement').
+		debug('HTMLBRElement available');    
+});
+
+exports.HTMLBRElement = HTMLBRElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLBRElement.prototype = new HTMLElement();
+__extend__(HTMLBRElement.prototype, {
+
+    // no additional properties or elements
+    toString: function() {
+        return '[object HTMLBRElement]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLBRElement*/));
+
+/*
+ * HTMLButtonElement - DOM Level 2
+ *
+ * HTML5: 4.10.6 The button element
+ * http://dev.w3.org/html5/spec/Overview.html#the-button-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLButtonElement').
+		debug('HTMLButtonElement available');    
+});
+
+exports.HTMLButtonElement = HTMLButtonElement = function(ownerDocument) {
+    HTMLTypeValueInputs.apply(this, arguments);
+};
+HTMLButtonElement.prototype = new HTMLTypeValueInputs();
+__extend__(HTMLButtonElement.prototype, inputElements_status);
+__extend__(HTMLButtonElement.prototype, {
+    get dataFormatAs(){
+        return this.getAttribute('dataFormatAs');
+    },
+    set dataFormatAs(value){
+        this.setAttribute('dataFormatAs',value);
+    },
+    get type() {
+        return this.getAttribute('type') || 'submit';
+    },
+    set type(value) {
+        this.setAttribute('type', value);
+    },
+    get value() {
+        return this.getAttribute('value') || '';
+    },
+    set value(value) {
+        this.setAttribute('value', value);
+    },
+    toString: function() {
+        return '[object HTMLButtonElement]';
+    }
+});
+
+// Named Element Support
+HTMLElement.registerSetAttribute('BUTTON', 'name', __updateFormForNamedElement__);
+
+}(/*Envjs.HTML.HTMLButtonElement*/));
+
+/*
+ * HTMLCanvasElement - DOM Level 2
+ * HTML5: 4.8.11 The canvas element
+ * http://dev.w3.org/html5/spec/Overview.html#the-canvas-element
+ */
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.CanvasRenderingContext2D').
+		debug('CanvasRenderingContext2D available');    
+});
+/*
+ * This is a "non-Abstract Base Class". For an implmentation that actually
+ * did something, all these methods would need to over-written
+ */
+exports.CanvasRenderingContext2D = CanvasRenderingContext2D = function() {
+    // NOP
+};
+
+var nullfunction = function() {};
+
+CanvasRenderingContext2D.prototype = {
+    addColorStop: nullfunction,
+    arc: nullfunction,
+    beginPath: nullfunction,
+    bezierCurveTo: nullfunction,
+    clearRect: nullfunction,
+    clip: nullfunction,
+    closePath: nullfunction,
+    createLinearGradient: nullfunction,
+    createPattern: nullfunction,
+    createRadialGradient: nullfunction,
+    drawImage: nullfunction,
+    fill: nullfunction,
+    fillRect:  nullfunction,
+    lineTo: nullfunction,
+    moveTo: nullfunction,
+    quadraticCurveTo: nullfunction,
+    rect: nullfunction,
+    restore: nullfunction,
+    rotate: nullfunction,
+    save: nullfunction,
+    scale: nullfunction,
+    setTranform: nullfunction,
+    stroke: nullfunction,
+    strokeRect: nullfunction,
+    transform: nullfunction,
+    translate: nullfunction,
+
+    toString: function() {
+        return '[object CanvasRenderingContext2D]';
+    }
+};
+
+}(/*Envjs.HTML.CanvasRenderingContext2D*/));
+
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLCanvasElement').
+		debug('HTMLCanvasElement available');    
+});
+
+exports.HTMLCanvasElement = HTMLCanvasElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLCanvasElement.prototype = new HTMLElement();
+__extend__(HTMLCanvasElement.prototype, {
+
+    getContext: function(ctxtype) {
+        if (ctxtype === '2d') {
+            return new CanvasRenderingContext2D();
+        }
+        throw new Error("Unknown context type of '" + ctxtype + '"');
+    },
+
+    get height(){
+        return Number(this.getAttribute('height')|| 150);
+    },
+    set height(value){
+        this.setAttribute('height', value);
+    },
+
+    get width(){
+        return Number(this.getAttribute('width')|| 300);
+    },
+    set width(value){
+        this.setAttribute('width', value);
+    },
+
+    toString: function() {
+        return '[object HTMLCanvasElement]';
+    }
+
+});
+
+}(/*Envjs.HTML.HTMLCanvasElement*/));
+
+
+/*
+* HTMLTableColElement - DOM Level 2
+*
+* HTML5: 4.9.3 The colgroup element
+* http://dev.w3.org/html5/spec/Overview.html#the-colgroup-element
+*/
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableColElement').
+		debug('HTMLTableColElement available');    
+});
+
+exports.HTMLTableColElement = HTMLTableColElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableColElement.prototype = new HTMLElement();
+__extend__(HTMLTableColElement.prototype, {
+    get align(){
+        return this.getAttribute('align');
+    },
+    set align(value){
+        this.setAttribute('align', value);
+    },
+    get ch(){
+        return this.getAttribute('ch');
+    },
+    set ch(value){
+        this.setAttribute('ch', value);
+    },
+    get chOff(){
+        return this.getAttribute('ch');
+    },
+    set chOff(value){
+        this.setAttribute('ch', value);
+    },
+    get span(){
+        return this.getAttribute('span');
+    },
+    set span(value){
+        this.setAttribute('span', value);
+    },
+    get vAlign(){
+        return this.getAttribute('valign');
+    },
+    set vAlign(value){
+        this.setAttribute('valign', value);
+    },
+    get width(){
+        return this.getAttribute('width');
+    },
+    set width(value){
+        this.setAttribute('width', value);
+    },
+    toString: function() {
+        return '[object HTMLTableColElement]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLTableColElement*/));
+
+
+/*
+ * HTMLModElement - DOM Level 2
+ * http://dev.w3.org/html5/spec/Overview.html#htmlmodelement
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLModElement').
+		debug('HTMLModElement available');    
+});
+
+exports.HTMLModElement = HTMLModElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLModElement.prototype = new HTMLElement();
+__extend__(HTMLModElement.prototype, {
+    get cite(){
+        return this.getAttribute('cite');
+    },
+    set cite(value){
+        this.setAttribute('cite', value);
+    },
+    get dateTime(){
+        return this.getAttribute('datetime');
+    },
+    set dateTime(value){
+        this.setAttribute('datetime', value);
+    },
+    toString: function() {
+        return '[object HTMLModElement]';
+    }
+});
+
+}(/*Envjs.HTML.HTMLModElement*/));
+
+/*
+ * HTMLDivElement - DOM Level 2
+ * HTML5: 4.5.12 The Div Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-div-element
+ */
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLDivElement').
+		debug('HTMLDivElement available');    
+});
+
+exports.HTMLDivElement = HTMLDivElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLDivElement.prototype = new HTMLElement();
+__extend__(HTMLDivElement.prototype, {
+    get align(){
+        return this.getAttribute('align') || 'left';
+    },
+    set align(value){
+        this.setAttribute('align', value);
+    },
+    toString: function() {
+        return '[object HTMLDivElement]';
+    }
+});
+
+}(/*HTMLDivElement*/));
+
+/*
+ * HTMLDListElement
+ * HTML5: 4.5.7 The dl Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-dl-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLDListElement').
+		debug('HTMLDListElement available');    
+});
+
+exports.HTMLDListElement = HTMLDListElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLDListElement.prototype = new HTMLElement();
+__extend__(HTMLDListElement.prototype, {
+
+    // no additional properties or elements
+
+    toString: function() {
+        return '[object HTMLDListElement]';
+    }
+});
+
+}(/*HTMLDListElement*/));
+
+/**
+ * HTMLLegendElement - DOM Level 2
+ *
+ * HTML5: 4.10.3 The legend element
+ * http://dev.w3.org/html5/spec/Overview.html#the-legend-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLLegendElement').
+		debug('HTMLLegendElement available');    
+});
+
+exports.HTMLLegendElement = HTMLLegendElement = function(ownerDocument) {
+    HTMLInputCommon.apply(this, arguments);
+};
+HTMLLegendElement.prototype = new HTMLInputCommon();
+__extend__(HTMLLegendElement.prototype, {
+    get align(){
+        return this.getAttribute('align');
+    },
+    set align(value){
+        this.setAttribute('align',value);
+    }
+});
+
+}(/*HTMLLegendElement*/));
+
+/*
+ * HTMLFieldSetElement - DOM Level 2
+ *
+ * HTML5: 4.10.2 The fieldset element
+ * http://dev.w3.org/html5/spec/Overview.html#the-fieldset-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLFieldSetElement').
+		debug('HTMLFieldSetElement available');    
+});
+
+exports.HTMLFieldSetElement = HTMLFieldSetElement = function(ownerDocument) {
+    HTMLLegendElement.apply(this, arguments);
+};
+HTMLFieldSetElement.prototype = new HTMLLegendElement();
+__extend__(HTMLFieldSetElement.prototype, {
+    get margin(){
+        return this.getAttribute('margin');
+    },
+    set margin(value){
+        this.setAttribute('margin',value);
+    },
+    toString: function() {
+        return '[object HTMLFieldSetElement]';
+    }
+});
+
+// Named Element Support
+HTMLElement.registerSetAttribute('FIELDSET', 'name', __updateFormForNamedElement__);
+
+}(/*HTMLFieldSetElement*/));
+
+/*
+ * HTMLFormElement - DOM Level 2
+ *
+ * HTML5: http://dev.w3.org/html5/spec/Overview.html#the-form-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLFormElement').
+		debug('HTMLFormElement available');    
+});
+
+exports.HTMLFormElement = HTMLFormElement = function(ownerDocument){
+    HTMLElement.apply(this, arguments);
+
+    //TODO: on __elementPopped__ from the parser
+    //      we need to determine all the forms default
+    //      values
+};
+HTMLFormElement.prototype = new HTMLElement();
+__extend__(HTMLFormElement.prototype,{
+    get acceptCharset(){
+        return this.getAttribute('accept-charset');
+    },
+    set acceptCharset(acceptCharset) {
+        this.setAttribute('accept-charset', acceptCharset);
+    },
+    get action() {
+        return this.getAttribute('action');
+    },
+    set action(action){
+        this.setAttribute('action', action);
+    },
+
+    get enctype() {
+        return this.getAttribute('enctype');
+    },
+    set enctype(enctype) {
+        this.setAttribute('enctype', enctype);
+    },
+    get method() {
+        return this.getAttribute('method');
+    },
+    set method(method) {
+        this.setAttribute('method', method);
+    },
+    get name() {
+        return this.getAttribute("name");
+    },
+    set name(val) {
+        return this.setAttribute("name",val);
+    },
+    get target() {
+        return this.getAttribute("target");
+    },
+    set target(val) {
+        return this.setAttribute("target",val);
+    },
+
+    /**
+     * "Named Elements"
+     *
+     */
+    /**
+     * returns HTMLFormControlsCollection
+     * http://dev.w3.org/html5/spec/Overview.html#dom-form-elements
+     *
+     * button fieldset input keygen object output select textarea
+     */
+    get elements() {
+        var nodes = this.getElementsByTagName('*');
+        var alist = new NodeList(this.ownerDocument, this);
+        var i, tmp;
+        for (i = 0; i < nodes.length; ++i) {
+            // would like to replace switch with something else
+            //  since it's redundant with the SetAttribute callbacks
+            switch (nodes[i].nodeName) {
+            case 'BUTTON':
+            case 'FIELDSET':
+            case 'INPUT':
+            case 'KEYGEN':
+            case 'OBJECT':
+            case 'OUTPUT':
+            case 'SELECT':
+            case 'TEXTAREA':
+                alist.push(nodes[i]);
+                this[i] = nodes[i];
+                tmp = nodes[i].name;
+                if (tmp) {
+                    this[tmp] = nodes[i];
+                }
+                tmp = nodes[i].id;
+                if (tmp) {
+                    this[tmp] = nodes[i];
+                }
+            }
+        }
+        return new HTMLCollection(alist);
+    },
+    _updateElements: function() {
+        var elm = this.elements;
+    },
+    
+    /*get elements() {
+        //console.log('getting form input type elements.');
+        if(!(this._indexes_['$elements'])){
+			this._indexes_['$elements'] = new NodeList(this.ownerDocument, null);
+		}
+        return new HTMLCollection(this._indexes_['$elements']);
+    },*/
+    get length() {
+        return this.elements.length;
+    },
+    item: function(idx) {
+        return this.elements[idx];
+    },
+    namedItem: function(aname) {
+        return this.elements.namedItem(aname);
+    },
+    toString: function() {
+        return '[object HTMLFormElement]';
+    },
+    submit: function() {
+        var event = __submit__(this);
+    },
+    reset: function() {
+        //TODO: this needs to reset all values specified in the form
+        //      to those which where set as defaults
+        __reset__(this);
+    },
+    onsubmit: HTMLEvents.prototype.onsubmit,
+    onreset: HTMLEvents.prototype.onreset
+});
+
+}(/*HTMLFormElement*/));
+
+/**
+ * HTMLFrameElement - DOM Level 2
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLFrameElement').debug('HTMLFrameElement available');    
+});
+
+exports.HTMLFrameElement = HTMLFrameElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+    // this is normally a getter but we need to be
+    // able to set it to correctly emulate behavior
+    this.contentDocument = null;
+    this.contentWindow = null;
+};
+HTMLFrameElement.prototype = new HTMLElement();
+__extend__(HTMLFrameElement.prototype, {
+
+    get frameBorder(){
+        return this.getAttribute('border')||"";
+    },
+    set frameBorder(value){
+        this.setAttribute('border', value);
+    },
+    get longDesc(){
+        return this.getAttribute('longdesc')||"";
+    },
+    set longDesc(value){
+        this.setAttribute('longdesc', value);
+    },
+    get marginHeight(){
+        return this.getAttribute('marginheight')||"";
+    },
+    set marginHeight(value){
+        this.setAttribute('marginheight', value);
+    },
+    get marginWidth(){
+        return this.getAttribute('marginwidth')||"";
+    },
+    set marginWidth(value){
+        this.setAttribute('marginwidth', value);
+    },
+    get name(){
+        return this.getAttribute('name')||"";
+    },
+    set name(value){
+        this.setAttribute('name', value);
+    },
+    get noResize(){
+        return this.getAttribute('noresize')||false;
+    },
+    set noResize(value){
+        this.setAttribute('noresize', value);
+    },
+    get scrolling(){
+        return this.getAttribute('scrolling')||"";
+    },
+    set scrolling(value){
+        this.setAttribute('scrolling', value);
+    },
+    get src(){
+        return this.getAttribute('src')||"";
+    },
+    set src(value){
+        this.setAttribute('src', value);
+    },
+    toString: function(){
+        return '[object HTMLFrameElement]';
+    },
+    onload: HTMLEvents.prototype.onload
+});
+
+}(/*HTMLFrameElement*/));
+/**
+ * HTMLFrameSetElement - DOM Level 2
+ *
+ * HTML5: 12.3.3 Frames
+ * http://dev.w3.org/html5/spec/Overview.html#frameset
+ */
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLFrameSetElement').debug('HTMLFrameSetElement available');    
+});
+
+exports.HTMLFrameSetElement = HTMLFrameSetElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLFrameSetElement.prototype = new HTMLElement();
+__extend__(HTMLFrameSetElement.prototype, {
+    get cols(){
+        return this.getAttribute('cols');
+    },
+    set cols(value){
+        this.setAttribute('cols', value);
+    },
+    get rows(){
+        return this.getAttribute('rows');
+    },
+    set rows(value){
+        this.setAttribute('rows', value);
+    },
+    toString: function() {
+        return '[object HTMLFrameSetElement]';
+    }
+});
+
+}(/*HTMLFrameSetElement*/));
+
+/*
+ * HTMLHeadingElement
+ * HTML5: 4.4.6 The h1, h2, h3, h4, h5, and h6 elements
+ * http://dev.w3.org/html5/spec/Overview.html#the-h1-h2-h3-h4-h5-and-h6-elements
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLHeadingElement').
+		debug('HTMLHeadingElement available');    
+});
+
+exports.HTMLHeadingElement = HTMLHeadingElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLHeadingElement.prototype = new HTMLElement();
+__extend__(HTMLHeadingElement.prototype, {
+    toString: function() {
+        return '[object HTMLHeadingElement]';
+    }
+});
+
+}(/*HTMLHeadingElement*/));
+
+/**
+ * HTMLHeadElement - DOM Level 2
+ *
+ * HTML5: 4.2.1 The head element
+ * http://dev.w3.org/html5/spec/Overview.html#the-head-element-0
+ */
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLHeadElement').
+		debug('HTMLHeadElement available');    
+});
+
+exports.HTMLHeadElement = HTMLHeadElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLHeadElement.prototype = new HTMLElement();
+__extend__(HTMLHeadElement.prototype, {
+    get profile(){
+        return this.getAttribute('profile');
+    },
+    set profile(value){
+        this.setAttribute('profile', value);
+    },
+    toString: function(){
+        return '[object HTMLHeadElement]';
+    }
+});
+
+}(/*HTMLHeadElement*/));
+
+/*
+ * HTMLHRElement
+ * HTML5: 4.5.2 The hr Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-hr-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLHRElement').
+		debug('HTMLHRElement available');    
+});
+
+exports.HTMLHRElement = HTMLHRElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLHRElement.prototype = new HTMLElement();
+__extend__(HTMLHRElement.prototype, {
+    // no additional properties or elements
+    toString: function() {
+        return '[object HTMLHRElement]';
+    }
+});
+
+}(/*HTMLHRElement*/));
+
+/*
+ * HTMLHtmlElement
+ * HTML5: 4.1.1 The Html Element
+ * http://dev.w3.org/html5/spec/Overview.html#htmlhtmlelement
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLHtmlElement').
+		debug('HTMLHtmlElement available');    
+});
+
+exports.HTMLHtmlElement = HTMLHtmlElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLHtmlElement.prototype = new HTMLElement();
+__extend__(HTMLHtmlElement.prototype, {
+
+    // no additional properties or elements
+    toString: function() {
+        return '[object HTMLHtmlElement]';
+    }
+});
+
+}(/*HTMLHtmlElement*/));
+
+/*
+ * HTMLIFrameElement - DOM Level 2
+ *
+ * HTML5: 4.8.3 The iframe element
+ * http://dev.w3.org/html5/spec/Overview.html#the-iframe-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLIFrameElement').
+		debug('HTMLIFrameElement available');    
+});
+
+exports.HTMLIFrameElement = HTMLIFrameElement = function(ownerDocument) {
+    HTMLFrameElement.apply(this, arguments);
+};
+HTMLIFrameElement.prototype = new HTMLFrameElement();
+__extend__(HTMLIFrameElement.prototype, {
+    get height() {
+        return this.getAttribute("height") || "";
+    },
+    set height(val) {
+        return this.setAttribute("height",val);
+    },
+    get width() {
+        return this.getAttribute("width") || "";
+    },
+    set width(val) {
+        return this.setAttribute("width",val);
+    },
+    toString: function(){
+        return '[object HTMLIFrameElement]';
+    }
+});
+
+}(/*HTMLIFrameElement*/));
+
+/**
+ * HTMLImageElement and Image
+ */
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLImageElement').debug('HTMLImageElement available');    
+});
+
+exports.HTMLImageElement = HTMLImageElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLImageElement.prototype = new HTMLElement();
+__extend__(HTMLImageElement.prototype, {
+    get alt(){
+        return this.getAttribute('alt');
+    },
+    set alt(value){
+        this.setAttribute('alt', value);
+    },
+    get height(){
+        return parseInt(this.getAttribute('height'), 10) || 0;
+    },
+    set height(value){
+        this.setAttribute('height', value);
+    },
+    get isMap(){
+        return this.hasAttribute('map');
+    },
+    set useMap(value){
+        this.setAttribute('map', value);
+    },
+    get longDesc(){
+        return this.getAttribute('longdesc');
+    },
+    set longDesc(value){
+        this.setAttribute('longdesc', value);
+    },
+    get name(){
+        return this.getAttribute('name');
+    },
+    set name(value){
+        this.setAttribute('name', value);
+    },
+    get src(){
+        return this.getAttribute('src') || '';
+    },
+    set src(value){
+        this.setAttribute('src', value);
+    },
+    get width(){
+        return parseInt(this.getAttribute('width'), 10) || 0;
+    },
+    set width(value){
+        this.setAttribute('width', value);
+    },
+    toString: function(){
+        return '[object HTMLImageElement]';
+    }
+});
+
+/*
+ * html5 4.8.1
+ * http://dev.w3.org/html5/spec/Overview.html#the-img-element
+ */
+exports.Image = Image = function(width, height) {
+    // Not sure if "[global].document" satifies this requirement:
+    // "The element's document must be the active document of the
+    // browsing context of the Window object on which the interface
+    // object of the invoked constructor is found."
+
+    HTMLElement.apply(this, [document]);
+    // Note: firefox will throw an error if the width/height
+    //   is not an integer.  Safari just converts to 0 on error.
+    this.width = parseInt(width, 10) || 0;
+    this.height = parseInt(height, 10) || 0;
+    this.nodeName = 'IMG';
+};
+Image.prototype = new HTMLImageElement();
+
+
+/*
+ * Image.src attribute events.
+ *
+ * Not sure where this should live... in events/img.js? in parser/img.js?
+ * Split out to make it easy to move.
+ */
+
+/**
+ * HTMLImageElement && Image are a bit odd in that the 'src' attribute
+ * is 'active' -- changing it triggers loading of the image from the
+ * network.
+ *
+ * This can occur by
+ *   - Directly setting the Image.src =
+ *   - Using one of the Element.setAttributeXXX methods
+ *   - Node.importNode an image
+ *   - The initial creation and parsing of an <img> tag
+ *
+ * __onImageRequest__ is a function that handles eventing
+ *  and dispatches to a user-callback.
+ *
+ */
+
+__extend__(HTMLImageElement.prototype, {
+    onload: function(event){
+        __eval__(this.getAttribute('onload') || '', this);
+    }
+});
+
+
+/*
+ * Image Loading
+ *
+ * The difference between "owner.parsing" and "owner.fragment"
+ *
+ * If owner.parsing === true, then during the html5 parsing then,
+ *  __elementPopped__ is called when a compete tag (with attrs and
+ *  children) is full parsed and added the DOM.
+ *
+ *   For images, __elementPopped__ is called with everything the
+ *    tag has.  which in turn looks for a "src" attr and calls
+ *    Envjs.loadImage
+ *
+ * If owner.parser === false (or non-existant), then we are not in
+ * a parsing step.  For images, perhaps someone directly modified
+ * a 'src' attribute of an existing image.
+ *
+ * 'innerHTML' is tricky since we first create a "fake document",
+ *  parse it, then import the right parts.  This may call
+ *  img.setAttributeNS twice.  once during the parse and once
+ *  during the clone of the node.  We want event to trigger on the
+ *  later and not during th fake doco.  "owner.fragment" is set by
+ *  the fake doco parser to indicate that events should not be
+ *  triggered on this.
+ *
+ * We coud make 'owner.parser' == [ 'none', 'full', 'fragment']
+ * and just use one variable That was not done since the patch is
+ * quite large as is.
+ *
+ * This same problem occurs with scripts.  innerHTML oddly does
+ * not eval any <script> tags inside.
+ */
+HTMLElement.registerSetAttribute('IMG', 'src', function(node, value) {
+    var owner = node.ownerDocument;
+    if (!owner.parsing && !owner.fragment) {
+        Envjs.loadImage(node, value);
+    }
+});
+
+}(/*HTMLImageElement*/));
+/**
+ * HTMLInputElement
+ *
+ * HTML5: 4.10.5 The input element
+ * http://dev.w3.org/html5/spec/Overview.html#the-input-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLInputElement').
+		debug('HTMLInputElement available');    
+});
+
+exports.HTMLInputElement = HTMLInputElement = function(ownerDocument) {
+    HTMLInputAreaCommon.apply(this, arguments);
+    this._dirty = false;
+    this._checked = null;
+    this._value = null;
+};
+HTMLInputElement.prototype = new HTMLInputAreaCommon();
+__extend__(HTMLInputElement.prototype, {
+    get alt(){
+        return this.getAttribute('alt') || '';
+    },
+    set alt(value){
+        this.setAttribute('alt', value);
+    },
+
+    /**
+     * 'checked' returns state, NOT the value of the attribute
+     */
+    get checked(){
+        if (this._checked === null) {
+            this._checked = this.defaultChecked;
+        }
+        return this._checked;
+    },
+    set checked(value){
+        // force to boolean value
+        this._checked = (value) ? true : false;
+    },
+
+    /**
+     * 'defaultChecked' actually reflects if the 'checked' attribute
+     * is present or not
+     */
+    get defaultChecked(){
+        return this.hasAttribute('checked');
+    },
+    set defaultChecked(val){
+        if (val) {
+            this.setAttribute('checked', '');
+        } else {
+            if (this.defaultChecked) {
+                this.removeAttribute('checked');
+            }
+        }
+    },
+    get defaultValue() {
+        return this.getAttribute('value') || '';
+    },
+    set defaultValue(value) {
+        this._dirty = true;
+        this.setAttribute('value', value);
+    },
+    get value() {
+        return (this._value === null) ? this.defaultValue : this._value;
+    },
+    set value(newvalue) {
+        this._value = newvalue;
+    },
+    /**
+     * Height is a string
+     */
+    get height(){
+        // spec says it is a string
+        return this.getAttribute('height') || '';
+    },
+    set height(value){
+        this.setAttribute('height',value);
+    },
+
+    /**
+     * MaxLength is a number
+     */
+    get maxLength(){
+        return Number(this.getAttribute('maxlength')||'-1');
+    },
+    set maxLength(value){
+        this.setAttribute('maxlength', value);
+    },
+
+    /**
+     * Src is a URL string
+     */
+    get src(){
+        return this.getAttribute('src') || '';
+    },
+    set src(value){
+        // TODO: make absolute any relative URLS
+        this.setAttribute('src', value);
+    },
+
+    get type() {
+        return this.getAttribute('type') || 'text';
+    },
+    set type(value) {
+        this.setAttribute('type', value);
+    },
+
+    get useMap(){
+        return this.getAttribute('map') || '';
+    },
+
+    /**
+     * Width: spec says it is a string
+     */
+    get width(){
+        return this.getAttribute('width') || '';
+    },
+    set width(value){
+        this.setAttribute('width',value);
+    },
+    click:function(){
+        __click__(this);
+    },
+    toString: function() {
+        return '[object HTMLInputElement]';
+    }
+});
+
+//http://dev.w3.org/html5/spec/Overview.html#dom-input-value
+// if someone directly modifies the value attribute, then the input's value
+// also directly changes.
+HTMLElement.registerSetAttribute('INPUT', 'value', function(node, value) {
+    if (!node._dirty) {
+        node._value = value;
+        node._dirty = true;
+    }
+});
+
+/*
+ *The checked content attribute is a boolean attribute that gives the
+ *default checkedness of the input element. When the checked content
+ *attribute is added, if the control does not have dirty checkedness,
+ *the user agent must set the checkedness of the element to true; when
+ *the checked content attribute is removed, if the control does not
+ *have dirty checkedness, the user agent must set the checkedness of
+ *the element to false.
+ */
+// Named Element Support
+HTMLElement.registerSetAttribute('INPUT', 'name', __updateFormForNamedElement__);
+
+}(/*HTMLInputElement*/));
+
+/**
+ * HTMLLabelElement - DOM Level 2
+ * HTML5 4.10.4 The label element
+ * http://dev.w3.org/html5/spec/Overview.html#the-label-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLLabelElement').
+		debug('HTMLLabelElement available');    
+});
+
+exports.HTMLLabelElement = HTMLLabelElement = function(ownerDocument) {
+    HTMLInputCommon.apply(this, arguments);
+};
+HTMLLabelElement.prototype = new HTMLInputCommon();
+__extend__(HTMLLabelElement.prototype, inputElements_dataProperties);
+__extend__(HTMLLabelElement.prototype, {
+    get htmlFor() {
+        return this.getAttribute('for');
+    },
+    set htmlFor(value) {
+        this.setAttribute('for',value);
+    },
+    get dataFormatAs() {
+        return this.getAttribute('dataFormatAs');
+    },
+    set dataFormatAs(value) {
+        this.setAttribute('dataFormatAs',value);
+    },
+    toString: function() {
+        return '[object HTMLLabelElement]';
+    }
+});
+
+}(/*HTMLLabelElement*/));
+
+/*
+ * HTMLLIElement
+ * HTML5: 4.5.8 The li Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-li-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLLIElement').
+		debug('HTMLLIElement available');    
+});
+
+exports.HTMLLIElement = HTMLLIElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLLIElement.prototype = new HTMLElement();
+__extend__(HTMLLIElement.prototype, {
+    // TODO: attribute long value;
+    toString: function() {
+        return '[object HTMLLIElement]';
+    }
+});
+
+}(/*HTMLLIElement*/));
+
+/*
+ * HTMLLinkElement - DOM Level 2
+ *
+ * HTML5: 4.8.12 The link element
+ * http://dev.w3.org/html5/spec/Overview.html#the-link-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLLinkElement').
+		debug('HTMLLinkElement available');    
+});
+
+exports.HTMLLinkElement = HTMLLinkElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLLinkElement.prototype = new HTMLElement();
+__extend__(HTMLLinkElement.prototype, {
+    get disabled(){
+        return this.getAttribute('disabled');
+    },
+    set disabled(value){
+        this.setAttribute('disabled',value);
+    },
+    get charset(){
+        return this.getAttribute('charset');
+    },
+    set charset(value){
+        this.setAttribute('charset',value);
+    },
+    get href(){
+        return this.getAttribute('href');
+    },
+    set href(value){
+        this.setAttribute('href',value);
+    },
+    get hreflang(){
+        return this.getAttribute('hreflang');
+    },
+    set hreflang(value){
+        this.setAttribute('hreflang',value);
+    },
+    get media(){
+        return this.getAttribute('media');
+    },
+    set media(value){
+        this.setAttribute('media',value);
+    },
+    get rel(){
+        return this.getAttribute('rel');
+    },
+    set rel(value){
+        this.setAttribute('rel',value);
+    },
+    get rev(){
+        return this.getAttribute('rev');
+    },
+    set rev(value){
+        this.setAttribute('rev',value);
+    },
+    get target(){
+        return this.getAttribute('target');
+    },
+    set target(value){
+        this.setAttribute('target',value);
+    },
+    get type(){
+        return this.getAttribute('type');
+    },
+    set type(value){
+        this.setAttribute('type',value);
+    },
+    toString: function() {
+        return '[object HTMLLinkElement]';
+    }
+});
+
+}(/*HTMLLinkElement*/));
+
+
+
+
+HTMLElement.registerSetAttribute('LINK', 'href', function(node, value) {
+    Envjs.loadLink(node, value);
+});
+
+/**
+ * Event stuff, not sure where it goes
+ */
+__extend__(HTMLLinkElement.prototype, {
+    onload: function(event){
+        __eval__(this.getAttribute('onload')||'', this);
+    }
+});
+
+/**
+ * HTMLMapElement
+ *
+ * 4.8.12 The map element
+ * http://dev.w3.org/html5/spec/Overview.html#the-map-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLMapElement').
+		debug('HTMLMapElement available');    
+});
+
+exports.HTMLMapElement = HTMLMapElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLMapElement.prototype = new HTMLElement();
+__extend__(HTMLMapElement.prototype, {
+    get areas(){
+        return this.getElementsByTagName('area');
+    },
+    get name(){
+        return this.getAttribute('name') || '';
+    },
+    set name(value){
+        this.setAttribute('name',value);
+    },
+    toString: function() {
+        return '[object HTMLMapElement]';
+    }
+});
+
+}(/*HTMLMapElement*/));
+
+/**
+ * HTMLMetaElement - DOM Level 2
+ * HTML5: 4.2.5 The meta element
+ * http://dev.w3.org/html5/spec/Overview.html#meta
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLMetaElement').
+		debug('HTMLMetaElement available');    
+});
+
+exports.HTMLMetaElement = HTMLMetaElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLMetaElement.prototype = new HTMLElement();
+__extend__(HTMLMetaElement.prototype, {
+    get content() {
+        return this.getAttribute('content') || '';
+    },
+    set content(value){
+        this.setAttribute('content',value);
+    },
+    get httpEquiv(){
+        return this.getAttribute('http-equiv') || '';
+    },
+    set httpEquiv(value){
+        this.setAttribute('http-equiv',value);
+    },
+    get name(){
+        return this.getAttribute('name') || '';
+    },
+    set name(value){
+        this.setAttribute('name',value);
+    },
+    get scheme(){
+        return this.getAttribute('scheme');
+    },
+    set scheme(value){
+        this.setAttribute('scheme',value);
+    },
+    toString: function() {
+        return '[object HTMLMetaElement]';
+    }
+});
+
+}(/*HTMLMetaElement*/));
+
+/**
+ * HTMLObjectElement - DOM Level 2
+ * HTML5: 4.8.5 The object element
+ * http://dev.w3.org/html5/spec/Overview.html#the-object-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLObjectElement').
+		debug('HTMLObjectElement available');    
+});
+
+exports.HTMLObjectElement = HTMLObjectElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLObjectElement.prototype = new HTMLElement();
+__extend__(HTMLObjectElement.prototype, {
+    get code(){
+        return this.getAttribute('code');
+    },
+    set code(value){
+        this.setAttribute('code',value);
+    },
+    get archive(){
+        return this.getAttribute('archive');
+    },
+    set archive(value){
+        this.setAttribute('archive',value);
+    },
+    get codeBase(){
+        return this.getAttribute('codebase');
+    },
+    set codeBase(value){
+        this.setAttribute('codebase',value);
+    },
+    get codeType(){
+        return this.getAttribute('codetype');
+    },
+    set codeType(value){
+        this.setAttribute('codetype',value);
+    },
+    get data(){
+        return this.getAttribute('data');
+    },
+    set data(value){
+        this.setAttribute('data',value);
+    },
+    get declare(){
+        return this.getAttribute('declare');
+    },
+    set declare(value){
+        this.setAttribute('declare',value);
+    },
+    get height(){
+        return this.getAttribute('height');
+    },
+    set height(value){
+        this.setAttribute('height',value);
+    },
+    get standby(){
+        return this.getAttribute('standby');
+    },
+    set standby(value){
+        this.setAttribute('standby',value);
+    },
+    /*get tabIndex(){
+      return this.getAttribute('tabindex');
+      },
+      set tabIndex(value){
+      this.setAttribute('tabindex',value);
+      },*/
+    get type(){
+        return this.getAttribute('type');
+    },
+    set type(value){
+        this.setAttribute('type',value);
+    },
+    get useMap(){
+        return this.getAttribute('usemap');
+    },
+    set useMap(value){
+        this.setAttribute('usemap',value);
+    },
+    get width(){
+        return this.getAttribute('width');
+    },
+    set width(value){
+        this.setAttribute('width',value);
+    },
+    get contentDocument(){
+        return this.ownerDocument;
+    },
+    toString: function() {
+        return '[object HTMLObjectElement]';
+    }
+});
+
+// Named Element Support
+HTMLElement.registerSetAttribute('OBJECT', 'name', __updateFormForNamedElement__);
+
+}(/*HTMLObjectElement*/));
+
+/*
+ * HTMLOListElement
+ * HTML5: 4.5.6 The ol Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-ol-element
+ */
+ 
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLOListElement').
+		debug('HTMLOListElement available');    
+});
+
+exports.HTMLOListElement = HTMLOListElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLOListElement.prototype = new HTMLElement();
+__extend__(HTMLOListElement.prototype, {
+    // TODO: attribute boolean reversed;
+    // TODO:  attribute long start;
+    toString: function() {
+        return '[object HTMLOListElement]';
+    }
+});
+
+}(/*HTMLOListElement*/));
+
+/**
+ * HTMLOptGroupElement - DOM Level 2
+ * HTML 5: 4.10.9 The optgroup element
+ * http://dev.w3.org/html5/spec/Overview.html#the-optgroup-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLOptGroupElement').
+        debug('HTMLOptGroupElement available');    
+});
+
+exports.HTMLOptGroupElement = HTMLOptGroupElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLOptGroupElement.prototype = new HTMLElement();
+__extend__(HTMLOptGroupElement.prototype, {
+    get disabled(){
+        return this.getAttribute('disabled');
+    },
+    set disabled(value){
+        this.setAttribute('disabled',value);
+    },
+    get label(){
+        return this.getAttribute('label');
+    },
+    set label(value){
+        this.setAttribute('label',value);
+    },
+    appendChild: function(node){
+        var i,
+            length,
+            selected = false;
+        //make sure at least one is selected by default
+        if(node.nodeType === Node.ELEMENT_NODE && node.tagName === 'OPTION'){
+            length = this.childNodes.length;
+            for(i=0;i<length;i++){
+                if(this.childNodes[i].nodeType === Node.ELEMENT_NODE &&
+                   this.childNodes[i].tagName === 'OPTION'){
+                    //check if it is selected
+                    if(this.selected){
+                        selected = true;
+                        break;
+                    }
+                }
+            }
+            if(!selected){
+                node.selected = true;
+                this.value = node.value?node.value:'';
+            }
+        }
+        return HTMLElement.prototype.appendChild.apply(this, [node]);
+    },
+    toString: function() {
+        return '[object HTMLOptGroupElement]';
+    }
+});
+
+}(/*HTMLOptGroupElement*/));
+
+/**
+ * HTMLOptionElement, Option
+ * HTML5: 4.10.10 The option element
+ * http://dev.w3.org/html5/spec/Overview.html#the-option-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLOptionElement').
+		debug('HTMLOptionElement available');    
+});
+
+exports.HTMLOptionElement = HTMLOptionElement = function(ownerDocument) {
+    HTMLInputCommon.apply(this, arguments);
+    this._selected = null;
+};
+HTMLOptionElement.prototype = new HTMLInputCommon();
+__extend__(HTMLOptionElement.prototype, {
+
+    /**
+     * defaultSelected actually reflects the presence of the
+     * 'selected' attribute.
+     */
+    get defaultSelected() {
+        return this.hasAttribute('selected');
+    },
+    set defaultSelected(value) {
+        if (value) {
+            this.setAttribute('selected','');
+        } else {
+            if (this.hasAttribute('selected')) {
+                this.removeAttribute('selected');
+            }
+        }
+    },
+    get form() {
+        var parent = __selectparent__(this);
+        return parent ? parent.form : null;
+    },
+    get index() {
+        var options, i;
+
+        if (! this.parentNode) {
+            return -1;
+        }
+        options = this.parentNode.options;
+        for (i=0; i < options.length; ++i) {
+            if (this === options[i]) {
+                return i;
+            }
+        }
+        return 0;
+    },
+    get label() {
+        return this.getAttribute('label');
+    },
+    set label(value) {
+        this.setAttribute('label', value);
+    },
+
+    /*
+     * This is not in the spec, but safari and firefox both
+     * use this
+     */
+    get name() {
+        return this.getAttribute('name');
+    },
+    set name(value) {
+        this.setAttribute('name', value);
+    },
+
+    /**
+     *
+     */
+    get selected() {
+        // if disabled, return false, no matter what
+        if (this.disabled) {
+            return false;
+        }
+        if (this._selected === null) {
+            return this.defaultSelected;
+        }
+
+        return this._selected;
+    },
+    set selected(value) {
+        this._selected = (value) ? true : false;
+    },
+
+    get text() {
+        var val = this.nodeValue;
+        return (val === null || this.value === undefined) ?
+            this.innerHTML :
+            val;
+    },
+    get value() {
+        var val = this.getAttribute('value');
+        return (val === null || val === undefined) ?
+            this.textContent :
+            val;
+    },
+    set value(value) {
+        this.setAttribute('value', value);
+    },
+    toString: function() {
+        return '[object HTMLOptionElement]';
+    }
+});
+
+exports.Option = Option = function(text, value, defaultSelected, selected) {
+
+    // Not sure if this is correct:
+    //
+    // The element's document must be the active document of the
+    // browsing context of the Window object on which the interface
+    // object of the invoked constructor is found.
+    HTMLOptionElement.apply(this, [document]);
+    this.nodeName = 'OPTION';
+
+    if (arguments.length >= 1) {
+        this.appendChild(document.createTextNode('' + text));
+    }
+    if (arguments.length >= 2) {
+        this.value = value;
+    }
+    if (arguments.length >= 3) {
+        if (defaultSelected) {
+            this.defaultSelected = '';
+        }
+    }
+    if (arguments.length >= 4) {
+        this.selected = (selected) ? true : false;
+    }
+};
+
+Option.prototype = new HTMLOptionElement();
+
+// Named Element Support
+
+function updater(node, value) {
+    __updateoptions__(node);
+}
+HTMLElement.registerSetAttribute('OPTION', 'name', updater);
+HTMLElement.registerSetAttribute('OPTION', 'id', updater);
+
+
+
+}(/*HTMLOptionElement*/));
+
+
+/*
+ * HTML5: The form IDL attribute's behavior depends on whether the
+ * option element is in a select element or not. If the option has
+ * a select element as its parent, or has a colgroup element as
+ * its parent and that colgroup element has a select element as
+ * its parent, then the form IDL attribute must return the same
+ * value as the form IDL attribute on that select
+ * element. Otherwise, it must return null.
+ */
+__selectparent__ = function(node) {
+    var parent = node.parentNode;
+    if (!parent) {
+        return null;
+    }
+
+    if (parent.tagName === 'SELECT') {
+        return parent;
+    }
+    if (parent.tagName === 'COLGROUP') {
+        parent = parent.parentNode;
+        if (parent && parent.tagName === 'SELECT') {
+            return parent;
+        }
+    }
+};
+//Blah this is used in parser/htmldocument, so we have to create
+//some way to access it outside the module so Envjs.updateOptions
+//is a temp place holder for that
+__updateoptions__ = Envjs.updateOptions = function(node) {
+    var parent = __selectparent__(node),
+        s;
+    if (parent) {
+        // has side effects and updates owner select's options
+        s = parent.options;
+    }
+};
+
+/*
+* HTMLParagraphElement - DOM Level 2
+*/
+
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLParagraphElement').
+		debug('HTMLParagraphElement available');    
+});
+
+exports.HTMLParagraphElement = HTMLParagraphElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLParagraphElement.prototype = new HTMLElement();
+__extend__(HTMLParagraphElement.prototype, {
+    toString: function(){
+        return '[object HTMLParagraphElement]';
+    }
+});
+
+}(/*HTMLParagraphElement*/));
+
+
+/**
+ * HTMLParamElement
+ *
+ * HTML5: 4.8.6 The param element
+ * http://dev.w3.org/html5/spec/Overview.html#the-param-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLParamElement').
+		debug('HTMLParamElement available');    
+});
+
+exports.HTMLParamElement = HTMLParamElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLParamElement.prototype = new HTMLElement();
+__extend__(HTMLParamElement.prototype, {
+    get name() {
+        return this.getAttribute('name') || '';
+    },
+    set name(value) {
+        this.setAttribute('name', value);
+    },
+    get type(){
+        return this.getAttribute('type');
+    },
+    set type(value){
+        this.setAttribute('type',value);
+    },
+    get value(){
+        return this.getAttribute('value');
+    },
+    set value(value){
+        this.setAttribute('value',value);
+    },
+    get valueType(){
+        return this.getAttribute('valuetype');
+    },
+    set valueType(value){
+        this.setAttribute('valuetype',value);
+    },
+    toString: function() {
+        return '[object HTMLParamElement]';
+    }
+});
+
+}(/*HTMLParamElement*/));
+
+/*
+ * HTMLPreElement
+ * HTML5: 4.5.4 The pre Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-pre-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLPreElement').
+		debug('HTMLPreElement available');    
+});
+
+exports.HTMLPreElement = HTMLPreElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLPreElement.prototype = new HTMLElement();
+__extend__(HTMLPreElement.prototype, {
+    // no additional properties or elements
+    toString: function() {
+        return '[object HTMLPreElement]';
+    }
+});
+
+}(/*HTMLPreElement*/));
+
+/**
+ * HTMLScriptElement - DOM Level 2
+ *
+ * HTML5: 4.3.1 The script element
+ * http://dev.w3.org/html5/spec/Overview.html#script
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLScriptElement').
+		debug('HTMLScriptElement available');    
+});
+
+exports.HTMLScriptElement = HTMLScriptElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLScriptElement.prototype = new HTMLElement();
+__extend__(HTMLScriptElement.prototype, {
+
+    /**
+     * HTML5 spec @ http://dev.w3.org/html5/spec/Overview.html#script
+     *
+     * "The IDL attribute text must return a concatenation of the
+     * contents of all the text nodes that are direct children of the
+     * script element (ignoring any other nodes such as comments or
+     * elements), in tree order. On setting, it must act the same way
+     * as the textContent IDL attribute."
+     *
+     * AND... "The term text node refers to any Text node,
+     * including CDATASection nodes; specifically, any Node with node
+     * type TEXT_NODE (3) or CDATA_SECTION_NODE (4)"
+     */
+    get text() {
+        var kids = this.childNodes;
+        var kid;
+        var s = '';
+        var imax = kids.length;
+        for (var i = 0; i < imax; ++i) {
+            kid = kids[i];
+            if (kid.nodeType === Node.TEXT_NODE ||
+                kid.nodeType === Node.CDATA_SECTION_NODE) {
+                s += kid.nodeValue;
+            }
+        }
+        return s;
+    },
+
+    /**
+     * HTML5 spec "Can be set, to replace the element's children with
+     * the given value."
+     */
+    set text(value) {
+        // this deletes all children, and make a new single text node
+        // with value
+        this.textContent = value;
+
+        /* Currently we always execute, but this isn't quite right if
+         * the node has *not* been inserted into the document, then it
+         * should *not* fire.  The more detailed answer from the spec:
+         *
+         * When a script element that is neither marked as having
+         * "already started" nor marked as being "parser-inserted"
+         * experiences one of the events listed in the following list,
+         * the user agent must synchronously run the script element:
+         *
+         *   * The script element gets inserted into a document.
+         *   * The script element is in a Document and its child nodes
+         *     are changed.
+         *   * The script element is in a Document and has a src
+         *     attribute set where previously the element had no such
+         *     attribute.
+         *
+         * And no doubt there are other cases as well.
+         */
+        Envjs.loadInlineScript(this);
+    },
+
+    get htmlFor(){
+        return this.getAttribute('for');
+    },
+    set htmlFor(value){
+        this.setAttribute('for',value);
+    },
+    get event(){
+        return this.getAttribute('event');
+    },
+    set event(value){
+        this.setAttribute('event',value);
+    },
+    get charset(){
+        return this.getAttribute('charset');
+    },
+    set charset(value){
+        this.setAttribute('charset',value);
+    },
+    get defer(){
+        return this.getAttribute('defer');
+    },
+    set defer(value){
+        this.setAttribute('defer',value);
+    },
+    get src(){
+        return this.getAttribute('src')||'';
+    },
+    set src(value){
+        this.setAttribute('src',value);
+    },
+    get type(){
+        return this.getAttribute('type')||'';
+    },
+    set type(value){
+        this.setAttribute('type',value);
+    },
+    onload: HTMLEvents.prototype.onload,
+    onerror: HTMLEvents.prototype.onerror,
+    toString: function() {
+        return '[object HTMLScriptElement]';
+    }
+});
+
+}(/*HTMLScriptElement*/));
+
+/**
+ * HTMLSelectElement
+ * HTML5: http://dev.w3.org/html5/spec/Overview.html#the-select-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLSelectElement').
+		debug('HTMLSelectElement available');    
+});
+
+exports.HTMLSelectElement = HTMLSelectElement = function(ownerDocument) {
+    HTMLTypeValueInputs.apply(this, arguments);
+    this._oldIndex = -1;
+};
+
+HTMLSelectElement.prototype = new HTMLTypeValueInputs();
+__extend__(HTMLSelectElement.prototype, inputElements_dataProperties);
+__extend__(HTMLButtonElement.prototype, inputElements_size);
+__extend__(HTMLSelectElement.prototype, inputElements_onchange);
+__extend__(HTMLSelectElement.prototype, inputElements_focusEvents);
+__extend__(HTMLSelectElement.prototype, {
+
+    get value() {
+        var index = this.selectedIndex;
+        return (index === -1) ? '' : this.options[index].value;
+    },
+    set value(newValue) {
+        var options = this.options;
+        var imax = options.length;
+        for (var i=0; i< imax; ++i) {
+            if (options[i].value == newValue) {
+                this.setAttribute('value', newValue);
+                this.selectedIndex = i;
+                return;
+            }
+        }
+    },
+    get multiple() {
+        return this.hasAttribute('multiple');
+    },
+    set multiple(value) {
+        if (value) {
+            this.setAttribute('multiple', '');
+        } else {
+            if (this.hasAttribute('multiple')) {
+                this.removeAttribute('multiple');
+            }
+        }
+    },
+    // Returns HTMLOptionsCollection
+    get options() {
+        var nodes = this.getElementsByTagName('option');
+        var alist = new NodeList();
+        var i, tmp;
+        for (i = 0; i < nodes.length; ++i) {
+            alist.push(nodes[i]);
+            this[i] = nodes[i];
+            tmp = nodes[i].name;
+            if (tmp) {
+                this[tmp] = nodes[i];
+            }
+            tmp = nodes[i].id;
+            if (tmp) {
+                this[tmp] = nodes[i];
+            }
+        }
+        return new HTMLCollection(alist);
+    },
+    get length() {
+        return this.options.length;
+    },
+    item: function(idx) {
+        return this.options[idx];
+    },
+    namedItem: function(aname) {
+        return this.options[aname];
+    },
+
+    get selectedIndex() {
+        var options = this.options;
+        var imax = options.length;
+        for (var i=0; i < imax; ++i) {
+            if (options[i].selected) {
+                //console.log('select get selectedIndex %s', i);
+                return i;
+            }
+        }
+        //console.log('select get selectedIndex %s', -1);
+        return -1;
+    },
+
+    set selectedIndex(value) {
+        var options = this.options;
+        var num = Number(value);
+        var imax = options.length;
+        for (var i = 0; i < imax; ++i) {
+            options[i].selected = (i === num);
+        }
+    },
+    get type() {
+        return this.multiple ? 'select-multiple' : 'select-one';
+    },
+
+    add: function(element, before) {
+        this.appendChild(element);
+        //__add__(this);
+    },
+    remove: function() {
+        //__remove__(this);
+    },
+    toString: function() {
+        return '[object HTMLSelectElement]';
+    }
+});
+
+// Named Element Support
+HTMLElement.registerSetAttribute('SELECT', 'name', __updateFormForNamedElement__);
+
+}(/*HTMLSelectElement*/));
+/**
+ * HTML 5: 4.6.22 The span element
+ * http://dev.w3.org/html5/spec/Overview.html#the-span-element
+ * 
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLSpanElement').
+		debug('HTMLSpanElement available');    
+});
+
+exports.HTMLSpanElement = HTMLSpanElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLSpanElement.prototype = new HTMLElement();
+__extend__(HTMLSpanElement.prototype, {
+    toString: function(){
+        return '[object HTMLSpanElement]';
+    }
+});
+
+}(/*HTMLSpanElement*/));
+
+/**
+ * HTMLStyleElement - DOM Level 2
+ * HTML5 4.2.6 The style element
+ * http://dev.w3.org/html5/spec/Overview.html#the-style-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLStyleElement').
+		debug('HTMLStyleElement available');    
+});
+
+exports.HTMLStyleElement = HTMLStyleElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLStyleElement.prototype = new HTMLElement();
+__extend__(HTMLStyleElement.prototype, {
+    get disabled(){
+        return this.getAttribute('disabled');
+    },
+    set disabled(value){
+        this.setAttribute('disabled',value);
+    },
+    get media(){
+        return this.getAttribute('media');
+    },
+    set media(value){
+        this.setAttribute('media',value);
+    },
+    get type(){
+        return this.getAttribute('type');
+    },
+    set type(value){
+        this.setAttribute('type',value);
+    },
+    toString: function() {
+        return '[object HTMLStyleElement]';
+    }
+});
+
+}(/*HTMLStyleElement*/));
+
+/**
+ * HTMLTableElement - DOM Level 2
+ * Implementation Provided by Steven Wood
+ *
+ * HTML5: 4.9.1 The table element
+ * http://dev.w3.org/html5/spec/Overview.html#the-table-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableElement').
+		debug('HTMLTableElement available');    
+});
+
+exports.HTMLTableElement = HTMLTableElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableElement.prototype = new HTMLElement();
+__extend__(HTMLTableElement.prototype, {
+
+    get tFoot() {
+        //tFoot returns the table footer.
+        return this.getElementsByTagName("tfoot")[0];
+    },
+
+    createTFoot : function () {
+        var tFoot = this.tFoot;
+
+        if (!tFoot) {
+            tFoot = document.createElement("tfoot");
+            this.appendChild(tFoot);
+        }
+
+        return tFoot;
+    },
+
+    deleteTFoot : function () {
+        var foot = this.tFoot;
+        if (foot) {
+            foot.parentNode.removeChild(foot);
+        }
+    },
+
+    get tHead() {
+        //tHead returns the table head.
+        return this.getElementsByTagName("thead")[0];
+    },
+
+    createTHead : function () {
+        var tHead = this.tHead;
+
+        if (!tHead) {
+            tHead = document.createElement("thead");
+            this.insertBefore(tHead, this.firstChild);
+        }
+
+        return tHead;
+    },
+
+    deleteTHead : function () {
+        var head = this.tHead;
+        if (head) {
+            head.parentNode.removeChild(head);
+        }
+    },
+
+    /*appendChild : function (child) {
+
+      var tagName;
+      if(child&&child.nodeType==Node.ELEMENT_NODE){
+      tagName = child.tagName.toLowerCase();
+      if (tagName === "tr") {
+      // need an implcit <tbody> to contain this...
+      if (!this.currentBody) {
+      this.currentBody = document.createElement("tbody");
+
+      Node.prototype.appendChild.apply(this, [this.currentBody]);
+      }
+
+      return this.currentBody.appendChild(child);
+
+      } else if (tagName === "tbody" || tagName === "tfoot" && this.currentBody) {
+      this.currentBody = child;
+      return Node.prototype.appendChild.apply(this, arguments);
+
+      } else {
+      return Node.prototype.appendChild.apply(this, arguments);
+      }
+      }else{
+      //tables can still have text node from white space
+      return Node.prototype.appendChild.apply(this, arguments);
+      }
+      },*/
+
+    get tBodies() {
+        return new HTMLCollection(this.getElementsByTagName("tbody"));
+
+    },
+
+    get rows() {
+        return new HTMLCollection(this.getElementsByTagName("tr"));
+    },
+
+    insertRow : function (idx) {
+        if (idx === undefined) {
+            throw new Error("Index omitted in call to HTMLTableElement.insertRow ");
+        }
+
+        var rows = this.rows,
+            numRows = rows.length,
+            node,
+            inserted,
+            lastRow;
+
+        if (idx > numRows) {
+            throw new Error("Index > rows.length in call to HTMLTableElement.insertRow");
+        }
+
+        inserted = document.createElement("tr");
+        // If index is -1 or equal to the number of rows,
+        // the row is appended as the last row. If index is omitted
+        // or greater than the number of rows, an error will result
+        if (idx === -1 || idx === numRows) {
+            this.appendChild(inserted);
+        } else {
+            rows[idx].parentNode.insertBefore(inserted, rows[idx]);
+        }
+
+        return inserted;
+    },
+
+    deleteRow : function (idx) {
+        var elem = this.rows[idx];
+        elem.parentNode.removeChild(elem);
+    },
+
+    get summary() {
+        return this.getAttribute("summary");
+    },
+
+    set summary(summary) {
+        this.setAttribute("summary", summary);
+    },
+
+    get align() {
+        return this.getAttribute("align");
+    },
+
+    set align(align) {
+        this.setAttribute("align", align);
+    },
+
+    get bgColor() {
+        return this.getAttribute("bgColor");
+    },
+
+    set bgColor(bgColor) {
+        return this.setAttribute("bgColor", bgColor);
+    },
+
+    get cellPadding() {
+        return this.getAttribute("cellPadding");
+    },
+
+    set cellPadding(cellPadding) {
+        return this.setAttribute("cellPadding", cellPadding);
+    },
+
+    get cellSpacing() {
+        return this.getAttribute("cellSpacing");
+    },
+
+    set cellSpacing(cellSpacing) {
+        this.setAttribute("cellSpacing", cellSpacing);
+    },
+
+    get frame() {
+        return this.getAttribute("frame");
+    },
+
+    set frame(frame) {
+        this.setAttribute("frame", frame);
+    },
+
+    get rules() {
+        return this.getAttribute("rules");
+    },
+
+    set rules(rules) {
+        this.setAttribute("rules", rules);
+    },
+
+    get width() {
+        return this.getAttribute("width");
+    },
+
+    set width(width) {
+        this.setAttribute("width", width);
+    },
+    toString: function() {
+        return '[object HTMLTableElement]';
+    }
+});
+
+}(/*HTMLTableElement*/));
+
+/*
+ * HTMLxElement - DOM Level 2
+ * - Contributed by Steven Wood
+ *
+ * HTML5: 4.9.5 The tbody element
+ * http://dev.w3.org/html5/spec/Overview.html#the-tbody-element
+ * http://dev.w3.org/html5/spec/Overview.html#htmltablesectionelement
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableSectionElement').
+		debug('HTMLTableSectionElement available');    
+});
+
+exports.HTMLTableSectionElement = HTMLTableSectionElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableSectionElement.prototype = new HTMLElement();
+__extend__(HTMLTableSectionElement.prototype, {
+
+    /*appendChild : function (child) {
+
+    // disallow nesting of these elements.
+    if (child.tagName.match(/TBODY|TFOOT|THEAD/)) {
+    return this.parentNode.appendChild(child);
+    } else {
+    return Node.prototype.appendChild.apply(this, arguments);
+    }
+
+    },*/
+
+    get align() {
+        return this.getAttribute("align");
+    },
+
+    get ch() {
+        return this.getAttribute("ch");
+    },
+
+    set ch(ch) {
+        this.setAttribute("ch", ch);
+    },
+
+    // ch gets or sets the alignment character for cells in a column.
+    set chOff(chOff) {
+        this.setAttribute("chOff", chOff);
+    },
+
+    get chOff() {
+        return this.getAttribute("chOff");
+    },
+
+    get vAlign () {
+        return this.getAttribute("vAlign");
+    },
+
+    get rows() {
+        return new HTMLCollection(this.getElementsByTagName("tr"));
+    },
+
+    insertRow : function (idx) {
+        if (idx === undefined) {
+            throw new Error("Index omitted in call to HTMLTableSectionElement.insertRow ");
+        }
+
+        var numRows = this.rows.length,
+        node = null;
+
+        if (idx > numRows) {
+            throw new Error("Index > rows.length in call to HTMLTableSectionElement.insertRow");
+        }
+
+        var row = document.createElement("tr");
+        // If index is -1 or equal to the number of rows,
+        // the row is appended as the last row. If index is omitted
+        // or greater than the number of rows, an error will result
+        if (idx === -1 || idx === numRows) {
+            this.appendChild(row);
+        } else {
+            node = this.firstChild;
+
+            for (var i=0; i<idx; i++) {
+                node = node.nextSibling;
+            }
+        }
+
+        this.insertBefore(row, node);
+
+        return row;
+    },
+
+    deleteRow : function (idx) {
+        var elem = this.rows[idx];
+        this.removeChild(elem);
+    },
+
+    toString: function() {
+        return '[object HTMLTableSectionElement]';
+    }
+});
+
+}(/*HTMLTableSectionElement*/));
+
+
+/**
+ * HTMLTableCellElement
+ * base interface for TD and TH
+ *
+ * HTML5: 4.9.11 Attributes common to td and th elements
+ * http://dev.w3.org/html5/spec/Overview.html#htmltablecellelement
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableCellElement').
+		debug('HTMLTableCellElement available');    
+});
+
+exports.HTMLTableCellElement = HTMLTableCellElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableCellElement.prototype = new HTMLElement();
+__extend__(HTMLTableCellElement.prototype, {
+    // TOOD: attribute unsigned long  colSpan;
+    // TODO: attribute unsigned long  rowSpan;
+    // TODO: attribute DOMString      headers;
+    // TODO: readonly attribute long  cellIndex;
+
+    // Not really necessary but might be helpful in debugging
+    toString: function() {
+        return '[object HTMLTableCellElement]';
+    }
+
+});
+
+}(/*HTMLTableCellElement*/));
+
+/**
+ * HTMLTableDataCellElement
+ * HTML5: 4.9.9 The td Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-td-element
+ */
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableDataCellElement').
+		debug('HTMLTableDataCellElement available');    
+});
+
+exports.HTMLTableDataCellElement = HTMLTableDataCellElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableDataCellElement.prototype = new HTMLTableCellElement();
+__extend__(HTMLTableDataCellElement.prototype, {
+
+    // adds no new properties or methods
+
+    toString: function() {
+        return '[object HTMLTableDataCellElement]';
+    }
+});
+
+}(/*HTMLTableDataCellElement*/));
+
+
+
+/**
+ * HTMLTableHeaderCellElement
+ * HTML5: 4.9.10 The th Element
+ * http://dev.w3.org/html5/spec/Overview.html#the-th-element
+ */
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableHeaderCellElement').
+		debug('HTMLTableHeaderCellElement available');    
+});
+
+exports.HTMLTableHeaderCellElement = HTMLTableHeaderCellElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableHeaderCellElement.prototype = new HTMLTableCellElement();
+__extend__(HTMLTableHeaderCellElement.prototype, {
+    // TODO:  attribute DOMString scope
+    toString: function() {
+        return '[object HTMLTableHeaderCellElement]';
+    }
+});
+
+}(/*HTMLTableHeaderCellElement*/));
+
+
+/**
+ * HTMLTextAreaElement - DOM Level 2
+ * HTML5: 4.10.11 The textarea element
+ * http://dev.w3.org/html5/spec/Overview.html#the-textarea-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTextAreaElement').
+		debug('HTMLTextAreaElement available');    
+});
+
+exports.HTMLTextAreaElement = HTMLTextAreaElement = function(ownerDocument) {
+    HTMLInputAreaCommon.apply(this, arguments);
+    this._rawvalue = null;
+};
+HTMLTextAreaElement.prototype = new HTMLInputAreaCommon();
+__extend__(HTMLTextAreaElement.prototype, {
+    get cols(){
+        return Number(this.getAttribute('cols')||'-1');
+    },
+    set cols(value){
+        this.setAttribute('cols', value);
+    },
+    get rows(){
+        return Number(this.getAttribute('rows')||'-1');
+    },
+    set rows(value){
+        this.setAttribute('rows', value);
+    },
+
+    /*
+     * read-only
+     */
+    get type() {
+        return this.getAttribute('type') || 'textarea';
+    },
+
+    /**
+     * This modifies the text node under the widget
+     */
+    get defaultValue() {
+        return this.textContent;
+    },
+    set defaultValue(value) {
+        this.textContent = value;
+    },
+
+    /**
+     * http://dev.w3.org/html5/spec/Overview.html#concept-textarea-raw-value
+     */
+    get value() {
+        return (this._rawvalue === null) ? this.defaultValue : this._rawvalue;
+    },
+    set value(value) {
+        this._rawvalue = value;
+    },
+    toString: function() {
+        return '[object HTMLTextAreaElement]';
+    }
+});
+
+// Named Element Support
+HTMLElement.registerSetAttribute('TEXTAREA', 'name', __updateFormForNamedElement__);
+
+}(/*HTMLTextAreaElement*/));
+
+/**
+ * HTMLTitleElement - DOM Level 2
+ *
+ * HTML5: 4.2.2 The title element
+ * http://dev.w3.org/html5/spec/Overview.html#the-title-element-0
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTitleElement').
+		debug('HTMLTitleElement available');    
+});
+
+exports.HTMLTitleElement = HTMLTitleElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTitleElement.prototype = new HTMLElement();
+__extend__(HTMLTitleElement.prototype, {
+    get text() {
+        return this.innerText;
+    },
+
+    set text(titleStr) {
+        this.textContent = titleStr;
+    },
+    toString: function() {
+        return '[object HTMLTitleElement]';
+    }
+});
+
+}(/*HTMLTitleElement*/));
+
+/**
+ * HTMLRowElement - DOM Level 2
+ * Implementation Provided by Steven Wood
+ *
+ * HTML5: 4.9.8 The tr element
+ * http://dev.w3.org/html5/spec/Overview.html#the-tr-element
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLTableRowElement').
+		debug('HTMLTableRowElement available');    
+});
+
+exports.HTMLTableRowElement = HTMLTableRowElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLTableRowElement.prototype = new HTMLElement();
+__extend__(HTMLTableRowElement.prototype, {
+
+    /*appendChild : function (child) {
+
+      var retVal = Node.prototype.appendChild.apply(this, arguments);
+      retVal.cellIndex = this.cells.length -1;
+
+      return retVal;
+      },*/
+    // align gets or sets the horizontal alignment of data within cells of the row.
+    get align() {
+        return this.getAttribute("align");
+    },
+
+    get bgColor() {
+        return this.getAttribute("bgcolor");
+    },
+
+    get cells() {
+        var nl = this.getElementsByTagName("td");
+        return new HTMLCollection(nl);
+    },
+
+    get ch() {
+        return this.getAttribute("ch");
+    },
+
+    set ch(ch) {
+        this.setAttribute("ch", ch);
+    },
+
+    // ch gets or sets the alignment character for cells in a column.
+    set chOff(chOff) {
+        this.setAttribute("chOff", chOff);
+    },
+
+    get chOff() {
+        return this.getAttribute("chOff");
+    },
+
+    /**
+     * http://dev.w3.org/html5/spec/Overview.html#dom-tr-rowindex
+     */
+    get rowIndex() {
+        var nl = this.parentNode.childNodes;
+        for (var i=0; i<nl.length; i++) {
+            if (nl[i] === this) {
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    /**
+     * http://dev.w3.org/html5/spec/Overview.html#dom-tr-sectionrowindex
+     */
+    get sectionRowIndex() {
+        var nl = this.parentNode.getElementsByTagName(this.tagName);
+        for (var i=0; i<nl.length; i++) {
+            if (nl[i] === this) {
+                return i;
+            }
+        }
+        return -1;
+    },
+
+    get vAlign () {
+        return this.getAttribute("vAlign");
+    },
+
+    insertCell : function (idx) {
+        if (idx === undefined) {
+            throw new Error("Index omitted in call to HTMLTableRow.insertCell");
+        }
+
+        var numCells = this.cells.length,
+        node = null;
+
+        if (idx > numCells) {
+            throw new Error("Index > rows.length in call to HTMLTableRow.insertCell");
+        }
+
+        var cell = document.createElement("td");
+
+        if (idx === -1 || idx === numCells) {
+            this.appendChild(cell);
+        } else {
+
+
+            node = this.firstChild;
+
+            for (var i=0; i<idx; i++) {
+                node = node.nextSibling;
+            }
+        }
+
+        this.insertBefore(cell, node);
+        cell.cellIndex = idx;
+
+        return cell;
+    },
+    deleteCell : function (idx) {
+        var elem = this.cells[idx];
+        this.removeChild(elem);
+    },
+    toString: function() {
+        return '[object HTMLTableRowElement]';
+    }
+
+});
+
+}(/*HTMLTableRowElement*/));
+
+/*
+ * HTMLUListElement
+ * HTML5: 4.5.7 The ul Element
+ * http://dev.w3.org/html5/spec/Overview.html#htmlhtmlelement
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLUListElement').
+		debug('HTMLUListElement available');    
+});
+
+exports.HTMLUListElement = HTMLUListElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+
+HTMLUListElement.prototype = new HTMLElement();
+__extend__(HTMLUListElement.prototype, {
+    // no additional properties or elements
+    toString: function() {
+        return '[object HTMLUListElement]';
+    }
+});
+
+}(/*HTMLUListElement*/));
+
+/**
+ * HTMLUnknownElement DOM Level 2
+ */
+ 
+(function(){
+    
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLUnknownElement').
+		debug('HTMLUnknownElement available');    
+});
+
+exports.HTMLUnknownElement = HTMLUnknownElement = function(ownerDocument) {
+    HTMLElement.apply(this, arguments);
+};
+HTMLUnknownElement.prototype = new HTMLElement();
+__extend__(HTMLUnknownElement.prototype,{
+    toString: function(){
+        return '[object HTMLUnknownElement]';
+    }
+});
+
+}(/*HTMLUnknownElement*/));
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/johnson.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/johnson.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/johnson.js	(revision 225)
@@ -0,0 +1,66 @@
+// This file must be executed automatically on startup for ruby/v8 rubyracer support.
+var __this__ = this;
+
+var require = (function() {
+    var cached = {};
+    var currentPath = Ruby.ENV['PWD'];
+    var paths = [currentPath];
+    
+    function normalize(id) {
+		var file;
+        id = id + '.js';
+        if (/^\.\.?/.test(id)) {
+            // relative path
+			try{ return Ruby.File.open(id, 'r') }catch(e){}
+        } else {
+            for (var i = 0, len = paths.length; i < len; ++i) {
+			    try{ return Ruby.File.open(paths[i]+'/'+id, 'r') }catch(e){}
+            }
+        }
+        return undefined;
+    };
+    
+    
+    function require(id) {
+		//print('require :'+ id);
+        var file = normalize(id);
+        if (!file) {
+            throw new Error("couldn't find module \"" + id + "\"");
+        }
+        if (!cached.hasOwnProperty(id)) {
+			//print('loading '+id);
+            var source = file.read();
+            source = source.replace(/^\#\!.*/, '');
+            source = "(function (require, exports, module) { "+source+"\n});";
+            cached[id] = {
+                exports: {},
+                module: {
+                    id: id,
+                    uri: id
+                }
+            };
+            var previousPath = currentPath;
+            try {
+                currentPath = id.substr(0, id.lastIndexOf('/')) || '.';
+                var func = global.evaluate( source, id );
+                func(require, cached[id].exports, cached[id].module);
+            } finally {
+                currentPath = previousPath;
+            }
+        }
+		/*
+		print('returning exports for id: '+id+' '+cached[id].exports);
+		for(var prop in cached[id].exports){
+			print('export: '+prop);
+		}
+		*/
+        return cached[id].exports;
+    };
+    
+    require.paths = paths;
+    
+    return require;
+})();
+
+require('./platform/johnson');
+require('./window');
Index: Dev/branches/Demo/d3/lib/env-js/envjs/johnson.rb
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/johnson.rb	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/johnson.rb	(revision 225)
@@ -0,0 +1,31 @@
+require 'johnson'
+require 'net/http'
+require 'uri'
+require 'thread'
+
+include Config
+
+def configure_context(context)
+  context['global']    = context
+  context['HTTPConnection'] = HTTPConnection.new
+end
+
+class HTTPConnection
+  def go(connection, request, headers, data)
+    headers.each{|key,value| request.add_field(key,value)}
+    response, body = connection.request(request, data)
+    respheaders = Hash.new
+    response.each_header do |name, value|
+      respheaders.store(name, value)
+    end
+    response['body'] = body
+    [response, respheaders]
+  end
+end
+
+global = Johnson::Runtime.new
+configure_context(global)
+envjs = ARGV[0]
+global.load(envjs)
+
+
Index: Dev/branches/Demo/d3/lib/env-js/envjs/node.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/node.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/node.js	(revision 225)
@@ -0,0 +1,7 @@
+process.env.TZ = 'America/Los_Angeles';
+
+require('./platform/node');
+Envjs.eventLoop = function() {}; // disabled for clean shutdown
+
+require('./window');
+new Window(__this__); // initialize a blank window
Index: Dev/branches/Demo/d3/lib/env-js/envjs/parser.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/parser.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/parser.js	(revision 225)
@@ -0,0 +1,14465 @@
+/**
+ * these are both non-standard globals that
+ * provide static namespaces and functions
+ * to support the html 5 parser from nu.
+ *
+ * these are intentionally leaked globally
+ *  XMLParser = {},
+ *  HTMLParser = {};
+ *
+ */
+
+var Envjs = Envjs || require('./platform/core').Envjs,
+	After = After || require('./platform/core').After,
+	DOMImplementation = DOMImplementation || require('./dom').DOMImplementation,
+	Document = Document || require('./dom').Document,
+	Element = Element || require('./dom').Element,
+	NodeList = NodeList || require('./dom').NodeList,
+	Node = Node || require('./dom').Node,
+	HTMLDocument = HTMLDocument || require('./html').HTMLDocument,
+	HTMLElement = HTMLElement || require('./html').HTMLElement;
+/*
+ * Envjs parser.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+/**
+ * @author john resig
+ */
+//from jQuery
+function __setArray__( target, array ) {
+    // Resetting the length to 0, then using the native Array push
+    // is a super-fast way to populate an object with array-like properties
+    target.length = 0;
+    Array.prototype.push.apply( target, array );
+}
+var $_window = this;var $gwt_version = "2.0.3";var $wnd = $_window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '8150BFC222C63DA4E59C16141DE3DB1B';var _, N8000000000000000_longLit = [0, -9223372036854775808], P1000000_longLit = [16777216, 0], P7fffffffffffffff_longLit = [4294967295, 9223372032559808512];
+function nullMethod(){
+}
+
+function equals(other){
+  return this === (other == null?null:other);
+}
+
+function getClass_0(){
+  return Ljava_lang_Object_2_classLit;
+}
+
+function hashCode_0(){
+  return this.$H || (this.$H = ++sNextHashId);
+}
+
+function toString_0(){
+  return (this.typeMarker$ == nullMethod || this.typeId$ == 2?this.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName + '@' + toPowerOfTwoString(this.typeMarker$ == nullMethod || this.typeId$ == 2?this.hashCode$():this.$H || (this.$H = ++sNextHashId), 4);
+}
+
+function Object_0(){
+}
+
+_ = Object_0.prototype = {};
+_.equals$ = equals;
+_.getClass$ = getClass_0;
+_.hashCode$ = hashCode_0;
+_.toString$ = toString_0;
+_.toString = function(){
+  return this.toString$();
+}
+;
+_.typeMarker$ = nullMethod;
+_.typeId$ = 1;
+function $setStackTrace(stackTrace){
+  var c, copy, i;
+  copy = initDim(_3Ljava_lang_StackTraceElement_2_classLit, 54, 9, stackTrace.length, 0);
+  for (i = 0 , c = stackTrace.length; i < c; ++i) {
+    if (!stackTrace[i]) {
+      throw $NullPointerException(new NullPointerException);
+    }
+    copy[i] = stackTrace[i];
+  }
+}
+
+function $toString(this$static){
+  var className, msg;
+  className = this$static.getClass$().typeName;
+  msg = this$static.getMessage();
+  if (msg != null) {
+    return className + ': ' + msg;
+  }
+   else {
+    return className;
+  }
+}
+
+function getClass_1(){
+  return Ljava_lang_Throwable_2_classLit;
+}
+
+function getMessage(){
+  return this.detailMessage;
+}
+
+function toString_1(){
+  return $toString(this);
+}
+
+function Throwable(){
+}
+
+_ = Throwable.prototype = new Object_0;
+_.getClass$ = getClass_1;
+_.getMessage = getMessage;
+_.toString$ = toString_1;
+_.typeId$ = 3;
+_.detailMessage = null;
+function getClass_2(){
+  return Ljava_lang_Exception_2_classLit;
+}
+
+function Exception(){
+}
+
+_ = Exception.prototype = new Throwable;
+_.getClass$ = getClass_2;
+_.typeId$ = 4;
+function $RuntimeException(this$static, message){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  return this$static;
+}
+
+function getClass_3(){
+  return Ljava_lang_RuntimeException_2_classLit;
+}
+
+function RuntimeException(){
+}
+
+_ = RuntimeException.prototype = new Exception;
+_.getClass$ = getClass_3;
+_.typeId$ = 5;
+function $JavaScriptException(this$static, e){
+  $fillInStackTrace();
+  this$static.e = e;
+  $createStackTrace(this$static);
+  return this$static;
+}
+
+function $getMessage_0(this$static){
+  this$static.message_0 == null && (this$static.name_0 = getName(this$static.e) , this$static.description = getDescription(this$static.e) , this$static.message_0 = '(' + this$static.name_0 + '): ' + this$static.description + getProperties(this$static.e) , undefined);
+  return this$static.message_0;
+}
+
+function getClass_4(){
+  return Lcom_google_gwt_core_client_JavaScriptException_2_classLit;
+}
+
+function getDescription(e){
+  if (e != null && e.typeMarker$ != nullMethod && e.typeId$ != 2) {
+    return getDescription0(dynamicCastJso(e));
+  }
+   else {
+    return e + '';
+  }
+}
+
+function getDescription0(e){
+  return e == null?null:e.message;
+}
+
+function getMessage_0(){
+  return $getMessage_0(this);
+}
+
+function getName(e){
+  if (e == null) {
+    return 'null';
+  }
+   else if (e != null && e.typeMarker$ != nullMethod && e.typeId$ != 2) {
+    return getName0(dynamicCastJso(e));
+  }
+   else if (e != null && canCast(e.typeId$, 1)) {
+    return 'String';
+  }
+   else {
+    return (e.typeMarker$ == nullMethod || e.typeId$ == 2?e.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
+  }
+}
+
+function getName0(e){
+  return e == null?null:e.name;
+}
+
+function getProperties(e){
+  return e != null && e.typeMarker$ != nullMethod && e.typeId$ != 2?getProperties0(dynamicCastJso(e)):'';
+}
+
+function getProperties0(e){
+  var result = '';
+  try {
+    for (prop in e) {
+      if (prop != 'name' && prop != 'message' && prop != 'toString') {
+        try {
+          result += '\n ' + prop + ': ' + e[prop];
+        }
+         catch (ignored) {
+        }
+      }
+    }
+  }
+   catch (ignored) {
+  }
+  return result;
+}
+
+function JavaScriptException(){
+}
+
+_ = JavaScriptException.prototype = new RuntimeException;
+_.getClass$ = getClass_4;
+_.getMessage = getMessage_0;
+_.typeId$ = 6;
+_.description = null;
+_.e = null;
+_.message_0 = null;
+_.name_0 = null;
+function createFunction(){
+  return function(){
+  }
+  ;
+}
+
+function equals__devirtual$(this$static, other){
+  return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.equals$(other):(this$static == null?null:this$static) === (other == null?null:other);
+}
+
+function hashCode__devirtual$(this$static){
+  return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.hashCode$():this$static.$H || (this$static.$H = ++sNextHashId);
+}
+
+function getClass_6(){
+  return Lcom_google_gwt_core_client_Scheduler_2_classLit;
+}
+
+function Scheduler(){
+}
+
+_ = Scheduler.prototype = new Object_0;
+_.getClass$ = getClass_6;
+_.typeId$ = 0;
+function entry_0(jsFunction){
+  return function(){
+    return entry0(jsFunction, this, arguments);
+  }
+  ;
+}
+
+function entry0(jsFunction, thisObj, arguments_0){
+  var initialEntry;
+  initialEntry = entryDepth++ == 0;
+  try {
+    return jsFunction.apply(thisObj, arguments_0);
+  }
+   finally {
+    initialEntry && $flushFinallyCommands(($clinit_12() , INSTANCE));
+    --entryDepth;
+  }
+}
+
+var entryDepth = 0, sNextHashId = 0;
+function $clinit_12(){
+  $clinit_12 = nullMethod;
+  INSTANCE = $SchedulerImpl(new SchedulerImpl);
+}
+
+function $SchedulerImpl(this$static){
+  $clinit_12();
+  this$static.flusher = $SchedulerImpl$1(new SchedulerImpl$1, this$static);
+  $SchedulerImpl$2(new SchedulerImpl$2, this$static);
+  this$static.deferredCommands = [];
+  this$static.incrementalCommands = [];
+  this$static.finallyCommands = [];
+  return this$static;
+}
+
+function $flushFinallyCommands(this$static){
+  var oldFinally;
+  oldFinally = this$static.finallyCommands;
+  this$static.finallyCommands = [];
+  runScheduledTasks(oldFinally, this$static.finallyCommands);
+}
+
+function $flushPostEventPumpCommands(this$static){
+  var oldDeferred;
+  oldDeferred = this$static.deferredCommands;
+  this$static.deferredCommands = [];
+  runScheduledTasks(oldDeferred, this$static.incrementalCommands);
+  this$static.incrementalCommands = runRepeatingTasks(this$static.incrementalCommands);
+}
+
+function $isWorkQueued(this$static){
+  return this$static.deferredCommands.length > 0 || this$static.incrementalCommands.length > 0;
+}
+
+function execute(cmd){
+  return cmd.execute();
+}
+
+function getClass_7(){
+  return Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit;
+}
+
+function runRepeatingTasks(tasks){
+  var canceledSomeTasks, i, length_0, newTasks, start, t;
+  canceledSomeTasks = false;
+  length_0 = tasks.length;
+  start = (new Date).getTime();
+  while ((new Date).getTime() - start < 100) {
+    for (i = 0; i < length_0; ++i) {
+      t = tasks[i];
+      if (!t) {
+        continue;
+      }
+      if (!t[0].execute()) {
+        tasks[i] = null;
+        canceledSomeTasks = true;
+      }
+    }
+  }
+  if (canceledSomeTasks) {
+    newTasks = [];
+    for (i = 0; i < length_0; ++i) {
+      if (!tasks[i]) {
+        continue;
+      }
+      newTasks[newTasks.length] = tasks[i];
+    }
+    return newTasks;
+  }
+   else {
+    return tasks;
+  }
+}
+
+function runScheduledTasks(tasks, rescheduled){
+  var $e0, i, j, t;
+  for (i = 0 , j = tasks.length; i < j; ++i) {
+    t = tasks[i];
+    try {
+      t[1]?t[0].execute() && (rescheduled[rescheduled.length] = t , undefined):t[0].nullMethod();
+    }
+     catch ($e0) {
+      $e0 = caught($e0);
+      if (!instanceOf($e0, 2))
+        throw $e0;
+    }
+  }
+}
+
+function scheduleFixedDelayImpl(cmd, delayMs){
+  $clinit_12();
+  $wnd.setTimeout(function(){
+    var ret = $entry(execute)(cmd);
+    ret && $wnd.setTimeout(arguments.callee, delayMs);
+  }
+  , delayMs);
+}
+
+function SchedulerImpl(){
+}
+
+_ = SchedulerImpl.prototype = new Scheduler;
+_.getClass$ = getClass_7;
+_.typeId$ = 0;
+_.flushRunning = false;
+_.shouldBeRunning = false;
+var INSTANCE;
+function $SchedulerImpl$1(this$static, this$0){
+  this$static.this$0 = this$0;
+  return this$static;
+}
+
+function execute_0(){
+  this.this$0.flushRunning = true;
+  $flushPostEventPumpCommands(this.this$0);
+  this.this$0.flushRunning = false;
+  return this.this$0.shouldBeRunning = $isWorkQueued(this.this$0);
+}
+
+function getClass_8(){
+  return Lcom_google_gwt_core_client_impl_SchedulerImpl$1_2_classLit;
+}
+
+function SchedulerImpl$1(){
+}
+
+_ = SchedulerImpl$1.prototype = new Object_0;
+_.execute = execute_0;
+_.getClass$ = getClass_8;
+_.typeId$ = 0;
+_.this$0 = null;
+function $SchedulerImpl$2(this$static, this$0){
+  this$static.this$0 = this$0;
+  return this$static;
+}
+
+function execute_1(){
+  this.this$0.flushRunning && scheduleFixedDelayImpl(this.this$0.flusher, 1);
+  return this.this$0.shouldBeRunning;
+}
+
+function getClass_9(){
+  return Lcom_google_gwt_core_client_impl_SchedulerImpl$2_2_classLit;
+}
+
+function SchedulerImpl$2(){
+}
+
+_ = SchedulerImpl$2.prototype = new Object_0;
+_.execute = execute_1;
+_.getClass$ = getClass_9;
+_.typeId$ = 0;
+_.this$0 = null;
+function extractNameFromToString(fnToString){
+  var index, start, toReturn;
+  toReturn = '';
+  fnToString = $trim(fnToString);
+  index = fnToString.indexOf('(');
+  if (index != -1) {
+    start = fnToString.indexOf('function') == 0?8:0;
+    toReturn = $trim(fnToString.substr(start, index - start));
+  }
+  return toReturn.length > 0?toReturn:'anonymous';
+}
+
+function splice(arr, length_0){
+  arr.length >= length_0 && arr.splice(0, length_0);
+  return arr;
+}
+
+function $createStackTrace(e){
+  var i, j, stack, stackTrace;
+  stack = $inferFrom(instanceOfJso(e.e)?dynamicCastJso(e.e):null);
+  stackTrace = initDim(_3Ljava_lang_StackTraceElement_2_classLit, 54, 9, stack.length, 0);
+  for (i = 0 , j = stackTrace.length; i < j; ++i) {
+    stackTrace[i] = $StackTraceElement(new StackTraceElement, 'Unknown', stack[i], 'Unknown source', 0);
+  }
+  $setStackTrace(stackTrace);
+}
+
+function $fillInStackTrace(){
+  var i, j, stack, stackTrace;
+  stack = splice($inferFrom($makeException()), 2);
+  stackTrace = initDim(_3Ljava_lang_StackTraceElement_2_classLit, 54, 9, stack.length, 0);
+  for (i = 0 , j = stackTrace.length; i < j; ++i) {
+    stackTrace[i] = $StackTraceElement(new StackTraceElement, 'Unknown', stack[i], 'Unknown source', 0);
+  }
+  $setStackTrace(stackTrace);
+}
+
+function $makeException(){
+  try {
+    null.a();
+  }
+   catch (e) {
+    return e;
+  }
+}
+
+function $inferFrom(e){
+  var i, j, stack;
+  stack = e && e.stack?e.stack.split('\n'):[];
+  for (i = 0 , j = stack.length; i < j; ++i) {
+    stack[i] = extractNameFromToString(stack[i]);
+  }
+  return stack;
+}
+
+function getClass_10(){
+  return Lcom_google_gwt_core_client_impl_StringBufferImpl_2_classLit;
+}
+
+function StringBufferImpl(){
+}
+
+_ = StringBufferImpl.prototype = new Object_0;
+_.getClass$ = getClass_10;
+_.typeId$ = 0;
+function $replace(this$static, start, end, toInsert){
+  this$static.string = this$static.string.substr(0, start - 0) + toInsert + $substring(this$static.string, end);
+}
+
+function getClass_11(){
+  return Lcom_google_gwt_core_client_impl_StringBufferImplAppend_2_classLit;
+}
+
+function StringBufferImplAppend(){
+}
+
+_ = StringBufferImplAppend.prototype = new StringBufferImpl;
+_.getClass$ = getClass_11;
+_.typeId$ = 0;
+_.string = '';
+function getClass_12(){
+  return Lcom_google_gwt_event_shared_GwtEvent_2_classLit;
+}
+
+function toString_3(){
+  return 'An event type';
+}
+
+function GwtEvent(){
+}
+
+_ = GwtEvent.prototype = new Object_0;
+_.getClass$ = getClass_12;
+_.toString$ = toString_3;
+_.typeId$ = 0;
+_.dead = false;
+_.source = null;
+function dispatch(p0){
+  $onClose();
+}
+
+function fire(source){
+  var event_0;
+  if (TYPE) {
+    event_0 = new CloseEvent;
+    $fireEvent(source, event_0);
+  }
+}
+
+function getAssociatedType(){
+  return TYPE;
+}
+
+function getClass_13(){
+  return Lcom_google_gwt_event_logical_shared_CloseEvent_2_classLit;
+}
+
+function CloseEvent(){
+}
+
+_ = CloseEvent.prototype = new GwtEvent;
+_.dispatch = dispatch;
+_.getAssociatedType = getAssociatedType;
+_.getClass$ = getClass_13;
+_.typeId$ = 0;
+var TYPE = null;
+function getClass_14(){
+  return Lcom_google_gwt_event_shared_DefaultHandlerRegistration_2_classLit;
+}
+
+function DefaultHandlerRegistration(){
+}
+
+_ = DefaultHandlerRegistration.prototype = new Object_0;
+_.getClass$ = getClass_14;
+_.typeId$ = 0;
+function $GwtEvent$Type(this$static){
+  this$static.index = ++nextHashCode;
+  return this$static;
+}
+
+function getClass_15(){
+  return Lcom_google_gwt_event_shared_GwtEvent$Type_2_classLit;
+}
+
+function hashCode_2(){
+  return this.index;
+}
+
+function toString_4(){
+  return 'Event type';
+}
+
+function GwtEvent$Type(){
+}
+
+_ = GwtEvent$Type.prototype = new Object_0;
+_.getClass$ = getClass_15;
+_.hashCode$ = hashCode_2;
+_.toString$ = toString_4;
+_.typeId$ = 0;
+_.index = 0;
+var nextHashCode = 0;
+function $addHandler(this$static, type, handler){
+  this$static.firingDepth > 0?$defer(this$static, $HandlerManager$1(new HandlerManager$1, this$static, type, handler)):$addHandler_0(this$static.registry, type, handler);
+  return new DefaultHandlerRegistration;
+}
+
+function $defer(this$static, command){
+  !this$static.deferredDeltas && (this$static.deferredDeltas = $ArrayList(new ArrayList));
+  $add(this$static.deferredDeltas, command);
+}
+
+function $fireEvent(this$static, event_0){
+  var oldSource;
+  if (event_0.dead) {
+    event_0.dead = false;
+    event_0.source = null;
+  }
+  oldSource = event_0.source;
+  event_0.source = this$static.source;
+  try {
+    ++this$static.firingDepth;
+    $fireEvent_0(this$static.registry, event_0, this$static.isReverseOrder);
+  }
+   finally {
+    --this$static.firingDepth;
+    this$static.firingDepth == 0 && $handleQueuedAddsAndRemoves(this$static);
+  }
+  if (oldSource == null) {
+    event_0.dead = true;
+    event_0.source = null;
+  }
+   else {
+    event_0.source = oldSource;
+  }
+}
+
+function $handleQueuedAddsAndRemoves(this$static){
+  var c, c$iterator;
+  if (this$static.deferredDeltas) {
+    try {
+      for (c$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl, this$static.deferredDeltas); c$iterator.i < c$iterator.this$0.size_0();) {
+        c = dynamicCast($next_0(c$iterator), 3);
+        $addHandler_0(c.this$0.registry, c.val$type, c.val$handler);
+      }
+    }
+     finally {
+      this$static.deferredDeltas = null;
+    }
+  }
+}
+
+function getClass_16(){
+  return Lcom_google_gwt_event_shared_HandlerManager_2_classLit;
+}
+
+function HandlerManager(){
+}
+
+_ = HandlerManager.prototype = new Object_0;
+_.getClass$ = getClass_16;
+_.typeId$ = 0;
+_.deferredDeltas = null;
+_.firingDepth = 0;
+_.isReverseOrder = false;
+_.registry = null;
+_.source = null;
+function $HandlerManager$1(this$static, this$0, val$type, val$handler){
+  this$static.this$0 = this$0;
+  this$static.val$type = val$type;
+  this$static.val$handler = val$handler;
+  return this$static;
+}
+
+function getClass_17(){
+  return Lcom_google_gwt_event_shared_HandlerManager$1_2_classLit;
+}
+
+function HandlerManager$1(){
+}
+
+_ = HandlerManager$1.prototype = new Object_0;
+_.getClass$ = getClass_17;
+_.typeId$ = 7;
+_.this$0 = null;
+_.val$handler = null;
+_.val$type = null;
+function $HandlerManager$HandlerRegistry(this$static){
+  this$static.map = $HashMap(new HashMap);
+  return this$static;
+}
+
+function $addHandler_0(this$static, type, handler){
+  var l;
+  l = dynamicCast($get_1(this$static.map, type), 4);
+  if (!l) {
+    l = $ArrayList(new ArrayList);
+    $put(this$static.map, type, l);
+  }
+  setCheck(l.array, l.size++, handler);
+}
+
+function $fireEvent_0(this$static, event_0, isReverseOrder){
+  var count, handler, i, type, l, l_0, l_1;
+  type = event_0.getAssociatedType();
+  count = (l = dynamicCast($get_1(this$static.map, type), 4) , !l?0:l.size);
+  if (isReverseOrder) {
+    for (i = count - 1; i >= 0; --i) {
+      handler = (l_0 = dynamicCast($get_1(this$static.map, type), 4) , dynamicCast((checkIndex(i, l_0.size) , l_0.array[i]), 19));
+      event_0.dispatch(handler);
+    }
+  }
+   else {
+    for (i = 0; i < count; ++i) {
+      handler = (l_1 = dynamicCast($get_1(this$static.map, type), 4) , dynamicCast((checkIndex(i, l_1.size) , l_1.array[i]), 19));
+      event_0.dispatch(handler);
+    }
+  }
+}
+
+function getClass_18(){
+  return Lcom_google_gwt_event_shared_HandlerManager$HandlerRegistry_2_classLit;
+}
+
+function HandlerManager$HandlerRegistry(){
+}
+
+_ = HandlerManager$HandlerRegistry.prototype = new Object_0;
+_.getClass$ = getClass_18;
+_.typeId$ = 0;
+function createFromSeed(seedType, length_0){
+  var array = new Array(length_0);
+  if (seedType > 0) {
+    var value = [null, 0, false, [0, 0]][seedType];
+    for (var i = 0; i < length_0; ++i) {
+      array[i] = value;
+    }
+  }
+  return array;
+}
+
+function getClass_19(){
+  return this.arrayClass$;
+}
+
+function initDim(arrayClass, typeId, queryId, length_0, seedType){
+  var result;
+  result = createFromSeed(seedType, length_0);
+  $clinit_37();
+  wrapArray(result, expandoNames_0, expandoValues_0);
+  result.arrayClass$ = arrayClass;
+  result.typeId$ = typeId;
+  result.queryId$ = queryId;
+  return result;
+}
+
+function initValues(arrayClass, typeId, queryId, array){
+  $clinit_37();
+  wrapArray(array, expandoNames_0, expandoValues_0);
+  array.arrayClass$ = arrayClass;
+  array.typeId$ = typeId;
+  array.queryId$ = queryId;
+  return array;
+}
+
+function setCheck(array, index, value){
+  if (value != null) {
+    if (array.queryId$ > 0 && !canCastUnsafe(value.typeId$, array.queryId$)) {
+      throw $ArrayStoreException(new ArrayStoreException);
+    }
+    if (array.queryId$ < 0 && (value.typeMarker$ == nullMethod || value.typeId$ == 2)) {
+      throw $ArrayStoreException(new ArrayStoreException);
+    }
+  }
+  return array[index] = value;
+}
+
+function Array_0(){
+}
+
+_ = Array_0.prototype = new Object_0;
+_.getClass$ = getClass_19;
+_.typeId$ = 0;
+_.arrayClass$ = null;
+_.length = 0;
+_.queryId$ = 0;
+function $clinit_37(){
+  $clinit_37 = nullMethod;
+  expandoNames_0 = [];
+  expandoValues_0 = [];
+  initExpandos(new Array_0, expandoNames_0, expandoValues_0);
+}
+
+function initExpandos(protoType, expandoNames, expandoValues){
+  var i = 0, value;
+  for (var name_0 in protoType) {
+    if (value = protoType[name_0]) {
+      expandoNames[i] = name_0;
+      expandoValues[i] = value;
+      ++i;
+    }
+  }
+}
+
+function wrapArray(array, expandoNames, expandoValues){
+  $clinit_37();
+  for (var i = 0, c = expandoNames.length; i < c; ++i) {
+    array[expandoNames[i]] = expandoValues[i];
+  }
+}
+
+var expandoNames_0, expandoValues_0;
+function canCast(srcId, dstId){
+  return srcId && !!typeIdArray[srcId][dstId];
+}
+
+function canCastUnsafe(srcId, dstId){
+  return srcId && typeIdArray[srcId][dstId];
+}
+
+function dynamicCast(src, dstId){
+  if (src != null && !canCastUnsafe(src.typeId$, dstId)) {
+    throw $ClassCastException(new ClassCastException);
+  }
+  return src;
+}
+
+function dynamicCastJso(src){
+  if (src != null && (src.typeMarker$ == nullMethod || src.typeId$ == 2)) {
+    throw $ClassCastException(new ClassCastException);
+  }
+  return src;
+}
+
+function instanceOf(src, dstId){
+  return src != null && canCast(src.typeId$, dstId);
+}
+
+function instanceOfJso(src){
+  return src != null && src.typeMarker$ != nullMethod && src.typeId$ != 2;
+}
+
+function throwClassCastExceptionUnlessNull(o){
+  if (o != null) {
+    throw $ClassCastException(new ClassCastException);
+  }
+  return o;
+}
+
+var typeIdArray = [{}, {}, {1:1, 5:1, 6:1, 7:1}, {5:1, 20:1}, {5:1, 20:1}, {2:1, 5:1, 20:1}, {2:1, 5:1, 20:1, 28:1}, {3:1}, {19:1}, {2:1, 5:1, 20:1}, {2:1, 5:1, 20:1}, {5:1, 20:1}, {5:1, 20:1}, {2:1, 5:1, 20:1}, {5:1, 7:1, 8:1}, {2:1, 5:1, 20:1}, {2:1, 5:1, 20:1}, {2:1, 5:1, 20:1}, {5:1, 9:1}, {6:1}, {6:1}, {2:1, 5:1, 20:1}, {2:1, 5:1, 20:1}, {27:1}, {23:1}, {23:1}, {23:1}, {24:1}, {24:1}, {4:1, 5:1, 24:1}, {5:1, 25:1}, {5:1, 24:1}, {23:1}, {2:1, 5:1, 20:1, 26:1}, {5:1, 7:1, 8:1, 10:1}, {5:1, 7:1, 8:1, 11:1}, {5:1, 7:1, 8:1, 12:1}, {29:1}, {21:1}, {13:1}, {14:1}, {15:1}, {31:1}, {5:1, 20:1, 30:1}, {5:1, 20:1, 30:1}, {5:1}, {5:1, 16:1}, {5:1, 17:1}, {5:1, 18:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}, {5:1, 22:1}];
+function init(){
+  !!$stats && $stats({moduleName:$moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date).getTime(), type:'onModuleLoadStart', className:'nu.validator.htmlparser.gwt.HtmlParserModule'});
+  Envjs.parseHtmlDocument = parseHtmlDocument;
+  Envjs.parseXmlDocument = parseXmlDocument;
+}
+
+function caught(e){
+  if (e != null && canCast(e.typeId$, 20)) {
+    return e;
+  }
+  return $JavaScriptException(new JavaScriptException, e);
+}
+
+function create(valueLow, valueHigh){
+  var diffHigh, diffLow;
+  valueHigh %= 1.8446744073709552E19;
+  valueLow %= 1.8446744073709552E19;
+  diffHigh = valueHigh % 4294967296;
+  diffLow = Math.floor(valueLow / 4294967296) * 4294967296;
+  valueHigh = valueHigh - diffHigh + diffLow;
+  valueLow = valueLow - diffLow + diffHigh;
+  while (valueLow < 0) {
+    valueLow += 4294967296;
+    valueHigh -= 4294967296;
+  }
+  while (valueLow > 4294967295) {
+    valueLow -= 4294967296;
+    valueHigh += 4294967296;
+  }
+  valueHigh = valueHigh % 1.8446744073709552E19;
+  while (valueHigh > 9223372032559808512) {
+    valueHigh -= 1.8446744073709552E19;
+  }
+  while (valueHigh < -9223372036854775808) {
+    valueHigh += 1.8446744073709552E19;
+  }
+  return [valueLow, valueHigh];
+}
+
+function fromDouble(value){
+  if (isNaN(value)) {
+    return $clinit_44() , ZERO;
+  }
+  if (value < -9223372036854775808) {
+    return $clinit_44() , MIN_VALUE;
+  }
+  if (value >= 9223372036854775807) {
+    return $clinit_44() , MAX_VALUE;
+  }
+  if (value > 0) {
+    return create(Math.floor(value), 0);
+  }
+   else {
+    return create(Math.ceil(value), 0);
+  }
+}
+
+function fromInt(value){
+  var rebase, result;
+  if (value > -129 && value < 128) {
+    rebase = value + 128;
+    result = ($clinit_43() , boxedValues)[rebase];
+    result == null && (result = boxedValues[rebase] = internalFromInt(value));
+    return result;
+  }
+  return internalFromInt(value);
+}
+
+function internalFromInt(value){
+  if (value >= 0) {
+    return [value, 0];
+  }
+   else {
+    return [value + 4294967296, -4294967296];
+  }
+}
+
+function $clinit_43(){
+  $clinit_43 = nullMethod;
+  boxedValues = initDim(_3_3D_classLit, 63, 17, 256, 0);
+}
+
+var boxedValues;
+function $clinit_44(){
+  $clinit_44 = nullMethod;
+  Math.log(2);
+  MAX_VALUE = P7fffffffffffffff_longLit;
+  MIN_VALUE = N8000000000000000_longLit;
+  fromInt(-1);
+  fromInt(1);
+  fromInt(2);
+  ZERO = fromInt(0);
+}
+
+var MAX_VALUE, MIN_VALUE, ZERO;
+function $clinit_47(){
+  $clinit_47 = nullMethod;
+  timers = $ArrayList(new ArrayList);
+  addCloseHandler(new Timer$1);
+}
+
+function $cancel(this$static){
+  this$static.isRepeating?($wnd.clearInterval(this$static.timerId) , undefined):($wnd.clearTimeout(this$static.timerId) , undefined);
+  $remove_0(timers, this$static);
+}
+
+function $schedule(this$static, delayMillis){
+  if (delayMillis <= 0) {
+    throw $IllegalArgumentException(new IllegalArgumentException, 'must be positive');
+  }
+  $cancel(this$static);
+  this$static.isRepeating = false;
+  this$static.timerId = createTimeout(this$static, delayMillis);
+  $add(timers, this$static);
+}
+
+function createTimeout(timer, delay){
+  return $wnd.setTimeout($entry(function(){
+    timer.fire();
+  }
+  ), delay);
+}
+
+function fire_0(){
+  !this.isRepeating && $remove_0(timers, this);
+  $run(this);
+}
+
+function getClass_20(){
+  return Lcom_google_gwt_user_client_Timer_2_classLit;
+}
+
+function Timer(){
+}
+
+_ = Timer.prototype = new Object_0;
+_.fire = fire_0;
+_.getClass$ = getClass_20;
+_.typeId$ = 0;
+_.isRepeating = false;
+_.timerId = 0;
+var timers;
+function $onClose(){
+  while (($clinit_47() , timers).size > 0) {
+    $cancel(dynamicCast($get_2(timers, 0), 21));
+  }
+}
+
+function getClass_21(){
+  return Lcom_google_gwt_user_client_Timer$1_2_classLit;
+}
+
+function Timer$1(){
+}
+
+_ = Timer$1.prototype = new Object_0;
+_.getClass$ = getClass_21;
+_.typeId$ = 8;
+function addCloseHandler(handler){
+  maybeInitializeCloseHandlers();
+  return addHandler(TYPE?TYPE:(TYPE = $GwtEvent$Type(new GwtEvent$Type)), handler);
+}
+
+function addHandler(type, handler){
+  return $addHandler(getHandlers(), type, handler);
+}
+
+function getHandlers(){
+  !handlers && (handlers = $Window$WindowHandlers(new Window$WindowHandlers));
+  return handlers;
+}
+
+function maybeInitializeCloseHandlers(){
+  if (!closeHandlersInitialized) {
+    $initWindowCloseHandler();
+    closeHandlersInitialized = true;
+  }
+}
+
+function onClosing(){
+  var event_0;
+  if (closeHandlersInitialized) {
+    event_0 = ($clinit_50() , new Window$ClosingEvent);
+    !!handlers && $fireEvent(handlers, event_0);
+    return null;
+  }
+  return null;
+}
+
+var closeHandlersInitialized = false, handlers = null;
+function $clinit_50(){
+  $clinit_50 = nullMethod;
+  TYPE_0 = $GwtEvent$Type(new GwtEvent$Type);
+}
+
+function dispatch_0(p0){
+  throwClassCastExceptionUnlessNull(p0);
+  null.nullMethod();
+}
+
+function getAssociatedType_0(){
+  return TYPE_0;
+}
+
+function getClass_22(){
+  return Lcom_google_gwt_user_client_Window$ClosingEvent_2_classLit;
+}
+
+function Window$ClosingEvent(){
+}
+
+_ = Window$ClosingEvent.prototype = new GwtEvent;
+_.dispatch = dispatch_0;
+_.getAssociatedType = getAssociatedType_0;
+_.getClass$ = getClass_22;
+_.typeId$ = 0;
+var TYPE_0;
+function $Window$WindowHandlers(this$static){
+  this$static.registry = $HandlerManager$HandlerRegistry(new HandlerManager$HandlerRegistry);
+  this$static.source = null;
+  this$static.isReverseOrder = false;
+  return this$static;
+}
+
+function getClass_23(){
+  return Lcom_google_gwt_user_client_Window$WindowHandlers_2_classLit;
+}
+
+function Window$WindowHandlers(){
+}
+
+_ = Window$WindowHandlers.prototype = new HandlerManager;
+_.getClass$ = getClass_23;
+_.typeId$ = 0;
+function $initWindowCloseHandler(){
+  var oldOnBeforeUnload = $wnd.onbeforeunload;
+  var oldOnUnload = $wnd.onunload;
+  $wnd.onbeforeunload = function(evt){
+    var ret, oldRet;
+    try {
+      ret = $entry(onClosing)();
+    }
+     finally {
+      oldRet = oldOnBeforeUnload && oldOnBeforeUnload(evt);
+    }
+    if (ret != null) {
+      return ret;
+    }
+    if (oldRet != null) {
+      return oldRet;
+    }
+  }
+  ;
+  $wnd.onunload = $entry(function(evt){
+    try {
+      closeHandlersInitialized && fire(getHandlers());
+    }
+     finally {
+      oldOnUnload && oldOnUnload(evt);
+      $wnd.onresize = null;
+      $wnd.onscroll = null;
+      $wnd.onbeforeunload = null;
+      $wnd.onunload = null;
+    }
+  }
+  );
+}
+
+function $ArrayStoreException(this$static){
+  $fillInStackTrace();
+  return this$static;
+}
+
+function $ArrayStoreException_0(this$static, message){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  return this$static;
+}
+
+function getClass_24(){
+  return Ljava_lang_ArrayStoreException_2_classLit;
+}
+
+function ArrayStoreException(){
+}
+
+_ = ArrayStoreException.prototype = new RuntimeException;
+_.getClass$ = getClass_24;
+_.typeId$ = 10;
+function createForArray(packageName, className, componentType){
+  var clazz;
+  clazz = new Class;
+  clazz.typeName = packageName + className;
+  clazz.modifiers = 4;
+  clazz.componentType = componentType;
+  return clazz;
+}
+
+function createForClass(packageName, className){
+  var clazz;
+  clazz = new Class;
+  clazz.typeName = packageName + className;
+  return clazz;
+}
+
+function createForEnum(packageName, className, enumConstantsFunc){
+  var clazz;
+  clazz = new Class;
+  clazz.typeName = packageName + className;
+  clazz.modifiers = enumConstantsFunc?8:0;
+  return clazz;
+}
+
+function createForPrimitive(packageName, className){
+  var clazz;
+  clazz = new Class;
+  clazz.typeName = packageName + className;
+  clazz.modifiers = 1;
+  return clazz;
+}
+
+function getClass_25(){
+  return Ljava_lang_Class_2_classLit;
+}
+
+function toString_5(){
+  return ((this.modifiers & 2) != 0?'interface ':(this.modifiers & 1) != 0?'':'class ') + this.typeName;
+}
+
+function Class(){
+}
+
+_ = Class.prototype = new Object_0;
+_.getClass$ = getClass_25;
+_.toString$ = toString_5;
+_.typeId$ = 0;
+_.componentType = null;
+_.modifiers = 0;
+_.typeName = null;
+function $ClassCastException(this$static){
+  $fillInStackTrace();
+  return this$static;
+}
+
+function getClass_26(){
+  return Ljava_lang_ClassCastException_2_classLit;
+}
+
+function ClassCastException(){
+}
+
+_ = ClassCastException.prototype = new RuntimeException;
+_.getClass$ = getClass_26;
+_.typeId$ = 13;
+function equals_1(other){
+  return this === (other == null?null:other);
+}
+
+function getClass_27(){
+  return Ljava_lang_Enum_2_classLit;
+}
+
+function hashCode_3(){
+  return this.$H || (this.$H = ++sNextHashId);
+}
+
+function toString_6(){
+  return this.name_0;
+}
+
+function Enum(){
+}
+
+_ = Enum.prototype = new Object_0;
+_.equals$ = equals_1;
+_.getClass$ = getClass_27;
+_.hashCode$ = hashCode_3;
+_.toString$ = toString_6;
+_.typeId$ = 14;
+_.name_0 = null;
+_.ordinal = 0;
+function $IllegalArgumentException(this$static, message){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  return this$static;
+}
+
+function getClass_28(){
+  return Ljava_lang_IllegalArgumentException_2_classLit;
+}
+
+function IllegalArgumentException(){
+}
+
+_ = IllegalArgumentException.prototype = new RuntimeException;
+_.getClass$ = getClass_28;
+_.typeId$ = 15;
+function $IndexOutOfBoundsException(this$static){
+  $fillInStackTrace();
+  return this$static;
+}
+
+function $IndexOutOfBoundsException_0(this$static, message){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  return this$static;
+}
+
+function getClass_29(){
+  return Ljava_lang_IndexOutOfBoundsException_2_classLit;
+}
+
+function IndexOutOfBoundsException(){
+}
+
+_ = IndexOutOfBoundsException.prototype = new RuntimeException;
+_.getClass$ = getClass_29;
+_.typeId$ = 16;
+function toPowerOfTwoString(value, shift){
+  var bitMask, buf, bufSize, digits, pos;
+  bufSize = ~~(32 / shift);
+  bitMask = (1 << shift) - 1;
+  buf = initDim(_3C_classLit, 46, -1, bufSize, 1);
+  digits = ($clinit_70() , digits_0);
+  pos = bufSize - 1;
+  if (value >= 0) {
+    while (value > bitMask) {
+      buf[pos--] = digits[value & bitMask];
+      value >>= shift;
+    }
+  }
+   else {
+    while (pos > 0) {
+      buf[pos--] = digits[value & bitMask];
+      value >>= shift;
+    }
+  }
+  buf[pos] = digits[value & bitMask];
+  return __valueOf(buf, pos, bufSize);
+}
+
+function $NullPointerException(this$static){
+  $fillInStackTrace();
+  return this$static;
+}
+
+function getClass_30(){
+  return Ljava_lang_NullPointerException_2_classLit;
+}
+
+function NullPointerException(){
+}
+
+_ = NullPointerException.prototype = new RuntimeException;
+_.getClass$ = getClass_30;
+_.typeId$ = 17;
+function $clinit_70(){
+  $clinit_70 = nullMethod;
+  digits_0 = initValues(_3C_classLit, 46, -1, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122]);
+}
+
+var digits_0;
+function $StackTraceElement(this$static, className, methodName, fileName, lineNumber){
+  this$static.className = className;
+  this$static.methodName = methodName;
+  this$static.fileName = fileName;
+  this$static.lineNumber = lineNumber;
+  return this$static;
+}
+
+function getClass_31(){
+  return Ljava_lang_StackTraceElement_2_classLit;
+}
+
+function toString_7(){
+  return this.className + '.' + this.methodName + '(' + this.fileName + ':' + this.lineNumber + ')';
+}
+
+function StackTraceElement(){
+}
+
+_ = StackTraceElement.prototype = new Object_0;
+_.getClass$ = getClass_31;
+_.toString$ = toString_7;
+_.typeId$ = 18;
+_.className = null;
+_.fileName = null;
+_.lineNumber = 0;
+_.methodName = null;
+function $equals_1(this$static, other){
+  if (!(other != null && canCast(other.typeId$, 1))) {
+    return false;
+  }
+  return String(this$static) == other;
+}
+
+function $getChars(this$static, srcBegin, srcEnd, dst, dstBegin){
+  var srcIdx;
+  for (srcIdx = srcBegin; srcIdx < srcEnd; ++srcIdx) {
+    dst[dstBegin++] = this$static.charCodeAt(srcIdx);
+  }
+}
+
+function $substring(this$static, beginIndex){
+  return this$static.substr(beginIndex, this$static.length - beginIndex);
+}
+
+function $toCharArray(this$static){
+  var charArr, n;
+  n = this$static.length;
+  charArr = initDim(_3C_classLit, 46, -1, n, 1);
+  $getChars(this$static, 0, n, charArr, 0);
+  return charArr;
+}
+
+function $trim(this$static){
+  if (this$static.length == 0 || this$static[0] > ' ' && this$static[this$static.length - 1] > ' ') {
+    return this$static;
+  }
+  var r1 = this$static.replace(/^(\s*)/, '');
+  var r2 = r1.replace(/\s*$/, '');
+  return r2;
+}
+
+function __checkBounds(legalCount, start, end){
+  if (start < 0) {
+    throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException, start);
+  }
+  if (end < start) {
+    throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException, end - start);
+  }
+  if (end > legalCount) {
+    throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException, end);
+  }
+}
+
+function __valueOf(x, start, end){
+  x = x.slice(start, end);
+  return String.fromCharCode.apply(null, x);
+}
+
+function compareTo(thisStr, otherStr){
+  thisStr = String(thisStr);
+  if (thisStr == otherStr) {
+    return 0;
+  }
+  return thisStr < otherStr?-1:1;
+}
+
+function equals_2(other){
+  return $equals_1(this, other);
+}
+
+function getClass_32(){
+  return Ljava_lang_String_2_classLit;
+}
+
+function hashCode_4(){
+  return getHashCode_0(this);
+}
+
+function toString_8(){
+  return this;
+}
+
+function valueOf_0(x, offset, count){
+  var end;
+  end = offset + count;
+  __checkBounds(x.length, offset, end);
+  return __valueOf(x, offset, end);
+}
+
+_ = String.prototype;
+_.equals$ = equals_2;
+_.getClass$ = getClass_32;
+_.hashCode$ = hashCode_4;
+_.toString$ = toString_8;
+_.typeId$ = 2;
+function $clinit_73(){
+  $clinit_73 = nullMethod;
+  back = {};
+  front = {};
+}
+
+function compute(str){
+  var hashCode, i, n, nBatch;
+  hashCode = 0;
+  n = str.length;
+  nBatch = n - 4;
+  i = 0;
+  while (i < nBatch) {
+    hashCode = str.charCodeAt(i + 3) + 31 * (str.charCodeAt(i + 2) + 31 * (str.charCodeAt(i + 1) + 31 * (str.charCodeAt(i) + 31 * hashCode))) | 0;
+    i += 4;
+  }
+  while (i < n) {
+    hashCode = hashCode * 31 + str.charCodeAt(i++);
+  }
+  return hashCode | 0;
+}
+
+function getHashCode_0(str){
+  $clinit_73();
+  var key = ':' + str;
+  var result = front[key];
+  if (result != null) {
+    return result;
+  }
+  result = back[key];
+  result == null && (result = compute(str));
+  increment();
+  return front[key] = result;
+}
+
+function increment(){
+  if (count_0 == 256) {
+    back = front;
+    front = {};
+    count_0 = 0;
+  }
+  ++count_0;
+}
+
+var back, count_0 = 0, front;
+function $StringBuffer(this$static){
+  this$static.impl = new StringBufferImplAppend;
+  return this$static;
+}
+
+function $append_0(this$static, x){
+  this$static.impl.string += x;
+  return this$static;
+}
+
+function getClass_33(){
+  return Ljava_lang_StringBuffer_2_classLit;
+}
+
+function toString_9(){
+  return this.impl.string;
+}
+
+function StringBuffer(){
+}
+
+_ = StringBuffer.prototype = new Object_0;
+_.getClass$ = getClass_33;
+_.toString$ = toString_9;
+_.typeId$ = 19;
+function $StringBuilder(this$static){
+  this$static.impl = new StringBufferImplAppend;
+  return this$static;
+}
+
+function $append_1(this$static, x){
+  this$static.impl.string += String.fromCharCode(x);
+  return this$static;
+}
+
+function $append_2(this$static, x){
+  this$static.impl.string += String.fromCharCode.apply(null, x);
+  return this$static;
+}
+
+function $getChars_0(this$static, srcStart, srcEnd, dst, dstStart){
+  var s;
+  __checkBounds(this$static.impl.string.length, srcStart, srcEnd);
+  __checkBounds(dst.length, dstStart, dstStart + (srcEnd - srcStart));
+  s = this$static.impl.string;
+  while (srcStart < srcEnd) {
+    dst[dstStart++] = s.charCodeAt(srcStart++);
+  }
+}
+
+function $setLength(this$static, newLength){
+  var oldLength;
+  oldLength = this$static.impl.string.length;
+  newLength < oldLength?$replace(this$static.impl, newLength, oldLength, ''):newLength > oldLength && $append_2(this$static, initDim(_3C_classLit, 46, -1, newLength - oldLength, 1));
+}
+
+function getClass_34(){
+  return Ljava_lang_StringBuilder_2_classLit;
+}
+
+function toString_10(){
+  return this.impl.string;
+}
+
+function StringBuilder(){
+}
+
+_ = StringBuilder.prototype = new Object_0;
+_.getClass$ = getClass_34;
+_.toString$ = toString_10;
+_.typeId$ = 20;
+function $StringIndexOutOfBoundsException(this$static, index){
+  $fillInStackTrace();
+  this$static.detailMessage = 'String index out of range: ' + index;
+  return this$static;
+}
+
+function getClass_35(){
+  return Ljava_lang_StringIndexOutOfBoundsException_2_classLit;
+}
+
+function StringIndexOutOfBoundsException(){
+}
+
+_ = StringIndexOutOfBoundsException.prototype = new IndexOutOfBoundsException;
+_.getClass$ = getClass_35;
+_.typeId$ = 21;
+function arrayTypeMatch(srcComp, destComp){
+  if ((srcComp.modifiers & 1) != 0) {
+    return srcComp == destComp;
+  }
+   else {
+    return (destComp.modifiers & 1) == 0;
+  }
+}
+
+function arraycopy(src, srcOfs, dest, destOfs, len){
+  var destArray, destComp, destEnd, destType, destlen, srcArray, srcComp, srcType, srclen;
+  if (src == null || dest == null) {
+    throw $NullPointerException(new NullPointerException);
+  }
+  srcType = src.typeMarker$ == nullMethod || src.typeId$ == 2?src.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
+  destType = dest.typeMarker$ == nullMethod || dest.typeId$ == 2?dest.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
+  if ((srcType.modifiers & 4) == 0 || (destType.modifiers & 4) == 0) {
+    throw $ArrayStoreException_0(new ArrayStoreException, 'Must be array types');
+  }
+  srcComp = srcType.componentType;
+  destComp = destType.componentType;
+  if (!arrayTypeMatch(srcComp, destComp)) {
+    throw $ArrayStoreException_0(new ArrayStoreException, 'Array types must match');
+  }
+  srclen = src.length;
+  destlen = dest.length;
+  if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) {
+    throw $IndexOutOfBoundsException(new IndexOutOfBoundsException);
+  }
+  if (((srcComp.modifiers & 1) == 0 || (srcComp.modifiers & 4) != 0) && srcType != destType) {
+    srcArray = dynamicCast(src, 22);
+    destArray = dynamicCast(dest, 22);
+    if ((src == null?null:src) === (dest == null?null:dest) && srcOfs < destOfs) {
+      srcOfs += len;
+      for (destEnd = destOfs + len; destEnd-- > destOfs;) {
+        setCheck(destArray, destEnd, srcArray[--srcOfs]);
+      }
+    }
+     else {
+      for (destEnd = destOfs + len; destOfs < destEnd;) {
+        setCheck(destArray, destOfs++, srcArray[srcOfs++]);
+      }
+    }
+  }
+   else {
+    Array.prototype.splice.apply(dest, [destOfs, len].concat(src.slice(srcOfs, srcOfs + len)));
+  }
+}
+
+function $UnsupportedOperationException(this$static, message){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  return this$static;
+}
+
+function getClass_36(){
+  return Ljava_lang_UnsupportedOperationException_2_classLit;
+}
+
+function UnsupportedOperationException(){
+}
+
+_ = UnsupportedOperationException.prototype = new RuntimeException;
+_.getClass$ = getClass_36;
+_.typeId$ = 22;
+function $advanceToFind(iter, o){
+  var t;
+  while (iter.hasNext()) {
+    t = iter.next_0();
+    if (o == null?t == null:equals__devirtual$(o, t)) {
+      return iter;
+    }
+  }
+  return null;
+}
+
+function add(o){
+  throw $UnsupportedOperationException(new UnsupportedOperationException, 'Add not supported on this collection');
+}
+
+function contains(o){
+  var iter;
+  iter = $advanceToFind(this.iterator(), o);
+  return !!iter;
+}
+
+function getClass_37(){
+  return Ljava_util_AbstractCollection_2_classLit;
+}
+
+function toString_11(){
+  var comma, iter, sb;
+  sb = $StringBuffer(new StringBuffer);
+  comma = null;
+  sb.impl.string += '[';
+  iter = this.iterator();
+  while (iter.hasNext()) {
+    comma != null?(sb.impl.string += comma , undefined):(comma = ', ');
+    $append_0(sb, '' + iter.next_0());
+  }
+  sb.impl.string += ']';
+  return sb.impl.string;
+}
+
+function AbstractCollection(){
+}
+
+_ = AbstractCollection.prototype = new Object_0;
+_.add = add;
+_.contains = contains;
+_.getClass$ = getClass_37;
+_.toString$ = toString_11;
+_.typeId$ = 0;
+function equals_3(obj){
+  var entry, entry$iterator, otherKey, otherMap, otherValue;
+  if ((obj == null?null:obj) === this) {
+    return true;
+  }
+  if (!(obj != null && canCast(obj.typeId$, 25))) {
+    return false;
+  }
+  otherMap = dynamicCast(obj, 25);
+  if (dynamicCast(this, 25).size != otherMap.size) {
+    return false;
+  }
+  for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator, $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet, otherMap).this$0); $hasNext_0(entry$iterator.iter);) {
+    entry = dynamicCast($next_0(entry$iterator.iter), 23);
+    otherKey = entry.getKey();
+    otherValue = entry.getValue();
+    if (!(otherKey == null?dynamicCast(this, 25).nullSlotLive:otherKey != null && canCast(otherKey.typeId$, 1)?$hasStringValue(dynamicCast(this, 25), dynamicCast(otherKey, 1)):$hasHashValue(dynamicCast(this, 25), otherKey, ~~hashCode__devirtual$(otherKey)))) {
+      return false;
+    }
+    if (!equalsWithNullCheck(otherValue, otherKey == null?dynamicCast(this, 25).nullSlot:otherKey != null && canCast(otherKey.typeId$, 1)?dynamicCast(this, 25).stringMap[':' + dynamicCast(otherKey, 1)]:$getHashValue(dynamicCast(this, 25), otherKey, ~~hashCode__devirtual$(otherKey)))) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function getClass_38(){
+  return Ljava_util_AbstractMap_2_classLit;
+}
+
+function hashCode_5(){
+  var entry, entry$iterator, hashCode;
+  hashCode = 0;
+  for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator, $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet, dynamicCast(this, 25)).this$0); $hasNext_0(entry$iterator.iter);) {
+    entry = dynamicCast($next_0(entry$iterator.iter), 23);
+    hashCode += entry.hashCode$();
+    hashCode = ~~hashCode;
+  }
+  return hashCode;
+}
+
+function toString_12(){
+  var comma, entry, iter, s;
+  s = '{';
+  comma = false;
+  for (iter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator, $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet, dynamicCast(this, 25)).this$0); $hasNext_0(iter.iter);) {
+    entry = dynamicCast($next_0(iter.iter), 23);
+    comma?(s += ', '):(comma = true);
+    s += '' + entry.getKey();
+    s += '=';
+    s += '' + entry.getValue();
+  }
+  return s + '}';
+}
+
+function AbstractMap(){
+}
+
+_ = AbstractMap.prototype = new Object_0;
+_.equals$ = equals_3;
+_.getClass$ = getClass_38;
+_.hashCode$ = hashCode_5;
+_.toString$ = toString_12;
+_.typeId$ = 0;
+function $addAllHashEntries(this$static, dest){
+  var hashCodeMap = this$static.hashCodeMap;
+  for (var hashCode in hashCodeMap) {
+    if (hashCode == parseInt(hashCode)) {
+      var array = hashCodeMap[hashCode];
+      for (var i = 0, c = array.length; i < c; ++i) {
+        dest.add(array[i]);
+      }
+    }
+  }
+}
+
+function $addAllStringEntries(this$static, dest){
+  var stringMap = this$static.stringMap;
+  for (var key in stringMap) {
+    if (key.charCodeAt(0) == 58) {
+      var entry = new_$(this$static, key.substring(1));
+      dest.add(entry);
+    }
+  }
+}
+
+function $clearImpl(this$static){
+  this$static.hashCodeMap = [];
+  this$static.stringMap = {};
+  this$static.nullSlotLive = false;
+  this$static.nullSlot = null;
+  this$static.size = 0;
+}
+
+function $containsKey(this$static, key){
+  return key == null?this$static.nullSlotLive:key != null && canCast(key.typeId$, 1)?$hasStringValue(this$static, dynamicCast(key, 1)):$hasHashValue(this$static, key, ~~hashCode__devirtual$(key));
+}
+
+function $get_1(this$static, key){
+  return key == null?this$static.nullSlot:key != null && canCast(key.typeId$, 1)?this$static.stringMap[':' + dynamicCast(key, 1)]:$getHashValue(this$static, key, ~~hashCode__devirtual$(key));
+}
+
+function $getHashValue(this$static, key, hashCode){
+  var array = this$static.hashCodeMap[hashCode];
+  if (array) {
+    for (var i = 0, c = array.length; i < c; ++i) {
+      var entry = array[i];
+      var entryKey = entry.getKey();
+      if (this$static.equalsBridge(key, entryKey)) {
+        return entry.getValue();
+      }
+    }
+  }
+  return null;
+}
+
+function $hasHashValue(this$static, key, hashCode){
+  var array = this$static.hashCodeMap[hashCode];
+  if (array) {
+    for (var i = 0, c = array.length; i < c; ++i) {
+      var entry = array[i];
+      var entryKey = entry.getKey();
+      if (this$static.equalsBridge(key, entryKey)) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+function $hasStringValue(this$static, key){
+  return ':' + key in this$static.stringMap;
+}
+
+function $put(this$static, key, value){
+  return !key?$putNullSlot(this$static, value):$putHashValue(this$static, key, value, ~~key.index);
+}
+
+function $putHashValue(this$static, key, value, hashCode){
+  var array = this$static.hashCodeMap[hashCode];
+  if (array) {
+    for (var i = 0, c = array.length; i < c; ++i) {
+      var entry = array[i];
+      var entryKey = entry.getKey();
+      if (this$static.equalsBridge(key, entryKey)) {
+        var previous = entry.getValue();
+        entry.setValue(value);
+        return previous;
+      }
+    }
+  }
+   else {
+    array = this$static.hashCodeMap[hashCode] = [];
+  }
+  var entry = $MapEntryImpl(new MapEntryImpl, key, value);
+  array.push(entry);
+  ++this$static.size;
+  return null;
+}
+
+function $putNullSlot(this$static, value){
+  var result;
+  result = this$static.nullSlot;
+  this$static.nullSlot = value;
+  if (!this$static.nullSlotLive) {
+    this$static.nullSlotLive = true;
+    ++this$static.size;
+  }
+  return result;
+}
+
+function $putStringValue(this$static, key, value){
+  var result, stringMap = this$static.stringMap;
+  key = ':' + key;
+  key in stringMap?(result = stringMap[key]):++this$static.size;
+  stringMap[key] = value;
+  return result;
+}
+
+function equalsBridge(value1, value2){
+  return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
+}
+
+function getClass_39(){
+  return Ljava_util_AbstractHashMap_2_classLit;
+}
+
+function AbstractHashMap(){
+}
+
+_ = AbstractHashMap.prototype = new AbstractMap;
+_.equalsBridge = equalsBridge;
+_.getClass$ = getClass_39;
+_.typeId$ = 0;
+_.hashCodeMap = null;
+_.nullSlot = null;
+_.nullSlotLive = false;
+_.size = 0;
+_.stringMap = null;
+function equals_4(o){
+  var iter, other, otherItem;
+  if ((o == null?null:o) === this) {
+    return true;
+  }
+  if (!(o != null && canCast(o.typeId$, 27))) {
+    return false;
+  }
+  other = dynamicCast(o, 27);
+  if (other.this$0.size != this.size_0()) {
+    return false;
+  }
+  for (iter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator, other.this$0); $hasNext_0(iter.iter);) {
+    otherItem = dynamicCast($next_0(iter.iter), 23);
+    if (!this.contains(otherItem)) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function getClass_40(){
+  return Ljava_util_AbstractSet_2_classLit;
+}
+
+function hashCode_6(){
+  var hashCode, iter, next;
+  hashCode = 0;
+  for (iter = this.iterator(); iter.hasNext();) {
+    next = iter.next_0();
+    if (next != null) {
+      hashCode += hashCode__devirtual$(next);
+      hashCode = ~~hashCode;
+    }
+  }
+  return hashCode;
+}
+
+function AbstractSet(){
+}
+
+_ = AbstractSet.prototype = new AbstractCollection;
+_.equals$ = equals_4;
+_.getClass$ = getClass_40;
+_.hashCode$ = hashCode_6;
+_.typeId$ = 0;
+function $AbstractHashMap$EntrySet(this$static, this$0){
+  this$static.this$0 = this$0;
+  return this$static;
+}
+
+function contains_0(o){
+  var entry, key, value;
+  if (o != null && canCast(o.typeId$, 23)) {
+    entry = dynamicCast(o, 23);
+    key = entry.getKey();
+    if ($containsKey(this.this$0, key)) {
+      value = $get_1(this.this$0, key);
+      return $equals_2(entry.getValue(), value);
+    }
+  }
+  return false;
+}
+
+function getClass_41(){
+  return Ljava_util_AbstractHashMap$EntrySet_2_classLit;
+}
+
+function iterator(){
+  return $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator, this.this$0);
+}
+
+function size_0(){
+  return this.this$0.size;
+}
+
+function AbstractHashMap$EntrySet(){
+}
+
+_ = AbstractHashMap$EntrySet.prototype = new AbstractSet;
+_.contains = contains_0;
+_.getClass$ = getClass_41;
+_.iterator = iterator;
+_.size_0 = size_0;
+_.typeId$ = 23;
+_.this$0 = null;
+function $AbstractHashMap$EntrySetIterator(this$static, this$0){
+  var list;
+  this$static.this$0 = this$0;
+  list = $ArrayList(new ArrayList);
+  this$static.this$0.nullSlotLive && $add(list, $AbstractHashMap$MapEntryNull(new AbstractHashMap$MapEntryNull, this$static.this$0));
+  $addAllStringEntries(this$static.this$0, list);
+  $addAllHashEntries(this$static.this$0, list);
+  this$static.iter = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl, list);
+  return this$static;
+}
+
+function getClass_42(){
+  return Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit;
+}
+
+function hasNext(){
+  return $hasNext_0(this.iter);
+}
+
+function next_0(){
+  return dynamicCast($next_0(this.iter), 23);
+}
+
+function AbstractHashMap$EntrySetIterator(){
+}
+
+_ = AbstractHashMap$EntrySetIterator.prototype = new Object_0;
+_.getClass$ = getClass_42;
+_.hasNext = hasNext;
+_.next_0 = next_0;
+_.typeId$ = 0;
+_.iter = null;
+_.this$0 = null;
+function equals_5(other){
+  var entry;
+  if (other != null && canCast(other.typeId$, 23)) {
+    entry = dynamicCast(other, 23);
+    if (equalsWithNullCheck(this.getKey(), entry.getKey()) && equalsWithNullCheck(this.getValue(), entry.getValue())) {
+      return true;
+    }
+  }
+  return false;
+}
+
+function getClass_43(){
+  return Ljava_util_AbstractMapEntry_2_classLit;
+}
+
+function hashCode_7(){
+  var keyHash, valueHash;
+  keyHash = 0;
+  valueHash = 0;
+  this.getKey() != null && (keyHash = hashCode__devirtual$(this.getKey()));
+  this.getValue() != null && (valueHash = hashCode__devirtual$(this.getValue()));
+  return keyHash ^ valueHash;
+}
+
+function toString_13(){
+  return this.getKey() + '=' + this.getValue();
+}
+
+function AbstractMapEntry(){
+}
+
+_ = AbstractMapEntry.prototype = new Object_0;
+_.equals$ = equals_5;
+_.getClass$ = getClass_43;
+_.hashCode$ = hashCode_7;
+_.toString$ = toString_13;
+_.typeId$ = 24;
+function $AbstractHashMap$MapEntryNull(this$static, this$0){
+  this$static.this$0 = this$0;
+  return this$static;
+}
+
+function getClass_44(){
+  return Ljava_util_AbstractHashMap$MapEntryNull_2_classLit;
+}
+
+function getKey(){
+  return null;
+}
+
+function getValue(){
+  return this.this$0.nullSlot;
+}
+
+function setValue(object){
+  return $putNullSlot(this.this$0, object);
+}
+
+function AbstractHashMap$MapEntryNull(){
+}
+
+_ = AbstractHashMap$MapEntryNull.prototype = new AbstractMapEntry;
+_.getClass$ = getClass_44;
+_.getKey = getKey;
+_.getValue = getValue;
+_.setValue = setValue;
+_.typeId$ = 25;
+_.this$0 = null;
+function $AbstractHashMap$MapEntryString(this$static, key, this$0){
+  this$static.this$0 = this$0;
+  this$static.key = key;
+  return this$static;
+}
+
+function getClass_45(){
+  return Ljava_util_AbstractHashMap$MapEntryString_2_classLit;
+}
+
+function getKey_0(){
+  return this.key;
+}
+
+function getValue_0(){
+  return this.this$0.stringMap[':' + this.key];
+}
+
+function new_$(this$outer, key){
+  return $AbstractHashMap$MapEntryString(new AbstractHashMap$MapEntryString, key, this$outer);
+}
+
+function setValue_0(object){
+  return $putStringValue(this.this$0, this.key, object);
+}
+
+function AbstractHashMap$MapEntryString(){
+}
+
+_ = AbstractHashMap$MapEntryString.prototype = new AbstractMapEntry;
+_.getClass$ = getClass_45;
+_.getKey = getKey_0;
+_.getValue = getValue_0;
+_.setValue = setValue_0;
+_.typeId$ = 26;
+_.key = null;
+_.this$0 = null;
+function add_0(obj){
+  this.add_0(this.size_0(), obj);
+  return true;
+}
+
+function add_1(index, element){
+  throw $UnsupportedOperationException(new UnsupportedOperationException, 'Add not supported on this list');
+}
+
+function checkIndex(index, size){
+  (index < 0 || index >= size) && indexOutOfBounds(index, size);
+}
+
+function equals_6(o){
+  var elem, elemOther, iter, iterOther, other;
+  if ((o == null?null:o) === this) {
+    return true;
+  }
+  if (!(o != null && canCast(o.typeId$, 24))) {
+    return false;
+  }
+  other = dynamicCast(o, 24);
+  if (this.size_0() != other.size_0()) {
+    return false;
+  }
+  iter = this.iterator();
+  iterOther = other.iterator();
+  while (iter.hasNext()) {
+    elem = iter.next_0();
+    elemOther = iterOther.next_0();
+    if (!(elem == null?elemOther == null:equals__devirtual$(elem, elemOther))) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function getClass_46(){
+  return Ljava_util_AbstractList_2_classLit;
+}
+
+function hashCode_8(){
+  var iter, k, obj;
+  k = 1;
+  iter = this.iterator();
+  while (iter.hasNext()) {
+    obj = iter.next_0();
+    k = 31 * k + (obj == null?0:hashCode__devirtual$(obj));
+    k = ~~k;
+  }
+  return k;
+}
+
+function indexOutOfBounds(index, size){
+  throw $IndexOutOfBoundsException_0(new IndexOutOfBoundsException, 'Index: ' + index + ', Size: ' + size);
+}
+
+function iterator_0(){
+  return $AbstractList$IteratorImpl(new AbstractList$IteratorImpl, this);
+}
+
+function AbstractList(){
+}
+
+_ = AbstractList.prototype = new AbstractCollection;
+_.add = add_0;
+_.add_0 = add_1;
+_.equals$ = equals_6;
+_.getClass$ = getClass_46;
+_.hashCode$ = hashCode_8;
+_.iterator = iterator_0;
+_.typeId$ = 27;
+function $AbstractList$IteratorImpl(this$static, this$0){
+  this$static.this$0 = this$0;
+  return this$static;
+}
+
+function $hasNext_0(this$static){
+  return this$static.i < this$static.this$0.size_0();
+}
+
+function $next_0(this$static){
+  if (this$static.i >= this$static.this$0.size_0()) {
+    throw $NoSuchElementException(new NoSuchElementException);
+  }
+  return this$static.this$0.get(this$static.i++);
+}
+
+function getClass_47(){
+  return Ljava_util_AbstractList$IteratorImpl_2_classLit;
+}
+
+function hasNext_0(){
+  return this.i < this.this$0.size_0();
+}
+
+function next_1(){
+  return $next_0(this);
+}
+
+function AbstractList$IteratorImpl(){
+}
+
+_ = AbstractList$IteratorImpl.prototype = new Object_0;
+_.getClass$ = getClass_47;
+_.hasNext = hasNext_0;
+_.next_0 = next_1;
+_.typeId$ = 0;
+_.i = 0;
+_.this$0 = null;
+function add_2(index, element){
+  var iter;
+  iter = $listIterator(this, index);
+  $addBefore(iter.this$0, element, iter.currentNode);
+  ++iter.currentIndex;
+  iter.lastNode = null;
+}
+
+function get(index){
+  var $e0, iter;
+  iter = $listIterator(this, index);
+  try {
+    return $next_1(iter);
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 26)) {
+      throw $IndexOutOfBoundsException_0(new IndexOutOfBoundsException, "Can't get element " + index);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function getClass_48(){
+  return Ljava_util_AbstractSequentialList_2_classLit;
+}
+
+function iterator_1(){
+  return $listIterator(this, 0);
+}
+
+function AbstractSequentialList(){
+}
+
+_ = AbstractSequentialList.prototype = new AbstractList;
+_.add_0 = add_2;
+_.get = get;
+_.getClass$ = getClass_48;
+_.iterator = iterator_1;
+_.typeId$ = 28;
+function $ArrayList(this$static){
+  this$static.array = initDim(_3Ljava_lang_Object_2_classLit, 53, 0, 0, 0);
+  return this$static;
+}
+
+function $add(this$static, o){
+  setCheck(this$static.array, this$static.size++, o);
+  return true;
+}
+
+function $get_2(this$static, index){
+  checkIndex(index, this$static.size);
+  return this$static.array[index];
+}
+
+function $indexOf_0(this$static, o, index){
+  for (; index < this$static.size; ++index) {
+    if (equalsWithNullCheck(o, this$static.array[index])) {
+      return index;
+    }
+  }
+  return -1;
+}
+
+function $remove_0(this$static, o){
+  var i, previous;
+  i = $indexOf_0(this$static, o, 0);
+  if (i == -1) {
+    return false;
+  }
+  previous = (checkIndex(i, this$static.size) , this$static.array[i]);
+  this$static.array.splice(i, 1);
+  --this$static.size;
+  return true;
+}
+
+function add_3(o){
+  return setCheck(this.array, this.size++, o) , true;
+}
+
+function add_4(index, o){
+  (index < 0 || index > this.size) && indexOutOfBounds(index, this.size);
+  this.array.splice(index, 0, o);
+  ++this.size;
+}
+
+function contains_1(o){
+  return $indexOf_0(this, o, 0) != -1;
+}
+
+function get_0(index){
+  return checkIndex(index, this.size) , this.array[index];
+}
+
+function getClass_49(){
+  return Ljava_util_ArrayList_2_classLit;
+}
+
+function size_1(){
+  return this.size;
+}
+
+function ArrayList(){
+}
+
+_ = ArrayList.prototype = new AbstractList;
+_.add = add_3;
+_.add_0 = add_4;
+_.contains = contains_1;
+_.get = get_0;
+_.getClass$ = getClass_49;
+_.size_0 = size_1;
+_.typeId$ = 29;
+_.size = 0;
+function binarySearch(sortedArray, key){
+  var high, low, mid, midVal;
+  low = 0;
+  high = sortedArray.length - 1;
+  while (low <= high) {
+    mid = low + (high - low >> 1);
+    midVal = sortedArray[mid];
+    if (midVal < key) {
+      low = mid + 1;
+    }
+     else if (midVal > key) {
+      high = mid - 1;
+    }
+     else {
+      return mid;
+    }
+  }
+  return -low - 1;
+}
+
+function binarySearch_0(sortedArray, key, comparator){
+  var compareResult, high, low, mid, midVal;
+  !comparator && (comparator = ($clinit_95() , $clinit_95() , NATURAL));
+  low = 0;
+  high = sortedArray.length - 1;
+  while (low <= high) {
+    mid = low + (high - low >> 1);
+    midVal = sortedArray[mid];
+    compareResult = compareTo(midVal, key);
+    if (compareResult < 0) {
+      low = mid + 1;
+    }
+     else if (compareResult > 0) {
+      high = mid - 1;
+    }
+     else {
+      return mid;
+    }
+  }
+  return -low - 1;
+}
+
+function $clinit_95(){
+  $clinit_95 = nullMethod;
+  NATURAL = new Comparators$1;
+}
+
+var NATURAL;
+function getClass_50(){
+  return Ljava_util_Comparators$1_2_classLit;
+}
+
+function Comparators$1(){
+}
+
+_ = Comparators$1.prototype = new Object_0;
+_.getClass$ = getClass_50;
+_.typeId$ = 0;
+function $HashMap(this$static){
+  $clearImpl(this$static);
+  return this$static;
+}
+
+function $equals_2(value1, value2){
+  return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
+}
+
+function getClass_51(){
+  return Ljava_util_HashMap_2_classLit;
+}
+
+function HashMap(){
+}
+
+_ = HashMap.prototype = new AbstractHashMap;
+_.getClass$ = getClass_51;
+_.typeId$ = 30;
+function $LinkedList(this$static){
+  this$static.header = $LinkedList$Node(new LinkedList$Node);
+  this$static.size = 0;
+  return this$static;
+}
+
+function $addBefore(this$static, o, target){
+  $LinkedList$Node_0(new LinkedList$Node, o, target);
+  ++this$static.size;
+}
+
+function $addLast(this$static, o){
+  $LinkedList$Node_0(new LinkedList$Node, o, this$static.header);
+  ++this$static.size;
+}
+
+function $clear(this$static){
+  this$static.header = $LinkedList$Node(new LinkedList$Node);
+  this$static.size = 0;
+}
+
+function $getLast(this$static){
+  $throwEmptyException(this$static);
+  return this$static.header.prev.value;
+}
+
+function $listIterator(this$static, index){
+  var i, node;
+  (index < 0 || index > this$static.size) && indexOutOfBounds(index, this$static.size);
+  if (index >= this$static.size >> 1) {
+    node = this$static.header;
+    for (i = this$static.size; i > index; --i) {
+      node = node.prev;
+    }
+  }
+   else {
+    node = this$static.header.next;
+    for (i = 0; i < index; ++i) {
+      node = node.next;
+    }
+  }
+  return $LinkedList$ListIteratorImpl(new LinkedList$ListIteratorImpl, index, node, this$static);
+}
+
+function $removeLast(this$static){
+  var node;
+  $throwEmptyException(this$static);
+  --this$static.size;
+  node = this$static.header.prev;
+  node.next.prev = node.prev;
+  node.prev.next = node.next;
+  node.next = node.prev = node;
+  return node.value;
+}
+
+function $throwEmptyException(this$static){
+  if (this$static.size == 0) {
+    throw $NoSuchElementException(new NoSuchElementException);
+  }
+}
+
+function add_5(o){
+  $LinkedList$Node_0(new LinkedList$Node, o, this.header);
+  ++this.size;
+  return true;
+}
+
+function getClass_52(){
+  return Ljava_util_LinkedList_2_classLit;
+}
+
+function size_2(){
+  return this.size;
+}
+
+function LinkedList(){
+}
+
+_ = LinkedList.prototype = new AbstractSequentialList;
+_.add = add_5;
+_.getClass$ = getClass_52;
+_.size_0 = size_2;
+_.typeId$ = 31;
+_.header = null;
+_.size = 0;
+function $LinkedList$ListIteratorImpl(this$static, index, startNode, this$0){
+  this$static.this$0 = this$0;
+  this$static.currentNode = startNode;
+  this$static.currentIndex = index;
+  return this$static;
+}
+
+function $next_1(this$static){
+  if (this$static.currentNode == this$static.this$0.header) {
+    throw $NoSuchElementException(new NoSuchElementException);
+  }
+  this$static.lastNode = this$static.currentNode;
+  this$static.currentNode = this$static.currentNode.next;
+  ++this$static.currentIndex;
+  return this$static.lastNode.value;
+}
+
+function getClass_53(){
+  return Ljava_util_LinkedList$ListIteratorImpl_2_classLit;
+}
+
+function hasNext_1(){
+  return this.currentNode != this.this$0.header;
+}
+
+function next_2(){
+  return $next_1(this);
+}
+
+function LinkedList$ListIteratorImpl(){
+}
+
+_ = LinkedList$ListIteratorImpl.prototype = new Object_0;
+_.getClass$ = getClass_53;
+_.hasNext = hasNext_1;
+_.next_0 = next_2;
+_.typeId$ = 0;
+_.currentIndex = 0;
+_.currentNode = null;
+_.lastNode = null;
+_.this$0 = null;
+function $LinkedList$Node(this$static){
+  this$static.next = this$static.prev = this$static;
+  return this$static;
+}
+
+function $LinkedList$Node_0(this$static, value, nextNode){
+  this$static.value = value;
+  this$static.next = nextNode;
+  this$static.prev = nextNode.prev;
+  nextNode.prev.next = this$static;
+  nextNode.prev = this$static;
+  return this$static;
+}
+
+function getClass_54(){
+  return Ljava_util_LinkedList$Node_2_classLit;
+}
+
+function LinkedList$Node(){
+}
+
+_ = LinkedList$Node.prototype = new Object_0;
+_.getClass$ = getClass_54;
+_.typeId$ = 0;
+_.next = null;
+_.prev = null;
+_.value = null;
+function $MapEntryImpl(this$static, key, value){
+  this$static.key = key;
+  this$static.value = value;
+  return this$static;
+}
+
+function getClass_55(){
+  return Ljava_util_MapEntryImpl_2_classLit;
+}
+
+function getKey_1(){
+  return this.key;
+}
+
+function getValue_1(){
+  return this.value;
+}
+
+function setValue_1(value){
+  var old;
+  old = this.value;
+  this.value = value;
+  return old;
+}
+
+function MapEntryImpl(){
+}
+
+_ = MapEntryImpl.prototype = new AbstractMapEntry;
+_.getClass$ = getClass_55;
+_.getKey = getKey_1;
+_.getValue = getValue_1;
+_.setValue = setValue_1;
+_.typeId$ = 32;
+_.key = null;
+_.value = null;
+function $NoSuchElementException(this$static){
+  $fillInStackTrace();
+  return this$static;
+}
+
+function getClass_56(){
+  return Ljava_util_NoSuchElementException_2_classLit;
+}
+
+function NoSuchElementException(){
+}
+
+_ = NoSuchElementException.prototype = new RuntimeException;
+_.getClass$ = getClass_56;
+_.typeId$ = 33;
+function equalsWithNullCheck(a, b){
+  return (a == null?null:a) === (b == null?null:b) || a != null && equals__devirtual$(a, b);
+}
+
+function $clinit_112(){
+  $clinit_112 = nullMethod;
+  HTML = $DoctypeExpectation(new DoctypeExpectation, 'HTML', 0);
+  HTML401_TRANSITIONAL = $DoctypeExpectation(new DoctypeExpectation, 'HTML401_TRANSITIONAL', 1);
+  HTML401_STRICT = $DoctypeExpectation(new DoctypeExpectation, 'HTML401_STRICT', 2);
+  AUTO = $DoctypeExpectation(new DoctypeExpectation, 'AUTO', 3);
+  NO_DOCTYPE_ERRORS = $DoctypeExpectation(new DoctypeExpectation, 'NO_DOCTYPE_ERRORS', 4);
+}
+
+function $DoctypeExpectation(this$static, enum$name, enum$ordinal){
+  $clinit_112();
+  this$static.name_0 = enum$name;
+  this$static.ordinal = enum$ordinal;
+  return this$static;
+}
+
+function getClass_57(){
+  return Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit;
+}
+
+function values_0(){
+  $clinit_112();
+  return initValues(_3Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit, 56, 10, [HTML, HTML401_TRANSITIONAL, HTML401_STRICT, AUTO, NO_DOCTYPE_ERRORS]);
+}
+
+function DoctypeExpectation(){
+}
+
+_ = DoctypeExpectation.prototype = new Enum;
+_.getClass$ = getClass_57;
+_.typeId$ = 34;
+var AUTO, HTML, HTML401_STRICT, HTML401_TRANSITIONAL, NO_DOCTYPE_ERRORS;
+function $clinit_113(){
+  $clinit_113 = nullMethod;
+  STANDARDS_MODE = $DocumentMode(new DocumentMode, 'STANDARDS_MODE', 0);
+  ALMOST_STANDARDS_MODE = $DocumentMode(new DocumentMode, 'ALMOST_STANDARDS_MODE', 1);
+  QUIRKS_MODE = $DocumentMode(new DocumentMode, 'QUIRKS_MODE', 2);
+}
+
+function $DocumentMode(this$static, enum$name, enum$ordinal){
+  $clinit_113();
+  this$static.name_0 = enum$name;
+  this$static.ordinal = enum$ordinal;
+  return this$static;
+}
+
+function getClass_58(){
+  return Lnu_validator_htmlparser_common_DocumentMode_2_classLit;
+}
+
+function values_1(){
+  $clinit_113();
+  return initValues(_3Lnu_validator_htmlparser_common_DocumentMode_2_classLit, 57, 11, [STANDARDS_MODE, ALMOST_STANDARDS_MODE, QUIRKS_MODE]);
+}
+
+function DocumentMode(){
+}
+
+_ = DocumentMode.prototype = new Enum;
+_.getClass$ = getClass_58;
+_.typeId$ = 35;
+var ALMOST_STANDARDS_MODE, QUIRKS_MODE, STANDARDS_MODE;
+function $clinit_115(){
+  $clinit_115 = nullMethod;
+  ALLOW = $XmlViolationPolicy(new XmlViolationPolicy, 'ALLOW', 0);
+  FATAL = $XmlViolationPolicy(new XmlViolationPolicy, 'FATAL', 1);
+  ALTER_INFOSET = $XmlViolationPolicy(new XmlViolationPolicy, 'ALTER_INFOSET', 2);
+}
+
+function $XmlViolationPolicy(this$static, enum$name, enum$ordinal){
+  $clinit_115();
+  this$static.name_0 = enum$name;
+  this$static.ordinal = enum$ordinal;
+  return this$static;
+}
+
+function getClass_59(){
+  return Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit;
+}
+
+function values_2(){
+  $clinit_115();
+  return initValues(_3Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit, 58, 12, [ALLOW, FATAL, ALTER_INFOSET]);
+}
+
+function XmlViolationPolicy(){
+}
+
+_ = XmlViolationPolicy.prototype = new Enum;
+_.getClass$ = getClass_59;
+_.typeId$ = 36;
+var ALLOW, ALTER_INFOSET, FATAL;
+function $clinit_116(){
+  $clinit_116 = nullMethod;
+  REPLACEMENT_CHARACTER = initValues(_3C_classLit, 46, -1, [65533]);
+  HTML4_PUBLIC_IDS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['-//W3C//DTD HTML 4.0 Frameset//EN', '-//W3C//DTD HTML 4.0 Transitional//EN', '-//W3C//DTD HTML 4.0//EN', '-//W3C//DTD HTML 4.01 Frameset//EN', '-//W3C//DTD HTML 4.01 Transitional//EN', '-//W3C//DTD HTML 4.01//EN']);
+  QUIRKY_PUBLIC_IDS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['+//silmaril//dtd html pro v0r11 19970101//', '-//advasoft ltd//dtd html 3.0 aswedit + extensions//', '-//as//dtd html 3.0 aswedit + extensions//', '-//ietf//dtd html 2.0 level 1//', '-//ietf//dtd html 2.0 level 2//', '-//ietf//dtd html 2.0 strict level 1//', '-//ietf//dtd html 2.0 strict level 2//', '-//ietf//dtd html 2.0 strict//', '-//ietf//dtd html 2.0//', '-//ietf//dtd html 2.1e//', '-//ietf//dtd html 3.0//', '-//ietf//dtd html 3.2 final//', '-//ietf//dtd html 3.2//', '-//ietf//dtd html 3//', '-//ietf//dtd html level 0//', '-//ietf//dtd html level 1//', '-//ietf//dtd html level 2//', '-//ietf//dtd html level 3//', '-//ietf//dtd html strict level 0//', '-//ietf//dtd html strict level 1//', '-//ietf//dtd html strict level 2//', '-//ietf//dtd html strict level 3//', '-//ietf//dtd html strict//', '-//ietf//dtd html//', '-//metrius//dtd metrius presentational//', '-//microsoft//dtd internet explorer 2.0 html strict//', '-//microsoft//dtd internet explorer 2.0 html//', '-//microsoft//dtd internet explorer 2.0 tables//', '-//microsoft//dtd internet explorer 3.0 html strict//', '-//microsoft//dtd internet explorer 3.0 html//', '-//microsoft//dtd internet explorer 3.0 tables//', '-//netscape comm. corp.//dtd html//', '-//netscape comm. corp.//dtd strict html//', "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//', '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//', '-//spyglass//dtd html 2.0 extended//', '-//sq//dtd html 2.0 hotmetal + extensions//', '-//sun microsystems corp.//dtd hotjava html//', '-//sun microsystems corp.//dtd hotjava strict html//', '-//w3c//dtd html 3 1995-03-24//', '-//w3c//dtd html 3.2 draft//', '-//w3c//dtd html 3.2 final//', '-//w3c//dtd html 3.2//', '-//w3c//dtd html 3.2s draft//', '-//w3c//dtd html 4.0 frameset//', '-//w3c//dtd html 4.0 transitional//', '-//w3c//dtd html experimental 19960712//', '-//w3c//dtd html experimental 970421//', '-//w3c//dtd w3 html//', '-//w3o//dtd w3 html 3.0//', '-//webtechs//dtd mozilla html 2.0//', '-//webtechs//dtd mozilla html//']);
+}
+
+function $accumulateCharactersForced(this$static, buf, start, length_0){
+  var newBuf, newLen;
+  newLen = this$static.charBufferLen + length_0;
+  if (newLen > this$static.charBuffer.length) {
+    newBuf = initDim(_3C_classLit, 46, -1, newLen, 1);
+    arraycopy(this$static.charBuffer, 0, newBuf, 0, this$static.charBufferLen);
+    this$static.charBuffer = newBuf;
+  }
+  arraycopy(buf, start, this$static.charBuffer, this$static.charBufferLen, length_0);
+  this$static.charBufferLen = newLen;
+}
+
+function $addAttributesToBody(this$static, attributes){
+  var body;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  if (this$static.currentPtr >= 1) {
+    body = this$static.stack_0[1];
+    if ((body.flags & 127) == 3) {
+      $addAttributesToElement(this$static, body.node, attributes);
+      return true;
+    }
+  }
+  return false;
+}
+
+function $adoptionAgencyEndTag(this$static, name_0){
+  var bookmark, clone, commonAncestor, formattingClone, formattingElt, formattingEltListPos, formattingEltStackPos, furthestBlock, furthestBlockPos, i, inScope, j, lastNode, listNode, newNode, node, nodeListPos, nodePos;
+  for (i = 0; i < 8; ++i) {
+    formattingEltListPos = this$static.listPtr;
+    while (formattingEltListPos > -1) {
+      listNode = this$static.listOfActiveFormattingElements[formattingEltListPos];
+      if (!listNode) {
+        formattingEltListPos = -1;
+        break;
+      }
+       else if (listNode.name_0 == name_0) {
+        break;
+      }
+      --formattingEltListPos;
+    }
+    if (formattingEltListPos == -1) {
+      return false;
+    }
+    formattingElt = this$static.listOfActiveFormattingElements[formattingEltListPos];
+    formattingEltStackPos = this$static.currentPtr;
+    inScope = true;
+    while (formattingEltStackPos > -1) {
+      node = this$static.stack_0[formattingEltStackPos];
+      if (node == formattingElt) {
+        break;
+      }
+       else
+        (node.flags & 134217728) != 0 && (inScope = false);
+      --formattingEltStackPos;
+    }
+    if (formattingEltStackPos == -1) {
+      $removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
+      return true;
+    }
+    if (!inScope) {
+      return true;
+    }
+    furthestBlockPos = formattingEltStackPos + 1;
+    while (furthestBlockPos <= this$static.currentPtr) {
+      node = this$static.stack_0[furthestBlockPos];
+      if ((node.flags & 536870912) != 0) {
+        break;
+      }
+      ++furthestBlockPos;
+    }
+    if (furthestBlockPos > this$static.currentPtr) {
+      while (this$static.currentPtr >= formattingEltStackPos) {
+        $pop(this$static);
+      }
+      $removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
+      return true;
+    }
+    commonAncestor = this$static.stack_0[formattingEltStackPos - 1];
+    furthestBlock = this$static.stack_0[furthestBlockPos];
+    bookmark = formattingEltListPos;
+    nodePos = furthestBlockPos;
+    lastNode = furthestBlock;
+    for (j = 0; j < 3; ++j) {
+      --nodePos;
+      node = this$static.stack_0[nodePos];
+      nodeListPos = $findInListOfActiveFormattingElements(this$static, node);
+      if (nodeListPos == -1) {
+        $removeFromStack(this$static, nodePos);
+        --furthestBlockPos;
+        continue;
+      }
+      if (nodePos == formattingEltStackPos) {
+        break;
+      }
+      nodePos == furthestBlockPos && (bookmark = nodeListPos + 1);
+      clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', node.name_0, $cloneAttributes(node.attributes));
+      newNode = $StackNode(new StackNode, node.flags, node.ns, node.name_0, clone, node.popName, node.attributes);
+      node.attributes = null;
+      this$static.stack_0[nodePos] = newNode;
+      ++newNode.refcount;
+      this$static.listOfActiveFormattingElements[nodeListPos] = newNode;
+      --node.refcount;
+      --node.refcount;
+      node = newNode;
+      $detachFromParent(this$static, lastNode.node);
+      $appendElement(this$static, lastNode.node, node.node);
+      lastNode = node;
+    }
+    if ((commonAncestor.flags & 268435456) != 0) {
+      $detachFromParent(this$static, lastNode.node);
+      $insertIntoFosterParent(this$static, lastNode.node);
+    }
+     else {
+      $detachFromParent(this$static, lastNode.node);
+      $appendElement(this$static, lastNode.node, commonAncestor.node);
+    }
+    clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', formattingElt.name_0, $cloneAttributes(formattingElt.attributes));
+    formattingClone = $StackNode(new StackNode, formattingElt.flags, formattingElt.ns, formattingElt.name_0, clone, formattingElt.popName, formattingElt.attributes);
+    formattingElt.attributes = null;
+    $appendChildrenToNewParent(this$static, furthestBlock.node, clone);
+    $appendElement(this$static, clone, furthestBlock.node);
+    $removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
+    ++formattingClone.refcount;
+    bookmark <= this$static.listPtr && arraycopy(this$static.listOfActiveFormattingElements, bookmark, this$static.listOfActiveFormattingElements, bookmark + 1, this$static.listPtr - bookmark + 1);
+    ++this$static.listPtr;
+    this$static.listOfActiveFormattingElements[bookmark] = formattingClone;
+    $removeFromStack(this$static, formattingEltStackPos);
+    $insertIntoStack(this$static, formattingClone, furthestBlockPos);
+  }
+  return true;
+}
+
+function $annotationXmlEncodingPermitsHtml(attributes){
+  var encoding;
+  encoding = $getValue_1(attributes, ($clinit_124() , ENCODING));
+  if (encoding == null) {
+    return false;
+  }
+  return lowerCaseLiteralEqualsIgnoreAsciiCaseString('application/xhtml+xml', encoding) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('text/html', encoding);
+}
+
+function $append_3(this$static, node){
+  var newList;
+  ++this$static.listPtr;
+  if (this$static.listPtr == this$static.listOfActiveFormattingElements.length) {
+    newList = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 61, 15, this$static.listOfActiveFormattingElements.length + 64, 0);
+    arraycopy(this$static.listOfActiveFormattingElements, 0, newList, 0, this$static.listOfActiveFormattingElements.length);
+    this$static.listOfActiveFormattingElements = newList;
+  }
+  this$static.listOfActiveFormattingElements[this$static.listPtr] = node;
+}
+
+function $appendHtmlElementToDocumentAndPush(this$static, attributes){
+  var elt, node;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createHtmlElementSetAsRoot(this$static, attributes);
+  node = $StackNode_0(new StackNode, ($clinit_125() , HTML_0), elt);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushElement(this$static, elementName, attributes){
+  var elt, node;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', elementName.name_0, attributes);
+  $appendElement(this$static, elt, this$static.stack_0[this$static.currentPtr].node);
+  node = $StackNode_0(new StackNode, elementName, elt);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes){
+  var current, elt, node, popName;
+  popName = elementName.name_0;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  (elementName.flags & 1073741824) != 0 && (popName = $checkPopName(this$static, popName));
+  elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', popName, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  node = $StackNode_2(new StackNode, elementName, elt, popName);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes){
+  var current, elt, node;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createElement_0(this$static, 'http://www.w3.org/1999/xhtml', elementName.name_0, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  node = $StackNode_0(new StackNode, elementName, elt);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushElementMayFosterMathML(this$static, elementName, attributes){
+  var current, elt, markAsHtmlIntegrationPoint, node, popName;
+  popName = elementName.name_0;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  (elementName.flags & 1073741824) != 0 && (popName = $checkPopName(this$static, popName));
+  elt = $createElement(this$static, 'http://www.w3.org/1998/Math/MathML', popName, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  markAsHtmlIntegrationPoint = false;
+  ($clinit_125() , ANNOTATION_XML) == elementName && $annotationXmlEncodingPermitsHtml(attributes) && (markAsHtmlIntegrationPoint = true);
+  node = $StackNode_4(new StackNode, elementName, elt, popName, markAsHtmlIntegrationPoint);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushElementMayFosterSVG(this$static, elementName, attributes){
+  var current, elt, node, popName;
+  popName = elementName.camelCaseName;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  (elementName.flags & 1073741824) != 0 && (popName = $checkPopName(this$static, popName));
+  elt = $createElement(this$static, 'http://www.w3.org/2000/svg', popName, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  node = $StackNode_3(new StackNode, elementName, popName, elt);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushFormElementMayFoster(this$static, attributes){
+  var current, elt, node;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'form', attributes);
+  this$static.formPointer = elt;
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  node = $StackNode_0(new StackNode, ($clinit_125() , FORM_0), elt);
+  $push_0(this$static, node);
+}
+
+function $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, elementName, attributes){
+  var current, elt, node;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', elementName.name_0, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  node = $StackNode_1(new StackNode, elementName, elt, $cloneAttributes(attributes));
+  $push_0(this$static, node);
+  $append_3(this$static, node);
+  ++node.refcount;
+}
+
+function $appendToCurrentNodeAndPushHeadElement(this$static, attributes){
+  var elt, node;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'head', attributes);
+  $appendElement(this$static, elt, this$static.stack_0[this$static.currentPtr].node);
+  this$static.headPointer = elt;
+  node = $StackNode_0(new StackNode, ($clinit_125() , HEAD), elt);
+  $push_0(this$static, node);
+}
+
+function $appendVoidElementToCurrentMayFoster(this$static, name_0, attributes){
+  var current, elt;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  elt = $createElement_0(this$static, 'http://www.w3.org/1999/xhtml', name_0, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  $elementPopped(this$static, 'http://www.w3.org/1999/xhtml', name_0, elt);
+}
+
+function $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes){
+  var current, elt, popName;
+  popName = elementName.name_0;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  (elementName.flags & 1073741824) != 0 && (popName = $checkPopName(this$static, popName));
+  elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', popName, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  $elementPopped(this$static, 'http://www.w3.org/1999/xhtml', popName, elt);
+}
+
+function $appendVoidElementToCurrentMayFosterMathML(this$static, elementName, attributes){
+  var current, elt, popName;
+  popName = elementName.name_0;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  (elementName.flags & 1073741824) != 0 && (popName = $checkPopName(this$static, popName));
+  elt = $createElement(this$static, 'http://www.w3.org/1998/Math/MathML', popName, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  $elementPopped(this$static, 'http://www.w3.org/1998/Math/MathML', popName, elt);
+}
+
+function $appendVoidElementToCurrentMayFosterSVG(this$static, elementName, attributes){
+  var current, elt, popName;
+  popName = elementName.camelCaseName;
+  $processNonNcNames(attributes, this$static, this$static.namePolicy);
+  (elementName.flags & 1073741824) != 0 && (popName = $checkPopName(this$static, popName));
+  elt = $createElement(this$static, 'http://www.w3.org/2000/svg', popName, attributes);
+  current = this$static.stack_0[this$static.currentPtr];
+  (current.flags & 268435456) != 0?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+  $elementPopped(this$static, 'http://www.w3.org/2000/svg', popName, elt);
+}
+
+function $cdataSectionAllowed(this$static){
+  return this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml';
+}
+
+function $charBufferContainsNonWhitespace(this$static){
+  var i;
+  for (i = 0; i < this$static.charBufferLen; ++i) {
+    switch (this$static.charBuffer[i]) {
+      case 32:
+      case 9:
+      case 10:
+      case 13:
+      case 12:
+        continue;
+      default:return true;
+    }
+  }
+  return false;
+}
+
+function $characters(this$static, buf, start, length_0){
+  var end, i;
+  if (this$static.needToDropLF) {
+    if (buf[start] == 10) {
+      ++start;
+      --length_0;
+      if (length_0 == 0) {
+        return;
+      }
+    }
+    this$static.needToDropLF = false;
+  }
+  switch (this$static.mode) {
+    case 6:
+    case 12:
+    case 8:
+      !(this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') && $reconstructTheActiveFormattingElements(this$static);
+    case 20:
+      $accumulateCharacters(this$static, buf, start, length_0);
+      return;
+    case 7:
+    case 10:
+    case 11:
+      $accumulateCharactersForced(this$static, buf, start, length_0);
+      return;
+    default:end = start + length_0;
+      charactersloop: for (i = start; i < end; ++i) {
+        switch (buf[i]) {
+          case 32:
+          case 9:
+          case 10:
+          case 13:
+          case 12:
+            switch (this$static.mode) {
+              case 0:
+              case 1:
+              case 2:
+                start = i + 1;
+                continue;
+              case 3:
+              case 4:
+              case 5:
+              case 9:
+              case 16:
+              case 17:
+                continue;
+              case 21:
+              case 6:
+              case 12:
+              case 8:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                if (!(this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml')) {
+                  $flushCharacters(this$static);
+                  $reconstructTheActiveFormattingElements(this$static);
+                }
+
+                break charactersloop;
+              case 13:
+              case 14:
+                break charactersloop;
+              case 7:
+              case 10:
+              case 11:
+                $accumulateCharactersForced(this$static, buf, i, 1);
+                start = i + 1;
+                continue;
+              case 15:
+              case 18:
+              case 19:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                $flushCharacters(this$static);
+                $reconstructTheActiveFormattingElements(this$static);
+                continue;
+            }
+
+          default:switch (this$static.mode) {
+              case 0:
+                $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+                this$static.mode = 1;
+                --i;
+                continue;
+              case 1:
+                $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
+                this$static.mode = 2;
+                --i;
+                continue;
+              case 2:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                $flushCharacters(this$static);
+                $appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_128() , EMPTY_ATTRIBUTES));
+                this$static.mode = 3;
+                --i;
+                continue;
+              case 3:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                $flushCharacters(this$static);
+                $pop(this$static);
+                this$static.mode = 5;
+                --i;
+                continue;
+              case 4:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                $flushCharacters(this$static);
+                $pop(this$static);
+                this$static.mode = 3;
+                --i;
+                continue;
+              case 5:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                $flushCharacters(this$static);
+                $appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , BODY), $emptyAttributes(this$static.tokenizer));
+                this$static.mode = 21;
+                --i;
+                continue;
+              case 21:
+                this$static.framesetOk = false;
+                this$static.mode = 6;
+                --i;
+                continue;
+              case 6:
+              case 12:
+              case 8:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                if (!(this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml')) {
+                  $flushCharacters(this$static);
+                  $reconstructTheActiveFormattingElements(this$static);
+                }
+
+                break charactersloop;
+              case 7:
+              case 10:
+              case 11:
+                $accumulateCharactersForced(this$static, buf, i, 1);
+                start = i + 1;
+                continue;
+              case 9:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                if (this$static.currentPtr == 0) {
+                  start = i + 1;
+                  continue;
+                }
+
+                $flushCharacters(this$static);
+                $pop(this$static);
+                this$static.mode = 7;
+                --i;
+                continue;
+              case 13:
+              case 14:
+                break charactersloop;
+              case 15:
+                this$static.mode = this$static.framesetOk?21:6;
+                --i;
+                continue;
+              case 16:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                start = i + 1;
+                continue;
+              case 17:
+                if (start < i) {
+                  $accumulateCharacters(this$static, buf, start, i - start);
+                  start = i;
+                }
+
+                start = i + 1;
+                continue;
+              case 18:
+                this$static.mode = this$static.framesetOk?21:6;
+                --i;
+                continue;
+              case 19:
+                this$static.mode = 16;
+                --i;
+                continue;
+            }
+
+        }
+      }
+
+      start < end && $accumulateCharacters(this$static, buf, start, end - start);
+  }
+}
+
+function $checkMetaCharset(attributes){
+  var charset, content;
+  charset = $getValue_1(attributes, ($clinit_124() , CHARSET));
+  if (charset != null) {
+    return;
+  }
+  if (!lowerCaseLiteralEqualsIgnoreAsciiCaseString('content-type', $getValue_1(attributes, HTTP_EQUIV))) {
+    return;
+  }
+  content = $getValue_1(attributes, CONTENT);
+  content != null && extractCharsetFromContent(content);
+}
+
+function $checkPopName(this$static, name_0){
+  if (isNCName(name_0)) {
+    return name_0;
+  }
+   else {
+    switch (this$static.namePolicy.ordinal) {
+      case 0:
+        return name_0;
+      case 2:
+        return escapeName(name_0);
+      case 1:
+        $fatal_0(this$static, 'Element name \u201C' + name_0 + '\u201D cannot be represented as XML 1.0.');
+    }
+  }
+  return null;
+}
+
+function $clearStackBackTo(this$static, eltPos){
+  while (this$static.currentPtr > eltPos) {
+    $pop(this$static);
+  }
+}
+
+function $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static){
+  while (this$static.listPtr > -1) {
+    if (!this$static.listOfActiveFormattingElements[this$static.listPtr]) {
+      --this$static.listPtr;
+      return;
+    }
+    --this$static.listOfActiveFormattingElements[this$static.listPtr].refcount;
+    --this$static.listPtr;
+  }
+}
+
+function $closeTheCell(this$static, eltPos){
+  $generateImpliedEndTags(this$static);
+  while (this$static.currentPtr >= eltPos) {
+    $pop(this$static);
+  }
+  $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
+  this$static.mode = 11;
+  return;
+}
+
+function $comment(this$static, buf, start, length_0){
+  var end, end_0, end_1;
+  this$static.needToDropLF = false;
+  if (!this$static.wantingComments) {
+    return;
+  }
+  if (!(this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml')) {
+    switch (this$static.mode) {
+      case 0:
+      case 1:
+      case 18:
+      case 19:
+        $appendCommentToDocument(this$static, (end = start + length_0 , __checkBounds(buf.length, start, end) , __valueOf(buf, start, end)));
+        return;
+      case 15:
+        $flushCharacters(this$static);
+        $appendComment(this$static, this$static.stack_0[0].node, (end_0 = start + length_0 , __checkBounds(buf.length, start, end_0) , __valueOf(buf, start, end_0)));
+        return;
+    }
+  }
+  $flushCharacters(this$static);
+  $appendComment(this$static, this$static.stack_0[this$static.currentPtr].node, (end_1 = start + length_0 , __checkBounds(buf.length, start, end_1) , __valueOf(buf, start, end_1)));
+  return;
+}
+
+function $doctype(this$static, name_0, publicIdentifier, systemIdentifier, forceQuirks){
+  this$static.needToDropLF = false;
+  if (!(this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml')) {
+    switch (this$static.mode) {
+      case 0:
+        switch (this$static.doctypeExpectation.ordinal) {
+          case 0:
+            if ($isQuirky(name_0, publicIdentifier, systemIdentifier, forceQuirks)) {
+              $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+            }
+             else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
+              $documentModeInternal(this$static, ($clinit_113() , ALMOST_STANDARDS_MODE));
+            }
+             else {
+              $equals_1('-//W3C//DTD HTML 4.0//EN', publicIdentifier) && (systemIdentifier == null || $equals_1('http://www.w3.org/TR/REC-html40/strict.dtd', systemIdentifier)) || $equals_1('-//W3C//DTD HTML 4.01//EN', publicIdentifier) && (systemIdentifier == null || $equals_1('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier)) || $equals_1('-//W3C//DTD XHTML 1.0 Strict//EN', publicIdentifier) && $equals_1('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', systemIdentifier) || $equals_1('-//W3C//DTD XHTML 1.1//EN', publicIdentifier) && $equals_1('http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd', systemIdentifier) || !((systemIdentifier == null || $equals_1('about:legacy-compat', systemIdentifier)) && publicIdentifier == null);
+              $documentModeInternal(this$static, ($clinit_113() , STANDARDS_MODE));
+            }
+
+            break;
+          case 2:
+            this$static.html4 = true;
+            this$static.tokenizer.html4 = true;
+            if ($isQuirky(name_0, publicIdentifier, systemIdentifier, forceQuirks)) {
+              $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+            }
+             else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
+              $documentModeInternal(this$static, ($clinit_113() , ALMOST_STANDARDS_MODE));
+            }
+             else {
+              $equals_1('-//W3C//DTD HTML 4.01//EN', publicIdentifier) && !$equals_1('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier);
+              $documentModeInternal(this$static, ($clinit_113() , STANDARDS_MODE));
+            }
+
+            break;
+          case 1:
+            this$static.html4 = true;
+            this$static.tokenizer.html4 = true;
+            if ($isQuirky(name_0, publicIdentifier, systemIdentifier, forceQuirks)) {
+              $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+            }
+             else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
+              $equals_1('-//W3C//DTD HTML 4.01 Transitional//EN', publicIdentifier) && systemIdentifier != null && !$equals_1('http://www.w3.org/TR/html4/loose.dtd', systemIdentifier);
+              $documentModeInternal(this$static, ($clinit_113() , ALMOST_STANDARDS_MODE));
+            }
+             else {
+              $documentModeInternal(this$static, ($clinit_113() , STANDARDS_MODE));
+            }
+
+            break;
+          case 3:
+            this$static.html4 = $isHtml4Doctype(publicIdentifier);
+            this$static.html4 && (this$static.tokenizer.html4 = true);
+            if ($isQuirky(name_0, publicIdentifier, systemIdentifier, forceQuirks)) {
+              $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+            }
+             else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
+              $equals_1('-//W3C//DTD HTML 4.01 Transitional//EN', publicIdentifier) && !$equals_1('http://www.w3.org/TR/html4/loose.dtd', systemIdentifier);
+              $documentModeInternal(this$static, ($clinit_113() , ALMOST_STANDARDS_MODE));
+            }
+             else {
+              $equals_1('-//W3C//DTD HTML 4.01//EN', publicIdentifier) && !$equals_1('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier);
+              $documentModeInternal(this$static, ($clinit_113() , STANDARDS_MODE));
+            }
+
+            break;
+          case 4:
+            $isQuirky(name_0, publicIdentifier, systemIdentifier, forceQuirks)?$documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE)):$isAlmostStandards(publicIdentifier, systemIdentifier)?$documentModeInternal(this$static, ($clinit_113() , ALMOST_STANDARDS_MODE)):$documentModeInternal(this$static, ($clinit_113() , STANDARDS_MODE));
+        }
+
+        this$static.mode = 1;
+        return;
+    }
+  }
+  return;
+}
+
+function $documentModeInternal(this$static, m){
+  this$static.quirks = m == ($clinit_113() , QUIRKS_MODE);
+}
+
+function $endTag(this$static, elementName){
+  var eltPos, group, name_0, node, node_33;
+  $flushCharacters(this$static);
+  this$static.needToDropLF = false;
+  group = elementName.flags & 127;
+  name_0 = elementName.name_0;
+  endtagloop: for (;;) {
+    if (this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+      eltPos = this$static.currentPtr;
+      for (;;) {
+        if (this$static.stack_0[eltPos].name_0 == name_0) {
+          while (this$static.currentPtr >= eltPos) {
+            $pop(this$static);
+          }
+          break endtagloop;
+        }
+        if (this$static.stack_0[--eltPos].ns == 'http://www.w3.org/1999/xhtml') {
+          break;
+        }
+      }
+    }
+    switch (this$static.mode) {
+      case 11:
+        switch (group) {
+          case 37:
+            eltPos = $findLastOrRoot_0(this$static, 37);
+            if (eltPos == 0) {
+              break endtagloop;
+            }
+
+            $clearStackBackTo(this$static, eltPos);
+            $pop(this$static);
+            this$static.mode = 10;
+            break endtagloop;
+          case 34:
+            eltPos = $findLastOrRoot_0(this$static, 37);
+            if (eltPos == 0) {
+              break endtagloop;
+            }
+
+            $clearStackBackTo(this$static, eltPos);
+            $pop(this$static);
+            this$static.mode = 10;
+            continue;
+          case 39:
+            if ($findLastInTableScope(this$static, name_0) == 2147483647) {
+              break endtagloop;
+            }
+
+            eltPos = $findLastOrRoot_0(this$static, 37);
+            if (eltPos == 0) {
+              break endtagloop;
+            }
+
+            $clearStackBackTo(this$static, eltPos);
+            $pop(this$static);
+            this$static.mode = 10;
+            continue;
+          case 3:
+          case 6:
+          case 7:
+          case 8:
+          case 23:
+          case 40:
+            break endtagloop;
+        }
+
+      case 10:
+        switch (group) {
+          case 39:
+            eltPos = $findLastOrRoot(this$static, name_0);
+            if (eltPos == 0) {
+              break endtagloop;
+            }
+
+            $clearStackBackTo(this$static, eltPos);
+            $pop(this$static);
+            this$static.mode = 7;
+            break endtagloop;
+          case 34:
+            eltPos = $findLastInTableScopeOrRootTbodyTheadTfoot(this$static);
+            if (eltPos == 0) {
+              break endtagloop;
+            }
+
+            $clearStackBackTo(this$static, eltPos);
+            $pop(this$static);
+            this$static.mode = 7;
+            continue;
+          case 3:
+          case 6:
+          case 7:
+          case 8:
+          case 23:
+          case 40:
+          case 37:
+            break endtagloop;
+        }
+
+      case 7:
+        switch (group) {
+          case 34:
+            eltPos = $findLast(this$static, 'table');
+            if (eltPos == 2147483647) {
+              break endtagloop;
+            }
+
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $resetTheInsertionMode(this$static);
+            break endtagloop;
+          case 3:
+          case 6:
+          case 7:
+          case 8:
+          case 23:
+          case 39:
+          case 40:
+          case 37:
+            break endtagloop;
+        }
+
+      case 8:
+        switch (group) {
+          case 6:
+            eltPos = $findLastInTableScope(this$static, 'caption');
+            if (eltPos == 2147483647) {
+              break endtagloop;
+            }
+
+            $generateImpliedEndTags(this$static);
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
+            this$static.mode = 7;
+            break endtagloop;
+          case 34:
+            eltPos = $findLastInTableScope(this$static, 'caption');
+            if (eltPos == 2147483647) {
+              break endtagloop;
+            }
+
+            $generateImpliedEndTags(this$static);
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
+            this$static.mode = 7;
+            continue;
+          case 3:
+          case 7:
+          case 8:
+          case 23:
+          case 39:
+          case 40:
+          case 37:
+            break endtagloop;
+        }
+
+      case 12:
+        switch (group) {
+          case 40:
+            eltPos = $findLastInTableScope(this$static, name_0);
+            if (eltPos == 2147483647) {
+              break endtagloop;
+            }
+
+            $generateImpliedEndTags(this$static);
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
+            this$static.mode = 11;
+            break endtagloop;
+          case 34:
+          case 39:
+          case 37:
+            if ($findLastInTableScope(this$static, name_0) == 2147483647) {
+              break endtagloop;
+            }
+
+            $closeTheCell(this$static, $findLastInTableScopeTdTh(this$static));
+            continue;
+          case 3:
+          case 6:
+          case 7:
+          case 8:
+          case 23:
+            break endtagloop;
+        }
+
+      case 21:
+      case 6:
+        switch (group) {
+          case 3:
+            if (!(this$static.currentPtr >= 1 && (this$static.stack_0[1].flags & 127) == 3)) {
+              break endtagloop;
+            }
+
+            this$static.mode = 15;
+            break endtagloop;
+          case 23:
+            if (!(this$static.currentPtr >= 1 && (this$static.stack_0[1].flags & 127) == 3)) {
+              break endtagloop;
+            }
+
+            this$static.mode = 15;
+            continue;
+          case 50:
+          case 46:
+          case 44:
+          case 61:
+          case 5:
+          case 51:
+            eltPos = $findLastInScope(this$static, name_0);
+            if (!(eltPos == 2147483647)) {
+              $generateImpliedEndTags(this$static);
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+            }
+
+            break endtagloop;
+          case 9:
+            if (!this$static.formPointer) {
+              break endtagloop;
+            }
+
+            this$static.formPointer = null;
+            eltPos = $findLastInScope(this$static, name_0);
+            if (eltPos == 2147483647) {
+              break endtagloop;
+            }
+
+            $generateImpliedEndTags(this$static);
+            $removeFromStack(this$static, eltPos);
+            break endtagloop;
+          case 29:
+            eltPos = $findLastInButtonScope(this$static, 'p');
+            if (eltPos == 2147483647) {
+              if (this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+                while (this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+                  $pop(this$static);
+                }
+              }
+              $appendVoidElementToCurrentMayFoster_0(this$static, elementName, ($clinit_128() , EMPTY_ATTRIBUTES));
+              break endtagloop;
+            }
+
+            $generateImpliedEndTagsExceptFor(this$static, 'p');
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            break endtagloop;
+          case 15:
+            eltPos = $findLastInListScope(this$static, name_0);
+            if (!(eltPos == 2147483647)) {
+              $generateImpliedEndTagsExceptFor(this$static, name_0);
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+            }
+
+            break endtagloop;
+          case 41:
+            eltPos = $findLastInScope(this$static, name_0);
+            if (!(eltPos == 2147483647)) {
+              $generateImpliedEndTagsExceptFor(this$static, name_0);
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+            }
+
+            break endtagloop;
+          case 42:
+            eltPos = $findLastInScopeHn(this$static);
+            if (!(eltPos == 2147483647)) {
+              $generateImpliedEndTags(this$static);
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+            }
+
+            break endtagloop;
+          case 63:
+          case 43:
+            eltPos = $findLastInScope(this$static, name_0);
+            if (!(eltPos == 2147483647)) {
+              $generateImpliedEndTags(this$static);
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+              $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
+            }
+
+            break endtagloop;
+          case 4:
+            if (this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+              while (this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+                $pop(this$static);
+              }
+            }
+
+            $reconstructTheActiveFormattingElements(this$static);
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, ($clinit_128() , EMPTY_ATTRIBUTES));
+            break endtagloop;
+          case 49:
+          case 55:
+          case 48:
+          case 12:
+          case 13:
+          case 65:
+          case 22:
+          case 14:
+          case 47:
+          case 60:
+          case 25:
+          case 32:
+          case 34:
+          case 35:
+            break endtagloop;
+          case 26:
+          case 1:
+          case 45:
+          case 64:
+          case 24:
+            if ($adoptionAgencyEndTag(this$static, name_0)) {
+              break endtagloop;
+            }
+
+          default:if (name_0 == this$static.stack_0[this$static.currentPtr].name_0) {
+              $pop(this$static);
+              break endtagloop;
+            }
+
+            eltPos = this$static.currentPtr;
+            for (;;) {
+              node = this$static.stack_0[eltPos];
+              if (node.name_0 == name_0) {
+                $generateImpliedEndTags(this$static);
+                while (this$static.currentPtr >= eltPos) {
+                  $pop(this$static);
+                }
+                break endtagloop;
+              }
+               else if ((node.flags & 536870912) != 0) {
+                break endtagloop;
+              }
+              --eltPos;
+            }
+
+        }
+
+      case 9:
+        switch (group) {
+          case 8:
+            if (this$static.currentPtr == 0) {
+              break endtagloop;
+            }
+
+            $pop(this$static);
+            this$static.mode = 7;
+            break endtagloop;
+          case 7:
+            break endtagloop;
+          default:if (this$static.currentPtr == 0) {
+              break endtagloop;
+            }
+
+            $pop(this$static);
+            this$static.mode = 7;
+            continue;
+        }
+
+      case 14:
+        switch (group) {
+          case 6:
+          case 34:
+          case 39:
+          case 37:
+          case 40:
+            if ($findLastInTableScope(this$static, name_0) != 2147483647) {
+              eltPos = $findLastInTableScope(this$static, 'select');
+              if (eltPos == 2147483647) {
+                break endtagloop;
+              }
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+              $resetTheInsertionMode(this$static);
+              continue;
+            }
+             else {
+              break endtagloop;
+            }
+
+        }
+
+      case 13:
+        switch (group) {
+          case 28:
+            if ('option' == this$static.stack_0[this$static.currentPtr].name_0) {
+              $pop(this$static);
+              break endtagloop;
+            }
+             else {
+              break endtagloop;
+            }
+
+          case 27:
+            'option' == this$static.stack_0[this$static.currentPtr].name_0 && 'optgroup' == this$static.stack_0[this$static.currentPtr - 1].name_0 && $pop(this$static);
+            'optgroup' == this$static.stack_0[this$static.currentPtr].name_0 && $pop(this$static);
+            break endtagloop;
+          case 32:
+            eltPos = $findLastInTableScope(this$static, 'select');
+            if (eltPos == 2147483647) {
+              break endtagloop;
+            }
+
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $resetTheInsertionMode(this$static);
+            break endtagloop;
+          default:break endtagloop;
+        }
+
+      case 15:
+        switch (group) {
+          case 23:
+            if (this$static.fragment) {
+              break endtagloop;
+            }
+             else {
+              this$static.mode = 18;
+              break endtagloop;
+            }
+
+          default:this$static.mode = this$static.framesetOk?21:6;
+            continue;
+        }
+
+      case 16:
+        switch (group) {
+          case 11:
+            if (this$static.currentPtr == 0) {
+              break endtagloop;
+            }
+
+            $pop(this$static);
+            !this$static.fragment && 'frameset' != this$static.stack_0[this$static.currentPtr].name_0 && (this$static.mode = 17);
+            break endtagloop;
+          default:break endtagloop;
+        }
+
+      case 17:
+        switch (group) {
+          case 23:
+            this$static.mode = 19;
+            break endtagloop;
+          default:break endtagloop;
+        }
+
+      case 0:
+        $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+        this$static.mode = 1;
+        continue;
+      case 1:
+        switch (group) {
+          case 20:
+          case 4:
+          case 23:
+          case 3:
+            $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
+            this$static.mode = 2;
+            continue;
+          default:break endtagloop;
+        }
+
+      case 2:
+        switch (group) {
+          case 20:
+          case 4:
+          case 23:
+          case 3:
+            $appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_128() , EMPTY_ATTRIBUTES));
+            this$static.mode = 3;
+            continue;
+          default:break endtagloop;
+        }
+
+      case 3:
+        switch (group) {
+          case 20:
+            $pop(this$static);
+            this$static.mode = 5;
+            break endtagloop;
+          case 4:
+          case 23:
+          case 3:
+            $pop(this$static);
+            this$static.mode = 5;
+            continue;
+          default:break endtagloop;
+        }
+
+      case 4:
+        switch (group) {
+          case 26:
+            $pop(this$static);
+            this$static.mode = 3;
+            break endtagloop;
+          case 4:
+            $pop(this$static);
+            this$static.mode = 3;
+            continue;
+          default:break endtagloop;
+        }
+
+      case 5:
+        switch (group) {
+          case 23:
+          case 3:
+          case 4:
+            $appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , BODY), $emptyAttributes(this$static.tokenizer));
+            this$static.mode = 21;
+            continue;
+          default:break endtagloop;
+        }
+
+      case 18:
+        this$static.mode = this$static.framesetOk?21:6;
+        continue;
+      case 19:
+        this$static.mode = 16;
+        continue;
+      case 20:
+        $pop(this$static);
+        this$static.originalMode == 5 && (node_33 = this$static.stack_0[this$static.currentPtr] , --this$static.currentPtr , --node_33.refcount , undefined);
+        this$static.mode = this$static.originalMode;
+        break endtagloop;
+    }
+  }
+}
+
+function $endTokenization(this$static){
+  this$static.formPointer = null;
+  this$static.headPointer = null;
+  if (this$static.stack_0 != null) {
+    while (this$static.currentPtr > -1) {
+      --this$static.stack_0[this$static.currentPtr].refcount;
+      --this$static.currentPtr;
+    }
+    this$static.stack_0 = null;
+  }
+  if (this$static.listOfActiveFormattingElements != null) {
+    while (this$static.listPtr > -1) {
+      !!this$static.listOfActiveFormattingElements[this$static.listPtr] && --this$static.listOfActiveFormattingElements[this$static.listPtr].refcount;
+      --this$static.listPtr;
+    }
+    this$static.listOfActiveFormattingElements = null;
+  }
+  $clearImpl(this$static.idLocations);
+  this$static.charBuffer = null;
+}
+
+function $eof(this$static){
+  var group, i;
+  $flushCharacters(this$static);
+  eofloop: for (;;) {
+    if (this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+      break eofloop;
+    }
+    switch (this$static.mode) {
+      case 0:
+        $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+        this$static.mode = 1;
+        continue;
+      case 1:
+        $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
+        this$static.mode = 2;
+        continue;
+      case 2:
+        $appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_128() , EMPTY_ATTRIBUTES));
+        this$static.mode = 3;
+        continue;
+      case 3:
+        while (this$static.currentPtr > 0) {
+          $popOnEof(this$static);
+        }
+
+        this$static.mode = 5;
+        continue;
+      case 4:
+        while (this$static.currentPtr > 1) {
+          $popOnEof(this$static);
+        }
+
+        this$static.mode = 3;
+        continue;
+      case 5:
+        $appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , BODY), $emptyAttributes(this$static.tokenizer));
+        this$static.mode = 6;
+        continue;
+      case 9:
+        if (this$static.currentPtr == 0) {
+          break eofloop;
+        }
+         else {
+          $popOnEof(this$static);
+          this$static.mode = 7;
+          continue;
+        }
+
+      case 21:
+      case 8:
+      case 12:
+      case 6:
+        openelementloop: for (i = this$static.currentPtr; i >= 0; --i) {
+          group = this$static.stack_0[i].flags & 127;
+          switch (group) {
+            case 41:
+            case 15:
+            case 29:
+            case 39:
+            case 40:
+            case 3:
+            case 23:
+              break;
+            default:break openelementloop;
+          }
+        }
+
+        break eofloop;
+      case 20:
+        this$static.originalMode == 5 && $popOnEof(this$static);
+        $popOnEof(this$static);
+        this$static.mode = this$static.originalMode;
+        continue;
+      case 10:
+      case 11:
+      case 7:
+      case 13:
+      case 14:
+      case 16:
+        break eofloop;
+      case 15:
+      case 17:
+      case 18:
+      case 19:
+      default:this$static.currentPtr == 0 && fromDouble((new Date).getTime());
+        break eofloop;
+    }
+  }
+  while (this$static.currentPtr > 0) {
+    $popOnEof(this$static);
+  }
+  !this$static.fragment && $popOnEof(this$static);
+}
+
+function $fatal(this$static, e){
+  var spe;
+  spe = $SAXParseException_0(new SAXParseException, e.getMessage(), this$static.tokenizer, e);
+  throw spe;
+}
+
+function $fatal_0(this$static, s){
+  var spe;
+  spe = $SAXParseException(new SAXParseException, s, this$static.tokenizer);
+  throw spe;
+}
+
+function $findInListOfActiveFormattingElements(this$static, node){
+  var i;
+  for (i = this$static.listPtr; i >= 0; --i) {
+    if (node == this$static.listOfActiveFormattingElements[i]) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+function $findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(this$static, name_0){
+  var i, node;
+  for (i = this$static.listPtr; i >= 0; --i) {
+    node = this$static.listOfActiveFormattingElements[i];
+    if (!node) {
+      return -1;
+    }
+     else if (node.name_0 == name_0) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+function $findLast(this$static, name_0){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if (this$static.stack_0[i].name_0 == name_0) {
+      return i;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastInButtonScope(this$static, name_0){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if (this$static.stack_0[i].name_0 == name_0) {
+      return i;
+    }
+     else if ((this$static.stack_0[i].flags & 134217728) != 0 || this$static.stack_0[i].name_0 == 'button') {
+      return 2147483647;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastInListScope(this$static, name_0){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if (this$static.stack_0[i].name_0 == name_0) {
+      return i;
+    }
+     else if ((this$static.stack_0[i].flags & 134217728) != 0 || this$static.stack_0[i].name_0 == 'ul' || this$static.stack_0[i].name_0 == 'ol') {
+      return 2147483647;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastInScope(this$static, name_0){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if (this$static.stack_0[i].name_0 == name_0) {
+      return i;
+    }
+     else if ((this$static.stack_0[i].flags & 134217728) != 0) {
+      return 2147483647;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastInScopeHn(this$static){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if ((this$static.stack_0[i].flags & 127) == 42) {
+      return i;
+    }
+     else if ((this$static.stack_0[i].flags & 134217728) != 0) {
+      return 2147483647;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastInTableScope(this$static, name_0){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if (this$static.stack_0[i].name_0 == name_0) {
+      return i;
+    }
+     else if (this$static.stack_0[i].name_0 == 'table') {
+      return 2147483647;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastInTableScopeOrRootTbodyTheadTfoot(this$static){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if ((this$static.stack_0[i].flags & 127) == 39) {
+      return i;
+    }
+  }
+  return 0;
+}
+
+function $findLastInTableScopeTdTh(this$static){
+  var i, name_0;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    name_0 = this$static.stack_0[i].name_0;
+    if ('td' == name_0 || 'th' == name_0) {
+      return i;
+    }
+     else if (name_0 == 'table') {
+      return 2147483647;
+    }
+  }
+  return 2147483647;
+}
+
+function $findLastOrRoot(this$static, name_0){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if (this$static.stack_0[i].name_0 == name_0) {
+      return i;
+    }
+  }
+  return 0;
+}
+
+function $findLastOrRoot_0(this$static, group){
+  var i;
+  for (i = this$static.currentPtr; i > 0; --i) {
+    if ((this$static.stack_0[i].flags & 127) == group) {
+      return i;
+    }
+  }
+  return 0;
+}
+
+function $flushCharacters(this$static){
+  var elt, eltPos, node;
+  if (this$static.charBufferLen > 0) {
+    if ((this$static.mode == 7 || this$static.mode == 10 || this$static.mode == 11) && $charBufferContainsNonWhitespace(this$static)) {
+      $reconstructTheActiveFormattingElements(this$static);
+      if ((this$static.stack_0[this$static.currentPtr].flags & 268435456) == 0) {
+        $appendCharacters(this$static, this$static.stack_0[this$static.currentPtr].node, valueOf_0(this$static.charBuffer, 0, this$static.charBufferLen));
+        this$static.charBufferLen = 0;
+        return;
+      }
+      eltPos = $findLastOrRoot_0(this$static, 34);
+      node = this$static.stack_0[eltPos];
+      elt = node.node;
+      if (eltPos == 0) {
+        $appendCharacters(this$static, elt, valueOf_0(this$static.charBuffer, 0, this$static.charBufferLen));
+        this$static.charBufferLen = 0;
+        return;
+      }
+      $insertFosterParentedCharacters(this$static, this$static.charBuffer, 0, this$static.charBufferLen, elt, this$static.stack_0[eltPos - 1].node);
+      this$static.charBufferLen = 0;
+      return;
+    }
+    $appendCharacters(this$static, this$static.stack_0[this$static.currentPtr].node, valueOf_0(this$static.charBuffer, 0, this$static.charBufferLen));
+    this$static.charBufferLen = 0;
+  }
+}
+
+function $generateImpliedEndTags(this$static){
+  for (;;) {
+    switch (this$static.stack_0[this$static.currentPtr].flags & 127) {
+      case 29:
+      case 15:
+      case 41:
+      case 28:
+      case 27:
+      case 53:
+        $pop(this$static);
+        continue;
+      default:return;
+    }
+  }
+}
+
+function $generateImpliedEndTagsExceptFor(this$static, name_0){
+  var node;
+  for (;;) {
+    node = this$static.stack_0[this$static.currentPtr];
+    switch (node.flags & 127) {
+      case 29:
+      case 15:
+      case 41:
+      case 28:
+      case 27:
+      case 53:
+        if (node.name_0 == name_0) {
+          return;
+        }
+
+        $pop(this$static);
+        continue;
+      default:return;
+    }
+  }
+}
+
+function $implicitlyCloseP(this$static){
+  var eltPos;
+  eltPos = $findLastInButtonScope(this$static, 'p');
+  if (eltPos == 2147483647) {
+    return;
+  }
+  $generateImpliedEndTagsExceptFor(this$static, 'p');
+  while (this$static.currentPtr >= eltPos) {
+    $pop(this$static);
+  }
+}
+
+function $insertIntoFosterParent(this$static, child){
+  var elt, eltPos, node;
+  eltPos = $findLastOrRoot_0(this$static, 34);
+  node = this$static.stack_0[eltPos];
+  elt = node.node;
+  if (eltPos == 0) {
+    $appendElement(this$static, child, elt);
+    return;
+  }
+  $insertFosterParentedChild(this$static, child, elt, this$static.stack_0[eltPos - 1].node);
+}
+
+function $insertIntoStack(this$static, node, position){
+  if (position == this$static.currentPtr + 1) {
+    $push_0(this$static, node);
+  }
+   else {
+    arraycopy(this$static.stack_0, position, this$static.stack_0, position + 1, this$static.currentPtr - position + 1);
+    ++this$static.currentPtr;
+    this$static.stack_0[position] = node;
+  }
+}
+
+function $isAlmostStandards(publicIdentifier, systemIdentifier){
+  if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd xhtml 1.0 transitional//en', publicIdentifier)) {
+    return true;
+  }
+  if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd xhtml 1.0 frameset//en', publicIdentifier)) {
+    return true;
+  }
+  if (systemIdentifier != null) {
+    if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 transitional//en', publicIdentifier)) {
+      return true;
+    }
+    if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 frameset//en', publicIdentifier)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+function $isHtml4Doctype(publicIdentifier){
+  if (publicIdentifier != null && binarySearch_0(HTML4_PUBLIC_IDS, publicIdentifier, ($clinit_95() , $clinit_95() , NATURAL)) > -1) {
+    return true;
+  }
+  return false;
+}
+
+function $isInStack(this$static, node){
+  var i;
+  for (i = this$static.currentPtr; i >= 0; --i) {
+    if (this$static.stack_0[i] == node) {
+      return true;
+    }
+  }
+  return false;
+}
+
+function $isQuirky(name_0, publicIdentifier, systemIdentifier, forceQuirks){
+  var i;
+  if (forceQuirks) {
+    return true;
+  }
+  if (name_0 != 'html') {
+    return true;
+  }
+  if (publicIdentifier != null) {
+    for (i = 0; i < QUIRKY_PUBLIC_IDS.length; ++i) {
+      if (lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(QUIRKY_PUBLIC_IDS[i], publicIdentifier)) {
+        return true;
+      }
+    }
+    if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3o//dtd w3 html strict 3.0//en//', publicIdentifier) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('-/w3c/dtd html 4.0 transitional/en', publicIdentifier) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('html', publicIdentifier)) {
+      return true;
+    }
+  }
+  if (systemIdentifier == null) {
+    if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 transitional//en', publicIdentifier)) {
+      return true;
+    }
+     else if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 frameset//en', publicIdentifier)) {
+      return true;
+    }
+  }
+   else if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', systemIdentifier)) {
+    return true;
+  }
+  return false;
+}
+
+function $isSpecialParentInForeign(stackNode){
+  var ns;
+  ns = stackNode.ns;
+  return 'http://www.w3.org/1999/xhtml' == ns || (stackNode.flags & 16777216) != 0 || 'http://www.w3.org/1998/Math/MathML' == ns && (stackNode.flags & 127) == 57;
+}
+
+function $maybeForgetEarlierDuplicateFormattingElement(this$static, name_0, attributes){
+  var candidate, count, i, node;
+  candidate = -1;
+  count = 0;
+  for (i = this$static.listPtr; i >= 0; --i) {
+    node = this$static.listOfActiveFormattingElements[i];
+    if (!node) {
+      break;
+    }
+    if (node.name_0 == name_0 && $equalsAnother_0(node.attributes, attributes)) {
+      candidate = i;
+      ++count;
+    }
+  }
+  count >= 3 && $removeFromListOfActiveFormattingElements(this$static, candidate);
+}
+
+function $pop(this$static){
+  var node;
+  node = this$static.stack_0[this$static.currentPtr];
+  --this$static.currentPtr;
+  $elementPopped(this$static, node.ns, node.popName, node.node);
+  --node.refcount;
+}
+
+function $popOnEof(this$static){
+  var node;
+  node = this$static.stack_0[this$static.currentPtr];
+  --this$static.currentPtr;
+  $elementPopped(this$static, node.ns, node.popName, node.node);
+  --node.refcount;
+}
+
+function $push_0(this$static, node){
+  var newStack;
+  ++this$static.currentPtr;
+  if (this$static.currentPtr == this$static.stack_0.length) {
+    newStack = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 61, 15, this$static.stack_0.length + 64, 0);
+    arraycopy(this$static.stack_0, 0, newStack, 0, this$static.stack_0.length);
+    this$static.stack_0 = newStack;
+  }
+  this$static.stack_0[this$static.currentPtr] = node;
+}
+
+function $reconstructTheActiveFormattingElements(this$static){
+  var clone, currentNode, entry, entryClone, entryPos, mostRecent;
+  if (this$static.listPtr == -1) {
+    return;
+  }
+  mostRecent = this$static.listOfActiveFormattingElements[this$static.listPtr];
+  if (!mostRecent || $isInStack(this$static, mostRecent)) {
+    return;
+  }
+  entryPos = this$static.listPtr;
+  for (;;) {
+    --entryPos;
+    if (entryPos == -1) {
+      break;
+    }
+    if (!this$static.listOfActiveFormattingElements[entryPos]) {
+      break;
+    }
+    if ($isInStack(this$static, this$static.listOfActiveFormattingElements[entryPos])) {
+      break;
+    }
+  }
+  while (entryPos < this$static.listPtr) {
+    ++entryPos;
+    entry = this$static.listOfActiveFormattingElements[entryPos];
+    clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', entry.name_0, $cloneAttributes(entry.attributes));
+    entryClone = $StackNode(new StackNode, entry.flags, entry.ns, entry.name_0, clone, entry.popName, entry.attributes);
+    entry.attributes = null;
+    currentNode = this$static.stack_0[this$static.currentPtr];
+    (currentNode.flags & 268435456) != 0?$insertIntoFosterParent(this$static, clone):$appendElement(this$static, clone, currentNode.node);
+    $push_0(this$static, entryClone);
+    this$static.listOfActiveFormattingElements[entryPos] = entryClone;
+    --entry.refcount;
+    ++entryClone.refcount;
+  }
+}
+
+function $removeFromListOfActiveFormattingElements(this$static, pos){
+  --this$static.listOfActiveFormattingElements[pos].refcount;
+  if (pos == this$static.listPtr) {
+    --this$static.listPtr;
+    return;
+  }
+  arraycopy(this$static.listOfActiveFormattingElements, pos + 1, this$static.listOfActiveFormattingElements, pos, this$static.listPtr - pos);
+  --this$static.listPtr;
+}
+
+function $removeFromStack(this$static, pos){
+  if (this$static.currentPtr == pos) {
+    $pop(this$static);
+  }
+   else {
+    --this$static.stack_0[pos].refcount;
+    arraycopy(this$static.stack_0, pos + 1, this$static.stack_0, pos, this$static.currentPtr - pos);
+    --this$static.currentPtr;
+  }
+}
+
+function $removeFromStack_0(this$static, node){
+  var pos;
+  if (this$static.stack_0[this$static.currentPtr] == node) {
+    $pop(this$static);
+  }
+   else {
+    pos = this$static.currentPtr - 1;
+    while (pos >= 0 && this$static.stack_0[pos] != node) {
+      --pos;
+    }
+    if (pos == -1) {
+      return;
+    }
+    --node.refcount;
+    arraycopy(this$static.stack_0, pos + 1, this$static.stack_0, pos, this$static.currentPtr - pos);
+    --this$static.currentPtr;
+  }
+}
+
+function $resetTheInsertionMode(this$static){
+  var i, name_0, node, ns;
+  for (i = this$static.currentPtr; i >= 0; --i) {
+    node = this$static.stack_0[i];
+    name_0 = node.name_0;
+    ns = node.ns;
+    if (i == 0) {
+      if (this$static.contextNamespace == 'http://www.w3.org/1999/xhtml' && (this$static.contextName == 'td' || this$static.contextName == 'th')) {
+        this$static.mode = this$static.framesetOk?21:6;
+        return;
+      }
+       else {
+        name_0 = this$static.contextName;
+        ns = this$static.contextNamespace;
+      }
+    }
+    if ('select' == name_0) {
+      this$static.mode = 13;
+      return;
+    }
+     else if ('td' == name_0 || 'th' == name_0) {
+      this$static.mode = 12;
+      return;
+    }
+     else if ('tr' == name_0) {
+      this$static.mode = 11;
+      return;
+    }
+     else if ('tbody' == name_0 || 'thead' == name_0 || 'tfoot' == name_0) {
+      this$static.mode = 10;
+      return;
+    }
+     else if ('caption' == name_0) {
+      this$static.mode = 8;
+      return;
+    }
+     else if ('colgroup' == name_0) {
+      this$static.mode = 9;
+      return;
+    }
+     else if ('table' == name_0) {
+      this$static.mode = 7;
+      return;
+    }
+     else if ('http://www.w3.org/1999/xhtml' != ns) {
+      this$static.mode = this$static.framesetOk?21:6;
+      return;
+    }
+     else if ('head' == name_0) {
+      this$static.mode = this$static.framesetOk?21:6;
+      return;
+    }
+     else if ('body' == name_0) {
+      this$static.mode = this$static.framesetOk?21:6;
+      return;
+    }
+     else if ('frameset' == name_0) {
+      this$static.mode = 16;
+      return;
+    }
+     else if ('html' == name_0) {
+      !this$static.headPointer?(this$static.mode = 2):(this$static.mode = 5);
+      return;
+    }
+     else if (i == 0) {
+      this$static.mode = this$static.framesetOk?21:6;
+      return;
+    }
+  }
+}
+
+function $setFragmentContext(this$static, context){
+  this$static.contextName = context;
+  this$static.contextNamespace = 'http://www.w3.org/1999/xhtml';
+  this$static.fragment = false;
+  this$static.quirks = false;
+}
+
+function $silentPush(this$static, node){
+  var newStack;
+  ++this$static.currentPtr;
+  if (this$static.currentPtr == this$static.stack_0.length) {
+    newStack = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 61, 15, this$static.stack_0.length + 64, 0);
+    arraycopy(this$static.stack_0, 0, newStack, 0, this$static.stack_0.length);
+    this$static.stack_0 = newStack;
+  }
+  this$static.stack_0[this$static.currentPtr] = node;
+}
+
+function $startTag(this$static, elementName, attributes, selfClosing){
+  var actionIndex, activeA, activeAPos, attributeQName, currNs, currentNode, eltPos, formAttrs, group, i, inputAttributes, name_0, node, prompt_0, promptIndex, current_3, elt_10, current_4, elt_11;
+  $flushCharacters(this$static);
+  this$static.needToDropLF = false;
+  starttagloop: for (;;) {
+    group = elementName.flags & 127;
+    name_0 = elementName.name_0;
+    if (this$static.currentPtr >= 0 && this$static.stack_0[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
+      currentNode = this$static.stack_0[this$static.currentPtr];
+      currNs = currentNode.ns;
+      if (!((currentNode.flags & 16777216) != 0 || currNs == 'http://www.w3.org/1998/Math/MathML' && ((currentNode.flags & 127) == 57 && group != 56 || (currentNode.flags & 127) == 58 && group == 19))) {
+        switch (group) {
+          case 45:
+          case 50:
+          case 3:
+          case 4:
+          case 52:
+          case 41:
+          case 46:
+          case 48:
+          case 42:
+          case 20:
+          case 22:
+          case 15:
+          case 18:
+          case 24:
+          case 29:
+          case 44:
+          case 34:
+            while (!$isSpecialParentInForeign(this$static.stack_0[this$static.currentPtr])) {
+              $pop(this$static);
+            }
+
+            continue starttagloop;
+          case 64:
+            if ($contains(attributes, ($clinit_124() , COLOR)) || $contains(attributes, FACE) || $contains(attributes, SIZE)) {
+              while (!$isSpecialParentInForeign(this$static.stack_0[this$static.currentPtr])) {
+                $pop(this$static);
+              }
+              continue starttagloop;
+            }
+
+          default:if ('http://www.w3.org/2000/svg' == currNs) {
+              attributes.mode = 2;
+              if (selfClosing) {
+                $appendVoidElementToCurrentMayFosterSVG(this$static, elementName, attributes);
+                selfClosing = false;
+              }
+               else {
+                $appendToCurrentNodeAndPushElementMayFosterSVG(this$static, elementName, attributes);
+              }
+              attributes = null;
+              break starttagloop;
+            }
+             else {
+              attributes.mode = 1;
+              if (selfClosing) {
+                $appendVoidElementToCurrentMayFosterMathML(this$static, elementName, attributes);
+                selfClosing = false;
+              }
+               else {
+                $appendToCurrentNodeAndPushElementMayFosterMathML(this$static, elementName, attributes);
+              }
+              attributes = null;
+              break starttagloop;
+            }
+
+        }
+      }
+    }
+    switch (this$static.mode) {
+      case 10:
+        switch (group) {
+          case 37:
+            $clearStackBackTo(this$static, $findLastInTableScopeOrRootTbodyTheadTfoot(this$static));
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.mode = 11;
+            attributes = null;
+            break starttagloop;
+          case 40:
+            $clearStackBackTo(this$static, $findLastInTableScopeOrRootTbodyTheadTfoot(this$static));
+            $appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , TR), ($clinit_128() , EMPTY_ATTRIBUTES));
+            this$static.mode = 11;
+            continue;
+          case 6:
+          case 7:
+          case 8:
+          case 39:
+            eltPos = $findLastInTableScopeOrRootTbodyTheadTfoot(this$static);
+            if (eltPos == 0) {
+              break starttagloop;
+            }
+             else {
+              $clearStackBackTo(this$static, eltPos);
+              $pop(this$static);
+              this$static.mode = 7;
+              continue;
+            }
+
+        }
+
+      case 11:
+        switch (group) {
+          case 40:
+            $clearStackBackTo(this$static, $findLastOrRoot_0(this$static, 37));
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.mode = 12;
+            $append_3(this$static, null);
+            attributes = null;
+            break starttagloop;
+          case 6:
+          case 7:
+          case 8:
+          case 39:
+          case 37:
+            eltPos = $findLastOrRoot_0(this$static, 37);
+            if (eltPos == 0) {
+              break starttagloop;
+            }
+
+            $clearStackBackTo(this$static, eltPos);
+            $pop(this$static);
+            this$static.mode = 10;
+            continue;
+        }
+
+      case 7:
+        intableloop: for (;;) {
+          switch (group) {
+            case 6:
+              $clearStackBackTo(this$static, $findLastOrRoot_0(this$static, 34));
+              $append_3(this$static, null);
+              $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+              this$static.mode = 8;
+              attributes = null;
+              break starttagloop;
+            case 8:
+              $clearStackBackTo(this$static, $findLastOrRoot_0(this$static, 34));
+              $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+              this$static.mode = 9;
+              attributes = null;
+              break starttagloop;
+            case 7:
+              $clearStackBackTo(this$static, $findLastOrRoot_0(this$static, 34));
+              $appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , COLGROUP), ($clinit_128() , EMPTY_ATTRIBUTES));
+              this$static.mode = 9;
+              continue starttagloop;
+            case 39:
+              $clearStackBackTo(this$static, $findLastOrRoot_0(this$static, 34));
+              $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+              this$static.mode = 10;
+              attributes = null;
+              break starttagloop;
+            case 37:
+            case 40:
+              $clearStackBackTo(this$static, $findLastOrRoot_0(this$static, 34));
+              $appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , TBODY), ($clinit_128() , EMPTY_ATTRIBUTES));
+              this$static.mode = 10;
+              continue starttagloop;
+            case 34:
+              eltPos = $findLastInTableScope(this$static, name_0);
+              if (eltPos == 2147483647) {
+                break starttagloop;
+              }
+
+              $generateImpliedEndTags(this$static);
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+
+              $resetTheInsertionMode(this$static);
+              continue starttagloop;
+            case 31:
+              $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 2, elementName);
+              attributes = null;
+              break starttagloop;
+            case 33:
+              $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+              attributes = null;
+              break starttagloop;
+            case 13:
+              if (!lowerCaseLiteralEqualsIgnoreAsciiCaseString('hidden', $getValue_1(attributes, ($clinit_124() , TYPE_1)))) {
+                break intableloop;
+              }
+
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              elt_10 = $createElement_0(this$static, 'http://www.w3.org/1999/xhtml', name_0, attributes);
+              current_3 = this$static.stack_0[this$static.currentPtr];
+              $appendElement(this$static, elt_10, current_3.node);
+              $elementPopped(this$static, 'http://www.w3.org/1999/xhtml', name_0, elt_10);
+              selfClosing = false;
+              attributes = null;
+              break starttagloop;
+            case 9:
+              if (this$static.formPointer) {
+                break starttagloop;
+              }
+               else {
+                $processNonNcNames(attributes, this$static, this$static.namePolicy);
+                elt_11 = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'form', attributes);
+                this$static.formPointer = elt_11;
+                current_4 = this$static.stack_0[this$static.currentPtr];
+                $appendElement(this$static, elt_11, current_4.node);
+                $elementPopped(this$static, 'http://www.w3.org/1999/xhtml', 'form', elt_11);
+                attributes = null;
+                break starttagloop;
+              }
+
+            default:break intableloop;
+          }
+        }
+
+      case 8:
+        switch (group) {
+          case 6:
+          case 7:
+          case 8:
+          case 39:
+          case 37:
+          case 40:
+            eltPos = $findLastInTableScope(this$static, 'caption');
+            if (eltPos == 2147483647) {
+              break starttagloop;
+            }
+
+            $generateImpliedEndTags(this$static);
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
+            this$static.mode = 7;
+            continue;
+        }
+
+      case 12:
+        switch (group) {
+          case 6:
+          case 7:
+          case 8:
+          case 39:
+          case 37:
+          case 40:
+            eltPos = $findLastInTableScopeTdTh(this$static);
+            if (eltPos == 2147483647) {
+              break starttagloop;
+            }
+             else {
+              $closeTheCell(this$static, eltPos);
+              continue;
+            }
+
+        }
+
+      case 21:
+        switch (group) {
+          case 11:
+            if (this$static.mode == 21) {
+              if (this$static.currentPtr == 0 || (this$static.stack_0[1].flags & 127) != 3) {
+                break starttagloop;
+              }
+               else {
+                $detachFromParent(this$static, this$static.stack_0[1].node);
+                while (this$static.currentPtr > 0) {
+                  $pop(this$static);
+                }
+                $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+                this$static.mode = 16;
+                attributes = null;
+                break starttagloop;
+              }
+            }
+             else {
+              break starttagloop;
+            }
+
+          case 44:
+          case 15:
+          case 41:
+          case 5:
+          case 43:
+          case 63:
+          case 34:
+          case 49:
+          case 4:
+          case 48:
+          case 13:
+          case 65:
+          case 22:
+          case 35:
+          case 38:
+          case 47:
+          case 32:
+            if (this$static.mode == 21 && !(group == 13 && lowerCaseLiteralEqualsIgnoreAsciiCaseString('hidden', $getValue_1(attributes, ($clinit_124() , TYPE_1))))) {
+              this$static.framesetOk = false;
+              this$static.mode = 6;
+            }
+
+        }
+
+      case 6:
+        inbodyloop: for (;;) {
+          switch (group) {
+            case 23:
+              if (!this$static.fragment) {
+                $processNonNcNames(attributes, this$static, this$static.namePolicy);
+                $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+                attributes = null;
+              }
+
+              break starttagloop;
+            case 2:
+            case 16:
+            case 18:
+            case 33:
+            case 31:
+            case 36:
+            case 54:
+              break inbodyloop;
+            case 3:
+              if (this$static.currentPtr == 0 || (this$static.stack_0[1].flags & 127) != 3) {
+                break starttagloop;
+              }
+
+              this$static.framesetOk = false;
+              this$static.mode == 21 && (this$static.mode = 6);
+              $addAttributesToBody(this$static, attributes) && (attributes = null);
+              break starttagloop;
+            case 29:
+            case 50:
+            case 46:
+            case 51:
+              $implicitlyCloseP(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 42:
+              $implicitlyCloseP(this$static);
+              (this$static.stack_0[this$static.currentPtr].flags & 127) == 42 && $pop(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 61:
+              $implicitlyCloseP(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 44:
+              $implicitlyCloseP(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.needToDropLF = true;
+              attributes = null;
+              break starttagloop;
+            case 9:
+              if (this$static.formPointer) {
+                break starttagloop;
+              }
+               else {
+                $implicitlyCloseP(this$static);
+                $appendToCurrentNodeAndPushFormElementMayFoster(this$static, attributes);
+                attributes = null;
+                break starttagloop;
+              }
+
+            case 15:
+            case 41:
+              eltPos = this$static.currentPtr;
+              for (;;) {
+                node = this$static.stack_0[eltPos];
+                if ((node.flags & 127) == group) {
+                  $generateImpliedEndTagsExceptFor(this$static, node.name_0);
+                  while (this$static.currentPtr >= eltPos) {
+                    $pop(this$static);
+                  }
+                  break;
+                }
+                 else if ((node.flags & 134217728) != 0 || (node.flags & 536870912) != 0 && node.name_0 != 'p' && node.name_0 != 'address' && node.name_0 != 'div') {
+                  break;
+                }
+                --eltPos;
+              }
+
+              $implicitlyCloseP(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 30:
+              $implicitlyCloseP(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 8, elementName);
+              attributes = null;
+              break starttagloop;
+            case 1:
+              activeAPos = $findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(this$static, 'a');
+              if (activeAPos != -1) {
+                activeA = this$static.listOfActiveFormattingElements[activeAPos];
+                ++activeA.refcount;
+                $adoptionAgencyEndTag(this$static, 'a');
+                $removeFromStack_0(this$static, activeA);
+                activeAPos = $findInListOfActiveFormattingElements(this$static, activeA);
+                activeAPos != -1 && $removeFromListOfActiveFormattingElements(this$static, activeAPos);
+                --activeA.refcount;
+              }
+
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 45:
+            case 64:
+              $reconstructTheActiveFormattingElements(this$static);
+              $maybeForgetEarlierDuplicateFormattingElement(this$static, elementName.name_0, attributes);
+              $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 24:
+              $reconstructTheActiveFormattingElements(this$static);
+              2147483647 != $findLastInScope(this$static, 'nobr') && $adoptionAgencyEndTag(this$static, 'nobr');
+              $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 5:
+              eltPos = $findLastInScope(this$static, name_0);
+              if (eltPos != 2147483647) {
+                $generateImpliedEndTags(this$static);
+                while (this$static.currentPtr >= eltPos) {
+                  $pop(this$static);
+                }
+                continue starttagloop;
+              }
+               else {
+                $reconstructTheActiveFormattingElements(this$static);
+                $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes);
+                attributes = null;
+                break starttagloop;
+              }
+
+            case 63:
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes);
+              $append_3(this$static, null);
+              attributes = null;
+              break starttagloop;
+            case 43:
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              $append_3(this$static, null);
+              attributes = null;
+              break starttagloop;
+            case 34:
+              !this$static.quirks && $implicitlyCloseP(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.mode = 7;
+              attributes = null;
+              break starttagloop;
+            case 4:
+            case 48:
+            case 49:
+              $reconstructTheActiveFormattingElements(this$static);
+            case 55:
+              $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+              selfClosing = false;
+              attributes = null;
+              break starttagloop;
+            case 22:
+              $implicitlyCloseP(this$static);
+              $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+              selfClosing = false;
+              attributes = null;
+              break starttagloop;
+            case 12:
+              elementName = ($clinit_125() , IMG);
+              continue starttagloop;
+            case 65:
+            case 13:
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendVoidElementToCurrentMayFoster(this$static, name_0, attributes);
+              selfClosing = false;
+              attributes = null;
+              break starttagloop;
+            case 14:
+              if (this$static.formPointer) {
+                break starttagloop;
+              }
+
+              $implicitlyCloseP(this$static);
+              formAttrs = $HtmlAttributes(new HtmlAttributes, 0);
+              actionIndex = $getIndex(attributes, ($clinit_124() , ACTION));
+              actionIndex > -1 && $addAttribute(formAttrs, ACTION, $getValue_0(attributes, actionIndex), ($clinit_115() , ALLOW));
+              $appendToCurrentNodeAndPushFormElementMayFoster(this$static, formAttrs);
+              $appendVoidElementToCurrentMayFoster_0(this$static, ($clinit_125() , HR), ($clinit_128() , EMPTY_ATTRIBUTES));
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, LABEL_0, EMPTY_ATTRIBUTES);
+              promptIndex = $getIndex(attributes, PROMPT);
+              if (promptIndex > -1) {
+                prompt_0 = $toCharArray($getValue_0(attributes, promptIndex));
+                $appendCharacters(this$static, this$static.stack_0[this$static.currentPtr].node, valueOf_0(prompt_0, 0, prompt_0.length));
+              }
+               else {
+                $appendCharacters(this$static, this$static.stack_0[this$static.currentPtr].node, 'This is a searchable index. Enter search keywords: ');
+              }
+
+              inputAttributes = $HtmlAttributes(new HtmlAttributes, 0);
+              $addAttribute(inputAttributes, NAME, 'isindex', ($clinit_115() , ALLOW));
+              for (i = 0; i < attributes.length_0; ++i) {
+                attributeQName = $getAttributeName(attributes, i);
+                NAME == attributeQName || PROMPT == attributeQName || ACTION != attributeQName && $addAttribute(inputAttributes, attributeQName, $getValue_0(attributes, i), ALLOW);
+              }
+
+              $clearWithoutReleasingContents(attributes);
+              $appendVoidElementToCurrentMayFoster(this$static, 'input', inputAttributes);
+              $pop(this$static);
+              $appendVoidElementToCurrentMayFoster_0(this$static, HR, EMPTY_ATTRIBUTES);
+              $pop(this$static);
+              selfClosing = false;
+              break starttagloop;
+            case 35:
+              $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes);
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 1, elementName);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              this$static.needToDropLF = true;
+              attributes = null;
+              break starttagloop;
+            case 38:
+              $implicitlyCloseP(this$static);
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+              attributes = null;
+              break starttagloop;
+            case 26:
+              {
+                $reconstructTheActiveFormattingElements(this$static);
+                $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+                attributes = null;
+                break starttagloop;
+              }
+
+            case 25:
+            case 47:
+            case 60:
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+              attributes = null;
+              break starttagloop;
+            case 32:
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes);
+              switch (this$static.mode) {
+                case 7:
+                case 8:
+                case 9:
+                case 10:
+                case 11:
+                case 12:
+                  this$static.mode = 14;
+                  break;
+                default:this$static.mode = 13;
+              }
+
+              attributes = null;
+              break starttagloop;
+            case 27:
+            case 28:
+              'option' == this$static.stack_0[this$static.currentPtr].name_0 && $pop(this$static);
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 53:
+              eltPos = $findLastInScope(this$static, 'ruby');
+              eltPos != 2147483647 && $generateImpliedEndTags(this$static);
+              if (eltPos != this$static.currentPtr) {
+                while (this$static.currentPtr > eltPos) {
+                  $pop(this$static);
+                }
+              }
+
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            case 17:
+              $reconstructTheActiveFormattingElements(this$static);
+              attributes.mode = 1;
+              if (selfClosing) {
+                $appendVoidElementToCurrentMayFosterMathML(this$static, elementName, attributes);
+                selfClosing = false;
+              }
+               else {
+                $appendToCurrentNodeAndPushElementMayFosterMathML(this$static, elementName, attributes);
+              }
+
+              attributes = null;
+              break starttagloop;
+            case 19:
+              $reconstructTheActiveFormattingElements(this$static);
+              attributes.mode = 2;
+              if (selfClosing) {
+                $appendVoidElementToCurrentMayFosterSVG(this$static, elementName, attributes);
+                selfClosing = false;
+              }
+               else {
+                $appendToCurrentNodeAndPushElementMayFosterSVG(this$static, elementName, attributes);
+              }
+
+              attributes = null;
+              break starttagloop;
+            case 6:
+            case 7:
+            case 8:
+            case 39:
+            case 37:
+            case 40:
+            case 10:
+            case 11:
+            case 20:
+              break starttagloop;
+            case 62:
+              $reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster_0(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+            default:$reconstructTheActiveFormattingElements(this$static);
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              attributes = null;
+              break starttagloop;
+          }
+        }
+
+      case 3:
+        inheadloop: for (;;) {
+          switch (group) {
+            case 23:
+              if (!this$static.fragment) {
+                $processNonNcNames(attributes, this$static, this$static.namePolicy);
+                $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+                attributes = null;
+              }
+
+              break starttagloop;
+            case 2:
+            case 54:
+              $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+              selfClosing = false;
+              attributes = null;
+              break starttagloop;
+            case 18:
+            case 16:
+              break inheadloop;
+            case 36:
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 1, elementName);
+              attributes = null;
+              break starttagloop;
+            case 26:
+              {
+                $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+                this$static.mode = 4;
+              }
+
+              attributes = null;
+              break starttagloop;
+            case 31:
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 2, elementName);
+              attributes = null;
+              break starttagloop;
+            case 33:
+            case 25:
+              $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+              this$static.originalMode = this$static.mode;
+              this$static.mode = 20;
+              $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+              attributes = null;
+              break starttagloop;
+            case 20:
+              break starttagloop;
+            default:$pop(this$static);
+              this$static.mode = 5;
+              continue starttagloop;
+          }
+        }
+
+      case 4:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 16:
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            attributes = null;
+            break starttagloop;
+          case 18:
+            $checkMetaCharset(attributes);
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            attributes = null;
+            break starttagloop;
+          case 33:
+          case 25:
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+            attributes = null;
+            break starttagloop;
+          case 20:
+            break starttagloop;
+          case 26:
+            break starttagloop;
+          default:$pop(this$static);
+            this$static.mode = 3;
+            continue;
+        }
+
+      case 9:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 7:
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            attributes = null;
+            break starttagloop;
+          default:if (this$static.currentPtr == 0) {
+              break starttagloop;
+            }
+
+            $pop(this$static);
+            this$static.mode = 7;
+            continue;
+        }
+
+      case 14:
+        switch (group) {
+          case 6:
+          case 39:
+          case 37:
+          case 40:
+          case 34:
+            eltPos = $findLastInTableScope(this$static, 'select');
+            if (eltPos == 2147483647) {
+              break starttagloop;
+            }
+
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $resetTheInsertionMode(this$static);
+            continue;
+        }
+
+      case 13:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 28:
+            'option' == this$static.stack_0[this$static.currentPtr].name_0 && $pop(this$static);
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            attributes = null;
+            break starttagloop;
+          case 27:
+            'option' == this$static.stack_0[this$static.currentPtr].name_0 && $pop(this$static);
+            'optgroup' == this$static.stack_0[this$static.currentPtr].name_0 && $pop(this$static);
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            attributes = null;
+            break starttagloop;
+          case 32:
+            eltPos = $findLastInTableScope(this$static, name_0);
+            if (eltPos == 2147483647) {
+              break starttagloop;
+            }
+             else {
+              while (this$static.currentPtr >= eltPos) {
+                $pop(this$static);
+              }
+              $resetTheInsertionMode(this$static);
+              break starttagloop;
+            }
+
+          case 13:
+          case 35:
+          case 65:
+            eltPos = $findLastInTableScope(this$static, 'select');
+            if (eltPos == 2147483647) {
+              break starttagloop;
+            }
+
+            while (this$static.currentPtr >= eltPos) {
+              $pop(this$static);
+            }
+
+            $resetTheInsertionMode(this$static);
+            continue;
+          case 31:
+            $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 2, elementName);
+            attributes = null;
+            break starttagloop;
+          default:break starttagloop;
+        }
+
+      case 15:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          default:this$static.mode = this$static.framesetOk?21:6;
+            continue;
+        }
+
+      case 16:
+        switch (group) {
+          case 11:
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            attributes = null;
+            break starttagloop;
+          case 10:
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            attributes = null;
+            break starttagloop;
+        }
+
+      case 17:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 25:
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+            attributes = null;
+            break starttagloop;
+          default:break starttagloop;
+        }
+
+      case 0:
+        $documentModeInternal(this$static, ($clinit_113() , QUIRKS_MODE));
+        this$static.mode = 1;
+        continue;
+      case 1:
+        switch (group) {
+          case 23:
+            attributes == ($clinit_128() , EMPTY_ATTRIBUTES)?$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer)):$appendHtmlElementToDocumentAndPush(this$static, attributes);
+            this$static.mode = 2;
+            attributes = null;
+            break starttagloop;
+          default:$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
+            this$static.mode = 2;
+            continue;
+        }
+
+      case 2:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 20:
+            $appendToCurrentNodeAndPushHeadElement(this$static, attributes);
+            this$static.mode = 3;
+            attributes = null;
+            break starttagloop;
+          default:$appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_128() , EMPTY_ATTRIBUTES));
+            this$static.mode = 3;
+            continue;
+        }
+
+      case 5:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 3:
+            attributes.length_0 == 0?($appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , BODY), $emptyAttributes(this$static.tokenizer)) , undefined):$appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , BODY), attributes);
+            this$static.framesetOk = false;
+            this$static.mode = 6;
+            attributes = null;
+            break starttagloop;
+          case 11:
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.mode = 16;
+            attributes = null;
+            break starttagloop;
+          case 2:
+            $silentPush(this$static, $StackNode_0(new StackNode, ($clinit_125() , HEAD), this$static.headPointer));
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            $pop(this$static);
+            attributes = null;
+            break starttagloop;
+          case 16:
+            $silentPush(this$static, $StackNode_0(new StackNode, ($clinit_125() , HEAD), this$static.headPointer));
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            $pop(this$static);
+            attributes = null;
+            break starttagloop;
+          case 18:
+            $checkMetaCharset(attributes);
+            $silentPush(this$static, $StackNode_0(new StackNode, ($clinit_125() , HEAD), this$static.headPointer));
+            $appendVoidElementToCurrentMayFoster_0(this$static, elementName, attributes);
+            selfClosing = false;
+            $pop(this$static);
+            attributes = null;
+            break starttagloop;
+          case 31:
+            $silentPush(this$static, $StackNode_0(new StackNode, ($clinit_125() , HEAD), this$static.headPointer));
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 2, elementName);
+            attributes = null;
+            break starttagloop;
+          case 33:
+          case 25:
+            $silentPush(this$static, $StackNode_0(new StackNode, ($clinit_125() , HEAD), this$static.headPointer));
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 3, elementName);
+            attributes = null;
+            break starttagloop;
+          case 36:
+            $silentPush(this$static, $StackNode_0(new StackNode, ($clinit_125() , HEAD), this$static.headPointer));
+            $appendToCurrentNodeAndPushElement(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 1, elementName);
+            attributes = null;
+            break starttagloop;
+          case 20:
+            break starttagloop;
+          default:$appendToCurrentNodeAndPushElement(this$static, ($clinit_125() , BODY), $emptyAttributes(this$static.tokenizer));
+            this$static.mode = 21;
+            continue;
+        }
+
+      case 18:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          default:this$static.mode = this$static.framesetOk?21:6;
+            continue;
+        }
+
+      case 19:
+        switch (group) {
+          case 23:
+            if (!this$static.fragment) {
+              $processNonNcNames(attributes, this$static, this$static.namePolicy);
+              $addAttributesToElement(this$static, this$static.stack_0[0].node, attributes);
+              attributes = null;
+            }
+
+            break starttagloop;
+          case 25:
+            $appendToCurrentNodeAndPushElementMayFoster(this$static, elementName, attributes);
+            this$static.originalMode = this$static.mode;
+            this$static.mode = 20;
+            $setStateAndEndTagExpectation_0(this$static.tokenizer, 2, elementName);
+            attributes = null;
+            break starttagloop;
+          default:break starttagloop;
+        }
+
+      case 20:
+        break starttagloop;
+    }
+  }
+  attributes != ($clinit_128() , EMPTY_ATTRIBUTES);
+}
+
+function $startTokenization(this$static, self_0){
+  var elt, node;
+  this$static.tokenizer = self_0;
+  this$static.stack_0 = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 61, 15, 64, 0);
+  this$static.listOfActiveFormattingElements = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 61, 15, 64, 0);
+  this$static.needToDropLF = false;
+  this$static.originalMode = 0;
+  this$static.currentPtr = -1;
+  this$static.listPtr = -1;
+  this$static.formPointer = null;
+  this$static.headPointer = null;
+  this$static.html4 = false;
+  $clearImpl(this$static.idLocations);
+  this$static.wantingComments = this$static.wantingComments;
+  this$static.script = null;
+  this$static.placeholder = null;
+  this$static.readyToRun = false;
+  this$static.charBufferLen = 0;
+  this$static.charBuffer = initDim(_3C_classLit, 46, -1, 1024, 1);
+  this$static.framesetOk = true;
+  if (this$static.fragment) {
+    elt = $createHtmlElementSetAsRoot(this$static, $emptyAttributes(this$static.tokenizer));
+    node = $StackNode_0(new StackNode, ($clinit_125() , HTML_0), elt);
+    ++this$static.currentPtr;
+    this$static.stack_0[this$static.currentPtr] = node;
+    $resetTheInsertionMode(this$static);
+    'title' == this$static.contextName || 'textarea' == this$static.contextName?$setStateAndEndTagExpectation(this$static.tokenizer, 1):'style' == this$static.contextName || 'xmp' == this$static.contextName || 'iframe' == this$static.contextName || 'noembed' == this$static.contextName || 'noframes' == this$static.contextName?$setStateAndEndTagExpectation(this$static.tokenizer, 3):'plaintext' == this$static.contextName?$setStateAndEndTagExpectation(this$static.tokenizer, 8):'script' == this$static.contextName?$setStateAndEndTagExpectation(this$static.tokenizer, 2):$setStateAndEndTagExpectation(this$static.tokenizer, 0);
+    this$static.contextName = null;
+  }
+   else {
+    this$static.mode = 0;
+  }
+}
+
+function $zeroOriginatingReplacementCharacter(this$static){
+  var stackNode;
+  if (this$static.mode == 20) {
+    $accumulateCharacters(this$static, REPLACEMENT_CHARACTER, 0, 1);
+    return;
+  }
+  if (this$static.currentPtr >= 0) {
+    stackNode = this$static.stack_0[this$static.currentPtr];
+    if (stackNode.ns == 'http://www.w3.org/1999/xhtml') {
+      return;
+    }
+    if ((stackNode.flags & 16777216) != 0) {
+      return;
+    }
+    if (stackNode.ns == 'http://www.w3.org/1998/Math/MathML' && (stackNode.flags & 127) == 57) {
+      return;
+    }
+    $accumulateCharacters(this$static, REPLACEMENT_CHARACTER, 0, 1);
+  }
+}
+
+function extractCharsetFromContent(attributeValue){
+  var buffer, c, charset, charsetState, end, i, start;
+  charsetState = 0;
+  start = -1;
+  end = -1;
+  buffer = $toCharArray(attributeValue);
+  charsetloop: for (i = 0; i < buffer.length; ++i) {
+    c = buffer[i];
+    switch (charsetState) {
+      case 0:
+        switch (c) {
+          case 99:
+          case 67:
+            charsetState = 1;
+            continue;
+          default:continue;
+        }
+
+      case 1:
+        switch (c) {
+          case 104:
+          case 72:
+            charsetState = 2;
+            continue;
+          default:charsetState = 0;
+            continue;
+        }
+
+      case 2:
+        switch (c) {
+          case 97:
+          case 65:
+            charsetState = 3;
+            continue;
+          default:charsetState = 0;
+            continue;
+        }
+
+      case 3:
+        switch (c) {
+          case 114:
+          case 82:
+            charsetState = 4;
+            continue;
+          default:charsetState = 0;
+            continue;
+        }
+
+      case 4:
+        switch (c) {
+          case 115:
+          case 83:
+            charsetState = 5;
+            continue;
+          default:charsetState = 0;
+            continue;
+        }
+
+      case 5:
+        switch (c) {
+          case 101:
+          case 69:
+            charsetState = 6;
+            continue;
+          default:charsetState = 0;
+            continue;
+        }
+
+      case 6:
+        switch (c) {
+          case 116:
+          case 84:
+            charsetState = 7;
+            continue;
+          default:charsetState = 0;
+            continue;
+        }
+
+      case 7:
+        switch (c) {
+          case 9:
+          case 10:
+          case 12:
+          case 13:
+          case 32:
+            continue;
+          case 61:
+            charsetState = 8;
+            continue;
+          default:return null;
+        }
+
+      case 8:
+        switch (c) {
+          case 9:
+          case 10:
+          case 12:
+          case 13:
+          case 32:
+            continue;
+          case 39:
+            start = i + 1;
+            charsetState = 9;
+            continue;
+          case 34:
+            start = i + 1;
+            charsetState = 10;
+            continue;
+          default:start = i;
+            charsetState = 11;
+            continue;
+        }
+
+      case 9:
+        switch (c) {
+          case 39:
+            end = i;
+            break charsetloop;
+          default:continue;
+        }
+
+      case 10:
+        switch (c) {
+          case 34:
+            end = i;
+            break charsetloop;
+          default:continue;
+        }
+
+      case 11:
+        switch (c) {
+          case 9:
+          case 10:
+          case 12:
+          case 13:
+          case 32:
+          case 59:
+            end = i;
+            break charsetloop;
+          default:continue;
+        }
+
+    }
+  }
+  charset = null;
+  if (start != -1) {
+    end == -1 && (end = buffer.length);
+    charset = valueOf_0(buffer, start, end - start);
+  }
+  return charset;
+}
+
+function getClass_60(){
+  return Lnu_validator_htmlparser_impl_TreeBuilder_2_classLit;
+}
+
+function TreeBuilder(){
+}
+
+_ = TreeBuilder.prototype = new Object_0;
+_.getClass$ = getClass_60;
+_.typeId$ = 0;
+_.charBuffer = null;
+_.charBufferLen = 0;
+_.contextName = null;
+_.contextNamespace = null;
+_.currentPtr = -1;
+_.formPointer = null;
+_.fragment = false;
+_.framesetOk = true;
+_.headPointer = null;
+_.html4 = false;
+_.listOfActiveFormattingElements = null;
+_.listPtr = -1;
+_.mode = 0;
+_.needToDropLF = false;
+_.originalMode = 0;
+_.quirks = false;
+_.stack_0 = null;
+_.tokenizer = null;
+_.wantingComments = false;
+var HTML4_PUBLIC_IDS, QUIRKY_PUBLIC_IDS, REPLACEMENT_CHARACTER;
+function $clinit_117(){
+  $clinit_117 = nullMethod;
+  $clinit_116();
+}
+
+function $accumulateCharacters(this$static, buf, start, length_0){
+  var newBuf, newLen;
+  newLen = this$static.charBufferLen + length_0;
+  if (newLen > this$static.charBuffer.length) {
+    newBuf = initDim(_3C_classLit, 46, -1, newLen, 1);
+    arraycopy(this$static.charBuffer, 0, newBuf, 0, this$static.charBufferLen);
+    this$static.charBuffer = null;
+    this$static.charBuffer = newBuf;
+  }
+  arraycopy(buf, start, this$static.charBuffer, this$static.charBufferLen, length_0);
+  this$static.charBufferLen = newLen;
+}
+
+function $insertFosterParentedCharacters(this$static, buf, start, length_0, table, stackParent){
+  var end;
+  $insertFosterParentedCharacters_0(this$static, (end = start + length_0 , __checkBounds(buf.length, start, end) , __valueOf(buf, start, end)), table, stackParent);
+}
+
+function getClass_61(){
+  return Lnu_validator_htmlparser_impl_CoalescingTreeBuilder_2_classLit;
+}
+
+function CoalescingTreeBuilder(){
+}
+
+_ = CoalescingTreeBuilder.prototype = new TreeBuilder;
+_.getClass$ = getClass_61;
+_.typeId$ = 0;
+function $clinit_118(){
+  $clinit_118 = nullMethod;
+  $clinit_117();
+}
+
+function $BrowserTreeBuilder(this$static, document_0){
+  $clinit_118();
+  this$static.doctypeExpectation = ($clinit_112() , HTML);
+  this$static.namePolicy = ($clinit_115() , ALTER_INFOSET);
+  this$static.idLocations = $HashMap(new HashMap);
+  this$static.fragment = false;
+  this$static.scriptStack = $LinkedList(new LinkedList);
+  this$static.document_0 = document_0;
+  return this$static;
+}
+
+function $addAttributesToElement(this$static, element, attributes){
+  var $e0, e, i, localName, uri;
+  try {
+    for (i = 0; i < attributes.length_0; ++i) {
+      localName = $getLocalName(attributes, i);
+      uri = $getURI(attributes, i);
+      !element.hasAttributeNS(uri, localName) && (element.setAttributeNS(uri, localName, $getValue_0(attributes, i)) , undefined);
+    }
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $appendCharacters(this$static, parent_0, text){
+  var $e0, e;
+  try {
+    parent_0 == this$static.placeholder && (this$static.script.appendChild(this$static.document_0.createTextNode(text)) , undefined);
+    parent_0.appendChild(this$static.document_0.createTextNode(text));
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $appendChildrenToNewParent(this$static, oldParent, newParent){
+  var $e0, e;
+  try {
+    while (oldParent.hasChildNodes()) {
+      newParent.appendChild(oldParent.firstChild);
+    }
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $appendComment(this$static, parent_0, comment){
+  var $e0, e;
+  try {
+    parent_0 == this$static.placeholder && (this$static.script.appendChild(this$static.document_0.createComment(comment)) , undefined);
+    parent_0.appendChild(this$static.document_0.createComment(comment));
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $appendCommentToDocument(this$static, comment){
+  var $e0, e;
+  try {
+    this$static.document_0.appendChild(this$static.document_0.createComment(comment));
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $appendElement(this$static, child, newParent){
+  var $e0, e;
+  try {
+    newParent == this$static.placeholder && (this$static.script.appendChild(child.cloneNode(true)) , undefined);
+    newParent.appendChild(child);
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $createElement(this$static, ns, name_0, attributes){
+  var $e0, e, i, rv;
+  try {
+    rv = this$static.document_0.createElementNS(ns, name_0);
+    for (i = 0; i < attributes.length_0; ++i) {
+      rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue_0(attributes, i));
+    }
+    if ('script' == name_0) {
+      !!this$static.placeholder && $addLast(this$static.scriptStack, $BrowserTreeBuilder$ScriptHolder(new BrowserTreeBuilder$ScriptHolder, this$static.script, this$static.placeholder));
+      this$static.script = rv;
+      this$static.placeholder = this$static.document_0.createElementNS('http://n.validator.nu/placeholder/', 'script');
+      rv = this$static.placeholder;
+      for (i = 0; i < attributes.length_0; ++i) {
+        rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue_0(attributes, i));
+      }
+    }
+    return rv;
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+      throw $RuntimeException(new RuntimeException, 'Unreachable');
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $createElement_0(this$static, ns, name_0, attributes){
+  var $e0, e, rv;
+  try {
+    rv = $createElement(this$static, ns, name_0, attributes);
+    return rv;
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+      return null;
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $createHtmlElementSetAsRoot(this$static, attributes){
+  var $e0, e, i, rv;
+  try {
+    rv = this$static.document_0.createElementNS('http://www.w3.org/1999/xhtml', 'html');
+    for (i = 0; i < attributes.length_0; ++i) {
+      rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue_0(attributes, i));
+    }
+    this$static.document_0.appendChild(rv);
+    return rv;
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+      throw $RuntimeException(new RuntimeException, 'Unreachable');
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $detachFromParent(this$static, element){
+  var $e0, e, parent_0;
+  try {
+    parent_0 = element.parentNode;
+    !!parent_0 && (parent_0.removeChild(element) , undefined);
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $elementPopped(this$static, ns, name_0, node){
+  if (node == this$static.placeholder) {
+    this$static.readyToRun = true;
+    this$static.tokenizer.shouldSuspend = true;
+  }
+  __elementPopped__(ns, name_0, node);
+}
+
+function $getDocument(this$static){
+  var rv;
+  rv = this$static.document_0;
+  this$static.document_0 = null;
+  return rv;
+}
+
+function $insertFosterParentedCharacters_0(this$static, text, table, stackParent){
+  var $e0, child, e, parent_0;
+  try {
+    child = this$static.document_0.createTextNode(text);
+    parent_0 = table.parentNode;
+    !!parent_0 && parent_0.nodeType == 1?(parent_0.insertBefore(child, table) , undefined):(stackParent.appendChild(child) , undefined);
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $insertFosterParentedChild(this$static, child, table, stackParent){
+  var $e0, e, parent_0;
+  parent_0 = table.parentNode;
+  try {
+    !!parent_0 && parent_0.nodeType == 1?(parent_0.insertBefore(child, table) , undefined):(stackParent.appendChild(child) , undefined);
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 28)) {
+      e = $e0;
+      $fatal(this$static, e);
+    }
+     else
+      throw $e0;
+  }
+}
+
+function $maybeRunScript(this$static){
+  var scriptHolder;
+  if (this$static.readyToRun) {
+    this$static.readyToRun = false;
+    replace_0(this$static.placeholder, this$static.script);
+    if (this$static.scriptStack.size == 0) {
+      this$static.script = null;
+      this$static.placeholder = null;
+    }
+     else {
+      scriptHolder = dynamicCast($removeLast(this$static.scriptStack), 29);
+      this$static.script = scriptHolder.script;
+      this$static.placeholder = scriptHolder.placeholder;
+    }
+  }
+}
+
+function getClass_62(){
+  return Lnu_validator_htmlparser_gwt_BrowserTreeBuilder_2_classLit;
+}
+
+function replace_0(oldNode, newNode){
+  oldNode.parentNode.replaceChild(newNode, oldNode);
+  __elementPopped__('', newNode.nodeName, newNode);
+}
+
+function BrowserTreeBuilder(){
+}
+
+_ = BrowserTreeBuilder.prototype = new CoalescingTreeBuilder;
+_.getClass$ = getClass_62;
+_.typeId$ = 0;
+_.document_0 = null;
+_.placeholder = null;
+_.readyToRun = false;
+_.script = null;
+function $BrowserTreeBuilder$ScriptHolder(this$static, script, placeholder){
+  this$static.script = script;
+  this$static.placeholder = placeholder;
+  return this$static;
+}
+
+function getClass_63(){
+  return Lnu_validator_htmlparser_gwt_BrowserTreeBuilder$ScriptHolder_2_classLit;
+}
+
+function BrowserTreeBuilder$ScriptHolder(){
+}
+
+_ = BrowserTreeBuilder$ScriptHolder.prototype = new Object_0;
+_.getClass$ = getClass_63;
+_.typeId$ = 37;
+_.placeholder = null;
+_.script = null;
+function $HtmlParser(this$static, document_0){
+  this$static.documentWriteBuffer = $StringBuilder(new StringBuilder);
+  this$static.bufferStack = $LinkedList(new LinkedList);
+  this$static.domTreeBuilder = $BrowserTreeBuilder(new BrowserTreeBuilder, document_0);
+  this$static.tokenizer = $ErrorReportingTokenizer(new ErrorReportingTokenizer, this$static.domTreeBuilder);
+  this$static.domTreeBuilder.namePolicy = ($clinit_115() , ALTER_INFOSET);
+  this$static.tokenizer.commentPolicy = ALTER_INFOSET;
+  this$static.tokenizer.contentNonXmlCharPolicy = ALTER_INFOSET;
+  this$static.tokenizer.contentSpacePolicy = ALTER_INFOSET;
+  this$static.tokenizer.namePolicy = ALTER_INFOSET;
+  $setXmlnsPolicy(this$static.tokenizer, ALTER_INFOSET);
+  return this$static;
+}
+
+function $parse(this$static, source, useSetTimeouts, callback){
+  this$static.parseEndListener = callback;
+  $setFragmentContext(this$static.domTreeBuilder, null);
+  this$static.lastWasCR = false;
+  this$static.ending = false;
+  $setLength(this$static.documentWriteBuffer, 0);
+  this$static.streamLength = source.length;
+  this$static.stream = $UTF16Buffer(new UTF16Buffer, $toCharArray(source), 0, this$static.streamLength < 512?this$static.streamLength:512);
+  $clear(this$static.bufferStack);
+  $addLast(this$static.bufferStack, this$static.stream);
+  $setFragmentContext(this$static.domTreeBuilder, null);
+  $start_0(this$static.tokenizer);
+  $pump(this$static, useSetTimeouts);
+}
+
+function $pump(this$static, useSetTimeouts){
+  var $e0, timer;
+  if ($pumpcore(this$static)) {
+    return;
+  }
+  if (useSetTimeouts) {
+    timer = $HtmlParser$1(new HtmlParser$1, this$static);
+    $schedule(timer, 1);
+  }
+   else {
+    try {
+      while (!$pumpcore(this$static)) {
+      }
+    }
+     catch ($e0) {
+      $e0 = caught($e0);
+      if (instanceOf($e0, 30)) {
+        this$static.ending = true;
+      }
+       else
+        throw $e0;
+    }
+  }
+}
+
+function $pumpcore(this$static){
+  var buffer, docWriteLen, newBuf, newEnd;
+  if (this$static.ending) {
+    $end(this$static.tokenizer);
+    $getDocument(this$static.domTreeBuilder);
+    this$static.parseEndListener.callback();
+    return true;
+  }
+  docWriteLen = this$static.documentWriteBuffer.impl.string.length;
+  if (docWriteLen > 0) {
+    newBuf = initDim(_3C_classLit, 46, -1, docWriteLen, 1);
+    $getChars_0(this$static.documentWriteBuffer, 0, docWriteLen, newBuf, 0);
+    $addLast(this$static.bufferStack, $UTF16Buffer(new UTF16Buffer, newBuf, 0, docWriteLen));
+    $setLength(this$static.documentWriteBuffer, 0);
+  }
+  for (;;) {
+    buffer = dynamicCast($getLast(this$static.bufferStack), 31);
+    if (buffer.start >= buffer.end) {
+      if (buffer == this$static.stream) {
+        if (buffer.end == this$static.streamLength) {
+          $eof_0(this$static.tokenizer);
+          this$static.ending = true;
+          break;
+        }
+         else {
+          newEnd = buffer.start + 512;
+          buffer.end = newEnd < this$static.streamLength?newEnd:this$static.streamLength;
+          continue;
+        }
+      }
+       else {
+        $removeLast(this$static.bufferStack);
+        continue;
+      }
+    }
+    $adjust(buffer, this$static.lastWasCR);
+    this$static.lastWasCR = false;
+    if (buffer.start < buffer.end) {
+      this$static.lastWasCR = $tokenizeBuffer(this$static.tokenizer, buffer);
+      $maybeRunScript(this$static.domTreeBuilder);
+      break;
+    }
+     else {
+      continue;
+    }
+  }
+  return false;
+}
+
+function documentWrite(text){
+  var buffer;
+  buffer = $UTF16Buffer(new UTF16Buffer, $toCharArray(text), 0, text.length);
+  while (buffer.start < buffer.end) {
+    $adjust(buffer, this.lastWasCR);
+    this.lastWasCR = false;
+    if (buffer.start < buffer.end) {
+      this.lastWasCR = $tokenizeBuffer(this.tokenizer, buffer);
+      $maybeRunScript(this.domTreeBuilder);
+    }
+  }
+}
+
+function getClass_64(){
+  return Lnu_validator_htmlparser_gwt_HtmlParser_2_classLit;
+}
+
+function HtmlParser(){
+}
+
+_ = HtmlParser.prototype = new Object_0;
+_.documentWrite = documentWrite;
+_.getClass$ = getClass_64;
+_.typeId$ = 0;
+_.domTreeBuilder = null;
+_.ending = false;
+_.lastWasCR = false;
+_.parseEndListener = null;
+_.stream = null;
+_.streamLength = 0;
+_.tokenizer = null;
+function $clinit_121(){
+  $clinit_121 = nullMethod;
+  $clinit_47();
+}
+
+function $HtmlParser$1(this$static, this$0){
+  $clinit_121();
+  this$static.this$0 = this$0;
+  return this$static;
+}
+
+function $run(this$static){
+  var $e0;
+  try {
+    $pump(this$static.this$0, true);
+  }
+   catch ($e0) {
+    $e0 = caught($e0);
+    if (instanceOf($e0, 30)) {
+      this$static.this$0.ending = true;
+    }
+     else
+      throw $e0;
+  }
+}
+
+function getClass_65(){
+  return Lnu_validator_htmlparser_gwt_HtmlParser$1_2_classLit;
+}
+
+function HtmlParser$1(){
+}
+
+_ = HtmlParser$1.prototype = new Timer;
+_.getClass$ = getClass_65;
+_.typeId$ = 38;
+_.this$0 = null;
+function installDocWrite(doc, parser){
+  doc.write = function(){
+    if (arguments.length == 0) {
+      return;
+    }
+    var text = arguments[0];
+    for (var i = 1; i < arguments.length; i++) {
+      text += arguments[i];
+    }
+    parser.documentWrite(text);
+  }
+  ;
+  doc.writeln = function(){
+    if (arguments.length == 0) {
+      parser.documentWrite('\n');
+      return;
+    }
+    var text = arguments[0];
+    for (var i = 1; i < arguments.length; i++) {
+      text += arguments[i];
+    }
+    text += '\n';
+    parser.documentWrite(text);
+  }
+  ;
+}
+
+function parseHtmlDocument(source, document_0, useSetTimeouts, readyCallback, errorHandler){
+  var parser;
+  !readyCallback && (readyCallback = createFunction());
+  zapChildren(document_0);
+  parser = $HtmlParser(new HtmlParser, document_0);
+  installDocWrite(document_0, parser);
+  $parse(parser, source, useSetTimeouts, $ParseEndListener(new ParseEndListener, readyCallback));
+}
+
+function parseXmlDocument(source, document_0, useSetTimeouts, readyCallback, errorHandler){
+  var parser;
+  !readyCallback && (readyCallback = createFunction());
+  zapChildren(document_0);
+  parser = $HtmlParser(new HtmlParser, document_0);
+  parser.domTreeBuilder.wantingComments = !false;
+  parser.domTreeBuilder.namePolicy = ($clinit_115() , ALLOW);
+  parser.tokenizer.commentPolicy = ALLOW;
+  parser.tokenizer.contentNonXmlCharPolicy = ALLOW;
+  parser.tokenizer.contentSpacePolicy = ALLOW;
+  parser.tokenizer.namePolicy = ALLOW;
+  $setXmlnsPolicy(parser.tokenizer, ALLOW);
+  $parse(parser, source, useSetTimeouts, $ParseEndListener(new ParseEndListener, readyCallback));
+}
+
+function zapChildren(node){
+  while (node.hasChildNodes()) {
+    node.removeChild(node.lastChild);
+  }
+}
+
+function $ParseEndListener(this$static, callback){
+  this$static.callback = callback;
+  return this$static;
+}
+
+function getClass_66(){
+  return Lnu_validator_htmlparser_gwt_ParseEndListener_2_classLit;
+}
+
+function ParseEndListener(){
+}
+
+_ = ParseEndListener.prototype = new Object_0;
+_.getClass$ = getClass_66;
+_.typeId$ = 0;
+_.callback = null;
+function $clinit_124(){
+  var arr_471;
+  $clinit_124 = nullMethod;
+  ALL_NO_NS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['', '', '', '']);
+  XMLNS_NS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['', 'http://www.w3.org/2000/xmlns/', 'http://www.w3.org/2000/xmlns/', '']);
+  XML_NS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['', 'http://www.w3.org/XML/1998/namespace', 'http://www.w3.org/XML/1998/namespace', '']);
+  XLINK_NS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['', 'http://www.w3.org/1999/xlink', 'http://www.w3.org/1999/xlink', '']);
+  LANG_NS = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['', '', '', 'http://www.w3.org/XML/1998/namespace']);
+  ALL_NO_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 55, 1, [null, null, null, null]);
+  XMLNS_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 55, 1, [null, 'xmlns', 'xmlns', null]);
+  XLINK_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 55, 1, [null, 'xlink', 'xlink', null]);
+  XML_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 55, 1, [null, 'xml', 'xml', null]);
+  LANG_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 55, 1, [null, null, null, 'xml']);
+  ALL_NCNAME = initValues(_3Z_classLit, 45, -1, [true, true, true, true]);
+  ALL_NO_NCNAME = initValues(_3Z_classLit, 45, -1, [false, false, false, false]);
+  D = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('d'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  K = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('k'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  R = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('r'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  X = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('x'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  Y = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('y'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  Z = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('z'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('by'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cx'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('dx'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('dy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  G2 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('g2'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  G1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('g1'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fx'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  K4 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('k4'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  K2 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('k2'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  K3 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('k3'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  K1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('k1'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ID = $AttributeName(new AttributeName, ALL_NO_NS, SAME_LOCAL('id'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  IN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('in'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  U2 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('u2'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  U1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('u1'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rt'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rx'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ry'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TO = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('to'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  Y2 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('y2'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  Y1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('y1'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  X1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('x1'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  X2 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('x2'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('alt'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DIR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('dir'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DUR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('dur'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  END = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('end'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('for'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  IN2 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('in2'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MAX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('max'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('min'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LOW = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('low'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rel'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REV = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rev'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SRC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('src'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  AXIS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('axis'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ABBR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('abbr'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BBOX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('bbox'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CITE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cite'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('code'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BIAS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('bias'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cols'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLIP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('clip'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CHAR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('char'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BASE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('base'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  EDGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('edge'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DATA = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('data'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FILL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fill'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FROM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('from'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FORM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('form'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('face'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HIGH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('high'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HREF = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('href'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OPEN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('open'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ICON = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('icon'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NAME = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('name'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mode'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MASK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mask'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LINK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('link'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LANG = $AttributeName_0(new AttributeName, LANG_NS, SAME_LOCAL('lang'), LANG_PREFIX, ALL_NCNAME, false);
+  LIST = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('list'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TYPE_1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('type'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  WHEN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('when'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  WRAP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('wrap'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TEXT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('text'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PATH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('path'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ping'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REFX = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('refx', 'refX'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REFY = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('refy', 'refY'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('size'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SEED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('seed'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROWS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rows'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPAN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('span'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STEP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('step'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('role'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XREF = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('xref'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ASYNC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('async'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALINK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('alink'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALIGN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('align'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLOSE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('close'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('color'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLASS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('class'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLEAR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('clear'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BEGIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('begin'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DEPTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('depth'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DEFER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('defer'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FENCE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fence'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FRAME = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('frame'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ISMAP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ismap'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONEND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onend'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  INDEX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('index'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ORDER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('order'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OTHER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('other'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCUT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oncut'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NARGS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('nargs'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MEDIA = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('media'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LABEL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('label'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LOCAL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('local'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  WIDTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('width'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TITLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('title'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VLINK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('vlink'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VALUE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('value'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SLOPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('slope'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SHAPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('shape'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCOPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scope'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCALE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scale'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPEED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('speed'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STYLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('style'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RULES = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rules'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STEMH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stemh'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STEMV = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stemv'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  START = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('start'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XMLNS = $AttributeName_0(new AttributeName, XMLNS_NS, SAME_LOCAL('xmlns'), ALL_NO_PREFIX, initValues(_3Z_classLit, 45, -1, [false, false, false, false]), true);
+  ACCEPT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accept'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACCENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accent'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ASCENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ascent'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACTIVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('active'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALTIMG = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('altimg'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACTION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('action'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BORDER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('border'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CURSOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cursor'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COORDS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('coords'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FILTER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('filter'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FORMAT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('format'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HIDDEN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('hidden'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('hspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('height'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmove'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONLOAD = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onload'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAG = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondrag'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ORIGIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('origin'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONZOOM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onzoom'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONHELP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onhelp'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONSTOP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onstop'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDROP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondrop'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBLUR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onblur'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OBJECT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('object'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OFFSET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('offset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ORIENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('orient'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCOPY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oncopy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NOWRAP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('nowrap'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NOHREF = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('nohref'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MACROS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('macros'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  METHOD = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('method'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LOWSRC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('lowsrc'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('lspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LQUOTE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('lquote'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  USEMAP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('usemap'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  WIDTHS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('widths'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TARGET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('target'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VALUES = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('values'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VALIGN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('valign'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('vspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  POSTER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('poster'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  POINTS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('points'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PROMPT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('prompt'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCOPED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scoped'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STRING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('string'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCHEME = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scheme'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RADIUS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('radius'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RESULT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('result'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEAT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('repeat'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROTATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rotate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RQUOTE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rquote'), ALL_NO_PREFIX, ALL_NCNAME, false);
+	$clinit_124_1();
+}
+function $clinit_124_1(){
+  $clinit_124_1 = nullMethod;
+  ALTTEXT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('alttext'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARCHIVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('archive'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  AZIMUTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('azimuth'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLOSURE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('closure'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CHECKED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('checked'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLASSID = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('classid'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CHAROFF = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('charoff'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BGCOLOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('bgcolor'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLSPAN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('colspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CHARSET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('charset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COMPACT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('compact'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CONTENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('content'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ENCTYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('enctype'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DATASRC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('datasrc'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DATAFLD = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('datafld'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DECLARE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('declare'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DISPLAY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('display'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DIVISOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('divisor'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DEFAULT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('default'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DESCENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('descent'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  KERNING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('kerning'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HANGING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('hanging'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HEADERS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('headers'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONPASTE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onpaste'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCLICK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onclick'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OPTIMUM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('optimum'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEGIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbegin'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONKEYUP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onkeyup'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFOCUS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onfocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONERROR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onerror'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONINPUT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oninput'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONABORT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onabort'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONSTART = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONRESET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onreset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OPACITY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NOSHADE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('noshade'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MINSIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('minsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MAXSIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('maxsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LOOPEND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('loopend'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LARGEOP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('largeop'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNICODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('unicode'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TARGETX = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('targetx', 'targetX'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TARGETY = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('targety', 'targetY'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VIEWBOX = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('viewbox', 'viewBox'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERSION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('version'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PATTERN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('pattern'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PROFILE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('profile'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RESTART = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('restart'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROWSPAN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rowspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SANDBOX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('sandbox'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SUMMARY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('summary'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STANDBY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('standby'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPLACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('replace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  AUTOPLAY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('autoplay'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ADDITIVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('additive'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CALCMODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('calcmode', 'calcMode'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CODETYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('codetype'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CODEBASE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('codebase'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CONTROLS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('controls'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BEVELLED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('bevelled'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BASELINE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  EXPONENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('exponent'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  EDGEMODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('edgemode', 'edgeMode'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ENCODING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('encoding'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GLYPHREF = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('glyphref', 'glyphRef'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DATETIME = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('datetime'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DISABLED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('disabled'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONTSIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fontsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  KEYTIMES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('keytimes', 'keyTimes'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PANOSE_1 = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('panose-1'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HREFLANG = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('hreflang'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONRESIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onresize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCHANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBOUNCE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbounce'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONUNLOAD = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onunload'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFINISH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onfinish'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONSCROLL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onscroll'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OPERATOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('operator'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OVERFLOW = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('overflow'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONSUBMIT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onsubmit'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONREPEAT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onrepeat'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONSELECT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onselect'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NOTATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('notation'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NORESIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('noresize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MANIFEST = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('manifest'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MATHSIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mathsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MULTIPLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('multiple'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LONGDESC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('longdesc'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LANGUAGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('language'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TEMPLATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('template'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TABINDEX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('tabindex'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  READONLY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('readonly'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SELECTED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('selected'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROWLINES = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rowlines'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SEAMLESS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('seamless'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROWALIGN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rowalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STRETCHY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stretchy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REQUIRED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('required'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XML_BASE = $AttributeName_0(new AttributeName, XML_NS, COLONIFIED_LOCAL('xml:base', 'base'), XML_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  XML_LANG = $AttributeName_0(new AttributeName, XML_NS, COLONIFIED_LOCAL('xml:lang', 'lang'), XML_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  X_HEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('x-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_OWNS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-owns'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  AUTOFOCUS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('autofocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_SORT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-sort'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACCESSKEY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accesskey'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_BUSY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-busy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_GRAB = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-grab'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  AMPLITUDE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('amplitude'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_LIVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-live'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLIP_RULE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('clip-rule'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLIP_PATH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('clip-path'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  EQUALROWS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('equalrows'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ELEVATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('elevation'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DIRECTION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('direction'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DRAGGABLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('draggable'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FILTERRES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('filterres', 'filterRes'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FILL_RULE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fill-rule'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONTSTYLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fontstyle'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_SIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-size'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  KEYPOINTS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('keypoints', 'keyPoints'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HIDEFOCUS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('hidefocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMESSAGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmessage'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  INTERCEPT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('intercept'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAGEND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondragend'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOVEEND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmoveend'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONINVALID = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oninvalid'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONKEYDOWN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onkeydown'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFOCUSIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onfocusin'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEUP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmouseup'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  INPUTMODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('inputmode'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONROWEXIT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onrowexit'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MATHCOLOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mathcolor'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MASKUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('maskunits', 'maskUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MAXLENGTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('maxlength'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LINEBREAK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('linebreak'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LOOPSTART = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('loopstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TRANSFORM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('transform'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  V_HANGING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('v-hanging'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VALUETYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('valuetype'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  POINTSATZ = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('pointsatz', 'pointsAtZ'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  POINTSATX = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('pointsatx', 'pointsAtX'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  POINTSATY = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('pointsaty', 'pointsAtY'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PLAYCOUNT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('playcount'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SYMMETRIC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('symmetric'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCROLLING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scrolling'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEATDUR = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('repeatdur', 'repeatDur'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SELECTION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('selection'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SEPARATOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('separator'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XML_SPACE = $AttributeName_0(new AttributeName, XML_NS, COLONIFIED_LOCAL('xml:space', 'space'), XML_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  AUTOSUBMIT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('autosubmit'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALPHABETIC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('alphabetic'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACTIONTYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('actiontype'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACCUMULATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accumulate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_LEVEL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-level'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLUMNSPAN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('columnspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CAP_HEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cap-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BACKGROUND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('background'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GLYPH_NAME = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('glyph-name'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GROUPALIGN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('groupalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONTFAMILY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fontfamily'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONTWEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fontweight'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_STYLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-style'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  KEYSPLINES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('keysplines', 'keySplines'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HTTP_EQUIV = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('http-equiv'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONACTIVATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OCCURRENCE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('occurrence'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  IRRELEVANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('irrelevant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDBLCLICK = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondblclick'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAGDROP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondragdrop'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONKEYPRESS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onkeypress'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONROWENTER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onrowenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAGOVER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondragover'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFOCUSOUT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onfocusout'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEOUT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmouseout'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  NUMOCTAVES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('numoctaves', 'numOctaves'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARKER_MID = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('marker-mid'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARKER_END = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('marker-end'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TEXTLENGTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('textlength', 'textLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VISIBILITY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('visibility'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VIEWTARGET = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('viewtarget', 'viewTarget'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERT_ADV_Y = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('vert-adv-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PATHLENGTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('pathlength', 'pathLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEAT_MAX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('repeat-max'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RADIOGROUP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('radiogroup'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STOP_COLOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stop-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SEPARATORS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('separators'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEAT_MIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('repeat-min'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ROWSPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rowspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ZOOMANDPAN = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('zoomandpan', 'zoomAndPan'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XLINK_TYPE = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:type', 'type'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  XLINK_ROLE = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:role', 'role'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  XLINK_HREF = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:href', 'href'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  XLINK_SHOW = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:show', 'show'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+
+	$clinit_124_2();
+}
+function $clinit_124_2(){
+  $clinit_124_2 = nullMethod;
+  ACCENTUNDER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accentunder'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_SECRET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-secret'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_ATOMIC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-atomic'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_HIDDEN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-hidden'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_FLOWTO = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-flowto'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARABIC_FORM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('arabic-form'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CELLPADDING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cellpadding'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CELLSPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('cellspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLUMNWIDTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('columnwidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLUMNALIGN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('columnalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLUMNLINES = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('columnlines'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CONTEXTMENU = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('contextmenu'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BASEPROFILE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('baseprofile', 'baseProfile'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_FAMILY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-family'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FRAMEBORDER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('frameborder'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FILTERUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('filterunits', 'filterUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FLOOD_COLOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('flood-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_WEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-weight'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HORIZ_ADV_X = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('horiz-adv-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAGLEAVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondragleave'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEMOVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmousemove'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ORIENTATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('orientation'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEDOWN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmousedown'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEOVER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmouseover'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAGENTER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondragenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  IDEOGRAPHIC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ideographic'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFORECUT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforecut'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFORMINPUT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onforminput'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDRAGSTART = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondragstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOVESTART = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmovestart'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARKERUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('markerunits', 'markerUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MATHVARIANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mathvariant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARGINWIDTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('marginwidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARKERWIDTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('markerwidth', 'markerWidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TEXT_ANCHOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('text-anchor'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TABLEVALUES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('tablevalues', 'tableValues'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCRIPTLEVEL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scriptlevel'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEATCOUNT = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('repeatcount', 'repeatCount'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STITCHTILES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('stitchtiles', 'stitchTiles'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STARTOFFSET = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('startoffset', 'startOffset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCROLLDELAY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scrolldelay'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XMLNS_XLINK = $AttributeName_0(new AttributeName, XMLNS_NS, COLONIFIED_LOCAL('xmlns:xlink', 'xlink'), XMLNS_PREFIX, initValues(_3Z_classLit, 45, -1, [false, false, false, false]), true);
+  XLINK_TITLE = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:title', 'title'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  ARIA_INVALID = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-invalid'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_PRESSED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-pressed'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_CHECKED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-checked'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  AUTOCOMPLETE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('autocomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_SETSIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-setsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_CHANNEL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-channel'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  EQUALCOLUMNS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('equalcolumns'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DISPLAYSTYLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('displaystyle'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DATAFORMATAS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('dataformatas'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FILL_OPACITY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('fill-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_VARIANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-variant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_STRETCH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-stretch'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FRAMESPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('framespacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  KERNELMATRIX = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('kernelmatrix', 'kernelMatrix'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDEACTIVATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONROWSDELETE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onrowsdelete'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSELEAVE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmouseleave'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFORMCHANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onformchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCELLCHANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oncellchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEWHEEL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmousewheel'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONMOUSEENTER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onmouseenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONAFTERPRINT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onafterprint'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFORECOPY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforecopy'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARGINHEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('marginheight'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARKERHEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('markerheight', 'markerHeight'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MARKER_START = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('marker-start'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MATHEMATICAL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mathematical'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LENGTHADJUST = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('lengthadjust', 'lengthAdjust'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNSELECTABLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('unselectable'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNICODE_BIDI = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('unicode-bidi'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNITS_PER_EM = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('units-per-em'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  WORD_SPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('word-spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  WRITING_MODE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('writing-mode'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  V_ALPHABETIC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('v-alphabetic'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PATTERNUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('patternunits', 'patternUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPREADMETHOD = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('spreadmethod', 'spreadMethod'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SURFACESCALE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('surfacescale', 'surfaceScale'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_WIDTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-width'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEAT_START = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('repeat-start'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STDDEVIATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('stddeviation', 'stdDeviation'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STOP_OPACITY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stop-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_CONTROLS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-controls'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_HASPOPUP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-haspopup'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ACCENT_HEIGHT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accent-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_VALUENOW = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-valuenow'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_RELEVANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-relevant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_POSINSET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-posinset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_VALUEMAX = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-valuemax'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_READONLY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-readonly'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_SELECTED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-selected'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_REQUIRED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-required'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_EXPANDED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-expanded'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_DISABLED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-disabled'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ATTRIBUTETYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('attributetype', 'attributeType'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ATTRIBUTENAME = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('attributename', 'attributeName'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_DATATYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-datatype'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_VALUEMIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-valuemin'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BASEFREQUENCY = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('basefrequency', 'baseFrequency'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLUMNSPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('columnspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLOR_PROFILE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('color-profile'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CLIPPATHUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('clippathunits', 'clipPathUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DEFINITIONURL = $AttributeName_0(new AttributeName, ALL_NO_NS, (arr_471 = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 4, 0) , arr_471[0] = 'definitionurl' , arr_471[1] = 'definitionURL' , arr_471[2] = 'definitionurl' , arr_471[3] = 'definitionurl' , arr_471), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GRADIENTUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('gradientunits', 'gradientUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FLOOD_OPACITY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('flood-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONAFTERUPDATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onafterupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONERRORUPDATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onerrorupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFOREPASTE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforepaste'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONLOSECAPTURE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onlosecapture'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCONTEXTMENU = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oncontextmenu'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONSELECTSTART = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onselectstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFOREPRINT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforeprint'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MOVABLELIMITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('movablelimits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LINETHICKNESS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('linethickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNICODE_RANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('unicode-range'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  THINMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('thinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERT_ORIGIN_X = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('vert-origin-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERT_ORIGIN_Y = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('vert-origin-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  V_IDEOGRAPHIC = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('v-ideographic'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PRESERVEALPHA = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('preservealpha', 'preserveAlpha'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCRIPTMINSIZE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scriptminsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPECIFICATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('specification'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XLINK_ACTUATE = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:actuate', 'actuate'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  XLINK_ARCROLE = $AttributeName_0(new AttributeName, XLINK_NS, COLONIFIED_LOCAL('xlink:arcrole', 'arcrole'), XLINK_PREFIX, initValues(_3Z_classLit, 45, -1, [false, true, true, false]), false);
+  ACCEPT_CHARSET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('accept-charset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALIGNMENTSCOPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('alignmentscope'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_MULTILINE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-multiline'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  BASELINE_SHIFT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('baseline-shift'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HORIZ_ORIGIN_X = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('horiz-origin-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  HORIZ_ORIGIN_Y = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('horiz-origin-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFOREUPDATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforeupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONFILTERCHANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onfilterchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONROWSINSERTED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onrowsinserted'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFOREUNLOAD = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforeunload'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MATHBACKGROUND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mathbackground'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LETTER_SPACING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('letter-spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LIGHTING_COLOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('lighting-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  THICKMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('thickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TEXT_RENDERING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('text-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  V_MATHEMATICAL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('v-mathematical'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  POINTER_EVENTS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('pointer-events'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PRIMITIVEUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('primitiveunits', 'primitiveUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SYSTEMLANGUAGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('systemlanguage', 'systemLanguage'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_LINECAP = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-linecap'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SUBSCRIPTSHIFT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('subscriptshift'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_OPACITY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_DROPEFFECT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-dropeffect'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_LABELLEDBY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-labelledby'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_TEMPLATEID = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-templateid'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLOR_RENDERING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('color-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CONTENTEDITABLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('contenteditable'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DIFFUSECONSTANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('diffuseconstant', 'diffuseConstant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDATAAVAILABLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondataavailable'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONCONTROLSELECT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('oncontrolselect'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  IMAGE_RENDERING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('image-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MEDIUMMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('mediummathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  TEXT_DECORATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('text-decoration'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SHAPE_RENDERING = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('shape-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_LINEJOIN = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-linejoin'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REPEAT_TEMPLATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('repeat-template'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_DESCRIBEDBY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-describedby'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CONTENTSTYLETYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('contentstyletype', 'contentStyleType'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  FONT_SIZE_ADJUST = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('font-size-adjust'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  KERNELUNITLENGTH = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('kernelunitlength', 'kernelUnitLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFOREACTIVATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONPROPERTYCHANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onpropertychange'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDATASETCHANGED = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondatasetchanged'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  MASKCONTENTUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('maskcontentunits', 'maskContentUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PATTERNTRANSFORM = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('patterntransform', 'patternTransform'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REQUIREDFEATURES = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('requiredfeatures', 'requiredFeatures'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  RENDERING_INTENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('rendering-intent'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPECULAREXPONENT = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('specularexponent', 'specularExponent'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SPECULARCONSTANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('specularconstant', 'specularConstant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SUPERSCRIPTSHIFT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('superscriptshift'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_DASHARRAY = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-dasharray'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  XCHANNELSELECTOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('xchannelselector', 'xChannelSelector'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  YCHANNELSELECTOR = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('ychannelselector', 'yChannelSelector'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_AUTOCOMPLETE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-autocomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  CONTENTSCRIPTTYPE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('contentscripttype', 'contentScriptType'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ENABLE_BACKGROUND = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('enable-background'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  DOMINANT_BASELINE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('dominant-baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GRADIENTTRANSFORM = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('gradienttransform', 'gradientTransform'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFORDEACTIVATE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbefordeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONDATASETCOMPLETE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('ondatasetcomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OVERLINE_POSITION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('overline-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONBEFOREEDITFOCUS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onbeforeeditfocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  LIMITINGCONEANGLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('limitingconeangle', 'limitingConeAngle'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERYTHINMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('verythinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_DASHOFFSET = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-dashoffset'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STROKE_MITERLIMIT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('stroke-miterlimit'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ALIGNMENT_BASELINE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('alignment-baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ONREADYSTATECHANGE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('onreadystatechange'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  OVERLINE_THICKNESS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('overline-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNDERLINE_POSITION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('underline-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERYTHICKMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('verythickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  REQUIREDEXTENSIONS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('requiredextensions', 'requiredExtensions'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLOR_INTERPOLATION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('color-interpolation'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  UNDERLINE_THICKNESS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('underline-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PRESERVEASPECTRATIO = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('preserveaspectratio', 'preserveAspectRatio'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  PATTERNCONTENTUNITS = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('patterncontentunits', 'patternContentUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_MULTISELECTABLE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-multiselectable'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  SCRIPTSIZEMULTIPLIER = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('scriptsizemultiplier'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ARIA_ACTIVEDESCENDANT = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('aria-activedescendant'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERYVERYTHINMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('veryverythinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  VERYVERYTHICKMATHSPACE = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('veryverythickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STRIKETHROUGH_POSITION = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('strikethrough-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  STRIKETHROUGH_THICKNESS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('strikethrough-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  EXTERNALRESOURCESREQUIRED = $AttributeName_0(new AttributeName, ALL_NO_NS, SVG_DIFFERENT('externalresourcesrequired', 'externalResourcesRequired'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GLYPH_ORIENTATION_VERTICAL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('glyph-orientation-vertical'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  COLOR_INTERPOLATION_FILTERS = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('color-interpolation-filters'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  GLYPH_ORIENTATION_HORIZONTAL = $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL('glyph-orientation-horizontal'), ALL_NO_PREFIX, ALL_NCNAME, false);
+  ATTRIBUTE_NAMES = initValues(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 59, 13, [D, K, R, X, Y, Z, BY, CX, CY, DX, DY, G2, G1, FX, FY, K4, K2, K3, K1, ID, IN, U2, U1, RT, RX, RY, TO, Y2, Y1, X1, X2, ALT, DIR, DUR, END, FOR, IN2, MAX, MIN, LOW, REL, REV, SRC, AXIS, ABBR, BBOX, CITE, CODE, BIAS, COLS, CLIP, CHAR, BASE, EDGE, DATA, FILL, FROM, FORM, FACE, HIGH, HREF, OPEN, ICON, NAME, MODE, MASK, LINK, LANG, LIST, TYPE_1, WHEN, WRAP, TEXT, PATH, PING, REFX, REFY, SIZE, SEED, ROWS, SPAN, STEP, ROLE, XREF, ASYNC, ALINK, ALIGN, CLOSE, COLOR, CLASS, CLEAR, BEGIN, DEPTH, DEFER, FENCE, FRAME, ISMAP, ONEND, INDEX, ORDER, OTHER, ONCUT, NARGS, MEDIA, LABEL, LOCAL, WIDTH, TITLE, VLINK, VALUE, SLOPE, SHAPE, SCOPE, SCALE, SPEED, STYLE, RULES, STEMH, STEMV, START, XMLNS, ACCEPT, ACCENT, ASCENT, ACTIVE, ALTIMG, ACTION, BORDER, CURSOR, COORDS, FILTER, FORMAT, HIDDEN, HSPACE, HEIGHT, ONMOVE, ONLOAD, ONDRAG, ORIGIN, ONZOOM, ONHELP, ONSTOP, ONDROP, ONBLUR, OBJECT, OFFSET, ORIENT, ONCOPY, NOWRAP, NOHREF, MACROS, METHOD, LOWSRC, LSPACE, LQUOTE, USEMAP, WIDTHS, TARGET, VALUES, VALIGN, VSPACE, POSTER, POINTS, PROMPT, SCOPED, STRING, SCHEME, STROKE, RADIUS, RESULT, REPEAT, RSPACE, ROTATE, RQUOTE, ALTTEXT, ARCHIVE, AZIMUTH, CLOSURE, CHECKED, CLASSID, CHAROFF, BGCOLOR, COLSPAN, CHARSET, COMPACT, CONTENT, ENCTYPE, DATASRC, DATAFLD, DECLARE, DISPLAY, DIVISOR, DEFAULT, DESCENT, KERNING, HANGING, HEADERS, ONPASTE, ONCLICK, OPTIMUM, ONBEGIN, ONKEYUP, ONFOCUS, ONERROR, ONINPUT, ONABORT, ONSTART, ONRESET, OPACITY, NOSHADE, MINSIZE, MAXSIZE, LOOPEND, LARGEOP, UNICODE, TARGETX, TARGETY, VIEWBOX, VERSION, PATTERN, PROFILE, SPACING, RESTART, ROWSPAN, SANDBOX, SUMMARY, STANDBY, REPLACE, AUTOPLAY, ADDITIVE, CALCMODE, CODETYPE, CODEBASE, CONTROLS, BEVELLED, BASELINE, EXPONENT, EDGEMODE, ENCODING, GLYPHREF, DATETIME, DISABLED, FONTSIZE, KEYTIMES, PANOSE_1, HREFLANG, ONRESIZE, ONCHANGE, ONBOUNCE, ONUNLOAD, ONFINISH, ONSCROLL, OPERATOR, OVERFLOW, ONSUBMIT, ONREPEAT, ONSELECT, NOTATION, NORESIZE, MANIFEST, MATHSIZE, MULTIPLE, LONGDESC, LANGUAGE, TEMPLATE, TABINDEX, READONLY, SELECTED, ROWLINES, SEAMLESS, ROWALIGN, STRETCHY, REQUIRED, XML_BASE, XML_LANG, X_HEIGHT, ARIA_OWNS, AUTOFOCUS, ARIA_SORT, ACCESSKEY, ARIA_BUSY, ARIA_GRAB, AMPLITUDE, ARIA_LIVE, CLIP_RULE, CLIP_PATH, EQUALROWS, ELEVATION, DIRECTION, DRAGGABLE, FILTERRES, FILL_RULE, FONTSTYLE, FONT_SIZE, KEYPOINTS, HIDEFOCUS, ONMESSAGE, INTERCEPT, ONDRAGEND, ONMOVEEND, ONINVALID, ONKEYDOWN, ONFOCUSIN, ONMOUSEUP, INPUTMODE, ONROWEXIT, MATHCOLOR, MASKUNITS, MAXLENGTH, LINEBREAK, LOOPSTART, TRANSFORM, V_HANGING, VALUETYPE, POINTSATZ, POINTSATX, POINTSATY, PLAYCOUNT, SYMMETRIC, SCROLLING, REPEATDUR, SELECTION, SEPARATOR, XML_SPACE, AUTOSUBMIT, ALPHABETIC, ACTIONTYPE, ACCUMULATE, ARIA_LEVEL, COLUMNSPAN, CAP_HEIGHT, BACKGROUND, GLYPH_NAME, GROUPALIGN, FONTFAMILY, FONTWEIGHT, FONT_STYLE, KEYSPLINES, HTTP_EQUIV, ONACTIVATE, OCCURRENCE, IRRELEVANT, ONDBLCLICK, ONDRAGDROP, ONKEYPRESS, ONROWENTER, ONDRAGOVER, ONFOCUSOUT, ONMOUSEOUT, NUMOCTAVES, MARKER_MID, MARKER_END, TEXTLENGTH, VISIBILITY, VIEWTARGET, VERT_ADV_Y, PATHLENGTH, REPEAT_MAX, RADIOGROUP, STOP_COLOR, SEPARATORS, REPEAT_MIN, ROWSPACING, ZOOMANDPAN, XLINK_TYPE, XLINK_ROLE, XLINK_HREF, XLINK_SHOW, ACCENTUNDER, ARIA_SECRET, ARIA_ATOMIC, ARIA_HIDDEN, ARIA_FLOWTO, ARABIC_FORM, CELLPADDING, CELLSPACING, COLUMNWIDTH, COLUMNALIGN, COLUMNLINES, CONTEXTMENU, BASEPROFILE, FONT_FAMILY, FRAMEBORDER, FILTERUNITS, FLOOD_COLOR, FONT_WEIGHT, HORIZ_ADV_X, ONDRAGLEAVE, ONMOUSEMOVE, ORIENTATION, ONMOUSEDOWN, ONMOUSEOVER, ONDRAGENTER, IDEOGRAPHIC, ONBEFORECUT, ONFORMINPUT, ONDRAGSTART, ONMOVESTART, MARKERUNITS, MATHVARIANT, MARGINWIDTH, MARKERWIDTH, TEXT_ANCHOR, TABLEVALUES, SCRIPTLEVEL, REPEATCOUNT, STITCHTILES, STARTOFFSET, SCROLLDELAY, XMLNS_XLINK, XLINK_TITLE, ARIA_INVALID, ARIA_PRESSED, ARIA_CHECKED, AUTOCOMPLETE, ARIA_SETSIZE, ARIA_CHANNEL, EQUALCOLUMNS, DISPLAYSTYLE, DATAFORMATAS, FILL_OPACITY, FONT_VARIANT, FONT_STRETCH, FRAMESPACING, KERNELMATRIX, ONDEACTIVATE, ONROWSDELETE, ONMOUSELEAVE, ONFORMCHANGE, ONCELLCHANGE, ONMOUSEWHEEL, ONMOUSEENTER, ONAFTERPRINT, ONBEFORECOPY, MARGINHEIGHT, MARKERHEIGHT, MARKER_START, MATHEMATICAL, LENGTHADJUST, UNSELECTABLE, UNICODE_BIDI, UNITS_PER_EM, WORD_SPACING, WRITING_MODE, V_ALPHABETIC, PATTERNUNITS, SPREADMETHOD, SURFACESCALE, STROKE_WIDTH, REPEAT_START, STDDEVIATION, STOP_OPACITY, ARIA_CONTROLS, ARIA_HASPOPUP, ACCENT_HEIGHT, ARIA_VALUENOW, ARIA_RELEVANT, ARIA_POSINSET, ARIA_VALUEMAX, ARIA_READONLY, ARIA_SELECTED, ARIA_REQUIRED, ARIA_EXPANDED, ARIA_DISABLED, ATTRIBUTETYPE, ATTRIBUTENAME, ARIA_DATATYPE, ARIA_VALUEMIN, BASEFREQUENCY, COLUMNSPACING, COLOR_PROFILE, CLIPPATHUNITS, DEFINITIONURL, GRADIENTUNITS, FLOOD_OPACITY, ONAFTERUPDATE, ONERRORUPDATE, ONBEFOREPASTE, ONLOSECAPTURE, ONCONTEXTMENU, ONSELECTSTART, ONBEFOREPRINT, MOVABLELIMITS, LINETHICKNESS, UNICODE_RANGE, THINMATHSPACE, VERT_ORIGIN_X, VERT_ORIGIN_Y, V_IDEOGRAPHIC, PRESERVEALPHA, SCRIPTMINSIZE, SPECIFICATION, XLINK_ACTUATE, XLINK_ARCROLE, ACCEPT_CHARSET, ALIGNMENTSCOPE, ARIA_MULTILINE, BASELINE_SHIFT, HORIZ_ORIGIN_X, HORIZ_ORIGIN_Y, ONBEFOREUPDATE, ONFILTERCHANGE, ONROWSINSERTED, ONBEFOREUNLOAD, MATHBACKGROUND, LETTER_SPACING, LIGHTING_COLOR, THICKMATHSPACE, TEXT_RENDERING, V_MATHEMATICAL, POINTER_EVENTS, PRIMITIVEUNITS, SYSTEMLANGUAGE, STROKE_LINECAP, SUBSCRIPTSHIFT, STROKE_OPACITY, ARIA_DROPEFFECT, ARIA_LABELLEDBY, ARIA_TEMPLATEID, COLOR_RENDERING, CONTENTEDITABLE, DIFFUSECONSTANT, ONDATAAVAILABLE, ONCONTROLSELECT, IMAGE_RENDERING, MEDIUMMATHSPACE, TEXT_DECORATION, SHAPE_RENDERING, STROKE_LINEJOIN, REPEAT_TEMPLATE, ARIA_DESCRIBEDBY, CONTENTSTYLETYPE, FONT_SIZE_ADJUST, KERNELUNITLENGTH, ONBEFOREACTIVATE, ONPROPERTYCHANGE, ONDATASETCHANGED, MASKCONTENTUNITS, PATTERNTRANSFORM, REQUIREDFEATURES, RENDERING_INTENT, SPECULAREXPONENT, SPECULARCONSTANT, SUPERSCRIPTSHIFT, STROKE_DASHARRAY, XCHANNELSELECTOR, YCHANNELSELECTOR, ARIA_AUTOCOMPLETE, CONTENTSCRIPTTYPE, ENABLE_BACKGROUND, DOMINANT_BASELINE, GRADIENTTRANSFORM, ONBEFORDEACTIVATE, ONDATASETCOMPLETE, OVERLINE_POSITION, ONBEFOREEDITFOCUS, LIMITINGCONEANGLE, VERYTHINMATHSPACE, STROKE_DASHOFFSET, STROKE_MITERLIMIT, ALIGNMENT_BASELINE, ONREADYSTATECHANGE, OVERLINE_THICKNESS, UNDERLINE_POSITION, VERYTHICKMATHSPACE, REQUIREDEXTENSIONS, COLOR_INTERPOLATION, UNDERLINE_THICKNESS, PRESERVEASPECTRATIO, PATTERNCONTENTUNITS, ARIA_MULTISELECTABLE, SCRIPTSIZEMULTIPLIER, ARIA_ACTIVEDESCENDANT, VERYVERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, STRIKETHROUGH_POSITION, STRIKETHROUGH_THICKNESS, EXTERNALRESOURCESREQUIRED, GLYPH_ORIENTATION_VERTICAL, COLOR_INTERPOLATION_FILTERS, GLYPH_ORIENTATION_HORIZONTAL]);
+  ATTRIBUTE_HASHES = initValues(_3I_classLit, 48, -1, [1153, 1383, 1601, 1793, 1827, 1857, 68600, 69146, 69177, 70237, 70270, 71572, 71669, 72415, 72444, 74846, 74904, 74943, 75001, 75276, 75590, 84742, 84839, 85575, 85963, 85992, 87204, 88074, 88171, 89130, 89163, 3207892, 3283895, 3284791, 3338752, 3358197, 3369562, 3539124, 3562402, 3574260, 3670335, 3696933, 3721879, 135280021, 135346322, 136317019, 136475749, 136548517, 136652214, 136884919, 136902418, 136942992, 137292068, 139120259, 139785574, 142250603, 142314056, 142331176, 142519584, 144752417, 145106895, 146147200, 146765926, 148805544, 149655723, 149809441, 150018784, 150445028, 150923321, 152528754, 152536216, 152647366, 152962785, 155219321, 155654904, 157317483, 157350248, 157437941, 157447478, 157604838, 157685404, 157894402, 158315188, 166078431, 169409980, 169700259, 169856932, 170007032, 170409695, 170466488, 170513710, 170608367, 173028944, 173896963, 176090625, 176129212, 179390001, 179489057, 179627464, 179840468, 179849042, 180004216, 181779081, 183027151, 183645319, 183698797, 185922012, 185997252, 188312483, 188675799, 190977533, 190992569, 191006194, 191033518, 191038774, 191096249, 191166163, 191194426, 191522106, 191568039, 200104642, 202506661, 202537381, 202602917, 203070590, 203120766, 203389054, 203690071, 203971238, 203986524, 209040857, 209125756, 212055489, 212322418, 212746849, 213002877, 213055164, 213088023, 213259873, 213273386, 213435118, 213437318, 213438231, 213493071, 213532268, 213542834, 213584431, 213659891, 215285828, 215880731, 216112976, 216684637, 217369699, 217565298, 217576549, 218186795, 219743185, 220082234, 221623802, 221986406, 222283890, 223089542, 223138630, 223311265, 224547358, 224587256, 224589550, 224655650, 224785518, 224810917, 224813302, 225429618, 225432950, 225440869, 236107233, 236709921, 236838947, 237117095, 237143271, 237172455, 237209953, 237354143, 237372743, 237668065, 237703073, 237714273, 239743521, 240512803, 240522627, 240560417, 240656513, 241015715, 241062755, 241065383, 243523041, 245865199, 246261793, 246556195, 246774817, 246923491, 246928419, 246981667, 247014847, 247058369, 247112833, 247118177, 247119137, 247128739, 247316903, 249533729, 250235623, 250269543, 251083937, 251402351, 252339047, 253260911, 253293679, 254844367, 255547879, 256077281, 256345377, 258124199, 258354465, 258605063, 258744193, 258845603, 258856961, 258926689, 269869248, 270174334, 270709417, 270778994, 270781796, 271102503, 271478858, 271490090, 272870654, 273335275, 273369140, 273924313, 274108530, 274116736, 276818662, 277476156, 279156579, 279349675, 280108533, 280128712, 280132869, 280162403, 280280292, 280413430, 280506130, 280677397, 280678580, 280686710, 280689066, 282736758, 283110901, 283275116, 283823226, 283890012, 284479340, 284606461, 286700477, 286798916, 291557706, 291665349, 291804100, 292138018, 292166446, 292418738, 292451039, 300298041, 300374839, 300597935, 303073389, 303083839, 303266673, 303354997, 303430688, 303576261, 303724281, 303819694, 304242723, 304382625, 306247792, 307227811, 307468786, 307724489, 309671175, 310252031, 310358241, 310373094, 311015256, 313357609, 313683893, 313701861, 313706996, 313707317, 313710350, 314027746, 314038181, 314091299, 314205627, 314233813, 316741830, 316797986, 317486755, 317794164, 318721061, 320076137, 322657125, 322887778, 323506876, 323572412, 323605180, 323938869, 325060058, 325320188, 325398738, 325541490, 325671619, 333868843, 336806130, 337212108, 337282686, 337285434, 337585223, 338036037, 338298087, 338566051, 340943551, 341190970, 342995704, 343352124, 343912673, 344585053, 346977248, 347218098, 347262163, 347278576, 347438191, 347655959, 347684788, 347726430, 347727772, 347776035, 347776629, 349500753, 350880161, 350887073, 353384123, 355496998, 355906922, 355979793, 356545959, 358637867, 358905016, 359164318, 359247286, 359350571, 359579447, 365560330, 367399355, 367420285, 367510727, 368013212, 370234760, 370353345, 370710317, 371074566, 371122285, 371194213, 371448425, 371448430, 371545055, 371596922, 371758751, 371964792, 372151328, 376550136, 376710172, 376795771, 376826271, 376906556, 380514830, 380774774, 380775037, 381030322, 381136500, 381281631, 381282269, 381285504, 381330595, 381331422, 381335911, 381336484, 383907298, 383917408, 384595009, 384595013, 387799894, 387823201, 392581647, 392584937, 392742684, 392906485, 393003349, 400644707, 400973830, 404428547, 404432113, 404432865, 404469244, 404478897, 404694860, 406887479, 408294949, 408789955, 410022510, 410467324, 410586448, 410945965, 411845275, 414327152, 414327932, 414329781, 414346257, 414346439, 414639928, 414835998, 414894517, 414986533, 417465377, 417465381, 417492216, 418259232, 419310946, 420103495, 420242342, 420380455, 420658662, 420717432, 423183880, 424539259, 425929170, 425972964, 426050649, 426126450, 426142833, 426607922, 437289840, 437347469, 437412335, 437423943, 437455540, 437462252, 437597991, 437617485, 437986305, 437986507, 437986828, 437987072, 438015591, 438034813, 438038966, 438179623, 438347971, 438483573, 438547062, 438895551, 441592676, 442032555, 443548979, 447881379, 447881655, 447881895, 447887844, 448416189, 448445746, 448449012, 450942191, 452816744, 453668677, 454434495, 456610076, 456642844, 456738709, 457544600, 459451897, 459680944, 468058810, 468083581, 470964084, 471470955, 471567278, 472267822, 481177859, 481210627, 481435874, 481455115, 481485378, 481490218, 485105638, 486005878, 486383494, 487988916, 488103783, 490661867, 491574090, 491578272, 493041952, 493441205, 493582844, 493716979, 504577572, 504740359, 505091638, 505592418, 505656212, 509516275, 514998531, 515571132, 515594682, 518712698, 521362273, 526592419, 526807354, 527348842, 538294791, 539214049, 544689535, 545535009, 548544752, 548563346, 548595116, 551679010, 558034099, 560329411, 560356209, 560671018, 560671152, 560692590, 560845442, 569212097, 569474241, 572252718, 572768481, 575326764, 576174758, 576190819, 582099184, 582099438, 582372519, 582558889, 586552164, 591325418, 594231990, 594243961, 605711268, 615672071, 616086845, 621792370, 624879850, 627432831, 640040548, 654392808, 658675477, 659420283, 672891587, 694768102, 705890982, 725543146, 759097578, 761686526, 795383908, 843809551, 878105336, 908643300, 945213471]);
+}
+
+function $AttributeName(this$static, uri, local, prefix, ncname, xmlns){
+  $clinit_124();
+  this$static.uri = uri;
+  this$static.local = local;
+  COMPUTE_QNAME(local, prefix);
+  this$static.ncname = ncname;
+  this$static.xmlns = xmlns;
+  return this$static;
+}
+
+function $AttributeName_0(this$static, uri, local, prefix, ncname, xmlns){
+  $clinit_124();
+  this$static.uri = uri;
+  this$static.local = local;
+  COMPUTE_QNAME(local, prefix);
+  this$static.ncname = ncname;
+  this$static.xmlns = xmlns;
+  return this$static;
+}
+
+function $isBoolean(this$static){
+  return this$static == ACTIVE || this$static == ASYNC || this$static == AUTOFOCUS || this$static == AUTOSUBMIT || this$static == CHECKED || this$static == COMPACT || this$static == DECLARE || this$static == DEFAULT || this$static == DEFER || this$static == DISABLED || this$static == ISMAP || this$static == MULTIPLE || this$static == NOHREF || this$static == NORESIZE || this$static == NOSHADE || this$static == NOWRAP || this$static == READONLY || this$static == REQUIRED || this$static == SELECTED;
+}
+
+function $isCaseFolded(this$static){
+  return this$static == ACTIVE || this$static == ALIGN || this$static == ASYNC || this$static == AUTOCOMPLETE || this$static == AUTOFOCUS || this$static == AUTOSUBMIT || this$static == CHECKED || this$static == CLEAR || this$static == COMPACT || this$static == DATAFORMATAS || this$static == DECLARE || this$static == DEFAULT || this$static == DEFER || this$static == DIR || this$static == DISABLED || this$static == ENCTYPE || this$static == FRAME || this$static == ISMAP || this$static == METHOD || this$static == MULTIPLE || this$static == NOHREF || this$static == NORESIZE || this$static == NOSHADE || this$static == NOWRAP || this$static == READONLY || this$static == REPLACE || this$static == REQUIRED || this$static == RULES || this$static == SCOPE || this$static == SCROLLING || this$static == SELECTED || this$static == SHAPE || this$static == STEP || this$static == TYPE_1 || this$static == VALIGN || this$static == VALUETYPE;
+}
+
+function COLONIFIED_LOCAL(name_0, suffix){
+  var arr;
+  arr = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 4, 0);
+  arr[0] = name_0;
+  arr[1] = suffix;
+  arr[2] = suffix;
+  arr[3] = name_0;
+  return arr;
+}
+
+function COMPUTE_QNAME(local, prefix){
+  var arr, i;
+  arr = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 4, 0);
+  for (i = 0; i < arr.length; ++i) {
+    prefix[i] == null?(arr[i] = local[i]):(arr[i] = String(prefix[i] + ':' + local[i]));
+  }
+  return arr;
+}
+
+function SAME_LOCAL(name_0){
+  var arr;
+  arr = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 4, 0);
+  arr[0] = name_0;
+  arr[1] = name_0;
+  arr[2] = name_0;
+  arr[3] = name_0;
+  return arr;
+}
+
+function SVG_DIFFERENT(name_0, camel){
+  var arr;
+  arr = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 4, 0);
+  arr[0] = name_0;
+  arr[1] = name_0;
+  arr[2] = camel;
+  arr[3] = name_0;
+  return arr;
+}
+
+function bufToHash(buf, len){
+  var hash, hash2, i, j;
+  hash2 = 0;
+  hash = len;
+  hash <<= 5;
+  hash += buf[0] - 96;
+  j = len;
+  for (i = 0; i < 4 && j > 0; ++i) {
+    --j;
+    hash <<= 5;
+    hash += buf[j] - 96;
+    hash2 <<= 6;
+    hash2 += buf[i] - 95;
+  }
+  return hash ^ hash2;
+}
+
+function createAttributeName(name_0, checkNcName){
+  var ncName, xmlns;
+  ncName = true;
+  xmlns = name_0.indexOf('xmlns:') == 0;
+  checkNcName && (xmlns?(ncName = false):(ncName = isNCName(name_0)));
+  return $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL(name_0), ALL_NO_PREFIX, ncName?ALL_NCNAME:ALL_NO_NCNAME, xmlns);
+}
+
+function getClass_67(){
+  return Lnu_validator_htmlparser_impl_AttributeName_2_classLit;
+}
+
+function nameByBuffer(buf, offset, length_0, checkNcName){
+  var end, end_0;
+  $clinit_124();
+  var attributeName, hash, index, name_0;
+  hash = bufToHash(buf, length_0);
+  index = binarySearch(ATTRIBUTE_HASHES, hash);
+  if (index < 0) {
+    return createAttributeName(String((end = offset + length_0 , __checkBounds(buf.length, offset, end) , __valueOf(buf, offset, end))), checkNcName);
+  }
+   else {
+    attributeName = ATTRIBUTE_NAMES[index];
+    name_0 = attributeName.local[0];
+    if (!localEqualsBuffer(name_0, buf, offset, length_0)) {
+      return createAttributeName(String((end_0 = offset + length_0 , __checkBounds(buf.length, offset, end_0) , __valueOf(buf, offset, end_0))), checkNcName);
+    }
+    return attributeName;
+  }
+}
+
+function AttributeName(){
+}
+
+_ = AttributeName.prototype = new Object_0;
+_.getClass$ = getClass_67;
+_.typeId$ = 39;
+_.local = null;
+_.ncname = null;
+_.uri = null;
+_.xmlns = false;
+var ABBR, ACCENT, ACCENTUNDER, ACCENT_HEIGHT, ACCEPT, ACCEPT_CHARSET, ACCESSKEY, ACCUMULATE, ACTION, ACTIONTYPE, ACTIVE, ADDITIVE, ALIGN, ALIGNMENTSCOPE, ALIGNMENT_BASELINE, ALINK, ALL_NCNAME, ALL_NO_NCNAME, ALL_NO_NS, ALL_NO_PREFIX, ALPHABETIC, ALT, ALTIMG, ALTTEXT, AMPLITUDE, ARABIC_FORM, ARCHIVE, ARIA_ACTIVEDESCENDANT, ARIA_ATOMIC, ARIA_AUTOCOMPLETE, ARIA_BUSY, ARIA_CHANNEL, ARIA_CHECKED, ARIA_CONTROLS, ARIA_DATATYPE, ARIA_DESCRIBEDBY, ARIA_DISABLED, ARIA_DROPEFFECT, ARIA_EXPANDED, ARIA_FLOWTO, ARIA_GRAB, ARIA_HASPOPUP, ARIA_HIDDEN, ARIA_INVALID, ARIA_LABELLEDBY, ARIA_LEVEL, ARIA_LIVE, ARIA_MULTILINE, ARIA_MULTISELECTABLE, ARIA_OWNS, ARIA_POSINSET, ARIA_PRESSED, ARIA_READONLY, ARIA_RELEVANT, ARIA_REQUIRED, ARIA_SECRET, ARIA_SELECTED, ARIA_SETSIZE, ARIA_SORT, ARIA_TEMPLATEID, ARIA_VALUEMAX, ARIA_VALUEMIN, ARIA_VALUENOW, ASCENT, ASYNC, ATTRIBUTENAME, ATTRIBUTETYPE, ATTRIBUTE_HASHES, ATTRIBUTE_NAMES, AUTOCOMPLETE, AUTOFOCUS, AUTOPLAY, AUTOSUBMIT, AXIS, AZIMUTH, BACKGROUND, BASE, BASEFREQUENCY, BASELINE, BASELINE_SHIFT, BASEPROFILE, BBOX, BEGIN, BEVELLED, BGCOLOR, BIAS, BORDER, BY, CALCMODE, CAP_HEIGHT, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CITE, CLASS, CLASSID, CLEAR, CLIP, CLIPPATHUNITS, CLIP_PATH, CLIP_RULE, CLOSE, CLOSURE, CODE, CODEBASE, CODETYPE, COLOR, COLOR_INTERPOLATION, COLOR_INTERPOLATION_FILTERS, COLOR_PROFILE, COLOR_RENDERING, COLS, COLSPAN, COLUMNALIGN, COLUMNLINES, COLUMNSPACING, COLUMNSPAN, COLUMNWIDTH, COMPACT, CONTENT, CONTENTEDITABLE, CONTENTSCRIPTTYPE, CONTENTSTYLETYPE, CONTEXTMENU, CONTROLS, COORDS, CURSOR, CX, CY, D, DATA, DATAFLD, DATAFORMATAS, DATASRC, DATETIME, DECLARE, DEFAULT, DEFER, DEFINITIONURL, DEPTH, DESCENT, DIFFUSECONSTANT, DIR, DIRECTION, DISABLED, DISPLAY, DISPLAYSTYLE, DIVISOR, DOMINANT_BASELINE, DRAGGABLE, DUR, DX, DY, EDGE, EDGEMODE, ELEVATION, ENABLE_BACKGROUND, ENCODING, ENCTYPE, END, EQUALCOLUMNS, EQUALROWS, EXPONENT, EXTERNALRESOURCESREQUIRED, FACE, FENCE, FILL, FILL_OPACITY, FILL_RULE, FILTER, FILTERRES, FILTERUNITS, FLOOD_COLOR, FLOOD_OPACITY, FONTFAMILY, FONTSIZE, FONTSTYLE, FONTWEIGHT, FONT_FAMILY, FONT_SIZE, FONT_SIZE_ADJUST, FONT_STRETCH, FONT_STYLE, FONT_VARIANT, FONT_WEIGHT, FOR, FORM, FORMAT, FRAME, FRAMEBORDER, FRAMESPACING, FROM, FX, FY, G1, G2, GLYPHREF, GLYPH_NAME, GLYPH_ORIENTATION_HORIZONTAL, GLYPH_ORIENTATION_VERTICAL, GRADIENTTRANSFORM, GRADIENTUNITS, GROUPALIGN, HANGING, HEADERS, HEIGHT, HIDDEN, HIDEFOCUS, HIGH, HORIZ_ADV_X, HORIZ_ORIGIN_X, HORIZ_ORIGIN_Y, HREF, HREFLANG, HSPACE, HTTP_EQUIV, ICON, ID, IDEOGRAPHIC, IMAGE_RENDERING, IN, IN2, INDEX, INPUTMODE, INTERCEPT, IRRELEVANT, ISMAP, K, K1, K2, K3, K4, KERNELMATRIX, KERNELUNITLENGTH, KERNING, KEYPOINTS, KEYSPLINES, KEYTIMES, LABEL, LANG, LANGUAGE, LANG_NS, LANG_PREFIX, LARGEOP, LENGTHADJUST, LETTER_SPACING, LIGHTING_COLOR, LIMITINGCONEANGLE, LINEBREAK, LINETHICKNESS, LINK, LIST, LOCAL, LONGDESC, LOOPEND, LOOPSTART, LOW, LOWSRC, LQUOTE, LSPACE, MACROS, MANIFEST, MARGINHEIGHT, MARGINWIDTH, MARKERHEIGHT, MARKERUNITS, MARKERWIDTH, MARKER_END, MARKER_MID, MARKER_START, MASK, MASKCONTENTUNITS, MASKUNITS, MATHBACKGROUND, MATHCOLOR, MATHEMATICAL, MATHSIZE, MATHVARIANT, MAX, MAXLENGTH, MAXSIZE, MEDIA, MEDIUMMATHSPACE, METHOD, MIN, MINSIZE, MODE, MOVABLELIMITS, MULTIPLE, NAME, NARGS, NOHREF, NORESIZE, NOSHADE, NOTATION, NOWRAP, NUMOCTAVES, OBJECT, OCCURRENCE, OFFSET, ONABORT, ONACTIVATE, ONAFTERPRINT, ONAFTERUPDATE, ONBEFORDEACTIVATE, ONBEFOREACTIVATE, ONBEFORECOPY, ONBEFORECUT, ONBEFOREEDITFOCUS, ONBEFOREPASTE, ONBEFOREPRINT, ONBEFOREUNLOAD, ONBEFOREUPDATE, ONBEGIN, ONBLUR, ONBOUNCE, ONCELLCHANGE, ONCHANGE, ONCLICK, ONCONTEXTMENU, ONCONTROLSELECT, ONCOPY, ONCUT, ONDATAAVAILABLE, ONDATASETCHANGED, ONDATASETCOMPLETE, ONDBLCLICK, ONDEACTIVATE, ONDRAG, ONDRAGDROP, ONDRAGEND, ONDRAGENTER, ONDRAGLEAVE, ONDRAGOVER, ONDRAGSTART, ONDROP, ONEND, ONERROR, ONERRORUPDATE, ONFILTERCHANGE, ONFINISH, ONFOCUS, ONFOCUSIN, ONFOCUSOUT, ONFORMCHANGE, ONFORMINPUT, ONHELP, ONINPUT, ONINVALID, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONLOSECAPTURE, ONMESSAGE, ONMOUSEDOWN, ONMOUSEENTER, ONMOUSELEAVE, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONMOUSEWHEEL, ONMOVE, ONMOVEEND, ONMOVESTART, ONPASTE, ONPROPERTYCHANGE, ONREADYSTATECHANGE, ONREPEAT, ONRESET, ONRESIZE, ONROWENTER, ONROWEXIT, ONROWSDELETE, ONROWSINSERTED, ONSCROLL, ONSELECT, ONSELECTSTART, ONSTART, ONSTOP, ONSUBMIT, ONUNLOAD, ONZOOM, OPACITY, OPEN, OPERATOR, OPTIMUM, ORDER, ORIENT, ORIENTATION, ORIGIN, OTHER, OVERFLOW, OVERLINE_POSITION, OVERLINE_THICKNESS, PANOSE_1, PATH, PATHLENGTH, PATTERN, PATTERNCONTENTUNITS, PATTERNTRANSFORM, PATTERNUNITS, PING, PLAYCOUNT, POINTER_EVENTS, POINTS, POINTSATX, POINTSATY, POINTSATZ, POSTER, PRESERVEALPHA, PRESERVEASPECTRATIO, PRIMITIVEUNITS, PROFILE, PROMPT, R, RADIOGROUP, RADIUS, READONLY, REFX, REFY, REL, RENDERING_INTENT, REPEAT, REPEATCOUNT, REPEATDUR, REPEAT_MAX, REPEAT_MIN, REPEAT_START, REPEAT_TEMPLATE, REPLACE, REQUIRED, REQUIREDEXTENSIONS, REQUIREDFEATURES, RESTART, RESULT, REV, ROLE, ROTATE, ROWALIGN, ROWLINES, ROWS, ROWSPACING, ROWSPAN, RQUOTE, RSPACE, RT, RULES, RX, RY, SANDBOX, SCALE, SCHEME, SCOPE, SCOPED, SCRIPTLEVEL, SCRIPTMINSIZE, SCRIPTSIZEMULTIPLIER, SCROLLDELAY, SCROLLING, SEAMLESS, SEED, SELECTED, SELECTION, SEPARATOR, SEPARATORS, SHAPE, SHAPE_RENDERING, SIZE, SLOPE, SPACING, SPAN, SPECIFICATION, SPECULARCONSTANT, SPECULAREXPONENT, SPEED, SPREADMETHOD, SRC, STANDBY, START, STARTOFFSET, STDDEVIATION, STEMH, STEMV, STEP, STITCHTILES, STOP_COLOR, STOP_OPACITY, STRETCHY, STRIKETHROUGH_POSITION, STRIKETHROUGH_THICKNESS, STRING, STROKE, STROKE_DASHARRAY, STROKE_DASHOFFSET, STROKE_LINECAP, STROKE_LINEJOIN, STROKE_MITERLIMIT, STROKE_OPACITY, STROKE_WIDTH, STYLE, SUBSCRIPTSHIFT, SUMMARY, SUPERSCRIPTSHIFT, SURFACESCALE, SYMMETRIC, SYSTEMLANGUAGE, TABINDEX, TABLEVALUES, TARGET, TARGETX, TARGETY, TEMPLATE, TEXT, TEXTLENGTH, TEXT_ANCHOR, TEXT_DECORATION, TEXT_RENDERING, THICKMATHSPACE, THINMATHSPACE, TITLE, TO, TRANSFORM, TYPE_1, U1, U2, UNDERLINE_POSITION, UNDERLINE_THICKNESS, UNICODE, UNICODE_BIDI, UNICODE_RANGE, UNITS_PER_EM, UNSELECTABLE, USEMAP, VALIGN, VALUE, VALUES, VALUETYPE, VERSION, VERT_ADV_Y, VERT_ORIGIN_X, VERT_ORIGIN_Y, VERYTHICKMATHSPACE, VERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, VERYVERYTHINMATHSPACE, VIEWBOX, VIEWTARGET, VISIBILITY, VLINK, VSPACE, V_ALPHABETIC, V_HANGING, V_IDEOGRAPHIC, V_MATHEMATICAL, WHEN, WIDTH, WIDTHS, WORD_SPACING, WRAP, WRITING_MODE, X, X1, X2, XCHANNELSELECTOR, XLINK_ACTUATE, XLINK_ARCROLE, XLINK_HREF, XLINK_NS, XLINK_PREFIX, XLINK_ROLE, XLINK_SHOW, XLINK_TITLE, XLINK_TYPE, XMLNS, XMLNS_NS, XMLNS_PREFIX, XMLNS_XLINK, XML_BASE, XML_LANG, XML_NS, XML_PREFIX, XML_SPACE, XREF, X_HEIGHT, Y, Y1, Y2, YCHANNELSELECTOR, Z, ZOOMANDPAN;
+function $clinit_125(){
+  $clinit_125 = nullMethod;
+  $ElementName_0(new ElementName, null);
+  A = $ElementName(new ElementName, 'a', 'a', 1);
+  B = $ElementName(new ElementName, 'b', 'b', 45);
+  G = $ElementName(new ElementName, 'g', 'g', 0);
+  I = $ElementName(new ElementName, 'i', 'i', 45);
+  P = $ElementName(new ElementName, 'p', 'p', 536870941);
+  Q = $ElementName(new ElementName, 'q', 'q', 0);
+  S = $ElementName(new ElementName, 's', 's', 45);
+  U = $ElementName(new ElementName, 'u', 'u', 45);
+  BR = $ElementName(new ElementName, 'br', 'br', 536870916);
+  CI = $ElementName(new ElementName, 'ci', 'ci', 0);
+  CN = $ElementName(new ElementName, 'cn', 'cn', 0);
+  DD = $ElementName(new ElementName, 'dd', 'dd', 536870953);
+  DL = $ElementName(new ElementName, 'dl', 'dl', 536870958);
+  DT = $ElementName(new ElementName, 'dt', 'dt', 536870953);
+  EM = $ElementName(new ElementName, 'em', 'em', 45);
+  EQ = $ElementName(new ElementName, 'eq', 'eq', 0);
+  FN = $ElementName(new ElementName, 'fn', 'fn', 0);
+  H1 = $ElementName(new ElementName, 'h1', 'h1', 536870954);
+  H2 = $ElementName(new ElementName, 'h2', 'h2', 536870954);
+  H3 = $ElementName(new ElementName, 'h3', 'h3', 536870954);
+  H4 = $ElementName(new ElementName, 'h4', 'h4', 536870954);
+  H5 = $ElementName(new ElementName, 'h5', 'h5', 536870954);
+  H6 = $ElementName(new ElementName, 'h6', 'h6', 536870954);
+  GT = $ElementName(new ElementName, 'gt', 'gt', 0);
+  HR = $ElementName(new ElementName, 'hr', 'hr', 536870934);
+  IN_0 = $ElementName(new ElementName, 'in', 'in', 0);
+  LI = $ElementName(new ElementName, 'li', 'li', 536870927);
+  LN = $ElementName(new ElementName, 'ln', 'ln', 0);
+  LT = $ElementName(new ElementName, 'lt', 'lt', 0);
+  MI = $ElementName(new ElementName, 'mi', 'mi', 33554489);
+  MN = $ElementName(new ElementName, 'mn', 'mn', 33554489);
+  MO = $ElementName(new ElementName, 'mo', 'mo', 33554489);
+  MS = $ElementName(new ElementName, 'ms', 'ms', 33554489);
+  OL = $ElementName(new ElementName, 'ol', 'ol', 536870958);
+  OR = $ElementName(new ElementName, 'or', 'or', 0);
+  PI = $ElementName(new ElementName, 'pi', 'pi', 0);
+  RP = $ElementName(new ElementName, 'rp', 'rp', 53);
+  RT_0 = $ElementName(new ElementName, 'rt', 'rt', 53);
+  TD = $ElementName(new ElementName, 'td', 'td', 671088680);
+  TH = $ElementName(new ElementName, 'th', 'th', 671088680);
+  TR = $ElementName(new ElementName, 'tr', 'tr', 805306405);
+  TT = $ElementName(new ElementName, 'tt', 'tt', 45);
+  UL = $ElementName(new ElementName, 'ul', 'ul', 536870958);
+  AND = $ElementName(new ElementName, 'and', 'and', 0);
+  ARG = $ElementName(new ElementName, 'arg', 'arg', 0);
+  ABS = $ElementName(new ElementName, 'abs', 'abs', 0);
+  BIG = $ElementName(new ElementName, 'big', 'big', 45);
+  BDO = $ElementName(new ElementName, 'bdo', 'bdo', 0);
+  CSC = $ElementName(new ElementName, 'csc', 'csc', 0);
+  COL = $ElementName(new ElementName, 'col', 'col', 536870919);
+  COS = $ElementName(new ElementName, 'cos', 'cos', 0);
+  COT = $ElementName(new ElementName, 'cot', 'cot', 0);
+  DEL = $ElementName(new ElementName, 'del', 'del', 0);
+  DFN = $ElementName(new ElementName, 'dfn', 'dfn', 0);
+  DIR_0 = $ElementName(new ElementName, 'dir', 'dir', 536870963);
+  DIV = $ElementName(new ElementName, 'div', 'div', 536870962);
+  EXP = $ElementName(new ElementName, 'exp', 'exp', 0);
+  GCD = $ElementName(new ElementName, 'gcd', 'gcd', 0);
+  GEQ = $ElementName(new ElementName, 'geq', 'geq', 0);
+  IMG = $ElementName(new ElementName, 'img', 'img', 536870960);
+  INS = $ElementName(new ElementName, 'ins', 'ins', 0);
+  INT = $ElementName(new ElementName, 'int', 'int', 0);
+  KBD = $ElementName(new ElementName, 'kbd', 'kbd', 0);
+  LOG = $ElementName(new ElementName, 'log', 'log', 0);
+  LCM = $ElementName(new ElementName, 'lcm', 'lcm', 0);
+  LEQ = $ElementName(new ElementName, 'leq', 'leq', 0);
+  MTD = $ElementName(new ElementName, 'mtd', 'mtd', 0);
+  MIN_0 = $ElementName(new ElementName, 'min', 'min', 0);
+  MAP = $ElementName(new ElementName, 'map', 'map', 0);
+  MTR = $ElementName(new ElementName, 'mtr', 'mtr', 0);
+  MAX_0 = $ElementName(new ElementName, 'max', 'max', 0);
+  NEQ = $ElementName(new ElementName, 'neq', 'neq', 0);
+  NOT = $ElementName(new ElementName, 'not', 'not', 0);
+  NAV = $ElementName(new ElementName, 'nav', 'nav', 536870963);
+  PRE = $ElementName(new ElementName, 'pre', 'pre', 536870956);
+  REM = $ElementName(new ElementName, 'rem', 'rem', 0);
+  SUB = $ElementName(new ElementName, 'sub', 'sub', 52);
+  SEC = $ElementName(new ElementName, 'sec', 'sec', 0);
+  SVG = $ElementName(new ElementName, 'svg', 'svg', 19);
+  SUM = $ElementName(new ElementName, 'sum', 'sum', 0);
+  SIN = $ElementName(new ElementName, 'sin', 'sin', 0);
+  SEP = $ElementName(new ElementName, 'sep', 'sep', 0);
+  SUP = $ElementName(new ElementName, 'sup', 'sup', 52);
+  SET = $ElementName(new ElementName, 'set', 'set', 0);
+  TAN = $ElementName(new ElementName, 'tan', 'tan', 0);
+  USE = $ElementName(new ElementName, 'use', 'use', 0);
+  VAR = $ElementName(new ElementName, 'var', 'var', 52);
+  WBR = $ElementName(new ElementName, 'wbr', 'wbr', 536870961);
+  XMP = $ElementName(new ElementName, 'xmp', 'xmp', 38);
+  XOR = $ElementName(new ElementName, 'xor', 'xor', 0);
+  AREA = $ElementName(new ElementName, 'area', 'area', 536870961);
+  ABBR_0 = $ElementName(new ElementName, 'abbr', 'abbr', 0);
+  BASE_0 = $ElementName(new ElementName, 'base', 'base', 536870914);
+  BVAR = $ElementName(new ElementName, 'bvar', 'bvar', 0);
+  BODY = $ElementName(new ElementName, 'body', 'body', 536870915);
+  CARD = $ElementName(new ElementName, 'card', 'card', 0);
+  CODE_0 = $ElementName(new ElementName, 'code', 'code', 45);
+  CITE_0 = $ElementName(new ElementName, 'cite', 'cite', 0);
+  CSCH = $ElementName(new ElementName, 'csch', 'csch', 0);
+  COSH = $ElementName(new ElementName, 'cosh', 'cosh', 0);
+  COTH = $ElementName(new ElementName, 'coth', 'coth', 0);
+  CURL = $ElementName(new ElementName, 'curl', 'curl', 0);
+  DESC = $ElementName(new ElementName, 'desc', 'desc', 67108923);
+  DIFF = $ElementName(new ElementName, 'diff', 'diff', 0);
+  DEFS = $ElementName(new ElementName, 'defs', 'defs', 0);
+  FORM_0 = $ElementName(new ElementName, 'form', 'form', 536870921);
+  FONT = $ElementName(new ElementName, 'font', 'font', 64);
+  GRAD = $ElementName(new ElementName, 'grad', 'grad', 0);
+  HEAD = $ElementName(new ElementName, 'head', 'head', 536870932);
+  HTML_0 = $ElementName(new ElementName, 'html', 'html', 671088663);
+  LINE = $ElementName(new ElementName, 'line', 'line', 0);
+  LINK_0 = $ElementName(new ElementName, 'link', 'link', 536870928);
+  LIST_0 = $ElementName(new ElementName, 'list', 'list', 0);
+  META = $ElementName(new ElementName, 'meta', 'meta', 536870930);
+  MSUB = $ElementName(new ElementName, 'msub', 'msub', 0);
+  MODE_0 = $ElementName(new ElementName, 'mode', 'mode', 0);
+  MATH = $ElementName(new ElementName, 'math', 'math', 17);
+  MARK = $ElementName(new ElementName, 'mark', 'mark', 0);
+  MASK_0 = $ElementName(new ElementName, 'mask', 'mask', 0);
+  MEAN = $ElementName(new ElementName, 'mean', 'mean', 0);
+  MSUP = $ElementName(new ElementName, 'msup', 'msup', 0);
+  MENU = $ElementName(new ElementName, 'menu', 'menu', 536870962);
+  MROW = $ElementName(new ElementName, 'mrow', 'mrow', 0);
+  NONE = $ElementName(new ElementName, 'none', 'none', 0);
+  NOBR = $ElementName(new ElementName, 'nobr', 'nobr', 24);
+  NEST = $ElementName(new ElementName, 'nest', 'nest', 0);
+  PATH_0 = $ElementName(new ElementName, 'path', 'path', 0);
+  PLUS = $ElementName(new ElementName, 'plus', 'plus', 0);
+  RULE = $ElementName(new ElementName, 'rule', 'rule', 0);
+  REAL = $ElementName(new ElementName, 'real', 'real', 0);
+  RELN = $ElementName(new ElementName, 'reln', 'reln', 0);
+  RECT = $ElementName(new ElementName, 'rect', 'rect', 0);
+  ROOT = $ElementName(new ElementName, 'root', 'root', 0);
+  RUBY = $ElementName(new ElementName, 'ruby', 'ruby', 52);
+  SECH = $ElementName(new ElementName, 'sech', 'sech', 0);
+  SINH = $ElementName(new ElementName, 'sinh', 'sinh', 0);
+  SPAN_0 = $ElementName(new ElementName, 'span', 'span', 52);
+  SAMP = $ElementName(new ElementName, 'samp', 'samp', 0);
+  STOP = $ElementName(new ElementName, 'stop', 'stop', 0);
+  SDEV = $ElementName(new ElementName, 'sdev', 'sdev', 0);
+  TIME = $ElementName(new ElementName, 'time', 'time', 0);
+  TRUE = $ElementName(new ElementName, 'true', 'true', 0);
+  TREF = $ElementName(new ElementName, 'tref', 'tref', 0);
+  TANH = $ElementName(new ElementName, 'tanh', 'tanh', 0);
+  TEXT_0 = $ElementName(new ElementName, 'text', 'text', 0);
+  VIEW = $ElementName(new ElementName, 'view', 'view', 0);
+  ASIDE = $ElementName(new ElementName, 'aside', 'aside', 536870963);
+  AUDIO = $ElementName(new ElementName, 'audio', 'audio', 0);
+  APPLY = $ElementName(new ElementName, 'apply', 'apply', 0);
+  EMBED = $ElementName(new ElementName, 'embed', 'embed', 536870960);
+  FRAME_0 = $ElementName(new ElementName, 'frame', 'frame', 536870922);
+  FALSE = $ElementName(new ElementName, 'false', 'false', 0);
+  FLOOR = $ElementName(new ElementName, 'floor', 'floor', 0);
+  GLYPH = $ElementName(new ElementName, 'glyph', 'glyph', 0);
+  HKERN = $ElementName(new ElementName, 'hkern', 'hkern', 0);
+  IMAGE = $ElementName(new ElementName, 'image', 'image', 536870924);
+  IDENT = $ElementName(new ElementName, 'ident', 'ident', 0);
+  INPUT = $ElementName(new ElementName, 'input', 'input', 536870925);
+  LABEL_0 = $ElementName(new ElementName, 'label', 'label', 62);
+  LIMIT = $ElementName(new ElementName, 'limit', 'limit', 0);
+  MFRAC = $ElementName(new ElementName, 'mfrac', 'mfrac', 0);
+  MPATH = $ElementName(new ElementName, 'mpath', 'mpath', 0);
+  METER = $ElementName(new ElementName, 'meter', 'meter', 0);
+  MOVER = $ElementName(new ElementName, 'mover', 'mover', 0);
+  MINUS = $ElementName(new ElementName, 'minus', 'minus', 0);
+  MROOT = $ElementName(new ElementName, 'mroot', 'mroot', 0);
+  MSQRT = $ElementName(new ElementName, 'msqrt', 'msqrt', 0);
+  MTEXT = $ElementName(new ElementName, 'mtext', 'mtext', 33554489);
+  NOTIN = $ElementName(new ElementName, 'notin', 'notin', 0);
+  PIECE = $ElementName(new ElementName, 'piece', 'piece', 0);
+  PARAM = $ElementName(new ElementName, 'param', 'param', 536870967);
+  POWER = $ElementName(new ElementName, 'power', 'power', 0);
+  REALS = $ElementName(new ElementName, 'reals', 'reals', 0);
+  STYLE_0 = $ElementName(new ElementName, 'style', 'style', 536870945);
+  SMALL = $ElementName(new ElementName, 'small', 'small', 45);
+  THEAD = $ElementName(new ElementName, 'thead', 'thead', 805306407);
+  TABLE = $ElementName(new ElementName, 'table', 'table', 939524130);
+  TITLE_0 = $ElementName(new ElementName, 'title', 'title', 603979812);
+  TSPAN = $ElementName(new ElementName, 'tspan', 'tspan', 0);
+  TIMES = $ElementName(new ElementName, 'times', 'times', 0);
+  TFOOT = $ElementName(new ElementName, 'tfoot', 'tfoot', 805306407);
+  TBODY = $ElementName(new ElementName, 'tbody', 'tbody', 805306407);
+  UNION = $ElementName(new ElementName, 'union', 'union', 0);
+  VKERN = $ElementName(new ElementName, 'vkern', 'vkern', 0);
+  VIDEO = $ElementName(new ElementName, 'video', 'video', 0);
+  ARCSEC = $ElementName(new ElementName, 'arcsec', 'arcsec', 0);
+  ARCCSC = $ElementName(new ElementName, 'arccsc', 'arccsc', 0);
+  ARCTAN = $ElementName(new ElementName, 'arctan', 'arctan', 0);
+  ARCSIN = $ElementName(new ElementName, 'arcsin', 'arcsin', 0);
+  ARCCOS = $ElementName(new ElementName, 'arccos', 'arccos', 0);
+  APPLET = $ElementName(new ElementName, 'applet', 'applet', 671088683);
+  ARCCOT = $ElementName(new ElementName, 'arccot', 'arccot', 0);
+  APPROX = $ElementName(new ElementName, 'approx', 'approx', 0);
+  BUTTON = $ElementName(new ElementName, 'button', 'button', 536870917);
+  CIRCLE = $ElementName(new ElementName, 'circle', 'circle', 0);
+  CENTER = $ElementName(new ElementName, 'center', 'center', 536870962);
+  CURSOR_0 = $ElementName(new ElementName, 'cursor', 'cursor', 0);
+  CANVAS = $ElementName(new ElementName, 'canvas', 'canvas', 0);
+  DIVIDE = $ElementName(new ElementName, 'divide', 'divide', 0);
+  DEGREE = $ElementName(new ElementName, 'degree', 'degree', 0);
+  DOMAIN = $ElementName(new ElementName, 'domain', 'domain', 0);
+  EXISTS = $ElementName(new ElementName, 'exists', 'exists', 0);
+  FETILE = $ElementName(new ElementName, 'fetile', 'feTile', 0);
+  FIGURE = $ElementName(new ElementName, 'figure', 'figure', 536870963);
+  FORALL = $ElementName(new ElementName, 'forall', 'forall', 0);
+  FILTER_0 = $ElementName(new ElementName, 'filter', 'filter', 0);
+  FOOTER = $ElementName(new ElementName, 'footer', 'footer', 536870963);
+  HGROUP = $ElementName(new ElementName, 'hgroup', 'hgroup', 536870963);
+  HEADER = $ElementName(new ElementName, 'header', 'header', 536870963);
+  IFRAME = $ElementName(new ElementName, 'iframe', 'iframe', 536870959);
+  KEYGEN = $ElementName(new ElementName, 'keygen', 'keygen', 536870977);
+  LAMBDA = $ElementName(new ElementName, 'lambda', 'lambda', 0);
+  LEGEND = $ElementName(new ElementName, 'legend', 'legend', 0);
+  MSPACE = $ElementName(new ElementName, 'mspace', 'mspace', 0);
+  MTABLE = $ElementName(new ElementName, 'mtable', 'mtable', 0);
+  MSTYLE = $ElementName(new ElementName, 'mstyle', 'mstyle', 0);
+  MGLYPH = $ElementName(new ElementName, 'mglyph', 'mglyph', 56);
+  MEDIAN = $ElementName(new ElementName, 'median', 'median', 0);
+  MUNDER = $ElementName(new ElementName, 'munder', 'munder', 0);
+  MARKER = $ElementName(new ElementName, 'marker', 'marker', 0);
+  MERROR = $ElementName(new ElementName, 'merror', 'merror', 0);
+  MOMENT = $ElementName(new ElementName, 'moment', 'moment', 0);
+  MATRIX = $ElementName(new ElementName, 'matrix', 'matrix', 0);
+  OPTION = $ElementName(new ElementName, 'option', 'option', 28);
+  OBJECT_0 = $ElementName(new ElementName, 'object', 'object', 671088703);
+  OUTPUT = $ElementName(new ElementName, 'output', 'output', 62);
+  PRIMES = $ElementName(new ElementName, 'primes', 'primes', 0);
+  SOURCE = $ElementName(new ElementName, 'source', 'source', 55);
+  STRIKE = $ElementName(new ElementName, 'strike', 'strike', 45);
+  STRONG = $ElementName(new ElementName, 'strong', 'strong', 45);
+  SWITCH = $ElementName(new ElementName, 'switch', 'switch', 0);
+  SYMBOL = $ElementName(new ElementName, 'symbol', 'symbol', 0);
+  SELECT = $ElementName(new ElementName, 'select', 'select', 536870944);
+  SUBSET = $ElementName(new ElementName, 'subset', 'subset', 0);
+  SCRIPT = $ElementName(new ElementName, 'script', 'script', 536870943);
+  TBREAK = $ElementName(new ElementName, 'tbreak', 'tbreak', 0);
+  VECTOR = $ElementName(new ElementName, 'vector', 'vector', 0);
+  ARTICLE = $ElementName(new ElementName, 'article', 'article', 536870963);
+  ANIMATE = $ElementName(new ElementName, 'animate', 'animate', 0);
+  ARCSECH = $ElementName(new ElementName, 'arcsech', 'arcsech', 0);
+  ARCCSCH = $ElementName(new ElementName, 'arccsch', 'arccsch', 0);
+  ARCTANH = $ElementName(new ElementName, 'arctanh', 'arctanh', 0);
+  ARCSINH = $ElementName(new ElementName, 'arcsinh', 'arcsinh', 0);
+  ARCCOSH = $ElementName(new ElementName, 'arccosh', 'arccosh', 0);
+  ARCCOTH = $ElementName(new ElementName, 'arccoth', 'arccoth', 0);
+  ACRONYM = $ElementName(new ElementName, 'acronym', 'acronym', 0);
+  ADDRESS = $ElementName(new ElementName, 'address', 'address', 536870963);
+  BGSOUND = $ElementName(new ElementName, 'bgsound', 'bgsound', 536870928);
+  COMMAND = $ElementName(new ElementName, 'command', 'command', 536870966);
+  COMPOSE = $ElementName(new ElementName, 'compose', 'compose', 0);
+  CEILING = $ElementName(new ElementName, 'ceiling', 'ceiling', 0);
+  CSYMBOL = $ElementName(new ElementName, 'csymbol', 'csymbol', 0);
+  CAPTION = $ElementName(new ElementName, 'caption', 'caption', 671088646);
+  DISCARD = $ElementName(new ElementName, 'discard', 'discard', 0);
+  DECLARE_0 = $ElementName(new ElementName, 'declare', 'declare', 0);
+  DETAILS = $ElementName(new ElementName, 'details', 'details', 536870963);
+  ELLIPSE = $ElementName(new ElementName, 'ellipse', 'ellipse', 0);
+  FEFUNCA = $ElementName(new ElementName, 'fefunca', 'feFuncA', 0);
+  FEFUNCB = $ElementName(new ElementName, 'fefuncb', 'feFuncB', 0);
+  FEBLEND = $ElementName(new ElementName, 'feblend', 'feBlend', 0);
+  FEFLOOD = $ElementName(new ElementName, 'feflood', 'feFlood', 0);
+  FEIMAGE = $ElementName(new ElementName, 'feimage', 'feImage', 0);
+  FEMERGE = $ElementName(new ElementName, 'femerge', 'feMerge', 0);
+  FEFUNCG = $ElementName(new ElementName, 'fefuncg', 'feFuncG', 0);
+  FEFUNCR = $ElementName(new ElementName, 'fefuncr', 'feFuncR', 0);
+  HANDLER = $ElementName(new ElementName, 'handler', 'handler', 0);
+  INVERSE = $ElementName(new ElementName, 'inverse', 'inverse', 0);
+  IMPLIES = $ElementName(new ElementName, 'implies', 'implies', 0);
+  ISINDEX = $ElementName(new ElementName, 'isindex', 'isindex', 536870926);
+  LOGBASE = $ElementName(new ElementName, 'logbase', 'logbase', 0);
+  LISTING = $ElementName(new ElementName, 'listing', 'listing', 536870956);
+  MFENCED = $ElementName(new ElementName, 'mfenced', 'mfenced', 0);
+  MPADDED = $ElementName(new ElementName, 'mpadded', 'mpadded', 0);
+  MARQUEE = $ElementName(new ElementName, 'marquee', 'marquee', 671088683);
+  MACTION = $ElementName(new ElementName, 'maction', 'maction', 0);
+  MSUBSUP = $ElementName(new ElementName, 'msubsup', 'msubsup', 0);
+  NOEMBED = $ElementName(new ElementName, 'noembed', 'noembed', 536870972);
+  POLYGON = $ElementName(new ElementName, 'polygon', 'polygon', 0);
+  PATTERN_0 = $ElementName(new ElementName, 'pattern', 'pattern', 0);
+  PRODUCT = $ElementName(new ElementName, 'product', 'product', 0);
+  SETDIFF = $ElementName(new ElementName, 'setdiff', 'setdiff', 0);
+  SECTION = $ElementName(new ElementName, 'section', 'section', 536870963);
+  SUMMARY_0 = $ElementName(new ElementName, 'summary', 'summary', 536870963);
+  TENDSTO = $ElementName(new ElementName, 'tendsto', 'tendsto', 0);
+  UPLIMIT = $ElementName(new ElementName, 'uplimit', 'uplimit', 0);
+  ALTGLYPH = $ElementName(new ElementName, 'altglyph', 'altGlyph', 0);
+  BASEFONT = $ElementName(new ElementName, 'basefont', 'basefont', 536870928);
+  CLIPPATH = $ElementName(new ElementName, 'clippath', 'clipPath', 0);
+  CODOMAIN = $ElementName(new ElementName, 'codomain', 'codomain', 0);
+  COLGROUP = $ElementName(new ElementName, 'colgroup', 'colgroup', 536870920);
+  EMPTYSET = $ElementName(new ElementName, 'emptyset', 'emptyset', 0);
+  FACTOROF = $ElementName(new ElementName, 'factorof', 'factorof', 0);
+  FIELDSET = $ElementName(new ElementName, 'fieldset', 'fieldset', 536870973);
+  FRAMESET = $ElementName(new ElementName, 'frameset', 'frameset', 536870923);
+  FEOFFSET = $ElementName(new ElementName, 'feoffset', 'feOffset', 0);
+  GLYPHREF_0 = $ElementName(new ElementName, 'glyphref', 'glyphRef', 0);
+  INTERVAL = $ElementName(new ElementName, 'interval', 'interval', 0);
+  INTEGERS = $ElementName(new ElementName, 'integers', 'integers', 0);
+  INFINITY = $ElementName(new ElementName, 'infinity', 'infinity', 0);
+  LISTENER = $ElementName(new ElementName, 'listener', 'listener', 0);
+  LOWLIMIT = $ElementName(new ElementName, 'lowlimit', 'lowlimit', 0);
+  METADATA = $ElementName(new ElementName, 'metadata', 'metadata', 0);
+  MENCLOSE = $ElementName(new ElementName, 'menclose', 'menclose', 0);
+  MPHANTOM = $ElementName(new ElementName, 'mphantom', 'mphantom', 0);
+  NOFRAMES = $ElementName(new ElementName, 'noframes', 'noframes', 536870937);
+  NOSCRIPT = $ElementName(new ElementName, 'noscript', 'noscript', 536870938);
+  OPTGROUP = $ElementName(new ElementName, 'optgroup', 'optgroup', 536870939);
+  POLYLINE = $ElementName(new ElementName, 'polyline', 'polyline', 0);
+  PREFETCH = $ElementName(new ElementName, 'prefetch', 'prefetch', 0);
+  PROGRESS = $ElementName(new ElementName, 'progress', 'progress', 0);
+  PRSUBSET = $ElementName(new ElementName, 'prsubset', 'prsubset', 0);
+  QUOTIENT = $ElementName(new ElementName, 'quotient', 'quotient', 0);
+  SELECTOR = $ElementName(new ElementName, 'selector', 'selector', 0);
+  TEXTAREA = $ElementName(new ElementName, 'textarea', 'textarea', 536870947);
+  TEXTPATH = $ElementName(new ElementName, 'textpath', 'textPath', 0);
+  VARIANCE = $ElementName(new ElementName, 'variance', 'variance', 0);
+  ANIMATION = $ElementName(new ElementName, 'animation', 'animation', 0);
+  CONJUGATE = $ElementName(new ElementName, 'conjugate', 'conjugate', 0);
+  CONDITION = $ElementName(new ElementName, 'condition', 'condition', 0);
+  COMPLEXES = $ElementName(new ElementName, 'complexes', 'complexes', 0);
+  FONT_FACE = $ElementName(new ElementName, 'font-face', 'font-face', 0);
+  FACTORIAL = $ElementName(new ElementName, 'factorial', 'factorial', 0);
+  INTERSECT = $ElementName(new ElementName, 'intersect', 'intersect', 0);
+  IMAGINARY = $ElementName(new ElementName, 'imaginary', 'imaginary', 0);
+  LAPLACIAN = $ElementName(new ElementName, 'laplacian', 'laplacian', 0);
+  MATRIXROW = $ElementName(new ElementName, 'matrixrow', 'matrixrow', 0);
+  NOTSUBSET = $ElementName(new ElementName, 'notsubset', 'notsubset', 0);
+  OTHERWISE = $ElementName(new ElementName, 'otherwise', 'otherwise', 0);
+  PIECEWISE = $ElementName(new ElementName, 'piecewise', 'piecewise', 0);
+  PLAINTEXT = $ElementName(new ElementName, 'plaintext', 'plaintext', 536870942);
+  RATIONALS = $ElementName(new ElementName, 'rationals', 'rationals', 0);
+  SEMANTICS = $ElementName(new ElementName, 'semantics', 'semantics', 0);
+  TRANSPOSE = $ElementName(new ElementName, 'transpose', 'transpose', 0);
+  ANNOTATION = $ElementName(new ElementName, 'annotation', 'annotation', 0);
+  BLOCKQUOTE = $ElementName(new ElementName, 'blockquote', 'blockquote', 536870962);
+  DIVERGENCE = $ElementName(new ElementName, 'divergence', 'divergence', 0);
+  EULERGAMMA = $ElementName(new ElementName, 'eulergamma', 'eulergamma', 0);
+  EQUIVALENT = $ElementName(new ElementName, 'equivalent', 'equivalent', 0);
+  FIGCAPTION = $ElementName(new ElementName, 'figcaption', 'figcaption', 536870963);
+  IMAGINARYI = $ElementName(new ElementName, 'imaginaryi', 'imaginaryi', 0);
+  MALIGNMARK = $ElementName(new ElementName, 'malignmark', 'malignmark', 56);
+  MUNDEROVER = $ElementName(new ElementName, 'munderover', 'munderover', 0);
+  MLABELEDTR = $ElementName(new ElementName, 'mlabeledtr', 'mlabeledtr', 0);
+  NOTANUMBER = $ElementName(new ElementName, 'notanumber', 'notanumber', 0);
+  SOLIDCOLOR = $ElementName(new ElementName, 'solidcolor', 'solidcolor', 0);
+  ALTGLYPHDEF = $ElementName(new ElementName, 'altglyphdef', 'altGlyphDef', 0);
+  DETERMINANT = $ElementName(new ElementName, 'determinant', 'determinant', 0);
+  FEMERGENODE = $ElementName(new ElementName, 'femergenode', 'feMergeNode', 0);
+  FECOMPOSITE = $ElementName(new ElementName, 'fecomposite', 'feComposite', 0);
+  FESPOTLIGHT = $ElementName(new ElementName, 'fespotlight', 'feSpotLight', 0);
+  MALIGNGROUP = $ElementName(new ElementName, 'maligngroup', 'maligngroup', 0);
+  MPRESCRIPTS = $ElementName(new ElementName, 'mprescripts', 'mprescripts', 0);
+  MOMENTABOUT = $ElementName(new ElementName, 'momentabout', 'momentabout', 0);
+  NOTPRSUBSET = $ElementName(new ElementName, 'notprsubset', 'notprsubset', 0);
+  PARTIALDIFF = $ElementName(new ElementName, 'partialdiff', 'partialdiff', 0);
+  ALTGLYPHITEM = $ElementName(new ElementName, 'altglyphitem', 'altGlyphItem', 0);
+  ANIMATECOLOR = $ElementName(new ElementName, 'animatecolor', 'animateColor', 0);
+  DATATEMPLATE = $ElementName(new ElementName, 'datatemplate', 'datatemplate', 0);
+  EXPONENTIALE = $ElementName(new ElementName, 'exponentiale', 'exponentiale', 0);
+  FETURBULENCE = $ElementName(new ElementName, 'feturbulence', 'feTurbulence', 0);
+  FEPOINTLIGHT = $ElementName(new ElementName, 'fepointlight', 'fePointLight', 0);
+  FEMORPHOLOGY = $ElementName(new ElementName, 'femorphology', 'feMorphology', 0);
+  OUTERPRODUCT = $ElementName(new ElementName, 'outerproduct', 'outerproduct', 0);
+  ANIMATEMOTION = $ElementName(new ElementName, 'animatemotion', 'animateMotion', 0);
+  COLOR_PROFILE_0 = $ElementName(new ElementName, 'color-profile', 'color-profile', 0);
+  FONT_FACE_SRC = $ElementName(new ElementName, 'font-face-src', 'font-face-src', 0);
+  FONT_FACE_URI = $ElementName(new ElementName, 'font-face-uri', 'font-face-uri', 0);
+  FOREIGNOBJECT = $ElementName(new ElementName, 'foreignobject', 'foreignObject', 67108923);
+  FECOLORMATRIX = $ElementName(new ElementName, 'fecolormatrix', 'feColorMatrix', 0);
+  MISSING_GLYPH = $ElementName(new ElementName, 'missing-glyph', 'missing-glyph', 0);
+  MMULTISCRIPTS = $ElementName(new ElementName, 'mmultiscripts', 'mmultiscripts', 0);
+  SCALARPRODUCT = $ElementName(new ElementName, 'scalarproduct', 'scalarproduct', 0);
+  VECTORPRODUCT = $ElementName(new ElementName, 'vectorproduct', 'vectorproduct', 0);
+  ANNOTATION_XML = $ElementName(new ElementName, 'annotation-xml', 'annotation-xml', 33554490);
+  DEFINITION_SRC = $ElementName(new ElementName, 'definition-src', 'definition-src', 0);
+  FONT_FACE_NAME = $ElementName(new ElementName, 'font-face-name', 'font-face-name', 0);
+  FEGAUSSIANBLUR = $ElementName(new ElementName, 'fegaussianblur', 'feGaussianBlur', 0);
+  FEDISTANTLIGHT = $ElementName(new ElementName, 'fedistantlight', 'feDistantLight', 0);
+  LINEARGRADIENT = $ElementName(new ElementName, 'lineargradient', 'linearGradient', 0);
+  NATURALNUMBERS = $ElementName(new ElementName, 'naturalnumbers', 'naturalnumbers', 0);
+  RADIALGRADIENT = $ElementName(new ElementName, 'radialgradient', 'radialGradient', 0);
+  ANIMATETRANSFORM = $ElementName(new ElementName, 'animatetransform', 'animateTransform', 0);
+  CARTESIANPRODUCT = $ElementName(new ElementName, 'cartesianproduct', 'cartesianproduct', 0);
+  FONT_FACE_FORMAT = $ElementName(new ElementName, 'font-face-format', 'font-face-format', 0);
+  FECONVOLVEMATRIX = $ElementName(new ElementName, 'feconvolvematrix', 'feConvolveMatrix', 0);
+  FEDIFFUSELIGHTING = $ElementName(new ElementName, 'fediffuselighting', 'feDiffuseLighting', 0);
+  FEDISPLACEMENTMAP = $ElementName(new ElementName, 'fedisplacementmap', 'feDisplacementMap', 0);
+  FESPECULARLIGHTING = $ElementName(new ElementName, 'fespecularlighting', 'feSpecularLighting', 0);
+  DOMAINOFAPPLICATION = $ElementName(new ElementName, 'domainofapplication', 'domainofapplication', 0);
+  FECOMPONENTTRANSFER = $ElementName(new ElementName, 'fecomponenttransfer', 'feComponentTransfer', 0);
+  ELEMENT_NAMES = initValues(_3Lnu_validator_htmlparser_impl_ElementName_2_classLit, 60, 14, [A, B, G, I, P, Q, S, U, BR, CI, CN, DD, DL, DT, EM, EQ, FN, H1, H2, H3, H4, H5, H6, GT, HR, IN_0, LI, LN, LT, MI, MN, MO, MS, OL, OR, PI, RP, RT_0, TD, TH, TR, TT, UL, AND, ARG, ABS, BIG, BDO, CSC, COL, COS, COT, DEL, DFN, DIR_0, DIV, EXP, GCD, GEQ, IMG, INS, INT, KBD, LOG, LCM, LEQ, MTD, MIN_0, MAP, MTR, MAX_0, NEQ, NOT, NAV, PRE, REM, SUB, SEC, SVG, SUM, SIN, SEP, SUP, SET, TAN, USE, VAR, WBR, XMP, XOR, AREA, ABBR_0, BASE_0, BVAR, BODY, CARD, CODE_0, CITE_0, CSCH, COSH, COTH, CURL, DESC, DIFF, DEFS, FORM_0, FONT, GRAD, HEAD, HTML_0, LINE, LINK_0, LIST_0, META, MSUB, MODE_0, MATH, MARK, MASK_0, MEAN, MSUP, MENU, MROW, NONE, NOBR, NEST, PATH_0, PLUS, RULE, REAL, RELN, RECT, ROOT, RUBY, SECH, SINH, SPAN_0, SAMP, STOP, SDEV, TIME, TRUE, TREF, TANH, TEXT_0, VIEW, ASIDE, AUDIO, APPLY, EMBED, FRAME_0, FALSE, FLOOR, GLYPH, HKERN, IMAGE, IDENT, INPUT, LABEL_0, LIMIT, MFRAC, MPATH, METER, MOVER, MINUS, MROOT, MSQRT, MTEXT, NOTIN, PIECE, PARAM, POWER, REALS, STYLE_0, SMALL, THEAD, TABLE, TITLE_0, TSPAN, TIMES, TFOOT, TBODY, UNION, VKERN, VIDEO, ARCSEC, ARCCSC, ARCTAN, ARCSIN, ARCCOS, APPLET, ARCCOT, APPROX, BUTTON, CIRCLE, CENTER, CURSOR_0, CANVAS, DIVIDE, DEGREE, DOMAIN, EXISTS, FETILE, FIGURE, FORALL, FILTER_0, FOOTER, HGROUP, HEADER, IFRAME, KEYGEN, LAMBDA, LEGEND, MSPACE, MTABLE, MSTYLE, MGLYPH, MEDIAN, MUNDER, MARKER, MERROR, MOMENT, MATRIX, OPTION, OBJECT_0, OUTPUT, PRIMES, SOURCE, STRIKE, STRONG, SWITCH, SYMBOL, SELECT, SUBSET, SCRIPT, TBREAK, VECTOR, ARTICLE, ANIMATE, ARCSECH, ARCCSCH, ARCTANH, ARCSINH, ARCCOSH, ARCCOTH, ACRONYM, ADDRESS, BGSOUND, COMMAND, COMPOSE, CEILING, CSYMBOL, CAPTION, DISCARD, DECLARE_0, DETAILS, ELLIPSE, FEFUNCA, FEFUNCB, FEBLEND, FEFLOOD, FEIMAGE, FEMERGE, FEFUNCG, FEFUNCR, HANDLER, INVERSE, IMPLIES, ISINDEX, LOGBASE, LISTING, MFENCED, MPADDED, MARQUEE, MACTION, MSUBSUP, NOEMBED, POLYGON, PATTERN_0, PRODUCT, SETDIFF, SECTION, SUMMARY_0, TENDSTO, UPLIMIT, ALTGLYPH, BASEFONT, CLIPPATH, CODOMAIN, COLGROUP, EMPTYSET, FACTOROF, FIELDSET, FRAMESET, FEOFFSET, GLYPHREF_0, INTERVAL, INTEGERS, INFINITY, LISTENER, LOWLIMIT, METADATA, MENCLOSE, MPHANTOM, NOFRAMES, NOSCRIPT, OPTGROUP, POLYLINE, PREFETCH, PROGRESS, PRSUBSET, QUOTIENT, SELECTOR, TEXTAREA, TEXTPATH, VARIANCE, ANIMATION, CONJUGATE, CONDITION, COMPLEXES, FONT_FACE, FACTORIAL, INTERSECT, IMAGINARY, LAPLACIAN, MATRIXROW, NOTSUBSET, OTHERWISE, PIECEWISE, PLAINTEXT, RATIONALS, SEMANTICS, TRANSPOSE, ANNOTATION, BLOCKQUOTE, DIVERGENCE, EULERGAMMA, EQUIVALENT, FIGCAPTION, IMAGINARYI, MALIGNMARK, MUNDEROVER, MLABELEDTR, NOTANUMBER, SOLIDCOLOR, ALTGLYPHDEF, DETERMINANT, FEMERGENODE, FECOMPOSITE, FESPOTLIGHT, MALIGNGROUP, MPRESCRIPTS, MOMENTABOUT, NOTPRSUBSET, PARTIALDIFF, ALTGLYPHITEM, ANIMATECOLOR, DATATEMPLATE, EXPONENTIALE, FETURBULENCE, FEPOINTLIGHT, FEMORPHOLOGY, OUTERPRODUCT, ANIMATEMOTION, COLOR_PROFILE_0, FONT_FACE_SRC, FONT_FACE_URI, FOREIGNOBJECT, FECOLORMATRIX, MISSING_GLYPH, MMULTISCRIPTS, SCALARPRODUCT, VECTORPRODUCT, ANNOTATION_XML, DEFINITION_SRC, FONT_FACE_NAME, FEGAUSSIANBLUR, FEDISTANTLIGHT, LINEARGRADIENT, NATURALNUMBERS, RADIALGRADIENT, ANIMATETRANSFORM, CARTESIANPRODUCT, FONT_FACE_FORMAT, FECONVOLVEMATRIX, FEDIFFUSELIGHTING, FEDISPLACEMENTMAP, FESPECULARLIGHTING, DOMAINOFAPPLICATION, FECOMPONENTTRANSFER]);
+  ELEMENT_HASHES = initValues(_3I_classLit, 48, -1, [1057, 1090, 1255, 1321, 1552, 1585, 1651, 1717, 68162, 68899, 69059, 69764, 70020, 70276, 71077, 71205, 72134, 72232, 72264, 72296, 72328, 72360, 72392, 73351, 74312, 75209, 78124, 78284, 78476, 79149, 79309, 79341, 79469, 81295, 81487, 82224, 84498, 84626, 86164, 86292, 86612, 86676, 87445, 3183041, 3186241, 3198017, 3218722, 3226754, 3247715, 3256803, 3263971, 3264995, 3289252, 3291332, 3295524, 3299620, 3326725, 3379303, 3392679, 3448233, 3460553, 3461577, 3510347, 3546604, 3552364, 3556524, 3576461, 3586349, 3588141, 3590797, 3596333, 3622062, 3625454, 3627054, 3675728, 3749042, 3771059, 3771571, 3776211, 3782323, 3782963, 3784883, 3785395, 3788979, 3815476, 3839605, 3885110, 3917911, 3948984, 3951096, 135304769, 135858241, 136498210, 136906434, 137138658, 137512995, 137531875, 137548067, 137629283, 137645539, 137646563, 137775779, 138529956, 138615076, 139040932, 140954086, 141179366, 141690439, 142738600, 143013512, 146979116, 147175724, 147475756, 147902637, 147936877, 148017645, 148131885, 148228141, 148229165, 148309165, 148395629, 148551853, 148618829, 149076462, 149490158, 149572782, 151277616, 151639440, 153268914, 153486514, 153563314, 153750706, 153763314, 153914034, 154406067, 154417459, 154600979, 154678323, 154680979, 154866835, 155366708, 155375188, 155391572, 155465780, 155869364, 158045494, 168988979, 169321621, 169652752, 173151309, 174240818, 174247297, 174669292, 175391532, 176638123, 177380397, 177879204, 177886734, 180753473, 181020073, 181503558, 181686320, 181999237, 181999311, 182048201, 182074866, 182078003, 182083764, 182920847, 184716457, 184976961, 185145071, 187281445, 187872052, 188100653, 188875944, 188919873, 188920457, 189203987, 189371817, 189414886, 189567458, 190266670, 191318187, 191337609, 202479203, 202493027, 202835587, 202843747, 203013219, 203036048, 203045987, 203177552, 203898516, 204648562, 205067918, 205078130, 205096654, 205689142, 205690439, 205988909, 207213161, 207794484, 207800999, 208023602, 208213644, 208213647, 210261490, 210310273, 210940978, 213325049, 213946445, 214055079, 215125040, 215134273, 215135028, 215237420, 215418148, 215553166, 215553394, 215563858, 215627949, 215754324, 217529652, 217713834, 217732628, 218731945, 221417045, 221424946, 221493746, 221515401, 221658189, 221908140, 221910626, 221921586, 222659762, 225001091, 236105833, 236113965, 236194995, 236195427, 236206132, 236206387, 236211683, 236212707, 236381647, 236571826, 237124271, 238172205, 238210544, 238270764, 238435405, 238501172, 239224867, 239257644, 239710497, 240307721, 241208789, 241241557, 241318060, 241319404, 241343533, 241344069, 241405397, 241765845, 243864964, 244502085, 244946220, 245109902, 247647266, 247707956, 248648814, 248648836, 248682161, 248986932, 249058914, 249697357, 252132601, 252135604, 252317348, 255007012, 255278388, 255641645, 256365156, 257566121, 269763372, 271202790, 271863856, 272049197, 272127474, 274339449, 274939471, 275388004, 275388005, 275388006, 275977800, 278267602, 278513831, 278712622, 281613765, 281683369, 282120228, 282250732, 282508942, 283743649, 283787570, 284710386, 285391148, 285478533, 285854898, 285873762, 286931113, 288964227, 289445441, 289689648, 291671489, 303512884, 305319975, 305610036, 305764101, 308448294, 308675890, 312085683, 312264750, 315032867, 316391000, 317331042, 317902135, 318950711, 319447220, 321499182, 322538804, 323145200, 337067316, 337826293, 339905989, 340833697, 341457068, 342310196, 345302593, 349554733, 349771471, 349786245, 350819405, 356072847, 370349192, 373962798, 375558638, 375574835, 376053993, 383276530, 383373833, 383407586, 384439906, 386079012, 404133513, 404307343, 407031852, 408072233, 409112005, 409608425, 409771500, 419040932, 437730612, 439529766, 442616365, 442813037, 443157674, 443295316, 450118444, 450482697, 456789668, 459935396, 471217869, 474073645, 476230702, 476665218, 476717289, 483014825, 485083298, 489306281, 538364390, 540675748, 543819186, 543958612, 576960820, 577242548, 610515252, 642202932, 644420819]);
+}
+
+function $ElementName(this$static, name_0, camelCaseName, flags){
+  $clinit_125();
+  this$static.name_0 = name_0;
+  this$static.camelCaseName = camelCaseName;
+  this$static.flags = flags;
+  return this$static;
+}
+
+function $ElementName_0(this$static, name_0){
+  $clinit_125();
+  this$static.name_0 = name_0;
+  this$static.camelCaseName = name_0;
+  this$static.flags = 1073741824;
+  return this$static;
+}
+
+function bufToHash_0(buf, len){
+  var hash, i, j;
+  hash = len;
+  hash <<= 5;
+  hash += buf[0] - 96;
+  j = len;
+  for (i = 0; i < 4 && j > 0; ++i) {
+    --j;
+    hash <<= 5;
+    hash += buf[j] - 96;
+  }
+  return hash;
+}
+
+function elementNameByBuffer(buf, offset, length_0){
+  var end, end_0;
+  $clinit_125();
+  var elementName, hash, index, name_0;
+  hash = bufToHash_0(buf, length_0);
+  index = binarySearch(ELEMENT_HASHES, hash);
+  if (index < 0) {
+    return $ElementName_0(new ElementName, String((end = offset + length_0 , __checkBounds(buf.length, offset, end) , __valueOf(buf, offset, end))));
+  }
+   else {
+    elementName = ELEMENT_NAMES[index];
+    name_0 = elementName.name_0;
+    if (!localEqualsBuffer(name_0, buf, offset, length_0)) {
+      return $ElementName_0(new ElementName, String((end_0 = offset + length_0 , __checkBounds(buf.length, offset, end_0) , __valueOf(buf, offset, end_0))));
+    }
+    return elementName;
+  }
+}
+
+function getClass_68(){
+  return Lnu_validator_htmlparser_impl_ElementName_2_classLit;
+}
+
+function ElementName(){
+}
+
+_ = ElementName.prototype = new Object_0;
+_.getClass$ = getClass_68;
+_.typeId$ = 40;
+_.camelCaseName = null;
+_.flags = 0;
+_.name_0 = null;
+var A, ABBR_0, ABS, ACRONYM, ADDRESS, ALTGLYPH, ALTGLYPHDEF, ALTGLYPHITEM, AND, ANIMATE, ANIMATECOLOR, ANIMATEMOTION, ANIMATETRANSFORM, ANIMATION, ANNOTATION, ANNOTATION_XML, APPLET, APPLY, APPROX, ARCCOS, ARCCOSH, ARCCOT, ARCCOTH, ARCCSC, ARCCSCH, ARCSEC, ARCSECH, ARCSIN, ARCSINH, ARCTAN, ARCTANH, AREA, ARG, ARTICLE, ASIDE, AUDIO, B, BASE_0, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, BVAR, CANVAS, CAPTION, CARD, CARTESIANPRODUCT, CEILING, CENTER, CI, CIRCLE, CITE_0, CLIPPATH, CN, CODE_0, CODOMAIN, COL, COLGROUP, COLOR_PROFILE_0, COMMAND, COMPLEXES, COMPOSE, CONDITION, CONJUGATE, COS, COSH, COT, COTH, CSC, CSCH, CSYMBOL, CURL, CURSOR_0, DATATEMPLATE, DD, DECLARE_0, DEFINITION_SRC, DEFS, DEGREE, DEL, DESC, DETAILS, DETERMINANT, DFN, DIFF, DIR_0, DISCARD, DIV, DIVERGENCE, DIVIDE, DL, DOMAIN, DOMAINOFAPPLICATION, DT, ELEMENT_HASHES, ELEMENT_NAMES, ELLIPSE, EM, EMBED, EMPTYSET, EQ, EQUIVALENT, EULERGAMMA, EXISTS, EXP, EXPONENTIALE, FACTORIAL, FACTOROF, FALSE, FEBLEND, FECOLORMATRIX, FECOMPONENTTRANSFER, FECOMPOSITE, FECONVOLVEMATRIX, FEDIFFUSELIGHTING, FEDISPLACEMENTMAP, FEDISTANTLIGHT, FEFLOOD, FEFUNCA, FEFUNCB, FEFUNCG, FEFUNCR, FEGAUSSIANBLUR, FEIMAGE, FEMERGE, FEMERGENODE, FEMORPHOLOGY, FEOFFSET, FEPOINTLIGHT, FESPECULARLIGHTING, FESPOTLIGHT, FETILE, FETURBULENCE, FIELDSET, FIGCAPTION, FIGURE, FILTER_0, FLOOR, FN, FONT, FONT_FACE, FONT_FACE_FORMAT, FONT_FACE_NAME, FONT_FACE_SRC, FONT_FACE_URI, FOOTER, FORALL, FOREIGNOBJECT, FORM_0, FRAME_0, FRAMESET, G, GCD, GEQ, GLYPH, GLYPHREF_0, GRAD, GT, H1, H2, H3, H4, H5, H6, HANDLER, HEAD, HEADER, HGROUP, HKERN, HR, HTML_0, I, IDENT, IFRAME, IMAGE, IMAGINARY, IMAGINARYI, IMG, IMPLIES, IN_0, INFINITY, INPUT, INS, INT, INTEGERS, INTERSECT, INTERVAL, INVERSE, ISINDEX, KBD, KEYGEN, LABEL_0, LAMBDA, LAPLACIAN, LCM, LEGEND, LEQ, LI, LIMIT, LINE, LINEARGRADIENT, LINK_0, LIST_0, LISTENER, LISTING, LN, LOG, LOGBASE, LOWLIMIT, LT, MACTION, MALIGNGROUP, MALIGNMARK, MAP, MARK, MARKER, MARQUEE, MASK_0, MATH, MATRIX, MATRIXROW, MAX_0, MEAN, MEDIAN, MENCLOSE, MENU, MERROR, META, METADATA, METER, MFENCED, MFRAC, MGLYPH, MI, MIN_0, MINUS, MISSING_GLYPH, MLABELEDTR, MMULTISCRIPTS, MN, MO, MODE_0, MOMENT, MOMENTABOUT, MOVER, MPADDED, MPATH, MPHANTOM, MPRESCRIPTS, MROOT, MROW, MS, MSPACE, MSQRT, MSTYLE, MSUB, MSUBSUP, MSUP, MTABLE, MTD, MTEXT, MTR, MUNDER, MUNDEROVER, NATURALNUMBERS, NAV, NEQ, NEST, NOBR, NOEMBED, NOFRAMES, NONE, NOSCRIPT, NOT, NOTANUMBER, NOTIN, NOTPRSUBSET, NOTSUBSET, OBJECT_0, OL, OPTGROUP, OPTION, OR, OTHERWISE, OUTERPRODUCT, OUTPUT, P, PARAM, PARTIALDIFF, PATH_0, PATTERN_0, PI, PIECE, PIECEWISE, PLAINTEXT, PLUS, POLYGON, POLYLINE, POWER, PRE, PREFETCH, PRIMES, PRODUCT, PROGRESS, PRSUBSET, Q, QUOTIENT, RADIALGRADIENT, RATIONALS, REAL, REALS, RECT, RELN, REM, ROOT, RP, RT_0, RUBY, RULE, S, SAMP, SCALARPRODUCT, SCRIPT, SDEV, SEC, SECH, SECTION, SELECT, SELECTOR, SEMANTICS, SEP, SET, SETDIFF, SIN, SINH, SMALL, SOLIDCOLOR, SOURCE, SPAN_0, STOP, STRIKE, STRONG, STYLE_0, SUB, SUBSET, SUM, SUMMARY_0, SUP, SVG, SWITCH, SYMBOL, TABLE, TAN, TANH, TBODY, TBREAK, TD, TENDSTO, TEXT_0, TEXTAREA, TEXTPATH, TFOOT, TH, THEAD, TIME, TIMES, TITLE_0, TR, TRANSPOSE, TREF, TRUE, TSPAN, TT, U, UL, UNION, UPLIMIT, USE, VAR, VARIANCE, VECTOR, VECTORPRODUCT, VIDEO, VIEW, VKERN, WBR, XMP, XOR;
+function $clinit_126(){
+  $clinit_126 = nullMethod;
+  LT_GT = initValues(_3C_classLit, 46, -1, [60, 62]);
+  LT_SOLIDUS = initValues(_3C_classLit, 46, -1, [60, 47]);
+  RSQB_RSQB = initValues(_3C_classLit, 46, -1, [93, 93]);
+  REPLACEMENT_CHARACTER_0 = initValues(_3C_classLit, 46, -1, [65533]);
+  SPACE = initValues(_3C_classLit, 46, -1, [32]);
+  LF = initValues(_3C_classLit, 46, -1, [10]);
+  CDATA_LSQB = $toCharArray('CDATA[');
+  OCTYPE = $toCharArray('octype');
+  UBLIC = $toCharArray('ublic');
+  YSTEM = $toCharArray('ystem');
+  TITLE_ARR = initValues(_3C_classLit, 46, -1, [116, 105, 116, 108, 101]);
+  SCRIPT_ARR = initValues(_3C_classLit, 46, -1, [115, 99, 114, 105, 112, 116]);
+  STYLE_ARR = initValues(_3C_classLit, 46, -1, [115, 116, 121, 108, 101]);
+  PLAINTEXT_ARR = initValues(_3C_classLit, 46, -1, [112, 108, 97, 105, 110, 116, 101, 120, 116]);
+  XMP_ARR = initValues(_3C_classLit, 46, -1, [120, 109, 112]);
+  TEXTAREA_ARR = initValues(_3C_classLit, 46, -1, [116, 101, 120, 116, 97, 114, 101, 97]);
+  IFRAME_ARR = initValues(_3C_classLit, 46, -1, [105, 102, 114, 97, 109, 101]);
+  NOEMBED_ARR = initValues(_3C_classLit, 46, -1, [110, 111, 101, 109, 98, 101, 100]);
+  NOSCRIPT_ARR = initValues(_3C_classLit, 46, -1, [110, 111, 115, 99, 114, 105, 112, 116]);
+  NOFRAMES_ARR = initValues(_3C_classLit, 46, -1, [110, 111, 102, 114, 97, 109, 101, 115]);
+}
+
+function $addAttributeWithValue(this$static){
+  var val;
+  this$static.metaBoundaryPassed && ($clinit_125() , META) == this$static.tagName && ($clinit_124() , CHARSET) == this$static.attributeName;
+  if (this$static.attributeName) {
+    val = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+    !this$static.endTag && this$static.html4 && this$static.html4ModeCompatibleWithXhtml1Schemata && $isCaseFolded(this$static.attributeName) && (val = newAsciiLowerCaseStringFromString(val));
+    $addAttribute(this$static.attributes, this$static.attributeName, val, this$static.xmlnsPolicy);
+    this$static.attributeName = null;
+  }
+}
+
+function $addAttributeWithoutValue(this$static){
+  this$static.metaBoundaryPassed && ($clinit_124() , CHARSET) == this$static.attributeName && ($clinit_125() , META) == this$static.tagName;
+  if (this$static.attributeName) {
+    if (this$static.html4) {
+      $isBoolean(this$static.attributeName)?this$static.html4ModeCompatibleWithXhtml1Schemata?$addAttribute(this$static.attributes, this$static.attributeName, this$static.attributeName.local[0], this$static.xmlnsPolicy):$addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy):$addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
+    }
+     else {
+      (($clinit_124() , SRC) == this$static.attributeName || HREF == this$static.attributeName) && $warn('Attribute \u201C' + this$static.attributeName.local[0] + '\u201D without an explicit value seen. The attribute may be dropped by IE7.');
+      $addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
+    }
+    this$static.attributeName = null;
+  }
+}
+
+function $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c){
+  switch (this$static.commentPolicy.ordinal) {
+    case 2:
+      --this$static.longStrBufLen;
+      $appendLongStrBuf(this$static, 32);
+      $appendLongStrBuf(this$static, 45);
+    case 0:
+      $appendLongStrBuf(this$static, c);
+      break;
+    case 1:
+      $fatal_1(this$static, 'The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.');
+  }
+}
+
+function $appendLongStrBuf(this$static, c){
+  var newBuf;
+  if (this$static.longStrBufLen == this$static.longStrBuf.length) {
+    newBuf = initDim(_3C_classLit, 46, -1, this$static.longStrBufLen + (this$static.longStrBufLen >> 1), 1);
+    arraycopy(this$static.longStrBuf, 0, newBuf, 0, this$static.longStrBuf.length);
+    this$static.longStrBuf = newBuf;
+  }
+  this$static.longStrBuf[this$static.longStrBufLen++] = c;
+}
+
+function $appendLongStrBuf_0(this$static, buffer, offset, length_0){
+  var newBuf, reqLen;
+  reqLen = this$static.longStrBufLen + length_0;
+  if (this$static.longStrBuf.length < reqLen) {
+    newBuf = initDim(_3C_classLit, 46, -1, reqLen + (reqLen >> 1), 1);
+    arraycopy(this$static.longStrBuf, 0, newBuf, 0, this$static.longStrBuf.length);
+    this$static.longStrBuf = newBuf;
+  }
+  arraycopy(buffer, offset, this$static.longStrBuf, this$static.longStrBufLen, length_0);
+  this$static.longStrBufLen = reqLen;
+}
+
+function $appendSecondHyphenToBogusComment(this$static){
+  switch (this$static.commentPolicy.ordinal) {
+    case 2:
+      $appendLongStrBuf(this$static, 32);
+    case 0:
+      $appendLongStrBuf(this$static, 45);
+      break;
+    case 1:
+      $fatal_1(this$static, 'The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.');
+  }
+}
+
+function $appendStrBuf(this$static, c){
+  var newBuf;
+  if (this$static.strBufLen == this$static.strBuf.length) {
+    newBuf = initDim(_3C_classLit, 46, -1, this$static.strBuf.length + 1024, 1);
+    arraycopy(this$static.strBuf, 0, newBuf, 0, this$static.strBuf.length);
+    this$static.strBuf = newBuf;
+  }
+  this$static.strBuf[this$static.strBufLen++] = c;
+}
+
+function $attributeNameComplete(this$static){
+  this$static.attributeName = nameByBuffer(this$static.strBuf, 0, this$static.strBufLen, this$static.namePolicy != ($clinit_115() , ALLOW));
+  !this$static.attributes && (this$static.attributes = $HtmlAttributes(new HtmlAttributes, this$static.mappingLangToXmlLang));
+  if ($contains(this$static.attributes, this$static.attributeName)) {
+    $err('Duplicate attribute \u201C' + this$static.attributeName.local[0] + '\u201D.');
+    this$static.attributeName = null;
+  }
+}
+
+function $emitCarriageReturn(this$static, buf, pos){
+  this$static.nextCharOnNewLine = true;
+  this$static.lastCR = true;
+  $flushChars(this$static, buf, pos);
+  $characters(this$static.tokenHandler, LF, 0, 1);
+  this$static.cstart = 2147483647;
+}
+
+function $emitCurrentTagToken(this$static, selfClosing, pos){
+  var attrs;
+  this$static.cstart = pos + 1;
+  this$static.stateSave = 0;
+  attrs = !this$static.attributes?($clinit_128() , EMPTY_ATTRIBUTES):this$static.attributes;
+  this$static.endTag?$endTag(this$static.tokenHandler, this$static.tagName):$startTag(this$static.tokenHandler, this$static.tagName, attrs, selfClosing);
+  this$static.tagName = null;
+  this$static.newAttributesEachTime?(this$static.attributes = null):$clear_0(this$static.attributes, this$static.mappingLangToXmlLang);
+  return this$static.stateSave;
+}
+
+function $emitDoctypeToken(this$static, pos){
+  this$static.cstart = pos + 1;
+  $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
+  this$static.doctypeName = null;
+  this$static.publicIdentifier = null;
+  this$static.systemIdentifier = null;
+}
+
+function $emitOrAppendOne(this$static, val, returnState){
+  (returnState & -2) != 0?$appendLongStrBuf(this$static, val[0]):$characters(this$static.tokenHandler, val, 0, 1);
+}
+
+function $emitOrAppendTwo(this$static, val, returnState){
+  if ((returnState & -2) != 0) {
+    $appendLongStrBuf(this$static, val[0]);
+    $appendLongStrBuf(this$static, val[1]);
+  }
+   else {
+    $characters(this$static.tokenHandler, val, 0, 2);
+  }
+}
+
+function $emitStrBuf(this$static){
+  this$static.strBufLen > 0 && $characters(this$static.tokenHandler, this$static.strBuf, 0, this$static.strBufLen);
+}
+
+function $emptyAttributes(this$static){
+  if (this$static.newAttributesEachTime) {
+    return $HtmlAttributes(new HtmlAttributes, this$static.mappingLangToXmlLang);
+  }
+   else {
+    return $clinit_128() , EMPTY_ATTRIBUTES;
+  }
+}
+
+function $end(this$static){
+  this$static.strBuf = null;
+  this$static.longStrBuf = null;
+  this$static.doctypeName = null;
+  this$static.systemIdentifier != null && (this$static.systemIdentifier = null);
+  this$static.publicIdentifier != null && (this$static.publicIdentifier = null);
+  !!this$static.tagName && (this$static.tagName = null);
+  !!this$static.attributeName && (this$static.attributeName = null);
+  $endTokenization(this$static.tokenHandler);
+  if (this$static.attributes) {
+    $clear_0(this$static.attributes, this$static.mappingLangToXmlLang);
+    this$static.attributes = null;
+  }
+}
+
+function $endTagExpectationToArray(this$static){
+  switch (this$static.endTagExpectation.flags & 127) {
+    case 36:
+      this$static.endTagExpectationAsArray = TITLE_ARR;
+      return;
+    case 31:
+      this$static.endTagExpectationAsArray = SCRIPT_ARR;
+      return;
+    case 33:
+      this$static.endTagExpectationAsArray = STYLE_ARR;
+      return;
+    case 30:
+      this$static.endTagExpectationAsArray = PLAINTEXT_ARR;
+      return;
+    case 38:
+      this$static.endTagExpectationAsArray = XMP_ARR;
+      return;
+    case 35:
+      this$static.endTagExpectationAsArray = TEXTAREA_ARR;
+      return;
+    case 47:
+      this$static.endTagExpectationAsArray = IFRAME_ARR;
+      return;
+    case 60:
+      this$static.endTagExpectationAsArray = NOEMBED_ARR;
+      return;
+    case 26:
+      this$static.endTagExpectationAsArray = NOSCRIPT_ARR;
+      return;
+    case 25:
+      this$static.endTagExpectationAsArray = NOFRAMES_ARR;
+      return;
+    default:return;
+  }
+}
+
+function $eof_0(this$static){
+  var candidateName, ch, i, returnState, state, val;
+  state = this$static.stateSave;
+  returnState = this$static.returnStateSave;
+  eofloop: for (;;) {
+    switch (state) {
+      case 59:
+      case 66:
+        $characters(this$static.tokenHandler, LT_GT, 0, 1);
+        break eofloop;
+      case 9:
+        $characters(this$static.tokenHandler, LT_GT, 0, 1);
+        break eofloop;
+      case 65:
+        $characters(this$static.tokenHandler, LT_GT, 0, 1);
+        break eofloop;
+      case 38:
+        $characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
+        $emitStrBuf(this$static);
+        break eofloop;
+      case 10:
+        $characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
+        break eofloop;
+      case 11:
+        break eofloop;
+      case 12:
+      case 16:
+      case 54:
+        break eofloop;
+      case 13:
+        break eofloop;
+      case 14:
+      case 15:
+        break eofloop;
+      case 5:
+      case 6:
+      case 7:
+        break eofloop;
+      case 17:
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+        this$static.cstart = 1;
+        break eofloop;
+      case 64:
+        $maybeAppendSpaceToBogusComment(this$static);
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+        this$static.cstart = 1;
+        break eofloop;
+      case 18:
+        this$static.longStrBufLen = 0;
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+        this$static.cstart = 1;
+        break eofloop;
+      case 39:
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+        this$static.cstart = 1;
+        break eofloop;
+      case 40:
+        if (this$static.index < 6) {
+          this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+          this$static.cstart = 1;
+        }
+         else {
+          this$static.doctypeName = '';
+          this$static.systemIdentifier != null && (this$static.systemIdentifier = null);
+          this$static.publicIdentifier != null && (this$static.publicIdentifier = null);
+          this$static.forceQuirks = true;
+          $emitDoctypeToken(this$static, 0);
+          break eofloop;
+        }
+
+        break eofloop;
+      case 32:
+      case 34:
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+        this$static.cstart = 1;
+        break eofloop;
+      case 36:
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 2);
+        this$static.cstart = 1;
+        break eofloop;
+      case 35:
+      case 33:
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 1);
+        this$static.cstart = 1;
+        break eofloop;
+      case 37:
+        this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 3);
+        this$static.cstart = 1;
+        break eofloop;
+      case 19:
+      case 20:
+        this$static.forceQuirks = true;
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 21:
+        this$static.doctypeName = String(valueOf_0(this$static.strBuf, 0, this$static.strBufLen));
+        this$static.forceQuirks = true;
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 41:
+      case 42:
+      case 22:
+      case 43:
+      case 45:
+      case 23:
+        this$static.forceQuirks = true;
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 24:
+      case 25:
+        this$static.forceQuirks = true;
+        this$static.publicIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 26:
+      case 27:
+      case 44:
+        this$static.forceQuirks = true;
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 28:
+      case 29:
+        this$static.forceQuirks = true;
+        this$static.systemIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 30:
+        this$static.forceQuirks = true;
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 31:
+        $emitDoctypeToken(this$static, 0);
+        break eofloop;
+      case 46:
+        (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+        state = returnState;
+        continue;
+      case 53:
+        (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+        state = returnState;
+        continue;
+      case 48:
+        outer: for (;;) {
+          ++this$static.entCol;
+          hiloop: for (;;) {
+            if (this$static.hi == -1) {
+              break hiloop;
+            }
+            if (this$static.entCol == ($clinit_131() , NAMES)[this$static.hi].length) {
+              break hiloop;
+            }
+            if (this$static.entCol > NAMES[this$static.hi].length) {
+              break outer;
+            }
+             else if (0 < NAMES[this$static.hi].charCodeAt(this$static.entCol)) {
+              --this$static.hi;
+            }
+             else {
+              break hiloop;
+            }
+          }
+          loloop: for (;;) {
+            if (this$static.hi < this$static.lo) {
+              break outer;
+            }
+            if (this$static.entCol == ($clinit_131() , NAMES)[this$static.lo].length) {
+              this$static.candidate = this$static.lo;
+              this$static.strBufMark = this$static.strBufLen;
+              ++this$static.lo;
+            }
+             else if (this$static.entCol > NAMES[this$static.lo].length) {
+              break outer;
+            }
+             else if (0 > NAMES[this$static.lo].charCodeAt(this$static.entCol)) {
+              ++this$static.lo;
+            }
+             else {
+              break loloop;
+            }
+          }
+          if (this$static.hi < this$static.lo) {
+            break outer;
+          }
+          continue;
+        }
+
+        if (this$static.candidate == -1) {
+          (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+          state = returnState;
+          continue eofloop;
+        }
+         else {
+          candidateName = ($clinit_131() , NAMES)[this$static.candidate];
+          if (candidateName.length == 0 || candidateName.charCodeAt(candidateName.length - 1) != 59) {
+            if ((returnState & -2) != 0) {
+              this$static.strBufMark == this$static.strBufLen?(ch = 0):(ch = this$static.strBuf[this$static.strBufMark]);
+              if (ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) {
+                $appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
+                state = returnState;
+                continue eofloop;
+              }
+            }
+          }
+          val = VALUES_0[this$static.candidate];
+          val.length == 1?((returnState & -2) != 0?$appendLongStrBuf(this$static, val[0]):$characters(this$static.tokenHandler, val, 0, 1) , undefined):$emitOrAppendTwo(this$static, val, returnState);
+          if (this$static.strBufMark < this$static.strBufLen) {
+            if ((returnState & -2) != 0) {
+              for (i = this$static.strBufMark; i < this$static.strBufLen; ++i) {
+                $appendLongStrBuf(this$static, this$static.strBuf[i]);
+              }
+            }
+             else {
+              $characters(this$static.tokenHandler, this$static.strBuf, this$static.strBufMark, this$static.strBufLen - this$static.strBufMark);
+            }
+          }
+          state = returnState;
+          continue eofloop;
+        }
+
+      case 47:
+      case 50:
+      case 49:
+        if (!this$static.seenDigits) {
+          $err('No digits after \u201C' + valueOf_0(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.');
+          (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+          state = returnState;
+          continue;
+        }
+
+        $handleNcrValue(this$static, returnState);
+        state = returnState;
+        continue;
+      case 57:
+        $characters(this$static.tokenHandler, RSQB_RSQB, 0, 1);
+        break eofloop;
+      case 58:
+        $characters(this$static.tokenHandler, RSQB_RSQB, 0, 2);
+        break eofloop;
+      case 0:
+      default:break eofloop;
+    }
+  }
+  $eof(this$static.tokenHandler);
+  return;
+}
+
+function $err(){
+  return;
+}
+
+function $fatal_1(this$static, message){
+  var spe;
+  spe = $SAXParseException(new SAXParseException, message, this$static);
+  throw spe;
+}
+
+function $handleNcrValue(this$static, returnState){
+  var ch, val;
+  if (this$static.value <= 65535) {
+    if (this$static.value >= 128 && this$static.value <= 159) {
+      val = ($clinit_131() , WINDOWS_1252)[this$static.value - 128];
+      (returnState & -2) != 0?$appendLongStrBuf(this$static, val[0]):$characters(this$static.tokenHandler, val, 0, 1);
+    }
+     else if (this$static.value == 12 && this$static.contentSpacePolicy != ($clinit_115() , ALLOW)) {
+      this$static.contentSpacePolicy == ($clinit_115() , ALTER_INFOSET)?$emitOrAppendOne(this$static, SPACE, returnState):this$static.contentSpacePolicy == FATAL && $fatal_1(this$static, 'A character reference expanded to a form feed which is not legal XML 1.0 white space.');
+    }
+     else if (this$static.value == 0) {
+      $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER_0, returnState);
+    }
+     else if ((this$static.value & 63488) == 55296) {
+      $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER_0, returnState);
+    }
+     else {
+      ch = this$static.value & 65535;
+      this$static.value == 13 || (this$static.value <= 8 || this$static.value == 11 || this$static.value >= 14 && this$static.value <= 31?(ch = $errNcrControlChar(this$static, ch)):this$static.value >= 64976 && this$static.value <= 65007 || ((this$static.value & 65534) == 65534?(ch = $errNcrNonCharacter(this$static, ch)):this$static.value >= 127 && this$static.value <= 159 && $err('Character reference expands to a control character (' + $toUPlusString(this$static.value & 65535) + ').')));
+      this$static.bmpChar[0] = ch;
+      $emitOrAppendOne(this$static, this$static.bmpChar, returnState);
+    }
+  }
+   else if (this$static.value <= 1114111) {
+    (this$static.value & 65534) == 65534 && $err('Character reference expands to an astral non-character (' + $toUPlusString(this$static.value) + ').');
+    this$static.astralChar[0] = 55232 + (this$static.value >> 10) & 65535;
+    this$static.astralChar[1] = 56320 + (this$static.value & 1023) & 65535;
+    $emitOrAppendTwo(this$static, this$static.astralChar, returnState);
+  }
+   else {
+    $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER_0, returnState);
+  }
+}
+
+function $initDoctypeFields(this$static){
+  this$static.doctypeName = '';
+  this$static.systemIdentifier != null && (this$static.systemIdentifier = null);
+  this$static.publicIdentifier != null && (this$static.publicIdentifier = null);
+  this$static.forceQuirks = false;
+}
+
+function $maybeAppendSpaceToBogusComment(this$static){
+  switch (this$static.commentPolicy.ordinal) {
+    case 2:
+      $appendLongStrBuf(this$static, 32);
+      break;
+    case 1:
+      $fatal_1(this$static, 'The document is not mappable to XML 1.0 due to a trailing hyphen in a comment.');
+  }
+}
+
+function $setStateAndEndTagExpectation(this$static, specialTokenizerState){
+  var asArray;
+  this$static.stateSave = specialTokenizerState;
+  if (specialTokenizerState == 0) {
+    return;
+  }
+  asArray = null.nullMethod();
+  this$static.endTagExpectation = elementNameByBuffer(asArray, 0, null.nullField);
+  $endTagExpectationToArray(this$static);
+}
+
+function $setStateAndEndTagExpectation_0(this$static, specialTokenizerState, endTagExpectation){
+  this$static.stateSave = specialTokenizerState;
+  this$static.endTagExpectation = endTagExpectation;
+  $endTagExpectationToArray(this$static);
+}
+
+function $setXmlnsPolicy(this$static, xmlnsPolicy){
+  if (xmlnsPolicy == ($clinit_115() , FATAL)) {
+    throw $IllegalArgumentException(new IllegalArgumentException, "Can't use FATAL here.");
+  }
+  this$static.xmlnsPolicy = xmlnsPolicy;
+}
+
+function $start_0(this$static){
+  this$static.confident = false;
+  this$static.strBuf = initDim(_3C_classLit, 46, -1, 64, 1);
+  this$static.longStrBuf = initDim(_3C_classLit, 46, -1, 1024, 1);
+  this$static.html4 = false;
+  this$static.metaBoundaryPassed = false;
+  this$static.wantsComments = this$static.tokenHandler.wantingComments;
+  !this$static.newAttributesEachTime && (this$static.attributes = $HtmlAttributes(new HtmlAttributes, this$static.mappingLangToXmlLang));
+  this$static.strBufLen = 0;
+  this$static.longStrBufLen = 0;
+  this$static.stateSave = 0;
+  this$static.lastCR = false;
+  this$static.index = 0;
+  this$static.forceQuirks = false;
+  this$static.additional = 0;
+  this$static.entCol = -1;
+  this$static.firstCharKey = -1;
+  this$static.lo = 0;
+  this$static.hi = 0;
+  this$static.candidate = -1;
+  this$static.strBufMark = 0;
+  this$static.prevValue = -1;
+  this$static.value = 0;
+  this$static.seenDigits = false;
+  this$static.endTag = false;
+  this$static.shouldSuspend = false;
+  $initDoctypeFields(this$static);
+  !!this$static.tagName && (this$static.tagName = null);
+  !!this$static.attributeName && (this$static.attributeName = null);
+  this$static.newAttributesEachTime && !!this$static.attributes && (this$static.attributes = null);
+  $startTokenization(this$static.tokenHandler, this$static);
+  this$static.alreadyComplainedAboutNonAscii = false;
+  this$static.line = this$static.linePrev = 0;
+  this$static.col = this$static.colPrev = 1;
+  this$static.nextCharOnNewLine = true;
+  this$static.prev = 0;
+  this$static.alreadyWarnedAboutPrivateUseCharacters = false;
+}
+
+function $stateLoop(this$static, state, c, pos, buf, reconsume, returnState, endPos){
+  var candidateName, ch, e, folded, hilo, i, row, val;
+  stateloop: for (;;) {
+    switch (state) {
+      case 0:
+        dataloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 38:
+              $flushChars(this$static, buf, pos);
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              this$static.additional = 0;
+              $LocatorImpl(new LocatorImpl, this$static);
+              returnState = state;
+              state = 46;
+              continue stateloop;
+            case 60:
+              $flushChars(this$static, buf, pos);
+              state = 9;
+              break dataloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 9:
+        tagopenloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (c >= 65 && c <= 90) {
+            this$static.endTag = false;
+            this$static.strBuf[0] = c + 32 & 65535;
+            this$static.strBufLen = 1;
+            state = 11;
+            break tagopenloop;
+          }
+           else if (c >= 97 && c <= 122) {
+            this$static.endTag = false;
+            this$static.strBuf[0] = c;
+            this$static.strBufLen = 1;
+            state = 11;
+            break tagopenloop;
+          }
+          switch (c) {
+            case 33:
+              state = 18;
+              continue stateloop;
+            case 47:
+              state = 10;
+              continue stateloop;
+            case 63:
+              this$static.longStrBuf[0] = c;
+              this$static.longStrBufLen = 1;
+              state = 17;
+              continue stateloop;
+            case 62:
+              $characters(this$static.tokenHandler, LT_GT, 0, 2);
+              this$static.cstart = pos + 1;
+              state = 0;
+              continue stateloop;
+            default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
+              this$static.cstart = pos;
+              state = 0;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 11:
+        tagnameloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
+              state = 12;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
+              state = 12;
+              break tagnameloop;
+            case 47:
+              this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
+              state = 54;
+              continue stateloop;
+            case 62:
+              this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            case 0:
+              c = 65533;
+            default:c >= 65 && c <= 90 && (c += 32);
+              $appendStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 12:
+        beforeattributenameloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 47:
+              state = 54;
+              continue stateloop;
+            case 62:
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            case 0:
+              c = 65533;
+            case 34:
+            case 39:
+            case 60:
+            case 61:
+            default:c >= 65 && c <= 90 && (c += 32);
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              state = 13;
+              break beforeattributenameloop;
+          }
+        }
+
+      case 13:
+        attributenameloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $attributeNameComplete(this$static);
+              state = 14;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              $attributeNameComplete(this$static);
+              state = 14;
+              continue stateloop;
+            case 47:
+              $attributeNameComplete(this$static);
+              $addAttributeWithoutValue(this$static);
+              state = 54;
+              continue stateloop;
+            case 61:
+              $attributeNameComplete(this$static);
+              state = 15;
+              break attributenameloop;
+            case 62:
+              $attributeNameComplete(this$static);
+              $addAttributeWithoutValue(this$static);
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            case 0:
+              c = 65533;
+            case 34:
+            case 39:
+            case 60:
+            default:c >= 65 && c <= 90 && (c += 32);
+              $appendStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 15:
+        beforeattributevalueloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 5;
+              break beforeattributevalueloop;
+            case 38:
+              this$static.longStrBufLen = 0;
+              state = 7;
+              reconsume = true;
+              continue stateloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 6;
+              continue stateloop;
+            case 62:
+              $addAttributeWithoutValue(this$static);
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            case 0:
+              c = 65533;
+            case 60:
+            case 61:
+            case 96:
+              $errLtOrEqualsOrGraveInUnquotedAttributeOrNull(c);
+            default:this$static.longStrBuf[0] = c;
+              this$static.longStrBufLen = 1;
+              state = 7;
+              continue stateloop;
+          }
+        }
+
+      case 5:
+        attributevaluedoublequotedloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 34:
+              $addAttributeWithValue(this$static);
+              state = 16;
+              break attributevaluedoublequotedloop;
+            case 38:
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              this$static.additional = 34;
+              $LocatorImpl(new LocatorImpl, this$static);
+              returnState = state;
+              state = 46;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 16:
+        afterattributevaluequotedloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              state = 12;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              state = 12;
+              continue stateloop;
+            case 47:
+              state = 54;
+              break afterattributevaluequotedloop;
+            case 62:
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            default:state = 12;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 54:
+        if (++pos == endPos) {
+          break stateloop;
+        }
+
+        c = $checkChar(this$static, buf, pos);
+        switch (c) {
+          case 62:
+            state = $emitCurrentTagToken(this$static, true, pos);
+            if (this$static.shouldSuspend) {
+              break stateloop;
+            }
+
+            continue stateloop;
+          default:state = 12;
+            reconsume = true;
+            continue stateloop;
+        }
+
+      case 7:
+        for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $addAttributeWithValue(this$static);
+              state = 12;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              $addAttributeWithValue(this$static);
+              state = 12;
+              continue stateloop;
+            case 38:
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              this$static.additional = 62;
+              $LocatorImpl(new LocatorImpl, this$static);
+              returnState = state;
+              state = 46;
+              continue stateloop;
+            case 62:
+              $addAttributeWithValue(this$static);
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            case 0:
+              c = 65533;
+            case 60:
+            case 34:
+            case 39:
+            case 61:
+            case 96:
+              $errUnquotedAttributeValOrNull(c);
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 14:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 47:
+              $addAttributeWithoutValue(this$static);
+              state = 54;
+              continue stateloop;
+            case 61:
+              state = 15;
+              continue stateloop;
+            case 62:
+              $addAttributeWithoutValue(this$static);
+              state = $emitCurrentTagToken(this$static, false, pos);
+              if (this$static.shouldSuspend) {
+                break stateloop;
+              }
+
+              continue stateloop;
+            case 0:
+              c = 65533;
+            case 34:
+            case 39:
+            case 60:
+            default:$addAttributeWithoutValue(this$static);
+              c >= 65 && c <= 90 && (c += 32);
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              state = 13;
+              continue stateloop;
+          }
+        }
+
+      case 18:
+        markupdeclarationopenloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              this$static.longStrBuf[0] = c;
+              this$static.longStrBufLen = 1;
+              state = 39;
+              break markupdeclarationopenloop;
+            case 100:
+            case 68:
+              this$static.longStrBuf[0] = c;
+              this$static.longStrBufLen = 1;
+              this$static.index = 0;
+              state = 40;
+              continue stateloop;
+            case 91:
+              if ($cdataSectionAllowed(this$static.tokenHandler)) {
+                this$static.longStrBuf[0] = c;
+                this$static.longStrBufLen = 1;
+                this$static.index = 0;
+                state = 55;
+                continue stateloop;
+              }
+
+            default:this$static.longStrBufLen = 0;
+              state = 17;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 39:
+        markupdeclarationhyphenloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 0:
+              break stateloop;
+            case 45:
+              this$static.longStrBufLen = 0;
+              state = 32;
+              break markupdeclarationhyphenloop;
+            default:state = 17;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 32:
+        commentstartloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              $appendLongStrBuf(this$static, c);
+              state = 33;
+              continue stateloop;
+            case 62:
+              this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+              this$static.cstart = pos + 1;
+              state = 0;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              state = 34;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              state = 34;
+              break commentstartloop;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              state = 34;
+              break commentstartloop;
+          }
+        }
+
+      case 34:
+        commentloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              $appendLongStrBuf(this$static, c);
+              state = 35;
+              break commentloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 35:
+        commentenddashloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              $appendLongStrBuf(this$static, c);
+              state = 36;
+              break commentenddashloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              state = 34;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              state = 34;
+              continue stateloop;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              state = 34;
+              continue stateloop;
+          }
+        }
+
+      case 36:
+        commentendloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 62:
+              this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 2);
+              this$static.cstart = pos + 1;
+              state = 0;
+              continue stateloop;
+            case 45:
+              $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
+              continue;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, 10);
+              state = 34;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, 10);
+              state = 34;
+              continue stateloop;
+            case 33:
+              $appendLongStrBuf(this$static, c);
+              state = 37;
+              continue stateloop;
+            case 0:
+              c = 65533;
+            default:$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
+              state = 34;
+              continue stateloop;
+          }
+        }
+
+      case 37:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 62:
+              this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 3);
+              this$static.cstart = pos + 1;
+              state = 0;
+              continue stateloop;
+            case 45:
+              $appendLongStrBuf(this$static, c);
+              state = 35;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              state = 34;
+              continue stateloop;
+          }
+        }
+
+      case 33:
+        if (++pos == endPos) {
+          break stateloop;
+        }
+
+        c = $checkChar(this$static, buf, pos);
+        switch (c) {
+          case 45:
+            $appendLongStrBuf(this$static, c);
+            state = 36;
+            continue stateloop;
+          case 62:
+            this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 1);
+            this$static.cstart = pos + 1;
+            state = 0;
+            continue stateloop;
+          case 13:
+            this$static.nextCharOnNewLine = true;
+            this$static.lastCR = true;
+            $appendLongStrBuf(this$static, 10);
+            state = 34;
+            break stateloop;
+          case 10:
+            this$static.nextCharOnNewLine = true;
+            $appendLongStrBuf(this$static, 10);
+            state = 34;
+            continue stateloop;
+          case 0:
+            c = 65533;
+          default:$appendLongStrBuf(this$static, c);
+            state = 34;
+            continue stateloop;
+        }
+
+      case 55:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < 6) {
+            if (c == CDATA_LSQB[this$static.index]) {
+              $appendLongStrBuf(this$static, c);
+            }
+             else {
+              state = 17;
+              reconsume = true;
+              continue stateloop;
+            }
+            ++this$static.index;
+            continue;
+          }
+           else {
+            this$static.cstart = pos;
+            state = 56;
+            reconsume = true;
+            break;
+          }
+        }
+
+      case 56:
+        cdatasectionloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 93:
+              $flushChars(this$static, buf, pos);
+              state = 57;
+              break cdatasectionloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 57:
+        cdatarsqb: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 93:
+              state = 58;
+              break cdatarsqb;
+            default:$characters(this$static.tokenHandler, RSQB_RSQB, 0, 1);
+              this$static.cstart = pos;
+              state = 56;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 58:
+        if (++pos == endPos) {
+          break stateloop;
+        }
+
+        c = $checkChar(this$static, buf, pos);
+        switch (c) {
+          case 62:
+            this$static.cstart = pos + 1;
+            state = 0;
+            continue stateloop;
+          default:$characters(this$static.tokenHandler, RSQB_RSQB, 0, 2);
+            this$static.cstart = pos;
+            state = 56;
+            reconsume = true;
+            continue stateloop;
+        }
+
+      case 6:
+        attributevaluesinglequotedloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 39:
+              $addAttributeWithValue(this$static);
+              state = 16;
+              continue stateloop;
+            case 38:
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              this$static.additional = 39;
+              $LocatorImpl(new LocatorImpl, this$static);
+              returnState = state;
+              state = 46;
+              break attributevaluesinglequotedloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 46:
+        if (++pos == endPos) {
+          break stateloop;
+        }
+
+        c = $checkChar(this$static, buf, pos);
+        if (c == 0) {
+          break stateloop;
+        }
+
+        switch (c) {
+          case 32:
+          case 9:
+          case 10:
+          case 13:
+          case 12:
+          case 60:
+          case 38:
+            (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+            (returnState & -2) == 0 && (this$static.cstart = pos);
+            state = returnState;
+            reconsume = true;
+            continue stateloop;
+          case 35:
+            $appendStrBuf(this$static, 35);
+            state = 47;
+            continue stateloop;
+          default:if (c == this$static.additional) {
+              (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+              state = returnState;
+              reconsume = true;
+              continue stateloop;
+            }
+
+            if (c >= 97 && c <= 122) {
+              this$static.firstCharKey = c - 97 + 26;
+            }
+             else if (c >= 65 && c <= 90) {
+              this$static.firstCharKey = c - 65;
+            }
+             else {
+              (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+              (returnState & -2) == 0 && (this$static.cstart = pos);
+              state = returnState;
+              reconsume = true;
+              continue stateloop;
+            }
+
+            $appendStrBuf(this$static, c);
+            state = 53;
+        }
+
+      case 53:
+        {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (c == 0) {
+            break stateloop;
+          }
+          hilo = 0;
+          if (c <= 122) {
+            row = ($clinit_132() , HILO_ACCEL)[c];
+            row != null && (hilo = row[this$static.firstCharKey]);
+          }
+          if (hilo == 0) {
+            (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+            (returnState & -2) == 0 && (this$static.cstart = pos);
+            state = returnState;
+            reconsume = true;
+            continue stateloop;
+          }
+          $appendStrBuf(this$static, c);
+          this$static.lo = hilo & 65535;
+          this$static.hi = hilo >> 16;
+          this$static.entCol = -1;
+          this$static.candidate = -1;
+          this$static.strBufMark = 0;
+          state = 48;
+        }
+
+      case 48:
+        outer: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (c == 0) {
+            break stateloop;
+          }
+          ++this$static.entCol;
+          loloop: for (;;) {
+            if (this$static.hi < this$static.lo) {
+              break outer;
+            }
+            if (this$static.entCol == ($clinit_131() , NAMES)[this$static.lo].length) {
+              this$static.candidate = this$static.lo;
+              this$static.strBufMark = this$static.strBufLen;
+              ++this$static.lo;
+            }
+             else if (this$static.entCol > NAMES[this$static.lo].length) {
+              break outer;
+            }
+             else if (c > NAMES[this$static.lo].charCodeAt(this$static.entCol)) {
+              ++this$static.lo;
+            }
+             else {
+              break loloop;
+            }
+          }
+          hiloop: for (;;) {
+            if (this$static.hi < this$static.lo) {
+              break outer;
+            }
+            if (this$static.entCol == ($clinit_131() , NAMES)[this$static.hi].length) {
+              break hiloop;
+            }
+            if (this$static.entCol > NAMES[this$static.hi].length) {
+              break outer;
+            }
+             else if (c < NAMES[this$static.hi].charCodeAt(this$static.entCol)) {
+              --this$static.hi;
+            }
+             else {
+              break hiloop;
+            }
+          }
+          if (this$static.hi < this$static.lo) {
+            break outer;
+          }
+          $appendStrBuf(this$static, c);
+          continue;
+        }
+
+        if (this$static.candidate == -1) {
+          (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+          (returnState & -2) == 0 && (this$static.cstart = pos);
+          state = returnState;
+          reconsume = true;
+          continue stateloop;
+        }
+         else {
+          candidateName = ($clinit_131() , NAMES)[this$static.candidate];
+          if (candidateName.length == 0 || candidateName.charCodeAt(candidateName.length - 1) != 59) {
+            if ((returnState & -2) != 0) {
+              this$static.strBufMark == this$static.strBufLen?(ch = c):(ch = this$static.strBuf[this$static.strBufMark]);
+              if (ch == 61 || ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) {
+                $appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
+                state = returnState;
+                reconsume = true;
+                continue stateloop;
+              }
+            }
+          }
+          val = VALUES_0[this$static.candidate];
+          val.length == 1?((returnState & -2) != 0?$appendLongStrBuf(this$static, val[0]):$characters(this$static.tokenHandler, val, 0, 1) , undefined):$emitOrAppendTwo(this$static, val, returnState);
+          if (this$static.strBufMark < this$static.strBufLen) {
+            if ((returnState & -2) != 0) {
+              for (i = this$static.strBufMark; i < this$static.strBufLen; ++i) {
+                $appendLongStrBuf(this$static, this$static.strBuf[i]);
+              }
+            }
+             else {
+              $characters(this$static.tokenHandler, this$static.strBuf, this$static.strBufMark, this$static.strBufLen - this$static.strBufMark);
+            }
+          }
+          (returnState & -2) == 0 && (this$static.cstart = pos);
+          state = returnState;
+          reconsume = true;
+          continue stateloop;
+        }
+
+      case 47:
+        if (++pos == endPos) {
+          break stateloop;
+        }
+
+        c = $checkChar(this$static, buf, pos);
+        this$static.prevValue = -1;
+        this$static.value = 0;
+        this$static.seenDigits = false;
+        switch (c) {
+          case 120:
+          case 88:
+            $appendStrBuf(this$static, c);
+            state = 49;
+            continue stateloop;
+          default:state = 50;
+            reconsume = true;
+        }
+
+      case 50:
+        decimalloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          this$static.value < this$static.prevValue && (this$static.value = 1114112);
+          this$static.prevValue = this$static.value;
+          if (c >= 48 && c <= 57) {
+            this$static.seenDigits = true;
+            this$static.value *= 10;
+            this$static.value += c - 48;
+            continue;
+          }
+           else if (c == 59) {
+            if (this$static.seenDigits) {
+              (returnState & -2) == 0 && (this$static.cstart = pos + 1);
+              state = 51;
+              break decimalloop;
+            }
+             else {
+              $err('No digits after \u201C' + valueOf_0(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.');
+              $appendStrBuf(this$static, 59);
+              (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+              (returnState & -2) == 0 && (this$static.cstart = pos + 1);
+              state = returnState;
+              continue stateloop;
+            }
+          }
+           else {
+            if (this$static.seenDigits) {
+              (returnState & -2) == 0 && (this$static.cstart = pos);
+              state = 51;
+              reconsume = true;
+              break decimalloop;
+            }
+             else {
+              $err('No digits after \u201C' + valueOf_0(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.');
+              (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+              (returnState & -2) == 0 && (this$static.cstart = pos);
+              state = returnState;
+              reconsume = true;
+              continue stateloop;
+            }
+          }
+        }
+
+      case 51:
+        $handleNcrValue(this$static, returnState);
+        state = returnState;
+        continue stateloop;
+      case 49:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          this$static.value < this$static.prevValue && (this$static.value = 1114112);
+          this$static.prevValue = this$static.value;
+          if (c >= 48 && c <= 57) {
+            this$static.seenDigits = true;
+            this$static.value *= 16;
+            this$static.value += c - 48;
+            continue;
+          }
+           else if (c >= 65 && c <= 70) {
+            this$static.seenDigits = true;
+            this$static.value *= 16;
+            this$static.value += c - 65 + 10;
+            continue;
+          }
+           else if (c >= 97 && c <= 102) {
+            this$static.seenDigits = true;
+            this$static.value *= 16;
+            this$static.value += c - 97 + 10;
+            continue;
+          }
+           else if (c == 59) {
+            if (this$static.seenDigits) {
+              (returnState & -2) == 0 && (this$static.cstart = pos + 1);
+              state = 51;
+              continue stateloop;
+            }
+             else {
+              $err('No digits after \u201C' + valueOf_0(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.');
+              $appendStrBuf(this$static, 59);
+              (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+              (returnState & -2) == 0 && (this$static.cstart = pos + 1);
+              state = returnState;
+              continue stateloop;
+            }
+          }
+           else {
+            if (this$static.seenDigits) {
+              (returnState & -2) == 0 && (this$static.cstart = pos);
+              state = 51;
+              reconsume = true;
+              continue stateloop;
+            }
+             else {
+              $err('No digits after \u201C' + valueOf_0(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.');
+              (returnState & -2) != 0?$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen):$emitStrBuf(this$static);
+              (returnState & -2) == 0 && (this$static.cstart = pos);
+              state = returnState;
+              reconsume = true;
+              continue stateloop;
+            }
+          }
+        }
+
+      case 8:
+        plaintextloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $characters(this$static.tokenHandler, REPLACEMENT_CHARACTER_0, 0, 1);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 10:
+        if (++pos == endPos) {
+          break stateloop;
+        }
+
+        c = $checkChar(this$static, buf, pos);
+        switch (c) {
+          case 62:
+            this$static.cstart = pos + 1;
+            state = 0;
+            continue stateloop;
+          case 13:
+            this$static.nextCharOnNewLine = true;
+            this$static.lastCR = true;
+            this$static.longStrBuf[0] = 10;
+            this$static.longStrBufLen = 1;
+            state = 17;
+            break stateloop;
+          case 10:
+            this$static.nextCharOnNewLine = true;
+            this$static.longStrBuf[0] = 10;
+            this$static.longStrBufLen = 1;
+            state = 17;
+            continue stateloop;
+          case 0:
+            c = 65533;
+          default:c >= 65 && c <= 90 && (c += 32);
+            if (c >= 97 && c <= 122) {
+              this$static.endTag = true;
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              state = 11;
+              continue stateloop;
+            }
+             else {
+              this$static.longStrBuf[0] = c;
+              this$static.longStrBufLen = 1;
+              state = 17;
+              continue stateloop;
+            }
+
+        }
+
+      case 1:
+        rcdataloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 38:
+              $flushChars(this$static, buf, pos);
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              this$static.additional = 0;
+              returnState = state;
+              state = 46;
+              continue stateloop;
+            case 60:
+              $flushChars(this$static, buf, pos);
+              returnState = state;
+              state = 65;
+              continue stateloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 3:
+        rawtextloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 60:
+              $flushChars(this$static, buf, pos);
+              returnState = state;
+              state = 65;
+              break rawtextloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 65:
+        rawtextrcdatalessthansignloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 47:
+              this$static.index = 0;
+              this$static.strBufLen = 0;
+              state = 38;
+              break rawtextrcdatalessthansignloop;
+            default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
+              this$static.cstart = pos;
+              state = returnState;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 38:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < this$static.endTagExpectationAsArray.length) {
+            e = this$static.endTagExpectationAsArray[this$static.index];
+            folded = c;
+            c >= 65 && c <= 90 && (folded += 32);
+            if (folded != e) {
+              this$static.html4 && (this$static.index > 0 || folded >= 97 && folded <= 122) && ($clinit_125() , IFRAME) != this$static.endTagExpectation;
+              $characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
+              $emitStrBuf(this$static);
+              this$static.cstart = pos;
+              state = returnState;
+              reconsume = true;
+              continue stateloop;
+            }
+            $appendStrBuf(this$static, c);
+            ++this$static.index;
+            continue;
+          }
+           else {
+            this$static.endTag = true;
+            this$static.tagName = this$static.endTagExpectation;
+            switch (c) {
+              case 13:
+                this$static.nextCharOnNewLine = true;
+                this$static.lastCR = true;
+                state = 12;
+                break stateloop;
+              case 10:
+                this$static.nextCharOnNewLine = true;
+              case 32:
+              case 9:
+              case 12:
+                state = 12;
+                continue stateloop;
+              case 47:
+                state = 54;
+                continue stateloop;
+              case 62:
+                state = $emitCurrentTagToken(this$static, false, pos);
+                if (this$static.shouldSuspend) {
+                  break stateloop;
+                }
+
+                continue stateloop;
+              default:$characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
+                $emitStrBuf(this$static);
+                c == 0?($flushChars(this$static, buf, pos) , $zeroOriginatingReplacementCharacter(this$static.tokenHandler) , this$static.cstart = pos + 1 , undefined):(this$static.cstart = pos);
+                state = returnState;
+                continue stateloop;
+            }
+          }
+        }
+
+      case 17:
+        boguscommentloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 62:
+              this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+              this$static.cstart = pos + 1;
+              state = 0;
+              continue stateloop;
+            case 45:
+              $appendLongStrBuf(this$static, c);
+              state = 64;
+              break boguscommentloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 64:
+        boguscommenthyphenloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 62:
+              $maybeAppendSpaceToBogusComment(this$static);
+              this$static.wantsComments && $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - 0);
+              this$static.cstart = pos + 1;
+              state = 0;
+              continue stateloop;
+            case 45:
+              $appendSecondHyphenToBogusComment(this$static);
+              continue boguscommenthyphenloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              state = 17;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              state = 17;
+              continue stateloop;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              state = 17;
+              continue stateloop;
+          }
+        }
+
+      case 2:
+        scriptdataloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 60:
+              $flushChars(this$static, buf, pos);
+              returnState = state;
+              state = 59;
+              break scriptdataloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 59:
+        scriptdatalessthansignloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 47:
+              this$static.index = 0;
+              this$static.strBufLen = 0;
+              state = 38;
+              continue stateloop;
+            case 33:
+              $characters(this$static.tokenHandler, LT_GT, 0, 1);
+              this$static.cstart = pos;
+              state = 60;
+              break scriptdatalessthansignloop;
+            default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
+              this$static.cstart = pos;
+              state = 2;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 60:
+        scriptdataescapestartloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              state = 61;
+              break scriptdataescapestartloop;
+            default:state = 2;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 61:
+        scriptdataescapestartdashloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              state = 63;
+              break scriptdataescapestartdashloop;
+            default:state = 2;
+              reconsume = true;
+              continue stateloop;
+          }
+        }
+
+      case 63:
+        scriptdataescapeddashdashloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              continue;
+            case 60:
+              $flushChars(this$static, buf, pos);
+              state = 66;
+              continue stateloop;
+            case 62:
+              state = 2;
+              continue stateloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              state = 4;
+              break scriptdataescapeddashdashloop;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              state = 4;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:state = 4;
+              break scriptdataescapeddashdashloop;
+          }
+        }
+
+      case 4:
+        scriptdataescapedloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 45:
+              state = 62;
+              break scriptdataescapedloop;
+            case 60:
+              $flushChars(this$static, buf, pos);
+              state = 66;
+              continue stateloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 62:
+        scriptdataescapeddashloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              state = 63;
+              continue stateloop;
+            case 60:
+              $flushChars(this$static, buf, pos);
+              state = 66;
+              break scriptdataescapeddashloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              state = 4;
+              continue stateloop;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              state = 4;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:state = 4;
+              continue stateloop;
+          }
+        }
+
+      case 66:
+        scriptdataescapedlessthanloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 47:
+              this$static.index = 0;
+              this$static.strBufLen = 0;
+              returnState = 4;
+              state = 38;
+              continue stateloop;
+            case 83:
+            case 115:
+              $characters(this$static.tokenHandler, LT_GT, 0, 1);
+              this$static.cstart = pos;
+              this$static.index = 1;
+              state = 67;
+              break scriptdataescapedlessthanloop;
+            default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
+              this$static.cstart = pos;
+              reconsume = true;
+              state = 4;
+              continue stateloop;
+          }
+        }
+
+      case 67:
+        scriptdatadoubleescapestartloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < 6) {
+            folded = c;
+            c >= 65 && c <= 90 && (folded += 32);
+            if (folded != SCRIPT_ARR[this$static.index]) {
+              reconsume = true;
+              state = 4;
+              continue stateloop;
+            }
+            ++this$static.index;
+            continue;
+          }
+          switch (c) {
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              state = 68;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+            case 47:
+            case 62:
+              state = 68;
+              break scriptdatadoubleescapestartloop;
+            default:reconsume = true;
+              state = 4;
+              continue stateloop;
+          }
+        }
+
+      case 68:
+        scriptdatadoubleescapedloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 45:
+              state = 70;
+              break scriptdatadoubleescapedloop;
+            case 60:
+              state = 69;
+              continue stateloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              continue;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 70:
+        scriptdatadoubleescapeddashloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              state = 71;
+              break scriptdatadoubleescapeddashloop;
+            case 60:
+              state = 69;
+              continue stateloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              state = 68;
+              continue stateloop;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              state = 68;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:state = 68;
+              continue stateloop;
+          }
+        }
+
+      case 71:
+        scriptdatadoubleescapeddashdashloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 45:
+              continue;
+            case 60:
+              state = 69;
+              break scriptdatadoubleescapeddashdashloop;
+            case 62:
+              state = 2;
+              continue stateloop;
+            case 0:
+              $flushChars(this$static, buf, pos);
+              $zeroOriginatingReplacementCharacter(this$static.tokenHandler);
+              this$static.cstart = pos + 1;
+              state = 68;
+              continue stateloop;
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              state = 68;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:state = 68;
+              continue stateloop;
+          }
+        }
+
+      case 69:
+        scriptdatadoubleescapedlessthanloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 47:
+              this$static.index = 0;
+              state = 72;
+              break scriptdatadoubleescapedlessthanloop;
+            default:reconsume = true;
+              state = 68;
+              continue stateloop;
+          }
+        }
+
+      case 72:
+        scriptdatadoubleescapeendloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < 6) {
+            folded = c;
+            c >= 65 && c <= 90 && (folded += 32);
+            if (folded != SCRIPT_ARR[this$static.index]) {
+              reconsume = true;
+              state = 68;
+              continue stateloop;
+            }
+            ++this$static.index;
+            continue;
+          }
+          switch (c) {
+            case 13:
+              $emitCarriageReturn(this$static, buf, pos);
+              state = 4;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+            case 47:
+            case 62:
+              state = 4;
+              continue stateloop;
+            default:reconsume = true;
+              state = 68;
+              continue stateloop;
+          }
+        }
+
+      case 40:
+        markupdeclarationdoctypeloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < 6) {
+            folded = c;
+            c >= 65 && c <= 90 && (folded += 32);
+            if (folded == OCTYPE[this$static.index]) {
+              $appendLongStrBuf(this$static, c);
+            }
+             else {
+              state = 17;
+              reconsume = true;
+              continue stateloop;
+            }
+            ++this$static.index;
+            continue;
+          }
+           else {
+            state = 19;
+            reconsume = true;
+            break markupdeclarationdoctypeloop;
+          }
+        }
+
+      case 19:
+        doctypeloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          $initDoctypeFields(this$static);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              state = 20;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              state = 20;
+              break doctypeloop;
+            default:state = 20;
+              reconsume = true;
+              break doctypeloop;
+          }
+        }
+
+      case 20:
+        beforedoctypenameloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 62:
+              this$static.forceQuirks = true;
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 0:
+              c = 65533;
+            default:c >= 65 && c <= 90 && (c += 32);
+              this$static.strBuf[0] = c;
+              this$static.strBufLen = 1;
+              state = 21;
+              break beforedoctypenameloop;
+          }
+        }
+
+      case 21:
+        doctypenameloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              this$static.doctypeName = String(valueOf_0(this$static.strBuf, 0, this$static.strBufLen));
+              state = 22;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              this$static.doctypeName = String(valueOf_0(this$static.strBuf, 0, this$static.strBufLen));
+              state = 22;
+              break doctypenameloop;
+            case 62:
+              this$static.doctypeName = String(valueOf_0(this$static.strBuf, 0, this$static.strBufLen));
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 0:
+              c = 65533;
+            default:c >= 65 && c <= 90 && (c += 32);
+              $appendStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 22:
+        afterdoctypenameloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 62:
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 112:
+            case 80:
+              this$static.index = 0;
+              state = 41;
+              break afterdoctypenameloop;
+            case 115:
+            case 83:
+              this$static.index = 0;
+              state = 42;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 41:
+        doctypeublicloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < 5) {
+            folded = c;
+            c >= 65 && c <= 90 && (folded += 32);
+            if (folded != UBLIC[this$static.index]) {
+              this$static.forceQuirks = true;
+              state = 31;
+              reconsume = true;
+              continue stateloop;
+            }
+            ++this$static.index;
+            continue;
+          }
+           else {
+            state = 43;
+            reconsume = true;
+            break doctypeublicloop;
+          }
+        }
+
+      case 43:
+        afterdoctypepublickeywordloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              state = 23;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              state = 23;
+              break afterdoctypepublickeywordloop;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 24;
+              continue stateloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 25;
+              continue stateloop;
+            case 62:
+              this$static.forceQuirks = true;
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 23:
+        beforedoctypepublicidentifierloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 24;
+              break beforedoctypepublicidentifierloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 25;
+              continue stateloop;
+            case 62:
+              this$static.forceQuirks = true;
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 24:
+        doctypepublicidentifierdoublequotedloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 34:
+              this$static.publicIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              state = 26;
+              break doctypepublicidentifierdoublequotedloop;
+            case 62:
+              this$static.forceQuirks = true;
+              this$static.publicIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 26:
+        afterdoctypepublicidentifierloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              state = 44;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              state = 44;
+              break afterdoctypepublicidentifierloop;
+            case 62:
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 28;
+              continue stateloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 29;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 44:
+        betweendoctypepublicandsystemidentifiersloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 62:
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 28;
+              break betweendoctypepublicandsystemidentifiersloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 29;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 28:
+        doctypesystemidentifierdoublequotedloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 34:
+              this$static.systemIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              state = 30;
+              continue stateloop;
+            case 62:
+              this$static.forceQuirks = true;
+              this$static.systemIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 30:
+        afterdoctypesystemidentifierloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 62:
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            default:this$static.forceQuirks = false;
+              state = 31;
+              break afterdoctypesystemidentifierloop;
+          }
+        }
+
+      case 31:
+        for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 62:
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            default:continue;
+          }
+        }
+
+      case 42:
+        doctypeystemloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          if (this$static.index < 5) {
+            folded = c;
+            c >= 65 && c <= 90 && (folded += 32);
+            if (folded != YSTEM[this$static.index]) {
+              this$static.forceQuirks = true;
+              state = 31;
+              reconsume = true;
+              continue stateloop;
+            }
+            ++this$static.index;
+            continue stateloop;
+          }
+           else {
+            state = 45;
+            reconsume = true;
+            break doctypeystemloop;
+          }
+        }
+
+      case 45:
+        afterdoctypesystemkeywordloop: for (;;) {
+          if (reconsume) {
+            reconsume = false;
+          }
+           else {
+            if (++pos == endPos) {
+              break stateloop;
+            }
+            c = $checkChar(this$static, buf, pos);
+          }
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              state = 27;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              state = 27;
+              break afterdoctypesystemkeywordloop;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 28;
+              continue stateloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 29;
+              continue stateloop;
+            case 62:
+              this$static.forceQuirks = true;
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 27:
+        beforedoctypesystemidentifierloop: for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+            case 32:
+            case 9:
+            case 12:
+              continue;
+            case 34:
+              this$static.longStrBufLen = 0;
+              state = 28;
+              continue stateloop;
+            case 39:
+              this$static.longStrBufLen = 0;
+              state = 29;
+              break beforedoctypesystemidentifierloop;
+            case 62:
+              this$static.forceQuirks = true;
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            default:this$static.forceQuirks = true;
+              state = 31;
+              continue stateloop;
+          }
+        }
+
+      case 29:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 39:
+              this$static.systemIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              state = 30;
+              continue stateloop;
+            case 62:
+              this$static.forceQuirks = true;
+              this$static.systemIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+      case 25:
+        for (;;) {
+          if (++pos == endPos) {
+            break stateloop;
+          }
+          c = $checkChar(this$static, buf, pos);
+          switch (c) {
+            case 39:
+              this$static.publicIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              state = 26;
+              continue stateloop;
+            case 62:
+              this$static.forceQuirks = true;
+              this$static.publicIdentifier = valueOf_0(this$static.longStrBuf, 0, this$static.longStrBufLen);
+              $emitDoctypeToken(this$static, pos);
+              state = 0;
+              continue stateloop;
+            case 13:
+              this$static.nextCharOnNewLine = true;
+              this$static.lastCR = true;
+              $appendLongStrBuf(this$static, 10);
+              break stateloop;
+            case 10:
+              this$static.nextCharOnNewLine = true;
+              $appendLongStrBuf(this$static, 10);
+              continue;
+            case 0:
+              c = 65533;
+            default:$appendLongStrBuf(this$static, c);
+              continue;
+          }
+        }
+
+    }
+  }
+  $flushChars(this$static, buf, pos);
+  this$static.stateSave = state;
+  this$static.returnStateSave = returnState;
+  return pos;
+}
+
+function $tokenizeBuffer(this$static, buffer){
+  var pos, returnState, start, state;
+  state = this$static.stateSave;
+  returnState = this$static.returnStateSave;
+  this$static.shouldSuspend = false;
+  this$static.lastCR = false;
+  start = buffer.start;
+  pos = start - 1;
+  switch (state) {
+    case 0:
+    case 1:
+    case 2:
+    case 8:
+    case 3:
+    case 56:
+    case 4:
+    case 60:
+    case 61:
+    case 62:
+    case 63:
+    case 67:
+    case 68:
+    case 69:
+    case 70:
+    case 71:
+    case 72:
+      this$static.cstart = start;
+      break;
+    default:this$static.cstart = 2147483647;
+  }
+  pos = $stateLoop(this$static, state, 0, pos, buffer.buffer, false, returnState, buffer.end);
+  pos == buffer.end?(buffer.start = pos):(buffer.start = pos + 1);
+  return this$static.lastCR;
+}
+
+function $warn(){
+  return;
+}
+
+function getClass_69(){
+  return Lnu_validator_htmlparser_impl_Tokenizer_2_classLit;
+}
+
+function newAsciiLowerCaseStringFromString(str){
+  var buf, c, i;
+  if (str == null) {
+    return null;
+  }
+  buf = initDim(_3C_classLit, 46, -1, str.length, 1);
+  for (i = 0; i < str.length; ++i) {
+    c = str.charCodeAt(i);
+    c >= 65 && c <= 90 && (c += 32);
+    buf[i] = c;
+  }
+  return String.fromCharCode.apply(null, buf);
+}
+
+function Tokenizer(){
+}
+
+_ = Tokenizer.prototype = new Object_0;
+_.getClass$ = getClass_69;
+_.typeId$ = 0;
+_.additional = 0;
+_.astralChar = null;
+_.attributeName = null;
+_.attributes = null;
+_.bmpChar = null;
+_.candidate = 0;
+_.confident = false;
+_.cstart = 0;
+_.doctypeName = null;
+_.endTag = false;
+_.endTagExpectation = null;
+_.endTagExpectationAsArray = null;
+_.entCol = 0;
+_.firstCharKey = 0;
+_.forceQuirks = false;
+_.hi = 0;
+_.html4 = false;
+_.html4ModeCompatibleWithXhtml1Schemata = false;
+_.index = 0;
+_.lastCR = false;
+_.lo = 0;
+_.longStrBuf = null;
+_.longStrBufLen = 0;
+_.mappingLangToXmlLang = 0;
+_.metaBoundaryPassed = false;
+_.newAttributesEachTime = false;
+_.prevValue = 0;
+_.publicIdentifier = null;
+_.returnStateSave = 0;
+_.seenDigits = false;
+_.shouldSuspend = false;
+_.stateSave = 0;
+_.strBuf = null;
+_.strBufLen = 0;
+_.strBufMark = 0;
+_.systemIdentifier = null;
+_.tagName = null;
+_.tokenHandler = null;
+_.value = 0;
+_.wantsComments = false;
+var CDATA_LSQB, IFRAME_ARR, LF, LT_GT, LT_SOLIDUS, NOEMBED_ARR, NOFRAMES_ARR, NOSCRIPT_ARR, OCTYPE, PLAINTEXT_ARR, REPLACEMENT_CHARACTER_0, RSQB_RSQB, SCRIPT_ARR, SPACE, STYLE_ARR, TEXTAREA_ARR, TITLE_ARR, UBLIC, XMP_ARR, YSTEM;
+function $clinit_127(){
+  $clinit_127 = nullMethod;
+  $clinit_126();
+}
+
+function $ErrorReportingTokenizer(this$static, tokenHandler){
+  $clinit_127();
+  this$static.contentSpacePolicy = ($clinit_115() , ALTER_INFOSET);
+  this$static.commentPolicy = ALTER_INFOSET;
+  this$static.xmlnsPolicy = ALTER_INFOSET;
+  this$static.namePolicy = ALTER_INFOSET;
+  this$static.tokenHandler = tokenHandler;
+  this$static.newAttributesEachTime = false;
+  this$static.bmpChar = initDim(_3C_classLit, 46, -1, 1, 1);
+  this$static.astralChar = initDim(_3C_classLit, 46, -1, 2, 1);
+  this$static.tagName = null;
+  this$static.attributeName = null;
+  this$static.doctypeName = null;
+  this$static.publicIdentifier = null;
+  this$static.systemIdentifier = null;
+  this$static.attributes = null;
+  this$static.contentNonXmlCharPolicy = ALTER_INFOSET;
+  return this$static;
+}
+
+function $checkChar(this$static, buf, pos){
+  var c, intVal;
+  this$static.linePrev = this$static.line;
+  this$static.colPrev = this$static.col;
+  if (this$static.nextCharOnNewLine) {
+    ++this$static.line;
+    this$static.col = 1;
+    this$static.nextCharOnNewLine = false;
+  }
+   else {
+    ++this$static.col;
+  }
+  c = buf[pos];
+  !this$static.confident && !this$static.alreadyComplainedAboutNonAscii && c > 127 && (this$static.alreadyComplainedAboutNonAscii = true);
+  switch (c) {
+    case 0:
+    case 9:
+    case 13:
+    case 10:
+      break;
+    case 12:
+      if (this$static.contentNonXmlCharPolicy == ($clinit_115() , FATAL)) {
+        $fatal_1(this$static, 'This document is not mappable to XML 1.0 without data loss due to ' + $toUPlusString(c) + ' which is not a legal XML 1.0 character.');
+      }
+       else {
+        this$static.contentNonXmlCharPolicy == ALTER_INFOSET && (c = buf[pos] = 32);
+        $warn('This document is not mappable to XML 1.0 without data loss due to ' + $toUPlusString(c) + ' which is not a legal XML 1.0 character.');
+      }
+
+      break;
+    default:if ((c & 64512) == 56320) {
+        if ((this$static.prev & 64512) == 55296) {
+          intVal = (this$static.prev << 10) + c + -56613888;
+          (intVal >= 983040 && intVal <= 1048573 || intVal >= 1048576 && intVal <= 1114109) && (!this$static.alreadyWarnedAboutPrivateUseCharacters && (this$static.alreadyWarnedAboutPrivateUseCharacters = true) , undefined);
+        }
+      }
+       else if (c < 32 || (c & 65534) == 65534) {
+        switch (this$static.contentNonXmlCharPolicy.ordinal) {
+          case 1:
+            $fatal_1(this$static, 'Forbidden code point ' + $toUPlusString(c) + '.');
+            break;
+          case 2:
+            c = buf[pos] = 65533;
+          case 0:
+            $err('Forbidden code point ' + $toUPlusString(c) + '.');
+        }
+      }
+       else
+        c >= 127 && c <= 159 || c >= 64976 && c <= 65007?$err('Forbidden code point ' + $toUPlusString(c) + '.'):c >= 57344 && c <= 63743 && (!this$static.alreadyWarnedAboutPrivateUseCharacters && (this$static.alreadyWarnedAboutPrivateUseCharacters = true) , undefined);
+  }
+  this$static.prev = c;
+  return c;
+}
+
+function $errLtOrEqualsOrGraveInUnquotedAttributeOrNull(c){
+  switch (c) {
+    case 61:
+      return;
+    case 60:
+      return;
+    case 96:
+      return;
+  }
+}
+
+function $errNcrControlChar(this$static, ch){
+  switch (this$static.contentNonXmlCharPolicy.ordinal) {
+    case 1:
+      $fatal_1(this$static, 'Character reference expands to a control character (' + $toUPlusString(this$static.value & 65535) + ').');
+      break;
+    case 2:
+      ch = 65533;
+    case 0:
+      $err('Character reference expands to a control character (' + $toUPlusString(this$static.value & 65535) + ').');
+  }
+  return ch;
+}
+
+function $errNcrNonCharacter(this$static, ch){
+  switch (this$static.contentNonXmlCharPolicy.ordinal) {
+    case 1:
+      $fatal_1(this$static, 'Character reference expands to a non-character (' + $toUPlusString(this$static.value & 65535) + ').');
+      break;
+    case 2:
+      ch = 65533;
+    case 0:
+      $err('Character reference expands to a non-character (' + $toUPlusString(this$static.value & 65535) + ').');
+  }
+  return ch;
+}
+
+function $errUnquotedAttributeValOrNull(c){
+  switch (c) {
+    case 60:
+      return;
+    case 96:
+      return;
+    case 65533:
+      return;
+    default:return;
+  }
+}
+
+function $flushChars(this$static, buf, pos){
+  var currCol, currLine;
+  if (pos > this$static.cstart) {
+    currLine = this$static.line;
+    currCol = this$static.col;
+    this$static.line = this$static.linePrev;
+    this$static.col = this$static.colPrev;
+    $characters(this$static.tokenHandler, buf, this$static.cstart, pos - this$static.cstart);
+    this$static.line = currLine;
+    this$static.col = currCol;
+  }
+  this$static.cstart = 2147483647;
+}
+
+function $getColumnNumber(this$static){
+  if (this$static.col > 0) {
+    return this$static.col;
+  }
+   else {
+    return -1;
+  }
+}
+
+function $getLineNumber(this$static){
+  if (this$static.line > 0) {
+    return this$static.line;
+  }
+   else {
+    return -1;
+  }
+}
+
+function $toUPlusString(c){
+  var hexString;
+  hexString = toPowerOfTwoString(c, 4);
+  switch (hexString.length) {
+    case 1:
+      return 'U+000' + hexString;
+    case 2:
+      return 'U+00' + hexString;
+    case 3:
+      return 'U+0' + hexString;
+    default:return 'U+' + hexString;
+  }
+}
+
+function getClass_70(){
+  return Lnu_validator_htmlparser_impl_ErrorReportingTokenizer_2_classLit;
+}
+
+function ErrorReportingTokenizer(){
+}
+
+_ = ErrorReportingTokenizer.prototype = new Tokenizer;
+_.getClass$ = getClass_70;
+_.typeId$ = 0;
+_.alreadyComplainedAboutNonAscii = false;
+_.alreadyWarnedAboutPrivateUseCharacters = false;
+_.col = 0;
+_.colPrev = 0;
+_.line = 0;
+_.linePrev = 0;
+_.nextCharOnNewLine = false;
+_.prev = 0;
+function $clinit_128(){
+  $clinit_128 = nullMethod;
+  EMPTY_ATTRIBUTENAMES = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 59, 13, 0, 0);
+  EMPTY_STRINGS = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 0, 0);
+  EMPTY_ATTRIBUTES = $HtmlAttributes(new HtmlAttributes, 0);
+}
+
+function $HtmlAttributes(this$static, mode){
+  $clinit_128();
+  this$static.mode = mode;
+  this$static.length_0 = 0;
+  this$static.names = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 59, 13, 5, 0);
+  this$static.values = initDim(_3Ljava_lang_String_2_classLit, 55, 1, 5, 0);
+  this$static.xmlnsLength = 0;
+  this$static.xmlnsNames = EMPTY_ATTRIBUTENAMES;
+  this$static.xmlnsValues = EMPTY_STRINGS;
+  return this$static;
+}
+
+function $addAttribute(this$static, name_0, value, xmlnsPolicy){
+  var newLen, newNames, newValues;
+  name_0 == ($clinit_124() , ID);
+  if (name_0.xmlns) {
+    if (this$static.xmlnsNames.length == this$static.xmlnsLength) {
+      newLen = this$static.xmlnsLength == 0?2:this$static.xmlnsLength << 1;
+      newNames = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 59, 13, newLen, 0);
+      arraycopy(this$static.xmlnsNames, 0, newNames, 0, this$static.xmlnsNames.length);
+      this$static.xmlnsNames = newNames;
+      newValues = initDim(_3Ljava_lang_String_2_classLit, 55, 1, newLen, 0);
+      arraycopy(this$static.xmlnsValues, 0, newValues, 0, this$static.xmlnsValues.length);
+      this$static.xmlnsValues = newValues;
+    }
+    this$static.xmlnsNames[this$static.xmlnsLength] = name_0;
+    this$static.xmlnsValues[this$static.xmlnsLength] = value;
+    ++this$static.xmlnsLength;
+    switch (xmlnsPolicy.ordinal) {
+      case 1:
+        throw $SAXException(new SAXException, 'Saw an xmlns attribute.');
+      case 2:
+        return;
+    }
+  }
+  if (this$static.names.length == this$static.length_0) {
+    newLen = this$static.length_0 << 1;
+    newNames = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 59, 13, newLen, 0);
+    arraycopy(this$static.names, 0, newNames, 0, this$static.names.length);
+    this$static.names = newNames;
+    newValues = initDim(_3Ljava_lang_String_2_classLit, 55, 1, newLen, 0);
+    arraycopy(this$static.values, 0, newValues, 0, this$static.values.length);
+    this$static.values = newValues;
+  }
+  this$static.names[this$static.length_0] = name_0;
+  this$static.values[this$static.length_0] = value;
+  ++this$static.length_0;
+}
+
+function $clear_0(this$static, m){
+  var i;
+  for (i = 0; i < this$static.length_0; ++i) {
+    setCheck(this$static.names, i, null);
+    setCheck(this$static.values, i, null);
+  }
+  this$static.length_0 = 0;
+  this$static.mode = m;
+  for (i = 0; i < this$static.xmlnsLength; ++i) {
+    setCheck(this$static.xmlnsNames, i, null);
+    setCheck(this$static.xmlnsValues, i, null);
+  }
+  this$static.xmlnsLength = 0;
+}
+
+function $clearWithoutReleasingContents(this$static){
+  var i;
+  for (i = 0; i < this$static.length_0; ++i) {
+    setCheck(this$static.names, i, null);
+    setCheck(this$static.values, i, null);
+  }
+  this$static.length_0 = 0;
+}
+
+function $cloneAttributes(this$static){
+  var clone, i;
+  clone = $HtmlAttributes(new HtmlAttributes, 0);
+  for (i = 0; i < this$static.length_0; ++i) {
+    $addAttribute(clone, this$static.names[i], this$static.values[i], ($clinit_115() , ALLOW));
+  }
+  for (i = 0; i < this$static.xmlnsLength; ++i) {
+    $addAttribute(clone, this$static.xmlnsNames[i], this$static.xmlnsValues[i], ($clinit_115() , ALLOW));
+  }
+  return clone;
+}
+
+function $contains(this$static, name_0){
+  var i;
+  for (i = 0; i < this$static.length_0; ++i) {
+    if (name_0.local[0] == this$static.names[i].local[0]) {
+      return true;
+    }
+  }
+  for (i = 0; i < this$static.xmlnsLength; ++i) {
+    if (name_0.local[0] == this$static.xmlnsNames[i].local[0]) {
+      return true;
+    }
+  }
+  return false;
+}
+
+function $equalsAnother_0(this$static, other){
+  var found, i, j, otherLength, ownLocal;
+  otherLength = other.length_0;
+  if (this$static.length_0 != otherLength) {
+    return false;
+  }
+  for (i = 0; i < this$static.length_0; ++i) {
+    found = false;
+    ownLocal = this$static.names[i].local[0];
+    for (j = 0; j < otherLength; ++j) {
+      if (ownLocal == other.names[j].local[0]) {
+        found = true;
+        if (!$equals_1(this$static.values[i], other.values[j])) {
+          return false;
+        }
+      }
+    }
+    if (!found) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function $getAttributeName(this$static, index){
+  if (index < this$static.length_0 && index >= 0) {
+    return this$static.names[index];
+  }
+   else {
+    return null;
+  }
+}
+
+function $getIndex(this$static, name_0){
+  var i;
+  for (i = 0; i < this$static.length_0; ++i) {
+    if (this$static.names[i] == name_0) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+function $getLocalName(this$static, index){
+  if (index < this$static.length_0 && index >= 0) {
+    return this$static.names[index].local[this$static.mode];
+  }
+   else {
+    return null;
+  }
+}
+
+function $getURI(this$static, index){
+  if (index < this$static.length_0 && index >= 0) {
+    return this$static.names[index].uri[this$static.mode];
+  }
+   else {
+    return null;
+  }
+}
+
+function $getValue_0(this$static, index){
+  if (index < this$static.length_0 && index >= 0) {
+    return this$static.values[index];
+  }
+   else {
+    return null;
+  }
+}
+
+function $getValue_1(this$static, name_0){
+  var index;
+  index = $getIndex(this$static, name_0);
+  if (index == -1) {
+    return null;
+  }
+   else {
+    return $getValue_0(this$static, index);
+  }
+}
+
+function $processNonNcNames(this$static, treeBuilder, namePolicy){
+  var attName, i, name_0;
+  for (i = 0; i < this$static.length_0; ++i) {
+    attName = this$static.names[i];
+    if (!attName.ncname[this$static.mode]) {
+      name_0 = attName.local[this$static.mode];
+      switch (namePolicy.ordinal) {
+        case 2:
+          this$static.names[i] = ($clinit_124() , $AttributeName_0(new AttributeName, ALL_NO_NS, SAME_LOCAL(escapeName(name_0)), ALL_NO_PREFIX, ALL_NCNAME, false));
+        case 0:
+          attName != ($clinit_124() , XML_LANG);
+          break;
+        case 1:
+          $fatal_0(treeBuilder, 'Attribute \u201C' + name_0 + '\u201D is not serializable as XML 1.0.');
+      }
+    }
+  }
+}
+
+function getClass_71(){
+  return Lnu_validator_htmlparser_impl_HtmlAttributes_2_classLit;
+}
+
+function HtmlAttributes(){
+}
+
+_ = HtmlAttributes.prototype = new Object_0;
+_.getClass$ = getClass_71;
+_.typeId$ = 0;
+_.length_0 = 0;
+_.mode = 0;
+_.names = null;
+_.values = null;
+_.xmlnsLength = 0;
+_.xmlnsNames = null;
+_.xmlnsValues = null;
+var EMPTY_ATTRIBUTENAMES, EMPTY_ATTRIBUTES, EMPTY_STRINGS;
+function $LocatorImpl(this$static, locator){
+  $getColumnNumber(locator);
+  $getLineNumber(locator);
+  return this$static;
+}
+
+function getClass_72(){
+  return Lnu_validator_htmlparser_impl_LocatorImpl_2_classLit;
+}
+
+function LocatorImpl(){
+}
+
+_ = LocatorImpl.prototype = new Object_0;
+_.getClass$ = getClass_72;
+_.typeId$ = 0;
+function $clinit_130(){
+  $clinit_130 = nullMethod;
+  HEX_TABLE = $toCharArray('0123456789ABCDEF');
+}
+
+function appendUHexTo(sb, c){
+  var i;
+  sb.impl.string += 'U';
+  for (i = 0; i < 6; ++i) {
+    $append_1(sb, HEX_TABLE[(c & 15728640) >> 20]);
+    c <<= 4;
+  }
+}
+
+function escapeName(str){
+  $clinit_130();
+  var c, i, next, sb;
+  sb = $StringBuilder(new StringBuilder);
+  for (i = 0; i < str.length; ++i) {
+    c = str.charCodeAt(i);
+    if ((c & 64512) == 55296) {
+      next = str.charCodeAt(++i);
+      appendUHexTo(sb, (c << 10) + next + -56613888);
+    }
+     else
+      i == 0 && !(c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95)?appendUHexTo(sb, c):i != 0 && !(c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95 || c == 46 || c == 45 || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542)?appendUHexTo(sb, c):(sb.impl.string += String.fromCharCode(c) , undefined);
+  }
+  return String(sb.impl.string);
+}
+
+function isNCName(str){
+  $clinit_130();
+  var i, len;
+  if (str == null) {
+    return false;
+  }
+   else {
+    len = str.length;
+    switch (len) {
+      case 0:
+        return false;
+      case 1:
+        return isNCNameStart(str.charCodeAt(0));
+      default:if (!isNCNameStart(str.charCodeAt(0))) {
+          return false;
+        }
+
+        for (i = 1; i < len; ++i) {
+          if (!isNCNameTrail(str.charCodeAt(i))) {
+            return false;
+          }
+        }
+
+    }
+    return true;
+  }
+}
+
+function isNCNameStart(c){
+  return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95;
+}
+
+function isNCNameTrail(c){
+  return c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95 || c == 46 || c == 45 || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542;
+}
+
+var HEX_TABLE;
+function $clinit_131(){
+  $clinit_131 = nullMethod;
+  NAMES = initValues(_3Ljava_lang_String_2_classLit, 55, 1, ['lig', 'lig;', 'P', 'P;', 'cute', 'cute;', 'reve;', 'irc', 'irc;', 'y;', 'r;', 'rave', 'rave;', 'pha;', 'acr;', 'd;', 'gon;', 'pf;', 'plyFunction;', 'ing', 'ing;', 'cr;', 'sign;', 'ilde', 'ilde;', 'ml', 'ml;', 'ckslash;', 'rv;', 'rwed;', 'y;', 'cause;', 'rnoullis;', 'ta;', 'r;', 'pf;', 'eve;', 'cr;', 'mpeq;', 'cy;', 'PY', 'PY;', 'cute;', 'p;', 'pitalDifferentialD;', 'yleys;', 'aron;', 'edil', 'edil;', 'irc;', 'onint;', 'ot;', 'dilla;', 'nterDot;', 'r;', 'i;', 'rcleDot;', 'rcleMinus;', 'rclePlus;', 'rcleTimes;', 'ockwiseContourIntegral;', 'oseCurlyDoubleQuote;', 'oseCurlyQuote;', 'lon;', 'lone;', 'ngruent;', 'nint;', 'ntourIntegral;', 'pf;', 'product;', 'unterClockwiseContourIntegral;', 'oss;', 'cr;', 'p;', 'pCap;', ';', 'otrahd;', 'cy;', 'cy;', 'cy;', 'gger;', 'rr;', 'shv;', 'aron;', 'y;', 'l;', 'lta;', 'r;', 'acriticalAcute;', 'acriticalDot;', 'acriticalDoubleAcute;', 'acriticalGrave;', 'acriticalTilde;', 'amond;', 'fferentialD;', 'pf;', 't;', 'tDot;', 'tEqual;', 'ubleContourIntegral;', 'ubleDot;', 'ubleDownArrow;', 'ubleLeftArrow;', 'ubleLeftRightArrow;', 'ubleLeftTee;', 'ubleLongLeftArrow;', 'ubleLongLeftRightArrow;', 'ubleLongRightArrow;', 'ubleRightArrow;', 'ubleRightTee;', 'ubleUpArrow;', 'ubleUpDownArrow;', 'ubleVerticalBar;', 'wnArrow;', 'wnArrowBar;', 'wnArrowUpArrow;', 'wnBreve;', 'wnLeftRightVector;', 'wnLeftTeeVector;', 'wnLeftVector;', 'wnLeftVectorBar;', 'wnRightTeeVector;', 'wnRightVector;', 'wnRightVectorBar;', 'wnTee;', 'wnTeeArrow;', 'wnarrow;', 'cr;', 'trok;', 'G;', 'H', 'H;', 'cute', 'cute;', 'aron;', 'irc', 'irc;', 'y;', 'ot;', 'r;', 'rave', 'rave;', 'ement;', 'acr;', 'ptySmallSquare;', 'ptyVerySmallSquare;', 'gon;', 'pf;', 'silon;', 'ual;', 'ualTilde;', 'uilibrium;', 'cr;', 'im;', 'a;', 'ml', 'ml;', 'ists;', 'ponentialE;', 'y;', 'r;', 'lledSmallSquare;', 'lledVerySmallSquare;', 'pf;', 'rAll;', 'uriertrf;', 'cr;', 'cy;', '', ';', 'mma;', 'mmad;', 'reve;', 'edil;', 'irc;', 'y;', 'ot;', 'r;', ';', 'pf;', 'eaterEqual;', 'eaterEqualLess;', 'eaterFullEqual;', 'eaterGreater;', 'eaterLess;', 'eaterSlantEqual;', 'eaterTilde;', 'cr;', ';', 'RDcy;', 'cek;', 't;', 'irc;', 'r;', 'lbertSpace;', 'pf;', 'rizontalLine;', 'cr;', 'trok;', 'mpDownHump;', 'mpEqual;', 'cy;', 'lig;', 'cy;', 'cute', 'cute;', 'irc', 'irc;', 'y;', 'ot;', 'r;', 'rave', 'rave;', ';', 'acr;', 'aginaryI;', 'plies;', 't;', 'tegral;', 'tersection;', 'visibleComma;', 'visibleTimes;', 'gon;', 'pf;', 'ta;', 'cr;', 'ilde;', 'kcy;', 'ml', 'ml;', 'irc;', 'y;', 'r;', 'pf;', 'cr;', 'ercy;', 'kcy;', 'cy;', 'cy;', 'ppa;', 'edil;', 'y;', 'r;', 'pf;', 'cr;', 'cy;', '', ';', 'cute;', 'mbda;', 'ng;', 'placetrf;', 'rr;', 'aron;', 'edil;', 'y;', 'ftAngleBracket;', 'ftArrow;', 'ftArrowBar;', 'ftArrowRightArrow;', 'ftCeiling;', 'ftDoubleBracket;', 'ftDownTeeVector;', 'ftDownVector;', 'ftDownVectorBar;', 'ftFloor;', 'ftRightArrow;', 'ftRightVector;', 'ftTee;', 'ftTeeArrow;', 'ftTeeVector;', 'ftTriangle;', 'ftTriangleBar;', 'ftTriangleEqual;', 'ftUpDownVector;', 'ftUpTeeVector;', 'ftUpVector;', 'ftUpVectorBar;', 'ftVector;', 'ftVectorBar;', 'ftarrow;', 'ftrightarrow;', 'ssEqualGreater;', 'ssFullEqual;', 'ssGreater;', 'ssLess;', 'ssSlantEqual;', 'ssTilde;', 'r;', ';', 'eftarrow;', 'idot;', 'ngLeftArrow;', 'ngLeftRightArrow;', 'ngRightArrow;', 'ngleftarrow;', 'ngleftrightarrow;', 'ngrightarrow;', 'pf;', 'werLeftArrow;', 'werRightArrow;', 'cr;', 'h;', 'trok;', ';', 'p;', 'y;', 'diumSpace;', 'llintrf;', 'r;', 'nusPlus;', 'pf;', 'cr;', ';', 'cy;', 'cute;', 'aron;', 'edil;', 'y;', 'gativeMediumSpace;', 'gativeThickSpace;', 'gativeThinSpace;', 'gativeVeryThinSpace;', 'stedGreaterGreater;', 'stedLessLess;', 'wLine;', 'r;', 'Break;', 'nBreakingSpace;', 'pf;', 't;', 'tCongruent;', 'tCupCap;', 'tDoubleVerticalBar;', 'tElement;', 'tEqual;', 'tEqualTilde;', 'tExists;', 'tGreater;', 'tGreaterEqual;', 'tGreaterFullEqual;', 'tGreaterGreater;', 'tGreaterLess;', 'tGreaterSlantEqual;', 'tGreaterTilde;', 'tHumpDownHump;', 'tHumpEqual;', 'tLeftTriangle;', 'tLeftTriangleBar;', 'tLeftTriangleEqual;', 'tLess;', 'tLessEqual;', 'tLessGreater;', 'tLessLess;', 'tLessSlantEqual;', 'tLessTilde;', 'tNestedGreaterGreater;', 'tNestedLessLess;', 'tPrecedes;', 'tPrecedesEqual;', 'tPrecedesSlantEqual;', 'tReverseElement;', 'tRightTriangle;', 'tRightTriangleBar;', 'tRightTriangleEqual;', 'tSquareSubset;', 'tSquareSubsetEqual;', 'tSquareSuperset;', 'tSquareSupersetEqual;', 'tSubset;', 'tSubsetEqual;', 'tSucceeds;', 'tSucceedsEqual;', 'tSucceedsSlantEqual;', 'tSucceedsTilde;', 'tSuperset;', 'tSupersetEqual;', 'tTilde;', 'tTildeEqual;', 'tTildeFullEqual;', 'tTildeTilde;', 'tVerticalBar;', 'cr;', 'ilde', 'ilde;', ';', 'lig;', 'cute', 'cute;', 'irc', 'irc;', 'y;', 'blac;', 'r;', 'rave', 'rave;', 'acr;', 'ega;', 'icron;', 'pf;', 'enCurlyDoubleQuote;', 'enCurlyQuote;', ';', 'cr;', 'lash', 'lash;', 'ilde', 'ilde;', 'imes;', 'ml', 'ml;', 'erBar;', 'erBrace;', 'erBracket;', 'erParenthesis;', 'rtialD;', 'y;', 'r;', 'i;', ';', 'usMinus;', 'incareplane;', 'pf;', ';', 'ecedes;', 'ecedesEqual;', 'ecedesSlantEqual;', 'ecedesTilde;', 'ime;', 'oduct;', 'oportion;', 'oportional;', 'cr;', 'i;', 'OT', 'OT;', 'r;', 'pf;', 'cr;', 'arr;', 'G', 'G;', 'cute;', 'ng;', 'rr;', 'rrtl;', 'aron;', 'edil;', 'y;', ';', 'verseElement;', 'verseEquilibrium;', 'verseUpEquilibrium;', 'r;', 'o;', 'ghtAngleBracket;', 'ghtArrow;', 'ghtArrowBar;', 'ghtArrowLeftArrow;', 'ghtCeiling;', 'ghtDoubleBracket;', 'ghtDownTeeVector;', 'ghtDownVector;', 'ghtDownVectorBar;', 'ghtFloor;', 'ghtTee;', 'ghtTeeArrow;', 'ghtTeeVector;', 'ghtTriangle;', 'ghtTriangleBar;', 'ghtTriangleEqual;', 'ghtUpDownVector;', 'ghtUpTeeVector;', 'ghtUpVector;', 'ghtUpVectorBar;', 'ghtVector;', 'ghtVectorBar;', 'ghtarrow;', 'pf;', 'undImplies;', 'ightarrow;', 'cr;', 'h;', 'leDelayed;', 'CHcy;', 'cy;', 'FTcy;', 'cute;', ';', 'aron;', 'edil;', 'irc;', 'y;', 'r;', 'ortDownArrow;', 'ortLeftArrow;', 'ortRightArrow;', 'ortUpArrow;', 'gma;', 'allCircle;', 'pf;', 'rt;', 'uare;', 'uareIntersection;', 'uareSubset;', 'uareSubsetEqual;', 'uareSuperset;', 'uareSupersetEqual;', 'uareUnion;', 'cr;', 'ar;', 'b;', 'bset;', 'bsetEqual;', 'cceeds;', 'cceedsEqual;', 'cceedsSlantEqual;', 'cceedsTilde;', 'chThat;', 'm;', 'p;', 'perset;', 'persetEqual;', 'pset;', 'ORN', 'ORN;', 'ADE;', 'Hcy;', 'cy;', 'b;', 'u;', 'aron;', 'edil;', 'y;', 'r;', 'erefore;', 'eta;', 'ickSpace;', 'inSpace;', 'lde;', 'ldeEqual;', 'ldeFullEqual;', 'ldeTilde;', 'pf;', 'ipleDot;', 'cr;', 'trok;', 'cute', 'cute;', 'rr;', 'rrocir;', 'rcy;', 'reve;', 'irc', 'irc;', 'y;', 'blac;', 'r;', 'rave', 'rave;', 'acr;', 'derBar;', 'derBrace;', 'derBracket;', 'derParenthesis;', 'ion;', 'ionPlus;', 'gon;', 'pf;', 'Arrow;', 'ArrowBar;', 'ArrowDownArrow;', 'DownArrow;', 'Equilibrium;', 'Tee;', 'TeeArrow;', 'arrow;', 'downarrow;', 'perLeftArrow;', 'perRightArrow;', 'si;', 'silon;', 'ing;', 'cr;', 'ilde;', 'ml', 'ml;', 'ash;', 'ar;', 'y;', 'ash;', 'ashl;', 'e;', 'rbar;', 'rt;', 'rticalBar;', 'rticalLine;', 'rticalSeparator;', 'rticalTilde;', 'ryThinSpace;', 'r;', 'pf;', 'cr;', 'dash;', 'irc;', 'dge;', 'r;', 'pf;', 'cr;', 'r;', ';', 'pf;', 'cr;', 'cy;', 'cy;', 'cy;', 'cute', 'cute;', 'irc;', 'y;', 'r;', 'pf;', 'cr;', 'ml;', 'cy;', 'cute;', 'aron;', 'y;', 'ot;', 'roWidthSpace;', 'ta;', 'r;', 'pf;', 'cr;', 'cute', 'cute;', 'reve;', ';', 'E;', 'd;', 'irc', 'irc;', 'ute', 'ute;', 'y;', 'lig', 'lig;', ';', 'r;', 'rave', 'rave;', 'efsym;', 'eph;', 'pha;', 'acr;', 'alg;', 'p', 'p;', 'd;', 'dand;', 'dd;', 'dslope;', 'dv;', 'g;', 'ge;', 'gle;', 'gmsd;', 'gmsdaa;', 'gmsdab;', 'gmsdac;', 'gmsdad;', 'gmsdae;', 'gmsdaf;', 'gmsdag;', 'gmsdah;', 'grt;', 'grtvb;', 'grtvbd;', 'gsph;', 'gst;', 'gzarr;', 'gon;', 'pf;', ';', 'E;', 'acir;', 'e;', 'id;', 'os;', 'prox;', 'proxeq;', 'ing', 'ing;', 'cr;', 't;', 'ymp;', 'ympeq;', 'ilde', 'ilde;', 'ml', 'ml;', 'conint;', 'int;', 'ot;', 'ckcong;', 'ckepsilon;', 'ckprime;', 'cksim;', 'cksimeq;', 'rvee;', 'rwed;', 'rwedge;', 'rk;', 'rktbrk;', 'ong;', 'y;', 'quo;', 'caus;', 'cause;', 'mptyv;', 'psi;', 'rnou;', 'ta;', 'th;', 'tween;', 'r;', 'gcap;', 'gcirc;', 'gcup;', 'godot;', 'goplus;', 'gotimes;', 'gsqcup;', 'gstar;', 'gtriangledown;', 'gtriangleup;', 'guplus;', 'gvee;', 'gwedge;', 'arow;', 'acklozenge;', 'acksquare;', 'acktriangle;', 'acktriangledown;', 'acktriangleleft;', 'acktriangleright;', 'ank;', 'k12;', 'k14;', 'k34;', 'ock;', 'e;', 'equiv;', 'ot;', 'pf;', 't;', 'ttom;', 'wtie;', 'xDL;', 'xDR;', 'xDl;', 'xDr;', 'xH;', 'xHD;', 'xHU;', 'xHd;', 'xHu;', 'xUL;', 'xUR;', 'xUl;', 'xUr;', 'xV;', 'xVH;', 'xVL;', 'xVR;', 'xVh;', 'xVl;', 'xVr;', 'xbox;', 'xdL;', 'xdR;', 'xdl;', 'xdr;', 'xh;', 'xhD;', 'xhU;', 'xhd;', 'xhu;', 'xminus;', 'xplus;', 'xtimes;', 'xuL;', 'xuR;', 'xul;', 'xur;', 'xv;', 'xvH;', 'xvL;', 'xvR;', 'xvh;', 'xvl;', 'xvr;', 'rime;', 'eve;', 'vbar', 'vbar;', 'cr;', 'emi;', 'im;', 'ime;', 'ol;', 'olb;', 'olhsub;', 'll;', 'llet;', 'mp;', 'mpE;', 'mpe;', 'mpeq;', 'cute;', 'p;', 'pand;', 'pbrcup;', 'pcap;', 'pcup;', 'pdot;', 'ps;', 'ret;', 'ron;', 'aps;', 'aron;', 'edil', 'edil;', 'irc;', 'ups;', 'upssm;', 'ot;', 'dil', 'dil;', 'mptyv;', 'nt', 'nt;', 'nterdot;', 'r;', 'cy;', 'eck;', 'eckmark;', 'i;', 'r;', 'rE;', 'rc;', 'rceq;', 'rclearrowleft;', 'rclearrowright;', 'rcledR;', 'rcledS;', 'rcledast;', 'rcledcirc;', 'rcleddash;', 're;', 'rfnint;', 'rmid;', 'rscir;', 'ubs;', 'ubsuit;', 'lon;', 'lone;', 'loneq;', 'mma;', 'mmat;', 'mp;', 'mpfn;', 'mplement;', 'mplexes;', 'ng;', 'ngdot;', 'nint;', 'pf;', 'prod;', 'py', 'py;', 'pysr;', 'arr;', 'oss;', 'cr;', 'ub;', 'ube;', 'up;', 'upe;', 'dot;', 'darrl;', 'darrr;', 'epr;', 'esc;', 'larr;', 'larrp;', 'p;', 'pbrcap;', 'pcap;', 'pcup;', 'pdot;', 'por;', 'ps;', 'rarr;', 'rarrm;', 'rlyeqprec;', 'rlyeqsucc;', 'rlyvee;', 'rlywedge;', 'rren', 'rren;', 'rvearrowleft;', 'rvearrowright;', 'vee;', 'wed;', 'conint;', 'int;', 'lcty;', 'rr;', 'ar;', 'gger;', 'leth;', 'rr;', 'sh;', 'shv;', 'karow;', 'lac;', 'aron;', 'y;', ';', 'agger;', 'arr;', 'otseq;', 'g', 'g;', 'lta;', 'mptyv;', 'isht;', 'r;', 'arl;', 'arr;', 'am;', 'amond;', 'amondsuit;', 'ams;', 'e;', 'gamma;', 'sin;', 'v;', 'vide', 'vide;', 'videontimes;', 'vonx;', 'cy;', 'corn;', 'crop;', 'llar;', 'pf;', 't;', 'teq;', 'teqdot;', 'tminus;', 'tplus;', 'tsquare;', 'ublebarwedge;', 'wnarrow;', 'wndownarrows;', 'wnharpoonleft;', 'wnharpoonright;', 'bkarow;', 'corn;', 'crop;', 'cr;', 'cy;', 'ol;', 'trok;', 'dot;', 'ri;', 'rif;', 'arr;', 'har;', 'angle;', 'cy;', 'igrarr;', 'Dot;', 'ot;', 'cute', 'cute;', 'ster;', 'aron;', 'ir;', 'irc', 'irc;', 'olon;', 'y;', 'ot;', ';', 'Dot;', 'r;', ';', 'rave', 'rave;', 's;', 'sdot;', ';', 'inters;', 'l;', 's;', 'sdot;', 'acr;', 'pty;', 'ptyset;', 'ptyv;', 'sp13;', 'sp14;', 'sp;', 'g;', 'sp;', 'gon;', 'pf;', 'ar;', 'arsl;', 'lus;', 'si;', 'silon;', 'siv;', 'circ;', 'colon;', 'sim;', 'slantgtr;', 'slantless;', 'uals;', 'uest;', 'uiv;', 'uivDD;', 'vparsl;', 'Dot;', 'arr;', 'cr;', 'dot;', 'im;', 'a;', 'h', 'h;', 'ml', 'ml;', 'ro;', 'cl;', 'ist;', 'pectation;', 'ponentiale;', 'llingdotseq;', 'y;', 'male;', 'ilig;', 'lig;', 'llig;', 'r;', 'lig;', 'lig;', 'at;', 'lig;', 'tns;', 'of;', 'pf;', 'rall;', 'rk;', 'rkv;', 'artint;', 'ac12', 'ac12;', 'ac13;', 'ac14', 'ac14;', 'ac15;', 'ac16;', 'ac18;', 'ac23;', 'ac25;', 'ac34', 'ac34;', 'ac35;', 'ac38;', 'ac45;', 'ac56;', 'ac58;', 'ac78;', 'asl;', 'own;', 'cr;', ';', 'l;', 'cute;', 'mma;', 'mmad;', 'p;', 'reve;', 'irc;', 'y;', 'ot;', ';', 'l;', 'q;', 'qq;', 'qslant;', 's;', 'scc;', 'sdot;', 'sdoto;', 'sdotol;', 'sl;', 'sles;', 'r;', ';', 'g;', 'mel;', 'cy;', ';', 'E;', 'a;', 'j;', 'E;', 'ap;', 'approx;', 'e;', 'eq;', 'eqq;', 'sim;', 'pf;', 'ave;', 'cr;', 'im;', 'ime;', 'iml;', '', ';', 'cc;', 'cir;', 'dot;', 'lPar;', 'quest;', 'rapprox;', 'rarr;', 'rdot;', 'reqless;', 'reqqless;', 'rless;', 'rsim;', 'ertneqq;', 'nE;', 'rr;', 'irsp;', 'lf;', 'milt;', 'rdcy;', 'rr;', 'rrcir;', 'rrw;', 'ar;', 'irc;', 'arts;', 'artsuit;', 'llip;', 'rcon;', 'r;', 'searow;', 'swarow;', 'arr;', 'mtht;', 'okleftarrow;', 'okrightarrow;', 'pf;', 'rbar;', 'cr;', 'lash;', 'trok;', 'bull;', 'phen;', 'cute', 'cute;', ';', 'irc', 'irc;', 'y;', 'cy;', 'xcl', 'xcl;', 'f;', 'r;', 'rave', 'rave;', ';', 'iint;', 'int;', 'nfin;', 'ota;', 'lig;', 'acr;', 'age;', 'agline;', 'agpart;', 'ath;', 'of;', 'ped;', ';', 'care;', 'fin;', 'fintie;', 'odot;', 't;', 'tcal;', 'tegers;', 'tercal;', 'tlarhk;', 'tprod;', 'cy;', 'gon;', 'pf;', 'ta;', 'rod;', 'uest', 'uest;', 'cr;', 'in;', 'inE;', 'indot;', 'ins;', 'insv;', 'inv;', ';', 'ilde;', 'kcy;', 'ml', 'ml;', 'irc;', 'y;', 'r;', 'ath;', 'pf;', 'cr;', 'ercy;', 'kcy;', 'ppa;', 'ppav;', 'edil;', 'y;', 'r;', 'reen;', 'cy;', 'cy;', 'pf;', 'cr;', 'arr;', 'rr;', 'tail;', 'arr;', ';', 'g;', 'ar;', 'cute;', 'emptyv;', 'gran;', 'mbda;', 'ng;', 'ngd;', 'ngle;', 'p;', 'quo', 'quo;', 'rr;', 'rrb;', 'rrbfs;', 'rrfs;', 'rrhk;', 'rrlp;', 'rrpl;', 'rrsim;', 'rrtl;', 't;', 'tail;', 'te;', 'tes;', 'arr;', 'brk;', 'race;', 'rack;', 'rke;', 'rksld;', 'rkslu;', 'aron;', 'edil;', 'eil;', 'ub;', 'y;', 'ca;', 'quo;', 'quor;', 'rdhar;', 'rushar;', 'sh;', ';', 'ftarrow;', 'ftarrowtail;', 'ftharpoondown;', 'ftharpoonup;', 'ftleftarrows;', 'ftrightarrow;', 'ftrightarrows;', 'ftrightharpoons;', 'ftrightsquigarrow;', 'ftthreetimes;', 'g;', 'q;', 'qq;', 'qslant;', 's;', 'scc;', 'sdot;', 'sdoto;', 'sdotor;', 'sg;', 'sges;', 'ssapprox;', 'ssdot;', 'sseqgtr;', 'sseqqgtr;', 'ssgtr;', 'sssim;', 'isht;', 'loor;', 'r;', ';', 'E;', 'ard;', 'aru;', 'arul;', 'blk;', 'cy;', ';', 'arr;', 'corner;', 'hard;', 'tri;', 'idot;', 'oust;', 'oustache;', 'E;', 'ap;', 'approx;', 'e;', 'eq;', 'eqq;', 'sim;', 'ang;', 'arr;', 'brk;', 'ngleftarrow;', 'ngleftrightarrow;', 'ngmapsto;', 'ngrightarrow;', 'oparrowleft;', 'oparrowright;', 'par;', 'pf;', 'plus;', 'times;', 'wast;', 'wbar;', 'z;', 'zenge;', 'zf;', 'ar;', 'arlt;', 'arr;', 'corner;', 'har;', 'hard;', 'm;', 'tri;', 'aquo;', 'cr;', 'h;', 'im;', 'ime;', 'img;', 'qb;', 'quo;', 'quor;', 'trok;', '', ';', 'cc;', 'cir;', 'dot;', 'hree;', 'imes;', 'larr;', 'quest;', 'rPar;', 'ri;', 'rie;', 'rif;', 'rdshar;', 'ruhar;', 'ertneqq;', 'nE;', 'Dot;', 'cr', 'cr;', 'le;', 'lt;', 'ltese;', 'p;', 'psto;', 'pstodown;', 'pstoleft;', 'pstoup;', 'rker;', 'omma;', 'y;', 'ash;', 'asuredangle;', 'r;', 'o;', 'cro', 'cro;', 'd;', 'dast;', 'dcir;', 'ddot', 'ddot;', 'nus;', 'nusb;', 'nusd;', 'nusdu;', 'cp;', 'dr;', 'plus;', 'dels;', 'pf;', ';', 'cr;', 'tpos;', ';', 'ltimap;', 'map;', 'g;', 't;', 'tv;', 'eftarrow;', 'eftrightarrow;', 'l;', 't;', 'tv;', 'ightarrow;', 'Dash;', 'dash;', 'bla;', 'cute;', 'ng;', 'p;', 'pE;', 'pid;', 'pos;', 'pprox;', 'tur;', 'tural;', 'turals;', 'sp', 'sp;', 'ump;', 'umpe;', 'ap;', 'aron;', 'edil;', 'ong;', 'ongdot;', 'up;', 'y;', 'ash;', ';', 'Arr;', 'arhk;', 'arr;', 'arrow;', 'dot;', 'quiv;', 'sear;', 'sim;', 'xist;', 'xists;', 'r;', 'E;', 'e;', 'eq;', 'eqq;', 'eqslant;', 'es;', 'sim;', 't;', 'tr;', 'Arr;', 'arr;', 'par;', ';', 's;', 'sd;', 'v;', 'cy;', 'Arr;', 'E;', 'arr;', 'dr;', 'e;', 'eftarrow;', 'eftrightarrow;', 'eq;', 'eqq;', 'eqslant;', 'es;', 'ess;', 'sim;', 't;', 'tri;', 'trie;', 'id;', 'pf;', 't', 't;', 'tin;', 'tinE;', 'tindot;', 'tinva;', 'tinvb;', 'tinvc;', 'tni;', 'tniva;', 'tnivb;', 'tnivc;', 'ar;', 'arallel;', 'arsl;', 'art;', 'olint;', 'r;', 'rcue;', 're;', 'rec;', 'receq;', 'Arr;', 'arr;', 'arrc;', 'arrw;', 'ightarrow;', 'tri;', 'trie;', 'c;', 'ccue;', 'ce;', 'cr;', 'hortmid;', 'hortparallel;', 'im;', 'ime;', 'imeq;', 'mid;', 'par;', 'qsube;', 'qsupe;', 'ub;', 'ubE;', 'ube;', 'ubset;', 'ubseteq;', 'ubseteqq;', 'ucc;', 'ucceq;', 'up;', 'upE;', 'upe;', 'upset;', 'upseteq;', 'upseteqq;', 'gl;', 'ilde', 'ilde;', 'lg;', 'riangleleft;', 'rianglelefteq;', 'riangleright;', 'rianglerighteq;', ';', 'm;', 'mero;', 'msp;', 'Dash;', 'Harr;', 'ap;', 'dash;', 'ge;', 'gt;', 'infin;', 'lArr;', 'le;', 'lt;', 'ltrie;', 'rArr;', 'rtrie;', 'sim;', 'Arr;', 'arhk;', 'arr;', 'arrow;', 'near;', ';', 'cute', 'cute;', 'st;', 'ir;', 'irc', 'irc;', 'y;', 'ash;', 'blac;', 'iv;', 'ot;', 'sold;', 'lig;', 'cir;', 'r;', 'on;', 'rave', 'rave;', 't;', 'bar;', 'm;', 'nt;', 'arr;', 'cir;', 'cross;', 'ine;', 't;', 'acr;', 'ega;', 'icron;', 'id;', 'inus;', 'pf;', 'ar;', 'erp;', 'lus;', ';', 'arr;', 'd;', 'der;', 'derof;', 'df', 'df;', 'dm', 'dm;', 'igof;', 'or;', 'slope;', 'v;', 'cr;', 'lash', 'lash;', 'ol;', 'ilde', 'ilde;', 'imes;', 'imesas;', 'ml', 'ml;', 'bar;', 'r;', 'ra', 'ra;', 'rallel;', 'rsim;', 'rsl;', 'rt;', 'y;', 'rcnt;', 'riod;', 'rmil;', 'rp;', 'rtenk;', 'r;', 'i;', 'iv;', 'mmat;', 'one;', ';', 'tchfork;', 'v;', 'anck;', 'anckh;', 'ankv;', 'us;', 'usacir;', 'usb;', 'uscir;', 'usdo;', 'usdu;', 'use;', 'usmn', 'usmn;', 'ussim;', 'ustwo;', ';', 'intint;', 'pf;', 'und', 'und;', ';', 'E;', 'ap;', 'cue;', 'e;', 'ec;', 'ecapprox;', 'eccurlyeq;', 'eceq;', 'ecnapprox;', 'ecneqq;', 'ecnsim;', 'ecsim;', 'ime;', 'imes;', 'nE;', 'nap;', 'nsim;', 'od;', 'ofalar;', 'ofline;', 'ofsurf;', 'op;', 'opto;', 'sim;', 'urel;', 'cr;', 'i;', 'ncsp;', 'r;', 'nt;', 'pf;', 'rime;', 'cr;', 'aternions;', 'atint;', 'est;', 'esteq;', 'ot', 'ot;', 'arr;', 'rr;', 'tail;', 'arr;', 'ar;', 'ce;', 'cute;', 'dic;', 'emptyv;', 'ng;', 'ngd;', 'nge;', 'ngle;', 'quo', 'quo;', 'rr;', 'rrap;', 'rrb;', 'rrbfs;', 'rrc;', 'rrfs;', 'rrhk;', 'rrlp;', 'rrpl;', 'rrsim;', 'rrtl;', 'rrw;', 'tail;', 'tio;', 'tionals;', 'arr;', 'brk;', 'race;', 'rack;', 'rke;', 'rksld;', 'rkslu;', 'aron;', 'edil;', 'eil;', 'ub;', 'y;', 'ca;', 'ldhar;', 'quo;', 'quor;', 'sh;', 'al;', 'aline;', 'alpart;', 'als;', 'ct;', 'g', 'g;', 'isht;', 'loor;', 'r;', 'ard;', 'aru;', 'arul;', 'o;', 'ov;', 'ghtarrow;', 'ghtarrowtail;', 'ghtharpoondown;', 'ghtharpoonup;', 'ghtleftarrows;', 'ghtleftharpoons;', 'ghtrightarrows;', 'ghtsquigarrow;', 'ghtthreetimes;', 'ng;', 'singdotseq;', 'arr;', 'har;', 'm;', 'oust;', 'oustache;', 'mid;', 'ang;', 'arr;', 'brk;', 'par;', 'pf;', 'plus;', 'times;', 'ar;', 'argt;', 'polint;', 'arr;', 'aquo;', 'cr;', 'h;', 'qb;', 'quo;', 'quor;', 'hree;', 'imes;', 'ri;', 'rie;', 'rif;', 'riltri;', 'luhar;', ';', 'cute;', 'quo;', ';', 'E;', 'ap;', 'aron;', 'cue;', 'e;', 'edil;', 'irc;', 'nE;', 'nap;', 'nsim;', 'polint;', 'sim;', 'y;', 'ot;', 'otb;', 'ote;', 'Arr;', 'arhk;', 'arr;', 'arrow;', 'ct', 'ct;', 'mi;', 'swar;', 'tminus;', 'tmn;', 'xt;', 'r;', 'rown;', 'arp;', 'chcy;', 'cy;', 'ortmid;', 'ortparallel;', 'y', 'y;', 'gma;', 'gmaf;', 'gmav;', 'm;', 'mdot;', 'me;', 'meq;', 'mg;', 'mgE;', 'ml;', 'mlE;', 'mne;', 'mplus;', 'mrarr;', 'arr;', 'allsetminus;', 'ashp;', 'eparsl;', 'id;', 'ile;', 't;', 'te;', 'tes;', 'ftcy;', 'l;', 'lb;', 'lbar;', 'pf;', 'ades;', 'adesuit;', 'ar;', 'cap;', 'caps;', 'cup;', 'cups;', 'sub;', 'sube;', 'subset;', 'subseteq;', 'sup;', 'supe;', 'supset;', 'supseteq;', 'u;', 'uare;', 'uarf;', 'uf;', 'arr;', 'cr;', 'etmn;', 'mile;', 'tarf;', 'ar;', 'arf;', 'raightepsilon;', 'raightphi;', 'rns;', 'b;', 'bE;', 'bdot;', 'be;', 'bedot;', 'bmult;', 'bnE;', 'bne;', 'bplus;', 'brarr;', 'bset;', 'bseteq;', 'bseteqq;', 'bsetneq;', 'bsetneqq;', 'bsim;', 'bsub;', 'bsup;', 'cc;', 'ccapprox;', 'cccurlyeq;', 'cceq;', 'ccnapprox;', 'ccneqq;', 'ccnsim;', 'ccsim;', 'm;', 'ng;', 'p1', 'p1;', 'p2', 'p2;', 'p3', 'p3;', 'p;', 'pE;', 'pdot;', 'pdsub;', 'pe;', 'pedot;', 'phsol;', 'phsub;', 'plarr;', 'pmult;', 'pnE;', 'pne;', 'pplus;', 'pset;', 'pseteq;', 'pseteqq;', 'psetneq;', 'psetneqq;', 'psim;', 'psub;', 'psup;', 'Arr;', 'arhk;', 'arr;', 'arrow;', 'nwar;', 'lig', 'lig;', 'rget;', 'u;', 'rk;', 'aron;', 'edil;', 'y;', 'ot;', 'lrec;', 'r;', 'ere4;', 'erefore;', 'eta;', 'etasym;', 'etav;', 'ickapprox;', 'icksim;', 'insp;', 'kap;', 'ksim;', 'orn', 'orn;', 'lde;', 'mes', 'mes;', 'mesb;', 'mesbar;', 'mesd;', 'nt;', 'ea;', 'p;', 'pbot;', 'pcir;', 'pf;', 'pfork;', 'sa;', 'rime;', 'ade;', 'iangle;', 'iangledown;', 'iangleleft;', 'ianglelefteq;', 'iangleq;', 'iangleright;', 'ianglerighteq;', 'idot;', 'ie;', 'iminus;', 'iplus;', 'isb;', 'itime;', 'pezium;', 'cr;', 'cy;', 'hcy;', 'trok;', 'ixt;', 'oheadleftarrow;', 'oheadrightarrow;', 'rr;', 'ar;', 'cute', 'cute;', 'rr;', 'rcy;', 'reve;', 'irc', 'irc;', 'y;', 'arr;', 'blac;', 'har;', 'isht;', 'r;', 'rave', 'rave;', 'arl;', 'arr;', 'blk;', 'corn;', 'corner;', 'crop;', 'tri;', 'acr;', 'l', 'l;', 'gon;', 'pf;', 'arrow;', 'downarrow;', 'harpoonleft;', 'harpoonright;', 'lus;', 'si;', 'sih;', 'silon;', 'uparrows;', 'corn;', 'corner;', 'crop;', 'ing;', 'tri;', 'cr;', 'dot;', 'ilde;', 'ri;', 'rif;', 'arr;', 'ml', 'ml;', 'angle;', 'rr;', 'ar;', 'arv;', 'ash;', 'ngrt;', 'repsilon;', 'rkappa;', 'rnothing;', 'rphi;', 'rpi;', 'rpropto;', 'rr;', 'rrho;', 'rsigma;', 'rsubsetneq;', 'rsubsetneqq;', 'rsupsetneq;', 'rsupsetneqq;', 'rtheta;', 'rtriangleleft;', 'rtriangleright;', 'y;', 'ash;', 'e;', 'ebar;', 'eeq;', 'llip;', 'rbar;', 'rt;', 'r;', 'tri;', 'sub;', 'sup;', 'pf;', 'rop;', 'tri;', 'cr;', 'ubnE;', 'ubne;', 'upnE;', 'upne;', 'igzag;', 'irc;', 'dbar;', 'dge;', 'dgeq;', 'ierp;', 'r;', 'pf;', ';', ';', 'eath;', 'cr;', 'ap;', 'irc;', 'up;', 'tri;', 'r;', 'Arr;', 'arr;', ';', 'Arr;', 'arr;', 'ap;', 'is;', 'dot;', 'pf;', 'plus;', 'time;', 'Arr;', 'arr;', 'cr;', 'qcup;', 'plus;', 'tri;', 'ee;', 'edge;', 'cute', 'cute;', 'cy;', 'irc;', 'y;', 'n', 'n;', 'r;', 'cy;', 'pf;', 'cr;', 'cy;', 'ml', 'ml;', 'cute;', 'aron;', 'y;', 'ot;', 'etrf;', 'ta;', 'r;', 'cy;', 'grarr;', 'pf;', 'cr;', 'j;', 'nj;']);
+  $$clinit_131();
+  $$$clinit_131();
+}
+function $$clinit_131() {
+    $$clinit_131 = nullMethod;
+    var i = initValues,
+        c = _3C_classLit;
+    VALUES_0 = i(c, 62, 16,
+        [i(c, 46, -1, [198]),
+        i(c, 46, -1, [198]),
+        i(c, 46, -1, [38]),
+        i(c, 46, -1, [38]),
+        i(c, 46, -1, [193]),
+        i(c, 46, -1, [193]),
+        i(c, 46, -1, [258]),
+        i(c, 46, -1, [194]),
+        i(c, 46, -1, [194]),
+        i(c, 46, -1, [1040]),
+        i(c, 46, -1, [55349, 56580]),
+        i(c, 46, -1, [192]),
+        i(c, 46, -1, [192]),
+        i(c, 46, -1, [913]),
+        i(c, 46, -1, [256]),
+        i(c, 46, -1, [10835]),
+        i(c, 46, -1, [260]),
+        i(c, 46, -1, [55349, 56632]),
+        i(c, 46, -1, [8289]),
+        i(c, 46, -1, [197]),
+        i(c, 46, -1, [197]),
+        i(c, 46, -1, [55349, 56476]),
+        i(c, 46, -1, [8788]),
+        i(c, 46, -1, [195]),
+        i(c, 46, -1, [195]),
+        i(c, 46, -1, [196]),
+        i(c, 46, -1, [196]),
+        i(c, 46, -1, [8726]),
+        i(c, 46, -1, [10983]),
+        i(c, 46, -1, [8966]),
+        i(c, 46, -1, [1041]),
+        i(c, 46, -1, [8757]),
+        i(c, 46, -1, [8492]),
+        i(c, 46, -1, [914]),
+        i(c, 46, -1, [55349, 56581]),
+        i(c, 46, -1, [55349, 56633]),
+        i(c, 46, -1, [728]),
+        i(c, 46, -1, [8492]),
+        i(c, 46, -1, [8782]),
+        i(c, 46, -1, [1063]),
+        i(c, 46, -1, [169]),
+        i(c, 46, -1, [169]),
+        i(c, 46, -1, [262]),
+        i(c, 46, -1, [8914]),
+        i(c, 46, -1, [8517]),
+        i(c, 46, -1, [8493]),
+        i(c, 46, -1, [268]),
+        i(c, 46, -1, [199]),
+        i(c, 46, -1, [199]),
+        i(c, 46, -1, [264]),
+        i(c, 46, -1, [8752]),
+        i(c, 46, -1, [266]),
+        i(c, 46, -1, [184]),
+        i(c, 46, -1, [183]),
+        i(c, 46, -1, [8493]),
+        i(c, 46, -1, [935]),
+        i(c, 46, -1, [8857]),
+        i(c, 46, -1, [8854]),
+        i(c, 46, -1, [8853]),
+        i(c, 46, -1, [8855]),
+        i(c, 46, -1, [8754]),
+        i(c, 46, -1, [8221]),
+        i(c, 46, -1, [8217]),
+        i(c, 46, -1, [8759]),
+        i(c, 46, -1, [10868]),
+        i(c, 46, -1, [8801]),
+        i(c, 46, -1, [8751]),
+        i(c, 46, -1, [8750]),
+        i(c, 46, -1, [8450]),
+        i(c, 46, -1, [8720]),
+        i(c, 46, -1, [8755]),
+        i(c, 46, -1, [10799]),
+        i(c, 46, -1, [55349, 56478]),
+        i(c, 46, -1, [8915]),
+        i(c, 46, -1, [8781]),
+        i(c, 46, -1, [8517]),
+        i(c, 46, -1, [10513]),
+        i(c, 46, -1, [1026]),
+        i(c, 46, -1, [1029]),
+        i(c, 46, -1, [1039]),
+        i(c, 46, -1, [8225]),
+        i(c, 46, -1, [8609]),
+        i(c, 46, -1, [10980]),
+        i(c, 46, -1, [270]),
+        i(c, 46, -1, [1044]),
+        i(c, 46, -1, [8711]),
+        i(c, 46, -1, [916]),
+        i(c, 46, -1, [55349, 56583]),
+        i(c, 46, -1, [180]),
+        i(c, 46, -1, [729]),
+        i(c, 46, -1, [733]),
+        i(c, 46, -1, [96]),
+        i(c, 46, -1, [732]),
+        i(c, 46, -1, [8900]),
+        i(c, 46, -1, [8518]),
+        i(c, 46, -1, [55349, 56635]),
+        i(c, 46, -1, [168]),
+        i(c, 46, -1, [8412]),
+        i(c, 46, -1, [8784]),
+        i(c, 46, -1, [8751]),
+        i(c, 46, -1, [168]),
+        i(c, 46, -1, [8659]),
+        i(c, 46, -1, [8656]),
+        i(c, 46, -1, [8660]),
+        i(c, 46, -1, [10980]),
+        i(c, 46, -1, [10232]),
+        i(c, 46, -1, [10234]),
+        i(c, 46, -1, [10233]),
+        i(c, 46, -1, [8658]),
+        i(c, 46, -1, [8872]),
+        i(c, 46, -1, [8657]),
+        i(c, 46, -1, [8661]),
+        i(c, 46, -1, [8741]),
+        i(c, 46, -1, [8595]),
+        i(c, 46, -1, [10515]),
+        i(c, 46, -1, [8693]),
+        i(c, 46, -1, [785]),
+        i(c, 46, -1, [10576]),
+        i(c, 46, -1, [10590]),
+        i(c, 46, -1, [8637]),
+        i(c, 46, -1, [10582]),
+        i(c, 46, -1, [10591]),
+        i(c, 46, -1, [8641]),
+        i(c, 46, -1, [10583]),
+        i(c, 46, -1, [8868]),
+        i(c, 46, -1, [8615]),
+        i(c, 46, -1, [8659]),
+        i(c, 46, -1, [55349, 56479]),
+        i(c, 46, -1, [272]),
+        i(c, 46, -1, [330]),
+        i(c, 46, -1, [208]),
+        i(c, 46, -1, [208]),
+        i(c, 46, -1, [201]),
+        i(c, 46, -1, [201]),
+        i(c, 46, -1, [282]),
+        i(c, 46, -1, [202]),
+        i(c, 46, -1, [202]),
+        i(c, 46, -1, [1069]),
+        i(c, 46, -1, [278]),
+        i(c, 46, -1, [55349, 56584]),
+        i(c, 46, -1, [200]),
+        i(c, 46, -1, [200]),
+        i(c, 46, -1, [8712]),
+        i(c, 46, -1, [274]),
+        i(c, 46, -1, [9723]),
+        i(c, 46, -1, [9643]),
+        i(c, 46, -1, [280]),
+        i(c, 46, -1, [55349, 56636]),
+        i(c, 46, -1, [917]),
+        i(c, 46, -1, [10869]),
+        i(c, 46, -1, [8770]),
+        i(c, 46, -1, [8652]),
+        i(c, 46, -1, [8496]),
+        i(c, 46, -1, [10867]),
+        i(c, 46, -1, [919]),
+        i(c, 46, -1, [203]),
+        i(c, 46, -1, [203]),
+        i(c, 46, -1, [8707]),
+        i(c, 46, -1, [8519]),
+        i(c, 46, -1, [1060]),
+        i(c, 46, -1, [55349, 56585]),
+        i(c, 46, -1, [9724]),
+        i(c, 46, -1, [9642]),
+        i(c, 46, -1, [55349, 56637]),
+        i(c, 46, -1, [8704]),
+        i(c, 46, -1, [8497]),
+        i(c, 46, -1, [8497]),
+        i(c, 46, -1, [1027]),
+        i(c, 46, -1, [62]),
+        i(c, 46, -1, [62]),
+        i(c, 46, -1, [915]),
+        i(c, 46, -1, [988]),
+        i(c, 46, -1, [286]),
+        i(c, 46, -1, [290]),
+        i(c, 46, -1, [284]),
+        i(c, 46, -1, [1043]),
+        i(c, 46, -1, [288]),
+        i(c, 46, -1, [55349, 56586]),
+        i(c, 46, -1, [8921]),
+        i(c, 46, -1, [55349, 56638]),
+        i(c, 46, -1, [8805]),
+        i(c, 46, -1, [8923]),
+        i(c, 46, -1, [8807]),
+        i(c, 46, -1, [10914]),
+        i(c, 46, -1, [8823]),
+        i(c, 46, -1, [10878]),
+        i(c, 46, -1, [8819]),
+        i(c, 46, -1, [55349, 56482]),
+        i(c, 46, -1, [8811]),
+        i(c, 46, -1, [1066]),
+        i(c, 46, -1, [711]),
+        i(c, 46, -1, [94]),
+        i(c, 46, -1, [292]),
+        i(c, 46, -1, [8460]),
+        i(c, 46, -1, [8459]),
+        i(c, 46, -1, [8461]),
+        i(c, 46, -1, [9472]),
+        i(c, 46, -1, [8459]),
+        i(c, 46, -1, [294]),
+        i(c, 46, -1, [8782]),
+        i(c, 46, -1, [8783]),
+        i(c, 46, -1, [1045]),
+        i(c, 46, -1, [306]),
+        i(c, 46, -1, [1025]),
+        i(c, 46, -1, [205]),
+        i(c, 46, -1, [205]),
+        i(c, 46, -1, [206]),
+        i(c, 46, -1, [206]),
+        i(c, 46, -1, [1048]),
+        i(c, 46, -1, [304]),
+        i(c, 46, -1, [8465]),
+        i(c, 46, -1, [204]),
+        i(c, 46, -1, [204]),
+        i(c, 46, -1, [8465]),
+        i(c, 46, -1, [298]),
+        i(c, 46, -1, [8520]),
+        i(c, 46, -1, [8658]),
+        i(c, 46, -1, [8748]),
+        i(c, 46, -1, [8747]),
+        i(c, 46, -1, [8898]),
+        i(c, 46, -1, [8291]),
+        i(c, 46, -1, [8290]),
+        i(c, 46, -1, [302]),
+        i(c, 46, -1, [55349, 56640]),
+        i(c, 46, -1, [921]),
+        i(c, 46, -1, [8464]),
+        i(c, 46, -1, [296]),
+        i(c, 46, -1, [1030]),
+        i(c, 46, -1, [207]),
+        i(c, 46, -1, [207]),
+        i(c, 46, -1, [308]),
+        i(c, 46, -1, [1049]),
+        i(c, 46, -1, [55349, 56589]),
+        i(c, 46, -1, [55349, 56641]),
+        i(c, 46, -1, [55349, 56485]),
+        i(c, 46, -1, [1032]),
+        i(c, 46, -1, [1028]),
+        i(c, 46, -1, [1061]),
+        i(c, 46, -1, [1036]),
+        i(c, 46, -1, [922]),
+        i(c, 46, -1, [310]),
+        i(c, 46, -1, [1050]),
+        i(c, 46, -1, [55349, 56590]),
+        i(c, 46, -1, [55349, 56642]),
+        i(c, 46, -1, [55349, 56486]),
+        i(c, 46, -1, [1033]),
+        i(c, 46, -1, [60]),
+        i(c, 46, -1, [60]),
+        i(c, 46, -1, [313]),
+        i(c, 46, -1, [923]),
+        i(c, 46, -1, [10218]),
+        i(c, 46, -1, [8466]),
+        i(c, 46, -1, [8606]),
+        i(c, 46, -1, [317]),
+        i(c, 46, -1, [315]),
+        i(c, 46, -1, [1051]),
+        i(c, 46, -1, [10216]),
+        i(c, 46, -1, [8592]),
+        i(c, 46, -1, [8676]),
+        i(c, 46, -1, [8646]),
+        i(c, 46, -1, [8968]),
+        i(c, 46, -1, [10214]),
+        i(c, 46, -1, [10593]),
+        i(c, 46, -1, [8643]),
+        i(c, 46, -1, [10585]),
+        i(c, 46, -1, [8970]),
+        i(c, 46, -1, [8596]),
+        i(c, 46, -1, [10574]),
+        i(c, 46, -1, [8867]),
+        i(c, 46, -1, [8612]),
+        i(c, 46, -1, [10586]),
+        i(c, 46, -1, [8882]),
+        i(c, 46, -1, [10703]),
+        i(c, 46, -1, [8884]),
+        i(c, 46, -1, [10577]),
+        i(c, 46, -1, [10592]),
+        i(c, 46, -1, [8639]),
+        i(c, 46, -1, [10584]),
+        i(c, 46, -1, [8636]),
+        i(c, 46, -1, [10578]),
+        i(c, 46, -1, [8656]),
+        i(c, 46, -1, [8660]),
+        i(c, 46, -1, [8922]),
+        i(c, 46, -1, [8806]),
+        i(c, 46, -1, [8822]),
+        i(c, 46, -1, [10913]),
+        i(c, 46, -1, [10877]),
+        i(c, 46, -1, [8818]),
+        i(c, 46, -1, [55349, 56591]),
+        i(c, 46, -1, [8920]),
+        i(c, 46, -1, [8666]),
+        i(c, 46, -1, [319]),
+        i(c, 46, -1, [10229]),
+        i(c, 46, -1, [10231]),
+        i(c, 46, -1, [10230]),
+        i(c, 46, -1, [10232]),
+        i(c, 46, -1, [10234]),
+        i(c, 46, -1, [10233]),
+        i(c, 46, -1, [55349, 56643]),
+        i(c, 46, -1, [8601]),
+        i(c, 46, -1, [8600]),
+        i(c, 46, -1, [8466]),
+        i(c, 46, -1, [8624]),
+        i(c, 46, -1, [321]),
+        i(c, 46, -1, [8810]),
+        i(c, 46, -1, [10501]),
+        i(c, 46, -1, [1052]),
+        i(c, 46, -1, [8287]),
+        i(c, 46, -1, [8499]),
+        i(c, 46, -1, [55349, 56592]),
+        i(c, 46, -1, [8723]),
+        i(c, 46, -1, [55349, 56644]),
+        i(c, 46, -1, [8499]),
+        i(c, 46, -1, [924]),
+        i(c, 46, -1, [1034]),
+        i(c, 46, -1, [323]),
+        i(c, 46, -1, [327]),
+        i(c, 46, -1, [325]),
+        i(c, 46, -1, [1053]),
+        i(c, 46, -1, [8203]),
+        i(c, 46, -1, [8203]),
+        i(c, 46, -1, [8203]),
+        i(c, 46, -1, [8203]),
+        i(c, 46, -1, [8811]),
+        i(c, 46, -1, [8810]),
+        i(c, 46, -1, [10]),
+        i(c, 46, -1, [55349, 56593]),
+        i(c, 46, -1, [8288]),
+        i(c, 46, -1, [160]),
+        i(c, 46, -1, [8469]),
+        i(c, 46, -1, [10988]),
+        i(c, 46, -1, [8802]),
+        i(c, 46, -1, [8813]),
+        i(c, 46, -1, [8742]),
+        i(c, 46, -1, [8713]),
+        i(c, 46, -1, [8800]),
+        i(c, 46, -1, [8770, 824]),
+        i(c, 46, -1, [8708]),
+        i(c, 46, -1, [8815]),
+        i(c, 46, -1, [8817]),
+        i(c, 46, -1, [8807, 824]),
+        i(c, 46, -1, [8811, 824]),
+        i(c, 46, -1, [8825]),
+        i(c, 46, -1, [10878, 824]),
+        i(c, 46, -1, [8821]),
+        i(c, 46, -1, [8782, 824]),
+        i(c, 46, -1, [8783, 824]),
+        i(c, 46, -1, [8938]),
+        i(c, 46, -1, [10703, 824]),
+        i(c, 46, -1, [8940]),
+        i(c, 46, -1, [8814]),
+        i(c, 46, -1, [8816]),
+        i(c, 46, -1, [8824]),
+        i(c, 46, -1, [8810, 824]),
+        i(c, 46, -1, [10877, 824]),
+        i(c, 46, -1, [8820]),
+        i(c, 46, -1, [10914, 824]),
+        i(c, 46, -1, [10913, 824]),
+        i(c, 46, -1, [8832]),
+        i(c, 46, -1, [10927, 824]),
+        i(c, 46, -1, [8928]),
+        i(c, 46, -1, [8716]),
+        i(c, 46, -1, [8939]),
+        i(c, 46, -1, [10704, 824]),
+        i(c, 46, -1, [8941]),
+        i(c, 46, -1, [8847, 824]),
+        i(c, 46, -1, [8930]),
+        i(c, 46, -1, [8848, 824]),
+        i(c, 46, -1, [8931]),
+        i(c, 46, -1, [8834, 8402]),
+        i(c, 46, -1, [8840]),
+        i(c, 46, -1, [8833]),
+        i(c, 46, -1, [10928, 824]),
+        i(c, 46, -1, [8929]),
+        i(c, 46, -1, [8831, 824]),
+        i(c, 46, -1, [8835, 8402]),
+        i(c, 46, -1, [8841]),
+        i(c, 46, -1, [8769]),
+        i(c, 46, -1, [8772]),
+        i(c, 46, -1, [8775]),
+        i(c, 46, -1, [8777]),
+        i(c, 46, -1, [8740]),
+        i(c, 46, -1, [55349, 56489]),
+        i(c, 46, -1, [209]),
+        i(c, 46, -1, [209]),
+        i(c, 46, -1, [925]),
+        i(c, 46, -1, [338]),
+        i(c, 46, -1, [211]),
+        i(c, 46, -1, [211]),
+        i(c, 46, -1, [212]),
+        i(c, 46, -1, [212]),
+        i(c, 46, -1, [1054]),
+        i(c, 46, -1, [336]),
+        i(c, 46, -1, [55349, 56594]),
+        i(c, 46, -1, [210]),
+        i(c, 46, -1, [210]),
+        i(c, 46, -1, [332]),
+        i(c, 46, -1, [937]),
+        i(c, 46, -1, [927]),
+        i(c, 46, -1, [55349, 56646]),
+        i(c, 46, -1, [8220]),
+        i(c, 46, -1, [8216]),
+        i(c, 46, -1, [10836]),
+        i(c, 46, -1, [55349, 56490]),
+        i(c, 46, -1, [216]),
+        i(c, 46, -1, [216]),
+        i(c, 46, -1, [213]),
+        i(c, 46, -1, [213]),
+        i(c, 46, -1, [10807]),
+        i(c, 46, -1, [214]),
+        i(c, 46, -1, [214]),
+        i(c, 46, -1, [8254]),
+        i(c, 46, -1, [9182]),
+        i(c, 46, -1, [9140]),
+        i(c, 46, -1, [9180]),
+        i(c, 46, -1, [8706]),
+        i(c, 46, -1, [1055]),
+        i(c, 46, -1, [55349, 56595]),
+        i(c, 46, -1, [934]),
+        i(c, 46, -1, [928]),
+        i(c, 46, -1, [177]),
+        i(c, 46, -1, [8460]),
+        i(c, 46, -1, [8473]),
+        i(c, 46, -1, [10939]),
+        i(c, 46, -1, [8826]),
+        i(c, 46, -1, [10927]),
+        i(c, 46, -1, [8828]),
+        i(c, 46, -1, [8830]),
+        i(c, 46, -1, [8243]),
+        i(c, 46, -1, [8719]),
+        i(c, 46, -1, [8759]),
+        i(c, 46, -1, [8733]),
+        i(c, 46, -1, [55349, 56491]),
+        i(c, 46, -1, [936]),
+        i(c, 46, -1, [34]),
+        i(c, 46, -1, [34]),
+        i(c, 46, -1, [55349, 56596]),
+        i(c, 46, -1, [8474]),
+        i(c, 46, -1, [55349, 56492]),
+        i(c, 46, -1, [10512]),
+        i(c, 46, -1, [174]),
+        i(c, 46, -1, [174]),
+        i(c, 46, -1, [340]),
+        i(c, 46, -1, [10219]),
+        i(c, 46, -1, [8608]),
+        i(c, 46, -1, [10518]),
+        i(c, 46, -1, [344]),
+        i(c, 46, -1, [342]),
+        i(c, 46, -1, [1056]),
+        i(c, 46, -1, [8476]),
+        i(c, 46, -1, [8715]),
+        i(c, 46, -1, [8651]),
+        i(c, 46, -1, [10607]),
+        i(c, 46, -1, [8476]),
+        i(c, 46, -1, [929]),
+        i(c, 46, -1, [10217]),
+        i(c, 46, -1, [8594]),
+        i(c, 46, -1, [8677]),
+        i(c, 46, -1, [8644]),
+        i(c, 46, -1, [8969]),
+        i(c, 46, -1, [10215]),
+        i(c, 46, -1, [10589]),
+        i(c, 46, -1, [8642]),
+        i(c, 46, -1, [10581]),
+        i(c, 46, -1, [8971]),
+        i(c, 46, -1, [8866]),
+        i(c, 46, -1, [8614]),
+        i(c, 46, -1, [10587]),
+        i(c, 46, -1, [8883]),
+        i(c, 46, -1, [10704]),
+        i(c, 46, -1, [8885]),
+        i(c, 46, -1, [10575]),
+        i(c, 46, -1, [10588]),
+        i(c, 46, -1, [8638]),
+        i(c, 46, -1, [10580]),
+        i(c, 46, -1, [8640]),
+        i(c, 46, -1, [10579]),
+        i(c, 46, -1, [8658]),
+        i(c, 46, -1, [8477]),
+        i(c, 46, -1, [10608]),
+        i(c, 46, -1, [8667]),
+        i(c, 46, -1, [8475]),
+        i(c, 46, -1, [8625]),
+        i(c, 46, -1, [10740]),
+        i(c, 46, -1, [1065]),
+        i(c, 46, -1, [1064]),
+        i(c, 46, -1, [1068]),
+        i(c, 46, -1, [346]),
+        i(c, 46, -1, [10940]),
+        i(c, 46, -1, [352]),
+        i(c, 46, -1, [350]),
+        i(c, 46, -1, [348]),
+        i(c, 46, -1, [1057]),
+        i(c, 46, -1, [55349, 56598]),
+        i(c, 46, -1, [8595]),
+        i(c, 46, -1, [8592]),
+        i(c, 46, -1, [8594]),
+        i(c, 46, -1, [8593]),
+        i(c, 46, -1, [931]),
+        i(c, 46, -1, [8728]),
+        i(c, 46, -1, [55349, 56650]),
+        i(c, 46, -1, [8730]),
+        i(c, 46, -1, [9633]),
+        i(c, 46, -1, [8851]),
+        i(c, 46, -1, [8847]),
+        i(c, 46, -1, [8849]),
+        i(c, 46, -1, [8848]),
+        i(c, 46, -1, [8850]),
+        i(c, 46, -1, [8852]),
+        i(c, 46, -1, [55349, 56494]),
+        i(c, 46, -1, [8902]),
+        i(c, 46, -1, [8912]),
+        i(c, 46, -1, [8912]),
+        i(c, 46, -1, [8838]),
+        i(c, 46, -1, [8827]),
+        i(c, 46, -1, [10928]),
+        i(c, 46, -1, [8829]),
+        i(c, 46, -1, [8831]),
+        i(c, 46, -1, [8715]),
+        i(c, 46, -1, [8721]),
+        i(c, 46, -1, [8913]),
+        i(c, 46, -1, [8835]),
+        i(c, 46, -1, [8839]),
+        i(c, 46, -1, [8913]),
+        i(c, 46, -1, [222]),
+        i(c, 46, -1, [222]),
+        i(c, 46, -1, [8482]),
+        i(c, 46, -1, [1035]),
+        i(c, 46, -1, [1062]),
+        i(c, 46, -1, [9]),
+        i(c, 46, -1, [932]),
+        i(c, 46, -1, [356]),
+        i(c, 46, -1, [354]),
+        i(c, 46, -1, [1058]),
+        i(c, 46, -1, [55349, 56599]),
+        i(c, 46, -1, [8756]),
+        i(c, 46, -1, [920]),
+        i(c, 46, -1, [8287, 8202]),
+        i(c, 46, -1, [8201]),
+        i(c, 46, -1, [8764]),
+        i(c, 46, -1, [8771]),
+        i(c, 46, -1, [8773]),
+        i(c, 46, -1, [8776]),
+        i(c, 46, -1, [55349, 56651]),
+        i(c, 46, -1, [8411])].concat($$clinit_131_1()));
+}
+function $$clinit_131_1(){
+    $$clinit_131_1 = nullMethod;
+    var i = initValues,
+        c = _3C_classLit;
+    return [
+        i(c, 46, -1, [55349, 56495]),
+        i(c, 46, -1, [358]),
+        i(c, 46, -1, [218]),
+        i(c, 46, -1, [218]),
+        i(c, 46, -1, [8607]),
+        i(c, 46, -1, [10569]),
+        i(c, 46, -1, [1038]),
+        i(c, 46, -1, [364]),
+        i(c, 46, -1, [219]),
+        i(c, 46, -1, [219]),
+        i(c, 46, -1, [1059]),
+        i(c, 46, -1, [368]),
+        i(c, 46, -1, [55349, 56600]),
+        i(c, 46, -1, [217]),
+        i(c, 46, -1, [217]),
+        i(c, 46, -1, [362]),
+        i(c, 46, -1, [95]),
+        i(c, 46, -1, [9183]),
+        i(c, 46, -1, [9141]),
+        i(c, 46, -1, [9181]),
+        i(c, 46, -1, [8899]),
+        i(c, 46, -1, [8846]),
+        i(c, 46, -1, [370]),
+        i(c, 46, -1, [55349, 56652]),
+        i(c, 46, -1, [8593]),
+        i(c, 46, -1, [10514]),
+        i(c, 46, -1, [8645]),
+        i(c, 46, -1, [8597]),
+        i(c, 46, -1, [10606]),
+        i(c, 46, -1, [8869]),
+        i(c, 46, -1, [8613]),
+        i(c, 46, -1, [8657]),
+        i(c, 46, -1, [8661]),
+        i(c, 46, -1, [8598]),
+        i(c, 46, -1, [8599]),
+        i(c, 46, -1, [978]),
+        i(c, 46, -1, [933]),
+        i(c, 46, -1, [366]),
+        i(c, 46, -1, [55349, 56496]),
+        i(c, 46, -1, [360]),
+        i(c, 46, -1, [220]),
+        i(c, 46, -1, [220]),
+        i(c, 46, -1, [8875]),
+        i(c, 46, -1, [10987]),
+        i(c, 46, -1, [1042]),
+        i(c, 46, -1, [8873]),
+        i(c, 46, -1, [10982]),
+        i(c, 46, -1, [8897]),
+        i(c, 46, -1, [8214]),
+        i(c, 46, -1, [8214]),
+        i(c, 46, -1, [8739]),
+        i(c, 46, -1, [124]),
+        i(c, 46, -1, [10072]),
+        i(c, 46, -1, [8768]),
+        i(c, 46, -1, [8202]),
+        i(c, 46, -1, [55349, 56601]),
+        i(c, 46, -1, [55349, 56653]),
+        i(c, 46, -1, [55349, 56497]),
+        i(c, 46, -1, [8874]),
+        i(c, 46, -1, [372]),
+        i(c, 46, -1, [8896]),
+        i(c, 46, -1, [55349, 56602]),
+        i(c, 46, -1, [55349, 56654]),
+        i(c, 46, -1, [55349, 56498]),
+        i(c, 46, -1, [55349, 56603]),
+        i(c, 46, -1, [926]),
+        i(c, 46, -1, [55349, 56655]),
+        i(c, 46, -1, [55349, 56499]),
+        i(c, 46, -1, [1071]),
+        i(c, 46, -1, [1031]),
+        i(c, 46, -1, [1070]),
+        i(c, 46, -1, [221]),
+        i(c, 46, -1, [221]),
+        i(c, 46, -1, [374]),
+        i(c, 46, -1, [1067]),
+        i(c, 46, -1, [55349, 56604]),
+        i(c, 46, -1, [55349, 56656]),
+        i(c, 46, -1, [55349, 56500]),
+        i(c, 46, -1, [376]),
+        i(c, 46, -1, [1046]),
+        i(c, 46, -1, [377]),
+        i(c, 46, -1, [381]),
+        i(c, 46, -1, [1047]),
+        i(c, 46, -1, [379]),
+        i(c, 46, -1, [8203]),
+        i(c, 46, -1, [918]),
+        i(c, 46, -1, [8488]),
+        i(c, 46, -1, [8484]),
+        i(c, 46, -1, [55349, 56501]),
+        i(c, 46, -1, [225]),
+        i(c, 46, -1, [225]),
+        i(c, 46, -1, [259]),
+        i(c, 46, -1, [8766]),
+        i(c, 46, -1, [8766, 819]),
+        i(c, 46, -1, [8767]),
+        i(c, 46, -1, [226]),
+        i(c, 46, -1, [226]),
+        i(c, 46, -1, [180]),
+        i(c, 46, -1, [180]),
+        i(c, 46, -1, [1072]),
+        i(c, 46, -1, [230]),
+        i(c, 46, -1, [230]),
+        i(c, 46, -1, [8289]),
+        i(c, 46, -1, [55349, 56606]),
+        i(c, 46, -1, [224]),
+        i(c, 46, -1, [224]),
+        i(c, 46, -1, [8501]),
+        i(c, 46, -1, [8501]),
+        i(c, 46, -1, [945]),
+        i(c, 46, -1, [257]),
+        i(c, 46, -1, [10815]),
+        i(c, 46, -1, [38]),
+        i(c, 46, -1, [38]),
+        i(c, 46, -1, [8743]),
+        i(c, 46, -1, [10837]),
+        i(c, 46, -1, [10844]),
+        i(c, 46, -1, [10840]),
+        i(c, 46, -1, [10842]),
+        i(c, 46, -1, [8736]),
+        i(c, 46, -1, [10660]),
+        i(c, 46, -1, [8736]),
+        i(c, 46, -1, [8737]),
+        i(c, 46, -1, [10664]),
+        i(c, 46, -1, [10665]),
+        i(c, 46, -1, [10666]),
+        i(c, 46, -1, [10667]),
+        i(c, 46, -1, [10668]),
+        i(c, 46, -1, [10669]),
+        i(c, 46, -1, [10670]),
+        i(c, 46, -1, [10671]),
+        i(c, 46, -1, [8735]),
+        i(c, 46, -1, [8894]),
+        i(c, 46, -1, [10653]),
+        i(c, 46, -1, [8738]),
+        i(c, 46, -1, [197]),
+        i(c, 46, -1, [9084]),
+        i(c, 46, -1, [261]),
+        i(c, 46, -1, [55349, 56658]),
+        i(c, 46, -1, [8776]),
+        i(c, 46, -1, [10864]),
+        i(c, 46, -1, [10863]),
+        i(c, 46, -1, [8778]),
+        i(c, 46, -1, [8779]),
+        i(c, 46, -1, [39]),
+        i(c, 46, -1, [8776]),
+        i(c, 46, -1, [8778]),
+        i(c, 46, -1, [229]),
+        i(c, 46, -1, [229]),
+        i(c, 46, -1, [55349, 56502]),
+        i(c, 46, -1, [42]),
+        i(c, 46, -1, [8776]),
+        i(c, 46, -1, [8781]),
+        i(c, 46, -1, [227]),
+        i(c, 46, -1, [227]),
+        i(c, 46, -1, [228]),
+        i(c, 46, -1, [228]),
+        i(c, 46, -1, [8755]),
+        i(c, 46, -1, [10769]),
+        i(c, 46, -1, [10989]),
+        i(c, 46, -1, [8780]),
+        i(c, 46, -1, [1014]),
+        i(c, 46, -1, [8245]),
+        i(c, 46, -1, [8765]),
+        i(c, 46, -1, [8909]),
+        i(c, 46, -1, [8893]),
+        i(c, 46, -1, [8965]),
+        i(c, 46, -1, [8965]),
+        i(c, 46, -1, [9141]),
+        i(c, 46, -1, [9142]),
+        i(c, 46, -1, [8780]),
+        i(c, 46, -1, [1073]),
+        i(c, 46, -1, [8222]),
+        i(c, 46, -1, [8757]),
+        i(c, 46, -1, [8757]),
+        i(c, 46, -1, [10672]),
+        i(c, 46, -1, [1014]),
+        i(c, 46, -1, [8492]),
+        i(c, 46, -1, [946]),
+        i(c, 46, -1, [8502]),
+        i(c, 46, -1, [8812]),
+        i(c, 46, -1, [55349, 56607]),
+        i(c, 46, -1, [8898]),
+        i(c, 46, -1, [9711]),
+        i(c, 46, -1, [8899]),
+        i(c, 46, -1, [10752]),
+        i(c, 46, -1, [10753]),
+        i(c, 46, -1, [10754]),
+        i(c, 46, -1, [10758]),
+        i(c, 46, -1, [9733]),
+        i(c, 46, -1, [9661]),
+        i(c, 46, -1, [9651]),
+        i(c, 46, -1, [10756]),
+        i(c, 46, -1, [8897]),
+        i(c, 46, -1, [8896]),
+        i(c, 46, -1, [10509]),
+        i(c, 46, -1, [10731]),
+        i(c, 46, -1, [9642]),
+        i(c, 46, -1, [9652]),
+        i(c, 46, -1, [9662]),
+        i(c, 46, -1, [9666]),
+        i(c, 46, -1, [9656]),
+        i(c, 46, -1, [9251]),
+        i(c, 46, -1, [9618]),
+        i(c, 46, -1, [9617]),
+        i(c, 46, -1, [9619]),
+        i(c, 46, -1, [9608]),
+        i(c, 46, -1, [61, 8421]),
+        i(c, 46, -1, [8801, 8421]),
+        i(c, 46, -1, [8976]),
+        i(c, 46, -1, [55349, 56659]),
+        i(c, 46, -1, [8869]),
+        i(c, 46, -1, [8869]),
+        i(c, 46, -1, [8904]),
+        i(c, 46, -1, [9559]),
+        i(c, 46, -1, [9556]),
+        i(c, 46, -1, [9558]),
+        i(c, 46, -1, [9555]),
+        i(c, 46, -1, [9552]),
+        i(c, 46, -1, [9574]),
+        i(c, 46, -1, [9577]),
+        i(c, 46, -1, [9572]),
+        i(c, 46, -1, [9575]),
+        i(c, 46, -1, [9565]),
+        i(c, 46, -1, [9562]),
+        i(c, 46, -1, [9564]),
+        i(c, 46, -1, [9561]),
+        i(c, 46, -1, [9553]),
+        i(c, 46, -1, [9580]),
+        i(c, 46, -1, [9571]),
+        i(c, 46, -1, [9568]),
+        i(c, 46, -1, [9579]),
+        i(c, 46, -1, [9570]),
+        i(c, 46, -1, [9567]),
+        i(c, 46, -1, [10697]),
+        i(c, 46, -1, [9557]),
+        i(c, 46, -1, [9554]),
+        i(c, 46, -1, [9488]),
+        i(c, 46, -1, [9484]),
+        i(c, 46, -1, [9472]),
+        i(c, 46, -1, [9573]),
+        i(c, 46, -1, [9576]),
+        i(c, 46, -1, [9516]),
+        i(c, 46, -1, [9524]),
+        i(c, 46, -1, [8863]),
+        i(c, 46, -1, [8862]),
+        i(c, 46, -1, [8864]),
+        i(c, 46, -1, [9563]),
+        i(c, 46, -1, [9560]),
+        i(c, 46, -1, [9496]),
+        i(c, 46, -1, [9492]),
+        i(c, 46, -1, [9474]),
+        i(c, 46, -1, [9578]),
+        i(c, 46, -1, [9569]),
+        i(c, 46, -1, [9566]),
+        i(c, 46, -1, [9532]),
+        i(c, 46, -1, [9508]),
+        i(c, 46, -1, [9500]),
+        i(c, 46, -1, [8245]),
+        i(c, 46, -1, [728]),
+        i(c, 46, -1, [166]),
+        i(c, 46, -1, [166]),
+        i(c, 46, -1, [55349, 56503]),
+        i(c, 46, -1, [8271]),
+        i(c, 46, -1, [8765]),
+        i(c, 46, -1, [8909]),
+        i(c, 46, -1, [92]),
+        i(c, 46, -1, [10693]),
+        i(c, 46, -1, [10184]),
+        i(c, 46, -1, [8226]),
+        i(c, 46, -1, [8226]),
+        i(c, 46, -1, [8782]),
+        i(c, 46, -1, [10926]),
+        i(c, 46, -1, [8783]),
+        i(c, 46, -1, [8783]),
+        i(c, 46, -1, [263]),
+        i(c, 46, -1, [8745]),
+        i(c, 46, -1, [10820]),
+        i(c, 46, -1, [10825]),
+        i(c, 46, -1, [10827]),
+        i(c, 46, -1, [10823]),
+        i(c, 46, -1, [10816]),
+        i(c, 46, -1, [8745, 65024]),
+        i(c, 46, -1, [8257]),
+        i(c, 46, -1, [711]),
+        i(c, 46, -1, [10829]),
+        i(c, 46, -1, [269]),
+        i(c, 46, -1, [231]),
+        i(c, 46, -1, [231]),
+        i(c, 46, -1, [265]),
+        i(c, 46, -1, [10828]),
+        i(c, 46, -1, [10832]),
+        i(c, 46, -1, [267]),
+        i(c, 46, -1, [184]),
+        i(c, 46, -1, [184]),
+        i(c, 46, -1, [10674]),
+        i(c, 46, -1, [162]),
+        i(c, 46, -1, [162]),
+        i(c, 46, -1, [183]),
+        i(c, 46, -1, [55349, 56608]),
+        i(c, 46, -1, [1095]),
+        i(c, 46, -1, [10003]),
+        i(c, 46, -1, [10003]),
+        i(c, 46, -1, [967]),
+        i(c, 46, -1, [9675]),
+        i(c, 46, -1, [10691]),
+        i(c, 46, -1, [710]),
+        i(c, 46, -1, [8791]),
+        i(c, 46, -1, [8634]),
+        i(c, 46, -1, [8635]),
+        i(c, 46, -1, [174]),
+        i(c, 46, -1, [9416]),
+        i(c, 46, -1, [8859]),
+        i(c, 46, -1, [8858]),
+        i(c, 46, -1, [8861]),
+        i(c, 46, -1, [8791]),
+        i(c, 46, -1, [10768]),
+        i(c, 46, -1, [10991]),
+        i(c, 46, -1, [10690]),
+        i(c, 46, -1, [9827]),
+        i(c, 46, -1, [9827]),
+        i(c, 46, -1, [58]),
+        i(c, 46, -1, [8788]),
+        i(c, 46, -1, [8788]),
+        i(c, 46, -1, [44]),
+        i(c, 46, -1, [64]),
+        i(c, 46, -1, [8705]),
+        i(c, 46, -1, [8728]),
+        i(c, 46, -1, [8705]),
+        i(c, 46, -1, [8450]),
+        i(c, 46, -1, [8773]),
+        i(c, 46, -1, [10861]),
+        i(c, 46, -1, [8750]),
+        i(c, 46, -1, [55349, 56660]),
+        i(c, 46, -1, [8720]),
+        i(c, 46, -1, [169]),
+        i(c, 46, -1, [169]),
+        i(c, 46, -1, [8471]),
+        i(c, 46, -1, [8629]),
+        i(c, 46, -1, [10007]),
+        i(c, 46, -1, [55349, 56504]),
+        i(c, 46, -1, [10959]),
+        i(c, 46, -1, [10961]),
+        i(c, 46, -1, [10960]),
+        i(c, 46, -1, [10962]),
+        i(c, 46, -1, [8943]),
+        i(c, 46, -1, [10552]),
+        i(c, 46, -1, [10549]),
+        i(c, 46, -1, [8926]),
+        i(c, 46, -1, [8927]),
+        i(c, 46, -1, [8630]),
+        i(c, 46, -1, [10557]),
+        i(c, 46, -1, [8746]),
+        i(c, 46, -1, [10824]),
+        i(c, 46, -1, [10822]),
+        i(c, 46, -1, [10826]),
+        i(c, 46, -1, [8845]),
+        i(c, 46, -1, [10821]),
+        i(c, 46, -1, [8746, 65024]),
+        i(c, 46, -1, [8631]),
+        i(c, 46, -1, [10556]),
+        i(c, 46, -1, [8926]),
+        i(c, 46, -1, [8927]),
+        i(c, 46, -1, [8910]),
+        i(c, 46, -1, [8911]),
+        i(c, 46, -1, [164]),
+        i(c, 46, -1, [164]),
+        i(c, 46, -1, [8630]),
+        i(c, 46, -1, [8631]),
+        i(c, 46, -1, [8910]),
+        i(c, 46, -1, [8911]),
+        i(c, 46, -1, [8754]),
+        i(c, 46, -1, [8753]),
+        i(c, 46, -1, [9005]),
+        i(c, 46, -1, [8659]),
+        i(c, 46, -1, [10597]),
+        i(c, 46, -1, [8224]),
+        i(c, 46, -1, [8504]),
+        i(c, 46, -1, [8595]),
+        i(c, 46, -1, [8208]),
+        i(c, 46, -1, [8867]),
+        i(c, 46, -1, [10511]),
+        i(c, 46, -1, [733]),
+        i(c, 46, -1, [271]),
+        i(c, 46, -1, [1076]),
+        i(c, 46, -1, [8518]),
+        i(c, 46, -1, [8225]),
+        i(c, 46, -1, [8650]),
+        i(c, 46, -1, [10871]),
+        i(c, 46, -1, [176]),
+        i(c, 46, -1, [176]),
+        i(c, 46, -1, [948]),
+        i(c, 46, -1, [10673]),
+        i(c, 46, -1, [10623]),
+        i(c, 46, -1, [55349, 56609]),
+        i(c, 46, -1, [8643]),
+        i(c, 46, -1, [8642]),
+        i(c, 46, -1, [8900]),
+        i(c, 46, -1, [8900]),
+        i(c, 46, -1, [9830]),
+        i(c, 46, -1, [9830]),
+        i(c, 46, -1, [168]),
+        i(c, 46, -1, [989]),
+        i(c, 46, -1, [8946]),
+        i(c, 46, -1, [247]),
+        i(c, 46, -1, [247]),
+        i(c, 46, -1, [247]),
+        i(c, 46, -1, [8903]),
+        i(c, 46, -1, [8903]),
+        i(c, 46, -1, [1106]),
+        i(c, 46, -1, [8990]),
+        i(c, 46, -1, [8973]),
+        i(c, 46, -1, [36]),
+        i(c, 46, -1, [55349, 56661]),
+        i(c, 46, -1, [729]),
+        i(c, 46, -1, [8784]),
+        i(c, 46, -1, [8785]),
+        i(c, 46, -1, [8760]),
+        i(c, 46, -1, [8724]),
+        i(c, 46, -1, [8865]),
+        i(c, 46, -1, [8966]),
+        i(c, 46, -1, [8595]),
+        i(c, 46, -1, [8650]),
+        i(c, 46, -1, [8643]),
+        i(c, 46, -1, [8642]),
+        i(c, 46, -1, [10512]),
+        i(c, 46, -1, [8991]),
+        i(c, 46, -1, [8972]),
+        i(c, 46, -1, [55349, 56505]),
+        i(c, 46, -1, [1109]),
+        i(c, 46, -1, [10742]),
+        i(c, 46, -1, [273]),
+        i(c, 46, -1, [8945]),
+        i(c, 46, -1, [9663]),
+        i(c, 46, -1, [9662]),
+        i(c, 46, -1, [8693]),
+        i(c, 46, -1, [10607]),
+        i(c, 46, -1, [10662]),
+        i(c, 46, -1, [1119]),
+        i(c, 46, -1, [10239]),
+        i(c, 46, -1, [10871]),
+        i(c, 46, -1, [8785]),
+        i(c, 46, -1, [233]),
+        i(c, 46, -1, [233]),
+        i(c, 46, -1, [10862]),
+        i(c, 46, -1, [283]),
+        i(c, 46, -1, [8790]),
+        i(c, 46, -1, [234]),
+        i(c, 46, -1, [234]),
+        i(c, 46, -1, [8789]),
+        i(c, 46, -1, [1101]),
+        i(c, 46, -1, [279]),
+        i(c, 46, -1, [8519]),
+        i(c, 46, -1, [8786]),
+        i(c, 46, -1, [55349, 56610]),
+        i(c, 46, -1, [10906]),
+        i(c, 46, -1, [232]),
+        i(c, 46, -1, [232]),
+        i(c, 46, -1, [10902]),
+        i(c, 46, -1, [10904]),
+        i(c, 46, -1, [10905]),
+        i(c, 46, -1, [9191]),
+        i(c, 46, -1, [8467]),
+        i(c, 46, -1, [10901]),
+        i(c, 46, -1, [10903]),
+        i(c, 46, -1, [275]),
+        i(c, 46, -1, [8709]),
+        i(c, 46, -1, [8709]),
+        i(c, 46, -1, [8709]),
+        i(c, 46, -1, [8196]),
+        i(c, 46, -1, [8197]),
+        i(c, 46, -1, [8195]),
+        i(c, 46, -1, [331]),
+        i(c, 46, -1, [8194]),
+        i(c, 46, -1, [281]),
+        i(c, 46, -1, [55349, 56662]),
+        i(c, 46, -1, [8917]),
+        i(c, 46, -1, [10723]),
+        i(c, 46, -1, [10865]),
+        i(c, 46, -1, [949]),
+        i(c, 46, -1, [949]),
+        i(c, 46, -1, [1013]),
+        i(c, 46, -1, [8790]),
+        i(c, 46, -1, [8789]),
+        i(c, 46, -1, [8770]),
+        i(c, 46, -1, [10902]),
+        i(c, 46, -1, [10901]),
+        i(c, 46, -1, [61]),
+        i(c, 46, -1, [8799]),
+        i(c, 46, -1, [8801]),
+        i(c, 46, -1, [10872]),
+        i(c, 46, -1, [10725]),
+        i(c, 46, -1, [8787]),
+        i(c, 46, -1, [10609]),
+        i(c, 46, -1, [8495]),
+        i(c, 46, -1, [8784]),
+        i(c, 46, -1, [8770]),
+        i(c, 46, -1, [951]),
+        i(c, 46, -1, [240]),
+        i(c, 46, -1, [240]),
+        i(c, 46, -1, [235]),
+        i(c, 46, -1, [235]),
+        i(c, 46, -1, [8364]),
+        i(c, 46, -1, [33]),
+        i(c, 46, -1, [8707]),
+        i(c, 46, -1, [8496]),
+        i(c, 46, -1, [8519]),
+        i(c, 46, -1, [8786]),
+        i(c, 46, -1, [1092]),
+        i(c, 46, -1, [9792]),
+        i(c, 46, -1, [64259]),
+        i(c, 46, -1, [64256]),
+        i(c, 46, -1, [64260]),
+        i(c, 46, -1, [55349, 56611]),
+        i(c, 46, -1, [64257]),
+        i(c, 46, -1, [102, 106]),
+        i(c, 46, -1, [9837]),
+        i(c, 46, -1, [64258]),
+        i(c, 46, -1, [9649]),
+        i(c, 46, -1, [402]),
+        i(c, 46, -1, [55349, 56663]),
+        i(c, 46, -1, [8704]),
+        i(c, 46, -1, [8916]),
+        i(c, 46, -1, [10969]),
+        i(c, 46, -1, [10765]),
+        i(c, 46, -1, [189]),
+        i(c, 46, -1, [189]),
+        i(c, 46, -1, [8531]),
+        i(c, 46, -1, [188]),
+        i(c, 46, -1, [188]),
+        i(c, 46, -1, [8533]),
+        i(c, 46, -1, [8537]),
+        i(c, 46, -1, [8539]),
+        i(c, 46, -1, [8532]),
+        i(c, 46, -1, [8534]),
+        i(c, 46, -1, [190]),
+        i(c, 46, -1, [190]),
+        i(c, 46, -1, [8535]),
+        i(c, 46, -1, [8540]),
+        i(c, 46, -1, [8536]),
+        i(c, 46, -1, [8538]),
+        i(c, 46, -1, [8541]),
+        i(c, 46, -1, [8542]),
+        i(c, 46, -1, [8260]),
+        i(c, 46, -1, [8994]),
+        i(c, 46, -1, [55349, 56507]),
+        i(c, 46, -1, [8807]),
+        i(c, 46, -1, [10892]),
+        i(c, 46, -1, [501]),
+        i(c, 46, -1, [947]),
+        i(c, 46, -1, [989])].concat($$clinit_131_2());
+}
+function $$clinit_131_2(){
+    var i = initValues,
+        c = _3C_classLit;
+    $$clinit_131_2 = nullMethod;
+    return [i(c, 46, -1, [10886]),
+        i(c, 46, -1, [287]),
+        i(c, 46, -1, [285]),
+        i(c, 46, -1, [1075]),
+        i(c, 46, -1, [289]),
+        i(c, 46, -1, [8805]),
+        i(c, 46, -1, [8923]),
+        i(c, 46, -1, [8805]),
+        i(c, 46, -1, [8807]),
+        i(c, 46, -1, [10878]),
+        i(c, 46, -1, [10878]),
+        i(c, 46, -1, [10921]),
+        i(c, 46, -1, [10880]),
+        i(c, 46, -1, [10882]),
+        i(c, 46, -1, [10884]),
+        i(c, 46, -1, [8923, 65024]),
+        i(c, 46, -1, [10900]),
+        i(c, 46, -1, [55349, 56612]),
+        i(c, 46, -1, [8811]),
+        i(c, 46, -1, [8921]),
+        i(c, 46, -1, [8503]),
+        i(c, 46, -1, [1107]),
+        i(c, 46, -1, [8823]),
+        i(c, 46, -1, [10898]),
+        i(c, 46, -1, [10917]),
+        i(c, 46, -1, [10916]),
+        i(c, 46, -1, [8809]),
+        i(c, 46, -1, [10890]),
+        i(c, 46, -1, [10890]),
+        i(c, 46, -1, [10888]),
+        i(c, 46, -1, [10888]),
+        i(c, 46, -1, [8809]),
+        i(c, 46, -1, [8935]),
+        i(c, 46, -1, [55349, 56664]),
+        i(c, 46, -1, [96]),
+        i(c, 46, -1, [8458]),
+        i(c, 46, -1, [8819]),
+        i(c, 46, -1, [10894]),
+        i(c, 46, -1, [10896]),
+        i(c, 46, -1, [62]),
+        i(c, 46, -1, [62]),
+        i(c, 46, -1, [10919]),
+        i(c, 46, -1, [10874]),
+        i(c, 46, -1, [8919]),
+        i(c, 46, -1, [10645]),
+        i(c, 46, -1, [10876]),
+        i(c, 46, -1, [10886]),
+        i(c, 46, -1, [10616]),
+        i(c, 46, -1, [8919]),
+        i(c, 46, -1, [8923]),
+        i(c, 46, -1, [10892]),
+        i(c, 46, -1, [8823]),
+        i(c, 46, -1, [8819]),
+        i(c, 46, -1, [8809, 65024]),
+        i(c, 46, -1, [8809, 65024]),
+        i(c, 46, -1, [8660]),
+        i(c, 46, -1, [8202]),
+        i(c, 46, -1, [189]),
+        i(c, 46, -1, [8459]),
+        i(c, 46, -1, [1098]),
+        i(c, 46, -1, [8596]),
+        i(c, 46, -1, [10568]),
+        i(c, 46, -1, [8621]),
+        i(c, 46, -1, [8463]),
+        i(c, 46, -1, [293]),
+        i(c, 46, -1, [9829]),
+        i(c, 46, -1, [9829]),
+        i(c, 46, -1, [8230]),
+        i(c, 46, -1, [8889]),
+        i(c, 46, -1, [55349, 56613]),
+        i(c, 46, -1, [10533]),
+        i(c, 46, -1, [10534]),
+        i(c, 46, -1, [8703]),
+        i(c, 46, -1, [8763]),
+        i(c, 46, -1, [8617]),
+        i(c, 46, -1, [8618]),
+        i(c, 46, -1, [55349, 56665]),
+        i(c, 46, -1, [8213]),
+        i(c, 46, -1, [55349, 56509]),
+        i(c, 46, -1, [8463]),
+        i(c, 46, -1, [295]),
+        i(c, 46, -1, [8259]),
+        i(c, 46, -1, [8208]),
+        i(c, 46, -1, [237]),
+        i(c, 46, -1, [237]),
+        i(c, 46, -1, [8291]),
+        i(c, 46, -1, [238]),
+        i(c, 46, -1, [238]),
+        i(c, 46, -1, [1080]),
+        i(c, 46, -1, [1077]),
+        i(c, 46, -1, [161]),
+        i(c, 46, -1, [161]),
+        i(c, 46, -1, [8660]),
+        i(c, 46, -1, [55349, 56614]),
+        i(c, 46, -1, [236]),
+        i(c, 46, -1, [236]),
+        i(c, 46, -1, [8520]),
+        i(c, 46, -1, [10764]),
+        i(c, 46, -1, [8749]),
+        i(c, 46, -1, [10716]),
+        i(c, 46, -1, [8489]),
+        i(c, 46, -1, [307]),
+        i(c, 46, -1, [299]),
+        i(c, 46, -1, [8465]),
+        i(c, 46, -1, [8464]),
+        i(c, 46, -1, [8465]),
+        i(c, 46, -1, [305]),
+        i(c, 46, -1, [8887]),
+        i(c, 46, -1, [437]),
+        i(c, 46, -1, [8712]),
+        i(c, 46, -1, [8453]),
+        i(c, 46, -1, [8734]),
+        i(c, 46, -1, [10717]),
+        i(c, 46, -1, [305]),
+        i(c, 46, -1, [8747]),
+        i(c, 46, -1, [8890]),
+        i(c, 46, -1, [8484]),
+        i(c, 46, -1, [8890]),
+        i(c, 46, -1, [10775]),
+        i(c, 46, -1, [10812]),
+        i(c, 46, -1, [1105]),
+        i(c, 46, -1, [303]),
+        i(c, 46, -1, [55349, 56666]),
+        i(c, 46, -1, [953]),
+        i(c, 46, -1, [10812]),
+        i(c, 46, -1, [191]),
+        i(c, 46, -1, [191]),
+        i(c, 46, -1, [55349, 56510]),
+        i(c, 46, -1, [8712]),
+        i(c, 46, -1, [8953]),
+        i(c, 46, -1, [8949]),
+        i(c, 46, -1, [8948]),
+        i(c, 46, -1, [8947]),
+        i(c, 46, -1, [8712]),
+        i(c, 46, -1, [8290]),
+        i(c, 46, -1, [297]),
+        i(c, 46, -1, [1110]),
+        i(c, 46, -1, [239]),
+        i(c, 46, -1, [239]),
+        i(c, 46, -1, [309]),
+        i(c, 46, -1, [1081]),
+        i(c, 46, -1, [55349, 56615]),
+        i(c, 46, -1, [567]),
+        i(c, 46, -1, [55349, 56667]),
+        i(c, 46, -1, [55349, 56511]),
+        i(c, 46, -1, [1112]),
+        i(c, 46, -1, [1108]),
+        i(c, 46, -1, [954]),
+        i(c, 46, -1, [1008]),
+        i(c, 46, -1, [311]),
+        i(c, 46, -1, [1082]),
+        i(c, 46, -1, [55349, 56616]),
+        i(c, 46, -1, [312]),
+        i(c, 46, -1, [1093]),
+        i(c, 46, -1, [1116]),
+        i(c, 46, -1, [55349, 56668]),
+        i(c, 46, -1, [55349, 56512]),
+        i(c, 46, -1, [8666]),
+        i(c, 46, -1, [8656]),
+        i(c, 46, -1, [10523]),
+        i(c, 46, -1, [10510]),
+        i(c, 46, -1, [8806]),
+        i(c, 46, -1, [10891]),
+        i(c, 46, -1, [10594]),
+        i(c, 46, -1, [314]),
+        i(c, 46, -1, [10676]),
+        i(c, 46, -1, [8466]),
+        i(c, 46, -1, [955]),
+        i(c, 46, -1, [10216]),
+        i(c, 46, -1, [10641]),
+        i(c, 46, -1, [10216]),
+        i(c, 46, -1, [10885]),
+        i(c, 46, -1, [171]),
+        i(c, 46, -1, [171]),
+        i(c, 46, -1, [8592]),
+        i(c, 46, -1, [8676]),
+        i(c, 46, -1, [10527]),
+        i(c, 46, -1, [10525]),
+        i(c, 46, -1, [8617]),
+        i(c, 46, -1, [8619]),
+        i(c, 46, -1, [10553]),
+        i(c, 46, -1, [10611]),
+        i(c, 46, -1, [8610]),
+        i(c, 46, -1, [10923]),
+        i(c, 46, -1, [10521]),
+        i(c, 46, -1, [10925]),
+        i(c, 46, -1, [10925, 65024]),
+        i(c, 46, -1, [10508]),
+        i(c, 46, -1, [10098]),
+        i(c, 46, -1, [123]),
+        i(c, 46, -1, [91]),
+        i(c, 46, -1, [10635]),
+        i(c, 46, -1, [10639]),
+        i(c, 46, -1, [10637]),
+        i(c, 46, -1, [318]),
+        i(c, 46, -1, [316]),
+        i(c, 46, -1, [8968]),
+        i(c, 46, -1, [123]),
+        i(c, 46, -1, [1083]),
+        i(c, 46, -1, [10550]),
+        i(c, 46, -1, [8220]),
+        i(c, 46, -1, [8222]),
+        i(c, 46, -1, [10599]),
+        i(c, 46, -1, [10571]),
+        i(c, 46, -1, [8626]),
+        i(c, 46, -1, [8804]),
+        i(c, 46, -1, [8592]),
+        i(c, 46, -1, [8610]),
+        i(c, 46, -1, [8637]),
+        i(c, 46, -1, [8636]),
+        i(c, 46, -1, [8647]),
+        i(c, 46, -1, [8596]),
+        i(c, 46, -1, [8646]),
+        i(c, 46, -1, [8651]),
+        i(c, 46, -1, [8621]),
+        i(c, 46, -1, [8907]),
+        i(c, 46, -1, [8922]),
+        i(c, 46, -1, [8804]),
+        i(c, 46, -1, [8806]),
+        i(c, 46, -1, [10877]),
+        i(c, 46, -1, [10877]),
+        i(c, 46, -1, [10920]),
+        i(c, 46, -1, [10879]),
+        i(c, 46, -1, [10881]),
+        i(c, 46, -1, [10883]),
+        i(c, 46, -1, [8922, 65024]),
+        i(c, 46, -1, [10899]),
+        i(c, 46, -1, [10885]),
+        i(c, 46, -1, [8918]),
+        i(c, 46, -1, [8922]),
+        i(c, 46, -1, [10891]),
+        i(c, 46, -1, [8822]),
+        i(c, 46, -1, [8818]),
+        i(c, 46, -1, [10620]),
+        i(c, 46, -1, [8970]),
+        i(c, 46, -1, [55349, 56617]),
+        i(c, 46, -1, [8822]),
+        i(c, 46, -1, [10897]),
+        i(c, 46, -1, [8637]),
+        i(c, 46, -1, [8636]),
+        i(c, 46, -1, [10602]),
+        i(c, 46, -1, [9604]),
+        i(c, 46, -1, [1113]),
+        i(c, 46, -1, [8810]),
+        i(c, 46, -1, [8647]),
+        i(c, 46, -1, [8990]),
+        i(c, 46, -1, [10603]),
+        i(c, 46, -1, [9722]),
+        i(c, 46, -1, [320]),
+        i(c, 46, -1, [9136]),
+        i(c, 46, -1, [9136]),
+        i(c, 46, -1, [8808]),
+        i(c, 46, -1, [10889]),
+        i(c, 46, -1, [10889]),
+        i(c, 46, -1, [10887]),
+        i(c, 46, -1, [10887]),
+        i(c, 46, -1, [8808]),
+        i(c, 46, -1, [8934]),
+        i(c, 46, -1, [10220]),
+        i(c, 46, -1, [8701]),
+        i(c, 46, -1, [10214]),
+        i(c, 46, -1, [10229]),
+        i(c, 46, -1, [10231]),
+        i(c, 46, -1, [10236]),
+        i(c, 46, -1, [10230]),
+        i(c, 46, -1, [8619]),
+        i(c, 46, -1, [8620]),
+        i(c, 46, -1, [10629]),
+        i(c, 46, -1, [55349, 56669]),
+        i(c, 46, -1, [10797]),
+        i(c, 46, -1, [10804]),
+        i(c, 46, -1, [8727]),
+        i(c, 46, -1, [95]),
+        i(c, 46, -1, [9674]),
+        i(c, 46, -1, [9674]),
+        i(c, 46, -1, [10731]),
+        i(c, 46, -1, [40]),
+        i(c, 46, -1, [10643]),
+        i(c, 46, -1, [8646]),
+        i(c, 46, -1, [8991]),
+        i(c, 46, -1, [8651]),
+        i(c, 46, -1, [10605]),
+        i(c, 46, -1, [8206]),
+        i(c, 46, -1, [8895]),
+        i(c, 46, -1, [8249]),
+        i(c, 46, -1, [55349, 56513]),
+        i(c, 46, -1, [8624]),
+        i(c, 46, -1, [8818]),
+        i(c, 46, -1, [10893]),
+        i(c, 46, -1, [10895]),
+        i(c, 46, -1, [91]),
+        i(c, 46, -1, [8216]),
+        i(c, 46, -1, [8218]),
+        i(c, 46, -1, [322]),
+        i(c, 46, -1, [60]),
+        i(c, 46, -1, [60]),
+        i(c, 46, -1, [10918]),
+        i(c, 46, -1, [10873]),
+        i(c, 46, -1, [8918]),
+        i(c, 46, -1, [8907]),
+        i(c, 46, -1, [8905]),
+        i(c, 46, -1, [10614]),
+        i(c, 46, -1, [10875]),
+        i(c, 46, -1, [10646]),
+        i(c, 46, -1, [9667]),
+        i(c, 46, -1, [8884]),
+        i(c, 46, -1, [9666]),
+        i(c, 46, -1, [10570]),
+        i(c, 46, -1, [10598]),
+        i(c, 46, -1, [8808, 65024]),
+        i(c, 46, -1, [8808, 65024]),
+        i(c, 46, -1, [8762]),
+        i(c, 46, -1, [175]),
+        i(c, 46, -1, [175]),
+        i(c, 46, -1, [9794]),
+        i(c, 46, -1, [10016]),
+        i(c, 46, -1, [10016]),
+        i(c, 46, -1, [8614]),
+        i(c, 46, -1, [8614]),
+        i(c, 46, -1, [8615]),
+        i(c, 46, -1, [8612]),
+        i(c, 46, -1, [8613]),
+        i(c, 46, -1, [9646]),
+        i(c, 46, -1, [10793]),
+        i(c, 46, -1, [1084]),
+        i(c, 46, -1, [8212]),
+        i(c, 46, -1, [8737]),
+        i(c, 46, -1, [55349, 56618]),
+        i(c, 46, -1, [8487]),
+        i(c, 46, -1, [181]),
+        i(c, 46, -1, [181]),
+        i(c, 46, -1, [8739]),
+        i(c, 46, -1, [42]),
+        i(c, 46, -1, [10992]),
+        i(c, 46, -1, [183]),
+        i(c, 46, -1, [183]),
+        i(c, 46, -1, [8722]),
+        i(c, 46, -1, [8863]),
+        i(c, 46, -1, [8760]),
+        i(c, 46, -1, [10794]),
+        i(c, 46, -1, [10971]),
+        i(c, 46, -1, [8230]),
+        i(c, 46, -1, [8723]),
+        i(c, 46, -1, [8871]),
+        i(c, 46, -1, [55349, 56670]),
+        i(c, 46, -1, [8723]),
+        i(c, 46, -1, [55349, 56514]),
+        i(c, 46, -1, [8766]),
+        i(c, 46, -1, [956]),
+        i(c, 46, -1, [8888]),
+        i(c, 46, -1, [8888]),
+        i(c, 46, -1, [8921, 824]),
+        i(c, 46, -1, [8811, 8402]),
+        i(c, 46, -1, [8811, 824]),
+        i(c, 46, -1, [8653]),
+        i(c, 46, -1, [8654]),
+        i(c, 46, -1, [8920, 824]),
+        i(c, 46, -1, [8810, 8402]),
+        i(c, 46, -1, [8810, 824]),
+        i(c, 46, -1, [8655]),
+        i(c, 46, -1, [8879]),
+        i(c, 46, -1, [8878]),
+        i(c, 46, -1, [8711]),
+        i(c, 46, -1, [324]),
+        i(c, 46, -1, [8736, 8402]),
+        i(c, 46, -1, [8777]),
+        i(c, 46, -1, [10864, 824]),
+        i(c, 46, -1, [8779, 824]),
+        i(c, 46, -1, [329]),
+        i(c, 46, -1, [8777]),
+        i(c, 46, -1, [9838]),
+        i(c, 46, -1, [9838]),
+        i(c, 46, -1, [8469]),
+        i(c, 46, -1, [160]),
+        i(c, 46, -1, [160]),
+        i(c, 46, -1, [8782, 824]),
+        i(c, 46, -1, [8783, 824]),
+        i(c, 46, -1, [10819]),
+        i(c, 46, -1, [328]),
+        i(c, 46, -1, [326]),
+        i(c, 46, -1, [8775]),
+        i(c, 46, -1, [10861, 824]),
+        i(c, 46, -1, [10818]),
+        i(c, 46, -1, [1085]),
+        i(c, 46, -1, [8211]),
+        i(c, 46, -1, [8800]),
+        i(c, 46, -1, [8663]),
+        i(c, 46, -1, [10532]),
+        i(c, 46, -1, [8599]),
+        i(c, 46, -1, [8599]),
+        i(c, 46, -1, [8784, 824]),
+        i(c, 46, -1, [8802]),
+        i(c, 46, -1, [10536]),
+        i(c, 46, -1, [8770, 824]),
+        i(c, 46, -1, [8708]),
+        i(c, 46, -1, [8708]),
+        i(c, 46, -1, [55349, 56619]),
+        i(c, 46, -1, [8807, 824]),
+        i(c, 46, -1, [8817]),
+        i(c, 46, -1, [8817]),
+        i(c, 46, -1, [8807, 824]),
+        i(c, 46, -1, [10878, 824]),
+        i(c, 46, -1, [10878, 824]),
+        i(c, 46, -1, [8821]),
+        i(c, 46, -1, [8815]),
+        i(c, 46, -1, [8815]),
+        i(c, 46, -1, [8654]),
+        i(c, 46, -1, [8622]),
+        i(c, 46, -1, [10994]),
+        i(c, 46, -1, [8715]),
+        i(c, 46, -1, [8956]),
+        i(c, 46, -1, [8954]),
+        i(c, 46, -1, [8715]),
+        i(c, 46, -1, [1114]),
+        i(c, 46, -1, [8653]),
+        i(c, 46, -1, [8806, 824]),
+        i(c, 46, -1, [8602]),
+        i(c, 46, -1, [8229]),
+        i(c, 46, -1, [8816]),
+        i(c, 46, -1, [8602]),
+        i(c, 46, -1, [8622]),
+        i(c, 46, -1, [8816]),
+        i(c, 46, -1, [8806, 824]),
+        i(c, 46, -1, [10877, 824]),
+        i(c, 46, -1, [10877, 824]),
+        i(c, 46, -1, [8814]),
+        i(c, 46, -1, [8820]),
+        i(c, 46, -1, [8814]),
+        i(c, 46, -1, [8938]),
+        i(c, 46, -1, [8940]),
+        i(c, 46, -1, [8740]),
+        i(c, 46, -1, [55349, 56671]),
+        i(c, 46, -1, [172]),
+        i(c, 46, -1, [172]),
+        i(c, 46, -1, [8713]),
+        i(c, 46, -1, [8953, 824]),
+        i(c, 46, -1, [8949, 824]),
+        i(c, 46, -1, [8713]),
+        i(c, 46, -1, [8951]),
+        i(c, 46, -1, [8950]),
+        i(c, 46, -1, [8716]),
+        i(c, 46, -1, [8716]),
+        i(c, 46, -1, [8958]),
+        i(c, 46, -1, [8957]),
+        i(c, 46, -1, [8742]),
+        i(c, 46, -1, [8742]),
+        i(c, 46, -1, [11005, 8421]),
+        i(c, 46, -1, [8706, 824]),
+        i(c, 46, -1, [10772]),
+        i(c, 46, -1, [8832]),
+        i(c, 46, -1, [8928]),
+        i(c, 46, -1, [10927, 824]),
+        i(c, 46, -1, [8832]),
+        i(c, 46, -1, [10927, 824]),
+        i(c, 46, -1, [8655]),
+        i(c, 46, -1, [8603]),
+        i(c, 46, -1, [10547, 824]),
+        i(c, 46, -1, [8605, 824]),
+        i(c, 46, -1, [8603]),
+        i(c, 46, -1, [8939]),
+        i(c, 46, -1, [8941]),
+        i(c, 46, -1, [8833]),
+        i(c, 46, -1, [8929]),
+        i(c, 46, -1, [10928, 824]),
+        i(c, 46, -1, [55349, 56515]),
+        i(c, 46, -1, [8740]),
+        i(c, 46, -1, [8742]),
+        i(c, 46, -1, [8769]),
+        i(c, 46, -1, [8772]),
+        i(c, 46, -1, [8772]),
+        i(c, 46, -1, [8740]),
+        i(c, 46, -1, [8742]),
+        i(c, 46, -1, [8930]),
+        i(c, 46, -1, [8931]),
+        i(c, 46, -1, [8836]),
+        i(c, 46, -1, [10949, 824]),
+        i(c, 46, -1, [8840]),
+        i(c, 46, -1, [8834, 8402]),
+        i(c, 46, -1, [8840]),
+        i(c, 46, -1, [10949, 824]),
+        i(c, 46, -1, [8833]),
+        i(c, 46, -1, [10928, 824]),
+        i(c, 46, -1, [8837]),
+        i(c, 46, -1, [10950, 824]),
+        i(c, 46, -1, [8841]),
+        i(c, 46, -1, [8835, 8402]),
+        i(c, 46, -1, [8841]),
+        i(c, 46, -1, [10950, 824]),
+        i(c, 46, -1, [8825]),
+        i(c, 46, -1, [241]),
+        i(c, 46, -1, [241]),
+        i(c, 46, -1, [8824]),
+        i(c, 46, -1, [8938]),
+        i(c, 46, -1, [8940]),
+        i(c, 46, -1, [8939]),
+        i(c, 46, -1, [8941]),
+        i(c, 46, -1, [957]),
+        i(c, 46, -1, [35]),
+        i(c, 46, -1, [8470]),
+        i(c, 46, -1, [8199]),
+        i(c, 46, -1, [8877]),
+        i(c, 46, -1, [10500]),
+        i(c, 46, -1, [8781, 8402]),
+        i(c, 46, -1, [8876]),
+        i(c, 46, -1, [8805, 8402]),
+        i(c, 46, -1, [62, 8402]),
+        i(c, 46, -1, [10718]),
+        i(c, 46, -1, [10498]),
+        i(c, 46, -1, [8804, 8402]),
+        i(c, 46, -1, [60, 8402]),
+        i(c, 46, -1, [8884, 8402]),
+        i(c, 46, -1, [10499]),
+        i(c, 46, -1, [8885, 8402]),
+        i(c, 46, -1, [8764, 8402]),
+        i(c, 46, -1, [8662]),
+        i(c, 46, -1, [10531]),
+        i(c, 46, -1, [8598]),
+        i(c, 46, -1, [8598]),
+        i(c, 46, -1, [10535]),
+        i(c, 46, -1, [9416]),
+        i(c, 46, -1, [243]),
+        i(c, 46, -1, [243]),
+        i(c, 46, -1, [8859]),
+        i(c, 46, -1, [8858]),
+        i(c, 46, -1, [244]),
+        i(c, 46, -1, [244]),
+        i(c, 46, -1, [1086]),
+        i(c, 46, -1, [8861]),
+        i(c, 46, -1, [337]),
+        i(c, 46, -1, [10808]),
+        i(c, 46, -1, [8857]),
+        i(c, 46, -1, [10684]),
+        i(c, 46, -1, [339]),
+        i(c, 46, -1, [10687]),
+        i(c, 46, -1, [55349, 56620]),
+        i(c, 46, -1, [731]),
+        i(c, 46, -1, [242]),
+        i(c, 46, -1, [242]),
+        i(c, 46, -1, [10689]),
+        i(c, 46, -1, [10677]),
+        i(c, 46, -1, [937]),
+        i(c, 46, -1, [8750]),
+        i(c, 46, -1, [8634]),
+        i(c, 46, -1, [10686]),
+        i(c, 46, -1, [10683])].concat($$clinit_131_3());
+}
+function $$clinit_131_3(){
+    var i = initValues,
+        c = _3C_classLit;
+    $$clinit_131_3 = nullMethod;
+    return [
+        i(c, 46, -1, [8254]),
+        i(c, 46, -1, [10688]),
+        i(c, 46, -1, [333]),
+        i(c, 46, -1, [969]),
+        i(c, 46, -1, [959]),
+        i(c, 46, -1, [10678]),
+        i(c, 46, -1, [8854]),
+        i(c, 46, -1, [55349, 56672]),
+        i(c, 46, -1, [10679]),
+        i(c, 46, -1, [10681]),
+        i(c, 46, -1, [8853]),
+        i(c, 46, -1, [8744]),
+        i(c, 46, -1, [8635]),
+        i(c, 46, -1, [10845]),
+        i(c, 46, -1, [8500]),
+        i(c, 46, -1, [8500]),
+        i(c, 46, -1, [170]),
+        i(c, 46, -1, [170]),
+        i(c, 46, -1, [186]),
+        i(c, 46, -1, [186]),
+        i(c, 46, -1, [8886]),
+        i(c, 46, -1, [10838]),
+        i(c, 46, -1, [10839]),
+        i(c, 46, -1, [10843]),
+        i(c, 46, -1, [8500]),
+        i(c, 46, -1, [248]),
+        i(c, 46, -1, [248]),
+        i(c, 46, -1, [8856]),
+        i(c, 46, -1, [245]),
+        i(c, 46, -1, [245]),
+        i(c, 46, -1, [8855]),
+        i(c, 46, -1, [10806]),
+        i(c, 46, -1, [246]),
+        i(c, 46, -1, [246]),
+        i(c, 46, -1, [9021]),
+        i(c, 46, -1, [8741]),
+        i(c, 46, -1, [182]),
+        i(c, 46, -1, [182]),
+        i(c, 46, -1, [8741]),
+        i(c, 46, -1, [10995]),
+        i(c, 46, -1, [11005]),
+        i(c, 46, -1, [8706]),
+        i(c, 46, -1, [1087]),
+        i(c, 46, -1, [37]),
+        i(c, 46, -1, [46]),
+        i(c, 46, -1, [8240]),
+        i(c, 46, -1, [8869]),
+        i(c, 46, -1, [8241]),
+        i(c, 46, -1, [55349, 56621]),
+        i(c, 46, -1, [966]),
+        i(c, 46, -1, [981]),
+        i(c, 46, -1, [8499]),
+        i(c, 46, -1, [9742]),
+        i(c, 46, -1, [960]),
+        i(c, 46, -1, [8916]),
+        i(c, 46, -1, [982]),
+        i(c, 46, -1, [8463]),
+        i(c, 46, -1, [8462]),
+        i(c, 46, -1, [8463]),
+        i(c, 46, -1, [43]),
+        i(c, 46, -1, [10787]),
+        i(c, 46, -1, [8862]),
+        i(c, 46, -1, [10786]),
+        i(c, 46, -1, [8724]),
+        i(c, 46, -1, [10789]),
+        i(c, 46, -1, [10866]),
+        i(c, 46, -1, [177]),
+        i(c, 46, -1, [177]),
+        i(c, 46, -1, [10790]),
+        i(c, 46, -1, [10791]),
+        i(c, 46, -1, [177]),
+        i(c, 46, -1, [10773]),
+        i(c, 46, -1, [55349, 56673]),
+        i(c, 46, -1, [163]),
+        i(c, 46, -1, [163]),
+        i(c, 46, -1, [8826]),
+        i(c, 46, -1, [10931]),
+        i(c, 46, -1, [10935]),
+        i(c, 46, -1, [8828]),
+        i(c, 46, -1, [10927]),
+        i(c, 46, -1, [8826]),
+        i(c, 46, -1, [10935]),
+        i(c, 46, -1, [8828]),
+        i(c, 46, -1, [10927]),
+        i(c, 46, -1, [10937]),
+        i(c, 46, -1, [10933]),
+        i(c, 46, -1, [8936]),
+        i(c, 46, -1, [8830]),
+        i(c, 46, -1, [8242]),
+        i(c, 46, -1, [8473]),
+        i(c, 46, -1, [10933]),
+        i(c, 46, -1, [10937]),
+        i(c, 46, -1, [8936]),
+        i(c, 46, -1, [8719]),
+        i(c, 46, -1, [9006]),
+        i(c, 46, -1, [8978]),
+        i(c, 46, -1, [8979]),
+        i(c, 46, -1, [8733]),
+        i(c, 46, -1, [8733]),
+        i(c, 46, -1, [8830]),
+        i(c, 46, -1, [8880]),
+        i(c, 46, -1, [55349, 56517]),
+        i(c, 46, -1, [968]),
+        i(c, 46, -1, [8200]),
+        i(c, 46, -1, [55349, 56622]),
+        i(c, 46, -1, [10764]),
+        i(c, 46, -1, [55349, 56674]),
+        i(c, 46, -1, [8279]),
+        i(c, 46, -1, [55349, 56518]),
+        i(c, 46, -1, [8461]),
+        i(c, 46, -1, [10774]),
+        i(c, 46, -1, [63]),
+        i(c, 46, -1, [8799]),
+        i(c, 46, -1, [34]),
+        i(c, 46, -1, [34]),
+        i(c, 46, -1, [8667]),
+        i(c, 46, -1, [8658]),
+        i(c, 46, -1, [10524]),
+        i(c, 46, -1, [10511]),
+        i(c, 46, -1, [10596]),
+        i(c, 46, -1, [8765, 817]),
+        i(c, 46, -1, [341]),
+        i(c, 46, -1, [8730]),
+        i(c, 46, -1, [10675]),
+        i(c, 46, -1, [10217]),
+        i(c, 46, -1, [10642]),
+        i(c, 46, -1, [10661]),
+        i(c, 46, -1, [10217]),
+        i(c, 46, -1, [187]),
+        i(c, 46, -1, [187]),
+        i(c, 46, -1, [8594]),
+        i(c, 46, -1, [10613]),
+        i(c, 46, -1, [8677]),
+        i(c, 46, -1, [10528]),
+        i(c, 46, -1, [10547]),
+        i(c, 46, -1, [10526]),
+        i(c, 46, -1, [8618]),
+        i(c, 46, -1, [8620]),
+        i(c, 46, -1, [10565]),
+        i(c, 46, -1, [10612]),
+        i(c, 46, -1, [8611]),
+        i(c, 46, -1, [8605]),
+        i(c, 46, -1, [10522]),
+        i(c, 46, -1, [8758]),
+        i(c, 46, -1, [8474]),
+        i(c, 46, -1, [10509]),
+        i(c, 46, -1, [10099]),
+        i(c, 46, -1, [125]),
+        i(c, 46, -1, [93]),
+        i(c, 46, -1, [10636]),
+        i(c, 46, -1, [10638]),
+        i(c, 46, -1, [10640]),
+        i(c, 46, -1, [345]),
+        i(c, 46, -1, [343]),
+        i(c, 46, -1, [8969]),
+        i(c, 46, -1, [125]),
+        i(c, 46, -1, [1088]),
+        i(c, 46, -1, [10551]),
+        i(c, 46, -1, [10601]),
+        i(c, 46, -1, [8221]),
+        i(c, 46, -1, [8221]),
+        i(c, 46, -1, [8627]),
+        i(c, 46, -1, [8476]),
+        i(c, 46, -1, [8475]),
+        i(c, 46, -1, [8476]),
+        i(c, 46, -1, [8477]),
+        i(c, 46, -1, [9645]),
+        i(c, 46, -1, [174]),
+        i(c, 46, -1, [174]),
+        i(c, 46, -1, [10621]),
+        i(c, 46, -1, [8971]),
+        i(c, 46, -1, [55349, 56623]),
+        i(c, 46, -1, [8641]),
+        i(c, 46, -1, [8640]),
+        i(c, 46, -1, [10604]),
+        i(c, 46, -1, [961]),
+        i(c, 46, -1, [1009]),
+        i(c, 46, -1, [8594]),
+        i(c, 46, -1, [8611]),
+        i(c, 46, -1, [8641]),
+        i(c, 46, -1, [8640]),
+        i(c, 46, -1, [8644]),
+        i(c, 46, -1, [8652]),
+        i(c, 46, -1, [8649]),
+        i(c, 46, -1, [8605]),
+        i(c, 46, -1, [8908]),
+        i(c, 46, -1, [730]),
+        i(c, 46, -1, [8787]),
+        i(c, 46, -1, [8644]),
+        i(c, 46, -1, [8652]),
+        i(c, 46, -1, [8207]),
+        i(c, 46, -1, [9137]),
+        i(c, 46, -1, [9137]),
+        i(c, 46, -1, [10990]),
+        i(c, 46, -1, [10221]),
+        i(c, 46, -1, [8702]),
+        i(c, 46, -1, [10215]),
+        i(c, 46, -1, [10630]),
+        i(c, 46, -1, [55349, 56675]),
+        i(c, 46, -1, [10798]),
+        i(c, 46, -1, [10805]),
+        i(c, 46, -1, [41]),
+        i(c, 46, -1, [10644]),
+        i(c, 46, -1, [10770]),
+        i(c, 46, -1, [8649]),
+        i(c, 46, -1, [8250]),
+        i(c, 46, -1, [55349, 56519]),
+        i(c, 46, -1, [8625]),
+        i(c, 46, -1, [93]),
+        i(c, 46, -1, [8217]),
+        i(c, 46, -1, [8217]),
+        i(c, 46, -1, [8908]),
+        i(c, 46, -1, [8906]),
+        i(c, 46, -1, [9657]),
+        i(c, 46, -1, [8885]),
+        i(c, 46, -1, [9656]),
+        i(c, 46, -1, [10702]),
+        i(c, 46, -1, [10600]),
+        i(c, 46, -1, [8478]),
+        i(c, 46, -1, [347]),
+        i(c, 46, -1, [8218]),
+        i(c, 46, -1, [8827]),
+        i(c, 46, -1, [10932]),
+        i(c, 46, -1, [10936]),
+        i(c, 46, -1, [353]),
+        i(c, 46, -1, [8829]),
+        i(c, 46, -1, [10928]),
+        i(c, 46, -1, [351]),
+        i(c, 46, -1, [349]),
+        i(c, 46, -1, [10934]),
+        i(c, 46, -1, [10938]),
+        i(c, 46, -1, [8937]),
+        i(c, 46, -1, [10771]),
+        i(c, 46, -1, [8831]),
+        i(c, 46, -1, [1089]),
+        i(c, 46, -1, [8901]),
+        i(c, 46, -1, [8865]),
+        i(c, 46, -1, [10854]),
+        i(c, 46, -1, [8664]),
+        i(c, 46, -1, [10533]),
+        i(c, 46, -1, [8600]),
+        i(c, 46, -1, [8600]),
+        i(c, 46, -1, [167]),
+        i(c, 46, -1, [167]),
+        i(c, 46, -1, [59]),
+        i(c, 46, -1, [10537]),
+        i(c, 46, -1, [8726]),
+        i(c, 46, -1, [8726]),
+        i(c, 46, -1, [10038]),
+        i(c, 46, -1, [55349, 56624]),
+        i(c, 46, -1, [8994]),
+        i(c, 46, -1, [9839]),
+        i(c, 46, -1, [1097]),
+        i(c, 46, -1, [1096]),
+        i(c, 46, -1, [8739]),
+        i(c, 46, -1, [8741]),
+        i(c, 46, -1, [173]),
+        i(c, 46, -1, [173]),
+        i(c, 46, -1, [963]),
+        i(c, 46, -1, [962]),
+        i(c, 46, -1, [962]),
+        i(c, 46, -1, [8764]),
+        i(c, 46, -1, [10858]),
+        i(c, 46, -1, [8771]),
+        i(c, 46, -1, [8771]),
+        i(c, 46, -1, [10910]),
+        i(c, 46, -1, [10912]),
+        i(c, 46, -1, [10909]),
+        i(c, 46, -1, [10911]),
+        i(c, 46, -1, [8774]),
+        i(c, 46, -1, [10788]),
+        i(c, 46, -1, [10610]),
+        i(c, 46, -1, [8592]),
+        i(c, 46, -1, [8726]),
+        i(c, 46, -1, [10803]),
+        i(c, 46, -1, [10724]),
+        i(c, 46, -1, [8739]),
+        i(c, 46, -1, [8995]),
+        i(c, 46, -1, [10922]),
+        i(c, 46, -1, [10924]),
+        i(c, 46, -1, [10924, 65024]),
+        i(c, 46, -1, [1100]),
+        i(c, 46, -1, [47]),
+        i(c, 46, -1, [10692]),
+        i(c, 46, -1, [9023]),
+        i(c, 46, -1, [55349, 56676]),
+        i(c, 46, -1, [9824]),
+        i(c, 46, -1, [9824]),
+        i(c, 46, -1, [8741]),
+        i(c, 46, -1, [8851]),
+        i(c, 46, -1, [8851, 65024]),
+        i(c, 46, -1, [8852]),
+        i(c, 46, -1, [8852, 65024]),
+        i(c, 46, -1, [8847]),
+        i(c, 46, -1, [8849]),
+        i(c, 46, -1, [8847]),
+        i(c, 46, -1, [8849]),
+        i(c, 46, -1, [8848]),
+        i(c, 46, -1, [8850]),
+        i(c, 46, -1, [8848]),
+        i(c, 46, -1, [8850]),
+        i(c, 46, -1, [9633]),
+        i(c, 46, -1, [9633]),
+        i(c, 46, -1, [9642]),
+        i(c, 46, -1, [9642]),
+        i(c, 46, -1, [8594]),
+        i(c, 46, -1, [55349, 56520]),
+        i(c, 46, -1, [8726]),
+        i(c, 46, -1, [8995]),
+        i(c, 46, -1, [8902]),
+        i(c, 46, -1, [9734]),
+        i(c, 46, -1, [9733]),
+        i(c, 46, -1, [1013]),
+        i(c, 46, -1, [981]),
+        i(c, 46, -1, [175]),
+        i(c, 46, -1, [8834]),
+        i(c, 46, -1, [10949]),
+        i(c, 46, -1, [10941]),
+        i(c, 46, -1, [8838]),
+        i(c, 46, -1, [10947]),
+        i(c, 46, -1, [10945]),
+        i(c, 46, -1, [10955]),
+        i(c, 46, -1, [8842]),
+        i(c, 46, -1, [10943]),
+        i(c, 46, -1, [10617]),
+        i(c, 46, -1, [8834]),
+        i(c, 46, -1, [8838]),
+        i(c, 46, -1, [10949]),
+        i(c, 46, -1, [8842]),
+        i(c, 46, -1, [10955]),
+        i(c, 46, -1, [10951]),
+        i(c, 46, -1, [10965]),
+        i(c, 46, -1, [10963]),
+        i(c, 46, -1, [8827]),
+        i(c, 46, -1, [10936]),
+        i(c, 46, -1, [8829]),
+        i(c, 46, -1, [10928]),
+        i(c, 46, -1, [10938]),
+        i(c, 46, -1, [10934]),
+        i(c, 46, -1, [8937]),
+        i(c, 46, -1, [8831]),
+        i(c, 46, -1, [8721]),
+        i(c, 46, -1, [9834]),
+        i(c, 46, -1, [185]),
+        i(c, 46, -1, [185]),
+        i(c, 46, -1, [178]),
+        i(c, 46, -1, [178]),
+        i(c, 46, -1, [179]),
+        i(c, 46, -1, [179]),
+        i(c, 46, -1, [8835]),
+        i(c, 46, -1, [10950]),
+        i(c, 46, -1, [10942]),
+        i(c, 46, -1, [10968]),
+        i(c, 46, -1, [8839]),
+        i(c, 46, -1, [10948]),
+        i(c, 46, -1, [10185]),
+        i(c, 46, -1, [10967]),
+        i(c, 46, -1, [10619]),
+        i(c, 46, -1, [10946]),
+        i(c, 46, -1, [10956]),
+        i(c, 46, -1, [8843]),
+        i(c, 46, -1, [10944]),
+        i(c, 46, -1, [8835]),
+        i(c, 46, -1, [8839]),
+        i(c, 46, -1, [10950]),
+        i(c, 46, -1, [8843]),
+        i(c, 46, -1, [10956]),
+        i(c, 46, -1, [10952]),
+        i(c, 46, -1, [10964]),
+        i(c, 46, -1, [10966]),
+        i(c, 46, -1, [8665]),
+        i(c, 46, -1, [10534]),
+        i(c, 46, -1, [8601]),
+        i(c, 46, -1, [8601]),
+        i(c, 46, -1, [10538]),
+        i(c, 46, -1, [223]),
+        i(c, 46, -1, [223]),
+        i(c, 46, -1, [8982]),
+        i(c, 46, -1, [964]),
+        i(c, 46, -1, [9140]),
+        i(c, 46, -1, [357]),
+        i(c, 46, -1, [355]),
+        i(c, 46, -1, [1090]),
+        i(c, 46, -1, [8411]),
+        i(c, 46, -1, [8981]),
+        i(c, 46, -1, [55349, 56625]),
+        i(c, 46, -1, [8756]),
+        i(c, 46, -1, [8756]),
+        i(c, 46, -1, [952]),
+        i(c, 46, -1, [977]),
+        i(c, 46, -1, [977]),
+        i(c, 46, -1, [8776]),
+        i(c, 46, -1, [8764]),
+        i(c, 46, -1, [8201]),
+        i(c, 46, -1, [8776]),
+        i(c, 46, -1, [8764]),
+        i(c, 46, -1, [254]),
+        i(c, 46, -1, [254]),
+        i(c, 46, -1, [732]),
+        i(c, 46, -1, [215]),
+        i(c, 46, -1, [215]),
+        i(c, 46, -1, [8864]),
+        i(c, 46, -1, [10801]),
+        i(c, 46, -1, [10800]),
+        i(c, 46, -1, [8749]),
+        i(c, 46, -1, [10536]),
+        i(c, 46, -1, [8868]),
+        i(c, 46, -1, [9014]),
+        i(c, 46, -1, [10993]),
+        i(c, 46, -1, [55349, 56677]),
+        i(c, 46, -1, [10970]),
+        i(c, 46, -1, [10537]),
+        i(c, 46, -1, [8244]),
+        i(c, 46, -1, [8482]),
+        i(c, 46, -1, [9653]),
+        i(c, 46, -1, [9663]),
+        i(c, 46, -1, [9667]),
+        i(c, 46, -1, [8884]),
+        i(c, 46, -1, [8796]),
+        i(c, 46, -1, [9657]),
+        i(c, 46, -1, [8885]),
+        i(c, 46, -1, [9708]),
+        i(c, 46, -1, [8796]),
+        i(c, 46, -1, [10810]),
+        i(c, 46, -1, [10809]),
+        i(c, 46, -1, [10701]),
+        i(c, 46, -1, [10811]),
+        i(c, 46, -1, [9186]),
+        i(c, 46, -1, [55349, 56521]),
+        i(c, 46, -1, [1094]),
+        i(c, 46, -1, [1115]),
+        i(c, 46, -1, [359]),
+        i(c, 46, -1, [8812]),
+        i(c, 46, -1, [8606]),
+        i(c, 46, -1, [8608]),
+        i(c, 46, -1, [8657]),
+        i(c, 46, -1, [10595]),
+        i(c, 46, -1, [250]),
+        i(c, 46, -1, [250]),
+        i(c, 46, -1, [8593]),
+        i(c, 46, -1, [1118]),
+        i(c, 46, -1, [365]),
+        i(c, 46, -1, [251]),
+        i(c, 46, -1, [251]),
+        i(c, 46, -1, [1091]),
+        i(c, 46, -1, [8645]),
+        i(c, 46, -1, [369]),
+        i(c, 46, -1, [10606]),
+        i(c, 46, -1, [10622]),
+        i(c, 46, -1, [55349, 56626]),
+        i(c, 46, -1, [249]),
+        i(c, 46, -1, [249]),
+        i(c, 46, -1, [8639]),
+        i(c, 46, -1, [8638]),
+        i(c, 46, -1, [9600]),
+        i(c, 46, -1, [8988]),
+        i(c, 46, -1, [8988]),
+        i(c, 46, -1, [8975]),
+        i(c, 46, -1, [9720]),
+        i(c, 46, -1, [363]),
+        i(c, 46, -1, [168]),
+        i(c, 46, -1, [168]),
+        i(c, 46, -1, [371]),
+        i(c, 46, -1, [55349, 56678]),
+        i(c, 46, -1, [8593]),
+        i(c, 46, -1, [8597]),
+        i(c, 46, -1, [8639]),
+        i(c, 46, -1, [8638]),
+        i(c, 46, -1, [8846]),
+        i(c, 46, -1, [965]),
+        i(c, 46, -1, [978]),
+        i(c, 46, -1, [965]),
+        i(c, 46, -1, [8648]),
+        i(c, 46, -1, [8989]),
+        i(c, 46, -1, [8989]),
+        i(c, 46, -1, [8974]),
+        i(c, 46, -1, [367]),
+        i(c, 46, -1, [9721]),
+        i(c, 46, -1, [55349, 56522]),
+        i(c, 46, -1, [8944]),
+        i(c, 46, -1, [361]),
+        i(c, 46, -1, [9653]),
+        i(c, 46, -1, [9652]),
+        i(c, 46, -1, [8648]),
+        i(c, 46, -1, [252]),
+        i(c, 46, -1, [252]),
+        i(c, 46, -1, [10663]),
+        i(c, 46, -1, [8661]),
+        i(c, 46, -1, [10984]),
+        i(c, 46, -1, [10985]),
+        i(c, 46, -1, [8872]),
+        i(c, 46, -1, [10652]),
+        i(c, 46, -1, [1013]),
+        i(c, 46, -1, [1008]),
+        i(c, 46, -1, [8709]),
+        i(c, 46, -1, [981]),
+        i(c, 46, -1, [982]),
+        i(c, 46, -1, [8733]),
+        i(c, 46, -1, [8597]),
+        i(c, 46, -1, [1009]),
+        i(c, 46, -1, [962]),
+        i(c, 46, -1, [8842, 65024]),
+        i(c, 46, -1, [10955, 65024]),
+        i(c, 46, -1, [8843, 65024]),
+        i(c, 46, -1, [10956, 65024]),
+        i(c, 46, -1, [977]),
+        i(c, 46, -1, [8882]),
+        i(c, 46, -1, [8883]),
+        i(c, 46, -1, [1074]),
+        i(c, 46, -1, [8866]),
+        i(c, 46, -1, [8744]),
+        i(c, 46, -1, [8891]),
+        i(c, 46, -1, [8794]),
+        i(c, 46, -1, [8942]),
+        i(c, 46, -1, [124]),
+        i(c, 46, -1, [124]),
+        i(c, 46, -1, [55349, 56627]),
+        i(c, 46, -1, [8882]),
+        i(c, 46, -1, [8834, 8402]),
+        i(c, 46, -1, [8835, 8402]),
+        i(c, 46, -1, [55349, 56679]),
+        i(c, 46, -1, [8733]),
+        i(c, 46, -1, [8883]),
+        i(c, 46, -1, [55349, 56523]),
+        i(c, 46, -1, [10955, 65024]),
+        i(c, 46, -1, [8842, 65024]),
+        i(c, 46, -1, [10956, 65024]),
+        i(c, 46, -1, [8843, 65024]),
+        i(c, 46, -1, [10650]),
+        i(c, 46, -1, [373]),
+        i(c, 46, -1, [10847]),
+        i(c, 46, -1, [8743]),
+        i(c, 46, -1, [8793]),
+        i(c, 46, -1, [8472]),
+        i(c, 46, -1, [55349, 56628]),
+        i(c, 46, -1, [55349, 56680]),
+        i(c, 46, -1, [8472]),
+        i(c, 46, -1, [8768]),
+        i(c, 46, -1, [8768]),
+        i(c, 46, -1, [55349, 56524]),
+        i(c, 46, -1, [8898]),
+        i(c, 46, -1, [9711]),
+        i(c, 46, -1, [8899]),
+        i(c, 46, -1, [9661]),
+        i(c, 46, -1, [55349, 56629]),
+        i(c, 46, -1, [10234]),
+        i(c, 46, -1, [10231]),
+        i(c, 46, -1, [958]),
+        i(c, 46, -1, [10232]),
+        i(c, 46, -1, [10229]),
+        i(c, 46, -1, [10236]),
+        i(c, 46, -1, [8955]),
+        i(c, 46, -1, [10752]),
+        i(c, 46, -1, [55349, 56681]),
+        i(c, 46, -1, [10753]),
+        i(c, 46, -1, [10754]),
+        i(c, 46, -1, [10233]),
+        i(c, 46, -1, [10230]),
+        i(c, 46, -1, [55349, 56525]),
+        i(c, 46, -1, [10758]),
+        i(c, 46, -1, [10756]),
+        i(c, 46, -1, [9651]),
+        i(c, 46, -1, [8897]),
+        i(c, 46, -1, [8896]),
+        i(c, 46, -1, [253]),
+        i(c, 46, -1, [253]),
+        i(c, 46, -1, [1103]),
+        i(c, 46, -1, [375]),
+        i(c, 46, -1, [1099]),
+        i(c, 46, -1, [165]),
+        i(c, 46, -1, [165]),
+        i(c, 46, -1, [55349, 56630]),
+        i(c, 46, -1, [1111]),
+        i(c, 46, -1, [55349, 56682]),
+        i(c, 46, -1, [55349, 56526]),
+        i(c, 46, -1, [1102]),
+        i(c, 46, -1, [255]),
+        i(c, 46, -1, [255]),
+        i(c, 46, -1, [378]),
+        i(c, 46, -1, [382]),
+        i(c, 46, -1, [1079]),
+        i(c, 46, -1, [380]),
+        i(c, 46, -1, [8488]),
+        i(c, 46, -1, [950]),
+        i(c, 46, -1, [55349, 56631]),
+        i(c, 46, -1, [1078]),
+        i(c, 46, -1, [8669]),
+        i(c, 46, -1, [55349, 56683]),
+        i(c, 46, -1, [55349, 56527]),
+        i(c, 46, -1, [8205]),
+        i(c, 46, -1, [8204])];
+}
+
+function $$$clinit_131(){
+  	$$$clinit_131 = nullMethod;
+	 WINDOWS_1252 = initValues(_3_3C_classLit, 62, 16, [initValues(_3C_classLit, 46, -1, [8364]), initValues(_3C_classLit, 46, -1, [129]), initValues(_3C_classLit, 46, -1, [8218]), initValues(_3C_classLit, 46, -1, [402]), initValues(_3C_classLit, 46, -1, [8222]), initValues(_3C_classLit, 46, -1, [8230]), initValues(_3C_classLit, 46, -1, [8224]), initValues(_3C_classLit, 46, -1, [8225]), initValues(_3C_classLit, 46, -1, [710]), initValues(_3C_classLit, 46, -1, [8240]), initValues(_3C_classLit, 46, -1, [352]), initValues(_3C_classLit, 46, -1, [8249]), initValues(_3C_classLit, 46, -1, [338]), initValues(_3C_classLit, 46, -1, [141]), initValues(_3C_classLit, 46, -1, [381]), initValues(_3C_classLit, 46, -1, [143]), initValues(_3C_classLit, 46, -1, [144]), initValues(_3C_classLit, 46, -1, [8216]), initValues(_3C_classLit, 46, -1, [8217]), initValues(_3C_classLit, 46, -1, [8220]), initValues(_3C_classLit, 46, -1, [8221]), initValues(_3C_classLit, 46, -1, [8226]), initValues(_3C_classLit, 46, -1, [8211]), initValues(_3C_classLit, 46, -1, [8212]), initValues(_3C_classLit, 46, -1, [732]), initValues(_3C_classLit, 46, -1, [8482]), initValues(_3C_classLit, 46, -1, [353]), initValues(_3C_classLit, 46, -1, [8250]), initValues(_3C_classLit, 46, -1, [339]), initValues(_3C_classLit, 46, -1, [157]), initValues(_3C_classLit, 46, -1, [382]), initValues(_3C_classLit, 46, -1, [376])]);
+}
+
+var NAMES, VALUES_0, WINDOWS_1252;
+function $clinit_132(){
+  $clinit_132 = nullMethod;
+  HILO_ACCEL = initValues(_3_3I_classLit, 64, 18, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 12386493, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40174181, 0, 0, 0, 0, 60162966, 0, 0, 0, 75367550, 0, 0, 0, 82183396, 0, 0, 0, 0, 0, 115148507, 0, 0, 135989275, 139397199, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28770743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82248935, 0, 0, 0, 0, 0, 115214046, 0, 0, 0, 139528272, 0, 0, 0, 0]), null, initValues(_3I_classLit, 48, -1, [0, 0, 0, 4980811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38470219, 0, 0, 0, 0, 0, 0, 0, 0, 64553944, 0, 0, 0, 0, 0, 0, 0, 92145022, 0, 0, 0, 0, 0, 0, 0, 0, 139593810, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [65536, 0, 0, 0, 0, 0, 0, 0, 13172937, 0, 0, 0, 0, 0, 25297282, 0, 0, 28901816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71500866, 0, 0, 0, 0, 82380008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), null, initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94897574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 2555943, 0, 0, 0, 0, 0, 0, 0, 15532269, 0, 0, 0, 0, 0, 0, 0, 31785444, 34406924, 0, 0, 0, 0, 0, 40895088, 0, 0, 0, 60228503, 0, 0, 0, 0, 0, 0, 0, 82445546, 0, 0, 0, 0, 0, 115279583, 0, 0, 136054812, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40239718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 5046349, 0, 0, 10944679, 0, 13238474, 0, 15597806, 16056565, 0, 20578618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), null, initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95225257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [196610, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 8454273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46072511, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 2687016, 0, 0, 0, 0, 0, 13304011, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31850982, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), null, null, initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34472462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95290798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 5111886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34603535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105776718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 8585346, 0, 11075752, 0, 0, 0, 0, 16187638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28508594, 0, 0, 0, 0, 0, 0, 0, 40305255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95421871, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), null, null, null, initValues(_3I_classLit, 48, -1, [0, 0, 0, 5177423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), null, null, null, null, null, null, initValues(_3I_classLit, 48, -1, [327684, 1900571, 2949162, 5374032, 8716420, 0, 11206826, 12517566, 13435084, 0, 15663343, 16515320, 19988785, 20644155, 25428355, 27197855, 0, 29163962, 31916519, 34734609, 36045347, 0, 0, 0, 40436328, 40960625, 41615994, 46596800, 54264627, 60556184, 64750554, 68879387, 71763012, 75826303, 77268122, 0, 81462490, 83952875, 92865919, 96142769, 105973327, 110167691, 0, 116917984, 121833283, 132253665, 136251421, 140707923, 0, 0, 144574620, 145361066]), initValues(_3I_classLit, 48, -1, [393222, 0, 0, 0, 0, 0, 11272364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36176423, 38535756, 0, 0, 0, 0, 41681532, 46727880, 0, 60687261, 0, 0, 71828552, 75891846, 0, 0, 0, 84411650, 0, 96404924, 0, 0, 0, 117376761, 121898820, 132319203, 136382496, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [589831, 1966110, 3276846, 5505107, 8978566, 10420383, 11468973, 12583104, 13631694, 15139046, 15794416, 16711933, 20054322, 20840764, 25624965, 27263392, 0, 29360574, 32244200, 34931219, 36373033, 38601293, 39584348, 0, 40567402, 41091698, 42205821, 46858954, 54723389, 60818335, 65143773, 68944924, 71959625, 75957383, 77530268, 80938194, 81593564, 84739337, 92997002, 96863680, 106235474, 110233234, 0, 117704448, 122816325, 132515812, 136579106, 140773476, 142149753, 143001732, 144705695, 145492139]), initValues(_3I_classLit, 48, -1, [0, 0, 3342387, 0, 9044106, 0, 11534512, 0, 13697233, 0, 0, 0, 0, 0, 25690504, 0, 0, 0, 0, 0, 36438572, 38732366, 0, 0, 0, 41157236, 0, 46924492, 54788932, 61080481, 65209315, 0, 72025163, 0, 0, 0, 0, 85132558, 93062540, 96929223, 106563158, 0, 0, 118032133, 123012947, 132581351, 136775717, 140839013, 0, 143067271, 0, 145557677]), initValues(_3I_classLit, 48, -1, [0, 2162719, 3473460, 5636181, 0, 0, 0, 0, 0, 0, 0, 18809088, 20185395, 21299519, 0, 0, 0, 29622721, 0, 0, 0, 39256656, 39649885, 0, 0, 41288309, 42336901, 47448781, 55182149, 61342629, 65274852, 69010461, 72811596, 76219528, 77726880, 0, 0, 86967572, 93128077, 97650120, 106628699, 110560915, 0, 118490890, 123733846, 132646888, 0, 141232230, 142411898, 0, 144836769, 145688750]), initValues(_3I_classLit, 48, -1, [655370, 2228258, 3538998, 5701719, 9109643, 10485920, 11600049, 12648641, 13762770, 15204584, 15859954, 18874656, 20250933, 21365062, 25756041, 27328929, 28574132, 29688261, 32309741, 34996758, 36504109, 39322200, 39715422, 39912033, 40632940, 41353847, 42467975, 47514325, 55247691, 61473705, 65405925, 69272606, 72877144, 76285068, 77857955, 81003732, 81659102, 87164208, 93193614, 97715667, 106759772, 110626456, 114296528, 118687505, 123864929, 132712425, 136906792, 141297772, 142477438, 143132808, 144902307, 145754288]), initValues(_3I_classLit, 48, -1, [786443, 0, 0, 0, 9240716, 0, 11665586, 0, 13893843, 0, 0, 0, 0, 0, 25887114, 0, 0, 0, 0, 0, 36635182, 0, 0, 0, 0, 0, 42599049, 0, 0, 0, 65733607, 0, 73008217, 0, 77989029, 0, 81724639, 87295283, 0, 98305492, 107021918, 0, 0, 0, 0, 0, 137037866, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 3604535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27394466, 0, 29753798, 32571886, 35258903, 0, 0, 0, 0, 0, 0, 0, 0, 55509836, 61604779, 0, 0, 0, 0, 0, 0, 81790176, 87557429, 93259151, 98502109, 107152994, 110888601, 0, 119015188, 124323683, 133498858, 137234476, 0, 0, 143263881, 0, 145819825]), initValues(_3I_classLit, 48, -1, [0, 0, 3866680, 6160472, 0, 10616993, 0, 12714178, 0, 0, 0, 0, 20316470, 0, 0, 27460003, 0, 31261127, 32637426, 35521051, 0, 0, 0, 39977570, 0, 0, 0, 48366294, 56492880, 62391213, 0, 69338146, 73073755, 0, 78316711, 0, 0, 0, 93980048, 98764256, 107218532, 111085213, 114362065, 119736089, 125241194, 133957622, 0, 0, 0, 143329419, 144967844, 145885362]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62456761, 0, 69403683, 73139292, 0, 78382252, 0, 81855713, 87622969, 0, 98829796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48431843, 0, 0, 0, 0, 0, 76416141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [851981, 0, 4063292, 0, 9306254, 0, 0, 0, 0, 0, 0, 19005729, 0, 0, 0, 27525540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42795659, 49152740, 56623967, 62587834, 66061292, 69600292, 73401437, 0, 0, 0, 0, 87950650, 94111131, 99878373, 107546213, 112002720, 0, 119932708, 125306744, 0, 137496623, 141363309, 0, 143460492, 0, 0]), initValues(_3I_classLit, 48, -1, [917518, 0, 0, 0, 9502863, 0, 0, 0, 14155989, 0, 0, 19071267, 0, 0, 26083724, 0, 0, 0, 32702963, 0, 36700720, 0, 0, 0, 0, 0, 43057806, 0, 0, 0, 66520049, 0, 0, 0, 78841005, 81069269, 0, 88147263, 0, 99943925, 107873898, 112068270, 0, 120063783, 125831033, 0, 137693235, 0, 0, 143526030, 0, 0]), initValues(_3I_classLit, 48, -1, [983055, 0, 0, 0, 0, 0, 0, 0, 14483673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37093937, 0, 0, 0, 0, 0, 44565138, 49349359, 0, 0, 66651128, 69665831, 73860193, 0, 79561908, 0, 0, 88606018, 94176669, 0, 0, 0, 0, 120129321, 0, 0, 0, 141494382, 0, 143591567, 0, 0]), initValues(_3I_classLit, 48, -1, [1114128, 2293795, 4587583, 8257631, 9633938, 10813603, 11731123, 12845251, 14680286, 15270121, 15925491, 19661092, 20382007, 24969543, 26149263, 27656613, 28639669, 31392222, 32768500, 35586591, 37225015, 39387737, 39780959, 40043107, 40698477, 41419384, 44696233, 52495090, 57738081, 63439804, 66782202, 69927976, 73925736, 76809359, 79824063, 81134806, 81921250, 89785673, 94307742, 100795894, 107939439, 112330415, 114427602, 120588074, 126158721, 134416381, 137824310, 141559920, 142542975, 143853712, 145033381, 145950899]), initValues(_3I_classLit, 48, -1, [1179666, 0, 0, 0, 9699476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26280336, 0, 0, 0, 0, 0, 38076985, 0, 0, 0, 0, 0, 45220523, 52560674, 0, 0, 67175420, 69993516, 0, 0, 79889603, 0, 0, 89916763, 94373280, 101451267, 108136048, 0, 114493139, 120784689, 126355334, 134481924, 138414136, 141625457, 142608512, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 9896085, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33292789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67830786, 0, 0, 0, 80020676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127403913, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [1310739, 2359332, 4653127, 0, 0, 0, 12189876, 0, 0, 0, 0, 0, 0, 0, 26345874, 28246439, 0, 31457760, 0, 35652128, 38142534, 0, 0, 0, 0, 0, 45351603, 52757283, 57869170, 63636425, 67961868, 71304237, 73991273, 0, 0, 0, 0, 90309981, 0, 101910029, 108988019, 114034355, 0, 120850228, 127469465, 135464965, 138741825, 141690994, 142739585, 143984788, 0, 0]), initValues(_3I_classLit, 48, -1, [1441813, 2424869, 4718664, 8388735, 10027160, 10879142, 12255419, 12976325, 14745825, 15401194, 15991028, 19857709, 20447544, 25035134, 26542483, 28377520, 28705206, 31588833, 33358333, 35783201, 38208071, 39453274, 39846496, 40108644, 40764014, 41484921, 45613749, 53216038, 58196852, 63898572, 68158478, 71369793, 74253418, 77005973, 80479430, 81265879, 81986787, 90965347, 94504353, 103679508, 109250176, 114165453, 114558676, 121243445, 127731610, 135727124, 138807366, 142018675, 142805123, 144115862, 145098918, 146016436]), initValues(_3I_classLit, 48, -1, [1572887, 0, 0, 0, 10092698, 0, 12320956, 0, 14811362, 0, 0, 19923248, 0, 25166207, 26739094, 0, 0, 0, 33423870, 0, 38273608, 0, 0, 0, 0, 0, 45744825, 0, 58262393, 64095184, 68355089, 0, 75170926, 0, 80610509, 0, 0, 91817325, 0, 104203823, 109512324, 0, 0, 121636667, 128059294, 0, 139069511, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [1703961, 2490406, 4849737, 0, 10223771, 0, 0, 13107399, 15007971, 15466732, 0, 0, 20513081, 25231745, 26870169, 0, 0, 31654371, 34275839, 0, 38404681, 0, 0, 0, 40829551, 0, 45875899, 53609261, 59900794, 64226259, 68551700, 0, 0, 0, 80807119, 81331417, 0, 91948410, 94700963, 104465975, 109643400, 114230991, 114951893, 121702209, 131663779, 0, 139266123, 0, 0, 144246936, 145295527, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27132315, 0, 0, 0, 0, 0, 0, 39518811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75302012, 0, 0, 0, 0, 92079484, 0, 105383483, 109708938, 0, 0, 0, 0, 0, 0, 0, 0, 144312474, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46006973, 0, 60031891, 64291797, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105711177, 0, 0, 0, 0, 131991514, 135923736, 139331662, 0, 0, 144378011, 0, 146147509]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 10354845, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68813847, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121767746, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60097429, 0, 0, 0, 0, 77137048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), initValues(_3I_classLit, 48, -1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64422870, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132122591, 0, 0, 142084216, 0, 0, 0, 0])]);
+}
+
+var HILO_ACCEL;
+function localEqualsBuffer(local, buf, offset, length_0){
+  var i;
+  if (local.length != length_0) {
+    return false;
+  }
+  for (i = 0; i < length_0; ++i) {
+    if (local.charCodeAt(i) != buf[offset + i]) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function lowerCaseLiteralEqualsIgnoreAsciiCaseString(lowerCaseLiteral, string){
+  var c0, c1, i;
+  if (string == null) {
+    return false;
+  }
+  if (lowerCaseLiteral.length != string.length) {
+    return false;
+  }
+  for (i = 0; i < lowerCaseLiteral.length; ++i) {
+    c0 = lowerCaseLiteral.charCodeAt(i);
+    c1 = string.charCodeAt(i);
+    c1 >= 65 && c1 <= 90 && (c1 += 32);
+    if (c0 != c1) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(lowerCaseLiteral, string){
+  var c0, c1, i;
+  if (string == null) {
+    return false;
+  }
+  if (lowerCaseLiteral.length > string.length) {
+    return false;
+  }
+  for (i = 0; i < lowerCaseLiteral.length; ++i) {
+    c0 = lowerCaseLiteral.charCodeAt(i);
+    c1 = string.charCodeAt(i);
+    c1 >= 65 && c1 <= 90 && (c1 += 32);
+    if (c0 != c1) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function $StackNode(this$static, flags, ns, name_0, node, popName, attributes){
+  this$static.flags = flags;
+  this$static.name_0 = name_0;
+  this$static.popName = popName;
+  this$static.ns = ns;
+  this$static.node = node;
+  this$static.attributes = attributes;
+  this$static.refcount = 1;
+  return this$static;
+}
+
+function $StackNode_0(this$static, elementName, node){
+  this$static.flags = elementName.flags;
+  this$static.name_0 = elementName.name_0;
+  this$static.popName = elementName.name_0;
+  this$static.ns = 'http://www.w3.org/1999/xhtml';
+  this$static.node = node;
+  this$static.attributes = null;
+  this$static.refcount = 1;
+  return this$static;
+}
+
+function $StackNode_1(this$static, elementName, node, attributes){
+  this$static.flags = elementName.flags;
+  this$static.name_0 = elementName.name_0;
+  this$static.popName = elementName.name_0;
+  this$static.ns = 'http://www.w3.org/1999/xhtml';
+  this$static.node = node;
+  this$static.attributes = attributes;
+  this$static.refcount = 1;
+  return this$static;
+}
+
+function $StackNode_2(this$static, elementName, node, popName){
+  this$static.flags = elementName.flags;
+  this$static.name_0 = elementName.name_0;
+  this$static.popName = popName;
+  this$static.ns = 'http://www.w3.org/1999/xhtml';
+  this$static.node = node;
+  this$static.attributes = null;
+  this$static.refcount = 1;
+  return this$static;
+}
+
+function $StackNode_3(this$static, elementName, popName, node){
+  this$static.flags = prepareSvgFlags(elementName.flags);
+  this$static.name_0 = elementName.name_0;
+  this$static.popName = popName;
+  this$static.ns = 'http://www.w3.org/2000/svg';
+  this$static.node = node;
+  this$static.attributes = null;
+  this$static.refcount = 1;
+  return this$static;
+}
+
+function $StackNode_4(this$static, elementName, node, popName, markAsIntegrationPoint){
+  this$static.flags = prepareMathFlags(elementName.flags, markAsIntegrationPoint);
+  this$static.name_0 = elementName.name_0;
+  this$static.popName = popName;
+  this$static.ns = 'http://www.w3.org/1998/Math/MathML';
+  this$static.node = node;
+  this$static.attributes = null;
+  this$static.refcount = 1;
+  return this$static;
+}
+
+function getClass_73(){
+  return Lnu_validator_htmlparser_impl_StackNode_2_classLit;
+}
+
+function prepareMathFlags(flags, markAsIntegrationPoint){
+  flags &= -939524097;
+  (flags & 33554432) != 0 && (flags |= 671088640);
+  markAsIntegrationPoint && (flags |= 16777216);
+  return flags;
+}
+
+function prepareSvgFlags(flags){
+  flags &= -939524097;
+  (flags & 67108864) != 0 && (flags |= 687865856);
+  return flags;
+}
+
+function toString_14(){
+  return this.name_0;
+}
+
+function StackNode(){
+}
+
+_ = StackNode.prototype = new Object_0;
+_.getClass$ = getClass_73;
+_.toString$ = toString_14;
+_.typeId$ = 41;
+_.attributes = null;
+_.flags = 0;
+_.name_0 = null;
+_.node = null;
+_.ns = null;
+_.popName = null;
+_.refcount = 1;
+function $UTF16Buffer(this$static, buffer, start, end){
+  this$static.buffer = buffer;
+  this$static.start = start;
+  this$static.end = end;
+  return this$static;
+}
+
+function $adjust(this$static, lastWasCR){
+  lastWasCR && this$static.buffer[this$static.start] == 10 && ++this$static.start;
+}
+
+function getClass_74(){
+  return Lnu_validator_htmlparser_impl_UTF16Buffer_2_classLit;
+}
+
+function UTF16Buffer(){
+}
+
+_ = UTF16Buffer.prototype = new Object_0;
+_.getClass$ = getClass_74;
+_.typeId$ = 42;
+_.buffer = null;
+_.end = 0;
+_.start = 0;
+function $SAXException(this$static, message){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  this$static.exception = null;
+  return this$static;
+}
+
+function $getMessage_1(this$static){
+  var message;
+  message = this$static.detailMessage;
+  if (message == null && !!this$static.exception) {
+    return $getMessage_0(this$static.exception);
+  }
+   else {
+    return message;
+  }
+}
+
+function getClass_75(){
+  return Lorg_xml_sax_SAXException_2_classLit;
+}
+
+function getMessage_1(){
+  return $getMessage_1(this);
+}
+
+function toString_15(){
+  if (this.exception) {
+    return $toString(this.exception);
+  }
+   else {
+    return $toString(this);
+  }
+}
+
+function SAXException(){
+}
+
+_ = SAXException.prototype = new Exception;
+_.getClass$ = getClass_75;
+_.getMessage = getMessage_1;
+_.toString$ = toString_15;
+_.typeId$ = 43;
+_.exception = null;
+function $SAXParseException(this$static, message, locator){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  this$static.exception = null;
+  if (locator) {
+    $getLineNumber(locator);
+    $getColumnNumber(locator);
+  }
+  return this$static;
+}
+
+function $SAXParseException_0(this$static, message, locator, e){
+  $fillInStackTrace();
+  this$static.detailMessage = message;
+  this$static.exception = e;
+  if (locator) {
+    $getLineNumber(locator);
+    $getColumnNumber(locator);
+  }
+  return this$static;
+}
+
+function getClass_76(){
+  return Lorg_xml_sax_SAXParseException_2_classLit;
+}
+
+function SAXParseException(){
+}
+
+_ = SAXParseException.prototype = new SAXException;
+_.getClass$ = getClass_76;
+_.typeId$ = 44;
+var $entry = entry_0;
+function gwtOnLoad(errFn, modName, modBase){
+  $moduleName = modName;
+  $moduleBase = modBase;
+  if (errFn)
+    try {
+      $entry(init)();
+    }
+     catch (e) {
+      errFn(modName);
+    }
+   else {
+    $entry(init)();
+  }
+}
+
+var I_classLit = createForPrimitive('', 'int'),
+    _3I_classLit = createForArray('', '[I', I_classLit),
+    Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object'),
+    Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable'),
+    Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception'),
+    Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException'),
+    Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler'),
+    Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl'),
+    Lcom_google_gwt_core_client_impl_SchedulerImpl$1_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl$1'),
+    Lcom_google_gwt_core_client_impl_SchedulerImpl$2_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl$2'),
+    Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement'),
+    _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', Ljava_lang_StackTraceElement_2_classLit),
+    Lcom_google_gwt_core_client_impl_StringBufferImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StringBufferImpl'),
+    Lcom_google_gwt_core_client_impl_StringBufferImplAppend_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StringBufferImplAppend'),
+    Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException'),
+    Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$'),
+    Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String'),
+    _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', Ljava_lang_String_2_classLit), Ljava_lang_Enum_2_classLit = createForClass('java.lang.', 'Enum'), Lcom_google_gwt_event_shared_GwtEvent_2_classLit = createForClass('com.google.gwt.event.shared.', 'GwtEvent'), Lcom_google_gwt_event_shared_GwtEvent$Type_2_classLit = createForClass('com.google.gwt.event.shared.', 'GwtEvent$Type'), Lcom_google_gwt_event_logical_shared_CloseEvent_2_classLit = createForClass('com.google.gwt.event.logical.shared.', 'CloseEvent'), Lcom_google_gwt_event_shared_DefaultHandlerRegistration_2_classLit = createForClass('com.google.gwt.event.shared.', 'DefaultHandlerRegistration'), Lcom_google_gwt_event_shared_HandlerManager_2_classLit = createForClass('com.google.gwt.event.shared.', 'HandlerManager'), Lcom_google_gwt_event_shared_HandlerManager$HandlerRegistry_2_classLit = createForClass('com.google.gwt.event.shared.', 'HandlerManager$HandlerRegistry'), Lcom_google_gwt_event_shared_HandlerManager$1_2_classLit = createForClass('com.google.gwt.event.shared.', 'HandlerManager$1'), D_classLit = createForPrimitive('', 'double'), _3D_classLit = createForArray('', '[D', D_classLit), _3_3D_classLit = createForArray('', '[[D', _3D_classLit), Lcom_google_gwt_user_client_Timer_2_classLit = createForClass('com.google.gwt.user.client.', 'Timer'), Lcom_google_gwt_user_client_Timer$1_2_classLit = createForClass('com.google.gwt.user.client.', 'Timer$1'), Lcom_google_gwt_user_client_Window$ClosingEvent_2_classLit = createForClass('com.google.gwt.user.client.', 'Window$ClosingEvent'), Lcom_google_gwt_user_client_Window$WindowHandlers_2_classLit = createForClass('com.google.gwt.user.client.', 'Window$WindowHandlers'), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException'), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException'),
+    C_classLit = createForPrimitive('', 'char'),
+    _3C_classLit = createForArray('', '[C', C_classLit),
+    Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class'), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException'), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException'), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException'),
+    Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer'), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder'), Ljava_lang_StringIndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'StringIndexOutOfBoundsException'), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException'), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', Ljava_lang_Object_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection'), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap'), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap'), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet'), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet'), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator'), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry'), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull'), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString'), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList'), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl'), Ljava_util_AbstractSequentialList_2_classLit = createForClass('java.util.', 'AbstractSequentialList'), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList'), Ljava_util_Comparators$1_2_classLit = createForClass('java.util.', 'Comparators$1'), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap'), Ljava_util_LinkedList_2_classLit = createForClass('java.util.', 'LinkedList'), Ljava_util_LinkedList$ListIteratorImpl_2_classLit = createForClass('java.util.', 'LinkedList$ListIteratorImpl'), Ljava_util_LinkedList$Node_2_classLit = createForClass('java.util.', 'LinkedList$Node'), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl'), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException'),
+    Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'DoctypeExpectation', values_0), _3Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit = createForArray('[Lnu.validator.htmlparser.common.', 'DoctypeExpectation;', Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit), Lnu_validator_htmlparser_common_DocumentMode_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'DocumentMode', values_1), _3Lnu_validator_htmlparser_common_DocumentMode_2_classLit = createForArray('[Lnu.validator.htmlparser.common.', 'DocumentMode;', Lnu_validator_htmlparser_common_DocumentMode_2_classLit), Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'XmlViolationPolicy', values_2), _3Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit = createForArray('[Lnu.validator.htmlparser.common.', 'XmlViolationPolicy;', Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit), Lnu_validator_htmlparser_impl_TreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'TreeBuilder'), Lnu_validator_htmlparser_impl_CoalescingTreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'CoalescingTreeBuilder'), Lnu_validator_htmlparser_gwt_BrowserTreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'BrowserTreeBuilder'), Lnu_validator_htmlparser_gwt_BrowserTreeBuilder$ScriptHolder_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'BrowserTreeBuilder$ScriptHolder'), Lnu_validator_htmlparser_gwt_HtmlParser_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'HtmlParser'), Lnu_validator_htmlparser_gwt_HtmlParser$1_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'HtmlParser$1'), Lnu_validator_htmlparser_gwt_ParseEndListener_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'ParseEndListener'), Z_classLit = createForPrimitive('', 'boolean'), _3Z_classLit = createForArray('', '[Z', Z_classLit), Lnu_validator_htmlparser_impl_AttributeName_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'AttributeName'), _3Lnu_validator_htmlparser_impl_AttributeName_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'AttributeName;', Lnu_validator_htmlparser_impl_AttributeName_2_classLit),
+    Lnu_validator_htmlparser_impl_ElementName_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'ElementName'), _3Lnu_validator_htmlparser_impl_ElementName_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'ElementName;', Lnu_validator_htmlparser_impl_ElementName_2_classLit), Lnu_validator_htmlparser_impl_Tokenizer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'Tokenizer'), Lnu_validator_htmlparser_impl_ErrorReportingTokenizer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'ErrorReportingTokenizer'), Lnu_validator_htmlparser_impl_HtmlAttributes_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'HtmlAttributes'), Lnu_validator_htmlparser_impl_LocatorImpl_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'LocatorImpl'), _3_3C_classLit = createForArray('', '[[C', _3C_classLit), _3_3I_classLit = createForArray('', '[[I', _3I_classLit), Lnu_validator_htmlparser_impl_StackNode_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'StackNode'), _3Lnu_validator_htmlparser_impl_StackNode_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'StackNode;', Lnu_validator_htmlparser_impl_StackNode_2_classLit), Lnu_validator_htmlparser_impl_UTF16Buffer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'UTF16Buffer'), Lorg_xml_sax_SAXException_2_classLit = createForClass('org.xml.sax.', 'SAXException'), Lorg_xml_sax_SAXParseException_2_classLit = createForClass('org.xml.sax.', 'SAXParseException');
+gwtOnLoad();(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Parser.XMLParser').
+		debug('XMLParser available');
+});
+
+/**
+ * XMLParser
+ */
+exports.XMLParser = XMLParser = {};
+
+XMLParser.parseDocument = function(xmlstring, xmldoc, mimetype){
+    log.debug('parseDocument');
+    var tmpdoc = new Document(new DOMImplementation()),
+		importing,
+        parent,
+        importedNode,
+        tmpNode;
+
+    if(mimetype && mimetype == 'text/xml'){
+        log.debug('mimetype: text/xml');
+        xmldoc.baseURI = 'http://envjs.com/xml';
+        xmlstring = '<?xml version="1.0" encoding="utf-8"?>\n'+
+		'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '+
+		'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'+
+		'<html xmlns:envjs="http://envjs.com/xml">'+
+			'<head></head>'+
+			'<body>'+
+            '<envjs:xmlp id="envjs_1234567890">'+
+                xmlstring+
+			'</envjs:xmlp>'+
+			'</body>'+
+		'</html>';
+        Envjs.parseXmlDocument(xmlstring, tmpdoc, false, null, null);
+		__Nu5toDomNode__(tmpdoc.getElementById('envjs_1234567890').childNodes, xmldoc, xmldoc);
+    }
+
+    return xmldoc;
+};
+
+
+var __Nu5toDomNode__ = function(nu5, parent, doc){
+    var xnode,
+        domnode,
+        children,
+        target,
+        value,
+        length,
+        element,
+        kind,
+		k;
+    log.debug('converting nu5 node list %s', nu5);
+
+	//for elements and namednodemaps
+    for (k = 0; k < nu5.length; k++) {
+		//for elements and namednodemaps
+        xnode = nu5[k];
+        kind = xnode.nodeType;
+        log.debug('treating node kind %s', kind);
+        switch(kind){
+        case Node.ELEMENT_NODE:
+            // add node
+            log.debug('creating element %s %s', xnode.localName, xnode.namespaceURI);
+            if(xnode.namespaceURI && (xnode.namespaceURI+'') !== ''){
+                log.debug('createElementNS %s %s',xnode.namespaceURI, xnode.localName);
+                domnode = doc.createElementNS(xnode.namespaceURI+'', xnode.localName);
+            }else{
+                domnode = doc.createElement(xnode.tagName);
+            }
+            parent.appendChild(domnode);
+
+            // add attributes
+            __Nu5toDomNode__(xnode.attributes, domnode, doc);
+
+            // add children
+            children = xnode.childNodes;
+            length = children.length;
+            log.debug('recursing? %s', length ? 'yes' : 'no');
+            if (length > 0) {
+                __Nu5toDomNode__(children, domnode, doc);
+            }
+            break;
+
+        case Node.ATTRIBUTE_NODE:
+            log.debug(
+				'setting attribute %s %s %s',
+                xnode.localName, xnode.namespaceURI, xnode.value
+			);
+
+            if(xnode.namespaceURI && xnode.prefix){
+                log.debug("xmlns:%s=%s", xnode.prefix, xnode.namespaceURI);
+                parent.setAttributeNS(
+					xnode.namespaceURI,
+                    xnode.prefix+':'+xnode.localName,
+                    xnode.value);
+            }else if((xnode.name+'').match('xmlns')){
+                if(xnode.localName!=='xmlns'){
+                    parent.setAttributeNS(
+						'http://www.w3.org/2000/xmlns/',
+                        'xmlns:'+xnode.localName,
+                         xnode.value);
+                }
+            }else{
+				log.debug('setting attribute %s', xnode.localName);
+                parent.setAttribute(xnode.localName+'', xnode.value);
+            }
+            break;
+
+        case Node.TEXT_NODE:
+            log.debug('creating text node : %s', xnode);
+            domnode = doc.createTextNode(xnode.nodeValue);
+            parent.appendChild(domnode);
+            break;
+
+        case Node.COMMENT_NODE:
+            log.debug('creating comment node : %s', xnode);
+            value = xnode+'';
+            domnode = doc.createComment(value);
+            parent.appendChild(domnode);
+            break;
+
+        case Node.PROCESSING_INSTRUCTION_NODE:
+            log.debug('creating processing-instruction node : %s', xnode);
+            value = xnode+'';
+            target = value.split(' ')[0].substring(2);
+            value = value.split(' ').splice(1).join(' ').replace('?>','');
+
+            log.debug('creating processing-instruction data : %s', value);
+            domnode = doc.createProcessingInstruction(target, value);
+            parent.appendChild(domnode);
+            break;
+
+        default:
+            log.debug('nu5 DOM ERROR');
+            throw new Error("Assertion failed in xml parser");
+        }
+    }
+};
+
+})(/*Envjs.Parser.XMLParser*/);
+
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Parser.HTMLParser').
+		debug('HTMLParser available');
+});
+
+var __fragmentCache__ = {length:0},
+    __cachable__ = 255;
+
+exports.HTMLParser = HTMLParser = {};
+
+HTMLParser.parseDocument = function(htmlstring, htmldoc){
+    log.info('parseDocument %s', htmlstring.length);
+    htmldoc.parsing = true;
+	var start = Date.now();
+    Envjs.parseHtmlDocument(htmlstring, htmldoc, htmldoc.async, function(){
+		var end = Date.now(),
+			total = (end-start)/1000;
+		log.info("from parse start to after document ready in %s", total);
+	}, null);
+    log.debug('Finished HTMLParser.parseDocument in %s (async? %s)', start - Date.now(), htmldoc.async);
+    return htmldoc;
+};
+HTMLParser.parseFragment = function(htmlstring, element){
+    log.debug('parseFragment')
+    // fragment is allowed to be an element as well
+    var tmpdoc,
+        parent,
+        importedNode,
+        tmpNode,
+        length,
+        i,
+        docstring,
+        start = Date.now();
+    log.debug('parsing fragment: %s (cached %s)', htmlstring.length,  __fragmentCache__.length);
+    if( htmlstring.length > __cachable__ && htmlstring in __fragmentCache__){
+        tmpdoc = __fragmentCache__[htmlstring];
+    }else{
+        log.debug('not cached, parsing html fragment %s', htmlstring.length);
+        tmpdoc = new HTMLDocument(new DOMImplementation());
+        // Need some indicator that this document isn't THE document
+        // to fire off img.src change events and other items.
+        // Otherwise, what happens is the tmpdoc fires and img.src
+        // event, then when it's all imported to the original document
+        // it happens again.
+
+        tmpdoc.fragment = true;
+
+        //preserves leading white space
+        docstring = '<html><head></head><body>'+
+            '<envjs_1234567890 xmlns="envjs_1234567890">'
+                +htmlstring+
+            '</envjs_1234567890>'+
+        '</body></html>';
+        Envjs.parseHtmlDocument(docstring,tmpdoc, false, null,null);
+        if(htmlstring.length > __cachable__ ){
+            tmpdoc.normalizeDocument();
+            __fragmentCache__[htmlstring] = tmpdoc;
+            __fragmentCache__.length += htmlstring.length;
+            tmpdoc.cached = true;
+        }else{
+            tmpdoc.cached = false;
+        }
+    }
+
+    //parent is envjs_1234567890 element
+    parent = tmpdoc.body.childNodes[0];
+    while(element.firstChild != null){
+        //zap the elements children so we can import
+        element.removeChild( element.firstChild );
+    }
+
+    if(tmpdoc.cached){
+        length = parent.childNodes.length;
+        for(i=0;i<length;i++){
+            importedNode = element.importNode( parent.childNodes[i], true );
+            element.appendChild( importedNode );
+        }
+    }else{
+        while(parent.firstChild != null){
+            tmpNode  = parent.removeChild( parent.firstChild );
+            importedNode = element.importNode( tmpNode, true);
+            element.appendChild( importedNode );
+        }
+    }
+
+    log.debug('finished fragment: %s, time: %s', htmlstring.length, start - Date.now());
+    return element;
+};
+
+var __clearFragmentCache__ = function(){
+    __fragmentCache__ = {};
+}
+
+})(/*Envjs.Parser.HTMLParser*/);
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.DOM.Document').
+		debug('Document.loadXML available');
+});
+
+/**
+ * @name Document
+ * @w3c:domlevel 2
+ * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
+ */
+__extend__(Document.prototype, {
+    loadXML : function(xmlString) {
+        //console.log('Parser::Document.loadXML');
+        // create Document
+        // populate Document
+        try {
+            // make sure this document object is empty before we try to load ...
+            this.attributes      = new NamedNodeMap(this, this);
+            this._namespaces     = new NamespaceNodeMap(this, this);
+            this._readonly = false;
+
+            XMLParser.parseDocument(xmlString, this);
+
+        } catch (e) {
+            log.error(e);
+        }
+        return this;
+    }
+});
+
+})(/*Envjs.DOM.Document*/);
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.Document').
+		debug('HTMLDocument write module/mixins available');
+});
+
+__extend__(HTMLDocument.prototype, {
+
+    open : function() {
+        //console.log('opening doc for write.');
+        if (! this._writebuffer) {
+            this._writebuffer = [];
+        }
+    },
+    close : function() {
+		var text;
+        //console.log('closing doc.');
+        if (this._writebuffer) {
+			text = this._writebuffer.join('');
+            //HTMLParser.parseDocument(this._writebuffer.join(''), this);
+			Envjs.exchangeHTMLDocument(this, text, this.location);
+            this._writebuffer = null;
+            //console.log('finished writing doc.');
+        }
+    },
+
+    /**
+     * http://dev.w3.org/html5/spec/Overview.html#document.write
+     */
+    write: function(htmlstring) {
+        //console.log('writing doc.');
+        this.open();
+        this._writebuffer.push(htmlstring);
+    },
+
+    /**
+     * http://dev.w3.org/html5/spec/Overview.html#dom-document-writeln
+     */
+    writeln: function(htmlstring) {
+        this.open();
+        this._writebuffer.push(htmlstring + '\n');
+    }
+});
+
+})(/*Envjs.HTML.Document*/);
+
+
+/**
+ * elementPopped is called by the parser in two cases
+ *
+ * - a 'tag' is * complete
+ *      (all children process and end tag, real or implied is * processed)
+ * - a replaceElement happens
+ *      (this happens by making placeholder nodes and then the real one
+ *      is swapped in.
+ *
+ */
+var __elementPopped__;
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Parser').
+		debug('Parser elementPopped available');
+});
+
+__elementPopped__ = function(ns, name, node){
+    log.debug('elementPopped %s %s %s', ns, name, node);
+    var doc = node.ownerDocument,
+        okay,
+        event;
+    switch(doc.parsing){
+        case false:
+            //innerHTML so dont do loading patterns for parsing
+            //console.log('element popped (implies innerHTML) not in parsing mode %s', node.nodeName);
+            break;
+        case true:
+            switch(doc+''){
+                case '[object XMLDocument]':
+                    break;
+                case '[object HTMLDocument]':
+                    switch(node.namespaceURI){
+                        case "http://n.validator.nu/placeholder/":
+                            //console.log('got holder script during parsing %s', node.textContent);
+                            break;
+                        case null:
+                        case "":
+                        case "http://www.w3.org/1999/xhtml":
+                            switch(name.toLowerCase()){
+                                case 'script':
+		                            //console.log('got actual script during parsing %s', node.textContent);
+                                    try{
+                                        okay = Envjs.loadLocalScript(node, null);
+                                        //console.log('loaded script? %s %s', node.src, okay);
+                                        // only fire event if we actually had something to load
+                                        if (node.src && node.src.length > 0){
+                                            event = doc.createEvent('HTMLEvents');
+                                            event.initEvent( okay ? "load" : "error", false, false );
+                                            node.dispatchEvent( event, false );
+                                        }
+                                    }catch(e){
+                                        console.log('error loading html element %s %s %s %e', ns, name, node, e.toString());
+                                    }
+                                    break;
+                                case 'frame':
+                                case 'iframe':
+									//console.log('popped frame');
+                                    node.contentWindow = { };
+                                    node.contentDocument = new HTMLDocument(new DOMImplementation(), node.contentWindow);
+                                    node.contentWindow.document = node.contentDocument;
+                                    try{
+                                        Window;
+                                    }catch(e){
+                                        node.contentDocument.addEventListener('DOMContentLoaded', function(){
+                                            event = node.contentDocument.createEvent('HTMLEvents');
+                                            event.initEvent("load", false, false);
+                                            node.dispatchEvent( event, false );
+                                        });
+                                    }
+                                    try{
+                                        if (node.src && node.src.length > 0){
+                                            //console.log("getting content document for (i)frame from %s", node.src);
+                                            Envjs.loadFrame(node, Envjs.uri(node.src, node.ownerDocument.location+''));
+                                            event = node.contentDocument.createEvent('HTMLEvents');
+                                            event.initEvent("load", false, false);
+                                            node.dispatchEvent( event, false );
+                                        }else{
+                                            //I dont like this being here:
+                                            //TODO: better  mix-in strategy so the try/catch isnt required
+                                            try{
+                                                if(Window){
+                                                    Envjs.loadFrame(node);
+                                                    //console.log('src/html/document.js: triggering frame load');
+                                                    event = node.contentDocument.createEvent('HTMLEvents');
+                                                    event.initEvent("load", false, false);
+                                                    node.dispatchEvent( event, false );
+                                                }
+                                            }catch(e){}
+                                        }
+                                    }catch(e){
+                                        console.log('error loading html element %s %e', node, e.toString());
+                                    }
+                                    /*try{
+                                        if (node.src && node.src.length > 0){
+                                            //console.log("getting content document for (i)frame from %s", node.src);
+                                            Envjs.loadFrame(node, Envjs.uri(node.src));
+                                            event = node.ownerDocument.createEvent('HTMLEvents');
+                                            event.initEvent("load", false, false);
+                                            node.dispatchEvent( event, false );
+                                        }else{
+                                            //console.log('src/parser/htmldocument: triggering frame load (no src)');
+                                        }
+                                    }catch(e){
+                                        console.log('error loading html element %s %s %s %e', ns, name, node, e.toString());
+                                    }*/
+                                    break;
+                                case 'link':
+                                    if (node.href) {
+                                        Envjs.loadLink(node, node.href);
+                                    }
+                                    break;
+                                case 'option':
+                                    Envjs.updateOptions(node);
+                                    break;
+                                case 'img':
+                                    if (node.src){
+                                        Envjs.loadImage(node, node.src);
+                                    }
+                                    break;
+                                case 'html':
+                                    //console.log('html popped');
+                                    doc.parsing = false;
+                                    //DOMContentLoaded event
+                                    try{
+                                        if(doc.createEvent){
+                                            event = doc.createEvent('Events');
+                                            event.initEvent("DOMContentLoaded", false, false);
+                                            doc.dispatchEvent( event, false );
+                                        }
+                                    }catch(e){
+                                        console.log('%s', e);
+                                    }
+                                    try{
+                                        if(doc.createEvent){
+                                            event = doc.createEvent('HTMLEvents');
+                                            event.initEvent("load", false, false);
+                                            doc.dispatchEvent( event, false );
+                                        }
+                                    }catch(e){
+                                        console.log('%s', e);
+                                    }
+
+                                    try{
+                                        if(doc.parentWindow){
+                                            event = doc.createEvent('HTMLEvents');
+                                            event.initEvent("load", false, false);
+                                            doc.parentWindow.dispatchEvent( event, false );
+                                        }
+                                    }catch(e){
+                                        console.log('%s', e);
+                                    }
+                                    try{
+                                        if(doc === window.document){
+                                            //console.log('triggering window.load')
+                                            event = doc.createEvent('HTMLEvents');
+                                            event.initEvent("load", false, false);
+                                            try{
+                                                window.dispatchEvent( event, false );
+                                            }catch(e){
+                                                console.log('%s', e);
+                                            }
+                                        }
+                                    }catch(e){
+                                        //console.log('%s', e);
+                                        //swallow
+                                    }
+                                default:
+                                    if(node.getAttribute('onload')){
+                                        //console.log('%s onload', node);
+                                        node.onload();
+                                    }
+                                    break;
+                            }//switch on name
+                        default:
+                            break;
+                    }//switch on ns
+                    break;
+                default:
+                    console.log('element popped: %s %s', ns, name, node.ownerDocument+'');
+            }//switch on doc type
+        default:
+            break;
+    }//switch on parsing
+};
+
+})(/*Envjs.Parser*/);
+
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.HTML.HTMLElement').
+        debug('HTMLElement set innerHTML mixin available');
+});
+
+__extend__(HTMLElement.prototype,{
+    set innerHTML(html){
+        HTMLParser.parseFragment(html, this);
+    }
+});
+
+})(/*Envjs.HTML.HTMLElement*/);
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/platform/core.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/platform/core.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/platform/core.js	(revision 225)
@@ -0,0 +1,3041 @@
+/*
+ * Envjs core-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+Envjs = exports.Envjs = function(){
+    var i,
+        override = function(){
+            for(i=0;i<arguments.length;i++){
+                for ( var name in arguments[i] ) {
+					if(arguments[i].hasOwnProperty(name)){
+                        var g = arguments[i].__lookupGetter__(name),
+                            s = arguments[i].__lookupSetter__(name);
+                        if ( g || s ) {
+                            if ( g ) { Envjs.__defineGetter__(name, g); }
+                            if ( s ) { Envjs.__defineSetter__(name, s); }
+                        } else {
+                            Envjs[name] = arguments[i][name];
+                        }
+					}
+                }
+            }
+        };
+
+    if(arguments.length === 1 && typeof(arguments[0]) == 'string'){
+        window.location = arguments[0];
+    }else if (arguments.length === 1 && typeof(arguments[0]) == "object"){
+        override(arguments[0]);
+    }else if(arguments.length === 2 && typeof(arguments[0]) == 'string'){
+        override(arguments[1]);
+        window.location = arguments[0];
+    }
+    return;
+};
+
+var log = {
+    debug: function(){return this;},
+    info: function(){return this;},
+    warn: function(){return this;},
+    error: function(){return this;},
+    exception: function(){return this;}
+};
+
+if (typeof console == "undefined") {
+	console = require('./console').console;
+}
+
+//eg "Mozilla"
+Envjs.appCodeName  = "Envjs";
+
+//eg "Gecko/20070309 Firefox/2.0.0.3"
+Envjs.appName      = "Netscape";
+
+Envjs.version = "1.618";//
+Envjs.revision = '';
+
+Envjs.exit = function(){};
+
+
+
+/*
+ * Envjs core-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+/**
+ * @author ariel flesler
+ *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
+ * @param {Object} str
+ */
+function __trim__( str ){
+    return (str || "").replace( /^\s+|\s+$/g, "" );
+}
+
+/**
+ * Borrowed with love from:
+ *
+ * jQuery AOP - jQuery plugin to add features of aspect-oriented programming (AOP) to jQuery.
+ * http://jquery-aop.googlecode.com/
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Version: 1.1
+ */
+
+(function(){
+
+	var _after	= 1;
+	var _before	= 2;
+	var _around	= 3;
+	var _intro  = 4;
+	var _regexEnabled = true;
+
+	/**
+	 * Private weaving function.
+	 */
+	var weaveOne = function(source, method, advice) {
+
+		var old = source[method];
+
+		var aspect;
+		if (advice.type == _after){
+			aspect = function() {
+				var returnValue = old.apply(this, arguments);
+				return advice.value.apply(this, [returnValue, method]);
+			};
+		}else if (advice.type == _before){
+			aspect = function() {
+				advice.value.apply(this, [arguments, method]);
+				return old.apply(this, arguments);
+			};
+		}else if (advice.type == _intro){
+			aspect = function() {
+				return advice.value.apply(this, arguments);
+			};
+		}else if (advice.type == _around) {
+			aspect = function() {
+				var invocation = { object: this, args: arguments };
+				return advice.value.apply(invocation.object, [{ 'arguments': invocation.args, method: method, proceed :
+					function() {
+						return old.apply(invocation.object, invocation.args);
+					}
+				}] );
+			};
+		}
+
+		aspect.unweave = function() {
+			source[method] = old;
+			source = aspect = old = null;
+		};
+
+		source[method] = aspect;
+
+		return aspect;
+
+	};
+
+
+	/**
+	 * Private weaver and pointcut parser.
+	 */
+	var weave = function(pointcut, advice)
+	{
+
+		var source = (typeof(pointcut.target.prototype) != 'undefined') ? pointcut.target.prototype : pointcut.target;
+		var advices = [];
+
+		// If it's not an introduction and no method was found, try with regex...
+		if (advice.type != _intro && typeof(source[pointcut.method]) == 'undefined')
+		{
+
+			for (var method in source)
+			{
+				if (source[method] && source[method] instanceof Function && method.match(pointcut.method))
+				{
+					advices[advices.length] = weaveOne(source, method, advice);
+				}
+			}
+
+			if (advices.length === 0){
+				throw 'No method: ' + pointcut.method;
+			}
+
+		}
+		else
+		{
+			// Return as an array of one element
+			advices[0] = weaveOne(source, pointcut.method, advice);
+		}
+
+		return _regexEnabled ? advices : advices[0];
+
+	};
+
+	exports.Aspect = Aspect =
+	{
+		/**
+		 * Creates an advice after the defined point-cut. The advice will be executed after the point-cut method
+		 * has completed execution successfully, and will receive one parameter with the result of the execution.
+		 * This function returns an array of weaved aspects (Function).
+		 *
+		 * @example jQuery.aop.after( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );
+		 * @result Array<Function>
+		 *
+		 * @example jQuery.aop.after( {target: String, method: 'indexOf'}, function(index) { alert('Result found at: ' + index + ' on:' + this); } );
+		 * @result Array<Function>
+		 *
+		 * @name after
+		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
+		 * @option Object target Target object to be weaved.
+		 * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
+		 * @param Function advice Function containing the code that will get called after the execution of the point-cut. It receives one parameter
+		 *                        with the result of the point-cut's execution.
+		 *
+		 * @type Array<Function>
+		 * @cat Plugins/General
+		 */
+		after : function(pointcut, advice)
+		{
+			return weave( pointcut, { type: _after, value: advice } );
+		},
+
+		/**
+		 * Creates an advice before the defined point-cut. The advice will be executed before the point-cut method
+		 * but cannot modify the behavior of the method, or prevent its execution.
+		 * This function returns an array of weaved aspects (Function).
+		 *
+		 * @example jQuery.aop.before( {target: window, method: 'MyGlobalMethod'}, function() { alert('About to execute MyGlobalMethod'); } );
+		 * @result Array<Function>
+		 *
+		 * @example jQuery.aop.before( {target: String, method: 'indexOf'}, function(index) { alert('About to execute String.indexOf on: ' + this); } );
+		 * @result Array<Function>
+		 *
+		 * @name before
+		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
+		 * @option Object target Target object to be weaved.
+		 * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
+		 * @param Function advice Function containing the code that will get called before the execution of the point-cut.
+		 *
+		 * @type Array<Function>
+		 * @cat Plugins/General
+		 */
+		before : function(pointcut, advice)
+		{
+			return weave( pointcut, { type: _before, value: advice } );
+		},
+
+
+		/**
+		 * Creates an advice 'around' the defined point-cut. This type of advice can control the point-cut method execution by calling
+		 * the functions '.proceed()' on the 'invocation' object, and also, can modify the arguments collection before sending them to the function call.
+		 * This function returns an array of weaved aspects (Function).
+		 *
+		 * @example jQuery.aop.around( {target: window, method: 'MyGlobalMethod'}, function(invocation) {
+		 *                alert('# of Arguments: ' + invocation.arguments.length);
+		 *                return invocation.proceed();
+		 *          } );
+		 * @result Array<Function>
+		 *
+		 * @example jQuery.aop.around( {target: String, method: 'indexOf'}, function(invocation) {
+		 *                alert('Searching: ' + invocation.arguments[0] + ' on: ' + this);
+		 *                return invocation.proceed();
+		 *          } );
+		 * @result Array<Function>
+		 *
+		 * @example jQuery.aop.around( {target: window, method: /Get(\d+)/}, function(invocation) {
+		 *                alert('Executing ' + invocation.method);
+		 *                return invocation.proceed();
+		 *          } );
+		 * @desc Matches all global methods starting with 'Get' and followed by a number.
+		 * @result Array<Function>
+		 *
+		 *
+		 * @name around
+		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
+		 * @option Object target Target object to be weaved.
+		 * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
+		 * @param Function advice Function containing the code that will get called around the execution of the point-cut. This advice will be called with one
+		 *                        argument containing one function '.proceed()', the collection of arguments '.arguments', and the matched method name '.method'.
+		 *
+		 * @type Array<Function>
+		 * @cat Plugins/General
+		 */
+		around : function(pointcut, advice)
+		{
+			return weave( pointcut, { type: _around, value: advice } );
+		},
+
+		/**
+		 * Creates an introduction on the defined point-cut. This type of advice replaces any existing methods with the same
+		 * name. To restore them, just unweave it.
+		 * This function returns an array with only one weaved aspect (Function).
+		 *
+		 * @example jQuery.aop.introduction( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );
+		 * @result Array<Function>
+		 *
+		 * @example jQuery.aop.introduction( {target: String, method: 'log'}, function() { alert('Console: ' + this); } );
+		 * @result Array<Function>
+		 *
+		 * @name introduction
+		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
+		 * @option Object target Target object to be weaved.
+		 * @option String method Name of the function to be weaved.
+		 * @param Function advice Function containing the code that will be executed on the point-cut.
+		 *
+		 * @type Array<Function>
+		 * @cat Plugins/General
+		 */
+		introduction : function(pointcut, advice)
+		{
+			return weave( pointcut, { type: _intro, value: advice } );
+		},
+
+		/**
+		 * Configures global options.
+		 *
+		 * @name setup
+		 * @param Map settings Configuration options.
+		 * @option Boolean regexMatch Enables/disables regex matching of method names.
+		 *
+		 * @example jQuery.aop.setup( { regexMatch: false } );
+		 * @desc Disable regex matching.
+		 *
+		 * @type Void
+		 * @cat Plugins/General
+		 */
+		setup: function(settings)
+		{
+			_regexEnabled = settings.regexMatch;
+		}
+	};
+
+}(/*Aspect*/));
+
+
+
+
+(function(){
+
+Envjs.Configuration = {
+    /** Please see each module for specific configuration options */
+    //this is a short list of well knowns, but can always be extended
+    logging:[
+        {category:'Envjs.Core',                 level:'WARN'},
+        {category:'Envjs.Core.REPL',            level:'WARN'},
+        {category:'Envjs.DOM',                  level:'WARN'},
+        {category:'Envjs.DOM.Node',             level:'WARN'},
+        {category:'Envjs.DOM.NodeList',         level:'WARN'},
+        {category:'Envjs.DOM.NamedNodeMap',     level:'WARN'},
+        {category:'Envjs.DOM.Element',          level:'WARN'},
+        {category:'Envjs.DOM.Document',         level:'WARN'},
+        {category:'Envjs.DOM.EventTarget',      level:'WARN'},
+        {category:'Envjs.Timer',                level:'WARN'},
+        {category:'Envjs.Location',             level:'WARN'},
+        {category:'Envjs.XMLHttpRequest',       level:'WARN'},
+        {category:'Envjs.Parser',               level:'WARN'},
+        {category:'Envjs.Parser.HTMLParser',    level:'WARN'},
+        {category:'Envjs.Parser.XMLParser',     level:'WARN'},
+        {category:'Envjs.HTML.FrameElement',    level:'WARN'},
+        {category:'Envjs.Window',               level:'WARN'},
+        {category:'Envjs.Platform',             level:'WARN'},
+        {category:'root',                       level:'WARN'}
+    ],
+    env : {
+        dev:{},
+        prod:{},
+        test:{}
+    }
+};
+
+Envjs.config = function(){
+    var config, subconfig;
+    if(arguments.length === 0){
+        return Envjs.Configuration;
+    }else if(arguments.length === 1 && typeof(arguments[0]) == "string"){
+        return Envjs.Configuration[arguments[0]];
+    }else{
+        Envjs.Configuration[arguments[0]] =  arguments[1];
+    }
+    return this;//chain
+};
+
+
+var $guid = 0;
+Envjs.guid = function(){
+    return ++$guid;
+};
+
+}(/*Envjs.Configuration*/));
+
+
+/**
+ * Writes message to system out
+ * @param {String} message
+ */
+Envjs.log = function(message){};
+
+/**
+ * Prints stack trace of current execution point
+ */
+Envjs.trace = function(){};
+
+/**
+ * Writes error info out to console
+ * @param {Error} e
+ */
+Envjs.lineSource = function(e){};
+
+/**
+ * Provides prompt to system stdout
+ * @param {Error} e
+ */
+Envjs.prompt = function(e){};
+
+/**
+ * Reads line from system stdin
+ * @param {Error} e
+ */
+Envjs.readConsole = function(e){};
+
+/**
+ * Starts a read-eval-print-loop
+ */
+Envjs.repl = function(){
+    var line,
+        waiting,
+		$_ = null;
+    var log = Envjs.logger('Envjs.Core.REPL');
+    Envjs.on('tick', function(){
+        log.debug('tick for REPL');
+        if(!waiting){
+            log.debug('not waiting in REPL');
+            waiting = true;
+            Envjs.prompt();
+            log.debug('waiting for line in');
+            Envjs.spawn(function(){
+                log.info('async waiting for line in');
+                line = Envjs.readConsole();
+                if(line === "quit" || line === "exit") {
+                    log.info('%sting', line);
+                    Envjs.emit('exit', 'repl');
+                }else{
+                    setTimeout(function(){
+                        try{
+                            if(line){
+                                log.info('evaluating console line in: %s', line);
+                                $_ = Envjs['eval'](__this__, line);
+                                if($_!==undefined){
+                                    log.info('result of evaluation: %s', $_);
+                                    Envjs.log( $_ );
+                                }
+                             }else{
+                                log.info('not evaluating console line in: %s', line);
+                             }
+                        }catch(e) {
+                            Envjs.log('[Envjs.REPL Error] ' + e);
+                        }finally{
+                            waiting = false;
+                        }
+                    },1);
+                }
+            });
+        }else{
+            log.debug('waiting in REPL');
+        }
+    });
+};
+
+Envjs.CURSOR = "envjs>";
+
+
+
+Envjs.Logging = {};
+
+
+/**
+ * Descibe this class
+ * @author
+ * @version $Rev$
+ * @requires OtherClassName
+ */
+(function($$Log){
+
+    var loggerFactory = null;
+
+    Envjs.logging = function(config){
+        return Envjs.config('logging', config);
+    };
+
+    Envjs.logger = function(category){
+        if(!category){
+            return new $$Log.NullLogger();
+        }
+        if(!$$Log.loggerFactory){
+            $$Log.loggerFactory = new $$Log.Factory();
+        }
+        if($$Log.updated){
+            $$Log.loggerFactory.updateConfig();
+            $$Log.updated = false;
+        }
+        return $$Log.loggerFactory.create(category);
+    };
+
+    $$Log.Level = {
+        DEBUG:0,
+        INFO:1,
+        WARN:2,
+        ERROR:3,
+        NONE:4
+    };
+
+    $$Log.NullLogger = function(){
+        //for speed why bother implement the interface, just null the functions
+        var nullFunction = function(){
+            return this;
+        };
+        __extend__(this,  {
+            debug:nullFunction,
+            info:nullFunction,
+            warn:nullFunction,
+            error:nullFunction,
+            exception:nullFunction
+        });
+    };
+    //leaked globally intentionally
+    log = new $$Log.NullLogger();
+
+
+    $$Log.Logger = function(options){
+        this.category   = "root";
+        this.level      = null;
+        __extend__(this, options);
+        try{
+            this.level = $$Log.Level[
+                this.level?this.level:"NONE"
+            ];
+            this.appender = new $$Log.ConsoleAppender(options);
+            return this;
+        }catch(e){
+            return new $$Log.NullLogger();
+        }
+    };
+
+
+
+    //All logging calls are chainable
+    __extend__($$Log.Logger.prototype, {
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        debug: function(){
+            if(this.level<=$$Log.Level.DEBUG){
+              this.appender.append("DEBUG",this.category,arguments);
+              return this;
+            }else{
+                this.debug = function(){
+                    return this;
+                };
+            }
+            return this;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        info: function(){
+            if(this.level<=$$Log.Level.INFO){
+              this.appender.append("INFO",this.category,arguments);
+              return this;
+            }else{
+                this.info = function(){
+                    return this;
+                };
+            }
+            return this;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        warn: function(){
+            if(this.level<=$$Log.Level.WARN){
+              this.appender.append("WARN",this.category,arguments);
+              return this;
+            }else{ this.warn = function(){return this;}; }
+            return this;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        error: function(){
+            if(this.level<=$$Log.Level.ERROR){
+              this.appender.append("ERROR",this.category,arguments);
+              return this;
+            }else{ this.error = function(){return this;}; }
+            return this;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        exception: function(e){
+            if(this.level < $$Log.Level.NONE){
+                if(e){
+                    this.appender.append("EXCEPTION", this.category,e);
+                    return this;
+                }
+            }else{
+                this.exception = function(){
+                    return this;
+                };
+            }
+            return this;
+        }
+    });
+
+    /**
+     * @constructor
+     */
+    $$Log.ConsoleAppender = function(options){
+        __extend__(this,options);
+        try{
+            this.formatter = new $$Log.FireBugFormatter(options);
+            return this;
+        }catch(e){
+            //Since the console and print arent available use a null implementation.
+            throw e;
+        }
+        return this;
+    };
+
+    __extend__( $$Log.ConsoleAppender.prototype, {
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        append: function(level, category, message){
+            switch(level){
+                case ("DEBUG"):
+                    console.log.apply(console, this.formatter.format(level, category, message));
+                    break;
+                case ("INFO"):
+                    console.info.apply(console, this.formatter.format(level, category, message));
+                    break;
+                case ("WARN"):
+                    console.warn.apply(console, this.formatter.format(level, category, message));
+                    break;
+                case ("ERROR"):
+                    console.error.apply(console,this.formatter.format(level, category, message));
+                    break;
+                case ("EXCEPTION"):
+                    //message is e
+                    console.error.apply(console, this.formatter.format(level, category,
+                        message.message?[message.message]:[]));
+                    console.trace();
+                    break;
+            }
+        }
+    });
+
+    $$Log.FireBugFormatter = function(options){
+        __extend__(this, options);
+    };
+
+    __extend__($$Log.FireBugFormatter.prototype, {
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        getDateString: function(){
+            return " ["+ new Date().toUTCString() +"] ";
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        format: function(level, category, objects){
+            var msgPrefix = category + " "+level+": "+ this.getDateString();
+            objects = (objects&&objects.length&&(objects.length>0))?objects:[];
+            var msgFormat = (objects.length > 0)?objects[0]:null;
+            if (typeof(msgFormat) != "string"){
+                objects.unshift(msgPrefix);
+            }else{
+                objects[0] = msgPrefix + msgFormat;
+            }
+            return objects;
+        }
+    });
+
+    $$Log.Factory = function(options){
+        __extend__(this,options);
+        this.configurationId = 'logging';
+        //The LogFactory is unique in that it will create its own logger
+        //so that it's events can be logged to console or screen in a
+        //standard way.
+        this.logger = new $$Log.Logger({
+            category:"Envjs.Logging.Factory",
+            level:"INFO",
+            appender:"Envjs.Logging.ConsoleAppender"
+        });
+        this.attemptedConfigure = false;
+        this.clear();
+        this.updateConfig();
+    };
+
+    __extend__($$Log.Factory.prototype,  {
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        clear: function(){
+            this.logger.debug("Clearing Cache.");
+            this.cache = null;
+            this.cache = {};
+            this.size = 0;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        add: function(id, object){
+            this.logger.debug("Adding To Cache: %s", id);
+            if ( !this.cache[id] ){
+                this.cache[id] = object;
+                this.size++;
+                return id;
+            }
+            return null;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        remove: function(id){
+            this.logger.debug("Removing From Cache id: %s", id);
+            if(this.find(id)){
+                return (delete this.cache[id])?--this.size:-1;
+            }return null;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        find: function(id){
+            this.logger.debug("Searching Cache for id: %s", id);
+            return this.cache[id] || null;
+        },
+
+        /**
+         * returns the portion configuration specified by 'configurationId'
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        getConfig: function(){
+            if( !this.configuration ){
+                //First look for an object name Envjs.Configuration
+                this.logger.debug( "Configuration for <%s> has not been set explicitly or has been updated implicitly.",  this.configurationId );
+                try{
+                    if(Envjs.Configuration[this.configurationId]){
+                        this.logger.debug("Found Envjs.Configuration");
+                        this.configuration = Envjs.Configuration[this.configurationId];
+                    }
+                }catch(e){
+                    this.logger.exception(e);
+                    throw new Error('Logging Configuration Error');
+                }
+            }
+            return this.configuration;
+        },
+        /**
+         * Describe what this method does
+         * @private
+         * @param {String} paramName Describe this parameter
+         * @returns Describe what it returns
+         * @type String
+         */
+        setConfig: function(id, configuration){
+            this.logger.debug("Setting configuration");
+            this.configuration = configuration;
+            Envjs.Configuration[id] = configuration;
+        },
+       /**
+        * Describe what this method does
+        * @private
+        * @param {String} paramName Describe this parameter
+        * @returns Describe what it returns
+        * @type String
+        */
+       create: function(category){
+           var categoryParts,
+               subcategory,
+               loggerConf,
+               rootLoggerConf,
+               i;
+           if(!this.configuration){
+               //Only warn about lack of configuration once
+               if(!this.attemptedConfigure){
+                   this.logger.warn("Claypool Logging was not initalized correctly. Logging will not occur unless initialized.");
+               }
+               this.attemptedConfigure = true;
+               return new $$Log.NullLogger();
+           }else{
+               //Find the closest configured category
+               categoryParts = category.split(".");
+               for(i=0;i<categoryParts.length;i++){
+                   subcategory = categoryParts.slice(0,categoryParts.length-i).join(".");
+                   loggerConf = this.find(subcategory);
+                   if(loggerConf !== null){
+                       //The level is set by the closest subcategory, but we still want the
+                       //full category to display when we log the messages
+                       loggerConf.category = category;
+                       //TODO: we need to use the formatter/appender specified in the config
+                       return new $$Log.Logger( loggerConf );
+                   }
+               }
+               //try the special 'root' category
+               rootLoggerConf = this.find('root');
+               this.logger.debug('root logging category is set to %s', rootLoggerConf);
+               if(rootLoggerConf !== null){
+                   //The level is set by the closest subcategory, but we still want the
+                   //full category to display when we log the messages
+                   rootLoggerConf.category = category;
+                   return new $$Log.Logger(rootLoggerConf);
+               }
+           }
+           //No matching category found
+           this.logger.warn("No Matching category: %s Please configure a root logger.", category);
+           return new $$Log.NullLogger();
+       },
+       /**
+        * Describe what this method does
+        * @private
+        * @param {String} paramName Describe this parameter
+        * @returns Describe what it returns
+        * @type String
+        */
+       updateConfig: function(){
+           var loggingConfiguration;
+           var logconf;
+           var i;
+           try{
+               this.logger.debug("Configuring Logging");
+               this.clear();
+               loggingConfiguration = this.getConfig()||[];
+               for(i=0;i<loggingConfiguration.length;i++){
+                   try{
+                       logconf = loggingConfiguration[i];
+                       this.add( logconf.category, logconf );
+                   }catch(ee){
+                       this.logger.exception(ee);
+                       return false;
+                   }
+               }
+           }catch(e){
+               this.logger.exception(e);
+               throw new Error('Logging configuration error');
+           }
+           return true;
+        }
+    });
+
+
+    Envjs.logging = function(){
+        if(arguments.length === 0){
+            return Envjs.config('logging');
+        }else{
+            Envjs.Logging.updated = true;
+            return Envjs.config('logging', arguments[0]);
+        }
+    };
+
+}( Envjs.Logging ));
+
+
+(function(){
+/**
+ *  The main event loop is unrelated to html/dom events
+ */
+var log;
+
+var eventListeners = {
+        newListener:[],
+        tick:[],
+        exit:[]
+    },
+    eventQueue = [];
+
+Envjs.eventLoop = Envjs.eventLoop || function(){
+    log = log||Envjs.logger('Envjs.Core');
+    while(true) {
+        Envjs.tick();
+    }
+};
+
+Envjs.on = function(event, callback){
+    if(!(event in eventListeners)){
+        eventListeners[event] = [];
+    }
+    eventListeners[event].push(callback);
+};
+
+Envjs.once = function(event, callback){
+    var once = function(){
+        Envjs.removeListener(event, once);
+        callback.apply(callback, arguments);
+    };
+    Envjs.on(event, once);
+};
+
+Envjs.removeListener = function(event, callback){
+    if(!(event in eventListeners)){
+        return;
+    }
+    var index = eventListeners[event].indexOf(callback);
+    if(index > -1){
+        eventListeners[event].splice(index, 1);
+    }
+};
+
+Envjs.removeAllListeners = function(event){
+    eventListeners[event] = [];
+};
+
+Envjs.listeners = function(event){
+    return (event in eventListeners) ?
+        eventListeners[event] : [];
+};
+
+Envjs.emit = function(event /*, arg1, arg2, etc*/ ){
+    eventQueue.push({event:event, args:arguments});
+};
+
+var $warming = 10;
+
+Envjs.tick = function(){
+    var y, next, fn, arg, file;
+    log = log||Envjs.logger('Envjs.Core');
+
+    log.debug('go through %s events', eventQueue.length);
+    next = eventQueue.shift();
+    while( next ){
+
+        log.debug('next event %s', next.event);
+        if(next.event in eventListeners){
+
+            if('exit' === next.event){
+                log.info('exiting');
+                Envjs.exit();
+            }
+            for(y = 0; y < eventListeners[next.event].length; y++){
+                log.debug('event %s %s', y, next.event);
+                fn = eventListeners[next.event][y];
+                fn.apply(fn, next.args);
+            }
+        }
+        next = eventQueue.shift();
+    }
+    if(!$warming && Envjs.argv && Envjs.argv.length){
+
+        log.debug('parsing args %s',  Envjs.argv);
+        arg = Envjs.argv.shift();
+        if(arg && typeof(arg) == 'string'){
+            file = arg;
+            log.debug('will load file %s next', file);
+            setTimeout(function(){
+                log.debug('loading script %s', file);
+                Envjs['eval'](__this__, Envjs.readFromFile(file), file, !$warming);
+            },1);
+        }
+
+    }else if($warming === 0 && Envjs.argv.length === 0){
+        $warming = false;
+        //prevents repl from being opened twice
+        //Envjs.repl();
+    }else if($warming){
+        log.debug('warming');
+        $warming--;
+    }
+
+    if($warming === false && !eventQueue.length && !Envjs.connections.length && !Envjs.timers.length ){
+        log.debug('ready to exit warming %s eventQueue %s connections %s timers %s',
+            $warming,
+            eventQueue.length,
+            Envjs.connections.length,
+            Envjs.timers.length
+        );
+        log.info('event loop is passive, exiting');
+        Envjs.emit('exit');
+    }
+
+    Envjs.emit('tick', Date.now());
+    Envjs.sleep(4);
+};
+
+
+/**
+ * Used in ./event/eventtarget.js  These are DOM related events
+ * @param {Object} event
+ */
+Envjs.defaultEventBehaviors = {
+    'submit': function(event) {
+        var target = event.target,
+            serialized,
+            method,
+            action;
+        while (target && target.nodeName !== 'FORM') {
+            target = target.parentNode;
+        }
+        if (target && target.nodeName === 'FORM') {
+            serialized = Envjs.serializeForm(target);
+            //console.log('serialized %s', serialized);
+            method = target.method?target.method.toUpperCase():"GET";
+
+            action = Envjs.uri(
+                target.action !== ""?target.action:target.ownerDocument.baseURI,
+                target.ownerDocument.baseURI
+            );
+            if(method=='GET' && !action.match(/^file:/)){
+                action = action + "?" + serialized;
+            }
+            //console.log('replacing document with form submission %s', action);
+            target.ownerDocument.location.replace(
+                action, method, serialized
+            );
+        }
+    },
+
+    'click': function(event) {
+        //console.log("handling default behavior for click %s", event.target);
+        var target = event.target,
+            url,
+            form,
+            inputs;
+        while (target && target.nodeName !== 'A' && target.nodeName !== 'INPUT') {
+            target = target.parentNode;
+        }
+        if (target && target.nodeName === 'A') {
+            //console.log('target is a link');
+            if(target.href && !target.href.match(/^#/)){
+                url = Envjs.uri(target.href, target.ownerDocument.baseURI);
+                target.ownerDocument.location.replace(url);
+            }
+        }else if (target && target.nodeName === 'INPUT') {
+            //console.log('input %s', target.xml);
+            if(target.type.toLowerCase() === 'submit'){
+                if(!target.value){
+                    target.value = 'submit';
+                }
+                //console.log('submit click %s %s', target.name, target.value);
+                form = target.parentNode;
+                while (form && form.nodeName !== 'FORM' ) {
+                    form = form.parentNode;
+                }
+                if(form && form.nodeName === 'FORM'){
+                    //disable other submit buttons before serializing
+                    inputs = form.getElementsByTagName('input');
+                    for(var i=0;i<inputs.length;i++){
+                        //console.log('checking for non-relevant submit buttons %s', inputs[i].name);
+                        if(inputs[i].type == 'submit' && inputs[i]!=target){
+                            //console.log('disabling the non-relevant submit button %s', inputs[i].value);
+                            inputs[i].disabled = true;
+                            inputs[i].value = null;
+                        }
+                    }
+                    form.submit();
+                }
+            }
+        }
+    }
+};
+
+}(/*Envjs.Platform.Core*/));
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Platform.HTML').
+        debug('Platform Core HTML API available');
+});
+
+/**
+ * describes which script src values will trigger Envjs to load
+ * the script like a browser would
+ */
+Envjs.scriptTypes = {
+    "": true, //anonymous/inline
+    "text/javascript"   :true,
+    "text/envjs"        :true
+};
+
+/**
+ * will be called when loading a script throws an error
+ * @param {Object} script
+ * @param {Object} e
+ */
+Envjs.onScriptLoadError = function(script, e){
+    log.error('error loading script %s %s', script, e);
+};
+
+/**
+ * load and execute script tag text content
+ * @param {Object} script
+ */
+Envjs.loadInlineScript = function(script){
+    if(script.ownerDocument.ownerWindow){
+        log.debug('evaulating inline in window %s', script.ownerDocument.ownerWindow);
+        Envjs['eval'](
+            script.ownerDocument.ownerWindow,
+            script.text,
+            'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
+        );
+    }else{
+        log.debug('evaulating inline in global %s',  __this__);
+        Envjs['eval'](
+            __this__,
+            script.text,
+            'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
+        );
+    }
+    //console.log('evaluated at scope %s \n%s',
+    //    script.ownerDocument.ownerWindow.guid, script.text);
+};
+
+/**
+ * Should evaluate script in some context
+ * @param {Object} context
+ * @param {Object} source
+ * @param {Object} name
+ */
+Envjs['eval'] = function(context, source, name){};
+
+
+/**
+ * Executes a script tag
+ * @param {Object} script
+ * @param {Object} parser
+ */
+Envjs.loadLocalScript = function(script){
+    var types,
+        src,
+        i,
+        base,
+        filename,
+        xhr,
+        brief = script.src||script.text.substring(0,64);
+
+    log.debug("loading script type %s : %s", script.type, brief);
+
+    if(script.type){
+        types = script.type.split(";");
+        for(i=0;i<types.length;i++){
+            if(Envjs.scriptTypes[types[i].toLowerCase()]){
+                //ok this script type is allowed
+                break;
+            }
+            if(i+1 == types.length){
+                log.debug('wont load script type %s', script.type);
+                return false;
+            }
+        }
+    }else if(!Envjs.scriptTypes['']){
+        log.debug('wont load anonymous script type ""');
+        return false;
+    }
+
+    try{
+        if(!script.src.length ){
+            if(Envjs.scriptTypes[""]){
+                log.debug('handling inline scripts %s %s', script.src, Envjs.scriptTypes[""] );
+                Envjs.loadInlineScript(script);
+                return true;
+            }else{
+                return false;
+            }
+        }
+    }catch(e){
+        log.error("Error loading script. %s", e);
+        Envjs.onScriptLoadError(script, e);
+        return false;
+    }
+
+
+    log.debug("loading allowed external script %s", script.src);
+
+    //lets you register a function to execute
+    //before the script is loaded
+    if(Envjs.beforeScriptLoad){
+        for(src in Envjs.beforeScriptLoad){
+            if(script.src.match(src)){
+                Envjs.beforeScriptLoad[src](script);
+            }
+        }
+    }
+    base = "" + script.ownerDocument.location;
+    //filename = Envjs.uri(script.src.match(/([^\?#]*)/)[1], base );
+    log.debug('loading script from base %s', base);
+    filename = Envjs.uri(script.src, base);
+    try {
+        xhr = new XMLHttpRequest();
+        xhr.open("GET", filename, false/*syncronous*/);
+        log.debug("loading external script %s", filename);
+        xhr.onreadystatechange = function(){
+            log.debug("readyState %s", xhr.readyState);
+            if(xhr.readyState === 4){
+                Envjs['eval'](
+                    script.ownerDocument.ownerWindow,
+                    xhr.responseText,
+                    filename
+                );
+            }
+            log.debug('finished evaluating %s', filename);
+        };
+        xhr.send(null, false);
+    } catch(ee) {
+        log.error("could not load script %s \n %s", filename, ee );
+        Envjs.onScriptLoadError(script, ee);
+        return false;
+    }
+    //lets you register a function to execute
+    //after the script is loaded
+    if(Envjs.afterScriptLoad){
+        for(src in Envjs.afterScriptLoad){
+            if(script.src.match(src)){
+                Envjs.afterScriptLoad[src](script);
+            }
+        }
+    }
+    return true;
+};
+
+
+/**
+ * An 'image' was requested by the document.
+ *
+ * - During inital parse of a <link>
+ * - Via an innerHTML parse of a <link>
+ * - A modificiation of the 'src' attribute of an Image/HTMLImageElement
+ *
+ * NOTE: this is optional API.  If this doesn't exist then the default
+ * 'loaded' event occurs.
+ *
+ * @param node {Object} the <img> node
+ * @param node the src value
+ * @return 'true' to indicate the 'load' succeed, false otherwise
+ */
+Envjs.loadImage = function(node, src) {
+    return true;
+};
+
+Envjs.loadImage = function(node, value) {
+    var event;
+    var owner = node.ownerDocument;
+    if (value) {
+        // value has to be something (easy)
+        // if the user-land API doesn't exist
+        // Or if the API exists and it returns true, then ok:
+        event = owner.createEvent('Events');
+        event.initEvent('load');
+    } else {
+        // oops
+        event = owner.createEvent('Events');
+        event.initEvent('error');
+    }
+    node.dispatchEvent(event, false);
+};
+
+/**
+ * A 'link'  was requested by the document.  Typically this occurs when:
+ * - During inital parse of a <link>
+ * - Via an innerHTML parse of a <link>
+ * - A modificiation of the 'href' attribute on a <link> node in the tree
+ *
+ * @param node {Object} is the link node in question
+ * @param href {String} is the href.
+ *
+ * Return 'true' to indicate that the 'load' was successful, or false
+ * otherwise.  The appropriate event is then triggered.
+ *
+ * NOTE: this is optional API.  If this doesn't exist then the default
+ *   'loaded' event occurs
+ */
+Envjs.loadLink = function(node, value) {
+    var event;
+    var owner = node.ownerDocument;
+
+    if (owner.fragment) {
+        /**
+         * if we are in an innerHTML fragment parsing step
+         * then ignore.  It will be handled once the fragment is
+         * added to the real doco
+         */
+        return;
+    }
+
+    if (node.parentNode === null) {
+        /*
+         * if a <link> is parentless (normally by create a new link
+         * via document.createElement('link'), then do *not* fire an
+         * event, even if it has a valid 'href' attribute.
+         */
+        return;
+    }
+    if (value != '') {
+        // value has to be something (easy)
+        // if the user-land API doesn't exist
+        // Or if the API exists and it returns true, then ok:
+        event = owner.createEvent('Events');
+        event.initEvent('load');
+    } else {
+        // oops
+        event = owner.createEvent('Events');
+        event.initEvent('error');
+    }
+    node.dispatchEvent(event, false);
+};
+
+var HTMLParser;
+Envjs.exchangeHTMLDocument = function(doc, text, url) {
+    var html, head, title, body,
+        event,
+        frame = doc.__ownerFrame__,
+        i;
+    try {
+        HTMLParser = HTMLParser || require('./../parser').HTMLParser;
+        //do some cleanup so we can reuse the document
+        doc.baseURI = url;
+        log.debug('reseting document indexes');
+        doc._indexes_ = {
+            'ancestors' : new NodeList(doc, doc),
+            '*': new NodeList(doc, doc)
+        };
+        //TODO: we should remove the events for the document but
+        // its so nice to setup a load handler before calling
+        // document.location
+        //doc.removeEventListener('*');
+
+        log.debug('parsing document for window exchange %s', url);
+        HTMLParser.parseDocument(text, doc);
+
+        log.debug('finsihed parsing document for window exchange %s', url);
+        //if this document is inside a frame make sure to trigger
+        //a new load event on the frame
+        if(frame){
+            event = doc.createEvent('HTMLEvents');
+            event.initEvent('load', false, false);
+            frame.dispatchEvent( event, false );
+        }
+    } catch (e) {
+        log.warn('parsererror %s', e);
+        try {
+            log.debug('document before error\n %s', doc.documentElement.outerHTML);
+        } catch (ee) {
+            // swallow
+        }
+        doc = new HTMLDocument(new DOMImplementation(), doc.ownerWindow);
+        html =    doc.createElement('html');
+        head =    doc.createElement('head');
+        title =   doc.createElement('title');
+        body =    doc.createElement('body');
+        title.appendChild(doc.createTextNode('Error'));
+        body.appendChild(doc.createTextNode('' + e));
+        head.appendChild(title);
+        html.appendChild(head);
+        html.appendChild(body);
+        doc.appendChild(html);
+        log.debug('default error document \n %s', doc.documentElement.outerHTML);
+
+        //DOMContentLoaded event
+        if (doc.createEvent) {
+            event = doc.createEvent('Event');
+            event.initEvent('DOMContentLoaded', false, false);
+            doc.dispatchEvent( event, false );
+
+            event = doc.createEvent('HTMLEvents');
+            event.initEvent('load', false, false);
+            doc.dispatchEvent( event, false );
+        }
+
+        //finally fire the window.onload event
+        //TODO: this belongs in window.js which is a event
+        //      event handler for DOMContentLoaded on document
+
+        try {
+            if (doc === window.document) {
+                console.log('triggering window.load');
+                event = doc.createEvent('HTMLEvents');
+                event.initEvent('load', false, false);
+                window.dispatchEvent( event, false );
+            }
+        } catch (eee) {
+            log.debug('window load event failed %s', eee);
+            //swallow
+        }
+    }
+};
+
+(function(){
+
+
+/*
+ *  cookie handling
+ *  Private internal helper class used to save/retreive cookies
+ */
+
+/**
+ * Specifies the location of the cookie file
+ */
+Envjs.cookieFile = function(){
+    return 'file://'+Envjs.homedir+'/.cookies';
+};
+
+/**
+ * saves cookies to a local file
+ * @param {Object} htmldoc
+ */
+Envjs.saveCookies = function(){
+    var cookiejson = JSON.stringify(Envjs.cookies.persistent,null,'\t');
+    log.debug('persisting cookies %s', cookiejson);
+    Envjs.writeToFile(cookiejson, Envjs.cookieFile());
+};
+
+/**
+ * loads cookies from a local file
+ * @param {Object} htmldoc
+ */
+Envjs.loadCookies = function(){
+    var cookiejson,
+        js,
+        file;
+    try{
+        file = Envjs.cookieFile();
+        log.debug('load cookies %s', file);
+        cookiejson = Envjs.readFromFile(file);
+
+        log.debug('cookies json %s', cookiejson);
+        js = JSON.parse(cookiejson, null, '\t');
+    }catch(e){
+        log.debug('failed to load cookies %s', e);
+        js = {};
+    }
+    return js;
+};
+
+Envjs.cookies = {
+    persistent:{
+        //domain - key on domain name {
+            //path - key on path {
+                //name - key on name {
+                     //value : cookie value
+                     //other cookie properties
+                //}
+            //}
+        //}
+        //expire - provides a timestamp for expiring the cookie
+        //cookie - the cookie!
+    },
+    temporary:{//transient is a reserved word :(
+        //like above
+    }
+};
+
+var __cookies__;
+
+function __domainValid__(url, value){
+    var i,
+        domainParts = url.hostname.split('.').reverse(),
+        newDomainParts = value.split('.').reverse();
+    if(newDomainParts.length > 1){
+        for(i=0;i<newDomainParts.length;i++){
+            if(newDomainParts[i] !== domainParts[i]){
+                return false;
+            }
+        }
+        return true;
+    }
+    return false;
+}
+
+
+function __mergeCookie__(target, cookie, properties){
+    var name, now;
+    if(!target[cookie.domain]){
+        target[cookie.domain] = {};
+    }
+    if(!target[cookie.domain][cookie.path]){
+        target[cookie.domain][cookie.path] = {};
+    }
+    for(name in properties){
+        if(properties.hasOwnProperty(name)){
+            now = new Date().getTime();
+            target[cookie.domain][cookie.path][name] = {
+                "value":properties[name],
+                "secure":cookie.secure,
+                "max-age":cookie['max-age'],
+                "date-created":now,
+                "expiration":(cookie['max-age']===0) ?
+                    0 :
+                    now + cookie['max-age']
+            };
+        }
+        //console.log('cookie is %o',target[cookie.domain][cookie.path][name]);
+    }
+}
+
+//HTMLDocument cookie
+Envjs.setCookie = function(url, cookie){
+    var i,
+        index,
+        name,
+        value,
+        properties = {},
+        attr,
+        attrs;
+    url = Envjs.urlsplit(url);
+    if(cookie){
+        attrs = cookie.split(";");
+    }else{
+        return;
+    }
+
+    //for now the strategy is to simply create a json object
+    //and post it to a file in the .cookies.js file.  I hate parsing
+    //dates so I decided not to implement support for 'expires'
+    //(which is deprecated) and instead focus on the easier 'max-age'
+    //(which succeeds 'expires')
+    cookie = {};//keyword properties of the cookie
+    cookie.domain = url.hostname;
+    cookie.path = url.path||'/';
+    for(i=0;i<attrs.length;i++){
+        index = attrs[i].indexOf("=");
+        if(index > -1){
+            name = __trim__(attrs[i].slice(0,index));
+            value = __trim__(attrs[i].slice(index+1));
+            if(name.toLowerCase() == 'max-age'){
+                //we'll have to when to check these
+                //and garbage collect expired cookies
+                cookie[name] = parseInt(value, 10);
+            } else if( name.toLowerCase() == 'domain' ){
+                if(__domainValid__(url, value)){
+                    cookie.domain = value;
+                }
+            } else if( name.toLowerCase() == 'path' ){
+                //not sure of any special logic for path
+                cookie.path = value;
+            } else {
+                //its not a cookie keyword so store it in our array of properties
+                //and we'll serialize individually in a moment
+                properties[name] = value;
+            }
+        }else{
+            if( attrs[i].toLowerCase() == 'secure' ){
+                cookie[attrs[i]] = true;
+            }
+        }
+    }
+    if(!('max-age' in cookie)){
+        //it's a transient cookie so it only lasts as long as
+        //the window.location remains the same (ie in-memory cookie)
+        __mergeCookie__(Envjs.cookies.temporary, cookie, properties);
+    }else{
+        //the cookie is persistent
+        __mergeCookie__(Envjs.cookies.persistent, cookie, properties);
+        Envjs.saveCookies();
+    }
+};
+
+
+function __cookieString__(cookies, url) {
+    var cookieString = "",
+        domain,
+        path,
+        name,
+        i=0;
+    for (domain in cookies) {
+        if (cookies.hasOwnProperty(domain) && (domain == "" || domain == url.hostname)) {
+            // check if the cookie is in the current domain (if domain is set)
+            log.debug('cookie domain %s', domain);
+            for (path in cookies[domain]) {
+                if (cookies[domain].hasOwnProperty(path) &&
+                    (path == "/" || url.path.indexOf(path) > -1)) {
+                    log.debug('cookie domain path %s', path);
+                    // make sure path is at or below the window location path
+                    for (name in cookies[domain][path]) {
+                        if(cookies[domain][path].hasOwnProperty(name)){
+                            log.debug('cookie domain path name %s', name);
+                            cookieString +=
+                                ((i++ > 0)?'; ':'') +
+                                name + "=" +
+                                cookies[domain][path][name].value;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    return cookieString;
+}
+
+
+Envjs.getCookies = function(url){
+    //The cookies that are returned must belong to the same domain
+    //and be at or below the current window.location.path.  Also
+    //we must check to see if the cookie was set to 'secure' in which
+    //case we must check our current location.protocol to make sure it's
+    //https:
+    var persisted;
+    url = Envjs.urlsplit(url);
+    if(!__cookies__){
+        try{
+            __cookies__ = true;
+            try{
+                persisted = Envjs.loadCookies();
+            }catch(ee){
+                //fail gracefully
+                log.debug('failed to load persistant cookies %s', ee);
+            }
+            if(persisted){
+                __extend__(Envjs.cookies.persistent, persisted);
+            }
+            log.debug('set cookies for doc %s', url);
+        }catch(e){
+            log.debug('cookies not loaded %s', e);
+        }
+    }
+    var temporary = __cookieString__(Envjs.cookies.temporary, url),
+        persistent =  __cookieString__(Envjs.cookies.persistent, url);
+    log.debug('temporary cookies: %s', temporary);
+    log.debug('persistent cookies: %s', persistent);
+    return  temporary + persistent;
+};
+
+
+}());//end cookies
+
+
+/**
+ * Returns the value of the field element.
+ *
+ * The successful argument controls whether or not the field element must be 'successful'
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true.  If the given element is not
+ * successful and the successful arg is not false then the returned value will be null.
+ *
+ * Note: If the successful flag is true (default) but the element is not successful, the return will be null
+ * Note: The value returned for a successful select-multiple element will always be an array.
+ * Note: If the element has no value the return value will be undefined.
+ *
+ * @name fieldValue
+ * @param Element el The DOM element for which the value will be returned
+ * @param Boolean successful true if value returned must be for a successful controls (default is true)
+ * @type String or Array<String> or null or undefined
+ */
+ function __fieldValue__(element, successful) {
+    var name = element.name,
+        type = element.type,
+        tag = element.tagName.toLowerCase(),
+        index,
+        array,
+        options,
+        option,
+        one,
+        i, imax,
+        value;
+
+    if (typeof successful == 'undefined')  {
+        successful = true;
+    }
+    //console.log('element %s disabled ? %s (successful:%s)', name, element.disabled, successful);
+
+    if (successful && (!name || element.disabled || type == 'reset' || type == 'button' ||
+             (type == 'checkbox' || type == 'radio') &&  !element.checked ||
+            //thatcher - todo: determine why not type == 'submit'
+             (/*type == 'submit||*/ type == 'image') &&
+             element.form && element.form.clk != element || tag === 'select' &&
+             element.selectedIndex === -1)) {
+            //console.log('skipping element in form serialization %s', element);
+            return null;
+    }
+
+    if (tag === 'select') {
+        index = element.selectedIndex;
+        if (index < 0) {
+            return null;
+        }
+        array = [];
+        options = element.options;
+        one = (type == 'select-one');
+        imax = (one ? index+1 : options.length);
+        i = (one ? index : 0);
+        for( i; i < imax; i++) {
+            option = options[i];
+            if (option.selected) {
+                value = option.value;
+                if (one) {
+                    return value;
+                }
+                array.push(value);
+            }
+        }
+        return array;
+    }
+    return element.value;
+}
+
+
+// Serialize an array of key/values into a query string
+function __param__( array ) {
+    var i, serialized = [];
+
+    // Serialize the key/values
+    for(i=0; i<array.length; i++){
+        serialized[ serialized.length ] =
+            encodeURIComponent(array[i].name) + '=' +
+            encodeURIComponent(array[i].value);
+    }
+
+    // Return the resulting serialization
+    return serialized.join("&").replace(/%20/g, "+");
+}
+
+/**
+ * Serializes all field elements inputs Array into a query string.
+ * This method will return a string in the format: name1=value1&amp;name2=value2
+ *
+ * The successful argument controls whether or not serialization is limited to
+ * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true.
+ *
+ *
+ * @name fieldSerialize
+ * @param successful true if only successful controls should be serialized (default is true)
+ * @type String
+ */
+function __fieldSerialize__(inputs, successful) {
+    var array = [],
+        input,
+        name,
+        value,
+        i,j, imax, jmax;
+
+    imax = inputs.length;
+    for(i=0; i<imax; i++){
+        input = inputs[i];
+        name = input.name;
+        if (!name) {
+            return '';
+        }
+        value = __fieldValue__(input, successful);
+        if (value && value.constructor == Array) {
+            jmax = value.length;
+            for (j=0; j < jmax; j++){
+                array.push({
+                    name: name,
+                    value: value[j]
+                });
+            }
+        }else if (value !== null && typeof value != 'undefined'){
+            array.push({
+                name: input.name,
+                value: value
+            });
+        }
+    }
+
+    //hand off  for proper encoding
+    return __param__(array);
+}
+
+/**
+ * Form Submissions
+ *
+ * This code is borrow largely from jquery.params and jquery.form.js
+ *
+ * formToArray() gathers form element data into an array of objects that can
+ * be passed to any of the following ajax functions: $.get, $.post, or load.
+ * Each object in the array has both a 'name' and 'value' property.  An example of
+ * an array for a simple login form might be:
+ *
+ * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
+ *
+ * It is this array that is passed to pre-submit callback functions provided to the
+ * ajaxSubmit() and ajaxForm() methods.
+ *
+ * The semantic argument can be used to force form serialization in semantic order.
+ * This is normally true anyway, unless the form contains input elements of type='image'.
+ * If your form must be submitted with name/value pairs in semantic order and your form
+ * contains an input of type='image" then pass true for this arg, otherwise pass false
+ * (or nothing) to avoid the overhead for this logic.
+ *
+ *
+ * @name formToArray
+ * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
+ * @type Array<Object>
+ */
+function __formToArray__(form, semantic) {
+    var array = [],
+        elements = semantic ? form.getElementsByTagName('*') : form.elements,
+        element,
+        i,j,imax, jmax,
+        name,
+        value;
+
+    if (!elements) {
+        return array;
+    }
+
+    imax = elements.length;
+    for(i=0; i < imax; i++) {
+        element = elements[i];
+        name = element.name;
+        if (!name) {
+            continue;
+        }
+        log.debug('serializing input %s', name);
+        if (semantic && form.clk && element.type === "image") {
+            // handle image inputs on the fly when semantic == true
+            if(!element.disabled && form.clk == element) {
+                array.push({
+                    name: name+'.x',
+                    value: form.clk_x
+                },{
+                    name: name+'.y',
+                    value: form.clk_y
+                });
+            }
+            continue;
+        }
+
+        value = __fieldValue__(element, true);
+        log.debug('input value is %s', value);
+        if (value && value.constructor == Array) {
+            jmax = value.length;
+            for(j=0; j < jmax; j++){
+                array.push({name: name, value: value[j]});
+            }
+        } else if (value !== null && typeof value != 'undefined'){
+            log.debug('serializing form %s %s', name, value);
+            array.push({name: name, value: value});
+        }
+    }
+
+    if (!semantic && form.clk) {
+        // input type=='image' are not found in elements array! handle them here
+        elements = form.getElementsByTagName("input");
+        imax = imax=elements.length;
+        for(i=0; i < imax; i++) {
+            element = elements[i];
+            name = element.name;
+            if(name && !element.disabled && element.type == "image") {
+                array.push(
+                    {name: name+'.x', value: form.clk_x},
+                    {name: name+'.y', value: form.clk_y});
+            }
+        }
+    }
+    return array;
+}
+
+
+/**
+ * Serializes form data into a 'submittable' string. This method will return a string
+ * in the format: name1=value1&amp;name2=value2
+ *
+ * The semantic argument can be used to force form serialization in semantic order.
+ * If your form must be submitted with name/value pairs in semantic order then pass
+ * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
+ * this logic (which can be significant for very large forms).
+ *
+ *
+ * @name formSerialize
+ * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
+ * @type String
+ */
+function __formSerialize__(form, semantic) {
+    //hand off to param for proper encoding
+    return __param__(__formToArray__(form, semantic));
+}
+
+Envjs.serializeForm = __formSerialize__;
+
+
+/**
+ * Returns the value(s) of the element in the matched set.  For example, consider the following form:
+ *
+ *
+ * The successful argument controls whether or not the field element must be 'successful'
+ * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
+ * The default value of the successful argument is true.  If this value is false the value(s)
+ * for each element is returned.
+ *
+ * Note: This method *always* returns an array.  If no valid value can be determined the
+ *       array will be empty, otherwise it will contain one or more values.
+ *
+ *
+ * @name fieldValue
+ * @param Boolean successful true if only the values for successful controls
+ *        should be returned (default is true)
+ * @type Array<String>
+ */
+ function __fieldValues__(inputs, successful) {
+    var i,
+        imax = inputs.length,
+        element,
+        values = [],
+        value;
+    for (i=0; i < imax; i++) {
+        element = inputs[i];
+        value = __fieldValue__(element, successful);
+        if (value === null || typeof value == 'undefined' ||
+            (value.constructor == Array && !value.length)) {
+            continue;
+        }
+        if (value.constructor == Array) {
+            Array.prototype.push(values, value);
+        } else {
+            values.push(value);
+        }
+    }
+    return values;
+}
+
+/**
+ * Clears the selected form element.  Takes the following actions on the element:
+ *  - input text fields will have their 'value' property set to the empty string
+ *  - select elements will have their 'selectedIndex' property set to -1
+ *  - checkbox and radio inputs will have their 'checked' property set to false
+ *  - inputs of type submit, button, reset, and hidden will *not* be effected
+ *  - button elements will *not* be effected
+ *
+ * @name clearFields
+ */
+ function __clearField__(element) {
+    var type = element.type,
+        tag = element.tagName.toLowerCase();
+    if (type == 'text' || type == 'password' || tag === 'textarea') {
+        element.value = '';
+    } else if (type == 'checkbox' || type == 'radio') {
+        element.checked = false;
+    } else if (tag === 'select') {
+        element.selectedIndex = -1;
+    }
+}
+
+
+/**
+ * Clears the form data.  Takes the following actions on the form's input fields:
+ *  - input text fields will have their 'value' property set to the empty string
+ *  - select elements will have their 'selectedIndex' property set to -1
+ *  - checkbox and radio inputs will have their 'checked' property set to false
+ *  - inputs of type submit, button, reset, and hidden will *not* be effected
+ *  - button elements will *not* be effected
+ *
+ *
+ * @name clearForm
+ */
+ function __clearForm__(form) {
+    var i,
+        j, jmax,
+        elements,
+        resetable = ['input','select','textarea'];
+    for(i=0; i<resetable.length; i++){
+        elements = form.getElementsByTagName(resetable[i]);
+        jmax = elements.length;
+        for(j=0;j<jmax;j++){
+            __clearField__(elements[j]);
+        }
+    }
+}
+
+
+
+
+}(/*Envjs.Platform.HTML*/));
+/*
+    http://www.JSON.org/json2.js
+    2008-07-15
+
+    Public Domain.
+
+    NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+    See http://www.JSON.org/js.html
+
+
+    This code should be minified before deployment.
+    See http://javascript.crockford.com/jsmin.html
+
+    USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+    NOT CONTROL.
+*/
+try{ JSON = JSON; }catch(e){
+JSON = (function () {
+
+    function f(n) {
+        // Format integers to have at least two digits.
+        return n < 10 ? '0' + n : n;
+    }
+
+    Date.prototype.toJSON = function (key) {
+
+        return this.getUTCFullYear()   + '-' +
+             f(this.getUTCMonth() + 1) + '-' +
+             f(this.getUTCDate())      + 'T' +
+             f(this.getUTCHours())     + ':' +
+             f(this.getUTCMinutes())   + ':' +
+             f(this.getUTCSeconds())   + 'Z';
+    };
+
+    String.prototype.toJSON = function (key) {
+        return String(this);
+    };
+    Number.prototype.toJSON =
+    Boolean.prototype.toJSON = function (key) {
+        return this.valueOf();
+    };
+
+    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+        escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+        gap,
+        indent,
+        meta = {    // table of character substitutions
+            '\b': '\\b',
+            '\t': '\\t',
+            '\n': '\\n',
+            '\f': '\\f',
+            '\r': '\\r',
+            '"' : '\\"',
+            '\\': '\\\\'
+        },
+        rep;
+
+
+    function quote(string) {
+
+        escapeable.lastIndex = 0;
+        return escapeable.test(string) ?
+            '"' + string.replace(escapeable, function (a) {
+                var c = meta[a];
+                if (typeof c === 'string') {
+                    return c;
+                }
+                return '\\u' + ('0000' +
+                        (+(a.charCodeAt(0))).toString(16)).slice(-4);
+            }) + '"' :
+            '"' + string + '"';
+    }
+
+
+    function str(key, holder) {
+
+        var i,          // The loop counter.
+            k,          // The member key.
+            v,          // The member value.
+            length,
+            mind = gap,
+            partial,
+            value = holder[key];
+
+        if (value && typeof value === 'object' &&
+                typeof value.toJSON === 'function') {
+            value = value.toJSON(key);
+        }
+        if (typeof rep === 'function') {
+            value = rep.call(holder, key, value);
+        }
+
+        switch (typeof value) {
+        case 'string':
+            return quote(value);
+
+        case 'number':
+            return isFinite(value) ? String(value) : 'null';
+
+        case 'boolean':
+        case 'null':
+
+            return String(value);
+
+        case 'object':
+
+            if (!value) {
+                return 'null';
+            }
+            gap += indent;
+            partial = [];
+
+            if (typeof value.length === 'number' &&
+                    !(value.propertyIsEnumerable('length'))) {
+
+                length = value.length;
+                for (i = 0; i < length; i += 1) {
+                    partial[i] = str(i, value) || 'null';
+                }
+
+                v = partial.length === 0 ? '[]' :
+                    gap ? '[\n' + gap +
+                            partial.join(',\n' + gap) + '\n' +
+                                mind + ']' :
+                          '[' + partial.join(',') + ']';
+                gap = mind;
+                return v;
+            }
+
+            if (rep && typeof rep === 'object') {
+                length = rep.length;
+                for (i = 0; i < length; i += 1) {
+                    k = rep[i];
+                    if (typeof k === 'string') {
+                        v = str(k, value);
+                        if (v) {
+                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
+                        }
+                    }
+                }
+            } else {
+
+                for (k in value) {
+                    if (Object.hasOwnProperty.call(value, k)) {
+                        v = str(k, value);
+                        if (v) {
+                            partial.push(quote(k) + (gap ? ': ' : ':') + v);
+                        }
+                    }
+                }
+            }
+
+            v = partial.length === 0 ? '{}' :
+                gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
+                        mind + '}' : '{' + partial.join(',') + '}';
+            gap = mind;
+            return v;
+        }
+    }
+
+    return {
+        stringify: function (value, replacer, space) {
+
+            var i;
+            gap = '';
+            indent = '';
+
+            if (typeof space === 'number') {
+                for (i = 0; i < space; i += 1) {
+                    indent += ' ';
+                }
+
+            } else if (typeof space === 'string') {
+                indent = space;
+            }
+
+            rep = replacer;
+            if (replacer && typeof replacer !== 'function' &&
+                    (typeof replacer !== 'object' ||
+                     typeof replacer.length !== 'number')) {
+                throw new Error('JSON.stringify');
+            }
+
+            return str('', {'': value});
+        },
+
+
+        parse: function (text, reviver) {
+            var j;
+            function walk(holder, key) {
+                var k, v, value = holder[key];
+                if (value && typeof value === 'object') {
+                    for (k in value) {
+                        if (Object.hasOwnProperty.call(value, k)) {
+                            v = walk(value, k);
+                            if (v !== undefined) {
+                                value[k] = v;
+                            } else {
+                                delete value[k];
+                            }
+                        }
+                    }
+                }
+                return reviver.call(holder, key, value);
+            }
+
+            cx.lastIndex = 0;
+            if (cx.test(text)) {
+                text = text.replace(cx, function (a) {
+                    return '\\u' + ('0000' +
+                            (+(a.charCodeAt(0))).toString(16)).slice(-4);
+                });
+            }
+
+
+            if (/^[\],:{}\s]*$/.
+test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+                j = eval('(' + text + ')');
+
+                return typeof reviver === 'function' ?
+                    walk({'': j}, '') : j;
+            }
+
+            throw new SyntaxError('JSON.parse');
+        }
+    };
+}());
+
+}
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Platform.Timer').
+        debug('Platform Core Timer API available');
+});
+
+/**
+ * synchronizes thread modifications
+ * @param {Function} fn
+ */
+Envjs.sync = function(fn){return fn;};
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} milliseconds
+ */
+Envjs.sleep = function(milliseconds){};
+
+/**
+ * run function in another thread
+ * @param {Function} fn
+ */
+Envjs.spawn = function(fn){};
+
+/**
+ *
+ * @param {Object} fn
+ * @param {Object} onInterupt
+ */
+Envjs.runAsync = function(fn, onInterupt){
+    log.debug("running function async");
+    var running = true,
+        run;
+
+    try{
+        log.debug('spawning synced function');
+        return Envjs.spawn(fn);
+    }catch(e){
+        log.error("error while running async operation", e);
+        try{
+            if(onInterupt){
+                onInterupt(e);
+            }
+        }catch(ee){}
+    }
+};
+
+
+Envjs.timers = [];
+
+// html5 says this should be at least 4
+Envjs.MIN_TIMER_TIME = 4;
+
+//static
+Envjs.normalizeTime = function(time) {
+    time = time*1;
+    if ( isNaN(time) || time < 0 ) {
+        time = 0;
+    }
+
+    if ( time < Envjs.MIN_TIMER_TIME ) {
+        time = Envjs.MIN_TIMER_TIME;
+    }
+    return time;
+};
+
+
+Envjs.timers.addTimerOrInterval = Envjs.sync(function(fn, time, timerOrInterval){
+    // this is Envjs.timers so this function is safe to call from threads
+    // and more specifically setTimeout/setInterval should be safe to use
+    // from threads
+    var id = Envjs.guid();
+    //console.log('setting %s %s %s', timerOrInterval, time, fn);
+    time = Envjs.normalizeTime(time);
+    Envjs.timers.push({
+        type: timerOrInterval,
+        time: time,
+        at: Date.now() + time,
+        fn: (typeof fn == 'string') ? new Function(fn) : fn,
+        id: id
+    });
+    return id;
+});
+
+Envjs.timers.removeTimerOrInterval = Envjs.sync(function(id, timerOrInterval){
+    // this is Envjs.timers so this function is safe to call from threads
+    // and more specifically clearTimeout/clearInterval should be safe to
+    // use from threads
+    var i;
+    //console.log("clearing %s %s", timerOrInterval, id);
+    for(i = 0; i < Envjs.timers.length; i++){
+        if(Envjs.timers[i].id === id){
+            Envjs.timers.splice(i,1);
+            break;
+        }
+    }
+    return;
+});
+
+
+Envjs.on('tick', function(type, now){
+    //this is a nice simple implementation
+    var callbacks = [],
+        timers = Envjs.timers,
+        timer,
+        i;
+    //console.log('handling %s timer(s) in tick', timers.length);
+    for(i = 0; i < timers.length;){
+        timer = timers[i];
+        //console.log('scheduled for %s , currently %s', timer.at, now);
+        if(timer.at <= now){
+            //console.log('timer past due: at(%s), now(%s), type(%s)',timer.at, now, timer.type);
+            switch(timer.type){
+            case 'timeout':
+                //we need to remove it from the timers list and add it to the callback list
+                callbacks.push.apply(callbacks, timers.splice(i,1));
+                //dont increment the counter since the timers array was spliced
+                break;
+            case 'interval':
+                //we need to add it to the callback list but leave it in the timers list
+                callbacks.push(timer);
+                //fall through to increament the counter since the timers array is unchanged
+                i++;
+                break;
+            default:
+                i++;
+            }
+        }else{
+            //timer isnt read for execution so just leave it be
+            i++;
+        }
+    }
+    //console.log('timer tick has %s callbacks', callbacks.length);
+    //finally we need to execute the callbacks in the order added to this stack
+    for(i = 0; i < callbacks.length; i++){
+        timer = callbacks[i];
+        timer.fn.apply(timer.fn,[]);
+    }
+});
+
+//DEPRECATED
+Envjs.wait = Envjs.wait||function(wait) {};
+
+}());
+
+/*
+ * Copyright (c) 2010 Nick Galbreath
+ * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * url processing in the spirit of python's urlparse module
+ * see `pydoc urlparse` or
+ * http://docs.python.org/library/urlparse.html
+ *
+ *  urlsplit: break apart a URL into components
+ *  urlunsplit:  reconsistute a URL from componets
+ *  urljoin: join an absolute and another URL
+ *  urldefrag: remove the fragment from a URL
+ *
+ * Take a look at the tests in urlparse-test.html
+ *
+ * On URL Normalization:
+ *
+ * urlsplit only does minor normalization the components Only scheme
+ * and hostname are lowercased urljoin does a bit more, normalizing
+ * paths with "."  and "..".
+
+ * urlnormalize adds additional normalization
+ *
+ *   * removes default port numbers
+ *     http://abc.com:80/ -> http://abc.com/, etc
+ *   * normalizes path
+ *     http://abc.com -> http://abc.com/
+ *     and other "." and ".." cleanups
+ *   * if file, remove query and fragment
+ *
+ * It does not do:
+ *   * normalizes escaped hex values
+ *     http://abc.com/%7efoo -> http://abc.com/%7Efoo
+ *   * normalize '+' <--> '%20'
+ *
+ * Differences with Python
+ *
+ * The javascript urlsplit returns a normal object with the following
+ * properties: scheme, netloc, hostname, port, path, query, fragment.
+ * All properties are read-write.
+ *
+ * In python, the resulting object is not a dict, but a specialized,
+ * read-only, and has alternative tuple interface (e.g. obj[0] ==
+ * obj.scheme).  It's not clear why such a simple function requires
+ * a unique datastructure.
+ *
+ * urlunsplit in javascript takes an duck-typed object,
+ *  { scheme: 'http', netloc: 'abc.com', ...}
+ *  while in  * python it takes a list-like object.
+ *  ['http', 'abc.com'... ]
+ *
+ * For all functions, the javascript version use
+ * hostname+port if netloc is missing.  In python
+ * hostname+port were always ignored.
+ *
+ * Similar functionality in different languages:
+ *
+ *   http://php.net/manual/en/function.parse-url.php
+ *   returns assocative array but cannot handle relative URL
+ *
+ * TODO: test allowfragments more
+ * TODO: test netloc missing, but hostname present
+ */
+
+var urlparse = {};
+
+// Unlike to be useful standalone
+//
+// NORMALIZE PATH with "../" and "./"
+//   http://en.wikipedia.org/wiki/URL_normalization
+//   http://tools.ietf.org/html/rfc3986#section-5.2.3
+//
+urlparse.normalizepath = function(path)
+{
+    if (!path || path === '/') {
+        return '/';
+    }
+
+    var parts = path.split('/');
+
+    var newparts = [];
+    // make sure path always starts with '/'
+    if (parts[0]) {
+        newparts.push('');
+    }
+
+    for (var i = 0; i < parts.length; ++i) {
+        if (parts[i] === '..') {
+            if (newparts.length > 1) {
+                newparts.pop();
+            } else {
+                newparts.push(parts[i]);
+            }
+        } else if (parts[i] != '.') {
+            newparts.push(parts[i]);
+        }
+    }
+
+    path = newparts.join('/');
+    if (!path) {
+        path = '/';
+    }
+    return path;
+};
+
+//
+// Does many of the normalizations that the stock
+//  python urlsplit/urlunsplit/urljoin neglects
+//
+// Doesn't do hex-escape normalization on path or query
+//   %7e -> %7E
+// Nor, '+' <--> %20 translation
+//
+urlparse.urlnormalize = function(url)
+{
+    var parts = urlparse.urlsplit(url);
+    switch (parts.scheme) {
+    case 'file':
+        // files can't have query strings
+        //  and we don't bother with fragments
+        parts.query = '';
+        parts.fragment = '';
+        break;
+    case 'http':
+    case 'https':
+        // remove default port
+        if ((parts.scheme === 'http' && parts.port == 80) ||
+            (parts.scheme === 'https' && parts.port == 443)) {
+            parts.port = null;
+            // hostname is already lower case
+            parts.netloc = parts.hostname;
+        }
+        break;
+    default:
+        // if we don't have specific normalizations for this
+        // scheme, return the original url unmolested
+        return url;
+    }
+
+    // for [file|http|https].  Not sure about other schemes
+    parts.path = urlparse.normalizepath(parts.path);
+
+    return urlparse.urlunsplit(parts);
+};
+
+urlparse.urldefrag = function(url)
+{
+    var idx = url.indexOf('#');
+    if (idx == -1) {
+        return [ url, '' ];
+    } else {
+        return [ url.substr(0,idx), url.substr(idx+1) ];
+    }
+};
+
+urlparse.urlsplit = function(url, default_scheme, allow_fragments)
+{
+    var leftover;
+
+    if (typeof allow_fragments === 'undefined') {
+        allow_fragments = true;
+    }
+
+    // scheme (optional), host, port
+    var fullurl = /^([A-Za-z]+)?(:?\/\/)([0-9.\-A-Za-z]*)(?::(\d+))?(.*)$/;
+    // path, query, fragment
+    var parse_leftovers = /([^?#]*)?(?:\?([^#]*))?(?:#(.*))?$/;
+
+    var o = {};
+
+    var parts = url.match(fullurl);
+    if (parts) {
+        o.scheme = parts[1] || default_scheme || '';
+        o.hostname = parts[3].toLowerCase() || '';
+        o.port = parseInt(parts[4],10) || '';
+        // Probably should grab the netloc from regexp
+        //  and then parse again for hostname/port
+
+        o.netloc = parts[3];
+        if (parts[4]) {
+            o.netloc += ':' + parts[4];
+        }
+
+        leftover = parts[5];
+    } else {
+        o.scheme = default_scheme || '';
+        o.netloc = '';
+        o.hostname = '';
+        leftover = url;
+    }
+    o.scheme = o.scheme.toLowerCase();
+
+    parts = leftover.match(parse_leftovers);
+
+    o.path =  parts[1] || '';
+    o.query = parts[2] || '';
+
+    if (allow_fragments) {
+        o.fragment = parts[3] || '';
+    } else {
+        o.fragment = '';
+    }
+
+    return o;
+};
+
+urlparse.urlunsplit = function(o) {
+    var s = '';
+    if (o.scheme) {
+        s += o.scheme + '://';
+    }
+
+    if (o.netloc) {
+        if (s == '') {
+            s += '//';
+        }
+        s +=  o.netloc;
+    } else if (o.hostname) {
+        // extension.  Python only uses netloc
+        if (s == '') {
+            s += '//';
+        }
+        s += o.hostname;
+        if (o.port) {
+            s += ':' + o.port;
+        }
+    }
+
+    if (o.path) {
+        s += o.path;
+    }
+
+    if (o.query) {
+        s += '?' + o.query;
+    }
+    if (o.fragment) {
+        s += '#' + o.fragment;
+    }
+    return s;
+};
+
+urlparse.urljoin = function(base, url, allow_fragments)
+{
+    if (typeof allow_fragments === 'undefined') {
+        allow_fragments = true;
+    }
+
+    var url_parts = urlparse.urlsplit(url);
+
+    // if url parts has a scheme (i.e. absolute)
+    // then nothing to do
+    if (url_parts.scheme) {
+        if (! allow_fragments) {
+            return url;
+        } else {
+            return urlparse.urldefrag(url)[0];
+        }
+    }
+    var base_parts = urlparse.urlsplit(base);
+
+    // copy base, only if not present
+    if (!base_parts.scheme) {
+        base_parts.scheme = url_parts.scheme;
+    }
+
+    // copy netloc, only if not present
+    if (!base_parts.netloc || !base_parts.hostname) {
+        base_parts.netloc = url_parts.netloc;
+        base_parts.hostname = url_parts.hostname;
+        base_parts.port = url_parts.port;
+    }
+
+    // paths
+    if (url_parts.path.length > 0) {
+        if (url_parts.path.charAt(0) == '/') {
+            base_parts.path = url_parts.path;
+        } else {
+            // relative path.. get rid of "current filename" and
+            //   replace.  Same as var parts =
+            //   base_parts.path.split('/'); parts[parts.length-1] =
+            //   url_parts.path; base_parts.path = parts.join('/');
+            var idx = base_parts.path.lastIndexOf('/');
+            if (idx == -1) {
+                base_parts.path = url_parts.path;
+            } else {
+                base_parts.path = base_parts.path.substr(0,idx) + '/' +
+                    url_parts.path;
+            }
+        }
+    }
+
+    // clean up path
+    base_parts.path = urlparse.normalizepath(base_parts.path);
+
+    // copy query string
+    base_parts.query = url_parts.query;
+
+    // copy fragments
+    if (allow_fragments) {
+        base_parts.fragment = url_parts.fragment;
+    } else {
+        base_parts.fragment = '';
+    }
+
+    return urlparse.urlunsplit(base_parts);
+};
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.XMLHttpRequest.Core').
+        debug('XMLHttpRequest.Core available');
+});
+
+/**
+ * getcwd - named after posix call of same name (see 'man 2 getcwd')
+ *
+ */
+Envjs.getcwd = function() {
+    return Envjs.uri('.');
+};
+
+/**
+ * resolves location relative to doc location
+ *
+ * @param {Object} path  Relative or absolute URL
+ * @param {Object} base  (semi-optional)  The base url used in resolving "path" above
+ */
+Envjs.uri = function(path, base) {
+    //console.log('constructing uri from path %s and base %s', path, base);
+    path = path+'';
+    // Semi-common trick is to make an iframe with src='javascript:false'
+    //  (or some equivalent).  By returning '', the load is skipped'
+    var js = 'javascript';
+    if (path.indexOf(js+':') === 0) {
+        return '';
+    }
+
+    // if path is absolute, then just normalize and return
+    if (path.match('^[a-zA-Z]+://')) {
+        return urlparse.urlnormalize(path);
+    }
+
+    // interesting special case, a few very large websites use
+    // '//foo/bar/' to mean 'http://foo/bar'
+    if (path.match('^//')) {
+        path = 'http:' + path;
+    }
+
+    // if base not passed in, try to get it from document
+    // Ideally I would like the caller to pass in document.baseURI to
+    //  make this more self-sufficient and testable
+    if (!base && document) {
+        base = document.baseURI;
+    }
+
+    // about:blank doesn't count
+    if (base === 'about:blank'){
+        base = '';
+    }
+
+    // if base is still empty, then we are in QA mode loading local
+    // files.  Get current working directory
+    if (!base) {
+        base = 'file://' +  Envjs.getcwd() + '/';
+    }
+    // handles all cases if path is abosulte or relative to base
+    // 3rd arg is "false" --> remove fragments
+    var newurl = urlparse.urlnormalize(urlparse.urljoin(base, path, false));
+    //console.log('uri %s %s = %s', base, path, newurl);
+    return newurl;
+};
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} url
+ */
+Envjs.writeToFile = function(text, url){};
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){};
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function(url){};
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){};
+
+
+Envjs.connections = [];
+Envjs.connections.addConnection = Envjs.sync(function(xhr){
+    log.debug('registering connection.');
+    Envjs.connections.push(xhr);
+});
+Envjs.connections.removeConnection = Envjs.sync(function(xhr){
+    log.debug('unregistering connection.');
+    var i;
+    for(i = 0; i < Envjs.connections.length; i++){
+        if(Envjs.connections[i] === xhr){
+            Envjs.connections.splice(i,1);
+            break;
+        }
+    }
+    return;
+});
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){};
+
+Envjs.localXHR = function(url, xhr, connection, data){
+    try{
+        if ( "PUT" == xhr.method || "POST" == xhr.method ) {
+            log.debug('writing to file %s', url);
+            data =  data || "" ;
+            Envjs.writeToFile(data, url);
+            xhr.readyState = 4;
+            //could be improved, I just cant recall the correct http codes
+            xhr.status = 200;
+            xhr.statusText = "";
+        } else if ( xhr.method == "DELETE" ) {
+            log.debug('deleting file %s', url);
+            Envjs.deleteFile(url);
+            xhr.readyState = 4;
+            //could be improved, I just cant recall the correct http codes
+            xhr.status = 200;
+            xhr.statusText = "";
+        } else {
+            //try to add some canned headers that make sense
+            log.debug('reading from file %s', url);
+            xhr.readyState = 4;
+            xhr.statusText = "ok";
+            xhr.responseText = Envjs.readFromFile(url);
+            try{
+                if(url.match(/html$/)){
+                    xhr.responseHeaders["Content-Type"] = 'text/html';
+                }else if(url.match(/.xml$/)){
+                    xhr.responseHeaders["Content-Type"] = 'text/xml';
+                }else if(url.match(/.js$/)){
+                    xhr.responseHeaders["Content-Type"] = 'text/javascript';
+                }else if(url.match(/.json$/)){
+                    xhr.responseHeaders["Content-Type"] = 'application/json';
+                }else{
+                    xhr.responseHeaders["Content-Type"] = 'text/plain';
+                }
+                //xhr.responseHeaders['Last-Modified'] = connection.getLastModified();
+                //xhr.responseHeaders['Content-Length'] = headerValue+'';
+                //xhr.responseHeaders['Date'] = new Date()+'';
+            }catch(ee){
+                log.error('failed to load response headers', ee);
+            }
+        }
+    }catch(e){
+        log.error('failed to open file %s %s', url, e);
+        connection = null;
+        xhr.readyState = 4;
+        xhr.statusText = "Local File Protocol Error";
+        xhr.responseText = "<html><head/><body><p>"+ e+ "</p></body></html>";
+    }
+};
+
+__extend__(Envjs, urlparse);
+
+}(/*Envjs.XMLHttpRequest.Core*/));
+(function(){
+
+var log = Envjs.logger('Envjs.Window');
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Window');
+});
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent, aliasList){
+    return (function(){return this;}());
+};
+
+Envjs.javaEnabled = false;
+
+Envjs.homedir        = '';
+Envjs.tmpdir         = '';
+Envjs.os_name        = '';
+Envjs.os_arch        = '';
+Envjs.os_version     = '';
+Envjs.lang           = '';
+Envjs.platform       = '';
+
+//some common user agents as constants so you can emulate them
+Envjs.userAgents = {
+    firefox3: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7'
+};
+
+var __windows__ = {};
+
+Envjs.windows = function(uuid, scope){
+    var w;
+    if(arguments.length === 0){
+        return __windows__;
+    }else if(arguments.length === 1){
+        return __windows__.hasOwnProperty(uuid) ?
+            __windows__[uuid] :
+            null;
+    }else if(arguments.length === 2){
+        __windows__[uuid] = scope;
+        if(scope === null){
+            delete __windows__[uuid];
+        }
+    }
+};
+/**
+ *
+ * @param {Object} frameElement
+ * @param {Object} url
+ */
+Envjs.loadFrame = function(frame, url){
+    var w;
+    try {
+        //console.log('loading frame %s', url);
+        if(frame.contentWindow && frame.contentWindow.close){
+            //mark for garbage collection
+            frame.contentWindow.close();
+        }
+
+        //create a new scope for the window proxy
+        //platforms will need to override this function
+        //to make sure the scope is global-like
+        frame.contentWindow = Envjs.proxy({});
+        //console.log("frame.ownerDocument %s subframe %s",
+        //  frame.ownerDocument.location,
+        //  frame.ownerDocument.__ownerFrame__);
+        if(frame.ownerDocument&&frame.ownerDocument.__ownerFrame__){
+            //console.log('frame is parent %s', frame.ownerDocument.__ownerFrame__.contentWindow.guid);
+            w = new Window(frame.contentWindow, frame.ownerDocument.__ownerFrame__.contentWindow);
+        }else{
+            //log.debug("window is parent %s", window.guid);
+            w = new Window(frame.contentWindow, window);
+        }
+
+        //I dont think frames load asynchronously in firefox
+        //and I think the tests have verified this but for
+        //some reason I'm less than confident... Are there cases?
+        frame.contentDocument = frame.contentWindow.document;
+        frame.contentDocument.async = false;
+        frame.contentDocument.__ownerFrame__ = frame;
+        if(url){
+            log.debug('envjs.loadFrame async %s', frame.contentDocument.async);
+            frame.contentDocument.location.assign(Envjs.uri(url, frame.ownerDocument.location.toString()));
+        }
+    } catch(e) {
+        log.error("failed to load frame content: from %s %s", url, e);
+    }
+};
+
+
+/**
+ * unloadFrame
+ * @param {Object} frame
+ */
+Envjs.unloadFrame = function(frame){
+    var all, length, i;
+    try{
+        //TODO: probably self-referencing structures within a document tree
+        //preventing it from being entirely garbage collected once orphaned.
+        //Should have code to walk tree and break all links between contained
+        //objects.
+        frame.contentDocument = null;
+        if(frame.contentWindow){
+            //console.log('closing window %s', frame.contentWindow);
+            frame.contentWindow.close();
+        }
+        Envjs.gc();
+    }catch(e){
+        console.log(e);
+    }
+};
+
+/**
+ * Platform clean up hook if it ever makes sense - see Envjs.unloadFrame for example
+ */
+Envjs.gc = function(){};
+
+}());
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/platform/johnson.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/platform/johnson.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/platform/johnson.js	(revision 225)
@@ -0,0 +1,363 @@
+var __context__ = __this__;
+
+var Envjs = Envjs ||
+	require('./core').Envjs;
+	require('local_settings');
+
+Envjs.platform       = "Johnson SpiderMonkey";
+Envjs.revision       = Ruby.CONFIG.ruby_version;
+
+Ruby.ARGV.shift();
+Envjs.argv = Ruby.ARGV;
+
+Envjs.exit = function(){ Ruby['exit!'](); };
+
+/*
+ * Envjs johnson-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+Envjs.log = function(msg){
+	Ruby.puts(msg);
+}
+
+Envjs.lineSource = function(e){
+    return "(line ?)";
+};
+
+Envjs.readConsole = function(){
+     return Ruby.$stdin.gets();
+};
+
+Envjs.prompt = function(){
+    Ruby.$stdout.write(Envjs.CURSOR+' ');
+    Ruby.$stdout.flush;
+};
+
+//No REPL for
+Envjs.repl = function(){
+    console.log('Envjs REPL Not Available');
+};
+(function(){
+
+var log = Envjs.logger('Envjs.Platform.Johnson');
+
+Envjs.eval = function(context, source, name){
+    if(context == __this__){
+        return global.evaluate( source, name );
+    }else{
+		var abc = new Ruby.Johnson.Runtime()
+		log.debug('evaluating in framed context %s %s', context, abc);
+	    return context.evaluate( source, name );
+    }
+};
+
+})();
+/**
+ * synchronizes thread modifications
+ * @param {Function} fn
+ */
+var	lock = new Ruby.Mutex();
+
+//NOTES:
+//context['sync'] = lambda{|wrapper|
+//    Proc.new{|*args|lock.synchronize {wrapper['fn'].call(*args)}}
+//}
+//context['sync']      = lambda{|fn| Proc.new{|*args| fn.call(*args) }}
+Envjs.sync = function(fn){
+    //console.log('syncing js fn %s', fn);
+    var wrapper = {fn:fn};
+	//return lock.synchronize(fn)
+    return fn;
+};
+
+//NOTES:
+//context['spawn']    = lambda{|wrapper| Thread.new {wrapper['fn'].call} }
+//context['spawn']     = lambda{|wrapper| wrapper['fn'].call }
+ Envjs.spawn = function(fn){
+     //console.log('spawning js fn %s', fn);
+     var wrapper = {fn:fn};
+     return fn();
+ };
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} milliseconds
+ */
+Envjs.sleep = function(milliseconds){
+	return Ruby.sleep(1.0*milliseconds/1000.0);
+};
+(function(){
+
+var log = Envjs.logger('Envjs.Platform.Johnson');
+
+//Since we're running in spydermonkey I guess we can safely assume
+//java is not 'enabled'.  I'm sure this requires more thought
+//than I've given it here
+Envjs.javaEnabled 	 = false;
+
+Envjs.homedir        = Ruby.ENV.HOME
+Envjs.tmpdir         = Ruby.ENV.TMPDIR;
+Envjs.os_name        = Ruby.CONFIG.host_os;
+Envjs.os_arch        = Ruby.CONFIG.host_cpu;
+Envjs.os_version     = "";//part of os_arch
+Envjs.lang           = Ruby.ENV.LANG;
+
+Envjs.gc = function(){ Ruby.Johnson.Runtime.gc(); };
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent) {
+    try{
+        if(scope == __this__){
+            return scope;
+        }else{
+            return new Ruby.Johnson.Runtime();
+        }
+    }catch(e){
+        console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
+    }
+};
+
+})();(function(){
+
+var log = Envjs.logger('Envjs.XMLHttpRequest.Johnson');
+
+/**
+ * Get 'Current Working Directory'
+ */
+Envjs.getcwd = function() {
+    return Ruby.ENV['PWD'];
+};
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+    log.debug('reading file %s', url);
+    var file = Ruby.File.open(url, 'r'),
+        data = file.read();
+    return data;
+};
+
+Envjs.writeToFile = function(text, url){
+    var file = Ruby.File.open(url, 'w');
+	log.debug('writing to file %s', url);
+	file.write(text);
+	return;
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){
+    // Create temp file.
+    var temp = Envjs.tmpdir+"."+(new Date().getTime())+(suffix||'.js');
+    log.debug("writing text to temp url : %s ", temp);
+    Envjs.writeToFile(text, temp);
+    return temp;
+};
+
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+	log.debug('reading file %s', url);
+    var file = Ruby.File.open(url, 'r'),
+		data = file.read();
+	return data;
+};
+
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){
+    return ;//TODO
+};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){
+    var url = xhr.url,
+		urlparts = Envjs.urlsplit(xhr.url),
+        connection,
+		request,
+		headers,
+        header,
+        length,
+        binary = false,
+        name, value,
+        contentEncoding,
+        responseXML,
+        i;
+
+    if ( /^file\:/.test(url) ) {
+	    //console.log('establishing file connection');
+        Envjs.localXHR(url, xhr, connection, data);
+    } else {
+	    log.debug('establishing http connection %s', xhr.url);
+		try{
+
+	        connection = Ruby.Net.HTTP.start(
+				urlparts.hostname,
+				Number(urlparts.port||80)
+			);
+			log.debug('connection established %s', connection);
+
+			path = urlparts.path+(urlparts.query?'?'+urlparts.query:'');
+		    switch(	xhr.method.toUpperCase() ){
+				case "GET":
+					request = new Ruby.Net.HTTP.Get(path);break;
+			    case "PUT":
+					request = new Ruby.Net.HTTP.Put(path);break;
+			    case "POST"	:
+					request = new Ruby.Net.HTTP.Post(path);break;
+			    case "HEAD":
+					request = new Ruby.Net.HTTP.Head(path);break;
+			    case "DELETE":
+					request = new Ruby.Net.HTTP.Delete(path);break;
+				default:
+					request = null;
+			}
+			log.debug('request query string %s', urlparts.query);
+			log.debug('formulated %s request %s %s', xhr.method, urlparts.path, request);
+			//TODO: add gzip support
+	        //connection.putheader("Accept-Encoding", 'gzip');
+			//connection.endheaders();
+
+	        //write data to output stream if required
+			//TODO: if they have set the request header for a chunked
+			//request body, implement a chunked output stream
+	        if(data){
+	            if(data instanceof Document){
+	                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+	                    connection.send((new XMLSerializer()).serializeToString(data));
+	                }
+	            }else if(data.length&&data.length>0){
+	                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+	                    connection.send(data+'');
+	                }
+	            }
+	        }
+		}catch(e){
+			log.error("connection failed %s",e);
+			if (connection)
+				connection.finish();
+			connection = null;
+		}
+    }
+
+    if(connection){
+		[response, headers] = HTTPConnection.go(connection, request, xhr.headers, null);
+
+        try{
+            // Stick the response headers into responseHeaders
+			var keys = headers.keys();
+            for (var i = 0;i<keys.length;i++) {
+				header = keys[i];
+				log.debug('response header [%s] = %s', header, headers[header]);
+                xhr.responseHeaders[header] = headers[header];
+            }
+        }catch(e){
+            log.error('failed to load response headers \n%s',e);
+        }
+
+        xhr.readyState = 4;
+        xhr.status = parseInt(response.code,10) || undefined;
+        xhr.statusText = response.message || "";
+		log.info('%s %s %s %s', xhr.method, xhr.status, xhr.url, xhr.statusText);
+        contentEncoding = xhr.getResponseHeader('content-encoding') || "utf-8";
+        responseXML = null;
+
+        try{
+            //console.log('contentEncoding %s', contentEncoding);
+            if( contentEncoding.toLowerCase() == "gzip" ||
+                contentEncoding.toLowerCase() == "decompress"){
+                //zipped content
+                binary = true;
+				//TODO
+				log.debug('TODO: handle gzip compression');
+                xhr.responseText = response.body;
+            }else{
+                //this is a text file
+                xhr.responseText = response.body+'';
+            }
+        }catch(e){
+            log.warn('failed to open connection stream \n%s, %s %s %s',
+            	xhr.status, xhr.url, e.toString(), e
+			);
+        }finally{
+			if(connection)
+				connection.finish();
+		}
+
+
+    }
+
+    if(responseHandler){
+        log.debug('calling ajax response handler');
+        if(!xhr.async){
+			log.debug('calling sync response handler directly');
+			responseHandler();
+		}else{
+			log.debug('using setTimeout for async response handler');
+			setTimeout(responseHandler, 1);
+		}
+    }
+};
+
+})(/*Envjs.XMLHttpRequest.Johnson*/);
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/platform/node.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/platform/node.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/platform/node.js	(revision 225)
@@ -0,0 +1,343 @@
+var __context__ = __this__ = global;
+
+var Envjs = Envjs ||
+	require('./core').Envjs;
+	require('./../../local_settings');
+
+Envjs.platform       = "Node";
+Envjs.revision       = process.version;
+
+/*process.on('uncaughtException', function (err) {
+  	console.log('Envjs Caught exception: %s \n %s', err);
+});*/
+
+Envjs.argv = process.argv;
+Envjs.argv.shift();
+Envjs.argv.shift();//node is argv[0] but we want to start at argv[1]
+
+Envjs.exit = function(){
+    /*setTimeout(function () {
+        if(!Envjs.timers.length){
+            //console.log('no timers remaining %s', Envjs.timers.length);
+            process.exit();
+        }else{
+            Envjs.exit();
+        }
+    }, 13);*/
+};
+
+
+/*
+ * Envjs node-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+var $print = require('sys').print;
+
+Envjs.log = function(msg){
+    console.log(msg+'\n\n');
+};
+
+Envjs.lineSource = function(e){
+    return "(line ?)";
+};
+
+Envjs.readConsole = function(){
+     return $stdin.gets();
+};
+
+Envjs.prompt = function(){
+    $stdout.write(Envjs.CURSOR+' ');
+    $stdout.flush;
+};
+
+//No REPL for
+Envjs.repl = function(){
+    //require('repl').start(Envjs.CURSOR+' ');
+    console.log('Envjs REPL Not Available');
+};
+var Script = process.binding('evals').Script;
+
+Envjs.eval = function(context, source, name, warming){
+	if(context === global){
+		return warming ?
+			eval(source) :
+			Script.runInThisContext(source, name);
+	}else{
+		return Script.runInNewContext(source, context, name);
+	}
+};
+Envjs.wait = function(){ return; }
+
+var $tick = function(){
+    process.nextTick(function () {
+        //console.log('node tick');
+        Envjs.tick();
+        $tick();
+    });
+};
+
+Envjs.eventLoop = function(){
+    //console.log('event loop');
+    $tick();
+};
+/**
+ * provides callback hook for when the system exits
+ */
+Envjs.onExit = function(callback){
+    process.on('exit', callback);
+};
+
+
+/**
+ * synchronizes thread modifications
+ * @param {Function} fn
+ */
+ Envjs.sync = function(fn){
+     //console.log('syncing js fn %s', fn);
+     return fn;
+ };
+
+ Envjs.spawn = function(fn){
+     return fn();
+ };
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} milliseconds
+ */
+Envjs.sleep = function(milliseconds){
+    return;
+};
+
+
+//Since we're running in v8 I guess we can safely assume
+//java is not 'enabled'.  I'm sure this requires more thought
+//than I've given it here
+Envjs.javaEnabled 	 = false;
+
+Envjs.homedir        = process.env["HOME"];
+Envjs.tmpdir         = process.env["TMPDIR"];
+Envjs.os_name        = process.platform;
+Envjs.os_arch        = "os arch";
+Envjs.os_version     = "os version";
+Envjs.lang           = process.env["LANG"];
+
+
+Envjs.gc = function(){ return; };
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent) {
+    try{
+        if(scope.toString() == global){
+            return __this__;
+        }else{
+            return scope;
+        }
+    }catch(e){
+       console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
+    }
+
+};var filesystem = require('fs');
+/**
+ * Get 'Current Working Directory'
+ */
+Envjs.getcwd = function() {
+    return process.cwd();
+}
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} url
+ */
+Envjs.writeToFile = function(text, url){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+    filesystem.writeFileSync(url, text, 'utf8');
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){
+	var url =  Envjs.tmpdir+'envjs-'+(new Date().getTime())+'.'+suffix;
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+	filesystem.writeFileSync(tmpfile, text, 'utf8');
+    return tmpfile;
+};
+
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+    return filesystem.readFileSync(url, 'utf8');
+};
+
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+    filesystem.unlink(url);
+};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){
+    var url = xhr.url,
+        connection,
+		request,
+        binary = false,
+        contentEncoding,
+        responseXML = null,
+		http = require('http'),
+		urlparts = Envjs.urlsplit(url),
+        i;
+
+
+    if ( /^file\:/.test(url) ) {
+        Envjs.localXHR(url, xhr, connection, data);
+    } else {
+	    //console.log('connecting to %s \n\t port(%s) host(%s) path(%s) query(%s)',
+	    //    url, urlparts.port, urlparts.hostname, urlparts.path, urlparts.query);
+		connection = http.createClient(urlparts.port||'80', urlparts.hostname);
+		request = connection.request(
+			xhr.method,
+			urlparts.path+(urlparts.query?"?"+urlparts.query:''),
+			__extend__(xhr.headers,{
+				"Host": urlparts.hostname,
+				//"Connection":"Keep-Alive"
+				//"Accept-Encoding", 'gzip'
+			})
+		);
+		xhr.statusText = "";
+
+	    if(connection&&request){
+			request.on('response', function (response) {
+				//console.log('response begin');
+				xhr.readyState = 3;
+				response.on('end', function (chunk) {
+					//console.log('connection complete');
+		        	xhr.readyState = 4;
+				    if(responseHandler){
+				        //console.log('calling ajax response handler');
+				        if(!xhr.async){
+							responseHandler();
+						}else{
+							setTimeout(responseHandler, 1);
+						}
+				    }
+					if(xhr.onreadystatechange){
+						xhr.onreadystatechange();
+					}
+				});
+
+				xhr.responseHeaders = __extend__({},response.headers);
+                xhr.statusText = "OK";
+			    xhr.status = response.statusCode;
+				//console.log('response headers : %s', JSON.stringify(xhr.responseHeaders));
+				contentEncoding = xhr.getResponseHeader('Content-Encoding') || "utf-8";
+				response.setEncoding(contentEncoding);
+	            //console.log('contentEncoding %s', contentEncoding);
+
+			  	response.on('data', function (chunk) {
+			    	//console.log('\nBODY: %s', chunk);
+		            if( contentEncoding.match("gzip") ||
+		                contentEncoding.match("decompress")){
+		                //zipped content
+		                binary = true;
+						//Not supported yet
+		                xhr.responseText += (chunk+'');
+		            }else{
+		                //this is a text file
+		                xhr.responseText += (chunk+'');
+		            }
+					if(xhr.onreadystatechange){
+						xhr.onreadystatechange();
+					}
+			  	});
+				if(xhr.onreadystatechange){
+					xhr.onreadystatechange();
+				}
+			});
+	    }
+        //write data to output stream if required
+		//TODO: if they have set the request header for a chunked
+		//request body, implement a chunked output stream
+
+        //console.log('sending request %s\n', xhr.url);
+        if(data){
+            if(data instanceof Document){
+                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+                    xml = (new XMLSerializer()).serializeToString(data);
+					request.write(xml);
+                }
+            }else if(data.length&&data.length>0){
+                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+                    request.write(data);
+                }
+            }
+            request.end();
+        }else{
+            request.end();
+        }
+    }
+
+};
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/platform/rhino.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/platform/rhino.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/platform/rhino.js	(revision 225)
@@ -0,0 +1,461 @@
+/*
+ * Envjs rhino-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+var Envjs = Envjs ||
+	require('./core').Envjs;
+	require('local_settings');
+
+var __context__ = Packages.org.mozilla.javascript.Context.getCurrentContext();
+
+Envjs.platform       = "Rhino";
+Envjs.revision       = "1.7.0.rc2";
+Envjs.argv = [];
+if(__argv__ && __argv__.length){
+	for(var i = 0; i < __argv__.length; i++){
+		Envjs.argv[i] = __argv__[i];
+	}
+}
+
+Envjs.exit = function(){
+	java.lang.System.exit(0);
+};
+
+/*
+ * Envjs rhino-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+/**
+ * Writes message to system out.
+ *
+ * @param {Object} message
+ */
+(function(){
+
+Envjs.log = print;
+
+Envjs.lineSource = function(e){
+    return e&&e.rhinoException?e.rhinoException.lineSource():"(line ?)";
+};
+
+var $in, log;
+Envjs.readConsole = function(){
+	log = log||Envjs.logger('Envjs.Rhino');
+	$in = $in||new java.io.BufferedReader(
+		new java.io.InputStreamReader(java.lang.System['in'])
+	);
+	return  $in.readLine()+'';
+};
+Envjs.prompt = function(){
+  	java.lang.System.out.print(Envjs.CURSOR+' ');
+	java.lang.System.out.flush();
+};
+
+}());
+
+
+(function(){
+
+var log = Envjs.logger('Envjs.HTML.Rhino');
+
+Envjs.eval = function(context, source, name){
+    //console.log('evaluating javascript source %s', source.substring(0,64));
+	return  __context__.evaluateString(
+        context,
+        source,
+        name,
+        0,
+        null
+    );
+};
+
+}());Envjs.renderSVG = function(svgstring, url){
+    //console.log("svg template url %s", templateSVG);
+    // Create a JPEG transcoder
+    var t = new Packages.org.apache.batik.transcoder.image.JPEGTranscoder();
+
+    // Set the transcoding hints.
+    t.addTranscodingHint(
+        Packages.org.apache.batik.transcoder.image.JPEGTranscoder.KEY_QUALITY,
+        new java.lang.Float(1.0));
+    // Create the transcoder input.
+    var input = new Packages.org.apache.batik.transcoder.TranscoderInput(
+        new java.io.StringReader(svgstring));
+
+    // Create the transcoder output.
+    var ostream = new java.io.ByteArrayOutputStream();
+    var output = new Packages.org.apache.batik.transcoder.TranscoderOutput(ostream);
+
+    // Save the image.
+    t.transcode(input, output);
+
+    // Flush and close the stream.
+    ostream.flush();
+    ostream.close();
+
+	var out = new java.io.FileOutputStream(new java.io.File(new java.net.URI(url.toString())));
+	try{
+    	out.write( ostream.toByteArray() );
+	}catch(e){
+
+	}finally{
+    	out.flush();
+    	out.close();
+    }
+};
+(function(){
+
+var log = Envjs.logger('Envjs.Timer.Rhino');
+/**
+ * Rhino provides a very succinct 'sync'
+ * @param {Function} fn
+ */
+try{
+    Envjs.sync = sync;
+    Envjs.spawn = spawn;
+	//print('sync and spawn are available');
+} catch(e){
+	//print('sync and spawn are not available : ' + e);
+    //sync unavailable on AppEngine
+    Envjs.sync = function(fn){
+        console.log('Threadless platform, sync is safe');
+        return fn;
+    };
+
+    Envjs.spawn = function(fn){
+        console.log('Threadless platform, spawn shares main thread.');
+        return fn();
+    };
+};
+
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} milliseconds
+ */
+Envjs.sleep = function(milliseconds){
+    try{
+        return java.lang.Thread.currentThread().sleep(milliseconds);
+    }catch(e){
+        console.log('Threadless platform, cannot sleep.');
+    }
+};
+
+/**
+ * provides callback hook for when the system exits
+ */
+Envjs.onExit = function(callback){
+    var rhino = Packages.org.mozilla.javascript,
+        contextFactory =  __context__.getFactory(),
+        listener = new rhino.ContextFactory.Listener({
+            contextReleased: function(context){
+                if(context === __context__)
+                    console.log('context released', context);
+                contextFactory.removeListener(this);
+                if(callback)
+                    callback();
+            }
+        });
+    contextFactory.addListener(listener);
+};
+
+}());
+(function(){
+
+var log = Envjs.logger('Envjs.XMLHttpRequest.Rhino');
+
+/**
+ * Get 'Current Working Directory'
+ */
+Envjs.getcwd = function() {
+    return java.lang.System.getProperty('user.dir');
+}
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} url
+ */
+Envjs.writeToFile = function(text, url){
+    //Envjs.debug("writing text to url : " + url);
+    var out = new java.io.FileWriter(
+        new java.io.File(
+            new java.net.URI(url.toString())));
+    out.write( text, 0, text.length );
+    out.flush();
+    out.close();
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){
+    //console.log("writing text to temp url : %s");
+    // Create temp file.
+    var temp = java.io.File.createTempFile("envjs-tmp", suffix);
+
+    // Delete temp file when program exits.
+    temp.deleteOnExit();
+
+    // Write to temp file
+    var out = new java.io.FileWriter(temp);
+    out.write(text, 0, text.length);
+    out.close();
+    return temp.getAbsolutePath().toString()+'';
+};
+
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(typeof url == 'string')
+    	url = Envjs.uri(url);
+    //console.log("reading from url : %s", url);
+    var fileReader = new java.io.FileReader(
+        new java.io.File(
+            new java.net.URI( url )));
+
+    var stringwriter = new java.io.StringWriter(),
+        buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024),
+        length;
+
+    while ((length = fileReader.read(buffer, 0, 1024)) != -1) {
+        stringwriter.write(buffer, 0, length);
+    }
+
+    stringwriter.close();
+    return stringwriter.toString()+"";
+};
+
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){
+    var file = new java.io.File( new java.net.URI( url ) );
+    file["delete"]();
+};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){
+    var url = java.net.URL(xhr.url),
+        connection,
+        header,
+        outstream,
+        buffer,
+        length,
+        binary = false,
+        name, value,
+        contentEncoding,
+        instream,
+        responseXML,
+        i;
+
+
+    if ( /^file\:/.test(url) ) {
+        Envjs.localXHR(url, xhr, connection, data);
+    } else {
+        connection = url.openConnection();
+        //handle redirects manually since cookie support sucks out of the box
+        connection.setFollowRedirects(false);
+        connection.setRequestMethod( xhr.method );
+
+        // Add headers to Java connection
+        for (header in xhr.headers){
+            connection.addRequestProperty(header+'', xhr.headers[header]+'');
+        }
+        connection.addRequestProperty("Accept-Encoding", 'gzip');
+
+        //write data to output stream if required
+		//TODO: if they have set the request header for a chunked
+		//request body, implement a chunked output stream
+        if(data){
+            if(data instanceof Document){
+                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+                    connection.setDoOutput(true);
+                    outstream = connection.getOutputStream(),
+                    xml = (new XMLSerializer()).serializeToString(data);
+                    buffer = new java.lang.String(xml).getBytes('UTF-8');
+                    outstream.write(buffer, 0, buffer.length);
+                    outstream.close();
+                }
+            }else if(data.length&&data.length>0){
+                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+                    connection.setDoOutput(true);
+                    outstream = connection.getOutputStream();
+                    buffer = new java.lang.String(data).getBytes('UTF-8');
+                    outstream.write(buffer, 0, buffer.length);
+                    outstream.close();
+                }
+            }
+            connection.connect();
+        }else{
+            connection.connect();
+        }
+    }
+
+    if(connection){
+        try{
+            length = connection.getHeaderFields().size();
+            // Stick the response headers into responseHeaders
+            for (i = 0; i < length; i++) {
+                name = connection.getHeaderFieldKey(i);
+                value = connection.getHeaderField(i);
+                if (name)
+                    xhr.responseHeaders[name+''] = value+'';
+            }
+        }catch(e){
+            console.log('failed to load response headers \n%s',e);
+        }
+
+        xhr.readyState = 4;
+        xhr.status = parseInt(connection.responseCode,10) || undefined;
+        xhr.statusText = connection.responseMessage || "";
+
+        contentEncoding = connection.getContentEncoding() || "utf-8";
+        instream = null;
+        responseXML = null;
+
+        try{
+            //console.log('contentEncoding %s', contentEncoding);
+            if( contentEncoding.equalsIgnoreCase("gzip") ||
+                contentEncoding.equalsIgnoreCase("decompress")){
+                //zipped content
+                binary = true;
+                outstream = new java.io.ByteArrayOutputStream();
+                buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
+                instream = new java.util.zip.GZIPInputStream(connection.getInputStream())
+            }else{
+                //this is a text file
+                outstream = new java.io.StringWriter();
+                buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024);
+                instream = new java.io.InputStreamReader(connection.getInputStream());
+            }
+        }catch(e){
+            if (connection.getResponseCode() == 404){
+                console.log('failed to open connection stream \n %s %s',
+                            e.toString(), e);
+            }else{
+                console.log('failed to open connection stream \n %s %s',
+                            e.toString(), e);
+            }
+            instream = connection.getErrorStream();
+        }
+
+        while ((length = instream.read(buffer, 0, 1024)) != -1) {
+            outstream.write(buffer, 0, length);
+        }
+
+        outstream.close();
+        instream.close();
+
+        if(binary){
+            xhr.responseText = new java.lang.String(outstream.toByteArray(), 'UTF-8')+'';
+        }else{
+            xhr.responseText = outstream.toString()+'';
+        }
+
+    }
+    if(responseHandler){
+        //console.log('calling ajax response handler');
+        if(!xhr.async){
+			responseHandler();
+		}else{
+		    //console.log('synchronizing ajax response handler via setTimeout');
+			setTimeout(responseHandler, 1);
+		}
+    }
+};
+
+}());
+
+
+(function(){
+
+var log = Envjs.logger('Envjs.Window.Rhino');
+
+//Since we're running in rhino I guess we can safely assume
+//java is 'enabled'.  I'm sure this requires more thought
+//than I've given it here
+Envjs.javaEnabled = true;
+
+Envjs.homedir        = java.lang.System.getProperty("user.home");
+Envjs.tmpdir         = java.lang.System.getProperty("java.io.tmpdir");
+Envjs.os_name        = java.lang.System.getProperty("os.name");
+Envjs.os_arch        = java.lang.System.getProperty("os.arch");
+Envjs.os_version     = java.lang.System.getProperty("os.version");
+Envjs.lang           = java.lang.System.getProperty("user.lang");
+
+
+Envjs.gc = function(){ gc(); };
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent) {
+    try{
+        if(scope+'' == '[object global]'){
+            return scope;
+        }else{
+            return  __context__.initStandardObjects();
+        }
+    }catch(e){
+        console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
+    }
+
+};
+
+}());
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/platform/rubyracer.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/platform/rubyracer.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/platform/rubyracer.js	(revision 225)
@@ -0,0 +1,340 @@
+var __context__ = __this__;
+
+var Envjs = Envjs ||
+	require('./core').Envjs;
+	require('local_settings');
+
+Envjs.platform       = "V8 RubyRacer";
+Envjs.revision       = Ruby.CONFIG.ruby_version;
+
+Ruby.ARGV.shift();
+Envjs.argv = Ruby.ARGV;
+
+Envjs.exit = function(){ Ruby.Process['exit!'](); };
+
+/*
+ * Envjs rubyracer-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+Envjs.log = function(msg){
+	Ruby.puts(msg);
+};
+
+Envjs.lineSource = function(e){
+    return "(line ?)";
+};
+
+var line = "";
+Envjs.readConsole = function(){
+	try{
+		line = Ruby.$stdin.gets();
+	}catch(e){
+		console.log('ERROR : %s', e);
+	}
+	return line;
+};
+
+Envjs.prompt = function(){
+  	Ruby.$stdout.write(Envjs.CURSOR+' ');
+	Ruby.$stdout.flush;
+};
+
+//No REPL for
+Envjs.repl = function(){
+	console.log('Envjs REPL Not Available');
+};
+(function(){
+
+var log = Envjs.logger('Envjs.Platform.RubyRacer');
+
+Envjs.eval = function(context, source, name){
+    if(context == __this__){
+        return __this__.eval( source );
+    }else{
+		log.debug('evaluating in proxy scope %s', context);
+	    return context.eval( source );
+    }
+};
+
+})();
+/**
+ * synchronizes thread modifications
+ * @param {Function} fn
+ */
+ Envjs.sync = function(fn){
+     //console.log('Threadless platform, sync is safe');
+     return sync(fn);
+ };
+
+ Envjs.spawn = function(fn){
+     return spawn(fn);
+ };
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} milliseconds
+ */
+Envjs.sleep = function(milliseconds){
+	return Ruby.sleep(1.0*milliseconds/1000.0);
+};
+//Since we're running in spydermonkey I guess we can safely assume
+//java is not 'enabled'.  I'm sure this requires more thought
+//than I've given it here
+Envjs.javaEnabled 	 = false;
+
+Envjs.homedir        = Ruby.ENV.HOME
+Envjs.tmpdir         = Ruby.ENV.TMPDIR;
+Envjs.os_name        = Ruby.CONFIG.host_os;
+Envjs.os_arch        = Ruby.CONFIG.host_cpu;
+Envjs.os_version     = "";//part of os_arch
+Envjs.lang           = Ruby.ENV.LANG;
+
+Envjs.gc = function(){ Ruby.gc(); };
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent) {
+    try{
+        if(scope == __this__){
+            return scope;
+        }else{
+            return new_context();
+        }
+    }catch(e){
+        console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
+    }
+
+};
+(function(){
+
+var log = Envjs.logger('Envjs.XMLHttpRequest.RubyRacer');
+
+/**
+ * Get 'Current Working Directory'
+ */
+Envjs.getcwd = function() {
+    return Ruby.ENV.PWD;
+};
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+    log.debug('reading file %s', url);
+    var file = fopen(url, 'r'),
+        data = file.read();
+    return data;
+};
+
+Envjs.writeToFile = function(text, url){
+    var file = fopen(url, 'w');
+	log.debug('writing to file %s', url);
+	file.write(text);
+	return;
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){
+    // Create temp file.
+    var temp = Envjs.tmpdir+"."+(new Date().getTime())+(suffix||'.js');
+    log.debug("writing text to temp url : %s ", temp);
+    Envjs.writeToFile(text, temp);
+    return temp;
+};
+
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+	log.debug('reading file %s', url);
+    var file = fopen(url, 'r'),
+		data = file.read();
+	return data;
+};
+
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){
+    return ;//TODO
+};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){
+    var url = xhr.url,
+		urlparts = Envjs.urlsplit(xhr.url),
+        connection,
+		request,
+		headers,
+        header,
+        length,
+        binary = false,
+        name, value,
+        contentEncoding,
+        responseXML,
+        i;
+
+    if ( /^file\:/.test(url) ) {
+	    log.debug('establishing file connection');
+        Envjs.localXHR(url, xhr, connection, data);
+    } else {
+	    log.debug('establishing http native ruby connection %s', xhr.url);
+		try{
+
+	        connection = HTTPConnection.connect(
+				urlparts.hostname,
+				Number(urlparts.port||80)
+			);
+			log.debug('native ruby connection established %s', connection);
+
+			path = urlparts.path+(urlparts.query?'?'+urlparts.query:'');
+			request = HTTPConnection.request(xhr.method.toUpperCase(), path);
+			log.debug('request query string %s', urlparts.query);
+			log.debug('formulated %s request %s %s', xhr.method, urlparts.path, request);
+			//TODO: add gzip support
+	        //connection.putheader("Accept-Encoding", 'gzip');
+			//connection.endheaders();
+
+	        //write data to output stream if required
+			//TODO: if they have set the request header for a chunked
+			//request body, implement a chunked output stream
+	        if(data){
+	            if(data instanceof Document){
+	                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+	                    connection.send((new XMLSerializer()).serializeToString(data));
+	                }
+	            }else if(data.length&&data.length>0){
+	                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+	                    connection.send(data+'');
+	                }
+	            }
+	        }
+		}catch(e){
+			log.error("connection failed %s",e);
+			if (connection){
+				HTTPConnection.finish(connection);
+			}
+			connection = null;
+		}
+    }
+
+    if(connection){
+		log.debug('loading response from native ruby connection');
+		response = HTTPConnection.go(connection, request, xhr.headers, null);
+		log.debug('got response from native ruby connection');
+		headers = response[1];
+		response = response[0];
+        try{
+            // Stick the response headers into responseHeaders
+            for (var header in headers) {
+				log.debug('response header [%s] = %s', header, headers[header]);
+                xhr.responseHeaders[header] = headers[header];
+            }
+        }catch(e){
+            log.error('failed to load response headers \n%s',e);
+        }
+
+        xhr.readyState = 4;
+        xhr.status = parseInt(response.code,10) || undefined;
+        xhr.statusText = response.message || "";
+		log.info('%s %s %s %s', xhr.method, xhr.status, xhr.url, xhr.statusText);
+        contentEncoding = xhr.getResponseHeader('content-encoding') || "utf-8";
+        responseXML = null;
+
+        try{
+            //console.log('contentEncoding %s', contentEncoding);
+            if( contentEncoding.toLowerCase() == "gzip" ||
+                contentEncoding.toLowerCase() == "decompress"){
+                //zipped content
+                binary = true;
+				//TODO
+				log.debug('TODO: handle gzip compression');
+                xhr.responseText = response.body;
+            }else{
+                //this is a text file
+                xhr.responseText = response.body+'';
+            }
+        }catch(e){
+            log.warn('failed to open connection stream \n%s, %s %s %s',
+            	xhr.status, xhr.url, e.toString(), e
+			);
+        }finally{
+			if(connection){
+				HTTPConnection.finish(connection);
+			}
+		}
+
+
+    }
+
+    if(responseHandler){
+        log.debug('calling ajax response handler');
+        if(!xhr.async){
+			log.debug('calling sync response handler directly');
+			responseHandler();
+		}else{
+			log.debug('using setTimeout for async response handler');
+			setTimeout(responseHandler, 1);
+		}
+    }
+};
+
+})(/*Envjs.XMLHttpRequest.Johnson*/);
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/platform/spydermonkey.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/platform/spydermonkey.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/platform/spydermonkey.js	(revision 225)
@@ -0,0 +1,352 @@
+var __context__ = __this__;
+
+var Envjs = Envjs ||
+	require('./core').Envjs;
+	require('local_settings');
+
+Envjs.platform       = "SpyderMonkey";
+Envjs.revision       = sys.version.substring(0,5);
+
+Envjs.argv = []
+for(var i in sys.argv){
+    Envjs.argv.push(sys.argv[i]);
+}
+Envjs.argv.shift();
+Envjs.argv.shift();
+
+Envjs.exit = function(){
+	exit();
+};
+
+/*
+ * Envjs node-env.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+Envjs.log = print;
+
+Envjs.lineSource = function(e){
+    return "(line ?)";
+};
+
+Envjs.readConsole = function(){
+     return sys.stdin.readline();
+};
+
+Envjs.prompt = function(){
+    sys.stdout.write(Envjs.CURSOR+' ');
+    sys.stdout.flush();
+};
+
+//No REPL for
+Envjs.repl = function(){
+    console.log('Envjs REPL Not Available');
+};
+
+Envjs.eval = function(context, source, name){
+    if(context == __this__){
+        return global.execute( source );
+    }else{
+	    return context.execute( source );
+    }
+};
+
+/**
+ * synchronizes thread modifications
+ * @param {Function} fn
+ */
+Envjs.sync = function(fn){
+    /*return function(){
+        try{
+           //console.log('locking');
+           $lock.acquire();
+           fn.apply(fn, arguments);
+        }catch(e){
+            console.log('error in sync: %s',e);
+        }finally{
+           //console.log('unlocking');
+           $lock.release();
+        }
+    }*/
+    return fn;
+};
+
+Envjs.spawn = function(fn){
+    /*var t = threading.Thread();
+    t.run = function(){
+        try{
+            console.log('spawned');
+            fn.apply(fn, arguments);
+        }catch(e){
+            console.error(e);
+        }
+    }
+    return t.start();*/
+	fn();
+ };
+
+/**
+ * sleep thread for specified duration
+ * @param {Number} milliseconds
+ */
+Envjs.sleep = function(milliseconds){
+	return time.sleep(1.0*milliseconds/1000.0);
+};
+
+//Since we're running in spydermonkey I guess we can safely assume
+//java is not 'enabled'.  I'm sure this requires more thought
+//than I've given it here
+Envjs.javaEnabled = false;
+
+Envjs.homedir        = os.environ['HOME']
+Envjs.tmpdir         = os.environ['TMPDIR'];
+Envjs.os_name        = platform.system();
+Envjs.os_arch        = platform.processor();
+Envjs.os_version     = platform.release();
+Envjs.lang           = os.environ['LANG'];
+
+
+Envjs.gc = function(){ global.gc(); };
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent) {
+    try{
+        if(scope == __this__){
+            return scope;
+        }else{
+            return new_global();
+        }
+    }catch(e){
+        console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
+    }
+
+};
+
+(function(){
+
+var log = Envjs.logger('Envjs.XMLHttpRequest.SpyderMonkey');
+
+/**
+ * Get 'Current Working Directory'
+ */
+Envjs.getcwd = function() {
+    return os.getcwd();
+}
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} url
+ */
+Envjs.writeToFile = function(text, url){
+    var file = fopen(url, 'w');
+	file.write(text);
+	return;
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){
+    // Create temp file.
+    var temp = Envjs.tmpdir+"."+(new Date().getTime())+(suffix||'.js');
+    log.debug("writing text to temp url : %s ", temp);
+    Envjs.writeToFile(text, temp);
+    return temp;
+};
+
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+	log.debug('reading file %s', url);
+    var file = fopen(url, 'r'),
+		data = file.read();
+	return data;
+};
+
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){
+	if(/^file\:\/\//.test(url))
+		url = url.substring(7,url.length);
+	log.debug('deleting file %s', url);
+    return os.delete(url);
+};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){
+    var url = xhr.url,
+		urlparts = Envjs.urlsplit(xhr.url),
+        connection,
+		request,
+        header,
+        length,
+        binary = false,
+        name, value,
+        contentEncoding,
+        responseXML,
+        i;
+
+    if ( /^file\:/.test(url) ) {
+	    log.debug('establishing platform file connection');
+        Envjs.localXHR(url, xhr, connection, data);
+    } else {
+	    log.debug('establishing python platform network connection');
+		try{
+	        log.debug('connecting to %s \n\t port(%s) hostname(%s) path(%s) query(%s)',
+	            url, urlparts.port, urlparts.hostname, urlparts.path, urlparts.query);
+        	connection = httplib.HTTPConnection(urlparts.hostname, urlparts.port || 80);
+			connection.connect();
+			request = connection.putrequest(
+				xhr.method,
+				urlparts.path+(urlparts.query?'?'+urlparts.query:'')
+			);
+
+	        // Add headers to connection
+	        for (header in xhr.headers){
+	            log.debug('adding request header %s %s',header+'', xhr.headers[header]+'')
+	            connection.putheader(header+'', xhr.headers[header]+'');
+	        }
+			//TODO: add gzip support
+	        //connection.putheader("Accept-Encoding", 'gzip');
+			connection.endheaders();
+
+	        //write data to output stream if required
+			//TODO: if they have set the request header for a chunked
+			//request body, implement a chunked output stream
+	        if(data){
+	            if(data instanceof Document){
+	                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+	                    connection.send((new XMLSerializer()).serializeToString(data));
+	                }
+	            }else if(data.length&&data.length>0){
+	                if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+	                    connection.send(data+'');
+	                }
+	            }
+	        }
+		}catch(e){
+		    log.error('error making python native connection %s', e);
+			connection.close();
+			connection = null;
+		}
+    }
+
+    if(connection){
+        try{
+		    response = connection.getresponse();
+	        log.debug('got native platform connection response');
+            length = response.getheaders().length;
+            // Stick the response headers into responseHeaders
+            for (i = 0; i < length; i++) {
+				header = response.getheaders()[i];
+                name = header[0];
+                value = header[1];
+                if (name){
+	                log.debug('response header %s %s', name, value);
+                    xhr.responseHeaders[name+''] = value+'';
+                }
+            }
+        }catch(e){
+            console.log('failed to load response headers \n%s',e);
+        }
+
+        xhr.readyState = 4;
+        xhr.status = parseInt(response.status,10) || undefined;
+        xhr.statusText = response.reason || "";
+		log.info('%s %s %s %s', xhr.method, xhr.status, xhr.url, xhr.statusText);
+        contentEncoding = xhr.getResponseHeader('content-encoding') || "utf-8";
+        responseXML = null;
+
+        try{
+            //console.log('contentEncoding %s', contentEncoding);
+            if( contentEncoding.toLowerCase() == "gzip" ||
+                contentEncoding.toLowerCase() == "decompress"){
+                //zipped content
+                binary = true;
+				//TODO
+				console.log('TODO: handle gzip compression');
+                xhr.responseText = response.read();
+            }else{
+                //this is a text file
+                xhr.responseText = response.read();
+            }
+        }catch(e){
+            if (xhr.status == 404){
+                console.log('failed to open connection stream \n %s %s',
+                            e.toString(), e);
+            }else{
+                console.log('failed to open connection stream \n %s %s',
+                            e.toString(), e);
+            }
+        }finally{
+			connection.close();
+		}
+    }
+
+    if(responseHandler){
+        log.debug('calling ajax response handler');
+        if(!xhr.async){
+			responseHandler();
+		}else{
+			setTimeout(responseHandler, 1);
+		}
+    }
+};
+
+})(/*Envjs.Platform.SpyderMonkey*/);
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/rhino.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/rhino.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/rhino.js	(revision 225)
@@ -0,0 +1,91 @@
+// This file is compiled into the jar and executed automatically on startup.
+var __this__ = this;
+var require = (function() {
+    var cached = {};
+    var currentPath = java.lang.System.getProperty('user.dir');
+    var paths = [currentPath];
+    
+    function normalize(id) {
+		var file;
+        id = id + '.js';
+        if (/^\.\.?/.test(id)) {
+            // relative path
+            file = new java.io.File(currentPath, id);
+            if (file.isFile()) {
+                return file.toURL();
+            }
+        } else {
+            for (var i = 0, len = paths.length; i < len; ++i) {
+                file = new java.io.File(paths[i], id);
+                if (file.isFile()) {
+                    return file.toURL();
+                }
+            }
+            // try to get it from the jar as a last resort
+            /*var url = rhoop.getClass().getResource('/' + id);
+            if (url !== null) {
+                return url;
+            }*/
+        }
+        return undefined;
+    };
+    
+    function read(connection) {
+        var stream = connection.getInputStream();
+        var bytes = java.lang.reflect.Array.newInstance(
+                java.lang.Byte.TYPE, 4096);
+        var bytesStream = new java.io.ByteArrayOutputStream();
+        var bytesRead;
+        while ((bytesRead = stream.read(bytes)) >= 0) {
+            if (bytesRead > 0) {
+                bytesStream.write(bytes, 0, bytesRead);
+            }
+        }
+        return String(bytesStream.toString());
+    };
+    
+    function require(id) {
+		//print('require :'+ id);
+        var url = normalize(id);
+        if (!url) {
+            throw new Error("couldn't find module \"" + id + "\"");
+        }
+        id = String(url.toString());
+        if (!cached.hasOwnProperty(id)) {
+            var source = read(url.openConnection());
+            source = source.replace(/^\#\!.*/, '');
+            source = (
+                "(function (require, exports, module) { " + source + "\n});");
+            cached[id] = {
+                exports: {},
+                module: {
+                    id: id,
+                    uri: id
+                }
+            };
+            var previousPath = currentPath;
+            try {
+                currentPath = id.substr(0, id.lastIndexOf('/')) || '.';
+                var ctx = org.mozilla.javascript.Context.getCurrentContext();
+                var func = ctx.evaluateString({}, source, id, 1, null);
+                func(require, cached[id].exports, cached[id].module);
+            } finally {
+                currentPath = previousPath;
+            }
+        }
+		/*
+		print('returning exports for id: '+id+' '+cached[id].exports);
+		for(var prop in cached[id].exports){
+			print('export: '+prop);
+		}
+		*/
+        return cached[id].exports;
+    };
+    
+    require.paths = paths;
+    
+    return require;
+}());
+var __argv__ = arguments;
+require('./platform/rhino');
+require('./window');
Index: Dev/branches/Demo/d3/lib/env-js/envjs/rubyracer.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/rubyracer.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/rubyracer.js	(revision 225)
@@ -0,0 +1,72 @@
+// This file must be executed automatically on startup for ruby/v8 rubyracer support.
+var __this__ = this;
+var require = (function() {
+    var cached = {};
+    var currentPath = Ruby.ENV.PWD;
+    var paths = [currentPath];
+    
+	/*Ruby.puts("$PROGRAM_NAME " + Ruby.$PROGRAM_NAME)
+	Ruby.puts("Ruby.Config.ruby_version " + Ruby.Config.ruby_version)
+	Ruby.puts("Ruby.File " + Ruby.File)
+	Ruby.puts("Ruby.File.open " + Ruby.File.open)
+	Ruby.puts("Ruby.File equality " + (File === Ruby.File))
+	Ruby.puts("Ruby.File.open() " + Ruby.File.open('/tmp/t.tmp','r').read())*/
+	
+    function normalize(id) {
+		var file;
+        id = id + '.js';
+        if (/^\.\.?/.test(id)) {
+            // relative path
+			try{ return fopen(id, 'r') }catch(e){}
+        } else {
+            for (var i = 0, len = paths.length; i < len; ++i) {
+			    try{ return fopen(paths[i]+'/'+id, 'r') }catch(e){}
+            }
+        }
+        return undefined;
+    };
+    
+    
+    function require(id) {
+		//print('require :'+ id);
+        var file = normalize(id);
+        if (!file) {
+            throw new Error("couldn't find module \"" + id + "\"");
+        }
+        if (!cached.hasOwnProperty(id)) {
+			//print('loading '+id);
+            var source = file.read();
+            source = source.replace(/^\#\!.*/, '');
+            source = "(function (require, exports, module) { "+source+"\n});";
+            cached[id] = {
+                exports: {},
+                module: {
+                    id: id,
+                    uri: id
+                }
+            };
+            var previousPath = currentPath;
+            try {
+                currentPath = id.substr(0, id.lastIndexOf('/')) || '.';
+                var func = __this__.eval(source);
+                func(require, cached[id].exports, cached[id].module);
+            } finally {
+                currentPath = previousPath;
+            }
+        }
+		/*
+		print('returning exports for id: '+id+' '+cached[id].exports);
+		for(var prop in cached[id].exports){
+			print('export: '+prop);
+		}
+		*/
+        return cached[id].exports;
+    };
+    
+    require.paths = paths;
+    
+    return require;
+})();
+var __argv__ = Ruby.ARGV;
+require('./platform/rubyracer');
+require('./window');
Index: Dev/branches/Demo/d3/lib/env-js/envjs/rubyracer.rb
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/rubyracer.rb	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/rubyracer.rb	(revision 225)
@@ -0,0 +1,90 @@
+require 'v8'
+require 'net/http'
+require 'uri'
+require 'thread'
+
+include Config
+
+lock  = Mutex.new
+class Runtime
+  def new_context()
+    V8::Context.new
+  end
+  def configure_context(runtime, context)
+    ruby = {}
+    Module.included_modules.each{|m| 
+      #puts "adding module #{m}"
+      ruby[m.to_s] = m
+    }
+    Module.constants.each{|c| 
+      #puts "adding constant #{c}"
+      ruby[c.to_s] = Kernel.eval(c)
+    }
+    Kernel.global_variables.each{|g| 
+      #puts "adding global variable #{g}"
+      ruby[g.to_s] = Kernel.eval(g)
+    }
+    Kernel.methods.each{|m| 
+      #puts "adding global method #{m}"
+      ruby[m.to_s] = Kernel.method(m)
+    }
+    ruby['CONFIG'] = CONFIG
+    ruby['gc'] = lambda{ GC.start() }
+    context['Ruby']  = ruby
+    
+    context['__this__']  = context
+    context['File']      = File
+    #context['sync']      = lambda{|fn| Proc.new{|*args|lock.synchronize {fn.call(*args)}} }
+    context['sync']      = lambda{|fn| Proc.new{|*args| fn.call(*args) }}
+    #context['spawn']     = lambda{|fn| Thread.new {fn.call}}
+    context['spawn']     = lambda{|fn| fn.call}
+    context['print']     = lambda{|msg| puts msg}
+    context['fopen']     = lambda{|name, mode| File.open(name, mode)}
+    context['runtime']   = runtime
+    context['new_context']   = lambda{
+      rt = Runtime.new
+      ct = rt.new_context()
+      rt.configure_context(rt, ct)
+      ct['_eval'] = lambda{|script| ct.eval(script)}
+      ct.eval('var t = new Function(); t._eval = __this__._eval;t;') 
+    }
+    context['HTTPConnection'] = HTTPConnection.new
+  end
+end
+
+class HTTPConnection
+  def connect(host, port)
+    Net::HTTP.start(host, port)
+  end
+  def request(httpMethod, path)
+    case httpMethod
+    when "GET" then return Net::HTTP::Get.new(path) 
+    when "PUT" then return Net::HTTP::Put.new(path) 
+    when "POST" then return Net::HTTP::Post.new(path)
+    when "HEAD" then return Net::HTTP::Head.new(path)
+    when "DELETE" then return Net::HTTP::Delete.new(path)
+    else return nil
+    end
+  end
+  def go(connection, request, headers, data)
+    headers.each{|key,value| request.add_field(key,value)}
+    response, body = connection.request(request, data)
+    respheaders = Hash.new
+    response.each_header do |name, value|
+      respheaders.store(name, value)
+    end
+    response['body'] = body
+    [response, respheaders]
+  end
+  def finish(connection)
+    connection.finish if connection.started?
+  end
+end
+
+runtime = Runtime.new
+global = runtime.new_context()
+runtime.configure_context(runtime, global)
+envjs = ARGV[0]
+global.load(envjs)
+
+
Index: Dev/branches/Demo/d3/lib/env-js/envjs/spydermonkey.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/spydermonkey.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/spydermonkey.js	(revision 225)
@@ -0,0 +1,64 @@
+// This file must be executed automatically on startup for ruby/v8 rubyracer support.
+var __this__ = this;
+var require = (function() {
+    var cached = {};
+    var currentPath = os.getcwd();
+    var paths = [currentPath];
+    
+    function normalize(id) {
+		var file;
+        id = id + '.js';
+        if (/^\.\.?/.test(id)) {
+            // relative path
+			try{ return fopen(id, 'r') }catch(e){}
+        } else {
+            for (var i = 0, len = paths.length; i < len; ++i) {
+			    try{ return fopen(paths[i]+'/'+id, 'r') }catch(e){}
+            }
+        }
+        return undefined;
+    };
+    
+    
+    function require(id) {
+		//print('require :'+ id);
+        var file = normalize(id);
+        if (!file) {
+            throw new Error("couldn't find module \"" + id + "\"");
+        }
+        if (!cached.hasOwnProperty(id)) {
+			//print('loading '+id);
+            var source = file.read();
+            source = source.replace(/^\#\!.*/, '');
+            source = "(function (require, exports, module) { "+source+"\n});";
+            cached[id] = {
+                exports: {},
+                module: {
+                    id: id,
+                    uri: id
+                }
+            };
+            var previousPath = currentPath;
+            try {
+                currentPath = id.substr(0, id.lastIndexOf('/')) || '.';
+                var func = global.execute( source );
+                func(require, cached[id].exports, cached[id].module);
+            } finally {
+                currentPath = previousPath;
+            }
+        }
+		/*
+		print('returning exports for id: '+id+' '+cached[id].exports);
+		for(var prop in cached[id].exports){
+			print('export: '+prop);
+		}
+		*/
+        return cached[id].exports;
+    };
+    
+    require.paths = paths;
+    
+    return require;
+})();
+require('./platform/spydermonkey');
+require('./window');
Index: Dev/branches/Demo/d3/lib/env-js/envjs/spydermonkey.py
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/spydermonkey.py	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/spydermonkey.py	(revision 225)
@@ -0,0 +1,56 @@
+import spidermonkey
+import threading
+import platform
+import httplib
+import time
+import sys
+import os
+
+runtime = spidermonkey.Runtime()
+context = runtime.new_context()
+lock = threading.Lock()
+        
+def load(filename):
+    script = ''
+    f = open(filename, 'r')
+    script = f.read()
+    context.execute(script)
+    
+def _print(string):
+    print string    
+    
+def _open(url, mode):
+    return open(url, mode)
+
+def _exit():
+	return os._exit(1)
+	
+def new_global():
+	nc = runtime.new_context()
+	configure_context(nc)
+	return nc.execute('''
+		this.execute = global.execute;
+		this;
+	''')
+
+def configure_context(context):  
+	context.add_global('os', os)
+	context.add_global('sys', sys)
+	context.add_global('time', time)
+	context.add_global('$lock', lock);
+	context.add_global('exit', _exit)
+	context.add_global('fopen', _open)
+	context.add_global('print', _print)
+	context.add_global('httplib', httplib)
+	context.add_global('platform', platform)
+	context.add_global('threading', threading)
+	context.add_global('global', context)
+	context.add_global('runtime', runtime)
+	context.add_global('new_global', new_global)
+
+configure_context(context)
+ 
+if __name__=='__main__':
+    argv = sys.argv
+    if os.path.isfile( argv[1] ):
+        load(argv[1])
Index: Dev/branches/Demo/d3/lib/env-js/envjs/window.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/window.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/window.js	(revision 225)
@@ -0,0 +1,864 @@
+/*
+ * Envjs window.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+
+This module leaks the following global definitions.
+
+var Window,
+    Screen,
+    History,
+    Navigator;
+
+ */
+
+var Envjs               = Envjs             || require('./platform/core').Envjs,
+    DOMImplementation   = DOMImplementation || require('./dom').DOMImplementation,
+    HTMLDocument        = HTMLDocument      || require('./html').HTMLDocument,
+    HTMLFrameElement    = HTMLFrameElement  || require('./html').HTMLFrameElement,
+    HTMLIFrameElement   = HTMLIFrameElement || require('./html').HTMLIFrameElement,
+    HTMLParser          = HTMLParser        || require('./parser').HTMLParser,
+    Location            = Location          || require('./xhr').Location,
+    CSSRule             = CSSRule           || require('./css').CSSRule;
+
+
+/*
+ * Envjs window.1.3.pre03
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    }
+    return a;
+}
+
+/**
+ * Frame/Window Mixin
+ */
+(function(){
+
+var log = Envjs.logger();
+Envjs.once('tick', function(){
+	log = Envjs.logger('Envjs.HTML.Frame').
+		debug('html frame logger available');
+});
+
+__extend__(HTMLFrameElement.prototype,{
+
+    set src(value){
+        var event;
+        this.setAttribute('src', value);
+		//only load if we are already appended to the dom
+        if (this.parentNode && value && value.length > 0){
+            log.debug('loading frame via set src %s', value);
+            Envjs.loadFrame(this, Envjs.uri(value, this.ownerDocument?this.ownerDocument.location+'':null));
+        }
+    }
+
+});
+
+__extend__(HTMLIFrameElement.prototype, HTMLFrameElement.prototype);
+
+}(/*Frame/Window Mixin*/));
+
+/*
+ *  TODO: Document the History object via HTML5 spec
+ *
+ */
+(function(){
+
+var log = Envjs.logger();
+Envjs.once('tick', function(){
+	log = Envjs.logger('Envjs.Window.History').
+		debug('history logger available');
+});
+
+exports.History = History = function(owner) {
+    var $current = 0,
+        $history = [null],
+        $owner = owner;
+
+    return {
+        go : function(target) {
+            if (typeof target === "number") {
+                target = $current + target;
+                if (target > -1 && target < $history.length){
+                    if ($history[target].type === "hash") {
+                        if ($owner.location) {
+                            $owner.location.hash = $history[target].value;
+                        }
+                    } else {
+                        if ($owner.location) {
+                            $owner.location = $history[target].value;
+                        }
+                    }
+                    $current = target;
+                }
+            } else {
+                //TODO: walk through the history and find the 'best match'?
+            }
+        },
+
+        get length() {
+            return $history.length;
+        },
+
+        back : function(count) {
+            if (count) {
+                this.go(-count);
+            } else {
+                this.go(-1);
+            }
+        },
+
+        get current() {
+            return this.item($current);
+        },
+
+        get previous() {
+            return this.item($current-1);
+        },
+
+        forward : function(count) {
+            if (count) {
+                this.go(count);
+            } else {
+                this.go(1);
+            }
+        },
+
+        item: function(idx) {
+            if (idx >= 0 && idx < $history.length) {
+                return $history[idx];
+            } else {
+                return null;
+            }
+        },
+
+        add: function(newLocation, type) {
+            //not a standard interface, we expose it to simplify
+            //history state modifications
+            if (newLocation !== $history[$current]) {
+                $history.slice(0, $current);
+                $history.push({
+                    type: type || 'href',
+                    value: newLocation
+                });
+            }
+        }
+    };
+};
+
+}(/*History*/));
+
+
+/*
+ *      navigator.js
+ *  Browser Navigator
+ */
+
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+	log = Envjs.logger('Envjs.Window.Navigator').
+		debug('window navigator logger available');
+});
+
+exports.Navigator = Navigator = function(){
+	var $userAgent;
+    return {
+        get appCodeName(){
+            return Envjs.appCodeName;
+        },
+        get appName(){
+            return Envjs.appName;
+        },
+        get appVersion(){
+            return Envjs.version +" ("+
+                this.platform +"; "+
+                "U; "+//?
+                Envjs.os_name+" "+Envjs.os_arch+" "+Envjs.os_version+"; "+
+                (Envjs.lang?Envjs.lang:"en-US")+"; "+
+                "rv:"+Envjs.revision+
+                ")";
+        },
+        get cookieEnabled(){
+            return true;
+        },
+        get mimeTypes(){
+            return [];
+        },
+        get platform(){
+            return Envjs.platform;
+        },
+        get plugins(){
+            return [];
+        },
+        get userAgent(){
+            return $userAgent||(this.appCodeName + "/" + this.appVersion + " Resig/20070309 PilotFish/1.3.pre03");
+        },
+		set userAgent(agent){
+			if(agent){
+				$userAgent = agent;
+			}
+		},
+        javaEnabled : function(){
+            return Envjs.javaEnabled;
+        }
+    };
+};
+
+}());
+/**
+ * Screen
+ * @param {Object} __window__
+ */
+(function(){
+
+var log = Envjs.logger();
+
+Envjs.once('tick', function(){
+	log = Envjs.logger('Envjs.Window.Screen').
+		debug('window screen logger available');
+});
+
+exports.Screen = Screen = function(__window__){
+
+    var $availHeight  = 600,
+        $availWidth   = 800,
+        $colorDepth   = 16,
+        $pixelDepth   = 24,
+        $height       = 600,
+        $width        = 800,
+        $top          = 0,
+        $left         = 0,
+        $availTop     = 0,
+        $availLeft    = 0;
+
+	log.debug('extending window with screen properties');
+    __extend__( __window__, {
+        moveBy : function(dx,dy){
+            //TODO - modify $locals to reflect change
+        },
+        moveTo : function(x,y) {
+            //TODO - modify $locals to reflect change
+        },
+        /*print : function(){
+            //TODO - good global to modify to ensure print is not misused
+        };*/
+        resizeBy : function(dw, dh){
+            __window__.resizeTo($width + dw, $height + dh);
+        },
+        resizeTo : function(width, height){
+            $width = (width <= $availWidth) ? width : $availWidth;
+            $height = (height <= $availHeight) ? height : $availHeight;
+        },
+        scroll : function(x,y){
+            //TODO - modify $locals to reflect change
+        },
+        scrollBy : function(dx, dy){
+            //TODO - modify $locals to reflect change
+        },
+        scrollTo : function(x,y){
+            //TODO - modify $locals to reflect change
+        }
+    });
+
+	log.debug('creating screen');
+    return {
+        get top(){
+            return $top;
+        },
+        get left(){
+            return $left;
+        },
+        get availTop(){
+            return $availTop;
+        },
+        get availLeft(){
+            return $availLeft;
+        },
+        get availHeight(){
+            return $availHeight;
+        },
+        get availWidth(){
+            return $availWidth;
+        },
+        get colorDepth(){
+            return $colorDepth;
+        },
+        get pixelDepth(){
+            return $pixelDepth;
+        },
+        get height(){
+            return $height;
+        },
+        get width(){
+            return $width;
+        }
+    };
+};
+
+}(/*Screen*/));
+/*
+ * Copyright (c) 2010 Nick Galbreath
+ * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* base64 encode/decode compatible with window.btoa/atob
+ *
+ * window.atob/btoa is a Firefox extension to convert binary data (the "b")
+ * to base64 (ascii, the "a").
+ *
+ * It is also found in Safari and Chrome.  It is not available in IE.
+ *
+ * if (!window.btoa) window.btoa = base64.encode
+ * if (!window.atob) window.atob = base64.decode
+ *
+ * The original spec's for atob/btoa are a bit lacking
+ * https://developer.mozilla.org/en/DOM/window.atob
+ * https://developer.mozilla.org/en/DOM/window.btoa
+ *
+ * window.btoa and base64.encode takes a string where charCodeAt is [0,255]
+ * If any character is not [0,255], then an DOMException(5) is thrown.
+ *
+ * window.atob and base64.decode take a base64-encoded string
+ * If the input length is not a multiple of 4, or contains invalid characters
+ *   then an DOMException(5) is thrown.
+ */
+var base64 = {};
+base64.PADCHAR = '=';
+base64.ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+base64.makeDOMException = function() {
+    // sadly in FF,Safari,Chrome you can't make a DOMException
+    var e;
+
+    try {
+        return new DOMException(DOMException.INVALID_CHARACTER_ERR);
+    } catch (tmp) {
+        // not available, just passback a duck-typed equiv
+        // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error
+        // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/prototype
+        var ex = new Error("DOM Exception 5");
+
+        // ex.number and ex.description is IE-specific.
+        ex.code = ex.number = 5;
+        ex.name = ex.description = "INVALID_CHARACTER_ERR";
+
+        // Safari/Chrome output format
+        ex.toString = function() { return 'Error: ' + ex.name + ': ' + ex.message; };
+        return ex;
+    }
+};
+
+base64.getbyte64 = function(s,i) {
+    // This is oddly fast, except on Chrome/V8.
+    //  Minimal or no improvement in performance by using a
+    //   object with properties mapping chars to value (eg. 'A': 0)
+    var idx = base64.ALPHA.indexOf(s.charAt(i));
+    if (idx === -1) {
+        throw base64.makeDOMException();
+    }
+    return idx;
+};
+
+base64.decode = function(s) {
+    // convert to string
+    s = '' + s;
+    var getbyte64 = base64.getbyte64;
+    var pads, i, b10;
+    var imax = s.length;
+    if (imax === 0) {
+        return s;
+    }
+
+    if (imax % 4 !== 0) {
+        throw base64.makeDOMException();
+    }
+
+    pads = 0;
+    if (s.charAt(imax - 1) === base64.PADCHAR) {
+        pads = 1;
+        if (s.charAt(imax - 2) === base64.PADCHAR) {
+            pads = 2;
+        }
+        // either way, we want to ignore this last block
+        imax -= 4;
+    }
+
+    var x = [];
+    for (i = 0; i < imax; i += 4) {
+        b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) |
+            (getbyte64(s,i+2) << 6) | getbyte64(s,i+3);
+        x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff, b10 & 0xff));
+    }
+
+    switch (pads) {
+    case 1:
+        b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) | (getbyte64(s,i+2) << 6);
+        x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff));
+        break;
+    case 2:
+        b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12);
+        x.push(String.fromCharCode(b10 >> 16));
+        break;
+    }
+    return x.join('');
+};
+
+base64.getbyte = function(s,i) {
+    var x = s.charCodeAt(i);
+    if (x > 255) {
+        throw base64.makeDOMException();
+    }
+    return x;
+};
+
+base64.encode = function(s) {
+    if (arguments.length !== 1) {
+        throw new SyntaxError("Not enough arguments");
+    }
+    var padchar = base64.PADCHAR;
+    var alpha   = base64.ALPHA;
+    var getbyte = base64.getbyte;
+
+    var i, b10;
+    var x = [];
+
+    // convert to string
+    s = '' + s;
+
+    var imax = s.length - s.length % 3;
+
+    if (s.length === 0) {
+        return s;
+    }
+    for (i = 0; i < imax; i += 3) {
+        b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8) | getbyte(s,i+2);
+        x.push(alpha.charAt(b10 >> 18));
+        x.push(alpha.charAt((b10 >> 12) & 0x3F));
+        x.push(alpha.charAt((b10 >> 6) & 0x3f));
+        x.push(alpha.charAt(b10 & 0x3f));
+    }
+    switch (s.length - imax) {
+    case 1:
+        b10 = getbyte(s,i) << 16;
+        x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +
+               padchar + padchar);
+        break;
+    case 2:
+        b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8);
+        x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +
+               alpha.charAt((b10 >> 6) & 0x3f) + padchar);
+        break;
+    }
+    return x.join('');
+};
+
+
+(function(){
+
+var log = Envjs.logger('Envjs.Window');
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Window').
+        debug('window logger available');
+});
+
+//These descriptions of window properties are taken loosely David Flanagan's
+//'JavaScript - The Definitive Guide' (O'Reilly)
+
+var __top__ = function(_scope){
+    var _parent = _scope.parent;
+    while (_scope && _parent && _scope !== _parent) {
+        if (_parent === _parent.parent) {
+            break;
+        }
+        _parent = _parent.parent;
+        //console.log('scope %s _parent %s', scope, _parent);
+    }
+    return _parent || null;
+};
+
+/**
+ * Window
+ * @param {Object} scope
+ * @param {Object} parent
+ * @param {Object} opener
+ */
+exports.Window = Window = function(scope, parent, opener){
+
+    if(!scope){
+        scope = __this__;
+    }
+    if(!parent){
+        parent = scope;
+    }
+    // the window property is identical to the self property and to this obj
+    scope.__defineGetter__('window', function(){
+        return scope;
+    });
+
+    var $uuid = new Date().getTime()+'-'+Math.floor(Math.random()*1000000000000000);
+    Envjs.windows($uuid, scope);
+    //log.debug('opening window %s', $uuid);
+
+    // every window has one-and-only-one .document property which is always
+    // an [object HTMLDocument].  also, only window.document objects are
+    // html documents, all other documents created by the window.document are
+    // [object XMLDocument]
+    var $htmlImplementation =  new DOMImplementation();
+    $htmlImplementation.namespaceAware = true;
+    $htmlImplementation.errorChecking = false;
+
+    // read only reference to the Document object
+    var $document = new HTMLDocument($htmlImplementation, scope);
+
+    // A read-only reference to the Window object that contains this window
+    // or frame.  If the window is a top-level window, parent refers to
+    // the window itself.  If this window is a frame, this property refers
+    // to the window or frame that contains it.
+    var $parent = parent;
+
+    /**> $cookies - see cookie.js <*/
+    // read only boolean specifies whether the window has been closed
+    var $closed = false;
+
+    // a read/write string that specifies the default message that
+    // appears in the status line
+    var $defaultStatus = "Done";
+
+    // IE only, refers to the most recent event object - this maybe be
+    // removed after review
+    var $event = null;
+
+    // a read-only reference to the History object
+    var $history = new History();
+
+    // a read-only reference to the Location object.  the location object does
+    // expose read/write properties
+    var $location = new Location('about:blank', $document, $history);
+
+    // The name of window/frame. Set directly, when using open(), or in frameset.
+    // May be used when specifying the target attribute of links
+    var $name = null;
+
+    // a read-only reference to the Navigator object
+    var $navigator = new Navigator();
+
+    // a read/write reference to the Window object that contained the script
+    // that called open() to open this browser window.  This property is valid
+    // only for top-level window objects.
+    var $opener = opener?opener:null;
+
+    // read-only properties that specify the height and width, in pixels
+    var $innerHeight = 600, $innerWidth = 800;
+
+    // Read-only properties that specify the total height and width, in pixels,
+    // of the browser window. These dimensions include the height and width of
+    // the menu bar, toolbars, scrollbars, window borders and so on.  These
+    // properties are not supported by IE and IE offers no alternative
+    // properties;
+    var $outerHeight = $innerHeight,
+        $outerWidth = $innerWidth;
+
+    // Read-only properties that specify the number of pixels that the current
+    // document has been scrolled to the right and down.  These are not
+    // supported by IE.
+    var $pageXOffset = 0, $pageYOffset = 0;
+
+    // a read-only reference to the Screen object that specifies information
+    // about the screen: the number of available pixels and the number of
+    // available colors.
+    var $screen = new Screen(scope);
+
+    // read only properties that specify the coordinates of the upper-left
+    // corner of the screen.
+    var $screenX = 1,
+        $screenY = 1;
+    var $screenLeft = $screenX,
+        $screenTop = $screenY;
+
+    // a read/write string that specifies the current status line.
+    var $status = '';
+    __extend__(scope, EventTarget.prototype);
+
+    return __extend__( scope, {
+        get closed(){
+            return $closed;
+        },
+        get defaultStatus(){
+            return $defaultStatus;
+        },
+        set defaultStatus(defaultStatus){
+            $defaultStatus = defaultStatus;
+        },
+        get document(){
+            return $document;
+        },
+        set document(doc){
+            $document = doc;
+        },
+        /*
+        deprecated ie specific property probably not good to support
+        get event(){
+            return $event;
+        },
+        */
+        get frames(){
+            return $document.getElementsByTagName('frame');
+        },
+        get length(){
+            // should be frames.length,
+            return this.frames.length;
+        },
+        get history(){
+            return $history;
+        },
+        get innerHeight(){
+            return $innerHeight;
+        },
+        get innerWidth(){
+            return $innerWidth;
+        },
+        get clientHeight(){
+            return $innerHeight;
+        },
+        get clientWidth(){
+            return $innerWidth;
+        },
+        get location(){
+            return $location;
+        },
+        set location(url){
+            //very important or you will go into an infinite
+            //loop when creating a xml document
+            log.debug('setting window location %s', url);
+            if(url) {
+                $location.assign(Envjs.uri(url, $location+''));
+            }
+        },
+        get name(){
+            return $name;
+        },
+        set name(newName){
+            $name = newName;
+        },
+        get navigator(){
+            return $navigator;
+        },
+        get opener(){
+            return $opener;
+        },
+        get outerHeight(){
+            return $outerHeight;
+        },
+        get outerWidth(){
+            return $outerWidth;
+        },
+        get pageXOffest(){
+            return $pageXOffset;
+        },
+        get pageYOffset(){
+            return $pageYOffset;
+        },
+        get parent(){
+            return $parent;
+        },
+        get screen(){
+            return $screen;
+        },
+        get screenLeft(){
+            return $screenLeft;
+        },
+        get screenTop(){
+            return $screenTop;
+        },
+        get screenX(){
+            return $screenX;
+        },
+        get screenY(){
+            return $screenY;
+        },
+        get self(){
+            return scope;
+        },
+        get status(){
+            return $status;
+        },
+        set status(status){
+            $status = status;
+        },
+        // a read-only reference to the top-level window that contains this window.
+        // If this window is a top-level window it is simply a reference to itself.
+        // If this window is a frame, the top property refers to the top-level
+        // window that contains the frame.
+        get top(){
+            return __top__(scope);
+        },
+        get window(){
+            return this;
+        },
+        toString : function(){
+            return '[Window]';
+        },
+
+        /**
+         * getComputedStyle
+         *
+         * Firefox 3.6:
+         *  - Requires both elements to be present else an
+         *    exception is thrown.
+         *  - Returns a 'ComputedCSSStyleDeclaration' object.
+         *    while a raw element.style returns a 'CSSStyleDeclaration' object.
+         *  - Bogus input also throws exception
+         *
+         * Safari 4:
+         *  - Requires one argument (second can be MIA)
+         *  - Returns a CSSStyleDeclaration object
+         *  - if bad imput, returns null
+         *
+         * getComputedStyle should really be an "add on" from the css
+         * modules.  Unfortunately, 'window' comes way after the 'css'
+         * so css can't add it.
+         */
+        getComputedStyle: function(element, pseudoElement) {
+            return element.style;
+        },
+
+        open: function(url, name, features, replace){
+            if (features) {
+                console.log("'features argument not yet implemented");
+            }
+            var _window = Envjs.proxy({}),
+                open;
+            if(replace && name){
+                for(open in Envjs.windows()){
+                    if(open.name === name) {
+                        _window = open;
+                    }
+                }
+            }
+            var w = new Window(_window, _window, this);
+            if(name) {
+                _window.name = name;
+            }
+            _window.document.async = false;
+            _window.document.location.assign(Envjs.uri(url));
+            return _window;
+        },
+        close: function(){
+            log.debug('closing window %s', $uuid);
+            var frames = $document.getElementsByTagName('frame'),
+                iframes = $document.getElementsByTagName('iframe'),
+                i;
+            for(i=0;i<frames.length;i++){
+                Envjs.unloadFrame(frames[i]);
+            }
+            for(i=0;i<iframes.length;i++){
+                Envjs.unloadFrame(iframes[i]);
+            }
+            try{
+                Envjs.windows($uuid, null);
+            }catch(e){
+                log.error('%s',e);
+            }
+            return null;
+        },
+        alert : function(message){
+            Envjs.alert(message);
+        },
+        confirm : function(question){
+            Envjs.confirm(question);
+        },
+        prompt : function(message, defaultMsg){
+            Envjs.prompt(message, defaultMsg);
+        },
+        btoa: function(binary){
+            return base64.encode(binary);
+        },
+        atob: function(ascii){
+            return base64.decode(ascii);
+        },
+        //these should be undefined on instantiation
+        //onload: function(){},
+        //onunload: function(){},
+        focus: function(){},
+        blur: function(){},
+        get guid(){
+            return $uuid;
+        },
+        set guid(_guid){
+            $uuid = _guid;
+        }
+    });
+
+};
+
+//console.log('scheduling default window creation');
+setTimeout(function(){
+    var w = new Window(__this__);
+    log.info('[ %s ]', window.navigator.userAgent);
+},1);
+
+}(/*Window*/));
+
+
+//console.log('starting Envjs.eventLoop');
+Envjs.eventLoop();
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/envjs/xhr.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/envjs/xhr.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/envjs/xhr.js	(revision 225)
@@ -0,0 +1,566 @@
+
+/*
+ * Envjs xhr.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+/*
+ * Envjs xhr.1.3.pre03 
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ * 
+ * Parts of the implementation originally written by Yehuda Katz.
+ * 
+ * This file simply provides the global definitions we need to 
+ * be able to correctly implement to core browser (XML)HTTPRequest 
+ * interfaces.
+
+This module leaks the following global definitions. 
+
+var Location,
+    XMLHttpRequest;
+
+ */
+
+var Envjs = Envjs || require('./platform/core').Envjs,
+	Document = Document || require('./dom').Document;
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+    for ( var i in b ) {
+        if(b.hasOwnProperty(i)){
+            var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+            if ( g || s ) {
+                if ( g ) { a.__defineGetter__(i, g); }
+                if ( s ) { a.__defineSetter__(i, s); }
+            } else {
+                a[i] = b[i];
+            }
+        }
+    } 
+    return a;
+}
+
+/**
+ * These functions require network IO provided by XMLHttpRequest
+ */
+(function(){
+	
+var log = Envjs.logger();	
+Envjs.once('tick', function(){
+	log = Envjs.logger('Envjs.DOM.Document').
+		info('doc logger available');
+});
+
+__extend__(Document.prototype,{
+    load: function(url){
+        if(this.documentURI == 'about:html'){
+            this.location.assign(url);
+        }else if(this.documentURI == url){
+            this.location.reload(false);
+        }else{
+            this.location.replace(url);
+        }
+    },
+    get location(){
+        return this.ownerWindow.location;
+    },
+    set location(url){
+        //very important or you will go into an infinite
+        //loop when creating a xml document
+        this.ownerWindow.location = url;
+    }
+});
+
+}(/*Document/Location Mixin*/));
+/**
+ * Location
+ *
+ * Mozilla MDC:
+ * https://developer.mozilla.org/En/DOM/Window.location
+ * https://developer.mozilla.org/en/DOM/document.location
+ *
+ * HTML5: 6.10.4 The Location interface
+ * http://dev.w3.org/html5/spec/Overview.html#location
+ *
+ * HTML5: 2.5.3 Interfaces for URL manipulation
+ * http://dev.w3.org/html5/spec/Overview.html#url-decomposition-idl-attributes
+ * All of section 2.5 is worth reading, but 2.5.3 contains very
+ * detailed information on how getters/setter should work
+ *
+ * NOT IMPLEMENTED:
+ *  HTML5: Section 6.10.4.1 Security -- prevents scripts from another domain
+ *   from accessing most of the 'Location'
+ *  Not sure if anyone implements this in HTML4
+ */
+(function(){
+    
+var log = Envjs.logger();
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.Location').
+        debug('location logger available');
+});
+    
+exports.Location = Location = function(url, doc, history) {
+    log = log||Envjs.logger('Envjs.Location');
+    log.debug('Location url %s', url);
+    var $url = url,
+        $document = doc ? doc : null,
+        $history = history ? history : null;
+
+    var parts = Envjs.urlsplit($url);
+
+    return {
+        get hash() {
+            return parts.fragment ? '#' + parts.fragment : parts.fragment;
+        },
+        set hash(s) {
+            if (s[0] === '#') {
+                parts.fragment = s.substr(1);
+            } else {
+                parts.fragment = s;
+            }
+            $url = Envjs.urlunsplit(parts);
+            if ($history) {
+                $history.add($url, 'hash');
+            }
+        },
+
+        get host() {
+            return parts.netloc;
+        },
+        set host(s) {
+            if (!s || s === '') {
+                return;
+            }
+
+            parts.netloc = s;
+            $url = Envjs.urlunsplit(parts);
+
+            // this regenerates hostname & port
+            parts = Envjs.urlsplit($url);
+
+            if ($history) {
+                $history.add( $url, 'host');
+            }
+            this.assign($url);
+        },
+
+        get hostname() {
+            return parts.hostname;
+        },
+        set hostname(s) {
+            if (!s || s === '') {
+                return;
+            }
+
+            parts.netloc = s;
+            if (parts.port != '') {
+                parts.netloc += ':' + parts.port;
+            }
+            parts.hostname = s;
+            $url = Envjs.urlunsplit(parts);
+            if ($history) {
+                $history.add( $url, 'hostname');
+            }
+            this.assign($url);
+        },
+
+        get href() {
+            return $url;
+        },
+        set href(url) {
+            $url = url;
+            if ($history) {
+                $history.add($url, 'href');
+            }
+            this.assign($url);
+        },
+
+        get pathname() {
+            return parts.path;
+        },
+        set pathname(s) {
+            if (s[0] === '/') {
+                parts.path = s;
+            } else {
+                parts.path = '/' + s;
+            }
+            $url = Envjs.urlunsplit(parts);
+
+            if ($history) {
+                $history.add($url, 'pathname');
+            }
+            this.assign($url);
+        },
+
+        get port() {
+            // make sure it's a string
+            return '' + parts.port;
+        },
+        set port(p) {
+            // make a string
+            var s = '' + p;
+            parts.port = s;
+            parts.netloc = parts.hostname + ':' + parts.port;
+            $url = Envjs.urlunsplit(parts);
+            if ($history) {
+                $history.add( $url, 'port');
+            }
+            this.assign($url);
+        },
+
+        get protocol() {
+            return parts.scheme + ':';
+        },
+        set protocol(s) {
+            var i = s.indexOf(':');
+            if (i != -1) {
+                s = s.substr(0,i);
+            }
+            parts.scheme = s;
+            $url = Envjs.urlunsplit(parts);
+            if ($history) {
+                $history.add($url, 'protocol');
+            }
+            this.assign($url);
+        },
+
+        get search() {
+            return (parts.query) ? '?' + parts.query : parts.query;
+        },
+        set search(s) {
+            if (s[0] == '?') {
+                s = s.substr(1);
+            }
+            parts.query = s;
+            $url = Envjs.urlunsplit(parts);
+            if ($history) {
+                $history.add($url, 'search');
+            }
+            this.assign($url);
+        },
+
+        toString: function() {
+            return $url;
+        },
+
+        assign: function(url, /*non-standard*/ method, data) {
+            var _this = this,
+                xhr,
+                event;
+            method = method||"GET";
+            data = data||null;
+            log.debug('assigning %s',url);
+
+            //we can only assign if this Location is associated with a document
+            if ($document) {
+                log.debug('fetching %s (async? %s)', url, $document.async);
+                xhr = new XMLHttpRequest();
+                
+                xhr.setRequestHeader('Referer', $document.location);
+                log.debug("REFERER: %s", $document.location);
+                // TODO: make async flag a Envjs paramter
+                xhr.open(method, url, false);//$document.async);
+
+                // TODO: is there a better way to test if a node is an HTMLDocument?
+                if ($document.toString() === '[object HTMLDocument]') {
+                    //tell the xhr to not parse the document as XML
+                    log.debug('loading html document');
+                    xhr.onreadystatechange = function() {
+                        log.debug('readyState %s', xhr.readyState);
+                        if (xhr.readyState === 4) {
+                            switch(xhr.status){
+                            case 301:
+                            case 302:
+                            case 303:
+                            case 305:
+                            case 307:
+                                log.debug('status is not good for assignment %s', xhr.status);
+                                break;
+                            default:
+                                log.debug('status is good for assignment %s', xhr.status);
+                                $url = xhr.url;
+                                parts = Envjs.urlsplit($url);
+                                log.debug('new document location %s', xhr.url);
+                                Envjs.exchangeHTMLDocument($document, xhr.responseText, xhr.url);
+                            }
+                        }
+                    };
+                    try{
+                        xhr.send(data, false);//dont parse html
+                    }catch(e){
+                        log.debug('failed to load content %s', e);
+                        Envjs.exchangeHTMLDocument(
+                            $document, 
+                            "<html><head><title>Error Loading</title></head><body>"+e+"</body></html>",
+                            xhr.url
+                        );
+                    }
+                } else {
+                    //Treat as an XMLDocument
+                    xhr.onreadystatechange = function() {
+                        if (xhr.readyState === 4) {
+                            log.debug('exchanging xml content %s', e);
+                            $document = xhr.responseXML;
+                            $document.baseURI = xhr.url;
+                            if ($document.createEvent) {
+                                event = $document.createEvent('Event');
+                                event.initEvent('DOMContentLoaded');
+                                $document.dispatchEvent( event, false );
+                            }
+                        }
+                    };
+                    xhr.send();
+                }
+            }//end if($document)
+        },
+        reload: function(forceget) {
+            //for now we have no caching so just proxy to assign
+            log.debug('reloading %s',$url);
+            this.assign($url);
+        },
+        replace: function(url, /*non-standard*/ method, data) {
+            this.assign(url, method, data);
+        }
+    };
+};
+
+}(/*Location*/));
+/**
+ *
+ * @class XMLHttpRequest
+ * @author Originally implemented by Yehuda Katz
+ *
+ */
+    
+(function(){
+    
+// this implementation can be used without requiring a DOMParser
+// assuming you dont try to use it to get xml/html documents
+var domparser,
+    log = Envjs.logger();
+    
+Envjs.once('tick', function(){
+    log = Envjs.logger('Envjs.XMLHttpRequest').
+        debug('xhr logger available');
+});
+
+exports.XMLHttpRequest = XMLHttpRequest = function(){
+    this.headers = {};
+    this.responseHeaders = {};
+    this.aborted = false;//non-standard
+};
+
+// defined by the standard: http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest
+// but not provided by Firefox.  Safari and others do define it.
+XMLHttpRequest.UNSENT = 0;
+XMLHttpRequest.OPEN = 1;
+XMLHttpRequest.HEADERS_RECEIVED = 2;
+XMLHttpRequest.LOADING = 3;
+XMLHttpRequest.DONE = 4;
+
+XMLHttpRequest.prototype = {
+    open: function(method, url, async, user, password){
+        log.debug('opening xhr %s %s %s', method, url, async);
+        this.readyState = 1;
+        this.async = (async === false)?false:true;
+        this.method = method || "GET";
+        this.url = Envjs.uri(url);
+        this.onreadystatechange();
+    },
+    setRequestHeader: function(header, value){
+        this.headers[header] = value;
+    },
+    send: function(data, parsedoc/*non-standard*/, redirect_count){
+        var _this = this;
+        log.debug('sending request for url %s', this.url);
+        parsedoc = (parsedoc === undefined)?true:!!parsedoc;
+        redirect_count = (redirect_count === undefined) ? 0 : redirect_count;
+        function makeRequest(){
+            var cookie = Envjs.getCookies(_this.url),
+                redirecting = false;
+            if(cookie){
+                _this.setRequestHeader('COOKIE', cookie);
+            }
+            if(window&&window.navigator&&window.navigator.userAgent){
+                _this.setRequestHeader('User-Agent', window.navigator.userAgent);
+            }
+            
+            log.debug('establishing platform native connection %s', _this.url);
+            Envjs.connection(_this, function(){
+                log.debug('callback remove xhr from network queue');
+                Envjs.connections.removeConnection(_this);
+                if (!_this.aborted){
+                    var doc = null,
+                        domparser,
+                        cookie,
+                        contentType,
+                        location;
+                    
+                    try{
+                        cookie = _this.getResponseHeader('SET-COOKIE');
+                        if(cookie){
+                            Envjs.setCookie(_this.url, cookie);
+                        }
+                    }catch(e){
+                        log.warn("Failed to set cookie");
+                    }
+                    //console.log('status : %s', _this.status);
+                    switch(_this.status){
+                        case 301:
+                        case 302:
+                        case 303:
+                        case 305:
+                        case 307:
+                        if(_this.getResponseHeader('Location') && redirect_count < 20){
+                            //follow redirect and copy headers
+                            redirecting = true;
+                            location = _this.getResponseHeader('Location');
+                            log.debug('following %s redirect %s from %s url %s', 
+                                redirect_count, 
+                                _this.status, 
+                                _this.url, 
+                                location);
+                            _this.url = Envjs.uri(location);
+                            //remove current cookie headers to allow the redirect to determine
+                            //the currect cookie based on the new location
+                            if('Cookie' in _this.headers ){
+                                delete _this.headers.Cookie;
+                            }
+                            if('Cookie2' in _this.headers ){
+                                delete _this.headers.Cookie2;
+                            }
+                            redirect_count++;
+                            if (_this.async){
+                                //TODO: see TODO notes below
+                                Envjs.runAsync(makeRequest);
+                            }else{
+                                makeRequest();
+                            }
+                            return;
+                        }break;
+                        default:
+                        // try to parse the document if we havent explicitly set a
+                        // flag saying not to and if we can assure the text at least
+                        // starts with valid xml
+                        contentType = _this.getResponseHeader('Content-Type');
+                        log.debug("response content-type : %s", contentType);
+                        if ( parsedoc && 
+                             contentType && 
+                             contentType.indexOf('xml') > -1 &&
+                            _this.responseText.match(/^\s*</) ) {
+    
+                            domparser = domparser||new DOMParser();
+                            try {
+                                log.debug("parsing response text into xml document");
+                                doc = domparser.parseFromString(_this.responseText+"", 'text/xml');
+                            } catch(ee) {
+                                //Envjs.error('response XML does not appear to be well formed xml', e);
+                                log.error('parseerror \n%s', ee);
+                                doc = document.implementation.createDocument('','error',null);
+                                doc.appendChild(doc.createTextNode(ee+''));
+                            }
+
+                        }else{
+                            log.debug('response XML does not appear to be xml');
+                        }
+
+                        _this.__defineGetter__("responseXML", function(){
+                            return doc;
+                        });
+                            
+                    }
+                }
+            }, data);
+
+            if (!_this.aborted  && !redirecting){
+                log.debug('did not abort and not redirecting so calling onreadystatechange');
+                _this.onreadystatechange();
+            }
+
+        }//end makeRequest
+        
+        log.debug('requesting async: %s', this.url);
+        Envjs.connections.addConnection(this);
+        if (this.async){
+            //DONE: what we really need to do here is rejoin the
+            //      current thread and call onreadystatechange via
+            //      setTimeout so the callback is essentially applied
+            //      at the end of the current callstack
+            Envjs.runAsync(makeRequest);
+        }else{
+            log.debug('requesting sync: %s', this.url);
+            makeRequest();
+        }
+    },
+    abort: function(){
+        this.aborted = true;
+    },
+    onreadystatechange: function(){
+        //Instance specific
+    },
+    getResponseHeader: function(header){
+        log.debug('getting response header %s', header);
+        var rHeader, returnedHeaders;
+        if (this.readyState < 3){
+            throw new Error("INVALID_STATE_ERR");
+        } else {
+            returnedHeaders = [];
+            log.debug('searching response headers for %s ', header);
+            for (rHeader in this.responseHeaders) {
+                if ((rHeader+'').match(new RegExp(header, "i"))) {
+                    log.debug('found response header, %s is %s', rHeader, header);
+                    returnedHeaders.push(this.responseHeaders[rHeader]);
+                }
+            }
+
+            if (returnedHeaders.length){
+                returnedHeaders = returnedHeaders.join(", ");
+                log.debug('got response header %s', returnedHeaders);
+                return returnedHeaders;
+            }
+        }   
+        return null;
+    },
+    getAllResponseHeaders: function(){
+        var header, returnedHeaders = [];
+        if (this.readyState < 3){
+            throw new Error("INVALID_STATE_ERR");
+        } else {
+            for (header in this.responseHeaders) {
+                if(this.responseHeader.hasOwnProperty(header)){
+                    returnedHeaders.push( header + ": " + this.responseHeaders[header] );
+                }
+            }
+        }
+        return returnedHeaders.join("\r\n");
+    },
+    async: true,
+    readyState: 0,
+    responseText: "",
+    status: 0,
+    statusText: ""
+};
+
+}(/*XMLHttpREquest*/));
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
Index: Dev/branches/Demo/d3/lib/env-js/local_settings.js
===================================================================
--- Dev/branches/Demo/d3/lib/env-js/local_settings.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/env-js/local_settings.js	(revision 225)
@@ -0,0 +1,39 @@
+
+/**
+ *  This file provides local settings you'll need to modify to make sure
+ *  envjs platform tests can function properly.  Dont modify this
+ *  file directly, copy it to local_settings.js and then modify it so
+ *  as not to commit your local settings back to the repo.
+ */
+
+var SETTINGS = { 
+    BASE_URI : 'file:///mnt/repos/thatcher/env-js/',
+    AJAX_BASE: 'http://github.com/thatcher/env-js/raw/master/',
+    LOCAL_PORT: '8080',
+    APP_CONTEXT: '/env-js/'
+}; 
+
+
+Envjs.config('logging',[
+	{category:'Envjs.Core',  				level:'WARN'},
+	{category:'Envjs.Core.REPL',        	level:'WARN'},
+	{category:'Envjs.DOM',  				level:'WARN'},
+	{category:'Envjs.DOM.Node',  			level:'WARN'},
+	{category:'Envjs.DOM.NodeList',  		level:'WARN'},
+	{category:'Envjs.DOM.NamedNodeMap', 	level:'WARN'},
+	{category:'Envjs.DOM.NamespacedNodeMap',level:'WARN'},
+	{category:'Envjs.DOM.Element',  		level:'WARN'},
+	{category:'Envjs.DOM.Document',  		level:'WARN'},
+	{category:'Envjs.DOM.EventTarget',  	level:'WARN'},
+	{category:'Envjs.Timer',            	level:'WARN'},
+	{category:'Envjs.Location',  			level:'WARN'},
+	{category:'Envjs.XMLHttpRequest',  		level:'INFO'},
+	{category:'Envjs.Parser',  	        	level:'WARN'},
+	{category:'Envjs.Parser.HTMLParser',	level:'WARN'},
+	{category:'Envjs.Parser.XMLParser', 	level:'WARN'},
+	{category:'Envjs.HTML.Frame',			level:'WARN'},
+	{category:'Envjs.Window',  				level:'WARN'},
+	{category:'Envjs.Platform',  			level:'WARN'},
+	{category:'Envjs.Platform.Johnson',   	level:'WARN'},
+	{category:'root', 		 				level:'WARN'}
+]);
Index: Dev/branches/Demo/d3/lib/jit/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/jit/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/jit/LICENSE	(revision 225)
@@ -0,0 +1,27 @@
+Copyright (c) 2010, Nicolas Garcia Belmonte
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the organization nor the names of its contributors may
+  be used to endorse or promote products derived from this software without
+  specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY NICOLAS GARCIA BELMONTE ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL NICOLAS GARCIA BELMONTE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: Dev/branches/Demo/d3/lib/jquery-ui/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/jquery-ui/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/jquery-ui/LICENSE	(revision 225)
@@ -0,0 +1,25 @@
+Copyright (c) 2010 Paul Bakaus, http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: Dev/branches/Demo/d3/lib/jquery-ui/jquery-ui.css
===================================================================
--- Dev/branches/Demo/d3/lib/jquery-ui/jquery-ui.css	(revision 225)
+++ Dev/branches/Demo/d3/lib/jquery-ui/jquery-ui.css	(revision 225)
@@ -0,0 +1,318 @@
+/*
+ * jQuery UI CSS Framework 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* 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%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
+.ui-widget-content a { color: #333333; }
+.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
+.ui-widget-header a { color: #ffffff; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-right {  -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
+.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
+ * jQuery UI Slider 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
Index: Dev/branches/Demo/d3/lib/jquery-ui/jquery-ui.min.js
===================================================================
--- Dev/branches/Demo/d3/lib/jquery-ui/jquery-ui.min.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/jquery-ui/jquery-ui.min.js	(revision 225)
@@ -0,0 +1,83 @@
+/*!
+ * jQuery UI 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.6",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
+NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
+"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
+if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
+"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,
+d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
+c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&
+b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
+;/*!
+ * jQuery UI Widget 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
+a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
+e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
+this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
+widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
+enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
+;/*!
+ * jQuery UI Mouse 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ *	jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&
+this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();
+return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&
+this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
+a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+;/*
+ * jQuery UI Slider 1.8.6
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");b.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
+this.range=d([]);if(b.range){if(b.range===true){this.range=d("<div></div>");if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(b.range==="min"||b.range==="max")this.range.addClass("ui-slider-range-"+b.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
+if(b.values&&b.values.length)for(;d(".ui-slider-handle",this.element).length<b.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();
+else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!a.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=
+false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");h=a._start(c,f);if(h===false)return}break}i=a.options.step;h=a.options.values&&a.options.values.length?(g=a.values(f)):(g=a.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=a._valueMin();break;case d.ui.keyCode.END:g=a._valueMax();break;case d.ui.keyCode.PAGE_UP:g=a._trimAlignValue(h+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=a._trimAlignValue(h-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===
+a._valueMax())return;g=a._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===a._valueMin())return;g=a._trimAlignValue(h-i);break}a._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(c,e);a._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
+this._mouseDestroy();return this},_mouseCapture:function(a){var b=this.options,c,e,f,h,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(b.range===true&&this.values(1)===b.min){g+=1;f=d(this.handles[g])}if(this._start(a,
+g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();b=f.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-f.width()/2,top:a.pageY-b.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b=
+this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b=
+this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);
+c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var e;if(this.options.values&&this.options.values.length){e=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>e||b===1&&c<e))c=e;if(c!==this.values(b)){e=this.values();e[b]=c;a=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e});this.values(b?0:1);a!==false&&this.values(b,c,true)}}else if(c!==this.value()){a=this._trigger("slide",a,{handle:this.handles[b],value:c});
+a!==false&&this.value(c)}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=
+this._trimAlignValue(a);this._refreshValue();this._change(null,0)}return this._value()},values:function(a,b){var c,e,f;if(arguments.length>1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):this.value();
+else return this._values()},_setOption:function(a,b){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case "disabled":if(b){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
+this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];
+return b=this._trimAlignValue(b)}else{b=this.options.values.slice();for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);return b}},_trimAlignValue:function(a){if(a<this._valueMin())return this._valueMin();if(a>this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=a%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=
+this.options.range,b=this.options,c=this,e=!this._animateOff?b.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},b.animate);if(k===1)c.range[e?"animate":"css"]({width:f-
+g+"%"},{queue:false,duration:b.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},b.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:b.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},
+b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.6"})})(jQuery);
+;
Index: Dev/branches/Demo/d3/lib/jquery/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/jquery/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/jquery/LICENSE	(revision 225)
@@ -0,0 +1,20 @@
+Copyright (c) 2010 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: Dev/branches/Demo/d3/lib/jquery/jquery.js
===================================================================
--- Dev/branches/Demo/d3/lib/jquery/jquery.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/jquery/jquery.js	(revision 225)
@@ -0,0 +1,6883 @@
+/*!
+ * jQuery JavaScript Library v1.4.3
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Oct 14 23:10:06 2010 -0400
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// 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.$,
+
+	// 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/,
+	rwhite = /\s/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Check for non-word characters
+	rnonword = /\W/,
+
+	// Check for digits
+	rdigit = /\d/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// 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,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+	
+	// [[Class]] -> type pairs
+	class2type = {};
+
+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;
+		}
+		
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = "body";
+			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 = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
+					}
+					
+					return jQuery.merge( this, selector );
+					
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// 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 && !rnonword.test( selector ) ) {
+				this.selector = selector;
+				this.context = document;
+				selector = document.getElementsByTagName( selector );
+				return jQuery.merge( this, 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.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.4.3",
+
+	// 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();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+		
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// 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;
+	},
+
+	// 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, copyIsArray;
+
+	// 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 plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// 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,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+	
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// A third-party is pushing the ready event forwards
+		if ( wait === true ) {
+			jQuery.readyWait--;
+		}
+
+		// Make sure that the DOM is not already loaded
+		if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// 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" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// 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 jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	// A crude way of determining if an object is a window
+	isWindow: function( obj ) {
+		return obj && typeof obj === "object" && "setInterval" in obj;
+	},
+
+	isNaN: function( obj ) {
+		return obj == null || !rdigit.test( obj ) || isNaN( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	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 || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+		
+		// Not own constructor property must be Object
+		if ( obj.constructor &&
+			!hasOwn.call(obj, "constructor") &&
+			!hasOwn.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 || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+	
+	error: function( msg ) {
+		throw msg;
+	},
+	
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+		
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test(data.replace(rvalidescape, "@")
+			.replace(rvalidtokens, "]")
+			.replace(rvalidbraces, "")) ) {
+
+			// Try to use the native JSON parser first
+			return window.JSON && window.JSON.parse ?
+				window.JSON.parse( data ) :
+				(new Function("return " + data))();
+
+		} else {
+			jQuery.error( "Invalid JSON: " + data );
+		}
+	},
+
+	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;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// 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)
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type(array);
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				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 = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				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;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can be optionally by executed if its a function
+	access: function( elems, key, value, exec, fn, pass ) {
+		var length = elems.length;
+	
+		// Setting many attributes
+		if ( typeof key === "object" ) {
+			for ( var k in key ) {
+				jQuery.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 ) : undefined;
+	},
+
+	now: function() {
+		return (new Date()).getTime();
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+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 );
+	};
+}
+
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// 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(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+	jQuery.support = {};
+
+	var root = document.documentElement,
+		script = document.createElement("script"),
+		div = document.createElement("div"),
+		id = "script" + jQuery.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],
+		select = document.createElement("select"),
+		opt = select.appendChild( document.createElement("option") );
+
+	// 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: opt.selected,
+
+		// Will be defined later
+		optDisabled: false,
+		checkClone: false,
+		scriptEval: false,
+		noCloneEvent: true,
+		boxModel: null,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableHiddenOffsets: true
+	};
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as diabled)
+	select.disabled = true;
+	jQuery.support.optDisabled = !opt.disabled;
+
+	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");
+	}
+
+	div = document.createElement("div");
+	div.innerHTML = "<input type='radio' name='radiotest' checked='checked'/>";
+
+	var fragment = document.createDocumentFragment();
+	fragment.appendChild( div.firstChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+	// Figure out if the W3C box model works as expected
+	// document.body must exist before we can do this
+	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;
+
+		if ( "zoom" in div.style ) {
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			// (IE < 8 does this)
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "";
+			div.innerHTML = "<div style='width:4px;'></div>";
+			jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+		}
+
+		div.innerHTML = "<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";
+		var tds = div.getElementsByTagName("td");
+
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		// (only IE 8 fails this test)
+		jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+		tds[0].style.display = "";
+		tds[1].style.display = "none";
+
+		// Check if empty table cells still have offsetWidth/Height
+		// (IE < 8 fail this test)
+		jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+		div.innerHTML = "";
+
+		document.body.removeChild( div ).style.display = "none";
+		div = tds = 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 windowData = {},
+	rbrace = /^(?:\{.*\}|\[.*\])$/;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page	
+	expando: "jQuery" + jQuery.now(),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	data: function( elem, name, data ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		elem = elem == window ?
+			windowData :
+			elem;
+
+		var isNode = elem.nodeType,
+			id = isNode ? elem[ jQuery.expando ] : null,
+			cache = jQuery.cache, thisCache;
+
+		if ( isNode && !id && typeof name === "string" && data === undefined ) {
+			return;
+		}
+
+		// Get the data from the object directly
+		if ( !isNode ) {
+			cache = elem;
+
+		// Compute a unique ID for the element
+		} else if ( !id ) {
+			elem[ jQuery.expando ] = id = ++jQuery.uuid;
+		}
+
+		// Avoid generating a new cache unless none exists and we
+		// want to manipulate it.
+		if ( typeof name === "object" ) {
+			if ( isNode ) {
+				cache[ id ] = jQuery.extend(cache[ id ], name);
+
+			} else {
+				jQuery.extend( cache, name );
+			}
+
+		} else if ( isNode && !cache[ id ] ) {
+			cache[ id ] = {};
+		}
+
+		thisCache = isNode ? cache[ id ] : cache;
+
+		// Prevent overriding the named cache with undefined values
+		if ( data !== undefined ) {
+			thisCache[ name ] = data;
+		}
+
+		return typeof name === "string" ? thisCache[ name ] : thisCache;
+	},
+
+	removeData: function( elem, name ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		elem = elem == window ?
+			windowData :
+			elem;
+
+		var isNode = elem.nodeType,
+			id = isNode ? elem[ jQuery.expando ] : elem,
+			cache = jQuery.cache,
+			thisCache = isNode ? cache[ id ] : 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 ( isNode && jQuery.isEmptyObject(thisCache) ) {
+					jQuery.removeData( elem );
+				}
+			}
+
+		// Otherwise, we want to remove all of the element's data
+		} else {
+			if ( isNode && jQuery.support.deleteExpando ) {
+				delete elem[ jQuery.expando ];
+
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( jQuery.expando );
+
+			// Completely remove the data cache
+			} else if ( isNode ) {
+				delete cache[ id ];
+
+			// Remove all fields from the object
+			} else {
+				for ( var n in elem ) {
+					delete elem[ n ];
+				}
+			}
+		}
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		if ( typeof key === "undefined" ) {
+			return this.length ? jQuery.data( this[0] ) : null;
+
+		} 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]]);
+
+			// Try to fetch any internally stored data first
+			if ( data === undefined && this.length ) {
+				data = jQuery.data( this[0], key );
+
+				// If nothing was found internally, try to fetch any
+				// data from the HTML5 data-* attribute
+				if ( data === undefined && this[0].nodeType === 1 ) {
+					data = this[0].getAttribute( "data-" + key );
+
+					if ( typeof data === "string" ) {
+						try {
+							data = data === "true" ? true :
+								data === "false" ? false :
+								data === "null" ? null :
+								!jQuery.isNaN( data ) ? parseFloat( data ) :
+								rbrace.test( data ) ? jQuery.parseJSON( data ) :
+								data;
+						} catch( e ) {}
+
+					} else {
+						data = undefined;
+					}
+				}
+			}
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+
+		} else {
+			return this.each(function() {
+				var $this = jQuery( this ), args = [ parts[0], value ];
+
+				$this.triggerHandler( "setData" + parts[1] + "!", args );
+				jQuery.data( this, key, value );
+				$this.triggerHandler( "changeData" + parts[1] + "!", args );
+			});
+		}
+	},
+
+	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 ) {
+			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,
+	rspaces = /\s+/,
+	rreturn = /\r/g,
+	rspecialurl = /^(?:href|src|style)$/,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.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( rspaces );
+
+			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 + " ", setClass = elem.className;
+						for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+								setClass += " " + classNames[c];
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		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( rspaces );
+
+			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 = jQuery.trim( className );
+
+					} 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( rspaces );
+
+				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 ( !arguments.length ) {
+			var elem = this[0];
+
+			if ( elem ) {
+				if ( jQuery.nodeName( elem, "option" ) ) {
+					// attributes.value is undefined in Blackberry 4.7 but
+					// uses .value. See #6932
+					var val = elem.attributes.value;
+					return !val || val.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 ];
+
+						// Don't return options that are disabled or in a disabled optgroup
+						if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && 
+								(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+							// Get the specific 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());
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray(val) ) {
+				val = jQuery.map(val, function (value) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			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
+			// 'in' checks fail in Blackberry 4.7 #6931
+			if ( (name in elem || elem[ name ] !== undefined) && 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 ) {
+						jQuery.error( "type property can't be changed" );
+					}
+
+					if ( value === null ) {
+						if ( elem.nodeType === 1 ) {
+							elem.removeAttribute( name );
+						}
+
+					} else {
+						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 );
+			}
+
+			// Ensure that missing attributes return undefined
+			// Blackberry 4.7 returns "" from getAttribute #6938
+			if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+				return undefined;
+			}
+
+			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;
+		}
+	}
+});
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+	rformElems = /^(?:textarea|input|select)$/i,
+	rperiod = /\./g,
+	rspace = / /g,
+	rescape = /[^\w\s.|`]/g,
+	fcleanup = function( nm ) {
+		return nm.replace(rescape, "\\$&");
+	},
+	focusCounts = { focusin: 0, focusout: 0 };
+
+/*
+ * 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 ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
+			elem = window;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		}
+
+		var handleObjIn, handleObj;
+
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+		}
+
+		// Make sure that the function being executed has a unique ID
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure
+		var elemData = jQuery.data( elem );
+
+		// If no elemData is found then we must be trying to bind to one of the
+		// banned noData elements
+		if ( !elemData ) {
+			return;
+		}
+
+		// Use a key less likely to result in collisions for plain JS objects.
+		// Fixes bug #7150.
+		var eventKey = elem.nodeType ? "events" : "__events__",
+			events = elemData[ eventKey ],
+			eventHandle = elemData.handle;
+			
+		if ( typeof events === "function" ) {
+			// On plain objects events is a fn that holds the the data
+			// which prevents this data from being JSON serialized
+			// the function does not need to be called, it just contains the data
+			eventHandle = events.handle;
+			events = events.events;
+
+		} else if ( !events ) {
+			if ( !elem.nodeType ) {
+				// On plain objects, create a fn that acts as the holder
+				// of the values to avoid JSON serialization of event data
+				elemData[ eventKey ] = elemData = function(){};
+			}
+
+			elemData.events = events = {};
+		}
+
+		if ( !eventHandle ) {
+			elemData.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;
+			};
+		}
+
+		// Add elem as a property of the handle function
+		// This is to prevent a memory leak with non-native events in IE.
+		eventHandle.elem = elem;
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		var type, i = 0, namespaces;
+
+		while ( (type = types[ i++ ]) ) {
+			handleObj = handleObjIn ?
+				jQuery.extend({}, handleObjIn) :
+				{ handler: handler, data: data };
+
+			// Namespaced event handlers
+			if ( type.indexOf(".") > -1 ) {
+				namespaces = type.split(".");
+				type = namespaces.shift();
+				handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+			} else {
+				namespaces = [];
+				handleObj.namespace = "";
+			}
+
+			handleObj.type = type;
+			if ( !handleObj.guid ) {
+				handleObj.guid = handler.guid;
+			}
+
+			// Get the current list of functions bound to this event
+			var handlers = events[ type ],
+				special = jQuery.event.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, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+			
+			if ( special.add ) { 
+				special.add.call( elem, handleObj ); 
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add the function to the element's handler list
+			handlers.push( handleObj );
+
+			// Keep track of which events have been used, for global triggering
+			jQuery.event.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, pos ) {
+		// don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		}
+
+		var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+			eventKey = elem.nodeType ? "events" : "__events__",
+			elemData = jQuery.data( elem ),
+			events = elemData && elemData[ eventKey ];
+
+		if ( !elemData || !events ) {
+			return;
+		}
+		
+		if ( typeof events === "function" ) {
+			elemData = events;
+			events = events.events;
+		}
+
+		// types is actually an event object here
+		if ( types && types.type ) {
+			handler = types.handler;
+			types = types.type;
+		}
+
+		// Unbind all events for the element
+		if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+			types = types || "";
+
+			for ( type in events ) {
+				jQuery.event.remove( elem, type + types );
+			}
+
+			return;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).unbind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		while ( (type = types[ i++ ]) ) {
+			origType = type;
+			handleObj = null;
+			all = type.indexOf(".") < 0;
+			namespaces = [];
+
+			if ( !all ) {
+				// Namespaced event handlers
+				namespaces = type.split(".");
+				type = namespaces.shift();
+
+				namespace = new RegExp("(^|\\.)" + 
+					jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+			}
+
+			eventType = events[ type ];
+
+			if ( !eventType ) {
+				continue;
+			}
+
+			if ( !handler ) {
+				for ( j = 0; j < eventType.length; j++ ) {
+					handleObj = eventType[ j ];
+
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						jQuery.event.remove( elem, origType, handleObj.handler, j );
+						eventType.splice( j--, 1 );
+					}
+				}
+
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+
+			for ( j = pos || 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( handler.guid === handleObj.guid ) {
+					// remove the given handler for the given type
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						if ( pos == null ) {
+							eventType.splice( j--, 1 );
+						}
+
+						if ( special.remove ) {
+							special.remove.call( elem, handleObj );
+						}
+					}
+
+					if ( pos != null ) {
+						break;
+					}
+				}
+			}
+
+			// remove generic event handler if no more handlers exist
+			if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				ret = null;
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			var handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			delete elemData.events;
+			delete elemData.handle;
+
+			if ( typeof elemData === "function" ) {
+				jQuery.removeData( elem, eventKey );
+
+			} else if ( jQuery.isEmptyObject( elemData ) ) {
+				jQuery.removeData( elem );
+			}
+		}
+	},
+
+	// 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[ jQuery.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 ( jQuery.event.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 = elem.nodeType ?
+			jQuery.data( elem, "handle" ) :
+			(jQuery.data( elem, "__events__" ) || {}).handle;
+
+		if ( handle ) {
+			handle.apply( elem, data );
+		}
+
+		var parent = elem.parentNode || elem.ownerDocument;
+
+		// Trigger an inline bound script
+		try {
+			if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+				if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+					event.result = false;
+					event.preventDefault();
+				}
+			}
+
+		// prevent IE from throwing an error for some elements with some event types, see #3533
+		} catch (inlineError) {}
+
+		if ( !event.isPropagationStopped() && parent ) {
+			jQuery.event.trigger( event, data, parent, true );
+
+		} else if ( !event.isDefaultPrevented() ) {
+			var target = event.target, old, targetType = type.replace(rnamespaces, ""),
+				isClick = jQuery.nodeName(target, "a") && targetType === "click",
+				special = jQuery.event.special[ targetType ] || {};
+
+			if ( (!special._default || special._default.call( elem, event ) === false) && 
+				!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+
+				try {
+					if ( target[ targetType ] ) {
+						// Make sure that we don't accidentally re-trigger the onFOO events
+						old = target[ "on" + targetType ];
+
+						if ( old ) {
+							target[ "on" + targetType ] = null;
+						}
+
+						jQuery.event.triggered = true;
+						target[ targetType ]();
+					}
+
+				// prevent IE from throwing an error for some elements with some event types, see #3533
+				} catch (triggerError) {}
+
+				if ( old ) {
+					target[ "on" + targetType ] = old;
+				}
+
+				jQuery.event.triggered = false;
+			}
+		}
+	},
+
+	handle: function( event ) {
+		var all, handlers, namespaces, namespace_sort = [], namespace_re, events, args = jQuery.makeArray( arguments );
+
+		event = args[0] = jQuery.event.fix( event || window.event );
+		event.currentTarget = this;
+
+		// Namespaced event handlers
+		all = event.type.indexOf(".") < 0 && !event.exclusive;
+
+		if ( !all ) {
+			namespaces = event.type.split(".");
+			event.type = namespaces.shift();
+			namespace_sort = namespaces.slice(0).sort();
+			namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
+		}
+
+		event.namespace = event.namespace || namespace_sort.join(".");
+
+		events = jQuery.data(this, this.nodeType ? "events" : "__events__");
+
+		if ( typeof events === "function" ) {
+			events = events.events;
+		}
+
+		handlers = (events || {})[ event.type ];
+
+		if ( events && handlers ) {
+			// Clone the handlers to prevent manipulation
+			handlers = handlers.slice(0);
+
+			for ( var j = 0, l = handlers.length; j < l; j++ ) {
+				var handleObj = handlers[ j ];
+
+				// Filter the functions by class
+				if ( all || namespace_re.test( handleObj.namespace ) ) {
+					// Pass in a reference to the handler function itself
+					// So that we can later remove it
+					event.handler = handleObj.handler;
+					event.data = handleObj.data;
+					event.handleObj = handleObj;
+	
+					var ret = handleObj.handler.apply( this, args );
+
+					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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+	fix: function( event ) {
+		if ( event[ jQuery.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 == null && (event.charCode != null || event.keyCode != null) ) {
+			event.which = event.charCode != null ? 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( handleObj ) {
+				jQuery.event.add( this,
+					liveConvert( handleObj.origType, handleObj.selector ),
+					jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); 
+			},
+
+			remove: function( handleObj ) {
+				jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+			}
+		},
+
+		beforeunload: {
+			setup: function( data, namespaces, eventHandle ) {
+				// We only want to do this special case on windows
+				if ( jQuery.isWindow( this ) ) {
+					this.onbeforeunload = eventHandle;
+				}
+			},
+
+			teardown: function( namespaces, eventHandle ) {
+				if ( this.onbeforeunload === eventHandle ) {
+					this.onbeforeunload = null;
+				}
+			}
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} : 
+	function( elem, type, handle ) {
+		if ( elem.detachEvent ) {
+			elem.detachEvent( "on" + type, handle );
+		}
+	};
+
+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 = jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.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)
+		} else {
+			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;
+
+	// Firefox sometimes assigns relatedTarget a XUL element
+	// which we cannot access the parentNode property of
+	try {
+		// Traverse up the tree
+		while ( parent && parent !== this ) {
+			parent = parent.parentNode;
+		}
+
+		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 );
+		}
+
+	// assuming we've left the element since we most likely mousedover a xul element
+	} catch(e) { }
+},
+
+// 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 ) {
+			if ( this.nodeName.toLowerCase() !== "form" ) {
+				jQuery.event.add(this, "click.specialSubmit", function( e ) {
+					var elem = e.target, type = elem.type;
+
+					if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+						e.liveFired = undefined;
+						return trigger( "submit", this, arguments );
+					}
+				});
+	 
+				jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+					var elem = e.target, type = elem.type;
+
+					if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+						e.liveFired = undefined;
+						return trigger( "submit", this, arguments );
+					}
+				});
+
+			} else {
+				return false;
+			}
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialSubmit" );
+		}
+	};
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+	var changeFilters,
+
+	getVal = function( 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;
+	},
+
+	testChange = function testChange( e ) {
+		var elem = e.target, data, val;
+
+		if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+			return;
+		}
+
+		data = jQuery.data( elem, "_change_data" );
+		val = getVal(elem);
+
+		// the current data will be also retrieved by beforeactivate
+		if ( e.type !== "focusout" || elem.type !== "radio" ) {
+			jQuery.data( elem, "_change_data", val );
+		}
+		
+		if ( data === undefined || val === data ) {
+			return;
+		}
+
+		if ( data != null || val ) {
+			e.type = "change";
+			e.liveFired = undefined;
+			return jQuery.event.trigger( e, arguments[1], elem );
+		}
+	};
+
+	jQuery.event.special.change = {
+		filters: {
+			focusout: testChange, 
+
+			beforedeactivate: 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
+			beforeactivate: function( e ) {
+				var elem = e.target;
+				jQuery.data( elem, "_change_data", getVal(elem) );
+			}
+		},
+
+		setup: function( data, namespaces ) {
+			if ( this.type === "file" ) {
+				return false;
+			}
+
+			for ( var type in changeFilters ) {
+				jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+			}
+
+			return rformElems.test( this.nodeName );
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialChange" );
+
+			return rformElems.test( this.nodeName );
+		}
+	};
+
+	changeFilters = jQuery.event.special.change.filters;
+
+	// Handle when the input is .focus()'d
+	changeFilters.focus = changeFilters.beforeactivate;
+}
+
+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() {
+				if ( focusCounts[fix]++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			}, 
+			teardown: function() { 
+				if ( --focusCounts[fix] === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+
+		function handler( e ) { 
+			e = jQuery.event.fix( e );
+			e.type = fix;
+			return jQuery.event.trigger( e, null, e.target );
+		}
+	});
+}
+
+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 ) || data === false ) {
+			fn = data;
+			data = undefined;
+		}
+
+		var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+			jQuery( this ).unbind( event, handler );
+			return fn.apply( this, arguments );
+		}) : fn;
+
+		if ( type === "unload" && name !== "one" ) {
+			this.one( type, data, fn );
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.add( this[i], type, handler, data );
+			}
+		}
+
+		return this;
+	};
+});
+
+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]);
+			}
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.remove( this[i], type, fn );
+			}
+		}
+
+		return this;
+	},
+	
+	delegate: function( selector, types, data, fn ) {
+		return this.live( types, data, fn, selector );
+	},
+	
+	undelegate: function( selector, types, fn ) {
+		if ( arguments.length === 0 ) {
+				return this.unbind( "live" );
+		
+		} else {
+			return this.die( types, null, fn, selector );
+		}
+	},
+	
+	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 );
+	}
+});
+
+var liveMap = {
+	focus: "focusin",
+	blur: "focusout",
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+	jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+		var type, i = 0, match, namespaces, preType,
+			selector = origSelector || this.selector,
+			context = origSelector ? this : jQuery( this.context );
+		
+		if ( typeof types === "object" && !types.preventDefault ) {
+			for ( var key in types ) {
+				context[ name ]( key, data, types[key], selector );
+			}
+			
+			return this;
+		}
+
+		if ( jQuery.isFunction( data ) ) {
+			fn = data;
+			data = undefined;
+		}
+
+		types = (types || "").split(" ");
+
+		while ( (type = types[ i++ ]) != null ) {
+			match = rnamespaces.exec( type );
+			namespaces = "";
+
+			if ( match )  {
+				namespaces = match[0];
+				type = type.replace( rnamespaces, "" );
+			}
+
+			if ( type === "hover" ) {
+				types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+				continue;
+			}
+
+			preType = type;
+
+			if ( type === "focus" || type === "blur" ) {
+				types.push( liveMap[ type ] + namespaces );
+				type = type + namespaces;
+
+			} else {
+				type = (liveMap[ type ] || type) + namespaces;
+			}
+
+			if ( name === "live" ) {
+				// bind live handler
+				for ( var j = 0, l = context.length; j < l; j++ ) {
+					jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+						{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+				}
+
+			} else {
+				// unbind live handler
+				context.unbind( "live." + liveConvert( type, selector ), fn );
+			}
+		}
+		
+		return this;
+	};
+});
+
+function liveHandler( event ) {
+	var stop, maxLevel, elems = [], selectors = [],
+		related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+		events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
+
+	if ( typeof events === "function" ) {
+		events = events.events;
+	}
+
+	// Make sure we avoid non-left-click bubbling in Firefox (#3861)
+	if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
+		return;
+	}
+
+	if ( event.namespace ) {
+		namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+	}
+
+	event.liveFired = this;
+
+	var live = events.live.slice(0);
+
+	for ( j = 0; j < live.length; j++ ) {
+		handleObj = live[j];
+
+		if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+			selectors.push( handleObj.selector );
+
+		} else {
+			live.splice( j--, 1 );
+		}
+	}
+
+	match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+	for ( i = 0, l = match.length; i < l; i++ ) {
+		close = match[i];
+
+		for ( j = 0; j < live.length; j++ ) {
+			handleObj = live[j];
+
+			if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+				elem = close.elem;
+				related = null;
+
+				// Those two events require additional checking
+				if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+					event.type = handleObj.preType;
+					related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+				}
+
+				if ( !related || related !== elem ) {
+					elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+				}
+			}
+		}
+	}
+
+	for ( i = 0, l = elems.length; i < l; i++ ) {
+		match = elems[i];
+
+		if ( maxLevel && match.level > maxLevel ) {
+			break;
+		}
+
+		event.currentTarget = match.elem;
+		event.data = match.handleObj.data;
+		event.handleObj = match.handleObj;
+
+		ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+		if ( ret === false || event.isPropagationStopped() ) {
+			maxLevel = match.level;
+
+			if ( ret === false ) {
+				stop = false;
+			}
+		}
+	}
+
+	return stop;
+}
+
+function liveConvert( type, selector ) {
+	return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
+}
+
+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( data, fn ) {
+		if ( fn == null ) {
+			fn = data;
+			data = null;
+		}
+
+		return arguments.length > 0 ?
+			this.bind( name, data, 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 ) {
+	jQuery(window).bind("unload", 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 || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+	
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var parts = [], m, set, checkSet, extra, prune = true, contextXML = Sizzle.isXML(context),
+		soFar = selector, ret, cur, pop, i;
+	
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec("");
+		m = chunker.exec(soFar);
+
+		if ( m ) {
+			soFar = m[3];
+		
+			parts.push( m[1] );
+		
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	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]) ) {
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+		}
+
+		if ( context ) {
+			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 ) {
+				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 ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+		} else {
+			for ( 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.matchesSelector = function(node, expr){
+	return Sizzle(expr, null, null, [node]).length > 0;
+};
+
+Sizzle.find = function(expr, context, isXML){
+	var set;
+
+	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] && Sizzle.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 ) {
+				Sizzle.error( expr );
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw "Syntax error, unrecognized expression: " + msg;
+};
+
+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",
+				elem, i = 0, l = checkSet.length;
+
+			if ( isPartStr && !/\W/.test(part) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+			} else {
+				for ( ; i < l; i++ ) {
+					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, nodeCheck;
+
+			if ( typeof part === "string" && !/\W/.test(part) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+		},
+		"~": function(checkSet, part, isXML){
+			var doneName = done++, checkFn = dirCheck, nodeCheck;
+
+			if ( typeof part === "string" && !/\W/.test(part) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				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]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [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 || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+			} else {
+				Sizzle.error( "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,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+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, fescape) );
+}
+
+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.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch(e){
+	makeArray = function(array, results) {
+		var ret = results || [], i = 0;
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+} else {
+	sortOrder = function( a, b ) {
+		var ap = [], bp = [], aup = a.parentNode, bup = b.parentNode,
+			cur = aup, al, bl;
+
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( 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 += Sizzle.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 && !Sizzle.isXML(context) ) {
+				if ( context.nodeType === 9 ) {
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var old = context.id, id = context.id = "__sizzle__";
+
+					try {
+						return makeArray( context.querySelectorAll( "#" + id + " " + query ), extra );
+
+					} catch(pseudoError) {
+					} finally {
+						if ( old ) {
+							context.id = old;
+
+						} else {
+							context.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		div = null; // release memory in IE
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+		pseudoWorks = false;
+
+	try {
+		// This should fail with an exception
+		// Gecko does not error, returns false instead
+		matches.call( document.documentElement, ":sizzle" );
+	
+	} catch( pseudoError ) {
+		pseudoWorks = true;
+	}
+
+	if ( matches ) {
+		Sizzle.matchesSelector = function( node, expr ) {
+				try { 
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) ) {
+						return matches.call( node, expr );
+					}
+				} catch(e) {}
+
+				return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(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;
+		}
+	}
+}
+
+Sizzle.contains = document.documentElement.contains ? function(a, b){
+	return a !== b && (a.contains ? a.contains(b) : true);
+} : function(a, b){
+	return !!(a.compareDocumentPosition(b) & 16);
+};
+
+Sizzle.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.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+	// Note: This RegExp should be improved, or likely pulled from Sizzle
+	rmultiselector = /,/,
+	isSimple = /^.[^:#\[\.,]*$/,
+	slice = Array.prototype.slice,
+	POS = jQuery.expr.match.POS;
+
+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 ) {
+		var ret = [], i, l, cur = this[0];
+
+		if ( jQuery.isArray( selectors ) ) {
+			var match, matches = {}, selector, level = 1;
+
+			if ( cur && selectors.length ) {
+				for ( 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, level: level });
+						}
+					}
+
+					cur = cur.parentNode;
+					level++;
+				}
+			}
+
+			return ret;
+		}
+
+		var pos = POS.test( selectors ) ? 
+			jQuery( selectors, context || this.context ) : null;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			cur = this[i];
+
+			while ( cur ) {
+				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+					ret.push( cur );
+					break;
+
+				} else {
+					cur = cur.parentNode;
+					if ( !cur || !cur.ownerDocument || cur === context ) {
+						break;
+					}
+				}
+			}
+		}
+
+		ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+		
+		return this.pushStack( ret, "closest", selectors );
+	},
+	
+	// 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 elems.length === 1 ?
+			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+			jQuery.find.matches(expr, elems);
+	},
+	
+	dir: function( elem, dir, until ) {
+		var matched = [], cur = elem[dir];
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !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;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			var retVal = !!qualifier.call( elem, i, elem );
+			return retVal === 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, filtered );
+		}
+	}
+
+	return jQuery.grep(elements, function( elem, i ) {
+		return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+	});
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnocache = /<(?:script|object|embed|option|style)/i,
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,  // checked="checked" or checked (html5)
+	raction = /\=([^="'>\s]+\/)>/g,
+	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);
+				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.text( 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 ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		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;
+		}
+	},
+	
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+				if ( !keepData && elem.nodeType === 1 ) {
+					jQuery.cleanData( elem.getElementsByTagName("*") );
+					jQuery.cleanData( [ elem ] );
+				}
+
+				if ( elem.parentNode ) {
+					 elem.parentNode.removeChild( elem );
+				}
+			}
+		}
+		
+		return this;
+	},
+
+	empty: function() {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( elem.getElementsByTagName("*") );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+		}
+		
+		return this;
+	},
+
+	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, "")
+					// Handle the case in IE 8 where action=/test/> self-closes a tag
+					.replace(raction, '="$1">')
+					.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" && !rnocache.test( value ) &&
+			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+			value = value.replace(rxhtmlTag, "<$1></$2>");
+
+			try {
+				for ( var i = 0, l = this.length; i < l; i++ ) {
+					// Remove element nodes and prevent memory leaks
+					if ( this[i].nodeType === 1 ) {
+						jQuery.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);
+				self.html( value.call(this, i, self.html()) );
+			});
+
+		} 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 ) ) {
+				return this.each(function(i) {
+					var self = jQuery(this), old = self.html();
+					self.replaceWith( value.call( this, i, old ) );
+				});
+			}
+
+			if ( typeof value !== "string" ) {
+				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 = [], fragment, parent;
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+			return this.each(function() {
+				jQuery(this).domManip( args, table, callback, true );
+			});
+		}
+
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				args[0] = value.call(this, i, table ? self.html() : undefined);
+				self.domManip( args, table, callback );
+			});
+		}
+
+		if ( this[0] ) {
+			parent = value && value.parentNode;
+
+			// If we're in a fragment, just use that instead of building a new one
+			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+				results = { fragment: parent };
+
+			} else {
+				results = jQuery.buildFragment( args, this, scripts );
+			}
+			
+			fragment = results.fragment;
+			
+			if ( fragment.childNodes.length === 1 ) {
+				first = fragment = fragment.firstChild;
+			} else {
+				first = 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],
+						i > 0 || results.cacheable || this.length > 1  ?
+							fragment.cloneNode(true) :
+							fragment
+					);
+				}
+			}
+
+			if ( scripts.length ) {
+				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 );
+				}
+			}
+		}
+	});
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+	var fragment, cacheable, cacheresults,
+		doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+
+	// Only cache "small" (1/2 KB) strings that are associated with the main document
+	// Cloning options loses the selected state, so don't cache them
+	// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+	// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+	if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+		!rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+		cacheable = true;
+		cacheresults = jQuery.fragments[ args[0] ];
+		if ( cacheresults ) {
+			if ( cacheresults !== 1 ) {
+				fragment = cacheresults;
+			}
+		}
+	}
+
+	if ( !fragment ) {
+		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 ),
+			parent = this.length === 1 && this[0].parentNode;
+		
+		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+			insert[ original ]( this[0] );
+			return this;
+			
+		} else {
+			for ( var i = 0, l = insert.length; i < l; i++ ) {
+				var elems = (i > 0 ? this.clone(true) : this).get();
+				jQuery( insert[i] )[ original ]( elems );
+				ret = ret.concat( elems );
+			}
+		
+			return this.pushStack( ret, name, insert.selector );
+		}
+	};
+});
+
+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 = [];
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( typeof elem === "number" ) {
+				elem += "";
+			}
+
+			if ( !elem ) {
+				continue;
+			}
+
+			// 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, "<$1></$2>");
+
+				// 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 = div.childNodes;
+			}
+
+			if ( elem.nodeType ) {
+				ret.push( elem );
+			} else {
+				ret = jQuery.merge( ret, elem );
+			}
+		}
+
+		if ( fragment ) {
+			for ( 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;
+	},
+	
+	cleanData: function( elems ) {
+		var data, id, cache = jQuery.cache,
+			special = jQuery.event.special,
+			deleteExpando = jQuery.support.deleteExpando;
+		
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+				continue;
+			}
+
+			id = elem[ jQuery.expando ];
+			
+			if ( id ) {
+				data = cache[ id ];
+				
+				if ( data && data.events ) {
+					for ( var type in data.events ) {
+						if ( special[ type ] ) {
+							jQuery.event.remove( elem, type );
+
+						} else {
+							jQuery.removeEvent( elem, type, data.handle );
+						}
+					}
+				}
+				
+				if ( deleteExpando ) {
+					delete elem[ jQuery.expando ];
+
+				} else if ( elem.removeAttribute ) {
+					elem.removeAttribute( jQuery.expando );
+				}
+				
+				delete cache[ id ];
+			}
+		}
+	}
+});
+
+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 );
+	}
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	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" ],
+	curCSS,
+
+	// cache check for defaultView.getComputedStyle
+	getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
+
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	};
+
+jQuery.fn.css = function( name, value ) {
+	// Setting 'undefined' is a no-op
+	if ( arguments.length === 2 && value === undefined ) {
+		return this;
+	}
+
+	return jQuery.access( this, name, value, true, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	});
+};
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity", "opacity" );
+					return ret === "" ? "1" : ret;
+
+				} else {
+					return elem.style.opacity;
+				}
+			}
+		}
+	},
+
+	// Exclude the following css properties to add px
+	cssNumber: {
+		"zIndex": true,
+		"fontWeight": true,
+		"opacity": true,
+		"zoom": true,
+		"lineHeight": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, origName = jQuery.camelCase( name ),
+			style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( typeof value === "number" && isNaN( value ) || value == null ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra ) {
+		// Make sure that we're working with the right name
+		var ret, origName = jQuery.camelCase( name ),
+			hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+			return ret;
+
+		// Otherwise, if a way to get the computed value exists, use that
+		} else if ( curCSS ) {
+			return curCSS( elem, name, origName );
+		}
+	},
+
+	// 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 ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+	},
+
+	camelCase: function( string ) {
+		return string.replace( rdashAlpha, fcamelCase );
+	}
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			var val;
+
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					val = getWH( elem, name, extra );
+
+				} else {
+					jQuery.swap( elem, cssShow, function() {
+						val = getWH( elem, name, extra );
+					});
+				}
+
+				return val + "px";
+			}
+		},
+
+		set: function( elem, value ) {
+			if ( rnumpx.test( value ) ) {
+				// ignore negative width and height values #1599
+				value = parseFloat(value);
+
+				if ( value >= 0 ) {
+					return value + "px";
+				}
+
+			} else {
+				return value;
+			}
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
+				(parseFloat(RegExp.$1) / 100) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style;
+
+			// 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 = jQuery.isNaN(value) ?
+				"" :
+				"alpha(opacity=" + value * 100 + ")",
+				filter = style.filter || "";
+
+			style.filter = ralpha.test(filter) ?
+				filter.replace(ralpha, opacity) :
+				style.filter + ' ' + opacity;
+		}
+	};
+}
+
+if ( getComputedStyle ) {
+	curCSS = function( elem, newName, name ) {
+		var ret, defaultView, computedStyle;
+
+		name = name.replace( rupper, "-$1" ).toLowerCase();
+
+		if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+			return undefined;
+		}
+
+		if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+			ret = computedStyle.getPropertyValue( name );
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+		}
+
+		return ret;
+	};
+
+} else if ( document.documentElement.currentStyle ) {
+	curCSS = function( elem, name ) {
+		var left, rsLeft, ret = elem.currentStyle && elem.currentStyle[ name ], style = elem.style;
+
+		// 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
+			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 = name === "fontSize" ? "1em" : (ret || 0);
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			elem.runtimeStyle.left = rsLeft;
+		}
+
+		return ret;
+	};
+}
+
+function getWH( elem, name, extra ) {
+	var which = name === "width" ? cssWidth : cssHeight,
+		val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
+
+	if ( extra === "border" ) {
+		return val;
+	}
+
+	jQuery.each( which, function() {
+		if ( !extra ) {
+			val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
+		}
+
+		if ( extra === "margin" ) {
+			val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
+
+		} else {
+			val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
+		}
+	});
+
+	return val;
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		var width = elem.offsetWidth, height = elem.offsetHeight;
+
+		return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+
+
+
+var jsc = jQuery.now(),
+	rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+	rselectTextarea = /^(?:select|textarea)/i,
+	rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+	rnoContent = /^(?:GET|HEAD|DELETE)$/,
+	rbracket = /\[\]$/,
+	jsre = /\=\?(&|$)/,
+	rquery = /\?/,
+	rts = /([?&])_=[^&]*/,
+	rurl = /^(\w+:)?\/\/([^\/?#]+)/,
+	r20 = /%20/g,
+	rhash = /#.*$/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load;
+
+jQuery.fn.extend({
+	load: function( url, params, callback ) {
+		if ( typeof url !== "string" && _load ) {
+			return _load.apply( this, arguments );
+
+		// 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";
+			}
+		}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			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
+					self.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 ) {
+					self.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,
+		*/
+		// This function can be overriden by calling jQuery.ajaxSetup
+		xhr: function() {
+			return new window.XMLHttpRequest();
+		},
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			script: "text/javascript, application/javascript",
+			json: "application/json, text/javascript",
+			text: "text/plain",
+			_default: "*/*"
+		}
+	},
+
+	ajax: function( origSettings ) {
+		var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
+			jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
+
+		s.url = s.url.replace( rhash, "" );
+
+		// Use original (not extended) context object if it was provided
+		s.context = origSettings && origSettings.context != null ? origSettings.context : s;
+
+		// 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
+			var customJsonp = window[ jsonp ];
+
+			window[ jsonp ] = function( tmp ) {
+				data = tmp;
+				jQuery.handleSuccess( s, xhr, status, data );
+				jQuery.handleComplete( s, xhr, status, data );
+
+				if ( jQuery.isFunction( customJsonp ) ) {
+					customJsonp( tmp );
+
+				} else {
+					// Garbage collect
+					window[ jsonp ] = undefined;
+
+					try {
+						delete window[ jsonp ];
+					} catch( jsonpError ) {}
+				}
+				
+				if ( head ) {
+					head.removeChild( script );
+				}
+			};
+		}
+
+		if ( s.dataType === "script" && s.cache === null ) {
+			s.cache = false;
+		}
+
+		if ( s.cache === false && type === "GET" ) {
+			var ts = jQuery.now();
+
+			// try replacing _= if it is there
+			var ret = s.url.replace(rts, "$1_=" + ts);
+
+			// 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++ === 0 ) {
+			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");
+			if ( s.scriptCharset ) {
+				script.charset = s.scriptCharset;
+			}
+			script.src = s.url;
+
+			// 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;
+						jQuery.handleSuccess( s, xhr, status, data );
+						jQuery.handleComplete( s, xhr, status, data );
+
+						// 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 content-type if data specified and content-body is valid for this type
+			if ( (s.data != null && !noContent) || (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 ] + ", */*; q=0.01" :
+				s.accepts._default );
+		} catch( headerError ) {}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false ) {
+			// Handle the global AJAX counter
+			if ( s.global && jQuery.active-- === 1 ) {
+				jQuery.event.trigger( "ajaxStop" );
+			}
+
+			// close opended socket
+			xhr.abort();
+			return false;
+		}
+
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "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 || isTimeout === "abort" ) {
+				// Opera doesn't call onreadystatechange before this point
+				// so we simulate the call
+				if ( !requestDone ) {
+					jQuery.handleComplete( s, xhr, status, data );
+				}
+
+				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";
+
+				var errMsg;
+
+				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( parserError ) {
+						status = "parsererror";
+						errMsg = parserError;
+					}
+				}
+
+				// Make sure that the request was successful or notmodified
+				if ( status === "success" || status === "notmodified" ) {
+					// JSONP handles its own success callback
+					if ( !jsonp ) {
+						jQuery.handleSuccess( s, xhr, status, data );
+					}
+				} else {
+					jQuery.handleError( s, xhr, status, errMsg );
+				}
+
+				// Fire the complete handlers
+				if ( !jsonp ) {
+					jQuery.handleComplete( s, xhr, status, data );
+				}
+
+				if ( isTimeout === "timeout" ) {
+					xhr.abort();
+				}
+
+				// Stop memory leaks
+				if ( s.async ) {
+					xhr = null;
+				}
+			}
+		};
+
+		// Override the abort handler, if we can (IE 6 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() {
+				// xhr.abort in IE7 is not a native JS function
+				// and does not have a call property
+				if ( xhr && oldAbort.call ) {
+					oldAbort.call( xhr );
+				}
+
+				onreadystatechange( "abort" );
+			};
+		} catch( abortError ) {}
+
+		// 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( noContent || s.data == null ? null : s.data );
+
+		} catch( sendError ) {
+			jQuery.handleError( s, xhr, null, sendError );
+
+			// Fire the complete handlers
+			jQuery.handleComplete( s, xhr, status, data );
+		}
+
+		// firefox 1.5 doesn't fire statechange for sync requests
+		if ( !s.async ) {
+			onreadystatechange();
+		}
+
+		// return XMLHttpRequest to allow aborting the request etc.
+		return xhr;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a, traditional ) {
+		var s = [], add = function( 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);
+		};
+		
+		// Set traditional to true for jQuery <= 1.3.2 behavior.
+		if ( traditional === undefined ) {
+			traditional = jQuery.ajaxSettings.traditional;
+		}
+		
+		// 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.
+			for ( var prefix in a ) {
+				buildParams( prefix, a[prefix], traditional, add );
+			}
+		}
+
+		// Return the resulting serialization
+		return s.join("&").replace(r20, "+");
+	}
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+	if ( jQuery.isArray(obj) && obj.length ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// 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, traditional, add );
+			}
+		});
+			
+	} else if ( !traditional && obj != null && typeof obj === "object" ) {
+		if ( jQuery.isEmptyObject( obj ) ) {
+			add( prefix, "" );
+
+		// Serialize object item.
+		} else {
+			jQuery.each( obj, function( k, v ) {
+				buildParams( prefix + "[" + k + "]", v, traditional, add );
+			});
+		}
+					
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {},
+
+	handleError: function( s, xhr, status, e ) {
+		// If a local callback was specified, fire it
+		if ( s.error ) {
+			s.error.call( s.context, xhr, status, e );
+		}
+
+		// Fire the global callback
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxError", [xhr, s, e] );
+		}
+	},
+
+	handleSuccess: function( s, xhr, status, data ) {
+		// If a local callback was specified, fire it and pass it the data
+		if ( s.success ) {
+			s.success.call( s.context, data, status, xhr );
+		}
+
+		// Fire the global callback
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s] );
+		}
+	},
+
+	handleComplete: function( s, xhr, status ) {
+		// Process result
+		if ( s.complete ) {
+			s.complete.call( s.context, xhr, status );
+		}
+
+		// The request was completed
+		if ( s.global ) {
+			jQuery.triggerGlobal( s, "ajaxComplete", [xhr, s] );
+		}
+
+		// Handle the global AJAX counter
+		if ( s.global && jQuery.active-- === 1 ) {
+			jQuery.event.trigger( "ajaxStop" );
+		}
+	},
+		
+	triggerGlobal: function( s, type, args ) {
+		(s.context && s.context.url == null ? jQuery(s.context) : jQuery.event).trigger(type, args);
+	},
+
+	// 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:" ||
+				xhr.status >= 200 && xhr.status < 300 ||
+				xhr.status === 304 || xhr.status === 1223;
+		} 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;
+		}
+
+		return xhr.status === 304;
+	},
+
+	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" ) {
+			jQuery.error( "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 ) {
+				data = jQuery.parseJSON( 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;
+	}
+
+});
+
+/*
+ * 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
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+if ( window.ActiveXObject ) {
+	jQuery.ajaxSettings.xhr = function() {
+		if ( window.location.protocol !== "file:" ) {
+			try {
+				return new window.XMLHttpRequest();
+			} catch(xhrError) {}
+		}
+
+		try {
+			return new window.ActiveXObject("Microsoft.XMLHTTP");
+		} catch(activeError) {}
+	};
+}
+
+// Does this browser support XHR requests?
+jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
+
+
+
+
+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, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("show", 3), speed, easing, callback);
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				// Reset the inline display of this element to learn if it is
+				// being hidden by cascaded rules or not
+				if ( !jQuery.data(this[i], "olddisplay") && this[i].style.display === "none" ) {
+					this[i].style.display = "";
+				}
+
+				// Set elements which have been overridden with display: none
+				// in a stylesheet to whatever the default browser style is
+				// for such an element
+				if ( this[i].style.display === "" && jQuery.css( this[i], "display" ) === "none" ) {
+					jQuery.data(this[i], "olddisplay", defaultDisplay(this[i].nodeName));
+				}
+			}
+
+			// Set the display of most of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
+			}
+
+			return this;
+		}
+	},
+
+	hide: function( speed, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("hide", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				var display = jQuery.css( this[i], "display" );
+
+				if ( display !== "none" ) {
+					jQuery.data( this[i], "olddisplay", display );
+				}
+			}
+
+			// Set the display of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				this[i].style.display = "none";
+			}
+
+			return this;
+		}
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2, callback ) {
+		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, callback);
+		}
+
+		return this;
+	},
+
+	fadeTo: function( speed, to, easing, callback ) {
+		return this.filter(":hidden").css("opacity", 0).show().end()
+					.animate({opacity: to}, speed, easing, 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() {
+			// XXX âthisâ does not always have a nodeName when running the
+			// test suite
+
+			var opt = jQuery.extend({}, optall), p,
+				isElement = this.nodeType === 1,
+				hidden = isElement && jQuery(this).is(":hidden"),
+				self = this;
+
+			for ( p in prop ) {
+				var name = jQuery.camelCase( p );
+
+				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 ( isElement && ( p === "height" || p === "width" ) ) {
+					// Make sure that nothing sneaks out
+					// Record all 3 overflow attributes because IE does not
+					// change the overflow attribute when overflowX and
+					// overflowY are set to the same value
+					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+					// Set display property to inline-block for height/width
+					// animations on inline elements that are having width/height
+					// animated
+					if ( jQuery.css( this, "display" ) === "inline" &&
+							jQuery.css( this, "float" ) === "none" ) {
+						if ( !jQuery.support.inlineBlockNeedsLayout ) {
+							this.style.display = "inline-block";
+
+						} else {
+							var display = defaultDisplay(this.nodeName);
+
+							// inline-level elements accept inline-block;
+							// block-level elements need to be inline with layout
+							if ( display === "inline" ) {
+								this.style.display = "inline-block";
+
+							} else {
+								this.style.display = "inline";
+								this.style.zoom = 1;
+							}
+						}
+					}
+				}
+
+				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" ) {
+							jQuery.style( self, name, (end || 1) + unit);
+							start = ((end || 1) / e.cur(true)) * start;
+							jQuery.style( self, 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;
+	}
+
+});
+
+function genFx( type, num ) {
+	var obj = {};
+
+	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+		obj[ this ] = type;
+	});
+
+	return obj;
+}
+
+// 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, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.extend({
+	speed: function( speed, easing, fn ) {
+		var opt = speed && typeof speed === "object" ? jQuery.extend({}, 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 :
+			opt.duration in jQuery.fx.speeds ? 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 );
+	},
+
+	// Get the current size
+	cur: function() {
+		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 ) );
+		return r && r > -10000 ? r : 0;
+	},
+
+	// Start an animation from one number to another
+	custom: function( from, to, unit ) {
+		this.startTime = jQuery.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, fx = jQuery.fx;
+		function t( gotoEnd ) {
+			return self.step(gotoEnd);
+		}
+
+		t.elem = this.elem;
+
+		if ( t() && jQuery.timers.push(t) && !timerId ) {
+			timerId = setInterval(fx.tick, fx.interval);
+		}
+	},
+
+	// 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 = jQuery.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 ) {
+				// Reset the overflow
+				if ( this.options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+					var elem = this.elem, options = this.options;
+					jQuery.each( [ "", "X", "Y" ], function (index, value) {
+						elem.style[ "overflow" + value ] = options.overflow[index];
+					} );
+				}
+
+				// 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();
+		}
+	},
+
+	interval: 13,
+
+	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 defaultDisplay( nodeName ) {
+	if ( !elemdisplay[ nodeName ] ) {
+		var elem = jQuery("<" + nodeName + ">").appendTo("body"),
+			display = elem.css("display");
+
+		elem.remove();
+
+		if ( display === "none" || display === "" ) {
+			display = "block";
+		}
+
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0], box;
+
+		if ( options ) { 
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		var doc = elem.ownerDocument,
+			docElem = doc.documentElement;
+
+		// Make sure we're not dealing with a disconnected DOM node
+		if ( !box || !jQuery.contains( docElem, elem ) ) {
+			return box || { top: 0, left: 0 };
+		}
+
+		var body = doc.body,
+			win = getWindow(doc),
+			clientTop  = docElem.clientTop  || body.clientTop  || 0,
+			clientLeft = docElem.clientLeft || body.clientLeft || 0,
+			scrollTop  = (win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ),
+			scrollLeft = (win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft),
+			top  = box.top  + scrollTop  - clientTop,
+			left = box.left + scrollLeft - clientLeft;
+
+		return { top: top, left: left };
+	};
+
+} else {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0];
+
+		if ( options ) { 
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		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 && rtable.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.css(body, "marginTop") ) || 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.css(body, "marginTop") ) || 0;
+			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+		}
+
+		return { top: top, left: left };
+	},
+	
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = (position === "absolute" && jQuery.inArray('auto', [curCSSTop, curCSSLeft]) > -1),
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is absolute
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+		}
+
+		curTop  = calculatePosition ? curPosition.top  : parseInt( curCSSTop,  10 ) || 0;
+		curLeft = calculatePosition ? curPosition.left : parseInt( curCSSLeft, 10 ) || 0;
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if (options.top != null) {
+			props.top = (options.top - curOffset.top) + curTop;
+		}
+		if (options.left != null) {
+			props.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 = rroot.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.css(elem, "marginTop") ) || 0;
+		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+		// Add offsetParent borders
+		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 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 && (!rroot.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 jQuery.isWindow( elem ) ?
+		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] ?
+			parseFloat( jQuery.css( this[0], type, "padding" ) ) :
+			null;
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn["outer" + name] = function( margin ) {
+		return this[0] ?
+			parseFloat( jQuery.css( this[0], type, 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;
+		}
+		
+		if ( jQuery.isFunction( size ) ) {
+			return this.each(function( i ) {
+				var self = jQuery( this );
+				self[ type ]( size.call( this, i, self[ type ]() ) );
+			});
+		}
+
+		return jQuery.isWindow( elem ) ?
+			// 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
+					parseFloat( 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" );
+	};
+
+});
+
+
+})(window);
Index: Dev/branches/Demo/d3/lib/jquery/jquery.min.js
===================================================================
--- Dev/branches/Demo/d3/lib/jquery/jquery.min.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/jquery/jquery.min.js	(revision 225)
@@ -0,0 +1,166 @@
+/*!
+ * jQuery JavaScript Library v1.4.3
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Oct 14 23:10:06 2010 -0400
+ */
+(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;n<H.length;n++){k=H[n];k.origType.replace(X,
+"")===a.type?f.push(k.selector):H.splice(n--,1)}f=c(a.target).closest(f,a.currentTarget);s=0;for(v=f.length;s<v;s++){B=f[s];for(n=0;n<H.length;n++){k=H[n];if(B.selector===k.selector&&(!D||D.test(k.namespace))){l=B.elem;h=null;if(k.preType==="mouseenter"||k.preType==="mouseleave"){a.type=k.preType;h=c(a.relatedTarget).closest(k.selector)[0]}if(!h||h!==l)e.push({elem:l,handleObj:k,level:B.level})}}}s=0;for(v=e.length;s<v;s++){f=e[s];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;
+a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b,
+e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(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 ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?
+e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a,
+1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,
+q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i=
+[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i);
+else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ":
+"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);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(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r,
+y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r<y;r++)if((F=arguments[r])!=null)for(I in F){K=i[I];J=F[I];if(i!==J)if(z&&J&&(b.isPlainObject(J)||(fa=b.isArray(J)))){if(fa){fa=false;clone=K&&b.isArray(K)?K:[]}else clone=
+K&&b.isPlainObject(K)?K:{};i[I]=b.extend(z,clone,J)}else if(J!==A)i[I]=J}return i};b.extend({noConflict:function(i){E.$=e;if(i)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(i){i===true&&b.readyWait--;if(!b.readyWait||i!==true&&!b.isReady){if(!u.body)return setTimeout(b.ready,1);b.isReady=true;if(!(i!==true&&--b.readyWait>0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready,
+1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i==
+null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i);
+if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()===
+r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;F<I;){if(r.apply(i[F++],y)===false)break}else if(K)for(z in i){if(r.call(i[z],z,i[z])===false)break}else for(y=i[0];F<I&&r.call(y,F,y)!==false;y=i[++F]);return i},trim:R?function(i){return i==null?"":R.call(i)}:function(i){return i==null?"":i.toString().replace(l,"").replace(n,"")},makeArray:function(i,r){var y=r||[];if(i!=null){var z=b.type(i);i.length==
+null||z==="string"||z==="function"||z==="regexp"||b.isWindow(i)?P.call(y,i):b.merge(y,i)}return y},inArray:function(i,r){if(r.indexOf)return r.indexOf(i);for(var y=0,z=r.length;y<z;y++)if(r[y]===i)return y;return-1},merge:function(i,r){var y=i.length,z=0;if(typeof r.length==="number")for(var F=r.length;z<F;z++)i[y++]=r[z];else for(;r[z]!==A;)i[y++]=r[z++];i.length=y;return i},grep:function(i,r,y){var z=[],F;y=!!y;for(var I=0,K=i.length;I<K;I++){F=!!r(i[I],I);y!==F&&z.push(i[I])}return z},map:function(i,
+r,y){for(var z=[],F,I=0,K=i.length;I<K;I++){F=r(i[I],I,y);if(F!=null)z[z.length]=F}return z.concat.apply([],z)},guid:1,proxy:function(i,r,y){if(arguments.length===2)if(typeof r==="string"){y=i;i=y[r];r=A}else if(r&&!b.isFunction(r)){y=r;r=A}if(!r&&i)r=function(){return i.apply(y||this,arguments)};if(i)r.guid=i.guid=i.guid||r.guid||b.guid++;return r},access:function(i,r,y,z,F,I){var K=i.length;if(typeof r==="object"){for(var J in r)b.access(i,J,r[J],z,F,y);return i}if(y!==A){z=!I&&z&&b.isFunction(y);
+for(J=0;J<K;J++)F(i[J],r,z?y.call(i[J],J,F(i[J],r)):y,I);return i}return K?F(i[0],r):A},now:function(){return(new Date).getTime()},uaMatch:function(i){i=i.toLowerCase();i=M.exec(i)||g.exec(i)||j.exec(i)||i.indexOf("compatible")<0&&o.exec(i)||[];return{browser:i[1]||"",version:i[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,r){L["[object "+r+"]"]=r.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=
+m.version}if(b.browser.webkit)b.browser.safari=true;if(Q)b.inArray=function(i,r){return Q.call(r,i)};if(!/\s/.test("\u00a0")){l=/^[\s\xA0]+/;n=/[\s\xA0]+$/}f=b(u);if(u.addEventListener)t=function(){u.removeEventListener("DOMContentLoaded",t,false);b.ready()};else if(u.attachEvent)t=function(){if(u.readyState==="complete"){u.detachEvent("onreadystatechange",t);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=u.documentElement,b=u.createElement("script"),d=u.createElement("div"),
+e="script"+c.now();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 f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],k=u.createElement("select"),l=k.appendChild(u.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),
+hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:l.selected,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};k.disabled=true;c.support.optDisabled=!l.disabled;b.type="text/javascript";try{b.appendChild(u.createTextNode("window."+e+"=1;"))}catch(n){}a.insertBefore(b,
+a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function s(){c.support.noCloneEvent=false;d.detachEvent("onclick",s)});d.cloneNode(true).fireEvent("onclick")}d=u.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div");
+s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight===
+0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",
+cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=
+c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b=
+c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;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===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e===
+"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},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 e=c.data(a,b);if(!d)return e||
+[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)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 qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(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(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1)if(f.className){for(var h=" "+f.className+" ",k=f.className,l=0,n=b.length;l<n;l++)if(h.indexOf(" "+b[l]+" ")<0)k+=" "+b[l];f.className=c.trim(k)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(n){var s=
+c(this);s.removeClass(a.call(this,n,s.attr("class")))});if(a&&typeof a==="string"||a===A)for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(qa," "),k=0,l=b.length;k<l;k++)h=h.replace(" "+b[k]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,
+f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,k=c(this),l=b,n=a.split(ga);f=n[h++];){l=e?l:!k.hasClass(f);k[l?"addClass":"removeClass"](f)}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(qa," ").indexOf(a)>-1)return true;return false},
+val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&&
+!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+if(d===null)a.nodeType===1&&a.removeAttribute(b);else 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:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&&
+h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l===
+"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[];
+if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||
+typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h<B.length;h++){D=B[h];if(d.guid===D.guid){if(l||s.test(D.namespace)){e==null&&B.splice(h--,1);v.remove&&v.remove.call(a,D)}if(e!=null)break}}if(B.length===0||e!=null&&B.length===1){if(!v.teardown||
+v.teardown.call(a,n)===false)c.removeEvent(a,f,w.handle);delete G[f]}}else for(h=0;h<B.length;h++){D=B[h];if(l||s.test(D.namespace)){c.event.remove(a,v,D.handler,h);B.splice(h--,1)}}}if(c.isEmptyObject(G)){if(b=w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,H);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=
+f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===
+false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e;
+d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f<k;f++){var l=d[f];if(b||e.test(l.namespace)){a.handler=l.handler;a.data=
+l.data;a.handleObj=l;l=l.handler.apply(this,h);if(l!==A){a.result=l;if(l===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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||u;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=u.documentElement;d=u.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==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==A)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){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ga,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
+Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=u.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};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=
+c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else 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:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
+var ta=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},ua=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?ua:ta,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?ua:ta)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=A;return ja("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=A;return ja("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
+va=function(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(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired=
+A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.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 Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type===
+"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]===
+0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
+a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.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(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var wa={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var k,l=0,n,s,v=h||this.selector;h=h?this:c(this.context);if(typeof d===
+"object"&&!d.preventDefault){for(k in d)h[b](k,e,d[k],v);return this}if(c.isFunction(e)){f=e;e=A}for(d=(d||"").split(" ");(k=d[l++])!=null;){n=X.exec(k);s="";if(n){s=n[0];k=k.replace(X,"")}if(k==="hover")d.push("mouseenter"+s,"mouseleave"+s);else{n=k;if(k==="focus"||k==="blur"){d.push(wa[k]+s);k+=s}else k=(wa[k]||k)+s;if(b==="live"){s=0;for(var B=h.length;s<B;s++)c.event.add(h[s],"live."+Y(k,v),{data:e,selector:v,handler:f,origType:k,origHandler:f,preType:n})}else h.unbind("live."+Y(k,v),f)}}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,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",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,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1&&!q){x.sizcache=o;x.sizset=p}if(x.nodeName.toLowerCase()===j){C=x;break}x=x[g]}m[p]=C}}}function b(g,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1){if(!q){x.sizcache=o;x.sizset=p}if(typeof j!=="string"){if(x===j){C=true;break}}else if(l.filter(j,
+[x]).length>0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3];
+break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr,
+t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h=
+k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*"));
+return{set:m,expr:g}};l.filter=function(g,j,o,m){for(var p=g,q=[],t=j,x,C,P=j&&j[0]&&l.isXML(j[0]);g&&j.length;){for(var N in n.filter)if((x=n.leftMatch[N].exec(g))!=null&&x[2]){var R=n.filter[N],Q,L;L=x[1];C=false;x.splice(1,1);if(L.substr(L.length-1)!=="\\"){if(t===q)q=[];if(n.preFilter[N])if(x=n.preFilter[N](x,t,o,q,m,P)){if(x===true)continue}else C=Q=true;if(x)for(var i=0;(L=t[i])!=null;i++)if(L){Q=R(L,x,i,t);var r=m^!!Q;if(o&&Q!=null)if(r)C=true;else t[i]=false;else if(r){q.push(L);C=true}}if(Q!==
+A){o||(t=q);g=g.replace(n.match[N],"");if(!C)return[];break}}}if(g===p)if(C==null)l.error(g);else break;p=g}return t};l.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=l.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,j){var o=typeof j==="string",m=o&&!/\W/.test(j);o=o&&!m;if(m)j=j.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=o||q&&q.nodeName.toLowerCase()===
+j?q||false:q===j}o&&l.filter(j,g,true)},">":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p<q;p++){if(m=g[p]){o=m.parentNode;g[p]=o.nodeName.toLowerCase()===j?o:false}}else{for(;p<q;p++)if(m=g[p])g[p]=o?m.parentNode:m.parentNode===j;o&&l.filter(j,g,true)}},"":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q=j=j.toLowerCase();p=a}p("parentNode",j,m,g,q,o)},"~":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q=
+j=j.toLowerCase();p=a}p("previousSibling",j,m,g,q,o)}},find:{ID:function(g,j,o){if(typeof j.getElementById!=="undefined"&&!o)return(g=j.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,j){if(typeof j.getElementsByName!=="undefined"){for(var o=[],m=j.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&o.push(m[p]);return o.length===0?null:o}},TAG:function(g,j){return j.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,j,o,m,p,q){g=" "+g[1].replace(/\\/g,
+"")+" ";if(q)return g;q=0;for(var t;(t=j[q])!=null;q++)if(t)if(p^(t.className&&(" "+t.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))o||m.push(t);else if(o)j[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 j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o,
+m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||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,j,o){return!!l(o[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,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return j<o[3]-0},gt:function(g,j,o){return j>o[3]-0},nth:function(g,j,o){return o[3]-
+0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o<m;o++)if(j[o]===g)return false;return true}else l.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,j){var o=j[1],m=g;switch(o){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(o===
+"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":o=j[2];var p=j[3];if(o===1&&p===0)return true;var q=j[0],t=g.parentNode;if(t&&(t.sizcache!==q||!g.nodeIndex)){var x=0;for(m=t.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++x;t.sizcache=q}m=g.nodeIndex-p;return o===0?m===0:m%o===0&&m/o>=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
+j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]];
+if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o,
+g);else if(typeof g.length==="number")for(var p=g.length;m<p;m++)o.push(g[m]);else for(;g[m];m++)o.push(g[m]);return o}}var w,G;if(u.documentElement.compareDocumentPosition)w=function(g,j){if(g===j){h=true;return 0}if(!g.compareDocumentPosition||!j.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(j)&4?-1:1};else{w=function(g,j){var o=[],m=[],p=g.parentNode,q=j.parentNode,t=p;if(g===j){h=true;return 0}else if(p===q)return G(g,j);else if(p){if(!q)return 1}else return-1;
+for(;t;){o.unshift(t);t=t.parentNode}for(t=q;t;){m.unshift(t);t=t.parentNode}p=o.length;q=m.length;for(t=0;t<p&&t<q;t++)if(o[t]!==m[t])return G(o[t],m[t]);return t===p?G(g,m[t],-1):G(o[t],j,1)};G=function(g,j,o){if(g===j)return o;for(g=g.nextSibling;g;){if(g===j)return-1;g=g.nextSibling}return 1}}l.getText=function(g){for(var j="",o,m=0;g[m];m++){o=g[m];if(o.nodeType===3||o.nodeType===4)j+=o.nodeValue;else if(o.nodeType!==8)j+=l.getText(o.childNodes)}return j};(function(){var g=u.createElement("div"),
+j="script"+(new Date).getTime();g.innerHTML="<a name='"+j+"'/>";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g);
+o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&&
+function(){var g=l,j=u.createElement("div");j.innerHTML="<p class='TEST'></p>";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o];
+j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.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(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g,
+j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p<t;p++)l(g,q[p],o);return l.filter(m,o)};c.find=l;c.expr=l.selectors;c.expr[":"]=c.expr.filters;c.unique=l.uniqueSort;c.text=l.getText;c.isXMLDoc=l.isXML;c.contains=l.contains})();var Wa=/Until$/,Xa=/^(?:parents|prevUntil|prevAll)/,Ya=/,/,Ja=/^.[^:#\[\.,]*$/,Za=Array.prototype.slice,$a=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("",
+"find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var k=0;k<d;k++)if(b[k]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(ka(this,a,false),"not",a)},filter:function(a){return this.pushStack(ka(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,
+b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(k?k.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||
+!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},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){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},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,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}});
+c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===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 xa=/ jQuery\d+="(?:\d+|null)"/g,
+$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/<tbody/i,bb=/<|&#?\w+;/,Aa=/<(?:script|object|embed|option|style)/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,cb=/\=([^="'>\s]+\/)>/g,O={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,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(a));return c.text(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){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});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}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));
+c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($,
+"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?
+this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")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){var e,f,h=a[0],k=[],l;if(!c.support.checkClone&&arguments.length===3&&typeof h==="string"&&Ba.test(h))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(h))return this.each(function(s){var v=c(this);a[0]=h.call(this,s,b?v.html():A);v.domManip(a,b,d)});if(this[0]){e=h&&h.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);l=e.fragment;if(f=l.childNodes.length===1?l=l.firstChild:
+l.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var n=this.length;f<n;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):this[f]:this[f],f>0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone||
+!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=
+d.length;f<h;f++){var k=(f>0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1></$2>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default,
+s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]==="<table>"&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&&
+c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]?
+c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this;
+return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]||
+h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=
+e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":
+b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],
+h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+mb=/^(?:select|textarea)/i,nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ob=/^(?:GET|HEAD|DELETE)$/,Na=/\[\]$/,T=/\=\?(&|$)/,ia=/\?/,pb=/([?&])_=[^&]*/,qb=/^(\w+:)?\/\/([^\/?#]+)/,rb=/%20/g,sb=/#.*$/,Ea=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ea)return Ea.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=
+b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(k,l){if(l==="success"||l==="notmodified")h.html(f?c("<div>").append(k.responseText.replace(lb,"")).find(f):k.responseText);d&&h.each(d,[k.responseText,l,k])}});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||mb.test(this.nodeName)||nb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).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,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
+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,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},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:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
+script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),k=ob.test(h);b.url=b.url.replace(sb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ia.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
+!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+kb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var l=E[d];E[d]=function(m){f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);if(c.isFunction(l))l(m);else{E[d]=A;try{delete E[d]}catch(p){}}v&&v.removeChild(B)}}if(b.dataType==="script"&&b.cache===null)b.cache=
+false;if(b.cache===false&&h==="GET"){var n=c.now(),s=b.url.replace(pb,"$1_="+n);b.url=s+(s===b.url?(ia.test(b.url)?"&":"?")+"_="+n:"")}if(b.data&&h==="GET")b.url+=(ia.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");n=(n=qb.exec(b.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(b.dataType==="script"&&h==="GET"&&n){var v=u.getElementsByTagName("head")[0]||u.documentElement,B=u.createElement("script");if(b.scriptCharset)B.charset=b.scriptCharset;B.src=
+b.url;if(!d){var D=false;B.onload=B.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);B.onload=B.onreadystatechange=null;v&&B.parentNode&&v.removeChild(B)}}}v.insertBefore(B,v.firstChild);return A}var H=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!k||a&&a.contentType)w.setRequestHeader("Content-Type",
+b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}n||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(G){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
+c.triggerGlobal(b,"ajaxSend",[w,b]);var M=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){H||c.handleComplete(b,w,e,f);H=true;if(w)w.onreadystatechange=c.noop}else if(!H&&w&&(w.readyState===4||m==="timeout")){H=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
+c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&g.call&&g.call(w);M("abort")}}catch(j){}b.async&&b.timeout>0&&setTimeout(function(){w&&!H&&M("timeout")},b.timeout);try{w.send(k||b.data==null?null:b.data)}catch(o){c.handleError(b,w,null,o);c.handleComplete(b,w,e,f)}b.async||M();return w}},param:function(a,b){var d=[],e=function(h,k){k=c.isFunction(k)?k():k;d[d.length]=encodeURIComponent(h)+
+"="+encodeURIComponent(k)};if(b===A)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)ca(f,a[f],b,e);return d.join("&").replace(rb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a,
+b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag");
+if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(E.ActiveXObject)c.ajaxSettings.xhr=
+function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var da={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)(.*)$/,aa,na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",3),a,b,d);else{a=
+0;for(b=this.length;a<b;a++){if(!c.data(this[a],"olddisplay")&&this[a].style.display==="none")this[a].style.display="";this[a].style.display===""&&c.css(this[a],"display")==="none"&&c.data(this[a],"olddisplay",oa(this[a].nodeName))}for(a=0;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",d)}for(a=
+0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(f.complete);
+return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),k,l=this.nodeType===1,n=l&&c(this).is(":hidden"),s=this;for(k in a){var v=c.camelCase(k);if(k!==v){a[v]=a[k];delete a[k];k=v}if(a[k]==="hide"&&n||a[k]==="show"&&!n)return h.complete.call(this);if(l&&(k==="height"||k==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(oa(this.nodeName)===
+"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[k])){(h.specialEasing=h.specialEasing||{})[k]=a[k][1];a[k]=a[k][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(B,D){var H=new c.fx(s,h,B);if(tb.test(D))H[D==="toggle"?n?"show":"hide":D](a);else{var w=ub.exec(D),G=H.cur(true)||0;if(w){var M=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(s,B,(M||1)+g);
+G=(M||1)/H.cur(true)*G;c.style(s,B,G+g)}if(w[1])M=(w[1]==="-="?-1:1)*M+G;H.custom(G,M,g)}else H.custom(G,D,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
+d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
+Math.PI)/2+0.5)*e+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)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(h){return f.step(h)}
+this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;a=c.fx;e.elem=this.elem;if(e()&&c.timers.push(e)&&!aa)aa=setInterval(a.tick,a.interval)},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=c.now(),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 e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,n){f.style["overflow"+n]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
+this.options.show)for(var k in this.options.curAnim)c.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,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()},interval:13,stop:function(){clearInterval(aa);aa=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};var vb=/^t(?:able|d|h)$/i,Fa=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in u.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(k){c.offset.setOffset(this,a,k)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=ea(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
+h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,e=b.ownerDocument,f,h=e.documentElement,k=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;
+for(var l=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==k&&b!==h;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;f=e?e.getComputedStyle(b,null):b.currentStyle;l-=b.scrollTop;n-=b.scrollLeft;if(b===d){l+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&vb.test(b.nodeName))){l+=parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){l+=
+parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}f=f}if(f.position==="relative"||f.position==="static"){l+=k.offsetTop;n+=k.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){l+=Math.max(h.scrollTop,k.scrollTop);n+=Math.max(h.scrollLeft,k.scrollLeft)}return{top:l,left:n}};c.offset={initialize:function(){var a=u.body,b=u.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||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;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
+f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;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.css(a,
+"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a,
+e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.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(e){var f=this[0],h;if(!f)return null;if(e!==A)return this.each(function(){if(h=ea(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ea(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
+c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(h){var k=c(this);k[d](e.call(this,h,k[d]()))});return c.isWindow(f)?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+
+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):e===A?parseFloat(c.css(f,d)):this.css(d,typeof e==="string"?e:e+"px")}})})(window);
Index: Dev/branches/Demo/d3/lib/polymaps/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/polymaps/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/polymaps/LICENSE	(revision 225)
@@ -0,0 +1,28 @@
+Copyright (c) 2010, SimpleGeo and Stamen Design
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of SimpleGeo nor the names of its contributors may be used
+  to endorse or promote products derived from this software without specific
+  prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL SIMPLEGEO BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
Index: Dev/branches/Demo/d3/lib/protovis/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/protovis/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/protovis/LICENSE	(revision 225)
@@ -0,0 +1,27 @@
+Copyright (c) 2010, Stanford Visualization Group
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of Stanford University nor the names of its contributors
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: Dev/branches/Demo/d3/lib/science/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/science/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/science/LICENSE	(revision 225)
@@ -0,0 +1,26 @@
+Copyright (c) 2011, Jason Davies
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+  * The name Jason Davies may not be used to endorse or promote products
+    derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL JASON DAVIES BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: Dev/branches/Demo/d3/lib/science/science.js
===================================================================
--- Dev/branches/Demo/d3/lib/science/science.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/science/science.js	(revision 225)
@@ -0,0 +1,5 @@
+(function(){science = {version: "0.0.1"}; // semver
+science.functor = function(v) {
+  return typeof v === "function" ? v : function() { return v; };
+};
+})()
Index: Dev/branches/Demo/d3/lib/science/science.min.js
===================================================================
--- Dev/branches/Demo/d3/lib/science/science.min.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/science/science.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){science={version:"0.0.1"},science.functor=function(a){return typeof a=="function"?a:function(){return a}}})()
Index: Dev/branches/Demo/d3/lib/science/science.stats.js
===================================================================
--- Dev/branches/Demo/d3/lib/science/science.stats.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/science/science.stats.js	(revision 225)
@@ -0,0 +1,166 @@
+(function(){science.stats = {};
+// Bandwidth selectors for Gaussian kernels.
+// Based on R's implementations in `stats.bw`.
+science.stats.bandwidth = {
+
+  // Silverman, B. W. (1986) Density Estimation. London: Chapman and Hall.
+  nrd0: function(x) {
+    var hi = Math.sqrt(science.stats.variance(x));
+    if (!(lo = Math.min(hi, science.stats.iqr(x) / 1.34)))
+      (lo = hi) || (lo = Math.abs(x[1])) || (lo = 1);
+    return .9 * lo * Math.pow(x.length, -.2);
+  },
+
+  // Scott, D. W. (1992) Multivariate Density Estimation: Theory, Practice, and
+  // Visualization. Wiley.
+  nrd: function(x) {
+    var h = science.stats.iqr(x) / 1.34;
+    return 1.06 * Math.min(Math.sqrt(science.stats.variance(x)), h)
+      * Math.pow(x.length, -1/5);
+  }
+};
+// See <http://en.wikipedia.org/wiki/Kernel_(statistics)>.
+science.stats.kernel = {
+  uniform: function(u) {
+    if (u <= 1 && u >= -1) return .5;
+    return 0;
+  },
+  triangular: function(u) {
+    if (u <= 1 && u >= -1) return 1 - Math.abs(u);
+    return 0;
+  },
+  epanechnikov: function(u) {
+    if (u <= 1 && u >= -1) return .75 * (1 - u * u);
+    return 0;
+  },
+  quartic: function(u) {
+    if (u <= 1 && u >= -1) {
+      var tmp = 1 - u * u;
+      return (15 / 16) * tmp * tmp;
+    }
+    return 0;
+  },
+  triweight: function(u) {
+    if (u <= 1 && u >= -1) {
+      var tmp = 1 - u * u;
+      return (35 / 32) * tmp * tmp * tmp;
+    }
+    return 0;
+  },
+  gaussian: function(u) {
+    return 1 / Math.sqrt(2 * Math.PI) * Math.exp(-.5 * u * u);
+  },
+  cosine: function(u) {
+    if (u <= 1 && u >= -1) return Math.PI / 4 * Math.cos(Math.PI / 2 * u);
+    return 0;
+  }
+};
+// http://exploringdata.net/den_trac.htm
+science.stats.kde = function() {
+  var kernel = science.stats.kernel.gaussian,
+      sample = [],
+      bandwidth = science.stats.bandwidth.nrd;
+
+  function kde(points, i) {
+    var bw = bandwidth.call(this, sample);
+    return points.map(function(x) {
+      var i = -1,
+          y = 0,
+          n = sample.length;
+      while (++i < n) {
+        y += kernel((x - sample[i]) / bw);
+      }
+      return [x, y / bw / n];
+    });
+  }
+
+  kde.kernel = function(x) {
+    if (!arguments.length) return kernel;
+    kernel = x;
+    return kde;
+  };
+
+  kde.sample = function(x) {
+    if (!arguments.length) return sample;
+    sample = x;
+    return kde;
+  };
+
+  kde.bandwidth = function(x) {
+    if (!arguments.length) return bandwidth;
+    bandwidth = science.functor(x);
+    return kde;
+  };
+
+  return kde;
+};
+science.stats.iqr = function(x) {
+  var quartiles = science.stats.quantiles(x, [.25, .75]);
+  return quartiles[1] - quartiles[0];
+};
+// Welford's algorithm.
+science.stats.mean = function(x) {
+  var n = x.length;
+  if (n === 0) return NaN;
+  var m = 0,
+      i = -1;
+  while (++i < n) m += (x[i] - m) / (i + 1);
+  return m;
+};
+science.stats.median = function(x) {
+  return science.stats.quantiles(x, [.5])[0];
+};
+science.stats.mode = function(x) {
+  x = x.slice().sort(science.ascending);
+  var mode,
+      n = x.length,
+      i = -1,
+      l = i,
+      last = null,
+      max = 0,
+      tmp,
+      v;
+  while (++i < n) {
+    if ((v = x[i]) !== last) {
+      if ((tmp = i - l) > max) {
+        max = tmp;
+        mode = last;
+      }
+      last = v;
+      l = i;
+    }
+  }
+  return mode;
+};
+// Uses R's quantile algorithm type=7.
+science.stats.quantiles = function(d, quantiles) {
+  d = d.slice().sort(science.ascending);
+  var n_1 = d.length - 1;
+  return quantiles.map(function(q) {
+    if (q === 0) return d[0];
+    else if (q === 1) return d[n_1];
+
+    var index = 1 + q * n_1,
+        lo = Math.floor(index),
+        h = index - lo,
+        a = d[lo - 1];
+
+    return h === 0 ? a : a + h * (d[lo] - a);
+  });
+};
+// Unbiased estimate of a sample's variance.
+// Also known as the sample variance, where the denominator is n - 1.
+science.stats.variance = function(x) {
+  var n = x.length;
+  if (n < 1) return NaN;
+  if (n === 1) return 0;
+  var mean = science.stats.mean(x),
+      i = -1,
+      s = 0;
+  while (++i < n) {
+    var v = x[i] - mean;
+    s += v * v;
+  }
+  return s / (n - 1);
+};
+})()
Index: Dev/branches/Demo/d3/lib/science/science.stats.min.js
===================================================================
--- Dev/branches/Demo/d3/lib/science/science.stats.min.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/science/science.stats.min.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){science.stats={},science.stats.bandwidth={nrd0:function(a){var b=Math.sqrt(science.stats.variance(a));(lo=Math.min(b,science.stats.iqr(a)/1.34))||(lo=b)||(lo=Math.abs(a[1]))||(lo=1);return.9*lo*Math.pow(a.length,-0.2)},nrd:function(a){var b=science.stats.iqr(a)/1.34;return 1.06*Math.min(Math.sqrt(science.stats.variance(a)),b)*Math.pow(a.length,-0.2)}},science.stats.kernel={uniform:function(a){if(a<=1&&a>=-1)return.5;return 0},triangular:function(a){if(a<=1&&a>=-1)return 1-Math.abs(a);return 0},epanechnikov:function(a){if(a<=1&&a>=-1)return.75*(1-a*a);return 0},quartic:function(a){if(a<=1&&a>=-1){var b=1-a*a;return.9375*b*b}return 0},triweight:function(a){if(a<=1&&a>=-1){var b=1-a*a;return 35/32*b*b*b}return 0},gaussian:function(a){return 1/Math.sqrt(2*Math.PI)*Math.exp(-0.5*a*a)},cosine:function(a){if(a<=1&&a>=-1)return Math.PI/4*Math.cos(Math.PI/2*a);return 0}},science.stats.kde=function(){function d(d,e){var f=c.call(this,b);return d.map(function(c){var d=-1,e=0,g=b.length;while(++d<g)e+=a((c-b[d])/f);return[c,e/f/g]})}var a=science.stats.kernel.gaussian,b=[],c=science.stats.bandwidth.nrd;d.kernel=function(b){if(!arguments.length)return a;a=b;return d},d.sample=function(a){if(!arguments.length)return b;b=a;return d},d.bandwidth=function(a){if(!arguments.length)return c;c=science.functor(a);return d};return d},science.stats.iqr=function(a){var b=science.stats.quantiles(a,[.25,.75]);return b[1]-b[0]},science.stats.mean=function(a){var b=a.length;if(b===0)return NaN;var c=0,d=-1;while(++d<b)c+=(a[d]-c)/(d+1);return c},science.stats.median=function(a){return science.stats.quantiles(a,[.5])[0]},science.stats.mode=function(a){a=a.slice().sort(science.ascending);var b,c=a.length,d=-1,e=d,f=null,g=0,h,i;while(++d<c)(i=a[d])!==f&&((h=d-e)>g&&(g=h,b=f),f=i,e=d);return b},science.stats.quantiles=function(a,b){a=a.slice().sort(science.ascending);var c=a.length-1;return b.map(function(b){if(b===0)return a[0];if(b===1)return a[c];var e=1+b*c,f=Math.floor(e),g=e-f,h=a[f-1];return g===0?h:h+g*(a[f]-h)})},science.stats.variance=function(a){var b=a.length;if(b<1)return NaN;if(b===1)return 0;var c=science.stats.mean(a),d=-1,e=0;while(++d<b){var f=a[d]-c;e+=f*f}return e/(b-1)}})()
Index: Dev/branches/Demo/d3/lib/sizzle/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/sizzle/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/sizzle/LICENSE	(revision 225)
@@ -0,0 +1,24 @@
+Copyright (c) 2009, John Resig
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the <organization> nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY John Resig ''AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: Dev/branches/Demo/d3/lib/sizzle/sizzle.js
===================================================================
--- Dev/branches/Demo/d3/lib/sizzle/sizzle.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/sizzle/sizzle.js	(revision 225)
@@ -0,0 +1,1376 @@
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, 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 || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+	
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var m, set, checkSet, extra, ret, cur, pop, i,
+		prune = true,
+		contextXML = Sizzle.isXML( context ),
+		parts = [],
+		soFar = selector;
+	
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec( "" );
+		m = chunker.exec( soFar );
+
+		if ( m ) {
+			soFar = m[3];
+		
+			parts.push( m[1] );
+		
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	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]) ) {
+
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set )[0] :
+				ret.set[0];
+		}
+
+		if ( context ) {
+			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 ) {
+				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 ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+
+		} else {
+			for ( 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.matchesSelector = function( node, expr ) {
+	return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+	var set;
+
+	if ( !expr ) {
+		return [];
+	}
+
+	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+		var match,
+			type = Expr.order[i];
+		
+		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 = typeof context.getElementsByTagName !== "undefined" ?
+			context.getElementsByTagName( "*" ) :
+			[];
+	}
+
+	return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+	var match, anyFound,
+		old = expr,
+		result = [],
+		curLoop = set,
+		isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+	while ( expr && set.length ) {
+		for ( var type in Expr.filter ) {
+			if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+				var found, item,
+					filter = Expr.filter[ type ],
+					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 ) {
+				Sizzle.error( expr );
+
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw "Syntax error, unrecognized expression: " + msg;
+};
+
+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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+		CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+		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 elem,
+				isPartStr = typeof part === "string",
+				i = 0,
+				l = checkSet.length;
+
+			if ( isPartStr && !/\W/.test( part ) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+
+			} else {
+				for ( ; i < l; i++ ) {
+					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 nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !/\W/.test(part) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+		},
+
+		"~": function( checkSet, part, isXML ) {
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !/\W/.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				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]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [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 ) {
+			if ( typeof context.getElementsByTagName !== "undefined" ) {
+				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\r]/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" ) {
+				if ( !match[2] ) {
+					Sizzle.error( match[0] );
+				}
+
+				match[2] = match[2].replace(/^\+|\s*/g, '');
+
+				// 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;
+			}
+			else if ( match[2] ) {
+				Sizzle.error( match[0] );
+			}
+
+			// TODO: Move to normal caching system
+			match[0] = done++;
+
+			return match;
+		},
+
+		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+			var name = match[1] = match[1].replace(/\\/g, "");
+			
+			if ( !isXML && Expr.attrMap[name] ) {
+				match[1] = Expr.attrMap[name];
+			}
+
+			// Handle if an un-quoted value was used
+			match[4] = ( match[4] || match[5] || "" ).replace(/\\/g, "");
+
+			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 || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+
+			} else {
+				Sizzle.error( 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,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+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, fescape) );
+}
+
+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.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+	makeArray = function( array, results ) {
+		var i = 0,
+			ret = results || [];
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+
+} else {
+	sortOrder = function( a, b ) {
+		var al, bl,
+			ap = [],
+			bp = [],
+			aup = a.parentNode,
+			bup = b.parentNode,
+			cur = aup;
+
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( 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 += Sizzle.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(),
+		root = document.documentElement;
+
+	form.innerHTML = "<a name='" + id + "'/>";
+
+	// Inject it into the root element, check its status, and remove it quickly
+	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 );
+
+	// release memory in IE
+	root = form = null;
+})();
+
+(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 );
+		};
+	}
+
+	// release memory in IE
+	div = null;
+})();
+
+if ( document.querySelectorAll ) {
+	(function(){
+		var oldSizzle = Sizzle,
+			div = document.createElement("div"),
+			id = "__sizzle__";
+
+		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 && !Sizzle.isXML(context) ) {
+				// See if we find a selector to speed up
+				var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+				
+				if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+					// Speed-up: Sizzle("TAG")
+					if ( match[1] ) {
+						return makeArray( context.getElementsByTagName( query ), extra );
+					
+					// Speed-up: Sizzle(".CLASS")
+					} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+						return makeArray( context.getElementsByClassName( match[2] ), extra );
+					}
+				}
+				
+				if ( context.nodeType === 9 ) {
+					// Speed-up: Sizzle("body")
+					// The body element only exists once, optimize finding it
+					if ( query === "body" && context.body ) {
+						return makeArray( [ context.body ], extra );
+						
+					// Speed-up: Sizzle("#ID")
+					} else if ( match && match[3] ) {
+						var elem = context.getElementById( match[3] );
+
+						// Check parentNode to catch when Blackberry 4.6 returns
+						// nodes that are no longer in the document #6963
+						if ( elem && elem.parentNode ) {
+							// Handle the case where IE and Opera return items
+							// by name instead of ID
+							if ( elem.id === match[3] ) {
+								return makeArray( [ elem ], extra );
+							}
+							
+						} else {
+							return makeArray( [], extra );
+						}
+					}
+					
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var old = context.getAttribute( "id" ),
+						nid = old || id,
+						hasParent = context.parentNode,
+						relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+					if ( !old ) {
+						context.setAttribute( "id", nid );
+					} else {
+						nid = nid.replace( /'/g, "\\$&" );
+					}
+					if ( relativeHierarchySelector && hasParent ) {
+						context = context.parentNode;
+					}
+
+					try {
+						if ( !relativeHierarchySelector || hasParent ) {
+							return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+						}
+
+					} catch(pseudoError) {
+					} finally {
+						if ( !old ) {
+							context.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		// release memory in IE
+		div = null;
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+		pseudoWorks = false;
+
+	try {
+		// This should fail with an exception
+		// Gecko does not error, returns false instead
+		matches.call( document.documentElement, "[test!='']:sizzle" );
+	
+	} catch( pseudoError ) {
+		pseudoWorks = true;
+	}
+
+	if ( matches ) {
+		Sizzle.matchesSelector = function( node, expr ) {
+			// Make sure that attribute selectors are quoted
+			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			if ( !Sizzle.isXML( node ) ) {
+				try { 
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+						return matches.call( node, expr );
+					}
+				} catch(e) {}
+			}
+
+			return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(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]);
+		}
+	};
+
+	// release memory in IE
+	div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			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 ) {
+			var match = false;
+			
+			elem = elem[dir];
+
+			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;
+		}
+	}
+}
+
+if ( document.documentElement.contains ) {
+	Sizzle.contains = function( a, b ) {
+		return a !== b && (a.contains ? a.contains(b) : true);
+	};
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+	Sizzle.contains = function( a, b ) {
+		return !!(a.compareDocumentPosition(b) & 16);
+	};
+
+} else {
+	Sizzle.contains = function() {
+		return false;
+	};
+}
+
+Sizzle.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 match,
+		tmpSet = [],
+		later = "",
+		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
+
+window.Sizzle = Sizzle;
+
+})();
Index: Dev/branches/Demo/d3/lib/sizzle/sizzle.min.js
===================================================================
--- Dev/branches/Demo/d3/lib/sizzle/sizzle.min.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/sizzle/sizzle.min.js	(revision 225)
@@ -0,0 +1,28 @@
+(function(){function y(a,b,c,d,e,f){e=0;for(var h=d.length;e<h;e++){var g=d[e];if(g){var l=false;for(g=g[a];g;){if(g.sizcache===c){l=d[g.sizset];break}if(g.nodeType===1&&!f){g.sizcache=c;g.sizset=e}if(g.nodeName.toLowerCase()===b){l=g;break}g=g[a]}d[e]=l}}}function z(a,b,c,d,e,f){e=0;for(var h=d.length;e<h;e++){var g=d[e];if(g){var l=false;for(g=g[a];g;){if(g.sizcache===c){l=d[g.sizset];break}if(g.nodeType===1){if(!f){g.sizcache=c;g.sizset=e}if(typeof b!=="string"){if(g===b){l=true;break}}else if(i.filter(b,
+[g]).length>0){l=g;break}}g=g[a]}d[e]=l}}}var w=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,x=0,A=Object.prototype.toString,s=false,B=true;[0,0].sort(function(){B=false;return 0});var i=function(a,b,c,d){c=c||[];var e=b=b||document;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string")return c;var f,h,g,l,p,n=true,m=i.isXML(b),k=[],t=a;do{w.exec("");if(f=w.exec(t)){t=f[3];k.push(f[1]);if(f[2]){l=
+f[3];break}}}while(f);if(k.length>1&&E.exec(a))if(k.length===2&&j.relative[k[0]])h=C(k[0]+k[1],b);else for(h=j.relative[k[0]]?[b]:i(k.shift(),b);k.length;){a=k.shift();if(j.relative[a])a+=k.shift();h=C(a,h)}else{if(!d&&k.length>1&&b.nodeType===9&&!m&&j.match.ID.test(k[0])&&!j.match.ID.test(k[k.length-1])){f=i.find(k.shift(),b,m);b=f.expr?i.filter(f.expr,f.set)[0]:f.set[0]}if(b){f=d?{expr:k.pop(),set:o(d)}:i.find(k.pop(),k.length===1&&(k[0]==="~"||k[0]==="+")&&b.parentNode?b.parentNode:b,m);h=f.expr?
+i.filter(f.expr,f.set):f.set;if(k.length>0)g=o(h);else n=false;for(;k.length;){f=p=k.pop();if(j.relative[p])f=k.pop();else p="";if(f==null)f=b;j.relative[p](g,f,m)}}else g=[]}g||(g=h);g||i.error(p||a);if(A.call(g)==="[object Array]")if(n)if(b&&b.nodeType===1)for(a=0;g[a]!=null;a++){if(g[a]&&(g[a]===true||g[a].nodeType===1&&i.contains(b,g[a])))c.push(h[a])}else for(a=0;g[a]!=null;a++)g[a]&&g[a].nodeType===1&&c.push(h[a]);else c.push.apply(c,g);else o(g,c);if(l){i(l,e,c,d);i.uniqueSort(c)}return c};
+i.uniqueSort=function(a){if(u){s=B;a.sort(u);if(s)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a};i.matches=function(a,b){return i(a,null,null,b)};i.matchesSelector=function(a,b){return i(b,null,null,[a]).length>0};i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e<f;e++){var h,g=j.order[e];if(h=j.leftMatch[g].exec(a)){var l=h[1];h.splice(1,1);if(l.substr(l.length-1)!=="\\"){h[1]=(h[1]||"").replace(/\\/g,"");d=j.find[g](h,b,c);if(d!=null){a=a.replace(j.match[g],
+"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}};i.filter=function(a,b,c,d){for(var e,f,h=a,g=[],l=b,p=b&&b[0]&&i.isXML(b[0]);a&&b.length;){for(var n in j.filter)if((e=j.leftMatch[n].exec(a))!=null&&e[2]){var m,k,t=j.filter[n];k=e[1];f=false;e.splice(1,1);if(k.substr(k.length-1)!=="\\"){if(l===g)g=[];if(j.preFilter[n])if(e=j.preFilter[n](e,l,c,g,d,p)){if(e===true)continue}else f=m=true;if(e)for(var v=0;(k=l[v])!=null;v++)if(k){m=
+t(k,e,v,l);var D=d^!!m;if(c&&m!=null)if(D)f=true;else l[v]=false;else if(D){g.push(k);f=true}}if(m!==undefined){c||(l=g);a=a.replace(j.match[n],"");if(!f)return[];break}}}if(a===h)if(f==null)i.error(a);else break;h=a}return l};i.error=function(a){throw"Syntax error, unrecognized expression: "+a;};var j=i.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!/\W/.test(b);c=c&&
+!d;if(d)b=b.toLowerCase();d=0;for(var e=a.length,f;d<e;d++)if(f=a[d]){for(;(f=f.previousSibling)&&f.nodeType!==1;);a[d]=c||f&&f.nodeName.toLowerCase()===b?f||false:f===b}c&&i.filter(b,a,true)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b))for(b=b.toLowerCase();e<f;e++){if(c=a[e]){c=c.parentNode;a[e]=c.nodeName.toLowerCase()===b?c:false}}else{for(;e<f;e++)if(c=a[e])a[e]=d?c.parentNode:c.parentNode===b;d&&i.filter(b,a,true)}},"":function(a,b,c){var d,e=x++,f=z;if(typeof b===
+"string"&&!/\W/.test(b)){d=b=b.toLowerCase();f=y}f("parentNode",b,e,a,d,c)},"~":function(a,b,c){var d,e=x++,f=z;if(typeof b==="string"&&!/\W/.test(b)){d=b=b.toLowerCase();f=y}f("previousSibling",b,e,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c)return(a=b.getElementById(a[1]))&&a.parentNode?[a]:[]},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){for(var c=[],d=b.getElementsByName(a[1]),e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);
+return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(/\\/g,"")+" ";if(f)return a;f=0;for(var h;(h=b[f])!=null;f++)if(h)if(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0))c||d.push(h);else if(c)b[f]=false;return false},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a){return a[1].toLowerCase()},CHILD:function(a){if(a[1]===
+"nth"){a[2]||i.error(a[0]);a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=x++;return a},ATTR:function(a,b,c,d,e,f){b=a[1]=a[1].replace(/\\/g,"");if(!f&&j.attrMap[b])a[1]=j.attrMap[b];a[4]=(a[4]||a[5]||"").replace(/\\/g,"");if(a[2]==="~=")a[4]=" "+a[4]+" ";return a},PSEUDO:function(a,b,c,d,e){if(a[1]==="not")if((w.exec(a[3])||"").length>
+1||/^\w/.test(a[3]))a[3]=i(a[3],null,null,b);else{a=i.filter(a[3],b,c,true^e);c||d.push.apply(d,a);return false}else if(j.match.POS.test(a[0])||j.match.CHILD.test(a[0]))return true;return a},POS:function(a){a.unshift(true);return a}},filters:{enabled:function(a){return a.disabled===false&&a.type!=="hidden"},disabled:function(a){return a.disabled===true},checked:function(a){return a.checked===true},selected:function(a){return a.selected===true},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},
+has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()===
+"button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);else if(e==="contains")return(a.textContent||
+a.innerText||i.getText([a])||"").indexOf(b[3])>=0;else if(e==="not"){b=b[3];c=0;for(d=b.length;c<d;c++)if(b[c]===a)return false;return true}else i.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case "only":case "first":for(;d=d.previousSibling;)if(d.nodeType===1)return false;if(c==="first")return true;d=a;case "last":for(;d=d.nextSibling;)if(d.nodeType===1)return false;return true;case "nth":c=b[2];var e=b[3];if(c===1&&e===0)return true;var f=b[0],h=a.parentNode;if(h&&(h.sizcache!==f||!a.nodeIndex)){var g=
+0;for(d=h.firstChild;d;d=d.nextSibling)if(d.nodeType===1)d.nodeIndex=++g;h.sizcache=f}d=a.nodeIndex-e;return c===0?d===0:d%c===0&&d/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1];c=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c);var d=c+"",e=b[2],f=b[4];
+return c==null?e==="!=":e==="="?d===f:e==="*="?d.indexOf(f)>=0:e==="~="?(" "+d+" ").indexOf(f)>=0:!f?d&&c!==false:e==="!="?d!==f:e==="^="?d.indexOf(f)===0:e==="$="?d.substr(d.length-f.length)===f:e==="|="?d===f||d.substr(0,f.length+1)===f+"-":false},POS:function(a,b,c,d){var e=j.setFilters[b[2]];if(e)return e(a,c,b,d)}}},E=j.match.POS,F=function(a,b){return"\\"+(b-0+1)},q;for(q in j.match){j.match[q]=RegExp(j.match[q].source+/(?![^\[]*\])(?![^\(]*\))/.source);j.leftMatch[q]=RegExp(/(^(?:.|\r|\n)*?)/.source+
+j.match[q].source.replace(/\\(\d+)/g,F))}var o=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(G){o=function(a,b){var c=0,d=b||[];if(A.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,r;if(document.documentElement.compareDocumentPosition)u=function(a,
+b){if(a===b){s=true;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1};else{u=function(a,b){var c,d,e=[],f=[];c=a.parentNode;d=b.parentNode;var h=c;if(a===b){s=true;return 0}else if(c===d)return r(a,b);else if(c){if(!d)return 1}else return-1;for(;h;){e.unshift(h);h=h.parentNode}for(h=d;h;){f.unshift(h);h=h.parentNode}c=e.length;d=f.length;for(h=0;h<c&&h<d;h++)if(e[h]!==f[h])return r(e[h],f[h]);return h===
+c?r(a,f[h],-1):r(e[h],b,1)};r=function(a,b,c){if(a===b)return c;for(a=a.nextSibling;a;){if(a===b)return-1;a=a.nextSibling}return 1}}i.getText=function(a){for(var b="",c,d=0;a[d];d++){c=a[d];if(c.nodeType===3||c.nodeType===4)b+=c.nodeValue;else if(c.nodeType!==8)b+=i.getText(c.childNodes)}return b};(function(){var a=document.createElement("div"),b="script"+(new Date).getTime(),c=document.documentElement;a.innerHTML="<a name='"+b+"'/>";c.insertBefore(a,c.firstChild);if(document.getElementById(b)){j.find.ID=
+function(d,e,f){if(typeof e.getElementById!=="undefined"&&!f)return(e=e.getElementById(d[1]))?e.id===d[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===d[1]?[e]:undefined:[]};j.filter.ID=function(d,e){var f=typeof d.getAttributeNode!=="undefined"&&d.getAttributeNode("id");return d.nodeType===1&&f&&f.nodeValue===e}}c.removeChild(a);c=a=null})();(function(){var a=document.createElement("div");a.appendChild(document.createComment(""));if(a.getElementsByTagName("*").length>
+0)j.find.TAG=function(b,c){var d=c.getElementsByTagName(b[1]);if(b[1]==="*"){for(var e=[],f=0;d[f];f++)d[f].nodeType===1&&e.push(d[f]);d=e}return d};a.innerHTML="<a href='#'></a>";if(a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#")j.attrHandle.href=function(b){return b.getAttribute("href",2)};a=null})();document.querySelectorAll&&function(){var a=i,b=document.createElement("div");b.innerHTML="<p class='TEST'></p>";if(!(b.querySelectorAll&&b.querySelectorAll(".TEST").length===
+0)){i=function(d,e,f,h){e=e||document;if(!h&&!i.isXML(e)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(d);if(g&&(e.nodeType===1||e.nodeType===9))if(g[1])return o(e.getElementsByTagName(d),f);else if(g[2]&&j.find.CLASS&&e.getElementsByClassName)return o(e.getElementsByClassName(g[2]),f);if(e.nodeType===9){if(d==="body"&&e.body)return o([e.body],f);else if(g&&g[3]){var l=e.getElementById(g[3]);if(l&&l.parentNode){if(l.id===g[3])return o([l],f)}else return o([],f)}try{return o(e.querySelectorAll(d),
+f)}catch(p){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){l=(g=e.getAttribute("id"))||"__sizzle__";var n=e.parentNode,m=/^\s*[+~]/.test(d);if(g)l=l.replace(/'/g,"\\$&");else e.setAttribute("id",l);if(m&&n)e=e.parentNode;try{if(!m||n)return o(e.querySelectorAll("[id='"+l+"'] "+d),f)}catch(k){}finally{g||e.removeAttribute("id")}}}return a(d,e,f,h)};for(var c in a)i[c]=a[c];b=null}}();(function(){var a=document.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||
+a.msMatchesSelector,c=false;try{b.call(document.documentElement,"[test!='']:sizzle")}catch(d){c=true}if(b)i.matchesSelector=function(e,f){f=f.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(e))try{if(c||!j.match.PSEUDO.test(f)&&!/!=/.test(f))return b.call(e,f)}catch(h){}return i(f,null,null,[e]).length>0}})();(function(){var a=document.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!a.getElementsByClassName||a.getElementsByClassName("e").length===
+0)){a.lastChild.className="e";if(a.getElementsByClassName("e").length!==1){j.order.splice(1,0,"CLASS");j.find.CLASS=function(b,c,d){if(typeof c.getElementsByClassName!=="undefined"&&!d)return c.getElementsByClassName(b[1])};a=null}}})();i.contains=document.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):true)}:document.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return false};i.isXML=function(a){return(a=
+(a?a.ownerDocument||a:0).documentElement)?a.nodeName!=="HTML":false};var C=function(a,b){for(var c,d=[],e="",f=b.nodeType?[b]:b;c=j.match.PSEUDO.exec(a);){e+=c[0];a=a.replace(j.match.PSEUDO,"")}a=j.relative[a]?a+"*":a;c=0;for(var h=f.length;c<h;c++)i(a,f[c],d);return i.filter(e,d)};window.Sizzle=i})();
Index: Dev/branches/Demo/d3/lib/uglifyjs/LICENSE
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/LICENSE	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/LICENSE	(revision 225)
@@ -0,0 +1,28 @@
+Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
+Based on parse-js (http://marijn.haverbeke.nl/parse-js/).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+    * Redistributions of source code must retain the above
+      copyright notice, this list of conditions and the following
+      disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials
+      provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER âAS ISâ AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
Index: Dev/branches/Demo/d3/lib/uglifyjs/README.md
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/README.md	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/README.md	(revision 225)
@@ -0,0 +1,1 @@
+See <https://github.com/mishoo/UglifyJS>.
Index: Dev/branches/Demo/d3/lib/uglifyjs/bin/uglifyjs
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/bin/uglifyjs	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/bin/uglifyjs	(revision 225)
@@ -0,0 +1,212 @@
+#! /usr/bin/env node
+// -*- js2 -*-
+
+global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util");
+var fs = require("fs");
+var uglify = require("../index.js"),
+    jsp = uglify.parser,
+    pro = uglify.uglify;
+
+var options = {
+        ast: false,
+        mangle: true,
+        mangle_toplevel: false,
+        squeeze: true,
+        make_seqs: true,
+        dead_code: true,
+        verbose: false,
+        show_copyright: true,
+        out_same_file: false,
+        max_line_length: 32 * 1024,
+        unsafe: false,
+        reserved_names: null,
+        codegen_options: {
+                ascii_only: false,
+                beautify: false,
+                indent_level: 4,
+                indent_start: 0,
+                quote_keys: false,
+                space_colon: false
+        },
+        output: true            // stdout
+};
+
+var args = jsp.slice(process.argv, 2);
+var filename;
+
+out: while (args.length > 0) {
+        var v = args.shift();
+        switch (v) {
+            case "-b":
+            case "--beautify":
+                options.codegen_options.beautify = true;
+                break;
+            case "-i":
+            case "--indent":
+                options.codegen_options.indent_level = args.shift();
+                break;
+            case "-q":
+            case "--quote-keys":
+                options.codegen_options.quote_keys = true;
+                break;
+            case "-mt":
+            case "--mangle-toplevel":
+                options.mangle_toplevel = true;
+                break;
+            case "--no-mangle":
+            case "-nm":
+                options.mangle = false;
+                break;
+            case "--no-squeeze":
+            case "-ns":
+                options.squeeze = false;
+                break;
+            case "--no-seqs":
+                options.make_seqs = false;
+                break;
+            case "--no-dead-code":
+                options.dead_code = false;
+                break;
+            case "--no-copyright":
+            case "-nc":
+                options.show_copyright = false;
+                break;
+            case "-o":
+            case "--output":
+                options.output = args.shift();
+                break;
+            case "--overwrite":
+                options.out_same_file = true;
+                break;
+            case "-v":
+            case "--verbose":
+                options.verbose = true;
+                break;
+            case "--ast":
+                options.ast = true;
+                break;
+            case "--unsafe":
+                options.unsafe = true;
+                break;
+            case "--max-line-len":
+                options.max_line_length = parseInt(args.shift(), 10);
+                break;
+            case "--reserved-names":
+                options.reserved_names = args.shift().split(",");
+                break;
+            case "--ascii":
+                options.codegen_options.ascii_only = true;
+                break;
+            default:
+                filename = v;
+                break out;
+        }
+}
+
+if (options.verbose) {
+        pro.set_logger(function(msg){
+                sys.debug(msg);
+        });
+}
+
+jsp.set_logger(function(msg){
+        sys.debug(msg);
+});
+
+if (filename) {
+        fs.readFile(filename, "utf8", function(err, text){
+                if (err) throw err;
+                output(squeeze_it(text));
+        });
+} else {
+        var stdin = process.openStdin();
+        stdin.setEncoding("utf8");
+        var text = "";
+        stdin.on("data", function(chunk){
+                text += chunk;
+        });
+        stdin.on("end", function() {
+                output(squeeze_it(text));
+        });
+}
+
+function output(text) {
+        var out;
+        if (options.out_same_file && filename)
+                options.output = filename;
+        if (options.output === true) {
+                out = process.stdout;
+        } else {
+                out = fs.createWriteStream(options.output, {
+                        flags: "w",
+                        encoding: "utf8",
+                        mode: 0644
+                });
+        }
+        out.write(text);
+        if (options.output !== true) {
+                out.end();
+        }
+};
+
+// --------- main ends here.
+
+function show_copyright(comments) {
+        var ret = "";
+        for (var i = 0; i < comments.length; ++i) {
+                var c = comments[i];
+                if (c.type == "comment1") {
+                        ret += "//" + c.value + "\n";
+                } else {
+                        ret += "/*" + c.value + "*/";
+                }
+        }
+        return ret;
+};
+
+function squeeze_it(code) {
+        var result = "";
+        if (options.show_copyright) {
+                var tok = jsp.tokenizer(code), c;
+                c = tok();
+                result += show_copyright(c.comments_before);
+        }
+        try {
+                var ast = time_it("parse", function(){ return jsp.parse(code); });
+                if (options.mangle) ast = time_it("mangle", function(){
+                        return pro.ast_mangle(ast, {
+                                toplevel: options.mangle_toplevel,
+                                except: options.reserved_names
+                        });
+                });
+                if (options.squeeze) ast = time_it("squeeze", function(){
+                        ast = pro.ast_squeeze(ast, {
+                                make_seqs  : options.make_seqs,
+                                dead_code  : options.dead_code,
+                                keep_comps : !options.unsafe
+                        });
+                        if (options.unsafe)
+                                ast = pro.ast_squeeze_more(ast);
+                        return ast;
+                });
+                if (options.ast)
+                        return sys.inspect(ast, null, null);
+                result += time_it("generate", function(){ return pro.gen_code(ast, options.codegen_options) });
+                if (!options.codegen_options.beautify && options.max_line_length) {
+                        result = time_it("split", function(){ return pro.split_lines(result, options.max_line_length) });
+                }
+                return result;
+        } catch(ex) {
+                sys.debug(ex.stack);
+                sys.debug(sys.inspect(ex));
+                sys.debug(JSON.stringify(ex));
+        }
+};
+
+function time_it(name, cont) {
+        if (!options.verbose)
+                return cont();
+        var t1 = new Date().getTime();
+        try { return cont(); }
+        finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); }
+};
Index: Dev/branches/Demo/d3/lib/uglifyjs/index.js
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/index.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/index.js	(revision 225)
@@ -0,0 +1,2 @@
+exports.parser = require("./lib/parse-js");
+exports.uglify = require("./lib/process");
Index: Dev/branches/Demo/d3/lib/uglifyjs/lib/parse-js.js
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/lib/parse-js.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/lib/parse-js.js	(revision 225)
@@ -0,0 +1,1319 @@
+/***********************************************************************
+
+  A JavaScript tokenizer / parser / beautifier / compressor.
+
+  This version is suitable for Node.js.  With minimal changes (the
+  exports stuff) it should work on any JS platform.
+
+  This file contains the tokenizer/parser.  It is a port to JavaScript
+  of parse-js [1], a JavaScript parser library written in Common Lisp
+  by Marijn Haverbeke.  Thank you Marijn!
+
+  [1] http://marijn.haverbeke.nl/parse-js/
+
+  Exported functions:
+
+    - tokenizer(code) -- returns a function.  Call the returned
+      function to fetch the next token.
+
+    - parse(code) -- returns an AST of the given JavaScript code.
+
+  -------------------------------- (C) ---------------------------------
+
+                           Author: Mihai Bazon
+                         <mihai.bazon@gmail.com>
+                       http://mihai.bazon.net/blog
+
+  Distributed under the BSD license:
+
+    Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
+    Based on parse-js (http://marijn.haverbeke.nl/parse-js/).
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+        * Redistributions of source code must retain the above
+          copyright notice, this list of conditions and the following
+          disclaimer.
+
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials
+          provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER âAS ISâ AND ANY
+    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+ ***********************************************************************/
+
+/* -----[ Tokenizer (constants) ]----- */
+
+var KEYWORDS = array_to_hash([
+        "break",
+        "case",
+        "catch",
+        "const",
+        "continue",
+        "default",
+        "delete",
+        "do",
+        "else",
+        "finally",
+        "for",
+        "function",
+        "if",
+        "in",
+        "instanceof",
+        "new",
+        "return",
+        "switch",
+        "throw",
+        "try",
+        "typeof",
+        "var",
+        "void",
+        "while",
+        "with"
+]);
+
+var RESERVED_WORDS = array_to_hash([
+        "abstract",
+        "boolean",
+        "byte",
+        "char",
+        "class",
+        "debugger",
+        "double",
+        "enum",
+        "export",
+        "extends",
+        "final",
+        "float",
+        "goto",
+        "implements",
+        "import",
+        "int",
+        "interface",
+        "long",
+        "native",
+        "package",
+        "private",
+        "protected",
+        "public",
+        "short",
+        "static",
+        "super",
+        "synchronized",
+        "throws",
+        "transient",
+        "volatile"
+]);
+
+var KEYWORDS_BEFORE_EXPRESSION = array_to_hash([
+        "return",
+        "new",
+        "delete",
+        "throw",
+        "else",
+        "case"
+]);
+
+var KEYWORDS_ATOM = array_to_hash([
+        "false",
+        "null",
+        "true",
+        "undefined"
+]);
+
+var OPERATOR_CHARS = array_to_hash(characters("+-*&%=<>!?|~^"));
+
+var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i;
+var RE_OCT_NUMBER = /^0[0-7]+$/;
+var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i;
+
+var OPERATORS = array_to_hash([
+        "in",
+        "instanceof",
+        "typeof",
+        "new",
+        "void",
+        "delete",
+        "++",
+        "--",
+        "+",
+        "-",
+        "!",
+        "~",
+        "&",
+        "|",
+        "^",
+        "*",
+        "/",
+        "%",
+        ">>",
+        "<<",
+        ">>>",
+        "<",
+        ">",
+        "<=",
+        ">=",
+        "==",
+        "===",
+        "!=",
+        "!==",
+        "?",
+        "=",
+        "+=",
+        "-=",
+        "/=",
+        "*=",
+        "%=",
+        ">>=",
+        "<<=",
+        ">>>=",
+        "|=",
+        "^=",
+        "&=",
+        "&&",
+        "||"
+]);
+
+var WHITESPACE_CHARS = array_to_hash(characters(" \n\r\t\u200b"));
+
+var PUNC_BEFORE_EXPRESSION = array_to_hash(characters("[{}(,.;:"));
+
+var PUNC_CHARS = array_to_hash(characters("[]{}(),;:"));
+
+var REGEXP_MODIFIERS = array_to_hash(characters("gmsiy"));
+
+/* -----[ Tokenizer ]----- */
+
+// regexps adapted from http://xregexp.com/plugins/#unicode
+var UNICODE = {
+        letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),
+        non_spacing_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"),
+        space_combining_mark: new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"),
+        connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]")
+};
+
+function is_letter(ch) {
+        return UNICODE.letter.test(ch);
+};
+
+function is_digit(ch) {
+        ch = ch.charCodeAt(0);
+        return ch >= 48 && ch <= 57; //XXX: find out if "UnicodeDigit" means something else than 0..9
+};
+
+function is_alphanumeric_char(ch) {
+        return is_digit(ch) || is_letter(ch);
+};
+
+function is_unicode_combining_mark(ch) {
+        return UNICODE.non_spacing_mark.test(ch) || UNICODE.space_combining_mark.test(ch);
+};
+
+function is_unicode_connector_punctuation(ch) {
+        return UNICODE.connector_punctuation.test(ch);
+};
+
+function is_identifier_start(ch) {
+        return ch == "$" || ch == "_" || is_letter(ch);
+};
+
+function is_identifier_char(ch) {
+        return is_identifier_start(ch)
+                || is_unicode_combining_mark(ch)
+                || is_digit(ch)
+                || is_unicode_connector_punctuation(ch)
+                || ch == "\u200c" // zero-width non-joiner <ZWNJ>
+                || ch == "\u200d" // zero-width joiner <ZWJ> (in my ECMA-262 PDF, this is also 200c)
+        ;
+};
+
+function parse_js_number(num) {
+        if (RE_HEX_NUMBER.test(num)) {
+                return parseInt(num.substr(2), 16);
+        } else if (RE_OCT_NUMBER.test(num)) {
+                return parseInt(num.substr(1), 8);
+        } else if (RE_DEC_NUMBER.test(num)) {
+                return parseFloat(num);
+        }
+};
+
+function JS_Parse_Error(message, line, col, pos) {
+        this.message = message;
+        this.line = line;
+        this.col = col;
+        this.pos = pos;
+        try {
+                ({})();
+        } catch(ex) {
+                this.stack = ex.stack;
+        };
+};
+
+JS_Parse_Error.prototype.toString = function() {
+        return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack;
+};
+
+function js_error(message, line, col, pos) {
+        throw new JS_Parse_Error(message, line, col, pos);
+};
+
+function is_token(token, type, val) {
+        return token.type == type && (val == null || token.value == val);
+};
+
+var EX_EOF = {};
+
+function tokenizer($TEXT) {
+
+        var S = {
+                text            : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, ''),
+                pos             : 0,
+                tokpos          : 0,
+                line            : 0,
+                tokline         : 0,
+                col             : 0,
+                tokcol          : 0,
+                newline_before  : false,
+                regex_allowed   : false,
+                comments_before : []
+        };
+
+        function peek() { return S.text.charAt(S.pos); };
+
+        function next(signal_eof) {
+                var ch = S.text.charAt(S.pos++);
+                if (signal_eof && !ch)
+                        throw EX_EOF;
+                if (ch == "\n") {
+                        S.newline_before = true;
+                        ++S.line;
+                        S.col = 0;
+                } else {
+                        ++S.col;
+                }
+                return ch;
+        };
+
+        function eof() {
+                return !S.peek();
+        };
+
+        function find(what, signal_eof) {
+                var pos = S.text.indexOf(what, S.pos);
+                if (signal_eof && pos == -1) throw EX_EOF;
+                return pos;
+        };
+
+        function start_token() {
+                S.tokline = S.line;
+                S.tokcol = S.col;
+                S.tokpos = S.pos;
+        };
+
+        function token(type, value, is_comment) {
+                S.regex_allowed = ((type == "operator" && !HOP(UNARY_POSTFIX, value)) ||
+                                   (type == "keyword" && HOP(KEYWORDS_BEFORE_EXPRESSION, value)) ||
+                                   (type == "punc" && HOP(PUNC_BEFORE_EXPRESSION, value)));
+                var ret = {
+                        type  : type,
+                        value : value,
+                        line  : S.tokline,
+                        col   : S.tokcol,
+                        pos   : S.tokpos,
+                        nlb   : S.newline_before
+                };
+                if (!is_comment) {
+                        ret.comments_before = S.comments_before;
+                        S.comments_before = [];
+                }
+                S.newline_before = false;
+                return ret;
+        };
+
+        function skip_whitespace() {
+                while (HOP(WHITESPACE_CHARS, peek()))
+                        next();
+        };
+
+        function read_while(pred) {
+                var ret = "", ch = peek(), i = 0;
+                while (ch && pred(ch, i++)) {
+                        ret += next();
+                        ch = peek();
+                }
+                return ret;
+        };
+
+        function parse_error(err) {
+                js_error(err, S.tokline, S.tokcol, S.tokpos);
+        };
+
+        function read_num(prefix) {
+                var has_e = false, after_e = false, has_x = false, has_dot = prefix == ".";
+                var num = read_while(function(ch, i){
+                        if (ch == "x" || ch == "X") {
+                                if (has_x) return false;
+                                return has_x = true;
+                        }
+                        if (!has_x && (ch == "E" || ch == "e")) {
+                                if (has_e) return false;
+                                return has_e = after_e = true;
+                        }
+                        if (ch == "-") {
+                                if (after_e || (i == 0 && !prefix)) return true;
+                                return false;
+                        }
+                        if (ch == "+") return after_e;
+                        after_e = false;
+                        if (ch == ".") {
+                                if (!has_dot && !has_x)
+                                        return has_dot = true;
+                                return false;
+                        }
+                        return is_alphanumeric_char(ch);
+                });
+                if (prefix)
+                        num = prefix + num;
+                var valid = parse_js_number(num);
+                if (!isNaN(valid)) {
+                        return token("num", valid);
+                } else {
+                        parse_error("Invalid syntax: " + num);
+                }
+        };
+
+        function read_escaped_char() {
+                var ch = next(true);
+                switch (ch) {
+                    case "n" : return "\n";
+                    case "r" : return "\r";
+                    case "t" : return "\t";
+                    case "b" : return "\b";
+                    case "v" : return "\v";
+                    case "f" : return "\f";
+                    case "0" : return "\0";
+                    case "x" : return String.fromCharCode(hex_bytes(2));
+                    case "u" : return String.fromCharCode(hex_bytes(4));
+                    default  : return ch;
+                }
+        };
+
+        function hex_bytes(n) {
+                var num = 0;
+                for (; n > 0; --n) {
+                        var digit = parseInt(next(true), 16);
+                        if (isNaN(digit))
+                                parse_error("Invalid hex-character pattern in string");
+                        num = (num << 4) | digit;
+                }
+                return num;
+        };
+
+        function read_string() {
+                return with_eof_error("Unterminated string constant", function(){
+                        var quote = next(), ret = "";
+                        for (;;) {
+                                var ch = next(true);
+                                if (ch == "\\") ch = read_escaped_char();
+                                else if (ch == quote) break;
+                                ret += ch;
+                        }
+                        return token("string", ret);
+                });
+        };
+
+        function read_line_comment() {
+                next();
+                var i = find("\n"), ret;
+                if (i == -1) {
+                        ret = S.text.substr(S.pos);
+                        S.pos = S.text.length;
+                } else {
+                        ret = S.text.substring(S.pos, i);
+                        S.pos = i;
+                }
+                return token("comment1", ret, true);
+        };
+
+        function read_multiline_comment() {
+                next();
+                return with_eof_error("Unterminated multiline comment", function(){
+                        var i = find("*/", true),
+                            text = S.text.substring(S.pos, i),
+                            tok = token("comment2", text, true);
+                        S.pos = i + 2;
+                        S.line += text.split("\n").length - 1;
+                        S.newline_before = text.indexOf("\n") >= 0;
+
+                        // https://github.com/mishoo/UglifyJS/issues/#issue/100
+                        if (/^@cc_on/i.test(text)) {
+                                warn("WARNING: at line " + S.line);
+                                warn("*** Found \"conditional comment\": " + text);
+                                warn("*** UglifyJS DISCARDS ALL COMMENTS.  This means your code might no longer work properly in Internet Explorer.");
+                        }
+
+                        return tok;
+                });
+        };
+
+        function read_name() {
+                var backslash = false, name = "", ch;
+                while ((ch = peek()) != null) {
+                        if (!backslash) {
+                                if (ch == "\\") backslash = true, next();
+                                else if (is_identifier_char(ch)) name += next();
+                                else break;
+                        }
+                        else {
+                                if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX");
+                                ch = read_escaped_char();
+                                if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier");
+                                name += ch;
+                                backslash = false;
+                        }
+                }
+                return name;
+        };
+
+        function read_regexp() {
+                return with_eof_error("Unterminated regular expression", function(){
+                        var prev_backslash = false, regexp = "", ch, in_class = false;
+                        while ((ch = next(true))) if (prev_backslash) {
+                                regexp += "\\" + ch;
+                                prev_backslash = false;
+                        } else if (ch == "[") {
+                                in_class = true;
+                                regexp += ch;
+                        } else if (ch == "]" && in_class) {
+                                in_class = false;
+                                regexp += ch;
+                        } else if (ch == "/" && !in_class) {
+                                break;
+                        } else if (ch == "\\") {
+                                prev_backslash = true;
+                        } else {
+                                regexp += ch;
+                        }
+                        var mods = read_name();
+                        return token("regexp", [ regexp, mods ]);
+                });
+        };
+
+        function read_operator(prefix) {
+                function grow(op) {
+                        if (!peek()) return op;
+                        var bigger = op + peek();
+                        if (HOP(OPERATORS, bigger)) {
+                                next();
+                                return grow(bigger);
+                        } else {
+                                return op;
+                        }
+                };
+                return token("operator", grow(prefix || next()));
+        };
+
+        function handle_slash() {
+                next();
+                var regex_allowed = S.regex_allowed;
+                switch (peek()) {
+                    case "/":
+                        S.comments_before.push(read_line_comment());
+                        S.regex_allowed = regex_allowed;
+                        return next_token();
+                    case "*":
+                        S.comments_before.push(read_multiline_comment());
+                        S.regex_allowed = regex_allowed;
+                        return next_token();
+                }
+                return S.regex_allowed ? read_regexp() : read_operator("/");
+        };
+
+        function handle_dot() {
+                next();
+                return is_digit(peek())
+                        ? read_num(".")
+                        : token("punc", ".");
+        };
+
+        function read_word() {
+                var word = read_name();
+                return !HOP(KEYWORDS, word)
+                        ? token("name", word)
+                        : HOP(OPERATORS, word)
+                        ? token("operator", word)
+                        : HOP(KEYWORDS_ATOM, word)
+                        ? token("atom", word)
+                        : token("keyword", word);
+        };
+
+        function with_eof_error(eof_error, cont) {
+                try {
+                        return cont();
+                } catch(ex) {
+                        if (ex === EX_EOF) parse_error(eof_error);
+                        else throw ex;
+                }
+        };
+
+        function next_token(force_regexp) {
+                if (force_regexp)
+                        return read_regexp();
+                skip_whitespace();
+                start_token();
+                var ch = peek();
+                if (!ch) return token("eof");
+                if (is_digit(ch)) return read_num();
+                if (ch == '"' || ch == "'") return read_string();
+                if (HOP(PUNC_CHARS, ch)) return token("punc", next());
+                if (ch == ".") return handle_dot();
+                if (ch == "/") return handle_slash();
+                if (HOP(OPERATOR_CHARS, ch)) return read_operator();
+                if (ch == "\\" || is_identifier_start(ch)) return read_word();
+                parse_error("Unexpected character '" + ch + "'");
+        };
+
+        next_token.context = function(nc) {
+                if (nc) S = nc;
+                return S;
+        };
+
+        return next_token;
+
+};
+
+/* -----[ Parser (constants) ]----- */
+
+var UNARY_PREFIX = array_to_hash([
+        "typeof",
+        "void",
+        "delete",
+        "--",
+        "++",
+        "!",
+        "~",
+        "-",
+        "+"
+]);
+
+var UNARY_POSTFIX = array_to_hash([ "--", "++" ]);
+
+var ASSIGNMENT = (function(a, ret, i){
+        while (i < a.length) {
+                ret[a[i]] = a[i].substr(0, a[i].length - 1);
+                i++;
+        }
+        return ret;
+})(
+        ["+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="],
+        { "=": true },
+        0
+);
+
+var PRECEDENCE = (function(a, ret){
+        for (var i = 0, n = 1; i < a.length; ++i, ++n) {
+                var b = a[i];
+                for (var j = 0; j < b.length; ++j) {
+                        ret[b[j]] = n;
+                }
+        }
+        return ret;
+})(
+        [
+                ["||"],
+                ["&&"],
+                ["|"],
+                ["^"],
+                ["&"],
+                ["==", "===", "!=", "!=="],
+                ["<", ">", "<=", ">=", "in", "instanceof"],
+                [">>", "<<", ">>>"],
+                ["+", "-"],
+                ["*", "/", "%"]
+        ],
+        {}
+);
+
+var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]);
+
+var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]);
+
+/* -----[ Parser ]----- */
+
+function NodeWithToken(str, start, end) {
+        this.name = str;
+        this.start = start;
+        this.end = end;
+};
+
+NodeWithToken.prototype.toString = function() { return this.name; };
+
+function parse($TEXT, exigent_mode, embed_tokens) {
+
+        var S = {
+                input       : typeof $TEXT == "string" ? tokenizer($TEXT, true) : $TEXT,
+                token       : null,
+                prev        : null,
+                peeked      : null,
+                in_function : 0,
+                in_loop     : 0,
+                labels      : []
+        };
+
+        S.token = next();
+
+        function is(type, value) {
+                return is_token(S.token, type, value);
+        };
+
+        function peek() { return S.peeked || (S.peeked = S.input()); };
+
+        function next() {
+                S.prev = S.token;
+                if (S.peeked) {
+                        S.token = S.peeked;
+                        S.peeked = null;
+                } else {
+                        S.token = S.input();
+                }
+                return S.token;
+        };
+
+        function prev() {
+                return S.prev;
+        };
+
+        function croak(msg, line, col, pos) {
+                var ctx = S.input.context();
+                js_error(msg,
+                         line != null ? line : ctx.tokline,
+                         col != null ? col : ctx.tokcol,
+                         pos != null ? pos : ctx.tokpos);
+        };
+
+        function token_error(token, msg) {
+                croak(msg, token.line, token.col);
+        };
+
+        function unexpected(token) {
+                if (token == null)
+                        token = S.token;
+                token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")");
+        };
+
+        function expect_token(type, val) {
+                if (is(type, val)) {
+                        return next();
+                }
+                token_error(S.token, "Unexpected token " + S.token.type + ", expected " + type);
+        };
+
+        function expect(punc) { return expect_token("punc", punc); };
+
+        function can_insert_semicolon() {
+                return !exigent_mode && (
+                        S.token.nlb || is("eof") || is("punc", "}")
+                );
+        };
+
+        function semicolon() {
+                if (is("punc", ";")) next();
+                else if (!can_insert_semicolon()) unexpected();
+        };
+
+        function as() {
+                return slice(arguments);
+        };
+
+        function parenthesised() {
+                expect("(");
+                var ex = expression();
+                expect(")");
+                return ex;
+        };
+
+        function add_tokens(str, start, end) {
+                return str instanceof NodeWithToken ? str : new NodeWithToken(str, start, end);
+        };
+
+        var statement = embed_tokens ? function() {
+                var start = S.token;
+                var ast = $statement.apply(this, arguments);
+                ast[0] = add_tokens(ast[0], start, prev());
+                return ast;
+        } : $statement;
+
+        function $statement() {
+                if (is("operator", "/")) {
+                        S.peeked = null;
+                        S.token = S.input(true); // force regexp
+                }
+                switch (S.token.type) {
+                    case "num":
+                    case "string":
+                    case "regexp":
+                    case "operator":
+                    case "atom":
+                        return simple_statement();
+
+                    case "name":
+                        return is_token(peek(), "punc", ":")
+                                ? labeled_statement(prog1(S.token.value, next, next))
+                                : simple_statement();
+
+                    case "punc":
+                        switch (S.token.value) {
+                            case "{":
+                                return as("block", block_());
+                            case "[":
+                            case "(":
+                                return simple_statement();
+                            case ";":
+                                next();
+                                return as("block");
+                            default:
+                                unexpected();
+                        }
+
+                    case "keyword":
+                        switch (prog1(S.token.value, next)) {
+                            case "break":
+                                return break_cont("break");
+
+                            case "continue":
+                                return break_cont("continue");
+
+                            case "debugger":
+                                semicolon();
+                                return as("debugger");
+
+                            case "do":
+                                return (function(body){
+                                        expect_token("keyword", "while");
+                                        return as("do", prog1(parenthesised, semicolon), body);
+                                })(in_loop(statement));
+
+                            case "for":
+                                return for_();
+
+                            case "function":
+                                return function_(true);
+
+                            case "if":
+                                return if_();
+
+                            case "return":
+                                if (S.in_function == 0)
+                                        croak("'return' outside of function");
+                                return as("return",
+                                          is("punc", ";")
+                                          ? (next(), null)
+                                          : can_insert_semicolon()
+                                          ? null
+                                          : prog1(expression, semicolon));
+
+                            case "switch":
+                                return as("switch", parenthesised(), switch_block_());
+
+                            case "throw":
+                                return as("throw", prog1(expression, semicolon));
+
+                            case "try":
+                                return try_();
+
+                            case "var":
+                                return prog1(var_, semicolon);
+
+                            case "const":
+                                return prog1(const_, semicolon);
+
+                            case "while":
+                                return as("while", parenthesised(), in_loop(statement));
+
+                            case "with":
+                                return as("with", parenthesised(), statement());
+
+                            default:
+                                unexpected();
+                        }
+                }
+        };
+
+        function labeled_statement(label) {
+                S.labels.push(label);
+                var start = S.token, stat = statement();
+                if (exigent_mode && !HOP(STATEMENTS_WITH_LABELS, stat[0]))
+                        unexpected(start);
+                S.labels.pop();
+                return as("label", label, stat);
+        };
+
+        function simple_statement() {
+                return as("stat", prog1(expression, semicolon));
+        };
+
+        function break_cont(type) {
+                var name = is("name") ? S.token.value : null;
+                if (name != null) {
+                        next();
+                        if (!member(name, S.labels))
+                                croak("Label " + name + " without matching loop or statement");
+                }
+                else if (S.in_loop == 0)
+                        croak(type + " not inside a loop or switch");
+                semicolon();
+                return as(type, name);
+        };
+
+        function for_() {
+                expect("(");
+                var init = null;
+                if (!is("punc", ";")) {
+                        init = is("keyword", "var")
+                                ? (next(), var_(true))
+                                : expression(true, true);
+                        if (is("operator", "in"))
+                                return for_in(init);
+                }
+                return regular_for(init);
+        };
+
+        function regular_for(init) {
+                expect(";");
+                var test = is("punc", ";") ? null : expression();
+                expect(";");
+                var step = is("punc", ")") ? null : expression();
+                expect(")");
+                return as("for", init, test, step, in_loop(statement));
+        };
+
+        function for_in(init) {
+                var lhs = init[0] == "var" ? as("name", init[1][0]) : init;
+                next();
+                var obj = expression();
+                expect(")");
+                return as("for-in", init, lhs, obj, in_loop(statement));
+        };
+
+        var function_ = embed_tokens ? function() {
+                var start = prev();
+                var ast = $function_.apply(this, arguments);
+                ast[0] = add_tokens(ast[0], start, prev());
+                return ast;
+        } : $function_;
+
+        function $function_(in_statement) {
+                var name = is("name") ? prog1(S.token.value, next) : null;
+                if (in_statement && !name)
+                        unexpected();
+                expect("(");
+                return as(in_statement ? "defun" : "function",
+                          name,
+                          // arguments
+                          (function(first, a){
+                                  while (!is("punc", ")")) {
+                                          if (first) first = false; else expect(",");
+                                          if (!is("name")) unexpected();
+                                          a.push(S.token.value);
+                                          next();
+                                  }
+                                  next();
+                                  return a;
+                          })(true, []),
+                          // body
+                          (function(){
+                                  ++S.in_function;
+                                  var loop = S.in_loop;
+                                  S.in_loop = 0;
+                                  var a = block_();
+                                  --S.in_function;
+                                  S.in_loop = loop;
+                                  return a;
+                          })());
+        };
+
+        function if_() {
+                var cond = parenthesised(), body = statement(), belse;
+                if (is("keyword", "else")) {
+                        next();
+                        belse = statement();
+                }
+                return as("if", cond, body, belse);
+        };
+
+        function block_() {
+                expect("{");
+                var a = [];
+                while (!is("punc", "}")) {
+                        if (is("eof")) unexpected();
+                        a.push(statement());
+                }
+                next();
+                return a;
+        };
+
+        var switch_block_ = curry(in_loop, function(){
+                expect("{");
+                var a = [], cur = null;
+                while (!is("punc", "}")) {
+                        if (is("eof")) unexpected();
+                        if (is("keyword", "case")) {
+                                next();
+                                cur = [];
+                                a.push([ expression(), cur ]);
+                                expect(":");
+                        }
+                        else if (is("keyword", "default")) {
+                                next();
+                                expect(":");
+                                cur = [];
+                                a.push([ null, cur ]);
+                        }
+                        else {
+                                if (!cur) unexpected();
+                                cur.push(statement());
+                        }
+                }
+                next();
+                return a;
+        });
+
+        function try_() {
+                var body = block_(), bcatch, bfinally;
+                if (is("keyword", "catch")) {
+                        next();
+                        expect("(");
+                        if (!is("name"))
+                                croak("Name expected");
+                        var name = S.token.value;
+                        next();
+                        expect(")");
+                        bcatch = [ name, block_() ];
+                }
+                if (is("keyword", "finally")) {
+                        next();
+                        bfinally = block_();
+                }
+                if (!bcatch && !bfinally)
+                        croak("Missing catch/finally blocks");
+                return as("try", body, bcatch, bfinally);
+        };
+
+        function vardefs(no_in) {
+                var a = [];
+                for (;;) {
+                        if (!is("name"))
+                                unexpected();
+                        var name = S.token.value;
+                        next();
+                        if (is("operator", "=")) {
+                                next();
+                                a.push([ name, expression(false, no_in) ]);
+                        } else {
+                                a.push([ name ]);
+                        }
+                        if (!is("punc", ","))
+                                break;
+                        next();
+                }
+                return a;
+        };
+
+        function var_(no_in) {
+                return as("var", vardefs(no_in));
+        };
+
+        function const_() {
+                return as("const", vardefs());
+        };
+
+        function new_() {
+                var newexp = expr_atom(false), args;
+                if (is("punc", "(")) {
+                        next();
+                        args = expr_list(")");
+                } else {
+                        args = [];
+                }
+                return subscripts(as("new", newexp, args), true);
+        };
+
+        function expr_atom(allow_calls) {
+                if (is("operator", "new")) {
+                        next();
+                        return new_();
+                }
+                if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) {
+                        return make_unary("unary-prefix",
+                                          prog1(S.token.value, next),
+                                          expr_atom(allow_calls));
+                }
+                if (is("punc")) {
+                        switch (S.token.value) {
+                            case "(":
+                                next();
+                                return subscripts(prog1(expression, curry(expect, ")")), allow_calls);
+                            case "[":
+                                next();
+                                return subscripts(array_(), allow_calls);
+                            case "{":
+                                next();
+                                return subscripts(object_(), allow_calls);
+                        }
+                        unexpected();
+                }
+                if (is("keyword", "function")) {
+                        next();
+                        return subscripts(function_(false), allow_calls);
+                }
+                if (HOP(ATOMIC_START_TOKEN, S.token.type)) {
+                        var atom = S.token.type == "regexp"
+                                ? as("regexp", S.token.value[0], S.token.value[1])
+                                : as(S.token.type, S.token.value);
+                        return subscripts(prog1(atom, next), allow_calls);
+                }
+                unexpected();
+        };
+
+        function expr_list(closing, allow_trailing_comma, allow_empty) {
+                var first = true, a = [];
+                while (!is("punc", closing)) {
+                        if (first) first = false; else expect(",");
+                        if (allow_trailing_comma && is("punc", closing)) break;
+                        if (is("punc", ",") && allow_empty) {
+                                a.push([ "atom", "undefined" ]);
+                        } else {
+                                a.push(expression(false));
+                        }
+                }
+                next();
+                return a;
+        };
+
+        function array_() {
+                return as("array", expr_list("]", !exigent_mode, true));
+        };
+
+        function object_() {
+                var first = true, a = [];
+                while (!is("punc", "}")) {
+                        if (first) first = false; else expect(",");
+                        if (!exigent_mode && is("punc", "}"))
+                                // allow trailing comma
+                                break;
+                        var type = S.token.type;
+                        var name = as_property_name();
+                        if (type == "name" && (name == "get" || name == "set") && !is("punc", ":")) {
+                                a.push([ as_name(), function_(false), name ]);
+                        } else {
+                                expect(":");
+                                a.push([ name, expression(false) ]);
+                        }
+                }
+                next();
+                return as("object", a);
+        };
+
+        function as_property_name() {
+                switch (S.token.type) {
+                    case "num":
+                    case "string":
+                        return prog1(S.token.value, next);
+                }
+                return as_name();
+        };
+
+        function as_name() {
+                switch (S.token.type) {
+                    case "name":
+                    case "operator":
+                    case "keyword":
+                    case "atom":
+                        return prog1(S.token.value, next);
+                    default:
+                        unexpected();
+                }
+        };
+
+        function subscripts(expr, allow_calls) {
+                if (is("punc", ".")) {
+                        next();
+                        return subscripts(as("dot", expr, as_name()), allow_calls);
+                }
+                if (is("punc", "[")) {
+                        next();
+                        return subscripts(as("sub", expr, prog1(expression, curry(expect, "]"))), allow_calls);
+                }
+                if (allow_calls && is("punc", "(")) {
+                        next();
+                        return subscripts(as("call", expr, expr_list(")")), true);
+                }
+                if (allow_calls && is("operator") && HOP(UNARY_POSTFIX, S.token.value)) {
+                        return prog1(curry(make_unary, "unary-postfix", S.token.value, expr),
+                                     next);
+                }
+                return expr;
+        };
+
+        function make_unary(tag, op, expr) {
+                if ((op == "++" || op == "--") && !is_assignable(expr))
+                        croak("Invalid use of " + op + " operator");
+                return as(tag, op, expr);
+        };
+
+        function expr_op(left, min_prec, no_in) {
+                var op = is("operator") ? S.token.value : null;
+                if (op && op == "in" && no_in) op = null;
+                var prec = op != null ? PRECEDENCE[op] : null;
+                if (prec != null && prec > min_prec) {
+                        next();
+                        var right = expr_op(expr_atom(true), prec, no_in);
+                        return expr_op(as("binary", op, left, right), min_prec, no_in);
+                }
+                return left;
+        };
+
+        function expr_ops(no_in) {
+                return expr_op(expr_atom(true), 0, no_in);
+        };
+
+        function maybe_conditional(no_in) {
+                var expr = expr_ops(no_in);
+                if (is("operator", "?")) {
+                        next();
+                        var yes = expression(false);
+                        expect(":");
+                        return as("conditional", expr, yes, expression(false, no_in));
+                }
+                return expr;
+        };
+
+        function is_assignable(expr) {
+                if (!exigent_mode) return true;
+                switch (expr[0]) {
+                    case "dot":
+                    case "sub":
+                    case "new":
+                    case "call":
+                        return true;
+                    case "name":
+                        return expr[1] != "this";
+                }
+        };
+
+        function maybe_assign(no_in) {
+                var left = maybe_conditional(no_in), val = S.token.value;
+                if (is("operator") && HOP(ASSIGNMENT, val)) {
+                        if (is_assignable(left)) {
+                                next();
+                                return as("assign", ASSIGNMENT[val], left, maybe_assign(no_in));
+                        }
+                        croak("Invalid assignment");
+                }
+                return left;
+        };
+
+        function expression(commas, no_in) {
+                if (arguments.length == 0)
+                        commas = true;
+                var expr = maybe_assign(no_in);
+                if (commas && is("punc", ",")) {
+                        next();
+                        return as("seq", expr, expression(true, no_in));
+                }
+                return expr;
+        };
+
+        function in_loop(cont) {
+                try {
+                        ++S.in_loop;
+                        return cont();
+                } finally {
+                        --S.in_loop;
+                }
+        };
+
+        return as("toplevel", (function(a){
+                while (!is("eof"))
+                        a.push(statement());
+                return a;
+        })([]));
+
+};
+
+/* -----[ Utilities ]----- */
+
+function curry(f) {
+        var args = slice(arguments, 1);
+        return function() { return f.apply(this, args.concat(slice(arguments))); };
+};
+
+function prog1(ret) {
+        if (ret instanceof Function)
+                ret = ret();
+        for (var i = 1, n = arguments.length; --n > 0; ++i)
+                arguments[i]();
+        return ret;
+};
+
+function array_to_hash(a) {
+        var ret = {};
+        for (var i = 0; i < a.length; ++i)
+                ret[a[i]] = true;
+        return ret;
+};
+
+function slice(a, start) {
+        return Array.prototype.slice.call(a, start == null ? 0 : start);
+};
+
+function characters(str) {
+        return str.split("");
+};
+
+function member(name, array) {
+        for (var i = array.length; --i >= 0;)
+                if (array[i] === name)
+                        return true;
+        return false;
+};
+
+function HOP(obj, prop) {
+        return Object.prototype.hasOwnProperty.call(obj, prop);
+};
+
+var warn = function() {};
+
+/* -----[ Exports ]----- */
+
+exports.tokenizer = tokenizer;
+exports.parse = parse;
+exports.slice = slice;
+exports.curry = curry;
+exports.member = member;
+exports.array_to_hash = array_to_hash;
+exports.PRECEDENCE = PRECEDENCE;
+exports.KEYWORDS_ATOM = KEYWORDS_ATOM;
+exports.RESERVED_WORDS = RESERVED_WORDS;
+exports.KEYWORDS = KEYWORDS;
+exports.ATOMIC_START_TOKEN = ATOMIC_START_TOKEN;
+exports.OPERATORS = OPERATORS;
+exports.is_alphanumeric_char = is_alphanumeric_char;
+exports.set_logger = function(logger) {
+        warn = logger;
+};
Index: Dev/branches/Demo/d3/lib/uglifyjs/lib/process.js
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/lib/process.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/lib/process.js	(revision 225)
@@ -0,0 +1,1614 @@
+/***********************************************************************
+
+  A JavaScript tokenizer / parser / beautifier / compressor.
+
+  This version is suitable for Node.js.  With minimal changes (the
+  exports stuff) it should work on any JS platform.
+
+  This file implements some AST processors.  They work on data built
+  by parse-js.
+
+  Exported functions:
+
+    - ast_mangle(ast, options) -- mangles the variable/function names
+      in the AST.  Returns an AST.
+
+    - ast_squeeze(ast) -- employs various optimizations to make the
+      final generated code even smaller.  Returns an AST.
+
+    - gen_code(ast, options) -- generates JS code from the AST.  Pass
+      true (or an object, see the code for some options) as second
+      argument to get "pretty" (indented) code.
+
+  -------------------------------- (C) ---------------------------------
+
+                           Author: Mihai Bazon
+                         <mihai.bazon@gmail.com>
+                       http://mihai.bazon.net/blog
+
+  Distributed under the BSD license:
+
+    Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+        * Redistributions of source code must retain the above
+          copyright notice, this list of conditions and the following
+          disclaimer.
+
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials
+          provided with the distribution.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER âAS ISâ AND ANY
+    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
+    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+ ***********************************************************************/
+
+var jsp = require("./parse-js"),
+    slice = jsp.slice,
+    member = jsp.member,
+    PRECEDENCE = jsp.PRECEDENCE,
+    OPERATORS = jsp.OPERATORS;
+
+/* -----[ helper for AST traversal ]----- */
+
+function ast_walker(ast) {
+        function _vardefs(defs) {
+                return [ this[0], MAP(defs, function(def){
+                        var a = [ def[0] ];
+                        if (def.length > 1)
+                                a[1] = walk(def[1]);
+                        return a;
+                }) ];
+        };
+        var walkers = {
+                "string": function(str) {
+                        return [ this[0], str ];
+                },
+                "num": function(num) {
+                        return [ this[0], num ];
+                },
+                "name": function(name) {
+                        return [ this[0], name ];
+                },
+                "toplevel": function(statements) {
+                        return [ this[0], MAP(statements, walk) ];
+                },
+                "block": function(statements) {
+                        var out = [ this[0] ];
+                        if (statements != null)
+                                out.push(MAP(statements, walk));
+                        return out;
+                },
+                "var": _vardefs,
+                "const": _vardefs,
+                "try": function(t, c, f) {
+                        return [
+                                this[0],
+                                MAP(t, walk),
+                                c != null ? [ c[0], MAP(c[1], walk) ] : null,
+                                f != null ? MAP(f, walk) : null
+                        ];
+                },
+                "throw": function(expr) {
+                        return [ this[0], walk(expr) ];
+                },
+                "new": function(ctor, args) {
+                        return [ this[0], walk(ctor), MAP(args, walk) ];
+                },
+                "switch": function(expr, body) {
+                        return [ this[0], walk(expr), MAP(body, function(branch){
+                                return [ branch[0] ? walk(branch[0]) : null,
+                                         MAP(branch[1], walk) ];
+                        }) ];
+                },
+                "break": function(label) {
+                        return [ this[0], label ];
+                },
+                "continue": function(label) {
+                        return [ this[0], label ];
+                },
+                "conditional": function(cond, t, e) {
+                        return [ this[0], walk(cond), walk(t), walk(e) ];
+                },
+                "assign": function(op, lvalue, rvalue) {
+                        return [ this[0], op, walk(lvalue), walk(rvalue) ];
+                },
+                "dot": function(expr) {
+                        return [ this[0], walk(expr) ].concat(slice(arguments, 1));
+                },
+                "call": function(expr, args) {
+                        return [ this[0], walk(expr), MAP(args, walk) ];
+                },
+                "function": function(name, args, body) {
+                        return [ this[0], name, args.slice(), MAP(body, walk) ];
+                },
+                "defun": function(name, args, body) {
+                        return [ this[0], name, args.slice(), MAP(body, walk) ];
+                },
+                "if": function(conditional, t, e) {
+                        return [ this[0], walk(conditional), walk(t), walk(e) ];
+                },
+                "for": function(init, cond, step, block) {
+                        return [ this[0], walk(init), walk(cond), walk(step), walk(block) ];
+                },
+                "for-in": function(vvar, key, hash, block) {
+                        return [ this[0], walk(vvar), walk(key), walk(hash), walk(block) ];
+                },
+                "while": function(cond, block) {
+                        return [ this[0], walk(cond), walk(block) ];
+                },
+                "do": function(cond, block) {
+                        return [ this[0], walk(cond), walk(block) ];
+                },
+                "return": function(expr) {
+                        return [ this[0], walk(expr) ];
+                },
+                "binary": function(op, left, right) {
+                        return [ this[0], op, walk(left), walk(right) ];
+                },
+                "unary-prefix": function(op, expr) {
+                        return [ this[0], op, walk(expr) ];
+                },
+                "unary-postfix": function(op, expr) {
+                        return [ this[0], op, walk(expr) ];
+                },
+                "sub": function(expr, subscript) {
+                        return [ this[0], walk(expr), walk(subscript) ];
+                },
+                "object": function(props) {
+                        return [ this[0], MAP(props, function(p){
+                                return p.length == 2
+                                        ? [ p[0], walk(p[1]) ]
+                                        : [ p[0], walk(p[1]), p[2] ]; // get/set-ter
+                        }) ];
+                },
+                "regexp": function(rx, mods) {
+                        return [ this[0], rx, mods ];
+                },
+                "array": function(elements) {
+                        return [ this[0], MAP(elements, walk) ];
+                },
+                "stat": function(stat) {
+                        return [ this[0], walk(stat) ];
+                },
+                "seq": function() {
+                        return [ this[0] ].concat(MAP(slice(arguments), walk));
+                },
+                "label": function(name, block) {
+                        return [ this[0], name, walk(block) ];
+                },
+                "with": function(expr, block) {
+                        return [ this[0], walk(expr), walk(block) ];
+                },
+                "atom": function(name) {
+                        return [ this[0], name ];
+                }
+        };
+
+        var user = {};
+        var stack = [];
+        function walk(ast) {
+                if (ast == null)
+                        return null;
+                try {
+                        stack.push(ast);
+                        var type = ast[0];
+                        var gen = user[type];
+                        if (gen) {
+                                var ret = gen.apply(ast, ast.slice(1));
+                                if (ret != null)
+                                        return ret;
+                        }
+                        gen = walkers[type];
+                        return gen.apply(ast, ast.slice(1));
+                } finally {
+                        stack.pop();
+                }
+        };
+
+        function with_walkers(walkers, cont){
+                var save = {}, i;
+                for (i in walkers) if (HOP(walkers, i)) {
+                        save[i] = user[i];
+                        user[i] = walkers[i];
+                }
+                var ret = cont();
+                for (i in save) if (HOP(save, i)) {
+                        if (!save[i]) delete user[i];
+                        else user[i] = save[i];
+                }
+                return ret;
+        };
+
+        return {
+                walk: walk,
+                with_walkers: with_walkers,
+                parent: function() {
+                        return stack[stack.length - 2]; // last one is current node
+                },
+                stack: function() {
+                        return stack;
+                }
+        };
+};
+
+/* -----[ Scope and mangling ]----- */
+
+function Scope(parent) {
+        this.names = {};        // names defined in this scope
+        this.mangled = {};      // mangled names (orig.name => mangled)
+        this.rev_mangled = {};  // reverse lookup (mangled => orig.name)
+        this.cname = -1;        // current mangled name
+        this.refs = {};         // names referenced from this scope
+        this.uses_with = false; // will become TRUE if eval() is detected in this or any subscopes
+        this.uses_eval = false; // will become TRUE if with() is detected in this or any subscopes
+        this.parent = parent;   // parent scope
+        this.children = [];     // sub-scopes
+        if (parent) {
+                this.level = parent.level + 1;
+                parent.children.push(this);
+        } else {
+                this.level = 0;
+        }
+};
+
+var base54 = (function(){
+        var DIGITS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_";
+        return function(num) {
+                var ret = "";
+                do {
+                        ret = DIGITS.charAt(num % 54) + ret;
+                        num = Math.floor(num / 54);
+                } while (num > 0);
+                return ret;
+        };
+})();
+
+Scope.prototype = {
+        has: function(name) {
+                for (var s = this; s; s = s.parent)
+                        if (HOP(s.names, name))
+                                return s;
+        },
+        has_mangled: function(mname) {
+                for (var s = this; s; s = s.parent)
+                        if (HOP(s.rev_mangled, mname))
+                                return s;
+        },
+        toJSON: function() {
+                return {
+                        names: this.names,
+                        uses_eval: this.uses_eval,
+                        uses_with: this.uses_with
+                };
+        },
+
+        next_mangled: function() {
+                // we must be careful that the new mangled name:
+                //
+                // 1. doesn't shadow a mangled name from a parent
+                //    scope, unless we don't reference the original
+                //    name from this scope OR from any sub-scopes!
+                //    This will get slow.
+                //
+                // 2. doesn't shadow an original name from a parent
+                //    scope, in the event that the name is not mangled
+                //    in the parent scope and we reference that name
+                //    here OR IN ANY SUBSCOPES!
+                //
+                // 3. doesn't shadow a name that is referenced but not
+                //    defined (possibly global defined elsewhere).
+                for (;;) {
+                        var m = base54(++this.cname), prior;
+
+                        // case 1.
+                        prior = this.has_mangled(m);
+                        if (prior && this.refs[prior.rev_mangled[m]] === prior)
+                                continue;
+
+                        // case 2.
+                        prior = this.has(m);
+                        if (prior && prior !== this && this.refs[m] === prior && !prior.has_mangled(m))
+                                continue;
+
+                        // case 3.
+                        if (HOP(this.refs, m) && this.refs[m] == null)
+                                continue;
+
+                        // I got "do" once. :-/
+                        if (!is_identifier(m))
+                                continue;
+
+                        return m;
+                }
+        },
+        get_mangled: function(name, newMangle) {
+                if (this.uses_eval || this.uses_with) return name; // no mangle if eval or with is in use
+                var s = this.has(name);
+                if (!s) return name; // not in visible scope, no mangle
+                if (HOP(s.mangled, name)) return s.mangled[name]; // already mangled in this scope
+                if (!newMangle) return name;                      // not found and no mangling requested
+
+                var m = s.next_mangled();
+                s.rev_mangled[m] = name;
+                return s.mangled[name] = m;
+        },
+        define: function(name) {
+                if (name != null)
+                        return this.names[name] = name;
+        }
+};
+
+function ast_add_scope(ast) {
+
+        var current_scope = null;
+        var w = ast_walker(), walk = w.walk;
+        var having_eval = [];
+
+        function with_new_scope(cont) {
+                current_scope = new Scope(current_scope);
+                var ret = current_scope.body = cont();
+                ret.scope = current_scope;
+                current_scope = current_scope.parent;
+                return ret;
+        };
+
+        function define(name) {
+                return current_scope.define(name);
+        };
+
+        function reference(name) {
+                current_scope.refs[name] = true;
+        };
+
+        function _lambda(name, args, body) {
+                return [ this[0], define(name), args, with_new_scope(function(){
+                        MAP(args, define);
+                        return MAP(body, walk);
+                })];
+        };
+
+        return with_new_scope(function(){
+                // process AST
+                var ret = w.with_walkers({
+                        "function": _lambda,
+                        "defun": _lambda,
+                        "with": function(expr, block) {
+                                for (var s = current_scope; s; s = s.parent)
+                                        s.uses_with = true;
+                        },
+                        "var": function(defs) {
+                                MAP(defs, function(d){ define(d[0]) });
+                        },
+                        "const": function(defs) {
+                                MAP(defs, function(d){ define(d[0]) });
+                        },
+                        "try": function(t, c, f) {
+                                if (c != null) return [
+                                        this[0],
+                                        MAP(t, walk),
+                                        [ define(c[0]), MAP(c[1], walk) ],
+                                        f != null ? MAP(f, walk) : null
+                                ];
+                        },
+                        "name": function(name) {
+                                if (name == "eval")
+                                        having_eval.push(current_scope);
+                                reference(name);
+                        }
+                }, function(){
+                        return walk(ast);
+                });
+
+                // the reason why we need an additional pass here is
+                // that names can be used prior to their definition.
+
+                // scopes where eval was detected and their parents
+                // are marked with uses_eval, unless they define the
+                // "eval" name.
+                MAP(having_eval, function(scope){
+                        if (!scope.has("eval")) while (scope) {
+                                scope.uses_eval = true;
+                                scope = scope.parent;
+                        }
+                });
+
+                // for referenced names it might be useful to know
+                // their origin scope.  current_scope here is the
+                // toplevel one.
+                function fixrefs(scope, i) {
+                        // do children first; order shouldn't matter
+                        for (i = scope.children.length; --i >= 0;)
+                                fixrefs(scope.children[i]);
+                        for (i in scope.refs) if (HOP(scope.refs, i)) {
+                                // find origin scope and propagate the reference to origin
+                                for (var origin = scope.has(i), s = scope; s; s = s.parent) {
+                                        s.refs[i] = origin;
+                                        if (s === origin) break;
+                                }
+                        }
+                };
+                fixrefs(current_scope);
+
+                return ret;
+        });
+
+};
+
+/* -----[ mangle names ]----- */
+
+function ast_mangle(ast, options) {
+        var w = ast_walker(), walk = w.walk, scope;
+        options = options || {};
+
+        function get_mangled(name, newMangle) {
+                if (!options.toplevel && !scope.parent) return name; // don't mangle toplevel
+                if (options.except && member(name, options.except))
+                        return name;
+                return scope.get_mangled(name, newMangle);
+        };
+
+        function _lambda(name, args, body) {
+                if (name) name = get_mangled(name);
+                body = with_scope(body.scope, function(){
+                        args = MAP(args, function(name){ return get_mangled(name) });
+                        return MAP(body, walk);
+                });
+                return [ this[0], name, args, body ];
+        };
+
+        function with_scope(s, cont) {
+                var _scope = scope;
+                scope = s;
+                for (var i in s.names) if (HOP(s.names, i)) {
+                        get_mangled(i, true);
+                }
+                var ret = cont();
+                ret.scope = s;
+                scope = _scope;
+                return ret;
+        };
+
+        function _vardefs(defs) {
+                return [ this[0], MAP(defs, function(d){
+                        return [ get_mangled(d[0]), walk(d[1]) ];
+                }) ];
+        };
+
+        return w.with_walkers({
+                "function": _lambda,
+                "defun": function() {
+                        // move function declarations to the top when
+                        // they are not in some block.
+                        var ast = _lambda.apply(this, arguments);
+                        switch (w.parent()[0]) {
+                            case "toplevel":
+                            case "function":
+                            case "defun":
+                                return MAP.at_top(ast);
+                        }
+                        return ast;
+                },
+                "var": _vardefs,
+                "const": _vardefs,
+                "name": function(name) {
+                        return [ this[0], get_mangled(name) ];
+                },
+                "try": function(t, c, f) {
+                        return [ this[0],
+                                 MAP(t, walk),
+                                 c != null ? [ get_mangled(c[0]), MAP(c[1], walk) ] : null,
+                                 f != null ? MAP(f, walk) : null ];
+                },
+                "toplevel": function(body) {
+                        var self = this;
+                        return with_scope(self.scope, function(){
+                                return [ self[0], MAP(body, walk) ];
+                        });
+                }
+        }, function() {
+                return walk(ast_add_scope(ast));
+        });
+};
+
+/* -----[
+   - compress foo["bar"] into foo.bar,
+   - remove block brackets {} where possible
+   - join consecutive var declarations
+   - various optimizations for IFs:
+     - if (cond) foo(); else bar();  ==>  cond?foo():bar();
+     - if (cond) foo();  ==>  cond&&foo();
+     - if (foo) return bar(); else return baz();  ==> return foo?bar():baz(); // also for throw
+     - if (foo) return bar(); else something();  ==> {if(foo)return bar();something()}
+   ]----- */
+
+var warn = function(){};
+
+function best_of(ast1, ast2) {
+        return gen_code(ast1).length > gen_code(ast2[0] == "stat" ? ast2[1] : ast2).length ? ast2 : ast1;
+};
+
+function last_stat(b) {
+        if (b[0] == "block" && b[1] && b[1].length > 0)
+                return b[1][b[1].length - 1];
+        return b;
+}
+
+function aborts(t) {
+        if (t) {
+                t = last_stat(t);
+                if (t[0] == "return" || t[0] == "break" || t[0] == "continue" || t[0] == "throw")
+                        return true;
+        }
+};
+
+function boolean_expr(expr) {
+        return ( (expr[0] == "unary-prefix"
+                  && member(expr[1], [ "!", "delete" ])) ||
+
+                 (expr[0] == "binary"
+                  && member(expr[1], [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ])) ||
+
+                 (expr[0] == "binary"
+                  && member(expr[1], [ "&&", "||" ])
+                  && boolean_expr(expr[2])
+                  && boolean_expr(expr[3])) ||
+
+                 (expr[0] == "conditional"
+                  && boolean_expr(expr[2])
+                  && boolean_expr(expr[3])) ||
+
+                 (expr[0] == "assign"
+                  && expr[1] === true
+                  && boolean_expr(expr[3])) ||
+
+                 (expr[0] == "seq"
+                  && boolean_expr(expr[expr.length - 1]))
+               );
+};
+
+function make_conditional(c, t, e) {
+        if (c[0] == "unary-prefix" && c[1] == "!") {
+                return e ? [ "conditional", c[2], e, t ] : [ "binary", "||", c[2], t ];
+        } else {
+                return e ? [ "conditional", c, t, e ] : [ "binary", "&&", c, t ];
+        }
+};
+
+function empty(b) {
+        return !b || (b[0] == "block" && (!b[1] || b[1].length == 0));
+};
+
+function is_string(node) {
+        return (node[0] == "string" ||
+                node[0] == "unary-prefix" && node[1] == "typeof" ||
+                node[0] == "binary" && node[1] == "+" &&
+                (is_string(node[2]) || is_string(node[3])));
+};
+
+var when_constant = (function(){
+
+        var $NOT_CONSTANT = {};
+
+        // this can only evaluate constant expressions.  If it finds anything
+        // not constant, it throws $NOT_CONSTANT.
+        function evaluate(expr) {
+                switch (expr[0]) {
+                    case "string":
+                    case "num":
+                        return expr[1];
+                    case "name":
+                    case "atom":
+                        switch (expr[1]) {
+                            case "true": return true;
+                            case "false": return false;
+                        }
+                        break;
+                    case "unary-prefix":
+                        switch (expr[1]) {
+                            case "!": return !evaluate(expr[2]);
+                            case "typeof": return typeof evaluate(expr[2]);
+                            case "~": return ~evaluate(expr[2]);
+                            case "-": return -evaluate(expr[2]);
+                            case "+": return +evaluate(expr[2]);
+                        }
+                        break;
+                    case "binary":
+                        var left = expr[2], right = expr[3];
+                        switch (expr[1]) {
+                            case "&&"         : return evaluate(left) &&         evaluate(right);
+                            case "||"         : return evaluate(left) ||         evaluate(right);
+                            case "|"          : return evaluate(left) |          evaluate(right);
+                            case "&"          : return evaluate(left) &          evaluate(right);
+                            case "^"          : return evaluate(left) ^          evaluate(right);
+                            case "+"          : return evaluate(left) +          evaluate(right);
+                            case "*"          : return evaluate(left) *          evaluate(right);
+                            case "/"          : return evaluate(left) /          evaluate(right);
+                            case "-"          : return evaluate(left) -          evaluate(right);
+                            case "<<"         : return evaluate(left) <<         evaluate(right);
+                            case ">>"         : return evaluate(left) >>         evaluate(right);
+                            case ">>>"        : return evaluate(left) >>>        evaluate(right);
+                            case "=="         : return evaluate(left) ==         evaluate(right);
+                            case "==="        : return evaluate(left) ===        evaluate(right);
+                            case "!="         : return evaluate(left) !=         evaluate(right);
+                            case "!=="        : return evaluate(left) !==        evaluate(right);
+                            case "<"          : return evaluate(left) <          evaluate(right);
+                            case "<="         : return evaluate(left) <=         evaluate(right);
+                            case ">"          : return evaluate(left) >          evaluate(right);
+                            case ">="         : return evaluate(left) >=         evaluate(right);
+                            case "in"         : return evaluate(left) in         evaluate(right);
+                            case "instanceof" : return evaluate(left) instanceof evaluate(right);
+                        }
+                }
+                throw $NOT_CONSTANT;
+        };
+
+        return function(expr, yes, no) {
+                try {
+                        var val = evaluate(expr), ast;
+                        switch (typeof val) {
+                            case "string": ast =  [ "string", val ]; break;
+                            case "number": ast =  [ "num", val ]; break;
+                            case "boolean": ast =  [ "name", String(val) ]; break;
+                            default: throw new Error("Can't handle constant of type: " + (typeof val));
+                        }
+                        return yes.call(expr, ast, val);
+                } catch(ex) {
+                        if (ex === $NOT_CONSTANT) {
+                                if (expr[0] == "binary"
+                                    && (expr[1] == "===" || expr[1] == "!==")
+                                    && ((is_string(expr[2]) && is_string(expr[3]))
+                                        || (boolean_expr(expr[2]) && boolean_expr(expr[3])))) {
+                                        expr[1] = expr[1].substr(0, 2);
+                                }
+                                return no ? no.call(expr, expr) : null;
+                        }
+                        else throw ex;
+                }
+        };
+
+})();
+
+function warn_unreachable(ast) {
+        if (!empty(ast))
+                warn("Dropping unreachable code: " + gen_code(ast, true));
+};
+
+function ast_squeeze(ast, options) {
+        options = defaults(options, {
+                make_seqs   : true,
+                dead_code   : true,
+                keep_comps  : true,
+                no_warnings : false
+        });
+
+        var w = ast_walker(), walk = w.walk, scope;
+
+        function negate(c) {
+                var not_c = [ "unary-prefix", "!", c ];
+                switch (c[0]) {
+                    case "unary-prefix":
+                        return c[1] == "!" && boolean_expr(c[2]) ? c[2] : not_c;
+                    case "seq":
+                        c = slice(c);
+                        c[c.length - 1] = negate(c[c.length - 1]);
+                        return c;
+                    case "conditional":
+                        return best_of(not_c, [ "conditional", c[1], negate(c[2]), negate(c[3]) ]);
+                    case "binary":
+                        var op = c[1], left = c[2], right = c[3];
+                        if (!options.keep_comps) switch (op) {
+                            case "<="  : return [ "binary", ">", left, right ];
+                            case "<"   : return [ "binary", ">=", left, right ];
+                            case ">="  : return [ "binary", "<", left, right ];
+                            case ">"   : return [ "binary", "<=", left, right ];
+                        }
+                        switch (op) {
+                            case "=="  : return [ "binary", "!=", left, right ];
+                            case "!="  : return [ "binary", "==", left, right ];
+                            case "===" : return [ "binary", "!==", left, right ];
+                            case "!==" : return [ "binary", "===", left, right ];
+                            case "&&"  : return best_of(not_c, [ "binary", "||", negate(left), negate(right) ]);
+                            case "||"  : return best_of(not_c, [ "binary", "&&", negate(left), negate(right) ]);
+                        }
+                        break;
+                }
+                return not_c;
+        };
+
+        function with_scope(s, cont) {
+                var _scope = scope;
+                scope = s;
+                var ret = cont();
+                ret.scope = s;
+                scope = _scope;
+                return ret;
+        };
+
+        function rmblock(block) {
+                if (block != null && block[0] == "block" && block[1]) {
+                        if (block[1].length == 1)
+                                block = block[1][0];
+                        else if (block[1].length == 0)
+                                block = [ "block" ];
+                }
+                return block;
+        };
+
+        function _lambda(name, args, body) {
+                return [ this[0], name, args, with_scope(body.scope, function(){
+                        return tighten(MAP(body, walk), "lambda");
+                }) ];
+        };
+
+        // we get here for blocks that have been already transformed.
+        // this function does a few things:
+        // 1. discard useless blocks
+        // 2. join consecutive var declarations
+        // 3. remove obviously dead code
+        // 4. transform consecutive statements using the comma operator
+        // 5. if block_type == "lambda" and it detects constructs like if(foo) return ... - rewrite like if (!foo) { ... }
+        function tighten(statements, block_type) {
+                statements = statements.reduce(function(a, stat){
+                        if (stat[0] == "block") {
+                                if (stat[1]) {
+                                        a.push.apply(a, stat[1]);
+                                }
+                        } else {
+                                a.push(stat);
+                        }
+                        return a;
+                }, []);
+
+                statements = (function(a, prev){
+                        statements.forEach(function(cur){
+                                if (prev && ((cur[0] == "var" && prev[0] == "var") ||
+                                             (cur[0] == "const" && prev[0] == "const"))) {
+                                        prev[1] = prev[1].concat(cur[1]);
+                                } else {
+                                        a.push(cur);
+                                        prev = cur;
+                                }
+                        });
+                        return a;
+                })([]);
+
+                if (options.dead_code) statements = (function(a, has_quit){
+                        statements.forEach(function(st){
+                                if (has_quit) {
+                                        if (member(st[0], [ "function", "defun" , "var", "const" ])) {
+                                                a.push(st);
+                                        }
+                                        else if (!options.no_warnings)
+                                                warn_unreachable(st);
+                                }
+                                else {
+                                        a.push(st);
+                                        if (member(st[0], [ "return", "throw", "break", "continue" ]))
+                                                has_quit = true;
+                                }
+                        });
+                        return a;
+                })([]);
+
+                if (options.make_seqs) statements = (function(a, prev) {
+                        statements.forEach(function(cur){
+                                if (prev && prev[0] == "stat" && cur[0] == "stat") {
+                                        prev[1] = [ "seq", prev[1], cur[1] ];
+                                } else {
+                                        a.push(cur);
+                                        prev = cur;
+                                }
+                        });
+                        return a;
+                })([]);
+
+                if (block_type == "lambda") statements = (function(i, a, stat){
+                        while (i < statements.length) {
+                                stat = statements[i++];
+                                if (stat[0] == "if" && !stat[3]) {
+                                        if (stat[2][0] == "return" && stat[2][1] == null) {
+                                                a.push(make_if(negate(stat[1]), [ "block", statements.slice(i) ]));
+                                                break;
+                                        }
+                                        var last = last_stat(stat[2]);
+                                        if (last[0] == "return" && last[1] == null) {
+                                                a.push(make_if(stat[1], [ "block", stat[2][1].slice(0, -1) ], [ "block", statements.slice(i) ]));
+                                                break;
+                                        }
+                                }
+                                a.push(stat);
+                        }
+                        return a;
+                })(0, []);
+
+                return statements;
+        };
+
+        function make_if(c, t, e) {
+                return when_constant(c, function(ast, val){
+                        if (val) {
+                                warn_unreachable(e);
+                                return t;
+                        } else {
+                                warn_unreachable(t);
+                                return e;
+                        }
+                }, function() {
+                        return make_real_if(c, t, e);
+                });
+        };
+
+        function make_real_if(c, t, e) {
+                c = walk(c);
+                t = walk(t);
+                e = walk(e);
+
+                if (empty(t)) {
+                        c = negate(c);
+                        t = e;
+                        e = null;
+                } else if (empty(e)) {
+                        e = null;
+                } else {
+                        // if we have both else and then, maybe it makes sense to switch them?
+                        (function(){
+                                var a = gen_code(c);
+                                var n = negate(c);
+                                var b = gen_code(n);
+                                if (b.length < a.length) {
+                                        var tmp = t;
+                                        t = e;
+                                        e = tmp;
+                                        c = n;
+                                }
+                        })();
+                }
+                if (empty(e) && empty(t))
+                        return [ "stat", c ];
+                var ret = [ "if", c, t, e ];
+                if (t[0] == "if" && empty(t[3]) && empty(e)) {
+                        ret = best_of(ret, walk([ "if", [ "binary", "&&", c, t[1] ], t[2] ]));
+                }
+                else if (t[0] == "stat") {
+                        if (e) {
+                                if (e[0] == "stat") {
+                                        ret = best_of(ret, [ "stat", make_conditional(c, t[1], e[1]) ]);
+                                }
+                        }
+                        else {
+                                ret = best_of(ret, [ "stat", make_conditional(c, t[1]) ]);
+                        }
+                }
+                else if (e && t[0] == e[0] && (t[0] == "return" || t[0] == "throw") && t[1] && e[1]) {
+                        ret = best_of(ret, [ t[0], make_conditional(c, t[1], e[1] ) ]);
+                }
+                else if (e && aborts(t)) {
+                        ret = [ [ "if", c, t ] ];
+                        if (e[0] == "block") {
+                                if (e[1]) ret = ret.concat(e[1]);
+                        }
+                        else {
+                                ret.push(e);
+                        }
+                        ret = walk([ "block", ret ]);
+                }
+                else if (t && aborts(e)) {
+                        ret = [ [ "if", negate(c), e ] ];
+                        if (t[0] == "block") {
+                                if (t[1]) ret = ret.concat(t[1]);
+                        } else {
+                                ret.push(t);
+                        }
+                        ret = walk([ "block", ret ]);
+                }
+                return ret;
+        };
+
+        function _do_while(cond, body) {
+                return when_constant(cond, function(cond, val){
+                        if (!val) {
+                                warn_unreachable(body);
+                                return [ "block" ];
+                        } else {
+                                return [ "for", null, null, null, walk(body) ];
+                        }
+                });
+        };
+
+        return w.with_walkers({
+                "sub": function(expr, subscript) {
+                        if (subscript[0] == "string") {
+                                var name = subscript[1];
+                                if (is_identifier(name))
+                                        return [ "dot", walk(expr), name ];
+                                else if (/^[1-9][0-9]*$/.test(name) || name === "0")
+                                        return [ "sub", walk(expr), [ "num", parseInt(name, 10) ] ];
+                        }
+                },
+                "if": make_if,
+                "toplevel": function(body) {
+                        return [ "toplevel", with_scope(this.scope, function(){
+                                return tighten(MAP(body, walk));
+                        }) ];
+                },
+                "switch": function(expr, body) {
+                        var last = body.length - 1;
+                        return [ "switch", walk(expr), MAP(body, function(branch, i){
+                                var block = tighten(MAP(branch[1], walk));
+                                if (i == last && block.length > 0) {
+                                        var node = block[block.length - 1];
+                                        if (node[0] == "break" && !node[1])
+                                                block.pop();
+                                }
+                                return [ branch[0] ? walk(branch[0]) : null, block ];
+                        }) ];
+                },
+                "function": function() {
+                        var ret = _lambda.apply(this, arguments);
+                        if (ret[1] && !HOP(scope.refs, ret[1])) {
+                                ret[1] = null;
+                        }
+                        return ret;
+                },
+                "defun": _lambda,
+                "block": function(body) {
+                        if (body) return rmblock([ "block", tighten(MAP(body, walk)) ]);
+                },
+                "binary": function(op, left, right) {
+                        return when_constant([ "binary", op, walk(left), walk(right) ], function yes(c){
+                                return best_of(walk(c), this);
+                        }, function no() {
+                                return this;
+                        });
+                },
+                "conditional": function(c, t, e) {
+                        return make_conditional(walk(c), walk(t), walk(e));
+                },
+                "try": function(t, c, f) {
+                        return [
+                                "try",
+                                tighten(MAP(t, walk)),
+                                c != null ? [ c[0], tighten(MAP(c[1], walk)) ] : null,
+                                f != null ? tighten(MAP(f, walk)) : null
+                        ];
+                },
+                "unary-prefix": function(op, expr) {
+                        expr = walk(expr);
+                        var ret = [ "unary-prefix", op, expr ];
+                        if (op == "!")
+                                ret = best_of(ret, negate(expr));
+                        return when_constant(ret, function(ast, val){
+                                return walk(ast); // it's either true or false, so minifies to !0 or !1
+                        }, function() { return ret });
+                },
+                "name": function(name) {
+                        switch (name) {
+                            case "true": return [ "unary-prefix", "!", [ "num", 0 ]];
+                            case "false": return [ "unary-prefix", "!", [ "num", 1 ]];
+                        }
+                },
+                "new": function(ctor, args) {
+                        if (ctor[0] == "name" && ctor[1] == "Array" && !scope.has("Array")) {
+                                if (args.length != 1) {
+                                        return [ "array", args ];
+                                } else {
+                                        return [ "call", [ "name", "Array" ], args ];
+                                }
+                        }
+                },
+                "call": function(expr, args) {
+                        if (expr[0] == "name" && expr[1] == "Array" && args.length != 1 && !scope.has("Array")) {
+                                return [ "array", args ];
+                        }
+                },
+                "while": _do_while,
+                "do": _do_while
+        }, function() {
+                return walk(ast_add_scope(ast));
+        });
+};
+
+/* -----[ re-generate code from the AST ]----- */
+
+var DOT_CALL_NO_PARENS = jsp.array_to_hash([
+        "name",
+        "array",
+        "object",
+        "string",
+        "dot",
+        "sub",
+        "call",
+        "regexp"
+]);
+
+function make_string(str, ascii_only) {
+        var dq = 0, sq = 0;
+        str = str.replace(/[\\\b\f\n\r\t\x22\x27]/g, function(s){
+                switch (s) {
+                    case "\\": return "\\\\";
+                    case "\b": return "\\b";
+                    case "\f": return "\\f";
+                    case "\n": return "\\n";
+                    case "\r": return "\\r";
+                    case "\t": return "\\t";
+                    case '"': ++dq; return '"';
+                    case "'": ++sq; return "'";
+                }
+                return s;
+        });
+        if (ascii_only) str = to_ascii(str);
+        if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'";
+        else return '"' + str.replace(/\x22/g, '\\"') + '"';
+};
+
+function to_ascii(str) {
+        return str.replace(/[\u0080-\uffff]/g, function(ch) {
+                var code = ch.charCodeAt(0).toString(16);
+                while (code.length < 4) code = "0" + code;
+                return "\\u" + code;
+        });
+};
+
+function gen_code(ast, options) {
+        options = defaults(options, {
+                indent_start : 0,
+                indent_level : 4,
+                quote_keys   : false,
+                space_colon  : false,
+                beautify     : false,
+                ascii_only   : false
+        });
+        var beautify = !!options.beautify;
+        var indentation = 0,
+            newline = beautify ? "\n" : "",
+            space = beautify ? " " : "";
+
+        function encode_string(str) {
+                return make_string(str, options.ascii_only);
+        };
+
+        function make_name(name) {
+                name = name.toString();
+                if (options.ascii_only)
+                        name = to_ascii(name);
+                return name;
+        };
+
+        function indent(line) {
+                if (line == null)
+                        line = "";
+                if (beautify)
+                        line = repeat_string(" ", options.indent_start + indentation * options.indent_level) + line;
+                return line;
+        };
+
+        function with_indent(cont, incr) {
+                if (incr == null) incr = 1;
+                indentation += incr;
+                try { return cont.apply(null, slice(arguments, 1)); }
+                finally { indentation -= incr; }
+        };
+
+        function add_spaces(a) {
+                if (beautify)
+                        return a.join(" ");
+                var b = [];
+                for (var i = 0; i < a.length; ++i) {
+                        var next = a[i + 1];
+                        b.push(a[i]);
+                        if (next &&
+                            ((/[a-z0-9_\x24]$/i.test(a[i].toString()) && /^[a-z0-9_\x24]/i.test(next.toString())) ||
+                             (/[\+\-]$/.test(a[i].toString()) && /^[\+\-]/.test(next.toString())))) {
+                                b.push(" ");
+                        }
+                }
+                return b.join("");
+        };
+
+        function add_commas(a) {
+                return a.join("," + space);
+        };
+
+        function parenthesize(expr) {
+                var gen = make(expr);
+                for (var i = 1; i < arguments.length; ++i) {
+                        var el = arguments[i];
+                        if ((el instanceof Function && el(expr)) || expr[0] == el)
+                                return "(" + gen + ")";
+                }
+                return gen;
+        };
+
+        function best_of(a) {
+                if (a.length == 1) {
+                        return a[0];
+                }
+                if (a.length == 2) {
+                        var b = a[1];
+                        a = a[0];
+                        return a.length <= b.length ? a : b;
+                }
+                return best_of([ a[0], best_of(a.slice(1)) ]);
+        };
+
+        function needs_parens(expr) {
+                if (expr[0] == "function" || expr[0] == "object") {
+                        // dot/call on a literal function requires the
+                        // function literal itself to be parenthesized
+                        // only if it's the first "thing" in a
+                        // statement.  This means that the parent is
+                        // "stat", but it could also be a "seq" and
+                        // we're the first in this "seq" and the
+                        // parent is "stat", and so on.  Messy stuff,
+                        // but it worths the trouble.
+                        var a = slice($stack), self = a.pop(), p = a.pop();
+                        while (p) {
+                                if (p[0] == "stat") return true;
+                                if (((p[0] == "seq" || p[0] == "call" || p[0] == "dot" || p[0] == "sub" || p[0] == "conditional") && p[1] === self) ||
+                                    ((p[0] == "binary" || p[0] == "assign" || p[0] == "unary-postfix") && p[2] === self)) {
+                                        self = p;
+                                        p = a.pop();
+                                } else {
+                                        return false;
+                                }
+                        }
+                }
+                return !HOP(DOT_CALL_NO_PARENS, expr[0]);
+        };
+
+        function make_num(num) {
+                var str = num.toString(10), a = [ str.replace(/^0\./, ".") ], m;
+                if (Math.floor(num) === num) {
+                        a.push("0x" + num.toString(16).toLowerCase(), // probably pointless
+                               "0" + num.toString(8)); // same.
+                        if ((m = /^(.*?)(0+)$/.exec(num))) {
+                                a.push(m[1] + "e" + m[2].length);
+                        }
+                } else if ((m = /^0?\.(0+)(.*)$/.exec(num))) {
+                        a.push(m[2] + "e-" + (m[1].length + m[2].length),
+                               str.substr(str.indexOf(".")));
+                }
+                return best_of(a);
+        };
+
+        var generators = {
+                "string": encode_string,
+                "num": make_num,
+                "name": make_name,
+                "toplevel": function(statements) {
+                        return make_block_statements(statements)
+                                .join(newline + newline);
+                },
+                "block": make_block,
+                "var": function(defs) {
+                        return "var " + add_commas(MAP(defs, make_1vardef)) + ";";
+                },
+                "const": function(defs) {
+                        return "const " + add_commas(MAP(defs, make_1vardef)) + ";";
+                },
+                "try": function(tr, ca, fi) {
+                        var out = [ "try", make_block(tr) ];
+                        if (ca) out.push("catch", "(" + ca[0] + ")", make_block(ca[1]));
+                        if (fi) out.push("finally", make_block(fi));
+                        return add_spaces(out);
+                },
+                "throw": function(expr) {
+                        return add_spaces([ "throw", make(expr) ]) + ";";
+                },
+                "new": function(ctor, args) {
+                        args = args.length > 0 ? "(" + add_commas(MAP(args, make)) + ")" : "";
+                        return add_spaces([ "new", parenthesize(ctor, "seq", "binary", "conditional", "assign", function(expr){
+                                var w = ast_walker(), has_call = {};
+                                try {
+                                        w.with_walkers({
+                                                "call": function() { throw has_call },
+                                                "function": function() { return this }
+                                        }, function(){
+                                                w.walk(expr);
+                                        });
+                                } catch(ex) {
+                                        if (ex === has_call)
+                                                return true;
+                                        throw ex;
+                                }
+                        }) + args ]);
+                },
+                "switch": function(expr, body) {
+                        return add_spaces([ "switch", "(" + make(expr) + ")", make_switch_block(body) ]);
+                },
+                "break": function(label) {
+                        var out = "break";
+                        if (label != null)
+                                out += " " + make_name(label);
+                        return out + ";";
+                },
+                "continue": function(label) {
+                        var out = "continue";
+                        if (label != null)
+                                out += " " + make_name(label);
+                        return out + ";";
+                },
+                "conditional": function(co, th, el) {
+                        return add_spaces([ parenthesize(co, "assign", "seq", "conditional"), "?",
+                                            parenthesize(th, "seq"), ":",
+                                            parenthesize(el, "seq") ]);
+                },
+                "assign": function(op, lvalue, rvalue) {
+                        if (op && op !== true) op += "=";
+                        else op = "=";
+                        return add_spaces([ make(lvalue), op, parenthesize(rvalue, "seq") ]);
+                },
+                "dot": function(expr) {
+                        var out = make(expr), i = 1;
+                        if (expr[0] == "num") {
+                                if (!/\./.test(expr[1]))
+                                        out += ".";
+                        } else if (needs_parens(expr))
+                                out = "(" + out + ")";
+                        while (i < arguments.length)
+                                out += "." + make_name(arguments[i++]);
+                        return out;
+                },
+                "call": function(func, args) {
+                        var f = make(func);
+                        if (needs_parens(func))
+                                f = "(" + f + ")";
+                        return f + "(" + add_commas(MAP(args, function(expr){
+                                return parenthesize(expr, "seq");
+                        })) + ")";
+                },
+                "function": make_function,
+                "defun": make_function,
+                "if": function(co, th, el) {
+                        var out = [ "if", "(" + make(co) + ")", el ? make_then(th) : make(th) ];
+                        if (el) {
+                                out.push("else", make(el));
+                        }
+                        return add_spaces(out);
+                },
+                "for": function(init, cond, step, block) {
+                        var out = [ "for" ];
+                        init = (init != null ? make(init) : "").replace(/;*\s*$/, ";" + space);
+                        cond = (cond != null ? make(cond) : "").replace(/;*\s*$/, ";" + space);
+                        step = (step != null ? make(step) : "").replace(/;*\s*$/, "");
+                        var args = init + cond + step;
+                        if (args == "; ; ") args = ";;";
+                        out.push("(" + args + ")", make(block));
+                        return add_spaces(out);
+                },
+                "for-in": function(vvar, key, hash, block) {
+                        return add_spaces([ "for", "(" +
+                                            (vvar ? make(vvar).replace(/;+$/, "") : make(key)),
+                                            "in",
+                                            make(hash) + ")", make(block) ]);
+                },
+                "while": function(condition, block) {
+                        return add_spaces([ "while", "(" + make(condition) + ")", make(block) ]);
+                },
+                "do": function(condition, block) {
+                        return add_spaces([ "do", make(block), "while", "(" + make(condition) + ")" ]) + ";";
+                },
+                "return": function(expr) {
+                        var out = [ "return" ];
+                        if (expr != null) out.push(make(expr));
+                        return add_spaces(out) + ";";
+                },
+                "binary": function(operator, lvalue, rvalue) {
+                        var left = make(lvalue), right = make(rvalue);
+                        // XXX: I'm pretty sure other cases will bite here.
+                        //      we need to be smarter.
+                        //      adding parens all the time is the safest bet.
+                        if (member(lvalue[0], [ "assign", "conditional", "seq" ]) ||
+                            lvalue[0] == "binary" && PRECEDENCE[operator] > PRECEDENCE[lvalue[1]]) {
+                                left = "(" + left + ")";
+                        }
+                        if (member(rvalue[0], [ "assign", "conditional", "seq" ]) ||
+                            rvalue[0] == "binary" && PRECEDENCE[operator] >= PRECEDENCE[rvalue[1]] &&
+                            !(rvalue[1] == operator && member(operator, [ "&&", "||", "*" ]))) {
+                                right = "(" + right + ")";
+                        }
+                        return add_spaces([ left, operator, right ]);
+                },
+                "unary-prefix": function(operator, expr) {
+                        var val = make(expr);
+                        if (!(expr[0] == "num" || (expr[0] == "unary-prefix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr)))
+                                val = "(" + val + ")";
+                        return operator + (jsp.is_alphanumeric_char(operator.charAt(0)) ? " " : "") + val;
+                },
+                "unary-postfix": function(operator, expr) {
+                        var val = make(expr);
+                        if (!(expr[0] == "num" || (expr[0] == "unary-postfix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr)))
+                                val = "(" + val + ")";
+                        return val + operator;
+                },
+                "sub": function(expr, subscript) {
+                        var hash = make(expr);
+                        if (needs_parens(expr))
+                                hash = "(" + hash + ")";
+                        return hash + "[" + make(subscript) + "]";
+                },
+                "object": function(props) {
+                        if (props.length == 0)
+                                return "{}";
+                        return "{" + newline + with_indent(function(){
+                                return MAP(props, function(p){
+                                        if (p.length == 3) {
+                                                // getter/setter.  The name is in p[0], the arg.list in p[1][2], the
+                                                // body in p[1][3] and type ("get" / "set") in p[2].
+                                                return indent(make_function(p[0], p[1][2], p[1][3], p[2]));
+                                        }
+                                        var key = p[0], val = make(p[1]);
+                                        if (options.quote_keys) {
+                                                key = encode_string(key);
+                                        } else if ((typeof key == "number" || !beautify && +key + "" == key)
+                                                   && parseFloat(key) >= 0) {
+                                                key = make_num(+key);
+                                        } else if (!is_identifier(key)) {
+                                                key = encode_string(key);
+                                        }
+                                        return indent(add_spaces(beautify && options.space_colon
+                                                                 ? [ key, ":", val ]
+                                                                 : [ key + ":", val ]));
+                                }).join("," + newline);
+                        }) + newline + indent("}");
+                },
+                "regexp": function(rx, mods) {
+                        return "/" + rx + "/" + mods;
+                },
+                "array": function(elements) {
+                        if (elements.length == 0) return "[]";
+                        return add_spaces([ "[", add_commas(MAP(elements, function(el){
+                                if (!beautify && el[0] == "atom" && el[1] == "undefined") return "";
+                                return parenthesize(el, "seq");
+                        })), "]" ]);
+                },
+                "stat": function(stmt) {
+                        return make(stmt).replace(/;*\s*$/, ";");
+                },
+                "seq": function() {
+                        return add_commas(MAP(slice(arguments), make));
+                },
+                "label": function(name, block) {
+                        return add_spaces([ make_name(name), ":", make(block) ]);
+                },
+                "with": function(expr, block) {
+                        return add_spaces([ "with", "(" + make(expr) + ")", make(block) ]);
+                },
+                "atom": function(name) {
+                        return make_name(name);
+                }
+        };
+
+        // The squeezer replaces "block"-s that contain only a single
+        // statement with the statement itself; technically, the AST
+        // is correct, but this can create problems when we output an
+        // IF having an ELSE clause where the THEN clause ends in an
+        // IF *without* an ELSE block (then the outer ELSE would refer
+        // to the inner IF).  This function checks for this case and
+        // adds the block brackets if needed.
+        function make_then(th) {
+                if (th[0] == "do") {
+                        // https://github.com/mishoo/UglifyJS/issues/#issue/57
+                        // IE croaks with "syntax error" on code like this:
+                        //     if (foo) do ... while(cond); else ...
+                        // we need block brackets around do/while
+                        return make([ "block", [ th ]]);
+                }
+                var b = th;
+                while (true) {
+                        var type = b[0];
+                        if (type == "if") {
+                                if (!b[3])
+                                        // no else, we must add the block
+                                        return make([ "block", [ th ]]);
+                                b = b[3];
+                        }
+                        else if (type == "while" || type == "do") b = b[2];
+                        else if (type == "for" || type == "for-in") b = b[4];
+                        else break;
+                }
+                return make(th);
+        };
+
+        function make_function(name, args, body, keyword) {
+                var out = keyword || "function";
+                if (name) {
+                        out += " " + make_name(name);
+                }
+                out += "(" + add_commas(MAP(args, make_name)) + ")";
+                return add_spaces([ out, make_block(body) ]);
+        };
+
+        function make_block_statements(statements) {
+                for (var a = [], last = statements.length - 1, i = 0; i <= last; ++i) {
+                        var stat = statements[i];
+                        var code = make(stat);
+                        if (code != ";") {
+                                if (!beautify && i == last) {
+                                        if ((stat[0] == "while" && empty(stat[2])) ||
+                                            (member(stat[0], [ "for", "for-in"] ) && empty(stat[4])) ||
+                                            (stat[0] == "if" && empty(stat[2]) && !stat[3]) ||
+                                            (stat[0] == "if" && stat[3] && empty(stat[3]))) {
+                                                code = code.replace(/;*\s*$/, ";");
+                                        } else {
+                                                code = code.replace(/;+\s*$/, "");
+                                        }
+                                }
+                                a.push(code);
+                        }
+                }
+                return MAP(a, indent);
+        };
+
+        function make_switch_block(body) {
+                var n = body.length;
+                if (n == 0) return "{}";
+                return "{" + newline + MAP(body, function(branch, i){
+                        var has_body = branch[1].length > 0, code = with_indent(function(){
+                                return indent(branch[0]
+                                              ? add_spaces([ "case", make(branch[0]) + ":" ])
+                                              : "default:");
+                        }, 0.5) + (has_body ? newline + with_indent(function(){
+                                return make_block_statements(branch[1]).join(newline);
+                        }) : "");
+                        if (!beautify && has_body && i < n - 1)
+                                code += ";";
+                        return code;
+                }).join(newline) + newline + indent("}");
+        };
+
+        function make_block(statements) {
+                if (!statements) return ";";
+                if (statements.length == 0) return "{}";
+                return "{" + newline + with_indent(function(){
+                        return make_block_statements(statements).join(newline);
+                }) + newline + indent("}");
+        };
+
+        function make_1vardef(def) {
+                var name = def[0], val = def[1];
+                if (val != null)
+                        name = add_spaces([ make_name(name), "=", make(val) ]);
+                return name;
+        };
+
+        var $stack = [];
+
+        function make(node) {
+                var type = node[0];
+                var gen = generators[type];
+                if (!gen)
+                        throw new Error("Can't find generator for \"" + type + "\"");
+                $stack.push(node);
+                var ret = gen.apply(type, node.slice(1));
+                $stack.pop();
+                return ret;
+        };
+
+        return make(ast);
+};
+
+function split_lines(code, max_line_length) {
+        var splits = [ 0 ];
+        jsp.parse(function(){
+                var next_token = jsp.tokenizer(code);
+                var last_split = 0;
+                var prev_token;
+                function current_length(tok) {
+                        return tok.pos - last_split;
+                };
+                function split_here(tok) {
+                        last_split = tok.pos;
+                        splits.push(last_split);
+                };
+                function custom(){
+                        var tok = next_token.apply(this, arguments);
+                        out: {
+                                if (prev_token) {
+                                        if (prev_token.type == "keyword") break out;
+                                }
+                                if (current_length(tok) > max_line_length) {
+                                        switch (tok.type) {
+                                            case "keyword":
+                                            case "atom":
+                                            case "name":
+                                            case "punc":
+                                                split_here(tok);
+                                                break out;
+                                        }
+                                }
+                        }
+                        prev_token = tok;
+                        return tok;
+                };
+                custom.context = function() {
+                        return next_token.context.apply(this, arguments);
+                };
+                return custom;
+        }());
+        return splits.map(function(pos, i){
+                return code.substring(pos, splits[i + 1] || code.length);
+        }).join("\n");
+};
+
+/* -----[ Utilities ]----- */
+
+function repeat_string(str, i) {
+        if (i <= 0) return "";
+        if (i == 1) return str;
+        var d = repeat_string(str, i >> 1);
+        d += d;
+        if (i & 1) d += str;
+        return d;
+};
+
+function defaults(args, defs) {
+        var ret = {};
+        if (args === true)
+                args = {};
+        for (var i in defs) if (HOP(defs, i)) {
+                ret[i] = (args && HOP(args, i)) ? args[i] : defs[i];
+        }
+        return ret;
+};
+
+function is_identifier(name) {
+        return /^[a-z_$][a-z0-9_$]*$/i.test(name)
+                && name != "this"
+                && !HOP(jsp.KEYWORDS_ATOM, name)
+                && !HOP(jsp.RESERVED_WORDS, name)
+                && !HOP(jsp.KEYWORDS, name);
+};
+
+function HOP(obj, prop) {
+        return Object.prototype.hasOwnProperty.call(obj, prop);
+};
+
+// some utilities
+
+var MAP;
+
+(function(){
+        MAP = function(a, f, o) {
+                var ret = [];
+                for (var i = 0; i < a.length; ++i) {
+                        var val = f.call(o, a[i], i);
+                        if (val instanceof AtTop) ret.unshift(val.v);
+                        else ret.push(val);
+                }
+                return ret;
+        };
+        MAP.at_top = function(val) { return new AtTop(val) };
+        function AtTop(val) { this.v = val };
+})();
+
+/* -----[ Exports ]----- */
+
+exports.ast_walker = ast_walker;
+exports.ast_mangle = ast_mangle;
+exports.ast_squeeze = ast_squeeze;
+exports.gen_code = gen_code;
+exports.ast_add_scope = ast_add_scope;
+exports.set_logger = function(logger) { warn = logger };
+exports.make_string = make_string;
+exports.split_lines = split_lines;
+exports.MAP = MAP;
+
+// keep this last!
+exports.ast_squeeze_more = require("./squeeze-more").ast_squeeze_more;
Index: Dev/branches/Demo/d3/lib/uglifyjs/lib/squeeze-more.js
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/lib/squeeze-more.js	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/lib/squeeze-more.js	(revision 225)
@@ -0,0 +1,22 @@
+var jsp = require("./parse-js"),
+    pro = require("./process"),
+    slice = jsp.slice,
+    member = jsp.member,
+    PRECEDENCE = jsp.PRECEDENCE,
+    OPERATORS = jsp.OPERATORS;
+
+function ast_squeeze_more(ast) {
+        var w = pro.ast_walker(), walk = w.walk;
+        return w.with_walkers({
+                "call": function(expr, args) {
+                        if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) {
+                                // foo.toString()  ==>  foo+""
+                                return [ "binary", "+", expr[1], [ "string", "" ]];
+                        }
+                }
+        }, function() {
+                return walk(ast);
+        });
+};
+
+exports.ast_squeeze_more = ast_squeeze_more;
Index: Dev/branches/Demo/d3/lib/uglifyjs/package.json
===================================================================
--- Dev/branches/Demo/d3/lib/uglifyjs/package.json	(revision 225)
+++ Dev/branches/Demo/d3/lib/uglifyjs/package.json	(revision 225)
@@ -0,0 +1,6 @@
+{"name"    : "uglify-js",
+ "author"  : "Mihai Bazon - http://github.com/mishoo",
+ "version" : "0.0.1",
+ "main"    : "index.js",
+ "bin"     : { "uglifyjs" : "./bin/uglifyjs" },
+}
Index: Dev/branches/Demo/d3/src/behavior/behavior.js
===================================================================
--- Dev/branches/Demo/d3/src/behavior/behavior.js	(revision 225)
+++ Dev/branches/Demo/d3/src/behavior/behavior.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.behavior = {};
Index: Dev/branches/Demo/d3/src/behavior/zoom.js
===================================================================
--- Dev/branches/Demo/d3/src/behavior/zoom.js	(revision 225)
+++ Dev/branches/Demo/d3/src/behavior/zoom.js	(revision 225)
@@ -0,0 +1,196 @@
+// TODO unbind zoom behavior?
+// TODO unbind listener?
+d3.behavior.zoom = function() {
+  var xyz = [0, 0, 0],
+      event = d3.dispatch("zoom");
+
+  function zoom() {
+    this
+        .on("mousedown.zoom", mousedown)
+        .on("mousewheel.zoom", mousewheel)
+        .on("DOMMouseScroll.zoom", dblclick)
+        .on("dblclick.zoom", dblclick)
+        .on("touchstart.zoom", touchstart);
+
+    d3.select(window)
+        .on("mousemove.zoom", d3_behavior_zoomMousemove)
+        .on("mouseup.zoom", d3_behavior_zoomMouseup)
+        .on("touchmove.zoom", d3_behavior_zoomTouchmove)
+        .on("touchend.zoom", d3_behavior_zoomTouchup);
+  }
+
+  // snapshot the local context for subsequent dispatch
+  function start() {
+    d3_behavior_zoomXyz = xyz;
+    d3_behavior_zoomDispatch = event.zoom.dispatch;
+    d3_behavior_zoomTarget = this;
+    d3_behavior_zoomArguments = arguments;
+  }
+
+  function mousedown() {
+    start.apply(this, arguments);
+    d3_behavior_zoomPanning = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));
+    d3.event.preventDefault();
+    window.focus();
+  }
+
+  // store starting mouse location
+  function mousewheel() {
+    start.apply(this, arguments);
+    if (!d3_behavior_zoomZooming) d3_behavior_zoomZooming = d3_behavior_zoomLocation(d3.svg.mouse(d3_behavior_zoomTarget));
+    d3_behavior_zoomTo(d3_behavior_zoomDelta() + xyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomZooming);
+  }
+
+  function dblclick() {
+    start.apply(this, arguments);
+    var mouse = d3.svg.mouse(d3_behavior_zoomTarget);
+    d3_behavior_zoomTo(d3.event.shiftKey ? Math.ceil(xyz[2] - 1) : Math.floor(xyz[2] + 1), mouse, d3_behavior_zoomLocation(mouse));
+  }
+
+  // doubletap detection
+  function touchstart() {
+    start.apply(this, arguments);
+    var touches = d3_behavior_zoomTouchup(),
+        touch,
+        now = Date.now();
+    if ((touches.length === 1) && (now - d3_behavior_zoomLast < 300)) {
+      d3_behavior_zoomTo(1 + Math.floor(xyz[2]), touch = touches[0], d3_behavior_zoomLocations[touch.identifier]);
+    }
+    d3_behavior_zoomLast = now;
+  }
+
+  zoom.on = function(type, listener) {
+    event[type].add(listener);
+    return zoom;
+  };
+
+  return zoom;
+};
+
+var d3_behavior_zoomDiv,
+    d3_behavior_zoomPanning,
+    d3_behavior_zoomZooming,
+    d3_behavior_zoomLocations = {}, // identifier -> location
+    d3_behavior_zoomLast = 0,
+    d3_behavior_zoomXyz,
+    d3_behavior_zoomDispatch,
+    d3_behavior_zoomTarget,
+    d3_behavior_zoomArguments;
+
+function d3_behavior_zoomLocation(point) {
+  return [
+    point[0] - d3_behavior_zoomXyz[0],
+    point[1] - d3_behavior_zoomXyz[1],
+    d3_behavior_zoomXyz[2]
+  ];
+}
+
+// detect the pixels that would be scrolled by this wheel event
+function d3_behavior_zoomDelta() {
+
+  // mousewheel events are totally broken!
+  // https://bugs.webkit.org/show_bug.cgi?id=40441
+  // not only that, but Chrome and Safari differ in re. to acceleration!
+  if (!d3_behavior_zoomDiv) {
+    d3_behavior_zoomDiv = d3.select("body").append("div")
+        .style("visibility", "hidden")
+        .style("top", 0)
+        .style("height", 0)
+        .style("width", 0)
+        .style("overflow-y", "scroll")
+      .append("div")
+        .style("height", "2000px")
+      .node().parentNode;
+  }
+
+  var e = d3.event, delta;
+  try {
+    d3_behavior_zoomDiv.scrollTop = 1000;
+    d3_behavior_zoomDiv.dispatchEvent(e);
+    delta = 1000 - d3_behavior_zoomDiv.scrollTop;
+  } catch (error) {
+    delta = e.wheelDelta || -e.detail;
+  }
+
+  return delta * .005;
+}
+
+// Note: Since we don't rotate, it's possible for the touches to become
+// slightly detached from their original positions. Thus, we recompute the
+// touch points on touchend as well as touchstart!
+function d3_behavior_zoomTouchup() {
+  var touches = d3.svg.touches(d3_behavior_zoomTarget),
+      i = -1,
+      n = touches.length,
+      touch;
+  while (++i < n) d3_behavior_zoomLocations[(touch = touches[i]).identifier] = d3_behavior_zoomLocation(touch);
+  return touches;
+}
+
+function d3_behavior_zoomTouchmove() {
+  var touches = d3.svg.touches(d3_behavior_zoomTarget);
+  switch (touches.length) {
+
+    // single-touch pan
+    case 1: {
+      var touch = touches[0];
+      d3_behavior_zoomTo(d3_behavior_zoomXyz[2], touch, d3_behavior_zoomLocations[touch.identifier]);
+      break;
+    }
+
+    // double-touch pan + zoom
+    case 2: {
+      var p0 = touches[0],
+          p1 = touches[1],
+          p2 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2],
+          l0 = d3_behavior_zoomLocations[p0.identifier],
+          l1 = d3_behavior_zoomLocations[p1.identifier],
+          l2 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2, l0[2]];
+      d3_behavior_zoomTo(Math.log(d3.event.scale) / Math.LN2 + l0[2], p2, l2);
+      break;
+    }
+  }
+}
+
+function d3_behavior_zoomMousemove() {
+  d3_behavior_zoomZooming = null;
+  if (d3_behavior_zoomPanning) d3_behavior_zoomTo(d3_behavior_zoomXyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomPanning);
+}
+
+function d3_behavior_zoomMouseup() {
+  if (d3_behavior_zoomPanning) {
+    d3_behavior_zoomMousemove();
+    d3_behavior_zoomPanning = null;
+  }
+}
+
+function d3_behavior_zoomTo(z, x0, x1) {
+  var K = Math.pow(2, (d3_behavior_zoomXyz[2] = z) - x1[2]),
+      x = d3_behavior_zoomXyz[0] = x0[0] - K * x1[0],
+      y = d3_behavior_zoomXyz[1] = x0[1] - K * x1[1],
+      o = d3.event, // Events can be reentrant (e.g., focus).
+      k = Math.pow(2, z);
+
+  d3.event = {
+    scale: k,
+    translate: [x, y],
+    transform: function(sx, sy) {
+      if (sx) transform(sx, x);
+      if (sy) transform(sy, y);
+    }
+  };
+
+  function transform(scale, o) {
+    var domain = scale.__domain || (scale.__domain = scale.domain()),
+        range = scale.range().map(function(v) { return (v - o) / k; });
+    scale.domain(domain).domain(range.map(scale.invert));
+  }
+
+  try {
+    d3_behavior_zoomDispatch.apply(d3_behavior_zoomTarget, d3_behavior_zoomArguments);
+  } finally {
+    d3.event = o;
+  }
+
+  o.preventDefault();
+}
Index: Dev/branches/Demo/d3/src/chart/box.js
===================================================================
--- Dev/branches/Demo/d3/src/chart/box.js	(revision 225)
+++ Dev/branches/Demo/d3/src/chart/box.js	(revision 225)
@@ -0,0 +1,297 @@
+// Inspired by http://informationandvisualization.de/blog/box-plot
+d3.chart.box = function() {
+  var width = 1,
+      height = 1,
+      duration = 0,
+      domain = null,
+      value = Number,
+      whiskers = d3_chart_boxWhiskers,
+      quartiles = d3_chart_boxQuartiles,
+      tickFormat = null;
+
+  // For each small multipleâŠ
+  function box(g) {
+    g.each(function(d, i) {
+      d = d.map(value).sort(d3.ascending);
+      var g = d3.select(this),
+          n = d.length,
+          min = d[0],
+          max = d[n - 1];
+
+      // Compute quartiles. Must return exactly 3 elements.
+      var quartileData = d.quartiles = quartiles(d);
+
+      // Compute whiskers. Must return exactly 2 elements, or null.
+      var whiskerIndices = whiskers && whiskers.call(this, d, i),
+          whiskerData = whiskerIndices && whiskerIndices.map(function(i) { return d[i]; });
+
+      // Compute outliers. If no whiskers are specified, all data are "outliers".
+      // We compute the outliers as indices, so that we can join across transitions!
+      var outlierIndices = whiskerIndices
+          ? d3.range(0, whiskerIndices[0]).concat(d3.range(whiskerIndices[1] + 1, n))
+          : d3.range(n);
+
+      // Compute the new x-scale.
+      var x1 = d3.scale.linear()
+          .domain(domain && domain.call(this, d, i) || [min, max])
+          .range([height, 0]);
+
+      // Retrieve the old x-scale, if this is an update.
+      var x0 = this.__chart__ || d3.scale.linear()
+          .domain([0, Infinity])
+          .range(x1.range());
+
+      // Stash the new scale.
+      this.__chart__ = x1;
+
+      // Note: the box, median, and box tick elements are fixed in number,
+      // so we only have to handle enter and update. In contrast, the outliers
+      // and other elements are variable, so we need to exit them! Variable
+      // elements also fade in and out.
+
+      // Update center line: the vertical line spanning the whiskers.
+      var center = g.selectAll("line.center")
+          .data(whiskerData ? [whiskerData] : []);
+
+      center.enter().insert("svg:line", "rect")
+          .attr("class", "center")
+          .attr("x1", width / 2)
+          .attr("y1", function(d) { return x0(d[0]); })
+          .attr("x2", width / 2)
+          .attr("y2", function(d) { return x0(d[1]); })
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .style("opacity", 1)
+          .attr("y1", function(d) { return x1(d[0]); })
+          .attr("y2", function(d) { return x1(d[1]); });
+
+      center.transition()
+          .duration(duration)
+          .style("opacity", 1)
+          .attr("y1", function(d) { return x1(d[0]); })
+          .attr("y2", function(d) { return x1(d[1]); });
+
+      center.exit().transition()
+          .duration(duration)
+          .style("opacity", 1e-6)
+          .attr("y1", function(d) { return x1(d[0]); })
+          .attr("y2", function(d) { return x1(d[1]); })
+          .remove();
+
+      // Update innerquartile box.
+      var box = g.selectAll("rect.box")
+          .data([quartileData]);
+
+      box.enter().append("svg:rect")
+          .attr("class", "box")
+          .attr("x", 0)
+          .attr("y", function(d) { return x0(d[2]); })
+          .attr("width", width)
+          .attr("height", function(d) { return x0(d[0]) - x0(d[2]); })
+        .transition()
+          .duration(duration)
+          .attr("y", function(d) { return x1(d[2]); })
+          .attr("height", function(d) { return x1(d[0]) - x1(d[2]); });
+
+      box.transition()
+          .duration(duration)
+          .attr("y", function(d) { return x1(d[2]); })
+          .attr("height", function(d) { return x1(d[0]) - x1(d[2]); });
+
+      // Update median line.
+      var medianLine = g.selectAll("line.median")
+          .data([quartileData[1]]);
+
+      medianLine.enter().append("svg:line")
+          .attr("class", "median")
+          .attr("x1", 0)
+          .attr("y1", x0)
+          .attr("x2", width)
+          .attr("y2", x0)
+        .transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1);
+
+      medianLine.transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1);
+
+      // Update whiskers.
+      var whisker = g.selectAll("line.whisker")
+          .data(whiskerData || []);
+
+      whisker.enter().insert("svg:line", "circle, text")
+          .attr("class", "whisker")
+          .attr("x1", 0)
+          .attr("y1", x0)
+          .attr("x2", width)
+          .attr("y2", x0)
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1)
+          .style("opacity", 1);
+
+      whisker.transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1)
+          .style("opacity", 1);
+
+      whisker.exit().transition()
+          .duration(duration)
+          .attr("y1", x1)
+          .attr("y2", x1)
+          .style("opacity", 1e-6)
+          .remove();
+
+      // Update outliers.
+      var outlier = g.selectAll("circle.outlier")
+          .data(outlierIndices, Number);
+
+      outlier.enter().insert("svg:circle", "text")
+          .attr("class", "outlier")
+          .attr("r", 5)
+          .attr("cx", width / 2)
+          .attr("cy", function(i) { return x0(d[i]); })
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("cy", function(i) { return x1(d[i]); })
+          .style("opacity", 1);
+
+      outlier.transition()
+          .duration(duration)
+          .attr("cy", function(i) { return x1(d[i]); })
+          .style("opacity", 1);
+
+      outlier.exit().transition()
+          .duration(duration)
+          .attr("cy", function(i) { return x1(d[i]); })
+          .style("opacity", 1e-6)
+          .remove();
+
+      // Compute the tick format.
+      var format = tickFormat || x1.tickFormat(8);
+
+      // Update box ticks.
+      var boxTick = g.selectAll("text.box")
+          .data(quartileData);
+
+      boxTick.enter().append("svg:text")
+          .attr("class", "box")
+          .attr("dy", ".3em")
+          .attr("dx", function(d, i) { return i & 1 ? 6 : -6 })
+          .attr("x", function(d, i) { return i & 1 ? width : 0 })
+          .attr("y", x0)
+          .attr("text-anchor", function(d, i) { return i & 1 ? "start" : "end"; })
+          .text(format)
+        .transition()
+          .duration(duration)
+          .attr("y", x1);
+
+      boxTick.transition()
+          .duration(duration)
+          .text(format)
+          .attr("y", x1);
+
+      // Update whisker ticks. These are handled separately from the box
+      // ticks because they may or may not exist, and we want don't want
+      // to join box ticks pre-transition with whisker ticks post-.
+      var whiskerTick = g.selectAll("text.whisker")
+          .data(whiskerData || []);
+
+      whiskerTick.enter().append("svg:text")
+          .attr("class", "whisker")
+          .attr("dy", ".3em")
+          .attr("dx", 6)
+          .attr("x", width)
+          .attr("y", x0)
+          .text(format)
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("y", x1)
+          .style("opacity", 1);
+
+      whiskerTick.transition()
+          .duration(duration)
+          .text(format)
+          .attr("y", x1)
+          .style("opacity", 1);
+
+      whiskerTick.exit().transition()
+          .duration(duration)
+          .attr("y", x1)
+          .style("opacity", 1e-6)
+          .remove();
+    });
+    d3.timer.flush();
+  }
+
+  box.width = function(x) {
+    if (!arguments.length) return width;
+    width = x;
+    return box;
+  };
+
+  box.height = function(x) {
+    if (!arguments.length) return height;
+    height = x;
+    return box;
+  };
+
+  box.tickFormat = function(x) {
+    if (!arguments.length) return tickFormat;
+    tickFormat = x;
+    return box;
+  };
+
+  box.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = x;
+    return box;
+  };
+
+  box.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x == null ? x : d3.functor(x);
+    return box;
+  };
+
+  box.value = function(x) {
+    if (!arguments.length) return value;
+    value = x;
+    return box;
+  };
+
+  box.whiskers = function(x) {
+    if (!arguments.length) return whiskers;
+    whiskers = x;
+    return box;
+  };
+
+  box.quartiles = function(x) {
+    if (!arguments.length) return quartiles;
+    quartiles = x;
+    return box;
+  };
+
+  return box;
+};
+
+function d3_chart_boxWhiskers(d) {
+  return [0, d.length - 1];
+}
+
+function d3_chart_boxQuartiles(d) {
+  return [
+    d3.quantile(d, .25),
+    d3.quantile(d, .5),
+    d3.quantile(d, .75)
+  ];
+}
Index: Dev/branches/Demo/d3/src/chart/bullet.js
===================================================================
--- Dev/branches/Demo/d3/src/chart/bullet.js	(revision 225)
+++ Dev/branches/Demo/d3/src/chart/bullet.js	(revision 225)
@@ -0,0 +1,237 @@
+// Chart design based on the recommendations of Stephen Few. Implementation
+// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
+// http://projects.instantcognition.com/protovis/bulletchart/
+d3.chart.bullet = function() {
+  var orient = "left", // TODO top & bottom
+      reverse = false,
+      duration = 0,
+      ranges = d3_chart_bulletRanges,
+      markers = d3_chart_bulletMarkers,
+      measures = d3_chart_bulletMeasures,
+      width = 380,
+      height = 30,
+      tickFormat = null;
+
+  // For each small multipleâŠ
+  function bullet(g) {
+    g.each(function(d, i) {
+      var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
+          markerz = markers.call(this, d, i).slice().sort(d3.descending),
+          measurez = measures.call(this, d, i).slice().sort(d3.descending),
+          g = d3.select(this);
+
+      // Compute the new x-scale.
+      var x1 = d3.scale.linear()
+          .domain([0, Math.max(rangez[0], markerz[0], measurez[0])])
+          .range(reverse ? [width, 0] : [0, width]);
+
+      // Retrieve the old x-scale, if this is an update.
+      var x0 = this.__chart__ || d3.scale.linear()
+          .domain([0, Infinity])
+          .range(x1.range());
+
+      // Stash the new scale.
+      this.__chart__ = x1;
+
+      // Derive width-scales from the x-scales.
+      var w0 = d3_chart_bulletWidth(x0),
+          w1 = d3_chart_bulletWidth(x1);
+
+      // Update the range rects.
+      var range = g.selectAll("rect.range")
+          .data(rangez);
+
+      range.enter().append("svg:rect")
+          .attr("class", function(d, i) { return "range s" + i; })
+          .attr("width", w0)
+          .attr("height", height)
+          .attr("x", reverse ? x0 : 0)
+        .transition()
+          .duration(duration)
+          .attr("width", w1)
+          .attr("x", reverse ? x1 : 0);
+
+      range.transition()
+          .duration(duration)
+          .attr("x", reverse ? x1 : 0)
+          .attr("width", w1)
+          .attr("height", height);
+
+      // Update the measure rects.
+      var measure = g.selectAll("rect.measure")
+          .data(measurez);
+
+      measure.enter().append("svg:rect")
+          .attr("class", function(d, i) { return "measure s" + i; })
+          .attr("width", w0)
+          .attr("height", height / 3)
+          .attr("x", reverse ? x0 : 0)
+          .attr("y", height / 3)
+        .transition()
+          .duration(duration)
+          .attr("width", w1)
+          .attr("x", reverse ? x1 : 0);
+
+      measure.transition()
+          .duration(duration)
+          .attr("width", w1)
+          .attr("height", height / 3)
+          .attr("x", reverse ? x1 : 0)
+          .attr("y", height / 3);
+
+      // Update the marker lines.
+      var marker = g.selectAll("line.marker")
+          .data(markerz);
+
+      marker.enter().append("svg:line")
+          .attr("class", "marker")
+          .attr("x1", x0)
+          .attr("x2", x0)
+          .attr("y1", height / 6)
+          .attr("y2", height * 5 / 6)
+        .transition()
+          .duration(duration)
+          .attr("x1", x1)
+          .attr("x2", x1);
+
+      marker.transition()
+          .duration(duration)
+          .attr("x1", x1)
+          .attr("x2", x1)
+          .attr("y1", height / 6)
+          .attr("y2", height * 5 / 6);
+
+      // Compute the tick format.
+      var format = tickFormat || x1.tickFormat(8);
+
+      // Update the tick groups.
+      var tick = g.selectAll("g.tick")
+          .data(x1.ticks(8), function(d) {
+            return this.textContent || format(d);
+          });
+
+      // Initialize the ticks with the old scale, x0.
+      var tickEnter = tick.enter().append("svg:g")
+          .attr("class", "tick")
+          .attr("transform", d3_chart_bulletTranslate(x0))
+          .style("opacity", 1e-6);
+
+      tickEnter.append("svg:line")
+          .attr("y1", height)
+          .attr("y2", height * 7 / 6);
+
+      tickEnter.append("svg:text")
+          .attr("text-anchor", "middle")
+          .attr("dy", "1em")
+          .attr("y", height * 7 / 6)
+          .text(format);
+
+      // Transition the entering ticks to the new scale, x1.
+      tickEnter.transition()
+          .duration(duration)
+          .attr("transform", d3_chart_bulletTranslate(x1))
+          .style("opacity", 1);
+
+      // Transition the updating ticks to the new scale, x1.
+      var tickUpdate = tick.transition()
+          .duration(duration)
+          .attr("transform", d3_chart_bulletTranslate(x1))
+          .style("opacity", 1);
+
+      tickUpdate.select("line")
+          .attr("y1", height)
+          .attr("y2", height * 7 / 6);
+
+      tickUpdate.select("text")
+          .attr("y", height * 7 / 6);
+
+      // Transition the exiting ticks to the new scale, x1.
+      tick.exit().transition()
+          .duration(duration)
+          .attr("transform", d3_chart_bulletTranslate(x1))
+          .style("opacity", 1e-6)
+          .remove();
+    });
+    d3.timer.flush();
+  }
+
+  // left, right, top, bottom
+  bullet.orient = function(x) {
+    if (!arguments.length) return orient;
+    orient = x;
+    reverse = orient == "right" || orient == "bottom";
+    return bullet;
+  };
+
+  // ranges (bad, satisfactory, good)
+  bullet.ranges = function(x) {
+    if (!arguments.length) return ranges;
+    ranges = x;
+    return bullet;
+  };
+
+  // markers (previous, goal)
+  bullet.markers = function(x) {
+    if (!arguments.length) return markers;
+    markers = x;
+    return bullet;
+  };
+
+  // measures (actual, forecast)
+  bullet.measures = function(x) {
+    if (!arguments.length) return measures;
+    measures = x;
+    return bullet;
+  };
+
+  bullet.width = function(x) {
+    if (!arguments.length) return width;
+    width = x;
+    return bullet;
+  };
+
+  bullet.height = function(x) {
+    if (!arguments.length) return height;
+    height = x;
+    return bullet;
+  };
+
+  bullet.tickFormat = function(x) {
+    if (!arguments.length) return tickFormat;
+    tickFormat = x;
+    return bullet;
+  };
+
+  bullet.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = x;
+    return bullet;
+  };
+
+  return bullet;
+};
+
+function d3_chart_bulletRanges(d) {
+  return d.ranges;
+}
+
+function d3_chart_bulletMarkers(d) {
+  return d.markers;
+}
+
+function d3_chart_bulletMeasures(d) {
+  return d.measures;
+}
+
+function d3_chart_bulletTranslate(x) {
+  return function(d) {
+    return "translate(" + x(d) + ",0)";
+  };
+}
+
+function d3_chart_bulletWidth(x) {
+  var x0 = x(0);
+  return function(d) {
+    return Math.abs(x(d) - x0);
+  };
+}
Index: Dev/branches/Demo/d3/src/chart/chart.js
===================================================================
--- Dev/branches/Demo/d3/src/chart/chart.js	(revision 225)
+++ Dev/branches/Demo/d3/src/chart/chart.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.chart = {};
Index: Dev/branches/Demo/d3/src/chart/horizon.js
===================================================================
--- Dev/branches/Demo/d3/src/chart/horizon.js	(revision 225)
+++ Dev/branches/Demo/d3/src/chart/horizon.js	(revision 225)
@@ -0,0 +1,203 @@
+// Implements a horizon layout, which is a variation of a single-series
+// area chart where the area is folded into multiple bands. Color is used to
+// encode band, allowing the size of the chart to be reduced significantly
+// without impeding readability. This layout algorithm is based on the work of
+// J. Heer, N. Kong and M. Agrawala in "Sizing the Horizon: The Effects of Chart
+// Size and Layering on the Graphical Perception of Time Series Visualizations",
+// CHI 2009. http://hci.stanford.edu/publications/2009/heer-horizon-chi09.pdf
+d3.chart.horizon = function() {
+  var bands = 1, // between 1 and 5, typically
+      mode = "offset", // or mirror
+      interpolate = "linear", // or basis, monotone, step-before, etc.
+      x = d3_chart_horizonX,
+      y = d3_chart_horizonY,
+      w = 960,
+      h = 40,
+      duration = 0;
+
+  var color = d3.scale.linear()
+      .domain([-1, 0, 1])
+      .range(["#d62728", "#fff", "#1f77b4"]);
+
+  // For each small multipleâŠ
+  function horizon(g) {
+    g.each(function(d, i) {
+      var g = d3.select(this),
+          n = 2 * bands + 1,
+          xMin = Infinity,
+          xMax = -Infinity,
+          yMax = -Infinity,
+          x0, // old x-scale
+          y0, // old y-scale
+          id; // unique id for paths
+
+      // Compute x- and y-values along with extents.
+      var data = d.map(function(d, i) {
+        var xv = x.call(this, d, i),
+            yv = y.call(this, d, i);
+        if (xv < xMin) xMin = xv;
+        if (xv > xMax) xMax = xv;
+        if (-yv > yMax) yMax = -yv;
+        if (yv > yMax) yMax = yv;
+        return [xv, yv];
+      });
+
+      // Compute the new x- and y-scales.
+      var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]),
+          y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]);
+
+      // Retrieve the old scales, if this is an update.
+      if (this.__chart__) {
+        x0 = this.__chart__.x;
+        y0 = this.__chart__.y;
+        id = this.__chart__.id;
+      } else {
+        x0 = d3.scale.linear().domain([0, Infinity]).range(x1.range());
+        y0 = d3.scale.linear().domain([0, Infinity]).range(y1.range());
+        id = ++d3_chart_horizonId;
+      }
+
+      // We'll use a defs to store the area path and the clip path.
+      var defs = g.selectAll("defs")
+          .data([data]);
+
+      var defsEnter = defs.enter().append("svg:defs");
+
+      // The clip path is a simple rect.
+      defsEnter.append("svg:clipPath")
+          .attr("id", "d3_chart_horizon_clip" + id)
+        .append("svg:rect")
+          .attr("width", w)
+          .attr("height", h);
+
+      defs.select("rect").transition()
+          .duration(duration)
+          .attr("width", w)
+          .attr("height", h);
+
+      // The area path is rendered with our resuable d3.svg.area.
+      defsEnter.append("svg:path")
+          .attr("id", "d3_chart_horizon_path" + id)
+          .attr("d", d3_chart_horizonArea
+          .interpolate(interpolate)
+          .x(function(d) { return x0(d[0]); })
+          .y0(h * bands)
+          .y1(function(d) { return h * bands - y0(d[1]); }))
+        .transition()
+          .duration(duration)
+          .attr("d", d3_chart_horizonArea
+          .x(function(d) { return x1(d[0]); })
+          .y1(function(d) { return h * bands - y1(d[1]); }));
+
+      defs.select("path").transition()
+          .duration(duration)
+          .attr("d", d3_chart_horizonArea);
+
+      // We'll use a container to clip all horizon layers at once.
+      g.selectAll("g")
+          .data([null])
+        .enter().append("svg:g")
+          .attr("clip-path", "url(#d3_chart_horizon_clip" + id + ")");
+
+      // Define the transform function based on the mode.
+      var transform = mode == "offset"
+          ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; }
+          : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; };
+
+      // Instantiate each copy of the path with different transforms.
+      var u = g.select("g").selectAll("use")
+          .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number);
+
+      // TODO don't fudge the enter transition
+      u.enter().append("svg:use")
+          .attr("xlink:href", "#d3_chart_horizon_path" + id)
+          .attr("transform", function(d) { return transform(d + (d > 0 ? 1 : -1)); })
+          .style("fill", color)
+        .transition()
+          .duration(duration)
+          .attr("transform", transform);
+
+      u.transition()
+          .duration(duration)
+          .attr("transform", transform)
+          .style("fill", color);
+
+      u.exit().transition()
+          .duration(duration)
+          .attr("transform", transform)
+          .remove();
+
+      // Stash the new scales.
+      this.__chart__ = {x: x1, y: y1, id: id};
+    });
+    d3.timer.flush();
+  }
+
+  horizon.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = +x;
+    return horizon;
+  };
+
+  horizon.bands = function(x) {
+    if (!arguments.length) return bands;
+    bands = +x;
+    color.domain([-bands, 0, bands]);
+    return horizon;
+  };
+
+  horizon.mode = function(x) {
+    if (!arguments.length) return mode;
+    mode = x + "";
+    return horizon;
+  };
+
+  horizon.colors = function(x) {
+    if (!arguments.length) return color.range();
+    color.range(x);
+    return horizon;
+  };
+
+  horizon.interpolate = function(x) {
+    if (!arguments.length) return interpolate;
+    interpolate = x + "";
+    return horizon;
+  };
+
+  horizon.x = function(z) {
+    if (!arguments.length) return x;
+    x = z;
+    return horizon;
+  };
+
+  horizon.y = function(z) {
+    if (!arguments.length) return y;
+    y = z;
+    return horizon;
+  };
+
+  horizon.width = function(x) {
+    if (!arguments.length) return w;
+    w = +x;
+    return horizon;
+  };
+
+  horizon.height = function(x) {
+    if (!arguments.length) return h;
+    h = +x;
+    return horizon;
+  };
+
+  return horizon;
+};
+
+var d3_chart_horizonArea = d3.svg.area(),
+    d3_chart_horizonId = 0;
+
+function d3_chart_horizonX(d) {
+  return d[0];
+}
+
+function d3_chart_horizonY(d) {
+  return d[1];
+}
Index: Dev/branches/Demo/d3/src/chart/qq.js
===================================================================
--- Dev/branches/Demo/d3/src/chart/qq.js	(revision 225)
+++ Dev/branches/Demo/d3/src/chart/qq.js	(revision 225)
@@ -0,0 +1,245 @@
+// Based on http://vis.stanford.edu/protovis/ex/qqplot.html
+d3.chart.qq = function() {
+  var width = 1,
+      height = 1,
+      duration = 0,
+      domain = null,
+      tickFormat = null,
+      n = 100,
+      x = d3_chart_qqX,
+      y = d3_chart_qqY;
+
+  // For each small multipleâŠ
+  function qq(g) {
+    g.each(function(d, i) {
+      var g = d3.select(this),
+          qx = d3_chart_qqQuantiles(n, x.call(this, d, i)),
+          qy = d3_chart_qqQuantiles(n, y.call(this, d, i)),
+          xd = domain && domain.call(this, d, i) || [d3.min(qx), d3.max(qx)], // new x-domain
+          yd = domain && domain.call(this, d, i) || [d3.min(qy), d3.max(qy)], // new y-domain
+          x0, // old x-scale
+          y0; // old y-scale
+
+      // Compute the new x-scale.
+      var x1 = d3.scale.linear()
+          .domain(xd)
+          .range([0, width]);
+
+      // Compute the new y-scale.
+      var y1 = d3.scale.linear()
+          .domain(yd)
+          .range([height, 0]);
+
+      // Retrieve the old scales, if this is an update.
+      if (this.__chart__) {
+        x0 = this.__chart__.x;
+        y0 = this.__chart__.y;
+      } else {
+        x0 = d3.scale.linear().domain([0, Infinity]).range(x1.range());
+        y0 = d3.scale.linear().domain([0, Infinity]).range(y1.range());
+      }
+
+      // Stash the new scales.
+      this.__chart__ = {x: x1, y: y1};
+
+      // Update diagonal line.
+      var diagonal = g.selectAll("line.diagonal")
+          .data([null]);
+
+      diagonal.enter().append("svg:line")
+          .attr("class", "diagonal")
+          .attr("x1", x1(yd[0]))
+          .attr("y1", y1(xd[0]))
+          .attr("x2", x1(yd[1]))
+          .attr("y2", y1(xd[1]));
+
+      diagonal.transition()
+          .duration(duration)
+          .attr("x1", x1(yd[0]))
+          .attr("y1", y1(xd[0]))
+          .attr("x2", x1(yd[1]))
+          .attr("y2", y1(xd[1]));
+
+      // Update quantile plots.
+      var circle = g.selectAll("circle")
+          .data(d3.range(n).map(function(i) {
+            return {x: qx[i], y: qy[i]};
+          }));
+
+      circle.enter().append("svg:circle")
+          .attr("class", "quantile")
+          .attr("r", 4.5)
+          .attr("cx", function(d) { return x0(d.x); })
+          .attr("cy", function(d) { return y0(d.y); })
+          .style("opacity", 1e-6)
+        .transition()
+          .duration(duration)
+          .attr("cx", function(d) { return x1(d.x); })
+          .attr("cy", function(d) { return y1(d.y); })
+          .style("opacity", 1);
+
+      circle.transition()
+          .duration(duration)
+          .attr("cx", function(d) { return x1(d.x); })
+          .attr("cy", function(d) { return y1(d.y); })
+          .style("opacity", 1);
+
+      circle.exit().transition()
+          .duration(duration)
+          .attr("cx", function(d) { return x1(d.x); })
+          .attr("cy", function(d) { return y1(d.y); })
+          .style("opacity", 1e-6)
+          .remove();
+
+      var xformat = tickFormat || x1.tickFormat(4),
+          yformat = tickFormat || y1.tickFormat(4),
+          tx = function(d) { return "translate(" + x1(d) + "," + height + ")"; },
+          ty = function(d) { return "translate(0," + y1(d) + ")"; };
+
+      // Update x-ticks.
+      var xtick = g.selectAll("g.x.tick")
+          .data(x1.ticks(4), function(d) {
+            return this.textContent || xformat(d);
+          });
+
+      var xtickEnter = xtick.enter().append("svg:g")
+          .attr("class", "x tick")
+          .attr("transform", function(d) { return "translate(" + x0(d) + "," + height + ")"; })
+          .style("opacity", 1e-6);
+
+      xtickEnter.append("svg:line")
+          .attr("y1", 0)
+          .attr("y2", -6);
+
+      xtickEnter.append("svg:text")
+          .attr("text-anchor", "middle")
+          .attr("dy", "1em")
+          .text(xformat);
+
+      // Transition the entering ticks to the new scale, x1.
+      xtickEnter.transition()
+          .duration(duration)
+          .attr("transform", tx)
+          .style("opacity", 1);
+
+      // Transition the updating ticks to the new scale, x1.
+      xtick.transition()
+          .duration(duration)
+          .attr("transform", tx)
+          .style("opacity", 1);
+
+      // Transition the exiting ticks to the new scale, x1.
+      xtick.exit().transition()
+          .duration(duration)
+          .attr("transform", tx)
+          .style("opacity", 1e-6)
+          .remove();
+
+      // Update ticks.
+      var ytick = g.selectAll("g.y.tick")
+          .data(y1.ticks(4), function(d) {
+            return this.textContent || yformat(d);
+          });
+
+      var ytickEnter = ytick.enter().append("svg:g")
+          .attr("class", "y tick")
+          .attr("transform", function(d) { return "translate(0," + y0(d) + ")"; })
+          .style("opacity", 1e-6);
+
+      ytickEnter.append("svg:line")
+          .attr("x1", 0)
+          .attr("x2", 6);
+
+      ytickEnter.append("svg:text")
+          .attr("text-anchor", "end")
+          .attr("dx", "-.5em")
+          .attr("dy", ".3em")
+          .text(yformat);
+
+      // Transition the entering ticks to the new scale, y1.
+      ytickEnter.transition()
+          .duration(duration)
+          .attr("transform", ty)
+          .style("opacity", 1);
+
+      // Transition the updating ticks to the new scale, y1.
+      ytick.transition()
+          .duration(duration)
+          .attr("transform", ty)
+          .style("opacity", 1);
+
+      // Transition the exiting ticks to the new scale, y1.
+      ytick.exit().transition()
+          .duration(duration)
+          .attr("transform", ty)
+          .style("opacity", 1e-6)
+          .remove();
+    });
+  }
+
+  qq.width = function(x) {
+    if (!arguments.length) return width;
+    width = x;
+    return qq;
+  };
+
+  qq.height = function(x) {
+    if (!arguments.length) return height;
+    height = x;
+    return qq;
+  };
+
+  qq.duration = function(x) {
+    if (!arguments.length) return duration;
+    duration = x;
+    return qq;
+  };
+
+  qq.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x == null ? x : d3.functor(x);
+    return qq;
+  };
+
+  qq.count = function(z) {
+    if (!arguments.length) return n;
+    n = z;
+    return qq;
+  };
+
+  qq.x = function(z) {
+    if (!arguments.length) return x;
+    x = z;
+    return qq;
+  };
+
+  qq.y = function(z) {
+    if (!arguments.length) return y;
+    y = z;
+    return qq;
+  };
+
+  qq.tickFormat = function(x) {
+    if (!arguments.length) return tickFormat;
+    tickFormat = x;
+    return qq;
+  };
+
+  return qq;
+};
+
+function d3_chart_qqQuantiles(n, values) {
+  var m = values.length - 1;
+  values = values.slice().sort(d3.ascending);
+  return d3.range(n).map(function(i) {
+    return values[~~(i * m / n)];
+  });
+}
+
+function d3_chart_qqX(d) {
+  return d.x;
+}
+
+function d3_chart_qqY(d) {
+  return d.y;
+}
Index: Dev/branches/Demo/d3/src/core/array.js
===================================================================
--- Dev/branches/Demo/d3/src/core/array.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/array.js	(revision 225)
@@ -0,0 +1,17 @@
+var d3_array = d3_arraySlice; // conversion for NodeLists
+
+function d3_arrayCopy(psuedoarray) {
+  var i = -1, n = psuedoarray.length, array = [];
+  while (++i < n) array.push(psuedoarray[i]);
+  return array;
+}
+
+function d3_arraySlice(psuedoarray) {
+  return Array.prototype.slice.call(psuedoarray);
+}
+
+try {
+  d3_array(document.documentElement.childNodes)[0].nodeType;
+} catch(e) {
+  d3_array = d3_arrayCopy;
+}
Index: Dev/branches/Demo/d3/src/core/ascending.js
===================================================================
--- Dev/branches/Demo/d3/src/core/ascending.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/ascending.js	(revision 225)
@@ -0,0 +1,3 @@
+d3.ascending = function(a, b) {
+  return a < b ? -1 : a > b ? 1 : 0;
+};
Index: Dev/branches/Demo/d3/src/core/bisect.js
===================================================================
--- Dev/branches/Demo/d3/src/core/bisect.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/bisect.js	(revision 225)
@@ -0,0 +1,38 @@
+// Locate the insertion point for x in a to maintain sorted order. The
+// arguments lo and hi may be used to specify a subset of the array which should
+// be considered; by default the entire array is used. If x is already present
+// in a, the insertion point will be before (to the left of) any existing
+// entries. The return value is suitable for use as the first argument to
+// `array.splice` assuming that a is already sorted.
+//
+// The returned insertion point i partitions the array a into two halves so that
+// all v < x for v in a[lo:i] for the left side and all v >= x for v in a[i:hi]
+// for the right side.
+d3.bisectLeft = function(a, x, lo, hi) {
+  if (arguments.length < 3) lo = 0;
+  if (arguments.length < 4) hi = a.length;
+  while (lo < hi) {
+    var mid = (lo + hi) >> 1;
+    if (a[mid] < x) lo = mid + 1;
+    else hi = mid;
+  }
+  return lo;
+};
+
+// Similar to bisectLeft, but returns an insertion point which comes after (to
+// the right of) any existing entries of x in a.
+//
+// The returned insertion point i partitions the array into two halves so that
+// all v <= x for v in a[lo:i] for the left side and all v > x for v in a[i:hi]
+// for the right side.
+d3.bisect =
+d3.bisectRight = function(a, x, lo, hi) {
+  if (arguments.length < 3) lo = 0;
+  if (arguments.length < 4) hi = a.length;
+  while (lo < hi) {
+    var mid = (lo + hi) >> 1;
+    if (x < a[mid]) hi = mid;
+    else lo = mid + 1;
+  }
+  return lo;
+};
Index: Dev/branches/Demo/d3/src/core/call.js
===================================================================
--- Dev/branches/Demo/d3/src/core/call.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/call.js	(revision 225)
@@ -0,0 +1,13 @@
+//
+// Note: assigning to the arguments array simultaneously changes the value of
+// the corresponding argument!
+//
+// TODO The `this` argument probably shouldn't be the first argument to the
+// callback, anyway, since it's redundant. However, that will require a major
+// version bump due to backwards compatibility, so I'm not changing it right
+// away.
+//
+function d3_call(callback) {
+  callback.apply(this, (arguments[0] = this, arguments));
+  return this;
+}
Index: Dev/branches/Demo/d3/src/core/collapse.js
===================================================================
--- Dev/branches/Demo/d3/src/core/collapse.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/collapse.js	(revision 225)
@@ -0,0 +1,3 @@
+function d3_collapse(s) {
+  return s.replace(/(^\s+)|(\s+$)/g, "").replace(/\s+/g, " ");
+}
Index: Dev/branches/Demo/d3/src/core/core.js
===================================================================
--- Dev/branches/Demo/d3/src/core/core.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/core.js	(revision 225)
@@ -0,0 +1,1 @@
+d3 = {version: "1.29.1"}; // semver
Index: Dev/branches/Demo/d3/src/core/date.js
===================================================================
--- Dev/branches/Demo/d3/src/core/date.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/date.js	(revision 225)
@@ -0,0 +1,3 @@
+if (!Date.now) Date.now = function() {
+  return +new Date;
+};
Index: Dev/branches/Demo/d3/src/core/descending.js
===================================================================
--- Dev/branches/Demo/d3/src/core/descending.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/descending.js	(revision 225)
@@ -0,0 +1,3 @@
+d3.descending = function(a, b) {
+  return b < a ? -1 : b > a ? 1 : 0;
+};
Index: Dev/branches/Demo/d3/src/core/dispatch.js
===================================================================
--- Dev/branches/Demo/d3/src/core/dispatch.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/dispatch.js	(revision 225)
@@ -0,0 +1,45 @@
+/** @param {...string} types */
+d3.dispatch = function(types) {
+  var dispatch = {},
+      type;
+  for (var i = 0, n = arguments.length; i < n; i++) {
+    type = arguments[i];
+    dispatch[type] = d3_dispatch(type);
+  }
+  return dispatch;
+};
+
+function d3_dispatch(type) {
+  var dispatch = {},
+      listeners = [];
+
+  dispatch.add = function(listener) {
+    for (var i = 0; i < listeners.length; i++) {
+      if (listeners[i].listener == listener) return dispatch; // already registered
+    }
+    listeners.push({listener: listener, on: true});
+    return dispatch;
+  };
+
+  dispatch.remove = function(listener) {
+    for (var i = 0; i < listeners.length; i++) {
+      var l = listeners[i];
+      if (l.listener == listener) {
+        l.on = false;
+        listeners = listeners.slice(0, i).concat(listeners.slice(i + 1));
+        break;
+      }
+    }
+    return dispatch;
+  };
+
+  dispatch.dispatch = function() {
+    var ls = listeners; // defensive reference
+    for (var i = 0, n = ls.length; i < n; i++) {
+      var l = ls[i];
+      if (l.on) l.listener.apply(this, arguments);
+    }
+  };
+
+  return dispatch;
+};
Index: Dev/branches/Demo/d3/src/core/ease.js
===================================================================
--- Dev/branches/Demo/d3/src/core/ease.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/ease.js	(revision 225)
@@ -0,0 +1,122 @@
+/*
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the author nor the names of contributors may be used to
+ *   endorse or promote products derived from this software without specific
+ *   prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var d3_ease_quad = d3_ease_poly(2),
+    d3_ease_cubic = d3_ease_poly(3);
+
+var d3_ease = {
+  linear: function() { return d3_ease_linear; },
+  poly: d3_ease_poly,
+  quad: function() { return d3_ease_quad; },
+  cubic: function() { return d3_ease_cubic; },
+  sin: function() { return d3_ease_sin; },
+  exp: function() { return d3_ease_exp; },
+  circle: function() { return d3_ease_circle; },
+  elastic: d3_ease_elastic,
+  back: d3_ease_back,
+  bounce: function() { return d3_ease_bounce; }
+};
+
+var d3_ease_mode = {
+  "in": function(f) { return f; },
+  "out": d3_ease_reverse,
+  "in-out": d3_ease_reflect,
+  "out-in": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }
+};
+
+d3.ease = function(name) {
+  var i = name.indexOf("-"),
+      t = i >= 0 ? name.substring(0, i) : name,
+      m = i >= 0 ? name.substring(i + 1) : "in";
+  return d3_ease_mode[m](d3_ease[t].apply(null, Array.prototype.slice.call(arguments, 1)));
+};
+
+function d3_ease_reverse(f) {
+  return function(t) {
+    return 1 - f(1 - t);
+  };
+}
+
+function d3_ease_reflect(f) {
+  return function(t) {
+    return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));
+  };
+}
+
+function d3_ease_linear(t) {
+  return t;
+}
+
+function d3_ease_poly(e) {
+  return function(t) {
+    return Math.pow(t, e);
+  }
+}
+
+function d3_ease_sin(t) {
+  return 1 - Math.cos(t * Math.PI / 2);
+}
+
+function d3_ease_exp(t) {
+  return t ? Math.pow(2, 10 * (t - 1)) - 1e-3 : 0;
+}
+
+function d3_ease_circle(t) {
+  return 1 - Math.sqrt(1 - t * t);
+}
+
+function d3_ease_elastic(a, p) {
+  var s;
+  if (arguments.length < 2) p = 0.45;
+  if (arguments.length < 1) { a = 1; s = p / 4; }
+  else s = p / (2 * Math.PI) * Math.asin(1 / a);
+  return function(t) {
+    return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
+  };
+}
+
+function d3_ease_back(s) {
+  if (!s) s = 1.70158;
+  return function(t) {
+    return t * t * ((s + 1) * t - s);
+  };
+}
+
+function d3_ease_bounce(t) {
+  return t < 1 / 2.75 ? 7.5625 * t * t
+      : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75
+      : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375
+      : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
+}
Index: Dev/branches/Demo/d3/src/core/entries.js
===================================================================
--- Dev/branches/Demo/d3/src/core/entries.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/entries.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.entries = function(map) {
+  var entries = [];
+  for (var key in map) entries.push({key: key, value: map[key]});
+  return entries;
+};
Index: Dev/branches/Demo/d3/src/core/event.js
===================================================================
--- Dev/branches/Demo/d3/src/core/event.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/event.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.event = null;
Index: Dev/branches/Demo/d3/src/core/first.js
===================================================================
--- Dev/branches/Demo/d3/src/core/first.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/first.js	(revision 225)
@@ -0,0 +1,13 @@
+d3.first = function(array, f) {
+  var i = 0,
+      n = array.length,
+      a = array[0],
+      b;
+  if (arguments.length === 1) f = d3.ascending;
+  while (++i < n) {
+    if (f.call(array, a, b = array[i]) > 0) {
+      a = b;
+    }
+  }
+  return a;
+};
Index: Dev/branches/Demo/d3/src/core/format.js
===================================================================
--- Dev/branches/Demo/d3/src/core/format.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/format.js	(revision 225)
@@ -0,0 +1,85 @@
+// TODO align
+d3.format = function(specifier) {
+  var match = d3_format_re.exec(specifier),
+      fill = match[1] || " ",
+      sign = match[3] || "",
+      zfill = match[5],
+      width = +match[6],
+      comma = match[7],
+      precision = match[8],
+      type = match[9],
+      percentage = false,
+      integer = false;
+
+  if (precision) precision = precision.substring(1);
+
+  if (zfill) {
+    fill = "0"; // TODO align = "=";
+    if (comma) width -= Math.floor((width - 1) / 4);
+  }
+
+  switch (type) {
+    case "n": comma = true; type = "g"; break;
+    case "%": percentage = true; type = "f"; break;
+    case "p": percentage = true; type = "r"; break;
+    case "d": integer = true; precision = "0"; break;
+  }
+
+  type = d3_format_types[type] || d3_format_typeDefault;
+
+  return function(value) {
+    var number = percentage ? value * 100 : +value,
+        negative = (number < 0) && (number = -number) ? "\u2212" : sign;
+
+    // Return the empty string for floats formatted as ints.
+    if (integer && (number % 1)) return "";
+
+    // Convert the input value to the desired precision.
+    value = type(number, precision);
+
+    // If the fill character is 0, the sign and group is applied after the fill.
+    if (zfill) {
+      var length = value.length + negative.length;
+      if (length < width) value = new Array(width - length + 1).join(fill) + value;
+      if (comma) value = d3_format_group(value);
+      value = negative + value;
+    }
+
+    // Otherwise (e.g., space-filling), the sign and group is applied before.
+    else {
+      if (comma) value = d3_format_group(value);
+      value = negative + value;
+      var length = value.length;
+      if (length < width) value = new Array(width - length + 1).join(fill) + value;
+    }
+    if (percentage) value += "%";
+
+    return value;
+  };
+};
+
+// [[fill]align][sign][#][0][width][,][.precision][type]
+var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
+
+var d3_format_types = {
+  g: function(x, p) { return x.toPrecision(p); },
+  e: function(x, p) { return x.toExponential(p); },
+  f: function(x, p) { return x.toFixed(p); },
+  r: function(x, p) {
+    var n = 1 + Math.floor(1e-15 + Math.log(x) / Math.LN10);
+    return d3.round(x, p - n).toFixed(Math.max(0, p - n));
+  }
+};
+
+function d3_format_typeDefault(x) {
+  return x + "";
+}
+
+// Apply comma grouping for thousands.
+function d3_format_group(value) {
+  var i = value.lastIndexOf("."),
+      f = i >= 0 ? value.substring(i) : (i = value.length, ""),
+      t = [];
+  while (i > 0) t.push(value.substring(i -= 3, i + 3));
+  return t.reverse().join(",") + f;
+}
Index: Dev/branches/Demo/d3/src/core/functor.js
===================================================================
--- Dev/branches/Demo/d3/src/core/functor.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/functor.js	(revision 225)
@@ -0,0 +1,3 @@
+d3.functor = function(v) {
+  return typeof v === "function" ? v : function() { return v; };
+};
Index: Dev/branches/Demo/d3/src/core/hsl.js
===================================================================
--- Dev/branches/Demo/d3/src/core/hsl.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/hsl.js	(revision 225)
@@ -0,0 +1,62 @@
+d3.hsl = function(h, s, l) {
+  return arguments.length === 1
+      ? d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl)
+      : d3_hsl(+h, +s, +l);
+};
+
+function d3_hsl(h, s, l) {
+  return new d3_Hsl(h, s, l);
+}
+
+function d3_Hsl(h, s, l) {
+  this.h = h;
+  this.s = s;
+  this.l = l;
+}
+
+d3_Hsl.prototype.brighter = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  return d3_hsl(this.h, this.s, this.l / k);
+};
+
+d3_Hsl.prototype.darker = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  return d3_hsl(this.h, this.s, k * this.l);
+};
+
+d3_Hsl.prototype.rgb = function() {
+  return d3_hsl_rgb(this.h, this.s, this.l);
+};
+
+d3_Hsl.prototype.toString = function() {
+  return "hsl(" + this.h + "," + this.s * 100 + "%," + this.l * 100 + "%)";
+};
+
+function d3_hsl_rgb(h, s, l) {
+  var m1,
+      m2;
+
+  /* Some simple corrections for h, s and l. */
+  h = h % 360; if (h < 0) h += 360;
+  s = s < 0 ? 0 : s > 1 ? 1 : s;
+  l = l < 0 ? 0 : l > 1 ? 1 : l;
+
+  /* From FvD 13.37, CSS Color Module Level 3 */
+  m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
+  m1 = 2 * l - m2;
+
+  function v(h) {
+    if (h > 360) h -= 360;
+    else if (h < 0) h += 360;
+    if (h < 60) return m1 + (m2 - m1) * h / 60;
+    if (h < 180) return m2;
+    if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
+    return m1;
+  }
+
+  function vv(h) {
+    return Math.round(v(h) * 255);
+  }
+
+  return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
+}
Index: Dev/branches/Demo/d3/src/core/html.js
===================================================================
--- Dev/branches/Demo/d3/src/core/html.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/html.js	(revision 225)
@@ -0,0 +1,10 @@
+d3.html = function(url, callback) {
+  d3.text(url, "text/html", function(text) {
+    if (text != null) { // Treat empty string as valid HTML.
+      var range = document.createRange();
+      range.selectNode(document.body);
+      text = range.createContextualFragment(text);
+    }
+    callback(text);
+  });
+};
Index: Dev/branches/Demo/d3/src/core/interpolate.js
===================================================================
--- Dev/branches/Demo/d3/src/core/interpolate.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/interpolate.js	(revision 225)
@@ -0,0 +1,180 @@
+d3.interpolate = function(a, b) {
+  var i = d3.interpolators.length, f;
+  while (--i >= 0 && !(f = d3.interpolators[i](a, b)));
+  return f;
+};
+
+d3.interpolateNumber = function(a, b) {
+  b -= a;
+  return function(t) { return a + b * t; };
+};
+
+d3.interpolateRound = function(a, b) {
+  b -= a;
+  return function(t) { return Math.round(a + b * t); };
+};
+
+d3.interpolateString = function(a, b) {
+  var m, // current match
+      i, // current index
+      j, // current index (for coallescing)
+      s0 = 0, // start index of current string prefix
+      s1 = 0, // end index of current string prefix
+      s = [], // string constants and placeholders
+      q = [], // number interpolators
+      n, // q.length
+      o;
+
+  // Reset our regular expression!
+  d3_interpolate_number.lastIndex = 0;
+
+  // Find all numbers in b.
+  for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
+    if (m.index) s.push(b.substring(s0, s1 = m.index));
+    q.push({i: s.length, x: m[0]});
+    s.push(null);
+    s0 = d3_interpolate_number.lastIndex;
+  }
+  if (s0 < b.length) s.push(b.substring(s0));
+
+  // Find all numbers in a.
+  for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
+    o = q[i];
+    if (o.x == m[0]) { // The numbers match, so coallesce.
+      if (o.i) {
+        if (s[o.i + 1] == null) { // This match is followed by another number.
+          s[o.i - 1] += o.x;
+          s.splice(o.i, 1);
+          for (j = i + 1; j < n; ++j) q[j].i--;
+        } else { // This match is followed by a string, so coallesce twice.
+          s[o.i - 1] += o.x + s[o.i + 1];
+          s.splice(o.i, 2);
+          for (j = i + 1; j < n; ++j) q[j].i -= 2;
+        }
+      } else {
+          if (s[o.i + 1] == null) { // This match is followed by another number.
+          s[o.i] = o.x;
+        } else { // This match is followed by a string, so coallesce twice.
+          s[o.i] = o.x + s[o.i + 1];
+          s.splice(o.i + 1, 1);
+          for (j = i + 1; j < n; ++j) q[j].i--;
+        }
+      }
+      q.splice(i, 1);
+      n--;
+      i--;
+    } else {
+      o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
+    }
+  }
+
+  // Remove any numbers in b not found in a.
+  while (i < n) {
+    o = q.pop();
+    if (s[o.i + 1] == null) { // This match is followed by another number.
+      s[o.i] = o.x;
+    } else { // This match is followed by a string, so coallesce twice.
+      s[o.i] = o.x + s[o.i + 1];
+      s.splice(o.i + 1, 1);
+    }
+    n--;
+  }
+
+  // Special optimization for only a single match.
+  if (s.length === 1) {
+    return s[0] == null ? q[0].x : function() { return b; };
+  }
+
+  // Otherwise, interpolate each of the numbers and rejoin the string.
+  return function(t) {
+    for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
+    return s.join("");
+  };
+};
+
+d3.interpolateRgb = function(a, b) {
+  a = d3.rgb(a);
+  b = d3.rgb(b);
+  var ar = a.r,
+      ag = a.g,
+      ab = a.b,
+      br = b.r - ar,
+      bg = b.g - ag,
+      bb = b.b - ab;
+  return function(t) {
+    return "rgb(" + Math.round(ar + br * t)
+        + "," + Math.round(ag + bg * t)
+        + "," + Math.round(ab + bb * t)
+        + ")";
+  };
+};
+
+// interpolates HSL space, but outputs RGB string (for compatibility)
+d3.interpolateHsl = function(a, b) {
+  a = d3.hsl(a);
+  b = d3.hsl(b);
+  var h0 = a.h,
+      s0 = a.s,
+      l0 = a.l,
+      h1 = b.h - h0,
+      s1 = b.s - s0,
+      l1 = b.l - l0;
+  return function(t) {
+    return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t).toString();
+  };
+};
+
+d3.interpolateArray = function(a, b) {
+  var x = [],
+      c = [],
+      na = a.length,
+      nb = b.length,
+      n0 = Math.min(a.length, b.length),
+      i;
+  for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
+  for (; i < na; ++i) c[i] = a[i];
+  for (; i < nb; ++i) c[i] = b[i];
+  return function(t) {
+    for (i = 0; i < n0; ++i) c[i] = x[i](t);
+    return c;
+  };
+};
+
+d3.interpolateObject = function(a, b) {
+  var i = {},
+      c = {},
+      k;
+  for (k in a) {
+    if (k in b) {
+      i[k] = d3_interpolateByName(k)(a[k], b[k]);
+    } else {
+      c[k] = a[k];
+    }
+  }
+  for (k in b) {
+    if (!(k in a)) {
+      c[k] = b[k];
+    }
+  }
+  return function(t) {
+    for (k in i) c[k] = i[k](t);
+    return c;
+  };
+}
+
+var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
+    d3_interpolate_rgb = {background: 1, fill: 1, stroke: 1};
+
+function d3_interpolateByName(n) {
+  return n in d3_interpolate_rgb || /\bcolor\b/.test(n)
+      ? d3.interpolateRgb
+      : d3.interpolate;
+}
+
+d3.interpolators = [
+  d3.interpolateObject,
+  function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); },
+  function(a, b) { return (typeof b === "string") && d3.interpolateString(String(a), b); },
+  function(a, b) { return (b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b)) && d3.interpolateRgb(String(a), b); },
+  function(a, b) { return (typeof b === "number") && d3.interpolateNumber(+a, b); }
+];
Index: Dev/branches/Demo/d3/src/core/json.js
===================================================================
--- Dev/branches/Demo/d3/src/core/json.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/json.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.json = function(url, callback) {
+  d3.text(url, "application/json", function(text) {
+    callback(text ? JSON.parse(text) : null);
+  });
+};
Index: Dev/branches/Demo/d3/src/core/keys.js
===================================================================
--- Dev/branches/Demo/d3/src/core/keys.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/keys.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.keys = function(map) {
+  var keys = [];
+  for (var key in map) keys.push(key);
+  return keys;
+};
Index: Dev/branches/Demo/d3/src/core/last.js
===================================================================
--- Dev/branches/Demo/d3/src/core/last.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/last.js	(revision 225)
@@ -0,0 +1,13 @@
+d3.last = function(array, f) {
+  var i = 0,
+      n = array.length,
+      a = array[0],
+      b;
+  if (arguments.length === 1) f = d3.ascending;
+  while (++i < n) {
+    if (f.call(array, a, b = array[i]) <= 0) {
+      a = b;
+    }
+  }
+  return a;
+};
Index: Dev/branches/Demo/d3/src/core/max.js
===================================================================
--- Dev/branches/Demo/d3/src/core/max.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/max.js	(revision 225)
@@ -0,0 +1,14 @@
+d3.max = function(array, f) {
+  var i = -1,
+      n = array.length,
+      a,
+      b;
+  if (arguments.length === 1) {
+    while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = array[i]) != null && b > a) a = b;
+  } else {
+    while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
+  }
+  return a;
+};
Index: Dev/branches/Demo/d3/src/core/merge.js
===================================================================
--- Dev/branches/Demo/d3/src/core/merge.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/merge.js	(revision 225)
@@ -0,0 +1,3 @@
+d3.merge = function(arrays) {
+  return Array.prototype.concat.apply([], arrays);
+};
Index: Dev/branches/Demo/d3/src/core/min.js
===================================================================
--- Dev/branches/Demo/d3/src/core/min.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/min.js	(revision 225)
@@ -0,0 +1,14 @@
+d3.min = function(array, f) {
+  var i = -1,
+      n = array.length,
+      a,
+      b;
+  if (arguments.length === 1) {
+    while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = array[i]) != null && a > b) a = b;
+  } else {
+    while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
+  }
+  return a;
+};
Index: Dev/branches/Demo/d3/src/core/nest.js
===================================================================
--- Dev/branches/Demo/d3/src/core/nest.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/nest.js	(revision 225)
@@ -0,0 +1,87 @@
+d3.nest = function() {
+  var nest = {},
+      keys = [],
+      sortKeys = [],
+      sortValues,
+      rollup;
+
+  function map(array, depth) {
+    if (depth >= keys.length) return rollup
+        ? rollup.call(nest, array) : (sortValues
+        ? array.sort(sortValues)
+        : array);
+
+    var i = -1,
+        n = array.length,
+        key = keys[depth++],
+        keyValue,
+        object,
+        o = {};
+
+    while (++i < n) {
+      if ((keyValue = key(object = array[i])) in o) {
+        o[keyValue].push(object);
+      } else {
+        o[keyValue] = [object];
+      }
+    }
+
+    for (keyValue in o) {
+      o[keyValue] = map(o[keyValue], depth);
+    }
+
+    return o;
+  }
+
+  function entries(map, depth) {
+    if (depth >= keys.length) return map;
+
+    var a = [],
+        sortKey = sortKeys[depth++],
+        key;
+
+    for (key in map) {
+      a.push({key: key, values: entries(map[key], depth)});
+    }
+
+    if (sortKey) a.sort(function(a, b) {
+      return sortKey(a.key, b.key);
+    });
+
+    return a;
+  }
+
+  nest.map = function(array) {
+    return map(array, 0);
+  };
+
+  nest.entries = function(array) {
+    return entries(map(array, 0), 0);
+  };
+
+  nest.key = function(d) {
+    keys.push(d);
+    return nest;
+  };
+
+  // Specifies the order for the most-recently specified key.
+  // Note: only applies to entries. Map keys are unordered!
+  nest.sortKeys = function(order) {
+    sortKeys[keys.length - 1] = order;
+    return nest;
+  };
+
+  // Specifies the order for leaf values.
+  // Applies to both maps and entries array.
+  nest.sortValues = function(order) {
+    sortValues = order;
+    return nest;
+  };
+
+  nest.rollup = function(f) {
+    rollup = f;
+    return nest;
+  };
+
+  return nest;
+};
Index: Dev/branches/Demo/d3/src/core/noop.js
===================================================================
--- Dev/branches/Demo/d3/src/core/noop.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/noop.js	(revision 225)
@@ -0,0 +1,1 @@
+function d3_noop() {}
Index: Dev/branches/Demo/d3/src/core/ns.js
===================================================================
--- Dev/branches/Demo/d3/src/core/ns.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/ns.js	(revision 225)
@@ -0,0 +1,19 @@
+d3.ns = {
+
+  prefix: {
+    svg: "http://www.w3.org/2000/svg",
+    xhtml: "http://www.w3.org/1999/xhtml",
+    xlink: "http://www.w3.org/1999/xlink",
+    xml: "http://www.w3.org/XML/1998/namespace",
+    xmlns: "http://www.w3.org/2000/xmlns/"
+  },
+
+  qualify: function(name) {
+    var i = name.indexOf(":");
+    return i < 0 ? name : {
+      space: d3.ns.prefix[name.substring(0, i)],
+      local: name.substring(i + 1)
+    };
+  }
+
+};
Index: Dev/branches/Demo/d3/src/core/object.js
===================================================================
--- Dev/branches/Demo/d3/src/core/object.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/object.js	(revision 225)
@@ -0,0 +1,5 @@
+if (!Object.create) Object.create = function(o) {
+  /** @constructor */ function f() {}
+  f.prototype = o;
+  return new f;
+};
Index: Dev/branches/Demo/d3/src/core/permute.js
===================================================================
--- Dev/branches/Demo/d3/src/core/permute.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/permute.js	(revision 225)
@@ -0,0 +1,7 @@
+d3.permute = function(array, indexes) {
+  var permutes = [],
+      i = -1,
+      n = indexes.length;
+  while (++i < n) permutes[i] = array[indexes[i]];
+  return permutes;
+};
Index: Dev/branches/Demo/d3/src/core/quantile.js
===================================================================
--- Dev/branches/Demo/d3/src/core/quantile.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/quantile.js	(revision 225)
@@ -0,0 +1,8 @@
+// R-7 per <http://en.wikipedia.org/wiki/Quantile>
+d3.quantile = function(values, p) {
+  var H = (values.length - 1) * p + 1,
+      h = Math.floor(H),
+      v = values[h - 1],
+      e = H - h;
+  return e ? v + e * (values[h] - v) : v;
+};
Index: Dev/branches/Demo/d3/src/core/range.js
===================================================================
--- Dev/branches/Demo/d3/src/core/range.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/range.js	(revision 225)
@@ -0,0 +1,16 @@
+/**
+ * @param {number} start
+ * @param {number=} stop
+ * @param {number=} step
+ */
+d3.range = function(start, stop, step) {
+  if (arguments.length === 1) { stop = start; start = 0; }
+  if (step == null) step = 1;
+  if ((stop - start) / step == Infinity) throw new Error("infinite range");
+  var range = [],
+       i = -1,
+       j;
+  if (step < 0) while ((j = start + step * ++i) > stop) range.push(j);
+  else while ((j = start + step * ++i) < stop) range.push(j);
+  return range;
+};
Index: Dev/branches/Demo/d3/src/core/rebind.js
===================================================================
--- Dev/branches/Demo/d3/src/core/rebind.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/rebind.js	(revision 225)
@@ -0,0 +1,7 @@
+// A getter-setter method that preserves the appropriate `this` context.
+d3.rebind = function(object, method) {
+  return function() {
+    var x = method.apply(object, arguments);
+    return arguments.length ? object : x;
+  };
+};
Index: Dev/branches/Demo/d3/src/core/requote.js
===================================================================
--- Dev/branches/Demo/d3/src/core/requote.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/requote.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.requote = function(s) {
+  return s.replace(d3_requote_re, "\\$&");
+};
+
+var d3_requote_re = /[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;
Index: Dev/branches/Demo/d3/src/core/rgb.js
===================================================================
--- Dev/branches/Demo/d3/src/core/rgb.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/rgb.js	(revision 225)
@@ -0,0 +1,284 @@
+d3.rgb = function(r, g, b) {
+  return arguments.length === 1
+      ? d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb)
+      : d3_rgb(~~r, ~~g, ~~b);
+};
+
+function d3_rgb(r, g, b) {
+  return new d3_Rgb(r, g, b);
+}
+
+function d3_Rgb(r, g, b) {
+  this.r = r;
+  this.g = g;
+  this.b = b;
+}
+
+d3_Rgb.prototype.brighter = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  var r = this.r,
+      g = this.g,
+      b = this.b,
+      i = 30;
+  if (!r && !g && !b) return d3_rgb(i, i, i);
+  if (r && r < i) r = i;
+  if (g && g < i) g = i;
+  if (b && b < i) b = i;
+  return d3_rgb(
+    Math.min(255, Math.floor(r / k)),
+    Math.min(255, Math.floor(g / k)),
+    Math.min(255, Math.floor(b / k)));
+};
+
+d3_Rgb.prototype.darker = function(k) {
+  k = Math.pow(0.7, arguments.length ? k : 1);
+  return d3_rgb(
+    Math.max(0, Math.floor(k * this.r)),
+    Math.max(0, Math.floor(k * this.g)),
+    Math.max(0, Math.floor(k * this.b)));
+};
+
+d3_Rgb.prototype.hsl = function() {
+  return d3_rgb_hsl(this.r, this.g, this.b);
+};
+
+d3_Rgb.prototype.toString = function() {
+  return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
+};
+
+function d3_rgb_hex(v) {
+  return v < 0x10 ? "0" + v.toString(16) : v.toString(16);
+}
+
+function d3_rgb_parse(format, rgb, hsl) {
+  var r = 0, // red channel; int in [0, 255]
+      g = 0, // green channel; int in [0, 255]
+      b = 0, // blue channel; int in [0, 255]
+      m1, // CSS color specification match
+      m2, // CSS color specification type (e.g., rgb)
+      name;
+
+  /* Handle hsl, rgb. */
+  m1 = /([a-z]+)\((.*)\)/i.exec(format);
+  if (m1) {
+    m2 = m1[2].split(",");
+    switch (m1[1]) {
+      case "hsl": {
+        return hsl(
+          parseFloat(m2[0]), // degrees
+          parseFloat(m2[1]) / 100, // percentage
+          parseFloat(m2[2]) / 100 // percentage
+        );
+      }
+      case "rgb": {
+        return rgb(
+          d3_rgb_parseNumber(m2[0]),
+          d3_rgb_parseNumber(m2[1]),
+          d3_rgb_parseNumber(m2[2])
+        );
+      }
+    }
+  }
+
+  /* Named colors. */
+  if (name = d3_rgb_names[format]) return rgb(name.r, name.g, name.b);
+
+  /* Hexadecimal colors: #rgb and #rrggbb. */
+  if (format != null && format.charAt(0) === "#") {
+    if (format.length === 4) {
+      r = format.charAt(1); r += r;
+      g = format.charAt(2); g += g;
+      b = format.charAt(3); b += b;
+    } else if (format.length === 7) {
+      r = format.substring(1, 3);
+      g = format.substring(3, 5);
+      b = format.substring(5, 7);
+    }
+    r = parseInt(r, 16);
+    g = parseInt(g, 16);
+    b = parseInt(b, 16);
+  }
+
+  return rgb(r, g, b);
+}
+
+function d3_rgb_hsl(r, g, b) {
+  var min = Math.min(r /= 255, g /= 255, b /= 255),
+      max = Math.max(r, g, b),
+      d = max - min,
+      h,
+      s,
+      l = (max + min) / 2;
+  if (d) {
+    s = l < .5 ? d / (max + min) : d / (2 - max - min);
+    if (r == max) h = (g - b) / d + (g < b ? 6 : 0);
+    else if (g == max) h = (b - r) / d + 2;
+    else h = (r - g) / d + 4;
+    h *= 60;
+  } else {
+    s = h = 0;
+  }
+  return d3_hsl(h, s, l);
+}
+
+function d3_rgb_parseNumber(c) { // either integer or percentage
+  var f = parseFloat(c);
+  return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
+}
+
+var d3_rgb_names = {
+  aliceblue: "#f0f8ff",
+  antiquewhite: "#faebd7",
+  aqua: "#00ffff",
+  aquamarine: "#7fffd4",
+  azure: "#f0ffff",
+  beige: "#f5f5dc",
+  bisque: "#ffe4c4",
+  black: "#000000",
+  blanchedalmond: "#ffebcd",
+  blue: "#0000ff",
+  blueviolet: "#8a2be2",
+  brown: "#a52a2a",
+  burlywood: "#deb887",
+  cadetblue: "#5f9ea0",
+  chartreuse: "#7fff00",
+  chocolate: "#d2691e",
+  coral: "#ff7f50",
+  cornflowerblue: "#6495ed",
+  cornsilk: "#fff8dc",
+  crimson: "#dc143c",
+  cyan: "#00ffff",
+  darkblue: "#00008b",
+  darkcyan: "#008b8b",
+  darkgoldenrod: "#b8860b",
+  darkgray: "#a9a9a9",
+  darkgreen: "#006400",
+  darkgrey: "#a9a9a9",
+  darkkhaki: "#bdb76b",
+  darkmagenta: "#8b008b",
+  darkolivegreen: "#556b2f",
+  darkorange: "#ff8c00",
+  darkorchid: "#9932cc",
+  darkred: "#8b0000",
+  darksalmon: "#e9967a",
+  darkseagreen: "#8fbc8f",
+  darkslateblue: "#483d8b",
+  darkslategray: "#2f4f4f",
+  darkslategrey: "#2f4f4f",
+  darkturquoise: "#00ced1",
+  darkviolet: "#9400d3",
+  deeppink: "#ff1493",
+  deepskyblue: "#00bfff",
+  dimgray: "#696969",
+  dimgrey: "#696969",
+  dodgerblue: "#1e90ff",
+  firebrick: "#b22222",
+  floralwhite: "#fffaf0",
+  forestgreen: "#228b22",
+  fuchsia: "#ff00ff",
+  gainsboro: "#dcdcdc",
+  ghostwhite: "#f8f8ff",
+  gold: "#ffd700",
+  goldenrod: "#daa520",
+  gray: "#808080",
+  green: "#008000",
+  greenyellow: "#adff2f",
+  grey: "#808080",
+  honeydew: "#f0fff0",
+  hotpink: "#ff69b4",
+  indianred: "#cd5c5c",
+  indigo: "#4b0082",
+  ivory: "#fffff0",
+  khaki: "#f0e68c",
+  lavender: "#e6e6fa",
+  lavenderblush: "#fff0f5",
+  lawngreen: "#7cfc00",
+  lemonchiffon: "#fffacd",
+  lightblue: "#add8e6",
+  lightcoral: "#f08080",
+  lightcyan: "#e0ffff",
+  lightgoldenrodyellow: "#fafad2",
+  lightgray: "#d3d3d3",
+  lightgreen: "#90ee90",
+  lightgrey: "#d3d3d3",
+  lightpink: "#ffb6c1",
+  lightsalmon: "#ffa07a",
+  lightseagreen: "#20b2aa",
+  lightskyblue: "#87cefa",
+  lightslategray: "#778899",
+  lightslategrey: "#778899",
+  lightsteelblue: "#b0c4de",
+  lightyellow: "#ffffe0",
+  lime: "#00ff00",
+  limegreen: "#32cd32",
+  linen: "#faf0e6",
+  magenta: "#ff00ff",
+  maroon: "#800000",
+  mediumaquamarine: "#66cdaa",
+  mediumblue: "#0000cd",
+  mediumorchid: "#ba55d3",
+  mediumpurple: "#9370db",
+  mediumseagreen: "#3cb371",
+  mediumslateblue: "#7b68ee",
+  mediumspringgreen: "#00fa9a",
+  mediumturquoise: "#48d1cc",
+  mediumvioletred: "#c71585",
+  midnightblue: "#191970",
+  mintcream: "#f5fffa",
+  mistyrose: "#ffe4e1",
+  moccasin: "#ffe4b5",
+  navajowhite: "#ffdead",
+  navy: "#000080",
+  oldlace: "#fdf5e6",
+  olive: "#808000",
+  olivedrab: "#6b8e23",
+  orange: "#ffa500",
+  orangered: "#ff4500",
+  orchid: "#da70d6",
+  palegoldenrod: "#eee8aa",
+  palegreen: "#98fb98",
+  paleturquoise: "#afeeee",
+  palevioletred: "#db7093",
+  papayawhip: "#ffefd5",
+  peachpuff: "#ffdab9",
+  peru: "#cd853f",
+  pink: "#ffc0cb",
+  plum: "#dda0dd",
+  powderblue: "#b0e0e6",
+  purple: "#800080",
+  red: "#ff0000",
+  rosybrown: "#bc8f8f",
+  royalblue: "#4169e1",
+  saddlebrown: "#8b4513",
+  salmon: "#fa8072",
+  sandybrown: "#f4a460",
+  seagreen: "#2e8b57",
+  seashell: "#fff5ee",
+  sienna: "#a0522d",
+  silver: "#c0c0c0",
+  skyblue: "#87ceeb",
+  slateblue: "#6a5acd",
+  slategray: "#708090",
+  slategrey: "#708090",
+  snow: "#fffafa",
+  springgreen: "#00ff7f",
+  steelblue: "#4682b4",
+  tan: "#d2b48c",
+  teal: "#008080",
+  thistle: "#d8bfd8",
+  tomato: "#ff6347",
+  turquoise: "#40e0d0",
+  violet: "#ee82ee",
+  wheat: "#f5deb3",
+  white: "#ffffff",
+  whitesmoke: "#f5f5f5",
+  yellow: "#ffff00",
+  yellowgreen: "#9acd32"
+};
+
+for (var d3_rgb_name in d3_rgb_names) {
+  d3_rgb_names[d3_rgb_name] = d3_rgb_parse(
+      d3_rgb_names[d3_rgb_name],
+      d3_rgb,
+      d3_hsl_rgb);
+}
Index: Dev/branches/Demo/d3/src/core/round.js
===================================================================
--- Dev/branches/Demo/d3/src/core/round.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/round.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.round = function(x, n) {
+  return n
+      ? Math.round(x * Math.pow(10, n)) * Math.pow(10, -n)
+      : Math.round(x);
+};
Index: Dev/branches/Demo/d3/src/core/selection.js
===================================================================
--- Dev/branches/Demo/d3/src/core/selection.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/selection.js	(revision 225)
@@ -0,0 +1,639 @@
+var d3_select = function(s, n) { return n.querySelector(s); },
+    d3_selectAll = function(s, n) { return d3_array(n.querySelectorAll(s)); };
+
+// Use Sizzle, if available.
+if (typeof Sizzle === "function") {
+  d3_select = function(s, n) { return Sizzle(s, n)[0]; };
+  d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); };
+}
+
+var d3_root = d3_selection([[document]]);
+d3_root[0].parentNode = document.documentElement;
+
+// TODO fast singleton implementation!
+d3.select = function(selector) {
+  return typeof selector === "string"
+      ? d3_root.select(selector)
+      : d3_selection([[selector]]); // assume node
+};
+
+d3.selectAll = function(selector) {
+  return typeof selector === "string"
+      ? d3_root.selectAll(selector)
+      : d3_selection([d3_array(selector)]); // assume node[]
+};
+
+function d3_selection(groups) {
+
+  function select(select) {
+    var subgroups = [],
+        subgroup,
+        subnode,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          subgroup.push(subnode = select(node));
+          if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  }
+
+  function selectAll(selectAll) {
+    var subgroups = [],
+        subgroup,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          subgroups.push(subgroup = selectAll(node));
+          subgroup.parentNode = node;
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  }
+
+  // TODO select(function)?
+  groups.select = function(selector) {
+    return select(function(node) {
+      return d3_select(selector, node);
+    });
+  };
+
+  // TODO selectAll(function)?
+  groups.selectAll = function(selector) {
+    return selectAll(function(node) {
+      return d3_selectAll(selector, node);
+    });
+  };
+
+  // TODO preserve null elements to maintain index?
+  groups.filter = function(filter) {
+    var subgroups = [],
+        subgroup,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if ((node = group[i]) && filter.call(node, node.__data__, i)) {
+          subgroup.push(node);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  };
+
+  groups.map = function(map) {
+    var group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) node.__data__ = map.call(node, node.__data__, i);
+      }
+    }
+    return groups;
+  };
+
+  // TODO data(null) for clearing data?
+  groups.data = function(data, join) {
+    var enter = [],
+        update = [],
+        exit = [];
+
+    function bind(group, groupData) {
+      var i = 0,
+          n = group.length,
+          m = groupData.length,
+          n0 = Math.min(n, m),
+          n1 = Math.max(n, m),
+          updateNodes = [],
+          enterNodes = [],
+          exitNodes = [],
+          node,
+          nodeData;
+
+      if (join) {
+        var nodeByKey = {},
+            keys = [],
+            key,
+            j = groupData.length;
+
+        for (i = 0; i < n; i++) {
+          key = join.call(node = group[i], node.__data__, i);
+          if (key in nodeByKey) {
+            exitNodes[j++] = node; // duplicate key
+          } else {
+            nodeByKey[key] = node;
+          }
+          keys.push(key);
+        }
+
+        for (i = 0; i < m; i++) {
+          node = nodeByKey[key = join.call(groupData, nodeData = groupData[i], i)];
+          if (node) {
+            node.__data__ = nodeData;
+            updateNodes[i] = node;
+            enterNodes[i] = exitNodes[i] = null;
+          } else {
+            enterNodes[i] = d3_selection_enterNode(nodeData);
+            updateNodes[i] = exitNodes[i] = null;
+          }
+          delete nodeByKey[key];
+        }
+
+        for (i = 0; i < n; i++) {
+          if (keys[i] in nodeByKey) {
+            exitNodes[i] = group[i];
+          }
+        }
+      } else {
+        for (; i < n0; i++) {
+          node = group[i];
+          nodeData = groupData[i];
+          if (node) {
+            node.__data__ = nodeData;
+            updateNodes[i] = node;
+            enterNodes[i] = exitNodes[i] = null;
+          } else {
+            enterNodes[i] = d3_selection_enterNode(nodeData);
+            updateNodes[i] = exitNodes[i] = null;
+          }
+        }
+        for (; i < m; i++) {
+          enterNodes[i] = d3_selection_enterNode(groupData[i]);
+          updateNodes[i] = exitNodes[i] = null;
+        }
+        for (; i < n1; i++) {
+          exitNodes[i] = group[i];
+          enterNodes[i] = updateNodes[i] = null;
+        }
+      }
+
+      enterNodes.parentNode
+          = updateNodes.parentNode
+          = exitNodes.parentNode
+          = group.parentNode;
+
+      enter.push(enterNodes);
+      update.push(updateNodes);
+      exit.push(exitNodes);
+    }
+
+    var i = -1,
+        n = groups.length,
+        group;
+    if (typeof data === "function") {
+      while (++i < n) {
+        bind(group = groups[i], data.call(group, group.parentNode.__data__, i));
+      }
+    } else {
+      while (++i < n) {
+        bind(group = groups[i], data);
+      }
+    }
+
+    var selection = d3_selection(update);
+    selection.enter = function() {
+      return d3_selectionEnter(enter);
+    };
+    selection.exit = function() {
+      return d3_selection(exit);
+    };
+    return selection;
+  };
+
+  // TODO mask forEach? or rename for eachData?
+  // TODO offer the same semantics for map, reduce, etc.?
+  groups.each = function(callback) {
+    for (var j = 0, m = groups.length; j < m; j++) {
+      var group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        var node = group[i];
+        if (node) callback.call(node, node.__data__, i);
+      }
+    }
+    return groups;
+  };
+
+  function first(callback) {
+    for (var j = 0, m = groups.length; j < m; j++) {
+      var group = groups[j];
+      for (var i = 0, n = group.length; i < n; i++) {
+        var node = group[i];
+        if (node) return callback.call(node, node.__data__, i);
+      }
+    }
+    return null;
+  }
+
+  groups.empty = function() {
+    return !first(function() { return true; });
+  };
+
+  groups.node = function() {
+    return first(function() { return this; });
+  };
+
+  groups.attr = function(name, value) {
+    name = d3.ns.qualify(name);
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(name.local
+          ? function() { return this.getAttributeNS(name.space, name.local); }
+          : function() { return this.getAttribute(name); });
+    }
+
+    /** @this {Element} */
+    function attrNull() {
+      this.removeAttribute(name);
+    }
+
+    /** @this {Element} */
+    function attrNullNS() {
+      this.removeAttributeNS(name.space, name.local);
+    }
+
+    /** @this {Element} */
+    function attrConstant() {
+      this.setAttribute(name, value);
+    }
+
+    /** @this {Element} */
+    function attrConstantNS() {
+      this.setAttributeNS(name.space, name.local, value);
+    }
+
+    /** @this {Element} */
+    function attrFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.removeAttribute(name);
+      else this.setAttribute(name, x);
+    }
+
+    /** @this {Element} */
+    function attrFunctionNS() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.removeAttributeNS(name.space, name.local);
+      else this.setAttributeNS(name.space, name.local, x);
+    }
+
+    return groups.each(value == null
+        ? (name.local ? attrNullNS : attrNull) : (typeof value === "function"
+        ? (name.local ? attrFunctionNS : attrFunction)
+        : (name.local ? attrConstantNS : attrConstant)));
+  };
+
+  groups.classed = function(name, value) {
+    var re = new RegExp("(^|\\s+)" + d3.requote(name) + "(\\s+|$)", "g");
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(function() {
+        if (c = this.classList) return c.contains(name);
+        var c = this.className;
+        re.lastIndex = 0;
+        return re.test(c.baseVal != null ? c.baseVal : c);
+      });
+    }
+
+    /** @this {Element} */
+    function classedAdd() {
+      if (c = this.classList) return c.add(name);
+      var c = this.className,
+          cb = c.baseVal != null,
+          cv = cb ? c.baseVal : c;
+      re.lastIndex = 0;
+      if (!re.test(cv)) {
+        cv = d3_collapse(cv + " " + name);
+        if (cb) c.baseVal = cv;
+        else this.className = cv;
+      }
+    }
+
+    /** @this {Element} */
+    function classedRemove() {
+      if (c = this.classList) return c.remove(name);
+      var c = this.className,
+          cb = c.baseVal != null,
+          cv = cb ? c.baseVal : c;
+      cv = d3_collapse(cv.replace(re, " "));
+      if (cb) c.baseVal = cv;
+      else this.className = cv;
+    }
+
+    /** @this {Element} */
+    function classedFunction() {
+      (value.apply(this, arguments)
+          ? classedAdd
+          : classedRemove).call(this);
+    }
+
+    return groups.each(typeof value === "function"
+        ? classedFunction : value
+        ? classedAdd
+        : classedRemove);
+  };
+
+  groups.style = function(name, value, priority) {
+    if (arguments.length < 3) priority = "";
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(function() {
+        return window.getComputedStyle(this, null).getPropertyValue(name);
+      });
+    }
+
+    /** @this {Element} */
+    function styleNull() {
+      this.style.removeProperty(name);
+    }
+
+    /** @this {Element} */
+    function styleConstant() {
+      this.style.setProperty(name, value, priority);
+    }
+
+    /** @this {Element} */
+    function styleFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) this.style.removeProperty(name);
+      else this.style.setProperty(name, x, priority);
+    }
+
+    return groups.each(value == null
+        ? styleNull : (typeof value === "function"
+        ? styleFunction : styleConstant));
+  };
+
+  groups.property = function(name, value) {
+    name = d3.ns.qualify(name);
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 2) {
+      return first(function() {
+        return this[name];
+      });
+    }
+
+    /** @this {Element} */
+    function propertyNull() {
+      delete this[name];
+    }
+
+    /** @this {Element} */
+    function propertyConstant() {
+      this[name] = value;
+    }
+
+    /** @this {Element} */
+    function propertyFunction() {
+      var x = value.apply(this, arguments);
+      if (x == null) delete this[name];
+      else this[name] = x;
+    }
+
+    return groups.each(value == null
+        ? propertyNull : (typeof value === "function"
+        ? propertyFunction : propertyConstant));
+  };
+
+  groups.text = function(value) {
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 1) {
+      return first(function() {
+        return this.textContent;
+      });
+    }
+
+    /** @this {Element} */
+    function textConstant() {
+      this.textContent = value;
+    }
+
+    /** @this {Element} */
+    function textFunction() {
+      this.textContent = value.apply(this, arguments);
+    }
+
+    return groups.each(typeof value === "function"
+        ? textFunction : textConstant);
+  };
+
+  groups.html = function(value) {
+
+    // If no value is specified, return the first value.
+    if (arguments.length < 1) {
+      return first(function() {
+        return this.innerHTML;
+      });
+    }
+
+    /** @this {Element} */
+    function htmlConstant() {
+      this.innerHTML = value;
+    }
+
+    /** @this {Element} */
+    function htmlFunction() {
+      this.innerHTML = value.apply(this, arguments);
+    }
+
+    return groups.each(typeof value === "function"
+        ? htmlFunction : htmlConstant);
+  };
+
+  // TODO append(node)?
+  // TODO append(function)?
+  groups.append = function(name) {
+    name = d3.ns.qualify(name);
+
+    function append(node) {
+      return node.appendChild(document.createElement(name));
+    }
+
+    function appendNS(node) {
+      return node.appendChild(document.createElementNS(name.space, name.local));
+    }
+
+    return select(name.local ? appendNS : append);
+  };
+
+  // TODO insert(node, function)?
+  // TODO insert(function, string)?
+  // TODO insert(function, function)?
+  groups.insert = function(name, before) {
+    name = d3.ns.qualify(name);
+
+    function insert(node) {
+      return node.insertBefore(
+          document.createElement(name),
+          d3_select(before, node));
+    }
+
+    function insertNS(node) {
+      return node.insertBefore(
+          document.createElementNS(name.space, name.local),
+          d3_select(before, node));
+    }
+
+    return select(name.local ? insertNS : insert);
+  };
+
+  // TODO remove(selector)?
+  // TODO remove(node)?
+  // TODO remove(function)?
+  groups.remove = function() {
+    return groups.each(function() {
+      var parent = this.parentNode;
+      if (parent) parent.removeChild(this);
+    });
+  };
+
+  groups.sort = function(comparator) {
+    comparator = d3_selection_comparator.apply(this, arguments);
+    for (var j = 0, m = groups.length; j < m; j++) {
+      var group = groups[j];
+      group.sort(comparator);
+      for (var i = 1, n = group.length, prev = group[0]; i < n; i++) {
+        var node = group[i];
+        if (node) {
+          if (prev) prev.parentNode.insertBefore(node, prev.nextSibling);
+          prev = node;
+        }
+      }
+    }
+    return groups;
+  };
+
+  // type can be namespaced, e.g., "click.foo"
+  // listener can be null for removal
+  groups.on = function(type, listener, capture) {
+    if (arguments.length < 3) capture = false;
+
+    // parse the type specifier
+    var i = type.indexOf("."),
+        typo = i === -1 ? type : type.substring(0, i),
+        name = "__on" + type;
+
+    // remove the old event listener, and add the new event listener
+    return groups.each(function(d, i) {
+      if (this[name]) this.removeEventListener(typo, this[name], capture);
+      if (listener) this.addEventListener(typo, this[name] = l, capture);
+
+      // wrapped event listener that preserves i
+      var node = this;
+      function l(e) {
+        var o = d3.event; // Events can be reentrant (e.g., focus).
+        d3.event = e;
+        try {
+          listener.call(this, node.__data__, i);
+        } finally {
+          d3.event = o;
+        }
+      }
+    });
+  };
+
+  // TODO slice?
+
+  groups.transition = function() {
+    return d3_transition(groups);
+  };
+
+  groups.call = d3_call;
+
+  return groups;
+}
+
+function d3_selectionEnter(groups) {
+
+  function select(select) {
+    var subgroups = [],
+        subgroup,
+        subnode,
+        group,
+        node;
+    for (var j = 0, m = groups.length; j < m; j++) {
+      group = groups[j];
+      subgroups.push(subgroup = []);
+      subgroup.parentNode = group.parentNode;
+      for (var i = 0, n = group.length; i < n; i++) {
+        if (node = group[i]) {
+          subgroup.push(subnode = select(group.parentNode));
+          subnode.__data__ = node.__data__;
+        } else {
+          subgroup.push(null);
+        }
+      }
+    }
+    return d3_selection(subgroups);
+  }
+
+  // TODO append(node)?
+  // TODO append(function)?
+  groups.append = function(name) {
+    name = d3.ns.qualify(name);
+
+    function append(node) {
+      return node.appendChild(document.createElement(name));
+    }
+
+    function appendNS(node) {
+      return node.appendChild(document.createElementNS(name.space, name.local));
+    }
+
+    return select(name.local ? appendNS : append);
+  };
+
+  // TODO insert(node, function)?
+  // TODO insert(function, string)?
+  // TODO insert(function, function)?
+  groups.insert = function(name, before) {
+    name = d3.ns.qualify(name);
+
+    function insert(node) {
+      return node.insertBefore(
+          document.createElement(name),
+          d3_select(before, node));
+    }
+
+    function insertNS(node) {
+      return node.insertBefore(
+          document.createElementNS(name.space, name.local),
+          d3_select(before, node));
+    }
+
+    return select(name.local ? insertNS : insert);
+  };
+
+  return groups;
+}
+
+function d3_selection_comparator(comparator) {
+  if (!arguments.length) comparator = d3.ascending;
+  return function(a, b) {
+    return comparator(a && a.__data__, b && b.__data__);
+  };
+}
+
+function d3_selection_enterNode(data) {
+  return {__data__: data};
+}
Index: Dev/branches/Demo/d3/src/core/split.js
===================================================================
--- Dev/branches/Demo/d3/src/core/split.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/split.js	(revision 225)
@@ -0,0 +1,21 @@
+d3.split = function(array, f) {
+  var arrays = [],
+      values = [],
+      value,
+      i = -1,
+      n = array.length;
+  if (arguments.length < 2) f = d3_splitter;
+  while (++i < n) {
+    if (f.call(values, value = array[i], i)) {
+      values = [];
+    } else {
+      if (!values.length) arrays.push(values);
+      values.push(value);
+    }
+  }
+  return arrays;
+};
+
+function d3_splitter(d) {
+  return d == null;
+}
Index: Dev/branches/Demo/d3/src/core/sum.js
===================================================================
--- Dev/branches/Demo/d3/src/core/sum.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/sum.js	(revision 225)
@@ -0,0 +1,14 @@
+d3.sum = function(array, f) {
+  var s = 0,
+      n = array.length,
+      a,
+      i = -1;
+
+  if (arguments.length === 1) {
+    while (++i < n) if (!isNaN(a = +array[i])) s += a;
+  } else {
+    while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
+  }
+
+  return s;
+};
Index: Dev/branches/Demo/d3/src/core/text.js
===================================================================
--- Dev/branches/Demo/d3/src/core/text.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/text.js	(revision 225)
@@ -0,0 +1,10 @@
+d3.text = function(url, mime, callback) {
+  function ready(req) {
+    callback(req && req.responseText);
+  }
+  if (arguments.length < 3) {
+    callback = mime;
+    mime = null;
+  }
+  d3.xhr(url, mime, ready);
+};
Index: Dev/branches/Demo/d3/src/core/timer.js
===================================================================
--- Dev/branches/Demo/d3/src/core/timer.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/timer.js	(revision 225)
@@ -0,0 +1,105 @@
+var d3_timer_queue = null,
+    d3_timer_interval, // is an interval (or frame) active?
+    d3_timer_timeout; // is a timeout active?
+
+// The timer will continue to fire until callback returns true.
+d3.timer = function(callback) {
+  d3_timer(callback, 0);
+};
+
+function d3_timer(callback, delay) {
+  var now = Date.now(),
+      found = false,
+      t0,
+      t1 = d3_timer_queue;
+
+  if (!isFinite(delay)) return;
+
+  // See if the callback's already in the queue.
+  while (t1) {
+    if (t1.callback === callback) {
+      t1.then = now;
+      t1.delay = delay;
+      found = true;
+      break;
+    }
+    t0 = t1;
+    t1 = t1.next;
+  }
+
+  // Otherwise, add the callback to the queue.
+  if (!found) d3_timer_queue = {
+    callback: callback,
+    then: now,
+    delay: delay,
+    next: d3_timer_queue
+  };
+
+  // Start animatin'!
+  if (!d3_timer_interval) {
+    d3_timer_timeout = clearTimeout(d3_timer_timeout);
+    d3_timer_interval = 1;
+    d3_timer_frame(d3_timer_step);
+  }
+}
+
+function d3_timer_step() {
+  var elapsed,
+      now = Date.now(),
+      t1 = d3_timer_queue;
+
+  while (t1) {
+    elapsed = now - t1.then;
+    if (elapsed > t1.delay) t1.flush = t1.callback(elapsed);
+    t1 = t1.next;
+  }
+
+  var delay = d3_timer_flush() - now;
+  if (delay > 24) {
+    if (isFinite(delay)) {
+      clearTimeout(d3_timer_timeout);
+      d3_timer_timeout = setTimeout(d3_timer_step, delay);
+    }
+    d3_timer_interval = 0;
+  } else {
+    d3_timer_interval = 1;
+    d3_timer_frame(d3_timer_step);
+  }
+}
+
+d3.timer.flush = function() {
+  var elapsed,
+      now = Date.now(),
+      t1 = d3_timer_queue;
+
+  while (t1) {
+    elapsed = now - t1.then;
+    if (!t1.delay) t1.flush = t1.callback(elapsed);
+    t1 = t1.next;
+  }
+
+  d3_timer_flush();
+};
+
+// Flush after callbacks, to avoid concurrent queue modification.
+function d3_timer_flush() {
+  var t0 = null,
+      t1 = d3_timer_queue,
+      then = Infinity;
+  while (t1) {
+    if (t1.flush) {
+      t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
+    } else {
+      then = Math.min(then, t1.then + t1.delay);
+      t1 = (t0 = t1).next;
+    }
+  }
+  return then;
+}
+
+var d3_timer_frame = window.requestAnimationFrame
+    || window.webkitRequestAnimationFrame
+    || window.mozRequestAnimationFrame
+    || window.oRequestAnimationFrame
+    || window.msRequestAnimationFrame
+    || function(callback) { setTimeout(callback, 17); };
Index: Dev/branches/Demo/d3/src/core/transition.js
===================================================================
--- Dev/branches/Demo/d3/src/core/transition.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/transition.js	(revision 225)
@@ -0,0 +1,240 @@
+d3.transition = d3_root.transition;
+
+var d3_transitionId = 0,
+    d3_transitionInheritId = 0;
+
+function d3_transition(groups) {
+  var transition = {},
+      transitionId = d3_transitionInheritId || ++d3_transitionId,
+      tweens = {},
+      interpolators = [],
+      remove = false,
+      event = d3.dispatch("start", "end"),
+      stage = [],
+      delay = [],
+      duration = [],
+      durationMax,
+      ease = d3.ease("cubic-in-out");
+
+  //
+  // Be careful with concurrent transitions!
+  //
+  // Say transition A causes an exit. Before A finishes, a transition B is
+  // created, and believes it only needs to do an update, because the elements
+  // haven't been removed yet (which happens at the very end of the exit
+  // transition).
+  //
+  // Even worse, what if either transition A or B has a staggered delay? Then,
+  // some elements may be removed, while others remain. Transition B does not
+  // know to enter the elements because they were still present at the time
+  // the transition B was created (but not yet started).
+  //
+  // To prevent such confusion, we only trigger end events for transitions if
+  // the transition ending is the only one scheduled for the given element.
+  // Similarly, we only allow one transition to be active for any given
+  // element, so that concurrent transitions do not overwrite each other's
+  // properties.
+  //
+  // TODO Support transition namespaces, so that transitions can proceed
+  // concurrently on the same element if needed. Hopefully, this is rare!
+  //
+
+  groups.each(function() {
+    (this.__transition__ || (this.__transition__ = {})).owner = transitionId;
+  });
+
+  function step(elapsed) {
+    var clear = true,
+        k = -1;
+    groups.each(function() {
+      if (stage[++k] === 2) return; // ended
+      var t = (elapsed - delay[k]) / duration[k],
+          tx = this.__transition__,
+          te, // ease(t)
+          tk, // tween key
+          ik = interpolators[k];
+
+      // Check if the (un-eased) time is outside the range [0,1].
+      if (t < 1) {
+        clear = false;
+        if (t < 0) return;
+      } else {
+        t = 1;
+      }
+
+      // Determine the stage of this transition.
+      // 0 - Not yet started.
+      // 1 - In progress.
+      // 2 - Ended.
+      if (stage[k]) {
+        if (!tx || tx.active !== transitionId) {
+          stage[k] = 2;
+          return;
+        }
+      } else if (!tx || tx.active > transitionId) {
+        stage[k] = 2;
+        return;
+      } else {
+        stage[k] = 1;
+        event.start.dispatch.apply(this, arguments);
+        ik = interpolators[k] = {};
+        tx.active = transitionId;
+        for (tk in tweens) {
+          if (te = tweens[tk].apply(this, arguments)) {
+            ik[tk] = te;
+          }
+        }
+      }
+
+      // Apply the interpolators!
+      te = ease(t);
+      for (tk in ik) ik[tk].call(this, te);
+
+      // Handle ending transitions.
+      if (t === 1) {
+        stage[k] = 2;
+        if (tx.active === transitionId) {
+          var owner = tx.owner;
+          if (owner === transitionId) {
+            delete this.__transition__;
+            if (remove && this.parentNode) this.parentNode.removeChild(this);
+          }
+          d3_transitionInheritId = transitionId;
+          event.end.dispatch.apply(this, arguments);
+          d3_transitionInheritId = 0;
+          tx.owner = owner;
+        }
+      }
+    });
+    return clear;
+  }
+
+  transition.delay = function(value) {
+    var delayMin = Infinity,
+        k = -1;
+    if (typeof value === "function") {
+      groups.each(function(d, i) {
+        var x = delay[++k] = +value.apply(this, arguments);
+        if (x < delayMin) delayMin = x;
+      });
+    } else {
+      delayMin = +value;
+      groups.each(function(d, i) {
+        delay[++k] = delayMin;
+      });
+    }
+    d3_timer(step, delayMin);
+    return transition;
+  };
+
+  transition.duration = function(value) {
+    var k = -1;
+    if (typeof value === "function") {
+      durationMax = 0;
+      groups.each(function(d, i) {
+        var x = duration[++k] = +value.apply(this, arguments);
+        if (x > durationMax) durationMax = x;
+      });
+    } else {
+      durationMax = +value;
+      groups.each(function(d, i) {
+        duration[++k] = durationMax;
+      });
+    }
+    return transition;
+  };
+
+  transition.ease = function(value) {
+    ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments);
+    return transition;
+  };
+
+  transition.attrTween = function(name, tween) {
+
+    /** @this {Element} */
+    function attrTween(d, i) {
+      var f = tween.call(this, d, i, this.getAttribute(name));
+      return f && function(t) {
+        this.setAttribute(name, f(t));
+      };
+    }
+
+    /** @this {Element} */
+    function attrTweenNS(d, i) {
+      var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
+      return f && function(t) {
+        this.setAttributeNS(name.space, name.local, f(t));
+      };
+    }
+
+    tweens["attr." + name] = name.local ? attrTweenNS : attrTween;
+    return transition;
+  };
+
+  transition.attr = function(name, value) {
+    return transition.attrTween(name, d3_transitionTween(value));
+  };
+
+  transition.styleTween = function(name, tween, priority) {
+    if (arguments.length < 3) priority = null;
+
+    /** @this {Element} */
+    function styleTween(d, i) {
+      var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
+      return f && function(t) {
+        this.style.setProperty(name, f(t), priority);
+      };
+    }
+
+    tweens["style." + name] = styleTween;
+    return transition;
+  };
+
+  transition.style = function(name, value, priority) {
+    if (arguments.length < 3) priority = null;
+    return transition.styleTween(name, d3_transitionTween(value), priority);
+  };
+
+  transition.text = function(value) {
+    tweens.text = function(d, i) {
+      this.textContent = typeof value === "function"
+          ? value.call(this, d, i)
+          : value;
+    };
+    return transition;
+  };
+
+  transition.select = function(query) {
+    var k, t = d3_transition(groups.select(query)).ease(ease);
+    k = -1; t.delay(function(d, i) { return delay[++k]; });
+    k = -1; t.duration(function(d, i) { return duration[++k]; });
+    return t;
+  };
+
+  transition.selectAll = function(query) {
+    var k, t = d3_transition(groups.selectAll(query)).ease(ease);
+    k = -1; t.delay(function(d, i) { return delay[i ? k : ++k]; })
+    k = -1; t.duration(function(d, i) { return duration[i ? k : ++k]; });
+    return t;
+  };
+
+  transition.remove = function() {
+    remove = true;
+    return transition;
+  };
+
+  transition.each = function(type, listener) {
+    event[type].add(listener);
+    return transition;
+  };
+
+  transition.call = d3_call;
+
+  return transition.delay(0).duration(250);
+}
+
+function d3_transitionTween(b) {
+  return typeof b === "function"
+      ? function(d, i, a) { var v = b.call(this, d, i) + ""; return a != v && d3.interpolate(a, v); }
+      : (b = b + "", function(d, i, a) { return a != b && d3.interpolate(a, b); });
+}
Index: Dev/branches/Demo/d3/src/core/uninterpolate.js
===================================================================
--- Dev/branches/Demo/d3/src/core/uninterpolate.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/uninterpolate.js	(revision 225)
@@ -0,0 +1,9 @@
+function d3_uninterpolateNumber(a, b) {
+  b = 1 / (b - (a = +a));
+  return function(x) { return (x - a) * b; };
+}
+
+function d3_uninterpolateClamp(a, b) {
+  b = 1 / (b - (a = +a));
+  return function(x) { return Math.max(0, Math.min(1, (x - a) * b)); };
+}
Index: Dev/branches/Demo/d3/src/core/values.js
===================================================================
--- Dev/branches/Demo/d3/src/core/values.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/values.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.values = function(map) {
+  var values = [];
+  for (var key in map) values.push(map[key]);
+  return values;
+};
Index: Dev/branches/Demo/d3/src/core/xhr.js
===================================================================
--- Dev/branches/Demo/d3/src/core/xhr.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/xhr.js	(revision 225)
@@ -0,0 +1,10 @@
+d3.xhr = function(url, mime, callback) {
+  var req = new XMLHttpRequest;
+  if (arguments.length < 3) callback = mime;
+  else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
+  req.open("GET", url, true);
+  req.onreadystatechange = function() {
+    if (req.readyState === 4) callback(req.status < 300 ? req : null);
+  };
+  req.send(null);
+};
Index: Dev/branches/Demo/d3/src/core/xml.js
===================================================================
--- Dev/branches/Demo/d3/src/core/xml.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/xml.js	(revision 225)
@@ -0,0 +1,10 @@
+d3.xml = function(url, mime, callback) {
+  function ready(req) {
+    callback(req && req.responseXML);
+  }
+  if (arguments.length < 3) {
+    callback = mime;
+    mime = null;
+  }
+  d3.xhr(url, mime, ready);
+};
Index: Dev/branches/Demo/d3/src/core/zip.js
===================================================================
--- Dev/branches/Demo/d3/src/core/zip.js	(revision 225)
+++ Dev/branches/Demo/d3/src/core/zip.js	(revision 225)
@@ -0,0 +1,13 @@
+d3.zip = function() {
+  if (!(n = arguments.length)) return [];
+  for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m;) {
+    for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n;) {
+      zip[j] = arguments[j][i];
+    }
+  }
+  return zips;
+};
+
+function d3_zipLength(d) {
+  return d.length;
+}
Index: Dev/branches/Demo/d3/src/csv/csv.js
===================================================================
--- Dev/branches/Demo/d3/src/csv/csv.js	(revision 225)
+++ Dev/branches/Demo/d3/src/csv/csv.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.csv = function(url, callback) {
+  d3.text(url, "text/csv", function(text) {
+    callback(text && d3.csv.parse(text));
+  });
+};
Index: Dev/branches/Demo/d3/src/csv/format.js
===================================================================
--- Dev/branches/Demo/d3/src/csv/format.js	(revision 225)
+++ Dev/branches/Demo/d3/src/csv/format.js	(revision 225)
@@ -0,0 +1,13 @@
+d3.csv.format = function(rows) {
+  return rows.map(d3_csv_formatRow).join("\n");
+};
+
+function d3_csv_formatRow(row) {
+  return row.map(d3_csv_formatValue).join(",");
+}
+
+function d3_csv_formatValue(text) {
+  return /[",\n]/.test(text)
+      ? "\"" + text.replace(/\"/g, "\"\"") + "\""
+      : text;
+}
Index: Dev/branches/Demo/d3/src/csv/parse.js
===================================================================
--- Dev/branches/Demo/d3/src/csv/parse.js	(revision 225)
+++ Dev/branches/Demo/d3/src/csv/parse.js	(revision 225)
@@ -0,0 +1,73 @@
+d3.csv.parse = function(text) {
+  var header;
+  return d3.csv.parseRows(text, function(row, i) {
+    if (i) {
+      var o = {}, j = -1, m = header.length;
+      while (++j < m) o[header[j]] = row[j];
+      return o;
+    } else {
+      header = row;
+      return null;
+    }
+  });
+};
+
+d3.csv.parseRows = function(text, f) {
+  var EOL = {}, // sentinel value for end-of-line
+      EOF = {}, // sentinel value for end-of-file
+      rows = [], // output rows
+      re = /\r\n|[,\r\n]/g, // field separator regex
+      n = 0, // the current line number
+      t, // the current token
+      eol; // is the current token followed by EOL?
+
+  re.lastIndex = 0; // work-around bug in FF 3.6
+
+  /** @private Returns the next token. */
+  function token() {
+    if (re.lastIndex === text.length) return EOF; // special case: end of file
+    if (eol) { eol = false; return EOL; } // special case: end of line
+
+    // special case: quotes
+    var j = re.lastIndex;
+    if (text.charCodeAt(j) === 34) {
+      var i = j;
+      while (i++ < text.length) {
+        if (text.charCodeAt(i) === 34) {
+          if (text.charCodeAt(i + 1) !== 34) break;
+          i++;
+        }
+      }
+      re.lastIndex = i + 2;
+      var c = text.charCodeAt(i + 1);
+      if (c === 13) {
+        eol = true;
+        if (text.charCodeAt(i + 2) === 10) re.lastIndex++;
+      } else if (c === 10) {
+        eol = true;
+      }
+      return text.substring(j + 1, i).replace(/""/g, "\"");
+    }
+
+    // common case
+    var m = re.exec(text);
+    if (m) {
+      eol = m[0].charCodeAt(0) !== 44;
+      return text.substring(j, m.index);
+    }
+    re.lastIndex = text.length;
+    return text.substring(j);
+  }
+
+  while ((t = token()) !== EOF) {
+    var a = [];
+    while ((t !== EOL) && (t !== EOF)) {
+      a.push(t);
+      t = token();
+    }
+    if (f && !(a = f(a, n++))) continue;
+    rows.push(a);
+  }
+
+  return rows;
+};
Index: Dev/branches/Demo/d3/src/end.js
===================================================================
--- Dev/branches/Demo/d3/src/end.js	(revision 225)
+++ Dev/branches/Demo/d3/src/end.js	(revision 225)
@@ -0,0 +1,1 @@
+})();
Index: Dev/branches/Demo/d3/src/externs.js
===================================================================
--- Dev/branches/Demo/d3/src/externs.js	(revision 225)
+++ Dev/branches/Demo/d3/src/externs.js	(revision 225)
@@ -0,0 +1,6 @@
+// JavaScript built-ins.
+var console,
+    JSON;
+
+// d3
+var d3;
Index: Dev/branches/Demo/d3/src/geo/albers.js
===================================================================
--- Dev/branches/Demo/d3/src/geo/albers.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geo/albers.js	(revision 225)
@@ -0,0 +1,115 @@
+// Derived from Tom Carden's Albers implementation for Protovis.
+// http://gist.github.com/476238
+// http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html
+
+d3.geo.albers = function() {
+  var origin = [-98, 38],
+      parallels = [29.5, 45.5],
+      scale = 1000,
+      translate = [480, 250],
+      lng0, // d3_radians * origin[0]
+      n,
+      C,
+      p0;
+
+  function albers(coordinates) {
+    var t = n * (d3_radians * coordinates[0] - lng0),
+        p = Math.sqrt(C - 2 * n * Math.sin(d3_radians * coordinates[1])) / n;
+    return [
+      scale * p * Math.sin(t) + translate[0],
+      scale * (p * Math.cos(t) - p0) + translate[1]
+    ];
+  }
+
+  function reload() {
+    var phi1 = d3_radians * parallels[0],
+        phi2 = d3_radians * parallels[1],
+        lat0 = d3_radians * origin[1],
+        s = Math.sin(phi1),
+        c = Math.cos(phi1);
+    lng0 = d3_radians * origin[0];
+    n = .5 * (s + Math.sin(phi2));
+    C = c * c + 2 * n * s;
+    p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;
+    return albers;
+  }
+
+  albers.origin = function(x) {
+    if (!arguments.length) return origin;
+    origin = [+x[0], +x[1]];
+    return reload();
+  };
+
+  albers.parallels = function(x) {
+    if (!arguments.length) return parallels;
+    parallels = [+x[0], +x[1]];
+    return reload();
+  };
+
+  albers.scale = function(x) {
+    if (!arguments.length) return scale;
+    scale = +x;
+    return albers;
+  };
+
+  albers.translate = function(x) {
+    if (!arguments.length) return translate;
+    translate = [+x[0], +x[1]];
+    return albers;
+  };
+
+  return reload();
+};
+
+// A composite projection for the United States, 960x500. The set of standard
+// parallels for each region comes from USGS, which is published here:
+// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
+// TODO allow the composite projection to be rescaled?
+d3.geo.albersUsa = function() {
+  var lower48 = d3.geo.albers();
+
+  var alaska = d3.geo.albers()
+      .origin([-160, 60])
+      .parallels([55, 65]);
+
+  var hawaii = d3.geo.albers()
+      .origin([-160, 20])
+      .parallels([8, 18]);
+
+  var puertoRico = d3.geo.albers()
+      .origin([-60, 10])
+      .parallels([8, 18]);
+
+  function albersUsa(coordinates) {
+    var lon = coordinates[0],
+        lat = coordinates[1];
+    return (lat < 25
+        ? (lon < -100 ? hawaii : puertoRico)
+        : (lat > 50 ? alaska : lower48))(coordinates);
+  }
+
+  albersUsa.scale = function(x) {
+    if (!arguments.length) return lower48.scale();
+    lower48.scale(x);
+    alaska.scale(x * .6);
+    hawaii.scale(x);
+    puertoRico.scale(x * 1.5);
+    return albersUsa.translate(lower48.translate());
+  };
+
+  albersUsa.translate = function(x) {
+    if (!arguments.length) return lower48.translate();
+    var dz = lower48.scale() / 1000,
+        dx = x[0],
+        dy = x[1];
+    lower48.translate(x);
+    alaska.translate([dx - 400 * dz, dy + 170 * dz]);
+    hawaii.translate([dx - 190 * dz, dy + 200 * dz]);
+    puertoRico.translate([dx + 580 * dz, dy + 430 * dz]);
+    return albersUsa;
+  };
+
+  return albersUsa.scale(lower48.scale());
+};
+
+var d3_radians = Math.PI / 180;
Index: Dev/branches/Demo/d3/src/geo/azimuthal.js
===================================================================
--- Dev/branches/Demo/d3/src/geo/azimuthal.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geo/azimuthal.js	(revision 225)
@@ -0,0 +1,57 @@
+// TODO clip input coordinates on opposite hemisphere
+d3.geo.azimuthal = function() {
+  var mode = "orthographic", // or stereographic
+      origin,
+      scale = 200,
+      translate = [480, 250],
+      x0,
+      y0,
+      cy0,
+      sy0;
+
+  function azimuthal(coordinates) {
+    var x1 = coordinates[0] * d3_radians - x0,
+        y1 = coordinates[1] * d3_radians,
+        cx1 = Math.cos(x1),
+        sx1 = Math.sin(x1),
+        cy1 = Math.cos(y1),
+        sy1 = Math.sin(y1),
+        k = mode == "stereographic" ? 1 / (1 + sy0 * sy1 + cy0 * cy1 * cx1) : 1,
+        x = k * cy1 * sx1,
+        y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
+    return [
+      scale * x + translate[0],
+      scale * y + translate[1]
+    ];
+  }
+
+  azimuthal.mode = function(x) {
+    if (!arguments.length) return mode;
+    mode = x;
+    return azimuthal;
+  };
+
+  azimuthal.origin = function(x) {
+    if (!arguments.length) return origin;
+    origin = x;
+    x0 = origin[0] * d3_radians;
+    y0 = origin[1] * d3_radians;
+    cy0 = Math.cos(y0);
+    sy0 = Math.sin(y0);
+    return azimuthal;
+  };
+
+  azimuthal.scale = function(x) {
+    if (!arguments.length) return scale;
+    scale = +x;
+    return azimuthal;
+  };
+
+  azimuthal.translate = function(x) {
+    if (!arguments.length) return translate;
+    translate = [+x[0], +x[1]];
+    return azimuthal;
+  };
+
+  return azimuthal.origin([0, 0]);
+};
Index: Dev/branches/Demo/d3/src/geo/bounds.js
===================================================================
--- Dev/branches/Demo/d3/src/geo/bounds.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geo/bounds.js	(revision 225)
@@ -0,0 +1,76 @@
+/**
+ * Given a GeoJSON object, returns the corresponding bounding box. The bounding
+ * box is represented by a two-dimensional array: [[left, bottom], [right,
+ * top]], where left is the minimum longitude, bottom is the minimum latitude,
+ * right is maximum longitude, and top is the maximum latitude.
+ */
+d3.geo.bounds = function(feature) {
+  var left = Infinity,
+      bottom = Infinity,
+      right = -Infinity,
+      top = -Infinity;
+  d3_geo_bounds(feature, function(x, y) {
+    if (x < left) left = x;
+    if (x > right) right = x;
+    if (y < bottom) bottom = y;
+    if (y > top) top = y;
+  });
+  return [[left, bottom], [right, top]];
+};
+
+function d3_geo_bounds(o, f) {
+  if (o.type in d3_geo_boundsTypes) d3_geo_boundsTypes[o.type](o, f);
+}
+
+var d3_geo_boundsTypes = {
+  Feature: d3_geo_boundsFeature,
+  FeatureCollection: d3_geo_boundsFeatureCollection,
+  LineString: d3_geo_boundsLineString,
+  MultiLineString: d3_geo_boundsMultiLineString,
+  MultiPoint: d3_geo_boundsLineString,
+  MultiPolygon: d3_geo_boundsMultiPolygon,
+  Point: d3_geo_boundsPoint,
+  Polygon: d3_geo_boundsPolygon
+};
+
+function d3_geo_boundsFeature(o, f) {
+  d3_geo_bounds(o.geometry, f);
+}
+
+function d3_geo_boundsFeatureCollection(o, f) {
+  for (var a = o.features, i = 0, n = a.length; i < n; i++) {
+    d3_geo_bounds(a[i].geometry, f);
+  }
+}
+
+function d3_geo_boundsLineString(o, f) {
+  for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
+    f.apply(null, a[i]);
+  }
+}
+
+function d3_geo_boundsMultiLineString(o, f) {
+  for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
+    for (var b = a[i], j = 0, m = b.length; j < m; j++) {
+      f.apply(null, b[j]);
+    }
+  }
+}
+
+function d3_geo_boundsMultiPolygon(o, f) {
+  for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
+    for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {
+      f.apply(null, b[j]);
+    }
+  }
+}
+
+function d3_geo_boundsPoint(o, f) {
+  f.apply(null, o.coordinates);
+}
+
+function d3_geo_boundsPolygon(o, f) {
+  for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {
+    f.apply(null, a[i]);
+  }
+}
Index: Dev/branches/Demo/d3/src/geo/geo.js
===================================================================
--- Dev/branches/Demo/d3/src/geo/geo.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geo/geo.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.geo = {};
Index: Dev/branches/Demo/d3/src/geo/mercator.js
===================================================================
--- Dev/branches/Demo/d3/src/geo/mercator.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geo/mercator.js	(revision 225)
@@ -0,0 +1,27 @@
+d3.geo.mercator = function() {
+  var scale = 500,
+      translate = [480, 250];
+
+  function mercator(coordinates) {
+    var x = (coordinates[0]) / 360,
+        y = (-180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + coordinates[1] * Math.PI / 360))) / 360;
+    return [
+      scale * x + translate[0],
+      scale * Math.max(-.5, Math.min(.5, y)) + translate[1]
+    ];
+  }
+
+  mercator.scale = function(x) {
+    if (!arguments.length) return scale;
+    scale = +x;
+    return mercator;
+  };
+
+  mercator.translate = function(x) {
+    if (!arguments.length) return translate;
+    translate = [+x[0], +x[1]];
+    return mercator;
+  };
+
+  return mercator;
+};
Index: Dev/branches/Demo/d3/src/geo/path.js
===================================================================
--- Dev/branches/Demo/d3/src/geo/path.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geo/path.js	(revision 225)
@@ -0,0 +1,289 @@
+/**
+ * Returns a function that, given a GeoJSON object (e.g., a feature), returns
+ * the corresponding SVG path. The function can be customized by overriding the
+ * projection. Point features are mapped to circles with a default radius of
+ * 4.5px; the radius can be specified either as a constant or a function that
+ * is evaluated per object.
+ */
+d3.geo.path = function() {
+  var pointRadius = 4.5,
+      pointCircle = d3_path_circle(pointRadius),
+      projection = d3.geo.albersUsa();
+
+  function path(d, i) {
+    if (typeof pointRadius === "function") {
+      pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
+    }
+    return d3_geo_pathType(pathTypes, d);
+  }
+
+  function project(coordinates) {
+    return projection(coordinates).join(",");
+  }
+
+  var pathTypes = {
+
+    FeatureCollection: function(f) {
+      var path = [],
+          features = f.features,
+          i = -1, // features.index
+          n = features.length;
+      while (++i < n) path.push(d3_geo_pathType(pathTypes, features[i].geometry));
+      return path.join("");
+    },
+
+    Feature: function(f) {
+      return d3_geo_pathType(pathTypes, f.geometry);
+    },
+
+    Point: function(o) {
+      return "M" + project(o.coordinates) + pointCircle;
+    },
+
+    MultiPoint: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length;
+      while (++i < n) path.push("M", project(coordinates[i]), pointCircle);
+      return path.join("");
+    },
+
+    LineString: function(o) {
+      var path = ["M"],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length;
+      while (++i < n) path.push(project(coordinates[i]), "L");
+      path.pop();
+      return path.join("");
+    },
+
+    MultiLineString: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length,
+          subcoordinates, // coordinates[i]
+          j, // subcoordinates.index
+          m; // subcoordinates.length
+      while (++i < n) {
+        subcoordinates = coordinates[i];
+        j = -1;
+        m = subcoordinates.length;
+        path.push("M");
+        while (++j < m) path.push(project(subcoordinates[j]), "L");
+        path.pop();
+      }
+      return path.join("");
+    },
+
+    Polygon: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates.index
+          n = coordinates.length,
+          subcoordinates, // coordinates[i]
+          j, // subcoordinates.index
+          m; // subcoordinates.length
+      while (++i < n) {
+        subcoordinates = coordinates[i];
+        j = -1;
+        m = subcoordinates.length;
+        path.push("M");
+        while (++j < m) path.push(project(subcoordinates[j]), "L");
+        path[path.length - 1] = "Z";
+      }
+      return path.join("");
+    },
+
+    MultiPolygon: function(o) {
+      var path = [],
+          coordinates = o.coordinates,
+          i = -1, // coordinates index
+          n = coordinates.length,
+          subcoordinates, // coordinates[i]
+          j, // subcoordinates index
+          m, // subcoordinates.length
+          subsubcoordinates, // subcoordinates[j]
+          k, // subsubcoordinates index
+          p; // subsubcoordinates.length
+      while (++i < n) {
+        subcoordinates = coordinates[i];
+        j = -1;
+        m = subcoordinates.length;
+        while (++j < m) {
+          subsubcoordinates = subcoordinates[j];
+          k = -1;
+          p = subsubcoordinates.length - 1;
+          path.push("M");
+          while (++k < p) path.push(project(subsubcoordinates[k]), "L");
+          path[path.length - 1] = "Z";
+        }
+      }
+      return path.join("");
+    },
+
+    GeometryCollection: function(o) {
+      var path = [],
+          geometries = o.geometries,
+          i = -1, // geometries index
+          n = geometries.length;
+      while (++i < n) path.push(d3_geo_pathType(pathTypes, geometries[i]));
+      return path.join("");
+    }
+
+  };
+
+  var areaTypes = {
+
+    FeatureCollection: function(f) {
+      var area = 0,
+          features = f.features,
+          i = -1, // features.index
+          n = features.length;
+      while (++i < n) area += d3_geo_pathType(areaTypes, features[i]);
+      return area;
+    },
+
+    Feature: function(f) {
+      return d3_geo_pathType(areaTypes, f.geometry);
+    },
+
+    Point: d3_geo_pathZero,
+    MultiPoint: d3_geo_pathZero,
+    LineString: d3_geo_pathZero,
+    MultiLineString: d3_geo_pathZero,
+
+    Polygon: function(o) {
+      return polygonArea(o.coordinates);
+    },
+
+    MultiPolygon: function(o) {
+      var sum = 0,
+          coordinates = o.coordinates,
+          i = -1, // coordinates index
+          n = coordinates.length;
+      while (++i < n) sum += polygonArea(coordinates[i]);
+      return sum;
+    },
+
+    GeometryCollection: function(o) {
+      var sum = 0,
+          geometries = o.geometries,
+          i = -1, // geometries index
+          n = geometries.length;
+      while (++i < n) sum += d3_geo_pathType(areaTypes, geometries[i]);
+      return sum;
+    }
+
+  };
+
+  function polygonArea(coordinates) {
+    var sum = area(coordinates[0]), // exterior ring
+        i = 0, // coordinates.index
+        n = coordinates.length;
+    while (++i < n) sum -= area(coordinates[i]); // holes
+    return sum;
+  }
+
+  function polygonCentroid(coordinates) {
+    var polygon = d3.geom.polygon(coordinates[0].map(projection)), // exterior ring
+        centroid = polygon.centroid(1),
+        x = centroid[0],
+        y = centroid[1],
+        z = Math.abs(polygon.area()),
+        i = 0, // coordinates index
+        n = coordinates.length;
+    while (++i < n) {
+      polygon = d3.geom.polygon(coordinates[i].map(projection)); // holes
+      centroid = polygon.centroid(1);
+      x -= centroid[0];
+      y -= centroid[1];
+      z -= Math.abs(polygon.area());
+    }
+    return [x, y, 6 * z]; // weighted centroid
+  }
+
+  var centroidTypes = {
+
+    // TODO FeatureCollection
+    // TODO Point
+    // TODO MultiPoint
+    // TODO LineString
+    // TODO MultiLineString
+    // TODO GeometryCollection
+
+    Feature: function(f) {
+      return d3_geo_pathType(centroidTypes, f.geometry);
+    },
+
+    Polygon: function(o) {
+      var centroid = polygonCentroid(o.coordinates);
+      return [centroid[0] / centroid[2], centroid[1] / centroid[2]];
+    },
+
+    MultiPolygon: function(o) {
+      var area = 0,
+          coordinates = o.coordinates,
+          centroid,
+          x = 0,
+          y = 0,
+          z = 0,
+          i = -1, // coordinates index
+          n = coordinates.length;
+      while (++i < n) {
+        centroid = polygonCentroid(coordinates[i]);
+        x += centroid[0];
+        y += centroid[1];
+        z += centroid[2];
+      }
+      return [x / z, y / z];
+    }
+
+  };
+
+
+  function area(coordinates) {
+    return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());
+  }
+
+  path.projection = function(x) {
+    projection = x;
+    return path;
+  };
+
+  path.area = function(d) {
+    return d3_geo_pathType(areaTypes, d);
+  };
+
+  path.centroid = function(d) {
+    return d3_geo_pathType(centroidTypes, d);
+  };
+
+  path.pointRadius = function(x) {
+    if (typeof x === "function") pointRadius = x;
+    else {
+      pointRadius = +x;
+      pointCircle = d3_path_circle(pointRadius);
+    }
+    return path;
+  };
+
+  return path;
+};
+
+function d3_path_circle(radius) {
+  return "m0," + radius
+      + "a" + radius + "," + radius + " 0 1,1 0," + (-2 * radius)
+      + "a" + radius + "," + radius + " 0 1,1 0," + (+2 * radius)
+      + "z";
+}
+
+function d3_geo_pathZero() {
+  return 0;
+}
+
+function d3_geo_pathType(types, o) {
+  return o && o.type in types ? types[o.type](o) : "";
+}
Index: Dev/branches/Demo/d3/src/geom/contour.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/contour.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/contour.js	(revision 225)
@@ -0,0 +1,78 @@
+/**
+ * Computes a contour for a given input grid function using the <a
+ * href="http://en.wikipedia.org/wiki/Marching_squares">marching
+ * squares</a> algorithm. Returns the contour polygon as an array of points.
+ *
+ * @param grid a two-input function(x, y) that returns true for values
+ * inside the contour and false for values outside the contour.
+ * @param start an optional starting point [x, y] on the grid.
+ * @returns polygon [[x1, y1], [x2, y2], âŠ]
+ */
+d3.geom.contour = function(grid, start) {
+  var s = start || d3_geom_contourStart(grid), // starting point
+      c = [],    // contour polygon
+      x = s[0],  // current x position
+      y = s[1],  // current y position
+      dx = 0,    // next x direction
+      dy = 0,    // next y direction
+      pdx = NaN, // previous x direction
+      pdy = NaN, // previous y direction
+      i = 0;
+
+  do {
+    // determine marching squares index
+    i = 0;
+    if (grid(x-1, y-1)) i += 1;
+    if (grid(x,   y-1)) i += 2;
+    if (grid(x-1, y  )) i += 4;
+    if (grid(x,   y  )) i += 8;
+
+    // determine next direction
+    if (i === 6) {
+      dx = pdy === -1 ? -1 : 1;
+      dy = 0;
+    } else if (i === 9) {
+      dx = 0;
+      dy = pdx === 1 ? -1 : 1;
+    } else {
+      dx = d3_geom_contourDx[i];
+      dy = d3_geom_contourDy[i];
+    }
+
+    // update contour polygon
+    if (dx != pdx && dy != pdy) {
+      c.push([x, y]);
+      pdx = dx;
+      pdy = dy;
+    }
+
+    x += dx;
+    y += dy;
+  } while (s[0] != x || s[1] != y);
+
+  return c;
+};
+
+// lookup tables for marching directions
+var d3_geom_contourDx = [1, 0, 1, 1,-1, 0,-1, 1,0, 0,0,0,-1, 0,-1,NaN],
+    d3_geom_contourDy = [0,-1, 0, 0, 0,-1, 0, 0,1,-1,1,1, 0,-1, 0,NaN];
+
+function d3_geom_contourStart(grid) {
+  var x = 0,
+      y = 0;
+
+  // search for a starting point; begin at origin
+  // and proceed along outward-expanding diagonals
+  while (true) {
+    if (grid(x,y)) {
+      return [x,y];
+    }
+    if (x === 0) {
+      x = y + 1;
+      y = 0;
+    } else {
+      x = x - 1;
+      y = y + 1;
+    }
+  }
+}
Index: Dev/branches/Demo/d3/src/geom/delaunay.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/delaunay.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/delaunay.js	(revision 225)
@@ -0,0 +1,31 @@
+/**
+* @param vertices [[x1, y1], [x2, y2], âŠ]
+* @returns triangles [[[x1, y1], [x2, y2], [x3, y3]], âŠ]
+ */
+d3.geom.delaunay = function(vertices) {
+  var edges = vertices.map(function() { return []; }),
+      triangles = [];
+
+  // Use the Voronoi tessellation to determine Delaunay edges.
+  d3_voronoi_tessellate(vertices, function(e) {
+    edges[e.region.l.index].push(vertices[e.region.r.index]);
+  });
+
+  // Reconnect the edges into counterclockwise triangles.
+  edges.forEach(function(edge, i) {
+    var v = vertices[i],
+        cx = v[0],
+        cy = v[1];
+    edge.forEach(function(v) {
+      v.angle = Math.atan2(v[0] - cx, v[1] - cy);
+    });
+    edge.sort(function(a, b) {
+      return a.angle - b.angle;
+    });
+    for (var j = 0, m = edge.length - 1; j < m; j++) {
+      triangles.push([v, edge[j], edge[j + 1]]);
+    }
+  });
+
+  return triangles;
+};
Index: Dev/branches/Demo/d3/src/geom/geom.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/geom.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/geom.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.geom = {};
Index: Dev/branches/Demo/d3/src/geom/hull.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/hull.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/hull.js	(revision 225)
@@ -0,0 +1,98 @@
+/**
+ * Computes the 2D convex hull of a set of points using Graham's scanning
+ * algorithm. The algorithm has been implemented as described in Cormen,
+ * Leiserson, and Rivest's Introduction to Algorithms. The running time of
+ * this algorithm is O(n log n), where n is the number of input points.
+ *
+ * @param vertices [[x1, y1], [x2, y2], âŠ]
+ * @returns polygon [[x1, y1], [x2, y2], âŠ]
+ */
+d3.geom.hull = function(vertices) {
+  if (vertices.length < 3) return [];
+
+  var len = vertices.length,
+      plen = len - 1,
+      points = [],
+      stack = [],
+      i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
+
+  // find the starting ref point: leftmost point with the minimum y coord
+  for (i=1; i<len; ++i) {
+    if (vertices[i][1] < vertices[h][1]) {
+      h = i;
+    } else if (vertices[i][1] == vertices[h][1]) {
+      h = (vertices[i][0] < vertices[h][0] ? i : h);
+    }
+  }
+
+  // calculate polar angles from ref point and sort
+  for (i=0; i<len; ++i) {
+    if (i === h) continue;
+    y1 = vertices[i][1] - vertices[h][1];
+    x1 = vertices[i][0] - vertices[h][0];
+    points.push({angle: Math.atan2(y1, x1), index: i});
+  }
+  points.sort(function(a, b) { return a.angle - b.angle; });
+
+  // toss out duplicate angles
+  a = points[0].angle;
+  v = points[0].index;
+  u = 0;
+  for (i=1; i<plen; ++i) {
+    j = points[i].index;
+    if (a == points[i].angle) {
+      // keep angle for point most distant from the reference
+      x1 = vertices[v][0] - vertices[h][0];
+      y1 = vertices[v][1] - vertices[h][1];
+      x2 = vertices[j][0] - vertices[h][0];
+      y2 = vertices[j][1] - vertices[h][1];
+      if ((x1*x1 + y1*y1) >= (x2*x2 + y2*y2)) {
+        points[i].index = -1;
+      } else {
+        points[u].index = -1;
+        a = points[i].angle;
+        u = i;
+        v = j;
+      }
+    } else {
+      a = points[i].angle;
+      u = i;
+      v = j;
+    }
+  }
+
+  // initialize the stack
+  stack.push(h);
+  for (i=0, j=0; i<2; ++j) {
+    if (points[j].index !== -1) {
+      stack.push(points[j].index);
+      i++;
+    }
+  }
+  sp = stack.length;
+
+  // do graham's scan
+  for (; j<plen; ++j) {
+    if (points[j].index === -1) continue; // skip tossed out points
+    while (!d3_geom_hullCCW(stack[sp-2], stack[sp-1], points[j].index, vertices)) {
+      --sp;
+    }
+    stack[sp++] = points[j].index;
+  }
+
+  // construct the hull
+  var poly = [];
+  for (i=0; i<sp; ++i) {
+    poly.push(vertices[stack[i]]);
+  }
+  return poly;
+}
+
+// are three points in counter-clockwise order?
+function d3_geom_hullCCW(i1, i2, i3, v) {
+  var t, a, b, c, d, e, f;
+  t = v[i1]; a = t[0]; b = t[1];
+  t = v[i2]; c = t[0]; d = t[1];
+  t = v[i3]; e = t[0]; f = t[1];
+  return ((f-b)*(c-a) - (d-b)*(e-a)) > 0;
+}
Index: Dev/branches/Demo/d3/src/geom/polygon.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/polygon.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/polygon.js	(revision 225)
@@ -0,0 +1,88 @@
+// Note: requires coordinates to be counterclockwise and convex!
+d3.geom.polygon = function(coordinates) {
+
+  coordinates.area = function() {
+    var i = 0,
+        n = coordinates.length,
+        a = coordinates[n - 1][0] * coordinates[0][1],
+        b = coordinates[n - 1][1] * coordinates[0][0];
+    while (++i < n) {
+      a += coordinates[i - 1][0] * coordinates[i][1];
+      b += coordinates[i - 1][1] * coordinates[i][0];
+    }
+    return (b - a) * .5;
+  };
+
+  coordinates.centroid = function(k) {
+    var i = -1,
+        n = coordinates.length - 1,
+        x = 0,
+        y = 0,
+        a,
+        b,
+        c;
+    if (!arguments.length) k = 1 / (6 * coordinates.area());
+    while (++i < n) {
+      a = coordinates[i];
+      b = coordinates[i + 1];
+      c = a[0] * b[1] - b[0] * a[1];
+      x += (a[0] + b[0]) * c;
+      y += (a[1] + b[1]) * c;
+    }
+    return [x * k, y * k];
+  };
+
+  // The Sutherland-Hodgman clipping algorithm.
+  coordinates.clip = function(subject) {
+    var input,
+        i = -1,
+        n = coordinates.length,
+        j,
+        m,
+        a = coordinates[n - 1],
+        b,
+        c,
+        d;
+    while (++i < n) {
+      input = subject.slice();
+      subject.length = 0;
+      b = coordinates[i];
+      c = input[(m = input.length) - 1];
+      j = -1;
+      while (++j < m) {
+        d = input[j];
+        if (d3_geom_polygonInside(d, a, b)) {
+          if (!d3_geom_polygonInside(c, a, b)) {
+            subject.push(d3_geom_polygonIntersect(c, d, a, b));
+          }
+          subject.push(d);
+        } else if (d3_geom_polygonInside(c, a, b)) {
+          subject.push(d3_geom_polygonIntersect(c, d, a, b));
+        }
+        c = d;
+      }
+      a = b;
+    }
+    return subject;
+  };
+
+  return coordinates;
+};
+
+function d3_geom_polygonInside(p, a, b) {
+  return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
+}
+
+// Intersect two infinite lines cd and ab.
+function d3_geom_polygonIntersect(c, d, a, b) {
+  var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0],
+      y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1],
+      x13 = x1 - x3,
+      x21 = x2 - x1,
+      x43 = x4 - x3,
+      y13 = y1 - y3,
+      y21 = y2 - y1,
+      y43 = y4 - y3,
+      ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
+  return [x1 + ua * x21, y1 + ua * y21];
+}
Index: Dev/branches/Demo/d3/src/geom/quadtree.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/quadtree.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/quadtree.js	(revision 225)
@@ -0,0 +1,129 @@
+// Constructs a new quadtree for the specified array of points. A quadtree is a
+// two-dimensional recursive spatial subdivision. This implementation uses
+// square partitions, dividing each square into four equally-sized squares. Each
+// point exists in a unique node; if multiple points are in the same position,
+// some points may be stored on internal nodes rather than leaf nodes. Quadtrees
+// can be used to accelerate various spatial operations, such as the Barnes-Hut
+// approximation for computing n-body forces, or collision detection.
+d3.geom.quadtree = function(points, x1, y1, x2, y2) {
+  var p,
+      i = -1,
+      n = points.length;
+
+  // Type conversion for deprecated API.
+  if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);
+
+  // Allow bounds to be specified explicitly.
+  if (arguments.length < 5) {
+    if (arguments.length === 3) {
+      y2 = x2 = y1;
+      y1 = x1;
+    } else {
+      x1 = y1 = Infinity;
+      x2 = y2 = -Infinity;
+
+      // Compute bounds.
+      while (++i < n) {
+        p = points[i];
+        if (p.x < x1) x1 = p.x;
+        if (p.y < y1) y1 = p.y;
+        if (p.x > x2) x2 = p.x;
+        if (p.y > y2) y2 = p.y;
+      }
+
+      // Squarify the bounds.
+      var dx = x2 - x1,
+          dy = y2 - y1;
+      if (dx > dy) y2 = y1 + dx;
+      else x2 = x1 + dy;
+    }
+  }
+
+  // Recursively inserts the specified point p at the node n or one of its
+  // descendants. The bounds are defined by [x1, x2] and [y1, y2].
+  function insert(n, p, x1, y1, x2, y2) {
+    if (isNaN(p.x) || isNaN(p.y)) return; // ignore invalid points
+    if (n.leaf) {
+      var v = n.point;
+      if (v) {
+        // If the point at this leaf node is at the same position as the new
+        // point we are adding, we leave the point associated with the
+        // internal node while adding the new point to a child node. This
+        // avoids infinite recursion.
+        if ((Math.abs(v.x - p.x) + Math.abs(v.y - p.y)) < .01) {
+          insertChild(n, p, x1, y1, x2, y2);
+        } else {
+          n.point = null;
+          insertChild(n, v, x1, y1, x2, y2);
+          insertChild(n, p, x1, y1, x2, y2);
+        }
+      } else {
+        n.point = p;
+      }
+    } else {
+      insertChild(n, p, x1, y1, x2, y2);
+    }
+  }
+
+  // Recursively inserts the specified point p into a descendant of node n. The
+  // bounds are defined by [x1, x2] and [y1, y2].
+  function insertChild(n, p, x1, y1, x2, y2) {
+    // Compute the split point, and the quadrant in which to insert p.
+    var sx = (x1 + x2) * .5,
+        sy = (y1 + y2) * .5,
+        right = p.x >= sx,
+        bottom = p.y >= sy,
+        i = (bottom << 1) + right;
+
+    // Recursively insert into the child node.
+    n.leaf = false;
+    n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
+
+    // Update the bounds as we recurse.
+    if (right) x1 = sx; else x2 = sx;
+    if (bottom) y1 = sy; else y2 = sy;
+    insert(n, p, x1, y1, x2, y2);
+  }
+
+  // Create the root node.
+  var root = d3_geom_quadtreeNode();
+
+  root.add = function(p) {
+    insert(root, p, x1, y1, x2, y2);
+  };
+
+  root.visit = function(f) {
+    d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
+  };
+
+  // Insert all points.
+  points.forEach(root.add);
+  return root;
+};
+
+function d3_geom_quadtreeNode() {
+  return {
+    leaf: true,
+    nodes: [],
+    point: null
+  };
+}
+
+function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
+  if (!f(node, x1, y1, x2, y2)) {
+    var sx = (x1 + x2) * .5,
+        sy = (y1 + y2) * .5,
+        children = node.nodes;
+    if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
+    if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
+    if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
+    if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
+  }
+}
+
+function d3_geom_quadtreePoint(p) {
+  return {
+    x: p[0],
+    y: p[1]
+  };
+}
Index: Dev/branches/Demo/d3/src/geom/voronoi.js
===================================================================
--- Dev/branches/Demo/d3/src/geom/voronoi.js	(revision 225)
+++ Dev/branches/Demo/d3/src/geom/voronoi.js	(revision 225)
@@ -0,0 +1,399 @@
+// Adapted from Nicolas Garcia Belmonte's JIT implementation:
+// http://blog.thejit.org/2010/02/12/voronoi-tessellation/
+// http://blog.thejit.org/assets/voronoijs/voronoi.js
+// See lib/jit/LICENSE for details.
+
+/**
+ * @param vertices [[x1, y1], [x2, y2], âŠ]
+ * @returns polygons [[[x1, y1], [x2, y2], âŠ], âŠ]
+ */
+d3.geom.voronoi = function(vertices) {
+  var polygons = vertices.map(function() { return []; });
+
+  // Note: we expect the caller to clip the polygons, if needed.
+  d3_voronoi_tessellate(vertices, function(e) {
+    var s1,
+        s2,
+        x1,
+        x2,
+        y1,
+        y2;
+    if (e.a === 1 && e.b >= 0) {
+      s1 = e.ep.r;
+      s2 = e.ep.l;
+    } else {
+      s1 = e.ep.l;
+      s2 = e.ep.r;
+    }
+    if (e.a === 1) {
+      y1 = s1 ? s1.y : -1e6;
+      x1 = e.c - e.b * y1;
+      y2 = s2 ? s2.y : 1e6;
+      x2 = e.c - e.b * y2;
+    } else {
+      x1 = s1 ? s1.x : -1e6;
+      y1 = e.c - e.a * x1;
+      x2 = s2 ? s2.x : 1e6;
+      y2 = e.c - e.a * x2;
+    }
+    var v1 = [x1, y1],
+        v2 = [x2, y2];
+    polygons[e.region.l.index].push(v1, v2);
+    polygons[e.region.r.index].push(v1, v2);
+  });
+
+  // Reconnect the polygon segments into counterclockwise loops.
+  return polygons.map(function(polygon, i) {
+    var cx = vertices[i][0],
+        cy = vertices[i][1];
+    polygon.forEach(function(v) {
+      v.angle = Math.atan2(v[0] - cx, v[1] - cy);
+    });
+    return polygon.sort(function(a, b) {
+      return a.angle - b.angle;
+    }).filter(function(d, i) {
+      return !i || (d.angle - polygon[i - 1].angle > 1e-10);
+    });
+  });
+};
+
+var d3_voronoi_opposite = {"l": "r", "r": "l"};
+
+function d3_voronoi_tessellate(vertices, callback) {
+
+  var Sites = {
+    list: vertices
+      .map(function(v, i) {
+        return {
+          index: i,
+          x: v[0],
+          y: v[1]
+        };
+      })
+      .sort(function(a, b) {
+        return a.y < b.y ? -1
+          : a.y > b.y ? 1
+          : a.x < b.x ? -1
+          : a.x > b.x ? 1
+          : 0;
+      }),
+    bottomSite: null
+  };
+
+  var EdgeList = {
+    list: [],
+    leftEnd: null,
+    rightEnd: null,
+
+    init: function() {
+      EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
+      EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
+      EdgeList.leftEnd.r = EdgeList.rightEnd;
+      EdgeList.rightEnd.l = EdgeList.leftEnd;
+      EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
+    },
+
+    createHalfEdge: function(edge, side) {
+      return {
+        edge: edge,
+        side: side,
+        vertex: null,
+        "l": null,
+        "r": null
+      };
+    },
+
+    insert: function(lb, he) {
+      he.l = lb;
+      he.r = lb.r;
+      lb.r.l = he;
+      lb.r = he;
+    },
+
+    leftBound: function(p) {
+      var he = EdgeList.leftEnd;
+      do {
+        he = he.r;
+      } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
+      he = he.l;
+      return he;
+    },
+
+    del: function(he) {
+      he.l.r = he.r;
+      he.r.l = he.l;
+      he.edge = null;
+    },
+
+    right: function(he) {
+      return he.r;
+    },
+
+    left: function(he) {
+      return he.l;
+    },
+
+    leftRegion: function(he) {
+      return he.edge == null
+          ? Sites.bottomSite
+          : he.edge.region[he.side];
+    },
+
+    rightRegion: function(he) {
+      return he.edge == null
+          ? Sites.bottomSite
+          : he.edge.region[d3_voronoi_opposite[he.side]];
+    }
+  };
+
+  var Geom = {
+
+    bisect: function(s1, s2) {
+      var newEdge = {
+        region: {"l": s1, "r": s2},
+        ep: {"l": null, "r": null}
+      };
+
+      var dx = s2.x - s1.x,
+          dy = s2.y - s1.y,
+          adx = dx > 0 ? dx : -dx,
+          ady = dy > 0 ? dy : -dy;
+
+      newEdge.c = s1.x * dx + s1.y * dy
+          + (dx * dx + dy * dy) * .5;
+
+      if (adx > ady) {
+        newEdge.a = 1;
+        newEdge.b = dy / dx;
+        newEdge.c /= dx;
+      } else {
+        newEdge.b = 1;
+        newEdge.a = dx / dy;
+        newEdge.c /= dy;
+      }
+
+      return newEdge;
+    },
+
+    intersect: function(el1, el2) {
+      var e1 = el1.edge,
+          e2 = el2.edge;
+      if (!e1 || !e2 || (e1.region.r == e2.region.r)) {
+        return null;
+      }
+      var d = (e1.a * e2.b) - (e1.b * e2.a);
+      if (Math.abs(d) < 1e-10) {
+        return null;
+      }
+      var xint = (e1.c * e2.b - e2.c * e1.b) / d,
+          yint = (e2.c * e1.a - e1.c * e2.a) / d,
+          e1r = e1.region.r,
+          e2r = e2.region.r,
+          el,
+          e;
+      if ((e1r.y < e2r.y) ||
+         (e1r.y == e2r.y && e1r.x < e2r.x)) {
+        el = el1;
+        e = e1;
+      } else {
+        el = el2;
+        e = e2;
+      }
+      var rightOfSite = (xint >= e.region.r.x);
+      if ((rightOfSite && (el.side === "l")) ||
+        (!rightOfSite && (el.side === "r"))) {
+        return null;
+      }
+      return {
+        x: xint,
+        y: yint
+      };
+    },
+
+    rightOf: function(he, p) {
+      var e = he.edge,
+          topsite = e.region.r,
+          rightOfSite = (p.x > topsite.x);
+
+      if (rightOfSite && (he.side === "l")) {
+        return 1;
+      }
+      if (!rightOfSite && (he.side === "r")) {
+        return 0;
+      }
+      if (e.a === 1) {
+        var dyp = p.y - topsite.y,
+            dxp = p.x - topsite.x,
+            fast = 0,
+            above = 0;
+
+        if ((!rightOfSite && (e.b < 0)) ||
+          (rightOfSite && (e.b >= 0))) {
+          above = fast = (dyp >= e.b * dxp);
+        } else {
+          above = ((p.x + p.y * e.b) > e.c);
+          if (e.b < 0) {
+            above = !above;
+          }
+          if (!above) {
+            fast = 1;
+          }
+        }
+        if (!fast) {
+          var dxs = topsite.x - e.region.l.x;
+          above = (e.b * (dxp * dxp - dyp * dyp)) <
+            (dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b));
+
+          if (e.b < 0) {
+            above = !above;
+          }
+        }
+      } else /* e.b == 1 */ {
+        var yl = e.c - e.a * p.x,
+            t1 = p.y - yl,
+            t2 = p.x - topsite.x,
+            t3 = yl - topsite.y;
+
+        above = (t1 * t1) > (t2 * t2 + t3 * t3);
+      }
+      return he.side === "l" ? above : !above;
+    },
+
+    endPoint: function(edge, side, site) {
+      edge.ep[side] = site;
+      if (!edge.ep[d3_voronoi_opposite[side]]) return;
+      callback(edge);
+    },
+
+    distance: function(s, t) {
+      var dx = s.x - t.x,
+          dy = s.y - t.y;
+      return Math.sqrt(dx * dx + dy * dy);
+    }
+  };
+
+  var EventQueue = {
+    list: [],
+
+    insert: function(he, site, offset) {
+      he.vertex = site;
+      he.ystar = site.y + offset;
+      for (var i=0, list=EventQueue.list, l=list.length; i<l; i++) {
+        var next = list[i];
+        if (he.ystar > next.ystar ||
+          (he.ystar == next.ystar &&
+          site.x > next.vertex.x)) {
+          continue;
+        } else {
+          break;
+        }
+      }
+      list.splice(i, 0, he);
+    },
+
+    del: function(he) {
+      for (var i=0, ls=EventQueue.list, l=ls.length; i<l && (ls[i] != he); ++i) {}
+      ls.splice(i, 1);
+    },
+
+    empty: function() { return EventQueue.list.length === 0; },
+
+    nextEvent: function(he) {
+      for (var i=0, ls=EventQueue.list, l=ls.length; i<l; ++i) {
+        if (ls[i] == he) return ls[i+1];
+      }
+      return null;
+    },
+
+    min: function() {
+      var elem = EventQueue.list[0];
+      return {
+        x: elem.vertex.x,
+        y: elem.ystar
+      };
+    },
+
+    extractMin: function() {
+      return EventQueue.list.shift();
+    }
+  };
+
+  EdgeList.init();
+  Sites.bottomSite = Sites.list.shift();
+
+  var newSite = Sites.list.shift(), newIntStar;
+  var lbnd, rbnd, llbnd, rrbnd, bisector;
+  var bot, top, temp, p, v;
+  var e, pm;
+
+  while (true) {
+    if (!EventQueue.empty()) {
+      newIntStar = EventQueue.min();
+    }
+    if (newSite && (EventQueue.empty()
+      || newSite.y < newIntStar.y
+      || (newSite.y == newIntStar.y
+      && newSite.x < newIntStar.x))) { //new site is smallest
+      lbnd = EdgeList.leftBound(newSite);
+      rbnd = EdgeList.right(lbnd);
+      bot = EdgeList.rightRegion(lbnd);
+      e = Geom.bisect(bot, newSite);
+      bisector = EdgeList.createHalfEdge(e, "l");
+      EdgeList.insert(lbnd, bisector);
+      p = Geom.intersect(lbnd, bisector);
+      if (p) {
+        EventQueue.del(lbnd);
+        EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
+      }
+      lbnd = bisector;
+      bisector = EdgeList.createHalfEdge(e, "r");
+      EdgeList.insert(lbnd, bisector);
+      p = Geom.intersect(bisector, rbnd);
+      if (p) {
+        EventQueue.insert(bisector, p, Geom.distance(p, newSite));
+      }
+      newSite = Sites.list.shift();
+    } else if (!EventQueue.empty()) { //intersection is smallest
+      lbnd = EventQueue.extractMin();
+      llbnd = EdgeList.left(lbnd);
+      rbnd = EdgeList.right(lbnd);
+      rrbnd = EdgeList.right(rbnd);
+      bot = EdgeList.leftRegion(lbnd);
+      top = EdgeList.rightRegion(rbnd);
+      v = lbnd.vertex;
+      Geom.endPoint(lbnd.edge, lbnd.side, v);
+      Geom.endPoint(rbnd.edge, rbnd.side, v);
+      EdgeList.del(lbnd);
+      EventQueue.del(rbnd);
+      EdgeList.del(rbnd);
+      pm = "l";
+      if (bot.y > top.y) {
+        temp = bot;
+        bot = top;
+        top = temp;
+        pm = "r";
+      }
+      e = Geom.bisect(bot, top);
+      bisector = EdgeList.createHalfEdge(e, pm);
+      EdgeList.insert(llbnd, bisector);
+      Geom.endPoint(e, d3_voronoi_opposite[pm], v);
+      p = Geom.intersect(llbnd, bisector);
+      if (p) {
+        EventQueue.del(llbnd);
+        EventQueue.insert(llbnd, p, Geom.distance(p, bot));
+      }
+      p = Geom.intersect(bisector, rrbnd);
+      if (p) {
+        EventQueue.insert(bisector, p, Geom.distance(p, bot));
+      }
+    } else {
+      break;
+    }
+  }//end while
+
+  for (lbnd = EdgeList.right(EdgeList.leftEnd);
+      lbnd != EdgeList.rightEnd;
+      lbnd = EdgeList.right(lbnd)) {
+    callback(lbnd.edge);
+  }
+}
Index: Dev/branches/Demo/d3/src/layout/bundle.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/bundle.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/bundle.js	(revision 225)
@@ -0,0 +1,57 @@
+// Implements hierarchical edge bundling using Holten's algorithm. For each
+// input link, a path is computed that travels through the tree, up the parent
+// hierarchy to the least common ancestor, and then back down to the destination
+// node. Each path is simply an array of nodes.
+d3.layout.bundle = function() {
+  return function(links) {
+    var paths = [],
+        i = -1,
+        n = links.length;
+    while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
+    return paths;
+  };
+};
+
+function d3_layout_bundlePath(link) {
+  var start = link.source,
+      end = link.target,
+      lca = d3_layout_bundleLeastCommonAncestor(start, end),
+      points = [start];
+  while (start !== lca) {
+    start = start.parent;
+    points.push(start);
+  }
+  var k = points.length;
+  while (end !== lca) {
+    points.splice(k, 0, end);
+    end = end.parent;
+  }
+  return points;
+}
+
+function d3_layout_bundleAncestors(node) {
+  var ancestors = [],
+      parent = node.parent;
+  while (parent != null) {
+    ancestors.push(node);
+    node = parent;
+    parent = parent.parent;
+  }
+  ancestors.push(node);
+  return ancestors;
+}
+
+function d3_layout_bundleLeastCommonAncestor(a, b) {
+  if (a === b) return a;
+  var aNodes = d3_layout_bundleAncestors(a),
+      bNodes = d3_layout_bundleAncestors(b),
+      aNode = aNodes.pop(),
+      bNode = bNodes.pop(),
+      sharedNode = null;
+  while (aNode === bNode) {
+    sharedNode = aNode;
+    aNode = aNodes.pop();
+    bNode = bNodes.pop();
+  }
+  return sharedNode;
+}
Index: Dev/branches/Demo/d3/src/layout/chord.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/chord.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/chord.js	(revision 225)
@@ -0,0 +1,148 @@
+d3.layout.chord = function() {
+  var chord = {},
+      chords,
+      groups,
+      matrix,
+      n,
+      padding = 0,
+      sortGroups,
+      sortSubgroups,
+      sortChords;
+
+  function relayout() {
+    var subgroups = {},
+        groupSums = [],
+        groupIndex = d3.range(n),
+        subgroupIndex = [],
+        k,
+        x,
+        x0,
+        i,
+        j;
+
+    chords = [];
+    groups = [];
+
+    // Compute the sum.
+    k = 0, i = -1; while (++i < n) {
+      x = 0, j = -1; while (++j < n) {
+        x += matrix[i][j];
+      }
+      groupSums.push(x);
+      subgroupIndex.push(d3.range(n));
+      k += x;
+    }
+
+    // Sort groupsâŠ
+    if (sortGroups) {
+      groupIndex.sort(function(a, b) {
+        return sortGroups(groupSums[a], groupSums[b]);
+      });
+    }
+
+    // Sort subgroupsâŠ
+    if (sortSubgroups) {
+      subgroupIndex.forEach(function(d, i) {
+        d.sort(function(a, b) {
+          return sortSubgroups(matrix[i][a], matrix[i][b]);
+        });
+      });
+    }
+
+    // Convert the sum to scaling factor for [0, 2pi].
+    // TODO Allow start and end angle to be specified.
+    // TODO Allow padding to be specified as percentage?
+    k = (2 * Math.PI - padding * n) / k;
+
+    // Compute the start and end angle for each group and subgroup.
+    x = 0, i = -1; while (++i < n) {
+      x0 = x, j = -1; while (++j < n) {
+        var di = groupIndex[i],
+            dj = subgroupIndex[i][j],
+            v = matrix[di][dj];
+        subgroups[di + "-" + dj] = {
+          index: di,
+          subindex: dj,
+          startAngle: x,
+          endAngle: x += v * k,
+          value: v
+        };
+      }
+      groups.push({
+        index: di,
+        startAngle: x0,
+        endAngle: x,
+        value: (x - x0) / k
+      });
+      x += padding;
+    }
+
+    // Generate chords for each (non-empty) subgroup-subgroup link.
+    i = -1; while (++i < n) {
+      j = i - 1; while (++j < n) {
+        var source = subgroups[i + "-" + j],
+            target = subgroups[j + "-" + i];
+        if (source.value || target.value) {
+          chords.push(source.value < target.value
+              ? {source: target, target: source}
+              : {source: source, target: target})
+        }
+      }
+    }
+
+    if (sortChords) resort();
+  }
+
+  function resort() {
+    chords.sort(function(a, b) {
+      return sortChords(a.target.value, b.target.value);
+    });
+  }
+
+  chord.matrix = function(x) {
+    if (!arguments.length) return matrix;
+    n = (matrix = x) && matrix.length;
+    chords = groups = null;
+    return chord;
+  };
+
+  chord.padding = function(x) {
+    if (!arguments.length) return padding;
+    padding = x;
+    chords = groups = null;
+    return chord;
+  };
+
+  chord.sortGroups = function(x) {
+    if (!arguments.length) return sortGroups;
+    sortGroups = x;
+    chords = groups = null;
+    return chord;
+  };
+
+  chord.sortSubgroups = function(x) {
+    if (!arguments.length) return sortSubgroups;
+    sortSubgroups = x;
+    chords = null;
+    return chord;
+  };
+
+  chord.sortChords = function(x) {
+    if (!arguments.length) return sortChords;
+    sortChords = x;
+    if (chords) resort();
+    return chord;
+  };
+
+  chord.chords = function() {
+    if (!chords) relayout();
+    return chords;
+  };
+
+  chord.groups = function() {
+    if (!groups) relayout();
+    return groups;
+  };
+
+  return chord;
+};
Index: Dev/branches/Demo/d3/src/layout/cluster.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/cluster.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/cluster.js	(revision 225)
@@ -0,0 +1,77 @@
+// Implements a hierarchical layout using the cluster (or dendogram) algorithm.
+d3.layout.cluster = function() {
+  var hierarchy = d3.layout.hierarchy().sort(null).value(null),
+      separation = d3_layout_treeSeparation,
+      size = [1, 1]; // width, height
+
+  function cluster(d, i) {
+    var nodes = hierarchy.call(this, d, i),
+        root = nodes[0],
+        previousNode,
+        x = 0,
+        kx,
+        ky;
+
+    // First walk, computing the initial x & y values.
+    d3_layout_treeVisitAfter(root, function(node) {
+      if (node.children) {
+        node.x = d3_layout_clusterX(node.children);
+        node.y = d3_layout_clusterY(node.children);
+      } else {
+        node.x = previousNode ? x += separation(node, previousNode) : 0;
+        node.y = 0;
+        previousNode = node;
+      }
+    });
+
+    // Compute the left-most, right-most, and depth-most nodes for extents.
+    var left = d3_layout_clusterLeft(root),
+        right = d3_layout_clusterRight(root),
+        x0 = left.x - separation(left, right) / 2,
+        x1 = right.x + separation(right, left) / 2;
+
+    // Second walk, normalizing x & y to the desired size.
+    d3_layout_treeVisitAfter(root, function(node) {
+      node.x = (node.x - x0) / (x1 - x0) * size[0];
+      node.y = (1 - node.y / root.y) * size[1];
+    });
+
+    return nodes;
+  }
+
+  cluster.separation = function(x) {
+    if (!arguments.length) return separation;
+    separation = x;
+    return cluster;
+  };
+
+  cluster.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return cluster;
+  };
+
+  return d3_layout_hierarchyRebind(cluster, hierarchy);
+};
+
+function d3_layout_clusterY(children) {
+  return 1 + d3.max(children, function(child) {
+    return child.y;
+  });
+}
+
+function d3_layout_clusterX(children) {
+  return children.reduce(function(x, child) {
+    return x + child.x;
+  }, 0) / children.length;
+}
+
+function d3_layout_clusterLeft(node) {
+  var children = node.children;
+  return children ? d3_layout_clusterLeft(children[0]) : node;
+}
+
+function d3_layout_clusterRight(node) {
+  var children = node.children;
+  return children ? d3_layout_clusterRight(children[children.length - 1]) : node;
+}
Index: Dev/branches/Demo/d3/src/layout/force.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/force.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/force.js	(revision 225)
@@ -0,0 +1,390 @@
+// A rudimentary force layout using Gauss-Seidel.
+d3.layout.force = function() {
+  var force = {},
+      event = d3.dispatch("tick"),
+      size = [1, 1],
+      alpha,
+      friction = .9,
+      linkDistance = d3_layout_forceLinkDistance,
+      linkStrength = d3_layout_forceLinkStrength,
+      charge = -30,
+      gravity = .1,
+      theta = .8,
+      interval,
+      nodes = [],
+      links = [],
+      distances,
+      strengths;
+
+  function repulse(node, kc) {
+    return function(quad, x1, y1, x2, y2) {
+      if (quad.point !== node) {
+        var dx = quad.cx - node.x,
+            dy = quad.cy - node.y,
+            dn = 1 / Math.sqrt(dx * dx + dy * dy);
+
+        /* Barnes-Hut criterion. */
+        if ((x2 - x1) * dn < theta) {
+          var k = kc * quad.count * dn * dn;
+          node.x += dx * k;
+          node.y += dy * k;
+          return true;
+        }
+
+        if (quad.point && isFinite(dn)) {
+          var k = kc * dn * dn;
+          node.x += dx * k;
+          node.y += dy * k;
+        }
+      }
+    };
+  }
+
+  function tick() {
+    var n = nodes.length,
+        m = links.length,
+        q = d3.geom.quadtree(nodes),
+        i, // current index
+        o, // current object
+        s, // current source
+        t, // current target
+        l, // current distance
+        x, // x-distance
+        y; // y-distance
+
+    // gauss-seidel relaxation for links
+    for (i = 0; i < m; ++i) {
+      o = links[i];
+      s = o.source;
+      t = o.target;
+      x = t.x - s.x;
+      y = t.y - s.y;
+      if (l = (x * x + y * y)) {
+        l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
+        x *= l;
+        y *= l;
+        t.x -= x;
+        t.y -= y;
+        s.x += x;
+        s.y += y;
+      }
+    }
+
+    // apply gravity forces
+    var kg = alpha * gravity;
+    x = size[0] / 2;
+    y = size[1] / 2;
+    i = -1; while (++i < n) {
+      o = nodes[i];
+      o.x += (x - o.x) * kg;
+      o.y += (y - o.y) * kg;
+    }
+
+    // compute quadtree center of mass
+    d3_layout_forceAccumulate(q);
+
+    // apply charge forces
+    var kc = alpha * charge;
+    i = -1; while (++i < n) {
+      q.visit(repulse(nodes[i], kc));
+    }
+
+    // position verlet integration
+    i = -1; while (++i < n) {
+      o = nodes[i];
+      if (o.fixed) {
+        o.x = o.px;
+        o.y = o.py;
+      } else {
+        o.x -= (o.px - (o.px = o.x)) * friction;
+        o.y -= (o.py - (o.py = o.y)) * friction;
+      }
+    }
+
+    event.tick.dispatch({type: "tick", alpha: alpha});
+
+    // simulated annealing, basically
+    return (alpha *= .99) < .005;
+  }
+
+  force.on = function(type, listener) {
+    event[type].add(listener);
+    return force;
+  };
+
+  force.nodes = function(x) {
+    if (!arguments.length) return nodes;
+    nodes = x;
+    return force;
+  };
+
+  force.links = function(x) {
+    if (!arguments.length) return links;
+    links = x;
+    return force;
+  };
+
+  force.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return force;
+  };
+
+  force.linkDistance = function(x) {
+    if (!arguments.length) return linkDistance;
+    linkDistance = d3.functor(x);
+    return force;
+  };
+
+  // For backwards-compatibility.
+  force.distance = force.linkDistance;
+
+  force.linkStrength = function(x) {
+    if (!arguments.length) return linkStrength;
+    linkStrength = d3.functor(x);
+    return force;
+  };
+
+  force.friction = function(x) {
+    if (!arguments.length) return friction;
+    friction = x;
+    return force;
+  };
+
+  force.charge = function(x) {
+    if (!arguments.length) return charge;
+    charge = x;
+    return force;
+  };
+
+  force.gravity = function(x) {
+    if (!arguments.length) return gravity;
+    gravity = x;
+    return force;
+  };
+
+  force.theta = function(x) {
+    if (!arguments.length) return theta;
+    theta = x;
+    return force;
+  };
+
+  force.start = function() {
+    var i,
+        j,
+        n = nodes.length,
+        m = links.length,
+        w = size[0],
+        h = size[1],
+        neighbors,
+        o;
+
+    for (i = 0; i < n; ++i) {
+      (o = nodes[i]).index = i;
+    }
+
+    distances = [];
+    strengths = [];
+    for (i = 0; i < m; ++i) {
+      o = links[i];
+      if (typeof o.source == "number") o.source = nodes[o.source];
+      if (typeof o.target == "number") o.target = nodes[o.target];
+      distances[i] = linkDistance.call(this, o, i);
+      strengths[i] = linkStrength.call(this, o, i);
+    }
+
+    for (i = 0; i < n; ++i) {
+      o = nodes[i];
+      if (isNaN(o.x)) o.x = position("x", w);
+      if (isNaN(o.y)) o.y = position("y", h);
+      if (isNaN(o.px)) o.px = o.x;
+      if (isNaN(o.py)) o.py = o.y;
+    }
+
+    // initialize node position based on first neighbor
+    function position(dimension, size) {
+      var neighbors = neighbor(i),
+          j = -1,
+          m = neighbors.length,
+          x;
+      while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
+      return Math.random() * size;
+    }
+
+    // initialize neighbors lazily
+    function neighbor() {
+      if (!neighbors) {
+        neighbors = [];
+        for (j = 0; j < n; ++j) {
+          neighbors[j] = [];
+        }
+        for (j = 0; j < m; ++j) {
+          var o = links[j];
+          neighbors[o.source.index].push(o.target);
+          neighbors[o.target.index].push(o.source);
+        }
+      }
+      return neighbors[i];
+    }
+
+    return force.resume();
+  };
+
+  force.resume = function() {
+    alpha = .1;
+    d3.timer(tick);
+    return force;
+  };
+
+  force.stop = function() {
+    alpha = 0;
+    return force;
+  };
+
+  // use `node.call(force.drag)` to make nodes draggable
+  force.drag = function() {
+
+    this
+      .on("mouseover.force", d3_layout_forceDragOver)
+      .on("mouseout.force", d3_layout_forceDragOut)
+      .on("mousedown.force", dragdown)
+      .on("touchstart.force", dragdown);
+
+    d3.select(window)
+      .on("mousemove.force", d3_layout_forceDragMove)
+      .on("touchmove.force", d3_layout_forceDragMove)
+      .on("mouseup.force", d3_layout_forceDragUp, true)
+      .on("touchend.force", d3_layout_forceDragUp, true)
+      .on("click.force", d3_layout_forceDragClick, true);
+
+    return force;
+  };
+
+  function dragdown(d, i) {
+    var m = d3_layout_forcePoint(this.parentNode);
+    (d3_layout_forceDragNode = d).fixed = true;
+    d3_layout_forceDragMoved = false;
+    d3_layout_forceDragElement = this;
+    d3_layout_forceDragForce = force;
+    d3_layout_forceDragOffset = [m[0] - d.x, m[1] - d.y];
+    d3_layout_forceCancel();
+  }
+
+  return force;
+};
+
+var d3_layout_forceDragForce,
+    d3_layout_forceDragNode,
+    d3_layout_forceDragMoved,
+    d3_layout_forceDragOffset,
+    d3_layout_forceStopClick,
+    d3_layout_forceDragElement;
+
+function d3_layout_forceDragOver(d) {
+  d.fixed = true;
+}
+
+function d3_layout_forceDragOut(d) {
+  if (d !== d3_layout_forceDragNode) {
+    d.fixed = false;
+  }
+}
+
+function d3_layout_forcePoint(container) {
+  return d3.event.touches
+      ? d3.svg.touches(container)[0]
+      : d3.svg.mouse(container);
+}
+
+function d3_layout_forceDragMove() {
+  if (!d3_layout_forceDragNode) return;
+  var parent = d3_layout_forceDragElement.parentNode;
+
+  // O NOES! The drag element was removed from the DOM.
+  if (!parent) {
+    d3_layout_forceDragNode.fixed = false;
+    d3_layout_forceDragOffset = d3_layout_forceDragNode = d3_layout_forceDragElement = null;
+    return;
+  }
+
+  var m = d3_layout_forcePoint(parent);
+  d3_layout_forceDragMoved = true;
+  d3_layout_forceDragNode.px = m[0] - d3_layout_forceDragOffset[0];
+  d3_layout_forceDragNode.py = m[1] - d3_layout_forceDragOffset[1];
+  d3_layout_forceCancel();
+  d3_layout_forceDragForce.resume(); // restart annealing
+}
+
+function d3_layout_forceDragUp() {
+  if (!d3_layout_forceDragNode) return;
+
+  // If the node was moved, prevent the mouseup from propagating.
+  // Also prevent the subsequent click from propagating (e.g., for anchors).
+  if (d3_layout_forceDragMoved) {
+    d3_layout_forceStopClick = true;
+    d3_layout_forceCancel();
+  }
+
+  // Don't trigger this for touchend.
+  if (d3.event.type === "mouseup") {
+    d3_layout_forceDragMove();
+  }
+
+  d3_layout_forceDragNode.fixed = false;
+  d3_layout_forceDragForce =
+  d3_layout_forceDragOffset =
+  d3_layout_forceDragNode =
+  d3_layout_forceDragElement = null;
+}
+
+function d3_layout_forceDragClick() {
+  if (d3_layout_forceStopClick) {
+    d3_layout_forceCancel();
+    d3_layout_forceStopClick = false;
+  }
+}
+
+function d3_layout_forceCancel() {
+  d3.event.stopPropagation();
+  d3.event.preventDefault();
+}
+
+function d3_layout_forceAccumulate(quad) {
+  var cx = 0,
+      cy = 0;
+  quad.count = 0;
+  if (!quad.leaf) {
+    var nodes = quad.nodes,
+        n = nodes.length,
+        i = -1,
+        c;
+    while (++i < n) {
+      c = nodes[i];
+      if (c == null) continue;
+      d3_layout_forceAccumulate(c);
+      quad.count += c.count;
+      cx += c.count * c.cx;
+      cy += c.count * c.cy;
+    }
+  }
+  if (quad.point) {
+    // jitter internal nodes that are coincident
+    if (!quad.leaf) {
+      quad.point.x += Math.random() - .5;
+      quad.point.y += Math.random() - .5;
+    }
+    quad.count++;
+    cx += quad.point.x;
+    cy += quad.point.y;
+  }
+  quad.cx = cx / quad.count;
+  quad.cy = cy / quad.count;
+}
+
+function d3_layout_forceLinkDistance(link) {
+  return 20;
+}
+
+function d3_layout_forceLinkStrength(link) {
+  return 1;
+}
Index: Dev/branches/Demo/d3/src/layout/hierarchy.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/hierarchy.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/hierarchy.js	(revision 225)
@@ -0,0 +1,120 @@
+d3.layout.hierarchy = function() {
+  var sort = d3_layout_hierarchySort,
+      children = d3_layout_hierarchyChildren,
+      value = d3_layout_hierarchyValue;
+
+  // Recursively compute the node depth and value.
+  // Also converts the data representation into a standard hierarchy structure.
+  function recurse(data, depth, nodes) {
+    var childs = children.call(hierarchy, data, depth),
+        node = d3_layout_hierarchyInline ? data : {data: data};
+    node.depth = depth;
+    nodes.push(node);
+    if (childs) {
+      var i = -1,
+          n = childs.length,
+          c = node.children = [],
+          v = 0,
+          j = depth + 1;
+      while (++i < n) {
+        d = recurse(childs[i], j, nodes);
+        d.parent = node;
+        c.push(d);
+        v += d.value;
+      }
+      if (sort) c.sort(sort);
+      if (value) node.value = v;
+    } else if (value) {
+      node.value = value.call(hierarchy, data, depth);
+    }
+    return node;
+  }
+
+  // Recursively re-evaluates the node value.
+  function revalue(node, depth) {
+    var children = node.children,
+        v = 0;
+    if (children) {
+      var i = -1,
+          n = children.length,
+          j = depth + 1;
+      while (++i < n) v += revalue(children[i], j);
+    } else if (value) {
+      v = value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth);
+    }
+    if (value) node.value = v;
+    return v;
+  }
+
+  function hierarchy(d) {
+    var nodes = [];
+    recurse(d, 0, nodes);
+    return nodes;
+  }
+
+  hierarchy.sort = function(x) {
+    if (!arguments.length) return sort;
+    sort = x;
+    return hierarchy;
+  };
+
+  hierarchy.children = function(x) {
+    if (!arguments.length) return children;
+    children = x;
+    return hierarchy;
+  };
+
+  hierarchy.value = function(x) {
+    if (!arguments.length) return value;
+    value = x;
+    return hierarchy;
+  };
+
+  // Re-evaluates the `value` property for the specified hierarchy.
+  hierarchy.revalue = function(root) {
+    revalue(root, 0);
+    return root;
+  };
+
+  return hierarchy;
+};
+
+// A method assignment helper for hierarchy subclasses.
+function d3_layout_hierarchyRebind(object, hierarchy) {
+  object.sort = d3.rebind(object, hierarchy.sort);
+  object.children = d3.rebind(object, hierarchy.children);
+  object.links = d3_layout_hierarchyLinks;
+  object.value = d3.rebind(object, hierarchy.value);
+
+  // If the new API is used, enabling inlining.
+  object.nodes = function(d) {
+    d3_layout_hierarchyInline = true;
+    return (object.nodes = object)(d);
+  };
+
+  return object;
+}
+
+function d3_layout_hierarchyChildren(d) {
+  return d.children;
+}
+
+function d3_layout_hierarchyValue(d) {
+  return d.value;
+}
+
+function d3_layout_hierarchySort(a, b) {
+  return b.value - a.value;
+}
+
+// Returns an array source+target objects for the specified nodes.
+function d3_layout_hierarchyLinks(nodes) {
+  return d3.merge(nodes.map(function(parent) {
+    return (parent.children || []).map(function(child) {
+      return {source: parent, target: child};
+    });
+  }));
+}
+
+// For backwards-compatibility, don't enable inlining by default.
+var d3_layout_hierarchyInline = false;
Index: Dev/branches/Demo/d3/src/layout/histogram.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/histogram.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/histogram.js	(revision 225)
@@ -0,0 +1,102 @@
+d3.layout.histogram = function() {
+  var frequency = true,
+      valuer = Number,
+      ranger = d3_layout_histogramRange,
+      binner = d3_layout_histogramBinSturges;
+
+  function histogram(data, i) {
+    var bins = [],
+        values = data.map(valuer, this),
+        range = ranger.call(this, values, i),
+        thresholds = binner.call(this, range, values, i),
+        bin,
+        i = -1,
+        n = values.length,
+        m = thresholds.length - 1,
+        k = frequency ? 1 : 1 / n,
+        x;
+
+    // Initialize the bins.
+    while (++i < m) {
+      bin = bins[i] = [];
+      bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
+      bin.y = 0;
+    }
+
+    // Fill the bins, ignoring values outside the range.
+    i = -1; while(++i < n) {
+      x = values[i];
+      if ((x >= range[0]) && (x <= range[1])) {
+        bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
+        bin.y += k;
+        bin.push(data[i]);
+      }
+    }
+
+    return bins;
+  }
+
+  // Specifies how to extract a value from the associated data. The default
+  // value function is `Number`, which is equivalent to the identity function.
+  histogram.value = function(x) {
+    if (!arguments.length) return valuer;
+    valuer = x;
+    return histogram;
+  };
+
+  // Specifies the range of the histogram. Values outside the specified range
+  // will be ignored. The argument `x` may be specified either as a two-element
+  // array representing the minimum and maximum value of the range, or as a
+  // function that returns the range given the array of values and the current
+  // index `i`. The default range is the extent (minimum and maximum) of the
+  // values.
+  histogram.range = function(x) {
+    if (!arguments.length) return ranger;
+    ranger = d3.functor(x);
+    return histogram;
+  };
+
+  // Specifies how to bin values in the histogram. The argument `x` may be
+  // specified as a number, in which case the range of values will be split
+  // uniformly into the given number of bins. Or, `x` may be an array of
+  // threshold values, defining the bins; the specified array must contain the
+  // rightmost (upper) value, thus specifying n + 1 values for n bins. Or, `x`
+  // may be a function which is evaluated, being passed the range, the array of
+  // values, and the current index `i`, returning an array of thresholds. The
+  // default bin function will divide the values into uniform bins using
+  // Sturges' formula.
+  histogram.bins = function(x) {
+    if (!arguments.length) return binner;
+    binner = typeof x === "number"
+        ? function(range) { return d3_layout_histogramBinFixed(range, x); }
+        : d3.functor(x);
+    return histogram;
+  };
+
+  // Specifies whether the histogram's `y` value is a count (frequency) or a
+  // probability (density). The default value is true.
+  histogram.frequency = function(x) {
+    if (!arguments.length) return frequency;
+    frequency = !!x;
+    return histogram;
+  };
+
+  return histogram;
+};
+
+function d3_layout_histogramBinSturges(range, values) {
+  return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
+}
+
+function d3_layout_histogramBinFixed(range, n) {
+  var x = -1,
+      b = +range[0],
+      m = (range[1] - b) / n,
+      f = [];
+  while (++x <= n) f[x] = m * x + b;
+  return f;
+}
+
+function d3_layout_histogramRange(values) {
+  return [d3.min(values), d3.max(values)];
+}
Index: Dev/branches/Demo/d3/src/layout/layout.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/layout.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/layout.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.layout = {};
Index: Dev/branches/Demo/d3/src/layout/pack.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/pack.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/pack.js	(revision 225)
@@ -0,0 +1,200 @@
+d3.layout.pack = function() {
+  var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort),
+      size = [1, 1];
+
+  function pack(d, i) {
+    var nodes = hierarchy.call(this, d, i),
+        root = nodes[0];
+
+    // Recursively compute the layout.
+    root.x = 0;
+    root.y = 0;
+    d3_layout_packTree(root);
+
+    // Scale the layout to fit the requested size.
+    var w = size[0],
+        h = size[1],
+        k = 1 / Math.max(2 * root.r / w, 2 * root.r / h);
+    d3_layout_packTransform(root, w / 2, h / 2, k);
+
+    return nodes;
+  }
+
+  pack.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return pack;
+  };
+
+  return d3_layout_hierarchyRebind(pack, hierarchy);
+};
+
+function d3_layout_packSort(a, b) {
+  return a.value - b.value;
+}
+
+function d3_layout_packInsert(a, b) {
+  var c = a._pack_next;
+  a._pack_next = b;
+  b._pack_prev = a;
+  b._pack_next = c;
+  c._pack_prev = b;
+}
+
+function d3_layout_packSplice(a, b) {
+  a._pack_next = b;
+  b._pack_prev = a;
+}
+
+function d3_layout_packIntersects(a, b) {
+  var dx = b.x - a.x,
+      dy = b.y - a.y,
+      dr = a.r + b.r;
+  return (dr * dr - dx * dx - dy * dy) > .001; // within epsilon
+}
+
+function d3_layout_packCircle(nodes) {
+  var xMin = Infinity,
+      xMax = -Infinity,
+      yMin = Infinity,
+      yMax = -Infinity,
+      n = nodes.length,
+      a, b, c, j, k;
+
+  function bound(node) {
+    xMin = Math.min(node.x - node.r, xMin);
+    xMax = Math.max(node.x + node.r, xMax);
+    yMin = Math.min(node.y - node.r, yMin);
+    yMax = Math.max(node.y + node.r, yMax);
+  }
+
+  // Create node links.
+  nodes.forEach(d3_layout_packLink);
+
+  // Create first node.
+  a = nodes[0];
+  a.x = -a.r;
+  a.y = 0;
+  bound(a);
+
+  // Create second node.
+  if (n > 1) {
+    b = nodes[1];
+    b.x = b.r;
+    b.y = 0;
+    bound(b);
+
+    // Create third node and build chain.
+    if (n > 2) {
+      c = nodes[2];
+      d3_layout_packPlace(a, b, c);
+      bound(c);
+      d3_layout_packInsert(a, c);
+      a._pack_prev = c;
+      d3_layout_packInsert(c, b);
+      b = a._pack_next;
+
+      // Now iterate through the rest.
+      for (var i = 3; i < n; i++) {
+        d3_layout_packPlace(a, b, c = nodes[i]);
+
+        // Search for the closest intersection.
+        var isect = 0, s1 = 1, s2 = 1;
+        for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
+          if (d3_layout_packIntersects(j, c)) {
+            isect = 1;
+            break;
+          }
+        }
+        if (isect == 1) {
+          for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
+            if (d3_layout_packIntersects(k, c)) {
+              if (s2 < s1) {
+                isect = -1;
+                j = k;
+              }
+              break;
+            }
+          }
+        }
+
+        // Update node chain.
+        if (isect == 0) {
+          d3_layout_packInsert(a, c);
+          b = c;
+          bound(c);
+        } else if (isect > 0) {
+          d3_layout_packSplice(a, j);
+          b = j;
+          i--;
+        } else { // isect < 0
+          d3_layout_packSplice(j, b);
+          a = j;
+          i--;
+        }
+      }
+    }
+  }
+
+  // Re-center the circles and return the encompassing radius.
+  var cx = (xMin + xMax) / 2,
+      cy = (yMin + yMax) / 2,
+      cr = 0;
+  for (var i = 0; i < n; i++) {
+    var node = nodes[i];
+    node.x -= cx;
+    node.y -= cy;
+    cr = Math.max(cr, node.r + Math.sqrt(node.x * node.x + node.y * node.y));
+  }
+
+  // Remove node links.
+  nodes.forEach(d3_layout_packUnlink);
+
+  return cr;
+}
+
+function d3_layout_packLink(node) {
+  node._pack_next = node._pack_prev = node;
+}
+
+function d3_layout_packUnlink(node) {
+  delete node._pack_next;
+  delete node._pack_prev;
+}
+
+function d3_layout_packTree(node) {
+  var children = node.children;
+  if (children) {
+    children.forEach(d3_layout_packTree);
+    node.r = d3_layout_packCircle(children);
+  } else {
+    node.r = Math.sqrt(node.value);
+  }
+}
+
+function d3_layout_packTransform(node, x, y, k) {
+  var children = node.children;
+  node.x = (x += k * node.x);
+  node.y = (y += k * node.y);
+  node.r *= k;
+  if (children) {
+    var i = -1, n = children.length;
+    while (++i < n) d3_layout_packTransform(children[i], x, y, k);
+  }
+}
+
+function d3_layout_packPlace(a, b, c) {
+  var da = b.r + c.r,
+      db = a.r + c.r,
+      dx = b.x - a.x,
+      dy = b.y - a.y,
+      dc = Math.sqrt(dx * dx + dy * dy),
+      cos = (db * db + dc * dc - da * da) / (2 * db * dc),
+      theta = Math.acos(cos),
+      x = cos * db,
+      h = Math.sin(theta) * db;
+  dx /= dc;
+  dy /= dc;
+  c.x = a.x + x * dx + h * dy;
+  c.y = a.y + x * dy - h * dx;
+}
Index: Dev/branches/Demo/d3/src/layout/partition.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/partition.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/partition.js	(revision 225)
@@ -0,0 +1,48 @@
+d3.layout.partition = function() {
+  var hierarchy = d3.layout.hierarchy(),
+      size = [1, 1]; // width, height
+
+  function position(node, x, dx, dy) {
+    var children = node.children;
+    node.x = x;
+    node.y = node.depth * dy;
+    node.dx = dx;
+    node.dy = dy;
+    if (children) {
+      var i = -1,
+          n = children.length,
+          c,
+          d;
+      dx /= node.value;
+      while (++i < n) {
+        position(c = children[i], x, d = c.value * dx, dy);
+        x += d;
+      }
+    }
+  }
+
+  function depth(node) {
+    var children = node.children,
+        d = 0;
+    if (children) {
+      var i = -1,
+          n = children.length;
+      while (++i < n) d = Math.max(d, depth(children[i]));
+    }
+    return 1 + d;
+  }
+
+  function partition(d, i) {
+    var nodes = hierarchy.call(this, d, i);
+    position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
+    return nodes;
+  }
+
+  partition.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return partition;
+  };
+
+  return d3_layout_hierarchyRebind(partition, hierarchy);
+};
Index: Dev/branches/Demo/d3/src/layout/pie.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/pie.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/pie.js	(revision 225)
@@ -0,0 +1,95 @@
+d3.layout.pie = function() {
+  var value = Number,
+      sort = null,
+      startAngle = 0,
+      endAngle = 2 * Math.PI;
+
+  function pie(data, i) {
+
+    // Compute the start angle.
+    var a = +(typeof startAngle === "function"
+        ? startAngle.apply(this, arguments)
+        : startAngle);
+
+    // Compute the angular range (end - start).
+    var k = (typeof endAngle === "function"
+        ? endAngle.apply(this, arguments)
+        : endAngle) - startAngle;
+
+    // Optionally sort the data.
+    var index = d3.range(data.length);
+    if (sort != null) index.sort(function(i, j) {
+      return sort(data[i], data[j]);
+    });
+
+    // Compute the numeric values for each data element.
+    var values = data.map(value);
+
+    // Convert k into a scale factor from value to angle, using the sum.
+    k /= values.reduce(function(p, d) { return p + d; }, 0);
+
+    // Compute the arcs!
+    var arcs = index.map(function(i) {
+      return {
+        data: data[i],
+        value: d = values[i],
+        startAngle: a,
+        endAngle: a += d * k
+      };
+    });
+
+    // Return the arcs in the original data's order.
+    return data.map(function(d, i) {
+      return arcs[index[i]];
+    });
+  }
+
+  /**
+   * Specifies the value function *x*, which returns a nonnegative numeric value
+   * for each datum. The default value function is `Number`. The value function
+   * is passed two arguments: the current datum and the current index.
+   */
+  pie.value = function(x) {
+    if (!arguments.length) return value;
+    value = x;
+    return pie;
+  };
+
+  /**
+   * Specifies a sort comparison operator *x*. The comparator is passed two data
+   * elements from the data array, a and b; it returns a negative value if a is
+   * less than b, a positive value if a is greater than b, and zero if a equals
+   * b.
+   */
+  pie.sort = function(x) {
+    if (!arguments.length) return sort;
+    sort = x;
+    return pie;
+  };
+
+  /**
+   * Specifies the overall start angle of the pie chart. Defaults to 0. The
+   * start angle can be specified either as a constant or as a function; in the
+   * case of a function, it is evaluated once per array (as opposed to per
+   * element).
+   */
+  pie.startAngle = function(x) {
+    if (!arguments.length) return startAngle;
+    startAngle = x;
+    return pie;
+  };
+
+  /**
+   * Specifies the overall end angle of the pie chart. Defaults to 2Ï. The
+   * end angle can be specified either as a constant or as a function; in the
+   * case of a function, it is evaluated once per array (as opposed to per
+   * element).
+   */
+  pie.endAngle = function(x) {
+    if (!arguments.length) return endAngle;
+    endAngle = x;
+    return pie;
+  };
+
+  return pie;
+};
Index: Dev/branches/Demo/d3/src/layout/stack.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/stack.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/stack.js	(revision 225)
@@ -0,0 +1,237 @@
+// data is two-dimensional array of x,y; we populate y0
+d3.layout.stack = function() {
+  var values = Object,
+      order = d3_layout_stackOrders["default"],
+      offset = d3_layout_stackOffsets["zero"],
+      out = d3_layout_stackOut,
+      x = d3_layout_stackX,
+      y = d3_layout_stackY;
+
+  function stack(data, index) {
+
+    // Convert series to canonical two-dimensional representation.
+    var series = data.map(function(d, i) {
+      return values.call(stack, d, i);
+    });
+
+    // Convert each series to canonical [[x,y]] representation.
+    var points = series.map(function(d, i) {
+      return d.map(function(v, i) {
+        return [x.call(stack, v, i), y.call(stack, v, i)];
+      });
+    });
+
+    // Compute the order of series, and permute them.
+    var orders = order.call(stack, points, index);
+    series = d3.permute(series, orders);
+    points = d3.permute(points, orders);
+
+    // Compute the baselineâŠ
+    var offsets = offset.call(stack, points, index);
+
+    // And propagate it to other series.
+    var n = series.length,
+        m = series[0].length,
+        i,
+        j,
+        o;
+    for (j = 0; j < m; ++j) {
+      out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
+      for (i = 1; i < n; ++i) {
+        out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
+      }
+    }
+
+    return data;
+  }
+
+  stack.values = function(x) {
+    if (!arguments.length) return values;
+    values = x;
+    return stack;
+  };
+
+  stack.order = function(x) {
+    if (!arguments.length) return order;
+    order = typeof x === "function" ? x : d3_layout_stackOrders[x];
+    return stack;
+  };
+
+  stack.offset = function(x) {
+    if (!arguments.length) return offset;
+    offset = typeof x === "function" ? x : d3_layout_stackOffsets[x];
+    return stack;
+  };
+
+  stack.x = function(z) {
+    if (!arguments.length) return x;
+    x = z;
+    return stack;
+  };
+
+  stack.y = function(z) {
+    if (!arguments.length) return y;
+    y = z;
+    return stack;
+  };
+
+  stack.out = function(z) {
+    if (!arguments.length) return out;
+    out = z;
+    return stack;
+  };
+
+  return stack;
+}
+
+function d3_layout_stackX(d) {
+  return d.x;
+}
+
+function d3_layout_stackY(d) {
+  return d.y;
+}
+
+function d3_layout_stackOut(d, y0, y) {
+  d.y0 = y0;
+  d.y = y;
+}
+
+var d3_layout_stackOrders = {
+
+  "inside-out": function(data) {
+    var n = data.length,
+        i,
+        j,
+        max = data.map(d3_layout_stackMaxIndex),
+        sums = data.map(d3_layout_stackReduceSum),
+        index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),
+        top = 0,
+        bottom = 0,
+        tops = [],
+        bottoms = [];
+    for (i = 0; i < n; ++i) {
+      j = index[i];
+      if (top < bottom) {
+        top += sums[j];
+        tops.push(j);
+      } else {
+        bottom += sums[j];
+        bottoms.push(j);
+      }
+    }
+    return bottoms.reverse().concat(tops);
+  },
+
+  "reverse": function(data) {
+    return d3.range(data.length).reverse();
+  },
+
+  "default": function(data) {
+    return d3.range(data.length);
+  }
+
+};
+
+var d3_layout_stackOffsets = {
+
+  "silhouette": function(data) {
+    var n = data.length,
+        m = data[0].length,
+        sums = [],
+        max = 0,
+        i,
+        j,
+        o,
+        y0 = [];
+    for (j = 0; j < m; ++j) {
+      for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+      if (o > max) max = o;
+      sums.push(o);
+    }
+    for (j = 0; j < m; ++j) {
+      y0[j] = (max - sums[j]) / 2;
+    }
+    return y0;
+  },
+
+  "wiggle": function(data) {
+    var n = data.length,
+        x = data[0],
+        m = x.length,
+        max = 0,
+        i,
+        j,
+        k,
+        s1,
+        s2,
+        s3,
+        dx,
+        o,
+        o0,
+        y0 = [];
+    y0[0] = o = o0 = 0;
+    for (j = 1; j < m; ++j) {
+      for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
+      for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
+        for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
+          s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
+        }
+        s2 += s3 * data[i][j][1];
+      }
+      y0[j] = o -= s1 ? s2 / s1 * dx : 0;
+      if (o < o0) o0 = o;
+    }
+    for (j = 0; j < m; ++j) y0[j] -= o0;
+    return y0;
+  },
+
+  "expand": function(data) {
+    var n = data.length,
+        m = data[0].length,
+        k = 1 / n,
+        i,
+        j,
+        o,
+        y0 = [];
+    for (j = 0; j < m; ++j) {
+      for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+      if (o) for (i = 0; i < n; i++) data[i][j][1] /= o;
+      else for (i = 0; i < n; i++) data[i][j][1] = k;
+    }
+    for (j = 0; j < m; ++j) y0[j] = 0;
+    return y0;
+  },
+
+  "zero": function(data) {
+    var j = -1,
+        m = data[0].length,
+        y0 = [];
+    while (++j < m) y0[j] = 0;
+    return y0;
+  }
+
+};
+
+function d3_layout_stackMaxIndex(array) {
+  var i = 1,
+      j = 0,
+      v = array[0][1],
+      k,
+      n = array.length;
+  for (; i < n; ++i) {
+    if ((k = array[i][1]) > v) {
+      j = i;
+      v = k;
+    }
+  }
+  return j;
+}
+
+function d3_layout_stackReduceSum(d) {
+  return d.reduce(d3_layout_stackSum, 0);
+}
+
+function d3_layout_stackSum(p, d) {
+  return p + d[1];
+}
Index: Dev/branches/Demo/d3/src/layout/tree.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/tree.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/tree.js	(revision 225)
@@ -0,0 +1,234 @@
+// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm
+d3.layout.tree = function() {
+  var hierarchy = d3.layout.hierarchy().sort(null).value(null),
+      separation = d3_layout_treeSeparation,
+      size = [1, 1]; // width, height
+
+  function tree(d, i) {
+    var nodes = hierarchy.call(this, d, i),
+        root = nodes[0];
+
+    function firstWalk(node, previousSibling) {
+      var children = node.children,
+          layout = node._tree;
+      if (children) {
+        var n = children.length,
+            firstChild = children[0],
+            previousChild,
+            ancestor = firstChild,
+            child,
+            i = -1;
+        while (++i < n) {
+          child = children[i];
+          firstWalk(child, previousChild);
+          ancestor = apportion(child, previousChild, ancestor);
+          previousChild = child;
+        }
+        d3_layout_treeShift(node);
+        var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
+        if (previousSibling) {
+          layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
+          layout.mod = layout.prelim - midpoint;
+        } else {
+          layout.prelim = midpoint;
+        }
+      } else {
+        if (previousSibling) {
+          layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
+        }
+      }
+    }
+
+    function secondWalk(node, x) {
+      node.x = node._tree.prelim + x;
+      var children = node.children;
+      if (children) {
+        var i = -1,
+            n = children.length;
+        x += node._tree.mod;
+        while (++i < n) {
+          secondWalk(children[i], x);
+        }
+      }
+    }
+
+    function apportion(node, previousSibling, ancestor) {
+      if (previousSibling) {
+        var vip = node,
+            vop = node,
+            vim = previousSibling,
+            vom = node.parent.children[0],
+            sip = vip._tree.mod,
+            sop = vop._tree.mod,
+            sim = vim._tree.mod,
+            som = vom._tree.mod,
+            shift;
+        while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
+          vom = d3_layout_treeLeft(vom);
+          vop = d3_layout_treeRight(vop);
+          vop._tree.ancestor = node;
+          shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
+          if (shift > 0) {
+            d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
+            sip += shift;
+            sop += shift;
+          }
+          sim += vim._tree.mod;
+          sip += vip._tree.mod;
+          som += vom._tree.mod;
+          sop += vop._tree.mod;
+        }
+        if (vim && !d3_layout_treeRight(vop)) {
+          vop._tree.thread = vim;
+          vop._tree.mod += sim - sop;
+        }
+        if (vip && !d3_layout_treeLeft(vom)) {
+          vom._tree.thread = vip;
+          vom._tree.mod += sip - som;
+          ancestor = node;
+        }
+      }
+      return ancestor;
+    }
+
+    // Initialize temporary layout variables.
+    d3_layout_treeVisitAfter(root, function(node, previousSibling) {
+      node._tree = {
+        ancestor: node,
+        prelim: 0,
+        mod: 0,
+        change: 0,
+        shift: 0,
+        number: previousSibling ? previousSibling._tree.number + 1 : 0
+      };
+    });
+
+    // Compute the layout using Buchheim et al.'s algorithm.
+    firstWalk(root);
+    secondWalk(root, -root._tree.prelim);
+
+    // Compute the left-most, right-most, and depth-most nodes for extents.
+    var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost),
+        right = d3_layout_treeSearch(root, d3_layout_treeRightmost),
+        deep = d3_layout_treeSearch(root, d3_layout_treeDeepest),
+        x0 = left.x - separation(left, right) / 2,
+        x1 = right.x + separation(right, left) / 2,
+        y1 = deep.depth || 1;
+
+    // Clear temporary layout variables; transform x and y.
+    d3_layout_treeVisitAfter(root, function(node) {
+      node.x = (node.x - x0) / (x1 - x0) * size[0];
+      node.y = node.depth / y1 * size[1];
+      delete node._tree;
+    });
+
+    return nodes;
+  }
+
+  tree.separation = function(x) {
+    if (!arguments.length) return separation;
+    separation = x;
+    return tree;
+  };
+
+  tree.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return tree;
+  };
+
+  return d3_layout_hierarchyRebind(tree, hierarchy);
+};
+
+function d3_layout_treeSeparation(a, b) {
+  return a.parent == b.parent ? 1 : 2;
+}
+
+// function d3_layout_treeSeparationRadial(a, b) {
+//   return (a.parent == b.parent ? 1 : 2) / a.depth;
+// }
+
+function d3_layout_treeLeft(node) {
+  return node.children ? node.children[0] : node._tree.thread;
+}
+
+function d3_layout_treeRight(node) {
+  return node.children ? node.children[node.children.length - 1] : node._tree.thread;
+}
+
+function d3_layout_treeSearch(node, compare) {
+  var children = node.children;
+  if (children) {
+    var child,
+        n = children.length,
+        i = -1;
+    while (++i < n) {
+      if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
+        node = child;
+      }
+    }
+  }
+  return node;
+}
+
+function d3_layout_treeRightmost(a, b) {
+  return a.x - b.x;
+}
+
+function d3_layout_treeLeftmost(a, b) {
+  return b.x - a.x;
+}
+
+function d3_layout_treeDeepest(a, b) {
+  return a.depth - b.depth;
+}
+
+function d3_layout_treeVisitAfter(node, callback) {
+  function visit(node, previousSibling) {
+    var children = node.children;
+    if (children) {
+      var child,
+          previousChild = null,
+          i = -1,
+          n = children.length;
+      while (++i < n) {
+        child = children[i];
+        visit(child, previousChild);
+        previousChild = child;
+      }
+    }
+    callback(node, previousSibling);
+  }
+  visit(node, null);
+}
+
+function d3_layout_treeShift(node) {
+  var shift = 0,
+      change = 0,
+      children = node.children,
+      i = children.length,
+      child;
+  while (--i >= 0) {
+    child = children[i]._tree;
+    child.prelim += shift;
+    child.mod += shift;
+    shift += child.shift + (change += child.change);
+  }
+}
+
+function d3_layout_treeMove(ancestor, node, shift) {
+  ancestor = ancestor._tree;
+  node = node._tree;
+  var change = shift / (node.number - ancestor.number);
+  ancestor.change += change;
+  node.change -= change;
+  node.shift += shift;
+  node.prelim += shift;
+  node.mod += shift;
+}
+
+function d3_layout_treeAncestor(vim, node, ancestor) {
+  return vim._tree.ancestor.parent == node.parent
+      ? vim._tree.ancestor
+      : ancestor;
+}
Index: Dev/branches/Demo/d3/src/layout/treemap.js
===================================================================
--- Dev/branches/Demo/d3/src/layout/treemap.js	(revision 225)
+++ Dev/branches/Demo/d3/src/layout/treemap.js	(revision 225)
@@ -0,0 +1,213 @@
+// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
+// Modified to support a target aspect ratio by Jeff Heer
+d3.layout.treemap = function() {
+  var hierarchy = d3.layout.hierarchy(),
+      round = Math.round,
+      size = [1, 1], // width, height
+      padding = null,
+      pad = d3_layout_treemapPadNull,
+      sticky = false,
+      stickies,
+      ratio = 0.5 * (1 + Math.sqrt(5)); // golden ratio
+
+  // Compute the area for each child based on value & scale.
+  function scale(children, k) {
+    var i = -1,
+        n = children.length,
+        child,
+        area;
+    while (++i < n) {
+      area = (child = children[i]).value * (k < 0 ? 0 : k);
+      child.area = isNaN(area) || area <= 0 ? 0 : area;
+    }
+  }
+
+  // Recursively arranges the specified node's children into squarified rows.
+  function squarify(node) {
+    if (!node.children) return;
+    var rect = pad(node),
+        row = [],
+        children = node.children.slice(), // copy-on-write
+        child,
+        best = Infinity, // the best row score so far
+        score, // the current row score
+        u = Math.min(rect.dx, rect.dy), // initial orientation
+        n;
+    scale(children, rect.dx * rect.dy / node.value);
+    row.area = 0;
+    while ((n = children.length) > 0) {
+      row.push(child = children[n - 1]);
+      row.area += child.area;
+      if ((score = worst(row, u)) <= best) { // continue with this orientation
+        children.pop();
+        best = score;
+      } else { // abort, and try a different orientation
+        row.area -= row.pop().area;
+        position(row, u, rect, false);
+        u = Math.min(rect.dx, rect.dy);
+        row.length = row.area = 0;
+        best = Infinity;
+      }
+    }
+    if (row.length) {
+      position(row, u, rect, true);
+      row.length = row.area = 0;
+    }
+    node.children.forEach(squarify);
+  }
+
+  // Recursively resizes the specified node's children into existing rows.
+  // Preserves the existing layout!
+  function stickify(node) {
+    if (!node.children) return;
+    var rect = pad(node),
+        children = node.children.slice(), // copy-on-write
+        child,
+        row = [];
+    scale(children, rect.dx * rect.dy / node.value);
+    row.area = 0;
+    while (child = children.pop()) {
+      row.push(child);
+      row.area += child.area;
+      if (child.z != null) {
+        position(row, child.z ? rect.dx : rect.dy, rect, !children.length);
+        row.length = row.area = 0;
+      }
+    }
+    node.children.forEach(stickify);
+  }
+
+  // Computes the score for the specified row, as the worst aspect ratio.
+  function worst(row, u) {
+    var s = row.area,
+        r,
+        rmax = 0,
+        rmin = Infinity,
+        i = -1,
+        n = row.length;
+    while (++i < n) {
+      if (!(r = row[i].area)) continue;
+      if (r < rmin) rmin = r;
+      if (r > rmax) rmax = r;
+    }
+    s *= s;
+    u *= u;
+    return s
+        ? Math.max((u * rmax * ratio) / s, s / (u * rmin * ratio))
+        : Infinity;
+  }
+
+  // Positions the specified row of nodes. Modifies `rect`.
+  function position(row, u, rect, flush) {
+    var i = -1,
+        n = row.length,
+        x = rect.x,
+        y = rect.y,
+        v = u ? round(row.area / u) : 0,
+        o;
+    if (u == rect.dx) { // horizontal subdivision
+      if (flush || v > rect.dy) v = rect.dy; // over+underflow
+      while (++i < n) {
+        o = row[i];
+        o.x = x;
+        o.y = y;
+        o.dy = v;
+        x += o.dx = v ? round(o.area / v) : 0;
+      }
+      o.z = true;
+      o.dx += rect.x + rect.dx - x; // rounding error
+      rect.y += v;
+      rect.dy -= v;
+    } else { // vertical subdivision
+      if (flush || v > rect.dx) v = rect.dx; // over+underflow
+      while (++i < n) {
+        o = row[i];
+        o.x = x;
+        o.y = y;
+        o.dx = v;
+        y += o.dy = v ? round(o.area / v) : 0;
+      }
+      o.z = false;
+      o.dy += rect.y + rect.dy - y; // rounding error
+      rect.x += v;
+      rect.dx -= v;
+    }
+  }
+
+  function treemap(d) {
+    var nodes = stickies || hierarchy(d),
+        root = nodes[0];
+    root.x = 0;
+    root.y = 0;
+    root.dx = size[0];
+    root.dy = size[1];
+    if (stickies) hierarchy.revalue(root);
+    scale([root], root.dx * root.dy / root.value);
+    (stickies ? stickify : squarify)(root);
+    if (sticky) stickies = nodes;
+    return nodes;
+  }
+
+  treemap.size = function(x) {
+    if (!arguments.length) return size;
+    size = x;
+    return treemap;
+  };
+
+  treemap.padding = function(x) {
+    if (!arguments.length) return padding;
+
+    function padFunction(node) {
+      var p = x.call(treemap, node, node.depth);
+      return p == null
+          ? d3_layout_treemapPadNull(node)
+          : d3_layout_treemapPad(node, typeof p === "number" ? [p, p, p, p] : p);
+    }
+
+    function padConstant(node) {
+      return d3_layout_treemapPad(node, x);
+    }
+
+    var type;
+    pad = (padding = x) == null ? d3_layout_treemapPadNull
+        : (type = typeof x) === "function" ? padFunction
+        : type === "number" ? (x = [x, x, x, x], padConstant)
+        : padConstant;
+    return treemap;
+  };
+
+  treemap.round = function(x) {
+    if (!arguments.length) return round != Number;
+    round = x ? Math.round : Number;
+    return treemap;
+  };
+
+  treemap.sticky = function(x) {
+    if (!arguments.length) return sticky;
+    sticky = x;
+    stickies = null;
+    return treemap;
+  };
+
+  treemap.ratio = function(x) {
+    if (!arguments.length) return ratio;
+    ratio = x;
+    return treemap;
+  };
+
+  return d3_layout_hierarchyRebind(treemap, hierarchy);
+};
+
+function d3_layout_treemapPadNull(node) {
+  return {x: node.x, y: node.y, dx: node.dx, dy: node.dy};
+}
+
+function d3_layout_treemapPad(node, padding) {
+  var x = node.x + padding[3],
+      y = node.y + padding[0],
+      dx = node.dx - padding[1] - padding[3],
+      dy = node.dy - padding[0] - padding[2];
+  if (dx < 0) { x += dx / 2; dx = 0; }
+  if (dy < 0) { y += dy / 2; dy = 0; }
+  return {x: x, y: y, dx: dx, dy: dy};
+}
Index: Dev/branches/Demo/d3/src/scale/bilinear.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/bilinear.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/bilinear.js	(revision 225)
@@ -0,0 +1,7 @@
+function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
+  var u = uninterpolate(domain[0], domain[1]),
+      i = interpolate(range[0], range[1]);
+  return function(x) {
+    return i(u(x));
+  };
+}
Index: Dev/branches/Demo/d3/src/scale/category.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/category.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/category.js	(revision 225)
@@ -0,0 +1,54 @@
+/*
+ * This product includes color specifications and designs developed by Cynthia
+ * Brewer (http://colorbrewer.org/). See lib/colorbrewer for more information.
+ */
+
+d3.scale.category10 = function() {
+  return d3.scale.ordinal().range(d3_category10);
+};
+
+d3.scale.category20 = function() {
+  return d3.scale.ordinal().range(d3_category20);
+};
+
+d3.scale.category20b = function() {
+  return d3.scale.ordinal().range(d3_category20b);
+};
+
+d3.scale.category20c = function() {
+  return d3.scale.ordinal().range(d3_category20c);
+};
+
+var d3_category10 = [
+  "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
+  "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"
+];
+
+var d3_category20 = [
+  "#1f77b4", "#aec7e8",
+  "#ff7f0e", "#ffbb78",
+  "#2ca02c", "#98df8a",
+  "#d62728", "#ff9896",
+  "#9467bd", "#c5b0d5",
+  "#8c564b", "#c49c94",
+  "#e377c2", "#f7b6d2",
+  "#7f7f7f", "#c7c7c7",
+  "#bcbd22", "#dbdb8d",
+  "#17becf", "#9edae5"
+];
+
+var d3_category20b = [
+  "#393b79", "#5254a3", "#6b6ecf", "#9c9ede",
+  "#637939", "#8ca252", "#b5cf6b", "#cedb9c",
+  "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94",
+  "#843c39", "#ad494a", "#d6616b", "#e7969c",
+  "#7b4173", "#a55194", "#ce6dbd", "#de9ed6"
+];
+
+var d3_category20c = [
+  "#3182bd", "#6baed6", "#9ecae1", "#c6dbef",
+  "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2",
+  "#31a354", "#74c476", "#a1d99b", "#c7e9c0",
+  "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb",
+  "#636363", "#969696", "#bdbdbd", "#d9d9d9"
+];
Index: Dev/branches/Demo/d3/src/scale/linear.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/linear.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/linear.js	(revision 225)
@@ -0,0 +1,111 @@
+d3.scale.linear = function() {
+  var domain = [0, 1],
+      range = [0, 1],
+      interpolate = d3.interpolate,
+      clamp = false,
+      output,
+      input;
+
+  function rescale() {
+    var linear = domain.length == 2 ? d3_scale_bilinear : d3_scale_polylinear,
+        uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
+    output = linear(domain, range, uninterpolate, interpolate);
+    input = linear(range, domain, uninterpolate, d3.interpolate);
+    return scale;
+  }
+
+  function scale(x) {
+    return output(x);
+  }
+
+  // Note: requires range is coercible to number!
+  scale.invert = function(y) {
+    return input(y);
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x.map(Number);
+    return rescale();
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    return rescale();
+  };
+
+  scale.rangeRound = function(x) {
+    return scale.range(x).interpolate(d3.interpolateRound);
+  };
+
+  scale.clamp = function(x) {
+    if (!arguments.length) return clamp;
+    clamp = x;
+    return rescale();
+  };
+
+  scale.interpolate = function(x) {
+    if (!arguments.length) return interpolate;
+    interpolate = x;
+    return rescale();
+  };
+
+  scale.ticks = function(m) {
+    return d3_scale_linearTicks(domain, m);
+  };
+
+  scale.tickFormat = function(m) {
+    return d3_scale_linearTickFormat(domain, m);
+  };
+
+  scale.nice = function() {
+    d3_scale_nice(domain, d3_scale_linearNice);
+    return rescale();
+  };
+
+  return rescale();
+};
+
+function d3_scale_linearRebind(scale, linear) {
+  scale.range = d3.rebind(scale, linear.range);
+  scale.rangeRound = d3.rebind(scale, linear.rangeRound);
+  scale.interpolate = d3.rebind(scale, linear.interpolate);
+  scale.clamp = d3.rebind(scale, linear.clamp);
+  return scale;
+}
+
+function d3_scale_linearNice(dx) {
+  dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
+  return {
+    floor: function(x) { return Math.floor(x / dx) * dx; },
+    ceil: function(x) { return Math.ceil(x / dx) * dx; }
+  };
+}
+
+// TODO Dates? Ugh.
+function d3_scale_linearTickRange(domain, m) {
+  var extent = d3_scaleExtent(domain),
+      span = extent[1] - extent[0],
+      step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
+      err = m / span * step;
+
+  // Filter ticks to get closer to the desired count.
+  if (err <= .15) step *= 10;
+  else if (err <= .35) step *= 5;
+  else if (err <= .75) step *= 2;
+
+  // Round start and stop values to step interval.
+  extent[0] = Math.ceil(extent[0] / step) * step;
+  extent[1] = Math.floor(extent[1] / step) * step + step * .5; // inclusive
+  extent[2] = step;
+  return extent;
+}
+
+function d3_scale_linearTicks(domain, m) {
+  return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
+}
+
+function d3_scale_linearTickFormat(domain, m) {
+  return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f");
+}
Index: Dev/branches/Demo/d3/src/scale/log.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/log.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/log.js	(revision 225)
@@ -0,0 +1,74 @@
+d3.scale.log = function() {
+  var linear = d3.scale.linear(),
+      log = d3_scale_log,
+      pow = log.pow;
+
+  function scale(x) {
+    return linear(log(x));
+  }
+
+  scale.invert = function(x) {
+    return pow(linear.invert(x));
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return linear.domain().map(pow);
+    log = x[0] < 0 ? d3_scale_logn : d3_scale_log;
+    pow = log.pow;
+    linear.domain(x.map(log));
+    return scale;
+  };
+
+  scale.nice = function() {
+    linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));
+    return scale;
+  };
+
+  scale.ticks = function() {
+    var extent = d3_scaleExtent(linear.domain()),
+        ticks = [];
+    if (extent.every(isFinite)) {
+      var i = Math.floor(extent[0]),
+          j = Math.ceil(extent[1]),
+          u = pow(extent[0]),
+          v = pow(extent[1]);
+      if (log === d3_scale_logn) {
+        ticks.push(pow(i));
+        for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
+      } else {
+        for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
+        ticks.push(pow(i));
+      }
+      for (i = 0; ticks[i] < u; i++) {} // strip small values
+      for (j = ticks.length; ticks[j - 1] > v; j--) {} // strip big values
+      ticks = ticks.slice(i, j);
+    }
+    return ticks;
+  };
+
+  scale.tickFormat = function() {
+    return d3_scale_logTickFormat;
+  };
+
+  return d3_scale_linearRebind(scale, linear);
+};
+
+function d3_scale_log(x) {
+  return Math.log(x) / Math.LN10;
+}
+
+function d3_scale_logn(x) {
+  return -Math.log(-x) / Math.LN10;
+}
+
+d3_scale_log.pow = function(x) {
+  return Math.pow(10, x);
+};
+
+d3_scale_logn.pow = function(x) {
+  return -Math.pow(10, -x);
+};
+
+function d3_scale_logTickFormat(d) {
+  return d.toPrecision(1);
+}
Index: Dev/branches/Demo/d3/src/scale/nice.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/nice.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/nice.js	(revision 225)
@@ -0,0 +1,21 @@
+function d3_scale_nice(domain, nice) {
+  var i0 = 0,
+      i1 = domain.length - 1,
+      x0 = domain[i0],
+      x1 = domain[i1],
+      dx;
+
+  if (x1 < x0) {
+    dx = i0; i0 = i1; i1 = dx;
+    dx = x0; x0 = x1; x1 = dx;
+  }
+
+  nice = nice(x1 - x0);
+  domain[i0] = nice.floor(x0);
+  domain[i1] = nice.ceil(x1);
+  return domain;
+}
+
+function d3_scale_niceDefault() {
+  return Math;
+}
Index: Dev/branches/Demo/d3/src/scale/ordinal.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/ordinal.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/ordinal.js	(revision 225)
@@ -0,0 +1,77 @@
+d3.scale.ordinal = function() {
+  var domain = [],
+      index = {},
+      range = [],
+      rangeBand = 0,
+      rerange = d3_noop;
+
+  function scale(x) {
+    var i = x in index ? index[x] : (index[x] = domain.push(x) - 1);
+    return range[i % range.length];
+  }
+
+  scale.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x;
+    index = {};
+    var i = -1, j = -1, n = domain.length; while (++i < n) {
+      x = domain[i];
+      if (!(x in index)) index[x] = ++j;
+    }
+    rerange();
+    return scale;
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    rerange = d3_noop;
+    return scale;
+  };
+
+  scale.rangePoints = function(x, padding) {
+    if (arguments.length < 2) padding = 0;
+    (rerange = function() {
+      var start = x[0],
+          stop = x[1],
+          step = (stop - start) / (domain.length - 1 + padding);
+      range = domain.length == 1
+          ? [(start + stop) / 2]
+          : d3.range(start + step * padding / 2, stop + step / 2, step);
+      rangeBand = 0;
+    })();
+    return scale;
+  };
+
+  scale.rangeBands = function(x, padding) {
+    if (arguments.length < 2) padding = 0;
+    (rerange = function() {
+      var start = x[0],
+          stop = x[1],
+          step = (stop - start) / (domain.length + padding);
+      range = d3.range(start + step * padding, stop, step);
+      rangeBand = step * (1 - padding);
+    })();
+    return scale;
+  };
+
+  scale.rangeRoundBands = function(x, padding) {
+    if (arguments.length < 2) padding = 0;
+    (rerange = function() {
+      var start = x[0],
+          stop = x[1],
+          diff = stop - start,
+          step = Math.floor(diff / (domain.length + padding)),
+          err = diff - (domain.length - padding) * step;
+      range = d3.range(start + Math.round(err / 2), stop, step);
+      rangeBand = Math.round(step * (1 - padding));
+    })();
+    return scale;
+  };
+
+  scale.rangeBand = function() {
+    return rangeBand;
+  };
+
+  return scale;
+};
Index: Dev/branches/Demo/d3/src/scale/polylinear.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/polylinear.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/polylinear.js	(revision 225)
@@ -0,0 +1,16 @@
+function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
+  var u = [],
+      i = [],
+      j = 0,
+      n = domain.length;
+
+  while (++j < n) {
+    u.push(uninterpolate(domain[j - 1], domain[j]));
+    i.push(interpolate(range[j - 1], range[j]));
+  }
+
+  return function(x) {
+    var j = d3.bisect(domain, x, 1, domain.length - 1) - 1;
+    return i[j](u[j](x));
+  };
+}
Index: Dev/branches/Demo/d3/src/scale/pow.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/pow.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/pow.js	(revision 225)
@@ -0,0 +1,49 @@
+d3.scale.pow = function() {
+  var linear = d3.scale.linear(),
+      exponent = 1,
+      powp = Number,
+      powb = powp;
+
+  function scale(x) {
+    return linear(powp(x));
+  }
+
+  scale.invert = function(x) {
+    return powb(linear.invert(x));
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return linear.domain().map(powb);
+    powp = d3_scale_powPow(exponent);
+    powb = d3_scale_powPow(1 / exponent);
+    linear.domain(x.map(powp));
+    return scale;
+  };
+
+  scale.ticks = function(m) {
+    return d3_scale_linearTicks(scale.domain(), m);
+  };
+
+  scale.tickFormat = function(m) {
+    return d3_scale_linearTickFormat(scale.domain(), m);
+  };
+
+  scale.nice = function() {
+    return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
+  };
+
+  scale.exponent = function(x) {
+    if (!arguments.length) return exponent;
+    var domain = scale.domain();
+    exponent = x;
+    return scale.domain(domain);
+  };
+
+  return d3_scale_linearRebind(scale, linear);
+};
+
+function d3_scale_powPow(e) {
+  return function(x) {
+    return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
+  };
+}
Index: Dev/branches/Demo/d3/src/scale/quantile.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/quantile.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/quantile.js	(revision 225)
@@ -0,0 +1,38 @@
+d3.scale.quantile = function() {
+  var domain = [],
+      range = [],
+      thresholds = [];
+
+  function rescale() {
+    var k = 0,
+        n = domain.length,
+        q = range.length;
+    thresholds.length = Math.max(0, q - 1);
+    while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
+  }
+
+  function scale(x) {
+    if (isNaN(x = +x)) return NaN;
+    return range[d3.bisect(thresholds, x)];
+  }
+
+  scale.domain = function(x) {
+    if (!arguments.length) return domain;
+    domain = x.filter(function(d) { return !isNaN(d); }).sort(d3.ascending);
+    rescale();
+    return scale;
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    rescale();
+    return scale;
+  };
+
+  scale.quantiles = function() {
+    return thresholds;
+  };
+
+  return scale;
+};
Index: Dev/branches/Demo/d3/src/scale/quantize.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/quantize.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/quantize.js	(revision 225)
@@ -0,0 +1,29 @@
+d3.scale.quantize = function() {
+  var x0 = 0,
+      x1 = 1,
+      kx = 2,
+      i = 1,
+      range = [0, 1];
+
+  function scale(x) {
+    return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
+  }
+
+  scale.domain = function(x) {
+    if (!arguments.length) return [x0, x1];
+    x0 = x[0];
+    x1 = x[1];
+    kx = range.length / (x1 - x0);
+    return scale;
+  };
+
+  scale.range = function(x) {
+    if (!arguments.length) return range;
+    range = x;
+    kx = range.length / (x1 - x0);
+    i = range.length - 1;
+    return scale;
+  };
+
+  return scale;
+};
Index: Dev/branches/Demo/d3/src/scale/scale.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/scale.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/scale.js	(revision 225)
@@ -0,0 +1,6 @@
+d3.scale = {};
+
+function d3_scaleExtent(domain) {
+  var start = domain[0], stop = domain[domain.length - 1];
+  return start < stop ? [start, stop] : [stop, start];
+}
Index: Dev/branches/Demo/d3/src/scale/sqrt.js
===================================================================
--- Dev/branches/Demo/d3/src/scale/sqrt.js	(revision 225)
+++ Dev/branches/Demo/d3/src/scale/sqrt.js	(revision 225)
@@ -0,0 +1,3 @@
+d3.scale.sqrt = function() {
+  return d3.scale.pow().exponent(.5);
+};
Index: Dev/branches/Demo/d3/src/start.js
===================================================================
--- Dev/branches/Demo/d3/src/start.js	(revision 225)
+++ Dev/branches/Demo/d3/src/start.js	(revision 225)
@@ -0,0 +1,1 @@
+(function(){
Index: Dev/branches/Demo/d3/src/svg/arc.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/arc.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/arc.js	(revision 225)
@@ -0,0 +1,95 @@
+d3.svg.arc = function() {
+  var innerRadius = d3_svg_arcInnerRadius,
+      outerRadius = d3_svg_arcOuterRadius,
+      startAngle = d3_svg_arcStartAngle,
+      endAngle = d3_svg_arcEndAngle;
+
+  function arc() {
+    var r0 = innerRadius.apply(this, arguments),
+        r1 = outerRadius.apply(this, arguments),
+        a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,
+        a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,
+        da = a1 - a0,
+        df = da < Math.PI ? "0" : "1",
+        c0 = Math.cos(a0),
+        s0 = Math.sin(a0),
+        c1 = Math.cos(a1),
+        s1 = Math.sin(a1);
+    return da >= d3_svg_arcMax
+      ? (r0
+      ? "M0," + r1
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1)
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + r1
+      + "M0," + r0
+      + "A" + r0 + "," + r0 + " 0 1,1 0," + (-r0)
+      + "A" + r0 + "," + r0 + " 0 1,1 0," + r0
+      + "Z"
+      : "M0," + r1
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1)
+      + "A" + r1 + "," + r1 + " 0 1,1 0," + r1
+      + "Z")
+      : (r0
+      ? "M" + r1 * c0 + "," + r1 * s0
+      + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1
+      + "L" + r0 * c1 + "," + r0 * s1
+      + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0
+      + "Z"
+      : "M" + r1 * c0 + "," + r1 * s0
+      + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1
+      + "L0,0"
+      + "Z");
+  }
+
+  arc.innerRadius = function(v) {
+    if (!arguments.length) return innerRadius;
+    innerRadius = d3.functor(v);
+    return arc;
+  };
+
+  arc.outerRadius = function(v) {
+    if (!arguments.length) return outerRadius;
+    outerRadius = d3.functor(v);
+    return arc;
+  };
+
+  arc.startAngle = function(v) {
+    if (!arguments.length) return startAngle;
+    startAngle = d3.functor(v);
+    return arc;
+  };
+
+  arc.endAngle = function(v) {
+    if (!arguments.length) return endAngle;
+    endAngle = d3.functor(v);
+    return arc;
+  };
+
+  arc.centroid = function() {
+    var r = (innerRadius.apply(this, arguments)
+        + outerRadius.apply(this, arguments)) / 2,
+        a = (startAngle.apply(this, arguments)
+        + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
+    return [Math.cos(a) * r, Math.sin(a) * r];
+  };
+
+  return arc;
+};
+
+var d3_svg_arcOffset = -Math.PI / 2,
+    d3_svg_arcMax = 2 * Math.PI - 1e-6;
+
+function d3_svg_arcInnerRadius(d) {
+  return d.innerRadius;
+}
+
+function d3_svg_arcOuterRadius(d) {
+  return d.outerRadius;
+}
+
+function d3_svg_arcStartAngle(d) {
+  return d.startAngle;
+}
+
+function d3_svg_arcEndAngle(d) {
+  return d.endAngle;
+}
Index: Dev/branches/Demo/d3/src/svg/area-radial.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/area-radial.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/area-radial.js	(revision 225)
@@ -0,0 +1,10 @@
+d3.svg.area.radial = function() {
+  var area = d3_svg_area(d3_svg_lineRadial);
+  area.radius = area.x, delete area.x;
+  area.innerRadius = area.x0, delete area.x0;
+  area.outerRadius = area.x1, delete area.x1;
+  area.angle = area.y, delete area.y;
+  area.startAngle = area.y0, delete area.y0;
+  area.endAngle = area.y1, delete area.y1;
+  return area;
+};
Index: Dev/branches/Demo/d3/src/svg/area.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/area.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/area.js	(revision 225)
@@ -0,0 +1,84 @@
+function d3_svg_area(projection) {
+  var x0 = d3_svg_lineX,
+      x1 = d3_svg_lineX,
+      y0 = 0,
+      y1 = d3_svg_lineY,
+      interpolate = "linear",
+      interpolator = d3_svg_lineInterpolators[interpolate],
+      tension = .7;
+
+  function area(d) {
+    if (d.length < 1) return null;
+    var points0 = d3_svg_linePoints(this, d, x0, y0),
+        points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1);
+    return "M" + interpolator(projection(points1), tension)
+         + "L" + interpolator(projection(points0.reverse()), tension)
+         + "Z";
+  }
+
+  area.x = function(x) {
+    if (!arguments.length) return x1;
+    x0 = x1 = x;
+    return area;
+  };
+
+  area.x0 = function(x) {
+    if (!arguments.length) return x0;
+    x0 = x;
+    return area;
+  };
+
+  area.x1 = function(x) {
+    if (!arguments.length) return x1;
+    x1 = x;
+    return area;
+  };
+
+  area.y = function(y) {
+    if (!arguments.length) return y1;
+    y0 = y1 = y;
+    return area;
+  };
+
+  area.y0 = function(y) {
+    if (!arguments.length) return y0;
+    y0 = y;
+    return area;
+  };
+
+  area.y1 = function(y) {
+    if (!arguments.length) return y1;
+    y1 = y;
+    return area;
+  };
+
+  area.interpolate = function(x) {
+    if (!arguments.length) return interpolate;
+    interpolator = d3_svg_lineInterpolators[interpolate = x];
+    return area;
+  };
+
+  area.tension = function(x) {
+    if (!arguments.length) return tension;
+    tension = x;
+    return area;
+  };
+
+  return area;
+}
+
+d3.svg.area = function() {
+  return d3_svg_area(Object);
+};
+
+function d3_svg_areaX(points) {
+  return function(d, i) {
+    return points[i][0];
+  };
+}
+
+function d3_svg_areaY(points) {
+  return function(d, i) {
+    return points[i][1];
+  };
+}
Index: Dev/branches/Demo/d3/src/svg/chord.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/chord.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/chord.js	(revision 225)
@@ -0,0 +1,99 @@
+d3.svg.chord = function() {
+  var source = d3_svg_chordSource,
+      target = d3_svg_chordTarget,
+      radius = d3_svg_chordRadius,
+      startAngle = d3_svg_arcStartAngle,
+      endAngle = d3_svg_arcEndAngle;
+
+  // TODO Allow control point to be customized.
+
+  function chord(d, i) {
+    var s = subgroup(this, source, d, i),
+        t = subgroup(this, target, d, i);
+    return "M" + s.p0
+      + arc(s.r, s.p1) + (equals(s, t)
+      ? curve(s.r, s.p1, s.r, s.p0)
+      : curve(s.r, s.p1, t.r, t.p0)
+      + arc(t.r, t.p1)
+      + curve(t.r, t.p1, s.r, s.p0))
+      + "Z";
+  }
+
+  function subgroup(self, f, d, i) {
+    var subgroup = f.call(self, d, i),
+        r = radius.call(self, subgroup, i),
+        a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset,
+        a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
+    return {
+      r: r,
+      a0: a0,
+      a1: a1,
+      p0: [r * Math.cos(a0), r * Math.sin(a0)],
+      p1: [r * Math.cos(a1), r * Math.sin(a1)]
+    };
+  }
+
+  function equals(a, b) {
+    return a.a0 == b.a0 && a.a1 == b.a1;
+  }
+
+  function arc(r, p) {
+    return "A" + r + "," + r + " 0 0,1 " + p;
+  }
+
+  function curve(r0, p0, r1, p1) {
+    return "Q 0,0 " + p1;
+  }
+
+  chord.radius = function(v) {
+    if (!arguments.length) return radius;
+    radius = d3.functor(v);
+    return chord;
+  };
+
+  chord.source = function(v) {
+    if (!arguments.length) return source;
+    source = d3.functor(v);
+    return chord;
+  };
+
+  chord.target = function(v) {
+    if (!arguments.length) return target;
+    target = d3.functor(v);
+    return chord;
+  };
+
+  chord.startAngle = function(v) {
+    if (!arguments.length) return startAngle;
+    startAngle = d3.functor(v);
+    return chord;
+  };
+
+  chord.endAngle = function(v) {
+    if (!arguments.length) return endAngle;
+    endAngle = d3.functor(v);
+    return chord;
+  };
+
+  return chord;
+};
+
+function d3_svg_chordSource(d) {
+  return d.source;
+}
+
+function d3_svg_chordTarget(d) {
+  return d.target;
+}
+
+function d3_svg_chordRadius(d) {
+  return d.radius;
+}
+
+function d3_svg_chordStartAngle(d) {
+  return d.startAngle;
+}
+
+function d3_svg_chordEndAngle(d) {
+  return d.endAngle;
+}
Index: Dev/branches/Demo/d3/src/svg/diagonal-radial.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/diagonal-radial.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/diagonal-radial.js	(revision 225)
@@ -0,0 +1,22 @@
+d3.svg.diagonal.radial = function() {
+  var diagonal = d3.svg.diagonal(),
+      projection = d3_svg_diagonalProjection,
+      projection_ = diagonal.projection;
+
+  diagonal.projection = function(x) {
+    return arguments.length
+        ? projection_(d3_svg_diagonalRadialProjection(projection = x))
+        : projection;
+  };
+
+  return diagonal;
+};
+
+function d3_svg_diagonalRadialProjection(projection) {
+  return function() {
+    var d = projection.apply(this, arguments),
+        r = d[0],
+        a = d[1] + d3_svg_arcOffset;
+    return [r * Math.cos(a), r * Math.sin(a)];
+  };
+}
Index: Dev/branches/Demo/d3/src/svg/diagonal.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/diagonal.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/diagonal.js	(revision 225)
@@ -0,0 +1,38 @@
+d3.svg.diagonal = function() {
+  var source = d3_svg_chordSource,
+      target = d3_svg_chordTarget,
+      projection = d3_svg_diagonalProjection;
+
+  function diagonal(d, i) {
+    var p0 = source.call(this, d, i),
+        p3 = target.call(this, d, i),
+        m = (p0.y + p3.y) / 2,
+        p = [p0, {x: p0.x, y: m}, {x: p3.x, y: m}, p3];
+    p = p.map(projection);
+    return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
+  }
+
+  diagonal.source = function(x) {
+    if (!arguments.length) return source;
+    source = d3.functor(x);
+    return diagonal;
+  };
+
+  diagonal.target = function(x) {
+    if (!arguments.length) return target;
+    target = d3.functor(x);
+    return diagonal;
+  };
+
+  diagonal.projection = function(x) {
+    if (!arguments.length) return projection;
+    projection = x;
+    return diagonal;
+  };
+
+  return diagonal;
+};
+
+function d3_svg_diagonalProjection(d) {
+  return [d.x, d.y];
+}
Index: Dev/branches/Demo/d3/src/svg/line-radial.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/line-radial.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/line-radial.js	(revision 225)
@@ -0,0 +1,22 @@
+d3.svg.line.radial = function() {
+  var line = d3_svg_line(d3_svg_lineRadial);
+  line.radius = line.x, delete line.x;
+  line.angle = line.y, delete line.y;
+  return line;
+};
+
+function d3_svg_lineRadial(points) {
+  var point,
+      i = -1,
+      n = points.length,
+      r,
+      a;
+  while (++i < n) {
+    point = points[i];
+    r = point[0];
+    a = point[1] + d3_svg_arcOffset;
+    point[0] = r * Math.cos(a);
+    point[1] = r * Math.sin(a);
+  }
+  return points;
+}
Index: Dev/branches/Demo/d3/src/svg/line.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/line.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/line.js	(revision 225)
@@ -0,0 +1,419 @@
+function d3_svg_line(projection) {
+  var x = d3_svg_lineX,
+      y = d3_svg_lineY,
+      interpolate = "linear",
+      interpolator = d3_svg_lineInterpolators[interpolate],
+      tension = .7;
+
+  function line(d) {
+    return d.length < 1 ? null : "M" + interpolator(projection(d3_svg_linePoints(this, d, x, y)), tension);
+  }
+
+  line.x = function(v) {
+    if (!arguments.length) return x;
+    x = v;
+    return line;
+  };
+
+  line.y = function(v) {
+    if (!arguments.length) return y;
+    y = v;
+    return line;
+  };
+
+  line.interpolate = function(v) {
+    if (!arguments.length) return interpolate;
+    interpolator = d3_svg_lineInterpolators[interpolate = v];
+    return line;
+  };
+
+  line.tension = function(v) {
+    if (!arguments.length) return tension;
+    tension = v;
+    return line;
+  };
+
+  return line;
+}
+
+d3.svg.line = function() {
+  return d3_svg_line(Object);
+};
+
+// Converts the specified array of data into an array of points
+// (x-y tuples), by evaluating the specified `x` and `y` functions on each
+// data point. The `this` context of the evaluated functions is the specified
+// "self" object; each function is passed the current datum and index.
+function d3_svg_linePoints(self, d, x, y) {
+  var points = [],
+      i = -1,
+      n = d.length,
+      fx = typeof x === "function",
+      fy = typeof y === "function",
+      value;
+  if (fx && fy) {
+    while (++i < n) points.push([
+      x.call(self, value = d[i], i),
+      y.call(self, value, i)
+    ]);
+  } else if (fx) {
+    while (++i < n) points.push([x.call(self, d[i], i), y]);
+  } else if (fy) {
+    while (++i < n) points.push([x, y.call(self, d[i], i)]);
+  } else {
+    while (++i < n) points.push([x, y]);
+  }
+  return points;
+}
+
+// The default `x` property, which references d[0].
+function d3_svg_lineX(d) {
+  return d[0];
+}
+
+// The default `y` property, which references d[1].
+function d3_svg_lineY(d) {
+  return d[1];
+}
+
+// The various interpolators supported by the `line` class.
+var d3_svg_lineInterpolators = {
+  "linear": d3_svg_lineLinear,
+  "step-before": d3_svg_lineStepBefore,
+  "step-after": d3_svg_lineStepAfter,
+  "basis": d3_svg_lineBasis,
+  "basis-open": d3_svg_lineBasisOpen,
+  "basis-closed": d3_svg_lineBasisClosed,
+  "bundle": d3_svg_lineBundle,
+  "cardinal": d3_svg_lineCardinal,
+  "cardinal-open": d3_svg_lineCardinalOpen,
+  "cardinal-closed": d3_svg_lineCardinalClosed,
+  "monotone": d3_svg_lineMonotone
+};
+
+// Linear interpolation; generates "L" commands.
+function d3_svg_lineLinear(points) {
+  var path = [],
+      i = 0,
+      n = points.length,
+      p = points[0];
+  path.push(p[0], ",", p[1]);
+  while (++i < n) path.push("L", (p = points[i])[0], ",", p[1]);
+  return path.join("");
+}
+
+// Step interpolation; generates "H" and "V" commands.
+function d3_svg_lineStepBefore(points) {
+  var path = [],
+      i = 0,
+      n = points.length,
+      p = points[0];
+  path.push(p[0], ",", p[1]);
+  while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
+  return path.join("");
+}
+
+// Step interpolation; generates "H" and "V" commands.
+function d3_svg_lineStepAfter(points) {
+  var path = [],
+      i = 0,
+      n = points.length,
+      p = points[0];
+  path.push(p[0], ",", p[1]);
+  while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
+  return path.join("");
+}
+
+// Open cardinal spline interpolation; generates "C" commands.
+function d3_svg_lineCardinalOpen(points, tension) {
+  return points.length < 4
+      ? d3_svg_lineLinear(points)
+      : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1),
+        d3_svg_lineCardinalTangents(points, tension));
+}
+
+// Closed cardinal spline interpolation; generates "C" commands.
+function d3_svg_lineCardinalClosed(points, tension) {
+  return points.length < 3
+      ? d3_svg_lineLinear(points)
+      : points[0] + d3_svg_lineHermite((points.push(points[0]), points),
+        d3_svg_lineCardinalTangents([points[points.length - 2]]
+        .concat(points, [points[1]]), tension));
+}
+
+// Cardinal spline interpolation; generates "C" commands.
+function d3_svg_lineCardinal(points, tension, closed) {
+  return points.length < 3
+      ? d3_svg_lineLinear(points)
+      : points[0] + d3_svg_lineHermite(points,
+        d3_svg_lineCardinalTangents(points, tension));
+}
+
+// Hermite spline construction; generates "C" commands.
+function d3_svg_lineHermite(points, tangents) {
+  if (tangents.length < 1
+      || (points.length != tangents.length
+      && points.length != tangents.length + 2)) {
+    return d3_svg_lineLinear(points);
+  }
+
+  var quad = points.length != tangents.length,
+      path = "",
+      p0 = points[0],
+      p = points[1],
+      t0 = tangents[0],
+      t = t0,
+      pi = 1;
+
+  if (quad) {
+    path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3)
+        + "," + p[0] + "," + p[1];
+    p0 = points[1];
+    pi = 2;
+  }
+
+  if (tangents.length > 1) {
+    t = tangents[1];
+    p = points[pi];
+    pi++;
+    path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1])
+        + "," + (p[0] - t[0]) + "," + (p[1] - t[1])
+        + "," + p[0] + "," + p[1];
+    for (var i = 2; i < tangents.length; i++, pi++) {
+      p = points[pi];
+      t = tangents[i];
+      path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1])
+          + "," + p[0] + "," + p[1];
+    }
+  }
+
+  if (quad) {
+    var lp = points[pi];
+    path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3)
+        + "," + lp[0] + "," + lp[1];
+  }
+
+  return path;
+}
+
+// Generates tangents for a cardinal spline.
+function d3_svg_lineCardinalTangents(points, tension) {
+  var tangents = [],
+      a = (1 - tension) / 2,
+      p0,
+      p1 = points[0],
+      p2 = points[1],
+      i = 1,
+      n = points.length;
+  while (++i < n) {
+    p0 = p1;
+    p1 = p2;
+    p2 = points[i];
+    tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]);
+  }
+  return tangents;
+}
+
+// B-spline interpolation; generates "C" commands.
+function d3_svg_lineBasis(points) {
+  if (points.length < 3) return d3_svg_lineLinear(points);
+  var path = [],
+      i = 1,
+      n = points.length,
+      pi = points[0],
+      x0 = pi[0],
+      y0 = pi[1],
+      px = [x0, x0, x0, (pi = points[1])[0]],
+      py = [y0, y0, y0, pi[1]];
+  path.push(x0, ",", y0);
+  d3_svg_lineBasisBezier(path, px, py);
+  while (++i < n) {
+    pi = points[i];
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  i = -1;
+  while (++i < 2) {
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  return path.join("");
+}
+
+// Open B-spline interpolation; generates "C" commands.
+function d3_svg_lineBasisOpen(points) {
+  if (points.length < 4) return d3_svg_lineLinear(points);
+  var path = [],
+      i = -1,
+      n = points.length,
+      pi,
+      px = [0],
+      py = [0];
+  while (++i < 3) {
+    pi = points[i];
+    px.push(pi[0]);
+    py.push(pi[1]);
+  }
+  path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px)
+    + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
+  --i; while (++i < n) {
+    pi = points[i];
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  return path.join("");
+}
+
+// Closed B-spline interpolation; generates "C" commands.
+function d3_svg_lineBasisClosed(points) {
+  var path,
+      i = -1,
+      n = points.length,
+      m = n + 4,
+      pi,
+      px = [],
+      py = [];
+  while (++i < 4) {
+    pi = points[i % n];
+    px.push(pi[0]);
+    py.push(pi[1]);
+  }
+  path = [
+    d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",",
+    d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)
+  ];
+  --i; while (++i < m) {
+    pi = points[i % n];
+    px.shift(); px.push(pi[0]);
+    py.shift(); py.push(pi[1]);
+    d3_svg_lineBasisBezier(path, px, py);
+  }
+  return path.join("");
+}
+
+function d3_svg_lineBundle(points, tension) {
+  var n = points.length - 1,
+      x0 = points[0][0],
+      y0 = points[0][1],
+      dx = points[n][0] - x0,
+      dy = points[n][1] - y0,
+      i = -1,
+      p,
+      t;
+  while (++i <= n) {
+    p = points[i];
+    t = i / n;
+    p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
+    p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
+  }
+  return d3_svg_lineBasis(points);
+}
+
+// Returns the dot product of the given four-element vectors.
+function d3_svg_lineDot4(a, b) {
+  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
+}
+
+// Matrix to transform basis (b-spline) control points to bezier
+// control points. Derived from FvD 11.2.8.
+var d3_svg_lineBasisBezier1 = [0, 2/3, 1/3, 0],
+    d3_svg_lineBasisBezier2 = [0, 1/3, 2/3, 0],
+    d3_svg_lineBasisBezier3 = [0, 1/6, 2/3, 1/6];
+
+// Pushes a "C" BÃ©zier curve onto the specified path array, given the
+// two specified four-element arrays which define the control points.
+function d3_svg_lineBasisBezier(path, x, y) {
+  path.push(
+      "C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x),
+      ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
+}
+
+// Computes the slope from points p0 to p1.
+function d3_svg_lineSlope(p0, p1) {
+  return (p1[1] - p0[1]) / (p1[0] - p0[0]);
+}
+
+// Compute three-point differences for the given points.
+// http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Finite_difference
+function d3_svg_lineFiniteDifferences(points) {
+  var i = 0,
+      j = points.length - 1,
+      m = [],
+      p0 = points[0],
+      p1 = points[1],
+      d = m[0] = d3_svg_lineSlope(p0, p1);
+  while (++i < j) {
+    m[i] = d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]));
+  }
+  m[i] = d;
+  return m;
+}
+
+// Interpolates the given points using Fritsch-Carlson Monotone cubic Hermite
+// interpolation. Returns an array of tangent vectors. For details, see
+// http://en.wikipedia.org/wiki/Monotone_cubic_interpolation
+function d3_svg_lineMonotoneTangents(points) {
+  var tangents = [],
+      d,
+      a,
+      b,
+      s,
+      m = d3_svg_lineFiniteDifferences(points),
+      i = -1,
+      j = points.length - 1;
+
+  // The first two steps are done by computing finite-differences:
+  // 1. Compute the slopes of the secant lines between successive points.
+  // 2. Initialize the tangents at every point as the average of the secants.
+
+  // Then, for each segmentâŠ
+  while (++i < j) {
+    d = d3_svg_lineSlope(points[i], points[i + 1]);
+
+    // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set
+    // mk = m{k + 1} = 0 as the spline connecting these points must be flat to
+    // preserve monotonicity. Ignore step 4 and 5 for those k.
+
+    if (Math.abs(d) < 1e-6) {
+      m[i] = m[i + 1] = 0;
+    } else {
+      // 4. Let ak = mk / dk and bk = m{k + 1} / dk.
+      a = m[i] / d;
+      b = m[i + 1] / d;
+
+      // 5. Prevent overshoot and ensure monotonicity by restricting the
+      // magnitude of vector <ak, bk> to a circle of radius 3.
+      s = a * a + b * b;
+      if (s > 9) {
+        s = d * 3 / Math.sqrt(s);
+        m[i] = s * a;
+        m[i + 1] = s * b;
+      }
+    }
+  }
+
+  // Compute the normalized tangent vector from the slopes. Note that if x is
+  // not monotonic, it's possible that the slope will be infinite, so we protect
+  // against NaN by setting the coordinate to zero.
+  i = -1; while (++i <= j) {
+    s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])
+      / (6 * (1 + m[i] * m[i]));
+    tangents.push([s || 0, m[i] * s || 0]);
+  }
+
+  return tangents;
+}
+
+function d3_svg_lineMonotone(points) {
+  return points.length < 3
+      ? d3_svg_lineLinear(points)
+      : points[0] +
+        d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
+}
Index: Dev/branches/Demo/d3/src/svg/mouse.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/mouse.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/mouse.js	(revision 225)
@@ -0,0 +1,29 @@
+d3.svg.mouse = function(container) {
+  return d3_svg_mousePoint(container, d3.event);
+};
+
+// https://bugs.webkit.org/show_bug.cgi?id=44083
+var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
+
+function d3_svg_mousePoint(container, e) {
+  var point = (container.ownerSVGElement || container).createSVGPoint();
+  if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
+    var svg = d3.select(document.body)
+      .append("svg:svg")
+        .style("position", "absolute")
+        .style("top", 0)
+        .style("left", 0);
+    var ctm = svg[0][0].getScreenCTM();
+    d3_mouse_bug44083 = !(ctm.f || ctm.e);
+    svg.remove();
+  }
+  if (d3_mouse_bug44083) {
+    point.x = e.pageX;
+    point.y = e.pageY;
+  } else {
+    point.x = e.clientX;
+    point.y = e.clientY;
+  }
+  point = point.matrixTransform(container.getScreenCTM().inverse());
+  return [point.x, point.y];
+};
Index: Dev/branches/Demo/d3/src/svg/svg.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/svg.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/svg.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.svg = {};
Index: Dev/branches/Demo/d3/src/svg/symbol.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/symbol.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/symbol.js	(revision 225)
@@ -0,0 +1,98 @@
+d3.svg.symbol = function() {
+  var type = d3_svg_symbolType,
+      size = d3_svg_symbolSize;
+
+  function symbol(d, i) {
+    return (d3_svg_symbols[type.call(this, d, i)]
+        || d3_svg_symbols.circle)
+        (size.call(this, d, i));
+  }
+
+  symbol.type = function(x) {
+    if (!arguments.length) return type;
+    type = d3.functor(x);
+    return symbol;
+  };
+
+  // size of symbol in square pixels
+  symbol.size = function(x) {
+    if (!arguments.length) return size;
+    size = d3.functor(x);
+    return symbol;
+  };
+
+  return symbol;
+};
+
+function d3_svg_symbolSize() {
+  return 64;
+}
+
+function d3_svg_symbolType() {
+  return "circle";
+}
+
+// TODO cross-diagonal?
+var d3_svg_symbols = {
+  "circle": function(size) {
+    var r = Math.sqrt(size / Math.PI);
+    return "M0," + r
+        + "A" + r + "," + r + " 0 1,1 0," + (-r)
+        + "A" + r + "," + r + " 0 1,1 0," + r
+        + "Z";
+  },
+  "cross": function(size) {
+    var r = Math.sqrt(size / 5) / 2;
+    return "M" + -3 * r + "," + -r
+        + "H" + -r
+        + "V" + -3 * r
+        + "H" + r
+        + "V" + -r
+        + "H" + 3 * r
+        + "V" + r
+        + "H" + r
+        + "V" + 3 * r
+        + "H" + -r
+        + "V" + r
+        + "H" + -3 * r
+        + "Z";
+  },
+  "diamond": function(size) {
+    var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)),
+        rx = ry * d3_svg_symbolTan30;
+    return "M0," + -ry
+        + "L" + rx + ",0"
+        + " 0," + ry
+        + " " + -rx + ",0"
+        + "Z";
+  },
+  "square": function(size) {
+    var r = Math.sqrt(size) / 2;
+    return "M" + -r + "," + -r
+        + "L" + r + "," + -r
+        + " " + r + "," + r
+        + " " + -r + "," + r
+        + "Z";
+  },
+  "triangle-down": function(size) {
+    var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
+        ry = rx * d3_svg_symbolSqrt3 / 2;
+    return "M0," + ry
+        + "L" + rx +"," + -ry
+        + " " + -rx + "," + -ry
+        + "Z";
+  },
+  "triangle-up": function(size) {
+    var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
+        ry = rx * d3_svg_symbolSqrt3 / 2;
+    return "M0," + -ry
+        + "L" + rx +"," + ry
+        + " " + -rx + "," + ry
+        + "Z";
+  }
+};
+
+d3.svg.symbolTypes = d3.keys(d3_svg_symbols);
+
+var d3_svg_symbolSqrt3 = Math.sqrt(3),
+    d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
Index: Dev/branches/Demo/d3/src/svg/touches.js
===================================================================
--- Dev/branches/Demo/d3/src/svg/touches.js	(revision 225)
+++ Dev/branches/Demo/d3/src/svg/touches.js	(revision 225)
@@ -0,0 +1,8 @@
+d3.svg.touches = function(container) {
+  var touches = d3.event.touches;
+  return touches ? d3_array(touches).map(function(touch) {
+    var point = d3_svg_mousePoint(container, touch);
+    point.identifier = touch.identifier;
+    return point;
+  }) : [];
+};
Index: Dev/branches/Demo/d3/src/time/day.js
===================================================================
--- Dev/branches/Demo/d3/src/time/day.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/day.js	(revision 225)
@@ -0,0 +1,7 @@
+d3.time.day = function(date) {
+  return new Date(date.getFullYear(), date.getMonth(), date.getDate());
+};
+
+d3.time.day.utc = function(date) {
+  return new Date(~~(date / 864e5) * 864e5);
+};
Index: Dev/branches/Demo/d3/src/time/days.js
===================================================================
--- Dev/branches/Demo/d3/src/time/days.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/days.js	(revision 225)
@@ -0,0 +1,11 @@
+d3.time.days = d3_time_range(d3.time.day, function(date) {
+  date.setDate(date.getDate() + 1);
+}, function(date) {
+  return date.getDate() - 1;
+});
+
+d3.time.days.utc = d3_time_range(d3.time.day.utc, function(date) {
+  date.setUTCDate(date.getUTCDate() + 1);
+}, function(date) {
+  return date.getUTCDate() - 1;
+});
Index: Dev/branches/Demo/d3/src/time/format-iso.js
===================================================================
--- Dev/branches/Demo/d3/src/time/format-iso.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/format-iso.js	(revision 225)
@@ -0,0 +1,1 @@
+d3.time.format.iso = d3.time.format.utc("%Y-%m-%dT%H:%M:%SZ");
Index: Dev/branches/Demo/d3/src/time/format-utc.js
===================================================================
--- Dev/branches/Demo/d3/src/time/format-utc.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/format-utc.js	(revision 225)
@@ -0,0 +1,48 @@
+d3.time.format.utc = function(template) {
+  var local = d3.time.format(template);
+
+  function format(date) {
+    var utc = new d3_time_format_utc();
+    utc._ = date;
+    return local(utc);
+  }
+
+  format.parse = function(string) {
+    try {
+      d3_time = d3_time_format_utc;
+      var date = local.parse(string);
+      return date && date._;
+    } finally {
+      d3_time = Date;
+    }
+  };
+
+  format.toString = local.toString;
+
+  return format;
+};
+
+function d3_time_format_utc() {
+  this._ = new Date(Date.UTC.apply(this, arguments));
+}
+
+d3_time_format_utc.prototype = {
+  getDate: function() { return this._.getUTCDate(); },
+  getDay: function() { return this._.getUTCDay(); },
+  getFullYear: function() { return this._.getUTCFullYear(); },
+  getHours: function() { return this._.getUTCHours(); },
+  getMilliseconds: function() { return this._.getUTCMilliseconds(); },
+  getMinutes: function() { return this._.getUTCMinutes(); },
+  getMonth: function() { return this._.getUTCMonth(); },
+  getSeconds: function() { return this._.getUTCSeconds(); },
+  getTimezoneOffset: function() { return 0; },
+  valueOf: function() { return this._.getTime(); },
+  setDate: function(x) { this._.setUTCDate(x); },
+  setDay: function(x) { this._.setUTCDay(x); },
+  setFullYear: function(x) { this._.setUTCFullYear(x); },
+  setHours: function(x) { this._.setUTCHours(x); },
+  setMilliseconds: function(x) { this._.setUTCMilliseconds(x); },
+  setMinutes: function(x) { this._.setUTCMinutes(x); },
+  setMonth: function(x) { this._.setUTCMonth(x); },
+  setSeconds: function(x) { this._.setUTCSeconds(x); }
+};
Index: Dev/branches/Demo/d3/src/time/format.js
===================================================================
--- Dev/branches/Demo/d3/src/time/format.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/format.js	(revision 225)
@@ -0,0 +1,315 @@
+d3.time.format = function(template) {
+  var n = template.length;
+
+  function format(date) {
+    var string = [],
+        i = -1,
+        j = 0,
+        c,
+        f;
+    while (++i < n) {
+      if (template.charCodeAt(i) == 37) {
+        string.push(
+            template.substring(j, i),
+            (f = d3_time_formats[c = template.charAt(++i)])
+            ? f(date) : c);
+        j = i + 1;
+      }
+    }
+    string.push(template.substring(j, i));
+    return string.join("");
+  }
+
+  format.parse = function(string) {
+    var date = new d3_time(1900, 0, 1),
+        i = d3_time_parse(date, template, string, 0);
+    if (i != string.length) return null;
+    if (date.hour12) {
+      var hours = date.getHours() % 12;
+      date.setHours(date.hour12pm ? hours + 12 : hours);
+    }
+    delete date.hour12;
+    delete date.hour12pm;
+    return date;
+  };
+
+  format.toString = function() {
+    return template;
+  };
+
+  return format;
+};
+
+function d3_time_parse(date, template, string, j) {
+  var c,
+      p,
+      i = 0,
+      n = template.length,
+      m = string.length;
+  while (i < n) {
+    if (j >= m) return -1;
+    c = template.charCodeAt(i++);
+    if (c == 37) {
+      p = d3_time_parsers[template.charAt(i++)];
+      if (!p || ((j = p(date, string, j)) < 0)) return -1;
+    } else if (c != string.charCodeAt(j++)) {
+      return -1;
+    }
+  }
+  return j;
+}
+
+var d3_time_zfill2 = d3.format("02d"),
+    d3_time_zfill3 = d3.format("03d"),
+    d3_time_zfill4 = d3.format("04d"),
+    d3_time_sfill2 = d3.format("2d");
+
+var d3_time_formats = {
+  a: function(d) { return d3_time_weekdays[d.getDay()].substring(0, 3); },
+  A: function(d) { return d3_time_weekdays[d.getDay()]; },
+  b: function(d) { return d3_time_months[d.getMonth()].substring(0, 3); },
+  B: function(d) { return d3_time_months[d.getMonth()]; },
+  c: d3.time.format("%a %b %e %H:%M:%S %Y"),
+  d: function(d) { return d3_time_zfill2(d.getDate()); },
+  e: function(d) { return d3_time_sfill2(d.getDate()); },
+  H: function(d) { return d3_time_zfill2(d.getHours()); },
+  I: function(d) { return d3_time_zfill2(d.getHours() % 12 || 12); },
+  j: d3_time_dayOfYear,
+  m: function(d) { return d3_time_zfill2(d.getMonth() + 1); },
+  M: function(d) { return d3_time_zfill2(d.getMinutes()); },
+  p: function(d) { return d.getHours() >= 12 ? "PM" : "AM"; },
+  S: function(d) { return d3_time_zfill2(d.getSeconds()); },
+  U: d3_time_weekNumberSunday,
+  w: function(d) { return d.getDay(); },
+  W: d3_time_weekNumberMonday,
+  x: d3.time.format("%m/%d/%y"),
+  X: d3.time.format("%H:%M:%S"),
+  y: function(d) { return d3_time_zfill2(d.getFullYear() % 100); },
+  Y: function(d) { return d3_time_zfill4(d.getFullYear() % 10000); },
+  Z: d3_time_zone,
+  "%": function(d) { return "%"; }
+};
+
+var d3_time_parsers = {
+  a: d3_time_parseWeekdayAbbrev,
+  A: d3_time_parseWeekday,
+  b: d3_time_parseMonthAbbrev,
+  B: d3_time_parseMonth,
+  c: d3_time_parseLocaleFull,
+  d: d3_time_parseDay,
+  e: d3_time_parseDay,
+  H: d3_time_parseHour24,
+  I: d3_time_parseHour12,
+  // j: function(d, s, i) { /*TODO day of year [001,366] */ return i; },
+  m: d3_time_parseMonthNumber,
+  M: d3_time_parseMinutes,
+  p: d3_time_parseAmPm,
+  S: d3_time_parseSeconds,
+  // U: function(d, s, i) { /*TODO week number (sunday) [00,53] */ return i; },
+  // w: function(d, s, i) { /*TODO weekday [0,6] */ return i; },
+  // W: function(d, s, i) { /*TODO week number (monday) [00,53] */ return i; },
+  x: d3_time_parseLocaleDate,
+  X: d3_time_parseLocaleTime,
+  y: d3_time_parseYear,
+  Y: d3_time_parseFullYear
+  // ,
+  // Z: function(d, s, i) { /*TODO time zone */ return i; },
+  // "%": function(d, s, i) { /*TODO literal % */ return i; }
+};
+
+// Note: weekday is validated, but does not set the date.
+function d3_time_parseWeekdayAbbrev(date, string, i) {
+  return string.substring(i, i += 3).toLowerCase() in d3_time_weekdayAbbrevLookup ? i : -1;
+}
+
+var d3_time_weekdayAbbrevLookup = {
+  sun: 3,
+  mon: 3,
+  tue: 3,
+  wed: 3,
+  thu: 3,
+  fri: 3,
+  sat: 3
+};
+
+// Note: weekday is validated, but does not set the date.
+function d3_time_parseWeekday(date, string, i) {
+  d3_time_weekdayRe.lastIndex = 0;
+  var n = d3_time_weekdayRe.exec(string.substring(i, i + 10));
+  return n ? i += n[0].length : -1;
+}
+
+var d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/ig;
+
+var d3_time_weekdays = [
+  "Sunday",
+  "Monday",
+  "Tuesday",
+  "Wednesday",
+  "Thursday",
+  "Friday",
+  "Saturday"
+];
+
+function d3_time_parseMonthAbbrev(date, string, i) {
+  var n = d3_time_monthAbbrevLookup[string.substring(i, i += 3).toLowerCase()];
+  return n == null ? -1 : (date.setMonth(n), i);
+}
+
+var d3_time_monthAbbrevLookup = {
+  jan: 0,
+  feb: 1,
+  mar: 2,
+  apr: 3,
+  may: 4,
+  jun: 5,
+  jul: 6,
+  aug: 7,
+  sep: 8,
+  oct: 9,
+  nov: 10,
+  dec: 11
+};
+
+function d3_time_parseMonth(date, string, i) {
+  d3_time_monthRe.lastIndex = 0;
+  var n = d3_time_monthRe.exec(string.substring(i, i + 12));
+  return n ? (date.setMonth(d3_time_monthLookup[n[0].toLowerCase()]), i += n[0].length) : -1;
+}
+
+var d3_time_monthRe = /^(?:January|February|March|April|May|June|July|August|September|October|November|December)/ig;
+
+var d3_time_monthLookup = {
+  january: 0,
+  february: 1,
+  march: 2,
+  april: 3,
+  may: 4,
+  june: 5,
+  july: 6,
+  august: 7,
+  september: 8,
+  october: 9,
+  november: 10,
+  december: 11
+};
+
+var d3_time_months = [
+  "January",
+  "February",
+  "March",
+  "April",
+  "May",
+  "June",
+  "July",
+  "August",
+  "September",
+  "October",
+  "November",
+  "December"
+];
+
+function d3_time_parseLocaleFull(date, string, i) {
+  return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
+}
+
+function d3_time_parseLocaleDate(date, string, i) {
+  return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
+}
+
+function d3_time_parseLocaleTime(date, string, i) {
+  return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
+}
+
+function d3_time_parseFullYear(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 4));
+  return n ? (date.setFullYear(n[0]), i += n[0].length) : -1;
+}
+
+function d3_time_parseYear(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setFullYear(d3_time_century() + +n[0]), i += n[0].length) : -1;
+}
+
+function d3_time_century() {
+  return ~~(new Date().getFullYear() / 1000) * 1000;
+}
+
+function d3_time_parseMonthNumber(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setMonth(n[0] - 1), i += n[0].length) : -1;
+}
+
+function d3_time_parseDay(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setDate(+n[0]), i += n[0].length) : -1;
+}
+
+// Note: we don't validate that the hour is in the range [0,23].
+function d3_time_parseHour24(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setHours(+n[0]), i += n[0].length) : -1;
+}
+
+// Note: we don't validate that the hour is in the range [1,12].
+function d3_time_parseHour12(date, string, i) {
+  date.hour12 = true;
+  return d3_time_parseHour24(date, string, i);
+}
+
+function d3_time_parseMinutes(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setMinutes(+n[0]), i += n[0].length) : -1;
+}
+
+function d3_time_parseSeconds(date, string, i) {
+  d3_time_numberRe.lastIndex = 0;
+  var n = d3_time_numberRe.exec(string.substring(i, i + 2));
+  return n ? (date.setSeconds(+n[0]), i += n[0].length) : -1;
+}
+
+// Note: we don't look at the next directive.
+var d3_time_numberRe = /\s*\d+/;
+
+function d3_time_parseAmPm(date, string, i) {
+  var n = d3_time_amPmLookup[string.substring(i, i += 2).toLowerCase()];
+  return n == null ? -1 : (date.hour12pm = n, i);
+}
+
+var d3_time_amPmLookup = {
+  am: 0,
+  pm: 1
+};
+
+function d3_time_year(d) {
+  return new d3_time(d.getFullYear(), 0, 1);
+}
+
+function d3_time_dayOfYear(d) {
+  return d3_time_zfill3(1 + ~~((d - d3_time_year(d)) / 864e5));
+}
+
+function d3_time_weekNumberSunday(d) {
+  var d0 = d3_time_year(d);
+  return d3_time_zfill2(~~(((d - d0) / 864e5 + d0.getDay()) / 7));
+}
+
+function d3_time_weekNumberMonday(d) {
+  var d0 = d3_time_year(d);
+  return d3_time_zfill2(~~(((d - d0) / 864e5 + (d0.getDay() + 6) % 7) / 7));
+}
+
+// TODO table of time zone offset names?
+function d3_time_zone(d) {
+  var z = d.getTimezoneOffset(),
+      zs = z > 0 ? "-" : "+",
+      zh = ~~(Math.abs(z) / 60),
+      zm = Math.abs(z) % 60;
+  return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
+}
Index: Dev/branches/Demo/d3/src/time/hour.js
===================================================================
--- Dev/branches/Demo/d3/src/time/hour.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/hour.js	(revision 225)
@@ -0,0 +1,8 @@
+d3.time.hour = function(date) {
+  var offset = date.getTimezoneOffset() / 60;
+  return new Date((~~(date / 36e5 - offset) + offset) * 36e5);
+};
+
+d3.time.hour.utc = function(date) {
+  return new Date(~~(date / 36e5) * 36e5);
+};
Index: Dev/branches/Demo/d3/src/time/hours.js
===================================================================
--- Dev/branches/Demo/d3/src/time/hours.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/hours.js	(revision 225)
@@ -0,0 +1,11 @@
+d3.time.hours = d3_time_range(d3.time.hour, d3_time_hoursStep, function(date) {
+  return date.getHours();
+});
+
+d3.time.hours.utc = d3_time_range(d3.time.hour.utc, d3_time_hoursStep, function(date) {
+  return date.getUTCHours();
+});
+
+function d3_time_hoursStep(date) {
+  date.setTime(date.getTime() + 36e5);
+}
Index: Dev/branches/Demo/d3/src/time/minute.js
===================================================================
--- Dev/branches/Demo/d3/src/time/minute.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/minute.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.time.minute = function(date) {
+  return new Date(~~(date / 6e4) * 6e4);
+};
+
+d3.time.minute.utc = d3.time.minute;
Index: Dev/branches/Demo/d3/src/time/minutes.js
===================================================================
--- Dev/branches/Demo/d3/src/time/minutes.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/minutes.js	(revision 225)
@@ -0,0 +1,11 @@
+d3.time.minutes = d3_time_range(d3.time.minute, d3_time_minutesStep, function(date) {
+  return date.getMinutes();
+});
+
+d3.time.minutes.utc = d3_time_range(d3.time.minute, d3_time_minutesStep, function(date) {
+  return date.getUTCMinutes();
+});
+
+function d3_time_minutesStep(date) {
+  date.setTime(date.getTime() + 6e4); // assumes no leap seconds
+}
Index: Dev/branches/Demo/d3/src/time/month.js
===================================================================
--- Dev/branches/Demo/d3/src/time/month.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/month.js	(revision 225)
@@ -0,0 +1,7 @@
+d3.time.month = function(date) {
+  return new Date(date.getFullYear(), date.getMonth(), 1);
+};
+
+d3.time.month.utc = function(date) {
+  return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1));
+};
Index: Dev/branches/Demo/d3/src/time/months.js
===================================================================
--- Dev/branches/Demo/d3/src/time/months.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/months.js	(revision 225)
@@ -0,0 +1,11 @@
+d3.time.months = d3_time_range(d3.time.month, function(date) {
+  date.setMonth(date.getMonth() + 1);
+}, function(date) {
+  return date.getMonth();
+});
+
+d3.time.months.utc = d3_time_range(d3.time.month.utc, function(date) {
+  date.setUTCMonth(date.getUTCMonth() + 1);
+}, function(date) {
+  return date.getUTCMonth();
+});
Index: Dev/branches/Demo/d3/src/time/range.js
===================================================================
--- Dev/branches/Demo/d3/src/time/range.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/range.js	(revision 225)
@@ -0,0 +1,16 @@
+function d3_time_range(floor, step, number) {
+  return function(t0, t1, dt) {
+    var time = floor(t0), times = [];
+    if (time < t0) step(time);
+    if (dt > 1) {
+      while (time < t1) {
+        var date = new Date(+time);
+        if (!(number(date) % dt)) times.push(date);
+        step(time);
+      }
+    } else {
+      while (time < t1) times.push(new Date(+time)), step(time);
+    }
+    return times;
+  };
+}
Index: Dev/branches/Demo/d3/src/time/scale-utc.js
===================================================================
--- Dev/branches/Demo/d3/src/time/scale-utc.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/scale-utc.js	(revision 225)
@@ -0,0 +1,36 @@
+var d3_time_scaleUTCMethods = [
+  [d3.time.seconds.utc, 1],
+  [d3.time.seconds.utc, 5],
+  [d3.time.seconds.utc, 15],
+  [d3.time.seconds.utc, 30],
+  [d3.time.minutes.utc, 1],
+  [d3.time.minutes.utc, 5],
+  [d3.time.minutes.utc, 15],
+  [d3.time.minutes.utc, 30],
+  [d3.time.hours.utc, 1],
+  [d3.time.hours.utc, 3],
+  [d3.time.hours.utc, 6],
+  [d3.time.hours.utc, 12],
+  [d3.time.days.utc, 1],
+  [d3.time.days.utc, 2],
+  [d3.time.weeks.utc, 1],
+  [d3.time.months.utc, 1],
+  [d3.time.months.utc, 3],
+  [d3.time.years.utc, 1]
+];
+
+var d3_time_scaleUTCFormats = [
+  [d3.time.format.utc("%Y"), function(d) { return true; }],
+  [d3.time.format.utc("%B"), function(d) { return d.getUTCMonth(); }],
+  [d3.time.format.utc("%b %d"), function(d) { return d.getUTCDate() != 1; }],
+  [d3.time.format.utc("%a %d"), function(d) { return d.getUTCDay() && d.getUTCDate() != 1; }],
+  [d3.time.format.utc("%I %p"), function(d) { return d.getUTCHours(); }],
+  [d3.time.format.utc("%I:%M"), function(d) { return d.getUTCMinutes(); }],
+  [d3.time.format.utc(":%S"), function(d) { return d.getUTCSeconds() || d.getUTCMilliseconds(); }]
+];
+
+var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
+
+d3.time.scale.utc = function() {
+  return d3_time_scale(d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
+};
Index: Dev/branches/Demo/d3/src/time/scale.js
===================================================================
--- Dev/branches/Demo/d3/src/time/scale.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/scale.js	(revision 225)
@@ -0,0 +1,120 @@
+// TODO nice
+function d3_time_scale(methods, format) {
+  var linear = d3.scale.linear();
+
+  function scale(x) {
+    return linear(x);
+  }
+
+  scale.invert = function(x) {
+    return d3_time_scaleDate(linear.invert(x));
+  };
+
+  scale.domain = function(x) {
+    if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
+    linear.domain(x);
+    return scale;
+  };
+
+  scale.ticks = function(m, k) {
+    var extent = d3_time_scaleExtent(scale.domain());
+    if (typeof m !== "function") {
+      var span = extent[1] - extent[0],
+          target = span / m,
+          i = d3.bisect(d3_time_scaleSteps, target, 1, d3_time_scaleSteps.length - 1);
+      if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
+      m = methods[i];
+      k = m[1];
+      m = m[0];
+    }
+    return m(extent[0], extent[1], k);
+  };
+
+  scale.tickFormat = function() {
+    return format;
+  };
+
+  // TOOD expose d3_scale_linear_rebind?
+  scale.range = d3.rebind(scale, linear.range);
+  scale.rangeRound = d3.rebind(scale, linear.rangeRound);
+  scale.interpolate = d3.rebind(scale, linear.interpolate);
+  scale.clamp = d3.rebind(scale, linear.clamp);
+
+  return scale;
+}
+
+// TODO expose d3_scaleExtent?
+function d3_time_scaleExtent(domain) {
+  var start = domain[0], stop = domain[domain.length - 1];
+  return start < stop ? [start, stop] : [stop, start];
+}
+
+function d3_time_scaleDate(t) {
+  return new Date(t);
+}
+
+function d3_time_scaleFormat(formats) {
+  return function(date) {
+    var i = formats.length - 1, f = formats[i];
+    while (!f[1](date)) f = formats[--i];
+    return f[0](date);
+  };
+}
+
+var d3_time_scaleSteps = [
+  1e3,    // 1-second
+  5e3,    // 5-second
+  15e3,   // 15-second
+  3e4,    // 30-second
+  6e4,    // 1-minute
+  3e5,    // 5-minute
+  9e5,    // 15-minute
+  18e5,   // 30-minute
+  36e5,   // 1-hour
+  108e5,  // 3-hour
+  216e5,  // 6-hour
+  432e5,  // 12-hour
+  864e5,  // 1-day
+  1728e5, // 2-day
+  6048e5, // 1-week
+  1728e6, // 1-month
+  7776e6, // 3-month
+  31536e6 // 1-year
+];
+
+var d3_time_scaleLocalMethods = [
+  [d3.time.seconds, 1],
+  [d3.time.seconds, 5],
+  [d3.time.seconds, 15],
+  [d3.time.seconds, 30],
+  [d3.time.minutes, 1],
+  [d3.time.minutes, 5],
+  [d3.time.minutes, 15],
+  [d3.time.minutes, 30],
+  [d3.time.hours, 1],
+  [d3.time.hours, 3],
+  [d3.time.hours, 6],
+  [d3.time.hours, 12],
+  [d3.time.days, 1],
+  [d3.time.days, 2],
+  [d3.time.weeks, 1],
+  [d3.time.months, 1],
+  [d3.time.months, 3],
+  [d3.time.years, 1]
+];
+
+var d3_time_scaleLocalFormats = [
+  [d3.time.format("%Y"), function(d) { return true; }],
+  [d3.time.format("%B"), function(d) { return d.getMonth(); }],
+  [d3.time.format("%b %d"), function(d) { return d.getDate() != 1; }],
+  [d3.time.format("%a %d"), function(d) { return d.getDay() && d.getDate() != 1; }],
+  [d3.time.format("%I %p"), function(d) { return d.getHours(); }],
+  [d3.time.format("%I:%M"), function(d) { return d.getMinutes(); }],
+  [d3.time.format(":%S"), function(d) { return d.getSeconds() || d.getMilliseconds(); }]
+];
+
+var d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
+
+d3.time.scale = function() {
+  return d3_time_scale(d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
+};
Index: Dev/branches/Demo/d3/src/time/second.js
===================================================================
--- Dev/branches/Demo/d3/src/time/second.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/second.js	(revision 225)
@@ -0,0 +1,5 @@
+d3.time.second = function(date) {
+  return new Date(~~(date / 1e3) * 1e3);
+};
+
+d3.time.second.utc = d3.time.second;
Index: Dev/branches/Demo/d3/src/time/seconds.js
===================================================================
--- Dev/branches/Demo/d3/src/time/seconds.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/seconds.js	(revision 225)
@@ -0,0 +1,7 @@
+d3.time.seconds = d3_time_range(d3.time.second, function(date) {
+  date.setTime(date.getTime() + 1e3);
+}, function(date) {
+  return date.getSeconds();
+});
+
+d3.time.seconds.utc = d3.time.seconds;
Index: Dev/branches/Demo/d3/src/time/time.js
===================================================================
--- Dev/branches/Demo/d3/src/time/time.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/time.js	(revision 225)
@@ -0,0 +1,3 @@
+d3.time = {};
+
+var d3_time = Date;
Index: Dev/branches/Demo/d3/src/time/week.js
===================================================================
--- Dev/branches/Demo/d3/src/time/week.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/week.js	(revision 225)
@@ -0,0 +1,9 @@
+d3.time.week = function(date) {
+  (date = d3.time.day(date)).setDate(date.getDate() - date.getDay());
+  return date;
+};
+
+d3.time.week.utc = function(date) {
+  (date = d3.time.day.utc(date)).setUTCDate(date.getUTCDate() - date.getUTCDay());
+  return date;
+};
Index: Dev/branches/Demo/d3/src/time/weeks.js
===================================================================
--- Dev/branches/Demo/d3/src/time/weeks.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/weeks.js	(revision 225)
@@ -0,0 +1,11 @@
+d3.time.weeks = d3_time_range(d3.time.week, function(date) {
+  date.setDate(date.getDate() + 7);
+}, function(date) {
+  return ~~((date - new Date(date.getFullYear(), 0, 1)) / 6048e5);
+});
+
+d3.time.weeks.utc = d3_time_range(d3.time.week.utc, function(date) {
+  date.setUTCDate(date.getUTCDate() + 7);
+}, function(date) {
+  return ~~((date - Date.UTC(date.getUTCFullYear(), 0, 1)) / 6048e5);
+});
Index: Dev/branches/Demo/d3/src/time/year.js
===================================================================
--- Dev/branches/Demo/d3/src/time/year.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/year.js	(revision 225)
@@ -0,0 +1,7 @@
+d3.time.year = function(date) {
+  return new Date(date.getFullYear(), 0, 1);
+};
+
+d3.time.year.utc = function(date) {
+  return new Date(Date.UTC(date.getUTCFullYear(), 0, 1));
+};
Index: Dev/branches/Demo/d3/src/time/years.js
===================================================================
--- Dev/branches/Demo/d3/src/time/years.js	(revision 225)
+++ Dev/branches/Demo/d3/src/time/years.js	(revision 225)
@@ -0,0 +1,11 @@
+d3.time.years = d3_time_range(d3.time.year, function(date) {
+  date.setFullYear(date.getFullYear() + 1);
+}, function(date) {
+  return date.getFullYear();
+});
+
+d3.time.years.utc = d3_time_range(d3.time.year.utc, function(date) {
+  date.setUTCFullYear(date.getUTCFullYear() + 1);
+}, function(date) {
+  return date.getUTCFullYear();
+});
Index: Dev/branches/Demo/d3/test/barley.json
===================================================================
--- Dev/branches/Demo/d3/test/barley.json	(revision 225)
+++ Dev/branches/Demo/d3/test/barley.json	(revision 225)
@@ -0,0 +1,122 @@
+[
+{"yield":27.00000,"variety":"Manchuria","year":1931,"site":"University Farm"},
+{"yield":48.86667,"variety":"Manchuria","year":1931,"site":"Waseca"},
+{"yield":27.43334,"variety":"Manchuria","year":1931,"site":"Morris"},
+{"yield":39.93333,"variety":"Manchuria","year":1931,"site":"Crookston"},
+{"yield":32.96667,"variety":"Manchuria","year":1931,"site":"Grand Rapids"},
+{"yield":28.96667,"variety":"Manchuria","year":1931,"site":"Duluth"},
+{"yield":43.06666,"variety":"Glabron","year":1931,"site":"University Farm"},
+{"yield":55.20000,"variety":"Glabron","year":1931,"site":"Waseca"},
+{"yield":28.76667,"variety":"Glabron","year":1931,"site":"Morris"},
+{"yield":38.13333,"variety":"Glabron","year":1931,"site":"Crookston"},
+{"yield":29.13333,"variety":"Glabron","year":1931,"site":"Grand Rapids"},
+{"yield":29.66667,"variety":"Glabron","year":1931,"site":"Duluth"},
+{"yield":35.13333,"variety":"Svansota","year":1931,"site":"University Farm"},
+{"yield":47.33333,"variety":"Svansota","year":1931,"site":"Waseca"},
+{"yield":25.76667,"variety":"Svansota","year":1931,"site":"Morris"},
+{"yield":40.46667,"variety":"Svansota","year":1931,"site":"Crookston"},
+{"yield":29.66667,"variety":"Svansota","year":1931,"site":"Grand Rapids"},
+{"yield":25.70000,"variety":"Svansota","year":1931,"site":"Duluth"},
+{"yield":39.90000,"variety":"Velvet","year":1931,"site":"University Farm"},
+{"yield":50.23333,"variety":"Velvet","year":1931,"site":"Waseca"},
+{"yield":26.13333,"variety":"Velvet","year":1931,"site":"Morris"},
+{"yield":41.33333,"variety":"Velvet","year":1931,"site":"Crookston"},
+{"yield":23.03333,"variety":"Velvet","year":1931,"site":"Grand Rapids"},
+{"yield":26.30000,"variety":"Velvet","year":1931,"site":"Duluth"},
+{"yield":36.56666,"variety":"Trebi","year":1931,"site":"University Farm"},
+{"yield":63.83330,"variety":"Trebi","year":1931,"site":"Waseca"},
+{"yield":43.76667,"variety":"Trebi","year":1931,"site":"Morris"},
+{"yield":46.93333,"variety":"Trebi","year":1931,"site":"Crookston"},
+{"yield":29.76667,"variety":"Trebi","year":1931,"site":"Grand Rapids"},
+{"yield":33.93333,"variety":"Trebi","year":1931,"site":"Duluth"},
+{"yield":43.26667,"variety":"No. 457","year":1931,"site":"University Farm"},
+{"yield":58.10000,"variety":"No. 457","year":1931,"site":"Waseca"},
+{"yield":28.70000,"variety":"No. 457","year":1931,"site":"Morris"},
+{"yield":45.66667,"variety":"No. 457","year":1931,"site":"Crookston"},
+{"yield":32.16667,"variety":"No. 457","year":1931,"site":"Grand Rapids"},
+{"yield":33.60000,"variety":"No. 457","year":1931,"site":"Duluth"},
+{"yield":36.60000,"variety":"No. 462","year":1931,"site":"University Farm"},
+{"yield":65.76670,"variety":"No. 462","year":1931,"site":"Waseca"},
+{"yield":30.36667,"variety":"No. 462","year":1931,"site":"Morris"},
+{"yield":48.56666,"variety":"No. 462","year":1931,"site":"Crookston"},
+{"yield":24.93334,"variety":"No. 462","year":1931,"site":"Grand Rapids"},
+{"yield":28.10000,"variety":"No. 462","year":1931,"site":"Duluth"},
+{"yield":32.76667,"variety":"Peatland","year":1931,"site":"University Farm"},
+{"yield":48.56666,"variety":"Peatland","year":1931,"site":"Waseca"},
+{"yield":29.86667,"variety":"Peatland","year":1931,"site":"Morris"},
+{"yield":41.60000,"variety":"Peatland","year":1931,"site":"Crookston"},
+{"yield":34.70000,"variety":"Peatland","year":1931,"site":"Grand Rapids"},
+{"yield":32.00000,"variety":"Peatland","year":1931,"site":"Duluth"},
+{"yield":24.66667,"variety":"No. 475","year":1931,"site":"University Farm"},
+{"yield":46.76667,"variety":"No. 475","year":1931,"site":"Waseca"},
+{"yield":22.60000,"variety":"No. 475","year":1931,"site":"Morris"},
+{"yield":44.10000,"variety":"No. 475","year":1931,"site":"Crookston"},
+{"yield":19.70000,"variety":"No. 475","year":1931,"site":"Grand Rapids"},
+{"yield":33.06666,"variety":"No. 475","year":1931,"site":"Duluth"},
+{"yield":39.30000,"variety":"Wisconsin No. 38","year":1931,"site":"University Farm"},
+{"yield":58.80000,"variety":"Wisconsin No. 38","year":1931,"site":"Waseca"},
+{"yield":29.46667,"variety":"Wisconsin No. 38","year":1931,"site":"Morris"},
+{"yield":49.86667,"variety":"Wisconsin No. 38","year":1931,"site":"Crookston"},
+{"yield":34.46667,"variety":"Wisconsin No. 38","year":1931,"site":"Grand Rapids"},
+{"yield":31.60000,"variety":"Wisconsin No. 38","year":1931,"site":"Duluth"},
+{"yield":26.90000,"variety":"Manchuria","year":1932,"site":"University Farm"},
+{"yield":33.46667,"variety":"Manchuria","year":1932,"site":"Waseca"},
+{"yield":34.36666,"variety":"Manchuria","year":1932,"site":"Morris"},
+{"yield":32.96667,"variety":"Manchuria","year":1932,"site":"Crookston"},
+{"yield":22.13333,"variety":"Manchuria","year":1932,"site":"Grand Rapids"},
+{"yield":22.56667,"variety":"Manchuria","year":1932,"site":"Duluth"},
+{"yield":36.80000,"variety":"Glabron","year":1932,"site":"University Farm"},
+{"yield":37.73333,"variety":"Glabron","year":1932,"site":"Waseca"},
+{"yield":35.13333,"variety":"Glabron","year":1932,"site":"Morris"},
+{"yield":26.16667,"variety":"Glabron","year":1932,"site":"Crookston"},
+{"yield":14.43333,"variety":"Glabron","year":1932,"site":"Grand Rapids"},
+{"yield":25.86667,"variety":"Glabron","year":1932,"site":"Duluth"},
+{"yield":27.43334,"variety":"Svansota","year":1932,"site":"University Farm"},
+{"yield":38.50000,"variety":"Svansota","year":1932,"site":"Waseca"},
+{"yield":35.03333,"variety":"Svansota","year":1932,"site":"Morris"},
+{"yield":20.63333,"variety":"Svansota","year":1932,"site":"Crookston"},
+{"yield":16.63333,"variety":"Svansota","year":1932,"site":"Grand Rapids"},
+{"yield":22.23333,"variety":"Svansota","year":1932,"site":"Duluth"},
+{"yield":26.80000,"variety":"Velvet","year":1932,"site":"University Farm"},
+{"yield":37.40000,"variety":"Velvet","year":1932,"site":"Waseca"},
+{"yield":38.83333,"variety":"Velvet","year":1932,"site":"Morris"},
+{"yield":32.06666,"variety":"Velvet","year":1932,"site":"Crookston"},
+{"yield":32.23333,"variety":"Velvet","year":1932,"site":"Grand Rapids"},
+{"yield":22.46667,"variety":"Velvet","year":1932,"site":"Duluth"},
+{"yield":29.06667,"variety":"Trebi","year":1932,"site":"University Farm"},
+{"yield":49.23330,"variety":"Trebi","year":1932,"site":"Waseca"},
+{"yield":46.63333,"variety":"Trebi","year":1932,"site":"Morris"},
+{"yield":41.83333,"variety":"Trebi","year":1932,"site":"Crookston"},
+{"yield":20.63333,"variety":"Trebi","year":1932,"site":"Grand Rapids"},
+{"yield":30.60000,"variety":"Trebi","year":1932,"site":"Duluth"},
+{"yield":26.43334,"variety":"No. 457","year":1932,"site":"University Farm"},
+{"yield":42.20000,"variety":"No. 457","year":1932,"site":"Waseca"},
+{"yield":43.53334,"variety":"No. 457","year":1932,"site":"Morris"},
+{"yield":34.33333,"variety":"No. 457","year":1932,"site":"Crookston"},
+{"yield":19.46667,"variety":"No. 457","year":1932,"site":"Grand Rapids"},
+{"yield":22.70000,"variety":"No. 457","year":1932,"site":"Duluth"},
+{"yield":25.56667,"variety":"No. 462","year":1932,"site":"University Farm"},
+{"yield":44.70000,"variety":"No. 462","year":1932,"site":"Waseca"},
+{"yield":47.00000,"variety":"No. 462","year":1932,"site":"Morris"},
+{"yield":30.53333,"variety":"No. 462","year":1932,"site":"Crookston"},
+{"yield":19.90000,"variety":"No. 462","year":1932,"site":"Grand Rapids"},
+{"yield":22.50000,"variety":"No. 462","year":1932,"site":"Duluth"},
+{"yield":28.06667,"variety":"Peatland","year":1932,"site":"University Farm"},
+{"yield":36.03333,"variety":"Peatland","year":1932,"site":"Waseca"},
+{"yield":43.20000,"variety":"Peatland","year":1932,"site":"Morris"},
+{"yield":25.23333,"variety":"Peatland","year":1932,"site":"Crookston"},
+{"yield":26.76667,"variety":"Peatland","year":1932,"site":"Grand Rapids"},
+{"yield":31.36667,"variety":"Peatland","year":1932,"site":"Duluth"},
+{"yield":30.00000,"variety":"No. 475","year":1932,"site":"University Farm"},
+{"yield":41.26667,"variety":"No. 475","year":1932,"site":"Waseca"},
+{"yield":44.23333,"variety":"No. 475","year":1932,"site":"Morris"},
+{"yield":32.13333,"variety":"No. 475","year":1932,"site":"Crookston"},
+{"yield":15.23333,"variety":"No. 475","year":1932,"site":"Grand Rapids"},
+{"yield":27.36667,"variety":"No. 475","year":1932,"site":"Duluth"},
+{"yield":38.00000,"variety":"Wisconsin No. 38","year":1932,"site":"University Farm"},
+{"yield":58.16667,"variety":"Wisconsin No. 38","year":1932,"site":"Waseca"},
+{"yield":47.16667,"variety":"Wisconsin No. 38","year":1932,"site":"Morris"},
+{"yield":35.90000,"variety":"Wisconsin No. 38","year":1932,"site":"Crookston"},
+{"yield":20.66667,"variety":"Wisconsin No. 38","year":1932,"site":"Grand Rapids"},
+{"yield":29.33333,"variety":"Wisconsin No. 38","year":1932,"site":"Duluth"}
+]
Index: Dev/branches/Demo/d3/test/core/test-append.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-append.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-append.js	(revision 225)
@@ -0,0 +1,15 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+d3.select("body").append("svg:svg");
+
+console.log("append svg:svg:");
+console.log("  ", document.body.innerHTML);
+console.log("");
+
+d3.select("body").append("div");
+
+console.log("append div:");
+console.log("  ", document.body.innerHTML);
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-append.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-append.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-append.out	(revision 225)
@@ -0,0 +1,6 @@
+append svg:svg:
+   <svg/>
+
+append div:
+   <svg/><div/>
+
Index: Dev/branches/Demo/d3/test/core/test-attr.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-attr.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-attr.js	(revision 225)
@@ -0,0 +1,24 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+d3.select("body").append("svg:svg")
+    .attr("width", "960")
+    .attr("height", "500");
+
+console.log("constant attr:");
+console.log("  ", document.body.innerHTML);
+console.log("");
+
+d3.select("body").selectAll("div")
+    .data("abcdefghijk".split(""))
+  .enter().append("div")
+    .attr("value", function(d, i) { return d; })
+    .attr("index", function(d, i) { return i; });
+
+console.log("function attr:");
+d3.selectAll("div").each(function() {
+  var d = d3.select(this);
+  console.log("  ", d.attr("value"), d.attr("index"));
+});
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-attr.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-attr.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-attr.out	(revision 225)
@@ -0,0 +1,16 @@
+constant attr:
+   <svg width="960" height="500"/>
+
+function attr:
+   a 0
+   b 1
+   c 2
+   d 3
+   e 4
+   f 5
+   g 6
+   h 7
+   i 8
+   j 9
+   k 10
+
Index: Dev/branches/Demo/d3/test/core/test-bisect.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-bisect.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-bisect.js	(revision 225)
@@ -0,0 +1,66 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var a = [1,2,3,4],
+    l = d3.bisectLeft,
+    r = d3.bisectRight;
+
+console.log("exact match:");
+console.log("    -1 ->", l(a, -1), r(a, -1));
+console.log("     0 ->", l(a, 0), r(a, 0));
+console.log("     1 ->", l(a, 1), r(a, 1));
+console.log("     2 ->", l(a, 2), r(a, 2));
+console.log("     3 ->", l(a, 3), r(a, 3));
+console.log("     4 ->", l(a, 4), r(a, 4));
+console.log("     5 ->", l(a, 5), r(a, 5));
+console.log("");
+
+console.log("non-exact match:");
+console.log("   -.1 ->", l(a, -.1), r(a, -.1));
+console.log("    .1 ->", l(a, .1), r(a, .1));
+console.log("   1.1 ->", l(a, 1.1), r(a, 1.1));
+console.log("   2.1 ->", l(a, 2.1), r(a, 2.1));
+console.log("   3.1 ->", l(a, 3.1), r(a, 3.1));
+console.log("   4.1 ->", l(a, 4.1), r(a, 4.1));
+console.log("   5.1 ->", l(a, 5.1), r(a, 5.1));
+console.log("");
+
+console.log("weird values:");
+console.log("        NaN ->", l(a, NaN), r(a, NaN));
+console.log("   Infinity ->", l(a, Infinity), r(a, Infinity));
+console.log("  -Infinity ->", l(a, -Infinity), r(a, -Infinity));
+console.log("");
+
+console.log("d3.bisect === d3.bisectRight:");
+console.log("  ", d3.bisect === r);
+console.log("");
+
+console.log("lo:");
+console.log("    -1 ->", l(a, -1, 2), r(a, -1, 2));
+console.log("     0 ->", l(a, 0, 2), r(a, 0, 2));
+console.log("     1 ->", l(a, 1, 2), r(a, 1, 2));
+console.log("     2 ->", l(a, 2, 2), r(a, 2, 2));
+console.log("     3 ->", l(a, 3, 2), r(a, 3, 2));
+console.log("     4 ->", l(a, 4, 2), r(a, 4, 2));
+console.log("     5 ->", l(a, 5, 2), r(a, 5, 2));
+console.log("");
+
+console.log("hi:");
+console.log("    -1 ->", l(a, -1, 0, 2), r(a, -1, 0, 2));
+console.log("     0 ->", l(a, 0, 0, 2), r(a, 0, 0, 2));
+console.log("     1 ->", l(a, 1, 0, 2), r(a, 1, 0, 2));
+console.log("     2 ->", l(a, 2, 0, 2), r(a, 2, 0, 2));
+console.log("     3 ->", l(a, 3, 0, 2), r(a, 3, 0, 2));
+console.log("     4 ->", l(a, 4, 0, 2), r(a, 4, 0, 2));
+console.log("     5 ->", l(a, 5, 0, 2), r(a, 5, 0, 2));
+console.log("");
+
+console.log("lo and hi:");
+console.log("    -1 ->", l(a, -1, 1, 3), r(a, -1, 1, 3));
+console.log("     0 ->", l(a, 0, 1, 3), r(a, 0, 1, 3));
+console.log("     1 ->", l(a, 1, 1, 3), r(a, 1, 1, 3));
+console.log("     2 ->", l(a, 2, 1, 3), r(a, 2, 1, 3));
+console.log("     3 ->", l(a, 3, 1, 3), r(a, 3, 1, 3));
+console.log("     4 ->", l(a, 4, 1, 3), r(a, 4, 1, 3));
+console.log("     5 ->", l(a, 5, 1, 3), r(a, 5, 1, 3));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-bisect.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-bisect.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-bisect.out	(revision 225)
@@ -0,0 +1,53 @@
+exact match:
+    -1 -> 0 0
+     0 -> 0 0
+     1 -> 0 1
+     2 -> 1 2
+     3 -> 2 3
+     4 -> 3 4
+     5 -> 4 4
+
+non-exact match:
+   -.1 -> 0 0
+    .1 -> 0 0
+   1.1 -> 1 1
+   2.1 -> 2 2
+   3.1 -> 3 3
+   4.1 -> 4 4
+   5.1 -> 4 4
+
+weird values:
+        NaN -> 0 4
+   Infinity -> 4 4
+  -Infinity -> 0 0
+
+d3.bisect === d3.bisectRight:
+   true
+
+lo:
+    -1 -> 2 2
+     0 -> 2 2
+     1 -> 2 2
+     2 -> 2 2
+     3 -> 2 3
+     4 -> 3 4
+     5 -> 4 4
+
+hi:
+    -1 -> 0 0
+     0 -> 0 0
+     1 -> 0 1
+     2 -> 1 2
+     3 -> 2 2
+     4 -> 2 2
+     5 -> 2 2
+
+lo and hi:
+    -1 -> 1 1
+     0 -> 1 1
+     1 -> 1 1
+     2 -> 1 2
+     3 -> 2 3
+     4 -> 3 3
+     5 -> 3 3
+
Index: Dev/branches/Demo/d3/test/core/test-call.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-call.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-call.js	(revision 225)
@@ -0,0 +1,21 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3.min");
+
+var vis = d3.select("body");
+
+console.log("zero arguments:");
+vis.call(function(a, b) {
+  console.log("  this:", vis === this ? "vis" : this);
+  console.log("  a:", vis === a ? "vis" : a);
+  console.log("  b:", b);
+});
+console.log("");
+
+console.log("one argument:");
+vis.call(function(a, b) {
+  console.log("  this:", vis === this ? "vis" : this);
+  console.log("  a:", vis === a ? "vis" : a);
+  console.log("  b:", b);
+}, "test");
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-call.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-call.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-call.out	(revision 225)
@@ -0,0 +1,10 @@
+zero arguments:
+  this: vis
+  a: vis
+  b: undefined
+
+one argument:
+  this: vis
+  a: vis
+  b: test
+
Index: Dev/branches/Demo/d3/test/core/test-classed.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-classed.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-classed.js	(revision 225)
@@ -0,0 +1,40 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+var div = d3.select("body").append("div");
+
+div.classed("foo", true);
+console.log("constant classed:");
+console.log("  ", document.body.innerHTML);
+console.log("");
+
+div.classed("foo", true);
+console.log("add existing class:");
+console.log("  ", document.body.innerHTML);
+console.log("  ", div.classed("foo"));
+console.log("");
+
+div.classed("bar", function() { return true; });
+console.log("function classed:");
+console.log("  ", document.body.innerHTML);
+console.log("  ", div.classed("bar"));
+console.log("");
+
+div.classed("foo", false);
+console.log("remove constant class:");
+console.log("  ", document.body.innerHTML);
+console.log("  ", div.classed("foo"));
+console.log("");
+
+div.classed("foo", false);
+console.log("remove missing class:");
+console.log("  ", document.body.innerHTML);
+console.log("  ", div.classed("foo"));
+console.log("");
+
+div.classed("bar", function() { return false; });
+console.log("remove function class:");
+console.log("  ", document.body.innerHTML);
+console.log("  ", div.classed("bar"));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-classed.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-classed.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-classed.out	(revision 225)
@@ -0,0 +1,23 @@
+constant classed:
+   <div class="foo"/>
+
+add existing class:
+   <div class="foo"/>
+   true
+
+function classed:
+   <div class="foo bar"/>
+   true
+
+remove constant class:
+   <div class="bar"/>
+   false
+
+remove missing class:
+   <div class="bar"/>
+   false
+
+remove function class:
+   <div class=""/>
+   false
+
Index: Dev/branches/Demo/d3/test/core/test-format.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-format.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-format.js	(revision 225)
@@ -0,0 +1,194 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+console.log("zero fill:");
+console.log("  ", d3.format("08d")(0));
+console.log("  ", d3.format("08d")(42));
+console.log("  ", d3.format("08d")(42000000));
+console.log("  ", d3.format("08d")(420000000));
+console.log("  ", d3.format("08d")(-4));
+console.log("  ", d3.format("08d")(-42));
+console.log("  ", d3.format("08d")(-4200000));
+console.log("  ", d3.format("08d")(-42000000));
+console.log("");
+
+console.log("space fill:");
+console.log("  ", d3.format("8d")(0));
+console.log("  ", d3.format("8d")(42));
+console.log("  ", d3.format("8d")(42000000));
+console.log("  ", d3.format("8d")(420000000));
+console.log("  ", d3.format("8d")(-4));
+console.log("  ", d3.format("8d")(-42));
+console.log("  ", d3.format("8d")(-4200000));
+console.log("  ", d3.format("8d")(-42000000));
+console.log("");
+
+// TODO fill with other characters (requires align support)
+
+console.log("grouping:");
+console.log("  ", d3.format(",d")(0));
+console.log("  ", d3.format(",d")(42));
+console.log("  ", d3.format(",d")(42000000));
+console.log("  ", d3.format(",d")(420000000));
+console.log("  ", d3.format(",d")(-4));
+console.log("  ", d3.format(",d")(-42));
+console.log("  ", d3.format(",d")(-4200000));
+console.log("  ", d3.format(",d")(-42000000));
+console.log("");
+
+console.log("grouping with zero fill:");
+console.log("  ", d3.format("01,d")(0));
+console.log("  ", d3.format("01,d")(0));
+console.log("  ", d3.format("02,d")(0));
+console.log("  ", d3.format("03,d")(0));
+console.log("  ", d3.format("05,d")(0));
+console.log("  ", d3.format("08,d")(0));
+console.log("  ", d3.format("013,d")(0));
+console.log("  ", d3.format("021,d")(0));
+console.log("");
+
+console.log("grouping with zero fill (overflow):");
+console.log("  ", d3.format("01,d")(1));
+console.log("  ", d3.format("01,d")(1));
+console.log("  ", d3.format("02,d")(12));
+console.log("  ", d3.format("03,d")(123));
+console.log("  ", d3.format("05,d")(12345));
+console.log("  ", d3.format("08,d")(12345678));
+console.log("  ", d3.format("013,d")(1234567890123));
+console.log("");
+
+console.log("grouping with space fill:");
+console.log("  ", d3.format("1,d")(0));
+console.log("  ", d3.format("1,d")(0));
+console.log("  ", d3.format("2,d")(0));
+console.log("  ", d3.format("3,d")(0));
+console.log("  ", d3.format("5,d")(0));
+console.log("  ", d3.format("8,d")(0));
+console.log("  ", d3.format("13,d")(0));
+console.log("  ", d3.format("21,d")(0));
+console.log("");
+
+console.log("grouping with space fill (overflow):");
+console.log("  ", d3.format("1,d")(1));
+console.log("  ", d3.format("1,d")(1));
+console.log("  ", d3.format("2,d")(12));
+console.log("  ", d3.format("3,d")(123));
+console.log("  ", d3.format("5,d")(12345));
+console.log("  ", d3.format("8,d")(12345678));
+console.log("  ", d3.format("13,d")(1234567890123));
+console.log("");
+
+console.log("grouping with general notation:");
+console.log("  ", d3.format(",g")(0));
+console.log("  ", d3.format(",g")(42));
+console.log("  ", d3.format(",g")(42000000));
+console.log("  ", d3.format(",g")(420000000));
+console.log("  ", d3.format(",g")(-4));
+console.log("  ", d3.format(",g")(-42));
+console.log("  ", d3.format(",g")(-4200000));
+console.log("  ", d3.format(",g")(-42000000));
+console.log("");
+
+console.log("precision (fixed-point notation):");
+console.log("  ", d3.format(".1f")(0.49));
+console.log("  ", d3.format(".2f")(0.449));
+console.log("  ", d3.format(".3f")(0.4449));
+console.log("  ", d3.format(".5f")(0.444449));
+console.log("  ", d3.format(".1f")(100));
+console.log("  ", d3.format(".2f")(100));
+console.log("  ", d3.format(".3f")(100));
+console.log("  ", d3.format(".5f")(100));
+console.log("");
+
+console.log("precision (significant digits):");
+console.log("  ", d3.format(".1g")(0.049));
+console.log("  ", d3.format(".1g")(0.49));
+console.log("  ", d3.format(".2g")(0.449));
+console.log("  ", d3.format(".3g")(0.4449));
+console.log("  ", d3.format(".5g")(0.444449));
+console.log("  ", d3.format(".1g")(100));
+console.log("  ", d3.format(".2g")(100));
+console.log("  ", d3.format(".3g")(100));
+console.log("  ", d3.format(".5g")(100));
+console.log("  ", d3.format(".5g")(100.2));
+console.log("  ", d3.format(".2g")(0.002));
+console.log("");
+
+console.log("precision and rounding (significant digits):");
+console.log("  ", d3.format(".1r")(0.049));
+console.log("  ", d3.format(".1r")(0.49));
+console.log("  ", d3.format(".2r")(0.449));
+console.log("  ", d3.format(".3r")(0.4449));
+console.log("  ", d3.format(".5r")(0.444449));
+console.log("  ", d3.format("r")(123.45));
+console.log("  ", d3.format(".1r")(123.45));
+console.log("  ", d3.format(".2r")(123.45));
+console.log("  ", d3.format(".3r")(123.45));
+console.log("  ", d3.format(".4r")(123.45));
+console.log("  ", d3.format(".5r")(123.45));
+console.log("  ", d3.format(".6r")(123.45));
+console.log("");
+
+console.log("precision and grouping with space fill:");
+console.log("  ", d3.format("10,.1f")(123456.49));
+console.log("  ", d3.format("10,.2f")(1234567.449));
+console.log("  ", d3.format("10,.3f")(12345678.4449));
+console.log("  ", d3.format("10,.5f")(123456789.444449));
+console.log("  ", d3.format("10,.1f")(123456));
+console.log("  ", d3.format("10,.2f")(1234567));
+console.log("  ", d3.format("10,.3f")(12345678));
+console.log("  ", d3.format("10,.5f")(123456789));
+console.log("");
+
+console.log("float type passed int:");
+console.log("  ", d3.format("f")(42));
+console.log("");
+
+console.log("int type passed float:");
+console.log(d3.format("d")(4.2));
+console.log("");
+
+console.log("number:");
+console.log("  ", d3.format("n")(.0042));
+console.log("  ", d3.format("n")(.42));
+console.log("  ", d3.format("n")(0));
+console.log("  ", d3.format("n")(42));
+console.log("  ", d3.format("n")(42000000));
+console.log("  ", d3.format("n")(420000000));
+console.log("  ", d3.format("n")(-4));
+console.log("  ", d3.format("n")(-42));
+console.log("  ", d3.format("n")(-4200000));
+console.log("  ", d3.format("n")(-42000000));
+console.log("");
+
+console.log("percentage:");
+console.log("  ", d3.format("%")(0));
+console.log("  ", d3.format("%")(.042));
+console.log("  ", d3.format("%")(.42));
+console.log("  ", d3.format("%")(4.2));
+console.log("  ", d3.format("%")(-.042));
+console.log("  ", d3.format("%")(-.42));
+console.log("  ", d3.format("%")(-4.2));
+console.log("");
+
+console.log("percentage with rounding and sign:");
+console.log("  ", d3.format("+.2p")(.00123));
+console.log("  ", d3.format("+.2p")(.0123));
+console.log("  ", d3.format("+.2p")(.123));
+console.log("  ", d3.format("+.2p")(1.23));
+console.log("  ", d3.format("+.2p")(-.00123));
+console.log("  ", d3.format("+.2p")(-.0123));
+console.log("  ", d3.format("+.2p")(-.123));
+console.log("  ", d3.format("+.2p")(-1.23));
+console.log("");
+
+console.log("exponent:");
+console.log("  ", d3.format("e")(0));
+console.log("  ", d3.format("e")(42));
+console.log("  ", d3.format("e")(42000000));
+console.log("  ", d3.format("e")(420000000));
+console.log("  ", d3.format("e")(-4));
+console.log("  ", d3.format("e")(-42));
+console.log("  ", d3.format("e")(-4200000));
+console.log("  ", d3.format("e")(-42000000));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-format.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-format.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-format.out	(revision 225)
@@ -0,0 +1,172 @@
+zero fill:
+   00000000
+   00000042
+   42000000
+   420000000
+   â0000004
+   â0000042
+   â4200000
+   â42000000
+
+space fill:
+          0
+         42
+   42000000
+   420000000
+         â4
+        â42
+   â4200000
+   â42000000
+
+grouping:
+   0
+   42
+   42,000,000
+   420,000,000
+   â4
+   â42
+   â4,200,000
+   â42,000,000
+
+grouping with zero fill:
+   0
+   0
+   00
+   000
+   0,000
+   0,000,000
+   0,000,000,000
+   0,000,000,000,000,000
+
+grouping with zero fill (overflow):
+   1
+   1
+   12
+   123
+   12,345
+   12,345,678
+   1,234,567,890,123
+
+grouping with space fill:
+   0
+   0
+    0
+     0
+       0
+          0
+               0
+                       0
+
+grouping with space fill (overflow):
+   1
+   1
+   12
+   123
+   12,345
+   12,345,678
+   1,234,567,890,123
+
+grouping with general notation:
+   0
+   42
+   42,000,000
+   420,000,000
+   â4
+   â42
+   â4,200,000
+   â42,000,000
+
+precision (fixed-point notation):
+   0.5
+   0.45
+   0.445
+   0.44445
+   100.0
+   100.00
+   100.000
+   100.00000
+
+precision (significant digits):
+   0.05
+   0.5
+   0.45
+   0.445
+   0.44445
+   1e+2
+   1.0e+2
+   100
+   100.00
+   100.20
+   0.0020
+
+precision and rounding (significant digits):
+   0.05
+   0.5
+   0.45
+   0.445
+   0.44445
+   123
+   100
+   120
+   123
+   123.5
+   123.45
+   123.450
+
+precision and grouping with space fill:
+    123,456.5
+   1,234,567.45
+   12,345,678.445
+   123,456,789.44445
+    123,456.0
+   1,234,567.00
+   12,345,678.000
+   123,456,789.00000
+
+float type passed int:
+   42
+
+int type passed float:
+
+
+number:
+   0.0042
+   0.42
+   0
+   42
+   42,000,000
+   420,000,000
+   â4
+   â42
+   â4,200,000
+   â42,000,000
+
+percentage:
+   0%
+   4%
+   42%
+   420%
+   â4%
+   â42%
+   â420%
+
+percentage with rounding and sign:
+   +0.12%
+   +1.2%
+   +12%
+   +120%
+   â0.12%
+   â1.2%
+   â12%
+   â120%
+
+exponent:
+   0e+0
+   4.2e+1
+   4.2e+7
+   4.2e+8
+   â4e+0
+   â4.2e+1
+   â4.2e+6
+   â4.2e+7
+
Index: Dev/branches/Demo/d3/test/core/test-hsl.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-hsl.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-hsl.js	(revision 225)
@@ -0,0 +1,51 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+console.log("constructor:");
+console.log("  " + d3.hsl(60, 1, .2));
+console.log("  " + d3.hsl(60.4, .994, .204));
+console.log("  " + d3.hsl(60.6, .996, .216));
+console.log("  " + JSON.stringify(d3.hsl(60, 1, .2)));
+console.log("");
+
+console.log("parse rgb:");
+console.log("  " + d3.hsl("#660"));
+console.log("  " + d3.hsl("#666600"));
+console.log("  " + d3.hsl("rgb(102, 102, 0)"));
+console.log("  " + JSON.stringify(d3.hsl("#660")));
+console.log("");
+
+console.log("parse hsl:");
+console.log("  " + d3.hsl("hsl(60, 100%, 20%)"));
+console.log("  " + d3.hsl(d3.hsl(60, 1, .2)));
+console.log("  " + JSON.stringify(d3.hsl("hsl(60, 100%, 20%)")));
+console.log("");
+
+console.log("parse names:");
+console.log("  " + d3.hsl("red"));
+console.log("  " + d3.hsl("yellow"));
+console.log("  " + d3.hsl("blue"));
+console.log("");
+
+console.log("convert to rgb:");
+console.log("  " + d3.hsl("#660").rgb());
+console.log("  " + d3.hsl("hsl(60, 100%, 20%)").rgb());
+console.log("  " + d3.hsl(60, 1, .2).rgb());
+console.log("  " + JSON.stringify(d3.hsl("#660").rgb()));
+console.log("");
+
+console.log("brighter:");
+console.log("  " + d3.hsl(60, 1, .2).brighter());
+console.log("  " + d3.hsl("#660").brighter(1));
+console.log("  " + d3.hsl("hsl(60, 100%, 20%)").brighter(.5));
+console.log("  " + d3.hsl(d3.rgb(102, 102, 0)).brighter(2));
+console.log("  " + JSON.stringify(d3.hsl("hsl(60, 100%, 20%)").brighter()));
+console.log("");
+
+console.log("darker:");
+console.log("  " + d3.hsl(60, 1, .2).darker());
+console.log("  " + d3.hsl("#660").darker(1));
+console.log("  " + d3.hsl("hsl(60, 100%, 20%)").darker(.5));
+console.log("  " + d3.hsl(d3.rgb(102, 102, 0)).darker(2));
+console.log("  " + JSON.stringify(d3.hsl("hsl(60, 100%, 20%)").darker()));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-hsl.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-hsl.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-hsl.out	(revision 225)
@@ -0,0 +1,42 @@
+constructor:
+  hsl(60,100%,20%)
+  hsl(60.4,99.4%,20.4%)
+  hsl(60.6,99.6%,21.6%)
+  {"h":60,"s":1,"l":0.2}
+
+parse rgb:
+  hsl(60,100%,20%)
+  hsl(60,100%,20%)
+  hsl(60,100%,20%)
+  {"h":60,"s":1,"l":0.2}
+
+parse hsl:
+  hsl(60,100%,20%)
+  hsl(60,100%,20%)
+  {"h":60,"s":1,"l":0.2}
+
+parse names:
+  hsl(0,100%,50%)
+  hsl(60,100%,50%)
+  hsl(240,100%,50%)
+
+convert to rgb:
+  #666600
+  #666600
+  #666600
+  {"r":102,"g":102,"b":0}
+
+brighter:
+  hsl(60,100%,28.571428571428577%)
+  hsl(60,100%,28.571428571428577%)
+  hsl(60,100%,23.904572186687872%)
+  hsl(60,100%,40.81632653061225%)
+  {"h":60,"s":1,"l":0.28571428571428575}
+
+darker:
+  hsl(60,100%,13.999999999999998%)
+  hsl(60,100%,13.999999999999998%)
+  hsl(60,100%,16.733200530681515%)
+  hsl(60,100%,9.799999999999999%)
+  {"h":60,"s":1,"l":0.13999999999999999}
+
Index: Dev/branches/Demo/d3/test/core/test-insert.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-insert.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-insert.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+d3.select("body").append("div");
+d3.select("body").insert("span", "div");
+
+console.log("insert span before div:");
+console.log("  ", document.body.innerHTML);
+console.log("");
+
+d3.select("body").insert("b", "div");
+
+console.log("insert b before div:");
+console.log("  ", document.body.innerHTML);
+console.log("");
+
+d3.select("body").insert("a", "span");
+
+console.log("insert a before span:");
+console.log("  ", document.body.innerHTML);
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-insert.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-insert.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-insert.out	(revision 225)
@@ -0,0 +1,9 @@
+insert span before div:
+   <span/><div/>
+
+insert b before div:
+   <span/><b/><div/>
+
+insert a before span:
+   <a/><span/><b/><div/>
+
Index: Dev/branches/Demo/d3/test/core/test-interpolate.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-interpolate.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-interpolate.js	(revision 225)
@@ -0,0 +1,87 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var x = d3.interpolate("200 0", "250");
+console.log("interpolate(200 0, 250):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolateString("200", "250.00");
+console.log("interpolateString(200, 250.00):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolateNumber(200, 250);
+console.log("interpolateNumber(200, 250):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolateObject({key: 200}, {key: 250});
+console.log("interpolateObject({ key: 200 }, { key: 250 }):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolateArray([200], [250]);
+console.log("interpolateArray([ 200 ], [ 250 ]):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolateRgb("red", "blue");
+console.log("interpolateRgb(red, blue):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolateHsl("red", "blue");
+console.log("interpolateHsl(red, blue):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+d3.interpolators.push(function(a, b) {
+  return a == "one" && b == "two" && d3.interpolateNumber(1, 2);
+});
+
+var x = d3.interpolate("one", "two");
+console.log("interpolateOneTwo(one, two):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.interpolate("one", "three");
+console.log("interpolate(one, three):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-interpolate.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-interpolate.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-interpolate.out	(revision 225)
@@ -0,0 +1,63 @@
+interpolate(200 0, 250):
+         -0.5  ->  175
+          0.0  ->  200
+          0.5  ->  225
+          1.0  ->  250
+          1.5  ->  275
+
+interpolateString(200, 250.00):
+         -0.5  ->  175
+          0.0  ->  200
+          0.5  ->  225
+          1.0  ->  250
+          1.5  ->  275
+
+interpolateNumber(200, 250):
+         -0.5  ->  175
+          0.0  ->  200
+          0.5  ->  225
+          1.0  ->  250
+          1.5  ->  275
+
+interpolateObject({ key: 200 }, { key: 250 }):
+         -0.5  ->  { key: 175 }
+          0.0  ->  { key: 200 }
+          0.5  ->  { key: 225 }
+          1.0  ->  { key: 250 }
+          1.5  ->  { key: 275 }
+
+interpolateArray([ 200 ], [ 250 ]):
+         -0.5  ->  [ 175 ]
+          0.0  ->  [ 200 ]
+          0.5  ->  [ 225 ]
+          1.0  ->  [ 250 ]
+          1.5  ->  [ 275 ]
+
+interpolateRgb(red, blue):
+         -0.5  ->  rgb(383,0,-127)
+          0.0  ->  rgb(255,0,0)
+          0.5  ->  rgb(128,0,128)
+          1.0  ->  rgb(0,0,255)
+          1.5  ->  rgb(-127,0,383)
+
+interpolateHsl(red, blue):
+         -0.5  ->  #0000ff
+          0.0  ->  #ff0000
+          0.5  ->  #00ff00
+          1.0  ->  #0000ff
+          1.5  ->  #ff0000
+
+interpolateOneTwo(one, two):
+         -0.5  ->  0.5
+          0.0  ->  1
+          0.5  ->  1.5
+          1.0  ->  2
+          1.5  ->  2.5
+
+interpolate(one, three):
+         -0.5  ->  three
+          0.0  ->  three
+          0.5  ->  three
+          1.0  ->  three
+          1.5  ->  three
+
Index: Dev/branches/Demo/d3/test/core/test-keys.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-keys.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-keys.js	(revision 225)
@@ -0,0 +1,17 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+function Abc() {
+  this.a = 1;
+  this.b = 2;
+}
+
+Abc.prototype.c = 1;
+
+console.log("keys:");
+console.log("  " + d3.keys({a: 1, b: 2}).sort());
+console.log("");
+
+console.log("inherited keys:");
+console.log("  " + d3.keys(new Abc).sort());
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-keys.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-keys.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-keys.out	(revision 225)
@@ -0,0 +1,6 @@
+keys:
+  a,b
+
+inherited keys:
+  a,b,c
+
Index: Dev/branches/Demo/d3/test/core/test-max.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-max.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-max.js	(revision 225)
@@ -0,0 +1,43 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+function max(array) {
+  var max = d3.max(array);
+  return typeof max === "string" ? "\"" + max + "\"" : max;
+}
+
+console.log("max:");
+console.log("                                [1] -> " + max([1]));
+console.log("                    [5, 1, 2, 3, 4] -> " + max([5, 1, 2, 3, 4]));
+console.log("                    [\"a\", \"b\", \"c\"] -> " + max(["c", "a", "b"]));
+console.log("                        [\"20\", \"3\"] -> " + max(["20", "3"]));
+console.log("                        [\"3\", \"20\"] -> " + max(["3", "20"]));
+console.log("                            [20, 3] -> " + max([20, 3]));
+console.log("                            [3, 20] -> " + max([3, 20]));
+console.log("");
+
+console.log("max of empty array is undefined:");
+console.log("                                 [] -> " + max([]));
+console.log("                             [null] -> " + max([null]));
+console.log("                        [undefined] -> " + max([undefined]));
+console.log("                              [NaN] -> " + max([NaN]));
+console.log("                         [NaN, NaN] -> " + max([NaN, NaN]));
+console.log("");
+
+console.log("max ignores null, undefined, and NaN:");
+console.log("               [NaN, 1, 2, 3, 4, 5] -> " + max([NaN, 1, 2, 3, 4, 5]));
+console.log("               [1, 2, 3, 4, 5, NaN] -> " + max([1, 2, 3, 4, 5, NaN]));
+console.log("   [10, null, 3, undefined, 5, NaN] -> " + max([10, null, 3, undefined, 5, NaN]));
+console.log("");
+
+console.log("max compares heterogenous types as numbers:");
+console.log("                          [20, \"3\"] -> " + max([20, "3"]));
+console.log("                          [\"20\", 3] -> " + max(["20", 3]));
+console.log("                          [3, \"20\"] -> " + max([3, "20"]));
+console.log("                          [\"3\", 20] -> " + max(["3", 20]));
+console.log("");
+
+console.log("max applies accessor function:");
+console.log("  [1, 2, 3, 4, 5], [2, 4, 6, 8, 10] -> " + d3.max([[1, 2, 3, 4, 5], [2, 4, 6, 8, 10]], function(d) { return d3.min(d); }));
+console.log("                    [1, 2, 3, 4, 5] -> " + d3.max([1, 2, 3, 4, 5], function(d, i) { return i; }));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-max.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-max.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-max.out	(revision 225)
@@ -0,0 +1,31 @@
+max:
+                                [1] -> 1
+                    [5, 1, 2, 3, 4] -> 5
+                    ["a", "b", "c"] -> "c"
+                        ["20", "3"] -> "3"
+                        ["3", "20"] -> "3"
+                            [20, 3] -> 20
+                            [3, 20] -> 20
+
+max of empty array is undefined:
+                                 [] -> undefined
+                             [null] -> undefined
+                        [undefined] -> undefined
+                              [NaN] -> undefined
+                         [NaN, NaN] -> undefined
+
+max ignores null, undefined, and NaN:
+               [NaN, 1, 2, 3, 4, 5] -> 5
+               [1, 2, 3, 4, 5, NaN] -> 5
+   [10, null, 3, undefined, 5, NaN] -> 10
+
+max compares heterogenous types as numbers:
+                          [20, "3"] -> 20
+                          ["20", 3] -> "20"
+                          [3, "20"] -> "20"
+                          ["3", 20] -> 20
+
+max applies accessor function:
+  [1, 2, 3, 4, 5], [2, 4, 6, 8, 10] -> 2
+                    [1, 2, 3, 4, 5] -> 4
+
Index: Dev/branches/Demo/d3/test/core/test-min.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-min.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-min.js	(revision 225)
@@ -0,0 +1,43 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+function min(array) {
+  var min = d3.min(array);
+  return typeof min === "string" ? "\"" + min + "\"" : min;
+}
+
+console.log("min:");
+console.log("                                [1] -> " + min([1]));
+console.log("                    [5, 1, 2, 3, 4] -> " + min([5, 1, 2, 3, 4]));
+console.log("                    [\"a\", \"b\", \"c\"] -> " + min(["c", "a", "b"]));
+console.log("                        [\"20\", \"3\"] -> " + min(["20", "3"]));
+console.log("                        [\"3\", \"20\"] -> " + min(["3", "20"]));
+console.log("                            [20, 3] -> " + min([20, 3]));
+console.log("                            [3, 20] -> " + min([3, 20]));
+console.log("");
+
+console.log("min of empty array is undefined:");
+console.log("                                 [] -> " + min([]));
+console.log("                             [null] -> " + min([null]));
+console.log("                        [undefined] -> " + min([undefined]));
+console.log("                              [NaN] -> " + min([NaN]));
+console.log("                         [NaN, NaN] -> " + min([NaN, NaN]));
+console.log("");
+
+console.log("min ignores null, undefined, and NaN:");
+console.log("               [NaN, 1, 2, 3, 4, 5] -> " + min([NaN, 1, 2, 3, 4, 5]));
+console.log("               [1, 2, 3, 4, 5, NaN] -> " + min([1, 2, 3, 4, 5, NaN]));
+console.log("   [10, null, 3, undefined, 5, NaN] -> " + min([10, null, 3, undefined, 5, NaN]));
+console.log("");
+
+console.log("min compares heterogenous types as numbers:");
+console.log("                          [20, \"3\"] -> " + min([20, "3"]));
+console.log("                          [\"20\", 3] -> " + min(["20", 3]));
+console.log("                          [3, \"20\"] -> " + min([3, "20"]));
+console.log("                          [\"3\", 20] -> " + min(["3", 20]));
+console.log("");
+
+console.log("min applies accessor function:");
+console.log("  [1, 2, 3, 4, 5], [2, 4, 6, 8, 10] -> " + d3.min([[1, 2, 3, 4, 5], [2, 4, 6, 8, 10]], function(d) { return d3.max(d); }));
+console.log("                    [1, 2, 3, 4, 5] -> " + d3.min([1, 2, 3, 4, 5], function(d, i) { return i; }));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-min.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-min.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-min.out	(revision 225)
@@ -0,0 +1,31 @@
+min:
+                                [1] -> 1
+                    [5, 1, 2, 3, 4] -> 1
+                    ["a", "b", "c"] -> "a"
+                        ["20", "3"] -> "20"
+                        ["3", "20"] -> "20"
+                            [20, 3] -> 3
+                            [3, 20] -> 3
+
+min of empty array is undefined:
+                                 [] -> undefined
+                             [null] -> undefined
+                        [undefined] -> undefined
+                              [NaN] -> undefined
+                         [NaN, NaN] -> undefined
+
+min ignores null, undefined, and NaN:
+               [NaN, 1, 2, 3, 4, 5] -> 1
+               [1, 2, 3, 4, 5, NaN] -> 1
+   [10, null, 3, undefined, 5, NaN] -> 3
+
+min compares heterogenous types as numbers:
+                          [20, "3"] -> "3"
+                          ["20", 3] -> 3
+                          [3, "20"] -> 3
+                          ["3", 20] -> "3"
+
+min applies accessor function:
+  [1, 2, 3, 4, 5], [2, 4, 6, 8, 10] -> 5
+                    [1, 2, 3, 4, 5] -> 0
+
Index: Dev/branches/Demo/d3/test/core/test-nest.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-nest.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-nest.js	(revision 225)
@@ -0,0 +1,60 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+d3.json("test/barley.json", function(barley) {
+
+  var nest = d3.nest()
+      .key(function(d) { return d.year; })
+      .key(function(d) { return d.variety; })
+      .key(function(d) { return d.site; });
+
+  console.log("entries(year/variety/site):");
+  console.log(stringify(nest.entries(barley.slice(5, 8))));
+  console.log("");
+
+  console.log("map(year/variety/site):");
+  console.log(stringify(nest.map(barley.slice(5, 8))));
+  console.log("");
+
+  var nest = d3.nest()
+      .key(function(d) { return d.year; })
+      .rollup(sum);
+
+  console.log("rollup(year):");
+  console.log(stringify(nest.map(barley)));
+  console.log("");
+
+  var nest = d3.nest()
+      .key(function(d) { return d.year; })
+      .key(function(d) { return d.variety; })
+      .rollup(sum);
+
+  console.log("rollup(year/variety):");
+  console.log(stringify(nest.map(barley)));
+  console.log("");
+
+  var nest = d3.nest()
+      .key(function(d) { return d.variety; })
+      .sortKeys(d3.ascending);
+
+  console.log("sortKeys(variety):");
+  console.log(stringify(nest.entries(barley.slice(5, 8))));
+  console.log("");
+
+  var nest = d3.nest()
+      .key(function(d) { return d.year; })
+      .sortValues(function(b, a) { return a.yield - b.yield; });
+
+  console.log("sortValues(year):");
+  console.log(stringify(nest.map(barley.slice(6, 12))));
+  console.log("");
+
+});
+
+function sum(v) {
+  return v.reduce(function(p, v) { return p + v.yield; }, 0);
+}
+
+function stringify(json) {
+  return JSON.stringify(json, null, " ");
+}
Index: Dev/branches/Demo/d3/test/core/test-nest.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-nest.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-nest.out	(revision 225)
@@ -0,0 +1,194 @@
+entries(year/variety/site):
+[
+ {
+  "key": "1931",
+  "values": [
+   {
+    "key": "Manchuria",
+    "values": [
+     {
+      "key": "Duluth",
+      "values": [
+       {
+        "yield": 28.96667,
+        "variety": "Manchuria",
+        "year": 1931,
+        "site": "Duluth"
+       }
+      ]
+     }
+    ]
+   },
+   {
+    "key": "Glabron",
+    "values": [
+     {
+      "key": "University Farm",
+      "values": [
+       {
+        "yield": 43.06666,
+        "variety": "Glabron",
+        "year": 1931,
+        "site": "University Farm"
+       }
+      ]
+     },
+     {
+      "key": "Waseca",
+      "values": [
+       {
+        "yield": 55.2,
+        "variety": "Glabron",
+        "year": 1931,
+        "site": "Waseca"
+       }
+      ]
+     }
+    ]
+   }
+  ]
+ }
+]
+
+map(year/variety/site):
+{
+ "1931": {
+  "Manchuria": {
+   "Duluth": [
+    {
+     "yield": 28.96667,
+     "variety": "Manchuria",
+     "year": 1931,
+     "site": "Duluth"
+    }
+   ]
+  },
+  "Glabron": {
+   "University Farm": [
+    {
+     "yield": 43.06666,
+     "variety": "Glabron",
+     "year": 1931,
+     "site": "University Farm"
+    }
+   ],
+   "Waseca": [
+    {
+     "yield": 55.2,
+     "variety": "Glabron",
+     "year": 1931,
+     "site": "Waseca"
+    }
+   ]
+  }
+ }
+}
+
+rollup(year):
+{
+ "1931": 2224.6666799999985,
+ "1932": 1905.7999600000003
+}
+
+rollup(year/variety):
+{
+ "1931": {
+  "Manchuria": 205.16667999999999,
+  "Glabron": 223.96666000000002,
+  "Svansota": 204.06667,
+  "Velvet": 206.93332,
+  "Trebi": 254.79996,
+  "No. 457": 241.50001,
+  "No. 462": 234.33336999999997,
+  "Peatland": 219.5,
+  "No. 475": 190.89999999999998,
+  "Wisconsin No. 38": 243.50000999999997
+ },
+ "1932": {
+  "Manchuria": 172.39999999999998,
+  "Glabron": 176.13333000000003,
+  "Svansota": 160.46666,
+  "Velvet": 189.79998999999998,
+  "Trebi": 217.99996,
+  "No. 457": 188.66667999999999,
+  "No. 462": 190.20000000000002,
+  "Peatland": 190.66667,
+  "No. 475": 190.23333,
+  "Wisconsin No. 38": 229.23334000000003
+ }
+}
+
+sortKeys(variety):
+[
+ {
+  "key": "Glabron",
+  "values": [
+   {
+    "yield": 43.06666,
+    "variety": "Glabron",
+    "year": 1931,
+    "site": "University Farm"
+   },
+   {
+    "yield": 55.2,
+    "variety": "Glabron",
+    "year": 1931,
+    "site": "Waseca"
+   }
+  ]
+ },
+ {
+  "key": "Manchuria",
+  "values": [
+   {
+    "yield": 28.96667,
+    "variety": "Manchuria",
+    "year": 1931,
+    "site": "Duluth"
+   }
+  ]
+ }
+]
+
+sortValues(year):
+{
+ "1931": [
+  {
+   "yield": 55.2,
+   "variety": "Glabron",
+   "year": 1931,
+   "site": "Waseca"
+  },
+  {
+   "yield": 43.06666,
+   "variety": "Glabron",
+   "year": 1931,
+   "site": "University Farm"
+  },
+  {
+   "yield": 38.13333,
+   "variety": "Glabron",
+   "year": 1931,
+   "site": "Crookston"
+  },
+  {
+   "yield": 29.66667,
+   "variety": "Glabron",
+   "year": 1931,
+   "site": "Duluth"
+  },
+  {
+   "yield": 29.13333,
+   "variety": "Glabron",
+   "year": 1931,
+   "site": "Grand Rapids"
+  },
+  {
+   "yield": 28.76667,
+   "variety": "Glabron",
+   "year": 1931,
+   "site": "Morris"
+  }
+ ]
+}
+
Index: Dev/branches/Demo/d3/test/core/test-permute.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-permute.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-permute.js	(revision 225)
@@ -0,0 +1,38 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var array = [0,1,2];
+
+console.log("permute reverses:");
+console.log("    2,1,0:", d3.permute(array, [2,1,0]) + "");
+console.log("");
+
+console.log("permute does not modify input array:");
+console.log("    0,1,2:", array + "");
+console.log("");
+
+console.log("permute does nothing:");
+console.log("    0,1,2:", d3.permute(array, [0,1,2]) + "");
+console.log("");
+
+console.log("permute duplicates:");
+console.log("    0,0,0:", d3.permute(array, [0,0,0]) + "");
+console.log("");
+
+console.log("permute returns fewer elements:");
+console.log("      2,1:", d3.permute(array, [2,1]) + "");
+console.log("        1:", d3.permute(array, [1]) + "");
+console.log("        0:", d3.permute(array, [0]) + "");
+console.log("         :", d3.permute(array, []) + "");
+console.log("");
+
+console.log("permute returns undefined elements:");
+console.log("       10:", d3.permute(array, [10]) + "");
+console.log("       -1:", d3.permute(array, [-1]) + "");
+console.log("     0,-1:", d3.permute(array, [0,-1]) + "");
+console.log("");
+
+console.log("permute returns more elements:");
+console.log("  0,0,1,2:", d3.permute(array, [0,0,1,2]) + "");
+console.log("  0,1,1,1:", d3.permute(array, [0,1,1,1]) + "");
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-permute.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-permute.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-permute.out	(revision 225)
@@ -0,0 +1,27 @@
+permute reverses:
+    2,1,0: 2,1,0
+
+permute does not modify input array:
+    0,1,2: 0,1,2
+
+permute does nothing:
+    0,1,2: 0,1,2
+
+permute duplicates:
+    0,0,0: 0,0,0
+
+permute returns fewer elements:
+      2,1: 2,1
+        1: 1
+        0: 0
+         : 
+
+permute returns undefined elements:
+       10: 
+       -1: 
+     0,-1: 0,
+
+permute returns more elements:
+  0,0,1,2: 0,0,1,2
+  0,1,1,1: 0,1,1,1
+
Index: Dev/branches/Demo/d3/test/core/test-remove.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-remove.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-remove.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+d3.select("body").append("svg:svg");
+d3.select("body").append("div");
+
+console.log("initialize:");
+console.log("  ", document.body.outerHTML);
+console.log("");
+
+d3.select("svg").remove();
+
+console.log("remove svg:");
+console.log("  ", document.body.outerHTML);
+console.log("");
+
+d3.select("body").selectAll("div").remove();
+
+console.log("removeAll div:");
+console.log("  ", document.body.outerHTML);
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-remove.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-remove.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-remove.out	(revision 225)
@@ -0,0 +1,9 @@
+initialize:
+   <body><svg/><div/></body>
+
+remove svg:
+   <body><div/></body>
+
+removeAll div:
+   <body/>
+
Index: Dev/branches/Demo/d3/test/core/test-rgb.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-rgb.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-rgb.js	(revision 225)
@@ -0,0 +1,51 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+console.log("constructor:");
+console.log("  " + d3.rgb(102, 102, 0));
+console.log("  " + d3.rgb(102.4, 102.4, 0.4));
+console.log("  " + d3.rgb(102.6, 102.6, 0.6));
+console.log("  " + JSON.stringify(d3.rgb(102, 102, 0)));
+console.log("");
+
+console.log("parse rgb:");
+console.log("  " + d3.rgb("#660"));
+console.log("  " + d3.rgb("#666600"));
+console.log("  " + d3.rgb("rgb(102, 102, 0)"));
+console.log("  " + JSON.stringify(d3.rgb("#660")));
+console.log("");
+
+console.log("parse hsl:");
+console.log("  " + d3.rgb("hsl(60, 100%, 20%)"));
+console.log("  " + d3.rgb(d3.hsl(60, 1, .2)));
+console.log("  " + JSON.stringify(d3.rgb("hsl(60, 100%, 20%)")));
+console.log("");
+
+console.log("parse names:");
+console.log("  " + d3.rgb("aliceblue"));
+console.log("  " + d3.rgb("moccasin"));
+console.log("  " + d3.rgb("yellow"));
+console.log("");
+
+console.log("convert to hsl:");
+console.log("  " + d3.rgb("#660").hsl());
+console.log("  " + d3.rgb("#666600").hsl());
+console.log("  " + d3.rgb(102, 102, 0).hsl());
+console.log("  " + JSON.stringify(d3.rgb("#660").hsl()));
+console.log("");
+
+console.log("brighter:");
+console.log("  " + d3.rgb(102, 102, 0).brighter());
+console.log("  " + d3.rgb("#660").brighter(1));
+console.log("  " + d3.rgb("hsl(60, 100%, 20%)").brighter(.5));
+console.log("  " + d3.rgb(d3.hsl(60, 1, .2)).brighter(2));
+console.log("  " + JSON.stringify(d3.rgb("#660").brighter()));
+console.log("");
+
+console.log("darker:");
+console.log("  " + d3.rgb(102, 102, 0).darker());
+console.log("  " + d3.rgb("#660").darker(1));
+console.log("  " + d3.rgb("hsl(60, 100%, 20%)").darker(.5));
+console.log("  " + d3.rgb(d3.hsl(60, 1, .2)).darker(2));
+console.log("  " + JSON.stringify(d3.rgb("#660").darker()));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-rgb.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-rgb.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-rgb.out	(revision 225)
@@ -0,0 +1,42 @@
+constructor:
+  #666600
+  #666600
+  #666600
+  {"r":102,"g":102,"b":0}
+
+parse rgb:
+  #666600
+  #666600
+  #666600
+  {"r":102,"g":102,"b":0}
+
+parse hsl:
+  #666600
+  #666600
+  {"r":102,"g":102,"b":0}
+
+parse names:
+  #f0f8ff
+  #ffe4b5
+  #ffff00
+
+convert to hsl:
+  hsl(60,100%,20%)
+  hsl(60,100%,20%)
+  hsl(60,100%,20%)
+  {"h":60,"s":1,"l":0.2}
+
+brighter:
+  #919100
+  #919100
+  #797900
+  #d0d000
+  {"r":145,"g":145,"b":0}
+
+darker:
+  #474700
+  #474700
+  #555500
+  #313100
+  {"r":71,"g":71,"b":0}
+
Index: Dev/branches/Demo/d3/test/core/test-round.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-round.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-round.js	(revision 225)
@@ -0,0 +1,75 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+console.log("degenerate:");
+console.log("          0 ->", d3.round(0));
+console.log("        NaN ->", d3.round(NaN));
+console.log("   Infinity ->", d3.round(Infinity));
+console.log("  -Infinity ->", d3.round(-Infinity));
+console.log("");
+
+console.log("default:");
+console.log("      10.51 ->", d3.round(10.51));
+console.log("      10.50 ->", d3.round(10.50));
+console.log("      10.49 ->", d3.round(10.49));
+console.log("       0.51 ->", d3.round(0.51));
+console.log("       0.50 ->", d3.round(0.50));
+console.log("       0.49 ->", d3.round(0.49));
+console.log("      -0.51 ->", d3.round(-0.51));
+console.log("      -0.50 ->", d3.round(-0.50));
+console.log("      -0.49 ->", d3.round(-0.49));
+console.log("     -10.51 ->", d3.round(-10.51));
+console.log("     -10.50 ->", d3.round(-10.50));
+console.log("     -10.49 ->", d3.round(-10.49));
+console.log("");
+
+console.log("precision 1:");
+console.log("      10.51 ->", d3.round(10.51, 1));
+console.log("      10.50 ->", d3.round(10.50, 1));
+console.log("      10.49 ->", d3.round(10.49, 1));
+console.log("       0.51 ->", d3.round(0.51, 1));
+console.log("       0.50 ->", d3.round(0.50, 1));
+console.log("       0.49 ->", d3.round(0.49, 1));
+console.log("      -0.51 ->", d3.round(-0.51, 1));
+console.log("      -0.50 ->", d3.round(-0.50, 1));
+console.log("      -0.49 ->", d3.round(-0.49, 1));
+console.log("     -10.51 ->", d3.round(-10.51, 1));
+console.log("     -10.50 ->", d3.round(-10.50, 1));
+console.log("     -10.49 ->", d3.round(-10.49, 1));
+console.log("");
+
+console.log("precision 2:");
+console.log("      10.51 ->", d3.round(10.51, 2));
+console.log("      10.50 ->", d3.round(10.50, 2));
+console.log("      10.49 ->", d3.round(10.49, 2));
+console.log("       0.51 ->", d3.round(0.51, 2));
+console.log("       0.50 ->", d3.round(0.50, 2));
+console.log("       0.49 ->", d3.round(0.49, 2));
+console.log("      -0.51 ->", d3.round(-0.51, 2));
+console.log("      -0.50 ->", d3.round(-0.50, 2));
+console.log("      -0.49 ->", d3.round(-0.49, 2));
+console.log("     -10.51 ->", d3.round(-10.51, 2));
+console.log("     -10.50 ->", d3.round(-10.50, 2));
+console.log("     -10.49 ->", d3.round(-10.49, 2));
+console.log("");
+
+console.log("precision -1:");
+console.log("     123.45 ->", d3.round(123.45, -1));
+console.log("     345.67 ->", d3.round(345.67, -1));
+console.log("    -123.45 ->", d3.round(-123.45, -1));
+console.log("    -345.67 ->", d3.round(-345.67, -1));
+console.log("");
+
+console.log("precision -2:");
+console.log("     123.45 ->", d3.round(123.45, -2));
+console.log("     456.78 ->", d3.round(456.78, -2));
+console.log("    -123.45 ->", d3.round(-123.45, -2));
+console.log("    -456.78 ->", d3.round(-456.78, -2));
+console.log("");
+
+console.log("precision -3:");
+console.log("     123.45 ->", d3.round(123.45, -3));
+console.log("     567.89 ->", d3.round(567.89, -3));
+console.log("    -123.45 ->", d3.round(-123.45, -3));
+console.log("    -567.89 ->", d3.round(-567.89, -3));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-round.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-round.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-round.out	(revision 225)
@@ -0,0 +1,66 @@
+degenerate:
+          0 -> 0
+        NaN -> NaN
+   Infinity -> Infinity
+  -Infinity -> -Infinity
+
+default:
+      10.51 -> 11
+      10.50 -> 11
+      10.49 -> 10
+       0.51 -> 1
+       0.50 -> 1
+       0.49 -> 0
+      -0.51 -> -1
+      -0.50 -> 0
+      -0.49 -> 0
+     -10.51 -> -11
+     -10.50 -> -10
+     -10.49 -> -10
+
+precision 1:
+      10.51 -> 10.5
+      10.50 -> 10.5
+      10.49 -> 10.5
+       0.51 -> 0.5
+       0.50 -> 0.5
+       0.49 -> 0.5
+      -0.51 -> -0.5
+      -0.50 -> -0.5
+      -0.49 -> -0.5
+     -10.51 -> -10.5
+     -10.50 -> -10.5
+     -10.49 -> -10.5
+
+precision 2:
+      10.51 -> 10.51
+      10.50 -> 10.5
+      10.49 -> 10.49
+       0.51 -> 0.51
+       0.50 -> 0.5
+       0.49 -> 0.49
+      -0.51 -> -0.51
+      -0.50 -> -0.5
+      -0.49 -> -0.49
+     -10.51 -> -10.51
+     -10.50 -> -10.5
+     -10.49 -> -10.49
+
+precision -1:
+     123.45 -> 120
+     345.67 -> 350
+    -123.45 -> -120
+    -345.67 -> -350
+
+precision -2:
+     123.45 -> 100
+     456.78 -> 500
+    -123.45 -> -100
+    -456.78 -> -500
+
+precision -3:
+     123.45 -> 0
+     567.89 -> 1000
+    -123.45 -> 0
+    -567.89 -> -1000
+
Index: Dev/branches/Demo/d3/test/core/test-sum.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-sum.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-sum.js	(revision 225)
@@ -0,0 +1,31 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+console.log("sum:");
+console.log("                                 [] -> " + d3.sum([]));
+console.log("                                [1] -> " + d3.sum([1]));
+console.log("                    [5, 1, 2, 3, 4] -> " + d3.sum([5, 1, 2, 3, 4]));
+console.log("                    [\"a\", \"b\", \"c\"] -> " + d3.sum(["c", "a", "b"]));
+console.log("                        [\"20\", \"3\"] -> " + d3.sum(["20", "3"]));
+console.log("                        [\"3\", \"20\"] -> " + d3.sum(["3", "20"]));
+console.log("                            [20, 3] -> " + d3.sum([20, 3]));
+console.log("                            [3, 20] -> " + d3.sum([3, 20]));
+console.log("");
+
+console.log("sum ignores null, undefined, and NaN:");
+console.log("               [NaN, 1, 2, 3, 4, 5] -> " + d3.sum([NaN, 1, 2, 3, 4, 5]));
+console.log("               [1, 2, 3, 4, 5, NaN] -> " + d3.sum([1, 2, 3, 4, 5, NaN]));
+console.log("   [10, null, 3, undefined, 5, NaN] -> " + d3.sum([10, null, 3, undefined, 5, NaN]));
+console.log("");
+
+console.log("sum treats heterogenous types as numbers:");
+console.log("                          [20, \"3\"] -> " + d3.sum([20, "3"]));
+console.log("                          [\"20\", 3] -> " + d3.sum(["20", 3]));
+console.log("                          [3, \"20\"] -> " + d3.sum([3, "20"]));
+console.log("                          [\"3\", 20] -> " + d3.sum(["3", 20]));
+console.log("");
+
+console.log("sum applies accessor function:");
+console.log("  [1, 2, 3, 4, 5], [2, 4, 6, 8, 10] -> " + d3.sum([[1, 2, 3, 4, 5], [2, 4, 6, 8, 10]], function(d) { return d3.sum(d); }));
+console.log("                    [1, 2, 3, 4, 5] -> " + d3.sum([1, 2, 3, 4, 5], function(d, i) { return i; }));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-sum.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-sum.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-sum.out	(revision 225)
@@ -0,0 +1,25 @@
+sum:
+                                 [] -> 0
+                                [1] -> 1
+                    [5, 1, 2, 3, 4] -> 15
+                    ["a", "b", "c"] -> 0
+                        ["20", "3"] -> 23
+                        ["3", "20"] -> 23
+                            [20, 3] -> 23
+                            [3, 20] -> 23
+
+sum ignores null, undefined, and NaN:
+               [NaN, 1, 2, 3, 4, 5] -> 15
+               [1, 2, 3, 4, 5, NaN] -> 15
+   [10, null, 3, undefined, 5, NaN] -> 18
+
+sum treats heterogenous types as numbers:
+                          [20, "3"] -> 23
+                          ["20", 3] -> 23
+                          [3, "20"] -> 23
+                          ["3", 20] -> 23
+
+sum applies accessor function:
+  [1, 2, 3, 4, 5], [2, 4, 6, 8, 10] -> 45
+                    [1, 2, 3, 4, 5] -> 10
+
Index: Dev/branches/Demo/d3/test/core/test-transition.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-transition.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-transition.js	(revision 225)
@@ -0,0 +1,18 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+var body = d3.select("body")
+    .style("background-color", "white");
+
+console.log("transition start:");
+console.log("  ", body.style("background-color"));
+console.log("");
+
+body.transition()
+    .style("background-color", "red")
+    .each("end", function() {
+      console.log("transition end:");
+      console.log("  ", body.style("background-color"));
+      console.log("");
+    });
Index: Dev/branches/Demo/d3/test/core/test-transition.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-transition.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-transition.out	(revision 225)
@@ -0,0 +1,6 @@
+transition start:
+   white
+
+transition end:
+   rgb(255,0,0)
+
Index: Dev/branches/Demo/d3/test/core/test-zip.js
===================================================================
--- Dev/branches/Demo/d3/test/core/test-zip.js	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-zip.js	(revision 225)
@@ -0,0 +1,24 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var s = JSON.stringify;
+
+console.log("zip [1, 2] [3, 4]:");
+console.log("  " + s(d3.zip([1, 2], [3, 4])));
+console.log("");
+
+console.log("zip [1, 2] [3, 4] [5, 6, 7]:");
+console.log("  " + s(d3.zip([1, 2], [3, 4], [5, 6, 7])));
+console.log("");
+
+console.log("zip [1, 2, 3, 4, 5] [2, 4, 6, 8, 10]:");
+console.log("  " + s(d3.zip([1, 2, 3, 4, 5], [2, 4, 6, 8, 10])));
+console.log("");
+
+console.log("zip [1, 2, 3, 4, 5]:");
+console.log("  " + s(d3.zip([1, 2, 3, 4, 5])));
+console.log("");
+
+console.log("zip (no arguments):");
+console.log("  " + s(d3.zip()));
+console.log("");
Index: Dev/branches/Demo/d3/test/core/test-zip.out
===================================================================
--- Dev/branches/Demo/d3/test/core/test-zip.out	(revision 225)
+++ Dev/branches/Demo/d3/test/core/test-zip.out	(revision 225)
@@ -0,0 +1,15 @@
+zip [1, 2] [3, 4]:
+  [[1,3],[2,4]]
+
+zip [1, 2] [3, 4] [5, 6, 7]:
+  [[1,3,5],[2,4,6]]
+
+zip [1, 2, 3, 4, 5] [2, 4, 6, 8, 10]:
+  [[1,2],[2,4],[3,6],[4,8],[5,10]]
+
+zip [1, 2, 3, 4, 5]:
+  [[1],[2],[3],[4],[5]]
+
+zip (no arguments):
+  []
+
Index: Dev/branches/Demo/d3/test/csv/test-parse.js
===================================================================
--- Dev/branches/Demo/d3/test/csv/test-parse.js	(revision 225)
+++ Dev/branches/Demo/d3/test/csv/test-parse.js	(revision 225)
@@ -0,0 +1,18 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.csv");
+
+var newlines = {
+  UNIX: "\n",
+  DOS: "\r\n",
+  Mac: "\r"
+};
+
+for (os in newlines) {
+  console.log("parse " + os + " newlines:");
+  var rows = d3.csv.parse(["a,b,c", "1,2,3", "4,5,\"6\"", "7,8,9"].join(newlines[os]));
+  console.log("  " + rows.map(function(row) {
+    return row.a + ":" + row.b + ":" + row.c;
+  }).join("|"));
+  console.log("");
+}
Index: Dev/branches/Demo/d3/test/csv/test-parse.out
===================================================================
--- Dev/branches/Demo/d3/test/csv/test-parse.out	(revision 225)
+++ Dev/branches/Demo/d3/test/csv/test-parse.out	(revision 225)
@@ -0,0 +1,9 @@
+parse UNIX newlines:
+  1:2:3|4:5:6|7:8:9
+
+parse DOS newlines:
+  1:2:3|4:5:6|7:8:9
+
+parse Mac newlines:
+  1:2:3|4:5:6|7:8:9
+
Index: Dev/branches/Demo/d3/test/layout/test-histogram.js
===================================================================
--- Dev/branches/Demo/d3/test/layout/test-histogram.js	(revision 225)
+++ Dev/branches/Demo/d3/test/layout/test-histogram.js	(revision 225)
@@ -0,0 +1,29 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.layout");
+
+var format = d3.format(".2f");
+
+var histogram = d3.layout.histogram().frequency(true);
+console.log("frequency(true):");
+console.log("  0,0,0,1,2,2 -> " + log(histogram([0,0,0,1,2,2])));
+console.log("");
+
+var histogram = d3.layout.histogram().frequency(false);
+console.log("frequency(false):");
+console.log("  0,0,0,1,2,2 -> " + log(histogram([0,0,0,1,2,2])));
+console.log("");
+
+var histogram = d3.layout.histogram().bins(2);
+console.log("bins(4):");
+console.log("  0,0,0,1,2,2 -> " + log(histogram([0,0,0,1,2,2])));
+console.log("");
+
+var histogram = d3.layout.histogram().bins([0,1,2,3]);
+console.log("bins(0,1,2,3):");
+console.log("  0,0,0,1,2,2 -> " + log(histogram([0,0,0,1,2,2])));
+console.log("");
+
+function log(bins) {
+  return bins.map(function(bin) { return format(bin.x) + "-" + format(bin.x + bin.dx) + ":" + format(bin.y); }).join(", ");
+}
Index: Dev/branches/Demo/d3/test/layout/test-histogram.out
===================================================================
--- Dev/branches/Demo/d3/test/layout/test-histogram.out	(revision 225)
+++ Dev/branches/Demo/d3/test/layout/test-histogram.out	(revision 225)
@@ -0,0 +1,12 @@
+frequency(true):
+  0,0,0,1,2,2 -> 0.00-0.50:3.00, 0.50-1.00:0.00, 1.00-1.50:1.00, 1.50-2.00:2.00
+
+frequency(false):
+  0,0,0,1,2,2 -> 0.00-0.50:0.50, 0.50-1.00:0.00, 1.00-1.50:0.17, 1.50-2.00:0.33
+
+bins(4):
+  0,0,0,1,2,2 -> 0.00-1.00:3.00, 1.00-2.00:3.00
+
+bins(0,1,2,3):
+  0,0,0,1,2,2 -> 0.00-1.00:3.00, 1.00-2.00:1.00, 2.00-3.00:2.00
+
Index: Dev/branches/Demo/d3/test/layout/test-treemap.js
===================================================================
--- Dev/branches/Demo/d3/test/layout/test-treemap.js	(revision 225)
+++ Dev/branches/Demo/d3/test/layout/test-treemap.js	(revision 225)
@@ -0,0 +1,71 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.layout");
+
+var treemap = d3.layout.treemap();
+
+console.log("zero, negative and NaN values:");
+console.log("  {value: 0}   ", treemap.nodes({value: 0})[0].area);
+console.log("  {value: -1}  ", treemap.nodes({value: -1})[0].area);
+console.log("  {value: NaN} ", treemap.nodes({value: NaN})[0].area);
+console.log("");
+
+treemap.size([0, 0]);
+console.log("size([0, 0]):");
+console.log("  {value: 0}   ", treemap.nodes({value: 0})[0].area);
+console.log("  {value: -1}  ", treemap.nodes({value: -1})[0].area);
+console.log("  {value: NaN} ", treemap.nodes({value: NaN})[0].area);
+console.log("  {value: 1}   ", treemap.nodes({value: 1})[0].area);
+console.log("");
+
+treemap.size([-1, -1]);
+console.log("size([-1, -1]):");
+console.log("  {value: 0}   ", treemap.nodes({value: 0})[0].area);
+console.log("  {value: -1}  ", treemap.nodes({value: -1})[0].area);
+console.log("  {value: NaN} ", treemap.nodes({value: NaN})[0].area);
+console.log("  {value: 1}   ", treemap.nodes({value: 1})[0].area);
+console.log("");
+
+treemap.size([-1, 1]);
+console.log("size([-1, 1]):");
+console.log("  {value: 0}   ", treemap.nodes({value: 0})[0].area);
+console.log("  {value: -1}  ", treemap.nodes({value: -1})[0].area);
+console.log("  {value: NaN} ", treemap.nodes({value: NaN})[0].area);
+console.log("  {value: 1}   ", treemap.nodes({value: 1})[0].area);
+console.log("");
+
+treemap.size([NaN, NaN]);
+console.log("size([NaN, NaN]):");
+console.log("  {value: 0}   ", treemap.nodes({value: 0})[0].area);
+console.log("  {value: -1}  ", treemap.nodes({value: -1})[0].area);
+console.log("  {value: NaN} ", treemap.nodes({value: NaN})[0].area);
+console.log("  {value: 1}   ", treemap.nodes({value: 1})[0].area);
+console.log("");
+
+treemap.size([10, 10]);
+var tree = {children: [{value: 1}]};
+
+console.log("padding:");
+console.log("  default                  ", log(treemap.nodes(tree)[1]));
+console.log("  1                        ", log(treemap.padding(1).nodes(tree)[1]));
+console.log("  10                       ", log(treemap.padding(10).nodes(tree)[1]));
+console.log("  [1, 1, 1, 1]             ", log(treemap.padding([1, 1, 1, 1]).nodes(tree)[1]));
+console.log("  [10, 1, 10, 1]           ", log(treemap.padding([10, 1, 10, 1]).nodes(tree)[1]));
+console.log("  [1, 10, 1, 10]           ", log(treemap.padding([1, 10, 1, 10]).nodes(tree)[1]));
+console.log("  function(x) 1            ", log(treemap.padding(function(x) { return 1; }).nodes(tree)[1]));
+console.log("  function(x) 10           ", log(treemap.padding(function(x) { return 10; }).nodes(tree)[1]));
+console.log("  function(x) [1, 1, 1, 1] ", log(treemap.padding(function(x) { return [1, 1, 1, 1]; }).nodes(tree)[1]));
+console.log("  function(x) [1, 10, 1, 1]", log(treemap.padding(function(x) { return [1, 10, 1, 1]; }).nodes(tree)[1]));
+console.log("  function(x) null         ", log(treemap.padding(function(x) { return null; }).nodes(tree)[1]));
+console.log("  null                     ", log(treemap.padding(null).nodes(tree)[1]));
+console.log("");
+
+treemap.size([1000, 1000]);
+var tree = {children: [{value: 2}, {value: 260}, {value: 180}, {value: 2}, {value: 1}, {value: 0}]};
+console.log("zero-sized node:");
+treemap.nodes(tree).forEach(function(node) { console.log(new Array(node.depth + 2).join("  ") + log(node)); });
+console.log("");
+
+function log(node) {
+  return node.x + "," + node.y + "," + node.dx + "," + node.dy;
+}
Index: Dev/branches/Demo/d3/test/layout/test-treemap.out
===================================================================
--- Dev/branches/Demo/d3/test/layout/test-treemap.out	(revision 225)
+++ Dev/branches/Demo/d3/test/layout/test-treemap.out	(revision 225)
@@ -0,0 +1,52 @@
+zero, negative and NaN values:
+  {value: 0}    0
+  {value: -1}   0
+  {value: NaN}  0
+
+size([0, 0]):
+  {value: 0}    0
+  {value: -1}   0
+  {value: NaN}  0
+  {value: 1}    0
+
+size([-1, -1]):
+  {value: 0}    0
+  {value: -1}   0
+  {value: NaN}  0
+  {value: 1}    1
+
+size([-1, 1]):
+  {value: 0}    0
+  {value: -1}   0
+  {value: NaN}  0
+  {value: 1}    0
+
+size([NaN, NaN]):
+  {value: 0}    0
+  {value: -1}   0
+  {value: NaN}  0
+  {value: 1}    0
+
+padding:
+  default                   0,0,10,10
+  1                         1,1,8,8
+  10                        5,5,0,0
+  [1, 1, 1, 1]              1,1,8,8
+  [10, 1, 10, 1]            1,5,8,0
+  [1, 10, 1, 10]            5,1,0,8
+  function(x) 1             1,1,8,8
+  function(x) 10            5,5,0,0
+  function(x) [1, 1, 1, 1]  1,1,8,8
+  function(x) [1, 10, 1, 1] 0.5,1,0,8
+  function(x) null          0,0,10,10
+  null                      0,0,10,10
+
+zero-sized node:
+  0,0,1000,1000
+    16,0,11,416
+    0,416,1000,584
+    27,0,973,416
+    5,0,11,416
+    0,0,5,416
+    0,0,0,416
+
Index: Dev/branches/Demo/d3/test/scale/test-linear.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-linear.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-linear.js	(revision 225)
@@ -0,0 +1,116 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var f = d3.format(" .3f");
+
+var x = d3.scale.linear();
+console.log("domain([0, 1]).range([0, 1]):");
+console.log("         -0.5  -> ", f(x(-0.5)));
+console.log("          0.0  -> ", f(x(0.0)));
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("          1.0  -> ", f(x(1.0)));
+console.log("          1.5  -> ", f(x(1.5)));
+console.log("");
+
+var x = d3.scale.linear().domain([1, 2]);
+console.log("domain([1, 2]).range([0, 1]):");
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("          1.0  -> ", f(x(1.0)));
+console.log("          1.5  -> ", f(x(1.5)));
+console.log("          2.0  -> ", f(x(2.0)));
+console.log("          2.5  -> ", f(x(2.5)));
+console.log("");
+
+var x = d3.scale.linear().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]);
+console.log("domain([01/01/1990, 01/01/1991]).range([0, 1]):");
+console.log("   10/20/1989  -> ", f(x(new Date(1989, 09, 20))));
+console.log("   01/01/1990  -> ", f(x(new Date(1990, 00, 01))));
+console.log("   03/15/1990  -> ", f(x(new Date(1990, 02, 15))));
+console.log("   05/27/1990  -> ", f(x(new Date(1990, 04, 27))));
+console.log("   01/01/1991  -> ", f(x(new Date(1991, 00, 01))));
+console.log("   03/15/1991  -> ", f(x(new Date(1991, 02, 15))));
+console.log("");
+
+var x = d3.scale.linear().range(["red", "blue"]);
+console.log("domain([0, 1]).range([\"red\", \"blue\"]):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.scale.linear().range(["red", "blue"]).interpolate(d3.interpolateHsl);
+console.log("domain([0, 1]).range([\"red\", \"blue\"]).interpolate(hsl):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.scale.linear();
+console.log("domain coercion:");
+console.log("       String  -> ", x.domain(["1", "2"]).domain());
+console.log("         Date  -> ", x.domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]).domain());
+console.log("       Number  -> ", x.domain([new Number(41), new Number(42)]).domain());
+console.log("");
+
+var x = d3.scale.linear();
+console.log("domain coercion, invert:");
+console.log("       String  -> ", x.domain(["0", "2"]).invert(.5));
+console.log("         Date  -> ", x.domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]).invert(.5));
+console.log("       Number  -> ", x.domain([new Number(0), new Number(42)]).invert(.5));
+console.log("");
+
+var x = d3.scale.linear();
+console.log("range coercion, invert:");
+console.log("       String  -> ", x.range(["0", "2"]).invert("1"));
+console.log("         Date  -> ", x.range([new Date(1990, 0, 1), new Date(1991, 0, 1)]).invert(new Date(1990, 6, 2, 13)));
+console.log("       Number  -> ", x.range([new Number(0), new Number(42)]).invert(new Number(21)));
+console.log("          ???  -> ", x.range(["#000", "#fff"]).invert("#999")); // can't be coerced
+console.log("");
+
+var x = d3.scale.linear();
+console.log("ticks:");
+console.log("            1  -> ", x.ticks(1).map(x.tickFormat(1)).join(", "));
+console.log("            2  -> ", x.ticks(2).map(x.tickFormat(2)).join(", "));
+console.log("            5  -> ", x.ticks(5).map(x.tickFormat(5)).join(", "));
+console.log("           10  -> ", x.ticks(10).map(x.tickFormat(10)).join(", "));
+console.log("");
+
+var x = d3.scale.linear().domain([1, 0]);
+console.log("descending ticks:");
+console.log("            1  -> ", x.ticks(1).map(x.tickFormat(1)).join(", "));
+console.log("            2  -> ", x.ticks(2).map(x.tickFormat(2)).join(", "));
+console.log("            5  -> ", x.ticks(5).map(x.tickFormat(5)).join(", "));
+console.log("           10  -> ", x.ticks(10).map(x.tickFormat(10)).join(", "));
+console.log("");
+
+var x = d3.scale.linear().clamp(true);
+console.log("domain clamping:")
+console.log("   inspection  -> ", x.clamp());
+console.log("        under  -> ", x(-1));
+console.log("         over  -> ", x(2));
+console.log("");
+
+var x = d3.scale.linear().domain([1, 0]).clamp(true);
+console.log("domain clamping reversed:")
+console.log("        under  -> ", x(-1));
+console.log("         over  -> ", x(2));
+console.log("");
+
+var x = d3.scale.linear().clamp(false);
+console.log("domain unclamping:")
+console.log("        under  -> ", x(-1));
+console.log("         over  -> ", x(11));
+console.log("");
+
+var x = d3.scale.linear();
+console.log("nice():");
+[[1.1, 10.9], [10.9, 1.1], [.7, 11.001], [123.1, 6.7], [0, .49]].forEach(function(d) {
+  var s = " [" + d.map(f) + " ]";
+  while (s.length < 21) s += " ";
+  console.log(" ", s + " -> ", x.domain(d).nice().domain().map(f).join(","));
+});
+console.log("");
Index: Dev/branches/Demo/d3/test/scale/test-linear.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-linear.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-linear.out	(revision 225)
@@ -0,0 +1,84 @@
+domain([0, 1]).range([0, 1]):
+         -0.5  ->  â0.500
+          0.0  ->   0.000
+          0.5  ->   0.500
+          1.0  ->   1.000
+          1.5  ->   1.500
+
+domain([1, 2]).range([0, 1]):
+          0.5  ->  â0.500
+          1.0  ->   0.000
+          1.5  ->   0.500
+          2.0  ->   1.000
+          2.5  ->   1.500
+
+domain([01/01/1990, 01/01/1991]).range([0, 1]):
+   10/20/1989  ->  â0.200
+   01/01/1990  ->   0.000
+   03/15/1990  ->   0.200
+   05/27/1990  ->   0.400
+   01/01/1991  ->   1.000
+   03/15/1991  ->   1.200
+
+domain([0, 1]).range(["red", "blue"]):
+         -0.5  ->  rgb(383,0,-127)
+          0.0  ->  rgb(255,0,0)
+          0.5  ->  rgb(128,0,128)
+          1.0  ->  rgb(0,0,255)
+          1.5  ->  rgb(-127,0,383)
+
+domain([0, 1]).range(["red", "blue"]).interpolate(hsl):
+         -0.5  ->  #0000ff
+          0.0  ->  #ff0000
+          0.5  ->  #00ff00
+          1.0  ->  #0000ff
+          1.5  ->  #ff0000
+
+domain coercion:
+       String  ->  [ 1, 2 ]
+         Date  ->  [ 631180800000, 662716800000 ]
+       Number  ->  [ 41, 42 ]
+
+domain coercion, invert:
+       String  ->  1
+         Date  ->  646948800000
+       Number  ->  21
+
+range coercion, invert:
+       String  ->  0.5
+         Date  ->  0.5
+       Number  ->  0.5
+          ???  ->  NaN
+
+ticks:
+            1  ->  0, 1
+            2  ->  0.0, 0.5, 1.0
+            5  ->  0.0, 0.2, 0.4, 0.6, 0.8, 1.0
+           10  ->  0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
+
+descending ticks:
+            1  ->  0, 1
+            2  ->  0.0, 0.5, 1.0
+            5  ->  0.0, 0.2, 0.4, 0.6, 0.8, 1.0
+           10  ->  0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
+
+domain clamping:
+   inspection  ->  true
+        under  ->  0
+         over  ->  1
+
+domain clamping reversed:
+        under  ->  1
+         over  ->  0
+
+domain unclamping:
+        under  ->  -1
+         over  ->  11
+
+nice():
+   [ 1.100, 10.900 ]    ->   1.000, 11.000
+   [ 10.900, 1.100 ]    ->   11.000, 1.000
+   [ 0.700, 11.001 ]    ->   0.000, 12.000
+   [ 123.100, 6.700 ]   ->   130.000, 0.000
+   [ 0.000, 0.490 ]     ->   0.000, 0.500
+
Index: Dev/branches/Demo/d3/test/scale/test-log.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-log.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-log.js	(revision 225)
@@ -0,0 +1,108 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var f = d3.format(" .3f");
+
+var x = d3.scale.log();
+console.log("domain([1, 10]).range([0, 1]):");
+console.log("           -5  -> ", f(x(-5)));
+console.log("            0  -> ", f(x(0)));
+console.log("         0.01  -> ", f(x(0.01)));
+console.log("          0.1  -> ", f(x(0.1)));
+console.log("            1  -> ", f(x(1)));
+console.log("            5  -> ", f(x(5)));
+console.log("           10  -> ", f(x(10)));
+console.log("          100  -> ", f(x(100)));
+console.log("");
+
+var x = d3.scale.log().domain([10, 1]);
+console.log("domain([10, 1]).range([0, 1]):");
+console.log("           -5  -> ", f(x(-5)));
+console.log("            0  -> ", f(x(0)));
+console.log("         0.01  -> ", f(x(0.01)));
+console.log("          0.1  -> ", f(x(0.1)));
+console.log("            1  -> ", f(x(1)));
+console.log("            5  -> ", f(x(5)));
+console.log("           10  -> ", f(x(10)));
+console.log("          100  -> ", f(x(100)));
+console.log("");
+
+var x = d3.scale.log().invert;
+console.log("domain([1, 10]).range([0, 1]).invert:");
+console.log("            0  -> ", f(x(0)));
+console.log("         0.01  -> ", f(x(0.01)));
+console.log("          0.1  -> ", f(x(0.1)));
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("            1  -> ", f(x(1)));
+console.log("");
+
+var x = d3.scale.log().domain([1, 2]);
+console.log("domain([1, 2]).range([0, 1]):");
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("          1.0  -> ", f(x(1.0)));
+console.log("          1.5  -> ", f(x(1.5)));
+console.log("          2.0  -> ", f(x(2.0)));
+console.log("          2.5  -> ", f(x(2.5)));
+console.log("");
+
+var x = d3.scale.log().domain([1, 2]).invert;
+console.log("domain([1, 2]).range([0, 1]).invert:");
+console.log("            0  -> ", f(x(0)));
+console.log("         0.01  -> ", f(x(0.01)));
+console.log("          0.1  -> ", f(x(0.1)));
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("            1  -> ", f(x(1)));
+console.log("");
+
+var x = d3.scale.log().domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]);
+console.log("domain([01/01/1990, 01/01/1991]).range([0, 1]):");
+console.log("   10/20/1989  -> ", f(x(new Date(1989, 09, 20))));
+console.log("   01/01/1990  -> ", f(x(new Date(1990, 00, 01))));
+console.log("   03/15/1990  -> ", f(x(new Date(1990, 02, 15))));
+console.log("   05/27/1990  -> ", f(x(new Date(1990, 04, 27))));
+console.log("   01/01/1991  -> ", f(x(new Date(1991, 00, 01))));
+console.log("   03/15/1991  -> ", f(x(new Date(1991, 02, 15))));
+console.log("");
+
+var x = d3.scale.log().domain([.1, 10]).range(["red", "blue"]);
+console.log("domain([.1, 10]).range([\"red\", \"blue\"]):");
+console.log("          0.1  -> ", x(0.1));
+console.log("            1  -> ", x(1));
+console.log("            5  -> ", x(5));
+console.log("           10  -> ", x(10));
+console.log("");
+
+var x = d3.scale.log().domain([.1, 10]).range(["red", "blue"]).interpolate(d3.interpolateHsl);
+console.log("domain([.1, 10]).range([\"red\", \"blue\"]).interpolate(hsl):");
+console.log("          0.1  -> ", x(0.1));
+console.log("            1  -> ", x(1));
+console.log("            5  -> ", x(5));
+console.log("           10  -> ", x(10));
+console.log("");
+
+var x = d3.scale.log();
+console.log("nice():");
+[
+  [1.1, 10.9], [10.9, 1.1], [.7, 11.001], [123.1, 6.7], [0, .49],
+  [.12, 1, 2.5, 3, 10.9]
+].forEach(function(d) {
+  var s = " [" + d.map(f) + " ]";
+  while (s.length < 21) s += " ";
+  console.log(" ", s + " -> ", x.domain(d).nice().domain().map(f).join(","));
+});
+console.log("");
+
+var x = d3.scale.log(), f = x.tickFormat();
+console.log("ticks:");
+console.log("     [.1, 10]  -> ", x.ticks().map(f).join(", "));
+console.log("    [.1, 100]  -> ", x.domain([.1, 100]).ticks().map(f).join(", "));
+console.log("     [1, 100]  -> ", x.domain([1, 100]).ticks().map(f).join(", "));
+console.log("   [-100, -1]  -> ", x.domain([-100, -1]).ticks().map(f).join(", "));
+console.log("     [100, 1]  -> ", x.domain([100, 1]).ticks().map(f).join(", "));
+console.log("");
+
+var x = d3.scale.log().domain([1, 2]).clamp(true);
+console.log("domain clamping:");
+console.log("         over  -> ", f(x(4)));
+console.log("        under  -> ", f(x(0)));
+console.log("");
Index: Dev/branches/Demo/d3/test/scale/test-log.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-log.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-log.out	(revision 225)
@@ -0,0 +1,80 @@
+domain([1, 10]).range([0, 1]):
+           -5  ->   NaN
+            0  ->  âInfinity
+         0.01  ->  â2.000
+          0.1  ->  â1.000
+            1  ->   0.000
+            5  ->   0.699
+           10  ->   1.000
+          100  ->   2.000
+
+domain([10, 1]).range([0, 1]):
+           -5  ->   NaN
+            0  ->   Infinity
+         0.01  ->   3.000
+          0.1  ->   2.000
+            1  ->   1.000
+            5  ->   0.301
+           10  ->   0.000
+          100  ->  â1.000
+
+domain([1, 10]).range([0, 1]).invert:
+            0  ->   1.000
+         0.01  ->   1.023
+          0.1  ->   1.259
+          0.5  ->   3.162
+            1  ->   10.000
+
+domain([1, 2]).range([0, 1]):
+          0.5  ->  â1.000
+          1.0  ->   0.000
+          1.5  ->   0.585
+          2.0  ->   1.000
+          2.5  ->   1.322
+
+domain([1, 2]).range([0, 1]).invert:
+            0  ->   1.000
+         0.01  ->   1.007
+          0.1  ->   1.072
+          0.5  ->   1.414
+            1  ->   2.000
+
+domain([01/01/1990, 01/01/1991]).range([0, 1]):
+   10/20/1989  ->  â0.206
+   01/01/1990  ->   0.000
+   03/15/1990  ->   0.204
+   05/27/1990  ->   0.406
+   01/01/1991  ->   1.000
+   03/15/1991  ->   1.194
+
+domain([.1, 10]).range(["red", "blue"]):
+          0.1  ->  rgb(255,0,0)
+            1  ->  rgb(128,0,128)
+            5  ->  rgb(38,0,217)
+           10  ->  rgb(0,0,255)
+
+domain([.1, 10]).range(["red", "blue"]).interpolate(hsl):
+          0.1  ->  #ff0000
+            1  ->  #00ff00
+            5  ->  #009aff
+           10  ->  #0000ff
+
+nice():
+   [ 1.100, 10.900 ]    ->   1.000, 100.000
+   [ 10.900, 1.100 ]    ->   100.000, 1.000
+   [ 0.700, 11.001 ]    ->   0.100, 100.000
+   [ 123.100, 6.700 ]   ->   1000.000, 1.000
+   [ 0.000, 0.490 ]     ->   0.000, 1.000
+   [ 0.120, 1.000, 2.500, 3.000, 10.900 ] ->   0.100, 1.000, 2.500, 3.000, 100.000
+
+ticks:
+     [.1, 10]  ->  1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1
+    [.1, 100]  ->  0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1, 2e+1, 3e+1, 4e+1, 5e+1, 6e+1, 7e+1, 8e+1, 9e+1, 1e+2
+     [1, 100]  ->  1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1, 2e+1, 3e+1, 4e+1, 5e+1, 6e+1, 7e+1, 8e+1, 9e+1, 1e+2
+   [-100, -1]  ->  -1e+2, -9e+1, -8e+1, -7e+1, -6e+1, -5e+1, -4e+1, -3e+1, -2e+1, -1e+1, -9, -8, -7, -6, -5, -4, -3, -2, -1
+     [100, 1]  ->  1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1, 2e+1, 3e+1, 4e+1, 5e+1, 6e+1, 7e+1, 8e+1, 9e+1, 1e+2
+
+domain clamping:
+         over  ->  1
+        under  ->  0
+
Index: Dev/branches/Demo/d3/test/scale/test-ordinal.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-ordinal.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-ordinal.js	(revision 225)
@@ -0,0 +1,79 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var x = d3.scale.ordinal().range(["a", "b", "c"]);
+console.log("range([a, b, c]):");
+console.log("  0 -> " + x(0));
+console.log("  1 -> " + x(1));
+console.log("  2 -> " + x(2));
+console.log("  3 -> " + x(3));
+console.log("  4 -> " + x(4));
+console.log("  5 -> " + x(5));
+console.log("  6 -> " + x(6));
+console.log("  0 -> " + x(0));
+console.log("  1 -> " + x(1));
+console.log("  2 -> " + x(2));
+console.log("  3 -> " + x(3));
+console.log("");
+
+x.domain([]);
+console.log("domain([]).range([a, b, c]):");
+console.log("  1 -> " + x(1));
+console.log("  2 -> " + x(2));
+console.log("  3 -> " + x(3));
+console.log("  0 -> " + x(0));
+console.log("  1 -> " + x(1));
+console.log("  2 -> " + x(2));
+console.log("");
+
+var x = d3.scale.ordinal().domain(["a", "b", "c"]).rangePoints([0, 120]);
+console.log("domain([a, b, c]).rangePoints([0, 120]):");
+console.log("  a -> " + x("a"));
+console.log("  b -> " + x("b"));
+console.log("  c -> " + x("c"));
+console.log("  d -> " + x("d"));
+console.log("");
+
+var x = d3.scale.ordinal().rangePoints([0, 120]).domain(["a", "b", "c"]);
+console.log("rangePoints([0, 120]).domain([a, b, c]):");
+console.log("  a -> " + x("a"));
+console.log("  b -> " + x("b"));
+console.log("  c -> " + x("c"));
+console.log("  d -> " + x("d"));
+console.log("");
+
+var x = d3.scale.ordinal().domain(["a", "b", "c"]).rangeBands([0, 120]);
+console.log("domain([a, b, c]).rangeBands([0, 120]):");
+console.log("  rangeBand: " + x.rangeBand());
+console.log("  a -> " + x("a"));
+console.log("  b -> " + x("b"));
+console.log("  c -> " + x("c"));
+console.log("  d -> " + x("d"));
+console.log("");
+
+var x = d3.scale.ordinal().rangeBands([0, 120]).domain(["a", "b", "c"]);
+console.log("rangeBands([0, 120]).domain([a, b, c]):");
+console.log("  rangeBand: " + x.rangeBand());
+console.log("  a -> " + x("a"));
+console.log("  b -> " + x("b"));
+console.log("  c -> " + x("c"));
+console.log("  d -> " + x("d"));
+console.log("");
+
+var x = d3.scale.ordinal().domain(["a", "b", "c"]).rangeRoundBands([0, 119]);
+console.log("domain([a, b, c]).rangeRoundBands([0, 119]):");
+console.log("  rangeBand: " + x.rangeBand());
+console.log("  a -> " + x("a"));
+console.log("  b -> " + x("b"));
+console.log("  c -> " + x("c"));
+console.log("  d -> " + x("d"));
+console.log("");
+
+var x = d3.scale.ordinal().rangeRoundBands([0, 119]).domain(["a", "b", "c"]);
+console.log("rangeRoundBands([0, 119]).domain([a, b, c]):");
+console.log("  rangeBand: " + x.rangeBand());
+console.log("  a -> " + x("a"));
+console.log("  b -> " + x("b"));
+console.log("  c -> " + x("c"));
+console.log("  d -> " + x("d"));
+console.log("");
Index: Dev/branches/Demo/d3/test/scale/test-ordinal.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-ordinal.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-ordinal.out	(revision 225)
@@ -0,0 +1,61 @@
+range([a, b, c]):
+  0 -> a
+  1 -> b
+  2 -> c
+  3 -> a
+  4 -> b
+  5 -> c
+  6 -> a
+  0 -> a
+  1 -> b
+  2 -> c
+  3 -> a
+
+domain([]).range([a, b, c]):
+  1 -> a
+  2 -> b
+  3 -> c
+  0 -> a
+  1 -> a
+  2 -> b
+
+domain([a, b, c]).rangePoints([0, 120]):
+  a -> 0
+  b -> 60
+  c -> 120
+  d -> 0
+
+rangePoints([0, 120]).domain([a, b, c]):
+  a -> 0
+  b -> 60
+  c -> 120
+  d -> 0
+
+domain([a, b, c]).rangeBands([0, 120]):
+  rangeBand: 40
+  a -> 0
+  b -> 40
+  c -> 80
+  d -> 0
+
+rangeBands([0, 120]).domain([a, b, c]):
+  rangeBand: 40
+  a -> 0
+  b -> 40
+  c -> 80
+  d -> 0
+
+domain([a, b, c]).rangeRoundBands([0, 119]):
+  rangeBand: 39
+  a -> 1
+  b -> 40
+  c -> 79
+  d -> 118
+
+rangeRoundBands([0, 119]).domain([a, b, c]):
+  rangeBand: 39
+  a -> 1
+  b -> 40
+  c -> 79
+  d -> 118
+
Index: Dev/branches/Demo/d3/test/scale/test-polylinear.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-polylinear.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-polylinear.js	(revision 225)
@@ -0,0 +1,37 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var f = d3.format(" .3f");
+
+var x = d3.scale.linear().domain([-1, 0, 1]).range(["red", "white", "green"]);
+console.log("domain(-1, 0, 1).range(red, white, green):");
+console.log("         -1.0 -> " + x(-1));
+console.log("         -0.8 -> " + x(-.8));
+console.log("         -0.6 -> " + x(-.6));
+console.log("         -0.4 -> " + x(-.4));
+console.log("         -0.2 -> " + x(-.2));
+console.log("          0.0 -> " + x(0));
+console.log("          0.2 -> " + x(.2));
+console.log("          0.4 -> " + x(.4));
+console.log("          0.6 -> " + x(.6));
+console.log("          0.8 -> " + x(.8));
+console.log("          1.0 -> " + x(1));
+console.log("");
+
+var x = d3.scale.linear().domain([-1, 0, 1]).range([-100, 0, 10]);
+console.log("domain(-1, 0, 1).range(-100, 0, 10):");
+console.log("         -1.5 -> " + f(x(-1.5)));
+console.log("         -1.0 -> " + f(x(-1)));
+console.log("         -0.5 -> " + f(x(-.5)));
+console.log("          0.0 -> " + f(x(0)));
+console.log("          0.5 -> " + f(x(.5)));
+console.log("          1.0 -> " + f(x(1)));
+console.log("          1.5 -> " + f(x(1.5)));
+console.log("");
+
+var x = d3.scale.linear();
+[[1.1, 1, 2, 3, 10.9], [123.1, 1, 2, 3, -.9]].forEach(function(d) {
+  console.log("domain([" + d.map(f) + " ]).nice():");
+  console.log("  ", x.domain(d).nice().domain());
+  console.log("");
+});
Index: Dev/branches/Demo/d3/test/scale/test-polylinear.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-polylinear.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-polylinear.out	(revision 225)
@@ -0,0 +1,28 @@
+domain(-1, 0, 1).range(red, white, green):
+         -1.0 -> rgb(255,0,0)
+         -0.8 -> rgb(255,51,51)
+         -0.6 -> rgb(255,102,102)
+         -0.4 -> rgb(255,153,153)
+         -0.2 -> rgb(255,204,204)
+          0.0 -> rgb(255,255,255)
+          0.2 -> rgb(204,230,204)
+          0.4 -> rgb(153,204,153)
+          0.6 -> rgb(102,179,102)
+          0.8 -> rgb(51,153,51)
+          1.0 -> rgb(0,128,0)
+
+domain(-1, 0, 1).range(-100, 0, 10):
+         -1.5 -> â150.000
+         -1.0 -> â100.000
+         -0.5 -> â50.000
+          0.0 ->  0.000
+          0.5 ->  5.000
+          1.0 ->  10.000
+          1.5 ->  15.000
+
+domain([ 1.100, 1.000, 2.000, 3.000, 10.900 ]).nice():
+   [ 1, 1, 2, 3, 11 ]
+
+domain([ 123.100, 1.000, 2.000, 3.000,â0.900 ]).nice():
+   [ 130, 1, 2, 3, -10 ]
+
Index: Dev/branches/Demo/d3/test/scale/test-pow.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-pow.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-pow.js	(revision 225)
@@ -0,0 +1,85 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var f = d3.format(" .3f");
+
+var x = d3.scale.pow().exponent(2);
+console.log("domain([0, 1]).range([0, 1]):");
+console.log("         -0.5  -> ", f(x(-0.5)));
+console.log("          0.0  -> ", f(x(0.0)));
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("          1.0  -> ", f(x(1.0)));
+console.log("          1.5  -> ", f(x(1.5)));
+console.log("");
+
+var x = d3.scale.pow().exponent(2).domain([1, 2]);
+console.log("domain([1, 2]).range([0, 1]):");
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("          1.0  -> ", f(x(1.0)));
+console.log("          1.5  -> ", f(x(1.5)));
+console.log("          2.0  -> ", f(x(2.0)));
+console.log("          2.5  -> ", f(x(2.5)));
+console.log("");
+
+var x = d3.scale.pow().exponent(2).domain([new Date(1990, 0, 1), new Date(1991, 0, 1)]);
+console.log("domain([01/01/1990, 01/01/1991]).range([0, 1]):");
+console.log("   10/20/1989  -> ", f(x(new Date(1989, 09, 20))));
+console.log("   01/01/1990  -> ", f(x(new Date(1990, 00, 01))));
+console.log("   03/15/1990  -> ", f(x(new Date(1990, 02, 15))));
+console.log("   05/27/1990  -> ", f(x(new Date(1990, 04, 27))));
+console.log("   01/01/1991  -> ", f(x(new Date(1991, 00, 01))));
+console.log("   03/15/1991  -> ", f(x(new Date(1991, 02, 15))));
+console.log("");
+
+var x = d3.scale.pow().exponent(2).range(["red", "blue"]);
+console.log("domain([0, 1]).range([\"red\", \"blue\"]):");
+console.log("         -0.5  -> ", x(-0.5));
+console.log("          0.0  -> ", x(0.0));
+console.log("          0.5  -> ", x(0.5));
+console.log("          1.0  -> ", x(1.0));
+console.log("          1.5  -> ", x(1.5));
+console.log("");
+
+var x = d3.scale.pow().exponent(2).range(["red", "blue"]).interpolate(d3.interpolateHsl);
+console.log("domain([0, 1]).range([\"red\", \"blue\"]).interpolate(hsl):");
+console.log("        -0.50  -> ", x(-0.50));
+console.log("         0.00  -> ", x(0.00));
+console.log("         0.50  -> ", x(0.50));
+console.log("        â0.50  -> ", x(Math.SQRT1_2));
+console.log("         1.00  -> ", x(1.00));
+console.log("         2.00  -> ", x(2.00));
+console.log("");
+
+var x = d3.scale.pow().exponent(2);
+console.log("ticks:");
+console.log("            1  -> ", x.ticks(1).map(x.tickFormat(1)).join(", "));
+console.log("            2  -> ", x.ticks(2).map(x.tickFormat(2)).join(", "));
+console.log("            5  -> ", x.ticks(5).map(x.tickFormat(5)).join(", "));
+console.log("           10  -> ", x.ticks(10).map(x.tickFormat(10)).join(", "));
+console.log("");
+
+var x = d3.scale.pow().exponent(2).domain([1, 0]);
+console.log("descending ticks:");
+console.log("            1  -> ", x.ticks(1).map(x.tickFormat(1)).join(", "));
+console.log("            2  -> ", x.ticks(2).map(x.tickFormat(2)).join(", "));
+console.log("            5  -> ", x.ticks(5).map(x.tickFormat(5)).join(", "));
+console.log("           10  -> ", x.ticks(10).map(x.tickFormat(10)).join(", "));
+console.log("");
+
+var x = d3.scale.pow().exponent(2).domain([1, 2]).range([0, 1]).clamp(true);
+console.log("domain clamping:")
+console.log("        under  -> ", x(-1));
+console.log("         over  -> ", x(2));
+console.log("");
+
+var x = d3.scale.pow().exponent(2);
+console.log("nice():");
+[
+  [1.1, 10.9], [10.9, 1.1], [.7, 11.001], [123.1, 6.7], [0, .49],
+  [.1, 1, 2.5, 3, 10.9]
+].forEach(function(d) {
+  var s = " [" + d.map(f) + " ]";
+  while (s.length < 21) s += " ";
+  console.log(" ", s + " -> ", x.domain(d).nice().domain().map(f).join(","));
+});
+console.log("");
Index: Dev/branches/Demo/d3/test/scale/test-pow.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-pow.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-pow.out	(revision 225)
@@ -0,0 +1,61 @@
+domain([0, 1]).range([0, 1]):
+         -0.5  ->  â0.250
+          0.0  ->   0.000
+          0.5  ->   0.250
+          1.0  ->   1.000
+          1.5  ->   2.250
+
+domain([1, 2]).range([0, 1]):
+          0.5  ->  â0.250
+          1.0  ->   0.000
+          1.5  ->   0.417
+          2.0  ->   1.000
+          2.5  ->   1.750
+
+domain([01/01/1990, 01/01/1991]).range([0, 1]):
+   10/20/1989  ->  â0.194
+   01/01/1990  ->   0.000
+   03/15/1990  ->   0.196
+   05/27/1990  ->   0.394
+   01/01/1991  ->   1.000
+   03/15/1991  ->   1.206
+
+domain([0, 1]).range(["red", "blue"]):
+         -0.5  ->  rgb(319,0,-64)
+          0.0  ->  rgb(255,0,0)
+          0.5  ->  rgb(191,0,64)
+          1.0  ->  rgb(0,0,255)
+          1.5  ->  rgb(-319,0,574)
+
+domain([0, 1]).range(["red", "blue"]).interpolate(hsl):
+        -0.50  ->  #ff00ff
+         0.00  ->  #ff0000
+         0.50  ->  #ffff00
+        â0.50  ->  #00ff00
+         1.00  ->  #0000ff
+         2.00  ->  #0000ff
+
+ticks:
+            1  ->  0, 1
+            2  ->  0.0, 0.5, 1.0
+            5  ->  0.0, 0.2, 0.4, 0.6, 0.8, 1.0
+           10  ->  0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
+
+descending ticks:
+            1  ->  0, 1
+            2  ->  0.0, 0.5, 1.0
+            5  ->  0.0, 0.2, 0.4, 0.6, 0.8, 1.0
+           10  ->  0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
+
+domain clamping:
+        under  ->  0
+         over  ->  1
+
+nice():
+   [ 1.100, 10.900 ]    ->   1.000, 11.000
+   [ 10.900, 1.100 ]    ->   11.000, 1.000
+   [ 0.700, 11.001 ]    ->   0.000, 12.000
+   [ 123.100, 6.700 ]   ->   130.000, 0.000
+   [ 0.000, 0.490 ]     ->   0.000, 0.500
+   [ 0.100, 1.000, 2.500, 3.000, 10.900 ] ->   0.000, 1.000, 2.500, 3.000, 11.000
+
Index: Dev/branches/Demo/d3/test/scale/test-quantile.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-quantile.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-quantile.js	(revision 225)
@@ -0,0 +1,142 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var x = d3.scale.quantile()
+    .domain([3, 6, 7, 8, 8, 10, 13, 15, 16, 20])
+    .range([0, 1, 2, 3]);
+
+console.log("domain(3, 6, 7, 8, 8, 10, 13, 15, 16, 20).range(0, 1, 2, 3):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("          3 -> " + x(3));
+console.log("          6 -> " + x(6));
+console.log("        6.9 -> " + x(6.9));
+console.log("          7 -> " + x(7));
+console.log("        7.1 -> " + x(7.1));
+console.log("          8 -> " + x(8));
+console.log("        8.9 -> " + x(8.9));
+console.log("          9 -> " + x(9));
+console.log("        9.1 -> " + x(9.1));
+console.log("         10 -> " + x(10));
+console.log("         13 -> " + x(13));
+console.log("       14.9 -> " + x(14.9));
+console.log("         15 -> " + x(15));
+console.log("       15.1 -> " + x(15.1));
+console.log("         16 -> " + x(16));
+console.log("         20 -> " + x(20));
+console.log("");
+
+var x = d3.scale.quantile()
+    .domain([3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20])
+    .range([0, 1, 2, 3]);
+
+console.log("domain(3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20).range(0, 1, 2, 3):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("          3 -> " + x(3));
+console.log("          6 -> " + x(6));
+console.log("        6.9 -> " + x(6.9));
+console.log("          7 -> " + x(7));
+console.log("        7.1 -> " + x(7.1));
+console.log("          8 -> " + x(8));
+console.log("        8.9 -> " + x(8.9));
+console.log("          9 -> " + x(9));
+console.log("        9.1 -> " + x(9.1));
+console.log("         10 -> " + x(10));
+console.log("         13 -> " + x(13));
+console.log("       14.9 -> " + x(14.9));
+console.log("         15 -> " + x(15));
+console.log("       15.1 -> " + x(15.1));
+console.log("         16 -> " + x(16));
+console.log("         20 -> " + x(20));
+console.log("");
+
+var x = d3.scale.quantile()
+    .domain([0, 1])
+    .range([0, 1]);
+
+console.log("domain(0, 1).range(0, 1):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("        -.5 -> " + x(-.5));
+console.log("          0 -> " + x(0));
+console.log("        .49 -> " + x(.49));
+console.log("        .51 -> " + x(.51));
+console.log("          1 -> " + x(1));
+console.log("        1.5 -> " + x(1.5));
+console.log("");
+
+var x = d3.scale.quantile()
+    .domain([1, 2, 3, 4])
+    .range(["a", "b"]);
+
+console.log("domain(1, 2, 3, 4).range(a, b):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("          0 -> " + x(0));
+console.log("          1 -> " + x(1));
+console.log("          2 -> " + x(2));
+console.log("       2.49 -> " + x(2.49));
+console.log("       2.51 -> " + x(2.51));
+console.log("          3 -> " + x(3));
+console.log("          4 -> " + x(4));
+console.log("          5 -> " + x(5));
+console.log("");
+
+var x = d3.scale.quantile()
+    .domain([1, 2, 3, 4])
+    .range(["a", "b", "c"]);
+
+console.log("domain(1, 2, 3, 4).range(a, b, c):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("          0 -> " + x(0));
+console.log("          1 -> " + x(1));
+console.log("        1.9 -> " + x(1.9));
+console.log("          2 -> " + x(2));
+console.log("        2.1 -> " + x(2.1));
+console.log("        2.9 -> " + x(2.9));
+console.log("          3 -> " + x(3));
+console.log("        3.1 -> " + x(3.1));
+console.log("          4 -> " + x(4));
+console.log("          5 -> " + x(5));
+console.log("");
+
+var x = d3.scale.quantile()
+    .domain([1, 1, 2, 2, 3, 3, 4, 4])
+    .range(["a", "b", "c", "d"]);
+
+console.log("domain(1, 1, 2, 2, 3, 3, 4, 4).range(a, b, c, d):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("          0 -> " + x(0));
+console.log("          1 -> " + x(1));
+console.log("       1.49 -> " + x(1.49));
+console.log("       1.51 -> " + x(1.51));
+console.log("          2 -> " + x(2));
+console.log("       2.49 -> " + x(2.49));
+console.log("       2.51 -> " + x(2.51));
+console.log("          3 -> " + x(3));
+console.log("       3.49 -> " + x(3.49));
+console.log("       3.51 -> " + x(3.51));
+console.log("          4 -> " + x(4));
+console.log("          5 -> " + x(5));
+console.log("");
+
+var x = d3.scale.quantile()
+    .domain([1, 2, 3, 4, 5, 6, 7, 8])
+    .range(["a", "b", "c", "d"]);
+
+console.log("domain(1, 2, 3, 4, 5, 6, 7, 8).range(a, b, c, d):");
+console.log("  quantiles -> " + x.quantiles());
+console.log("          0 -> " + x(0));
+console.log("          1 -> " + x(1));
+console.log("          2 -> " + x(2));
+console.log("       2.49 -> " + x(2.49));
+console.log("       2.51 -> " + x(2.51));
+console.log("          3 -> " + x(3));
+console.log("          4 -> " + x(4));
+console.log("       4.49 -> " + x(4.49));
+console.log("       4.51 -> " + x(4.51));
+console.log("          5 -> " + x(5));
+console.log("          6 -> " + x(6));
+console.log("       6.49 -> " + x(6.49));
+console.log("       6.51 -> " + x(6.51));
+console.log("          7 -> " + x(7));
+console.log("          8 -> " + x(8));
+console.log("          9 -> " + x(9));
+console.log("");
Index: Dev/branches/Demo/d3/test/scale/test-quantile.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-quantile.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-quantile.out	(revision 225)
@@ -0,0 +1,105 @@
+domain(3, 6, 7, 8, 8, 10, 13, 15, 16, 20).range(0, 1, 2, 3):
+  quantiles -> 7.25,9,14.5
+          3 -> 0
+          6 -> 0
+        6.9 -> 0
+          7 -> 0
+        7.1 -> 0
+          8 -> 1
+        8.9 -> 1
+          9 -> 2
+        9.1 -> 2
+         10 -> 2
+         13 -> 2
+       14.9 -> 3
+         15 -> 3
+       15.1 -> 3
+         16 -> 3
+         20 -> 3
+
+domain(3, 6, 7, 8, 8, 9, 10, 13, 15, 16, 20).range(0, 1, 2, 3):
+  quantiles -> 7.5,9,14
+          3 -> 0
+          6 -> 0
+        6.9 -> 0
+          7 -> 0
+        7.1 -> 0
+          8 -> 1
+        8.9 -> 1
+          9 -> 2
+        9.1 -> 2
+         10 -> 2
+         13 -> 2
+       14.9 -> 3
+         15 -> 3
+       15.1 -> 3
+         16 -> 3
+         20 -> 3
+
+domain(0, 1).range(0, 1):
+  quantiles -> 0.5
+        -.5 -> 0
+          0 -> 0
+        .49 -> 0
+        .51 -> 1
+          1 -> 1
+        1.5 -> 1
+
+domain(1, 2, 3, 4).range(a, b):
+  quantiles -> 2.5
+          0 -> a
+          1 -> a
+          2 -> a
+       2.49 -> a
+       2.51 -> b
+          3 -> b
+          4 -> b
+          5 -> b
+
+domain(1, 2, 3, 4).range(a, b, c):
+  quantiles -> 2,3
+          0 -> a
+          1 -> a
+        1.9 -> a
+          2 -> b
+        2.1 -> b
+        2.9 -> b
+          3 -> c
+        3.1 -> c
+          4 -> c
+          5 -> c
+
+domain(1, 1, 2, 2, 3, 3, 4, 4).range(a, b, c, d):
+  quantiles -> 1.75,2.5,3.25
+          0 -> a
+          1 -> a
+       1.49 -> a
+       1.51 -> a
+          2 -> b
+       2.49 -> b
+       2.51 -> c
+          3 -> c
+       3.49 -> d
+       3.51 -> d
+          4 -> d
+          5 -> d
+
+domain(1, 2, 3, 4, 5, 6, 7, 8).range(a, b, c, d):
+  quantiles -> 2.75,4.5,6.25
+          0 -> a
+          1 -> a
+          2 -> a
+       2.49 -> a
+       2.51 -> a
+          3 -> b
+          4 -> b
+       4.49 -> b
+       4.51 -> c
+          5 -> c
+          6 -> c
+       6.49 -> d
+       6.51 -> d
+          7 -> d
+          8 -> d
+          9 -> d
+
Index: Dev/branches/Demo/d3/test/scale/test-sqrt.js
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-sqrt.js	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-sqrt.js	(revision 225)
@@ -0,0 +1,51 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+var f = d3.format(" .3f");
+
+var x = d3.scale.sqrt();
+console.log("domain([0, 1]).range([0, 1]):");
+console.log("        -0.50  -> ", f(x(-0.50)));
+console.log("         0.00  -> ", f(x(0.00)));
+console.log("         0.25  -> ", f(x(0.25)));
+console.log("         0.50  -> ", f(x(0.50)));
+console.log("         1.00  -> ", f(x(1.00)));
+console.log("         4.00  -> ", f(x(4.00)));
+console.log("");
+
+var x = d3.scale.sqrt().domain([0, -1]);
+console.log("domain([0, -1]).range([0, 1]):");
+console.log("         0.50  -> ", f(x(0.50)));
+console.log("         0.00  -> ", f(x(0.00)));
+console.log("        -0.25  -> ", f(x(-0.25)));
+console.log("        -0.50  -> ", f(x(-0.50)));
+console.log("        -1.00  -> ", f(x(-1.00)));
+console.log("        -4.00  -> ", f(x(-4.00)));
+console.log("");
+
+var x = d3.scale.sqrt().domain([1, 2]);
+console.log("domain([1, 2]).range([0, 1]):");
+console.log("          0.5  -> ", f(x(0.5)));
+console.log("          1.0  -> ", f(x(1.0)));
+console.log("          1.5  -> ", f(x(1.5)));
+console.log("          2.0  -> ", f(x(2.0)));
+console.log("          2.5  -> ", f(x(2.5)));
+console.log("");
+
+var x = d3.scale.sqrt().range(["red", "blue"]);
+console.log("domain([0, 1]).range([\"red\", \"blue\"]):");
+console.log("         0.00  -> ", x(0.00));
+console.log("         0.25  -> ", x(0.25));
+console.log("         1.00  -> ", x(1.00));
+console.log("         4.00  -> ", x(4.00));
+console.log("");
+
+var x = d3.scale.sqrt().domain([1, 0]).range(["red", "blue"]).interpolate(d3.interpolateHsl);
+console.log("domain([1, 0]).range([\"red\", \"blue\"]).interpolate(hsl):");
+console.log("         0.00  -> ", x(0.00));
+console.log("         0.25  -> ", x(0.25));
+console.log("         0.50  -> ", x(0.50));
+console.log("         1.00  -> ", x(1.00));
+console.log("         4.00  -> ", x(4.00));
+console.log("");
Index: Dev/branches/Demo/d3/test/scale/test-sqrt.out
===================================================================
--- Dev/branches/Demo/d3/test/scale/test-sqrt.out	(revision 225)
+++ Dev/branches/Demo/d3/test/scale/test-sqrt.out	(revision 225)
@@ -0,0 +1,36 @@
+domain([0, 1]).range([0, 1]):
+        -0.50  ->  â0.707
+         0.00  ->   0.000
+         0.25  ->   0.500
+         0.50  ->   0.707
+         1.00  ->   1.000
+         4.00  ->   2.000
+
+domain([0, -1]).range([0, 1]):
+         0.50  ->  â0.707
+         0.00  ->   0.000
+        -0.25  ->   0.500
+        -0.50  ->   0.707
+        -1.00  ->   1.000
+        -4.00  ->   2.000
+
+domain([1, 2]).range([0, 1]):
+          0.5  ->  â0.707
+          1.0  ->   0.000
+          1.5  ->   0.543
+          2.0  ->   1.000
+          2.5  ->   1.403
+
+domain([0, 1]).range(["red", "blue"]):
+         0.00  ->  rgb(255,0,0)
+         0.25  ->  rgb(128,0,128)
+         1.00  ->  rgb(0,0,255)
+         4.00  ->  rgb(-255,0,510)
+
+domain([1, 0]).range(["red", "blue"]).interpolate(hsl):
+         0.00  ->  #0000ff
+         0.25  ->  #00ff00
+         0.50  ->  #d3ff00
+         1.00  ->  #ff0000
+         4.00  ->  #00ff00
+
Index: Dev/branches/Demo/d3/test/svg/test-arc.js
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-arc.js	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-arc.js	(revision 225)
@@ -0,0 +1,12 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var arc = d3.svg.arc();
+console.log("default:");
+console.log("  [0, 1] [0, Ï]:", arc({innerRadius: 0, outerRadius: 1, startAngle: 0, endAngle: Math.PI}));
+console.log("");
+
+var arc = d3.svg.arc().innerRadius(0).outerRadius(1).startAngle(0).endAngle(Math.PI);
+console.log("[0, 1] [0, Ï]:");
+console.log("  undefined:", arc());
+console.log("");
Index: Dev/branches/Demo/d3/test/svg/test-arc.out
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-arc.out	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-arc.out	(revision 225)
@@ -0,0 +1,6 @@
+default:
+  [0, 1] [0, Ï]: M6.123233995736766e-17,-1A1,1 0 1,1 6.123031769111886e-17,1L0,0Z
+
+[0, 1] [0, Ï]:
+  undefined: M6.123233995736766e-17,-1A1,1 0 1,1 6.123031769111886e-17,1L0,0Z
+
Index: Dev/branches/Demo/d3/test/svg/test-area.js
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-area.js	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-area.js	(revision 225)
@@ -0,0 +1,123 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var area = d3.svg.area();
+
+console.log("default:");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", area([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var i = 0,
+    area = d3.svg.area()
+    .x(function() { return i++; });
+
+console.log("x(function() { return i++; }):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", area([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var i = 0,
+    area = d3.svg.area()
+    .y(function() { return i++; });
+
+console.log("y(function() { return i++; }):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [0, 2]]:", area([[0, 0], [1, 1], [0, 2]]));
+console.log("");
+
+var area = d3.svg.area()
+    .y0(-1);
+
+console.log("y0(-1):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", area([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .x(function(d) { return d.x; })
+    .y1(function(d) { return d.y; });
+
+console.log("x(d.x).y1(d.y):");
+console.log("                      [{x:0,y:0}]:", area([{x:0,y:0}]));
+console.log("            [{x:0,y:0},{x:1,y:1}]:", area([{x:0,y:0},{x:1,y:1}]));
+console.log("  [{x:0,y:0},{x:1,y:1},{x:2,y:0}]:", area([{x:0,y:0},{x:1,y:1},{x:2,y:0}]));
+console.log("");
+
+var area = d3.svg.area()
+    .x(function(d) { return d.x; })
+    .y0(function(d) { return -d.y; })
+    .y1(function(d) { return d.y; });
+
+console.log("x(d.x).y0(-d.y).y1(d.y):");
+console.log("                      [{x:0,y:0}]:", area([{x:0,y:0}]));
+console.log("            [{x:0,y:0},{x:1,y:1}]:", area([{x:0,y:0},{x:1,y:1}]));
+console.log("  [{x:0,y:0},{x:1,y:1},{x:2,y:0}]:", area([{x:0,y:0},{x:1,y:1},{x:2,y:0}]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("step-before");
+
+console.log("interpolate(step-before):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", area([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("step-after");
+
+console.log("interpolate(step-after):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", area([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("basis");
+
+console.log("interpolate(basis):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", area([[0, 0], [1, 1]]));
+console.log("        [[0, 0], [6, 6], [12, 0]]:", area([[0, 0], [6, 6], [12, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("basis-closed");
+
+console.log("interpolate(basis-closed):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [6, 6]]:", area([[0, 0], [6, 6]]));
+console.log("        [[0, 0], [6, 6], [12, 0]]:", area([[0, 0], [6, 6], [12, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("cardinal");
+
+console.log("interpolate(cardinal):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [5, 5]]:", area([[0, 0], [5, 5]]));
+console.log("        [[0, 0], [5, 5], [10, 0]]:", area([[0, 0], [5, 5], [10, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("cardinal-closed");
+
+console.log("interpolate(cardinal-closed):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [5, 5]]:", area([[0, 0], [5, 5]]));
+console.log("        [[0, 0], [5, 5], [10, 0]]:", area([[0, 0], [5, 5], [10, 0]]));
+console.log("");
+
+var area = d3.svg.area()
+    .interpolate("monotone");
+
+console.log("interpolate(monotone):");
+console.log("                         [[0, 0]]:", area([[0, 0]]));
+console.log("                 [[0, 0], [5, 5]]:", area([[0, 0], [5, 5]]));
+console.log("        [[0, 0], [5, 5], [10, 0]]:", area([[0, 0], [5, 5], [10, 0]]));
+console.log("");
Index: Dev/branches/Demo/d3/test/svg/test-area.out
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-area.out	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-area.out	(revision 225)
@@ -0,0 +1,65 @@
+default:
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [1, 1]]: M0,0L1,1L1,0L0,0Z
+         [[0, 0], [1, 1], [2, 0]]: M0,0L1,1L2,0L2,0L1,0L0,0Z
+
+x(function() { return i++; }):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [1, 1]]: M1,0L2,1L2,0L1,0Z
+         [[0, 0], [1, 1], [2, 0]]: M3,0L4,1L5,0L5,0L4,0L3,0Z
+
+y(function() { return i++; }):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [1, 1]]: M0,1L1,2L1,2L0,1Z
+         [[0, 0], [1, 1], [0, 2]]: M0,3L1,4L0,5L0,5L1,4L0,3Z
+
+y0(-1):
+                         [[0, 0]]: M0,0L0,-1Z
+                 [[0, 0], [1, 1]]: M0,0L1,1L1,-1L0,-1Z
+         [[0, 0], [1, 1], [2, 0]]: M0,0L1,1L2,0L2,-1L1,-1L0,-1Z
+
+x(d.x).y1(d.y):
+                      [{x:0,y:0}]: M0,0L0,0Z
+            [{x:0,y:0},{x:1,y:1}]: M0,0L1,1L1,0L0,0Z
+  [{x:0,y:0},{x:1,y:1},{x:2,y:0}]: M0,0L1,1L2,0L2,0L1,0L0,0Z
+
+x(d.x).y0(-d.y).y1(d.y):
+                      [{x:0,y:0}]: M0,0L0,0Z
+            [{x:0,y:0},{x:1,y:1}]: M0,0L1,1L1,-1L0,0Z
+  [{x:0,y:0},{x:1,y:1},{x:2,y:0}]: M0,0L1,1L2,0L2,0L1,-1L0,0Z
+
+interpolate(step-before):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [1, 1]]: M0,0V1H1L1,0V0H0Z
+         [[0, 0], [1, 1], [2, 0]]: M0,0V1H1V0H2L2,0V0H1V0H0Z
+
+interpolate(step-after):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [1, 1]]: M0,0H1V1L1,0H0V0Z
+         [[0, 0], [1, 1], [2, 0]]: M0,0H1V1H2V0L2,0H1V0H0V0Z
+
+interpolate(basis):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [1, 1]]: M0,0L1,1L1,0L0,0Z
+        [[0, 0], [6, 6], [12, 0]]: M0,0C0,0,0,0,1,1C2,2,4,4,6,4C8,4,10,2,11,1C12,0,12,0,12,0L12,0C12,0,12,0,11,0C10,0,8,0,6,0C4,0,2,0,1,0C0,0,0,0,0,0Z
+
+interpolate(basis-closed):
+                         [[0, 0]]: M0,0C0,0,0,0,0,0L0,0C0,0,0,0,0,0Z
+                 [[0, 0], [6, 6]]: M2,2C2,2,4,4,4,4C4,4,2,2,2,2L4,0C4,0,2,0,2,0C2,0,4,0,4,0Z
+        [[0, 0], [6, 6], [12, 0]]: M9,1C8,0,4,0,3,1C2,2,4,4,6,4C8,4,10,2,9,1L3,0C4,0,8,0,9,0C10,0,8,0,6,0C4,0,2,0,3,0Z
+
+interpolate(cardinal):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [5, 5]]: M0,0L5,5L5,0L0,0Z
+        [[0, 0], [5, 5], [10, 0]]: M0,0Q4,5,5,5Q6,5,10,0L10,0Q6,0,5,0Q4,0,0,0Z
+
+interpolate(cardinal-closed):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [5, 5]]: M0,0L5,5L5,0L0,0Z
+        [[0, 0], [5, 5], [10, 0]]: M0,0C-0.7500000000000001,0.7500000000000001,3.5,5,5,5S10.75,0.7500000000000001,10,0S0.7500000000000001,-0.7500000000000001,0,0L10,0C10.75,0,6.5,0,5,0S-0.7500000000000001,0,0,0S9.25,0,10,0Z
+
+interpolate(monotone):
+                         [[0, 0]]: M0,0L0,0Z
+                 [[0, 0], [5, 5]]: M0,0L5,5L5,0L0,0Z
+        [[0, 0], [5, 5], [10, 0]]: M0,0C0.4166666666666667,0.4166666666666667,3.333333333333333,5,5,5S9.583333333333334,0.4166666666666667,10,0L10,0C9.166666666666666,0,6.666666666666667,0,5,0S0.8333333333333334,0,0,0Z
+
Index: Dev/branches/Demo/d3/test/svg/test-line.js
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-line.js	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-line.js	(revision 225)
@@ -0,0 +1,93 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../lib/sizzle/sizzle");
+require("./../../d3");
+
+var line = d3.svg.line();
+
+console.log("default:");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", line([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", line([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .y(-1);
+
+console.log("y(-1):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", line([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", line([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .x(function(d) { return d.x; })
+    .y(function(d) { return d.y; });
+
+console.log("x(d.x).y(d.y):");
+console.log("                      [{x:0,y:0}]:", line([{x:0,y:0}]));
+console.log("            [{x:0,y:0},{x:1,y:1}]:", line([{x:0,y:0},{x:1,y:1}]));
+console.log("  [{x:0,y:0},{x:1,y:1},{x:2,y:0}]:", line([{x:0,y:0},{x:1,y:1},{x:2,y:0}]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("step-before");
+
+console.log("interpolate(step-before):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", line([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", line([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("step-after");
+
+console.log("interpolate(step-after):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", line([[0, 0], [1, 1]]));
+console.log("         [[0, 0], [1, 1], [2, 0]]:", line([[0, 0], [1, 1], [2, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("basis");
+
+console.log("interpolate(basis):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [1, 1]]:", line([[0, 0], [1, 1]]));
+console.log("        [[0, 0], [6, 6], [12, 0]]:", line([[0, 0], [6, 6], [12, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("basis-closed");
+
+console.log("interpolate(basis-closed):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [6, 6]]:", line([[0, 0], [6, 6]]));
+console.log("        [[0, 0], [6, 6], [12, 0]]:", line([[0, 0], [6, 6], [12, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("cardinal");
+
+console.log("interpolate(cardinal):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [5, 5]]:", line([[0, 0], [5, 5]]));
+console.log("        [[0, 0], [5, 5], [10, 0]]:", line([[0, 0], [5, 5], [10, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("cardinal-closed");
+
+console.log("interpolate(cardinal-closed):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [5, 5]]:", line([[0, 0], [5, 5]]));
+console.log("        [[0, 0], [5, 5], [10, 0]]:", line([[0, 0], [5, 5], [10, 0]]));
+console.log("");
+
+var line = d3.svg.line()
+    .interpolate("monotone");
+
+console.log("interpolate(monotone):");
+console.log("                         [[0, 0]]:", line([[0, 0]]));
+console.log("                 [[0, 0], [5, 5]]:", line([[0, 0], [5, 5]]));
+console.log("        [[0, 0], [5, 5], [10, 0]]:", line([[0, 0], [5, 5], [10, 0]]));
+console.log("");
Index: Dev/branches/Demo/d3/test/svg/test-line.out
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-line.out	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-line.out	(revision 225)
@@ -0,0 +1,50 @@
+default:
+                         [[0, 0]]: M0,0
+                 [[0, 0], [1, 1]]: M0,0L1,1
+         [[0, 0], [1, 1], [2, 0]]: M0,0L1,1L2,0
+
+y(-1):
+                         [[0, 0]]: M0,-1
+                 [[0, 0], [1, 1]]: M0,-1L1,-1
+         [[0, 0], [1, 1], [2, 0]]: M0,-1L1,-1L2,-1
+
+x(d.x).y(d.y):
+                      [{x:0,y:0}]: M0,0
+            [{x:0,y:0},{x:1,y:1}]: M0,0L1,1
+  [{x:0,y:0},{x:1,y:1},{x:2,y:0}]: M0,0L1,1L2,0
+
+interpolate(step-before):
+                         [[0, 0]]: M0,0
+                 [[0, 0], [1, 1]]: M0,0V1H1
+         [[0, 0], [1, 1], [2, 0]]: M0,0V1H1V0H2
+
+interpolate(step-after):
+                         [[0, 0]]: M0,0
+                 [[0, 0], [1, 1]]: M0,0H1V1
+         [[0, 0], [1, 1], [2, 0]]: M0,0H1V1H2V0
+
+interpolate(basis):
+                         [[0, 0]]: M0,0
+                 [[0, 0], [1, 1]]: M0,0L1,1
+        [[0, 0], [6, 6], [12, 0]]: M0,0C0,0,0,0,1,1C2,2,4,4,6,4C8,4,10,2,11,1C12,0,12,0,12,0
+
+interpolate(basis-closed):
+                         [[0, 0]]: M0,0C0,0,0,0,0,0
+                 [[0, 0], [6, 6]]: M2,2C2,2,4,4,4,4C4,4,2,2,2,2
+        [[0, 0], [6, 6], [12, 0]]: M9,1C8,0,4,0,3,1C2,2,4,4,6,4C8,4,10,2,9,1
+
+interpolate(cardinal):
+                         [[0, 0]]: M0,0
+                 [[0, 0], [5, 5]]: M0,0L5,5
+        [[0, 0], [5, 5], [10, 0]]: M0,0Q4,5,5,5Q6,5,10,0
+
+interpolate(cardinal-closed):
+                         [[0, 0]]: M0,0
+                 [[0, 0], [5, 5]]: M0,0L5,5
+        [[0, 0], [5, 5], [10, 0]]: M0,0C-0.7500000000000001,0.7500000000000001,3.5,5,5,5S10.75,0.7500000000000001,10,0S0.7500000000000001,-0.7500000000000001,0,0
+
+interpolate(monotone):
+                         [[0, 0]]: M0,0
+                 [[0, 0], [5, 5]]: M0,0L5,5
+        [[0, 0], [5, 5], [10, 0]]: M0,0C0.4166666666666667,0.4166666666666667,3.333333333333333,5,5,5S9.583333333333334,0.4166666666666667,10,0
+
Index: Dev/branches/Demo/d3/test/svg/test-symbol.js
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-symbol.js	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-symbol.js	(revision 225)
@@ -0,0 +1,63 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+
+var symbol = d3.svg.symbol();
+console.log("default:");
+console.log("  undefined:", symbol());
+console.log("");
+
+var symbol = d3.svg.symbol().size(Number);
+console.log("size(Number):");
+console.log("   0:", symbol(0));
+console.log("   Ï:", symbol(Math.PI));
+console.log("  4Ï:", symbol(4 * Math.PI));
+console.log("");
+
+var symbol = d3.svg.symbol().size(function(d) { return d.z; });
+console.log("size(d.z):");
+console.log("   0:", symbol({z: 0}));
+console.log("   Ï:", symbol({z: Math.PI}));
+console.log("  4Ï:", symbol({z: 4 * Math.PI}));
+console.log("");
+
+var symbol = d3.svg.symbol().type("cross").size(Number);
+console.log("type(cross).size(Number):");
+console.log("   0:", symbol(0));
+console.log("  20:", symbol(20));
+console.log("");
+
+var symbol = d3.svg.symbol().type("diamond").size(Number);
+console.log("type(diamond).size(Number):");
+console.log("   0:", symbol(0));
+console.log("  10:", symbol(10));
+console.log("");
+
+var symbol = d3.svg.symbol().type("square").size(Number);
+console.log("type(square).size(Number):");
+console.log("   0:", symbol(0));
+console.log("   4:", symbol(4));
+console.log("  16:", symbol(16));
+console.log("");
+
+var symbol = d3.svg.symbol().type("triangle-down").size(Number);
+console.log("type(triangle-down).size(Number):");
+console.log("   0:", symbol(0));
+console.log("  10:", symbol(10));
+console.log("");
+
+var symbol = d3.svg.symbol().type("triangle-up").size(Number);
+console.log("type(triangle-up).size(Number):");
+console.log("   0:", symbol(0));
+console.log("  10:", symbol(10));
+console.log("");
+
+var symbol = d3.svg.symbol().type(String);
+console.log("type(String):");
+console.log("      undefined:", symbol());
+console.log("         circle:", symbol("circle"));
+console.log("          cross:", symbol("cross"));
+console.log("        diamond:", symbol("diamond"));
+console.log("         square:", symbol("square"));
+console.log("  triangle-down:", symbol("triangle-down"));
+console.log("    triangle-up:", symbol("triangle-up"));
+console.log("");
Index: Dev/branches/Demo/d3/test/svg/test-symbol.out
===================================================================
--- Dev/branches/Demo/d3/test/svg/test-symbol.out	(revision 225)
+++ Dev/branches/Demo/d3/test/svg/test-symbol.out	(revision 225)
@@ -0,0 +1,43 @@
+default:
+  undefined: M0,4.51351666838205A4.51351666838205,4.51351666838205 0 1,1 0,-4.51351666838205A4.51351666838205,4.51351666838205 0 1,1 0,4.51351666838205Z
+
+size(Number):
+   0: M0,0A0,0 0 1,1 0,0A0,0 0 1,1 0,0Z
+   Ï: M0,1A1,1 0 1,1 0,-1A1,1 0 1,1 0,1Z
+  4Ï: M0,2A2,2 0 1,1 0,-2A2,2 0 1,1 0,2Z
+
+size(d.z):
+   0: M0,0A0,0 0 1,1 0,0A0,0 0 1,1 0,0Z
+   Ï: M0,1A1,1 0 1,1 0,-1A1,1 0 1,1 0,1Z
+  4Ï: M0,2A2,2 0 1,1 0,-2A2,2 0 1,1 0,2Z
+
+type(cross).size(Number):
+   0: M0,0H0V0H0V0H0V0H0V0H0V0H0Z
+  20: M-3,-1H-1V-3H1V-1H3V1H1V3H-1V1H-3Z
+
+type(diamond).size(Number):
+   0: M0,0L0,0 0,0 0,0Z
+  10: M0,-2.9428309563827124L1.6990442448471224,0 0,2.9428309563827124 -1.6990442448471224,0Z
+
+type(square).size(Number):
+   0: M0,0L0,0 0,0 0,0Z
+   4: M-1,-1L1,-1 1,1 -1,1Z
+  16: M-2,-2L2,-2 2,2 -2,2Z
+
+type(triangle-down).size(Number):
+   0: M0,0L0,0 0,0Z
+  10: M0,2.0808957251439084L2.4028114141347543,-2.0808957251439084 -2.4028114141347543,-2.0808957251439084Z
+
+type(triangle-up).size(Number):
+   0: M0,0L0,0 0,0Z
+  10: M0,-2.0808957251439084L2.4028114141347543,2.0808957251439084 -2.4028114141347543,2.0808957251439084Z
+
+type(String):
+      undefined: M0,4.51351666838205A4.51351666838205,4.51351666838205 0 1,1 0,-4.51351666838205A4.51351666838205,4.51351666838205 0 1,1 0,4.51351666838205Z
+         circle: M0,4.51351666838205A4.51351666838205,4.51351666838205 0 1,1 0,-4.51351666838205A4.51351666838205,4.51351666838205 0 1,1 0,4.51351666838205Z
+          cross: M-5.366563145999495,-1.7888543819998317H-1.7888543819998317V-5.366563145999495H1.7888543819998317V-1.7888543819998317H5.366563145999495V1.7888543819998317H1.7888543819998317V5.366563145999495H-1.7888543819998317V1.7888543819998317H-5.366563145999495Z
+        diamond: M0,-7.444838872816797L4.298279727294167,0 0,7.444838872816797 -4.298279727294167,0Z
+         square: M-4,-4L4,-4 4,4 -4,4Z
+  triangle-down: M0,5.26429605180997L6.078685485212741,-5.26429605180997 -6.078685485212741,-5.26429605180997Z
+    triangle-up: M0,-5.26429605180997L6.078685485212741,5.26429605180997 -6.078685485212741,5.26429605180997Z
+
Index: Dev/branches/Demo/d3/test/time/test-day.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-day.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-day.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("day:");
+console.log("  2011-01-01T07:59:59Z -> " + format(d3.time.day(parse("2011-01-01T07:59:59Z"))));
+console.log("  2011-01-01T08:00:00Z -> " + format(d3.time.day(parse("2011-01-01T08:00:00Z"))));
+console.log("  2011-01-01T08:00:01Z -> " + format(d3.time.day(parse("2011-01-01T08:00:01Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.day(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.day(parse("2011-11-06T09:00:00Z"))));
+console.log("");
+
+console.log("day.utc:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.day.utc(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.day.utc(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T23:00:00Z -> " + format(d3.time.day.utc(parse("2011-01-01T23:00:00Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.day.utc(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.day.utc(parse("2011-11-06T09:00:00Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-day.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-day.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-day.out	(revision 225)
@@ -0,0 +1,14 @@
+day:
+  2011-01-01T07:59:59Z -> Fri Dec 31 2010 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:00Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:01Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+
+day.utc:
+  2010-12-31T23:59:59Z -> Thu Dec 30 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T23:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sat Mar 12 2011 16:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Sat Nov 05 2011 17:00:00 GMT-0700 (PDT)
+
Index: Dev/branches/Demo/d3/test/time/test-days.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-days.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-days.js	(revision 225)
@@ -0,0 +1,34 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("days(2010-12-31T06:00:00Z, 2011-01-02T10:00:00Z):");
+d3.time.days(parse("2010-12-31T06:00:00Z"), parse("2011-01-02T10:00:00Z")).forEach(log);
+console.log("");
+
+console.log("days(2011-03-12T07:00:00Z, 2011-03-14T11:00:00Z):");
+d3.time.days(parse("2011-03-12T07:00:00Z"), parse("2011-03-14T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("days(2011-11-05T07:00:00Z, 2011-11-07T11:00:00Z):");
+d3.time.days(parse("2011-11-05T07:00:00Z"), parse("2011-11-07T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("days(2011-11-05T07:00:00Z, 2011-11-17T11:00:00Z, 5):");
+d3.time.days(parse("2011-11-05T07:00:00Z"), parse("2011-11-17T11:00:00Z"), 5).forEach(log);
+console.log("");
+
+console.log("days.utc(2010-12-30T22:00:00Z, 2011-01-02T02:00:00Z):");
+d3.time.days.utc(parse("2010-12-30T22:00:00Z"), parse("2011-01-02T02:00:00Z")).forEach(log);
+console.log("");
+
+console.log("days.utc(2010-12-30T22:00:00Z, 2011-01-12T02:00:00Z, 5):");
+d3.time.days.utc(parse("2010-12-30T22:00:00Z"), parse("2011-01-12T02:00:00Z"), 5).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-days.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-days.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-days.out	(revision 225)
@@ -0,0 +1,31 @@
+days(2010-12-31T06:00:00Z, 2011-01-02T10:00:00Z):
+  Fri Dec 31 2010 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sun Jan 02 2011 00:00:00 GMT-0800 (PST)
+
+days(2011-03-12T07:00:00Z, 2011-03-14T11:00:00Z):
+  Sat Mar 12 2011 00:00:00 GMT-0800 (PST)
+  Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  Mon Mar 14 2011 00:00:00 GMT-0700 (PDT)
+
+days(2011-11-05T07:00:00Z, 2011-11-07T11:00:00Z):
+  Sat Nov 05 2011 00:00:00 GMT-0700 (PDT)
+  Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+  Mon Nov 07 2011 00:00:00 GMT-0800 (PST)
+
+days(2011-11-05T07:00:00Z, 2011-11-17T11:00:00Z, 5):
+  Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+  Fri Nov 11 2011 00:00:00 GMT-0800 (PST)
+  Wed Nov 16 2011 00:00:00 GMT-0800 (PST)
+
+days.utc(2010-12-30T22:00:00Z, 2011-01-02T02:00:00Z):
+  Thu Dec 30 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 16:00:00 GMT-0800 (PST)
+
+days.utc(2010-12-30T22:00:00Z, 2011-01-12T02:00:00Z, 5):
+  Thu Dec 30 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Wed Jan 05 2011 16:00:00 GMT-0800 (PST)
+  Mon Jan 10 2011 16:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-format-iso.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-format-iso.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-format-iso.js	(revision 225)
@@ -0,0 +1,8 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+console.log("format:");
+console.log("  01/01/1990 00:00:00 ->", d3.time.format.iso(new Date(Date.UTC(1990, 0, 1))));
+console.log("  12/31/2011 23:59:59 ->", d3.time.format.iso(new Date(Date.UTC(2011, 11, 31, 23, 59, 59))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-format-iso.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-format-iso.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-format-iso.out	(revision 225)
@@ -0,0 +1,4 @@
+format:
+  01/01/1990 00:00:00 -> 1990-01-01T00:00:00Z
+  12/31/2011 23:59:59 -> 2011-12-31T23:59:59Z
+
Index: Dev/branches/Demo/d3/test/time/test-format-utc.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-format-utc.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-format-utc.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var formats = [
+  "a",  "A",  "b",  "B",  "c",  "d",  "e",  "H", "I",  "j",  "m",  "M",
+  "p",  "S",  "U",  "w",  "W",  "x",  "X",  "y", "Y",  "Z",  "%"
+];
+
+var now = new Date(Date.UTC(1990, 0, 1));
+console.log("format 01/01/1990 00:00:00:");
+formats.forEach(function(f) {
+   console.log("  " + f + ":", d3.time.format.utc("%" + f)(now));
+});
+console.log("");
+
+var now = new Date(Date.UTC(2011, 11, 31, 23, 59, 59));
+console.log("format 12/31/2011 23:59:59:");
+formats.forEach(function(f) {
+   console.log("  " + f + ":", d3.time.format.utc("%" + f)(now));
+});
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-format-utc.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-format-utc.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-format-utc.out	(revision 225)
@@ -0,0 +1,50 @@
+format 01/01/1990 00:00:00:
+  a: Mon
+  A: Monday
+  b: Jan
+  B: January
+  c: Mon Jan  1 00:00:00 1990
+  d: 01
+  e:  1
+  H: 00
+  I: 12
+  j: 001
+  m: 01
+  M: 00
+  p: AM
+  S: 00
+  U: 00
+  w: 1
+  W: 00
+  x: 01/01/90
+  X: 00:00:00
+  y: 90
+  Y: 1990
+  Z: +0000
+  %: %
+
+format 12/31/2011 23:59:59:
+  a: Sat
+  A: Saturday
+  b: Dec
+  B: December
+  c: Sat Dec 31 23:59:59 2011
+  d: 31
+  e: 31
+  H: 23
+  I: 11
+  j: 365
+  m: 12
+  M: 59
+  p: PM
+  S: 59
+  U: 52
+  w: 6
+  W: 52
+  x: 12/31/11
+  X: 23:59:59
+  y: 11
+  Y: 2011
+  Z: +0000
+  %: %
+
Index: Dev/branches/Demo/d3/test/time/test-format.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-format.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-format.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var formats = [
+  "a",  "A",  "b",  "B",  "c",  "d",  "e",  "H", "I",  "j",  "m",  "M",
+  "p",  "S",  "U",  "w",  "W",  "x",  "X",  "y", "Y",  "Z",  "%"
+];
+
+var now = new Date(1990, 0, 1);
+console.log("format 01/01/1990 00:00:00:");
+formats.forEach(function(f) {
+   console.log("  " + f + ":", d3.time.format("%" + f)(now));
+});
+console.log("");
+
+var now = new Date(2011, 11, 31, 23, 59, 59);
+console.log("format 12/31/2011 23:59:59:");
+formats.forEach(function(f) {
+   console.log("  " + f + ":", d3.time.format("%" + f)(now));
+});
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-format.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-format.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-format.out	(revision 225)
@@ -0,0 +1,50 @@
+format 01/01/1990 00:00:00:
+  a: Mon
+  A: Monday
+  b: Jan
+  B: January
+  c: Mon Jan  1 00:00:00 1990
+  d: 01
+  e:  1
+  H: 00
+  I: 12
+  j: 001
+  m: 01
+  M: 00
+  p: AM
+  S: 00
+  U: 00
+  w: 1
+  W: 00
+  x: 01/01/90
+  X: 00:00:00
+  y: 90
+  Y: 1990
+  Z: -0800
+  %: %
+
+format 12/31/2011 23:59:59:
+  a: Sat
+  A: Saturday
+  b: Dec
+  B: December
+  c: Sat Dec 31 23:59:59 2011
+  d: 31
+  e: 31
+  H: 23
+  I: 11
+  j: 365
+  m: 12
+  M: 59
+  p: PM
+  S: 59
+  U: 52
+  w: 6
+  W: 52
+  x: 12/31/11
+  X: 23:59:59
+  y: 11
+  Y: 2011
+  Z: -0800
+  %: %
+
Index: Dev/branches/Demo/d3/test/time/test-hour.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-hour.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-hour.js	(revision 225)
@@ -0,0 +1,65 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("hour:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.hour(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.hour(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T00:59:00Z -> " + format(d3.time.hour(parse("2011-01-01T00:59:00Z"))));
+console.log("  2011-01-01T01:00:00Z -> " + format(d3.time.hour(parse("2011-01-01T01:00:00Z"))));
+console.log("  2011-03-13T08:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T08:00:00Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-03-13T10:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T10:00:00Z"))));
+console.log("  2011-11-06T08:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T08:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T09:00:00Z"))));
+console.log("  2011-11-06T10:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T10:00:00Z"))));
+console.log("");
+
+var tz = process.env.TZ;
+try {
+  process.env.TZ = "Asia/Kathmandu"; new Date().toString();
+  console.log("hour.npt:");
+  console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.hour(parse("2010-12-31T23:59:59Z"))));
+  console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.hour(parse("2011-01-01T00:00:00Z"))));
+  console.log("  2011-01-01T00:59:00Z -> " + format(d3.time.hour(parse("2011-01-01T00:59:00Z"))));
+  console.log("  2011-01-01T01:00:00Z -> " + format(d3.time.hour(parse("2011-01-01T01:00:00Z"))));
+  console.log("  2011-03-13T08:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T08:00:00Z"))));
+  console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T09:00:00Z"))));
+  console.log("  2011-03-13T10:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T10:00:00Z"))));
+  console.log("  2011-11-06T08:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T08:00:00Z"))));
+  console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T09:00:00Z"))));
+  console.log("  2011-11-06T10:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T10:00:00Z"))));
+  console.log("");
+
+  process.env.TZ = "Asia/Calcutta"; new Date().toString();
+  console.log("hour.ist:");
+  console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.hour(parse("2010-12-31T23:59:59Z"))));
+  console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.hour(parse("2011-01-01T00:00:00Z"))));
+  console.log("  2011-01-01T00:59:00Z -> " + format(d3.time.hour(parse("2011-01-01T00:59:00Z"))));
+  console.log("  2011-01-01T01:00:00Z -> " + format(d3.time.hour(parse("2011-01-01T01:00:00Z"))));
+  console.log("  2011-03-13T08:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T08:00:00Z"))));
+  console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T09:00:00Z"))));
+  console.log("  2011-03-13T10:00:00Z -> " + format(d3.time.hour(parse("2011-03-13T10:00:00Z"))));
+  console.log("  2011-11-06T08:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T08:00:00Z"))));
+  console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T09:00:00Z"))));
+  console.log("  2011-11-06T10:00:00Z -> " + format(d3.time.hour(parse("2011-11-06T10:00:00Z"))));
+  console.log("");
+} finally {
+  process.env.TZ = tz;
+}
+
+console.log("hour.utc:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.hour.utc(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.hour.utc(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T00:59:00Z -> " + format(d3.time.hour.utc(parse("2011-01-01T00:59:00Z"))));
+console.log("  2011-01-01T01:00:00Z -> " + format(d3.time.hour.utc(parse("2011-01-01T01:00:00Z"))));
+console.log("  2011-03-13T08:00:00Z -> " + format(d3.time.hour.utc(parse("2011-03-13T08:00:00Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.hour.utc(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-03-13T10:00:00Z -> " + format(d3.time.hour.utc(parse("2011-03-13T10:00:00Z"))));
+console.log("  2011-11-06T08:00:00Z -> " + format(d3.time.hour.utc(parse("2011-11-06T08:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.hour.utc(parse("2011-11-06T09:00:00Z"))));
+console.log("  2011-11-06T10:00:00Z -> " + format(d3.time.hour.utc(parse("2011-11-06T10:00:00Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-hour.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-hour.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-hour.out	(revision 225)
@@ -0,0 +1,48 @@
+hour:
+  2010-12-31T23:59:59Z -> Fri Dec 31 2010 15:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:59:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T01:00:00Z -> Fri Dec 31 2010 17:00:00 GMT-0800 (PST)
+  2011-03-13T08:00:00Z -> Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sun Mar 13 2011 01:00:00 GMT-0800 (PST)
+  2011-03-13T10:00:00Z -> Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+  2011-11-06T08:00:00Z -> Sun Nov 06 2011 01:00:00 GMT-0700 (PDT)
+  2011-11-06T09:00:00Z -> Sun Nov 06 2011 01:00:00 GMT-0800 (PST)
+  2011-11-06T10:00:00Z -> Sun Nov 06 2011 02:00:00 GMT-0800 (PST)
+
+hour.npt:
+  2010-12-31T23:59:59Z -> Sat Jan 01 2011 05:00:00 GMT+0545 (NPT)
+  2011-01-01T00:00:00Z -> Sat Jan 01 2011 05:00:00 GMT+0545 (NPT)
+  2011-01-01T00:59:00Z -> Sat Jan 01 2011 06:00:00 GMT+0545 (NPT)
+  2011-01-01T01:00:00Z -> Sat Jan 01 2011 06:00:00 GMT+0545 (NPT)
+  2011-03-13T08:00:00Z -> Sun Mar 13 2011 13:00:00 GMT+0545 (NPT)
+  2011-03-13T09:00:00Z -> Sun Mar 13 2011 14:00:00 GMT+0545 (NPT)
+  2011-03-13T10:00:00Z -> Sun Mar 13 2011 15:00:00 GMT+0545 (NPT)
+  2011-11-06T08:00:00Z -> Sun Nov 06 2011 13:00:00 GMT+0545 (NPT)
+  2011-11-06T09:00:00Z -> Sun Nov 06 2011 14:00:00 GMT+0545 (NPT)
+  2011-11-06T10:00:00Z -> Sun Nov 06 2011 15:00:00 GMT+0545 (NPT)
+
+hour.ist:
+  2010-12-31T23:59:59Z -> Sat Jan 01 2011 05:00:00 GMT+0530 (IST)
+  2011-01-01T00:00:00Z -> Sat Jan 01 2011 05:00:00 GMT+0530 (IST)
+  2011-01-01T00:59:00Z -> Sat Jan 01 2011 06:00:00 GMT+0530 (IST)
+  2011-01-01T01:00:00Z -> Sat Jan 01 2011 06:00:00 GMT+0530 (IST)
+  2011-03-13T08:00:00Z -> Sun Mar 13 2011 13:00:00 GMT+0530 (IST)
+  2011-03-13T09:00:00Z -> Sun Mar 13 2011 14:00:00 GMT+0530 (IST)
+  2011-03-13T10:00:00Z -> Sun Mar 13 2011 15:00:00 GMT+0530 (IST)
+  2011-11-06T08:00:00Z -> Sun Nov 06 2011 13:00:00 GMT+0530 (IST)
+  2011-11-06T09:00:00Z -> Sun Nov 06 2011 14:00:00 GMT+0530 (IST)
+  2011-11-06T10:00:00Z -> Sun Nov 06 2011 15:00:00 GMT+0530 (IST)
+
+hour.utc:
+  2010-12-31T23:59:59Z -> Fri Dec 31 2010 15:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:59:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T01:00:00Z -> Fri Dec 31 2010 17:00:00 GMT-0800 (PST)
+  2011-03-13T08:00:00Z -> Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sun Mar 13 2011 01:00:00 GMT-0800 (PST)
+  2011-03-13T10:00:00Z -> Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+  2011-11-06T08:00:00Z -> Sun Nov 06 2011 01:00:00 GMT-0700 (PDT)
+  2011-11-06T09:00:00Z -> Sun Nov 06 2011 01:00:00 GMT-0800 (PST)
+  2011-11-06T10:00:00Z -> Sun Nov 06 2011 02:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-hours.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-hours.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-hours.js	(revision 225)
@@ -0,0 +1,34 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("hours(2011-01-01T06:00:00Z, 2011-01-01T10:00:00Z):");
+d3.time.hours(parse("2011-01-01T06:00:00Z"), parse("2011-01-01T10:00:00Z")).forEach(log);
+console.log("");
+
+console.log("hours(2011-03-13T07:00:00Z, 2011-03-13T11:00:00Z):");
+d3.time.hours(parse("2011-03-13T07:00:00Z"), parse("2011-03-13T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("hours(2011-11-06T07:00:00Z, 2011-11-06T11:00:00Z):");
+d3.time.hours(parse("2011-11-06T07:00:00Z"), parse("2011-11-06T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("hours(2011-11-06T07:00:00Z, 2011-11-07T11:00:00Z, 3):");
+d3.time.hours(parse("2011-11-06T07:00:00Z"), parse("2011-11-07T11:00:00Z"), 3).forEach(log);
+console.log("");
+
+console.log("hours.utc(2010-12-31T22:00:00Z, 2011-01-01T02:00:00Z):");
+d3.time.hours.utc(parse("2010-12-31T22:00:00Z"), parse("2011-01-01T02:00:00Z")).forEach(log);
+console.log("");
+
+console.log("hours.utc(2010-12-31T22:00:00Z, 2011-01-02T02:00:00Z, 3):");
+d3.time.hours.utc(parse("2010-12-31T22:00:00Z"), parse("2011-01-02T02:00:00Z"), 3).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-hours.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-hours.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-hours.out	(revision 225)
@@ -0,0 +1,46 @@
+hours(2011-01-01T06:00:00Z, 2011-01-01T10:00:00Z):
+  Fri Dec 31 2010 22:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 23:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 01:00:00 GMT-0800 (PST)
+
+hours(2011-03-13T07:00:00Z, 2011-03-13T11:00:00Z):
+  Sat Mar 12 2011 23:00:00 GMT-0800 (PST)
+  Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  Sun Mar 13 2011 01:00:00 GMT-0800 (PST)
+  Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+
+hours(2011-11-06T07:00:00Z, 2011-11-06T11:00:00Z):
+  Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+  Sun Nov 06 2011 01:00:00 GMT-0700 (PDT)
+  Sun Nov 06 2011 01:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 02:00:00 GMT-0800 (PST)
+
+hours(2011-11-06T07:00:00Z, 2011-11-07T11:00:00Z, 3):
+  Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+  Sun Nov 06 2011 03:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 06:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 09:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 12:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 15:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 18:00:00 GMT-0800 (PST)
+  Sun Nov 06 2011 21:00:00 GMT-0800 (PST)
+  Mon Nov 07 2011 00:00:00 GMT-0800 (PST)
+
+hours.utc(2010-12-31T22:00:00Z, 2011-01-01T02:00:00Z):
+  Fri Dec 31 2010 14:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 15:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 17:00:00 GMT-0800 (PST)
+
+hours.utc(2010-12-31T22:00:00Z, 2011-01-02T02:00:00Z, 3):
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 19:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 22:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 01:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 04:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 07:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 10:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 13:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 16:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-minute.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-minute.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-minute.js	(revision 225)
@@ -0,0 +1,20 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("minute:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.minute(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.minute(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T00:00:59Z -> " + format(d3.time.minute(parse("2011-01-01T00:00:59Z"))));
+console.log("  2011-01-01T00:01:00Z -> " + format(d3.time.minute(parse("2011-01-01T00:01:00Z"))));
+console.log("");
+
+console.log("minute.utc:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.minute.utc(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.minute.utc(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T00:00:59Z -> " + format(d3.time.minute.utc(parse("2011-01-01T00:00:59Z"))));
+console.log("  2011-01-01T00:01:00Z -> " + format(d3.time.minute.utc(parse("2011-01-01T00:01:00Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-minute.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-minute.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-minute.out	(revision 225)
@@ -0,0 +1,12 @@
+minute:
+  2010-12-31T23:59:59Z -> Fri Dec 31 2010 15:59:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:59Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:01:00Z -> Fri Dec 31 2010 16:01:00 GMT-0800 (PST)
+
+minute.utc:
+  2010-12-31T23:59:59Z -> Fri Dec 31 2010 15:59:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:59Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:01:00Z -> Fri Dec 31 2010 16:01:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-minutes.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-minutes.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-minutes.js	(revision 225)
@@ -0,0 +1,30 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("minutes(2011-01-01T07:58:00Z, 2011-01-01T08:02:00Z):");
+d3.time.minutes(parse("2011-01-01T07:58:00Z"), parse("2011-01-01T08:02:00Z")).forEach(log);
+console.log("");
+
+console.log("minutes(2011-03-13T09:58:00Z, 2011-03-13T10:02:00Z):");
+d3.time.minutes(parse("2011-03-13T09:58:00Z"), parse("2011-03-13T10:02:00Z")).forEach(log);
+console.log("");
+
+console.log("minutes(2011-03-13T09:58:00Z, 2011-03-13T11:02:00Z, 15):");
+d3.time.minutes(parse("2011-03-13T09:58:00Z"), parse("2011-03-13T11:02:00Z"), 15).forEach(log);
+console.log("");
+
+console.log("minutes.utc(2010-12-31T23:58:00Z, 2011-01-01T00:02:00Z):");
+d3.time.minutes.utc(parse("2010-12-31T23:58:00Z"), parse("2011-01-01T00:02:00Z")).forEach(log);
+console.log("");
+
+console.log("minutes.utc(2010-12-31T23:58:00Z, 2011-01-01T01:02:00Z, 15):");
+d3.time.minutes.utc(parse("2010-12-31T23:58:00Z"), parse("2011-01-01T01:02:00Z"), 15).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-minutes.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-minutes.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-minutes.out	(revision 225)
@@ -0,0 +1,32 @@
+minutes(2011-01-01T07:58:00Z, 2011-01-01T08:02:00Z):
+  Fri Dec 31 2010 23:58:00 GMT-0800 (PST)
+  Fri Dec 31 2010 23:59:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:01:00 GMT-0800 (PST)
+
+minutes(2011-03-13T09:58:00Z, 2011-03-13T10:02:00Z):
+  Sun Mar 13 2011 01:58:00 GMT-0800 (PST)
+  Sun Mar 13 2011 01:59:00 GMT-0800 (PST)
+  Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:01:00 GMT-0700 (PDT)
+
+minutes(2011-03-13T09:58:00Z, 2011-03-13T11:02:00Z, 15):
+  Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:15:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:30:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:45:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 04:00:00 GMT-0700 (PDT)
+
+minutes.utc(2010-12-31T23:58:00Z, 2011-01-01T00:02:00Z):
+  Fri Dec 31 2010 15:58:00 GMT-0800 (PST)
+  Fri Dec 31 2010 15:59:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:01:00 GMT-0800 (PST)
+
+minutes.utc(2010-12-31T23:58:00Z, 2011-01-01T01:02:00Z, 15):
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:15:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:30:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:45:00 GMT-0800 (PST)
+  Fri Dec 31 2010 17:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-month.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-month.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-month.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("month:");
+console.log("  2011-01-01T07:59:59Z -> " + format(d3.time.month(parse("2011-01-01T07:59:59Z"))));
+console.log("  2011-01-01T08:00:00Z -> " + format(d3.time.month(parse("2011-01-01T08:00:00Z"))));
+console.log("  2011-01-01T08:00:01Z -> " + format(d3.time.month(parse("2011-01-01T08:00:01Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.month(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.month(parse("2011-11-06T09:00:00Z"))));
+console.log("");
+
+console.log("month.utc:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.month.utc(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.month.utc(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T23:00:00Z -> " + format(d3.time.month.utc(parse("2011-01-01T23:00:00Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.month.utc(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.month.utc(parse("2011-11-06T09:00:00Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-month.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-month.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-month.out	(revision 225)
@@ -0,0 +1,14 @@
+month:
+  2011-01-01T07:59:59Z -> Wed Dec 01 2010 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:00Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:01Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Tue Mar 01 2011 00:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Tue Nov 01 2011 00:00:00 GMT-0700 (PDT)
+
+month.utc:
+  2010-12-31T23:59:59Z -> Tue Nov 30 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T23:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Mon Feb 28 2011 16:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Mon Oct 31 2011 17:00:00 GMT-0700 (PDT)
+
Index: Dev/branches/Demo/d3/test/time/test-months.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-months.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-months.js	(revision 225)
@@ -0,0 +1,34 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("months(2010-11-21T06:00:00Z, 2011-02-12T10:00:00Z):");
+d3.time.months(parse("2010-11-21T06:00:00Z"), parse("2011-02-12T10:00:00Z")).forEach(log);
+console.log("");
+
+console.log("months(2011-01-02T07:00:00Z, 2011-04-24T11:00:00Z):");
+d3.time.months(parse("2011-01-02T07:00:00Z"), parse("2011-04-24T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("months(2011-09-25T07:00:00Z, 2011-12-17T11:00:00Z):");
+d3.time.months(parse("2011-09-25T07:00:00Z"), parse("2011-12-17T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("months(2011-09-25T07:00:00Z, 2012-12-17T11:00:00Z, 3):");
+d3.time.months(parse("2011-09-25T07:00:00Z"), parse("2012-12-17T11:00:00Z"), 3).forEach(log);
+console.log("");
+
+console.log("months.utc(2010-11-20T22:00:00Z, 2011-02-12T02:00:00Z):");
+d3.time.months.utc(parse("2010-11-20T22:00:00Z"), parse("2011-02-12T02:00:00Z")).forEach(log);
+console.log("");
+
+console.log("months.utc(2010-11-20T22:00:00Z, 2012-02-12T02:00:00Z, 3):");
+d3.time.months.utc(parse("2010-11-20T22:00:00Z"), parse("2012-02-12T02:00:00Z"), 3).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-months.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-months.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-months.out	(revision 225)
@@ -0,0 +1,34 @@
+months(2010-11-21T06:00:00Z, 2011-02-12T10:00:00Z):
+  Wed Dec 01 2010 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Tue Feb 01 2011 00:00:00 GMT-0800 (PST)
+
+months(2011-01-02T07:00:00Z, 2011-04-24T11:00:00Z):
+  Tue Feb 01 2011 00:00:00 GMT-0800 (PST)
+  Tue Mar 01 2011 00:00:00 GMT-0800 (PST)
+  Fri Apr 01 2011 00:00:00 GMT-0700 (PDT)
+
+months(2011-09-25T07:00:00Z, 2011-12-17T11:00:00Z):
+  Sat Oct 01 2011 00:00:00 GMT-0700 (PDT)
+  Tue Nov 01 2011 00:00:00 GMT-0700 (PDT)
+  Thu Dec 01 2011 00:00:00 GMT-0800 (PST)
+
+months(2011-09-25T07:00:00Z, 2012-12-17T11:00:00Z, 3):
+  Sat Oct 01 2011 00:00:00 GMT-0700 (PDT)
+  Sun Jan 01 2012 00:00:00 GMT-0800 (PST)
+  Sun Apr 01 2012 00:00:00 GMT-0700 (PDT)
+  Sun Jul 01 2012 00:00:00 GMT-0700 (PDT)
+  Mon Oct 01 2012 00:00:00 GMT-0700 (PDT)
+
+months.utc(2010-11-20T22:00:00Z, 2011-02-12T02:00:00Z):
+  Tue Nov 30 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Mon Jan 31 2011 16:00:00 GMT-0800 (PST)
+
+months.utc(2010-11-20T22:00:00Z, 2012-02-12T02:00:00Z, 3):
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Thu Mar 31 2011 17:00:00 GMT-0700 (PDT)
+  Thu Jun 30 2011 17:00:00 GMT-0700 (PDT)
+  Fri Sep 30 2011 17:00:00 GMT-0700 (PDT)
+  Sat Dec 31 2011 16:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-parse-iso.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-parse-iso.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-parse-iso.js	(revision 225)
@@ -0,0 +1,10 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var f = d3.time.format.utc("%c");
+
+console.log("parse:");
+console.log("  1990-01-01T00:00:00Z ->", f(d3.time.format.iso.parse("1990-01-01T00:00:00Z")));
+console.log("  2011-12-31T23:59:59Z ->", f(d3.time.format.iso.parse("2011-12-31T23:59:59Z")));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-parse-iso.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-parse-iso.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-parse-iso.out	(revision 225)
@@ -0,0 +1,4 @@
+parse:
+  1990-01-01T00:00:00Z -> Mon Jan  1 00:00:00 1990
+  2011-12-31T23:59:59Z -> Sat Dec 31 23:59:59 2011
+
Index: Dev/branches/Demo/d3/test/time/test-parse-utc.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-parse-utc.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-parse-utc.js	(revision 225)
@@ -0,0 +1,80 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var F = d3.time.format.utc,
+    f = d3.time.format("%c");
+
+console.log("parse a m/d/Y:");
+console.log("            Sun 01/01/1990:", f(F("%a %m/%d/%Y").parse("Sun 01/01/1990")));
+console.log("            Wed 01/01/1990:", f(F("%a %m/%d/%Y").parse("Wed 01/01/1990")));
+console.log("            XXX 01/01/1990:", F("%a %m/%d/%Y").parse("XXX 01/01/1990"));
+console.log("");
+
+console.log("parse A m/d/Y:");
+console.log("         Sunday 01/01/1990:", f(F("%A %m/%d/%Y").parse("Sunday 01/01/1990")));
+console.log("      Wednesday 01/01/1990:", f(F("%A %m/%d/%Y").parse("Wednesday 01/01/1990")));
+console.log("       Caturday 01/01/1990:", F("%A %m/%d/%Y").parse("Caturday 01/01/1990"));
+console.log("");
+
+console.log("parse m/d/y:");
+console.log("                    1/1/90:", f(F("%m/%d/%y").parse("1/1/90")));
+console.log("                    1/1/10:", f(F("%m/%d/%y").parse("1/1/10")));
+console.log("");
+
+console.log("parse x:");
+console.log("                    1/1/90:", f(F("%x").parse("1/1/90")));
+console.log("                    1/1/10:", f(F("%x").parse("1/1/10")));
+console.log("");
+
+console.log("parse b d Y:");
+console.log("              jan 01, 1990:", f(F("%b %d, %Y").parse("jan 01, 1990")));
+console.log("              jan  1, 1990:", f(F("%b %d, %Y").parse("jan  1, 1990")));
+console.log("              1 Feb., 1990:", f(F("%d %b., %Y").parse("1 Feb., 1990")));
+console.log("             01 Feb., 1990:", f(F("%d %b., %Y").parse("01 Feb., 1990")));
+console.log("              1 Feb., 1990:", f(F("%d %b., %Y").parse(" 1 Feb., 1990")));
+console.log("              1 Feb., 1990:", f(F(" %d %b., %Y").parse(" 1 Feb., 1990")));
+console.log("                Moy 1 1990:", F("%b %d %Y").parse("Moy 1 1990"));
+console.log("");
+
+console.log("parse B d Y:");
+console.log("          January 01, 1990:", f(F("%B %d, %Y").parse("January 01, 1990")));
+console.log("          january  1, 1990:", f(F("%B %d, %Y").parse("january  1, 1990")));
+console.log("          1 February, 1990:", f(F("%d %B, %Y").parse("1 February, 1990")));
+console.log("         01 February, 1990:", f(F("%d %B, %Y").parse("01 February, 1990")));
+console.log("          1 February, 1990:", f(F("%d %B, %Y").parse(" 1 February, 1990")));
+console.log("          1 February, 1990:", f(F(" %d %B, %Y").parse(" 1 February, 1990")));
+console.log("               Juin 1 1990:", F("%B %d %Y").parse("Join 1 1990"));
+console.log("");
+
+console.log("parse c:");
+console.log("  Mon Jan  1 00:00:00 1990:", f(F("%c").parse("Mon Jan  1 00:00:00 1990")));
+console.log("  Sun Jan  1 00:00:00 1990:", f(F("%c").parse("Sun Jan  1 00:00:00 1990")));
+console.log("  Mon Jan 01 00:00:00 1990:", f(F("%c").parse("Mon Jan 01 00:00:00 1990")));
+console.log("   Mon Jan 1 00:00:00 1990:", f(F("%c").parse("Mon Jan 1 00:00:00 1990")));
+console.log("      Mon Jan 1 0:0:0 1990:", f(F("%c").parse("Mon Jan 1 0:0:0 1990")));
+console.log("");
+
+console.log("parse H M S:");
+console.log("                  00:00:00:", f(F("%H:%M:%S").parse("00:00:00")));
+console.log("                  11:59:59:", f(F("%H:%M:%S").parse("11:59:59")));
+console.log("                  12:00:00:", f(F("%H:%M:%S").parse("12:00:00")));
+console.log("                  12:00:01:", f(F("%H:%M:%S").parse("12:00:01")));
+console.log("                  23:59:59:", f(F("%H:%M:%S").parse("23:59:59")));
+console.log("");
+
+console.log("parse X:");
+console.log("                  00:00:00:", f(F("%X").parse("00:00:00")));
+console.log("                  11:59:59:", f(F("%X").parse("11:59:59")));
+console.log("                  12:00:00:", f(F("%X").parse("12:00:00")));
+console.log("                  12:00:01:", f(F("%X").parse("12:00:01")));
+console.log("                  23:59:59:", f(F("%X").parse("23:59:59")));
+console.log("");
+
+console.log("parse I M S p:");
+console.log("               12:00:00 am:", f(F("%I:%M:%S %p").parse("12:00:00 am")));
+console.log("               11:59:59 AM:", f(F("%I:%M:%S %p").parse("11:59:59 AM")));
+console.log("               12:00:00 pm:", f(F("%I:%M:%S %p").parse("12:00:00 pm")));
+console.log("               12:00:01 pm:", f(F("%I:%M:%S %p").parse("12:00:01 pm")));
+console.log("               11:59:59 PM:", f(F("%I:%M:%S %p").parse("11:59:59 PM")));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-parse-utc.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-parse-utc.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-parse-utc.out	(revision 225)
@@ -0,0 +1,64 @@
+parse a m/d/Y:
+            Sun 01/01/1990: Sun Dec 31 16:00:00 1989
+            Wed 01/01/1990: Sun Dec 31 16:00:00 1989
+            XXX 01/01/1990: null
+
+parse A m/d/Y:
+         Sunday 01/01/1990: Sun Dec 31 16:00:00 1989
+      Wednesday 01/01/1990: Sun Dec 31 16:00:00 1989
+       Caturday 01/01/1990: null
+
+parse m/d/y:
+                    1/1/90: Sat Dec 31 16:00:00 2089
+                    1/1/10: Thu Dec 31 16:00:00 2009
+
+parse x:
+                    1/1/90: Sat Dec 31 16:00:00 2089
+                    1/1/10: Thu Dec 31 16:00:00 2009
+
+parse b d Y:
+              jan 01, 1990: Sun Dec 31 16:00:00 1989
+              jan  1, 1990: Sun Dec 31 16:00:00 1989
+              1 Feb., 1990: Wed Jan 31 16:00:00 1990
+             01 Feb., 1990: Wed Jan 31 16:00:00 1990
+              1 Feb., 1990: Wed Jan 31 16:00:00 1990
+              1 Feb., 1990: Wed Jan 31 16:00:00 1990
+                Moy 1 1990: null
+
+parse B d Y:
+          January 01, 1990: Sun Dec 31 16:00:00 1989
+          january  1, 1990: Sun Dec 31 16:00:00 1989
+          1 February, 1990: Wed Jan 31 16:00:00 1990
+         01 February, 1990: Wed Jan 31 16:00:00 1990
+          1 February, 1990: Wed Jan 31 16:00:00 1990
+          1 February, 1990: Wed Jan 31 16:00:00 1990
+               Juin 1 1990: null
+
+parse c:
+  Mon Jan  1 00:00:00 1990: Sun Dec 31 16:00:00 1989
+  Sun Jan  1 00:00:00 1990: Sun Dec 31 16:00:00 1989
+  Mon Jan 01 00:00:00 1990: Sun Dec 31 16:00:00 1989
+   Mon Jan 1 00:00:00 1990: Sun Dec 31 16:00:00 1989
+      Mon Jan 1 0:0:0 1990: Sun Dec 31 16:00:00 1989
+
+parse H M S:
+                  00:00:00: Sun Dec 31 16:00:00 1899
+                  11:59:59: Mon Jan  1 03:59:59 1900
+                  12:00:00: Mon Jan  1 04:00:00 1900
+                  12:00:01: Mon Jan  1 04:00:01 1900
+                  23:59:59: Mon Jan  1 15:59:59 1900
+
+parse X:
+                  00:00:00: Sun Dec 31 16:00:00 1899
+                  11:59:59: Mon Jan  1 03:59:59 1900
+                  12:00:00: Mon Jan  1 04:00:00 1900
+                  12:00:01: Mon Jan  1 04:00:01 1900
+                  23:59:59: Mon Jan  1 15:59:59 1900
+
+parse I M S p:
+               12:00:00 am: Sun Dec 31 16:00:00 1899
+               11:59:59 AM: Mon Jan  1 03:59:59 1900
+               12:00:00 pm: Mon Jan  1 04:00:00 1900
+               12:00:01 pm: Mon Jan  1 04:00:01 1900
+               11:59:59 PM: Mon Jan  1 15:59:59 1900
+
Index: Dev/branches/Demo/d3/test/time/test-parse.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-parse.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-parse.js	(revision 225)
@@ -0,0 +1,79 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var f = d3.time.format("%c");
+
+console.log("parse a m/d/Y:");
+console.log("            Sun 01/01/1990:", f(d3.time.format("%a %m/%d/%Y").parse("Sun 01/01/1990")));
+console.log("            Wed 01/01/1990:", f(d3.time.format("%a %m/%d/%Y").parse("Wed 01/01/1990")));
+console.log("            XXX 01/01/1990:", d3.time.format("%a %m/%d/%Y").parse("XXX 01/01/1990"));
+console.log("");
+
+console.log("parse A m/d/Y:");
+console.log("         Sunday 01/01/1990:", f(d3.time.format("%A %m/%d/%Y").parse("Sunday 01/01/1990")));
+console.log("      Wednesday 01/01/1990:", f(d3.time.format("%A %m/%d/%Y").parse("Wednesday 01/01/1990")));
+console.log("       Caturday 01/01/1990:", d3.time.format("%A %m/%d/%Y").parse("Caturday 01/01/1990"));
+console.log("");
+
+console.log("parse m/d/y:");
+console.log("                    1/1/90:", f(d3.time.format("%m/%d/%y").parse("1/1/90")));
+console.log("                    1/1/10:", f(d3.time.format("%m/%d/%y").parse("1/1/10")));
+console.log("");
+
+console.log("parse x:");
+console.log("                    1/1/90:", f(d3.time.format("%x").parse("1/1/90")));
+console.log("                    1/1/10:", f(d3.time.format("%x").parse("1/1/10")));
+console.log("");
+
+console.log("parse b d Y:");
+console.log("              jan 01, 1990:", f(d3.time.format("%b %d, %Y").parse("jan 01, 1990")));
+console.log("              jan  1, 1990:", f(d3.time.format("%b %d, %Y").parse("jan  1, 1990")));
+console.log("              1 Feb., 1990:", f(d3.time.format("%d %b., %Y").parse("1 Feb., 1990")));
+console.log("             01 Feb., 1990:", f(d3.time.format("%d %b., %Y").parse("01 Feb., 1990")));
+console.log("              1 Feb., 1990:", f(d3.time.format("%d %b., %Y").parse(" 1 Feb., 1990")));
+console.log("              1 Feb., 1990:", f(d3.time.format(" %d %b., %Y").parse(" 1 Feb., 1990")));
+console.log("                Moy 1 1990:", d3.time.format("%b %d %Y").parse("Moy 1 1990"));
+console.log("");
+
+console.log("parse B d Y:");
+console.log("          January 01, 1990:", f(d3.time.format("%B %d, %Y").parse("January 01, 1990")));
+console.log("          january  1, 1990:", f(d3.time.format("%B %d, %Y").parse("january  1, 1990")));
+console.log("          1 February, 1990:", f(d3.time.format("%d %B, %Y").parse("1 February, 1990")));
+console.log("         01 February, 1990:", f(d3.time.format("%d %B, %Y").parse("01 February, 1990")));
+console.log("          1 February, 1990:", f(d3.time.format("%d %B, %Y").parse(" 1 February, 1990")));
+console.log("          1 February, 1990:", f(d3.time.format(" %d %B, %Y").parse(" 1 February, 1990")));
+console.log("               Juin 1 1990:", d3.time.format("%B %d %Y").parse("Join 1 1990"));
+console.log("");
+
+console.log("parse c:");
+console.log("  Mon Jan  1 00:00:00 1990:", f(d3.time.format("%c").parse("Mon Jan  1 00:00:00 1990")));
+console.log("  Sun Jan  1 00:00:00 1990:", f(d3.time.format("%c").parse("Sun Jan  1 00:00:00 1990")));
+console.log("  Mon Jan 01 00:00:00 1990:", f(d3.time.format("%c").parse("Mon Jan 01 00:00:00 1990")));
+console.log("   Mon Jan 1 00:00:00 1990:", f(d3.time.format("%c").parse("Mon Jan 1 00:00:00 1990")));
+console.log("      Mon Jan 1 0:0:0 1990:", f(d3.time.format("%c").parse("Mon Jan 1 0:0:0 1990")));
+console.log("");
+
+console.log("parse H M S:");
+console.log("                  00:00:00:", f(d3.time.format("%H:%M:%S").parse("00:00:00")));
+console.log("                  11:59:59:", f(d3.time.format("%H:%M:%S").parse("11:59:59")));
+console.log("                  12:00:00:", f(d3.time.format("%H:%M:%S").parse("12:00:00")));
+console.log("                  12:00:01:", f(d3.time.format("%H:%M:%S").parse("12:00:01")));
+console.log("                  23:59:59:", f(d3.time.format("%H:%M:%S").parse("23:59:59")));
+console.log("");
+
+console.log("parse X:");
+console.log("                  00:00:00:", f(d3.time.format("%X").parse("00:00:00")));
+console.log("                  11:59:59:", f(d3.time.format("%X").parse("11:59:59")));
+console.log("                  12:00:00:", f(d3.time.format("%X").parse("12:00:00")));
+console.log("                  12:00:01:", f(d3.time.format("%X").parse("12:00:01")));
+console.log("                  23:59:59:", f(d3.time.format("%X").parse("23:59:59")));
+console.log("");
+
+console.log("parse I M S p:");
+console.log("               12:00:00 am:", f(d3.time.format("%I:%M:%S %p").parse("12:00:00 am")));
+console.log("               11:59:59 AM:", f(d3.time.format("%I:%M:%S %p").parse("11:59:59 AM")));
+console.log("               12:00:00 pm:", f(d3.time.format("%I:%M:%S %p").parse("12:00:00 pm")));
+console.log("               12:00:01 pm:", f(d3.time.format("%I:%M:%S %p").parse("12:00:01 pm")));
+console.log("               11:59:59 PM:", f(d3.time.format("%I:%M:%S %p").parse("11:59:59 PM")));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-parse.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-parse.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-parse.out	(revision 225)
@@ -0,0 +1,64 @@
+parse a m/d/Y:
+            Sun 01/01/1990: Mon Jan  1 00:00:00 1990
+            Wed 01/01/1990: Mon Jan  1 00:00:00 1990
+            XXX 01/01/1990: null
+
+parse A m/d/Y:
+         Sunday 01/01/1990: Mon Jan  1 00:00:00 1990
+      Wednesday 01/01/1990: Mon Jan  1 00:00:00 1990
+       Caturday 01/01/1990: null
+
+parse m/d/y:
+                    1/1/90: Sun Jan  1 00:00:00 2090
+                    1/1/10: Fri Jan  1 00:00:00 2010
+
+parse x:
+                    1/1/90: Sun Jan  1 00:00:00 2090
+                    1/1/10: Fri Jan  1 00:00:00 2010
+
+parse b d Y:
+              jan 01, 1990: Mon Jan  1 00:00:00 1990
+              jan  1, 1990: Mon Jan  1 00:00:00 1990
+              1 Feb., 1990: Thu Feb  1 00:00:00 1990
+             01 Feb., 1990: Thu Feb  1 00:00:00 1990
+              1 Feb., 1990: Thu Feb  1 00:00:00 1990
+              1 Feb., 1990: Thu Feb  1 00:00:00 1990
+                Moy 1 1990: null
+
+parse B d Y:
+          January 01, 1990: Mon Jan  1 00:00:00 1990
+          january  1, 1990: Mon Jan  1 00:00:00 1990
+          1 February, 1990: Thu Feb  1 00:00:00 1990
+         01 February, 1990: Thu Feb  1 00:00:00 1990
+          1 February, 1990: Thu Feb  1 00:00:00 1990
+          1 February, 1990: Thu Feb  1 00:00:00 1990
+               Juin 1 1990: null
+
+parse c:
+  Mon Jan  1 00:00:00 1990: Mon Jan  1 00:00:00 1990
+  Sun Jan  1 00:00:00 1990: Mon Jan  1 00:00:00 1990
+  Mon Jan 01 00:00:00 1990: Mon Jan  1 00:00:00 1990
+   Mon Jan 1 00:00:00 1990: Mon Jan  1 00:00:00 1990
+      Mon Jan 1 0:0:0 1990: Mon Jan  1 00:00:00 1990
+
+parse H M S:
+                  00:00:00: Mon Jan  1 00:00:00 1900
+                  11:59:59: Mon Jan  1 11:59:59 1900
+                  12:00:00: Mon Jan  1 12:00:00 1900
+                  12:00:01: Mon Jan  1 12:00:01 1900
+                  23:59:59: Mon Jan  1 23:59:59 1900
+
+parse X:
+                  00:00:00: Mon Jan  1 00:00:00 1900
+                  11:59:59: Mon Jan  1 11:59:59 1900
+                  12:00:00: Mon Jan  1 12:00:00 1900
+                  12:00:01: Mon Jan  1 12:00:01 1900
+                  23:59:59: Mon Jan  1 23:59:59 1900
+
+parse I M S p:
+               12:00:00 am: Mon Jan  1 00:00:00 1900
+               11:59:59 AM: Mon Jan  1 11:59:59 1900
+               12:00:00 pm: Mon Jan  1 12:00:00 1900
+               12:00:01 pm: Mon Jan  1 12:00:01 1900
+               11:59:59 PM: Mon Jan  1 23:59:59 1900
+
Index: Dev/branches/Demo/d3/test/time/test-scale-utc.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-scale-utc.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-scale-utc.js	(revision 225)
@@ -0,0 +1,178 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var f = d3.time.scale.utc().tickFormat(),
+    u = d3.time.format.iso;
+
+console.log("1-second ticks (explicit):");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:00:10Z")]).ticks(d3.time.seconds.utc).forEach(log);
+console.log("");
+
+console.log("1-second ticks (implicit):");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:00:10Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("5-second ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:00:50Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("15-second ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:02:30Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("30-second ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:05:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-minute ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:10:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("5-minute ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T13:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("15-minute ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T15:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("30-minute ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-hour ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-01T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("3-hour ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-02T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("6-hour ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-04T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("12-hour ticks (implicit):");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-07T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("12-hour ticks (explicit):");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-07T18:00:00Z")]).ticks(d3.time.hours.utc, 12).forEach(log);
+console.log("");
+
+console.log("1-day ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-14T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("2-day ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-week ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-02-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-month ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-10-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("3-month ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2013-02-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-year ticks:");
+d3.time.scale.utc().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2020-02-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("seconds around minute:")
+d3.time.seconds.utc(utc(2011, 01, 02, 01, 02, 56), utc(2011, 01, 02, 01, 03, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around hour:")
+d3.time.seconds.utc(utc(2011, 01, 02, 02, 59, 56), utc(2011, 01, 02, 03, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around day:")
+d3.time.seconds.utc(utc(2011, 01, 01, 23, 59, 56), utc(2011, 01, 02, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around week:")
+d3.time.seconds.utc(utc(2011, 01, 12, 23, 59, 56), utc(2011, 01, 13, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around month:")
+d3.time.seconds.utc(utc(2011, 01, 28, 23, 59, 56), utc(2011, 02, 01, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around year:")
+d3.time.seconds.utc(utc(2010, 11, 31, 23, 59, 56), utc(2011, 00, 01, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around hour:")
+d3.time.minutes.utc(utc(2011, 01, 02, 02, 56), utc(2011, 01, 02, 03, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around day:")
+d3.time.minutes.utc(utc(2011, 01, 01, 23, 56), utc(2011, 01, 02, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around week:")
+d3.time.minutes.utc(utc(2011, 01, 12, 23, 56), utc(2011, 01, 13, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around month:")
+d3.time.minutes.utc(utc(2011, 01, 28, 23, 56), utc(2011, 02, 01, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around year:")
+d3.time.minutes.utc(utc(2010, 11, 31, 23, 56), utc(2011, 00, 01, 00, 05)).forEach(log);
+console.log("");
+
+console.log("hours around day:")
+d3.time.hours.utc(utc(2011, 01, 01, 20), utc(2011, 01, 02, 05)).forEach(log);
+console.log("");
+
+console.log("hours around week:")
+d3.time.hours.utc(utc(2011, 01, 12, 20), utc(2011, 01, 13, 05)).forEach(log);
+console.log("");
+
+console.log("hours around month:")
+d3.time.hours.utc(utc(2011, 01, 28, 20), utc(2011, 02, 01, 05)).forEach(log);
+console.log("");
+
+console.log("hours around year:")
+d3.time.hours.utc(utc(2010, 11, 31, 20), utc(2011, 00, 01, 05)).forEach(log);
+console.log("");
+
+console.log("days around week:")
+d3.time.days.utc(utc(2011, 01, 09), utc(2011, 01, 18)).forEach(log);
+console.log("");
+
+console.log("days around month:")
+d3.time.days.utc(utc(2011, 01, 25), utc(2011, 02, 06)).forEach(log);
+console.log("");
+
+console.log("days around year:")
+d3.time.days.utc(utc(2010, 11, 28), utc(2011, 00, 06)).forEach(log);
+console.log("");
+
+console.log("weeks around month:")
+d3.time.weeks.utc(utc(2011, 03, 01), utc(2011, 05, 01)).forEach(log);
+console.log("");
+
+console.log("weeks around year:")
+d3.time.weeks.utc(utc(2005, 11, 01), utc(2006, 01, 01)).forEach(log);
+console.log("");
+
+console.log("months around year:")
+d3.time.months.utc(utc(2005, 08, 01), utc(2006, 05, 01)).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + f(date));
+}
+
+function utc() {
+  return new Date(Date.UTC.apply(this, arguments));
+}
Index: Dev/branches/Demo/d3/test/time/test-scale-utc.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-scale-utc.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-scale-utc.out	(revision 225)
@@ -0,0 +1,492 @@
+1-second ticks (explicit):
+  12 PM
+  :01
+  :02
+  :03
+  :04
+  :05
+  :06
+  :07
+  :08
+  :09
+
+1-second ticks (implicit):
+  12 PM
+  :01
+  :02
+  :03
+  :04
+  :05
+  :06
+  :07
+  :08
+  :09
+
+5-second ticks:
+  12 PM
+  :05
+  :10
+  :15
+  :20
+  :25
+  :30
+  :35
+  :40
+  :45
+
+15-second ticks:
+  12 PM
+  :15
+  :30
+  :45
+  12:01
+  :15
+  :30
+  :45
+  12:02
+  :15
+
+30-second ticks:
+  12 PM
+  :30
+  12:01
+  :30
+  12:02
+  :30
+  12:03
+  :30
+  12:04
+  :30
+
+1-minute ticks:
+  12 PM
+  12:01
+  12:02
+  12:03
+  12:04
+  12:05
+  12:06
+  12:07
+  12:08
+  12:09
+
+5-minute ticks:
+  12 PM
+  12:05
+  12:10
+  12:15
+  12:20
+  12:25
+  12:30
+  12:35
+  12:40
+  12:45
+  12:50
+  12:55
+
+15-minute ticks:
+  12 PM
+  12:15
+  12:30
+  12:45
+  01 PM
+  01:15
+  01:30
+  01:45
+  02 PM
+  02:15
+  02:30
+  02:45
+
+30-minute ticks:
+  12 PM
+  12:30
+  01 PM
+  01:30
+  02 PM
+  02:30
+  03 PM
+  03:30
+  04 PM
+  04:30
+  05 PM
+  05:30
+
+1-hour ticks:
+  06 AM
+  07 AM
+  08 AM
+  09 AM
+  10 AM
+  11 AM
+  12 PM
+  01 PM
+  02 PM
+  03 PM
+  04 PM
+  05 PM
+
+3-hour ticks:
+  06 AM
+  09 AM
+  12 PM
+  03 PM
+  06 PM
+  09 PM
+  Jan 02
+  03 AM
+  06 AM
+  09 AM
+  12 PM
+  03 PM
+
+6-hour ticks:
+  06 AM
+  12 PM
+  06 PM
+  Jan 02
+  06 AM
+  12 PM
+  06 PM
+  Mon 03
+  06 AM
+  12 PM
+  06 PM
+  Tue 04
+  06 AM
+  12 PM
+
+12-hour ticks (implicit):
+  12 PM
+  Jan 02
+  12 PM
+  Mon 03
+  12 PM
+  Tue 04
+  12 PM
+  Wed 05
+  12 PM
+  Thu 06
+  12 PM
+  Fri 07
+  12 PM
+
+12-hour ticks (explicit):
+  12 PM
+  Jan 02
+  12 PM
+  Mon 03
+  12 PM
+  Tue 04
+  12 PM
+  Wed 05
+  12 PM
+  Thu 06
+  12 PM
+  Fri 07
+  12 PM
+
+1-day ticks:
+  Jan 02
+  Mon 03
+  Tue 04
+  Wed 05
+  Thu 06
+  Fri 07
+  Sat 08
+  Jan 09
+  Mon 10
+  Tue 11
+  Wed 12
+  Thu 13
+  Fri 14
+
+2-day ticks:
+  Mon 03
+  Wed 05
+  Fri 07
+  Jan 09
+  Tue 11
+  Thu 13
+  Sat 15
+  Mon 17
+  Wed 19
+  Fri 21
+  Jan 23
+  Tue 25
+  Thu 27
+
+1-week ticks:
+  Jan 02
+  Jan 09
+  Jan 16
+  Jan 23
+  Jan 30
+  Feb 06
+  Feb 13
+  Feb 20
+  Feb 27
+
+1-month ticks:
+  February
+  March
+  April
+  May
+  June
+  July
+  August
+  September
+  October
+
+3-month ticks:
+  April
+  July
+  October
+  2012
+  April
+  July
+  October
+  2013
+
+1-year ticks:
+  2012
+  2013
+  2014
+  2015
+  2016
+  2017
+  2018
+  2019
+  2020
+
+seconds around minute:
+  :56
+  :57
+  :58
+  :59
+  01:03
+  :01
+  :02
+  :03
+  :04
+
+seconds around hour:
+  :56
+  :57
+  :58
+  :59
+  03 AM
+  :01
+  :02
+  :03
+  :04
+
+seconds around day:
+  :56
+  :57
+  :58
+  :59
+  Wed 02
+  :01
+  :02
+  :03
+  :04
+
+seconds around week:
+  :56
+  :57
+  :58
+  :59
+  Feb 13
+  :01
+  :02
+  :03
+  :04
+
+seconds around month:
+  :56
+  :57
+  :58
+  :59
+  March
+  :01
+  :02
+  :03
+  :04
+
+seconds around year:
+  :56
+  :57
+  :58
+  :59
+  2011
+  :01
+  :02
+  :03
+  :04
+
+minutes around hour:
+  02:56
+  02:57
+  02:58
+  02:59
+  03 AM
+  03:01
+  03:02
+  03:03
+  03:04
+
+minutes around day:
+  11:56
+  11:57
+  11:58
+  11:59
+  Wed 02
+  12:01
+  12:02
+  12:03
+  12:04
+
+minutes around week:
+  11:56
+  11:57
+  11:58
+  11:59
+  Feb 13
+  12:01
+  12:02
+  12:03
+  12:04
+
+minutes around month:
+  11:56
+  11:57
+  11:58
+  11:59
+  March
+  12:01
+  12:02
+  12:03
+  12:04
+
+minutes around year:
+  11:56
+  11:57
+  11:58
+  11:59
+  2011
+  12:01
+  12:02
+  12:03
+  12:04
+
+hours around day:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  Wed 02
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+hours around week:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  Feb 13
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+hours around month:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  March
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+hours around year:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  2011
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+days around week:
+  Wed 09
+  Thu 10
+  Fri 11
+  Sat 12
+  Feb 13
+  Mon 14
+  Tue 15
+  Wed 16
+  Thu 17
+
+days around month:
+  Fri 25
+  Sat 26
+  Feb 27
+  Mon 28
+  March
+  Wed 02
+  Thu 03
+  Fri 04
+  Sat 05
+
+days around year:
+  Tue 28
+  Wed 29
+  Thu 30
+  Fri 31
+  2011
+  Jan 02
+  Mon 03
+  Tue 04
+  Wed 05
+
+weeks around month:
+  Apr 03
+  Apr 10
+  Apr 17
+  Apr 24
+  May
+  May 08
+  May 15
+  May 22
+  May 29
+
+weeks around year:
+  Dec 04
+  Dec 11
+  Dec 18
+  Dec 25
+  2006
+  Jan 08
+  Jan 15
+  Jan 22
+  Jan 29
+
+months around year:
+  September
+  October
+  November
+  December
+  2006
+  February
+  March
+  April
+  May
+
Index: Dev/branches/Demo/d3/test/time/test-scale.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-scale.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-scale.js	(revision 225)
@@ -0,0 +1,174 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+var f = d3.time.scale().tickFormat(),
+    u = d3.time.format.iso;
+
+console.log("1-second ticks (explicit):");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:00:10Z")]).ticks(d3.time.seconds).forEach(log);
+console.log("");
+
+console.log("1-second ticks (implicit):");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:00:10Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("5-second ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:00:50Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("15-second ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:02:30Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("30-second ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:05:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-minute ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T12:10:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("5-minute ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T13:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("15-minute ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T15:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("30-minute ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T12:00:00Z"), u.parse("2011-01-01T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-hour ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-01T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("3-hour ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-02T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("6-hour ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-04T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("12-hour ticks (implicit):");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-07T18:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("12-hour ticks (explicit):");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-07T18:00:00Z")]).ticks(d3.time.hours, 12).forEach(log);
+console.log("");
+
+console.log("1-day ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-14T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("2-day ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-01-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-week ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-02-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-month ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2011-10-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("3-month ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2013-02-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("1-year ticks:");
+d3.time.scale().domain([u.parse("2011-01-01T06:00:00Z"), u.parse("2020-02-28T06:00:00Z")]).ticks(10).forEach(log);
+console.log("");
+
+console.log("seconds around minute:")
+d3.time.seconds(new Date(2011, 01, 02, 01, 02, 56), new Date(2011, 01, 02, 01, 03, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around hour:")
+d3.time.seconds(new Date(2011, 01, 02, 02, 59, 56), new Date(2011, 01, 02, 03, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around day:")
+d3.time.seconds(new Date(2011, 01, 01, 23, 59, 56), new Date(2011, 01, 02, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around week:")
+d3.time.seconds(new Date(2011, 01, 12, 23, 59, 56), new Date(2011, 01, 13, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around month:")
+d3.time.seconds(new Date(2011, 01, 28, 23, 59, 56), new Date(2011, 02, 01, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("seconds around year:")
+d3.time.seconds(new Date(2010, 11, 31, 23, 59, 56), new Date(2011, 00, 01, 00, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around hour:")
+d3.time.minutes(new Date(2011, 01, 02, 02, 56), new Date(2011, 01, 02, 03, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around day:")
+d3.time.minutes(new Date(2011, 01, 01, 23, 56), new Date(2011, 01, 02, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around week:")
+d3.time.minutes(new Date(2011, 01, 12, 23, 56), new Date(2011, 01, 13, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around month:")
+d3.time.minutes(new Date(2011, 01, 28, 23, 56), new Date(2011, 02, 01, 00, 05)).forEach(log);
+console.log("");
+
+console.log("minutes around year:")
+d3.time.minutes(new Date(2010, 11, 31, 23, 56), new Date(2011, 00, 01, 00, 05)).forEach(log);
+console.log("");
+
+console.log("hours around day:")
+d3.time.hours(new Date(2011, 01, 01, 20), new Date(2011, 01, 02, 05)).forEach(log);
+console.log("");
+
+console.log("hours around week:")
+d3.time.hours(new Date(2011, 01, 12, 20), new Date(2011, 01, 13, 05)).forEach(log);
+console.log("");
+
+console.log("hours around month:")
+d3.time.hours(new Date(2011, 01, 28, 20), new Date(2011, 02, 01, 05)).forEach(log);
+console.log("");
+
+console.log("hours around year:")
+d3.time.hours(new Date(2010, 11, 31, 20), new Date(2011, 00, 01, 05)).forEach(log);
+console.log("");
+
+console.log("days around week:")
+d3.time.days(new Date(2011, 01, 09), new Date(2011, 01, 18)).forEach(log);
+console.log("");
+
+console.log("days around month:")
+d3.time.days(new Date(2011, 01, 25), new Date(2011, 02, 06)).forEach(log);
+console.log("");
+
+console.log("days around year:")
+d3.time.days(new Date(2010, 11, 28), new Date(2011, 00, 06)).forEach(log);
+console.log("");
+
+console.log("weeks around month:")
+d3.time.weeks(new Date(2011, 03, 01), new Date(2011, 05, 01)).forEach(log);
+console.log("");
+
+console.log("weeks around year:")
+d3.time.weeks(new Date(2005, 11, 01), new Date(2006, 01, 01)).forEach(log);
+console.log("");
+
+console.log("months around year:")
+d3.time.months(new Date(2005, 08, 01), new Date(2006, 05, 01)).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + f(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-scale.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-scale.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-scale.out	(revision 225)
@@ -0,0 +1,496 @@
+1-second ticks (explicit):
+  04 AM
+  :01
+  :02
+  :03
+  :04
+  :05
+  :06
+  :07
+  :08
+  :09
+
+1-second ticks (implicit):
+  04 AM
+  :01
+  :02
+  :03
+  :04
+  :05
+  :06
+  :07
+  :08
+  :09
+
+5-second ticks:
+  04 AM
+  :05
+  :10
+  :15
+  :20
+  :25
+  :30
+  :35
+  :40
+  :45
+
+15-second ticks:
+  04 AM
+  :15
+  :30
+  :45
+  04:01
+  :15
+  :30
+  :45
+  04:02
+  :15
+
+30-second ticks:
+  04 AM
+  :30
+  04:01
+  :30
+  04:02
+  :30
+  04:03
+  :30
+  04:04
+  :30
+
+1-minute ticks:
+  04 AM
+  04:01
+  04:02
+  04:03
+  04:04
+  04:05
+  04:06
+  04:07
+  04:08
+  04:09
+
+5-minute ticks:
+  04 AM
+  04:05
+  04:10
+  04:15
+  04:20
+  04:25
+  04:30
+  04:35
+  04:40
+  04:45
+  04:50
+  04:55
+
+15-minute ticks:
+  04 AM
+  04:15
+  04:30
+  04:45
+  05 AM
+  05:15
+  05:30
+  05:45
+  06 AM
+  06:15
+  06:30
+  06:45
+
+30-minute ticks:
+  04 AM
+  04:30
+  05 AM
+  05:30
+  06 AM
+  06:30
+  07 AM
+  07:30
+  08 AM
+  08:30
+  09 AM
+  09:30
+
+1-hour ticks:
+  10 PM
+  11 PM
+  2011
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+  05 AM
+  06 AM
+  07 AM
+  08 AM
+  09 AM
+
+3-hour ticks:
+  2011
+  03 AM
+  06 AM
+  09 AM
+  12 PM
+  03 PM
+  06 PM
+  09 PM
+  Jan 02
+  03 AM
+  06 AM
+  09 AM
+
+6-hour ticks:
+  2011
+  06 AM
+  12 PM
+  06 PM
+  Jan 02
+  06 AM
+  12 PM
+  06 PM
+  Mon 03
+  06 AM
+  12 PM
+  06 PM
+  Tue 04
+  06 AM
+
+12-hour ticks (implicit):
+  2011
+  12 PM
+  Jan 02
+  12 PM
+  Mon 03
+  12 PM
+  Tue 04
+  12 PM
+  Wed 05
+  12 PM
+  Thu 06
+  12 PM
+  Fri 07
+
+12-hour ticks (explicit):
+  2011
+  12 PM
+  Jan 02
+  12 PM
+  Mon 03
+  12 PM
+  Tue 04
+  12 PM
+  Wed 05
+  12 PM
+  Thu 06
+  12 PM
+  Fri 07
+
+1-day ticks:
+  2011
+  Jan 02
+  Mon 03
+  Tue 04
+  Wed 05
+  Thu 06
+  Fri 07
+  Sat 08
+  Jan 09
+  Mon 10
+  Tue 11
+  Wed 12
+  Thu 13
+
+2-day ticks:
+  2011
+  Mon 03
+  Wed 05
+  Fri 07
+  Jan 09
+  Tue 11
+  Thu 13
+  Sat 15
+  Mon 17
+  Wed 19
+  Fri 21
+  Jan 23
+  Tue 25
+  Thu 27
+
+1-week ticks:
+  Jan 02
+  Jan 09
+  Jan 16
+  Jan 23
+  Jan 30
+  Feb 06
+  Feb 13
+  Feb 20
+  Feb 27
+
+1-month ticks:
+  2011
+  February
+  March
+  April
+  May
+  June
+  July
+  August
+  September
+  October
+
+3-month ticks:
+  2011
+  April
+  July
+  October
+  2012
+  April
+  July
+  October
+  2013
+
+1-year ticks:
+  2011
+  2012
+  2013
+  2014
+  2015
+  2016
+  2017
+  2018
+  2019
+  2020
+
+seconds around minute:
+  :56
+  :57
+  :58
+  :59
+  01:03
+  :01
+  :02
+  :03
+  :04
+
+seconds around hour:
+  :56
+  :57
+  :58
+  :59
+  03 AM
+  :01
+  :02
+  :03
+  :04
+
+seconds around day:
+  :56
+  :57
+  :58
+  :59
+  Wed 02
+  :01
+  :02
+  :03
+  :04
+
+seconds around week:
+  :56
+  :57
+  :58
+  :59
+  Feb 13
+  :01
+  :02
+  :03
+  :04
+
+seconds around month:
+  :56
+  :57
+  :58
+  :59
+  March
+  :01
+  :02
+  :03
+  :04
+
+seconds around year:
+  :56
+  :57
+  :58
+  :59
+  2011
+  :01
+  :02
+  :03
+  :04
+
+minutes around hour:
+  02:56
+  02:57
+  02:58
+  02:59
+  03 AM
+  03:01
+  03:02
+  03:03
+  03:04
+
+minutes around day:
+  11:56
+  11:57
+  11:58
+  11:59
+  Wed 02
+  12:01
+  12:02
+  12:03
+  12:04
+
+minutes around week:
+  11:56
+  11:57
+  11:58
+  11:59
+  Feb 13
+  12:01
+  12:02
+  12:03
+  12:04
+
+minutes around month:
+  11:56
+  11:57
+  11:58
+  11:59
+  March
+  12:01
+  12:02
+  12:03
+  12:04
+
+minutes around year:
+  11:56
+  11:57
+  11:58
+  11:59
+  2011
+  12:01
+  12:02
+  12:03
+  12:04
+
+hours around day:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  Wed 02
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+hours around week:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  Feb 13
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+hours around month:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  March
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+hours around year:
+  08 PM
+  09 PM
+  10 PM
+  11 PM
+  2011
+  01 AM
+  02 AM
+  03 AM
+  04 AM
+
+days around week:
+  Wed 09
+  Thu 10
+  Fri 11
+  Sat 12
+  Feb 13
+  Mon 14
+  Tue 15
+  Wed 16
+  Thu 17
+
+days around month:
+  Fri 25
+  Sat 26
+  Feb 27
+  Mon 28
+  March
+  Wed 02
+  Thu 03
+  Fri 04
+  Sat 05
+
+days around year:
+  Tue 28
+  Wed 29
+  Thu 30
+  Fri 31
+  2011
+  Jan 02
+  Mon 03
+  Tue 04
+  Wed 05
+
+weeks around month:
+  Apr 03
+  Apr 10
+  Apr 17
+  Apr 24
+  May
+  May 08
+  May 15
+  May 22
+  May 29
+
+weeks around year:
+  Dec 04
+  Dec 11
+  Dec 18
+  Dec 25
+  2006
+  Jan 08
+  Jan 15
+  Jan 22
+  Jan 29
+
+months around year:
+  September
+  October
+  November
+  December
+  2006
+  February
+  March
+  April
+  May
+
Index: Dev/branches/Demo/d3/test/time/test-second.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-second.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-second.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("second:");
+console.log("  2010-12-31T23:59:59.999Z -> " + format(d3.time.second(parse("2010-12-31T23:59:59.999Z"))));
+console.log("  2011-01-01T00:00:00.000Z -> " + format(d3.time.second(parse("2011-01-01T00:00:00.000Z"))));
+console.log("  2011-01-01T00:00:00.456Z -> " + format(d3.time.second(parse("2011-01-01T00:00:00.456Z"))));
+console.log("  2011-01-01T00:00:00.999Z -> " + format(d3.time.second(parse("2011-01-01T00:00:00.999Z"))));
+console.log("  2011-01-01T00:00:59.999Z -> " + format(d3.time.second(parse("2011-01-01T00:00:59.999Z"))));
+console.log("");
+
+console.log("second.utc:");
+console.log("  2010-12-31T23:59:59.999Z -> " + format(d3.time.second.utc(parse("2010-12-31T23:59:59.999Z"))));
+console.log("  2011-01-01T00:00:00.000Z -> " + format(d3.time.second.utc(parse("2011-01-01T00:00:00.000Z"))));
+console.log("  2011-01-01T00:00:00.456Z -> " + format(d3.time.second.utc(parse("2011-01-01T00:00:00.456Z"))));
+console.log("  2011-01-01T00:00:00.999Z -> " + format(d3.time.second.utc(parse("2011-01-01T00:00:00.999Z"))));
+console.log("  2011-01-01T00:00:59.999Z -> " + format(d3.time.second.utc(parse("2011-01-01T00:00:59.999Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-second.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-second.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-second.out	(revision 225)
@@ -0,0 +1,14 @@
+second:
+  2010-12-31T23:59:59.999Z -> Fri Dec 31 2010 15:59:59 GMT-0800 (PST)
+  2011-01-01T00:00:00.000Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00.456Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00.999Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:59.999Z -> Fri Dec 31 2010 16:00:59 GMT-0800 (PST)
+
+second.utc:
+  2010-12-31T23:59:59.999Z -> Fri Dec 31 2010 15:59:59 GMT-0800 (PST)
+  2011-01-01T00:00:00.000Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00.456Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00.999Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:59.999Z -> Fri Dec 31 2010 16:00:59 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-seconds.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-seconds.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-seconds.js	(revision 225)
@@ -0,0 +1,30 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("seconds(2011-01-01T07:59:58Z, 2011-01-01T08:00:02Z):");
+d3.time.seconds(parse("2011-01-01T07:59:58Z"), parse("2011-01-01T08:00:02Z")).forEach(log);
+console.log("");
+
+console.log("seconds(2011-03-13T09:59:58Z, 2011-03-13T10:00:02Z):");
+d3.time.seconds(parse("2011-03-13T09:59:58Z"), parse("2011-03-13T10:00:02Z")).forEach(log);
+console.log("");
+
+console.log("seconds(2011-03-13T09:59:58Z, 2011-03-13T10:02:02Z, 15):");
+d3.time.seconds(parse("2011-03-13T09:59:58Z"), parse("2011-03-13T10:02:02Z"), 15).forEach(log);
+console.log("");
+
+console.log("seconds.utc(2010-12-31T23:59:58Z, 2011-01-01T00:00:02Z):");
+d3.time.seconds.utc(parse("2010-12-31T23:59:58Z"), parse("2011-01-01T00:00:02Z")).forEach(log);
+console.log("");
+
+console.log("seconds.utc(2010-12-31T23:59:58Z, 2011-01-01T00:02:02Z, 15):");
+d3.time.seconds.utc(parse("2010-12-31T23:59:58Z"), parse("2011-01-01T00:02:02Z"), 15).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-seconds.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-seconds.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-seconds.out	(revision 225)
@@ -0,0 +1,40 @@
+seconds(2011-01-01T07:59:58Z, 2011-01-01T08:00:02Z):
+  Fri Dec 31 2010 23:59:58 GMT-0800 (PST)
+  Fri Dec 31 2010 23:59:59 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:01 GMT-0800 (PST)
+
+seconds(2011-03-13T09:59:58Z, 2011-03-13T10:00:02Z):
+  Sun Mar 13 2011 01:59:58 GMT-0800 (PST)
+  Sun Mar 13 2011 01:59:59 GMT-0800 (PST)
+  Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:00:01 GMT-0700 (PDT)
+
+seconds(2011-03-13T09:59:58Z, 2011-03-13T10:02:02Z, 15):
+  Sun Mar 13 2011 03:00:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:00:15 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:00:30 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:00:45 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:01:00 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:01:15 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:01:30 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:01:45 GMT-0700 (PDT)
+  Sun Mar 13 2011 03:02:00 GMT-0700 (PDT)
+
+seconds.utc(2010-12-31T23:59:58Z, 2011-01-01T00:00:02Z):
+  Fri Dec 31 2010 15:59:58 GMT-0800 (PST)
+  Fri Dec 31 2010 15:59:59 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:01 GMT-0800 (PST)
+
+seconds.utc(2010-12-31T23:59:58Z, 2011-01-01T00:02:02Z, 15):
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:15 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:30 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:45 GMT-0800 (PST)
+  Fri Dec 31 2010 16:01:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:01:15 GMT-0800 (PST)
+  Fri Dec 31 2010 16:01:30 GMT-0800 (PST)
+  Fri Dec 31 2010 16:01:45 GMT-0800 (PST)
+  Fri Dec 31 2010 16:02:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-week.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-week.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-week.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("week:");
+console.log("  2011-01-01T07:59:59Z -> " + format(d3.time.week(parse("2011-01-01T07:59:59Z"))));
+console.log("  2011-01-01T08:00:00Z -> " + format(d3.time.week(parse("2011-01-01T08:00:00Z"))));
+console.log("  2011-01-02T08:00:01Z -> " + format(d3.time.week(parse("2011-01-02T08:00:01Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.week(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.week(parse("2011-11-06T09:00:00Z"))));
+console.log("");
+
+console.log("week.utc:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.week.utc(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.week.utc(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-02T23:00:00Z -> " + format(d3.time.week.utc(parse("2011-01-02T23:00:00Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.week.utc(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.week.utc(parse("2011-11-06T09:00:00Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-week.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-week.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-week.out	(revision 225)
@@ -0,0 +1,14 @@
+week:
+  2011-01-01T07:59:59Z -> Sun Dec 26 2010 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:00Z -> Sun Dec 26 2010 00:00:00 GMT-0800 (PST)
+  2011-01-02T08:00:01Z -> Sun Jan 02 2011 00:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+
+week.utc:
+  2010-12-31T23:59:59Z -> Sat Dec 25 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Sat Dec 25 2010 16:00:00 GMT-0800 (PST)
+  2011-01-02T23:00:00Z -> Sat Jan 01 2011 16:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sat Mar 12 2011 16:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Sat Nov 05 2011 17:00:00 GMT-0700 (PDT)
+
Index: Dev/branches/Demo/d3/test/time/test-weeks.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-weeks.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-weeks.js	(revision 225)
@@ -0,0 +1,34 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("weeks(2010-12-21T06:00:00Z, 2011-01-12T10:00:00Z):");
+d3.time.weeks(parse("2010-12-21T06:00:00Z"), parse("2011-01-12T10:00:00Z")).forEach(log);
+console.log("");
+
+console.log("weeks(2011-03-02T07:00:00Z, 2011-03-24T11:00:00Z):");
+d3.time.weeks(parse("2011-03-02T07:00:00Z"), parse("2011-03-24T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("weeks(2011-10-25T07:00:00Z, 2011-11-17T11:00:00Z):");
+d3.time.weeks(parse("2011-10-25T07:00:00Z"), parse("2011-11-17T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("weeks(2011-10-25T07:00:00Z, 2012-11-17T11:00:00Z, 4):");
+d3.time.weeks(parse("2011-10-25T07:00:00Z"), parse("2012-11-17T11:00:00Z"), 4).forEach(log);
+console.log("");
+
+console.log("weeks.utc(2010-12-20T22:00:00Z, 2011-01-12T02:00:00Z):");
+d3.time.weeks.utc(parse("2010-12-20T22:00:00Z"), parse("2011-01-12T02:00:00Z")).forEach(log);
+console.log("");
+
+console.log("weeks.utc(2010-12-20T22:00:00Z, 2011-01-12T02:00:00Z, 4):");
+d3.time.weeks.utc(parse("2010-12-20T22:00:00Z"), parse("2012-01-12T02:00:00Z"), 4).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-weeks.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-weeks.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-weeks.out	(revision 225)
@@ -0,0 +1,51 @@
+weeks(2010-12-21T06:00:00Z, 2011-01-12T10:00:00Z):
+  Sun Dec 26 2010 00:00:00 GMT-0800 (PST)
+  Sun Jan 02 2011 00:00:00 GMT-0800 (PST)
+  Sun Jan 09 2011 00:00:00 GMT-0800 (PST)
+
+weeks(2011-03-02T07:00:00Z, 2011-03-24T11:00:00Z):
+  Sun Mar 06 2011 00:00:00 GMT-0800 (PST)
+  Sun Mar 13 2011 00:00:00 GMT-0800 (PST)
+  Sun Mar 20 2011 00:00:00 GMT-0700 (PDT)
+
+weeks(2011-10-25T07:00:00Z, 2011-11-17T11:00:00Z):
+  Sun Oct 30 2011 00:00:00 GMT-0700 (PDT)
+  Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+  Sun Nov 13 2011 00:00:00 GMT-0800 (PST)
+
+weeks(2011-10-25T07:00:00Z, 2012-11-17T11:00:00Z, 4):
+  Sun Nov 06 2011 00:00:00 GMT-0700 (PDT)
+  Sun Dec 04 2011 00:00:00 GMT-0800 (PST)
+  Sun Jan 01 2012 00:00:00 GMT-0800 (PST)
+  Sun Jan 29 2012 00:00:00 GMT-0800 (PST)
+  Sun Feb 26 2012 00:00:00 GMT-0800 (PST)
+  Sun Apr 01 2012 00:00:00 GMT-0700 (PDT)
+  Sun Apr 29 2012 00:00:00 GMT-0700 (PDT)
+  Sun May 27 2012 00:00:00 GMT-0700 (PDT)
+  Sun Jun 24 2012 00:00:00 GMT-0700 (PDT)
+  Sun Jul 22 2012 00:00:00 GMT-0700 (PDT)
+  Sun Aug 19 2012 00:00:00 GMT-0700 (PDT)
+  Sun Sep 16 2012 00:00:00 GMT-0700 (PDT)
+  Sun Oct 14 2012 00:00:00 GMT-0700 (PDT)
+
+weeks.utc(2010-12-20T22:00:00Z, 2011-01-12T02:00:00Z):
+  Sat Dec 25 2010 16:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 16:00:00 GMT-0800 (PST)
+  Sat Jan 08 2011 16:00:00 GMT-0800 (PST)
+
+weeks.utc(2010-12-20T22:00:00Z, 2011-01-12T02:00:00Z, 4):
+  Sat Jan 01 2011 16:00:00 GMT-0800 (PST)
+  Sat Jan 29 2011 16:00:00 GMT-0800 (PST)
+  Sat Feb 26 2011 16:00:00 GMT-0800 (PST)
+  Sat Mar 26 2011 17:00:00 GMT-0700 (PDT)
+  Sat Apr 23 2011 17:00:00 GMT-0700 (PDT)
+  Sat May 21 2011 17:00:00 GMT-0700 (PDT)
+  Sat Jun 18 2011 17:00:00 GMT-0700 (PDT)
+  Sat Jul 16 2011 17:00:00 GMT-0700 (PDT)
+  Sat Aug 13 2011 17:00:00 GMT-0700 (PDT)
+  Sat Sep 10 2011 17:00:00 GMT-0700 (PDT)
+  Sat Oct 08 2011 17:00:00 GMT-0700 (PDT)
+  Sat Nov 05 2011 17:00:00 GMT-0700 (PDT)
+  Sat Dec 03 2011 16:00:00 GMT-0800 (PST)
+  Sat Dec 31 2011 16:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-year.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-year.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-year.js	(revision 225)
@@ -0,0 +1,22 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("year:");
+console.log("  2011-01-01T07:59:59Z -> " + format(d3.time.year(parse("2011-01-01T07:59:59Z"))));
+console.log("  2011-01-01T08:00:00Z -> " + format(d3.time.year(parse("2011-01-01T08:00:00Z"))));
+console.log("  2011-01-01T08:00:01Z -> " + format(d3.time.year(parse("2011-01-01T08:00:01Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.year(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.year(parse("2011-11-06T09:00:00Z"))));
+console.log("");
+
+console.log("year.utc:");
+console.log("  2010-12-31T23:59:59Z -> " + format(d3.time.year.utc(parse("2010-12-31T23:59:59Z"))));
+console.log("  2011-01-01T00:00:00Z -> " + format(d3.time.year.utc(parse("2011-01-01T00:00:00Z"))));
+console.log("  2011-01-01T23:00:00Z -> " + format(d3.time.year.utc(parse("2011-01-01T23:00:00Z"))));
+console.log("  2011-03-13T09:00:00Z -> " + format(d3.time.year.utc(parse("2011-03-13T09:00:00Z"))));
+console.log("  2011-11-06T09:00:00Z -> " + format(d3.time.year.utc(parse("2011-11-06T09:00:00Z"))));
+console.log("");
Index: Dev/branches/Demo/d3/test/time/test-year.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-year.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-year.out	(revision 225)
@@ -0,0 +1,14 @@
+year:
+  2011-01-01T07:59:59Z -> Fri Jan 01 2010 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:00Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-01-01T08:00:01Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+
+year.utc:
+  2010-12-31T23:59:59Z -> Thu Dec 31 2009 16:00:00 GMT-0800 (PST)
+  2011-01-01T00:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-01-01T23:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-03-13T09:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  2011-11-06T09:00:00Z -> Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/d3/test/time/test-years.js
===================================================================
--- Dev/branches/Demo/d3/test/time/test-years.js	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-years.js	(revision 225)
@@ -0,0 +1,34 @@
+require("./../../lib/env-js/envjs/node");
+require("./../../d3");
+require("./../../d3.time");
+
+function parse(string) { return new Date(string); }
+function format(date) { return date.toString(); }
+
+console.log("years(2009-11-21T06:00:00Z, 2012-02-12T10:00:00Z):");
+d3.time.years(parse("2009-11-21T06:00:00Z"), parse("2012-02-12T10:00:00Z")).forEach(log);
+console.log("");
+
+console.log("years(2009-01-02T07:00:00Z, 2012-04-24T11:00:00Z):");
+d3.time.years(parse("2009-01-02T07:00:00Z"), parse("2012-04-24T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("years(2009-09-25T07:00:00Z, 2012-12-17T11:00:00Z):");
+d3.time.years(parse("2009-09-25T07:00:00Z"), parse("2012-12-17T11:00:00Z")).forEach(log);
+console.log("");
+
+console.log("years(2009-09-25T07:00:00Z, 2042-12-17T11:00:00Z, 5):");
+d3.time.years(parse("2009-09-25T07:00:00Z"), parse("2042-12-17T11:00:00Z"), 5).forEach(log);
+console.log("");
+
+console.log("years.utc(2009-11-20T22:00:00Z, 2012-02-12T02:00:00Z):");
+d3.time.years.utc(parse("2009-11-20T22:00:00Z"), parse("2012-02-12T02:00:00Z")).forEach(log);
+console.log("");
+
+console.log("years.utc(2009-11-20T22:00:00Z, 2012-02-42T02:00:00Z, 5):");
+d3.time.years.utc(parse("2009-11-20T22:00:00Z"), parse("2042-02-12T02:00:00Z"), 5).forEach(log);
+console.log("");
+
+function log(date) {
+  console.log("  " + format(date));
+}
Index: Dev/branches/Demo/d3/test/time/test-years.out
===================================================================
--- Dev/branches/Demo/d3/test/time/test-years.out	(revision 225)
+++ Dev/branches/Demo/d3/test/time/test-years.out	(revision 225)
@@ -0,0 +1,38 @@
+years(2009-11-21T06:00:00Z, 2012-02-12T10:00:00Z):
+  Fri Jan 01 2010 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sun Jan 01 2012 00:00:00 GMT-0800 (PST)
+
+years(2009-01-02T07:00:00Z, 2012-04-24T11:00:00Z):
+  Fri Jan 01 2010 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sun Jan 01 2012 00:00:00 GMT-0800 (PST)
+
+years(2009-09-25T07:00:00Z, 2012-12-17T11:00:00Z):
+  Fri Jan 01 2010 00:00:00 GMT-0800 (PST)
+  Sat Jan 01 2011 00:00:00 GMT-0800 (PST)
+  Sun Jan 01 2012 00:00:00 GMT-0800 (PST)
+
+years(2009-09-25T07:00:00Z, 2042-12-17T11:00:00Z, 5):
+  Fri Jan 01 2010 00:00:00 GMT-0800 (PST)
+  Thu Jan 01 2015 00:00:00 GMT-0800 (PST)
+  Wed Jan 01 2020 00:00:00 GMT-0800 (PST)
+  Wed Jan 01 2025 00:00:00 GMT-0800 (PST)
+  Tue Jan 01 2030 00:00:00 GMT-0800 (PST)
+  Mon Jan 01 2035 00:00:00 GMT-0800 (PST)
+  Sun Jan 01 2040 00:00:00 GMT-0800 (PST)
+
+years.utc(2009-11-20T22:00:00Z, 2012-02-12T02:00:00Z):
+  Thu Dec 31 2009 16:00:00 GMT-0800 (PST)
+  Fri Dec 31 2010 16:00:00 GMT-0800 (PST)
+  Sat Dec 31 2011 16:00:00 GMT-0800 (PST)
+
+years.utc(2009-11-20T22:00:00Z, 2012-02-42T02:00:00Z, 5):
+  Thu Dec 31 2009 16:00:00 GMT-0800 (PST)
+  Wed Dec 31 2014 16:00:00 GMT-0800 (PST)
+  Tue Dec 31 2019 16:00:00 GMT-0800 (PST)
+  Tue Dec 31 2024 16:00:00 GMT-0800 (PST)
+  Mon Dec 31 2029 16:00:00 GMT-0800 (PST)
+  Sun Dec 31 2034 16:00:00 GMT-0800 (PST)
+  Sat Dec 31 2039 16:00:00 GMT-0800 (PST)
+
Index: Dev/branches/Demo/dashboard.php
===================================================================
--- Dev/branches/Demo/dashboard.php	(revision 225)
+++ Dev/branches/Demo/dashboard.php	(revision 225)
@@ -0,0 +1,59 @@
+<?php
+require 'classes/master.php';
+
+if (is_null($_SESSION['username']))
+	redirect('index.php');
+
+/* MOCK SURVEY */
+
+$survey = new Survey('ultimateid', 'The Epic Survey');
+$question1 = new Question('question1id', 'AE340', 'Age', 'int', 'What is your age?');
+$question2 = new Question('question2id', 'XV453', 'Identity', 'mc', 'Are you freakazoid?');
+$question2->answers = array('yes', 'no', 'maybe');
+
+$survey->addQuestion($question1);
+$survey->addQuestion($question2);
+
+/* MOCK RESULTS */
+
+
+$survey1Results = new SurveyResults();
+
+$question1Answers = array(3, 5, 12, 134, 5, 40); // int
+$question2Answers = array('yes', 'no', 'no', 'yes', 'maybe', 'no');	// Multiple choice
+
+$question1Result = new QuestionResult(ResultType::INTEGER, $question1Answers);
+$question2Result = new QuestionResult(ResultType::MULTIPLE_CHOICE, $question2Answers);
+
+$survey1Results->addQuestionResult($question1Result);
+$survey1Results->addQuestionResult($question2Result);
+
+/*  COMBINE */
+
+$survey->setResults($survey1Results);
+
+$surveys = array($survey);
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+            <title></title>
+			<?php new StyleSheet(); ?>
+			<script type="text/javascript" src="d3/d3.js"></script>
+    </head>
+    <body>
+        <div id="header">
+			<?php new Logo(); ?>
+        </div>
+        <div id="wrapper">
+
+            <div id="content">
+				<?php new DashboardTool($surveys); ?>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/dashboardDataSelection.php
===================================================================
--- Dev/branches/Demo/dashboardDataSelection.php	(revision 225)
+++ Dev/branches/Demo/dashboardDataSelection.php	(revision 225)
@@ -0,0 +1,92 @@
+<?php
+//Insert login check, dbi creation, etc...
+/*
+ * TODO getInfo JSON conversie ipv HTML echo.
+ * >> Formatting of data
+ * Formatting (delete icons, aligning, button size/style, Margins/Padding, etc...
+ */
+require "classes/master.php";
+
+$dbDataSelectionWidget = new dbDataSelectionWidget();
+?>
+
+
+
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title></title>
+        <?php new Stylesheet("visualEditors"); ?>
+
+        <?php $dbDataSelectionWidget->Javascript(); ?>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="content">
+            <div id="wrapper">
+
+                <div id="leftColumn">
+
+                    <div class="largeFrame C" id="dbDataSelector">
+                        <div class="content">
+
+                            <div style="float: left; clear: none;">
+                                <div class="largeTitle">Instance data</div>
+                                <select id="dbSessionInstancesList" multiple class="dbDataList" size="15" onchange="infoPanelTimeout(event);">
+                                    <?php
+                                    foreach ($dbDataSelectionWidget->sessions as $session) {
+                                        // Fill list
+                                        // First checkbox, then descriptor
+                                        echo "<option value='$session->uid'>$session->title</option>";
+                                    }
+                                    ?>
+                                </select>
+                            </div>
+
+                            <div style="float: left; clear:none;">
+                                <div class="largeTitle">Game data</div>
+                                <select id="dbGamedataList" multiple class="dbDataList" size="15" onChange="infoPanelTimeout(event);">
+                                    <?php
+                                    foreach ($dbDataSelectionWidget->gamedata as $gamedata) {
+                                        // Fill list
+                                        // First checkbox, then descriptor
+                                        echo "<option value='$gamedata->uid'>$gamedata->title</option>";
+                                    }
+                                    ?>
+                                </select>
+                            </div>
+                        </div>
+                    </div>
+
+
+                    <div class="largeFrame Cu" id="dbInfoPanel">
+                        <div class='largeTitle'>Info panel</div>
+                        <div class="content" id="dbInfoPanelContent" style="height: 100px;">
+
+                        </div>
+
+                        <div class="controls">
+                            <input type="button" class="smallButton" id="btnAddToCart" value="Add to list" onClick="addDataToList();" />
+                        </div>
+                    </div>
+                </div>
+
+                <div id="rightColumn">
+                    <div class="largeFrame Cv" id="dbShoppingCart">
+                        <div class="largeTitle">Shopping cart</div>
+                        <div class="content" id="shoppingCartContent">
+
+                        </div>
+                        <div class="controls">
+                            <input type="button" class="smallButton" id="btnAddToCart" value="Configure Dashboard" onClick="configureDashboard();" />
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/dashboardGraphSelection.php
===================================================================
--- Dev/branches/Demo/dashboardGraphSelection.php	(revision 225)
+++ Dev/branches/Demo/dashboardGraphSelection.php	(revision 225)
@@ -0,0 +1,70 @@
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+require "classes/master.php";
+
+$dbDataSelectionWidget = new dbDataSelectionWidget();
+
+$data = JSON_decode($_POST['selectedData']);
+?>
+
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+        <title>
+            Dashboard Graph Selection
+        </title>
+        <?php new Stylesheet("visualEditors"); ?>
+
+    </head>
+    
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="content">
+            <div id="wrapper">
+
+                <div id="leftColumn">
+
+                    <div class="largeFrame C" id="dbDataSelector">
+                        <div class="content">
+
+                            <div class="largeTitle">Selected data</div>                         
+                            <div class="content" style="width: 300px; height: 500px; ">                
+                                <?php
+                                print_r($data);
+                                ?>
+                            </div>
+
+                        </div>
+                    </div>
+
+                    <div id="rightColumn">
+                        <div class="largeFrame Cv" style="width: 600px; height: 400px;">
+                            <div class="largeTitle">Graph selection</div>
+                            <div class="content">
+                                <img src="images/icons/nyan.gif" width="595" height="370"></img>
+                            </div>
+
+                        </div>
+                    </div>
+
+
+                    <div class="largeFrame Cu" id="dbInfoPanel" style="width: 930px;">
+                        <div class='largeTitle'>Info panel</div>
+                        <div class="content" id="dbInfoPanelContent" style="height: 100px;">
+
+                        </div>
+                    </div>
+                </div>
+
+
+                </body>
+                </html>
Index: Dev/branches/Demo/database_example.php
===================================================================
--- Dev/branches/Demo/database_example.php	(revision 225)
+++ Dev/branches/Demo/database_example.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+    require 'classes/master.php';
+
+    $db = new DatabaseInterface();
+    $result = $db->get("user", array("name" => "jkraaijeveld"));
+    print_r($result);
+    
+    // Create new application and save it in database
+    $newApp = new Application(null, "Titel", "Beschrijving", "Stijl");
+    $db->set(newApp);
+    
+    //Retrieve all Questions
+    $results = $db->get("question", array());
+    
+    //Batchsave all results
+    $db->set($results);
+?>
Index: Dev/branches/Demo/doc/DONE
===================================================================
--- Dev/branches/Demo/doc/DONE	(revision 225)
+++ Dev/branches/Demo/doc/DONE	(revision 225)
@@ -0,0 +1,23 @@
+DONE - Wat werkt er al
+
+Menu
+    Application Menu
+    Survey Menu
+
+Session
+    Application inladen in SessionCreationTool
+    Repopulate session pipeline when "making"
+
+Application
+    New Application
+    Load Application
+
+SurveyCreationTool
+    Title + Descriptions CRUD
+    New Survey
+    (Auto) Save Survey
+    Make questions of different types
+    Questions CRUD
+
+SurveyTool
+    Default question description / leeg -> Niet displayen
Index: Dev/branches/Demo/doc/TODO
===================================================================
--- Dev/branches/Demo/doc/TODO	(revision 225)
+++ Dev/branches/Demo/doc/TODO	(revision 225)
@@ -0,0 +1,39 @@
+TODO - Nog niet af
+
+Menu
+    Session Menu
+
+Session
+    New Session
+    Save Session
+    Load / Edit Session
+    Session starten -> inlogscherm -> session start *
+
+Application
+    Edit Application
+    Application Style
+
+Survey question creation
+    Save question to database
+    Load existing question
+    **Question code
+    Question category
+
+Dashboard
+    Dashboard Menu
+    DashboardCreationTool
+    Dashboard kunnen selecteren bij Session
+    
+Survey voor users
+    Bounds checking -> js erna van
+
+BUGS - Hoge prioriteit
+    Application description wordt niet geupdate
+
+BUGS - Lage prioriteit
+    Borderkleur inputchecking int verandert niet terug
+
+
+TODO voor Bas :D
+Question code erbijgooien
+
Index: Dev/branches/Demo/fbdataselection.php
===================================================================
--- Dev/branches/Demo/fbdataselection.php	(revision 225)
+++ Dev/branches/Demo/fbdataselection.php	(revision 225)
@@ -0,0 +1,26 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['userUid'])) {
+    redirect("index.php");
+}
+
+if (isset($_SESSION['message'])) {
+    echo $_SESSION['message'];
+    unset($_SESSION['message']);
+}
+?>
+
+<!DOCTYPE html>
+<html>
+    <head><?php   new StyleSheet("aapje"); ?>
+          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+          <title>Feedback dataselection</title>
+    </head>
+    <body>
+        
+
+
+        
+    </body>
+</html>
Index: Dev/branches/Demo/getInfo.php
===================================================================
--- Dev/branches/Demo/getInfo.php	(revision 225)
+++ Dev/branches/Demo/getInfo.php	(revision 225)
@@ -0,0 +1,86 @@
+<?php
+
+require 'classes/master.php'; //should be at top of every page
+
+if (isset($_POST['uid']) && isset($_POST['type'])) {
+    if (!empty($_POST['uid']) && !empty($_POST['type'])) {
+        $uid = $_POST['uid'];
+        $type = $_POST['type'];
+    } else {
+//$errors[] = "No uid passed!";
+        return;
+    }
+} else {
+//$errors[] = "Wrong call, no uid property in POST data!";
+    return;
+}
+
+$dbi = new DatabaseInterface();
+
+$results = $dbi->get($type, array("uid" => $uid));
+
+if (count($results) > 0) {      // check if DB object exists and assign it to variable
+    if ($results[0] != null) {
+        $returnString = "";
+        $result = $results[0];
+    } else
+        return;
+} else
+    return;
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Note: the next part needs to be converted to JSON operation, so that the javascript can easily handle any style changes to the information retrieved. This implementation is just silly.
+// Basic idea: return a JSON array of property: value pairs, then let javascript loop through these properties and format them suitably. This is both more flexible and easier to adjust, as well as resulting in smaller packets.
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+switch ($type) {
+    case "Session":
+        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $result->evaluate();
+        $returnString .= "<span class='property'>Created: </span><span class='value'>" . $result->creationdate->format("H:i:s, d-m-Y") . " by " . $result->creator->name . "</span>";
+        $cS = 0; $cD = 0; $cA = 0;
+        foreach ($result->pipeline as $step) {
+            switch (get_class($step)){
+                case "Survey":
+                    $cS++;
+                    break;
+                case "Application":
+                    $cA++;
+                    break;
+                case "Dashboard":
+                    $cD++;
+                    break;
+                default:
+                    //derp?
+                    break;
+            }
+        }
+        $returnString .= "<span class='property'>Number of steps: </span><span class='value'><ul style='list-style-type: none;'><li style='margin-left: -40px;'>$cS Surveys<li style='margin-left: -40px;'>$cA Applications<li style='margin-left: -40px;'>$cD Dashboards</ul></span>";
+        break;
+    case "Survey":
+        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $returnString .= "<span class='property'>Creator: </span><span class='value'>LOLOL ME!!!</span>";
+        $qCount = 0;
+        $qCount = count($result->questions);
+        $returnString .= "<span class='property'>Questions: </span><span class='value'>$qCount</span>";
+        $returnString .= "<span class='property'>Description: </span><span class='value'>$result->description</span>";
+        break;
+    case "Application":
+        $returnString .= "<span class='property'>Title: </span><span class='value'>$result->title</span>";
+        $returnString .= "<span class='property'>Path: </span><span class='value'>C:/folder_of_awesomeness/epicgame.exe</span>";
+        $returnString .= "<span class='property'>Description: </span><span class='value'>$result->description</span>";
+        break;
+    case "Dashboard":
+        break;
+    case "Respondent":
+        break;
+    case "Question":
+        break;
+    case "Answer":
+        break;
+    default:
+        break;
+}
+
+echo $returnString;
+?>
Index: Dev/branches/Demo/index.php
===================================================================
--- Dev/branches/Demo/index.php	(revision 225)
+++ Dev/branches/Demo/index.php	(revision 225)
@@ -0,0 +1,99 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+
+/*  Page still has ambiguous design. Login and Register buttons are at same hierarchy level, makes user suspect the register button works based on input given here.
+ *  Instead redirects to anoter page.
+ *   
+ */
+
+//Even voor tijdelijk, aangezien er nog pagina's missen en redirects daarom niet goed werken:
+if (isset($_SESSION['userUid'])) {
+    redirect("logout.php");
+}
+
+$errorMessage[] = "";
+
+if (isset($_POST['register'])) {
+    if (isset($_POST['username']) && isset($_POST['password'])) {
+        $dbi = new DatabaseInterface();
+        $user_results = $dbi->get("user", array("name" => $_POST['username']));
+        if (count($user_results) == 0 || !$user_results) {
+            if (strlen($_POST['password']) > 6) {
+                $user = new User(null, $_POST['username'], $_POST['password']);
+                $dbi->set($user);
+                $_SESSION['userUid'] = $user->uid;
+            } else {
+                $errorMessage[] = "Password is too short";
+            }
+        }
+        else
+            $errorMessage[] = "Username already exists, try something else!";
+    }
+    else
+        $errorMessage[] = "Please fill in a username and password";
+}
+
+if (isset($_POST['login'])) {   // User clicked the login button
+    $dbi = new DatabaseInterface();
+    $user_results = $dbi->get("user", array("name" => $_POST['username']));
+    if (isset($user_results[0])) {
+        if ($user_results[0]->password == $_POST['password']) {
+            $_SESSION['userUid'] = $user_results[0]->uid;
+        } else {
+            $errorMessage[] = "Incorrect password!";
+        }
+    } else {
+        $errorMessage[] = "Username doesn't exist!";
+    }
+}
+
+if (isset($_SESSION['userUid'])) {  // User just registered a new account
+    redirect('selectSession.php');
+}
+?>
+
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title>Facilitator</title>
+        <?php new StyleSheet("awesome"); ?>
+        <script type="text/javascript" src="js/menu.js"></script>
+        <script type="text/javascript">
+        
+    
+
+        </script>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+
+            <div id="content">
+                <div class="menu">
+                    <form action="index.php" method="POST">
+                        <h3>Username</h3>
+                        <input type="text" name="username"><br />
+                        <h3>Password</h3>
+                        <input type="password" name="password"><br/><br />
+                        <div id="errorDisplay">
+                            <?php
+                            foreach ($errorMessage as $message) {
+                                echo "<h3 style='color: #FF0000;'>$message</h3>";
+                            }
+                            ?>
+                        </div>
+                        <br/>
+                        <input type="submit" name="login" class="surveyButton bigSurveyButton" value="Log in">
+                    </form>
+                    <form action="register.php" method="POST">
+                        <input type="submit" name="register" class="surveyButton bigSurveyButton" value="Register">
+                    </form>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/jahoor.php
===================================================================
--- Dev/branches/Demo/jahoor.php	(revision 225)
+++ Dev/branches/Demo/jahoor.php	(revision 225)
@@ -0,0 +1,187 @@
+<?php ob_start('ob_gzhandler') ?> 
+<!DOCTYPE html > 
+<html> 
+<head> 
+    <meta http-equiv="X-UA-Compatible" content="chrome=1"> 
+ 
+    <!--
+        /**
+        * o------------------------------------------------------------------------------o
+        * | This file is part of the RGraph package - you can learn more at:             |
+        * |                                                                              |
+        * |                          http://www.rgraph.net                               |
+        * |                                                                              |
+        * | This package is licensed under the RGraph license. For all kinds of business |
+        * | purposes there is a small one-time licensing fee to pay and for non          |
+        * | commercial  purposes it is free to use. You can read the full license here:  |
+        * |                                                                              |
+        * |                      http://www.rgraph.net/LICENSE.txt                       |
+        * o------------------------------------------------------------------------------o
+        */
+    --> 
+    <title>RGraph: Javascript charts and graph library - line charts</title> 
+    
+    <meta name="keywords" content="rgraph html5 canvas example line chart" /> 
+    <meta name="description" content="RGraph: Javascript charts and graph library - Line chart example" /> 
+    
+    <meta property="og:title" content="RGraph: Javascript charts and graph library" /> 
+    <meta property="og:description" content="A charts library based on the HTML5 canvas tag" /> 
+    <meta property="og:image" content="http://www.rgraph.net/images/logo.png"/> 
+ 
+    <link rel="stylesheet" href="../css/website.css" type="text/css" media="screen" /> 
+    <link rel="icon" type="image/png" href="../images/favicon.png"> 
+ 
+    <script src="../libraries/RGraph.common.core.js" ></script> 
+    <script src="../libraries/RGraph.common.context.js" ></script> 
+    <script src="../libraries/RGraph.common.annotate.js" ></script> 
+    <script src="../libraries/RGraph.common.tooltips.js" ></script> 
+    <script src="../libraries/RGraph.common.zoom.js" ></script> 
+    <script src="../libraries/RGraph.common.resizing.js" ></script> 
+    <script src="../libraries/RGraph.line.js" ></script> 
+    <!--[if IE 8]><script src="../excanvas/excanvas.original.js"></script><![endif]--> 
+ 
+    <script> 
+        window.onload = function ()
+        {
+            var line1 = new RGraph.Line('line1', [56,45,43,52,56,65,21,23,34,15,21,-12,-13,-31,-25], [35,43,41,41,42,46,42,39,46,41,45,65,54,54,41,41]);
+            line1.Set('chart.background.barcolor1', 'white');
+            line1.Set('chart.background.barcolor2', 'white');
+            line1.Set('chart.background.grid', true);
+            line1.Set('chart.linewidth', 5);
+            line1.Set('chart.gutter.left', 35);
+            line1.Set('chart.hmargin', 5);
+            line1.Set('chart.shadow', true);
+            line1.Set('chart.tickmarks', null);
+            line1.Set('chart.units.post', 'k');
+            line1.Set('chart.xticks', 8);
+            line1.Set('chart.colors', ['red', 'green']);
+            line1.Set('chart.key', ['Sales (not good)','Costs (reasonably consistent)']);
+            line1.Set('chart.key.shadow', true);
+            line1.Set('chart.key.shadow.offsetx', 0);
+            line1.Set('chart.key.shadow.offsety', 0);
+            line1.Set('chart.key.shadow.blur', 15);
+            line1.Set('chart.key.shadow.color', '#ddd');
+            line1.Set('chart.key.rounded', true);
+            line1.Set('chart.key.position', 'graph');
+            line1.Set('chart.key.position.x', line1.Get('chart.gutter.left') + 4);
+            line1.Set('chart.key.position.y', (line1.canvas.height / 2) + 5);
+            line1.Set('chart.xaxispos', 'center');
+            line1.Set('chart.background.grid.autofit', true);
+            line1.Set('chart.background.grid.autofit.numhlines', 16);
+            line1.Set('chart.title', 'Sales last year');
+            line1.Draw();
+            
+            var line2 = new RGraph.Line('line2', [6,5,4,5,6,4,1,2,3], [7,8,9,9,8,7,8,7,6]);
+            line2.Set('chart.labels', ['13th','14th','15th','16th','15th','16th','17th','18th','19th']);
+            line2.Set('chart.title', 'Range of fuel consumption');
+            line2.Set('chart.title.vpos', 0.5);
+            line2.Set('chart.background.barcolor1', 'white');
+            line2.Set('chart.background.barcolor2', 'white');
+            line2.Set('chart.filled', true);
+            line2.Set('chart.filled.range', true);
+            line2.Set('chart.fillstyle', 'rgba(128,255,128,0.5)');
+            line2.Set('chart.linewidth', 2);
+            line2.Set('chart.colors', ['green']);
+            line2.Set('chart.hmargin', 5);
+            line2.Draw();
+        }
+    </script> 
+ 
+    <script> 
+      var _gaq = _gaq || [];
+      _gaq.push(['_setAccount', 'UA-54706-2']);
+      _gaq.push(['_trackPageview']);
+    
+      (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+      })();
+    </script> 
+    
+        <script>
+    window.onload = function ()
+    {
+        var data = [10,4,17,50,25,19,20,25,30,29,30,29];
+    
+        var line = new RGraph.Line("myLine", data);
+        line.Set('chart.background.barcolor1', 'rgba(255,255,255,1)');
+        line.Set('chart.background.barcolor2', 'rgba(255,255,255,1)');
+        line.Set('chart.background.grid.color', 'rgba(238,238,238,1)');
+        line.Set('chart.colors', ['rgba(255,0,0,1)']);
+        line.Set('chart.linewidth', 2);
+        line.Set('chart.filled', true);
+        line.Set('chart.hmargin', 5);
+        line.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
+        line.Set('chart.gutter.left', 40);
+        line.Draw();
+    }
+</script>
+
+ 
+</head> 
+<body> 
+ 
+    
+    <!-- Social networking buttons --> 
+        <div id="social_icons" class="warning" style="border-radius: 10px; top: 1px; position: fixed"> 
+            <a title="Bookmark with delicious" href="http://delicious.com/save?jump=close&v=4&noui&jump=close&url=http://www.rgraph.net&notes=RGraph%20is%20a%20HTML5%20based%20javascript%20charts%20library%20supporting%20a%20wide%20range%20of%20different%20charts%20types&title=RGraph:Javascript%20charts%20and%20graphs%20library" target="_blank"><img src="../images/delicious.png" alt="Bookmark with delicious" width="22" height="22" border="0" align="absmiddle" /></a> 
+            <a href="http://twitter.com/home/?status=RGraph%3A%20Javascript+charts+and+graph+library+http%3A%2F%2Fwww.rgraph.net+%23rgraph+%23html5+%23canvas+%23javascript+%23charts+@_rgraph" target="_blank"><img src="../images/twitter.png" id="twitter_icon" alt="tweet this site" width="22" height="22" border="0" align="absmiddle" /></a> 
+        </div> 
+ 
+        <script> 
+            // Opera fix
+            if (navigator.userAgent.indexOf('Opera') == -1) {
+              document.getElementById("social_icons").style.position = 'fixed';
+            }
+        </script> 
+    <!-- Social networking buttons --> 
+ 
+ 
+<div id="breadcrumb"> 
+    <a href="../index.html">RGraph: Javascript charts and graph library</a> 
+    >
+    <a href="./index.html">Examples</a> 
+    >
+    Line chart
+</div> 
+ 
+<h1>RGraph: <span>Javascript charts and graph library</span> - Line charts</h1> 
+ 
+    <script> 
+        if (RGraph.isIE8()) {
+            document.write('<div style="background-color: #fee; border: 2px dashed red; padding: 5px"><b>Important</b><br /><br /> Internet Explorer 8 does not natively support the HTML5 canvas tag, so if you want to see the charts, you can either:<ul><li>Install <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a></li><li>Use ExCanvas. This is provided in the RGraph Archive.</li><li>Use another browser entirely. Your choices are Firefox 3.5+, Chrome 2+, Safari 4+ or Opera 10.5+. </li></ul> <b>Note:</b> Internet Explorer 9 fully supports the canvas tag. Click <a href="http://support.rgraph.net/message/rgraph-in-internet-explorer-9.html" target="_blank">here</a> to see some screenshots.</div>');
+        }
+    </script> 
+    
+    <div> 
+        <p> 
+            Like Bar charts, Line charts are some of the most versatile chart types. It is similar, but can indicate chronological
+            data better. Line charts are good if, for example, you want to illustrate sales figures over a year (or any period of
+            time). You'll then be able to easily see whether sales are going up, down or are stagnant. It will also become apparent
+            which months are busier than others. By using a multiple line chart you can add multiple sets of data (eg two or more years
+            of figures) to your chart. You can customise the line chart by stipulating it as being filled, having drop shadows, keys,
+            having the X axis in the centre, different colors, different tickmark styles and tooltips etc.
+        </p> 
+        
+        <p> 
+            The first chart uses external DIVs for the tooltip contents. The DIVs are at the bottom of this page (they're set not to
+            be visible). Using external DIVs for tooltips can make maintenance easier.
+        </p> 
+    
+        <div> 
+            <ul> 
+                <li><a href="../docs/line.html">Line charts API documentation</a></li> 
+            </ul> 
+        </div> 
+ 
+        <div> 
+            <canvas id="line1" width="475" height="250">[Please wait...]</canvas> 
+            <canvas id="line2" width="475" height="250">[Please wait...]</canvas> 
+        </div> 
+    </div> 
+ 
+
+</body> 
+</html>
+        
Index: Dev/branches/Demo/js/dashboardScripts.js
===================================================================
--- Dev/branches/Demo/js/dashboardScripts.js	(revision 225)
+++ Dev/branches/Demo/js/dashboardScripts.js	(revision 225)
@@ -0,0 +1,183 @@
+dbSelectionInfoTimeout = null;
+currentlySelected = {
+    titles: [],
+    uids: [],
+    type: null
+}
+
+shoppingCart = {
+    contents: {
+        titles: [],
+        uids: [],
+        types: []
+    }
+}
+
+function infoPanelTimeout(event) {
+    // If no event, crash.
+    if (event == undefined || event == null) return;
+    // Cancel previous timeout if present.
+    if (dbSelectionInfoTimeout) {
+        window.clearTimeout(dbSelectionInfoTimeout);
+    }
+    // Gather parameters about event.
+    var dbSelectionInfoTime = 500;
+    var selectBox = event.target;
+    var values = getMultipleListValue(selectBox).values;
+    var titles = getMultipleListValue(selectBox).titles;
+    var uid = values[values.length-1];
+    var type;
+    switch (selectBox.id) {
+        case "dbSessionInstancesList":
+            // This should be session instance, not session. Testing purpose only.
+            type = "Session";
+            break;
+        case "dbGamedataList":
+            // This is obviously not the real type, change before committing
+            type = "Application";
+            break;
+        default:
+            alert("No valid type passed!");
+            break;
+    }
+    currentlySelected.uids = values;
+    currentlySelected.titles = titles;
+    currentlySelected.type = type;
+    // Set timeout of 500ms, then execute ajaxInfoRequest with previously gathered parameters.
+    dbSelectionInfoTimeout = window.setTimeout(ajaxInfoRequest, dbSelectionInfoTime, uid, ge("dbInfoPanelContent"), type);
+    
+}
+
+function getMultipleListValue(element) {
+    // Get multiple values from multiple select box
+    //TODO: 
+    var result = {
+        values: [],
+        titles: []
+    }
+        
+    for (var i = 0; i < element.options.length; i++) {
+        if (element.options[i].selected == true) {
+            result.values.push(element.options[i].value);
+            result.titles.push(element.options[i].text);
+        }
+    }
+    return result;
+}
+
+function addDataToList() {
+    // Take selected objects and add to shopping cart
+        
+    // set element
+    var element;
+    switch (currentlySelected.type){
+        case "Session":
+            element = ge("dbSessionInstancesList");
+            break;
+        case "Application":
+            element = ge("dbGamedataList");
+            break;
+        default:
+            // ???
+            break;
+    }
+    var uid;
+    while (uid = currentlySelected.uids.pop()) {
+        // Add to shopping cart
+        shoppingCart.contents.uids.push(uid);
+        shoppingCart.contents.titles.push(currentlySelected.titles.pop());
+        shoppingCart.contents.types.push(currentlySelected.type);
+        
+        // Remove option from list
+        for (var i = 0; i < element.options.length; i++) {
+            if (element.options[i].value == uid) {
+                element.remove(i);
+                break;
+            }
+        }
+    }
+    
+    // Then add display of shopping cart contents
+    drawShoppingCart();
+    
+}
+
+function removeFromList(event) {
+    if (event == null || event == undefined) return;
+    
+    var id = event.target.parentNode.id;
+    var uid = id.split("shoppingCartItem")[1];
+    // find index, remove from object
+    var indexInCart = shoppingCart.contents.uids.indexOf(uid);
+    var tempTitle = shoppingCart.contents.titles[indexInCart];
+    var cn = confirm("Are you sure you want to remove: "+tempTitle+"?");
+    if (cn == false) return;
+    
+    
+    shoppingCart.contents.uids.splice(indexInCart, 1);
+    var title = shoppingCart.contents.titles.splice(indexInCart, 1)[0];
+    var type = shoppingCart.contents.types.splice(indexInCart, 1)[0];
+    //Then replace element back into relevant list
+    // First set element
+        
+    var element;
+    switch (type){
+        case "Session":
+            element = ge("dbSessionInstancesList");
+            break;
+        case "Application":
+            element = ge("dbGamedataList");
+            break;
+        default:
+            // ???
+            break;
+    }
+    
+    var option = ce("option");
+    option.value = uid;
+    option.text = title;
+    element.add(option,null);
+    
+    
+    
+    // Lastly, refresh
+    drawShoppingCart();
+    }
+
+function drawShoppingCart() {
+        var scElement = ge("shoppingCartContent");
+        scElement.innerHTML = "";
+        for (var i = 0; i < shoppingCart.contents.uids.length; i++) {
+            var newLine = ce("div");
+            newLine.className = "shoppingCartItem";
+            newLine.id = "shoppingCartItem"+shoppingCart.contents.uids[i];
+            var icon = ce("image");
+            icon.src = "images/ui/DeleteIcon.gif";
+            icon.addEventListener("click", function(event){
+                // TODO: Actually write this function
+                removeFromList(event);
+            }, false);
+            var titleField = ce("text");
+            titleField.innerHTML = shoppingCart.contents.titles[i];
+            newLine.appendChild(icon);
+            newLine.appendChild(titleField);
+            scElement.appendChild(newLine);
+        }
+    
+        // reset type after empty
+        currentlySelected.type = null;
+    }
+    
+function configureDashboard() {
+    var data = JSON.stringify(shoppingCart);
+    var form = ce("form");
+    //changed to dashboardGraphSelection.php
+    form.action = "dashboardGraphSelection.php";
+    form.method = "POST";
+    var input = ce("input");
+    input.type = "hidden";
+    input.name = "selectedData";
+    input.value = data;
+    form.appendChild(input);
+    form.submit();
+}
Index: Dev/branches/Demo/js/generalScripts.js
===================================================================
--- Dev/branches/Demo/js/generalScripts.js	(revision 225)
+++ Dev/branches/Demo/js/generalScripts.js	(revision 225)
@@ -0,0 +1,156 @@
+/* 
+ * General functions, shared by most different scripts and elements.
+ */
+
+// Object literal version of a timer script, can be used to benchmark script running time.
+
+var timeDiff  =  {
+    setStartTime:function (){
+        d = new Date();
+        time  = d.getTime();
+    },
+
+    getDiff:function (){
+        d = new Date();
+        return (d.getTime()-time);
+    }
+}
+
+// Check if a certain HTMLElement has a given classname
+function hasClass(ele,cls) {
+    if (ele.className)
+        return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
+    
+}
+
+// Add a given classname to an HTMLElement
+function addClass(ele,cls) {
+    if (!this.hasClass(ele,cls)) ele.className += " "+cls;
+}
+
+// Remove a given class from an HTMLElement
+function removeClass(ele,cls) {
+    if (hasClass(ele,cls)) {
+        var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
+        ele.className=ele.className.replace(reg,' ');
+    }
+}
+
+// General function to handle AJAX functionality.
+// Specify the request string, url to send to, the function to execute on response and whether to run in the background or wait for a response before continuing.
+function newAjaxRequest(c, u, cb, async) {
+    var xml;
+    var content = c;    //an array of strings, in "key=value"  format.
+    // assign a compatible request format
+    if (window.XMLHttpRequest) {    //Not IE5, IE6
+        xml = new XMLHttpRequest();
+    }
+    else {                          //IE5, IE6
+        xml = new ActiveXObject("Microsoft.XMLHTTP");
+    }
+    // subscribe the callback function to a response event
+    xml.onreadystatechange = function() {
+        xml.responseText = "Processing...";
+        if (xml.readyState == 4 && xml.status == 200) {
+            cb(xml);
+        }
+    };
+    // initialize XMLRequest
+    xml.open("POST", u, async);
+    xml.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+    var contentString = "";
+    //iterate through parameters passed in variable c
+    if (typeof(content)=='object'&&(input instanceof Array)) {    // parameters were passed as an array of key=value strings
+        for (var i = 0; i < content.length; i++) {
+            contentString += content[i];
+            if (i != (content.length - 1)) {
+                contentString += "&";
+            }
+        }
+    }
+    else { // single parameter or string already formatted by calling function
+        contentString = content;
+    }
+    // finally send the formatted request
+    xml.send(contentString);
+}
+
+// Function that handles updating of info panel via AJAX getInfo.php. Currently operates on HTML to paste into #infoPanelContent, should eventually involve JSON arrays, to have more control over formatting.
+function ajaxInfoRequest(uid, el, type) {
+    // Info panel update.
+    
+    var c = "uid="+uid;
+    c += "&type="+type;
+    var u = "getInfo.php";
+    newAjaxRequest(c, u, function(result) {
+        el.innerHTML = result.responseText;
+    }, true);
+}
+
+// Function to save the object currently being edited.
+// !! Still needs to be generalized !!
+function saveObject (confirmSave) {
+    var answer = false;
+    if (confirmSave==true) {
+        answer = confirm("Save changes to pipeline?");
+    }
+    else {
+        answer = true;
+    }
+    
+    
+    if (answer == true) {
+        var pipeline = document.getElementById("pipelineStringField").value;
+        pipeline = pipeline.slice(0, pipeline.length - 1);
+        var types = document.getElementById("pipelineTypeField").value;
+        types = types.slice(0, types.length - 1);
+        var session = document.getElementById("sessionField").value;
+        var requestString = "uids="+pipeline+"&types="+types+"&sessionUid="+session;
+        console.log(requestString);
+        
+        
+        var success;
+        newAjaxRequest(requestString, "savesession.php", function(result){
+            success = result.responseText;
+        }, true);
+        console.log(success);
+    }
+}
+
+// Convert a string to an array and remove any empty items (from trailing commas)
+function stringToArray(s, c) {
+    var a = s.split(c);
+    for (var i = 0; i < a.length; i++) {    // remove empty items
+        if (a[i] == "") {
+            a.splice(i, 1);
+            i--;
+        }
+    }
+    return a;
+}
+
+// Convert an array to a string, separated by character "c"
+function arrayToString(a, c) {
+    var s = "";
+    for (var i = 0; i < a.length; i++) {
+        if (a[i] != "") {
+            s += a[i]+c;
+        }
+    }
+    return s;
+}
+
+// Remove all newlines, carriage returns and tabs from a given string
+function removeNL(s){ 
+    return s.replace(/[\n\r\t]/g,""); 
+}
+
+// Shorthand for document.createElement, because that pops up about three times every line of the main program
+function ce(s) {
+    return document.createElement(s);
+}
+
+// Shorthand for document.getElementById, same reason as above
+function ge(s) {
+    return document.getElementById(s);
+}
Index: Dev/branches/Demo/js/jquery.js
===================================================================
--- Dev/branches/Demo/js/jquery.js	(revision 225)
+++ Dev/branches/Demo/js/jquery.js	(revision 225)
@@ -0,0 +1,9046 @@
+/*!
+ * jQuery JavaScript Library v1.6.4
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Sep 12 18:54:48 2011 -0400
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+	navigator = window.navigator,
+	location = window.location;
+var jQuery = (function() {
+
+// 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, rootjQuery );
+	},
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// A simple way to check for HTML strings or ID strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+	// Check if a string has a non-whitespace character in it
+	rnotwhite = /\S/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Check for digits
+	rdigit = /\d/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// Matches dashed string for camelizing
+	rdashAlpha = /-([a-z]|[0-9])/ig,
+	rmsPrefix = /^-ms-/,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return ( letter + "" ).toUpperCase();
+	},
+
+	// Keep a UserAgent string for use with jQuery.browser
+	userAgent = navigator.userAgent,
+
+	// For matching the engine and version of the browser
+	browserMatch,
+
+	// The deferred used on DOM ready
+	readyList,
+
+	// The ready event handler
+	DOMContentLoaded,
+
+	// Save a reference to some core methods
+	toString = Object.prototype.toString,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+
+	// [[Class]] -> type pairs
+	class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		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;
+		}
+
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			// Are we dealing with HTML string or an ID?
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				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] ) {
+					context = context instanceof jQuery ? context[0] : context;
+					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 = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
+					}
+
+					return jQuery.merge( this, selector );
+
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// 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: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return (context || rootjQuery).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( 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.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.6.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[ this.length + num ] : 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 = this.constructor();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// 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;
+	},
+
+	// 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();
+
+		// Add the callback
+		readyList.done( 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 || this.constructor(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() {
+	var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// 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 plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// 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 ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// Either a released hold or an DOMready/load event and not yet ready
+		if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// If there are functions bound, to execute
+			readyList.resolveWith( document, [ jQuery ] );
+
+			// Trigger any bound ready events
+			if ( jQuery.fn.trigger ) {
+				jQuery( document ).trigger( "ready" ).unbind( "ready" );
+			}
+		}
+	},
+
+	bindReady: function() {
+		if ( readyList ) {
+			return;
+		}
+
+		readyList = jQuery._Deferred();
+
+		// Catch cases where $(document).ready() is called after the
+		// browser event has already occurred.
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// 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 jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	// A crude way of determining if an object is a window
+	isWindow: function( obj ) {
+		return obj && typeof obj === "object" && "setInterval" in obj;
+	},
+
+	isNaN: function( obj ) {
+		return obj == null || !rdigit.test( obj ) || isNaN( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	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 || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!hasOwn.call(obj, "constructor") &&
+				!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			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 || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw msg;
+	},
+
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+			.replace( rvalidtokens, "]" )
+			.replace( rvalidbraces, "")) ) {
+
+			return (new Function( "return " + data ))();
+
+		}
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && rnotwhite.test( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	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 ( ; i < length; ) {
+					if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return object;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// 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)
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type( array );
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				push.call( ret, array );
+			} else {
+				jQuery.merge( ret, array );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array ) {
+		if ( !array ) {
+			return -1;
+		}
+
+		if ( indexOf ) {
+			return indexOf.call( array, 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 = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value, key, ret = [],
+			i = 0,
+			length = elems.length,
+			// jquery objects are treated as arrays
+			isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( key in elems ) {
+				value = callback( elems[ key ], key, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return ret.concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		if ( typeof context === "string" ) {
+			var tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		var args = slice.call( arguments, 2 ),
+			proxy = function() {
+				return fn.apply( context, args.concat( slice.call( arguments ) ) );
+			};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, key, value, exec, fn, pass ) {
+		var length = elems.length;
+
+		// Setting many attributes
+		if ( typeof key === "object" ) {
+			for ( var k in key ) {
+				jQuery.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 ) : undefined;
+	},
+
+	now: function() {
+		return (new Date()).getTime();
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	sub: function() {
+		function jQuerySub( selector, context ) {
+			return new jQuerySub.fn.init( selector, context );
+		}
+		jQuery.extend( true, jQuerySub, this );
+		jQuerySub.superclass = this;
+		jQuerySub.fn = jQuerySub.prototype = this();
+		jQuerySub.fn.constructor = jQuerySub;
+		jQuerySub.sub = this.sub;
+		jQuerySub.fn.init = function init( selector, context ) {
+			if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+				context = jQuerySub( context );
+			}
+
+			return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+		};
+		jQuerySub.fn.init.prototype = jQuerySub.fn;
+		var rootjQuerySub = jQuerySub(document);
+		return jQuerySub;
+	},
+
+	browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+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;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// 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(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+var // Promise methods
+	promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
+	// Static reference to slice
+	sliceDeferred = [].slice;
+
+jQuery.extend({
+	// Create a simple deferred (one callbacks list)
+	_Deferred: function() {
+		var // callbacks list
+			callbacks = [],
+			// stored [ context , args ]
+			fired,
+			// to avoid firing when already doing so
+			firing,
+			// flag to know if the deferred has been cancelled
+			cancelled,
+			// the deferred itself
+			deferred  = {
+
+				// done( f1, f2, ...)
+				done: function() {
+					if ( !cancelled ) {
+						var args = arguments,
+							i,
+							length,
+							elem,
+							type,
+							_fired;
+						if ( fired ) {
+							_fired = fired;
+							fired = 0;
+						}
+						for ( i = 0, length = args.length; i < length; i++ ) {
+							elem = args[ i ];
+							type = jQuery.type( elem );
+							if ( type === "array" ) {
+								deferred.done.apply( deferred, elem );
+							} else if ( type === "function" ) {
+								callbacks.push( elem );
+							}
+						}
+						if ( _fired ) {
+							deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
+						}
+					}
+					return this;
+				},
+
+				// resolve with given context and args
+				resolveWith: function( context, args ) {
+					if ( !cancelled && !fired && !firing ) {
+						// make sure args are available (#8421)
+						args = args || [];
+						firing = 1;
+						try {
+							while( callbacks[ 0 ] ) {
+								callbacks.shift().apply( context, args );
+							}
+						}
+						finally {
+							fired = [ context, args ];
+							firing = 0;
+						}
+					}
+					return this;
+				},
+
+				// resolve with this as context and given arguments
+				resolve: function() {
+					deferred.resolveWith( this, arguments );
+					return this;
+				},
+
+				// Has this deferred been resolved?
+				isResolved: function() {
+					return !!( firing || fired );
+				},
+
+				// Cancel
+				cancel: function() {
+					cancelled = 1;
+					callbacks = [];
+					return this;
+				}
+			};
+
+		return deferred;
+	},
+
+	// Full fledged deferred (two callbacks list)
+	Deferred: function( func ) {
+		var deferred = jQuery._Deferred(),
+			failDeferred = jQuery._Deferred(),
+			promise;
+		// Add errorDeferred methods, then and promise
+		jQuery.extend( deferred, {
+			then: function( doneCallbacks, failCallbacks ) {
+				deferred.done( doneCallbacks ).fail( failCallbacks );
+				return this;
+			},
+			always: function() {
+				return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
+			},
+			fail: failDeferred.done,
+			rejectWith: failDeferred.resolveWith,
+			reject: failDeferred.resolve,
+			isRejected: failDeferred.isResolved,
+			pipe: function( fnDone, fnFail ) {
+				return jQuery.Deferred(function( newDefer ) {
+					jQuery.each( {
+						done: [ fnDone, "resolve" ],
+						fail: [ fnFail, "reject" ]
+					}, function( handler, data ) {
+						var fn = data[ 0 ],
+							action = data[ 1 ],
+							returned;
+						if ( jQuery.isFunction( fn ) ) {
+							deferred[ handler ](function() {
+								returned = fn.apply( this, arguments );
+								if ( returned && jQuery.isFunction( returned.promise ) ) {
+									returned.promise().then( newDefer.resolve, newDefer.reject );
+								} else {
+									newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+								}
+							});
+						} else {
+							deferred[ handler ]( newDefer[ action ] );
+						}
+					});
+				}).promise();
+			},
+			// Get a promise for this deferred
+			// If obj is provided, the promise aspect is added to the object
+			promise: function( obj ) {
+				if ( obj == null ) {
+					if ( promise ) {
+						return promise;
+					}
+					promise = obj = {};
+				}
+				var i = promiseMethods.length;
+				while( i-- ) {
+					obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
+				}
+				return obj;
+			}
+		});
+		// Make sure only one callback list will be used
+		deferred.done( failDeferred.cancel ).fail( deferred.cancel );
+		// Unexpose cancel
+		delete deferred.cancel;
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( firstParam ) {
+		var args = arguments,
+			i = 0,
+			length = args.length,
+			count = length,
+			deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+				firstParam :
+				jQuery.Deferred();
+		function resolveFunc( i ) {
+			return function( value ) {
+				args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				if ( !( --count ) ) {
+					// Strange bug in FF4:
+					// Values changed onto the arguments object sometimes end up as undefined values
+					// outside the $.when method. Cloning the object into a fresh array solves the issue
+					deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
+				}
+			};
+		}
+		if ( length > 1 ) {
+			for( ; i < length; i++ ) {
+				if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
+					args[ i ].promise().then( resolveFunc(i), deferred.reject );
+				} else {
+					--count;
+				}
+			}
+			if ( !count ) {
+				deferred.resolveWith( deferred, args );
+			}
+		} else if ( deferred !== firstParam ) {
+			deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+		}
+		return deferred.promise();
+	}
+});
+
+
+
+jQuery.support = (function() {
+
+	var div = document.createElement( "div" ),
+		documentElement = document.documentElement,
+		all,
+		a,
+		select,
+		opt,
+		input,
+		marginDiv,
+		support,
+		fragment,
+		body,
+		testElementParent,
+		testElement,
+		testElementStyle,
+		tds,
+		events,
+		eventName,
+		i,
+		isSupported;
+
+	// Preliminary tests
+	div.setAttribute("className", "t");
+	div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+
+	all = div.getElementsByTagName( "*" );
+	a = div.getElementsByTagName( "a" )[ 0 ];
+
+	// Can't get basic test support
+	if ( !all || !all.length || !a ) {
+		return {};
+	}
+
+	// First batch of supports tests
+	select = document.createElement( "select" );
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName( "input" )[ 0 ];
+
+	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 instead)
+		style: /top/.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: ( input.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: opt.selected,
+
+		// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+		getSetAttribute: div.className !== "t",
+
+		// Will be defined later
+		submitBubbles: true,
+		changeBubbles: true,
+		focusinBubbles: false,
+		deleteExpando: true,
+		noCloneEvent: true,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableMarginRight: true
+	};
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Test to see if it's possible to delete an expando from an element
+	// Fails in Internet Explorer
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+		div.attachEvent( "onclick", function() {
+			// Cloning a node shouldn't copy over any
+			// bound event handlers (IE does this)
+			support.noCloneEvent = false;
+		});
+		div.cloneNode( true ).fireEvent( "onclick" );
+	}
+
+	// Check if a radio maintains it's value
+	// after being appended to the DOM
+	input = document.createElement("input");
+	input.value = "t";
+	input.setAttribute("type", "radio");
+	support.radioValue = input.value === "t";
+
+	input.setAttribute("checked", "checked");
+	div.appendChild( input );
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( div.firstChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	div.innerHTML = "";
+
+	// Figure out if the W3C box model works as expected
+	div.style.width = div.style.paddingLeft = "1px";
+
+	body = document.getElementsByTagName( "body" )[ 0 ];
+	// We use our own, invisible, body unless the body is already present
+	// in which case we use a div (#9239)
+	testElement = document.createElement( body ? "div" : "body" );
+	testElementStyle = {
+		visibility: "hidden",
+		width: 0,
+		height: 0,
+		border: 0,
+		margin: 0,
+		background: "none"
+	};
+	if ( body ) {
+		jQuery.extend( testElementStyle, {
+			position: "absolute",
+			left: "-1000px",
+			top: "-1000px"
+		});
+	}
+	for ( i in testElementStyle ) {
+		testElement.style[ i ] = testElementStyle[ i ];
+	}
+	testElement.appendChild( div );
+	testElementParent = body || documentElement;
+	testElementParent.insertBefore( testElement, testElementParent.firstChild );
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	support.boxModel = div.offsetWidth === 2;
+
+	if ( "zoom" in div.style ) {
+		// Check if natively block-level elements act like inline-block
+		// elements when setting their display to 'inline' and giving
+		// them layout
+		// (IE < 8 does this)
+		div.style.display = "inline";
+		div.style.zoom = 1;
+		support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
+
+		// Check if elements with layout shrink-wrap their children
+		// (IE 6 does this)
+		div.style.display = "";
+		div.innerHTML = "<div style='width:4px;'></div>";
+		support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
+	}
+
+	div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
+	tds = div.getElementsByTagName( "td" );
+
+	// Check if table cells still have offsetWidth/Height when they are set
+	// to display:none and there are still other visible table cells in a
+	// table row; if so, offsetWidth/Height are not reliable for use when
+	// determining if an element has been hidden directly using
+	// display:none (it is still safe to use offsets if a parent element is
+	// hidden; don safety goggles and see bug #4512 for more information).
+	// (only IE 8 fails this test)
+	isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+	tds[ 0 ].style.display = "";
+	tds[ 1 ].style.display = "none";
+
+	// Check if empty table cells still have offsetWidth/Height
+	// (IE < 8 fail this test)
+	support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+	div.innerHTML = "";
+
+	// Check if div with explicit width and no margin-right incorrectly
+	// gets computed margin-right based on width of container. For more
+	// info see bug #3333
+	// Fails in WebKit before Feb 2011 nightlies
+	// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+	if ( document.defaultView && document.defaultView.getComputedStyle ) {
+		marginDiv = document.createElement( "div" );
+		marginDiv.style.width = "0";
+		marginDiv.style.marginRight = "0";
+		div.appendChild( marginDiv );
+		support.reliableMarginRight =
+			( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+	}
+
+	// Remove the body element we added
+	testElement.innerHTML = "";
+	testElementParent.removeChild( testElement );
+
+	// Technique from Juriy Zaytsev
+	// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+	// We only care about the case where non-standard event systems
+	// are used, namely in IE. Short-circuiting here helps us to
+	// avoid an eval call (in setAttribute) which can cause CSP
+	// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+	if ( div.attachEvent ) {
+		for( i in {
+			submit: 1,
+			change: 1,
+			focusin: 1
+		} ) {
+			eventName = "on" + i;
+			isSupported = ( eventName in div );
+			if ( !isSupported ) {
+				div.setAttribute( eventName, "return;" );
+				isSupported = ( typeof div[ eventName ] === "function" );
+			}
+			support[ i + "Bubbles" ] = isSupported;
+		}
+	}
+
+	// Null connected elements to avoid leaks in IE
+	testElement = fragment = select = opt = body = marginDiv = div = input = null;
+
+	return support;
+})();
+
+// Keep track of boxModel
+jQuery.boxModel = jQuery.support.boxModel;
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var thisCache, ret,
+			internalKey = jQuery.expando,
+			getByName = typeof name === "string",
+
+			// We have to handle DOM nodes and JS objects differently because IE6-7
+			// can't GC object references properly across the DOM-JS boundary
+			isNode = elem.nodeType,
+
+			// Only DOM nodes need the global jQuery cache; JS object data is
+			// attached directly to the object so GC can occur automatically
+			cache = isNode ? jQuery.cache : elem,
+
+			// Only defining an ID for JS objects if its cache already exists allows
+			// the code to shortcut on the same path as a DOM node with no cache
+			id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
+
+		// Avoid doing any more work than we need to when trying to get data on an
+		// object that has no data at all
+		if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) {
+			return;
+		}
+
+		if ( !id ) {
+			// Only DOM nodes need a new unique ID for each element since their data
+			// ends up in the global cache
+			if ( isNode ) {
+				elem[ jQuery.expando ] = id = ++jQuery.uuid;
+			} else {
+				id = jQuery.expando;
+			}
+		}
+
+		if ( !cache[ id ] ) {
+			cache[ id ] = {};
+
+			// TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+			// metadata on plain JS objects when the object is serialized using
+			// JSON.stringify
+			if ( !isNode ) {
+				cache[ id ].toJSON = jQuery.noop;
+			}
+		}
+
+		// An object can be passed to jQuery.data instead of a key/value pair; this gets
+		// shallow copied over onto the existing cache
+		if ( typeof name === "object" || typeof name === "function" ) {
+			if ( pvt ) {
+				cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
+			} else {
+				cache[ id ] = jQuery.extend(cache[ id ], name);
+			}
+		}
+
+		thisCache = cache[ id ];
+
+		// Internal jQuery data is stored in a separate object inside the object's data
+		// cache in order to avoid key collisions between internal data and user-defined
+		// data
+		if ( pvt ) {
+			if ( !thisCache[ internalKey ] ) {
+				thisCache[ internalKey ] = {};
+			}
+
+			thisCache = thisCache[ internalKey ];
+		}
+
+		if ( data !== undefined ) {
+			thisCache[ jQuery.camelCase( name ) ] = data;
+		}
+
+		// TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
+		// not attempt to inspect the internal events object using jQuery.data, as this
+		// internal data object is undocumented and subject to change.
+		if ( name === "events" && !thisCache[name] ) {
+			return thisCache[ internalKey ] && thisCache[ internalKey ].events;
+		}
+
+		// Check for both converted-to-camel and non-converted data property names
+		// If a data property was specified
+		if ( getByName ) {
+
+			// First Try to find as-is property data
+			ret = thisCache[ name ];
+
+			// Test for null|undefined property data
+			if ( ret == null ) {
+
+				// Try to find the camelCased property
+				ret = thisCache[ jQuery.camelCase( name ) ];
+			}
+		} else {
+			ret = thisCache;
+		}
+
+		return ret;
+	},
+
+	removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var thisCache,
+
+			// Reference to internal data cache key
+			internalKey = jQuery.expando,
+
+			isNode = elem.nodeType,
+
+			// See jQuery.data for more information
+			cache = isNode ? jQuery.cache : elem,
+
+			// See jQuery.data for more information
+			id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+		// If there is already no cache entry for this object, there is no
+		// purpose in continuing
+		if ( !cache[ id ] ) {
+			return;
+		}
+
+		if ( name ) {
+
+			thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
+
+			if ( thisCache ) {
+
+				// Support interoperable removal of hyphenated or camelcased keys
+				if ( !thisCache[ name ] ) {
+					name = jQuery.camelCase( name );
+				}
+
+				delete thisCache[ name ];
+
+				// If there is no data left in the cache, we want to continue
+				// and let the cache object itself get destroyed
+				if ( !isEmptyDataObject(thisCache) ) {
+					return;
+				}
+			}
+		}
+
+		// See jQuery.data for more information
+		if ( pvt ) {
+			delete cache[ id ][ internalKey ];
+
+			// Don't destroy the parent cache unless the internal data object
+			// had been the only thing left in it
+			if ( !isEmptyDataObject(cache[ id ]) ) {
+				return;
+			}
+		}
+
+		var internalCache = cache[ id ][ internalKey ];
+
+		// Browsers that fail expando deletion also refuse to delete expandos on
+		// the window, but it will allow it on all other JS objects; other browsers
+		// don't care
+		// Ensure that `cache` is not a window object #10080
+		if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+			delete cache[ id ];
+		} else {
+			cache[ id ] = null;
+		}
+
+		// We destroyed the entire user cache at once because it's faster than
+		// iterating through each key, but we need to continue to persist internal
+		// data if it existed
+		if ( internalCache ) {
+			cache[ id ] = {};
+			// TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
+			// metadata on plain JS objects when the object is serialized using
+			// JSON.stringify
+			if ( !isNode ) {
+				cache[ id ].toJSON = jQuery.noop;
+			}
+
+			cache[ id ][ internalKey ] = internalCache;
+
+		// Otherwise, we need to eliminate the expando on the node to avoid
+		// false lookups in the cache for entries that no longer exist
+		} else if ( isNode ) {
+			// IE does not allow us to delete expando properties from nodes,
+			// nor does it have a removeAttribute function on Document nodes;
+			// we must handle all of these cases
+			if ( jQuery.support.deleteExpando ) {
+				delete elem[ jQuery.expando ];
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( jQuery.expando );
+			} else {
+				elem[ jQuery.expando ] = null;
+			}
+		}
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return jQuery.data( elem, name, data, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var data = null;
+
+		if ( typeof key === "undefined" ) {
+			if ( this.length ) {
+				data = jQuery.data( this[0] );
+
+				if ( this[0].nodeType === 1 ) {
+			    var attr = this[0].attributes, name;
+					for ( var i = 0, l = attr.length; i < l; i++ ) {
+						name = attr[i].name;
+
+						if ( name.indexOf( "data-" ) === 0 ) {
+							name = jQuery.camelCase( name.substring(5) );
+
+							dataAttr( this[0], name, data[ name ] );
+						}
+					}
+				}
+			}
+
+			return data;
+
+		} 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 ) {
+			data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+			// Try to fetch any internally stored data first
+			if ( data === undefined && this.length ) {
+				data = jQuery.data( this[0], key );
+				data = dataAttr( this[0], key, data );
+			}
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+
+		} else {
+			return this.each(function() {
+				var $this = jQuery( this ),
+					args = [ parts[0], value ];
+
+				$this.triggerHandler( "setData" + parts[1] + "!", args );
+				jQuery.data( this, key, value );
+				$this.triggerHandler( "changeData" + parts[1] + "!", args );
+			});
+		}
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+				data === "false" ? false :
+				data === "null" ? null :
+				!jQuery.isNaN( data ) ? parseFloat( data ) :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+					data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
+// property to be considered empty objects; this property always exists in
+// order to make sure JSON.stringify does not expose internal metadata
+function isEmptyDataObject( obj ) {
+	for ( var name in obj ) {
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+	var deferDataKey = type + "defer",
+		queueDataKey = type + "queue",
+		markDataKey = type + "mark",
+		defer = jQuery.data( elem, deferDataKey, undefined, true );
+	if ( defer &&
+		( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
+		( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
+		// Give room for hard-coded callbacks to fire first
+		// and eventually mark/queue something else on the element
+		setTimeout( function() {
+			if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
+				!jQuery.data( elem, markDataKey, undefined, true ) ) {
+				jQuery.removeData( elem, deferDataKey, true );
+				defer.resolve();
+			}
+		}, 0 );
+	}
+}
+
+jQuery.extend({
+
+	_mark: function( elem, type ) {
+		if ( elem ) {
+			type = (type || "fx") + "mark";
+			jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
+		}
+	},
+
+	_unmark: function( force, elem, type ) {
+		if ( force !== true ) {
+			type = elem;
+			elem = force;
+			force = false;
+		}
+		if ( elem ) {
+			type = type || "fx";
+			var key = type + "mark",
+				count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
+			if ( count ) {
+				jQuery.data( elem, key, count, true );
+			} else {
+				jQuery.removeData( elem, key, true );
+				handleQueueMarkDefer( elem, type, "mark" );
+			}
+		}
+	},
+
+	queue: function( elem, type, data ) {
+		if ( elem ) {
+			type = (type || "fx") + "queue";
+			var q = jQuery.data( elem, type, undefined, true );
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !q || jQuery.isArray(data) ) {
+					q = jQuery.data( elem, type, jQuery.makeArray(data), true );
+				} else {
+					q.push( data );
+				}
+			}
+			return q || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			fn = queue.shift(),
+			defer;
+
+		// 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);
+			});
+		}
+
+		if ( !queue.length ) {
+			jQuery.removeData( elem, type + "queue", true );
+			handleQueueMarkDefer( elem, type, "queue" );
+		}
+	}
+});
+
+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() {
+			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", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, object ) {
+		if ( typeof type !== "string" ) {
+			object = type;
+			type = undefined;
+		}
+		type = type || "fx";
+		var defer = jQuery.Deferred(),
+			elements = this,
+			i = elements.length,
+			count = 1,
+			deferDataKey = type + "defer",
+			queueDataKey = type + "queue",
+			markDataKey = type + "mark",
+			tmp;
+		function resolve() {
+			if ( !( --count ) ) {
+				defer.resolveWith( elements, [ elements ] );
+			}
+		}
+		while( i-- ) {
+			if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+					( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+						jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+					jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
+				count++;
+				tmp.done( resolve );
+			}
+		}
+		resolve();
+		return defer.promise();
+	}
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+	rspace = /\s+/,
+	rreturn = /\r/g,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+	nodeHook, boolHook;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, name, value, true, jQuery.attr );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+	
+	prop: function( name, value ) {
+		return jQuery.access( this, name, value, true, jQuery.prop );
+	},
+	
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classNames, i, l, elem,
+			setClass, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( value && typeof value === "string" ) {
+			classNames = value.split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 ) {
+					if ( !elem.className && classNames.length === 1 ) {
+						elem.className = value;
+
+					} else {
+						setClass = " " + elem.className + " ";
+
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+								setClass += classNames[ c ] + " ";
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classNames, i, l, elem, className, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( (value && typeof value === "string") || value === undefined ) {
+			classNames = (value || "").split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 && elem.className ) {
+					if ( value ) {
+						className = (" " + elem.className + " ").replace( rclass, " " );
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							className = className.replace(" " + classNames[ c ] + " ", " ");
+						}
+						elem.className = jQuery.trim( className );
+
+					} 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 ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, 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].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var hooks, ret,
+			elem = this[0];
+		
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ? 
+					// handle most common string cases
+					ret.replace(rreturn, "") : 
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return undefined;
+		}
+
+		var isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var self = jQuery(this), val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, self.val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// attributes.value is undefined in Blackberry 4.7 but
+				// uses .value. See #6932
+				var val = elem.attributes.value;
+				return !val || val.specified ? elem.value : elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value,
+					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 ];
+
+					// Don't return options that are disabled or in a disabled optgroup
+					if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+							(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+						// Get the specific 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 );
+					}
+				}
+
+				// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+				if ( one && !values.length && options.length ) {
+					return jQuery( options[ index ] ).val();
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var values = jQuery.makeArray( value );
+
+				jQuery(elem).find("option").each(function() {
+					this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+				});
+
+				if ( !values.length ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attrFn: {
+		val: true,
+		css: true,
+		html: true,
+		text: true,
+		data: true,
+		width: true,
+		height: true,
+		offset: true
+	},
+	
+	attrFix: {
+		// Always normalize to ensure hook usage
+		tabindex: "tabIndex"
+	},
+	
+	attr: function( elem, name, value, pass ) {
+		var nType = elem.nodeType;
+		
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return undefined;
+		}
+
+		if ( pass && name in jQuery.attrFn ) {
+			return jQuery( elem )[ name ]( value );
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( !("getAttribute" in elem) ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		var ret, hooks,
+			notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		// Normalize the name if needed
+		if ( notxml ) {
+			name = jQuery.attrFix[ name ] || name;
+
+			hooks = jQuery.attrHooks[ name ];
+
+			if ( !hooks ) {
+				// Use boolHook for boolean attributes
+				if ( rboolean.test( name ) ) {
+					hooks = boolHook;
+
+				// Use nodeHook if available( IE6/7 )
+				} else if ( nodeHook ) {
+					hooks = nodeHook;
+				}
+			}
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+				return undefined;
+
+			} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, "" + value );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+
+			ret = elem.getAttribute( name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret === null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, name ) {
+		var propName;
+		if ( elem.nodeType === 1 ) {
+			name = jQuery.attrFix[ name ] || name;
+
+			jQuery.attr( elem, name, "" );
+			elem.removeAttribute( name );
+
+			// Set corresponding property to false for boolean attributes
+			if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
+				elem[ propName ] = false;
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				// We can't allow the type property to be changed (since it causes problems in IE)
+				if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+					jQuery.error( "type property can't be changed" );
+				} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to it's default in case type is set after value
+					// This is for element creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		},
+		// Use the value property for back compat
+		// Use the nodeHook for button elements in IE6/7 (#1954)
+		value: {
+			get: function( elem, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.get( elem, name );
+				}
+				return name in elem ?
+					elem.value :
+					null;
+			},
+			set: function( elem, value, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.set( elem, value, name );
+				}
+				// Does not return so that setAttribute is also used
+				elem.value = value;
+			}
+		}
+	},
+
+	propFix: {
+		tabindex: "tabIndex",
+		readonly: "readOnly",
+		"for": "htmlFor",
+		"class": "className",
+		maxlength: "maxLength",
+		cellspacing: "cellSpacing",
+		cellpadding: "cellPadding",
+		rowspan: "rowSpan",
+		colspan: "colSpan",
+		usemap: "useMap",
+		frameborder: "frameBorder",
+		contenteditable: "contentEditable"
+	},
+	
+	prop: function( elem, name, value ) {
+		var nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return undefined;
+		}
+
+		var ret, hooks,
+			notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				return (elem[ name ] = value);
+			}
+
+		} else {
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+				return ret;
+
+			} else {
+				return elem[ name ];
+			}
+		}
+	},
+	
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// 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/
+				var attributeNode = elem.getAttributeNode("tabindex");
+
+				return attributeNode && attributeNode.specified ?
+					parseInt( attributeNode.value, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						undefined;
+			}
+		}
+	}
+});
+
+// Add the tabindex propHook to attrHooks for back-compat
+jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+	get: function( elem, name ) {
+		// Align boolean attributes with corresponding properties
+		// Fall back to attribute presence where some booleans are not supported
+		var attrNode;
+		return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ?
+			name.toLowerCase() :
+			undefined;
+	},
+	set: function( elem, value, name ) {
+		var propName;
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else {
+			// value is true since we know at this point it's type boolean and not false
+			// Set boolean attributes to the same name and set the DOM property
+			propName = jQuery.propFix[ name ] || name;
+			if ( propName in elem ) {
+				// Only set the IDL specifically if it already exists on the element
+				elem[ propName ] = true;
+			}
+
+			elem.setAttribute( name, name.toLowerCase() );
+		}
+		return name;
+	}
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !jQuery.support.getSetAttribute ) {
+	
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret;
+			ret = elem.getAttributeNode( name );
+			// Return undefined if nodeValue is empty string
+			return ret && ret.nodeValue !== "" ?
+				ret.nodeValue :
+				undefined;
+		},
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				ret = document.createAttribute( name );
+				elem.setAttributeNode( ret );
+			}
+			return (ret.nodeValue = value + "");
+		}
+	};
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		});
+	});
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+	jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			get: function( elem ) {
+				var ret = elem.getAttribute( name, 2 );
+				return ret === null ? undefined : ret;
+			}
+		});
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Normalize to lowercase since IE uppercases css property names
+			return elem.style.cssText.toLowerCase() || undefined;
+		},
+		set: function( elem, value ) {
+			return (elem.style.cssText = "" + value);
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	});
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+	jQuery.each([ "radio", "checkbox" ], function() {
+		jQuery.valHooks[ this ] = {
+			get: function( elem ) {
+				// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+				return elem.getAttribute("value") === null ? "on" : elem.value;
+			}
+		};
+	});
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
+			}
+		}
+	});
+});
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+	rformElems = /^(?:textarea|input|select)$/i,
+	rperiod = /\./g,
+	rspaces = / /g,
+	rescape = /[^\w\s.|`]/g,
+	fcleanup = function( nm ) {
+		return nm.replace(rescape, "\\$&");
+	};
+
+/*
+ * 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;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		} else if ( !handler ) {
+			// Fixes bug #7229. Fix recommended by jdalton
+			return;
+		}
+
+		var handleObjIn, handleObj;
+
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+		}
+
+		// Make sure that the function being executed has a unique ID
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure
+		var elemData = jQuery._data( elem );
+
+		// If no elemData is found then we must be trying to bind to one of the
+		// banned noData elements
+		if ( !elemData ) {
+			return;
+		}
+
+		var events = elemData.events,
+			eventHandle = elemData.handle;
+
+		if ( !events ) {
+			elemData.events = events = {};
+		}
+
+		if ( !eventHandle ) {
+			elemData.handle = eventHandle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+		}
+
+		// Add elem as a property of the handle function
+		// This is to prevent a memory leak with non-native events in IE.
+		eventHandle.elem = elem;
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		var type, i = 0, namespaces;
+
+		while ( (type = types[ i++ ]) ) {
+			handleObj = handleObjIn ?
+				jQuery.extend({}, handleObjIn) :
+				{ handler: handler, data: data };
+
+			// Namespaced event handlers
+			if ( type.indexOf(".") > -1 ) {
+				namespaces = type.split(".");
+				type = namespaces.shift();
+				handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+			} else {
+				namespaces = [];
+				handleObj.namespace = "";
+			}
+
+			handleObj.type = type;
+			if ( !handleObj.guid ) {
+				handleObj.guid = handler.guid;
+			}
+
+			// Get the current list of functions bound to this event
+			var handlers = events[ type ],
+				special = jQuery.event.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, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add the function to the element's handler list
+			handlers.push( handleObj );
+
+			// Keep track of which events have been used, for event optimization
+			jQuery.event.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, pos ) {
+		// don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		if ( handler === false ) {
+			handler = returnFalse;
+		}
+
+		var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+			elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+			events = elemData && elemData.events;
+
+		if ( !elemData || !events ) {
+			return;
+		}
+
+		// types is actually an event object here
+		if ( types && types.type ) {
+			handler = types.handler;
+			types = types.type;
+		}
+
+		// Unbind all events for the element
+		if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+			types = types || "";
+
+			for ( type in events ) {
+				jQuery.event.remove( elem, type + types );
+			}
+
+			return;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).unbind("mouseover mouseout", fn);
+		types = types.split(" ");
+
+		while ( (type = types[ i++ ]) ) {
+			origType = type;
+			handleObj = null;
+			all = type.indexOf(".") < 0;
+			namespaces = [];
+
+			if ( !all ) {
+				// Namespaced event handlers
+				namespaces = type.split(".");
+				type = namespaces.shift();
+
+				namespace = new RegExp("(^|\\.)" +
+					jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+			}
+
+			eventType = events[ type ];
+
+			if ( !eventType ) {
+				continue;
+			}
+
+			if ( !handler ) {
+				for ( j = 0; j < eventType.length; j++ ) {
+					handleObj = eventType[ j ];
+
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						jQuery.event.remove( elem, origType, handleObj.handler, j );
+						eventType.splice( j--, 1 );
+					}
+				}
+
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+
+			for ( j = pos || 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( handler.guid === handleObj.guid ) {
+					// remove the given handler for the given type
+					if ( all || namespace.test( handleObj.namespace ) ) {
+						if ( pos == null ) {
+							eventType.splice( j--, 1 );
+						}
+
+						if ( special.remove ) {
+							special.remove.call( elem, handleObj );
+						}
+					}
+
+					if ( pos != null ) {
+						break;
+					}
+				}
+			}
+
+			// remove generic event handler if no more handlers exist
+			if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				ret = null;
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			var handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			delete elemData.events;
+			delete elemData.handle;
+
+			if ( jQuery.isEmptyObject( elemData ) ) {
+				jQuery.removeData( elem, undefined, true );
+			}
+		}
+	},
+	
+	// Events that are safe to short-circuit if no handlers are attached.
+	// Native DOM events should not be added, they may have inline handlers.
+	customEvent: {
+		"getData": true,
+		"setData": true,
+		"changeData": true
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		// Event object or event type
+		var type = event.type || event,
+			namespaces = [],
+			exclusive;
+
+		if ( type.indexOf("!") >= 0 ) {
+			// Exclusive events trigger only for the exact event (no namespaces)
+			type = type.slice(0, -1);
+			exclusive = true;
+		}
+
+		if ( type.indexOf(".") >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+
+		if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+			// No jQuery handlers for this event type, and it can't have inline handlers
+			return;
+		}
+
+		// Caller can pass in an Event, Object, or just an event type string
+		event = typeof event === "object" ?
+			// jQuery.Event object
+			event[ jQuery.expando ] ? event :
+			// Object literal
+			new jQuery.Event( type, event ) :
+			// Just the event type (string)
+			new jQuery.Event( type );
+
+		event.type = type;
+		event.exclusive = exclusive;
+		event.namespace = namespaces.join(".");
+		event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
+		
+		// triggerHandler() and global events don't bubble or run the default action
+		if ( onlyHandlers || !elem ) {
+			event.preventDefault();
+			event.stopPropagation();
+		}
+
+		// Handle a global trigger
+		if ( !elem ) {
+			// TODO: Stop taunting the data cache; remove global events and always attach to document
+			jQuery.each( jQuery.cache, function() {
+				// internalKey variable is just used to make it easier to find
+				// and potentially change this stuff later; currently it just
+				// points to jQuery.expando
+				var internalKey = jQuery.expando,
+					internalCache = this[ internalKey ];
+				if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
+					jQuery.event.trigger( event, data, internalCache.handle.elem );
+				}
+			});
+			return;
+		}
+
+		// Don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		event.target = elem;
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data != null ? jQuery.makeArray( data ) : [];
+		data.unshift( event );
+
+		var cur = elem,
+			// IE doesn't like method names with a colon (#3533, #8272)
+			ontype = type.indexOf(":") < 0 ? "on" + type : "";
+
+		// Fire event on the current element, then bubble up the DOM tree
+		do {
+			var handle = jQuery._data( cur, "handle" );
+
+			event.currentTarget = cur;
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+
+			// Trigger an inline bound script
+			if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
+				event.result = false;
+				event.preventDefault();
+			}
+
+			// Bubble up to document, then to window
+			cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
+		} while ( cur && !event.isPropagationStopped() );
+
+		// If nobody prevented the default action, do it now
+		if ( !event.isDefaultPrevented() ) {
+			var old,
+				special = jQuery.event.special[ type ] || {};
+
+			if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
+				!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name name as the event.
+				// Can't use an .isFunction)() check here because IE6/7 fails that test.
+				// IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
+				try {
+					if ( ontype && elem[ type ] ) {
+						// Don't re-trigger an onFOO event when we call its FOO() method
+						old = elem[ ontype ];
+
+						if ( old ) {
+							elem[ ontype ] = null;
+						}
+
+						jQuery.event.triggered = type;
+						elem[ type ]();
+					}
+				} catch ( ieError ) {}
+
+				if ( old ) {
+					elem[ ontype ] = old;
+				}
+
+				jQuery.event.triggered = undefined;
+			}
+		}
+		
+		return event.result;
+	},
+
+	handle: function( event ) {
+		event = jQuery.event.fix( event || window.event );
+		// Snapshot the handlers list since a called handler may add/remove events.
+		var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
+			run_all = !event.exclusive && !event.namespace,
+			args = Array.prototype.slice.call( arguments, 0 );
+
+		// Use the fix-ed Event rather than the (read-only) native event
+		args[0] = event;
+		event.currentTarget = this;
+
+		for ( var j = 0, l = handlers.length; j < l; j++ ) {
+			var handleObj = handlers[ j ];
+
+			// Triggered event must 1) be non-exclusive and have no namespace, or
+			// 2) have namespace(s) a subset or equal to those in the bound event.
+			if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
+				// Pass in a reference to the handler function itself
+				// So that we can later remove it
+				event.handler = handleObj.handler;
+				event.data = handleObj.data;
+				event.handleObj = handleObj;
+
+				var ret = handleObj.handler.apply( this, args );
+
+				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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+	fix: function( event ) {
+		if ( event[ jQuery.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 ) {
+			// Fixes #1925 where srcElement might not be defined either
+			event.target = event.srcElement || document;
+		}
+
+		// 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 eventDocument = event.target.ownerDocument || document,
+				doc = eventDocument.documentElement,
+				body = eventDocument.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 == null && (event.charCode != null || event.keyCode != null) ) {
+			event.which = event.charCode != null ? 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( handleObj ) {
+				jQuery.event.add( this,
+					liveConvert( handleObj.origType, handleObj.selector ),
+					jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
+			},
+
+			remove: function( handleObj ) {
+				jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+			}
+		},
+
+		beforeunload: {
+			setup: function( data, namespaces, eventHandle ) {
+				// We only want to do this special case on windows
+				if ( jQuery.isWindow( this ) ) {
+					this.onbeforeunload = eventHandle;
+				}
+			},
+
+			teardown: function( namespaces, eventHandle ) {
+				if ( this.onbeforeunload === eventHandle ) {
+					this.onbeforeunload = null;
+				}
+			}
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		if ( elem.detachEvent ) {
+			elem.detachEvent( "on" + type, handle );
+		}
+	};
+
+jQuery.Event = function( src, props ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !this.preventDefault ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
+			src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// timeStamp is buggy for some events on Firefox(#3843)
+	// So we won't rely on the native value
+	this.timeStamp = jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.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)
+		} else {
+			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 related = event.relatedTarget,
+		inside = false,
+		eventType = event.type;
+
+	event.type = event.data;
+
+	if ( related !== this ) {
+
+		if ( related ) {
+			inside = jQuery.contains( this, related );
+		}
+
+		if ( !inside ) {
+
+			jQuery.event.handle.apply( this, arguments );
+
+			event.type = eventType;
+		}
+	}
+},
+
+// 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 ) {
+			if ( !jQuery.nodeName( this, "form" ) ) {
+				jQuery.event.add(this, "click.specialSubmit", function( e ) {
+					// Avoid triggering error on non-existent type attribute in IE VML (#7071)
+					var elem = e.target,
+						type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : "";
+
+					if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+						trigger( "submit", this, arguments );
+					}
+				});
+
+				jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+					var elem = e.target,
+						type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : "";
+
+					if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+						trigger( "submit", this, arguments );
+					}
+				});
+
+			} else {
+				return false;
+			}
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialSubmit" );
+		}
+	};
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+	var changeFilters,
+
+	getVal = function( elem ) {
+		var type = jQuery.nodeName( elem, "input" ) ? 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 ( jQuery.nodeName( elem, "select" ) ) {
+			val = elem.selectedIndex;
+		}
+
+		return val;
+	},
+
+	testChange = function testChange( e ) {
+		var elem = e.target, data, val;
+
+		if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+			return;
+		}
+
+		data = jQuery._data( elem, "_change_data" );
+		val = getVal(elem);
+
+		// the current data will be also retrieved by beforeactivate
+		if ( e.type !== "focusout" || elem.type !== "radio" ) {
+			jQuery._data( elem, "_change_data", val );
+		}
+
+		if ( data === undefined || val === data ) {
+			return;
+		}
+
+		if ( data != null || val ) {
+			e.type = "change";
+			e.liveFired = undefined;
+			jQuery.event.trigger( e, arguments[1], elem );
+		}
+	};
+
+	jQuery.event.special.change = {
+		filters: {
+			focusout: testChange,
+
+			beforedeactivate: testChange,
+
+			click: function( e ) {
+				var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
+
+				if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
+					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 = jQuery.nodeName( elem, "input" ) ? elem.type : "";
+
+				if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
+					(e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+					type === "select-multiple" ) {
+					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
+			beforeactivate: function( e ) {
+				var elem = e.target;
+				jQuery._data( elem, "_change_data", getVal(elem) );
+			}
+		},
+
+		setup: function( data, namespaces ) {
+			if ( this.type === "file" ) {
+				return false;
+			}
+
+			for ( var type in changeFilters ) {
+				jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+			}
+
+			return rformElems.test( this.nodeName );
+		},
+
+		teardown: function( namespaces ) {
+			jQuery.event.remove( this, ".specialChange" );
+
+			return rformElems.test( this.nodeName );
+		}
+	};
+
+	changeFilters = jQuery.event.special.change.filters;
+
+	// Handle when the input is .focus()'d
+	changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+	// Piggyback on a donor event to simulate a different one.
+	// Fake originalEvent to avoid donor's stopPropagation, but if the
+	// simulated event prevents default then we do the same on the donor.
+	// Don't pass args or remember liveFired; they apply to the donor event.
+	var event = jQuery.extend( {}, args[ 0 ] );
+	event.type = type;
+	event.originalEvent = {};
+	event.liveFired = undefined;
+	jQuery.event.handle.call( elem, event );
+	if ( event.isDefaultPrevented() ) {
+		args[ 0 ].preventDefault();
+	}
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler while someone wants focusin/focusout
+		var attaches = 0;
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( attaches++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			},
+			teardown: function() {
+				if ( --attaches === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+
+		function handler( donor ) {
+			// Donor event is always a native one; fix it and switch its type.
+			// Let focusin/out handler cancel the donor focus/blur event.
+			var e = jQuery.event.fix( donor );
+			e.type = fix;
+			e.originalEvent = {};
+			jQuery.event.trigger( e, null, e.target );
+			if ( e.isDefaultPrevented() ) {
+				donor.preventDefault();
+			}
+		}
+	});
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+	jQuery.fn[ name ] = function( type, data, fn ) {
+		var handler;
+
+		// Handle object literals
+		if ( typeof type === "object" ) {
+			for ( var key in type ) {
+				this[ name ](key, data, type[key], fn);
+			}
+			return this;
+		}
+
+		if ( arguments.length === 2 || data === false ) {
+			fn = data;
+			data = undefined;
+		}
+
+		if ( name === "one" ) {
+			handler = function( event ) {
+				jQuery( this ).unbind( event, handler );
+				return fn.apply( this, arguments );
+			};
+			handler.guid = fn.guid || jQuery.guid++;
+		} else {
+			handler = fn;
+		}
+
+		if ( type === "unload" && name !== "one" ) {
+			this.one( type, data, fn );
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.add( this[i], type, handler, data );
+			}
+		}
+
+		return this;
+	};
+});
+
+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]);
+			}
+
+		} else {
+			for ( var i = 0, l = this.length; i < l; i++ ) {
+				jQuery.event.remove( this[i], type, fn );
+			}
+		}
+
+		return this;
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.live( types, data, fn, selector );
+	},
+
+	undelegate: function( selector, types, fn ) {
+		if ( arguments.length === 0 ) {
+			return this.unbind( "live" );
+
+		} else {
+			return this.die( types, null, fn, selector );
+		}
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+
+	triggerHandler: function( type, data ) {
+		if ( this[0] ) {
+			return jQuery.event.trigger( type, data, this[0], true );
+		}
+	},
+
+	toggle: function( fn ) {
+		// Save reference to arguments for access in closure
+		var args = arguments,
+			guid = fn.guid || jQuery.guid++,
+			i = 0,
+			toggler = 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;
+			};
+
+		// link all the functions, so any of them can unbind this click handler
+		toggler.guid = guid;
+		while ( i < args.length ) {
+			args[ i++ ].guid = guid;
+		}
+
+		return this.click( toggler );
+	},
+
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	}
+});
+
+var liveMap = {
+	focus: "focusin",
+	blur: "focusout",
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+	jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+		var type, i = 0, match, namespaces, preType,
+			selector = origSelector || this.selector,
+			context = origSelector ? this : jQuery( this.context );
+
+		if ( typeof types === "object" && !types.preventDefault ) {
+			for ( var key in types ) {
+				context[ name ]( key, data, types[key], selector );
+			}
+
+			return this;
+		}
+
+		if ( name === "die" && !types &&
+					origSelector && origSelector.charAt(0) === "." ) {
+
+			context.unbind( origSelector );
+
+			return this;
+		}
+
+		if ( data === false || jQuery.isFunction( data ) ) {
+			fn = data || returnFalse;
+			data = undefined;
+		}
+
+		types = (types || "").split(" ");
+
+		while ( (type = types[ i++ ]) != null ) {
+			match = rnamespaces.exec( type );
+			namespaces = "";
+
+			if ( match )  {
+				namespaces = match[0];
+				type = type.replace( rnamespaces, "" );
+			}
+
+			if ( type === "hover" ) {
+				types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+				continue;
+			}
+
+			preType = type;
+
+			if ( liveMap[ type ] ) {
+				types.push( liveMap[ type ] + namespaces );
+				type = type + namespaces;
+
+			} else {
+				type = (liveMap[ type ] || type) + namespaces;
+			}
+
+			if ( name === "live" ) {
+				// bind live handler
+				for ( var j = 0, l = context.length; j < l; j++ ) {
+					jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+						{ data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+				}
+
+			} else {
+				// unbind live handler
+				context.unbind( "live." + liveConvert( type, selector ), fn );
+			}
+		}
+
+		return this;
+	};
+});
+
+function liveHandler( event ) {
+	var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+		elems = [],
+		selectors = [],
+		events = jQuery._data( this, "events" );
+
+	// Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
+	if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
+		return;
+	}
+
+	if ( event.namespace ) {
+		namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+	}
+
+	event.liveFired = this;
+
+	var live = events.live.slice(0);
+
+	for ( j = 0; j < live.length; j++ ) {
+		handleObj = live[j];
+
+		if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+			selectors.push( handleObj.selector );
+
+		} else {
+			live.splice( j--, 1 );
+		}
+	}
+
+	match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+	for ( i = 0, l = match.length; i < l; i++ ) {
+		close = match[i];
+
+		for ( j = 0; j < live.length; j++ ) {
+			handleObj = live[j];
+
+			if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
+				elem = close.elem;
+				related = null;
+
+				// Those two events require additional checking
+				if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+					event.type = handleObj.preType;
+					related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+
+					// Make sure not to accidentally match a child element with the same selector
+					if ( related && jQuery.contains( elem, related ) ) {
+						related = elem;
+					}
+				}
+
+				if ( !related || related !== elem ) {
+					elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+				}
+			}
+		}
+	}
+
+	for ( i = 0, l = elems.length; i < l; i++ ) {
+		match = elems[i];
+
+		if ( maxLevel && match.level > maxLevel ) {
+			break;
+		}
+
+		event.currentTarget = match.elem;
+		event.data = match.handleObj.data;
+		event.handleObj = match.handleObj;
+
+		ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+		if ( ret === false || event.isPropagationStopped() ) {
+			maxLevel = match.level;
+
+			if ( ret === false ) {
+				stop = false;
+			}
+			if ( event.isImmediatePropagationStopped() ) {
+				break;
+			}
+		}
+	}
+
+	return stop;
+}
+
+function liveConvert( type, selector ) {
+	return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
+}
+
+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( data, fn ) {
+		if ( fn == null ) {
+			fn = data;
+			data = null;
+		}
+
+		return arguments.length > 0 ?
+			this.bind( name, data, fn ) :
+			this.trigger( name );
+	};
+
+	if ( jQuery.attrFn ) {
+		jQuery.attrFn[ name ] = true;
+	}
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, 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,
+	rBackslash = /\\/g,
+	rNonWord = /\W/;
+
+// 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 || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+	
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var m, set, checkSet, extra, ret, cur, pop, i,
+		prune = true,
+		contextXML = Sizzle.isXML( context ),
+		parts = [],
+		soFar = selector;
+	
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec( "" );
+		m = chunker.exec( soFar );
+
+		if ( m ) {
+			soFar = m[3];
+		
+			parts.push( m[1] );
+		
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	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]) ) {
+
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set )[0] :
+				ret.set[0];
+		}
+
+		if ( context ) {
+			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 ) {
+				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 ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+
+		} else {
+			for ( 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.matchesSelector = function( node, expr ) {
+	return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+	var set;
+
+	if ( !expr ) {
+		return [];
+	}
+
+	for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+		var match,
+			type = Expr.order[i];
+		
+		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( rBackslash, "" );
+				set = Expr.find[ type ]( match, context, isXML );
+
+				if ( set != null ) {
+					expr = expr.replace( Expr.match[ type ], "" );
+					break;
+				}
+			}
+		}
+	}
+
+	if ( !set ) {
+		set = typeof context.getElementsByTagName !== "undefined" ?
+			context.getElementsByTagName( "*" ) :
+			[];
+	}
+
+	return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+	var match, anyFound,
+		old = expr,
+		result = [],
+		curLoop = set,
+		isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+	while ( expr && set.length ) {
+		for ( var type in Expr.filter ) {
+			if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+				var found, item,
+					filter = Expr.filter[ type ],
+					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 ) {
+				Sizzle.error( expr );
+
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw "Syntax error, unrecognized expression: " + msg;
+};
+
+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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+		CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+		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" );
+		},
+		type: function( elem ) {
+			return elem.getAttribute( "type" );
+		}
+	},
+
+	relative: {
+		"+": function(checkSet, part){
+			var isPartStr = typeof part === "string",
+				isTag = isPartStr && !rNonWord.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 elem,
+				isPartStr = typeof part === "string",
+				i = 0,
+				l = checkSet.length;
+
+			if ( isPartStr && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+
+			} else {
+				for ( ; i < l; i++ ) {
+					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 nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+		},
+
+		"~": function( checkSet, part, isXML ) {
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				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]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [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 ) {
+			if ( typeof context.getElementsByTagName !== "undefined" ) {
+				return context.getElementsByTagName( match[1] );
+			}
+		}
+	},
+	preFilter: {
+		CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+			match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+			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\r]/g, " ").indexOf(match) >= 0) ) {
+						if ( !inplace ) {
+							result.push( elem );
+						}
+
+					} else if ( inplace ) {
+						curLoop[i] = false;
+					}
+				}
+			}
+
+			return false;
+		},
+
+		ID: function( match ) {
+			return match[1].replace( rBackslash, "" );
+		},
+
+		TAG: function( match, curLoop ) {
+			return match[1].replace( rBackslash, "" ).toLowerCase();
+		},
+
+		CHILD: function( match ) {
+			if ( match[1] === "nth" ) {
+				if ( !match[2] ) {
+					Sizzle.error( match[0] );
+				}
+
+				match[2] = match[2].replace(/^\+|\s*/g, '');
+
+				// 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;
+			}
+			else if ( match[2] ) {
+				Sizzle.error( match[0] );
+			}
+
+			// TODO: Move to normal caching system
+			match[0] = done++;
+
+			return match;
+		},
+
+		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+			var name = match[1] = match[1].replace( rBackslash, "" );
+			
+			if ( !isXML && Expr.attrMap[name] ) {
+				match[1] = Expr.attrMap[name];
+			}
+
+			// Handle if an un-quoted value was used
+			match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+			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
+			if ( elem.parentNode ) {
+				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 ) {
+			var attr = elem.getAttribute( "type" ), type = elem.type;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+		},
+
+		radio: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+		},
+
+		checkbox: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+		},
+
+		file: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+		},
+
+		password: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+		},
+
+		submit: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return (name === "input" || name === "button") && "submit" === elem.type;
+		},
+
+		image: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+		},
+
+		reset: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return (name === "input" || name === "button") && "reset" === elem.type;
+		},
+
+		button: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && "button" === elem.type || name === "button";
+		},
+
+		input: function( elem ) {
+			return (/input|select|textarea|button/i).test( elem.nodeName );
+		},
+
+		focus: function( elem ) {
+			return elem === elem.ownerDocument.activeElement;
+		}
+	},
+	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 || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+
+			} else {
+				Sizzle.error( 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,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+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, fescape) );
+}
+
+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.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+	makeArray = function( array, results ) {
+		var i = 0,
+			ret = results || [];
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+
+} else {
+	sortOrder = function( a, b ) {
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Fallback to using sourceIndex (in IE) if it's available on both nodes
+		} else if ( a.sourceIndex && b.sourceIndex ) {
+			return a.sourceIndex - b.sourceIndex;
+		}
+
+		var al, bl,
+			ap = [],
+			bp = [],
+			aup = a.parentNode,
+			bup = b.parentNode,
+			cur = aup;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( 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 += Sizzle.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(),
+		root = document.documentElement;
+
+	form.innerHTML = "<a name='" + id + "'/>";
+
+	// Inject it into the root element, check its status, and remove it quickly
+	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 );
+
+	// release memory in IE
+	root = form = null;
+})();
+
+(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 );
+		};
+	}
+
+	// release memory in IE
+	div = null;
+})();
+
+if ( document.querySelectorAll ) {
+	(function(){
+		var oldSizzle = Sizzle,
+			div = document.createElement("div"),
+			id = "__sizzle__";
+
+		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 && !Sizzle.isXML(context) ) {
+				// See if we find a selector to speed up
+				var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+				
+				if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+					// Speed-up: Sizzle("TAG")
+					if ( match[1] ) {
+						return makeArray( context.getElementsByTagName( query ), extra );
+					
+					// Speed-up: Sizzle(".CLASS")
+					} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+						return makeArray( context.getElementsByClassName( match[2] ), extra );
+					}
+				}
+				
+				if ( context.nodeType === 9 ) {
+					// Speed-up: Sizzle("body")
+					// The body element only exists once, optimize finding it
+					if ( query === "body" && context.body ) {
+						return makeArray( [ context.body ], extra );
+						
+					// Speed-up: Sizzle("#ID")
+					} else if ( match && match[3] ) {
+						var elem = context.getElementById( match[3] );
+
+						// Check parentNode to catch when Blackberry 4.6 returns
+						// nodes that are no longer in the document #6963
+						if ( elem && elem.parentNode ) {
+							// Handle the case where IE and Opera return items
+							// by name instead of ID
+							if ( elem.id === match[3] ) {
+								return makeArray( [ elem ], extra );
+							}
+							
+						} else {
+							return makeArray( [], extra );
+						}
+					}
+					
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var oldContext = context,
+						old = context.getAttribute( "id" ),
+						nid = old || id,
+						hasParent = context.parentNode,
+						relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+					if ( !old ) {
+						context.setAttribute( "id", nid );
+					} else {
+						nid = nid.replace( /'/g, "\\$&" );
+					}
+					if ( relativeHierarchySelector && hasParent ) {
+						context = context.parentNode;
+					}
+
+					try {
+						if ( !relativeHierarchySelector || hasParent ) {
+							return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+						}
+
+					} catch(pseudoError) {
+					} finally {
+						if ( !old ) {
+							oldContext.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		// release memory in IE
+		div = null;
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+	if ( matches ) {
+		// Check to see if it's possible to do matchesSelector
+		// on a disconnected node (IE 9 fails this)
+		var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+			pseudoWorks = false;
+
+		try {
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( document.documentElement, "[test!='']:sizzle" );
+	
+		} catch( pseudoError ) {
+			pseudoWorks = true;
+		}
+
+		Sizzle.matchesSelector = function( node, expr ) {
+			// Make sure that attribute selectors are quoted
+			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			if ( !Sizzle.isXML( node ) ) {
+				try { 
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+						var ret = matches.call( node, expr );
+
+						// IE 9's matchesSelector returns false on disconnected nodes
+						if ( ret || !disconnectedMatch ||
+								// As well, disconnected nodes are said to be in a document
+								// fragment in IE 9, so check for that
+								node.document && node.document.nodeType !== 11 ) {
+							return ret;
+						}
+					}
+				} catch(e) {}
+			}
+
+			return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(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]);
+		}
+	};
+
+	// release memory in IE
+	div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			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 ) {
+			var match = false;
+			
+			elem = elem[dir];
+
+			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;
+		}
+	}
+}
+
+if ( document.documentElement.contains ) {
+	Sizzle.contains = function( a, b ) {
+		return a !== b && (a.contains ? a.contains(b) : true);
+	};
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+	Sizzle.contains = function( a, b ) {
+		return !!(a.compareDocumentPosition(b) & 16);
+	};
+
+} else {
+	Sizzle.contains = function() {
+		return false;
+	};
+}
+
+Sizzle.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 match,
+		tmpSet = [],
+		later = "",
+		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.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+	// Note: This RegExp should be improved, or likely pulled from Sizzle
+	rmultiselector = /,/,
+	isSimple = /^.[^:#\[\.,]*$/,
+	slice = Array.prototype.slice,
+	POS = jQuery.expr.match.POS,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var self = this,
+			i, l;
+
+		if ( typeof selector !== "string" ) {
+			return jQuery( selector ).filter(function() {
+				for ( i = 0, l = self.length; i < l; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			});
+		}
+
+		var ret = this.pushStack( "", "find", selector ),
+			length, n, r;
+
+		for ( 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 ( n = length; n < ret.length; n++ ) {
+					for ( 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 && ( typeof selector === "string" ?
+			jQuery.filter( selector, this ).length > 0 :
+			this.filter( selector ).length > 0 );
+	},
+
+	closest: function( selectors, context ) {
+		var ret = [], i, l, cur = this[0];
+		
+		// Array
+		if ( jQuery.isArray( selectors ) ) {
+			var match, selector,
+				matches = {},
+				level = 1;
+
+			if ( cur && selectors.length ) {
+				for ( i = 0, l = selectors.length; i < l; i++ ) {
+					selector = selectors[i];
+
+					if ( !matches[ selector ] ) {
+						matches[ selector ] = 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, level: level });
+						}
+					}
+
+					cur = cur.parentNode;
+					level++;
+				}
+			}
+
+			return ret;
+		}
+
+		// String
+		var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			cur = this[i];
+
+			while ( cur ) {
+				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+					ret.push( cur );
+					break;
+
+				} else {
+					cur = cur.parentNode;
+					if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+						break;
+					}
+				}
+			}
+		}
+
+		ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+		return this.pushStack( ret, "closest", selectors );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// 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 ) :
+				jQuery.makeArray( selector && selector.nodeType ? [ selector ] : 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 ),
+			// The variable 'args' was introduced in
+			// https://github.com/jquery/jquery/commit/52a0238
+			// to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
+			// http://code.google.com/p/v8/issues/detail?id=1050
+			args = slice.call(arguments);
+
+		if ( !runtil.test( name ) ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+		if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+			ret = ret.reverse();
+		}
+
+		return this.pushStack( ret, name, args.join(",") );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 ?
+			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+			jQuery.find.matches(expr, elems);
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !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;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+	// Can't pass null or undefined to indexOf in Firefox 4
+	// Set to 0 to skip string check
+	qualifier = qualifier || 0;
+
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			var retVal = !!qualifier.call( elem, i, elem );
+			return retVal === 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, filtered );
+		}
+	}
+
+	return jQuery.grep(elements, function( elem, i ) {
+		return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+	});
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnocache = /<(?:script|object|embed|option|style)/i,
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptType = /\/(java|ecma)script/i,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+	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 );
+
+				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.text( 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 ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		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;
+		}
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+				if ( !keepData && elem.nodeType === 1 ) {
+					jQuery.cleanData( elem.getElementsByTagName("*") );
+					jQuery.cleanData( [ elem ] );
+				}
+
+				if ( elem.parentNode ) {
+					elem.parentNode.removeChild( elem );
+				}
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( elem.getElementsByTagName("*") );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	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" && !rnocache.test( value ) &&
+			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+			value = value.replace(rxhtmlTag, "<$1></$2>");
+
+			try {
+				for ( var i = 0, l = this.length; i < l; i++ ) {
+					// Remove element nodes and prevent memory leaks
+					if ( this[i].nodeType === 1 ) {
+						jQuery.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 );
+
+				self.html( value.call(this, i, self.html()) );
+			});
+
+		} 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 ) ) {
+				return this.each(function(i) {
+					var self = jQuery(this), old = self.html();
+					self.replaceWith( value.call( this, i, old ) );
+				});
+			}
+
+			if ( typeof value !== "string" ) {
+				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.length ?
+				this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+				this;
+		}
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, table, callback ) {
+		var results, first, fragment, parent,
+			value = args[0],
+			scripts = [];
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+			return this.each(function() {
+				jQuery(this).domManip( args, table, callback, true );
+			});
+		}
+
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				args[0] = value.call(this, i, table ? self.html() : undefined);
+				self.domManip( args, table, callback );
+			});
+		}
+
+		if ( this[0] ) {
+			parent = value && value.parentNode;
+
+			// If we're in a fragment, just use that instead of building a new one
+			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+				results = { fragment: parent };
+
+			} else {
+				results = jQuery.buildFragment( args, this, scripts );
+			}
+
+			fragment = results.fragment;
+
+			if ( fragment.childNodes.length === 1 ) {
+				first = fragment = fragment.firstChild;
+			} else {
+				first = fragment.firstChild;
+			}
+
+			if ( first ) {
+				table = table && jQuery.nodeName( first, "tr" );
+
+				for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+					callback.call(
+						table ?
+							root(this[i], first) :
+							this[i],
+						// Make sure that we do not leak memory by inadvertently discarding
+						// the original fragment (which might have attached data) instead of
+						// using it; in addition, use the original fragment object for the last
+						// item instead of first because it can end up being emptied incorrectly
+						// in certain situations (Bug #8070).
+						// Fragments from the fragment cache must always be cloned and never used
+						// in place.
+						results.cacheable || (l > 1 && i < lastIndex) ?
+							jQuery.clone( fragment, true, true ) :
+							fragment
+					);
+				}
+			}
+
+			if ( scripts.length ) {
+				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( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var internalKey = jQuery.expando,
+		oldData = jQuery.data( src ),
+		curData = jQuery.data( dest, oldData );
+
+	// Switch to use the internal data object, if it exists, for the next
+	// stage of data copying
+	if ( (oldData = oldData[ internalKey ]) ) {
+		var events = oldData.events;
+				curData = curData[ internalKey ] = jQuery.extend({}, oldData);
+
+		if ( events ) {
+			delete curData.handle;
+			curData.events = {};
+
+			for ( var type in events ) {
+				for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
+					jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
+				}
+			}
+		}
+	}
+}
+
+function cloneFixAttributes( src, dest ) {
+	var nodeName;
+
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	// clearAttributes removes the attributes, which we don't want,
+	// but also removes the attachEvent events, which we *do* want
+	if ( dest.clearAttributes ) {
+		dest.clearAttributes();
+	}
+
+	// mergeAttributes, in contrast, only merges back on the
+	// original attributes, not the events
+	if ( dest.mergeAttributes ) {
+		dest.mergeAttributes( src );
+	}
+
+	nodeName = dest.nodeName.toLowerCase();
+
+	// IE6-8 fail to clone children inside object elements that use
+	// the proprietary classid attribute value (rather than the type
+	// attribute) to identify the type of content to display
+	if ( nodeName === "object" ) {
+		dest.outerHTML = src.outerHTML;
+
+	} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+		if ( src.checked ) {
+			dest.defaultChecked = dest.checked = src.checked;
+		}
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+
+	// Event data gets referenced instead of copied if the expando
+	// gets copied too
+	dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+	var fragment, cacheable, cacheresults, doc;
+
+  // nodes may contain either an explicit document object,
+  // a jQuery collection or context object.
+  // If nodes[0] contains a valid object to assign to doc
+  if ( nodes && nodes[0] ) {
+    doc = nodes[0].ownerDocument || nodes[0];
+  }
+
+  // Ensure that an attr object doesn't incorrectly stand in as a document object
+	// Chrome and Firefox seem to allow this to occur and will throw exception
+	// Fixes #8950
+	if ( !doc.createDocumentFragment ) {
+		doc = document;
+	}
+
+	// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+	// Cloning options loses the selected state, so don't cache them
+	// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+	// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+	if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+		args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+		cacheable = true;
+
+		cacheresults = jQuery.fragments[ args[0] ];
+		if ( cacheresults && cacheresults !== 1 ) {
+			fragment = cacheresults;
+		}
+	}
+
+	if ( !fragment ) {
+		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 ),
+			parent = this.length === 1 && this[0].parentNode;
+
+		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+			insert[ original ]( this[0] );
+			return this;
+
+		} else {
+			for ( var i = 0, l = insert.length; i < l; i++ ) {
+				var elems = (i > 0 ? this.clone(true) : this).get();
+				jQuery( insert[i] )[ original ]( elems );
+				ret = ret.concat( elems );
+			}
+
+			return this.pushStack( ret, name, insert.selector );
+		}
+	};
+});
+
+function getAll( elem ) {
+	if ( "getElementsByTagName" in elem ) {
+		return elem.getElementsByTagName( "*" );
+
+	} else if ( "querySelectorAll" in elem ) {
+		return elem.querySelectorAll( "*" );
+
+	} else {
+		return [];
+	}
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+	if ( elem.type === "checkbox" || elem.type === "radio" ) {
+		elem.defaultChecked = elem.checked;
+	}
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+	if ( jQuery.nodeName( elem, "input" ) ) {
+		fixDefaultChecked( elem );
+	} else if ( "getElementsByTagName" in elem ) {
+		jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+	}
+}
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var clone = elem.cloneNode(true),
+				srcElements,
+				destElements,
+				i;
+
+		if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+			// IE copies events bound via attachEvent when using cloneNode.
+			// Calling detachEvent on the clone will also remove the events
+			// from the original. In order to get around this, we use some
+			// proprietary methods to clear the events. Thanks to MooTools
+			// guys for this hotness.
+
+			cloneFixAttributes( elem, clone );
+
+			// Using Sizzle here is crazy slow, so we use getElementsByTagName
+			// instead
+			srcElements = getAll( elem );
+			destElements = getAll( clone );
+
+			// Weird iteration because IE will replace the length property
+			// with an element if you are cloning the body and one of the
+			// elements on the page has a name or id of "length"
+			for ( i = 0; srcElements[i]; ++i ) {
+				// Ensure that the destination node is not null; Fixes #9587
+				if ( destElements[i] ) {
+					cloneFixAttributes( srcElements[i], destElements[i] );
+				}
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			cloneCopyEvent( elem, clone );
+
+			if ( deepDataAndEvents ) {
+				srcElements = getAll( elem );
+				destElements = getAll( clone );
+
+				for ( i = 0; srcElements[i]; ++i ) {
+					cloneCopyEvent( srcElements[i], destElements[i] );
+				}
+			}
+		}
+
+		srcElements = destElements = null;
+
+		// Return the cloned set
+		return clone;
+	},
+
+	clean: function( elems, context, fragment, scripts ) {
+		var checkScriptType;
+
+		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 = [], j;
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( typeof elem === "number" ) {
+				elem += "";
+			}
+
+			if ( !elem ) {
+				continue;
+			}
+
+			// Convert html string into DOM nodes
+			if ( typeof elem === "string" ) {
+				if ( !rhtml.test( elem ) ) {
+					elem = context.createTextNode( elem );
+				} else {
+					// Fix "XHTML"-style tags in all browsers
+					elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+					// 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 ( 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 = div.childNodes;
+				}
+			}
+
+			// Resets defaultChecked for any radios and checkboxes
+			// about to be appended to the DOM in IE 6/7 (#8060)
+			var len;
+			if ( !jQuery.support.appendChecked ) {
+				if ( elem[0] && typeof (len = elem.length) === "number" ) {
+					for ( j = 0; j < len; j++ ) {
+						findInputs( elem[j] );
+					}
+				} else {
+					findInputs( elem );
+				}
+			}
+
+			if ( elem.nodeType ) {
+				ret.push( elem );
+			} else {
+				ret = jQuery.merge( ret, elem );
+			}
+		}
+
+		if ( fragment ) {
+			checkScriptType = function( elem ) {
+				return !elem.type || rscriptType.test( elem.type );
+			};
+			for ( 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 ) {
+						var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
+
+						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+					}
+					fragment.appendChild( ret[i] );
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	cleanData: function( elems ) {
+		var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
+			deleteExpando = jQuery.support.deleteExpando;
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+				continue;
+			}
+
+			id = elem[ jQuery.expando ];
+
+			if ( id ) {
+				data = cache[ id ] && cache[ id ][ internalKey ];
+
+				if ( data && data.events ) {
+					for ( var type in data.events ) {
+						if ( special[ type ] ) {
+							jQuery.event.remove( elem, type );
+
+						// This is a shortcut to avoid jQuery.event.remove's overhead
+						} else {
+							jQuery.removeEvent( elem, type, data.handle );
+						}
+					}
+
+					// Null the DOM reference to avoid IE6/7/8 leak (#7054)
+					if ( data.handle ) {
+						data.handle.elem = null;
+					}
+				}
+
+				if ( deleteExpando ) {
+					delete elem[ jQuery.expando ];
+
+				} else if ( elem.removeAttribute ) {
+					elem.removeAttribute( jQuery.expando );
+				}
+
+				delete cache[ id ];
+			}
+		}
+	}
+});
+
+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 || "" ).replace( rcleanScript, "/*$0*/" ) );
+	}
+
+	if ( elem.parentNode ) {
+		elem.parentNode.removeChild( elem );
+	}
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	// fixed for IE9, see #8346
+	rupper = /([A-Z]|^ms)/g,
+	rnumpx = /^-?\d+(?:px)?$/i,
+	rnum = /^-?\d/,
+	rrelNum = /^([\-+])=([\-+.\de]+)/,
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssWidth = [ "Left", "Right" ],
+	cssHeight = [ "Top", "Bottom" ],
+	curCSS,
+
+	getComputedStyle,
+	currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+	// Setting 'undefined' is a no-op
+	if ( arguments.length === 2 && value === undefined ) {
+		return this;
+	}
+
+	return jQuery.access( this, name, value, true, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	});
+};
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity", "opacity" );
+					return ret === "" ? "1" : ret;
+
+				} else {
+					return elem.style.opacity;
+				}
+			}
+		}
+	},
+
+	// Exclude the following css properties to add px
+	cssNumber: {
+		"fillOpacity": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, origName = jQuery.camelCase( name ),
+			style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// convert relative number strings (+= or -=) to relative numbers. #7345
+			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+				value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( value == null || type === "number" && isNaN( value ) ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra ) {
+		var ret, hooks;
+
+		// Make sure that we're working with the right name
+		name = jQuery.camelCase( name );
+		hooks = jQuery.cssHooks[ name ];
+		name = jQuery.cssProps[ name ] || name;
+
+		// cssFloat needs a special treatment
+		if ( name === "cssFloat" ) {
+			name = "float";
+		}
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+			return ret;
+
+		// Otherwise, if a way to get the computed value exists, use that
+		} else if ( curCSS ) {
+			return curCSS( elem, name );
+		}
+	},
+
+	// 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 ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+	}
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			var val;
+
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					return getWH( elem, name, extra );
+				} else {
+					jQuery.swap( elem, cssShow, function() {
+						val = getWH( elem, name, extra );
+					});
+				}
+
+				return val;
+			}
+		},
+
+		set: function( elem, value ) {
+			if ( rnumpx.test( value ) ) {
+				// ignore negative width and height values #1599
+				value = parseFloat( value );
+
+				if ( value >= 0 ) {
+					return value + "px";
+				}
+
+			} else {
+				return value;
+			}
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+				( parseFloat( RegExp.$1 ) / 100 ) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style,
+				currentStyle = elem.currentStyle,
+				opacity = jQuery.isNaN( value ) ? "" : "alpha(opacity=" + value * 100 + ")",
+				filter = currentStyle && currentStyle.filter || style.filter || "";
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+			if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
+
+				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+				// if "filter:" is present at all, clearType is disabled, we want to avoid this
+				// style.removeAttribute is IE Only, but so apparently is this code path...
+				style.removeAttribute( "filter" );
+
+				// if there there is no filter style applied in a css rule, we are done
+				if ( currentStyle && !currentStyle.filter ) {
+					return;
+				}
+			}
+
+			// otherwise, set new filter values
+			style.filter = ralpha.test( filter ) ?
+				filter.replace( ralpha, opacity ) :
+				filter + " " + opacity;
+		}
+	};
+}
+
+jQuery(function() {
+	// This hook cannot be added until DOM ready because the support test
+	// for it is not run until after DOM ready
+	if ( !jQuery.support.reliableMarginRight ) {
+		jQuery.cssHooks.marginRight = {
+			get: function( elem, computed ) {
+				// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+				// Work around by temporarily setting element display to inline-block
+				var ret;
+				jQuery.swap( elem, { "display": "inline-block" }, function() {
+					if ( computed ) {
+						ret = curCSS( elem, "margin-right", "marginRight" );
+					} else {
+						ret = elem.style.marginRight;
+					}
+				});
+				return ret;
+			}
+		};
+	}
+});
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+	getComputedStyle = function( elem, name ) {
+		var ret, defaultView, computedStyle;
+
+		name = name.replace( rupper, "-$1" ).toLowerCase();
+
+		if ( !(defaultView = elem.ownerDocument.defaultView) ) {
+			return undefined;
+		}
+
+		if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+			ret = computedStyle.getPropertyValue( name );
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+		}
+
+		return ret;
+	};
+}
+
+if ( document.documentElement.currentStyle ) {
+	currentStyle = function( elem, name ) {
+		var left,
+			ret = elem.currentStyle && elem.currentStyle[ name ],
+			rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
+			style = elem.style;
+
+		// 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
+			left = style.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : (ret || 0);
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+
+	// Start with offset property
+	var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		which = name === "width" ? cssWidth : cssHeight;
+
+	if ( val > 0 ) {
+		if ( extra !== "border" ) {
+			jQuery.each( which, function() {
+				if ( !extra ) {
+					val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
+				}
+				if ( extra === "margin" ) {
+					val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
+				} else {
+					val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
+				}
+			});
+		}
+
+		return val + "px";
+	}
+
+	// Fall back to computed then uncomputed css if necessary
+	val = curCSS( elem, name, name );
+	if ( val < 0 || val == null ) {
+		val = elem.style[ name ] || 0;
+	}
+	// Normalize "", auto, and prepare for extra
+	val = parseFloat( val ) || 0;
+
+	// Add padding, border, margin
+	if ( extra ) {
+		jQuery.each( which, function() {
+			val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
+			if ( extra !== "padding" ) {
+				val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
+			}
+			if ( extra === "margin" ) {
+				val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
+			}
+		});
+	}
+
+	return val + "px";
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		var width = elem.offsetWidth,
+			height = elem.offsetHeight;
+
+		return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+
+
+
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rhash = /#.*$/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+	rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rquery = /\?/,
+	rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+	rselectTextarea = /^(?:select|textarea)/i,
+	rspacesAjax = /\s+/,
+	rts = /([?&])_=[^&]*/,
+	rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Document location
+	ajaxLocation,
+
+	// Document location segments
+	ajaxLocParts,
+	
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+	ajaxLocation = location.href;
+} catch( e ) {
+	// Use the href attribute of an A element
+	// since IE will modify it given document.location
+	ajaxLocation = document.createElement( "a" );
+	ajaxLocation.href = "";
+	ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		if ( jQuery.isFunction( func ) ) {
+			var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+				i = 0,
+				length = dataTypes.length,
+				dataType,
+				list,
+				placeBefore;
+
+			// For each dataType in the dataTypeExpression
+			for(; i < length; i++ ) {
+				dataType = dataTypes[ i ];
+				// We control if we're asked to add before
+				// any existing element
+				placeBefore = /^\+/.test( dataType );
+				if ( placeBefore ) {
+					dataType = dataType.substr( 1 ) || "*";
+				}
+				list = structure[ dataType ] = structure[ dataType ] || [];
+				// then we add to the structure accordingly
+				list[ placeBefore ? "unshift" : "push" ]( func );
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+		dataType /* internal */, inspected /* internal */ ) {
+
+	dataType = dataType || options.dataTypes[ 0 ];
+	inspected = inspected || {};
+
+	inspected[ dataType ] = true;
+
+	var list = structure[ dataType ],
+		i = 0,
+		length = list ? list.length : 0,
+		executeOnly = ( structure === prefilters ),
+		selection;
+
+	for(; i < length && ( executeOnly || !selection ); i++ ) {
+		selection = list[ i ]( options, originalOptions, jqXHR );
+		// If we got redirected to another dataType
+		// we try there if executing only and not done already
+		if ( typeof selection === "string" ) {
+			if ( !executeOnly || inspected[ selection ] ) {
+				selection = undefined;
+			} else {
+				options.dataTypes.unshift( selection );
+				selection = inspectPrefiltersOrTransports(
+						structure, options, originalOptions, jqXHR, selection, inspected );
+			}
+		}
+	}
+	// If we're only executing or nothing was selected
+	// we try the catchall dataType if not done already
+	if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+		selection = inspectPrefiltersOrTransports(
+				structure, options, originalOptions, jqXHR, "*", inspected );
+	}
+	// unnecessary when only executing (prefilters)
+	// but it'll be ignored by the caller in that case
+	return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var key, deep,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+	for( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+}
+
+jQuery.fn.extend({
+	load: function( url, params, callback ) {
+		if ( typeof url !== "string" && _load ) {
+			return _load.apply( this, arguments );
+
+		// 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 = undefined;
+
+			// Otherwise, build a param string
+			} else if ( typeof params === "object" ) {
+				params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+				type = "POST";
+			}
+		}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			// Complete callback (responseText is used internally)
+			complete: function( jqXHR, status, responseText ) {
+				// Store the response as specified by the jqXHR object
+				responseText = jqXHR.responseText;
+				// If successful, inject the HTML into all the matched elements
+				if ( jqXHR.isResolved() ) {
+					// #4825: Get the actual response in case
+					// a dataFilter is present in ajaxSettings
+					jqXHR.done(function( r ) {
+						responseText = r;
+					});
+					// See if a selector was specified
+					self.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(responseText.replace(rscript, ""))
+
+							// Locate the specified elements
+							.find(selector) :
+
+						// If not, just inject the full result
+						responseText );
+				}
+
+				if ( callback ) {
+					self.each( callback, [ responseText, status, jqXHR ] );
+				}
+			}
+		});
+
+		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.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).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.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		return jQuery.ajax({
+			type: method,
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	};
+});
+
+jQuery.extend({
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		if ( settings ) {
+			// Building a settings object
+			ajaxExtend( target, jQuery.ajaxSettings );
+		} else {
+			// Extending ajaxSettings
+			settings = target;
+			target = jQuery.ajaxSettings;
+		}
+		ajaxExtend( target, settings );
+		return target;
+	},
+
+	ajaxSettings: {
+		url: ajaxLocation,
+		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+		global: true,
+		type: "GET",
+		contentType: "application/x-www-form-urlencoded",
+		processData: true,
+		async: true,
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			text: "text/plain",
+			json: "application/json, text/javascript",
+			"*": allTypes
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText"
+		},
+
+		// List of data converters
+		// 1) key format is "source_type destination_type" (a single space in-between)
+		// 2) the catchall symbol "*" can be used for source_type
+		converters: {
+
+			// Convert anything to text
+			"* text": window.String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			context: true,
+			url: true
+		}
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+			// Callbacks context
+			callbackContext = s.context || s,
+			// Context for global events
+			// It's the callbackContext if one was provided in the options
+			// and if it's a DOM node or a jQuery collection
+			globalEventContext = callbackContext !== s &&
+				( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+						jQuery( callbackContext ) : jQuery.event,
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery._Deferred(),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// ifModified key
+			ifModifiedKey,
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+			// Response headers
+			responseHeadersString,
+			responseHeaders,
+			// transport
+			transport,
+			// timeout handle
+			timeoutTimer,
+			// Cross-domain detection vars
+			parts,
+			// The jqXHR state
+			state = 0,
+			// To know if global events are to be dispatched
+			fireGlobals,
+			// Loop variable
+			i,
+			// Fake xhr
+			jqXHR = {
+
+				readyState: 0,
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					if ( !state ) {
+						var lname = name.toLowerCase();
+						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match === undefined ? null : match;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( !state ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					statusText = statusText || "abort";
+					if ( transport ) {
+						transport.abort( statusText );
+					}
+					done( 0, statusText );
+					return this;
+				}
+			};
+
+		// Callback for when everything is done
+		// It is defined here because jslint complains if it is declared
+		// at the end of the function (which would be more logical and readable)
+		function done( status, nativeStatusText, responses, headers ) {
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			var isSuccess,
+				success,
+				error,
+				statusText = nativeStatusText,
+				response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+				lastModified,
+				etag;
+
+			// If successful, handle type chaining
+			if ( status >= 200 && status < 300 || status === 304 ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+
+					if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+						jQuery.lastModified[ ifModifiedKey ] = lastModified;
+					}
+					if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+						jQuery.etag[ ifModifiedKey ] = etag;
+					}
+				}
+
+				// If not modified
+				if ( status === 304 ) {
+
+					statusText = "notmodified";
+					isSuccess = true;
+
+				// If we have data
+				} else {
+
+					try {
+						success = ajaxConvert( s, response );
+						statusText = "success";
+						isSuccess = true;
+					} catch(e) {
+						// We have a parsererror
+						statusText = "parsererror";
+						error = e;
+					}
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if( !statusText || status ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+						[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger( "ajaxStop" );
+				}
+			}
+		}
+
+		// Attach deferreds
+		deferred.promise( jqXHR );
+		jqXHR.success = jqXHR.done;
+		jqXHR.error = jqXHR.fail;
+		jqXHR.complete = completeDeferred.done;
+
+		// Status-dependent callbacks
+		jqXHR.statusCode = function( map ) {
+			if ( map ) {
+				var tmp;
+				if ( state < 2 ) {
+					for( tmp in map ) {
+						statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+					}
+				} else {
+					tmp = map[ jqXHR.status ];
+					jqXHR.then( tmp, tmp );
+				}
+			}
+			return this;
+		};
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+		// Determine if a cross-domain request is in order
+		if ( s.crossDomain == null ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefiler, stop there
+		if ( state === 2 ) {
+			return false;
+		}
+
+		// We can fire global events as of now if asked to
+		fireGlobals = s.global;
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger( "ajaxStart" );
+		}
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Get ifModifiedKey before adding the anti-cache parameter
+			ifModifiedKey = s.url;
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+
+				var ts = jQuery.now(),
+					// try replacing _= if it is there
+					ret = s.url.replace( rts, "$1_=" + ts );
+
+				// if nothing was replaced, add timestamp to the end
+				s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			ifModifiedKey = ifModifiedKey || s.url;
+			if ( jQuery.lastModified[ ifModifiedKey ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+			}
+			if ( jQuery.etag[ ifModifiedKey ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+			}
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+				// Abort if not done already
+				jqXHR.abort();
+				return false;
+
+		}
+
+		// Install callbacks on deferreds
+		for ( i in { success: 1, error: 1, complete: 1 } ) {
+			jqXHR[ i ]( s[ i ] );
+		}
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = setTimeout( function(){
+					jqXHR.abort( "timeout" );
+				}, s.timeout );
+			}
+
+			try {
+				state = 1;
+				transport.send( requestHeaders, done );
+			} catch (e) {
+				// Propagate exception as error if not done
+				if ( state < 2 ) {
+					done( -1, e );
+				// Simply rethrow otherwise
+				} else {
+					jQuery.error( e );
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a, traditional ) {
+		var s = [],
+			add = function( 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 );
+			};
+
+		// Set traditional to true for jQuery <= 1.3.2 behavior.
+		if ( traditional === undefined ) {
+			traditional = jQuery.ajaxSettings.traditional;
+		}
+
+		// If an array was passed in, assume that it is an array of form elements.
+		if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+			// 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.
+			for ( var prefix in a ) {
+				buildParams( prefix, a[ prefix ], traditional, add );
+			}
+		}
+
+		// Return the resulting serialization
+		return s.join( "&" ).replace( r20, "+" );
+	}
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+	if ( jQuery.isArray( obj ) ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// 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, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && obj != null && typeof obj === "object" ) {
+		// Serialize object item.
+		for ( var name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+	var contents = s.contents,
+		dataTypes = s.dataTypes,
+		responseFields = s.responseFields,
+		ct,
+		type,
+		finalDataType,
+		firstDataType;
+
+	// Fill responseXXX fields
+	for( type in responseFields ) {
+		if ( type in responses ) {
+			jqXHR[ responseFields[type] ] = responses[ type ];
+		}
+	}
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+	// Apply the dataFilter if provided
+	if ( s.dataFilter ) {
+		response = s.dataFilter( response, s.dataType );
+	}
+
+	var dataTypes = s.dataTypes,
+		converters = {},
+		i,
+		key,
+		length = dataTypes.length,
+		tmp,
+		// Current and previous dataTypes
+		current = dataTypes[ 0 ],
+		prev,
+		// Conversion expression
+		conversion,
+		// Conversion function
+		conv,
+		// Conversion functions (transitive conversion)
+		conv1,
+		conv2;
+
+	// For each dataType in the chain
+	for( i = 1; i < length; i++ ) {
+
+		// Create converters map
+		// with lowercased keys
+		if ( i === 1 ) {
+			for( key in s.converters ) {
+				if( typeof key === "string" ) {
+					converters[ key.toLowerCase() ] = s.converters[ key ];
+				}
+			}
+		}
+
+		// Get the dataTypes
+		prev = current;
+		current = dataTypes[ i ];
+
+		// If current is auto dataType, update it to prev
+		if( current === "*" ) {
+			current = prev;
+		// If no auto and dataTypes are actually different
+		} else if ( prev !== "*" && prev !== current ) {
+
+			// Get the converter
+			conversion = prev + " " + current;
+			conv = converters[ conversion ] || converters[ "* " + current ];
+
+			// If there is no direct converter, search transitively
+			if ( !conv ) {
+				conv2 = undefined;
+				for( conv1 in converters ) {
+					tmp = conv1.split( " " );
+					if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+						conv2 = converters[ tmp[1] + " " + current ];
+						if ( conv2 ) {
+							conv1 = converters[ conv1 ];
+							if ( conv1 === true ) {
+								conv = conv2;
+							} else if ( conv2 === true ) {
+								conv = conv1;
+							}
+							break;
+						}
+					}
+				}
+			}
+			// If we found no converter, dispatch an error
+			if ( !( conv || conv2 ) ) {
+				jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+			}
+			// If found converter is not an equivalence
+			if ( conv !== true ) {
+				// Convert with 1 or 2 converters accordingly
+				response = conv ? conv( response ) : conv2( conv1(response) );
+			}
+		}
+	}
+	return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+	jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		return jQuery.expando + "_" + ( jsc++ );
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
+		( typeof s.data === "string" );
+
+	if ( s.dataTypes[ 0 ] === "jsonp" ||
+		s.jsonp !== false && ( jsre.test( s.url ) ||
+				inspectData && jsre.test( s.data ) ) ) {
+
+		var responseContainer,
+			jsonpCallback = s.jsonpCallback =
+				jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+			previous = window[ jsonpCallback ],
+			url = s.url,
+			data = s.data,
+			replace = "$1" + jsonpCallback + "$2";
+
+		if ( s.jsonp !== false ) {
+			url = url.replace( jsre, replace );
+			if ( s.url === url ) {
+				if ( inspectData ) {
+					data = data.replace( jsre, replace );
+				}
+				if ( s.data === data ) {
+					// Add callback manually
+					url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+				}
+			}
+		}
+
+		s.url = url;
+		s.data = data;
+
+		// Install callback
+		window[ jsonpCallback ] = function( response ) {
+			responseContainer = [ response ];
+		};
+
+		// Clean-up function
+		jqXHR.always(function() {
+			// Set callback back to previous value
+			window[ jsonpCallback ] = previous;
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( previous ) ) {
+				window[ jsonpCallback ]( responseContainer[ 0 ] );
+			}
+		});
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( jsonpCallback + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Delegate to script
+		return "script";
+	}
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /javascript|ecmascript/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement( "script" );
+
+				script.async = "async";
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( head && script.parentNode ) {
+							head.removeChild( script );
+						}
+
+						// Dereference the script
+						script = undefined;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+				// 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 );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( 0, 1 );
+				}
+			}
+		};
+	}
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+	xhrOnUnloadAbort = window.ActiveXObject ? function() {
+		// Abort all pending requests
+		for ( var key in xhrCallbacks ) {
+			xhrCallbacks[ key ]( 0, 1 );
+		}
+	} : false,
+	xhrId = 0,
+	xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch( e ) {}
+}
+
+function createActiveXHR() {
+	try {
+		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+	} catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		return !this.isLocal && createStandardXHR() || createActiveXHR();
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+	jQuery.extend( jQuery.support, {
+		ajax: !!xhr,
+		cors: !!xhr && ( "withCredentials" in xhr )
+	});
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// Get a new xhr
+					var xhr = s.xhr(),
+						handle,
+						i;
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Apply custom fields if provided
+					if ( s.xhrFields ) {
+						for ( i in s.xhrFields ) {
+							xhr[ i ] = s.xhrFields[ i ];
+						}
+					}
+
+					// Override mime type if needed
+					if ( s.mimeType && xhr.overrideMimeType ) {
+						xhr.overrideMimeType( s.mimeType );
+					}
+
+					// X-Requested-With header
+					// For cross-domain requests, seeing as conditions for a preflight are
+					// akin to a jigsaw puzzle, we simply never set it to be sure.
+					// (it can always be set on a per-request basis or even using ajaxSetup)
+					// For same-domain requests, won't change header if already provided.
+					if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+						headers[ "X-Requested-With" ] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						for ( i in headers ) {
+							xhr.setRequestHeader( i, headers[ i ] );
+						}
+					} catch( _ ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+
+						var status,
+							statusText,
+							responseHeaders,
+							responses,
+							xml;
+
+						// Firefox throws exceptions when accessing properties
+						// of an xhr when a network error occured
+						// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+						try {
+
+							// Was never called and is aborted or complete
+							if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+								// Only called once
+								callback = undefined;
+
+								// Do not keep as active anymore
+								if ( handle ) {
+									xhr.onreadystatechange = jQuery.noop;
+									if ( xhrOnUnloadAbort ) {
+										delete xhrCallbacks[ handle ];
+									}
+								}
+
+								// If it's an abort
+								if ( isAbort ) {
+									// Abort it manually if needed
+									if ( xhr.readyState !== 4 ) {
+										xhr.abort();
+									}
+								} else {
+									status = xhr.status;
+									responseHeaders = xhr.getAllResponseHeaders();
+									responses = {};
+									xml = xhr.responseXML;
+
+									// Construct response list
+									if ( xml && xml.documentElement /* #4958 */ ) {
+										responses.xml = xml;
+									}
+									responses.text = xhr.responseText;
+
+									// Firefox throws an exception when accessing
+									// statusText for faulty cross-domain requests
+									try {
+										statusText = xhr.statusText;
+									} catch( e ) {
+										// We normalize with Webkit giving an empty statusText
+										statusText = "";
+									}
+
+									// Filter status for non standard behaviors
+
+									// If the request is local and we have data: assume a success
+									// (success with no data won't get notified, that's the best we
+									// can do given current implementations)
+									if ( !status && s.isLocal && !s.crossDomain ) {
+										status = responses.text ? 200 : 404;
+									// IE - #1450: sometimes returns 1223 when it should be 204
+									} else if ( status === 1223 ) {
+										status = 204;
+									}
+								}
+							}
+						} catch( firefoxAccessException ) {
+							if ( !isAbort ) {
+								complete( -1, firefoxAccessException );
+							}
+						}
+
+						// Call complete if needed
+						if ( responses ) {
+							complete( status, statusText, responses, responseHeaders );
+						}
+					};
+
+					// if we're in sync mode or it's in cache
+					// and has been retrieved directly (IE6 & IE7)
+					// we need to manually fire the callback
+					if ( !s.async || xhr.readyState === 4 ) {
+						callback();
+					} else {
+						handle = ++xhrId;
+						if ( xhrOnUnloadAbort ) {
+							// Create the active xhrs callbacks list if needed
+							// and attach the unload handler
+							if ( !xhrCallbacks ) {
+								xhrCallbacks = {};
+								jQuery( window ).unload( xhrOnUnloadAbort );
+							}
+							// Add to list of active xhrs callbacks
+							xhrCallbacks[ handle ] = callback;
+						}
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback(0,1);
+					}
+				}
+			};
+		}
+	});
+}
+
+
+
+
+var elemdisplay = {},
+	iframe, iframeDoc,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+	timerId,
+	fxAttrs = [
+		// height animations
+		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+		// width animations
+		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+		// opacity animations
+		[ "opacity" ]
+	],
+	fxNow;
+
+jQuery.fn.extend({
+	show: function( speed, easing, callback ) {
+		var elem, display;
+
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("show", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				elem = this[i];
+
+				if ( elem.style ) {
+					display = elem.style.display;
+
+					// Reset the inline display of this element to learn if it is
+					// being hidden by cascaded rules or not
+					if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+						display = elem.style.display = "";
+					}
+
+					// Set elements which have been overridden with display: none
+					// in a stylesheet to whatever the default browser style is
+					// for such an element
+					if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
+						jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
+					}
+				}
+			}
+
+			// Set the display of most of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				elem = this[i];
+
+				if ( elem.style ) {
+					display = elem.style.display;
+
+					if ( display === "" || display === "none" ) {
+						elem.style.display = jQuery._data(elem, "olddisplay") || "";
+					}
+				}
+			}
+
+			return this;
+		}
+	},
+
+	hide: function( speed, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("hide", 3), speed, easing, callback);
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				if ( this[i].style ) {
+					var display = jQuery.css( this[i], "display" );
+
+					if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
+						jQuery._data( this[i], "olddisplay", display );
+					}
+				}
+			}
+
+			// Set the display of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				if ( this[i].style ) {
+					this[i].style.display = "none";
+				}
+			}
+
+			return this;
+		}
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2, callback ) {
+		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, callback);
+		}
+
+		return this;
+	},
+
+	fadeTo: function( speed, to, easing, callback ) {
+		return this.filter(":hidden").css("opacity", 0).show().end()
+					.animate({opacity: to}, speed, easing, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed(speed, easing, callback);
+
+		if ( jQuery.isEmptyObject( prop ) ) {
+			return this.each( optall.complete, [ false ] );
+		}
+
+		// Do not change referenced properties as per-property easing will be lost
+		prop = jQuery.extend( {}, prop );
+
+		return this[ optall.queue === false ? "each" : "queue" ](function() {
+			// XXX 'this' does not always have a nodeName when running the
+			// test suite
+
+			if ( optall.queue === false ) {
+				jQuery._mark( this );
+			}
+
+			var opt = jQuery.extend( {}, optall ),
+				isElement = this.nodeType === 1,
+				hidden = isElement && jQuery(this).is(":hidden"),
+				name, val, p,
+				display, e,
+				parts, start, end, unit;
+
+			// will store per property easing and be used to determine when an animation is complete
+			opt.animatedProperties = {};
+
+			for ( p in prop ) {
+
+				// property name normalization
+				name = jQuery.camelCase( p );
+				if ( p !== name ) {
+					prop[ name ] = prop[ p ];
+					delete prop[ p ];
+				}
+
+				val = prop[ name ];
+
+				// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+				if ( jQuery.isArray( val ) ) {
+					opt.animatedProperties[ name ] = val[ 1 ];
+					val = prop[ name ] = val[ 0 ];
+				} else {
+					opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
+				}
+
+				if ( val === "hide" && hidden || val === "show" && !hidden ) {
+					return opt.complete.call( this );
+				}
+
+				if ( isElement && ( name === "height" || name === "width" ) ) {
+					// Make sure that nothing sneaks out
+					// Record all 3 overflow attributes because IE does not
+					// change the overflow attribute when overflowX and
+					// overflowY are set to the same value
+					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+					// Set display property to inline-block for height/width
+					// animations on inline elements that are having width/height
+					// animated
+					if ( jQuery.css( this, "display" ) === "inline" &&
+							jQuery.css( this, "float" ) === "none" ) {
+						if ( !jQuery.support.inlineBlockNeedsLayout ) {
+							this.style.display = "inline-block";
+
+						} else {
+							display = defaultDisplay( this.nodeName );
+
+							// inline-level elements accept inline-block;
+							// block-level elements need to be inline with layout
+							if ( display === "inline" ) {
+								this.style.display = "inline-block";
+
+							} else {
+								this.style.display = "inline";
+								this.style.zoom = 1;
+							}
+						}
+					}
+				}
+			}
+
+			if ( opt.overflow != null ) {
+				this.style.overflow = "hidden";
+			}
+
+			for ( p in prop ) {
+				e = new jQuery.fx( this, opt, p );
+				val = prop[ p ];
+
+				if ( rfxtypes.test(val) ) {
+					e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
+
+				} else {
+					parts = rfxnum.exec( val );
+					start = e.cur();
+
+					if ( parts ) {
+						end = parseFloat( parts[2] );
+						unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
+
+						// We need to compute starting value
+						if ( unit !== "px" ) {
+							jQuery.style( this, p, (end || 1) + unit);
+							start = ((end || 1) / e.cur()) * start;
+							jQuery.style( this, p, 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 ) {
+		if ( clearQueue ) {
+			this.queue([]);
+		}
+
+		this.each(function() {
+			var timers = jQuery.timers,
+				i = timers.length;
+			// clear marker counters if we know they won't be
+			if ( !gotoEnd ) {
+				jQuery._unmark( true, this );
+			}
+			while ( 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;
+	}
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	setTimeout( clearFxNow, 0 );
+	return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+	fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+	var obj = {};
+
+	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
+		obj[ this ] = type;
+	});
+
+	return obj;
+}
+
+// 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" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.extend({
+	speed: function( speed, easing, fn ) {
+		var opt = speed && typeof speed === "object" ? jQuery.extend({}, 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 :
+			opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
+
+		// Queueing
+		opt.old = opt.complete;
+		opt.complete = function( noUnmark ) {
+			if ( jQuery.isFunction( opt.old ) ) {
+				opt.old.call( this );
+			}
+
+			if ( opt.queue !== false ) {
+				jQuery.dequeue( this );
+			} else if ( noUnmark !== false ) {
+				jQuery._unmark( 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;
+
+		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 );
+	},
+
+	// Get the current size
+	cur: function() {
+		if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
+			return this.elem[ this.prop ];
+		}
+
+		var parsed,
+			r = jQuery.css( this.elem, this.prop );
+		// Empty strings, null, undefined and "auto" are converted to 0,
+		// complex values such as "rotate(1rad)" are returned as is,
+		// simple values such as "10px" are parsed to Float.
+		return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+	},
+
+	// Start an animation from one number to another
+	custom: function( from, to, unit ) {
+		var self = this,
+			fx = jQuery.fx;
+
+		this.startTime = fxNow || createFxNow();
+		this.start = from;
+		this.end = to;
+		this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+		this.now = this.start;
+		this.pos = this.state = 0;
+
+		function t( gotoEnd ) {
+			return self.step(gotoEnd);
+		}
+
+		t.elem = this.elem;
+
+		if ( t() && jQuery.timers.push(t) && !timerId ) {
+			timerId = setInterval( fx.tick, fx.interval );
+		}
+	},
+
+	// 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 = fxNow || createFxNow(),
+			done = true,
+			elem = this.elem,
+			options = this.options,
+			i, n;
+
+		if ( gotoEnd || t >= options.duration + this.startTime ) {
+			this.now = this.end;
+			this.pos = this.state = 1;
+			this.update();
+
+			options.animatedProperties[ this.prop ] = true;
+
+			for ( i in options.animatedProperties ) {
+				if ( options.animatedProperties[i] !== true ) {
+					done = false;
+				}
+			}
+
+			if ( done ) {
+				// Reset the overflow
+				if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+					jQuery.each( [ "", "X", "Y" ], function (index, value) {
+						elem.style[ "overflow" + value ] = options.overflow[index];
+					});
+				}
+
+				// Hide the element if the "hide" operation was done
+				if ( options.hide ) {
+					jQuery(elem).hide();
+				}
+
+				// Reset the properties, if the item has been hidden or shown
+				if ( options.hide || options.show ) {
+					for ( var p in options.animatedProperties ) {
+						jQuery.style( elem, p, options.orig[p] );
+					}
+				}
+
+				// Execute the complete function
+				options.complete.call( elem );
+			}
+
+			return false;
+
+		} else {
+			// classical easing cannot be used with an Infinity duration
+			if ( options.duration == Infinity ) {
+				this.now = t;
+			} else {
+				n = t - this.startTime;
+				this.state = n / options.duration;
+
+				// Perform the easing function, defaults to swing
+				this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, 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() {
+		for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
+			if ( !timers[i]() ) {
+				timers.splice(i--, 1);
+			}
+		}
+
+		if ( !timers.length ) {
+			jQuery.fx.stop();
+		}
+	},
+
+	interval: 13,
+
+	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;
+	};
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+	if ( !elemdisplay[ nodeName ] ) {
+
+		var body = document.body,
+			elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
+			display = elem.css( "display" );
+
+		elem.remove();
+
+		// If the simple way fails,
+		// get element's real default display by attaching it to a temp iframe
+		if ( display === "none" || display === "" ) {
+			// No iframe to use yet, so create it
+			if ( !iframe ) {
+				iframe = document.createElement( "iframe" );
+				iframe.frameBorder = iframe.width = iframe.height = 0;
+			}
+
+			body.appendChild( iframe );
+
+			// Create a cacheable copy of the iframe document on first call.
+			// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+			// document to it; WebKit & Firefox won't allow reusing the iframe document.
+			if ( !iframeDoc || !iframe.createElement ) {
+				iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+				iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
+				iframeDoc.close();
+			}
+
+			elem = iframeDoc.createElement( nodeName );
+
+			iframeDoc.body.appendChild( elem );
+
+			display = jQuery.css( elem, "display" );
+
+			body.removeChild( iframe );
+		}
+
+		// Store the correct default display
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0], box;
+
+		if ( options ) {
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		var doc = elem.ownerDocument,
+			docElem = doc.documentElement;
+
+		// Make sure we're not dealing with a disconnected DOM node
+		if ( !box || !jQuery.contains( docElem, elem ) ) {
+			return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+		}
+
+		var body = doc.body,
+			win = getWindow(doc),
+			clientTop  = docElem.clientTop  || body.clientTop  || 0,
+			clientLeft = docElem.clientLeft || body.clientLeft || 0,
+			scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,
+			scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+			top  = box.top  + scrollTop  - clientTop,
+			left = box.left + scrollLeft - clientLeft;
+
+		return { top: top, left: left };
+	};
+
+} else {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0];
+
+		if ( options ) {
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		jQuery.offset.initialize();
+
+		var computedStyle,
+			offsetParent = elem.offsetParent,
+			prevOffsetParent = elem,
+			doc = elem.ownerDocument,
+			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 && rtable.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.css(body, "marginTop") ) || 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 );
+		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.css(body, "marginTop") ) || 0;
+			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+		}
+
+		return { top: top, left: left };
+	},
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if (options.top != null) {
+			props.top = (options.top - curOffset.top) + curTop;
+		}
+		if (options.left != null) {
+			props.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 = rroot.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.css(elem, "marginTop") ) || 0;
+		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+		// Add offsetParent borders
+		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 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 && (!rroot.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, win;
+
+		if ( val === undefined ) {
+			elem = this[ 0 ];
+
+			if ( !elem ) {
+				return null;
+			}
+
+			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 ];
+		}
+
+		// 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;
+			}
+		});
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+
+
+
+
+// Create width, height, 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() {
+		var elem = this[0];
+		return elem && elem.style ?
+			parseFloat( jQuery.css( elem, type, "padding" ) ) :
+			null;
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn[ "outer" + name ] = function( margin ) {
+		var elem = this[0];
+		return elem && elem.style ?
+			parseFloat( jQuery.css( elem, type, 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;
+		}
+
+		if ( jQuery.isFunction( size ) ) {
+			return this.each(function( i ) {
+				var self = jQuery( this );
+				self[ type ]( size.call( this, i, self[ type ]() ) );
+			});
+		}
+
+		if ( jQuery.isWindow( elem ) ) {
+			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+			// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+			var docElemProp = elem.document.documentElement[ "client" + name ],
+				body = elem.document.body;
+			return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+				body && body[ "client" + name ] || docElemProp;
+
+		// Get document width or height
+		} else if ( elem.nodeType === 9 ) {
+			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+			return 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
+		} else if ( size === undefined ) {
+			var orig = jQuery.css( elem, type ),
+				ret = parseFloat( orig );
+
+			return jQuery.isNaN( ret ) ? orig : ret;
+
+		// Set the width or height on the element (default to pixels if value is unitless)
+		} else {
+			return this.css( type, typeof size === "string" ? size : size + "px" );
+		}
+	};
+
+});
+
+
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+})(window);
Index: Dev/branches/Demo/js/questionEditorScripts.js
===================================================================
--- Dev/branches/Demo/js/questionEditorScripts.js	(revision 225)
+++ Dev/branches/Demo/js/questionEditorScripts.js	(revision 225)
@@ -0,0 +1,196 @@
+//////////////////////
+/* HELPER FUNCTIONS */
+//////////////////////
+
+function hasClass(ele,cls) {
+    if (ele.className)
+        return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
+}
+ 
+function addClass(ele,cls) {
+    if (!this.hasClass(ele,cls)) ele.className += " "+cls;
+}
+ 
+function removeClass(ele,cls) {
+    if (hasClass(ele,cls)) {
+        var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
+        ele.className=ele.className.replace(reg,' ');
+    }
+}
+
+//////////////////////////
+/* END HELPER FUNCTIONS */
+//////////////////////////
+
+
+var qUID, parentObjectUID, qName, qTag, qType, qAnswerLength;
+
+function selectAnswerType(){
+    var selectBox = document.getElementById("questionType");
+    if (selectBox.value != undefined && selectBox.value != "") {
+        qType = selectBox.value;
+    }
+    else {
+        return;
+    }
+    removeWrongAnswerFields(selectBox);
+    switch (qType) {
+        case "int":
+            selectIntType();
+            break;
+        case "scale":
+            selectScaleType();
+            break;
+        case "choice":
+            //selectChoiceType();
+            break;
+        case "text":
+            //selectTextType();
+            break;
+        default:
+            alert("Invalid answer type selected!");
+            break;
+    }
+    
+}
+
+function createNewElement(tag, type, id, cl, value) {
+    var newElement = document.createElement(tag);
+    if (type != undefined) newElement.type = type;
+    if (id != undefined) newElement.id = id;
+    if (cl != undefined) newElement.className = cl;
+    if (value != undefined) {
+        newElement.value = value;
+        newElement.text = value;
+    }
+    return newElement;
+}
+
+function createNewInputLabel(text, target) {
+    var newLabel = document.createElement("label");
+    if (target) newLabel.setAttribute("for",target);
+    newLabel.innerHTML = text;
+    return newLabel;
+}
+
+function removeWrongAnswerFields(el) {
+    while (el.nextSibling) {
+        el.parentNode.removeChild(el.nextSibling);
+    }
+}
+
+function updateIdentifier() {
+    var identField = document.getElementById("questionIdentifierField");
+    if (identField.value == undefined && identField.value == "") {
+        return;
+    }
+    var headerField = document.getElementById("header_identifier");
+    headerField.innerHTML = identField.value;
+}
+
+
+///////////////////
+/* INT SELECTION */
+///////////////////
+
+function selectIntType() {
+    var selectBox = document.getElementById("questionType");
+    var content = document.getElementById("questionEditor_questionParams");
+    // Add minimum value input
+    var minValueBox = createNewElement("input","text","minValueBox", "questionParamField", null);
+    var minValueBoxLabel = createNewInputLabel("Minimum value:", "minValueBox");
+    addClass(minValueBoxLabel, "formLineBreak");
+    content.appendChild(minValueBoxLabel);
+    content.appendChild(minValueBox);
+    // Add maximum value input
+    var maxValueBox = createNewElement("input", "text", "maxValueBox", "questionParamField", null);
+    var maxValueBoxLabel = createNewInputLabel("Maximum value:","maxValueBox");
+    addClass(maxValueBoxLabel, "formLineBreak");
+    content.appendChild(maxValueBoxLabel);
+    content.appendChild(maxValueBox);
+}
+
+/////////////////////
+/* SCALE SELECTION */
+/////////////////////
+
+function selectScaleType() {
+    // I heard you like walls of text!
+    var content = document.getElementById("questionEditor_questionParams");
+    // Add number of choices input
+    var numChoicesBox = createNewElement("select", null, "numChoicesBox","questionParamField",null);
+    var numChoicesBoxLabel = createNewInputLabel("Scale size:","numChoicesBox");
+    for (var i = 0; i < 10; i++) {
+        var option = createNewElement("option");
+        option.text = i+1;
+        option.value = i+1;
+        numChoicesBox.appendChild(option);
+    }
+    addClass(numChoicesBoxLabel, "formLineBreak");
+    content.appendChild(numChoicesBoxLabel);
+    content.appendChild(numChoicesBox);
+    // Add legends enabled input
+    var legendsEnabledCheckBox = createNewElement("input","checkbox","legendsEnabledCheckbox","questionParamField",null);
+    var legendsEnabledCheckBoxLabel = createNewInputLabel("Enable legends","legendsEnabledCheckBox");
+    addClass(legendsEnabledCheckBoxLabel, "formLineBreak");
+    content.appendChild(legendsEnabledCheckBoxLabel);
+    content.appendChild(legendsEnabledCheckBox);
+    // Add legend labels boxes
+    var upperLegendBox = createNewElement("input","text","upperLegendBox","questionParamField");
+    var lowerLegendBox = createNewElement("input","text","lowerLegendBox","questionParamField");
+    var lowerLegendBoxLabel = createNewInputLabel("Lower legend","lowerLegendBox");
+    var upperLegendBoxLabel = createNewInputLabel("Upper legend","upperLegendBox");
+    addClass(lowerLegendBoxLabel,"formLineBreak");
+    content.appendChild(lowerLegendBoxLabel);
+    content.appendChild(lowerLegendBox);
+    addClass(upperLegendBoxLabel,"formLineBreak");
+    content.appendChild(upperLegendBoxLabel);
+    content.appendChild(upperLegendBox);
+    // Disable these boxes, since the checkbox is unchecked by default
+    lowerLegendBox.disabled = true;
+    upperLegendBox.disabled = true;
+    if (legendsEnabledCheckBox.addEventListener) {
+        legendsEnabledCheckBox.addEventListener("click", toggleScaleLegends, true);
+    }
+}
+
+function toggleScaleLegends() {
+    var content = document.getElementById("questionEditor_questionParams");
+    var checkbox = document.getElementById("legendsEnabledCheckbox");
+    var upperLegendBox = document.getElementById("upperLegendBox");
+    var lowerLegendBox = document.getElementById("lowerLegendBox");
+    if (checkbox.checked == true) {
+        upperLegendBox.disabled = false;
+        lowerLegendBox.disabled = false;
+    }
+    else {
+        upperLegendBox.disabled = true;
+        lowerLegendBox.disabled = true;
+    }
+}
+
+///////////////////////////////
+/* MULTIPLE CHOICE SELECTION */
+///////////////////////////////
+
+function selectChoiceType() {
+    var selectionBox = document.getElementById("questionType");
+    var content = document.getElementById("questionEditor_questionParams");
+}
+
+function resizeTextArea() {
+    var textArea = document.getElementById("questionEditor_bodyText");
+    if (document.getElementById("hiddenScalingDiv")) {
+        var hiddenDiv = document.getElementById("hiddenScalingDiv");
+    }
+    else {
+        var hiddenDiv = document.createElement("div");
+        hiddenDiv.style.visibility = "hidden";
+        textArea.appendChild(hiddenDiv);
+    }
+    
+    debugger;
+    hiddenDiv.innerHTML = "";
+    var userText = textArea.firstChild;
+    alert(userText);
+}
Index: Dev/branches/Demo/js/sequencerScripts.js
===================================================================
--- Dev/branches/Demo/js/sequencerScripts.js	(revision 225)
+++ Dev/branches/Demo/js/sequencerScripts.js	(revision 225)
@@ -0,0 +1,854 @@
+/* 
+ * You can change the type of sequencer by including a hidden input field with id "contentTypeField" in your document.
+ * The initEditor() method will then adjust internal variables in the sequencer object to match that type of content.
+ * 
+ * Note: code makes heavy use of shorthand functions:
+ * ce(var) = document.createElement(var);
+ * ge(var) = document.getElementById(var);
+ * Defined in generalscripts.js
+ */
+
+var sequencer = createVarArray();
+
+// Basic functions, intialization, updating
+
+function createVarArray(){
+    // Function that returns creates the global variable object, the sequencer's variable storage.
+    
+    if (sequencer) delete window.sequencer;
+    return {   // GLOBAL VAR TO STORE SEQUENCER SETTINGS!
+        uid: "",                // The unique id of this sequencer (not DB related!). This will help to avoid global var conflicts. Assign this randomly! (STRING)
+        session: {              // Properties of the currently loaded session
+            title: "",              // Title or name (STRING)
+            uid: "",                // Database UID of the current session (STRING)
+            pipeline: {             // Pipeline
+                uids: [],               // Uids of objects in pipeline (STRING)
+                types: [],              // Types of objects in pipeline (STRING)
+                upToDate: []            // Whether or not object displays are up to date (BOOL)
+            }
+        },
+        survey: {               // Properties of the loaded survey, if applicable (either this or the session tree above is filled in!) [THIS IS NOT CURRENTLY USED AND I SHOULD DELIBERATE ON WHAT VARIABLES TO PUT IN THIS TREE TO MAKE A FUNCTIONAL EDITOR THAT ALSO MATCHES THE DB FORMAT!]
+            title: "",              // Title or the name of the survey (STRING)
+            uid: "",                // Uid of the survey (STRING)
+            description: "",        // Description of the survey (STRING)
+            questions: {            // Properties of the questions contained within this survey
+                uids: [],               // An array of uids of the questions, in the order that they appear in the survey (STRING)
+                upToDate: []            // Whether or not a certain question needs an update (BOOL)
+            }
+        },
+        state: {                // Operating state of the sequencer
+            editing: false,         // Whether or not one of the contained child objects is currently being edited or in edit mode. Which one can be determined from the selectedObject property. (BOOL)
+            updating: false,        // Whether or not new steps are currently being queried (to disable any further actions) (BOOL)
+            numSteps: 0,            // Number of objects currently drawn in the editor (not necessarily same as number of objects in pipeline/survey!) (INTEGER)
+            loaded: false,          // Whether or not the sequencer content has been updated for the first time (BOOL)
+            selectedObject: {       // Properties of the currently selected step
+                uid: "",                // UID of this step (STRING)
+                index: null             // The 'index' of this step in the current sequencer view (NOT the pipeline!) (INTEGER)
+            },
+            pages: {                // State regarding page division of content objects
+                total: null,            // The number of pages the content is divided across
+                currentPage: null       // The page that is currently displayed in the sequencer            
+            }
+        },
+        settings: {             // Various settings to determine the workings of the sequencer
+            content: {              // Properties related to the content view of the sequencer
+                contentType: null,      // Type of the loaded parent object (STRING)
+                width: null,            // Width of the viewing area (INTEGER)
+                height: null,           // Height of the viewing area (INTEGER)
+                maxObjects: null,       // The maximum number of content elements to be displayed at once time (INTEGER)
+                orientation: null,      // Whether the editor should be a vertical or horizontal editor (STRING)
+                pages: false            // Whether or not to divide content across pages
+            },
+            efficientUpdating: true // Whether or not to use selective querying of the database for new step objects. True will only refresh out-of-date steps, False will refresh the whole pipeline (BOOL)
+        }
+    };
+
+}
+
+function loadSequencer() {
+    // Reads hidden fields created by PHP, copies the values into the global var then deletes them.
+    
+    // Load hidden fields and set required properties in global object var.
+    try {
+        // settings fields first
+        initSequencer();
+        debugger;
+        switch (sequencer.settings.content.contentType.toLowerCase()) {
+            case "session":
+                // Content-related fields next
+                var fPipelineString = ge("pipelineStringField");
+                var fPipelineTypes = ge("pipelineTypeField");
+                var fSessionUid = ge("sessionField");
+                var fSessionTitle = ge("sessionTitleField");
+                sequencer.session.title = fSessionTitle.value;
+                sequencer.session.uid = fSessionUid.value;
+                sequencer.session.pipeline.uids = stringToArray(fPipelineString.value, ",");
+                sequencer.session.pipeline.types = stringToArray(fPipelineTypes.value, ",");
+                sequencer.session.pipeline.upToDate = new Array();
+        
+                for (var i = 0; i < sequencer.session.pipeline.uids.length; i++) {
+                    sequencer.session.pipeline.upToDate.push(true);
+                }
+                break;
+            case "survey":
+                var fSurveyUid = ge("surveyUidField");
+                var fQuestionUids = ge("questionUidsField");
+                var fSurveyTitle = ge("surveyTitleField");
+                var fnumQuestions = ge("numQuestionsField");
+                var fSurveyDescription = ge("surveyDescriptionField");
+                sequencer.survey.title = fSurveyTitle.value;
+                sequencer.survey.uid = fSurveyUid.value;
+                sequencer.survey.description = fSurveyDescription.value;
+                sequencer.survey.questions.uids = stringToArray(fQuestionUids.value, ",");
+                break;
+            default:
+                break;
+        }
+        
+        
+        sequencer.state.numSteps = 0;
+        sequencer.state.loaded = false;
+        sequencer.settings.efficientUpdating = true;
+    }
+    catch (e) {
+        // Alert developer of any errors while setting these variables
+        for (error in e) alert(error.message);
+    }
+    // Then remove the hidden fields from the HTML document
+    var hiddenInputs = ge("hiddenInputs");
+    hiddenInputs.parentNode.removeChild(hiddenInputs);
+    
+    // finally, run updateSequencer to refresh the visual display of the pipeline
+    updateSequencer();
+}
+
+function initSequencer() {
+    // Called from loadSequencer(). Sets sequencer.settings properties depending on content type and values passed by PHP in hidden fields (currently only one), then removes these fields.
+    // Example: stuff like editor orientation, width/height, content type, maxObjects contained, etc...
+    
+    // load settings fields first
+    var fContentType = ge("sContentTypeField");
+    var content = ge("seqContent");
+    //sequencer.settings.content.contentType = fContentType.value.toLowerCase();
+    sequencer.settings.content.contentType = fContentType.value;
+    //Then select settings from a few presets
+    
+    switch (sequencer.settings.content.contentType.toLowerCase()) {
+        case "session":
+            sequencer.settings.content.orientation = "horizontal";
+            sequencer.settings.content.width = 800;
+            sequencer.settings.content.height = 125;
+            content.style.width = sequencer.settings.content.width+"px";
+            content.style.height = sequencer.settings.content.height+"px";
+            addClass(content, "horizontal");
+            break;
+        case "survey":
+            sequencer.settings.content.orientation = "vertical";
+            sequencer.settings.content.width = 650;     //guesstimated
+            var roomH = screen.availHeight;
+            sequencer.settings.content.height = roomH - 200;
+            content.style.width = sequencer.settings.content.width+"px";
+            content.style.height = sequencer.settings.content.height+"px";
+            addClass(content, "vertical");
+            break;
+        default:
+            break;
+    }
+    fContentType.parentNode.parentNode.removeChild(fContentType.parentNode);
+}
+
+// Updating, drawing, formatting
+
+function updateSequencer() {
+    // Code that manages drawing and adding of new visual representations of objects in the sequencer.
+
+    /*
+         * Description:
+         * This function updates the visual elements in the sequencer content view to match the current state of the sequencer.session.pipeline property.
+         * It queries the database for object properties via AJAX (returnStep/Display/.php), then inserts divider div's in between where needed.
+         */
+        
+    switch (sequencer.settings.content.contentType.toLowerCase()) {
+        case "session":
+            updateSequencer_Session();
+            break;
+        case "survey":
+            updateSequencer_Survey();
+            break;
+        default:
+            // Why would this even be called?
+            break;
+    }
+}
+
+function updateSequencer_Session() {
+    var content = ge("seqContentWrapper");
+    var requestString, needsUpdating;
+    var args;
+    
+    if (sequencer.state.loaded == false || sequencer.settings.efficientUpdating == false) {  // This is the first update of the sequencer since page load, therefore it contains no previous steps
+        // Stop running this function if the pipeline does not contain any elements to draw
+        if (sequencer.session.pipeline.uids.length == 0 || !sequencer.session.pipeline.uids.length) return;
+        // First clear the entire content wrapper, just for safety and in case efficientUpdating is off
+        while (content.firstChild) {
+            content.removeChild(content.firstChild);
+        }
+        args = [];
+        needsUpdating = [];
+        for (var i = 0; i < sequencer.session.pipeline.uids.length; i++) {
+            args.push({
+                uid: sequencer.session.pipeline.uids[i],
+                type: sequencer.session.pipeline.types[i]
+            });
+            needsUpdating.push(new Array(i, sequencer.session.pipeline.uids[i], sequencer.session.pipeline.types[i]));
+        }
+        
+        requestString = "args="+JSON.stringify(args);
+        newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){
+            content.removeChild(loadingGif);
+            insertNewObjects(result.responseText, needsUpdating);
+        }, true);
+        sequencer.state.loaded = true;
+        var loadingGif = ce("div");
+        loadingGif.innerHTML = "<img src='images/ui/ajax-loader-round.gif' style='float: left; margin:auto auto;' />";
+        content.appendChild(loadingGif);
+    }
+    else {
+        // This means that one or more steps are being added, not an entire pipeline's worth of them
+        needsUpdating = new Array();
+        args = [];
+        // Add steps that need updating to the needsUpdating array (index, uid, type).
+        for (var i = 0; i < sequencer.session.pipeline.uids.length; i++) {
+            if (sequencer.session.pipeline.upToDate[i] == true) continue;
+            needsUpdating.push(new Array(i, sequencer.session.pipeline.uids[i], sequencer.session.pipeline.types[i]));
+            args.push({
+                uid: sequencer.session.pipeline.uids[i],
+                type: sequencer.session.pipeline.types[i]
+            });        
+        }
+        
+        requestString = "args="+JSON.stringify(args);
+        newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){
+            console.log(result.responseText);
+            insertNewObjects(result.responseText, needsUpdating);
+        }, true);
+        
+        // Optional bit with the loading GIF
+        for (var i = 0; i < needsUpdating.length; i++) {
+            var loadingDiv = ce("div");
+            loadingDiv.className = "displayStep loading";
+            loadingDiv.innerHTML = "<img src='images/ui/ajax-loader-round.gif' />";
+            if (needsUpdating[i][0] > sequencer.state.numSteps-1) {
+                content.appendChild(loadingDiv);
+                sequencer.state.numSteps++;
+            }
+            else {
+                content.replaceChild(loadingDiv, content.childNodes[i][0]*2);
+            }
+        }
+        updateDividers();
+    // End optional
+    }
+}
+
+// THIS NEEDS SOME WORK! A LOT OF IT ACTUALLY!
+function updateSequencer_Survey() {
+    
+    var content = ge("seqContentWrapper");
+    var requestString, needsUpdating, args;
+    // Create a reference to the correct field, this might not be needed if we do not generalize the updateSequencer function and instead keep two separate update functions for separate content types.
+    var variables = sequencer.survey;
+    
+    if (sequencer.state.loaded == false || sequencer.settings.efficientUpdating == false) {  // This is the first update of the sequencer since page load, therefore it contains no previous steps
+        // Stop running this function if the questions array does not contain any elements to draw
+        if (sequencer.survey.questions.uids.length == 0 || !sequencer.survey.questions.uids.length) return;
+        // First clear the entire content wrapper, just for safety and in case efficientUpdating is off
+        while (content.firstChild) {
+            content.removeChild(content.firstChild);
+        }
+        args = [];
+        needsUpdating = [];
+        for (var i = 0; i < sequencer.survey.questions.uids.length; i++) {
+            args.push({
+                uid: sequencer.survey.questions.uids[i],
+                type: "Question"
+            });
+            needsUpdating.push(new Array(i, sequencer.survey.questions.uids[i], "Question"));
+        }
+        
+        requestString = "args="+JSON.stringify(args);
+        newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){
+            content.removeChild(loadingGif);
+            insertNewObjects(result.responseText, needsUpdating);
+            sequencer.state.loaded = true;
+        }, true);
+        sequencer.state.loaded = false;
+        var loadingGif = ce("div");
+        loadingGif.innerHTML = "<img src='images/ui/ajax-loader-round.gif' style='float: left; margin:auto auto;' />";
+        content.appendChild(loadingGif);
+    }
+    else {
+
+        // This means that one or more steps are being added, not an entire pipeline's worth of them
+        needsUpdating = new Array();
+        args = [];
+        // Add steps that need updating to the needsUpdating array (index, uid, type).
+        for (var i = 0; i < sequencer.survey.questions.uids.length; i++) {
+            if (sequencer.survey.questions.upToDate[i] == true) continue;
+            needsUpdating.push(new Array(i, sequencer.survey.questions.uids[i], "Question"));
+            args.push({
+                uid: sequencer.survey.questions.uids[i],
+                type: "Question"
+            });        
+        }
+        
+        requestString = "args="+JSON.stringify(args);
+        newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){
+            //console.log(result.responseText);
+            insertNewObjects(result.responseText, needsUpdating);
+        }, true);
+        
+        // Optional bit with the loading GIF
+        for (var i = 0; i < needsUpdating.length; i++) {
+            var loadingDiv = ce("div");
+            loadingDiv.className = "displayStep loading";
+            loadingDiv.innerHTML = "<img src='images/ui/ajax-loader-round.gif' />";
+            if (needsUpdating[i][0] > sequencer.state.numSteps-1) {
+                content.appendChild(loadingDiv);
+                sequencer.state.numSteps++;
+            }
+            else {
+                content.replaceChild(loadingDiv, content.childNodes[i][0]*2);
+            }
+        }
+        updateDividers();
+    // End optional
+        
+    }
+        
+}
+
+function updateDividers() {
+    // Function that checks for correct number of dividers in the pipeline, adds or deletes as needed.
+    
+    var content = ge("seqContentWrapper");
+    // Loop through all elements in seqContentWrapper
+    for (var i = 0; i < content.childNodes.length; i++) {
+        var element = content.childNodes[i];
+        // If the element is not a displayStep, continue with the next childNode.
+        if (!hasClass(element, "displayStep")) {
+            continue;
+        }
+        // Get the two elements next to the current element, if they don't exist or are not displaySteps, store false.
+        var lastElement = (element.previousSibling && element.previousSibling.nodeName == "DIV") ? element.previousSibling : false;
+        var nextElement = (element.nextSibling && element.nextSibling.nodeName == "DIV") ? element.nextSibling : false;
+        // If these elements exist, and they are not dividers, add an element in between.
+        if (lastElement != false) {
+            if (!hasClass(lastElement, "divider")){
+                var newDivider = ce("div");
+                addClass(newDivider, "divider");
+                addClass(newDivider, sequencer.settings.content.orientation);
+                content.insertBefore(newDivider, element);
+                delete newDivider;
+            }
+        }
+        if (nextElement != false) {
+            if (!hasClass(nextElement, "divider")){
+                var newDivider = ce("div");
+                addClass(newDivider, "divider");
+                addClass(newDivider, sequencer.settings.content.orientation);
+                content.insertBefore(newDivider, nextElement);
+                delete newDivider;
+            }
+        }
+    }
+    
+    // Because updateDividers is always called last, we set updating to false here, so the user can again issue commands to the pipeline
+    sequencer.state.updating = false;   // Re-enable new actions
+}
+
+// Adding new objects
+
+function submitToolbox(type) {
+    // Handles new object creation code when user clicks on a toolbox button
+    
+    // Do not accept new creation requests if the sequencer is still updating a previous object.
+    if (sequencer.state.updating == true) return;
+    sequencer.state.updating = true;
+    deselectStep();    
+    var c = "objectToCreate="+type;
+    var u = "createObject.php";
+        
+    newAjaxRequest(c, u, function(result) {
+        sequencer.session.pipeline.uids.push(removeNL(result.responseText));
+        sequencer.session.pipeline.types.push(type);
+        sequencer.session.pipeline.upToDate.push(false);
+        updateSequencer();
+    }, true);
+}
+
+function insertNewObjects(responseText, needsUpdating) {
+    //console.log(responseText);
+    // Container function that calls different insertNewX() functions depending on content type. Called from updateSequencer().
+    var response = JSON.parse(responseText);
+    // For now I assume that only one type of element can be displayed in the editor at one time. Therefore, the type of response[0] is the type of all elements of response.
+    switch (sequencer.settings.content.contentType.toLowerCase()) {
+        case "session":
+            insertNewSteps(response, needsUpdating);
+            break;
+        case "survey":
+            insertNewQuestions(response, needsUpdating);
+            break;
+        default:
+            break;
+                
+    }
+}
+
+function addQuestion_Click() {
+    if (sequencer.state.updating == true) return;
+    sequencer.state.updating = true;
+    deselectStep();    
+    var c = "objectToCreate=question";
+    var u = "createObject.php";
+        
+    newAjaxRequest(c, u, function(result) {
+        sequencer.survey.questions.uids.push(removeNL(result.responseText));
+        sequencer.survey.questions.upToDate.push(false);
+        updateSequencer();
+    }, true);
+}
+
+//> Session specific
+
+function insertNewSteps(response, needsUpdating) {
+    /*
+         * This is a function displaying how to handle the visual object representation in solely javascript.
+         * Communication of relevant variables between PHP and JS happens in JSON format.
+         * PHP returns a JSON array of objects to be created by JS
+         * JS then loops through this array and creates DIVS to be inserted into the sequencer.
+         * These are inserted at the position needsUpdating gives us.
+         */
+    var content = ge("seqContentWrapper");
+    // Remove optional loading images
+    for (var  i = 0; i < content.childNodes.length; i++) {
+        if (hasClass(content.childNodes[i], "loading")) {
+            content.removeChild(content.childNodes[i]);
+        }
+    }
+    // End optional
+    
+    for (var i = 0; i < response.length; i++) {
+        var tempDiv = ce("div");
+        tempDiv.id = response[i].uid;
+        tempDiv.className = "displayStep";
+        var divImageContainer = ce("div");
+        divImageContainer.className = "displayStepIcon";
+        divImageContainer.addEventListener("click", function(){
+            clickStep(this.parentNode.id); 
+        }, false);
+        var divImage = ce("img");
+        divImage.src = "images/icons/"+response[i].type.toLowerCase()+".png";
+        divImageContainer.appendChild(divImage);
+        tempDiv.appendChild(divImageContainer);
+        var divLabel = ce("p");
+        divLabel.innerHTML = response[i].title;
+        tempDiv.appendChild(divLabel);
+        
+        // This for needs to loop backwards so that the steps at the end of the pipeline are added or changed first. This keeps the childNodes index for all further steps intact.
+        for (var j = needsUpdating.length-1; j >= 0; j--) {
+            if (needsUpdating[j][1] != response[i].uid) continue;
+            if (needsUpdating[j][0] > sequencer.state.numSteps-1) {
+                content.appendChild(tempDiv);
+            }
+            else {
+                content.replaceChild(tempDiv, content.childNodes[j][0]*2);
+            }
+            sequencer.session.pipeline.upToDate[needsUpdating[j][0]] = true;
+        }
+    }
+    
+    updateDividers();
+}
+
+function deleteStep() {
+    // Delete a step from both the pipeline.uids variable and its visual representation from the sequencer. Does not actually delete object from database!
+    
+    // check if a step is selected
+    if (sequencer.state.selectedObject.uid == null) {
+        return;
+    }
+    var uid = sequencer.state.selectedObject.uid;
+    // deselect the step to reset the info panel and selection code
+    deselectStep();
+    // splice the step's data from the pipeline
+    var index = sequencer.session.pipeline.uids.indexOf(uid);
+    if (index >= 0 && index < sequencer.session.pipeline.uids.length) {
+        sequencer.session.pipeline.uids.splice(index, 1);
+        sequencer.session.pipeline.types.splice(index, 1);
+        sequencer.session.pipeline.upToDate.splice(index, 1);
+        // Then delete the step visually
+        var element = ge(uid);
+        var divider;
+        if (!element.nextSibling) {
+            // the element is at the end of the pipeline
+            // therefore we remove the previous divider.
+            // Note: it could also be the only element left in the pipeline!
+            divider = (element.previousSibling) ? element.previousSibling : false;
+            if (divider != false) {
+                divider.parentNode.removeChild(divider);
+            }
+        }
+        else {
+            // the element is at any position except the last, therefore we remove the next divider
+            divider = (element.nextSibling) ? element.nextSibling : false;
+            if (divider != false) {
+                divider.parentNode.removeChild(divider);
+            }
+        }
+        
+        // Finally, remove the element itself.
+        element.parentNode.removeChild(element);
+        sequencer.state.numSteps--;
+        
+    }
+}
+
+//> Survey specific
+
+function insertNewQuestions(response, needsUpdating) {
+    //Code that inserts or replaces new object displays in the sequencer. Question version.
+    var content = ge("seqContentWrapper");
+    // Loop through returned question objects
+    for (var i = 0; i < response.length; i++) {
+        
+        /*
+         * The following block of code defines the layout and composition of the question display
+         */
+        
+        // Define the outer frame
+        var frameDiv = ce("div");
+        frameDiv.className = "smallFrame question";
+        frameDiv.id = response[i].uid;
+        var titleDiv = ce("div");
+        titleDiv.className = "smallTitle";
+        var numberDiv = ce("div");
+        numberDiv.className = "listNumber";
+        numberDiv.innerHTML = i.toString();
+        titleDiv.appendChild(numberDiv);
+        titleDiv.innerHTML += response[i].uid;
+        frameDiv.appendChild(titleDiv);
+        
+        // The frame now has a header bar
+        // On to the content frame
+        // Will use new "ce();" function, shorthand for ce
+        
+        var contentDiv = ce("div");
+        contentDiv.className = "content";
+        var questionBody = ce("p");
+        questionBody.innerHTML = response[i].description;
+        var questionParamsDiv = ce("div");
+        questionParamsDiv.className = "questionParamsView";
+        questionParamsDiv.innerHTML = "Object type: "+response[i].type;
+        contentDiv.appendChild(questionBody);
+        contentDiv.appendChild(questionParamsDiv);
+        frameDiv.appendChild(contentDiv);
+        
+        // And finally the controls div
+        var controlsDiv = ce("div");
+        controlsDiv.className = "controls";
+        var editButton = ce("input");
+        var removeButton = ce("input");
+        editButton.value = "Edit";
+        removeButton.value = "Remove";
+        editButton.className = "smallButton";
+        removeButton.className = "smallButton";
+        editButton.addEventListener("click", function(e){
+            alert('Editing not yet supported!');
+        }, false);
+        removeButton.addEventListener("click", function(e){
+            alert('Removing not yet supported!');
+        }, false);
+        controlsDiv.appendChild(editButton);
+        controlsDiv.appendChild(removeButton);
+        frameDiv.addEventListener("click", function(){
+            clickStep(this.id);
+        }, false);
+        frameDiv.appendChild(controlsDiv);
+        
+        /* 
+         * This is where the layout code ends
+         * We proceed to insertion of the created DIV into the document
+         */ 
+        
+        // We now have a full question display DIV contained in the frameDiv variable. We should now add this to the sequencer content.
+        for (var j = needsUpdating.length - 1; j >= 0; j--) {
+            if (needsUpdating[j][1] != response[i].uid) continue;
+            if (needsUpdating[j][0] > sequencer.state.numSteps-1) {
+                content.appendChild(frameDiv);
+                sequencer.state.numSteps++;
+            }
+            else {
+                content.replaceChild(frameDiv, content.childNodes[needsUpdating[j][0]*2]);
+            }
+            sequencer.survey.questions.upToDate[needsUpdating[j][0]] = true;
+            
+        }
+    }
+    
+    sequencer.state.updating = false;   //re-enable user commands
+}
+
+function saveSurvey(confirmSave) {
+    // Sends an AJAX request to the PHP server that saves the current object.
+    var answer = (confirmSave == true) ? confirm("Save changes?") : true;
+    if (answer == false) return;
+    
+    // Check for object type being edited, adjust requestString and target URL to this information.
+    var request = new Object(), url, requestString;
+    switch (sequencer.settings.content.contentType.toLowerCase()) {
+        case "survey":
+            url = "saveSurvey.php";
+            request.title = sequencer.survey.title;
+            request.uid = sequencer.survey.uid;
+            request.description = sequencer.survey.description;
+            request.questions = new Object();
+            request.questions.uids = sequencer.survey.questions.uids;
+            requestString = "args="+JSON.stringify(request);
+            console.log(request);
+            newAjaxRequest(requestString, url, function(result){
+                console.log(result.responseText);
+            }, true);
+            break;
+        case "blaaaat":
+            url = "savesession.php";
+            request.pipeline.uids = sequencer.session.pipeline.uids;
+            request.pipeline.types = sequencer.session.pipeline.types;
+            break;
+    }
+}
+
+// general functions and user actions
+
+function clickStep(uid) {
+    // Handles selection of steps
+    
+    if (uid == sequencer.state.selectedObject.uid) {  // user deselected a currently selected step.
+        deselectStep();
+    }
+    else {
+        if (sequencer.state.selectedObject.uid != undefined && sequencer.state.selectedObject.uid != "") {
+            // Change selection if something is already selected
+            deselectStep();
+            selectStep(uid);
+        }
+        else {
+            // Make new selection if nothing was selected
+            selectStep(uid);
+        }        
+    }
+}
+
+function selectStep(uid) {
+    // Called from clickStep(), manages CSS class assignment and updating of state variables. Also calls for info panel update.
+    
+    var element = ge(uid);
+    if (element) {
+        addClass(element, "selected");
+        var type;
+        switch (sequencer.settings.content.contentType.toLowerCase()) {
+            case "session":
+                type = sequencer.session.pipeline.types[sequencer.session.pipeline.uids.indexOf(uid)];
+                break;
+            case "survey":
+                type = "Question";
+                break;
+            default:
+                //Dunno
+                break;
+        }
+        (type != "survey") ? ajaxInfoRequest(uid, ge("infoPanelContent"), type) : type=type /*This does nothing*/;
+        sequencer.state.selectedObject.uid = uid;
+        sequencer.state.selectedObject.index = null;  //Don't know how to do this yet.
+    }
+}
+
+function deselectStep() {
+    // Called from clickStep(). Handles unassignment and updating of state variables. Clears info panel.
+    
+    if (!sequencer.state.selectedObject.uid) return;
+    var element = ge(sequencer.state.selectedObject.uid);
+    removeClass(element, "selected");
+    sequencer.state.selectedObject.uid = null;
+    sequencer.state.selectedObject.index = null;
+    var infoPanel = ge("infoPanelContent");
+    if (infoPanel) {
+        while (infoPanel.firstChild) infoPanel.removeChild(infoPanel.firstChild);
+    }
+}
+
+
+
+function savePipeline (confirmSave) {
+    // Sends an AJAX request to the PHP server that saves the current pipeline. Does not yet support surveys.
+    
+    // First check if user should confirm save action or not.
+    var answer;
+    if (confirmSave == true) {
+        answer = confirm("Save changes to pipeline?");
+    }
+    else {
+        answer = true;
+    }
+    if (answer == false) return;
+    // Then compose requestString for savesession.php, containing pipeline uids, types and the session uid.
+    // TODO: should eventually include stuff like session name as well!
+    var requestString = "uids=";
+    requestString += arrayToString(sequencer.session.pipeline.uids, ",");
+    requestString = requestString.slice(0, requestString.length - 1);   // remove trailing commas
+    requestString += "&types=";
+    requestString += arrayToString(sequencer.session.pipeline.types, ",");
+    requestString = requestString.slice(0, requestString.length - 1);   // remove trailing commas
+    requestString += "&sessionUid=";
+    requestString += sequencer.session.uid;
+    console.log(requestString);
+    newAjaxRequest(requestString, "savesession.php", function(result){
+        console.log(result.responseText);
+    }, true);
+}
+
+function editStep() {
+    // Redirects the browser to the appropriate editor for the selected step type.
+    
+    // first save
+    savePipeline(false);
+    // Then post relevant information so the next editor page knows what object it is supposed to be editing.
+    var postForm = ce("form");
+    var type = sequencer.session.pipeline.types[sequencer.session.pipeline.uids.indexOf(sequencer.state.selectedObject.uid)];
+    postForm.action = type.toLowerCase()+"Editor.php";
+    postForm.method = "POST";
+    var objectUid = ce("input");
+    objectUid.type = "hidden";
+    objectUid.name = "objectUid";
+    objectUid.value = sequencer.state.selectedObject.uid;
+    postForm.appendChild(objectUid);
+    postForm.submit();
+}
+
+function moveStep (direction) {
+    // Moves the selected step up/down (left/right) in the pipeline.
+    
+    // Check if a step is selected
+    if (sequencer.state.selectedObject.uid == null || direction == null) return;
+    // Check if the step is not at either end of the pipeline
+    var index = sequencer.session.pipeline.uids.indexOf(sequencer.state.selectedObject.uid);
+    if (index == -1) return;
+    if ((index < 0) || (index >= sequencer.session.pipeline.uids.length) || (index == 0 && direction == -1) || (index == sequencer.session.pipeline.uids.length - 1 && direction == 1)) {
+        alert("Cannot move out of bounds!");
+        return;
+    }
+    
+    // Find the two elements in the editor content display
+    var content = ge("seqContentWrapper");
+    var element = ge(sequencer.session.pipeline.uids[index]);
+    var otherElement = ge(sequencer.session.pipeline.uids[index+direction]);
+    // First buffer the two elements
+    var tempElement = element.cloneNode(true);
+    var tempOtherElement = otherElement.cloneNode(true);
+    var placeHolderElement = ce("div");
+    placeHolderElement.id = "placeholder_element";
+    content.replaceChild(placeHolderElement, otherElement);
+    content.replaceChild(tempOtherElement, element);
+    content.replaceChild(tempElement, placeHolderElement);
+    //This should work.
+    // A-B     Start positions, backup to tA and tB
+    // A-X     Replace B with placeholder X
+    // B-X     Replace A with tB
+    // B-A     Replace placeholder X with tA.
+    // The two elements are now swapped.
+     
+    // Now swap the array entries.
+    sequencer.session.pipeline.uids[index] = sequencer.session.pipeline.uids.splice(index+direction, 1, sequencer.session.pipeline.uids[index])[0];
+    sequencer.session.pipeline.types[index] = sequencer.session.pipeline.types.splice(index+direction, 1, sequencer.session.pipeline.types[index])[0];
+    
+    // Finally, rebind the onCLick events to work properly again. I don't know if this 'clones' the event as well (therefore re-adding them casuses memory bloat...) or not.
+    for (var i = 0; i < tempOtherElement.childNodes.length; i++){
+        var childNode = tempOtherElement.childNodes[i];
+        if (hasClass(childNode, "displayStepIcon")) {
+            childNode.addEventListener("click", function() {
+                clickStep(this.parentNode.id);
+            }, false);
+        }
+    }
+    for (var i = 0; i < tempElement.childNodes.length; i++){
+        var childNode = tempElement.childNodes[i];
+        if (hasClass(childNode, "displayStepIcon")) {
+            childNode.addEventListener("click", function() {
+                clickStep(this.parentNode.id);
+            }, false);
+        }
+    }
+    
+    
+    
+     
+// The alternative is to use event bubbling to capture the event on a higher level.
+// Basically, we bind a super-structure onclick event that uses e.target|| event.srcElement to determine which element to move and select.
+// http://stackoverflow.com/questions/29624/how-to-maintain-correct-javascript-event-after-using-clonenodetrue
+// Pro: clean implementation, less events binded.
+// Con: Difficult, this already works fine, probably tougher to use in conjunction with multifunctionality (sessions, surveys, questionsets, etc in one kind of editor)
+     
+}
+
+// WORK IN PROGRESS
+
+
+
+
+
+
+
+
+/******************/
+/* TEMP FUNCTIONS */
+/******************/
+
+// Temp function that creates a dummy question to test the insertNewQuestions function.
+// NOTE: CAN BE REMOVED!
+function debug_addQuestion() {
+    // Derp, natuurlijk werkt de addQuestion call niet twee keer. Hij creeert twee keer exact hetzelfde object. Bottom line: het werkt. Nu de editing code voor deze questions gaan schrijven!
+    var response = [{
+        uid: "1234567890testuid",
+        title: "dummyQuestion",
+        description: "This is a dummy question, not a real one!",
+        type: "question"
+    }];
+    
+    var needsUpdating = [[
+    0,
+    "1234567890testuid",
+    "question"
+    ]];
+    
+    insertNewQuestions(response, needsUpdating);
+}
+
+// Temp function that articially switches content type when the page is already loaded, to easily test layout changes and content flow.
+// NOTE: CAN BE REMOVED!
+function debug_switchType() {
+    var content = ge("seqContent");
+    if (sequencer.settings.content.contentType == "session") {
+        // Set to survey
+        sequencer.settings.content.contentType = "survey";
+        sequencer.settings.content.orientation = "vertical";
+        removeClass(content, "horizontal");
+        addClass(content, "vertical");
+    }
+    else {
+        // Set to session
+        sequencer.settings.content.contentType = "session";
+        sequencer.settings.content.orientation = "horizontal";
+        removeClass(content, "vertical");
+        addClass(content, "horizontal");
+    }
+}
Index: Dev/branches/Demo/logout.php
===================================================================
--- Dev/branches/Demo/logout.php	(revision 225)
+++ Dev/branches/Demo/logout.php	(revision 225)
@@ -0,0 +1,10 @@
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<?php
+require 'classes/master.php';
+
+session_destroy();
+redirect("index.php");
+?>
Index: Dev/branches/Demo/mainmenu.php
===================================================================
--- Dev/branches/Demo/mainmenu.php	(revision 225)
+++ Dev/branches/Demo/mainmenu.php	(revision 225)
@@ -0,0 +1,57 @@
+<?php
+require 'classes/master.php'; //should be at top of every page   
+     
+if (isset($_POST['login'])) {
+    if ($_POST['username'] == '')
+        die("Please log in!");
+    else {
+        $userDBI = new UserDatabaseInterface();
+        $user_exists = $userDBI->checkUserName($_POST['username']);
+        if ($user_exists) {
+            $correct_password = $userDBI->checkUserPassword($_POST);
+            /* session remembers login */
+            if (!$correct_password)
+                die("The password you entered is not correct!");
+            else
+                $_SESSION['username'] = $_POST['username'];
+        }
+        else
+            die("Unknown user name");
+    }
+}
+else if (is_null($_SESSION['username']))
+    redirect('index.php');
+
+$surveys = Loader::loadSurveys();
+$applications = Loader::loadApplications();
+?>
+
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title>Facilitator</title>
+        <?php new StyleSheet(); ?>
+        <script type="text/javascript" src="js/menu.js"></script>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+
+            <div id="content">
+                                
+                    <?php new SessionMenu(); ?>
+
+                    <?php new ApplicationMenu($applications); ?>
+                
+                    <?php new SurveyMenu($surveys); ?>
+                
+                    <?php new QuestionMenu(); ?>
+
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/questionEditor.php
===================================================================
--- Dev/branches/Demo/questionEditor.php	(revision 225)
+++ Dev/branches/Demo/questionEditor.php	(revision 225)
@@ -0,0 +1,53 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+?>
+
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title></title>
+        <script type="text/javascript" src="js/questionEditorScripts.js"></script>
+        <?php new StyleSheet("awesome"); ?>
+    </head>
+    <body>
+        <div id="wrapper">
+            <div id="content">
+                <div id="questionEditor">
+                    <div id="questionEditor_header">
+                        Editing: <span id="header_identifier">#QUESTION-IDENT-NO</span>
+                    </div>
+                    <div id="questionEditor_content">
+                        <h2>Question text:</h2>
+                        <div id="questionEditor_bodyText">
+                            <textarea id="questionEditor_bodyText_textArea" onKeyUp="resizeTextArea();">THIS IS THE QUESTION BODY TEXT. CLICK HERE TO EDIT!</textarea>
+                        </div>
+                        <div id="questionEditor_questionParams" >
+                            <label for="questionIdentifierField" class="formLineBreak">Question tag:</label> <input type="text" id="questionIdentifierField" class="questionParamField" onChange="updateIdentifier();" />
+
+                            <label for="questionType" class="formLineBreak">Answer type:</label>
+                            <select id="questionType" onChange="selectAnswerType();" class="questionParamField">
+                                <option value=""></option>
+                                <option value="int">Integer</option>
+                                <option value="scale">Scale</option>
+                                <option value="choice">Multiple choice</option>
+                                <option value="text">Text</option>
+                            </select>
+
+
+
+                        </div>
+                    </div>
+                    <div id="questionEditor_controls">
+                        <input type="button" id="discard" value="Discard" />
+                        <input type="button" value="Save" />
+                    </div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/questioncreation.php
===================================================================
--- Dev/branches/Demo/questioncreation.php	(revision 225)
+++ Dev/branches/Demo/questioncreation.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+require 'classes/master.php';
+$questionDBI = new QuestionCreationDatabaseInterface();
+/* If a question is saved */
+if(isset($_POST['questionCode']))
+{
+    echo $questionDBI->setQuestionInfo($_POST); // save to DB
+}
+
+$questions = Loader::loadFullQuestions();
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+            <title>Question Database</title>
+            <?php new StyleSheet(); ?>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+        <div id="wrapper">
+
+            <div id="content">
+                <?php var_dump($_POST);      ?>
+                <?php
+                    new QuestionCreationTool($questions);
+                ?>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/rdfConstants.php
===================================================================
--- Dev/branches/Demo/rdfConstants.php	(revision 225)
+++ Dev/branches/Demo/rdfConstants.php	(revision 225)
@@ -0,0 +1,64 @@
+<?php
+define("RDFAPI_INCLUDE_DIR", "rdfapi/");
+
+// Constants for defining namespaces, resources, predicates, datatypes, questiontypes for RDF database
+
+// Default namespace for survey tool
+define('SURVEYTOOL_NAMESPACE','http://tbm.tudelft.nl/researchtool/');
+define('SURVEYTOOL_RESOURCES_NAMESPACE',SURVEYTOOL_NAMESPACE . 'resources/');
+define('SURVEYTOOL_PREDICATES_NAMESPACE',SURVEYTOOL_NAMESPACE . 'predicates/');
+
+// Resource used for RDF triples
+define('USER',SURVEYTOOL_RESOURCES_NAMESPACE . 'user');
+define('SURVEY',SURVEYTOOL_RESOURCES_NAMESPACE . 'survey');
+define('QUESTION',SURVEYTOOL_RESOURCES_NAMESPACE . 'question');
+define('APPLICATION',SURVEYTOOL_RESOURCES_NAMESPACE . 'application');
+define('ANSWER', SURVEYTOOL_RESOURCES_NAMESPACE . 'answer');
+define('ANSWERSET', SURVEYTOOL_RESOURCES_NAMESPACE . 'answerset');
+define('SESSION',SURVEYTOOL_RESOURCES_NAMESPACE . 'session');
+define('DASHBOARD',SURVEYTOOL_RESOURCES_NAMESPACE . 'dashboard');
+define('GRAPH',SURVEYTOOL_RESOURCES_NAMESPACE . 'graph');
+define('DATA',SURVEYTOOL_RESOURCES_NAMESPACE . 'data');
+define('RESPONDENT',SURVEYTOOL_RESOURCES_NAMESPACE . 'respondent');
+define('APPDATA',SURVEYTOOL_RESOURCES_NAMESPACE . 'graph');
+define('SESSIONINSTANCE', SURVEYTOOL_RESOURCES_NAMESPACE . 'sessioninstance');
+define('RESULTSET', SURVEYTOOL_RESOURCES_NAMESPACE . 'resultset');
+
+// Predicates used for RDF triples
+define('UID',SURVEYTOOL_PREDICATES_NAMESPACE . 'uid');
+define('NAME',SURVEYTOOL_PREDICATES_NAMESPACE . 'name');
+define('PASSWORD',SURVEYTOOL_PREDICATES_NAMESPACE . 'password');
+define('CREATOR',SURVEYTOOL_PREDICATES_NAMESPACE . 'creator');
+define('TITLE',SURVEYTOOL_PREDICATES_NAMESPACE . 'title');
+define('DESCRIPTION',SURVEYTOOL_PREDICATES_NAMESPACE . 'description');
+define('DATETIME',SURVEYTOOL_PREDICATES_NAMESPACE . 'datetime');
+define('PART_OF',SURVEYTOOL_PREDICATES_NAMESPACE . 'part_of');
+define('STYLE',SURVEYTOOL_PREDICATES_NAMESPACE . 'style');
+define('RTYPE',SURVEYTOOL_PREDICATES_NAMESPACE . 'resource_type');
+define('QTYPE',SURVEYTOOL_PREDICATES_NAMESPACE . 'question_type');
+define('QCODE',SURVEYTOOL_PREDICATES_NAMESPACE . 'question_code');
+define('ANSWERED',SURVEYTOOL_PREDICATES_NAMESPACE . 'answered');
+define('QCATEGORY',SURVEYTOOL_PREDICATES_NAMESPACE . 'question_category');
+define('HAS_QUESTION',SURVEYTOOL_PREDICATES_NAMESPACE . 'has_question');
+define('HAS_ANSWER',SURVEYTOOL_PREDICATES_NAMESPACE . 'has_answer');
+define('HAS_GRAPH',SURVEYTOOL_PREDICATES_NAMESPACE . 'has_graph');
+define('HAS_PROCESS',SURVEYTOOL_PREDICATES_NAMESPACE . 'has_process');
+define('INDEX',SURVEYTOOL_PREDICATES_NAMESPACE . 'index');
+define('GRAPH_TYPE',SURVEYTOOL_PREDICATES_NAMESPACE . 'graph_type');
+define('HAS_DATA',SURVEYTOOL_PREDICATES_NAMESPACE . 'has_data');
+define('DATA_TYPE',SURVEYTOOL_PREDICATES_NAMESPACE . 'data_type');
+define('FOR_SURVEY',SURVEYTOOL_PREDICATES_NAMESPACE . 'for_survey');
+define('BY_RESPONDENT',SURVEYTOOL_PREDICATES_NAMESPACE . 'by_respondent');
+define('GIVEN_ANSWER',SURVEYTOOL_PREDICATES_NAMESPACE . 'given_answer');
+define('HAS_APPLICATION', SURVEYTOOL_PREDICATES_NAMESPACE . 'has_application');
+define('HAS_SURVEY', SURVEYTOOL_PREDICATES_NAMESPACE . 'has_survey');
+define('HAS_ANSWERSET', SURVEYTOOL_PREDICATES_NAMESPACE . 'has_answerset');
+define('LOCATION', SURVEYTOOL_PREDICATES_NAMESPACE . 'location');
+define('FACILITATOR', SURVEYTOOL_PREDICATES_NAMESPACE . 'facilitator');
+define('STARTTIME', SURVEYTOOL_PREDICATES_NAMESPACE . 'starttime');
+define('ENDTIME', SURVEYTOOL_PREDICATES_NAMESPACE . 'endtime');
+define('HAS_NOTE', SURVEYTOOL_PREDICATES_NAMESPACE . 'has_note');
+define('OF_SESSION', SURVEYTOOL_PREDICATES_NAMESPACE . 'of_session');
+define('HAS_RESULTSET', SURVEYTOOL_PREDICATES_NAMESPACE . 'has_resultset');
+define('CREATIONDATE', SURVEYTOOL_PREDICATES_NAMESPACE . 'creationdate');
+?>
Index: Dev/branches/Demo/rdfapi/RdfAPI.php
===================================================================
--- Dev/branches/Demo/rdfapi/RdfAPI.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/RdfAPI.php	(revision 225)
@@ -0,0 +1,19 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// RDF API for PHP 
+// ----------------------------------------------------------------------------------
+// @version                  : $Id: RdfAPI.php 268 2006-05-15 05:28:09Z tgauss $
+// Authors                   : Chris Bizer (chris@bizer.de),
+//                             Radoslaw Oldakowski (radol@gmx.de)
+// Description               : This file includes constatns and model package.
+// ----------------------------------------------------------------------------------
+
+
+// Include Constants and base Object
+require_once( RDFAPI_INCLUDE_DIR . 'constants.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'util/Object.php' );
+include_once( RDFAPI_INCLUDE_DIR . PACKAGE_MODEL);
+
+
+?>
Index: Dev/branches/Demo/rdfapi/constants.php
===================================================================
--- Dev/branches/Demo/rdfapi/constants.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/constants.php	(revision 225)
@@ -0,0 +1,418 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Constants
+// ----------------------------------------------------------------------------------
+// @version                  : $Id: constants.php 558 2008-02-29 15:14:04Z cax $
+// Authors                   : Chris Bizer (chris@bizer.de),
+//                             Daniel Westphal (dawe@gmx.de),
+//							   Leandro Mariano Lopez (llopez@xinergiaargentina.com),
+//                             Radoslaw Oldakowski (radol@gmx.de)
+//
+// Description               : Constants and default configuration
+// ----------------------------------------------------------------------------------
+
+
+
+// ----------------------------------------------------------------------------------
+// General
+// ----------------------------------------------------------------------------------
+
+define('RDFAPI_ERROR', 'RDFAPI error ');
+define('DEFAULT_ALGORITHM', 'MD5');
+define('DEFAULT_ENCODING', 'UTF-8');
+define('INDENTATION', '   ');
+define('LINEFEED', chr(10));
+
+// ----------------------------------------------------------------------------------
+// RAP Packages
+// ----------------------------------------------------------------------------------
+define('PACKAGE_MODEL','model/ModelP.php');
+define('PACKAGE_UTILITY','util/Utility.php');
+define('PACKAGE_DBASE','model/DBase.php');
+define('PACKAGE_SYNTAX_RDF','syntax/SyntaxRDF.php');
+define('PACKAGE_SYNTAX_N3','syntax/SyntaxN3.php');
+define('PACKAGE_SYNTAX_JSON','syntax/SyntaxJSON.php');
+define('PACKAGE_SYNTAX_GRDDL','syntax/SyntaxGRDDL.php');
+define('PACKAGE_VOCABULARY','vocabulary/Vocabulary.php');
+define('PACKAGE_RDQL','rdql/RDQL.php');
+define('PACKAGE_INFMODEL','infModel/InfModelP.php');
+define('PACKAGE_RESMODEL','resModel/ResModelP.php');
+define('PACKAGE_ONTMODEL','ontModel/OntModelP.php');
+define('PACKAGE_DATASET','dataset/DatasetP.php');
+define('PACKAGE_SPARQL','sparql/SPARQL.php');
+define('PACKAGE_SYNTAX_RSS','syntax/SyntaxRSS.php');
+define('PACKAGE_SYNTAX_SPARQLRES','syntax/SyntaxSparqlRes.php');
+
+// ----------------------------------------------------------------------------------
+// Model
+// ----------------------------------------------------------------------------------
+
+// Defines a prefix used in the ID of automatically created bNodes.
+define('BNODE_PREFIX', 'bNode');
+
+// Sets the index of MemModell:
+// IND_DEF: Defaultindex over subject, predicate, obeject seperate.
+// IND_SPO: Index over subject+predicate+object.
+// IND_SP:  Index over subject+predicate.
+// IND_SO:  Index over subject+object.
+define('NO_INDEX',-1);
+define('IND_DEF',0);
+define('IND_SPO',1);
+define('IND_SP',2);
+define('IND_SO',3);
+define('INDEX_TYPE',IND_DEF);
+
+// ----------------------------------------------------------------------------------
+// ModelFactory
+// ----------------------------------------------------------------------------------
+
+define ('MEMMODEL','MemModel');
+define ('DBMODEL','DbModel');
+define ('INFMODELF','InfModelF');
+define ('INFMODELB','InfModelB');
+define ('ONTMODEL','OntModel');
+define ('RESMODEL','ResModel');
+define ('RDFS_VOCABULARY','RdfsVocabulary.php');
+
+// ----------------------------------------------------------------------------------
+// Parser
+// ----------------------------------------------------------------------------------
+
+// RdfParser: Set this option to false if you want to use IDs containing CombiningChars or
+// Extenders (see http://www.w3.org/TR/REC-xml-names/#NT-NCName). If set to TRUE, they're assumed to be invalid.
+define('VALIDATE_IDS', TRUE);
+
+// RdfParser: Set this option to true if you want to parse UNICODE documents.
+// WARNING: Setting the option TRUE significantly slows down the RDF-parser.
+define('UNIC_RDF', FALSE);
+
+// RdfParser: Set this option to true if you want to make sure that the created RDF-model doesnt contain
+// duplicate RDF-statements. WARNING: Setting the option TRUE significantly slows down the RDF-parser.
+define('CREATE_MODEL_WITHOUT_DUPLICATES', FALSE);
+
+// N3 and N-Triple-Parser: Set this option to true in order to override the given bnode
+// labels and rename them to the defined BNODE_PREFIX
+define('FIX_BLANKNODES', TRUE);
+
+define('NAMESPACE_SEPARATOR_CHAR','^');
+define('NAMESPACE_SEPARATOR_STRING','^');
+define('IN_TOP_LEVEL',0);
+define('IN_RDF',1);
+define('IN_DESCRIPTION',2);
+define('IN_PROPERTY_UNKNOWN_OBJECT',3);
+define('IN_PROPERTY_RESOURCE',4);
+define('IN_PROPERTY_EMPTY_RESOURCE',5);
+define('IN_PROPERTY_LITERAL',6);
+define('IN_PROPERTY_PARSE_TYPE_LITERAL',7);
+define('IN_PROPERTY_PARSE_TYPE_RESOURCE',8);
+define('IN_XML',9);
+define('IN_UNKNOWN',10);
+define('IN_PROPERTY_PARSE_TYPE_COLLECTION', 11);
+define('RDF_SUBJECT_TYPE_URI',0);
+define('RDF_SUBJECT_TYPE_DISTRIBUTED',1);
+define('RDF_SUBJECT_TYPE_PREFIX',2);
+define('RDF_SUBJECT_TYPE_ANONYMOUS',3);
+define('RDF_SUBJECT_TYPE_BNODE',4);
+define('RDF_OBJECT_TYPE_RESOURCE',0);
+define('RDF_OBJECT_TYPE_LITERAL',1);
+define('RDF_OBJECT_TYPE_XML',2);
+define('RDF_OBJECT_TYPE_BNODE',3);
+
+// ----------------------------------------------------------------------------------
+// Serializer
+// ----------------------------------------------------------------------------------
+
+// RDF, N3, N-Triple Serializer: set to TRUE in oder to suppres the "Generated by RAP"
+// comment in the output files.
+define('HIDE_ADVERTISE',FALSE);
+
+// RDF Serializer: Set to TRUE, if the serializer should use entities for URIs.
+define('SER_USE_ENTITIES', FALSE );
+
+// RDF Serializer: Set to TRUE, if the serializer should serialize triples as XML
+// attributes where possible.
+define('SER_USE_ATTRIBUTES', FALSE );
+
+// RDF Serializer: Set to TRUE in order to sort the statements of a model before
+// serializing them.
+define('SER_SORT_MODEL', FALSE );
+
+
+
+// RDF Serializer: Set to TRUE, if the serializer should use qualified names for RDF
+// reserved words.
+// NOTE: There is only one default namespace allowed within an XML document.
+//       Therefore if SER_RDF_QNAMES in is set to FALSE and you pass the parameter
+//       $xml_default_namespace to the method serialize() of class RdfSerializer,
+//       the model will be serialized as if SER_RDF_QNAMES were set to TRUE.
+define('SER_RDF_QNAMES', TRUE );
+
+// RDF Serializer: Set to TRUE, if the serializer should start documents with the
+// xml declaration <?xml version="1.0" encoding="UTF-8" >.
+define('SER_XML_DECLARATION', TRUE );
+
+// N3 Serializer: Set to TRUE, if the N3 serializer should try to compress the blank node
+// syntax using [] whereever possible.
+define('N3SER_BNODE_SHORT', FALSE);
+
+// RDF Serializer: Set to TRUE, if the serializer should write text values always as
+// escaped CDATA.
+define('USE_CDATA', FALSE);
+
+define('USE_ANY_QUOTE', FALSE);
+define('GENERAL_PREFIX_BASE','ns');
+define('MAX_ALLOWED_ABBREVIATED_LENGTH',60);
+
+// ----------------------------------------------------------------------------------
+// Util
+// ----------------------------------------------------------------------------------
+
+// Definition of the colors used by the method RDFUtil:writeHTMLTable
+define('HTML_TABLE_HEADER_COLOR', '#FFFFFF');
+define('HTML_TABLE_RESOURCE_COLOR', '#FFFFCC');
+define('HTML_TABLE_LITERAL_COLOR', '#E7E7EF');
+define('HTML_TABLE_BNODE_COLOR', '#FFCCFF');
+define('HTML_TABLE_RDF_NS_COLOR', '#CCFFCC');
+define('HTML_TABLE_NS_ROW_COLOR1', '#FFFFFF');
+define('HTML_TABLE_NS_ROW_COLOR0', '#E7E7EF');
+
+// ----------------------------------------------------------------------------------
+// RDF
+// ----------------------------------------------------------------------------------
+
+define('RDF_NAMESPACE_URI','http://www.w3.org/1999/02/22-rdf-syntax-ns#' );
+define('RDF_NAMESPACE_PREFIX','rdf' );
+define('RDF_RDF','RDF');
+define('RDF_DESCRIPTION','Description');
+define('RDF_ID','ID');
+define('RDF_ABOUT','about');
+define('RDF_ABOUT_EACH','aboutEach');
+define('RDF_ABOUT_EACH_PREFIX','aboutEachPrefix');
+define('RDF_BAG_ID','bagID');
+define('RDF_RESOURCE','resource');
+define('RDF_VALUE','value');
+define('RDF_PARSE_TYPE','parseType');
+define('RDF_PARSE_TYPE_LITERAL','Literal');
+define('RDF_PARSE_TYPE_RESOURCE','Resource');
+define('RDF_PARSE_TYPE_COLLECTION', 'Collection');
+define('RDF_TYPE','type');
+define('RDF_BAG','Bag');
+define('RDF_SEQ','Seq');
+define('RDF_ALT','Alt');
+define('RDF_LI','li');
+define('RDF_STATEMENT','Statement');
+define('RDF_SUBJECT','subject');
+define('RDF_PREDICATE','predicate');
+define('RDF_OBJECT','object');
+define('RDF_NODEID','nodeID');
+define('RDF_DATATYPE','datatype');
+define('RDF_SEEALSO','seeAlso');
+define('RDF_PROPERTY','Property');
+define('RDF_LIST','List');
+define('RDF_NIL','nil');
+define('RDF_REST','rest');
+define('RDF_FIRST','first');
+define('RDF_XMLLITERAL', 'XMLLiteral');
+
+// ----------------------------------------------------------------------------------
+// RDF Schema
+// ----------------------------------------------------------------------------------
+
+define('RDF_SCHEMA_URI','http://www.w3.org/2000/01/rdf-schema#' );
+define('RDF_DATATYPE_SCHEMA_URI','http://www.w3.org/TR/xmlschema-2' );
+define('RDF_SCHEMA_PREFIX', 'rdfs');
+define('RDFS_SUBCLASSOF','subClassOf');
+define('RDFS_SUBPROPERTYOF','subPropertyOf');
+define('RDFS_RANGE','range');
+define('RDFS_DOMAIN','domain');
+define('RDFS_CLASS','Class');
+define('RDFS_RESOURCE','Resource');
+define('RDFS_DATATYPE','Datatype');
+define('RDFS_LITERAL','Literal');
+define('RDFS_SEE_ALSO','seeAlso');
+define('RDFS_IS_DEFINED_BY','isDefinedBy');
+define('RDFS_LABEL','label');
+define('RDFS_COMMENT','comment');
+
+
+// ----------------------------------------------------------------------------------
+// OWL
+// ----------------------------------------------------------------------------------
+
+define('OWL_URI','http://www.w3.org/2002/07/owl#' );
+define('OWL_PREFIX', 'owl');
+define('OWL_SAME_AS','sameAs');
+define('OWL_INVERSE_OF','inverseOf');
+
+
+// ----------------------------------------------------------------------------------
+// XML
+// ----------------------------------------------------------------------------------
+
+define('XML_NAMESPACE_PREFIX', 'xml');
+define('XML_NAMESPACE_DECLARATION_PREFIX', 'xmlns');
+define('XML_NAMESPACE_URI','http://www.w3.org/XML/1998/namespace' );
+define('XML_LANG','lang');
+define('DATATYPE_SHORTCUT_PREFIX','datatype:');
+define('XML_SCHEMA','http://www.w3.org/2001/XMLSchema#');
+
+// ----------------------------------------------------------------------------------
+// RDF DATATYPE SHORTCUTS (extends datatype shortcuts to the full XML datatype URIs)
+// ----------------------------------------------------------------------------------
+
+$short_datatype = array(
+    'STRING'    => RDF_DATATYPE_SCHEMA_URI . '#string',
+    'DECIMAL'   => RDF_DATATYPE_SCHEMA_URI . '#decimal',
+    'INTEGER'   => RDF_DATATYPE_SCHEMA_URI . '#integer',
+    'INT'       => RDF_DATATYPE_SCHEMA_URI . '#int',
+    'SHORT'     => RDF_DATATYPE_SCHEMA_URI . '#short',
+    'BYTE'      => RDF_DATATYPE_SCHEMA_URI . '#byte',
+    'LONG'      => RDF_DATATYPE_SCHEMA_URI . '#long',
+    'LANGUAGE'  => RDF_DATATYPE_SCHEMA_URI . '#language',
+    'NAME'      => RDF_DATATYPE_SCHEMA_URI . '#name'
+);
+
+// ----------------------------------------------------------------------------------
+// Database
+// ----------------------------------------------------------------------------------
+
+if (!defined('ADODB_DB_DRIVER')) {
+    if (isset($GLOBALS['dbConf'])) {
+        define('ADODB_DB_DRIVER', $GLOBALS['dbConf']['type']);
+        define('ADODB_DB_HOST'  , $GLOBALS['dbConf']['host']);
+        define('ADODB_DB_NAME'  , $GLOBALS['dbConf']['database']);
+        define('ADODB_DB_USER'  , $GLOBALS['dbConf']['user']);
+        define('ADODB_DB_PASSWORD', $GLOBALS['dbConf']['password']);
+    } else {
+        define('ADODB_DB_DRIVER', 'mysql');
+        define('ADODB_DB_HOST'  , 'localhost');
+        define('ADODB_DB_NAME'  , 'kbrdfdb');
+        define('ADODB_DB_USER'  , 'kbrdf');
+        define('ADODB_DB_PASSWORD', 'db1');
+    }
+}
+if (!defined('ADODB_DEBUG_MODE')) {
+    define('ADODB_DEBUG_MODE', '0');
+}
+
+
+// ----------------------------------------------------------------------------------
+// RDQL Error Messages
+// ----------------------------------------------------------------------------------
+
+define('RDQL_ERR','RDQL error ');
+define('RDQL_SYN_ERR','RDQL syntax error ');
+define('RDQL_SEL_ERR', RDQL_ERR .'in the SELECT clause: ');
+define('RDQL_SRC_ERR', RDQL_ERR .'in the SOURCE clause: ');
+define('RDQL_WHR_ERR', RDQL_ERR .'in the WHERE clause: ');
+define('RDQL_AND_ERR', RDQL_ERR .'in the AND clause: ');
+define('RDQL_USG_ERR', RDQL_ERR .'in the USING clause: ');
+
+
+// ----------------------------------------------------------------------------------
+// Vocabulary
+// ----------------------------------------------------------------------------------
+// namespace declarations
+define('ATOM_NS'    , 'http://purl.org/atom/ns#');
+define('DC_NS'      , 'http://purl.org/dc/elements/1.1/');
+define('DCTERM_NS'  , 'http://purl.org/dc/terms/');
+define('DCMITYPE_NS', 'http://purl.org/dc/dcmitype/');
+define('FOAF_NS'    , 'http://xmlns.com/foaf/0.1/');
+define('OWL_NS'     , 'http://www.w3.org/2002/07/owl#');
+define('RSS_NS'     , 'http://purl.org/rss/1.0/');
+define('VCARD_NS'   , 'http://www.w3.org/2001/vcard-rdf/3.0#');
+
+
+
+// ----------------------------------------------------------------------------------
+// RDQL, SPARQL and parser default namespace prefixes
+// ----------------------------------------------------------------------------------
+
+global $default_prefixes;
+$default_prefixes = array(
+   RDF_NAMESPACE_PREFIX => RDF_NAMESPACE_URI
+   //RDF_SCHEMA_PREFIX => RDF_SCHEMA_URI,
+   //'xsd'  => 'http://www.w3.org/2001/XMLSchema#',
+   //OWL_PREFIX => OWL_URI,
+   //'dc' => 'http://purl.org/dc/elements/1.1/',
+   //'dcterms' => 'http://purl.org/dc/terms/',
+   //'vcard' => 'http://www.w3.org/2001/vcard-rdf/3.0#'
+);
+
+
+
+// ----------------------------------------------------------------------------------
+// InfModel
+// ----------------------------------------------------------------------------------
+
+//activate / deactivate reasoning for the following schema constructs
+//rdfs:subclass
+define('INF_RES_SUBCLASSOF',true);
+//rdfs:subproperty
+define('INF_RES_SUBPROPERTYOF',true);
+//rdfs:range
+define('INF_RES_RANGE',true);
+//rdfs:domain
+define('INF_RES_DOMAIN',true);
+//owl:sameAs
+define('INF_RES_OWL_SAMEAS',true);
+//owl:inverseOf
+define('INF_RES_OWL_INVERSEOF',true);
+
+//generic RDFS Rules from the RDF Schema doc:
+//see: http://www.w3.org/TR/2004/REC-rdf-mt-20040210/#RDFSRules
+define('INF_RES_RULE_RDFS12',false);
+define('INF_RES_RULE_RDFS6',false);
+define('INF_RES_RULE_RDFS8',false);
+define('INF_RES_RULE_RDFS10',false);
+define('INF_RES_RULE_RDFS13',false);
+
+// ----------------------------------------------------------------------------------
+// GRAPHVIZ
+// ----------------------------------------------------------------------------------
+
+// path to the dot binary
+define('GRAPHVIZ_PATH', 'C:\/Programme\/ATT\/Graphviz\/bin\/dot.exe');
+
+// directory for temporary files
+// Attention: must be write-/readable by the webserver
+define('GRAPHVIZ_TEMP', 'C:\/');
+
+// display statistical data in generated images
+// currently only number of statements drawn
+define('GRAPHVIZ_STAT', TRUE);
+
+// allowed file formats
+// for security reasons (to prevent code injection)
+define('GRAPHVIZ_FORMAT', 'svg, dot, jpg, png, gif, vrml');
+
+// enable clickable URIs
+// only supported by certain formats (e.g. SVG)
+define('GRAPHVIZ_URI', FALSE);
+
+// define parameters for the graphical output
+// if a paramter is undefined, the default value of graphviz is used
+// for further information see: http://www.graphviz.org/Documentation.php
+$graphviz_param = array(
+   'GRAPH_STYLE'     => 'rankdir="TB"',
+   'RESOURCE_STYLE'  => 'style="filled",color="#FFD800",fontname="Courier",fontsize="10"',
+   'LITERAL_STYLE'   => 'shape="box",style="filled",color="#B7FFAF",fontname="Courier",fontsize="10"',
+   'PREDICATE_STYLE' => 'fontname="Courier",fontsize="10"',
+   'INFERRED_STYLE'  => 'style="dotted",fontname="Courier",fontsize="10"',
+   'BLANKNODE_STYLE' => 'style="filled",color="#DDDDDD",fontname="Courier",fontsize="10"',
+   'BOX_STYLE'       => 'fontname="Courier",fontsize="8",color="#BBBBBB"'
+);
+
+
+// ----------------------------------------------------------------------------------
+// SPARQL
+// ----------------------------------------------------------------------------------
+
+// Attribute lists for describing Resources. ['resource type'] = array(att1, att2, att3, ...).
+//
+
+$sparql_describe = array(
+	FOAF_NS.'person' => array(FOAF_NS.'name',FOAF_NS.'homepage',FOAF_NS.'mbox')
+);
+
+?>
Index: Dev/branches/Demo/rdfapi/dataset/Dataset.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/Dataset.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/Dataset.php	(revision 225)
@@ -0,0 +1,90 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: Dataset
+// ----------------------------------------------------------------------------------
+
+/**
+* Dataset implementation.
+* Superclass of datasetMem and datasetDb which contains shared functionality.
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+* @author Chris Bizer <chris@bizer.de>
+*
+* @package 	dataset
+* @access	public
+**/
+
+class Dataset
+{
+	/**
+    * Load a Dataset from a File
+    *
+    * @param string
+	* @access	public
+    */
+	function loadFromFile($file)
+	{
+		$parser= new TriXParser($this);
+		$parser->parseFile($file);
+	}
+
+	/**
+    * Load a Datset from a string
+    *
+    * @param string
+	* @access	public
+    */
+	function loadFromString($string)
+	{
+		$parser= new TriXParser($this);
+		$parser->parseString($string);
+	}
+
+	/**
+    * Serialize the Dataset to File
+    *
+    * @param  string
+	* @access	public
+    */
+	function serializeToFile($fileName)
+	{
+		$serializer= new TriXSerializer($this);
+		$serializer->serializeToFile($fileName);
+	}
+
+    /**
+    * Serialize the Dataset to string
+    *
+    * @return string
+    * @access	public
+    */
+	function serializeToString()
+	{
+		$serializer= new TriXSerializer($this);
+		return $serializer->serializeToString();
+	}
+
+    /**
+    * Performs a SPARQL query against an RDF Dataset.
+    * The result can be retrived in SPARQL Query Results XML Format or
+    * as an array containing the variables an their bindings.
+    *
+    * @param  String $query      the sparql query string
+    * @param  String $resultform the result form ('xml' for SPARQL Query Results XML Format)
+    * @return String/array
+    */
+    function sparqlQuery($query,$resultform = false){
+        include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SPARQL);
+        $parser = new SparqlParser();
+        $q = $parser->parse($query);
+
+		$sparqlEngine = SparqlEngine::getInstance();
+        $eng = $sparqlEngine->factory();
+        return $eng->queryModel($this,$q,$resultform);
+    }
+
+
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/DatasetDb.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/DatasetDb.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/DatasetDb.php	(revision 225)
@@ -0,0 +1,451 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'dataset/Dataset.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/DbModel.php';
+require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsDb.php';
+// ----------------------------------------------------------------------------------
+// Class: DatasetDb
+// ----------------------------------------------------------------------------------
+
+/**
+* Persistent implementation of a Dataset in a database.
+* A RDF dataset is a collection of named RDF graphs.
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+* @author Chris Bizer <chris@bizer.de>
+*
+* @package 	dataset
+* @access	public
+**/
+require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
+
+class DatasetDb extends Dataset
+{
+
+	/**
+	* Reference to databse connection.
+	*
+	* @var		resource dbConnection
+	* @access	private
+	*/
+	var $dbConnection;
+
+	/**
+	* Reference to the dbStore Object.
+	*
+	* @var		$dbStore dbStore
+	* @access	private
+	*/
+	var $dbStore;
+
+
+	/**
+	* Name of the Dataset
+	*
+	* @var		string
+	* @access	private
+	*/
+	var $setName;
+
+
+	/**
+    * Constructor
+    * You can supply a Dataset name.
+    *
+    * @param  ADODBConnection
+    * @param  DbStore
+    * @param  string
+	* @access	public
+    */
+	function DatasetDb(&$dbConnection,&$dbStore,$datasetName)
+	{
+		$this->dbConnection=& $dbConnection;
+		$this->dbStore=&$dbStore;
+		$this->setName= $datasetName;
+		$this->_initialize();
+	}
+
+	/**
+    * Initialize
+    * Read all needed data into the set.
+    *
+    *
+	* @access	private
+    */
+	function _initialize()
+	{
+		$recordSet =& $this->dbConnection->execute("SELECT defaultModelUri
+                                         FROM datasets where datasetName='".$this->setName."'");
+
+   		$this->defaultGraph=& $this->dbStore->getModel($recordSet->fields[0]);
+	}
+
+
+
+//	=== Graph level methods ========================
+
+	/**
+    * Sets the Dataset name. Return true on success, false otherwise.
+    *
+    * @param  string
+	* @access	public
+    */
+	function setDatasetName($datasetName)
+	{
+		if ($this->dbStore->datasetExists($datasetName))
+			return false;
+
+		$this->dbConnection->execute("UPDATE datasets SET datasetName='".$datasetName."'
+                                      where datasetName='".$this->setName."'");
+
+		$this->dbConnection->execute("UPDATE dataset_model SET datasetName='".$datasetName."'
+                                      where datasetName='".$this->setName."'");
+		$this->setName=$datasetName;
+		return true;
+	}
+
+	/**
+    * Returns the Datasets name.
+    *
+    * @return string
+	* @access	public
+    */
+	function getDatasetName()
+	{
+		return $this->setName;
+	}
+
+	/**
+	 * Adds a NamedGraph to the set.
+	 *
+	 * @param NamedGraphDb
+	 */
+	function addNamedGraph(&$graph)
+	{
+		$graphNameURI=$graph->getGraphName();
+		$this->removeNamedGraph($graphNameURI);
+		$this->dbConnection->execute('INSERT INTO dataset_model VALUES('
+		  . $this->dbConnection->qstr($this->setName) . ','
+		  . $this->dbConnection->qstr($graph->modelID) . ','
+		  . $this->dbConnection->qstr($graphNameURI) .')');
+	}
+
+
+	/**
+	 * Overwrites the existting default graph.
+	 *
+	 * @param DbModel
+	 */
+	function setDefaultGraph(&$graph)
+	{
+		$this->dbConnection->execute('UPDATE datasets SET defaultModelUri ='
+		  . $this->dbConnection->qstr($graph->modelURI) . '  WHERE datasetName ='
+		  . $this->dbConnection->qstr($this->setName));
+	}
+
+	/**
+	 * Returns a reference to the defaultGraph.
+	 *
+	 * @return NamedGraphDb
+	 */
+	function & getDefaultGraph()
+	{
+		$defaultGraphURI = $this->dbConnection->GetOne("SELECT defaultModelUri FROM datasets WHERE datasetName ='".$this->setName."'");
+		return ($this->dbStore->getNamedGraphDb($defaultGraphURI,'http://rdfapi-php/dataset_defaultGraph_'.$this->setName));
+	}
+
+	/**
+	 * Returns true, if a defaultGraph exists. False otherwise.
+	 *
+	 * @return boolean
+	 */
+	function hasDefaultGraph()
+	{
+		return true;
+	}
+
+	/**
+	 * Removes a NamedGraph from the set. Nothing happens
+	 * if no graph with that name is contained in the set.
+	 *
+	 * @param string
+	 */
+	function removeNamedGraph($graphName)
+	{
+		$this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="'
+		  . $this->dbConnection->qstr($this->setName) . '"  AND graphURI ="'
+		  . $this->dbConnection->qstr($graphName) . '"');
+	}
+
+	/**
+	 * Tells wether the Dataset contains a NamedGraph.
+	 *
+	 * @param  string
+	 * @return boolean
+	 */
+	function containsNamedGraph($graphName)
+	{
+		$count= $this->dbConnection->GetOne('SELECT count(*) FROM dataset_model WHERE datasetName="'.$this->setName.'"  AND graphURI ="'.$graphName.'"');
+		return ($count>0);
+	}
+
+	/**
+	 * Returns the NamedGraph with a specific name from the Dataset.
+	 * Changes to the graph will be reflected in the set.
+	 *
+	 * @param string
+	 * @return NamedGraphDb or null
+	 */
+	function &getNamedGraph($graphName)
+	{
+		if(!$this->containsNamedGraph($graphName))
+			return null;
+
+		$modelVars =& $this->dbConnection->execute("SELECT models.modelURI, models.modelID, models.baseURI
+	                                            	FROM models, dataset_model
+	                                            	WHERE dataset_model.graphURI ='" .$graphName ."' AND dataset_model.modelId= models.modelID");
+
+		return new NamedGraphDb($this->dbConnection, $modelVars->fields[0],
+                         		$modelVars->fields[1], $graphName ,$modelVars->fields[2]);
+	}
+
+	/**
+	 * Returns the names of the namedGraphs in this set as strings in an array.
+	 *
+	 * @return Array
+	 */
+	function listGraphNames()
+	{
+		$recordSet =& $this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
+
+		$return=array();
+		while (!$recordSet->EOF)
+		{
+		  $return[] = $recordSet->fields[0];
+		  $recordSet->moveNext();
+		}
+		return $return;
+	}
+
+	/**
+	 * Creates a new NamedGraph and adds it to the set. An existing graph with the same name will be replaced. But the old namedGraph remains in the database.
+	 *
+	 * @param  string
+	 * @param  string
+	 * @return NamedGraphDb
+	 */
+	function &createGraph($graphName,$baseURI = null)
+	{
+		$graph =& $this->dbStore->getNewNamedGraphDb(uniqid('http://rdfapi-php/namedGraph_'),$graphName,$baseURI);
+		$this->addNamedGraph($graph);
+
+		return $graph;
+	}
+
+	/**
+	 * Deletes all NamedGraphs from the set.
+	 */
+	function clear()
+	{
+		$this->dbConnection->execute("DELETE FROM dataset_model WHERE datasetName ='".$this->setName."'");
+	}
+
+	/**
+	 * Returns the number of NamedGraphs in the set. Empty graphs are counted.
+	 *
+	 * @return int
+	 */
+	function countGraphs()
+	{
+		return ($this->dbConnection->GetOne("SELECT count(*) FROM dataset_model WHERE datasetName ='".$this->setName."'"));
+	}
+
+	/**
+	 * Returns an iterator over all {@link NamedGraph}s in the set.
+	 *
+	 * @return IteratorAllGraphsDb
+	 */
+	function &listNamedGraphs()
+	{
+		$recordSet =& $this->dbConnection->execute("SELECT graphURI FROM dataset_model WHERE datasetName ='".$this->setName."'");
+		$it = new IteratorAllGraphsDb($recordSet, $this);
+		return $it;
+	}
+
+	/**
+	 * Tells wether the set contains any NamedGraphs.
+	 *
+	 * @return boolean
+	 */
+	function isEmpty()
+	{
+		return ($this->countGraphs()==0);
+	}
+
+	/**
+	 * Add all named graphs of the other dataset to this dataset.
+	 *
+	 * @param Dataset
+	 */
+	function addAll($otherDataset)
+	{
+		for($iterator = $otherDataset->listNamedGraphs(); $iterator->valid(); $iterator->next())
+		{
+			$this->addNamedGraph($iterator->current());
+ 		};
+
+ 		if ($otherDataset->hasDefaultGraph())
+ 		{
+ 			$this->defaultGraph = $this->defaultGraph->unite($otherDataset->getDefaultGraph());
+ 		}
+	}
+
+//	=== Quad level methods ========================
+
+	/**
+	 * Adds a quad to the Dataset. The argument must not contain any
+	 * wildcards. If the quad is already present, nothing happens. A new
+	 * named graph will automatically be created if necessary.
+	 *
+	 * @param Quad
+	 */
+	function addQuad(&$quad)
+	{
+		$graphName=$quad->getGraphName();
+		$graphName=$graphName->getLabel();
+
+		$graph=& $this->getNamedGraph($graphName);
+
+		if ($graph===null)
+			$graph=& $this->createGraph($graphName);
+
+		$statement=$quad->getStatement();
+		$graph->add($statement);
+	}
+
+	/**
+	 * Tells wether the Dataset contains a quad or
+	 * quads matching a pattern.
+	 *
+	 * @param Resource
+	 * @param Resource
+	 * @param Resource
+	 * @param Resource
+	 * @return boolean
+	 */
+	function containsQuad($graphName,$subject,$predicate,$object)
+	{
+		// static part of the sql statement
+		$sql = "SELECT count(*)
+          		FROM statements, dataset_model
+           		WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
+
+		if($graphName!=null)
+		{
+			$sql.= " AND graphURI ='".$graphName->getLabel()."'";
+		}
+
+		// dynamic part of the sql statement
+		$sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object);
+
+		return (($this->dbConnection->GetOne($sql))>0);
+	}
+
+	/**
+	 * Deletes a Quad from the RDF dataset.
+	 *
+	 * @param Quad
+	 */
+	function removeQuad($quad)
+	{
+		$graphName=$quad->getGraphName();$graphName=$graphName->getLabel();
+		//find namedGraph IDs
+		$graphID = $this->dbConnection->GetOne("SELECT modelId FROM dataset_model WHERE graphURI ='$graphName'");
+
+		// static part of the sql statement
+		$sql = "DELETE FROM statements WHERE modelID = $graphID";
+
+		// dynamic part of the sql statement
+		$sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject(), $quad->getPredicate(), $quad->getObject());
+
+		// execute the query
+		if($graphID)
+			$recordSet =& $this->dbConnection->execute($sql);
+	}
+
+	/**
+	 * Counts the Quads in the RDF dataset. Identical Triples in
+	 * different NamedGraphs are counted individually.
+	 *
+	 * @return int
+	 */
+	function countQuads()
+	{
+		$sql = "SELECT count(*)
+          		FROM statements, dataset_model
+           		WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
+
+		return ((int)$this->dbConnection->GetOne($sql));
+	}
+
+	/**
+	 * Finds Statements that match a quad pattern. The argument may contain
+	 * wildcards.
+	 *
+	 * @param Resource or null
+	 * @param Resource or null
+	 * @param Resource or null
+	 * @param Resource or null
+	 * @return IteratorFindQuadsDb
+	 */
+	function &findInNamedGraphs($graphName,$subject,$predicate,$object,$returnAsTriples =false )
+	{
+		// static part of the sql statement
+		$sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is, dataset_model.graphURI
+          		FROM statements, dataset_model
+           		WHERE datasetName ='".$this->setName."' AND statements.modelID=dataset_model.modelId ";
+
+		if($graphName!=null)
+		{
+			$sql.= " AND graphURI ='".$graphName->getLabel()."'";
+		}
+
+		// dynamic part of the sql statement
+		$sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object);
+
+		// execute the query
+		$recordSet =& $this->dbConnection->execute($sql);
+
+
+		$it = new IteratorFindQuadsDb($recordSet, $this, $returnAsTriples);
+		return $it;
+	}
+
+	/**
+	 * Finds Statements that match a pattern in the default Graph. The argument may contain
+	 * wildcards.
+	 *
+	 * @param Resource or null
+	 * @param Resource or null
+	 * @param Resource or null
+	 * @return IteratorFindQuadsDb
+	 */
+	function &findInDefaultGraph($subject,$predicate,$object)
+	{
+		$defaultGraphID = (int)$this->dbConnection->GetOne("SELECT models.modelID FROM datasets, models WHERE datasets.datasetName ='".$this->setName."' AND datasets.defaultModelUri = models.modelURI");
+		// static part of the sql statement
+		$sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
+          		FROM statements
+           		WHERE modelID ='$defaultGraphID'";
+
+		// dynamic part of the sql statement
+		$sql .= DbModel::_createDynSqlPart_SPO($subject, $predicate, $object);
+
+		// execute the query
+		$recordSet =& $this->dbConnection->execute($sql);
+
+		$it = new IteratorFindQuadsDb($recordSet, $this, true);
+		return $it;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/DatasetMem.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/DatasetMem.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/DatasetMem.php	(revision 225)
@@ -0,0 +1,394 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'dataset/Dataset.php';
+require_once RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphMem.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php';
+// ----------------------------------------------------------------------------------
+// Class: DatasetMem
+// ----------------------------------------------------------------------------------
+
+/**
+* In-memory implementation of a RDF dataset.
+* A RDF dataset set is a collection of named RDF graphs.
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+* @author Chris Bizer <chris@bizer.de>
+*
+* @package 	dataset
+* @access	public
+**/
+
+class DatasetMem extends Dataset
+{
+
+	/**
+	* Reference to a Memmodel that holds the default graph.
+	*
+	* @var		resource Memmodel
+	* @access	private
+	*/
+	var $defaultGraph;
+
+
+	/**
+	* Name of the DatasetMem.
+	*
+	* @var		string
+	* @access	private
+	*/
+	var $setName;
+
+	/**
+	* List of all NamedGraphs.
+	*
+	* @var		array
+	* @access	private
+	*/
+	var $graphs=array();
+
+	/**
+    * Constructor.
+    * You can supply a Dataset name.
+    *
+    * @param string
+	* @access	public
+    */
+	function DatasetMem($datasetName = null)
+	{
+		$this->setDatasetName($datasetName);
+		$this->defaultGraph=new MemModel();
+	}
+
+//	=== Graph level methods ========================
+
+	/**
+    * Sets the Datasets name.
+    *
+    * @param  string
+	* @access	public
+    */
+	function setDatasetName($datasetName)
+	{
+		$this->setName=$datasetName;
+	}
+
+	/**
+    * Returns the Datasets name.
+    *
+    * @return string
+	* @access	public
+    */
+	function getDatasetName()
+	{
+		return $this->setName;
+	}
+
+	/**
+	 * Adds a NamedGraph to the set. Will replace a NamedGraph with the same name that is already in the set.
+	 *
+	 * @param NamedGraphMem
+	 */
+	function addNamedGraph(&$graph)
+	{
+		$graphNameURI=$graph->getGraphName();
+		$this->graphs[$graphNameURI]=&$graph;
+	}
+
+	/**
+	 * Overwrites the existting default graph.
+	 *
+	 * @param MemModel
+	 */
+	function setDefaultGraph(&$graph)
+	{
+		$this->defaultGraph=&$graph;
+	}
+
+	/**
+	 * Returns a reference to the defaultGraph
+	 * @return Model
+	*/
+	function &getDefaultGraph()
+	{
+		return $this->defaultGraph;
+	}
+
+	/**
+	 * Returns true, if an defaultGraph exists. False otherwise	.
+	 *
+	 * @return boolean
+	*/
+	function hasDefaultGraph()
+	{
+		return $this->defaultGraph != null;
+	}
+
+	/**
+	 * Removes a NamedGraph from the set. Nothing happens
+	 * if no graph with that name is contained in the set.
+	 *
+	 * @param string
+	 */
+	function removeNamedGraph($graphName)
+	{
+		unset($this->graphs[$graphName]);
+	}
+
+	/**
+	 * Tells wether the Dataset contains a NamedGraph.
+	 *
+	 * @param  string
+	 * @return boolean
+	 */
+	function containsNamedGraph($graphName)
+	{
+		return isset($this->graphs[$graphName]) === true;
+	}
+
+	/**
+	 * Returns the NamedGraph with a specific name from the Dataset.
+	 * Changes to the graph will be reflected in the set.
+	 *
+	 * @param string
+	 * @return NamedGraphMem or NULL
+	 */
+	function &getNamedGraph($graphName)
+	{
+		if (!isset($this->graphs[$graphName])) return NULL;
+		return $this->graphs[$graphName];
+	}
+
+	/**
+	 * Returns the names of the namedGraphs in this set as strings in an array.
+	 *
+	 * @return Array
+	 */
+	function listGraphNames()
+	{
+		return array_keys($this->graphs);
+	}
+
+	/**
+	 * Creates a new NamedGraph and adds it to the set. An existing
+	 * graph with the same name will be replaced.The name of the NamedGraph to be created ; must be an URI
+	 *
+	 * @param  string
+	 * @param  string
+	 * @return NamedGraphMem
+	 */
+	function &createGraph($graphName,$baseURI = null)
+	{
+		$this->graphs[$graphName]=new NamedGraphMem($graphName,$baseURI);
+		return $this->getNamedGraph($graphName);
+	}
+
+	/**
+	 * Deletes all NamedGraphs from the set.
+	 */
+	function clear()
+	{
+		$this->graphs = array();
+	}
+
+	/**
+	 * Returns the number of NamedGraphs in the set. Empty graphs
+	 * are counted.
+	 *
+	 * @return int
+	 */
+	function countGraphs()
+	{
+		return count($this->graphs);
+	}
+
+	/**
+	 * Returns the NamedGraph with a specific offset in the dataset.
+	 * Changes to the graph will be reflected in the set.
+	 *
+	 * @param int
+	 * @return NamedGraphMem or null
+	 * @access	private
+	 */
+	function &getGraphWithOffset($offset)
+	{
+		$i=0;
+		foreach ($this->graphs as $graph)
+		{
+			if (($i++)==$offset)
+				return $graph;
+		}
+		$n = null;
+		return $n;
+	}
+
+	/**
+	 * Returns an iterator over all {@link NamedGraph}s in the set.
+	 *
+	 * @return IteratorAllGraphsMem
+	 */
+	function &listNamedGraphs()
+	{
+        require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsMem.php';
+        $m = new IteratorAllGraphsMem($this);
+        return $m;
+	}
+
+	/**
+	 * Tells wether the set contains any NamedGraphs.
+	 *
+	 * @return boolean
+	 */
+	function isEmpty()
+	{
+		return $this->countGraphs() == 0;
+	}
+
+	/**
+	 * Adds all named graphs of the other dataset to this dataset.
+	 *
+	 * @param Dataset
+	 */
+	function addAll($otherDataset)
+	{
+		for($iterator = $otherDataset->listNamedGraphs(); $iterator->valid(); $iterator->next())
+		{
+			$current=$iterator->current();
+			$this->graphs[$current->getGraphName()]=$current;
+ 		}
+
+ 		if ($otherDataset->hasDefaultGraph())
+ 		{
+ 			$this->defaultGraph = $this->defaultGraph->unite($otherDataset->getDefaultGraph());
+ 		}
+	}
+
+//	=== Quad level methods ========================
+
+	/**
+	 * Adds a quad to the Dataset. The argument must not contain any
+	 * wildcards. If the quad is already present, nothing happens. A new
+	 * named graph will automatically be created if necessary.
+	 *
+	 * @param Quad
+	 */
+	function addQuad(&$quad)
+	{
+		$graphName=$quad->getGraphName();
+		if ($this->containsNamedGraph($graphName->getLabel())===false)
+			$this->createGraph($graphName->getLabel());
+
+		$this->graphs[$graphName->getLabel()]->add($quad->getStatement());
+	}
+
+
+	/**
+	 * Tells wether the Dataset contains a quad or
+	 * quads matching a pattern.
+	 *
+	 * @param Resource $graphName
+	 * @param Resource $subject
+	 * @param Resource $predicate
+	 * @param Resource $object
+	 * @return boolean
+	 */
+	function containsQuad($graphName,$subject,$predicate,$object)
+	{
+		if($graphName!=null)
+		{
+			if ($this->containsNamedGraph($graphName->getLabel())!==true)
+				return false;
+
+			return ($this->graphs[$graphName->getLabel()]->findFirstMatchingStatement($subject,$predicate,$object)!=null);
+		}
+
+		foreach ($this->graphs as $graph)
+		{
+			if ($graph->findFirstMatchingStatement($subject,$predicate,$object)!=null)
+				return true;
+		};
+
+		return false;
+	}
+
+	/**
+	 * Deletes a Quad from the RDF dataset.
+	 *
+	 * @param Quad
+	 */
+	function removeQuad($quad)
+	{
+			$graphName=$quad->getGraphName();
+
+			if($graphName!=null)
+			{
+				if ($this->containsNamedGraph($graphName->getLabel())!==true)
+					return;
+
+				return ($this->graphs[$graphName->getLabel()]->remove($quad->getStatement())!=null);
+
+			}
+			foreach ($this->graphs as $graph)
+			{
+				$graph->remove($quad->getStatement());
+			};
+	}
+
+	/**
+	 * Counts the Quads in the RDF dataset. Identical Triples in
+	 * different NamedGraphs are counted individually.
+	 *
+	 * @return int
+	 */
+	function countQuads()
+	{
+		$count=0;
+		foreach ($this->graphs as $graph)
+		{
+			$count+=$graph->size();
+		}
+		return $count;
+	}
+
+	/**
+	 * Finds Statements that match a quad pattern. The argument may contain
+	 * wildcards.
+	 *
+	 * @param Resource or Null
+	 * @param Resourceor Null
+	 * @param Resource or Null
+	 * @param Resource or Null
+	 * @return Iterator
+	 */
+	function &findInNamedGraphs($graph,$subject,$predicate,$object,$returnAsTriples = false)
+	{
+
+		if ($graph!=null)
+		{
+			$findGraph=&$this->getNamedGraph($graph->getLabel());
+			if($findGraph==null)
+				$findGraph=new MemModel();
+
+			return $findGraph->iterFind($subject,$predicate,$object);
+		}
+
+
+        require_once RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsMem.php';
+        $m = new IteratorFindQuadsMem($subject,$predicate,$object,$this->listNamedGraphs(),$returnAsTriples);
+        return $m;
+	}
+
+	/**
+	 * Finds Statements that match a pattern in the default Graph. The argument may contain
+	 * wildcards.
+	 *
+	 * @param Resource or Null
+	 * @param Resource or Null
+	 * @param Resource or Null
+	 * @return Iterator
+	 */
+	function &findInDefaultGraph($subject,$predicate,$object)
+	{
+		return $this->defaultGraph->iterFind($subject,$predicate,$object);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/DatasetP.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/DatasetP.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/DatasetP.php	(revision 225)
@@ -0,0 +1,25 @@
+<?php
+// ----------------------------------------------------------------------------------
+// dataset Package
+// ----------------------------------------------------------------------------------
+//
+// Description               : dataset package
+//
+// Author: Daniel Westphal	<http://www.d-westphal.de>
+//
+// ----------------------------------------------------------------------------------
+
+// Include ResModel classes
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/Dataset.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/DatasetDb.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphMem.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/NamedGraphDb.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsMem.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorAllGraphsDb.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/Quad.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsMem.php');
+require_once( RDFAPI_INCLUDE_DIR . 'dataset/IteratorFindQuadsDb.php');
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/TriXParser.php');
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/TriXSerializer.php');
+?>
Index: Dev/branches/Demo/rdfapi/dataset/IteratorAllGraphsDb.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/IteratorAllGraphsDb.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/IteratorAllGraphsDb.php	(revision 225)
@@ -0,0 +1,127 @@
+<?php 
+//----------------------------------------------------------------------------------
+// Class: IteratorAllGraphsDb
+//----------------------------------------------------------------------------------
+
+
+/**
+* Implementation of a Graph iterator.
+*
+* This Iterator should be used in a for-loop like:
+* for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next()) 
+* {
+*	$currentResource=$iterator->current();
+* };
+*
+* @version  $Id$
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	dataset
+* @access	public
+**/
+class IteratorAllGraphsDb
+{
+	/**
+	* Holds a reference to the associated DB resultSet
+	* @var		$dbResultSets ADODB result
+	* @access	private
+	*/
+	var $dbResultSet;
+	
+	/**
+	* Holds a reference to the associated datasetDb
+	* @var		datasetDb
+	* @access	private
+	*/
+	var $datasetDb;
+	
+	
+	/**
+	* The current position
+	* @var		integer
+	* @access	private
+	*/
+	var $key;
+	
+	
+	/**
+	* The current NamedGraph
+	* @var obejct NamedGraph
+	* @access	private
+	*/
+	var $current;
+	
+	
+	
+	/**
+    * Constructor.
+    *
+    *
+    * @param ADODBResultSet
+    * @param DatasetDb
+	* @access	public
+    */
+	function IteratorAllGraphsDb(&$dbResultSet,&$datasetDb)
+	{
+		$this->dbResultSet=& $dbResultSet;
+		$this->datasetDb=& $datasetDb;
+		$this->current = $this->dbResultSet->fields[0];
+	}
+	
+	/**
+    * Resets iterator list to start
+    *
+	* @access public
+    */
+	function rewind()
+	{
+		//not supported
+	}
+	
+	/**
+    * Says if there are additional items left in the list
+    *
+    * @return	boolean
+	* @access	public
+    */
+	function valid()
+	{
+		return (!$this->dbResultSet->EOF);
+	}
+	
+	/**
+    * Moves Iterator to the next item in the list
+    *
+	* @access	public
+    */
+	function next()
+	{
+		$this->dbResultSet->moveNext();
+		$this->current = $this->dbResultSet->fields[0];
+	}
+	
+	/**
+    * Returns the current item
+    *
+    * @return	mixed
+	* @access	public
+    */
+	function &current()
+	{
+		return ($this->datasetDb->getNamedGraph($this->current));
+	}
+	
+	
+	/**
+    * Returns the key of the current item
+    *
+    * @return	integer
+	* @access	public
+    */
+	function key()
+	{
+		return $this->dbResultSet->_currentRow;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/IteratorAllGraphsMem.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/IteratorAllGraphsMem.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/IteratorAllGraphsMem.php	(revision 225)
@@ -0,0 +1,125 @@
+<?php 
+// ----------------------------------------------------------------------------------
+// Class: IteratorAllGraphsMem
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Implementation of a Graph iterator.
+*
+* This Iterator should be used in a for-loop like:
+* for($iterator = $dataset->listGraphs(); $iterator->valid(); $iterator->next()) 
+* {
+*	$currentResource=$it->current();
+* };
+*
+* @version  $Id$
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	dataset
+* @access	public
+**/
+class IteratorAllGraphsMem
+{
+	/**
+	* Holds a reference to the associated RDF dataset
+	*
+	* @var		object dataset
+	* @access	private
+	*/
+	var $associatedGraphSet;
+	
+	/**
+	* The current position
+	*
+	* @var		integer
+	* @access	private
+	*/
+	var $key;
+	
+	/**
+	* If the current resource is valid
+	*
+	* @var		boolean
+	* @access	private
+	*/
+	var $valid;
+	
+	/**
+	* The current NamedGraph
+	*
+	* @var obejct NamedGraph
+	* @access	private
+	*/
+	var $current;
+	
+	
+	/**
+    * Constructor.
+    *
+    * @param dataset
+	* @access	public
+    */
+	function IteratorAllGraphsMem(&$namedGraphSet)
+	{
+		$this->associatedGraphSet=&$namedGraphSet;
+		$this->rewind();
+	}
+	
+	/**
+    * Resets iterator list to start
+    *
+	* @access public
+    */
+	function rewind()
+	{
+		$this->key = -1;
+		$this->next();
+	}
+	
+	/**
+    * Says if there are additional items left in the list.
+    *
+    * @return	boolean
+	* @access	public
+    */
+	function valid()
+	{
+		return $this->valid;
+	}
+	
+	/**
+    * Moves Iterator to the next item in the list.
+    *
+	* @access	public
+    */
+	function next()
+	{
+		$this->current = &$this->associatedGraphSet->getGraphWithOffset(++$this->key);
+		$this->valid=($this->current!=NULL);
+	}
+	
+	/**
+    * Returns the current item.
+    *
+    * @return	mixed
+	* @access	public
+    */
+	function &current()
+	{
+		return $this->current;
+	}
+	
+	/**
+    * Returns the key of the current item.
+    *
+    * @return	integer
+	* @access	public
+    */
+	function key()
+	{
+		return $this->key;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/IteratorFindQuadsDb.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/IteratorFindQuadsDb.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/IteratorFindQuadsDb.php	(revision 225)
@@ -0,0 +1,145 @@
+<?php 
+//----------------------------------------------------------------------------------
+// Class: IteratorFindQuadsDb
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Implementation of a quad iterator.
+*
+* This Iterator should be used like:
+* for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next()) 
+* {
+*	$currentQuad=$iterator->current();
+* };
+*
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+*
+*
+* @package 	dataset
+* @access	public
+**/
+class IteratorFindQuadsDb
+{
+	/**
+	* Holds a reference to the associated DB resultSet.
+	*
+	* @var		$dbResultSets ADODB result
+	* @access	private
+	*/
+	var $dbResultSet;
+	
+	/**
+	* Holds a reference to the associated datasetDb.
+	*
+	* @var		$datasetDb datasetDb
+	* @access	private
+	*/
+	var $datasetDb;
+
+	/**
+	* boolean value, if the results should be returned as triples.
+	*
+	* @var		boolean
+	* @access	private
+	*/
+	var $returnAsTriples;
+	
+	/**
+    * Constructor.
+    *
+    * @param dataset
+	* @access	public
+    */
+	function IteratorFindQuadsDb(&$dbResultSet,&$datasetDb,$returnAsTriples=false)
+	{
+		$this->dbResultSet=& $dbResultSet;
+		$this->datasetDb=& $datasetDb;
+		$this->returnAsTriples=$returnAsTriples;
+	}
+	
+	/**
+    * Resets iterator list to start.
+    *
+	* @access public
+    */
+	function rewind()
+	{
+		//not supported
+	}
+	
+	/**
+    * Says if there are additional items left in the list.
+    *
+    * @return	boolean
+	* @access	public
+    */
+	function valid()
+	{
+		if (($this->dbResultSet ===false) OR ($this->dbResultSet->EOF) )
+			return false;
+		
+		return true;
+	}
+	
+	/**
+    * Moves Iterator to the next item in the list.
+    *
+	* @access	public
+    */
+	function next()
+	{
+		if ($this->dbResultSet!==false)
+			$this->dbResultSet->moveNext();
+	}
+	
+	/**
+    * Returns the current item.
+    *
+    * @return	mixed
+	* @access	public
+    */
+	function &current()
+	{
+		if ($this->dbResultSet===false)
+			return null;
+		// subject
+		if ($this->dbResultSet->fields[5] == 'r')
+		$sub = new Resource($this->dbResultSet->fields[0]);
+		else
+		$sub = new BlankNode($this->dbResultSet->fields[0]);
+
+		// predicate
+		$pred = new Resource($this->dbResultSet->fields[1]);
+
+		// object
+		if ($this->dbResultSet->fields[6] == 'r')
+		$obj = new Resource($this->dbResultSet->fields[2]);
+		elseif ($this->dbResultSet->fields[6] == 'b')
+		$obj = new BlankNode($this->dbResultSet->fields[2]);
+		else {
+			$obj = new Literal($this->dbResultSet->fields[2], $this->dbResultSet->fields[3]);
+			if ($this->dbResultSet->fields[4])
+			$obj->setDatatype($this->dbResultSet->fields[4]);
+		}
+
+		if($this->returnAsTriples)
+			return (new Statement($sub, $pred, $obj));
+
+		return (new Quad(new Resource($this->dbResultSet->fields[7]),$sub,$pred,$obj));
+	}
+	
+	/**
+    * Returns the key of the current item.
+    *
+    * @return	integer
+	* @access	public
+    */
+	function key()
+	{
+		return $this->dbResultSet->_currentRow;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/IteratorFindQuadsMem.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/IteratorFindQuadsMem.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/IteratorFindQuadsMem.php	(revision 225)
@@ -0,0 +1,217 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'dataset/Quad.php';
+// ----------------------------------------------------------------------------------
+// Class: IteratorFindQuadsMem
+// ----------------------------------------------------------------------------------
+
+
+
+/**
+* Implementation of a quad iterator.
+*
+* This Iterator should be used like:
+* for($iterator = $dataset->findInNamedGraphs(null,null,null,null); $iterator->valid(); $iterator->next())
+* {
+*	$currentQuad=$it->current();
+* };
+*
+* @version  $Id$
+* @author Daniel Westphal (http://d-westphal.de)
+*
+*
+* @package 	dataset
+* @access	public
+**/
+class IteratorFindQuadsMem
+{
+	/**
+	* key value in the current graph.
+	*
+	* @var	 dataset
+	* @access	private
+	*/
+	var $graphKey;
+
+	/**
+	* boolean value, if the results should be returned as triples.
+	*
+	* @var		boolean
+	* @access	private
+	*/
+	var $returnAsTriples;
+
+	/**
+	* The current position.
+	*
+	* @var		integer
+	* @access	private
+	*/
+	var $key;
+
+	/**
+	* If the current resource is valid.
+	*
+	* @var		boolean
+	* @access	private
+	*/
+	var $valid;
+
+	/**
+	* The current NamedGraph.
+	*
+	* @var  NamedGraph
+	* @access	private
+	*/
+	var $current;
+
+	/**
+	* The graphName Resource to search for.
+	*
+	* @var string
+	* @access	private
+	*/
+	var $findGraphName;
+
+	/**
+	* The subject Resource to search for.
+	*
+	* @var string
+	* @access	private
+	*/
+	var $findSubject;
+
+	/**
+	* The predicate Resource to search for.
+	*
+	* @var string
+	* @access	private
+	*/
+	var $findPredicate;
+
+	/**
+	* The object Resource to search for.
+	*
+	* @var string
+	* @access	private
+	*/
+	var $findObject;
+
+	/**
+	* Iterator over all graphs of the RDF dataset.
+	*
+	* @var string
+	* @access	private
+	*/
+	var $graphIterator;
+
+
+	/**
+    * Constructor.
+    *
+	* $subject, $predicate, and $object are used like find().
+	* $getSPO supports the strings 's', 'p', and 'o' to return
+	* either the subject, predicate, or object of the result statements.
+	*
+    *
+    * @param Resource
+    * @param Resource
+    * @param Resource
+    * @param dataset
+    * @param Boolean
+	* @access	public
+    */
+	function IteratorFindQuadsMem($subject,$predicate,$object,&$graphIterator, $returnAsTriples=false)
+	{
+		$this->findSubject=$subject;
+		$this->findPredicate=$predicate;
+		$this->findObject=$object;
+		$this->graphIterator=&$graphIterator;
+		$this->rewind();
+		$this->returnAsTriples=$returnAsTriples;
+	}
+
+	/**
+    * Resets iterator list to start.
+    *
+	* @access	public
+    */
+	function rewind()
+	{
+		$this->graphIterator->rewind();
+		$this->key = -1;
+		$this->graphKey=-1;
+		$this->next();
+	}
+
+	/**
+    * Says if there are additional items left in the list.
+    *
+    * @return	boolean
+	* @access	public
+    */
+	function valid()
+	{
+		return $this->valid;
+	}
+
+	/**
+    * Moves Iterator to the next item in the list.
+    *
+	* @access	public
+    */
+	function next()
+	{
+		if($this->graphIterator->valid()===false)
+		{
+			$this->valid=false;
+			return;
+		}
+
+		$currentGraph=&$this->graphIterator->current();
+		$this->current= $currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey);
+		if($this->current==null)
+		{
+			do
+			{
+				$this->graphIterator->next();
+				if($this->graphIterator->valid()===false)
+				{
+					$this->valid=false;
+					return;
+				}
+				$currentGraph=&$this->graphIterator->current();
+				$this->graphKey=-1;
+				$this->current= $currentGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->graphKey);
+
+			} while ($this->current==null);
+		}
+		$this->key++;
+		$this->valid=true;
+	}
+
+	/**
+    * Returns the current item.
+    *
+    * @return	mixed
+	* @access	public
+    */
+	function current()
+	{
+		if($this->returnAsTriples) return $this->current;
+
+		$currentGraph=&$this->graphIterator->current();
+		return new Quad(new Resource($currentGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject());
+	}
+
+	/**
+    * Returns the key of the current item.
+    *
+    * @return	integer
+	* @access	public
+    */
+	function key()
+	{
+		return $this->key;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/NamedGraphDb.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/NamedGraphDb.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/NamedGraphDb.php	(revision 225)
@@ -0,0 +1,70 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: NamedGraphDb
+// ----------------------------------------------------------------------------------
+
+/**
+* Persistent NamedGraph implementation that extends a {@link DbModel}.
+* The graphName is not stored in the database. As soon as the namedGraph is added
+* to a RDF dataset the graphName is saved.
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+*
+* @package 	dataset
+* @access	public
+**/
+class NamedGraphDb extends DbModel  
+{
+
+	/**
+	* Name of the NamedGraphDb
+	*
+	* @var		string
+	* @access	private
+	*/
+	var $graphName;
+	
+	/**
+	* Constructor
+	* Do not call this directly.
+	* Use the method getModel,getNewModel or putModel of the Class NamedGraphDb instead.
+	*
+	* @param   ADODBConnection
+	* @param   string
+	* @param   string
+	* @param   string
+	* @access	public
+	*/		
+	function NamedGraphDb(&$dbConnection, $modelURI, $modelID,$graphName, $baseURI=NULL)
+	{
+		$this->dbConn =& $dbConnection;
+		$this->modelURI = $modelURI;
+		$this->modelID = $modelID;
+		$this->baseURI = $this->_checkBaseURI($baseURI);
+		$this->graphName = $graphName;
+	}
+	
+	/**
+    * Sets the graph name.
+    *
+    * @param string 
+	* @access	public
+    */	
+	function setGraphName($graphName)
+	{
+		$this->graphName=$graphName;
+	}
+	
+	/**
+    * Returns the graph name.
+    *
+    * @return string
+	* @access	public
+    */
+	function getGraphName()
+	{
+		return $this->graphName;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/NamedGraphMem.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/NamedGraphMem.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/NamedGraphMem.php	(revision 225)
@@ -0,0 +1,66 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php';
+// ----------------------------------------------------------------------------------
+// Class: NamedGraphMem
+// ----------------------------------------------------------------------------------
+
+/**
+* NamedGraph implementation that extends a {@link MemModel}
+* with a name.
+*
+* @version  $Id$
+* @author Daniel Westphal <http://www.d-westphal.de>
+*
+* @package 	dataset
+* @access	public
+**/
+class NamedGraphMem extends MemModel
+{
+
+	/**
+	* Name of the NamedGraphMem.
+	*
+	* @var		 string
+	* @access	private
+	*/
+	var $graphName;
+
+
+	/**
+    * Constructor
+    * You have to supply a graph name. You can supply a URI.
+    *
+    * @param  string
+    * @param  string
+	* @access	public
+    */
+	function NamedGraphMem($graphName,$baseURI = null)
+	{
+		$this->setBaseURI($baseURI);
+		$this->indexed = INDEX_TYPE;
+		$this->setGraphName($graphName);
+	}
+
+	/**
+    * Sets the graph name.
+    *
+    * @param  string
+	* @access	public
+    */
+	function setGraphName($graphName)
+	{
+		$this->graphName=$graphName;
+	}
+
+	/**
+    * Returns the graph name.
+    *
+    * @return string
+	* @access	public
+    */
+	function getGraphName()
+	{
+		return $this->graphName;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/dataset/Quad.php
===================================================================
--- Dev/branches/Demo/rdfapi/dataset/Quad.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/dataset/Quad.php	(revision 225)
@@ -0,0 +1,147 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: Quad
+// ----------------------------------------------------------------------------------
+
+/**
+*
+* A Triple in a RDF dataset, consisting of four Jena Nodes: graphName,
+* subject, predicate, and object.
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+*
+* @package 	dataset
+* @access	public
+**/
+class Quad  
+{
+	
+	/**
+	* Name of the NamedGraphMem.
+	*
+	* @var		Resource
+	* @access	private
+	*/
+	var $graphName;
+	
+	/**
+	* Statement
+	*
+	* @var		Statement
+	* @access	private
+	*/
+	var $statement;
+	
+	/**
+    * Constructor
+	* Creates a Quad from four Nodes.
+ 	*
+    * @param Resource 
+    * @param Resource  
+    * @param Resource  
+    * @param Resource   
+	* @access	public
+    */		
+	function Quad($graphName,$subject,$predicate,$object)
+	{
+		if (!is_a($graphName, 'Resource')) 
+		{
+			$errmsg = RDFAPI_ERROR . 
+		          '(class: Quad; method: new): Resource expected as graphName.';
+			trigger_error($errmsg, E_USER_ERROR); 
+		}
+		$this->statement=new Statement($subject,$predicate,$object);
+		$this->graphName=$graphName;
+	}
+	
+	/**
+    * Sets the graph name.
+    *
+    * @param Resource  
+	* @access	public
+    */	
+	function setGraphName($graphName)
+	{
+		$this->graphName=$graphName;
+	}
+	
+	/**
+    * Returns the graph name.
+    *
+    * @return Resource
+	* @access	public
+    */
+	function getGraphName()
+	{
+		return $this->graphName;
+	}
+	
+	/**
+	 * Return a human-readable (sort of) string "graphname { s p o . }"
+	 * describing the quad.
+	 *
+	 * @return string
+	 */
+	function toString() 
+	{	
+		return 'GraphName('.$this->graphName->getLabel().') '.$this->statement->toString();
+	}
+		
+	/**
+    * Returns the subject.
+    *
+    * @return Resource
+	* @access	public
+    */
+	function getSubject()
+	{
+		return $this->statement->getSubject();	
+	}
+		
+	/**
+    * Returns the predicate.
+    *
+    * @return Resource
+	* @access	public
+    */
+	function getPredicate()
+	{
+		return $this->statement->getPredicate();	
+	}
+		
+	/**
+    * Returns the object.
+    *
+    * @return Resource
+	* @access	public
+    */
+	function getObject()
+	{
+		return $this->statement->getObject();	
+	}
+		
+	/**
+    * Returns the statement(subject,predicate,object).
+    *
+    * @return statement
+	* @access	public
+    */
+	function getStatement()
+	{
+		return $this->statement;	
+	}
+		
+	/**
+    * Checks if two quads are equal.
+    *
+    * @param  Quad
+    * @return boolean
+	* @access	public
+    */
+	function equals($quad)
+	{
+		return ($this->graphName->equals($quad->getGraphName()) && $this->statement->equals($quad->getStatement()));	
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/infModel/InfModel.php
===================================================================
--- Dev/branches/Demo/rdfapi/infModel/InfModel.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/infModel/InfModel.php	(revision 225)
@@ -0,0 +1,678 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: infModel
+// ----------------------------------------------------------------------------------
+
+/**
+ * A InfModel Model extends a MemModel , by adding the ability to infer statements from 
+ * known statements and RDFS/OWL-Schematas.
+ * It uses the same interface as MemModel, thus making the 
+ * infererence process hidden.
+ * 
+ * @version  $Id: InfModel.php 290 2006-06-22 12:23:24Z tgauss $
+ * @author Daniel Westphal <mail at d-westphal dot de>
+ *
+ * @package infModel
+ * @access	public
+ */
+
+class InfModel extends MemModel 
+{
+	/**
+	* Array that holds the objects of the class Infrule, 
+	* which were assigned by the _addToInference() function
+	*
+	* @var		array
+	* @access	private
+	*/
+	var $infRules;
+
+	/**
+	* Array of URI-Strings that produces Infrules.
+	*
+	* @var		array
+	* @access	private
+	*/
+	var $supportedInference;
+	
+	/**
+	* Array of the connection between the infrules and the statement 
+	* that assigned those rules.
+	* array[2][3]=true;array[2][5]=true means, that statement 2 
+	* assigned rule 3 & 5 to the model.
+	*
+	* @var		array
+	* @access	private
+	*/	
+	var $statementRuleIndex;
+	
+	/**
+	* Array of the infRule triggers and the matching infrules.
+	* $this->infRulesTriggerIndex['s'] for subject index, ['p'] for predicates, 
+	* and ['o'] for objects.
+	*
+	* @var		array
+	* @access	private
+	*/	
+	var $infRulesTriggerIndex;
+	
+	/**
+	* Array of the infRule entailments and the matching infrules.
+	* $this->infRulesEntailIndex['s'] for subject index, ['p'] for predicates, 
+	* and ['o'] for objects.
+	*
+	* @var		array
+	* @access	private
+	*/	
+	var $infRulesEntailIndex;
+
+
+
+   /**
+    * Constructor
+	* You can supply a base_uri
+    *
+    * @param string $baseURI 
+	* @access	public
+    */	
+	function InfModel ($baseURI = NULL) 
+	{
+		//call the memmodel constructor method
+		parent::MemModel($baseURI);
+		//initialise vars
+		$this->infRulesTriggerIndex['s']=array();
+		$this->infRulesTriggerIndex['p']=array();
+		$this->infRulesTriggerIndex['o']=array();
+		$this->infRulesEntailIndex['s']=array();
+		$this->infRulesEntailIndex['p']=array();
+		$this->infRulesEntailIndex['o']=array();
+		$this->infRules=array();
+		$this->statementRuleIndex = array();
+		//arraylist of predicate labels that shall add inference rules 
+		//to the model
+		//The constants, wich statements will create rules can be configured in constants.php
+		if (INF_RES_SUBCLASSOF)
+			$this->supportedInference[] = RDF_SCHEMA_URI.RDFS_SUBCLASSOF;
+			
+		if (INF_RES_SUBPROPERTYOF)
+			$this->supportedInference[] = RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF;
+
+		if (INF_RES_RANGE)
+			$this->supportedInference[] = RDF_SCHEMA_URI.RDFS_RANGE;
+
+		if (INF_RES_DOMAIN)
+			$this->supportedInference[] = RDF_SCHEMA_URI.RDFS_DOMAIN;
+
+		if (INF_RES_OWL_SAMEAS)
+			$this->supportedInference[] = OWL_URI.OWL_SAME_AS;
+
+		if (INF_RES_OWL_INVERSEOF)
+			$this->supportedInference[] = OWL_URI.OWL_INVERSE_OF;
+
+		//Rule: rdfs12	
+		if (INF_RES_RULE_RDFS12)
+		{
+			$infRule=new InfRule();
+			$infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.'ContainerMembershipProperty'));
+			$infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),new Resource(RDF_SCHEMA_URI.'member'));
+			$this->_addInfRule($infRule,'base');
+		}
+	
+		//Rule: rdfs6
+		if (INF_RES_RULE_RDFS6)
+		{
+			$infRule=new InfRule();
+			$infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_NAMESPACE_URI.RDF_PROPERTY));
+			$infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF),'<s>');
+			$this->_addInfRule($infRule,'base');
+		}
+			
+		//Rule: rdfs8
+		if (INF_RES_RULE_RDFS8)
+		{
+			$infRule=new InfRule();
+			$infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS));
+			$infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_RESOURCE));
+			$this->_addInfRule($infRule,'base');
+			
+		}
+		
+		//Rule: rdfs10
+		if (INF_RES_RULE_RDFS10)
+		{
+			$infRule=new InfRule();
+			$infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_CLASS));
+			$infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),'<s>');
+			$this->_addInfRule($infRule,'base');
+		}
+				
+		//Rule: rdfs13
+		if (INF_RES_RULE_RDFS13)
+		{
+			$infRule=new InfRule();
+			$infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),new Resource(RDF_SCHEMA_URI.RDFS_DATATYPE));
+			$infRule->setEntailment('<s>',new Resource(RDF_SCHEMA_URI.RDFS_SUBCLASSOF),new Resource(RDF_SCHEMA_URI.RDFS_LITERAL));
+			$this->_addInfRule($infRule,'base');
+		}
+				
+	}
+	
+ 	/**
+   	* Adds a new triple to the Model without checking if the statement 
+   	* is already in the Model.
+   	* So if you want a duplicate free MemModel use the addWithoutDuplicates()
+   	* function (which is slower then add())
+   	* If the statement's predicate label is supported by the inference, 
+   	* the matching rules are added.
+   	*
+   	* @param	object Statement	$statement
+   	* @access	public
+   	* @throws	PhpError 
+   	*/	
+	function add($statement)
+	{
+		parent::add($statement);
+		//if the predicate is supported by the inference
+		if (in_array($statement->getLabelPredicate(),$this->supportedInference))
+		{
+				$this->_addToInference($statement);
+		};
+	}
+
+	/**
+	* This function analyses the statement's predicate and adds the 
+	* matching infrule to the model.
+	*
+   	* @param	object Statement	$statement
+   	* @access	private
+   	*/
+	function _addToInference($statement)
+	{
+		$predicateLabel=$statement->getLabelPredicate();
+		//get the position of the the statement in the model
+		end($this->triples);
+		$statementPosition=key($this->triples);
+		
+		switch ($predicateLabel)
+		{
+			case RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF :
+				//create a new rule
+				$infRule=new InfRule();
+				//set the trigger to match all statements, having a 
+				//predicate, that matches the subject of the statement that 
+				//created this rule.
+				$infRule->setTrigger(null,$statement->getSubject(),null);
+				//set the infrule to return a statement, having the same 
+				//subject and object as the statement, that asked for an 
+				//entailment, and having the object of the statement, 
+				//that created this rule as predicate.
+				$infRule->setEntailment('<s>',$statement->getObject(),'<o>');
+				//add the infule to Model, Statement/Rule-Index, 
+				//and Rule/Trigger (or Rule/Entailment) index
+				$this->_addInfRule($infRule,$statementPosition);
+			break;
+			
+			case RDF_SCHEMA_URI.RDFS_SUBCLASSOF :
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getSubject());
+				$infRule->setEntailment('<s>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
+				$this->infRules[]=$infRule;
+				$this->_addInfRule($infRule,$statementPosition);
+			break;
+			
+			case RDF_SCHEMA_URI.RDFS_DOMAIN :
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,$statement->getSubject(),null);
+				$infRule->setEntailment('<s>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
+				$this->infRules[]=$infRule;
+				$this->_addInfRule($infRule,$statementPosition);
+			break;
+			
+			case RDF_SCHEMA_URI.RDFS_RANGE :
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,$statement->getSubject(),null);
+				$infRule->setEntailment('<o>',new Resource(RDF_NAMESPACE_URI.RDF_TYPE),$statement->getObject());
+				$this->infRules[]=$infRule;
+				$this->_addInfRule($infRule,$statementPosition);
+			break;
+			
+			case OWL_URI.OWL_INVERSE_OF :
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,$statement->getSubject(),null);
+				$infRule->setEntailment('<o>',$statement->getObject(),'<s>');
+				$this->infRules[]=$infRule;
+				$this->_addInfRule($infRule,$statementPosition);
+			
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,$statement->getObject(),null);
+				$infRule->setEntailment('<o>',$statement->getSubject(),'<s>');
+				$this->infRules[]=$infRule;			
+				$this->_addInfRule($infRule,$statementPosition);				
+			break;
+			
+			case OWL_URI.OWL_SAME_AS :
+				$infRule=new InfRule();
+				$infRule->setTrigger($statement->getSubject(),null,null);
+				$infRule->setEntailment($statement->getObject(),'<p>','<o>');
+				$this->_addInfRule($infRule,$statementPosition);
+			
+				$infRule=new InfRule();
+				$infRule->setTrigger($statement->getObject(),null,null);
+				$infRule->setEntailment($statement->getSubject(),'<p>','<o>');
+				$this->_addInfRule($infRule,$statementPosition);
+			
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,$statement->getSubject(),null);
+				$infRule->setEntailment('<s>',$statement->getObject(),'<o>');
+				$this->_addInfRule($infRule,$statementPosition);
+			
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,$statement->getObject(),null);
+				$infRule->setEntailment('<s>',$statement->getSubject(),'<o>');
+				$this->_addInfRule($infRule,$statementPosition);
+			
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,null,$statement->getSubject());
+				$infRule->setEntailment('<s>','<p>',$statement->getObject());
+				$this->_addInfRule($infRule,$statementPosition);
+			
+				$infRule=new InfRule();
+				$infRule->setTrigger(null,null,$statement->getObject());
+				$infRule->setEntailment('<s>','<p>',$statement->getSubject());
+				$this->_addInfRule($infRule,$statementPosition);		
+			break;
+		};	
+	}
+
+	/**
+	* This function checks, which infrules were added by the statement and 
+	* removes those.
+	*
+   	* @param	object Statement	$statement
+   	* @return	integer 
+   	* @access	private
+   	*/
+	function _removeFromInference($statement)
+	{
+		$return= array();
+		$statementPosition=-1;
+		do
+		{
+			//get the position of the statement that should be removed
+			$statementPosition=$this->findFirstMatchOff($statement->getSubject(),
+													$statement->getPredicate(),
+													$statement->getObject(),
+													$statementPosition+1);						
+			if ($statementPosition!=-1)
+			{
+				//if it added any rules
+				if (isset ($this->statementRuleIndex[$statementPosition]))
+				{
+					//remove all rules 
+					foreach ($this->statementRuleIndex[$statementPosition] as $key => $value)
+					{
+						//remove from Rule-Trigger Index
+						if (is_a($this,'InfModelF'))
+						{
+							$trigger=$this->infRules[$key]->getTrigger();
+							
+							if(is_a($trigger['s'],'Node'))
+							{
+								$subjectLabel=$trigger['s']->getLabel();
+							} else 
+							{
+								$subjectLabel='null';
+							}
+							unset ($this->infRulesTriggerIndex['s'][$subjectLabel][array_search($key,$this->infRulesTriggerIndex['s'][$subjectLabel])]);
+							
+							if(is_a($trigger['p'],'Node'))
+							{
+								$predicateLabel=$trigger['p']->getLabel();
+							} else 
+							{
+								$predicateLabel='null';
+							}
+							unset ($this->infRulesTriggerIndex['p'][$predicateLabel][array_search($key,$this->infRulesTriggerIndex['p'][$predicateLabel])]);
+							
+							if(is_a($trigger['o'],'Node'))
+							{
+								$objectLabel=$trigger['o']->getLabel();
+							} else 
+							{
+								$objectLabel='null';
+							}
+							unset ($this->infRulesTriggerIndex['o'][$objectLabel][array_search($key,$this->infRulesTriggerIndex['o'][$objectLabel])]);
+						} else
+						//remove from Rule-Entailment Index
+						{	
+							$entailment=$this->infRules[$key]->getEntailment();
+							
+							if(is_a($entailment['s'],'Node'))
+							{
+								$subjectLabel=$entailment['s']->getLabel();
+							} else 
+							{
+								$subjectLabel='null';
+							}
+							unset ($this->infRulesEntailIndex['s'][$subjectLabel][array_search($key,$this->infRulesEntailIndex['s'][$subjectLabel])]);
+							
+							
+							if(is_a($entailment['p'],'Node'))
+							{
+								$predicateLabel=$entailment['p']->getLabel();
+							} else 
+							{
+								$predicateLabel='null';
+							}
+							unset ($this->infRulesEntailIndex['p'][$predicateLabel][array_search($key,$this->infRulesEntailIndex['p'][$predicateLabel])]);
+							
+							if(is_a($entailment['o'],'Node'))
+							{
+								$objectLabel=$entailment['o']->getLabel();
+							} else 
+							{
+								$objectLabel='null';
+							}
+							unset ($this->infRulesEntailIndex['o'][$objectLabel][array_search($key,$this->infRulesEntailIndex['o'][$objectLabel])]);
+						}	
+						//remove from statement-Rule Index
+						unset ($this->infRules[$key]);
+					}
+					unset($this->statementRuleIndex[$statementPosition]);
+					$return[]=$statementPosition;
+				};
+			}
+			
+		} while($statementPosition!=-1);
+		
+		//return the positions of the statements to be removed OR emty array 
+		//if nothing was found.
+		return $return;
+	}
+
+	/**
+	* Returns a model, containing all Statements, having a Predicate, that 
+	* is supported by the inference. 
+	* 
+	* @return	object Model
+	* @access	public
+	*/
+	function getSchema() 
+	{
+		$res=new MemModel();
+		//Search the base-model for all statements, having a Predicate, that 
+		//is supported by the inference.
+		foreach ($this->supportedInference as $inferencePredicateLabel)
+		{
+			$res->addModel($this->find(null, new Resource($inferencePredicateLabel), null));		
+		}
+		return $res;
+	}
+	
+	/**
+	* General method to replace nodes of a MemModel.
+	* This function is disabled in the Inference Model.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object   
+	* @param	object Node	$replacement
+	* @access	public
+	* @throws	PhpError
+	*/
+	function replace($subject, $predicate, $object, $replacement) 
+	{
+	
+	   $errmsg = RDFAPI_ERROR . '(class: InfModel; method: replace): This function is disabled in the Inference Model';
+	   trigger_error($errmsg, E_USER_ERROR); 
+	}
+
+	/**
+	* Method to search for triples using Perl-style regular expressions.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find_regex( NULL, NULL, $regex );
+	* Finds all triples where the label of the object node matches the regular 
+	* expression.
+	* Returns an empty MemModel if nothing is found.
+	* 
+	* This function is disabled in the Inference Model
+	*
+	* @param	string	$subject_regex
+	* @param	string	$predicate_regex
+	* @param	string	$object_regex
+	* @return	object MemModel
+	* @access	public
+	*/
+	function findRegex($subject_regex, $predicate_regex, $object_regex) 
+	{
+
+		$errmsg = RDFAPI_ERROR . '(class: InfModel; method: findRegex): 
+									This function is disabled in the  
+									Inference Model';
+	   	trigger_error($errmsg, E_USER_ERROR); 
+	} 
+   
+	/**
+	* Returns all tripels of a certain vocabulary.
+	* $vocabulary is the namespace of the vocabulary inluding a # : / char at
+	* the end.
+	* e.g. http://www.w3.org/2000/01/rdf-schema#
+	* Returns an empty MemModel if nothing is found.
+	*
+	* This function is disabled in the Inference Model.
+	*
+	* @param	string	$vocabulary
+	* @return	object MemModel
+	* @access	public
+	*/
+	function findVocabulary($vocabulary) 
+	{
+		
+		$errmsg = RDFAPI_ERROR . '(class: InfModel; method: findVocabulary): 
+									This function is disabled in the  
+									Inference Model';
+		trigger_error($errmsg, E_USER_ERROR); 
+	} 
+
+	
+	/**
+ 	* Adds the URI or NULL to the Infrule trigger or entailment index.
+	* 
+	*
+	* @param	object infrule	$infRule
+	* @param	integer	$infRulePosition
+	* @access	private
+	*/
+	function _addInfruleToIndex(& $infRule,& $infRulePosition)
+	{
+		//Add the rule only to the trigger index, if it is a InfFModel
+		if (is_a($this,'InfModelF'))
+		{
+			//get the trigger
+			$trigger = $infRule->getTrigger();
+			//evaluate and set the index
+			if ($trigger['s'] == null)
+			{
+				$this->infRulesTriggerIndex['s']['null'][]=$infRulePosition;
+			} else 
+			{
+				$this->infRulesTriggerIndex['s'][$trigger['s']->getLabel()][]=$infRulePosition;
+			};
+			
+			if ($trigger['p'] == null)
+			{
+				$this->infRulesTriggerIndex['p']['null'][]=$infRulePosition;
+			} else 
+			{
+				$this->infRulesTriggerIndex['p'][$trigger['p']->getLabel()][]=$infRulePosition;
+			};
+			
+			if ($trigger['o'] == null)
+			{
+				$this->infRulesTriggerIndex['o']['null'][]=$infRulePosition;
+			} else 
+			{
+				$this->infRulesTriggerIndex['o'][$trigger['o']->getLabel()][]=$infRulePosition;
+			};
+		} else 
+		//add to entailment Index if it is a BModel
+		{		
+			//get the entailment
+			$entailment = $infRule->getEntailment();
+			//evaluate the entailment and add to index
+			if (!is_a($entailment['s'],'Node'))
+			{
+				$this->infRulesEntailIndex['s']['null'][]=$infRulePosition;
+			} else 
+			{
+				$this->infRulesEntailIndex['s'][$entailment['s']->getLabel()][]=$infRulePosition;
+			};
+			
+			if (!is_a($entailment['p'],'Node'))
+			{
+				$this->infRulesEntailIndex['p']['null'][]=$infRulePosition;
+			} else 
+			{
+				$this->infRulesEntailIndex['p'][$entailment['p']->getLabel()][]=$infRulePosition;
+			};
+			
+			if (!is_a($entailment['o'],'Node'))
+			{
+				$this->infRulesEntailIndex['o']['null'][]=$infRulePosition;
+			} else 
+			{
+				$this->infRulesEntailIndex['o'][$entailment['o']->getLabel()][]=$infRulePosition;
+			};
+		};	
+	}
+	
+	/**
+ 	* Searches the trigger-index for a matching trigger and returns an
+ 	* array of infRule positions.
+	* 
+	*
+	* @param	object infrule	$infRule
+	* @return	array	integer
+	* @access	private
+	*/
+	function _findRuleTriggerInIndex($statement)
+	{
+		$return=array();
+		//a statement's subject matches all triggers with null and the same URI
+		$subjectLabel=$statement->getLabelSubject();
+		$inIndexS=array();
+		if (isset($this->infRulesTriggerIndex['s']['null'])) 
+			$inIndexS=array_values($this->infRulesTriggerIndex['s']['null']);
+		if (isset($this->infRulesTriggerIndex['s'][$subjectLabel])) 
+			$inIndexS= array_merge($inIndexS,array_values($this->infRulesTriggerIndex['s'][$subjectLabel]));
+		
+			//a statement's predicate matches all triggers with null and the same URI
+		$predicateLabel=$statement->getLabelPredicate();
+		$inIndexP=array();
+		if (isset($this->infRulesTriggerIndex['p']['null'])) 
+			$inIndexP=array_values($this->infRulesTriggerIndex['p']['null']);
+		if (isset($this->infRulesTriggerIndex['p'][$predicateLabel])) 
+			$inIndexP= array_merge($inIndexP,array_values($this->infRulesTriggerIndex['p'][$predicateLabel]));
+		
+		//a statement's object matches all triggers with null and the same URI	
+		$objectLabel=$statement->getLabelObject();
+		$inIndexO=array();
+		if (isset($this->infRulesTriggerIndex['o']['null'])) 
+			$inIndexO=array_values($this->infRulesTriggerIndex['o']['null']);
+		if (isset($this->infRulesTriggerIndex['o'][$objectLabel])) 
+			$inIndexO= array_merge($inIndexO,array_values($this->infRulesTriggerIndex['o'][$objectLabel]));
+
+		//if an infrule position occurs in subject, predicate, and object index, add to result array.		
+		foreach ($inIndexP as $positionP)
+		{
+			if (in_array($positionP,$inIndexO))
+				if (in_array($positionP,$inIndexS))
+					$return[]=$positionP;
+		}
+		return $return;
+	}
+	
+	/**
+ 	* Searches the Entailment-index for a matching Entailment and returns an
+ 	* array of infRule positions.
+	* 
+	*
+	* @param	node or null	$subject
+	* @param	node or null	$predicate
+	* @param	node or null	$object
+	* @return	array	integer
+	* @access	private
+	*/
+	function _findRuleEntailmentInIndex($subject,$predicate,$object)
+	{
+		$return=array();
+		//a node matches all entailments with NULL or a matching URI
+		if(is_a($subject,'Node'))
+		{
+			$subjectLabel=$subject->getLabel();
+			$inIndexS=array();
+			if (isset($this->infRulesEntailIndex['s']['null'])) $inIndexS=array_values($this->infRulesEntailIndex['s']['null']);
+			if (isset($this->infRulesEntailIndex['s'][$subjectLabel])) $inIndexS= array_merge($inIndexS,array_values($this->infRulesEntailIndex['s'][$subjectLabel]));
+		} else 
+		//if the subject search pattern is NULL, every rule will match the subject search patter
+		{
+			$inIndexS=array_keys($this->infRules);
+		}
+		
+		if(is_a($predicate,'Node'))
+		{
+			$predicateLabel=$predicate->getLabel();
+			$inIndexP=array();
+			if (isset($this->infRulesEntailIndex['p']['null'])) $inIndexP=array_values($this->infRulesEntailIndex['p']['null']);
+			if (isset($this->infRulesEntailIndex['p'][$predicateLabel])) $inIndexP= array_merge($inIndexP,array_values($this->infRulesEntailIndex['p'][$predicateLabel]));
+		}  else 
+		{
+			$inIndexP=array_keys($this->infRules);
+		}
+		
+		if(is_a($object,'Node'))
+		{
+			$objectLabel=$object->getLabel();
+			$inIndexO=array();
+			if (isset($this->infRulesEntailIndex['o']['null'])) $inIndexO=array_values($this->infRulesEntailIndex['o']['null']);
+			if (isset($this->infRulesEntailIndex['o'][$objectLabel])) $inIndexO= array_merge($inIndexO,array_values($this->infRulesEntailIndex['o'][$objectLabel]));
+		} else 
+		{
+			$inIndexO=array_keys($this->infRules);
+		}	
+		
+		//if an infrule position occurs in subject, predicate, and object index, add to result array.	
+		foreach ($inIndexP as $positionP)
+		{
+			if (in_array($positionP,$inIndexO))
+				if (in_array($positionP,$inIndexS))
+					$return[]=$positionP;
+		}
+		return $return;
+	}
+	
+	/**
+ 	* Adds an InfRule to the InfModel.
+ 	* $statementPosition states the positiion of the statement, that created
+ 	* this rule, in the model->triples array.
+	* 
+	*
+	* @param	object Infrule	$infRule
+	* @param	integer	$statementPosition
+	* @access	private
+	*/
+	function _addInfRule($infRule, $statementPosition)
+	{
+		//add the rule
+		$this->infRules[]=$infRule;			
+		//get the position of the added rule in the model
+		end($this->infRules);
+		$rulePosition=key($this->infRules);
+		//add the information to the index, that this statement 
+		//added this rule.
+		$this->statementRuleIndex[$statementPosition][$rulePosition]=true;
+		//add informations to index over trigger & entailment
+		$this->_addInfruleToIndex($infRule,$rulePosition);
+	}
+ }
+?>
Index: Dev/branches/Demo/rdfapi/infModel/InfModelB.php
===================================================================
--- Dev/branches/Demo/rdfapi/infModel/InfModelB.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/infModel/InfModelB.php	(revision 225)
@@ -0,0 +1,517 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: InfModelB
+// ----------------------------------------------------------------------------------
+require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModel.php';
+
+/**
+* A InfModelB extends the InfModel Class, with a backward chaining algorithm. 
+* Only the loaded or added base-triples are stored. 
+* A find-query evaluates the inference rules and recursively tries to find the statements.
+* InfModelB memorises "Dead-Ends" until the next add() command, thus 
+* makin a second find much faster.
+* InfModelB is safe for loops in Ontologies, that would cause infinite loops.
+* WARNING: A find(null,null,null) might take very long.
+*
+* @version  $Id: InfModelB.php 575 2008-06-20 12:20:12Z cweiske $
+* @author Daniel Westphal <mail at d-westphal dot de>
+
+*
+* @package infModel
+* @access	public
+**/
+ 
+class InfModelB extends InfModel 
+{
+
+	/**
+	* Array that holds combinations of inference rules with distinct 
+	* find-querys, that don't lead to any inference.
+	*
+	* @var		array
+	* @access	private
+	*/
+ 	var $findDeadEnds;
+ 	
+ 		
+   	/**
+    * Constructor
+	* You can supply a base_uri
+    *
+    * @param string $baseURI 
+	* @access	public
+    */	
+ 	function InfModelB($baseURI = null)
+ 	{
+ 		parent::InfModel($baseURI);
+ 		$this->findDeadEnds=array();	
+ 	}
+	
+	/**
+	* Adds a new triple to the Model without checking, if the statement 
+	* is already in the Model. So if you want a duplicate free Model use 
+	* the addWithoutDuplicates() function (which is slower then add())
+	*
+	* @param	object Statement	$statement
+	* @access	public
+	* @throws	PhpError 
+	*/ 	
+ 	function add($statement)
+ 	{
+ 		parent::add($statement);
+ 		//Reset the found dead-ends.
+ 		$this->findDeadEnds=array();	
+ 	}
+ 	
+	/**
+	* General method to search for triples.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find( NULL, NULL, $node );
+	* Finds all triples with $node as object.
+	* Returns an empty MemModel if nothing is found.
+	* To improve the search speed with big Models, call index(INDEX_TYPE) 
+	* before seaching.
+ 	*
+	* It recursively searches in the statements and rules to find 
+	* matching statements.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @return	object MemModel
+	* @access	public
+	* @throws	PhpError
+	*/
+    function find($subject,$predicate,$object) 
+    {
+    	$searchStringIndex=array();
+    	$resultModel=new MemModel();
+    	
+    	//add all infered statements without duplicates to the result model
+    	foreach ($this->_infFind($subject,$predicate,$object,array())as $statement)
+    	{
+    		$resultModel->addWithoutDuplicates($statement);	
+    	};
+    	return $resultModel;
+    }
+
+	/**
+ 	* This is the main inference method of the InfModelB
+ 	* The algorithm works as follows:
+ 	* Find all statements in the base model, that matches the current 
+ 	* find-query.
+ 	* Check all rules, if they are able to deliver infered statements, 
+ 	* that match the current find-query. Don't use rules with queries,
+ 	* that lead to dead-ends and don't use a rule-query-combination that 
+ 	* was used before in this branch (ontology loops).
+ 	* If a rule is possible do deliver such statements, get a new 
+ 	* find-query, that is possible to find those statements, that are able
+ 	* to trigger this rule.
+ 	* Call this _infFind method wirh the new find-query and entail the 
+ 	* resulting statements.
+ 	* If this rule, wasn't able to return any statements with this distinct 
+ 	* query, add this combination to the dead-ends.
+ 	* Return the statements from the base triples and those, which were infered.
+ 	*
+ 	* If $findOnlyFirstMatching is set to true, only the first match in 
+ 	* the base-statements is entailed an returned (used in contains() and 
+ 	* findFirstMatchingStatement() methods).
+ 	*
+ 	* You can set an offset to look for the first matching statement by setting the 
+ 	* $offset var.
+ 	* 
+	* It recursively searches in the statements and rules to find matching
+	* statements
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @param	array		$searchStringIndex
+	* @param	boolean 	$findOnlyFirstMatching
+	* @param	integer 	$offset
+	* @param	integer 	$resultCount
+	* @return	object array Statements
+	* @access	private
+	*/
+    function _infFind ($subject,$predicate,$object, $searchStringIndex, $findOnlyFirstMatching = false, $offset = 0,$resultCount = 0 )
+    {
+    	$return=array();
+    	//Find all matching statements in the base statements
+    	$findResult=parent::find($subject,$predicate,$object);
+    	//For all found statements
+		foreach ($findResult->triples as $statement)
+			{
+				$return[]=$statement;
+				$resultCount++;
+
+				//Return, if only the firstMatchingStatement was wanted
+				if ($findOnlyFirstMatching && $resultCount > $offset)
+					return $return;
+			};
+			
+		//Don't infer statements about the schema (rdfs:subClass, etc..)
+		//is false
+    	if ($predicate == null || 
+    		(is_a($predicate,'Node') && 
+    		!in_array($predicate->getLabel(),$this->supportedInference))
+    		)
+    		//Check only Rules, that the EntailmentIndex returned.
+       		foreach ($this->_findRuleEntailmentInIndex($subject,$predicate,$object) as $ruleKey)
+    		{
+	    		$infRule=$this->infRules[$ruleKey];
+				$serializedRuleStatement=$ruleKey.serialize($subject).serialize($predicate).serialize($object);
+	    		//If it is to ontology loop and no dead-end
+	    		if (!in_array($serializedRuleStatement, $searchStringIndex) && 
+	    			!in_array($serializedRuleStatement, $this->findDeadEnds))
+				{	
+					//Keep this distinct rule query cobination for 
+					//this branch to detect loops
+	    			$searchStringIndex[]=$serializedRuleStatement;	
+					
+	    			//If the rule is able to deliver statements that match 
+	    			//this query
+		    		if ($infRule->checkEntailment($subject,$predicate,$object))
+		    		{
+		    			//Get a modified find-query, that matches statements, 
+		    			//that trigger this rule
+		    			$modefiedFind=$infRule->getModifiedFind($subject,$predicate,$object);
+		    			//Call this method with the new find-query
+		    			$infFindResult=$this->_infFind($modefiedFind['s'],
+		    											$modefiedFind['p'],
+		    											$modefiedFind['o'], 
+		    											$searchStringIndex, 
+		    											$findOnlyFirstMatching,
+		    											$offset,
+		    											$resultCount) ;
+						//If it deliverd statements that matches the trigger
+		    			if (isset($infFindResult[0]))
+						{
+							foreach ($infFindResult as $statement)
+			    			{	
+			    				//Entail the statements and check, if they are not about the 
+			    				//ontology
+			    				$newStatement=$infRule->entail($statement);
+			    				if (!in_array($newStatement->getLabelPredicate(),$this->supportedInference))
+		    						//Check if, the entailed statements are, what we are looking for
+				    				if($this->_nodeEqualsFind($subject,$newStatement->getSubject()) && 
+				    					$this->_nodeEqualsFind($predicate,$newStatement->getPredicate()) && 
+				    					$this->_nodeEqualsFind($object,$newStatement->getObject() ) )
+				    				{
+				    					//Add to results
+			    						$return[]=$newStatement;
+			    						$resultCount++;
+			    						
+			    						//or return at once
+			    						if ($findOnlyFirstMatching && $resultCount > $offset)
+											return $return;
+				    				}
+					   		}
+						} else 
+						{
+							//If there were no results of the rule-query-combination, 
+							//mark this combination as a dead-end.
+							$this->findDeadEnds[]=$serializedRuleStatement;
+						}
+		    		}
+	    		}	
+    	}
+    	//Return the array of the found statements
+    	return $return;	
+    }
+    
+ 	/**
+	* Tests if the Model contains the given triple.
+	* TRUE if the triple belongs to the Model;
+	* FALSE otherwise.
+	* 
+	* @param	object Statement	&$statement
+	* @return	boolean
+	* @access	public
+	*/
+	function contains(&$statement) 
+	{
+	//throws an error, if $statement is not of class Statement
+	if(!is_a($statement,'Statement'))
+		trigger_error(RDFAPI_ERROR . '(class: InfModelB; method: contains): 
+			$statement has to be object of class Statement', E_USER_ERROR);	
+	
+	//Call the _infFind method, but let it stop, if it finds the first match.	
+	if (count( $this->_infFind($statement->getSubject(),
+								$statement->getPredicate(),
+								$statement->getObject(),
+								array(),true) ) >0)
+		{
+			return true;
+		} else 
+		{
+			return false;
+		};
+	}
+    
+  /**
+   * Searches for triples and returns the first matching statement.
+   * NULL input for any parameter will match anything.
+   * Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
+   * Returns the first statement of the MemModel where the object equals $node.
+   * Returns an NULL if nothing is found.
+   * You can define an offset to search for. Default = 0
+   *
+   * @param	object Node	$subject
+   * @param	object Node	$predicate
+   * @param	object Node	$object
+   * @param	integer	$offset
+   * @return	object Statement      
+   * @access	public
+   */
+   function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) 
+	{
+		//Call the _infFind method, but let it stop, if it finds the 
+		//first match.	
+	   	$res= $this->_infFind($subject,$predicate,$object,array(),true,$offset);
+	   		
+		if (isset($res[$offset]))
+		{
+			return $res[$offset];
+		} else 
+		{
+			return NULL;
+		};
+	}  
+
+	/**
+	* Returns a StatementIterator for traversing the Model.
+	*
+	* @access	public 
+	* @return	object	StatementIterator
+	*/  
+	function & getStatementIterator() 
+	{
+		// Import Package Utility
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+		// Gets a MemModel by executing a find(null,null,null) to get a 
+		//inferable statements.	
+		// WARNING: might be slow
+		return new StatementIterator($this->getMemModel());
+	}	
+	
+	/**
+	* Number of all inferable triples in the Model.
+	* WARNING: uses a find(null,null,null) to find all statements! (might take a while)
+	* 
+	* @param 	boolean
+	* @return	integer
+	* @access	public
+	*/
+	function size()
+	{
+		// Gets a MemModel by executing a find(null,null,null) to get a 
+		//inferable statements.	
+		// WARNING: might be slow
+	   	$res = $this->getMemModel();
+	   	return $res->size();
+	}
+    	
+	/**
+	* Create a MemModel containing all the triples (including inferred 
+	* statements) of the current InfModelB.
+	*
+	* @return object MemModel
+	* @access public
+	*/
+	function & getMemModel() 
+	{
+		
+		$return=$this->find(null,null,null);
+		$return->setBaseURI($this->baseURI);
+		$return->addParsedNamespaces($this->getParsedNamespaces());
+		return $return;
+	}
+
+	/**
+	* Create a MemModel containing only the base triples (without inferred 
+	* statements) of the current InfModelB.
+	*
+	* @return object MemModel
+	* @access public
+	*/
+	function & getBaseMemModel() 
+	{
+		$return= new MemModel();
+		$return->setBaseURI($this->baseURI);
+		foreach ($this->triples as $statement)
+			$return->add($statement);
+			
+		$retun->addParsedNamespaces($this->getParsedNamespaces());
+		return $return;
+	}
+
+	/**
+	* Short Dump of the  InfModelB.
+	*
+	* @access	public 
+	* @return	string 
+	*/  
+	function toString() 
+	{
+	   return 'InfModelB[baseURI=' . $this->getBaseURI() . ';  size=' . $this->size(true) . ']';
+	}
+
+	/**
+	* Dumps of the InfModelB including ALL inferable triples.
+	*
+	* @access	public 
+	* @return	string 
+	*/  
+	function toStringIncludingTriples() 
+	{
+	   	$dump = $this->toString() . chr(13);
+	   	$stateIt=new StatementIterator($this->find(null,null,null));
+		while($statement=$stateIt->next())
+		{
+	   		$dump .= $statement->toString() . chr(13);
+	   	}
+	   	return $dump;
+	}  
+
+	/**
+	* Saves the RDF,N3 or N-Triple serialization of the full InfModelB 
+	* (including inferred triples) to a file.
+	* You can decide to which format the model should be serialized by 
+	* using a corresponding suffix-string as $type parameter. If no $type 
+	* parameter is placed this method will serialize the model to XML/RDF 
+	* format.
+	* Returns FALSE if the InfModelB couldn't be saved to the file.
+	*
+	* @access	public 
+	* @param 	string 	$filename
+	* @param 	string 	$type
+	* @throws   PhpError
+	* @return	boolean   
+	*/  
+	function saveAs($filename, $type ='rdf') 
+	{
+	
+		$memmodel=$this->getMemModel();
+		return $memmodel->saveAs($filename, $type);
+	} 
+
+	/**
+	* Writes the RDF serialization of the Model including ALL inferable 
+	* triples as HTML.
+	*
+	* @access	public 
+	*/  
+	function writeAsHtml() 
+	{
+			require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+		$ser = new RdfSerializer();
+	    $rdf =& $ser->serialize($this->getMemModel());
+		$rdf = htmlspecialchars($rdf, ENT_QUOTES);
+		$rdf = str_replace(' ', '&nbsp;', $rdf);
+		$rdf = nl2br($rdf);
+		echo $rdf; 
+	}  
+
+	/**
+	* Writes the RDF serialization of the Model including ALL inferable 
+	* triples as HTML table.
+	*
+	* @access	public 
+	*/  
+	function writeAsHtmlTable() 
+	{
+			// Import Package Utility
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+		$rdfUtil = new RDFUtil();
+		$rdfUtil->writeHTMLTable($this->getMemModel());
+	}  
+	
+	
+	/**
+	* Writes the RDF serialization of the Model including ALL inferable 
+	* triples.
+	*
+	* @access	public 
+	* @return	string 
+	*/  
+	function writeRdfToString() 
+	{
+	   	// Import Package Syntax
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);   		
+		$ser = new RdfSerializer();
+	    $rdf =& $ser->serialize($this->getMemModel());
+		return $rdf;
+	}    
+
+	/**
+	* Removes the triple from the MemModel. 
+	* TRUE if the triple is removed.
+	* FALSE otherwise.
+	*
+	* Checks, if it touches any statements, that added inference rules 
+	* to the model.
+	*
+	* @param	object Statement	$statement
+	* @return   boolean
+	* @access	public
+	* @throws	PhpError
+	*/
+	function remove($statement)
+	{
+		if (parent::contains($statement))
+		{
+			if (in_array($statement->getLabelPredicate(),$this->supportedInference));
+				while (count($this->_removeFromInference($statement))>0);
+				
+			$this->findDeadEnds=array();
+			return parent::remove($statement);
+		} else 
+		{
+			return false;
+		}
+	}
+
+	/**
+	* Checks, if a single node matches a single find pattern.
+	* TRUE if the node matches.
+	* FALSE otherwise.
+	*
+	* Checks, if it touches any statements, that added inference rules 
+	* to the model. 
+	*
+	* @param	object Statement	$statement
+	* @return   boolean
+	* @access	private
+	*/
+	function _nodeEqualsFind(& $find, $node)
+	{
+		//If the find pattern is a node, use the nodes equal-method and 
+		//return the result.
+		if (is_a($find,'Node'))
+			return $node->equals($find);
+		
+		//Null-pattern matches anything.
+		if ($find == null)
+		{
+			return true;
+		} else 
+		{
+			return false;
+		}
+	}
+	
+	/**
+	* Returns a FindIterator for traversing the MemModel.
+	* Disabled in InfModelB.
+	*
+	* @access	public 
+	* @return	object	FindIterator
+	*/  
+	function & findAsIterator($sub=null,$pred=null,$obj=null) {
+		$errmsg = RDFAPI_ERROR . '(class: InfModelB; method: findAsIterator): 
+									This function is disabled in the
+									Inference Model';
+		trigger_error($errmsg, E_USER_ERROR); 
+	}	  
+}
+?>
Index: Dev/branches/Demo/rdfapi/infModel/InfModelF.php
===================================================================
--- Dev/branches/Demo/rdfapi/infModel/InfModelF.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/infModel/InfModelF.php	(revision 225)
@@ -0,0 +1,407 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: InfModelF
+// ----------------------------------------------------------------------------------
+require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModel.php';
+
+/**
+* A InfModelF extends the InfModel Class, with a forward chaining algorithm.  
+* If a new statement is added, it is enferd at 
+* once and all the entailed statements are added too. 
+* When adding or removing a statement, that produced a new inference rule, 
+* all entailed statements are discarded and the whole base model is infered 
+* again.
+* The InfModelF is safe for loops in Ontologies, that would cause infinite loops.
+*
+* @version  $Id: InfModelF.php 575 2008-06-20 12:20:12Z cweiske $
+* @author Daniel Westphal <mail at d-westphal dot de>
+
+*
+* @package infModel
+* @access	public
+**/
+
+class InfModelF extends InfModel 
+{
+
+	/**
+	* Array that holds the position of the infered statements in the model.
+	*
+	* @var		array
+	* @access	private
+	*/	
+	var $infPos;
+	
+	
+	/**
+	* Variable that influences the habbit when adding statements. 
+	* Used by the loadModel method to increase performance.
+	*
+	* @var		boolean
+	* @access	private
+	*/
+	var $inferenceEnabled;
+	
+		
+   	/**
+    * Constructor
+	* You can supply a base_uri.
+    *
+    * @param string $baseURI 
+	* @access	public
+    */		
+	function InfModelF($baseURI = NULL)
+	{
+		parent::InfModel($baseURI);
+		$this->infPos=array();
+		$this->inferenceEnabled=true;	
+	}
+
+	/**
+	* Adds a new triple to the MemModel without checking if the statement 
+	* is already in the MemModel.
+	* So if you want a duplicate free MemModel use the addWithoutDuplicates() 
+	* function (which is slower then add())
+	* The statement is infered and all entailed statements are added.
+	*
+	* @param	object Statement	$statement
+	* @access	public
+	* @throws	PhpError 
+	*/
+	function add ($statement)
+	{
+		parent::add($statement);
+		if ($this->inferenceEnabled)
+		{
+			foreach ($this->entailStatement($statement) as $state)
+			{
+				//a addWithoutDublicates construct
+				if(!$this->contains($state))
+				{
+			
+					parent::add($state);
+					//save the position of the infered statements
+					end($this->triples);
+					$this->infPos[]=key($this->triples);
+				};
+			}; 
+		//apply the complete inference to the model, if the added statement was able to add a rule
+		if (in_array($statement->getLabelPredicate(),$this->supportedInference))
+			$this->applyInference();
+		}
+	}
+	
+ 
+	/**
+	* Checks if a new statement is already in the MemModel and adds 
+	* the statement, if it is not in the MemModel.
+	* addWithoutDuplicates() is significantly slower then add(). 
+	* Retruns TRUE if the statement is added.
+	* FALSE otherwise.
+	* The statement is infered and all entailed statements are added.
+	*
+	* @param	object Statement	$statement
+	* @return   boolean
+	* @access	public
+	* @throws	PhpError 
+	*/	
+	 function addWithoutDuplicates(& $statement) 
+	 {
+		if(!$this->contains($statement))
+		{
+		 	parent::add($statement);
+		 	if ($this->inferenceEnabled)
+		 	{
+				foreach ($this->entailStatement($statement) as $statement)
+				{
+					if(!$this->contains($statement))
+						{
+							parent::add($statement);
+							//save the position of the infered statements
+							end($this->triples);
+							$this->infPos[]=key($this->triples);
+						};
+				};
+			if (in_array($statement->getLabelPredicate(),$this->supportedInference))
+				$this->applyInference();
+		 	}
+			return true;
+		 }
+		 return false;
+	 }
+
+	
+
+	/**
+	* Entails every statement and adds the entailments if not already 
+	* in the model.
+	*
+	* @access	private
+	*/		
+	function applyInference()
+	{
+		//check every statement in the model
+		foreach ($this->triples as $statement)
+		{
+			//gat all statements, that it recursively entails
+			foreach ($this->entailStatement($statement) as $statement)
+			{
+				if (!$this->contains($statement))
+				{
+					parent::add($statement);
+					//add the InfStatement position to the index
+					end($this->triples);
+					$this->infPos[]=key($this->triples);
+				};
+			};
+		};
+	}
+	
+ 
+	/**
+	* Entails a statement by recursively using the _entailStatementRec 
+	* method.
+	* 
+	* @param	object Statement	$statement
+	* @return   array of statements
+	* @access	public
+	*/			
+	function entailStatement (& $statement)
+	{
+		$infStatementsIndex=array();
+		return $this->_entailStatementRec($statement,$infStatementsIndex);
+	}
+
+	/**
+	* Recursive method, that checks the statement with the trigger of 
+	* every rule. If the trigger matches and entails new statements, 
+	* those statements are recursively infered too.
+	* The $infStatementsIndex array holds lready infered statements 
+	* to prevent infinite loops.
+	*
+	* 
+	* @param	object Statement $statement
+	* @param	array $infStatementsIndex
+	* @return   array of statements
+	* @access	private
+	*/
+	function _entailStatementRec ( $statement,& $infStatementsIndex)
+	{
+		$infStatements = array();
+		$return = array();
+		
+		//dont entail statements about the supported inference-schema
+		if (!in_array($statement->getLabelPredicate(),$this->supportedInference))
+		{
+			//check only the rules, that were returned by the index
+			foreach ($this->_findRuleTriggerInIndex($statement) as $key )
+			{
+				$infRule=$this->infRules[$key];
+	
+				$stateString=$key.serialize($statement);
+				//If the statement wasn't infered before
+				if (!in_array($stateString,$infStatementsIndex))
+				{
+					$infStatementsIndex[]=$stateString;
+					//Check, if the Statements triggers this rule
+					if($infRule->checkTrigger($statement))
+					{
+						$infStatement=$infRule->entail($statement);
+						#if(!$this->contains($infStatement))
+						{
+							$return[]=$infStatement;
+							$return=array_merge($return,
+												$this->_entailStatementRec($infStatement, 
+																			$infStatementsIndex));
+						};	
+																		
+					};
+				};
+			};
+		};	
+		return $return;
+	}
+	
+	/**
+	* Removes all infered statements from the model but keeps the 
+	* infernece rules.
+	*
+	* @access	public
+	*/	 
+	function removeInfered()
+	{
+		$indexTmp=$this->indexed;
+		$this->index(-1);
+		foreach ($this->infPos as $key)
+		{
+			unset($this->triples[$key]);
+		};
+		$this->infPos=array();
+		$this->index($indexTmp);
+	}	
+	 
+	 
+	/**
+	* Load a model from a file containing RDF, N3 or N-Triples.
+	* This function recognizes the suffix of the filename (.n3 or .rdf) and
+	* calls a suitable parser, if no $type is given as string 
+	* ("rdf" "n3" "nt");
+	* If the model is not empty, the contents of the file is added to 
+	* this DbModel.
+	*
+	* While loading the model, the inference entailing is disabled, but 
+	* new inference rules are added to increase performance.
+	* 
+	* @param 	string 	$filename
+	* @param 	string 	$type
+	* @access	public
+	*/
+	function load($filename, $type = NULL) 
+	{
+		//Disable entailing to increase performance
+	 	$this->inferenceEnabled=false;
+	 	parent::load($filename, $type);
+	 	//Enable entailing
+	 	$this->inferenceEnabled=true;
+	 	//Entail all statements
+	 	$this->applyInference();
+ 	}
+	
+	/**
+	* Short Dump of the InfModelF.
+	*
+	* @access	public 
+	* @return	string 
+	*/  
+	function toString() {
+	   return 'InfModelF[baseURI=' . $this->getBaseURI() . ';  
+	   			size=' . $this->size(true) . ']';
+	}
+		
+	/**
+	* Create a MemModel containing all the triples (including inferred 
+	* statements) of the current InfModelF.
+	*
+	* @return object MemModel
+	* @access public
+	*/
+	function & getMemModel() 
+	{
+		$return= new MemModel();
+		$return->setBaseURI($this->baseURI);
+		foreach ($this->triples as $statement)
+			$return->add($statement);
+		
+		$return->addParsedNamespaces($this->getParsedNamespaces());	
+		return $return;
+	}
+	  
+	/**
+	* Create a MemModel containing only the base triples 
+	* (without inferred statements) of the current InfModelF.
+	*
+	* @return object MemModel
+	* @access public
+	*/
+	function  getBaseMemModel() 
+	{
+		$return= new MemModel();
+		$return->setBaseURI($this->baseURI);
+		foreach ($this->triples as $key => $statement)
+			if (!in_array($key,$this->infPos))
+				$return->add($statement);
+		$retun->addParsedNamespaces($this->getParsedNamespaces());
+		return $return;
+	}
+	
+	
+	/**
+	* Removes the triple from the MemModel. 
+	* TRUE if the triple is removed.
+	* FALSE otherwise.
+	*
+	* Checks, if it touches any statements, that added inference rules 
+	* to the model 
+	*
+	* @param	object Statement	$statement
+	* @return   boolean
+	* @access	public
+	* @throws	PhpError
+	*/
+	function remove($statement)
+	{
+		//If the statement is in the model
+		if($this->contains($statement))
+		{
+			$inferenceRulesWereTouched=false;
+			//If the statement was able to add inference rules
+			if (in_array($statement->getLabelPredicate(),$this->supportedInference))
+			{
+				$statementPositions=$this->_removeFromInference($statement);
+				$inferenceRulesWereTouched=true;
+			} else 
+			//get the position of all matching statements
+			{
+				$statementPositions=array();
+				//find the positions of the statements
+				$statementPosition=-1;
+				do
+				{
+					
+					$statementPosition =
+					$this->findFirstMatchOff($statement->getSubject(),
+												$statement->getPredicate(),
+												$statement->getObject(),
+												$statementPosition+1);
+												
+					if ($statementPosition!=-1)
+						$statementPositions[]=$statementPosition;							
+												
+				}	while ($statementPosition != -1);			
+			}
+			
+			//remove matching statements
+			parent::remove($statement);
+			foreach ($statementPositions as $statementPosition)
+			{
+				//if the statement was infered, remove it from the index of the infered statements.
+				if (in_array($statementPosition,$this->infPos))
+					unset ($this->infPos[$statementPosition]);
+			}
+			if ($inferenceRulesWereTouched)
+			{
+				//remove the statement and re-entail the model
+				$this->removeInfered();
+				$this->applyInference();
+			}
+			return true;
+		} else 
+		{
+			return false;	
+		}
+	}
+	
+	/** 
+	* Adds another model to this MemModel.
+	* Duplicate statements are not removed. 
+	* If you don't want duplicates, use unite().
+	* If any statement of the model to be added to this model contains a blankNode 
+	* with an identifier already existing in this model, a new blankNode is generated.
+	*
+	* @param	object Model	$model 
+	* @access	public
+	* @throws phpErrpr
+	*
+	*/
+	function addModel(&$model)  
+	{
+		//Disable entailing to increase performance
+	 	$this->inferenceEnabled=false;
+	 	parent::addModel($model);
+	 	//Enable entailing
+	 	$this->inferenceEnabled=true;
+	 	//Entail all statements
+	 	$this->applyInference();
+	}
+};
+?>
Index: Dev/branches/Demo/rdfapi/infModel/InfModelP.php
===================================================================
--- Dev/branches/Demo/rdfapi/infModel/InfModelP.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/infModel/InfModelP.php	(revision 225)
@@ -0,0 +1,19 @@
+<?php
+// ----------------------------------------------------------------------------------
+// InfModel Package
+// ----------------------------------------------------------------------------------
+//
+// Description               : InfModel package
+//
+//
+// Author: Daniel Westphal	<mail at d-westphal dot de>
+//
+// ----------------------------------------------------------------------------------
+
+// Include InfModel classes
+require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfRule.php');
+require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfStatement.php');
+require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModel.php');
+require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModelB.php');
+require_once( RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php');
+?>
Index: Dev/branches/Demo/rdfapi/infModel/InfRule.php
===================================================================
--- Dev/branches/Demo/rdfapi/infModel/InfRule.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/infModel/InfRule.php	(revision 225)
@@ -0,0 +1,343 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: InfRule
+// ----------------------------------------------------------------------------------
+
+/**
+ * This class represents a single rule in a RDFS inference model.
+ * It primary constists of a trigger and an entailment.
+ * In the forward-chaining mode (RDFSFModel) a statement is checked, 
+ * if it satisfies the trigger. If it does, a new statement is returned.
+ * In the backward-chaining mode (RDFSBModel) a find-query is checked 
+ * with the entailment. If this entailment could satify the find-query, 
+ * a new find-query is returned, that searches for statements that 
+ * satisfy the trigger of this rule.
+ * 
+ * @version  $Id: InfRule.php 290 2006-06-22 12:23:24Z tgauss $
+ * @author Daniel Westphal <mail at d-westphal dot de>
+
+ *
+ * @package infModel
+ * @access	public
+ **/
+ 
+class InfRule 
+{
+	
+	/**
+	* Array, that hold the trigger subject in key ['s'], the trigger 
+	* predicate in ['p'], and the trigger object in ['o'].
+	* The array values can be NULL to match anything or be a node that 
+	* has to be matched.
+	*
+	* @var		array
+	* @access	private
+	*/
+	var $trigger;
+
+	/**
+	* Array, that hold the entailment subject in key ['s'], the 
+	* entailment predicate in ['p'], and the entailment object in ['o'].
+	* The array values can be a node that will be inserted in the 
+	* returning statement, or '<s>' to insert the subject,'<p>' to insert 
+	* the predicate, or '<o>' to insert the object of the checked statement
+	* to this position in the new returned statement.
+	*
+	* @var		array
+	* @access	private
+	*/	
+ 	var $entailment;
+	
+ 	
+   /**
+    * Constructor
+	* 
+    * 
+	* @access	public
+    */	 	
+ 	function infRule()
+ 	{
+		//initialising vars
+		$this->trigger=array();
+		$this->entailment=array();
+ 	}
+ 	
+ 	/**
+	* Sets the trigger of this rule
+	* The values can be NULL to match anything or be a node that has to 
+	* be matched.
+	*
+	* @param	object Node OR NULL	$subject
+   	* @param	object Node OR NULL	$predicate
+   	* @param	object Node OR NULL	$object
+	* @access	public
+	* @throws	PhpError
+	*/	
+ 	function setTrigger ($subject, $predicate, $object)
+ 	{
+ 		//throw an error if subject, predicate, or object are neither 
+ 		//node, nor null.
+		if(!is_a($subject,'Node') && $subject != null) 
+			trigger_error(RDFAPI_ERROR . '(class: Infrule; method: 
+				setTrigger): $subject has to be null or of class Node'
+				, E_USER_ERROR);
+		if(!is_a($predicate,'Node') && $predicate != null) 
+			trigger_error(RDFAPI_ERROR . '(class: Infrule; method: 
+				setTrigger): $predicate has to be null or of class Node'
+				, E_USER_ERROR);
+		if(!is_a($object,'Node') && $object != null) 
+			trigger_error(RDFAPI_ERROR . '(class: Infrule; method: 
+				setTrigger): $object has to be null or of class Node'
+				, E_USER_ERROR);
+ 			
+ 		//set the trigger
+		$this->trigger['s']=$subject;
+		$this->trigger['p']=$predicate;
+		$this->trigger['o']=$object;		
+ 	} 
+
+ 	/**
+	* Sets the entailment of this rule
+	* The values can be NULL to match anything or be a node that has to 
+	* be matched.
+	*
+	* @param	object Node OR NULL	$subject
+   	* @param	object Node OR NULL	$predicate
+   	* @param	object Node OR NULL	$object
+	* @access	public
+	* @throws	PhpError
+	*/	 	
+	function setEntailment($subject,$predicate,$object)
+	{
+		//throw an error if subject, predicate, or object are neither node, 
+		//nor <s>,<p>,<o>.
+		if(!is_a($subject,'Node') && !ereg('<[spo]>', $subject)) 
+			trigger_error(RDFAPI_ERROR . '(class: Infrule; method:  
+				setEntailment): $subject has to be <s>,<p>,or <o> or of class Node'
+				, E_USER_ERROR);
+		if(!is_a($predicate,'Node') && !ereg('<[spo]>', $predicate)) 
+			trigger_error(RDFAPI_ERROR . '(class: Infrule; method: 
+				setEntailment): $predicate has to be <s>,<p>,or <o> or of class Node'
+				, E_USER_ERROR);
+		if(!is_a($object,'Node') && !ereg('<[spo]>', $object)) 
+			trigger_error(RDFAPI_ERROR . '(class: Infrule; method: 
+				setEntailment): $object has to be <s>,<p>,or <o> or of class Node'
+				, E_USER_ERROR);
+		
+		$this->entailment['s']=$subject;	
+		$this->entailment['p']=$predicate;
+		$this->entailment['o']=$object;
+	}
+ 
+ 	/**
+	* Checks, if the statement satisfies the trigger.
+	*
+   	* @param	object Statement 
+	* @return 	boolean
+	* @access	public
+	* @throws	PhpError
+	*/
+ 	function checkTrigger(& $statement)
+ 	{	
+ 		//is true, if the trigger is null to match anything 
+ 		//or equals the statement's subject
+ 		$shouldFireS = 	$this->trigger['s'] ==  null || 
+ 						$this->trigger['s']->equals($statement->getSubject());
+ 						
+ 		//is true, if the trigger is null to match anything 
+ 		//or equals the statement's predicate
+ 		$shouldFireP = 	$this->trigger['p'] ==  null || 
+ 						$this->trigger['p']->equals($statement->getPredicate());
+
+ 		//is true, if the trigger is null to match anything 
+ 		//or equals the statement's object
+ 		$shouldFireO = 	$this->trigger['o'] ==  null || 
+ 						$this->trigger['o']->equals($statement->getObject());
+
+ 		//returns true, if ALL are true
+ 		return $shouldFireS && $shouldFireP && $shouldFireO;
+ 	}
+ 
+ 	/**
+	* Checks, if this rule could entail a statement that matches
+	* a find of $subject,$predicate,$object.
+	*
+   	* @param	object Statement 
+	* @return 	boolean
+	* @access	public
+	* @throws	PhpError
+	*/ 	
+ 	function checkEntailment ($subject, $predicate, $object)
+ 	{
+		//true, if $subject is null, the entailment's subject matches
+		//anything, or the $subject equals the entailment-subject.
+ 		$matchesS=	$subject ==  null ||
+		 			!is_a($this->entailment['s'],'Node') ||
+		 			$this->entailment['s']->equals($subject);
+
+		//true, if $predicate is null, the entailment's predicate matches 
+		//anything, or the $predicate equals the entailment-predicate.		 			
+		 $matchesP=	$predicate ==  null ||
+		 			!is_a($this->entailment['p'],'Node') ||
+		 			$this->entailment['p']->equals($predicate);
+
+		//true, if $object is null, the entailment's object matches 
+		//anything, or the $object equals the entailment-object.		 					 			
+		$matchesO=	$object ==  null ||
+		 			!is_a($this->entailment['o'],'Node') ||
+		 			$this->entailment['o']->equals($object);
+  		
+ 		//returns true, if ALL are true
+ 		return $matchesS && $matchesP && $matchesO;
+	}
+	
+ 	/**
+	* Returns a infered InfStatement by evaluating the statement with 
+	* the entailment rule.
+	*
+   	* @param	object Statement 
+	* @return 	object InfStatement
+	* @access	public
+	* @throws	PhpError
+	*/  	
+ 	function entail(& $statement)
+ 	{
+ 		//if the entailment's subject is <s>,<p>,or <o>, put the statements 
+ 		//subject,predicate,or object into the subject of the 
+ 		//entailed statement. If the entailment's subject is a node, 
+ 		//add that node to the statement.	
+	 	switch ($this->entailment['s'])
+		{
+		case '<s>':
+		 	$entailedSubject=$statement->getSubject();
+	 	break;
+		case '<p>':
+		 	$entailedSubject=$statement->getPredicate();
+		break;	
+ 		case '<o>':
+	 		$entailedSubject=$statement->getObject();
+	 	break;
+		default:
+		 	$entailedSubject=$this->entailment['s'];
+		};
+		
+ 		//if the entailment's predicate is <s>,<p>,or <o>, put the 
+ 		//statements subject,predicate,or object into the predicate of 
+ 		//the entailed statement. If the entailment's predicate is a node, 
+ 		//add that node to the statement.			
+		switch ($this->entailment['p'])
+		{
+		case '<s>':
+		 	$entailedPredicate=$statement->getSubject();
+	 	break;
+		case '<p>':
+		 	$entailedPredicate=$statement->getPredicate();
+	 	break;	
+ 		case '<o>':
+	 		$entailedPredicate=$statement->getObject();
+	 	break;
+		default:
+		 	$entailedPredicate=$this->entailment['p'];
+		};
+		
+ 		//if the entailment's object is <s>,<p>,or <o>, put the 
+ 		//statements subject,predicate,or object into the object of 
+ 		//the entailed statement. If the entailment's object is a node,
+ 		//add that node to the statement.			
+		switch ($this->entailment['o'])
+		{
+		case '<s>':
+		 	$entailedObject=$statement->getSubject();
+	 	break;
+		case '<p>':
+		 	$entailedObject=$statement->getPredicate();
+	 	break;	
+	 	case '<o>':
+		 	$entailedObject=$statement->getObject();
+	 	break;
+		default:
+		 	$entailedObject=$this->entailment['o'];
+		};
+		
+		//return the infered statement
+		return (new InfStatement($entailedSubject,$entailedPredicate,$entailedObject));
+ 	}
+ 	
+ 	/**
+	* Returns a find-query that matches statements, whose entailed 
+	* statements would match the supplied find query.
+	*
+   	* @param	Node OR null $subject
+   	* @param	Node OR null $predicate
+   	* @param	Node OR null $object
+	* @return 	array
+	* @access	public
+	* @throws	PhpError
+	*/  	 	
+ 	function getModifiedFind( $subject, $predicate, $object)
+ 	{			
+ 		$findSubject=$this->trigger['s'];
+ 		$findPredicate=$this->trigger['p'];
+ 		$findObject=$this->trigger['o'];
+ 		
+ 		switch ($this->entailment['s'])
+ 			{
+ 			case '<s>':
+ 			 	$findSubject=$subject;
+		 	break;
+ 			case '<p>':
+ 			 	$findPredicate=$subject;
+		 	break;	
+		 	case '<o>':
+			 	$findObject=$subject;
+		 	break;
+ 			};
+ 			
+ 		switch ($this->entailment['p'])
+ 			{
+ 			case '<s>':
+ 			 	$findSubject=$predicate;
+		 	break;
+ 			case '<p>':
+ 			 	$findPredicate=$predicate;
+		 	break;	
+		 	case '<o>':
+			 	$findObject=$predicate;
+	 		break;
+ 			};
+ 			
+ 		switch ($this->entailment['o'])
+ 			{
+ 			case '<s>':
+ 			 	$findSubject=$object;
+		 	break;
+ 			case '<p>':
+ 			 	$findPredicate=$object;
+		 	break;	
+		 	case '<o>':
+			 	$findObject=$object;
+		 	break;
+ 			};
+	
+ 		return array('s' => $findSubject,
+			 	     'p' => $findPredicate,
+			 		 'o' => $findObject );	
+ 	}
+ 	
+ 	function getTrigger()
+ 	{
+ 		return array 	(	's' => $this->trigger['s'],
+ 							'p' => $this->trigger['p'],	
+ 							'o' => $this->trigger['o'],
+ 						);
+ 	}
+ 	
+ 	function getEntailment()
+ 	{
+ 		return array 	(	's' => $this->entailment['s'],
+ 							'p' => $this->entailment['p'],	
+ 							'o' => $this->entailment['o'],
+ 						);
+ 	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/infModel/InfStatement.php
===================================================================
--- Dev/branches/Demo/rdfapi/infModel/InfStatement.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/infModel/InfStatement.php	(revision 225)
@@ -0,0 +1,18 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: InfStatement
+// ----------------------------------------------------------------------------------
+
+/**
+ * An RDF statement which was entailed by a inference rule.
+ * See Statement Class for further information. 
+ *  
+ * @author Daniel Westphal <mail at d-westphal dot de>
+ * @version  $Id: InfStatement.php 268 2006-05-15 05:28:09Z tgauss $
+ * @package infModel
+ */
+class InfStatement extends Statement  {
+	
+}
+	
+?>
Index: Dev/branches/Demo/rdfapi/model/Blanknode.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/Blanknode.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/Blanknode.php	(revision 225)
@@ -0,0 +1,120 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/Resource.php';
+
+// ----------------------------------------------------------------------------------
+// Class: BlankNode
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * An RDF blank node. 
+ * In model theory, blank nodes are considered to be drawn from some set of 
+ * 'anonymous' entities which have no label but are unique to the graph.
+ * For serialization they are labeled with a URI or a _:X identifier.
+ * 
+ *
+ * @version  $Id: Blanknode.php 453 2007-06-20 21:19:09Z cweiske $
+ * @authors Chris Bizer <chris@bizer.de>,
+ *          Radoslaw Oldakowski <radol@gmx.de>
+ *
+ * @package model
+ * @access	public
+ *
+ */ 
+ class BlankNode extends Resource {
+  
+   /**
+    * Constructor
+	* You can supply a label or You supply a model and a unique ID is gernerated.
+    *
+    * @param	mixed	$namespace_or_uri_or_model
+ 	* @param 	string $localName
+	* @access	public
+    */
+    function BlankNode($namespace_or_uri_or_model , $localName = NULL) {
+		
+        if (is_a($namespace_or_uri_or_model, 'Model')) {
+			// generate identifier
+			$id = $namespace_or_uri_or_model->getUniqueResourceURI(BNODE_PREFIX);
+			
+			$this->uri = $id;
+
+		} else {
+			// set identifier
+			if ($localName == NULL) {
+				$this->uri = $namespace_or_uri_or_model;
+		  	} else {
+				$this->uri = $namespace_or_uri_or_model . $localName;
+	  	    }
+		 }
+    }
+
+  /**
+   * Returns the ID of the blank node.
+   *
+   * @return 	string
+   * @access	public  
+   */	
+  function getID() {
+  			return $this->uri;
+   }
+
+  /**
+   * Returns the ID of the blank node.
+   *
+   * @return 	string
+   * @access	public  
+   */	
+  function getLabel() {
+  		return $this->uri;
+   }
+
+  /**
+   * Dumps bNode.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+  function toString() {
+
+        return 'bNode("' . $this->uri . '")';
+  }
+	
+  /**
+   * Checks if two blank nodes are equal.
+   * Two blank nodes are equal, if they have the same temporary ID.
+   *
+   * @access	public 
+   * @param		object	resource $that
+   * @return	boolean 
+   */  
+   function equals ($that) {
+	
+	    if ($this == $that) {
+	      return true;
+	    }
+        if (($that == NULL) or !(is_a($that, 'BlankNode'))) {
+	      return false;
+	    }
+	    	
+		if ($this->getURI() == $that->getURI()) {
+	      return true;
+	    }
+	
+	    return false;
+	}
+
+
+    /**
+    *   Doing string magic in PHP5
+    *   @return string String representation of this Blank Node
+    */
+    function __toString()
+    {
+        return $this->toString();
+    }
+
+} // end: BlankNode 
+
+
+?>
Index: Dev/branches/Demo/rdfapi/model/DBase.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/DBase.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/DBase.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+// ----------------------------------------------------------------------------------
+// DBase
+// ----------------------------------------------------------------------------------
+//
+// Description               : DBase package
+//
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+// Include DBase class
+require_once( RDFAPI_INCLUDE_DIR . 'model/DbModel.php' );
+// include adodb classes
+require_once(RDFAPI_INCLUDE_DIR .'util/adodb/adodb.inc.php');
+?>
Index: Dev/branches/Demo/rdfapi/model/DbModel.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/DbModel.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/DbModel.php	(revision 225)
@@ -0,0 +1,1319 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/Model.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Blanknode.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Statement.php';
+
+// ----------------------------------------------------------------------------------
+// Class: DbModel
+// ----------------------------------------------------------------------------------
+
+/**
+* This class provides methods for manipulating DbModels from DbStore.
+* A DbModel is an RDF Model, which is persistently stored in a relational database.
+* This Class uses the ADOdb Database Abstraction Library for PHP (http://adodb.sourceforge.net/).
+*
+*
+* @version  $Id: DbModel.php 533 2007-08-16 09:32:03Z cweiske $
+* @author   Radoslaw Oldakowski <radol@gmx.de>
+*
+* @package model
+* @access	public
+*/
+
+
+class DbModel extends Model{
+
+	/**
+	* Database connection object.
+	*
+	* @var     object ADOConnection
+	* @access	private
+	*/
+	var $dbConn;
+
+	/**
+	* Unique model URI.
+	* Used to identify the DbModel.
+	*
+	* @var     string
+	* @access	private
+	*/
+	var $modelURI;
+
+
+	/**
+	* Database internal modelID.
+	* Used to avoid JOINs.
+	*
+	* @var     string
+	* @access	private
+	*/
+	var $modelID;
+
+
+
+
+	/**
+	* Constructor
+	* Do not call this directly.
+	* Use the method getModel,getNewModel or putModel of the Class DbStore instead.
+	*
+	* @param   object ADOConnection  &$dbConnection
+	* @param   string   $modelURI
+	* @param   string   $modelID
+	* @param   string   $baseURI
+	* @access	public
+	*/
+	function DbModel(&$dbConnection, $modelURI, $modelID, $baseURI=NULL) {
+
+		$this->dbConn =& $dbConnection;
+		$this->modelURI = $modelURI;
+		$this->modelID = $modelID;
+		$this->baseURI = $this->_checkBaseURI($baseURI);
+	}
+
+
+	/**
+	* Set a base URI for the DbModel.
+	* Affects creating of new resources and serialization syntax.
+	*
+	* @param	string	$uri
+	* @throws  SqlError
+	* @access	public
+	*/
+	function setBaseURI($uri) {
+
+		$this->baseURI = $this->_checkBaseURI($uri);
+
+		$rs = $this->dbConn->execute("UPDATE models SET baseURI='" .$this->baseURI ."'
+                                 WHERE modelID=" .$this->modelID);
+		if (!$rs)
+		$this->dbConn->errorMsg();
+	}
+
+
+	/**
+	* Return the number of statements in this DbModel.
+	*
+	* @return	integer
+	* @access	public
+	*/
+	function size() {
+
+		$count =& $this->dbConn->getOne('SELECT COUNT(modelID) FROM statements
+                                    WHERE modelID = ' .$this->modelID);
+		return $count;
+	}
+
+
+	/**
+	* Check if this DbModel is empty.
+	*
+	* @return	boolean
+	* @access	public
+	*/
+	function isEmpty() {
+
+		if ($this->size() == 0)
+			return TRUE;
+		return FALSE;
+	}
+
+
+	/**
+	* Add a new triple to this DbModel.
+	*
+	* @param	object Statement	&$statement
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	* @return mixed   true on success, false if the statement is already in the model,
+	*                 error message (string) on failure
+	*/
+	function add(&$statement) {
+
+		if (!is_a($statement, 'Statement')) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: add): Statement expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if (!$this->contains($statement)) {
+
+			$subject_is = $this->_getNodeFlag($statement->subject());
+			$sql = "INSERT INTO statements
+			        (modelID, subject, predicate, object, l_language, l_datatype, subject_is, object_is)
+			        VALUES
+                    (" .$this->modelID .","
+			. $this->dbConn->qstr($statement->getLabelSubject()) .","
+			. $this->dbConn->qstr($statement->getLabelPredicate()) .",";
+
+			if (is_a($statement->object(), 'Literal')) {
+				$quotedLiteral = $this->dbConn->qstr($statement->obj->getLabel());
+				$sql .=        $quotedLiteral .","
+				."'" .$statement->obj->getLanguage() ."',"
+				."'" .$statement->obj->getDatatype() ."',"
+				."'" .$subject_is ."',"
+				."'l')";
+			}else{
+				$object_is = $this->_getNodeFlag($statement->object());
+				$sql .=   $this->dbConn->qstr($statement->obj->getLabel()) .","
+				."'',"
+				."'',"
+				."'" .$subject_is ."',"
+				."'" .$object_is ."')";
+			}
+			$rs =& $this->dbConn->execute($sql);
+			if (!$rs) {
+				return $this->dbConn->errorMsg();
+            } else {
+                return true;
+            }
+		} else {
+			return false;
+		}
+	}
+
+
+	/**
+	* Alias for the method add().
+	*
+	* @param	object Statement	&$statement
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function addWithoutDuplicates(&$statement) {
+
+		$this->add($statement);
+	}
+
+
+	/**
+	* Remove the given triple from this DbModel.
+	*
+	* @param	object Statement	&$statement
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function remove(&$statement) {
+
+		if (!is_a($statement, 'Statement')) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: remove): Statement expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$sql = 'DELETE FROM statements
+           WHERE modelID=' .$this->modelID;
+		$sql .= $this->_createDynSqlPart_SPO ($statement->subj, $statement->pred, $statement->obj);
+
+		$rs =& $this->dbConn->execute($sql);
+		if (!$rs)
+		$this->dbConn->errorMsg();
+	}
+
+
+	/**
+	* Short dump of the DbModel.
+	*
+	* @return	string
+	* @access	public
+	*/
+	function toString() {
+
+		return 'DbModel[modelURI=' .$this->modelURI .'; baseURI=' .$this->getBaseURI() .';  size=' .$this->size() .']';
+	}
+
+
+	/**
+	* Dump of the DbModel including all triples.
+	*
+	* @return	string
+	* @access	public
+	*/
+	function toStringIncludingTriples() {
+
+		$memModel =& $this->getMemModel();
+		return $memModel->toStringIncludingTriples();
+	}
+
+
+
+	/**
+	* Create a MemModel containing all the triples of the current DbModel.
+	*
+	* @return object MemModel
+	* @access public
+	*/
+	function & getMemModel() {
+
+		$recordSet = $this->_getRecordSet($this);
+		$m = $this->_convertRecordSetToMemModel($recordSet);
+		return $m;
+	}
+
+
+
+    /**
+    * Returns the model id
+    *
+    * @return int Model id number
+    * @access public
+    */
+    function getModelID()
+    {
+        return $this->modelID;
+    }
+
+
+
+    /**
+    * Returns the database connection object
+    *
+    * @return ADOdb Database object
+    * @access public
+    */
+    function &getDbConn()
+    {
+        return $this->dbConn;
+    }
+
+
+
+	/**
+	* Write the RDF serialization of the _DbModel as HTML.
+	*
+	* @access	public
+	*/
+	function writeAsHtml() {
+
+		$memModel =& $this->getMemModel();
+		$memModel->writeAsHtml();
+	}
+
+
+	/**
+	* Write the RDF serialization of the DbModel as HTML table.
+	*
+	* @access	public
+	*/
+	function writeAsHtmlTable() {
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+		$memModel =& $this->getMemModel();
+		$rdfUtil = new RDFUtil();
+		$rdfUtil->writeHTMLTable($memModel);
+	}
+
+
+	/**
+	* Write the RDF serialization of the DbModel to string.
+	*
+	* @return	string
+	* @access	public
+	*/
+	function writeRdfToString() {
+
+		$memModel =& $this->getMemModel();
+		return $memModel->writeRdfToString();
+	}
+
+
+	/**
+	* Saves the RDF,N3 or N-Triple serialization of the DbModel to a file.
+	* You can decide to which format the model should be serialized by using a
+	* corresponding suffix-string as $type parameter. If no $type parameter
+	* is placed this method will serialize the model to XML/RDF format.
+	* Returns FALSE if the DbModel couldn't be saved to the file.
+	*
+	* @access	public
+	* @param 	string 	$filename
+	* @param 	string 	$type
+	* @throws   PhpError
+	* @return	boolean
+	*/
+	function saveAs($filename, $type ='rdf') {
+
+		$memModel = $this->getMemModel();
+		$memModel->saveAs($filename, $type);
+
+	}
+
+
+	/**
+	* Check if the DbModel contains the given statement.
+	*
+	* @param object Statement  &$statement
+	* @return	boolean
+	* @access	public
+	*/
+	function contains(&$statement) {
+
+		$sql = 'SELECT modelID FROM statements
+           WHERE modelID = ' .$this->modelID;
+		$sql .= $this->_createDynSqlPart_SPO($statement->subj, $statement->pred, $statement->obj);
+
+		$res =& $this->dbConn->getOne($sql);
+
+		if (!$res)
+			return FALSE;
+		return TRUE;
+	}
+
+
+	/**
+	* Determine if all of the statements in the given model are also contained in this DbModel.
+	*
+	* @param	object Model	&$model
+	* @return	boolean
+	* @access	public
+	*/
+	function containsAll(&$model) {
+
+		if (is_a($model, 'MemModel')) {
+
+			foreach($model->triples as $statement)
+			if(!$this->contains($statement))
+				return FALSE;
+			return TRUE;
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+
+			$recordSet =& $this->_getRecordSet($model);
+			while (!$recordSet->EOF) {
+				if (!$this->_containsRow($recordSet->fields))
+					return FALSE;
+				$recordSet->moveNext();
+			}
+			return TRUE;
+		}
+
+		$errmsg = RDFAPI_ERROR . '(class: DbModel; method: containsAll): Model expected.';
+		trigger_error($errmsg, E_USER_ERROR);
+	}
+
+
+	/**
+	* Determine if any of the statements in the given model are also contained in this DbModel.
+	*
+	* @param	object Model	&$model
+	* @return	boolean
+	* @access	public
+	*/
+	function containsAny(&$model) {
+
+		if (is_a($model, 'MemModel')) {
+
+			foreach($model->triples as $statement)
+			if($this->contains($statement))
+				return TRUE;
+			return FALSE;
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+
+			$recordSet =& $this->_getRecordSet($model);
+			while (!$recordSet->EOF) {
+				if ($this->_containsRow($recordSet->fields))
+					return TRUE;
+				$recordSet->moveNext();
+			}
+			return FALSE;
+		}
+
+		$errmsg = RDFAPI_ERROR . '(class: DbModel; method: containsAny): Model expected.';
+		trigger_error($errmsg, E_USER_ERROR);
+	}
+
+
+	/**
+	* General method to search for triples in the DbModel.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find( NULL, NULL, $node );
+	*           Finds all triples with $node as object.
+	*
+	* @param	object Resource	$subject
+	* @param	object Resource	$predicate
+	* @param	object Node	$object
+	* @return	object MemModel
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function find($subject, $predicate, $object) {
+
+		if ((!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)) {
+
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		// static part of the sql statement
+		$sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
+           FROM statements
+           WHERE modelID = ' .$this->modelID;
+
+		// dynamic part of the sql statement
+		$sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object);
+
+		// execute the query
+		$recordSet =& $this->dbConn->execute($sql);
+
+		if (!$recordSet)
+			echo $this->dbConn->errorMsg();
+
+		// write the recordSet into memory Model
+		else
+			return $this->_convertRecordSetToMemModel($recordSet);
+	}
+
+
+	/**
+	* Method to search for triples using Perl-style regular expressions.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find_regex( NULL, NULL, $regex );
+	*           Finds all triples where the label of the object node matches
+	*the regular expression.
+	* Return an empty MemModel if nothing is found.
+	* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+	* WARNING: Mhis method loads a DbModel into memory and performs the search
+	*          on a MemModel, which can be slow with large models.
+	* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+	*
+	* @param	string	$subject_regex
+	* @param	string	$predicate_regex
+	* @param	string	$object_regex
+	* @return	object MemModel
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function findRegex($subject_regex, $predicate_regex, $object_regex) {
+
+		$mm =& $this->getMemModel();
+
+		return $mm->findRegex($subject_regex, $predicate_regex, $object_regex);
+	}
+
+
+	/**
+	* Return all tripels of a certain vocabulary.
+	* $vocabulary is the namespace of the vocabulary inluding a # : / char at the end.
+	* e.g. http://www.w3.org/2000/01/rdf-schema#
+	* Return an empty model if nothing is found.
+	*
+	* @param	string	$vocabulary
+	* @return	object MemModel
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function findVocabulary($vocabulary) {
+
+		$sql = "SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
+           FROM statements
+           WHERE modelID = " .$this->modelID ."
+           AND predicate LIKE '" .$vocabulary ."%'";
+
+		$recordSet =& $this->dbConn->execute($sql);
+
+		if (!$recordSet)
+		echo $this->dbConn->errorMsg();
+
+		// write the recordSet into memory Model
+		else
+		return $this->_convertRecordSetToMemModel($recordSet);
+	}
+
+
+	/**
+	* Search for triples and return the first matching statement.
+	* NULL input for any parameter will match anything.
+	* Return an NULL if nothing is found.
+	* You can set an search offset with $offset.
+	*
+	* @param	object Resource	$subject
+	* @param	object Resource	$predicate
+	* @param	object Node	$object
+	* @param	integer	$offset
+	* @return	object Statement
+	* @throws  PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function findFirstMatchingStatement($subject, $predicate, $object, $offset = -1) {
+
+		if ((!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)) {
+
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		// static part of the sql statement
+		$sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
+           FROM statements
+           WHERE modelID = ' .$this->modelID;
+
+		// dynamic part of the sql statement
+		$sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object);
+
+		// execute the query
+		$recordSet =& $this->dbConn->selectLimit($sql,1,($offset));
+
+		if (!$recordSet)
+		echo $this->dbConn->errorMsg();
+		else {
+			if (!$recordSet->fields)
+			return NULL;
+			else {
+				$memModel = $this->_convertRecordSetToMemModel($recordSet);
+				return $memModel->triples[0];
+			}
+		}
+	}
+
+
+	/**
+	* Search for triples and return the number of matches.
+	* NULL input for any parameter will match anything.
+	*
+	* @param	object Resource	$subject
+	* @param	object Resource	$predicate
+	* @param	object Node  	$object
+	* @return	integer
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function findCount($subject, $predicate, $object) {
+
+		if ((!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)) {
+
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameters must be subclasses of Node or NULL';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		// static part of the sql statement
+		$sql = 'SELECT COUNT(*)
+           FROM statements
+           WHERE modelID = ' .$this->modelID;
+
+		// dynamic part of the sql statement
+		$sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object);
+
+		// execute the query
+		$recordSet =& $this->dbConn->execute($sql);
+
+		if (!$recordSet)
+			echo $this->dbConn->errorMsg();
+		else
+			return $recordSet->fields[0];
+	}
+
+
+	/**
+	* Perform an RDQL query on this DbModel.
+	* This method returns an associative array of variable bindings.
+	* The values of the query variables can either be RAP's objects (instances of Node)
+	* if $returnNodes set to TRUE, or their string serialization.
+	*
+	* @access	public
+	* @param string $queryString
+	* @param boolean $returnNodes
+	* @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
+	*      OR  array   [][?VARNAME] = string
+	*
+	*/
+	function rdqlQuery($queryString, $returnNodes = TRUE) {
+		require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
+		$parser = new RdqlParser();
+		$parsedQuery =& $parser->parseQuery($queryString);
+
+		// this method can only query this DbModel
+		// if another model was specified in the from clause throw an error
+		if (isset($parsedQuery['sources'][0]))
+		if($parsedQuery['sources'][0] != $this->modelURI) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: rdqlQuery):';
+			$errmsg .= ' this method can only query this DbModel';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$engine = new RdqlDbEngine();
+		$res =& $engine->queryModel($this, $parsedQuery, $returnNodes);
+
+		return $res;
+	}
+
+
+	/**
+	* Perform an RDQL query on this DBModel.
+	* This method returns an RdqlResultIterator of variable bindings.
+	* The values of the query variables can either be RAP's objects (instances of Node)
+	* if $returnNodes set to TRUE, or their string serialization.
+	*
+	* @access	public
+	* @param string $queryString
+	* @param boolean $returnNodes
+	* @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
+	*      OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
+	*
+	*/
+	function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) {
+		require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
+		return new RdqlResultIterator($this->rdqlQuery($queryString, $returnNodes));
+	}
+
+	/**
+	* General method to replace nodes of a DbModel.
+	* NULL input for any parameter will match nothing.
+	* Example:  $m->replace($resource, NULL, $node, $replacement);
+	*           Replaces all $node objects beeing subject or object in
+	*           any triple of the model with the $replacement node.
+	* Throw an error in case of a paramter mismatch.
+	*
+	* @param	object Resource	$subject
+	* @param	object Resource	$predicate
+	* @param	object Node	$object
+	* @param	object Node	$replacement
+	* @throws	PhpError
+	* @throws  SqlError
+	* @access	public
+	*/
+	function replace($subject, $predicate, $object, $replacement) {
+
+		// check the correctness of the passed parameters
+		if ( ((!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)) ||
+		(($subject != NULL && is_a($replacement, 'Literal')) ||
+		($predicate != NULL && (is_a($replacement, 'Literal') ||
+		is_a($replacement, 'BlankNode')))) )
+		{
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: find): Parameter mismatch';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if (!(!$subject && !$predicate && !$object)) {
+
+			// create an update sql statement
+			$comma = '';
+			$sql = 'UPDATE statements
+             SET ';
+			if ($subject) {
+				$sql .= " subject ='" .$replacement->getLabel() ."', "
+				." subject_is='" .$this->_getNodeFlag($replacement) ."' ";
+				$comma = ',';
+			}
+			if ($predicate) {
+				$sql .= $comma ." predicate='" .$replacement->getLabel() ."' ";
+				$comma = ',';
+			}
+			if ($object) {
+				$quotedObject = $this->dbConn->qstr($replacement->getLabel());
+				$sql .= $comma .' object=' .$quotedObject
+				.", object_is='" .$this->_getNodeFlag($replacement) ."' ";
+				if (is_a($replacement, 'Literal')) {
+					$sql .= ", l_language='" .$replacement->getLanguage() ."' "
+					.", l_datatype='" .$replacement->getDataType() ."' ";
+				}
+			}
+			$sql .= 'WHERE modelID = ' .$this->modelID;
+			$sql .= $this->_createDynSqlPart_SPO($subject, $predicate, $object);
+
+			// execute the query
+			$rs =& $this->dbConn->execute($sql);
+
+			if (!$rs)
+			echo $this->dbConn->errorMsg();
+		}
+	}
+
+
+	/**
+	* Check if two models are equal.
+	* Two models are equal if and only if the two RDF graphs they represent are isomorphic.
+	*
+	* Warning: This method doesn't work correct with models where the same blank node has different
+	* identifiers in the two models. We will correct this in a future version.
+	*
+	* @param	object	model &$that
+	* @return	boolean
+	* @throws  PhpError
+	* @access	public
+	*/
+
+	function equals(&$that)  {
+
+		if (!is_a($that, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: equals): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if ($this->size() != $that->size())
+		return FALSE;
+
+		include_once(RDFAPI_INCLUDE_DIR. "util/ModelComparator.php");
+		return ModelComparator::compare($this,$that);
+	}
+
+
+	/**
+	* Return a new MemModel that is the set-union the model with another model.
+	*
+	* The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
+	* is another graph, which we will call the merge of the graphs.
+	* Each of the original graphs is a subgraph of the merged graph. Notice that when forming
+	* a merged graph, two occurrences of a given uriref or literal as nodes in two different
+	* graphs become a single node in the union graph (since by definition they are the same
+	* uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
+	* never merged. In particular, this means that every blank node in a merged graph can be
+	* identified as coming from one particular graph in the original set of graphs.
+	*
+	* Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
+	* their corresponding N-triples documents and constructing the graph described by the merged
+	* document, since if some of the documents use the same node identifiers, the merged document
+	* will describe a graph in which some of the blank nodes have been 'accidentally' merged.
+	* To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
+	* more documents, and to replace it with a distinct nodeID in each of them, before merging the
+	* documents. (Not implemented yet !!!!!!!!!!!)
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @throws PhpError
+	* @access	public
+	*
+	*/
+	function & unite(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: unite): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if (is_a($model, 'MemModel')) {
+
+			$thisModel =& $this->getMemModel();
+			return $thisModel->unite($model);
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+
+			$thisModel =& $this->getMemModel();
+			$thatModel =& $model->getMemModel();
+			return $thisModel->unite($thatModel);
+		}
+	}
+
+
+	/**
+	* Return a new MemModel that is the subtraction of another model from this DbModel.
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @throws PhpError
+	* @access	public
+	*/
+
+	function & subtract(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: subtract): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if (is_a($model, 'MemModel')) {
+
+			$thisModel =& $this->getMemModel();
+			return $thisModel->subtract($model);
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+
+			$thisModel =& $this->getMemModel();
+			$thatModel =& $model->getMemModel();
+			return $thisModel->subtract($thatModel);
+		}
+	}
+
+
+	/**
+	* Return a new MemModel containing all the statements which are in both
+	* this model and the given model.
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @throws  PhpError
+	* @access	public
+	*/
+	function & intersect(&$model)  {
+
+		if (is_a($model, 'MemModel')) {
+
+			$thisModel =& $this->getMemModel();
+			return $thisModel->intersect($model);
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+
+			$thisModel =& $this->getMemModel();
+			$thatModel =& $model->getMemModel();
+			return $thisModel->intersect($thatModel);
+		}
+
+		$errmsg = RDFAPI_ERROR . '(class: DbModel; method: intersect: Model expected.';
+		trigger_error($errmsg, E_USER_ERROR);
+	}
+
+
+	/**
+	* Add the given model to this DbModel.
+	* This function monitors for SQL errors, and will commit if no errors have occured,
+	* otherwise it will rollback.
+	* If any statement of the model to be added to this model contains a blankNode
+	* with an identifier already existing in this model, a new blankNode is generated.
+	*
+	* @param	object Model	$model
+	* @throws  PhpError
+	* @access	public
+	*/
+	function addModel(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: DbModel; method: addModel): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$blankNodes_tmp = array();
+
+		if (is_a($model, 'MemModel')) {
+
+			$this->dbConn->startTrans();
+			foreach ($model->triples as $statement)
+			$this->_addStatementFromAnotherModel($statement, $blankNodes_tmp);
+			$this->addParsedNamespaces($model->getParsedNamespaces());
+
+			$this->dbConn->completeTrans();
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+
+			$this->dbConn->startTrans();
+			$memModel =& $model->getMemModel();
+			foreach($memModel->triples as $statement)
+				$this->_addStatementFromAnotherModel($statement, $blankNodes_tmp);
+			$this->addParsedNamespaces($model->getParsedNamespaces());
+			$this->dbConn->completeTrans();
+		}
+	}
+
+
+	/**
+	* Reify the DbModel.
+	* Return a new MemModel that contains the reifications of all statements of this DbModel.
+	*
+	* @return	object	MemModel
+	* @access	public
+	*/
+	function & reify() {
+
+		$memModel =& $this->getMemModel();
+		return $memModel->reify();
+	}
+
+	/**
+	* Remove this DbModel from database and clean up.
+	* This function monitors for SQL errors, and will commit if no errors have occured,
+	* otherwise it will rollback.
+	*
+	* @throws  SqlError
+	* @access	public
+	*/
+	function delete() {
+
+		$this->dbConn->startTrans();
+		$this->dbConn->execute('DELETE FROM models
+                                  WHERE modelID=' .$this->modelID);
+		$this->dbConn->execute('DELETE FROM statements
+                                  WHERE modelID=' .$this->modelID);
+		$this->dbConn->execute('DELETE FROM namespaces
+                                  WHERE modelID=' .$this->modelID);
+
+		if (!$this->dbConn->completeTrans())
+			echo $this->dbConn->errorMsg();
+		else
+			$this->close();
+	}
+
+
+	/**
+	* Close this DbModel
+	*
+	* @access	public
+	*/
+	function close() {
+
+		unset($this);
+	}
+
+
+	// =============================================================================
+	// **************************** private methods ********************************
+	// =============================================================================
+
+
+
+
+
+	/**
+	* If the URI doesn't end with # : or /, then a # is added to the URI.
+	* Used at setting the baseURI of this DbModel.
+	*
+	* @param   string  $uri
+	* @return  string
+	* @access	private
+	*/
+	function _checkBaseURI($uri)  {
+
+		if ($uri != NULL) {
+			$c = substr($uri, strlen($uri)-1 ,1);
+			if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
+			$uri .= '#';
+		}
+		return $uri;
+	}
+
+
+	/**'
+	* Return the flag of the Node object.
+	* r - Resource, b - BlankNode, l - Literal
+	*
+	* @param   object Node $object
+	* @return  string
+	* @access	private
+	*/
+	function _getNodeFlag($object)  {
+
+		return is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l');
+	}
+
+
+	/**
+	* Convert an ADORecordSet to a memory Model.
+	*
+	* Every successful database query returns an ADORecordSet object which is actually
+	* a cursor that holds the current row in the array fields[].
+	* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+	* !!! This method can only be applied to a RecordSet with array fields[]
+	* !!! containing a representation of the database table: statements,
+	* !!! with an index corresponding to following table columns:
+	* !!! [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
+	* !!! [4] - l_datatype, [5] - subject_is, [6] - object_is
+	* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+	*
+	* @param   object  ADORecordSet
+	* @return  object  MemModel
+	* @access	private
+	*/
+	function _convertRecordSetToMemModel(&$recordSet)  {
+
+		$res = new MemModel($this->baseURI);
+		while (!$recordSet->EOF) {
+
+			// subject
+			if ($recordSet->fields[5] == 'r')
+				$sub = new Resource($recordSet->fields[0]);
+			else
+				$sub = new BlankNode($recordSet->fields[0]);
+
+			// predicate
+			$pred = new Resource($recordSet->fields[1]);
+
+			// object
+			if ($recordSet->fields[6] == 'r')
+				$obj = new Resource($recordSet->fields[2]);
+			elseif ($recordSet->fields[6] == 'b')
+				$obj = new BlankNode($recordSet->fields[2]);
+			else {
+				$obj = new Literal($recordSet->fields[2], $recordSet->fields[3]);
+				if ($recordSet->fields[4])
+				$obj->setDatatype($recordSet->fields[4]);
+			}
+
+			$statement = new Statement($sub, $pred, $obj);
+			$res->add($statement);
+
+			$recordSet->moveNext();
+		}
+		$res->addParsedNamespaces($this->getParsedNamespaces());
+		return $res;
+	}
+
+
+	/**
+	* Create the dynamic part of an sql statement selecting triples with the
+	* given parameters ($subject, $predicate, $object).
+	*
+	* @param	object Resource	$subject
+	* @param	object Resource	$predicate
+	* @param	object Node	$object
+	* @return  string
+	* @access	private
+	*/
+	function _createDynSqlPart_SPO($subject, $predicate, $object) {
+
+		// conditions derived from the parameters passed to the function
+
+		$subject_is=is_a($subject,'BlankNode')?'b':(is_a($subject,'Resource')?'r':'l');
+		$sql='';
+		if ($subject != NULL)
+			$sql .= " AND subject='" .$subject->getLabel() ."'
+                AND subject_is='" .$subject_is ."'";
+		if ($predicate != NULL)
+			$sql .= " AND predicate='" .$predicate->getLabel() ."'";
+		if ($object != NULL) {
+			$object_is = is_a($object,'BlankNode')?'b':(is_a($object,'Resource')?'r':'l');
+			if (is_a($object, 'Resource'))
+				$sql .= " AND object='" .$object->getLabel() ."'
+                   AND object_is ='" .$object_is ."'";
+			else  {
+				$quotedLiteral = $this->dbConn->qstr($object->getLabel());
+				$sql .= " AND object=" .$quotedLiteral ."
+                   AND l_language='" .$object->getLanguage() ."'
+                   AND l_datatype='" .$object->getDataType() ."'
+                   AND object_is ='" .$object_is ."'";
+			}
+		}
+		return $sql;
+	}
+
+
+	/**
+	* Get an ADORecordSet with array fields[] containing a representation of
+	* the given DbModel stored in the table: statements, with an index corresponding
+	* to following table columns:
+	* [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
+	* [4] - l_datatype, [5] - subject_is, [6] - object_is
+	* (This method operates on data from a DbModel without loading it into a memory model
+	*  in order to save resources and improve speed).
+	*
+	* @param	object DbModel	$DbModel
+	* @return  object ADORecordSet
+	* @access	private
+	*/
+	function _getRecordSet (&$dbModel) {
+
+		$sql = 'SELECT subject, predicate, object, l_language, l_datatype, subject_is, object_is
+           FROM statements
+           WHERE modelID = ' .$dbModel->modelID;
+
+		return $recordSet =& $this->dbConn->execute($sql);
+	}
+
+
+	/**
+	* Check if this DbModel contains the given row from the array fields[] of an ADORecordSet
+	* The array index corresponds to following table columns:
+	* [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
+	* [4] - l_datatype, [5] - subject_is, [6] - object_is
+	*
+	* @param   array  $row
+	* @return  boolean
+	* @access	private
+	*/
+	function _containsRow ($row) {
+
+		$sql = "SELECT modelID FROM statements
+           WHERE modelID = " .$this->modelID ."
+           AND subject ="   .$this->dbConn->qstr($row[0]) ."
+           AND predicate =" .$this->dbConn->qstr($row[1]) ."
+           AND object ="    .$this->dbConn->qstr($row[2]) ."
+           AND l_language=" .$this->dbConn->qstr($row[3]) ."
+           AND l_datatype=" .$this->dbConn->qstr($row[4]) ."
+           AND subject_is=" .$this->dbConn->qstr($row[5]) ."
+           AND object_is="  .$this->dbConn->qstr($row[6]);
+
+		$res =& $this->dbConn->getOne($sql);
+
+		if (!$res)
+		  return FALSE;
+		return TRUE;
+	}
+
+
+
+
+
+	/**
+	* Returns the models namespaces.
+	*
+	* @author   Tobias Gauss <tobias.gauss@web.de>
+	* @return mixed Array of key-value pairs. Namespace is the key,
+	*               prefix the value. If no namespaces are found,
+	*               boolean false is returned.
+	*
+	* @access   public
+	*/
+	function getParsedNamespaces(){
+		$sql = "SELECT * FROM namespaces
+           WHERE modelID = " .$this->modelID;
+		$temp = false;
+		$res  = $this->dbConn->execute($sql);
+		if($res){
+			while (!$res->EOF) {
+				$temp[$res->fields[1]]=$res->fields[2];
+				$res->moveNext();
+			}
+		}
+		return $temp;
+	}
+
+
+
+	/**
+	* Adds the namespaces to the model. This method is called by
+	* the parser. !!!! addParsedNamespaces() not overwrites manual
+	* added namespaces in the model !!!!
+	*
+	* @author Tobias Gauss <tobias.gauss@web.de>
+	* @param array $newNs Array of namespace => prefix assignments
+	*
+	* @access   public
+	*/
+	function addParsedNamespaces($newNs){
+		if($newNs)
+		foreach($newNs as $namespace => $prefix){
+			$this->addNamespace($prefix, $namespace);
+		}
+	}
+
+
+	/**
+	* Adds a namespace and prefix to the model.
+	*
+	* @author   Tobias Gauss <tobias.gauss@web.de>
+	* @param string $prefix Prefix
+	* @param string $nmsp   Namespace URI
+    *
+	* @access   public
+	*/
+	function addNamespace($prefix,$nmsp){
+
+		if($nmsp != '' && $prefix !=''){
+			if($this->_checkNamespace($nmsp)){
+				$sql = "UPDATE namespaces SET prefix=".$this->dbConn->qstr($prefix)." WHERE
+				modelID=".$this->modelID." AND namespace=".$this->dbConn->qstr($nmsp);
+			}else{
+				$sql = "INSERT INTO namespaces
+                    (modelID, namespace, prefix)
+                    VALUES
+                    (" .$this->modelID .','
+				. $this->dbConn->qstr($nmsp)   . ','
+				. $this->dbConn->qstr($prefix) . ')';
+			}
+
+			$rs =& $this->dbConn->execute($sql);
+			if (!$rs)
+			$this->dbConn->errorMsg();
+		}
+	}
+
+	/**
+	* checks if a namespace is already in the model.
+	*
+	* @author   Tobias Gauï¿œ<tobias.gauss@web.de>
+	* @access   private
+	* @param    Array $newNs
+	*/
+	function _checkNamespace($nmsp){
+		$res = true;
+		$sql = "SELECT * FROM namespaces
+          	 WHERE modelID = " .$this->modelID." AND
+			namespace=" . $this->dbConn->qstr($nmsp);
+		$rs =& $this->dbConn->execute($sql);
+		if (!$rs){
+			$this->dbConn->errorMsg();
+		}else{
+			if($rs->fields == false)
+			$res = false;
+		}
+		return $res;
+
+
+	}
+
+	/**
+	* Returns a FindIterator for traversing the MemModel.
+	* @access	public
+	* @return	object	FindIterator
+	*/
+	function & iterFind($sub=null,$pred=null,$obj=null) {
+		// Import Package Utility
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+
+		$if = new IterFind($this,$sub,$pred,$obj);
+		return $if;
+	}
+
+	/**
+	* Removes a single namespace from the model
+	*
+	* @author Tobias Gauss <tobias.gauss@web.de>
+	* @param string $nmsp Namespace URI
+	*
+	* @return mixed True if all went well, error message otherwise
+	*
+	* @access   public
+	*/
+	function removeNamespace($nmsp){
+
+        $sql = 'DELETE FROM namespaces
+           WHERE modelID=' .$this->modelID." AND namespace=". $this->dbConn->qstr($nmsp);
+
+        $rs =& $this->dbConn->execute($sql);
+        if (!$rs)
+            return $this->dbConn->errorMsg();
+        else {
+            return true;
+        }
+	}
+
+
+
+
+	/**
+	* Add the given row from the array fields[] of an ADORecordSet to this DbModel
+	* The array index corresponds to following table columns:
+	* [0] - subject, [1] - predicate, [2] - object, [3] - l_language,
+	* [4] - l_datatype, [5] - subject_is, [6] - object_is
+	*
+	* @param   array  $row
+	* @throws  SqlError
+	* @access	private
+	*
+	function _insertRow ($row) {
+
+	$quotedObject = $this->dbConn->qstr($row[2]);
+	$sql = "INSERT INTO statements VALUES
+	(" .$this->modelID .","
+	."'" .$row[0] ."',"
+	."'" .$row[1] ."',"
+	.""  .$quotedObject .","
+	."'" .$row[3] ."',"
+	."'" .$row[4] ."',"
+	."'" .$row[5] ."',"
+	."'" .$row[6] ."')";
+
+	$rs =& $this->dbConn->execute($sql);
+	if (!$rs)
+	$this->dbConn->errorMsg();
+	}
+	*/
+
+} // end: Class DbModel
+?>
Index: Dev/branches/Demo/rdfapi/model/DbStore.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/DbStore.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/DbStore.php	(revision 225)
@@ -0,0 +1,917 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'constants.php';
+require_once RDFAPI_INCLUDE_DIR . 'util/Object.php';
+
+// ----------------------------------------------------------------------------------
+// Class: DbStore
+// ----------------------------------------------------------------------------------
+
+/**
+ * DbStore is a persistent store of RDF data using relational database technology.
+ * DbStore uses ADOdb Library for PHP V3.60 (http://php.weblogs.com/ADODB),
+ * which allows to connect to multiple databases in a portable manner.
+ * This class also provides methods for creating tables for MsAccess, MySQL, and MS SQL Server.
+ * If you want to use other databases, you will have to create tables by yourself
+ * according to the abstract database schema described in the API documentation.
+ *
+ * You can activate debug mode by defining ADODB_DEBUG_MODE to "1".
+ *
+ *
+ * @version  $Id: DbStore.php 560 2008-02-29 15:24:20Z cax $
+ * @author   Radoslaw Oldakowski <radol@gmx.de>
+ * @author   Daniel Westphal (http://www.d-westphal.de)
+ *
+ * @package model
+ * @access	public
+ */
+
+
+class DbStore extends Object
+{
+    /**
+    * Array with all supported database types
+    *
+    * @var array
+    */
+    public static $arSupportedDbTypes = array(
+        "MySQL",
+        "MySQLi",
+        "MSSQL",
+        'MsAccess'
+    );
+
+    /**
+    * Database connection object
+    *
+    * @var     object ADOConnection
+    * @access	private
+    */
+    var $dbConn;
+
+    /**
+    * Database driver name
+    *
+    * @var string
+    */
+    protected $driver = null;
+
+    /**
+    *   SparqlParser so we can re-use it
+    *   @var Parser
+    */
+    var $queryParser = null;
+
+
+/**
+ * Constructor:
+ * Set the database connection with the given parameters.
+ *
+ * @param   string   $dbDriver
+ * @param   string   $host
+ * @param   string   $dbName
+ * @param   string   $user
+ * @param   string   $password
+ * @access	public
+ */
+ function DbStore ($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME,
+                   $user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD) {
+
+   // include DBase Package
+   require_once(RDFAPI_INCLUDE_DIR.PACKAGE_DBASE);
+
+   // create a new connection object
+   $this->dbConn =& ADONewConnection($dbDriver);
+   $this->driver = $dbDriver;
+
+   //activate the ADOdb DEBUG mode
+   if (ADODB_DEBUG_MODE == '1')
+        $this->dbConn->debug = true;
+
+   // connect to database
+   $r = $this->dbConn->NConnect($host, $user, $password, $dbName);
+   if ($r !== true) {
+      throw new Exception('Could not connect to database');
+   }
+
+   // optimized for speed
+   $this->dbConn->setFetchMode(ADODB_FETCH_NUM);
+   //$ADODB_COUNTRECS = FALSE;
+ }
+
+
+
+/**
+ * List all DbModels stored in the database.
+ *
+ * @return  array
+ * @throws	SqlError
+ * @access	public
+ */
+ function listModels() {
+
+   $recordSet =& $this->dbConn->execute("SELECT modelURI, baseURI
+                                         FROM models");
+   if (!$recordSet)
+      echo $this->dbConn->errorMsg();
+   else {
+      $models = array();
+      $i=0;
+      while (!$recordSet->EOF) {
+
+          $models[$i]['modelURI'] = $recordSet->fields[0];
+          $models[$i]['baseURI'] = $recordSet->fields[1];
+
+          ++$i;
+          $recordSet->moveNext();
+      }
+      return $models;
+   }
+ }
+
+
+/**
+ * Check if the DbModel with the given modelURI is already stored in the database
+ *
+ * @param   string   $modelURI
+ * @return  boolean
+ * @throws	SqlError
+ * @access	public
+ */
+ function modelExists($modelURI) {
+
+   $res =& $this->dbConn->execute("SELECT COUNT(*) FROM models
+                                   WHERE modelURI = '" .$modelURI ."'");
+   if (!$res)
+      echo $this->dbConn->errorMsg();
+   else {
+      if (!$res->fields[0]) {
+          $res->Close();
+         return FALSE;
+      } else {
+          $res->Close();
+          return TRUE;
+      }
+   }
+ }
+
+
+
+    /**
+    * Returns the database connection object
+    *
+    * @return ADOdb Database object
+    * @access public
+    */
+    function &getDbConn()
+    {
+        return $this->dbConn;
+    }
+
+
+/**
+ * Create a new instance of DbModel with the given $modelURI and
+ * load the corresponding values of modelID and baseURI from the database.
+ * Return FALSE if the DbModel does not exist.
+ *
+ * @param   string   $modelURI
+ * @return  object DbModel
+ * @access	public
+ */
+ function getModel($modelURI) {
+
+   if (!$this->modelExists($modelURI))
+      return FALSE;
+   else {
+      $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI
+                                            FROM models
+                                            WHERE modelURI='" .$modelURI ."'");
+
+      return new DbModel($this->dbConn, $modelVars->fields[0],
+                         $modelVars->fields[1], $modelVars->fields[2]);
+   }
+ }
+
+
+/**
+ * Create a new instance of DbModel with the given $modelURI
+ * and insert the DbModel variables into the database.
+ * Return FALSE if there is already a model with the given URI.
+ *
+ * @param   string   $modelURI
+ * @param   string   $baseURI
+ * @return  object DbModel
+ * @throws  SqlError
+ * @access	public
+ */
+ function getNewModel($modelURI, $baseURI=NULL) {
+
+   if ($this->modelExists($modelURI))
+      return FALSE;
+   else {
+      $modelID = $this->_createUniqueModelID();
+
+      $rs =& $this->dbConn->execute("INSERT INTO models
+                                            (modelID, modelURI, baseURI)
+                                            VALUES (" .$modelID .",
+                                                    " .$this->dbConn->qstr($modelURI) .",
+                                                    " .$this->dbConn->qstr($baseURI) .")");
+
+      if (!$rs)
+         return $this->dbConn->errorMsg();
+      else
+         return new DbModel($this->dbConn, $modelURI, $modelID, $baseURI);
+   }
+ }
+
+
+/**
+ * Store a MemModel or another DbModel from a different DbStore in the database.
+ * Return FALSE if there is already a model with modelURI matching the modelURI
+ * of the given model.
+ *
+ * @param   object Model  &$model
+ * @param   string $modelURI
+ * @return  boolean
+ * @access	public
+ */
+ function putModel(&$model, $modelURI=NULL) {
+
+   if (!$modelURI) {
+      if (is_a($model, 'MemModel'))
+         $modelURI = 'DbModel-' .$this->_createUniqueModelID();
+      else
+         $modelURI = $model->modelURI;
+   }else
+      if ($this->modelExists($modelURI))
+         return FALSE;
+
+
+   $newDbModel = $this->getNewModel($modelURI, $model->getBaseURI());
+   $newDbModel->addModel($model);
+ }
+
+
+/**
+ * Close the DbStore.
+ * !!! Warning: If you close the DbStore all active instances of DbModel from this
+ * !!!          DbStore will lose their database connection !!!
+ *
+ * @access	public
+ */
+ function close() {
+
+   $this->dbConn->close();
+   unset($this);
+ }
+
+
+// =============================================================================
+// **************************** private methods ********************************
+// =============================================================================
+
+
+/**
+ * Create a unique ID for the DbModel to be insert into the models table.
+ * This method was implemented because some databases do not support auto-increment.
+ *
+ * @return  integer
+ * @access	private
+ */
+ function _createUniqueModelID() {
+
+   $maxModelID =& $this->dbConn->GetOne('SELECT MAX(modelID) FROM models');
+   return ++$maxModelID;
+ }
+
+ /**
+ * Create a unique ID for the dataset to be insert into the datasets table.
+ * This method was implemented because some databases do not support auto-increment.
+ *
+ * @return  integer
+ * @access	private
+ */
+ function _createUniqueDatasetID() {
+
+   $maxDatasetID =& $this->dbConn->GetOne('SELECT MAX(datasetId) FROM datasets');
+   return ++$maxDatasetID;
+ }
+
+
+
+    /**
+     * Sets up tables for RAP.
+     * DOES NOT CHECK IF TABLES ALREADY EXIST
+     *
+     * @param string  $databaseType Database driver name (e.g. MySQL)
+     *
+     * @throws Exception If database type is unsupported
+     * @access public
+     **/
+    public function createTables($databaseType = null)
+    {
+        $driver = $this->getDriver($databaseType);
+        self::assertDriverSupported($driver);
+
+        $createFunc = '_createTables_' . $driver;
+        return $this->$createFunc();
+    }//public function createTables($databaseType="MySQL")
+
+
+
+    /**
+    * Create tables and indexes for MsAccess database
+    *
+    * @return boolean true If all is ok
+    *
+    * @throws Exception
+    */
+    protected function _createTables_MsAccess()
+    {
+        $this->dbConn->startTrans();
+
+        $this->dbConn->execute('CREATE TABLE models
+                                (modelID long primary key,
+                                    modelURI varchar not null,
+                                    baseURI varchar)');
+
+        $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
+
+        $this->dbConn->execute('CREATE TABLE statements
+                                (modelID long,
+                                    subject varchar,
+                                    predicate varchar,
+                                    object Memo,
+                                    l_language varchar,
+                                    l_datatype varchar,
+                                    subject_is varchar(1),
+                                    object_is varchar(1),
+                                    primary key (modelID, subject, predicate, object,
+                                    l_language, l_datatype))');
+
+        $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
+        $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject)');
+        $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate)');
+        $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object)');
+
+        $this->dbConn->execute('CREATE TABLE namespaces
+                            (modelID long,
+                                namespace varchar,
+                                prefix varchar,
+                                primary key (modelID, namespace, prefix))');
+
+        $this->dbConn->execute('CREATE INDEX n_name_idx ON namespaces (namespace)');
+        $this->dbConn->execute('CREATE INDEX n_pref_idx ON namespaces (prefix)');
+
+        $this->dbConn->execute("CREATE TABLE datasets
+                            (datasetName varchar,
+                                defaultModelUri varchar,
+                                primary key (datasetName))");
+
+        $this->dbConn->execute('CREATE INDEX nGS_idx1 ON datasets (datasetName)');
+
+
+        $this->dbConn->execute("CREATE TABLE `dataset_model` (
+                                    datasetName varchar,
+                                    modelId long,
+                                    graphURI varchar,
+                                    PRIMARY KEY  (modelId,datasetName))");
+
+
+        if (!$this->dbConn->completeTrans()) {
+            throw new Exception($this->dbConn->errorMsg());
+        }
+        return true;
+    }
+
+
+
+    /**
+    * Create tables and indexes for MySQL database
+    *
+    * @return boolean true If all is ok
+    *
+    * @throws Exception
+    */
+    function _createTables_MySQL()
+    {
+
+        $this->dbConn->startTrans();
+
+        $this->dbConn->execute("CREATE TABLE models
+                                (modelID bigint NOT NULL,
+                                    modelURI varchar(255) NOT NULL,
+                                    baseURI varchar(255) DEFAULT '',
+                                    primary key (modelID))");
+
+        $this->dbConn->execute('CREATE UNIQUE INDEX m_modURI_idx ON models (modelURI)');
+
+        $this->dbConn->execute("CREATE TABLE statements
+                                (modelID bigint NOT NULL,
+                                    subject varchar(255) NOT NULL,
+                                    predicate varchar(255) NOT NULL,
+                                    object text,
+                                    l_language varchar(255) DEFAULT '',
+                                    l_datatype varchar(255) DEFAULT '',
+                                    subject_is varchar(1) NOT NULL,
+                                    object_is varchar(1) NOT NULL)");
+
+        $this->dbConn->execute("CREATE TABLE namespaces
+                                (modelID bigint NOT NULL,
+                                    namespace varchar(255) NOT NULL,
+                                    prefix varchar(255) NOT NULL,
+                                    primary key (modelID,namespace))");
+
+        $this->dbConn->execute("CREATE TABLE `dataset_model` (
+                                    `datasetName` varchar(255) NOT NULL default '0',
+                                    `modelId` bigint(20) NOT NULL default '0',
+                                    `graphURI` varchar(255) NOT NULL default '',
+                                    PRIMARY KEY  (`modelId`,`datasetName`))");
+
+        $this->dbConn->execute("CREATE TABLE `datasets` (
+                                    `datasetName` varchar(255) NOT NULL default '',
+                                    `defaultModelUri` varchar(255) NOT NULL default '0',
+                                    PRIMARY KEY  (`datasetName`),
+                                    KEY `datasetName` (`datasetName`))");
+
+        $this->dbConn->execute('CREATE INDEX s_mod_idx ON statements (modelID)');
+        $this->dbConn->execute('CREATE INDEX n_mod_idx ON namespaces (modelID)');
+
+        $this->dbConn->execute('CREATE INDEX s_sub_pred_idx ON statements
+                                (subject(200),predicate(200))');
+
+        $this->dbConn->execute('CREATE INDEX s_sub_idx ON statements (subject(200))');
+        $this->dbConn->execute('CREATE INDEX s_pred_idx ON statements (predicate(200))');
+        $this->dbConn->execute('CREATE INDEX s_obj_idx ON statements (object(250))');
+
+        $this->dbConn->execute('CREATE FULLTEXT INDEX s_obj_ftidx ON statements (object)');
+
+        if (!$this->dbConn->completeTrans()) {
+            throw new Exception($this->dbConn->errorMsg());
+        }
+        return true;
+    }
+
+
+
+    /**
+    * Creates tables on a MySQLi database
+    */
+    function _createTables_MySQLi()
+    {
+        return $this->_createTables_MySQL();
+    }//function _createTables_MySQLi()
+
+
+
+    /**
+    * Create tables and indexes for MSSQL database
+    *
+    * @return boolean true If all is ok
+    *
+    * @throws Exception
+    */
+    function _createTables_MSSQL()
+    {
+        $this->dbConn->startTrans();
+
+        $this->dbConn->execute("CREATE TABLE [dbo].[models] (
+                                    [modelID] [int] NOT NULL ,
+                                    [modelURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [baseURI] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
+                                    ) ON [PRIMARY]");
+
+        $this->dbConn->execute("CREATE TABLE [dbo].[statements] (
+                                    [modelID] [int] NOT NULL ,
+                                    [subject] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [predicate] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [object] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [l_language] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [l_datatype] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [subject_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    [object_is] [nchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
+                                    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]");
+
+
+        $this->dbConn->execute("CREATE TABLE [dbo].[namespaces] (
+                                    [modelID] [int] NOT NULL ,
+                                    [namespace] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+                                    [prefix] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+                                    ) ON [PRIMARY]");
+
+        $this->dbConn->execute("ALTER TABLE [dbo].[models] WITH NOCHECK ADD
+                                    CONSTRAINT [PK_models] PRIMARY KEY  CLUSTERED
+                                    (
+                                        [modelID]
+                                    )  ON [PRIMARY] ");
+        $this->dbConn->execute("ALTER TABLE [dbo].[namespaces] WITH NOCHECK ADD
+                                    CONSTRAINT [PK_namespaces] PRIMARY KEY  CLUSTERED
+                                    (
+                                        [modelID],[namespace]
+                                    )  ON [PRIMARY] ");
+
+        $this->dbConn->execute("CREATE  INDEX [joint index on subject and predicate] ON [dbo].[statements]([subject], [predicate]) ON [PRIMARY]");
+
+
+        if (!$this->dbConn->completeTrans()) {
+            throw new Exception($this->dbConn->errorMsg());
+        }
+        return true;
+    }
+
+
+
+    /**
+     * Checks if tables are setup for RAP
+     *
+     * @param   string  $databaseType
+     * @throws Exception If database type is unsupported
+     * @access public
+     **/
+    public function isSetup($databaseType = null)
+    {
+        $driver = $this->getDriver($databaseType);
+        self::assertDriverSupported($driver);
+
+        $issetupFunc = '_isSetup_' . $driver;
+        return $this->$issetupFunc();
+    }//public function isSetup($databaseType="MySQL")
+
+
+
+    /**
+    * Returns the driver for the database type.
+    * You can pass NULL or omit the parameter to
+    *  use the parameter from the dbstore constructor
+    *
+    * @param string $databaseType Database driver name (e.g. MySQL)
+    *
+    * @return string Database driver string (e.g. MySQL)
+    */
+    public function getDriver($databaseType = null)
+    {
+        if ($databaseType === null) {
+            if ($this->driver === null) {
+                //backward compatibility
+                $databaseType = 'MySQL';
+            } else {
+                $databaseType = $this->driver;
+            }
+        }
+        if (!self::isDriverSupported($databaseType)) {
+            //check if it is a known driver in wrong case
+            $arLowercases = array_map('strtolower', self::$arSupportedDbTypes);
+            $arMapping    = array_combine($arLowercases, self::$arSupportedDbTypes);
+            if (isset($arMapping[strtolower($databaseType)])) {
+                $databaseType = $arMapping[strtolower($databaseType)];
+            }
+        }
+        return $databaseType;
+    }//public function getDriver($databaseType = null)
+
+
+
+    /**
+    * Returns if the given driver is supported
+    *
+    * @return boolean True if it supported, false if not
+    */
+    public static function isDriverSupported($databaseType)
+    {
+        return in_array($databaseType, self::$arSupportedDbTypes);
+    }//public static function isDriverSupported($databaseType)
+
+
+
+    /**
+    * Checks if the given driver is supported and throws an
+    * Exception if not.
+    *
+    * @param string $databaseType Database driver name (e.g. MySQL)
+    *
+    * @return true If it does not fail
+    *
+    * @throws Exception If the driver is not supported
+    */
+    public static function assertDriverSupported($databaseType)
+    {
+        if (!self::isDriverSupported($databaseType)) {
+            throw new Exception(
+                'Unsupported database type, only supported: '
+                . implode(', ', self::$arSupportedDbTypes)
+            );
+        }
+        return true;
+    }//public static function assertDriverSupported($databaseType)
+
+
+
+    /**
+    * Checks if tables are setup for RAP (MySql)
+    *
+    * @throws SqlError
+    * @access private
+    **/
+    function _isSetup_MySQL()
+    {
+        $recordSet =& $this->dbConn->execute("SHOW TABLES");
+        if (!$recordSet) {
+            throw new Exception($this->dbConn->errorMsg());
+        } else {
+            $tables = array();
+            while (!$recordSet->EOF) {
+                $tables[]= $recordSet->fields[0];
+                if (isset($i)) {
+                    ++$i;
+                }
+                $recordSet->moveNext();
+            }
+            if (in_array("models",$tables) && in_array("statements",$tables)
+             && in_array("namespaces",$tables)) {
+                return true;
+            }
+        }
+        return false;
+    }//function _isSetup_MySQL()
+
+
+
+    /**
+    * Checks if tables are setup for RAP (MySQLi)
+    *
+    * @see _isSetup_MySQL()
+    */
+    function _isSetup_MySQLi()
+    {
+        return $this->_isSetup_MySQL();
+    }//function _isSetup_MySQLi()
+
+
+
+    /**
+    * Checks if tables are setup for RAP (MsAccess)
+    *
+    * @throws SqlError
+    * @access private
+    **/
+    function _isSetup_MsAccess()
+    {
+        $tables =& $this->dbConn->MetaTables();
+        if (!$tables) {
+            throw new Exception($this->dbConn->errorMsg());
+        }
+        if (count($tables) == 0) {
+            return false;
+        } else {
+            if (in_array("models",$tables) && in_array("statements",$tables)
+             && in_array("namespaces",$tables)) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }//function _isSetup_MsAccess()
+
+
+
+    /**
+    * Checks if tables are setup for RAP (MSSQL)
+    *
+    * @throws SqlError
+    * @access private
+    **/
+    function _isSetup_MSSQL()
+    {
+        $tables =& $this->dbConn->MetaTables();
+        if (!$tables) {
+            throw new Exception($this->dbConn->errorMsg());
+        }
+        if (count($tables) == 0) {
+            return false;
+        } else {
+            if (in_array("models",$tables) && in_array("statements",$tables)
+             && in_array("namespaces",$tables)){
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }//function _isSetup_MSSQL()
+
+
+ /**
+ * Create a new instance of DatasetDb with the given $datasetName
+ * and insert the DatasetDb variables into the database.
+ * Return FALSE if there is already a model with the given URI.
+ *
+ * @param   $datasetName string
+ * @return  object DatasetDB
+ * @throws  SqlError
+ * @access	public
+ */
+ function & getNewDatasetDb($datasetName)
+ {
+
+ 	require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
+
+   if ($this->datasetExists($datasetName))
+      return FALSE;
+   else
+   {
+   		$defaultModelUri=uniqid('http://rdfapi-php/dataset_defaultmodel_');
+   		$defaultModel=$this->getNewModel($defaultModelUri);
+
+      	$rs =& $this->dbConn->execute("INSERT INTO datasets
+                                            VALUES ('" .$this->dbConn->qstr($datasetName) ."',
+                                                    '" .$this->dbConn->qstr($defaultModelUri)."')");
+
+      if (!$rs)
+         $this->dbConn->errorMsg();
+      else
+		$return=new DatasetDb($this->dbConn, $this, $datasetName);
+   		return ($return);
+   }
+ }
+
+ /**
+ * Check if the Dataset with the given $datasetName is already stored in the database
+ *
+ * @param   $datasetName string
+ * @return  boolean
+ * @throws	SqlError
+ * @access	public
+ */
+function datasetExists($datasetName) {
+
+   $res =& $this->dbConn->execute("SELECT COUNT(*) FROM datasets
+                                   WHERE datasetName = '" .$datasetName ."'");
+   if (!$res)
+      echo $this->dbConn->errorMsg();
+   else {
+      if (!$res->fields[0])
+         return FALSE;
+      return TRUE;
+   }
+ }
+
+
+ /**
+ * Create a new instance of DatasetDb with the given $datasetName and
+ * load the corresponding values from the database.
+ * Return FALSE if the DbModel does not exist.
+ *
+ * @param   $datasetId string
+ * @return  object DatasetDb
+ * @access	public
+ */
+ function &getDatasetDb($datasetName) {
+    require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
+
+    if (!$this->datasetExists($datasetName)) {
+        return FALSE;
+    } else {
+        $return = new DatasetDb($this->dbConn, $this, $datasetName);
+        return ($return);
+    }
+ }
+
+ /**
+ * Create a new instance of namedGraphDb with the given $modelURI and graphName and
+ * load the corresponding values of modelID and baseURI from the database.
+ * Return FALSE if the DbModel does not exist.
+ *
+ * @param   $modelURI string
+ * @param   $graphName string
+ * @return  object NamedGraphMem
+ * @access	public
+ */
+ function getNamedGraphDb($modelURI, $graphName)
+ {
+	require_once(RDFAPI_INCLUDE_DIR . PACKAGE_DATASET);
+
+   if (!$this->modelExists($modelURI))
+      return FALSE;
+   else {
+      $modelVars =& $this->dbConn->execute("SELECT modelURI, modelID, baseURI
+                                            FROM models
+                                            WHERE modelURI='" .$modelURI ."'");
+
+      return new NamedGraphDb($this->dbConn, $modelVars->fields[0],
+                         $modelVars->fields[1], $graphName ,$modelVars->fields[2]);
+   }
+ }
+
+ /**
+ * Create a new instance of namedGraphDb with the given $modelURI and graphName
+ * and insert the DbModel variables into the database (not the graphName. This
+ * is only stored persistently, when added to dataset).
+ * Return FALSE if there is already a model with the given URI.
+ *
+ * @param   $modelURI string
+ * @param  	$graphName string
+ * @param   $baseURI string
+ * @return  object namedGraphDb
+ * @throws  SqlError
+ * @access	public
+ */
+ function getNewNamedGraphDb($modelURI, $graphName, $baseURI=NULL) {
+
+   if ($this->modelExists($modelURI))
+      return FALSE;
+   else {
+      $modelID = $this->_createUniqueModelID();
+
+      $rs =& $this->dbConn->execute("INSERT INTO models
+                                            (modelID, modelURI, baseURI)
+                                            VALUES (" .$modelID ."',
+                                                    " .$this->dbConn->qstr($modelURI) ."',
+                                                    " .$this->dbConn->qstr($baseURI) .")");
+      if (!$rs)
+         $this->dbConn->errorMsg();
+      else
+         return new NamedGraphDb($this->dbConn, $modelURI, $modelID, $graphName, $baseURI);
+   }
+ }
+
+ /**
+ * Removes the graph with all statements from the database.
+ * Warning: A single namedGraph can be added to several datasets. So it'll be
+ * removed from all datasets.
+ *
+ * @param   $modelURI string
+ * @return  boolean
+ * @throws  SqlError
+ * @access	public
+ */
+ function removeNamedGraphDb($modelURI)
+ {
+	if (!$this->modelExists($modelURI))
+		return FALSE;
+
+	$modelID = $this->dbConn->GetOne("SELECT modelID FROM models WHERE modelURI='".$modelURI."'");
+
+	$this->dbConn->execute("DELETE FROM models WHERE modelID=".$modelID);
+	$this->dbConn->execute("DELETE FROM dataset_model WHERE modelId=".$modelID);
+	$this->dbConn->execute("DELETE FROM statements WHERE modelID=".$modelID);
+
+	return true;
+ }
+
+
+
+    /**
+    * Performs a SPARQL query against a model. The model is converted to
+    * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or
+    * as an array containing the variables an their bindings.
+    *
+    * @param  string $query       Sparql query string
+    * @param mixed $arModelIds    Array of modelIDs, or NULL to use all models
+    * @param  string $resultform  Result form ('xml' for SPARQL Query Results XML Format)
+    * @return string/array
+    */
+    function sparqlQuery($query, $arModelIds = null, $resultform = false)
+    {
+        $engine = $this->_prepareSparql($arModelIds);
+        return $engine->queryModel(
+            null,
+            $this->_parseSparqlQuery($query),
+            $resultform
+        );
+    }//function sparqlQuery($query,$resultform = false)
+
+
+
+    /**
+    *   Prepares everything for SparqlEngine-usage
+    *   Loads the files, creates instances for SparqlEngine and
+    *   Dataset...
+    *
+    *   @return SparqlEngineDb
+    */
+    function _prepareSparql($arModelIds)
+    {
+        require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php';
+        return new SparqlEngineDb($this, $arModelIds);
+    }//function _prepareSparql()
+
+
+
+    /**
+    *   Parses an query and returns the parsed form.
+    *   If the query is not a string but a Query object,
+    *   it will just be returned.
+    *
+    *   @param $query mixed String or Query object
+    *   @return Query query object
+    *   @throws Exception If $query is no string and no Query object
+    */
+    function _parseSparqlQuery($query)
+    {
+        if ($this->queryParser === null) {
+            require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php';
+            $this->queryParser = new SparqlParser();
+        }
+        return $this->queryParser->parse($query);
+    }//function _parseSparqlQuery($query)
+
+} // end: Class DbStore
+?>
Index: Dev/branches/Demo/rdfapi/model/Literal.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/Literal.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/Literal.php	(revision 225)
@@ -0,0 +1,188 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/Node.php';
+
+// ----------------------------------------------------------------------------------
+// Class: Literal
+// ----------------------------------------------------------------------------------
+
+/**
+ * An RDF literal.
+ * The literal supports the xml:lang and rdf:datatype property.
+ * For XML datatypes see: http://www.w3.org/TR/xmlschema-2/
+ *
+ * @version  $Id: Literal.php 497 2007-08-13 05:14:26Z cweiske $
+ * @author Chris Bizer <chris@bizer.de>
+ * @author Daniel Westphal <dawe@gmx.de>
+ *
+ * @package model
+ * @access	public
+ *
+ */
+ class Literal extends Node {
+
+	/**
+	* Label of the literal
+	* @var		string
+	* @access	private
+	*/
+    var $label;
+   /**
+	* Language of the literal
+	* @var		string
+	* @access	private
+	*/
+    var $lang;
+
+   /**
+	* Datatype of the literal
+	* @var		string
+	* @access	private
+	*/
+    var $dtype;
+
+
+   /**
+    * Constructor
+    *
+    * @param string $str      label of the literal
+    * @param string $language optional language identifier
+    * @param string $datatype optional datatype
+    *
+    */
+    function Literal($str, $language = NULL, $datatype = null)
+    {
+        $this->label = $str;
+
+        if ($language != NULL) {
+            $this->lang = $language;
+        } else {
+            $this->lang = NULL;
+        }
+
+        if ($datatype != null) {
+            $this->dtype = $datatype;
+        } else {
+            $this->dtype = NULL;
+        }
+    }
+
+  /**
+   * Returns the string value of the literal.
+   *
+   * @access	public
+   * @return	string value of the literal
+   */
+  function getLabel() {
+
+    return $this->label;
+  }
+
+  /**
+   * Returns the language of the literal.
+   *
+   * @access	public
+   * @return	string language of the literal
+   */
+  function getLanguage() {
+
+    return $this->lang;
+  }
+
+  /**
+   * Sets the language of the literal.
+   *
+   * @access	public
+   * @param	    string $lang
+   */
+  function setLanguage($lang) {
+
+    $this->lang = $lang;
+  }
+
+  /**
+   * Returns the datatype of the literal.
+   *
+   * @access	public
+   * @return	string datatype of the literal
+   */
+  function getDatatype() {
+
+    return $this->dtype;
+  }
+
+  /**
+   * Sets the datatype of the literal.
+   * Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER.
+   * The array $short_datatype with the possible shortcuts is definded in ../constants.php
+   *
+   * @access	public
+   * @param		string URI of XML datatype or datatype shortcut
+   *
+   */
+  function setDatatype($datatype) {
+	GLOBAL $short_datatype;
+	if  (stristr($datatype,DATATYPE_SHORTCUT_PREFIX))  {
+		$this->dtype = $short_datatype[substr($datatype,strlen(DATATYPE_SHORTCUT_PREFIX)) ];}
+	else
+	    $this->dtype = $datatype;
+  }
+
+  /**
+   * Checks if ihe literal equals another literal.
+   * Two literals are equal, if they have the same label and they
+   * have the same language/datatype or both have no language/datatype property set.
+   *
+   * @access	public
+   * @param		object	literal $that
+   * @return	boolean
+   */
+  function equals ($that) {
+
+	if (($that == NULL) or !(is_a($that, 'Literal'))) {
+	  return false;
+    }
+
+	if ( ($this->label == $that->getLabel()) && ( ( ($this->lang == $that->getLanguage()) ||
+	   ($this->lang == NULL && $that->getLanguage() == NULL) )  &&
+
+	   (
+	   ($this->dtype == $that->getDatatype() ||
+	   ($this->dtype == NULL && $that->getDatatype() == NULL)) ) ) )
+	     {
+			return true;
+	     }
+
+    return false;
+  }
+
+  /**
+   * Dumps literal.
+   *
+   * @access	public
+   * @return	string
+   */
+  function toString() {
+	$dump = 'Literal("' . $this->label .'"';
+	if ($this->lang != NULL)
+		$dump .= ', lang="' . $this->lang .'"';
+	if ($this->dtype != NULL)
+		$dump .= ', datatype="' . $this->dtype .'"';
+	$dump .= ')';
+    return $dump;
+  }
+
+
+
+    /**
+    *   Doing string magic in PHP5
+    *   @return string String representation of this Literal
+    */
+    function __toString()
+    {
+        return $this->toString();
+    }
+
+
+} // end: Literal
+
+?>
Index: Dev/branches/Demo/rdfapi/model/MemModel.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/MemModel.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/MemModel.php	(revision 225)
@@ -0,0 +1,1461 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/Model.php';
+// ----------------------------------------------------------------------------------
+// Class: MemModel
+// ----------------------------------------------------------------------------------
+
+/**
+* A MemModel is an RDF Model, which is stored in the main memory.
+* This class provides methods for manipulating MemModels.
+*
+*
+*
+* @version  $Id: MemModel.php 425 2007-05-01 12:59:18Z cweiske $
+* @author Chris Bizer <chris@bizer.de>
+* @author Gunnar AAstrand Grimnes <ggrimnes@csd.abdn.ac.uk>
+* @author Radoslaw Oldakowski <radol@gmx.de>
+* @author Daniel Westphal <mail@d-westphal.de>
+* @author Tobias GauÃ <tobias.gauss@web.de>
+*
+* @package model
+* @access	public
+*/
+
+class MemModel extends Model {
+
+	/**
+	* Triples of the MemModel
+	* @var		array
+	* @access	private
+	*/
+	var $triples = array();
+
+	/**
+	* Array containing the search indices
+	* @var		array['INDEX_TYPE'][]['label'][]['PosInModel']
+	*
+	* @access   private
+	*/
+	var $indexArr ;
+
+
+	/**
+	* depending on which index is used this variable is -1,0,1,2 or 3
+	*
+	* -1 : no index
+	*  0 : default indices over subject, predicate, object separate
+	*  1 : index over subject+predicate+object
+	*  2 : index over subject+predicate
+	*  3 : index over subject+object
+	*
+	* @var		int
+	* @access	private
+	*/
+	var $indexed;
+
+
+
+	/**
+	* Array of namespaces
+	*
+	* @var     array
+	* @access	private
+	*/
+	var $parsedNamespaces=array();
+
+
+
+	/**
+	* Constructor
+	* You can supply a base_uri
+	*
+	* @param string $baseURI
+	* @access	public
+	*/
+	function MemModel($baseURI = NULL) {
+		$this->setBaseURI($baseURI);
+		$this->indexed = INDEX_TYPE;
+	}
+
+	/**
+	* Set a base URI for the MemModel.
+	* Affects creating of new resources and serialization syntax.
+	* If the URI doesn't end with # : or /, then a # is added to the URI.
+	* @param	string	$uri
+	* @access	public
+	*/
+	function setBaseURI($uri) {
+
+		if ($uri != NULL) {
+			$c = substr($uri, strlen($uri)-1 ,1);
+			if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
+			$uri .= '#';
+		}
+		$this->baseURI = $uri;
+	}
+
+
+	/**
+	* Number of triples in the MemModel
+	*
+	* @return	integer
+	* @access	public
+	*/
+	function size() {
+		return count($this->triples);
+	}
+
+	/**
+	* Checks if MemModel is empty
+	*
+	* @return	boolean
+	* @access	public
+	*/
+	function isEmpty() {
+		if (count($this->triples) == 0) {
+			return TRUE;
+		} else {
+			return FALSE;
+		};
+	}
+
+
+	/**
+	* Adds a new triple to the MemModel without checking if the statement is already in the MemModel.
+	* So if you want a duplicate free MemModel use the addWithoutDuplicates() function (which is slower then add())
+	*
+	* @param		object Statement	$statement
+	* @access	public
+	* @throws	PhpError
+	*/
+	function add($statement) {
+		if (!is_a($statement, 'Statement')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: add): Statement expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if($this->indexed != -1){
+			$this->triples[] = $statement;
+			end($this->triples);
+			$k=key($this->triples);
+			if($this->indexed==0){
+				// index over S
+				$this->_indexOpr($statement,$k,4,1);
+				// index over P
+				$this->_indexOpr($statement,$k,5,1);
+				// index over O
+				$this->_indexOpr($statement,$k,6,1);
+			}else{
+				$this->_indexOpr($statement,$k,$this->indexed,1);
+			}
+
+		}else{
+			$this->triples[] = $statement;
+		}
+	}
+
+
+
+	/**
+	* Checks if a new statement is already in the MemModel and adds the statement, if it is not in the MemModel.
+	* addWithoutDuplicates() is significantly slower then add().
+	* Retruns TRUE if the statement is added.
+	* FALSE otherwise.
+	*
+	* @param	object Statement	$statement
+	* @return    boolean
+	* @access	public
+	* @throws	PhpError
+	*/
+	function addWithoutDuplicates($statement) {
+
+		if (!is_a($statement, 'Statement')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: addWithoutDuplicates): Statement expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if (!$this->contains($statement)) {
+			$this->add($statement);
+			return true;
+		}else{
+			return false;
+		}
+	}
+
+	/**
+	* Removes the triple from the MemModel.
+	* TRUE if the triple is removed.
+	* FALSE otherwise.
+	*
+	* @param		object Statement	$statement
+	* @return    boolean
+	* @access	public
+	* @throws	PhpError
+	*/
+	function remove($statement) {
+
+		if (!is_a($statement, 'Statement')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: remove): Statement expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+		if($this->indexed==-1){
+			$pass=false;
+			foreach($this->triples as $key => $value) {
+				if ($this->matchStatement($value, $statement->subject(), $statement->predicate(), $statement->object())) {
+					unset($this->triples[$key]);
+					$pass= true;
+				}
+			}
+			return $pass;
+		}else{
+			$k= null;
+			if($this->indexed==0){
+				$pass=false;
+				$del=false;
+				while($del!=-1){
+					// index over S
+					$del=$this->_indexOpr($statement,$k,4,0);
+					// index over P
+					$this->_indexOpr($statement,$k,5,0);
+					// index over O
+					$this->_indexOpr($statement,$k,6,0);
+					if($del!=-1){
+						unset($this->triples[$del]);
+						$pass=true;
+					}
+				}
+				return $pass;
+			}else{
+				$pass=false;
+				$del=false;
+				while($del!=-1){
+					$del=$this->_indexOpr($statement,$k,$this->indexed,0);
+					if($del!=-1){
+						unset($this->triples[$del]);
+						$pass=true;
+					}
+				}
+				return $pass;
+			}
+		}
+	}
+
+	/**
+	* Short Dump of the MemModel.
+	*
+	* @access	public
+	* @return	string
+	*/
+	function toString() {
+		return 'MemModel[baseURI=' . $this->getBaseURI() . ';  size=' . $this->size() . ']';
+	}
+
+	/**
+	* Dumps of the MemModel including all triples.
+	*
+	* @access	public
+	* @return	string
+	*/
+	function toStringIncludingTriples() {
+		$dump = $this->toString() . chr(13);
+		foreach($this->triples as $value) {
+			$dump .= $value->toString() . chr(13);
+		}
+		return $dump;
+	}
+
+
+
+
+	/**
+	* Writes the RDF serialization of the MemModel as HTML.
+	*
+	* @access	public
+	*/
+	function writeAsHtml() {
+		require_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+		$ser = new RdfSerializer();
+		$rdf =& $ser->serialize($this);
+		$rdf = htmlspecialchars($rdf, ENT_QUOTES);
+		$rdf = str_replace(' ', '&nbsp;', $rdf);
+		$rdf = nl2br($rdf);
+		echo $rdf;
+	}
+
+	/**
+	* Writes the RDF serialization of the MemModel as HTML table.
+	*
+	* @access	public
+	*/
+	function writeAsHtmlTable() {
+		// Import Package Utility
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+		$rdfUtil = new RDFUtil();
+		$rdfUtil->writeHTMLTable($this);
+	}
+
+
+	/**
+	* Writes the RDF serialization of the MemModel as HTML table.
+	*
+	* @access	public
+	* @return	string
+	*/
+	function writeRdfToString() {
+		// Import Package Syntax
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+		$ser = new RdfSerializer();
+		$rdf =& $ser->serialize($this);
+		return $rdf;
+	}
+
+
+	/**
+	* Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
+	* You can decide to which format the model should be serialized by using a
+	* corresponding suffix-string as $type parameter. If no $type parameter
+	* is placed this method will serialize the model to XML/RDF format.
+	* Returns FALSE if the MemModel couldn't be saved to the file.
+	*
+	* @access	public
+	* @param 	string 	$filename
+	* @param 	string 	$type
+	* @throws   PhpError
+	* @return	boolean
+	*/
+	function saveAs($filename, $type ='rdf') {
+
+
+		// get suffix and create a corresponding serializer
+		if ($type=='rdf') {
+			// Import Package Syntax
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+			$ser=new RdfSerializer();
+		}elseif ($type=='nt') {
+			// Import Package Syntax
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
+			$ser=new NTripleSerializer();
+		}elseif ($type=='n3') {
+			// Import Package Syntax
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
+			$ser=new N3Serializer();
+		}else {
+			print ('Serializer type not properly defined. Use the strings "rdf","n3" or "nt".');
+			return false;
+		};
+
+		return $ser->saveAs($this, $filename);
+	}
+
+
+	/**
+	* Tests if the MemModel contains the given triple.
+	* TRUE if the triple belongs to the MemModel;
+	* FALSE otherwise.
+	*
+	* @param	object Statement	&$statement
+	* @return	boolean
+	* @access	public
+	*/
+	function contains(&$statement) {
+
+		// no index ->linear contains
+		if ($this->indexed==-1){
+			foreach($this->triples as $value) {
+				if ($value->equals($statement)){
+					return TRUE; }
+			}
+			return false;
+		}
+		if ($this->indexed==0){
+			$res = $this->_containsIndex($statement,4);
+			return $res;
+		}else{
+			return $this->_containsIndex($statement,$this->indexed);
+		}
+	}
+
+
+	/**
+	* Determine if all of the statements in a model are also contained in this MemModel.
+	* True if all of the statements in $model are also contained in this MemModel and false otherwise.
+	*
+	* @param	object Model	&$model
+	* @return	boolean
+	* @access	public
+	*/
+	function containsAll(&$model) {
+
+		if (is_a($model, 'MemModel')) {
+
+			foreach($model->triples as $statement)
+			if(!$this->contains($statement))
+			return FALSE;
+			return TRUE;
+
+		}elseif (is_a($model, 'DbModel'))
+
+		return $model->containsAll($this);
+
+		$errmsg = RDFAPI_ERROR . '(class: MemModel; method: containsAll): Model expected.';
+		trigger_error($errmsg, E_USER_ERROR);
+	}
+
+	/**
+	* Determine if any of the statements in a model are also contained in this MemModel.
+	* True if any of the statements in $model are also contained in this MemModel and false otherwise.
+	*
+	* @param	object Model	&$model
+	* @return	boolean
+	* @access	public
+	*/
+	function containsAny(&$model) {
+
+		if (is_a($model, 'MemModel')) {
+
+			foreach($model->triples as $modelStatement)
+			if($this->contains($modelStatement))
+			return TRUE;
+			return FALSE;
+
+		}elseif (is_a($model, 'DbModel'))
+
+		return $model->containsAny($this);
+
+		$errmsg = RDFAPI_ERROR . '(class: MemModel; method: containsAll): Model expected.';
+		trigger_error($errmsg, E_USER_ERROR);
+	}
+
+
+	/**
+	* Builds a search index for the statements in the MemModel.
+	* The index is used by the find(),contains(),add() and remove() functions.
+	* Performance example using a model with 43000 statements on a Linux machine:
+	* Find without index takes 1.7 seconds.
+	* Indexing takes 1.8 seconds.
+	* Find with index takes 0.001 seconds.
+	* So if you want to query a model more then once, build a index first.
+	* The defaultindex is indices over subject, predicate, object seperate.
+	*
+	* mode = 0    : indices over subject,predicate,object (default)
+	* mode = 1	 : index over subject+predicate+object
+	* mode = 2 	 : index over subject+predicate
+	* mode = 3	 : index over subject+object
+	*
+	* @param     int $mode
+	* @access	public
+	*/
+	function index($mode) {
+
+		unset($this->indexArr);
+		$this->indexArr=array();
+		switch($mode){
+			// unset indices
+			case -1:
+			$this->indexed=-1;
+			unset($this->indexArr);
+			break;
+			// index over SPO
+			case 0:
+			$this->indexed=0;
+			foreach($this->triples as $k => $t) {
+				// index over S
+				$this->_indexOpr($t,$k,4,1);
+				// index over P
+				$this->_indexOpr($t,$k,5,1);
+				// index over O
+				$this->_indexOpr($t,$k,6,1);
+			}
+			break;
+			default:
+			$this->indexed=$mode;
+			foreach($this->triples as $k => $t) {
+				$this->_indexOpr($t,$k,$this->indexed,1);
+			}
+			break;
+		}
+	}
+
+
+	/**
+	* Returns 	true if there is an index, false if not.
+	*
+	* @return	boolean
+	* @access	public
+	*/
+	function isIndexed() {
+		if($this->indexed!=-1){
+			return TRUE;
+		}else{
+			return FALSE;
+		}
+	}
+
+	/**
+	* Returns the indextype:
+	* -1 if there is no index, 0 if there are indices over S,P,O(separate),
+	* 1 if there is an index over SPO, 2 if there is an index over SP and 3 if
+	* there is an index over SO.
+	*
+	* @return int
+	* @access public
+	*
+	*/
+	function getIndexType(){
+		return $this->indexed;
+	}
+
+	/**
+	* General method to search for triples.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find( NULL, NULL, $node );
+	* Finds all triples with $node as object.
+	* Returns an empty MemModel if nothing is found.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @return	object MemModel
+	* @access	public
+	* @throws	PhpError
+	*/
+
+	function find($subject,$predicate,$object) {
+
+		if (
+		(!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)
+		) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$res = new MemModel($this->getBaseURI());
+		$res->indexed=-1;
+
+		if($this->isEmpty())
+		return $res;
+
+		if($subject == NULL && $predicate == NULL && $object == NULL)
+		return $this;
+
+		switch($this->indexed){
+			case 1:
+			if($subject!=NULL && $predicate != NULL && $object != NULL){
+				$pos=$subject->getLabel().$predicate->getLabel().$object->getLabel();
+				return $this->_findInIndex($pos,$subject,$predicate,$object,1);
+			}else{
+				break;
+			}
+
+			case 2:
+			if($subject!=NULL && $predicate != NULL){
+				$pos=$subject->getLabel().$predicate->getLabel();
+				return $this->_findInIndex($pos,$subject,$predicate,$object,2);
+			}else{
+				break;
+			}
+
+			case 3:
+			if($subject!=NULL && $object != NULL){
+				$pos=$subject->getLabel().$object->getLabel();
+				return $this->_findInIndex($pos,$subject,$predicate,$object,3);
+			}else{
+				break;
+			}
+			case 0:
+			if($subject!= null){
+				$pos=$subject->getLabel();
+				return $this->_findInIndex($pos,$subject,$predicate,$object,4);
+			}
+			if($predicate!= null){
+				$pos=$predicate->getLabel();
+				return $this->_findInIndex($pos,$subject,$predicate,$object,5);
+			}
+			if($object!= null){
+				$pos=$object->getLabel();
+				return $this->_findInIndex($pos,$subject,$predicate,$object,6);
+			}
+		}
+		// if no index: linear search
+		foreach($this->triples as $value) {
+			if ($this->matchStatement($value, $subject, $predicate, $object))
+			$res->add($value);
+		}
+		return $res;
+
+	}
+
+
+
+
+
+	/**
+	* Method to search for triples using Perl-style regular expressions.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find_regex( NULL, NULL, $regex );
+	* Finds all triples where the label of the object node matches the regular expression.
+	* Returns an empty MemModel if nothing is found.
+	*
+	* @param	string	$subject_regex
+	* @param	string	$predicate_regex
+	* @param	string	$object_regex
+	* @return	object MemModel
+	* @access	public
+	*/
+	function findRegex($subject_regex, $predicate_regex, $object_regex) {
+
+		$res = new MemModel($this->getBaseURI());
+
+		if($this->size() == 0)
+		return $res;
+
+		if($subject_regex == NULL && $predicate_regex == NULL && $object_regex == NULL)
+		return $this;
+
+		foreach($this->triples as $value) {
+			if (
+			($subject_regex == NULL || preg_match($subject_regex, $value->subj->getLabel())) &&
+			($predicate_regex == NULL || preg_match($predicate_regex, $value->pred->getLabel())) &&
+			($object_regex == NULL || preg_match($object_regex, $value->obj->getLabel()))
+			) $res->add($value);
+		}
+
+		return $res;
+
+	}
+
+	/**
+	* Returns all tripels of a certain vocabulary.
+	* $vocabulary is the namespace of the vocabulary inluding a # : / char at the end.
+	* e.g. http://www.w3.org/2000/01/rdf-schema#
+	* Returns an empty MemModel if nothing is found.
+	*
+	* @param	string	$vocabulary
+	* @return	object MemModel
+	* @access	public
+	*/
+	function findVocabulary($vocabulary) {
+
+		if($this->size() == 0)
+		return new MemModel();
+		if($vocabulary == NULL || $vocabulary == '')
+		return $this;
+
+		$res = new MemModel($this->getBaseURI());
+		if($this->indexed==0){
+			foreach($this->indexArr[5] as $key => $value){
+				$pos=strpos($key,'#')+1;
+				if(substr($key,0,$pos)==$vocabulary){
+					for($i=1;$i<=$value[0];$i++){
+						$res->add($this->triples[$value[$i]]);
+					}
+				}
+			}
+			return $res;
+		}else{
+			// Import Package Utility
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+			foreach($this->triples as $value) {
+				if (RDFUtil::getNamespace($value->getPredicate()) == $vocabulary)
+				$res->add($value);
+			}
+			return $res;
+		}
+	}
+
+	/**
+	* Searches for triples and returns the first matching statement.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
+	* Returns the first statement of the MemModel where the object equals $node.
+	* Returns an NULL if nothing is found.
+	* You can define an offset to search for. Default = 0
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @param	integer	$offset
+	* @return	object Statement
+	* @access	public
+	*/
+	function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) {
+
+		$currentOffset = 0;
+		for($i=0;$i<=$offset;$i++)
+		{
+			$res = $this->findFirstMatchOff($subject, $predicate, $object, $currentOffset);
+			$currentOffset=$res+1;
+		}
+		if ($res != -1) {
+			return $this->triples[$res];
+		} else {
+			return NULL;
+		}
+	}
+
+
+
+
+	/**
+	* Searches for triples and returns the first matching statement from a given offset.
+	* This method is used by the util/findIterator. NULL input for any parameter will match anything.
+	* Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node, $off );
+	* Returns the position of the first statement of the MemModel where the object equals $node from the given
+	* offset.
+	* Returns an -1 if nothing is found.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @param int         $off
+	* @return	int
+	* @access	private
+	*/
+	function findFirstMatchOff($subject,$predicate, $object,$off) {
+
+		if (
+		(!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)
+		) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: find): Parameters must be subclasses of Node or NULL';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$match=-1;
+		$ind=$this->indexed;
+		if($subject == NULL && $predicate == NULL && $object == NULL)
+		{
+			foreach ($this->triples as $key => $statement)
+			{
+				if ($key >= $off)
+					return $key;
+			}
+			return -1;
+		}
+
+		switch($ind){
+			case 1:
+			if($subject!=NULL && $predicate != NULL && $object != NULL){
+				$pos=$subject->getLabel().$predicate->getLabel().$object->getLabel();
+				return $this->_findMatchIndex($pos,$subject,$predicate,$object,1,$off);
+			}else{
+				break;
+			}
+
+			case 2:
+			if($subject!=NULL && $predicate != NULL){
+				$pos=$subject->getLabel().$predicate->getLabel();
+				return $this->_findMatchIndex($pos,$subject,$predicate,$object,2,$off);
+			}else{
+				break;
+			}
+
+			case 3:
+			if($subject!=NULL && $object != NULL){
+				$pos=$subject->getLabel().$object->getLabel();
+				return $this->_findMatchIndex($pos,$subject,$predicate,$object,3,$off);
+			}else{
+				break;
+			}
+			case 0:
+			if($subject!= null){
+				$pos=$subject->getLabel();
+				return $this->_findMatchIndex($pos,$subject,$predicate,$object,4,$off);
+			}
+			if($predicate!= null){
+				$pos=$predicate->getLabel();
+				return $this->_findMatchIndex($pos,$subject,$predicate,$object,5,$off);
+			}
+			if($object!= null){
+				$pos=$object->getLabel();
+				return $this->_findMatchIndex($pos,$subject,$predicate,$object,6,$off);
+			}
+			break;
+		}
+		// if no index: linear search
+		foreach($this->triples as $key => $value){
+			if ($this->matchStatement($value, $subject, $predicate, $object)){
+				if($off<=$key){
+					$match=$key;
+					break;
+				}
+			}
+		}
+		return $match;
+	}
+
+
+	/**
+	* Searches for triples and returns the number of matches.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->findCount( NULL, NULL, $node );
+	* Finds all triples with $node as object.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @return	integer
+	* @access	public
+	*/
+	function findCount($subject, $predicate, $object) {
+
+		$res = $this->find($subject, $predicate, $object);
+		return $res->size();
+
+	}
+
+
+	/**
+	* Perform an RDQL query on this MemModel.
+	* This method returns an associative array of variable bindings.
+	* The values of the query variables can either be RAP's objects (instances of Node)
+	* if $returnNodes set to TRUE, or their string serialization.
+	*
+	* @access	public
+	* @param string $queryString
+	* @param boolean $returnNodes
+	* @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
+	*      OR  array   [][?VARNAME] = string
+	*
+	*/
+	function rdqlQuery($queryString, $returnNodes = TRUE) {
+
+		// Import RDQL Package
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
+
+		$parser = new RdqlParser();
+		$parsedQuery =& $parser->parseQuery($queryString);
+
+		// this method can only query this MemModel
+		// if another model was specified in the from clause throw an error
+		if (isset($parsedQuery['sources'][1])) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: rdqlQuery):';
+			$errmsg .= ' this method can only query this MemModel';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$engine = new RdqlMemEngine();
+		$res =& $engine->queryModel($this, $parsedQuery, $returnNodes);
+
+		return $res;
+	}
+
+	/**
+	* Perform an RDQL query on this MemModel.
+	* This method returns an RdqlResultIterator of variable bindings.
+	* The values of the query variables can either be RAP's objects (instances of Node)
+	* if $returnNodes set to TRUE, or their string serialization.
+	*
+	* @access	public
+	* @param string $queryString
+	* @param boolean $returnNodes
+	* @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
+	*      OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
+	*
+	*/
+	function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) {
+		// Import RDQL Package
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
+		return new RdqlResultIterator($this->rdqlQuery($queryString, $returnNodes));
+	}
+
+	/**
+	* General method to replace nodes of a MemModel.
+	* NULL input for any parameter will match nothing.
+	* Example:  $m->replace($node, NULL, $node, $replacement);
+	* Replaces all $node objects beeing subject or object in
+	* any triple of the MemModel with the $needle node.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @param	object Node	$replacement
+	* @access	public
+	* @throws	PhpError
+	*/
+	function replace($subject, $predicate, $object, $replacement) {
+
+		if (
+		(!is_a($replacement, 'Node')) ||
+		(!is_a($subject, 'Resource') && $subject != NULL) ||
+		(!is_a($predicate, 'Resource') && $predicate != NULL) ||
+		(!is_a($object, 'Node') && $object != NULL)
+		) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: replace): Parameters must be subclasses of Node or NULL';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if($this->size() == 0)
+		break;
+		foreach($this->triples as $key => $value) {
+			if ($this->triples[$key]->subj->equals($subject)) {
+				$this->triples[$key]->subj = $replacement;
+			}
+			if ($this->triples[$key]->pred->equals($predicate))
+			$this->triples[$key]->pred = $replacement;
+			if ($this->triples[$key]->obj->equals($object))
+			$this->triples[$key]->obj = $replacement;
+
+		}
+		$this->index($this->indexed);
+	}
+
+
+	/**
+	* Internal method that checks, if a statement matches a S, P, O or NULL combination.
+	* NULL input for any parameter will match anything.
+	*
+	* @param	object Statement	$statement
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @return	boolean
+	* @access	private
+	*/
+	function matchStatement($statement, $subject, $predicate, $object)  {
+
+		if(($subject != NULL) AND !($statement->subj->equals($subject)))
+		return false;
+
+		if($predicate != NULL && !($statement->pred->equals($predicate)))
+		return false;
+
+		if($object != NULL && !($statement->obj->equals($object)))
+		return false;
+
+		return true;
+	}
+
+
+
+
+	/**
+	* Checks if two models are equal.
+	* Two models are equal if and only if the two RDF graphs they represent are isomorphic.
+	*
+	* @access	public
+	* @param		object	model &$that
+	* @throws    phpErrpr
+	* @return	boolean
+	*/
+
+	function equals(&$that)  {
+
+		if (!is_a($that, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: equals): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		if ($this->size() != $that->size())
+		return FALSE;
+		/*
+		if (!$this->containsAll($that))
+		return FALSE;
+		return TRUE;
+		*/
+		include_once(RDFAPI_INCLUDE_DIR. "util/ModelComparator.php");
+		return ModelComparator::compare($this,$that);
+	}
+
+	/**
+	* Returns a new MemModel that is the set-union of the MemModel with another model.
+	* Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
+	*
+	* The result of taking the set-union of two or more RDF graphs (i.e. sets of triples)
+	* is another graph, which we will call the merge of the graphs.
+	* Each of the original graphs is a subgraph of the merged graph. Notice that when forming
+	* a merged graph, two occurrences of a given uriref or literal as nodes in two different
+	* graphs become a single node in the union graph (since by definition they are the same
+	* uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course
+	* never merged. In particular, this means that every blank node in a merged graph can be
+	* identified as coming from one particular graph in the original set of graphs.
+	*
+	* Notice that one does not, in general, obtain the merge of a set of graphs by concatenating
+	* their corresponding N-triples documents and constructing the graph described by the merged
+	* document, since if some of the documents use the same node identifiers, the merged document
+	* will describe a graph in which some of the blank nodes have been 'accidentally' merged.
+	* To merge Ntriples documents it is necessary to check if the same nodeID is used in two or
+	* more documents, and to replace it with a distinct nodeID in each of them, before merging the
+	* documents. (Not implemented yet !!!!!!!!!!!)
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @access	public
+	* @throws phpErrpr
+	*
+	*/
+	function & unite(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: unite): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$res = $this;
+
+		if (is_a($model, 'MemModel')) {
+            require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php';
+			$stateIt=new StatementIterator($model);
+			while($statement=$stateIt->next())
+			{
+				$res->addWithoutDuplicates($statement);
+			}
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+			$memModel =& $model->getMemModel();
+			foreach($memModel->triples as $value)
+			$res->addWithoutDuplicates($value);
+		}
+
+		return $res;
+	}
+
+	/**
+	* Returns a new MemModel that is the subtraction of another model from this MemModel.
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @access	public
+	* @throws phpErrpr
+	*/
+
+	function & subtract(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: subtract): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$res = $this;
+
+
+		if (is_a($model, 'MemModel'))
+		{
+            require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php';
+			$stateIt=new StatementIterator($model);
+			while($statement=$stateIt->next())
+			{
+				$res->remove($statement);
+			}
+		}
+		elseif (is_a($model, 'DbModel'))
+		{
+			$memModel =& $model->getMemModel();
+			foreach($memModel->triples as $value)
+			$res->remove($value);
+		}
+
+
+		return $res;
+	}
+
+	/**
+	* Returns a new MemModel containing all the statements which are in both this MemModel and another.
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @access	public
+	* @throws phpErrpr
+	*/
+	function & intersect(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: intersect: Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$res = new MemModel($this->getBaseURI());
+
+		if (is_a($model, 'DbModel') || is_a($model, 'RDFSBModel'))
+		{
+			$memModel =& $model->getMemModel();
+			foreach($memModel->triples as $value) {
+				if ($this->contains($value))
+				$res->add($value);
+			}
+		}
+
+		elseif (is_a($model, 'MemModel'))
+		{
+			foreach($model->triples as $value) {
+				if ($this->contains($value))
+				$res->add($value);
+			}
+		}
+
+
+
+		return $res;
+	}
+
+
+	/**
+	* Adds another model to this MemModel.
+	* Duplicate statements are not removed.
+	* If you don't want duplicates, use unite().
+	* If any statement of the model to be added to this model contains a blankNode
+	* with an identifier already existing in this model, a new blankNode is generated.
+	*
+	* @param	object Model	$model
+	* @access	public
+	* @throws phpErrpr
+	*
+	*/
+	function addModel(&$model)  {
+
+		if (!is_a($model, 'Model')) {
+			$errmsg = RDFAPI_ERROR . '(class: MemModel; method: addModel): Model expected.';
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+
+		$blankNodes_tmp = array();
+
+		if (is_a($model, 'MemModel')) {
+            require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php';
+			$stateIt=new StatementIterator($model);
+			while($statement=$stateIt->next())
+			{
+				$this->_addStatementFromAnotherModel($statement, $blankNodes_tmp);
+			};
+			$this->addParsedNamespaces($model->getParsedNamespaces());
+		}
+
+		elseif (is_a($model, 'DbModel')) {
+			$memModel =& $model->getMemModel();
+			foreach($memModel->triples as $value)
+			$this->_addStatementFromAnotherModel($value, $blankNodes_tmp);
+		}
+		$this->index($this->indexed);
+	}
+
+
+	/**
+	* Reifies the MemModel.
+	* Returns a new MemModel that contains the reifications of all statements of this MemModel.
+	*
+	* @access	public
+	* @return	object	MemModel
+	*/
+	function & reify() {
+		$res = new MemModel($this->getBaseURI());
+
+		$stateIt=$this->getStatementIterator();
+		while($statement=$stateIt->next())
+		{
+			$pointer =& $statement->reify($res);
+			$res->addModel($pointer);
+		};
+
+		return $res;
+	}
+
+	/**
+	* Returns a StatementIterator for traversing the MemModel.
+	* @access	public
+	* @return	object	StatementIterator
+	*/
+	function & getStatementIterator() {
+		// Import Package Utility
+        require_once RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php';
+
+		$si = new StatementIterator($this);
+		return $si;
+	}
+
+	/**
+	* Returns a FindIterator for traversing the MemModel.
+	* @access	public
+	* @return	object	FindIterator
+	*/
+	function & findAsIterator($sub=null,$pred=null,$obj=null) {
+		// Import Package Utility
+        require_once RDFAPI_INCLUDE_DIR . 'util/FindIterator.php';
+
+		$if = new FindIterator($this,$sub,$pred,$obj);
+		return $if;
+	}
+
+	/**
+	* Returns a FindIterator for traversing the MemModel.
+	* @access	public
+	* @return	object	FindIterator
+	*/
+	function & iterFind($sub=null,$pred=null,$obj=null) {
+		// Import Package Utility
+        require_once RDFAPI_INCLUDE_DIR . 'util/IterFind.php';
+
+		$if = new IterFind($this,$sub,$pred,$obj);
+		return $if;
+	}
+
+
+	/**
+	* Returns the models namespaces.
+	*
+	* @author   Tobias Gauï¿œ<tobias.gauss@web.de>
+	* @access   public
+	* @return   Array
+	*/
+	function getParsedNamespaces(){
+		if(count($this->parsedNamespaces)!=0){
+			return $this->parsedNamespaces;
+		}else{
+			return false;
+		}
+	}
+
+
+
+	/**
+	* Adds the namespaces to the model. This method is called by
+	* the parser. !!!! addParsedNamespaces() not overwrites manual
+	* added namespaces in the model !!!!
+	*
+	* @author   Tobias Gauï¿œ<tobias.gauss@web.de>
+	* @access   public
+	* @param    Array $newNs
+	*/
+	function addParsedNamespaces($newNs){
+		if($newNs)
+		$this->parsedNamespaces = $this->parsedNamespaces + $newNs;
+	}
+
+
+	/**
+	* Adds a namespace and prefix to the model.
+	*
+	* @author   Tobias Gauï¿œ<tobias.gauss@web.de>
+	* @access   public
+	* @param    String
+	* @param    String
+	*/
+	function addNamespace($prefix, $nmsp){
+		$this->parsedNamespaces[$nmsp]=$prefix;
+	}
+
+	/**
+	* removes a single namespace from the model
+	*
+	* @author   Tobias Gauï¿œ<tobias.gauss@web.de>
+	* @access   public
+	* @param    String $nmsp
+	*/
+	function removeNamespace($nmsp){
+		if(isset($this->parsedNamespaces[$nmsp])){
+			unset($this->parsedNamespaces[$nmsp]);
+			return true;
+		}else{
+			return false;
+		}
+	}
+
+
+
+	/**
+	* Close the MemModel and free up resources held.
+	*
+	* @access	public
+	*/
+	function close() {
+		unset( $this->baseURI );
+		unset( $this->triples );
+	}
+
+	// =============================================================================
+	// *************************** helper functions ********************************
+	// =============================================================================
+	/**
+	* Checks if $statement is in index
+	*
+	* @param  int $ind
+	* @param  Statement &$statement
+	* @return boolean
+	* @access private
+	*/
+	function _containsIndex(&$statement,$ind){
+		switch($ind){
+			case 4:
+			$sub=$statement->getSubject();
+			$pos=$sub->getLabel();
+			break;
+			case 1:
+			$sub=$statement->getSubject();
+			$pred=$statement->getPredicate();
+			$obj=$statement->getObject();
+			$pos=$sub->getLabel().$pred->getLabel().$obj->getLabel();
+			break;
+			case 2:
+			$sub=$statement->getSubject();
+			$pred=$statement->getPredicate();
+			$pos=$sub->getLabel().$pred->getLabel();
+			break;
+			case 3:
+			$sub=$statement->getSubject();
+			$obj=$statement->getObject();
+			$pos=$sub->getLabel().$obj->getLabel();
+			break;
+		}
+
+		if (!isset($this->indexArr[$ind][$pos]))
+		return FALSE;
+		foreach ($this->indexArr[$ind][$pos] as $key => $value) {
+			$t=$this->triples[$value];
+			if ($t->equals($statement))
+			return TRUE;
+		}
+		return FALSE;
+	}
+
+
+
+
+
+	/**
+	* finds a statement in an index. $pos is the Position in the index
+	* and $ind the adequate searchindex
+	*
+	* @param    String            $pos
+	* @param    Object Subject    &$subject
+	* @param    Object Predicate  &$predicate
+	* @param    Object Object	 &$object
+	* @param    int				 &ind
+	* @return   MemModel          $res
+	* @access   private
+	*/
+	function _findInIndex($pos,&$subject,&$predicate,&$object,$ind){
+		$res = new MemModel($this->getBaseURI());
+		$res->indexed=-1;
+		if (!isset($this->indexArr[$ind][$pos]))
+		return $res;
+		foreach($this->indexArr[$ind][$pos] as $key =>$value){
+			$t=$this->triples[$value];
+			if ($this->matchStatement($t,$subject,$predicate,$object))
+			$res->add($t);
+		}
+		return $res;
+	}
+	/**
+	* adds/removes a statement into/from an index.
+	* mode=0 removes the statement from the index;
+	* mode=1 adds the statement into the index.
+	* returns the statements position.
+	*
+	* @param Object Statement &$statement
+	*	@param int              $k
+	*	@param int              $ind
+	* @param int				$mode
+	* @return int             $k
+	* @access private
+	*/
+	function _indexOpr(&$statement,$k,$ind,$mode){
+		// determine position in adequate index
+		switch($ind){
+			case 1:
+			$s=$statement->getSubject();
+			$p=$statement->getPredicate();
+			$o=$statement->getObject();
+			$pos=$s->getLabel().$p->getLabel().$o->getLabel();
+			break;
+			case 2:
+			$s=$statement->getSubject();
+			$p=$statement->getPredicate();
+			$pos=$s->getLabel().$p->getLabel();
+			break;
+			case 3:
+			$s=$statement->getSubject();
+			$o=$statement->getObject();
+			$pos=$s->getLabel().$o->getLabel();
+			break;
+			case 4:
+			$s=$statement->getSubject();
+			$pos=$s->getLabel();
+			break;
+			case 5:
+			$p=$statement->getPredicate();
+			$pos=$p->getLabel();
+			break;
+			case 6:
+			$o=$statement->getObject();
+			$pos=$o->getLabel();
+			break;
+		}
+		switch($mode){
+			// add in Index
+			case 1:
+			if(isset($this->indexArr[$ind][$pos])){
+				$this->indexArr[$ind][$pos][] = $k;
+			}else{
+				$this->indexArr[$ind][$pos][0] = $k;
+			}
+			break;
+			// remove from Index
+			case 0:
+			$subject=$statement->getSubject();
+			$predicate=$statement->getPredicate();
+			$object=$statement->getObject();
+			$k=-1;
+			if(!isset($this->indexArr[$ind][$pos])){
+				return -1;
+			}
+			$num=count($this->indexArr[$ind][$pos]);
+			foreach($this->indexArr[$ind][$pos] as $key => $value){
+				$t=$this->triples[$value];
+				if($this->matchStatement($t,$subject,$predicate,$object)){
+					$k=$value;
+					if($num==1){
+						unset($this->indexArr[$ind][$pos]);
+					}else{
+						unset($this->indexArr[$ind][$pos][$key]);
+					}
+					return $k;
+				}
+			}
+			break;
+		}
+		return $k;
+	}
+
+
+	/**
+	* finds next or previous matching statement.
+	* Returns Position in model or -1 if there is no match.
+	*
+	*
+	* @param	    String
+	* @param     object  Subject
+	* @param	    object	Predicate
+	* @param     object  Object
+	* @param     integer
+	* @param     integer
+	* @return	integer
+	* @access	private
+	*/
+	function _findMatchIndex($pos,&$s,&$p,&$o,$ind,$off){
+		$match=-1;
+		if (!isset($this->indexArr[$ind][$pos])) {
+			return $match;}
+			foreach($this->indexArr[$ind][$pos] as $key =>$value){
+				$t=$this->triples[$value];
+				if ($this->matchStatement($t,$s,$p,$o)){
+					if($off <= $value){
+						$match= $value;
+						return $match;
+					}
+				}
+			}
+
+			return $match;
+
+	}
+
+
+
+
+} // end: MemModel
+
+
+?>
Index: Dev/branches/Demo/rdfapi/model/Model.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/Model.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/Model.php	(revision 225)
@@ -0,0 +1,576 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'util/Object.php';
+
+// ----------------------------------------------------------------------------------
+// Class: Model
+// ----------------------------------------------------------------------------------
+
+/**
+ * Abstract superclass of MemModel and DbModel. A model is a programming interface to an RDF graph.
+ * An RDF graph is a directed labeled graph, as described in http://www.w3.org/TR/rdf-mt/.
+ * It can be defined as a set of <S, P, O> triples, where P is a uriref, S is either
+ * a uriref or a blank node, and O is either a uriref, a blank node, or a literal.
+ *
+ *
+ * @version  $Id: Model.php 569 2008-05-19 05:24:39Z p_frischmuth $
+ * @author Radoslaw Oldakowski <radol@gmx.de>
+ * @author Daniel Westphal <mail@d-westphal.de>
+ *
+ * @package model
+ * @access	public
+ */
+class Model extends Object
+{
+    /**
+    * Base URI of the Model.
+    * Affects creating of new resources and serialization syntax.
+    *
+    * @var     string
+    * @access	private
+    */
+    var $baseURI;
+
+    /**
+    * Number of the last assigned bNode.
+    *
+    * @var     integer
+    * @access	private
+    */
+    var $bNodeCount;
+
+    /**
+    *   SparqlParser so we can re-use it
+    *   @var Parser
+    */
+    var $queryParser = null;
+
+
+
+    /**
+    * Notice for people who are used to work with older versions of RAP.
+    *
+    * @throws  PHPError
+    * @access	public
+    */
+    function Model()
+    {
+
+        $errmsg  = 'Since RAP 0.6 the class for manipulating memory models has been renamed to MemModel.';
+        $errmsg .= '<br>Sorry for this inconvenience.<br>';
+
+        trigger_error($errmsg, E_USER_ERROR);
+    }
+
+
+
+    /**
+    * Return current baseURI.
+    *
+    * @return  string
+    * @access	public
+    */
+    function getBaseURI()
+    {
+        return $this->baseURI;
+    }
+
+
+
+    /**
+    * Load a model from a file containing RDF, N3, N-Triples or a xhtml document containing RDF.
+    * This function recognizes the suffix of the filename (.n3 or .rdf) and
+    * calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt");
+    * If the model is not empty, the contents of the file is added to this DbModel.
+    *
+    * @param 	string 	$filename
+    * @param 	string 	$type
+    * @param   boolean $stream
+    * @access	public
+    */
+    function load($filename, $type = NULL, $stream=false)
+    {
+        if ((isset($type)) && ($type =='n3') OR ($type =='nt')) {
+            // Import Package Syntax
+            include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
+            $parser = new N3Parser();
+        }elseif ((isset($type)) && ($type =='rdf')) {
+            // Import Package Syntax
+            include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+            $parser = new RdfParser();
+        }elseif ((isset($type)) && ($type =='grddl')) {
+            // Import Package Syntax
+            include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
+            $parser = new GRDDLParser();
+        }elseif ((isset($type)) && ($type =='rss')) {
+            // Import Package Syntax
+            include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS);
+            $parser = new RssParser();
+        }else {
+            // create a parser according to the suffix of the filename
+            // if there is no suffix assume the file to be XML/RDF
+            preg_match("/\.([a-zA-Z0-9_]+)$/", $filename, $suffix);
+            if (isset($suffix[1]) && (strtolower($suffix[1]) == 'n3' OR strtolower($suffix[1]) == 'nt')){
+                // Import Package Syntax
+                include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
+                $parser = new N3Parser();
+            }elseif (isset($suffix[1]) && (strtolower($suffix[1]) == 'htm' OR strtolower($suffix[1]) == 'html' OR strtolower($suffix[1]) == 'xhtml')){
+                    include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
+                    $parser = new GRDDLParser();
+            }else{
+                // Import Package Syntax
+                include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+                $parser = new RdfParser();
+            }
+        };
+
+        if (($stream && $type=='rdf')||($stream && $type=='n3')) {
+                $temp=&$parser->generateModel($filename,false,$this);
+        } else{
+                $temp=&$parser->generateModel($filename);
+        }
+        $this->addModel($temp);
+        if($this->getBaseURI()== null)
+            $this->setBaseURI($temp->getBaseURI());
+    }
+
+	/**
+	 * This method takes a string conatining data and adds the parsed data to this model.
+	 *
+	 * @param string $str The string containing the data to be parsed and loaded.
+	 * @param type $type The type of the string, currently only 'json' is supported.
+	 */
+	function loadFromString($str, $type) {
+		
+		switch ($type) {
+			case 'json':
+				include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_JSON);
+				$parser = new JsonParser();
+				break;
+			case 'n3':
+			case 'nt':
+				include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3);
+				$parser = new N3Parser();
+				break;
+			case 'rdf':
+			case 'rdfxml':
+			case 'xml':
+				include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+				$parser = new RdfParser();
+				break;
+			case 'grddl':
+				include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_GRDDL);
+				$parser = new GRDDLParser();
+				break;
+			case 'rss':
+				include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RSS);
+				$parser = new RssParser();
+				break;
+			default:
+				trigger_error('(class: Model; method: loadFromString): type ' . $type . 'is currently not supported',
+			 			E_USER_ERROR);
+		}
+		
+		if (($parser instanceof JsonParser) || ($parser instanceof N3Parser)) {
+			$parser->generateModelFromString($str, $this);
+		} else {
+			$temp = $parser->generateModel($str, false, $this);
+			
+			$this->addModel($temp);
+            if($this->getBaseURI() == null) {
+                $this->setBaseURI($temp->getBaseURI());
+            }
+		}
+	} 
+
+    /**
+    * Adds a statement from another model to this model.
+    * If the statement to be added contains a blankNode with an identifier
+    * already existing in this model, a new blankNode is generated.
+    *
+    * @param 	Object Statement   $statement
+    * @access	private
+    */
+    function _addStatementFromAnotherModel($statement, &$blankNodes_tmp)
+    {
+        $subject = $statement->getSubject();
+        $object = $statement->getObject();
+
+        if (is_a($subject, "BlankNode")) {
+            $label = $subject->getLabel();
+            if (!array_key_exists($label, $blankNodes_tmp))
+            {
+                if ($this->findFirstMatchingStatement($subject, NULL, NULL)
+                || $this->findFirstMatchingStatement(NULL, NULL, $subject))
+                {
+                $blankNodes_tmp[$label] = new BlankNode($this);
+                $statement->subj = $blankNodes_tmp[$label];
+                } else {
+                $blankNodes_tmp[$label] = $subject;
+                }
+            } else
+                $statement->subj = $blankNodes_tmp[$label];
+        }
+
+        if (is_a($object, "BlankNode")) {
+            $label = $object->getLabel();
+            if (!array_key_exists($label, $blankNodes_tmp))
+            {
+                if ($this->findFirstMatchingStatement($object, NULL, NULL)
+                || $this->findFirstMatchingStatement(NULL, NULL, $object))
+                {
+                $blankNodes_tmp[$label] = new BlankNode($this);
+                $statement->obj = $blankNodes_tmp[$label];
+                } else {
+                $blankNodes_tmp[$label] = $object;
+                }
+            } else
+                $statement->obj = $blankNodes_tmp[$label];
+        }
+        $this->add($statement);
+    }
+
+
+
+    /**
+    * Internal method, that returns a resource URI that is unique for the Model.
+    * URIs are generated using the base_uri of the DbModel, the prefix and a unique number.
+    * If no prefix is defined, the bNode prefix, defined in constants.php, is used.
+    *
+    * @param	string	$prefix
+    * @return	string
+    * @access	private
+    */
+    function getUniqueResourceURI($prefix = false)
+    {
+        static $bNodeCount;
+        if(!$bNodeCount)
+            $bNodeCount = 0;
+
+        if(!$prefix)
+            $prefix=BNODE_PREFIX;
+
+        return $prefix.++$bNodeCount;
+    }
+
+
+
+    /**
+    * Returns a ResModel with this model as baseModel. This is the same as
+    * ModelFactory::getResModelForBaseModel($this).
+    *
+    * @return	object	ResModel
+    * @access	public
+    */
+    function & getResModel()
+    {
+		$modelFactory = new ModelFactory();
+        return $modelFactory->getResModelForBaseModel($this);
+    }
+
+
+
+    /**
+    * Returns an OntModel with this model as baseModel.
+    * $vocabulary has to be one of the following constants (currently only one is supported):
+    * RDFS_VOCABULARY to select a RDFS Vocabulary.
+    *
+    * This is the same as ModelFactory::getOntModelForBaseModel($this, $vocabulary).
+    *
+    * @param   constant  $vocabulary
+    * @return	object	OntModel
+    * @access	public
+    */
+    function & getOntModel($vocabulary)
+    {
+		$modelFactory = new ModelFactory();
+        return $modelFactory->getOntModelForBaseModel($this, $vocabulary);
+    }
+
+
+
+    /**
+    * Searches for triples using find() and tracks forward blank nodes
+    * until the final objects in the retrieved subgraphs are all named resources.
+    * The method calls itself recursivly until the result is complete.
+    * NULL input for subject, predicate or object will match anything.
+    * Inputparameters are ignored for recursivly found statements.
+    * Returns a new MemModel or adds (without checking for duplicates)
+    * the found statements to a given MemModel.
+    * Returns an empty MemModel, if nothing is found.
+    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    * WARNING: This method can be slow with large models.
+    * NOTE:    Blank nodes are not renamed, they keep the same nodeIDs
+    *          as in the queried model!
+    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    *
+    * @author   Anton Koestlbacher <anton1@koestlbacher.de>
+    * @param    object Node     $subject
+    * @param    object Node     $predicate
+    * @param    object Node     $object
+    * @param    object MemModel $object
+    * @return   object MemModel
+    * @access   public
+    * @throws   PhpError
+    */
+    function findForward($subject, $predicate, $object, &$newModel = NULL)
+    {
+        if (!is_a($newModel, "MemModel"))
+        {
+            $newModel = New MemModel;
+        }
+
+        if (is_a($this, "DbModel"))
+        {
+            $model = $this;
+            $res   = $model->find($subject, $predicate, $object);
+            $it    = $res->getStatementIterator();
+        }
+        elseif (is_a($this, "MemModel")) {
+            $model = $this;
+            $it    = $model->findAsIterator($subject, $predicate, $object);
+        }
+        elseif (is_a($this, "ResModel")) {
+            $model = $this->model;
+            $it    = $model->findAsIterator($subject, $predicate, $object);
+        }
+
+        while ($it->hasNext())
+        {
+            $statement = $it->next();
+            $newModel->add($statement);
+            if (is_a($statement->object(),'BlankNode'))
+            {
+                $model->findForward($statement->object(), NULL, NULL, $newModel);
+            }
+        }
+        return $newModel;
+    }
+
+
+
+    /**
+    * Perform an RDQL query on this Model. Should work with all types of models.
+    * This method returns a MemModel containing the result statements.
+    * If $closure is set to TRUE, the result will additionally contain
+    * statements found by the findForward-method for blank nodes.
+    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    * WARNING: If called with $closure = TRUE this method
+    *          can be slow with large models.
+    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    *
+    * @author   Anton Kï¿œtlbacher <anton1@koestlbacher.de>
+    * @author   code snippets taken from the RAP Netapi by Phil Dawes and Chris Bizer
+    * @access   public
+    * @param    string $queryString
+    * @param    boolean $closure
+    * @return   object MemModel
+    *
+    */
+    function & getMemModelByRDQL($queryString, $closure = FALSE)
+    {
+        require_once(RDFAPI_INCLUDE_DIR.PACKAGE_RDQL);
+        $parser = new RdqlParser();
+        $parsedQuery =& $parser->parseQuery($queryString);
+
+        // If there are variables used in the pattern but not
+        // in the select clause, add them to the select clause
+        foreach ($parsedQuery['patterns'] as $n => $pattern)
+        {
+            foreach ($pattern as $key => $val_1)
+            {
+                if ($val_1['value']{0}=='?')
+                {
+                    if (!in_array($val_1['value'],$parsedQuery['selectVars']))
+                    {
+                    array_push($parsedQuery['selectVars'],$val_1['value']);
+                    }
+                }
+            }
+        }
+
+        if (is_a($this, "DbModel"))
+        {
+            $engine = new RdqlDbEngine();
+            $model  = $this;
+        }
+        elseif (is_a($this, "MemModel"))
+        {
+            $engine = new RdqlMemEngine();
+            $model  = $this;
+        }
+        elseif (is_a($this, "ResModel"))
+        {
+            $engine = new RdqlMemEngine();
+            $model  = $this->model;
+        }
+
+        $res = $engine->queryModel($model,$parsedQuery,TRUE);
+        $rdqlIter = new RdqlResultIterator($res);
+        $newModel = new MemModel();
+
+        // Build statements from RdqlResultIterator
+        while ($rdqlIter->hasNext()) {
+            $result = $rdqlIter->next();
+            foreach ($parsedQuery['patterns'] as $n => $pattern)
+            {
+                if (substr($pattern['subject']['value'], 0, 1) == '?')
+                {
+                    $subj = $result[$pattern['subject']['value']];
+                }
+                else
+                {
+                    $subj = new Resource($pattern['subject']['value']);
+                }
+                if (substr($pattern['predicate']['value'], 0, 1) == '?')
+                {
+                    $pred = $result[$pattern['predicate']['value']];
+                }
+                else
+                {
+                    $pred = new Resource($pattern['predicate']['value']);
+                }
+
+                if (substr($pattern['object']['value'], 0, 1) == '?')
+                {
+                    $obj = $result[$pattern['object']['value']];
+                }
+                else
+                {
+                    if (isset($pattern['object']['is_literal']))
+                    {
+                        $obj = new Literal($pattern['object']['value']);
+                        $obj->setDatatype($pattern['object']['l_dtype']);
+                        $obj->setLanguage($pattern['object']['l_lang']);
+                    }
+                    else
+                    {
+                        $obj = new Resource($pattern['object']['value']);
+                    }
+                }
+
+                $statement = new Statement($subj,$pred,$obj);
+                $newModel->add($statement);
+
+                // findForward() Statements containing an eventually given blank node
+                // and add them to the result, if closure = true
+                if (is_a($statement->object(),'BlankNode') && $closure == True)
+                {
+                    $newModel = $model->findForward($statement->object(),NULL,NULL, $newModel);
+                }
+                if (is_a($statement->subject(),'BlankNode') && $closure == True)
+                {
+                    $newModel = $model->findForward($statement->subject(),NULL,NULL, $newModel);
+                }
+            }
+        }
+        return $newModel;
+    }
+
+
+
+    /**
+    * Alias for RDFUtil::visualiseGraph(&$model, $format, $short_prefix)
+    *
+    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    * Note: See RDFUtil for further Information.
+    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    *
+    * @author   Anton Kï¿œtlbacher <anton1@koestlbacher.de>
+    * @param    string  $format
+    * @param    boolean $short_prefix
+    * @return   string, binary
+    * @access   public
+    * @throws   PhpError
+    */
+    function visualize($format = "dot", $short_prefix = TRUE)
+    {
+		$rdfUtil = new RDFUtil();
+        return $rdfUtil->visualizeGraph($this, $format, $short_prefix);
+    }
+
+
+    /**
+    * Performs a SPARQL query against a model. The model is converted to
+    * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or
+    * as an array containing the variables an their bindings.
+    *
+    * @param  string $query      the sparql query string
+    * @param  string $resultform the result form ('xml' for SPARQL Query Results XML Format)
+    * @return string/array
+    */
+    function sparqlQuery($query, $resultform = false)
+    {
+        list($engine, $dataset) = $this->_prepareSparql();
+        return $engine->queryModel(
+            $dataset,
+            $this->_parseSparqlQuery($query),
+            $resultform
+        );
+    }//function sparqlQuery($query,$resultform = false)
+
+
+
+    /**
+    *   Prepares a sparql query and returns a prepared statement
+    *   that can be executed with data later on.
+    *
+    *   @param string $query Sparql query to prepare.
+    *   @return SparqlEngine_PreparedStatement  prepared statement object
+    */
+    function sparqlPrepare($query)
+    {
+        list($engine, $dataset) = $this->_prepareSparql();
+        return $engine->prepare(
+            $dataset,
+            $this->_parseSparqlQuery($query)
+         );
+    }//function sparqlPrepare($query)
+
+
+
+    /**
+    *   Prepares everything for SparqlEngine-usage
+    *   Loads the files, creates instances for SparqlEngine and
+    *   Dataset...
+    *
+    *   @return array First value is the sparql engine, second the dataset
+    */
+    function _prepareSparql()
+    {
+        require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine.php';
+        require_once RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php';
+
+        $dataset = new DatasetMem();
+        $dataset->setDefaultGraph($this);
+
+		$sparqlEngine = SparqlEngine::getInstance();
+		
+        return array(
+            $sparqlEngine->factory($this),
+            $dataset
+        );
+    }//function _prepareSparql()
+
+
+
+    /**
+    *   Parses an query and returns the parsed form.
+    *   If the query is not a string but a Query object,
+    *   it will just be returned.
+    *
+    *   @param $query mixed String or Query object
+    *   @return Query query object
+    *   @throws Exception If $query is no string and no Query object
+    */
+    function _parseSparqlQuery($query)
+    {
+        if ($this->queryParser === null) {
+            require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php';
+            $this->queryParser = new SparqlParser();
+        }
+        return $this->queryParser->parse($query);
+    }//function _parseSparqlQuery($query)
+
+} // end: Model
+
+?>
Index: Dev/branches/Demo/rdfapi/model/ModelFactory.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/ModelFactory.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/ModelFactory.php	(revision 225)
@@ -0,0 +1,288 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/DbStore.php';
+
+// ----------------------------------------------------------------------------------
+// Class: ModelFactory
+// ----------------------------------------------------------------------------------
+
+
+/**
+* ModelFactory is a static class which provides methods for creating different
+* types of RAP models. RAP models have to be created trough a ModelFactory
+* instead of creating them directly with the 'new' operator because of RAP's
+* dynamic code inclusion mechanism.
+*
+* @version  $Id: ModelFactory.php 524 2007-08-14 11:12:45Z kobasoft $
+* @author Daniel Westphal <mail at d-westphal.de>
+* @author Richard Cyganiak <richard@cyganiak.de>
+*
+*
+* @package 	model
+* @access	public
+**/
+class ModelFactory
+{
+	/**
+	* Returns a MemModel.
+	* You can supply a base URI
+	*
+	* @param   string  $baseURI
+	* @return	object	MemModel
+	* @access	public
+	*/
+	function & getDefaultModel($baseURI = null)
+	{
+		return ModelFactory::getMemModel($baseURI);
+	}
+
+	/**
+	* Returns a NamedGraphSetMem.
+    * You can supply a GraphSet name.
+    *
+    * @param string $graphSetId
+    * @param string $uri
+	* @access	public
+    */
+	function & getDatasetMem($graphSetId = null)
+	{
+        require_once RDFAPI_INCLUDE_DIR . 'dataset/DatasetMem.php';
+		$m = new DatasetMem($graphSetId);
+		return $m;
+	}
+
+	/**
+	* Returns a MemModel.
+	* You can supply a base URI
+	*
+	* @param   string  $baseURI
+	* @return	object	MemModel
+	* @access	public
+	*/
+	function & getMemModel($baseURI = null)
+	{
+        require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php';
+		$m = new MemModel($baseURI);
+		return $m;
+	}
+
+	/**
+	* Returns a DbModel with the database connection
+	* defined in constants.php.
+	* You can supply a base URI. If a model with the given base
+	* URI exists in the DbStore, it'll be opened.
+	* If not, a new model will be created.
+	*
+	* @param   string  $baseURI
+	* @return	object	DbModel
+	* @access	public
+	*/
+	function & getDefaultDbModel($baseURI = null)
+	{
+		$dbStore = ModelFactory::getDbStore();
+		$m = ModelFactory::getDbModel($dbStore,$baseURI);
+		return $m;
+	}
+
+	/**
+	* Returns a new DbModel using the database connection
+	* supplied by $dbStore.
+	* You can supply a base URI. If a model with the given base
+	* URI exists in the DbStore, it'll be opened.
+	* If not, a new model will be created.
+	*
+	* @param   object	DbStore  $dbStore
+	* @param   string  $baseURI
+	* @return	object	DbModel
+	* @access	public
+	*/
+	function & getDbModel($dbStore, $baseURI = null)
+	{
+		if ($dbStore->modelExists($baseURI)) {
+			return $dbStore->getModel($baseURI);
+        }
+
+		return $dbStore->getNewModel($baseURI);
+	}
+
+	/**
+	* Returns a database connection with the given parameters.
+	* Paramters, which are not defined are taken from the constants.php
+	*
+	* @param   string   $dbDriver
+	* @param   string   $host
+	* @param   string   $dbName
+	* @param   string   $user
+	* @param   string   $password
+	* @return	object	DbStore
+	* @access	public
+	*/
+	function & getDbStore($dbDriver=ADODB_DB_DRIVER, $host=ADODB_DB_HOST, $dbName=ADODB_DB_NAME,
+                   		$user=ADODB_DB_USER, $password=ADODB_DB_PASSWORD)
+	{
+		$dbs = new DbStore($dbDriver, $host, $dbName,$user, $password);
+		return $dbs;
+	}
+
+	/**
+	* Returns a InfModelF.
+	* (MemModel with forward chaining inference engine)
+	* Configurations can be done in constants.php
+	* You can supply a base URI
+	*
+	* @param   string  $baseURI
+	* @return	object	MemModel
+	* @access	public
+	*/
+	function & getInfModelF($baseURI = null)
+	{
+        require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php';
+		$mod = new InfModelF($baseURI);
+		return $mod;
+	}
+
+	/**
+	* Returns a InfModelB.
+	* (MemModel with backward chaining inference engine)
+	* Configurations can be done in constants.php
+	* You can supply a base URI
+	*
+	* @param   string  $baseURI
+	* @return	object	MemModel
+	* @access	public
+	*/
+	function & getInfModelB($baseURI = null)
+	{
+        require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelB.php';
+		$mod = new InfModelB($baseURI);
+		return $mod;
+	}
+
+	/**
+	* Returns a ResModel.
+	* $modelType has to be one of the following constants:
+	* MEMMODEL,DBMODEL,INFMODELF,INFMODELB to create a resmodel with a new
+	* model from defined type.
+	* You can supply a base URI
+	*
+	* @param   constant  $modelType
+	* @param   string  $baseURI
+	* @return	object	ResModel
+	* @access	public
+	*/
+	function & getResModel($modelType, $baseURI = null)
+	{
+		switch ($modelType) {
+			case DBMODEL:
+				$baseModel = ModelFactory::getDefaultDbModel($baseURI);
+				break;
+
+			case INFMODELF:
+				$baseModel = ModelFactory::getInfModelF($baseURI);
+				break;
+
+			case INFMODELB:
+				$baseModel = ModelFactory::getInfModelB($baseURI);
+				break;
+
+			default:
+				$baseModel = ModelFactory::getMemModel($baseURI);
+				break;
+		}
+		return ModelFactory::getResModelForBaseModel($baseModel);
+	}
+
+	/**
+	* Creates a ResModel that wraps an existing base model.
+	*
+	* @param   	object  Model	$baseModel
+	* @return	object	ResModel
+	* @access	public
+	*/
+    function &getResModelForBaseModel(&$baseModel) {
+        require_once RDFAPI_INCLUDE_DIR . 'resModel/ResModel.php';
+        $mod = new ResModel($baseModel);
+        return $mod;
+    }
+
+	/**
+	* Returns an OntModel.
+	* $modelType has to be one of the following constants:
+	* MEMMODEL, DBMODEL, INFMODELF, INFMODELB to create a OntModel
+	* with a new model from defined type.
+	* $vocabulary defines the ontology language. Currently only
+	* RDFS_VOCABULARY is supported. You can supply a model base URI.
+	*
+	* @param   	constant  	$modelType
+	* @param   	constant  	$vocabulary
+	* @param   	string  	$baseURI
+	* @return	object		OntModel
+	* @access	public
+	*/
+	function & getOntModel($modelType,$vocabulary, $baseURI = null)
+	{
+		switch ($modelType)
+		{
+			case DBMODEL:
+				$baseModel = ModelFactory::getDefaultDbModel($baseURI);
+				break;
+
+			case INFMODELF:
+				$baseModel = ModelFactory::getInfModelF($baseURI);
+				break;
+
+			case INFMODELB:
+				$baseModel = ModelFactory::getInfModelB($baseURI);
+				break;
+
+			default:
+				$baseModel = ModelFactory::getMemModel($baseURI);;
+		}
+
+        $mod = ModelFactory::getOntModelForBaseModel($baseModel, $vocabulary);
+        return $mod;
+	}
+
+	/**
+	* Creates an OntModel that wraps an existing base model.
+	* $vocabulary defines the ontology language. Currently only
+	* RDFS_VOCABULARY is supported.
+	*
+	* @param   	object  Model	$baseModel
+	* @param   	constant  	$vocabulary
+	* @return	object		OntModel
+	* @access	public
+	*/
+	function &getOntModelForBaseModel(&$baseModel, $vocabulary)
+	{
+        require_once RDFAPI_INCLUDE_DIR . 'ontModel/OntModel.php';
+
+		switch ($vocabulary)
+		{
+			case RDFS_VOCABULARY:
+				require_once(RDFAPI_INCLUDE_DIR.'ontModel/'.RDFS_VOCABULARY);
+				$vocab_object = new RdfsVocabulary();
+				break;
+			default:
+                trigger_error("Unknown vocabulary constant '$vocabulary'; only RDFS_VOCABULARY is supported", E_USER_WARNING);
+                $vocab_object = null;
+				break;
+		}
+		$mod = new OntModel($baseModel, $vocab_object);
+		return $mod;
+	}
+
+
+
+	/**
+	* Creates a SparqlClient.
+	*
+	* @param   	String  $server	Link to a SPARQL endpoint.
+	* @return	SparqlClient the SparqlClient object.
+	* @access	public
+	*/
+	function & getSparqlClient($server){
+		$cl = new SparqlClient($server);
+		return $cl;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/model/ModelP.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/ModelP.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/ModelP.php	(revision 225)
@@ -0,0 +1,27 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Model
+// ----------------------------------------------------------------------------------
+//
+// Description               : Model package
+//
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+// Include Model classes
+require_once( RDFAPI_INCLUDE_DIR . 'model/Node.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/Literal.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/Resource.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/Blanknode.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/Statement.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/Model.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/MemModel.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/DbStore.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'util/StatementIterator.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'model/ModelFactory.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlClient.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/ClientQuery.php' );
+
+?>
Index: Dev/branches/Demo/rdfapi/model/Node.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/Node.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/Node.php	(revision 225)
@@ -0,0 +1,25 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . '/util/Object.php';
+
+// ----------------------------------------------------------------------------------
+// Class: Node
+// ----------------------------------------------------------------------------------
+
+/**
+ * An abstract RDF node.
+ * Can either be resource, literal or blank node.
+ * Node is used in some comparisons like is_a($obj, "Node"),
+ * meaning is $obj a resource, blank node or literal.
+ *
+ *
+ * @version $Id: Node.php 348 2007-03-12 10:04:10Z cweiske $
+ * @author Chris Bizer <chris@bizer.de>
+ * @package model
+ * @abstract
+ *
+ */
+ class Node extends Object {
+ } // end:RDFNode
+
+
+?>
Index: Dev/branches/Demo/rdfapi/model/Resource.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/Resource.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/Resource.php	(revision 225)
@@ -0,0 +1,143 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'model/Node.php';
+
+// ----------------------------------------------------------------------------------
+// Class: Resource
+// ----------------------------------------------------------------------------------
+
+/**
+ * An RDF resource.
+ * Every RDF resource must have a URIref.
+ * URIrefs are treated as logical constants, i.e. as names which denote something
+ * (the things are called 'resources', but no assumptions are made about the nature of resources.)
+ * Many RDF resources are pieces of vocabulary. They typically have a namespace
+ * and a local name. In this case, a URI is composed as a
+ * concatenation of the namespace and the local name.
+ *
+ *
+ * @version  $Id: Resource.php 453 2007-06-20 21:19:09Z cweiske $
+ * @author Chris Bizer <chris@bizer.de>
+ *
+ * @package model
+ * @access	public
+ *
+ */
+ class Resource extends Node {
+
+ 	/**
+	* URIref to the resource
+	* @var		string
+	* @access	private
+	*/
+    var $uri;
+
+
+   /**
+    * Constructor
+	* Takes an URI or a namespace/localname combination
+    *
+    * @param	string	$namespace_or_uri
+ 	* @param string $localName
+	* @access	public
+    */
+    function Resource($namespace_or_uri , $localName = NULL) {
+		if ($localName == NULL) {
+			$this->uri = $namespace_or_uri;
+	  	} else {
+			$this->uri = $namespace_or_uri . $localName;
+  	    }
+	}
+
+
+  /**
+   * Returns the URI of the resource.
+   * @return string
+   * @access	public
+   */
+  function getURI() {
+  			return $this->uri;
+   }
+
+	/**
+	 * Returns the label of the resource, which is the URI of the resource.
+     * @access	public
+	 * @return string
+	 */
+    function getLabel() {
+    	return $this->getURI();
+    }
+
+  /**
+   * Returns the namespace of the resource. May return null.
+   * @access	public
+   * @return string
+   */
+  function getNamespace() {
+  	// Import Package Utility
+   	include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+	$rdfUtil = new RDFUtil();
+   	return $rdfUtil->guessNamespace($this->uri);
+  }
+
+  /**
+   * Returns the local name of the resource.
+   * @access	public
+   * @return string
+   */
+    function getLocalName() {
+    	// Import Package Utility
+   		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+		
+		$rdfUtil = new RDFUtil();		
+	    return $rdfUtil->guessName($this->uri);
+  	}
+
+  /**
+   * Dumps resource.
+   * @access	public
+   * @return string
+   */
+  function toString() {
+	return 'Resource("' . $this->uri .'")';
+  }
+
+  /**
+   * Checks if the resource equals another resource.
+   * Two resources are equal, if they have the same URI
+   *
+   * @access	public
+   * @param		object	resource $that
+   * @return	boolean
+   */
+   function equals ($that) {
+
+	    if ($this == $that) {
+	      return true;
+	    }
+
+	    if (($that == NULL) or !(is_a($that, 'Resource')) or (is_a($that, 'BlankNode'))) {
+	      return false;
+	    }
+
+		if ($this->getURI() == $that->getURI()) {
+	      return true;
+	    }
+
+	    return false;
+	}
+
+
+
+
+    /**
+    *   Doing string magic in PHP5
+    *   @return string String representation of this Resource
+    */
+    function __toString()
+    {
+        return $this->toString();
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/model/Statement.php
===================================================================
--- Dev/branches/Demo/rdfapi/model/Statement.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/model/Statement.php	(revision 225)
@@ -0,0 +1,313 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: Statement
+// ----------------------------------------------------------------------------------
+
+/**
+ * An RDF statement.
+ * In this implementation, a statement is not itself a resource. 
+ * If you want to use a a statement as subject or object of other statements,
+ * you have to reify it first.
+ *  
+ * @author Chris Bizer <chris@bizer.de>
+ * @version  $Id: Statement.php 268 2006-05-15 05:28:09Z tgauss $
+ * @package model
+ */
+class Statement extends Object {
+	
+	/**
+	* Subject of the statement
+	*
+	* @var		object resource	
+	* @access	private
+	*/	
+	 var $subj;
+
+	/**
+	* Predicate of the statement
+	*
+	* @var		object resource	
+	* @access	private
+	*/		
+    var $pred;
+	
+  	/**
+	* Object of the statement
+	*
+	* @var		object node	
+	* @access	private
+	*/		
+    var $obj;
+
+  /**
+   * The parameters to constructor are instances of classes and not just strings
+   *
+   * @param	object	node $subj
+   * @param	object	node $pred
+   * @param	object	node $obj
+	* @throws	PhpError
+   */
+  function Statement($subj, $pred, $obj) {
+
+    if (!is_a($subj, 'Resource')) {
+		$errmsg = RDFAPI_ERROR . 
+		          '(class: Statement; method: new): Resource expected as subject.';
+		trigger_error($errmsg, E_USER_ERROR); 
+	}
+	if (!is_a($pred, 'Resource') || is_a($pred, 'BlankNode')) {
+		$errmsg = RDFAPI_ERROR . 
+		          '(class: Statement; method: new): Resource expected as predicate, no blank node allowed.';
+		trigger_error($errmsg, E_USER_ERROR); 
+	}
+	if (!(is_a($obj, 'Resource') or is_a($obj, 'Literal'))) {
+		$errmsg = RDFAPI_ERROR . 
+		          '(class: Statement; method: new): Resource or Literal expected as object.';
+		trigger_error($errmsg, E_USER_ERROR); 
+	}
+		
+	$this->pred = $pred;
+    $this->subj = $subj;
+    $this->obj = $obj;
+  }
+
+  /**
+   * Returns the subject of the triple.
+   * @access	public 
+   * @return	object node
+   */
+  function getSubject() {
+    return $this->subj;
+  }
+
+  /**
+   * Returns the predicate of the triple.
+   * @access	public 
+   * @return	object node
+   */
+    function getPredicate() {
+    return $this->pred;
+  }
+
+  /**
+   * Returns the object of the triple.
+   * @access	public 
+   * @return	object node
+   */
+   function getObject() {
+     return $this->obj;
+   }
+  
+  /**
+   * Alias for getSubject()
+   * @access	public 
+   * @return	object node
+   */
+  function subject() {
+    return $this->subj;
+  }
+
+  /**
+   * Alias for getPredicate()
+   * @access	public 
+   * @return	object node
+   */
+    function predicate() {
+    return $this->pred;
+  }
+
+  /**
+   * Alias for getObject()
+   * @access	public 
+   * @return object node
+   */
+   function object() {
+     return $this->obj;
+   }
+    /**
+   * Retruns the hash code of the triple.	
+   * @access	public 
+   * @return string
+   */
+   function hashCode()  {
+      return md5($this->subj->getLabel() . $this->pred->getLabel()  . $this->obj->getLabel());
+   }
+
+  /**
+   * Dumps the triple.	
+   * @access	public 
+   * @return string
+   */  
+
+  function toString() { 
+    return  'Triple(' . $this->subj->toString() . ', ' . $this->pred->toString() . ', ' . $this->obj->toString() . ')';
+	
+  }
+
+  /**
+   * Returns a toString() serialization of the statements's subject.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+   function toStringSubject() {
+       return $this->subj->toString();
+   }
+
+  /**
+   * Returns a toString() serialization of the statements's predicate.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+   function toStringPredicate() {
+       return $this->pred->toString();
+   }
+
+  /**
+   * Reurns a toString() serialization of the statements's object.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+   function toStringObject() {
+       return $this->obj->toString();
+   }
+
+  /**
+   * Returns the URI or bNode identifier of the statements's subject.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+   function getLabelSubject() {
+       return $this->subj->getLabel();
+   }
+
+  /**
+   * Returns the URI of the statements's predicate.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+   function getLabelPredicate() {
+       return $this->pred->getLabel();
+   }
+
+  /**
+   * Reurns the URI, text or bNode identifier of the statements's object.
+   *
+   * @access	public 
+   * @return	string 
+   */  
+   function getLabelObject() {
+       return $this->obj->getLabel();
+   }
+  
+  /**
+   * Checks if two statements are equal.
+   * Two statements are considered to be equal if they have the
+   * same subject, predicate and object. A statement can only be equal 
+   * to another statement object. 
+   * @access	public 
+   * @param		object	statement $that
+   * @return	boolean 
+   */  
+
+  function equals ($that) {
+    
+	    if ($this == $that) {
+	      return true;
+	    }
+	    if ($that == NULL || !(is_a($that, 'Statement'))) {
+	      return false;
+	    }
+  
+	    return
+		$this->subj->equals($that->subject()) &&
+		$this->pred->equals($that->predicate()) &&
+		$this->obj->equals($that->object());
+	  }
+
+  /**
+   * Compares two statements and returns integer less than, equal to, or greater than zero.
+   * Can be used for writing sorting function for models or with the PHP function usort(). 
+   *
+   * @access	public 
+   * @param		object	statement &$that
+   * @return	boolean 
+   */  
+
+  function compare(&$that) {
+	  return statementsorter($this, $that);
+	  // statementsorter function see below
+  } 
+      
+	  
+  /**
+   * Reifies a statement.
+   * Returns a new MemModel that is the reification of the statement.
+   * For naming the statement's bNode a Model or bNodeID must be passed to the method.   
+   *
+   * @access	public 
+   * @param		mixed	&$model_or_bNodeID
+   * @return	object	model
+   */  
+
+  function & reify(&$model_or_bNodeID) {
+		
+		if (is_a($model_or_bNodeID, 'MemModel')) {
+			// parameter is model
+			$statementModel = new MemModel($model_or_bNodeID->getBaseURI());
+			$thisStatement = new BlankNode($model_or_bNodeID);
+		} else {
+			// parameter is bNodeID
+			$statementModel = new MemModel();
+			$thisStatement = &$model_or_bNodeID;
+		} 
+		
+		$RDFstatement = new Resource(RDF_NAMESPACE_URI . RDF_STATEMENT);
+		$RDFtype = new Resource(RDF_NAMESPACE_URI . RDF_TYPE);
+		$RDFsubject = new Resource(RDF_NAMESPACE_URI . RDF_SUBJECT);
+		$RDFpredicate = new Resource(RDF_NAMESPACE_URI . RDF_PREDICATE);
+		$RDFobject = new Resource(RDF_NAMESPACE_URI . RDF_OBJECT);
+		
+		$statementModel->add(new Statement($thisStatement, $RDFtype, $RDFstatement));
+		$statementModel->add(new Statement($thisStatement, $RDFsubject, $this->getSubject()));
+		$statementModel->add(new Statement($thisStatement, $RDFpredicate, $this->getPredicate()));
+		$statementModel->add(new Statement($thisStatement, $RDFobject, $this->Object()));
+		
+		return $statementModel;
+  }
+  
+} // end: Statement
+
+
+/**
+* Comparison function for comparing two statements.
+* statementsorter() is used by the PHP function usort ( array array, callback cmp_function)
+*
+* @access	private 
+* @param		object Statement	$a
+* @param		object Statement	$b
+* @return	integer less than, equal to, or greater than zero  
+* @throws phpErrpr
+*/  
+function statementsorter($a,$b) {
+	  //Compare subjects
+	  $x=$a->getSubject();
+	  $y=$b->getSubject();
+	  $r=strcmp($x->getLabel(),$y->getLabel());
+	  if ($r!=0) return $r;
+	  //Compare predicates
+	  $x=$a->getPredicate();
+	  $y=$b->getPredicate();
+	  $r=strcmp($x->getURI(),$y->getURI());
+	  if ($r!=0) return $r;
+	  //Final resort, compare objects
+	  $x=$a->getObject();
+	  $y=$b->getObject();
+	  return strcmp($x->toString(),$y->toString());
+}
+	
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/Individual.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/Individual.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/Individual.php	(revision 225)
@@ -0,0 +1,39 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: Individual
+// ----------------------------------------------------------------------------------
+
+
+
+/**
+* Interface that encapsulates an individual in an ontology, sometimes referred
+* to as a fact or assertion.
+* In order to be recognised as an individual, rather than a generic resource, 
+* at least one rdf:type statement, referring to a known class, must be present 
+* in the model.
+*
+
+* @version  $Id: Individual.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/	
+
+class Individual extends OntResource   
+{
+	
+	/**
+    * Constructor
+	* You can supply a uri
+    *
+    * @param string $uri 
+	* @access	public
+    */		
+	function Individual($uri = null)
+	{
+		parent::OntResource($uri);
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OWLVocabulary.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OWLVocabulary.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OWLVocabulary.php	(revision 225)
@@ -0,0 +1,369 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: OWLVocabulary
+// ----------------------------------------------------------------------------------
+
+/**
+* OWL vocabulary items
+*
+* @version  $Id: OWLVocabulary.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+class OWLVocabulary extends OntVocabulary 
+{
+
+	/**
+	* Answer the resource that represents the class 'class' in this vocabulary.
+	*
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function ONTCLASS()
+	{
+		return new ResResource(OWL_NS.'Class');	
+	}
+
+	/**
+	* Answer the predicate that denotes the domain of a property.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function DOMAIN()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN);	
+	}
+	
+	 
+ 	/**
+	* Answer the predicate that denotes comment annotation on an ontology element.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function COMMENT()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT);	
+	}
+	
+ 	/**
+	* Answer the predicate that denotes isDefinedBy annotation on an ontology element
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function IS_DEFINED_BY()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY);
+	}
+	
+	/**
+	* Answer the predicate that denotes label annotation on an ontology element
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function LABEL()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL);
+	}
+	
+	/**
+	* Answer the predicate that denotes the domain of a property.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function RANGE()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE);
+	}
+	
+	/**
+	* Answer the predicate that denotes seeAlso annotation on an ontology element
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function SEE_ALSO()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO);
+	}
+	
+	/**
+	* Answer the predicate that denotes that one class is a sub-class of another.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function SUB_CLASS_OF()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF);
+	}
+	
+	/**
+	* Answer the predicate that denotes that one property is a sub-property of another.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function SUB_PROPERTY_OF()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF);
+	}
+	
+	
+	
+	function ANNOTATION_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'AnnotationProperty');	
+	}
+
+	function ALL_DIFFERENT()
+	{
+		return new ResProperty(OWL_NS . 'AllDifferent');	
+	}
+	
+	function ALL_VALUES_FROM()
+	{
+		return new ResProperty(OWL_NS . 'allValuesFrom');
+	}
+
+	function BACKWARD_COMPATIBLE_WITH()
+	{
+		return new ResProperty(OWL_NS . 'backwardCompatibleWith');
+	}
+	
+	function CARDINALITY()
+	{
+		return new ResProperty(OWL_NS . 'cardinality');
+	}
+
+	function COMPLEMENT_OF()
+	{
+		return new ResProperty(OWL_NS . 'complementOf');
+	}
+	
+	function DATATYPE()
+	{
+		return new ResProperty(OWL_NS . 'Datatype');
+	}
+	
+	function DATATYPE_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'DatatypeProperty');
+	}
+
+	function DATA_RANGE()
+	{
+		return new ResProperty(OWL_NS . 'DataRange');
+	}
+
+	function DATATYPE_RESTRICTION()
+	{
+		return new ResProperty(OWL_NS . 'DatatypeRestriction');
+	}
+
+	function DEPRECATED_CLASS()
+	{
+		return new ResProperty(OWL_NS . 'DeprecatedClass');
+	}
+
+	function DEPRECATED_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'DeprecatedProperty');
+	}
+
+	function DISTINCT_MEMBERS()
+	{
+		return new ResProperty(OWL_NS . 'distinctMembers');
+	}
+
+	function DIFFERENT_FROM()
+	{
+		return new ResProperty(OWL_NS . 'differentFrom');
+	}
+
+	function DISJOINT_WITH()
+	{
+		return new ResProperty(OWL_NS . 'disjointWith');
+	}
+
+	function EQUIVALENT_CLASS()
+	{
+		return new ResProperty(OWL_NS . 'equivalentClass');
+	}
+
+	function EQUIVALENT_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'equivalentProperty');
+	}
+
+	function FUNCTIONAL_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'FunctionalProperty');
+	}
+
+	function HAS_VALUE()
+	{
+		return new ResProperty(OWL_NS . 'hasValue');
+	}
+
+	function INCOMPATIBLE_WITH()
+	{
+		return new ResProperty(OWL_NS . 'incompatibleWith');
+	}
+
+	function IMPORTS()
+	{
+		return new ResProperty(OWL_NS . 'imports');
+	}
+
+	function INTERSECTION_OF()
+	{
+		return new ResProperty(OWL_NS . 'intersectionOf');
+	}
+
+	function INVERSE_FUNCTIONAL_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'InverseFunctionalProperty');
+	}
+
+	function INVERSE_OF()
+	{
+		return new ResProperty(OWL_NS . 'inverseOf');
+	}
+
+	function MAX_CARDINALITY()
+	{
+		return new ResProperty(OWL_NS . 'maxCardinality');
+	}
+
+	function MIN_CARDINALITY()
+	{
+		return new ResProperty(OWL_NS . 'minCardinality');
+	}
+
+	function NOTHING()
+	{
+		return new ResProperty(OWL_NS . 'Nothing');
+	}
+
+	function OBJECT_CLASS()
+	{
+		return new ResProperty(OWL_NS . 'ObjectClass');
+	}
+
+	function OBJECT_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'ObjectProperty');
+	}
+
+	function OBJECT_RESTRICTION()
+	{
+		return new ResProperty(OWL_NS . 'ObjectRestriction');
+	}
+
+	function ONE_OF()
+	{
+		return new ResProperty(OWL_NS . 'oneOf');
+	}
+
+	function ON_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'onProperty');
+	}
+
+	function ONTOLOGY()
+	{
+		return new ResProperty(OWL_NS . 'Ontology');
+		
+	}
+
+	function PRIOR_VERSION()
+	{
+		return new ResProperty(OWL_NS . 'priorVersion');
+	}
+
+	function PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'Property');
+	}
+
+	function RESTRICTION()
+	{
+		return new ResProperty(OWL_NS . 'Restriction');
+	}
+
+	function SAME_AS()
+	{
+		return new ResProperty(OWL_NS . 'sameAs');
+	}
+
+	function SAME_CLASS_AS()
+	{
+		return new ResProperty(OWL_NS . 'sameClassAs');
+	}
+
+	function SAME_INDIVIDUAL_AS()
+	{
+		return new ResProperty(OWL_NS . 'sameIndividualAs');
+	}
+
+	function SAME_PROPERTY_AS()
+	{
+		return new ResProperty(OWL_NS . 'samePropertyAs');
+	}
+
+	function SOME_VALUES_FROM()
+	{
+		return new ResProperty(OWL_NS . 'someValuesFrom');
+	}
+
+	function SYMMETRIC_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'SymmetricProperty');
+	}
+
+	function THING()
+	{
+		return new ResProperty(OWL_NS . 'Thing');
+	}
+
+	function TRANSITIVE_PROPERTY()
+	{
+		return new ResProperty(OWL_NS . 'TransitiveProperty');
+	}
+
+	function UNION_OF()
+	{
+		return new ResProperty(OWL_NS . 'unionOf');
+	}
+
+	function VERSION_INFO()
+	{
+		return new ResProperty(OWL_NS . 'versionInfo');
+	}
+
+	function NAMESPACE()
+	{
+		return OWL_NS;
+	}
+
+	/**
+	* Answer the predicate that denotes the rdf:type property.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function TYPE()
+	{
+		return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE);
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OntClass.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OntClass.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OntClass.php	(revision 225)
@@ -0,0 +1,285 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: OntClass
+// ----------------------------------------------------------------------------------
+
+
+
+/**
+* Class that represents an ontology node characterising a class description.
+*
+* @version  $Id: OntClass.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+class OntClass extends OntResource 
+{
+	/**
+    * Constructor
+	* You can supply a uri
+    *
+    * @param string $uri 
+	* @access	public
+    */		
+	function OntClass($uri = null)
+	{
+		parent::OntResource($uri);
+	}
+
+	/**
+	* Add a sub-class of this class.
+	*
+   	* @param	object ResResource		$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addSubClass($resResource)
+	{
+		return $resResource->addProperty($this->vocabulary->SUB_CLASS_OF(),$this);
+	}
+	
+	/**
+	* Add a super-class of this class.
+	*
+   	* @param	object ResResource		$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addSuperClass($resResource)
+	{
+		return $this->addProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
+	}
+	
+	/**
+	* Answer a class that is the sub-class of this class. 
+	* If there is more than one such class, an arbitrary selection is made.
+	*
+   	* @return	object OntClass or NULL
+   	* @access	public
+   	*/
+	function getSubClass()
+	{
+		$statement = $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_CLASS_OF(),$this);
+		if ($statement !== null)
+			return $this->model->createOntClass($statement->getLabelSubject());
+		
+		return null;
+	}
+	
+	/**
+	* Answer a class that is the super-class of this class. 
+	* If there is more than one such class, an arbitrary selection is made.
+	*
+   	* @return	object OntClass or NULL
+   	* @access	public
+   	*/
+	function getSuperClass()
+	{
+		return $this->getPropertyValue($this->vocabulary->SUB_CLASS_OF(),'OntClass');
+	}
+	
+	/**
+	* Answer true if the given class is a sub-class of this class.
+	* $direct - If true, only search the classes that are directly 
+	* adjacent to this class in the class hierarchy. 
+	*
+   	* @param	object ResResource		$resResource
+  	* @param	boolean			$direct
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasSubclass($resResource, $direct = true)
+	{
+		if ($direct)
+			return $resResource->hasProperty($this->vocabulary->SUB_CLASS_OF(),$this);
+		
+		$index=array();
+		return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource) === true);
+	}
+	
+	/**
+	* Answer true if the given class is a super-class of this class.
+	* $direct - If true, only search the classes that are directly 
+	* adjacent to this class in the class hierarchy. 
+	*
+   	* @param	object ResResource		$resResource
+  	* @param	boolean			$direct
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasSuperClass($resResource, $direct = true)
+	{
+		if ($direct)
+			return $this->hasProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
+		
+		$index=array();
+		return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index,$resResource) === true);
+	}
+	
+	/**
+	* Answer an ResIterator over the individuals in the model that have this class 
+	* among their types.
+	*
+   	* @return	object ResIterator 
+   	* @access	public
+   	*/
+	function listInstances()
+	{
+		/*
+		$statements= $this->model->find(null,$this->vocabulary->TYPE(),$this);
+		$return = array();
+		$returnIndex=array();
+		foreach ($statements as $statement) 
+		{
+			$subjectLabel=$statement->getLabelSubject();
+			if (!in_array($subjectLabel,$returnIndex))
+			{
+				$returnIndex[]=$subjectLabel;
+				$return[]=$statement->getSubject();
+			}	
+		}	
+		return $return;	
+		*/
+		return new ResIterator(null,$this->vocabulary->TYPE(),$this,'s',$this->model,'Individual');
+	
+	}
+	
+	/**
+	* Answer an array over the classes that are declared to be sub-classes of this class. 
+	* Each element of the array will be an OntClass.
+	* $direct - If true, only search the classes that are directly 
+	* adjacent to this class in the class hierarchy. 
+	*
+   	* @param	boolean		$direct
+   	* @return	array 
+   	* @access	public
+   	*/
+	function listSubClasses($direct = true)
+	{
+		$return = array();
+		if ($direct)
+		{
+			$statements = $this->model->find(null,$this->vocabulary->SUB_CLASS_OF(),$this);
+		} else 
+		{
+			$index = array();
+			$statements = $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index);
+		}
+		
+		$returnIndex=array();
+		foreach ($statements as $statement) 
+		{
+			$subjectLabel=$statement->getLabelSubject();
+			if (!in_array($subjectLabel,$returnIndex))
+			{
+				$returnIndex[]=$subjectLabel;
+				$return[]=$this->model->createOntClass($subjectLabel);
+			}	
+		}	
+		return $return;	
+	}
+	
+	/**
+	* Answer an array over the classes that are declared to be super-classes of this class. 
+	* Each element of the array will be an OntClass.
+	* $direct - If true, only search the classes that are directly 
+	* adjacent to this class in the class hierarchy. 
+	*
+   	* @param	boolean		$direct
+   	* @return	array 
+   	* @access	public
+   	*/
+	function listSuperClasses($direct = true)
+	{
+		$return = array();
+		if ($direct)
+			return $this->listProperty($this->vocabulary->SUB_CLASS_OF(),'OntClass');
+			
+		$index=array();	
+		$statements = $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_CLASS_OF(),$index);
+		$returnIndex=array();
+		foreach ($statements as $statement) 
+		{
+			$objectLabel=$statement->getLabelObject();
+			if (!in_array($objectLabel,$returnIndex))
+			{
+				$returnIndex[]=$objectLabel;
+				$return[]=$this->model->createOntClass($objectLabel);
+			}	
+		}	
+		return $return;	
+	}
+	
+	/**
+	* Remove the given class from the sub-classes of this class.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeSubClass($resResource)
+	{
+		return	$this->model->remove(new Statement($resResource,$this->vocabulary->SUB_CLASS_OF(),$this));
+	}
+	
+	/**
+	* Remove the given class from the super-classes of this class.
+	*
+   	* @param	object ResResource		$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeSuperClass($resResource)
+	{
+		return $this->removeProperty($this->vocabulary->SUB_CLASS_OF(),$resResource);
+	}
+	
+	/**
+	* Assert that this class is super-class of the given class. 
+	* Any existing statements for subClassOf on prop will be removed.
+	*
+   	* @param	object ResResource		$resResource
+   	* @access	public
+   	*/
+	function setSubClass($resResource)
+	{
+		foreach ($this->listSubClasses() as $oldRes) 
+		{
+			$this->removeSubClass($oldRes);
+		}
+		$this->addSubClass($resResource);
+	}
+	
+	/**
+	* Assert that this class is sub-class of the given class. 
+	* Any existing statements for subClassOf on prop will be removed.
+	*
+   	* @param	object ResResource		$resResource
+   	* @access	public
+   	*/
+	function setSuperClass($resResource)
+	{
+		$this->setPropertyValue($this->vocabulary->SUB_CLASS_OF(),$resResource);
+	}
+	
+	/**
+	* Answer a resource that represents an instance of this OntClass and Individual
+	* node in this model.
+	* If a resource with the given uri exists in the model, it will be re-used. 
+	* If not, a new one is created in the updateable sub-model of the ontology model.
+	*
+   	* @param	string	$uri
+   	* @return	object Individual 
+   	* @access	public
+   	*/	
+	function createInstance($uri = null)
+	{
+		$instance = $this->model->createIndividual($uri);
+		$instance->setInstanceRdfType($this);
+		return $instance;
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OntModel.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OntModel.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OntModel.php	(revision 225)
@@ -0,0 +1,169 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: OntModel
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Enhanced view of the model that is known to contain ontology data, under a
+* given ontology vocabulary (such as RDFS). OntModel together with OntClass
+* and OntResource provide ontology specific methods like addSubClass(),
+* listSubClasses(), hasSuperProperty(), addDomain() and  listInstances(). This class does not by 
+* itself compute the deductive extension of the graph under the semantic 
+* rules of the language. Instead, we wrap an underlying model with this 
+* ontology interface, that presents a convenience syntax for accessing the 
+* language elements. Depending on the inference capability of the underlying 
+* model, the OntModel will appear to contain more or less triples. 
+* For example, if this class is used to wrap a MemModel or DBModel, only the 
+* relationships asserted by the document will be reported through this 
+* convenience API. 
+* Alternatively, if the OntModel wraps an InfModel (InfModelF / InfModelB), 
+* the inferred triples from the extension will be reported as well. 
+*
+*
+* @version  $Id: OntModel.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+class OntModel extends ResModel 
+{
+	/**
+	* Holds a reference to the assoiated vocabulary.
+	* @var		object
+	* @access	private
+	*/
+	var $vocabulary;
+	
+	
+	/**
+    * Constructor.
+	* You have to supply a memmodel/dbmodel/infmodel to save the statements and a vocabulary
+    *
+    * @param object Model $model 
+	* @access	public
+    */	
+	function OntModel(& $model,& $vocabulary)
+	{
+		parent::ResModel($model);
+		$this->vocabulary = & $vocabulary;
+	}
+	
+	/**
+	* Answer a resource that represents a class description node in this model. 
+	* If a resource with the given uri exists in the model, it will be re-used. 
+	* If not, a new one is created in the updateable sub-model of the ontology model.
+	*
+   	* @param	string	$uri
+   	* @return	object OntClass 
+   	* @access	public
+   	*/
+	function createOntClass($uri = null)
+	{
+		$class = new OntClass($uri);
+		$class->setAssociatedModel($this);
+		$class->setVocabulary($this->vocabulary);
+		$class->setInstanceRdfType($this->vocabulary->ONTCLASS());
+		return $class;
+	}
+	
+	/**
+	* Answer a resource that represents an Individual node in this model.
+	* If a resource with the given uri exists in the model, it will be re-used. 
+	* If not, a new one is created in the updateable sub-model of the ontology model.
+	*
+   	* @param	string	$uri
+   	* @return	object Individual 
+   	* @access	public
+   	*/
+	function createIndividual($uri = null)
+	{
+		$individual = new Individual($uri);
+		$individual->setAssociatedModel($this);
+		$individual->setVocabulary($this->vocabulary);
+		return $individual;
+	}
+	
+	/**
+	* Answer a resource that represents an OntProperty node in this model.
+	* If a resource with the given uri exists in the model, it will be re-used. 
+	* If not, a new one is created in the updateable sub-model of the ontology model.
+	*
+   	* @param	string	$uri
+   	* @return	object OntProperty 
+   	* @access	public
+   	*/
+	function createOntProperty($uri = null)
+	{
+		$ontProperty = new OntProperty($uri);
+		$ontProperty->setAssociatedModel($this);
+		$ontProperty->setVocabulary($this->vocabulary);
+		$ontProperty->setInstanceRdfType($this->createResource(RDF_NAMESPACE_URI.RDF_PROPERTY));
+		return $ontProperty;	
+	}
+	
+	/**
+	* Answer an array that ranges over all of the various forms of class 
+	* description resource in this model. 
+	* Class descriptions include  domain/range definitions, named  classes and subClass constructs.
+	*
+   	* @return	array of object ResResource 
+   	* @access	public
+   	*/
+	function listClasses()
+	{
+		//get all statements, with an rdf:type as property
+		$statements= $this->find(null,$this->vocabulary->TYPE(),null);
+		$return = array();
+		$returnIndex=array();
+		foreach ($statements as $statement) 
+		{
+			$objectLabel=$statement->getLabelObject();
+			//if it's about a typed Individual	
+			if ($objectLabel!=RDF_SCHEMA_URI.RDFS_CLASS)
+			{
+				if (!in_array($objectLabel,$returnIndex))
+				{
+					$returnIndex[]=$objectLabel;
+					$return[]=$statement->getObject();
+				}
+			} else 
+			//if it's a "class1 rdf:type rdf:class" construct
+			{
+				$subjectLabel=$statement->getLabelSubject();
+				if (!in_array($subjectLabel,$returnIndex))
+				{
+					$returnIndex[]=$subjectLabel;
+					$return[]=$statement->getSubject();
+				}
+			}	
+		}
+		//find all statements about SubClassConstructs
+		$statements= $this->find(null,$this->vocabulary->SUB_CLASS_OF(),null);
+		foreach ($statements as $statement) 
+		{
+			//add the statements object to the result
+			$objectLabel=$statement->getLabelObject();
+			if (!in_array($objectLabel,$returnIndex))
+			{
+				$returnIndex[]=$objectLabel;
+				$return[]=$statement->getObject();
+			}	
+		}	
+		foreach ($statements as $statement) 
+		{
+			//add the statements subject to the result
+			$objectLabel=$statement->getLabelSubject();
+			if (!in_array($objectLabel,$returnIndex))
+			{
+				$returnIndex[]=$objectLabel;
+				$return[]=$statement->getSubject();
+			}	
+		}
+		return $return;	
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OntModelP.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OntModelP.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OntModelP.php	(revision 225)
@@ -0,0 +1,24 @@
+<?php
+/**
+* ----------------------------------------------------------------------------------
+* OntModel Package
+* ----------------------------------------------------------------------------------
+*
+* Description               : OntModel package
+*
+* Author: Daniel Westphal	<mail at d-westphal dot de>
+* @package ontModel
+*
+* ----------------------------------------------------------------------------------
+*/
+// Include OntModel classes
+include_once( RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL);
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntVocabulary.php');
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/RdfsVocabulary.php');
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntModel.php');
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntResource.php');
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntProperty.php');
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/OntClass.php');
+require_once( RDFAPI_INCLUDE_DIR . 'ontModel/Individual.php');
+
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OntProperty.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OntProperty.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OntProperty.php	(revision 225)
@@ -0,0 +1,390 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: OntProperty
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Class encapsulating a property in an ontology.
+*
+* @version  $Id: OntProperty.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+
+class OntProperty extends OntResource    
+{
+	/**
+    * Constructor.
+	* You can supply a URI.
+    *
+    * @param string $uri 
+	* @access	public
+    */
+	function OntProperty($uri = null)
+	{
+		parent::OntResource($uri);
+	}
+	
+	/**
+	* Add a resource representing the domain of this property.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addDomain($resResource)
+	{
+		return $this->addProperty($this->vocabulary->DOMAIN(),$resResource);
+	}
+	
+	/**
+	* Add a resource representing the range of this property.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addRange($resResource)
+	{
+		return $this->addProperty($this->vocabulary->RANGE(),$resResource);
+	}
+	
+	/**
+	* Add a sub-property of this property.
+	*
+   	* @param	object ResProperty	$resProperty
+   	* @return	boolean 
+   	* @access	public
+   	*/	
+	function addSubProperty($resProperty)
+	{
+		return $resProperty->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$this);
+	}
+	
+	/**
+	* Add a super-property of this property.
+	*
+   	* @param	object ResProperty	$resProperty
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addSuperProperty($resProperty)
+	{
+		return $this->addProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
+	}
+	
+	/**
+	* Answer a OntClass that represents the domain class of this property. 
+	* If there is more than one such resource, an arbitrary selection is made.
+	*
+   	* @return	object OntClass 
+   	* @access	public
+   	*/
+	function getDomain()
+	{
+		return $this->getPropertyValue($this->vocabulary->DOMAIN(),'OntClass');
+	}
+
+	/**
+	* Answer a OntClass that represents the range class of this property. 
+	* If there is more than one such resource, an arbitrary selection is made.
+	*
+   	* @return	object OntClass 
+   	* @access	public
+   	*/
+	function getRange()
+	{
+		return $this->getPropertyValue($this->vocabulary->RANGE(),'OntClass');
+	}
+	
+	/**
+	* Answer a property that is the sub-property of this property. 
+	* If there is more than one such property, an arbitrary selection is made.
+	*
+   	* @return	object OntProperty 
+   	* @access	public
+   	*/
+	function getSubProperty()
+	{
+		$statement = $this->model->findFirstMatchingStatement(null,$this->vocabulary->SUB_PROPERTY_OF(),$this);
+		if ($statement !== null)
+			return new OntProperty($statement->getLabelSubject());
+		
+		return null;
+	}
+	
+	/**
+	* Answer a property that is the super-property of this property. 
+	* If there is more than one such property, an arbitrary selection is made.
+	*
+   	* @return	object OntProperty 
+   	* @access	public
+   	*/
+	function getSuperProperty()
+	{
+		return $this->getPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty');
+	}
+	
+	/**
+	* Answer true if the given resource a class specifying the domain of this property.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasDomain($resResource)
+	{
+		return $this->hasProperty($this->vocabulary->DOMAIN(),$resResource);
+	}
+	
+	/**
+	* Answer true if the given resource a class specifying the range of this property.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasRange($resResource)
+	{
+		return $this->hasProperty($this->vocabulary->RANGE(),$resResource);
+	}
+	
+	/**
+	* Answer true if the given property is a sub-property of this property.
+	* If $direct is set to true, only consider the direcly adjacent 
+	* properties in the property hierarchy
+	*
+   	* @param	object ResResource	$resProperty
+   	* @param	boolean	$direct
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasSubProperty($resProperty, $direct = true)
+	{
+		if ($direct)
+			return $resProperty->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$this);
+		
+		$index=array();
+		return ($this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty) === true);
+	}
+	
+	/**
+	* Answer true if the given property is a super-property of this property.
+	* If $direct is set to true, only consider the direcly adjacent 
+	* properties in the property hierarchy
+	*
+   	* @param	object ResResource	$resProperty
+   	* @param	boolean	$direct
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasSuperProperty($resProperty, $direct = true)
+	{
+		if ($direct)
+			return $this->hasProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
+		
+		$index=array();
+		return ($this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index,$resProperty) === true);
+	}
+	
+	/**
+	* Answer an array of all of the declared domain classes of this property. 
+	* Each element of the iterator will be an OntClass.
+	*
+   	* @return	array of OntClasses
+   	* @access	public
+   	*/
+	function listDomain()
+	{
+		return $this->listProperty($this->vocabulary->DOMAIN(),'OntClass');
+	}
+	
+	/**
+	* Answer an array of all of the declared range classes of this property. 
+	* Each element of the iterator will be an OntClass.
+	*
+   	* @return	array of OntClasses
+   	* @access	public
+   	*/
+	function listRange()
+	{
+		return $this->listProperty($this->vocabulary->RANGE(),'OntClass');
+	}
+	
+	/**
+	* Answer an array of all the properties that are declared to be 
+	* sub-properties of this property. Each element of the iterator will be an 
+	* OntProperty.
+	* If $direct is set to true, only consider the direcly adjacent 
+	* properties in the property hierarchy
+	*
+   	* @param	boolean	$direct
+   	* @return	array of OntProperties 
+   	* @access	public
+   	*/
+	function listSubProperties($direct = true)
+	{
+		$return = array();
+		if ($direct)
+		{
+			$statements = $this->model->find(null,$this->vocabulary->SUB_PROPERTY_OF(),$this);
+		} else 
+		{
+			$index = array();
+			$statements = $this->_getSubAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index);
+		}
+		
+		$returnIndex=array();
+		foreach ($statements as $statement) 
+		{
+			$objectLabel=$statement->getLabelSubject();
+			if (!in_array($objectLabel,$returnIndex))
+			{
+				$returnIndex[]=$objectLabel;
+				$return[]=new OntProperty($statement->getLabelSubject());
+			}	
+		}	
+		return $return;	
+	}
+	
+	/**
+	* Answer an array of all the properties that are declared to be 
+	* super-properties of this property. Each element of the iterator will be an 
+	* OntProperty.
+	* If $direct is set to true, only consider the direcly adjacent 
+	* properties in the property hierarchy
+	*
+   	* @param	boolean	$direct
+   	* @return	array of OntProperties 
+   	* @access	public
+   	*/
+	function listSuperProperties($direct = true)
+	{
+		$return = array();
+		if ($direct)
+			return $this->listProperty($this->vocabulary->SUB_PROPERTY_OF(),'OntProperty');
+			
+		$index=array();	
+		$statements = $this->_getSuperAttributeStatementsRec($this,$this->vocabulary->SUB_PROPERTY_OF(),$index);
+		$returnIndex=array();
+		foreach ($statements as $statement) 
+		{
+			$objectLabel=$statement->getLabelObject();
+			if (!in_array($objectLabel,$returnIndex))
+			{
+				$returnIndex[]=$objectLabel;
+				$return[]=new OntProperty($statement->getLabelObject());
+			}	
+		}	
+		return $return;	
+	}
+	
+	/**
+	* Remove the given class from the stated domain(s) of this property.
+	*
+   	* @param	object ResResource $resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeDomain($resResource)
+	{
+		return $this->removeProperty($this->vocabulary->DOMAIN(),$resResource);
+	}
+	
+	/**
+	* Remove the given class from the stated range(es) of this property.
+	*
+   	* @param	object ResResource $resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeRange($resResource)
+	{
+		return $this->removeProperty($this->vocabulary->RANGE(),$resResource);
+	}
+	
+	/**
+	* Remove the given property from the sub-properties of this property.
+	*
+   	* @param	object ResProperty $resProperty
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeSubProperty($resProperty)
+	{
+		return	$this->model->remove(new Statement($resProperty,$this->vocabulary->SUB_PROPERTY_OF(),$this));
+	}
+	
+	/**
+	* Remove the given property from the super-properties of this property.
+	*
+   	* @param	object ResProperty $resProperty
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeSuperProperty($resProperty)
+	{
+		return $this->removeProperty($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
+	}
+
+	/**
+	* Assert that the given resource represents the class of individuals 
+	* that form the domain of this property. Any existing domain statements 
+	* for this property are removed.
+	*
+   	* @param	object ResResource $resResource
+   	* @access	public
+   	*/
+	function setDomain($resResource)
+	{
+		$this->setPropertyValue($this->vocabulary->DOMAIN(),$resResource);
+	}
+	
+	/**
+	* Assert that the given resource represents the class of individuals 
+	* that form the range of this property. Any existing range statements 
+	* for this property are removed.
+	*
+   	* @param	object ResResource $resResource
+   	* @access	public
+   	*/
+	function setRange($resResource)
+	{
+		$this->setPropertyValue($this->vocabulary->RANGE(),$resResource);
+	}
+	
+	/**
+	* Assert that this property is super-property of the given property. 
+	* Any existing statements for superPropertyOf on prop will be removed.
+	*
+   	* @param	object ResProperty $resProperty
+   	* @access	public
+   	*/
+	function setSubProperty($resProperty)
+	{
+		foreach ($this->listSubProperties() as $oldResProperty) 
+		{
+			$this->removeSubProperty($oldResProperty);
+		}
+		
+		$this->addSubProperty($resProperty);
+	}
+	
+	/**
+	* Assert that this property is sub-property of the given property. 
+	* Any existing statements for subPropertyOf on prop will be removed.
+	*
+   	* @param	object ResProperty $resProperty
+   	* @access	public
+   	*/
+	function setSuperProperty($resProperty)
+	{
+		$this->setPropertyValue($this->vocabulary->SUB_PROPERTY_OF(),$resProperty);
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OntResource.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OntResource.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OntResource.php	(revision 225)
@@ -0,0 +1,739 @@
+<?php 
+// ----------------------------------------------------------------------------------
+// Class: OntResource
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Provides a common super-type for all of the abstractions in 
+* this ontology representation package.
+*
+* @version  $Id: OntResource.php 268 2006-05-15 05:28:09Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+class OntResource extends ResResource 
+{
+	/**
+	* Holds a reference to the assoiated vocabulary
+	* @var		object
+	* @access	private
+	*/
+	var $vocabulary;
+	
+	/**
+	* Holds a resResource of the type, which is this ontResource of.
+	* If this value is set, the ontModel will add an additional 
+    * statement about this resource and the fiven rdf:type
+	* @var		object
+	* @access	private
+	*/
+	var $rdfType;
+	
+	
+	/**
+    * Constructor
+	* You can supply a uri
+    *
+    * @param string $uri 
+	* @access	public
+    */
+	function OntResource($uri = null)
+	{
+		$this->rdfType=false;
+		parent::ResResource($uri);
+	}
+	
+	/**
+	* Sets the reference to the assoiated vocabulary
+	*
+   	* @param	object OntVocabulary	$vocabulary
+   	* @access	public
+   	*/
+	function setVocabulary(& $vocabulary)
+	{
+		$this->vocabulary = & $vocabulary;
+	}
+	
+	/**
+	* Add the given comment to this resource.
+	*
+   	* @param	object ResLiteral	$comment
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addComment($comment)
+	{
+		return $this->addProperty($this->vocabulary->COMMENT(),$comment);
+	}
+	
+	/**
+	* Answer the comment string for this object. If there is more than one such resource, an arbitrary selection is made.
+	*
+   	* @return	object ResLiteral or NULL 
+   	* @access	public
+   	*/
+	function getComment()
+	{
+		return $this->getPropertyValue($this->vocabulary->COMMENT());
+	}
+	
+	/**
+	* Add a resource that is declared to provide a definition of this resource.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addIsDefinedBy($resResource)
+	{
+		return $this->addProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
+	}
+	
+	/**
+	* Answer a resource that is declared to provide a definition of this resource. 
+	* If there is more than one such resource, an arbitrary selection is made.
+	*
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function getIsDefinedBy()
+	{
+		return $this->getPropertyValue($this->vocabulary->IS_DEFINED_BY());
+	}
+	
+	/**
+	* Add the given Label to this resource
+	*
+   	* @param	object ResLiteral	$resLiteral
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addLabelProperty($resLiteral)
+	{
+		return $this->addProperty($this->vocabulary->LABEL(),$resLiteral);
+	}
+	
+	/**
+	* Answer the label ResLiteral for this object. 
+	* If there is more than one such resource, an arbitrary selection is made.
+	*
+   	* @param	string	$uri
+   	* @return	object ResResource
+   	* @access	public
+   	*/
+	function getLabelProperty()
+	{
+		return $this->getPropertyValue($this->vocabulary->LABEL());
+	}
+	
+	/**
+	* Add the given class as one of the rdf:type's for this resource.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addRDFType($resResource)
+	{
+		return $this->addProperty($this->vocabulary->TYPE(),$resResource);
+	}
+	
+	/**
+	* Answer the rdf:type (ie the class) of this resource. 
+	* If there is more than one type for this resource, the return value will 
+	* be one of the values, but it is not specified which one 
+	* (nor that it will consistently be the same one each time).
+	*
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function getRDFType()
+	{
+		return $this->getPropertyValue($this->vocabulary->TYPE());
+	}
+	
+	/**
+	* Add a resource that is declared to provided additional 
+	* information about the definition of this resource.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addSeeAlso($resResource)
+	{
+		return $this->addProperty($this->vocabulary->SEE_ALSO(),$resResource);
+	}
+	
+	/**
+	* Answer a resource that provides additional information about this resource. 
+	* If more than one such resource is defined, make an arbitrary choice.
+	*
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function getSeeAlso()
+	{
+		return $this->getPropertyValue($this->vocabulary->SEE_ALSO());
+	}
+	
+	/**
+	* Answer a view of this resource as a class
+	*
+   	* @return	object OntClass 
+   	* @access	public
+   	*/
+	function asClass()
+	{
+		return  $this->model->createOntClass($this->uri);
+	}
+	
+	/**
+	* Answer a view of this resource as an Individual
+	*
+   	* @return	object Individual 
+   	* @access	public
+   	*/
+	function asIndividual()
+	{
+		return  $this->model->createIndividual($this->uri);
+	}
+	
+	/**
+	* Answer a view of this resource as a property
+	*
+   	* @return	object OntProperty
+   	* @access	public
+   	*/
+	function asOntProperty()
+	{
+		return  $this->model->createOntProperty($this->uri);
+	}
+	
+	/**
+	* Answer a reference to the ontology language profile that governs the 
+	* ontology model to which this ontology resource is attached.
+	*
+   	* @param	string	$uri
+   	* @return	object OntClass 
+   	* @access	public
+   	*/
+	function getVocabulary()
+	{
+		return $this->vocabulary ;
+	}
+	
+	/**
+	* Answer the value of a given RDF property for this resource as $returnType, or null 
+	* if it doesn't have one. If there is more than one RDF statement with 
+	* the given property for the current value, it is not defined which of 
+	* the values will be returned.
+	* The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource'
+	* Default is 'ResResource'
+	*
+   	* @param	object ResResource	$property
+   	* @param	string	$returnType
+   	* @return	object OntClass 
+   	* @access	public
+   	*/
+	function getPropertyValue($property, $returnType = 'ResResource')
+	{
+		$statement=$this->getProperty($property);
+		if ($statement===null)
+			return null;
+			
+			switch ($returnType) 
+			{
+				case 'OntClass':
+					return $this->model->createOntClass($statement->getLabelObject());		
+					break;
+					
+				case 'OntProperty':
+					return $this->model->createOntProperty($statement->getLabelObject());		
+					break;
+				
+				case 'Individual':
+					return $this->model->createIndividual($statement->getLabelObject());		
+					break;
+			
+				default:
+					return $statement->getObject();
+					break;	
+			}	
+	}
+	
+	/**
+	* Answer true if this resource has the given comment.
+	*
+   	* @param	object ResLiteral	$resLiteral
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasComment($resLiteral)
+	{
+		return $this->hasProperty($this->vocabulary->COMMENT(),$resLiteral);
+	}
+	
+	/**
+	* Answer true if this resource has the given label.
+	*
+   	* @param	object ResLiteral	$resLiteral
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasLabelProperty($resLiteral)
+	{
+		return $this->hasProperty($this->vocabulary->LABEL(),$resLiteral);
+	}
+	
+	/**
+	* Answer true if this resource has the given rdf:type.
+	*
+   	* @param	object ResResource	$ontClass
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasRDFType($ontClass)
+	{
+		return $this->hasProperty($this->vocabulary->TYPE(),$ontClass);
+	}
+	
+	/**
+	* Answer true if this resource has the given resource as a source 
+	* of additional information.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function hasSeeAlso($resResource)
+	{
+		return $this->hasProperty($this->vocabulary->SEE_ALSO(),$resResource);
+	}
+	
+	/**
+	* Answer true if this resource is defined by the given resource.
+	*
+   	* @param	object ResResource	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function isDefinedBy($resResource)
+	{
+		return $this->hasProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
+	}
+	
+	/**
+	* Answer an array of all of the comment literals for this resource.
+	*
+   	* @param	string	$language
+   	* @return	array
+   	* @access	public
+   	*/
+	function listComments($language)
+	{
+		$return=$this->listProperty($this->vocabulary->COMMENT());
+		if ($language === false)
+			return $return;
+					
+		foreach ($return as $key => $resLiteral) 
+		{
+			if (!is_a($resLiteral,'ResLiteral') || $resLiteral->getLanguage() != $language)
+				unset ($return[$key]);	
+		}
+		return $return;	
+	}
+	
+	/**
+	* Answer an array of all of the resources that are declared to define this resource.
+	*
+   	* @return	array
+   	* @access	public
+   	*/
+	function listIsDefinedBy()
+	{
+		return $this->listProperty($this->vocabulary->IS_DEFINED_BY());
+	}
+	
+	/**
+	* Answer an array of all of the label literals for this resource, with the given
+	* language, if $language is set.
+	*
+   	* @return	array
+   	* @access	public
+   	*/
+	function listLabelProperties($language = false)
+	{
+		$return=$this->listProperty($this->vocabulary->LABEL());
+		if ($language === false)
+			return $return;
+					
+		foreach ($return as $key => $resLiteral) 
+		{
+			if (!is_a($resLiteral,'ResLiteral') || $resLiteral->getLanguage() != $language)
+				unset ($return[$key]);	
+		}
+		return $return;	
+	
+	}
+	
+	/**
+	* Answer an array of the RDF classes to which this resource belongs.
+	* If $direct is true, only answer those resources that are direct types of 
+	* this resource, not the super-classes of the class etc.
+	* 
+   	* @param	boolean	$direct
+   	* @return	array Array of ResResources
+   	* @access	public
+   	*/
+	function listRDFTypes($direct = true)
+	{
+		return $this->listProperty($this->vocabulary->TYPE());		
+	}
+	
+	/**
+	* Answer an array of all of the resources that are declared to 
+	* provide addition information about this resource.
+	*	
+   	* @return	array Array of ResResources
+   	* @access	public
+   	*/
+	function listSeeAlso()
+	{
+		return $this->listProperty($this->vocabulary->SEE_ALSO());	
+	}
+	
+	/**
+	* Answer an array of values of a given RDF property for this resource as $returnType, or null 
+	* if it doesn't have one. 
+	* The following return Types are supported: 'OntClass', 'OntProperty', 'Individual', and 'ResResource'
+	* Default is 'ResResource'
+	*
+   	* @param	object ResResource	$property
+   	* @param	string	$returnType
+   	* @return	array of ResResources 
+   	* @access	public
+   	*/
+	function listProperty($property, $returnType = 'OntResource')
+	{
+		$return=array();
+		$resArray = $this->listProperties($property);
+		foreach ($resArray as $statement) 
+		{
+			switch ($returnType) 
+			{
+				case 'OntClass':
+					$return[]=$this->model->createOntClass($statement->getLabelObject());		
+					break;
+					
+				case 'OntProperty':
+					$return[]=$this->model->createOntProperty($statement->getLabelObject());		
+					break;
+				
+				case 'Individual':
+					$return[]=$this->model->createIndividual($statement->getLabelObject());		
+					break;
+			
+				default:
+					$return[]=$statement->getObject();
+					break;
+			}	
+		}
+		return $return;	
+	}
+	
+	/**
+	* Remove the statement that the given ResLiteral is a comment on this resource.
+	* Returns true, if a statement was removed
+	*
+   	* @param	object ResLiteral $resLiteral
+   	* @return	boolean
+   	* @access	public
+   	*/
+	function removeComment($resLiteral)
+	{
+		return $this->removeProperty($this->vocabulary->COMMENT(),$resLiteral);
+	}
+	
+	/**
+	* Remove the statement that this resource is defined by the given resource.
+	*
+   	* @param	object ResResource $resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeDefinedBy($resResource)
+	{
+		return $this->removeProperty($this->vocabulary->IS_DEFINED_BY(),$resResource);
+	}
+	
+	/**
+	* Remove the statement that the given ResLiteral is a label on this resource.
+	* Returns true, if a statement was removed
+	*
+   	* @param	object ResLiteral $resLiteral
+   	* @return	boolean
+   	* @access	public
+   	*/
+	function removeLabelProperty($resLiteral)
+	{
+		return $this->removeProperty($this->vocabulary->LABEL(),$resLiteral);
+	}
+	
+	/**
+	* Remove the specific property-value pair from this resource.
+	*
+   	* @param	object ResResource	$property
+   	* @param	object ResResource	$value
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeProperty($property, $value)
+	{
+		return $this->model->remove(new Statement($this,$property,$value));
+	}
+	
+	/**
+	* Remove the statement that this resource is of the given RDF type.
+	*
+   	* @param	object ResResource $resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeRDFType($resResource)
+	{
+		return $this->removeProperty($this->vocabulary->TYPE(),$resResource);
+	}
+	
+	/**
+	* Remove the statement indicating the given resource as a source of 
+	* additional information about this resource. 
+	*
+   	* @param	object ResResource $resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeSeeAlso($resResource)
+	{
+		return $this->removeProperty($this->vocabulary->SEE_ALSO(),$resResource);
+	}
+	
+	/**
+	* Assert that the given string is the comment on this resource. 
+	* Any existing statements for comment will be removed.
+	*
+   	* @param	object ResLiteral	$resLiteral 
+   	* @access	public
+   	*/
+	function setComment($resLiteral)
+	{
+		$this->setPropertyValue($this->vocabulary->COMMENT(),$resLiteral);
+	}
+	
+	/**
+	* Assert that the given resource provides a source of definitions about this resource. 
+	* Any existing statements for isDefinedBy will be removed.
+	*
+   	* @param	object ResResource	$resResource 
+   	* @access	public
+   	*/
+	function setIsDefinedBy($resResource)
+	{
+		$this->setPropertyValue($this->vocabulary->IS_DEFINED_BY(),$resResource);
+	}
+	
+	/**
+	* Assert that the given string is the label on this resource. 
+	* Any existing statements for comment will be removed.
+	*
+   	* @param	object ResLiteral	$resLiteral 
+   	* @access	public
+   	*/
+	function setLabelProperty($resLiteral)
+	{
+		$this->setPropertyValue($this->vocabulary->LABEL(),$resLiteral);
+	}
+	
+	/**
+	* Set the value of the given property of this ontology resource to the given value. 
+	* Maintains the invariant that there is at most one value of the property for a 
+	* given resource, so existing property values are first removed. 
+	* To add multiple properties, use addProperty.
+	*
+   	* @param	object ResResource	$property
+   	* @param	object ResResource	$value  
+   	* @access	public
+   	*/
+	function setPropertyValue($property, $value)
+	{
+		$this->removeAll($property);
+		$this->addProperty($property,$value);
+	}
+	
+	/**
+	* Set the RDF type (ie the class) for this resource, 
+	* replacing any existing rdf:type property. Any existing statements 
+	* for the RDF type will first be removed.
+	*
+   	* @param	object ResResource	$resResource 
+   	* @access	public
+   	*/
+	function setRDFType($resResource)
+	{
+		$this->setPropertyValue($this->vocabulary->TYPE(),$resResource);
+	}
+	
+	/**
+	* Add a resource that is declared to provided additional information 
+	* about the definition of this resource
+	*
+   	* @param	object ResResource	$resResource 
+   	* @access	public
+   	*/
+	function setSeeAlso($resResource)
+	{
+		$this->setPropertyValue($this->vocabulary->SEE_ALSO(),$resResource);
+	}
+	
+	/**
+	* Returns an array of ResResources that are recursively connected by $attribute 
+	* in superProperty direction.
+	* If $onlyFindThisResResource is set to a ResResource, this function returns boolean
+	* if this distinct resource recursively is connected to the $startResource.
+	*
+   	* @param	object ResResource	$startResource
+   	* @param	object ResResource	$attribute
+	* @param	array				$attribute
+	* @param	object ResResource	$onlyFindThisResResource	
+   	* @return	array OR boolean 
+   	* @access	private
+   	*/
+	function _getSuperAttributeStatementsRec(& $startResource,& $attribute,& $attributeIndex, $onlyFindThisResResource = false)
+	{
+
+		$return = $startResource->listProperties($attribute);
+		
+		if ($onlyFindThisResResource)
+		{
+			foreach ($return as $statement)
+			{
+				if ($onlyFindThisResResource->equals($statement->getObject()))
+					return true;
+			}	
+		}
+		
+		foreach ($return as $statement)
+		{
+			$attributeLabel=$statement->getLabelObject();
+			if (!in_array($attributeLabel,$attributeIndex))
+			{
+				$attributeIndex[]=$attributeLabel;
+				$subReturn = $this->_getSuperAttributeStatementsRec($statement->getObject(), $attribute, $attributeIndex, $onlyFindThisResResource);
+			} 
+		}
+		if (isset($subReturn))
+		{
+			if ($subReturn === true)
+				return true;
+			return array_merge($return,$subReturn);
+		}	
+		
+		return $return;
+	}
+	
+	/**
+	* Returns an array of ResResources that are recursively connected by $attribute 
+	* in subProperty direction.
+	* If $onlyFindThisResResource is set to a ResResource, this function returns boolean
+	* if this distinct resource recursively is connected to the $startResource.
+	*
+   	* @param	object ResResource	$startResource
+   	* @param	object ResResource	$attribute
+	* @param	array				$attribute
+	* @param	object ResResource	$onlyFindThisResResource	
+   	* @return	array OR boolean 
+   	* @access	private
+   	*/
+	function _getSubAttributeStatementsRec(& $startResource,& $attribute,& $attributeIndex, $onlyFindThisResResource = false)
+	{
+
+		$return = $this->model->find(null,$attribute,$startResource);
+		
+		if ($onlyFindThisResResource)
+		{
+			foreach ($return as $statement)
+			{
+				if ($onlyFindThisResResource->equals($statement->getSubject()))
+					return true;
+			}	
+		}
+		
+		foreach ($return as $statement)
+		{
+			$attributeLabel=$statement->getLabelSubject();
+			if (!in_array($attributeLabel,$attributeIndex))
+			{
+				$attributeIndex[]=$attributeLabel;
+				$subReturn = $this->_getSubAttributeStatementsRec($statement->getSubject(), $attribute, $attributeIndex, $onlyFindThisResResource);
+			} 
+		}
+		if (isset($subReturn))
+		{
+			if ($subReturn === true)
+				return true;
+			return array_merge($return,$subReturn);
+		}
+			
+		return $return;
+	}
+	
+	/**
+	* Add a property to this resource.
+	* A statement with this resource as the subject, p as the predicate and o 
+	* as the object is added to the model associated with this resource.
+	* If $this->rdfType is set, an additional statement about it's type
+	* is added.
+	*
+   	* @param	ResResource				$property
+   	* @param	ResResource/ResLiteral	$object
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function addProperty($property,$object)
+	{
+		if ($this->rdfType !== false)
+			if (!$this->hasRDFType($this->rdfType))
+					$this->model->add(new Statement($this,$this->vocabulary->TYPE(),$this->rdfType));
+	
+		return parent:: addProperty($property,$object);
+	}
+	
+	/**
+    * Sets the rdf:type, that this distinct resource is instance of.
+    * If this value is set, the ontModel will add an additional 
+    * statement about this resource and the fiven rdf:type
+    *
+    * @param object ResResource $resResource 
+	* @access	public
+    */
+	function setInstanceRdfType($resResource)
+	{
+		$this->rdfType = $resResource;
+	}
+	
+	/**
+    * returns the rdf:type, that this distinct resource is instance of.
+    *
+    * @return object ResResource $resResource 
+	* @access	public
+    */
+	function getInstanceRdfType()
+	{
+		return $this->rdfType;
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/OntVocabulary.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/OntVocabulary.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/OntVocabulary.php	(revision 225)
@@ -0,0 +1,25 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: OntVocabulary
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Base Class that encapsulates the elements of a general vocabulary 
+* corresponding to a particular ontology language. The intent is that, 
+* using a given vocabulary, a given RDF model can be processed as an 
+* ontology description, without binding knowledge of the vocabulary 
+* into this Class
+*
+* @version  $Id: OntVocabulary.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+class OntVocabulary
+{
+	
+}
+?>
Index: Dev/branches/Demo/rdfapi/ontModel/RdfsVocabulary.php
===================================================================
--- Dev/branches/Demo/rdfapi/ontModel/RdfsVocabulary.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/ontModel/RdfsVocabulary.php	(revision 225)
@@ -0,0 +1,143 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdfsVocabulary
+// ----------------------------------------------------------------------------------
+
+/**
+* RDFS vocabulary items
+*
+*
+* @version  $Id: RdfsVocabulary.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	ontModel
+* @access	public
+**/
+class RdfsVocabulary extends OntVocabulary 
+{
+
+	/**
+	* Answer the resource that represents the class 'class' in this vocabulary.
+	*
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function ONTCLASS()
+	{
+		return new ResResource(RDF_SCHEMA_URI.RDFS_CLASS);	
+	}
+	
+	/**
+	* Answer the predicate that denotes the domain of a property.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function DOMAIN()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_DOMAIN);	
+	}
+	
+	 
+ 	/**
+	* Answer the predicate that denotes comment annotation on an ontology element.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function COMMENT()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_COMMENT);	
+	}
+	
+ 	/**
+	* Answer the predicate that denotes isDefinedBy annotation on an ontology element
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function IS_DEFINED_BY()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_IS_DEFINED_BY);
+	}
+	
+	/**
+	* Answer the predicate that denotes label annotation on an ontology element
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function LABEL()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_LABEL);
+	}
+	
+	/**
+	* Answer the predicate that denotes the domain of a property.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function RANGE()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_RANGE);
+	}
+	
+	/**
+	* Answer the predicate that denotes seeAlso annotation on an ontology element
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function SEE_ALSO()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_SEE_ALSO);
+	}
+	
+	/**
+	* Answer the predicate that denotes that one class is a sub-class of another.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function SUB_CLASS_OF()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBCLASSOF);
+	}
+	
+	/**
+	* Answer the predicate that denotes that one property is a sub-property of another.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function SUB_PROPERTY_OF()
+	{
+		return new ResProperty(RDF_SCHEMA_URI.RDFS_SUBPROPERTYOF);
+	}
+
+	/**
+	* Answer the string that is the namespace prefix for this vocabulary
+	*
+   	* @return	string
+   	* @access	public
+   	*/
+	function NAMESPACE()
+	{
+		return RDF_SCHEMA_URI;
+	}
+	
+	/**
+	* Answer the predicate that denotes the rdf:type property.
+	*
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function TYPE()
+	{
+		return new ResProperty(RDF_NAMESPACE_URI.RDF_TYPE);
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/rdql/RDQL.php
===================================================================
--- Dev/branches/Demo/rdfapi/rdql/RDQL.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/rdql/RDQL.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+// ----------------------------------------------------------------------------------
+// RDQL
+// ----------------------------------------------------------------------------------
+//
+// Description               : Rdql package
+// ----------------------------------------------------------------------------------
+
+
+// include RDQL classes
+require_once( RDFAPI_INCLUDE_DIR . 'rdql/RdqlParser.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'rdql/RdqlEngine.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'rdql/RdqlDbEngine.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'rdql/RdqlMemEngine.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'rdql/RdqlResultIterator.php' );
+
+?>
Index: Dev/branches/Demo/rdfapi/rdql/RdqlDbEngine.php
===================================================================
--- Dev/branches/Demo/rdfapi/rdql/RdqlDbEngine.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/rdql/RdqlDbEngine.php	(revision 225)
@@ -0,0 +1,506 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdqlDbEngine
+// ----------------------------------------------------------------------------------
+
+/**
+ * This class performs as RDQL query on a DbModel.
+ *
+ * Provided an rdql query parsed into an array of php variables and constraints
+ * at first the engine generates an sql statement and queries the database for
+ * tuples matching all patterns from the WHERE clause of the given RDQL query.
+ * Subsequently the result set is is filtered with evaluated boolean expressions
+ * from the AND clause of the given RDQL query.
+ *
+ * @version  $Id: RdqlDbEngine.php 559 2008-02-29 15:21:35Z cax $
+ * @author   Radoslaw Oldakowski <radol@gmx.de>
+ *
+ * @package rdql
+ * @access public
+ */
+
+Class RdqlDbEngine extends RdqlEngine {
+
+
+/**
+ * Parsed query variables and constraints.
+ *
+ * @var     array   ['selectVars'][] = ?VARNAME
+ *                  ['sources'][] = URI
+ *                  ['patterns'][]['subject']['value'] = VARorURI
+ *                                ['predicate']['value'] = VARorURI
+ *                                ['object']['value'] = VARorURIorLiterl
+ *                                          ['is_literal'] = boolean
+ *                                          ['l_lang'] = string
+ *                                          ['l_dtype'] = string
+ *                  ['filters'][]['string'] = string
+ *                               ['evalFilterStr'] = string
+ *                               ['reqexEqExprs'][]['var'] = ?VARNAME
+ *                                                 ['operator'] = (eq | ne)
+ *                                                 ['regex'] = string
+ *                               ['strEqExprs'][]['var'] = ?VARNAME
+ *                                               ['operator'] = (eq | ne)
+ *                                               ['value'] = string
+ *                                               ['value_type'] = ('variable' | 'URI' | 'Literal')
+ *                                               ['value_lang'] = string
+ *                                               ['value_dtype'] = string
+ *                               ['numExpr']['vars'][] = ?VARNAME
+ *                         ( [] stands for an integer index - 0..N )
+ * @access	private
+ */
+ var $parsedQuery;
+
+
+/**
+ * When an RDQL query is performed on a DbModel, in first step the engine searches
+ * in database for triples matching the Rdql-WHERE clause. A recordSet is returned.
+ * $rsIndexes maps select and filter variables to their corresponding indexes
+ * in the returned recordSet.
+ *
+ * @var     array [?VARNAME]['value'] = integer
+ *                          ['nType'] = integer
+ *                          ['l_lang'] = integer
+ *                          ['l_dtype'] = integer
+ * @access	private
+ */
+ var $rsIndexes;
+
+
+ /**
+ * Perform an RDQL Query on the given DbModel.
+ *
+ * @param   object  DbModel $dbModel
+ * @param   array   &$parsedQuery  (the same format as $this->parsedQuery)
+ * @param   boolean $returnNodes
+ * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
+ *      OR  array   [][?VARNAME] = string
+ * @access  public
+ */
+ function & queryModel(&$dbModel, &$parsedQuery, $returnNodes = TRUE) {
+
+   $this->parsedQuery = &$parsedQuery;
+
+   $sql = $this->generateSql($dbModel->modelID);
+   $recordSet =& $dbModel->dbConn->execute($sql);
+   $queryResult = $this->filterQueryResult($recordSet);
+
+   if ($returnNodes)
+      $ret = $this->toNodes($queryResult);
+   else
+      $ret = $this->toString($queryResult);
+   return $ret;
+ }
+
+
+ /**
+ * Generate an SQL string to query the database for tuples matching all patterns
+ * of $parsedQuery.
+ *
+ * @param   integer $modelID
+ * @return  string
+ * @access	private
+ */
+ function generateSql($modelID) {
+
+   $sql  = $this->generateSql_SelectClause();
+   $sql .= $this->generateSql_FromClause();
+   $sql .= $this->generateSql_WhereClause($modelID);
+   return $sql;
+ }
+
+
+/**
+ * Generate SQL SELECT clause.
+ *
+ * @return  string
+ * @throws  PHPError
+ * @access	private
+ */
+ function generateSql_SelectClause() {
+
+   $sql_select = 'SELECT';
+   $index = 0;
+   $this->rsIndexes = array();
+
+   foreach ($this->parsedQuery['selectVars'] as $var)
+     $sql_select .= $this->_generateSql_SelectVar($var, $index);
+
+   if (isset($this->parsedQuery['filters'])) {
+       foreach ($this->parsedQuery['filters'] as $n => $filter) {
+
+         // variables from numeric expressions
+         foreach ($filter['numExprVars'] as $numVar)
+           $sql_select .= $this->_generateSql_SelectVar($numVar, $index);
+
+         // variables from regex equality expressions
+         foreach ($filter['regexEqExprs'] as $regexEqExpr)
+           $sql_select .= $this->_generateSql_SelectVar($regexEqExpr['var'], $index);
+
+         // variables from string equality expressions
+         foreach ($filter['strEqExprs'] as $strEqVar)
+             $sql_select .= $this->_generateSql_SelectVar($strEqVar['var'], $index);
+       }
+   }
+
+   return rtrim($sql_select, " , ");
+ }
+
+
+/**
+ * Generate SQL FROM clause
+ *
+ * @return  string
+ * @access	private
+ */
+ function generateSql_FromClause() {
+
+   $sql_from = ' FROM';
+   foreach ($this->parsedQuery['patterns'] as $n => $v)
+     $sql_from .= ' statements s' .($n+1) .' , ';
+
+   return rtrim($sql_from, ' , ');
+ }
+
+
+/**
+ * Generate an SQL WHERE clause
+ *
+ * @param   integer $modelID
+ * @return  string
+ * @access	private
+ */
+ function generateSql_WhereClause($modelID) {
+
+   $sql_where = ' WHERE';
+   $count_patterns = count($this->parsedQuery['patterns']);
+   foreach ($this->parsedQuery['patterns'] as $n => $pattern) {
+     $sql_where .= ' s' .($n+1) .'.modelID=' .$modelID .' AND';
+     foreach ($pattern as $key => $val_1)
+       if ($val_1['value'] && $val_1['value']{0}=='?') {
+         $sql_tmp = ' s' .($n+1) .'.' .$key .'=';
+         // find internal bindings
+         switch ($key) {
+           case 'subject':
+                    if ($pattern['subject']['value'] == $pattern['predicate']['value'])
+                       $sql_where .= $sql_tmp .'s' .($n+1) .'.predicate AND';
+                    elseif ($pattern['subject']['value'] == $pattern['object']['value'])
+                       $sql_where .= $sql_tmp .'s' .($n+1) .'.object AND';
+                    break;
+           case 'predicate':
+                    if ($pattern['predicate']['value'] == $pattern['object']['value'])
+                       $sql_where .= $sql_tmp .'s' .($n+1) .'.object AND';
+         }
+         // find external bindings
+         for ($i=$n+1; $i<$count_patterns; $i++)
+             foreach ($this->parsedQuery['patterns'][$i] as $key2 => $val_2)
+               if ($val_1['value']==$val_2['value']) {
+                  $sql_where .= $sql_tmp .'s' .($i+1) .'.' .$key2 .' AND';
+                  break 2;
+               }
+       }else {
+          $sql_where .= ' s' .($n+1) .'.' .$key ."='" .$val_1['value'] ."' AND";
+          if ($key == 'object' && isset($val_1['is_literal'])) {
+              $sql_where .= ' s' .($n+1) .".object_is='l' AND";
+              $sql_where .= ' s' .($n+1) .".l_datatype='" .$val_1['l_dtype'] ."' AND";
+              $sql_where .= ' s' .($n+1) .".l_language='" .$val_1['l_lang'] ."' AND";
+          }
+       }
+   }
+   return rtrim($sql_where, ' AND');
+ }
+
+
+/**
+ * Filter tuples containing variables matching all patterns from the WHERE clause
+ * of an RDQL query. As a result of a database query using ADOdb these tuples
+ * are returned as an ADORecordSet object, which is then passed to this function.
+ *
+ * @param   object ADORecordSet &$recordSet
+ * @return  array  [][?VARNAME]['value']   = string
+ *                             ['nType']   = string
+ *                             ['l_lang']  = string
+ *                             ['l_dtype'] = string
+ * @access	private
+ */
+ function filterQueryResult(&$recordSet) {
+   $queryResult=array();
+
+   if (isset($this->parsedQuery['filters'])) {
+
+       while (!$recordSet->EOF) {
+
+         foreach ($this->parsedQuery['filters'] as $filter) {
+
+           $evalFilterStr = $filter['evalFilterStr'];
+
+           // evaluate regex equality expressions of each filter
+           foreach ($filter['regexEqExprs'] as $i => $expr) {
+               preg_match($expr['regex'], $recordSet->fields[$this->rsIndexes[$expr['var']]['value']], $match);
+               $op = substr($expr['operator'], 0,1);
+               if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0])))
+                  $evalFilterStr = str_replace("##RegEx_$i##", 'FALSE', $evalFilterStr);
+               else
+                  $evalFilterStr = str_replace("##RegEx_$i##", 'TRUE', $evalFilterStr);
+           }
+
+           // evaluate string equality expressions
+           foreach ($filter['strEqExprs'] as $i => $expr) {
+
+             $exprBoolVal = 'FALSE';
+
+             switch ($expr['value_type']) {
+
+               case 'variable':
+                    if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] ==
+                           $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] &&
+                         $expr['operator'] == 'eq') ||
+                        ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] !=
+                           $recordSet->fields[$this->rsIndexes[$expr['value']]['value']] &&
+                         $expr['operator'] == 'ne'))
+
+                       $exprBoolVal = 'TRUE';
+                    break;
+
+               case 'URI':
+
+                      if (isset($this->rsIndexes[$expr['var']]['nType']) &&
+                           $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] == 'l') {
+
+                         if ($expr['operator'] == 'ne')
+                            $exprBoolVal = 'TRUE';
+                         break;
+                      }
+
+                    if (($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] ==
+                           $expr['value'] && $expr['operator'] == 'eq') ||
+                        ($recordSet->fields[$this->rsIndexes[$expr['var']]['value']] !=
+                           $expr['value'] && $expr['operator'] == 'ne'))
+                       $exprBoolVal = 'TRUE';
+                    break;
+
+               case 'Literal':
+
+                    if (!isset($this->rsIndexes[$expr['var']]['nType']) ||
+                           $recordSet->fields[$this->rsIndexes[$expr['var']]['nType']] != 'l') {
+
+                       if ($expr['operator'] == 'ne')
+                          $exprBoolVal = 'TRUE';
+                       break;
+                    }
+
+                    $filterLiteral= new Literal($expr['value'],$expr['value_lang']);
+                    $filterLiteral->setDatatype($expr['value_dtype']);
+
+                    $resultLiteral=new Literal($recordSet->fields[$this->rsIndexes[$expr['var']]['value']]);
+                    $resultLiteral->setDatatype($recordSet->fields[$this->rsIndexes[$expr['var']]['l_dtype']]);
+                    $resultLiteral->setLanguage($recordSet->fields[$this->rsIndexes[$expr['var']]['l_lang']]);
+
+                    $equal=$resultLiteral->equals($filterLiteral);
+
+                    if (($equal && $expr['operator'] == 'eq') ||
+                        (!$equal && $expr['operator'] == 'ne'))
+                       $exprBoolVal = 'TRUE';
+                    else
+                       $exprBoolVal = 'FALSE';
+
+             }
+
+             $evalFilterStr = str_replace("##strEqExpr_$i##", $exprBoolVal, $evalFilterStr);
+          }
+
+          // evaluate numerical expressions
+          foreach ($filter['numExprVars'] as $varName) {
+            $varValue = "'" .$recordSet->fields[$this->rsIndexes[$varName]['value']] ."'";
+            $evalFilterStr = str_replace($varName, $varValue, $evalFilterStr);
+          }
+
+          eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;");
+          if (!isset($eval_filter_ok))
+             trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']) ."'", E_USER_ERROR);
+
+          if (!$filterBoolVal) {
+             $recordSet->MoveNext();
+             continue 2;
+          }
+
+        }
+        $queryResult[] = $this->_convertRsRowToQueryResultRow($recordSet->fields);
+        $recordSet->MoveNext();
+      }
+
+   }else
+      while (!$recordSet->EOF) {
+        $queryResult[] = $this->_convertRsRowToQueryResultRow($recordSet->fields);
+        $recordSet->MoveNext();
+      }
+   return $queryResult;
+ }
+
+
+/**
+ * Serialize variable values of $queryResult to string.
+ *
+ * @param   array  &$queryResult [][?VARNAME]['value']   = string
+ *                                           ['nType']   = string
+ *                                           ['l_lang']  = string
+ *                                           ['l_dtype'] = string
+ * @return  array  [][?VARNAME] = string
+ * @access	private
+ */
+ function toString(&$queryResult) {
+
+   // if a result set is empty return only variable sames
+   if (count($queryResult) == 0) {
+      foreach ($this->parsedQuery['selectVars'] as $selectVar)
+         $res[0][$selectVar] = NULL;
+      return $res;
+   }
+
+   $res = array();
+   foreach ($queryResult as $n => $var)
+     foreach ($var as $varname => $varProperties)
+       if ($varProperties['nType'] == 'r' || $varProperties['nType'] == 'b')
+          $res[$n][$varname] = '<' .$varProperties['value'] .'>';
+       else {
+          $res[$n][$varname] = '"' .$varProperties['value'] .'"';
+          if ($varProperties['l_lang'] != NULL)
+             $res[$n][$varname] .= ' (xml:lang="' .$varProperties['l_lang'] .'")';
+          if ($varProperties['l_dtype'] != NULL)
+             $res[$n][$varname] .= ' (rdf:datatype="' .$varProperties['l_dtype'] .'")';
+       }
+   return $res;
+ }
+
+
+/**
+ * Convert variable values of $queryResult to objects (Node).
+ *
+ * @param   array  &$queryResult [][?VARNAME]['value']   = string
+ *                                           ['nType']   = string
+ *                                           ['l_lang']  = string
+ *                                           ['l_dtype'] = string
+ * @return  array  [][?VARNAME] = object Node
+ * @access	private
+ */
+ function toNodes(&$queryResult) {
+
+   // if a result set is empty return only variable sames
+   if (count($queryResult) == 0) {
+      foreach ($this->parsedQuery['selectVars'] as $selectVar)
+         $res[0][$selectVar] = NULL;
+      return $res;
+   }
+
+   $res = array();
+   foreach ($queryResult as $n => $var)
+     foreach ($var as $varname => $varProperties)
+       if ($varProperties['nType'] == 'r')
+          $res[$n][$varname] = new Resource($varProperties['value']);
+       elseif ($varProperties['nType'] == 'b')
+          $res[$n][$varname] = new BlankNode($varProperties['value']);
+       else {
+          $res[$n][$varname] = new Literal($varProperties['value'], $varProperties['l_lang']);
+          if ($varProperties['l_dtype'] != NULL)
+             $res[$n][$varname]->setDataType($varProperties['l_dtype']);
+       }
+   return $res;
+ }
+
+
+/**
+ * Generate a piece of an sql select statement for a variable.
+ * Look first if the given variable is defined as a pattern object.
+ * (So you can select the node type, literal lang and dtype)
+ * If not found - look for subjects and select node label and type.
+ * If there is no result either go to predicates.
+ * Predicates are always resources therefore select only the node label.
+ *
+ * @param   string $varName
+ * @return  string
+ * @access	private
+ */
+function _generateSql_SelectVar ($varName, &$index) {
+
+  $sql_select = '';
+
+  if (array_key_exists($varName, $this->rsIndexes))
+     return NULL;
+
+  foreach ($this->parsedQuery['patterns'] as $n => $pattern)
+    if ($varName == $pattern['object']['value']) {
+
+       // select the object label
+       $sql_select .= " s" .++$n .".object as _" .ltrim($varName, "?") ." , ";
+       $this->rsIndexes[$varName]['value'] = $index++;
+       // select the node type
+       $sql_select .= " s" .$n .".object_is , ";
+       $this->rsIndexes[$varName]['nType'] = $index++;
+       // select the object language
+       $sql_select .= " s" .$n .".l_language , ";
+       $this->rsIndexes[$varName]['l_lang'] = $index++;
+       // select the object dtype
+       $sql_select .= " s" .$n .".l_datatype , ";
+       $this->rsIndexes[$varName]['l_dtype'] = $index++;
+
+       return $sql_select;
+    }
+
+  foreach ($this->parsedQuery['patterns'] as $n => $pattern)
+    if ($varName == $pattern['subject']['value']) {
+
+       // select the object label
+       $sql_select .= " s" .++$n .".subject as _" .ltrim($varName, "?") ." , ";
+       $this->rsIndexes[$varName]['value'] = $index++;
+       // select the node type
+       $sql_select .= " s" .$n .".subject_is , ";
+       $this->rsIndexes[$varName]['nType'] = $index++;
+
+       return $sql_select;
+    }
+
+  foreach ($this->parsedQuery['patterns'] as $n => $pattern)
+    if ($varName == $pattern['predicate']['value']) {
+
+       // select the object label
+       $sql_select .= " s" .++$n .".predicate as _" .ltrim($varName, "?") ." , ";
+       $this->rsIndexes[$varName]['value'] = $index++;
+
+       return $sql_select;
+    }
+ }
+
+
+/**
+ * Converts a single row of ADORecordSet->fields array to the format of
+ * $queryResult array using pointers to indexes ($this->rsIndexes) in RecordSet->fields.
+ *
+ * @param   array  &$record [] = string
+ * @return  array  [?VARNAME]['value']   = string
+ *                           ['nType']   = string
+ *                           ['l_lang']  = string
+ *                           ['l_dtype'] = string
+ * @access	private
+ */
+ function _convertRsRowToQueryResultRow(&$record) {
+
+   // return only select variables (without conditional variables from the AND clause)
+   foreach ($this->parsedQuery['selectVars'] as $selectVar) {
+     $resultRow[$selectVar]['value'] = $record[$this->rsIndexes[$selectVar]['value']];
+     if (isset($this->rsIndexes[$selectVar]['nType']))
+        $resultRow[$selectVar]['nType'] = $record[$this->rsIndexes[$selectVar]['nType']];
+     // is a predicate then
+     else
+        $resultRow[$selectVar]['nType'] = 'r';
+
+     if ($resultRow[$selectVar]['nType'] == 'l') {
+        $resultRow[$selectVar]['l_lang'] = $record[$this->rsIndexes[$selectVar]['l_lang']];
+        $resultRow[$selectVar]['l_dtype'] = $record[$this->rsIndexes[$selectVar]['l_dtype']];
+     }
+   }
+   return $resultRow;
+ }
+
+} // end: Class RdqlDbEngine
+
+?>
Index: Dev/branches/Demo/rdfapi/rdql/RdqlEngine.php
===================================================================
--- Dev/branches/Demo/rdfapi/rdql/RdqlEngine.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/rdql/RdqlEngine.php	(revision 225)
@@ -0,0 +1,70 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdqlEngine
+// ----------------------------------------------------------------------------------
+
+/**
+ * Some general methods common for RdqlMemEngine and RdqlDbEngine
+ *
+ * @version  $Id: RdqlEngine.php 268 2006-05-15 05:28:09Z tgauss $
+ * @author   Radoslaw Oldakowski <radol@gmx.de>
+ *
+ * @package rdql
+ * @access public
+ */
+
+Class RdqlEngine extends Object{
+
+	
+
+/**
+ * Prints a query result as HTML table.
+ * You can change the colors in the configuration file.
+ *
+ * @param array $queryResult [][?VARNAME] = object Node
+ * @access private
+ */
+ function writeQueryResultAsHtmlTable($queryResult) {
+ 	  // Import Package Utility
+   	 include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+
+   if (current($queryResult[0]) == NULL) {
+      echo 'no match<br>';
+      return;
+   }
+
+   $rdfUtil = new RDFUtil();
+        echo '<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
+   foreach ($queryResult[0] as $varName => $value)
+     echo "<td align='center'><b>$varName</b></td>";
+     echo '</tr>';
+
+   foreach ($queryResult as $n => $var) {
+
+   		
+     echo '<tr><td width="20" align="right">' .($n + 1) .'.</td>';
+     foreach ($var as $varName => $value) {
+       echo INDENTATION . INDENTATION . '<td bgcolor="';
+   	   echo $rdfutil->chooseColor($value);
+       echo '">';
+       echo '<p>';
+
+       $lang  = NULL;
+       $dtype = NULL;
+       if (is_a($value, 'Literal')) {
+    	   if ($value->getLanguage() != NULL)
+               $lang = ' <b>(xml:lang="' . $value->getLanguage() . '") </b> ';
+		   if ($value->getDatatype() != NULL)
+  			  $dtype = ' <b>(rdf:datatype="' . $value->getDatatype() . '") </b> ';
+       }
+  	   echo  $rdfutil->getNodeTypeName($value) .$value->getLabel() . $lang . $dtype .'</p>';
+     }
+     echo '</tr>';
+   }
+   echo '</table>';
+ }
+ 
+} // end: Class RdqlEngine
+
+?>
Index: Dev/branches/Demo/rdfapi/rdql/RdqlMemEngine.php
===================================================================
--- Dev/branches/Demo/rdfapi/rdql/RdqlMemEngine.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/rdql/RdqlMemEngine.php	(revision 225)
@@ -0,0 +1,555 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdqlMemEngine
+// ----------------------------------------------------------------------------------
+
+/**
+ * This class performes as RDQL query on a MemModel.
+ *
+ * Provided an rdql query parsed into an array of php variables and constraints
+ * at first the engine searches for tuples matching all patterns from the WHERE clause
+ * of the given RDQL query. Then the query result set is filtered with evaluated
+ * boolean expressions from the AND clause of the given RDQL query.
+ *
+ * @version  $Id: RdqlMemEngine.php 268 2006-05-15 05:28:09Z tgauss $
+ * @author   Radoslaw Oldakowski <radol@gmx.de>
+ *
+ * @package rdql
+ * @access public
+ */
+
+Class RdqlMemEngine extends RdqlEngine {
+
+
+/**
+ * Parsed query variables and constraints.
+ *
+ * @var     array   ['selectVars'][] = ?VARNAME
+ *                  ['sources'][] = URI
+ *                  ['patterns'][]['subject']['value'] = VARorURI
+ *                                ['predicate']['value'] = VARorURI
+ *                                ['object']['value'] = VARorURIorLiterl
+ *                                          ['is_literal'] = boolean
+ *                                          ['l_lang'] = string
+ *                                          ['l_dtype'] = string
+ *                  ['filters'][]['string'] = string
+ *                               ['evalFilterStr'] = string
+ *                               ['reqexEqExprs'][]['var'] = ?VARNAME
+ *                                                 ['operator'] = (eq | ne)
+ *                                                 ['regex'] = string
+ *                               ['strEqExprs'][]['var'] = ?VARNAME
+ *                                               ['operator'] = (eq | ne)
+ *                                               ['value'] = string
+ *                                               ['value_type'] = ('variable' | 'URI' | 'Literal')
+ *                                               ['value_lang'] = string
+ *                                               ['value_dtype'] = string
+ *                               ['numExpr']['vars'][] = ?VARNAME
+ *                         ( [] stands for an integer index - 0..N )
+ * @access	private
+ */
+ var $parsedQuery;
+
+
+ /**
+ * Perform an RDQL Query on the given MemModel.
+ *
+ * @param   object  MemModel &$memModel
+ * @param   array   &$parsedQuery  (the same format as $this->parsedQuery)
+ * @param   boolean $returnNodes
+ * @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
+ *      OR  array   [][?VARNAME] = string
+ *
+ * @access  public
+ */
+ function & queryModel(&$memModel, &$parsedQuery, $returnNodes = TRUE) {
+
+   $this->parsedQuery = $parsedQuery;
+
+   // find tuples matching all patterns
+   $res = $this->findTuplesMatchingAllPatterns($memModel);
+
+   // filter tuples
+   if (isset($parsedQuery['filters']))
+      $res = $this->filterTuples($res);
+
+   // select variables to be returned
+   $res = $this->selectVariables($res);
+
+   if(!$returnNodes)
+     return $this->toString($res);
+
+   return $res;
+ }
+ 
+
+ /**
+ * Find triples matching all patterns of an RDQL query and return an array
+ * with variables from all patterns and their corresponding values.
+ * The variable values returned are instances of object Node.
+ *
+ * @param   object  MemModel  &$memModel
+ * @return  array   [][?VARNAME] = object Node
+ *
+ * @access  private
+ */
+ function findTuplesMatchingAllPatterns(&$memModel) {
+
+   $resultSet = $this->findTuplesMatchingOnePattern($memModel, $this->parsedQuery['patterns'][0]);
+   for ($i=1; $i<count($this->parsedQuery['patterns']); $i++) {
+       $rs = $this->findTuplesMatchingOnePattern($memModel, $this->parsedQuery['patterns'][$i]);
+       $resultSet = $this->joinTuples($resultSet, $rs);
+   }
+   return $resultSet;
+ }
+
+
+/**
+ * Find tuples matching one pattern and return an array with pattern
+ * variables and their corresponding values (instances of object Node).
+ *
+ * @param   object  MemModel &$memModel
+ * @param   array  &$pattern ['subject']['value'] = VARorURI
+ *                           ['predicate']['value'] = VARorURI
+ *                           ['object']['value'] = VARorURIorLiterl
+ *                                     ['is_literal'] = boolean
+ *                                     ['l_lang'] = string
+ *                                     ['l_dtype'] = string
+ * @return  array   [][?VARNAME] = object Node
+ *
+ * @access  private
+ */
+ function findTuplesMatchingOnePattern(&$memModel, &$pattern) {
+
+   $resultSet = array();
+   $i = 0;
+   // parameters to be passed to the method findTriplesMatchingPattern
+   foreach ($pattern as $key => $v) {     
+     if ($v['value'] && $v['value']{0} == '?') {
+        if ($key == 'object') {
+            $param['object']['is_a'] = 'ANY';
+            $param['object']['string'] = 'ANY';
+            $param['object']['lang'] = NULL;
+            $param['object']['dtype'] = NULL;
+        } else         	
+     		$param[$key] = 'ANY';
+        $var[$i]['key'] = $key;
+        $var[$i++]['val'] = $v['value'];
+     }else
+        if (isset($v['is_literal'])) {
+          $param[$key]['is_a'] = 'Literal';
+          $param[$key]['string'] = $v['value'];
+          $param[$key]['lang'] = $v['l_lang'];
+          $param[$key]['dtype'] = $v['l_dtype'];
+        }else{
+          if ($key == 'object') {
+             $param[$key]['is_a'] = 'Resource';
+             $param[$key]['string'] = $v['value'];
+             $param[$key]['lang'] = NULL;
+             $param[$key]['dtype'] = NULL;
+          }else
+            $param[$key] = $v['value'];
+        }
+   }
+   
+   // find pattern internal bindings e.g. (?x, ?z, ?x)
+   $intBindings = NULL;
+   for ($i=0; $i<count($var); $i++)
+       foreach($var as $n => $v)
+         if ($i != $n && $var[$i]['val'] == $v['val'])
+            $intBindings[] = $var[$i]['key'];
+
+   // find triples of the $memModel matching $pattern
+   $resModel = $this->findTriplesMatchingPattern($memModel, $param['subject'],
+                                                            $param['predicate'],
+                                                            $param['object']['is_a'],
+                                                            $param['object']['string'],
+                                                            $param['object']['lang'],
+                                                            $param['object']['dtype'],
+                                                 $intBindings);
+
+   // set values of the pattern variables to be returned
+   if ($pattern['subject']['value']{0} == '?') {
+      $n = 0;
+      foreach ($resModel->triples as $triple)
+        $resultSet[$n++][$pattern['subject']['value']] = $triple->subj;
+   }
+   if ($pattern['predicate']['value']{0} == '?') {
+      $n = 0;
+      foreach ($resModel->triples as $triple)
+        $resultSet[$n++][$pattern['predicate']['value']] = $triple->pred;
+   }
+   if ($pattern['object']['value'] && $pattern['object']['value']{0} == '?') {
+      $n = 0;
+      foreach ($resModel->triples as $triple)
+        $resultSet[$n++][$pattern['object']['value']] = $triple->obj;
+   }
+   return $resultSet;
+ }
+
+
+/**
+ * Search in $memModel for triples matching one pattern from the WHERE clause.
+ * 'ANY' input for $subjLabel..$objLabel, $obj_is will match anything.
+ * NULL input for $objDtype will only match obj->dtype = NULL
+ * NULL input for $objLanguage will match obj->lang = NULL or anything if a
+ * literal is datatyped (except for XMLLiterals and plain literals)
+ * This method also checks internal bindings if provided.
+ *
+ * @param   object MemModel $memModel
+ * @param   string $subjLabel
+ * @param   string $predLabel
+ * @param   string $objLabel
+ * @param   string $obj_is
+ * @param   string $objLanguage
+ * @param   string $objDtype
+ * @param   array  $intBindings [] = string
+ * @return  object MemModel
+ * @access	private
+ */
+ function findTriplesMatchingPattern(&$memModel, $subjLabel, $predLabel, $obj_is,
+                                      $objLabel, $objLang, $objDtype, &$intBindings) {
+
+   $res = new MemModel();
+
+   if($memModel->isEmpty())
+    return $res;
+
+   if ($subjLabel=='ANY')
+   {
+       $subj=NULL;
+   } else
+   {
+       $subj=new Resource($subjLabel);
+   };
+   if ($predLabel=='ANY')
+   {
+       $pred=NULL;
+   } else
+   {
+       $pred=new Resource($predLabel);
+   }; 
+            
+   if ($objLabel=='ANY')
+   {
+       $obj=NULL;
+   } else
+   {
+       if ($obj_is == 'Literal')
+       {
+           $obj=new Literal($objLabel);
+           $obj->setDatatype($objDtype);
+           $obj->setLanguage($objLang);
+       } else {
+           $obj=new Resource($objLabel);
+       }
+   };
+   
+   $res=$memModel->find($subj,$pred,$obj);
+
+     if ($intBindings)
+              foreach ($res->triples as $triple)
+        {
+            if (!$this->_checkIntBindings($triple, $intBindings))
+            {
+                  $res->remove($triple);
+            }
+        }
+
+  return $res;
+}
+
+ 
+/**
+ * Perform an SQL-like inner join on two resultSets.
+ *
+ * @param   array   &$finalRes [][?VARNAME] = object Node
+ * @param   array   &$res      [][?VARNAME] = object Node
+ * @return  array              [][?VARNAME] = object Node
+ *
+ * @access  private
+ */
+ function joinTuples(&$finalRes, &$res) {
+
+   if (count($finalRes) == 0 || count($res) == 0)
+      return array();
+
+   // find joint variables and new variables to be added to $finalRes
+   $jointVars = array();
+   $newVars = array();
+   foreach ($res[0] as $varname => $node) {
+     if (array_key_exists($varname, $finalRes[0]))
+        $jointVars[] = $varname;
+     else
+        $newVars[] = $varname;
+   }
+
+   // eliminate rows of $finalRes in which the values of $jointVars do not have
+   // a corresponding row in $res.
+   foreach ($finalRes as $n => $fRes) {
+     foreach ($res as $i => $r) {
+       $ok = TRUE;
+       foreach ($jointVars as $j_varname)
+         if ($r[$j_varname] != $fRes[$j_varname]) {
+            $ok = FALSE;
+            break;
+         }
+       if ($ok)
+          break;
+     }
+     if (!$ok)
+        unset($finalRes[$n]);
+   }
+
+   // join $res and $finalRes
+   $joinedRes = array();
+   foreach ($res as $i => $r) {
+     foreach ($finalRes as $n => $fRes) {
+       $ok = TRUE;
+       foreach ($jointVars as $j_varname)
+         if ($r[$j_varname] != $fRes[$j_varname]) {
+            $ok = FALSE;
+            break;
+         }
+       if ($ok) {
+          $joinedRow = $finalRes[$n];
+          foreach($newVars as $n_varname)
+            $joinedRow[$n_varname] = $r[$n_varname];
+          $joinedRes[] = $joinedRow;
+       }
+     }
+   }
+   
+   return $joinedRes;
+ }
+ 
+
+/**
+ * Filter the result-set of query variables by evaluating each filter from the
+ * AND clause of the RDQL query.
+ *
+ * @param   array  &$finalRes  [][?VARNAME] = object Node
+ * @return  array  [][?VARNAME] = object Node
+ * @access	private
+ */
+ function filterTuples(&$finalRes) {
+
+   foreach ($this->parsedQuery['filters'] as $filter) {
+
+      foreach ($finalRes as $n => $fRes) {
+        $evalFilterStr = $filter['evalFilterStr'];
+
+        // evaluate regex equality expressions of each filter
+        foreach ($filter['regexEqExprs'] as $i => $expr) {
+
+          preg_match($expr['regex'], $fRes[$expr['var']]->getLabel(), $match);
+          $op = substr($expr['operator'], 0,1);
+          if (($op != '!' && !isset($match[0])) || ($op == '!' && isset($match[0])))
+             $evalFilterStr = str_replace("##RegEx_$i##", 'FALSE', $evalFilterStr);
+          else
+             $evalFilterStr = str_replace("##RegEx_$i##", 'TRUE', $evalFilterStr);
+
+        }
+
+        // evaluate string equality expressions
+        foreach ($filter['strEqExprs'] as $i => $expr) {
+
+          $exprBoolVal = 'FALSE';
+          
+          switch ($expr['value_type']) {
+
+            case 'variable':
+                 if (($fRes[$expr['var']] == $fRes[$expr['value']] && $expr['operator'] == 'eq') ||
+                     ($fRes[$expr['var']] != $fRes[$expr['value']] && $expr['operator'] == 'ne'))
+                    $exprBoolVal = 'TRUE';
+                 break;
+                 
+            case 'URI':
+
+                 if (is_a($fRes[$expr['var']], 'Literal')) {
+                    if ($expr['operator'] == 'ne')
+                       $exprBoolVal = 'TRUE';
+                    break;
+                 }
+
+                 if (($fRes[$expr['var']]->getLabel() == $expr['value'] && $expr['operator'] == 'eq') ||
+                     ($fRes[$expr['var']]->getLabel() != $expr['value'] && $expr['operator'] == 'ne'))
+                    $exprBoolVal = 'TRUE';
+                 break;
+                 
+            case 'Literal':
+
+                 if (!is_a($fRes[$expr['var']], 'Literal')) {
+                    if ($expr['operator'] == 'ne')
+                       $exprBoolVal = 'TRUE';
+                    break;
+                 }
+
+                 $filterLiteral= new Literal($expr['value'],$expr['value_lang']);
+                 $filterLiteral->setDatatype($expr['value_dtype']);
+                 
+                $equal=$fRes[$expr['var']]->equals($filterLiteral);
+/*                 if ($fRes[$expr['var']]->getLabel() == $expr['value'] &&
+                     $fRes[$expr['var']]->getDatatype() == $expr['value_dtype']) {
+                     
+                    $equal = TRUE;
+                     
+                    // Lang tags only differentiate literals in rdf:XMLLiterals and plain literals.
+                    // Therefore if a literal is datatyped ignore the language tag.
+                    if ((($expr['value_dtype'] == NULL) ||
+                         ($expr['value_dtype'] == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') ||
+                         ($expr['value_dtype'] == 'http://www.w3.org/2001/XMLSchema#string')) &&
+                        (($fRes[$expr['var']]->getLanguage() != $expr['value_lang'])))
+                        
+                        $equal = FALSE;
+                 }else
+                    $equal = FALSE;
+     */               
+                 if (($equal && $expr['operator'] == 'eq') ||
+                     (!$equal && $expr['operator'] == 'ne'))
+                    $exprBoolVal = 'TRUE';
+                 else
+                    $exprBoolVal = 'FALSE';
+
+          }
+          $evalFilterStr = str_replace("##strEqExpr_$i##", $exprBoolVal, $evalFilterStr);
+       }
+
+        // evaluate numerical expressions
+        foreach ($filter['numExprVars'] as $varName) {
+          $varValue = "'" .$fRes[$varName]->getLabel() ."'";
+          $evalFilterStr = str_replace($varName, $varValue, $evalFilterStr);
+        }
+
+        eval("\$filterBoolVal = $evalFilterStr; \$eval_filter_ok = TRUE;");
+        if (!isset($eval_filter_ok))
+           trigger_error(RDQL_AND_ERR ."'" .htmlspecialchars($filter['string']) ."'", E_USER_ERROR);
+
+        if (!$filterBoolVal)
+           unset($finalRes[$n]);
+      }
+   }
+
+   return $finalRes;
+ }
+
+
+/**
+ * Remove all conditional variables from the result-set and leave only variables
+ * specified in the SELECT clause of the RDQL query.
+ *
+ * @param   array  &$finalRes  [][?VARNAME] = object Node
+ * @return  array  [][?VARNAME] = object Node
+ * @access	private
+ */
+ function selectVariables(&$finalRes) {
+
+   // if nothing has been found return only one row of $finalRes
+   // with select variables having empty values
+   if (count($finalRes) == 0) {
+      foreach ($this->parsedQuery['selectVars'] as $selectVar)
+         $finalRes[0][$selectVar] = NULL;
+      return $finalRes;
+   }
+   
+   // return only selectVars in the same order as given in the RDQL query
+   // and reindex $finalRes.
+   $n = 0;
+   foreach($finalRes as $key => $val) {
+     foreach ($this->parsedQuery['selectVars'] as $selectVar)
+       $resultSet[$n][$selectVar] = $val[$selectVar];
+     unset($finalRes[$key]);
+     ++$n;
+   }
+
+   return $resultSet;
+ }
+
+
+/**
+ * Convert the variable values of $finalRes from objects to their string serialization.
+ *
+ * @param   array  &$finalRes  [][?VARNAME] = object Node
+ * @return  array  [][?VARNAME] = string
+ * @access	private
+ */
+ function toString(&$finalRes) {
+
+   foreach ($finalRes as $n => $tuple)
+     foreach ($tuple as $varname => $node) {
+       if (is_a($node, 'Resource'))
+          $res[$n][$varname] = '<' .$node->getLabel() .'>';
+       elseif (is_a($node, 'Literal')) {
+          $res[$n][$varname] = '"' .$node->getLabel() .'"';
+          if ($node->getLanguage())
+             $res[$n][$varname] .= ' (xml:lang="' .$node->getLanguage() .'")';
+          if ($node->getDatatype())
+             $res[$n][$varname] .= ' (rdf:datatype="' .$node->getDatatype() .'")';
+       }else
+          $res[$n][$varname] = $node;
+     }
+   return $res;
+ }
+
+
+/**
+ * Check if the given triple meets pattern internal bindings
+ * e.g. (?x, ?z, ?x) ==> statement subject must be identical with the statement object
+ *
+ * @param   object statement &$triple
+ * @param   array  &$intBindings [] = string
+ * @return  boolean
+ * @access	private
+ */
+ function _checkIntBindings (&$triple, &$intBindings) {
+
+   if (in_array('subject', $intBindings)) {
+      if (in_array('predicate', $intBindings))
+         if ($triple->subj != $triple->pred)
+            return FALSE;
+      if (in_array('object', $intBindings)) {
+         if (is_a($triple->obj, 'Literal'))
+            return FALSE;
+         elseif ($triple->subj != $triple->obj)
+            return FALSE;
+      }
+      return TRUE;
+   }
+   if (in_array('predicate', $intBindings)) {
+      if (is_a($triple->obj, 'Literal'))
+         return FALSE;
+      elseif ($triple->pred != $triple->obj)
+             return FALSE;
+      return TRUE;
+   }
+ }
+
+
+/**
+ * Check if the lang and dtype of the passed object Literal are equal $lang and $dtype
+ * !!! Language only differentiates literals in rdf:XMLLiterals and plain literals (xsd:string).
+ * !!! Therefore if a literal is datatyped ignore the language.
+ *
+ * @param  object  Literal $literal
+ * @param  string  $dtype1
+ * @param  string  $dtype2
+ * @return boolean
+ * @access private
+ */
+ function _equalsLangDtype ($literal, $lang, $dtype) {
+
+   if ($dtype == $literal->getDatatype()) {
+      if (($dtype == NULL ||
+           $dtype == 'http://www.w3.org/2001/XMLSchema#string' ||
+           $dtype == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') &&
+          ($lang != $literal->getLanguage()))
+         return FALSE;
+      return TRUE;
+   }
+   return FALSE;
+ }
+ 
+ 
+} // end: Class RdqlMemEngine
+
+?>
Index: Dev/branches/Demo/rdfapi/rdql/RdqlParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/rdql/RdqlParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/rdql/RdqlParser.php	(revision 225)
@@ -0,0 +1,1063 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdqlParser
+// ----------------------------------------------------------------------------------
+
+/**
+ * This class contains methods for parsing an Rdql query string into PHP variables.
+ * The output of the RdqlParser is an array with variables and constraints
+ * of each query clause (Select, From, Where, And, Using).
+ * To perform an RDQL query this array has to be passed to the RdqlEngine.
+ *
+ * @version  $Id: RdqlParser.php 282 2006-06-08 06:25:14Z tgauss $
+ * @author   Radoslaw Oldakowski <radol@gmx.de>
+ *
+ * @package rdql
+ * @access public
+ */
+
+
+Class RdqlParser extends Object{
+
+/**
+ * Parsed query variables and constraints.
+ * { } are only used within the parser class and are not returned as parsed query.
+ * ( [] stands for an integer index - 0..N )  
+ *
+ * @var     array   ['selectVars'][] = ?VARNAME
+ *                  ['sources'][]{['value']} = URI | QName
+ *								 {['is_qname'] = boolean}
+ *                  ['patterns'][]['subject']['value'] = VARorURI
+ *											{['is_qname'] = boolean}
+ *                                ['predicate']['value'] = VARorURI
+ *											  {['is_qname'] = boolean}
+ *                                ['object']['value'] = VARorURIorLiterl
+ *							     		   {['is_qname'] = boolean} 
+ *                                          ['is_literal'] = boolean
+ *                                          ['l_lang'] = string
+ *                                          ['l_dtype'] = string
+ *                                         {['l_dtype_is_qname'] = boolean}
+ *                  ['filters'][]['string'] = string
+ *                               ['evalFilterStr'] = string
+ *                               ['reqexEqExprs'][]['var'] = ?VARNAME
+ *                                                 ['operator'] = (eq | ne)
+ *                                                 ['regex'] = string
+ *                               ['strEqExprs'][]['var'] = ?VARNAME
+ *                                               ['operator'] = (eq | ne)
+ *                                               ['value'] = string
+ *                                               ['value_type'] = ('variable' | 'URI' | 'QName' | 'Literal')
+ *                                               ['value_lang'] = string
+ *                                               ['value_dtype'] = string
+ *                                              {['value_dtype_is_qname'] = boolean}
+ *                               ['numExpr']['vars'][] = ?VARNAME
+ *                 {['ns'][PREFIX] = NAMESPACE}    
+ * @access	private
+ */
+ var $parsedQuery;
+
+
+/**
+ * Query string divided into a sequence of tokens.
+ * A token is either: ' ' or "\n" or "\r" or "\t" or ',' or '(' or ')'
+ * or a string containing any characters except from the above.
+ *
+ * @var     array
+ * @access	private
+ */
+ var $tokens;
+
+
+/**
+ * Parse the given RDQL query string and return an array with query variables and constraints.
+ *
+ * @param   string  $queryString
+ * @return  array   $this->parsedQuery
+ * @access	public
+ */
+ function & parseQuery($queryString) {
+
+   $cleanQueryString = $this->removeComments($queryString);
+   $this->tokenize($cleanQueryString);
+   $this->startParsing();
+   if ($this->parsedQuery['selectVars'][0] == '*')
+      $this->parsedQuery['selectVars'] = $this->findAllQueryVariables();
+   else
+      $this->_checkSelectVars();
+   $this->replaceNamespacePrefixes();
+
+   return $this->parsedQuery;
+ }
+
+
+/**
+ *  Remove comments from the passed query string.
+ *
+ *  @param  string  $query
+ *  @return string
+ *  @throws PHPError
+ *  @access private
+ */
+ function removeComments($query) {
+ 
+   $last = strlen($query)-1;
+   $query .= ' ';
+   $clean = '';
+   for ($i=0; $i<=$last; $i++) {
+     // don't search for comments inside a 'literal'@lang^^dtype or "literal"@lang^^dtype
+     if ($query{$i} == "'" || $query{$i} == '"') {
+        $quotMark = $query{$i};
+        do
+          $clean .= $query{$i++};
+        while($i < $last && $query{$i} != $quotMark);
+        $clean .= $query{$i};
+        // language
+        if ($query{$i+1} == '@') {
+           do{
+             if ($query{$i+1} == '^' && $query{$i+2} == '^')
+                break;
+             $clean .= $query{++$i};
+           }while ($i < $last && $query{$i} != ' '  && $query{$i} != "\t"
+                              && $query{$i} != "\n" && $query{$i} != "\r");
+        }
+        // datatype
+        if ($query{$i+1} == '^' && $query{$i+2} == '^') {
+            do
+              $clean .= $query{++$i};
+            while ($i < $last && $query{$i} != ' '  && $query{$i} != "\t"
+                             && $query{$i} != "\n" && $query{$i} != "\r" );
+        }
+     // don't search for comments inside an <URI> either
+     }elseif ($query{$i} == '<') {
+        do{
+           $clean .= $query{$i++};
+        }while($i < $last && $query{$i} != '>');
+        $clean .= $query{$i};
+     }elseif ($query{$i} == '/') {
+        // clear: // comment
+        if ($i < $last && $query{$i+1} == '/') {
+            while($i < $last && $query{$i} != "\n" && $query{$i} != "\r")
+              ++$i;
+            $clean .= ' ';
+        // clear: /*comment*/
+        }elseif ($i < $last-2 && $query{$i+1} == '*') {
+            $i += 2;
+            while($i < $last  && ($query{$i} != '*' || $query{$i+1} != '/'))
+              ++$i;
+            if ($i >= $last && ($query{$last-1} != '*' || $query{$last} != '/'))
+               trigger_error(RDQL_SYN_ERR .": unterminated comment - '*/' missing", E_USER_ERROR);
+            ++$i;
+        }else
+          $clean .= $query{$i};
+     }else
+        $clean .= $query{$i};
+   }
+   return $clean;
+ }
+
+
+/**
+ * Divide the query string into tokens.
+ * A token is either: ' ' or "\n" or "\r" or '\t' or ',' or '(' or ')'
+ * or a string containing any character except from the above.
+ *
+ * @param   string  $queryString
+ * @access	private
+ */
+ function tokenize($queryString) {
+
+   $queryString = trim($queryString, " \r\n\t");
+   $specialChars = array (" ", "\t", "\r", "\n", ",", "(", ")");
+   $len = strlen($queryString);
+   $this->tokens[0]='';
+   $n = 0;
+
+   for ($i=0; $i<$len; ++$i) {
+       if (!in_array($queryString{$i}, $specialChars))
+          $this->tokens[$n] .= $queryString{$i};
+       else {
+          if ($this->tokens[$n] != '')
+             ++$n;
+          $this->tokens[$n] = $queryString{$i};
+          $this->tokens[++$n] = '';
+       }
+   }
+ }
+
+
+/**
+ * Start parsing of the tokenized query string.
+ *
+ * @access private
+ */
+ function startParsing() {
+
+   $this->parseSelect();
+ }
+
+
+/**
+ * Parse the SELECT clause of an Rdql query.
+ * When the parsing of the SELECT clause is finished, this method will call
+ * a suitable method to parse the subsequent clause.
+ *
+ * @throws	PhpError
+ * @access	private
+ */
+  function parseSelect() {
+
+   $this->_clearWhiteSpaces();
+
+   // Check if the queryString contains a "SELECT" token
+   if (strcasecmp('SELECT', current($this->tokens)))
+      trigger_error(RDQL_SEL_ERR  ."'" .current($this->tokens)
+                                  ."' - SELECT keyword expected", E_USER_ERROR);
+   unset($this->tokens[key($this->tokens)]);
+   $this->_clearWhiteSpaces();
+
+   // Parse SELECT *
+   if (current($this->tokens) == '*') {
+      unset($this->tokens[key($this->tokens)]);
+      $this->parsedQuery['selectVars'][0] = '*';
+      $this->_clearWhiteSpaces();
+      if (strcasecmp('FROM', current($this->tokens))
+          && strcasecmp('SOURCE', current($this->tokens))
+          && strcasecmp('WHERE', current($this->tokens)))
+        trigger_error(RDQL_SYN_ERR .": '" .htmlspecialchars(current($this->tokens))
+                               ."' - SOURCE or WHERE clause expected", E_USER_ERROR);
+   }
+
+   // Parse SELECT ?Var (, ?Var)*
+   $commaExpected = FALSE;
+   $comma = FALSE;
+   while (current($this->tokens) != NULL) {
+     $k = key($this->tokens);
+     $token = $this->tokens[$k];
+
+     switch ($token) {
+        case ',': if (!$commaExpected)
+                     trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR);
+                  $comma = TRUE;
+                  $commaExpected = FALSE;
+                  break;
+        case '(':
+        case ')': trigger_error(RDQL_SEL_ERR ." '$token' - illegal input", E_USER_ERROR);
+                  break;
+        default :
+                  if (!strcasecmp('FROM', $token) || !strcasecmp('SOURCE', $token)) {
+                     if ($comma)
+                        trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR);
+                     unset($this->tokens[$k]);
+                     return $this->parseFrom();
+                  }elseif (!strcasecmp('WHERE', $token) && !$comma) {
+                     if ($comma)
+                        trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR);
+                     unset($this->tokens[$k]);
+                     return $this->parseWhere();
+                  }
+                  if ($token{0} == '?') {
+                     $this->parsedQuery['selectVars'][] = $this->_validateVar($token, RDQL_SEL_ERR);
+                     $commaExpected = TRUE;
+                     $comma = FALSE;
+                  }else
+                     trigger_error(RDQL_SEL_ERR ." '$token' - '?' missing", E_USER_ERROR);
+     }
+     unset($this->tokens[$k]);
+     $this->_clearWhiteSpaces();
+   }
+   trigger_error(RDQL_SYN_ERR . ': WHERE clause missing', E_USER_ERROR);
+ }
+
+
+/**
+ * Parse the FROM/SOURCES clause of an Rdql query
+ * When the parsing of this clause is finished, parseWhere() will be called.
+ *
+ * @throws	PhpError
+ * @access	private
+ */
+ function parseFrom() {
+
+   $comma = FALSE;
+   $commaExpected = FALSE;
+   $i = -1;
+   while (current($this->tokens) != NULL) {
+
+      $this->_clearWhiteSpaces();
+      if (!strcasecmp('WHERE', current($this->tokens)) && count($this->parsedQuery['sources']) != 0) {
+         if ($comma)
+            trigger_error(RDQL_SEL_ERR ." ',' - unexpected comma", E_USER_ERROR);
+         unset($this->tokens[key($this->tokens)]);
+         return $this->parseWhere();
+      }
+      if (current($this->tokens) == ',') {
+         if ($commaExpected) {
+            $comma = TRUE;
+            $commaExpected = FALSE;
+            unset($this->tokens[key($this->tokens)]);
+         }else
+            trigger_error(RDQL_SRC_ERR ."',' - unecpected comma", E_USER_ERROR);
+      }else{
+        $token = current($this->tokens);
+        $this->parsedQuery['sources'][++$i]['value'] = $this->_validateURI($token, RDQL_SRC_ERR);
+        if ($token{0} != '<')
+        	$this->parsedQuery['sources'][$i]['is_qname'] = TRUE;
+        $commaExpected = TRUE;
+        $comma = FALSE;
+      }
+   }
+   trigger_error(RDQL_SYN_ERR .': WHERE clause missing', E_USER_ERROR);
+ }
+
+
+/**'
+ * Parse the WHERE clause of an Rdql query.
+ * When the parsing of the WHERE clause is finished, this method will call
+ * a suitable method to parse the subsequent clause if provided.
+ *
+ * @throws	PhpError
+ * @access	private
+ */
+ function parseWhere() {
+
+   $comma = FALSE;
+   $commaExpected = FALSE;
+   $i=0;
+
+   do {
+     $this->_clearWhiteSpaces();
+     if (!strcasecmp('AND', current($this->tokens))
+         && count($this->parsedQuery['patterns']) != 0){
+        if ($comma)
+            trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR);
+        unset($this->tokens[key($this->tokens)]);
+        return $this->parseAnd();
+     }elseif (!strcasecmp('USING', current($this->tokens))
+              && count($this->parsedQuery['patterns']) != 0) {
+        if ($comma)
+            trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR);
+        unset($this->tokens[key($this->tokens)]);
+        return $this->parseUsing();
+     }
+
+     if (current($this->tokens) == ',') {
+        $comma = TRUE;
+        $this->_checkComma($commaExpected, RDQL_WHR_ERR);
+
+     }else{
+
+        if (current($this->tokens) != '(')
+           trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens)
+                                      ."' - '(' expected", E_USER_ERROR);
+        unset($this->tokens[key($this->tokens)]);
+        $this->_clearWhiteSpaces();
+
+        $this->parsedQuery['patterns'][$i]['subject'] = $this->_validateVarUri(current($this->tokens));
+        $this->_checkComma(TRUE, RDQL_WHR_ERR);
+        $this->parsedQuery['patterns'][$i]['predicate'] = $this->_validateVarUri(current($this->tokens));
+        $this->_checkComma(TRUE, RDQL_WHR_ERR);
+        $this->parsedQuery['patterns'][$i++]['object'] = $this->_validateVarUriLiteral(current($this->tokens));
+        $this->_clearWhiteSpaces();
+
+       if (current($this->tokens) != ')')
+          trigger_error(RDQL_WHR_ERR ."'" .current($this->tokens) ."' - ')' expected", E_USER_ERROR);
+       unset($this->tokens[key($this->tokens)]);
+       $this->_clearWhiteSpaces();
+       $commaExpected = TRUE;
+       $comma = FALSE;
+     }
+   }while(current($this->tokens) != NULL);
+
+   if ($comma)
+      trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR);
+ }
+
+
+/**
+ * Parse the AND clause of an Rdql query
+ *
+ * @throws	PhpError
+ * @access	private
+ * @todo clear comments
+ */
+ function parseAnd() {
+
+   $this->_clearWhiteSpaces();
+   $n = 0;
+   $filterStr = '';
+
+   while(current($this->tokens) != NULL) {
+     $k = key($this->tokens);
+     $token = $this->tokens[$k];
+
+     if (!strcasecmp('USING', $token)) {
+        $this->parseFilter($n, $filterStr);
+        unset($this->tokens[$k]);
+        return $this->parseUsing();
+     }elseif ($token == ',') {
+        $this->parseFilter($n, $filterStr);
+        $filterStr = '';
+        $token = '';
+        ++$n;
+     }
+     $filterStr .= $token;
+     unset($this->tokens[$k]);
+   }
+   $this->parseFilter($n, $filterStr);
+ }
+ 
+ 
+/**
+ * Parse the USING clause of an Rdql query
+ *
+ * @throws	PhpError
+ * @access	private
+ */
+ function parseUsing() {
+
+  $commaExpected = FALSE;
+  $comma = FALSE;
+
+  do {
+    $this->_clearWhiteSpaces();
+    if (current($this->tokens) == ',') {
+        $comma = TRUE;
+        $this->_checkComma($commaExpected, RDQL_USG_ERR);
+    }else{
+       $prefix = $this->_validatePrefix(current($this->tokens));
+       $this->_clearWhiteSpaces();
+
+       if (strcasecmp('FOR', current($this->tokens)))
+          trigger_error(RDQL_USG_ERR ." keyword: 'FOR' missing in the namespace declaration: '", E_USER_ERROR);
+       unset($this->tokens[key($this->tokens)]);
+       $this->_clearWhiteSpaces();
+
+       $this->parsedQuery['ns'][$prefix] = $this->_validateUri(current($this->tokens), RDQL_USG_ERR);
+       $this->_clearWhiteSpaces();
+       $commaExpected = TRUE;
+       $comma = FALSE;
+    }
+  }while(current($this->tokens) != NULL);
+
+  if ($comma)
+      trigger_error(RDQL_WHR_ERR ." ',' - unexpected comma", E_USER_ERROR);
+ }
+
+
+/**
+ * Check if a filter from the AND clause contains an equal number of '(' and ')'
+ * and parse filter expressions.
+ *
+ * @param   integer $n
+ * @param   string  $filter
+ * @throws  PHPError
+ * @access	private
+ */
+ function parseFilter($n, $filter) {
+
+   if ($filter == NULL)
+      trigger_error(RDQL_AND_ERR ." ',' - unexpected comma", E_USER_ERROR);
+   $paren = substr_count($filter, '(') - substr_count($filter, ')');
+   if ($paren != 0) {
+      if ($paren > 0)
+         $errorMsg = "'" .htmlspecialchars($filter) ."' - ')' missing ";
+      elseif ($paren < 0)
+         $errorMsg = "'" .htmlspecialchars($filter) ."' - too many ')' ";
+      trigger_error(RDQL_AND_ERR .$errorMsg, E_USER_ERROR);
+   }
+
+   $this->parsedQuery['filters'][$n] = $this->parseExpressions($filter);
+ }
+
+
+/**
+ * Parse expressions inside the passed filter:
+ * 1)  regex equality expressions:    ?var [~~ | =~ | !~ ] REG_EX
+ * 2a) string equality expressions:   ?var  [eq | ne] "literal"@lang^^dtype.
+ * 2b) string equality expressions:   ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name
+ * 3)  numerical expressions: e.q.    (?var1 - ?var2)*4 >= 20
+ *
+ * In cases 1-2 parse each expression of the given filter into an array of variables.
+ * For each parsed expression put a place holder (e.g. ##RegEx_1##) into the filterStr.
+ * The RDQLengine will then replace each place holder with the outcomming boolean value
+ * of the corresponding expression.
+ * The remaining filterStr contains only numerical expressions and place holders.
+ *
+ * @param   string  $filteStr
+ * @return  array   ['string'] = string
+ *                  ['evalFilterStr'] = string
+ *                  ['reqexEqExprs'][]['var'] = ?VARNAME
+ *                                    ['operator'] = (eq | ne)
+ *                                    ['regex'] = string
+ *                  ['strEqExprs'][]['var'] = ?VARNAME
+ *                                 ['operator'] = (eq | ne)
+ *                                 ['value'] = string
+ *                                 ['value_type'] = ('variable' | 'URI' | 'QName'| 'Literal')
+ *                                 ['value_lang'] = string
+ *                                 ['value_dtype'] = string
+ *								   ['value_dtype_is_qname'] = boolean
+ *                  ['numExpr']['vars'][] = ?VARNAME
+ * @access	private
+ */
+ function parseExpressions($filterStr) {
+
+   $parsedFilter['string'] = $filterStr;
+   $parsedFilter['regexEqExprs'] = array();
+   $parsedFilter['strEqExprs'] = array();
+   $parsedFilter['numExprVars'] = array();
+
+   // parse regex string equality expressions, e.g. ?x ~~ !//foo.com/r!i
+   $reg_ex  = "/(\?[a-zA-Z0-9_]+)\s+([~!=]~)\s+(['|\"])?([^\s'\"]+)(['|\"])?/";
+   preg_match_all($reg_ex, $filterStr, $eqExprs);
+   foreach ($eqExprs[0] as $i => $eqExpr) {
+     $this->_checkRegExQuotation($filterStr, $eqExprs[3][$i], $eqExprs[5][$i]);
+     $parsedFilter['regexEqExprs'][$i]['var'] = $this->_isDefined($eqExprs[1][$i]);
+     $parsedFilter['regexEqExprs'][$i]['operator'] = $eqExprs[2][$i];
+     $parsedFilter['regexEqExprs'][$i]['regex'] = $eqExprs[4][$i];
+
+     $filterStr = str_replace($eqExpr, " ##RegEx_$i## ", $filterStr);
+   }
+
+   // parse ?var  [eq | ne] "literal"@lang^^dtype
+   $reg_ex  = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\'[^\']*\'|\"[^\"]*\")";
+   $reg_ex .= "(@[a-zA-Z]+)?(\^{2}\S+:?\S+)?/i";
+   preg_match_all($reg_ex, $filterStr, $eqExprs);
+   foreach ($eqExprs[0] as $i => $eqExpr) {
+     $parsedFilter['strEqExprs'][$i]['var'] = $this->_isDefined($eqExprs[1][$i]);#
+     $parsedFilter['strEqExprs'][$i]['operator'] = strtolower($eqExprs[2][$i]);
+     $parsedFilter['strEqExprs'][$i]['value'] = trim($eqExprs[3][$i],"'\"");
+     $parsedFilter['strEqExprs'][$i]['value_type'] = 'Literal';
+     $parsedFilter['strEqExprs'][$i]['value_lang'] = substr($eqExprs[4][$i], 1);     
+     $dtype = substr($eqExprs[5][$i], 2);
+     if ($dtype) {
+        $parsedFilter['strEqExprs'][$i]['value_dtype'] = $this->_validateUri($dtype, RDQL_AND_ERR);
+        if ($dtype{0} != '<')
+	       $parsedFilter['strEqExprs'][$i]['value_dtype_is_qname'] = TRUE; 	 
+     }else 
+        $parsedFilter['strEqExprs'][$i]['value_dtype'] = '';
+
+     $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$i## ", $filterStr);
+   }
+   
+   // parse ?var [eq | ne] ?var
+   $ii = count($parsedFilter['strEqExprs']);
+   $reg_ex  = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+(\?[a-zA-Z0-9_]+)/i";
+   preg_match_all($reg_ex, $filterStr, $eqExprs);
+   foreach ($eqExprs[0] as $i => $eqExpr) {
+     $parsedFilter['strEqExprs'][$ii]['var'] = $this->_isDefined($eqExprs[1][$i]);
+     $parsedFilter['strEqExprs'][$ii]['operator'] = strtolower($eqExprs[2][$i]);
+     $parsedFilter['strEqExprs'][$ii]['value'] = $this->_isDefined($eqExprs[3][$i]);
+     $parsedFilter['strEqExprs'][$ii]['value_type'] = 'variable';
+
+     $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$ii## ", $filterStr);
+     $ii++;
+   }
+
+   // parse ?var [eq | ne] <URI> or ?var [eq | ne] prefix:local_name
+   $reg_ex  = "/(\?[a-zA-Z0-9_]+)\s+(eq|ne)\s+((<\S+>)|(\S+:\S*))/i";
+   preg_match_all($reg_ex, $filterStr, $eqExprs);
+   foreach ($eqExprs[0] as $i => $eqExpr) {
+     $parsedFilter['strEqExprs'][$ii]['var'] = $this->_isDefined($eqExprs[1][$i]);
+     $parsedFilter['strEqExprs'][$ii]['operator'] = strtolower($eqExprs[2][$i]);
+     if ($eqExprs[4][$i]) {
+     	$parsedFilter['strEqExprs'][$ii]['value'] = trim($eqExprs[4][$i], "<>");
+     	$parsedFilter['strEqExprs'][$ii]['value_type'] = 'URI';
+     }else if($eqExprs[5][$i]){
+     	$this->_validateQName($eqExprs[5][$i], RDQL_AND_ERR);
+     	$parsedFilter['strEqExprs'][$ii]['value'] = $eqExprs[5][$i];
+     	$parsedFilter['strEqExprs'][$ii]['value_type'] = 'QName';
+     }
+
+     $filterStr = str_replace($eqExprs[0][$i], " ##strEqExpr_$ii## ", $filterStr);
+     $ii++;
+   }  
+   
+   $parsedFilter['evalFilterStr'] = $filterStr;
+
+   // all that is left are numerical expressions and place holders for the above expressions
+   preg_match_all("/\?[a-zA-Z0-9_]+/", $filterStr, $vars);
+   foreach ($vars[0] as $var) {
+     $parsedFilter['numExprVars'][] = $this->_isDefined($var);
+   }
+
+   return $parsedFilter;
+ }
+
+
+/**
+ * Find all query variables used in the WHERE clause.
+ *
+ * @return  array [] = ?VARNAME
+ * @access	private
+ */
+ function findAllQueryVariables() {
+
+   $vars = array();
+   foreach ($this->parsedQuery['patterns'] as $pattern) {
+     $count = 0;
+     foreach ($pattern as $v) {
+       if ($v['value'] && $v['value']{0} == '?') {
+          ++$count;
+          if (!in_array($v['value'], $vars))
+             $vars[] = $v['value'];
+       }
+     }
+     if (!$count)
+        trigger_error(RDQL_WHR_ERR .'pattern contains no variables', E_USER_ERROR);
+   }
+
+   return $vars;
+ }
+
+
+/**
+ * Replace all namespace prefixes in the pattern and constraint clause of an rdql query
+ * with the namespaces declared in the USING clause and default namespaces.
+ *
+ * @access	private
+ */
+ function replaceNamespacePrefixes() {
+
+   global $default_prefixes;
+
+   if (!isset($this->parsedQuery['ns']))
+      $this->parsedQuery['ns'] = array();
+
+   // add default namespaces
+   // if in an rdql query a reserved prefix (e.g. rdf: rdfs:) is used
+   // it will be overridden by the default namespace defined in constants.php
+   $this->parsedQuery['ns'] = array_merge($this->parsedQuery['ns'], $default_prefixes);
+
+   // replace namespace prefixes in the FROM clause
+   if (isset($this->parsedQuery['sources']))
+   	  foreach ($this->parsedQuery['sources'] as $n => $source) {
+   	  	if (isset($source['is_qname']))
+   	  	   $this->parsedQuery['sources'][$n] = $this->_replaceNamespacePrefix($source['value'], RDQL_SRC_ERR);
+   	  	else {
+   	  	   foreach ($this->parsedQuery['ns'] as $prefix => $uri) 
+   	  	     $source['value'] = preg_replace("$prefix:", $uri, $source['value']);   	  	   	  	   	  	     
+   	  	   $this->parsedQuery['sources'][$n] = $source['value'];
+   	  	}   	  	   
+   	  	   
+   	  }
+   
+   // replace namespace prefixes in the where clause
+   foreach ($this->parsedQuery['patterns'] as $n => $pattern) {
+     foreach ($pattern as $key => $v)
+       if ($v['value'] && $v['value']{0} != '?') {
+       	  if (isset($v['is_qname'])) {      	  	       	  	
+          	 $this->parsedQuery['patterns'][$n][$key]['value']
+          	 	= $this->_replaceNamespacePrefix($v['value'], RDQL_WHR_ERR);
+          	 unset($this->parsedQuery['patterns'][$n][$key]['is_qname']);	 
+       	  } else { // is quoted URI (== <URI>) or Literal          	
+              if (isset($this->parsedQuery['patterns'][$n][$key]['is_literal'])) {
+              	 if (isset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname'])) {   
+          	 		$this->parsedQuery['patterns'][$n][$key]['l_dtype']
+          	 			= $this->_replaceNamespacePrefix($v['l_dtype'], RDQL_WHR_ERR);          	 			
+          	 		unset($this->parsedQuery['patterns'][$n][$key]['l_dtype_is_qname']);	
+              	 }else {
+              	   foreach ($this->parsedQuery['ns'] as $prefix => $uri)
+                     $this->parsedQuery['patterns'][$n][$key]['l_dtype']
+                       = preg_replace("'$prefix:'", $uri, $this->parsedQuery['patterns'][$n][$key]['l_dtype']);
+              	 }     
+       	      }else {
+                 foreach ($this->parsedQuery['ns'] as $prefix => $uri)
+               	   $this->parsedQuery['patterns'][$n][$key]['value']
+                     = preg_replace("'$prefix:'", $uri, $this->parsedQuery['patterns'][$n][$key]['value']);
+              }
+       	  }
+       }
+   }
+
+   // replace prefixes in the constraint clause
+   if (isset($this->parsedQuery['filters']))
+      foreach ($this->parsedQuery['filters'] as $n => $filter)
+        foreach ($filter['strEqExprs'] as $i => $expr) {
+          if ($expr['value_type'] == 'QName') {         	
+          	 $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']
+          	 	= $this->_replaceNamespacePrefix($expr['value'], RDQL_AND_ERR);        	 	
+			 $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_type'] = 'URI';          	 	 	
+          }
+          if ($expr['value_type'] == 'URI')
+             foreach ($this->parsedQuery['ns'] as $prefix => $uri)
+               $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']
+                 = preg_replace("'$prefix:'", $uri,
+                    $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value']);
+          elseif ($expr['value_type'] == 'Literal') {
+          	 if (isset($expr['value_dtype_is_qname'])) {
+          	 	$this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']
+          	 	   = $this->_replaceNamespacePrefix($expr['value_dtype'], RDQL_AND_ERR);          	 	   
+          	 	unset($this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype_is_qname']);		
+          	 } else {
+               foreach ($this->parsedQuery['ns'] as $prefix => $uri)
+                 $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']
+                   = preg_replace("$prefix:", $uri,
+                      $this->parsedQuery['filters'][$n]['strEqExprs'][$i]['value_dtype']);
+          	 }
+          }
+        }
+
+   unset($this->parsedQuery['ns']);
+ }
+
+
+// =============================================================================
+// *************************** helper functions ********************************
+// =============================================================================
+
+
+/**
+ * Remove whitespace-tokens from the array $this->tokens
+ *
+ * @access	private
+ */
+ function _clearWhiteSpaces() {
+
+   while (current($this->tokens) == ' '  ||
+          current($this->tokens) == "\n" ||
+          current($this->tokens) == "\t" ||
+          current($this->tokens) == "\r")
+
+      unset($this->tokens[key($this->tokens)]);
+ }
+
+
+/**
+ * Check if the query string of the given clause contains an undesired ','.
+ * If a comma was correctly placed then remove it and clear all whitespaces.
+ *
+ * @param   string  $commaExpected
+ * @param   string  $clause_error
+ * @throws  PHPError
+ * @access  private
+ */
+ function _checkComma($commaExpected, $clause_error) {
+
+   $this->_clearWhiteSpaces();
+   if (current($this->tokens) == ',') {
+      if (!$commaExpected)
+         trigger_error($clause_error ."',' - unexpected comma", E_USER_ERROR);
+      else {
+         unset($this->tokens[key($this->tokens)]);
+         $this->_checkComma(FALSE, $clause_error);
+      }
+   }
+ }
+ 
+
+/**
+ * Check if the given token is either a variable (?var) or the first token of an URI (<URI>).
+ * In case of an URI this function returns the whole URI string.
+ *
+ * @param   string  $token
+ * @return  array ['value'] = string
+ * @throws  PHPError
+ * @access	private
+ */
+ function _validateVarUri($token) {
+ 	
+   if ($token{0} == '?') {
+      $token_res['value'] = $this->_validateVar($token, RDQL_WHR_ERR);
+   } else {
+   	  $token_res['value'] = $this->_validateUri($token, RDQL_WHR_ERR);
+   	  if ($token{0} != '<')
+   	  	$token_res['is_qname'] = TRUE;   	  
+   }           
+   return $token_res;
+ }
+
+
+/**
+ * Check if the given token is either a variable (?var) or the first token
+ * of either an URI (<URI>) or a literal ("Literal").
+ * In case of a literal return an array with literal properties (value, language, datatype).
+ * In case of a variable or an URI return only ['value'] = string.
+ *
+ * @param   string  $token
+ * @return  array ['value'] = string
+ *				  ['is_qname'] = boolean
+ *                ['is_literal'] = boolean
+ *                ['l_lang'] = string
+ *                ['l_dtype'] = string
+ * @throws  PHPError
+ * @access	private
+ */
+ function _validateVarUriLiteral($token) {
+ 
+   if ($token{0} == '?')
+      $statement_object['value'] = $this->_validateVar($token, RDQL_WHR_ERR);   
+   elseif ($token{0} == "'" || $token{0} == '"')
+      $statement_object = $this->_validateLiteral($token);
+   elseif ($token{0} == '<')
+      $statement_object['value'] = $this->_validateUri($token, RDQL_WHR_ERR);      
+   elseif (ereg(':', $token)) {
+   	  $statement_object['value'] = $this->_validateUri($token, RDQL_WHR_ERR);
+   	  $statement_object['is_qname'] = TRUE;
+   }else
+   	  trigger_error(RDQL_WHR_ERR ." '$token' - ?Variable, &lt;URI&gt;, QName, or \"LITERAL\" expected", E_USER_ERROR);   
+   return $statement_object;      
+ }
+ 
+
+/**
+ * Check if the given token is a valid variable name (?var).
+ *
+ * @param   string  $token
+ * @param   string  $clause_error
+ * @return  string
+ * @throws  PHPError
+ * @access	private
+ */
+ function _validateVar($token, $clause_error) {
+
+   preg_match("/\?[a-zA-Z0-9_]+/", $token, $match);
+   if (!isset($match[0]) || $match[0] != $token)
+      trigger_error($clause_error ."'" .htmlspecialchars($token)
+                    ."' - variable name contains illegal characters", E_USER_ERROR);
+   unset($this->tokens[key($this->tokens)]);
+   return $token;
+ }
+
+
+/**
+ * Check if $token is the first token of a valid URI (<URI>) and return the whole URI string
+ *
+ * @param   string  $token
+ * @param   string  $clause_error
+ * @return  string
+ * @throws  PHPError
+ * @access	private
+ */
+ function _validateUri($token, $clause_error) {
+
+   if ($token{0} != '<') {
+      if (strpos($token, ':') && $this->_validateQName($token, $clause_error)) {
+      	unset($this->tokens[key($this->tokens)]);
+      	return rtrim($token, ':');
+      }
+      $errmsg = $clause_error .'\'' .htmlspecialchars($token) .'\' ';
+      if ($clause_error == RDQL_WHR_ERR)
+         $errmsg .= "- ?Variable or &lt;URI&gt; or QName expected";
+      else
+         $errmsg .= "- &lt;URI&gt; or QName expected";
+      trigger_error($errmsg, E_USER_ERROR);
+   }else{
+      $token_res = $token;
+      while($token{strlen($token)-1} != '>' && $token != NULL) {
+        if ($token == '(' || $token == ')' || $token == ',' ||
+            $token == ' ' || $token == "\n" || $token == "\r") {
+           trigger_error($clause_error .'\'' .htmlspecialchars($token_res)
+                          ."' - illegal input: '$token' - '>' missing", E_USER_ERROR);
+        }
+        unset($this->tokens[key($this->tokens)]);
+        $token = current($this->tokens);
+        $token_res .= $token;
+      }
+      if ($token == NULL)
+         trigger_error($clause_error .'\'' .htmlspecialchars($token_res) ."' - '>' missing", E_USER_ERROR);
+      unset($this->tokens[key($this->tokens)]);
+      return trim($token_res, '<>');
+   }
+ }
+
+
+/**
+ * Check if $token is the first token of a valid literal ("LITERAL") and
+ * return an array with literal properties (value, language, datatype).
+ *
+ * @param   string  $token
+ * @return  array   ['value'] = string
+ *                  ['is_literal'] = boolean
+ *                  ['l_lang'] = string
+ *                  ['l_dtype'] = string
+ *					['l_dtype_is_qname'] = boolean
+ * @throws  PHPError
+ * @access	private
+ */
+ function _validateLiteral($token) {
+
+   $quotation_mark = $token{0};
+   $statement_object = array ('value' => '',
+                              'is_literal' => TRUE,
+                              'l_lang' => '',
+                              'l_dtype' => '');
+   $this->tokens[key($this->tokens)] = substr($token,1);
+
+   $return = FALSE;
+   foreach ($this->tokens as $k => $token) {
+
+     if ($token != NULL && $token{strlen($token)-1} == $quotation_mark) {
+         $token = rtrim($token, $quotation_mark);
+         $return = TRUE;
+
+      // parse @language(^^datatype)?
+     }elseif (strpos($token, $quotation_mark .'@') || substr($token, 0, 2)  == $quotation_mark .'@') {
+        $lang = substr($token, strpos($token, $quotation_mark .'@')+2);
+        if (strpos($lang, '^^') || substr($lang, 0,2) == '^^') {
+           $dtype = substr($lang, strpos($lang, '^^')+2);
+           if (!$dtype)
+              trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
+                                         .$token  ." - datatype expected" ,E_USER_ERROR);
+                                         
+		   $statement_object['l_dtype'] = $this->_validateUri($dtype, RDQL_WHR_ERR);
+		   if ($dtype{0} != '<')
+		      $statement_object['l_dtype_is_qname'] = TRUE;		      
+        
+           $lang = substr($lang, 0, strpos($lang, '^^'));
+        }
+        if (!$lang)
+           trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
+                                      .$token ." - language expected" ,E_USER_ERROR);
+        $statement_object['l_lang'] = $lang;
+        $token = substr($token, 0, strpos($token, $quotation_mark .'@'));
+        $return = TRUE;
+
+     // parse ^^datatype
+     }elseif (strpos($token, $quotation_mark .'^^') || substr($token, 0, 3)  == $quotation_mark .'^^') {
+        $dtype = substr($token, strpos($token, $quotation_mark .'^^')+3);
+        if (!$dtype)
+           trigger_error(RDQL_WHR_ERR .$quotation_mark .$statement_object['value']
+                                      .$token  ." - datatype expected" ,E_USER_ERROR);       
+
+        $statement_object['l_dtype'] = $this->_validateUri($dtype, RDQL_WHR_ERR);
+		if ($dtype{0} != '<')
+		   $statement_object['l_dtype_is_qname'] = TRUE;		   
+
+        $token = substr($token, 0, strpos($token, $quotation_mark .'^^'));
+        $return = TRUE;
+     }elseif (strpos($token, $quotation_mark))
+        trigger_error(RDQL_WHR_ERR ."'$token' - illegal input", E_USER_ERROR);
+     $statement_object['value'] .= $token;
+     unset($this->tokens[$k]);
+     if ($return)
+        return $statement_object;
+   }
+   trigger_error(RDQL_WHR_ERR ."quotation end mark: $quotation_mark missing", E_USER_ERROR);
+ }
+
+ 
+/**
+ * Check if the given token is a valid QName. 
+ *
+ * @param   string  $token
+ * @param   string  $clause_error
+ * @return  boolean
+ * @throws  PHPError
+ * @access	private
+ */
+function _validateQName($token, $clause_error) {
+ 
+  $parts = explode(':', $token);
+  if (count($parts) > 2)
+  	trigger_error($clause_error ."illegal QName: '$token'", E_USER_ERROR);
+  if (!$this->_validateNCName($parts[0]))
+  	trigger_error($clause_error ."illegal prefix in QName: '$token'", E_USER_ERROR);
+  if ($parts[1] && !$this->_validateNCName($parts[1]))
+  	trigger_error($clause_error ."illegal local part in QName: '$token'", E_USER_ERROR);
+  	
+  return TRUE;
+}
+
+
+/**
+ * Check if the given token is a valid NCName. 
+ *
+ * @param   string  $token
+ * @return  boolean
+ * @access	private
+ */ 
+function _validateNCName($token) {
+	
+  preg_match("/[a-zA-Z_]+[a-zA-Z_0-9.\-]*/", $token, $match);
+  if (isset($match[0]) && $match[0] == $token)
+  	return TRUE;
+  return FALSE;	
+}
+
+
+/**
+ * Check if the given token is a valid namespace prefix.
+ *
+ * @param   string  $token
+ * @return  string
+ * @throws  PHPError
+ * @access	private
+ */
+ function _validatePrefix($token) {
+
+   if (!$this->_validateNCName($token))
+      trigger_error(RDQL_USG_ERR ."'" .htmlspecialchars($token)
+                                 ."' - illegal input, namespace prefix expected", E_USER_ERROR);
+   unset($this->tokens[key($this->tokens)]);
+   return $token;
+ }
+
+/**
+ * Replace a prefix in a given QName and return a full URI.
+ *
+ * @param   string  $qName
+ * @param   string  $clasue_error
+ * @return  string
+ * @throws  PHPError
+ * @access	private
+ */ 
+ function _replaceNamespacePrefix($qName, $clause_error) {
+
+   $qName_parts = explode(':', $qName);
+   if (!array_key_exists($qName_parts[0], $this->parsedQuery['ns']))
+      trigger_error($clause_error .'undefined prefix: \'' .$qName_parts[0] .'\' in: \'' .$qName .'\'', E_USER_ERROR);
+   return $this->parsedQuery['ns'][$qName_parts[0]] .$qName_parts[1];
+ } 
+          	 	
+          	 	
+/**
+ * Check if all variables from the SELECT clause are defined in the WHERE clause
+ *
+ * @access private
+ */
+ function _checkSelectVars() {
+
+   foreach ($this->parsedQuery['selectVars'] as $var)
+     $this->_isDefined($var);
+ }
+
+
+/**
+ * Check if the given variable is defined in the WHERE clause.
+ *
+ * @param $var string
+ * @return     string
+ * @throws PHPError
+ * @access private
+ */
+ function _isDefined($var) {
+
+   $allQueryVars = $this->findAllQueryVariables();
+
+   if (!in_array($var, $allQueryVars))
+      trigger_error(RDQL_SYN_ERR .": '$var' - variable must be defined in the WHERE clause", E_USER_ERROR);
+   return $var;
+ }
+
+
+/**
+ * Throw an error if the regular expression from the AND clause is not quoted.
+ *
+ * @param  string $filterString
+ * @param  string $lQuotMark
+ * @param  string $rQuotMark
+ * @throws PHPError
+ * @access private
+ */
+ function _checkRegExQuotation($filterString, $lQuotMark, $rQuotMark) {
+
+   if (!$lQuotMark)
+      trigger_error(RDQL_AND_ERR ."'$filterString' - regular expressions must be quoted", E_USER_ERROR);
+
+   if ($lQuotMark != $rQuotMark)
+      trigger_error(RDQL_AND_ERR ."'$filterString' - quotation end mark in the regular expression missing", E_USER_ERROR);
+ }
+
+} // end: Class RdqlParser
+
+?>
Index: Dev/branches/Demo/rdfapi/rdql/RdqlResultIterator.php
===================================================================
--- Dev/branches/Demo/rdfapi/rdql/RdqlResultIterator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/rdql/RdqlResultIterator.php	(revision 225)
@@ -0,0 +1,193 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdqlResultIterator
+// ----------------------------------------------------------------------------------
+
+/**
+ * Iterator for traversing Rdql results. 
+ * This class can be used for iterating forward and backward trough Rdql results.
+ * It should be instanced using the rdqlQueryAsIterator() method of a MemModel or a DBModel.
+ * 
+ * @version  $Id: RdqlResultIterator.php 268 2006-05-15 05:28:09Z tgauss $
+ * @author Daniel Westphal <mail@d-westphal.de>, Chris Bizer <chris@bizer.de>
+ *
+ * @package rdql
+ * @access	public
+ *
+ */ 
+ class RdqlResultIterator extends Object {
+
+ 	/**
+	* Reference to the Rdql result
+	* @var		array RdqlResult
+	* @access	private
+	*/	
+    var $RdqlResult;
+
+ 	/**
+	* Current position
+	* RdqlResultIterator does not use the build in PHP array iterator,
+	* so you can use serveral iterators on a single Rdql result.
+	* @var		integer
+	* @access	private
+	*/	
+    var $position;
+   
+  
+   /**
+    * Constructor
+    *
+    * @param	object RdqlResult
+	* @access	public
+    */
+    function RdqlResultIterator(&$RdqlResult) {
+    	
+     	$noResult = TRUE;
+    	foreach($RdqlResult[0] as $value) 
+      		if ($value != NULL) {
+      	   		$noResult = FALSE;
+      	   		break;
+      		} 	
+      		
+      	if($noResult)  	     	
+       		$this->RdqlResult = NULL;
+       	else 
+       		$this->RdqlResult = $RdqlResult;	
+
+		$this->position = -1;
+	}
+ 
+  /**
+   * Returns the labels of the result as array.
+   * @return	array of strings with the result labels OR null if there are no results.
+   * @access	public  
+   */
+  function getResultLabels() {
+		if(count($this->RdqlResult)>0) {
+  			return array_keys($this->RdqlResult[0]);
+		} else return null;
+   }
+
+   /**
+   * Returns the number of results.
+   * @return	integer
+   * @access	public  
+   */
+  function countResults() {
+		
+  			return count($this->RdqlResult);
+
+   }
+  /**
+   * Returns TRUE if there are more results.
+   * @return	boolean
+   * @access	public  
+   */
+  function hasNext() {
+  		if ($this->position < count($this->RdqlResult) - 1 ) {			
+  			return TRUE;
+		} else {
+			return FALSE;
+		}
+   }
+
+  /**
+   * Returns TRUE if the first result has not been reached.
+   * @return	boolean
+   * @access	public  
+   */
+  function hasPrevious() {
+  		if ($this->position > 0) {
+			return TRUE;
+		} else {
+			return FALSE;
+		}   }   
+   
+  /**
+   * Returns the next result array.
+   * @param 	integer $element	
+   * @return	result array OR single result if $element was specified OR NULL if there is no next result.
+   * @access	public  
+   */
+  function next($element = null) {
+  		if ($this->position < count($this->RdqlResult) - 1) {
+  			$this->position++;
+			if ($element) {return $this->RdqlResult[$this->position][$element];}
+  				else return $this->RdqlResult[$this->position];
+		} else {
+			return NULL;
+		}
+   }
+
+  /**
+   * Returns the previous result.
+   * @param 	integer $element	
+   * @return	result array OR single result if $element was specified OR NULL if there is no next result.
+   * @access	public  
+   */
+  function previous($element = null) {
+    	if ($this->position > 0) {
+  			$this->position--;
+			if ($element) {return $this->RdqlResult[$this->position][$element];}
+  				else return $this->RdqlResult[$this->position];
+		} else {
+			return NULL;
+		}   
+  }
+
+  /**
+   * Returns the current result.
+   * @param 	integer $element	
+   * @return	result array OR single result if $element was specified OR NULL if there is no next result.
+   * @access	public  
+   */
+  function current($element = null) {
+  		if (($this->position >= 0) && ($this->position < count($this->RdqlResult))) {
+			if ($element) {return $this->RdqlResult[$this->position][$element];}
+  				else return $this->RdqlResult[$this->position];
+		} else {
+			return NULL;
+		} 
+   }
+   
+  /**
+   * Moves the pointer to the first result.
+   * @return	void
+   * @access	public  
+   */
+  function moveFirst() {
+  			$this->position = 0;
+   }
+
+  /**
+   * Moves the pointer to the last result.
+   * @return	void
+   * @access	public  
+   */
+  function moveLast() {
+  			$this->position = count($this->RdqlResult) - 1;
+   }
+   
+     /**
+   * Moves the pointer to a specific result.
+   * If you set an off-bounds value, next(), previous() and current() will return NULL
+   * @return	void
+   * @access	public  
+   */
+  function moveTo($position) {
+  			$this->position = $position;
+   }
+   
+     /**
+   * Returns the current position of the iterator.
+   * @return	integer
+   * @access	public  
+   */
+  function getCurrentPosition() {
+  	 		return $this->position;
+   }
+  
+} 
+
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResAlt.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResAlt.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResAlt.php	(revision 225)
@@ -0,0 +1,78 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResAlt
+// ----------------------------------------------------------------------------------
+
+/**
+* This interface defines methods for accessing RDF Alternative resources. 
+* These methods operate on the RDF statements contained in a model.
+*
+* @version  $Id: ResAlt.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+* @package 	resModel
+* @access	public
+**/
+class ResAlt extends ResContainer 
+{
+	
+	/**
+    * Constructor
+	* You can supply a URI
+    *
+    * @param string $uri 
+	* @access	public
+    */	
+	function ResAlt($uri = null)
+	{
+		parent::ResContainer($uri);
+		$this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_ALT);
+	}
+	
+	/**
+	*  Return the default value for this resource
+	*
+   	* @return	object ResResource/ResLiteral 
+   	* @access	public
+   	*/
+	function getDefault()
+	{
+		//get the first memeber
+		$statements=$this->listProperties($this->_getMembershipPropertyWithIndex(1));
+		if(isset($statements[0]))
+		{
+			//return the value
+			return $statements[0]->getObject();
+		} else 
+		{
+			return null;
+		}
+	}
+	
+	/**
+	*  Set the default value of this container.
+	*
+   	* @param	object ResResource/ResLiteral $object
+   	* @access	public
+   	*/
+	function setDefault($object)
+	{
+		//remember the old default value
+		$oldDefaultObject=$this->getDefault();
+		//if there wasn't a default value before
+		if($oldDefaultObject === null)
+		{
+			//add the new value
+			$this->addProperty($this->_getMembershipPropertyWithIndex(1),$object);
+		} else 
+		{
+			//remove the old value
+			$this->removeAll($this->_getMembershipPropertyWithIndex(1));
+			//set the new value
+			$this->addProperty($this->_getMembershipPropertyWithIndex(1),$object);
+			//add the old default value at the end
+			$this->add($oldDefaultObject);
+		}
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResBag.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResBag.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResBag.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResBag
+// ----------------------------------------------------------------------------------
+
+/**
+* This interface defines methods for accessing RDF Bag resources. 
+* These methods operate on the RDF statements contained in a model.
+*
+* @version  $Id: ResBag.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+* @package 	resModel
+* @access	public
+**/
+class ResBag extends ResContainer 
+{
+	
+	/**
+    * Constructor
+	* You can supply a URI
+    *
+    * @param string $uri 
+	* @access	public
+    */		
+	function ResBag($uri = null)
+	{
+		parent::ResContainer($uri);
+		$this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_BAG);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResContainer.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResContainer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResContainer.php	(revision 225)
@@ -0,0 +1,219 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResContainer
+// ----------------------------------------------------------------------------------
+
+/**
+* An RDF Container.
+* This Class defines methods for accessing RDF container resources. 
+* These methods operate on the RDF statements contained in a model. 
+*
+* @version  $Id: ResContainer.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+* @package 	resModel
+* @access	public
+**/
+
+class ResContainer extends ResResource 
+{
+	/**
+	* Holds a ResResource of this container type rdf:Seq, rdf:Alt, or rdf:Bag
+	* @var		ResResource
+	* @access	private
+	*/
+	var $containerType;
+	
+	
+	/**
+    * Constructor
+	* You can supply a URI
+    *
+    * @param string $uri 
+	* @access	public
+    */	
+	function ResContainer($uri = null)
+	{
+		parent::ResResource($uri);
+	}	
+	
+	/**
+	* Add a new value to a container.
+	* The new value is added as the last element of the container.
+	*
+   	* @param	object ResResource/ResLiteral	$object
+   	* @access	public
+   	*/
+	function add($object)
+	{
+		//type this container, if it isn't already typed
+		if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE)))
+			$this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType);
+		//get the current size
+		$actualSize=$this->size();
+		//add the object to the last position
+		$this->addProperty(new ResResource(RDF_NAMESPACE_URI.'_'.($actualSize+1)),$object);
+	}
+	
+	/**
+	* Determine whether the container contains a value
+	*
+   	* @param	obejct ResResource/ResLiteral	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function contains($resResource)
+	{
+		//get all container's properties 
+		foreach ($this->listProperties() as $statement)
+		{
+			//if the property matches a container membership property
+			if ($this->_predicateLabelMatchesMembershipProperty($statement->getLabelPredicate()))
+			{
+				//check, if it's the value, we're looking for. 
+				if ($resResource->equals($statement->getObject()))
+					return true;
+			}	
+		}
+		return false;
+	}
+	
+	/**
+	* Returns true, if this resource is a container from type rdf:Alt
+	*
+   	* @return	boolean 
+   	* @access	public
+   	*/	
+	function isAlt()
+	{
+		return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_ALT);
+	}
+	
+	/**
+	* Returns true, if this resource is a container from type rdf:Bag
+	*
+   	* @return	boolean 
+   	* @access	public
+   	*/	
+	function isBag()
+	{
+		return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_BAG);
+	}
+
+	/**
+	* Returns true, if this resource is a container from type rdf:Seq
+	*
+   	* @return	boolean 
+   	* @access	public
+   	*/	
+	function isSeq()
+	{
+		return ($this->containerType->getURI()==RDF_NAMESPACE_URI.RDF_SEQ);
+	}
+	
+	/**
+	* Get an array of all resources that are values of this container
+	*
+   	* @return	array 
+   	* @access	public
+   	*/	
+	function getMembers()
+	{
+		$return=array();
+		foreach ($this->listProperties() as $statement)
+		{
+			$predicateLabel=$statement->getLabelPredicate();
+			if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel))
+			{
+				$return[$this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)] = $statement->getObject();
+			}	
+		}
+		return $return;
+	}
+	
+	/**
+	* Remove a value from the container.
+	* 
+	* Once removed, the values in the container with a higher ordinal value are renumbered. 
+	* The renumbering algorithm depends on the type of container.
+	*
+   	* @param	obejct ResResource/ResLiteral	$resResource
+   	* @access	public
+   	*/
+	function remove($object)
+	{
+		$deleteFromIndex=array();
+		//get all container members
+		$memberIndex=$this->getMembers();
+		
+		//check each container member if it equals the resoure to be removed
+		foreach ($memberIndex as $key => $value)
+		{
+			//save the statements positio in the container
+			if($object->equals($value))
+					$deleteFromIndex[]=$key;	
+		}
+
+		//delete all found container members
+		foreach ($deleteFromIndex as $index)
+		{
+			$this->removeAll($this->_getMembershipPropertyWithIndex($index));
+
+			//renumber all members with higher ordinal numbers than the deleted one
+			for ($i = $index;$i < count($memberIndex); $i++)
+			{
+				$this->removeAll($this->_getMembershipPropertyWithIndex($i+1));
+				$this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]);
+			}		
+		}
+		
+	}
+	
+	/**
+	* Returns the number values in the container.
+	*
+   	* @return	integer 
+   	* @access	public
+   	*/	
+	function size()
+	{
+		return count($this->getMembers());
+	}
+	
+	/**
+	* Checks, if a predicate label fits a container membership property rdf:_n
+	*
+   	* @param	string	$predicateLabel
+   	* @return	boolean 
+   	* @access	private
+   	*/
+	function _predicateLabelMatchesMembershipProperty($predicateLabel)
+	{
+		return substr($predicateLabel,0,strlen(RDF_NAMESPACE_URI.'_')) == RDF_NAMESPACE_URI.'_';
+	}
+	
+	/**
+	* Get the ordinal number from a membership property rdf:_n
+	*
+   	* @param	string	$predicateLabel
+   	* @return	integer 
+   	* @access	private
+   	*/
+	function _getMemberIndexNrFromMembershipPropertyLabel($predicateLabel)
+	{
+		return (int)substr($predicateLabel,strlen(RDF_NAMESPACE_URI.'_'));
+	}
+	
+	/**
+	* Get a membership property rdf:_n with index $int 
+	*
+   	* @param	intger	$int
+   	* @return	string 
+   	* @access	private
+   	*/
+	function _getMembershipPropertyWithIndex($int)
+	{
+		return new ResResource(RDF_NAMESPACE_URI.'_'.$int);	
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResIterator.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResIterator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResIterator.php	(revision 225)
@@ -0,0 +1,298 @@
+<?php 
+/**
+* ----------------------------------------------------------------------------------
+* Class: ResIterator
+* ----------------------------------------------------------------------------------
+*
+* @package 	resModel
+*/
+
+
+/**
+* Implementation of a resource iterator.
+*
+* This Iterator should be used in a for-loop like:
+* $it = $ontClass->listInstances();
+* for ($it->rewind(); $it->valid(); $it->next())
+* {
+*	$currentResource=$it->current();
+* };
+*
+*
+* @version  $Id: ResIterator.php 522 2007-08-14 09:22:22Z cweiske $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	resModel
+* @access	public
+**/
+class ResIterator
+{
+	/**
+	* Holds a reference to the assoiated ResModel / OntModel
+	* @var		object Model
+	* @access	private
+	*/
+	var $associatedModel;
+	
+	/**
+	* The current position
+	* @var		integer
+	* @access	private
+	*/
+	var $key;
+	
+	/**
+	* If the current resource is valid
+	* @var		boolean
+	* @access	private
+	*/
+	var $valid;
+	
+	/**
+	* The current resource
+	* @var obejct ResResource
+	* @access	private
+	*/
+	var $currentResource;
+	
+	/**
+	* The subject to search for.
+	* @var		object ResResource
+	* @access	private
+	*/
+	var $searchSubject;
+	
+	/**
+	* The predicate to search for.
+	* @var		object ResResource
+	* @access	private
+	*/
+	var $searchPredicate;
+	
+	/**
+	* The object to search for.
+	* @var		object ResResource
+	* @access	private
+	*/
+	var $searchObject;
+	
+	/**
+	* If the resource, we're intrested in is the subject (s), predicate(p), 
+	* or object (o) of the found statements
+	* 
+	* @var		string
+	* @access	private
+	*/
+	var $getSPO;
+	
+	/**
+	* Defines the type of resource, we'd like to receive.
+	* 
+	* @var		string
+	* @access	private
+	*/
+	var $returnType;
+	
+	/**
+	* If set, each resource will first be checked, if it's
+	* language fits.
+	* 
+	* @var		string
+	* @access	private
+	*/
+	var $findLiteralWithLang;
+	
+	
+	/**
+    * Constructor.
+    *
+	* $subject, $predicate, and $object are used like inf find().
+	* $getSPO supports the strings 's', 'p', and 'o' to return
+	* either the subject, predicate, or object of the result statements.
+	* $returnType supports the strings 'ResProperty', 'ResLiteral',
+	* 'OntProperty', 'OntClass', and 'Individual' and returns the resources
+	* as the matching type.
+    *
+    * @param object ResResource  $subject
+    * @param object ResResource  $predicate
+    * @param object ResResource  $object
+    * @param string				 $getSPO
+    * @param object ResModel	 $associatedModel
+    * @param string				 $returnType
+	* @access	public
+    */
+	function ResIterator($subject,$predicate,$object,$getSPO,& $associatedModel,$returnType = false)
+	{
+		$this->searchSubject =& $subject;
+		$this->searchPredicate =& $predicate;
+		$this->searchObject =& $object;
+		$this->getSPO = $getSPO;
+		$this->returnType = $returnType;
+		$this->associatedModel =& $associatedModel;
+		$this->findLiteralWithLang = false;
+	}
+	
+	/**
+    * Resets iterator list to start
+    *
+	* @access	public
+    */
+	function rewind()
+	{
+		$this->key = -1;
+		$this->next();
+	}
+	
+	/**
+    * Says if there are additional items left in the list
+    *
+    * @return	boolean
+	* @access	public
+    */
+	function valid()
+	{
+		return $this->valid;
+	}
+	
+	/**
+    * Moves Iterator to the next item in the list
+    *
+	* @access	public
+    */
+	function next()
+	{
+		$this->key++;
+		$this->valid=($this->_getNextResource());
+	}
+	
+	/**
+    * Returns the current item
+    *
+    * @return	mixed
+	* @access	public
+    */
+	function current()
+	{
+		return $this->currentResource;
+	}
+	
+	/**
+    * Returns the next Resource (subject, predicate, 
+    * or object of the next matching statement).
+    *
+    * @return	object resResource
+	* @access	private
+    */
+	function _getNextResource()
+	{
+		if ($this->findLiteralWithLang)
+		{ 
+			do 
+			{
+				$nextStatement = $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key);
+				if ($nextStatement === null)
+					return false;
+					
+				$object = $nextStatement->getObject();
+				if ($object->getLanguage() != $this->findLiteralWithLang)
+				{
+					$hasCorrectLanguage=false;
+					$this->key++;
+				} else 
+				{
+					$hasCorrectLanguage=true;
+				}
+					
+			} while (!$hasCorrectLanguage);
+		} else 
+		{
+			$nextStatement = $this->associatedModel->findFirstMatchingStatement($this->searchSubject,$this->searchPredicate,$this->searchObject,$this->key);
+		}
+		if ($nextStatement === null)
+			return false;
+		
+		switch ($this->getSPO) 
+		{
+			case 's':
+				 $this->currentResource = $this->_getResourceAs($nextStatement->getSubject());
+				break;
+
+			case 'p':
+				 $this->currentResource = $this->_getResourceAs($nextStatement->getPredicate());
+				break;
+				
+			case 'o':
+				 $this->currentResource = $this->_getResourceAs($nextStatement->getObject());
+				break;
+		}
+		return (true);
+	}
+	
+	/**
+    * Returns the key of the current item
+    *
+    * @return	integer
+	* @access	public
+    */
+	function key()
+	{
+		return $this->key;
+	}
+	
+	/**
+    * Sets that only Literals with the matching 
+    * language should be returned
+    *
+    * @param	string
+	* @access	public
+    */
+	function setFindLiteralWithLang($language)
+	{
+		$this->findLiteralWithLang = $language;
+	}
+	
+	/**
+    * Returns the $resource as an instance of the type
+    * specified in $this->returnType.
+    *
+    * @param	object ResResource
+    * @return	object ResResource
+	* @access	private
+    */
+	function _getResourceAs($resource)
+	{
+		if ($this->findLiteralWithLang && $resource->getLanguage() != $this->findLiteralWithLang)
+			$this->_getNextResource();
+
+		if($this->returnType)	
+			switch ($this->returnType) {
+		
+				case 'ResProperty':
+						return $this->associatedModel->createProperty($resource->getLabel());
+					break;
+					
+				case 'ResLiteral':
+						$newLiteral = $this->associatedModel->createLiteral($resource->getLabel(),$resource->getLanguage());
+						$newLiteral->setDatatype($resource->getDatatype());
+						return $newLiteral;
+					break;
+					
+				case 'OntProperty':
+
+						return $this->associatedModel->createOntProperty($resource->getLabel());
+					break;
+					
+				case 'OntClass':
+						return $this->associatedModel->createOntClass($resource->getLabel());
+					break;
+					
+				case 'Individual':
+					return $this->associatedModel->createIndividual($resource->getLabel());
+				break;
+			}
+		return $resource;
+	}
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResList.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResList.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResList.php	(revision 225)
@@ -0,0 +1,635 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResList
+// ----------------------------------------------------------------------------------
+
+/**
+* Implementation of an rdf:Collection (rdf:List)
+* Provides a convenience encapsulation for lists formed from 
+* chains of RDF statements arranged to form a head/tail cons-cell 
+* structure. 
+* 
+* A well-formed list has cells that are made up of three statements: 
+* one denoting the rdf:type of the list cell, one denoting the link 
+* to the value of the list at that point, and one pointing to the 
+* list tail. If a list cell is not well-formed, list operations may 
+* fail in unpredictable ways. However, to explicitly check that the 
+* list is well-formed at all times is expensive, but you can call
+* the isValid() method to manually check, if the list is well formed.
+*
+*
+* @version  $Id: ResList.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+
+*
+* @package resModel
+* @access	public
+*/
+class ResList extends ResResource 
+{
+	/**
+	* Holds a ResResource with the uri rdf:rest
+	* @var		ResResource
+	* @access	private
+	*/
+	var $rdfRestResource;
+	
+	/**
+	* Holds a ResResource with the uri rdf:first
+	* @var		ResResource
+	* @access	private
+	*/
+	var $rdfFirstResource;
+		
+	/**
+	* Holds a ResResource with the uri rdf:nil
+	* @var		ResResource
+	* @access	private
+	*/
+	var $rdfNilResource;
+	
+	
+	/**
+    * Constructor
+	* You can supply a URI
+    *
+    * @param string $uri 
+	* @access	public
+    */		
+	function ResList($uri = null)
+	{
+		//call the parent's constructor
+		parent::ResResource($uri);
+		//initialize vars
+		$this->rdfRestResource = new ResResource(RDF_NAMESPACE_URI.RDF_REST);
+		$this->rdfFirstResource = new ResResource(RDF_NAMESPACE_URI.RDF_FIRST);
+		$this->rdfNilResource = new ResResource(RDF_NAMESPACE_URI.RDF_NIL);
+	}
+
+	/**
+	* Returns the value of the list element at the specified position or null.
+	*
+   	* @param	integer	$position
+   	* @return	ResResource 
+   	* @access	public
+   	*/
+	function get($position)
+	{
+		//init
+		$listElement=$this;
+		//walk through the list until the position in the list is reached
+		for ($i=0;$i<$position;$i++)
+		{
+			$listElement=$this->_getRestElement($listElement);
+			if($listElement===null)
+				return null;	
+		}
+		//return the associated value
+		return $this->_getValue($listElement);	
+	}	
+
+	/**
+	*  Add the given value to the end of the list. 
+	*  it is only defined if this is not the empty list.
+	*
+   	* @param	object ResResource	$resource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function add($resource)
+	{
+		//return false if this list is the empty list
+		if($this->uri==RDF_NAMESPACE_URI.RDF_NIL)
+			return false;
+		
+		//if this is the first value	
+		if ($this->isEmpty())
+		{
+			$newLastElement =& $this;
+		} else
+		//if there are other values in the list 
+		{
+			//get the last list element
+			$lastElement=$this->_getListElement();
+			//remove the rdf:rest property
+			$lastElement->removeAll($this->rdfRestResource);
+			//create a new list element
+			$newLastElement=$this->model->createResource();
+			//concatenate the new list element with the list
+			$lastElement->addProperty($this->rdfRestResource,$newLastElement);
+		}
+		//add the value
+		$newLastElement->addProperty($this->rdfFirstResource,$resource);
+		//ad the rdf:nil property to the last list element
+		$newLastElement->addProperty($this->rdfRestResource,$this->rdfNilResource);
+		
+		return true;
+	}
+	
+	/**
+	*  Update the head of the list to have the given value, 
+	*  and return the previous value.
+	*
+   	* @param	object ResResource	$value
+   	* @return	ResResource 
+   	* @access	public
+   	*/
+	//todo: error handling, when empty list
+	function setHead($value)
+	{	
+		//save the old value	
+		$oldValue=$this->getHead();
+		//remove the old value
+		$this->removeAll($this->rdfFirstResource);
+		//add the new value
+		$this->addProperty($this->rdfFirstResource,$value);
+		
+		//return the old value
+		return $oldValue;
+	}
+	
+	/**
+	* Get the value that is associated with the head of the list.
+	*
+   	* @return	ResResource 
+   	* @access	public
+   	*/
+	//todo: error handling, falls empty list
+	function getHead()
+	{
+		return $this->_getValue($this);
+	}
+	
+	/**
+	*  Remove the head of the list. The tail of the list 
+	*  remains in the model. Note that no changes are made to 
+	*  list cells that point to this list cell as their tail. 	
+	*
+   	* @return	ResList 
+   	* @access	public
+   	*/
+	function removeHead()
+	{
+		//get the second list element
+		$rest=$this->_getRestElement($this);
+		//remove the first element
+		$this->removeAll($this->rdfFirstResource);
+		$this->removeAll($this->rdfRestResource);
+		//change this Resource URI to that of the second list element
+		//thus makin it the fist element
+		$this->uri=$rest->getURI();
+		
+		//return the new list
+		return $this;
+	}	
+
+	/**
+	* Get the Position of the first occurrence of the given value in the list, 
+	* or -1 if the value is not in the list.
+	* You can supply an offset to search for values. (First element has offset 0)
+	* Default is 0
+	*
+   	* @param	object ResResource	$resource
+    * @param	integer	$offset
+   	* @return	integer 
+   	* @access	public
+   	*/
+	function indexOf($resource, $offset = 0)
+	{
+		//init
+		$element=$this;
+		$actualIndex=0;
+
+		//walk through the list until the value is found and the position is higher than
+		//the offset
+		while ($actualIndex < $offset || !$resource->equals($this->_getValue($element)))
+		{
+			//get next list element
+			$element=$this->_getRestElement($element);
+			$actualIndex++;
+			
+			//if the end of the list is reached and the value isn't found
+			if ($element===null)
+				return null;
+		}
+		//return the index value
+		return $actualIndex;	
+	}
+	
+	/**
+	* Replace the value at the i'th position in the list with the given value
+	*
+   	* @param	integer				$index
+   	* @param	object ResResource	$resource
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function replace($index, $resource)
+	{
+		//get the list element at the $index position
+		$listElement=$this->_getListElement($index);
+		//get the old value
+		$oldValue=$this->_getValue($listElement);
+		//remove the old value
+		$listElement->removeAll($this->rdfFirstResource);
+		//add the new value
+		$listElement->addProperty($this->rdfFirstResource,$resource);
+		//return the old value
+		return $oldValue;
+	}
+	
+	/**
+	* Answer true if the given node appears as the value of a value 
+	* of any of the cells of this list.
+	*
+   	* @param	object ResResource	$value
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function contains($value)
+	{
+		//return true, if a position was found.
+		$result=$this->indexOf($value);
+		return ($result!==null);
+	}
+	
+	/**
+	* Get the list that is the tail of this list.
+	*
+   	* @return	object ResList 
+   	* @access	public
+   	*/
+	function getTail()
+	{
+		//get the second list element
+		$nextListElement= $this->_getRestElement($this);
+		//return the second element as new list
+		return $this->model->createList($nextListElement->getURI());	
+	}
+	
+	/**
+	* Remove all of the components of this list from the model. 
+	* Note that this is operation is only removing the list cells 
+	* themselves, not the resources referenced by the list - 
+	* unless being the object of an rdf:first  statement is the 
+	* only mention of that resource in the model.
+	*
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function removeList()
+	{
+		$element=$this;
+
+		while ($element!==null)
+		{
+			$nextElement=$this->_getRestElement($element);
+			
+			$element->removeAll($this->rdfFirstResource);
+			$element->removeAll($this->rdfRestResource);
+					
+			if (($nextElement !== null) && ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL))
+			{
+				$element=$nextElement;
+			} else 
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	* Returns true, if this list is empty
+	*
+   	* @param	object Statement	$statement
+   	* @return	integer 
+   	* @access	public
+   	*/
+	function isEmpty()
+	{
+		return !$this->hasProperty($this->rdfFirstResource);
+	}
+	
+	/**
+	* Get all values in the list as an array of ResResources
+	*
+   	* @return	array 
+   	* @access	public
+   	*/
+	function getContentInArray()
+	{
+		$result=array();
+		$element=$this;
+
+		while ($element!==null)
+		{
+			//add the value of the current element to the result if is set.
+			$value=$this->_getValue($element);
+			if ($value!==null)
+				$result[]=$value;
+			
+			//walk through the list until it's end		
+			$nextElement=$this->_getRestElement($element);
+			if (($nextElement !== null) && ($nextElement->getURI()!==RDF_NAMESPACE_URI.RDF_NIL))
+			{
+				$element=$nextElement;
+			} else 
+			{
+				break;
+			}
+		}
+		//return the result
+		return $result;
+	}
+	
+	/**
+	* Change the tail of this list to point to the given list, so that this list 
+	* becomes the list of the concatenation of the elements of 
+	* both lists. This is a side-effecting operation on this list; 
+	* for a non side-effecting alternative, see append. 
+	* 
+	*
+   	* @param	object ResList	$ResList
+   	* @access	public
+   	*/
+	function concatenate($ResList)
+	{
+		//get the last list element
+		$lastElement=$this->_getListElement();
+		//remove the old tail (rdf:nil)
+		$lastElement->removeAll($this->rdfRestResource);
+		//add the $ResList as new tail
+		$lastElement->addProperty($this->rdfRestResource,$ResList);
+	}
+	
+	/**
+	* Answer a new list that is formed by adding each element of 
+	* this list to the head of the given list. This is a non 
+	* side-effecting operation on either this list or the given 
+	* list, but generates a copy of this list. For a more storage 
+	* efficient alternative, see concatenate
+	*
+   	* @param	object ResList	$ResList
+   	* @return	object ResList 
+   	* @access	public
+   	*/
+	function append($resList)
+	{
+		//get a copy of this list
+		$newList=$this->copy();
+		
+		//add all values from the $resList to the new list
+		foreach ($resList->getContentInArray() as $value)
+		{
+			$newList->add($value);	
+		}
+		//return the new list
+		return $newList;
+	}
+	
+	/**
+	* Answer a list that contains all of the elements of this 
+	* list in the same order, but is a duplicate copy in the 
+	* underlying model.
+	*
+   	* @return	object ResList 
+   	* @access	public
+   	*/
+	function copy()
+	{
+		//create a new list in the model
+		$newList=$this->model->createList();
+		//add all values from this list to the new list
+		foreach ($this->getContentInArray() as $value)
+		{
+			$newList->add($value);	
+		}
+		//return the new list
+		return $newList;
+	}
+	
+	/**
+	* Return a reference to a new list cell whose head is value  
+	* and whose tail is this list.
+	*
+   	* @param	object ResResource	$value
+   	* @return	object ResList 
+   	* @access	public
+   	*/
+	function cons($value)
+	{
+		//create a new list
+		$newList=$this->model->createList();
+		//add the new value
+		$newList->add($value);
+		//set this list as the tail of the new list
+		$newList->setTail($this);
+		
+		//return the new list
+		return $newList;
+	}
+	
+	/**
+	* Update the list cell at the front of the list to have the 
+	* given list as tail. The old tail is returned, and remains 
+	* in the model.
+	*
+   	* @param	object ResList	$resList
+   	* @return	object Reslist 
+   	* @access	public
+   	*/
+	function setTail($resList)
+	{
+		//save the old tail
+		$oldTail=$this->getTail();
+		//remove the old tail
+		$this->removeAll($this->rdfRestResource);
+		//add the $resList as new Tail
+		$this->addProperty($this->rdfRestResource,$resList);
+		
+		//return the old tail
+		return $oldTail;
+	}
+	
+	/**
+	* Answer true if this list has the same elements in the 
+	* same order as the given list. Note that the standard equals 
+	* test just tests for equality of two given list cells. 
+	* While such a test is sufficient for many purposes, this 
+	* test provides a broader equality definition, but is 
+	* correspondingly more expensive to test.
+	*
+   	* @param	object ResList	$resList
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function sameListAs($resList)
+	{
+		//init
+		$indexPos=0;
+		do
+		{
+			//get the values for both lists at the actual position
+			$thisValue=$this->get($indexPos);
+			$thatValue=$resList->get($indexPos);
+			//if the values aren't equal, return false
+			if (($thisValue !== null) && !$thisValue->equals($thatValue))
+				return false;
+				
+			$indexPos++;
+			//walk until this list reaches a null value (end)	
+		} while ($thisValue!==null);
+		
+		//if the other list has a null value at this position too, return true
+		//else return false
+		return ($thatValue===null);
+	}
+	
+	/**
+	* Remove the given value from this list. 
+	* If value does not occur in the list, no action is taken. Since removing the 
+	* head of the list will invalidate the list head cell, in 
+	* general the list must return the list that results from 
+	* this operation. However, in many cases the return value 
+	* will be the same as the object that this method is invoked 
+	* on.
+	*
+   	* @param	object ResResource	$value
+   	* @return	object ResList 
+   	* @access	public
+   	*/
+	function remove($value)
+	{
+		//if the value is the value of the first list element(head)
+		//call the remove head position and return the new head
+		if ($value->equals($this->_getValue($this)))
+			return $this->removeHead();
+	
+		$element=$this;
+		do
+		{	
+			$newElement=$this->_getRestElement($element);
+			
+			//if the value equals the value of the current list element
+			if ($newElement !== null && $value->equals($this->_getValue($newElement)))
+			{
+				//remove the link to the list element to be removed
+				$element->removeAll($this->rdfRestResource);
+				//add a link to the list element AFTER the element to be deleted
+				$element->addProperty($this->rdfRestResource,$this->_getRestElement($newElement));
+				//remove the list element with values
+				$newElement->removeAll($this->rdfFirstResource);
+				$newElement->removeAll($this->rdfRestResource);
+				//return this ResList
+				return $this;	
+			}
+			$element=$newElement;
+		} while ($element!==null);
+		//return this list
+		return $this;	
+	}
+	
+	/**
+	* Answer true if the list is well-formed, by checking that each 
+	* node is correctly typed, and has a head and tail pointer from 
+	* the correct vocabulary
+	*
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function isValid()
+	{
+		$element=$this;	
+		if ($this->_getValue($this)=== null && $this->_getRestElement($this) === null)
+			return true;
+		do 
+		{
+			//return true if the last element is a rdf:nil
+			if ($element->getURI() == RDF_NAMESPACE_URI.RDF_NIL)
+				return true;
+			//return false, if the current element has no associated value
+			if ($this->_getValue($element) === null)
+				return false;
+						
+			$element=$this->_getRestElement($element);	
+		} while ($element !== null);
+		//return false, if the current element has no rdf:rest property
+		return false;
+	}
+	
+	/**
+	* Get the associated rdf:rest Resource from the suplied ResList element
+	*
+   	* @param	object ResList	$listElement
+   	* @return	object ResList 
+   	* @access	private
+   	*/
+	function _getRestElement($listElement)
+	{
+		//get the rdf:rest property
+		$statement= $this->model->getProperty($listElement,$this->rdfRestResource);
+		//return null, if this property isn't set
+		if ($statement === null)
+			return null;
+			
+		//return the value of the rdf:rest property	
+		return $statement->getObject();	
+	}
+	
+	/**
+	* Returns the list element at the $index position.
+	*
+	* If to $index is suplied, the last list element will be returned
+	
+   	* @param	integer	$index
+   	* @return	object ResResource 
+   	* @access	private
+   	*/
+	function _getListElement($index = null)
+	{
+		$element=$this;
+		$actualIndex=0;
+
+		while ($element!=null)
+		{
+			//return the current element if index matches the current index
+			if ($actualIndex === $index)
+				return $element;
+			
+			//return the current element if it the last one		
+			if ($element->hasProperty($this->rdfRestResource,$this->rdfNilResource))
+				return $element;
+			
+			$nextElement=$this->_getRestElement($element);
+			
+			if ($nextElement!==null)
+			{
+				$element=$nextElement;
+				$actualIndex++;
+			} else 
+			{
+				break;
+			}
+		}
+		return $element;
+	}
+	
+	/**
+	* Get the value associated to the $listResource by the rdf:first property
+	*
+   	* @param	object ResList	$listResource
+   	* @return	object ResResource 
+   	* @access	private
+   	*/
+	function _getValue($listResource)
+	{
+		//Return the value of the rdf:first property or null, if it isn't set
+		$statement=$this->model->getProperty($listResource,$this->rdfFirstResource);
+		if ($statement===null)
+			return null;
+
+		return $statement->getObject();	
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResLiteral.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResLiteral.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResLiteral.php	(revision 225)
@@ -0,0 +1,65 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResLiteral
+// ----------------------------------------------------------------------------------
+
+/**
+* An RDF literal.
+* The literal supports the xml:lang and rdf:datatype property.
+* For XML datatypes see: http://www.w3.org/TR/xmlschema-2/
+* 
+* @version  $Id: ResLiteral.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+
+*
+* @package resModel
+* @access	public
+**/
+
+class ResLiteral extends Literal 
+{
+	/**
+	* Holds a reference to the associated model
+	* @var		ResModel
+	* @access	private
+	*/
+	var $model;
+	
+	
+	/**
+    * Constructor
+	* You have to supply a string.
+    *
+	* @param	string	$str		label of the literal
+	* @param 	string $language	optional language identifier
+    */	
+	function ResLiteral($str,$language = null)
+	{
+		parent::Literal($str,$language);
+
+	}
+	
+	/**
+    * Sets the reference to the assocoated model.
+    *
+	* @param	object model	$model
+	* @access public
+    */
+	function setAssociatedModel(& $model)
+	{
+		$this->model=& $model;
+	}
+	
+	/**
+    * Get the reference to the assocoated model.
+    *
+	* @return	object model	$model
+	* @access public
+    */
+	function & getAssociatedModel()
+	{
+		return $this->model;
+	}
+
+} 
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResModel.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResModel.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResModel.php	(revision 225)
@@ -0,0 +1,876 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResModel
+// ----------------------------------------------------------------------------------
+
+/**
+* A ResModel provides an resource centric view on an underlying RDF model.
+* ResModels show information not as statements but as resources with
+* properties, similar to Jena models. ResModels may create Resources [URI
+* nodes and bnodes]. Creating a Resource does not make the Resource visible to
+* the model; Resources are only "in" Models if Statements about them are added
+* to the Model. Similarly the only way to "remove" a Resource from a Model is
+* to remove all the Statements that mention it.
+* 
+* When a Resource or Literal is created by a Model, the Model is free to re-use an existing 
+* Resource or Literal object with the correct values, or it may create a fresh one.
+*
+* @version  $Id: ResModel.php 562 2008-02-29 15:30:18Z cax $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package 	resModel
+* @access	public
+**/
+ 
+class ResModel
+{
+	
+	/**
+	* Holds a reference to the assoiated memmodel/dbmodel/infmodel
+	* @var		ResResource
+	* @access	private
+	*/
+	var $model;
+
+	
+	/**
+    * Constructor
+	* You have to supply a memmodel/dbmodel/infmodel to save the statements.
+    *
+    * @param object model $model 
+	* @access	public
+    */	
+	function ResModel(& $model)
+	{
+		if (!is_a($model,'Model'))
+			trigger_error(RDFAPI_ERROR . '(class: ResourceLayer; method: ResourceLayer): 
+				$model has to be object of class Model', E_USER_ERROR);	
+		
+		$this->model =& $model;			
+	}
+	
+	/**
+	* Create a new resource associated with this model. 
+	* If the uri string isn't set, this creates a bnode. 
+	* Otherwise it creates a URI node. 
+	* A URI resource is .equals() to any other URI Resource with the same URI 
+	* (even in a different model - be warned).
+	* 
+	* This method may return an existing Resource with the correct URI and model, 
+	* or it may construct a fresh one, as it sees fit.
+	*
+	* Operations on the result Resource may change this model. 
+	*
+   	* @param	string	$uri
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function createResource($uri = null)
+	{
+		$resResource = new ResResource($uri);
+		//associate the resource with this model, and get a unique identifier
+		//if it is bnode.
+		$resResource->setAssociatedModel($this);
+		
+		return $resResource;
+	} 
+	
+	/**
+	* Create a new Property associated with this model. 
+	* This method may return an existing property with the correct URI and model, 
+	* or it may construct a fresh one, as it sees fit.
+	*
+	* Subsequent operations on the returned property may modify this model. 
+	*  
+	*
+   	* @param	string	$uri
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function createProperty($uri = null)
+	{
+		$resProperty = new ResProperty($uri);
+		$resProperty->setAssociatedModel($this);
+			
+		return $resProperty;
+	}
+	
+	/**
+	* Create an untyped literal from a String value with a specified language.
+	*
+	* If you want to type this literal, you have to set a datatype before
+	* adding it to the model.
+	*  
+	*
+   	* @param	string	$label
+   	* @param	string	$languageTag
+   	* @return	object ResLiteral 
+   	* @access	public
+   	*/	
+	function createLiteral($label,$languageTag = null)
+	{
+		$resLiteral = new ResLiteral($label,$languageTag);
+		$resLiteral->setAssociatedModel($this);
+		
+		return $resLiteral;
+	}
+	
+	/**
+	* General method to search for triples.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->find( NULL, NULL, $node );
+	* Finds all Statements with $node as object.
+	* Returns an array of statements with ResResources.
+	*
+	* @param	object ResResource	$subject
+	* @param	object ResResource	$predicate
+	* @param	object ResResource	$object
+	* @return	array
+	* @access	public
+	* @throws	PhpError
+	*/
+	function find($subject,$predicate, $object)
+	{
+		$result=array();
+		//convert ResResources to Resources and Blanknodes
+		$resmodel=$this->model->find(	$this->_resNode2Node($subject),
+										$this->_resNode2Node($predicate),
+										$this->_resNode2Node($object)
+									 );
+		//convert Resources, Blanknodes to ResResources							 
+		foreach ($resmodel->triples as $statement) 
+		{
+			$result[]=new Statement($this->_node2ResNode($statement->getSubject()),
+									$this->_node2ResNode($statement->getPredicate(),true),
+									$this->_node2ResNode($statement->getObject())
+								    );
+		};
+		return $result;
+		
+	}
+	
+	/**
+	* Searches for triples and returns the first matching statement.
+	* NULL input for any parameter will match anything.
+	* Example:  $result = $m->findFirstMatchingStatement( NULL, NULL, $node );
+	* Returns the first statement with ResResources of the Model where the object equals $node.
+	* Returns an NULL if nothing is found.
+	* You can define an offset to search.
+	*
+	* @param	object Node	$subject
+	* @param	object Node	$predicate
+	* @param	object Node	$object
+	* @param	integer $offset
+	* @return	object Statement      
+	* @access	public
+	*/
+	function findFirstMatchingStatement($subject,$predicate,$object,$offset = 0)
+	{
+	
+		$statement = $this->model->findFirstMatchingStatement(	$this->_resNode2Node($subject),
+																$this->_resNode2Node($predicate),
+																$this->_resNode2Node($object),
+																$offset
+															  );
+		if ($statement!==null)
+		{											
+			return new Statement(	$this->_node2ResNode($statement->getSubject()),
+									$this->_node2ResNode($statement->getPredicate(),true),
+									$this->_node2ResNode($statement->getObject())
+							    );
+		} else 
+		{
+			return null;
+		}
+	}
+	
+	/**
+	* Adds a new triple to the Model without checking if the statement is already in the Model.
+	* So if you want a duplicate free Model use the addWithoutDuplicates() function (which is slower then add())
+	* Expects a statements with ResResources(ResLiterals)
+	*
+	* @param	object Statement	$statement
+	* @access	public
+	* @throws	PhpError 
+	*/
+	function add($statement)
+	{
+		return $this->model->add(new Statement(	$this->_resNode2Node($statement->getSubject()),
+												$this->_resNode2Node($statement->getPredicate()),
+												$this->_resNode2Node($statement->getObject()))
+											   );		
+	}
+	/**
+	* Checks if a new statement is already in the Model and adds the statement, if it is not in the Model.
+	* addWithoutDuplicates() is significantly slower then add(). 
+	* Retruns TRUE if the statement is added.
+	* FALSE otherwise.
+	* Expects a statements with ResResources(ResLiterals)
+	*
+	* @param	object Statement	$statement
+	* @return   boolean
+	* @access	public
+	* @throws	PhpError 
+	*/
+	function addWithoutDuplicates($statement)
+	{
+		return $this->model->addWithoutDuplicates(new Statement($this->_resNode2Node($statement->getSubject()),
+																$this->_resNode2Node($statement->getPredicate()),
+																$this->_resNode2Node($statement->getObject()))
+															    );	
+	}
+	
+	/**
+	* Tests if the Model contains the given statement.
+	* TRUE if the statement belongs to the model;
+	* FALSE otherwise.
+	* Expects a statement of ResResources(ResLiterals)
+	*
+	* @param	object Statement	$statement
+	* @return	boolean
+	* @access	public
+	*/
+	function contains(& $statement)
+	{
+		
+		return $this->model->contains(new Statement($this->_resNode2Node($statement->getSubject()),
+													$this->_resNode2Node($statement->getPredicate()),
+													$this->_resNode2Node($statement->getObject()))
+													);
+	}
+	
+	/**
+	* Determine if all of the statements in a model are also contained in this model.
+	* True if all of the statements in $model are also contained in this model and false otherwise.
+	*
+	* @param	object Model	&$model
+	* @return	boolean
+	* @access	public
+	*/
+	function containsAll(& $model)
+	{
+		if (is_a($model,'ResModel'))
+			return $this->model->containsAll($model->getModel());
+		
+		return $this->model->containsAll($model);
+	}
+	
+	/**
+	* Determine if any of the statements in a model are also contained in this model.
+	* True if any of the statements in $model are also contained in this model and false otherwise.
+	*
+	* @param	object Model	&$model
+	* @return	boolean
+	* @access	public
+	*/	
+	function containsAny(& $model)
+	{
+		if (is_a($model,'ResModel'))
+			return $this->model->containsAny($model->getModel());
+		return $this->model->containsAny($model);
+	}
+	
+	/**
+	* Determine if the node (ResResource / ResLiteral) $node appears in any statement of this model.
+	*
+	* @param	object Node	&$node
+	* @return	boolean
+	* @access	public
+	*/	
+	function containsResource(& $node)
+	{
+		if ($this->findFirstMatchingStatement($node,null,null) === null)
+			if ($this->findFirstMatchingStatement(null,$node,null) === null)
+				if ($this->findFirstMatchingStatement(null,null,$node) === null)
+					return false;
+					
+		return true;
+	}
+	
+	/**
+	* Create a literal from a String value with the $dtype Datatype 
+	* An existing literal of the right value may be returned, or a fresh one created. 
+	*
+	* @param	string	$value
+	* @param	string 	$dtype
+	* @return 	object ResLiteral
+	* @access	public
+	*/
+	function createTypedLiteral($value,$dtype)
+	{
+		$resLiteral = new ResLiteral($value);
+		$resLiteral->setDatatype($dtype);
+		$resLiteral->setAssociatedModel($this);
+		
+		return $resLiteral;
+	}
+	
+	/**
+	* Checks if two models are equal.
+	* Two models are equal if and only if the two RDF graphs they represent are isomorphic.
+	* 
+	* Warning: This method doesn't work correct with models where the same blank node has different 
+	* identifiers in the two models. We will correct this in a future version.
+	*
+	* @access	public 
+	* @param	object	model &$that
+	* @throws    phpErrpr
+	* @return	boolean 
+	*/		
+	function equals(& $that)
+	{
+		if (is_a($that,'ResModel'))
+			return $this->model->equals($that->getModel());
+		return $this->model->equals($that);	
+	}
+	
+	/** 
+	* Returns a new model that is the subtraction of another model from this model.
+	*
+	* @param	object Model $model
+	* @return	object MemModel
+	* @access	public
+	* @throws phpErrpr
+	*/ 
+	function subtract($model)
+	{
+		if (is_a($model,'ResModel'))
+			return $this->model->subtract($model->getModel());
+		return $this->model->subtract($model);
+	}
+	
+	/** 
+	* Answer a statement find(s, p, null) with ResResources(ResLiterals) from this model. 
+	* If none exist, return null; if several exist, pick one arbitrarily.
+	*
+	* @param	object ResResource $subject
+	* @param	object ResResource $property
+	* @return	object Statement
+	* @access	public
+	* @throws phpErrpr
+	*/ 
+	function getProperty($subject,$property)
+	{
+	
+		$statement= $this->model->findFirstMatchingStatement(	$this->_resNode2Node($subject),
+																$this->_resNode2Node($property),
+																null
+															);
+		if ($statement === null)
+			return null;
+																
+		return new Statement($this->_node2ResNode($statement->getSubject()),
+									$this->_node2ResNode($statement->getPredicate(),true),
+									$this->_node2ResNode($statement->getObject())
+							);
+													
+	}
+	
+	/**
+	* Checks if MemModel is empty
+	*
+	* @return	boolean
+	* @access	public
+	*/
+	function isEmpty()
+	{
+		return $this->model->isEmpty();
+	}
+	
+	/** 
+	* Returns a ResIterator with all objects in a model.
+	*
+	* @return	object ResIterator
+	* @access	public
+	* @throws phpErrpr
+	*/
+	function listObjects()
+	{
+		return $this->listObjectsOfProperty(null);
+	}
+	
+	/** 
+	* Returns a ResIterator with all objects with a given property and property value.
+	*
+	* @param	object ResResource	$property
+	* @param	object ResResource	$value
+	* @return	object ResIterator
+	* @access	public
+	*/
+	function listObjectsOfProperty($property, $value = null)
+	{
+		return new ResIterator(null,$property,$value,'o',$this);
+	}
+
+	
+	/** 
+	* Returns a ResIterator with all subjects in a model.
+	*
+	* @return	object ResIterator
+	* @access	public
+	* @throws phpErrpr
+	*/
+	function listSubjects()
+	{
+		return $this->listSubjectsWithProperty(null);
+	}
+	
+	/** 
+	* Returns a ResIterator with all subjects with a given property and property value.
+	*
+	* @param	object ResResource	$property
+	* @param	object ResResource	$value
+	* @return	object ResIterator
+	* @access	public
+	* @throws phpErrpr
+	*/
+	function listSubjectsWithProperty($property,$value = null)
+	{
+		return new ResIterator(null,$property,$value,'s',$this);
+	}
+	
+	/**
+	* Removes the statement of ResResources(ResTriples) from the MemModel. 
+	* TRUE if the statement is removed.
+	* FALSE otherwise.
+	*
+	* @param	object Statement	$statement
+	* @return   boolean
+	* @access	public
+	* @throws	PhpError
+	*/	
+	function remove($statement)
+	{
+		return $this->model->remove(new Statement(	$this->_resNode2Node($statement->getSubject()),
+													$this->_resNode2Node($statement->getPredicate()),
+													$this->_resNode2Node($statement->getObject())
+												  ));
+	}
+	
+	/**
+	* Number of statements in the MemModel
+	*
+	* @return	integer
+	* @access	public
+	*/
+	function size()
+	{
+		return $this->model->size();
+	}
+	
+	/** 
+	* Returns a new Model that is the set-union of the model with another model.
+	* Duplicate statements are removed. If you want to allow duplicates, use addModel() which is much faster.
+	*
+	* The result of taking the set-union of two or more RDF graphs (i.e. sets of triples) 
+	* is another graph, which we will call the merge of the graphs. 
+	* Each of the original graphs is a subgraph of the merged graph. Notice that when forming 
+	* a merged graph, two occurrences of a given uriref or literal as nodes in two different 
+	* graphs become a single node in the union graph (since by definition they are the same 
+	* uriref or literal) but blank nodes are not 'merged' in this way; and arcs are of course 
+	* never merged. In particular, this means that every blank node in a merged graph can be 
+	* identified as coming from one particular graph in the original set of graphs.
+	* 
+	* Notice that one does not, in general, obtain the merge of a set of graphs by concatenating 
+	* their corresponding N-triples documents and constructing the graph described by the merged 
+	* document, since if some of the documents use the same node identifiers, the merged document 
+	* will describe a graph in which some of the blank nodes have been 'accidentally' merged. 
+	* To merge Ntriples documents it is necessary to check if the same nodeID is used in two or 
+	* more documents, and to replace it with a distinct nodeID in each of them, before merging the 
+	* documents. (Not implemented yet !!!!!!!!!!!)
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @access	public
+	* @throws phpErrpr
+	*
+	*/
+	function & unite(& $model)
+	{
+		if (is_a($model,'ResModel'))
+			return $this->model->unite($model->getModel());
+		return $this->model->unite($model);
+	}
+	
+	/** 
+	* Adds another model to this MemModel.
+	* Duplicate statements are not removed. 
+	* If you don't want duplicates, use unite().
+	* If any statement of the model to be added to this model contains a blankNode 
+	* with an identifier already existing in this model, a new blankNode is generated.
+	*
+	* @param	object Model	$model 
+	* @access	public
+	* @throws phpErrpr
+	*
+	*/
+	function addModel(&$model)  
+	{
+		if (is_a($model,'ResModel'))
+			return $this->model->addModel($model->getModel());
+		return $this->model->addModel($model);
+	}
+	
+	/**
+	* Create a new RDF Container from type rdf:Alt 
+	* This method may return an existing container with the correct URI and model, 
+	* or it may construct a fresh one, as it sees fit.
+	*
+	* Subsequent operations on the returned Container may modify this model. 
+	*  
+	*
+   	* @param	string	$uri
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function createAlt($uri = null)
+	{
+		$resAlt = new ResAlt($uri);
+		$resAlt->setAssociatedModel($this);
+			
+		return $resAlt;		
+	}
+	
+	/**
+	* Create a new RDF Container from type rdf:Bag 
+	* This method may return an existing container with the correct URI and model, 
+	* or it may construct a fresh one, as it sees fit.
+	*
+	* Subsequent operations on the returned Container may modify this model. 
+	*  
+	*
+   	* @param	string	$uri
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function createBag($uri = null)
+	{
+		$resBag = new ResBag($uri);
+		$resBag->setAssociatedModel($this);
+			
+		return $resBag;
+	}
+	
+	/**
+	* Create a new RDF Container from type rdf:Seq 
+	* This method may return an existing container with the correct URI and model, 
+	* or it may construct a fresh one, as it sees fit.
+	*
+	* Subsequent operations on the returned Container may modify this model. 
+	*  
+	*
+   	* @param	string	$uri
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function createSeq($uri = null)
+	{
+		$resSeq = new ResSeq($uri);
+		$resSeq->setAssociatedModel($this);
+			
+		return $resSeq;
+	}	
+	
+	/**
+	* Create a new RDF Collection from type rdf:List 
+	* This method may return an existing container with the correct URI and model, 
+	* or it may construct a fresh one, as it sees fit.
+	*
+	* Subsequent operations on the returned Container may modify this model. 
+	*  
+	*
+   	* @param	string	$uri
+   	* @return	object ResProperty 
+   	* @access	public
+   	*/
+	function createList($uri = null)
+	{
+		$resList = new ResList($uri);
+		$resList->setAssociatedModel($this);
+			
+		return $resList;	
+	}
+	
+	/**
+	* Returns a reference to the underlying model (Mem/DB/InfModel) that contains the statements 
+	*  
+	*
+   	* @return	object Model 
+   	* @access	public
+   	*/	
+	function & getModel()
+	{
+		return  $this->model;
+	}
+	
+	
+	/**
+	* Internal method, that returns a resource URI that is unique for the Model.
+	* URIs are generated using the base_uri of the Model, the prefix and a unique number.
+	* If no prefix is defined, the bNode prefix, defined in constants.php, is used.
+	*
+	* @param	string	$prefix
+	* @return	string
+	* @access	private
+	*/
+	function getUniqueResourceURI($bnodePrefix)
+	{
+		return $this->model->getUniqueResourceURI($bnodePrefix);
+	}
+	
+	/**
+	* Load a model from a file containing RDF, N3 or N-Triples.
+	* This function recognizes the suffix of the filename (.n3 or .rdf) and
+	* calls a suitable parser, if no $type is given as string ("rdf" "n3" "nt");
+	* If the model is not empty, the contents of the file is added to this DbModel.
+	*
+	* @param 	string 	$filename
+	* @param 	string 	$type
+	* @param   boolean $stream
+	* @access	public
+	*/
+	function load($filename, $type = NULL, $stream=false)
+	{
+		$this->model->load($filename, $type, $stream);
+	}
+	
+	/**
+	* Return current baseURI.
+	*
+	* @return  string
+	* @access	public
+	*/
+	function getBaseURI()  
+	{
+		return $this->model->getBaseURI();
+	}
+
+	/**
+	* Saves the RDF,N3 or N-Triple serialization of the MemModel to a file.
+	* You can decide to which format the model should be serialized by using a
+	* corresponding suffix-string as $type parameter. If no $type parameter
+	* is placed this method will serialize the model to XML/RDF format.
+	* Returns FALSE if the MemModel couldn't be saved to the file.
+	*
+	* @access	public 
+	* @param 	string 	$filename
+	* @param 	string 	$type
+	* @throws   PhpError
+	* @return	boolean   
+	*/  
+	function saveAs($filename, $type ='rdf') 
+	{
+		return $this->model->saveAs($filename, $type ='rdf');
+	}
+	
+	/**
+	* Writes the RDF serialization of the MemModel as HTML table.
+	*
+	* @access	public 
+	*/  
+	function writeAsHTMLTable()
+	{
+		$this->model->writeAsHtmlTable();
+	}
+	
+	/** 
+	* Returns a new model containing all the statements which are in both this model and another.
+	*
+	* @param	object Model	$model
+	* @return	object MemModel
+	* @access	public
+	* @throws phpErrpr
+	*/ 
+	function & intersect(& $model)
+	{
+		if (is_a($model,'ResModel'))
+			return $this->model->intersect($model->getModel());
+		return $this->model->intersect($model);
+	}
+	
+	/** 
+	* converts a Resource,Blanknode,Literal into a ResResource, ResProperty, or ResLiteral
+	*
+	* @param	object Node	$node
+	* @param	boolean		$isProperty
+	* @return	object ResResource / ResProperty / ResLiteral
+	* @access	private
+	* @throws phpErrpr
+	*/ 
+	function _node2ResNode($node, $isProperty = false)
+	{
+		if (is_a($node,'Literal'))
+		{
+			$return= new ResLiteral($node->getLabel(),$node->getLanguage());
+			$return->setDatatype($node->getDatatype());
+			$return->setAssociatedModel($this);
+
+			return $return;
+		}
+		if (is_a($node,'Resource'))
+		{
+			if ($isProperty)
+			{
+				$res= new ResProperty($node->getLabel());
+			} else 
+			{
+				$res= new ResResource($node->getLabel());
+			}
+			$res->setAssociatedModel($this);
+			if (is_a($node,'Blanknode'))
+				$res->setIsAnon(true);	
+		
+			return $res;
+		}
+	}
+	
+	/** 
+	* converts a ResResource, ResProperty, or ResLiteral into a Resource, Blanknode, or Literal
+	*
+	* @param	object ResNode	$resNode
+	* @return	object Node
+	* @access	private
+	* @throws phpErrpr
+	*/ 
+	function _resNode2Node($resNode)
+	{
+		if (is_a($resNode,'ResResource'))
+		{
+			if ($resNode->getIsAnon())	
+			{
+				$return=new BlankNode($resNode->getURI());
+			} else 
+			{
+				$return=new Resource($resNode->getURI());	
+			}	
+		return $return;	
+		}
+		
+		if (is_a($resNode,'ResLiteral'))
+		{
+			$literal=new Literal($resNode->getLabel(),$resNode->getLanguage());
+			if ($resNode->getDatatype() != null)
+				$literal->setDatatype($resNode->getDatatype());
+			return $literal;
+		}
+	}
+	
+	/**
+	* Set a base URI for the MemModel.
+	* Affects creating of new resources and serialization syntax.
+	* If the URI doesn't end with # : or /, then a # is added to the URI. 
+	* @param	string	$uri
+	* @access	public
+	*/
+	function setBaseURI($uri) 
+	{
+		$this->model->setBaseURI($uri);
+	}
+	
+	/**
+	* Writes the RDF serialization of the MemModel as HTML table.
+	*
+	* @access	public 
+	* @return	string 
+	*/  
+	function writeRdfToString() 
+	{
+		return $this->model->writeRdfToString();	
+	}
+	
+	/**
+	* Perform an RDQL query on this MemModel.
+	* This method returns an associative array of variable bindings.
+	* The values of the query variables can either be RAP's objects (instances of Node)
+	* if $returnNodes set to TRUE, or their string serialization.
+	*
+	* @access	public
+	* @param string $queryString
+	* @param boolean $returnNodes
+	* @return  array   [][?VARNAME] = object Node  (if $returnNodes = TRUE)
+	*      OR  array   [][?VARNAME] = string
+	*
+	*/
+	function & rdqlQuery($queryString, $returnNodes = TRUE) 
+	{
+		$ret = $this->model->rdqlQuery($queryString, $returnNodes);
+		return $ret;
+	}
+	
+	/**
+	* Perform an RDQL query on this MemModel.
+	* This method returns an RdqlResultIterator of variable bindings.
+	* The values of the query variables can either be RAP's objects (instances of Node)
+	* if $returnNodes set to TRUE, or their string serialization.
+	*
+	* @access	public
+	* @param string $queryString
+	* @param boolean $returnNodes
+	* @return  object RdqlResultIterator = with values as object Node  (if $returnNodes = TRUE)
+	*      OR  object RdqlResultIterator = with values as strings if (if $returnNodes = FALSE)
+	*
+	*/
+	function rdqlQueryAsIterator($queryString, $returnNodes = TRUE) 
+	{
+		return $this->model->rdqlQueryAsIterator($queryString, $returnNodes);
+	}
+	
+	
+	/**
+	* Returns the models namespaces.
+	*
+	* @author   Tobias Gauß <tobias.gauss@web.de>
+	* @access   public
+	* @return   Array
+	*/
+	function getParsedNamespaces(){
+		return $this->model->getParsedNamespaces();
+	}
+
+
+
+	/**
+	* Adds the namespaces to the model. This method is called by 
+	* the parser. !!!! addParsedNamespaces() not overwrites manual
+	* added namespaces in the model !!!!
+	*
+	* @author   Tobias Gauß <tobias.gauss@web.de>
+	* @access   public
+	* @param    Array $newNs
+	*/
+	function addParsedNamespaces($newNs){
+		$this->model->addParsedNamespaces($newNs);
+	}
+
+
+	/**
+	* Adds a namespace and prefix to the model.
+	*
+	* @author   Tobias Gauß <tobias.gauss@web.de>
+	* @access   public
+	* @param    String $prefix, String $nmsp
+	*/
+	function addNamespace($prefix, $namespace){
+		$this->model->addNamespace($prefix, $namespace);
+	}
+	
+	/**
+	* removes a single namespace from the model
+	*
+	* @author   Tobias Gauß <tobias.gauss@web.de>
+	* @access   public
+	* @param    String $nmsp
+	*/
+	function removeNamespace($nmsp){
+		return $this->model->removeNamespace($nmsp);
+	}
+
+	
+	
+	
+	
+	
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResModelP.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResModelP.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResModelP.php	(revision 225)
@@ -0,0 +1,24 @@
+<?php
+// ----------------------------------------------------------------------------------
+// ResModel Package
+// ----------------------------------------------------------------------------------
+//
+// Description               : ResModel package
+//
+// Author: Daniel Westphal	<mail at d-westphal dot de>
+//
+// ----------------------------------------------------------------------------------
+
+// Include ResModel classes
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResModel.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResResource.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResContainer.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResAlt.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResBag.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResLiteral.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResProperty.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResSeq.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResIterator.php');
+require_once( RDFAPI_INCLUDE_DIR . 'resModel/ResList.php');
+
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResProperty.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResProperty.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResProperty.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResProperty
+// ----------------------------------------------------------------------------------
+
+/**
+* An RDF Property.
+*
+*
+* @version  $Id: ResProperty.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package resModel
+* @access	public
+**/
+class ResProperty extends ResResource  
+{
+	
+	/**
+    * Constructor
+	* You can supply a URI
+    *
+    * @param string $uri 
+	* @access	public
+    */	
+	function ResProperty($uri)
+	{
+		parent::ResResource($uri);
+	}
+} 
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResResource.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResResource.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResResource.php	(revision 225)
@@ -0,0 +1,212 @@
+<?php
+/**
+* ----------------------------------------------------------------------------------
+* Class: ResResource
+* ----------------------------------------------------------------------------------
+* @package resModel
+**/
+
+/**
+* An RDF Resource.
+* Resource instances, when created, are associated with a specific model. They support a 
+* range of methods, such as getProperty() and addProperty() which will access or modify 
+* that model. This enables the programmer to write code in a compact and easy style.
+*
+* @version  $Id: ResResource.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+*
+* @package resModel
+* @access	public
+**/
+class ResResource extends Resource 
+{
+	/**
+	* Holds a reference to the associated model
+	* @var		ResModel
+	* @access	private
+	*/
+	var $model;
+	
+	/**
+	* Is true, if this resource is an anonymous node.
+	* @var		boolean
+	* @access	private
+	*/
+	var $isAnon;
+	
+	
+	/**
+    * Constructor
+	* You can supply a uri
+    *
+    * @param string $uri 
+	* @access	public
+    */		
+	function ResResource($uri)
+	{
+			parent::Resource($uri);
+			$this->isAnon = ($uri === null);		
+	}
+	
+	/**
+    * Sets the reference to the assocoated model.
+    *
+	* @param	object Model	$model
+	* @access public
+    */	
+	function setAssociatedModel(& $model)
+	{
+		$this->model=& $model;
+		if ($this->isAnon)
+			$this->uri=$this->model->getUniqueResourceURI(BNODE_PREFIX);
+	}
+	
+	/**
+    * Get the reference to the assocoated model.
+    *
+	* @return	object Model	$model
+	* @access public
+    */
+	function getAssociatedModel()
+	{
+		return $this->model;
+	}
+	
+	/**
+    * Sets the URI of this resource
+    *
+	* @param	string $uri
+	* @access public
+    */	
+	function setURI($uri)
+	{
+		$this->uri = $uri;
+	}
+	
+	/**
+	* Add a property to this resource.
+	* A statement with this resource as the subject, p as the predicate and o 
+	* as the object is added to the model associated with this resource.
+	*
+   	* @param	ResResource				$property
+   	* @param	ResResource/ResLiteral	$object
+   	* @return	object ResResource 
+   	* @access	public
+   	*/
+	function addProperty($property,$object)
+	{
+		$this->model->add(new Statement($this,$property,$object));
+
+		return $this;
+	}
+	
+	/**
+	* List all the values with the property p as statements in an array.
+	*
+   	* @param	ResResource		$property
+   	* @return	ResIterator 
+   	* @access	public
+   	*/
+	function listProperties($property = null)
+	{
+		return $this->model->find($this,$property,null);
+	}
+	
+	/**
+	* Answer some statement (this, p, O) in the associated model. 
+	* If there are several such statements, any one of them may be returned. 
+	* If no such statements exist, null is returned.
+	*
+   	* @param	ResResource				$property
+   	* @return	object ResResource 
+   	* @access	public
+   	*/	
+	function getProperty($property)
+	{
+		return $this->model->getProperty($this,$property);
+	}
+	
+	/**
+	* Determine whether this resource has any values for a given property.
+	*
+   	* @param	ResResource		$property
+   	* @param	ResResource		$value
+   	* @return	object ResResource 
+   	* @access	public
+   	*/	
+	function hasProperty($property, $value = null)
+	{
+		$ret= $this->model->findFirstMatchingStatement($this,$property,$value);
+		
+		return ($ret!==null);	
+	}
+	
+	/**
+	* Determine whether this resource is an anonymous resource
+	*
+   	* @return	boolean
+   	* @access	public
+   	*/		
+	function getIsAnon()
+	{
+		return $this->isAnon;	
+	}
+	
+	/**
+	* Set whether this resource is an anonymous resource
+	*
+   	* @param	boolean
+   	* @access	public
+   	*/	
+	function setIsAnon($isAnon)
+	{
+		 $this->isAnon=$isAnon;	
+	}
+		
+	/**
+	* Checks if the resource equals another resource.
+	* Two resources are equal, if they have the same URI
+	*
+	* @access	public 
+	* @param	object	resource $that
+	* @return	boolean 
+	*/  
+	function equals ($that) 
+	{
+		if (is_a($that,'ResLiteral'))
+			return $that->equals($this);
+			
+	    return ($that!==null && ($this->getURI() == $that->getURI()));
+	}
+	
+	/**
+	* Delete all the statements with predicate p for this resource from 
+	* its associated model.
+	*
+	* @access	public 
+	* @param	object	resource $property
+	* @return	object ResResource 
+	*/ 
+	function removeAll($property = null)
+	{	
+		foreach ($this->model->find($this,$property,null) as $statement)
+		{
+			$this->model->remove($statement);	
+		}
+		return $this;
+	}
+	
+	/**
+	* Delete all the properties for this resource from the associated model.
+	*
+	* @access	public 
+	* @return	object ResResource 
+	*/ 
+	function removeProperties()
+	{
+		$this->removeAll();
+		return $this;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/resModel/ResSeq.php
===================================================================
--- Dev/branches/Demo/rdfapi/resModel/ResSeq.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/resModel/ResSeq.php	(revision 225)
@@ -0,0 +1,153 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: ResSeq
+// ----------------------------------------------------------------------------------
+
+/**
+* This interface defines methods for accessing RDF Sequence resources. 
+* These methods operate on the RDF statements contained in a model.
+*
+* @version  $Id: ResSeq.php 320 2006-11-21 09:38:51Z tgauss $
+* @author Daniel Westphal <mail at d-westphal dot de>
+*
+* @package 	resModel
+* @access	public
+**/
+class ResSeq extends ResContainer 
+{
+	
+	/**
+    * Constructor
+	* You can supply a URI
+    *
+    * @param string $uri 
+	* @access	public
+    */		
+	function ResSeq($uri = null)
+	{
+		parent::ResContainer($uri);
+		$this->containerType=new ResResource(RDF_NAMESPACE_URI.RDF_SEQ);
+	}
+	
+	/**
+	* Insert a new member into the sequence at the specified position.
+	* The existing member at that position, and all others with higher indexes, 
+	* have their index increased by one.
+	*
+	* @param 	integer	$index
+   	* @param	object ResResource/ResLiteral	$resResource
+   	* @return	boolean 
+   	* @access	public
+   	*/
+	function addAtIndex($index, $object)
+	{
+		//get a members index
+		$memberIndex= $this->getMembers();
+				
+		//type this container, if it isn't already typed
+		if(!$this->hasProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE)))
+			$this->addProperty(new ResResource(RDF_NAMESPACE_URI.RDF_TYPE),$this->containerType);
+		
+		//renumber all higher members
+		for ($i = count($memberIndex);$i >= $index ; $i--)
+		{
+			$this->removeAll($this->_getMembershipPropertyWithIndex($i));
+			$this->addProperty($this->_getMembershipPropertyWithIndex($i+1),$memberIndex[$i]);
+		}	
+		//remove the old value at this position
+		$this->removeAll($this->_getMembershipPropertyWithIndex($index));
+		//add the new value
+		$this->addProperty($this->_getMembershipPropertyWithIndex($index),$object);
+				
+		return $this;
+	}
+	
+	/**
+	* Get the member at a given index
+	*
+	* @param 	integer	$index
+   	* @return	object ResResource/ResLiteral 
+   	* @access	public
+   	*/
+	function getMember($index)
+	{
+		$result=$this->listProperties($this->_getMembershipPropertyWithIndex($index));
+		if (isset($result[0]))
+		{
+			return $result[0];
+		} 
+		else 
+		{
+			return null;
+		}
+	}
+	
+	/**
+	* Return the index of a given member of the sequence.
+	* If the same value appears more than once in the sequence, it is undefined 
+	* which of the indexes will be returned.
+	* If the member is not found in this sequence, a value of 0 is returned.
+	*
+	* @param 	object ResResource/ResLiteral $object
+   	* @return	integer
+   	* @access	public
+   	*/
+	function indexOf($object)
+	{
+		//check all members, until $object is found
+		foreach ($this->listProperties() as $statement)
+		{
+			$predicateLabel=$statement->getLabelPredicate();
+			if ($this->_predicateLabelMatchesMembershipProperty($predicateLabel))
+			{
+				if($object->equals($statement->getObject()))
+					//analyze the container membership property and return the index
+					return $this->_getMemberIndexNrFromMembershipPropertyLabel($predicateLabel);
+			}	
+		}
+		//return 0 if $object wasn't found
+		return 0;
+	}
+	
+	/**
+	* Remove the member at the specified index.
+	* All other members with a higher index will have their index reduced by one.
+	*
+	* @param 	integer	$index	 
+   	* @access	public
+   	*/
+	function removeAtIndex($index)
+	{
+		$memberIndex= $this->getMembers();
+
+
+		$this->removeAll($this->_getMembershipPropertyWithIndex($index));
+
+		for ($i = $index;$i < count($memberIndex); $i++)
+		{
+			$this->removeAll($this->_getMembershipPropertyWithIndex($i+1));
+			$this->addProperty($this->_getMembershipPropertyWithIndex($i),$memberIndex[$i+1]);
+		}		
+		return $this;
+	}
+	
+	/**
+	* Set the value at a given index in the sequence.
+	*
+	* If the index is not in the range of the sequence, false is returned
+	*
+	* @param 	integer	$index
+   	* @return	boolean
+   	* @access	public
+   	*/
+	function set($index, $object)
+	{
+		if (!$this->hasProperty($this->_getMembershipPropertyWithIndex($index)))
+			return false;
+			
+		$this->removeAll($this->_getMembershipPropertyWithIndex($index));
+		$this->addProperty($this->_getMembershipPropertyWithIndex($index),$object);
+		return true;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/sparql/ClientQuery.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/ClientQuery.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/ClientQuery.php	(revision 225)
@@ -0,0 +1,56 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: ClientQuery
+// ----------------------------------------------------------------------------------
+
+/**
+* ClientQuery Object to run a SPARQL Query against a SPARQL server.
+*
+* @version  $Id: ClientQuery.php 465 2007-06-27 16:47:57Z cweiske $
+* @author   Tobias Gauï¿œ <tobias.gauss@web.de>
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+
+class ClientQuery extends Object {
+
+	var $default  = array();
+	var $named    = array();
+	var $prefixes = array();
+	var $query;
+
+	/**
+	* Adds a default graph to the query object.
+	*
+	* @param String  $default  default graph name
+	*/
+	function addDefaultGraph($default){
+		if(!in_array($this->named,$this->default))
+		$this->default[] = $default;
+	}
+	/**
+	* Adds a named graph to the query object.
+	*
+	* @param String  $default  named graph name
+	*/
+	function addNamedGraph($named){
+		if(!in_array($named,$this->named))
+		$this->named[] = $named;
+	}
+	/**
+	* Adds the SPARQL query string to the query object.
+	*
+	* @param String  $query the query string
+	*/
+	function query($query){
+		$this->query = $query;
+	}
+
+}
+
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/Constraint.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/Constraint.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/Constraint.php	(revision 225)
@@ -0,0 +1,95 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'util/Object.php';
+// ---------------------------------------------
+// class: Constraint.php
+// ---------------------------------------------
+
+
+/**
+* Represents a constraint. A value constraint is a boolean- valued expression
+* of variables and RDF Terms.
+*
+* @author   Tobias Gauss <tobias.gauss@web.de>
+* @version	 $Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+Class Constraint extends Object{
+
+    /**
+    * The expression string.
+    * @var string
+    */
+    protected $expression;
+
+    /**
+    *  True if it is an outer filter, false if not.
+    * @var boolean
+    */
+    protected $outer;
+
+    /**
+    *   The expression tree
+    *   @var array
+    */
+    protected $tree = null;
+
+    /**
+    * Adds an expression string.
+    *
+    * @param  String $exp the expression String
+    * @return void
+    */
+    public function addExpression($exp)
+    {
+        $this->expression = $exp;
+    }
+
+    /**
+    * Returns the expression string.
+    *
+    * @return String  the expression String
+    */
+    public function getExpression()
+    {
+        return $this->expression;
+    }
+
+
+    /**
+    * Sets the filter type to outer or inner filter.
+    * True for outer false for inner.
+    *
+    * @param  boolean $boolean
+    * @return void
+    */
+    public function setOuterFilter($boolean)
+    {
+        $this->outer = $boolean;
+    }
+
+    /**
+    * Returns true if this constraint is an outer filter- false if not.
+    *
+    * @return boolean
+    */
+    public function isOuterFilter()
+    {
+        return $this->outer;
+    }
+
+
+    public function getTree()
+    {
+        return $this->tree;
+    }//public function getTree()
+
+    public function setTree($tree)
+    {
+        $this->tree = $tree;
+    }//public function setTree($tree)
+
+}
+// end class: Constraint.php
+?>
Index: Dev/branches/Demo/rdfapi/sparql/FilterFunctions.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/FilterFunctions.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/FilterFunctions.php	(revision 225)
@@ -0,0 +1,137 @@
+<?php
+/**
+* List of functions used to evaluate the FILTER statements in
+* SPARQL queries.
+*
+* @package sparql
+* @author   Tobias Gauss <tobias.gauss@web.de>
+* @version	 $Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*/
+
+ 
+
+
+/**
+* Evaluates the regex() function. Returns true if the regex is matched false if not.
+*
+* @param String  $string   the string which has to be evaluated
+* @param String  $pattern  the regex pattern
+* @param String  $flags    additional flags like "i"
+* @return boolean
+*/
+function regex($string,$pattern,$flags = ''){
+	$string = trim($string);
+	$pattern = trim($pattern);
+	if(strpos($string,"str_")===0){
+		$string = substr($string,4);
+		$pattern = substr($pattern,4);
+		$flags = substr($flags,4);
+	}else{
+		return false;
+	}
+	if(preg_match('/'.$pattern.'/'.$flags,$string))
+	return true;
+	else
+	return false;
+}
+
+/**
+* Evaluates the dateTime() function.Tries to convert a date string into
+* a unix timestamp.
+*
+* @param  String $string the date string
+* @return integer        the corresponding unix timestamp
+*/
+function dateTime($string){
+	$string = trim($string);
+	if(strpos($string,"str_")===0)
+	$string = substr($string,4);
+
+	$time = strtotime($string);
+	if($time == -1)
+	return $string;
+	else
+	return $time;
+}
+
+
+/**
+* Evaluates the langMatches() function. Return true if the lang tag matches false if not.
+*
+* @param String $lang_range the string.
+* @param String $lang_tag the regex pattern
+* @return boolean
+*/
+function langMatches($lang_range,$lang_tag){
+
+	if($lang_range == null)
+	return false;
+
+	if(strpos($lang_range,"str_")===0)
+	$lang_range = substr($lang_range,4);
+	if(strpos($lang_tag,"str_")===0)
+	$lang_tag = substr($lang_tag,4);
+
+	if(strtolower($lang_range) == strtolower($lang_tag))
+	return true;
+	$tags =  preg_match_all("/[^\-\s].[^\-\s]*/",$lang_range,$hits);
+	if($tags){
+		if($lang_tag == '*')
+		return true;
+		foreach($hits[0] as $tag){
+			if(strtolower($tag) == strtolower($lang_tag))
+			return true;
+		}
+		return false;
+	}else{
+		return false;
+	}
+}
+
+/**
+* Evaluates the str() function. Returns the string representation of a 
+* variable or RDF term.
+*
+* @param  String $string the string
+* @return boolean
+*/
+function str($string){
+	$str = preg_match("/\".[^\"]*\"|\'.[^\']*\'/",$string,$hits);
+	if($str != 0){
+		return "str_".$hits[0];
+	}else{
+		if(strpos($string,"str_")===0){
+			return $string;
+		}else{
+			if(strpos($string,"uri_")===0)
+				return "str_".substr($string,4);
+			if(strpos($string,'<')==0)
+				return "str_".substr($string,1,-1);
+		}
+	}
+	return false;
+}
+
+/**
+* Evaluates the lang() function. Returns lang tag of a Literal.
+*
+* @param  String $string the string.
+* @return String the lang tag or false if there is no language tag.
+*/
+function lang($string){
+	$str = preg_match("/\".[^\"]*\"@(.[^\s]*)|\'.[^\']*\'@(.[^\s]*)/",$string,$hits);
+	if($str){
+		if($hits[1] != null)
+		return $hits[1];
+		else
+		return $hits[2];
+	}else{
+		return false;
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/GraphPattern.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/GraphPattern.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/GraphPattern.php	(revision 225)
@@ -0,0 +1,295 @@
+<?php
+// ---------------------------------------------
+// class: GraphPattern
+// ---------------------------------------------
+
+/**
+* A graph pattern which consists of triple patterns, optional
+* or union graph patterns and filters.
+*
+* @author   Tobias Gauss <tobias.gauss@web.de>
+* @version     $Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+
+class GraphPattern extends Object{
+
+    /**
+    * Graphname. 0 if its in the default graph.
+    */
+    protected $graphname = null;
+
+    /**
+    * Array of QueryTriple objects
+    * @var array
+    */
+    protected $triplePatterns = array();
+
+    /**
+    * A List of Constraint objects
+    * @var array
+    */
+    protected $constraints = array();
+
+    /**
+    * @var int Pointer to optional pattern.
+    */
+    protected $optional = null;
+
+    /**
+    * @var int Pointer to union pattern.
+    */
+    protected $union = null;
+
+    /**
+    * ID of the pattern in the pattern list that
+    * this pattern is subpattern of.
+    * @var int
+    */
+    protected $subpatternOf = null;
+
+    /**
+    * @var boolean TRUE if the pattern is open- FALSE if closed.
+    */
+    public $open = false;
+
+    /**
+    * @var boolean TRUE if the GraphPattern is a construct pattern.
+    */
+    public $isConstructPattern = false;
+
+
+    /**
+    * @var int The GraphPatterns id.
+    */
+    public $patternId = null;
+
+
+    /**
+    * Constructor
+    */
+    public function GraphPattern() {
+        $this->open               = true;
+        $this->isConstructPattern = false;
+        $this->constraints        = array();
+        $this->triplePatterns     = array();
+    }
+
+    /**
+    * Returns the graphname.
+    *
+    * @return String
+    */
+    public function getGraphname(){
+        return $this->graphname;
+    }
+
+    /**
+    * Returns the triple pattern of the graph pattern.
+    *
+    * @return Array
+    */
+    public function getTriplePatterns(){
+        return $this->triplePatterns;
+    }
+
+    /**
+    * Returns a constraint if there is one false if not.
+    *
+    * @return Constraint
+    */
+    public function getConstraints() {
+        return $this->constraints;
+    }
+
+    /**
+    * Returns a pointer to an optional graph pattern.
+    *
+    * @return integer
+    */
+    public function getOptional() {
+        return $this->optional;
+    }
+
+    /**
+    * Returns a pointer to the parent pattern this pattern
+    * is subpattern of.
+    *
+    * @return integer
+    */
+    public function getSubpatternOf() {
+        return $this->subpatternOf;
+    }
+
+    /**
+    * Returns a pointer to a union graph pattern.
+    *
+    * @return integer
+    */
+    public function getUnion() {
+        return $this->union;
+    }
+
+    /**
+    * Sets the graphname.
+    *
+    * @param  String $name
+    * @return void
+    */
+    public function setGraphname($name) {
+        $this->graphname = $name;
+    }
+
+    /**
+    * Adds List of QueryTriples to the GraphPattern.
+    *
+    * @param  array $trpP
+    * @return void
+    */
+    public function addTriplePatterns($trpP) {
+        $this->triplePatterns = array_merge($this->triplePatterns, $trpP);
+    }
+
+    /**
+    * Sets the List of QueryTriples to the GraphPattern.
+    *
+    * @param  array $trpP
+    * @return void
+    */
+    public function setTriplePatterns($trpP) {
+        $this->triplePatterns = $trpP;
+    }
+
+    /**
+    * Adds a single Constraint to the GraphPattern.
+    *
+    * @param  Constraint $cons
+    */
+    public function addConstraint(&$cons) {
+        $this->constraints[] = $cons;
+    }
+
+    /**
+    * Adds an array of Constraint objects to the GraphPattern.
+    *
+    * @param  array $cons
+    */
+    public function addConstraints(&$cons) {
+        $this->constraints = array_merge($this->constraints, $cons);
+    }
+
+    /**
+    * Adds a pointer to an optional graphPattern.
+    *
+    * @param  integer $patternId
+    * @return void
+    */
+    public function setOptional($patternId) {
+        $this->optional = &$patternId;
+    }
+
+    /**
+    * Adds a pointer to a union graphPattern.
+    *
+    * @param  integer $patternId
+    * @return void
+    */
+    public function setUnion($patternId) {
+        $this->union = &$patternId;
+    }
+
+    /**
+    * Adds a pointer to a pattern that
+    * this one is subpattern of
+    *
+    * @param  integer $patternId
+    */
+    public function setSubpatternOf($patternId) {
+        $this->subpatternOf = $patternId;
+    }
+
+
+    /**
+    * Sets the GraphPatterns Id.
+    *
+    * @param  integer $id
+    * @return void
+    */
+    public function setId($id){
+        $this->patternId = $id;
+    }
+
+    /**
+    * Returns the GraphPatterns id.
+    *
+    * @return integer
+    */
+    public function getId(){
+        return $this->patternId;
+    }
+
+
+
+    /**
+    *   Returns an array of all variables used in this
+    *   graph pattern.
+    *   All variables are listed only once (unique).
+    *
+    *   @return array   Array of variable names
+    */
+    public function getVariables()
+    {
+        $arVars = array();
+
+        foreach ($this->triplePatterns as $pattern) {
+            $arVars = array_merge($arVars, $pattern->getVariables());
+        }
+
+        return array_unique($arVars);
+    }//public function getVariables()
+
+
+
+    /**
+    *   Checks if the graph pattern is empty (contains no
+    *   usable data).
+    *   Occurs when using "{}" without pre- or suffixes
+    *   WHERE
+    *   {
+    *    { ?person rdf:type foaf:Person } .
+    *   }
+    *
+    *   @return boolean     True if the pattern is empty.
+    */
+    public function isEmpty()
+    {
+        return
+               count($this->triplePatterns) == 0
+            && count($this->constraints)    == 0
+            && $this->getGraphname()        === null
+        ;
+    }//public function isEmpty()
+
+
+
+    /**
+    *   When cloning, we need to clone some subobjects, too
+    */
+    public function __clone()
+    {
+        if (count($this->triplePatterns) > 0) {
+            foreach ($this->triplePatterns as $nId => $pattern) {
+                $this->triplePatterns[$nId] = clone $this->triplePatterns[$nId];
+            }
+        }
+        if (count($this->constraints) > 0) {
+            foreach ($this->constraints as $nId => $constraint) {
+                $this->constraints[$nId] = clone $this->constraints[$nId];
+            }
+        }
+    }
+
+}// end class: GraphPattern.php
+?>
Index: Dev/branches/Demo/rdfapi/sparql/Query.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/Query.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/Query.php	(revision 225)
@@ -0,0 +1,685 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/GraphPattern.php';
+
+/**
+* The Class Query represents a SPARQL query.
+*
+*
+* @author  Tobias Gauss <tobias.gauss@web.de>
+* @version $Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+class Query extends Object
+{
+    /**
+    * The BASE part of the SPARQL query.
+    * @var string
+    */
+    protected $base;
+
+    /**
+    * Original SPARQL query string
+    * @var string
+    */
+    protected $queryString = null;
+
+    /**
+    * Array that contains used prefixes and namespaces.
+    * Key is the prefix, value the namespace.
+    *
+    * @example
+    * array(8) {
+    *  ["rdf"] => string(43) "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    *  ["rdfs"]=> string(37) "http://www.w3.org/2000/01/rdf-schema#"
+    * }
+    *
+    * @var array
+    */
+    public $prefixes = array();
+
+    /**
+    * Array of result variables that shall be returned.
+    * E.g. "?name", "?mbox"
+    *
+    * @var array
+    */
+    protected $resultVars = array();
+
+    /**
+    * What form/type of result should be returned.
+    *
+    * One of:
+    * - "ask"
+    * - "count"
+    * - "construct"
+    * - "describe"
+    * - "select"
+    * - "select distinct"
+    *
+    * @var string
+    * @see http://www.w3.org/TR/rdf-sparql-query/#QueryForms
+    */
+    protected $resultForm = null;
+
+    /**
+    * Contains the result part of the SPARQL query.
+    * Array of GraphPattern
+    *
+    * @var array
+    */
+    protected $resultPart = array();
+
+    /**
+    *  Contains the FROM part of the SPARQL query.
+    * @var array
+    */
+    protected $fromPart = array();
+
+    /**
+    * Contains the FROM NAMED part of the SPARQL query.
+    * @var array
+    */
+    protected $fromNamedPart = array();
+
+    /**
+    * Optional solution modifier of the query.
+    * Array with three keys:
+    *  "order by", "limit", "offset"
+    * If they are not set, their value is null
+    *
+    * "order by" can be an array with subarrays, each of those
+    *  subarrays having two keys: "val" and "type".
+    *  "val" determines the variable ("?mbox"), "type" is
+    *  "asc" or "desc"
+    *
+    * @var array
+    */
+    protected $solutionModifier = array();
+
+    /**
+    *  Blanknode counter.
+    * How many blank nodes are in $resultPart
+    *
+    * @var int
+    */
+    protected $bnodeCounter = 0;
+
+    /**
+    * GraphPattern counter.
+    * How many GraphPattern are in $resultPart
+    *
+    * @var int
+    */
+    public $graphPatternCounter = 0;
+
+    /**
+    * List of all vars used in the query.
+    * Key is the variable (e.g. "?x"), value
+    * is boolean true
+    *
+    * @var array
+    */
+    public $usedVars = array();
+
+    /**
+    * If the query type is CONSTRUCT this variable contains the
+    * CONSTRUCT graph pattern.
+    */
+    protected $constructPattern = null;
+
+    /**
+    * TRUE if the query is empty FALSE if not.
+    *
+    * @var boolean
+    */
+    public $isEmpty = null;
+
+    /**
+    *   Language of variables. NULL if the variable has no
+    *   language tag (e.g. @en) set.
+    *   $varname => $language tag
+    *   @var array
+    */
+    public $varLanguages = array();
+
+    /**
+    *   Datatype of variables. NULL if the variable has no
+    *   data type (e.g. ^^xsd::integer) set.
+    *   $varname => $datatype
+    *   @var array
+    */
+    public $varDatatypes = array();
+
+
+
+    /**
+    * Constructor
+    */
+    public function Query(){
+        $this->resultForm = null;
+        $this->solutionModifier['order by'] = null;
+        $this->solutionModifier['limit']    = null;
+        $this->solutionModifier['offset']   = null;
+        $this->bnodeCounter = 0;
+        $this->graphPatternCounter = 0;
+
+    }
+
+    /**
+    * Returns the BASE part of the query.
+    *
+    * @return String
+    */
+    public function getBase(){
+        return $this->base;
+    }
+
+    /**
+    * Returns the prefix map of the query.
+    *
+    * @return Array
+    */
+    public function getPrefixes(){
+        return $this->prefixes;
+    }
+    
+    /**
+    * Returns a list containing the result vars.
+    *
+    * @return Array
+    */
+    public function getResultVar($strName) {
+        foreach ($this->resultVars as $var) {
+            if ($var->getVariable() == $strName) {
+                return $var;
+            }
+        }
+        return false;
+    }
+
+    /**
+    * Returns a list containing the result vars.
+    *
+    * @return Array
+    */
+    public function getResultVars(){
+        return $this->resultVars;
+    }
+
+    /**
+    * Returns the type the result shall have.
+    * E.g. "select", "select distinct", "ask", ...
+    *
+    * @see $resultForm
+    *
+    * @return string
+    */
+    public function getResultForm(){
+        return $this->resultForm;
+    }
+
+    /**
+    * Returns a list containing the graph patterns of the query.
+    *
+    * @return Array
+    */
+    public function getResultPart(){
+        return $this->resultPart;
+    }
+
+    /**
+    * Returns the FROM clause of the query.
+    *
+    * @return String
+    */
+    public function getFromPart(){
+        return $this->fromPart;
+    }
+
+    /**
+    * Returns the FROM NAMED clause of the query.
+    *
+    * @return Array
+    */
+    public function getFromNamedPart(){
+        return $this->fromNamedPart;
+    }
+
+    /**
+    * Returns $isEmpty variable
+    * @return boolean
+    */
+    public function isEmpty() {
+        return $this->isEmpty;
+    }
+
+    /**
+    * Returns an unused Bnode label.
+    *
+    * @return String
+    */
+    public function getBlanknodeLabel(){
+        return "_:bN".$this->bnodeCounter++;
+    }
+
+
+    /**
+    * Sets the base part.
+    *
+    * @param String $base
+    * @return void
+    */
+    public function setBase($base){
+        $this->base = $base;
+    }
+
+
+    /**
+    * Adds a prefix to the list of prefixes.
+    *
+    * @param  String $prefix
+    * @param  String $label
+    * @return void
+    */
+    public function addPrefix($prefix, $label){
+        $this->prefixes[$prefix]= $label;
+    }
+
+    /**
+    * Adds a variable to the list of result variables.
+    *
+    * @param  String $var
+    * @return void
+    */
+    public function addResultVar($var){
+        $this->resultVars[] = $var;
+        $var->setDatatype($this->getDatatype($var));
+
+        $this->varLanguages[$var->getId()] = self::getLanguageTag($var);
+        $this->varDatatypes[$var->getId()] = $this->getDatatype($var);
+    }
+
+
+    /**
+    * Sets the result form.
+    *
+    * @param  String $form
+    * @return void
+    */
+    public function setResultForm($form){
+        $this->resultForm = strtolower($form);
+    }
+
+
+    /**
+    * Sets the result part.
+    *
+    * @param  array Array of graph patterns
+    */
+    public function setResultPart($resultPart) {
+        $this->resultPart = $resultPart;
+    }
+
+    /**
+    * Adds a graph pattern to the result part.
+    *
+    * @param  GraphPattern $pattern
+    * @return void
+    */
+    public function addGraphPattern($pattern){
+        $pattern->setId($this->graphPatternCounter);
+        $this->resultPart[] = $pattern;
+        $this->graphPatternCounter++;
+    }
+
+    /**
+    * Adds a construct graph pattern to the query.
+    *
+    * @param  GraphPattern $pattern
+    * @return void
+    */
+    public function addConstructGraphPattern($pattern){
+        $this->constructPattern = $pattern;
+    }
+
+
+    /**
+    * Adds a graphuri to the from part.
+    *
+    * @param  String $graphURI
+    * @return void
+    */
+    public function addFrom($graphURI){
+        $this->fromPart[] = $graphURI;
+    }
+
+    /**
+    * Adds a graphuri to the from named part.
+    *
+    * @param  String $graphURI
+    * @return void
+    */
+    public function addFromNamed($graphURI){
+        $this->fromNamedPart[] = $graphURI;
+    }
+
+    /**
+    * Sets a solution modifier.
+    *
+    * @param  String $name
+    * @param  Value  $value
+    * @return void
+    */
+    public function setSolutionModifier($name, $value){
+        $this->solutionModifier[$name] = $value;
+    }
+
+
+    /**
+    * Generates a new GraphPattern. If it is a CONSTRUCT graph pattern
+    * $constr has to set to TRUE, FALSE if not.
+    *
+    * @param  boolean $constr
+    * @return GraphPattern
+    */
+    public function getNewPattern($constr = false){
+        $pattern = new GraphPattern();
+        if ($constr) {
+            $this->addConstructGraphPattern($pattern);
+        } else {
+            $this->addGraphPattern($pattern);
+        }
+        return $pattern;
+    }
+
+    /**
+    * Adds a new variable to the variable list.
+    *
+    * @param  String $var
+    * @return void
+    */
+    public function addUsedVar($var){
+        $this->usedVars[$var]=true;
+    }
+
+    /**
+    * Returns a list with all used variables.
+    *
+    * @return Array
+    */
+    public function getAllVars(){
+        return array_keys($this->usedVars);
+    }
+
+    /**
+    * Gets the solution modifiers of the query.
+    * $solutionModifier['order by'] = value
+    *                  ['limit']    = vlaue
+    *                  ['offset']   = value
+    *
+    *
+    * @return Array
+    */
+    public function getSolutionModifier(){
+        return $this->solutionModifier;
+    }
+
+
+    /**
+    * Returns the construvtGraphPattern of the query if there is one.
+    *
+    * @return GraphPattern
+    */
+    public function getConstructPattern(){
+        return $this->constructPattern;
+    }
+
+
+
+    /**
+    *   Returns a list of variables used in the construct patterns.
+    *
+    *   @return array Array of variable names, unique.
+    */
+    public function getConstructPatternVariables()
+    {
+        $arVars = array();
+/*
+        if (count($this->resultPart) > 0) {
+            foreach ($this->resultPart as $pattern) {
+                $arVars = array_merge($arVars, $pattern->getVariables());
+            }
+        }
+*/
+        if ($this->constructPattern) {
+            $arVars = array_merge($arVars, $this->constructPattern->getVariables());
+        }
+
+        return array_unique($arVars);
+    }//public function getConstructPatternVariables()
+
+
+
+    /**
+    *   Returns the language of a variable if the tag is set (e.g. @en)
+    *   Returns NULL if no language is set.
+    *
+    *   @param string Sparql variable name
+    *   @return mixed NULL or language tag
+    */
+    public static function getLanguageTag($var)
+    {
+        $nAt = strpos($var, '@');
+        if ($nAt === false) {
+            return null;
+        }
+        //in case @ and ^^ are combined
+        $nHatHat = strpos($var, '^^', $nAt + 1);
+        if ($nHatHat === false) {
+            $tag = substr($var, $nAt + 1);
+        } else {
+            $tag = substr($var, $nAt + 1, $nHatHat - $nAt - 1);
+        }
+        return $tag;
+    }//public static function getLanguageTag($var)
+
+
+
+    /**
+    *   Returns the datatype of a variable if it is set.
+    *
+    *   @param string Sparql variable name
+    *   @return mixed NULL or datatype
+    */
+    public function getDatatype($var)
+    {
+        $nHatHat = strpos($var, '^^');
+        if ($nHatHat === false) {
+            return null;
+        }
+        $nAt = strpos($var, '@', $nHatHat + 2);
+        if ($nAt === false) {
+            $type = substr($var, $nHatHat + 2);
+        } else {
+            $type = substr($var, $nHatHat + 2, $nAt - $nHatHat - 2);
+        }
+
+        $fullUri = $this->getFullUri($type);
+        if ($fullUri === false) {
+            $fullUri = $type;
+            if ($fullUri[0] == '<' && substr($fullUri, -1) == '>') {
+                $fullUri = substr($fullUri, 1, -1);
+            }
+        }
+
+        return $fullUri;
+    }//public function getDatatype($var)
+
+
+
+    /**
+    * Gets the full URI of a qname token.
+    *
+    * @param  string $token
+    * @return string The complete URI of a given token, false if $token is not
+    *                a qname or the prefix is not defined
+    */
+    public function getFullUri($token)
+    {
+        $pattern="/^([^:]*):([^:]*)$/";
+        if (preg_match($pattern, $token, $hits) > 0) {
+
+            if (isset($this->prefixes{$hits{1}})) {
+                return substr($this->base, 1, -1)
+                     . $this->prefixes{$hits{1}}
+                     . $hits{2};
+            }
+            if ($hits{1}=='_') {
+                return "_".$hits{2};
+            }
+        }
+
+        return false;
+    }
+
+
+
+    /**
+    *   Checks if the query is complete
+    *   (so that querying is possible)
+    *
+    *   @return boolean true if the query is complete
+    */
+    public function isComplete()
+    {
+        if ($this->resultForm === null) {
+            return false;
+        }
+        //TODO: maybe check selected vars and construct pattern depending
+        // on the resultform
+        return true;
+    }//public function isIncomplete()
+
+
+
+    /**
+    * Sets the orignal query string
+    *
+    * @param string $queryString SPARQL query string
+    */
+    public function setQueryString($queryString)
+    {
+        $this->queryString = $queryString;
+    }//public function setQueryString($queryString)
+
+
+
+    /**
+    * Returns the orignal query string
+    *
+    * @return string SPARQL query string
+    */
+    public function getQueryString()
+    {
+        return $this->queryString;
+    }//public function getQueryString()
+
+}// end class: Query.php
+
+
+
+class Query_ResultVariable
+{
+    public $variable = null;
+    public $datatype = null;
+    public $language = null;
+    public $alias    = null;
+    public $func     = null;
+
+
+    public function __construct($variable)
+    {
+        $this->variable = $variable;
+        $this->language = Query::getLanguageTag($variable);
+    }
+
+
+
+    public function setAlias($alias)
+    {
+        $this->alias = $alias;
+    }
+
+
+
+    public function setFunc($func)
+    {
+        $this->func = $func;
+    }
+
+
+
+    public function setDatatype($datatype)
+    {
+        $this->datatype = $datatype;
+    }
+
+
+
+    public function getId()
+    {
+        //FIXME
+        return $this->variable;
+    }
+
+
+
+    public function getFunc()
+    {
+        return $this->func;
+    }
+
+
+
+    public function getLanguage()
+    {
+        return $this->language;
+    }
+
+
+
+    public function getDatatype()
+    {
+        return $this->datatype;
+    }
+
+
+
+    public function getName()
+    {
+        if ($this->alias !== null) {
+            return $this->alias;
+        }
+        //FIXME: support for nested(functions())
+        return $this->variable;
+    }
+
+
+
+    public function getVariable()
+    {
+        return $this->variable;
+    }
+
+
+
+    public function __toString()
+    {
+        return $this->getName();
+    }
+
+}//class Query_ResultVariable
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/QueryTriple.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/QueryTriple.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/QueryTriple.php	(revision 225)
@@ -0,0 +1,123 @@
+<?php
+// ---------------------------------------------
+// Class: QueryTriple
+// ---------------------------------------------
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlVariable.php';
+
+/**
+* Represents a query triple with subject, predicate and object.
+*
+* @author   Tobias Gauss <tobias.gauss@web.de>
+* @version	$Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+class QueryTriple extends Object
+{
+
+    /**
+    * The QueryTriples Subject.
+    * Can be a BlankNode or Resource, string in
+    * case of a variable
+    * @var Node/string
+    */
+    protected $subject;
+
+    /**
+    * The QueryTriples Predicate.
+    * Normally only a Resource, string in
+    * case of a variable
+    * @var Node/string
+    */
+    protected $predicate;
+
+    /**
+    * The QueryTriples Object.
+    * Can be BlankNode, Resource or Literal, string in
+    * case of a variable
+    * @var Node/string
+    */
+    protected $object;
+
+
+
+    /**
+    * Constructor
+    *
+    * @param Node $sub  Subject
+    * @param Node $pred Predicate
+    * @param Node $ob   Object
+    */
+    public function QueryTriple($sub,$pred,$ob)
+    {
+        $this->subject   = $sub;
+        $this->predicate = $pred;
+        $this->object    = $ob;
+    }
+
+    /**
+    * Returns the Triples Subject.
+    *
+    * @return Node
+    */
+    public function getSubject()
+    {
+        return $this->subject;
+    }
+
+    /**
+    * Returns the Triples Predicate.
+    *
+    * @return Node
+    */
+    public function getPredicate()
+    {
+        return $this->predicate;
+    }
+
+    /**
+    * Returns the Triples Object.
+    *
+    * @return Node
+    */
+    public function getObject()
+    {
+        return $this->object;
+    }
+
+
+
+    /**
+    *   Returns an array of all variables in this triple.
+    *
+    *   @return array   Array of variable names
+    */
+    public function getVariables()
+    {
+        $arVars = array();
+
+        foreach (array('subject', 'predicate', 'object') as $strVar) {
+            if (SparqlVariable::isVariable($this->$strVar)) {
+                $arVars[] = $this->$strVar;
+            }
+        }
+
+        return $arVars;
+    }//public function getVariables()
+
+
+
+    public function __clone()
+    {
+        foreach (array('subject', 'predicate', 'object') as $strVar) {
+            if (is_object($this->$strVar)) {
+                $this->$strVar = clone $this->$strVar;
+            }
+        }
+    }//public function __clone()
+
+}//class QueryTriple extends Object
+
+// end class: QueryTriple.php
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SPARQL.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SPARQL.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SPARQL.php	(revision 225)
@@ -0,0 +1,20 @@
+<?php
+// ----------------------------------------------------------------------------------
+// SPARQL
+// ----------------------------------------------------------------------------------
+//
+// Description               : Sparql package
+// ----------------------------------------------------------------------------------
+
+// include SPARQL classes
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/FilterFunctions.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/Constraint.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/GraphPattern.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/Query.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/QueryTriple.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlParserException.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php' );
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlClient.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlClient.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlClient.php	(revision 225)
@@ -0,0 +1,151 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: SparqlEngine
+// ----------------------------------------------------------------------------------
+
+/**
+* Client for querying a sparql server.
+*
+* @version  $Id: SparqlClient.php 573 2008-05-26 09:04:29Z cyganiak $
+* @author   Tobias GauÃ <tobias.gauss@web.de>
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+
+class SparqlClient extends Object {
+
+	var $server;
+	var $output;	
+
+	/**
+	* Constructor of SparlClient.
+	*
+	* @param String  $server   server address.
+	*/
+	function SparqlClient($server){
+		$this->server = $server;
+		$this->output = "array";
+	}
+
+
+	/**
+	* Sets the output format for a SELECT or ASK query. Possible formats are "xml" for
+	* Sparql Query Results XML Format (http://www.w3.org/TR/rdf-sparql-XMLres/) or array
+	* for the format described in our SparqlEngine.
+	*
+	* @param String  $format   the format.
+	*/
+	function setOutputFormat($format){
+		if(strtolower($format)=="xml")
+		$this->output = "xml";
+		if(strtolower($format)=="array")
+		$this->output = "array";
+
+	}
+
+	/**
+	* Main function of SparqlClient.
+	*
+	* @param ClientQuery  $query   the ClientQuery object.
+	* @return mixed returns an array that contains the variables an their bindings or a MemModel
+	*
+	*/
+	function query($query){
+		if(!is_a($query,"ClientQuery"))
+		die;//ErrorHandling
+
+		$url    = $this->_buildurl($query);
+		$result = $this->_http_get($url);
+		return $this->returnResult($result);
+
+	}
+
+
+	/**
+	* Helper function that builds the url.
+	*
+	* @param ClientQuery  $query   the ClientQuery Object.
+	*/
+
+	function _buildurl($query){
+		$url = "";
+		$url = $this->server."?query=".urlencode($query->query);
+		foreach($query->default as $defaultg){
+			$url = $url."&default-graph-uri=".$defaultg;
+		}
+		foreach($query->named as $namedg){
+			$url = $url."&named-graph-uri=".$namedg;
+		}
+
+		return $url;
+
+	}
+
+	/**
+	* Returns the query result.
+	*
+	* @param String  $result  the result.
+	* @return mixed
+	*/
+	function returnResult($result){
+
+		if(strpos($result,"<rdf:RDF")){
+			include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+			$parser = new RdfParser();
+			return $parser->generateModel(substr($result,strpos($result,"<rdf:RDF")));
+		}
+
+		if($this->output == "xml"){
+			$pos = strpos($result,"<?xml");
+			return substr($result,$pos);
+		}
+		if($this->output == "array"){
+			//	$pos = strpos($buffer,"<?xml");
+			return $this->parseResult($result);
+		}
+		return $result;
+	}
+
+
+	function parseResult($buffer){
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_SPARQLRES);
+		$parser = new SparqlResultParser();
+		return $parser->parse($buffer);
+	}
+
+
+	/**
+	* Executes the GET Request.
+	*
+	* @param String  $url  the url.
+	* @return String result.
+	*/
+	function _http_get($url)
+	{
+		$url = parse_url($url);
+		$port = isset($url['port']) ? $url['port'] : 80;
+
+		$fp = fsockopen($url['host'], $port);
+
+		$replace = $url['path'];
+
+		fputs($fp, "GET ".$replace."?".$url['query']." HTTP/1.0\r\n");
+		fputs($fp, "Host: ". $url['host']."\r\n");
+		fputs($fp, "Accept: application/sparql-results+xml, application/rdf+xml\r\n");
+		fputs($fp, "Connection: close\r\n\r\n");
+
+		$buffer = "";
+		while ($tmp = fread($fp, 1024))
+		{
+			$buffer .= $tmp;
+		}
+
+		return preg_replace("/^.*?(\r\n\r\n|\n\n)/s", "", $buffer);
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine.php	(revision 225)
@@ -0,0 +1,1180 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'util/Object.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/FilterFunctions.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine/ResultConverter.php';
+
+// ----------------------------------------------------------------------------------
+// Class: SparqlEngine
+// ----------------------------------------------------------------------------------
+
+/**
+* This engine executes SPARQL queries against an RDF Datatset.
+*
+* @version  $Id$
+* @author   Tobias GauÃ <tobias.gauss@web.de>
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+
+Class SparqlEngine extends Object{
+
+
+    /**
+    *   The query object.
+    *   @var Query
+    */
+    protected $query;
+
+    /**
+    *   The RDF Dataset.
+    *   @var Dataset
+    */
+    protected $dataset;
+
+	// Store the single instance of Database 
+    protected static $instance;
+
+
+    /**
+    * Use SparqlEngine::factory() instead of this
+    * constructor.
+    */
+    protected function __construct()
+    {
+        //protected to prevent direct instantiation
+    }
+
+	public static function getInstance() 
+    { 
+        if (!self::$instance) 
+        { 
+            self::$instance = new SparqlEngine(); 
+        } 
+
+        return self::$instance; 
+    }
+
+    /**
+    * Creates a new instance of the SparqlEngine, depending on the
+    * given model. For example, if you pass a DbModel, you will
+    * get a SparqlEngine specialized on databases.
+    *
+    * @param Model $model   RDF model that uses the engine
+    */
+    public function factory($model = null)
+    {
+        if ($model !== null && $model instanceof DbModel) {
+            require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb.php';
+            return new SparqlEngineDb($model);
+        } else {
+            return new SparqlEngine();
+        }
+    }
+
+
+
+    /**
+    * The query engine's main method.
+    *
+    * @param  Dataset       $dataset    the RDF Dataset
+    * @param  mixed         $query      the parsed SPARQL query
+    * @param  String        $resultform the result form. If set to 'xml' the result will be
+    *                                   SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
+    * @return Array/String  Type of the result depends on $resultform.
+    */
+    public function queryModel($dataset, Query $query, $resultform = false)
+    {
+        $this->query   = $query;
+        $this->dataset = $dataset;
+
+        if($this->query->isEmpty){
+            $vartable[0]['patternResult'] = null;
+            return SparqlEngine_ResultConverter::convertFromResult(
+                $vartable,
+                $this,
+                $resultform
+            );
+        }
+
+        $graphlist = $this->preselectGraphs();
+        /// match graph patterns against the RDF Dataset
+        $patternlist = $this->matchPatterns($graphlist);
+        // filter results- apply inner filters
+        $patternlist = $this->filterPatterns($patternlist,false);
+        // join pattern results
+        $vartable = $this->joinResults($patternlist);
+        // filter results- apply outer filters
+        $vartable = $this->filterPatterns($vartable,true);
+
+        if ($vartable[0]['patternResult'] != null) {
+            // sort vars (ORDER BY, LIMIT, OFFSET)
+            $vartable = $this->sortVars($vartable[0]['patternResult']);
+            $qrf      = $this->query->getResultForm();
+            if ($qrf == 'select' || $qrf == 'select distinct') {
+                $vars     = $this->query->getResultVars();
+                $vartable = $this->selectVars($vartable, $vars);
+                if ($qrf == 'select distinct') {
+                    $vartable = $this->distinct($vartable);
+                }
+            }
+        } else {
+            $vartable = null;
+        }
+
+        return SparqlEngine_ResultConverter::convertFromResult(
+            $vartable,
+            $this,
+            $resultform
+        );
+    }//public function queryModel($dataset, Query $query, $resultform = false)
+
+
+
+    /**
+    * Matches all graph Patterns against the dataset and generates an array which
+    * contains the result sets for every given GraphPattern.
+    *
+    * @param  Array      $graphlist   the graphlist which contains the names of the named
+    *                    graphs which has to be queried.
+    * @return Array
+    */
+    protected function matchPatterns($graphlist){
+        $patternlist = array();
+        // get the result part from the query
+        $resultPart = $this->query->getResultPart();
+        // for each GrapPattern in the result part
+        if($resultPart)
+        foreach($resultPart as $graphPattern){
+            $this->matchPattern($patternlist, $graphlist, $graphPattern);
+        }
+        return $patternlist;
+    }
+
+
+
+    /**
+    * Finds tuples that match one graph pattern.
+    *
+    * @param  Array        $patternlist list that contains the graphPatterns
+    * @param  array        $graphlist   the graphlist
+    * @param  GraphPattern $graphPattern the pattern which has to be matched
+    * @return void
+    */
+    protected function matchPattern(&$patternlist, $graphlist, &$graphPattern) {
+        // generate an empty result set
+        $finalRes = null;
+        // if the GraphPattern has triple patterns
+        if (count($graphPattern->getTriplePatterns()) > 0) {
+            // check if the pattern has a GRAPH clause and if this Iri is in $graphlist
+            $newGraphList = $this->_checkGraphs($graphPattern,$graphlist);
+            if($newGraphList){
+                $qt = $graphPattern->getTriplePatterns();
+                $resultSet = $this->findTuplesMatchingOnePattern($qt[0], $newGraphList);
+                for ($i=1; $i<count($qt); $i++) {
+                    $rs = $this->findTuplesMatchingOnePattern($qt[$i], $newGraphList);
+                    $resultSet = $this->joinTuples($resultSet, $rs);
+                    if(!$resultSet)
+                    break;
+                }
+                if($finalRes != null){
+                    $finalRes = $this->joinTuples($finalRes,$resultSet);
+                }else{
+                    $finalRes = $resultSet;
+                }
+            }
+        }
+        // dependencies between pattern results
+        $patternlist[$graphPattern->getId()]['hasOptional']     = 0;
+        $patternlist[$graphPattern->getId()]['hasUnion']        = 0;
+        $patternlist[$graphPattern->getId()]['patternResult']   = $finalRes;
+
+        $op = $graphPattern->getOptional();
+        $un = $graphPattern->getUnion();
+
+        $patternlist[$graphPattern->getId()]['optionalTo']      = $op;
+        if(is_int($op))
+        $patternlist[$op]['hasOptional']++;
+
+        $patternlist[$graphPattern->getId()]['unionWith']       = $un;
+        if(is_int($un))
+        $patternlist[$un]['hasUnion']++;
+
+        $constraint = $graphPattern->getConstraints();
+        if(count($constraint) > 0){
+            foreach($constraint as $constr){
+                if($constr->isOuterFilter()){
+                    $patternlist[$graphPattern->getId()]['outerFilter'][]          = $constr;
+                    $patternlist[$graphPattern->getId()]['innerFilter'][]          = null;
+                }else{
+                    $patternlist[$graphPattern->getId()]['innerFilter'][]          = $constr;
+                    $patternlist[$graphPattern->getId()]['outerFilter'][]          = null;
+                }
+            }
+        }else{
+            $patternlist[$graphPattern->getId()]['innerFilter']          = null;
+            $patternlist[$graphPattern->getId()]['outerFilter']          = null;
+        }
+    }
+
+
+    /**
+    * Finds Tuples matching one TriplePattern.
+    *
+    * @param  TriplePattern $pattern
+    * @param  Array         $graphlist
+    * @return Array
+    */
+    protected function findTuplesMatchingOnePattern($pattern, $graphlist){
+        $var = null;
+        $sub  = $pattern->getSubject();
+        $pred = $pattern->getPredicate();
+        $obj  = $pattern->getObject();
+
+        if(is_string($sub)||$sub instanceof BlankNode){
+            if(is_string($sub))
+            $var['sub'] = $sub;
+            $sub = null;
+        }
+        if(is_string($pred)||$pred instanceof BlankNode ){
+            if(is_string($pred))
+            $var['pred'] = $pred;
+            $pred = null;
+        }
+        if(is_string($obj)||$obj instanceof BlankNode){
+            if(is_string($obj))
+            $var['obj'] = $obj;
+            $obj = null;
+        }
+        $intBindings = $this->_buildIntBindings($var);
+        $k = 0;
+
+        $key = 0;
+        // search in named graphs
+        if($graphlist['var'][0] != null||$graphlist['list'][0] != null){
+            foreach($graphlist['list'] as $key => $graphnode){
+
+                // query the dataset
+                $it = $this->dataset->findInNamedGraphs($graphnode,$sub,$pred,$obj,false);
+                if($it->valid()){
+                    // add statements to the result list
+                    while($it->valid()){
+                        if($graphnode == null){
+                            $element = $it->current()->getStatement();
+                            $grname  = $it->current()->getGraphname();
+                        }else{
+                            if($it->current() instanceof Quad)
+                                $element = $it->current()->getStatement();
+                            else
+                                $element = $it->current();
+
+                            $grname  = $graphnode;
+                        }
+                        if($this->checkIntBindings($element,$intBindings)){
+                            $resmodel['trip'][$k]  = $element;
+                            $resmodel['graph'][$k] = $grname;
+                        //    $resmodel['graphvar'][$k] = $graphlist['var'][$key];
+                            $resmodel['graphvar'][$k] = $graphlist['var'][0];
+                            $k++;
+
+                        }
+                        $it->next();
+                    }
+                }
+
+            }
+        }
+        // search in the default graph
+        if($graphlist['list'][0] == null && $graphlist['var'][0] == null){
+
+
+            $gr = $this->dataset->getDefaultGraph();
+
+            $res = $gr->find($sub,$pred,$obj);
+
+            foreach($res->triples as $innerkey => $element){
+                if($this->checkIntBindings($element,$intBindings)){
+                        $resmodel['trip'][$k]  = $element;
+                        $resmodel['graph'][$k] = null;
+                        $resmodel['graphvar'][$k] = $graphlist['var'][$key];
+                        $k++;
+                    }
+            }
+        }
+        if($k == 0)
+        return false;
+        return $this->_buildResultSet($pattern,$resmodel);
+    }
+
+    /**
+    * Checks it there are internal bindings between variables.
+    *
+    * @param  Triple  $trip
+    * @param  Array   $intBindings
+    * @return boolean
+    */
+    protected function checkIntBindings($trip, $intBindings){
+        switch($intBindings){
+            case -1:
+            return true;
+            break;
+            case 0:
+            if($trip->subj != $trip->pred)
+            return false;
+            break;
+            case 1:
+            if(is_a($trip->obj,'Literal'))
+            return false;
+            if($trip->subj != $trip->obj)
+            return false;
+            break;
+            case 2:
+            if(is_a($trip->obj,'Literal'))
+            return false;
+            if($trip->pred != $trip->obj)
+            return false;
+            break;
+            case 3:
+            if(is_a($trip->obj,'Literal'))
+            return false;
+            if($trip->pred != $trip->obj || $trip->pred != $trip->subj )
+            return false;
+            break;
+        }
+        return true;
+    }
+
+
+    /**
+    * Perform an SQL-like inner join on two resultSets.
+    *
+    * @param   Array   &$finalRes
+    * @param   Array   &$res
+    * @return  Array
+    */
+    protected function joinTuples(&$finalRes, &$res) {
+
+        if (!$finalRes || !$res)
+        return array();
+
+        // find joint variables and new variables to be added to $finalRes
+        $jointVars = array();
+        $newVars = array();
+        $k = key($res);
+
+        foreach ($res[$k] as $varname => $node) {
+            if (array_key_exists($varname, $finalRes[0]))
+            $jointVars[] = $varname;
+            else
+            $newVars[] = $varname;
+        }
+
+        // eliminate rows of $finalRes in which the values of $jointVars do not have
+        // a corresponding row in $res.
+        foreach ($finalRes as $n => $fRes) {
+            foreach ($res as $i => $r) {
+                $ok = TRUE;
+                foreach ($jointVars as $j_varname)
+                if ($r[$j_varname] != $fRes[$j_varname]) {
+                    $ok = FALSE;
+                    break;
+                }
+                if ($ok)
+                break;
+            }
+            if (!$ok)
+            unset($finalRes[$n]);
+        }
+
+        // join $res and $finalRes
+        $joinedRes = array();
+        foreach ($res as $r) {
+            foreach ($finalRes as $n => $fRes) {
+                $ok = TRUE;
+                foreach ($jointVars as $j_varname)
+                if ($r[$j_varname] != $fRes[$j_varname]) {
+                    $ok = FALSE;
+                    break;
+                }
+                if ($ok) {
+                    $joinedRow = $finalRes[$n];
+                    foreach($newVars as $n_varname)
+                    $joinedRow[$n_varname] = $r[$n_varname];
+                    $joinedRes[] = $joinedRow;
+                }
+            }
+        }
+        return $joinedRes;
+    }
+
+
+    /**
+    * Joins OPTIONAL pattern results.
+    *
+    * @param   Array   &$finalRes
+    * @param   Array   &$res
+    * @return  Array    the joined Array
+    */
+    protected function joinOptionalTuples(&$finalRes, &$res) {
+
+        if(!$finalRes && !$res)
+        return array();
+
+        if(!$finalRes)
+        return $res;
+
+        if(!$res)
+        return $finalRes;
+
+        // find joint variables and new variables to be added to $finalRes
+        $jointVars = array();
+        $newVars = array();
+        $result = array();
+
+        $k = key($res);
+
+        foreach ($res[$k] as $varname => $node) {
+            if (array_key_exists($varname, $finalRes[0])){
+                $jointVars[] = $varname;
+            }else{
+                $newVars[] = $varname;
+            }
+        }
+        $joined = array();
+        $joinc = 0;
+        foreach($finalRes as $i =>$fRes){
+            foreach($res as $n =>$r){
+                $join = false;
+                foreach($jointVars as $j_varname){
+                    if($r[$j_varname]==$fRes[$j_varname]){
+                        $join = true;
+                        //break;
+                    }else{
+                        $join = false;
+                    }
+                }
+                if($join){
+                    $result[$joinc] = $fRes;
+                    foreach($newVars as $n_varname)
+                    $result[$joinc][$n_varname] = $r[$n_varname];
+                    $joined[]=$n;
+                    $joinc++;
+                }
+
+            }
+        }
+
+        $count = count($result);
+        foreach($res as $k =>$val){
+            if(!in_array($k,$joined)){
+                $result[$count] = $finalRes[0];
+                foreach($result[$count] as $varname => $varVal){
+                    $result[$count][$varname]='';
+                }
+
+                foreach($val as $varname2 => $varVal2){
+                    $result[$count][$varname2]=$varVal2;
+                }
+                $count++;
+            }
+        }
+        return $result;
+    }
+
+
+
+    /**
+    * Looks in from and from named part of the query and
+    * adds the graphs to the graphlist.
+    *
+    * @return Array
+    */
+    protected function preselectGraphs(){
+        $fromNamed = $this->query->getFromNamedPart();
+        if($fromNamed == null)
+        $fromNamed[] = null;
+        return $fromNamed;
+    }
+
+
+    /**
+    * Evaluates the GRPAH clause if there is one. Checks if
+    * the GRAPH clause contains an IRI, variable or nothing.
+    * Returns an array which contains the graphs that has to be matched.
+    *
+    * @param  GraphPattern $pattern
+    * @param  Array        $graphlist
+    * @return Array
+    */
+    protected function _checkGraphs(&$pattern,$graphlist){
+
+        $gr = $pattern->getGraphname();
+        if($gr instanceof Resource ){
+            if($graphlist[0]==null || in_array($gr,$graphlist)){
+                $newGraphList['list'][] = $gr;
+                $newGraphList['var'][]  = null;
+            }else{
+                return false;
+            }
+        }elseif (is_string($gr)){
+            $newGraphList['list'] = $graphlist;
+            $newGraphList['var'][]  = $gr;
+        }else{
+            $newGraphList['list'] = $graphlist;
+            $newGraphList['var'][]  = null;
+        }
+        return $newGraphList;
+    }
+
+    /**
+    * Marks triples with internal bindings.
+    * int bindings -1 :none 0:sub=pred 1:sub=obj 2:pred=obj 3:sub=pred=obj.
+    *
+    * @param  Array $var
+    * @return Array
+    */
+    protected function _buildIntBindings($var){
+        $intBindings = -1;
+        if(!$var)
+        return $intBindings;
+
+        if(isset($var['sub'])){
+            if(isset($var['pred']))
+            if($var['sub'] == $var['pred'])
+            $intBindings = 0;
+            if(isset($var['obj']))
+            if($var['sub'] == $var['obj']){
+                if( $intBindings == 0){
+                    $intBindings = 3;
+                }else{
+                    $intBindings = 1;
+                }
+            }
+        }
+        if(isset($var['pred'])){
+            if(isset($var['obj']))
+            if($var['pred']==$var['obj']&&$intBindings!=3)
+            $intBindings = 2;
+        }
+        return $intBindings;
+    }
+
+    /**
+    * Builds the resultset.
+    *
+    * @param  GraphPattern $pattern
+    * @param  Array        $resmodel
+    * @return Array
+    */
+    protected function _buildResultSet($pattern,$resmodel){
+        // determine variables and their corresponding values
+        $result = null;
+        if(is_string($pattern->getSubject())){
+            $n = 0;
+            foreach($resmodel['trip'] as $key => $triple){
+                if(isset($resmodel['graphvar'][$key]))
+                $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key];
+                $result[$n++][$pattern->getSubject()] = $triple->subj;
+            }
+        }
+        if(is_string($pattern->getPredicate())){
+            $n = 0;
+            foreach($resmodel['trip'] as $key => $triple){
+                if(isset($resmodel['graphvar'][$key]))
+                $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key];
+                $result[$n++][$pattern->getPredicate()] = $triple->pred;
+            }
+        }
+        if(is_string($pattern->getObject())){
+            $n = 0;
+            foreach($resmodel['trip'] as $key => $triple){
+                if(isset($resmodel['graphvar'][$key]))
+                $result[$n][$resmodel['graphvar'][$key]] = $resmodel['graph'][$key];
+                $result[$n++][$pattern->getObject()] = $triple->obj;
+            }
+        }
+        return $result;
+    }
+
+    /**
+    * Selects the result variables and builds a result table.
+    *
+    * @param  Array  $table the result table
+    * @param  Array  $vars the result variables
+    * @return Array
+    */
+    protected function selectVars($table,$vars){
+        if($vars[0]=='*')
+        $vars = $this->query->getAllVars();
+        $resTable = array();
+        $hits = 0;
+        foreach($table as $val){
+            foreach($vars as $var){
+                if(isset($val[(string)$var])){
+                    $resTable[$hits][(string)$var]=$val[(string)$var];
+                }else{
+                    $resTable[$hits][(string)$var]="";
+                }
+            }
+            $hits++;
+        }
+        return $resTable;
+    }
+
+    /**
+    * Joins the results of the different Graphpatterns.
+    *
+    * @param  Array $patternlist
+    * @return Array
+    */
+    protected function joinResults($patternlist){
+        $joined[0]['patternResult'] = null;
+        $joined[0]['outerFilter'] = null;
+
+        while(count($patternlist)>0){
+            foreach($patternlist as $key => $pattern){
+                if($pattern['hasOptional'] == 0 && $pattern['hasUnion'] == 0){
+                    if(is_int($pattern['optionalTo'])){
+                        $patternlist[$pattern['optionalTo']]['hasOptional']--;
+                        $patternlist[$pattern['optionalTo']]['patternResult'] = $this->joinOptionalTuples($pattern['patternResult'],$patternlist[$pattern['optionalTo']]['patternResult']);
+                        unset($patternlist[$key]);
+                        break;
+                    }
+                    else if(is_int($pattern['unionWith'])){
+                        $patternlist[$pattern['unionWith']]['hasUnion']--;
+                        foreach($pattern['patternResult'] as $value)
+                        array_push($patternlist[$pattern['unionWith']]['patternResult'],$value);
+                        unset($patternlist[$key]);
+                        break;
+                    }else{
+                        if($joined[0]['patternResult'] == null){
+                            $joined[0]['patternResult'] = $pattern['patternResult'];
+                            if($joined[0]['outerFilter'] == null )
+                            $joined[0]['outerFilter']  = $pattern['outerFilter'];
+                            unset($patternlist[$key]);
+                            break;
+                        }
+                    //    if($pattern['patternResult'] !=null ){
+                            $joined[0]['patternResult'] = $this->joinTuples($joined[0]['patternResult'],$pattern['patternResult']);
+                            $joined[0]['outerFilter']   = $pattern['outerFilter'];
+                            unset($patternlist[$key]);
+                            break;
+                    //    }
+                    }
+                }
+            }
+        }
+        return $joined;
+    }
+
+    /**
+    * Filters the pattern results.
+    *
+    * @param  Array   $patternlist list containing the results of the GraphPatterns
+    * @param  boolean $outer TRUE if its an outer filter FALSE if not
+    * @return Array   the filtered patternlist
+    */
+    protected function filterPatterns($patternlist,$outer){
+        if($outer)
+        $filter = 'outerFilter';
+        else
+        $filter = 'innerFilter';
+        foreach($patternlist as $patkey => $pattern){
+            // get constraints
+            $constraint = $pattern[$filter];
+
+            if(count($constraint)>0){
+                foreach($constraint as $constr){
+                    if($constr != null){
+                        // extract Vars and function calls
+                        $evalString = $constr->getExpression();
+                        preg_match_all("/\?.[^\s\)\,]*/",$evalString,$vars);
+                        preg_match_all("/bound\((.[^\)]*)\)/i",$evalString,$boundcalls);
+                        preg_match_all("/isuri\((.[^\)]*)\)/i",$evalString,$isUricalls);
+                        preg_match_all("/isblank\((.[^\)]*)\)/i",$evalString,$isBlankcalls);
+                        preg_match_all("/isLiteral\((.[^\)]*)\)/i",$evalString,$isLiteralcalls);
+                        preg_match_all("/lang\((.[^\)]*)\)/i",$evalString,$langcalls);
+                        preg_match_all("/datatype\((.[^\)]*)\)/i",$evalString,$datatypecalls);
+                        preg_match_all("/str\((.[^\)]*)\)/i",$evalString,$stringcalls);
+
+                        // is Bound
+                        if(count($boundcalls[1])>0)
+                        $function['bound'] = $boundcalls[1];
+                        else
+                        $function['bound'] = false;
+
+                        // is URI
+                        if(count($isUricalls[1])>0)
+                        $function['isUri'] = $isUricalls[1];
+                        else
+                        $function['isUri'] = false;
+
+                        // is Blank
+                        if(count($isBlankcalls[1])>0)
+                        $function['isBlank'] = $isBlankcalls[1];
+                        else
+                        $function['isBlank'] = false;
+
+                        // is Literal
+                        if(count($isLiteralcalls[1])>0)
+                        $function['isLiteral'] = $isLiteralcalls[1];
+                        else
+                        $function['isLiteral'] = false;
+
+                        // lang
+                        if(count($langcalls[1])>0)
+                        $function['lang'] = $langcalls[1];
+                        else
+                        $function['lang'] = false;
+
+                        // datatype
+                        if(count($datatypecalls[1])>0)
+                        $function['datatype'] = $datatypecalls[1];
+                        else
+                        $function['datatype'] = false;
+
+                        // string
+                        if(count($stringcalls[1])>0)
+                        $function['string'] = $stringcalls[1];
+                        else
+                        $function['string'] = false;
+
+
+                        foreach($pattern['patternResult'] as $key => $res){
+                            $result = false;
+                            $evalString = $this->fillConstraintString($vars,$res,$constr,$function);
+                            $evalString = '$result =('.$evalString.');';
+                            // evaluate Constraint
+                            @eval($evalString);
+
+                            if(!$result)
+                            unset($patternlist[$patkey]['patternResult'][$key]);
+
+                        }
+                    }
+                }
+            }
+        }
+        return $patternlist;
+    }
+
+    /**
+    * Builds an evaluation string to determine wether the result passes
+    * the filter or not. This string is evaluatet by the php buildin eval() function
+    *
+    * @param  Array      $vars a list which contains the used variables
+    * @param  Array      $res  the result part which have to be evaluated
+    * @param  Constraint $constraint the Constrain object
+    * @param  Array      $function an Array which contains the used functions
+    * @return String
+    */
+
+    protected function fillConstraintString($vars,$res,$constraint,$function){
+
+        $boundExpr = false;
+        $evalString = $constraint->getExpression();
+
+        // extract Literals
+        $pattern1 = "/\".[^\"]*\"[^\^\@]/";
+        $pattern2 = "/\'.[^\']*\'[^\^\@]/";
+        preg_match_all($pattern1,$evalString,$hits1);
+        preg_match_all($pattern2,$evalString,$hits2);
+
+        foreach($hits1[0] as $k => $val){
+            $evalString = preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED1_'.$k++,$evalString,1);
+        }
+        foreach($hits2[0] as $k => $val){
+            $evalString = preg_replace('/\".[^\"]*\"[^\^]/','_REPLACED2_'.$k++,$evalString,1);
+        }
+
+        // replace namespaces
+        $prefs = $this->query->getPrefixes();
+        foreach($prefs as $key => $val){
+            if($key == '')
+            $key = ' ';
+            $evalString = preg_replace("/^(".$key."\:)(.[^\s]*)|([\s\(]?[^\^])(".$key."\:)(.[^\s\)]*)([\s\)]?)/","$3'<".$val."$2$5>'$6",$evalString);
+
+            $evalString = preg_replace("/(\^)(".$key."\:)(.[^\s]*)/","$1<".$val."$3>",$evalString);
+        }
+
+        $xsd = "http\:\/\/www.w3.org\/2001\/XMLSchema\#";
+
+        // evaluate bound calls
+        if($function['bound']){
+            $boundExpr = true;
+            foreach($function['bound'] as $var){
+                if(isset($res[$var]) && $res[$var]!=="")
+                $replacement = 'true';
+                else
+                $replacement = 'false';
+                $evalString = preg_replace("/bound\(\\".$var."\)/i",$replacement,$evalString);
+            }
+
+        }
+        // evaluate isBlank calls
+        if($function['isBlank']){
+            foreach($function['isBlank'] as $var){
+                if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof BlankNode )
+                $replacement = 'true';
+                else
+                $replacement = 'false';
+                $evalString = preg_replace("/isBlank\(\\".$var."\)/i",$replacement,$evalString);
+            }
+
+        }
+        // evaluate isLiteral calls
+        if($function['isLiteral']){
+            foreach($function['isLiteral'] as $var){
+                if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal  )
+                $replacement = 'true';
+                else
+                $replacement = 'false';
+                $evalString = preg_replace("/isLiteral\(\\".$var."\)/i",$replacement,$evalString);
+            }
+
+        }
+        // evaluate isUri calls
+        if($function['isUri']){
+            foreach($function['isUri'] as $var){
+                if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Resource && $res[$var]->getUri() && !$res[$var] instanceof BlankNode )
+                $replacement = 'true';
+                else
+                $replacement = 'false';
+                $evalString = preg_replace("/isUri\(\\".$var."\)/i",$replacement,$evalString);
+            }
+        }
+        // evaluate lang calls
+        if($function['lang']){
+            foreach($function['lang'] as $var){
+                if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal && $res[$var]->getLanguage() )
+                $replacement = '"'.$res[$var]->getLanguage().'"';
+                else
+                $replacement = 'null';
+                $evalString = preg_replace("/lang\(\\".$var."\)/i",$replacement,$evalString);
+            }
+        }
+        // evaluate datatype calls
+        if($function['datatype']){
+            foreach($function['datatype'] as $var){
+                if(isset($res[$var]) && $res[$var]!=="" && $res[$var] instanceof Literal && $res[$var]->getDatatype() )
+                $replacement = '\'<'.$res[$var]->getDatatype().'>\'';
+                else
+                $replacement = 'false';
+                $evalString = preg_replace("/datatype\(\\".$var."\)/i",$replacement,$evalString);
+            }
+        }
+        // evaluate string calls
+        if($function['string']){
+            foreach($function['string'] as $var){
+                if($var{0}=='?' || $var{0}=='$'){
+                    if(isset($res[$var]) && $res[$var]!==""){
+                        $replacement = "'str_".$res[$var]->getLabel()."'";
+                        if($res[$var] instanceof BlankNode)
+                        $replacement = "''";
+                    }else{
+                        $replacement = 'false';
+                    }
+                    $evalString = preg_replace("/str\(\\".$var."\)/i",$replacement,$evalString);
+                }else{
+                    if($var{0}=='<'){
+                        $evalString = preg_replace("/str\(\s*\<(.[^\>]*)\>\s*\)/i","'str_$1'",$evalString);
+                    }
+                    if($var{0}=='"'){
+                        $evalString = preg_replace("/str\(\s*\"(.[^\>]*)\"\@[a-z]*\s*\)/i","'str_$1'",$evalString);
+                    }
+                }
+
+            }
+        }
+        // evaluate VARS
+        foreach($vars[0] as $var){
+            if(isset($res[$var])&&$res[$var]!== ""){
+                //$replacement = "'".$res[$var]->getLabel()."'";
+                $replacement = '" "';
+                if($res[$var] instanceof Literal){
+                    if($res[$var]->getDatatype()!= null){
+                        if($res[$var]->getDatatype() == XML_SCHEMA.'boolean')
+                        $replacement = $res[$var]->getLabel();
+                        if($res[$var]->getDatatype() == XML_SCHEMA.'double')
+                        $replacement = $res[$var]->getLabel();
+                        if($res[$var]->getDatatype() == XML_SCHEMA.'integer')
+                        $replacement = $res[$var]->getLabel();
+                        if($res[$var]->getDatatype() == XML_SCHEMA.'dateTime')
+                        $replacement = strtotime($res[$var]->getLabel());
+                    }else{
+                        if($res[$var]->getLabel()=="")
+                        $replacement = 'false';
+                        else
+                        $replacement = "'str_".$res[$var]->getLabel()."'";
+                    }
+                }else{
+                    if($res[$var] instanceof Resource){
+                        $replacement = "'<".$res[$var]->getLabel().">'";
+                    }
+                }
+                $evalString = preg_replace("/\\".$var."/",$replacement,$evalString);
+            }
+
+            // problem with PHP: false < 13 is true
+            if(isset($res[$var])){
+                if($res[$var] === ""){
+                    if($boundExpr)
+                    $evalString = preg_replace("/\\".$var."/","false",$evalString);
+                    else
+                    $evalString = 'false';
+                }
+            }else{
+                $evalString = preg_replace("/\\".$var."/","false",$evalString);
+            }
+
+        }
+
+        // replace '=' with '=='
+        $evalString = preg_replace("/(.[^\=])(\=)(.[^\=])/","$1==$3",$evalString);
+
+
+        // rewrite Literals
+        foreach($hits1[0] as $k => $val){
+            $pattern = '/_REPLACED1_'.$k.'/';
+            $evalString = preg_replace($pattern,$hits1[0][$k],$evalString,1);
+        }
+
+        foreach($hits2[0] as $k => $val){
+            $pattern = '/_REPLACED2_'.$k.'/';
+            $evalString = preg_replace($pattern,$hits2[0][$k],$evalString,1);
+        }
+
+        // replace xsd:boolean expressions
+        $pattern = $pattern = '/\"\s?true\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?true\s?\'\^\^xsd:boolean/';
+        $evalString = preg_replace($pattern,"true",$evalString);
+
+        $pattern = $pattern = '/\"\s?false\s?\"\^\^\<'.$xsd.'boolean\>|\'\s?false\s?\'\^\^xsd:boolean/';
+        $evalString = preg_replace($pattern,"false",$evalString);
+
+        // replace xsd:date expressions
+        $pattern = "/\"(.[^\"]*)\"\^\^".$xsd."dateTime/";
+        preg_match_all($pattern,$evalString,$hits);
+
+        foreach($hits[1] as $dummy)
+        $evalString = preg_replace("/\".[^\"]*\"\^\^".$xsd."dateTime/",strtotime($dummy),$evalString,1);
+
+
+        $evalString = preg_replace("/(\'\<".$xsd."dateTime\()(.[^\)]*\))\>\'/","dateTime($2",$evalString);
+
+        $evalString = preg_replace("/(\'\<".$xsd."integer\()(.[^\)]*\))\>\'/","integer($2",$evalString);
+
+        // tag plain literals
+        $evalString = preg_replace("/\"(.[^\"]*)\"([^\^])|\"(.[^\"]*)\"$/","'str_$1$3'$2",$evalString);
+
+        return $evalString;
+    }
+
+    /**
+    * Sorts the results.
+    *
+    * @param  Array  $vartable List containing the unsorted result vars
+    * @return Array  List containing the sorted result vars
+    */
+    protected function sortVars($vartable)
+    {
+        $newTable = array();
+        $mod = $this->query->getSolutionModifier();
+        // if no ORDER BY solution modifier return vartable
+        if($mod['order by']!= null){
+            $order = $mod['order by'];
+            $map = $this->buildVarmap($order,$vartable);
+            foreach($map as $val){
+                $newTable[] = $vartable[$val];
+            }
+        }else{
+            $newTable = $vartable;
+        }
+
+        if($mod['offset'] != null){
+            $newTable = array_slice ($newTable, $mod['offset']);
+        }
+        if($mod['limit'] != null){
+            $newTable = array_slice($newTable,0,$mod['limit']);
+        }
+
+        return $newTable;
+    }
+
+    /**
+    * Sorts the result table.
+    *
+    * @param  String $order (ASC/DESC)
+    * @param  Array  $vartable the vartable
+    * @return Array  A map that contains the new order of the result vars
+    */
+    protected function buildVarmap($order, $vartable)
+    {
+        $n= 0;
+        $result = array();
+        $num_var = array();
+        foreach($order as $variable)
+        $num_var[$variable['val']] = 0;
+
+        foreach($vartable as $k => $x){
+            foreach($order as $value){
+                // if the value is a typed Literal try to determine if it
+                // a numeric datatype
+                if($x[$value['val']] instanceof Literal){
+                    $dtype = $x[$value['val']]->getDatatype();
+                    if($dtype){
+                        switch($dtype){
+                            case XML_SCHEMA."integer":
+                            $num_var[$value['val']]++;
+                            break;
+                            case XML_SCHEMA."double":
+                            $num_var[$value['val']]++;
+                            break;
+
+                        }
+                    }
+                }
+                if($x[$value['val']]){
+                    if($x[$value['val']]instanceof Literal){
+                        $pref = "2";
+                    }
+                    if($x[$value['val']]instanceof Resource){
+                        $pref = "1";
+                    }
+                    if($x[$value['val']]instanceof BlankNode){
+                        $pref = "0";
+                    }
+                    $result[$value['val']][$n] = $pref.$x[$value['val']]->getLabel();
+                }else{
+                    $result[$value['val']][$n] = "";
+                }
+            }
+            $result['oldKey'][$n] = $k;
+            $n++;
+        }
+        $sortString = "";
+        foreach($order as $value){
+            if($num_var[$value['val']] == $n)
+            $sort = SORT_NUMERIC;
+            else
+            $sort = SORT_STRING;
+
+            if($value['type'] == 'asc')
+            $type = SORT_ASC;
+            else
+            $type = SORT_DESC;
+
+            $sortString = $sortString.'$result["'.$value['val'].'"],'.$type.','.$sort.',';
+        }
+        $sortString = "array_multisort(".$sortString.'$result["oldKey"]);';
+
+        @eval($sortString);
+        return $result['oldKey'];
+    }
+
+
+
+    /**
+    * Eliminates duplicate results.
+    *
+    * @param  Array  $vartable a table that contains the result vars and their bindings
+    * @return Array the result table without duplicate results
+    */
+    protected function distinct($vartable)
+    {
+        $index = array();
+        foreach($vartable as $key => $value){
+            $key_index="";
+            foreach($value as $k => $v)
+            if($v instanceof Object)
+                $key_index = $key_index.$k.$v->toString();
+            if(isset($index[$key_index]))
+            unset($vartable[$key]);
+            else
+            $index[$key_index]= 1;
+        }
+        return $vartable;
+    }
+
+
+    /**
+    * Prints a query result as HTML table.
+    * You can change the colors in the configuration file.
+    *
+    * @param array $queryResult [][?VARNAME] = object Node
+    * @return void
+    */
+    public function writeQueryResultAsHtmlTable($queryResult) {
+        // Import Package Utility
+        include_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+
+        if ( $queryResult[0] == null) {
+            echo 'no match<br>';
+            return;
+        }
+        if ( $queryResult == 'false') {
+            echo 'boolean: false<br>';
+            return;
+        }
+        if ( $queryResult == 'true') {
+            echo 'boolean: true<br>';
+            return;
+        }
+
+
+        echo '<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
+        foreach ($queryResult[0] as $varName => $value)
+        echo "<td align='center'><b>$varName</b></td>";
+        echo '</tr>';
+
+        foreach ($queryResult as $n => $var) {
+
+
+            echo '<tr><td width="20" align="right">' .($n + 1) .'.</td>';
+            foreach ($var as $varName => $value) {
+                if($value !=''){
+                    echo INDENTATION . INDENTATION . '<td bgcolor="';
+                    echo RDFUtil::chooseColor($value);
+                    echo '">';
+                    echo '<p>';
+
+                    $lang  = NULL;
+                    $dtype = NULL;
+                    if (is_a($value, 'Literal')) {
+                        if ($value->getLanguage() != NULL)
+                        $lang = ' <b>(xml:lang="' . $value->getLanguage() . '") </b> ';
+                        if ($value->getDatatype() != NULL)
+                        $dtype = ' <b>(rdf:datatype="' . $value->getDatatype() . '") </b> ';
+                    }
+                    echo  RDFUtil::getNodeTypeName($value) .$value->getLabel() . $lang . $dtype .'</p>';
+                }else{
+                    echo "<td bgcolor='white'>unbound";
+                }
+            }
+            echo '</tr>';
+        }
+        echo '</table>';
+    }
+
+
+
+    /*
+    *   Dumb getters
+    */
+
+
+
+    public function getQuery()
+    {
+        return $this->query;
+    }//public function getQuery()
+
+
+
+    public function getDataset()
+    {
+        return $this->dataset;
+    }//public function getDataset()
+
+} // end: Class SparqlEngine
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine/PreparedStatement.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine/PreparedStatement.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine/PreparedStatement.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+/**
+*   A prepared statement that can be execute()d later multiple
+*   times with different variable values.
+*
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*   @package sparql
+*/
+class SparqlEngine_PreparedStatement
+{
+    public function execute($arVariables, $resultform)
+    {
+        //FIXME
+    }
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultConverter.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultConverter.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultConverter.php	(revision 225)
@@ -0,0 +1,115 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine/ResultRenderer.php';
+
+/**
+*   Converts a memory result into a proper
+*   rdf statement triple array
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngine_ResultConverter
+{
+    /**
+    *   Determines the correct renderer and calls it.
+    *
+    *   The $resultform may be:
+    *   - false: The default renderer is taken then
+    *   - an object that implements SparqlEngine_ResultRenderer interface
+    *   - a string like "HTML" or "XML". The appropriate renderer is used then.
+    *   - a full class name, e.g. SparqlEngine_ResultRenderer_XML
+    *
+    *   @param array $arVartable        Variable table
+    *   @param SparqlEngine $engine   Sparql database engine.
+    *   @param mixed    $resultform     Which format the results shall be in (false or "xml")
+    *
+    *   @return mixed   Most likely an array or a boolean value,
+    *                   or anything else as determined by $resultform
+    */
+    public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false)
+    {
+        if (is_object($resultform)) {
+            if ($resultform instanceof SparqlEngine_ResultRenderer) {
+                return $resultform->convertFromResult(
+                    $arVartable,
+                    $engine->getQuery(),
+                    $engine
+                );
+            } else {
+                throw new Exception(
+                    'Result renderer object needs to implement'
+                    . ' SparqlEngine_ResultRenderer interface'
+                );
+            }
+        }
+
+        if ($resultform === false) {
+            $resultform = 'Default';
+        } else if ($resultform == 'xml') {
+            //kept for BC reasons
+            $resultform = 'XML';
+        }
+
+        if ($strClass = self::loadClass($resultform)) {
+            $rrObj = new $strClass();
+            if ($rrObj instanceof SparqlEngine_ResultRenderer) {
+                return $rrObj->convertFromResult(
+                    $arVartable,
+                    $engine->getQuery(),
+                    $engine
+                );
+            } else {
+                throw new Exception(
+                    'Result renderer class "' . $strClass . '" needs to implement'
+                    . ' SparqlEngine_ResultRenderer interface'
+                );
+            }
+        } else {
+            throw new Exception(
+                'Result renderer class "' . $resultform . '" could not be loaded.'
+            );
+        }
+    }//public static function convertFromResult($arVartable, SparqlEngine $engine, $resultform = false)
+
+
+
+    /**
+    *   Tries to load a given class if it doesn't exist,
+    *   and returns true if the class can be used.
+    *
+    *   @param string $strClass Classname
+    *   @return mixed Class name if the class is loaded and can be used, false if not.
+    */
+    protected static function loadClass($strClass)
+    {
+        if (class_exists($strClass, false)) {
+            return $strClass;
+        }
+
+        //RAP style, shortcut notation
+        $strFile = 'SparqlEngine/ResultRenderer/' . $strClass . '.php';
+        @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile;
+        if (class_exists('SparqlEngine_ResultRenderer_' . $strClass, false)) {
+            return 'SparqlEngine_ResultRenderer_' . $strClass;
+        }
+
+        //RAP style
+        $strFile = str_replace('_', '/', $strClass) . '.php';
+        @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile;
+        if (class_exists($strClass, false)) {
+            return $strClass;
+        }
+
+        //PEAR style
+        @include_once $strFile;
+        if (class_exists($strClass, false)) {
+            return $strClass;
+        }
+
+        return false;
+    }//protected static function loadClass($strClass)
+
+}//class SparqlEngine_ResultConverter
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer.php	(revision 225)
@@ -0,0 +1,29 @@
+<?php
+
+/**
+*   Result renderer interface that any result renderer needs to implement.
+*   A result renderer converts results into a
+*   - for the user - usable result format, e.g. php arrays, xml, json and
+*   so on.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+interface SparqlEngine_ResultRenderer
+{
+    /**
+    *   Converts the database results into the desired output format
+    *   and returns the result.
+    *
+    *   @param array $arVartable    Variable table
+    *   @param Query $query         SPARQL query object
+    *   @param SparqlEngine $engine Sparql Engine to query the database
+    *   @return mixed   The result as rendered by the result renderers.
+    */
+    public function convertFromResult($arVartable, Query $query, SparqlEngine $engine);
+
+}//interface SparqlEngine_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/Default.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/Default.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/Default.php	(revision 225)
@@ -0,0 +1,262 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Default result renderer for SparqlEngine
+*
+*   @author Tobias GauÃ <tobias.gauss@web.de>
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer
+{
+    /**
+    *   Converts the database results into the output format
+    *   and returns the result.
+    *
+    *   @param array $arVartable    Variable table
+    *   @param Query $query         SPARQL query object
+    *   @param SparqlEngine $engine Sparql Engine to query the database
+    *   @return mixed               Most likely an array
+    */
+    public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
+    {
+        $this->query   = $query;
+        $this->engine  = $engine;
+        $this->dataset = $engine->getDataset();
+
+        $result = false;
+        $qrf    = $this->query->getResultForm();
+
+        if ($arVartable != null) {
+            switch ($qrf) {
+                case 'ask':
+                    if (count($arVartable) > 0) {
+                        $result = true;
+                    } else {
+                        $result = false;
+                    }
+                    break;
+                case 'count':
+                    $result = count($arVartable);
+                    break;
+                case 'construct':
+                    $result = $this->constructGraph(
+                        $arVartable,
+                        $this->query->getConstructPattern()
+                    );
+                    break;
+                case 'describe':
+                    $result = $this->describeGraph($arVartable);
+                    break;
+                default:
+                    $result = $arVartable;
+                    break;
+            }
+        } else if ($qrf == 'describe'){
+            $result = $this->describeGraph(null);
+        } else if ($qrf == 'construct'){
+            $result = $this->constructGraph(
+                false,
+                $this->query->getConstructPattern()
+            );
+        }
+
+        return $result;
+    }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
+
+
+
+    /**
+    * Constructs a result graph.
+    *
+    * @param  array         $arVartable       A table containing the result vars and their bindings
+    * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
+    * @return MemModel      The result graph which matches the CONSTRUCT pattern
+    */
+    function constructGraph($arVartable, $constructPattern)
+    {
+        $resultGraph = new MemModel();
+
+        if (!$arVartable) {
+            return $resultGraph;
+        }
+
+        $tp = $constructPattern->getTriplePatterns();
+
+        $bnode = 0;
+        foreach ($arVartable as $value) {
+            foreach ($tp as $triple) {
+                $sub  = $triple->getSubject();
+                $pred = $triple->getPredicate();
+                $obj  = $triple->getObject();
+
+                if (is_string($sub)  && $sub{1} == '_') {
+                    $sub  = new BlankNode("_bN".$bnode);
+                }
+                if (is_string($pred) && $pred{1} == '_') {
+                    $pred = new BlankNode("_bN".$bnode);
+                }
+                if (is_string($obj)  && $obj{1} == '_') {
+                    $obj  = new BlankNode("_bN".$bnode);
+                }
+
+
+                if (is_string($sub)) {
+                    $sub  = $value[$sub];
+                }
+                if (is_string($pred)) {
+                    $pred = $value[$pred];
+                }
+                if (is_string($obj)) {
+                    $obj  = $value[$obj];
+                }
+
+                if ($sub !== "" && $pred !== "" && $obj !== "") {
+                    $resultGraph->add(new Statement($sub,$pred,$obj));
+                }
+            }
+            $bnode++;
+        }
+        return $resultGraph;
+    }//function constructGraph($arVartable, $constructPattern)
+
+
+
+    /**
+    * Builds a describing named graph. To define an attribute list for a
+    * several rdf:type look at constants.php
+    *
+    * @param  array      $arVartable
+    * @return MemModel
+    */
+    function describeGraph($arVartable)
+    {
+        // build empty named graph
+        $resultGraph = new MemModel();
+        // if no where clause fill $arVartable
+        $vars = $this->query->getResultVars();
+        if ($arVartable == null) {
+            if ($vars) {
+                $arVartable[0] = array('?x' => new Resource(substr($vars[0],1,-1)));
+                $vars[0] = '?x';
+            }
+        }
+        // fetch attribute list from constants.php
+        global $sparql_describe;
+        // for each resultset
+        foreach ($arVartable as $resultset) {
+            foreach ($vars as $varname) {
+                $varvalue = $resultset[$varname];
+                // try to determine rdf:type of the variable
+                $type = $this->_determineType($varvalue, $resultGraph);
+                // search attribute list defined in constants.php
+                $list = null;
+                if ($type) {
+                    $strLuri = strtolower($type->getUri());
+                    if (isset($sparql_describe[$strLuri])) {
+                        $list = $sparql_describe[$strLuri] ;
+                    }
+                }
+                // search in dataset
+                $this->_getAttributes($list, $resultGraph, $varvalue);
+            }
+        }
+
+        return $resultGraph;
+    }//function describeGraph($arVartable)
+
+
+
+    /**
+    * Tries to determine the rdf:type of the variable.
+    *
+    * @param  Node       $var The variable
+    * @param  MemModel   $resultGraph The result graph which describes the Resource
+    * @return String     Uri of the rdf:type
+    */
+    protected function _determineType($var, $resultGraph)
+    {
+        $type = null;
+        // find in namedGraphs
+        if (!$var instanceof Literal) {
+            $iter = $this->dataset->findInNamedGraphs(
+                null,
+                $var,
+                new Resource(RDF_NAMESPACE_URI.'type'),
+                null,
+                true
+            );
+            while ($iter->valid()) {
+                $statement = $iter->current();
+                $type = $statement->getObject();
+                $resultGraph->add($iter->current());
+                break;
+            }
+        }
+        // if no type information found find in default graph
+        if (!$type) {
+            if (!$var instanceof Literal) {
+                $iter1 = $this->dataset->findInDefaultGraph(
+                    $var,
+                    new Resource(RDF_NAMESPACE_URI.'type'),
+                    null
+                );
+                $type = null;
+                while ($iter1->valid()) {
+                    $statement = $iter1->current();
+                    $type      = $statement->getObject();
+                    $resultGraph->add($iter1->current());
+                    break;
+                }
+            }
+        }
+        return $type;
+    }//protected function _determineType($var, $resultGraph)
+
+
+
+    /**
+    * Search the attributes listed in $list in the dataset.
+    * Modifies $resultGraph
+    *
+    * @param Array      $list List containing the attributes
+    * @param MemModel   $resultGraph The result graph which describes the Resource
+    * @return void
+    */
+    protected function _getAttributes($list, $resultGraph, $varvalue)
+    {
+        if ($list){
+            foreach ($list as $attribute) {
+                if (!$varvalue instanceof Literal) {
+                    $iter2 = $this->dataset->findInNamedGraphs(
+                        null,
+                        $varvalue,
+                        new Resource($attribute),
+                        null,
+                        true
+                    );
+                    while ($iter2->valid()) {
+                        $resultGraph->add($iter2->current());
+                        $iter2->next();
+                    }
+                    $iter3 = $this->dataset->findInDefaultGraph(
+                        $varvalue,
+                        new Resource($attribute),
+                        null
+                    );
+                    while ($iter3->valid()) {
+                        $resultGraph->add($iter3->current());
+                        $iter3->next();
+                    }
+                }
+            }
+        }
+    }//protected function _getAttributes($list, $resultGraph, $varvalue)
+
+
+}//class SparqlEngine_ResultRenderer_Default implements SparqlEngine_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/HTML.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/HTML.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/HTML.php	(revision 225)
@@ -0,0 +1,201 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+require_once RDFAPI_INCLUDE_DIR . 'util/RdfUtil.php';
+
+/**
+*   XML result renderer for SparqlEngine
+*
+*   @author Tobias GauÃ <tobias.gauss@web.de>
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer
+{
+    /**
+    *   If the result HTML should be wrapped in a div
+    *   @var boolean
+    */
+    protected $bWrap = true;
+
+
+
+    /**
+    *   Converts the database results into the output format
+    *   and returns the result.
+    *
+    *   @param array $arVartable    Variable table
+    *   @param Query $query         SPARQL query object
+    *   @param SparqlEngine $engine Sparql Engine to query the database
+    *   @return string HTML result
+    */
+    public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
+    {
+        $this->query   = $query;
+        $this->engine  = $engine;
+        $this->dataset = $engine->getDataset();
+
+        $strCode     = '';
+
+        $strResultForm = $query->getResultForm();
+        switch ($strResultForm) {
+            case 'select':
+            case 'select distinct':
+                $strCode = $this->createTableFromRecords($arVartable);
+                break;
+
+            case 'construct':
+            case 'describe':
+                throw new Exception(
+                    'Construct and describe are currently not supported by the'
+                    . ' HTML renderer'
+                );
+
+            case 'count':
+            case 'ask':
+                $nCount = count($arVartable);
+
+                if ($strResultForm == 'ask') {
+                    $strCode = 'There were results.';
+                } else {
+                    $strCode = 'There are ' . $nCount . ' results.';
+                }
+                break;
+
+            default:
+                throw new Exception('Unsupported result form: ' . $strResultForm);
+        }
+
+        return $this->wrapCode($strCode);
+    }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
+
+
+
+    protected function wrapCode($strCode)
+    {
+        if (!$this->bWrap) {
+            return $strCode;
+        }
+
+        return
+            '<div class="SparqlEngine_ResultRenderer_HTML_result">' . "\n"
+            . $strCode . "\n"
+            . "</div>\n";
+    }//protected function wrapCode($strCode)
+
+
+
+    protected function createTableFromRecords($arVartable)
+    {
+        if (count($arVartable) == 0) {
+            return 'No result rows.';
+        }
+
+        $arResult = array();
+        foreach ($arVartable as $row) {
+            $arResultRow = array();
+            foreach ($row as $strVarName => $value) {
+                $arResultRow[$strVarName] = $this->createValue($value);
+            }
+            $arResult[] = $arResultRow;
+        }
+
+        //I always wanted to to this :)
+        return
+            "<table border='1'>\n"
+            . " <caption>SPARQL result with " . count($arResult) . " rows</caption>\n"
+            . " <thead><th>"
+                . implode('</th><th>', array_keys(reset($arResult)))
+            . "</th></thead>\n"
+            . " <tbody>\n  <tr>"
+            . implode(
+                "</tr>\n  <tr>",
+                array_map(
+                    create_function(
+                        '$ar',
+                        'return implode("", $ar);'
+                    ),
+                    $arResult
+                )
+              )
+            . "</tr>\n </tbody>\n"
+            . "</table>\n";
+    }//protected function createTableFromRecords($arRecordSets)
+
+
+
+    /**
+    *   Creates an RDF object object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createValue($value)
+    {
+        if ($value === null) {
+            $strCode = $this->getHtmlNull();
+        }
+        if ($value instanceof Literal) {
+            $strCode = $this->getHtmlLiteral(
+                $value->getLabel(),
+                $value->getLanguage(),
+                $value->getDatatype()
+            );
+        } else if ($value instanceof Resource) {
+            $strCode = $this->getHtmlResource($value->getURI());
+        } else {
+            $strCode = $this->getHtmlBlank();
+        }
+		
+		$rdfUtil = new RdfUtil();
+
+        return '<td style="background-color: '
+               . $rdfUtil->chooseColor($value) . '">'
+               . $strCode
+               . '</td>';
+    }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
+
+
+
+    protected function getHtmlNull()
+    {
+        return '<pre>NULL</pre>';
+    }//protected function getHtmlNull()
+
+
+
+    protected function getHtmlBlank($value)
+    {
+        return '<i>Blank node</i>';
+    }//protected function getHtmlBlank($value)
+
+
+
+    protected function getHtmlResource($value)
+    {
+        return htmlspecialchars($value);
+    }//protected function getHtmlResource($value)
+
+
+
+    protected function getHtmlLiteral($value, $language, $datatype)
+    {
+        $strCode = htmlspecialchars($value);
+        if ($language) {
+            $strCode .= '<br/>&nbsp;&nbsp;<i>xml:lang</i>=' . $language;
+        }
+        if ($datatype) {
+            $strCode .= '<br/>&nbsp;&nbsp;<i>rdf:type</i>=' . $datatype;
+        }
+        return $strCode;
+    }//protected function getHtmlLiteral($value, $language, $datatype)
+
+}//class SparqlEngine_ResultRenderer_HTML implements SparqlEngine_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/XML.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/XML.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngine/ResultRenderer/XML.php	(revision 225)
@@ -0,0 +1,125 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   XML result renderer for SparqlEngine
+*
+*   @author Tobias GauÃ <tobias.gauss@web.de>
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer
+{
+    /**
+    *   Converts the database results into the output format
+    *   and returns the result.
+    *
+    *   @param array $arVartable    Variable table
+    *   @param Query $query         SPARQL query object
+    *   @param SparqlEngine $engine Sparql Engine to query the database
+    *   @return string XML result
+    */
+    public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
+    {
+        $this->query   = $query;
+        $this->engine  = $engine;
+        $this->dataset = $engine->getDataset();
+
+        if ($arVartable instanceof NamedGraphMem) {
+            return $arVartable->writeRdfToString();
+        }
+
+        $result = '<sparql xmlns="http://www.w3.org/2005/sparql-results#">';
+        $header = '<head>';
+
+        // build header
+        if (is_array($arVartable)) {
+            $vars = $this->query->getResultVars();
+            $header = '<head>';
+            foreach ($vars as $value) {
+                $header = $header
+                        . '<variable name="' . substr($value, 1) . '"/>';
+            }
+            $header = $header . '</head>';
+
+            // build results
+            $solm = $this->query->getSolutionModifier();
+            $sel  = $this->query->getResultForm();
+
+            $distinct = 'false';
+            if ($sel == 'select distinct') {
+                $distinct = 'true';
+            }
+
+            $ordered = 'false';
+            if ($solm['order by'] != 0) {
+                $ordered = 'true';
+            }
+
+            $results = '<results ordered="'.$ordered.'" distinct="'.$distinct.'">';
+            foreach ($arVartable as $value) {
+                $results = $results.'<result>';
+                foreach ($value as $varname => $varvalue) {
+                    $results = $results
+                            . $this->_getBindingString(
+                                substr($varname, 1),
+                                $varvalue
+                            );
+                }
+                $results = $results . '</result>';
+            }
+            $results = $results . '</results>';
+        } else {
+            $results = '</head><boolean>' . $vartable . '</boolean>';
+        }
+
+        $result = $result . $header . $results . '</sparql>';
+        $result = simplexml_load_string($result);
+        return $result->asXML();
+    }//public function convertFromResult($arVartable, Query $query, SparqlEngine $engine)
+
+
+
+    /**
+    * Helper Function for function buildXmlResult($vartable). Generates
+    * an xml string for a single variable an their corresponding value.
+    *
+    * @param  String  $varname The variables name
+    * @param  Node    $varvalue The value of the variable
+    * @return String  The xml string
+    */
+    protected function _getBindingString($varname, $varvalue)
+    {
+        $binding = '<binding name="'.$varname.'">';
+        $value = '<unbound/>';
+
+        if ($varvalue instanceof BlankNode) {
+            $value = '<bnode>' . $varvalue->getLabel() . '</bnode>';
+        } else if ($varvalue instanceof Resource) {
+            $value = '<uri>' . $varvalue->getUri() . '</uri>';
+        } else if ($varvalue instanceof Literal) {
+            $label = htmlspecialchars($varvalue->getLabel());
+            $value = '<literal>'.$label.'</literal>';
+            if ($varvalue->getDatatype() != null) {
+                $value = '<literal datatype="'
+                        . $varvalue->getDatatype() . '">'
+                        . $label
+                        . '</literal>';
+            }
+            if ($varvalue->getLanguage() != null) {
+                $value = '<literal xml:lang="'
+                        . $varvalue->getLanguage() . '">'
+                        . $label
+                        . '</literal>';
+            }
+        }
+        $binding = $binding . $value . '</binding>';
+
+        return $binding;
+    }//protected function _getBindingString($varname, $varvalue)
+
+}//class SparqlEngine_ResultRenderer_XML implements SparqlEngine_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb.php	(revision 225)
@@ -0,0 +1,391 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/Offsetter.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/QuerySimplifier.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultConverter.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/SqlGenerator.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/SqlMerger.php';
+
+/**
+*   SPARQL engine optimized for databases.
+*   Generates SQL statements to directly query the database,
+*   letting the database system do all the hard work like
+*   selecting, joining, filtering and ordering results.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb
+{
+    /**
+    *   Sparql Query object.
+    *
+    *   @var Query
+    */
+    protected $query;
+
+    /**
+    *   RDF dataset object.
+    *   @var Dataset
+    */
+    protected $dataset;
+
+    /**
+    *   Database connection object.
+    *   @var ADOConnection
+    */
+    protected $dbConn;
+
+    /**
+    *   Internal ID for our graph model.
+    *   Stored in the database along the statements.
+    *   Can be of different types:
+    *   - array: array of modelIds
+    *   - null: all models
+    *
+    *   @var array OR null
+    */
+    protected $arModelIds;
+
+    /**
+    *   Prepared SQL statements are stored in here.
+    *   @var array
+    */
+    protected $arPrepared    = null;
+
+    /**
+    *   If the prepared statement is really prepared, or if we just emulate it.
+    *   @var boolean
+    */
+    protected $bRealPrepared = false;
+
+    /**
+    *   SQL generator instance
+    *   @var SparqlEngineDb_SqlGenerator
+    */
+    protected $sg = null;
+
+    /**
+    *   Type sorting instance
+    *   @var SparqlEngineDb_TypeSorter
+    */
+    protected $ts = null;
+
+    /**
+    *   Prepared statments preparator instance
+    *   @var SparqlEngineDb_Preparator
+    */
+    protected $pr = null;
+
+
+
+    /**
+    *   Use SparqlEngine::factory() to create the instance
+    *
+    *   @param mixed $model         DbModel or DbStore
+    *   @param mixed $arModelIds    Array of modelIds, or NULL to use all models
+    */
+    public function __construct($model, $arModelIds = null)
+    {
+        //parent::__construct();
+        if ($model instanceof DbModel) {
+            $this->dbConn     = $model->getDbConn();
+            $this->arModelIds = array($model->getModelID());
+        } else if ($model instanceof DbStore) {
+            $this->dbConn     = $model->getDbConn();
+            $this->arModelIds = $arModelIds;
+        }
+    }//public function __construct(DbModel $model, $arModelIds = null)
+
+
+
+    /**
+    *   Query the database with the given SPARQL query.
+    *
+    *
+    *   @param  Dataset       $dataset    RDF Dataset
+    *   @param  Query         $query      Parsed SPARQL query
+    *   @param  string        $resultform Result form. If set to 'xml' the result will be
+    *                                   SPARQL Query Results XML Format as described in http://www.w3.org/TR/rdf-sparql-XMLres/ .
+    *
+    *   @return array/string  array of triple arrays, or XML. Format depends on
+    *                                   $resultform parameter.
+    */
+    public function queryModel($dataset, Query $query, $resultform = false)
+    {
+        if (isset($GLOBALS['debugSparql']) && $GLOBALS['debugSparql']) {
+            echo "\n" . 'SPARQL query: ' . $query->getQueryString() . "\n";
+        }
+
+        $this->query   = $query;
+        $this->dataset = $dataset;
+
+        $qsimp = new SparqlEngineDb_QuerySimplifier();
+        $qsimp->simplify($this->query);
+
+        $this->sg = new SparqlEngineDb_SqlGenerator   ($this->query, $this->dbConn, $this->arModelIds);
+        $this->rc = new SparqlEngineDb_ResultConverter($this->query, $this->sg, $this);
+        $this->ts = new SparqlEngineDb_TypeSorter     ($this->query, $this->dbConn);
+
+        $this->setOptions();
+
+        if ($this->query->isEmpty()){
+            $vartable[0]['patternResult'] = null;
+            return $this->returnResult($vartable, $resultform);
+        }
+
+
+        $arSqls = $this->sg->createSql();
+        $this->ts->setData($this->sg);
+
+        return
+            SparqlEngineDb_ResultConverter::convertFromDbResults(
+                $this->queryMultiple(
+                    $this->ts->getOrderifiedSqls(
+                        $arSqls
+                    )
+                ),
+                $this,
+                $resultform
+            );
+    }//public function queryModel($dataset, Query $query, $resultform = false)
+
+
+
+    /**
+    *   Create a prepared statement that can be executed later.
+    *
+    *   @param  Dataset       $dataset    RDF Dataset
+    *   @param  Query         $query      Parsed SPARQL query
+    *
+    *   @return SparqlEngineDb_PreparedStatement Prepared statment that can
+    *           be execute()d later.
+    */
+    public function prepare(Dataset $dataset, Query $query)
+    {
+        require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/PreparedStatement.php';
+        require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/Preparator.php';
+
+        $this->query   = $query;
+        $this->dataset = $dataset;
+        $this->sg = new SparqlEngineDb_SqlGenerator   ($this->query, $this->dbConn, $this->arModelIds);
+        $this->rc = new SparqlEngineDb_ResultConverter($this->query, $this->sg, $this);
+        $this->ts = new SparqlEngineDb_TypeSorter     ($this->query, $this->dbConn);
+        $this->pr = new SparqlEngineDb_Preparator     ($this->query, $this->dbConn);
+
+        $this->arPrepared = $this->sg->createSql();
+        $this->ts->setData($this->sg);
+
+        if ($this->ts->willBeDataDependent()) {
+            $this->bRealPrepared = false;
+        } else {
+            $this->bRealPrepared     = true;
+            list($strSelect, $strFrom, $strWhere) = $this->arPrepared;
+            $this->arPreparedQueries = $this->ts->getOrderifiedSqls(
+                $strSelect,
+                $strFrom,
+                $strWhere
+            );
+            $this->arDbStatements    = $this->pr->prepareInDb(
+                $this->arPreparedQueries,
+                $this->sg->getPlaceholders()
+            );
+        }
+
+
+        return new SparqlEngineDb_PreparedStatement(
+            $this
+        );
+    }//public function prepare(Dataset $dataset, Query $query)
+
+
+
+    /**
+    *   Execute a prepared statement by filling it with variables
+    *
+    *   @param array $arVariables   Array with (variable name => value) pairs
+    *   @param string $resultform   Which form the result should have
+    *
+    *   @return mixed   Result according to $resultform
+    */
+    public function execute($arVariables, $resultform = false)
+    {
+        if ($this->arPrepared === null) {
+            throw new Exception('You need to prepare() the query first.');
+        }
+
+        if ($this->bRealPrepared) {
+            return
+                SparqlEngineDb_ResultConverter::convertFromDbResults(
+                    $this->pr->execute(
+                        $this->arDbStatements,
+                        $arVariables
+                    ),
+                    $this,
+                    $resultform
+                );
+        } else {
+            list($strSelect, $strFrom, $strWhere) = $this->arPrepared;
+
+            return SparqlEngineDb_ResultConverter::convertFromDbResults(
+                $this->queryMultiple(
+                    $this->ts->getOrderifiedSqls(
+                        $strSelect,
+                        $strFrom,
+                        $this->pr->replacePlaceholdersWithVariables(
+                            $strWhere,
+                            $this->sg->getPlaceholders(),
+                            $arVariables
+                        )
+                    )
+                ),
+                $this,
+                $resultform
+            );
+        }
+    }//public function execute($arVariables, $resultform)
+
+
+
+    /**
+    *   Executes multiple SQL queries and returns an array
+    *   of results.
+    *
+    *   @param array $arSqls     Array of SQL queries
+    *   @return array   Array of query results
+    */
+    protected function queryMultiple($arSqls)
+    {
+        $arSM = $this->query->getSolutionModifier();
+        if ($arSM['limit'] === null && $arSM['offset'] === null) {
+            $nOffset = 0;
+            $nLimit  = null;
+            $nSql    = 0;
+        } else {
+            $offsetter = new SparqlEngineDb_Offsetter($this->dbConn, $this->query);
+            list($nSql, $nOffset) = $offsetter->determineOffset($arSqls);
+            $nLimit    = $arSM['limit'];
+        }
+
+        $nCount    = 0;
+        $arResults = array();
+        foreach ($arSqls as $nId => $arSql) {
+            if ($nId < $nSql) { continue; }
+
+            if ($nLimit != null) {
+                $nCurrentLimit = $nLimit - $nCount;
+            } else {
+                $nCurrentLimit = null;
+            }
+
+            $dbResult    = $this->queryDb($arSql, $nOffset, $nCurrentLimit);
+            $nCount     += $dbResult->RowCount();
+            $arResults[] = $dbResult;
+            $nOffset = 0;
+            if ($nLimit !== null && $nCount >= $nLimit) {
+                break;
+            }
+        }
+
+        return $arResults;
+        //return array_map(array($this, 'queryDb'), $arSql);
+    }//protected function queryMultiple($arSql)
+
+
+
+    /**
+    *   Sends the sql to the database and returns the results.
+    *
+    *   @internal Switches between ADOConnection::Execute() and
+    *    ADOConnection::SelectLimit() depending on the $query parameter's
+    *    $solutionModifier "limit" and "offset" settings.
+    *   Uses $query variable.
+    *
+    *   @param array $arSql     Array that gets a SQL query string once imploded
+    *
+    *   @return mixed           Anything ADOConnection::Execute() may return
+    *   @throws Exception       If Database query does not work
+    */
+    function queryDb($arSql, $nOffset, $nLimit)
+    {
+        $strSql = SparqlEngineDb_SqlMerger::getSelect($this->query, $arSql);
+
+        if ($strSql == '()') {
+            return new ADORecordSet(false);
+        }
+
+        // I want associative arrays.
+        $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
+
+        if (isset($GLOBALS['debugSparql']) && $GLOBALS['debugSparql']) {
+            echo 'SQL query: ' . $strSql . "\n";
+        }
+
+        if ($nLimit === null && $nOffset == 0) {
+            $ret = $this->dbConn->execute($strSql);
+        } else if ($nLimit === null) {
+            $ret = $this->dbConn->SelectLimit($strSql, -1, $nOffset);
+        } else {
+            $ret = $this->dbConn->SelectLimit($strSql, $nLimit, $nOffset);
+        }
+
+        //... but others maybe not
+        $this->dbConn->SetFetchMode($oldmode);
+
+        if (!$ret) {
+            //Error occured
+            throw new Exception(
+                'ADOdb error: ' . $this->dbConn->ErrorMsg() . "\n"
+                . $strSql
+            );
+        }
+
+        return $ret;
+    }//function queryDb($sql)
+
+
+
+    /**
+    *   Set options to subobjects like SqlGenerator
+    */
+    protected function setOptions()
+    {
+        //allow changing the statements' table name
+        if (isset($GLOBALS['RAP']['conf']['database']['tblStatements'])) {
+            $this->sg->setStatementsTable(
+                $GLOBALS['RAP']['conf']['database']['tblStatements']
+            );
+        }
+    }//protected function setOptions()
+
+
+
+    /*
+    *   Dumb getters
+    */
+
+
+
+    public function getQuery()
+    {
+        return $this->query;
+    }//public function getQuery()
+
+
+
+    public function getSqlGenerator()
+    {
+        return $this->sg;
+    }//public function getSqlGenerator()
+
+
+
+    public function getTypeSorter()
+    {
+        return $this->ts;
+    }//public function getTypeSorter()
+
+}//class SparqlEngineDb
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/FilterGenerator.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/FilterGenerator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/FilterGenerator.php	(revision 225)
@@ -0,0 +1,846 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlVariable.php';
+
+/**
+*   Generates SQL from Sparql FILTER parts
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_FilterGenerator
+{
+    /**
+    *   SQL Generator
+    *   @var SparqlEngineDb_SqlGenerator
+    */
+    protected $sg = null;
+
+    /**
+    *   If the filter is in an optional statement
+    *   @var boolean
+    */
+    protected $bOptional    = false;
+
+    /**
+    *   Number of parameters for the functions supported.
+    *   First value is minimum, second is maximum.
+    *   @var array
+    */
+    protected static $arFuncParamNumbers = array(
+        'bound'         => array(1, 1),
+        'datatype'      => array(1, 1),
+        'isblank'       => array(1, 1),
+        'isiri'         => array(1, 1),
+        'isliteral'     => array(1, 1),
+        'isuri'         => array(1, 1),
+        'lang'          => array(1, 1),
+        'langmatches'   => array(2, 2),
+        'regex'         => array(2, 3),
+        'sameterm'      => array(2, 2),
+        'str'           => array(1, 1),
+        'xsd:datetime'  => array(1, 1),
+    );
+
+    /**
+    *   List of operators and their counterpart if operands are switched.
+    *   (a > b) => (b < a)
+    *   @var array
+    */
+    protected static $arOperatorSwitches = array(
+        '>'     => '<',
+        '<'     => '>',
+        '>='    => '<=',
+        '<='    => '>=',
+    );
+
+    protected static $arDumbOperators = array(
+        '&&', '||'
+    );
+
+    protected static $typeXsdBoolean  = 'http://www.w3.org/2001/XMLSchema#boolean';
+    protected static $typeXsdDateTime = 'http://www.w3.org/2001/XMLSchema#dateTime';
+    protected static $typeXsdDouble   = 'http://www.w3.org/2001/XMLSchema#double';
+    protected static $typeXsdInteger  = 'http://www.w3.org/2001/XMLSchema#integer';
+    protected static $typeXsdString   = 'http://www.w3.org/2001/XMLSchema#string';
+    protected static $typeVariable    = 'variable';
+
+
+
+    public function __construct(SparqlEngineDb_SqlGenerator $sg)
+    {
+        $this->sg = $sg;
+    }//public function __construct(SparqlEngineDb_SqlGenerator $sqlgen)
+
+
+
+    /**
+    *   Creates the SQL representing a Sparql FILTER.
+    *
+    *   @param array $tree  Filter element tree as returned by
+    *                       SparqlParser::parseConstraintTree()
+    *   @param boolean $bOptional   If the filter is in an optional statement
+    *   @return string  SQL WHERE part with prefixed AND
+    */
+    public function createFilterSql($tree, $bOptional, $nUnionCount)
+    {
+        if (count($tree) == 0) {
+            //empty filter pattern?
+            return '';
+        }
+
+        $this->bOptional = $bOptional;
+        $this->nUnionCount = $nUnionCount;
+
+        return ' AND ' . $this->createTreeSql($tree, null);
+    }//public function createFilterSql($tree)
+
+
+
+    /**
+    *
+    */
+    protected function createTreeSql($tree, $parent)
+    {
+        switch ($tree['type']) {
+            case 'equation':
+                $sql = $this->createEquation($tree);
+                break;
+            case 'value':
+                if ($parent != null) {
+                    $bDumbParent = $parent['type'] == 'equation'
+                        && in_array($parent['operator'], self::$arDumbOperators);
+                } else {
+                    $bDumbParent = true;
+                }
+                $sql = $this->createValue($tree, $bDumbParent);
+                break;
+            case 'function':
+                $sql = $this->createFunction($tree);
+                break;
+            default:
+                //var_dump($tree);
+                throw new SparqlEngineDb_SqlGeneratorException('Unsupported tree type: ' . $tree['type']);
+                break;
+        }
+
+        if (isset($tree['negated'])) {
+            $sql = '!(' . $sql . ')';
+        }
+
+        return $sql;
+    }//protected function createTreeSql($tree, $strParentType)
+
+
+
+    /**
+    *   Creates the sql for an element of type "value".
+    *
+    *   @param array $tree  Element
+    *   @param boolean $bDumbParent True if the parent is a boolean equation or null.
+    */
+    protected function createValue($tree, $bDumbParent)
+    {
+        $strValue = stripslashes($tree['value']);
+        if (SparqlVariable::isVariable($strValue)) {
+            if (!isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$strValue])) {
+                throw new SparqlEngineDb_SqlGeneratorException(
+                    'Unknown variable in filter: ' . $strValue
+                );
+            }
+
+            if ($bDumbParent) {
+                return $this->createBooleanValue($tree);
+            } else if ($this->isObject($tree)) {
+                //convert datetime to datetime if necessary
+                return self::mkVal(
+                    '(CASE'
+                    . ' WHEN ' . $this->getDatatypeCol($tree) . ' = "' . self::$typeXsdBoolean . '"'
+                        . ' THEN IF(LOWER(' . $this->getValueCol($tree) . ') = "true", TRUE, FALSE)'
+                    . ' ELSE ' . $this->getValueCol($tree)
+                    . ' END)',
+                    self::$typeVariable
+                );
+            } else {
+                return self::mkVal(
+                    $this->getValueCol($tree),
+                    self::$typeVariable
+                );
+            }
+        }
+
+        if ($this->isNumber($tree)) {
+            return $strValue;
+        } else if ($tree['quoted'] === false &&
+          (!isset($tree['datatype']) || $tree['datatype'] != self::$typeXsdBoolean)
+        ) {
+            $strValueNew = $this->sg->query->getFullUri($strValue);
+            if ($strValueNew === false) {
+                if ($strValue[0] == '<' && substr($strValue, -1) == '>') {
+                    $strValue = substr($strValue, 1, -1);
+                } else {
+var_dump($tree);
+                    throw new SparqlEngineDb_SqlGeneratorException(
+                        'Unexpected value "' . $strValue . '" (expected datatype)'
+                    );
+                }
+            } else {
+                $strValue = $strValueNew;
+            }
+        } else if (isset($tree['datatype'])) {
+            switch ($tree['datatype']) {
+                case self::$typeXsdBoolean:
+                    if (strtolower($strValue) == 'false') {
+                        //fix: (bool)"false" === true
+                        $strValue = false;
+                    }
+                    return self::mkVal(
+                        (bool)$strValue ? 'TRUE' : 'FALSE',
+                        self::$typeXsdBoolean
+                    );
+
+                default:
+                    throw new SparqlEngineDb_SqlGeneratorException(
+                        'Unsupported datatype "' . $tree['datatype']
+                    );
+            }
+        }
+
+        return self::mkVal(
+            '"' . addslashes($strValue) . '"',
+            self::$typeXsdString
+        );
+    }//protected function createValue($tree)
+
+
+
+    protected function createBooleanValue($tree)
+    {
+        list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
+        if (!$this->isObject($tree)) {
+            //Maybe needs a fix
+            $strSqlCol = SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType]['value'];
+            return self::mkVal(
+                $strTable . '.' . $strSqlCol . ' != ""',
+                self::$typeXsdBoolean
+            );
+        }
+
+        $cType  = $strTable . '.l_datatype';
+        $cValue = $strTable . '.object';
+        $xsd    = 'http://www.w3.org/2001/XMLSchema';
+
+        return self::mkVal(
+            '('
+            . "(($cType = '' || $cType = '$xsd#string') AND $cValue != '')"
+            . " OR ($cType = '$xsd#boolean' AND $cValue != 'false')"
+            . " OR (($cType = '$xsd#integer' || $cType = '$xsd#double') AND CAST($cValue AS DECIMAL(15,10)) != 0)"
+            //plain check for all unknown datatypes
+            . " OR ($cType != '' AND $cType != '$xsd#string' AND $cType != '$xsd#boolean' AND $cType != '$xsd#integer' AND $cType != '$xsd#double' AND $cValue != '')"
+            . ')',
+            self::$typeXsdBoolean
+        );
+    }//protected function createBooleanValue($tree)
+
+
+
+    protected function createFunction($tree)
+    {
+        $strFuncName = strtolower($tree['name']);
+        if (!isset(self::$arFuncParamNumbers[$strFuncName])) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'Unsupported FILTER function: ' . $strFuncName
+            );
+        }
+
+        $nParams     = count($tree['parameter']);
+        if ($nParams < self::$arFuncParamNumbers[$strFuncName][0]
+         || $nParams > self::$arFuncParamNumbers[$strFuncName][1]
+        ) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'Wrong parameter count for FILTER function: ' . $strFuncName
+                . ' (got ' . $nParams . ', expected '
+                . self::$arFuncParamNumbers[$strFuncName][0]
+                . '-' . self::$arFuncParamNumbers[$strFuncName][1]
+            );
+        }
+
+        $strThisFunc = 'createFunction_' . str_replace(':', '_', $strFuncName);
+        return $this->$strThisFunc($tree);
+    }//protected function createFunction($tree)
+
+
+
+    protected function createEquation($tree)
+    {
+        $strExtra       = '';
+        $strIsNull      = '';
+        $strIsNullEnd   = '';
+
+        if (($this->isNumber($tree['operand1']) || $this->isPlainString($tree['operand1']))
+            && $this->isObject($tree['operand2'])
+        ) {
+            //switch operands and operator
+            $tmp = $tree['operand1'];
+            $tree['operand1'] = $tree['operand2'];
+            $tree['operand2'] = $tmp;
+            $tree['operator'] = self::switchOperator($tree['operator']);
+        }
+
+        $val1 = $this->createTreeSql($tree['operand1'], $tree);
+        $val2 = $this->createTreeSql($tree['operand2'], $tree);
+
+        if ($this->isObject($tree['operand1'])) {
+            if ($this->bOptional) {
+                $strIsNull    = '(';
+                $strIsNullEnd = ' OR ' . $val1 . ' IS NULL)';
+            }
+            if (isset($tree['operand2']['language'])) {
+                $strColLanguage = $this->getLangCol($tree['operand1']);
+                $strExtra .= ' AND ' . $strColLanguage . ' = "'
+                    . addslashes($tree['operand2']['language'])
+                    . '"';
+            }
+
+            if ($this->isNumber($tree['operand2'])) {
+                $strColDatatype = $this->getDatatypeCol($tree['operand1']);
+                $strExtra .= ' AND (' . $strColDatatype . '  = "' . self::$typeXsdDouble . '"'
+                    . ' OR ' . $strColDatatype . '  = "' . self::$typeXsdInteger . '"'
+                    . ')';
+                return $strIsNull . '('
+                    . 'CAST(' . $val1 . ' AS DECIMAL(15,10))'
+                    . ' ' . $tree['operator'] . ' '
+                    . $val2
+                    . $strExtra
+                    . ')' . $strIsNullEnd;
+            }
+        }
+
+        //I don't check the operator since it is already checked in the parser
+        return $strIsNull . '('
+            . '('
+                . $val1
+                . ' ' . $tree['operator'] . ' '
+                . $val2
+                . $strExtra
+            . ')'
+            . $this->createTypeEquation(
+                $tree['operator'], $val1, $val2,
+                $tree['operand1'], $tree['operand2']
+            )
+            . ')' . $strIsNullEnd;
+    }//protected function createEquation($tree)
+
+
+
+    /**
+    *   Generates sql code to make sure the datatypes of the two operands match
+    */
+    protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2)
+    {
+        if (in_array($operator, array('&&', '||'))) {
+            return '';
+        }
+
+        if ($val1->type != self::$typeVariable && $val2->type != self::$typeVariable) {
+            //both are not variables -> type needs to be the same
+            return $val1->type == $val2->type ? '' : ' AND FALSE';
+        }
+        $so1 = $this->isObjectOrSubject($tree1);
+        $so2 = $this->isObjectOrSubject($tree2);
+        $o1  = $this->isObject($tree1);
+        $o2  = $this->isObject($tree2);
+
+        if ($so1 && $so2) {
+            $sql = ' AND ' . $this->getIsCol($tree1) . ' = ' . $this->getIsCol($tree2);
+            if ($o1 && $o2) {
+                //maybe needs string fix
+                $sql .= ' AND ' . $this->getDatatypeCol($tree1) . ' = '
+                    . $this->getDatatypeCol($tree2);
+            }
+            return $sql;
+        }
+
+        if ($o1 && $val2->type != self::$typeVariable) {
+            return $this->createSingleTypeCheck($val2, $tree1);
+        } else if ($o2 && $val1->type != self::$typeVariable) {
+            return $this->createSingleTypeCheck($val1, $tree2);
+        }
+
+        //fixme
+        return '';
+    }//protected function createTypeEquation($operator, $val1, $val2, $tree1, $tree2)
+
+
+
+    /**
+    *   Creates sql to ensure the type between $val and variable $tree
+    *   is the same.
+    */
+    protected function createSingleTypeCheck($val, $tree)
+    {
+        if ($val->type == self::$typeXsdString) {
+            //string can be empty type or xsd type
+            return ' AND ('
+                . $this->getDatatypeCol($tree) . ' = "' . $val->type . '"'
+                . ' OR '
+                . $this->getDatatypeCol($tree) . ' = ""'
+                . ')';
+        }
+        return ' AND ' . $this->getDatatypeCol($tree) . ' = "' . $val->type . '"';
+    }//protected function createSingleTypeCheck($val, $tree)
+
+
+
+    /*
+    *   SQL generation functions
+    */
+
+
+
+    /**
+    *   Creates an sql statement that returns if the element is a blank node
+    */
+    protected function createFunction_bound($tree)
+    {
+        if ($this->isVariable($tree['parameter'][0])) {
+            return self::mkVal(
+                $this->getValueCol($tree['parameter'][0]) . ' IS NOT NULL',
+                self::$typeXsdBoolean
+            );
+        }
+
+        //We'll see which other cases occur here
+        return self::mkVal('TRUE', self::$typeXsdBoolean);
+    }//protected function createFunction_bound($tree)
+
+
+
+    protected function createFunction_datatype($tree)
+    {
+        if (!$this->isObject($tree['parameter'][0])) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'datatype\'s first parameter needs to be an object'
+            );
+        }
+
+        return self::mkVal(
+            $this->getDatatypeCol($tree['parameter'][0]),
+            self::$typeXsdString
+        );
+    }//protected function createFunction_datatype($tree)
+
+
+
+    /**
+    *   Creates an sql statement that returns if the element is a blank node
+    */
+    protected function createFunction_isblank($tree)
+    {
+        if (!$this->isObjectOrSubject($tree['parameter'][0])) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'isBlank\'s first parameter needs to be an object or subject'
+            );
+        }
+
+        return self::mkVal(
+            $this->getIsCol($tree['parameter'][0]) . ' = "b"',
+            self::$typeXsdBoolean
+        );
+    }//protected function createFunction_isblank($tree)
+
+
+
+    protected function createFunction_isiri($tree)
+    {
+        return $this->createFunction_isuri($tree);
+    }//protected function createFunction_isiri($tree)
+
+
+
+    /**
+    *   Creates an sql statement that returns the language of the object
+    */
+    protected function createFunction_isliteral($tree)
+    {
+        if ($this->isObjectOrSubject($tree['parameter'][0])) {
+            return $this->getIsCol($tree['parameter'][0]) . ' = "l"';
+        }
+
+        //This does not take combined functions into account (subfunctions)
+        return self::mkVal(
+            $this->isPlainString($tree) ? 'TRUE' : 'FALSE',
+            self::$typeXsdBoolean
+        );
+    }//protected function createFunction_isliteral($tree)
+
+
+
+    protected function createFunction_isuri($tree)
+    {
+        if ($this->isObjectOrSubject($tree['parameter'][0])) {
+            return self::mkVal(
+                $this->getIsCol($tree['parameter'][0]) . ' = "r"',
+                self::$typeXsdBoolean
+            );
+        } else {
+            //predicates are iris
+            return self::mkVal('TRUE', self::$typeXsdBoolean);
+        }
+    }//protected function createFunction_isuri($tree)
+
+
+
+    /**
+    *   Creates an sql statement that returns the language of the object
+    */
+    protected function createFunction_lang($tree)
+    {
+        if (!$this->isObject($tree['parameter'][0])) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'lang\'s first parameter needs to be an object'
+            );
+        }
+        return self::mkVal(
+            $this->getLangCol($tree['parameter'][0]),
+            self::$typeXsdString
+        );
+    }//protected function createFunction_lang($tree)
+
+
+
+    /**
+    *   Creates an sql statement that checks if the variable
+    *   matches a given language
+    */
+    protected function createFunction_langmatches($tree)
+    {
+        //those two restrictions are needed until we have a mysql-only
+        // langmatches function
+        if ($tree['parameter'][0]['type'] != 'function'
+         || $tree['parameter'][0]['name'] != 'lang'
+        ) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'langMatches\' first parameter needs to be a lang() function'
+            );
+        }
+
+        if (!$this->isPlainString($tree['parameter'][1])) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'langMatches\' second parameter needs to be a string'
+            );
+        }
+
+        $lang  = $tree['parameter'][1]['value'];
+        $col   = $this->createTreeSql($tree['parameter'][0], $tree);
+
+        switch ($lang) {
+            case '*':
+                //anything but nothing
+                $sql = $col . ' != ""';
+                break;
+            case '':
+                //nothing
+                $sql = $col . ' = ""';
+                break;
+            default:
+                //language, maybe with different subcode
+                // en -> en, en-US
+                $sql = '(' . $col . ' = "' . addslashes($lang) . '" OR '
+                    . $col . ' LIKE "' . addslashes($lang) . '-%")';
+                break;
+        }
+
+        return self::mkVal($sql, self::$typeXsdBoolean);
+    }//protected function createFunction_isuri($tree)
+
+
+
+    /**
+    *   Creates an sql statement that checks if the given part matches
+    *   an regex
+    */
+    protected function createFunction_regex($tree)
+    {
+        $strVar   = $this->createTreeSql($tree['parameter'][0], $tree);
+        $strRegex = $this->createTreeSql($tree['parameter'][1], $tree);
+
+        if (isset($tree['parameter'][2])) {
+            //is quoted
+            $strMod = $this->createTreeSql($tree['parameter'][2], $tree);
+            switch ($strMod) {
+                case '':
+                case '""':
+                    $sql = $strVar . ' REGEXP ' . $strRegex;
+                    break;
+
+                case '"i"':
+                    $sql = 'CAST(' . $strVar . ' AS CHAR) REGEXP ' . $strRegex;
+                    break;
+
+                default:
+                    throw new SparqlEngineDb_SqlGeneratorException(
+                        'Unsupported regex modifier "'
+                        . $strMod
+                        . '"'
+                    );
+            }
+        } else {
+            $sql = $strVar . ' REGEXP ' . $strRegex;
+        }
+
+        if ($this->isObject($tree['parameter'][0])) {
+            $col = $this->getIsCol($tree['parameter'][0]);
+            $sql = "($sql AND $col = 'l')";
+        }
+
+        return self::mkVal($sql, self::$typeXsdBoolean);
+    }//protected function createFunction_regex($tree)
+
+
+
+    /**
+    *   Creates an sql statement that checks if both terms are the same
+    */
+    protected function createFunction_sameterm($tree)
+    {
+        //FIXME: dead simple implementation that does not cover all cases
+        return self::mkVal(
+            $this->createTreeSql($tree['parameter'][0], $tree)
+                . ' = '
+                . $this->createTreeSql($tree['parameter'][1], $tree),
+            self::$typeXsdBoolean
+        );
+    }//protected function createFunction_sameterm($tree)
+
+
+
+    /**
+    *   Creates an sql statement that returns the string representation
+    *   of the given element
+    */
+    protected function createFunction_str($tree)
+    {
+        if ($this->isObject($tree['parameter'][0])) {
+            return self::mkVal(
+                '(CASE ' . $this->getIsCol($tree['parameter'][0])
+                . ' WHEN "b" THEN ""'
+                . ' ELSE ' . $this->getValueCol($tree['parameter'][0])
+                . ' END)',
+                self::$typeXsdString
+            );
+        }
+
+        return $this->createTreeSql($tree['parameter'][0], $tree);
+    }//protected function createFunction_str($tree)
+
+
+
+    /**
+    *   Creates an sql statement that returns the datetime representation
+    *   of the given element
+    */
+    protected function createFunction_xsd_datetime($tree)
+    {
+        $val = $this->createTreeSql($tree['parameter'][0], $tree);
+        if ($val->type == self::$typeXsdDateTime
+         || $val->type == self::$typeVariable) {
+            //no need to cast again
+            return $val;
+        }
+        return self::mkVal(
+            $this->getDateConversionSql($val),
+            self::$typeXsdDateTime
+        );
+    }//protected function createFunction_xsd_datetime($tree)
+
+
+
+
+    /*
+    *   Helper methods
+    */
+
+
+
+    protected static function mkVal($value, $type = null) {
+        return new SparqlEngineDb_FilterGenerator_Value($value, $type);
+    }
+
+
+
+    protected function getCol($tree, $type)
+    {
+        list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
+        if (!isset(SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type])) {
+            return false;
+        }
+        $strSqlCol = SparqlEngineDb_SqlGenerator::$arTableColumnNames[$chType][$type];
+        return $strTable . '.' . $strSqlCol;
+    }
+
+
+
+    protected function getDatatypeCol($tree)
+    {
+        list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
+        return $strTable . '.l_datatype';
+    }
+
+
+
+    protected function getDateConversionSql($strValue)
+    {
+        return 'STR_TO_DATE(' . $strValue . ', "%Y-%m-%dT%H:%i:%sZ")';
+    }//protected function getDateConversionSql($strValue)
+
+
+
+    protected function getIsCol($tree)
+    {
+        return $this->getCol($tree, 'is');
+    }
+
+
+
+    protected function getLangCol($tree)
+    {
+        list($strTable, $chType) = $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']];
+        return $strTable . '.l_language';
+    }
+
+
+
+    protected function getValueCol($tree)
+    {
+        return $this->getCol($tree, 'value');
+    }
+
+
+
+    protected function isNumber($tree)
+    {
+        return $tree['type'] == 'value'
+         && $tree['quoted'] === false
+         && preg_match('#^[0-9.]+$#', $tree['value'])
+         && floatval($tree['value']) == $tree['value'];
+    }//protected function isNumber($tree)
+
+
+
+    /**
+    *   Checks if the given tree element is a variable
+    *   and the variable is actually an object in the database.
+    *
+    *   @param array $tree  Tree element
+    *   @return boolean True if the element is an object
+    */
+    protected function isObject($tree)
+    {
+        return $this->isVariable($tree)
+         && $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 'o';
+    }//protected function isVariable($tree)
+
+
+
+    /**
+    *   Checks if the given tree element is a variable
+    *   and the variable is actually an object or a subject in the database.
+    *
+    *   @param array $tree  Tree element
+    *   @return boolean True if the element is an object or an subject
+    */
+    protected function isObjectOrSubject($tree)
+    {
+        return $this->isVariable($tree)
+         && (
+            $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 'o'
+         || $this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']][1] == 's'
+        );
+    }//protected function isObjectOrSubject($tree)
+
+
+
+    /**
+    *   Checks if the given tree element is a plain string (no variable)
+    *
+    *   @param array $tree  Tree element
+    *   @return boolean True if the element is a string
+    */
+    protected function isPlainString($tree)
+    {
+        return $tree['type'] == 'value'
+         && $tree['quoted'] === true;
+    }//protected function isPlainString($tree)
+
+
+
+    protected function isValueButNotVariableNorString($tree)
+    {
+        return $tree['type'] == 'value'
+         && $tree['type']['quoted'] === false
+         && !SparqlVariable::isVariable($tree['value']);
+    }//protected function isValueButNotVariableNorString($tree)
+
+
+
+    /**
+    *   Checks if the given tree element is a variable
+    *
+    *   @param array $tree  Tree element
+    *   @return boolean True if the element is a variable
+    */
+    protected function isVariable($tree)
+    {
+        return $tree['type'] == 'value'
+         && $tree['quoted'] === false
+         && SparqlVariable::isVariable($tree['value'])
+         && isset($this->sg->arUnionVarAssignments[$this->nUnionCount][$tree['value']]);
+    }//protected function isVariable($tree)
+
+
+
+    protected static function switchOperator($op)
+    {
+        if (!isset(self::$arOperatorSwitches[$op])) {
+            return $op;
+        } else {
+            return self::$arOperatorSwitches[$op];
+        }
+    }//protected static function switchOperator($op)
+
+}//class SparqlEngineDb_FilterGenerator
+
+
+
+
+/**
+*   Value class that holds some arbitrary value
+*   and a datatype.
+*   Objects of this class can transparently be used in strings since
+*   its __toString() returns the value.
+*/
+class SparqlEngineDb_FilterGenerator_Value
+{
+    public $value = null;
+    public $type  = null;
+
+
+
+    public function __construct($value, $type = null)
+    {
+        $this->value = $value;
+        $this->type  = $type;
+    }
+
+
+
+    public function __toString()
+    {
+        return $this->value;
+    }
+
+}//class SparqlEngineDb_FilterGenerator_Value
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/Offsetter.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/Offsetter.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/Offsetter.php	(revision 225)
@@ -0,0 +1,102 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/SqlMerger.php';
+
+/**
+*   Determines the offset in a row of sql queries.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_Offsetter
+{
+    public function __construct(ADOConnection $dbConn, Query $query)
+    {
+        $this->dbConn   = $dbConn;
+        $this->query    = $query;
+    }//public function __construct(ADOConnection $dbConn, Query $query)
+
+
+
+    /**
+    *   Determines the offset in the sqls, the position to start form.
+    *
+    *   @param array $arSqls    Array of SQL query parts as returned by
+    *                           SparqlEngine_TypeSorter::getOrderifiedSqls()
+    *   @return array   Array of two values: The first determines the
+    *                   index of the sql query to begin with, the second
+    *                   is the row offset that should be used in the final
+    *                   SQL query.
+    */
+    public function determineOffset($arSqls)
+    {
+        $arSM = $this->query->getSolutionModifier();
+        if ($arSM['offset'] === null) {
+            return array(0, 0);
+        }
+
+        $nCount = 0;
+        foreach ($arSqls as $nId => $arSql) {
+            $nCurrentCount = $this->getCount($arSql);
+            if ($nCurrentCount + $nCount > $arSM['offset']) {
+                return array($nId, $arSM['offset'] - $nCount);
+            }
+            $nCount += $nCurrentCount;
+        }
+        //nothing found - no results for this offset
+        return array(count($arSqls), 0);
+    }//public function determineOffset($arSql)
+
+
+
+    /**
+    *   Returns the number of rows that the given query will return.
+    *
+    *   @param array $arSql Array with sql parts and at least keys
+    *                'from' and 'where' set.
+    *   @return int     Number of rows returned.
+    */
+    protected function getCount($arSql)
+    {
+        $sql = SparqlEngineDb_SqlMerger::getCount($this->query, $arSql);
+        $dbResult = $this->dbConn->execute($sql);
+
+        $nCount = 0;
+        foreach ($dbResult as $row) {
+            $nCount = intval($row[0]);
+            break;
+        }
+        return $nCount;
+    }//protected function getCount($arSql)
+
+
+
+    /**
+    *   Creates a sql LIMIT statement if the sparql query needs one.
+    *   This method is needed because AdoDb does not support limits with
+    *   prepared statements. It's a pity.
+    *
+    *   @return string  SQL command to be appended to a query, to limit
+    *                   the number of result rows returned.
+    */
+    public static function getLimitSql(Query $query, ADOConnection $dbConn)
+    {
+        $arSM = $query->getSolutionModifier();
+        if ($arSM['limit'] === null && $arSM['offset'] === null) {
+            return '';
+        }
+        //this here is mysql syntax. if anyone has problems, write it
+        //dependent on $dbConn's type
+        if ($arSM['offset'] === null) {
+            return ' LIMIT ' . $arSM['limit'];
+        } else if ($arSM['limit'] === null) {
+            return ' LIMIT ' . $arSM['offset'] . ', 18446744073709551615';
+        } else {
+            return ' LIMIT ' . $arSM['offset'] . ', ' . $arSM['limit'];
+        }
+    }//public static function getLimitSql(Query $query, ADOConnection $dbConn)
+
+}//class SparqlEngineDb_Offsetter
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/Preparator.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/Preparator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/Preparator.php	(revision 225)
@@ -0,0 +1,229 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/Offsetter.php';
+
+/**
+*   This class takes care of prepared statements:
+*   Preparing them in the database, replacing
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_Preparator
+{
+
+
+
+    public function __construct(Query $query, ADOConnection $dbConn)
+    {
+        $this->query        = $query;
+        $this->dbConn       = $dbConn;
+        $this->arPrefixes   = $this->query->getPrefixes();
+    }//public function __construct(Query $query, ADOConnection $dbConn)
+
+
+
+    /**
+    *   Converts the given queries into sql prepared statments,
+    *   calls the prepare command in the database and returns
+    *   an array consisting of subarrays. They contain
+    *   the db's prepared statement as first value, and an array
+    *   of variable positions as second value (key is the position,
+    *   the sparql variable is the value).
+    *
+    *   @param array $arQueries      Array of sql queries part arrays
+    *   @param array $arPlaceholders Array of sparql (variable name =>
+    *                                placeholder name) pairs
+    *   @return array  Array of (prepared statment, variable positions) pairs
+    */
+    public function prepareInDb($arQueries, $arPlaceholders)
+    {
+        $arDbStatements = array();
+
+        foreach ($arQueries as $arQuery) {
+            list($strPrepared, $arVariablePositions) = $this->replacePlaceholders(
+                implode('', $arQuery),
+                $arPlaceholders
+            );
+            if (count($arQueries) == 1) {
+                //I currently haven't seens one case in which the count was > 1
+                //if that happens, we will need to add a fix
+                $strPrepared .= SparqlEngineDb_Offsetter::getLimitSql(
+                    $this->query,
+                    $this->dbConn
+                );
+            }
+            $stmt = $this->dbConn->Prepare($strPrepared);
+            $arDbStatements[] = array(
+                $stmt,
+                $arVariablePositions
+            );
+        }
+
+        return $arDbStatements;
+    }//public function prepareInDb($arQueries, $arPlaceholders)
+
+
+
+    /**
+    *   Replaces the placeholders in the given SQL statement with real
+    *   SQL prepared statements placeholders.
+    *
+    *   @param string $strQuery SQL query with placeholders
+    *   @param array $arPlaceholders Array of sparql (variable name =>
+    *                                placeholder name) pairs
+    *   @return array (prepared sql query string, variable positions) pair
+    */
+    protected function replacePlaceholders($strQuery, $arPlaceholders)
+    {
+        $arVariablePositions = array();
+        $this->arTmpVariablePositions = array();
+        $this->arTmpPlaceholders      = $arPlaceholders;
+        $strQuery = preg_replace_callback(
+            '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/',
+            array($this, 'replacePlaceholdersCb'),
+            $strQuery
+        );
+        return array($strQuery, $this->arTmpVariablePositions);
+    }//protected function replacePlaceholders($strQuery, $arPlaceholders)
+
+
+
+    /**
+    *   Callback method internally used by replacePlaceholders() method.
+    */
+    protected function replacePlaceholdersCb($matches)
+    {
+        $strPlaceholder     = $matches[0];
+        $strSparqlVariable  = array_search(
+            $strPlaceholder,
+            $this->arTmpPlaceholders
+        );
+        $strDbPlaceholder   = $this->dbConn->Param($strSparqlVariable);
+        $this->arTmpVariablePositions[] = $strSparqlVariable;
+
+        return $strDbPlaceholder;
+    }//protected function replacePlaceholdersCb($matches)
+
+
+
+    /**
+    *   Executes the given prepared statments, filling the placeholders
+    *   with the given values.
+    *
+    *   @param array $arDbStatements    Return value of prepareInDb()
+    *   @param array $arVariableValues      Array of (variable name, value) pairs
+    *
+    *   @return array Array of database results as returned by Execute()
+    */
+    public function execute($arDbStatements, $arVariableValues)
+    {
+        $arResults = array();
+        $oldmode = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
+
+        foreach ($arDbStatements as $arStatement) {
+            list($stmt, $arVariablePositions) = $arStatement;
+            $arVariables = $this->createVariableArray(
+                $arVariablePositions,
+                $arVariableValues
+            );
+            $arResults[] = $this->dbConn->Execute($stmt, $arVariables);
+        }
+
+        $this->dbConn->SetFetchMode($oldmode);
+
+        return $arResults;
+    }//public function execute($arDbStatements, $arVariableValues)
+
+
+
+    /**
+    *   Creates an array full of variables to be passed to the Execute() method
+    *   of the database connection object.
+    *   Uses the variable positions array to get the positions of the variables
+    *   in the result array, and the variable value array to get the actual
+    *   values for the prepared statement.
+    *
+    *   @param array $arVariablePositions   Positions of the variables as returned
+    *                                       by replacePlaceholders().
+    *   @param array $arVariableValues      Array of (variable name, value) pairs
+    *
+    *   @return array Array of variable values
+    */
+    protected function createVariableArray($arVariablePositions, $arVariableValues)
+    {
+        $arVariables = array();
+
+        foreach ($arVariablePositions as $nPos => $strVariable) {
+            if (!isset($arVariableValues[$strVariable])) {
+                throw new Exception('No value for variable "' . $strVariable . '" in prepared statement');
+            }
+
+            $strValue = self::replacePrefix(
+                $arVariableValues[$strVariable],
+                $this->arPrefixes
+            );
+
+            $arVariables[$nPos] = $strValue;
+        }
+
+        return $arVariables;
+    }//protected function createVariableArray($arVariablePositions, $arVariableValues)
+
+
+
+    /**
+    *   Replaces all placeholders with their actual values.
+    */
+    public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues)
+    {
+        $this->arTmpPlaceholders   = $arPlaceholders;
+        $this->arTmpVariableValues = $arVariableValues;
+
+        $strQuery = preg_replace_callback(
+            '/@\\$%_PLACEHOLDER_[0-9]+_%\\$@/',
+            array($this, 'replacePlaceholdersWithVariablesCb'),
+            $strQuery
+        );
+
+        return $strQuery;
+    }//public function replacePlaceholdersWithVariables($strQuery, $arPlaceholders, $arVariableValues)
+
+
+
+    /**
+    *   Callback method internally used by
+    *   replacePlaceholdersWithVariables() method.
+    */
+    protected function replacePlaceholdersWithVariablesCb($matches)
+    {
+        $strPlaceholder     = $matches[0];
+        $strSparqlVariable  = array_search(
+            $strPlaceholder,
+            $this->arTmpPlaceholders
+        );
+        return $this->dbConn->qstr(
+            self::replacePrefix(
+                $this->arTmpVariableValues[$strSparqlVariable],
+                $this->arPrefixes
+            )
+        );
+    }//protected function replacePlaceholdersWithVariablesCb($matches)
+
+
+
+    protected static function replacePrefix($strValue, $arPrefixes)
+    {
+        //replace prefixes?
+        if (count($arParts = explode(':', $strValue, 2)) == 2) {
+            if (isset($arPrefixes[$arParts[0]])) {
+                $strValue = $arPrefixes[$arParts[0]] . $arParts[1];
+            }
+        }
+        return $strValue;
+    }//protected static function replacePrefix($strValue, $arPrefixes)
+
+}//class SparqlEngineDb_Preparator
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/PreparedStatement.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/PreparedStatement.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/PreparedStatement.php	(revision 225)
@@ -0,0 +1,38 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine/PreparedStatement.php';;
+
+/**
+*   A prepared statement that can be execute()d later multiple
+*   times with different variable values.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement
+{
+    protected $sparqlEngine = null;
+
+
+    public function __construct(SparqlEngineDb $sparqlEngine)
+    {
+        $this->sparqlEngine = $sparqlEngine;
+    }//public function __construct(SparqlEngineDb $sparqlEngine)
+
+
+
+    /**
+    *   Execute the prepared statement and returns the result.
+    *
+    *   @param array $arVariables   Array of sparql query variables => values
+    *   @param string $resultform   Which result form you need
+    *   @return mixed   Anything a sparql query can return
+    */
+    public function execute($arVariables, $resultform = false)
+    {
+        return $this->sparqlEngine->execute($arVariables, $resultform);
+    }//public function execute($arVariables, $resultform)
+
+}//class SparqlEngineDb_PreparedStatement extends SparqlEngine_PreparedStatement
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/QuerySimplifier.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/QuerySimplifier.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/QuerySimplifier.php	(revision 225)
@@ -0,0 +1,169 @@
+<?php
+
+/**
+*   Simplifies ("flattens") Query objects that have graph
+*   patterns which are subpatterns of other patterns.
+*
+*   Example:
+*      ?g ?h ?i .
+*      {
+*        {?person <some://typ/e> 'asd'}
+*        UNION
+*        {?person3 <some://typ/es2> 'three'}
+*      }
+*    is represented internally as three graph patterns, the latter
+*    two referencing the first to be their pattern (they are subpatternOf).
+*    Now this can be flattened to this which is the same:
+*      {?g ?h ?i . ?person <some://typ/e> 'asd'}
+*      UNION
+*      {?g ?h ?i .?person3 <some://typ/es2> 'three'}
+*
+*   This class does this.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*/
+class SparqlEngineDb_QuerySimplifier
+{
+
+    /**
+    *   Simplify the query by flattening out subqueries.
+    *   Modifies the passed query object directly.
+    */
+    public function simplify(Query $query)
+    {
+        $arPatterns = $query->getResultPart();
+        self::dropEmpty($arPatterns);
+        $arPlan     = $this->createPlan($arPatterns);
+        if (count($arPlan) == 0) {
+            $query->setResultPart($arPatterns);
+            return 0;
+        }
+
+        $this->executePlan($arPatterns, $arPlan);
+        $query->setResultPart($arPatterns);
+    }//public function simplify(Query $query)
+
+
+
+    /**
+    *   Creates a plan what to do.
+    *
+    *   @return array Array of arrays. Key is the parent pattern id,
+    *               value is an array of subpatterns that belong to
+    *               that parental pattern.
+    */
+    protected function createPlan(&$arPatterns)
+    {
+        $arNumbers = $this->getNumbers($arPatterns);
+        if (count($arNumbers) == 0) {
+            return array();
+        }
+
+        $arPlan    = array();
+
+        foreach ($arNumbers as $nId => $nPatternCount) {
+            $nParent = $arPatterns[$nId]->getSubpatternOf();
+            $arPlan[$nParent][$nId] = true;
+        }
+
+        return $arPlan;
+    }//protected function createPlan(&$arPatterns)
+
+
+
+    /**
+    *   Executes the plan
+    *
+    *   @param array $arPatterns  Array of GraphPatterns
+    *   @param array $arPlan      Plan array as returned by createPlan()
+    */
+    protected function executePlan(&$arPatterns, &$arPlan)
+    {
+        foreach ($arPlan as $nParent => $arChildren) {
+            $base        = $arPatterns[$nParent];
+            $grandParent = $base->getSubpatternOf();
+            $nNextId     = $nParent;
+            foreach ($arChildren as $nChild => $null) {
+                $new = clone $base;
+                $new->addTriplePatterns($arPatterns[$nChild]->getTriplePatterns());
+                $new->addConstraints(   $arPatterns[$nChild]->getConstraints());
+                $new->setId($nNextId);
+                if ($nParent != $nNextId) {
+                    $new->setUnion($nParent);
+                }
+                $arPatterns[$nNextId] = $new;
+
+                if ($grandParent !== null) {
+                    //dynamically adjust plan
+                    $arPlan[$grandParent][$nNextId] = true;
+                }
+
+                $nNextId = $nChild;
+            }
+            //last one is not not needed anymore
+            unset($arPatterns[$nNextId]);
+        }
+    }//protected function executePlan(&$arPatterns, &$arPlan)
+
+
+
+    /**
+    *   Returns an array of id-value pairs determining
+    *   which pattern IDs (array id) are deepest nested
+    *   (higher value).
+    *   Array is sorted in reverse order, highest values
+    *   first.
+    *
+    *   @param array $arPatterns    Array with GraphPatterns
+    *   @return array Array with key-value pairs
+    */
+    protected function getNumbers(&$arPatterns)
+    {
+        $arNumbers = array();
+        foreach ($arPatterns as $nId => &$pattern) {
+            $nParent = $pattern->getSubpatternOf();
+            if ($nParent !== null) {
+                $arNumbers[$nId] = $arNumbers[$nParent] + 1;
+            } else {
+                $arNumbers[$nId] = 0;
+            }
+        }
+        //remove the not so interesting ones
+        foreach ($arNumbers as $nId => $nNumber) {
+            if ($nNumber == 0) {
+                unset($arNumbers[$nId]);
+            }
+        }
+
+        arsort($arNumbers);
+
+        return $arNumbers;
+    }//protected function getNumbers(&$arPatterns)
+
+
+
+    /**
+    *   Removes all empty graph patterns from the array.
+    *   Modifies it directly.
+    */
+    protected static function dropEmpty(&$arPatterns)
+    {
+        foreach ($arPatterns as $nId => &$pattern) {
+            if ($pattern->isEmpty()) {
+                unset($arPatterns[$nId]);
+            }
+        }
+
+        foreach ($arPatterns as $nId => &$pattern) {
+            $nParent = $pattern->getSubpatternOf();
+            if (!isset($arPatterns[$nParent])) {
+                $arPatterns[$nId]->setSubpatternOf(null);
+            }
+        }
+        //FIXME: continued indexes?
+    }//protected static function dropEmpty(&$arPatterns)
+
+}//class SparqlEngineDb_QuerySimplifier
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultConverter.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultConverter.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultConverter.php	(revision 225)
@@ -0,0 +1,115 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Converts a database result into a proper
+*   rdf statement triple array
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_ResultConverter
+{
+    /**
+    *   Determines the correct renderer and calls it.
+    *
+    *   The $resultform may be:
+    *   - false: The default renderer is taken then
+    *   - an object that implements SparqlEngineDb_ResultRenderer interface
+    *   - a string like "HTML" or "XML". The appropriate renderer is used then.
+    *   - a full class name, e.g. SparqlEngineDb_ResultRenderer_XML
+    *
+    *   @param array    $arRecordSets   Array of anything ADOConnection::Execute() can return
+    *   @param SparqlEngineDb $engine   Sparql database engine.
+    *   @param mixed    $resultform     Which format the results shall be in (false or "xml")
+    *
+    *   @return mixed   Most likely an array or a boolean value,
+    *                   or anything else as determined by $resultform
+    */
+    public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false)
+    {
+        if (is_object($resultform)) {
+            if ($resultform instanceof SparqlEngineDb_ResultRenderer) {
+                return $resultform->convertFromDbResults(
+                    $arRecordSets,
+                    $engine->getQuery(),
+                    $engine
+                );
+            } else {
+                throw new Exception(
+                    'Result renderer object needs to implement'
+                    . ' SparqlEngineDb_ResultRenderer interface'
+                );
+            }
+        }
+
+        if ($resultform === false) {
+            $resultform = 'Default';
+        } else if ($resultform == 'xml') {
+            //kept for BC reasons
+            $resultform = 'XML';
+        }
+
+        if ($strClass = self::loadClass($resultform)) {
+            $rrObj = new $strClass();
+            if ($rrObj instanceof SparqlEngineDb_ResultRenderer) {
+                return $rrObj->convertFromDbResults(
+                    $arRecordSets,
+                    $engine->getQuery(),
+                    $engine
+                );
+            } else {
+                throw new Exception(
+                    'Result renderer class "' . $strClass . '" needs to implement'
+                    . ' SparqlEngineDb_ResultRenderer interface'
+                );
+            }
+        } else {
+            throw new Exception(
+                'Result renderer class "' . $resultform . '" could not be loaded.'
+            );
+        }
+    }//public static function convertFromDbResults($arRecordSets, SparqlEngineDb $engine, $resultform = false)
+
+
+
+    /**
+    *   Tries to load a given class if it doesn't exist,
+    *   and returns true if the class can be used.
+    *
+    *   @param string $strClass Classname
+    *   @return mixed Class name if the class is loaded and can be used, false if not.
+    */
+    protected static function loadClass($strClass)
+    {
+        if (class_exists($strClass, false)) {
+            return $strClass;
+        }
+
+        //RAP style, shortcut notation
+        $strFile = 'SparqlEngineDb/ResultRenderer/' . $strClass . '.php';
+        @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile;
+        if (class_exists('SparqlEngineDb_ResultRenderer_' . $strClass, false)) {
+            return 'SparqlEngineDb_ResultRenderer_' . $strClass;
+        }
+
+        //RAP style
+        $strFile = str_replace('_', '/', $strClass) . '.php';
+        @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile;
+        if (class_exists($strClass, false)) {
+            return $strClass;
+        }
+
+        //PEAR style
+        @include_once $strFile;
+        if (class_exists($strClass, false)) {
+            return $strClass;
+        }
+
+        return false;
+    }//protected static function loadClass($strClass)
+
+}//class SparqlEngineDb_ResultConverter
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer.php	(revision 225)
@@ -0,0 +1,29 @@
+<?php
+
+/**
+*   Result renderer interface that any result renderer needs to implement.
+*   A result renderer converts the raw database results into a
+*   - for the user - usable result format, e.g. php arrays, xml, json and
+*   so on.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+interface SparqlEngineDb_ResultRenderer
+{
+    /**
+    *   Converts the database results into the desired output format
+    *   and returns the result.
+    *
+    *   @param array $arRecordSets  Array of (possibly several) SQL query results.
+    *   @param Query $query     SPARQL query object
+    *   @param SparqlEngineDb $engine   Sparql Engine to query the database
+    *   @return mixed   The result as rendered by the result renderers.
+    */
+    public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine);
+
+}//interface SparqlEngineDb_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/Default.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/Default.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/Default.php	(revision 225)
@@ -0,0 +1,339 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Default RAP result renderer.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer
+{
+
+    /**
+    *   Defines the methods needed to create the types
+    *   in $arVarAssignments.
+    *   Key is the type (e.g. "s" for subject), and
+    *   value the method's name.
+    *
+    *   @see $arVarAssignments
+    *
+    *   @var array
+    */
+    protected $arCreationMethods = array(
+        's' => 'createSubjectFromDbRecordSetPart',
+        'p' => 'createPredicateFromDbRecordSetPart',
+        'o' => 'createObjectFromDbRecordSetPart'
+    );
+
+
+
+    /**
+    *   Converts the database results into the desired output format
+    *   and returns the result.
+    *
+    *   @param array $arRecordSets  Array of (possibly several) SQL query results.
+    *   @param Query $query     SPARQL query object
+    *   @param SparqlEngineDb $engine   Sparql Engine to query the database
+    *   @return mixed   The result as rendered by the result renderers.
+    */
+    public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+    {
+        $this->query    = $query;
+        $this->engine   = $engine;
+        $this->sg       = $engine->getSqlGenerator();
+
+        $strResultForm = $this->query->getResultForm();
+        switch ($strResultForm) {
+            case 'construct':
+            case 'select':
+            case 'select distinct':
+                $arResult = $this->getVariableArrayFromRecordSets($arRecordSets, $strResultForm);
+
+                //some result forms need more modification
+                switch ($strResultForm) {
+                    case 'construct';
+                        $arResult = $this->constructGraph(
+                            $arResult,
+                            $this->query->getConstructPattern()
+                        );
+                        break;
+                    case 'describe';
+                        $arResult = $this->describeGraph($arResult);
+                        break;
+                }
+
+                return $arResult;
+                break;
+
+            case 'count':
+            case 'ask':
+                if (count($arRecordSets) > 1) {
+                    throw new Exception(
+                        'More than one result set for a '
+                        . $strResultForm . ' query!'
+                    );
+                }
+
+                $nCount = 0;
+                $dbRecordSet = reset($arRecordSets);
+                foreach ($dbRecordSet as $row) {
+                    $nCount += intval($row['count']);
+                    break;
+                }
+
+                if ($strResultForm == 'ask') {
+                    return $nCount > 0;
+                } else {
+                    return $nCount;
+                }
+                break;
+
+            case 'describe':
+            default:
+                throw new Exception('Unsupported result form: ' . $strResultForm);
+        }
+
+    }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+
+
+
+
+    protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm)
+    {
+        $arResult = array();
+        foreach ($arRecordSets as $dbRecordSet) {
+            $arResult = array_merge(
+                $arResult,
+                $this->getVariableArrayFromRecordSet($dbRecordSet, $strResultForm)
+            );
+        }
+        return $arResult;
+    }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm)
+
+
+
+    /**
+    *   Converts a ADORecordSet object into an array of "rows" that
+    *   are subarrays of variable => value pairs.
+    *
+    *   @param ADORecordSet $dbRecordSet    Anything ADOConnection::Execute() can return
+    *   @return array
+    */
+    protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm)
+    {
+        $arResult       = array();
+        switch ($strResultForm) {
+            case 'construct':
+                $arResultVars = $this->query->getConstructPatternVariables();
+                break;
+            default:
+                $arResultVars = $this->query->getResultVars();
+                break;
+        }
+
+        if (in_array('*', $arResultVars)) {
+            $arResultVars   = array_keys($this->sg->arVarAssignments);
+        }
+
+        //work around bug in adodb:
+        // ADORecordSet_empty does not implement php5 iterators
+        if ($dbRecordSet->RowCount() <= 0) {
+            return array();
+        }
+
+        foreach ($dbRecordSet as $row) {
+            $arResultRow = array();
+            foreach ($arResultVars as $strVar) {
+                $strVarName = (string)$strVar;
+                if (!isset($this->sg->arVarAssignments[$strVarName])) {
+                    //variable is in select, but not in result (test: q-select-2)
+                    $arResultRow[$strVarName] = '';
+                } else {
+                    $arVarSettings  = $this->sg->arVarAssignments[$strVarName];
+                    $strMethod      = $this->arCreationMethods[$arVarSettings[1]];
+                    $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar);
+                }
+            }
+            $arResult[] = $arResultRow;
+        }
+        return $arResult;
+    }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet)
+
+
+
+    /**
+    *   Creates an RDF Statement object for one of the variables
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Statement   RDF statement object
+    */
+    protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase)
+    {
+        return new Statement(
+            $this->createSubjectFromDbRecordSetPart  ($dbRecordSet, $strVarBase),
+            $this->createPredicateFromDbRecordSetPart($dbRecordSet, $strVarBase),
+            $this->createObjectFromDbRecordSetPart   ($dbRecordSet, $strVarBase)
+        );
+    }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase)
+
+
+
+    /**
+    *   Creates an RDF subject object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Resource   RDF triple subject resource object
+    */
+    protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            //FIXME: should be NULL, but doesn't pass test
+            return '';
+        }
+
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
+            //null should be predicate which is always a resource
+         || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
+        ) {
+            $subject    = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        } else {
+            $subject    = new BlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        }
+        return $subject;
+    }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
+
+
+
+    /**
+    *   Creates an RDF predicate object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Resource   RDF triple predicate resource object
+    */
+    protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            //FIXME: should be NULL, but doesn't pass test
+            return '';
+        }
+        $predicate      = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        return $predicate;
+    }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
+
+
+
+    /**
+    *   Creates an RDF object object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Resource   RDF triple object resource object
+    */
+    protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            //FIXME: should be NULL, but doesn't pass test
+            return '';
+        }
+        switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) {
+            case 'r':
+                $object = new Resource ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            case 'b':
+                $object = new BlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            default:
+                $object = new Literal(
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']]
+                );
+                if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]) {
+                    $object->setDatatype($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]);
+                }
+        }
+        return $object;
+    }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVarName)
+
+
+
+    /**
+    * Constructs a result graph.
+    *
+    * @param  array         $arVartable       A table containing the result vars and their bindings
+    * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
+    * @return MemModel      The result graph which matches the CONSTRUCT pattern
+    */
+    protected function constructGraph($arVartable, $constructPattern)
+    {
+        $resultGraph = new MemModel();
+
+        if (!$arVartable) {
+            return $resultGraph;
+        }
+
+        $tp = $constructPattern->getTriplePatterns();
+
+        $bnode = 0;
+        foreach ($arVartable as $value) {
+            foreach ($tp as $triple) {
+                $sub  = $triple->getSubject();
+                $pred = $triple->getPredicate();
+                $obj  = $triple->getObject();
+
+                if (is_string($sub)  && $sub{1} == '_') {
+                    $sub  = new BlankNode("_bN".$bnode);
+                }
+                if (is_string($pred) && $pred{1} == '_') {
+                    $pred = new BlankNode("_bN".$bnode);
+                }
+                if (is_string($obj)  && $obj{1} == '_') {
+                    $obj  = new BlankNode("_bN".$bnode);
+                }
+
+
+                if (is_string($sub)) {
+                    $sub  = $value[$sub];
+                }
+                if (is_string($pred)) {
+                    $pred = $value[$pred];
+                }
+                if (is_string($obj)) {
+                    $obj  = $value[$obj];
+                }
+
+                if ($sub !== "" && $pred !== "" && $obj !== "") {
+                    $resultGraph->add(new Statement($sub,$pred,$obj));
+                }
+            }
+            $bnode++;
+        }
+        return $resultGraph;
+    }//protected function constructGraph($arVartable, $constructPattern)
+
+}//class SparqlEngineDb_ResultRenderer_Default implements SparqlEngineDb_ResultRenderer
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/HTML.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/HTML.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/HTML.php	(revision 225)
@@ -0,0 +1,297 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Sparql DB HTML result renderer.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer
+{
+    /**
+    *   If the result HTML should be wrapped in a div
+    *   @var boolean
+    */
+    protected $bWrap = true;
+
+    /**
+    *   Defines the methods needed to create the types
+    *   in $arVarAssignments.
+    *   Key is the type (e.g. "s" for subject), and
+    *   value the method's name.
+    *
+    *   @see $arVarAssignments
+    *
+    *   @var array
+    */
+    protected $arCreationMethods = array(
+        's' => 'createSubjectFromDbRecordSetPart',
+        'p' => 'createPredicateFromDbRecordSetPart',
+        'o' => 'createObjectFromDbRecordSetPart'
+    );
+
+
+
+    /**
+    *   Converts the database results into nice HTML.
+    *
+    *   @param array $arRecordSets  Array of (possibly several) SQL query results.
+    *   @param Query $query     SPARQL query object
+    *   @param SparqlEngineDb $engine   Sparql Engine to query the database
+    *   @return mixed   HTML code
+    */
+    public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+    {
+        $this->query = $query;
+        $this->sg    = $engine->getSqlGenerator();
+        $strCode     = '';
+
+        $strResultForm = $query->getResultForm();
+        switch ($strResultForm) {
+            case 'select':
+            case 'select distinct':
+                $strCode = $this->createTableFromRecords($arRecordSets);
+                break;
+
+            case 'construct':
+            case 'describe':
+                throw new Exception(
+                    'Construct and describe are currently not supported by the'
+                    . ' HTML renderer'
+                );
+
+            case 'count':
+            case 'ask':
+                if (count($arRecordSets) > 1) {
+                    throw new Exception(
+                        'More than one result set for a '
+                        . $strResultForm . ' query!'
+                    );
+                }
+
+                $nCount = 0;
+                $dbRecordSet = reset($arRecordSets);
+                foreach ($dbRecordSet as $row) {
+                    $nCount += intval($row['count']);
+                    break;
+                }
+
+                if ($strResultForm == 'ask') {
+                    $strCode = 'There were results.';
+                } else {
+                    $strCode = 'There are ' . $nCount . ' results.';
+                }
+                break;
+
+            default:
+                throw new Exception('Unsupported result form: ' . $strResultForm);
+        }
+
+        return $this->wrapCode($strCode);
+    }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+
+
+
+    protected function wrapCode($strCode)
+    {
+        if (!$this->bWrap) {
+            return $strCode;
+        }
+
+        return
+            '<div class="SparqlEngineDb_ResultRenderer_HTML_result">' . "\n"
+            . $strCode . "\n"
+            . "</div>\n";
+    }//protected function wrapCode($strCode)
+
+
+
+    protected function createTableFromRecords($arRecordSets)
+    {
+        $arResultVars = $this->query->getResultVars();
+
+        if (in_array('*', $arResultVars)) {
+            $arResultVars   = array_keys($this->sg->arVarAssignments);
+        }
+
+        $arResult = array();
+        foreach ($arRecordSets as $dbRecordSet) {
+            //work around bug in adodb:
+            // ADORecordSet_empty does not implement php5 iterators
+            if ($dbRecordSet->RowCount() <= 0) {
+                return array();
+            }
+
+            foreach ($dbRecordSet as $row) {
+                $arResultRow = array();
+                foreach ($arResultVars as $strVar) {
+                    $strVarName = (string)$strVar;
+                    if (!isset($this->sg->arVarAssignments[$strVarName])) {
+                        //variable is in select, but not in result (test: q-select-2)
+                        $arResultRow[$strVarName] = '';
+                    } else {
+                        $arVarSettings  = $this->sg->arVarAssignments[$strVarName];
+                        $strMethod      = $this->arCreationMethods[$arVarSettings[1]];
+                        list($strCode, $strColor) = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar);
+                        $arResultRow[$strVarName] = '<td style="background-color: '
+                            . $strColor . '">' . $strCode . '</td>';
+                    }
+                }
+                $arResult[] = $arResultRow;
+            }
+        }
+
+        //I always wanted to to this :)
+        return
+            "<table border='1'>\n"
+            . " <caption>SPARQL result with " . count($arResult) . " rows</caption>\n"
+            . " <thead><th>"
+                . implode('</th><th>', array_keys(reset($arResult)))
+            . "</th></thead>\n"
+            . " <tbody>\n  <tr>"
+            . implode(
+                "</tr>\n  <tr>",
+                array_map(
+                    create_function(
+                        '$ar',
+                        'return implode("", $ar);'
+                    ),
+                    $arResult
+                )
+              )
+            . "</tr>\n </tbody>\n"
+            . "</table>\n";
+    }//protected function createTableFromRecords($arRecordSets)
+
+
+
+    /**
+    *   Creates an RDF subject object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            return $this->getHtmlNull();
+        }
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
+            //null should be predicate which is always a resource
+         || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
+        ) {
+            return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        } else {
+            return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        }
+    }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    *   Creates an RDF predicate object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase .  '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            return $this->getHtmlNull();
+        }
+
+        return $this->getHtmlResource($dbRecordSet->fields[$strVarBase .  '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+    }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    *   Creates an RDF object object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            return $this->getHtmlNull();
+        }
+        switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) {
+            case 'r':
+                return $this->getHtmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            case 'b':
+                return $this->getHtmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            default:
+                return $this->getHtmlLiteral(
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]
+                );
+        }
+    }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    protected function getHtmlNull()
+    {
+        return array('<pre>NULL</pre>', '#FFF');
+    }//protected function getHtmlNull()
+
+
+
+    protected function getHtmlBlank($value)
+    {
+        return array('<i>Blank node</i>', HTML_TABLE_BNODE_COLOR);
+    }//protected function getHtmlBlank($value)
+
+
+
+    protected function getHtmlResource($value)
+    {
+        return array(
+            htmlspecialchars($value),
+            HTML_TABLE_RESOURCE_COLOR
+        );
+    }//protected function getHtmlResource($value)
+
+
+
+    protected function getHtmlLiteral($value, $language, $datatype)
+    {
+        $strCode = htmlspecialchars($value);
+        if ($language) {
+            $strCode . ' <i>xml:lang</i>=' . $language;
+        }
+        if ($datatype) {
+            $strCode . ' <i>rdf:type</i>=' . $datatype;
+        }
+        return array($strCode, HTML_TABLE_LITERAL_COLOR);
+    }//protected function getHtmlLiteral($value, $language, $datatype)
+
+
+}//class SparqlEngineDb_ResultRenderer_HTML implements SparqlEngineDb_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/JSON.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/JSON.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/JSON.php	(revision 225)
@@ -0,0 +1,174 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Sparql DB JSON Renderer. Roughly follows http://www.w3.org/2001/sw/DataAccess/json-sparql/;
+*
+*   @author Christoph Rieß
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_ResultRenderer_JSON implements SparqlEngineDb_ResultRenderer
+{
+
+    /**
+    *   Converts the database results into JSON Format
+    *
+    *   @param array $arRecordSets  Array of (possibly several) SQL query results.
+    *   @param Query $query     SPARQL query object
+    *   @param SparqlEngineDb $engine   Sparql Engine to query the database
+    *   @return mixed   HTML code
+    */
+    public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine) {
+    	
+        $this->query = $query;
+        $this->sg    = $engine->getSqlGenerator();
+        $strResultForm = $query->getResultForm();
+        
+        foreach ($this->getResultVars() as $var)
+        	$ResultVarsTemp[] = substr($var,1);
+        
+        switch ($strResultForm) {
+            case 'select':
+            case 'select distinct':
+                $results = $this->createFromRecords($arRecordSets, $strResultForm);
+				$strCode = json_encode(array(
+				'head' => array('vars'=>$ResultVarsTemp),
+				'results'=>array('bindings'=>$results))
+				);
+				//$strCode = str_replace(',{',','.PHP_EOL.'{',$strCode);
+                break;
+			case 'construct':
+            case 'describe':
+                throw new Exception(
+                    'Construct and describe are not supported by the'
+                    . ' JSON renderer'
+                );
+
+            case 'count':
+            case 'ask':
+                if (count($arRecordSets) > 1) {
+                    throw new Exception(
+                        'More than one result set for a '
+                        . $strResultForm . ' query not supported by JSON Renderer'
+                    );
+                }
+
+                $nCount = 0;
+                $dbRecordSet = reset($arRecordSets);
+                foreach ($dbRecordSet as $row) {
+                    $nCount += intval($row['count']);
+                    break;
+                }
+
+                if ($strResultForm == 'ask') {
+                    $strcode = json_encode(array('boolean' => ($nCount > 0)));
+                } else {
+                    $strcode = json_encode(array('int' => $nCount ));
+                }
+                break;
+            default:
+            	throw new Exception('Error');
+        }
+        
+        return $strCode;
+        
+
+    }
+    /**
+     * Method to create from record with specific resultform (not used yet)
+     *
+     * @param array $arRecordSets  Array of (possibly several) SQL query results.
+     * @param unknown_type $strResultForm
+     * @return array ready for json conversion
+     */
+	protected function createFromRecords($arRecordSets, $strResultForm) {
+		
+		$arVarAssignments = $this->sg->arVarAssignments;
+		$code = '';
+		$arResultVars = $this ->getResultVars();
+		$results = array();
+		foreach ($arRecordSets[0] as $value) {
+			$node = array();
+			foreach ($arResultVars as $ResultVar) {
+				$nodeType = $value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_is']];
+				if ($nodeType == 'r') {
+					$node[substr($ResultVar,1)] = array('type'=> 'uri','value'=>$value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]);
+					
+				}
+				
+				if ($value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_is']] == 'l') {
+					$literalType = $value[$arVarAssignments[$ResultVar][0] . 
+						'.' . $arVarAssignments[$ResultVar]['sql_type']];
+					$literalLang = $value[$arVarAssignments[$ResultVar][0] . 
+						'.' . $arVarAssignments[$ResultVar]['sql_lang']];
+					$literalValue = $value[$arVarAssignments[$ResultVar][0] . 
+						'.' . $arVarAssignments[$ResultVar]['sql_value']];
+					$node[substr($ResultVar,1)] = $this->getLiteral($literalValue,$literalLang,$literalType);
+				}
+				
+				if ($nodeType === 'b') {
+					$literalValue = $value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']];
+					$node[substr($ResultVar,1)] = array ('type'=>'bnode' ,'value'=>$value[$arVarAssignments[$ResultVar][0].'.'.$arVarAssignments[$ResultVar]['sql_value']]);
+				}
+			}
+			$results[]=$node;
+			
+			
+		}
+		return $results;
+
+	}
+	
+	/**
+	 * COnverting Literals to array ready for json
+	 *
+	 * @param unknown_type $value
+	 * @param unknown_type $lang
+	 * @param unknown_type $type
+	 * @return unknown
+	 */
+	private function getLiteral($value, $lang , $type) {
+		
+		$ret = array();
+		
+		$type = 'literal';
+		
+		if ($value != 'literal') {
+			$ret['value'] = $value;
+		}
+		
+		if ($lang != '') {
+			$ret['lang'] = $lang;
+		}
+		
+		if ($type != '') {
+			$ret['type'] = $type; 
+		}
+		
+		return $ret;
+	}
+	
+	/**
+	 * Giving array of used Vars also resolves the all-quantifier *
+	 *
+	 * @return array of vars as strings
+	 */
+	protected function getResultVars() {
+		$arResultVars = $this->query->getResultVars();
+		if (in_array('*', $arResultVars)) {
+			$arResultVars   = array_keys($this->sg->arVarAssignments);
+		} else {
+			$arResultVars = array();
+			foreach ($this->query->getResultVars() as $Var) {
+				$arResultVars[] = (string) $Var;
+			}
+		}
+		
+		return $arResultVars;
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/PlainText.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/PlainText.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/PlainText.php	(revision 225)
@@ -0,0 +1,363 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Result renderer that creates a text array
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_ResultRenderer_PlainText implements SparqlEngineDb_ResultRenderer
+{
+
+    /**
+    *   Defines the methods needed to create the types
+    *   in $arVarAssignments.
+    *   Key is the type (e.g. "s" for subject), and
+    *   value the method's name.
+    *
+    *   @see $arVarAssignments
+    *
+    *   @var array
+    */
+    protected $arCreationMethods = array(
+        's' => 'createSubjectFromDbRecordSetPart',
+        'p' => 'createPredicateFromDbRecordSetPart',
+        'o' => 'createObjectFromDbRecordSetPart'
+    );
+
+
+
+    /**
+    *   Converts the database results into the desired output format
+    *   and returns the result.
+    *
+    *   @param array $arRecordSets  Array of (possibly several) SQL query results.
+    *   @param Query $query     SPARQL query object
+    *   @param SparqlEngineDb $engine   Sparql Engine to query the database
+    *   @return mixed   The result as rendered by the result renderers.
+    */
+    public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+    {
+        $this->query    = $query;
+        $this->engine   = $engine;
+        $this->sg       = $engine->getSqlGenerator();
+
+        $strResultForm = $this->query->getResultForm();
+        switch ($strResultForm) {
+            case 'construct':
+            case 'select':
+            case 'select distinct':
+                $arResult = $this->getVariableArrayFromRecordSets($arRecordSets, $strResultForm);
+
+                //some result forms need more modification
+                switch ($strResultForm) {
+                    case 'construct';
+                        $arResult = $this->constructGraph(
+                            $arResult,
+                            $this->query->getConstructPattern()
+                        );
+                        break;
+                    case 'describe';
+                        $arResult = $this->describeGraph($arResult);
+                        break;
+                }
+
+                return $arResult;
+                break;
+
+            case 'count':
+            case 'ask':
+                if (count($arRecordSets) > 1) {
+                    throw new Exception(
+                        'More than one result set for a '
+                        . $strResultForm . ' query!'
+                    );
+                }
+
+                $nCount = 0;
+                $dbRecordSet = reset($arRecordSets);
+                foreach ($dbRecordSet as $row) {
+                    $nCount += intval($row['count']);
+                    break;
+                }
+
+                if ($strResultForm == 'ask') {
+                    return $nCount > 0;
+                } else {
+                    return $nCount;
+                }
+                break;
+
+            case 'describe':
+            default:
+                throw new Exception('Unsupported result form: ' . $strResultForm);
+        }
+
+    }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+
+
+
+
+    protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm)
+    {
+        $arResult = array();
+        foreach ($arRecordSets as $dbRecordSet) {
+            $arResult = array_merge(
+                $arResult,
+                $this->getVariableArrayFromRecordSet($dbRecordSet, $strResultForm)
+            );
+        }
+        return $arResult;
+    }//protected function getVariableArrayFromRecordSets($arRecordSets, $strResultForm)
+
+
+
+    /**
+    *   Converts a ADORecordSet object into an array of "rows" that
+    *   are subarrays of variable => value pairs.
+    *
+    *   @param ADORecordSet $dbRecordSet    Anything ADOConnection::Execute() can return
+    *   @return array
+    */
+    protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm)
+    {
+        $arResult       = array();
+        switch ($strResultForm) {
+            case 'construct':
+                $arResultVars = $this->query->getConstructPatternVariables();
+                break;
+            default:
+                $arResultVars = $this->query->getResultVars();
+                break;
+        }
+
+        if (in_array('*', $arResultVars)) {
+            $arResultVars   = array_keys($this->sg->arVarAssignments);
+        }
+
+        //work around bug in adodb:
+        // ADORecordSet_empty does not implement php5 iterators
+        if ($dbRecordSet->RowCount() <= 0) {
+            return array();
+        }
+
+        foreach ($dbRecordSet as $row) {
+            $arResultRow = array();
+            foreach ($arResultVars as $strVar) {
+                $strVarName = (string)$strVar;
+                if (!isset($this->sg->arVarAssignments[$strVarName])) {
+                    //variable is in select, but not in result (test: q-select-2)
+                    $arResultRow[$strVarName] = '';
+                } else {
+                    $arVarSettings  = $this->sg->arVarAssignments[$strVarName];
+                    $strMethod      = $this->arCreationMethods[$arVarSettings[1]];
+                    $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar);
+                }
+            }
+            $arResult[] = $arResultRow;
+        }
+        return $arResult;
+    }//function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet)
+
+
+
+    /**
+    *   Creates an RDF Statement object for one of the variables
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Statement   RDF statement object
+    */
+    protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase)
+    {
+        return new Statement(
+            $this->createSubjectFromDbRecordSetPart  ($dbRecordSet, $strVarBase),
+            $this->createPredicateFromDbRecordSetPart($dbRecordSet, $strVarBase),
+            $this->createObjectFromDbRecordSetPart   ($dbRecordSet, $strVarBase)
+        );
+    }//protected function createStatementFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase)
+
+
+
+    /**
+    *   Creates an RDF subject object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Resource   RDF triple subject resource object
+    */
+    protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            //FIXME: should be NULL, but doesn't pass test
+            return '';
+        }
+
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
+            //null should be predicate which is always a resource
+         || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
+        ) {
+            return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        } else {
+            return $this->createBlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        }
+        return $subject;
+    }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    *   Creates an RDF predicate object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Resource   RDF triple predicate resource object
+    */
+    protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            //FIXME: should be NULL, but doesn't pass test
+            return '';
+        }
+        return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+    }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    *   Creates an RDF object object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return Resource   RDF triple object resource object
+    */
+    protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            //FIXME: should be NULL, but doesn't pass test
+            return '';
+        }
+        switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) {
+            case 'r':
+                return $this->createResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            case 'b':
+                return $this->createBlankNode($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            default:
+                return $this->createLiteral(
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]
+                );
+        }
+    }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    * Constructs a result graph.
+    *
+    * @param  array         $arVartable       A table containing the result vars and their bindings
+    * @param  GraphPattern  $constructPattern The CONSTRUCT pattern
+    * @return MemModel      The result graph which matches the CONSTRUCT pattern
+    */
+    protected function constructGraph($arVartable, $constructPattern)
+    {
+        $resultGraph = new MemModel();
+
+        if (!$arVartable) {
+            return $resultGraph;
+        }
+
+        $tp = $constructPattern->getTriplePatterns();
+
+        $bnode = 0;
+        foreach ($arVartable as $value) {
+            foreach ($tp as $triple) {
+                $sub  = $triple->getSubject();
+                $pred = $triple->getPredicate();
+                $obj  = $triple->getObject();
+
+                if (is_string($sub)  && $sub{1} == '_') {
+                    $sub  = new BlankNode("_bN".$bnode);
+                }
+                if (is_string($pred) && $pred{1} == '_') {
+                    $pred = new BlankNode("_bN".$bnode);
+                }
+                if (is_string($obj)  && $obj{1} == '_') {
+                    $obj  = new BlankNode("_bN".$bnode);
+                }
+
+
+                if (is_string($sub)) {
+                    $sub  = $value[$sub];
+                }
+                if (is_string($pred)) {
+                    $pred = $value[$pred];
+                }
+                if (is_string($obj)) {
+                    $obj  = $value[$obj];
+                }
+
+                if ($sub !== "" && $pred !== "" && $obj !== "") {
+                    $resultGraph->add(new Statement($sub,$pred,$obj));
+                }
+            }
+            $bnode++;
+        }
+        return $resultGraph;
+    }//protected function constructGraph($arVartable, $constructPattern)
+
+
+
+    protected function createResource($uri)
+    {
+        return 'R<' . $uri . '>';
+    }//protected function createResource($uri)
+
+
+
+    protected function createBlankNode($id)
+    {
+        return 'B(' . $id . ')';
+    }//protected function createBlankNode($id)
+
+
+
+    protected function createLiteral($value, $language, $datatype)
+    {
+        $v = 'L(' . $value;
+        if ($language != null) {
+            $v .= '@' . $language;
+        }
+        if ($datatype != null) {
+            $v .= '^^' . $datatype;
+        }
+        return $v . ')';
+    }//protected function createLiteral($value, $language, $datatype)
+
+}//class SparqlEngineDb_ResultRenderer_PlainText implements SparqlEngineDb_ResultRenderer
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/XML.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/XML.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/ResultRenderer/XML.php	(revision 225)
@@ -0,0 +1,336 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/ResultRenderer.php';
+
+/**
+*   Sparql DB XML result renderer as defined by
+*   http://www.w3.org/TR/rdf-sparql-XMLres/
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer
+{
+
+    /**
+    *   Defines the methods needed to create the types
+    *   in $arVarAssignments.
+    *   Key is the type (e.g. "s" for subject), and
+    *   value the method's name.
+    *
+    *   @see $arVarAssignments
+    *
+    *   @var array
+    */
+    protected $arCreationMethods = array(
+        's' => 'createSubjectFromDbRecordSetPart',
+        'p' => 'createPredicateFromDbRecordSetPart',
+        'o' => 'createObjectFromDbRecordSetPart'
+    );
+
+
+
+    /**
+    *   Converts the database results into nice HTML.
+    *
+    *   @param array $arRecordSets  Array of (possibly several) SQL query results.
+    *   @param Query $query     SPARQL query object
+    *   @param SparqlEngineDb $engine   Sparql Engine to query the database
+    *   @return mixed   HTML code
+    */
+    public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+    {
+        $this->query = $query;
+        $this->sg    = $engine->getSqlGenerator();
+        $strCode     = '';
+
+        $strResultForm = $query->getResultForm();
+        switch ($strResultForm) {
+            case 'select':
+            case 'select distinct':
+                $strCode = $this->createFromRecords($arRecordSets, $strResultForm);
+                break;
+
+            case 'construct':
+            case 'describe':
+                throw new Exception(
+                    'Construct and describe are not supported by the'
+                    . ' XML renderer'
+                );
+
+            case 'count':
+            case 'ask':
+                if (count($arRecordSets) > 1) {
+                    throw new Exception(
+                        'More than one result set for a '
+                        . $strResultForm . ' query!'
+                    );
+                }
+
+                $nCount = 0;
+                $dbRecordSet = reset($arRecordSets);
+                foreach ($dbRecordSet as $row) {
+                    $nCount += intval($row['count']);
+                    break;
+                }
+
+                if ($strResultForm == 'ask') {
+                    $strCode = $this->getHead()
+                        . '  <boolean>'
+                        . self::getSpokenBoolean($nCount > 0)
+                        . '</boolean>';
+                } else {
+                    $strCode = $this->getHead()
+                        . '  <int>'
+                        . $nCount
+                        . '</int>';
+                }
+                break;
+
+            default:
+                throw new Exception('Unsupported result form: ' . $strResultForm);
+        }
+
+        return $this->wrapCode($strCode);
+    }//public function convertFromDbResults($arRecordSets, Query $query, SparqlEngineDb $engine)
+
+
+
+    protected function wrapCode($strCode)
+    {
+        return <<<EOT
+<?xml version="1.0"?>
+<sparql xmlns="http://www.w3.org/2005/sparql-results#">
+
+EOT
+            . $strCode . "\n"
+            . "</sparql>\n";
+    }//protected function wrapCode($strCode)
+
+
+
+    protected function getHead($strXml = '')
+    {
+        return "  <head>\n"
+            . $strXml
+            . "  </head>\n";
+    }//protected function getHead($strXml = '')
+
+
+
+    protected function createFromRecords($arRecordSets, $strResultForm)
+    {
+        $arResultVars = $this->query->getResultVars();
+
+        if (in_array('*', $arResultVars)) {
+            $arResultVars   = array_keys($this->sg->arVarAssignments);
+        }
+		
+        $strVarXML = '';
+        foreach ($arResultVars as $var) {
+        	$strVarXML .= "    <variable name=\"" . substr((string)$var,1) . "\"/>\n";
+        }
+        
+        $strHeadXml = $this->getHead($strVarXML);
+
+        $arResult = array();
+        foreach ($arRecordSets as $dbRecordSet) {
+            //work around bug in adodb:
+            // ADORecordSet_empty does not implement php5 iterators
+            if ($dbRecordSet->RowCount() <= 0) {
+                
+            	return 
+            		$strHeadXml
+            		. '  <results ordered="'
+                	. self::getSpokenBoolean($arSM['order by'] !== null)
+					. '" distinct="'
+                	. self::getSpokenBoolean($strResultForm == 'select distinct')
+                	. '">' . "\n"
+            		. '    <!-- empty result -->' . PHP_EOL 
+            		. "  </results>\n";
+            }
+
+            foreach ($dbRecordSet as $row) {
+                $arResultRow = array();
+                foreach ($arResultVars as $strVar) {
+                    $strVarName = (string)$strVar;
+                    if (!isset($this->sg->arVarAssignments[$strVarName])) {
+                        //variable is in select, but not in result (test: q-select-2)
+                        $arResultRow[$strVarName] = '';
+                    } else {
+                        $arVarSettings  = $this->sg->arVarAssignments[$strVarName];
+                        $strMethod      = $this->arCreationMethods[$arVarSettings[1]];
+                        $arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar);
+                    }
+                }
+                $arResult[] = $arResultRow;
+            }
+        }
+
+
+        $arSM = $this->query->getSolutionModifier();
+
+        return
+            $strHeadXml
+            . '  <results ordered="'
+                . self::getSpokenBoolean($arSM['order by'] !== null)
+                . '" distinct="'
+                . self::getSpokenBoolean($strResultForm == 'select distinct')
+                . '">' . "\n"
+            . $this->getResultXml($arResult)
+            . "  </results>\n";
+    }//protected function createFromRecords($arRecordSets)
+
+
+
+    protected function getResultXml($arResult)
+    {
+        $strCode = '';
+        foreach ($arResult as $arSet) {
+            $strCode .= "    <result>\n";
+            foreach ($arSet as $strVarName => $strValue) {
+                if ($strValue !== null) {
+                    $strCode .= '      <binding name="' . substr($strVarName,1) . '">'
+                        . $strValue
+                        . "</binding>\n";
+                }
+            }
+            $strCode .= "    </result>\n";
+        }
+        return $strCode;
+    }//protected function getResultXml($arResult)
+
+
+
+    protected static function getSpokenBoolean($b)
+    {
+        return $b ? 'true' : 'false';
+    }//protected static function getSpokenBoolean($b)
+
+
+
+    /**
+    *   Creates an RDF subject object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            return $this->getXmlNull();
+        }
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] == 'r'
+            //null should be predicate which is always a resource
+         || $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']] === null
+        ) {
+            return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        } else {
+            return $this->getXmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+        }
+    }//protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    *   Creates an RDF predicate object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            return $this->getXmlNull();
+        }
+
+        return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+    }//protected function createPredicateFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    /**
+    *   Creates an RDF object object
+    *   contained in the given $dbRecordSet object.
+    *
+    *   @see convertFromDbResult() to understand $strVarBase necessity
+    *
+    *   @param ADORecordSet $dbRecordSet    Record set returned from ADOConnection::Execute()
+    *   @param string       $strVarBase     Prefix of the columns the recordset fields have.
+    *
+    *   @return string HTML code
+    */
+    protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+    {
+        $strVarName = (string)$strVar;
+        if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {
+            return $this->getXmlNull();
+        }
+        switch ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_is']]) {
+            case 'r':
+                return $this->getXmlResource($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            case 'b':
+                return $this->getXmlBlank($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']]);
+                break;
+            default:
+                return $this->getXmlLiteral(
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_lang']],
+                    $dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_type']]
+                );
+        }
+    }//protected function createObjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)
+
+
+
+    protected function getXmlNull()
+    {
+        return null;
+    }//protected function getHtmlNull()
+
+
+
+    protected function getXmlBlank($value)
+    {
+        return '<bnode>' . $value . '</bnode>';
+    }//protected function getHtmlBlank($value)
+
+
+
+    protected function getXmlResource($value)
+    {
+        return '<uri>' . htmlspecialchars($value) . '</uri>';
+    }//protected function getHtmlResource($value)
+
+
+
+    protected function getXmlLiteral($value, $language, $datatype)
+    {
+        $strCode = '<literal';
+        if ($language) {
+            $strCode . ' xml:lang="' . $language . '"';
+        }
+        if ($datatype) {
+            $strCode . ' datatype="' . $datatype . '"';
+        }
+        $strCode .= '>' . htmlspecialchars($value) . '</literal>';
+        return $strCode;
+    }//protected function getHtmlLiteral($value, $language, $datatype)
+
+}//class SparqlEngineDb_ResultRenderer_XML implements SparqlEngineDb_ResultRenderer
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlGenerator.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlGenerator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlGenerator.php	(revision 225)
@@ -0,0 +1,999 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlVariable.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/TypeSorter.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/FilterGenerator.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngineDb/SqlGeneratorException.php';
+
+/**
+*   Creates sql statements from a Query object
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_SqlGenerator
+{
+    public $query = null;
+
+    /**
+    *   Determines which variables can be found
+    *   in which SQL result column.
+    *   @example
+    *   array(
+    *       '?person' => array('t1', 's'),
+    '       '?p'      => array('t1', 'p'),
+    *       '?mbox'   => array('t2', 'o')
+    *   )
+    *   Would express that variable ?person is the subject
+    *   in result table t1, and ?mbox is the object in
+    *   table t2.
+    *
+    *   @see $arCreationMethods
+    *
+    *   @internal The array is created in createSql()
+    *   and used in convertFromDbResult().
+    *
+    *   @var array
+    */
+    public $arVarAssignments = array();
+
+    /**
+    *   Array of variable name => table.col assignments
+    *   for all variables used in the query not only
+    *   the ones that shall be returned.
+    *
+    *   @example
+    *   array(
+    *       '?person'   => 't0.subject'
+    *   )
+    *
+    *   @var array
+    */
+    public $arUsedVarAssignments = array();
+
+    /**
+    *   Array of arrays that contain all variable names
+    *   which are to be found in the result of
+    *   an sql statement in a union.
+    *
+    *   @example
+    *   array(
+    *       0 => array(
+    *           '?person' => 's',
+    *           '?p' => 'o'
+    *       ),
+    *       1 => array(
+    *           '?person' => 's',
+    *           '?mbox' => 'o'
+    *       )
+    *   )
+    *
+    *   @var array
+    */
+    public $arUnionVarAssignments = array();
+
+    /**
+    *   Which variables have been used as which type?
+    *   key is variable name, value is an array of
+    *   max. three keys (s, p, o)
+    *
+    *   @example
+    *   array(
+    *       '?person' => array(
+    *           's' => true
+    *       ),
+    *       '?mbox' => array(
+    *           'o' => true
+    *       )
+    *   )
+    *
+    *   @var array
+    */
+    protected $arUsedVarTypes = array();
+
+    /**
+    *   Array with placeholders of prepared statements variables.
+    *   key is the variable name (without "??"), value is the
+    *   placeholder.
+    *   @var array
+    */
+    protected $arPlaceholders = array();
+
+    /**
+    *   Column names for subjects, predicates and
+    *   objects for easy access via their character
+    *   names (spo).
+    *
+    *   @var array
+    */
+    public static $arTableColumnNames = array(
+        's' => array(
+            'value' => 'subject',
+            'is'    => 'subject_is'
+        ),
+        'p' => array(
+            'value' => 'predicate'
+        ),
+        'o' => array(
+            'value' => 'object',
+            'is'    => 'object_is'
+        )
+    );
+
+    /**
+    *   Current UNION part number
+    *   @var int
+    */
+    protected $nUnionCount = 0;
+
+    protected $nSqlVariableNameCount = 0;
+
+    /**
+    *   Name of the statements table
+    */
+    protected $tblStatements = 'statements';
+
+
+
+    public function __construct(Query $query, ADOConnection $dbConn, $arModelIds)
+    {
+        $this->query      = $query;
+        $this->dbConn     = $dbConn;
+        $this->arModelIds = $arModelIds;
+    }//public function __construct(Query $query, ADOConnection $dbConn, $arModelIds)
+
+
+
+    /**
+    *   Creates an SQL query string from the given Sparql query object.
+    *
+    *   @internal uses $query variable
+    *
+    *   @return array       Array of arrays of SQL query string parts: select, from and where
+    *
+    *   @throws SparqlEngineDb_SqlGeneratorException   If there is no variable in the result set.
+    */
+    function createSql()
+    {
+//var_dump($this->query);
+        $arSelect   = array();
+        $arFrom     = array();
+        $arWhere    = array();
+
+        $strResultForm = $this->query->getResultForm();
+        $filterGen     = new SparqlEngineDb_FilterGenerator($this);
+        switch ($strResultForm) {
+            case 'construct':
+                $arResultVars = $this->query->getConstructPatternVariables();
+                break;
+            default:
+                $arResultVars = $this->query->getResultVars();
+                break;
+        }
+
+        $this->nTableId                 = 0;
+        $this->nGraphPatternCount       = 0;
+        $this->nUnionCount              = 0;
+        $this->nUnionTriplePatternCount = 0;
+        $this->arUnionVarAssignments[0] = array();
+
+        foreach ($this->query->getResultPart() as $graphPattern) {
+            if ($graphPattern->isEmpty()) {
+                continue;
+            }
+            if ($graphPattern->getUnion() !== null) {
+                ++$this->nUnionCount;
+                $this->nTableId                 = 0;
+                $this->nUnionTriplePatternCount = 0;
+                $this->nGraphPatternCount = 0;
+                $this->arUnionVarAssignments[$this->nUnionCount] = array();
+            }
+            $this->nTriplePatternCount = 0;
+            $arTriplePattern = $graphPattern->getTriplePatterns();
+            if ($arTriplePattern != null) {
+                foreach ($arTriplePattern as $triplePattern) {
+                    list (
+                        $arSelect[$this->nUnionCount][],
+                        $arFrom  [$this->nUnionCount][],
+                        $arWhere [$this->nUnionCount][]
+                    ) =
+                        $this->getTripleSql(
+                            $triplePattern,
+                            $graphPattern,
+                            $arResultVars
+                        );
+                    ++$this->nTableId;
+                    ++$this->nTriplePatternCount;
+                    ++$this->nUnionTriplePatternCount;
+                }
+            }
+            ++$this->nGraphPatternCount;
+
+        }
+
+        //constraints extra. needed, since OPTIONAL parts are put after
+        // the current pattern while the constraint already refers to variables
+        // defined in there
+        $this->nGraphPatternCount       = 0;
+        $this->nUnionCount              = 0;
+        foreach ($this->query->getResultPart() as $graphPattern) {
+            if ($graphPattern->getUnion() !== null) {
+                ++$this->nUnionCount;
+            }
+            $arConstraints = $graphPattern->getConstraints();
+            if ($arConstraints != null) {
+                foreach ($arConstraints as $constraint) {
+                    $arWhere[$this->nUnionCount][count($arWhere[$this->nUnionCount]) - 1]
+                     .= $filterGen->createFilterSql(
+                        $constraint->getTree(),
+                        $graphPattern->getOptional() !== null,
+                        $this->nUnionCount
+                    );
+                }
+            }
+            ++$this->nGraphPatternCount;
+        }
+
+        $arSelect    = $this->createEqualSelects($arSelect);
+        $arStrSelect = array();
+
+        switch ($strResultForm) {
+            case 'construct':
+            case 'describe':
+                $strSelectType = 'SELECT';
+            case 'select':
+            case 'select distinct':
+                if (!isset($strSelectType)) {
+                    $strSelectType = $strResultForm;
+                }
+                foreach ($arSelect as $nUnionCount => $arSelectPart) {
+                    $arSelectPart = self::removeNull($arSelectPart);
+                    if (count($arSelectPart) == 0
+                    || (count($arSelectPart) == 1 && $arSelectPart[0] == '')) {
+                        //test "test-1-07" suggests we return no rows in this case
+                        //throw new SparqlEngineDb_SqlGeneratorException('No variable that could be returned.');
+                    } else {
+                        $arStrSelect[$nUnionCount] = strtoupper($strSelectType) . ' ' . implode(', '   , $arSelectPart);
+                    }
+                }
+                break;
+
+            case 'ask':
+            case 'count':
+                $arStrSelect = array('SELECT COUNT(*) as count');
+                break;
+
+            default:
+                throw new SparqlEngineDb_SqlGeneratorException('Unsupported query type "' . $strResultForm . '"');
+                break;
+        }
+
+        $arSqls = array();
+        foreach ($arStrSelect as $nUnionCount => $arSelectPart) {
+            $arSqls[] = array(
+                'select'    => $arStrSelect[$nUnionCount],
+                'from'      => ' FROM '  . implode(' '    , self::removeNull($arFrom[$nUnionCount])),
+                'where'     => ' WHERE ' . self::fixWhere(
+                            implode(' '  , self::removeNull($arWhere[$nUnionCount]))
+                )
+            );
+        }
+        return $arSqls;
+    }//function createSql()
+
+
+
+    /**
+    *   Creates some SQL statements from the given triple pattern
+    *   array.
+    *
+    *   @param QueryTriple  $triple                 Array containing subject, predicate and object
+    *   @param GraphPattern $graphPattern           Graph pattern object
+    *
+    *   @return array   Array consisting of on array and two string values:
+    *                   SELECT, FROM and WHERE part
+    */
+    function getTripleSql(QueryTriple $triple, GraphPattern $graphPattern, $arResultVars)
+    {
+        $arSelect  = array();
+        $strFrom    = null;
+        $strWhere   = null;
+        $strWhereEquality        = '';
+        $bWhereEqualitySubject   = false;
+        $bWhereEqualityPredicate = false;
+        $bWhereEqualityObject    = false;
+
+        $subject    = $triple->getSubject();
+        $predicate  = $triple->getPredicate();
+        $object     = $triple->getObject();
+
+        $arRefVars      = array();
+        $strTablePrefix = 't' . $this->nTableId;
+
+        /**
+        *   SELECT part
+        *   We do select only the columns we need for variables
+        */
+        if (SparqlVariable::isVariable($subject)) {
+            if (isset($this->arUnionVarAssignments[$this->nUnionCount][$subject])) {
+                //already selected -> add equality check
+                $bWhereEqualitySubject = true;
+                $this->arUsedVarTypes[$subject]['s'] = true;
+            } else {
+                if (isset($this->arVarAssignments[$subject][0])) {
+                    $strTablePrefix = $this->arVarAssignments[$subject][0];
+                }
+                $this->arVarAssignments[$subject] = array($strTablePrefix, 's');
+                $this->arUnionVarAssignments[$this->nUnionCount][$subject] = array($strTablePrefix, 's');
+                $this->arUsedVarTypes[$subject]['s'] = true;
+                if (self::isResultVar($subject, $arResultVars)) {
+                    //new variable that needs to be selected
+                    $arSelect[$subject] = $this->createVariableSelectArray(
+                        's', $subject, $strTablePrefix
+                    );
+                    if (isset($this->arUsedVarAssignments[$subject])) {
+                        $arRefVars[$subject] = $strTablePrefix . '.subject';
+                    } else {
+                        $this->arUsedVarAssignments[$subject] = $strTablePrefix . '.subject';
+                    }
+                }
+            }
+        }
+
+        if (SparqlVariable::isVariable($predicate)) {
+            if (isset($this->arUnionVarAssignments[$this->nUnionCount][$predicate])) {
+                //already selected -> add equality check
+                $bWhereEqualityPredicate = true;
+                $this->arUsedVarTypes[$predicate]['p'] = true;
+            } else {
+                if (isset($this->arVarAssignments[$predicate][0])) {
+                    $strTablePrefix = $this->arVarAssignments[$predicate][0];
+                }
+                $this->arVarAssignments[$predicate] = array($strTablePrefix, 'p');
+                $this->arUnionVarAssignments[$this->nUnionCount][$predicate] = array($strTablePrefix, 'p');
+                $this->arUsedVarTypes[$predicate]['p'] = true;
+                if (self::isResultVar($predicate, $arResultVars)) {
+                    $arSelect[$predicate] = $this->createVariableSelectArray(
+                        'p', $predicate, $strTablePrefix
+                    );
+                    if (isset($this->arUsedVarAssignments[$predicate])) {
+                        $arRefVars[$predicate] = $strTablePrefix . '.predicate';
+                    } else {
+                        $this->arUsedVarAssignments[$predicate] = $strTablePrefix . '.predicate';
+                    }
+                }
+            }
+        }
+
+        if (SparqlVariable::isVariable($object)) {
+            if (isset($this->arUnionVarAssignments[$this->nUnionCount][$object])) {
+                //already selected -> add equality check
+                $bWhereEqualityObject = true;
+                $this->arUsedVarTypes[$object]['o'] = true;
+            } else {
+                if (isset($this->arVarAssignments[$object][0])) {
+                    $strTablePrefix = $this->arVarAssignments[$object][0];
+                }
+                $this->arVarAssignments[$object] = array($strTablePrefix, 'o');
+                $this->arUnionVarAssignments[$this->nUnionCount][$object] = array($strTablePrefix, 'o');
+                $this->arUsedVarTypes[$object]['o'] = true;
+                if (self::isResultVar($object, $arResultVars)) {
+                    $arSelect[$object] = $this->createVariableSelectArray(
+                        'o', $object, $strTablePrefix
+                    );
+                    if (isset($this->arUsedVarAssignments[$object])) {
+                        $arRefVars[$object] = $strTablePrefix . '.object';
+                    } else {
+                        $this->arUsedVarAssignments[$object] = $strTablePrefix . '.object';
+                    }
+                }
+                if (isset($this->query->varLanguages[$object])
+                 && $this->query->varLanguages[$object] !== null
+                ) {
+                    $strWhereEquality .=
+                        ' AND ' . $strTablePrefix . '.l_language = "'
+                        . addslashes($this->query->varLanguages[$object]) . '"';
+                }
+                if (isset($this->query->varDatatypes[$object])
+                 && $this->query->varDatatypes[$object] !== null
+                ) {
+                    $strWhereEquality .=
+                        ' AND ' . $strTablePrefix . '.l_datatype = "'
+                        . addslashes($this->query->varDatatypes[$object]) . '"';
+                }
+            }
+        }
+
+        /**
+        * WhereEquality - needs to be done now because strTablePrefix may change
+        */
+        if ($bWhereEqualitySubject) {
+            $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition(
+                            array($strTablePrefix, 's'),
+                            $this->arVarAssignments[$subject]
+                        );
+        }
+        if ($bWhereEqualityPredicate) {
+            $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition(
+                            array($strTablePrefix, 'p'),
+                            $this->arVarAssignments[$predicate]
+                        );
+        }
+        if ($bWhereEqualityObject) {
+            $strWhereEquality .= ' AND ' . self::getSqlEqualityCondition(
+                            array($strTablePrefix, 'o'),
+                            $this->arVarAssignments[$object]
+                        );
+        }
+
+
+        /**
+        *   FROM part
+        */
+        if ($this->nUnionTriplePatternCount == 0) {
+            //first FROM
+            $strFrom    = $this->tblStatements . ' as ' . $strTablePrefix;
+        } else {
+            //normal join
+            if (count($this->arModelIds) == 1) {
+                $strFrom    = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix
+                            . ' ON t0.modelID = ' . $strTablePrefix . '.modelID';
+            } else if (count($this->arModelIds) > 1) {
+                $arIDs     = array();
+                foreach ($this->arModelIds as $nId) {
+                    $arIDs[] = $strTablePrefix . '.modelID = ' . intval($nId);
+                }
+                $strFrom  = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix
+                          . ' ON (' . implode(' OR ', $arIDs) . ')';
+            } else {
+                $strFrom    = 'LEFT JOIN ' . $this->tblStatements . ' as ' . $strTablePrefix
+                            . ' ON t0.modelID = ' . $strTablePrefix . '.modelID';
+            }
+
+            foreach ($arRefVars as $strRefVar => $strSqlVar) {
+                $strFrom .= ' AND ' . $this->arUsedVarAssignments[$strRefVar] . ' = ' . $strSqlVar;
+            }
+
+            if ($graphPattern->getOptional() !== null) {
+                $strFrom .=  $this->getSqlCondition($subject  , $strTablePrefix, 'subject')
+                           . $this->getSqlCondition($predicate, $strTablePrefix, 'predicate')
+                           . $this->getSqlCondition($object   , $strTablePrefix, 'object')
+                           . $strWhereEquality;
+            }
+        }
+
+
+        /**
+        *   WHERE part
+        */
+        if ($this->nUnionTriplePatternCount == 0) {
+            if (count($this->arModelIds) == 1) {
+                $strWhere  = $strTablePrefix . '.modelID = ' . intval(reset($this->arModelIds));
+            } else if (count($this->arModelIds) > 1) {
+                $arIDs     = array();
+                foreach ($this->arModelIds as $nId) {
+                    $arIDs[] = $strTablePrefix . '.modelID = ' . intval($nId);
+                }
+                $strWhere  = '(' . implode(' OR ', $arIDs) . ')';
+            } else {
+                //so that we can append an AND
+                $strWhere = '1';
+            }
+        }
+        if ($graphPattern->getOptional() === null || $this->nGraphPatternCount == 0) {
+            $strWhere .=  $this->getSqlCondition($subject  , $strTablePrefix, 'subject')
+                        . $this->getSqlCondition($predicate, $strTablePrefix, 'predicate')
+                        . $this->getSqlCondition($object   , $strTablePrefix, 'object')
+                        . $strWhereEquality;
+        }
+
+        return array($arSelect, $strFrom, $strWhere);
+    }//function getTripleSql(QueryTriple $triple)
+
+
+
+
+    protected function createVariableSelectArray($chType, $varname, $strTablePrefix)
+    {
+        $var = $this->query->getResultVar($varname);
+        if ($var !== false) {
+            if ((string)$var != $varname) {
+                //copy over var assignments
+                $this->arVarAssignments[(string)$var] = $this->arVarAssignments[$varname];
+            }
+
+            //works on non-* only
+            $func = $var->getFunc();
+            if ($func != null) {
+                if ($func == 'datatype') {
+                    if ($chType != 'o') {
+                        throw new SparqlEngineDb_SqlGeneratorException(
+                            'datatype() works on objects only'
+                        );
+                    }
+                    return array(
+                        $strTablePrefix . '.l_datatype as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($var) . '"',
+                        '"r"' .                      ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($var) . '"',
+                        '""' .                       ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($var) . '"',
+                        '""' .                       ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($var) . '"',
+                    );
+                } else if ($func == 'lang') {
+                    if ($chType != 'o') {
+                        throw new SparqlEngineDb_SqlGeneratorException(
+                            'lang() works on objects only'
+                        );
+                    }
+                    return array(
+                        $strTablePrefix . '.l_language as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($var) . '"',
+                        '"l"' .                      ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($var) . '"',
+                        '""' .                       ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($var) . '"',
+                        '""' .                       ' as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($var) . '"',
+                    );
+                } else {
+                    throw new SparqlEngineDb_SqlGeneratorException(
+                        'Unsupported function for select "' . $func . '"'
+                    );
+                }
+            }
+        }
+
+        switch ($chType) {
+            case 's':
+                return array(
+                    $strTablePrefix . '.subject as "'    . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"',
+                    $strTablePrefix . '.subject_is as "' . $strTablePrefix . '.' . $this->getSqlVariableNameIs($varname) . '"'
+                );
+            case 'p':
+                return array(
+                    $strTablePrefix . '.predicate as "' . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"'
+                );
+            case 'o':
+                return array(
+                    $strTablePrefix . '.object as "'     . $strTablePrefix . '.' . $this->getSqlVariableNameValue($varname) . '"',
+                    $strTablePrefix . '.object_is as "'  . $strTablePrefix . '.' . $this->getSqlVariableNameIs($varname) . '"',
+                    $strTablePrefix . '.l_language as "' . $strTablePrefix . '.' . $this->getSqlVariableNameLanguage($varname) . '"',
+                    $strTablePrefix . '.l_datatype as "' . $strTablePrefix . '.' . $this->getSqlVariableNameDatatype($varname) . '"',
+                );
+            default:
+                throw new SparqlEngineDb_SqlGeneratorException(
+                    'Unknown sentence type "' . $chType . "', one of (s,p,o) expected"
+                );
+        }
+    }//protected function createVariableSelectArray($chType, $value, $strTablePrefix)
+
+
+
+    /**
+    *   Creates SELECT statements that have the same number of columns.
+    *   Needed for UNIONs.
+    *
+    *   @param array $arSelect  Array of arrays.
+    *       array(
+    *           //for each union part one
+    *           0 => array(
+    *               //foreach triple pattern
+    *               0 => array(
+    *                   '?person'   => array(
+    *                       't0.subject as "t0.subject"'
+    *                   )
+    *               )
+    *           )
+    *       )
+    *   @return array Array of SELECT strings
+    */
+    protected function createEqualSelects($arSelect)
+    {
+        $arNewSelect = array();
+        if (count($arSelect) == 1) {
+            if ($arSelect[0] == array(array())) {
+                //ASK and COUNT
+                return array(array(''));
+            }
+
+            foreach ($arSelect[0] as $arTripleVars) {
+                $ar = array();
+                foreach ($arTripleVars as $arVarParts) {
+                    $ar[] = implode(', ', $arVarParts);
+                }
+                if (count($ar) > 0) {
+                    $arNewSelect[0][] = implode(', ', $ar);
+                }
+            }
+            return $arNewSelect;
+        }
+
+        $arVars = array();
+         foreach ($arSelect as $arUnionVars) {
+            foreach ($arUnionVars as $arTripleVars) {
+                $arVars = array_merge($arVars, array_keys($arTripleVars));
+            }
+        }
+        $arVars = array_unique($arVars);
+
+        foreach ($arSelect as $nUnionCount => $arUnionVars) {
+            $arSelectVars = array();
+            foreach ($arUnionVars as $arTripleVars) {
+                foreach ($arTripleVars as $strVar => $arVarParts) {
+                    $arSelectVars[$strVar] = $arVarParts;
+                }
+            }
+
+            $ars = array();
+            foreach ($arVars as $strVar) {
+                if (isset($arSelectVars[$strVar])) {
+                    $ar     = $arSelectVars[$strVar];
+                    $nCount = count($arSelectVars[$strVar]);
+                } else {
+                    $ar     = array();
+                    $nCount = 0;
+                }
+
+                if ($nCount == 0) {
+                    //nothing of this variable in this union part
+                    $ar[] = 'NULL as '
+                        . '"' . $this->arVarAssignments[$strVar][0] . '.' . $this->arVarAssignments[$strVar]['sql_value'] . '"';
+                }
+                if ((
+                    isset($this->arUsedVarTypes[$strVar]['o'])
+                    || isset($this->arUsedVarTypes[$strVar]['s'])
+                    ) && $nCount < 2
+                ) {
+                    //it's a subject or object, but we don't want the type
+                    $ar[] = 'NULL as '
+                        . '"' . $this->arVarAssignments[$strVar][0] . '.' . $this->arVarAssignments[$strVar]['sql_is'] . '"';
+                }
+                if (isset($this->arUsedVarTypes[$strVar]['o']) && $nCount < 4) {
+                    //it's a subject or object, but we don't want the type
+                    if (isset($this->arVarAssignments[$strVar]['sql_lang'])) {
+                        $strColLanguage = $this->arVarAssignments[$strVar]['sql_lang'];
+                    } else {
+                        $strColLanguage = 'dummyLang';
+                    }
+                    if (isset($this->arVarAssignments[$strVar]['sql_type'])) {
+                        $strColDatatype = $this->arVarAssignments[$strVar]['sql_type'];
+                    } else {
+                        $strColDatatype = 'dummyType';
+                    }
+                    $ar[] = 'NULL as '
+                        . '"' . $this->arVarAssignments[$strVar][0] . '.' . $strColLanguage . '"';
+                    $ar[] = 'NULL as '
+                        . '"' . $this->arVarAssignments[$strVar][0] . '.' . $strColDatatype . '"';
+                }
+                $ars[] = implode(', ', $ar);
+            }
+            $arNewSelect[$nUnionCount] = $ars;
+        }
+
+        return $arNewSelect;
+    }//protected function createEqualSelects($arSelect)
+
+
+
+    /**
+    *   Creates an SQL statement that checks for the value
+    *   of some subject/predicate/object
+    *
+    *   @param mixed    $bject          subject|predicate|object
+    *   @param string   $strTablePrefix Table prefix (e.g. "t0")
+    *   @param string   $strType        Type of $bject ('subject'|'predicate'|'object')
+    *   @return string  Part of the SQL query (prefixed with AND)
+    */
+    function getSqlCondition($bject, $strTablePrefix, $strType)
+    {
+        if (is_string($bject)) {
+            if (SparqlVariable::isVariable($bject)) {
+                //variable?
+                if (self::isPreparedVariable($bject)) {
+                    //no, not really
+                    $value = $this->getPreparedVariablePlaceholder($bject);
+                } else {
+                    //yes
+                    return null;
+                }
+            } else {
+                $value = $this->dbConn->qstr($bject);
+            }
+            //literal
+            return ' AND ' . $strTablePrefix . '.' . $strType . ' = ' . $value;
+        }
+
+        if ($bject instanceof BlankNode) {
+            //Blank node
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'FIXME: Querying for blank nodes not supported'
+            );
+
+        } else if ($bject instanceof Resource) {
+            //Resource
+            $r = ' AND ' . $strTablePrefix . '.' . $strType . ' = '
+                . $this->dbConn->qstr($bject->getURI());
+            if ($strType !== 'predicate') {
+                $r .= ' AND ' . $strTablePrefix . '.' . $strType . '_is ='
+                . ' "r"';
+            }
+            return $r;
+
+        } else if ($bject instanceof Literal) {
+            //Literal
+            //I'm doubling Filter code here, but what the hell
+            $strColDatatype = $strTablePrefix . '.l_datatype';
+            if ($bject->dtype == 'http://www.w3.org/2001/XMLSchema#integer'
+             || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#double'
+            ) {
+                $strVariable = 'CAST(' . $strTablePrefix . '.' . $strType . ' AS DECIMAL(15,10))';
+                $strValue    = $bject->getLabel();
+            } else {
+                $strVariable = $strTablePrefix . '.' . $strType;
+                $strValue    = $this->dbConn->qstr($bject->getLabel());
+            }
+            $r = ' AND ' . $strVariable . ' = ' . $strValue;
+            if ($strType !== 'predicate') {
+                $r .= ' AND ' . $strTablePrefix . '.' . $strType . '_is ='
+                . ' "l"';
+            }
+
+            if ($strType == 'object') {
+                if ($bject->dtype == '' || $bject->dtype == 'http://www.w3.org/2001/XMLSchema#string') {
+                    //string
+                    $r .= ' AND ('
+                        . $strColDatatype . ' = ""'
+                        . ' OR ' . $strColDatatype . ' = "http://www.w3.org/2001/XMLSchema#string"'
+                        . ')';
+                } else {
+                    $r .= ' AND ' . $strColDatatype . ' = "'
+                        . $bject->dtype
+                        . '"';
+                }
+            }
+
+            if ($bject->lang != '') {
+                $strColLanguage = $strTablePrefix . '.l_language';
+                $r .= ' AND ' . $strColLanguage . ' = '
+                   . $this->dbConn->qstr($bject->lang);
+            }
+            return $r;
+
+        } else {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'Unsupported sentence part: ' . get_class($bject)
+            );
+        }
+    }//function getSqlCondition($bject, $strTablePrefix, $strType)
+
+
+
+    /**
+    *   Checks if the sentence part (subject, predicate or object) in
+    *   $arNew has the same content as $arOld.
+    *   Required for queries like ":x ?a ?a" where predicate and object
+    *   need to have the same value
+    *
+    *   @param array    $arNew  array($strTablePrefix, $strType = s|p|o)
+    *   @param array    $arOld  array($strTablePrefix, $strType = s|p|o)
+    *   @return string
+    */
+    protected static function getSqlEqualityCondition($arNew, $arOld)
+    {
+        $chTypeNew         = $arNew[1]; $chTypeOld         = $arOld[1];
+        $strTablePrefixNew = $arNew[0]; $strTablePrefixOld = $arOld[0];
+
+        if ($chTypeNew == 'p' || $chTypeOld == 'p') {
+            //just check value
+            //FIXME: it might be I need to check for resource type in object and subject
+            return
+                  $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['value']
+                . ' = '
+                . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['value']
+                ;
+        } else if ($chTypeNew == 's' || $chTypeOld == 's') {
+            //check value and type
+            return
+                  $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['value']
+                . ' = '
+                . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['value']
+                . ' AND '
+                . $strTablePrefixNew . '.' . self::$arTableColumnNames[$chTypeNew]['is']
+                . ' = '
+                . $strTablePrefixOld . '.' . self::$arTableColumnNames[$chTypeOld]['is']
+                ;
+        } else {
+            //two objects -> check everything
+            return
+                  $strTablePrefixNew . '.object = '     . $strTablePrefixOld . '.object'
+                . ' AND '
+                . $strTablePrefixNew . '.object_is = '  . $strTablePrefixOld . '.object_is'
+                . ' AND '
+                . $strTablePrefixNew . '.l_language = ' . $strTablePrefixOld . '.l_language'
+                . ' AND '
+                . $strTablePrefixNew . '.l_datatype = ' . $strTablePrefixOld . '.l_datatype'
+                ;
+        }
+    }//protected static function getSqlEqualityCondition($arNew, $arOld)
+
+
+
+    /**
+    *   Checks if the given variable name is part of the result
+    *   variables list.
+    *   Needed since $arResultVars may contain "*" that captures all variables.
+    *
+    *   @param string   $strVar         Variable name (e.g. "?p")
+    *   @param array    $arResultVars   Array with result variables
+    *   @return boolean     true if it is a result variable
+    */
+    protected static function isResultVar($strVar, &$arResultVars)
+    {
+        foreach ($arResultVars as $var) {
+            if ($var == '*') {
+                return true;
+            } else if ((is_string($var) && $var == $strVar)
+                || (is_object($var) && $var->getVariable() == $strVar)) {
+                return true;
+            }
+        }
+        return false;
+    }//protected static function isResultVar($strVar, &$arResultVars)
+
+
+
+    /**
+    *   Checks if the given variable is a replacement
+    *   for a prepared statement.
+    *
+    *   @return boolean
+    */
+    public static function isPreparedVariable($bject)
+    {
+        return is_string($bject) && strlen($bject) >= 3
+             && ($bject[0] == '?' || $bject[0] == '$')
+             && ($bject[1] == '?' || $bject[1] == '$')
+        ;
+    }//public static function isPreparedVariable($bject)
+
+
+
+    /**
+    *   Returns a placeholder to be included in the sql statement.
+    *   It will be replaced with a real prepared statement variable later on.
+    *   Also adds it to the internal placeholder array.
+    *
+    *   @param string $strVariable  The variable to get a placeholder for
+    *   @return string placeholder
+    */
+    protected function getPreparedVariablePlaceholder($strVariable)
+    {
+        $strName = substr($strVariable, 2);
+        if (!isset($this->arPlaceholders[$strName])) {
+            $this->arPlaceholders[$strName] = '@$%_PLACEHOLDER_'
+                . count($this->arPlaceholders) . '_%$@';
+        }
+        return $this->arPlaceholders[$strName];
+    }//protected function getPreparedVariablePlaceholder($strVariable)
+
+
+
+    public function getPlaceholders()
+    {
+        return $this->arPlaceholders;
+    }//public function getPlaceholders()
+
+
+
+    public function getVarAssignments()
+    {
+        return $this->arVarAssignments;
+    }//public function getVarAssignments()
+
+
+
+    public function getUsedVarAssignments()
+    {
+        return $this->arUsedVarAssignments;
+    }//public function getUsedVarAssignments()
+
+
+
+    public function getUsedVarTypes()
+    {
+        return $this->arUsedVarTypes;
+    }//public function getUsedVarTypes()
+
+
+
+    /**
+    *   Removes all NULL values from an array and returns it.
+    *
+    *   @param array $array     Some array
+    *   @return array $array without the NULL values.
+    */
+    protected static function removeNull($array)
+    {
+        foreach ($array as $key => &$value) {
+            if ($value === null) {
+                unset($array[$key]);
+            }
+        }
+        return $array;
+    }//protected static function removeNull($array)
+
+
+
+    /**
+    *   Removes a leading AND from the where clause which would render
+    *   the sql illegal.
+    */
+    protected function fixWhere($strWhere)
+    {
+        $strWhere = ltrim($strWhere);
+        if (substr($strWhere, 0, 4) == 'AND ') {
+            $strWhere = substr($strWhere, 4);
+        }
+        return $strWhere;
+    }//protected function fixWhere($strWhere)
+
+
+
+    protected function getSqlVariableName($var)
+    {
+        $strSparqlVar = (string)$var;
+        if (!isset($this->arVarAssignments[$strSparqlVar]['sqlname'])) {
+            if (preg_match('/[a-zA-Z0-9]+/', substr($strSparqlVar, 1))) {
+                $strName = 'v_' . substr($strSparqlVar, 1);
+            } else {
+                $strName = 'va_' . $this->nSqlVariableNameCount++;
+            }
+            $this->arVarAssignments[$strSparqlVar]['sqlname'] = $strName;
+        }
+        return $this->arVarAssignments[$strSparqlVar]['sqlname'];
+    }//protected function getSqlVariableName($var)
+
+
+
+    protected function getSqlVariableNameValue($var)
+    {
+        $strSparqlVar = (string)$var;
+        $this->arVarAssignments[$strSparqlVar]['sql_value'] =
+            'value_' . $this->getSqlVariableName($var);
+        return $this->arVarAssignments[$strSparqlVar]['sql_value'];
+    }//protected function getSqlVariableNameValue($var)
+
+
+
+    protected function getSqlVariableNameIs($var)
+    {
+        $strSparqlVar = (string)$var;
+        $this->arVarAssignments[$strSparqlVar]['sql_is'] =
+            'is_' . $this->getSqlVariableName($var);
+        return $this->arVarAssignments[$strSparqlVar]['sql_is'];
+    }//protected function getSqlVariableNameIs($var)
+
+
+
+    protected function getSqlVariableNameLanguage($var)
+    {
+        $strSparqlVar = (string)$var;
+        $this->arVarAssignments[$strSparqlVar]['sql_lang'] =
+            'lang_' . $this->getSqlVariableName($var);
+        return $this->arVarAssignments[$strSparqlVar]['sql_lang'];
+    }//protected function getSqlVariableNameLanguage($var)
+
+
+
+    protected function getSqlVariableNameDatatype($var)
+    {
+        $strSparqlVar = (string)$var;
+        $this->arVarAssignments[$strSparqlVar]['sql_type'] =
+            'type_' . $this->getSqlVariableName($var);
+        return $this->arVarAssignments[$strSparqlVar]['sql_type'];
+    }//protected function getSqlVariableNameDatatype($var)
+
+
+
+    public function setStatementsTable($tblStatements)
+    {
+        $this->tblStatements = $tblStatements;
+    }//public function setStatementsTable($tblStatements)
+
+}//class SparqlEngineDb_SqlGenerator
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlGeneratorException.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlGeneratorException.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlGeneratorException.php	(revision 225)
@@ -0,0 +1,14 @@
+<?php
+/**
+*   Exception when generating the SQL statement
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_SqlGeneratorException extends Exception
+{
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlMerger.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlMerger.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/SqlMerger.php	(revision 225)
@@ -0,0 +1,46 @@
+<?php
+
+/**
+*   Creates an sql string from an sql array
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_SqlMerger
+{
+    public static function getSelect(Query $query, $arSqls, $strAdditional = '')
+    {
+        if (count($arSqls) == 1) {
+            return implode('', $arSqls[0]) . $strAdditional;
+        }
+
+        //union
+        $strUnion = 'UNION' .
+            ($query->getResultForm() == 'select distinct' ? '' : ' ALL');
+        $ar = array();
+        foreach ($arSqls as $arSql) {
+            $ar[] = implode('', $arSql) . $strAdditional;
+        }
+        return '(' . implode(') ' . $strUnion . ' (', $ar) . ')';
+    }//public static function getSelect(Query $query, $arSqls, $strAdditional = '')
+
+
+
+    public static function getCount(Query $query, $arSqls, $strAdditional = '')
+    {
+        if (count($arSqls) == 1) {
+            return 'SELECT COUNT(*) as count ' . $arSqls[0]['from'] . $arSqls[0]['where'] . $strAdditional;
+        }
+
+        $ar = array();
+        foreach ($arSqls as $arSql) {
+            $ar[] = implode('', $arSql) . $strAdditional;
+        }
+        return 'SELECT (' . implode(') + (', $ar) . ') as count';
+    }//public static function getCount(Query $query, $arSqls, $strAdditional = '')
+
+}//class SparqlEngineDb_SqlMerger
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/TypeSorter.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/TypeSorter.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlEngineDb/TypeSorter.php	(revision 225)
@@ -0,0 +1,450 @@
+<?php
+/**
+*   Sorts database types as the Sparql specs want it.
+*
+*   @author Christian Weiske <cweiske@cweiske.de>
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+*   @package sparql
+*/
+class SparqlEngineDb_TypeSorter
+{
+    /**
+    *   Defines the sort order for value types in the database,
+    *   so that they get sorted correctly as the specs want it.
+    *   @var array
+    */
+    public static $arTypeNumbers = array(
+        null    => 0,//empty
+        'b'     => 1,//blank
+        'r'     => 2,//resource
+        'l'     => 3,//literal
+    );
+
+    /**
+    *   SQL types to cast XSD schema types to, so that they will get
+    *   sorted correctly.
+    *   @var array
+    */
+    public static $arCastTypes = array(
+        'http://www.w3.org/2001/XMLSchema#integer'  => 'SIGNED INTEGER',
+        'http://www.w3.org/2001/XMLSchema#decimal'  => 'DECIMAL',
+        //yes, this does not work with multiple time zones.
+        'http://www.w3.org/2001/XMLSchema#dateTime' => 'CHAR',
+        'http://www.w3.org/2001/XMLSchema#date'     => 'CHAR',
+    );
+
+
+
+    public function __construct(Query $query, ADOConnection $dbConn)
+    {
+        $this->dbConn   = $dbConn;
+        $this->query    = $query;
+    }
+
+
+    /**
+    *   Needs to be executed before getOrderifiedSqls and willBeDataDependent
+    *
+    *   @param SparqlEngineDb_SqlGenerator $sg  SQL generator object
+    */
+    public function setData(SparqlEngineDb_SqlGenerator $sg)
+    {
+        $this->arUsedVarTypes       = $sg->getUsedVarTypes();
+        $this->arUsedVarAssignments = $sg->getUsedVarAssignments();
+        $this->arVarAssignments     = $sg->getVarAssignments();
+    }//public function setData(SparqlEngineDb_SqlGenerator $sg)
+
+
+
+    /**
+    *   Returns an array of sql statements that need to be executed
+    *   and deliver the full result set when combined.
+    *
+    *   Execute setData() before this.
+    *
+    *   @internal It is not possible (ok, it is - but it would really complicate
+    *   the queries and the code here) to use UNION to combine the sqls to
+    *   a single one - UNION merges the results and does not keep the order
+    *   of the rows. Citing the mysql manual:
+    *       Use of ORDER BY for individual SELECT statements implies nothing
+    *       about the order in which the rows appear in the final result because
+    *       UNION by default produces an unordered set of rows. If ORDER BY
+    *       appears with LIMIT, it is used to determine the subset of the
+    *       selected rows to retrieve for the SELECT, but does not necessarily
+    *       affect the order of those rows in the final UNION result.
+    *       If ORDER BY appears without LIMIT in a SELECT, it is
+    *       optimized away because it will have no effect anyway.
+    *
+    *   @param string $strSelect    SELECT clause
+    *   @param string $strFrom      FROM clause
+    *   @param string $strWhere     WHERE clause
+    *   @return array   Array of arrays. Imploding an array will give
+    *                    a complete sql statement. The array will have the keys
+    *                    select/from/where/order.
+    */
+    public function getOrderifiedSqls($arSqls)
+    {
+        if (count($arSqls) == 0) {
+            return $arSqls;
+        }
+
+        $strSelect = $arSqls[0]['select'];
+        $strFrom   = $arSqls[0]['from'];
+        $strWhere  = $arSqls[0]['where'];
+
+        $strResultForm = $this->query->getResultForm();
+        if ($strResultForm == 'ask' || $strResultForm == 'count') {
+            return array(
+                $arSqls
+            );
+        }
+
+        $arSpecial = $this->getSpecialOrderVariables();
+        if (count($arSpecial) == 0) {
+            $strOrder = $this->getSqlOrderBy();
+            foreach ($arSqls as &$arSql) {
+                $arSql['order'] = $strOrder;
+            }
+            return array(
+                $arSqls
+            );
+        }
+
+        $arTypeSets = $this->orderTypeSets(
+            $this->getTypeSets($arSpecial, $strFrom, $strWhere)
+        );
+
+        $arNewSqls = array();
+        foreach ($arTypeSets as $arTypeSet) {
+            $arSqlParts = array();
+            foreach ($arSqls as $arSql) {
+                $arSql['where'] .= $this->getTypesetWhereClause($arTypeSet);
+                $arSql['order']  = $this->getSqlOrderBy($arTypeSet);
+                $arSqlParts[] = $arSql;
+            }
+            $arNewSqls[] = $arSqlParts;
+        }
+
+        return $arNewSqls;
+    }//public function getOrderifiedSqls($arUsedVarAssignments, $strSelect, $strFrom, $strWhere)
+
+
+
+    /**
+    *   Returns wether the returned queries will depend on the data or not.
+    *   If the queries depend on the data, they cannot be prepare()d and
+    *   thus won't be that fast when executing.
+    *
+    *   Execute setData() before this.
+    *
+    *   @return boolean
+    */
+    public function willBeDataDependent()
+    {
+        $strResultForm = $this->query->getResultForm();
+        return !(
+            $strResultForm == 'ask' || $strResultForm == 'count'
+            || count($this->getSpecialOrderVariables()) == 0
+        );
+    }//public function willBeDataDependent()
+
+
+
+    /**
+    *   Returns an array of variables that the result is going to be
+    *   ordered by and that need to be sorted multiple times
+    *   (because they may contain different data types)
+    *
+    *   @return array Array of sparql variable names
+    */
+    protected function getSpecialOrderVariables()
+    {
+        $arSM = $this->query->getSolutionModifier();
+        if ($arSM['order by'] === null) {
+            return array();
+        }
+
+        $arSpecial = array();
+        foreach ($arSM['order by'] as $arVar) {
+            if ($this->isSpecialOrderVariable($arVar['val'])) {
+                $arSpecial[] = $arVar['val'];
+            }
+        }
+        return $arSpecial;
+    }//protected function getSpecialOrderVariables()
+
+
+
+    /**
+    *   Checks if a given variable name is a variable that
+    *   needs special care when used in ORDER BY statements.
+    *
+    *   @param string $strVar SPARQL variable name
+    *   @return boolean true if the variable needs special care
+    */
+    protected function isSpecialOrderVariable($strVar)
+    {
+        return !isset($this->arUsedVarTypes[$strVar]['s'])
+            && !isset($this->arUsedVarTypes[$strVar]['p']);
+    }//protected function isSpecialOrderVariable($arVar)
+
+
+
+    /**
+    *   Determines the type sets in the query results.
+    *   A type set is a distinct set of variables and their types,
+    *   e.g. the variable and its type (r/b/l) and its datatype
+    *   if its an object.
+    *
+    *   @param array $arSpecialVars     Special variables as returned by
+    *                                   getSpecialOrderVariables()
+    *   @param string $strFrom          FROM part of the sql query
+    *   @param string $strWhere         WHERE part of the sql query
+    *
+    *   @return array   Key is the sparql variable name, value is an
+    *                   array. This one has one key 'type' with a
+    *                   value of b/l/r. It might have another key
+    *                   'datatype' with the resource's datatype.
+    */
+    protected function getTypeSets($arSpecialVars, $strFrom, $strWhere)
+    {
+        $arSel = array();
+        foreach ($arSpecialVars as $strSparqlVar) {
+            if ($this->arVarAssignments[$strSparqlVar][1] == 'o') {
+                $arSel[] = $this->arVarAssignments[$strSparqlVar][0] . '.l_datatype'
+                    . ' as "' . $strSparqlVar . '-datatype"';
+            }
+            $strTypeCol = $this->arVarAssignments[$strSparqlVar][1] == 'o'
+                ? 'object_is' : 'subject_is';
+            $this->arVarAssignments[$strSparqlVar][2] = $strTypeCol;
+            $arSel[] = $this->arVarAssignments[$strSparqlVar][0] . '.' . $strTypeCol
+                . ' as "' . $strSparqlVar . '-type"';
+        }
+
+        $oldmode  = $this->dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
+        $sql      = 'SELECT DISTINCT ' . implode(', ', $arSel) . ' ' . $strFrom . $strWhere;
+        $arResult = $this->dbConn->execute($sql);
+        $this->dbConn->SetFetchMode($oldmode);
+
+        if ($arResult === false) {
+            throw new SparqlEngineDb_SqlGeneratorException(
+                'Error reading typesets: ' . $sql
+            );
+        }
+
+        $arTypes = array();
+        foreach ($arResult as $arRow) {
+            $nLine = count($arTypes);
+            foreach ($arRow as $key => $value) {
+                list($strSparqlVar, $strType) = explode('-', $key);
+                $arTypes[$nLine][$strSparqlVar][$strType] = $value;
+            }
+        }
+
+        return $arTypes;
+    }//protected function getTypeSets($arSpecialVars, $strFrom, $strWhere)
+
+
+
+    /**
+    *   Takes an array of type sets (as returned by getTypeSets()) and
+    *   sorts the variables according to the SPARQL specs.
+    *
+    *   @param array $arTypes Array of type sets
+    *   @return array Ordered array of type sets
+    */
+    protected function orderTypeSets($arTypes)
+    {
+        $arSM = $this->query->getSolutionModifier();
+        if ($arSM['order by'] !== null) {
+            $this->arDirection = array();
+            foreach ($arSM['order by'] as $arVar) {
+                $this->arDirection[$arVar['val']] =
+                    (strtoupper($arVar['type']) == 'ASC' ? 1 : -1);
+            }
+        }
+
+        usort($arTypes, array($this, 'compareTypeSet'));
+
+        return $arTypes;
+    }//protected function orderTypeSets($arTypes)
+
+
+
+    /**
+    *   Compares two type sets. Works like a normal comparision
+    *   method that returns -1/0/1 for use in usort()
+    *
+    *   @param array $arTs1     First typeset
+    *   @param array $arTs2     Second typeset
+    *   @return int Comparison value
+    */
+    public function compareTypeSet($arTs1, $arTs2)
+    {
+        foreach ($arTs1 as $strSparqlVar => $arType1) {
+            //compare types
+            $n = self::$arTypeNumbers[$arType1['type']]
+                - self::$arTypeNumbers[$arTs2[$strSparqlVar]['type']];
+            if ($n != 0) {
+                //and take ASC/DESC into account
+                return $n * $this->arDirection[$strSparqlVar];
+            }
+
+            //compare the datatypes
+            $n = self::compareXsdType(
+                $arType1['datatype'],
+                $arTs2[$strSparqlVar]['datatype']
+            );
+            //if they are not equal, return the value
+            if ($n != 0) {
+                //and take ASC/DESC into account
+                return $n * $this->arDirection[$strSparqlVar];
+            }
+        }
+
+        //they are equal
+        return 0;
+    }//public function compareTypeSet($arTs1, $arTs2)
+
+
+
+    /**
+    *   Compares two XSD data types and returns the comparison number.
+    *
+    *   @param string $strType1     First data type
+    *   @param string $strType2     Second data type
+    *   @return int     Comparison number (<0 if $strType1 is less than
+    *                   $strType2, 0 if equal, >0 if type2 is greater)
+    */
+    public static function compareXsdType($strType1, $strType2)
+    {
+        return self::getXsdTypeNumber($strType1) - self::getXsdTypeNumber($strType2);
+    }//public static function compareXsdType($strType1, $strType2)
+
+
+
+    /**
+    *   Returns the type number for an xsd data type.
+    *
+    *   @param string $strType  XSD data type
+    *   @return int  Some integer to compare two types.
+    */
+    public static function getXsdTypeNumber($strType)
+    {
+        if ($strType === null) {
+            return 0;
+        } else if ($strType == '') {
+            return 1;
+        } else {
+            return 2;
+        }
+    }//public static function getXsdTypeNumber($strType)
+
+
+
+    /**
+    *   Returns the ORDER BY sql query string
+    *   if neccessary for the query. The returned string
+    *   already has ORDER BY prefixed.
+    *
+    *   @internal Also takes care of casting the data if the type
+    *   is listed in $arCastTypes. See getCastMethod() for more info.
+    *
+    *   @param arrray $arTypeSet Single typeset
+    *   @return string      ORDER BY ... string or empty string
+    */
+    function getSqlOrderBy($arTypeSet = array())
+    {
+        $arSM = $this->query->getSolutionModifier();
+        if ($arSM['order by'] === null) {
+            return '';
+        }
+
+        $sqlOrder = array();
+        foreach ($arSM['order by'] as $arVar) {
+            $strSparqlVar = $arVar['val'];
+            if (isset($this->arUsedVarAssignments[$strSparqlVar])) {
+                if (!isset($arTypeSet[$strSparqlVar]['datatype'])
+                  || $arTypeSet[$strSparqlVar]['datatype'] == '') {
+                    $sqlOrder[] = $this->arUsedVarAssignments[$strSparqlVar] . ' ' . strtoupper($arVar['type']);
+                } else {
+                    $sqlOrder[] = self::getCastMethod(
+                        $arTypeSet[$strSparqlVar]['datatype'],
+                        $this->arUsedVarAssignments[$strSparqlVar]
+                    ) . ' ' . strtoupper($arVar['type']);
+                }
+            }
+        }
+
+        return ' ORDER BY ' . implode(', ', $sqlOrder);
+    }//function getSqlOrderBy($arTypeSet = array())
+
+
+
+    /**
+    *   Returns the SQL statement needed to case the given variable to
+    *   the given type.
+    *
+    *   @param string $strType      XML data type
+    *   @param string $strSqlVar    SQL variable name
+    *   @return string  SQL command to cast the variable
+    */
+    protected static function getCastMethod($strType, $strSqlVar)
+    {
+        if (isset(self::$arCastTypes[$strType])) {
+            return 'CAST(' . $strSqlVar . ' as ' . self::$arCastTypes[$strType] . ')';
+        } else {
+            //unsupported type!
+            throw new Exception('Unsupported cast type in order by: ' . $strType);
+            return $strSqlVar;
+        }
+    }//protected static function getCastMethod($strType, $strSqlVar)
+
+
+
+    /**
+    *   Creates and returns the SQL WHERE clauses needed to get only
+    *   data in the given typeset.
+    *
+    *   @param array $arTypeSet     Typeset
+    *   @return string  Clauses for the WHERE part in an SQL query
+    */
+    protected function getTypesetWhereClause($arTypeSet)
+    {
+        $strWhereTypes = '';
+        foreach ($arTypeSet as $strSparqlVar => $arType) {
+            //check type
+            $strWhereTypes .= ' AND ' . $this->arVarAssignments[$strSparqlVar][0]
+                . '.' . $this->arVarAssignments[$strSparqlVar][2]
+                . $this->getStringNullComparison($arType['type']);
+            //check datatype
+            if (isset($arType['datatype'])) {
+                $strWhereTypes .= ' AND ' . $this->arVarAssignments[$strSparqlVar][0]
+                    . '.l_datatype '
+                    . $this->getStringNullComparison($arType['datatype']);
+            }
+        }
+        return $strWhereTypes;
+    }//protected function getTypesetWhereClause($arTypeSet)
+
+
+
+    /**
+    *   Returns the correct sql string comparison method.
+    *
+    *   @internal If the string is NULL, an "IS NULL" sql statment
+    *   will be returned, and a normal "= 'something'" if it is
+    *   a normal string.
+    */
+    protected function getStringNullComparison($str)
+    {
+        if ($str === null) {
+            return ' IS NULL';
+        } else {
+            return ' = ' . $this->dbConn->qstr($str) . '';
+        }
+    }//protected function getStringNullComparison($str)
+
+}//class SparqlEngineDb_TypeSorter
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlParser.php	(revision 225)
@@ -0,0 +1,1551 @@
+<?php
+// ---------------------------------------------
+// Class: SparqlParser
+// ---------------------------------------------
+require_once RDFAPI_INCLUDE_DIR . 'model/Literal.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Resource.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/Constraint.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/Query.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/QueryTriple.php';
+require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParserException.php';
+
+/**
+* Parses a SPARQL Query string and returns a Query Object.
+*
+* @author   Tobias Gauss <tobias.gauss@web.de>
+* @author   Christian Weiske <cweiske@cweiske.de>
+* @version     $Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+class SparqlParser extends Object
+{
+
+    /**
+    * The query Object
+    * @var Query
+    */
+    protected $query;
+
+    /**
+    * The Querystring
+    * @var string
+    */
+    protected $queryString;
+
+    /**
+    * The tokenized Query
+    * @var array
+    */
+    protected $tokens = array();
+
+    /**
+    * Last parsed graphPattern
+    * @var int
+    */
+    protected $tmp;
+
+    /**
+    * Operators introduced by sparql
+    * @var array
+    */
+    protected static $sops = array(
+        'regex',
+        'bound',
+        'isuri',
+        'isblank',
+        'isliteral',
+        'str',
+        'lang',
+        'datatype',
+        'langmatches'
+    );
+
+    /**
+    *   Which order operators are to be treated.
+    *   (11.3 Operator Mapping)
+    *   @var array
+    */
+    protected static $operatorPrecedence = array(
+        '||'    => 0,
+        '&&'    => 1,
+        '='     => 2,
+        '!='    => 3,
+        '<'     => 4,
+        '>'     => 5,
+        '<='    => 6,
+        '>='    => 7,
+        '*'     => 0,
+        '/'     => 0,
+        '+'     => 0,
+        '-'     => 0,
+    );
+
+
+
+    /**
+    * Constructor of SparqlParser
+    */
+    public function SparqlParser()
+    {
+    }
+
+
+
+    /**
+    * Main function of SparqlParser. Parses a query string.
+    *
+    * @param  String $queryString The SPARQL query
+    * @return Query  The query object
+    * @throws SparqlParserException
+    */
+    public function parse($queryString = false)
+    {
+        $this->prepare();
+
+        if ($queryString) {
+            $this->query->setQueryString($queryString);
+            $uncommentedQuery  = $this->uncomment($queryString);
+            $this->queryString = $uncommentedQuery;
+            $this->tokens      = self::tokenize($uncommentedQuery);
+            $this->parseQuery();
+            if (!$this->query->isComplete()) {
+                throw new SparqlParserException(
+                    "Query is incomplete.",
+                    null,
+                    $queryString
+                );
+            }
+        } else {
+            throw new SparqlParserException(
+                "Querystring is empty.",
+                null,
+                key($this->tokens)
+            );
+            $this->query->isEmpty = true;
+        }
+        return $this->query;
+    }//public function parse($queryString = false)
+
+
+
+    /**
+    *   Set all internal variables to a clear state
+    *   before we start parsing.
+    */
+    protected function prepare()
+    {
+        $this->query          = new Query();
+        $this->queryString    = null;
+        $this->tokens         = array();
+        $this->tmp            = null;
+        // add the default prefixes defined in constants.php
+        global $default_prefixes;
+        $this->query->prefixes = $default_prefixes;
+    }//protected function prepare()
+
+
+
+    /**
+    * Tokenizes the query string into $tokens.
+    * The query may not contain any comments.
+    *
+    * @param  string $queryString Query to split into tokens
+    *
+    * @return array Tokens
+    */
+    public static function tokenize($queryString)
+    {
+        $queryString  = trim($queryString);
+        $specialChars = array(' ', "\t", "\r", "\n", ',', '\\', '(', ')','{','}','"',"'",';','[',']');
+        $len          = strlen($queryString);
+        $tokens       = array('');
+        $n            = 0;
+
+        for ($i = 0; $i < $len; ++$i) {
+            if (!in_array($queryString{$i}, $specialChars)) {
+                $tokens[$n] .= $queryString{$i};
+            } else {
+                if ($tokens[$n] != '') {
+                    ++$n;
+                    if (!isset($tokens[$n])) {
+                        $tokens[$n] = '';
+                    }
+                }
+                if ($queryString{$i} == "'" && $n > 1
+                  && $tokens[$n - 2] == "'" && $tokens[$n - 1] == "'"
+                ) {
+                    //special ''' quotation
+                    $tokens[$n - 2] = "'''";
+                    $tokens[$n - 1] = '';
+                    unset($tokens[$n]);
+                    --$n;
+                    continue;
+                } else if ($queryString{$i} == '"' && $n > 1
+                  && $tokens[$n - 2] == '"' && $tokens[$n - 1] == '"'
+                ) {
+                    //special """ quotation
+                    $tokens[$n - 2] = '"""';
+                    $tokens[$n - 1] = '';
+                    unset($tokens[$n]);
+                    --$n;
+                    continue;
+                } else if ($queryString{$i} == '\\') {
+                    $tokens[$n] .= substr($queryString, $i, 2);
+                    ++$i;
+                    continue;
+                }
+                $tokens[$n] = $queryString{$i};
+                $tokens[++$n] = '';
+            }
+        }
+//var_dump($tokens);
+        return $tokens;
+    }//public static function tokenize($queryString)
+
+
+
+    /**
+    * Removes comments in the query string. Comments are
+    * indicated by '#'.
+    *
+    * @param  String $queryString
+    * @return String The uncommented query string
+    */
+    protected function uncomment($queryString)
+    {
+        $regex ="/((\"[^\"]*\")|(\'[^\']*\')|(\<[^\>]*\>))|(#.*)/";
+        return preg_replace($regex,'\1',$queryString);
+    }//protected function uncomment($queryString)
+
+
+
+    /**
+    * Starts parsing the tokenized SPARQL Query.
+    *
+    * @return void
+    */
+    protected function parseQuery()
+    {
+        do {
+            switch (strtolower(current($this->tokens))) {
+                case "base":
+                    $this->parseBase();
+                    break;
+                case "prefix":
+                    $this->parsePrefix();
+                    break;
+                case "select":
+                    $this->parseSelect();
+                    break;
+                case "describe":
+                    $this->parseDescribe();
+                    break;
+                case "ask":
+                    $this->parseAsk('ask');
+                    break;
+                case "count":
+                    $this->parseAsk('count');
+                    break;
+                case "from":
+                    $this->parseFrom();
+                    break;
+                case "construct":
+                    $this->parseConstruct();
+                    break;
+                case "where":
+                    $this->parseWhere();
+                    $this->parseModifier();
+                    break;
+                case "{":
+                    prev($this->tokens);
+                    $this->parseWhere();
+                    $this->parseModifier();
+                    break;
+            }
+        } while (next($this->tokens));
+
+    }//protected function parseQuery()
+
+
+
+    /**
+    * Parses the BASE part of the query.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseBase()
+    {
+        $this->_fastForward();
+        if ($this->iriCheck(current($this->tokens))) {
+            $this->query->setBase(current($this->tokens));
+        } else {
+            $msg = current($this->tokens);
+            $msg = preg_replace('/</', '&lt;', $msg);
+            throw new SparqlParserException(
+                "IRI expected",
+                null,
+                key($this->tokens)
+            );
+        }
+    }
+
+
+
+    /**
+    * Adds a new namespace prefix to the query object.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parsePrefix()
+    {
+        $this->_fastForward();
+        $prefix = substr(current($this->tokens), 0, -1);
+        $this->_fastForward();
+        if ($this->iriCheck(current($this->tokens))) {
+            $uri = substr(current($this->tokens), 1, -1);
+            $this->query->addPrefix($prefix, $uri);
+        } else {
+            $msg = current($this->tokens);
+            $msg = preg_replace('/</', '&lt;', $msg);
+            throw new SparqlParserException(
+                "IRI expected",
+                null,
+                key($this->tokens)
+            );
+        }
+    }
+
+
+
+    /**
+    * Parses the SELECT part of a query.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseSelect()
+    {
+        $this->_fastForward();
+        $curLow = strtolower(current($this->tokens));
+        prev($this->tokens);
+        if ($curLow == 'distinct') {
+            $this->query->setResultForm('select distinct');
+        } else {
+            $this->query->setResultForm('select');
+        }
+
+        $currentVar = null;
+        $currentFunc = null;
+        $bWaitForRenaming = false;
+        while ($curLow != 'from' && $curLow != 'where' &&
+               $curLow != "{"
+        ){
+            $this->_fastForward();
+            $curTok = current($this->tokens);
+            $curLow = strtolower($curTok);
+
+            if ($this->varCheck($curTok) || $curLow == '*') {
+                if ($bWaitForRenaming) {
+                    $bWaitForRenaming = false;
+                    $currentVar->setAlias($curTok);
+                    if ($currentFunc != null) {
+                        $currentVar->setFunc($currentFunc);
+                    }
+                    $this->query->addResultVar($currentVar);
+                    $currentVar = null;
+                } else {
+                    if ($currentVar != null) {
+                        $this->query->addResultVar($currentVar);
+                        $currentVar = null;
+                    }
+                    $currentVar = new Query_ResultVariable($curTok);
+                    if ($currentFunc != null) {
+                        $currentVar->setFunc($currentFunc);
+                    }
+                }
+                $currentFunc = null;
+            } else if ($curLow == 'as') {
+                if ($currentVar === null) {
+                    throw new SparqlParserException(
+                        'AS requires a variable left and right',
+                        null,
+                        key($this->tokens)
+                    );
+                }
+                $bWaitForRenaming = true;
+            } else if (in_array($curLow, self::$sops)) {
+                $currentFunc = $curLow;
+            }
+
+            if (!current($this->tokens)) {
+                throw new SparqlParserException(
+                    "Unexpected end of File.",
+                    null,
+                    key($this->tokens)
+                );
+            }
+        }
+
+        if ($currentVar != null) {
+            $this->query->addResultVar($currentVar);
+        }
+        prev($this->tokens);
+
+        if (count($this->query->getResultVars()) == 0) {
+            throw new SparqlParserException(
+                "Variable or '*' expected.",
+                null,
+                key($this->tokens)
+            );
+        }
+    }//protected function parseSelect()
+
+
+    /**
+    * Adds a new variable to the query and sets result form to 'DESCRIBE'.
+    *
+    * @return void
+    */
+    protected function parseDescribe()
+    {
+        while(strtolower(current($this->tokens))!='from'& strtolower(current($this->tokens))!='where'){
+            $this->_fastForward();
+            if($this->varCheck(current($this->tokens))|$this->iriCheck(current($this->tokens))){
+                $this->query->addResultVar(current($this->tokens));
+                if(!$this->query->getResultForm())
+                    $this->query->setResultForm('describe');
+            }
+            if(!current($this->tokens))
+            break;
+        }
+        prev($this->tokens);
+    }
+
+    /**
+    * Sets result form to 'ASK' and 'COUNT'.
+    *
+    * @param string $form  if it's an ASK or COUNT query
+    * @return void
+    */
+    protected function parseAsk($form){
+        $this->query->setResultForm($form);
+        $this->_fastForward();
+        if(current($this->tokens)=="{")
+            $this->_rewind();
+        $this->parseWhere();
+        $this->parseModifier();
+    }
+
+    /**
+    * Parses the FROM clause.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseFrom(){
+        $this->_fastForward();
+        if(strtolower(current($this->tokens))!='named'){
+            if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){
+                $this->query->addFrom(new Resource(substr(current($this->tokens),1,-1)));
+            }else if($this->varCheck(current($this->tokens))){
+                $this->query->addFrom(current($this->tokens));
+            }else{
+                throw new SparqlParserException("Variable, Iri or qname expected in FROM ",null,key($this->tokens));
+            }
+            $this->query->addFrom(current($this->tokens));
+        }else{
+            $this->_fastForward();
+            if($this->iriCheck(current($this->tokens))||$this->qnameCheck(current($this->tokens))){
+                $this->query->addFromNamed(new Resource(substr(current($this->tokens),1,-1)));
+            }else if($this->varCheck(current($this->tokens))){
+                $this->query->addFromNamed(current($this->tokens));
+            }else{
+                throw new SparqlParserException("Variable, Iri or qname expected in FROM NAMED ",null,key($this->tokens));
+            }
+        }
+    }
+
+
+    /**
+    * Parses the CONSTRUCT clause.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseConstruct(){
+        $this->_fastForward();
+        $this->query->setResultForm('construct');
+        if(current($this->tokens)=="{"){
+            $this->parseGraphPattern(false,false,false,true);
+        }else{
+            throw new SparqlParserException("Unable to parse CONSTRUCT part. '{' expected. ",null,key($this->tokens));
+        }
+        $this->parseWhere();
+        $this->parseModifier();
+    }
+
+
+    /**
+    * Parses the WHERE clause.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseWhere(){
+        $this->_fastForward();
+        if(current($this->tokens)=="{"){
+            $this->parseGraphPattern();
+        }else{
+            throw new SparqlParserException("Unable to parse WHERE part. '{' expected in Query. ",null,key($this->tokens));
+        }
+    }
+
+
+
+    /**
+    * Checks if $token is a variable.
+    *
+    * @param  String  $token The token
+    * @return boolean TRUE if the token is a variable false if not
+    */
+    protected function varCheck($token)
+    {
+        if (isset($token[0]) && ($token{0} == '$' || $token{0} == '?')) {
+            $this->query->addUsedVar($token);
+            return true;
+        }
+        return false;
+    }
+
+    /**
+    * Checks if $token is an IRI.
+    *
+    * @param  String  $token The token
+    * @return boolean TRUE if the token is an IRI false if not
+    */
+    protected function iriCheck($token){
+        $pattern="/^<[^>]*>\.?$/";
+        if(preg_match($pattern,$token)>0)
+        return true;
+        return false;
+    }
+
+
+    /**
+    * Checks if $token is a Blanknode.
+    *
+    * @param  String  $token The token
+    * @return boolean TRUE if the token is BNode false if not
+    */
+    protected function bNodeCheck($token){
+        if($token{0} == "_")
+        return true;
+        else
+        return false;
+    }
+
+
+    /**
+    * Checks if $token is a qname.
+    *
+    * @param  String  $token The token
+    * @return boolean TRUE if the token is a qname false if not
+    * @throws SparqlParserException
+    */
+    protected function qnameCheck($token)
+    {
+        $pattern="/^([^:^\<]*):([^:]*)$/";
+        if (preg_match($pattern,$token,$hits)>0) {
+            $prefs = $this->query->getPrefixes();
+            if (isset($prefs{$hits{1}})) {
+                return true;
+            }
+            if ($hits{1} == "_") {
+                return true;
+            }
+            throw new SparqlParserException("Unbound Prefix: <i>".$hits{1}."</i>",null,key($this->tokens));
+        } else {
+            return false;
+        }
+    }
+
+
+
+    /**
+    * Checks if $token is a Literal.
+    *
+    * @param string $token The token
+    *
+    * @return boolean TRUE if the token is a Literal false if not
+    */
+    protected function literalCheck($token)
+    {
+        $pattern = "/^[\"\'].*$/";
+        if (preg_match($pattern,$token) > 0) {
+            return true;
+        }
+        return false;
+    }//protected function literalCheck($token)
+
+
+
+    /**
+    * FastForward until next token which is not blank.
+    *
+    * @return void
+    */
+    protected function _fastForward()
+    {
+        next($this->tokens);
+        while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){
+            next($this->tokens);
+        }
+    }//protected function _fastForward()
+
+
+
+    /**
+    * Rewind until next token which is not blank.
+    *
+    * @return void
+    */
+    protected function _rewind()
+    {
+        prev($this->tokens);
+        while(current($this->tokens)==" "|current($this->tokens)==chr(10)|current($this->tokens)==chr(13)|current($this->tokens)==chr(9)){
+            prev($this->tokens);
+        }
+        return;
+    }//protected function _rewind()
+
+
+
+    /**
+    * Parses a graph pattern.
+    *
+    * @param  int     $optional Optional graph pattern
+    * @param  int     $union    Union graph pattern
+    * @param  string  $graph    Graphname
+    * @param  boolean $constr   TRUE if the pattern is a construct pattern
+    * @param  boolean $external If the parsed pattern shall be returned
+    * @param  int     $subpattern If the new pattern is subpattern of the
+    *                               pattern with the given id
+    * @return void
+    */
+    protected function parseGraphPattern(
+      $optional = false, $union    = false, $graph = false,
+      $constr   = false, $external = false, $subpattern = false
+    ){
+        $pattern = $this->query->getNewPattern($constr);
+        if (is_int($optional)) {
+            $pattern->setOptional($optional);
+        } else {
+            $this->tmp = $pattern->getId();
+        }
+        if (is_int($union)) {
+            $pattern->setUnion($union);
+        }
+        if (is_int($subpattern)) {
+            $pattern->setSubpatternOf($subpattern);
+        }
+        if ($graph != false) {
+            $pattern->setGraphname($graph);
+        }
+
+        $this->_fastForward();
+
+        do {
+            switch (strtolower(current($this->tokens))) {
+                case "graph":
+                    $this->parseGraph();
+                    break;
+                case "union":
+                    $this->_fastForward();
+                    $this->parseGraphPattern(
+                        false, $this->tmp, false, false, false, $subpattern
+                    );
+                    break;
+                case "optional":
+                    $this->_fastForward();
+                    $this->parseGraphPattern(
+                        $this->tmp, false, false, false, false, $subpattern
+                    );
+                    break;
+                case "filter":
+                    $this->parseConstraint(
+                        $pattern, true, false, false, false, $subpattern
+                    );
+                    $this->_fastForward();
+                    break;
+                case ".":
+                    $this->_fastForward();
+                    break;
+                case "{":
+                    if (!is_int($subpattern)) {
+                        $subpattern = $pattern->getId();
+                    }
+
+                    $this->parseGraphPattern(
+                        false, false, false, false, false, $subpattern
+                    );
+                    break;
+                case "}":
+                    $pattern->open = false;
+                    break;
+                default:
+                    $this->parseTriplePattern($pattern);
+                    break;
+            }
+        } while ($pattern->open);
+
+        if ($external) {
+            return $pattern;
+        }
+        $this->_fastForward();
+    }
+
+    /**
+    * Parses a triple pattern.
+    *
+    * @param  GraphPattern $pattern
+    * @return void
+    */
+    protected function parseTriplePattern(&$pattern)
+    {
+        $trp      = array();
+        $prev     = false;
+        $prevPred = false;
+        $cont     = true;
+        $sub      = "";
+        $pre      = "";
+        $tmp      = "";
+        $tmpPred  = "";
+        $obj      = "";
+        do {
+//echo strtolower(current($this->tokens)) . "\n";
+            switch (strtolower(current($this->tokens))) {
+                case false:
+                    $cont          = false;
+                    $pattern->open = false;
+                    break;
+                case "filter":
+                    $this->parseConstraint($pattern,false);
+                    $this->_fastForward();
+                    break;
+                case "optional":
+                    $this->_fastForward();
+                    $this->parseGraphPattern($pattern->getId(),false);
+                    $cont = false;
+                    break;
+                case "union":
+                    $this->_fastForward();
+                    $this->parseGraphPattern(
+                        false, $this->tmp, false, false, false, $pattern->getId()
+                    );
+                    break;
+                case ";":
+                    $prev = true;
+                    $this->_fastForward();
+                    break;
+                case ".":
+                    $prev = false;
+                    $this->_fastForward();
+                    break;
+                case "graph":
+                    $this->parseGraph();
+                    break;
+                case ",":
+                    $prev     = true;
+                    $prevPred = true;
+                    $this->_fastForward();
+                    break;
+                case "}":
+                    $prev = false;
+                    $pattern->open = false;
+                    $cont = false;
+                    break;
+                case '{':
+                    //subpatterns opens
+                    $this->parseGraphPattern(
+                        false, false, false, false, false, $pattern->getId()
+                    );
+                    break;
+                case "[":
+                    $prev = true;
+                    $tmp  = $this->parseNode($this->query->getBlanknodeLabel());
+                    $this->_fastForward();
+                    break;
+                case "]":
+                    $prev = true;
+                    $this->_fastForward();
+                    break;
+                case "(":
+                    $prev = true;
+                    $tmp = $this->parseCollection($trp);
+                    $this->_fastForward();
+                    break;
+                case false:
+                    $cont = false;
+                    $pattern->open = false;
+                    break;
+                default:
+                    if ($prev) {
+                        $sub = $tmp;
+                    } else {
+                        $sub = $this->parseNode();
+                        $this->_fastForward();
+                        $tmp     = $sub;
+                    }
+                    if ($prevPred) {
+                        $pre = $tmpPred;
+                    } else {
+                        $pre = $this->parseNode();
+                        $this->_fastForward();
+                        $tmpPred = $pre;
+                    }
+                    if (current($this->tokens)=="[") {
+                        $tmp  = $this->parseNode($this->query->getBlanknodeLabel());
+                        $prev = true;
+                        $obj = $tmp;
+                    } else if (current($this->tokens)=="(") {
+                        $obj = $this->parseCollection($trp);
+                    } else {
+                        $obj = $this->parseNode();
+                    }
+                    $trp[] = new QueryTriple($sub,$pre,$obj);
+                    $this->_fastForward();
+                    break;
+
+            }
+        } while ($cont);
+
+        if (count($trp) > 0) {
+            $pattern->addTriplePatterns($trp);
+        }
+    }
+
+
+
+    /**
+    * Parses a value constraint.
+    *
+    * @param GraphPattern $pattern
+    * @param boolean $outer     If the constraint is an outer one.
+    * @return void
+    */
+    protected function parseConstraint(&$pattern, $outer)
+    {
+        $constraint = new Constraint();
+        $constraint->setOuterFilter($outer);
+        $this->_fastForward();
+        $this->_rewind();
+        $nBeginKey = key($this->tokens);
+        $constraint->setTree(
+            $t = $this->parseConstraintTree()
+        );
+
+        $nEndKey = key($this->tokens);
+        if (current($this->tokens) == '}') {
+            prev($this->tokens);
+        }
+
+        //for backwards compatibility with the normal sparql engine
+        // which does not use the tree array currently
+        $expression = trim(implode(
+            '',
+            array_slice(
+                    $this->tokens,
+                    $nBeginKey + 1,
+                    $nEndKey - $nBeginKey - 1
+            )
+        ));
+        if ($expression[0] == '(' && substr($expression, -1) == ')') {
+            $expression = trim(substr($expression, 1, -1));
+        }
+        $constraint->addExpression($expression);
+
+        $pattern->addConstraint($constraint);
+    }//protected function parseConstraint(&$pattern, $outer)
+
+
+
+    /**
+    *   Parses a constraint string recursively.
+    *
+    *   The result array is one "element" which may contain subelements.
+    *   All elements have one key "type" that determines which other
+    *   array keys the element array has. Valid types are:
+    *   - "value":
+    *       Just a plain value with a value key, nothing else
+    *   - "function"
+    *       A function has a name and an array of parameter(s). Each parameter
+    *       is an element.
+    *   - "equation"
+    *       An equation has an operator, and operand1 and operand2 which
+    *       are elements themselves
+    *   Any element may have the "negated" value set to true, which means
+    *   that is is - negated (!).
+    *
+    *   @internal The functionality of this method is being unit-tested
+    *   in testSparqlParserTests::testParseFilter()
+    *   "equation'-elements have another key "level" which is to be used
+    *   internally only.
+    *
+    *   @return array Nested tree array representing the filter
+    */
+    protected function parseConstraintTree($nLevel = 0, $bParameter = false)
+    {
+        $tree       = array();
+        $part       = array();
+        $chQuotes   = null;
+        $litQuotes  = null;
+        $strQuoted  = '';
+
+        while ($tok = next($this->tokens)) {
+//var_dump(array($tok, $tok[strlen($tok) - 1]));
+            if ($chQuotes !== null && $tok != $chQuotes) {
+                $strQuoted .= $tok;
+                continue;
+            } else if ($litQuotes !== null) {
+                $strQuoted .= $tok;
+                if ($tok[strlen($tok) - 1] == '>') {
+                    $tok = '>';
+                } else {
+                    continue;
+                }
+            } else if ($tok == ')' || $tok == '}' || $tok == '.') {
+                break;
+            }
+
+            switch ($tok) {
+                case '"':
+                case '\'':
+                    if ($chQuotes === null) {
+                        $chQuotes  = $tok;
+                        $strQuoted = '';
+                    } else {
+                        $chQuotes = null;
+                        $part[] = array(
+                            'type'  => 'value',
+                            'value' => $strQuoted,
+                            'quoted'=> true
+                        );
+                    }
+                    continue 2;
+                    break;
+
+                case '>':
+                    $litQuotes = null;
+                    $part[] = array(
+                        'type'  => 'value',
+                        'value' => $strQuoted,
+                        'quoted'=> false
+                    );
+                    continue 2;
+                    break;
+
+                case '(':
+                    $bFunc1 = isset($part[0]['type']) && $part[0]['type'] == 'value';
+                    $bFunc2 = isset($tree['type'])    && $tree['type']    == 'equation'
+                           && isset($tree['operand2']) && isset($tree['operand2']['value']);
+                    $part[] = $this->parseConstraintTree(
+                        $nLevel + 1,
+                        $bFunc1 || $bFunc2
+                    );
+
+                    if ($bFunc1) {
+                        $tree['type']       = 'function';
+                        $tree['name']       = $part[0]['value'];
+                        self::fixNegationInFuncName($tree);
+                        if (isset($part[1]['type'])) {
+                            $part[1] = array($part[1]);
+                        }
+                        $tree['parameter']  = $part[1];
+                        $part = array();
+                    } else if ($bFunc2) {
+                        $tree['operand2']['type']       = 'function';
+                        $tree['operand2']['name']       = $tree['operand2']['value'];
+                        self::fixNegationInFuncName($tree['operand2']);
+                        $tree['operand2']['parameter']  = $part[0];
+                        unset($tree['operand2']['value']);
+                        unset($tree['operand2']['quoted']);
+                        $part = array();
+                    }
+                    continue 2;
+                    break;
+
+                case ' ':
+                case "\t":
+                    continue 2;
+
+                case '=':
+                case '>':
+                case '<':
+                case '<=':
+                case '>=':
+                case '!=':
+                case '&&':
+                case '||':
+                    if (isset($tree['type']) && $tree['type'] == 'equation'
+                        && isset($tree['operand2'])) {
+                        //previous equation open
+                        $part = array($tree);
+                    } else if (isset($tree['type']) && $tree['type'] != 'equation') {
+                        $part = array($tree);
+                        $tree = array();
+                    }
+                    $tree['type']       = 'equation';
+                    $tree['level']      = $nLevel;
+                    $tree['operator']   = $tok;
+                    $tree['operand1']   = $part[0];
+                    unset($tree['operand2']);
+                    $part = array();
+                    continue 2;
+                    break;
+
+                case '!':
+                    if ($tree != array()) {
+                        throw new SparqlParserException(
+                            'Unexpected "!" negation in constraint.'
+                        );
+                    }
+                    $tree['negated'] = true;
+                    continue 2;
+
+                case ',':
+                    //parameter separator
+                    if (count($part) == 0 && !isset($tree['type'])) {
+                        throw new SparqlParserException(
+                            'Unexpected comma'
+                        );
+                    }
+                    $bParameter = true;
+                    if (count($part) == 0) {
+                        $part[] = $tree;
+                        $tree = array();
+                    }
+                    continue 2;
+
+                default:
+                    break;
+            }
+
+            if ($this->varCheck($tok)) {
+                $part[] = array(
+                    'type'      => 'value',
+                    'value'     => $tok,
+                    'quoted'    => false
+                );
+            } else if (substr($tok, 0, 2) == '^^') {
+                $part[count($part) - 1]['datatype']
+                    = $this->query->getFullUri(substr($tok, 2));
+            } else if ($tok[0] == '@') {
+                $part[count($part) - 1]['language'] = substr($tok, 1);
+            } else if ($tok[0] == '<') {
+                if ($tok[strlen($tok) - 1] == '>') {
+                    //single-tokenized <> uris
+                    $part[] = array(
+                        'type'      => 'value',
+                        'value'     => $tok,
+                        'quoted'    => false
+                    );
+                } else {
+                    //iris split over several tokens
+                    $strQuoted = $tok;
+                    $litQuotes = true;
+                }
+            } else if ($tok == 'true' || $tok == 'false') {
+                $part[] = array(
+                    'type'      => 'value',
+                    'value'     => $tok,
+                    'quoted'    => false,
+                    'datatype'  => 'http://www.w3.org/2001/XMLSchema#boolean'
+                );
+            } else {
+                $part[] = array(
+                    'type'      => 'value',
+                    'value'     => $tok,
+                    'quoted'    => false
+                );
+            }
+
+            if (isset($tree['type']) && $tree['type'] == 'equation' && isset($part[0])) {
+                $tree['operand2'] = $part[0];
+                self::balanceTree($tree);
+                $part = array();
+            }
+        }
+
+        if (!isset($tree['type']) && $bParameter) {
+            return $part;
+        } else if (isset($tree['type']) && $tree['type'] == 'equation'
+            && isset($tree['operand1']) && !isset($tree['operand2'])
+            && isset($part[0])) {
+            $tree['operand2'] = $part[0];
+            self::balanceTree($tree);
+        }
+
+        if (!isset($tree['type']) && isset($part[0])) {
+            if (isset($tree['negated'])) {
+                $part[0]['negated'] = true;
+            }
+            return $part[0];
+        }
+
+        return $tree;
+    }//protected function parseConstraintTree($nLevel = 0, $bParameter = false)
+
+
+
+    /**
+    *   "Balances" the filter tree in the way that operators on the same
+    *   level are nested according to their precedence defined in
+    *   $operatorPrecedence array.
+    *
+    *   @param array $tree  Tree to be modified
+    */
+    protected static function balanceTree(&$tree)
+    {
+        if (
+            isset($tree['type']) && $tree['type'] == 'equation'
+         && isset($tree['operand1']['type']) && $tree['operand1']['type'] == 'equation'
+         && $tree['level'] == $tree['operand1']['level']
+         && self::$operatorPrecedence[$tree['operator']] > self::$operatorPrecedence[$tree['operand1']['operator']]
+        ) {
+            $op2 = array(
+                'type'      => 'equation',
+                'level'     => $tree['level'],
+                'operator'  => $tree['operator'],
+                'operand1'  => $tree['operand1']['operand2'],
+                'operand2'  => $tree['operand2']
+            );
+            $tree['operator']   = $tree['operand1']['operator'];
+            $tree['operand1']   = $tree['operand1']['operand1'];
+            $tree['operand2']   = $op2;
+        }
+    }//protected static function balanceTree(&$tree)
+
+
+
+    protected static function fixNegationInFuncName(&$tree)
+    {
+        if ($tree['type'] == 'function' && $tree['name'][0] == '!') {
+            $tree['name'] = substr($tree['name'], 1);
+            if (!isset($tree['negated'])) {
+                $tree['negated'] = true;
+            } else {
+                unset($tree['negated']);
+            }
+            //perhaps more !!
+            self::fixNegationInFuncName($tree);
+        }
+    }//protected static function fixNegationInFuncName(&$tree)
+
+
+
+    /**
+    * Parses a bracketted expression.
+    *
+    * @param  Constraint $constraint
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseBrackettedExpression(&$constraint)
+    {
+        $open = 1;
+        $exp = "";
+        $this->_fastForward();
+        while ($open != 0 && current($this->tokens)!= false) {
+            switch (current($this->tokens)) {
+                case "(":
+                    $open++;
+                    $exp = $exp . current($this->tokens);
+                    break;
+                case ")":
+                    $open--;
+                    if($open != 0){
+                        $exp = $exp . current($this->tokens);
+                    }
+                    break;
+                case false:
+                    throw new SparqlParserException(
+                        "Unexpected end of query.",
+                        null,
+                        key($this->tokens)
+                    );
+                default:
+                    $exp = $exp . current($this->tokens);
+                    break;
+            }
+            next($this->tokens);
+        }
+        $constraint->addExpression($exp);
+    }
+
+
+    /**
+    * Parses an expression.
+    *
+    * @param  Constraint  $constrain
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseExpression(&$constraint)
+    {
+        $exp = "";
+        while (current($this->tokens) != false && current($this->tokens) != "}") {
+            switch (current($this->tokens)) {
+                case false:
+                    throw new SparqlParserException(
+                        "Unexpected end of query.",
+                        null,
+                        key($this->tokens)
+                    );
+                case ".":
+                    break;
+                    break;
+                default:
+                    $exp = $exp . current($this->tokens);
+                    break;
+            }
+            next($this->tokens);
+        }
+        $constraint->addExpression($exp);
+    }
+
+    /**
+    * Parses a GRAPH clause.
+    *
+    * @param  GraphPattern $pattern
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseGraph(){
+        $this->_fastForward();
+        $name = current($this->tokens);
+        if(!$this->varCheck($name)&!$this->iriCheck($name)&&!$this->qnameCheck($name)){
+            $msg = $name;
+            $msg = preg_replace('/</', '&lt;', $msg);
+            throw new SparqlParserException(" IRI or Var expected. ",null,key($this->tokens));
+        }
+        $this->_fastForward();
+
+        if($this->iriCheck($name)){
+            $name = new Resource(substr($name,1,-1));
+        }else if($this->qnameCheck($name)){
+            $name = new Resource($this->query->getFullUri($name));
+        }
+        $this->parseGraphPattern(false,false,$name);
+        if(current($this->tokens)=='.')
+        $this->_fastForward();
+    }
+
+    /**
+    * Parses the solution modifiers of a query.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseModifier(){
+        do{
+            switch(strtolower(current($this->tokens))){
+                case "order":
+                $this->_fastForward();
+                if(strtolower(current($this->tokens))=='by'){
+                    $this->_fastForward();
+                    $this->parseOrderCondition();
+                }else{
+                    throw new SparqlParserException("'BY' expected.",null,key($this->tokens));
+                }
+                break;
+                case "limit":
+                $this->_fastForward();
+                $val = current($this->tokens);
+                $this->query->setSolutionModifier('limit',$val);
+                break;
+                case "offset":
+                $this->_fastForward();
+                $val = current($this->tokens);
+                $this->query->setSolutionModifier('offset',$val);
+                break;
+                default:
+                break;
+            }
+        }while(next($this->tokens));
+    }
+
+    /**
+    * Parses order conditions of a query.
+    *
+    * @return void
+    * @throws SparqlParserException
+    */
+    protected function parseOrderCondition(){
+        $valList = array();
+        $val = array();
+        while(strtolower(current($this->tokens))!='limit'
+        & strtolower(current($this->tokens))!= false
+        & strtolower(current($this->tokens))!= 'offset'){
+            switch (strtolower(current($this->tokens))){
+                case "desc":
+                $this->_fastForward();
+                $this->_fastForward();
+                if($this->varCheck(current($this->tokens))){
+                    $val['val'] = current($this->tokens);
+                }else{
+                    throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
+                }
+                $this->_fastForward();
+                if(current($this->tokens)!=')')
+                throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens));
+                $val['type'] = 'desc';
+                $this->_fastForward();
+                break;
+                case "asc" :
+                $this->_fastForward();
+                $this->_fastForward();
+                if($this->varCheck(current($this->tokens))){
+                    $val['val'] = current($this->tokens);
+                }else{
+                    throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
+                }
+                $this->_fastForward();
+                if(current($this->tokens)!=')')
+                throw new SparqlParserException("missing ')' in ORDER BY clause.",null,key($this->tokens));
+                $val['type'] = 'asc';
+                $this->_fastForward();
+                break;
+                default:
+                if($this->varCheck(current($this->tokens))){
+                    $val['val'] = current($this->tokens);
+                    $val['type'] = 'asc';
+                }else{
+                    throw new SparqlParserException("Variable expected in ORDER BY clause. ",null,key($this->tokens));
+                }
+                $this->_fastForward();
+                break;
+            }
+            $valList[] = $val;
+        }
+        prev($this->tokens);
+        $this->query->setSolutionModifier('order by',$valList);
+    }
+
+    /**
+    * Parses a String to an RDF node.
+    *
+    * @param  String $node
+    *
+    * @return Node   The parsed RDF node
+    * @throws SparqlParserException
+    */
+    protected function parseNode($node = false)
+    {
+        //$eon = false;
+        if ($node) {
+            $node = $node;
+        } else {
+            $node = current($this->tokens);
+        }
+        if ($node{strlen($node)-1} == '.') {
+            $node = substr($node,0,-1);
+        }
+        if ($this->dtypeCheck($node)) {
+            return $node;
+        }
+        if ($this->bNodeCheck($node)) {
+            $node = '?'.$node;
+            $this->query->addUsedVar($node);
+            return $node;
+        }
+        if ($node == '[') {
+            $node = '?' . substr($this->query->getBlanknodeLabel(), 1);
+            $this->query->addUsedVar($node);
+            $this->_fastForward();
+            if(current($this->tokens)!=']') {
+                prev($this->tokens);
+            }
+            return $node;
+        }
+        if ($this->iriCheck($node)){
+            $base = $this->query->getBase();
+            if ($base!=null) {
+                $node = new Resource(substr(substr($base,0,-1).substr($node,1),1,-1));
+            } else {
+                $node = new Resource(substr($node,1,-1));
+            }
+            return $node;
+        } else if ($this->qnameCheck($node)) {
+            $node = $this->query->getFullUri($node);
+            $node = new Resource($node);
+            return $node;
+        } else if ($this->literalCheck($node)) {
+            $ch     = substr($node, 0, 1);
+            $chLong = str_repeat($ch, 3);
+            if (substr($node, 0, 3) == $chLong) {
+                $ch = $chLong;
+            }
+            $this->parseLiteral($node, $ch);
+        } else if ($this->varCheck($node)) {
+            $pos = strpos($node,'.');
+            if ($pos) {
+                return substr($node,0,$pos);
+            } else {
+                return $node;
+            }
+        } else if ($node[0] == '<') {
+            //partial IRI? loop tokens until we find a closing >
+            while (next($this->tokens)) {
+                $node .= current($this->tokens);
+                if (substr($node, -1) == '>') {
+                    break;
+                }
+            }
+            if (substr($node, -1) != '>') {
+                throw new SparqlParserException(
+                    "Unclosed IRI: " . $node,
+                    null,
+                    key($this->tokens)
+                );
+            }
+            return $this->parseNode($node);
+        } else {
+            throw new SparqlParserException(
+                '"' . $node . '" is neither a valid rdf- node nor a variable.',
+                null,
+                key($this->tokens)
+            );
+        }
+        return $node;
+    }//protected function parseNode($node = false)
+
+
+
+    /**
+    * Checks if there is a datatype given and appends it to the node.
+    *
+    * @param string $node Node to check
+    *
+    * @return void
+    */
+    protected function checkDtypeLang(&$node, $nSubstrLength = 1)
+    {
+        $this->_fastForward();
+        switch (substr(current($this->tokens), 0, 1)) {
+            case '^':
+                if (substr(current($this->tokens),0,2)=='^^') {
+                    $node = new Literal(substr($node,1,-1));
+                    $node->setDatatype(
+                        $this->query->getFullUri(
+                            substr(current($this->tokens), 2)
+                        )
+                    );
+                }
+                break;
+            case '@':
+                $node = new Literal(
+                    substr($node, $nSubstrLength, -$nSubstrLength),
+                    substr(current($this->tokens), $nSubstrLength)
+                );
+                break;
+            default:
+                prev($this->tokens);
+                $node = new Literal(substr($node, $nSubstrLength, -$nSubstrLength));
+                break;
+
+        }
+    }//protected function checkDtypeLang(&$node, $nSubstrLength = 1)
+
+
+
+    /**
+    * Parses a literal.
+    *
+    * @param String $node
+    * @param String $sep used separator " or '
+    *
+    * @return void
+    */
+    protected function parseLiteral(&$node, $sep)
+    {
+        do {
+            next($this->tokens);
+            $node = $node.current($this->tokens);
+        } while (current($this->tokens) != $sep);
+        $this->checkDtypeLang($node, strlen($sep));
+    }//protected function parseLiteral(&$node, $sep)
+
+
+
+    /**
+    * Checks if the Node is a typed Literal.
+    *
+    * @param String $node
+    *
+    * @return boolean TRUE if typed FALSE if not
+    */
+    protected function dtypeCheck(&$node)
+    {
+        $patternInt = "/^-?[0-9]+$/";
+        $match = preg_match($patternInt,$node,$hits);
+        if($match>0){
+            $node = new Literal($hits[0]);
+            $node->setDatatype(XML_SCHEMA.'integer');
+            return true;
+        }
+        $patternBool = "/^(true|false)$/";
+        $match = preg_match($patternBool,$node,$hits);
+        if($match>0){
+            $node = new Literal($hits[0]);
+            $node->setDatatype(XML_SCHEMA.'boolean');
+            return true;
+        }
+        $patternType = "/^a$/";
+        $match = preg_match($patternType,$node,$hits);
+        if($match>0){
+            $node = new Resource(RDF_NAMESPACE_URI.'type');
+            return true;
+        }
+        $patternDouble = "/^-?[0-9]+.[0-9]+[e|E]?-?[0-9]*/";
+        $match = preg_match($patternDouble,$node,$hits);
+        if($match>0){
+            $node = new Literal($hits[0]);
+            $node->setDatatype(XML_SCHEMA.'double');
+            return true;
+        }
+        return false;
+    }//protected function dtypeCheck(&$node)
+
+
+
+    /**
+    * Parses an RDF collection.
+    *
+    * @param  TriplePattern $trp
+    *
+    * @return Node          The first parsed label
+    */
+    protected function parseCollection(&$trp)
+    {
+        $tmpLabel = $this->query->getBlanknodeLabel();
+        $firstLabel = $this->parseNode($tmpLabel);
+        $this->_fastForward();
+        $i = 0;
+        while (current($this->tokens)!=")") {
+            if($i>0)
+            $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),$this->parseNode($tmpLabel = $this->query->getBlanknodeLabel()));
+            $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),$this->parseNode());
+            $this->_fastForward();
+            $i++;
+        }
+        $trp[] = new QueryTriple($this->parseNode($tmpLabel),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));
+        return $firstLabel;
+    }//protected function parseCollection(&$trp)
+
+}// end class: SparqlParser.php
+
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlParserException.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlParserException.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlParserException.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+// ---------------------------------------------
+// class: SparqlParserExecption
+// ---------------------------------------------
+/**
+* A SPARQL Parser Execption for better errorhandling.
+*
+* @author   Tobias Gauss <tobias.gauss@web.de>
+* @version	 $Id$
+* @license http://www.gnu.org/licenses/lgpl.html LGPL
+*
+* @package sparql
+*/
+Class SparqlParserException extends Exception{
+ 
+	private $tokenPointer;
+
+	public function __construct($message, $code = 0, $pointer){
+
+		$this->tokenPointer = $pointer;
+		parent::__construct($message, $code);
+	}
+
+	/**
+	* Returns a pointer to the token which caused the exception.
+	* @return int
+	*/
+	public function getPointer(){
+		return $this->tokenPointer;
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/sparql/SparqlVariable.php
===================================================================
--- Dev/branches/Demo/rdfapi/sparql/SparqlVariable.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/sparql/SparqlVariable.php	(revision 225)
@@ -0,0 +1,40 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . '/model/Node.php';
+require_once RDFAPI_INCLUDE_DIR . '/util/Object.php';
+
+/**
+*   Object representation of a SPARQL variable.
+*   @license http://www.gnu.org/licenses/lgpl.html LGPL
+*/
+class SparqlVariable extends Object
+{
+    public $name;
+
+    public function __construct($name)
+    {
+        $this->name = $name;
+    }
+
+
+
+    public function __toString()
+    {
+        return $this->name;
+    }
+
+
+
+    /**
+    *   Checks if the given subject/predicate/object
+    *   is a variable name.
+    *
+    *   @return boolean
+    */
+    public static function isVariable($bject)
+    {
+        return is_string($bject) && strlen($bject) >= 2
+             && ($bject[0] == '?' || $bject[0] == '$');
+    }//public static function isVariable($bject)
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/syntax/GRDDLParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/GRDDLParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/GRDDLParser.php	(revision 225)
@@ -0,0 +1,120 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: RdfParser
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * A GRDDLParser. 
+ * This class extracts rdf data from xhtml documents. It uses the PHP xsltprocessor.
+ * Gleaning Resource Descriptions from Dialects of Languages (GRDDL):
+ * (http://www.w3.org/TR/grddl/)
+ * 
+ * @version  $Id: GRDDLParser.php 320 2006-11-21 09:38:51Z tgauss $
+ * @author Tobias Gauß <tobias.gauss@web.de>, 
+ *
+ * @package syntax
+ * @access	public
+ *
+ */   
+class GRDDLParser extends Object{
+	
+	
+	/**
+ 	* Document link
+ 	* 
+ 	*
+ 	* @var     String
+ 	* @access	private
+ 	*/
+	var $doclink;
+	
+	
+	/**
+ 	* Stylesheet link
+ 	* 
+ 	*
+ 	* @var     String[]
+ 	* @access	private
+ 	*/
+	var $stylelinks;
+	
+	
+	/**
+ 	* DomDocument
+ 	* 
+ 	* @var     DomDocument
+ 	* @access	private
+ 	*/
+	var $domdoc;
+	
+	
+	/**
+	* generates a MemModel and creates the DomDocument.
+	*
+	* @param String $doc
+	* @access public
+	* @return MemModel $model
+	*/
+	function generateModel($doc){
+		$model = new MemModel();
+		$this->doclink=$doc;
+		$this->domdoc = new DomDocument; 
+		$this->domdoc->load($doc);
+		$this->_getStyles();
+		$model = $this->_generateRDF();
+		return $model;
+	}
+	
+
+	/**
+	* gets the used xsl stylesheets.
+	*
+	* @access private
+	*/
+	function _getStyles(){
+		$link=$this->domdoc->getElementsByTagName('link');
+		$i=0;
+		while($link->item($i)!=''){
+			$item = $link->item($i);
+			if($item->getAttributeNode('rel')->value=='transformation'){
+				$temp = $item->getAttributeNode('href')->value;
+				if(substr($temp,0,1)=='/'){
+					$pos = strrpos($this->doclink,'/');
+					$part = substr($this->doclink,0,$pos);
+					$this->stylelink[]=$part.$temp;
+				}else{
+					$this->stylelink[]=$temp;
+				}
+			}
+			$i++;
+		}
+	}
+	
+	/*
+	* uses the PHP build in xslt processor to
+	* generate the RDF statements and uses the 
+	* RDF- Parser to generate the model
+	*
+	* @access private
+	* @return MemModel $model
+	*/
+	function _generateRDF(){
+		$model=new MemModel();
+		$model->setBaseURI($this->doclink);
+		$proc = new xsltprocessor;
+		include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_RDF);
+		$pars=new RdfParser();
+		foreach($this->stylelink as $key => $value){
+			$xsl = new DomDocument;
+			$xsl->load($value);
+			$proc->importStyleSheet($xsl);
+			$model->addModel($pars->generateModel($proc->transformToXML($this->domdoc),$this->doclink));
+		}
+		return $model;
+	}
+
+	
+	
+}
+?>
Index: Dev/branches/Demo/rdfapi/syntax/JsonParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/JsonParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/JsonParser.php	(revision 225)
@@ -0,0 +1,54 @@
+<?php
+/**
+ * This class provides capabilities to parse json encoded rdf models.
+ *
+ * @package syntax
+ * @author Philipp Frischmuth <philipp@frischmuth24.de>
+ * @version $Id: JsonParser.php 555 2007-12-11 20:27:34Z p_frischmuth $
+ */
+class JsonParser extends Object {
+	
+	/**
+	 * This method takes a json encoded rdf-model and a reference to aa (usually empty) MemModel, parses the json
+	 * string and adds the statements to the given MemModel.
+	 *
+	 * @param string $jsonString The string that contains the rdf model, encoded as a json-string.
+	 * @param MemModel $model A reference to the model, where to add the statements, usually an empty MemModel.
+	 */
+	public function generateModelFromString($jsonString, $model) {
+		
+		$jsonModel = array();
+		$jsonModel = json_decode($jsonString, true);
+		
+		// throws an excpetion if json model was corrupt
+		if (!is_array($jsonModel)) {
+			throw new Exception('error in json string');
+		}
+		
+		foreach ($jsonModel as $subject=>$remain) {
+			foreach ($remain as $predicate=>$object) {
+				$s = (strpos($subject, '_') === 0) ? new BlankNode(substr($subject, 2)) : new Resource($subject);
+				$p = new Resource($predicate);
+				
+				foreach ($object as $obj) {
+					if ($obj['type'] === 'uri') {
+						$o = new Resource($obj['value']);
+					} else if ($obj['type'] === 'bnode') {
+						$o = new BlankNode(substr($obj['value'], 2));
+					} else {
+						$dtype = (isset($obj['datatype'])) ? $obj['datatype'] : '';
+						$lang = (isset($obj['lang'])) ? $obj['lang'] : '';
+
+						$oVal = $obj['value'];
+
+						$o = new Literal($oVal, $lang);
+						$o->setDatatype($dtype);
+					}
+					
+					$model->add(new Statement($s, $p, $o));
+				}
+			}
+		}
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/syntax/JsonSerializer.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/JsonSerializer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/JsonSerializer.php	(revision 225)
@@ -0,0 +1,163 @@
+<?php
+/**
+ * This class provides capabilities to serialize MemModels to json strings.
+ *
+ * @package syntax
+ * @author Philipp Frischmuth <philipp@frischmuth24.de>
+ * @version $Id: JsonSerializer.php 555 2007-12-11 20:27:34Z p_frischmuth $
+ */
+class JsonSerializer extends Object {
+	
+	/**
+	 * This method takes a MemModel object ad parameter and serializes all contained triples to rdf/json format.
+	 * 
+	 * @see http://n2.talis.com/wiki/RDF_JSON_Specification#rdf.2Fjson
+	 * @param MemModel $model
+	 * @return string Returns a string containing the serialized model.
+	 */
+	public function serialize(MemModel $model) {
+		
+		// create the root json object (root object)
+		$jsonString = '{';
+		$subjects = array();
+		
+		// sort triples by subject
+		foreach ($model->triples as $triple) {
+			$subjects[$triple->toStringSubject()][] = $triple;
+		}
+		
+		// sort alphabetically
+		ksort($subjects);
+			
+		// triples are sorted by subject now, each key is a subject uri, containing all triples with this subject uri
+		$i = 0;
+		foreach ($subjects as $predicatesArray) {
+			$predicates = array();
+			
+			if ($i > 0) {
+				$jsonString .= ',';
+			}
+			$i++;
+			
+			$subj = $predicatesArray[0]->getSubject();
+			
+			// add special _: sequence for blank node only
+			if ($subj instanceof BlankNode) {
+				$jsonString .= '"_:' . $this->_escapeValue($subj->getLabel()) . '":';
+			} else {
+				$jsonString .= '"' . $this->_escapeValue($subj->getLabel()) . '":';
+			}
+			
+			
+			
+			// create a json object for each subject (subject object)
+			$jsonString .= '{';
+			
+			// sort triples with current subject by predicate
+			foreach ($predicatesArray as $triple) {	
+				$predicates[$triple->toStringPredicate()][] = $triple;
+			}
+			
+			// sort alphabetically
+			ksort($predicates);
+			
+			$j = 0;
+			foreach ($predicates as $valueArray) {
+				
+				if ($j > 0) {
+					$jsonString .= ',';
+				}
+				$j++;
+				
+				$jsonString .= '"' . $this->_escapeValue($valueArray[0]->getLabelPredicate()) . '":';
+				
+				// create a json array (value array) 
+				$jsonString .= '[';
+				
+				$k = 0;
+				foreach ($valueArray as $triple) {
+					if ($k > 0) {
+						$jsonString .= ',';
+					}
+					$k++;
+					
+					// create json value object (value object)
+					$jsonString .= '{';
+					
+					$obj = $triple->getObject();
+					
+					// add special _: sequence for blank nodes only
+					if ($obj instanceof BlankNode) {
+						$jsonString .= '"value":"_:' . $this->_escapeValue($obj->getLabel()) . '",';
+					} else if ($obj instanceof Literal) {
+						$jsonString .= '"value":"' . $this->_escapeValue($obj->getLabel()) . '",';
+					} else {
+						$jsonString .= '"value":"' . $this->_escapeValue($obj->getLabel()) . '",';
+					}
+					
+					// add type of object
+					if ($obj instanceof Literal) {
+						$jsonString .= '"type":"literal"';
+					} else if ($obj instanceof BlankNode) {
+						$jsonString .= '"type":"bnode"';
+					} else {
+						$jsonString .= '"type":"uri"';
+					}
+					
+					if ($obj instanceof Literal) {
+						if ($obj->getLanguage() != '') {
+							$jsonString .= ',"lang":"' . $this->_escapeValue($obj->getLanguage()) . '"';
+						}
+						if ($obj->getDatatype() != '') {
+							$jsonString .= ',"datatype":"' . $this->_escapeValue($obj->getDatatype()) . '"';
+						}
+						
+					}
+					
+					// close value object
+					$jsonString .= '}';
+				}
+				
+				// close the value array
+				$jsonString .= ']';
+			}
+			
+			// close the json object (for the subject) (subject object)
+			$jsonString .= '}';
+		}
+		
+		// close root json object (root object)
+		$jsonString .= '}';
+		
+		return $jsonString;
+	}
+	
+	/*
+	 * Escapes the following chars as specified at json.org:
+	 * 
+	 * " -> \"
+	 * \ -> \\
+	 * / -> \/
+	 * \b -> \\b
+	 * \f -> \\f
+	 * \n -> \\n
+	 * \r -> \\r
+	 * \t -> \\t
+	 * \uXXXX -> \\uXXXX
+	 */
+	protected function _escapeValue($value) {
+		
+		
+		$value = str_replace("\\", '\\\\', $value);
+		#$value = str_replace("/", '\/', $value);
+		$value = str_replace("\n", '\\n', $value);
+		$value = str_replace("\t", '\\t', $value);
+		$value = str_replace("\r", '\\r', $value);
+		$value = str_replace("\b", '\\b', $value);
+		$value = str_replace("\f", '\\f', $value);
+		$value = str_replace('"', '\"', $value);
+		
+		return $value;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/syntax/N3Parser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/N3Parser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/N3Parser.php	(revision 225)
@@ -0,0 +1,1143 @@
+<?php
+require_once RDFAPI_INCLUDE_DIR . 'util/Object.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Blanknode.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Resource.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Literal.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/Statement.php';
+require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php';
+require_once RDFAPI_INCLUDE_DIR . 'constants.php';
+
+// ----------------------------------------------------------------------------------
+// Class: N3Parser
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * PHP Notation3 Parser
+ *
+ * This parser can parse a subset of n3, reporting triples to a callback function
+ * or constructing a RAP Model ( http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi )
+ *
+ * Supported N3 features:
+ * <ul>
+ *   <li>Standard things, repeated triples ( ; and , ), blank nodes using [ ], self-reference ('<>')</li>
+ *   <li>@prefix mappings</li>
+ *   <li>= maps to owl#sameAs</li>
+ *   <li>a maps to rdf-syntax-ns#type</li>
+ *   <li>Literal datytype- and xmlLanguageTag support
+ * </ul>
+ * Un-supported N3 Features include:
+ * <ul>
+ *   <li>Reification using { }</li>
+ *   <li>. and ^ operators for tree traversal</li>
+ *   <li>Any log operators, like log:forAll etc.</li>
+ * </ul>
+ *
+ * This parser is based on n3.py from Epp released 2nd March, 2002.
+ * by Sean B. Palmer
+ * ( http://infomesh.net/2002/eep/20020302-013802/n3.py )
+ *
+ * This parser is released under the GNU GPL license.
+ * ( http://www.gnu.org/licenses/gpl.txt )
+ *
+ *
+ *
+ * @author Sean B. Palmer <sean@mysterylights.com>
+ * @author Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>
+ * @author Daniel Westphal <mail@d-westphal.de>
+ * @version $Id: N3Parser.php 569 2008-05-19 05:24:39Z p_frischmuth $
+ * @license GPL http://www.gnu.org/licenses/gpl.txt
+ * @package syntax
+ * @access public
+ **/
+
+class N3Parser extends Object {
+
+
+  /* ==================== Variables ==================== */
+
+  var $Tokens;
+  var $bNode;
+  var $RDF_NS, $DAML_NS, $OWL_NS;
+  var $debug;
+  var $parseError;
+  var $parsedNamespaces = array();
+
+  /* ==================== Public Methods ==================== */
+
+  /**
+   * Constructor
+   * @access public
+   **/
+  function N3Parser() {
+    //Regular expressions:
+     $Name     = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s\) ]*';
+     $URI      = '<[^> ]*>';
+     $bNode    = '_:'.$Name;
+     $Univar   = '\?'.$Name;
+     $QName    = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name;
+     $Literal  = '(?:'
+               . '"(\\\"|[^"])*"'
+               . '|'
+               . "'(\\\'|[^'])*'"
+               . ')';
+               # '"(?:\\"|[^"])*"'
+     $Number   = '[-+]?[0-9]+(\\.[0-9]+)?([eE][-+]?[0-9]+)?';
+     $Boolean  = '@(?:true|false)';
+//   $Literal  = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"'
+     $LangTag  = '@[A-Za-z\-]*[^ \^\.\;\,]';
+     $Datatype = '(\^\^)[^ ,\.;)]+';
+     $Datatype_URI = '(\^\^)'.$URI;
+     //     $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""';
+     $LLiteral = '(?:'
+                 . '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""'
+                 . '|'
+                 . "'''[^'\\\\]*(?:(?:\\\\.|'(?!''))[^\"\\\\]*)*'''"
+                 . ')';
+     //          '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""'
+     $Comment    = '#.*$';
+     $Prefix     = '(?:[A-Za-z][A-Za-z0-9_]*)?:';
+     $PrefixDecl = '@prefix';
+     $WS         = '[ \t]';
+     $this->RDF_NS  = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; # for 'a' keyword
+     $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'; # for '=' keyword
+     $this->OWL_NS  = 'http://www.w3.org/2002/07/owl#';
+
+     //     $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix,
+     //	    $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment);
+     $t = array(
+            $Datatype_URI, $Datatype, $LLiteral, $URI, $Literal,
+            $PrefixDecl, $QName, $Number, $Boolean, $bNode,
+            $Prefix, $Univar, 'a','=',
+            '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.',
+            $WS, $Comment,$LangTag
+     );
+     $this->Tokens = "/(".join($t,"|").")/m";
+
+     $this->bNode      = 0;
+     $this->debug      = 0;
+     $this->bNodeMap   = array();
+     $this->FixBnodes  = FIX_BLANKNODES;
+     $this->parseError =false;
+  }
+
+
+  /**
+   * Sets, if BlankNode labels should be replaced by the generic label from the constants.php file
+   * default is "false" -> the used label in n3 is parsed to the model
+   * @param boolean
+   * @access public
+   **/
+  function setFixBnodes($set) {
+
+  	if (($set===true) OR ($set===false)) $this->FixBnodes = $set;
+  }
+
+
+  /**
+   * This parses a N3 string and prints out the triples
+   * @param string $s
+   * @access public
+   **/
+  function parse($s) {
+    //   """Get a string, tokenize, create list, convert to Eep store."""
+    $stat=$this->n3tolist($s);
+    foreach ( $stat as $t) {
+
+      if (count($t)>3) {
+        $object=$t[2];
+
+        for ($i = 3; $i < 5; $i++){
+          if ($t[$i][0]=='@')$object.=$t[$i];
+          if (substr($t[$i],0,2)=='^^')$object.=$t[$i];
+        };
+      } else {$object=$t[2];};
+
+      print '('.$t[0].', '.$t[1].', '.$object.")\n";
+
+    }
+    //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
+    //              for t in n3tolist(s)]
+  }
+
+
+  /**
+   * This parses a N3 string and calls func($subject, $predicate, $object) with each triple
+   * @param string $s
+   * @param string $func
+   * @access public
+   **/
+  function uparse($s,$func) {
+    //   """Get a string, tokenize, create list, convert to Eep store."""
+    $stat=$this->n3tolist($s);
+    foreach ( $stat as $t) {
+
+    	if (count($t)>3) {
+        $object=$t[2];
+
+        for ($i = 3; $i < 5; $i++){
+          if ($t[$i][0]=='@')$object.=$t[$i];
+          if (substr($t[$i],0,2)=='^^')$object.=$t[$i];
+        };
+      } else {$object=$t[2];};
+    	//    print "(".$t[0].", ".$t[1].", ".$t[2].")";
+
+      $func($t[0],$t[1],$object);
+    }
+    //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
+    //              for t in n3tolist(s)]
+  }
+
+
+  /**
+   * This parses a N3 string and returns a memmodel
+   * @param string $s
+   * @access public
+   * @return object Model
+   **/
+
+  function parse2model($s,$model = false) {
+	if($model == false){
+	    $m=new MemModel();
+	}else{
+		$m=$model;
+	}
+    //   """Get a string, tokenize, create list, convert to Eep store."""
+    $stat=$this->n3tolist($s);
+
+    foreach ( $stat as $t) {
+      $s=$this->toRDFNode($t[0],$t);
+      $p=$this->toRDFNode($t[1],$t);
+      $o=$this->toRDFNode($t[2],$t);
+
+       $new_statement= new Statement($s,$p,$o);
+
+      $m->add($new_statement);
+      //    print "(".$t[0].", ".$t[1].", ".$t[2].")";
+    }
+    //   return [[eep.Article(t[0]), eep.Article(t[1]), eep.Article(t[2])]
+    //              for t in n3tolist(s)]
+    $m->addParsedNamespaces($this->parsedNamespaces);
+    return $m;
+  }
+
+/**
+ * Generate a new MemModel from an URI or file.
+ *
+ * @access	public
+ * @param $path
+ * @throws PhpError
+ * @return object MemModel
+ */
+  function & generateModel($path,$dummy=false,$model=false) {
+
+    $handle = fopen($path,'r') or die("N3 Parser: Could not open File: '$path' - Stopped parsing.");
+	$done=false;
+	$input="";
+	while(!$done)
+	{
+	  $input .= fread( $handle, 512 );
+	  $done = feof($handle);
+
+	};
+
+
+    fclose($handle);
+
+    $m = $this->parse2model($input,$model);
+    return $m;
+  }
+  
+  function generateModelFromString($n3String, $model) {
+      
+      $m = $this->parse2model($n3String, $model);
+      $m->addModel($m);
+  }
+
+
+  /* ==================== Private Methods from here ==================== */
+
+  //  General list processing functions
+
+/**
+ * Returns FALSE if argument is a whitespace character
+ * @access private
+ * @param string $s
+ **/
+  function isWS($s) {
+    return !preg_match('/^(#.*|\s*)$/', $s);
+  }
+
+
+
+  /**
+   * Returns true if the string is not a comment
+   * @access private
+   * @param string $s
+   * @returns boolean
+   **/
+  function notComment($s) {
+    if ($s=="") return false;
+    $N3Comment = '^[ \t]*\#';
+
+    if (ereg($N3Comment,$s)) return false;
+    else return true;
+  }
+
+  /**
+   * Removes all whitespace tokens from list
+   * @access private
+   * @param array $list
+   **/
+  function filterWs($list) {
+    //    var_dump($list);
+    //  """Filter whitespace from a list."""
+
+    return array_filter($list, array($this,"isWS"));
+  }
+
+/**
+* converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
+*
+* @param String $str
+* @return String
+* @access private
+*
+*/
+function str2unicode_nfc($str=""){
+	$result="";
+	/* try to detect encoding */
+	$tmp=str_replace("?", "", $str);
+	if(strpos(utf8_decode($tmp), "?")===false){
+		$str=utf8_decode($str);
+	}
+	for($i=0,$i_max=strlen($str);$i<$i_max;$i++){
+		$nr=0;/* unicode dec nr */
+		/* char */
+		$char=$str[$i];
+		/* utf8 binary */
+		$utf8_char=utf8_encode($char);
+		$bytes=strlen($utf8_char);
+		if($bytes==1){
+			/* 0####### (0-127) */
+			$nr=ord($utf8_char);
+		}
+		elseif($bytes==2){
+			/* 110##### 10###### = 192+x 128+x */
+			$nr=((ord($utf8_char[0])-192)*64) + (ord($utf8_char[1])-128);
+		}
+		elseif($bytes==3){
+			/* 1110#### 10###### 10###### = 224+x 128+x 128+x */
+			$nr=((ord($utf8_char[0])-224)*4096) + ((ord($utf8_char[1])-128)*64) + (ord($utf8_char[2])-128);
+		}
+		elseif($bytes==4){
+			/* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */
+			$nr=((ord($utf8_char[0])-240)*262144) + ((ord($utf8_char[1])-128)*4096) + ((ord($utf8_char[2])-128)*64) + (ord($utf8_char[3])-128);
+		}
+		/* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */
+		if($nr<9){/* #x0-#x8 (0-8) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr==9){/* #x9 (9) */
+			$result.='\t';
+		}
+		elseif($nr==10){/* #xA (10) */
+			$result.='\n';
+		}
+		elseif($nr<13){/* #xB-#xC (11-12) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr==13){/* #xD (13) */
+			$result.='\t';
+		}
+		elseif($nr<32){/* #xE-#x1F (14-31) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr<34){/* #x20-#x21 (32-33) */
+			$result.=$char;
+		}
+		elseif($nr==34){/* #x22 (34) */
+			$result.='\"';
+		}
+		elseif($nr<92){/* #x23-#x5B (35-91) */
+			$result.=$char;
+		}
+		elseif($nr==92){/* #x5C (92) */
+			$result.='\\';
+		}
+		elseif($nr<127){/* #x5D-#x7E (93-126) */
+			$result.=$char;
+		}
+		elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */
+			$result.="\\U".sprintf("%08X",$nr);
+		}
+		else{
+			/* other chars are not defined => ignore */
+		}
+	}
+	return $result;
+}
+
+
+
+  /**
+   * Gets a slice of an array.
+   * Returns the wanted slice, as well as the remainder of the array.
+   * e.g. getSpan(['p', 'q', 'r'], 1, 2) gives (['q'], ['p', 'r'])
+   * @return array
+   * @access private
+   * @param array $list
+   * @param integer $start
+   * @param integer $end
+   **/
+  function getSpan($list, $start, $end) {
+
+    $pre=array_slice($list, 0, $start);
+    $post=array_slice($list, $end);
+
+    return array(array_slice($list, $start,$end-$start),$this->array_concat($pre,$post));
+  }
+
+
+  /**
+   * Concatenates two arrays
+   * @param array $a
+   * @param array $b
+   * @returns array
+   * @access private
+   **/
+  function array_concat($a, $b) {
+    array_splice($a,count($a),0,$b);
+    return $a;
+  }
+
+  /**
+   * Returns an array with all indexes where item appears in list
+   * @param array $list
+   * @param string $item
+   * @returns array
+   * @access private
+   **/
+  function posns($list, $item) {
+    $res=array();
+    $i=0;
+    foreach ( $list as $k=>$v) {
+      if ($v === $item ) $res[]=$i;
+      $i++;
+    }
+    $res[]=$i;
+    return $res;
+  }
+
+
+  /* More N3 specific functions */
+
+  /**
+   * Returns a list of tokens
+   * @param string $s
+   * @returns array
+   * @access private
+   **/
+  function toke($s) {
+
+    //    print "$s\n";
+    //   """Notation3 tokenizer. Takes in a string, returns a raw token list."""
+    if (strlen($s) == 0) die('Document has no content!');
+
+    $s=str_replace("\r\n","\n",$s);
+    $s=str_replace("\r","\n",$s);
+
+
+    //$lines=explode("\n",$s);
+
+    //$reallines=array_filter($lines, array($this, "notComment"));
+    //    print "LINES: ".join($reallines, " ")." :LINES\n";
+    //array_walk($reallines, array($this, "trimLine"));
+    //$res=array();
+
+    //    foreach ($reallines as $l) {
+    //preg_match_all($this->Tokens, $l, $newres);
+    //$res=$this->array_concat($res,$newres[0]);
+    //}
+
+    $res=array();
+    preg_match_all($this->Tokens, $s, $newres);
+    $res=$this->array_concat($res, array_map('trim', $newres[0]));
+//var_dump($newres[0]);
+    return $res;
+  }
+
+  /**
+   * Returns a list with the elements between start and end as one quoted string
+   * e.g. listify(["a","b","c","d"],1,2) => ["a","b c", "d"]
+   * @param array $list
+   * @param integer $start
+   * @param integer $end
+   * @returns array
+   * @access private
+   **/
+  function listify($list, $start, $end) {
+
+    //Re-form a list, merge elements start->end into one quoted element
+    //Start and end are offsets...
+
+    $l=$end-$start;
+
+    $s=array_slice($list, 0, $start);
+    $m=array_slice($list, $start,$l);
+    $e=array_slice($list, $end);
+
+    //  array_push($s,"\"".join($m," ")."\"");
+    array_push($s,$m);
+
+    return $this->array_concat($s,$e);
+  }
+
+  /**
+   * Returns an array with prefixes=>namespace mappings
+   * @param array $list
+   * @access private
+   * @returns array
+   **/
+  function getPrefixes($list) {
+
+    $prefixes=array();
+    $ns=1;
+    $name=2;
+    foreach ($list as $l) {
+      if ($l=='@prefix') {
+	//   while '@prefix' in list {
+
+	$pos=current($list);
+	//pos = list.index('@prefix')
+	$r = $this->getSpan($list, $pos, ($pos+4)); # processes the prefix tokens
+	$binding=$r[0];
+	$list=$r[1];
+	$prefixes[$binding[$ns]] = substr($binding[$name],1,-1);
+	$this->parsedNamespaces[substr($binding[$name],1,-1)] = substr($binding[$ns],0,-1);
+      }
+    }
+
+	if (count($prefixes)<1) $list= array_slice($list,0);
+
+    return array($prefixes, $list);
+  }
+
+  /**
+   * Callback function for replacing "a" elements with the right RDF uri.
+   * @param string $l
+   * @access private
+   **/
+  function replace_a_type(&$l,$p) {
+    if ($l=='a') $l='<'.$this->RDF_NS.'type>';
+  }
+
+  /**
+   * Callback function for replacing "=" elements with the right DAML+OIL uri.
+   * @param string $l
+   * @access private
+   **/
+  function replace_equal(&$l,$p) {
+    if ($l=='=') $l='<'.$this->OWL_NS.'sameAs>';
+  }
+
+  /**
+   * Callback function for replacing "this" elements with the right RDF uri.
+   * @param string $l
+   * @access private
+   **/
+  function replace_this($l,$p) {
+    if ($l=='this') $l='<urn:urn-n:this>';
+  }
+
+    /**
+    * Applies stuff :)
+    * Expands namespace prefixes etc.
+    * @param array $prefixes
+    * @param array $list
+    * @returns $list
+    * @access private
+    **/
+    function applyStuff($prefixes, $list)
+    {
+        array_walk($list, array($this, 'replace_a_type'));
+        array_walk($list, array($this, 'replace_equal'));
+        array_walk($list, array($this, 'replace_this'));
+
+        for ($i = 0; $i < count($list); $i++) {
+
+            if ($list[$i]=='<>') {
+                if (!isset($path)) {
+                    if (!isset($_SERVER['SERVER_ADDR'])) {
+                        $_SERVER['SERVER_ADDR'] = 'localhost';
+                    }
+                    if (!isset($_SERVER['REQUEST_URI'])) {
+                        $_SERVER['REQUEST_URI'] = '/rdfapi-php';
+                    }
+                    $list[$i] = '<http://'.$_SERVER['SERVER_ADDR'].$_SERVER['REQUEST_URI'].'#generate_timestamp_'.time().'>';
+                } else {
+                    $list[$i] = '<'.$path.'>';
+                };
+            };
+
+
+            if (preg_match('/^[-+]?[0-9]+$/', $list[$i])) {
+                //integer
+                $list[$i] = intval($list[$i]);
+            } else if (is_numeric($list[$i])) {
+                //float or decimal
+                // After conversion we cannot distinguish between both
+                $list[$i] = floatval($list[$i]);
+            } else if ((!strstr('<_"\'?.;,{}[]()@', $list[$i]{0}))
+             && (substr($list[$i],0,3) != '^^<')
+            ) {
+                //prefix or unknown
+                $_r   = explode(':', $list[$i]);
+                $ns   = $_r[0] . ':';
+                $name = $_r[1];
+
+                if (isset($prefixes[$ns])) {
+                    $list[$i] = '<'.$prefixes[$ns].$name.'>';
+                } else if (isset($prefixes[substr($ns, 2)])) {
+                    $list[$i] = '^^' . $prefixes[substr($ns, 2)] . $name . '';
+                } else {
+                    //die('Prefix not declared:'.$ns);
+                    $this->parseError = true;
+                    trigger_error('Prefix not declared: '.$ns, E_USER_ERROR);
+                    break;
+                }
+
+            } else {
+                if ($list[$i]{0} == '"') {
+                    $bLiteral = true;
+                    $chBase   = '"';
+                } else if ($list[$i]{0} == '\'') {
+                    $bLiteral = true;
+                    $chBase   = '\'';
+                } else {
+                    $bLiteral = false;
+                }
+                if ($bLiteral) {
+                    $tripleBase = $chBase . $chBase . $chBase;
+                    // Congratulations - it's a literal!
+                    if (substr($list[$i], 0, 3) == $tripleBase) {
+                        if (substr($list[$i],-3,3) == $tripleBase) {
+                            // A big literal...
+                            $lit = substr($list[$i],3,-3);
+                            //	      print "++$lit++";
+                            $lit=str_replace('\n', '\\n',$lit);
+
+                            //$lit=ereg_replace("[^\\]" . $chBase, "\\" . $chBase, $lit);
+                            $lit = stripslashes($lit);
+
+                            $list[$i] = $chBase . $lit . $chBase;
+                        } else {
+                            die ('Incorrect string formatting: '.substr($list[$i],-3,3));
+                        }
+                    } else {
+                        if (strstr($list[$i],"\n")) {
+                            die('Newline in literal: ' . $list[$i]);
+                        }
+                        $list[$i] = stripslashes($list[$i]);
+                    }
+                }
+            }
+
+            if (substr($list[$i],0,2)=='^^') {
+                if ($list[$i][2]!='<') {
+                    $list[$i] = '^^<' . substr($list[$i], 2) . '>';
+                }
+            };
+
+        }//foreach list item
+
+        return $list;
+    }//function applyStuff($prefixes, $list)
+
+
+
+  /**
+   * Returns an array of triples extracted from the list of n3 tokens
+   * @param array $list
+   * @returns array
+   * @access private
+   **/
+  function getStatements($list) {
+
+
+    $statements = array();
+
+    while (in_array('.', $list)) {
+      //  for($i=0;$i<count($list); $i++) {
+      //    if ($list[$i]==".") {
+      //   while '.' in list {
+      $pos=array_search('.',$list);
+
+      $r=$this->getSpan($list, 0, $pos+1);
+
+      $statement=$r[0];
+      $list = $r[1];
+
+      array_pop($statement);
+      $statements[]=$statement;
+    }
+
+    return $statements;
+  }
+
+  /**
+   * Gets a list of triples with same subject
+   * e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
+   * @param array $list
+   * @returns array
+   * @acces private
+   **/
+  function getPovs($list) {
+    $povs = array();
+    while (in_array(';', $list)) {
+      $r=$this->posns($list,';');
+      $pos=array_slice($r,0,2);
+      $r = $this->getSpan($list, $pos[0], $pos[1]);
+      $pov=$r[0];
+      $list=$r[1];
+
+      // skip lone semicolons, e.g. "<a> <b> <c> ; ."
+      if (count($pov) == 1) continue;
+
+      $povs[]=array_slice($pov,1);
+    }
+
+    return array($list, $povs);
+  }
+
+  /**
+   * Gets a list of triples with same predicate
+   * e.g. :Gunnar :likes "Cheese", "Wine".
+   * @access private
+   * @param array $list
+   * @returns array
+   **/
+  function getObjs($list) {
+
+
+    $objs = array();
+    while (in_array(",",$list)) {
+      $pos=array_search(",",$list);
+      //  for($i=0;$i<count($list); $i++) {
+      //    if ($list[$i]==",") {
+      //   while ',' in list {
+
+
+      $get_array_fields=2;
+      if (isset ($list[$pos+2])) {
+      	if (@$list[$pos+2][0]=='@') $get_array_fields++;
+        if (@$list[$pos+2][0]=='^') $get_array_fields++;
+      };
+      if (isset ($list[$pos+3])) { if (@$list[$pos+3][0]=='^') $get_array_fields++;};
+
+
+      $r=$this->getSpan($list, $pos, ($pos+$get_array_fields));
+
+      $obj=$r[0];
+      if (!isset($obj[2])) $obj[2]=' ';
+      if (!isset($obj[3])) $obj[3]=' ';
+
+      $list=$r[1];
+
+
+      $objs[]=$obj;
+
+
+    }
+
+    return array($list, $objs);
+  }
+
+  /**
+   * Does the real work, returns a list of subject, predicate, object triples.
+   * @param array $list
+   * @returns array
+   * @access private
+   **/
+  function statementize($list) {
+
+    if (count($list) == 1 && preg_match("/_".BNODE_PREFIX."[0-9]+_/",$list[0])) {
+	if ($this->debug) print "Ignored bNode exists statement. $list\n";
+	return array();
+    }
+
+
+
+    if (count($list) == 3) return array($list);
+    if (count($list) < 3) {
+        throw new Exception(
+            'N3 statement too short,'
+            . ' only ' . count($list) . ' elements instead of 3:' . "\n"
+            . implode("\n", $list)
+        );
+    }
+
+    //Get all ;
+    $r=$this->getPovs($list);
+    $spo=$r[0];
+    $po=$r[1];
+    $all=array();
+
+
+
+    //      (spo, po), all = getPovs(list), []
+    $subject = $spo[0];
+    foreach ($po as $pop) {
+      //  for pop in po {
+      $r=$this->getObjs($pop);
+
+      $myPo=$r[0];
+      $obj=$r[1];
+      //myPo, obj = getObjs(pop)
+
+      if (!isset($myPo[2])) $myPo[2]=' ';
+      if (!isset($myPo[3])) $myPo[3]=' ';
+
+
+      $predicate = $myPo[0];
+      $all[]=array($subject,$predicate,$myPo[1],$myPo[2],$myPo[3]);
+      //    all.append([subject, predicate, myPo[1]])
+
+
+
+      foreach ($obj as $o) $all[]=array($subject,$predicate, $o[1],$o[2],$o[3]);
+      //         for x in obj: all.append([subject, predicate, x])
+
+    }
+
+
+
+    $r = $this->getObjs($spo);
+    $spo=$r[0];
+
+    $objs=$r[1];
+
+    //spo, objs = getObjs(spo)
+    $subject=$spo[0];
+    $predicate=$spo[1];
+
+
+    if(!isset($spo[3])) $spo[3]=' ';
+    if(!isset($spo[4])) $spo[4]=' ';
+
+    $all[]=array($subject, $predicate, $spo[2],$spo[3],$spo[4]);
+
+    foreach ($objs as $obj) $all[]=array($subject, $predicate, $obj[1],$obj[2],$obj[3]);
+
+    return $all;
+  }
+
+  /**
+   * Makes lists of elements in list into a seperate array element.
+   * e.g. doLists(["a","b","[","c","]","d"], "[","]")=> ["a","b", ["c"], "d"]
+   * @param array $list
+   * @param string $schar
+   * @param string $echar
+   * @returns array
+   * @access private
+   **/
+  function doLists($list, $schar, $echar) {
+
+    while (in_array($schar, $list)) {
+      //   while schar in list {
+      $ndict        = array();
+      $nestingLevel = 0;
+      $biggest      = 0;
+      for ($i = 0; $i < count($list); $i++) {
+        if ($list[$i] == $schar) {
+            $nestingLevel += 1;
+            if (!in_array($nestingLevel, array_keys($ndict))) {
+              $ndict[$nestingLevel] = array(array($i));
+            } else {
+              $ndict[$nestingLevel][]=array($i);
+            }
+        }
+        if ($list[$i] == $echar) {
+          if (!in_array($nestingLevel, array_keys($ndict))) {
+            $ndict[$nestingLevel]=array(array($i));
+          } else {
+            $ndict[$nestingLevel][count($ndict[$nestingLevel])-1][]=$i;
+            $nestingLevel-= 1;
+# elif type(list[i]) == type([]) {
+#    list[i] = doLists(list[i], schar, echar)
+          }
+        }
+      }
+      foreach (array_keys($ndict) as $key) {
+        if ($key > $biggest)  $biggest = $key;
+      }
+
+      $tol  = $ndict[$biggest][0];
+      $list = $this->listify($list, $tol[0], ($tol[1]+1));
+    }
+    return $list;
+  }
+
+  /**
+   * Apply doLists for all different types of list.
+   * @param array
+   * @returns array
+   * @access private
+   **/
+  function listStuff($list) {
+# y, z = zip(['[', ']'], ['{', '}'], ['(', ')'])
+# return map(doLists, [list, list, list], y, z).pop()
+    $list = $this->doLists($list, '[', ']');
+    $list = $this->doLists($list, '{', '}');
+    return $this->doLists($list, '(', ')');
+  }
+
+  /**
+   * Generates a new node id.
+   * @access private
+   * @returns string
+   **/
+  function bnodeID() {
+
+    $this->bNode++;
+    return "_".BNODE_PREFIX.$this->bNode."_";
+  }
+
+  /**
+   * This makes bNodes out of variables like _:a etc.
+   * @access private
+   * @param array $list
+   * @returns array
+   **/
+  function fixAnon($list) {
+//    $map=array();
+    for($i=0;$i<count($list);$i++) {
+      $l=$list[$i];
+      if (substr($l,0,2)=="_:") {
+	  if (!isset($this->bNodeMap[$l])) {
+	  $a=$this->bnodeID();
+	  $this->bNodeMap[$l]=$a;
+	} else $a=$this->bNodeMap[$l];
+	$list[$i]=$a;
+      }
+    }
+    return $list;
+  }
+
+  /**
+   * This makes [ ] lists into bnodes.
+   * @access private
+   * @param array $list
+   * @return array
+   **/
+  function expandLists($list) {
+
+    for($i=0;$i<count($list);$i++) {
+      if (is_array($list[$i])) {
+	if ( $list[$i][0]=='[' ) {
+	  $bnode=$this->bnodeID();
+	  $prop=$list[$i];
+	  $list[$i]=$bnode;
+	  $list[]=$bnode;
+	  $list=$this->array_concat($list, array_slice($prop,1,-1));
+	  $list[]='.';
+	}elseif($list[$i][0]=='(') {
+
+	    $rdfNil = '<'. RDF_NAMESPACE_URI . RDF_NIL .'>';
+	    $rdfFirst = '<'. RDF_NAMESPACE_URI . RDF_FIRST .'>';
+	    $rdfRest = '<'. RDF_NAMESPACE_URI . RDF_REST .'>';
+
+	    // local copy of list without "(" and ")"
+	    $t_list = array_slice($list[$i], 1, -1);
+
+	    //prepare bnodes
+	    $fromBnode = $this->bnodeID();
+	    $toBnode = $this->bnodeID();
+
+	    //link first bnode into graph
+	    $list[$i] = $fromBnode;
+
+	    $count = count($t_list);
+
+	    //loop through list, convert to RDF linked list
+	    for ($idx = 0; $idx < $count; $idx++){
+
+	        // set rdf:first
+	        $list[] = $fromBnode;
+	        $list[] = $rdfFirst;
+	        $list[] = $t_list[$idx];
+	        $list[] = '.';
+
+	        // set rdf:rest (nil or next bnode)
+	        if ($idx == $count - 1) {
+	            $list[] = $fromBnode;
+	            $list[] = $rdfRest;
+	            $list[] = $rdfNil;
+	            $list[] = '.';
+	        }
+	        else {
+	            $list[] = $fromBnode;
+	            $list[] = $rdfRest;
+	            $list[] = $toBnode;
+	            $list[] = '.';
+
+	            $fromBnode = $toBnode;
+	            $toBnode = $this->bnodeID();
+	        }
+	    }
+	}
+	else {
+	    die('Only [ ] and () lists are supported!');
+	}
+    }
+
+
+    }
+    return $list;
+  }
+
+  /**
+   * Main work-horse function. This converts a N3 string to a list of statements
+   * @param string $s
+   * @returns array
+   * @access private
+   **/
+  function n3tolist($s) {
+
+    //   """Convert an N3 string into a list of triples as strings."""
+    $result = array();
+
+   $t = $this->filterWs($this->toke($s)); # tokenize the stream, and filter whitespace tokens
+
+    if ($this->debug) {
+      print "Filter WS:\n";
+      var_dump($t);
+    }
+    $r=$this->getPrefixes($t); # get the prefix directives, and add to a dict
+    $prefixes=$r[0];
+    $t=$r[1];
+    if ($this->debug) {
+      print "Prefixes:\n";
+      var_dump($prefixes);
+      print "***\n";
+      var_dump($t);
+    }
+    $t=$this->applyStuff($prefixes, $t);#apply prefixes, keywords, and string formatting
+    if ($this->debug) {
+      print "Stuff applied:\n";
+      var_dump($t);
+    }
+
+    $t=$this->fixAnon($t); # fix _:a anons
+    if ($this->debug) {
+      print "Fix anon:\n";
+      var_dump($t);
+    }
+
+    $t = $this->listStuff($t); # apply list stuff: todo
+    if ($this->debug) {
+      print "Lists done:\n";
+      var_dump($t);
+    }
+    $t=$this->expandLists($t);
+    if ($this->debug) {
+      print "Lists applied:\n";
+      var_dump($t);
+    }
+    $t = $this->getStatements($t); # get all of the "statements" from the stream
+
+    foreach ($t as $stat) {
+      $stats = $this->statementize($stat);
+
+      foreach ($stats as $y) {
+        $result[]=$y;
+      }
+    }
+
+    //   for x in [statementize(stat) for stat in t] {
+    //      for y in x: result.append(y)
+    return $result;
+  }
+
+
+
+    /**
+     * Constructs a RAP RDFNode from URI/Literal/Bnode
+     * @access private
+     * @param string $s
+     * @returns object RDFNode
+     **/
+    function toRDFNode($s, $state)
+    {
+        $ins = substr($s, 1, -1);
+        if ($s{0} == '"' || $s{0} == '\'') {
+            $lang = NULL;
+
+            if (count($state)>3) {
+                for ($i = 3; $i < count($state); $i++) {
+                    if ($state[$i][0]=='@') {
+                        $lang = substr($state[3], 1);
+                    }
+                    if (substr($state[$i],0,2) == '^^') {
+                        $dtype = substr($state[$i],2);
+                        if ($dtype[0]=='<') {
+                            $dtype = substr($dtype,1,-1);
+                        }
+                    }
+                }
+            }
+
+
+            if (UNIC_RDF) {
+                $ins = $this->str2unicode_nfc($ins);
+            }
+            $new_Literal = new Literal($ins, $lang);
+            if (isset($dtype)) {
+                $new_Literal->setDatatype($dtype);
+            }
+            return  $new_Literal;
+        } else if (is_int($s)) {
+            $value = new Literal($s);
+            $value->setDatatype(XML_SCHEMA . 'integer');
+            return $value;
+        } else if (is_float($s)) {
+            $value = new Literal($s);
+            $value->setDatatype(XML_SCHEMA . 'double');
+            return $value;
+        } else if ($s == '@true') {
+            $value = new Literal(true);
+            $value->setDatatype(XML_SCHEMA . 'boolean');
+            return $value;
+        } else if ($s == '@false') {
+            $value = new Literal(false);
+            $value->setDatatype(XML_SCHEMA . 'boolean');
+            return $value;
+        }
+
+        if (strstr($s, '_' . BNODE_PREFIX)) {
+            if (($this->FixBnodes) || (!array_search($s,$this->bNodeMap))) {
+                return new BlankNode($ins);
+            } else {
+                return new BlankNode(
+                    trim(
+                        substr(
+                            array_search($s, $this->bNodeMap),
+                            2
+                        )
+                    )
+                );
+            };
+        }
+
+        return new Resource($ins);
+    }//function toRDFNode($s, $state)
+
+
+
+
+} //end: N3Parser
+
+?>
Index: Dev/branches/Demo/rdfapi/syntax/N3Serializer.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/N3Serializer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/N3Serializer.php	(revision 225)
@@ -0,0 +1,526 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: N3Serializer
+// ----------------------------------------------------------------------------------
+
+/**
+ * PHP Notation3 Serializer
+ *
+ * This class serialises models to N3 Syntax.
+ *
+ * Supported N3 features:
+ * <ul>
+ *   <li>Using [ ] for blank nodes, or _: if necessary</li>
+ *   <li>Literal datatype- and xmlLanguageTag support</li>
+ * </ul>
+ *
+ * Un-supported N3 Features include:
+ * <ul>
+ *   <li>Reification</li>
+ * </ul>
+ *
+ *
+ * @author Gunnar AA. Grimnes <ggrimnes@csd.abdn.ac.uk>
+ * @author Daniel Westphal <mail@d-westphal.de>
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @version $Id: N3Serializer.php 556 2008-01-22 10:52:48Z fusel2k $
+ * @package syntax
+ * @access public
+ **/
+
+define('MAGIC_STRING', '~~~');
+
+class N3Serializer extends Object
+{
+
+    var $debug = false;
+
+    var $prefixes   = array();
+    var $noPrefixes = array();
+
+    var $done;  // keeps track of already serialized resources
+    var $resourcetext;
+    var $resourcetext_taken;
+    var $model;
+    var $res;
+    var $anon;
+
+    var $styleCompress = false;
+    var $stylePretty   = false;
+    var $styleNest     = false;
+
+    /**
+    * Constructor
+    *
+    * @access   public
+    */
+    function N3Serializer()
+    {
+        $this->debug = false;
+    }
+
+
+    /**
+    * Adds a new namespace prefix to use.
+    * Unknown namespaces will become ns0, ns1 etc.
+    * @access public
+    * @param string $s
+    * @returns void
+    **/
+    function addNSPrefix($ns, $prefix)
+    {
+        $this->prefixes[$ns] = $prefix;
+    }
+
+
+
+    /**
+    * Clears all previously set namespace prefixes
+    */
+    function clearNSPrefixes()
+    {
+        $this->prefixes = array();
+    }
+
+
+
+    /**
+    *   Add a namespace that shall not get shortened by using a prefix.
+    *
+    *   @param string $ns Namespace URI like "http://example.com/"
+    */
+    function addNoNSPrefix($ns)
+    {
+        $this->noPrefixes[$ns] = true;
+    }
+
+
+
+    /**
+    * Clears all previously set noNamespace prefixes
+    */
+    function clearNoNSPrefixes()
+    {
+        $this->noPrefixes = array();
+    }
+
+
+
+    /**
+    * Serializes a model to N3 syntax.
+    *
+    * @param     object Model $model
+    * @return    string
+    * @access    public
+    */
+    function &serialize(&$m)
+    {
+        if (is_a($m, 'DbModel')) {
+            $m=$m->getMemModel();
+        }
+
+        $this->reset();
+        $this->model = $m;
+        $this->res   = "";
+
+        // copy default namespaces
+        global $default_prefixes;
+        foreach($default_prefixes as $prefix => $namespace) {
+            $this->addNSPrefix($namespace,$prefix);
+        }
+
+        $nps= $this->model->getParsedNamespaces();
+        if ($nps!=false) {
+            foreach ($nps as $uri => $prefix){
+                $this->addNSPrefix($uri,$prefix);
+            }
+        }
+
+        $namespaces = array();
+        $count      = array();
+        $resources  = array();
+        foreach ($this->model->triples as $t) {
+            $s = $t->getSubject();
+            if (is_a($s, 'Resource')) {
+                $namespaces[$s->getNamespace()] = 1;
+            }
+            $p = $t->getPredicate();
+            if (is_a($p, 'Resource')) {
+                $namespaces[$p->getNamespace()] = 1;
+            }
+            $o = $t->getObject();
+            if (is_a($o, 'Resource')) {
+                $namespaces[$o->getNamespace()] = 1;
+            }
+            $uri = $s->getURI();
+
+            if (isset($count[$uri])) {
+                $count[$uri]++;
+            } else {
+                $count[$uri]     = 0;
+                $resources[$uri] = $s;
+            }
+
+            if ($this->styleNest && is_a($s, 'BlankNode')) {
+                //make sure blank nodes are sorted *after* normal nodes
+                //so that they can be included
+                $count[$uri] -= 0.00001;
+            }
+        }
+
+        if (!HIDE_ADVERTISE) {
+            $this->res .= '# Generated by N3Serializer.php from RDF RAP.'.LINEFEED
+                        .'# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'
+                        .LINEFEED.LINEFEED;
+        }
+
+        $this->doNamespaces($namespaces);
+
+        $this->res .= LINEFEED.LINEFEED;
+
+        arsort($count);
+
+        foreach ( $count as $k => $v) {
+            $this->doResource($resources[$k]);
+            //      $this->res.=" .\n";
+        }
+
+        //make all replacements
+        do {
+            $bReplacements = false;
+            foreach ($this->resourcetext as $r => $t) {
+                if (preg_match_all('/'.MAGIC_STRING.'([^ ]+)'.MAGIC_STRING.'/', $t, $ms, PREG_SET_ORDER)) {
+                    foreach ($ms as $mseach) {
+                        $rp = $this->resourcetext[$mseach[1]];
+                        $this->resourcetext[$r] = preg_replace('/'.MAGIC_STRING.$mseach[1].MAGIC_STRING.'/', $rp, $t);
+                        $bReplacements = true;
+                    }
+                }
+
+            }
+        } while ($bReplacements);
+
+        //after all replacements took place, put the lines out
+        $c = 0;
+        foreach ($this->resourcetext as $r => $t) {
+            if ($this->debug) {
+                $this->res .= $c . ': ';
+            }
+            if (!(isset($this->resourcetext_taken[$r]) && $this->resourcetext_taken[$r]>0)) {
+                $this->res .= $t . ' .' . LINEFEED;
+                if ($this->stylePretty) {
+                    $this->res .= LINEFEED;
+                }
+            } else if ($this->debug ) {
+                $this->res.=' Skipping : '.$t.LINEFEED;
+            }
+            $c++;
+        }
+
+    //     $max=-1111;
+    //     $maxkey="";
+    //     foreach ($count as $k=>$c) {
+    //       if ( $c>$max) { $maxkey=$k; $max=$c; }
+    //     }
+
+    //     if ($this->debug) {
+    //       print "$maxkey is subject of most triples! ($max) \n";
+    //     }
+
+        return $this->res;
+    }//function &serialize(&$m)
+
+
+
+    /**
+    * Serializes a model and saves it into a file.
+    * Returns FALSE if the model couldn't be saved to the file.
+    *
+    * @param     object MemModel $model
+    * @param     string $filename
+    * @return    boolean
+    * @access    public
+    */
+    function saveAs(&$model, $filename)
+    {
+        // serialize model
+        $n3 = $this->serialize($model);
+
+        // write serialized model to file
+        $file_handle = @fopen($filename, 'w');
+        if ($file_handle) {
+            fwrite($file_handle, $n3);
+            fclose($file_handle);
+            return true;
+        } else {
+            return false;
+        };
+    }
+
+
+
+    /**
+    * Set to true, if the N3 serializer should try to compress the blank node
+    *  syntax using [] whereever possible.
+    */
+    function setCompress($compress)
+    {
+        $this->styleCompress = $compress;
+    }
+
+
+
+    /**
+    * Enables pretty printing in semicolon delimited sentences.
+    */
+    function setPrettyPrint($prettyPrint)
+    {
+        $this->stylePretty = $prettyPrint;
+    }
+
+
+
+    /**
+    * Enables nesting of blank nodes with [] if
+    * compression is activated via @see setCompress
+    */
+    function setNest($nest)
+    {
+        $this->styleNest = $nest;
+    }
+
+  /* ==================== Private Methods from here ==================== */
+
+
+    /**
+    * Readies this object for serializing another model
+    * @access private
+    * @param void
+    * @returns void
+    **/
+    function reset()
+    {
+        $this->anon               = 0;
+        $this->done               = array();
+        $this->resourcetext_taken = array();
+        $this->resourcetext       = array();
+        $this->res                = '';
+        $this->model              = null;
+    }
+
+
+
+    /**
+    * Makes ns0, ns1 etc. prefixes for unknown prefixes.
+    * Outputs @prefix lines.
+    * @access private
+    * @param array $n
+    * @returns void
+    **/
+    function doNamespaces(&$n)
+    {
+        $c = 0;
+        foreach ($n as $ns => $nonsense) {
+            if (!$ns || isset($this->noPrefixes[$ns])) {
+                continue;
+            }
+            if (isset($this->prefixes[$ns])) {
+                $p = $this->prefixes[$ns];
+            } else {
+                $p = 'ns' . $c;
+                $this->prefixes[$ns] = $p;
+                $c++;
+            }
+            $this->res .= "@prefix $p: <".$ns.'> .'.LINEFEED;
+        }
+    }
+
+
+
+    /**
+    * Fill in $resourcetext for a single resource.
+    * Will recurse into Objects of triples, but should never look ? (really?)
+    * @param object Resource $r
+    * @returns boolean
+    * @access private
+    **/
+    function doResource(&$r, $bEmbedded = false, $strIndent = '    ')
+    {
+        //var_dump($r->getURI());
+
+        $ts = $this->model->find($r, null, null);
+        if (count($ts->triples) == 0) {
+            if ($bEmbedded) {
+                $this->resourcetext[$r->getURI()] = '_:' . $r->getLabel();
+            }
+            return;
+        }
+
+        $out = '';
+
+        if (isset($this->done[$r->getURI()]) && $this->done[$r->getURI()]) {
+            if (!$this->styleNest && is_a($r, 'BlankNode')) {
+                if ($this->resourcetext_taken[$r->getURI()] == 1) {
+                    //Oh bother, we must use the _:blah construct.
+                    $a = $this->resourcetext[$r->getURI()];
+                    $this->resourcetext[$r->getURI()]='_:anon'.$this->anon;
+                    $this->resourcetext['_:anon'.$this->anon]=$this->fixAnon($a, '_:anon'.$this->anon);
+                    $this->resourcetext_taken[$r->getURI()]=2;
+                    $this->anon++;
+                }
+            }
+            return false;
+        }
+
+        $this->done[$r->getURI()] = true;
+        $compress = false;
+
+        if (is_a($r, 'Resource')) {
+            if (is_a($r, 'BlankNode')) {
+                //test if this blanknode is referenced somewhere
+                $rbn      = $this->model->find(null, null, $r);
+                $compress = (N3SER_BNODE_SHORT || $this->styleCompress)
+                            && (
+                                count($rbn->triples) == 0
+                                || (count($rbn->triples) == 1 && $bEmbedded)
+                            );
+                if ($compress) {
+                    $out.='[';
+                } else {
+                    $out.='_:'.$r->getLabel();
+                }
+            } else {
+                $this->doURI($r, $out);
+            }
+        }
+
+        usort($ts->triples, 'statementsorter');
+        $lastp = '';
+        $out  .= ' ';
+
+        foreach ($ts->triples as $t) {
+            $p = $t->getPredicate();
+
+            if ($p === $lastp) {
+                $out .= ' , ';
+            } else {
+                if ($lastp!='') {
+                    if ($this->stylePretty) {
+                        $out .= ";\n" . $strIndent;
+                    } else {
+                        $out .= ' ; ';
+                    }
+                }
+                $this->doURI($p, $out);
+                $lastp = $p;
+            }
+
+            $out .= ' ';
+
+            $o = $t->getObject();
+
+            if (is_a($o, 'Literal')) {
+                $l = $o->getLabel();
+                if (strpos($l, LINEFEED) === false) {
+                    $long = false;
+                } else {
+                    $long = true;
+                }
+
+                //try to be intelligent
+                $quoteSingle = strpos($l, '\'') !== false;
+                $quoteDouble = strpos($l, '"')  !== false;
+                if ($quoteSingle && !$quoteDouble) {
+                    $quoteChar = $long ? '"""' : '"';
+                } else if ($quoteDouble && !$quoteSingle) {
+                    $quoteChar = $long ? '\'\'\'' : '\'';
+                } else if ($quoteDouble && $quoteSingle) {
+                    //both quotation chars inside
+                    $quoteChar = $long ? '"""' : '"';
+                    $l = addslashes($l);
+                } else {
+                    //no quotation chars
+                    $quoteChar = $long ? '"""' : '"';
+                }
+                $out .= $quoteChar . $l . $quoteChar;
+
+                if ( $o->getLanguage()!='' ) {
+                    $out.='@'.$o->getLanguage();
+                }
+                if ( $o->getDatatype()!='' ) {
+                    $out.='^^<'.$o->getDatatype().'>';
+                }
+            }
+
+            if (is_a($o, 'Resource')) {
+                if ($this->debug) {
+                    print 'Doing object: '.$o->getURI().LINEFEED;
+                }
+                if (is_a($o, 'BlankNode')) {
+                    if ($this->styleNest && $this->styleCompress
+                     && !isset($this->done[$o->getURI()])
+                    ) {
+                        $this->doResource($o, true, $strIndent . '    ');
+                        $out .= MAGIC_STRING . $o->getURI() . MAGIC_STRING;
+                        //$out .= $this->resourcetext[$o->getURI()];
+                        $this->resourcetext_taken[$o->getURI()] = 1;
+                    } else {
+                        $out .= '_:'.$o->getLabel();
+                    }
+                } else {
+                    $this->doURI($o, $out);
+                }
+            }
+        }
+
+        if ($compress) {
+            $out .= ' ]';
+        };
+
+        $this->resourcetext[$r->getURI()]=$out;
+
+        return true;
+    }//function doResource(&$r)
+
+
+
+    /**
+    * Format a single URI
+    * @param string $s
+    * @return void
+    * @access private
+    **/
+    function doURI(&$r, &$out)
+    {
+        if ($r->getURI() == 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') {
+            $out .= 'a';
+            return;
+        }
+        $ns = $r->getNamespace();
+        if ($ns != '' && !isset($this->noPrefixes[$ns])) {
+            $out .= $this->prefixes[$ns].':'.$r->getLocalName();
+        } else {
+            //Will this ever happen? It does, now.
+            $out .= '<' . $r->getURI() . '>';
+        }
+    }
+
+
+
+    /**
+    * Fix the resourcetext for a blanknode where the _: construct was used
+    * @param string $s
+    * @param string $a
+    * @access private
+    * @return void
+    **/
+    function fixAnon($t,$a)
+    {
+        $t = preg_replace("/( \] $|^\[ )/", '', $t);
+        return $a . $t;
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/syntax/NTripleSerializer.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/NTripleSerializer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/NTripleSerializer.php	(revision 225)
@@ -0,0 +1,133 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: NTripleSerializer
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * PHP N-Triple Serializer
+ * 
+ * This class serialises models to N-Triple Syntax.
+ * 
+ *
+ *
+ * @author Daniel Westphal <mail@d-westphal.de>
+ * @version $Id: NTripleSerializer.php 268 2006-05-15 05:28:09Z tgauss $
+ * @package syntax
+ * @access public
+ **/
+
+
+
+class NTripleSerializer extends Object {
+
+  var $debug; 
+  var $model;
+  var $res; 
+
+  
+  
+  
+
+   /**
+    * Constructor
+    *
+    * @access   public
+    */
+  function NTripleSerializer() { 
+    $this->debug=FALSE;
+  }
+ 
+  /**
+   * Serializes a model to N Triple syntax.
+   *
+   * @param     object Model $model
+   * @return    string
+   * @access    public
+   */
+  function & serialize(&$m) { 
+
+        if (is_a($m, 'DbModel')) $m = $m->getMemModel();
+    
+    $this->reset();
+    if (!HIDE_ADVERTISE) {
+        $this->res .= '# Generated by NTripleSerializer.php from RDF RAP.' .
+            LINEFEED . '# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html'.
+            LINEFEED . LINEFEED;
+    }
+
+    foreach ($m->triples as $t) { 
+
+      $s=$t->getSubject();
+      if (is_a($s, 'Blanknode')) {
+      	$subject='_:'.$s->getURI();
+      } else {
+          $subject = '<' . preg_replace("' '", "''", $s->getURI()) . '>';
+      }
+
+	  $p=$t->getPredicate();  
+	  $predicate='<'.preg_replace("' '", "''", $p->getURI()).'>';
+
+	  $o=$t->getObject();     
+      if (is_a($o, 'literal')) {
+	  	$object='"'.$o->getLabel().'"';
+	  	if ($o->getLanguage()!='') $object.='@'.$o->getLanguage();		  	
+	  	if ($o->getDatatype()!='') $object.='^^<'.$o->getDatatype().">";		  	
+	  } elseif (is_a($o, 'Blanknode')) {
+	    $object='_:'.$o->getURI();
+	  } else {$object='<'.preg_replace("' '", "''", $o->getURI()).'>';};	
+		
+      $this->res.=$subject.' '.$predicate.' '.$object.' .';
+      $this->res.=LINEFEED.LINEFEED;
+    }
+   
+    return $this->res;
+  } 
+  
+
+/**
+ * Serializes a model and saves it into a file.
+ * Returns FALSE if the model couldn't be saved to the file.
+ *
+ * @access	public
+ * @param     object MemModel $model
+ * @param     string $filename
+ * @return    boolean
+ * @access    public
+ */
+ function  saveAs(&$model, $filename) {
+
+   // serialize model
+   $n3 = $this->serialize($model);
+
+   // write serialized model to file
+   $file_handle = @fopen($filename, 'w');
+   if ($file_handle) {
+      fwrite($file_handle, $n3);
+      fclose($file_handle);
+      return TRUE;
+   }else{
+      return FALSE;
+   };
+ }
+  
+
+  /* ==================== Private Methods from here ==================== */
+
+
+/**
+ * Readies this object for serializing another model
+ * @access private
+ * @param void
+ * @returns void 
+ **/
+  function reset() {
+    $this->res="";
+    $this->model=NULL;
+  }
+
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/syntax/RdfParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/RdfParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/RdfParser.php	(revision 225)
@@ -0,0 +1,2365 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RdfParser
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * An RDF paser.
+ * This class reads RDF data from files or URIs and generates models out of it. All valid
+ * RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised)
+ * - W3C Working Draft 10 October 2003
+ * (http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported.
+ * The parser is based on the PHP version of repat
+ * (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html)
+ * by Luis Argerich (lrargerich@yahoo.com).
+ *
+ * @version  $Id: RdfParser.php 493 2007-08-12 17:43:07Z cweiske $
+ * @author Luis Argerich <lrargerich@yahoo.com>,
+ *         Chris Bizer <chris@bizer.de>,
+ *         Radoslaw Oldakowski <radol@gmx.de>
+ *		   Daniel Westphal <mail@d-westphal.de>
+ * @package syntax
+ * @access	public
+ *
+ */
+
+class RdfParser extends Object {
+
+var $rdf_parser;
+var $model;
+
+/* Private Methods */
+
+
+/**
+* converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
+*
+* @param String $str
+* @return String
+* @access private
+*
+*/
+function str2unicode_nfc($str=""){
+	$result="";
+	/* try to detect encoding */
+	$tmp=str_replace("?", "", $str);
+	if(strpos(utf8_decode($tmp), "?")===false){
+		$str=utf8_decode($str);
+	}
+	for($i=0,$i_max=strlen($str);$i<$i_max;$i++){
+		$nr=0;/* unicode dec nr */
+		/* char */
+		$char=$str[$i];
+		/* utf8 binary */
+		$utf8_char=utf8_encode($char);
+		$bytes=strlen($utf8_char);
+		if($bytes==1){
+			/* 0####### (0-127) */
+			$nr=ord($utf8_char);
+		}
+		elseif($bytes==2){
+			/* 110##### 10###### = 192+x 128+x */
+			$nr=((ord($utf8_char[0])-192)*64) + (ord($utf8_char[1])-128);
+		}
+		elseif($bytes==3){
+			/* 1110#### 10###### 10###### = 224+x 128+x 128+x */
+			$nr=((ord($utf8_char[0])-224)*4096) + ((ord($utf8_char[1])-128)*64) + (ord($utf8_char[2])-128);
+		}
+		elseif($bytes==4){
+			/* 1111#### 10###### 10###### 10###### = 240+x 128+x 128+x 128+x */
+			$nr=((ord($utf8_char[0])-240)*262144) + ((ord($utf8_char[1])-128)*4096) + ((ord($utf8_char[2])-128)*64) + (ord($utf8_char[3])-128);
+		}
+		/* result (see http://www.w3.org/TR/rdf-testcases/#ntrip_strings) */
+		if($nr<9){/* #x0-#x8 (0-8) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr==9){/* #x9 (9) */
+			$result.='\t';
+		}
+		elseif($nr==10){/* #xA (10) */
+			$result.='\n';
+		}
+		elseif($nr<13){/* #xB-#xC (11-12) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr==13){/* #xD (13) */
+			$result.='\t';
+		}
+		elseif($nr<32){/* #xE-#x1F (14-31) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr<34){/* #x20-#x21 (32-33) */
+			$result.=$char;
+		}
+		elseif($nr==34){/* #x22 (34) */
+			$result.='\"';
+		}
+		elseif($nr<92){/* #x23-#x5B (35-91) */
+			$result.=$char;
+		}
+		elseif($nr==92){/* #x5C (92) */
+			$result.='\\';
+		}
+		elseif($nr<127){/* #x5D-#x7E (93-126) */
+			$result.=$char;
+		}
+		elseif($nr<65536){/* #x7F-#xFFFF (128-65535) */
+			$result.="\\u".sprintf("%04X",$nr);
+		}
+		elseif($nr<1114112){/* #x10000-#x10FFFF (65536-1114111) */
+			$result.="\\U".sprintf("%08X",$nr);
+		}
+		else{
+			/* other chars are not defined => ignore */
+		}
+	}
+	return $result;
+}
+
+
+
+
+/**
+ * @access	private
+ */
+function _new_element()
+{
+    $e['parent']=Array();  // Parent is a blank Array
+    $e['state']=0;
+    $e['has_property_atributes']=0;
+    $e['has_member_attributes']=0;
+    $e['subject_type']=0;
+    $e['subject']='';
+    $e['predicate']='';
+    $e['ordinal']=0;
+    $e['members']=0;
+    $e['data']='';
+    $e['xml_lang']='';
+    $e['bag_id']='';
+    $e['statements']=0;
+    $e['statement_id']='';
+    $e['datatype']='';
+    $e['element_base_uri'] = '';
+
+    return $e;
+}
+
+/**
+
+ * @param string $source
+ * @param string &$destination
+ *
+ * @access	private
+ */
+function _copy_element($source, &$destination )
+{
+    if( $source )
+    {
+        $destination['parent'] = $source;
+        $destination['state'] = $source['state'];
+        $destination['xml_lang'] = $source['xml_lang'];
+    	$destination['element_base_uri'] = $source['element_base_uri'];
+    }
+}
+
+  /**
+   * @param string &$e
+   * @access	private
+   */
+function _clear_element(&$e)
+{
+        $e['subject']='';
+        $e['predicate']='';
+        $e['data']='';
+        $e['bag_id']='';
+        $e['statement_id']='';
+
+        if(isset($e['parent'])) {
+          if( $e['parent'] )
+          {
+              if( $e['parent']['xml_lang'] != $e['xml_lang'] )
+              {
+                  $e['xml_lang']='';
+              }
+          }
+          else
+          {
+              $e['xml_lang']='';
+          }
+        } else {
+            $e['xml_lang']='';
+        }
+
+        $e['parent']=Array();
+        $e['state']=0;
+        $e['has_property_attributes']=0;
+        $e['has_member_attributes']=0;
+        $e['subject_type']=0;
+        $e['subject']='';
+        $e['predicate']='';
+        $e['ordinal']=0;
+        $e['members']=0;
+        $e['data']='';
+        $e['xml_lang']='';
+        $e['bag_id']='';
+        $e['statements']=0;
+        $e['statement_id']='';
+		$e['datatype']='';
+    	$e['element_base_uri'] = '';
+}
+
+  /**
+   * @access	private
+   */
+function _push_element()
+{
+    if(!isset($this->rdf_parser['free'])) {
+        $this->rdf_parser['free']=Array();
+    }
+    if(count($this->rdf_parser['free'])>0)
+    {
+        $e = $this->rdf_parser['free'];
+        if(isset($e['parent'])) {
+          $this->rdf_parser['free'] = $e['parent'];
+        } else {
+          $this->rdf_parser['free']=$this->_new_element();
+        }
+    }
+    else
+    {
+        $e = $this->_new_element();
+    }
+    if(!isset($this->rdf_parser['top'])) {
+      $this->rdf_parser['top']=Array();
+    }
+    $this->_copy_element( $this->rdf_parser['top'], $e );
+    $this->rdf_parser['top'] = $e;
+}
+
+  /**
+   * @access	private
+   */
+function _pop_element()
+{
+    $e = $this->rdf_parser['top'];
+    $this->rdf_parser['top'] = $e['parent'];
+    $this->_clear_element( $e );
+    $this->rdf_parser['free'] = $e;
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_rdf_property_attribute_resource($local_name )
+{
+    return ( $local_name == RDF_TYPE );
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_rdf_property_attribute_literal($local_name )
+{
+    return ( $local_name == RDF_VALUE )
+		|| ( $local_name == RDF_BAG )
+		|| ( $local_name == RDF_SEQ )
+		|| ( $local_name == RDF_ALT )
+		|| ( $local_name == RDF_STATEMENT )
+		|| ( $local_name == RDF_PROPERTY )
+		|| ( $local_name == RDF_LIST );
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_rdf_ordinal( $local_name )
+{
+    $ordinal = -1;
+
+    if( $local_name{0} ==  '_'  )
+    {
+        $ordinal =  substr($local_name,1) + 1 ;
+    }
+
+    return ( $ordinal > 0 ) ? $ordinal : 0;
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_rdf_property_attribute( $local_name )
+{
+    return $this->_is_rdf_property_attribute_resource( $local_name )
+        || $this->_is_rdf_property_attribute_literal( $local_name );
+}
+
+function _is_forbidden_rdf_property_attribute($local_name)
+{
+	return ( $local_name == RDF_RDF )
+		|| ( $local_name == RDF_DESCRIPTION)
+        || ( $local_name == RDF_ID)
+        || ( $local_name == RDF_ABOUT )
+        || ( $local_name == RDF_BAG_ID )
+        || ( $local_name == RDF_PARSE_TYPE )
+        || ( $local_name == RDF_RESOURCE )
+        || ( $local_name == RDF_NODEID )
+        || ( $local_name == RDF_LI )
+        || ( $local_name == RDF_ABOUT_EACH )
+		|| ( $local_name == RDF_ABOUT_EACH_PREFIX )
+		|| ( $local_name == RDF_DATATYPE );
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_rdf_property_element( $local_name )
+{
+    return (  $local_name == RDF_TYPE )
+        || (  $local_name == RDF_SUBJECT )
+        || (  $local_name == RDF_PREDICATE )
+        || (  $local_name == RDF_OBJECT )
+        || (  $local_name == RDF_VALUE )
+        || (  $local_name == RDF_LI )
+        || (  $local_name == RDF_SEEALSO )
+		|| ( $local_name == RDF_BAG )
+		|| ( $local_name == RDF_SEQ )
+		|| ( $local_name == RDF_ALT )
+		|| ( $local_name == RDF_STATEMENT )
+		|| ( $local_name == RDF_PROPERTY )
+		|| ( $local_name == RDF_LIST )
+		|| ( $local_name == RDF_FIRST )
+		|| ( $local_name == RDF_REST )
+        || (  $local_name{0} == '_'  );
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_forbidden_rdf_property_element ($local_name)
+{
+	return ( $local_name == RDF_RDF )
+		|| ( $local_name == RDF_DESCRIPTION)
+        || ( $local_name == RDF_ID)
+        || ( $local_name == RDF_ABOUT )
+        || ( $local_name == RDF_BAG_ID )
+        || ( $local_name == RDF_PARSE_TYPE )
+        || ( $local_name == RDF_RESOURCE )
+        || ( $local_name == RDF_NODEID )
+        || ( $local_name == RDF_ABOUT_EACH )
+		|| ( $local_name == RDF_ABOUT_EACH_PREFIX )
+		|| ( $local_name == RDF_DATATYPE );
+}
+
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_rdf_node_element( $local_name )
+{
+    return ( $local_name == RDF_DESCRIPTION )
+        || ( $local_name == RDF_STATEMENT )
+        || ( $local_name == RDF_SUBJECT )
+        || ( $local_name == RDF_PREDICATE )
+        || ( $local_name == RDF_OBJECT )
+        || ( $local_name == RDF_PROPERTY )
+		|| ( $local_name == RDF_TYPE )
+        || ( $local_name == RDF_VALUE )
+		|| ( $local_name == RDF_BAG )
+		|| ( $local_name == RDF_SEQ )
+		|| ( $local_name == RDF_ALT )
+        || ( $local_name == RDF_SEEALSO )
+		|| ( $local_name == RDF_LIST )
+		|| ( $local_name == RDF_FIRST )
+		|| ( $local_name == RDF_REST )
+		|| ( $local_name == RDF_NIL )
+        || ( $local_name{0} == '_'  );
+}
+
+  /**
+   * @param string $local_name
+   * @access	private
+   */
+function _is_forbidden_rdf_node_element ($local_name)
+{
+	return ( $local_name == RDF_RDF )
+        || ( $local_name == RDF_ID)
+        || ( $local_name == RDF_ABOUT )
+        || ( $local_name == RDF_BAG_ID )
+        || ( $local_name == RDF_PARSE_TYPE )
+        || ( $local_name == RDF_RESOURCE )
+        || ( $local_name == RDF_NODEID )
+		|| ( $local_name == RDF_LI )
+        || ( $local_name == RDF_ABOUT_EACH )
+		|| ( $local_name == RDF_ABOUT_EACH_PREFIX )
+		|| ( $local_name == RDF_DATATYPE );
+}
+
+  /**
+   * @param string $val
+   * @access	private
+   */
+function _istalnum($val) {
+  return preg_match('/([A-Za-z0-9])/',$val);
+}
+  /**
+   * @param string $val
+   * @access	private
+   */
+function _istalpha($val) {
+  return preg_match('/([A-Za-z])/',$val);
+}
+
+  /**
+   * @param string $uri
+   * @access	private
+   */
+function _is_absolute_uri($uri )
+{
+    $result = false;
+        $uri_p=0;
+    if( $uri && $this->_istalpha( $uri{$uri_p} ) )
+    {
+        ++$uri_p;
+
+        while( ($uri_p<strlen($uri))
+            && ( $this->_istalnum( $uri{$uri_p} )
+                || ( $uri{$uri_p} ==  '+'  )
+                || ( $uri{$uri_p} == '-'  )
+                || ( $uri{$uri_p} ==  '.'  ) ) )
+        {
+                ++$uri_p;
+        }
+
+        $result = ( $uri{$uri_p} == ':'  );
+    }
+    return $result;
+}
+
+
+/*
+   * This function returns an associative array returning any of the various components of the URL that are present. This includes the
+   * $arr=parse_url($url)
+   * scheme - e.g. http
+   * host
+   * port
+   * user
+   * pass
+   * path
+   * query - after the question mark ?
+   * fragment - after the hashmark #
+   *
+   * @param string $uri
+   * @param string $buffer
+   * @param string &$scheme
+   * @param string &$authority
+   * @param string &$path
+   * @param string &$query
+   * @param string &$fragment
+   * @access	private
+*/
+function _parse_uri($uri,$buffer,&$scheme,&$authority,&$path,&$query,&$fragment ) {
+
+  $parsed=parse_url($uri);
+  if(isset($parsed['scheme'])) {
+    $scheme=$parsed['scheme'];
+  } else {
+    $scheme='';
+  }
+  if(isset($parsed['host'])) {
+    $host=$parsed['host'];
+  } else {
+    $host='';
+  }
+  if(isset($parsed['host'])) {
+    $authority=$parsed['host'];
+  } else {
+    $authority='';
+  }
+  if(isset($parsed['path'])) {
+    $path=$parsed['path'];
+  } else {
+    $path='';
+  }
+  if(isset($parsed['query'])) {
+    $query=$parsed['query'];
+  } else {
+    $query='';
+  }
+  if(isset($parsed['fragment'])) {
+    $fragment=$parsed['fragment'];
+  } else {
+    $fragment='';
+  }
+
+}
+
+/**
+   * @param string $base_uri
+   * @param string $reference_uri
+   * @param string &$buffer
+   * @access	private
+*/
+function _resolve_uri_reference($base_uri,$reference_uri,&$buffer )
+{
+	if ($reference_uri == '')
+		return ($buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri));
+
+    $base_buffer='';
+    $reference_buffer='';
+    $path_buffer='';
+
+    $buffer = '';
+
+    $this->_parse_uri($reference_uri,
+    				  $reference_buffer,
+    				  $reference_scheme,
+    				  $reference_authority,
+                      $reference_path,
+                      $reference_query,
+                      $reference_fragment );
+
+    $this->_parse_uri($base_uri,
+            		  $base_buffer,
+            		  $base_scheme,
+            		  $base_authority,
+            		  $base_path,
+            		  $base_query,
+            	      $base_fragment );
+
+    if( $reference_scheme == ''
+        && $reference_authority == ''
+        && $reference_path == ''
+        && $reference_query == '' )
+    {
+        $buffer=$base_uri;
+
+        if( $reference_fragment != '' )
+        {
+			if ($base_path == '' || $base_path == '/' || $base_path == "\\") {
+			   $buffer = $this->rdf_parser['document_base_uri'];
+			}
+			else
+			{
+				$buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri);
+			}
+
+            // CB: Changed for base URI
+			$c = substr($buffer, strlen($buffer)-1 ,1);
+	        if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
+			       $buffer.= '#' ;
+            $buffer.=$reference_fragment;
+
+        }
+    }
+    else if( $reference_scheme != '' )
+    {
+        $buffer=$reference_uri;
+    }
+    else
+    {
+        $result_scheme = $base_scheme;
+        $result_path = '';
+
+        if( $reference_authority != '' )
+        {
+            $result_authority = $reference_authority;
+        }
+        else
+        {
+            $result_authority = $base_authority;
+
+            if ($reference_path != '')
+            {
+            	if ($reference_path{0} == '/' || $reference_path{0} == "\\")
+            	{
+            		if ($reference_path{1} == '/' || $reference_path{1} == "\\")
+            		{
+						$result_authority = '';
+						$result_path = $reference_path;
+            		}
+            		else
+            			$result_path = $reference_path;
+            	}
+            	elseif (substr($reference_path, 0, 3) == '../' ||
+            	        substr($reference_path, 0, 3) == '..\\')
+            	{
+            		$slash = $reference_path{2};
+            		while($base_path != '' && ( substr($reference_path, 0, 3) == '../'
+            	                             || substr($reference_path, 0, 3) == '..\\'))
+            	    {
+            		  	$base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path);
+            		  	if ($base_path != '') {
+            		  	   $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path);
+            		  	   $reference_path = substr($reference_path, 3);
+            		  	}
+            		}
+
+                    $result_path = $base_path .$slash .$reference_path;
+            	}
+            	else
+            	{
+            		if ($base_path)
+            			$result_path = preg_replace("/[^\/\\\]*$/", $reference_path, $base_path, 1);
+					else
+					    $result_path = '/' .$reference_path;
+            	}
+            }
+
+        }
+
+        if( $result_scheme != '' )
+        {
+            $buffer=$result_scheme;
+            $buffer.=':';
+        }
+
+        if( $result_authority != '' )
+        {
+            $buffer.="//";
+            $buffer.=$result_authority;
+        }
+
+        if( $result_path != '' )
+        {
+            $buffer.=$result_path;
+        }
+
+        if( $reference_query != '' )
+        {
+            $buffer.='?';
+            $buffer.=$reference_query;
+        }
+
+        if( $reference_fragment != '' )
+        {
+            $buffer.='#';
+            $buffer.=$reference_fragment;
+        }
+    }
+}
+
+
+/**
+   * IDs which contain CombiningChars or Extenders
+   * (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid.
+   * If you want to use IDs containing these characters you can turn off
+   * the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php).
+   *
+   * @param string $id
+   * @access	private
+*/
+function is_valid_id($id )
+{
+	if (!VALIDATE_IDS)
+		return TRUE;
+
+    $result = FALSE;
+
+    if( $id )
+    {
+        if( $this->_istalpha($id{0}) || $id{0} == '_')
+        {
+            $result = TRUE;
+            $i=0;
+            $len = strlen($id);
+			while( $result != FALSE && ++$i < $len )
+            {
+                if( !($this->_istalnum( $id{$i})
+                      || $id{$i} == '.'
+                      || $id{$i} == '-'
+                      || $id{$i} == '_'))
+                {
+                   $result = FALSE;
+                }
+            }
+        }
+    }
+
+    if (!$result)
+    	$this->_report_error('illegal ID, nodeID or bagID attribute value');
+    else
+    	return TRUE;
+}
+
+/**
+   * @param string $id
+   * @param string &$buffer
+   * @access	private
+*/
+function _resolve_id($id,&$buffer )
+{
+    $id_buffer='';
+
+    if( $this->is_valid_id($id) )
+    {
+        $id_buffer="#$id";
+    }
+
+    $this->_resolve_uri_reference( $this->rdf_get_base(), $id_buffer, $buffer );
+
+}
+
+/**
+   * @param string $name
+   * @param string &$buffer
+   * @param string &$namespace_uri
+   * @param string &$local_name
+   * @access	private
+*/
+function _split_name($name, &$buffer, &$namespace_uri, &$local_name )
+{
+    static $nul = 0;
+    $buffer=$name;
+
+        if(  strstr( $buffer, NAMESPACE_SEPARATOR_CHAR ) )
+        {
+            $cosas=explode(NAMESPACE_SEPARATOR_CHAR,$buffer);
+            $namespace_uri = $cosas[0];
+            $local_name = $cosas[1];
+        }
+        else
+        {
+            if( ( $buffer{ 0 } ==  'x'  )
+                && ( $buffer{ 1 } ==  'm'  )
+                && ( $buffer{ 2 } ==  'l'  )
+                && ( $buffer{ 3 } ==  ':'  ) )
+            {
+                $namespace_uri = XML_NAMESPACE_URI;
+                $local_name = substr($buffer,4);
+            }
+            else
+            {
+                $namespace_uri = '';
+                $local_name = $buffer;
+            }
+        }
+}
+/**
+   * @param string &$buf
+   * @access	private
+*/
+function _generate_anonymous_uri(&$buf )
+{
+    $id='';
+    if(!isset($this->rdf_parser['anonymous_id'])) {
+      $this->rdf_parser['anonymous_id']=0;
+    }
+    $this->rdf_parser['anonymous_id']++;
+
+    $buf= BNODE_PREFIX . $this->rdf_parser['anonymous_id'];
+
+}
+/**
+   * @param string $subject_type
+   * @param string $subject
+   * @param string $predicate
+   * @param string $ordinal
+   * @param string $object_type
+   * @param string $object
+   * @param string $xml_lang
+   * @param string $bag_id
+   * @param string $statements
+   * @param string $statement_id
+   * @access	private
+*/
+function _report_statement( $subject_type, $subject, $predicate, $ordinal, $object_type,  $object, $xml_lang, $bag_id, $statements, $statement_id, $datatype )
+{
+    $statement_id_type = RDF_SUBJECT_TYPE_URI;
+    $statement_id_buffer='';
+    $predicate_buffer='';
+    if (!$xml_lang && $object_type == RDF_OBJECT_TYPE_LITERAL && isset($this->rdf_parser['document_xml_lang']))
+    	$xml_lang = $this->rdf_parser['document_xml_lang'];
+
+	 // call add statement
+	 $this->add_statement_to_model($this->rdf_parser['user_data'],$subject_type,$subject,$predicate,$ordinal,$object_type,$object,$xml_lang, $datatype );
+
+        if( $bag_id )
+        {
+            if( $statements == '' )
+            {
+                $this->_report_statement(RDF_SUBJECT_TYPE_URI,
+                    $bag_id,
+                    RDF_NAMESPACE_URI.RDF_TYPE,
+                    0,
+                    RDF_OBJECT_TYPE_RESOURCE,
+                    RDF_NAMESPACE_URI.RDF_BAG,
+                    '',
+                    '',
+                    '',
+                    '',
+					$datatype );
+            }
+
+            if( ! $statement_id )
+            {
+                $statement_id_type = RDF_SUBJECT_TYPE_BNODE;
+                $this->_generate_anonymous_uri( $statement_id_buffer );
+                $statement_id = $statement_id_buffer;
+            }
+            $statements++;
+            $predicate_buffer='RDF_NAMESPACE_URI_'.$statements;
+
+            $this->_report_statement(
+                RDF_SUBJECT_TYPE_URI,
+                $bag_id,
+                $predicate_buffer,
+                $statements,
+                RDF_OBJECT_TYPE_BNODE,
+                $statement_id,
+                '',
+                '',
+                '',
+                '',
+				$datatype );
+        }
+
+        if( $statement_id )
+        {
+            // rdf:type = rdf:Statement
+            $this->_report_statement(
+                $statement_id_type,
+                $statement_id,
+                RDF_NAMESPACE_URI.RDF_TYPE,
+                0,
+                RDF_OBJECT_TYPE_RESOURCE,
+                RDF_NAMESPACE_URI.RDF_STATEMENT,
+                '',
+                '',
+                '',
+                '',
+				$datatype );
+
+			if ($subject_type == RDF_SUBJECT_TYPE_BNODE)
+			   $obj_type = RDF_OBJECT_TYPE_BNODE;
+			else
+			   $obj_type = RDF_OBJECT_TYPE_RESOURCE;
+
+
+            // rdf:subject
+            $this->_report_statement(
+                $statement_id_type,
+                $statement_id,
+                RDF_NAMESPACE_URI.RDF_SUBJECT,
+                0,
+				$obj_type,
+                $subject,
+                '',
+                '',
+                '',
+                '',
+				$datatype );
+
+            // rdf:predicate
+            $this->_report_statement(
+                $statement_id_type,
+                $statement_id,
+                RDF_NAMESPACE_URI.RDF_PREDICATE,
+                0,
+                RDF_OBJECT_TYPE_RESOURCE,
+                $predicate,
+                '',
+                '',
+                '',
+                '',
+				$datatype );
+
+            // rdf:object
+            $this->_report_statement(
+                $statement_id_type,
+                $statement_id,
+                RDF_NAMESPACE_URI.RDF_OBJECT,
+                0,
+                $object_type,
+                $object,
+                '',
+                '',
+                '',
+                '',
+				$datatype );
+        }
+}
+/**
+   * @param string $subject_type
+   * @param string $subject
+   * @param string $attributes
+   * @param string $xml_lang
+   * @param string $bag_id
+   * @param string $statements
+ * @access	private
+*/
+function _handle_property_attributes($subject_type, $subject, $attributes, $xml_lang, $bag_id, $statements )
+{
+    $i=0;
+
+    $attribute='';
+    $predicate='';
+
+    $attribute_namespace_uri='';
+    $attribute_local_name='';
+    $attribute_value='';
+
+    $ordinal=0;
+
+    for( $i = 0; isset($attributes[ $i ]); $i += 2 )
+    {
+        $this->_split_name(
+            $attributes[ $i ],
+            $attribute,
+            $attribute_namespace_uri,
+            $attribute_local_name );
+
+        $attribute_value = $attributes[ $i + 1 ];
+
+        $predicate=$attribute_namespace_uri;
+        $predicate.=$attribute_local_name;
+
+        if( RDF_NAMESPACE_URI == $attribute_namespace_uri )
+        {
+            if( $this->_is_rdf_property_attribute_literal( $attribute_local_name ) )
+            {
+				$this->_report_statement(
+                    $subject_type,
+                    $subject,
+                    $predicate,
+                    0,
+                    RDF_OBJECT_TYPE_LITERAL,
+                    $attribute_value,
+                    $xml_lang,
+                    $bag_id,
+                    $statements,
+                    '',
+					'');
+            }
+            else if( $this->_is_rdf_property_attribute_resource( $attribute_local_name ) )
+            {
+				$this->_report_statement(
+                    $subject_type,
+                    $subject,
+                    $predicate,
+                    0,
+                    RDF_OBJECT_TYPE_RESOURCE,
+                    $attribute_value,
+                    '',
+                    $bag_id,
+                    $statements,
+                    '',
+					'');
+            }
+            else if( ( $ordinal = $this->_is_rdf_ordinal( $attribute_local_name ) ) != 0 )
+            {
+				$this->_report_statement(
+                    $subject_type,
+                    $subject,
+                    $predicate,
+                    $ordinal,
+                    RDF_OBJECT_TYPE_LITERAL,
+                    $attribute_value,
+                    $xml_lang,
+                    $bag_id,
+                    $statements,
+                    '',
+					'' );
+            }
+            else if (   ($attribute_local_name != RDF_ABOUT)
+                     && ($attribute_local_name != RDF_RDF)
+                     && ($attribute_local_name != RDF_DESCRIPTION)
+                     && ($attribute_local_name != RDF_ID)
+                     && ($attribute_local_name != RDF_ABOUT_EACH)
+                     && ($attribute_local_name != RDF_ABOUT_EACH_PREFIX)
+                     && ($attribute_local_name != RDF_BAG_ID)
+                     && ($attribute_local_name != RDF_RESOURCE)
+                     && ($attribute_local_name != RDF_PARSE_TYPE)
+                     && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL)
+                     && ($attribute_local_name != RDF_PARSE_TYPE_RESOURCE)
+                     && ($attribute_local_name != RDF_LI)
+                     && ($attribute_local_name != RDF_SUBJECT)
+                     && ($attribute_local_name != RDF_PREDICATE)
+                     && ($attribute_local_name != RDF_OBJECT)
+                     && ($attribute_local_name != RDF_NODEID)
+                     && ($attribute_local_name != RDF_DATATYPE)
+                     && ($attribute_local_name != RDF_SEEALSO)
+                     && ($attribute_local_name != RDF_NIL)
+                     && ($attribute_local_name != RDF_REST)
+                     && ($attribute_local_name != RDF_FIRST)
+                    )
+            {
+            	$this->_report_statement(
+                	$subject_type,
+                	$subject,
+                	$predicate,
+                	0,
+                	RDF_OBJECT_TYPE_LITERAL,
+                	$attribute_value,
+                	$xml_lang,
+                	$bag_id,
+                	$statements,
+                	'',
+					'' );
+            }
+        }
+        else if( XML_NAMESPACE_URI == $attribute_namespace_uri )
+        {
+			if ($attribute_local_name == 'base')
+			{
+    			$this->rdf_parser['top']['element_base_uri'] = $attribute_value;
+			}
+        }
+        else if( $attribute_namespace_uri )
+        {
+            // is it required that property attributes be in an explicit namespace?
+
+			$this->_report_statement(
+                $subject_type,
+                $subject,
+                $predicate,
+                0,
+                RDF_OBJECT_TYPE_LITERAL,
+                $attribute_value,
+                $xml_lang,
+                $bag_id,
+                $statements,
+                '',
+				'' );
+        }
+    }
+}
+
+
+
+/**
+   * @param string $warning
+ * @access	private
+*/
+function _report_warning($warning)
+{
+	$errmsg = RDFAPI_ERROR . '(class: parser): ' . $warning .'.';
+	trigger_error($errmsg, E_USER_WARNING);
+}
+
+
+function _report_error($error)
+{
+	$errmsg = RDFAPI_ERROR . '(class: parser): ' . $error .'.';
+	trigger_error($errmsg, E_USER_ERROR);
+}
+
+
+/**
+   * @param string $namespace_uri
+   * @param string $local_name
+   * @param string $attributes
+   * @param string $parent
+ * @access	private
+*/
+function _handle_resource_element( $namespace_uri, $local_name, $attributes, $parent )
+{
+    $subjects_found = 0;
+    $aux=$attributes;
+    $aux2=Array();
+    foreach($attributes as $atkey=>$atvalue) {
+      $aux2[]=$atkey;
+      $aux2[]=$atvalue;
+    }
+    $attributes=$aux2;
+    $id = '';
+    $about = '';
+
+    $bag_id = '';
+    $node_id = '';
+    $datatype = '';
+
+    $i=0;
+
+    $attribute='';
+
+    $attribute_namespace_uri='';
+    $attribute_local_name='';
+    $attribute_value='';
+
+    $id_buffer='';
+
+    $type='';
+
+    $this->rdf_parser['top']['has_property_attributes'] = false;
+    $this->rdf_parser['top']['has_member_attributes'] = false;
+
+
+    if( $namespace_uri == RDF_NAMESPACE_URI )
+    {
+       if( ! $this->_is_rdf_node_element( $local_name ) )
+       {
+		  $msg = 'unknown or out of context rdf node element: '.$local_name;
+
+		  if ($this->_is_forbidden_rdf_node_element($local_name))
+		  	 $this->_report_error($msg);
+		  else
+		  	 $this->_report_warning($msg);
+       }
+    }
+
+    // examine each attribute for the standard RDF "keywords"
+    for( $i = 0; isset($attributes[$i]); $i += 2 )
+    {
+        $this->_split_name(
+            $attributes[ $i ],
+            $attribute,
+            $attribute_namespace_uri,
+            $attribute_local_name );
+
+        $attribute_value = $attributes[ $i + 1 ];
+
+        // if the attribute is not in any namespace
+        //   or the attribute is in the RDF namespace
+        if( ( $attribute_namespace_uri == '' )
+            || (  $attribute_namespace_uri == RDF_NAMESPACE_URI  ))
+        {
+            if( $attribute_local_name == RDF_ID )
+            {
+                $id = $attribute_value;
+                ++$subjects_found;
+            } else if( $attribute_local_name == RDF_ABOUT ) {
+				$about = '_'.$attribute_value;
+                ++$subjects_found;
+            } else if( $attribute_local_name == RDF_NODEID) {
+                $node_id = $attribute_value;
+				++$subjects_found;
+            } else if(  $attribute_local_name == RDF_ABOUT_EACH ) {
+				$error = 'aboutEach has been removed from the RDF specifications';
+				$this->_report_error($error);
+            } else if( $attribute_local_name == RDF_ABOUT_EACH_PREFIX ) {
+				$error = 'aboutEachPrefix has been removed from the RDF specifications';
+				$this->_report_error($error);
+            } else if( $attribute_local_name == RDF_BAG_ID) {
+                $bag_id = $attribute_value;
+            } else if( $attribute_local_name == RDF_DATATYPE) {
+                $datatype = $attribute_value;
+            } else if( $this->_is_rdf_property_attribute( $attribute_local_name )) {
+                $this->rdf_parser['top']['has_property_attributes'] = true;
+            } else if( $this->_is_rdf_ordinal( $attribute_local_name )) {
+                $this->rdf_parser['top']['has_property_attributes'] = true;
+                $this->rdf_parser['top']['has_member_attributes'] = true;
+            } else {
+				$this->rdf_parser['top']['has_property_attributes'] = true;
+				$msg = 'unknown or out of context rdf attribute: '.$attribute_local_name;
+
+		  		if ($this->_is_forbidden_rdf_property_attribute($attribute_local_name))
+		  			$this->_report_error($msg);
+		  		else
+		  			$this->_report_warning($msg);
+            }
+        }
+        else if(  $attribute_namespace_uri == XML_NAMESPACE_URI )
+        {
+            if( $attribute_local_name == XML_LANG )
+            {
+                $this->rdf_parser['top']['xml_lang'] = $attribute_value;
+            }
+    		elseif ($attribute_local_name == 'base')
+    		{
+    			$this->rdf_parser['top']['element_base_uri'] = $attribute_value;
+    		}
+        }
+        else if( $attribute_namespace_uri )
+        {
+            $this->rdf_parser['top']['has_property_attributes'] = true;
+        }
+    }
+
+    // if no subjects were found, generate one.
+    if( $subjects_found == 0 )
+    {
+        $this->_generate_anonymous_uri( $id_buffer );
+        $this->rdf_parser['top']['subject']=$id_buffer;
+		$this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE;
+    }
+    else if( $subjects_found > 1 )
+    {
+		 $this->_report_error('ID, about and nodeID are mutually exclusive');
+    }
+    else if( $id )
+    {
+        $this->_resolve_id( $id, $id_buffer );
+        $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI;
+        $this->rdf_parser['top']['subject']=$id_buffer;
+    }
+    else if( $about )
+    {
+		$this->_resolve_uri_reference( $this->rdf_get_base(), substr($about,1), $id_buffer );
+        $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI;
+        $this->rdf_parser['top']['subject']=$id_buffer;
+    }
+    else if( $node_id )
+    {
+    	$this->is_valid_id($node_id);
+        $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE;
+        $this->rdf_parser['top']['subject']=$node_id;
+    }
+
+    // if the subject is empty, assign it the document uri
+    if( $this->rdf_parser['top']['subject'] == '' )
+    {
+		$this->rdf_parser['top']['subject']=$this->rdf_get_base();
+    }
+
+    if( $bag_id )
+    {
+        $this->_resolve_id( $bag_id, $id_buffer );
+        $this->rdf_parser['top']['bag_id']=$id_buffer;
+    }
+
+    // only report the type for non-rdf:Description elements.
+    if( ($local_name != RDF_DESCRIPTION )
+        || ( $namespace_uri != RDF_NAMESPACE_URI ) )
+    {
+        $type=$namespace_uri;
+        $type.=$local_name;
+
+		$this->_report_statement(
+            $this->rdf_parser['top']['subject_type'],
+            $this->rdf_parser['top']['subject'],
+            RDF_NAMESPACE_URI.RDF_TYPE,
+            0,
+            RDF_OBJECT_TYPE_RESOURCE,
+            $type,
+            '',
+            $this->rdf_parser['top']['bag_id'],
+            $this->rdf_parser['top']['statements'],
+            '',
+			$datatype);
+
+    }
+
+    // if this element is the child of some property,
+    //   report the appropriate statement.
+    if( $parent )
+    {
+        if ($this->rdf_parser['top']['subject_type'] == RDF_SUBJECT_TYPE_BNODE)
+        	$objtype = RDF_OBJECT_TYPE_BNODE;
+        else
+        	$objtype = RDF_OBJECT_TYPE_RESOURCE;
+
+    	$this->_report_statement(
+            $parent['parent']['subject_type'],
+            $parent['parent']['subject'],
+            $parent['predicate'],
+            $parent['ordinal'],
+            $objtype,
+            $this->rdf_parser['top']['subject'],
+            '',
+            $parent['parent']['bag_id'],
+            $parent['parent']['statements'],
+            $parent['statement_id'],
+			$parent['datatype']);
+
+    }
+
+    if( $this->rdf_parser['top']['has_property_attributes'] )
+    {
+        $this->_handle_property_attributes(
+            $this->rdf_parser['top']['subject_type'],
+            $this->rdf_parser['top']['subject'],
+            $attributes,
+            $this->rdf_parser['top']['xml_lang'],
+            $this->rdf_parser['top']['bag_id'],
+            $this->rdf_parser['top']['statements'] );
+    }
+}
+
+/**
+   * @param string &$namespace_uri
+   * @param string &$local_name
+   * @param string &$attributes
+ * @access	private
+*/
+function _handle_property_element( &$namespace_uri, &$local_name, &$attributes )
+{
+    $buffer='';
+
+    $i=0;
+
+    $aux=$attributes;
+    $aux2=Array();
+    foreach($attributes as $atkey=>$atvalue) {
+      $aux2[]=$atkey;
+      $aux2[]=$atvalue;
+    }
+    $attributes=$aux2;
+
+    $attribute_namespace_uri='';
+    $attribute_local_name='';
+    $attribute_value = '';
+
+    $resource = NULL;
+    $statement_id = '';
+    $bag_id = '';
+    $parse_type = '';
+	$node_id = '';
+	$datatype = '';
+
+    $this->rdf_parser['top']['ordinal'] = 0;
+
+    if( $namespace_uri == RDF_NAMESPACE_URI )
+    {
+       if( ! $this->_is_rdf_property_element( $local_name ) )
+        {
+			$msg = 'unknown or out of context rdf property element: '.$local_name;
+
+		  	if ($this->_is_forbidden_rdf_property_element($local_name))
+		  		$this->_report_error($msg);
+		  	else
+		  		$this->_report_warning($msg);
+        }
+
+    }
+
+    $buffer=$namespace_uri;
+
+    if( ( $namespace_uri == RDF_NAMESPACE_URI )
+        &&  ( $local_name == RDF_LI ) )
+    {
+        $this->rdf_parser['top']['parent']['members']++;
+        $this->rdf_parser['top']['ordinal'] = $this->rdf_parser['top']['parent']['members'];
+
+        $this->rdf_parser['top']['ordinal']=$this->rdf_parser['top']['ordinal'];
+
+        $buffer.='_'.$this->rdf_parser['top']['ordinal'];
+
+    }
+    else
+    {
+        $buffer.=$local_name;
+    }
+
+    $this->rdf_parser['top']['predicate']=$buffer;
+
+    $this->rdf_parser['top']['has_property_attributes'] = false;
+    $this->rdf_parser['top']['has_member_attributes'] = false;
+
+
+    for( $i = 0; isset($attributes[$i]); $i += 2 )
+    {
+        $this->_split_name(
+            $attributes[$i],
+            $buffer,
+            $attribute_namespace_uri,
+            $attribute_local_name );
+
+        $attribute_value = $attributes[$i + 1];
+
+        // if the attribute is not in any namespace
+        //   or the attribute is in the RDF namespace
+        if( ( $attribute_namespace_uri == '' )
+            || (  $attribute_namespace_uri == RDF_NAMESPACE_URI ) )
+        {
+            if( ( $attribute_local_name == RDF_ID )  )
+            {
+                $statement_id = $attribute_value;
+            }
+            else if( $attribute_local_name == RDF_PARSE_TYPE )
+            {
+                $parse_type = $attribute_value;
+            }
+            else if(  $attribute_local_name == RDF_RESOURCE )
+            {
+                $resource = $attribute_value;
+            }
+			else if(  $attribute_local_name == RDF_NODEID )
+            {
+				$node_id = $attribute_value;
+            }
+            else if(  $attribute_local_name == RDF_BAG_ID )
+            {
+                $bag_id = $attribute_value;
+            }
+			else if(  $attribute_local_name == RDF_DATATYPE )
+            {
+				$datatype = $attribute_value;
+				$this->rdf_parser['top']['datatype'] = $attribute_value;
+            }
+            else if( $this->_is_rdf_property_attribute( $attribute_local_name ) )
+            {
+                $this->rdf_parser['top']['has_property_attributes'] = true;
+            }
+            else
+            {
+                $this->_report_warning('unknown rdf attribute: '.$attribute_local_name );
+                return;
+            }
+        }
+        else if(  $attribute_namespace_uri == XML_NAMESPACE_URI  )
+        {
+            if( $attribute_local_name == XML_LANG  )
+            {
+                $this->rdf_parser['top']['xml_lang'] = $attribute_value;
+            }
+    		elseif ($attribute_local_name == 'base')
+    		{
+    			$this->rdf_parser['top']['element_base_uri'] = $attribute_value;
+    		}
+        }
+        else if( $attribute_namespace_uri )
+        {
+            $this->rdf_parser['top']['has_property_attributes'] = true;
+        }
+    }
+
+    if( $statement_id )
+    {
+	    $this->_resolve_id($statement_id, $buffer );
+        $this->rdf_parser['top']['statement_id']=$buffer;
+    }
+
+	if ($node_id)
+	{
+		$this->is_valid_id($node_id);
+
+		if ($resource)
+		{
+			$this->_report_error('nodeID and resource are mutually exclusive');
+		}
+       	if ($statement_id)
+       	{
+       		// reify statement
+       		$this->_report_statement(
+        		$this->rdf_parser['top']['parent']['subject_type'],
+        		$this->rdf_parser['top']['parent']['subject'],
+        		$this->rdf_parser['top']['predicate'],
+        		$this->rdf_parser['top']['ordinal'],
+        		RDF_OBJECT_TYPE_BNODE,
+        		$node_id,
+        		'',
+        		$this->rdf_parser['top']['parent']['bag_id'],
+        		$this->rdf_parser['top']['parent']['statements'],
+        		$this->rdf_parser['top']['statement_id'],
+				'');
+			$statement_id = '';
+       	}
+       	else
+       	{
+			$this->_report_statement(
+	           $this->rdf_parser['top']['parent']['subject_type'],
+	           $this->rdf_parser['top']['parent']['subject'],
+	           $this->rdf_parser['top']['predicate'],
+	           $this->rdf_parser['top']['ordinal'],
+	           RDF_OBJECT_TYPE_BNODE,
+	           $node_id,
+	           '',
+	           $this->rdf_parser['top']['parent']['bag_id'],
+	           $this->rdf_parser['top']['parent']['statements'],
+	           '',
+			   $datatype );
+       	}
+
+       	$this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE;
+	}
+
+    if( $parse_type )
+	{
+        if( $resource ) {
+			$this->_report_error('property elements with rdf:parseType do not allow rdf:resource' );
+        }
+
+        if( $bag_id ) {
+            $this->_report_warning('property elements with rdf:parseType do not allow rdf:bagID' );
+            return;
+        }
+
+        if( $this->rdf_parser['top']['has_property_attributes'] )
+        {
+				$this->_report_error('property elements with rdf:parseType do not allow property attributes');
+            return;
+        }
+
+        if(  $attribute_value == RDF_PARSE_TYPE_RESOURCE )
+        {
+            $this->_generate_anonymous_uri( $buffer );
+            // since we are sure that this is now a resource property we can report it
+            $this->_report_statement(
+                $this->rdf_parser['top']['parent']['subject_type'],
+                $this->rdf_parser['top']['parent']['subject'],
+                $this->rdf_parser['top']['predicate'],
+                0,
+                RDF_OBJECT_TYPE_BNODE,
+                $buffer,
+                '',
+                $this->rdf_parser['top']['parent']['bag_id'],
+                $this->rdf_parser['top']['parent']['statements'],
+				$this->rdf_parser['top']['statement_id'],
+				$datatype );
+
+            $this->_push_element( );
+
+            $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_RESOURCE;
+            $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE;
+            $this->rdf_parser['top']['subject']=$buffer;
+            $this->rdf_parser['top']['bag_id']='';
+			$this->rdf_parser['top']['datatype']= $datatype;
+
+        }
+       	elseif (  $attribute_value == RDF_PARSE_TYPE_LITERAL )
+       	{
+       		$this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL;
+       		$this->rdf_parser['top']['datatype']= RDF_NAMESPACE_URI .RDF_XMLLITERAL;
+       		$this->rdf_parser['xml_literal']['buffer'] = '';
+       		$this->rdf_parser['xml_literal']['depth'] = 0;
+       	}
+		elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION)
+		{
+			$this->_generate_anonymous_uri( $buffer );
+            $this->_report_statement(
+                $this->rdf_parser['top']['parent']['subject_type'],
+                $this->rdf_parser['top']['parent']['subject'],
+                $this->rdf_parser['top']['predicate'],
+                0,
+                RDF_OBJECT_TYPE_BNODE,
+                $buffer,
+                '',
+                $this->rdf_parser['top']['parent']['bag_id'],
+                $this->rdf_parser['top']['parent']['statements'],
+				$this->rdf_parser['top']['statement_id'],
+				$datatype );
+
+			$this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_COLLECTION;
+			$this->rdf_parser['top']['collection']['first_blank_node_id'] = $buffer;
+		}
+
+        else
+        {
+
+			$this->_report_statement(
+                $this->rdf_parser['top']['parent']['subject_type'],
+                $this->rdf_parser['top']['parent']['subject'],
+                $this->rdf_parser['top']['predicate'],
+                0,
+                RDF_OBJECT_TYPE_XML,
+                '',
+                '',
+                $this->rdf_parser['top']['parent']['bag_id'],
+                $this->rdf_parser['top']['parent']['statements'],
+				$this->rdf_parser['top']['statement_id'],
+    			$datatype );
+
+            $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL;
+        }
+    }
+    else if( $resource !== NULL || $bag_id || $this->rdf_parser['top']['has_property_attributes'] )
+    	{
+        if( $resource !== NULL )
+        {
+            $subject_type = RDF_SUBJECT_TYPE_URI;
+			$this->_resolve_uri_reference( $this->rdf_get_base(), $resource, $buffer );
+        	$object_type=RDF_OBJECT_TYPE_RESOURCE;
+        }
+        else
+        {
+			$subject_type = RDF_SUBJECT_TYPE_BNODE;
+            $this->_generate_anonymous_uri( $buffer );
+            $object_type=RDF_OBJECT_TYPE_BNODE;
+        }
+        $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE;
+
+        // since we are sure that this is now a resource property we can report it.
+		$this->_report_statement(
+            $this->rdf_parser['top']['parent']['subject_type'],
+            $this->rdf_parser['top']['parent']['subject'],
+            $this->rdf_parser['top']['predicate'],
+            $this->rdf_parser['top']['ordinal'],
+            $object_type,
+            $buffer,
+            '',
+            $this->rdf_parser['top']['parent']['bag_id'],
+            $this->rdf_parser['top']['parent']['statements'],
+			$this->rdf_parser['top']['statement_id'],
+			$datatype ); // should we allow IDs?
+
+        if( $bag_id )
+        {
+            $this->_resolve_id( $bag_id, $buffer );
+            $this->rdf_parser['top']['bag_id']=$buffer;
+        }
+
+        if( $this->rdf_parser['top']['has_property_attributes'] )
+        {
+            $this->_handle_property_attributes(
+                $subject_type,
+                $buffer,
+                $attributes,
+                $this->rdf_parser['top']['xml_lang'],
+                $this->rdf_parser['top']['bag_id'],
+                $this->rdf_parser['top']['statements'] );
+        }
+    }
+}
+
+/**
+   * @param string &$namespace_uri
+   * @param string &$local_name
+   * @param string &$attributes
+   * @access	private
+*/
+function _handle_collection_element(&$namespace_uri, &$local_name, &$attributes)
+{
+	$aux2=Array();
+    foreach($attributes as $atkey=>$atvalue) {
+      $aux2[]=$atkey;
+      $aux2[]=$atvalue;
+    }
+    $attributes=$aux2;
+/* collection construction site
+// old:
+	if (   ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '')
+	    && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) )
+	{
+		for( $i = 0; isset($attributes[$i]); $i += 2 )
+    	{
+			$this->_split_name(
+            	$attributes[ $i ],
+            	$attribute,
+            	$attribute_namespace_uri,
+            	$attribute_local_name );
+
+        	$attribute_value = $attributes[ $i + 1 ];
+
+        	if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI  )
+	        {
+        	    if( $attribute_local_name == RDF_ABOUT ||
+        	        $attribute_local_name == RDF_RESOURCE)
+        	    {
+					$this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE;
+        	    }
+        	    elseif ( $attribute_local_name == RDF_NODEID ) {
+        	    	$this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE;
+        	    }
+        	    $this->rdf_parser['top']['parent']['collection']['object_label'][] = $attribute_value;
+    		}
+    	}
+	}
+*/
+// new
+
+		for( $i = 0; isset($attributes[$i]); $i += 2 )
+    	{
+			$this->_split_name(
+            	$attributes[ $i ],
+            	$attribute,
+            	$attribute_namespace_uri,
+            	$attribute_local_name );
+
+        	$attribute_value = $attributes[ $i + 1 ];
+
+        	if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI  )
+	        {
+	        	$tmp_subject_type = RDF_SUBJECT_TYPE_URI;
+        	    if( $attribute_local_name == RDF_ABOUT ||
+        	        $attribute_local_name == RDF_RESOURCE)
+        	    {
+					$this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE;
+        	    }
+        	    elseif ( $attribute_local_name == RDF_NODEID ) {
+        	    	$this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE;
+        	    	$tmp_subject_type = RDF_SUBJECT_TYPE_BNODE;
+        	    }
+        	    $id_buffer = '';
+        	    $this->_resolve_uri_reference( $this->rdf_get_base(), $attribute_value, $id_buffer );
+        	    $this->rdf_parser['top']['parent']['collection']['object_label'][] = $id_buffer;
+
+       	    	if (!(   ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '')
+	 			      && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) ))
+				   {
+					  $this->_report_statement(
+							$tmp_subject_type,
+							$id_buffer,
+							RDF_NAMESPACE_URI.RDF_TYPE,
+							'',
+							RDF_OBJECT_TYPE_RESOURCE,
+							$namespace_uri.$local_name,
+							'',
+							'',
+							'',
+							'',
+							'');
+				   }
+    		}
+    	}
+
+
+// collection construction site
+}
+
+/**
+   * @param string &$namespace_uri
+   * @param string &$local_name
+   * @param string &$attributes
+   * @access	private
+*/
+function _handle_xml_start_element(&$namespace_uri, &$local_name, &$attributes)
+{
+	$aux2=Array();
+    foreach($attributes as $atkey=>$atvalue) {
+      $aux2[]=$atkey;
+      $aux2[]=$atvalue;
+    }
+    $attributes=$aux2;
+
+    $element = '<' .$this->_join_name_and_declare_prefix($namespace_uri, $local_name);
+
+    for( $i = 0; isset($attributes[$i]); $i += 2 )
+    	{
+			$this->_split_name(
+            	$attributes[ $i ],
+            	$attribute,
+            	$attribute_namespace_uri,
+            	$attribute_local_name );
+
+        	$attribute_value = $attributes[ $i + 1 ];
+
+			$element .= ' ' .$this->_join_name_and_declare_prefix($attribute_namespace_uri, $attribute_local_name);
+			$element .= '=\"' .$attribute_value .'\"';
+    	}
+    $element .= '>';
+
+    $this->rdf_parser['xml_literal']['buffer'] .= $element;
+}
+
+/**
+   * @param string $name
+   * @access	private
+*/
+function _handle_xml_end_element($name)
+{
+	$buffer='';
+	$namespace_uri='';
+    $local_name='';
+
+	$this->_split_name(
+        $name,
+       	$buffer,
+       	$namespace_uri,
+       	$local_name );
+
+    $element = '</';
+
+	if ($namespace_uri && isset($this->rdf_parser['default_namespace'])
+	    &&$namespace_uri != $this->rdf_parser['default_namespace'])
+	{
+ 		$element .= $this->rdf_parser['namespaces'][$namespace_uri] .':';
+	}
+
+    $element .= $local_name .'>';
+
+    $this->rdf_parser['xml_literal']['buffer'] .= $element;
+    $depth = $this->rdf_parser['xml_literal']['depth']--;
+
+    if (isset($this->rdf_parser['xml_literal']['declared_ns']))
+      	foreach ($this->rdf_parser['xml_literal']['declared_ns'] as $prefix => $_depth)
+    {
+    	if ($depth == $_depth)
+        	unset($this->rdf_parser['xml_literal']['declared_ns'][$prefix]);
+    }
+}
+
+/**
+   * @param string $namespace_uri
+   * @param string $local_name
+   * @access	private
+*/
+function _join_name_and_declare_prefix($namespace_uri, $local_name) {
+
+	$name = '';
+
+	if ($namespace_uri)
+	{
+		if (isset($this->rdf_parser['default_namespace'])
+		    && $namespace_uri == $this->rdf_parser['default_namespace'])
+		{
+			$name .= $local_name;
+
+			if (!isset($this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'])
+				&& $namespace_uri != XML_NAMESPACE_URI)
+			{
+				$name .= ' xmlns=' . '\"' .$namespace_uri .'\"';
+
+				$this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_']
+					= $this->rdf_parser['xml_literal']['depth'];
+			}
+		}
+		else
+		{
+			$ns_prefix = $this->rdf_parser['namespaces'][$namespace_uri];
+			$name .= $ns_prefix .':' .$local_name;
+
+			if (!isset($this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix])
+				&& $namespace_uri != XML_NAMESPACE_URI)
+			{
+				$name .= " xmlns:$ns_prefix=" . '\"' .$namespace_uri .'\"';
+
+				$this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix]
+					= $this->rdf_parser['xml_literal']['depth'];
+			}
+		}
+
+	}
+	else
+		$name .= $local_name;
+
+	return $name;
+
+}
+
+/**
+  * @access	private
+*/
+function _end_collection() {
+
+	if (isset($this->rdf_parser['top']['collection']))
+	{
+
+		$subject = $this->rdf_parser['top']['collection']['first_blank_node_id'];
+
+		for ($i=0; isset($this->rdf_parser['top']['collection']['object_label'][$i]); $i++)
+		{
+
+			$this->_report_statement(
+				RDF_SUBJECT_TYPE_BNODE,
+				$subject,
+				RDF_NAMESPACE_URI.RDF_FIRST,
+				'',
+				$this->rdf_parser['top']['collection']['object_type'][$i],
+				$this->rdf_parser['top']['collection']['object_label'][$i],
+				'',
+				'',
+				'',
+				'',
+				'');
+
+			if (!isset($this->rdf_parser['top']['collection']['object_label'][$i+1]))
+			{
+				$obj_type_2 = RDF_OBJECT_TYPE_RESOURCE;
+				$object_2 = RDF_NAMESPACE_URI.RDF_NIL;
+			}
+			else
+			{
+				$obj_type_2= RDF_OBJECT_TYPE_BNODE;
+				$this->_generate_anonymous_uri($object_2);
+			}
+
+
+			$this->_report_statement(
+				RDF_SUBJECT_TYPE_BNODE,
+				$subject,
+				RDF_NAMESPACE_URI.RDF_REST,
+				'',
+				$obj_type_2,
+				$object_2,
+				'',
+				'',
+				'',
+				'',
+				'');
+
+			$subject = $object_2;
+		}
+	}
+}
+
+/**
+   * @param string $parser
+   * @param string $name
+   * @param string $attributes
+   * @access	private
+*/
+function _start_element_handler($parser, $name, $attributes )
+{
+    $buffer='';
+
+    $namespace_uri='';
+    $local_name='';
+
+    $this->_push_element();
+
+
+    $this->_split_name(
+        $name,
+        $buffer,
+        $namespace_uri,
+        $local_name );
+
+    switch( $this->rdf_parser['top']['state'] )
+    {
+    case IN_TOP_LEVEL:
+		// set base_uri, if possible
+		foreach ($attributes as $key => $value) {
+	         if($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR . 'base') {
+			 		$this->rdf_parser['base_uri'] = $value;
+					$this->rdf_parser['document_base_uri'] = $value;
+
+					$c = substr($value, strlen($value)-1 ,1);
+					if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
+						 $this->rdf_parser['normalized_base_uri'] = $value . '#';
+					else
+						$this->rdf_parser['normalized_base_uri'] = $value;
+
+			  }
+			  elseif ($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR .'lang')
+			  	$this->rdf_parser['document_xml_lang'] = $value;
+echo "";
+		}
+
+
+		if( RDF_NAMESPACE_URI.NAMESPACE_SEPARATOR_STRING.RDF_RDF == $name )
+        {
+			$this->rdf_parser['top']['state'] = IN_RDF;
+
+			break;
+        }
+    case IN_RDF:
+        $this->rdf_parser['top']['state'] = IN_DESCRIPTION;
+        $this->_handle_resource_element( $namespace_uri, $local_name, $attributes, '' );
+        break;
+    case IN_DESCRIPTION:
+    case IN_PROPERTY_PARSE_TYPE_RESOURCE:
+ 		$this->rdf_parser['top']['state'] = IN_PROPERTY_UNKNOWN_OBJECT;
+        $this->_handle_property_element( $namespace_uri, $local_name, $attributes );
+        break;
+   	case IN_PROPERTY_PARSE_TYPE_COLLECTION:
+		$this->_handle_collection_element($namespace_uri, $local_name, $attributes);
+		break;
+    case IN_PROPERTY_UNKNOWN_OBJECT:
+        /* if we're in a property with an unknown object type and we encounter
+           an element, the object must be a resource, */
+        $this->rdf_parser['top']['data']='';
+        $this->rdf_parser['top']['parent']['state'] = IN_PROPERTY_RESOURCE;
+        $this->rdf_parser['top']['state'] = IN_DESCRIPTION;
+        $this->_handle_resource_element(
+            $namespace_uri,
+            $local_name,
+            $attributes,
+            $this->rdf_parser['top']['parent'] );
+        break;
+    case IN_PROPERTY_LITERAL:
+        $this->_report_warning( 'no markup allowed in literals' );
+        break;
+    case IN_PROPERTY_PARSE_TYPE_LITERAL:
+    	$this->rdf_parser['top']['state'] = IN_XML;
+        /* fall through */
+    case IN_XML:
+		$this->rdf_parser['xml_literal']['depth']++;
+		$this->_handle_xml_start_element($namespace_uri, $local_name, $attributes);
+        break;
+    case IN_PROPERTY_RESOURCE:
+        $this->_report_warning(
+                     'only one element allowed inside a property element' );
+        break;
+    case IN_PROPERTY_EMPTY_RESOURCE:
+        $this->_report_warning(
+                    'no content allowed in property with rdf:resource, rdf:bagID, or property attributes' );
+        break;
+    case IN_UNKNOWN:
+        break;
+    }
+}
+
+/**
+    property elements with text only as content set the state to
+    IN_PROPERTY_LITERAL. as character data is received from expat,
+    it is saved in a buffer and reported when the end tag is
+    received.
+  * @access	private
+*/
+function _end_literal_property()
+{
+    if(!isset($this->rdf_parser['top']['statement_id'])) {
+      $this->rdf_parser['top']['statement_id']='';
+    }
+    if(!isset($this->rdf_parser['top']['parent']['subject_type'])) {
+      $this->rdf_parser['top']['parent']['subject_type']='';
+    }
+    if(!isset($this->rdf_parser['top']['parent']['subject'])) {
+      $this->rdf_parser['top']['parent']['subject']='';
+    }
+    if(!isset($this->rdf_parser['top']['parent']['bag_id'])) {
+      $this->rdf_parser['top']['parent']['bag_id']='';
+    }
+    if(!isset($this->rdf_parser['top']['parent']['statements'])) {
+      $this->rdf_parser['top']['parent']['statements']=0;
+    }
+    if(!isset($this->rdf_parser['top']['predicate'])) {
+      $this->rdf_parser['top']['predicate']='';
+    }
+    if(!isset($this->rdf_parser['top']['datatype'])) {
+      $this->rdf_parser['top']['datatype']='';
+    }
+    if(!isset($this->rdf_parser['top']['ordinal'])) {
+      $this->rdf_parser['top']['ordinal']=0;
+    }
+    $this->_report_statement(
+        $this->rdf_parser['top']['parent']['subject_type'],
+        $this->rdf_parser['top']['parent']['subject'],
+        $this->rdf_parser['top']['predicate'],
+        $this->rdf_parser['top']['ordinal'],
+        RDF_OBJECT_TYPE_LITERAL,
+        $this->rdf_parser['top']['data'],
+        $this->rdf_parser['top']['xml_lang'],
+        $this->rdf_parser['top']['parent']['bag_id'],
+        $this->rdf_parser['top']['parent']['statements'],
+        $this->rdf_parser['top']['statement_id'],
+		$this->rdf_parser['top']['datatype']);
+
+}
+
+/**
+   * @param string $parser
+   * @param string $name
+   * @access	private
+*/
+function _end_element_handler( $parser, $name )
+{
+    switch( $this->rdf_parser['top']['state'] )
+    {
+    case IN_TOP_LEVEL:
+		break;
+    case IN_XML:
+		$this->_handle_xml_end_element($name);
+        break;
+    case IN_PROPERTY_UNKNOWN_OBJECT:
+    case IN_PROPERTY_LITERAL:
+        $this->_end_literal_property( );
+        break;
+    case IN_PROPERTY_PARSE_TYPE_RESOURCE:
+        $this->_pop_element(  );
+        break;
+    case IN_PROPERTY_PARSE_TYPE_LITERAL:
+//		$search =  array((0) => chr(10), (1) => chr(13), (2) => chr(9));
+//		$replace = array((0) => '\n'   , (1) => '\r'   , (2) => '\t');
+//		$this->rdf_parser["xml_literal"]["buffer"]
+//			= str_replace($search, $replace, $this->rdf_parser["xml_literal"]["buffer"]);
+
+		$this->rdf_parser['top']['data'] = $this->rdf_parser['xml_literal']['buffer'];
+		$this->_end_literal_property();
+		$this->rdf_parser['xml_literal']['buffer'] = '';
+
+        break;
+	case IN_PROPERTY_PARSE_TYPE_COLLECTION:
+	    $this->_end_collection();
+		break;
+    case IN_RDF:
+    case IN_DESCRIPTION:
+    case IN_PROPERTY_RESOURCE:
+    case IN_PROPERTY_EMPTY_RESOURCE:
+    case IN_UNKNOWN:
+        break;
+    }
+
+    $this->_pop_element();
+}
+
+/**
+   * @param string $parser
+   * @param string $s
+   * @access	private
+*/
+function _character_data_handler( $parser,$s)
+{
+    $len=strlen($s);
+    switch( $this->rdf_parser['top']['state'] )
+    {
+    case IN_PROPERTY_LITERAL:
+    case IN_PROPERTY_UNKNOWN_OBJECT:
+        if( isset($this->rdf_parser['top']['data']) )
+        {
+            $n = strlen( $this->rdf_parser['top']['data'] );
+            $this->rdf_parser['top']['data'].= $s;
+
+        }
+        else
+        {
+            $this->rdf_parser['top']['data']=$s;
+        }
+
+        if( $this->rdf_parser['top']['state'] == IN_PROPERTY_UNKNOWN_OBJECT )
+        {
+            /* look for non-whitespace */
+            for( $i = 0; (( $i < $len ) && (  preg_match("' |\n|\t'",$s{ $i }) )); $i++ );
+            /* if we found non-whitespace, this is a literal */
+            if( $i < $len )
+            {
+                $this->rdf_parser['top']['state'] = IN_PROPERTY_LITERAL;
+            }
+        }
+
+        break;
+    case IN_TOP_LEVEL:
+    	break;
+    case IN_PROPERTY_PARSE_TYPE_LITERAL:
+    case IN_XML:
+        $this->rdf_parser['xml_literal']['buffer'] .= $s;
+        break;
+    case IN_RDF:
+    case IN_DESCRIPTION:
+    case IN_PROPERTY_RESOURCE:
+    case IN_PROPERTY_EMPTY_RESOURCE:
+    case IN_PROPERTY_PARSE_TYPE_RESOURCE:
+    case IN_UNKNOWN:
+        break;
+    }
+}
+
+
+  /**
+   * Adds a new statement to the model
+   * This method is called by generateModel().
+   *
+   * @access	private
+   * @param	string	&$user_data
+   * @param	string	$subject_type
+   * @param	string	$subject
+   * @param	string	$predicate
+   * @param	string	$ordinal
+   * @param	string	$object_type
+   * @param	string	$object
+   * @param	string	$xml_lang )
+   * @return	object MemModel
+   */
+function add_statement_to_model(
+	&$user_data,
+	$subject_type,
+	$subject,
+	$predicate,
+	$ordinal,
+	$object_type,
+	$object,
+	$xml_lang,
+	$datatype )
+{
+
+	// ParseUnicode
+	if(UNIC_RDF){
+		$subject=$this->str2unicode_nfc($subject);
+		$predicate=$this->str2unicode_nfc($predicate);
+		$object=$this->str2unicode_nfc($object);
+	}
+
+	//create subject
+	if ($subject_type == RDF_SUBJECT_TYPE_BNODE)
+			$objsub = new BlankNode($subject);
+	    else
+			$objsub = new Resource($subject);
+
+	// create predicate
+	$objpred = new Resource($predicate);
+
+	// create object
+	if (($object_type == RDF_OBJECT_TYPE_RESOURCE) || ($object_type == RDF_OBJECT_TYPE_BNODE)) {
+			if ($object_type == RDF_OBJECT_TYPE_BNODE)
+					$objobj = new BlankNode($object);
+				else
+					$objobj = new Resource($object);
+	} else {
+
+		$objobj = new Literal($object);
+		if ($datatype != '') {
+			$objobj->setDatatype($datatype);
+		}
+		elseif ($xml_lang !='') {
+			$objobj->setLanguage($xml_lang);
+		}
+	}
+
+	// create statement
+	$statement = new Statement($objsub, $objpred, $objobj);
+
+	// add statement to model
+	if(CREATE_MODEL_WITHOUT_DUPLICATES == TRUE){
+		$this->model->addWithoutDuplicates($statement);
+	}else
+		$this->model->add($statement);
+	}
+
+
+/* public functions */
+
+  /**
+   * Generates a new MemModel from a URI, a file or from memory.
+   * If you want to parse an RDF document, pass the URI or location in the filesystem
+   * of the RDF document. You can also pass RDF code direct to the function. If you pass
+   * RDF code directly to the parser and there is no xml:base included, you should set
+   * the base URI manually using the optional second parameter $rdfBaseURI.
+   * Make sure that here are proper namespace declarations in your input document.
+   *
+   * @access	public
+   * @param		string	 $base
+   * @param     boolean  $rdfBaseURI
+   * @return	object MemModel
+   */
+function & generateModel($base,$rdfBaseURI = false, $model = false) {
+
+	// Check if $base is a URI or filename or a string containing RDF code.
+	if (substr(ltrim($base),0 ,1) != '<') {
+
+	// $base is URL or filename
+	$this->model = $model?$model:new MemModel($base);
+
+	$input = fopen($base,'r') or die("RDF Parser: Could not open File: $base. Stopped parsing.");
+	$this->rdf_parser_create( NULL );
+	$this->rdf_set_base($base);
+	$done=false;
+	while(!$done)
+	{
+	  $buf = fread( $input, 512 );
+	  $done = feof($input);
+
+	  if ( ! $this->rdf_parse( $buf, feof($input) ) )
+	  {
+	    $err_code = xml_get_error_code( $this->rdf_get_xml_parser());
+		$line = xml_get_current_line_number($this->rdf_get_xml_parser() );
+	    $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.';
+	    trigger_error($errmsg, E_USER_ERROR);
+	  }
+	}
+	/* close file. */
+	fclose( $input );
+
+	} else {
+	// $base is RDF string
+    $this->model = $model?$model:new MemModel($base);
+
+	$this->rdf_parser_create( NULL );
+
+	if ($rdfBaseURI!==false)
+	{
+		$this->rdf_set_base($rdfBaseURI);
+	} else
+	{
+		$this->rdf_set_base( NULL );
+	}
+
+	  if ( ! $this->rdf_parse( $base, TRUE ) )
+	  {
+	    $err_code = xml_get_error_code( $this->rdf_get_xml_parser());
+		$line = xml_get_current_line_number($this->rdf_get_xml_parser() );
+	    $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.';
+	    trigger_error($errmsg, E_USER_ERROR);
+	  }
+	}
+	// base_uri could have changed while parsing
+	$this->model->setBaseURI($this->rdf_parser['base_uri']);
+
+	if(isset($this->rdf_parser['namespaces'])){
+		$this->model->addParsedNamespaces($this->rdf_parser['namespaces']);
+	}
+
+	$this->rdf_parser_free();
+
+	return $this->model;
+
+}
+
+/**
+ * @param		string	 $encoding
+
+ * @access	private
+*/
+function rdf_parser_create( $encoding )
+{
+
+    $parser = xml_parser_create_ns( $encoding, NAMESPACE_SEPARATOR_CHAR );
+
+    xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+    $this->rdf_parser['xml_parser'] = $parser;
+
+    xml_set_object($this->rdf_parser['xml_parser'], $this);
+    xml_set_element_handler( $this->rdf_parser['xml_parser'], '_start_element_handler', '_end_element_handler' );
+    xml_set_character_data_handler( $this->rdf_parser['xml_parser'], '_character_data_handler' );
+	xml_set_start_namespace_decl_handler($this->rdf_parser['xml_parser'], '_start_ns_declaration_handler');
+
+    return $this->rdf_parser;
+}
+
+/**
+ * @param	resource	&$parser
+ * @param   string		$ns_prefix
+ * @param	string		$ns_uri
+ * @access	private
+*/
+function _start_ns_declaration_handler(&$parser, $ns_prefix, $ns_uri)
+{
+	if (!$ns_prefix)
+		$this->rdf_parser['default_namespace'] = $ns_uri;
+	else
+		$this->rdf_parser['namespaces'][$ns_uri] = $ns_prefix;
+}
+
+
+/**
+ * @access	private
+*/
+function rdf_parser_free( )
+{
+    $z=3;
+
+    $this->rdf_parser['base_uri']='';
+	$this->rdf_parser['document_base_uri'] = '';
+
+    unset( $this->rdf_parser );
+}
+
+/**
+   * @param		string	 $s
+   * @param		string	 $is_final
+ * @access	private
+*/
+function rdf_parse( $s, $is_final )
+{
+    return XML_Parse( $this->rdf_parser['xml_parser'], $s, $is_final );
+}
+
+/**
+ * @access	private
+*/
+function rdf_get_xml_parser()
+{
+    return ( $this->rdf_parser['xml_parser']);
+}
+
+/**
+   * @param		string	 $base
+ * @access	private
+*/
+function rdf_set_base($base )
+{
+
+    $this->rdf_parser['base_uri']=$base;
+
+	$c = substr($base, strlen($base)-1 ,1);
+	if (!($c=='#' || $c==':' || $c=='/' || $c=="\\"))
+		 $this->rdf_parser['normalized_base_uri'] = $base . '#';
+	else
+		$this->rdf_parser['normalized_base_uri'] = $base;
+
+    return 0;
+}
+
+/**
+ * @access	private
+*/
+function rdf_get_base()
+{
+		if ($this->rdf_parser['top']['element_base_uri'])
+			return $this->rdf_parser['top']['element_base_uri'];
+		else
+			return $this->rdf_parser['base_uri'];
+}
+
+
+} // end: rdf_parser
+
+?>
Index: Dev/branches/Demo/rdfapi/syntax/RdfSerializer.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/RdfSerializer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/RdfSerializer.php	(revision 225)
@@ -0,0 +1,723 @@
+<?php
+
+
+// ----------------------------------------------------------------------------------
+// Class: RdfSerializer
+// ----------------------------------------------------------------------------------
+
+/**
+* An RDF seralizer.
+* Seralizes models to RDF syntax. It supports the xml:base, xml:lang, rdf:datatype and
+* rdf:nodeID directive.
+* You can choose between different output syntaxes by using the configuration methods
+* or changing the configuration default values in constants.php.
+* This class is based on the java class edu.unika.aifb.rdf.api.syntax.RDFSerializer by Boris Motik.
+*
+* @version  $Id: RdfSerializer.php 316 2006-08-24 07:55:29Z tgauss $
+* @author Chris Bizer <chris@bizer.de>, Boris Motik <motik@fzi.de>, Daniel Westphal <dawe@gmx.de>, Leandro Mariano Lopez <llopez@xinergiaargentina.com>
+*
+* @package syntax
+* @access  public
+*
+*/
+class RdfSerializer extends Object {
+
+	// configuration
+	var $use_entities;
+	var $use_attributes;
+	var $sort_model;
+	var $rdf_qnames;
+	var $use_xml_declaration;
+
+	// properties
+	var  $m_defaultNamespaces  = array();
+	var  $m_namespaces = array();
+	var  $m_nextAutomaticPrefixIndex;
+	var  $m_out;
+	var  $m_baseURI;
+	var  $m_statements = array();
+	var  $m_currentSubject;
+	var  $m_rdfIDElementText;
+	var  $m_rdfAboutElementText;
+	var  $m_rdfResourceElementText;
+	var  $m_groupTypeStatement;
+	var  $m_attributeStatements = array();
+	var  $m_contentStatements = array();
+	var  $rdf_qname_prefix;
+
+	/**
+	* Constructor
+	*
+	* @access   public
+	*/
+	function RdfSerializer() {
+
+		// default serializer configuration
+		$this->use_entities = SER_USE_ENTITIES;
+		$this->use_attributes = SER_USE_ATTRIBUTES;
+		$this->sort_model = SER_SORT_MODEL;
+		$this->rdf_qnames = SER_RDF_QNAMES;
+		$this->use_xml_declaration = SER_XML_DECLARATION;
+
+		global $default_prefixes;
+		foreach($default_prefixes as $key => $value){
+			$this->addNamespacePrefix($key,$value);
+		}
+
+		require_once(RDFAPI_INCLUDE_DIR.PACKAGE_UTILITY);
+	}
+
+	/**
+	* Serializer congiguration: Sort Model
+	* Flag if the serializer should sort the model by subject before serializing.
+	* TRUE makes the RDF code more compact.
+	* TRUE is default. Default can be changed in constants.php.
+	*
+	* @param     boolean
+	* @access    public
+	*/
+	function configSortModel($bool) {
+		$this->sort_model = $bool;
+	}
+
+	/**
+	* Serializer congiguration: Use Entities
+	* Flag if the serializer should use entities for URIs.
+	* TRUE makes the RDF code more compact.
+	* FALSE is default. Default can be changed in constants.php.
+	*
+	* @param     boolean
+	* @access    public
+	*/
+	function configUseEntities($bool) {
+		$this->use_entities = $bool;
+	}
+
+	/**
+	* Serializer congiguration: Use Attributes
+	* Flag if the serializer should serialize triples as XML attributes where possible.
+	* TRUE makes the RDF code more compact.
+	* FALSE is default. Default can be changed in constants.php.
+	*
+	* @param     boolean
+	* @access    public
+	*/
+	function configUseAttributes($bool) {
+		$this->use_attributes = $bool;
+	}
+
+	/**
+	* Serializer congiguration: Use Qnames
+	* Flag if the serializer should use qualified names for RDF reserved words.
+	* TRUE makes the RDF code more compact.
+	* TRUE is default. Default can be changed in constants.php.
+	*
+	* @param     boolean
+	* @access    public
+	*/
+	function configUseQnames($bool) {
+		$this->rdf_qnames = $bool;
+	}
+
+	/**
+	* Serializer congiguration: Use XML Declaration
+	* Flag if the serializer should start documents with the xml declaration
+	* <?xml version="1.0" encoding="UTF-8" ?>.
+	* TRUE is default. Default can be changed in constants.php.
+	*
+	* @param             boolean
+	* @access    public
+	*/
+	function configUseXmlDeclaration($bool) {
+		$this->use_xml_declaration = $bool;
+	}
+
+
+	/**
+	* Adds a new prefix/namespace combination.
+	*
+	* @param     String $prefix
+	* @param     String $namespace
+	* @access    public
+	*/
+	function addNamespacePrefix($prefix, $namespace) {
+		$this->m_defaultNamespaces[$prefix] = $namespace;
+	}
+
+	/**
+	* Serializes a model to RDF syntax.
+	* RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean),
+	* config_sort_model($boolean).
+	* NOTE: There is only one default namespace allowed within an XML document.
+	*       Therefore if SER_RDF_QNAMES in constants.php is set to FALSE and you pass
+	*       another $xml_default_namespace as parameter, the model will be serialized
+	*       as if SER_RDF_QNAMES were set to TRUE.
+	*
+	* @param     object MemModel $model
+	* @param     String $encoding
+	* @return    string
+	* @access    public
+	*/
+	function & serialize(&$model, $xml_default_namespace = NULL, $encoding = DEFAULT_ENCODING) {
+
+		if ($xml_default_namespace) {
+
+			if ($xml_default_namespace == RDF_NAMESPACE_URI) {
+				$this->rdf_qnames = FALSE;
+				unset($this->m_defaultNamespaces[RDF_NAMESPACE_PREFIX]);
+			}
+			elseif ($xml_default_namespace == RDF_SCHEMA_URI) {
+				unset($this->m_defaultNamespaces[RDF_SCHEMA_PREFIX]);
+			}
+			elseif (!SER_RDF_QNAMES)
+			$this->rdf_qnames = TRUE;
+
+			$this->addNamespacePrefix(NULL, $xml_default_namespace);
+		}
+
+		//copy parsed namespaces
+		$nsps = array();
+		$nsps = $model->getParsedNamespaces();
+		foreach($this->m_defaultNamespaces as $prefix => $namespace){
+			if(!isset ($nsps[$namespace]))
+			$nsps[$namespace] = $prefix;
+		}
+
+		// define rdf prefix (qname or not)
+		if ($this->rdf_qnames){
+			if(isset($nsps[RDF_NAMESPACE_URI])){
+				$this->rdf_qname_prefix = $nsps[RDF_NAMESPACE_URI].':';
+			}else{
+				$this->rdf_qname_prefix = RDF_NAMESPACE_PREFIX . ':';
+			}
+
+		}else{
+			$this->rdf_qname_prefix = '';
+		}
+		// check if model is empty
+		if ($model->size() == 0) return "<". $this->rdf_qname_prefix . RDF_RDF ." xmlns:rdf='".RDF_NAMESPACE_URI."' />";
+
+		foreach($nsps as $ns => $pre){
+			$this->m_namespaces[$pre] = $ns;
+		}
+
+
+		// set base URI
+		if ($model->getBaseURI()==NULL)
+		$this->m_baseURI="opaque:uri";
+		else
+		$this->m_baseURI=$model->getBaseURI();
+
+
+		if ($this->sort_model) {
+			// sort the array of statements
+
+			foreach($model->triples as $key => $statement) {
+				$stmkey = $statement->subj->getURI() .
+				$statement->pred->getURI() .
+				(is_a($statement->obj,'Literal')?'"'.$statement->obj->getLabel().'"@'.$statement->obj->getLanguage().'^^'.$statement->obj->getDatatype():$statement->obj->getURI());
+				$this->m_statements[$stmkey] = $statement;
+			}
+			ksort($this->m_statements);
+
+			/*
+			// Sort using the PHP usort() function. Slower :-(
+			$this->m_statements = $model->triples;
+			usort($this->m_statements, "statementsorter");
+			*/
+		} else {
+			$this->m_statements = $model->triples;
+		}
+		// collects namespaces
+		$this->m_nextAutomaticPrefixIndex=0;
+		$this->collectNamespaces($model);
+
+		// start writing the contents
+		$this->m_out="";
+		if ($this->use_xml_declaration)
+		$this->m_out .= '<?xml version="1.0" encoding="' . $encoding . '" ?>' . LINEFEED;
+		if (!HIDE_ADVERTISE)
+		$this->m_out.="<!-- Generated by RdfSerializer.php from RDF RAP.".LINEFEED."# http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html !-->".LINEFEED.LINEFEED ;
+
+		// write entitie declarations
+		if($this->use_entities) {
+			$this->m_out .= '<!DOCTYPE ' . $this->rdf_qname_prefix .
+			RDF_RDF.' [' . LINEFEED;
+			$this->writeEntityDeclarations();
+			$this->m_out .= LINEFEED . ']>' . LINEFEED;
+		}
+
+		// start the RDF text
+		$this->m_out .= '<' . $this->rdf_qname_prefix . RDF_RDF;
+
+		// write the xml:base
+		if ($model->getBaseURI() != NULL)
+		$this->m_out .= LINEFEED. INDENTATION .'xml:base="'.$model->getBaseURI().'"';
+
+		// write namespaces declarations
+		$this->writeNamespaceDeclarations();
+		$this->m_out .='>'. LINEFEED;
+
+		// write triples
+		$this->writeDescriptions();
+
+		$this->m_out .= LINEFEED;
+		$this->m_out .='</' . $this->rdf_qname_prefix . RDF_RDF .'>';
+
+		$this->m_namespaces=null;
+		$this->m_statements=null;
+		$this->m_currentSubject=null;
+		$this->m_groupTypeStatement=null;
+		$this->m_attributeStatements=null;
+		$this->m_contentStatements=null;
+		$this->m_rdfResourceElementText=null;
+
+		return $this->m_out;
+	}
+
+	/**
+	* Serializes a model and saves it into a file.
+	* Returns FALSE if the model couldn't be saved to the file.
+	*
+	* @param     object MemModel $model
+	* @param     String $encoding
+	* @return    boolean
+	* @access    public
+	*/
+	function  saveAs(&$model, $filename, $encoding = DEFAULT_ENCODING) {
+		// serialize model
+		$RDF = $this->serialize($model, NULL, $encoding);
+
+		//write serialized model to file
+		$file_handle = @fopen($filename, 'w');
+		if ($file_handle) {
+			fwrite($file_handle, $RDF);
+			fclose($file_handle);
+			return TRUE;
+		} else {
+			return FALSE;
+		};
+	}
+
+	/**
+	* @access   private
+	*/
+	function writeEntityDeclarations() {
+		foreach($this->m_namespaces as $prefix => $namespace) {
+			$this->m_out .= INDENTATION . '<!ENTITY '. $prefix . " '" . $namespace ."'>".LINEFEED;
+		}
+	}
+
+	/**
+	* @access   private
+	*/
+	function writeNamespaceDeclarations() {
+		foreach($this->m_namespaces as $prefix => $namespace) {
+
+			if ($prefix == RDF_NAMESPACE_PREFIX && !$this->rdf_qnames) {
+
+				if($this->use_entities) {
+					$this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX .
+					'="&' . $prefix . ';"';
+				} else {
+					$this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX .
+					'="' . $namespace . '"';
+				}
+			} else {
+				if ($prefix == NULL)
+				$colon_prefix = $prefix;
+				else
+				$colon_prefix = ":" .$prefix;
+
+				if($this->use_entities) {
+					$this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX
+					.$colon_prefix .'="&' . $prefix . ';"';
+				} else {
+					$this->m_out .= LINEFEED . INDENTATION .XML_NAMESPACE_DECLARATION_PREFIX
+					.$colon_prefix .'="' . $namespace . '"';
+				}
+			}
+		}
+	}
+
+	/**
+	* @access   private
+	*/
+	function writeDescriptions()  {
+
+		$this->m_groupTypeStatement = NULL;
+		$this->m_attributeStatements = array();
+		$this->m_contentStatements = array();
+		$this->m_currentSubject = NULL;
+
+		foreach($this->m_statements as $key => $statement) {
+			$subject = $statement->getSubject();
+			$predicate = $statement->getPredicate();
+			$object = $statement->getobject();
+
+			// write Group and update current subject if nessesary
+			if ($this->m_currentSubject==NULL || !$this->m_currentSubject->equals($subject)) {
+				$this->writeGroup();
+				$this->m_currentSubject=$subject;
+			}
+
+			// classify the statement
+            if (($predicate->getURI() == RDF_NAMESPACE_URI.RDF_TYPE) && is_a($object, 'Resource') && !$this->m_groupTypeStatement) {
+                $this->writeGroup();
+                $this->m_groupTypeStatement = $statement;
+            } 
+			elseif ($this->canAbbreviateValue($object) &&
+			$this->use_attributes &&
+			$this->checkForDoubleAttributes($predicate))
+			{
+				if (is_a($object, 'Literal')) {
+					if ($object->getDatatype() == NULL) {
+						$this->m_attributeStatements[] = $statement;
+					} else {
+						$this->m_contentStatements[] = $statement;
+					}
+				} else {
+					$this->m_attributeStatements[] = $statement;
+				}
+			} else {
+				$this->m_contentStatements[] = $statement;
+			}
+		}
+		$this->writeGroup();
+	}
+
+	/**
+	* @access   private
+	*/
+	function writeGroup() {
+		if ($this->m_currentSubject==NULL || ($this->m_groupTypeStatement==NULL && (count($this->m_attributeStatements)==0) && (count($this->m_contentStatements)==0)))
+		return;
+		if ($this->m_groupTypeStatement!=NULL)
+		$outerElementName=$this->getElementText($this->m_groupTypeStatement->obj->getURI());
+		else
+		$outerElementName = $this->rdf_qname_prefix . RDF_DESCRIPTION;
+		$this->m_out .= LINEFEED . '<';
+		$this->m_out .= $outerElementName;
+
+		$this->m_out .= ' ';
+
+
+		$this->writeSubjectURI($this->m_currentSubject);
+
+		// attribute Statements
+		if ($this->use_attributes)
+		$this->writeAttributeStatements();
+
+		if (count($this->m_contentStatements)==0)
+		$this->m_out .= '/>' . LINEFEED;
+		else {
+			$this->m_out .= '>' . LINEFEED;
+
+			// content statements
+			$this->writeContentStatements();
+
+			$this->m_out .= '</';
+			$this->m_out .= $outerElementName;
+			$this->m_out .= '>'. LINEFEED;
+		}
+		$this->m_groupTypeStatement = NULL;
+		$this->m_attributeStatements = array();
+		$this->m_contentStatements = array();
+	}
+
+	/**
+	* @param object Node $predicate
+	* @access   private
+	*/
+	function checkForDoubleAttributes($predicate) {
+		foreach($this->m_attributeStatements as $key => $statement) {
+			if ($statement->pred->equals($predicate))
+			return FALSE;
+		}
+		return TRUE;
+	}
+
+	/**
+	* @param STRING $uri
+	* @access   private
+	*/
+	function relativizeURI($uri) {
+		$rdfUtil=new RDFUtil();
+		$uri_namespace = $rdfUtil->guessNamespace($uri);
+		if ($uri_namespace == $this->m_baseURI) {
+			return $rdfUtil->guessName($uri);
+		} else {
+			return $uri;
+		}
+	}
+
+	/**
+	* @param object Node $subject_node
+	*
+	* @access   private
+	*/
+
+	function writeSubjectURI($subject_node) {
+		$currentSubjectURI = $subject_node->getURI();
+		$relativizedURI = $this->relativizeURI($currentSubjectURI);
+
+		// if submitted subject ist a blank node, use rdf:nodeID
+		if (is_a($this->m_currentSubject, 'BlankNode')) {
+			$this->m_out .= $this->rdf_qname_prefix . RDF_NODEID;
+			$this->m_out .= '="';
+			$this->m_out .= $relativizedURI;
+		} else {
+
+
+			if (!($relativizedURI == $currentSubjectURI)) {
+				$this->m_out .= $this->rdf_qname_prefix . RDF_ID;
+				$this->m_out .= '="';
+				$this->m_out .= $relativizedURI;
+			} else {
+				$this->m_out .= $this->rdf_qname_prefix . RDF_ABOUT;
+				$this->m_out .= '="';
+				$this->writeAbsoluteResourceReference($relativizedURI);
+			};
+		};
+		$this->m_out .= '"';
+	}
+
+	/**
+	* @access   private
+	*/
+	function writeAttributeStatements() {
+		foreach($this->m_attributeStatements as $key => $statement) {
+			$this->m_out .= LINEFEED;
+			$this->m_out .= INDENTATION;
+			$this->m_out .= $this->getElementText($statement->pred->getURI());
+			$this->m_out .= '=';
+			$value=$statement->obj->getLabel();
+			$quote=$this->getValueQuoteType($value);
+			$this->m_out .= $quote;
+			$this->m_out .= $value;
+			$this->m_out .= $quote;
+		}
+	}
+
+	/**
+	* @access   private
+	*/
+	function writeContentStatements()  {
+		foreach($this->m_contentStatements as $key => $statement) {
+			$this->m_out .= INDENTATION;
+			$this->m_out .= '<';
+			$predicateElementText=$this->getElementText($statement->pred->getURI());
+			$this->m_out .= $predicateElementText;
+
+			if (is_a($statement->obj, 'Resource')) {
+				$this->writeResourceReference($statement->obj);
+				$this->m_out .= '/>' . LINEFEED;
+			} else {
+				if(is_a($statement->obj, 'Literal')) {
+					if ($statement->obj->getDatatype()!= NULL)
+					if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI . RDF_XMLLITERAL) {
+						$this->m_out .= ' ' . RDF_NAMESPACE_PREFIX . ':' . RDF_PARSE_TYPE . '="' . RDF_PARSE_TYPE_LITERAL . '"';
+					} else {
+						$this->m_out .= ' ' . RDF_NAMESPACE_PREFIX . ':' . RDF_DATATYPE . '="' . $statement->obj->getDatatype() . '"';
+					}
+					if ($statement->obj->getLanguage()!= NULL)
+					$this->m_out .= ' ' . XML_NAMESPACE_PREFIX . ':' . XML_LANG . '="' . $statement->obj->getLanguage() . '"';
+				};
+				$this->m_out .= '>';
+				if ($statement->obj->getDatatype()== RDF_NAMESPACE_URI . RDF_XMLLITERAL) {
+					$this->m_out .= $statement->obj->getLabel();
+				} else {
+					$this->writeTextValue($statement->obj->getLabel());
+				}
+				$this->m_out .= '</';
+				$this->m_out .= $predicateElementText;
+				$this->m_out .= '>' . LINEFEED;
+			}
+		}
+	}
+
+	/**
+	* @param Object $object_node
+	* @access   private
+	*/
+	function writeResourceReference($object_node)  {
+		$rebaseURI = $object_node->getURI();
+		$this->m_out .= ' ';
+		if (is_a($object_node, 'BlankNode')) {
+			$this->m_out .= $this->rdf_qname_prefix . RDF_NODEID;
+		} else {
+			$this->m_out .= $this->rdf_qname_prefix . RDF_RESOURCE;
+		};
+
+		$this->m_out .= '="';
+		$relativizedURI = $this->relativizeURI($rebaseURI);
+		if (!($relativizedURI == $rebaseURI))
+		if (!is_a($object_node, 'BlankNode'))
+		$this->m_out .= '#' . $relativizedURI;
+		else
+		$this->m_out .=  $relativizedURI;
+		else
+		$this->writeAbsoluteResourceReference($rebaseURI);
+		$this->m_out .= '"';
+	}
+
+
+	/**
+	* @param String $rebaseURI
+	* @access   private
+	*/
+	function writeAbsoluteResourceReference($rebaseURI) {
+		$rdfUtil=new RDFUtil();
+		$namespace=$rdfUtil->guessNamespace($rebaseURI);
+		$localName=$rdfUtil->guessName($rebaseURI);
+		$text=$rebaseURI;
+		if ($namespace!='' and $this->use_entities) {
+			$prefix= array_search($namespace, $this->m_namespaces);
+			$text='&'.$prefix.';'.$localName;
+		} else $text = $rdfUtil->escapeValue($text);
+		$this->m_out .= $text;
+	}
+
+	/**
+	* @param STRING $textValue
+	* @access   private
+	*/
+	function writeTextValue($textValue) {
+		if ($this->getValueQuoteType($textValue)==USE_CDATA)
+		$this->writeEscapedCDATA($textValue);
+		else
+		$this->m_out .= $textValue;
+	}
+
+	/**
+	* @param STRING $textValue
+	* @access   private
+	*/
+	function writeEscapedCDATA($textValue) {
+		$this->m_out .= '<![CDATA[' . $textValue . ']]>';
+	}
+
+	/**
+	* @param STRING $textValue
+	* @access   private
+	*/
+	function getValueQuoteType($textValue) {
+		$quote=USE_ANY_QUOTE;
+		$hasBreaks=FALSE;
+		$whiteSpaceOnly=TRUE;
+		for ($i=0; $i<strlen($textValue); $i++) {
+			$c=$textValue{$i};
+			if ($c=='<' || $c=='>' || $c=='&')
+			return USE_CDATA;
+			if ($c==LINEFEED)
+			$hasBreaks=TRUE;
+			if ($c=='"' || $c=="\'") {
+				if ($quote==USE_ANY_QUOTE)
+				$quote=($c=='"') ? "\'" : "\"";
+				elseif ($c==$quote)
+				return USE_CDATA;
+			}
+			if (!($c == ' '))
+			$whiteSpaceOnly = FALSE;
+		}
+		if ($whiteSpaceOnly || $hasBreaks)
+		return USE_CDATA;
+		return $quote==USE_ANY_QUOTE ? '"' : $quote;
+	}
+
+	/**
+	* @param object Node $node
+	* @access   private
+	*/
+	function canAbbreviateValue($node) {
+		if (is_a($node, 'Literal')) {
+			$value= $node->getLabel();
+			if (strlen($value)<MAX_ALLOWED_ABBREVIATED_LENGTH) {
+				$c=$this->getValueQuoteType($value);
+				return $c=='"' || $c=='\'';
+			}
+		}
+		return FALSE;
+	}
+
+	/**
+	* @param STRING $elementName
+	* @access   private
+	*/
+	function getElementText($elementName)  {
+		$rdfUtil=new RDFUtil();
+		$namespace=$rdfUtil->guessNamespace($elementName);
+		$localName=$rdfUtil->guessName($elementName);
+		if ($namespace=="")
+		return $localName;
+		$prefix=array_search($namespace, $this->m_namespaces);
+
+		if ($prefix===FALSE) {
+			$errmsg = RDFAPI_ERROR . "(class: Serializer; method: getElementText): Prefix for element '" . $elementName . "' cannot be found.";
+			trigger_error($errmsg, E_USER_ERROR);
+		}
+		switch ($prefix) {
+			case RDF_NAMESPACE_PREFIX:
+			return $this->rdf_qname_prefix . $localName;
+			case NULL:
+			return $localName;
+			default:
+			return $prefix. ":" .$localName;
+		}
+	}
+
+	/**
+	* @param object MemModel $model
+	* @access   private
+	*/
+	function collectNamespaces($model)  {
+		foreach($model->triples as $key => $value) {
+
+			if ($this->use_entities) {
+				$this->collectNamespace($value->getSubject());
+				if(!is_a($value->getObject(), 'Literal'))
+				$this->collectNamespace($value->getObject());
+
+			} else {
+
+				if  ($value->pred->getURI() == RDF_NAMESPACE_URI.RDF_TYPE)
+				$this->collectNamespace($value->getObject());
+				elseif
+				(($value->pred->getURI() == RDF_NAMESPACE_URI.RDFS_SUBCLASSOF) ||
+				($value->pred->getURI() == RDF_NAMESPACE_URI.RDFS_SUBPROPERTYOF)) {
+					$this->collectNamespace($value->getSubject());
+					$this->collectNamespace($value->getObject());
+				}
+			}
+
+			$this->collectNamespace($value->getPredicate());
+
+		}
+	}
+
+	/**
+	* @param object Resource $resource
+	* @access   private
+	*/
+	function collectNamespace($resource)  {
+
+		$rdfUtil=new RDFUtil();
+		$namespace=$rdfUtil->getNamespace($resource);
+		if (!in_array($namespace, $this->m_namespaces)&&$namespace!='') {
+			$prefix = array_search( $namespace, $this->m_defaultNamespaces);
+			if ($prefix===FALSE)
+			$prefix=$this->getNextNamespacePrefix();
+			$this->m_namespaces[$prefix] = $namespace;
+		}
+	}
+
+	/**
+	* @access   private
+	*/
+	function getNextNamespacePrefix() {
+		$this->m_nextAutomaticPrefixIndex++;
+		return GENERAL_PREFIX_BASE . $this->m_nextAutomaticPrefixIndex;
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/syntax/RssParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/RssParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/RssParser.php	(revision 225)
@@ -0,0 +1,246 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RSS/ATOM Parser
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * RSS/ATOM Parser
+ * 
+ * This class uses the MagpieRSS Parser by Kellan Elliott-McCrea <kellan@protest.net>. MagpieRSS is 
+ * compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom (with a few exceptions). 
+ * Magpie is distributed under the GPL license. (http://magpierss.sourceforge.net/)
+ * 
+ *
+ *
+ * @author Tobias Gauß <tobias.gauss@web.de>
+ * @version $Id: RssParser.php 301 2006-06-26 10:22:25Z tgauss $
+ * @package syntax
+ * @access public
+ **/
+
+class RssParser extends Object {
+	var $type;
+	
+	/**
+	* Main function
+	*
+	* @param $url location of the document
+	* @return parsed model
+	*/
+	function generateModel($url){
+		$rss = null;
+		if(substr($url,0,7)=="http://"){
+			$rss = fetch_rss($url);
+		}else{
+				$string = file_get_contents($url);
+				$rss = new MagpieRSS($string);	
+		}
+		
+		$modelFactory = new ModelFactory();
+		$model = $modelFactory->getMemModel();	
+		$bn = new Resource($url);
+		
+		$this->type = $rss->feed_type;
+		$version = $rss->feed_version;
+		
+		$nmsp = null;
+	 	if($version == "1.0")
+	 	 		$nmsp = "http://purl.org/rss/1.0/";
+	 	if($version == "0.91")
+	 	 		$nmsp = "http://my.netscape.com/publish/formats/rss-spec-0.91.html#";
+	 	if($version == "2.0")
+	 	 		$nmsp = "http://purl.org/rss/1.0/";
+	 	if($this->type == "Atom")
+	 	 		$nmsp = "http://www.w3.org/2005/Atom";
+	 	 
+		if($this->type == "Atom")
+			$this->channel($model,$rss,$bn,$nmsp,"feed");
+		else 
+			$this->channel($model,$rss,$bn,$nmsp,"channel");
+		$this->image($model,$rss,$bn,$nmsp);
+		$this->items($model,$rss,$bn,$nmsp);
+		$model->addNamespace("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");
+		if($nmsp!= null)
+			$model->addNamespace($this->type,$nmsp);
+		return $model;
+	}
+
+	/**
+	* Parses the image if there is one.
+	*
+	* @param $model the model
+	* @param $rss the magpie parser object
+	* @param $bnOrg the node which represents the channel
+	* @param $nmsp the
+	*/
+	function image(&$model,&$rss,&$bnOrg,&$nmsp){		
+		if(count($rss->image)>0){
+			if(isset($rss->image['about'])){
+				$bn = new Resource($rss->image['about']);
+			}else if(isset($rss->image['url'])){
+				$bn = new Resource($rss->image['url']);
+			}else{
+				$bn = new BlankNode("image");
+			}
+			$model->add(new Statement($bnOrg,new Resource($nmsp."image"),$bn));
+			$model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource($nmsp."image")));
+		}
+		foreach($rss->image as $key => $value){
+		$statement = null;	
+		switch($key){
+					case "dc":
+						$this->dc($bn,$model,$value);
+					break;
+					case "sy":
+						$this->sy($bn,$model,$value);
+					break;
+					default :
+						$statement = new Statement($bn,new Resource($nmsp.$key), new Literal($value));
+					break;
+				}
+			if($statement != null){
+				$model->add($statement);
+			}
+		}
+	
+	}
+	
+	/**
+	* Parses the rss items/ atom entries.
+	*
+	* @param $model the model
+	* @param $rss the magpie parser object
+	* @param $bnOrg the node which represents the channel
+	* @param $nmsp the
+	*/
+	function items(&$model,&$rss,&$bnOrg,&$nmsp){		
+		$items = new BlankNode("items");
+		$model->add(new Statement($bnOrg,new Resource($nmsp."items"),$items));
+		$model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq")));
+		$i = 1;
+		foreach($rss->items as $outerKey => $outerValue){
+			if(isset($outerValue['about'])){
+				$bn = new Resource($outerValue['about']);
+			}else if(isset($outerValue['guid'])){
+				$bn = new Resource($outerValue['guid']);
+			}else if(isset($outerValue['id'])){
+				$bn = new Resource($outerValue['id']);
+			}else{
+				$bn = new Blanknode("item".$i);
+			}
+			$model->add(new Statement($items,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#_".$i),$bn));
+			if($this->type == "Atom"){
+				$model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://www.w3.org/2005/Atomentry")));
+			}else{
+				$model->add(new Statement($bn,new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new Resource("http://purl.org/rss/1.0/item")));
+			}
+			foreach($outerValue as $key => $value){
+				$statement = null;
+				switch($key){
+					case "about":
+						break;
+					case "guid":
+						break;
+					case "dc":
+						$this->dc($bn,$model,$value);
+					break;
+					case "sy":
+						$this->sy($bn,$model,$value);
+					break;
+					default :
+						if($value != null)
+						$statement = new Statement($bn,new Resource($nmsp.$key), new Literal($value));
+					break;
+				}
+				if($statement != null){
+					$model->add($statement);
+				}
+			}
+			$i++;
+		}
+		
+	}
+	
+	/**
+	* Adds the dc namespace.
+	*
+	* @param $node the node
+	* @param $model the model
+	* @param $dc Array which contains the dc objects
+	*/
+	function dc(&$node,&$model,&$dc){
+		$model->addNamespace("dc","http://purl.org/dc/elements/1.1/");
+		foreach($dc as $key => $value){
+				$statement = null;
+				$statement = new Statement($node,new Resource("http://purl.org/dc/elements/1.1/".$key), new Literal($value));
+			if($statement != null){
+				$model->add($statement);
+			}
+		}
+	}
+	
+	/**
+	* Adds the sy namespace.
+	*
+	* @param $node the node
+	* @param $model the model
+	* @param $sy Array which contains the sy objects
+	*/
+	function sy(&$node,&$model,&$sy){
+		$model->addNamespace("sy","http://purl.org/rss/1.0/modules/syndication/");
+		foreach($sy as $key => $value){
+				$statement = null;
+				$statement = new Statement($node,new Resource("http://purl.org/rss/1.0/modules/syndication/".$key), new Literal($value));
+			if($statement != null){
+				$model->add($statement);
+			}
+		}
+		
+	}
+	
+	
+	/**
+	* Parses the rss channel/ atom feed.
+	*
+	* @param $model the model
+	* @param $rss the magpie parser object
+	* @param $node the node which represents the channel
+	* @param $nmsp the
+	*/
+	function channel(&$model,&$rss,&$node,&$nmsp,$type){
+	 	// Channel
+	 	$statement = new Statement($node,new Resource('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), new Resource($nmsp.$type));
+		$model->add($statement);
+		
+	 	foreach($rss->channel as $key => $value){
+			$statement = null;	
+			switch($key){
+						case "dc":
+							$this->dc($node,$model,$value);
+						break;
+						case "sy":
+							$this->sy($node,$model,$value);
+						break;
+						case "items":	
+						break;
+						case "tagline":	
+						break;
+						case "items_seq":
+						break;
+						default :
+							$statement = new Statement($node,new Resource($nmsp.$key), new Literal($value));
+						break;
+					}
+			if($statement != null){
+				$model->add($statement);
+		}
+	}
+}
+
+  
+  
+} //end: RssParser
+
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SparqlResultParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SparqlResultParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SparqlResultParser.php	(revision 225)
@@ -0,0 +1,164 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: SparqlResultParser
+// ----------------------------------------------------------------------------------
+
+/**
+* Parses an xml document in SPARQL Result XML Format.
+*
+* @version  $Id: SparqlResultParser.php 442 2007-06-01 16:19:26Z cax $
+* @author   Tobias Gauß <tobias.gauss@web.de>
+*
+* @package sparql
+*/
+
+class SparqlResultParser extends Object {
+
+
+	var $arrOutput = array();
+	var $resParser;
+	var $strXmlData;
+	var $counter = -1;
+	var $mode = -1;
+	var $varname;
+	var $dtype;
+	var $lang;
+	var $varlist;
+	var $bncounter = 0;
+	var $current_literal;	
+	
+	
+/**
+* Main function of SparqlResultParser
+*
+* @param String  $strInputXML  input document.
+*/
+	function parse($strInputXML) {
+
+		$this->resParser = xml_parser_create ();
+
+		xml_set_object($this->resParser,$this);
+		xml_set_element_handler($this->resParser, "tagOpen", "tagClosed");
+
+		xml_set_character_data_handler($this->resParser, "tagData");
+
+		$this->strXmlData = xml_parse($this->resParser,$strInputXML );
+		if(!$this->strXmlData) {
+			echo "unable to parse result<br>".
+			"server returned: <br>"
+			.$strInputXML;
+			
+			return "false";
+		
+		}
+
+		xml_parser_free($this->resParser);
+
+		return $this->arrOutput;
+	}
+	
+// private parser functions from here //	
+	function tagOpen($parser, $name, $attrs) {
+		//  $tag=array("name"=>$name,"attrs"=>$attrs);
+		//  array_push($this->arrOutput,$tag);
+		if(strtolower($name)=="variable"){
+			if(isset($attrs['name']))
+				$this->varlist[]=$attrs['name'];
+			if(isset($attrs['NAME']))
+				$this->varlist[]=$attrs['NAME'];
+		}
+		
+		if(strtolower($name)=="result"){
+			$this->counter++;
+			if($this->counter > -1){
+				foreach($this->varlist as $value){
+					if(!isset($this->arrOutput[$this->counter][$value]))
+						$this->arrOutput[$this->counter]["?".$value]='';
+				}	
+			}
+			
+		}
+		if(strtolower($name)=="boolean"){
+			$this->counter++;
+			$this->mode = 3;
+		}
+		if(strtolower($name)=="binding"){
+			$this->varname = null;
+			$this->dtype   = null;
+			$this->lang    = null;
+			
+			if(isset($attrs['name'])){
+				$this->varname = "?".$attrs['name'];
+			}else{
+				$this->varname = "?".$attrs['NAME'];
+			}
+		}
+		if(strtolower($name)=="uri"){
+			$this->mode = 0;
+		}
+		if(strtolower($name)=="literal"){
+			$this->mode = 1;
+			$this->current_literal = "";
+			if(isset($attrs['datatype'])){
+				$this->dtype = $attrs['datatype'];
+			}else if(isset($attrs['DATATYPE'])){
+				$this->dtype = $attrs['DATATYPE'];
+			}
+			if(isset($attrs['xml:lang'])){
+				$this->lang = $attrs['datatype'];
+			}else if(isset($attrs['XML:lang'])){
+				$this->lang = $attrs['XML:lang'];
+			}else if(isset($attrs['XML:LANG'])){
+				$this->lang = $attrs['XML:LANG'];
+			}else if(isset($attrs['xml:LANG'])){
+				$this->lang = $attrs['xml:LANG'];
+			}
+		}
+		if(strtolower($name)=="bnode"){
+			$this->mode = 2;
+		}
+	}
+
+	function tagData($parser, $tagData) {
+		switch($this->mode){
+			case 0 :
+			$this->arrOutput[$this->counter][$this->varname] = new Resource($tagData);
+			$this->mode = -1;
+			break;
+			case 1:
+			$this->current_literal .= $tagData;
+			break;
+			case 2:
+			if($tagData=="/"){
+				$bn = "bNode".$this->bncounter;
+				$this->bncounter++;
+			}else{
+				$bn = $tagData;
+			}
+			$this->arrOutput[$this->counter][$this->varname] = new BlankNode($bn);
+			$this->mode = -1;
+			break;
+			case 3:
+			$this->arrOutput = $tagData;
+			$this->mode = -1;
+			break;
+
+		}
+		
+	}
+
+	function tagClosed($parser, $name) {
+		if ($this->mode == 1) {
+			$lit = new Literal($this->current_literal);
+			if($this->lang)
+				$lit->setLanguage($this->lang);
+			if($this->dtype)
+				$lit->setDatatype($this->dtype);
+			$this->arrOutput[$this->counter][$this->varname] = $lit ;
+			$this->mode = -1;
+		}		
+	}
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SyntaxGRDDL.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SyntaxGRDDL.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SyntaxGRDDL.php	(revision 225)
@@ -0,0 +1,16 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Syntax RDF
+// ----------------------------------------------------------------------------------
+//
+// Description               : Syntax RDF package
+//
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+
+// Include Syntax classes
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/GRDDLParser.php' );
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SyntaxJSON.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SyntaxJSON.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SyntaxJSON.php	(revision 225)
@@ -0,0 +1,6 @@
+<?php
+// Include Syntax classes
+// $Id: SyntaxJSON.php 552 2007-11-23 09:12:11Z p_frischmuth $
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/JsonParser.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/JsonSerializer.php' );
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SyntaxN3.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SyntaxN3.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SyntaxN3.php	(revision 225)
@@ -0,0 +1,18 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Syntax N3 and NTriple
+// ----------------------------------------------------------------------------------
+//
+// Description               : Syntax N3 and NTriple package
+//
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+
+// Include Syntax classes
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/N3Parser.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/N3Serializer.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/NTripleSerializer.php' );
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SyntaxRDF.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SyntaxRDF.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SyntaxRDF.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Syntax RDF
+// ----------------------------------------------------------------------------------
+//
+// Description               : Syntax RDF package
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+
+// Include Syntax classes
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/RdfParser.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/RdfSerializer.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/NTripleSerializer.php' );
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SyntaxRSS.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SyntaxRSS.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SyntaxRSS.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Syntax RSS
+// ----------------------------------------------------------------------------------
+//
+// Description               : Syntax RSS package
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+
+// Include Syntax classes
+require_once( RDFAPI_INCLUDE_DIR . 'util/magpie/rss_fetch.inc' );
+require_once( RDFAPI_INCLUDE_DIR . 'util/magpie/rss_parse.inc' );
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/RssParser.php' );
+?>
Index: Dev/branches/Demo/rdfapi/syntax/SyntaxSparqlRes.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/SyntaxSparqlRes.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/SyntaxSparqlRes.php	(revision 225)
@@ -0,0 +1,15 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Syntax SparqlRes
+// ----------------------------------------------------------------------------------
+//
+// Description               : Syntax Sparql Result package
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+
+// Include Syntax classes
+require_once( RDFAPI_INCLUDE_DIR . 'syntax/SparqlResultParser.php' );
+?>
Index: Dev/branches/Demo/rdfapi/syntax/TriXParser.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/TriXParser.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/TriXParser.php	(revision 225)
@@ -0,0 +1,135 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: TriXParser
+// ----------------------------------------------------------------------------------
+
+/**
+* Temporary implementation of a TriX-Parser (Usable only with PHP > V5)
+* Currently, it doesn't support any namespaces and has problems with typed literals.
+* So this parser only works with TRIX documents where the default namespace is the TRIX namespace.
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+*
+* @package 	dataset
+* @access	public
+**/
+class TriXParser  
+{
+	/**
+	* Reference to the graphSet
+	*
+	* @var		GraphSet
+	* @access	private
+	*/
+	var $graphSet;
+	
+	/**
+	* Constructor
+	* Needs a reference to a graphSet
+	*
+	* @param    GraphSet 
+	* @access	public
+	*/		
+	function TriXParser(&$graphSet)
+	{
+		$this->graphSet=&$graphSet;	
+	}
+
+	/**
+	* Parse an XML string
+	*
+	* @param   string
+	* @access	public
+	*/
+	function parseString($string)
+	{
+		$this->_populateGraphSet(simplexml_load_string($string));
+	}
+	
+	/**
+	* Parse from a file
+	*
+	* @param   string
+	* @access	public
+	*/
+	function parseFile($pathToFile)
+	{
+		$this->_populateGraphSet(simplexml_load_file($pathToFile));
+	}
+	
+	/**
+	* Populates the graphSet with namedGraphs and triples.
+	*
+	* @param   object simpleXMLModel  $xmlModel
+	* @access	private
+	*/
+	function _populateGraphSet(&$xmlModel)
+	{
+		$defaultGraphOccurred=false;
+		
+		foreach ($xmlModel->graph as $graph) 
+		{
+			if (isset($graph->uri)) 
+			{
+				$graphName=(string)$graph->uri;
+				$namedGraph=& $this->graphSet->getNamedGraph($graphName);
+				if ($namedGraph ==null)
+					$namedGraph=& $this->graphSet->createGraph($graphName);
+			} else 
+			{
+				if ($defaultGraphOccurred)
+					trigger_error('Only one unnamed Graph per file allowed', E_USER_ERROR);
+				
+				$namedGraph=& $this->graphSet->getDefaultGraph();
+				$defaultGraphOccurred=true;
+			}	
+						
+			foreach ($graph->triple as $triple)
+			{
+				$tripleCount=0;
+				$tripleArray=array();
+				foreach ($triple->children() as $tag => $value)
+				{
+					$tripleArray[$tripleCount++]=$this->_element2Resource((string)$tag,$value);
+				};
+				$namedGraph->add(new Statement($tripleArray[0],$tripleArray[1],$tripleArray[2]));	
+			};
+		};
+	}
+	
+	/**
+	* return a mathing resource tyoe
+	*
+	* @param   string  
+	* @param   object simpleXMLNode $value
+	* @access	private
+	*/
+	function _element2Resource($tag,$value)
+	{
+		switch ($tag) 
+		{
+				case 'uri':
+					return new Resource((string)$value);
+				break;
+		
+				case 'id':
+					return new BlankNode((string)$value);
+				break;
+				
+				case 'typedLiteral':
+					$literal=new Literal((string)$value);
+					$literal->setDatatype((string)$value['datatype']);
+					return $literal;
+				break;
+					
+				case 'plainLiteral':
+					$literal=new Literal((string)$value);
+					if(isset($value['xml:lang']))
+						$literal->setLanguage((string)$value['xml:lang']);
+					return $literal;
+				break;
+		}
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/syntax/TriXSerializer.php
===================================================================
--- Dev/branches/Demo/rdfapi/syntax/TriXSerializer.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/syntax/TriXSerializer.php	(revision 225)
@@ -0,0 +1,151 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Class: TriXSerializer
+// ----------------------------------------------------------------------------------
+
+/**
+* Temporary implementation of a TriX-Serializer
+* 
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+*
+* @package 	dataset
+* @access	public
+**/
+class TriXSerializer  
+{
+	
+	/**
+	* Reference to the graphSet
+	*
+	* @var		object GraphSet
+	* @access	private
+	*/
+	var $graphSet;
+	
+
+	/**
+	* Constructor
+	* Needs a reference to a graphSet
+	*
+	* @param    GraphSet
+	* @access	public
+	*/		
+	function TriXSerializer(&$graphSet)
+	{
+		$this->graphSet=&$graphSet;
+	}
+
+	/**
+	* Serialize the dataset to a TriX string
+	*
+	* @return   string
+	* @access	public
+	*/
+	function & serializeToString()
+	{
+		return $this->_serialize();
+	}
+	
+	/**
+	* Serialize the dataset to a TriX string and save in file
+	*
+	* @param   string
+	* @access	public
+	*/
+	function serializeToFile($fileName)
+	{
+		$serializedString=&$this->_serialize();
+		$handle = fopen($fileName, 'w');
+	   	fwrite($handle, $serializedString);
+		fclose($handle);
+	}
+	
+	
+	/**
+	* Serialize the dataset to a TriX string
+	*
+	* @return   string
+	* @access	private
+	*/
+	function & _serialize()
+	{
+		//Trix header
+		$serializedString=
+			'<?xml version="1.0" encoding="utf-8"?>'.
+			'<TriX xmlns="http://www.w3.org/2004/03/trix/trix-1/">';
+		
+		//serialize defaultGraph if it is not empty
+		$defaultGraph=& $this->graphSet->getDefaultGraph();
+		if ($defaultGraph->isEmpty()===false)
+		{
+			$serializedString.='<graph>';
+			for($iterator = $this->graphSet->findInDefaultGraph(null,null,null); $iterator->valid(); $iterator->next()) 
+			{
+				$serializedString.='<triple>';
+				
+				$statement=$iterator->current();
+				
+				$serializedString.=$this->_node2string($statement->getSubject());
+				$serializedString.=$this->_node2string($statement->getPredicate());
+				$serializedString.=$this->_node2string($statement->getObject());
+				
+				$serializedString.='</triple>';
+			};
+			$serializedString.='</graph>';
+		}		
+			
+		//serialize namedGraphs	
+		foreach ($this->graphSet->listGraphNames() as $graphName)
+		{
+			$serializedString.='<graph>';
+			$serializedString.='<uri>'.$graphName.'</uri>';
+			for($iterator = $this->graphSet->findInNamedGraphs(new Resource($graphName),null,null,null); $iterator->valid(); $iterator->next()) 
+			{
+				$serializedString.='<triple>';
+				
+				$statement=$iterator->current();
+				
+				$serializedString.=$this->_node2string($statement->getSubject());
+				$serializedString.=$this->_node2string($statement->getPredicate());
+				$serializedString.=$this->_node2string($statement->getObject());
+				
+				$serializedString.='</triple>';
+			};
+			$serializedString.='</graph>';
+		};		
+		//TriX footer	
+		$serializedString.='</TriX>';	
+		return $serializedString;
+	}
+	
+	/**
+	* Serialize node to a TriX string
+	*
+	* @param Node
+	* @return   string
+	* @access	private
+	*/
+	function _node2string($node)
+	{
+		switch ($node)
+		{
+			case (is_a($node,'BlankNode')):
+				return ('<id>'.$node->getLabel().'</id>');
+			
+			case (is_a($node,'Resource')):
+				return ('<uri>'.$node->getLabel().'</uri>');
+			
+			case (is_a($node,'Literal')):
+			
+				if ($node->dtype!=null)
+					return ('<typedLiteral datatype="'.htmlentities($node->dtype).'">'.$node->getLabel().'</typedLiteral>');
+
+				if ($node->lang!=null)
+					return ('<plainLiteral xml:lang="'.htmlentities($node->lang).'">'.$node->getLabel().'</plainLiteral>');
+					
+				return ('<plainLiteral>'.htmlentities($node->getLabel()).'</plainLiteral>');
+		}
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/FindIterator.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/FindIterator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/FindIterator.php	(revision 225)
@@ -0,0 +1,119 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: FindIterator
+// ----------------------------------------------------------------------------------
+
+/**
+ * Iterator for traversing statements matching a searchpattern. 
+ * FindIterators are returned by model->findAsIterator()
+ * Using a find iterator is significantly faster than using model->find() which returns
+ * a new result model.
+ * 
+ * 
+ * @version  $Id: FindIterator.php 268 2006-05-15 05:28:09Z tgauss $
+ * @author Tobias Gauß <tobias.gauss@web.de>
+ *
+ * @package utility
+ * @access	public
+ *
+ */ 
+ class FindIterator extends Object {
+
+ 	/**
+	* Reference to the MemModel
+	* @var		object MemModel
+	* @access	private
+	*/	
+    var $model;
+    
+
+
+ 	/**
+	* Current position
+	* FindIterator does not use the build in PHP array iterator,
+	* so you can use serveral iterators on a single MemModel.
+	* @var		integer
+	* @access	private
+	*/	
+    var $position;
+    
+    
+    /**
+	* Searchpattern
+	* 
+	* @var		Object Subject,Predicate,Object
+	* @access	private
+	*/	
+
+    var $subject;
+    var $predicate;
+    var $object;
+   
+    
+   /**
+    * Constructor
+    *
+    * @param	object	MemModel
+    * @param    object  Subject
+    * @param    object  Predicate
+    * @param    object  Object
+	* @access	public
+    */
+    function FindIterator(&$model,$sub,$pred,$obj) {
+		$this->model = &$model;
+		$this->subject=$sub;
+		$this->predicate=$pred;
+		$this->object=$obj;
+		$this->position=-1;
+	}
+	
+	
+ 	/**
+    * Returns TRUE if there are more matching statements.
+    * @return	boolean
+    * @access	public  
+    */
+    function hasNext() {
+  		if($this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1)>-1){
+  			return TRUE;
+  		}else{
+  			return FALSE;
+  		}
+    }
+
+   
+    /**
+    * Returns the next matching statement.
+    * @return	statement or NULL if there is no next matching statement.
+    * @access	public  
+    */
+    function next() {
+  			$res=$this->model->findFirstMatchOff($this->subject,$this->predicate,$this->object,$this->position+1);	
+  			if($res>-1){
+  				$this->position=$res;
+  				return $this->model->triples[$res];
+  			}else{
+  				return Null;
+  			}		
+    }
+   
+   
+ 
+
+    /**
+    * Returns the current matching statement.
+    * @return	statement or NULL if there is no current matching statement.
+    * @access	public  
+    */
+    function current() {
+  		if (($this->position >= -1)&&(isset($this->model->triples[$this->position]))) {
+			return $this->model->triples[$this->position];
+		} else {
+			return NULL;
+		} 
+    }  
+  
+ } 
+
+?>
Index: Dev/branches/Demo/rdfapi/util/IterFind.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/IterFind.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/IterFind.php	(revision 225)
@@ -0,0 +1,174 @@
+<?php 
+
+// ----------------------------------------------------------------------------------
+// Class: IterFind
+// ----------------------------------------------------------------------------------
+
+
+/**
+* Implementation of a find-iterator which delivers statements or quads.
+*
+* This Iterator should be used in a for-loop like:
+* for($iterator = $memmodel->iterFind(null,null,null,null); $iterator->valid(); $iterator->next()) 
+* {
+*	$statement=$iterator->current();
+* };
+*
+* @version  $Id$
+* @author Daniel Westphal (http://www.d-westphal.de)
+*
+*
+* @package 	utility
+* @access	public
+**/
+class IterFind
+{
+	
+	/**
+	* The current position
+	* @var		integer
+	* @access	private
+	*/
+	var $key;
+	
+	/**
+	* boolean value, if the results should be returned as Quads
+	* @var		boolean
+	* @access	private
+	*/
+	var $returnAsQuads;
+	
+	/**
+	* If the current resource is valid
+	* @var		boolean
+	* @access	private
+	*/
+	var $valid;
+	
+	/**
+	* The current NamedGraph
+	* @var obejct NamedGraph
+	* @access	private
+	*/
+	var $current;
+	
+	/**
+	* The graph to look in.
+	* @var string 
+	* @access	private
+	*/	
+	var $findGraph;
+	
+	/**
+	* The subject Resource to search for
+	* @var string 
+	* @access	private
+	*/	
+	var $findSubject;
+	
+	/**
+	* The predicate Resource to search for
+	* @var string 
+	* @access	private
+	*/	
+	var $findPredicate;
+	
+	/**
+	* The object Resource to search for
+	* @var string 
+	* @access	private
+	*/	
+	var $findObject;
+	
+	
+	
+	/**
+    * Constructor.
+    *
+	* $subject, $predicate, and $object are used like find().
+	* $graph has to be a reference to the graph to search in.
+	*
+	* 
+    *
+    * @param $graph Resource
+    * @param $subject Resource
+    * @param $predicate Resource
+    * @param $object Resource
+    * @param $returnAsQuads boolean
+	* @access	public
+    */
+	function IterFind($graph,$subject,$predicate,$object,$returnAsQuads=false)
+	{
+		if ($graph==NULL)
+		{
+			$this->valid=false;
+			return;	
+		}		
+		$this->findGraph=&$graph;
+		$this->findSubject=$subject;
+		$this->findPredicate=$predicate;
+		$this->findObject=$object;
+		$this->rewind();
+		$this->returnAsQuads=$returnAsQuads;
+	}
+	
+	/**
+    * Resets iterator list to start
+    *
+	* @access	public
+    */
+	function rewind()
+	{
+		$this->key = -1;
+		$this->next();
+	}
+	
+	/**
+    * Says if there are additional items left in the list
+    *
+    * @return	boolean
+	* @access	public
+    */
+	function valid()
+	{
+		return $this->valid;
+	}
+	
+	/**
+    * Moves Iterator to the next item in the list
+    *
+	* @access	public
+    */
+	function next()
+	{
+		$this->current = $this->findGraph->findFirstMatchingStatement($this->findSubject,$this->findPredicate,$this->findObject,++$this->key);
+		$this->valid=($this->current!=NULL);
+	}
+	
+	/**
+    * Returns the current item
+    *
+    * @return	mixed
+	* @access	public
+    */
+	function current()
+	{
+		if($this->returnAsQuads)
+		return new Quad(new Resource($this->findGraph->getGraphName()),$this->current->getSubject(),$this->current->getPredicate(),$this->current->getObject());
+		//else
+		return $this->current;
+	}
+	
+	
+	/**
+    * Returns the key of the current item
+    *
+    * @return	integer
+	* @access	public
+    */
+	function key()
+	{
+		return $this->key;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/ModelComparator.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/ModelComparator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/ModelComparator.php	(revision 225)
@@ -0,0 +1,158 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: ModelComparator
+// ----------------------------------------------------------------------------------
+
+
+/**
+ * This class compares to models. This comparator bases on the labelling algorithm 
+ * described in <href="http://www.hpl.hp.com/techreports/2003/HPL-2003-142.pdf" >Signing RDF Graphs</href> 
+ * by Jeremy J. Carroll.
+ *
+ *
+ * @version  $Id$
+ * @author Tobias Gauß <tobias.gauss at web.de>
+ *
+ * @package utility
+ * @access	public
+ *
+ **/ 
+ class ModelComparator extends Object {
+ 	
+ 	/**
+ 	* Compares two models.
+ 	*
+ 	* @param $thisModel First Model.
+ 	* @param $thatModel Second Model.
+ 	*
+ 	* @return boolean
+ 	*/
+ 	function compare($thisModel, $thatModel){
+ 	
+ 	$thisModeltriples = null;
+ 	$thatModeltriples = null;
+ 	
+ 		if(is_a($thisModel,"DbModel")){
+ 			$thisModeltriples = 	$thisModel->getMemModel();
+ 		}else{
+ 			$thisModeltriples = 	$thisModel;
+ 		}
+ 		
+ 		if(is_a($thatModel,"DbModel")){
+ 			$thatModeltriples = 	$thatModel->getMemModel();
+ 		}else{
+ 			$thatModeltriples = 	$thatModel;
+ 		}
+ 			
+ 		$sortArray1 = ModelComparator::buildSortArray($thisModeltriples->triples);
+		$sortArray2 = ModelComparator::buildSortArray($thatModeltriples->triples);	
+		
+		$renamedArray1 = ModelComparator::renameBlanks($sortArray1);
+		$renamedArray2 = ModelComparator::renameBlanks($sortArray2);
+		
+		return ModelComparator::compareTriples($renamedArray1,$renamedArray2);
+ 	}
+ 		
+ 	
+ 	/**
+ 	* Builds a sorted array. 
+ 	*
+ 	* @param $tripleList A List that contains the models triples.
+ 	*
+ 	* @return Array
+ 	*/
+ 	function buildSortArray($tripleList){
+ 		$sortedArray = Array();
+ 		
+ 		foreach($tripleList as $index => $triple){
+ 			$sub = null;
+ 			$obj = null;
+ 			$orgSub  = $triple->getSubject();
+ 			$orgObj  = $triple->getObject();
+ 			
+ 			if(is_a($orgSub,"Blanknode")){
+ 				$sub = $orgSub->getID();
+ 				$triple->subj = new Blanknode("~");
+ 			}
+ 			if(is_a($orgObj,"Blanknode")){
+ 				$obj = $orgObj->getID();
+ 				$triple->obj = new Blanknode("~");
+ 			}
+ 			$sortedArray[$index]['string']  = $triple->toString();
+ 			$sortedArray[$index]['index']  = $index;
+ 			$sortedArray[$index]['triple'] = $triple;
+ 			$sortedArray[$index]['sub']    = $sub;
+ 			$sortedArray[$index]['obj']    = $obj;	
+ 		}
+ 		sort($sortedArray);
+ 		return $sortedArray;
+ 	}
+ 	
+ 	/**
+ 	* Renames the models Blanknodes. 
+ 	*
+ 	* @param $sortedArray A List that contains the models triples.
+ 	*
+ 	* @return Array
+ 	*/
+ 	function renameBlanks($sortedArray){
+ 	$i = 0;
+ 	$labelmap = Array();
+ 		
+ 		foreach ($sortedArray as $value){	
+ 			//new label
+ 			if($value['sub']!=null){
+ 				$label = null;
+ 				if(isset($labelmap[$value['sub']])){
+ 					$label = $labelmap[$value['sub']];
+ 					$value['triple']->subj = new BlankNode($labelmap[$value['sub']]);
+ 				}else{
+ 					$label = $i."Bnode";
+ 					$labelmap[$value['sub']]=$label;
+ 					$value['triple']->subj = new BlankNode($labelmap[$value['sub']]);
+ 					$i++;
+ 				}
+ 			}
+ 			
+ 			if($value['obj']!=null){
+ 				$label = null;
+ 				if(isset($labelmap[$value['obj']])){
+ 					$label = $labelmap[$value['obj']];
+ 					$value['triple']->obj = new BlankNode($labelmap[$value['obj']]);
+ 				}else{
+ 					$label = $i."Bnode";
+ 					$labelmap[$value['obj']]=$label;
+ 					$value['triple']->obj = new BlankNode($labelmap[$value['obj']]);
+ 					$i++;
+ 				}
+ 			}
+ 			
+ 		}
+ 		return $sortedArray;
+ 	
+ 	}
+ 	
+ 	/**
+ 	* Compares the Triples in the lists. 
+ 	*
+ 	* @param $tripleList A List that contains the models triples.
+ 	* @param $tripleList A List that contains the models triples.
+ 	*
+ 	* @return boolean
+ 	*/
+ 	function compareTriples($array1, $array2){
+ 		foreach($array1 as $key => $value){
+ 			if(!$value['triple']->equals($array2[$key]['triple']))
+ 				return false;
+ 		}
+ 		return true;
+ 	
+ 	}
+ 	
+ 
+ }
+ 
+ 
+ 
+ ?>
Index: Dev/branches/Demo/rdfapi/util/Object.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/Object.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/Object.php	(revision 225)
@@ -0,0 +1,37 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: Object
+// ----------------------------------------------------------------------------------
+
+/**
+ * An abstract object.
+ * Root object with some general methods, that should be overloaded. 
+ * 
+ *
+ * @version  $Id: Object.php 295 2006-06-23 06:45:53Z tgauss $
+ * @author Chris Bizer <chris@bizer.de>
+ *
+ * @abstract
+ * @package utility
+ *
+ **/
+ class Object {
+
+  /**
+   * Serializes a object into a string
+   *
+   * @access	public
+   * @return	string		
+   */    
+	function toString() {
+    	$objectvars = get_object_vars($this);
+		foreach($objectvars as $key => $value) 
+			$content .= $key ."='". $value. "'; ";
+		return "Instance of " . get_class($this) ."; Properties: ". $content;
+	}
+
+ }
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/RdfUtil.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/RdfUtil.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/RdfUtil.php	(revision 225)
@@ -0,0 +1,563 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: RDFUtil
+// ----------------------------------------------------------------------------------
+
+/**
+* Useful utility methods.
+* Static class.
+*
+* @version  $Id: RdfUtil.php 295 2006-06-23 06:45:53Z tgauss $
+* @author Chris Bizer <chris@bizer.de>, Daniel Westphal <dawe@gmx.de>
+* @author   Anton Köstlbacher <anton1@koestlbacher.de>
+* @package utility
+* @access	public
+**/
+class RDFUtil extends Object {
+
+	/**
+	* Extracts the namespace prefix out of a URI.
+	*
+	* @param	String	$uri
+	* @return	string
+	* @access	public
+	*/
+	function guessNamespace($uri) {
+		$l = RDFUtil::getNamespaceEnd($uri);
+		return $l > 1 ? substr($uri ,0, $l) : "";
+	}
+
+	/**
+	* Delivers the name out of the URI (without the namespace prefix).
+	*
+	* @param	String	$uri
+	* @return	string
+	* @access	public
+	*/
+	function guessName($uri) {
+		return substr($uri,RDFUtil::getNamespaceEnd($uri));
+	}
+
+	/**
+	* Extracts the namespace prefix out of the URI of a Resource.
+	*
+	* @param	Object Resource	$resource
+	* @return	string
+	* @access	public
+	*/
+	function getNamespace($resource) {
+		return RDFUtil::guessNamespace($resource->getURI());
+	}
+
+	/**
+	* Delivers the Localname (without the namespace prefix) out of the URI of a Resource.
+	*
+	* @param	Object Resource	$resource
+	* @return	string
+	* @access	public
+	*/
+	function getLocalName($resource) {
+		return RDFUtil::guessName($resource->getURI());
+	}
+
+	/**
+	* Position of the namespace end
+	* Method looks for # : and /
+	* @param	String	$uri
+	* @access	private
+	*/
+	function getNamespaceEnd($uri) {
+		$l = strlen($uri)-1;
+		do {
+			$c = substr($uri, $l, 1);
+			if($c == '#' || $c == ':' || $c == '/')
+			break;
+			$l--;
+		} while ($l >= 0);
+		$l++;
+		return $l;
+	}
+
+		/**
+	* Short Prefix for known Namespaces by given URI
+	* @param	String	$uri
+	* @access	public
+	*/
+	function getPrefix($uri) {
+            switch (RDFUtil::guessNamespace($uri))
+	    {
+                case RDF_NAMESPACE_URI:
+                $prefix = RDF_NAMESPACE_PREFIX;
+                break;
+
+                case RDF_SCHEMA_URI:
+                $short_p = RDF_SCHEMA_PREFIX;
+                break;
+
+                case OWL_URI:
+                $short_p = OWL_PREFIX;
+                break;
+
+                default:
+                $short_p = $statement->getLabelPredicate();
+            }
+            return $short_p;
+	}
+
+
+	/**
+	* Tests if the URI of a resource belongs to the RDF syntax/model namespace.
+	*
+	* @param	Object Resource	$resource
+	* @return	boolean
+	* @access	public
+	*/
+	function isRDF($resource) {
+		return ($resource != NULL && RDFUtil::getNamespace($resource) == RDF_NAMESPACE_URI);
+	}
+
+	/**
+	* Escapes < > and &
+	*
+	* @param	String	$textValue
+	* @return	String
+	* @access	public
+	*/
+	function escapeValue($textValue) {
+
+		$textValue = str_replace('<', '&lt;', $textValue);
+		$textValue = str_replace('>', '&gt;', $textValue);
+		$textValue = str_replace('&', '&amp;', $textValue);
+
+		return $textValue;
+	}
+
+	/**
+	* Converts an ordinal RDF resource to an integer.
+	* e.g. Resource(RDF:_1) => 1
+	*
+	* @param	object Resource	$resource
+	* @return	Integer
+	* @access	public
+	*/
+	function getOrd($resource)  {
+		if($resource == NULL || !is_a($resource, 'Resource') || !RDFUtil::isRDF($resource))
+		return -1;
+		$name = RDFUtil::getLocalName($resource);
+		echo substr($name, 1).' '.RDFUtil::getLocalName($resource);
+		$n = substr($name, 1);
+		//noch rein : chekcen ob $n Nummer ist !!!!!!!!!!!!!!!!!!!!!!if($n)
+		return $n;
+		return -1;
+	}
+
+	/**
+	* Creates ordinal RDF resource out of an integer.
+	*
+	* @param	Integer	$num
+	* @return	object Resource
+	* @access	public
+	*/
+	function createOrd($num)  {
+		return new Resource(RDF_NAMESPACE_URI . '_' . $num);
+	}
+
+	/**
+	* Prints a MemModel as HTML table.
+	* You can change the colors in the configuration file.
+	*
+	* @param	object MemModel 	&$model
+	* @access	public
+	*/
+	function writeHTMLTable(&$model)  {
+		$nms = $model->getParsedNamespaces();
+		$names = '';
+		$pre = '';
+
+
+		echo '<table border="1" cellpadding="3" cellspacing="0" width="100%">' . LINEFEED;
+		echo INDENTATION . '<tr bgcolor="' . HTML_TABLE_HEADER_COLOR . '">' . LINEFEED . INDENTATION . INDENTATION . '<td td width="68%" colspan="3">';
+		echo '<p><b>Base URI:</b> ' . $model->getBaseURI() . '</p></td>' . LINEFEED;
+		echo INDENTATION . INDENTATION . '<td width="32%"><p><b>Size:</b> ' . $model->size() . '</p></td>' . LINEFEED . INDENTATION . '</tr>';
+
+		echo '<tr><td><b>Prefix:</b>'.'<br/></td><td colspan="3"><b>Namespace:</b>'.'<br/></td></tr>';
+		$i=0;
+		if($nms != false){
+			foreach($nms as $namespace => $prefix){
+				if($i==0){
+					$col = HTML_TABLE_NS_ROW_COLOR0;
+				}else{
+					$col = HTML_TABLE_NS_ROW_COLOR1;
+				}
+				echo '<tr bgcolor="'.$col.'"><td>'.$prefix.'</td><td colspan="3">'.$namespace.'</td></tr>';
+				$i++;
+				$i%=2;
+			}
+		}else{
+			echo '<tr><td>-</td><td colspan="3">-</td></tr>';
+		}
+
+
+
+
+		echo INDENTATION . '<tr bgcolor="' . HTML_TABLE_HEADER_COLOR . '">' . LINEFEED . INDENTATION . INDENTATION . '<td width="4%"><p align=center><b>No.</b></p></td>' . LINEFEED . INDENTATION . INDENTATION . '<td width="32%"><p><b>Subject</b></p></td>' . LINEFEED . INDENTATION . INDENTATION . '<td width="32%"><p><b>Predicate</b></p></td>' . LINEFEED . INDENTATION . INDENTATION . '<td width="32%"><p><b>Object</b></p></td>' . LINEFEED . INDENTATION . '</tr>' . LINEFEED;
+
+		$i = 1;
+		foreach($model->triples as $key => $statement) {
+			$infered='';
+			if (is_a($statement,'InfStatement')) $infered='<small>(infered)</small>';
+			echo INDENTATION . '<tr valign="top">' . LINEFEED . INDENTATION . INDENTATION . '<td><p align=center>' . $i . '.<BR>'.$infered.'</p></td>' . LINEFEED;
+			// subject
+			echo INDENTATION . INDENTATION . '<td bgcolor="';
+			echo RDFUtil::chooseColor($statement->getSubject());
+			echo '">';
+			echo '<p>' .  RDFUtil::getNodeTypeName($statement->getSubject());
+			if(is_a($statement->subj,'Resource')){
+				$ns = $statement->subj->getNamespace();
+				if(isset($nms[$ns])){
+					echo $nms[$ns].':'.RDFUtil::getLocalName($statement->subj);
+				}else{
+					echo $statement->subj->getLabel();
+				}
+			}
+			echo '</p></td>' .  LINEFEED;
+			// predicate
+			echo INDENTATION . INDENTATION . '<td bgcolor="';
+			echo RDFUtil::chooseColor($statement->getPredicate());
+			echo '">';
+			echo '<p>' . RDFUtil::getNodeTypeName($statement->getPredicate());
+			if(is_a($statement->pred,'Resource')){
+				$ns = $statement->pred->getNamespace();
+				if(isset($nms[$ns])){
+					echo $nms[$ns].':'.RDFUtil::getLocalName($statement->pred);
+				}else{
+					echo $statement->pred->getLabel();
+				}
+			}
+			echo '</p></td>' .  LINEFEED;
+			// object
+			echo INDENTATION . INDENTATION . '<td bgcolor="';
+			echo RDFUtil::chooseColor($statement->getObject());
+			echo '">';
+			echo '<p>';
+			if (is_a($statement->getObject(), 'Literal')) {
+				if ($statement->obj->getLanguage() != null) {
+					$lang = ' <b>(xml:lang="' . $statement->obj->getLanguage() . '") </b> ';
+				} ELSE $lang = '';
+				if ($statement->obj->getDatatype() != null) {
+					$dtype = ' <b>(rdf:datatype="' . $statement->obj->getDatatype() . '") </b> ';
+				} ELSE $dtype = '';
+			} else {
+				$lang = '';
+				$dtype = '';
+			}
+			$label = $statement->obj->getLabel();
+			if(is_a($statement->obj,'Resource')){
+				$ns = $statement->obj->getNamespace();
+				if(isset($nms[$ns])){
+					$label = $nms[$ns].':'.RDFUtil::getLocalName($statement->obj);
+				}else{
+					$label = $statement->obj->getLabel();
+				}
+			}
+
+			echo  RDFUtil::getNodeTypeName($statement->getObject())
+			.nl2br(htmlspecialchars($label)) . $lang . $dtype;
+
+			echo '</p></td>' . LINEFEED;
+			echo INDENTATION . '</tr>' . LINEFEED;
+			$i++;
+		}
+		echo '</table>' . LINEFEED;
+	}
+
+	/**
+	* Chooses a node color.
+	* Used by RDFUtil::writeHTMLTable()
+	*
+	* @param	object Node	$node
+	* @return	object Resource
+	* @access	private
+	*/
+	function chooseColor($node)  {
+		if (is_a($node, 'BlankNode'))
+		return HTML_TABLE_BNODE_COLOR;
+		elseif (is_a($node, 'Literal'))
+		return HTML_TABLE_LITERAL_COLOR;
+		else {
+			if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI ||
+			RDFUtil::getNamespace($node) == RDF_SCHEMA_URI ||
+			RDFUtil::getNamespace($node) == OWL_URI
+			)
+
+			return HTML_TABLE_RDF_NS_COLOR;
+		}
+		return HTML_TABLE_RESOURCE_COLOR;
+
+	}
+
+	/**
+	* Get Node Type.
+	* Used by RDFUtil::writeHTMLTable()
+	*
+	* @param	object Node	$node
+	* @return	object Resource
+	* @access	private
+	*/
+	function getNodeTypeName($node)  {
+		if (is_a($node, "BlankNode"))
+		return 'Blank Node: ';
+		elseif (is_a($node, 'Literal'))
+		return 'Literal: ';
+		else {
+			if (RDFUtil::getNamespace($node) == RDF_NAMESPACE_URI ||
+			RDFUtil::getNamespace($node) == RDF_SCHEMA_URI ||
+			RDFUtil::getNamespace($node) == OWL_URI)
+			return 'RDF Node: ';
+		}
+		return 'Resource: ';
+
+	}
+
+
+ /**
+ * Short Prefix for known and/or parsed Namespaces by given URI and Model
+ * Uses $default_prefixes defined in constants.php and getParsedNamespaces()
+ * Returns FALSE if no matching prefix is found
+ *
+ * @author   Anton Köstlbacher <anton1@koestlbacher.de>
+ * @param    string  $uri
+ * @param    object $model
+ * @return   string, boolean
+ * @access   public
+ * @throws   PhpError
+ */
+
+ function guessPrefix($uri, &$model)
+ {
+     global $default_prefixes;
+     $namespace = RDFUtil::guessNamespace($uri);
+     $par_nms   = $model->getParsedNamespaces();
+     if (isset($par_nms[$namespace]))
+     {
+         $prefix = $par_nms[$namespace];
+     }
+     else
+     {
+         $prefix = array_search($namespace, $default_prefixes);
+     }
+     if($prefix !== false)
+     {
+        return $prefix;
+     }
+     else
+     {
+        return false;
+     }
+ }
+
+
+ /**
+ * Generates a dot-file for drawing graphical output with the
+ * graphviz-application which can be downloaded at http://www.graphviz.org
+ * If the graphviz-application is installed and its path is set to the
+ * correct value in constants.php we can directly generate any
+ * file format graphviz supports, e.g. SVG, PNG
+ * Parameters: model to visualize, output format, use prefixes
+ *
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ * WARNING: Graphviz can be slow with large models.
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ *
+ * @author   Anton Köstlbacher <anton1@koestlbacher.de>
+ * @param    object  Model
+ * @param    string  $format
+ * @param    boolean $short_prefix
+ * @return   string, binary
+ * @access   public
+ * @throws   PhpError
+ */
+
+ function visualizeGraph(&$model, $format = "input_dot", $short_prefix = TRUE)
+ {
+     global $graphviz_param;
+     $i = 0;
+
+     foreach ($model->triples as $key => $statement)
+     {
+         $subject   = $statement->getLabelSubject();
+         $predicate = $statement->getLabelPredicate();
+         $object    = $statement->getLabelObject();
+
+         // format subject
+         if (!isset($attrib[$subject]))
+         {
+             if (is_a($statement->subject(),'BlankNode'))
+             {
+                 $attrib[$subject] = $graphviz_param['BLANKNODE_STYLE'];
+             }
+             else
+             {
+                 if ($short_prefix == TRUE && RDFUtil::guessPrefix($subject, $model) != FALSE)
+                 {
+                     $prefix = RDFUtil::guessPrefix($subject, $model);
+                     $subject_label = $prefix.":".RDFUtil::guessName($subject);
+                     $attrib[$subject] = "label=\"".$subject_label."\" ";
+                     if(!isset($prefix_array[$prefix]))
+                     {
+                         $prefix_array[$prefix] = RDFUtil::guessNamespace($subject);
+                     }
+                 }
+                 if (GRAPHVIZ_URI == TRUE)
+                 {
+                     $attrib[$subject] .= "URL=\"".$subject."\"";
+                 }
+             }
+         }
+
+         // format predicate
+         if ($short_prefix == TRUE && RDFUtil::guessPrefix($predicate, $model) != FALSE)
+         {
+             $prefix = RDFUtil::guessPrefix($predicate, $model);
+             $predicate_label = "label=\"".$prefix.":".RDFUtil::guessName($predicate)."\"";
+             if(!isset($prefix_array[$prefix]))
+             {
+                 $prefix_array[$prefix] = RDFUtil::guessNamespace($predicate);
+             }
+         }
+         else
+         {
+             $predicate_label = "label=\"".$predicate."\"";
+         }
+
+	if (is_a($statement,'InfStatement'))
+         {
+             $predicate_label .= " ".$graphviz_param['INFERRED_STYLE'];
+         }
+         else
+         {
+             if (GRAPHVIZ_URI == TRUE)
+             {
+                 $predicate_label .= "URL=\"".$predicate."\"";
+             }
+         }
+
+         // format object
+         if (!isset($attrib[$object]))
+         {
+             if (is_a($statement->object(),'BlankNode'))
+             {
+                 $attrib[$object] = $graphviz_param['BLANKNODE_STYLE'];
+             }
+             elseif (is_a($statement->object(),'Literal'))
+             {
+                 $object_label = $object;
+                 $object = "literal".$i;
+                 $i++;
+                 $attrib[$object] = "label=\"$object_label\" ".$graphviz_param['LITERAL_STYLE'];
+             }
+             else
+             {
+                 if ($short_prefix == TRUE && RDFUtil::guessPrefix($object, $model) != FALSE)
+                 {
+                     $prefix = RDFUtil::guessPrefix($object, $model);
+                     $object_label = $prefix.":".RDFUtil::guessName($object);
+                     $attrib[$object] = "label=\"".$object_label."\" ";
+                     if(!isset($prefix_array[$prefix]))
+                     {
+                         $prefix_array[$prefix] = RDFUtil::guessNamespace($object);
+                     }
+                 }
+                 if (GRAPHVIZ_URI == TRUE)
+                 {
+                     $attrib[$object] .= "URL=\"".$object."\"";
+                 }
+             }
+         }
+
+         // fill graph array
+         $graph[] = "\"".$subject."\" -> \"".$object."\" [".$predicate_label."];";
+     }
+
+     //generate DOT-file
+     $dot = "digraph G { ".$graphviz_param['GRAPH_STYLE']."\n edge [".$graphviz_param['PREDICATE_STYLE']."]\n node [".$graphviz_param['RESOURCE_STYLE']."]\n";
+     if (isset($attrib))
+     {
+         foreach ($attrib AS $key => $value)
+         {
+             $dot .= "\"$key\" [$value];\n";
+         }
+     }
+     if (!isset($graph))
+     {
+         $dot .= "error [shape=box,label=\"No Statements found!\"]";
+     }
+     else
+     {
+         $dot .= implode("\n", $graph);
+     }
+
+
+     if (GRAPHVIZ_STAT == TRUE)
+     {
+     	$stat_label = "| ".$model->size()." Statements drawn";
+     }
+     if ((strstr($graphviz_param['GRAPH_STYLE'], 'rankdir="LR"') === FALSE) && (strstr($graphviz_param['GRAPH_STYLE'], 'rankdir=LR') === FALSE))
+     {
+         $sep1 = "}";
+         $sep2 = "";
+     }
+     else
+     {
+         $sep1 = "";
+         $sep2 = "}";
+     }
+
+     if ($short_prefix == TRUE && isset($prefix_array))
+     {
+         $struct_label = "{ { Base URI: ".$model->getBaseURI()." $sep1 | { { ".implode("|", array_keys($prefix_array))." } | { ".implode("|", $prefix_array)." } } $stat_label } $sep2";
+     }
+     else
+     {
+         $struct_label = "{ { Base URI: ".$model->getBaseURI()."$sep1 ".$stat_label." } }";
+     }
+
+     $dot .= "\n struct [shape=Mrecord,label=\"$struct_label\",".$graphviz_param['BOX_STYLE']."];\n";
+     $dot .= " vocabulary [style=invis];\n struct -> vocabulary [style=invis];\n}";
+
+     // if needed call dot.exe
+     if (($format != "input_dot") && (defined('GRAPHVIZ_PATH')) && (strstr(GRAPHVIZ_FORMAT, $format) !== FALSE))
+     {
+         mt_srand((double)microtime()*1000000);
+         $filename=GRAPHVIZ_TEMP.md5(uniqid(mt_rand())).".dot";
+         $file_handle = @fopen($filename, 'w');
+         if ($file_handle)
+         {
+             fwrite($file_handle, $dot);
+             fclose($file_handle);
+         }
+         $dotinput = " -T".$format." ".$filename;
+
+         ob_start();
+	passthru(GRAPHVIZ_PATH.$dotinput);
+         $output = ob_get_contents();
+	ob_end_clean();
+         unlink($filename);
+         echo $output;
+         return TRUE;
+     }
+     elseif ($format == "input_dot")
+     {
+         echo $dot;
+         return TRUE;
+     }
+     else
+     {
+         return FALSE;
+     }
+ }
+
+} // end: RDfUtil
+
+?>
Index: Dev/branches/Demo/rdfapi/util/StatementIterator.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/StatementIterator.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/StatementIterator.php	(revision 225)
@@ -0,0 +1,208 @@
+<?php
+
+// ----------------------------------------------------------------------------------
+// Class: StatementIterator
+// ----------------------------------------------------------------------------------
+
+/**
+ * Iterator for traversing models. 
+ * This class can be used for iterating forward and backward trough MemModels.
+ * It should be instanced using the getIterator() method of a MemModel.
+ * 
+ * @version  $Id: StatementIterator.php 268 2006-05-15 05:28:09Z tgauss $
+ * @author Daniel Westphal <mail at d-westphal dot de>
+ * @author Chris Bizer <chris@bizer.de>
+ *
+ * @package utility
+ * @access	public
+ *
+ */ 
+ class StatementIterator extends Object {
+
+ 	/**
+	* Reference to the MemModel
+	* @var		object MemModel
+	* @access	private
+	*/	
+    var $model;
+
+ 	/**
+	* Current position
+	* StatementIterator does not use the build in PHP array iterator,
+	* so you can use serveral iterators on a single MemModel.
+	* @var		integer
+	* @access	private
+	*/	
+    var $position;
+   
+  
+   /**
+    * Constructor
+    *
+    * @param	object	MemModel
+	* @access	public
+    */
+    function StatementIterator(&$model) {
+		$this->model = $model;
+		reset($this->model->triples);
+		$this->position = -1;
+	}
+ 
+  /**
+   * Returns TRUE if there are more statements.
+   * @return	boolean
+   * @access	public  
+   */
+  function hasNext() {
+  		if ($this->position == -1)
+  		{ 
+  			if(current($this->model->triples)!=NULL)
+  			{
+  				return TRUE;	
+  			} else 
+  			{
+  				return FALSE;
+  			}
+  		};
+
+  		if (next($this->model->triples)!=NULL ) 
+  		{	
+  			prev($this->model->triples);		
+  			return TRUE;
+		} else 
+		{
+			end($this->model->triples);
+			return FALSE;
+		};
+   }
+
+  /**
+   * Returns TRUE if the first statement has not been reached.
+   * @return	boolean
+   * @access	public  
+   */
+  function hasPrevious() {
+  		if (prev($this->model->triples)!=NULL) 
+  		{
+  			next($this->model->triples);
+			return TRUE;
+		} else {
+			reset($this->model->triples);
+			return FALSE;
+		};
+  }     
+   
+  /**
+   * Returns the next statement.
+   * @return	statement or NULL if there is no next statement.
+   * @access	public  
+   */
+  function next() {
+  		if ($this->position == -1)
+  		{ 
+  			if($return=current($this->model->triples))
+  			{
+  				$this->position=key($this->model->triples);
+  				return $return;	
+  			} else 
+  			{
+  				$this->position=key($this->model->triples);
+  				return NULL;
+  			};
+  		};
+  		
+  		
+  		if ($return=next($this->model->triples)) {
+  			$this->position=key($this->model->triples);
+			return $return;
+		} else {
+			$this->position=key($this->model->triples);
+			return NULL;
+		};
+   }
+
+  /**
+   * Returns the previous statement.
+   * @return	statement or NULL if there is no previous statement.
+   * @access	public  
+   */
+  function previous() {
+  		if ($return=prev($this->model->triples)) {
+  			$this->position=key($this->model->triples);
+			return $return;
+		} else {
+			$this->position=key($this->model->triples);
+			return NULL;
+		}   
+  }
+
+  /**
+   * Returns the current statement.
+   * @return	statement or NULL if there is no current statement.
+   * @access	public  
+   */
+  function current() {
+  		if ($this->position==-1) return NULL;
+  	
+  		if ($return=current($this->model->triples)) {
+			return $return;
+		} else {
+			return NULL;
+		}
+   }
+   
+  /**
+   * Moves the pointer to the first statement.
+   * @return	void
+   * @access	public  
+   */
+  function moveFirst() {
+  			reset($this->model->triples);
+  			$this->position=0;
+   }
+
+  /**
+   * Moves the pointer to the last statement.
+   * @return	void
+   * @access	public  
+   */
+  function moveLast() {
+  			end($this->model->triples);
+  			$this->position=key($this->model->triples);
+   }
+   
+     /**
+   * Moves the pointer to a specific statement.
+   * If you set an off-bounds value, the position will be set to the last element
+   * @param 	integer
+   * @return	void
+   * @access	public  
+   */
+  function moveTo($position) {
+  	
+  			if ($position + 1 > count($this->model->triples))
+  			{
+  				end($this->model->triples);
+  			} else 
+  			{
+	  			reset($this->model->triples);
+	  			
+				for ($i = 1; $i < $position; $i++) {
+				   next($this->model->triples);
+				}
+  			};
+  			$this->position=key($this->model->triples);
+   }
+   
+     /**
+   * Returns the current position of the iterator.
+   * @return	integer
+   * @access	public  
+   */
+  function getCurrentPosition() {
+  	 		return key($this->model->triples);
+   }
+  
+} 
+
+?>
Index: Dev/branches/Demo/rdfapi/util/Utility.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/Utility.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/Utility.php	(revision 225)
@@ -0,0 +1,20 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Utility
+// ----------------------------------------------------------------------------------
+//
+// Description               : Utility package
+//
+//
+// Author: Tobias Gauß	<tobias.gauss@web.de>
+//
+// ----------------------------------------------------------------------------------
+
+// include utility classes
+require_once( RDFAPI_INCLUDE_DIR . 'util/RdfUtil.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'util/FindIterator.php' );
+require_once( RDFAPI_INCLUDE_DIR . 'util/IterFind.php' );
+
+// experimental
+require_once( RDFAPI_INCLUDE_DIR . 'util/ModelComparator.php' );
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-active-record.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-active-record.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-active-record.inc.php	(revision 225)
@@ -0,0 +1,622 @@
+<?php
+/*
+
+@version V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Latest version is available at http://adodb.sourceforge.net
+ 
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  
+  Active Record implementation. Superset of Zend Framework's.
+  
+  Version 0.07
+  
+  See http://www-128.ibm.com/developerworks/java/library/j-cb03076/?ca=dgr-lnxw01ActiveRecord 
+  	for info on Ruby on Rails Active Record implementation
+*/
+
+global $_ADODB_ACTIVE_DBS;
+global $ADODB_ACTIVE_CACHESECS; // set to true to enable caching of metadata such as field info
+
+// array of ADODB_Active_DB's, indexed by ADODB_Active_Record->_dbat
+$_ADODB_ACTIVE_DBS = array();
+
+
+class ADODB_Active_DB {
+	var $db; // ADOConnection
+	var $tables; // assoc array of ADODB_Active_Table objects, indexed by tablename
+}
+
+class ADODB_Active_Table {
+	var $name; // table name
+	var $flds; // assoc array of adofieldobjs, indexed by fieldname
+	var $keys; // assoc array of primary keys, indexed by fieldname
+	var $_created; // only used when stored as a cached file
+}
+
+// returns index into $_ADODB_ACTIVE_DBS
+function ADODB_SetDatabaseAdapter(&$db)
+{
+	global $_ADODB_ACTIVE_DBS;
+	
+		foreach($_ADODB_ACTIVE_DBS as $k => $d) {
+			if (PHP_VERSION >= 5) {
+				if ($d->db === $db) return $k;
+			} else {
+				if ($d->db->_connectionID === $db->_connectionID && $db->database == $d->db->database) 
+					return $k;
+			}
+		}
+		
+		$obj = new ADODB_Active_DB();
+		$obj->db =& $db;
+		$obj->tables = array();
+		
+		$_ADODB_ACTIVE_DBS[] = $obj;
+		
+		return sizeof($_ADODB_ACTIVE_DBS)-1;
+}
+
+
+class ADODB_Active_Record {
+	var $_dbat; // associative index pointing to ADODB_Active_DB eg. $ADODB_Active_DBS[_dbat]
+	var $_table; // tablename, if set in class definition then use it as table name
+	var $_tableat; // associative index pointing to ADODB_Active_Table, eg $ADODB_Active_DBS[_dbat]->tables[$this->_tableat]
+	var $_where; // where clause set in Load()
+	var $_saved = false; // indicates whether data is already inserted.
+	var $_lasterr = false; // last error message
+	var $_original = false; // the original values loaded or inserted, refreshed on update
+	
+	// should be static
+	function SetDatabaseAdapter(&$db) 
+	{
+		return ADODB_SetDatabaseAdapter($db);
+	}
+	
+	// php4 constructor
+	function ADODB_Active_Record($table = false, $pkeyarr=false, $db=false)
+	{
+		ADODB_Active_Record::__construct($table,$pkeyarr,$db);
+	}
+	
+	// php5 constructor
+	function __construct($table = false, $pkeyarr=false, $db=false)
+	{
+	global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS;
+	
+		if ($db == false && is_object($pkeyarr)) {
+			$db = $pkeyarr;
+			$pkeyarr = false;
+		}
+		
+		if (!$table) { 
+			if (!empty($this->_table)) $table = $this->_table;
+			else $table = $this->_pluralize(get_class($this));
+		}
+		if ($db) {
+			$this->_dbat = ADODB_Active_Record::SetDatabaseAdapter($db);
+		} else
+			$this->_dbat = sizeof($_ADODB_ACTIVE_DBS)-1;
+		
+		
+		if ($this->_dbat < 0) $this->Error("No database connection set; use ADOdb_Active_Record::SetDatabaseAdapter(\$db)",'ADODB_Active_Record::__constructor');
+		
+		$this->_table = $table;
+		$this->_tableat = $table; # reserved for setting the assoc value to a non-table name, eg. the sql string in future
+		$this->UpdateActiveTable($pkeyarr);
+	}
+	
+	function __wakeup()
+	{
+  		$class = get_class($this);
+  		new $class;
+	}
+	
+	function _pluralize($table)
+	{
+		$ut = strtoupper($table);
+		$len = strlen($table);
+		$lastc = $ut[$len-1];
+		$lastc2 = substr($ut,$len-2);
+		switch ($lastc) {
+		case 'S':
+			return $table.'es';	
+		case 'Y':
+			return substr($table,0,$len-1).'ies';
+		case 'X':	
+			return $table.'es';
+		case 'H': 
+			if ($lastc2 == 'CH' || $lastc2 == 'SH')
+				return $table.'es';
+		default:
+			return $table.'s';
+		}
+	}
+	
+	//////////////////////////////////
+	
+	// update metadata
+	function UpdateActiveTable($pkeys=false,$forceUpdate=false)
+	{
+	global $ADODB_ASSOC_CASE,$_ADODB_ACTIVE_DBS , $ADODB_CACHE_DIR, $ADODB_ACTIVE_CACHESECS;
+	
+		$activedb =& $_ADODB_ACTIVE_DBS[$this->_dbat];
+
+		$table = $this->_table;
+		$tables = $activedb->tables;
+		$tableat = $this->_tableat;
+		if (!$forceUpdate && !empty($tables[$tableat])) {
+			$tobj =& $tables[$tableat];
+			foreach($tobj->flds as $name => $fld) 
+				$this->$name = null;
+			return;
+		}
+		
+		$db =& $activedb->db;
+		$fname = $ADODB_CACHE_DIR . '/adodb_' . $db->databaseType . '_active_'. $table . '.cache';
+		if (!$forceUpdate && $ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR && file_exists($fname)) {
+			$fp = fopen($fname,'r');
+			@flock($fp, LOCK_SH);
+			$acttab = unserialize(fread($fp,100000));
+			fclose($fp);
+			if ($acttab->_created + $ADODB_ACTIVE_CACHESECS - (abs(rand()) % 16) > time()) { 
+				// abs(rand()) randomizes deletion, reducing contention to delete/refresh file
+				// ideally, you should cache at least 32 secs
+				$activedb->tables[$table] = $acttab;
+				
+				//if ($db->debug) ADOConnection::outp("Reading cached active record file: $fname");
+			  	return;
+			} else if ($db->debug) {
+				ADOConnection::outp("Refreshing cached active record file: $fname");
+			}
+		}
+		$activetab = new ADODB_Active_Table();
+		$activetab->name = $table;
+		
+		
+		$cols = $db->MetaColumns($table);
+		if (!$cols) {
+			$this->Error("Invalid table name: $table",'UpdateActiveTable'); 
+			return false;
+		}
+		$fld = reset($cols);
+		if (!$pkeys) {
+			if (isset($fld->primary_key)) {
+				$pkeys = array();
+				foreach($cols as $name => $fld) {
+					if (!empty($fld->primary_key)) $pkeys[] = $name;
+				}
+			} else	
+				$pkeys = $this->GetPrimaryKeys($db, $table);
+		}
+		if (empty($pkeys)) {
+			$this->Error("No primary key found for table $table",'UpdateActiveTable');
+			return false;
+		}
+		
+		$attr = array();
+		$keys = array();
+		
+		switch($ADODB_ASSOC_CASE) {
+		case 0:
+			foreach($cols as $name => $fldobj) {
+				$name = strtolower($name);
+				$this->$name = null;
+				$attr[$name] = $fldobj;
+			}
+			foreach($pkeys as $k => $name) {
+				$keys[strtolower($name)] = strtolower($name);
+			}
+			break;
+			
+		case 1: 
+			foreach($cols as $name => $fldobj) {
+				$name = strtoupper($name);
+				$this->$name = null;
+				$attr[$name] = $fldobj;
+			}
+			
+			foreach($pkeys as $k => $name) {
+				$keys[strtoupper($name)] = strtoupper($name);
+			}
+			break;
+		default:
+			foreach($cols as $name => $fldobj) {
+				$name = ($fldobj->name);
+				$this->$name = null;
+				$attr[$name] = $fldobj;
+			}
+			foreach($pkeys as $k => $name) {
+				$keys[$name] = $cols[$name]->name;
+			}
+			break;
+		}
+		
+		$activetab->keys = $keys;
+		$activetab->flds = $attr;
+
+		if ($ADODB_ACTIVE_CACHESECS && $ADODB_CACHE_DIR) {
+			$activetab->_created = time();
+			$s = serialize($activetab);
+			if (!function_exists('adodb_write_file')) include(ADODB_DIR.'/adodb-csvlib.inc.php');
+			adodb_write_file($fname,$s);
+		}
+		$activedb->tables[$table] = $activetab;
+	}
+	
+	function GetPrimaryKeys(&$db, $table)
+	{
+		return $db->MetaPrimaryKeys($table);
+	}
+	
+	// error handler for both PHP4+5. 
+	function Error($err,$fn)
+	{
+	global $_ADODB_ACTIVE_DBS;
+	
+		$fn = get_class($this).'::'.$fn;
+		$this->_lasterr = $fn.': '.$err;
+		
+		if ($this->_dbat < 0) $db = false;
+		else {
+			$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
+			$db =& $activedb->db;
+		}
+		
+		if (function_exists('adodb_throw')) {	
+			if (!$db) adodb_throw('ADOdb_Active_Record', $fn, -1, $err, 0, 0, false);
+			else adodb_throw($db->databaseType, $fn, -1, $err, 0, 0, $db);
+		} else
+			if (!$db || $db->debug) ADOConnection::outp($this->_lasterr);
+		
+	}
+	
+	// return last error message
+	function ErrorMsg()
+	{
+		if (!function_exists('adodb_throw')) {
+			if ($this->_dbat < 0) $db = false;
+			else $db = $this->DB();
+		
+			// last error could be database error too
+			if ($db && $db->ErrorMsg()) return $db->ErrorMsg();
+		}
+		return $this->_lasterr;
+	}
+	
+	function ErrorNo() 
+	{
+		if ($this->_dbat < 0) return -9999; // no database connection...
+		$db = $this->DB();
+		
+		return (int) $db->ErrorNo();
+	}
+
+
+	// retrieve ADOConnection from _ADODB_Active_DBs
+	function &DB()
+	{
+	global $_ADODB_ACTIVE_DBS;
+	
+		if ($this->_dbat < 0) {
+			$false = false;
+			$this->Error("No database connection set: use ADOdb_Active_Record::SetDatabaseAdaptor(\$db)", "DB");
+			return $false;
+		}
+		$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
+		$db =& $activedb->db;
+		return $db;
+	}
+	
+	// retrieve ADODB_Active_Table
+	function &TableInfo()
+	{
+	global $_ADODB_ACTIVE_DBS;
+	
+		$activedb = $_ADODB_ACTIVE_DBS[$this->_dbat];
+		$table =& $activedb->tables[$this->_tableat];
+		return $table;
+	}
+	
+	// set a numeric array (using natural table field ordering) as object properties
+	function Set(&$row)
+	{
+		$db =& $this->DB();
+		
+		if (!$row) {
+			$this->_saved = false;		
+			return false;
+		}
+		
+		$this->_saved = true;
+		
+		$table =& $this->TableInfo();
+		if (sizeof($table->flds) != sizeof($row)) {
+			$this->Error("Table structure of $this->_table has changed","Load");
+			return false;
+		}
+		
+		$cnt = 0;
+		foreach($table->flds as $name=>$fld) {
+			$this->$name = $row[$cnt];
+			$cnt += 1;
+		}
+		$this->_original = $row;
+		return true;
+	}
+	
+	// get last inserted id for INSERT
+	function LastInsertID(&$db,$fieldname)
+	{
+		if ($db->hasInsertID)
+			$val = $db->Insert_ID($this->_table,$fieldname);
+		else
+			$val = false;
+			
+		if (is_null($val) || $val === false) {
+			// this might not work reliably in multi-user environment
+			return $db->GetOne("select max(".$fieldname.") from ".$this->_table);
+		}
+		return $val;
+	}
+	
+	// quote data in where clause
+	function doquote(&$db, $val,$t)
+	{
+		switch($t) {
+		case 'D':
+		case 'T':
+			if (empty($val)) return 'null';
+			
+		case 'C':
+		case 'X':
+			if (is_null($val)) return 'null';
+			
+			if (strncmp($val,"'",1) != 0 && substr($val,strlen($val)-1,1) != "'") { 
+				return $db->qstr($val);
+				break;
+			}
+		default:
+			return $val;
+			break;
+		}
+	}
+	
+	// generate where clause for an UPDATE/SELECT
+	function GenWhere(&$db, &$table)
+	{
+		$keys = $table->keys;
+		$parr = array();
+		
+		foreach($keys as $k) {
+			$f = $table->flds[$k];
+			if ($f) {
+				$parr[] = $k.' = '.$this->doquote($db,$this->$k,$db->MetaType($f->type));
+			}
+		}
+		return implode(' and ', $parr);
+	}
+	
+	
+	//------------------------------------------------------------ Public functions below
+	
+	function Load($where,$bindarr=false)
+	{
+		$db =& $this->DB(); if (!$db) return false;
+		$this->_where = $where;
+		
+		$save = $db->SetFetchMode(ADODB_FETCH_NUM);
+		$row = $db->GetRow("select * from ".$this->_table.' WHERE '.$where,$bindarr);
+		$db->SetFetchMode($save);
+		
+		return $this->Set($row);
+	}
+	
+	// false on error
+	function Save()
+	{
+		if ($this->_saved) $ok = $this->Update();
+		else $ok = $this->Insert();
+		
+		return $ok;
+	}
+	
+	// false on error
+	function Insert()
+	{
+		$db =& $this->DB(); if (!$db) return false;
+		$cnt = 0;
+		$table =& $this->TableInfo();
+		
+		$valarr = array();
+		$names = array();
+		$valstr = array();
+
+		foreach($table->flds as $name=>$fld) {
+			$val = $this->$name;
+			if(!is_null($val) || !array_key_exists($name, $table->keys)) {
+				$valarr[] = $val;
+				$names[] = $name;
+				$valstr[] = $db->Param($cnt);
+				$cnt += 1;
+			}
+		}
+		
+		if (empty($names)){
+			foreach($table->flds as $name=>$fld) {
+				$valarr[] = null;
+				$names[] = $name;
+				$valstr[] = $db->Param($cnt);
+				$cnt += 1;
+			}
+		}
+		$sql = 'INSERT INTO '.$this->_table."(".implode(',',$names).') VALUES ('.implode(',',$valstr).')';
+		$ok = $db->Execute($sql,$valarr);
+		
+		if ($ok) {
+			$this->_saved = true;
+			$autoinc = false;
+			foreach($table->keys as $k) {
+				if (is_null($this->$k)) {
+					$autoinc = true;
+					break;
+				}
+			}
+			if ($autoinc && sizeof($table->keys) == 1) {
+				$k = reset($table->keys);
+				$this->$k = $this->LastInsertID($db,$k);
+			}
+		}
+		
+		$this->_original = $valarr;
+		return !empty($ok);
+	}
+	
+	function Delete()
+	{
+		$db =& $this->DB(); if (!$db) return false;
+		$table =& $this->TableInfo();
+		
+		$where = $this->GenWhere($db,$table);
+		$sql = 'DELETE FROM '.$this->_table.' WHERE '.$where;
+		$ok = $db->Execute($sql);
+		
+		return $ok ? true : false;
+	}
+	
+	// returns an array of active record objects
+	function &Find($whereOrderBy,$bindarr=false,$pkeysArr=false)
+	{
+		$db =& $this->DB(); if (!$db || empty($this->_table)) return false;
+		$arr =& $db->GetActiveRecordsClass(get_class($this),$this->_table, $whereOrderBy,$bindarr,$pkeysArr);
+		return $arr;
+	}
+	
+	// returns 0 on error, 1 on update, 2 on insert
+	function Replace()
+	{
+	global $ADODB_ASSOC_CASE;
+		
+		$db =& $this->DB(); if (!$db) return false;
+		$table =& $this->TableInfo();
+		
+		$pkey = $table->keys;
+		
+		foreach($table->flds as $name=>$fld) {
+			$val = $this->$name;
+			/*
+			if (is_null($val)) {
+				if (isset($fld->not_null) && $fld->not_null) {
+					if (isset($fld->default_value) && strlen($fld->default_value)) continue;
+					else {
+						$this->Error("Cannot update null into $name","Replace");
+						return false;
+					}
+				}
+			}*/
+			if (is_null($val) && !empty($fld->auto_increment)) {
+            	continue;
+            }
+			$t = $db->MetaType($fld->type);
+			$arr[$name] = $this->doquote($db,$val,$t);
+			$valarr[] = $val;
+		}
+		
+		if (!is_array($pkey)) $pkey = array($pkey);
+		
+		
+		if ($ADODB_ASSOC_CASE == 0) 
+			foreach($pkey as $k => $v)
+				$pkey[$k] = strtolower($v);
+		elseif ($ADODB_ASSOC_CASE == 0) 
+			foreach($pkey as $k => $v)
+				$pkey[$k] = strtoupper($v);
+				
+		$ok = $db->Replace($this->_table,$arr,$pkey);
+		if ($ok) {
+			$this->_saved = true; // 1= update 2=insert
+			if ($ok == 2) {
+				$autoinc = false;
+				foreach($table->keys as $k) {
+					if (is_null($this->$k)) {
+						$autoinc = true;
+						break;
+					}
+				}
+				if ($autoinc && sizeof($table->keys) == 1) {
+					$k = reset($table->keys);
+					$this->$k = $this->LastInsertID($db,$k);
+				}
+			}
+			
+			$this->_original =& $valarr;
+		} 
+		return $ok;
+	}
+
+	// returns 0 on error, 1 on update, -1 if no change in data (no update)
+	function Update()
+	{
+		$db =& $this->DB(); if (!$db) return false;
+		$table =& $this->TableInfo();
+		
+		$where = $this->GenWhere($db, $table);
+		
+		if (!$where) {
+			$this->error("Where missing for table $table", "Update");
+			return false;
+		}
+		$valarr = array(); 
+		$neworig = array();
+		$pairs = array();
+		$i = -1;
+		$cnt = 0;
+		foreach($table->flds as $name=>$fld) {
+			$i += 1;
+			$val = $this->$name;
+			$neworig[] = $val;
+			
+			if (isset($table->keys[$name])) {
+				continue;
+			}
+			
+			if (is_null($val)) {
+				if (isset($fld->not_null) && $fld->not_null) {
+					if (isset($fld->default_value) && strlen($fld->default_value)) continue;
+					else {
+						$this->Error("Cannot set field $name to NULL","Update");
+						return false;
+					}
+				}
+			}
+			
+			if (isset($this->_original[$i]) && $val == $this->_original[$i]) {
+				continue;
+			}			
+			$valarr[] = $val;
+			$pairs[] = $name.'='.$db->Param($cnt);
+			$cnt += 1;
+		}
+		
+		
+		if (!$cnt) return -1;
+		$sql = 'UPDATE '.$this->_table." SET ".implode(",",$pairs)." WHERE ".$where;
+		$ok = $db->Execute($sql,$valarr);
+		if ($ok) {
+			$this->_original =& $neworig;
+			return 1;
+		}
+		return 0;
+	}
+	
+	function GetAttributeNames()
+	{
+		$table =& $this->TableInfo();
+		if (!$table) return false;
+		return array_keys($table->flds);
+	}
+	
+};
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-csvlib.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-csvlib.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-csvlib.inc.php	(revision 225)
@@ -0,0 +1,312 @@
+<?php
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+global $ADODB_INCLUDED_CSV;
+$ADODB_INCLUDED_CSV = 1;
+
+/* 
+
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for CSV serialization. This is used by the csv/proxy driver and is the 
+  CacheExecute() serialization format. 
+  
+  ==== NOTE ====
+  Format documented at http://php.weblogs.com/ADODB_CSV
+  ==============
+*/
+
+	/**
+ 	 * convert a recordset into special format
+	 *
+	 * @param rs	the recordset
+	 *
+	 * @return	the CSV formated data
+	 */
+	function _rs2serialize(&$rs,$conn=false,$sql='')
+	{
+		$max = ($rs) ? $rs->FieldCount() : 0;
+		
+		if ($sql) $sql = urlencode($sql);
+		// metadata setup
+		
+		if ($max <= 0 || $rs->dataProvider == 'empty') { // is insert/update/delete
+			if (is_object($conn)) {
+				$sql .= ','.$conn->Affected_Rows();
+				$sql .= ','.$conn->Insert_ID();
+			} else
+				$sql .= ',,';
+			
+			$text = "====-1,0,$sql\n";
+			return $text;
+		}
+		$tt = ($rs->timeCreated) ? $rs->timeCreated : time();
+		
+		## changed format from ====0 to ====1
+		$line = "====1,$tt,$sql\n";
+		
+		if ($rs->databaseType == 'array') {
+			$rows =& $rs->_array;
+		} else {
+			$rows = array();
+			while (!$rs->EOF) {	
+				$rows[] = $rs->fields;
+				$rs->MoveNext();
+			} 
+		}
+		
+		for($i=0; $i < $max; $i++) {
+			$o =& $rs->FetchField($i);
+			$flds[] = $o;
+		}
+	
+		$savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode;
+		$class = $rs->connection->arrayClass;
+		$rs2 = new $class();
+		$rs2->sql = $rs->sql;
+		$rs2->oldProvider = $rs->dataProvider; 
+		$rs2->InitArrayFields($rows,$flds);
+		$rs2->fetchMode = $savefetch;
+		return $line.serialize($rs2);
+	}
+
+	
+/**
+* Open CSV file and convert it into Data. 
+*
+* @param url  		file/ftp/http url
+* @param err		returns the error message
+* @param timeout	dispose if recordset has been alive for $timeout secs
+*
+* @return		recordset, or false if error occured. If no
+*			error occurred in sql INSERT/UPDATE/DELETE, 
+*			empty recordset is returned
+*/
+	function &csv2rs($url,&$err,$timeout=0, $rsclass='ADORecordSet_array')
+	{
+		$false = false;
+		$err = false;
+		$fp = @fopen($url,'rb');
+		if (!$fp) {
+			$err = $url.' file/URL not found';
+			return $false;
+		}
+		@flock($fp, LOCK_SH);
+		$arr = array();
+		$ttl = 0;
+		
+		if ($meta = fgetcsv($fp, 32000, ",")) {
+			// check if error message
+			if (strncmp($meta[0],'****',4) === 0) {
+				$err = trim(substr($meta[0],4,1024));
+				fclose($fp);
+				return $false;
+			}
+			// check for meta data
+			// $meta[0] is -1 means return an empty recordset
+			// $meta[1] contains a time 
+	
+			if (strncmp($meta[0], '====',4) === 0) {
+			
+				if ($meta[0] == "====-1") {
+					if (sizeof($meta) < 5) {
+						$err = "Corrupt first line for format -1";
+						fclose($fp);
+						return $false;
+					}
+					fclose($fp);
+					
+					if ($timeout > 0) {
+						$err = " Illegal Timeout $timeout ";
+						return $false;
+					}
+					
+					$rs = new $rsclass($val=true);
+					$rs->fields = array();
+					$rs->timeCreated = $meta[1];
+					$rs->EOF = true;
+					$rs->_numOfFields = 0;
+					$rs->sql = urldecode($meta[2]);
+					$rs->affectedrows = (integer)$meta[3];
+					$rs->insertid = $meta[4];	
+					return $rs;
+				} 
+			# Under high volume loads, we want only 1 thread/process to _write_file
+			# so that we don't have 50 processes queueing to write the same data.
+			# We use probabilistic timeout, ahead of time.
+			#
+			# -4 sec before timeout, give processes 1/32 chance of timing out
+			# -2 sec before timeout, give processes 1/16 chance of timing out
+			# -1 sec after timeout give processes 1/4 chance of timing out
+			# +0 sec after timeout, give processes 100% chance of timing out
+				if (sizeof($meta) > 1) {
+					if($timeout >0){ 
+						$tdiff = (integer)( $meta[1]+$timeout - time());
+						if ($tdiff <= 2) {
+							switch($tdiff) {
+							case 4:
+							case 3:
+								if ((rand() & 31) == 0) {
+									fclose($fp);
+									$err = "Timeout 3";
+									return $false;
+								}
+								break;
+							case 2: 
+								if ((rand() & 15) == 0) {
+									fclose($fp);
+									$err = "Timeout 2";
+									return $false;
+								}
+								break;
+							case 1:
+								if ((rand() & 3) == 0) {
+									fclose($fp);
+									$err = "Timeout 1";
+									return $false;
+								}
+								break;
+							default: 
+								fclose($fp);
+								$err = "Timeout 0";
+								return $false;
+							} // switch
+							
+						} // if check flush cache
+					}// (timeout>0)
+					$ttl = $meta[1];
+				}
+				//================================================
+				// new cache format - use serialize extensively...
+				if ($meta[0] === '====1') {
+					// slurp in the data
+					$MAXSIZE = 128000;
+					
+					$text = fread($fp,$MAXSIZE);
+					if (strlen($text)) {
+						while ($txt = fread($fp,$MAXSIZE)) {
+							$text .= $txt;
+						}
+					}
+					fclose($fp);
+					$rs = unserialize($text);
+					if (is_object($rs)) $rs->timeCreated = $ttl;
+					else {
+						$err = "Unable to unserialize recordset";
+						//echo htmlspecialchars($text),' !--END--!<p>';
+					}
+					return $rs;
+				}
+				
+				$meta = false;
+				$meta = fgetcsv($fp, 32000, ",");
+				if (!$meta) {
+					fclose($fp);
+					$err = "Unexpected EOF 1";
+					return $false;
+				}
+			}
+
+			// Get Column definitions
+			$flds = array();
+			foreach($meta as $o) {
+				$o2 = explode(':',$o);
+				if (sizeof($o2)!=3) {
+					$arr[] = $meta;
+					$flds = false;
+					break;
+				}
+				$fld = new ADOFieldObject();
+				$fld->name = urldecode($o2[0]);
+				$fld->type = $o2[1];
+				$fld->max_length = $o2[2];
+				$flds[] = $fld;
+			}
+		} else {
+			fclose($fp);
+			$err = "Recordset had unexpected EOF 2";
+			return $false;
+		}
+		
+		// slurp in the data
+		$MAXSIZE = 128000;
+		
+		$text = '';
+		while ($txt = fread($fp,$MAXSIZE)) {
+			$text .= $txt;
+		}
+			
+		fclose($fp);
+		@$arr = unserialize($text);
+		//var_dump($arr);
+		if (!is_array($arr)) {
+			$err = "Recordset had unexpected EOF (in serialized recordset)";
+			if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!";
+			return $false;
+		}
+		$rs = new $rsclass();
+		$rs->timeCreated = $ttl;
+		$rs->InitArrayFields($arr,$flds);
+		return $rs;
+	}
+	
+
+	/**
+	* Save a file $filename and its $contents (normally for caching) with file locking
+	*/
+	function adodb_write_file($filename, $contents,$debug=false)
+	{ 
+	# http://www.php.net/bugs.php?id=9203 Bug that flock fails on Windows
+	# So to simulate locking, we assume that rename is an atomic operation.
+	# First we delete $filename, then we create a $tempfile write to it and 
+	# rename to the desired $filename. If the rename works, then we successfully 
+	# modified the file exclusively.
+	# What a stupid need - having to simulate locking.
+	# Risks:
+	# 1. $tempfile name is not unique -- very very low
+	# 2. unlink($filename) fails -- ok, rename will fail
+	# 3. adodb reads stale file because unlink fails -- ok, $rs timeout occurs
+	# 4. another process creates $filename between unlink() and rename() -- ok, rename() fails and  cache updated
+		if (strncmp(PHP_OS,'WIN',3) === 0) {
+			// skip the decimal place
+			$mtime = substr(str_replace(' ','_',microtime()),2); 
+			// getmypid() actually returns 0 on Win98 - never mind!
+			$tmpname = $filename.uniqid($mtime).getmypid();
+			if (!($fd = @fopen($tmpname,'a'))) return false;
+			$ok = ftruncate($fd,0);			
+			if (!fwrite($fd,$contents)) $ok = false;
+			fclose($fd);
+			chmod($tmpname,0644);
+			// the tricky moment
+			@unlink($filename);
+			if (!@rename($tmpname,$filename)) {
+				unlink($tmpname);
+				$ok = false;
+			}
+			if (!$ok) {
+				if ($debug) ADOConnection::outp( " Rename $tmpname ".($ok? 'ok' : 'failed'));
+			}
+			return $ok;
+		}
+		if (!($fd = @fopen($filename, 'a'))) return false;
+		if (flock($fd, LOCK_EX) && ftruncate($fd, 0)) {
+			$ok = fwrite( $fd, $contents );
+			fclose($fd);
+			chmod($filename,0644);
+		}else {
+			fclose($fd);
+			if ($debug)ADOConnection::outp( " Failed acquiring lock for $filename<br>\n");
+			$ok = false;
+		}
+	
+		return $ok;
+	}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-datadict.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-datadict.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-datadict.inc.php	(revision 225)
@@ -0,0 +1,889 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+ 	DOCUMENTATION:
+	
+		See adodb/tests/test-datadict.php for docs and examples.
+*/
+
+/*
+	Test script for parser
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+function Lens_ParseTest()
+{
+$str = "`zcol ACOL` NUMBER(32,2) DEFAULT 'The \"cow\" (and Jim''s dog) jumps over the moon' PRIMARY, INTI INT AUTO DEFAULT 0, zcol2\"afs ds";
+print "<p>$str</p>";
+$a= Lens_ParseArgs($str);
+print "<pre>";
+print_r($a);
+print "</pre>";
+}
+
+
+if (!function_exists('ctype_alnum')) {
+	function ctype_alnum($text) {
+		return preg_match('/^[a-z0-9]*$/i', $text);
+	}
+}
+
+//Lens_ParseTest();
+
+/**
+	Parse arguments, treat "text" (text) and 'text' as quotation marks.
+	To escape, use "" or '' or ))
+	
+	Will read in "abc def" sans quotes, as: abc def
+	Same with 'abc def'.
+	However if `abc def`, then will read in as `abc def`
+	
+	@param endstmtchar    Character that indicates end of statement
+	@param tokenchars     Include the following characters in tokens apart from A-Z and 0-9 
+	@returns 2 dimensional array containing parsed tokens.
+*/
+function Lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-')
+{
+	$pos = 0;
+	$intoken = false;
+	$stmtno = 0;
+	$endquote = false;
+	$tokens = array();
+	$tokens[$stmtno] = array();
+	$max = strlen($args);
+	$quoted = false;
+	$tokarr = array();
+	
+	while ($pos < $max) {
+		$ch = substr($args,$pos,1);
+		switch($ch) {
+		case ' ':
+		case "\t":
+		case "\n":
+		case "\r":
+			if (!$quoted) {
+				if ($intoken) {
+					$intoken = false;
+					$tokens[$stmtno][] = implode('',$tokarr);
+				}
+				break;
+			}
+			
+			$tokarr[] = $ch;
+			break;
+		
+		case '`':
+			if ($intoken) $tokarr[] = $ch;
+		case '(':
+		case ')':	
+		case '"':
+		case "'":
+			
+			if ($intoken) {
+				if (empty($endquote)) {
+					$tokens[$stmtno][] = implode('',$tokarr);
+					if ($ch == '(') $endquote = ')';
+					else $endquote = $ch;
+					$quoted = true;
+					$intoken = true;
+					$tokarr = array();
+				} else if ($endquote == $ch) {
+					$ch2 = substr($args,$pos+1,1);
+					if ($ch2 == $endquote) {
+						$pos += 1;
+						$tokarr[] = $ch2;
+					} else {
+						$quoted = false;
+						$intoken = false;
+						$tokens[$stmtno][] = implode('',$tokarr);
+						$endquote = '';
+					}
+				} else
+					$tokarr[] = $ch;
+					
+			}else {
+			
+				if ($ch == '(') $endquote = ')';
+				else $endquote = $ch;
+				$quoted = true;
+				$intoken = true;
+				$tokarr = array();
+				if ($ch == '`') $tokarr[] = '`';
+			}
+			break;
+			
+		default:
+			
+			if (!$intoken) {
+				if ($ch == $endstmtchar) {
+					$stmtno += 1;
+					$tokens[$stmtno] = array();
+					break;
+				}
+			
+				$intoken = true;
+				$quoted = false;
+				$endquote = false;
+				$tokarr = array();
+	
+			}
+			
+			if ($quoted) $tokarr[] = $ch;
+			else if (ctype_alnum($ch) || strpos($tokenchars,$ch) !== false) $tokarr[] = $ch;
+			else {
+				if ($ch == $endstmtchar) {			
+					$tokens[$stmtno][] = implode('',$tokarr);
+					$stmtno += 1;
+					$tokens[$stmtno] = array();
+					$intoken = false;
+					$tokarr = array();
+					break;
+				}
+				$tokens[$stmtno][] = implode('',$tokarr);
+				$tokens[$stmtno][] = $ch;
+				$intoken = false;
+			}
+		}
+		$pos += 1;
+	}
+	if ($intoken) $tokens[$stmtno][] = implode('',$tokarr);
+	
+	return $tokens;
+}
+
+
+class ADODB_DataDict {
+	var $connection;
+	var $debug = false;
+	var $dropTable = 'DROP TABLE %s';
+	var $renameTable = 'RENAME TABLE %s TO %s'; 
+	var $dropIndex = 'DROP INDEX %s';
+	var $addCol = ' ADD';
+	var $alterCol = ' ALTER COLUMN';
+	var $dropCol = ' DROP COLUMN';
+	var $renameColumn = 'ALTER TABLE %s RENAME COLUMN %s TO %s';	// table, old-column, new-column, column-definitions (not used by default)
+	var $nameRegex = '\w';
+	var $nameRegexBrackets = 'a-zA-Z0-9_\(\)';
+	var $schema = false;
+	var $serverInfo = array();
+	var $autoIncrement = false;
+	var $dataProvider;
+	var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changetablesql
+	var $blobSize = 100; 	/// any varchar/char field this size or greater is treated as a blob
+							/// in other words, we use a text area for editting.
+	
+	function GetCommentSQL($table,$col)
+	{
+		return false;
+	}
+	
+	function SetCommentSQL($table,$col,$cmt)
+	{
+		return false;
+	}
+	
+	function MetaTables()
+	{
+		if (!$this->connection->IsConnected()) return array();
+		return $this->connection->MetaTables();
+	}
+	
+	function MetaColumns($tab, $upper=true, $schema=false)
+	{
+		if (!$this->connection->IsConnected()) return array();
+		return $this->connection->MetaColumns($this->TableName($tab), $upper, $schema);
+	}
+	
+	function MetaPrimaryKeys($tab,$owner=false,$intkey=false)
+	{
+		if (!$this->connection->IsConnected()) return array();
+		return $this->connection->MetaPrimaryKeys($this->TableName($tab), $owner, $intkey);
+	}
+	
+	function MetaIndexes($table, $primary = false, $owner = false)
+	{
+		if (!$this->connection->IsConnected()) return array();
+		return $this->connection->MetaIndexes($this->TableName($table), $primary, $owner);
+	}
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		return ADORecordSet::MetaType($t,$len,$fieldobj);
+	}
+	
+	function NameQuote($name = NULL,$allowBrackets=false)
+	{
+		if (!is_string($name)) {
+			return FALSE;
+		}
+		
+		$name = trim($name);
+		
+		if ( !is_object($this->connection) ) {
+			return $name;
+		}
+		
+		$quote = $this->connection->nameQuote;
+		
+		// if name is of the form `name`, quote it
+		if ( preg_match('/^`(.+)`$/', $name, $matches) ) {
+			return $quote . $matches[1] . $quote;
+		}
+		
+		// if name contains special characters, quote it
+		$regex = ($allowBrackets) ? $this->nameRegexBrackets : $this->nameRegex;
+		
+		if ( !preg_match('/^[' . $regex . ']+$/', $name) ) {
+			return $quote . $name . $quote;
+		}
+		
+		return $name;
+	}
+	
+	function TableName($name)
+	{
+		if ( $this->schema ) {
+			return $this->NameQuote($this->schema) .'.'. $this->NameQuote($name);
+		}
+		return $this->NameQuote($name);
+	}
+	
+	// Executes the sql array returned by GetTableSQL and GetIndexSQL
+	function ExecuteSQLArray($sql, $continueOnError = true)
+	{
+		$rez = 2;
+		$conn = &$this->connection;
+		$saved = $conn->debug;
+		foreach($sql as $line) {
+			
+			if ($this->debug) $conn->debug = true;
+			$ok = $conn->Execute($line);
+			$conn->debug = $saved;
+			if (!$ok) {
+				if ($this->debug) ADOConnection::outp($conn->ErrorMsg());
+				if (!$continueOnError) return 0;
+				$rez = 1;
+			}
+		}
+		return $rez;
+	}
+	
+	/**
+	 	Returns the actual type given a character code.
+		
+		C:  varchar
+		X:  CLOB (character large object) or largest varchar size if CLOB is not supported
+		C2: Multibyte varchar
+		X2: Multibyte CLOB
+		
+		B:  BLOB (binary large object)
+		
+		D:  Date
+		T:  Date-time 
+		L:  Integer field suitable for storing booleans (0 or 1)
+		I:  Integer
+		F:  Floating point number
+		N:  Numeric or decimal number
+	*/
+	
+	function ActualType($meta)
+	{
+		return $meta;
+	}
+	
+	function CreateDatabase($dbname,$options=false)
+	{
+		$options = $this->_Options($options);
+		$sql = array();
+		
+		$s = 'CREATE DATABASE ' . $this->NameQuote($dbname);
+		if (isset($options[$this->upperName]))
+			$s .= ' '.$options[$this->upperName];
+		
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	/*
+	 Generates the SQL to create index. Returns an array of sql strings.
+	*/
+	function CreateIndexSQL($idxname, $tabname, $flds, $idxoptions = false)
+	{
+		if (!is_array($flds)) {
+			$flds = explode(',',$flds);
+		}
+		
+		foreach($flds as $key => $fld) {
+			# some indexes can use partial fields, eg. index first 32 chars of "name" with NAME(32)
+			$flds[$key] = $this->NameQuote($fld,$allowBrackets=true);
+		}
+		
+		return $this->_IndexSQL($this->NameQuote($idxname), $this->TableName($tabname), $flds, $this->_Options($idxoptions));
+	}
+	
+	function DropIndexSQL ($idxname, $tabname = NULL)
+	{
+		return array(sprintf($this->dropIndex, $this->NameQuote($idxname), $this->TableName($tabname)));
+	}
+	
+	function SetSchema($schema)
+	{
+		$this->schema = $schema;
+	}
+	
+	function AddColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey,$idxs) = $this->_GenFields($flds);
+		// genfields can return FALSE at times
+		if ($lines  == null) $lines = array();
+		$alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' ';
+		foreach($lines as $v) {
+			$sql[] = $alter . $v;
+		}
+		if (is_array($idxs)) {
+			foreach($idxs as $idx => $idxdef) {
+				$sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']);
+				$sql = array_merge($sql, $sql_idxs);
+			}
+		}
+		return $sql;
+	}
+	
+	/**
+	 * Change the definition of one column
+	 *
+	 * As some DBM's can't do that on there own, you need to supply the complete defintion of the new table,
+	 * to allow, recreating the table and copying the content over to the new table
+	 * @param string $tabname table-name
+	 * @param string $flds column-name and type for the changed column
+	 * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default ''
+	 * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default ''
+	 * @return array with SQL strings
+	 */
+	function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey,$idxs) = $this->_GenFields($flds);
+		// genfields can return FALSE at times
+		if ($lines == null) $lines = array();
+		$alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' ';
+		foreach($lines as $v) {
+			$sql[] = $alter . $v;
+		}
+		if (is_array($idxs)) {
+			foreach($idxs as $idx => $idxdef) {
+				$sql_idxs = $this->CreateIndexSql($idx, $tabname, $idxdef['cols'], $idxdef['opts']);
+				$sql = array_merge($sql, $sql_idxs);
+			}
+
+		}
+		return $sql;
+	}
+	
+	/**
+	 * Rename one column
+	 *
+	 * Some DBM's can only do this together with changeing the type of the column (even if that stays the same, eg. mysql)
+	 * @param string $tabname table-name
+	 * @param string $oldcolumn column-name to be renamed
+	 * @param string $newcolumn new column-name
+	 * @param string $flds='' complete column-defintion-string like for AddColumnSQL, only used by mysql atm., default=''
+	 * @return array with SQL strings
+	 */
+	function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='')
+	{
+		$tabname = $this->TableName ($tabname);
+		if ($flds) {
+			list($lines,$pkey,$idxs) = $this->_GenFields($flds);
+			// genfields can return FALSE at times
+			if ($lines == null) $lines = array();
+			list(,$first) = each($lines);
+			list(,$column_def) = split("[\t ]+",$first,2);
+		}
+		return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def));
+	}
+		
+	/**
+	 * Drop one column
+	 *
+	 * Some DBM's can't do that on there own, you need to supply the complete defintion of the new table,
+	 * to allow, recreating the table and copying the content over to the new table
+	 * @param string $tabname table-name
+	 * @param string $flds column-name and type for the changed column
+	 * @param string $tableflds='' complete defintion of the new table, eg. for postgres, default ''
+	 * @param array/string $tableoptions='' options for the new table see CreateTableSQL, default ''
+	 * @return array with SQL strings
+	 */
+	function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
+	{
+		$tabname = $this->TableName ($tabname);
+		if (!is_array($flds)) $flds = explode(',',$flds);
+		$sql = array();
+		$alter = 'ALTER TABLE ' . $tabname . $this->dropCol . ' ';
+		foreach($flds as $v) {
+			$sql[] = $alter . $this->NameQuote($v);
+		}
+		return $sql;
+	}
+	
+	function DropTableSQL($tabname)
+	{
+		return array (sprintf($this->dropTable, $this->TableName($tabname)));
+	}
+	
+	function RenameTableSQL($tabname,$newname)
+	{
+		return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname)));
+	}	
+	
+	/**
+	 Generate the SQL to create table. Returns an array of sql strings.
+	*/
+	function CreateTableSQL($tabname, $flds, $tableoptions=array())
+	{
+		list($lines,$pkey,$idxs) = $this->_GenFields($flds, true);
+		// genfields can return FALSE at times
+		if ($lines == null) $lines = array();
+		
+		$taboptions = $this->_Options($tableoptions);
+		$tabname = $this->TableName ($tabname);
+		$sql = $this->_TableSQL($tabname,$lines,$pkey,$taboptions);
+		
+		// ggiunta - 2006/10/12 - KLUDGE:
+        // if we are on autoincrement, and table options includes REPLACE, the
+        // autoincrement sequence has already been dropped on table creation sql, so
+        // we avoid passing REPLACE to trigger creation code. This prevents
+        // creating sql that double-drops the sequence
+        if ($this->autoIncrement && isset($taboptions['REPLACE']))
+        	unset($taboptions['REPLACE']);
+		$tsql = $this->_Triggers($tabname,$taboptions);
+		foreach($tsql as $s) $sql[] = $s;
+		
+		if (is_array($idxs)) {
+			foreach($idxs as $idx => $idxdef) {
+				$sql_idxs = $this->CreateIndexSql($idx, $tabname,  $idxdef['cols'], $idxdef['opts']);
+				$sql = array_merge($sql, $sql_idxs);
+			}
+		}
+
+		return $sql;
+	}
+	
+	function _GenFields($flds,$widespacing=false)
+	{
+		if (is_string($flds)) {
+			$padding = '     ';
+			$txt = $flds.$padding;
+			$flds = array();
+			$flds0 = Lens_ParseArgs($txt,',');
+			$hasparam = false;
+			foreach($flds0 as $f0) {
+				$f1 = array();
+				foreach($f0 as $token) {
+					switch (strtoupper($token)) {
+					case 'INDEX':
+						$f1['INDEX'] = '';
+						// fall through intentionally
+					case 'CONSTRAINT':
+					case 'DEFAULT': 
+						$hasparam = $token;
+						break;
+					default:
+						if ($hasparam) $f1[$hasparam] = $token;
+						else $f1[] = $token;
+						$hasparam = false;
+						break;
+					}
+				}
+				// 'index' token without a name means single column index: name it after column
+				if (array_key_exists('INDEX', $f1) && $f1['INDEX'] == '') {
+					$f1['INDEX'] = isset($f0['NAME']) ? $f0['NAME'] : $f0[0];
+					// check if column name used to create an index name was quoted
+					if (($f1['INDEX'][0] == '"' || $f1['INDEX'][0] == "'" || $f1['INDEX'][0] == "`") &&
+						($f1['INDEX'][0] == substr($f1['INDEX'], -1))) {
+						$f1['INDEX'] = $f1['INDEX'][0].'idx_'.substr($f1['INDEX'], 1, -1).$f1['INDEX'][0];
+					}
+					else
+						$f1['INDEX'] = 'idx_'.$f1['INDEX'];
+				}
+				// reset it, so we don't get next field 1st token as INDEX...
+				$hasparam = false;
+
+				$flds[] = $f1;
+				
+			}
+		}
+		$this->autoIncrement = false;
+		$lines = array();
+		$pkey = array();
+		$idxs = array();
+		foreach($flds as $fld) {
+			$fld = _array_change_key_case($fld);
+			
+			$fname = false;
+			$fdefault = false;
+			$fautoinc = false;
+			$ftype = false;
+			$fsize = false;
+			$fprec = false;
+			$fprimary = false;
+			$fnoquote = false;
+			$fdefts = false;
+			$fdefdate = false;
+			$fconstraint = false;
+			$fnotnull = false;
+			$funsigned = false;
+			$findex = '';
+			$funiqueindex = false;
+			
+			//-----------------
+			// Parse attributes
+			foreach($fld as $attr => $v) {
+				if ($attr == 2 && is_numeric($v)) $attr = 'SIZE';
+				else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) $attr = strtoupper($v);
+				
+				switch($attr) {
+				case '0':
+				case 'NAME': 	$fname = $v; break;
+				case '1':
+				case 'TYPE': 	$ty = $v; $ftype = $this->ActualType(strtoupper($v)); break;
+				
+				case 'SIZE': 	
+								$dotat = strpos($v,'.'); if ($dotat === false) $dotat = strpos($v,',');
+								if ($dotat === false) $fsize = $v;
+								else {
+									$fsize = substr($v,0,$dotat);
+									$fprec = substr($v,$dotat+1);
+								}
+								break;
+				case 'UNSIGNED': $funsigned = true; break;
+				case 'AUTOINCREMENT':
+				case 'AUTO':	$fautoinc = true; $fnotnull = true; break;
+				case 'KEY':
+                // a primary key col can be non unique in itself (if key spans many cols...)
+				case 'PRIMARY':	$fprimary = $v; $fnotnull = true; /*$funiqueindex = true;*/ break;
+				case 'DEF':
+				case 'DEFAULT': $fdefault = $v; break;
+				case 'NOTNULL': $fnotnull = $v; break;
+				case 'NOQUOTE': $fnoquote = $v; break;
+				case 'DEFDATE': $fdefdate = $v; break;
+				case 'DEFTIMESTAMP': $fdefts = $v; break;
+				case 'CONSTRAINT': $fconstraint = $v; break;
+				// let INDEX keyword create a 'very standard' index on column
+				case 'INDEX': $findex = $v; break;
+				case 'UNIQUE': $funiqueindex = true; break;
+				} //switch
+			} // foreach $fld
+			
+			//--------------------
+			// VALIDATE FIELD INFO
+			if (!strlen($fname)) {
+				if ($this->debug) ADOConnection::outp("Undefined NAME");
+				return false;
+			}
+			
+			$fid = strtoupper(preg_replace('/^`(.+)`$/', '$1', $fname));
+			$fname = $this->NameQuote($fname);
+			
+			if (!strlen($ftype)) {
+				if ($this->debug) ADOConnection::outp("Undefined TYPE for field '$fname'");
+				return false;
+			} else {
+				$ftype = strtoupper($ftype);
+			}
+			
+			$ftype = $this->_GetSize($ftype, $ty, $fsize, $fprec);
+			
+			if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls
+			
+			if ($fprimary) $pkey[] = $fname;
+			
+			// some databases do not allow blobs to have defaults
+			if ($ty == 'X') $fdefault = false;
+			
+			// build list of indexes
+			if ($findex != '') {
+				if (array_key_exists($findex, $idxs)) {
+					$idxs[$findex]['cols'][] = ($fname);
+					if (in_array('UNIQUE', $idxs[$findex]['opts']) != $funiqueindex) {
+						if ($this->debug) ADOConnection::outp("Index $findex defined once UNIQUE and once not");
+					}
+					if ($funiqueindex && !in_array('UNIQUE', $idxs[$findex]['opts']))
+						$idxs[$findex]['opts'][] = 'UNIQUE';
+				}
+				else
+				{
+					$idxs[$findex] = array();
+					$idxs[$findex]['cols'] = array($fname);
+					if ($funiqueindex)
+						$idxs[$findex]['opts'] = array('UNIQUE');
+					else
+						$idxs[$findex]['opts'] = array();
+				}
+			}
+
+			//--------------------
+			// CONSTRUCT FIELD SQL
+			if ($fdefts) {
+				if (substr($this->connection->databaseType,0,5) == 'mysql') {
+					$ftype = 'TIMESTAMP';
+				} else {
+					$fdefault = $this->connection->sysTimeStamp;
+				}
+			} else if ($fdefdate) {
+				if (substr($this->connection->databaseType,0,5) == 'mysql') {
+					$ftype = 'TIMESTAMP';
+				} else {
+					$fdefault = $this->connection->sysDate;
+				}
+			} else if ($fdefault !== false && !$fnoquote) {
+				if ($ty == 'C' or $ty == 'X' or 
+					( substr($fdefault,0,1) != "'" && !is_numeric($fdefault))) {
+
+					if (($ty == 'D' || $ty == 'T') && strtolower($fdefault) != 'null') {
+						// convert default date into database-aware code
+						if ($ty == 'T')
+						{
+							$fdefault = $this->connection->DBTimeStamp($fdefault);
+						}
+						else
+						{
+							$fdefault = $this->connection->DBDate($fdefault);
+						}
+					}
+					else
+					if (strlen($fdefault) != 1 && substr($fdefault,0,1) == ' ' && substr($fdefault,strlen($fdefault)-1) == ' ') 
+						$fdefault = trim($fdefault);
+					else if (strtolower($fdefault) != 'null')
+						$fdefault = $this->connection->qstr($fdefault);
+				}
+			}
+			$suffix = $this->_CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned);
+			
+			// add index creation
+			if ($widespacing) $fname = str_pad($fname,24);
+			
+			 // check for field names appearing twice
+            if (array_key_exists($fid, $lines)) {
+            	 ADOConnection::outp("Field '$fname' defined twice");
+            }
+			
+			$lines[$fid] = $fname.' '.$ftype.$suffix;
+			
+			if ($fautoinc) $this->autoIncrement = true;
+		} // foreach $flds
+		
+		return array($lines,$pkey,$idxs);
+	}
+
+	/**
+		 GENERATE THE SIZE PART OF THE DATATYPE
+			$ftype is the actual type
+			$ty is the type defined originally in the DDL
+	*/
+	function _GetSize($ftype, $ty, $fsize, $fprec)
+	{
+		if (strlen($fsize) && $ty != 'X' && $ty != 'B' && strpos($ftype,'(') === false) {
+			$ftype .= "(".$fsize;
+			if (strlen($fprec)) $ftype .= ",".$fprec;
+			$ftype .= ')';
+		}
+		return $ftype;
+	}
+	
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{	
+		$suffix = '';
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+	function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
+	{
+		$sql = array();
+		
+		if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
+			$sql[] = sprintf ($this->dropIndex, $idxname);
+			if ( isset($idxoptions['DROP']) )
+				return $sql;
+		}
+		
+		if ( empty ($flds) ) {
+			return $sql;
+		}
+		
+		$unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
+	
+		$s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' ';
+		
+		if ( isset($idxoptions[$this->upperName]) )
+			$s .= $idxoptions[$this->upperName];
+		
+		if ( is_array($flds) )
+			$flds = implode(', ',$flds);
+		$s .= '(' . $flds . ')';
+		$sql[] = $s;
+		
+		return $sql;
+	}
+	
+	function _DropAutoIncrement($tabname)
+	{
+		return false;
+	}
+	
+	function _TableSQL($tabname,$lines,$pkey,$tableoptions)
+	{
+		$sql = array();
+		
+		if (isset($tableoptions['REPLACE']) || isset ($tableoptions['DROP'])) {
+			$sql[] = sprintf($this->dropTable,$tabname);
+			if ($this->autoIncrement) {
+				$sInc = $this->_DropAutoIncrement($tabname);
+				if ($sInc) $sql[] = $sInc;
+			}
+			if ( isset ($tableoptions['DROP']) ) {
+				return $sql;
+			}
+		}
+		$s = "CREATE TABLE $tabname (\n";
+		$s .= implode(",\n", $lines);
+		if (sizeof($pkey)>0) {
+			$s .= ",\n                 PRIMARY KEY (";
+			$s .= implode(", ",$pkey).")";
+		}
+		if (isset($tableoptions['CONSTRAINTS'])) 
+			$s .= "\n".$tableoptions['CONSTRAINTS'];
+		
+		if (isset($tableoptions[$this->upperName.'_CONSTRAINTS'])) 
+			$s .= "\n".$tableoptions[$this->upperName.'_CONSTRAINTS'];
+		
+		$s .= "\n)";
+		if (isset($tableoptions[$this->upperName])) $s .= $tableoptions[$this->upperName];
+		$sql[] = $s;
+		
+		return $sql;
+	}
+	
+	/**
+		GENERATE TRIGGERS IF NEEDED
+		used when table has auto-incrementing field that is emulated using triggers
+	*/
+	function _Triggers($tabname,$taboptions)
+	{
+		return array();
+	}
+	
+	/**
+		Sanitize options, so that array elements with no keys are promoted to keys
+	*/
+	function _Options($opts)
+	{
+		if (!is_array($opts)) return array();
+		$newopts = array();
+		foreach($opts as $k => $v) {
+			if (is_numeric($k)) $newopts[strtoupper($v)] = $v;
+			else $newopts[strtoupper($k)] = $v;
+		}
+		return $newopts;
+	}
+	
+	/**
+	"Florian Buzin [ easywe ]" <florian.buzin#easywe.de>
+	
+	This function changes/adds new fields to your table. You don't
+	have to know if the col is new or not. It will check on its own.
+	*/
+	function ChangeTableSQL($tablename, $flds, $tableoptions = false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+		if ($this->connection->fetchMode !== false) $savem = $this->connection->SetFetchMode(false);
+		
+		// check table exists
+		$save_handler = $this->connection->raiseErrorFn;
+		$this->connection->raiseErrorFn = '';
+		$cols = $this->MetaColumns($tablename);
+		$this->connection->raiseErrorFn = $save_handler;
+		
+		if (isset($savem)) $this->connection->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if ( empty($cols)) { 
+			return $this->CreateTableSQL($tablename, $flds, $tableoptions);
+		}
+		
+		if (is_array($flds)) {
+		// Cycle through the update fields, comparing
+		// existing fields to fields to update.
+		// if the Metatype and size is exactly the
+		// same, ignore - by Mark Newham
+			$holdflds = array();
+			foreach($flds as $k=>$v) {
+				if ( isset($cols[$k]) && is_object($cols[$k]) ) {
+					// If already not allowing nulls, then don't change
+					$obj = $cols[$k];
+					if (isset($obj->not_null) && $obj->not_null)
+						$v = str_replace('NOT NULL','',$v);
+
+					$c = $cols[$k];
+					$ml = $c->max_length;
+					$mt = $this->MetaType($c->type,$ml);
+					if ($ml == -1) $ml = '';
+					if ($mt == 'X') $ml = $v['SIZE'];
+					if (($mt != $v['TYPE']) ||  $ml != $v['SIZE']) {
+						$holdflds[$k] = $v;
+					}
+				} else {
+					$holdflds[$k] = $v;
+				}		
+			}
+			$flds = $holdflds;
+		}
+	
+
+		// already exists, alter table instead
+		list($lines,$pkey,$idxs) = $this->_GenFields($flds);
+		// genfields can return FALSE at times
+		if ($lines == null) $lines = array();
+		$alter = 'ALTER TABLE ' . $this->TableName($tablename);
+		$sql = array();
+
+		foreach ( $lines as $id => $v ) {
+			if ( isset($cols[$id]) && is_object($cols[$id]) ) {
+			
+				$flds = Lens_ParseArgs($v,',');
+				
+				//  We are trying to change the size of the field, if not allowed, simply ignore the request.
+				if ($flds && in_array(strtoupper(substr($flds[0][1],0,4)),$this->invalidResizeTypes4)) {
+					echo "<h3>$this->alterCol cannot be changed to $flds currently</h3>";
+					continue;	 
+	 			}
+				$sql[] = $alter . $this->alterCol . ' ' . $v;
+			} else {
+				$sql[] = $alter . $this->addCol . ' ' . $v;
+			}
+		}
+		
+		return $sql;
+	}
+} // class
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-error.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-error.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-error.inc.php	(revision 225)
@@ -0,0 +1,258 @@
+<?php
+/** 
+ * @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * The following code is adapted from the PEAR DB error handling code.
+ * Portions (c)1997-2002 The PHP Group.
+ */
+
+
+if (!defined("DB_ERROR")) define("DB_ERROR",-1);
+
+if (!defined("DB_ERROR_SYNTAX")) {
+	define("DB_ERROR_SYNTAX",              -2);
+	define("DB_ERROR_CONSTRAINT",          -3);
+	define("DB_ERROR_NOT_FOUND",           -4);
+	define("DB_ERROR_ALREADY_EXISTS",      -5);
+	define("DB_ERROR_UNSUPPORTED",         -6);
+	define("DB_ERROR_MISMATCH",            -7);
+	define("DB_ERROR_INVALID",             -8);
+	define("DB_ERROR_NOT_CAPABLE",         -9);
+	define("DB_ERROR_TRUNCATED",          -10);
+	define("DB_ERROR_INVALID_NUMBER",     -11);
+	define("DB_ERROR_INVALID_DATE",       -12);
+	define("DB_ERROR_DIVZERO",            -13);
+	define("DB_ERROR_NODBSELECTED",       -14);
+	define("DB_ERROR_CANNOT_CREATE",      -15);
+	define("DB_ERROR_CANNOT_DELETE",      -16);
+	define("DB_ERROR_CANNOT_DROP",        -17);
+	define("DB_ERROR_NOSUCHTABLE",        -18);
+	define("DB_ERROR_NOSUCHFIELD",        -19);
+	define("DB_ERROR_NEED_MORE_DATA",     -20);
+	define("DB_ERROR_NOT_LOCKED",         -21);
+	define("DB_ERROR_VALUE_COUNT_ON_ROW", -22);
+	define("DB_ERROR_INVALID_DSN",        -23);
+	define("DB_ERROR_CONNECT_FAILED",     -24);
+	define("DB_ERROR_EXTENSION_NOT_FOUND",-25);
+	define("DB_ERROR_NOSUCHDB",           -25);
+	define("DB_ERROR_ACCESS_VIOLATION",   -26);
+}
+
+function adodb_errormsg($value)
+{
+global $ADODB_LANG,$ADODB_LANG_ARRAY;
+
+	if (empty($ADODB_LANG)) $ADODB_LANG = 'en';
+	if (isset($ADODB_LANG_ARRAY['LANG']) && $ADODB_LANG_ARRAY['LANG'] == $ADODB_LANG) ;
+	else {
+		include_once(ADODB_DIR."/lang/adodb-$ADODB_LANG.inc.php");
+    }
+	return isset($ADODB_LANG_ARRAY[$value]) ? $ADODB_LANG_ARRAY[$value] : $ADODB_LANG_ARRAY[DB_ERROR];
+}
+
+function adodb_error($provider,$dbType,$errno)
+{
+	//var_dump($errno);
+	if (is_numeric($errno) && $errno == 0) return 0;
+	switch($provider) { 
+	case 'mysql': $map = adodb_error_mysql(); break;
+	
+	case 'oracle':
+	case 'oci8': $map = adodb_error_oci8(); break;
+	
+	case 'ibase': $map = adodb_error_ibase(); break;
+	
+	case 'odbc': $map = adodb_error_odbc(); break;
+	
+	case 'mssql':
+	case 'sybase': $map = adodb_error_mssql(); break;
+	
+	case 'informix': $map = adodb_error_ifx(); break;
+	
+	case 'postgres': return adodb_error_pg($errno); break;
+	
+	case 'sqlite': return $map = adodb_error_sqlite(); break;
+	default:
+		return DB_ERROR;
+	}	
+	//print_r($map);
+	//var_dump($errno);
+	if (isset($map[$errno])) return $map[$errno];
+	return DB_ERROR;
+}
+
+//**************************************************************************************
+
+function adodb_error_pg($errormsg)
+{
+	if (is_numeric($errormsg)) return (integer) $errormsg;
+    static $error_regexps = array(
+            '/(Table does not exist\.|Relation [\"\'].*[\"\'] does not exist|sequence does not exist|class ".+" not found)$/' => DB_ERROR_NOSUCHTABLE,
+            '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*/'      => DB_ERROR_ALREADY_EXISTS,
+            '/divide by zero$/'                     => DB_ERROR_DIVZERO,
+            '/pg_atoi: error in .*: can\'t parse /' => DB_ERROR_INVALID_NUMBER,
+            '/ttribute [\"\'].*[\"\'] not found|Relation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/' => DB_ERROR_NOSUCHFIELD,
+            '/parser: parse error at or near \"/'   => DB_ERROR_SYNTAX,
+            '/referential integrity violation/'     => DB_ERROR_CONSTRAINT,
+			'/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key violates unique constraint/'     
+			 	 => DB_ERROR_ALREADY_EXISTS
+        );
+	reset($error_regexps);
+    while (list($regexp,$code) = each($error_regexps)) {
+        if (preg_match($regexp, $errormsg)) {
+            return $code;
+        }
+    }
+    // Fall back to DB_ERROR if there was no mapping.
+    return DB_ERROR;
+}
+	
+function adodb_error_odbc()
+{
+static $MAP = array(
+            '01004' => DB_ERROR_TRUNCATED,
+            '07001' => DB_ERROR_MISMATCH,
+            '21S01' => DB_ERROR_MISMATCH,
+            '21S02' => DB_ERROR_MISMATCH,
+            '22003' => DB_ERROR_INVALID_NUMBER,
+            '22008' => DB_ERROR_INVALID_DATE,
+            '22012' => DB_ERROR_DIVZERO,
+            '23000' => DB_ERROR_CONSTRAINT,
+            '24000' => DB_ERROR_INVALID,
+            '34000' => DB_ERROR_INVALID,
+            '37000' => DB_ERROR_SYNTAX,
+            '42000' => DB_ERROR_SYNTAX,
+            'IM001' => DB_ERROR_UNSUPPORTED,
+            'S0000' => DB_ERROR_NOSUCHTABLE,
+            'S0001' => DB_ERROR_NOT_FOUND,
+            'S0002' => DB_ERROR_NOSUCHTABLE,
+            'S0011' => DB_ERROR_ALREADY_EXISTS,
+            'S0012' => DB_ERROR_NOT_FOUND,
+            'S0021' => DB_ERROR_ALREADY_EXISTS,
+            'S0022' => DB_ERROR_NOT_FOUND,
+			'S1000' => DB_ERROR_NOSUCHTABLE,
+            'S1009' => DB_ERROR_INVALID,
+            'S1090' => DB_ERROR_INVALID,
+            'S1C00' => DB_ERROR_NOT_CAPABLE
+        );
+		return $MAP;
+}
+
+function adodb_error_ibase()
+{
+static $MAP = array(
+            -104 => DB_ERROR_SYNTAX,
+            -150 => DB_ERROR_ACCESS_VIOLATION,
+            -151 => DB_ERROR_ACCESS_VIOLATION,
+            -155 => DB_ERROR_NOSUCHTABLE,
+            -157 => DB_ERROR_NOSUCHFIELD,
+            -158 => DB_ERROR_VALUE_COUNT_ON_ROW,
+            -170 => DB_ERROR_MISMATCH,
+            -171 => DB_ERROR_MISMATCH,
+            -172 => DB_ERROR_INVALID,
+            -204 => DB_ERROR_INVALID,
+            -205 => DB_ERROR_NOSUCHFIELD,
+            -206 => DB_ERROR_NOSUCHFIELD,
+            -208 => DB_ERROR_INVALID,
+            -219 => DB_ERROR_NOSUCHTABLE,
+            -297 => DB_ERROR_CONSTRAINT,
+            -530 => DB_ERROR_CONSTRAINT,
+            -803 => DB_ERROR_CONSTRAINT,
+            -551 => DB_ERROR_ACCESS_VIOLATION,
+            -552 => DB_ERROR_ACCESS_VIOLATION,
+            -922 => DB_ERROR_NOSUCHDB,
+            -923 => DB_ERROR_CONNECT_FAILED,
+            -924 => DB_ERROR_CONNECT_FAILED
+        );
+		
+		return $MAP;
+}
+
+function adodb_error_ifx()
+{
+static $MAP = array(
+            '-201'    => DB_ERROR_SYNTAX,
+            '-206'    => DB_ERROR_NOSUCHTABLE,
+            '-217'    => DB_ERROR_NOSUCHFIELD,
+            '-329'    => DB_ERROR_NODBSELECTED,
+            '-1204'   => DB_ERROR_INVALID_DATE,
+            '-1205'   => DB_ERROR_INVALID_DATE,
+            '-1206'   => DB_ERROR_INVALID_DATE,
+            '-1209'   => DB_ERROR_INVALID_DATE,
+            '-1210'   => DB_ERROR_INVALID_DATE,
+            '-1212'   => DB_ERROR_INVALID_DATE
+       );
+	   
+	   return $MAP;
+}
+
+function adodb_error_oci8()
+{
+static $MAP = array(
+			 1 => DB_ERROR_ALREADY_EXISTS,
+            900 => DB_ERROR_SYNTAX,
+            904 => DB_ERROR_NOSUCHFIELD,
+            923 => DB_ERROR_SYNTAX,
+            942 => DB_ERROR_NOSUCHTABLE,
+            955 => DB_ERROR_ALREADY_EXISTS,
+            1476 => DB_ERROR_DIVZERO,
+            1722 => DB_ERROR_INVALID_NUMBER,
+            2289 => DB_ERROR_NOSUCHTABLE,
+            2291 => DB_ERROR_CONSTRAINT,
+            2449 => DB_ERROR_CONSTRAINT
+        );
+	   
+	return $MAP;
+}
+
+function adodb_error_mssql()
+{
+static $MAP = array(
+		  208 => DB_ERROR_NOSUCHTABLE,
+          2601 => DB_ERROR_ALREADY_EXISTS
+       );
+	   
+	return $MAP;
+}
+
+function adodb_error_sqlite()
+{
+static $MAP = array(
+		  1 => DB_ERROR_SYNTAX
+       );
+	   
+	return $MAP;
+}
+
+function adodb_error_mysql()
+{
+static $MAP = array(
+           1004 => DB_ERROR_CANNOT_CREATE,
+           1005 => DB_ERROR_CANNOT_CREATE,
+           1006 => DB_ERROR_CANNOT_CREATE,
+           1007 => DB_ERROR_ALREADY_EXISTS,
+           1008 => DB_ERROR_CANNOT_DROP,
+		   1045 => DB_ERROR_ACCESS_VIOLATION,
+           1046 => DB_ERROR_NODBSELECTED,
+		   1049 => DB_ERROR_NOSUCHDB,
+           1050 => DB_ERROR_ALREADY_EXISTS,
+           1051 => DB_ERROR_NOSUCHTABLE,
+           1054 => DB_ERROR_NOSUCHFIELD,
+           1062 => DB_ERROR_ALREADY_EXISTS,
+           1064 => DB_ERROR_SYNTAX,
+           1100 => DB_ERROR_NOT_LOCKED,
+           1136 => DB_ERROR_VALUE_COUNT_ON_ROW,
+           1146 => DB_ERROR_NOSUCHTABLE,
+           1048 => DB_ERROR_CONSTRAINT,
+		    2002 => DB_ERROR_CONNECT_FAILED,
+			2005 => DB_ERROR_CONNECT_FAILED
+       );
+	   
+	return $MAP;
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-errorhandler.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-errorhandler.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-errorhandler.inc.php	(revision 225)
@@ -0,0 +1,79 @@
+<?php
+/**
+ * @version V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license.
+ * Whenever there is any discrepancy between the two licenses,
+ * the BSD license will take precedence.
+ *
+ * Set tabs to 4 for best viewing.
+ *
+ * Latest version is available at http://php.weblogs.com
+ *
+*/
+
+
+// added Claudio Bustos  clbustos#entelchile.net
+if (!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE',E_USER_ERROR); 
+
+if (!defined('ADODB_ERROR_HANDLER')) define('ADODB_ERROR_HANDLER','ADODB_Error_Handler');
+
+/**
+* Default Error Handler. This will be called with the following params
+*
+* @param $dbms		the RDBMS you are connecting to
+* @param $fn		the name of the calling function (in uppercase)
+* @param $errno		the native error number from the database
+* @param $errmsg	the native error msg from the database
+* @param $p1		$fn specific parameter - see below
+* @param $p2		$fn specific parameter - see below
+* @param $thisConn	$current connection object - can be false if no connection object created
+*/
+function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection)
+{
+	if (error_reporting() == 0) return; // obey @ protocol
+	switch($fn) {
+	case 'EXECUTE':
+		$sql = $p1;
+		$inputparams = $p2;
+
+		$s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")\n";
+		break;
+
+	case 'PCONNECT':
+	case 'CONNECT':
+		$host = $p1;
+		$database = $p2;
+
+		$s = "$dbms error: [$errno: $errmsg] in $fn($host, '****', '****', $database)\n";
+		break;
+	default:
+		$s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
+		break;
+	}
+	/*
+	* Log connection error somewhere
+	*	0 message is sent to PHP's system logger, using the Operating System's system
+	*		logging mechanism or a file, depending on what the error_log configuration
+	*		directive is set to.
+	*	1 message is sent by email to the address in the destination parameter.
+	*		This is the only message type where the fourth parameter, extra_headers is used.
+	*		This message type uses the same internal function as mail() does.
+	*	2 message is sent through the PHP debugging connection.
+	*		This option is only available if remote debugging has been enabled.
+	*		In this case, the destination parameter specifies the host name or IP address
+	*		and optionally, port number, of the socket receiving the debug information.
+	*	3 message is appended to the file destination
+	*/
+	if (defined('ADODB_ERROR_LOG_TYPE')) {
+		$t = date('Y-m-d H:i:s');
+		if (defined('ADODB_ERROR_LOG_DEST'))
+			error_log("($t) $s", ADODB_ERROR_LOG_TYPE, ADODB_ERROR_LOG_DEST);
+		else
+			error_log("($t) $s", ADODB_ERROR_LOG_TYPE);
+	}
+
+
+	//print "<p>$s</p>";
+	trigger_error($s,ADODB_ERROR_HANDLER_TYPE); 
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-errorpear.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-errorpear.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-errorpear.inc.php	(revision 225)
@@ -0,0 +1,88 @@
+<?php
+/** 
+ * @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * Latest version is available at http://php.weblogs.com
+ * 
+*/
+include_once('PEAR.php');
+
+if (!defined('ADODB_ERROR_HANDLER')) define('ADODB_ERROR_HANDLER','ADODB_Error_PEAR');
+
+/*
+* Enabled the following if you want to terminate scripts when an error occurs
+*/
+//PEAR::setErrorHandling (PEAR_ERROR_DIE);
+
+/*
+* Name of the PEAR_Error derived class to call.
+*/
+if (!defined('ADODB_PEAR_ERROR_CLASS')) define('ADODB_PEAR_ERROR_CLASS','PEAR_Error');
+
+/*
+* Store the last PEAR_Error object here
+*/
+global $ADODB_Last_PEAR_Error; $ADODB_Last_PEAR_Error = false;
+
+  /**
+* Error Handler with PEAR support. This will be called with the following params
+*
+* @param $dbms		the RDBMS you are connecting to
+* @param $fn		the name of the calling function (in uppercase)
+* @param $errno		the native error number from the database 
+* @param $errmsg	the native error msg from the database
+* @param $p1		$fn specific parameter - see below
+* @param $P2		$fn specific parameter - see below
+	*/
+function ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
+{
+global $ADODB_Last_PEAR_Error;
+	
+	if (error_reporting() == 0) return; // obey @ protocol
+	switch($fn) {
+	case 'EXECUTE':
+		$sql = $p1;
+		$inputparams = $p2;
+		
+		$s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")";
+		break;
+		
+	case 'PCONNECT':
+	case 'CONNECT':
+		$host = $p1;
+		$database = $p2;
+		
+		$s = "$dbms error: [$errno: $errmsg] in $fn('$host', ?, ?, '$database')";
+		break;
+		
+	default:
+		$s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)";
+		break;
+	}
+	
+	$class = ADODB_PEAR_ERROR_CLASS;
+	$ADODB_Last_PEAR_Error = new $class($s, $errno,
+		$GLOBALS['_PEAR_default_error_mode'],
+		$GLOBALS['_PEAR_default_error_options'], 
+		$errmsg);
+		
+	//print "<p>!$s</p>";
+}
+
+/**
+* Returns last PEAR_Error object. This error might be for an error that
+* occured several sql statements ago.
+*/
+function &ADODB_PEAR_Error()
+{
+global $ADODB_Last_PEAR_Error;
+
+	return $ADODB_Last_PEAR_Error;
+}
+		
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-exceptions.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-exceptions.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-exceptions.inc.php	(revision 225)
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * @version V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license.
+ * Whenever there is any discrepancy between the two licenses,
+ * the BSD license will take precedence.
+ *
+ * Set tabs to 4 for best viewing.
+ *
+ * Latest version is available at http://php.weblogs.com
+ *
+ * Exception-handling code using PHP5 exceptions (try-catch-throw).
+ */
+
+
+if (!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE',E_USER_ERROR); 
+define('ADODB_ERROR_HANDLER','adodb_throw');
+
+class ADODB_Exception extends Exception {
+var $dbms;
+var $fn;
+var $sql = '';
+var $params = '';
+var $host = '';
+var $database = '';
+	
+	function __construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)
+	{
+		switch($fn) {
+		case 'EXECUTE':
+			$this->sql = $p1;
+			$this->params = $p2;
+			$s = "$dbms error: [$errno: $errmsg] in $fn(\"$p1\")\n";
+			break;
+	
+		case 'PCONNECT':
+		case 'CONNECT':
+			$user = $thisConnection->user;
+			$s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\n";
+			break;
+		default:
+			$s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
+			break;
+		}
+	
+		$this->dbms = $dbms;
+		if ($thisConnection) {
+			$this->host = $thisConnection->host;
+			$this->database = $thisConnection->database;
+		}
+		$this->fn = $fn;
+		$this->msg = $errmsg;
+				
+		if (!is_numeric($errno)) $errno = -1;
+		parent::__construct($s,$errno);
+	}
+}
+
+/**
+* Default Error Handler. This will be called with the following params
+*
+* @param $dbms		the RDBMS you are connecting to
+* @param $fn		the name of the calling function (in uppercase)
+* @param $errno		the native error number from the database
+* @param $errmsg	the native error msg from the database
+* @param $p1		$fn specific parameter - see below
+* @param $P2		$fn specific parameter - see below
+*/
+
+function adodb_throw($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)
+{
+global $ADODB_EXCEPTION;
+	
+	if (error_reporting() == 0) return; // obey @ protocol
+	if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION;
+	else $errfn = 'ADODB_EXCEPTION';
+	throw new $errfn($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection);
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-iterator.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-iterator.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-iterator.inc.php	(revision 225)
@@ -0,0 +1,85 @@
+<?php
+
+/*
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  
+  Set tabs to 4.
+  
+  Declares the ADODB Base Class for PHP5 "ADODB_BASE_RS", and supports iteration with 
+  the ADODB_Iterator class.
+  
+  		$rs = $db->Execute("select * from adoxyz");
+		foreach($rs as $k => $v) {
+			echo $k; print_r($v); echo "<br>";
+		}
+		
+		
+	Iterator code based on http://cvs.php.net/cvs.php/php-src/ext/spl/examples/cachingiterator.inc?login=2
+ */
+ 
+
+ class ADODB_Iterator implements Iterator {
+
+    private $rs;
+
+    function __construct($rs) 
+	{
+        $this->rs = $rs;
+    }
+    function rewind() 
+	{
+        $this->rs->MoveFirst();
+    }
+
+	function valid() 
+	{
+        return !$this->rs->EOF;
+    }
+	
+    function key() 
+	{
+        return $this->rs->_currentRow;
+    }
+	
+    function current() 
+	{
+        return $this->rs->fields;
+    }
+	
+    function next() 
+	{
+        $this->rs->MoveNext();
+    }
+	
+	function __call($func, $params)
+	{
+		return call_user_func_array(array($this->rs, $func), $params);
+	}
+
+	
+	function hasMore()
+	{
+		return !$this->rs->EOF;
+	}
+
+}
+
+
+class ADODB_BASE_RS implements IteratorAggregate {
+    function getIterator() {
+        return new ADODB_Iterator($this);
+    }
+	
+	/* this is experimental - i don't really know what to return... */
+	function __toString()
+	{
+		include_once(ADODB_DIR.'/toexport.inc.php');
+		return _adodb_export($this,',',',',false,true);
+	}
+} 
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-lib.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-lib.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-lib.inc.php	(revision 225)
@@ -0,0 +1,1137 @@
+<?php
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+global $ADODB_INCLUDED_LIB;
+$ADODB_INCLUDED_LIB = 1;
+
+/* 
+ @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim\@natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Less commonly used functions are placed here to reduce size of adodb.inc.php. 
+*/ 
+
+function adodb_probetypes(&$array,&$types,$probe=8)
+{
+// probe and guess the type
+	$types = array();
+	if ($probe > sizeof($array)) $max = sizeof($array);
+	else $max = $probe;
+	
+	
+	for ($j=0;$j < $max; $j++) {
+		$row =& $array[$j];
+		if (!$row) break;
+		$i = -1;
+		foreach($row as $v) {
+			$i += 1;
+
+			if (isset($types[$i]) && $types[$i]=='C') continue;
+			
+			//print " ($i ".$types[$i]. "$v) ";
+			$v = trim($v);
+			
+			if (!preg_match('/^[+-]{0,1}[0-9\.]+$/',$v)) {
+				$types[$i] = 'C'; // once C, always C
+				
+				continue;
+			}
+			if ($j == 0) { 
+			// If empty string, we presume is character
+			// test for integer for 1st row only
+			// after that it is up to testing other rows to prove
+			// that it is not an integer
+				if (strlen($v) == 0) $types[$i] = 'C';
+				if (strpos($v,'.') !== false) $types[$i] = 'N';
+				else  $types[$i] = 'I';
+				continue;
+			}
+			
+			if (strpos($v,'.') !== false) $types[$i] = 'N';
+			
+		}
+	}
+	
+}
+
+function  adodb_transpose(&$arr, &$newarr, &$hdr, &$fobjs)
+{
+	$oldX = sizeof(reset($arr));
+	$oldY = sizeof($arr);	
+	
+	if ($hdr) {
+		$startx = 1;
+		$hdr = array('Fields');
+		for ($y = 0; $y < $oldY; $y++) {
+			$hdr[] = $arr[$y][0];
+		}
+	} else
+		$startx = 0;
+
+	for ($x = $startx; $x < $oldX; $x++) {
+		if ($fobjs) {
+			$o = $fobjs[$x];
+			$newarr[] = array($o->name);
+		} else
+			$newarr[] = array();
+			
+		for ($y = 0; $y < $oldY; $y++) {
+			$newarr[$x-$startx][] = $arr[$y][$x];
+		}
+	}
+}
+
+// Force key to upper. 
+// See also http://www.php.net/manual/en/function.array-change-key-case.php
+function _array_change_key_case($an_array)
+{
+	if (is_array($an_array)) {
+		$new_array = array();
+		foreach($an_array as $key=>$value)
+			$new_array[strtoupper($key)] = $value;
+
+	   	return $new_array;
+   }
+
+	return $an_array;
+}
+
+function _adodb_replace(&$zthis, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc)
+{
+		if (count($fieldArray) == 0) return 0;
+		$first = true;
+		$uSet = '';
+		
+		if (!is_array($keyCol)) {
+			$keyCol = array($keyCol);
+		}
+		foreach($fieldArray as $k => $v) {
+			if ($autoQuote && !is_numeric($v) and strncmp($v,"'",1) !== 0 and strcasecmp($v,$zthis->null2null)!=0) {
+				$v = $zthis->qstr($v);
+				$fieldArray[$k] = $v;
+			}
+			if (in_array($k,$keyCol)) continue; // skip UPDATE if is key
+			
+			if ($first) {
+				$first = false;			
+				$uSet = "$k=$v";
+			} else
+				$uSet .= ",$k=$v";
+		}
+		 
+		$where = false;
+		foreach ($keyCol as $v) {
+			if (isset($fieldArray[$v])) {
+				if ($where) $where .= ' and '.$v.'='.$fieldArray[$v];
+				else $where = $v.'='.$fieldArray[$v];
+			}
+		}
+		
+		if ($uSet && $where) {
+			$update = "UPDATE $table SET $uSet WHERE $where";
+
+			$rs = $zthis->Execute($update);
+			
+			
+			if ($rs) {
+				if ($zthis->poorAffectedRows) {
+				/*
+				 The Select count(*) wipes out any errors that the update would have returned. 
+				http://phplens.com/lens/lensforum/msgs.php?id=5696
+				*/
+					if ($zthis->ErrorNo()<>0) return 0;
+					
+				# affected_rows == 0 if update field values identical to old values
+				# for mysql - which is silly. 
+			
+					$cnt = $zthis->GetOne("select count(*) from $table where $where");
+					if ($cnt > 0) return 1; // record already exists
+				} else {
+					if (($zthis->Affected_Rows()>0)) return 1;
+				}
+			} else
+				return 0;
+		}
+		
+	//	print "<p>Error=".$this->ErrorNo().'<p>';
+		$first = true;
+		foreach($fieldArray as $k => $v) {
+			if ($has_autoinc && in_array($k,$keyCol)) continue; // skip autoinc col
+			
+			if ($first) {
+				$first = false;			
+				$iCols = "$k";
+				$iVals = "$v";
+			} else {
+				$iCols .= ",$k";
+				$iVals .= ",$v";
+			}				
+		}
+		$insert = "INSERT INTO $table ($iCols) VALUES ($iVals)"; 
+		$rs = $zthis->Execute($insert);
+		return ($rs) ? 2 : 0;
+}
+
+// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM
+function _adodb_getmenu(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false,
+			$size=0, $selectAttr='',$compareFields0=true)
+{
+	$hasvalue = false;
+
+	if ($multiple or is_array($defstr)) {
+		if ($size==0) $size=5;
+		$attr = ' multiple size="'.$size.'"';
+		if (!strpos($name,'[]')) $name .= '[]';
+	} else if ($size) $attr = ' size="'.$size.'"';
+	else $attr ='';
+	
+	$s = '<select name="'.$name.'"'.$attr.' '.$selectAttr.'>';
+	if ($blank1stItem) 
+		if (is_string($blank1stItem))  {
+			$barr = explode(':',$blank1stItem);
+			if (sizeof($barr) == 1) $barr[] = '';
+			$s .= "\n<option value=\"".$barr[0]."\">".$barr[1]."</option>";
+		} else $s .= "\n<option></option>";
+
+	if ($zthis->FieldCount() > 1) $hasvalue=true;
+	else $compareFields0 = true;
+	
+	$value = '';
+    $optgroup = null;
+    $firstgroup = true;
+    $fieldsize = $zthis->FieldCount();
+	while(!$zthis->EOF) {
+		$zval = rtrim(reset($zthis->fields));
+
+		if ($blank1stItem && $zval=="") {
+			$zthis->MoveNext();
+			continue;
+		}
+
+        if ($fieldsize > 1) {
+			if (isset($zthis->fields[1]))
+				$zval2 = rtrim($zthis->fields[1]);
+			else
+				$zval2 = rtrim(next($zthis->fields));
+		}
+		$selected = ($compareFields0) ? $zval : $zval2;
+		
+        $group = '';
+		if ($fieldsize > 2) {
+            $group = rtrim($zthis->fields[2]);
+        }
+/* 
+        if ($optgroup != $group) {
+            $optgroup = $group;
+            if ($firstgroup) {
+                $firstgroup = false;
+                $s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
+            } else {
+                $s .="\n</optgroup>";
+                $s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
+            }
+		}
+*/
+		if ($hasvalue) 
+			$value = " value='".htmlspecialchars($zval2)."'";
+		
+		if (is_array($defstr))  {
+			
+			if (in_array($selected,$defstr)) 
+				$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
+			else 
+				$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
+		}
+		else {
+			if (strcasecmp($selected,$defstr)==0) 
+				$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
+			else
+				$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
+		}
+		$zthis->MoveNext();
+	} // while
+	
+    // closing last optgroup
+    if($optgroup != null) {
+        $s .= "\n</optgroup>";
+	}
+	return $s ."\n</select>\n";
+}
+
+// Requires $ADODB_FETCH_MODE = ADODB_FETCH_NUM
+function _adodb_getmenu_gp(&$zthis, $name,$defstr='',$blank1stItem=true,$multiple=false,
+			$size=0, $selectAttr='',$compareFields0=true)
+{
+	$hasvalue = false;
+
+	if ($multiple or is_array($defstr)) {
+		if ($size==0) $size=5;
+		$attr = ' multiple size="'.$size.'"';
+		if (!strpos($name,'[]')) $name .= '[]';
+	} else if ($size) $attr = ' size="'.$size.'"';
+	else $attr ='';
+	
+	$s = '<select name="'.$name.'"'.$attr.' '.$selectAttr.'>';
+	if ($blank1stItem) 
+		if (is_string($blank1stItem))  {
+			$barr = explode(':',$blank1stItem);
+			if (sizeof($barr) == 1) $barr[] = '';
+			$s .= "\n<option value=\"".$barr[0]."\">".$barr[1]."</option>";
+		} else $s .= "\n<option></option>";
+
+	if ($zthis->FieldCount() > 1) $hasvalue=true;
+	else $compareFields0 = true;
+	
+	$value = '';
+    $optgroup = null;
+    $firstgroup = true;
+    $fieldsize = sizeof($zthis->fields);
+	while(!$zthis->EOF) {
+		$zval = rtrim(reset($zthis->fields));
+
+		if ($blank1stItem && $zval=="") {
+			$zthis->MoveNext();
+			continue;
+		}
+
+        if ($fieldsize > 1) {
+			if (isset($zthis->fields[1]))
+				$zval2 = rtrim($zthis->fields[1]);
+			else
+				$zval2 = rtrim(next($zthis->fields));
+		}
+		$selected = ($compareFields0) ? $zval : $zval2;
+		
+        $group = '';
+		if (isset($zthis->fields[2])) {
+            $group = rtrim($zthis->fields[2]);
+        }
+ 
+        if ($optgroup != $group) {
+            $optgroup = $group;
+            if ($firstgroup) {
+                $firstgroup = false;
+                $s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
+            } else {
+                $s .="\n</optgroup>";
+                $s .="\n<optgroup label='". htmlspecialchars($group) ."'>";
+            }
+		}
+	
+		if ($hasvalue) 
+			$value = " value='".htmlspecialchars($zval2)."'";
+		
+		if (is_array($defstr))  {
+			
+			if (in_array($selected,$defstr)) 
+				$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
+			else 
+				$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
+		}
+		else {
+			if (strcasecmp($selected,$defstr)==0) 
+				$s .= "\n<option selected='selected'$value>".htmlspecialchars($zval).'</option>';
+			else
+				$s .= "\n<option".$value.'>'.htmlspecialchars($zval).'</option>';
+		}
+		$zthis->MoveNext();
+	} // while
+	
+    // closing last optgroup
+    if($optgroup != null) {
+        $s .= "\n</optgroup>";
+	}
+	return $s ."\n</select>\n";
+}
+
+
+/*
+	Count the number of records this sql statement will return by using
+	query rewriting heuristics...
+	
+	Does not work with UNIONs, except with postgresql and oracle.
+	
+	Usage:
+	
+	$conn->Connect(...);
+	$cnt = _adodb_getcount($conn, $sql);
+	
+*/
+function _adodb_getcount(&$zthis, $sql,$inputarr=false,$secs2cache=0) 
+{
+	$qryRecs = 0;
+	
+	 if (!empty($zthis->_nestedSQL) || preg_match("/^\s*SELECT\s+DISTINCT/is", $sql) || 
+	 	preg_match('/\s+GROUP\s+BY\s+/is',$sql) || 
+		preg_match('/\s+UNION\s+/is',$sql)) {
+		// ok, has SELECT DISTINCT or GROUP BY so see if we can use a table alias
+		// but this is only supported by oracle and postgresql...
+		if ($zthis->dataProvider == 'oci8') {
+			
+			$rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$sql);
+			
+			// Allow Oracle hints to be used for query optimization, Chris Wrye
+			if (preg_match('#/\\*+.*?\\*\\/#', $sql, $hint)) {
+				$rewritesql = "SELECT ".$hint[0]." COUNT(*) FROM (".$rewritesql.")"; 
+			} else
+				$rewritesql = "SELECT COUNT(*) FROM (".$rewritesql.")"; 
+			
+		} else if (strncmp($zthis->databaseType,'postgres',8) == 0)  {
+			$rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$sql);
+			$rewritesql = "SELECT COUNT(*) FROM ($rewritesql) _ADODB_ALIAS_";
+		}
+	} else {
+		// now replace SELECT ... FROM with SELECT COUNT(*) FROM
+		$rewritesql = preg_replace(
+					'/^\s*SELECT\s.*\s+FROM\s/Uis','SELECT COUNT(*) FROM ',$sql);
+
+		
+		
+		// fix by alexander zhukov, alex#unipack.ru, because count(*) and 'order by' fails 
+		// with mssql, access and postgresql. Also a good speedup optimization - skips sorting!
+		// also see http://phplens.com/lens/lensforum/msgs.php?id=12752
+		if (preg_match('/\sORDER\s+BY\s*\(/i',$rewritesql))
+			$rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$rewritesql);
+		else
+			$rewritesql = preg_replace('/(\sORDER\s+BY\s[^)]*)/is','',$rewritesql);
+	}
+	
+	
+	
+	if (isset($rewritesql) && $rewritesql != $sql) {
+		if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[1];
+		 
+		if ($secs2cache) {
+			// we only use half the time of secs2cache because the count can quickly
+			// become inaccurate if new records are added
+			$qryRecs = $zthis->CacheGetOne($secs2cache/2,$rewritesql,$inputarr);
+			
+		} else {
+			$qryRecs = $zthis->GetOne($rewritesql,$inputarr);
+	  	}
+		if ($qryRecs !== false) return $qryRecs;
+	}
+	//--------------------------------------------
+	// query rewrite failed - so try slower way...
+	
+	
+	// strip off unneeded ORDER BY if no UNION
+	if (preg_match('/\s*UNION\s*/is', $sql)) $rewritesql = $sql;
+	else $rewritesql = preg_replace('/(\sORDER\s+BY\s.*)/is','',$sql); 
+	
+	if (preg_match('/\sLIMIT\s+[0-9]+/i',$sql,$limitarr)) $rewritesql .= $limitarr[0];
+		
+	$rstest = &$zthis->Execute($rewritesql,$inputarr);
+	if (!$rstest) $rstest = $zthis->Execute($sql,$inputarr);
+	
+	if ($rstest) {
+	  		$qryRecs = $rstest->RecordCount();
+		if ($qryRecs == -1) { 
+		global $ADODB_EXTENSION;
+		// some databases will return -1 on MoveLast() - change to MoveNext()
+			if ($ADODB_EXTENSION) {
+				while(!$rstest->EOF) {
+					adodb_movenext($rstest);
+				}
+			} else {
+				while(!$rstest->EOF) {
+					$rstest->MoveNext();
+				}
+			}
+			$qryRecs = $rstest->_currentRow;
+		}
+		$rstest->Close();
+		if ($qryRecs == -1) return 0;
+	}
+	return $qryRecs;
+}
+
+/*
+ 	Code originally from "Cornel G" <conyg@fx.ro>
+
+	This code might not work with SQL that has UNION in it	
+	
+	Also if you are using CachePageExecute(), there is a strong possibility that
+	data will get out of synch. use CachePageExecute() only with tables that
+	rarely change.
+*/
+function &_adodb_pageexecute_all_rows(&$zthis, $sql, $nrows, $page, 
+						$inputarr=false, $secs2cache=0) 
+{
+	$atfirstpage = false;
+	$atlastpage = false;
+	$lastpageno=1;
+
+	// If an invalid nrows is supplied, 
+	// we assume a default value of 10 rows per page
+	if (!isset($nrows) || $nrows <= 0) $nrows = 10;
+
+	$qryRecs = false; //count records for no offset
+	
+	$qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache);
+	$lastpageno = (int) ceil($qryRecs / $nrows);
+	$zthis->_maxRecordCount = $qryRecs;
+	
+
+
+	// ***** Here we check whether $page is the last page or 
+	// whether we are trying to retrieve 
+	// a page number greater than the last page number.
+	if ($page >= $lastpageno) {
+		$page = $lastpageno;
+		$atlastpage = true;
+	}
+	
+	// If page number <= 1, then we are at the first page
+	if (empty($page) || $page <= 1) {	
+		$page = 1;
+		$atfirstpage = true;
+	}
+	
+	// We get the data we want
+	$offset = $nrows * ($page-1);
+	if ($secs2cache > 0) 
+		$rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr);
+	else 
+		$rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache);
+
+	
+	// Before returning the RecordSet, we set the pagination properties we need
+	if ($rsreturn) {
+		$rsreturn->_maxRecordCount = $qryRecs;
+		$rsreturn->rowsPerPage = $nrows;
+		$rsreturn->AbsolutePage($page);
+		$rsreturn->AtFirstPage($atfirstpage);
+		$rsreturn->AtLastPage($atlastpage);
+		$rsreturn->LastPageNo($lastpageno);
+	}
+	return $rsreturn;
+}
+
+// Iván Oliva version
+function &_adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) 
+{
+
+	$atfirstpage = false;
+	$atlastpage = false;
+	
+	if (!isset($page) || $page <= 1) {	// If page number <= 1, then we are at the first page
+		$page = 1;
+		$atfirstpage = true;
+	}
+	if ($nrows <= 0) $nrows = 10;	// If an invalid nrows is supplied, we assume a default value of 10 rows per page
+	
+	// ***** Here we check whether $page is the last page or whether we are trying to retrieve a page number greater than 
+	// the last page number.
+	$pagecounter = $page + 1;
+	$pagecounteroffset = ($pagecounter * $nrows) - $nrows;
+	if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr);
+	else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache);
+	if ($rstest) {
+		while ($rstest && $rstest->EOF && $pagecounter>0) {
+			$atlastpage = true;
+			$pagecounter--;
+			$pagecounteroffset = $nrows * ($pagecounter - 1);
+			$rstest->Close();
+			if ($secs2cache>0) $rstest = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $pagecounteroffset, $inputarr);
+			else $rstest = &$zthis->SelectLimit($sql, $nrows, $pagecounteroffset, $inputarr, $secs2cache);
+		}
+		if ($rstest) $rstest->Close();
+	}
+	if ($atlastpage) {	// If we are at the last page or beyond it, we are going to retrieve it
+		$page = $pagecounter;
+		if ($page == 1) $atfirstpage = true;	// We have to do this again in case the last page is the same as the first
+			//... page, that is, the recordset has only 1 page.
+	}
+	
+	// We get the data we want
+	$offset = $nrows * ($page-1);
+	if ($secs2cache > 0) $rsreturn = &$zthis->CacheSelectLimit($secs2cache, $sql, $nrows, $offset, $inputarr);
+	else $rsreturn = &$zthis->SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache);
+	
+	// Before returning the RecordSet, we set the pagination properties we need
+	if ($rsreturn) {
+		$rsreturn->rowsPerPage = $nrows;
+		$rsreturn->AbsolutePage($page);
+		$rsreturn->AtFirstPage($atfirstpage);
+		$rsreturn->AtLastPage($atlastpage);
+	}
+	return $rsreturn;
+}
+
+function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=2)
+{
+	global $ADODB_QUOTE_FIELDNAMES;
+
+		if (!$rs) {
+			printf(ADODB_BAD_RS,'GetUpdateSQL');
+			return false;
+		}
+	
+		$fieldUpdatedCount = 0;
+		$arrFields = _array_change_key_case($arrFields);
+
+		$hasnumeric = isset($rs->fields[0]);
+		$setFields = '';
+		
+		// Loop through all of the fields in the recordset
+		for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {
+			// Get the field from the recordset
+			$field = $rs->FetchField($i);
+
+			// If the recordset field is one
+			// of the fields passed in then process.
+			$upperfname = strtoupper($field->name);
+			if (adodb_key_exists($upperfname,$arrFields,$force)) {
+				
+				// If the existing field value in the recordset
+				// is different from the value passed in then
+				// go ahead and append the field name and new value to
+				// the update query.
+				
+				if ($hasnumeric) $val = $rs->fields[$i];
+				else if (isset($rs->fields[$upperfname])) $val = $rs->fields[$upperfname];
+				else if (isset($rs->fields[$field->name])) $val =  $rs->fields[$field->name];
+				else if (isset($rs->fields[strtolower($upperfname)])) $val =  $rs->fields[strtolower($upperfname)];
+				else $val = '';
+				
+			
+				if ($forceUpdate || strcmp($val, $arrFields[$upperfname])) {
+					// Set the counter for the number of fields that will be updated.
+					$fieldUpdatedCount++;
+
+					// Based on the datatype of the field
+					// Format the value properly for the database
+					$type = $rs->MetaType($field->type);
+						
+
+					if ($type == 'null') {
+						$type = 'C';
+					}
+					
+					if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES))
+						$fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote;
+					else
+						$fnameq = $upperfname;
+					
+					
+                // is_null requires php 4.0.4
+                //********************************************************//
+                if (is_null($arrFields[$upperfname])
+					|| (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0)
+                    || $arrFields[$upperfname] === $zthis->null2null
+                    )
+                {
+                    switch ($force) {
+
+                        //case 0:
+                        //    //Ignore empty values. This is allready handled in "adodb_key_exists" function.
+                        //break;
+
+                        case 1:
+                            //Set null
+                            $setFields .= $field->name . " = null, ";
+                        break;
+							
+                        case 2:
+                            //Set empty
+                            $arrFields[$upperfname] = "";
+                            $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq);
+                        break;
+						default:
+                        case 3:
+                            //Set the value that was given in array, so you can give both null and empty values
+                            if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) {
+                                $setFields .= $field->name . " = null, ";
+                            } else {
+                                $setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,$arrFields, $magicq);
+                            }
+                        break;
+                    }
+                //********************************************************//
+                } else {
+						//we do this so each driver can customize the sql for
+						//DB specific column types. 
+						//Oracle needs BLOB types to be handled with a returning clause
+						//postgres has special needs as well
+						$setFields .= _adodb_column_sql($zthis, 'U', $type, $upperfname, $fnameq,
+														  $arrFields, $magicq);
+					}
+				}
+			}
+		}
+
+		// If there were any modified fields then build the rest of the update query.
+		if ($fieldUpdatedCount > 0 || $forceUpdate) {
+					// Get the table name from the existing query.
+			if (!empty($rs->tableName)) $tableName = $rs->tableName;
+			else {
+				preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName);
+				$tableName = $tableName[1];
+			}
+			// Get the full where clause excluding the word "WHERE" from
+			// the existing query.
+			preg_match('/\sWHERE\s(.*)/is', $rs->sql, $whereClause);
+			
+			$discard = false;
+			// not a good hack, improvements?
+			if ($whereClause) {
+			#var_dump($whereClause);
+				if (preg_match('/\s(ORDER\s.*)/is', $whereClause[1], $discard));
+				else if (preg_match('/\s(LIMIT\s.*)/is', $whereClause[1], $discard));
+				else if (preg_match('/\s(FOR UPDATE.*)/is', $whereClause[1], $discard));
+				else preg_match('/\s.*(\) WHERE .*)/is', $whereClause[1], $discard); # see http://sourceforge.net/tracker/index.php?func=detail&aid=1379638&group_id=42718&atid=433976
+			} else
+				$whereClause = array(false,false);
+				
+			if ($discard)
+				$whereClause[1] = substr($whereClause[1], 0, strlen($whereClause[1]) - strlen($discard[1]));
+			
+			$sql = 'UPDATE '.$tableName.' SET '.substr($setFields, 0, -2);
+			if (strlen($whereClause[1]) > 0) 
+				$sql .= ' WHERE '.$whereClause[1];
+
+			return $sql;
+
+		} else {
+			return false;
+	}
+}
+
+function adodb_key_exists($key, &$arr,$force=2)
+{
+	if ($force<=0) {
+		// the following is the old behaviour where null or empty fields are ignored
+		return (!empty($arr[$key])) || (isset($arr[$key]) && strlen($arr[$key])>0);
+	}
+
+	if (isset($arr[$key])) return true;
+	## null check below
+	if (ADODB_PHPVER >= 0x4010) return array_key_exists($key,$arr);
+	return false;
+}
+
+/**
+ * There is a special case of this function for the oci8 driver.
+ * The proper way to handle an insert w/ a blob in oracle requires
+ * a returning clause with bind variables and a descriptor blob.
+ * 
+ * 
+ */
+function _adodb_getinsertsql(&$zthis,&$rs,$arrFields,$magicq=false,$force=2)
+{
+static $cacheRS = false;
+static $cacheSig = 0;
+static $cacheCols;
+	global $ADODB_QUOTE_FIELDNAMES;
+
+	$tableName = '';
+	$values = '';
+	$fields = '';
+	$recordSet = null;
+	$arrFields = _array_change_key_case($arrFields);
+	$fieldInsertedCount = 0;
+	
+	if (is_string($rs)) {
+		//ok we have a table name
+		//try and get the column info ourself.
+		$tableName = $rs;			
+	
+		//we need an object for the recordSet
+		//because we have to call MetaType.
+		//php can't do a $rsclass::MetaType()
+		$rsclass = $zthis->rsPrefix.$zthis->databaseType;
+		$recordSet = new $rsclass(-1,$zthis->fetchMode);
+		$recordSet->connection = &$zthis;
+		
+		if (is_string($cacheRS) && $cacheRS == $rs) {
+			$columns =& $cacheCols;
+		} else {
+			$columns = $zthis->MetaColumns( $tableName );
+			$cacheRS = $tableName;
+			$cacheCols = $columns;
+		}
+	} else if (is_subclass_of($rs, 'adorecordset')) {
+		if (isset($rs->insertSig) && is_integer($cacheRS) && $cacheRS == $rs->insertSig) {
+			$columns =& $cacheCols;
+		} else {
+			for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) 
+				$columns[] = $rs->FetchField($i);
+			$cacheRS = $cacheSig;
+			$cacheCols = $columns;
+			$rs->insertSig = $cacheSig++;
+		}
+		$recordSet =& $rs;
+	
+	} else {
+		printf(ADODB_BAD_RS,'GetInsertSQL');
+		return false;
+	}
+
+	// Loop through all of the fields in the recordset
+	foreach( $columns as $field ) { 
+		$upperfname = strtoupper($field->name);
+		if (adodb_key_exists($upperfname,$arrFields,$force)) {
+			$bad = false;
+			if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES))
+				$fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote;
+			else
+				$fnameq = $upperfname;
+			
+			$type = $recordSet->MetaType($field->type);
+			
+            /********************************************************/
+            if (is_null($arrFields[$upperfname])
+                || (empty($arrFields[$upperfname]) && strlen($arrFields[$upperfname]) == 0)
+                || $arrFields[$upperfname] === $zthis->null2null
+				)
+               {
+                    switch ($force) {
+
+                        case 0: // we must always set null if missing
+							$bad = true;
+							break;
+							
+                        case 1:
+                            $values  .= "null, ";
+                        break;
+		
+                        case 2:
+                            //Set empty
+                            $arrFields[$upperfname] = "";
+                            $values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq,$arrFields, $magicq);
+                        break;
+
+						default:
+                        case 3:
+                            //Set the value that was given in array, so you can give both null and empty values
+							if (is_null($arrFields[$upperfname]) || $arrFields[$upperfname] === $zthis->null2null) { 
+								$values  .= "null, ";
+							} else {
+                        		$values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq, $arrFields, $magicq);
+             				}
+              			break;
+             		} // switch
+
+            /*********************************************************/
+			} else {
+				//we do this so each driver can customize the sql for
+				//DB specific column types. 
+				//Oracle needs BLOB types to be handled with a returning clause
+				//postgres has special needs as well
+				$values .= _adodb_column_sql($zthis, 'I', $type, $upperfname, $fnameq,
+											   $arrFields, $magicq);
+			}
+			
+			if ($bad) continue;
+			// Set the counter for the number of fields that will be inserted.
+			$fieldInsertedCount++;
+			
+			
+			// Get the name of the fields to insert
+			$fields .= $fnameq . ", ";
+		}
+	}
+
+
+	// If there were any inserted fields then build the rest of the insert query.
+	if ($fieldInsertedCount <= 0)  return false;
+	
+	// Get the table name from the existing query.
+	if (!$tableName) {
+		if (!empty($rs->tableName)) $tableName = $rs->tableName;
+		else if (preg_match("/FROM\s+".ADODB_TABLE_REGEX."/is", $rs->sql, $tableName))
+			$tableName = $tableName[1];
+		else 
+			return false;
+	}		
+
+	// Strip off the comma and space on the end of both the fields
+	// and their values.
+	$fields = substr($fields, 0, -2);
+	$values = substr($values, 0, -2);
+
+	// Append the fields and their values to the insert query.
+	return 'INSERT INTO '.$tableName.' ( '.$fields.' ) VALUES ( '.$values.' )';
+}
+
+
+/**
+ * This private method is used to help construct
+ * the update/sql which is generated by GetInsertSQL and GetUpdateSQL.
+ * It handles the string construction of 1 column -> sql string based on
+ * the column type.  We want to do 'safe' handling of BLOBs
+ * 
+ * @param string the type of sql we are trying to create
+ *                'I' or 'U'. 
+ * @param string column data type from the db::MetaType() method  
+ * @param string the column name
+ * @param array the column value
+ * 
+ * @return string
+ * 
+ */
+function _adodb_column_sql_oci8(&$zthis,$action, $type, $fname, $fnameq, $arrFields, $magicq) 
+{
+    $sql = '';
+    
+    // Based on the datatype of the field
+    // Format the value properly for the database
+    switch($type) {
+    case 'B':
+        //in order to handle Blobs correctly, we need
+        //to do some magic for Oracle
+
+        //we need to create a new descriptor to handle 
+        //this properly
+        if (!empty($zthis->hasReturningInto)) {
+            if ($action == 'I') {
+                $sql = 'empty_blob(), ';
+            } else {
+                $sql = $fnameq. '=empty_blob(), ';
+            }
+            //add the variable to the returning clause array
+            //so the user can build this later in
+            //case they want to add more to it
+            $zthis->_returningArray[$fname] = ':xx'.$fname.'xx';
+        } else if (empty($arrFields[$fname])){
+            if ($action == 'I') {
+                $sql = 'empty_blob(), ';
+            } else {
+                $sql = $fnameq. '=empty_blob(), ';
+            }            
+        } else {
+            //this is to maintain compatibility
+            //with older adodb versions.
+            $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false);
+        }
+        break;
+
+    case "X":
+        //we need to do some more magic here for long variables
+        //to handle these correctly in oracle.
+
+        //create a safe bind var name
+        //to avoid conflicts w/ dupes.
+       if (!empty($zthis->hasReturningInto)) {
+            if ($action == 'I') {
+                $sql = ':xx'.$fname.'xx, ';                
+            } else {
+                $sql = $fnameq.'=:xx'.$fname.'xx, ';
+            }
+            //add the variable to the returning clause array
+            //so the user can build this later in
+            //case they want to add more to it
+            $zthis->_returningArray[$fname] = ':xx'.$fname.'xx';
+        } else {
+            //this is to maintain compatibility
+            //with older adodb versions.
+            $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq,false);
+        }            
+        break;
+        
+    default:
+        $sql = _adodb_column_sql($zthis, $action, $type, $fname, $fnameq,  $arrFields, $magicq,false);
+        break;
+    }
+    
+    return $sql;
+}    
+	
+function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq, $recurse=true) 
+{
+
+	if ($recurse) {
+		switch($zthis->dataProvider)  {
+		case 'postgres':
+			if ($type == 'L') $type = 'C';
+			break;
+		case 'oci8':
+			return _adodb_column_sql_oci8($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq);
+			
+		}
+	}
+		
+	switch($type) {
+		case "C":
+		case "X":
+		case 'B':
+			$val = $zthis->qstr($arrFields[$fname],$magicq);
+			break;
+
+		case "D":
+			$val = $zthis->DBDate($arrFields[$fname]);
+			break;
+
+		case "T":
+			$val = $zthis->DBTimeStamp($arrFields[$fname]);
+			break;
+
+		default:
+			$val = $arrFields[$fname];
+			if (empty($val)) $val = '0';
+			break;
+	}
+
+	if ($action == 'I') return $val . ", ";
+	
+	
+	return $fnameq . "=" . $val  . ", ";
+	
+}
+
+
+
+function _adodb_debug_execute(&$zthis, $sql, $inputarr)
+{
+	$ss = '';
+	if ($inputarr) {
+		foreach($inputarr as $kk=>$vv) {
+			if (is_string($vv) && strlen($vv)>64) $vv = substr($vv,0,64).'...';
+			$ss .= "($kk=>'$vv') ";
+		}
+		$ss = "[ $ss ]";
+	}
+	$sqlTxt = is_array($sql) ? $sql[0] : $sql;
+	/*str_replace(', ','##1#__^LF',is_array($sql) ? $sql[0] : $sql);
+	$sqlTxt = str_replace(',',', ',$sqlTxt);
+	$sqlTxt = str_replace('##1#__^LF', ', ' ,$sqlTxt);
+	*/
+	// check if running from browser or command-line
+	$inBrowser = isset($_SERVER['HTTP_USER_AGENT']);
+	
+	$dbt = $zthis->databaseType;
+	if (isset($zthis->dsnType)) $dbt .= '-'.$zthis->dsnType;
+	if ($inBrowser) {
+		if ($ss) {
+			$ss = '<code>'.htmlspecialchars($ss).'</code>';
+		}
+		if ($zthis->debug === -1)
+			ADOConnection::outp( "<br />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<br />\n",false);
+		else 
+			ADOConnection::outp( "<hr />\n($dbt): ".htmlspecialchars($sqlTxt)." &nbsp; $ss\n<hr />\n",false);
+	} else {
+		ADOConnection::outp("-----\n($dbt): ".$sqlTxt."\n-----\n",false);
+	}
+
+	$qID = $zthis->_query($sql,$inputarr);
+	
+	/* 
+		Alexios Fakios notes that ErrorMsg() must be called before ErrorNo() for mssql
+		because ErrorNo() calls Execute('SELECT @ERROR'), causing recursion
+	*/
+	if ($zthis->databaseType == 'mssql') { 
+	// ErrorNo is a slow function call in mssql, and not reliable in PHP 4.0.6
+		if($emsg = $zthis->ErrorMsg()) {
+			if ($err = $zthis->ErrorNo()) ADOConnection::outp($err.': '.$emsg);
+		}
+	} else if (!$qID) {
+		ADOConnection::outp($zthis->ErrorNo() .': '. $zthis->ErrorMsg());
+	}
+	
+	if ($zthis->debug === 99) _adodb_backtrace(true,9999,2);
+	return $qID;
+}
+
+# pretty print the debug_backtrace function
+function _adodb_backtrace($printOrArr=true,$levels=9999,$skippy=0)
+{
+	if (!function_exists('debug_backtrace')) return '';
+	 
+	$html =  (isset($_SERVER['HTTP_USER_AGENT']));
+	$fmt =  ($html) ? "</font><font color=#808080 size=-1> %% line %4d, file: <a href=\"file:/%s\">%s</a></font>" : "%% line %4d, file: %s";
+
+	$MAXSTRLEN = 128;
+
+	$s = ($html) ? '<pre align=left>' : '';
+	
+	if (is_array($printOrArr)) $traceArr = $printOrArr;
+	else $traceArr = debug_backtrace();
+	array_shift($traceArr);
+	array_shift($traceArr);
+	$tabs = sizeof($traceArr)-2;
+	
+	foreach ($traceArr as $arr) {
+		if ($skippy) {$skippy -= 1; continue;}
+		$levels -= 1;
+		if ($levels < 0) break;
+		
+		$args = array();
+		for ($i=0; $i < $tabs; $i++) $s .=  ($html) ? ' &nbsp; ' : "\t";
+		$tabs -= 1;
+		if ($html) $s .= '<font face="Courier New,Courier">';
+		if (isset($arr['class'])) $s .= $arr['class'].'.';
+		if (isset($arr['args']))
+		 foreach($arr['args'] as $v) {
+			if (is_null($v)) $args[] = 'null';
+			else if (is_array($v)) $args[] = 'Array['.sizeof($v).']';
+			else if (is_object($v)) $args[] = 'Object:'.get_class($v);
+			else if (is_bool($v)) $args[] = $v ? 'true' : 'false';
+			else {
+				$v = (string) @$v;
+				$str = htmlspecialchars(substr($v,0,$MAXSTRLEN));
+				if (strlen($v) > $MAXSTRLEN) $str .= '...';
+				$args[] = $str;
+			}
+		}
+		$s .= $arr['function'].'('.implode(', ',$args).')';
+		
+		
+		$s .= @sprintf($fmt, $arr['line'],$arr['file'],basename($arr['file']));
+			
+		$s .= "\n";
+	}	
+	if ($html) $s .= '</pre>';
+	if ($printOrArr) print $s;
+	
+	return $s;
+}
+/*
+function _adodb_find_from($sql) 
+{
+
+	$sql = str_replace(array("\n","\r"), ' ', $sql);
+	$charCount = strlen($sql);
+	
+	$inString = false;
+	$quote = '';
+	$parentheseCount = 0;
+	$prevChars = '';
+	$nextChars = '';
+	
+
+	for($i = 0; $i < $charCount; $i++) {
+
+    	$char = substr($sql,$i,1);
+	    $prevChars = substr($sql,0,$i);
+    	$nextChars = substr($sql,$i+1);
+
+		if((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === false) {
+			$quote = $char;
+			$inString = true;
+		}
+
+		elseif((($char == "'" || $char == '"' || $char == '`') && substr($prevChars,-1,1) != '\\') && $inString === true && $quote == $char) {
+			$quote = "";
+			$inString = false;
+		}
+
+		elseif($char == "(" && $inString === false)
+			$parentheseCount++;
+
+		elseif($char == ")" && $inString === false && $parentheseCount > 0)
+			$parentheseCount--;
+
+		elseif($parentheseCount <= 0 && $inString === false && $char == " " && strtoupper(substr($prevChars,-5,5)) == " FROM")
+			return $i;
+
+	}
+}
+*/
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-memcache.lib.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-memcache.lib.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-memcache.lib.inc.php	(revision 225)
@@ -0,0 +1,118 @@
+<?php
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+global $ADODB_INCLUDED_MEMCACHE;
+$ADODB_INCLUDED_MEMCACHE = 1;
+
+/* 
+
+  V4.90 8 June 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+*/
+
+	function &getmemcache($key,&$err, $timeout=0, $host, $port)
+	{
+		$false = false;
+		$err = false;
+
+		if (!function_exists('memcache_pconnect')) {
+			$err = 'Memcache module PECL extension not found!';
+			return $false;
+		}
+
+		$memcache = new Memcache;
+		if (!@$memcache->pconnect($host, $port)) {
+			$err = 'Can\'t connect to memcache server on: '.$host.':'.$port;
+			return $false;
+		}
+
+		$rs = $memcache->get($key);
+		if (!$rs) {
+			$err = 'Item with such key doesn\'t exists on the memcached server.';
+			return $false;
+		}
+
+		$tdiff = intval($rs->timeCreated+$timeout - time());
+		if ($tdiff <= 2) {
+			switch($tdiff) {
+				case 2: 
+					if ((rand() & 15) == 0) {
+						$err = "Timeout 2";
+						return $false;
+					}
+					break;
+				case 1:
+					if ((rand() & 3) == 0) {
+						$err = "Timeout 1";
+						return $false;
+					}
+					break;
+				default: 
+					$err = "Timeout 0";
+					return $false;
+			}
+		}
+		return $rs;
+	}
+
+	function putmemcache($key, $rs, $host, $port, $compress, $debug=false)
+	{
+		$false = false;
+		$true = true;
+
+		if (!function_exists('memcache_pconnect')) {
+			if ($debug) ADOConnection::outp(" Memcache module PECL extension not found!<br>\n");
+			return $false;
+		}
+
+		$memcache = new Memcache;
+		if (!@$memcache->pconnect($host, $port)) {
+			if ($debug) ADOConnection::outp(" Can't connect to memcache server on: $host:$port<br>\n");
+			return $false;
+		}
+
+		$rs->timeCreated = time();
+		if (!$memcache->set($key, $rs, $compress, 0)) {
+			if ($debug) ADOConnection::outp(" Failed to save data at the memcached server!<br>\n");
+			return $false;
+		}
+		return $true;
+	}
+
+	function flushmemcache($key=false, $host, $port, $debug=false)
+	{
+		if (!function_exists('memcache_pconnect')) {
+			if ($debug) ADOConnection::outp(" Memcache module PECL extension not found!<br>\n");
+			return;
+		}
+
+		$memcache = new Memcache;
+		if (!@$memcache->pconnect($host, $port)) {
+			if ($debug) ADOConnection::outp(" Can't connect to memcache server on: $host:$port<br>\n");
+			return;
+		}
+
+		if ($key) {
+			if (!$memcache->delete($key)) {
+				if ($debug) ADOConnection::outp("CacheFlush: $key entery doesn't exist on memcached server!<br>\n");
+			} else {
+				if ($debug) ADOConnection::outp("CacheFlush: $key entery flushed from memcached server!<br>\n");
+			}
+		} else {
+			if (!$memcache->flush()) {
+				if ($debug) ADOConnection::outp("CacheFlush: Failure flushing all enteries from memcached server!<br>\n");
+			} else {
+				if ($debug) ADOConnection::outp("CacheFlush: All enteries flushed from memcached server!<br>\n");
+			}
+		}
+		return;
+	}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-pager.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-pager.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-pager.inc.php	(revision 225)
@@ -0,0 +1,290 @@
+<?php
+
+/*
+	V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+	  Released under both BSD license and Lesser GPL library license. 
+	  Whenever there is any discrepancy between the two licenses, 
+	  the BSD license will take precedence. 
+	  Set tabs to 4 for best viewing.
+
+  	This class provides recordset pagination with 
+	First/Prev/Next/Last links. 
+	
+	Feel free to modify this class for your own use as
+	it is very basic. To learn how to use it, see the 
+	example in adodb/tests/testpaging.php.
+	
+	"Pablo Costa" <pablo@cbsp.com.br> implemented Render_PageLinks().
+	
+	Please note, this class is entirely unsupported, 
+	and no free support requests except for bug reports
+	will be entertained by the author.
+
+*/
+class ADODB_Pager {
+	var $id; 	// unique id for pager (defaults to 'adodb')
+	var $db; 	// ADODB connection object
+	var $sql; 	// sql used
+	var $rs;	// recordset generated
+	var $curr_page;	// current page number before Render() called, calculated in constructor
+	var $rows;		// number of rows per page
+    var $linksPerPage=10; // number of links per page in navigation bar
+    var $showPageLinks; 
+
+	var $gridAttributes = 'width=100% border=1 bgcolor=white';
+	
+	// Localize text strings here
+	var $first = '<code>|&lt;</code>';
+	var $prev = '<code>&lt;&lt;</code>';
+	var $next = '<code>>></code>';
+	var $last = '<code>>|</code>';
+	var $moreLinks = '...';
+	var $startLinks = '...';
+	var $gridHeader = false;
+	var $htmlSpecialChars = true;
+	var $page = 'Page';
+	var $linkSelectedColor = 'red';
+	var $cache = 0;  #secs to cache with CachePageExecute()
+	
+	//----------------------------------------------
+	// constructor
+	//
+	// $db	adodb connection object
+	// $sql	sql statement
+	// $id	optional id to identify which pager, 
+	//		if you have multiple on 1 page. 
+	//		$id should be only be [a-z0-9]*
+	//
+	function ADODB_Pager(&$db,$sql,$id = 'adodb', $showPageLinks = false)
+	{
+	global $PHP_SELF;
+	
+		$curr_page = $id.'_curr_page';
+		if (empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks
+		
+		$this->sql = $sql;
+		$this->id = $id;
+		$this->db = $db;
+		$this->showPageLinks = $showPageLinks;
+		
+		$next_page = $id.'_next_page';	
+		
+		if (isset($_GET[$next_page])) {
+			$_SESSION[$curr_page] = (integer) $_GET[$next_page];
+		}
+		if (empty($_SESSION[$curr_page])) $_SESSION[$curr_page] = 1; ## at first page
+		
+		$this->curr_page = $_SESSION[$curr_page];
+		
+	}
+	
+	//---------------------------
+	// Display link to first page
+	function Render_First($anchor=true)
+	{
+	global $PHP_SELF;
+		if ($anchor) {
+	?>
+		<a href="<?php echo $PHP_SELF,'?',$this->id;?>_next_page=1"><?php echo $this->first;?></a> &nbsp; 
+	<?php
+		} else {
+			print "$this->first &nbsp; ";
+		}
+	}
+	
+	//--------------------------
+	// Display link to next page
+	function render_next($anchor=true)
+	{
+	global $PHP_SELF;
+	
+		if ($anchor) {
+		?>
+		<a href="<?php echo $PHP_SELF,'?',$this->id,'_next_page=',$this->rs->AbsolutePage() + 1 ?>"><?php echo $this->next;?></a> &nbsp; 
+		<?php
+		} else {
+			print "$this->next &nbsp; ";
+		}
+	}
+	
+	//------------------
+	// Link to last page
+	// 
+	// for better performance with large recordsets, you can set
+	// $this->db->pageExecuteCountRows = false, which disables
+	// last page counting.
+	function render_last($anchor=true)
+	{
+	global $PHP_SELF;
+	
+		if (!$this->db->pageExecuteCountRows) return;
+		
+		if ($anchor) {
+		?>
+			<a href="<?php echo $PHP_SELF,'?',$this->id,'_next_page=',$this->rs->LastPageNo() ?>"><?php echo $this->last;?></a> &nbsp; 
+		<?php
+		} else {
+			print "$this->last &nbsp; ";
+		}
+	}
+	
+	//---------------------------------------------------
+	// original code by "Pablo Costa" <pablo@cbsp.com.br> 
+        function render_pagelinks()
+        {
+        global $PHP_SELF;
+            $pages        = $this->rs->LastPageNo();
+            $linksperpage = $this->linksPerPage ? $this->linksPerPage : $pages;
+            for($i=1; $i <= $pages; $i+=$linksperpage)
+            {
+                if($this->rs->AbsolutePage() >= $i)
+                {
+                    $start = $i;
+                }
+            }
+			$numbers = '';
+            $end = $start+$linksperpage-1;
+			$link = $this->id . "_next_page";
+            if($end > $pages) $end = $pages;
+			
+			
+			if ($this->startLinks && $start > 1) {
+				$pos = $start - 1;
+				$numbers .= "<a href=$PHP_SELF?$link=$pos>$this->startLinks</a>  ";
+            } 
+			
+			for($i=$start; $i <= $end; $i++) {
+                if ($this->rs->AbsolutePage() == $i)
+                    $numbers .= "<font color=$this->linkSelectedColor><b>$i</b></font>  ";
+                else 
+                     $numbers .= "<a href=$PHP_SELF?$link=$i>$i</a>  ";
+            
+            }
+			if ($this->moreLinks && $end < $pages) 
+				$numbers .= "<a href=$PHP_SELF?$link=$i>$this->moreLinks</a>  ";
+            print $numbers . ' &nbsp; ';
+        }
+	// Link to previous page
+	function render_prev($anchor=true)
+	{
+	global $PHP_SELF;
+		if ($anchor) {
+	?>
+		<a href="<?php echo $PHP_SELF,'?',$this->id,'_next_page=',$this->rs->AbsolutePage() - 1 ?>"><?php echo $this->prev;?></a> &nbsp; 
+	<?php 
+		} else {
+			print "$this->prev &nbsp; ";
+		}
+	}
+	
+	//--------------------------------------------------------
+	// Simply rendering of grid. You should override this for
+	// better control over the format of the grid
+	//
+	// We use output buffering to keep code clean and readable.
+	function RenderGrid()
+	{
+	global $gSQLBlockRows; // used by rs2html to indicate how many rows to display
+		include_once(ADODB_DIR.'/tohtml.inc.php');
+		ob_start();
+		$gSQLBlockRows = $this->rows;
+		rs2html($this->rs,$this->gridAttributes,$this->gridHeader,$this->htmlSpecialChars);
+		$s = ob_get_contents();
+		ob_end_clean();
+		return $s;
+	}
+	
+	//-------------------------------------------------------
+	// Navigation bar
+	//
+	// we use output buffering to keep the code easy to read.
+	function RenderNav()
+	{
+		ob_start();
+		if (!$this->rs->AtFirstPage()) {
+			$this->Render_First();
+			$this->Render_Prev();
+		} else {
+			$this->Render_First(false);
+			$this->Render_Prev(false);
+		}
+        if ($this->showPageLinks){
+            $this->Render_PageLinks();
+        }
+		if (!$this->rs->AtLastPage()) {
+			$this->Render_Next();
+			$this->Render_Last();
+		} else {
+			$this->Render_Next(false);
+			$this->Render_Last(false);
+		}
+		$s = ob_get_contents();
+		ob_end_clean();
+		return $s;
+	}
+	
+	//-------------------
+	// This is the footer
+	function RenderPageCount()
+	{
+		if (!$this->db->pageExecuteCountRows) return '';
+		$lastPage = $this->rs->LastPageNo();
+		if ($lastPage == -1) $lastPage = 1; // check for empty rs.
+		if ($this->curr_page > $lastPage) $this->curr_page = 1;
+		return "<font size=-1>$this->page ".$this->curr_page."/".$lastPage."</font>";
+	}
+	
+	//-----------------------------------
+	// Call this class to draw everything.
+	function Render($rows=10)
+	{
+	global $ADODB_COUNTRECS;
+	
+		$this->rows = $rows;
+		
+		if ($this->db->dataProvider == 'informix') $this->db->cursorType = IFX_SCROLL;
+		
+		$savec = $ADODB_COUNTRECS;
+		if ($this->db->pageExecuteCountRows) $ADODB_COUNTRECS = true;
+		if ($this->cache)
+			$rs = &$this->db->CachePageExecute($this->cache,$this->sql,$rows,$this->curr_page);
+		else
+			$rs = &$this->db->PageExecute($this->sql,$rows,$this->curr_page);
+		$ADODB_COUNTRECS = $savec;
+		
+		$this->rs = &$rs;
+		if (!$rs) {
+			print "<h3>Query failed: $this->sql</h3>";
+			return;
+		}
+		
+		if (!$rs->EOF && (!$rs->AtFirstPage() || !$rs->AtLastPage())) 
+			$header = $this->RenderNav();
+		else
+			$header = "&nbsp;";
+		
+		$grid = $this->RenderGrid();
+		$footer = $this->RenderPageCount();
+		
+		$this->RenderLayout($header,$grid,$footer);
+		
+		$rs->Close();
+		$this->rs = false;
+	}
+	
+	//------------------------------------------------------
+	// override this to control overall layout and formating
+	function RenderLayout($header,$grid,$footer,$attributes='border=1 bgcolor=beige')
+	{
+		echo "<table ".$attributes."><tr><td>",
+				$header,
+			"</td></tr><tr><td>",
+				$grid,
+			"</td></tr><tr><td>",
+				$footer,
+			"</td></tr></table>";
+	}
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-pear.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-pear.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-pear.inc.php	(revision 225)
@@ -0,0 +1,374 @@
+<?php
+/** 
+ * @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * PEAR DB Emulation Layer for ADODB.
+ *
+ * The following code is modelled on PEAR DB code by Stig Bakken <ssb@fast.no>								   |
+ * and Tomas V.V.Cox <cox@idecnet.com>.	Portions (c)1997-2002 The PHP Group.
+ */
+
+ /*
+ We support:
+ 
+ DB_Common
+ ---------
+ 	query - returns PEAR_Error on error
+	limitQuery - return PEAR_Error on error
+	prepare - does not return PEAR_Error on error
+	execute - does not return PEAR_Error on error
+	setFetchMode - supports ASSOC and ORDERED
+	errorNative
+	quote
+	nextID
+	disconnect
+	
+	getOne
+	getAssoc
+	getRow
+	getCol
+	getAll
+	
+ DB_Result
+ ---------
+ 	numRows - returns -1 if not supported
+	numCols
+	fetchInto - does not support passing of fetchmode
+	fetchRows - does not support passing of fetchmode
+	free
+ */
+ 
+define('ADODB_PEAR',dirname(__FILE__));
+include_once "PEAR.php";
+include_once ADODB_PEAR."/adodb-errorpear.inc.php";
+include_once ADODB_PEAR."/adodb.inc.php";
+
+if (!defined('DB_OK')) {
+define("DB_OK",	1);
+define("DB_ERROR",-1);
+
+// autoExecute constants
+define('DB_AUTOQUERY_INSERT', 1);
+define('DB_AUTOQUERY_UPDATE', 2);
+
+/**
+ * This is a special constant that tells DB the user hasn't specified
+ * any particular get mode, so the default should be used.
+ */
+
+define('DB_FETCHMODE_DEFAULT', 0);
+
+/**
+ * Column data indexed by numbers, ordered from 0 and up
+ */
+
+define('DB_FETCHMODE_ORDERED', 1);
+
+/**
+ * Column data indexed by column names
+ */
+
+define('DB_FETCHMODE_ASSOC', 2);
+
+/* for compatibility */
+
+define('DB_GETMODE_ORDERED', DB_FETCHMODE_ORDERED);
+define('DB_GETMODE_ASSOC',   DB_FETCHMODE_ASSOC);
+
+/**
+ * these are constants for the tableInfo-function
+ * they are bitwised or'ed. so if there are more constants to be defined
+ * in the future, adjust DB_TABLEINFO_FULL accordingly
+ */
+
+define('DB_TABLEINFO_ORDER', 1);
+define('DB_TABLEINFO_ORDERTABLE', 2);
+define('DB_TABLEINFO_FULL', 3);
+}
+
+/**
+ * The main "DB" class is simply a container class with some static
+ * methods for creating DB objects as well as some utility functions
+ * common to all parts of DB.
+ *
+ */
+
+class DB
+{
+	/**
+	 * Create a new DB object for the specified database type
+	 *
+	 * @param $type string database type, for example "mysql"
+	 *
+	 * @return object a newly created DB object, or a DB error code on
+	 * error
+	 */
+
+	function &factory($type)
+	{
+		include_once(ADODB_DIR."/drivers/adodb-$type.inc.php");
+		$obj = &NewADOConnection($type);
+		if (!is_object($obj)) $obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);
+		return $obj;
+	}
+
+	/**
+	 * Create a new DB object and connect to the specified database
+	 *
+	 * @param $dsn mixed "data source name", see the DB::parseDSN
+	 * method for a description of the dsn format.  Can also be
+	 * specified as an array of the format returned by DB::parseDSN.
+	 *
+	 * @param $options mixed if boolean (or scalar), tells whether
+	 * this connection should be persistent (for backends that support
+	 * this).  This parameter can also be an array of options, see
+	 * DB_common::setOption for more information on connection
+	 * options.
+	 *
+	 * @return object a newly created DB connection object, or a DB
+	 * error object on error
+	 *
+	 * @see DB::parseDSN
+	 * @see DB::isError
+	 */
+	function &connect($dsn, $options = false)
+	{
+		if (is_array($dsn)) {
+			$dsninfo = $dsn;
+		} else {
+			$dsninfo = DB::parseDSN($dsn);
+		}
+		switch ($dsninfo["phptype"]) {
+			case 'pgsql': 	$type = 'postgres7'; break;
+			case 'ifx':		$type = 'informix9'; break;
+			default: 		$type = $dsninfo["phptype"]; break;
+		}
+
+		if (is_array($options) && isset($options["debug"]) &&
+			$options["debug"] >= 2) {
+			// expose php errors with sufficient debug level
+			 @include_once("adodb-$type.inc.php");
+		} else {
+			 @include_once("adodb-$type.inc.php");
+		}
+
+		@$obj =& NewADOConnection($type);
+		if (!is_object($obj)) {
+			$obj =& new PEAR_Error('Unknown Database Driver: '.$dsninfo['phptype'],-1);
+			return $obj;
+		}
+		if (is_array($options)) {
+			foreach($options as $k => $v) {
+				switch(strtolower($k)) {
+				case 'persist':
+				case 'persistent': 	$persist = $v; break;
+				#ibase
+				case 'dialect': 	$obj->dialect = $v; break;
+				case 'charset':		$obj->charset = $v; break;
+				case 'buffers':		$obj->buffers = $v; break;
+				#ado
+				case 'charpage':	$obj->charPage = $v; break;
+				#mysql
+				case 'clientflags': $obj->clientFlags = $v; break;
+				}
+			}
+		} else {
+		   	$persist = false;
+		}
+
+		if (isset($dsninfo['socket'])) $dsninfo['hostspec'] .= ':'.$dsninfo['socket'];
+		else if (isset($dsninfo['port'])) $dsninfo['hostspec'] .= ':'.$dsninfo['port'];
+		
+		if($persist) $ok = $obj->PConnect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']);
+		else  $ok = $obj->Connect($dsninfo['hostspec'], $dsninfo['username'],$dsninfo['password'],$dsninfo['database']);
+		
+		if (!$ok) $obj = ADODB_PEAR_Error();
+		return $obj;
+	}
+
+	/**
+	 * Return the DB API version
+	 *
+	 * @return int the DB API version number
+	 */
+	function apiVersion()
+	{
+		return 2;
+	}
+
+	/**
+	 * Tell whether a result code from a DB method is an error
+	 *
+	 * @param $value int result code
+	 *
+	 * @return bool whether $value is an error
+	 */
+	function isError($value)
+	{
+		if (!is_object($value)) return false;
+		$class = get_class($value);
+		return $class == 'pear_error' || is_subclass_of($value, 'pear_error') || 
+				$class == 'db_error' || is_subclass_of($value, 'db_error');
+	}
+
+
+	/**
+	 * Tell whether a result code from a DB method is a warning.
+	 * Warnings differ from errors in that they are generated by DB,
+	 * and are not fatal.
+	 *
+	 * @param $value mixed result value
+	 *
+	 * @return bool whether $value is a warning
+	 */
+	function isWarning($value)
+	{
+		return false;
+		/*
+		return is_object($value) &&
+			(get_class( $value ) == "db_warning" ||
+			 is_subclass_of($value, "db_warning"));*/
+	}
+
+	/**
+	 * Parse a data source name
+	 *
+	 * @param $dsn string Data Source Name to be parsed
+	 *
+	 * @return array an associative array with the following keys:
+	 *
+	 *  phptype: Database backend used in PHP (mysql, odbc etc.)
+	 *  dbsyntax: Database used with regards to SQL syntax etc.
+	 *  protocol: Communication protocol to use (tcp, unix etc.)
+	 *  hostspec: Host specification (hostname[:port])
+	 *  database: Database to use on the DBMS server
+	 *  username: User name for login
+	 *  password: Password for login
+	 *
+	 * The format of the supplied DSN is in its fullest form:
+	 *
+	 *  phptype(dbsyntax)://username:password@protocol+hostspec/database
+	 *
+	 * Most variations are allowed:
+	 *
+	 *  phptype://username:password@protocol+hostspec:110//usr/db_file.db
+	 *  phptype://username:password@hostspec/database_name
+	 *  phptype://username:password@hostspec
+	 *  phptype://username@hostspec
+	 *  phptype://hostspec/database
+	 *  phptype://hostspec
+	 *  phptype(dbsyntax)
+	 *  phptype
+	 *
+	 * @author Tomas V.V.Cox <cox@idecnet.com>
+	 */
+	function parseDSN($dsn)
+	{
+		if (is_array($dsn)) {
+			return $dsn;
+		}
+
+		$parsed = array(
+			'phptype'  => false,
+			'dbsyntax' => false,
+			'protocol' => false,
+			'hostspec' => false,
+			'database' => false,
+			'username' => false,
+			'password' => false
+		);
+
+		// Find phptype and dbsyntax
+		if (($pos = strpos($dsn, '://')) !== false) {
+			$str = substr($dsn, 0, $pos);
+			$dsn = substr($dsn, $pos + 3);
+		} else {
+			$str = $dsn;
+			$dsn = NULL;
+		}
+
+		// Get phptype and dbsyntax
+		// $str => phptype(dbsyntax)
+		if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) {
+			$parsed['phptype'] = $arr[1];
+			$parsed['dbsyntax'] = (empty($arr[2])) ? $arr[1] : $arr[2];
+		} else {
+			$parsed['phptype'] = $str;
+			$parsed['dbsyntax'] = $str;
+		}
+
+		if (empty($dsn)) {
+			return $parsed;
+		}
+
+		// Get (if found): username and password
+		// $dsn => username:password@protocol+hostspec/database
+		if (($at = strpos($dsn,'@')) !== false) {
+			$str = substr($dsn, 0, $at);
+			$dsn = substr($dsn, $at + 1);
+			if (($pos = strpos($str, ':')) !== false) {
+				$parsed['username'] = urldecode(substr($str, 0, $pos));
+				$parsed['password'] = urldecode(substr($str, $pos + 1));
+			} else {
+				$parsed['username'] = urldecode($str);
+			}
+		}
+
+		// Find protocol and hostspec
+		// $dsn => protocol+hostspec/database
+		if (($pos=strpos($dsn, '/')) !== false) {
+			$str = substr($dsn, 0, $pos);
+			$dsn = substr($dsn, $pos + 1);
+		} else {
+			$str = $dsn;
+			$dsn = NULL;
+		}
+
+		// Get protocol + hostspec
+		// $str => protocol+hostspec
+		if (($pos=strpos($str, '+')) !== false) {
+			$parsed['protocol'] = substr($str, 0, $pos);
+			$parsed['hostspec'] = urldecode(substr($str, $pos + 1));
+		} else {
+			$parsed['hostspec'] = urldecode($str);
+		}
+
+		// Get dabase if any
+		// $dsn => database
+		if (!empty($dsn)) {
+			$parsed['database'] = $dsn;
+		}
+
+		return $parsed;
+	}
+
+	/**
+	 * Load a PHP database extension if it is not loaded already.
+	 *
+	 * @access public
+	 *
+	 * @param $name the base name of the extension (without the .so or
+	 * .dll suffix)
+	 *
+	 * @return bool true if the extension was already or successfully
+	 * loaded, false if it could not be loaded
+	 */
+	function assertExtension($name)
+	{
+		if (!extension_loaded($name)) {
+			$dlext = (strncmp(PHP_OS,'WIN',3) === 0) ? '.dll' : '.so';
+			@dl($name . $dlext);
+		}
+		if (!extension_loaded($name)) {
+			return false;
+		}
+		return true;
+	}
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-perf.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-perf.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-perf.inc.php	(revision 225)
@@ -0,0 +1,1068 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning.
+  
+  My apologies if you see code mixed with presentation. The presentation suits
+  my needs. If you want to separate code from presentation, be my guest. Patches
+  are welcome.
+  
+*/
+
+if (!defined('ADODB_DIR')) include_once(dirname(__FILE__).'/adodb.inc.php');
+include_once(ADODB_DIR.'/tohtml.inc.php');
+
+define( 'ADODB_OPT_HIGH', 2);
+define( 'ADODB_OPT_LOW', 1);
+
+// returns in K the memory of current process, or 0 if not known
+function adodb_getmem()
+{
+	if (function_exists('memory_get_usage'))
+		return (integer) ((memory_get_usage()+512)/1024);
+	
+	$pid = getmypid();
+	
+	if ( strncmp(strtoupper(PHP_OS),'WIN',3)==0) {
+		$output = array();
+	
+		exec('tasklist /FI "PID eq ' . $pid. '" /FO LIST', $output); 
+		return substr($output[5], strpos($output[5], ':') + 1);
+	} 
+	
+	/* Hopefully UNIX */
+	exec("ps --pid $pid --no-headers -o%mem,size", $output);
+	if (sizeof($output) == 0) return 0;
+	
+	$memarr = explode(' ',$output[0]);
+	if (sizeof($memarr)>=2) return (integer) $memarr[1];
+	
+	return 0;
+}
+
+// avoids localization problems where , is used instead of .
+function adodb_round($n,$prec)
+{
+	return number_format($n, $prec, '.', '');
+}
+
+/* return microtime value as a float */
+function adodb_microtime()
+{
+	$t = microtime();
+	$t = explode(' ',$t);
+	return (float)$t[1]+ (float)$t[0];
+}
+
+/* sql code timing */
+function& adodb_log_sql(&$connx,$sql,$inputarr)
+{
+    $perf_table = adodb_perf::table();
+	$connx->fnExecute = false;
+	$t0 = microtime();
+	$rs =& $connx->Execute($sql,$inputarr);
+	$t1 = microtime();
+
+	if (!empty($connx->_logsql) && (empty($connx->_logsqlErrors) || !$rs)) {
+	global $ADODB_LOG_CONN;
+	
+		if (!empty($ADODB_LOG_CONN)) {
+			$conn = &$ADODB_LOG_CONN;
+			if ($conn->databaseType != $connx->databaseType)
+				$prefix = '/*dbx='.$connx->databaseType .'*/ ';
+			else
+				$prefix = '';
+		} else {
+			$conn =& $connx;
+			$prefix = '';
+		}
+		
+		$conn->_logsql = false; // disable logsql error simulation
+		$dbT = $conn->databaseType;
+		
+		$a0 = split(' ',$t0);
+		$a0 = (float)$a0[1]+(float)$a0[0];
+		
+		$a1 = split(' ',$t1);
+		$a1 = (float)$a1[1]+(float)$a1[0];
+		
+		$time = $a1 - $a0;
+	
+		if (!$rs) {
+			$errM = $connx->ErrorMsg();
+			$errN = $connx->ErrorNo();
+			$conn->lastInsID = 0;
+			$tracer = substr('ERROR: '.htmlspecialchars($errM),0,250);
+		} else {
+			$tracer = '';
+			$errM = '';
+			$errN = 0;
+			$dbg = $conn->debug;
+			$conn->debug = false;
+			if (!is_object($rs) || $rs->dataProvider == 'empty') 
+				$conn->_affected = $conn->affected_rows(true);
+			$conn->lastInsID = @$conn->Insert_ID();
+			$conn->debug = $dbg;
+		}
+		if (isset($_SERVER['HTTP_HOST'])) {
+			$tracer .= '<br>'.$_SERVER['HTTP_HOST'];
+			if (isset($_SERVER['PHP_SELF'])) $tracer .= $_SERVER['PHP_SELF'];
+		} else 
+			if (isset($_SERVER['PHP_SELF'])) $tracer .= '<br>'.$_SERVER['PHP_SELF'];
+		//$tracer .= (string) adodb_backtrace(false);
+		
+		$tracer = (string) substr($tracer,0,500);
+		
+		if (is_array($inputarr)) {
+			if (is_array(reset($inputarr))) $params = 'Array sizeof='.sizeof($inputarr);
+			else {
+				// Quote string parameters so we can see them in the
+				// performance stats. This helps spot disabled indexes.
+				$xar_params = $inputarr;
+				foreach ($xar_params as $xar_param_key => $xar_param) {
+					if (gettype($xar_param) == 'string')
+					$xar_params[$xar_param_key] = '"' . $xar_param . '"';
+				}
+				$params = implode(', ', $xar_params);
+				if (strlen($params) >= 3000) $params = substr($params, 0, 3000);
+			}
+		} else {
+			$params = '';
+		}
+		
+		if (is_array($sql)) $sql = $sql[0];
+		if ($prefix) $sql = $prefix.$sql;
+		$arr = array('b'=>strlen($sql).'.'.crc32($sql),
+					'c'=>substr($sql,0,3900), 'd'=>$params,'e'=>$tracer,'f'=>adodb_round($time,6));
+		//var_dump($arr);
+		$saved = $conn->debug;
+		$conn->debug = 0;
+		
+		$d = $conn->sysTimeStamp;
+		if (empty($d)) $d = date("'Y-m-d H:i:s'");
+		if ($conn->dataProvider == 'oci8' && $dbT != 'oci8po') {
+			$isql = "insert into $perf_table values($d,:b,:c,:d,:e,:f)";
+		} else if ($dbT == 'odbc_mssql' || $dbT == 'informix' || strncmp($dbT,'odbtp',4)==0) {
+			$timer = $arr['f'];
+			if ($dbT == 'informix') $sql2 = substr($sql2,0,230);
+
+			$sql1 = $conn->qstr($arr['b']);
+			$sql2 = $conn->qstr($arr['c']);
+			$params = $conn->qstr($arr['d']);
+			$tracer = $conn->qstr($arr['e']);
+			
+			$isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values($d,$sql1,$sql2,$params,$tracer,$timer)";
+			if ($dbT == 'informix') $isql = str_replace(chr(10),' ',$isql);
+			$arr = false;
+		} else {
+			if ($dbT == 'db2') $arr['f'] = (float) $arr['f'];
+			$isql = "insert into $perf_table (created,sql0,sql1,params,tracer,timer) values( $d,?,?,?,?,?)";
+		}
+		$ok = $conn->Execute($isql,$arr);
+		$conn->debug = $saved;
+		
+		if ($ok) {
+			$conn->_logsql = true; 
+		} else {
+			$err2 = $conn->ErrorMsg();
+			$conn->_logsql = true; // enable logsql error simulation
+			$perf =& NewPerfMonitor($conn);
+			if ($perf) {
+				if ($perf->CreateLogTable()) $ok = $conn->Execute($isql,$arr);
+			} else {
+				$ok = $conn->Execute("create table $perf_table (
+				created varchar(50),
+				sql0 varchar(250), 
+				sql1 varchar(4000),
+				params varchar(3000),
+				tracer varchar(500),
+				timer decimal(16,6))");
+			}
+			if (!$ok) {
+				ADOConnection::outp( "<p><b>LOGSQL Insert Failed</b>: $isql<br>$err2</p>");
+				$conn->_logsql = false;
+			}
+		}
+		$connx->_errorMsg = $errM;
+		$connx->_errorCode = $errN;
+	} 
+	$connx->fnExecute = 'adodb_log_sql';
+	return $rs;
+}
+
+	
+/*
+The settings data structure is an associative array that database parameter per element.
+
+Each database parameter element in the array is itself an array consisting of:
+
+0: category code, used to group related db parameters
+1: either
+	a. sql string to retrieve value, eg. "select value from v\$parameter where name='db_block_size'", 
+	b. array holding sql string and field to look for, e.g. array('show variables','table_cache'),
+	c. a string prefixed by =, then a PHP method of the class is invoked, 
+		e.g. to invoke $this->GetIndexValue(), set this array element to '=GetIndexValue',
+2: description of the database parameter
+*/
+
+class adodb_perf {
+	var $conn;
+	var $color = '#F0F0F0';
+	var $table = '<table border=1 bgcolor=white>';
+	var $titles = '<tr><td><b>Parameter</b></td><td><b>Value</b></td><td><b>Description</b></td></tr>';
+	var $warnRatio = 90;
+	var $tablesSQL = false;
+	var $cliFormat = "%32s => %s \r\n";
+	var $sql1 = 'sql1';  // used for casting sql1 to text for mssql
+	var $explain = true;
+	var $helpurl = "<a href=http://phplens.com/adodb/reference.functions.fnexecute.and.fncacheexecute.properties.html#logsql>LogSQL help</a>";
+	var $createTableSQL = false;
+	var $maxLength = 2000;
+	
+    // Sets the tablename to be used            
+    function table($newtable = false)
+    {
+        static $_table;
+
+        if (!empty($newtable))  $_table = $newtable;
+		if (empty($_table)) $_table = 'adodb_logsql';
+        return $_table;
+    }
+
+	// returns array with info to calculate CPU Load
+	function _CPULoad()
+	{
+/*
+
+cpu  524152 2662 2515228 336057010
+cpu0 264339 1408 1257951 168025827
+cpu1 259813 1254 1257277 168031181
+page 622307 25475680
+swap 24 1891
+intr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+disk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320)
+ctxt 66155838
+btime 1062315585
+processes 69293
+
+*/
+		// Algorithm is taken from
+		// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/example__obtaining_raw_performance_data.asp
+		if (strncmp(PHP_OS,'WIN',3)==0) {
+			if (PHP_VERSION == '5.0.0') return false;
+			if (PHP_VERSION == '5.0.1') return false;
+			if (PHP_VERSION == '5.0.2') return false;
+			if (PHP_VERSION == '5.0.3') return false;
+			if (PHP_VERSION == '4.3.10') return false; # see http://bugs.php.net/bug.php?id=31737
+			
+			@$c = new COM("WinMgmts:{impersonationLevel=impersonate}!Win32_PerfRawData_PerfOS_Processor.Name='_Total'");
+			if (!$c) return false;
+			
+			$info[0] = $c->PercentProcessorTime;
+			$info[1] = 0;
+			$info[2] = 0;
+			$info[3] = $c->TimeStamp_Sys100NS;
+			//print_r($info);
+			return $info;
+		}
+		
+		// Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com)
+		$statfile = '/proc/stat';
+		if (!file_exists($statfile)) return false;
+		
+		$fd = fopen($statfile,"r");
+		if (!$fd) return false;
+		
+		$statinfo = explode("\n",fgets($fd, 1024));
+		fclose($fd);
+		foreach($statinfo as $line) {
+			$info = explode(" ",$line);
+			if($info[0]=="cpu") {
+				array_shift($info);  // pop off "cpu"
+				if(!$info[0]) array_shift($info); // pop off blank space (if any)
+				return $info;
+			}
+		}
+		
+		return false;
+		
+	}
+	
+	/* NOT IMPLEMENTED */
+	function MemInfo()
+	{
+		/*
+
+        total:    used:    free:  shared: buffers:  cached:
+Mem:  1055289344 917299200 137990144        0 165437440 599773184
+Swap: 2146775040 11055104 2135719936
+MemTotal:      1030556 kB
+MemFree:        134756 kB
+MemShared:           0 kB
+Buffers:        161560 kB
+Cached:         581384 kB
+SwapCached:       4332 kB
+Active:         494468 kB
+Inact_dirty:    322856 kB
+Inact_clean:     24256 kB
+Inact_target:   168316 kB
+HighTotal:      131064 kB
+HighFree:         1024 kB
+LowTotal:       899492 kB
+LowFree:        133732 kB
+SwapTotal:     2096460 kB
+SwapFree:      2085664 kB
+Committed_AS:   348732 kB
+		*/
+	}
+	
+	
+	/*
+		Remember that this is client load, not db server load!
+	*/
+	var $_lastLoad;
+	function CPULoad()
+	{
+		$info = $this->_CPULoad();
+		if (!$info) return false;
+			
+		if (empty($this->_lastLoad)) {
+			sleep(1);
+			$this->_lastLoad = $info;
+			$info = $this->_CPULoad();
+		}
+		
+		$last = $this->_lastLoad;
+		$this->_lastLoad = $info;
+		
+		$d_user = $info[0] - $last[0];
+		$d_nice = $info[1] - $last[1];
+		$d_system = $info[2] - $last[2];
+		$d_idle = $info[3] - $last[3];
+		
+		//printf("Delta - User: %f  Nice: %f  System: %f  Idle: %f<br>",$d_user,$d_nice,$d_system,$d_idle);
+
+		if (strncmp(PHP_OS,'WIN',3)==0) {
+			if ($d_idle < 1) $d_idle = 1;
+			return 100*(1-$d_user/$d_idle);
+		}else {
+			$total=$d_user+$d_nice+$d_system+$d_idle;
+			if ($total<1) $total=1;
+			return 100*($d_user+$d_nice+$d_system)/$total; 
+		}
+	}
+	
+	function Tracer($sql)
+	{
+        $perf_table = adodb_perf::table();
+		$saveE = $this->conn->fnExecute;
+		$this->conn->fnExecute = false;
+		
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+				
+		$sqlq = $this->conn->qstr($sql);
+		$arr = $this->conn->GetArray(
+"select count(*),tracer 
+	from $perf_table where sql1=$sqlq 
+	group by tracer
+	order by 1 desc");
+		$s = '';
+		if ($arr) {
+			$s .= '<h3>Scripts Affected</h3>';
+			foreach($arr as $k) {
+				$s .= sprintf("%4d",$k[0]).' &nbsp; '.strip_tags($k[1]).'<br>';
+			}
+		}
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_CACHE_MODE = $save;
+		$this->conn->fnExecute = $saveE;
+		return $s;
+	}
+
+	/* 
+		Explain Plan for $sql.
+		If only a snippet of the $sql is passed in, then $partial will hold the crc32 of the 
+			actual sql.
+	*/
+	function Explain($sql,$partial=false)
+	{	
+		return false;
+	}
+	
+	function InvalidSQL($numsql = 10)
+	{
+	
+		if (isset($_GET['sql'])) return;
+		$s = '<h3>Invalid SQL</h3>';
+		$saveE = $this->conn->fnExecute;
+		$this->conn->fnExecute = false;
+        $perf_table = adodb_perf::table();
+		$rs =& $this->conn->SelectLimit("select distinct count(*),sql1,tracer as error_msg from $perf_table where tracer like 'ERROR:%' group by sql1,tracer order by 1 desc",$numsql);//,$numsql);
+		$this->conn->fnExecute = $saveE;
+		if ($rs) {
+			$s .= rs2html($rs,false,false,false,false);
+		} else
+			return "<p>$this->helpurl. ".$this->conn->ErrorMsg()."</p>";
+		
+		return $s;
+	}
+
+	
+	/*
+		This script identifies the longest running SQL
+	*/	
+	function _SuspiciousSQL($numsql = 10)
+	{
+		global $ADODB_FETCH_MODE;
+		
+            $perf_table = adodb_perf::table();
+			$saveE = $this->conn->fnExecute;
+			$this->conn->fnExecute = false;
+			
+			if (isset($_GET['exps']) && isset($_GET['sql'])) {
+				$partial = !empty($_GET['part']);
+				echo "<a name=explain></a>".$this->Explain($_GET['sql'],$partial)."\n";
+			}
+			
+			if (isset($_GET['sql'])) return;
+			$sql1 = $this->sql1;
+			
+			$save = $ADODB_FETCH_MODE;
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+			if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+			//$this->conn->debug=1;
+			$rs =& $this->conn->SelectLimit(
+			"select avg(timer) as avg_timer,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer
+				from $perf_table
+				where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT')
+				and (tracer is null or tracer not like 'ERROR:%')
+				group by sql1
+				order by 1 desc",$numsql);
+			if (isset($savem)) $this->conn->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			$this->conn->fnExecute = $saveE;
+			
+			if (!$rs) return "<p>$this->helpurl. ".$this->conn->ErrorMsg()."</p>";
+			$s = "<h3>Suspicious SQL</h3>
+<font size=1>The following SQL have high average execution times</font><br>
+<table border=1 bgcolor=white><tr><td><b>Avg Time</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\n";
+			$max = $this->maxLength;
+			while (!$rs->EOF) {
+				$sql = $rs->fields[1];
+				$raw = urlencode($sql);
+				if (strlen($raw)>$max-100) {
+					$sql2 = substr($sql,0,$max-500);
+					$raw = urlencode($sql2).'&part='.crc32($sql);
+				}
+				$prefix = "<a target=sql".rand()." href=\"?hidem=1&exps=1&sql=".$raw."&x#explain\">";
+				$suffix = "</a>";
+				if ($this->explain == false || strlen($prefix)>$max) {
+					$suffix = ' ... <i>String too long for GET parameter: '.strlen($prefix).'</i>';
+					$prefix = '';
+				}
+				$s .= "<tr><td>".adodb_round($rs->fields[0],6)."<td align=right>".$rs->fields[2]."<td><font size=-1>".$prefix.htmlspecialchars($sql).$suffix."</font>".
+					"<td>".$rs->fields[3]."<td>".$rs->fields[4]."</tr>";
+				$rs->MoveNext();
+			}
+			return $s."</table>";
+		
+	}
+	
+	function CheckMemory()
+	{
+		return '';
+	}
+	
+	
+	function SuspiciousSQL($numsql=10)
+	{
+		return adodb_perf::_SuspiciousSQL($numsql);
+	}
+
+	function ExpensiveSQL($numsql=10)
+	{
+		return adodb_perf::_ExpensiveSQL($numsql);
+	}
+
+	
+	/*
+		This reports the percentage of load on the instance due to the most 
+		expensive few SQL statements. Tuning these statements can often 
+		make huge improvements in overall system performance. 
+	*/
+	function _ExpensiveSQL($numsql = 10)
+	{
+		global $ADODB_FETCH_MODE;
+		
+            $perf_table = adodb_perf::table();
+			$saveE = $this->conn->fnExecute;
+			$this->conn->fnExecute = false;
+			
+			if (isset($_GET['expe']) && isset($_GET['sql'])) {
+				$partial = !empty($_GET['part']);
+				echo "<a name=explain></a>".$this->Explain($_GET['sql'],$partial)."\n";
+			}
+			
+			if (isset($_GET['sql'])) return;
+			
+			$sql1 = $this->sql1;
+			$save = $ADODB_FETCH_MODE;
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+			if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+			
+			$rs =& $this->conn->SelectLimit(
+			"select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer
+				from $perf_table
+				where {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5))  not in ('DROP ','INSER','COMMI','CREAT')
+				and (tracer is null or tracer not like 'ERROR:%')
+				group by sql1
+				having count(*)>1
+				order by 1 desc",$numsql);
+			if (isset($savem)) $this->conn->SetFetchMode($savem);
+			$this->conn->fnExecute = $saveE;
+			$ADODB_FETCH_MODE = $save;
+			if (!$rs) return "<p>$this->helpurl. ".$this->conn->ErrorMsg()."</p>";
+			$s = "<h3>Expensive SQL</h3>
+<font size=1>Tuning the following SQL could reduce the server load substantially</font><br>
+<table border=1 bgcolor=white><tr><td><b>Load</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\n";
+			$max = $this->maxLength;
+			while (!$rs->EOF) {
+				$sql = $rs->fields[1];
+				$raw = urlencode($sql);
+				if (strlen($raw)>$max-100) {
+					$sql2 = substr($sql,0,$max-500);
+					$raw = urlencode($sql2).'&part='.crc32($sql);
+				}
+				$prefix = "<a target=sqle".rand()." href=\"?hidem=1&expe=1&sql=".$raw."&x#explain\">";
+				$suffix = "</a>";
+				if($this->explain == false || strlen($prefix>$max)) {
+					$prefix = '';
+					$suffix = '';
+				}
+				$s .= "<tr><td>".adodb_round($rs->fields[0],6)."<td align=right>".$rs->fields[2]."<td><font size=-1>".$prefix.htmlspecialchars($sql).$suffix."</font>".
+					"<td>".$rs->fields[3]."<td>".$rs->fields[4]."</tr>";
+				$rs->MoveNext();
+			}
+			return $s."</table>";
+	}
+	
+	/*
+		Raw function to return parameter value from $settings.
+	*/
+	function DBParameter($param)
+	{
+		if (empty($this->settings[$param])) return false;
+		$sql = $this->settings[$param][1];
+		return $this->_DBParameter($sql);
+	}
+	
+	/*
+		Raw function returning array of poll paramters
+	*/
+	function &PollParameters()
+	{
+		$arr[0] = (float)$this->DBParameter('data cache hit ratio');
+		$arr[1] = (float)$this->DBParameter('data reads');
+		$arr[2] = (float)$this->DBParameter('data writes');
+		$arr[3] = (integer) $this->DBParameter('current connections');
+		return $arr;
+	}
+	
+	/*
+		Low-level Get Database Parameter
+	*/
+	function _DBParameter($sql)
+	{
+		$savelog = $this->conn->LogSQL(false);
+		if (is_array($sql)) {
+		global $ADODB_FETCH_MODE;
+		
+			$sql1 = $sql[0];
+			$key = $sql[1];
+			if (sizeof($sql)>2) $pos = $sql[2];
+			else $pos = 1;
+			if (sizeof($sql)>3) $coef = $sql[3];
+			else $coef = false;
+			$ret = false;
+			$save = $ADODB_FETCH_MODE;
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+			if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+			
+			$rs = $this->conn->Execute($sql1);
+			
+			if (isset($savem)) $this->conn->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			if ($rs) {
+				while (!$rs->EOF) {
+					$keyf = reset($rs->fields);
+					if (trim($keyf) == $key) {
+						$ret = $rs->fields[$pos];
+						if ($coef) $ret *= $coef;
+						break;
+					}
+					$rs->MoveNext();
+				}
+				$rs->Close();
+			}
+			$this->conn->LogSQL($savelog);
+			return $ret;
+		} else {
+			if (strncmp($sql,'=',1) == 0) {
+				$fn = substr($sql,1);
+				return $this->$fn();
+			}
+			$sql = str_replace('$DATABASE',$this->conn->database,$sql);
+			$ret = $this->conn->GetOne($sql);
+			$this->conn->LogSQL($savelog);
+			
+			return $ret;
+		}
+	}
+	
+	/*
+		Warn if cache ratio falls below threshold. Displayed in "Description" column.
+	*/
+	function WarnCacheRatio($val)
+	{
+		if ($val < $this->warnRatio) 
+			 return '<font color=red><b>Cache ratio should be at least '.$this->warnRatio.'%</b></font>';
+		else return '';
+	}
+	
+	/***********************************************************************************************/
+	//                                    HIGH LEVEL UI FUNCTIONS
+	/***********************************************************************************************/
+
+	
+	function UI($pollsecs=5)
+	{
+	
+    $perf_table = adodb_perf::table();
+	$conn = $this->conn;
+	
+	$app = $conn->host;
+	if ($conn->host && $conn->database) $app .= ', db=';
+	$app .= $conn->database;
+	
+	if ($app) $app .= ', ';
+	$savelog = $this->conn->LogSQL(false);	
+	$info = $conn->ServerInfo();
+	if (isset($_GET['clearsql'])) {
+		$this->conn->Execute("delete from $perf_table");
+	}
+	$this->conn->LogSQL($savelog);
+	
+	// magic quotes
+	
+	if (isset($_GET['sql']) && get_magic_quotes_gpc()) {
+		$_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']);
+	}
+	
+	if (!isset($_SESSION['ADODB_PERF_SQL'])) $nsql = $_SESSION['ADODB_PERF_SQL'] = 10;
+	else  $nsql = $_SESSION['ADODB_PERF_SQL'];
+	
+	$app .= $info['description'];
+	
+	
+	if (isset($_GET['do'])) $do = $_GET['do'];
+	else if (isset($_POST['do'])) $do = $_POST['do'];
+	 else if (isset($_GET['sql'])) $do = 'viewsql';
+	 else $do = 'stats';
+	 
+	if (isset($_GET['nsql'])) {
+		if ($_GET['nsql'] > 0) $nsql = $_SESSION['ADODB_PERF_SQL'] = (integer) $_GET['nsql'];
+	}
+	echo "<title>ADOdb Performance Monitor on $app</title><body bgcolor=white>";
+	if ($do == 'viewsql') $form = "<td><form># SQL:<input type=hidden value=viewsql name=do> <input type=text size=4 name=nsql value=$nsql><input type=submit value=Go></td></form>";
+	else $form = "<td>&nbsp;</td>";
+	
+	$allowsql = !defined('ADODB_PERF_NO_RUN_SQL');
+	
+	if  (empty($_GET['hidem']))
+	echo "<table border=1 width=100% bgcolor=lightyellow><tr><td colspan=2>
+	<b><a href=http://adodb.sourceforge.net/?perf=1>ADOdb</a> Performance Monitor</b> <font size=1>for $app</font></tr><tr><td>
+	<a href=?do=stats><b>Performance Stats</b></a> &nbsp; <a href=?do=viewsql><b>View SQL</b></a>
+	 &nbsp; <a href=?do=tables><b>View Tables</b></a> &nbsp; <a href=?do=poll><b>Poll Stats</b></a>",
+	 $allowsql ? ' &nbsp; <a href=?do=dosql><b>Run SQL</b></a>' : '',
+	 "$form",
+	 "</tr></table>";
+
+	 
+	 	switch ($do) {
+		default:
+		case 'stats':
+			echo $this->HealthCheck();
+			//$this->conn->debug=1;
+			echo $this->CheckMemory();
+			break;
+		case 'poll':
+			echo "<iframe width=720 height=80% 
+				src=\"{$_SERVER['PHP_SELF']}?do=poll2&hidem=1\"></iframe>";
+			break;
+		case 'poll2':
+			echo "<pre>";
+			$this->Poll($pollsecs);
+			break;
+		
+		case 'dosql':
+			if (!$allowsql) break;
+			
+			$this->DoSQLForm();
+			break;
+		case 'viewsql':
+			if (empty($_GET['hidem']))
+				echo "&nbsp; <a href=\"?do=viewsql&clearsql=1\">Clear SQL Log</a><br>";
+			echo($this->SuspiciousSQL($nsql));
+			echo($this->ExpensiveSQL($nsql));
+			echo($this->InvalidSQL($nsql));
+			break;
+		case 'tables': 
+			echo $this->Tables(); break;
+		}
+		global $ADODB_vers;
+		echo "<p><div align=center><font size=1>$ADODB_vers Sponsored by <a href=http://phplens.com/>phpLens</a></font></div>";
+	}
+	
+	/*
+		Runs in infinite loop, returning real-time statistics
+	*/
+	function Poll($secs=5)
+	{
+		$this->conn->fnExecute = false;
+		//$this->conn->debug=1;
+		if ($secs <= 1) $secs = 1;
+		echo "Accumulating statistics, every $secs seconds...\n";flush();
+		$arro =& $this->PollParameters();
+		$cnt = 0;
+		set_time_limit(0);
+		sleep($secs);
+		while (1) {
+
+			$arr =& $this->PollParameters();
+			
+			$hits   = sprintf('%2.2f',$arr[0]);
+			$reads  = sprintf('%12.4f',($arr[1]-$arro[1])/$secs);
+			$writes = sprintf('%12.4f',($arr[2]-$arro[2])/$secs);
+			$sess = sprintf('%5d',$arr[3]);
+			
+			$load = $this->CPULoad();
+			if ($load !== false) {
+				$oslabel = 'WS-CPU%';
+				$osval = sprintf(" %2.1f  ",(float) $load);
+			}else {
+				$oslabel = '';
+				$osval = '';
+			}
+			if ($cnt % 10 == 0) echo " Time   ".$oslabel."   Hit%   Sess           Reads/s          Writes/s\n"; 
+			$cnt += 1;
+			echo date('H:i:s').'  '.$osval."$hits  $sess $reads $writes\n";
+			flush();
+			
+			if (connection_aborted()) return;
+			
+			sleep($secs);
+			$arro = $arr;
+		}
+	}
+	
+	/*
+		Returns basic health check in a command line interface
+	*/
+	function HealthCheckCLI()
+	{
+		return $this->HealthCheck(true);
+	}
+	
+		
+	/*
+		Returns basic health check as HTML
+	*/
+	function HealthCheck($cli=false)
+	{
+		$saveE = $this->conn->fnExecute;
+		$this->conn->fnExecute = false;	
+		if ($cli) $html = '';
+		else $html = $this->table.'<tr><td colspan=3><h3>'.$this->conn->databaseType.'</h3></td></tr>'.$this->titles;
+		
+		$oldc = false;
+		$bgc = '';
+		foreach($this->settings as $name => $arr) {
+			if ($arr === false) break;
+			
+			if (!is_string($name)) {
+				if ($cli) $html .= " -- $arr -- \n";
+				else $html .= "<tr bgcolor=$this->color><td colspan=3><i>$arr</i> &nbsp;</td></tr>";
+				continue;
+			}
+			
+			if (!is_array($arr)) break;
+			$category = $arr[0];
+			$how = $arr[1];
+			if (sizeof($arr)>2) $desc = $arr[2];
+			else $desc = ' &nbsp; ';
+			
+			
+			if ($category == 'HIDE') continue;
+			
+			$val = $this->_DBParameter($how);
+			
+			if ($desc && strncmp($desc,"=",1) === 0) {
+				$fn = substr($desc,1);
+				$desc = $this->$fn($val);
+			}
+			
+			if ($val === false) {
+				$m = $this->conn->ErrorMsg();
+				$val = "Error: $m"; 
+			} else {
+				if (is_numeric($val) && $val >= 256*1024) {
+					if ($val % (1024*1024) == 0) {
+						$val /= (1024*1024);
+						$val .= 'M';
+					} else if ($val % 1024 == 0) {
+						$val /= 1024;
+						$val .= 'K';
+					}
+					//$val = htmlspecialchars($val);
+				}
+			}
+			if ($category != $oldc) {
+				$oldc = $category;
+				//$bgc = ($bgc == ' bgcolor='.$this->color) ? ' bgcolor=white' : ' bgcolor='.$this->color;
+			}
+			if (strlen($desc)==0) $desc = '&nbsp;';
+			if (strlen($val)==0) $val = '&nbsp;';
+			if ($cli) {
+				$html  .= str_replace('&nbsp;','',sprintf($this->cliFormat,strip_tags($name),strip_tags($val),strip_tags($desc)));
+				
+			}else {
+				$html .= "<tr$bgc><td>".$name.'</td><td>'.$val.'</td><td>'.$desc."</td></tr>\n";
+			}
+		}
+		
+		if (!$cli) $html .= "</table>\n";
+		$this->conn->fnExecute = $saveE;
+			
+		return $html;	
+	}
+	
+	function Tables($orderby='1')
+	{
+		if (!$this->tablesSQL) return false;
+		
+		$savelog = $this->conn->LogSQL(false);
+		$rs = $this->conn->Execute($this->tablesSQL.' order by '.$orderby);
+		$this->conn->LogSQL($savelog);
+		$html = rs2html($rs,false,false,false,false);
+		return $html;
+	}
+	
+
+	function CreateLogTable()
+	{
+		if (!$this->createTableSQL) return false;
+		
+		$table = $this->table();
+		$sql = str_replace('adodb_logsql',$table,$this->createTableSQL);
+		$savelog = $this->conn->LogSQL(false);
+		$ok = $this->conn->Execute($sql);
+		$this->conn->LogSQL($savelog);
+		return ($ok) ? true : false;
+	}
+	
+	function DoSQLForm()
+	{
+	
+		
+		$PHP_SELF = $_SERVER['PHP_SELF'];
+		$sql = isset($_REQUEST['sql']) ? $_REQUEST['sql'] : '';
+
+		if (isset($_SESSION['phplens_sqlrows'])) $rows = $_SESSION['phplens_sqlrows'];
+		else $rows = 3;
+		
+		if (isset($_REQUEST['SMALLER'])) {
+			$rows /= 2;
+			if ($rows < 3) $rows = 3;
+			$_SESSION['phplens_sqlrows'] = $rows;
+		}
+		if (isset($_REQUEST['BIGGER'])) {
+			$rows *= 2;
+			$_SESSION['phplens_sqlrows'] = $rows;
+		}
+		
+?>
+
+<form method="POST" action="<?php echo $PHP_SELF ?>">
+<table><tr>
+<td> Form size: <input type="submit" value=" &lt; " name="SMALLER"><input type="submit" value=" &gt; &gt; " name="BIGGER">
+</td>
+<td align=right>
+<input type="submit" value=" Run SQL Below " name="RUN"><input type=hidden name=do value=dosql>
+</td></tr>
+  <tr>
+  <td colspan=2><textarea rows=<?php print $rows; ?> name="sql" cols="80"><?php print htmlspecialchars($sql) ?></textarea>
+  </td>
+  </tr>
+ </table>
+</form>
+
+<?php
+		if (!isset($_REQUEST['sql'])) return;
+		
+		$sql = $this->undomq(trim($sql));
+		if (substr($sql,strlen($sql)-1) === ';') {
+			$print = true;
+			$sqla = $this->SplitSQL($sql);
+		} else  {
+			$print = false;
+			$sqla = array($sql);
+		}
+		foreach($sqla as $sqls) {
+
+			if (!$sqls) continue;
+			
+			if ($print) {
+				print "<p>".htmlspecialchars($sqls)."</p>";
+				flush();
+			}
+			$savelog = $this->conn->LogSQL(false);
+			$rs = $this->conn->Execute($sqls);
+			$this->conn->LogSQL($savelog);
+			if ($rs && is_object($rs) && !$rs->EOF) {
+				rs2html($rs);
+				while ($rs->NextRecordSet()) {
+					print "<table width=98% bgcolor=#C0C0FF><tr><td>&nbsp;</td></tr></table>";
+					rs2html($rs);
+				}
+			} else {
+				$e1 = (integer) $this->conn->ErrorNo();
+				$e2 = $this->conn->ErrorMsg();
+				if (($e1) || ($e2)) {
+					if (empty($e1)) $e1 = '-1'; // postgresql fix
+					print ' &nbsp; '.$e1.': '.$e2;
+				} else {
+					print "<p>No Recordset returned<br></p>";
+				}
+			}
+		} // foreach
+	}
+	
+	function SplitSQL($sql)
+	{
+		$arr = explode(';',$sql);
+		return $arr;
+	}
+	
+	function undomq($m) 
+	{
+	if (get_magic_quotes_gpc()) {
+		// undo the damage
+		$m = str_replace('\\\\','\\',$m);
+		$m = str_replace('\"','"',$m);
+		$m = str_replace('\\\'','\'',$m);
+	}
+	return $m;
+}
+
+    
+   /************************************************************************/
+   
+    /** 
+     * Reorganise multiple table-indices/statistics/..
+     * OptimizeMode could be given by last Parameter
+     * 
+     * @example
+     *      <pre>
+     *          optimizeTables( 'tableA');
+     *      </pre>
+     *      <pre>
+     *          optimizeTables( 'tableA', 'tableB', 'tableC');
+     *      </pre>
+     *      <pre>
+     *          optimizeTables( 'tableA', 'tableB', ADODB_OPT_LOW);
+     *      </pre>
+     * 
+     * @param string table name of the table to optimize
+     * @param int mode optimization-mode
+     *      <code>ADODB_OPT_HIGH</code> for full optimization 
+     *      <code>ADODB_OPT_LOW</code> for CPU-less optimization
+     *      Default is LOW <code>ADODB_OPT_LOW</code> 
+     * @author Markus Staab
+     * @return Returns <code>true</code> on success and <code>false</code> on error
+     */
+    function OptimizeTables()
+    {
+        $args = func_get_args();
+        $numArgs = func_num_args();
+        
+        if ( $numArgs == 0) return false;
+        
+        $mode = ADODB_OPT_LOW; 
+        $lastArg = $args[ $numArgs - 1];
+        if ( !is_string($lastArg)) {
+            $mode = $lastArg;
+            unset( $args[ $numArgs - 1]);
+        }
+        
+        foreach( $args as $table) {
+            $this->optimizeTable( $table, $mode);
+        }
+	}
+
+    /** 
+     * Reorganise the table-indices/statistics/.. depending on the given mode.
+     * Default Implementation throws an error.
+     * 
+     * @param string table name of the table to optimize
+     * @param int mode optimization-mode
+     *      <code>ADODB_OPT_HIGH</code> for full optimization 
+     *      <code>ADODB_OPT_LOW</code> for CPU-less optimization
+     *      Default is LOW <code>ADODB_OPT_LOW</code> 
+     * @author Markus Staab
+     * @return Returns <code>true</code> on success and <code>false</code> on error
+     */
+    function OptimizeTable( $table, $mode = ADODB_OPT_LOW) 
+    {
+        ADOConnection::outp( sprintf( "<p>%s: '%s' not implemented for driver '%s'</p>", __CLASS__, __FUNCTION__, $this->conn->databaseType));
+        return false;
+    }
+    
+    /** 
+     * Reorganise current database.
+     * Default implementation loops over all <code>MetaTables()</code> and 
+     * optimize each using <code>optmizeTable()</code>
+     * 
+     * @author Markus Staab
+     * @return Returns <code>true</code> on success and <code>false</code> on error
+     */
+    function optimizeDatabase() 
+    {
+        $conn = $this->conn;
+        if ( !$conn) return false;
+        
+        $tables = $conn->MetaTables( 'TABLES');
+        if ( !$tables ) return false;
+
+        foreach( $tables as $table) {
+            if ( !$this->optimizeTable( $table)) {
+                return false;
+            }
+        }
+      
+        return true;
+    }
+    // end hack 
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-php4.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-php4.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-php4.inc.php	(revision 225)
@@ -0,0 +1,16 @@
+<?php
+
+/*
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  
+  Set tabs to 4.
+*/
+
+
+class ADODB_BASE_RS {
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-time.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-time.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-time.inc.php	(revision 225)
@@ -0,0 +1,1337 @@
+<?php
+/**
+ADOdb Date Library, part of the ADOdb abstraction library
+Download: http://phplens.com/phpeverywhere/
+
+PHP native date functions use integer timestamps for computations.
+Because of this, dates are restricted to the years 1901-2038 on Unix 
+and 1970-2038 on Windows due to integer overflow for dates beyond 
+those years. This library overcomes these limitations by replacing the 
+native function's signed integers (normally 32-bits) with PHP floating 
+point numbers (normally 64-bits).
+
+Dates from 100 A.D. to 3000 A.D. and later
+have been tested. The minimum is 100 A.D. as <100 will invoke the
+2 => 4 digit year conversion. The maximum is billions of years in the 
+future, but this is a theoretical limit as the computation of that year 
+would take too long with the current implementation of adodb_mktime().
+
+This library replaces native functions as follows:
+
+<pre>	
+	getdate()  with  adodb_getdate()
+	date()     with  adodb_date() 
+	gmdate()   with  adodb_gmdate()
+	mktime()   with  adodb_mktime()
+	gmmktime() with  adodb_gmmktime()
+	strftime() with  adodb_strftime()
+	strftime() with  adodb_gmstrftime()
+</pre>
+	
+The parameters are identical, except that adodb_date() accepts a subset
+of date()'s field formats. Mktime() will convert from local time to GMT, 
+and date() will convert from GMT to local time, but daylight savings is 
+not handled currently.
+
+This library is independant of the rest of ADOdb, and can be used
+as standalone code.
+
+PERFORMANCE
+
+For high speed, this library uses the native date functions where
+possible, and only switches to PHP code when the dates fall outside 
+the 32-bit signed integer range.
+
+GREGORIAN CORRECTION
+
+Pope Gregory shortened October of A.D. 1582 by ten days. Thursday, 
+October 4, 1582 (Julian) was followed immediately by Friday, October 15, 
+1582 (Gregorian). 
+
+Since 0.06, we handle this correctly, so:
+
+adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582) 
+	== 24 * 3600 (1 day)
+
+=============================================================================
+
+COPYRIGHT
+
+(c) 2003-2005 John Lim and released under BSD-style license except for code by 
+jackbbs, which includes adodb_mktime, adodb_get_gmt_diff, adodb_is_leap_year
+and originally found at http://www.php.net/manual/en/function.mktime.php
+
+=============================================================================
+
+BUG REPORTS
+
+These should be posted to the ADOdb forums at
+
+	http://phplens.com/lens/lensforum/topics.php?id=4
+
+=============================================================================
+
+FUNCTION DESCRIPTIONS
+
+
+** FUNCTION adodb_getdate($date=false)
+
+Returns an array containing date information, as getdate(), but supports
+dates greater than 1901 to 2038. The local date/time format is derived from a 
+heuristic the first time adodb_getdate is called. 
+	 
+	 
+** FUNCTION adodb_date($fmt, $timestamp = false)
+
+Convert a timestamp to a formatted local date. If $timestamp is not defined, the
+current timestamp is used. Unlike the function date(), it supports dates
+outside the 1901 to 2038 range.
+
+The format fields that adodb_date supports:
+
+<pre>
+	a - "am" or "pm" 
+	A - "AM" or "PM" 
+	d - day of the month, 2 digits with leading zeros; i.e. "01" to "31" 
+	D - day of the week, textual, 3 letters; e.g. "Fri" 
+	F - month, textual, long; e.g. "January" 
+	g - hour, 12-hour format without leading zeros; i.e. "1" to "12" 
+	G - hour, 24-hour format without leading zeros; i.e. "0" to "23" 
+	h - hour, 12-hour format; i.e. "01" to "12" 
+	H - hour, 24-hour format; i.e. "00" to "23" 
+	i - minutes; i.e. "00" to "59" 
+	j - day of the month without leading zeros; i.e. "1" to "31" 
+	l (lowercase 'L') - day of the week, textual, long; e.g. "Friday"  
+	L - boolean for whether it is a leap year; i.e. "0" or "1" 
+	m - month; i.e. "01" to "12" 
+	M - month, textual, 3 letters; e.g. "Jan" 
+	n - month without leading zeros; i.e. "1" to "12" 
+	O - Difference to Greenwich time in hours; e.g. "+0200" 
+	Q - Quarter, as in 1, 2, 3, 4 
+	r - RFC 2822 formatted date; e.g. "Thu, 21 Dec 2000 16:01:07 +0200" 
+	s - seconds; i.e. "00" to "59" 
+	S - English ordinal suffix for the day of the month, 2 characters; 
+	   			i.e. "st", "nd", "rd" or "th" 
+	t - number of days in the given month; i.e. "28" to "31"
+	T - Timezone setting of this machine; e.g. "EST" or "MDT" 
+	U - seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)  
+	w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday) 
+	Y - year, 4 digits; e.g. "1999" 
+	y - year, 2 digits; e.g. "99" 
+	z - day of the year; i.e. "0" to "365" 
+	Z - timezone offset in seconds (i.e. "-43200" to "43200"). 
+	   			The offset for timezones west of UTC is always negative, 
+				and for those east of UTC is always positive. 
+</pre>
+
+Unsupported:
+<pre>
+	B - Swatch Internet time 
+	I (capital i) - "1" if Daylight Savings Time, "0" otherwise.
+	W - ISO-8601 week number of year, weeks starting on Monday 
+
+</pre>
+
+
+** FUNCTION adodb_date2($fmt, $isoDateString = false)
+Same as adodb_date, but 2nd parameter accepts iso date, eg.
+
+  adodb_date2('d-M-Y H:i','2003-12-25 13:01:34');
+
+  
+** FUNCTION adodb_gmdate($fmt, $timestamp = false)
+
+Convert a timestamp to a formatted GMT date. If $timestamp is not defined, the
+current timestamp is used. Unlike the function date(), it supports dates
+outside the 1901 to 2038 range.
+
+
+** FUNCTION adodb_mktime($hr, $min, $sec[, $month, $day, $year])
+
+Converts a local date to a unix timestamp.  Unlike the function mktime(), it supports
+dates outside the 1901 to 2038 range. All parameters are optional.
+
+
+** FUNCTION adodb_gmmktime($hr, $min, $sec [, $month, $day, $year])
+
+Converts a gmt date to a unix timestamp.  Unlike the function gmmktime(), it supports
+dates outside the 1901 to 2038 range. Differs from gmmktime() in that all parameters
+are currently compulsory.
+
+** FUNCTION adodb_gmstrftime($fmt, $timestamp = false)
+Convert a timestamp to a formatted GMT date.
+
+** FUNCTION adodb_strftime($fmt, $timestamp = false)
+
+Convert a timestamp to a formatted local date. Internally converts $fmt into 
+adodb_date format, then echo result.
+
+For best results, you can define the local date format yourself. Define a global
+variable $ADODB_DATE_LOCALE which is an array, 1st element is date format using
+adodb_date syntax, and 2nd element is the time format, also in adodb_date syntax.
+
+    eg. $ADODB_DATE_LOCALE = array('d/m/Y','H:i:s');
+	
+	Supported format codes:
+
+<pre>
+	%a - abbreviated weekday name according to the current locale 
+	%A - full weekday name according to the current locale 
+	%b - abbreviated month name according to the current locale 
+	%B - full month name according to the current locale 
+	%c - preferred date and time representation for the current locale 
+	%d - day of the month as a decimal number (range 01 to 31) 
+	%D - same as %m/%d/%y 
+	%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31') 
+	%h - same as %b
+	%H - hour as a decimal number using a 24-hour clock (range 00 to 23) 
+	%I - hour as a decimal number using a 12-hour clock (range 01 to 12) 
+	%m - month as a decimal number (range 01 to 12) 
+	%M - minute as a decimal number 
+	%n - newline character 
+	%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale 
+	%r - time in a.m. and p.m. notation 
+	%R - time in 24 hour notation 
+	%S - second as a decimal number 
+	%t - tab character 
+	%T - current time, equal to %H:%M:%S 
+	%x - preferred date representation for the current locale without the time 
+	%X - preferred time representation for the current locale without the date 
+	%y - year as a decimal number without a century (range 00 to 99) 
+	%Y - year as a decimal number including the century 
+	%Z - time zone or name or abbreviation 
+	%% - a literal `%' character 
+</pre>	
+
+	Unsupported codes:
+<pre>
+	%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99) 
+	%g - like %G, but without the century. 
+	%G - The 4-digit year corresponding to the ISO week number (see %V). 
+	     This has the same format and value as %Y, except that if the ISO week number belongs 
+		 to the previous or next year, that year is used instead. 
+	%j - day of the year as a decimal number (range 001 to 366) 
+	%u - weekday as a decimal number [1,7], with 1 representing Monday 
+	%U - week number of the current year as a decimal number, starting 
+	    with the first Sunday as the first day of the first week 
+	%V - The ISO 8601:1988 week number of the current year as a decimal number, 
+	     range 01 to 53, where week 1 is the first week that has at least 4 days in the 
+		 current year, and with Monday as the first day of the week. (Use %G or %g for 
+		 the year component that corresponds to the week number for the specified timestamp.) 
+	%w - day of the week as a decimal, Sunday being 0 
+	%W - week number of the current year as a decimal number, starting with the 
+	     first Monday as the first day of the first week 
+</pre>
+
+=============================================================================
+
+NOTES
+
+Useful url for generating test timestamps:
+	http://www.4webhelp.net/us/timestamp.php
+
+Possible future optimizations include 
+
+a. Using an algorithm similar to Plauger's in "The Standard C Library" 
+(page 428, xttotm.c _Ttotm() function). Plauger's algorithm will not 
+work outside 32-bit signed range, so i decided not to implement it.
+
+b. Implement daylight savings, which looks awfully complicated, see
+	http://webexhibits.org/daylightsaving/
+
+
+CHANGELOG
+- 19 March 2006 0.24
+Changed strftime() locale detection, because some locales prepend the day of week to the date when %c is used.
+
+- 10 Feb 2006 0.23
+PHP5 compat: when we detect PHP5, the RFC2822 format for gmt 0000hrs is changed from -0000 to +0000. 
+	In PHP4, we will still use -0000 for 100% compat with PHP4.
+
+- 08 Sept 2005 0.22
+In adodb_date2(), $is_gmt not supported properly. Fixed.
+
+- 18 July  2005 0.21
+In PHP 4.3.11, the 'r' format has changed. Leading 0 in day is added. Changed for compat.
+Added support for negative months in adodb_mktime().
+
+- 24 Feb 2005 0.20
+Added limited strftime/gmstrftime support. x10 improvement in performance of adodb_date().
+
+- 21 Dec 2004 0.17
+In adodb_getdate(), the timestamp was accidentally converted to gmt when $is_gmt is false. 
+Also adodb_mktime(0,0,0) did not work properly. Both fixed thx Mauro.
+
+- 17 Nov 2004 0.16
+Removed intval typecast in adodb_mktime() for secs, allowing:
+	 adodb_mktime(0,0,0 + 2236672153,1,1,1934);
+Suggested by Ryan.
+
+- 18 July 2004 0.15
+All params in adodb_mktime were formerly compulsory. Now only the hour, min, secs is compulsory. 
+This brings it more in line with mktime (still not identical).
+
+- 23 June 2004 0.14
+
+Allow you to define your own daylights savings function, adodb_daylight_sv.
+If the function is defined (somewhere in an include), then you can correct for daylights savings.
+
+In this example, we apply daylights savings in June or July, adding one hour. This is extremely
+unrealistic as it does not take into account time-zone, geographic location, current year.
+
+function adodb_daylight_sv(&$arr, $is_gmt)
+{
+	if ($is_gmt) return;
+	$m = $arr['mon'];
+	if ($m == 6 || $m == 7) $arr['hours'] += 1;
+}
+
+This is only called by adodb_date() and not by adodb_mktime(). 
+
+The format of $arr is
+Array ( 
+   [seconds] => 0 
+   [minutes] => 0 
+   [hours] => 0 
+   [mday] => 1      # day of month, eg 1st day of the month
+   [mon] => 2       # month (eg. Feb)
+   [year] => 2102 
+   [yday] => 31     # days in current year
+   [leap] =>        # true if leap year
+   [ndays] => 28    # no of days in current month
+   ) 
+   
+
+- 28 Apr 2004 0.13
+Fixed adodb_date to properly support $is_gmt. Thx to Dimitar Angelov.
+
+- 20 Mar 2004 0.12
+Fixed month calculation error in adodb_date. 2102-June-01 appeared as 2102-May-32.
+
+- 26 Oct 2003 0.11
+Because of daylight savings problems (some systems apply daylight savings to 
+January!!!), changed adodb_get_gmt_diff() to ignore daylight savings.
+
+- 9 Aug 2003 0.10
+Fixed bug with dates after 2038. 
+See http://phplens.com/lens/lensforum/msgs.php?id=6980
+
+- 1 July 2003 0.09
+Added support for Q (Quarter).
+Added adodb_date2(), which accepts ISO date in 2nd param
+
+- 3 March 2003 0.08
+Added support for 'S' adodb_date() format char. Added constant ADODB_ALLOW_NEGATIVE_TS
+if you want PHP to handle negative timestamps between 1901 to 1969.
+
+- 27 Feb 2003 0.07
+All negative numbers handled by adodb now because of RH 7.3+ problems.
+See http://bugs.php.net/bug.php?id=20048&edit=2
+
+- 4 Feb 2003 0.06
+Fixed a typo, 1852 changed to 1582! This means that pre-1852 dates
+are now correctly handled.
+
+- 29 Jan 2003 0.05
+
+Leap year checking differs under Julian calendar (pre 1582). Also
+leap year code optimized by checking for most common case first.
+
+We also handle month overflow correctly in mktime (eg month set to 13).
+
+Day overflow for less than one month's days is supported.
+
+- 28 Jan 2003 0.04
+
+Gregorian correction handled. In PHP5, we might throw an error if 
+mktime uses invalid dates around 5-14 Oct 1582. Released with ADOdb 3.10.
+Added limbo 5-14 Oct 1582 check, when we set to 15 Oct 1582.
+
+- 27 Jan 2003 0.03
+
+Fixed some more month problems due to gmt issues. Added constant ADODB_DATE_VERSION.
+Fixed calculation of days since start of year for <1970. 
+
+- 27 Jan 2003 0.02
+
+Changed _adodb_getdate() to inline leap year checking for better performance.
+Fixed problem with time-zones west of GMT +0000.
+
+- 24 Jan 2003 0.01
+
+First implementation.
+*/
+
+
+/* Initialization */
+
+/*
+	Version Number
+*/
+define('ADODB_DATE_VERSION',0.24);
+
+/*
+	This code was originally for windows. But apparently this problem happens 
+	also with Linux, RH 7.3 and later!
+	
+	glibc-2.2.5-34 and greater has been changed to return -1 for dates <
+	1970.  This used to work.  The problem exists with RedHat 7.3 and 8.0
+	echo (mktime(0, 0, 0, 1, 1, 1960));  // prints -1
+	
+	References:
+	 http://bugs.php.net/bug.php?id=20048&edit=2
+	 http://lists.debian.org/debian-glibc/2002/debian-glibc-200205/msg00010.html
+*/
+
+if (!defined('ADODB_ALLOW_NEGATIVE_TS')) define('ADODB_NO_NEGATIVE_TS',1);
+
+function adodb_date_test_date($y1,$m,$d=13)
+{
+	$t = adodb_mktime(0,0,0,$m,$d,$y1);
+	$rez = adodb_date('Y-n-j H:i:s',$t);
+	if ("$y1-$m-$d 00:00:00" != $rez) {
+		print "<b>$y1 error, expected=$y1-$m-$d 00:00:00, adodb=$rez</b><br>";
+		return false;
+	}
+	return true;
+}
+
+function adodb_date_test_strftime($fmt)
+{
+	$s1 = strftime($fmt);
+	$s2 = adodb_strftime($fmt);
+	
+	if ($s1 == $s2) return true;
+	
+	echo "error for $fmt,  strftime=$s1, $adodb=$s2<br>";
+	return false;
+}
+
+/**
+	 Test Suite
+*/
+function adodb_date_test()
+{
+	
+	error_reporting(E_ALL);
+	print "<h4>Testing adodb_date and adodb_mktime. version=".ADODB_DATE_VERSION.' PHP='.PHP_VERSION."</h4>";
+	@set_time_limit(0);
+	$fail = false;
+	
+	// This flag disables calling of PHP native functions, so we can properly test the code
+	if (!defined('ADODB_TEST_DATES')) define('ADODB_TEST_DATES',1);
+	
+	adodb_date_test_strftime('%Y %m %x %X');
+	adodb_date_test_strftime("%A %d %B %Y");
+	adodb_date_test_strftime("%H %M S");
+	
+	$t = adodb_mktime(0,0,0);
+	if (!(adodb_date('Y-m-d') == date('Y-m-d'))) print 'Error in '.adodb_mktime(0,0,0).'<br>';
+	
+	$t = adodb_mktime(0,0,0,6,1,2102);
+	if (!(adodb_date('Y-m-d',$t) == '2102-06-01')) print 'Error in '.adodb_date('Y-m-d',$t).'<br>';
+	
+	$t = adodb_mktime(0,0,0,2,1,2102);
+	if (!(adodb_date('Y-m-d',$t) == '2102-02-01')) print 'Error in '.adodb_date('Y-m-d',$t).'<br>';
+	
+	
+	print "<p>Testing gregorian <=> julian conversion<p>";
+	$t = adodb_mktime(0,0,0,10,11,1492);
+	//http://www.holidayorigins.com/html/columbus_day.html - Friday check
+	if (!(adodb_date('D Y-m-d',$t) == 'Fri 1492-10-11')) print 'Error in Columbus landing<br>';
+	
+	$t = adodb_mktime(0,0,0,2,29,1500);
+	if (!(adodb_date('Y-m-d',$t) == '1500-02-29')) print 'Error in julian leap years<br>';
+	
+	$t = adodb_mktime(0,0,0,2,29,1700);
+	if (!(adodb_date('Y-m-d',$t) == '1700-03-01')) print 'Error in gregorian leap years<br>';
+	
+	print  adodb_mktime(0,0,0,10,4,1582).' ';
+	print adodb_mktime(0,0,0,10,15,1582);
+	$diff = (adodb_mktime(0,0,0,10,15,1582) - adodb_mktime(0,0,0,10,4,1582));
+	if ($diff != 3600*24) print " <b>Error in gregorian correction = ".($diff/3600/24)." days </b><br>";
+		
+	print " 15 Oct 1582, Fri=".(adodb_dow(1582,10,15) == 5 ? 'Fri' : '<b>Error</b>')."<br>";
+	print " 4 Oct 1582, Thu=".(adodb_dow(1582,10,4) == 4 ? 'Thu' : '<b>Error</b>')."<br>";
+	
+	print "<p>Testing overflow<p>";
+	
+	$t = adodb_mktime(0,0,0,3,33,1965);
+	if (!(adodb_date('Y-m-d',$t) == '1965-04-02')) print 'Error in day overflow 1 <br>';
+	$t = adodb_mktime(0,0,0,4,33,1971);
+	if (!(adodb_date('Y-m-d',$t) == '1971-05-03')) print 'Error in day overflow 2 <br>';
+	$t = adodb_mktime(0,0,0,1,60,1965);
+	if (!(adodb_date('Y-m-d',$t) == '1965-03-01')) print 'Error in day overflow 3 '.adodb_date('Y-m-d',$t).' <br>';
+	$t = adodb_mktime(0,0,0,12,32,1965);
+	if (!(adodb_date('Y-m-d',$t) == '1966-01-01')) print 'Error in day overflow 4 '.adodb_date('Y-m-d',$t).' <br>';
+	$t = adodb_mktime(0,0,0,12,63,1965);
+	if (!(adodb_date('Y-m-d',$t) == '1966-02-01')) print 'Error in day overflow 5 '.adodb_date('Y-m-d',$t).' <br>';
+	$t = adodb_mktime(0,0,0,13,3,1965);
+	if (!(adodb_date('Y-m-d',$t) == '1966-01-03')) print 'Error in mth overflow 1 <br>';
+	
+	print "Testing 2-digit => 4-digit year conversion<p>";
+	if (adodb_year_digit_check(00) != 2000) print "Err 2-digit 2000<br>";
+	if (adodb_year_digit_check(10) != 2010) print "Err 2-digit 2010<br>";
+	if (adodb_year_digit_check(20) != 2020) print "Err 2-digit 2020<br>";
+	if (adodb_year_digit_check(30) != 2030) print "Err 2-digit 2030<br>";
+	if (adodb_year_digit_check(40) != 1940) print "Err 2-digit 1940<br>";
+	if (adodb_year_digit_check(50) != 1950) print "Err 2-digit 1950<br>";
+	if (adodb_year_digit_check(90) != 1990) print "Err 2-digit 1990<br>";
+	
+	// Test string formating
+	print "<p>Testing date formating</p>";
+	$fmt = '\d\a\t\e T Y-m-d H:i:s a A d D F g G h H i j l L m M n O \R\F\C2822 r s t U w y Y z Z 2003';
+	$s1 = date($fmt,0);
+	$s2 = adodb_date($fmt,0);
+	if ($s1 != $s2) {
+		print " date() 0 failed<br>$s1<br>$s2<br>";
+	}
+	flush();
+	for ($i=100; --$i > 0; ) {
+
+		$ts = 3600.0*((rand()%60000)+(rand()%60000))+(rand()%60000);
+		$s1 = date($fmt,$ts);
+		$s2 = adodb_date($fmt,$ts);
+		//print "$s1 <br>$s2 <p>";
+		$pos = strcmp($s1,$s2);
+
+		if (($s1) != ($s2)) {
+			for ($j=0,$k=strlen($s1); $j < $k; $j++) {
+				if ($s1[$j] != $s2[$j]) {
+					print substr($s1,$j).' ';
+					break;
+				}
+			}
+			print "<b>Error date(): $ts<br><pre> 
+&nbsp; \"$s1\" (date len=".strlen($s1).")
+&nbsp; \"$s2\" (adodb_date len=".strlen($s2).")</b></pre><br>";
+			$fail = true;
+		}
+		
+		$a1 = getdate($ts);
+		$a2 = adodb_getdate($ts);
+		$rez = array_diff($a1,$a2);
+		if (sizeof($rez)>0) {
+			print "<b>Error getdate() $ts</b><br>";
+				print_r($a1);
+			print "<br>";
+				print_r($a2);
+			print "<p>";
+			$fail = true;
+		}
+	}
+	
+	// Test generation of dates outside 1901-2038
+	print "<p>Testing random dates between 100 and 4000</p>";
+	adodb_date_test_date(100,1);
+	for ($i=100; --$i >= 0;) {
+		$y1 = 100+rand(0,1970-100);
+		$m = rand(1,12);
+		adodb_date_test_date($y1,$m);
+		
+		$y1 = 3000-rand(0,3000-1970);
+		adodb_date_test_date($y1,$m);
+	}
+	print '<p>';
+	$start = 1960+rand(0,10);
+	$yrs = 12;
+	$i = 365.25*86400*($start-1970);
+	$offset = 36000+rand(10000,60000);
+	$max = 365*$yrs*86400;
+	$lastyear = 0;
+	
+	// we generate a timestamp, convert it to a date, and convert it back to a timestamp
+	// and check if the roundtrip broke the original timestamp value.
+	print "Testing $start to ".($start+$yrs).", or $max seconds, offset=$offset: ";
+	$cnt = 0;
+	for ($max += $i; $i < $max; $i += $offset) {
+		$ret = adodb_date('m,d,Y,H,i,s',$i);
+		$arr = explode(',',$ret);
+		if ($lastyear != $arr[2]) {
+			$lastyear = $arr[2];
+			print " $lastyear ";
+			flush();
+		}
+		$newi = adodb_mktime($arr[3],$arr[4],$arr[5],$arr[0],$arr[1],$arr[2]);
+		if ($i != $newi) {
+			print "Error at $i, adodb_mktime returned $newi ($ret)";
+			$fail = true;
+			break;
+		}
+		$cnt += 1;
+	}
+	echo "Tested $cnt dates<br>";
+	if (!$fail) print "<p>Passed !</p>";
+	else print "<p><b>Failed</b> :-(</p>";
+}
+
+/**
+	Returns day of week, 0 = Sunday,... 6=Saturday. 
+	Algorithm from PEAR::Date_Calc
+*/
+function adodb_dow($year, $month, $day)
+{
+/*
+Pope Gregory removed 10 days - October 5 to October 14 - from the year 1582 and 
+proclaimed that from that time onwards 3 days would be dropped from the calendar 
+every 400 years.
+
+Thursday, October 4, 1582 (Julian) was followed immediately by Friday, October 15, 1582 (Gregorian). 
+*/
+	if ($year <= 1582) {
+		if ($year < 1582 || 
+			($year == 1582 && ($month < 10 || ($month == 10 && $day < 15)))) $greg_correction = 3;
+		 else
+			$greg_correction = 0;
+	} else
+		$greg_correction = 0;
+	
+	if($month > 2)
+	    $month -= 2;
+	else {
+	    $month += 10;
+	    $year--;
+	}
+	
+	$day =  floor((13 * $month - 1) / 5) +
+	        $day + ($year % 100) +
+	        floor(($year % 100) / 4) +
+	        floor(($year / 100) / 4) - 2 *
+	        floor($year / 100) + 77 + $greg_correction;
+	
+	return $day - 7 * floor($day / 7);
+}
+
+
+/**
+ Checks for leap year, returns true if it is. No 2-digit year check. Also 
+ handles julian calendar correctly.
+*/
+function _adodb_is_leap_year($year) 
+{
+	if ($year % 4 != 0) return false;
+	
+	if ($year % 400 == 0) {
+		return true;
+	// if gregorian calendar (>1582), century not-divisible by 400 is not leap
+	} else if ($year > 1582 && $year % 100 == 0 ) {
+		return false;
+	} 
+	
+	return true;
+}
+
+
+/**
+ checks for leap year, returns true if it is. Has 2-digit year check
+*/
+function adodb_is_leap_year($year) 
+{
+	return  _adodb_is_leap_year(adodb_year_digit_check($year));
+}
+
+/**
+	Fix 2-digit years. Works for any century.
+ 	Assumes that if 2-digit is more than 30 years in future, then previous century.
+*/
+function adodb_year_digit_check($y) 
+{
+	if ($y < 100) {
+	
+		$yr = (integer) date("Y");
+		$century = (integer) ($yr /100);
+		
+		if ($yr%100 > 50) {
+			$c1 = $century + 1;
+			$c0 = $century;
+		} else {
+			$c1 = $century;
+			$c0 = $century - 1;
+		}
+		$c1 *= 100;
+		// if 2-digit year is less than 30 years in future, set it to this century
+		// otherwise if more than 30 years in future, then we set 2-digit year to the prev century.
+		if (($y + $c1) < $yr+30) $y = $y + $c1;
+		else $y = $y + $c0*100;
+	}
+	return $y;
+}
+
+/**
+ get local time zone offset from GMT
+*/
+function adodb_get_gmt_diff() 
+{
+static $TZ;
+	if (isset($TZ)) return $TZ;
+	
+	$TZ = mktime(0,0,0,1,2,1970,0) - gmmktime(0,0,0,1,2,1970,0);
+	return $TZ;
+}
+
+/**
+	Returns an array with date info.
+*/
+function adodb_getdate($d=false,$fast=false)
+{
+	if ($d === false) return getdate();
+	if (!defined('ADODB_TEST_DATES')) {
+		if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
+			if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer
+				return @getdate($d);
+		}
+	}
+	return _adodb_getdate($d);
+}
+
+/*
+// generate $YRS table for _adodb_getdate()
+function adodb_date_gentable($out=true)
+{
+
+	for ($i=1970; $i >= 1600; $i-=10) {
+		$s = adodb_gmmktime(0,0,0,1,1,$i);
+		echo "$i => $s,<br>";	
+	}
+}
+adodb_date_gentable();
+
+for ($i=1970; $i > 1500; $i--) {
+
+echo "<hr />$i ";
+	adodb_date_test_date($i,1,1);
+}
+
+*/
+
+
+$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31);
+$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31);
+	
+function adodb_validdate($y,$m,$d)
+{
+global $_month_table_normal,$_month_table_leaf;
+
+	if (_adodb_is_leap_year($y)) $marr =& $_month_table_leaf;
+	else $marr =& $_month_table_normal;
+	
+	if ($m > 12 || $m < 1) return false;
+	
+	if ($d > 31 || $d < 1) return false;
+	
+	if ($marr[$m] < $d) return false;
+	
+	if ($y < 1000 && $y > 3000) return false;
+	
+	return true;
+}
+
+/**
+	Low-level function that returns the getdate() array. We have a special
+	$fast flag, which if set to true, will return fewer array values,
+	and is much faster as it does not calculate dow, etc.
+*/
+function _adodb_getdate($origd=false,$fast=false,$is_gmt=false)
+{
+static $YRS;
+global $_month_table_normal,$_month_table_leaf;
+
+	$d =  $origd - ($is_gmt ? 0 : adodb_get_gmt_diff());
+	
+	$_day_power = 86400;
+	$_hour_power = 3600;
+	$_min_power = 60;
+	
+	if ($d < -12219321600) $d -= 86400*10; // if 15 Oct 1582 or earlier, gregorian correction 
+	
+	$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31);
+	$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31);
+	
+	$d366 = $_day_power * 366;
+	$d365 = $_day_power * 365;
+	
+	if ($d < 0) {
+		
+		if (empty($YRS)) $YRS = array(
+			1970 => 0,
+			1960 => -315619200,
+			1950 => -631152000,
+			1940 => -946771200,
+			1930 => -1262304000,
+			1920 => -1577923200,
+			1910 => -1893456000,
+			1900 => -2208988800,
+			1890 => -2524521600,
+			1880 => -2840140800,
+			1870 => -3155673600,
+			1860 => -3471292800,
+			1850 => -3786825600,
+			1840 => -4102444800,
+			1830 => -4417977600,
+			1820 => -4733596800,
+			1810 => -5049129600,
+			1800 => -5364662400,
+			1790 => -5680195200,
+			1780 => -5995814400,
+			1770 => -6311347200,
+			1760 => -6626966400,
+			1750 => -6942499200,
+			1740 => -7258118400,
+			1730 => -7573651200,
+			1720 => -7889270400,
+			1710 => -8204803200,
+			1700 => -8520336000,
+			1690 => -8835868800,
+			1680 => -9151488000,
+			1670 => -9467020800,
+			1660 => -9782640000,
+			1650 => -10098172800,
+			1640 => -10413792000,
+			1630 => -10729324800,
+			1620 => -11044944000,
+			1610 => -11360476800,
+			1600 => -11676096000);
+
+		if ($is_gmt) $origd = $d;
+		// The valid range of a 32bit signed timestamp is typically from 
+		// Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT
+		//
+		
+		# old algorithm iterates through all years. new algorithm does it in
+		# 10 year blocks
+		
+		/*
+		# old algo
+		for ($a = 1970 ; --$a >= 0;) {
+			$lastd = $d;
+			
+			if ($leaf = _adodb_is_leap_year($a)) $d += $d366;
+			else $d += $d365;
+			
+			if ($d >= 0) {
+				$year = $a;
+				break;
+			}
+		}
+		*/
+		
+		$lastsecs = 0;
+		$lastyear = 1970;
+		foreach($YRS as $year => $secs) {
+			if ($d >= $secs) {
+				$a = $lastyear;
+				break;
+			}
+			$lastsecs = $secs;
+			$lastyear = $year;
+		}
+		
+		$d -= $lastsecs;
+		if (!isset($a)) $a = $lastyear;
+		
+		//echo ' yr=',$a,' ', $d,'.';
+		
+		for (; --$a >= 0;) {
+			$lastd = $d;
+			
+			if ($leaf = _adodb_is_leap_year($a)) $d += $d366;
+			else $d += $d365;
+			
+			if ($d >= 0) {
+				$year = $a;
+				break;
+			}
+		}
+		/**/
+		
+		$secsInYear = 86400 * ($leaf ? 366 : 365) + $lastd;
+		
+		$d = $lastd;
+		$mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal;
+		for ($a = 13 ; --$a > 0;) {
+			$lastd = $d;
+			$d += $mtab[$a] * $_day_power;
+			if ($d >= 0) {
+				$month = $a;
+				$ndays = $mtab[$a];
+				break;
+			}
+		}
+		
+		$d = $lastd;
+		$day = $ndays + ceil(($d+1) / ($_day_power));
+
+		$d += ($ndays - $day+1)* $_day_power;
+		$hour = floor($d/$_hour_power);
+	
+	} else {
+		for ($a = 1970 ;; $a++) {
+			$lastd = $d;
+			
+			if ($leaf = _adodb_is_leap_year($a)) $d -= $d366;
+			else $d -= $d365;
+			if ($d < 0) {
+				$year = $a;
+				break;
+			}
+		}
+		$secsInYear = $lastd;
+		$d = $lastd;
+		$mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal;
+		for ($a = 1 ; $a <= 12; $a++) {
+			$lastd = $d;
+			$d -= $mtab[$a] * $_day_power;
+			if ($d < 0) {
+				$month = $a;
+				$ndays = $mtab[$a];
+				break;
+			}
+		}
+		$d = $lastd;
+		$day = ceil(($d+1) / $_day_power);
+		$d = $d - ($day-1) * $_day_power;
+		$hour = floor($d /$_hour_power);
+	}
+	
+	$d -= $hour * $_hour_power;
+	$min = floor($d/$_min_power);
+	$secs = $d - $min * $_min_power;
+	if ($fast) {
+		return array(
+		'seconds' => $secs,
+		'minutes' => $min,
+		'hours' => $hour,
+		'mday' => $day,
+		'mon' => $month,
+		'year' => $year,
+		'yday' => floor($secsInYear/$_day_power),
+		'leap' => $leaf,
+		'ndays' => $ndays
+		);
+	}
+	
+	
+	$dow = adodb_dow($year,$month,$day);
+
+	return array(
+		'seconds' => $secs,
+		'minutes' => $min,
+		'hours' => $hour,
+		'mday' => $day,
+		'wday' => $dow,
+		'mon' => $month,
+		'year' => $year,
+		'yday' => floor($secsInYear/$_day_power),
+		'weekday' => gmdate('l',$_day_power*(3+$dow)),
+		'month' => gmdate('F',mktime(0,0,0,$month,2,1971)),
+		0 => $origd
+	);
+}
+
+function adodb_gmdate($fmt,$d=false)
+{
+	return adodb_date($fmt,$d,true);
+}
+
+// accepts unix timestamp and iso date format in $d
+function adodb_date2($fmt, $d=false, $is_gmt=false)
+{
+	if ($d !== false) {
+		if (!preg_match( 
+			"|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", 
+			($d), $rr)) return adodb_date($fmt,false,$is_gmt);
+
+		if ($rr[1] <= 100 && $rr[2]<= 1) return adodb_date($fmt,false,$is_gmt);
+	
+		// h-m-s-MM-DD-YY
+		if (!isset($rr[5])) $d = adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1],false,$is_gmt);
+		else $d = @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1],false,$is_gmt);
+	}
+	
+	return adodb_date($fmt,$d,$is_gmt);
+}
+
+
+/**
+	Return formatted date based on timestamp $d
+*/
+function adodb_date($fmt,$d=false,$is_gmt=false)
+{
+static $daylight;
+
+	if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt);
+	if (!defined('ADODB_TEST_DATES')) {
+		if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
+			if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer
+				return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d);
+
+		}
+	}
+	$_day_power = 86400;
+	
+	$arr = _adodb_getdate($d,true,$is_gmt);
+	
+	if (!isset($daylight)) $daylight = function_exists('adodb_daylight_sv');
+	if ($daylight) adodb_daylight_sv($arr, $is_gmt);
+	
+	$year = $arr['year'];
+	$month = $arr['mon'];
+	$day = $arr['mday'];
+	$hour = $arr['hours'];
+	$min = $arr['minutes'];
+	$secs = $arr['seconds'];
+	
+	$max = strlen($fmt);
+	$dates = '';
+	
+	$isphp5 = PHP_VERSION >= 5;
+	
+	/*
+		at this point, we have the following integer vars to manipulate:
+		$year, $month, $day, $hour, $min, $secs
+	*/
+	for ($i=0; $i < $max; $i++) {
+		switch($fmt[$i]) {
+		case 'T': $dates .= date('T');break;
+		// YEAR
+		case 'L': $dates .= $arr['leap'] ? '1' : '0'; break;
+		case 'r': // Thu, 21 Dec 2000 16:01:07 +0200
+		
+			// 4.3.11 uses '04 Jun 2004'
+			// 4.3.8 uses  ' 4 Jun 2004'
+			$dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))).', '		
+				. ($day<10?'0'.$day:$day) . ' '.date('M',mktime(0,0,0,$month,2,1971)).' '.$year.' ';
+			
+			if ($hour < 10) $dates .= '0'.$hour; else $dates .= $hour; 
+			
+			if ($min < 10) $dates .= ':0'.$min; else $dates .= ':'.$min;
+			
+			if ($secs < 10) $dates .= ':0'.$secs; else $dates .= ':'.$secs;
+			
+			$gmt = adodb_get_gmt_diff();
+			if ($isphp5) 
+				$dates .= sprintf(' %s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); 
+			else
+				$dates .= sprintf(' %s%04d',($gmt<0)?'+':'-',abs($gmt)/36); 
+			break;
+				
+		case 'Y': $dates .= $year; break;
+		case 'y': $dates .= substr($year,strlen($year)-2,2); break;
+		// MONTH
+		case 'm': if ($month<10) $dates .= '0'.$month; else $dates .= $month; break;
+		case 'Q': $dates .= ($month+3)>>2; break;
+		case 'n': $dates .= $month; break;
+		case 'M': $dates .= date('M',mktime(0,0,0,$month,2,1971)); break;
+		case 'F': $dates .= date('F',mktime(0,0,0,$month,2,1971)); break;
+		// DAY
+		case 't': $dates .= $arr['ndays']; break;
+		case 'z': $dates .= $arr['yday']; break;
+		case 'w': $dates .= adodb_dow($year,$month,$day); break;
+		case 'l': $dates .= gmdate('l',$_day_power*(3+adodb_dow($year,$month,$day))); break;
+		case 'D': $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))); break;
+		case 'j': $dates .= $day; break;
+		case 'd': if ($day<10) $dates .= '0'.$day; else $dates .= $day; break;
+		case 'S': 
+			$d10 = $day % 10;
+			if ($d10 == 1) $dates .= 'st';
+			else if ($d10 == 2 && $day != 12) $dates .= 'nd';
+			else if ($d10 == 3) $dates .= 'rd';
+			else $dates .= 'th';
+			break;
+			
+		// HOUR
+		case 'Z':
+			$dates .= ($is_gmt) ? 0 : -adodb_get_gmt_diff(); break;
+		case 'O': 
+			$gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff();
+			
+			if ($isphp5)
+				$dates .= sprintf('%s%04d',($gmt<=0)?'+':'-',abs($gmt)/36); 
+			else
+				$dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36); 
+			break;
+			
+		case 'H': 
+			if ($hour < 10) $dates .= '0'.$hour; 
+			else $dates .= $hour; 
+			break;
+		case 'h': 
+			if ($hour > 12) $hh = $hour - 12; 
+			else {
+				if ($hour == 0) $hh = '12'; 
+				else $hh = $hour;
+			}
+			
+			if ($hh < 10) $dates .= '0'.$hh;
+			else $dates .= $hh;
+			break;
+			
+		case 'G': 
+			$dates .= $hour;
+			break;
+			
+		case 'g':
+			if ($hour > 12) $hh = $hour - 12; 
+			else {
+				if ($hour == 0) $hh = '12'; 
+				else $hh = $hour; 
+			}
+			$dates .= $hh;
+			break;
+		// MINUTES
+		case 'i': if ($min < 10) $dates .= '0'.$min; else $dates .= $min; break;
+		// SECONDS
+		case 'U': $dates .= $d; break;
+		case 's': if ($secs < 10) $dates .= '0'.$secs; else $dates .= $secs; break;
+		// AM/PM
+		// Note 00:00 to 11:59 is AM, while 12:00 to 23:59 is PM
+		case 'a':
+			if ($hour>=12) $dates .= 'pm';
+			else $dates .= 'am';
+			break;
+		case 'A':
+			if ($hour>=12) $dates .= 'PM';
+			else $dates .= 'AM';
+			break;
+		default:
+			$dates .= $fmt[$i]; break;
+		// ESCAPE
+		case "\\": 
+			$i++;
+			if ($i < $max) $dates .= $fmt[$i];
+			break;
+		}
+	}
+	return $dates;
+}
+
+/**
+	Returns a timestamp given a GMT/UTC time. 
+	Note that $is_dst is not implemented and is ignored.
+*/
+function adodb_gmmktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false)
+{
+	return adodb_mktime($hr,$min,$sec,$mon,$day,$year,$is_dst,true);
+}
+
+/**
+	Return a timestamp given a local time. Originally by jackbbs.
+	Note that $is_dst is not implemented and is ignored.
+	
+	Not a very fast algorithm - O(n) operation. Could be optimized to O(1).
+*/
+function adodb_mktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false,$is_gmt=false) 
+{
+	if (!defined('ADODB_TEST_DATES')) {
+
+		if ($mon === false) {
+			return $is_gmt? @gmmktime($hr,$min,$sec): @mktime($hr,$min,$sec);
+		}
+		
+		// for windows, we don't check 1970 because with timezone differences, 
+		// 1 Jan 1970 could generate negative timestamp, which is illegal
+		if (1971 < $year && $year < 2038
+			|| !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038)
+			) {
+				return $is_gmt ?
+					@gmmktime($hr,$min,$sec,$mon,$day,$year):
+					@mktime($hr,$min,$sec,$mon,$day,$year);
+			}
+	}
+	
+	$gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff();
+
+	/*
+	# disabled because some people place large values in $sec.
+	# however we need it for $mon because we use an array...
+	$hr = intval($hr);
+	$min = intval($min);
+	$sec = intval($sec);
+	*/
+	$mon = intval($mon);
+	$day = intval($day);
+	$year = intval($year);
+	
+	
+	$year = adodb_year_digit_check($year);
+
+	if ($mon > 12) {
+		$y = floor($mon / 12);
+		$year += $y;
+		$mon -= $y*12;
+	} else if ($mon < 1) {
+		$y = ceil((1-$mon) / 12);
+		$year -= $y;
+		$mon += $y*12;
+	}
+	
+	$_day_power = 86400;
+	$_hour_power = 3600;
+	$_min_power = 60;
+	
+	$_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31);
+	$_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31);
+	
+	$_total_date = 0;
+	if ($year >= 1970) {
+		for ($a = 1970 ; $a <= $year; $a++) {
+			$leaf = _adodb_is_leap_year($a);
+			if ($leaf == true) {
+				$loop_table = $_month_table_leaf;
+				$_add_date = 366;
+			} else {
+				$loop_table = $_month_table_normal;
+				$_add_date = 365;
+			}
+			if ($a < $year) { 
+				$_total_date += $_add_date;
+			} else {
+				for($b=1;$b<$mon;$b++) {
+					$_total_date += $loop_table[$b];
+				}
+			}
+		}
+		$_total_date +=$day-1;
+		$ret = $_total_date * $_day_power + $hr * $_hour_power + $min * $_min_power + $sec + $gmt_different;
+	
+	} else {
+		for ($a = 1969 ; $a >= $year; $a--) {
+			$leaf = _adodb_is_leap_year($a);
+			if ($leaf == true) {
+				$loop_table = $_month_table_leaf;
+				$_add_date = 366;
+			} else {
+				$loop_table = $_month_table_normal;
+				$_add_date = 365;
+			}
+			if ($a > $year) { $_total_date += $_add_date;
+			} else {
+				for($b=12;$b>$mon;$b--) {
+					$_total_date += $loop_table[$b];
+				}
+			}
+		}
+		$_total_date += $loop_table[$mon] - $day;
+		
+		$_day_time = $hr * $_hour_power + $min * $_min_power + $sec;
+		$_day_time = $_day_power - $_day_time;
+		$ret = -( $_total_date * $_day_power + $_day_time - $gmt_different);
+		if ($ret < -12220185600) $ret += 10*86400; // if earlier than 5 Oct 1582 - gregorian correction
+		else if ($ret < -12219321600) $ret = -12219321600; // if in limbo, reset to 15 Oct 1582.
+	} 
+	//print " dmy=$day/$mon/$year $hr:$min:$sec => " .$ret;
+	return $ret;
+}
+
+function adodb_gmstrftime($fmt, $ts=false)
+{
+	return adodb_strftime($fmt,$ts,true);
+}
+
+// hack - convert to adodb_date
+function adodb_strftime($fmt, $ts=false,$is_gmt=false)
+{
+global $ADODB_DATE_LOCALE;
+
+	if (!defined('ADODB_TEST_DATES')) {
+		if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
+			if (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer
+				return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts);
+
+		}
+	}
+	
+	if (empty($ADODB_DATE_LOCALE)) {
+	/*
+		$tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am
+		$sep = substr($tstr,2,1);
+		$hasAM = strrpos($tstr,'M') !== false;
+	*/
+		# see http://phplens.com/lens/lensforum/msgs.php?id=14865 for reasoning, and changelog for version 0.24
+		$dstr = gmstrftime('%x',31366800); // 30 Dec 1970, 1 am
+		$sep = substr($dstr,2,1);
+		$tstr = strtoupper(gmstrftime('%X',31366800)); // 30 Dec 1970, 1 am
+		$hasAM = strrpos($tstr,'M') !== false;
+		
+		$ADODB_DATE_LOCALE = array();
+		$ADODB_DATE_LOCALE[] =  strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y';	
+		$ADODB_DATE_LOCALE[]  = ($hasAM) ? 'h:i:s a' : 'H:i:s';
+			
+	}
+	$inpct = false;
+	$fmtdate = '';
+	for ($i=0,$max = strlen($fmt); $i < $max; $i++) {
+		$ch = $fmt[$i];
+		if ($ch == '%') {
+			if ($inpct) {
+				$fmtdate .= '%';
+				$inpct = false;
+			} else
+				$inpct = true;
+		} else if ($inpct) {
+		
+			$inpct = false;
+			switch($ch) {
+			case '0':
+			case '1':
+			case '2':
+			case '3':
+			case '4':
+			case '5':
+			case '6':
+			case '7':
+			case '8':
+			case '9':
+			case 'E':
+			case 'O':
+				/* ignore format modifiers */
+				$inpct = true; 
+				break;
+				
+			case 'a': $fmtdate .= 'D'; break;
+			case 'A': $fmtdate .= 'l'; break;
+			case 'h':
+			case 'b': $fmtdate .= 'M'; break;
+			case 'B': $fmtdate .= 'F'; break;
+			case 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break;
+			case 'C': $fmtdate .= '\C?'; break; // century
+			case 'd': $fmtdate .= 'd'; break;
+			case 'D': $fmtdate .= 'm/d/y'; break;
+			case 'e': $fmtdate .= 'j'; break;
+			case 'g': $fmtdate .= '\g?'; break; //?
+			case 'G': $fmtdate .= '\G?'; break; //?
+			case 'H': $fmtdate .= 'H'; break;
+			case 'I': $fmtdate .= 'h'; break;
+			case 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd
+			case 'm': $fmtdate .= 'm'; break;
+			case 'M': $fmtdate .= 'i'; break;
+			case 'n': $fmtdate .= "\n"; break;
+			case 'p': $fmtdate .= 'a'; break;
+			case 'r': $fmtdate .= 'h:i:s a'; break;
+			case 'R': $fmtdate .= 'H:i:s'; break;
+			case 'S': $fmtdate .= 's'; break;
+			case 't': $fmtdate .= "\t"; break;
+			case 'T': $fmtdate .= 'H:i:s'; break;
+			case 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-based
+			case 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based
+			case 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break;
+			case 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break;
+			case 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-based
+			case 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based
+			case 'y': $fmtdate .= 'y'; break;
+			case 'Y': $fmtdate .= 'Y'; break;
+			case 'Z': $fmtdate .= 'T'; break;
+			}
+		} else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' ))
+			$fmtdate .= "\\".$ch;
+		else
+			$fmtdate .= $ch;
+	}
+	//echo "fmt=",$fmtdate,"<br>";
+	if ($ts === false) $ts = time();
+	$ret = adodb_date($fmtdate, $ts, $is_gmt);
+	return $ret;
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-xmlschema.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-xmlschema.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-xmlschema.inc.php	(revision 225)
@@ -0,0 +1,2221 @@
+<?php
+// Copyright (c) 2004 ars Cognita Inc., all rights reserved
+/* ******************************************************************************
+    Released under both BSD license and Lesser GPL library license. 
+ 	Whenever there is any discrepancy between the two licenses, 
+ 	the BSD license will take precedence. 
+*******************************************************************************/
+/**
+ * xmlschema is a class that allows the user to quickly and easily
+ * build a database on any ADOdb-supported platform using a simple
+ * XML schema.
+ *
+ * Last Editor: $Author: cweiske $
+ * @author Richard Tango-Lowy & Dan Cech
+ * @version $Revision: 350 $
+ *
+ * @package axmls
+ * @tutorial getting_started.pkg
+ */
+ 
+function _file_get_contents($file) 
+{
+ 	if (function_exists('file_get_contents')) return file_get_contents($file);
+	
+	$f = fopen($file,'r');
+	if (!$f) return '';
+	$t = '';
+	
+	while ($s = fread($f,100000)) $t .= $s;
+	fclose($f);
+	return $t;
+}
+
+
+/**
+* Debug on or off
+*/
+if( !defined( 'XMLS_DEBUG' ) ) {
+	define( 'XMLS_DEBUG', FALSE );
+}
+
+/**
+* Default prefix key
+*/
+if( !defined( 'XMLS_PREFIX' ) ) {
+	define( 'XMLS_PREFIX', '%%P' );
+}
+
+/**
+* Maximum length allowed for object prefix
+*/
+if( !defined( 'XMLS_PREFIX_MAXLEN' ) ) {
+	define( 'XMLS_PREFIX_MAXLEN', 10 );
+}
+
+/**
+* Execute SQL inline as it is generated
+*/
+if( !defined( 'XMLS_EXECUTE_INLINE' ) ) {
+	define( 'XMLS_EXECUTE_INLINE', FALSE );
+}
+
+/**
+* Continue SQL Execution if an error occurs?
+*/
+if( !defined( 'XMLS_CONTINUE_ON_ERROR' ) ) {
+	define( 'XMLS_CONTINUE_ON_ERROR', FALSE );
+}
+
+/**
+* Current Schema Version
+*/
+if( !defined( 'XMLS_SCHEMA_VERSION' ) ) {
+	define( 'XMLS_SCHEMA_VERSION', '0.2' );
+}
+
+/**
+* Default Schema Version.  Used for Schemas without an explicit version set.
+*/
+if( !defined( 'XMLS_DEFAULT_SCHEMA_VERSION' ) ) {
+	define( 'XMLS_DEFAULT_SCHEMA_VERSION', '0.1' );
+}
+
+/**
+* Default Schema Version.  Used for Schemas without an explicit version set.
+*/
+if( !defined( 'XMLS_DEFAULT_UPGRADE_METHOD' ) ) {
+	define( 'XMLS_DEFAULT_UPGRADE_METHOD', 'ALTER' );
+}
+
+/**
+* Include the main ADODB library
+*/
+if( !defined( '_ADODB_LAYER' ) ) {
+	require( 'adodb.inc.php' );
+	require( 'adodb-datadict.inc.php' );
+}
+
+/**
+* Abstract DB Object. This class provides basic methods for database objects, such
+* as tables and indexes.
+*
+* @package axmls
+* @access private
+*/
+class dbObject {
+	
+	/**
+	* var object Parent
+	*/
+	var $parent;
+	
+	/**
+	* var string current element
+	*/
+	var $currentElement;
+	
+	/**
+	* NOP
+	*/
+	function dbObject( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		
+	}
+	
+	function create() {
+		return array();
+	}
+	
+	/**
+	* Destroys the object
+	*/
+	function destroy() {
+		unset( $this );
+	}
+	
+	/**
+	* Checks whether the specified RDBMS is supported by the current
+	* database object or its ranking ancestor.
+	*
+	* @param string $platform RDBMS platform name (from ADODB platform list).
+	* @return boolean TRUE if RDBMS is supported; otherwise returns FALSE.
+	*/
+	function supportedPlatform( $platform = NULL ) {
+		return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE;
+	}
+	
+	/**
+	* Returns the prefix set by the ranking ancestor of the database object.
+	*
+	* @param string $name Prefix string.
+	* @return string Prefix.
+	*/
+	function prefix( $name = '' ) {
+		return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name;
+	}
+	
+	/**
+	* Extracts a field ID from the specified field.
+	*
+	* @param string $field Field.
+	* @return string Field ID.
+	*/
+	function FieldID( $field ) {
+		return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) );
+	}
+}
+
+/**
+* Creates a table object in ADOdb's datadict format
+*
+* This class stores information about a database table. As charactaristics
+* of the table are loaded from the external source, methods and properties
+* of this class are used to build up the table description in ADOdb's
+* datadict format.
+*
+* @package axmls
+* @access private
+*/
+class dbTable extends dbObject {
+	
+	/**
+	* @var string Table name
+	*/
+	var $name;
+	
+	/**
+	* @var array Field specifier: Meta-information about each field
+	*/
+	var $fields = array();
+	
+	/**
+	* @var array List of table indexes.
+	*/
+	var $indexes = array();
+	
+	/**
+	* @var array Table options: Table-level options
+	*/
+	var $opts = array();
+	
+	/**
+	* @var string Field index: Keeps track of which field is currently being processed
+	*/
+	var $current_field;
+	
+	/**
+	* @var boolean Mark table for destruction
+	* @access private
+	*/
+	var $drop_table;
+	
+	/**
+	* @var boolean Mark field for destruction (not yet implemented)
+	* @access private
+	*/
+	var $drop_field = array();
+	
+	/**
+	* Iniitializes a new table object.
+	*
+	* @param string $prefix DB Object prefix
+	* @param array $attributes Array of table attributes.
+	*/
+	function dbTable( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+		$this->name = $this->prefix($attributes['NAME']);
+	}
+	
+	/**
+	* XML Callback to process start elements. Elements currently 
+	* processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'INDEX':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					xml_set_object( $parser, $this->addIndex( $attributes ) );
+				}
+				break;
+			case 'DATA':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					xml_set_object( $parser, $this->addData( $attributes ) );
+				}
+				break;
+			case 'DROP':
+				$this->drop();
+				break;
+			case 'FIELD':
+				// Add a field
+				$fieldName = $attributes['NAME'];
+				$fieldType = $attributes['TYPE'];
+				$fieldSize = isset( $attributes['SIZE'] ) ? $attributes['SIZE'] : NULL;
+				$fieldOpts = isset( $attributes['OPTS'] ) ? $attributes['OPTS'] : NULL;
+				
+				$this->addField( $fieldName, $fieldType, $fieldSize, $fieldOpts );
+				break;
+			case 'KEY':
+			case 'NOTNULL':
+			case 'AUTOINCREMENT':
+				// Add a field option
+				$this->addFieldOpt( $this->current_field, $this->currentElement );
+				break;
+			case 'DEFAULT':
+				// Add a field option to the table object
+				
+				// Work around ADOdb datadict issue that misinterprets empty strings.
+				if( $attributes['VALUE'] == '' ) {
+					$attributes['VALUE'] = " '' ";
+				}
+				
+				$this->addFieldOpt( $this->current_field, $this->currentElement, $attributes['VALUE'] );
+				break;
+			case 'DEFDATE':
+			case 'DEFTIMESTAMP':
+				// Add a field option to the table object
+				$this->addFieldOpt( $this->current_field, $this->currentElement );
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Table constraint
+			case 'CONSTRAINT':
+				if( isset( $this->current_field ) ) {
+					$this->addFieldOpt( $this->current_field, $this->currentElement, $cdata );
+				} else {
+					$this->addTableOpt( $cdata );
+				}
+				break;
+			// Table option
+			case 'OPT':
+				$this->addTableOpt( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'TABLE':
+				$this->parent->addSQL( $this->create( $this->parent ) );
+				xml_set_object( $parser, $this->parent );
+				$this->destroy();
+				break;
+			case 'FIELD':
+				unset($this->current_field);
+				break;
+
+		}
+	}
+	
+	/**
+	* Adds an index to a table object
+	*
+	* @param array $attributes Index attributes
+	* @return object dbIndex object
+	*/
+	function &addIndex( $attributes ) {
+		$name = strtoupper( $attributes['NAME'] );
+		$this->indexes[$name] =& new dbIndex( $this, $attributes );
+		return $this->indexes[$name];
+	}
+	
+	/**
+	* Adds data to a table object
+	*
+	* @param array $attributes Data attributes
+	* @return object dbData object
+	*/
+	function &addData( $attributes ) {
+		if( !isset( $this->data ) ) {
+			$this->data =& new dbData( $this, $attributes );
+		}
+		return $this->data;
+	}
+	
+	/**
+	* Adds a field to a table object
+	*
+	* $name is the name of the table to which the field should be added. 
+	* $type is an ADODB datadict field type. The following field types
+	* are supported as of ADODB 3.40:
+	* 	- C:  varchar
+	*	- X:  CLOB (character large object) or largest varchar size
+	*	   if CLOB is not supported
+	*	- C2: Multibyte varchar
+	*	- X2: Multibyte CLOB
+	*	- B:  BLOB (binary large object)
+	*	- D:  Date (some databases do not support this, and we return a datetime type)
+	*	- T:  Datetime or Timestamp
+	*	- L:  Integer field suitable for storing booleans (0 or 1)
+	*	- I:  Integer (mapped to I4)
+	*	- I1: 1-byte integer
+	*	- I2: 2-byte integer
+	*	- I4: 4-byte integer
+	*	- I8: 8-byte integer
+	*	- F:  Floating point number
+	*	- N:  Numeric or decimal number
+	*
+	* @param string $name Name of the table to which the field will be added.
+	* @param string $type	ADODB datadict field type.
+	* @param string $size	Field size
+	* @param array $opts	Field options array
+	* @return array Field specifier array
+	*/
+	function addField( $name, $type, $size = NULL, $opts = NULL ) {
+		$field_id = $this->FieldID( $name );
+		
+		// Set the field index so we know where we are
+		$this->current_field = $field_id;
+		
+		// Set the field name (required)
+		$this->fields[$field_id]['NAME'] = $name;
+		
+		// Set the field type (required)
+		$this->fields[$field_id]['TYPE'] = $type;
+		
+		// Set the field size (optional)
+		if( isset( $size ) ) {
+			$this->fields[$field_id]['SIZE'] = $size;
+		}
+		
+		// Set the field options
+		if( isset( $opts ) ) {
+			$this->fields[$field_id]['OPTS'][] = $opts;
+		}
+	}
+	
+	/**
+	* Adds a field option to the current field specifier
+	*
+	* This method adds a field option allowed by the ADOdb datadict 
+	* and appends it to the given field.
+	*
+	* @param string $field	Field name
+	* @param string $opt ADOdb field option
+	* @param mixed $value Field option value
+	* @return array Field specifier array
+	*/
+	function addFieldOpt( $field, $opt, $value = NULL ) {
+		if( !isset( $value ) ) {
+			$this->fields[$this->FieldID( $field )]['OPTS'][] = $opt;
+		// Add the option and value
+		} else {
+			$this->fields[$this->FieldID( $field )]['OPTS'][] = array( $opt => $value );
+		}
+	}
+	
+	/**
+	* Adds an option to the table
+	*
+	* This method takes a comma-separated list of table-level options
+	* and appends them to the table object.
+	*
+	* @param string $opt Table option
+	* @return array Options
+	*/
+	function addTableOpt( $opt ) {
+		$this->opts[] = $opt;
+		
+		return $this->opts;
+	}
+	
+	/**
+	* Generates the SQL that will create the table in the database
+	*
+	* @param object $xmls adoSchema object
+	* @return array Array containing table creation SQL
+	*/
+	function create( &$xmls ) {
+		$sql = array();
+		
+		// drop any existing indexes
+		if( is_array( $legacy_indexes = $xmls->dict->MetaIndexes( $this->name ) ) ) {
+			foreach( $legacy_indexes as $index => $index_details ) {
+				$sql[] = $xmls->dict->DropIndexSQL( $index, $this->name );
+			}
+		}
+		
+		// remove fields to be dropped from table object
+		foreach( $this->drop_field as $field ) {
+			unset( $this->fields[$field] );
+		}
+		
+		// if table exists
+		if( is_array( $legacy_fields = $xmls->dict->MetaColumns( $this->name ) ) ) {
+			// drop table
+			if( $this->drop_table ) {
+				$sql[] = $xmls->dict->DropTableSQL( $this->name );
+				
+				return $sql;
+			}
+			
+			// drop any existing fields not in schema
+			foreach( $legacy_fields as $field_id => $field ) {
+				if( !isset( $this->fields[$field_id] ) ) {
+					$sql[] = $xmls->dict->DropColumnSQL( $this->name, '`'.$field->name.'`' );
+				}
+			}
+		// if table doesn't exist
+		} else {
+			if( $this->drop_table ) {
+				return $sql;
+			}
+			
+			$legacy_fields = array();
+		}
+		
+		// Loop through the field specifier array, building the associative array for the field options
+		$fldarray = array();
+		
+		foreach( $this->fields as $field_id => $finfo ) {
+			// Set an empty size if it isn't supplied
+			if( !isset( $finfo['SIZE'] ) ) {
+				$finfo['SIZE'] = '';
+			}
+			
+			// Initialize the field array with the type and size
+			$fldarray[$field_id] = array(
+				'NAME' => $finfo['NAME'],
+				'TYPE' => $finfo['TYPE'],
+				'SIZE' => $finfo['SIZE']
+			);
+			
+			// Loop through the options array and add the field options. 
+			if( isset( $finfo['OPTS'] ) ) {
+				foreach( $finfo['OPTS'] as $opt ) {
+					// Option has an argument.
+					if( is_array( $opt ) ) {
+						$key = key( $opt );
+						$value = $opt[key( $opt )];
+						@$fldarray[$field_id][$key] .= $value;
+					// Option doesn't have arguments
+					} else {
+						$fldarray[$field_id][$opt] = $opt;
+					}
+				}
+			}
+		}
+		
+		if( empty( $legacy_fields ) ) {
+			// Create the new table
+			$sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts );
+			logMsg( end( $sql ), 'Generated CreateTableSQL' );
+		} else {
+			// Upgrade an existing table
+			logMsg( "Upgrading {$this->name} using '{$xmls->upgrade}'" );
+			switch( $xmls->upgrade ) {
+				// Use ChangeTableSQL
+				case 'ALTER':
+					logMsg( 'Generated ChangeTableSQL (ALTERing table)' );
+					$sql[] = $xmls->dict->ChangeTableSQL( $this->name, $fldarray, $this->opts );
+					break;
+				case 'REPLACE':
+					logMsg( 'Doing upgrade REPLACE (testing)' );
+					$sql[] = $xmls->dict->DropTableSQL( $this->name );
+					$sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts );
+					break;
+				// ignore table
+				default:
+					return array();
+			}
+		}
+		
+		foreach( $this->indexes as $index ) {
+			$sql[] = $index->create( $xmls );
+		}
+		
+		if( isset( $this->data ) ) {
+			$sql[] = $this->data->create( $xmls );
+		}
+		
+		return $sql;
+	}
+	
+	/**
+	* Marks a field or table for destruction
+	*/
+	function drop() {
+		if( isset( $this->current_field ) ) {
+			// Drop the current field
+			logMsg( "Dropping field '{$this->current_field}' from table '{$this->name}'" );
+			// $this->drop_field[$this->current_field] = $xmls->dict->DropColumnSQL( $this->name, $this->current_field );
+			$this->drop_field[$this->current_field] = $this->current_field;
+		} else {
+			// Drop the current table
+			logMsg( "Dropping table '{$this->name}'" );
+			// $this->drop_table = $xmls->dict->DropTableSQL( $this->name );
+			$this->drop_table = TRUE;
+		}
+	}
+}
+
+/**
+* Creates an index object in ADOdb's datadict format
+*
+* This class stores information about a database index. As charactaristics
+* of the index are loaded from the external source, methods and properties
+* of this class are used to build up the index description in ADOdb's
+* datadict format.
+*
+* @package axmls
+* @access private
+*/
+class dbIndex extends dbObject {
+	
+	/**
+	* @var string	Index name
+	*/
+	var $name;
+	
+	/**
+	* @var array	Index options: Index-level options
+	*/
+	var $opts = array();
+	
+	/**
+	* @var array	Indexed fields: Table columns included in this index
+	*/
+	var $columns = array();
+	
+	/**
+	* @var boolean Mark index for destruction
+	* @access private
+	*/
+	var $drop = FALSE;
+	
+	/**
+	* Initializes the new dbIndex object.
+	*
+	* @param object $parent Parent object
+	* @param array $attributes Attributes
+	*
+	* @internal
+	*/
+	function dbIndex( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+		
+		$this->name = $this->prefix ($attributes['NAME']);
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* Processes XML opening tags. 
+	* Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'DROP':
+				$this->drop();
+				break;
+			case 'CLUSTERED':
+			case 'BITMAP':
+			case 'UNIQUE':
+			case 'FULLTEXT':
+			case 'HASH':
+				// Add index Option
+				$this->addIndexOpt( $this->currentElement );
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* Processes XML cdata.
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Index field name
+			case 'COL':
+				$this->addField( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'INDEX':
+				xml_set_object( $parser, $this->parent );
+				break;
+		}
+	}
+	
+	/**
+	* Adds a field to the index
+	*
+	* @param string $name Field name
+	* @return string Field list
+	*/
+	function addField( $name ) {
+		$this->columns[$this->FieldID( $name )] = $name;
+		
+		// Return the field list
+		return $this->columns;
+	}
+	
+	/**
+	* Adds options to the index
+	*
+	* @param string $opt Comma-separated list of index options.
+	* @return string Option list
+	*/
+	function addIndexOpt( $opt ) {
+		$this->opts[] = $opt;
+		
+		// Return the options list
+		return $this->opts;
+	}
+	
+	/**
+	* Generates the SQL that will create the index in the database
+	*
+	* @param object $xmls adoSchema object
+	* @return array Array containing index creation SQL
+	*/
+	function create( &$xmls ) {
+		if( $this->drop ) {
+			return NULL;
+		}
+		
+		// eliminate any columns that aren't in the table
+		foreach( $this->columns as $id => $col ) {
+			if( !isset( $this->parent->fields[$id] ) ) {
+				unset( $this->columns[$id] );
+			}
+		}
+		
+		return $xmls->dict->CreateIndexSQL( $this->name, $this->parent->name, $this->columns, $this->opts );
+	}
+	
+	/**
+	* Marks an index for destruction
+	*/
+	function drop() {
+		$this->drop = TRUE;
+	}
+}
+
+/**
+* Creates a data object in ADOdb's datadict format
+*
+* This class stores information about table data.
+*
+* @package axmls
+* @access private
+*/
+class dbData extends dbObject {
+	
+	var $data = array();
+	
+	var $row;
+	
+	/**
+	* Initializes the new dbIndex object.
+	*
+	* @param object $parent Parent object
+	* @param array $attributes Attributes
+	*
+	* @internal
+	*/
+	function dbData( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* Processes XML opening tags. 
+	* Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'ROW':
+				$this->row = count( $this->data );
+				$this->data[$this->row] = array();
+				break;
+			case 'F':
+				$this->addField($attributes);
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* Processes XML cdata.
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Index field name
+			case 'F':
+				$this->addData( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'DATA':
+				xml_set_object( $parser, $this->parent );
+				break;
+		}
+	}
+	
+	/**
+	* Adds a field to the index
+	*
+	* @param string $name Field name
+	* @return string Field list
+	*/
+	function addField( $attributes ) {
+		if( isset( $attributes['NAME'] ) ) {
+			$name = $attributes['NAME'];
+		} else {
+			$name = count($this->data[$this->row]);
+		}
+		
+		// Set the field index so we know where we are
+		$this->current_field = $this->FieldID( $name );
+	}
+	
+	/**
+	* Adds options to the index
+	*
+	* @param string $opt Comma-separated list of index options.
+	* @return string Option list
+	*/
+	function addData( $cdata ) {
+		if( !isset( $this->data[$this->row] ) ) {
+			$this->data[$this->row] = array();
+		}
+		
+		if( !isset( $this->data[$this->row][$this->current_field] ) ) {
+			$this->data[$this->row][$this->current_field] = '';
+		}
+		
+		$this->data[$this->row][$this->current_field] .= $cdata;
+	}
+	
+	/**
+	* Generates the SQL that will create the index in the database
+	*
+	* @param object $xmls adoSchema object
+	* @return array Array containing index creation SQL
+	*/
+	function create( &$xmls ) {
+		$table = $xmls->dict->TableName($this->parent->name);
+		$table_field_count = count($this->parent->fields);
+		$sql = array();
+		
+		// eliminate any columns that aren't in the table
+		foreach( $this->data as $row ) {
+			$table_fields = $this->parent->fields;
+			$fields = array();
+			
+			foreach( $row as $field_id => $field_data ) {
+				if( !array_key_exists( $field_id, $table_fields ) ) {
+					if( is_numeric( $field_id ) ) {
+						$field_id = reset( array_keys( $table_fields ) );
+					} else {
+						continue;
+					}
+				}
+				
+				$name = $table_fields[$field_id]['NAME'];
+				
+				switch( $table_fields[$field_id]['TYPE'] ) {
+					case 'C':
+					case 'C2':
+					case 'X':
+					case 'X2':
+						$fields[$name] = $xmls->db->qstr( $field_data );
+						break;
+					case 'I':
+					case 'I1':
+					case 'I2':
+					case 'I4':
+					case 'I8':
+						$fields[$name] = intval($field_data);
+						break;
+					default:
+						$fields[$name] = $field_data;
+				}
+				
+				unset($table_fields[$field_id]);
+			}
+			
+			// check that at least 1 column is specified
+			if( empty( $fields ) ) {
+				continue;
+			}
+			
+			// check that no required columns are missing
+			if( count( $fields ) < $table_field_count ) {
+				foreach( $table_fields as $field ) {
+					if (isset( $field['OPTS'] ))
+						if( ( in_array( 'NOTNULL', $field['OPTS'] ) || in_array( 'KEY', $field['OPTS'] ) ) && !in_array( 'AUTOINCREMENT', $field['OPTS'] ) ) {
+							continue(2);
+						}
+				}
+			}
+			
+			$sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')';
+		}
+		
+		return $sql;
+	}
+}
+
+/**
+* Creates the SQL to execute a list of provided SQL queries
+*
+* @package axmls
+* @access private
+*/
+class dbQuerySet extends dbObject {
+	
+	/**
+	* @var array	List of SQL queries
+	*/
+	var $queries = array();
+	
+	/**
+	* @var string	String used to build of a query line by line
+	*/
+	var $query;
+	
+	/**
+	* @var string	Query prefix key
+	*/
+	var $prefixKey = '';
+	
+	/**
+	* @var boolean	Auto prefix enable (TRUE)
+	*/
+	var $prefixMethod = 'AUTO';
+	
+	/**
+	* Initializes the query set.
+	*
+	* @param object $parent Parent object
+	* @param array $attributes Attributes
+	*/
+	function dbQuerySet( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+			
+		// Overrides the manual prefix key
+		if( isset( $attributes['KEY'] ) ) {
+			$this->prefixKey = $attributes['KEY'];
+		}
+		
+		$prefixMethod = isset( $attributes['PREFIXMETHOD'] ) ? strtoupper( trim( $attributes['PREFIXMETHOD'] ) ) : '';
+		
+		// Enables or disables automatic prefix prepending
+		switch( $prefixMethod ) {
+			case 'AUTO':
+				$this->prefixMethod = 'AUTO';
+				break;
+			case 'MANUAL':
+				$this->prefixMethod = 'MANUAL';
+				break;
+			case 'NONE':
+				$this->prefixMethod = 'NONE';
+				break;
+		}
+	}
+	
+	/**
+	* XML Callback to process start elements. Elements currently 
+	* processed are: QUERY. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'QUERY':
+				// Create a new query in a SQL queryset.
+				// Ignore this query set if a platform is specified and it's different than the 
+				// current connection platform.
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					$this->newQuery();
+				} else {
+					$this->discardQuery();
+				}
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Line of queryset SQL data
+			case 'QUERY':
+				$this->buildQuery( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'QUERY':
+				// Add the finished query to the open query set.
+				$this->addQuery();
+				break;
+			case 'SQL':
+				$this->parent->addSQL( $this->create( $this->parent ) );
+				xml_set_object( $parser, $this->parent );
+				$this->destroy();
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* Re-initializes the query.
+	*
+	* @return boolean TRUE
+	*/
+	function newQuery() {
+		$this->query = '';
+		
+		return TRUE;
+	}
+	
+	/**
+	* Discards the existing query.
+	*
+	* @return boolean TRUE
+	*/
+	function discardQuery() {
+		unset( $this->query );
+		
+		return TRUE;
+	}
+	
+	/** 
+	* Appends a line to a query that is being built line by line
+	*
+	* @param string $data Line of SQL data or NULL to initialize a new query
+	* @return string SQL query string.
+	*/
+	function buildQuery( $sql = NULL ) {
+		if( !isset( $this->query ) OR empty( $sql ) ) {
+			return FALSE;
+		}
+		
+		$this->query .= $sql;
+		
+		return $this->query;
+	}
+	
+	/**
+	* Adds a completed query to the query list
+	*
+	* @return string	SQL of added query
+	*/
+	function addQuery() {
+		if( !isset( $this->query ) ) {
+			return FALSE;
+		}
+		
+		$this->queries[] = $return = trim($this->query);
+		
+		unset( $this->query );
+		
+		return $return;
+	}
+	
+	/**
+	* Creates and returns the current query set
+	*
+	* @param object $xmls adoSchema object
+	* @return array Query set
+	*/
+	function create( &$xmls ) {
+		foreach( $this->queries as $id => $query ) {
+			switch( $this->prefixMethod ) {
+				case 'AUTO':
+					// Enable auto prefix replacement
+					
+					// Process object prefix.
+					// Evaluate SQL statements to prepend prefix to objects
+					$query = $this->prefixQuery( '/^\s*((?is)INSERT\s+(INTO\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix );
+					$query = $this->prefixQuery( '/^\s*((?is)UPDATE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix );
+					$query = $this->prefixQuery( '/^\s*((?is)DELETE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix );
+					
+					// SELECT statements aren't working yet
+					#$data = preg_replace( '/(?ias)(^\s*SELECT\s+.*\s+FROM)\s+(\W\s*,?\s*)+((?i)\s+WHERE.*$)/', "\1 $prefix\2 \3", $data );
+					
+				case 'MANUAL':
+					// If prefixKey is set and has a value then we use it to override the default constant XMLS_PREFIX.
+					// If prefixKey is not set, we use the default constant XMLS_PREFIX
+					if( isset( $this->prefixKey ) AND( $this->prefixKey !== '' ) ) {
+						// Enable prefix override
+						$query = str_replace( $this->prefixKey, $xmls->objectPrefix, $query );
+					} else {
+						// Use default replacement
+						$query = str_replace( XMLS_PREFIX , $xmls->objectPrefix, $query );
+					}
+			}
+			
+			$this->queries[$id] = trim( $query );
+		}
+		
+		// Return the query set array
+		return $this->queries;
+	}
+	
+	/**
+	* Rebuilds the query with the prefix attached to any objects
+	*
+	* @param string $regex Regex used to add prefix
+	* @param string $query SQL query string
+	* @param string $prefix Prefix to be appended to tables, indices, etc.
+	* @return string Prefixed SQL query string.
+	*/
+	function prefixQuery( $regex, $query, $prefix = NULL ) {
+		if( !isset( $prefix ) ) {
+			return $query;
+		}
+		
+		if( preg_match( $regex, $query, $match ) ) {
+			$preamble = $match[1];
+			$postamble = $match[5];
+			$objectList = explode( ',', $match[3] );
+			// $prefix = $prefix . '_';
+			
+			$prefixedList = '';
+			
+			foreach( $objectList as $object ) {
+				if( $prefixedList !== '' ) {
+					$prefixedList .= ', ';
+				}
+				
+				$prefixedList .= $prefix . trim( $object );
+			}
+			
+			$query = $preamble . ' ' . $prefixedList . ' ' . $postamble;
+		}
+		
+		return $query;
+	}
+}
+
+/**
+* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
+* 
+* This class is used to load and parse the XML file, to create an array of SQL statements
+* that can be used to build a database, and to build the database using the SQL array.
+*
+* @tutorial getting_started.pkg
+*
+* @author Richard Tango-Lowy & Dan Cech
+* @version $Revision: 350 $
+*
+* @package axmls
+*/
+class adoSchema {
+	
+	/**
+	* @var array	Array containing SQL queries to generate all objects
+	* @access private
+	*/
+	var $sqlArray;
+	
+	/**
+	* @var object	ADOdb connection object
+	* @access private
+	*/
+	var $db;
+	
+	/**
+	* @var object	ADOdb Data Dictionary
+	* @access private
+	*/
+	var $dict;
+	
+	/**
+	* @var string Current XML element
+	* @access private
+	*/
+	var $currentElement = '';
+	
+	/**
+	* @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database
+	* @access private
+	*/
+	var $upgrade = '';
+	
+	/**
+	* @var string Optional object prefix
+	* @access private
+	*/
+	var $objectPrefix = '';
+	
+	/**
+	* @var long	Original Magic Quotes Runtime value
+	* @access private
+	*/
+	var $mgq;
+	
+	/**
+	* @var long	System debug
+	* @access private
+	*/
+	var $debug;
+	
+	/**
+	* @var string Regular expression to find schema version
+	* @access private
+	*/
+	var $versionRegex = '/<schema.*?( version="([^"]*)")?.*?>/';
+	
+	/**
+	* @var string Current schema version
+	* @access private
+	*/
+	var $schemaVersion;
+	
+	/**
+	* @var int	Success of last Schema execution
+	*/
+	var $success;
+	
+	/**
+	* @var bool	Execute SQL inline as it is generated
+	*/
+	var $executeInline;
+	
+	/**
+	* @var bool	Continue SQL execution if errors occur
+	*/
+	var $continueOnError;
+	
+	/**
+	* Creates an adoSchema object
+	*
+	* Creating an adoSchema object is the first step in processing an XML schema.
+	* The only parameter is an ADOdb database connection object, which must already
+	* have been created.
+	*
+	* @param object $db ADOdb database connection object.
+	*/
+	function adoSchema( &$db ) {
+		// Initialize the environment
+		$this->mgq = get_magic_quotes_runtime();
+		set_magic_quotes_runtime(0);
+		
+		$this->db =& $db;
+		$this->debug = $this->db->debug;
+		$this->dict = NewDataDictionary( $this->db );
+		$this->sqlArray = array();
+		$this->schemaVersion = XMLS_SCHEMA_VERSION;
+		$this->executeInline( XMLS_EXECUTE_INLINE );
+		$this->continueOnError( XMLS_CONTINUE_ON_ERROR );
+		$this->setUpgradeMethod();
+	}
+	
+	/**
+	* Sets the method to be used for upgrading an existing database
+	*
+	* Use this method to specify how existing database objects should be upgraded.
+	* The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to
+	* alter each database object directly, REPLACE attempts to rebuild each object
+	* from scratch, BEST attempts to determine the best upgrade method for each
+	* object, and NONE disables upgrading.
+	*
+	* This method is not yet used by AXMLS, but exists for backward compatibility.
+	* The ALTER method is automatically assumed when the adoSchema object is
+	* instantiated; other upgrade methods are not currently supported.
+	*
+	* @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE)
+	* @returns string Upgrade method used
+	*/
+	function SetUpgradeMethod( $method = '' ) {
+		if( !is_string( $method ) ) {
+			return FALSE;
+		}
+		
+		$method = strtoupper( $method );
+		
+		// Handle the upgrade methods
+		switch( $method ) {
+			case 'ALTER':
+				$this->upgrade = $method;
+				break;
+			case 'REPLACE':
+				$this->upgrade = $method;
+				break;
+			case 'BEST':
+				$this->upgrade = 'ALTER';
+				break;
+			case 'NONE':
+				$this->upgrade = 'NONE';
+				break;
+			default:
+				// Use default if no legitimate method is passed.
+				$this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD;
+		}
+		
+		return $this->upgrade;
+	}
+	
+	/**
+	* Enables/disables inline SQL execution.
+	*
+	* Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution),
+	* AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode
+	* is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema()
+	* to apply the schema to the database.
+	*
+	* @param bool $mode execute
+	* @return bool current execution mode
+	*
+	* @see ParseSchema(), ExecuteSchema()
+	*/
+	function ExecuteInline( $mode = NULL ) {
+		if( is_bool( $mode ) ) {
+			$this->executeInline = $mode;
+		}
+		
+		return $this->executeInline;
+	}
+	
+	/**
+	* Enables/disables SQL continue on error.
+	*
+	* Call this method to enable or disable continuation of SQL execution if an error occurs.
+	* If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs.
+	* If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing
+	* of the schema will continue.
+	*
+	* @param bool $mode execute
+	* @return bool current continueOnError mode
+	*
+	* @see addSQL(), ExecuteSchema()
+	*/
+	function ContinueOnError( $mode = NULL ) {
+		if( is_bool( $mode ) ) {
+			$this->continueOnError = $mode;
+		}
+		
+		return $this->continueOnError;
+	}
+	
+	/**
+	* Loads an XML schema from a file and converts it to SQL.
+	*
+	* Call this method to load the specified schema (see the DTD for the proper format) from
+	* the filesystem and generate the SQL necessary to create the database described. 
+	* @see ParseSchemaString()
+	*
+	* @param string $file Name of XML schema file.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute
+	*/
+	function ParseSchema( $filename, $returnSchema = FALSE ) {
+		return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema );
+	}
+	
+	/**
+	* Loads an XML schema from a file and converts it to SQL.
+	*
+	* Call this method to load the specified schema from a file (see the DTD for the proper format) 
+	* and generate the SQL necessary to create the database described by the schema.
+	*
+	* @param string $file Name of XML schema file.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute.
+	*
+	* @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString()
+	* @see ParseSchema(), ParseSchemaString()
+	*/
+	function ParseSchemaFile( $filename, $returnSchema = FALSE ) {
+		// Open the file
+		if( !($fp = fopen( $filename, 'r' )) ) {
+			// die( 'Unable to open file' );
+			return FALSE;
+		}
+		
+		// do version detection here
+		if( $this->SchemaFileVersion( $filename ) != $this->schemaVersion ) {
+			return FALSE;
+		}
+		
+		if ( $returnSchema )
+		{
+			$xmlstring = '';
+			while( $data = fread( $fp, 100000 ) ) {
+				$xmlstring .= $data;
+			}
+			return $xmlstring;
+		}
+		
+		$this->success = 2;
+		
+		$xmlParser = $this->create_parser();
+		
+		// Process the file
+		while( $data = fread( $fp, 4096 ) ) {
+			if( !xml_parse( $xmlParser, $data, feof( $fp ) ) ) {
+				die( sprintf(
+					"XML error: %s at line %d",
+					xml_error_string( xml_get_error_code( $xmlParser) ),
+					xml_get_current_line_number( $xmlParser)
+				) );
+			}
+		}
+		
+		xml_parser_free( $xmlParser );
+		
+		return $this->sqlArray;
+	}
+	
+	/**
+	* Converts an XML schema string to SQL.
+	*
+	* Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+	* and generate the SQL necessary to create the database described by the schema. 
+	* @see ParseSchema()
+	*
+	* @param string $xmlstring XML schema string.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute.
+	*/
+	function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) {
+		if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
+			return FALSE;
+		}
+		
+		// do version detection here
+		if( $this->SchemaStringVersion( $xmlstring ) != $this->schemaVersion ) {
+			return FALSE;
+		}
+		
+		if ( $returnSchema )
+		{
+			return $xmlstring;
+		}
+		
+		$this->success = 2;
+		
+		$xmlParser = $this->create_parser();
+		
+		if( !xml_parse( $xmlParser, $xmlstring, TRUE ) ) {
+			die( sprintf(
+				"XML error: %s at line %d",
+				xml_error_string( xml_get_error_code( $xmlParser) ),
+				xml_get_current_line_number( $xmlParser)
+			) );
+		}
+		
+		xml_parser_free( $xmlParser );
+		
+		return $this->sqlArray;
+	}
+	
+	/**
+	* Loads an XML schema from a file and converts it to uninstallation SQL.
+	*
+	* Call this method to load the specified schema (see the DTD for the proper format) from
+	* the filesystem and generate the SQL necessary to remove the database described.
+	* @see RemoveSchemaString()
+	*
+	* @param string $file Name of XML schema file.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute
+	*/
+	function RemoveSchema( $filename, $returnSchema = FALSE ) {
+		return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema );
+	}
+	
+	/**
+	* Converts an XML schema string to uninstallation SQL.
+	*
+	* Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+	* and generate the SQL necessary to uninstall the database described by the schema. 
+	* @see RemoveSchema()
+	*
+	* @param string $schema XML schema string.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute.
+	*/
+	function RemoveSchemaString( $schema, $returnSchema = FALSE ) {
+		
+		// grab current version
+		if( !( $version = $this->SchemaStringVersion( $schema ) ) ) {
+			return FALSE;
+		}
+		
+		return $this->ParseSchemaString( $this->TransformSchema( $schema, 'remove-' . $version), $returnSchema );
+	}
+	
+	/**
+	* Applies the current XML schema to the database (post execution).
+	*
+	* Call this method to apply the current schema (generally created by calling 
+	* ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, 
+	* and executing other SQL specified in the schema) after parsing.
+	* @see ParseSchema(), ParseSchemaString(), ExecuteInline()
+	*
+	* @param array $sqlArray Array of SQL statements that will be applied rather than
+	*		the current schema.
+	* @param boolean $continueOnErr Continue to apply the schema even if an error occurs.
+	* @returns integer 0 if failure, 1 if errors, 2 if successful.
+	*/
+	function ExecuteSchema( $sqlArray = NULL, $continueOnErr =  NULL ) {
+		if( !is_bool( $continueOnErr ) ) {
+			$continueOnErr = $this->ContinueOnError();
+		}
+		
+		if( !isset( $sqlArray ) ) {
+			$sqlArray = $this->sqlArray;
+		}
+		
+		if( !is_array( $sqlArray ) ) {
+			$this->success = 0;
+		} else {
+			$this->success = $this->dict->ExecuteSQLArray( $sqlArray, $continueOnErr );
+		}
+		
+		return $this->success;
+	}
+	
+	/**
+	* Returns the current SQL array. 
+	*
+	* Call this method to fetch the array of SQL queries resulting from 
+	* ParseSchema() or ParseSchemaString(). 
+	*
+	* @param string $format Format: HTML, TEXT, or NONE (PHP array)
+	* @return array Array of SQL statements or FALSE if an error occurs
+	*/
+	function PrintSQL( $format = 'NONE' ) {
+		$sqlArray = null;
+		return $this->getSQL( $format, $sqlArray );
+	}
+	
+	/**
+	* Saves the current SQL array to the local filesystem as a list of SQL queries.
+	*
+	* Call this method to save the array of SQL queries (generally resulting from a
+	* parsed XML schema) to the filesystem.
+	*
+	* @param string $filename Path and name where the file should be saved.
+	* @return boolean TRUE if save is successful, else FALSE. 
+	*/
+	function SaveSQL( $filename = './schema.sql' ) {
+		
+		if( !isset( $sqlArray ) ) {
+			$sqlArray = $this->sqlArray;
+		}
+		if( !isset( $sqlArray ) ) {
+			return FALSE;
+		}
+		
+		$fp = fopen( $filename, "w" );
+		
+		foreach( $sqlArray as $key => $query ) {
+			fwrite( $fp, $query . ";\n" );
+		}
+		fclose( $fp );
+	}
+	
+	/**
+	* Create an xml parser
+	*
+	* @return object PHP XML parser object
+	*
+	* @access private
+	*/
+	function &create_parser() {
+		// Create the parser
+		$xmlParser = xml_parser_create();
+		xml_set_object( $xmlParser, $this );
+		
+		// Initialize the XML callback functions
+		xml_set_element_handler( $xmlParser, '_tag_open', '_tag_close' );
+		xml_set_character_data_handler( $xmlParser, '_tag_cdata' );
+		
+		return $xmlParser;
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		switch( strtoupper( $tag ) ) {
+			case 'TABLE':
+				$this->obj = new dbTable( $this, $attributes );
+				xml_set_object( $parser, $this->obj );
+				break;
+			case 'SQL':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					$this->obj = new dbQuerySet( $this, $attributes );
+					xml_set_object( $parser, $this->obj );
+				}
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+		
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	* @internal
+	*/
+	function _tag_close( &$parser, $tag ) {
+		
+	}
+	
+	/**
+	* Converts an XML schema string to the specified DTD version.
+	*
+	* Call this method to convert a string containing an XML schema to a different AXMLS
+	* DTD version. For instance, to convert a schema created for an pre-1.0 version for 
+	* AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version 
+	* parameter is specified, the schema will be converted to the current DTD version. 
+	* If the newFile parameter is provided, the converted schema will be written to the specified
+	* file.
+	* @see ConvertSchemaFile()
+	*
+	* @param string $schema String containing XML schema that will be converted.
+	* @param string $newVersion DTD version to convert to.
+	* @param string $newFile File name of (converted) output file.
+	* @return string Converted XML schema or FALSE if an error occurs.
+	*/
+	function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) {
+		
+		// grab current version
+		if( !( $version = $this->SchemaStringVersion( $schema ) ) ) {
+			return FALSE;
+		}
+		
+		if( !isset ($newVersion) ) {
+			$newVersion = $this->schemaVersion;
+		}
+		
+		if( $version == $newVersion ) {
+			$result = $schema;
+		} else {
+			$result = $this->TransformSchema( $schema, 'convert-' . $version . '-' . $newVersion);
+		}
+		
+		if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) {
+			fwrite( $fp, $result );
+			fclose( $fp );
+		}
+		
+		return $result;
+	}
+	
+	// compat for pre-4.3 - jlim
+	function _file_get_contents($path)
+	{
+		if (function_exists('file_get_contents')) return file_get_contents($path);
+		return join('',file($path));
+	}
+	
+	/**
+	* Converts an XML schema file to the specified DTD version.
+	*
+	* Call this method to convert the specified XML schema file to a different AXMLS
+	* DTD version. For instance, to convert a schema created for an pre-1.0 version for 
+	* AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version 
+	* parameter is specified, the schema will be converted to the current DTD version. 
+	* If the newFile parameter is provided, the converted schema will be written to the specified
+	* file.
+	* @see ConvertSchemaString()
+	*
+	* @param string $filename Name of XML schema file that will be converted.
+	* @param string $newVersion DTD version to convert to.
+	* @param string $newFile File name of (converted) output file.
+	* @return string Converted XML schema or FALSE if an error occurs.
+	*/
+	function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) {
+		
+		// grab current version
+		if( !( $version = $this->SchemaFileVersion( $filename ) ) ) {
+			return FALSE;
+		}
+		
+		if( !isset ($newVersion) ) {
+			$newVersion = $this->schemaVersion;
+		}
+		
+		if( $version == $newVersion ) {
+			$result = _file_get_contents( $filename );
+			
+			// remove unicode BOM if present
+			if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) {
+				$result = substr( $result, 3 );
+			}
+		} else {
+			$result = $this->TransformSchema( $filename, 'convert-' . $version . '-' . $newVersion, 'file' );
+		}
+		
+		if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) {
+			fwrite( $fp, $result );
+			fclose( $fp );
+		}
+		
+		return $result;
+	}
+	
+	function TransformSchema( $schema, $xsl, $schematype='string' )
+	{
+		// Fail if XSLT extension is not available
+		if( ! function_exists( 'xslt_create' ) ) {
+			return FALSE;
+		}
+		
+		$xsl_file = dirname( __FILE__ ) . '/xsl/' . $xsl . '.xsl';
+		
+		// look for xsl
+		if( !is_readable( $xsl_file ) ) {
+			return FALSE;
+		}
+		
+		switch( $schematype )
+		{
+			case 'file':
+				if( !is_readable( $schema ) ) {
+					return FALSE;
+				}
+				
+				$schema = _file_get_contents( $schema );
+				break;
+			case 'string':
+			default:
+				if( !is_string( $schema ) ) {
+					return FALSE;
+				}
+		}
+		
+		$arguments = array (
+			'/_xml' => $schema,
+			'/_xsl' => _file_get_contents( $xsl_file )
+		);
+		
+		// create an XSLT processor
+		$xh = xslt_create ();
+		
+		// set error handler
+		xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler'));
+		
+		// process the schema
+		$result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); 
+		
+		xslt_free ($xh);
+		
+		return $result;
+	}
+	
+	/**
+	* Processes XSLT transformation errors
+	*
+	* @param object $parser XML parser object
+	* @param integer $errno Error number
+	* @param integer $level Error level
+	* @param array $fields Error information fields
+	*
+	* @access private
+	*/
+	function xslt_error_handler( $parser, $errno, $level, $fields ) {
+		if( is_array( $fields ) ) {
+			$msg = array(
+				'Message Type' => ucfirst( $fields['msgtype'] ),
+				'Message Code' => $fields['code'],
+				'Message' => $fields['msg'],
+				'Error Number' => $errno,
+				'Level' => $level
+			);
+			
+			switch( $fields['URI'] ) {
+				case 'arg:/_xml':
+					$msg['Input'] = 'XML';
+					break;
+				case 'arg:/_xsl':
+					$msg['Input'] = 'XSL';
+					break;
+				default:
+					$msg['Input'] = $fields['URI'];
+			}
+			
+			$msg['Line'] = $fields['line'];
+		} else {
+			$msg = array(
+				'Message Type' => 'Error',
+				'Error Number' => $errno,
+				'Level' => $level,
+				'Fields' => var_export( $fields, TRUE )
+			);
+		}
+		
+		$error_details = $msg['Message Type'] . ' in XSLT Transformation' . "\n"
+					   . '<table>' . "\n";
+		
+		foreach( $msg as $label => $details ) {
+			$error_details .= '<tr><td><b>' . $label . ': </b></td><td>' . htmlentities( $details ) . '</td></tr>' . "\n";
+		}
+		
+		$error_details .= '</table>';
+		
+		trigger_error( $error_details, E_USER_ERROR );
+	}
+	
+	/**
+	* Returns the AXMLS Schema Version of the requested XML schema file.
+	*
+	* Call this method to obtain the AXMLS DTD version of the requested XML schema file.
+	* @see SchemaStringVersion()
+	*
+	* @param string $filename AXMLS schema file
+	* @return string Schema version number or FALSE on error
+	*/
+	function SchemaFileVersion( $filename ) {
+		// Open the file
+		if( !($fp = fopen( $filename, 'r' )) ) {
+			// die( 'Unable to open file' );
+			return FALSE;
+		}
+		
+		// Process the file
+		while( $data = fread( $fp, 4096 ) ) {
+			if( preg_match( $this->versionRegex, $data, $matches ) ) {
+				return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION;
+			}
+		}
+		
+		return FALSE;
+	}
+	
+	/**
+	* Returns the AXMLS Schema Version of the provided XML schema string.
+	*
+	* Call this method to obtain the AXMLS DTD version of the provided XML schema string.
+	* @see SchemaFileVersion()
+	*
+	* @param string $xmlstring XML schema string
+	* @return string Schema version number or FALSE on error
+	*/
+	function SchemaStringVersion( $xmlstring ) {
+		if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
+			return FALSE;
+		}
+		
+		if( preg_match( $this->versionRegex, $xmlstring, $matches ) ) {
+			return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION;
+		}
+		
+		return FALSE;
+	}
+	
+	/**
+	* Extracts an XML schema from an existing database.
+	*
+	* Call this method to create an XML schema string from an existing database.
+	* If the data parameter is set to TRUE, AXMLS will include the data from the database
+	* in the schema. 
+	*
+	* @param boolean $data Include data in schema dump
+	* @return string Generated XML schema
+	*/
+	function ExtractSchema( $data = FALSE ) {
+		$old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM );
+		
+		$schema = '<?xml version="1.0"?>' . "\n"
+				. '<schema version="' . $this->schemaVersion . '">' . "\n";
+		
+		if( is_array( $tables = $this->db->MetaTables( 'TABLES' ) ) ) {
+			foreach( $tables as $table ) {
+				$schema .= '	<table name="' . $table . '">' . "\n";
+				
+				// grab details from database
+				$rs = $this->db->Execute( 'SELECT * FROM ' . $table . ' WHERE 1=1' );
+				$fields = $this->db->MetaColumns( $table );
+				$indexes = $this->db->MetaIndexes( $table );
+				
+				if( is_array( $fields ) ) {
+					foreach( $fields as $details ) {
+						$extra = '';
+						$content = array();
+						
+						if( $details->max_length > 0 ) {
+							$extra .= ' size="' . $details->max_length . '"';
+						}
+						
+						if( $details->primary_key ) {
+							$content[] = '<KEY/>';
+						} elseif( $details->not_null ) {
+							$content[] = '<NOTNULL/>';
+						}
+						
+						if( $details->has_default ) {
+							$content[] = '<DEFAULT value="' . $details->default_value . '"/>';
+						}
+						
+						if( $details->auto_increment ) {
+							$content[] = '<AUTOINCREMENT/>';
+						}
+						
+						// this stops the creation of 'R' columns,
+						// AUTOINCREMENT is used to create auto columns
+						$details->primary_key = 0;
+						$type = $rs->MetaType( $details );
+						
+						$schema .= '		<field name="' . $details->name . '" type="' . $type . '"' . $extra . '>';
+						
+						if( !empty( $content ) ) {
+							$schema .= "\n			" . implode( "\n			", $content ) . "\n		";
+						}
+						
+						$schema .= '</field>' . "\n";
+					}
+				}
+				
+				if( is_array( $indexes ) ) {
+					foreach( $indexes as $index => $details ) {
+						$schema .= '		<index name="' . $index . '">' . "\n";
+						
+						if( $details['unique'] ) {
+							$schema .= '			<UNIQUE/>' . "\n";
+						}
+						
+						foreach( $details['columns'] as $column ) {
+							$schema .= '			<col>' . $column . '</col>' . "\n";
+						}
+						
+						$schema .= '		</index>' . "\n";
+					}
+				}
+				
+				if( $data ) {
+					$rs = $this->db->Execute( 'SELECT * FROM ' . $table );
+					
+					if( is_object( $rs ) ) {
+						$schema .= '		<data>' . "\n";
+						
+						while( $row = $rs->FetchRow() ) {
+							foreach( $row as $key => $val ) {
+								$row[$key] = htmlentities($val);
+							}
+							
+							$schema .= '			<row><f>' . implode( '</f><f>', $row ) . '</f></row>' . "\n";
+						}
+						
+						$schema .= '		</data>' . "\n";
+					}
+				}
+				
+				$schema .= '	</table>' . "\n";
+			}
+		}
+		
+		$this->db->SetFetchMode( $old_mode );
+		
+		$schema .= '</schema>';
+		return $schema;
+	}
+	
+	/**
+	* Sets a prefix for database objects
+	*
+	* Call this method to set a standard prefix that will be prepended to all database tables 
+	* and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
+	*
+	* @param string $prefix Prefix that will be prepended.
+	* @param boolean $underscore If TRUE, automatically append an underscore character to the prefix.
+	* @return boolean TRUE if successful, else FALSE
+	*/
+	function SetPrefix( $prefix = '', $underscore = TRUE ) {
+		switch( TRUE ) {
+			// clear prefix
+			case empty( $prefix ):
+				logMsg( 'Cleared prefix' );
+				$this->objectPrefix = '';
+				return TRUE;
+			// prefix too long
+			case strlen( $prefix ) > XMLS_PREFIX_MAXLEN:
+			// prefix contains invalid characters
+			case !preg_match( '/^[a-z][a-z0-9_]+$/i', $prefix ):
+				logMsg( 'Invalid prefix: ' . $prefix );
+				return FALSE;
+		}
+		
+		if( $underscore AND substr( $prefix, -1 ) != '_' ) {
+			$prefix .= '_';
+		}
+		
+		// prefix valid
+		logMsg( 'Set prefix: ' . $prefix );
+		$this->objectPrefix = $prefix;
+		return TRUE;
+	}
+	
+	/**
+	* Returns an object name with the current prefix prepended.
+	*
+	* @param string	$name Name
+	* @return string	Prefixed name
+	*
+	* @access private
+	*/
+	function prefix( $name = '' ) {
+		// if prefix is set
+		if( !empty( $this->objectPrefix ) ) {
+			// Prepend the object prefix to the table name
+			// prepend after quote if used
+			return preg_replace( '/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name );
+		}
+		
+		// No prefix set. Use name provided.
+		return $name;
+	}
+	
+	/**
+	* Checks if element references a specific platform
+	*
+	* @param string $platform Requested platform
+	* @returns boolean TRUE if platform check succeeds
+	*
+	* @access private
+	*/
+	function supportedPlatform( $platform = NULL ) {
+		$regex = '/^(\w*\|)*' . $this->db->databaseType . '(\|\w*)*$/';
+		
+		if( !isset( $platform ) OR preg_match( $regex, $platform ) ) {
+			logMsg( "Platform $platform is supported" );
+			return TRUE;
+		} else {
+			logMsg( "Platform $platform is NOT supported" );
+			return FALSE;
+		}
+	}
+	
+	/**
+	* Clears the array of generated SQL.
+	*
+	* @access private
+	*/
+	function clearSQL() {
+		$this->sqlArray = array();
+	}
+	
+	/**
+	* Adds SQL into the SQL array.
+	*
+	* @param mixed $sql SQL to Add
+	* @return boolean TRUE if successful, else FALSE.
+	*
+	* @access private
+	*/	
+	function addSQL( $sql = NULL ) {
+		if( is_array( $sql ) ) {
+			foreach( $sql as $line ) {
+				$this->addSQL( $line );
+			}
+			
+			return TRUE;
+		}
+		
+		if( is_string( $sql ) ) {
+			$this->sqlArray[] = $sql;
+			
+			// if executeInline is enabled, and either no errors have occurred or continueOnError is enabled, execute SQL.
+			if( $this->ExecuteInline() && ( $this->success == 2 || $this->ContinueOnError() ) ) {
+				$saved = $this->db->debug;
+				$this->db->debug = $this->debug;
+				$ok = $this->db->Execute( $sql );
+				$this->db->debug = $saved;
+				
+				if( !$ok ) {
+					if( $this->debug ) {
+						ADOConnection::outp( $this->db->ErrorMsg() );
+					}
+					
+					$this->success = 1;
+				}
+			}
+			
+			return TRUE;
+		}
+		
+		return FALSE;
+	}
+	
+	/**
+	* Gets the SQL array in the specified format.
+	*
+	* @param string $format Format
+	* @return mixed SQL
+	*	
+	* @access private
+	*/
+	function getSQL( $format = NULL, $sqlArray = NULL ) {
+		if( !is_array( $sqlArray ) ) {
+			$sqlArray = $this->sqlArray;
+		}
+		
+		if( !is_array( $sqlArray ) ) {
+			return FALSE;
+		}
+		
+		switch( strtolower( $format ) ) {
+			case 'string':
+			case 'text':
+				return !empty( $sqlArray ) ? implode( ";\n\n", $sqlArray ) . ';' : '';
+			case'html':
+				return !empty( $sqlArray ) ? nl2br( htmlentities( implode( ";\n\n", $sqlArray ) . ';' ) ) : '';
+		}
+		
+		return $this->sqlArray;
+	}
+	
+	/**
+	* Destroys an adoSchema object.
+	*
+	* Call this method to clean up after an adoSchema object that is no longer in use.
+	* @deprecated adoSchema now cleans up automatically.
+	*/
+	function Destroy() {
+		set_magic_quotes_runtime( $this->mgq );
+		unset( $this );
+	}
+}
+
+/**
+* Message logging function
+*
+* @access private
+*/
+function logMsg( $msg, $title = NULL, $force = FALSE ) {
+	if( XMLS_DEBUG or $force ) {
+		echo '<pre>';
+		
+		if( isset( $title ) ) {
+			echo '<h3>' . htmlentities( $title ) . '</h3>';
+		}
+		
+		if( is_object( $this ) ) {
+			echo '[' . get_class( $this ) . '] ';
+		}
+		
+		print_r( $msg );
+		
+		echo '</pre>';
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb-xmlschema03.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb-xmlschema03.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb-xmlschema03.inc.php	(revision 225)
@@ -0,0 +1,2403 @@
+<?php
+// Copyright (c) 2004-2005 ars Cognita Inc., all rights reserved
+/* ******************************************************************************
+    Released under both BSD license and Lesser GPL library license. 
+ 	Whenever there is any discrepancy between the two licenses, 
+ 	the BSD license will take precedence. 
+*******************************************************************************/
+/**
+ * xmlschema is a class that allows the user to quickly and easily
+ * build a database on any ADOdb-supported platform using a simple
+ * XML schema.
+ *
+ * Last Editor: $Author: cweiske $
+ * @author Richard Tango-Lowy & Dan Cech
+ * @version $Revision: 351 $
+ *
+ * @package axmls
+ * @tutorial getting_started.pkg
+ */
+ 
+function _file_get_contents($file) 
+{
+ 	if (function_exists('file_get_contents')) return file_get_contents($file);
+	
+	$f = fopen($file,'r');
+	if (!$f) return '';
+	$t = '';
+	
+	while ($s = fread($f,100000)) $t .= $s;
+	fclose($f);
+	return $t;
+}
+
+
+/**
+* Debug on or off
+*/
+if( !defined( 'XMLS_DEBUG' ) ) {
+	define( 'XMLS_DEBUG', FALSE );
+}
+
+/**
+* Default prefix key
+*/
+if( !defined( 'XMLS_PREFIX' ) ) {
+	define( 'XMLS_PREFIX', '%%P' );
+}
+
+/**
+* Maximum length allowed for object prefix
+*/
+if( !defined( 'XMLS_PREFIX_MAXLEN' ) ) {
+	define( 'XMLS_PREFIX_MAXLEN', 10 );
+}
+
+/**
+* Execute SQL inline as it is generated
+*/
+if( !defined( 'XMLS_EXECUTE_INLINE' ) ) {
+	define( 'XMLS_EXECUTE_INLINE', FALSE );
+}
+
+/**
+* Continue SQL Execution if an error occurs?
+*/
+if( !defined( 'XMLS_CONTINUE_ON_ERROR' ) ) {
+	define( 'XMLS_CONTINUE_ON_ERROR', FALSE );
+}
+
+/**
+* Current Schema Version
+*/
+if( !defined( 'XMLS_SCHEMA_VERSION' ) ) {
+	define( 'XMLS_SCHEMA_VERSION', '0.3' );
+}
+
+/**
+* Default Schema Version.  Used for Schemas without an explicit version set.
+*/
+if( !defined( 'XMLS_DEFAULT_SCHEMA_VERSION' ) ) {
+	define( 'XMLS_DEFAULT_SCHEMA_VERSION', '0.1' );
+}
+
+/**
+* How to handle data rows that already exist in a database during and upgrade.
+* Options are INSERT (attempts to insert duplicate rows), UPDATE (updates existing
+* rows) and IGNORE (ignores existing rows).
+*/
+if( !defined( 'XMLS_MODE_INSERT' ) ) {
+	define( 'XMLS_MODE_INSERT', 0 );
+}
+if( !defined( 'XMLS_MODE_UPDATE' ) ) {
+	define( 'XMLS_MODE_UPDATE', 1 );
+}
+if( !defined( 'XMLS_MODE_IGNORE' ) ) {
+	define( 'XMLS_MODE_IGNORE', 2 );
+}
+if( !defined( 'XMLS_EXISTING_DATA' ) ) {
+	define( 'XMLS_EXISTING_DATA', XMLS_MODE_INSERT );
+}
+
+/**
+* Default Schema Version.  Used for Schemas without an explicit version set.
+*/
+if( !defined( 'XMLS_DEFAULT_UPGRADE_METHOD' ) ) {
+	define( 'XMLS_DEFAULT_UPGRADE_METHOD', 'ALTER' );
+}
+
+/**
+* Include the main ADODB library
+*/
+if( !defined( '_ADODB_LAYER' ) ) {
+	require( 'adodb.inc.php' );
+	require( 'adodb-datadict.inc.php' );
+}
+
+/**
+* Abstract DB Object. This class provides basic methods for database objects, such
+* as tables and indexes.
+*
+* @package axmls
+* @access private
+*/
+class dbObject {
+	
+	/**
+	* var object Parent
+	*/
+	var $parent;
+	
+	/**
+	* var string current element
+	*/
+	var $currentElement;
+	
+	/**
+	* NOP
+	*/
+	function dbObject( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		
+	}
+	
+	function create() {
+		return array();
+	}
+	
+	/**
+	* Destroys the object
+	*/
+	function destroy() {
+		unset( $this );
+	}
+	
+	/**
+	* Checks whether the specified RDBMS is supported by the current
+	* database object or its ranking ancestor.
+	*
+	* @param string $platform RDBMS platform name (from ADODB platform list).
+	* @return boolean TRUE if RDBMS is supported; otherwise returns FALSE.
+	*/
+	function supportedPlatform( $platform = NULL ) {
+		return is_object( $this->parent ) ? $this->parent->supportedPlatform( $platform ) : TRUE;
+	}
+	
+	/**
+	* Returns the prefix set by the ranking ancestor of the database object.
+	*
+	* @param string $name Prefix string.
+	* @return string Prefix.
+	*/
+	function prefix( $name = '' ) {
+		return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name;
+	}
+	
+	/**
+	* Extracts a field ID from the specified field.
+	*
+	* @param string $field Field.
+	* @return string Field ID.
+	*/
+	function FieldID( $field ) {
+		return strtoupper( preg_replace( '/^`(.+)`$/', '$1', $field ) );
+	}
+}
+
+/**
+* Creates a table object in ADOdb's datadict format
+*
+* This class stores information about a database table. As charactaristics
+* of the table are loaded from the external source, methods and properties
+* of this class are used to build up the table description in ADOdb's
+* datadict format.
+*
+* @package axmls
+* @access private
+*/
+class dbTable extends dbObject {
+	
+	/**
+	* @var string Table name
+	*/
+	var $name;
+	
+	/**
+	* @var array Field specifier: Meta-information about each field
+	*/
+	var $fields = array();
+	
+	/**
+	* @var array List of table indexes.
+	*/
+	var $indexes = array();
+	
+	/**
+	* @var array Table options: Table-level options
+	*/
+	var $opts = array();
+	
+	/**
+	* @var string Field index: Keeps track of which field is currently being processed
+	*/
+	var $current_field;
+	
+	/**
+	* @var boolean Mark table for destruction
+	* @access private
+	*/
+	var $drop_table;
+	
+	/**
+	* @var boolean Mark field for destruction (not yet implemented)
+	* @access private
+	*/
+	var $drop_field = array();
+	
+	/**
+	* @var array Platform-specific options
+	* @access private
+	*/
+	var $currentPlatform = true;
+	
+	
+	/**
+	* Iniitializes a new table object.
+	*
+	* @param string $prefix DB Object prefix
+	* @param array $attributes Array of table attributes.
+	*/
+	function dbTable( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+		$this->name = $this->prefix($attributes['NAME']);
+	}
+	
+	/**
+	* XML Callback to process start elements. Elements currently 
+	* processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'INDEX':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					xml_set_object( $parser, $this->addIndex( $attributes ) );
+				}
+				break;
+			case 'DATA':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					xml_set_object( $parser, $this->addData( $attributes ) );
+				}
+				break;
+			case 'DROP':
+				$this->drop();
+				break;
+			case 'FIELD':
+				// Add a field
+				$fieldName = $attributes['NAME'];
+				$fieldType = $attributes['TYPE'];
+				$fieldSize = isset( $attributes['SIZE'] ) ? $attributes['SIZE'] : NULL;
+				$fieldOpts = !empty( $attributes['OPTS'] ) ? $attributes['OPTS'] : NULL;
+				
+				$this->addField( $fieldName, $fieldType, $fieldSize, $fieldOpts );
+				break;
+			case 'KEY':
+			case 'NOTNULL':
+			case 'AUTOINCREMENT':
+			case 'DEFDATE':
+			case 'DEFTIMESTAMP':
+			case 'UNSIGNED':
+				// Add a field option
+				$this->addFieldOpt( $this->current_field, $this->currentElement );
+				break;
+			case 'DEFAULT':
+				// Add a field option to the table object
+				
+				// Work around ADOdb datadict issue that misinterprets empty strings.
+				if( $attributes['VALUE'] == '' ) {
+					$attributes['VALUE'] = " '' ";
+				}
+				
+				$this->addFieldOpt( $this->current_field, $this->currentElement, $attributes['VALUE'] );
+				break;
+			case 'OPT':
+			case 'CONSTRAINT':
+				// Accept platform-specific options
+				$this->currentPlatform = ( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) );
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Table/field constraint
+			case 'CONSTRAINT':
+				if( isset( $this->current_field ) ) {
+					$this->addFieldOpt( $this->current_field, $this->currentElement, $cdata );
+				} else {
+					$this->addTableOpt( $cdata );
+				}
+				break;
+			// Table/field option
+			case 'OPT':
+				if( isset( $this->current_field ) ) {
+					$this->addFieldOpt( $this->current_field, $cdata );
+				} else {
+				$this->addTableOpt( $cdata );
+				}
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'TABLE':
+				$this->parent->addSQL( $this->create( $this->parent ) );
+				xml_set_object( $parser, $this->parent );
+				$this->destroy();
+				break;
+			case 'FIELD':
+				unset($this->current_field);
+				break;
+			case 'OPT':
+			case 'CONSTRAINT':
+				$this->currentPlatform = true;
+				break;
+			default:
+
+		}
+	}
+	
+	/**
+	* Adds an index to a table object
+	*
+	* @param array $attributes Index attributes
+	* @return object dbIndex object
+	*/
+	function &addIndex( $attributes ) {
+		$name = strtoupper( $attributes['NAME'] );
+		$this->indexes[$name] =& new dbIndex( $this, $attributes );
+		return $this->indexes[$name];
+	}
+	
+	/**
+	* Adds data to a table object
+	*
+	* @param array $attributes Data attributes
+	* @return object dbData object
+	*/
+	function &addData( $attributes ) {
+		if( !isset( $this->data ) ) {
+			$this->data =& new dbData( $this, $attributes );
+		}
+		return $this->data;
+	}
+	
+	/**
+	* Adds a field to a table object
+	*
+	* $name is the name of the table to which the field should be added. 
+	* $type is an ADODB datadict field type. The following field types
+	* are supported as of ADODB 3.40:
+	* 	- C:  varchar
+	*	- X:  CLOB (character large object) or largest varchar size
+	*	   if CLOB is not supported
+	*	- C2: Multibyte varchar
+	*	- X2: Multibyte CLOB
+	*	- B:  BLOB (binary large object)
+	*	- D:  Date (some databases do not support this, and we return a datetime type)
+	*	- T:  Datetime or Timestamp
+	*	- L:  Integer field suitable for storing booleans (0 or 1)
+	*	- I:  Integer (mapped to I4)
+	*	- I1: 1-byte integer
+	*	- I2: 2-byte integer
+	*	- I4: 4-byte integer
+	*	- I8: 8-byte integer
+	*	- F:  Floating point number
+	*	- N:  Numeric or decimal number
+	*
+	* @param string $name Name of the table to which the field will be added.
+	* @param string $type	ADODB datadict field type.
+	* @param string $size	Field size
+	* @param array $opts	Field options array
+	* @return array Field specifier array
+	*/
+	function addField( $name, $type, $size = NULL, $opts = NULL ) {
+		$field_id = $this->FieldID( $name );
+		
+		// Set the field index so we know where we are
+		$this->current_field = $field_id;
+		
+		// Set the field name (required)
+		$this->fields[$field_id]['NAME'] = $name;
+		
+		// Set the field type (required)
+		$this->fields[$field_id]['TYPE'] = $type;
+		
+		// Set the field size (optional)
+		if( isset( $size ) ) {
+			$this->fields[$field_id]['SIZE'] = $size;
+		}
+		
+		// Set the field options
+		if( isset( $opts ) ) {
+			$this->fields[$field_id]['OPTS'] = array($opts);
+		} else {
+			$this->fields[$field_id]['OPTS'] = array();
+		}
+	}
+	
+	/**
+	* Adds a field option to the current field specifier
+	*
+	* This method adds a field option allowed by the ADOdb datadict 
+	* and appends it to the given field.
+	*
+	* @param string $field	Field name
+	* @param string $opt ADOdb field option
+	* @param mixed $value Field option value
+	* @return array Field specifier array
+	*/
+	function addFieldOpt( $field, $opt, $value = NULL ) {
+		if( $this->currentPlatform ) {
+		if( !isset( $value ) ) {
+			$this->fields[$this->FieldID( $field )]['OPTS'][] = $opt;
+		// Add the option and value
+		} else {
+			$this->fields[$this->FieldID( $field )]['OPTS'][] = array( $opt => $value );
+		}
+	}
+	}
+	
+	/**
+	* Adds an option to the table
+	*
+	* This method takes a comma-separated list of table-level options
+	* and appends them to the table object.
+	*
+	* @param string $opt Table option
+	* @return array Options
+	*/
+	function addTableOpt( $opt ) {
+		if( $this->currentPlatform ) {
+		$this->opts[] = $opt;
+		}
+		return $this->opts;
+	}
+	
+	/**
+	* Generates the SQL that will create the table in the database
+	*
+	* @param object $xmls adoSchema object
+	* @return array Array containing table creation SQL
+	*/
+	function create( &$xmls ) {
+		$sql = array();
+		
+		// drop any existing indexes
+		if( is_array( $legacy_indexes = $xmls->dict->MetaIndexes( $this->name ) ) ) {
+			foreach( $legacy_indexes as $index => $index_details ) {
+				$sql[] = $xmls->dict->DropIndexSQL( $index, $this->name );
+			}
+		}
+		
+		// remove fields to be dropped from table object
+		foreach( $this->drop_field as $field ) {
+			unset( $this->fields[$field] );
+		}
+		
+		// if table exists
+		if( is_array( $legacy_fields = $xmls->dict->MetaColumns( $this->name ) ) ) {
+			// drop table
+			if( $this->drop_table ) {
+				$sql[] = $xmls->dict->DropTableSQL( $this->name );
+				
+				return $sql;
+			}
+			
+			// drop any existing fields not in schema
+			foreach( $legacy_fields as $field_id => $field ) {
+				if( !isset( $this->fields[$field_id] ) ) {
+					$sql[] = $xmls->dict->DropColumnSQL( $this->name, $field->name );
+				}
+			}
+		// if table doesn't exist
+		} else {
+			if( $this->drop_table ) {
+				return $sql;
+			}
+			
+			$legacy_fields = array();
+		}
+		
+		// Loop through the field specifier array, building the associative array for the field options
+		$fldarray = array();
+		
+		foreach( $this->fields as $field_id => $finfo ) {
+			// Set an empty size if it isn't supplied
+			if( !isset( $finfo['SIZE'] ) ) {
+				$finfo['SIZE'] = '';
+			}
+			
+			// Initialize the field array with the type and size
+			$fldarray[$field_id] = array(
+				'NAME' => $finfo['NAME'],
+				'TYPE' => $finfo['TYPE'],
+				'SIZE' => $finfo['SIZE']
+			);
+			
+			// Loop through the options array and add the field options. 
+			if( isset( $finfo['OPTS'] ) ) {
+				foreach( $finfo['OPTS'] as $opt ) {
+					// Option has an argument.
+					if( is_array( $opt ) ) {
+						$key = key( $opt );
+						$value = $opt[key( $opt )];
+						@$fldarray[$field_id][$key] .= $value;
+					// Option doesn't have arguments
+					} else {
+						$fldarray[$field_id][$opt] = $opt;
+					}
+				}
+			}
+		}
+		
+		if( empty( $legacy_fields ) ) {
+			// Create the new table
+			$sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts );
+			logMsg( end( $sql ), 'Generated CreateTableSQL' );
+		} else {
+			// Upgrade an existing table
+			logMsg( "Upgrading {$this->name} using '{$xmls->upgrade}'" );
+			switch( $xmls->upgrade ) {
+				// Use ChangeTableSQL
+				case 'ALTER':
+					logMsg( 'Generated ChangeTableSQL (ALTERing table)' );
+					$sql[] = $xmls->dict->ChangeTableSQL( $this->name, $fldarray, $this->opts );
+					break;
+				case 'REPLACE':
+					logMsg( 'Doing upgrade REPLACE (testing)' );
+					$sql[] = $xmls->dict->DropTableSQL( $this->name );
+					$sql[] = $xmls->dict->CreateTableSQL( $this->name, $fldarray, $this->opts );
+					break;
+				// ignore table
+				default:
+					return array();
+			}
+		}
+		
+		foreach( $this->indexes as $index ) {
+			$sql[] = $index->create( $xmls );
+		}
+		
+		if( isset( $this->data ) ) {
+			$sql[] = $this->data->create( $xmls );
+		}
+		
+		return $sql;
+	}
+	
+	/**
+	* Marks a field or table for destruction
+	*/
+	function drop() {
+		if( isset( $this->current_field ) ) {
+			// Drop the current field
+			logMsg( "Dropping field '{$this->current_field}' from table '{$this->name}'" );
+			// $this->drop_field[$this->current_field] = $xmls->dict->DropColumnSQL( $this->name, $this->current_field );
+			$this->drop_field[$this->current_field] = $this->current_field;
+		} else {
+			// Drop the current table
+			logMsg( "Dropping table '{$this->name}'" );
+			// $this->drop_table = $xmls->dict->DropTableSQL( $this->name );
+			$this->drop_table = TRUE;
+		}
+	}
+}
+
+/**
+* Creates an index object in ADOdb's datadict format
+*
+* This class stores information about a database index. As charactaristics
+* of the index are loaded from the external source, methods and properties
+* of this class are used to build up the index description in ADOdb's
+* datadict format.
+*
+* @package axmls
+* @access private
+*/
+class dbIndex extends dbObject {
+	
+	/**
+	* @var string	Index name
+	*/
+	var $name;
+	
+	/**
+	* @var array	Index options: Index-level options
+	*/
+	var $opts = array();
+	
+	/**
+	* @var array	Indexed fields: Table columns included in this index
+	*/
+	var $columns = array();
+	
+	/**
+	* @var boolean Mark index for destruction
+	* @access private
+	*/
+	var $drop = FALSE;
+	
+	/**
+	* Initializes the new dbIndex object.
+	*
+	* @param object $parent Parent object
+	* @param array $attributes Attributes
+	*
+	* @internal
+	*/
+	function dbIndex( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+		
+		$this->name = $this->prefix ($attributes['NAME']);
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* Processes XML opening tags. 
+	* Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'DROP':
+				$this->drop();
+				break;
+			case 'CLUSTERED':
+			case 'BITMAP':
+			case 'UNIQUE':
+			case 'FULLTEXT':
+			case 'HASH':
+				// Add index Option
+				$this->addIndexOpt( $this->currentElement );
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* Processes XML cdata.
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Index field name
+			case 'COL':
+				$this->addField( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'INDEX':
+				xml_set_object( $parser, $this->parent );
+				break;
+		}
+	}
+	
+	/**
+	* Adds a field to the index
+	*
+	* @param string $name Field name
+	* @return string Field list
+	*/
+	function addField( $name ) {
+		$this->columns[$this->FieldID( $name )] = $name;
+		
+		// Return the field list
+		return $this->columns;
+	}
+	
+	/**
+	* Adds options to the index
+	*
+	* @param string $opt Comma-separated list of index options.
+	* @return string Option list
+	*/
+	function addIndexOpt( $opt ) {
+		$this->opts[] = $opt;
+		
+		// Return the options list
+		return $this->opts;
+	}
+	
+	/**
+	* Generates the SQL that will create the index in the database
+	*
+	* @param object $xmls adoSchema object
+	* @return array Array containing index creation SQL
+	*/
+	function create( &$xmls ) {
+		if( $this->drop ) {
+			return NULL;
+		}
+		
+		// eliminate any columns that aren't in the table
+		foreach( $this->columns as $id => $col ) {
+			if( !isset( $this->parent->fields[$id] ) ) {
+				unset( $this->columns[$id] );
+			}
+		}
+		
+		return $xmls->dict->CreateIndexSQL( $this->name, $this->parent->name, $this->columns, $this->opts );
+	}
+	
+	/**
+	* Marks an index for destruction
+	*/
+	function drop() {
+		$this->drop = TRUE;
+	}
+}
+
+/**
+* Creates a data object in ADOdb's datadict format
+*
+* This class stores information about table data, and is called
+* when we need to load field data into a table.
+*
+* @package axmls
+* @access private
+*/
+class dbData extends dbObject {
+	
+	var $data = array();
+	
+	var $row;
+	
+	/**
+	* Initializes the new dbData object.
+	*
+	* @param object $parent Parent object
+	* @param array $attributes Attributes
+	*
+	* @internal
+	*/
+	function dbData( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* Processes XML opening tags. 
+	* Elements currently processed are: ROW and F (field). 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'ROW':
+				$this->row = count( $this->data );
+				$this->data[$this->row] = array();
+				break;
+			case 'F':
+				$this->addField($attributes);
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* Processes XML cdata.
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Index field name
+			case 'F':
+				$this->addData( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'DATA':
+				xml_set_object( $parser, $this->parent );
+				break;
+		}
+	}
+	
+	/**
+	* Adds a field to the insert
+	*
+	* @param string $name Field name
+	* @return string Field list
+	*/
+	function addField( $attributes ) {
+		// check we're in a valid row
+		if( !isset( $this->row ) || !isset( $this->data[$this->row] ) ) {
+			return;
+		}
+		
+		// Set the field index so we know where we are
+		if( isset( $attributes['NAME'] ) ) {
+			$this->current_field = $this->FieldID( $attributes['NAME'] );
+		} else {
+			$this->current_field = count( $this->data[$this->row] );
+		}
+		
+		// initialise data
+		if( !isset( $this->data[$this->row][$this->current_field] ) ) {
+			$this->data[$this->row][$this->current_field] = '';
+		}
+	}
+	
+	/**
+	* Adds options to the index
+	*
+	* @param string $opt Comma-separated list of index options.
+	* @return string Option list
+	*/
+	function addData( $cdata ) {
+		// check we're in a valid field
+		if ( isset( $this->data[$this->row][$this->current_field] ) ) {
+			// add data to field
+			$this->data[$this->row][$this->current_field] .= $cdata;
+		}
+	}
+	
+	/**
+	* Generates the SQL that will add/update the data in the database
+	*
+	* @param object $xmls adoSchema object
+	* @return array Array containing index creation SQL
+	*/
+	function create( &$xmls ) {
+		$table = $xmls->dict->TableName($this->parent->name);
+		$table_field_count = count($this->parent->fields);
+		$tables = $xmls->db->MetaTables(); 
+		$sql = array();
+		
+		$ukeys = $xmls->db->MetaPrimaryKeys( $table );
+		if( !empty( $this->parent->indexes ) and !empty( $ukeys ) ) {
+			foreach( $this->parent->indexes as $indexObj ) {
+				if( !in_array( $indexObj->name, $ukeys ) ) $ukeys[] = $indexObj->name;
+			}
+		}
+		
+		// eliminate any columns that aren't in the table
+		foreach( $this->data as $row ) {
+			$table_fields = $this->parent->fields;
+			$fields = array();
+			$rawfields = array(); // Need to keep some of the unprocessed data on hand.
+			
+			foreach( $row as $field_id => $field_data ) {
+				if( !array_key_exists( $field_id, $table_fields ) ) {
+					if( is_numeric( $field_id ) ) {
+						$field_id = reset( array_keys( $table_fields ) );
+					} else {
+						continue;
+					}
+				}
+				
+				$name = $table_fields[$field_id]['NAME'];
+				
+				switch( $table_fields[$field_id]['TYPE'] ) {
+					case 'I':
+					case 'I1':
+					case 'I2':
+					case 'I4':
+					case 'I8':
+						$fields[$name] = intval($field_data);
+						break;
+					case 'C':
+					case 'C2':
+					case 'X':
+					case 'X2':
+					default:
+						$fields[$name] = $xmls->db->qstr( $field_data );
+						$rawfields[$name] = $field_data;
+				}
+				
+				unset($table_fields[$field_id]);
+				
+			}
+			
+			// check that at least 1 column is specified
+			if( empty( $fields ) ) {
+				continue;
+			}
+			
+			// check that no required columns are missing
+			if( count( $fields ) < $table_field_count ) {
+				foreach( $table_fields as $field ) {
+					if( isset( $field['OPTS'] ) and ( in_array( 'NOTNULL', $field['OPTS'] ) || in_array( 'KEY', $field['OPTS'] ) ) && !in_array( 'AUTOINCREMENT', $field['OPTS'] ) ) {
+							continue(2);
+						}
+				}
+			}
+			
+			// The rest of this method deals with updating existing data records.
+			
+			if( !in_array( $table, $tables ) or ( $mode = $xmls->existingData() ) == XMLS_MODE_INSERT ) {
+				// Table doesn't yet exist, so it's safe to insert.
+				logMsg( "$table doesn't exist, inserting or mode is INSERT" );
+			$sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')';
+				continue;
+		}
+		
+			// Prepare to test for potential violations. Get primary keys and unique indexes
+			$mfields = array_merge( $fields, $rawfields );
+			$keyFields = array_intersect( $ukeys, array_keys( $mfields ) );
+			
+			if( empty( $ukeys ) or count( $keyFields ) == 0 ) {
+				// No unique keys in schema, so safe to insert
+				logMsg( "Either schema or data has no unique keys, so safe to insert" );
+				$sql[] = 'INSERT INTO '. $table .' ('. implode( ',', array_keys( $fields ) ) .') VALUES ('. implode( ',', $fields ) .')';
+				continue;
+			}
+			
+			// Select record containing matching unique keys.
+			$where = '';
+			foreach( $ukeys as $key ) {
+				if( isset( $mfields[$key] ) and $mfields[$key] ) {
+					if( $where ) $where .= ' AND ';
+					$where .= $key . ' = ' . $xmls->db->qstr( $mfields[$key] );
+				}
+			}
+			$records = $xmls->db->Execute( 'SELECT * FROM ' . $table . ' WHERE ' . $where );
+			switch( $records->RecordCount() ) {
+				case 0:
+					// No matching record, so safe to insert.
+					logMsg( "No matching records. Inserting new row with unique data" );
+					$sql[] = $xmls->db->GetInsertSQL( $records, $mfields );
+					break;
+				case 1:
+					// Exactly one matching record, so we can update if the mode permits.
+					logMsg( "One matching record..." );
+					if( $mode == XMLS_MODE_UPDATE ) {
+						logMsg( "...Updating existing row from unique data" );
+						$sql[] = $xmls->db->GetUpdateSQL( $records, $mfields );
+					}
+					break;
+				default:
+					// More than one matching record; the result is ambiguous, so we must ignore the row.
+					logMsg( "More than one matching record. Ignoring row." );
+			}
+		}
+		return $sql;
+	}
+}
+
+/**
+* Creates the SQL to execute a list of provided SQL queries
+*
+* @package axmls
+* @access private
+*/
+class dbQuerySet extends dbObject {
+	
+	/**
+	* @var array	List of SQL queries
+	*/
+	var $queries = array();
+	
+	/**
+	* @var string	String used to build of a query line by line
+	*/
+	var $query;
+	
+	/**
+	* @var string	Query prefix key
+	*/
+	var $prefixKey = '';
+	
+	/**
+	* @var boolean	Auto prefix enable (TRUE)
+	*/
+	var $prefixMethod = 'AUTO';
+	
+	/**
+	* Initializes the query set.
+	*
+	* @param object $parent Parent object
+	* @param array $attributes Attributes
+	*/
+	function dbQuerySet( &$parent, $attributes = NULL ) {
+		$this->parent =& $parent;
+			
+		// Overrides the manual prefix key
+		if( isset( $attributes['KEY'] ) ) {
+			$this->prefixKey = $attributes['KEY'];
+		}
+		
+		$prefixMethod = isset( $attributes['PREFIXMETHOD'] ) ? strtoupper( trim( $attributes['PREFIXMETHOD'] ) ) : '';
+		
+		// Enables or disables automatic prefix prepending
+		switch( $prefixMethod ) {
+			case 'AUTO':
+				$this->prefixMethod = 'AUTO';
+				break;
+			case 'MANUAL':
+				$this->prefixMethod = 'MANUAL';
+				break;
+			case 'NONE':
+				$this->prefixMethod = 'NONE';
+				break;
+		}
+	}
+	
+	/**
+	* XML Callback to process start elements. Elements currently 
+	* processed are: QUERY. 
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		$this->currentElement = strtoupper( $tag );
+		
+		switch( $this->currentElement ) {
+			case 'QUERY':
+				// Create a new query in a SQL queryset.
+				// Ignore this query set if a platform is specified and it's different than the 
+				// current connection platform.
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					$this->newQuery();
+				} else {
+					$this->discardQuery();
+				}
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+		switch( $this->currentElement ) {
+			// Line of queryset SQL data
+			case 'QUERY':
+				$this->buildQuery( $cdata );
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	*/
+	function _tag_close( &$parser, $tag ) {
+		$this->currentElement = '';
+		
+		switch( strtoupper( $tag ) ) {
+			case 'QUERY':
+				// Add the finished query to the open query set.
+				$this->addQuery();
+				break;
+			case 'SQL':
+				$this->parent->addSQL( $this->create( $this->parent ) );
+				xml_set_object( $parser, $this->parent );
+				$this->destroy();
+				break;
+			default:
+				
+		}
+	}
+	
+	/**
+	* Re-initializes the query.
+	*
+	* @return boolean TRUE
+	*/
+	function newQuery() {
+		$this->query = '';
+		
+		return TRUE;
+	}
+	
+	/**
+	* Discards the existing query.
+	*
+	* @return boolean TRUE
+	*/
+	function discardQuery() {
+		unset( $this->query );
+		
+		return TRUE;
+	}
+	
+	/** 
+	* Appends a line to a query that is being built line by line
+	*
+	* @param string $data Line of SQL data or NULL to initialize a new query
+	* @return string SQL query string.
+	*/
+	function buildQuery( $sql = NULL ) {
+		if( !isset( $this->query ) OR empty( $sql ) ) {
+			return FALSE;
+		}
+		
+		$this->query .= $sql;
+		
+		return $this->query;
+	}
+	
+	/**
+	* Adds a completed query to the query list
+	*
+	* @return string	SQL of added query
+	*/
+	function addQuery() {
+		if( !isset( $this->query ) ) {
+			return FALSE;
+		}
+		
+		$this->queries[] = $return = trim($this->query);
+		
+		unset( $this->query );
+		
+		return $return;
+	}
+	
+	/**
+	* Creates and returns the current query set
+	*
+	* @param object $xmls adoSchema object
+	* @return array Query set
+	*/
+	function create( &$xmls ) {
+		foreach( $this->queries as $id => $query ) {
+			switch( $this->prefixMethod ) {
+				case 'AUTO':
+					// Enable auto prefix replacement
+					
+					// Process object prefix.
+					// Evaluate SQL statements to prepend prefix to objects
+					$query = $this->prefixQuery( '/^\s*((?is)INSERT\s+(INTO\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix );
+					$query = $this->prefixQuery( '/^\s*((?is)UPDATE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix );
+					$query = $this->prefixQuery( '/^\s*((?is)DELETE\s+(FROM\s+)?)((\w+\s*,?\s*)+)(\s.*$)/', $query, $xmls->objectPrefix );
+					
+					// SELECT statements aren't working yet
+					#$data = preg_replace( '/(?ias)(^\s*SELECT\s+.*\s+FROM)\s+(\W\s*,?\s*)+((?i)\s+WHERE.*$)/', "\1 $prefix\2 \3", $data );
+					
+				case 'MANUAL':
+					// If prefixKey is set and has a value then we use it to override the default constant XMLS_PREFIX.
+					// If prefixKey is not set, we use the default constant XMLS_PREFIX
+					if( isset( $this->prefixKey ) AND( $this->prefixKey !== '' ) ) {
+						// Enable prefix override
+						$query = str_replace( $this->prefixKey, $xmls->objectPrefix, $query );
+					} else {
+						// Use default replacement
+						$query = str_replace( XMLS_PREFIX , $xmls->objectPrefix, $query );
+					}
+			}
+			
+			$this->queries[$id] = trim( $query );
+		}
+		
+		// Return the query set array
+		return $this->queries;
+	}
+	
+	/**
+	* Rebuilds the query with the prefix attached to any objects
+	*
+	* @param string $regex Regex used to add prefix
+	* @param string $query SQL query string
+	* @param string $prefix Prefix to be appended to tables, indices, etc.
+	* @return string Prefixed SQL query string.
+	*/
+	function prefixQuery( $regex, $query, $prefix = NULL ) {
+		if( !isset( $prefix ) ) {
+			return $query;
+		}
+		
+		if( preg_match( $regex, $query, $match ) ) {
+			$preamble = $match[1];
+			$postamble = $match[5];
+			$objectList = explode( ',', $match[3] );
+			// $prefix = $prefix . '_';
+			
+			$prefixedList = '';
+			
+			foreach( $objectList as $object ) {
+				if( $prefixedList !== '' ) {
+					$prefixedList .= ', ';
+				}
+				
+				$prefixedList .= $prefix . trim( $object );
+			}
+			
+			$query = $preamble . ' ' . $prefixedList . ' ' . $postamble;
+		}
+		
+		return $query;
+	}
+}
+
+/**
+* Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
+* 
+* This class is used to load and parse the XML file, to create an array of SQL statements
+* that can be used to build a database, and to build the database using the SQL array.
+*
+* @tutorial getting_started.pkg
+*
+* @author Richard Tango-Lowy & Dan Cech
+* @version $Revision: 351 $
+*
+* @package axmls
+*/
+class adoSchema {
+	
+	/**
+	* @var array	Array containing SQL queries to generate all objects
+	* @access private
+	*/
+	var $sqlArray;
+	
+	/**
+	* @var object	ADOdb connection object
+	* @access private
+	*/
+	var $db;
+	
+	/**
+	* @var object	ADOdb Data Dictionary
+	* @access private
+	*/
+	var $dict;
+	
+	/**
+	* @var string Current XML element
+	* @access private
+	*/
+	var $currentElement = '';
+	
+	/**
+	* @var string If set (to 'ALTER' or 'REPLACE'), upgrade an existing database
+	* @access private
+	*/
+	var $upgrade = '';
+	
+	/**
+	* @var string Optional object prefix
+	* @access private
+	*/
+	var $objectPrefix = '';
+	
+	/**
+	* @var long	Original Magic Quotes Runtime value
+	* @access private
+	*/
+	var $mgq;
+	
+	/**
+	* @var long	System debug
+	* @access private
+	*/
+	var $debug;
+	
+	/**
+	* @var string Regular expression to find schema version
+	* @access private
+	*/
+	var $versionRegex = '/<schema.*?( version="([^"]*)")?.*?>/';
+	
+	/**
+	* @var string Current schema version
+	* @access private
+	*/
+	var $schemaVersion;
+	
+	/**
+	* @var int	Success of last Schema execution
+	*/
+	var $success;
+	
+	/**
+	* @var bool	Execute SQL inline as it is generated
+	*/
+	var $executeInline;
+	
+	/**
+	* @var bool	Continue SQL execution if errors occur
+	*/
+	var $continueOnError;
+	
+	/**
+	* @var int	How to handle existing data rows (insert, update, or ignore)
+	*/
+	var $existingData;
+	
+	/**
+	* Creates an adoSchema object
+	*
+	* Creating an adoSchema object is the first step in processing an XML schema.
+	* The only parameter is an ADOdb database connection object, which must already
+	* have been created.
+	*
+	* @param object $db ADOdb database connection object.
+	*/
+	function adoSchema( &$db ) {
+		// Initialize the environment
+		$this->mgq = get_magic_quotes_runtime();
+		set_magic_quotes_runtime(0);
+		
+		$this->db =& $db;
+		$this->debug = $this->db->debug;
+		$this->dict = NewDataDictionary( $this->db );
+		$this->sqlArray = array();
+		$this->schemaVersion = XMLS_SCHEMA_VERSION;
+		$this->executeInline( XMLS_EXECUTE_INLINE );
+		$this->continueOnError( XMLS_CONTINUE_ON_ERROR );
+		$this->existingData( XMLS_EXISTING_DATA );
+		$this->setUpgradeMethod();
+	}
+	
+	/**
+	* Sets the method to be used for upgrading an existing database
+	*
+	* Use this method to specify how existing database objects should be upgraded.
+	* The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to
+	* alter each database object directly, REPLACE attempts to rebuild each object
+	* from scratch, BEST attempts to determine the best upgrade method for each
+	* object, and NONE disables upgrading.
+	*
+	* This method is not yet used by AXMLS, but exists for backward compatibility.
+	* The ALTER method is automatically assumed when the adoSchema object is
+	* instantiated; other upgrade methods are not currently supported.
+	*
+	* @param string $method Upgrade method (ALTER|REPLACE|BEST|NONE)
+	* @returns string Upgrade method used
+	*/
+	function SetUpgradeMethod( $method = '' ) {
+		if( !is_string( $method ) ) {
+			return FALSE;
+		}
+		
+		$method = strtoupper( $method );
+		
+		// Handle the upgrade methods
+		switch( $method ) {
+			case 'ALTER':
+				$this->upgrade = $method;
+				break;
+			case 'REPLACE':
+				$this->upgrade = $method;
+				break;
+			case 'BEST':
+				$this->upgrade = 'ALTER';
+				break;
+			case 'NONE':
+				$this->upgrade = 'NONE';
+				break;
+			default:
+				// Use default if no legitimate method is passed.
+				$this->upgrade = XMLS_DEFAULT_UPGRADE_METHOD;
+		}
+		
+		return $this->upgrade;
+	}
+	
+	/**
+	* Specifies how to handle existing data row when there is a unique key conflict.
+	*
+	* The existingData setting specifies how the parser should handle existing rows
+	* when a unique key violation occurs during the insert. This can happen when inserting
+	* data into an existing table with one or more primary keys or unique indexes.
+	* The existingData method takes one of three options: XMLS_MODE_INSERT attempts
+	* to always insert the data as a new row. In the event of a unique key violation,
+	* the database will generate an error.  XMLS_MODE_UPDATE attempts to update the 
+	* any existing rows with the new data based upon primary or unique key fields in
+	* the schema. If the data row in the schema specifies no unique fields, the row
+	* data will be inserted as a new row. XMLS_MODE_IGNORE specifies that any data rows
+	* that would result in a unique key violation be ignored; no inserts or updates will
+	* take place. For backward compatibility, the default setting is XMLS_MODE_INSERT,
+	* but XMLS_MODE_UPDATE will generally be the most appropriate setting.
+	*
+	* @param int $mode XMLS_MODE_INSERT, XMLS_MODE_UPDATE, or XMLS_MODE_IGNORE
+	* @return int current mode
+	*/
+	function ExistingData( $mode = NULL ) {
+		if( is_int( $mode ) ) {
+			switch( $mode ) {
+				case XMLS_MODE_UPDATE:
+					$mode = XMLS_MODE_UPDATE;
+					break;
+				case XMLS_MODE_IGNORE:
+					$mode = XMLS_MODE_IGNORE;
+					break;
+				case XMLS_MODE_INSERT:
+					$mode = XMLS_MODE_INSERT;
+					break;
+				default:
+					$mode = XMLS_EXISITNG_DATA;
+					break;
+			}
+			$this->existingData = $mode;
+		}
+		
+		return $this->existingData;
+	}
+	
+	/**
+	* Enables/disables inline SQL execution.
+	*
+	* Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution),
+	* AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode
+	* is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema()
+	* to apply the schema to the database.
+	*
+	* @param bool $mode execute
+	* @return bool current execution mode
+	*
+	* @see ParseSchema(), ExecuteSchema()
+	*/
+	function ExecuteInline( $mode = NULL ) {
+		if( is_bool( $mode ) ) {
+			$this->executeInline = $mode;
+		}
+		
+		return $this->executeInline;
+	}
+	
+	/**
+	* Enables/disables SQL continue on error.
+	*
+	* Call this method to enable or disable continuation of SQL execution if an error occurs.
+	* If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs.
+	* If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing
+	* of the schema will continue.
+	*
+	* @param bool $mode execute
+	* @return bool current continueOnError mode
+	*
+	* @see addSQL(), ExecuteSchema()
+	*/
+	function ContinueOnError( $mode = NULL ) {
+		if( is_bool( $mode ) ) {
+			$this->continueOnError = $mode;
+		}
+		
+		return $this->continueOnError;
+	}
+	
+	/**
+	* Loads an XML schema from a file and converts it to SQL.
+	*
+	* Call this method to load the specified schema (see the DTD for the proper format) from
+	* the filesystem and generate the SQL necessary to create the database
+	* described. This method automatically converts the schema to the latest
+	* axmls schema version.
+	* @see ParseSchemaString()
+	*
+	* @param string $file Name of XML schema file.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute
+	*/
+	function ParseSchema( $filename, $returnSchema = FALSE ) {
+		return $this->ParseSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema );
+	}
+	
+	/**
+	* Loads an XML schema from a file and converts it to SQL.
+	*
+	* Call this method to load the specified schema directly from a file (see
+	* the DTD for the proper format) and generate the SQL necessary to create
+	* the database described by the schema. Use this method when you are dealing
+	* with large schema files. Otherwise, ParseSchema() is faster.
+	* This method does not automatically convert the schema to the latest axmls
+	* schema version. You must convert the schema manually using either the
+	* ConvertSchemaFile() or ConvertSchemaString() method.
+	* @see ParseSchema()
+	* @see ConvertSchemaFile()
+	* @see ConvertSchemaString()
+	*
+	* @param string $file Name of XML schema file.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute.
+	*
+	* @deprecated Replaced by adoSchema::ParseSchema() and adoSchema::ParseSchemaString()
+	* @see ParseSchema(), ParseSchemaString()
+	*/
+	function ParseSchemaFile( $filename, $returnSchema = FALSE ) {
+		// Open the file
+		if( !($fp = fopen( $filename, 'r' )) ) {
+			logMsg( 'Unable to open file' );
+			return FALSE;
+		}
+		
+		// do version detection here
+		if( $this->SchemaFileVersion( $filename ) != $this->schemaVersion ) {
+			logMsg( 'Invalid Schema Version' );
+			return FALSE;
+		}
+		
+		if( $returnSchema ) {
+			$xmlstring = '';
+			while( $data = fread( $fp, 4096 ) ) {
+				$xmlstring .= $data . "\n";
+			}
+			return $xmlstring;
+		}
+		
+		$this->success = 2;
+		
+		$xmlParser = $this->create_parser();
+		
+		// Process the file
+		while( $data = fread( $fp, 4096 ) ) {
+			if( !xml_parse( $xmlParser, $data, feof( $fp ) ) ) {
+				die( sprintf(
+					"XML error: %s at line %d",
+					xml_error_string( xml_get_error_code( $xmlParser) ),
+					xml_get_current_line_number( $xmlParser)
+				) );
+			}
+		}
+		
+		xml_parser_free( $xmlParser );
+		
+		return $this->sqlArray;
+	}
+	
+	/**
+	* Converts an XML schema string to SQL.
+	*
+	* Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+	* and generate the SQL necessary to create the database described by the schema. 
+	* @see ParseSchema()
+	*
+	* @param string $xmlstring XML schema string.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute.
+	*/
+	function ParseSchemaString( $xmlstring, $returnSchema = FALSE ) {
+		if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
+			logMsg( 'Empty or Invalid Schema' );
+			return FALSE;
+		}
+		
+		// do version detection here
+		if( $this->SchemaStringVersion( $xmlstring ) != $this->schemaVersion ) {
+			logMsg( 'Invalid Schema Version' );
+			return FALSE;
+		}
+		
+		if( $returnSchema ) {
+			return $xmlstring;
+		}
+		
+		$this->success = 2;
+		
+		$xmlParser = $this->create_parser();
+		
+		if( !xml_parse( $xmlParser, $xmlstring, TRUE ) ) {
+			die( sprintf(
+				"XML error: %s at line %d",
+				xml_error_string( xml_get_error_code( $xmlParser) ),
+				xml_get_current_line_number( $xmlParser)
+			) );
+		}
+		
+		xml_parser_free( $xmlParser );
+		
+		return $this->sqlArray;
+	}
+	
+	/**
+	* Loads an XML schema from a file and converts it to uninstallation SQL.
+	*
+	* Call this method to load the specified schema (see the DTD for the proper format) from
+	* the filesystem and generate the SQL necessary to remove the database described.
+	* @see RemoveSchemaString()
+	*
+	* @param string $file Name of XML schema file.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute
+	*/
+	function RemoveSchema( $filename, $returnSchema = FALSE ) {
+		return $this->RemoveSchemaString( $this->ConvertSchemaFile( $filename ), $returnSchema );
+	}
+	
+	/**
+	* Converts an XML schema string to uninstallation SQL.
+	*
+	* Call this method to parse a string containing an XML schema (see the DTD for the proper format)
+	* and generate the SQL necessary to uninstall the database described by the schema. 
+	* @see RemoveSchema()
+	*
+	* @param string $schema XML schema string.
+	* @param bool $returnSchema Return schema rather than parsing.
+	* @return array Array of SQL queries, ready to execute.
+	*/
+	function RemoveSchemaString( $schema, $returnSchema = FALSE ) {
+		
+		// grab current version
+		if( !( $version = $this->SchemaStringVersion( $schema ) ) ) {
+			return FALSE;
+		}
+		
+		return $this->ParseSchemaString( $this->TransformSchema( $schema, 'remove-' . $version), $returnSchema );
+	}
+	
+	/**
+	* Applies the current XML schema to the database (post execution).
+	*
+	* Call this method to apply the current schema (generally created by calling 
+	* ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, 
+	* and executing other SQL specified in the schema) after parsing.
+	* @see ParseSchema(), ParseSchemaString(), ExecuteInline()
+	*
+	* @param array $sqlArray Array of SQL statements that will be applied rather than
+	*		the current schema.
+	* @param boolean $continueOnErr Continue to apply the schema even if an error occurs.
+	* @returns integer 0 if failure, 1 if errors, 2 if successful.
+	*/
+	function ExecuteSchema( $sqlArray = NULL, $continueOnErr =  NULL ) {
+		if( !is_bool( $continueOnErr ) ) {
+			$continueOnErr = $this->ContinueOnError();
+		}
+		
+		if( !isset( $sqlArray ) ) {
+			$sqlArray = $this->sqlArray;
+		}
+		
+		if( !is_array( $sqlArray ) ) {
+			$this->success = 0;
+		} else {
+			$this->success = $this->dict->ExecuteSQLArray( $sqlArray, $continueOnErr );
+		}
+		
+		return $this->success;
+	}
+	
+	/**
+	* Returns the current SQL array. 
+	*
+	* Call this method to fetch the array of SQL queries resulting from 
+	* ParseSchema() or ParseSchemaString(). 
+	*
+	* @param string $format Format: HTML, TEXT, or NONE (PHP array)
+	* @return array Array of SQL statements or FALSE if an error occurs
+	*/
+	function PrintSQL( $format = 'NONE' ) {
+		$sqlArray = null;
+		return $this->getSQL( $format, $sqlArray );
+	}
+	
+	/**
+	* Saves the current SQL array to the local filesystem as a list of SQL queries.
+	*
+	* Call this method to save the array of SQL queries (generally resulting from a
+	* parsed XML schema) to the filesystem.
+	*
+	* @param string $filename Path and name where the file should be saved.
+	* @return boolean TRUE if save is successful, else FALSE. 
+	*/
+	function SaveSQL( $filename = './schema.sql' ) {
+		
+		if( !isset( $sqlArray ) ) {
+			$sqlArray = $this->sqlArray;
+		}
+		if( !isset( $sqlArray ) ) {
+			return FALSE;
+		}
+		
+		$fp = fopen( $filename, "w" );
+		
+		foreach( $sqlArray as $key => $query ) {
+			fwrite( $fp, $query . ";\n" );
+		}
+		fclose( $fp );
+	}
+	
+	/**
+	* Create an xml parser
+	*
+	* @return object PHP XML parser object
+	*
+	* @access private
+	*/
+	function &create_parser() {
+		// Create the parser
+		$xmlParser = xml_parser_create();
+		xml_set_object( $xmlParser, $this );
+		
+		// Initialize the XML callback functions
+		xml_set_element_handler( $xmlParser, '_tag_open', '_tag_close' );
+		xml_set_character_data_handler( $xmlParser, '_tag_cdata' );
+		
+		return $xmlParser;
+	}
+	
+	/**
+	* XML Callback to process start elements
+	*
+	* @access private
+	*/
+	function _tag_open( &$parser, $tag, $attributes ) {
+		switch( strtoupper( $tag ) ) {
+			case 'TABLE':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+				$this->obj = new dbTable( $this, $attributes );
+				xml_set_object( $parser, $this->obj );
+				}
+				break;
+			case 'SQL':
+				if( !isset( $attributes['PLATFORM'] ) OR $this->supportedPlatform( $attributes['PLATFORM'] ) ) {
+					$this->obj = new dbQuerySet( $this, $attributes );
+					xml_set_object( $parser, $this->obj );
+				}
+				break;
+			default:
+				// print_r( array( $tag, $attributes ) );
+		}
+		
+	}
+	
+	/**
+	* XML Callback to process CDATA elements
+	*
+	* @access private
+	*/
+	function _tag_cdata( &$parser, $cdata ) {
+	}
+	
+	/**
+	* XML Callback to process end elements
+	*
+	* @access private
+	* @internal
+	*/
+	function _tag_close( &$parser, $tag ) {
+		
+	}
+	
+	/**
+	* Converts an XML schema string to the specified DTD version.
+	*
+	* Call this method to convert a string containing an XML schema to a different AXMLS
+	* DTD version. For instance, to convert a schema created for an pre-1.0 version for 
+	* AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version 
+	* parameter is specified, the schema will be converted to the current DTD version. 
+	* If the newFile parameter is provided, the converted schema will be written to the specified
+	* file.
+	* @see ConvertSchemaFile()
+	*
+	* @param string $schema String containing XML schema that will be converted.
+	* @param string $newVersion DTD version to convert to.
+	* @param string $newFile File name of (converted) output file.
+	* @return string Converted XML schema or FALSE if an error occurs.
+	*/
+	function ConvertSchemaString( $schema, $newVersion = NULL, $newFile = NULL ) {
+		
+		// grab current version
+		if( !( $version = $this->SchemaStringVersion( $schema ) ) ) {
+			return FALSE;
+		}
+		
+		if( !isset ($newVersion) ) {
+			$newVersion = $this->schemaVersion;
+		}
+		
+		if( $version == $newVersion ) {
+			$result = $schema;
+		} else {
+			$result = $this->TransformSchema( $schema, 'convert-' . $version . '-' . $newVersion);
+		}
+		
+		if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) {
+			fwrite( $fp, $result );
+			fclose( $fp );
+		}
+		
+		return $result;
+	}
+
+	/*
+	// compat for pre-4.3 - jlim
+	function _file_get_contents($path)
+	{
+		if (function_exists('file_get_contents')) return file_get_contents($path);
+		return join('',file($path));
+	}*/
+	
+	/**
+	* Converts an XML schema file to the specified DTD version.
+	*
+	* Call this method to convert the specified XML schema file to a different AXMLS
+	* DTD version. For instance, to convert a schema created for an pre-1.0 version for 
+	* AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version 
+	* parameter is specified, the schema will be converted to the current DTD version. 
+	* If the newFile parameter is provided, the converted schema will be written to the specified
+	* file.
+	* @see ConvertSchemaString()
+	*
+	* @param string $filename Name of XML schema file that will be converted.
+	* @param string $newVersion DTD version to convert to.
+	* @param string $newFile File name of (converted) output file.
+	* @return string Converted XML schema or FALSE if an error occurs.
+	*/
+	function ConvertSchemaFile( $filename, $newVersion = NULL, $newFile = NULL ) {
+		
+		// grab current version
+		if( !( $version = $this->SchemaFileVersion( $filename ) ) ) {
+			return FALSE;
+		}
+		
+		if( !isset ($newVersion) ) {
+			$newVersion = $this->schemaVersion;
+		}
+		
+		if( $version == $newVersion ) {
+			$result = _file_get_contents( $filename );
+			
+			// remove unicode BOM if present
+			if( substr( $result, 0, 3 ) == sprintf( '%c%c%c', 239, 187, 191 ) ) {
+				$result = substr( $result, 3 );
+			}
+		} else {
+			$result = $this->TransformSchema( $filename, 'convert-' . $version . '-' . $newVersion, 'file' );
+		}
+		
+		if( is_string( $result ) AND is_string( $newFile ) AND ( $fp = fopen( $newFile, 'w' ) ) ) {
+			fwrite( $fp, $result );
+			fclose( $fp );
+		}
+		
+		return $result;
+	}
+	
+	function TransformSchema( $schema, $xsl, $schematype='string' )
+	{
+		// Fail if XSLT extension is not available
+		if( ! function_exists( 'xslt_create' ) ) {
+			return FALSE;
+		}
+		
+		$xsl_file = dirname( __FILE__ ) . '/xsl/' . $xsl . '.xsl';
+		
+		// look for xsl
+		if( !is_readable( $xsl_file ) ) {
+			return FALSE;
+		}
+		
+		switch( $schematype )
+		{
+			case 'file':
+				if( !is_readable( $schema ) ) {
+					return FALSE;
+				}
+				
+				$schema = _file_get_contents( $schema );
+				break;
+			case 'string':
+			default:
+				if( !is_string( $schema ) ) {
+					return FALSE;
+				}
+		}
+		
+		$arguments = array (
+			'/_xml' => $schema,
+			'/_xsl' => _file_get_contents( $xsl_file )
+		);
+		
+		// create an XSLT processor
+		$xh = xslt_create ();
+		
+		// set error handler
+		xslt_set_error_handler ($xh, array (&$this, 'xslt_error_handler'));
+		
+		// process the schema
+		$result = xslt_process ($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); 
+		
+		xslt_free ($xh);
+		
+		return $result;
+	}
+	
+	/**
+	* Processes XSLT transformation errors
+	*
+	* @param object $parser XML parser object
+	* @param integer $errno Error number
+	* @param integer $level Error level
+	* @param array $fields Error information fields
+	*
+	* @access private
+	*/
+	function xslt_error_handler( $parser, $errno, $level, $fields ) {
+		if( is_array( $fields ) ) {
+			$msg = array(
+				'Message Type' => ucfirst( $fields['msgtype'] ),
+				'Message Code' => $fields['code'],
+				'Message' => $fields['msg'],
+				'Error Number' => $errno,
+				'Level' => $level
+			);
+			
+			switch( $fields['URI'] ) {
+				case 'arg:/_xml':
+					$msg['Input'] = 'XML';
+					break;
+				case 'arg:/_xsl':
+					$msg['Input'] = 'XSL';
+					break;
+				default:
+					$msg['Input'] = $fields['URI'];
+			}
+			
+			$msg['Line'] = $fields['line'];
+		} else {
+			$msg = array(
+				'Message Type' => 'Error',
+				'Error Number' => $errno,
+				'Level' => $level,
+				'Fields' => var_export( $fields, TRUE )
+			);
+		}
+		
+		$error_details = $msg['Message Type'] . ' in XSLT Transformation' . "\n"
+					   . '<table>' . "\n";
+		
+		foreach( $msg as $label => $details ) {
+			$error_details .= '<tr><td><b>' . $label . ': </b></td><td>' . htmlentities( $details ) . '</td></tr>' . "\n";
+		}
+		
+		$error_details .= '</table>';
+		
+		trigger_error( $error_details, E_USER_ERROR );
+	}
+	
+	/**
+	* Returns the AXMLS Schema Version of the requested XML schema file.
+	*
+	* Call this method to obtain the AXMLS DTD version of the requested XML schema file.
+	* @see SchemaStringVersion()
+	*
+	* @param string $filename AXMLS schema file
+	* @return string Schema version number or FALSE on error
+	*/
+	function SchemaFileVersion( $filename ) {
+		// Open the file
+		if( !($fp = fopen( $filename, 'r' )) ) {
+			// die( 'Unable to open file' );
+			return FALSE;
+		}
+		
+		// Process the file
+		while( $data = fread( $fp, 4096 ) ) {
+			if( preg_match( $this->versionRegex, $data, $matches ) ) {
+				return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION;
+			}
+		}
+		
+		return FALSE;
+	}
+	
+	/**
+	* Returns the AXMLS Schema Version of the provided XML schema string.
+	*
+	* Call this method to obtain the AXMLS DTD version of the provided XML schema string.
+	* @see SchemaFileVersion()
+	*
+	* @param string $xmlstring XML schema string
+	* @return string Schema version number or FALSE on error
+	*/
+	function SchemaStringVersion( $xmlstring ) {
+		if( !is_string( $xmlstring ) OR empty( $xmlstring ) ) {
+			return FALSE;
+		}
+		
+		if( preg_match( $this->versionRegex, $xmlstring, $matches ) ) {
+			return !empty( $matches[2] ) ? $matches[2] : XMLS_DEFAULT_SCHEMA_VERSION;
+		}
+		
+		return FALSE;
+	}
+	
+	/**
+	* Extracts an XML schema from an existing database.
+	*
+	* Call this method to create an XML schema string from an existing database.
+	* If the data parameter is set to TRUE, AXMLS will include the data from the database
+	* in the schema. 
+	*
+	* @param boolean $data Include data in schema dump
+	* @indent string indentation to use
+	* @prefix string extract only tables with given prefix
+	* @stripprefix strip prefix string when storing in XML schema
+	* @return string Generated XML schema
+	*/
+	function ExtractSchema( $data = FALSE, $indent = '  ', $prefix = '' , $stripprefix=false) {
+		$old_mode = $this->db->SetFetchMode( ADODB_FETCH_NUM );
+		
+		$schema = '<?xml version="1.0"?>' . "\n"
+				. '<schema version="' . $this->schemaVersion . '">' . "\n";
+		
+		if( is_array( $tables = $this->db->MetaTables( 'TABLES' , ($prefix) ? $prefix.'%' : '') ) ) {
+			foreach( $tables as $table ) {
+				if ($stripprefix) $table = str_replace(str_replace('\\_', '_', $pfx ), '', $table);
+				$schema .= $indent . '<table name="' . htmlentities( $table ) . '">' . "\n";
+				
+				// grab details from database
+				$rs = $this->db->Execute( 'SELECT * FROM ' . $table . ' WHERE -1' );
+				$fields = $this->db->MetaColumns( $table );
+				$indexes = $this->db->MetaIndexes( $table );
+				
+				if( is_array( $fields ) ) {
+					foreach( $fields as $details ) {
+						$extra = '';
+						$content = array();
+						
+						if( isset($details->max_length) && $details->max_length > 0 ) {
+							$extra .= ' size="' . $details->max_length . '"';
+						}
+						
+						if( isset($details->primary_key) && $details->primary_key ) {
+							$content[] = '<KEY/>';
+						} elseif( isset($details->not_null) && $details->not_null ) {
+							$content[] = '<NOTNULL/>';
+						}
+						
+						if( isset($details->has_default) && $details->has_default ) {
+							$content[] = '<DEFAULT value="' . htmlentities( $details->default_value ) . '"/>';
+						}
+						
+						if( isset($details->auto_increment) && $details->auto_increment ) {
+							$content[] = '<AUTOINCREMENT/>';
+						}
+						
+						if( isset($details->unsigned) && $details->unsigned ) {
+							$content[] = '<UNSIGNED/>';
+						}
+						
+						// this stops the creation of 'R' columns,
+						// AUTOINCREMENT is used to create auto columns
+						$details->primary_key = 0;
+						$type = $rs->MetaType( $details );
+						
+						$schema .= str_repeat( $indent, 2 ) . '<field name="' . htmlentities( $details->name ) . '" type="' . $type . '"' . $extra;
+						
+						if( !empty( $content ) ) {
+							$schema .= ">\n" . str_repeat( $indent, 3 )
+									 . implode( "\n" . str_repeat( $indent, 3 ), $content ) . "\n"
+									 . str_repeat( $indent, 2 ) . '</field>' . "\n";
+						} else {
+							$schema .= "/>\n";
+						}
+					}
+				}
+				
+				if( is_array( $indexes ) ) {
+					foreach( $indexes as $index => $details ) {
+						$schema .= str_repeat( $indent, 2 ) . '<index name="' . $index . '">' . "\n";
+						
+						if( $details['unique'] ) {
+							$schema .= str_repeat( $indent, 3 ) . '<UNIQUE/>' . "\n";
+						}
+						
+						foreach( $details['columns'] as $column ) {
+							$schema .= str_repeat( $indent, 3 ) . '<col>' . htmlentities( $column ) . '</col>' . "\n";
+						}
+						
+						$schema .= str_repeat( $indent, 2 ) . '</index>' . "\n";
+					}
+				}
+				
+				if( $data ) {
+					$rs = $this->db->Execute( 'SELECT * FROM ' . $table );
+					
+					if( is_object( $rs ) && !$rs->EOF ) {
+						$schema .= str_repeat( $indent, 2 ) . "<data>\n";
+						
+						while( $row = $rs->FetchRow() ) {
+							foreach( $row as $key => $val ) {
+								if ( $val != htmlentities( $val ) ) {
+									$row[$key] = '<![CDATA[' . $val . ']]>';
+								}
+							}
+							
+							$schema .= str_repeat( $indent, 3 ) . '<row><f>' . implode( '</f><f>', $row ) . "</f></row>\n";
+						}
+						
+						$schema .= str_repeat( $indent, 2 ) . "</data>\n";
+					}
+				}
+				
+				$schema .= $indent . "</table>\n";
+			}
+		}
+		
+		$this->db->SetFetchMode( $old_mode );
+		
+		$schema .= '</schema>';
+		return $schema;
+	}
+	
+	/**
+	* Sets a prefix for database objects
+	*
+	* Call this method to set a standard prefix that will be prepended to all database tables 
+	* and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
+	*
+	* @param string $prefix Prefix that will be prepended.
+	* @param boolean $underscore If TRUE, automatically append an underscore character to the prefix.
+	* @return boolean TRUE if successful, else FALSE
+	*/
+	function SetPrefix( $prefix = '', $underscore = TRUE ) {
+		switch( TRUE ) {
+			// clear prefix
+			case empty( $prefix ):
+				logMsg( 'Cleared prefix' );
+				$this->objectPrefix = '';
+				return TRUE;
+			// prefix too long
+			case strlen( $prefix ) > XMLS_PREFIX_MAXLEN:
+			// prefix contains invalid characters
+			case !preg_match( '/^[a-z][a-z0-9_]+$/i', $prefix ):
+				logMsg( 'Invalid prefix: ' . $prefix );
+				return FALSE;
+		}
+		
+		if( $underscore AND substr( $prefix, -1 ) != '_' ) {
+			$prefix .= '_';
+		}
+		
+		// prefix valid
+		logMsg( 'Set prefix: ' . $prefix );
+		$this->objectPrefix = $prefix;
+		return TRUE;
+	}
+	
+	/**
+	* Returns an object name with the current prefix prepended.
+	*
+	* @param string	$name Name
+	* @return string	Prefixed name
+	*
+	* @access private
+	*/
+	function prefix( $name = '' ) {
+		// if prefix is set
+		if( !empty( $this->objectPrefix ) ) {
+			// Prepend the object prefix to the table name
+			// prepend after quote if used
+			return preg_replace( '/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name );
+		}
+		
+		// No prefix set. Use name provided.
+		return $name;
+	}
+	
+	/**
+	* Checks if element references a specific platform
+	*
+	* @param string $platform Requested platform
+	* @returns boolean TRUE if platform check succeeds
+	*
+	* @access private
+	*/
+	function supportedPlatform( $platform = NULL ) {
+		if( !empty( $platform ) ) {
+			$regex = '/(^|\|)' . $this->db->databaseType . '(\||$)/i';
+		
+			if( preg_match( '/^- /', $platform ) ) {
+				if (preg_match ( $regex, substr( $platform, 2 ) ) ) {
+					logMsg( 'Platform ' . $platform . ' is NOT supported' );
+					return FALSE;
+				}
+		} else {
+				if( !preg_match ( $regex, $platform ) ) {
+					logMsg( 'Platform ' . $platform . ' is NOT supported' );
+			return FALSE;
+		}
+	}
+		}
+		
+		logMsg( 'Platform ' . $platform . ' is supported' );
+		return TRUE;
+	}
+	
+	/**
+	* Clears the array of generated SQL.
+	*
+	* @access private
+	*/
+	function clearSQL() {
+		$this->sqlArray = array();
+	}
+	
+	/**
+	* Adds SQL into the SQL array.
+	*
+	* @param mixed $sql SQL to Add
+	* @return boolean TRUE if successful, else FALSE.
+	*
+	* @access private
+	*/	
+	function addSQL( $sql = NULL ) {
+		if( is_array( $sql ) ) {
+			foreach( $sql as $line ) {
+				$this->addSQL( $line );
+			}
+			
+			return TRUE;
+		}
+		
+		if( is_string( $sql ) ) {
+			$this->sqlArray[] = $sql;
+			
+			// if executeInline is enabled, and either no errors have occurred or continueOnError is enabled, execute SQL.
+			if( $this->ExecuteInline() && ( $this->success == 2 || $this->ContinueOnError() ) ) {
+				$saved = $this->db->debug;
+				$this->db->debug = $this->debug;
+				$ok = $this->db->Execute( $sql );
+				$this->db->debug = $saved;
+				
+				if( !$ok ) {
+					if( $this->debug ) {
+						ADOConnection::outp( $this->db->ErrorMsg() );
+					}
+					
+					$this->success = 1;
+				}
+			}
+			
+			return TRUE;
+		}
+		
+		return FALSE;
+	}
+	
+	/**
+	* Gets the SQL array in the specified format.
+	*
+	* @param string $format Format
+	* @return mixed SQL
+	*	
+	* @access private
+	*/
+	function getSQL( $format = NULL, $sqlArray = NULL ) {
+		if( !is_array( $sqlArray ) ) {
+			$sqlArray = $this->sqlArray;
+		}
+		
+		if( !is_array( $sqlArray ) ) {
+			return FALSE;
+		}
+		
+		switch( strtolower( $format ) ) {
+			case 'string':
+			case 'text':
+				return !empty( $sqlArray ) ? implode( ";\n\n", $sqlArray ) . ';' : '';
+			case'html':
+				return !empty( $sqlArray ) ? nl2br( htmlentities( implode( ";\n\n", $sqlArray ) . ';' ) ) : '';
+		}
+		
+		return $this->sqlArray;
+	}
+	
+	/**
+	* Destroys an adoSchema object.
+	*
+	* Call this method to clean up after an adoSchema object that is no longer in use.
+	* @deprecated adoSchema now cleans up automatically.
+	*/
+	function Destroy() {
+		set_magic_quotes_runtime( $this->mgq );
+		unset( $this );
+	}
+}
+
+/**
+* Message logging function
+*
+* @access private
+*/
+function logMsg( $msg, $title = NULL, $force = FALSE ) {
+	if( XMLS_DEBUG or $force ) {
+		echo '<pre>';
+		
+		if( isset( $title ) ) {
+			echo '<h3>' . htmlentities( $title ) . '</h3>';
+		}
+		
+		if( @is_object( $this ) ) {
+			echo '[' . get_class( $this ) . '] ';
+		}
+		
+		print_r( $msg );
+		
+		echo '</pre>';
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/adodb.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/adodb.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/adodb.inc.php	(revision 225)
@@ -0,0 +1,4231 @@
+<?php 
+/*
+ * Set tabs to 4 for best viewing.
+ * 
+ * Latest version is available at http://adodb.sourceforge.net
+ * 
+ * This is the main include file for ADOdb.
+ * Database specific drivers are stored in the adodb/drivers/adodb-*.inc.php
+ *
+ * The ADOdb files are formatted so that doxygen can be used to generate documentation.
+ * Doxygen is a documentation generation tool and can be downloaded from http://doxygen.org/
+ */
+
+/**
+	\mainpage 	
+	
+	 @version V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+
+	Released under both BSD license and Lesser GPL library license. You can choose which license
+	you prefer.
+	
+	PHP's database access functions are not standardised. This creates a need for a database 
+	class library to hide the differences between the different database API's (encapsulate 
+	the differences) so we can easily switch databases.
+
+	We currently support MySQL, Oracle, Microsoft SQL Server, Sybase, Sybase SQL Anywhere, DB2,
+	Informix, PostgreSQL, FrontBase, Interbase (Firebird and Borland variants), Foxpro, Access,
+	ADO, SAP DB, SQLite and ODBC. We have had successful reports of connecting to Progress and
+	other databases via ODBC.
+
+	Latest Download at http://adodb.sourceforge.net/
+	  
+ */
+ 
+ if (!defined('_ADODB_LAYER')) {
+ 	define('_ADODB_LAYER',1);
+	
+	//==============================================================================================	
+	// CONSTANT DEFINITIONS
+	//==============================================================================================	
+
+
+	/** 
+	 * Set ADODB_DIR to the directory where this file resides...
+	 * This constant was formerly called $ADODB_RootPath
+	 */
+	if (!defined('ADODB_DIR')) define('ADODB_DIR',dirname(__FILE__));
+	
+	//==============================================================================================	
+	// GLOBAL VARIABLES
+	//==============================================================================================	
+
+	GLOBAL 
+		$ADODB_vers, 		// database version
+		$ADODB_COUNTRECS,	// count number of records returned - slows down query
+		$ADODB_CACHE_DIR,	// directory to cache recordsets
+		$ADODB_EXTENSION,   // ADODB extension installed
+		$ADODB_COMPAT_FETCH, // If $ADODB_COUNTRECS and this is true, $rs->fields is available on EOF
+	 	$ADODB_FETCH_MODE,	// DEFAULT, NUM, ASSOC or BOTH. Default follows native driver default...
+		$ADODB_QUOTE_FIELDNAMES; // Allows you to force quotes (backticks) around field names in queries generated by getinsertsql and getupdatesql.	
+	
+	//==============================================================================================	
+	// GLOBAL SETUP
+	//==============================================================================================	
+	
+	$ADODB_EXTENSION = defined('ADODB_EXTENSION');
+	
+	//********************************************************//
+	/*
+	Controls $ADODB_FORCE_TYPE mode. Default is ADODB_FORCE_VALUE (3).
+	Used in GetUpdateSql and GetInsertSql functions. Thx to Niko, nuko#mbnet.fi
+
+ 		0 = ignore empty fields. All empty fields in array are ignored.
+		1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values.
+		2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values.
+		3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and empty fields '' are set to empty '' sql values.
+	*/
+        define('ADODB_FORCE_IGNORE',0);
+        define('ADODB_FORCE_NULL',1);
+        define('ADODB_FORCE_EMPTY',2);
+        define('ADODB_FORCE_VALUE',3);
+    //********************************************************//
+
+
+	if (!$ADODB_EXTENSION || ADODB_EXTENSION < 4.0) {
+		
+		define('ADODB_BAD_RS','<p>Bad $rs in %s. Connection or SQL invalid. Try using $connection->debug=true;</p>');
+	
+	// allow [ ] @ ` " and . in table names
+		define('ADODB_TABLE_REGEX','([]0-9a-z_\:\"\`\.\@\[-]*)');
+	
+	// prefetching used by oracle
+		if (!defined('ADODB_PREFETCH_ROWS')) define('ADODB_PREFETCH_ROWS',10);
+	
+	
+	/*
+	Controls ADODB_FETCH_ASSOC field-name case. Default is 2, use native case-names.
+	This currently works only with mssql, odbc, oci8po and ibase derived drivers.
+	
+ 		0 = assoc lowercase field names. $rs->fields['orderid']
+		1 = assoc uppercase field names. $rs->fields['ORDERID']
+		2 = use native-case field names. $rs->fields['OrderID']
+	*/
+	
+		define('ADODB_FETCH_DEFAULT',0);
+		define('ADODB_FETCH_NUM',1);
+		define('ADODB_FETCH_ASSOC',2);
+		define('ADODB_FETCH_BOTH',3);
+		
+		if (!defined('TIMESTAMP_FIRST_YEAR')) define('TIMESTAMP_FIRST_YEAR',100);
+	
+		// PHP's version scheme makes converting to numbers difficult - workaround
+		$_adodb_ver = (float) PHP_VERSION;
+		if ($_adodb_ver >= 5.2) {
+			define('ADODB_PHPVER',0x5200);
+		} else if ($_adodb_ver >= 5.0) {
+			define('ADODB_PHPVER',0x5000);
+		} else if ($_adodb_ver > 4.299999) { # 4.3
+			define('ADODB_PHPVER',0x4300);
+		} else if ($_adodb_ver > 4.199999) { # 4.2
+			define('ADODB_PHPVER',0x4200);
+		} else if (strnatcmp(PHP_VERSION,'4.0.5')>=0) {
+			define('ADODB_PHPVER',0x4050);
+		} else {
+			define('ADODB_PHPVER',0x4000);
+		}
+	}
+	
+	//if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2);
+
+	
+	/**
+	 	Accepts $src and $dest arrays, replacing string $data
+	*/
+	function ADODB_str_replace($src, $dest, $data)
+	{
+		if (ADODB_PHPVER >= 0x4050) return str_replace($src,$dest,$data);
+		
+		$s = reset($src);
+		$d = reset($dest);
+		while ($s !== false) {
+			$data = str_replace($s,$d,$data);
+			$s = next($src);
+			$d = next($dest);
+		}
+		return $data;
+	}
+	
+	function ADODB_Setup()
+	{
+	GLOBAL 
+		$ADODB_vers, 		// database version
+		$ADODB_COUNTRECS,	// count number of records returned - slows down query
+		$ADODB_CACHE_DIR,	// directory to cache recordsets
+	 	$ADODB_FETCH_MODE,
+		$ADODB_FORCE_TYPE,
+		$ADODB_QUOTE_FIELDNAMES;
+		
+		$ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT;
+		$ADODB_FORCE_TYPE = ADODB_FORCE_VALUE;
+
+
+		if (!isset($ADODB_CACHE_DIR)) {
+			$ADODB_CACHE_DIR = '/tmp'; //(isset($_ENV['TMP'])) ? $_ENV['TMP'] : '/tmp';
+		} else {
+			// do not accept url based paths, eg. http:/ or ftp:/
+			if (strpos($ADODB_CACHE_DIR,'://') !== false) 
+				die("Illegal path http:// or ftp://");
+		}
+		
+			
+		// Initialize random number generator for randomizing cache flushes
+		// -- note Since PHP 4.2.0, the seed  becomes optional and defaults to a random value if omitted.
+		 srand(((double)microtime())*1000000);
+		
+		/**
+		 * ADODB version as a string.
+		 */
+		$ADODB_vers = 'V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. Released BSD & LGPL.';
+	
+		/**
+		 * Determines whether recordset->RecordCount() is used. 
+		 * Set to false for highest performance -- RecordCount() will always return -1 then
+		 * for databases that provide "virtual" recordcounts...
+		 */
+		if (!isset($ADODB_COUNTRECS)) $ADODB_COUNTRECS = true; 
+	}
+	
+	
+	//==============================================================================================	
+	// CHANGE NOTHING BELOW UNLESS YOU ARE DESIGNING ADODB
+	//==============================================================================================	
+	
+	ADODB_Setup();
+
+	//==============================================================================================	
+	// CLASS ADOFieldObject
+	//==============================================================================================	
+	/**
+	 * Helper class for FetchFields -- holds info on a column
+	 */
+	class ADOFieldObject { 
+		var $name = '';
+		var $max_length=0;
+		var $type="";
+/*
+		// additional fields by dannym... (danny_milo@yahoo.com)
+		var $not_null = false; 
+		// actually, this has already been built-in in the postgres, fbsql AND mysql module? ^-^
+		// so we can as well make not_null standard (leaving it at "false" does not harm anyways)
+
+		var $has_default = false; // this one I have done only in mysql and postgres for now ... 
+			// others to come (dannym)
+		var $default_value; // default, if any, and supported. Check has_default first.
+*/
+	}
+	
+
+	
+	function ADODB_TransMonitor($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection)
+	{
+		//print "Errorno ($fn errno=$errno m=$errmsg) ";
+		$thisConnection->_transOK = false;
+		if ($thisConnection->_oldRaiseFn) {
+			$fn = $thisConnection->_oldRaiseFn;
+			$fn($dbms, $fn, $errno, $errmsg, $p1, $p2,$thisConnection);
+		}
+	}
+	
+	//==============================================================================================	
+	// CLASS ADOConnection
+	//==============================================================================================	
+	
+	/**
+	 * Connection object. For connecting to databases, and executing queries.
+	 */ 
+	class ADOConnection {
+	//
+	// PUBLIC VARS 
+	//
+	var $dataProvider = 'native';
+	var $databaseType = '';		/// RDBMS currently in use, eg. odbc, mysql, mssql					
+	var $database = '';			/// Name of database to be used.	
+	var $host = ''; 			/// The hostname of the database server	
+	var $user = ''; 			/// The username which is used to connect to the database server. 
+	var $password = ''; 		/// Password for the username. For security, we no longer store it.
+	var $debug = false; 		/// if set to true will output sql statements
+	var $maxblobsize = 262144; 	/// maximum size of blobs or large text fields (262144 = 256K)-- some db's die otherwise like foxpro
+	var $concat_operator = '+'; /// default concat operator -- change to || for Oracle/Interbase	
+	var $substr = 'substr';		/// substring operator
+	var $length = 'length';		/// string length ofperator
+	var $random = 'rand()';		/// random function
+	var $upperCase = 'upper';		/// uppercase function
+	var $fmtDate = "'Y-m-d'";	/// used by DBDate() as the default date format used by the database
+	var $fmtTimeStamp = "'Y-m-d, h:i:s A'"; /// used by DBTimeStamp as the default timestamp fmt.
+	var $true = '1'; 			/// string that represents TRUE for a database
+	var $false = '0'; 			/// string that represents FALSE for a database
+	var $replaceQuote = "\\'"; 	/// string to use to replace quotes
+	var $nameQuote = '"';		/// string to use to quote identifiers and names
+	var $charSet=false; 		/// character set to use - only for interbase, postgres and oci8
+	var $metaDatabasesSQL = '';
+	var $metaTablesSQL = '';
+	var $uniqueOrderBy = false; /// All order by columns have to be unique
+	var $emptyDate = '&nbsp;';
+	var $emptyTimeStamp = '&nbsp;';
+	var $lastInsID = false;
+	//--
+	var $hasInsertID = false; 		/// supports autoincrement ID?
+	var $hasAffectedRows = false; 	/// supports affected rows for update/delete?
+	var $hasTop = false;			/// support mssql/access SELECT TOP 10 * FROM TABLE
+	var $hasLimit = false;			/// support pgsql/mysql SELECT * FROM TABLE LIMIT 10
+	var $readOnly = false; 			/// this is a readonly database - used by phpLens
+	var $hasMoveFirst = false;  /// has ability to run MoveFirst(), scrolling backwards
+	var $hasGenID = false; 		/// can generate sequences using GenID();
+	var $hasTransactions = true; /// has transactions
+	//--
+	var $genID = 0; 			/// sequence id used by GenID();
+	var $raiseErrorFn = false; 	/// error function to call
+	var $isoDates = false; /// accepts dates in ISO format
+	var $cacheSecs = 3600; /// cache for 1 hour
+
+	// memcache
+	var $memCache = false; /// should we use memCache instead of caching in files
+	var $memCacheHost; /// memCache host
+	var $memCachePort = 11211; /// memCache port
+	var $memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
+
+	var $sysDate = false; /// name of function that returns the current date
+	var $sysTimeStamp = false; /// name of function that returns the current timestamp
+	var $arrayClass = 'ADORecordSet_array'; /// name of class used to generate array recordsets, which are pre-downloaded recordsets
+	
+	var $noNullStrings = false; /// oracle specific stuff - if true ensures that '' is converted to ' '
+	var $numCacheHits = 0; 
+	var $numCacheMisses = 0;
+	var $pageExecuteCountRows = true;
+	var $uniqueSort = false; /// indicates that all fields in order by must be unique
+	var $leftOuter = false; /// operator to use for left outer join in WHERE clause
+	var $rightOuter = false; /// operator to use for right outer join in WHERE clause
+	var $ansiOuter = false; /// whether ansi outer join syntax supported
+	var $autoRollback = false; // autoRollback on PConnect().
+	var $poorAffectedRows = false; // affectedRows not working or unreliable
+	
+	var $fnExecute = false;
+	var $fnCacheExecute = false;
+	var $blobEncodeType = false; // false=not required, 'I'=encode to integer, 'C'=encode to char
+	var $rsPrefix = "ADORecordSet_";
+	
+	var $autoCommit = true; 	/// do not modify this yourself - actually private
+	var $transOff = 0; 			/// temporarily disable transactions
+	var $transCnt = 0; 			/// count of nested transactions
+	
+	var $fetchMode=false;
+	
+	var $null2null = 'null'; // in autoexecute/getinsertsql/getupdatesql, this value will be converted to a null
+	 //
+	 // PRIVATE VARS
+	 //
+	var $_oldRaiseFn =  false;
+	var $_transOK = null;
+	var $_connectionID	= false;	/// The returned link identifier whenever a successful database connection is made.	
+	var $_errorMsg = false;		/// A variable which was used to keep the returned last error message.  The value will
+								/// then returned by the errorMsg() function	
+	var $_errorCode = false;	/// Last error code, not guaranteed to be used - only by oci8					
+	var $_queryID = false;		/// This variable keeps the last created result link identifier
+	
+	var $_isPersistentConnection = false;	/// A boolean variable to state whether its a persistent connection or normal connection.	*/
+	var $_bindInputArray = false; /// set to true if ADOConnection.Execute() permits binding of array parameters.
+	var $_evalAll = false;
+	var $_affected = false;
+	var $_logsql = false;
+	var $_transmode = ''; // transaction mode
+	
+
+	
+	/**
+	 * Constructor
+	 */
+	function ADOConnection()			
+	{
+		die('Virtual Class -- cannot instantiate');
+	}
+	
+	function Version()
+	{
+	global $ADODB_vers;
+	
+		return (float) substr($ADODB_vers,1);
+	}
+	
+	/**
+		Get server version info...
+		
+		@returns An array with 2 elements: $arr['string'] is the description string, 
+			and $arr[version] is the version (also a string).
+	*/
+	function ServerInfo()
+	{
+		return array('description' => '', 'version' => '');
+	}
+	
+	function IsConnected()
+	{
+    	return !empty($this->_connectionID);
+	}
+	
+	function _findvers($str)
+	{
+		if (preg_match('/([0-9]+\.([0-9\.])+)/',$str, $arr)) return $arr[1];
+		else return '';
+	}
+	
+	/**
+	* All error messages go through this bottleneck function.
+	* You can define your own handler by defining the function name in ADODB_OUTP.
+	*/
+	function outp($msg,$newline=true)
+	{
+	global $ADODB_FLUSH,$ADODB_OUTP;
+	
+		if (defined('ADODB_OUTP')) {
+			$fn = ADODB_OUTP;
+			$fn($msg,$newline);
+			return;
+		} else if (isset($ADODB_OUTP)) {
+			$fn = $ADODB_OUTP;
+			$fn($msg,$newline);
+			return;
+		}
+		
+		if ($newline) $msg .= "<br>\n";
+		
+		if (isset($_SERVER['HTTP_USER_AGENT']) || !$newline) echo $msg;
+		else echo strip_tags($msg);
+	
+		
+		if (!empty($ADODB_FLUSH) && ob_get_length() !== false) flush(); //  do not flush if output buffering enabled - useless - thx to Jesse Mullan 
+		
+	}
+	
+	function Time()
+	{
+		$rs =& $this->_Execute("select $this->sysTimeStamp");
+		if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields));
+		
+		return false;
+	}
+	
+	/**
+	 * Connect to database
+	 *
+	 * @param [argHostname]		Host to connect to
+	 * @param [argUsername]		Userid to login
+	 * @param [argPassword]		Associated password
+	 * @param [argDatabaseName]	database
+	 * @param [forceNew]		force new connection
+	 *
+	 * @return true or false
+	 */	  
+	function Connect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "", $forceNew = false) 
+	{
+		if ($argHostname != "") $this->host = $argHostname;
+		if ($argUsername != "") $this->user = $argUsername;
+		if ($argPassword != "") $this->password = $argPassword; // not stored for security reasons
+		if ($argDatabaseName != "") $this->database = $argDatabaseName;		
+		
+		$this->_isPersistentConnection = false;	
+		if ($forceNew) {
+			if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true;
+		} else {
+			 if ($rez=$this->_connect($this->host, $this->user, $this->password, $this->database)) return true;
+		}
+		if (isset($rez)) {
+			$err = $this->ErrorMsg();
+			if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'";
+			$ret = false;
+		} else {
+			$err = "Missing extension for ".$this->dataProvider;
+			$ret = 0;
+		}
+		if ($fn = $this->raiseErrorFn) 
+			$fn($this->databaseType,'CONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this);
+		
+		
+		$this->_connectionID = false;
+		if ($this->debug) ADOConnection::outp( $this->host.': '.$err);
+		return $ret;
+	}	
+	
+	function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName)
+	{
+		return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName);
+	}
+	
+	
+	/**
+	 * Always force a new connection to database - currently only works with oracle
+	 *
+	 * @param [argHostname]		Host to connect to
+	 * @param [argUsername]		Userid to login
+	 * @param [argPassword]		Associated password
+	 * @param [argDatabaseName]	database
+	 *
+	 * @return true or false
+	 */	  
+	function NConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "") 
+	{
+		return $this->Connect($argHostname, $argUsername, $argPassword, $argDatabaseName, true);
+	}
+	
+	/**
+	 * Establish persistent connect to database
+	 *
+	 * @param [argHostname]		Host to connect to
+	 * @param [argUsername]		Userid to login
+	 * @param [argPassword]		Associated password
+	 * @param [argDatabaseName]	database
+	 *
+	 * @return return true or false
+	 */	
+	function PConnect($argHostname = "", $argUsername = "", $argPassword = "", $argDatabaseName = "")
+	{
+		if (defined('ADODB_NEVER_PERSIST')) 
+			return $this->Connect($argHostname,$argUsername,$argPassword,$argDatabaseName);
+		
+		if ($argHostname != "") $this->host = $argHostname;
+		if ($argUsername != "") $this->user = $argUsername;
+		if ($argPassword != "") $this->password = $argPassword;
+		if ($argDatabaseName != "") $this->database = $argDatabaseName;		
+			
+		$this->_isPersistentConnection = true;	
+		if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true;
+		if (isset($rez)) {
+			$err = $this->ErrorMsg();
+			if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'";
+			$ret = false;
+		} else {
+			$err = "Missing extension for ".$this->dataProvider;
+			$ret = 0;
+		}
+		if ($fn = $this->raiseErrorFn) {
+			$fn($this->databaseType,'PCONNECT',$this->ErrorNo(),$err,$this->host,$this->database,$this);
+		}
+		
+		$this->_connectionID = false;
+		if ($this->debug) ADOConnection::outp( $this->host.': '.$err);
+		return $ret;
+	}
+
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysDate;
+		return $col; // child class implement
+	}
+	
+	/**
+	 * Should prepare the sql statement and return the stmt resource.
+	 * For databases that do not support this, we return the $sql. To ensure
+	 * compatibility with databases that do not support prepare:
+	 *
+	 *   $stmt = $db->Prepare("insert into table (id, name) values (?,?)");
+	 *   $db->Execute($stmt,array(1,'Jill')) or die('insert failed');
+	 *   $db->Execute($stmt,array(2,'Joe')) or die('insert failed');
+	 *
+	 * @param sql	SQL to send to database
+	 *
+	 * @return return FALSE, or the prepared statement, or the original sql if
+	 * 			if the database does not support prepare.
+	 *
+	 */	
+	function Prepare($sql)
+	{
+		return $sql;
+	}
+	
+	/**
+	 * Some databases, eg. mssql require a different function for preparing
+	 * stored procedures. So we cannot use Prepare().
+	 *
+	 * Should prepare the stored procedure  and return the stmt resource.
+	 * For databases that do not support this, we return the $sql. To ensure
+	 * compatibility with databases that do not support prepare:
+	 *
+	 * @param sql	SQL to send to database
+	 *
+	 * @return return FALSE, or the prepared statement, or the original sql if
+	 * 			if the database does not support prepare.
+	 *
+	 */	
+	function PrepareSP($sql,$param=true)
+	{
+		return $this->Prepare($sql,$param);
+	}
+	
+	/**
+	* PEAR DB Compat
+	*/
+	function Quote($s)
+	{
+		return $this->qstr($s,false);
+	}
+	
+	/**
+	 Requested by "Karsten Dambekalns" <k.dambekalns@fishfarm.de>
+	*/
+	function QMagic($s)
+	{
+		return $this->qstr($s,get_magic_quotes_gpc());
+	}
+
+	function q(&$s)
+	{
+		#if (!empty($this->qNull)) if ($s == 'null') return $s;
+		$s = $this->qstr($s,false);
+	}
+	
+	/**
+	* PEAR DB Compat - do not use internally. 
+	*/
+	function ErrorNative()
+	{
+		return $this->ErrorNo();
+	}
+
+	
+   /**
+	* PEAR DB Compat - do not use internally. 
+	*/
+	function nextId($seq_name)
+	{
+		return $this->GenID($seq_name);
+	}
+
+	/**
+	*	 Lock a row, will escalate and lock the table if row locking not supported
+	*	will normally free the lock at the end of the transaction
+	*
+	*  @param $table	name of table to lock
+	*  @param $where	where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock
+	*/
+	function RowLock($table,$where)
+	{
+		return false;
+	}
+	
+	function CommitLock($table)
+	{
+		return $this->CommitTrans();
+	}
+	
+	function RollbackLock($table)
+	{
+		return $this->RollbackTrans();
+	}
+	
+	/**
+	* PEAR DB Compat - do not use internally. 
+	*
+	* The fetch modes for NUMERIC and ASSOC for PEAR DB and ADODB are identical
+	* 	for easy porting :-)
+	*
+	* @param mode	The fetchmode ADODB_FETCH_ASSOC or ADODB_FETCH_NUM
+	* @returns		The previous fetch mode
+	*/
+	function SetFetchMode($mode)
+	{	
+		$old = $this->fetchMode;
+		$this->fetchMode = $mode;
+		
+		if ($old === false) {
+		global $ADODB_FETCH_MODE;
+			return $ADODB_FETCH_MODE;
+		}
+		return $old;
+	}
+	
+
+	/**
+	* PEAR DB Compat - do not use internally. 
+	*/
+	function &Query($sql, $inputarr=false)
+	{
+		$rs = &$this->Execute($sql, $inputarr);
+		if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error();
+		return $rs;
+	}
+
+	
+	/**
+	* PEAR DB Compat - do not use internally
+	*/
+	function &LimitQuery($sql, $offset, $count, $params=false)
+	{
+		$rs = &$this->SelectLimit($sql, $count, $offset, $params); 
+		if (!$rs && defined('ADODB_PEAR')) return ADODB_PEAR_Error();
+		return $rs;
+	}
+
+	
+	/**
+	* PEAR DB Compat - do not use internally
+	*/
+	function Disconnect()
+	{
+		return $this->Close();
+	}
+	
+	/*
+		 Returns placeholder for parameter, eg.
+		 $DB->Param('a')
+		 
+		 will return ':a' for Oracle, and '?' for most other databases...
+		 
+		 For databases that require positioned params, eg $1, $2, $3 for postgresql,
+		 	pass in Param(false) before setting the first parameter.
+	*/
+	function Param($name,$type='C')
+	{
+		return '?';
+	}
+	
+	/*
+		InParameter and OutParameter are self-documenting versions of Parameter().
+	*/
+	function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false)
+	{
+		return $this->Parameter($stmt,$var,$name,false,$maxLen,$type);
+	}
+	
+	/*
+	*/
+	function OutParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false)
+	{
+		return $this->Parameter($stmt,$var,$name,true,$maxLen,$type);
+	
+	}
+
+	
+	/* 
+	Usage in oracle
+		$stmt = $db->Prepare('select * from table where id =:myid and group=:group');
+		$db->Parameter($stmt,$id,'myid');
+		$db->Parameter($stmt,$group,'group',64);
+		$db->Execute();
+		
+		@param $stmt Statement returned by Prepare() or PrepareSP().
+		@param $var PHP variable to bind to
+		@param $name Name of stored procedure variable name to bind to.
+		@param [$isOutput] Indicates direction of parameter 0/false=IN  1=OUT  2= IN/OUT. This is ignored in oci8.
+		@param [$maxLen] Holds an maximum length of the variable.
+		@param [$type] The data type of $var. Legal values depend on driver.
+
+	*/
+	function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false)
+	{
+		return false;
+	}
+	
+	
+	function IgnoreErrors($saveErrs=false)
+	{
+		if (!$saveErrs) {
+			$saveErrs = array($this->raiseErrorFn,$this->_transOK);
+			$this->raiseErrorFn = false;
+			return $saveErrs;
+		} else {
+			$this->raiseErrorFn = $saveErrs[0];
+			$this->_transOK = $saveErrs[1];
+		}
+	}
+	
+	/**
+		Improved method of initiating a transaction. Used together with CompleteTrans().
+		Advantages include:
+		
+		a. StartTrans/CompleteTrans is nestable, unlike BeginTrans/CommitTrans/RollbackTrans.
+		   Only the outermost block is treated as a transaction.<br>
+		b. CompleteTrans auto-detects SQL errors, and will rollback on errors, commit otherwise.<br>
+		c. All BeginTrans/CommitTrans/RollbackTrans inside a StartTrans/CompleteTrans block
+		   are disabled, making it backward compatible.
+	*/
+	function StartTrans($errfn = 'ADODB_TransMonitor')
+	{
+		if ($this->transOff > 0) {
+			$this->transOff += 1;
+			return;
+		}
+		
+		$this->_oldRaiseFn = $this->raiseErrorFn;
+		$this->raiseErrorFn = $errfn;
+		$this->_transOK = true;
+		
+		if ($this->debug && $this->transCnt > 0) ADOConnection::outp("Bad Transaction: StartTrans called within BeginTrans");
+		$this->BeginTrans();
+		$this->transOff = 1;
+	}
+	
+	
+	/**
+		Used together with StartTrans() to end a transaction. Monitors connection
+		for sql errors, and will commit or rollback as appropriate.
+		
+		@autoComplete if true, monitor sql errors and commit and rollback as appropriate, 
+		and if set to false force rollback even if no SQL error detected.
+		@returns true on commit, false on rollback.
+	*/
+	function CompleteTrans($autoComplete = true)
+	{
+		if ($this->transOff > 1) {
+			$this->transOff -= 1;
+			return true;
+		}
+		$this->raiseErrorFn = $this->_oldRaiseFn;
+		
+		$this->transOff = 0;
+		if ($this->_transOK && $autoComplete) {
+			if (!$this->CommitTrans()) {
+				$this->_transOK = false;
+				if ($this->debug) ADOConnection::outp("Smart Commit failed");
+			} else
+				if ($this->debug) ADOConnection::outp("Smart Commit occurred");
+		} else {
+			$this->_transOK = false;
+			$this->RollbackTrans();
+			if ($this->debug) ADOCOnnection::outp("Smart Rollback occurred");
+		}
+		
+		return $this->_transOK;
+	}
+	
+	/*
+		At the end of a StartTrans/CompleteTrans block, perform a rollback.
+	*/
+	function FailTrans()
+	{
+		if ($this->debug) 
+			if ($this->transOff == 0) {
+				ADOConnection::outp("FailTrans outside StartTrans/CompleteTrans");
+			} else {
+				ADOConnection::outp("FailTrans was called");
+				adodb_backtrace();
+			}
+		$this->_transOK = false;
+	}
+	
+	/**
+		Check if transaction has failed, only for Smart Transactions.
+	*/
+	function HasFailedTrans()
+	{
+		if ($this->transOff > 0) return $this->_transOK == false;
+		return false;
+	}
+	
+	/**
+	 * Execute SQL 
+	 *
+	 * @param sql		SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text)
+	 * @param [inputarr]	holds the input data to bind to. Null elements will be set to null.
+	 * @return 		RecordSet or false
+	 */
+	function &Execute($sql,$inputarr=false) 
+	{
+		if ($this->fnExecute) {
+			$fn = $this->fnExecute;
+			$ret =& $fn($this,$sql,$inputarr);
+			if (isset($ret)) return $ret;
+		}
+		if ($inputarr) {
+			if (!is_array($inputarr)) $inputarr = array($inputarr);
+			
+			$element0 = reset($inputarr);
+			# is_object check because oci8 descriptors can be passed in
+			$array_2d = is_array($element0) && !is_object(reset($element0));
+			//remove extra memory copy of input -mikefedyk
+			unset($element0);
+			
+			if (!is_array($sql) && !$this->_bindInputArray) {
+				$sqlarr = explode('?',$sql);
+					
+				if (!$array_2d) $inputarr = array($inputarr);
+				foreach($inputarr as $arr) {
+					$sql = ''; $i = 0;
+					//Use each() instead of foreach to reduce memory usage -mikefedyk
+					while(list(, $v) = each($arr)) {
+						$sql .= $sqlarr[$i];
+						// from Ron Baldwin <ron.baldwin#sourceprose.com>
+						// Only quote string types	
+						$typ = gettype($v);
+						if ($typ == 'string')
+							//New memory copy of input created here -mikefedyk
+							$sql .= $this->qstr($v);
+						else if ($typ == 'double')
+							$sql .= str_replace(',','.',$v); // locales fix so 1.1 does not get converted to 1,1
+						else if ($typ == 'boolean')
+							$sql .= $v ? $this->true : $this->false;
+						else if ($typ == 'object') {
+							if (method_exists($v, '__toString')) $sql .= $this->qstr($v->__toString());
+							else $sql .= $this->qstr((string) $v);
+						} else if ($v === null)
+							$sql .= 'NULL';
+						else
+							$sql .= $v;
+						$i += 1;
+					}
+					if (isset($sqlarr[$i])) {
+						$sql .= $sqlarr[$i];
+						if ($i+1 != sizeof($sqlarr)) ADOConnection::outp( "Input Array does not match ?: ".htmlspecialchars($sql));
+					} else if ($i != sizeof($sqlarr))	
+						ADOConnection::outp( "Input array does not match ?: ".htmlspecialchars($sql));
+		
+					$ret =& $this->_Execute($sql);
+					if (!$ret) return $ret;
+				}	
+			} else {
+				if ($array_2d) {
+					if (is_string($sql))
+						$stmt = $this->Prepare($sql);
+					else
+						$stmt = $sql;
+						
+					foreach($inputarr as $arr) {
+						$ret =& $this->_Execute($stmt,$arr);
+						if (!$ret) return $ret;
+					}
+				} else {
+					$ret =& $this->_Execute($sql,$inputarr);
+				}
+			}
+		} else {
+			$ret =& $this->_Execute($sql,false);
+		}
+
+		return $ret;
+	}
+	
+	
+	function &_Execute($sql,$inputarr=false)
+	{
+		if ($this->debug) {
+			global $ADODB_INCLUDED_LIB;
+			if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+			$this->_queryID = _adodb_debug_execute($this, $sql,$inputarr);
+		} else {
+			$this->_queryID = @$this->_query($sql,$inputarr);
+		}
+		
+		/************************
+		// OK, query executed
+		*************************/
+
+		if ($this->_queryID === false) { // error handling if query fails
+			if ($this->debug == 99) adodb_backtrace(true,5);	
+			$fn = $this->raiseErrorFn;
+			if ($fn) {
+				$fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr,$this);
+			} 
+			$false = false;
+			return $false;
+		} 
+		
+		if ($this->_queryID === true) { // return simplified recordset for inserts/updates/deletes with lower overhead
+			$rs = new ADORecordSet_empty();
+			return $rs;
+		}
+		
+		// return real recordset from select statement
+		$rsclass = $this->rsPrefix.$this->databaseType;
+		$rs = new $rsclass($this->_queryID,$this->fetchMode);
+		$rs->connection = &$this; // Pablo suggestion
+		$rs->Init();
+		if (is_array($sql)) $rs->sql = $sql[0];
+		else $rs->sql = $sql;
+		if ($rs->_numOfRows <= 0) {
+		global $ADODB_COUNTRECS;
+			if ($ADODB_COUNTRECS) {
+				if (!$rs->EOF) { 
+					$rs = &$this->_rs2rs($rs,-1,-1,!is_array($sql));
+					$rs->_queryID = $this->_queryID;
+				} else
+					$rs->_numOfRows = 0;
+			}
+		}
+		return $rs;
+	}
+
+	function CreateSequence($seqname='adodbseq',$startID=1)
+	{
+		if (empty($this->_genSeqSQL)) return false;
+		return $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID));
+	}
+
+	function DropSequence($seqname='adodbseq')
+	{
+		if (empty($this->_dropSeqSQL)) return false;
+		return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
+	}
+
+	/**
+	 * Generates a sequence id and stores it in $this->genID;
+	 * GenID is only available if $this->hasGenID = true;
+	 *
+	 * @param seqname		name of sequence to use
+	 * @param startID		if sequence does not exist, start at this ID
+	 * @return		0 if not supported, otherwise a sequence id
+	 */
+	function GenID($seqname='adodbseq',$startID=1)
+	{
+		if (!$this->hasGenID) {
+			return 0; // formerly returns false pre 1.60
+		}
+		
+		$getnext = sprintf($this->_genIDSQL,$seqname);
+		
+		$holdtransOK = $this->_transOK;
+		
+		$save_handler = $this->raiseErrorFn;
+		$this->raiseErrorFn = '';
+		@($rs = $this->Execute($getnext));
+		$this->raiseErrorFn = $save_handler;
+		
+		if (!$rs) {
+			$this->_transOK = $holdtransOK; //if the status was ok before reset
+			$createseq = $this->Execute(sprintf($this->_genSeqSQL,$seqname,$startID));
+			$rs = $this->Execute($getnext);
+		}
+		if ($rs && !$rs->EOF) $this->genID = reset($rs->fields);
+		else $this->genID = 0; // false
+	
+		if ($rs) $rs->Close();
+
+		return $this->genID;
+	}	
+
+	/**
+	 * @param $table string name of the table, not needed by all databases (eg. mysql), default ''
+	 * @param $column string name of the column, not needed by all databases (eg. mysql), default ''
+	 * @return  the last inserted ID. Not all databases support this.
+	 */ 
+	function Insert_ID($table='',$column='')
+	{
+		if ($this->_logsql && $this->lastInsID) return $this->lastInsID;
+		if ($this->hasInsertID) return $this->_insertid($table,$column);
+		if ($this->debug) {
+			ADOConnection::outp( '<p>Insert_ID error</p>');
+			adodb_backtrace();
+		}
+		return false;
+	}
+
+
+	/**
+	 * Portable Insert ID. Pablo Roca <pabloroca#mvps.org>
+	 *
+	 * @return  the last inserted ID. All databases support this. But aware possible
+	 * problems in multiuser environments. Heavy test this before deploying.
+	 */ 
+	function PO_Insert_ID($table="", $id="") 
+	{
+	   if ($this->hasInsertID){
+		   return $this->Insert_ID($table,$id);
+	   } else {
+		   return $this->GetOne("SELECT MAX($id) FROM $table");
+	   }
+	}
+
+	/**
+	* @return # rows affected by UPDATE/DELETE
+	*/ 
+	function Affected_Rows()
+	{
+		if ($this->hasAffectedRows) {
+			if ($this->fnExecute === 'adodb_log_sql') {
+				if ($this->_logsql && $this->_affected !== false) return $this->_affected;
+			}
+			$val = $this->_affectedrows();
+			return ($val < 0) ? false : $val;
+		}
+				  
+		if ($this->debug) ADOConnection::outp( '<p>Affected_Rows error</p>',false);
+		return false;
+	}
+	
+	
+	/**
+	 * @return  the last error message
+	 */
+	function ErrorMsg()
+	{
+		if ($this->_errorMsg) return '!! '.strtoupper($this->dataProvider.' '.$this->databaseType).': '.$this->_errorMsg;
+		else return '';
+	}
+	
+	
+	/**
+	 * @return the last error number. Normally 0 means no error.
+	 */
+	function ErrorNo() 
+	{
+		return ($this->_errorMsg) ? -1 : 0;
+	}
+	
+	function MetaError($err=false)
+	{
+		include_once(ADODB_DIR."/adodb-error.inc.php");
+		if ($err === false) $err = $this->ErrorNo();
+		return adodb_error($this->dataProvider,$this->databaseType,$err);
+	}
+	
+	function MetaErrorMsg($errno)
+	{
+		include_once(ADODB_DIR."/adodb-error.inc.php");
+		return adodb_errormsg($errno);
+	}
+	
+	/**
+	 * @returns an array with the primary key columns in it.
+	 */
+	function MetaPrimaryKeys($table, $owner=false)
+	{
+	// owner not used in base class - see oci8
+		$p = array();
+		$objs =& $this->MetaColumns($table);
+		if ($objs) {
+			foreach($objs as $v) {
+				if (!empty($v->primary_key))
+					$p[] = $v->name;
+			}
+		}
+		if (sizeof($p)) return $p;
+		if (function_exists('ADODB_VIEW_PRIMARYKEYS'))
+			return ADODB_VIEW_PRIMARYKEYS($this->databaseType, $this->database, $table, $owner);
+		return false;
+	}
+	
+	/**
+	 * @returns assoc array where keys are tables, and values are foreign keys
+	 */
+	function MetaForeignKeys($table, $owner=false, $upper=false)
+	{
+		return false;
+	}
+	/**
+	 * Choose a database to connect to. Many databases do not support this.
+	 *
+	 * @param dbName 	is the name of the database to select
+	 * @return 		true or false
+	 */
+	function SelectDB($dbName) 
+	{return false;}
+	
+	
+	/**
+	* Will select, getting rows from $offset (1-based), for $nrows. 
+	* This simulates the MySQL "select * from table limit $offset,$nrows" , and
+	* the PostgreSQL "select * from table limit $nrows offset $offset". Note that
+	* MySQL and PostgreSQL parameter ordering is the opposite of the other.
+	* eg. 
+	*  SelectLimit('select * from table',3); will return rows 1 to 3 (1-based)
+	*  SelectLimit('select * from table',3,2); will return rows 3 to 5 (1-based)
+	*
+	* Uses SELECT TOP for Microsoft databases (when $this->hasTop is set)
+	* BUG: Currently SelectLimit fails with $sql with LIMIT or TOP clause already set
+	*
+	* @param sql
+	* @param [offset]	is the row to start calculations from (1-based)
+	* @param [nrows]		is the number of rows to get
+	* @param [inputarr]	array of bind variables
+	* @param [secs2cache]		is a private parameter only used by jlim
+	* @return		the recordset ($rs->databaseType == 'array')
+ 	*/
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		if ($this->hasTop && $nrows > 0) {
+		// suggested by Reinhard Balling. Access requires top after distinct 
+		 // Informix requires first before distinct - F Riosa
+			$ismssql = (strpos($this->databaseType,'mssql') !== false);
+			if ($ismssql) $isaccess = false;
+			else $isaccess = (strpos($this->databaseType,'access') !== false);
+			
+			if ($offset <= 	0) {
+				
+					// access includes ties in result
+					if ($isaccess) {
+						$sql = preg_replace(
+						'/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql);
+
+						if ($secs2cache != 0) {
+							$ret =& $this->CacheExecute($secs2cache, $sql,$inputarr);
+						} else {
+							$ret =& $this->Execute($sql,$inputarr);
+						}
+						return $ret; // PHP5 fix
+					} else if ($ismssql){
+						$sql = preg_replace(
+						'/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql);
+					} else {
+						$sql = preg_replace(
+						'/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.((integer)$nrows).' ',$sql);
+					}
+			} else {
+				$nn = $nrows + $offset;
+				if ($isaccess || $ismssql) {
+					$sql = preg_replace(
+					'/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql);
+				} else {
+					$sql = preg_replace(
+					'/(^\s*select\s)/i','\\1 '.$this->hasTop.' '.$nn.' ',$sql);
+				}
+			}
+		}
+		
+		// if $offset>0, we want to skip rows, and $ADODB_COUNTRECS is set, we buffer  rows
+		// 0 to offset-1 which will be discarded anyway. So we disable $ADODB_COUNTRECS.
+		global $ADODB_COUNTRECS;
+		
+		$savec = $ADODB_COUNTRECS;
+		$ADODB_COUNTRECS = false;
+			
+		if ($offset>0){
+			if ($secs2cache != 0) $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr);
+			else $rs = &$this->Execute($sql,$inputarr);
+		} else {
+			if ($secs2cache != 0) $rs = &$this->CacheExecute($secs2cache,$sql,$inputarr);
+			else $rs = &$this->Execute($sql,$inputarr);
+		}
+		$ADODB_COUNTRECS = $savec;
+		if ($rs && !$rs->EOF) {
+			$rs =& $this->_rs2rs($rs,$nrows,$offset);
+		}
+		//print_r($rs);
+		return $rs;
+	}
+	
+	/**
+	* Create serializable recordset. Breaks rs link to connection.
+	*
+	* @param rs			the recordset to serialize
+	*/
+	function &SerializableRS(&$rs)
+	{
+		$rs2 =& $this->_rs2rs($rs);
+		$ignore = false;
+		$rs2->connection =& $ignore;
+		
+		return $rs2;
+	}
+	
+	/**
+	* Convert database recordset to an array recordset
+	* input recordset's cursor should be at beginning, and
+	* old $rs will be closed.
+	*
+	* @param rs			the recordset to copy
+	* @param [nrows]  	number of rows to retrieve (optional)
+	* @param [offset] 	offset by number of rows (optional)
+	* @return 			the new recordset
+	*/
+	function &_rs2rs(&$rs,$nrows=-1,$offset=-1,$close=true)
+	{
+		if (! $rs) {
+			$false = false;
+			return $false;
+		}
+		$dbtype = $rs->databaseType;
+		if (!$dbtype) {
+			$rs = &$rs;  // required to prevent crashing in 4.2.1, but does not happen in 4.3.1 -- why ?
+			return $rs;
+		}
+		if (($dbtype == 'array' || $dbtype == 'csv') && $nrows == -1 && $offset == -1) {
+			$rs->MoveFirst();
+			$rs = &$rs; // required to prevent crashing in 4.2.1, but does not happen in 4.3.1-- why ?
+			return $rs;
+		}
+		$flds = array();
+		for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {
+			$flds[] = $rs->FetchField($i);
+		}
+
+		$arr =& $rs->GetArrayLimit($nrows,$offset);
+		//print_r($arr);
+		if ($close) $rs->Close();
+		
+		$arrayClass = $this->arrayClass;
+		
+		$rs2 = new $arrayClass();
+		$rs2->connection = &$this;
+		$rs2->sql = $rs->sql;
+		$rs2->dataProvider = $this->dataProvider;
+		$rs2->InitArrayFields($arr,$flds);
+		$rs2->fetchMode = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode;
+		return $rs2;
+	}
+	
+	/*
+	* Return all rows. Compat with PEAR DB
+	*/
+	function &GetAll($sql, $inputarr=false)
+	{
+		$arr =& $this->GetArray($sql,$inputarr);
+		return $arr;
+	}
+	
+	function &GetAssoc($sql, $inputarr=false,$force_array = false, $first2cols = false)
+	{
+		$rs =& $this->Execute($sql, $inputarr);
+		if (!$rs) {
+			$false = false;
+			return $false;
+		}
+		$arr =& $rs->GetAssoc($force_array,$first2cols);
+		return $arr;
+	}
+	
+	function &CacheGetAssoc($secs2cache, $sql=false, $inputarr=false,$force_array = false, $first2cols = false)
+	{
+		if (!is_numeric($secs2cache)) {
+			$first2cols = $force_array;
+			$force_array = $inputarr;
+		}
+		$rs =& $this->CacheExecute($secs2cache, $sql, $inputarr);
+		if (!$rs) {
+			$false = false;
+			return $false;
+		}
+		$arr =& $rs->GetAssoc($force_array,$first2cols);
+		return $arr;
+	}
+	
+	/**
+	* Return first element of first row of sql statement. Recordset is disposed
+	* for you.
+	*
+	* @param sql			SQL statement
+	* @param [inputarr]		input bind array
+	*/
+	function GetOne($sql,$inputarr=false)
+	{
+	global $ADODB_COUNTRECS;
+		$crecs = $ADODB_COUNTRECS;
+		$ADODB_COUNTRECS = false;
+		
+		$ret = false;
+		$rs = &$this->Execute($sql,$inputarr);
+		if ($rs) {	
+			if (!$rs->EOF) $ret = reset($rs->fields);
+			$rs->Close();
+		}
+		$ADODB_COUNTRECS = $crecs;
+		return $ret;
+	}
+	
+	function CacheGetOne($secs2cache,$sql=false,$inputarr=false)
+	{
+		$ret = false;
+		$rs = &$this->CacheExecute($secs2cache,$sql,$inputarr);
+		if ($rs) {		
+			if (!$rs->EOF) $ret = reset($rs->fields);
+			$rs->Close();
+		} 
+		
+		return $ret;
+	}
+	
+	function GetCol($sql, $inputarr = false, $trim = false)
+	{
+	  	$rv = false;
+	  	$rs = &$this->Execute($sql, $inputarr);
+	  	if ($rs) {
+			$rv = array();
+	   		if ($trim) {
+				while (!$rs->EOF) {
+					$rv[] = trim(reset($rs->fields));
+					$rs->MoveNext();
+		   		}
+			} else {
+				while (!$rs->EOF) {
+					$rv[] = reset($rs->fields);
+					$rs->MoveNext();
+		   		}
+			}
+	   		$rs->Close();
+	  	}
+	  	return $rv;
+	}
+	
+	function CacheGetCol($secs, $sql = false, $inputarr = false,$trim=false)
+	{
+	  	$rv = false;
+	  	$rs = &$this->CacheExecute($secs, $sql, $inputarr);
+	  	if ($rs) {
+			if ($trim) {
+				while (!$rs->EOF) {
+					$rv[] = trim(reset($rs->fields));
+					$rs->MoveNext();
+		   		}
+			} else {
+				while (!$rs->EOF) {
+					$rv[] = reset($rs->fields);
+					$rs->MoveNext();
+		   		}
+			}
+	   		$rs->Close();
+	  	}
+	  	return $rv;
+	}
+	
+	function &Transpose(&$rs,$addfieldnames=true)
+	{
+		$rs2 =& $this->_rs2rs($rs);
+		$false = false;
+		if (!$rs2) return $false;
+		
+		$rs2->_transpose($addfieldnames);
+		return $rs2;
+	}
+ 
+	/*
+		Calculate the offset of a date for a particular database and generate
+			appropriate SQL. Useful for calculating future/past dates and storing
+			in a database.
+			
+		If dayFraction=1.5 means 1.5 days from now, 1.0/24 for 1 hour.
+	*/
+	function OffsetDate($dayFraction,$date=false)
+	{		
+		if (!$date) $date = $this->sysDate;
+		return  '('.$date.'+'.$dayFraction.')';
+	}
+	
+	
+	/**
+	*
+	* @param sql			SQL statement
+	* @param [inputarr]		input bind array
+	*/
+	function &GetArray($sql,$inputarr=false)
+	{
+	global $ADODB_COUNTRECS;
+		
+		$savec = $ADODB_COUNTRECS;
+		$ADODB_COUNTRECS = false;
+		$rs =& $this->Execute($sql,$inputarr);
+		$ADODB_COUNTRECS = $savec;
+		if (!$rs) 
+			if (defined('ADODB_PEAR')) {
+				$cls = ADODB_PEAR_Error();
+				return $cls;
+			} else {
+				$false = false;
+				return $false;
+			}
+		$arr =& $rs->GetArray();
+		$rs->Close();
+		return $arr;
+	}
+	
+	function &CacheGetAll($secs2cache,$sql=false,$inputarr=false)
+	{
+		$arr =& $this->CacheGetArray($secs2cache,$sql,$inputarr);
+		return $arr;
+	}
+	
+	function &CacheGetArray($secs2cache,$sql=false,$inputarr=false)
+	{
+	global $ADODB_COUNTRECS;
+		
+		$savec = $ADODB_COUNTRECS;
+		$ADODB_COUNTRECS = false;
+		$rs =& $this->CacheExecute($secs2cache,$sql,$inputarr);
+		$ADODB_COUNTRECS = $savec;
+		
+		if (!$rs) 
+			if (defined('ADODB_PEAR')) {
+				$cls = ADODB_PEAR_Error();
+				return $cls;
+			} else {
+				$false = false;
+				return $false;
+			}
+		$arr =& $rs->GetArray();
+		$rs->Close();
+		return $arr;
+	}
+	
+	
+	
+	/**
+	* Return one row of sql statement. Recordset is disposed for you.
+	*
+	* @param sql			SQL statement
+	* @param [inputarr]		input bind array
+	*/
+	function &GetRow($sql,$inputarr=false)
+	{
+	global $ADODB_COUNTRECS;
+		$crecs = $ADODB_COUNTRECS;
+		$ADODB_COUNTRECS = false;
+		
+		$rs =& $this->Execute($sql,$inputarr);
+		
+		$ADODB_COUNTRECS = $crecs;
+		if ($rs) {
+			if (!$rs->EOF) $arr = $rs->fields;
+			else $arr = array();
+			$rs->Close();
+			return $arr;
+		}
+		
+		$false = false;
+		return $false;
+	}
+	
+	function &CacheGetRow($secs2cache,$sql=false,$inputarr=false)
+	{
+		$rs =& $this->CacheExecute($secs2cache,$sql,$inputarr);
+		if ($rs) {
+			$arr = false;
+			if (!$rs->EOF) $arr = $rs->fields;
+			$rs->Close();
+			return $arr;
+		}
+		$false = false;
+		return $false;
+	}
+	
+	/**
+	* Insert or replace a single record. Note: this is not the same as MySQL's replace. 
+	* ADOdb's Replace() uses update-insert semantics, not insert-delete-duplicates of MySQL.
+	* Also note that no table locking is done currently, so it is possible that the
+	* record be inserted twice by two programs...
+	*
+	* $this->Replace('products', array('prodname' =>"'Nails'","price" => 3.99), 'prodname');
+	*
+	* $table		table name
+	* $fieldArray	associative array of data (you must quote strings yourself).
+	* $keyCol		the primary key field name or if compound key, array of field names
+	* autoQuote		set to true to use a hueristic to quote strings. Works with nulls and numbers
+	*					but does not work with dates nor SQL functions.
+	* has_autoinc	the primary key is an auto-inc field, so skip in insert.
+	*
+	* Currently blob replace not supported
+	*
+	* returns 0 = fail, 1 = update, 2 = insert 
+	*/
+	
+	function Replace($table, $fieldArray, $keyCol, $autoQuote=false, $has_autoinc=false)
+	{
+		global $ADODB_INCLUDED_LIB;
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		
+		return _adodb_replace($this, $table, $fieldArray, $keyCol, $autoQuote, $has_autoinc);
+	}
+	
+	
+	/**
+	* Will select, getting rows from $offset (1-based), for $nrows. 
+	* This simulates the MySQL "select * from table limit $offset,$nrows" , and
+	* the PostgreSQL "select * from table limit $nrows offset $offset". Note that
+	* MySQL and PostgreSQL parameter ordering is the opposite of the other.
+	* eg. 
+	*  CacheSelectLimit(15,'select * from table',3); will return rows 1 to 3 (1-based)
+	*  CacheSelectLimit(15,'select * from table',3,2); will return rows 3 to 5 (1-based)
+	*
+	* BUG: Currently CacheSelectLimit fails with $sql with LIMIT or TOP clause already set
+	*
+	* @param [secs2cache]	seconds to cache data, set to 0 to force query. This is optional
+	* @param sql
+	* @param [offset]	is the row to start calculations from (1-based)
+	* @param [nrows]	is the number of rows to get
+	* @param [inputarr]	array of bind variables
+	* @return		the recordset ($rs->databaseType == 'array')
+ 	*/
+	function &CacheSelectLimit($secs2cache,$sql,$nrows=-1,$offset=-1,$inputarr=false)
+	{	
+		if (!is_numeric($secs2cache)) {
+			if ($sql === false) $sql = -1;
+			if ($offset == -1) $offset = false;
+									  // sql,	nrows, offset,inputarr
+			$rs =& $this->SelectLimit($secs2cache,$sql,$nrows,$offset,$this->cacheSecs);
+		} else {
+			if ($sql === false) ADOConnection::outp( "Warning: \$sql missing from CacheSelectLimit()");
+			$rs =& $this->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+		}
+		return $rs;
+	}
+	
+	
+	/**
+	* Flush cached recordsets that match a particular $sql statement. 
+	* If $sql == false, then we purge all files in the cache.
+ 	*/
+	
+	/**
+   * Flush cached recordsets that match a particular $sql statement. 
+   * If $sql == false, then we purge all files in the cache.
+    */
+	function CacheFlush($sql=false,$inputarr=false)
+	{
+	global $ADODB_CACHE_DIR;
+	
+		if ($this->memCache) {
+		global $ADODB_INCLUDED_MEMCACHE;
+		
+			$key = false;
+			if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php');
+			if ($sql) $key = $this->_gencachename($sql.serialize($inputarr),false,true);
+			FlushMemCache($key, $this->memCacheHost, $this->memCachePort, $this->debug);
+			return;
+		}
+	
+		if (strlen($ADODB_CACHE_DIR) > 1 && !$sql) {
+         /*if (strncmp(PHP_OS,'WIN',3) === 0)
+            $dir = str_replace('/', '\\', $ADODB_CACHE_DIR);
+         else */
+            $dir = $ADODB_CACHE_DIR;
+            
+         if ($this->debug) {
+            ADOConnection::outp( "CacheFlush: $dir<br><pre>\n", $this->_dirFlush($dir),"</pre>");
+         } else {
+            $this->_dirFlush($dir);
+         }
+         return;
+      } 
+      
+      global $ADODB_INCLUDED_CSV;
+      if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php');
+      
+      $f = $this->_gencachename($sql.serialize($inputarr),false);
+      adodb_write_file($f,''); // is adodb_write_file needed?
+      if (!@unlink($f)) {
+         if ($this->debug) ADOConnection::outp( "CacheFlush: failed for $f");
+      }
+   }
+   
+   /**
+   * Private function to erase all of the files and subdirectories in a directory.
+   *
+   * Just specify the directory, and tell it if you want to delete the directory or just clear it out.
+   * Note: $kill_top_level is used internally in the function to flush subdirectories.
+   */
+   function _dirFlush($dir, $kill_top_level = false) {
+      if(!$dh = @opendir($dir)) return;
+      
+      while (($obj = readdir($dh))) {
+         if($obj=='.' || $obj=='..')
+            continue;
+			
+         if (!@unlink($dir.'/'.$obj))
+			  $this->_dirFlush($dir.'/'.$obj, true);
+      }
+      if ($kill_top_level === true)
+         @rmdir($dir);
+      return true;
+   }
+   
+   
+	function xCacheFlush($sql=false,$inputarr=false)
+	{
+	global $ADODB_CACHE_DIR;
+	
+		if ($this->memCache) {
+			global $ADODB_INCLUDED_MEMCACHE;
+			$key = false;
+			if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php');
+			if ($sql) $key = $this->_gencachename($sql.serialize($inputarr),false,true);
+			flushmemCache($key, $this->memCacheHost, $this->memCachePort, $this->debug);
+			return;
+		}
+
+		if (strlen($ADODB_CACHE_DIR) > 1 && !$sql) {
+			if (strncmp(PHP_OS,'WIN',3) === 0) {
+				$cmd = 'del /s '.str_replace('/','\\',$ADODB_CACHE_DIR).'\adodb_*.cache';
+			} else {
+				//$cmd = 'find "'.$ADODB_CACHE_DIR.'" -type f -maxdepth 1 -print0 | xargs -0 rm -f';
+				$cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/'; 
+				// old version 'rm -f `find '.$ADODB_CACHE_DIR.' -name adodb_*.cache`';
+			}
+			if ($this->debug) {
+				ADOConnection::outp( "CacheFlush: $cmd<br><pre>\n", system($cmd),"</pre>");
+			} else {
+				exec($cmd);
+			}
+			return;
+		} 
+		
+		global $ADODB_INCLUDED_CSV;
+		if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php');
+		
+		$f = $this->_gencachename($sql.serialize($inputarr),false);
+		adodb_write_file($f,''); // is adodb_write_file needed?
+		if (!@unlink($f)) {
+			if ($this->debug) ADOConnection::outp( "CacheFlush: failed for $f");
+		}
+	}
+	
+	/**
+	* Private function to generate filename for caching.
+	* Filename is generated based on:
+	*
+	*  - sql statement
+	*  - database type (oci8, ibase, ifx, etc)
+	*  - database name
+	*  - userid
+	*  - setFetchMode (adodb 4.23)
+	*
+	* When not in safe mode, we create 256 sub-directories in the cache directory ($ADODB_CACHE_DIR). 
+	* Assuming that we can have 50,000 files per directory with good performance, 
+	* then we can scale to 12.8 million unique cached recordsets. Wow!
+ 	*/
+	function _gencachename($sql,$createdir,$memcache=false)
+	{
+	global $ADODB_CACHE_DIR;
+	static $notSafeMode;
+		
+		if ($this->fetchMode === false) { 
+		global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		} else {
+			$mode = $this->fetchMode;
+		}
+		$m = md5($sql.$this->databaseType.$this->database.$this->user.$mode);
+		if ($memcache) return $m;
+		
+		if (!isset($notSafeMode)) $notSafeMode = !ini_get('safe_mode');
+		$dir = ($notSafeMode) ? $ADODB_CACHE_DIR.'/'.substr($m,0,2) : $ADODB_CACHE_DIR;
+			
+		if ($createdir && $notSafeMode && !file_exists($dir)) {
+			$oldu = umask(0);
+			if (!mkdir($dir,0771)) 
+				if ($this->debug) ADOConnection::outp( "Unable to mkdir $dir for $sql");
+			umask($oldu);
+		}
+		return $dir.'/adodb_'.$m.'.cache';
+	}
+	
+	
+	/**
+	 * Execute SQL, caching recordsets.
+	 *
+	 * @param [secs2cache]	seconds to cache data, set to 0 to force query. 
+	 *					  This is an optional parameter.
+	 * @param sql		SQL statement to execute
+	 * @param [inputarr]	holds the input data  to bind to
+	 * @return 		RecordSet or false
+	 */
+	function &CacheExecute($secs2cache,$sql=false,$inputarr=false)
+	{
+
+			
+		if (!is_numeric($secs2cache)) {
+			$inputarr = $sql;
+			$sql = $secs2cache;
+			$secs2cache = $this->cacheSecs;
+		}
+		
+		if (is_array($sql)) {
+			$sqlparam = $sql;
+			$sql = $sql[0];
+		} else
+			$sqlparam = $sql;
+			
+		if ($this->memCache) {
+			global $ADODB_INCLUDED_MEMCACHE;
+			if (empty($ADODB_INCLUDED_MEMCACHE)) include(ADODB_DIR.'/adodb-memcache.lib.inc.php');
+			$md5file = $this->_gencachename($sql.serialize($inputarr),false,true);
+		} else {
+		global $ADODB_INCLUDED_CSV;
+			if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php');
+			$md5file = $this->_gencachename($sql.serialize($inputarr),true);
+		}
+
+		$err = '';
+		
+		if ($secs2cache > 0){
+			if ($this->memCache)
+				$rs = &getmemCache($md5file,$err,$secs2cache, $this->memCacheHost, $this->memCachePort);
+			else
+				$rs = &csv2rs($md5file,$err,$secs2cache,$this->arrayClass);
+			$this->numCacheHits += 1;
+		} else {
+			$err='Timeout 1';
+			$rs = false;
+			$this->numCacheMisses += 1;
+		}
+		if (!$rs) {
+		// no cached rs found
+			if ($this->debug) {
+				if (get_magic_quotes_runtime() && !$this->memCache) {
+					ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :(");
+				}
+				if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (see sql below)");
+			}
+			
+			$rs = &$this->Execute($sqlparam,$inputarr);
+
+			if ($rs && $this->memCache) {
+				$rs = &$this->_rs2rs($rs); // read entire recordset into memory immediately
+				if(!putmemCache($md5file, $rs, $this->memCacheHost, $this->memCachePort, $this->memCacheCompress, $this->debug)) {
+					if ($fn = $this->raiseErrorFn)
+						$fn($this->databaseType,'CacheExecute',-32000,"Cache write error",$md5file,$sql,$this);
+					if ($this->debug) ADOConnection::outp( " Cache write error");
+				}
+			} else
+			if ($rs) {
+				$eof = $rs->EOF;
+				$rs = &$this->_rs2rs($rs); // read entire recordset into memory immediately
+				$txt = _rs2serialize($rs,false,$sql); // serialize
+		
+				if (!adodb_write_file($md5file,$txt,$this->debug)) {
+					if ($fn = $this->raiseErrorFn) {
+						$fn($this->databaseType,'CacheExecute',-32000,"Cache write error",$md5file,$sql,$this);
+					}
+					if ($this->debug) ADOConnection::outp( " Cache write error");
+				}
+				if ($rs->EOF && !$eof) {
+					$rs->MoveFirst();
+					//$rs = &csv2rs($md5file,$err);		
+					$rs->connection = &$this; // Pablo suggestion
+				}  
+				
+			} else
+			if (!$this->memCache)
+				@unlink($md5file);
+		} else {
+			$this->_errorMsg = '';
+			$this->_errorCode = 0;
+			
+			if ($this->fnCacheExecute) {
+				$fn = $this->fnCacheExecute;
+				$fn($this, $secs2cache, $sql, $inputarr);
+			}
+		// ok, set cached object found
+			$rs->connection = &$this; // Pablo suggestion
+			if ($this->debug){ 
+					
+				$inBrowser = isset($_SERVER['HTTP_USER_AGENT']);
+				$ttl = $rs->timeCreated + $secs2cache - time();
+				$s = is_array($sql) ? $sql[0] : $sql;
+				if ($inBrowser) $s = '<i>'.htmlspecialchars($s).'</i>';
+				
+				ADOConnection::outp( " $md5file reloaded, ttl=$ttl [ $s ]");
+			}
+		}
+		return $rs;
+	}
+	
+	
+	/* 
+		Similar to PEAR DB's autoExecute(), except that 
+		$mode can be 'INSERT' or 'UPDATE' or DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE
+		If $mode == 'UPDATE', then $where is compulsory as a safety measure.
+		
+		$forceUpdate means that even if the data has not changed, perform update.
+	 */
+	function& AutoExecute($table, $fields_values, $mode = 'INSERT', $where = FALSE, $forceUpdate=true, $magicq=false) 
+	{
+		$false = false;
+		$sql = 'SELECT * FROM '.$table;  
+		if ($where!==FALSE) $sql .= ' WHERE '.$where;
+		else if ($mode == 'UPDATE' || $mode == 2 /* DB_AUTOQUERY_UPDATE */) {
+			ADOConnection::outp('AutoExecute: Illegal mode=UPDATE with empty WHERE clause');
+			return $false;
+		}
+
+		$rs =& $this->SelectLimit($sql,1);
+		if (!$rs) return $false; // table does not exist
+		$rs->tableName = $table;
+		
+		switch((string) $mode) {
+		case 'UPDATE':
+		case '2':
+			$sql = $this->GetUpdateSQL($rs, $fields_values, $forceUpdate, $magicq);
+			break;
+		case 'INSERT':
+		case '1':
+			$sql = $this->GetInsertSQL($rs, $fields_values, $magicq);
+			break;
+		default:
+			ADOConnection::outp("AutoExecute: Unknown mode=$mode");
+			return $false;
+		}
+		$ret = false;
+		if ($sql) $ret = $this->Execute($sql);
+		if ($ret) $ret = true;
+		return $ret;
+	}
+	
+	
+	/**
+	 * Generates an Update Query based on an existing recordset.
+	 * $arrFields is an associative array of fields with the value
+	 * that should be assigned.
+	 *
+	 * Note: This function should only be used on a recordset
+	 *	   that is run against a single table and sql should only 
+	 *		 be a simple select stmt with no groupby/orderby/limit
+	 *
+	 * "Jonathan Younger" <jyounger@unilab.com>
+  	 */
+	function GetUpdateSQL(&$rs, $arrFields,$forceUpdate=false,$magicq=false,$force=null)
+	{
+		global $ADODB_INCLUDED_LIB;
+
+        //********************************************************//
+        //This is here to maintain compatibility
+        //with older adodb versions. Sets force type to force nulls if $forcenulls is set.
+		if (!isset($force)) {
+				global $ADODB_FORCE_TYPE;
+			    $force = $ADODB_FORCE_TYPE;
+		}
+		//********************************************************//
+
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		return _adodb_getupdatesql($this,$rs,$arrFields,$forceUpdate,$magicq,$force);
+	}
+
+	/**
+	 * Generates an Insert Query based on an existing recordset.
+	 * $arrFields is an associative array of fields with the value
+	 * that should be assigned.
+	 *
+	 * Note: This function should only be used on a recordset
+	 *	   that is run against a single table.
+  	 */
+	function GetInsertSQL(&$rs, $arrFields,$magicq=false,$force=null)
+	{	
+		global $ADODB_INCLUDED_LIB;
+		if (!isset($force)) {
+			global $ADODB_FORCE_TYPE;
+			$force = $ADODB_FORCE_TYPE;
+			
+		}
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		return _adodb_getinsertsql($this,$rs,$arrFields,$magicq,$force);
+	}
+	
+
+	/**
+	* Update a blob column, given a where clause. There are more sophisticated
+	* blob handling functions that we could have implemented, but all require
+	* a very complex API. Instead we have chosen something that is extremely
+	* simple to understand and use. 
+	*
+	* Note: $blobtype supports 'BLOB' and 'CLOB', default is BLOB of course.
+	*
+	* Usage to update a $blobvalue which has a primary key blob_id=1 into a 
+	* field blobtable.blobcolumn:
+	*
+	*	UpdateBlob('blobtable', 'blobcolumn', $blobvalue, 'blob_id=1');
+	*
+	* Insert example:
+	*
+	*	$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+	*	$conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
+	*/
+	
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+		return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false;
+	}
+
+	/**
+	* Usage:
+	*	UpdateBlob('TABLE', 'COLUMN', '/path/to/file', 'ID=1');
+	*	
+	*	$blobtype supports 'BLOB' and 'CLOB'
+	*
+	*	$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+	*	$conn->UpdateBlob('blobtable','blobcol',$blobpath,'id=1');
+	*/
+	function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB')
+	{
+		$fd = fopen($path,'rb');
+		if ($fd === false) return false;
+		$val = fread($fd,filesize($path));
+		fclose($fd);
+		return $this->UpdateBlob($table,$column,$val,$where,$blobtype);
+	}
+	
+	function BlobDecode($blob)
+	{
+		return $blob;
+	}
+	
+	function BlobEncode($blob)
+	{
+		return $blob;
+	}
+	
+	function SetCharSet($charset)
+	{
+		return false;
+	}
+	
+	function IfNull( $field, $ifNull ) 
+	{
+		return " CASE WHEN $field is null THEN $ifNull ELSE $field END ";
+	}
+	
+	function LogSQL($enable=true)
+	{
+		include_once(ADODB_DIR.'/adodb-perf.inc.php');
+		
+		if ($enable) $this->fnExecute = 'adodb_log_sql';
+		else $this->fnExecute = false;
+		
+		$old = $this->_logsql;	
+		$this->_logsql = $enable;
+		if ($enable && !$old) $this->_affected = false;
+		return $old;
+	}
+	
+	function GetCharSet()
+	{
+		return false;
+	}
+	
+	/**
+	* Usage:
+	*	UpdateClob('TABLE', 'COLUMN', $var, 'ID=1', 'CLOB');
+	*
+	*	$conn->Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)');
+	*	$conn->UpdateClob('clobtable','clobcol',$clob,'id=1');
+	*/
+	function UpdateClob($table,$column,$val,$where)
+	{
+		return $this->UpdateBlob($table,$column,$val,$where,'CLOB');
+	}
+	
+	// not the fastest implementation - quick and dirty - jlim
+	// for best performance, use the actual $rs->MetaType().
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		
+		if (empty($this->_metars)) {
+			$rsclass = $this->rsPrefix.$this->databaseType;
+			$this->_metars = new $rsclass(false,$this->fetchMode); 
+			$this->_metars->connection =& $this;
+		}
+		return $this->_metars->MetaType($t,$len,$fieldobj);
+	}
+	
+	
+	/**
+	*  Change the SQL connection locale to a specified locale.
+	*  This is used to get the date formats written depending on the client locale.
+	*/
+	function SetDateLocale($locale = 'En')
+	{
+		$this->locale = $locale;
+		switch (strtoupper($locale))
+		{
+			case 'EN':
+				$this->fmtDate="'Y-m-d'";
+				$this->fmtTimeStamp = "'Y-m-d H:i:s'";
+				break;
+				
+			case 'US':
+				$this->fmtDate = "'m-d-Y'";
+				$this->fmtTimeStamp = "'m-d-Y H:i:s'";
+				break;
+				
+			case 'PT_BR': 	
+			case 'NL':
+			case 'FR':
+			case 'RO':
+			case 'IT':
+				$this->fmtDate="'d-m-Y'";
+				$this->fmtTimeStamp = "'d-m-Y H:i:s'";
+				break;
+				
+			case 'GE':
+				$this->fmtDate="'d.m.Y'";
+				$this->fmtTimeStamp = "'d.m.Y H:i:s'";
+				break;
+				
+			default:
+				$this->fmtDate="'Y-m-d'";
+				$this->fmtTimeStamp = "'Y-m-d H:i:s'";
+				break;
+		}
+	}
+
+	function &GetActiveRecordsClass($class, $table,$whereOrderBy=false,$bindarr=false, $primkeyArr=false)
+	{
+	global $_ADODB_ACTIVE_DBS;
+	
+		$save = $this->SetFetchMode(ADODB_FETCH_NUM);
+		if (empty($whereOrderBy)) $whereOrderBy = '1=1';
+		$rows = $this->GetAll("select * from ".$table.' WHERE '.$whereOrderBy,$bindarr);
+		$this->SetFetchMode($save);
+		
+		$false = false;
+		
+		if ($rows === false) {	
+			return $false;
+		}
+		
+		
+		if (!isset($_ADODB_ACTIVE_DBS)) {
+			include(ADODB_DIR.'/adodb-active-record.inc.php');
+		}	
+		if (!class_exists($class)) {
+			ADOConnection::outp("Unknown class $class in GetActiveRcordsClass()");
+			return $false;
+		}
+		$arr = array();
+		foreach($rows as $row) {
+		
+			$obj = new $class($table,$primkeyArr,$this);
+			if ($obj->ErrorMsg()){
+				$this->_errorMsg = $obj->ErrorMsg();
+				return $false;
+			}
+			$obj->Set($row);
+			$arr[] = $obj;
+		}
+		return $arr;
+	}
+	
+	function &GetActiveRecords($table,$where=false,$bindarr=false,$primkeyArr=false)
+	{
+		$arr =& $this->GetActiveRecordsClass('ADODB_Active_Record', $table, $where, $bindarr, $primkeyArr);
+		return $arr;
+	}
+	
+	/**
+	 * Close Connection
+	 */
+	function Close()
+	{
+		$rez = $this->_close();
+		$this->_connectionID = false;
+		return $rez;
+	}
+	
+	/**
+	 * Begin a Transaction. Must be followed by CommitTrans() or RollbackTrans().
+	 *
+	 * @return true if succeeded or false if database does not support transactions
+	 */
+	function BeginTrans() 
+	{
+		if ($this->debug) ADOConnection::outp("BeginTrans: Transactions not supported for this driver");
+		return false;
+	}
+	
+	/* set transaction mode */
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$transaction_mode = $this->MetaTransaction($transaction_mode, $this->dataProvider);
+		$this->_transmode  = $transaction_mode;
+	}
+/*
+http://msdn2.microsoft.com/en-US/ms173763.aspx
+http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-isolation.html
+http://www.postgresql.org/docs/8.1/interactive/sql-set-transaction.html
+http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_10005.htm
+*/
+	function MetaTransaction($mode,$db)
+	{
+		$mode = strtoupper($mode);
+		$mode = str_replace('ISOLATION LEVEL ','',$mode);
+		
+		switch($mode) {
+
+		case 'READ UNCOMMITTED':
+			switch($db) { 
+			case 'oci8':
+			case 'oracle':
+				return 'ISOLATION LEVEL READ COMMITTED';
+			default:
+				return 'ISOLATION LEVEL READ UNCOMMITTED';
+			}
+			break;
+					
+		case 'READ COMMITTED':
+				return 'ISOLATION LEVEL READ COMMITTED';
+			break;
+			
+		case 'REPEATABLE READ':
+			switch($db) {
+			case 'oci8':
+			case 'oracle':
+				return 'ISOLATION LEVEL SERIALIZABLE';
+			default:
+				return 'ISOLATION LEVEL REPEATABLE READ';
+			}
+			break;
+			
+		case 'SERIALIZABLE':
+				return 'ISOLATION LEVEL SERIALIZABLE';
+			break;
+			
+		default:
+			return $mode;
+		}
+	}
+	
+	/**
+	 * If database does not support transactions, always return true as data always commited
+	 *
+	 * @param $ok  set to false to rollback transaction, true to commit
+	 *
+	 * @return true/false.
+	 */
+	function CommitTrans($ok=true) 
+	{ return true;}
+	
+	
+	/**
+	 * If database does not support transactions, rollbacks always fail, so return false
+	 *
+	 * @return true/false.
+	 */
+	function RollbackTrans() 
+	{ return false;}
+
+
+	/**
+	 * return the databases that the driver can connect to. 
+	 * Some databases will return an empty array.
+	 *
+	 * @return an array of database names.
+	 */
+		function MetaDatabases() 
+		{
+		global $ADODB_FETCH_MODE;
+		
+			if ($this->metaDatabasesSQL) {
+				$save = $ADODB_FETCH_MODE; 
+				$ADODB_FETCH_MODE = ADODB_FETCH_NUM; 
+				
+				if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+				
+				$arr = $this->GetCol($this->metaDatabasesSQL);
+				if (isset($savem)) $this->SetFetchMode($savem);
+				$ADODB_FETCH_MODE = $save; 
+			
+				return $arr;
+			}
+			
+			return false;
+		}
+	
+		
+	/**
+	 * @param ttype can either be 'VIEW' or 'TABLE' or false. 
+	 * 		If false, both views and tables are returned.
+	 *		"VIEW" returns only views
+	 *		"TABLE" returns only tables
+	 * @param showSchema returns the schema/user with the table name, eg. USER.TABLE
+	 * @param mask  is the input mask - only supported by oci8 and postgresql
+	 *
+	 * @return  array of tables for current database.
+	 */ 
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+	global $ADODB_FETCH_MODE;
+	
+		
+		$false = false;
+		if ($mask) {
+			return $false;
+		}
+		if ($this->metaTablesSQL) {
+			$save = $ADODB_FETCH_MODE; 
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM; 
+			
+			if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+			
+			$rs = $this->Execute($this->metaTablesSQL);
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save; 
+			
+			if ($rs === false) return $false;
+			$arr =& $rs->GetArray();
+			$arr2 = array();
+			
+			if ($hast = ($ttype && isset($arr[0][1]))) { 
+				$showt = strncmp($ttype,'T',1);
+			}
+			
+			for ($i=0; $i < sizeof($arr); $i++) {
+				if ($hast) {
+					if ($showt == 0) {
+						if (strncmp($arr[$i][1],'T',1) == 0) $arr2[] = trim($arr[$i][0]);
+					} else {
+						if (strncmp($arr[$i][1],'V',1) == 0) $arr2[] = trim($arr[$i][0]);
+					}
+				} else
+					$arr2[] = trim($arr[$i][0]);
+			}
+			$rs->Close();
+			return $arr2;
+		}
+		return $false;
+	}
+	
+	
+	function _findschema(&$table,&$schema)
+	{
+		if (!$schema && ($at = strpos($table,'.')) !== false) {
+			$schema = substr($table,0,$at);
+			$table = substr($table,$at+1);
+		}
+	}
+	
+	/**
+	 * List columns in a database as an array of ADOFieldObjects. 
+	 * See top of file for definition of object.
+	 *
+	 * @param $table	table name to query
+	 * @param $normalize	makes table name case-insensitive (required by some databases)
+	 * @schema is optional database schema to use - not supported by all databases.
+	 *
+	 * @return  array of ADOFieldObjects for current table.
+	 */
+	function &MetaColumns($table,$normalize=true) 
+	{
+	global $ADODB_FETCH_MODE;
+		
+		$false = false;
+		
+		if (!empty($this->metaColumnsSQL)) {
+		
+			$schema = false;
+			$this->_findschema($table,$schema);
+		
+			$save = $ADODB_FETCH_MODE;
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+			if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+			$rs = $this->Execute(sprintf($this->metaColumnsSQL,($normalize)?strtoupper($table):$table));
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			if ($rs === false || $rs->EOF) return $false;
+
+			$retarr = array();
+			while (!$rs->EOF) { //print_r($rs->fields);
+				$fld = new ADOFieldObject();
+				$fld->name = $rs->fields[0];
+				$fld->type = $rs->fields[1];
+				if (isset($rs->fields[3]) && $rs->fields[3]) {
+					if ($rs->fields[3]>0) $fld->max_length = $rs->fields[3];
+					$fld->scale = $rs->fields[4];
+					if ($fld->scale>0) $fld->max_length += 1;
+				} else
+					$fld->max_length = $rs->fields[2];
+					
+				if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+				else $retarr[strtoupper($fld->name)] = $fld;
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			return $retarr;	
+		}
+		return $false;
+	}
+	
+    /**
+      * List indexes on a table as an array.
+      * @param table  table name to query
+      * @param primary true to only show primary keys. Not actually used for most databases
+	  *
+      * @return array of indexes on current table. Each element represents an index, and is itself an associative array.
+	  
+		 Array (
+		    [name_of_index] => Array
+		      (
+	          [unique] => true or false
+	          [columns] => Array
+	          (
+	          	[0] => firstname
+		      	[1] => lastname
+	          )
+		)		
+      */
+     function &MetaIndexes($table, $primary = false, $owner = false)
+     {
+	 		$false = false;
+            return $false;
+     }
+
+	/**
+	 * List columns names in a table as an array. 
+	 * @param table	table name to query
+	 *
+	 * @return  array of column names for current table.
+	 */ 
+	function &MetaColumnNames($table, $numIndexes=false,$useattnum=false /* only for postgres */) 
+	{
+		$objarr =& $this->MetaColumns($table);
+		if (!is_array($objarr)) {
+			$false = false;
+			return $false;
+		}
+		$arr = array();
+		if ($numIndexes) {
+			$i = 0;
+			if ($useattnum) {
+				foreach($objarr as $v) 
+					$arr[$v->attnum] = $v->name;
+				
+			} else
+				foreach($objarr as $v) $arr[$i++] = $v->name;
+		} else
+			foreach($objarr as $v) $arr[strtoupper($v->name)] = $v->name;
+		
+		return $arr;
+	}
+			
+	/**
+	 * Different SQL databases used different methods to combine strings together.
+	 * This function provides a wrapper. 
+	 * 
+	 * param s	variable number of string parameters
+	 *
+	 * Usage: $db->Concat($str1,$str2);
+	 * 
+	 * @return concatenated string
+	 */ 	 
+	function Concat()
+	{	
+		$arr = func_get_args();
+		return implode($this->concat_operator, $arr);
+	}
+	
+	
+	/**
+	 * Converts a date "d" to a string that the database can understand.
+	 *
+	 * @param d	a date in Unix date time format.
+	 *
+	 * @return  date string in database date format
+	 */
+	function DBDate($d)
+	{
+		if (empty($d) && $d !== 0) return 'null';
+
+		if (is_string($d) && !is_numeric($d)) {
+			if ($d === 'null' || strncmp($d,"'",1) === 0) return $d;
+			if ($this->isoDates) return "'$d'";
+			$d = ADOConnection::UnixDate($d);
+		}
+
+		return adodb_date($this->fmtDate,$d);
+	}
+	
+	function BindDate($d)
+	{
+		$d = $this->DBDate($d);
+		if (strncmp($d,"'",1)) return $d;
+		
+		return substr($d,1,strlen($d)-2);
+	}
+	
+	function BindTimeStamp($d)
+	{
+		$d = $this->DBTimeStamp($d);
+		if (strncmp($d,"'",1)) return $d;
+		
+		return substr($d,1,strlen($d)-2);
+	}
+	
+	
+	/**
+	 * Converts a timestamp "ts" to a string that the database can understand.
+	 *
+	 * @param ts	a timestamp in Unix date time format.
+	 *
+	 * @return  timestamp string in database timestamp format
+	 */
+	function DBTimeStamp($ts)
+	{
+		if (empty($ts) && $ts !== 0) return 'null';
+
+		# strlen(14) allows YYYYMMDDHHMMSS format
+		if (!is_string($ts) || (is_numeric($ts) && strlen($ts)<14)) 
+			return adodb_date($this->fmtTimeStamp,$ts);
+		
+		if ($ts === 'null') return $ts;
+		if ($this->isoDates && strlen($ts) !== 14) return "'$ts'";
+		
+		$ts = ADOConnection::UnixTimeStamp($ts);
+		return adodb_date($this->fmtTimeStamp,$ts);
+	}
+	
+	/**
+	 * Also in ADORecordSet.
+	 * @param $v is a date string in YYYY-MM-DD format
+	 *
+	 * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format
+	 */
+	function UnixDate($v)
+	{
+		if (is_object($v)) {
+		// odbtp support
+		//( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 )
+			return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year);
+		}
+	
+		if (is_numeric($v) && strlen($v) !== 8) return $v;
+		if (!preg_match( "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})|", 
+			($v), $rr)) return false;
+
+		if ($rr[1] <= TIMESTAMP_FIRST_YEAR) return 0;
+		// h-m-s-MM-DD-YY
+		return @adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]);
+	}
+	
+
+	/**
+	 * Also in ADORecordSet.
+	 * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format
+	 *
+	 * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format
+	 */
+	function UnixTimeStamp($v)
+	{
+		if (is_object($v)) {
+		// odbtp support
+		//( [year] => 2004 [month] => 9 [day] => 4 [hour] => 12 [minute] => 44 [second] => 8 [fraction] => 0 )
+			return adodb_mktime($v->hour,$v->minute,$v->second,$v->month,$v->day, $v->year);
+		}
+		
+		if (!preg_match( 
+			"|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ ,-]*(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", 
+			($v), $rr)) return false;
+			
+		if ($rr[1] <= TIMESTAMP_FIRST_YEAR && $rr[2]<= 1) return 0;
+	
+		// h-m-s-MM-DD-YY
+		if (!isset($rr[5])) return  adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]);
+		return  @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1]);
+	}
+	
+	/**
+	 * Also in ADORecordSet.
+	 *
+	 * Format database date based on user defined format.
+	 *
+	 * @param v  	is the character date in YYYY-MM-DD format, returned by database
+	 * @param fmt 	is the format to apply to it, using date()
+	 *
+	 * @return a date formated as user desires
+	 */
+	 
+	function UserDate($v,$fmt='Y-m-d',$gmt=false)
+	{
+		$tt = $this->UnixDate($v);
+
+		// $tt == -1 if pre TIMESTAMP_FIRST_YEAR
+		if (($tt === false || $tt == -1) && $v != false) return $v;
+		else if ($tt == 0) return $this->emptyDate;
+		else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR
+		}
+		
+		return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt);
+	
+	}
+	
+		/**
+	 *
+	 * @param v  	is the character timestamp in YYYY-MM-DD hh:mm:ss format
+	 * @param fmt 	is the format to apply to it, using date()
+	 *
+	 * @return a timestamp formated as user desires
+	 */
+	function UserTimeStamp($v,$fmt='Y-m-d H:i:s',$gmt=false)
+	{
+		if (!isset($v)) return $this->emptyTimeStamp;
+		# strlen(14) allows YYYYMMDDHHMMSS format
+		if (is_numeric($v) && strlen($v)<14) return ($gmt) ? adodb_gmdate($fmt,$v) : adodb_date($fmt,$v);
+		$tt = $this->UnixTimeStamp($v);
+		// $tt == -1 if pre TIMESTAMP_FIRST_YEAR
+		if (($tt === false || $tt == -1) && $v != false) return $v;
+		if ($tt == 0) return $this->emptyTimeStamp;
+		return ($gmt) ? adodb_gmdate($fmt,$tt) : adodb_date($fmt,$tt);
+	}
+	
+	function escape($s,$magic_quotes=false)
+	{
+		return $this->addq($s,$magic_quotes);
+	}
+	
+	/**
+	* Quotes a string, without prefixing nor appending quotes. 
+	*/
+	function addq($s,$magic_quotes=false)
+	{
+		if (!$magic_quotes) {
+		
+			if ($this->replaceQuote[0] == '\\'){
+				// only since php 4.0.5
+				$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s);
+				//$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s));
+			}
+			return  str_replace("'",$this->replaceQuote,$s);
+		}
+		
+		// undo magic quotes for "
+		$s = str_replace('\\"','"',$s);
+		
+		if ($this->replaceQuote == "\\'")  // ' already quoted, no need to change anything
+			return $s;
+		else {// change \' to '' for sybase/mssql
+			$s = str_replace('\\\\','\\',$s);
+			return str_replace("\\'",$this->replaceQuote,$s);
+		}
+	}
+	
+	/**
+	 * Correctly quotes a string so that all strings are escaped. We prefix and append
+	 * to the string single-quotes.
+	 * An example is  $db->qstr("Don't bother",magic_quotes_runtime());
+	 * 
+	 * @param s			the string to quote
+	 * @param [magic_quotes]	if $s is GET/POST var, set to get_magic_quotes_gpc().
+	 *				This undoes the stupidity of magic quotes for GPC.
+	 *
+	 * @return  quoted string to be sent back to database
+	 */
+	function qstr($s,$magic_quotes=false)
+	{	
+		if (!$magic_quotes) {
+		
+			if ($this->replaceQuote[0] == '\\'){
+				// only since php 4.0.5
+				$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s);
+				//$s = str_replace("\0","\\\0", str_replace('\\','\\\\',$s));
+			}
+			return  "'".str_replace("'",$this->replaceQuote,$s)."'";
+		}
+		
+		// undo magic quotes for "
+		$s = str_replace('\\"','"',$s);
+		
+		if ($this->replaceQuote == "\\'")  // ' already quoted, no need to change anything
+			return "'$s'";
+		else {// change \' to '' for sybase/mssql
+			$s = str_replace('\\\\','\\',$s);
+			return "'".str_replace("\\'",$this->replaceQuote,$s)."'";
+		}
+	}
+	
+	
+	/**
+	* Will select the supplied $page number from a recordset, given that it is paginated in pages of 
+	* $nrows rows per page. It also saves two boolean values saying if the given page is the first 
+	* and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
+	*
+	* See readme.htm#ex8 for an example of usage.
+	*
+	* @param sql
+	* @param nrows		is the number of rows per page to get
+	* @param page		is the page number to get (1-based)
+	* @param [inputarr]	array of bind variables
+	* @param [secs2cache]		is a private parameter only used by jlim
+	* @return		the recordset ($rs->databaseType == 'array')
+	*
+	* NOTE: phpLens uses a different algorithm and does not use PageExecute().
+	*
+	*/
+	function &PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) 
+	{
+		global $ADODB_INCLUDED_LIB;
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		if ($this->pageExecuteCountRows) $rs =& _adodb_pageexecute_all_rows($this, $sql, $nrows, $page, $inputarr, $secs2cache);
+		else $rs =& _adodb_pageexecute_no_last_page($this, $sql, $nrows, $page, $inputarr, $secs2cache);
+		return $rs;
+	}
+	
+		
+	/**
+	* Will select the supplied $page number from a recordset, given that it is paginated in pages of 
+	* $nrows rows per page. It also saves two boolean values saying if the given page is the first 
+	* and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
+	*
+	* @param secs2cache	seconds to cache data, set to 0 to force query
+	* @param sql
+	* @param nrows		is the number of rows per page to get
+	* @param page		is the page number to get (1-based)
+	* @param [inputarr]	array of bind variables
+	* @return		the recordset ($rs->databaseType == 'array')
+	*/
+	function &CachePageExecute($secs2cache, $sql, $nrows, $page,$inputarr=false) 
+	{
+		/*switch($this->dataProvider) {
+		case 'postgres':
+		case 'mysql': 
+			break;
+		default: $secs2cache = 0; break;
+		}*/
+		$rs =& $this->PageExecute($sql,$nrows,$page,$inputarr,$secs2cache);
+		return $rs;
+	}
+
+} // end class ADOConnection
+	
+	
+	
+	//==============================================================================================	
+	// CLASS ADOFetchObj
+	//==============================================================================================	
+		
+	/**
+	* Internal placeholder for record objects. Used by ADORecordSet->FetchObj().
+	*/
+	class ADOFetchObj {
+	};
+	
+	//==============================================================================================	
+	// CLASS ADORecordSet_empty
+	//==============================================================================================	
+	
+	/**
+	* Lightweight recordset when there are no records to be returned
+	*/
+	class ADORecordSet_empty
+	{
+		var $dataProvider = 'empty';
+		var $databaseType = false;
+		var $EOF = true;
+		var $_numOfRows = 0;
+		var $fields = false;
+		var $connection = false;
+		function RowCount() {return 0;}
+		function RecordCount() {return 0;}
+		function PO_RecordCount(){return 0;}
+		function Close(){return true;}
+		function FetchRow() {return false;}
+		function FieldCount(){ return 0;}
+		function Init() {}
+	}
+	
+	//==============================================================================================	
+	// DATE AND TIME FUNCTIONS
+	//==============================================================================================	
+	if (!defined('ADODB_DATE_VERSION')) include(ADODB_DIR.'/adodb-time.inc.php');
+	
+	//==============================================================================================	
+	// CLASS ADORecordSet
+	//==============================================================================================	
+
+	if (PHP_VERSION < 5) include_once(ADODB_DIR.'/adodb-php4.inc.php');
+	else include_once(ADODB_DIR.'/adodb-iterator.inc.php');
+   /**
+	 * RecordSet class that represents the dataset returned by the database.
+	 * To keep memory overhead low, this class holds only the current row in memory.
+	 * No prefetching of data is done, so the RecordCount() can return -1 ( which
+	 * means recordcount not known).
+	 */
+	class ADORecordSet extends ADODB_BASE_RS {
+	/*
+	 * public variables	
+	 */
+	var $dataProvider = "native";
+	var $fields = false; 	/// holds the current row data
+	var $blobSize = 100; 	/// any varchar/char field this size or greater is treated as a blob
+							/// in other words, we use a text area for editing.
+	var $canSeek = false; 	/// indicates that seek is supported
+	var $sql; 				/// sql text
+	var $EOF = false;		/// Indicates that the current record position is after the last record in a Recordset object. 
+	
+	var $emptyTimeStamp = '&nbsp;'; /// what to display when $time==0
+	var $emptyDate = '&nbsp;'; /// what to display when $time==0
+	var $debug = false;
+	var $timeCreated=0; 	/// datetime in Unix format rs created -- for cached recordsets
+
+	var $bind = false; 		/// used by Fields() to hold array - should be private?
+	var $fetchMode;			/// default fetch mode
+	var $connection = false; /// the parent connection
+	/*
+	 *	private variables	
+	 */
+	var $_numOfRows = -1;	/** number of rows, or -1 */
+	var $_numOfFields = -1;	/** number of fields in recordset */
+	var $_queryID = -1;		/** This variable keeps the result link identifier.	*/
+	var $_currentRow = -1;	/** This variable keeps the current row in the Recordset.	*/
+	var $_closed = false; 	/** has recordset been closed */
+	var $_inited = false; 	/** Init() should only be called once */
+	var $_obj; 				/** Used by FetchObj */
+	var $_names;			/** Used by FetchObj */
+	
+	var $_currentPage = -1;	/** Added by Iván Oliva to implement recordset pagination */
+	var $_atFirstPage = false;	/** Added by Iván Oliva to implement recordset pagination */
+	var $_atLastPage = false;	/** Added by Iván Oliva to implement recordset pagination */
+	var $_lastPageNo = -1; 
+	var $_maxRecordCount = 0;
+	var $datetime = false;
+	
+	/**
+	 * Constructor
+	 *
+	 * @param queryID  	this is the queryID returned by ADOConnection->_query()
+	 *
+	 */
+	function ADORecordSet($queryID) 
+	{
+		$this->_queryID = $queryID;
+	}
+	
+	
+	
+	function Init()
+	{
+		if ($this->_inited) return;
+		$this->_inited = true;
+		if ($this->_queryID) @$this->_initrs();
+		else {
+			$this->_numOfRows = 0;
+			$this->_numOfFields = 0;
+		}
+		if ($this->_numOfRows != 0 && $this->_numOfFields && $this->_currentRow == -1) {
+			
+			$this->_currentRow = 0;
+			if ($this->EOF = ($this->_fetch() === false)) {
+				$this->_numOfRows = 0; // _numOfRows could be -1
+			}
+		} else {
+			$this->EOF = true;
+		}
+	}
+	
+	
+	/**
+	 * Generate a SELECT tag string from a recordset, and return the string.
+	 * If the recordset has 2 cols, we treat the 1st col as the containing 
+	 * the text to display to the user, and 2nd col as the return value. Default
+	 * strings are compared with the FIRST column.
+	 *
+	 * @param name  		name of SELECT tag
+	 * @param [defstr]		the value to hilite. Use an array for multiple hilites for listbox.
+	 * @param [blank1stItem]	true to leave the 1st item in list empty
+	 * @param [multiple]		true for listbox, false for popup
+	 * @param [size]		#rows to show for listbox. not used by popup
+	 * @param [selectAttr]		additional attributes to defined for SELECT tag.
+	 *				useful for holding javascript onChange='...' handlers.
+	 & @param [compareFields0]	when we have 2 cols in recordset, we compare the defstr with 
+	 *				column 0 (1st col) if this is true. This is not documented.
+	 *
+	 * @return HTML
+	 *
+	 * changes by glen.davies@cce.ac.nz to support multiple hilited items
+	 */
+	function GetMenu($name,$defstr='',$blank1stItem=true,$multiple=false,
+			$size=0, $selectAttr='',$compareFields0=true)
+	{
+		global $ADODB_INCLUDED_LIB;
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		return _adodb_getmenu($this, $name,$defstr,$blank1stItem,$multiple,
+			$size, $selectAttr,$compareFields0);
+	}
+	
+
+	
+	/**
+	 * Generate a SELECT tag string from a recordset, and return the string.
+	 * If the recordset has 2 cols, we treat the 1st col as the containing 
+	 * the text to display to the user, and 2nd col as the return value. Default
+	 * strings are compared with the SECOND column.
+	 *
+	 */
+	function GetMenu2($name,$defstr='',$blank1stItem=true,$multiple=false,$size=0, $selectAttr='')	
+	{
+		return $this->GetMenu($name,$defstr,$blank1stItem,$multiple,
+			$size, $selectAttr,false);
+	}
+	
+	/*
+		Grouped Menu
+	*/
+	function GetMenu3($name,$defstr='',$blank1stItem=true,$multiple=false,
+			$size=0, $selectAttr='')
+	{
+		global $ADODB_INCLUDED_LIB;
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		return _adodb_getmenu_gp($this, $name,$defstr,$blank1stItem,$multiple,
+			$size, $selectAttr,false);
+	}
+
+	/**
+	 * return recordset as a 2-dimensional array.
+	 *
+	 * @param [nRows]  is the number of rows to return. -1 means every row.
+	 *
+	 * @return an array indexed by the rows (0-based) from the recordset
+	 */
+	function &GetArray($nRows = -1) 
+	{
+	global $ADODB_EXTENSION; if ($ADODB_EXTENSION) {
+		$results = adodb_getall($this,$nRows);
+		return $results;
+	}
+		$results = array();
+		$cnt = 0;
+		while (!$this->EOF && $nRows != $cnt) {
+			$results[] = $this->fields;
+			$this->MoveNext();
+			$cnt++;
+		}
+		return $results;
+	}
+	
+	function &GetAll($nRows = -1)
+	{
+		$arr =& $this->GetArray($nRows);
+		return $arr;
+	}
+	
+	/*
+	* Some databases allow multiple recordsets to be returned. This function
+	* will return true if there is a next recordset, or false if no more.
+	*/
+	function NextRecordSet()
+	{
+		return false;
+	}
+	
+	/**
+	 * return recordset as a 2-dimensional array. 
+	 * Helper function for ADOConnection->SelectLimit()
+	 *
+	 * @param offset	is the row to start calculations from (1-based)
+	 * @param [nrows]	is the number of rows to return
+	 *
+	 * @return an array indexed by the rows (0-based) from the recordset
+	 */
+	function &GetArrayLimit($nrows,$offset=-1) 
+	{	
+		if ($offset <= 0) {
+			$arr =& $this->GetArray($nrows);
+			return $arr;
+		} 
+		
+		$this->Move($offset);
+		
+		$results = array();
+		$cnt = 0;
+		while (!$this->EOF && $nrows != $cnt) {
+			$results[$cnt++] = $this->fields;
+			$this->MoveNext();
+		}
+		
+		return $results;
+	}
+	
+	
+	/**
+	 * Synonym for GetArray() for compatibility with ADO.
+	 *
+	 * @param [nRows]  is the number of rows to return. -1 means every row.
+	 *
+	 * @return an array indexed by the rows (0-based) from the recordset
+	 */
+	function &GetRows($nRows = -1) 
+	{
+		$arr =& $this->GetArray($nRows);
+		return $arr;
+	}
+	
+	/**
+	 * return whole recordset as a 2-dimensional associative array if there are more than 2 columns. 
+	 * The first column is treated as the key and is not included in the array. 
+	 * If there is only 2 columns, it will return a 1 dimensional array of key-value pairs unless
+	 * $force_array == true.
+	 *
+	 * @param [force_array] has only meaning if we have 2 data columns. If false, a 1 dimensional
+	 * 	array is returned, otherwise a 2 dimensional array is returned. If this sounds confusing,
+	 * 	read the source.
+	 *
+	 * @param [first2cols] means if there are more than 2 cols, ignore the remaining cols and 
+	 * instead of returning array[col0] => array(remaining cols), return array[col0] => col1
+	 *
+	 * @return an associative array indexed by the first column of the array, 
+	 * 	or false if the  data has less than 2 cols.
+	 */
+	function &GetAssoc($force_array = false, $first2cols = false) 
+	{
+	global $ADODB_EXTENSION;
+	
+		$cols = $this->_numOfFields;
+		if ($cols < 2) {
+			$false = false;
+			return $false;
+		}
+		$numIndex = isset($this->fields[0]);
+		$results = array();
+		
+		if (!$first2cols && ($cols > 2 || $force_array)) {
+			if ($ADODB_EXTENSION) {
+				if ($numIndex) {
+					while (!$this->EOF) {
+						$results[trim($this->fields[0])] = array_slice($this->fields, 1);
+						adodb_movenext($this);
+					}
+				} else {
+					while (!$this->EOF) {
+					// Fix for array_slice re-numbering numeric associative keys
+						$keys = array_slice(array_keys($this->fields), 1);
+						$sliced_array = array();
+
+						foreach($keys as $key) {
+							$sliced_array[$key] = $this->fields[$key];
+						}
+						
+						$results[trim(reset($this->fields))] = $sliced_array;
+						adodb_movenext($this);
+					}
+				}
+			} else {
+				if ($numIndex) {
+					while (!$this->EOF) {
+						$results[trim($this->fields[0])] = array_slice($this->fields, 1);
+						$this->MoveNext();
+					}
+				} else {
+					while (!$this->EOF) {
+					// Fix for array_slice re-numbering numeric associative keys
+						$keys = array_slice(array_keys($this->fields), 1);
+						$sliced_array = array();
+
+						foreach($keys as $key) {
+							$sliced_array[$key] = $this->fields[$key];
+						}
+						
+						$results[trim(reset($this->fields))] = $sliced_array;
+						$this->MoveNext();
+					}
+				}
+			}
+		} else {
+			if ($ADODB_EXTENSION) {
+				// return scalar values
+				if ($numIndex) {
+					while (!$this->EOF) {
+					// some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string
+						$results[trim(($this->fields[0]))] = $this->fields[1];
+						adodb_movenext($this);
+					}
+				} else {
+					while (!$this->EOF) {
+					// some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string
+						$v1 = trim(reset($this->fields));
+						$v2 = ''.next($this->fields); 
+						$results[$v1] = $v2;
+						adodb_movenext($this);
+					}
+				}
+			} else {
+				if ($numIndex) {
+					while (!$this->EOF) {
+					// some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string
+						$results[trim(($this->fields[0]))] = $this->fields[1];
+						$this->MoveNext();
+					}
+				} else {
+					while (!$this->EOF) {
+					// some bug in mssql PHP 4.02 -- doesn't handle references properly so we FORCE creating a new string
+						$v1 = trim(reset($this->fields));
+						$v2 = ''.next($this->fields); 
+						$results[$v1] = $v2;
+						$this->MoveNext();
+					}
+				}
+			}
+		}
+		
+		$ref =& $results; # workaround accelerator incompat with PHP 4.4 :(
+		return $ref; 
+	}
+	
+	
+	/**
+	 *
+	 * @param v  	is the character timestamp in YYYY-MM-DD hh:mm:ss format
+	 * @param fmt 	is the format to apply to it, using date()
+	 *
+	 * @return a timestamp formated as user desires
+	 */
+	function UserTimeStamp($v,$fmt='Y-m-d H:i:s')
+	{
+		if (is_numeric($v) && strlen($v)<14) return adodb_date($fmt,$v);
+		$tt = $this->UnixTimeStamp($v);
+		// $tt == -1 if pre TIMESTAMP_FIRST_YEAR
+		if (($tt === false || $tt == -1) && $v != false) return $v;
+		if ($tt === 0) return $this->emptyTimeStamp;
+		return adodb_date($fmt,$tt);
+	}
+	
+	
+	/**
+	 * @param v  	is the character date in YYYY-MM-DD format, returned by database
+	 * @param fmt 	is the format to apply to it, using date()
+	 *
+	 * @return a date formated as user desires
+	 */
+	function UserDate($v,$fmt='Y-m-d')
+	{
+		$tt = $this->UnixDate($v);
+		// $tt == -1 if pre TIMESTAMP_FIRST_YEAR
+		if (($tt === false || $tt == -1) && $v != false) return $v;
+		else if ($tt == 0) return $this->emptyDate;
+		else if ($tt == -1) { // pre-TIMESTAMP_FIRST_YEAR
+		}
+		return adodb_date($fmt,$tt);
+	}
+	
+	
+	/**
+	 * @param $v is a date string in YYYY-MM-DD format
+	 *
+	 * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format
+	 */
+	function UnixDate($v)
+	{
+		return ADOConnection::UnixDate($v);
+	}
+	
+
+	/**
+	 * @param $v is a timestamp string in YYYY-MM-DD HH-NN-SS format
+	 *
+	 * @return date in unix timestamp format, or 0 if before TIMESTAMP_FIRST_YEAR, or false if invalid date format
+	 */
+	function UnixTimeStamp($v)
+	{
+		return ADOConnection::UnixTimeStamp($v);
+	}
+	
+	
+	/**
+	* PEAR DB Compat - do not use internally
+	*/
+	function Free()
+	{
+		return $this->Close();
+	}
+	
+	
+	/**
+	* PEAR DB compat, number of rows
+	*/
+	function NumRows()
+	{
+		return $this->_numOfRows;
+	}
+	
+	
+	/**
+	* PEAR DB compat, number of cols
+	*/
+	function NumCols()
+	{
+		return $this->_numOfFields;
+	}
+	
+	/**
+	* Fetch a row, returning false if no more rows. 
+	* This is PEAR DB compat mode.
+	*
+	* @return false or array containing the current record
+	*/
+	function &FetchRow()
+	{
+		if ($this->EOF) {
+			$false = false;
+			return $false;
+		}
+		$arr = $this->fields;
+		$this->_currentRow++;
+		if (!$this->_fetch()) $this->EOF = true;
+		return $arr;
+	}
+	
+	
+	/**
+	* Fetch a row, returning PEAR_Error if no more rows. 
+	* This is PEAR DB compat mode.
+	*
+	* @return DB_OK or error object
+	*/
+	function FetchInto(&$arr)
+	{
+		if ($this->EOF) return (defined('PEAR_ERROR_RETURN')) ? new PEAR_Error('EOF',-1): false;
+		$arr = $this->fields;
+		$this->MoveNext();
+		return 1; // DB_OK
+	}
+	
+	
+	/**
+	 * Move to the first row in the recordset. Many databases do NOT support this.
+	 *
+	 * @return true or false
+	 */
+	function MoveFirst() 
+	{
+		if ($this->_currentRow == 0) return true;
+		return $this->Move(0);			
+	}			
+
+	
+	/**
+	 * Move to the last row in the recordset. 
+	 *
+	 * @return true or false
+	 */
+	function MoveLast() 
+	{
+		if ($this->_numOfRows >= 0) return $this->Move($this->_numOfRows-1);
+		if ($this->EOF) return false;
+		while (!$this->EOF) {
+			$f = $this->fields;
+			$this->MoveNext();
+		}
+		$this->fields = $f;
+		$this->EOF = false;
+		return true;
+	}
+	
+	
+	/**
+	 * Move to next record in the recordset.
+	 *
+	 * @return true if there still rows available, or false if there are no more rows (EOF).
+	 */
+	function MoveNext() 
+	{
+		if (!$this->EOF) {
+			$this->_currentRow++;
+			if ($this->_fetch()) return true;
+		}
+		$this->EOF = true;
+		/* -- tested error handling when scrolling cursor -- seems useless.
+		$conn = $this->connection;
+		if ($conn && $conn->raiseErrorFn && ($errno = $conn->ErrorNo())) {
+			$fn = $conn->raiseErrorFn;
+			$fn($conn->databaseType,'MOVENEXT',$errno,$conn->ErrorMsg().' ('.$this->sql.')',$conn->host,$conn->database);
+		}
+		*/
+		return false;
+	}
+	
+	
+	/**
+	 * Random access to a specific row in the recordset. Some databases do not support
+	 * access to previous rows in the databases (no scrolling backwards).
+	 *
+	 * @param rowNumber is the row to move to (0-based)
+	 *
+	 * @return true if there still rows available, or false if there are no more rows (EOF).
+	 */
+	function Move($rowNumber = 0) 
+	{
+		$this->EOF = false;
+		if ($rowNumber == $this->_currentRow) return true;
+		if ($rowNumber >= $this->_numOfRows)
+	   		if ($this->_numOfRows != -1) $rowNumber = $this->_numOfRows-2;
+  				
+		if ($this->canSeek) { 
+	
+			if ($this->_seek($rowNumber)) {
+				$this->_currentRow = $rowNumber;
+				if ($this->_fetch()) {
+					return true;
+				}
+			} else {
+				$this->EOF = true;
+				return false;
+			}
+		} else {
+			if ($rowNumber < $this->_currentRow) return false;
+			global $ADODB_EXTENSION;
+			if ($ADODB_EXTENSION) {
+				while (!$this->EOF && $this->_currentRow < $rowNumber) {
+					adodb_movenext($this);
+				}
+			} else {
+			
+				while (! $this->EOF && $this->_currentRow < $rowNumber) {
+					$this->_currentRow++;
+					
+					if (!$this->_fetch()) $this->EOF = true;
+				}
+			}
+			return !($this->EOF);
+		}
+		
+		$this->fields = false;	
+		$this->EOF = true;
+		return false;
+	}
+	
+		
+	/**
+	 * Get the value of a field in the current row by column name.
+	 * Will not work if ADODB_FETCH_MODE is set to ADODB_FETCH_NUM.
+	 * 
+	 * @param colname  is the field to access
+	 *
+	 * @return the value of $colname column
+	 */
+	function Fields($colname)
+	{
+		return $this->fields[$colname];
+	}
+	
+	function GetAssocKeys($upper=true)
+	{
+		$this->bind = array();
+		for ($i=0; $i < $this->_numOfFields; $i++) {
+			$o = $this->FetchField($i);
+			if ($upper === 2) $this->bind[$o->name] = $i;
+			else $this->bind[($upper) ? strtoupper($o->name) : strtolower($o->name)] = $i;
+		}
+	}
+	
+  /**
+   * Use associative array to get fields array for databases that do not support
+   * associative arrays. Submitted by Paolo S. Asioli paolo.asioli#libero.it
+   *
+   * If you don't want uppercase cols, set $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC
+   * before you execute your SQL statement, and access $rs->fields['col'] directly.
+   *
+   * $upper  0 = lowercase, 1 = uppercase, 2 = whatever is returned by FetchField
+   */
+	function &GetRowAssoc($upper=1)
+	{
+		$record = array();
+	 //	if (!$this->fields) return $record;
+		
+	   	if (!$this->bind) {
+			$this->GetAssocKeys($upper);
+		}
+		
+		foreach($this->bind as $k => $v) {
+			$record[$k] = $this->fields[$v];
+		}
+
+		return $record;
+	}
+	
+	
+	/**
+	 * Clean up recordset
+	 *
+	 * @return true or false
+	 */
+	function Close() 
+	{
+		// free connection object - this seems to globally free the object
+		// and not merely the reference, so don't do this...
+		// $this->connection = false; 
+		if (!$this->_closed) {
+			$this->_closed = true;
+			return $this->_close();		
+		} else
+			return true;
+	}
+	
+	/**
+	 * synonyms RecordCount and RowCount	
+	 *
+	 * @return the number of rows or -1 if this is not supported
+	 */
+	function RecordCount() {return $this->_numOfRows;}
+	
+	
+	/*
+	* If we are using PageExecute(), this will return the maximum possible rows
+	* that can be returned when paging a recordset.
+	*/
+	function MaxRecordCount()
+	{
+		return ($this->_maxRecordCount) ? $this->_maxRecordCount : $this->RecordCount();
+	}
+	
+	/**
+	 * synonyms RecordCount and RowCount	
+	 *
+	 * @return the number of rows or -1 if this is not supported
+	 */
+	function RowCount() {return $this->_numOfRows;} 
+	
+
+	 /**
+	 * Portable RecordCount. Pablo Roca <pabloroca@mvps.org>
+	 *
+	 * @return  the number of records from a previous SELECT. All databases support this.
+	 *
+	 * But aware possible problems in multiuser environments. For better speed the table
+	 * must be indexed by the condition. Heavy test this before deploying.
+	 */ 
+	function PO_RecordCount($table="", $condition="") {
+		
+		$lnumrows = $this->_numOfRows;
+		// the database doesn't support native recordcount, so we do a workaround
+		if ($lnumrows == -1 && $this->connection) {
+			IF ($table) {
+				if ($condition) $condition = " WHERE " . $condition; 
+				$resultrows = &$this->connection->Execute("SELECT COUNT(*) FROM $table $condition");
+				if ($resultrows) $lnumrows = reset($resultrows->fields);
+			}
+		}
+		return $lnumrows;
+	}
+	
+	
+	/**
+	 * @return the current row in the recordset. If at EOF, will return the last row. 0-based.
+	 */
+	function CurrentRow() {return $this->_currentRow;}
+	
+	/**
+	 * synonym for CurrentRow -- for ADO compat
+	 *
+	 * @return the current row in the recordset. If at EOF, will return the last row. 0-based.
+	 */
+	function AbsolutePosition() {return $this->_currentRow;}
+	
+	/**
+	 * @return the number of columns in the recordset. Some databases will set this to 0
+	 * if no records are returned, others will return the number of columns in the query.
+	 */
+	function FieldCount() {return $this->_numOfFields;}   
+
+
+	/**
+	 * Get the ADOFieldObject of a specific column.
+	 *
+	 * @param fieldoffset	is the column position to access(0-based).
+	 *
+	 * @return the ADOFieldObject for that column, or false.
+	 */
+	function &FetchField($fieldoffset = -1) 
+	{
+		// must be defined by child class
+		
+		$false = false;
+		return $false;
+	}	
+	
+	/**
+	 * Get the ADOFieldObjects of all columns in an array.
+	 *
+	 */
+	function& FieldTypesArray()
+	{
+		$arr = array();
+		for ($i=0, $max=$this->_numOfFields; $i < $max; $i++) 
+			$arr[] = $this->FetchField($i);
+		return $arr;
+	}
+	
+	/**
+	* Return the fields array of the current row as an object for convenience.
+	* The default case is lowercase field names.
+	*
+	* @return the object with the properties set to the fields of the current row
+	*/
+	function &FetchObj()
+	{
+		$o =& $this->FetchObject(false);
+		return $o;
+	}
+	
+	/**
+	* Return the fields array of the current row as an object for convenience.
+	* The default case is uppercase.
+	* 
+	* @param $isupper to set the object property names to uppercase
+	*
+	* @return the object with the properties set to the fields of the current row
+	*/
+	function &FetchObject($isupper=true)
+	{
+		if (empty($this->_obj)) {
+			$this->_obj = new ADOFetchObj();
+			$this->_names = array();
+			for ($i=0; $i <$this->_numOfFields; $i++) {
+				$f = $this->FetchField($i);
+				$this->_names[] = $f->name;
+			}
+		}
+		$i = 0;
+		if (PHP_VERSION >= 5) $o = clone($this->_obj);
+		else $o = $this->_obj;
+	
+		for ($i=0; $i <$this->_numOfFields; $i++) {
+			$name = $this->_names[$i];
+			if ($isupper) $n = strtoupper($name);
+			else $n = $name;
+			
+			$o->$n = $this->Fields($name);
+		}
+		return $o;
+	}
+	
+	/**
+	* Return the fields array of the current row as an object for convenience.
+	* The default is lower-case field names.
+	* 
+	* @return the object with the properties set to the fields of the current row,
+	* 	or false if EOF
+	*
+	* Fixed bug reported by tim@orotech.net
+	*/
+	function &FetchNextObj()
+	{
+		$o =& $this->FetchNextObject(false);
+		return $o;
+	}
+	
+	
+	/**
+	* Return the fields array of the current row as an object for convenience. 
+	* The default is upper case field names.
+	* 
+	* @param $isupper to set the object property names to uppercase
+	*
+	* @return the object with the properties set to the fields of the current row,
+	* 	or false if EOF
+	*
+	* Fixed bug reported by tim@orotech.net
+	*/
+	function &FetchNextObject($isupper=true)
+	{
+		$o = false;
+		if ($this->_numOfRows != 0 && !$this->EOF) {
+			$o = $this->FetchObject($isupper);	
+			$this->_currentRow++;
+			if ($this->_fetch()) return $o;
+		}
+		$this->EOF = true;
+		return $o;
+	}
+	
+	/**
+	 * Get the metatype of the column. This is used for formatting. This is because
+	 * many databases use different names for the same type, so we transform the original
+	 * type to our standardised version which uses 1 character codes:
+	 *
+	 * @param t  is the type passed in. Normally is ADOFieldObject->type.
+	 * @param len is the maximum length of that field. This is because we treat character
+	 * 	fields bigger than a certain size as a 'B' (blob).
+	 * @param fieldobj is the field object returned by the database driver. Can hold
+	 *	additional info (eg. primary_key for mysql).
+	 * 
+	 * @return the general type of the data: 
+	 *	C for character < 250 chars
+	 *	X for teXt (>= 250 chars)
+	 *	B for Binary
+	 * 	N for numeric or floating point
+	 *	D for date
+	 *	T for timestamp
+	 * 	L for logical/Boolean
+	 *	I for integer
+	 *	R for autoincrement counter/integer
+	 * 
+	 *
+	*/
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+	// changed in 2.32 to hashing instead of switch stmt for speed...
+	static $typeMap = array(
+		'VARCHAR' => 'C',
+		'VARCHAR2' => 'C',
+		'CHAR' => 'C',
+		'C' => 'C',
+		'STRING' => 'C',
+		'NCHAR' => 'C',
+		'NVARCHAR' => 'C',
+		'VARYING' => 'C',
+		'BPCHAR' => 'C',
+		'CHARACTER' => 'C',
+		'INTERVAL' => 'C',  # Postgres
+		'MACADDR' => 'C', # postgres
+		##
+		'LONGCHAR' => 'X',
+		'TEXT' => 'X',
+		'NTEXT' => 'X',
+		'M' => 'X',
+		'X' => 'X',
+		'CLOB' => 'X',
+		'NCLOB' => 'X',
+		'LVARCHAR' => 'X',
+		##
+		'BLOB' => 'B',
+		'IMAGE' => 'B',
+		'BINARY' => 'B',
+		'VARBINARY' => 'B',
+		'LONGBINARY' => 'B',
+		'B' => 'B',
+		##
+		'YEAR' => 'D', // mysql
+		'DATE' => 'D',
+		'D' => 'D',
+		##
+		'UNIQUEIDENTIFIER' => 'C', # MS SQL Server
+		##
+		'TIME' => 'T',
+		'TIMESTAMP' => 'T',
+		'DATETIME' => 'T',
+		'TIMESTAMPTZ' => 'T',
+		'T' => 'T',
+		'TIMESTAMP WITHOUT TIME ZONE' => 'T', // postgresql
+		##
+		'BOOL' => 'L',
+		'BOOLEAN' => 'L', 
+		'BIT' => 'L',
+		'L' => 'L',
+		##
+		'COUNTER' => 'R',
+		'R' => 'R',
+		'SERIAL' => 'R', // ifx
+		'INT IDENTITY' => 'R',
+		##
+		'INT' => 'I',
+		'INT2' => 'I',
+		'INT4' => 'I',
+		'INT8' => 'I',
+		'INTEGER' => 'I',
+		'INTEGER UNSIGNED' => 'I',
+		'SHORT' => 'I',
+		'TINYINT' => 'I',
+		'SMALLINT' => 'I',
+		'I' => 'I',
+		##
+		'LONG' => 'N', // interbase is numeric, oci8 is blob
+		'BIGINT' => 'N', // this is bigger than PHP 32-bit integers
+		'DECIMAL' => 'N',
+		'DEC' => 'N',
+		'REAL' => 'N',
+		'DOUBLE' => 'N',
+		'DOUBLE PRECISION' => 'N',
+		'SMALLFLOAT' => 'N',
+		'FLOAT' => 'N',
+		'NUMBER' => 'N',
+		'NUM' => 'N',
+		'NUMERIC' => 'N',
+		'MONEY' => 'N',
+		
+		## informix 9.2
+		'SQLINT' => 'I', 
+		'SQLSERIAL' => 'I', 
+		'SQLSMINT' => 'I', 
+		'SQLSMFLOAT' => 'N', 
+		'SQLFLOAT' => 'N', 
+		'SQLMONEY' => 'N', 
+		'SQLDECIMAL' => 'N', 
+		'SQLDATE' => 'D', 
+		'SQLVCHAR' => 'C', 
+		'SQLCHAR' => 'C', 
+		'SQLDTIME' => 'T', 
+		'SQLINTERVAL' => 'N', 
+		'SQLBYTES' => 'B', 
+		'SQLTEXT' => 'X',
+		 ## informix 10
+		"SQLINT8" => 'I8',
+		"SQLSERIAL8" => 'I8',
+		"SQLNCHAR" => 'C',
+		"SQLNVCHAR" => 'C',
+		"SQLLVARCHAR" => 'X',
+		"SQLBOOL" => 'L'
+		);
+		
+		$tmap = false;
+		$t = strtoupper($t);
+		$tmap = (isset($typeMap[$t])) ? $typeMap[$t] : 'N';
+		switch ($tmap) {
+		case 'C':
+		
+			// is the char field is too long, return as text field... 
+			if ($this->blobSize >= 0) {
+				if ($len > $this->blobSize) return 'X';
+			} else if ($len > 250) {
+				return 'X';
+			}
+			return 'C';
+			
+		case 'I':
+			if (!empty($fieldobj->primary_key)) return 'R';
+			return 'I';
+		
+		case false:
+			return 'N';
+			
+		case 'B':
+			 if (isset($fieldobj->binary)) 
+				 return ($fieldobj->binary) ? 'B' : 'X';
+			return 'B';
+		
+		case 'D':
+			if (!empty($this->connection) && !empty($this->connection->datetime)) return 'T';
+			return 'D';
+			
+		default: 
+			if ($t == 'LONG' && $this->dataProvider == 'oci8') return 'B';
+			return $tmap;
+		}
+	}
+	
+	
+	function _close() {}
+	
+	/**
+	 * set/returns the current recordset page when paginating
+	 */
+	function AbsolutePage($page=-1)
+	{
+		if ($page != -1) $this->_currentPage = $page;
+		return $this->_currentPage;
+	}
+	
+	/**
+	 * set/returns the status of the atFirstPage flag when paginating
+	 */
+	function AtFirstPage($status=false)
+	{
+		if ($status != false) $this->_atFirstPage = $status;
+		return $this->_atFirstPage;
+	}
+	
+	function LastPageNo($page = false)
+	{
+		if ($page != false) $this->_lastPageNo = $page;
+		return $this->_lastPageNo;
+	}
+	
+	/**
+	 * set/returns the status of the atLastPage flag when paginating
+	 */
+	function AtLastPage($status=false)
+	{
+		if ($status != false) $this->_atLastPage = $status;
+		return $this->_atLastPage;
+	}
+	
+} // end class ADORecordSet
+	
+	//==============================================================================================	
+	// CLASS ADORecordSet_array
+	//==============================================================================================	
+	
+	/**
+	 * This class encapsulates the concept of a recordset created in memory
+	 * as an array. This is useful for the creation of cached recordsets.
+	 * 
+	 * Note that the constructor is different from the standard ADORecordSet
+	 */
+	
+	class ADORecordSet_array extends ADORecordSet
+	{
+		var $databaseType = 'array';
+
+		var $_array; 	// holds the 2-dimensional data array
+		var $_types;	// the array of types of each column (C B I L M)
+		var $_colnames;	// names of each column in array
+		var $_skiprow1;	// skip 1st row because it holds column names
+		var $_fieldobjects; // holds array of field objects
+		var $canSeek = true;
+		var $affectedrows = false;
+		var $insertid = false;
+		var $sql = '';
+		var $compat = false;
+		/**
+		 * Constructor
+		 *
+		 */
+		function ADORecordSet_array($fakeid=1)
+		{
+		global $ADODB_FETCH_MODE,$ADODB_COMPAT_FETCH;
+		
+			// fetch() on EOF does not delete $this->fields
+			$this->compat = !empty($ADODB_COMPAT_FETCH);
+			$this->ADORecordSet($fakeid); // fake queryID		
+			$this->fetchMode = $ADODB_FETCH_MODE;
+		}
+		
+		function _transpose($addfieldnames=true)
+		{
+		global $ADODB_INCLUDED_LIB;
+			
+			if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+			$hdr = true;
+			
+			$fobjs = $addfieldnames ? $this->_fieldobjects : false;
+			adodb_transpose($this->_array, $newarr, $hdr, $fobjs);
+			//adodb_pr($newarr);
+			
+			$this->_skiprow1 = false;
+			$this->_array =& $newarr;
+			$this->_colnames = $hdr;
+			
+			adodb_probetypes($newarr,$this->_types);
+		
+			$this->_fieldobjects = array();
+			
+			foreach($hdr as $k => $name) {
+				$f = new ADOFieldObject();
+				$f->name = $name;
+				$f->type = $this->_types[$k];
+				$f->max_length = -1;
+				$this->_fieldobjects[] = $f;
+			}
+			$this->fields = reset($this->_array);
+			
+			$this->_initrs();
+			
+		}
+		
+		/**
+		 * Setup the array.
+		 *
+		 * @param array		is a 2-dimensional array holding the data.
+		 *			The first row should hold the column names 
+		 *			unless paramter $colnames is used.
+		 * @param typearr	holds an array of types. These are the same types 
+		 *			used in MetaTypes (C,B,L,I,N).
+		 * @param [colnames]	array of column names. If set, then the first row of
+		 *			$array should not hold the column names.
+		 */
+		function InitArray($array,$typearr,$colnames=false)
+		{
+			$this->_array = $array;
+			$this->_types = $typearr;	
+			if ($colnames) {
+				$this->_skiprow1 = false;
+				$this->_colnames = $colnames;
+			} else  {
+				$this->_skiprow1 = true;
+				$this->_colnames = $array[0];
+			}
+			$this->Init();
+		}
+		/**
+		 * Setup the Array and datatype file objects
+		 *
+		 * @param array		is a 2-dimensional array holding the data.
+		 *			The first row should hold the column names 
+		 *			unless paramter $colnames is used.
+		 * @param fieldarr	holds an array of ADOFieldObject's.
+		 */
+		function InitArrayFields(&$array,&$fieldarr)
+		{
+			$this->_array =& $array;
+			$this->_skiprow1= false;
+			if ($fieldarr) {
+				$this->_fieldobjects =& $fieldarr;
+			} 
+			$this->Init();
+		}
+		
+		function &GetArray($nRows=-1)
+		{
+			if ($nRows == -1 && $this->_currentRow <= 0 && !$this->_skiprow1) {
+				return $this->_array;
+			} else {
+				$arr =& ADORecordSet::GetArray($nRows);
+				return $arr;
+			}
+		}
+		
+		function _initrs()
+		{
+			$this->_numOfRows =  sizeof($this->_array);
+			if ($this->_skiprow1) $this->_numOfRows -= 1;
+		
+			$this->_numOfFields =(isset($this->_fieldobjects)) ?
+				 sizeof($this->_fieldobjects):sizeof($this->_types);
+		}
+		
+		/* Use associative array to get fields array */
+		function Fields($colname)
+		{
+			$mode = isset($this->adodbFetchMode) ? $this->adodbFetchMode : $this->fetchMode;
+			
+			if ($mode & ADODB_FETCH_ASSOC) {
+				if (!isset($this->fields[$colname])) $colname = strtolower($colname);
+				return $this->fields[$colname];
+			}
+			if (!$this->bind) {
+				$this->bind = array();
+				for ($i=0; $i < $this->_numOfFields; $i++) {
+					$o = $this->FetchField($i);
+					$this->bind[strtoupper($o->name)] = $i;
+				}
+			}
+			return $this->fields[$this->bind[strtoupper($colname)]];
+		}
+		
+		function &FetchField($fieldOffset = -1) 
+		{
+			if (isset($this->_fieldobjects)) {
+				return $this->_fieldobjects[$fieldOffset];
+			}
+			$o =  new ADOFieldObject();
+			$o->name = $this->_colnames[$fieldOffset];
+			$o->type =  $this->_types[$fieldOffset];
+			$o->max_length = -1; // length not known
+			
+			return $o;
+		}
+			
+		function _seek($row)
+		{
+			if (sizeof($this->_array) && 0 <= $row && $row < $this->_numOfRows) {
+				$this->_currentRow = $row;
+				if ($this->_skiprow1) $row += 1;
+				$this->fields = $this->_array[$row];
+				return true;
+			}
+			return false;
+		}
+		
+		function MoveNext() 
+		{
+			if (!$this->EOF) {		
+				$this->_currentRow++;
+				
+				$pos = $this->_currentRow;
+				
+				if ($this->_numOfRows <= $pos) {
+					if (!$this->compat) $this->fields = false;
+				} else {
+					if ($this->_skiprow1) $pos += 1;
+					$this->fields = $this->_array[$pos];
+					return true;
+				}		
+				$this->EOF = true;
+			}
+			
+			return false;
+		}	
+	
+		function _fetch()
+		{
+			$pos = $this->_currentRow;
+			
+			if ($this->_numOfRows <= $pos) {
+				if (!$this->compat) $this->fields = false;
+				return false;
+			}
+			if ($this->_skiprow1) $pos += 1;
+			$this->fields = $this->_array[$pos];
+			return true;
+		}
+		
+		function _close() 
+		{
+			return true;	
+		}
+	
+	} // ADORecordSet_array
+
+	//==============================================================================================	
+	// HELPER FUNCTIONS
+	//==============================================================================================			
+	
+	/**
+	 * Synonym for ADOLoadCode. Private function. Do not use.
+	 *
+	 * @deprecated
+	 */
+	function ADOLoadDB($dbType) 
+	{ 
+		return ADOLoadCode($dbType);
+	}
+		
+	/**
+	 * Load the code for a specific database driver. Private function. Do not use.
+	 */
+	function ADOLoadCode($dbType) 
+	{
+	global $ADODB_LASTDB;
+	
+		if (!$dbType) return false;
+		$db = strtolower($dbType);
+		switch ($db) {
+			case 'ado': 
+				if (PHP_VERSION >= 5) $db = 'ado5';
+				$class = 'ado'; 
+				break;
+			case 'ifx':
+			case 'maxsql': $class = $db = 'mysqlt'; break;
+			case 'postgres':
+			case 'postgres8':
+			case 'pgsql': $class = $db = 'postgres7'; break;
+			default:
+				$class = $db; break;
+		}
+		
+		$file = ADODB_DIR."/drivers/adodb-".$db.".inc.php";
+		@include_once($file);
+		$ADODB_LASTDB = $class;
+		if (class_exists("ADODB_" . $class)) return $class;
+		
+		//ADOConnection::outp(adodb_pr(get_declared_classes(),true));
+		if (!file_exists($file)) ADOConnection::outp("Missing file: $file");
+		else ADOConnection::outp("Syntax error in file: $file");
+		return false;
+	}
+
+	/**
+	 * synonym for ADONewConnection for people like me who cannot remember the correct name
+	 */
+	function &NewADOConnection($db='')
+	{
+		$tmp =& ADONewConnection($db);
+		return $tmp;
+	}
+	
+	/**
+	 * Instantiate a new Connection class for a specific database driver.
+	 *
+	 * @param [db]  is the database Connection object to create. If undefined,
+	 * 	use the last database driver that was loaded by ADOLoadCode().
+	 *
+	 * @return the freshly created instance of the Connection class.
+	 */
+	function &ADONewConnection($db='')
+	{
+	GLOBAL $ADODB_NEWCONNECTION, $ADODB_LASTDB;
+		
+		if (!defined('ADODB_ASSOC_CASE')) define('ADODB_ASSOC_CASE',2);
+		$errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false;
+		$false = false;
+		if ($at = strpos($db,'://')) {
+			$origdsn = $db;
+			if (PHP_VERSION < 5) $dsna = @parse_url($db);
+			else {
+				$fakedsn = 'fake'.substr($db,$at);
+				$dsna = @parse_url($fakedsn);
+				$dsna['scheme'] = substr($db,0,$at);
+			
+				if (strncmp($db,'pdo',3) == 0) {
+					$sch = explode('_',$dsna['scheme']);
+					if (sizeof($sch)>1) {
+						$dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : '';
+						$dsna['host'] = rawurlencode($sch[1].':host='.rawurldecode($dsna['host']));
+						$dsna['scheme'] = 'pdo';
+					}
+				}
+			}
+			
+			if (!$dsna) {
+				// special handling of oracle, which might not have host
+				$db = str_replace('@/','@adodb-fakehost/',$db);
+				$dsna = parse_url($db);
+				if (!$dsna) return $false;
+				$dsna['host'] = '';
+			}
+			$db = @$dsna['scheme'];
+			if (!$db) return $false;
+			$dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : '';
+			$dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : '';
+			$dsna['pass'] = isset($dsna['pass']) ? rawurldecode($dsna['pass']) : '';
+			$dsna['path'] = isset($dsna['path']) ? rawurldecode(substr($dsna['path'],1)) : ''; # strip off initial /
+			
+			if (isset($dsna['query'])) {
+				$opt1 = explode('&',$dsna['query']);
+				foreach($opt1 as $k => $v) {
+					$arr = explode('=',$v);
+					$opt[$arr[0]] = isset($arr[1]) ? rawurldecode($arr[1]) : 1;
+				}
+			} else $opt = array();
+		}
+	/*
+	 *  phptype: Database backend used in PHP (mysql, odbc etc.)
+	 *  dbsyntax: Database used with regards to SQL syntax etc.
+	 *  protocol: Communication protocol to use (tcp, unix etc.)
+	 *  hostspec: Host specification (hostname[:port])
+	 *  database: Database to use on the DBMS server
+	 *  username: User name for login
+	 *  password: Password for login
+	 */
+		if (!empty($ADODB_NEWCONNECTION)) {
+			$obj = $ADODB_NEWCONNECTION($db);
+
+		} else {
+		
+			if (!isset($ADODB_LASTDB)) $ADODB_LASTDB = '';
+			if (empty($db)) $db = $ADODB_LASTDB;
+			
+			if ($db != $ADODB_LASTDB) $db = ADOLoadCode($db);
+			
+			if (!$db) {
+				if (isset($origdsn)) $db = $origdsn;
+				if ($errorfn) {
+					// raise an error
+					$ignore = false;
+					$errorfn('ADONewConnection', 'ADONewConnection', -998,
+							 "could not load the database driver for '$db'",
+							 $db,false,$ignore);
+				} else
+					 ADOConnection::outp( "<p>ADONewConnection: Unable to load database driver '$db'</p>",false);
+					
+				return $false;
+			}
+			
+			$cls = 'ADODB_'.$db;
+			if (!class_exists($cls)) {
+				adodb_backtrace();
+				return $false;
+			}
+			
+			$obj = new $cls();
+		}
+		
+		# constructor should not fail
+		if ($obj) {
+			if ($errorfn)  $obj->raiseErrorFn = $errorfn;
+			if (isset($dsna)) {
+				if (isset($dsna['port'])) $obj->port = $dsna['port'];
+				foreach($opt as $k => $v) {
+					switch(strtolower($k)) {
+					case 'new':
+										$nconnect = true; $persist = true; break;
+					case 'persist':
+					case 'persistent': 	$persist = $v; break;
+					case 'debug':		$obj->debug = (integer) $v; break;
+					#ibase
+					case 'role':		$obj->role = $v; break;
+					case 'dialect': 	$obj->dialect = (integer) $v; break;
+					case 'charset':		$obj->charset = $v; $obj->charSet=$v; break;
+					case 'buffers':		$obj->buffers = $v; break;
+					case 'fetchmode':   $obj->SetFetchMode($v); break;
+					#ado
+					case 'charpage':	$obj->charPage = $v; break;
+					#mysql, mysqli
+					case 'clientflags': $obj->clientFlags = $v; break;
+					#mysql, mysqli, postgres
+					case 'port': $obj->port = $v; break;
+					#mysqli
+					case 'socket': $obj->socket = $v; break;
+					#oci8
+					case 'nls_date_format': $obj->NLS_DATE_FORMAT = $v; break;
+					}
+				}
+				if (empty($persist))
+					$ok = $obj->Connect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']);
+				else if (empty($nconnect))
+					$ok = $obj->PConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']);
+				else
+					$ok = $obj->NConnect($dsna['host'], $dsna['user'], $dsna['pass'], $dsna['path']);
+					
+				if (!$ok) return $false;
+			}
+		}
+		return $obj;
+	}
+	
+	
+	
+	// $perf == true means called by NewPerfMonitor(), otherwise for data dictionary
+	function _adodb_getdriver($provider,$drivername,$perf=false)
+	{
+		switch ($provider) {
+		case 'odbtp':   if (strncmp('odbtp_',$drivername,6)==0) return substr($drivername,6); 
+		case 'odbc' :   if (strncmp('odbc_',$drivername,5)==0) return substr($drivername,5); 
+		case 'ado'  :   if (strncmp('ado_',$drivername,4)==0) return substr($drivername,4);
+		case 'native':  break;
+		default:
+			return $provider;
+		}
+		
+		switch($drivername) {
+		case 'mysqlt':
+		case 'mysqli': 
+				$drivername='mysql'; 
+				break;
+		case 'postgres7':
+		case 'postgres8':
+				$drivername = 'postgres'; 
+				break;	
+		case 'firebird15': $drivername = 'firebird'; break;
+		case 'oracle': $drivername = 'oci8'; break;
+		case 'access': if ($perf) $drivername = ''; break;
+		case 'db2'   : break;
+		case 'sapdb' : break;
+		default:
+			$drivername = 'generic';
+			break;
+		}
+		return $drivername;
+	}
+	
+	function &NewPerfMonitor(&$conn)
+	{
+		$false = false;
+		$drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType,true);
+		if (!$drivername || $drivername == 'generic') return $false;
+		include_once(ADODB_DIR.'/adodb-perf.inc.php');
+		@include_once(ADODB_DIR."/perf/perf-$drivername.inc.php");
+		$class = "Perf_$drivername";
+		if (!class_exists($class)) return $false;
+		$perf = new $class($conn);
+		
+		return $perf;
+	}
+	
+	function &NewDataDictionary(&$conn,$drivername=false)
+	{
+		$false = false;
+		if (!$drivername) $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType);
+
+		include_once(ADODB_DIR.'/adodb-lib.inc.php');
+		include_once(ADODB_DIR.'/adodb-datadict.inc.php');
+		$path = ADODB_DIR."/datadict/datadict-$drivername.inc.php";
+
+		if (!file_exists($path)) {
+			ADOConnection::outp("Dictionary driver '$path' not available");
+			return $false;
+		}
+		include_once($path);
+		$class = "ADODB2_$drivername";
+		$dict = new $class();
+		$dict->dataProvider = $conn->dataProvider;
+		$dict->connection = &$conn;
+		$dict->upperName = strtoupper($drivername);
+		$dict->quote = $conn->nameQuote;
+		if (!empty($conn->_connectionID))
+			$dict->serverInfo = $conn->ServerInfo();
+		
+		return $dict;
+	}
+
+
+	
+	/*
+		Perform a print_r, with pre tags for better formatting.
+	*/
+	function adodb_pr($var,$as_string=false)
+	{
+		if ($as_string) ob_start();
+		
+		if (isset($_SERVER['HTTP_USER_AGENT'])) { 
+			echo " <pre>\n";print_r($var);echo "</pre>\n";
+		} else
+			print_r($var);
+			
+		if ($as_string) {
+			$s = ob_get_contents();
+			ob_end_clean();
+			return $s;
+		}
+	}
+	
+	/*
+		Perform a stack-crawl and pretty print it.
+		
+		@param printOrArr  Pass in a boolean to indicate print, or an $exception->trace array (assumes that print is true then).
+		@param levels Number of levels to display
+	*/
+	function adodb_backtrace($printOrArr=true,$levels=9999)
+	{
+		global $ADODB_INCLUDED_LIB;
+		if (empty($ADODB_INCLUDED_LIB)) include(ADODB_DIR.'/adodb-lib.inc.php');
+		return _adodb_backtrace($printOrArr,$levels);
+	}
+
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/contrib/toxmlrpc.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/contrib/toxmlrpc.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/contrib/toxmlrpc.inc.php	(revision 225)
@@ -0,0 +1,183 @@
+<?php
+    /**
+    * Helper functions to convert between ADODB recordset objects and XMLRPC values.
+    * Uses John Lim's AdoDB and Edd Dumbill's phpxmlrpc libs
+    * 
+    * @author Daniele Baroncelli
+    * @author Gaetano Giunta
+    * @copyright (c) 2003-2004 Giunta/Baroncelli. All rights reserved.
+    * 
+    * @todo some more error checking here and there
+    * @todo document the xmlrpc-struct used to encode recordset info
+    * @todo verify if using xmlrpc_encode($rs->GetArray()) would work with:
+    *       - ADODB_FETCH_BOTH
+    *       - null values
+    */
+
+    /**
+    * Include the main libraries
+    */    
+    require_once('xmlrpc.inc');
+    if (!defined('ADODB_DIR')) require_once('adodb.inc.php');
+            
+    /**
+    * Builds an xmlrpc struct value out of an AdoDB recordset
+    */
+    function rs2xmlrpcval(&$adodbrs) {
+
+        $header =& rs2xmlrpcval_header($adodbrs);
+        $body =& rs2xmlrpcval_body($adodbrs);
+
+        // put it all together and build final xmlrpc struct
+        $xmlrpcrs =& new xmlrpcval ( array(
+                "header" => $header,
+                "body" => $body,
+                ), "struct");
+
+        return $xmlrpcrs;
+
+    }
+
+    /**
+    * Builds an xmlrpc struct value describing an AdoDB recordset
+    */
+    function rs2xmlrpcval_header($adodbrs)
+    {
+        $numfields = $adodbrs->FieldCount();
+        $numrecords = $adodbrs->RecordCount();
+
+        // build structure holding recordset information
+        $fieldstruct = array();
+        for ($i = 0; $i < $numfields; $i++) {
+            $fld = $adodbrs->FetchField($i);
+            $fieldarray = array();
+            if (isset($fld->name))
+                $fieldarray["name"] =& new xmlrpcval ($fld->name);
+            if (isset($fld->type))
+                $fieldarray["type"] =& new xmlrpcval ($fld->type);
+            if (isset($fld->max_length))
+                $fieldarray["max_length"] =& new xmlrpcval ($fld->max_length, "int");
+            if (isset($fld->not_null))
+                $fieldarray["not_null"] =& new xmlrpcval ($fld->not_null, "boolean");
+            if (isset($fld->has_default))
+                $fieldarray["has_default"] =& new xmlrpcval ($fld->has_default, "boolean");
+            if (isset($fld->default_value))
+                $fieldarray["default_value"] =& new xmlrpcval ($fld->default_value);
+            $fieldstruct[$i] =& new xmlrpcval ($fieldarray, "struct");
+        }
+        $fieldcount =& new xmlrpcval ($numfields, "int");
+        $recordcount =& new xmlrpcval ($numrecords, "int");
+        $sql =& new xmlrpcval ($adodbrs->sql);
+        $fieldinfo =& new xmlrpcval ($fieldstruct, "array");
+
+        $header =& new xmlrpcval ( array(
+                "fieldcount" => $fieldcount,
+                "recordcount" => $recordcount,
+                "sql" => $sql,
+                "fieldinfo" => $fieldinfo
+                ), "struct");
+
+        return $header;
+    }
+
+    /**
+    * Builds an xmlrpc struct value out of an AdoDB recordset
+    * (data values only, no data definition)
+    */
+    function rs2xmlrpcval_body($adodbrs)
+    {
+        $numfields = $adodbrs->FieldCount();
+
+        // build structure containing recordset data
+        $adodbrs->MoveFirst();
+        $rows = array();
+        while (!$adodbrs->EOF) {
+            $columns = array();
+            // This should work on all cases of fetch mode: assoc, num, both or default
+            if ($adodbrs->fetchMode == 'ADODB_FETCH_BOTH' || count($adodbrs->fields) == 2 * $adodbrs->FieldCount())
+                for ($i = 0; $i < $numfields; $i++)
+                    if ($adodbrs->fields[$i] === null)
+                        $columns[$i] =& new xmlrpcval ('');
+                    else
+                        $columns[$i] =& xmlrpc_encode ($adodbrs->fields[$i]);
+            else
+                foreach ($adodbrs->fields as $val)
+                    if ($val === null)
+                        $columns[] =& new xmlrpcval ('');
+                    else
+                        $columns[] =& xmlrpc_encode ($val);
+
+            $rows[] =& new xmlrpcval ($columns, "array");
+
+            $adodbrs->MoveNext();
+        }
+        $body =& new xmlrpcval ($rows, "array");
+
+        return $body;    
+    }
+    
+    /**
+    * Returns an xmlrpc struct value as string out of an AdoDB recordset
+    */    
+    function rs2xmlrpcstring (&$adodbrs) {
+        $xmlrpc = rs2xmlrpcval ($adodbrs);
+        if ($xmlrpc)
+          return $xmlrpc->serialize();
+        else
+          return null;
+    }
+
+    /**
+    * Given a well-formed xmlrpc struct object returns an AdoDB object
+    * 
+    * @todo add some error checking on the input value
+    */
+    function xmlrpcval2rs (&$xmlrpcval) {
+
+        $fields_array = array();
+        $data_array = array();
+ 
+        // rebuild column information  
+        $header =& $xmlrpcval->structmem('header');
+        
+        $numfields = $header->structmem('fieldcount');
+        $numfields = $numfields->scalarval();
+        $numrecords = $header->structmem('recordcount');
+        $numrecords = $numrecords->scalarval();
+        $sqlstring = $header->structmem('sql');
+        $sqlstring = $sqlstring->scalarval();
+        
+        $fieldinfo =& $header->structmem('fieldinfo');
+        for ($i = 0; $i < $numfields; $i++) {
+            $temp =& $fieldinfo->arraymem($i);
+            $fld =& new ADOFieldObject();
+            while (list($key,$value) = $temp->structeach()) {
+                if ($key == "name") $fld->name = $value->scalarval();
+                if ($key == "type") $fld->type = $value->scalarval();
+                if ($key == "max_length") $fld->max_length = $value->scalarval();
+                if ($key == "not_null") $fld->not_null = $value->scalarval();
+                if ($key == "has_default") $fld->has_default = $value->scalarval();
+                if ($key == "default_value") $fld->default_value = $value->scalarval();
+            } // while
+            $fields_array[] = $fld;
+        } // for
+
+        // fetch recordset information into php array
+        $body =& $xmlrpcval->structmem('body');
+        for ($i = 0; $i < $numrecords; $i++) {
+            $data_array[$i]= array();
+            $xmlrpcrs_row =& $body->arraymem($i);
+            for ($j = 0; $j < $numfields; $j++) {
+                $temp =& $xmlrpcrs_row->arraymem($j);
+                $data_array[$i][$j] = $temp->scalarval();
+            } // for j
+        } // for i
+
+        // finally build in-memory recordset object and return it
+        $rs =& new ADORecordSet_array();
+        $rs->InitArrayFields($data_array,$fields_array);
+        return $rs;
+
+    }
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-access.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-access.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-access.inc.php	(revision 225)
@@ -0,0 +1,95 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_access extends ADODB_DataDict {
+	
+	var $databaseType = 'access';
+	var $seqField = false;
+	
+ 	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'TEXT';
+		case 'XL':
+		case 'X': return 'MEMO'; 
+		
+		case 'C2': return 'TEXT'; // up to 32K
+		case 'X2': return 'MEMO';
+		
+		case 'B': return 'BINARY';
+			
+		case 'D': return 'DATETIME';
+		case 'T': return 'DATETIME';
+		
+		case 'L': return 'BYTE';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'BYTE';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'INTEGER';
+		
+		case 'F': return 'DOUBLE';
+		case 'N': return 'NUMERIC';
+		default:
+			return $meta;
+		}
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{
+		if ($fautoinc) {
+			$ftype = 'COUNTER';
+			return '';
+		}
+		if (substr($ftype,0,7) == 'DECIMAL') $ftype = 'DECIMAL';
+		$suffix = '';
+		if (strlen($fdefault)) {
+			//$suffix .= " DEFAULT $fdefault";
+			if ($this->debug) ADOConnection::outp("Warning: Access does not supported DEFAULT values (field $fname)");
+		}
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+	function CreateDatabase($dbname,$options=false)
+	{
+		return array();
+	}
+	
+	
+	function SetSchema($schema)
+	{
+	}
+
+	function AlterColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
+		return array();
+	}
+	
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
+		return array();
+	}
+	
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-db2.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-db2.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-db2.inc.php	(revision 225)
@@ -0,0 +1,143 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_db2 extends ADODB_DataDict {
+	
+	var $databaseType = 'db2';
+	var $seqField = false;
+	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'XL': return 'CLOB';
+		case 'X': return 'VARCHAR(3600)'; 
+
+		case 'C2': return 'VARCHAR'; // up to 32K
+		case 'X2': return 'VARCHAR(3600)'; // up to 32000, but default page size too small
+
+		case 'B': return 'BLOB';
+
+		case 'D': return 'DATE';
+		case 'T': return 'TIMESTAMP';
+
+		case 'L': return 'SMALLINT';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'BIGINT';
+
+		case 'F': return 'DOUBLE';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{	
+		$suffix = '';
+		if ($fautoinc) return ' GENERATED ALWAYS AS IDENTITY'; # as identity start with 
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+
+	function AlterColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
+		return array();
+	}
+	
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
+		return array();
+	}
+	
+	
+	function ChangeTableSQL($tablename, $flds, $tableoptions = false)
+	{
+		
+		/**
+		  Allow basic table changes to DB2 databases
+		  DB2 will fatally reject changes to non character columns 
+
+		*/
+		
+		$validTypes = array("CHAR","VARC");
+		$invalidTypes = array("BIGI","BLOB","CLOB","DATE", "DECI","DOUB", "INTE", "REAL","SMAL", "TIME");
+		// check table exists
+		$cols = &$this->MetaColumns($tablename);
+		if ( empty($cols)) { 
+			return $this->CreateTableSQL($tablename, $flds, $tableoptions);
+		}
+		
+		// already exists, alter table instead
+		list($lines,$pkey) = $this->_GenFields($flds);
+		$alter = 'ALTER TABLE ' . $this->TableName($tablename);
+		$sql = array();
+		
+		foreach ( $lines as $id => $v ) {
+			if ( isset($cols[$id]) && is_object($cols[$id]) ) {
+				/**
+				  If the first field of $v is the fieldname, and
+				  the second is the field type/size, we assume its an
+				  attempt to modify the column size, so check that it is allowed
+				  $v can have an indeterminate number of blanks between the
+				  fields, so account for that too
+				 */
+				$vargs = explode(' ' , $v);
+				// assume that $vargs[0] is the field name.
+				$i=0;
+				// Find the next non-blank value;
+				for ($i=1;$i<sizeof($vargs);$i++)
+					if ($vargs[$i] != '')
+						break;
+				
+				// if $vargs[$i] is one of the following, we are trying to change the
+				// size of the field, if not allowed, simply ignore the request.
+				if (in_array(substr($vargs[$i],0,4),$invalidTypes)) 
+					continue;
+				// insert the appropriate DB2 syntax
+				if (in_array(substr($vargs[$i],0,4),$validTypes)) {
+					array_splice($vargs,$i,0,array('SET','DATA','TYPE'));
+				}
+
+				// Now Look for the NOT NULL statement as this is not allowed in
+				// the ALTER table statement. If it is in there, remove it
+				if (in_array('NOT',$vargs) && in_array('NULL',$vargs)) {
+					for ($i=1;$i<sizeof($vargs);$i++)
+					if ($vargs[$i] == 'NOT')
+						break;
+					array_splice($vargs,$i,2,'');
+				}
+				$v = implode(' ',$vargs);	
+				$sql[] = $alter . $this->alterCol . ' ' . $v;
+			} else {
+				$sql[] = $alter . $this->addCol . ' ' . $v;
+			}
+		}
+		
+		return $sql;
+	}
+	
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-firebird.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-firebird.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-firebird.inc.php	(revision 225)
@@ -0,0 +1,151 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+class ADODB2_firebird extends ADODB_DataDict {
+	
+	var $databaseType = 'firebird';
+	var $seqField = false;
+	var $seqPrefix = 'gen_';
+	var $blobSize = 40000;	
+ 	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'XL': return 'VARCHAR(32000)'; 
+		case 'X': return 'VARCHAR(4000)'; 
+		
+		case 'C2': return 'VARCHAR'; // up to 32K
+		case 'X2': return 'VARCHAR(4000)';
+		
+		case 'B': return 'BLOB';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'TIMESTAMP';
+		
+		case 'L': return 'SMALLINT';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'INTEGER';
+		
+		case 'F': return 'DOUBLE PRECISION';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+	
+	function NameQuote($name = NULL)
+	{
+		if (!is_string($name)) {
+			return FALSE;
+		}
+		
+		$name = trim($name);
+		
+		if ( !is_object($this->connection) ) {
+			return $name;
+		}
+		
+		$quote = $this->connection->nameQuote;
+		
+		// if name is of the form `name`, quote it
+		if ( preg_match('/^`(.+)`$/', $name, $matches) ) {
+			return $quote . $matches[1] . $quote;
+		}
+		
+		// if name contains special characters, quote it
+		if ( !preg_match('/^[' . $this->nameRegex . ']+$/', $name) ) {
+			return $quote . $name . $quote;
+		}
+		
+		return $quote . $name . $quote;
+	}
+
+	function CreateDatabase($dbname, $options=false)
+	{
+		$options = $this->_Options($options);
+		$sql = array();
+		
+		$sql[] = "DECLARE EXTERNAL FUNCTION LOWER CSTRING(80) RETURNS CSTRING(80) FREE_IT ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf'";
+		
+		return $sql;
+	}
+	
+	function _DropAutoIncrement($t)
+	{
+		if (strpos($t,'.') !== false) {
+			$tarr = explode('.',$t);
+			return 'DROP GENERATOR '.$tarr[0].'."gen_'.$tarr[1].'"';
+		}
+		return 'DROP GENERATOR "GEN_'.$t;
+	}
+	
+
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
+	{
+		$suffix = '';
+		
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fautoinc) $this->seqField = $fname;
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		
+		return $suffix;
+	}
+	
+/*
+CREATE or replace TRIGGER jaddress_insert
+before insert on jaddress
+for each row
+begin
+IF ( NEW."seqField" IS NULL OR NEW."seqField" = 0 ) THEN
+  NEW."seqField" = GEN_ID("GEN_tabname", 1);
+end;
+*/
+	function _Triggers($tabname,$tableoptions)
+	{	
+		if (!$this->seqField) return array();
+		
+		$tab1 = preg_replace( '/"/', '', $tabname );
+		if ($this->schema) {
+			$t = strpos($tab1,'.');
+			if ($t !== false) $tab = substr($tab1,$t+1);
+			else $tab = $tab1;
+			$seqField = $this->seqField;
+			$seqname = $this->schema.'.'.$this->seqPrefix.$tab;
+			$trigname = $this->schema.'.trig_'.$this->seqPrefix.$tab;
+		} else {
+			$seqField = $this->seqField;
+			$seqname = $this->seqPrefix.$tab1;
+			$trigname = 'trig_'.$seqname;
+		}
+		if (isset($tableoptions['REPLACE']))
+		{ $sql[] = "DROP GENERATOR \"$seqname\"";
+		  $sql[] = "CREATE GENERATOR \"$seqname\"";
+		  $sql[] = "ALTER TRIGGER \"$trigname\" BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END";
+		}
+		else
+		{ $sql[] = "CREATE GENERATOR \"$seqname\"";
+		  $sql[] = "CREATE TRIGGER \"$trigname\" FOR $tabname BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END";
+		}
+		
+		$this->seqField = false;
+		return $sql;
+	}
+
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-generic.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-generic.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-generic.inc.php	(revision 225)
@@ -0,0 +1,125 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_generic extends ADODB_DataDict {
+	
+	var $databaseType = 'generic';
+	var $seqField = false;
+	
+ 	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'XL':
+		case 'X': return 'VARCHAR(250)';
+		
+		case 'C2': return 'VARCHAR';
+		case 'X2': return 'VARCHAR(250)';
+		
+		case 'B': return 'VARCHAR';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'DATE';
+		
+		case 'L': return 'DECIMAL(1)';
+		case 'I': return 'DECIMAL(10)';
+		case 'I1': return 'DECIMAL(3)';
+		case 'I2': return 'DECIMAL(5)';
+		case 'I4': return 'DECIMAL(10)';
+		case 'I8': return 'DECIMAL(20)';
+		
+		case 'F': return 'DECIMAL(32,8)';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+
+	function AlterColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
+		return array();
+	}
+	
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
+		return array();
+	}
+	
+}
+
+/*
+//db2
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'X': return 'VARCHAR'; 
+		
+		case 'C2': return 'VARCHAR'; // up to 32K
+		case 'X2': return 'VARCHAR';
+		
+		case 'B': return 'BLOB';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'TIMESTAMP';
+		
+		case 'L': return 'SMALLINT';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'BIGINT';
+		
+		case 'F': return 'DOUBLE';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+	
+// ifx
+function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';// 255
+		case 'X': return 'TEXT'; 
+		
+		case 'C2': return 'NVARCHAR';
+		case 'X2': return 'TEXT';
+		
+		case 'B': return 'BLOB';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'DATETIME';
+		
+		case 'L': return 'SMALLINT';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'DECIMAL(20)';
+		
+		case 'F': return 'FLOAT';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+*/
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-ibase.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-ibase.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-ibase.inc.php	(revision 225)
@@ -0,0 +1,67 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_ibase extends ADODB_DataDict {
+	
+	var $databaseType = 'ibase';
+	var $seqField = false;
+	
+ 	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'XL':
+		case 'X': return 'VARCHAR(4000)'; 
+		
+		case 'C2': return 'VARCHAR'; // up to 32K
+		case 'X2': return 'VARCHAR(4000)';
+		
+		case 'B': return 'BLOB';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'TIMESTAMP';
+		
+		case 'L': return 'SMALLINT';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'INTEGER';
+		
+		case 'F': return 'DOUBLE PRECISION';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+
+	function AlterColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
+		return array();
+	}
+	
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
+		return array();
+	}
+	
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-informix.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-informix.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-informix.inc.php	(revision 225)
@@ -0,0 +1,80 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_informix extends ADODB_DataDict {
+	
+	var $databaseType = 'informix';
+	var $seqField = false;
+	
+ 	
+	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';// 255
+		case 'XL':
+		case 'X': return 'TEXT'; 
+		
+		case 'C2': return 'NVARCHAR';
+		case 'X2': return 'TEXT';
+		
+		case 'B': return 'BLOB';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'DATETIME YEAR TO SECOND';
+		
+		case 'L': return 'SMALLINT';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'DECIMAL(20)';
+		
+		case 'F': return 'FLOAT';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}
+	}
+
+	function AlterColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
+		return array();
+	}
+	
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
+		return array();
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{
+		if ($fautoinc) {
+			$ftype = 'SERIAL';
+			return '';
+		}
+		$suffix = '';
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-mssql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-mssql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-mssql.inc.php	(revision 225)
@@ -0,0 +1,282 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+/*
+In ADOdb, named quotes for MS SQL Server use ". From the MSSQL Docs:
+
+	Note Delimiters are for identifiers only. Delimiters cannot be used for keywords, 
+	whether or not they are marked as reserved in SQL Server.
+	
+	Quoted identifiers are delimited by double quotation marks ("):
+	SELECT * FROM "Blanks in Table Name"
+	
+	Bracketed identifiers are delimited by brackets ([ ]):
+	SELECT * FROM [Blanks In Table Name]
+	
+	Quoted identifiers are valid only when the QUOTED_IDENTIFIER option is set to ON. By default, 
+	the Microsoft OLE DB Provider for SQL Server and SQL Server ODBC driver set QUOTED_IDENTIFIER ON 
+	when they connect. 
+	
+	In Transact-SQL, the option can be set at various levels using SET QUOTED_IDENTIFIER, 
+	the quoted identifier option of sp_dboption, or the user options option of sp_configure.
+	
+	When SET ANSI_DEFAULTS is ON, SET QUOTED_IDENTIFIER is enabled.
+	
+	Syntax
+	
+		SET QUOTED_IDENTIFIER { ON | OFF }
+
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_mssql extends ADODB_DataDict {
+	var $databaseType = 'mssql';
+	var $dropIndex = 'DROP INDEX %2$s.%1$s';
+	var $renameTable = "EXEC sp_rename '%s','%s'";
+	var $renameColumn = "EXEC sp_rename '%s.%s','%s'";
+
+	var $typeX = 'TEXT';  ## Alternatively, set it to VARCHAR(4000)
+	var $typeXL = 'TEXT';
+	
+	//var $alterCol = ' ALTER COLUMN ';
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		$len = -1; // mysql max_length is not accurate
+		switch (strtoupper($t)) {
+		case 'R':
+		case 'INT': 
+		case 'INTEGER': return  'I';
+		case 'BIT':
+		case 'TINYINT': return  'I1';
+		case 'SMALLINT': return 'I2';
+		case 'BIGINT':  return  'I8';
+		
+		case 'REAL':
+		case 'FLOAT': return 'F';
+		default: return parent::MetaType($t,$len,$fieldobj);
+		}
+	}
+	
+	function ActualType($meta)
+	{
+		switch(strtoupper($meta)) {
+
+		case 'C': return 'VARCHAR';
+		case 'XL': return (isset($this)) ? $this->typeXL : 'TEXT';
+		case 'X': return (isset($this)) ? $this->typeX : 'TEXT'; ## could be varchar(8000), but we want compat with oracle
+		case 'C2': return 'NVARCHAR';
+		case 'X2': return 'NTEXT';
+		
+		case 'B': return 'IMAGE';
+			
+		case 'D': return 'DATETIME';
+		case 'T': return 'DATETIME';
+		case 'L': return 'BIT';
+		
+		case 'R':		
+		case 'I': return 'INT'; 
+		case 'I1': return 'TINYINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INT';
+		case 'I8': return 'BIGINT';
+		
+		case 'F': return 'REAL';
+		case 'N': return 'NUMERIC';
+		default:
+			return $meta;
+		}
+	}
+	
+	
+	function AddColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$f = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		$s = "ALTER TABLE $tabname $this->addCol";
+		foreach($lines as $v) {
+			$f[] = "\n $v";
+		}
+		$s .= implode(', ',$f);
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	/*
+	function AlterColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		foreach($lines as $v) {
+			$sql[] = "ALTER TABLE $tabname $this->alterCol $v";
+		}
+
+		return $sql;
+	}
+	*/
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		if (!is_array($flds))
+			$flds = explode(',',$flds);
+		$f = array();
+		$s = 'ALTER TABLE ' . $tabname;
+		foreach($flds as $v) {
+			$f[] = "\n$this->dropCol ".$this->NameQuote($v);
+		}
+		$s .= implode(', ',$f);
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{	
+		$suffix = '';
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fautoinc) $suffix .= ' IDENTITY(1,1)';
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		else if ($suffix == '') $suffix .= ' NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+	/*
+CREATE TABLE 
+    [ database_name.[ owner ] . | owner. ] table_name 
+    ( { < column_definition > 
+        | column_name AS computed_column_expression 
+        | < table_constraint > ::= [ CONSTRAINT constraint_name ] }
+
+            | [ { PRIMARY KEY | UNIQUE } [ ,...n ] 
+    ) 
+
+[ ON { filegroup | DEFAULT } ] 
+[ TEXTIMAGE_ON { filegroup | DEFAULT } ] 
+
+< column_definition > ::= { column_name data_type } 
+    [ COLLATE < collation_name > ] 
+    [ [ DEFAULT constant_expression ] 
+        | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ]
+    ] 
+    [ ROWGUIDCOL] 
+    [ < column_constraint > ] [ ...n ] 
+
+< column_constraint > ::= [ CONSTRAINT constraint_name ] 
+    { [ NULL | NOT NULL ] 
+        | [ { PRIMARY KEY | UNIQUE } 
+            [ CLUSTERED | NONCLUSTERED ] 
+            [ WITH FILLFACTOR = fillfactor ] 
+            [ON {filegroup | DEFAULT} ] ] 
+        ] 
+        | [ [ FOREIGN KEY ] 
+            REFERENCES ref_table [ ( ref_column ) ] 
+            [ ON DELETE { CASCADE | NO ACTION } ] 
+            [ ON UPDATE { CASCADE | NO ACTION } ] 
+            [ NOT FOR REPLICATION ] 
+        ] 
+        | CHECK [ NOT FOR REPLICATION ] 
+        ( logical_expression ) 
+    } 
+
+< table_constraint > ::= [ CONSTRAINT constraint_name ] 
+    { [ { PRIMARY KEY | UNIQUE } 
+        [ CLUSTERED | NONCLUSTERED ] 
+        { ( column [ ASC | DESC ] [ ,...n ] ) } 
+        [ WITH FILLFACTOR = fillfactor ] 
+        [ ON { filegroup | DEFAULT } ] 
+    ] 
+    | FOREIGN KEY 
+        [ ( column [ ,...n ] ) ] 
+        REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] 
+        [ ON DELETE { CASCADE | NO ACTION } ] 
+        [ ON UPDATE { CASCADE | NO ACTION } ] 
+        [ NOT FOR REPLICATION ] 
+    | CHECK [ NOT FOR REPLICATION ] 
+        ( search_conditions ) 
+    } 
+
+
+	*/
+	
+	/*
+	CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name 
+    ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) 
+		[ WITH < index_option > [ ,...n] ] 
+		[ ON filegroup ]
+		< index_option > :: = 
+		    { PAD_INDEX | 
+		        FILLFACTOR = fillfactor | 
+		        IGNORE_DUP_KEY | 
+		        DROP_EXISTING | 
+		    STATISTICS_NORECOMPUTE | 
+		    SORT_IN_TEMPDB  
+		}
+*/
+	function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
+	{
+		$sql = array();
+		
+		if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
+			$sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
+			if ( isset($idxoptions['DROP']) )
+				return $sql;
+		}
+		
+		if ( empty ($flds) ) {
+			return $sql;
+		}
+		
+		$unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
+		$clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : '';
+		
+		if ( is_array($flds) )
+			$flds = implode(', ',$flds);
+		$s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
+		
+		if ( isset($idxoptions[$this->upperName]) )
+			$s .= $idxoptions[$this->upperName];
+		
+
+		$sql[] = $s;
+		
+		return $sql;
+	}
+	
+	
+	function _GetSize($ftype, $ty, $fsize, $fprec)
+	{
+		switch ($ftype) {
+		case 'INT':
+		case 'SMALLINT':
+		case 'TINYINT':
+		case 'BIGINT':
+			return $ftype;
+		}
+    	if ($ty == 'T') return $ftype;
+    	return parent::_GetSize($ftype, $ty, $fsize, $fprec);    
+
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-mysql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-mysql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-mysql.inc.php	(revision 225)
@@ -0,0 +1,181 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_mysql extends ADODB_DataDict {
+	var $databaseType = 'mysql';
+	var $alterCol = ' MODIFY COLUMN';
+	var $alterTableAddIndex = true;
+	var $dropTable = 'DROP TABLE IF EXISTS %s'; // requires mysql 3.22 or later
+	
+	var $dropIndex = 'DROP INDEX %s ON %s';
+	var $renameColumn = 'ALTER TABLE %s CHANGE COLUMN %s %s %s';	// needs column-definition!
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		$is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->auto_increment;
+		
+		$len = -1; // mysql max_length is not accurate
+		switch (strtoupper($t)) {
+		case 'STRING': 
+		case 'CHAR':
+		case 'VARCHAR': 
+		case 'TINYBLOB': 
+		case 'TINYTEXT': 
+		case 'ENUM': 
+		case 'SET':
+			if ($len <= $this->blobSize) return 'C';
+			
+		case 'TEXT':
+		case 'LONGTEXT': 
+		case 'MEDIUMTEXT':
+			return 'X';
+			
+		// php_mysql extension always returns 'blob' even if 'text'
+		// so we have to check whether binary...
+		case 'IMAGE':
+		case 'LONGBLOB': 
+		case 'BLOB':
+		case 'MEDIUMBLOB':
+			return !empty($fieldobj->binary) ? 'B' : 'X';
+			
+		case 'YEAR':
+		case 'DATE': return 'D';
+		
+		case 'TIME':
+		case 'DATETIME':
+		case 'TIMESTAMP': return 'T';
+		
+		case 'FLOAT':
+		case 'DOUBLE':
+			return 'F';
+			
+		case 'INT': 
+		case 'INTEGER': return $is_serial ? 'R' : 'I';
+		case 'TINYINT': return $is_serial ? 'R' : 'I1';
+		case 'SMALLINT': return $is_serial ? 'R' : 'I2';
+		case 'MEDIUMINT': return $is_serial ? 'R' : 'I4';
+		case 'BIGINT':  return $is_serial ? 'R' : 'I8';
+		default: return 'N';
+		}
+	}
+
+	function ActualType($meta)
+	{
+		switch(strtoupper($meta)) {
+		case 'C': return 'VARCHAR';
+		case 'XL':return 'LONGTEXT';
+		case 'X': return 'TEXT';
+		
+		case 'C2': return 'VARCHAR';
+		case 'X2': return 'LONGTEXT';
+		
+		case 'B': return 'LONGBLOB';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'DATETIME';
+		case 'L': return 'TINYINT';
+		
+		case 'R':
+		case 'I4':
+		case 'I': return 'INTEGER';
+		case 'I1': return 'TINYINT';
+		case 'I2': return 'SMALLINT';
+		case 'I8': return 'BIGINT';
+		
+		case 'F': return 'DOUBLE';
+		case 'N': return 'NUMERIC';
+		default:
+			return $meta;
+		}
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
+	{	
+		$suffix = '';
+		if ($funsigned) $suffix .= ' UNSIGNED';
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fautoinc) $suffix .= ' AUTO_INCREMENT';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+	/*
+	CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
+		[table_options] [select_statement]
+		create_definition:
+		col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT]
+		[PRIMARY KEY] [reference_definition]
+		or PRIMARY KEY (index_col_name,...)
+		or KEY [index_name] (index_col_name,...)
+		or INDEX [index_name] (index_col_name,...)
+		or UNIQUE [INDEX] [index_name] (index_col_name,...)
+		or FULLTEXT [INDEX] [index_name] (index_col_name,...)
+		or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...)
+		[reference_definition]
+		or CHECK (expr)
+	*/
+	
+	/*
+	CREATE [UNIQUE|FULLTEXT] INDEX index_name
+		ON tbl_name (col_name[(length)],... )
+	*/
+	
+	function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
+	{
+		$sql = array();
+		
+		if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
+			if ($this->alterTableAddIndex) $sql[] = "ALTER TABLE $tabname DROP INDEX $idxname";
+			else $sql[] = sprintf($this->dropIndex, $idxname, $tabname);
+
+			if ( isset($idxoptions['DROP']) )
+				return $sql;
+		}
+		
+		if ( empty ($flds) ) {
+			return $sql;
+		}
+		
+		if (isset($idxoptions['FULLTEXT'])) {
+			$unique = ' FULLTEXT';
+		} elseif (isset($idxoptions['UNIQUE'])) {
+			$unique = ' UNIQUE';
+		} else {
+			$unique = '';
+		}
+		
+		if ( is_array($flds) ) $flds = implode(', ',$flds);
+		
+		if ($this->alterTableAddIndex) $s = "ALTER TABLE $tabname ADD $unique INDEX $idxname ";
+		else $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname;
+		
+		$s .= ' (' . $flds . ')';
+		
+		if ( isset($idxoptions[$this->upperName]) )
+			$s .= $idxoptions[$this->upperName];
+		
+		$sql[] = $s;
+		
+		return $sql;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-oci8.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-oci8.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-oci8.inc.php	(revision 225)
@@ -0,0 +1,290 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_oci8 extends ADODB_DataDict {
+	
+	var $databaseType = 'oci8';
+	var $seqField = false;
+	var $seqPrefix = 'SEQ_';
+	var $dropTable = "DROP TABLE %s CASCADE CONSTRAINTS";
+	var $trigPrefix = 'TRIG_';
+	var $alterCol = ' MODIFY ';
+	var $typeX = 'VARCHAR(4000)';
+	var $typeXL = 'CLOB';
+	
+	function MetaType($t,$len=-1)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		switch (strtoupper($t)) {
+	 	case 'VARCHAR':
+	 	case 'VARCHAR2':
+		case 'CHAR':
+		case 'VARBINARY':
+		case 'BINARY':
+			if (isset($this) && $len <= $this->blobSize) return 'C';
+			return 'X';
+		
+		case 'NCHAR':
+		case 'NVARCHAR2':
+		case 'NVARCHAR':
+			if (isset($this) && $len <= $this->blobSize) return 'C2';
+			return 'X2';
+			
+		case 'NCLOB':
+		case 'CLOB':
+			return 'XL';
+		
+		case 'LONG RAW':
+		case 'LONG VARBINARY':
+		case 'BLOB':
+			return 'B';
+		
+		case 'DATE': 
+			return 'T';
+		
+		case 'INT': 
+		case 'SMALLINT':
+		case 'INTEGER': 
+			return 'I';
+			
+		default:
+			return 'N';
+		}
+	}
+	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'X': return $this->typeX;
+		case 'XL': return $this->typeXL;
+		
+		case 'C2': return 'NVARCHAR2';
+		case 'X2': return 'NVARCHAR2(4000)';
+		
+		case 'B': return 'BLOB';
+			
+		case 'D': 
+		case 'T': return 'DATE';
+		case 'L': return 'DECIMAL(1)';
+		case 'I1': return 'DECIMAL(3)';
+		case 'I2': return 'DECIMAL(5)';
+		case 'I':
+		case 'I4': return 'DECIMAL(10)';
+		
+		case 'I8': return 'DECIMAL(20)';
+		case 'F': return 'DECIMAL';
+		case 'N': return 'DECIMAL';
+		default:
+			return $meta;
+		}	
+	}
+	
+	function CreateDatabase($dbname, $options=false)
+	{
+		$options = $this->_Options($options);
+		$password = isset($options['PASSWORD']) ? $options['PASSWORD'] : 'tiger';
+		$tablespace = isset($options["TABLESPACE"]) ? " DEFAULT TABLESPACE ".$options["TABLESPACE"] : '';
+		$sql[] = "CREATE USER ".$dbname." IDENTIFIED BY ".$password.$tablespace;
+		$sql[] = "GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO $dbname";
+		
+		return $sql;
+	}
+	
+	function AddColumnSQL($tabname, $flds)
+	{
+		$f = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		$s = "ALTER TABLE $tabname ADD (";
+		foreach($lines as $v) {
+			$f[] = "\n $v";
+		}
+		
+		$s .= implode(', ',$f).')';
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	function AlterColumnSQL($tabname, $flds)
+	{
+		$f = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		$s = "ALTER TABLE $tabname MODIFY(";
+		foreach($lines as $v) {
+			$f[] = "\n $v";
+		}
+		$s .= implode(', ',$f).')';
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		if (!is_array($flds)) $flds = explode(',',$flds);
+		foreach ($flds as $k => $v) $flds[$k] = $this->NameQuote($v);
+		
+		$sql = array();
+		$s = "ALTER TABLE $tabname DROP(";
+		$s .= implode(', ',$flds).') CASCADE CONSTRAINTS';
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	function _DropAutoIncrement($t)
+	{
+		if (strpos($t,'.') !== false) {
+			$tarr = explode('.',$t);
+			return "drop sequence ".$tarr[0].".seq_".$tarr[1];
+		}
+		return "drop sequence seq_".$t;
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
+	{
+		$suffix = '';
+		
+		if ($fdefault == "''" && $fnotnull) {// this is null in oracle
+			$fnotnull = false;
+			if ($this->debug) ADOConnection::outp("NOT NULL and DEFAULT='' illegal in Oracle");
+		}
+		
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		
+		if ($fautoinc) $this->seqField = $fname;
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		
+		return $suffix;
+	}
+	
+/*
+CREATE or replace TRIGGER jaddress_insert
+before insert on jaddress
+for each row
+begin
+select seqaddress.nextval into :new.A_ID from dual;
+end;
+*/
+	function _Triggers($tabname,$tableoptions)
+	{
+		if (!$this->seqField) return array();
+		
+		if ($this->schema) {
+			$t = strpos($tabname,'.');
+			if ($t !== false) $tab = substr($tabname,$t+1);
+			else $tab = $tabname;
+			$seqname = $this->schema.'.'.$this->seqPrefix.$tab;
+			$trigname = $this->schema.'.'.$this->trigPrefix.$this->seqPrefix.$tab;
+		} else {
+			$seqname = $this->seqPrefix.$tabname;
+			$trigname = $this->trigPrefix.$seqname;
+		}
+		
+		if (strlen($seqname) > 30) {
+			$seqname = $this->seqPrefix.uniqid('');
+		} // end if
+		if (strlen($trigname) > 30) {
+			$trigname = $this->trigPrefix.uniqid('');
+		} // end if
+
+		if (isset($tableoptions['REPLACE'])) $sql[] = "DROP SEQUENCE $seqname";
+		$seqCache = '';
+		if (isset($tableoptions['SEQUENCE_CACHE'])){$seqCache = $tableoptions['SEQUENCE_CACHE'];}
+		$seqIncr = '';
+		if (isset($tableoptions['SEQUENCE_INCREMENT'])){$seqIncr = ' INCREMENT BY '.$tableoptions['SEQUENCE_INCREMENT'];}
+		$seqStart = '';
+		if (isset($tableoptions['SEQUENCE_START'])){$seqIncr = ' START WITH '.$tableoptions['SEQUENCE_START'];}
+		$sql[] = "CREATE SEQUENCE $seqname $seqStart $seqIncr $seqCache";
+		$sql[] = "CREATE OR REPLACE TRIGGER $trigname BEFORE insert ON $tabname FOR EACH ROW WHEN (NEW.$this->seqField IS NULL OR NEW.$this->seqField = 0) BEGIN select $seqname.nextval into :new.$this->seqField from dual; END;";
+		
+		$this->seqField = false;
+		return $sql;
+	}
+	
+	/*
+	CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
+		[table_options] [select_statement]
+		create_definition:
+		col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT]
+		[PRIMARY KEY] [reference_definition]
+		or PRIMARY KEY (index_col_name,...)
+		or KEY [index_name] (index_col_name,...)
+		or INDEX [index_name] (index_col_name,...)
+		or UNIQUE [INDEX] [index_name] (index_col_name,...)
+		or FULLTEXT [INDEX] [index_name] (index_col_name,...)
+		or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...)
+		[reference_definition]
+		or CHECK (expr)
+	*/
+	
+
+	
+	function _IndexSQL($idxname, $tabname, $flds,$idxoptions)
+	{
+		$sql = array();
+		
+		if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
+			$sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
+			if ( isset($idxoptions['DROP']) )
+				return $sql;
+		}
+		
+		if ( empty ($flds) ) {
+			return $sql;
+		}
+		
+		if (isset($idxoptions['BITMAP'])) {
+			$unique = ' BITMAP'; 
+		} elseif (isset($idxoptions['UNIQUE'])) {
+			$unique = ' UNIQUE';
+		} else {
+			$unique = '';
+		}
+		
+		if ( is_array($flds) )
+			$flds = implode(', ',$flds);
+		$s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
+		
+		if ( isset($idxoptions[$this->upperName]) )
+			$s .= $idxoptions[$this->upperName];
+		
+		if (isset($idxoptions['oci8']))
+			$s .= $idxoptions['oci8'];
+		
+
+		$sql[] = $s;
+		
+		return $sql;
+	}
+	
+	function GetCommentSQL($table,$col)
+	{
+		$table = $this->connection->qstr($table);
+		$col = $this->connection->qstr($col);	
+		return "select comments from USER_COL_COMMENTS where TABLE_NAME=$table and COLUMN_NAME=$col";
+	}
+	
+	function SetCommentSQL($table,$col,$cmt)
+	{
+		$cmt = $this->connection->qstr($cmt);
+		return  "COMMENT ON COLUMN $table.$col IS $cmt";
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-postgres.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-postgres.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-postgres.inc.php	(revision 225)
@@ -0,0 +1,371 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_postgres extends ADODB_DataDict {
+	
+	var $databaseType = 'postgres';
+	var $seqField = false;
+	var $seqPrefix = 'SEQ_';
+	var $addCol = ' ADD COLUMN';
+	var $quote = '"';
+	var $renameTable = 'ALTER TABLE %s RENAME TO %s'; // at least since 7.1
+	var $dropTable = 'DROP TABLE %s CASCADE';
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		$is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->unique && 
+			$fieldobj->has_default && substr($fieldobj->default_value,0,8) == 'nextval(';
+		
+		switch (strtoupper($t)) {
+			case 'INTERVAL':
+			case 'CHAR':
+			case 'CHARACTER':
+			case 'VARCHAR':
+			case 'NAME':
+	   		case 'BPCHAR':
+				if ($len <= $this->blobSize) return 'C';
+			
+			case 'TEXT':
+				return 'X';
+	
+			case 'IMAGE': // user defined type
+			case 'BLOB': // user defined type
+			case 'BIT':	// This is a bit string, not a single bit, so don't return 'L'
+			case 'VARBIT':
+			case 'BYTEA':
+				return 'B';
+			
+			case 'BOOL':
+			case 'BOOLEAN':
+				return 'L';
+			
+			case 'DATE':
+				return 'D';
+			
+			case 'TIME':
+			case 'DATETIME':
+			case 'TIMESTAMP':
+			case 'TIMESTAMPTZ':
+				return 'T';
+			
+			case 'INTEGER': return !$is_serial ? 'I' : 'R';
+			case 'SMALLINT': 
+			case 'INT2': return !$is_serial ? 'I2' : 'R';
+			case 'INT4': return !$is_serial ? 'I4' : 'R';
+			case 'BIGINT': 
+			case 'INT8': return !$is_serial ? 'I8' : 'R';
+				
+			case 'OID':
+			case 'SERIAL':
+				return 'R';
+			
+			case 'FLOAT4':
+			case 'FLOAT8':
+			case 'DOUBLE PRECISION':
+			case 'REAL':
+				return 'F';
+				
+			 default:
+			 	return 'N';
+		}
+	}
+ 	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'XL':
+		case 'X': return 'TEXT';
+		
+		case 'C2': return 'VARCHAR';
+		case 'X2': return 'TEXT';
+		
+		case 'B': return 'BYTEA';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'TIMESTAMP';
+		
+		case 'L': return 'BOOLEAN';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'SMALLINT';
+		case 'I2': return 'INT2';
+		case 'I4': return 'INT4';
+		case 'I8': return 'INT8';
+		
+		case 'F': return 'FLOAT8';
+		case 'N': return 'NUMERIC';
+		default:
+			return $meta;
+		}
+	}
+	
+	/**
+	 * Adding a new Column 
+	 *
+	 * reimplementation of the default function as postgres does NOT allow to set the default in the same statement
+	 *
+	 * @param string $tabname table-name
+	 * @param string $flds column-names and types for the changed columns
+	 * @return array with SQL strings
+	 */
+	function AddColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		$alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' ';
+		foreach($lines as $v) {
+			if (($not_null = preg_match('/NOT NULL/i',$v))) {
+				$v = preg_replace('/NOT NULL/i','',$v);
+			}
+			if (preg_match('/^([^ ]+) .*DEFAULT ([^ ]+)/',$v,$matches)) {
+				list(,$colname,$default) = $matches;
+				$sql[] = $alter . str_replace('DEFAULT '.$default,'',$v);
+				$sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default;
+				$sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default;
+			} else {				
+				$sql[] = $alter . $v;
+			}
+			if ($not_null) {
+				list($colname) = explode(' ',$v);
+				$sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL';
+			}
+		}
+		return $sql;
+	}
+	
+	/**
+	 * Change the definition of one column
+	 *
+	 * Postgres can't do that on it's own, you need to supply the complete defintion of the new table,
+	 * to allow, recreating the table and copying the content over to the new table
+	 * @param string $tabname table-name
+	 * @param string $flds column-name and type for the changed column
+	 * @param string $tableflds complete defintion of the new table, eg. for postgres, default ''
+	 * @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
+	 * @return array with SQL strings
+	 */
+	function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
+	{
+		if (!$tableflds) {
+			if ($this->debug) ADOConnection::outp("AlterColumnSQL needs a complete table-definiton for PostgreSQL");
+			return array();
+		}
+		return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions);
+	}
+	
+	/**
+	 * Drop one column
+	 *
+	 * Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table,
+	 * to allow, recreating the table and copying the content over to the new table
+	 * @param string $tabname table-name
+	 * @param string $flds column-name and type for the changed column
+	 * @param string $tableflds complete defintion of the new table, eg. for postgres, default ''
+	 * @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
+	 * @return array with SQL strings
+	 */
+	function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
+	{
+		$has_drop_column = 7.3 <= (float) @$this->serverInfo['version'];
+		if (!$has_drop_column && !$tableflds) {
+			if ($this->debug) ADOConnection::outp("DropColumnSQL needs complete table-definiton for PostgreSQL < 7.3");
+		return array();
+	}
+		if ($has_drop_column) {
+			return ADODB_DataDict::DropColumnSQL($tabname, $flds);
+		}
+		return $this->_recreate_copy_table($tabname,$flds,$tableflds,$tableoptions);
+	}
+	
+	/**
+	 * Save the content into a temp. table, drop and recreate the original table and copy the content back in
+	 *
+	 * We also take care to set the values of the sequenz and recreate the indexes.
+	 * All this is done in a transaction, to not loose the content of the table, if something went wrong!
+	 * @internal
+	 * @param string $tabname table-name
+	 * @param string $dropflds column-names to drop
+	 * @param string $tableflds complete defintion of the new table, eg. for postgres
+	 * @param array/string $tableoptions options for the new table see CreateTableSQL, default ''
+	 * @return array with SQL strings
+	 */
+	function _recreate_copy_table($tabname,$dropflds,$tableflds,$tableoptions='')
+	{
+		if ($dropflds && !is_array($dropflds)) $dropflds = explode(',',$dropflds);
+		$copyflds = array();
+		foreach($this->MetaColumns($tabname) as $fld) {
+			if (!$dropflds || !in_array($fld->name,$dropflds)) {
+				// we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one
+				if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && 
+					in_array($fld->type,array('varchar','char','text','bytea'))) {
+					$copyflds[] = "to_number($fld->name,'S9999999999999D99')";
+				} else {
+					$copyflds[] = $fld->name;
+				}
+				// identify the sequence name and the fld its on
+				if ($fld->primary_key && $fld->has_default && 
+					preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) {
+					$seq_name = $matches[1];
+					$seq_fld = $fld->name;
+				}
+			}
+		}
+		$copyflds = implode(', ',$copyflds);
+		
+		$tempname = $tabname.'_tmp';
+		$aSql[] = 'BEGIN';		// we use a transaction, to make sure not to loose the content of the table
+		$aSql[] = "SELECT * INTO TEMPORARY TABLE $tempname FROM $tabname";
+		$aSql = array_merge($aSql,$this->DropTableSQL($tabname));
+		$aSql = array_merge($aSql,$this->CreateTableSQL($tabname,$tableflds,$tableoptions));
+		$aSql[] = "INSERT INTO $tabname SELECT $copyflds FROM $tempname";
+		if ($seq_name && $seq_fld) {	// if we have a sequence we need to set it again
+			$seq_name = $tabname.'_'.$seq_fld.'_seq';	// has to be the name of the new implicit sequence
+			$aSql[] = "SELECT setval('$seq_name',MAX($seq_fld)) FROM $tabname";
+		}
+		$aSql[] = "DROP TABLE $tempname";
+		// recreate the indexes, if they not contain one of the droped columns
+		foreach($this->MetaIndexes($tabname) as $idx_name => $idx_data)
+		{
+			if (substr($idx_name,-5) != '_pkey' && (!$dropflds || !count(array_intersect($dropflds,$idx_data['columns'])))) {
+				$aSql = array_merge($aSql,$this->CreateIndexSQL($idx_name,$tabname,$idx_data['columns'],
+					$idx_data['unique'] ? array('UNIQUE') : False));
+			}
+		}
+		$aSql[] = 'COMMIT';
+		return $aSql;
+	}
+	
+	function DropTableSQL($tabname)
+	{
+		$sql = ADODB_DataDict::DropTableSQL($tabname);
+		
+		$drop_seq = $this->_DropAutoIncrement($tabname);
+		if ($drop_seq) $sql[] = $drop_seq;
+		
+		return $sql;
+	}
+
+	// return string must begin with space
+	function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{
+		if ($fautoinc) {
+			$ftype = 'SERIAL';
+			return '';
+		}
+		$suffix = '';
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+	// search for a sequece for the given table (asumes the seqence-name contains the table-name!)
+	// if yes return sql to drop it
+	// this is still necessary if postgres < 7.3 or the SERIAL was created on an earlier version!!!
+	function _DropAutoIncrement($tabname)
+	{
+		$tabname = $this->connection->quote('%'.$tabname.'%');
+
+		$seq = $this->connection->GetOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'");
+
+		// check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly
+		if (!$seq || $this->connection->GetOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) {
+			return False;
+		}
+		return "DROP SEQUENCE ".$seq;
+	}
+	
+	/*
+	CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name (
+	{ column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ]
+	| table_constraint } [, ... ]
+	)
+	[ INHERITS ( parent_table [, ... ] ) ]
+	[ WITH OIDS | WITHOUT OIDS ]
+	where column_constraint is:
+	[ CONSTRAINT constraint_name ]
+	{ NOT NULL | NULL | UNIQUE | PRIMARY KEY |
+	CHECK (expression) |
+	REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ]
+	[ ON DELETE action ] [ ON UPDATE action ] }
+	[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+	and table_constraint is:
+	[ CONSTRAINT constraint_name ]
+	{ UNIQUE ( column_name [, ... ] ) |
+	PRIMARY KEY ( column_name [, ... ] ) |
+	CHECK ( expression ) |
+	FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
+	[ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] }
+	[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+	*/
+	
+	
+	/*
+	CREATE [ UNIQUE ] INDEX index_name ON table
+[ USING acc_method ] ( column [ ops_name ] [, ...] )
+[ WHERE predicate ]
+CREATE [ UNIQUE ] INDEX index_name ON table
+[ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )
+[ WHERE predicate ]
+	*/
+	function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
+	{
+		$sql = array();
+		
+		if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
+			$sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
+			if ( isset($idxoptions['DROP']) )
+				return $sql;
+		}
+		
+		if ( empty ($flds) ) {
+			return $sql;
+		}
+		
+		$unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
+		
+		$s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' ';
+		
+		if (isset($idxoptions['HASH']))
+			$s .= 'USING HASH ';
+		
+		if ( isset($idxoptions[$this->upperName]) )
+			$s .= $idxoptions[$this->upperName];
+		
+		if ( is_array($flds) )
+			$flds = implode(', ',$flds);
+		$s .= '(' . $flds . ')';
+		$sql[] = $s;
+		
+		return $sql;
+	}
+	
+	function _GetSize($ftype, $ty, $fsize, $fprec)
+	{
+		if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty  != 'I' && strpos($ftype,'(') === false) {
+			$ftype .= "(".$fsize;
+			if (strlen($fprec)) $ftype .= ",".$fprec;
+			$ftype .= ')';
+		}
+		return $ftype;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-sapdb.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-sapdb.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-sapdb.inc.php	(revision 225)
@@ -0,0 +1,121 @@
+<?php
+
+/**
+  V4.50 6 July 2004  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+  
+  Modified from datadict-generic.inc.php for sapdb by RalfBecker-AT-outdoor-training.de
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_sapdb extends ADODB_DataDict {
+	
+	var $databaseType = 'sapdb';
+	var $seqField = false;	
+	var $renameColumn = 'RENAME COLUMN %s.%s TO %s';
+ 	
+ 	function ActualType($meta)
+	{
+		switch($meta) {
+		case 'C': return 'VARCHAR';
+		case 'XL':
+		case 'X': return 'LONG';
+		
+		case 'C2': return 'VARCHAR UNICODE';
+		case 'X2': return 'LONG UNICODE';
+		
+		case 'B': return 'LONG';
+			
+		case 'D': return 'DATE';
+		case 'T': return 'TIMESTAMP';
+		
+		case 'L': return 'BOOLEAN';
+		case 'I': return 'INTEGER';
+		case 'I1': return 'FIXED(3)';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INTEGER';
+		case 'I8': return 'FIXED(20)';
+		
+		case 'F': return 'FLOAT(38)';
+		case 'N': return 'FIXED';
+		default:
+			return $meta;
+		}
+	}
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		static $maxdb_type2adodb = array(
+			'VARCHAR'	=> 'C',
+			'CHARACTER'	=> 'C',
+			'LONG'		=> 'X',		// no way to differ between 'X' and 'B' :-(
+			'DATE'		=> 'D',
+			'TIMESTAMP'	=> 'T',
+			'BOOLEAN'	=> 'L',
+			'INTEGER'	=> 'I4',
+			'SMALLINT'	=> 'I2',
+			'FLOAT'		=> 'F',
+			'FIXED'		=> 'N',
+		);
+		$type = isset($maxdb_type2adodb[$t]) ? $maxdb_type2adodb[$t] : 'C';
+
+		// convert integer-types simulated with fixed back to integer
+		if ($t == 'FIXED' && !$fieldobj->scale && ($len == 20 || $len == 3)) {
+			$type = $len == 20 ? 'I8' : 'I1';
+		}
+		if ($fieldobj->auto_increment) $type = 'R';
+
+		return $type;
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
+	{	
+		$suffix = '';
+		if ($funsigned) $suffix .= ' UNSIGNED';
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		if ($fautoinc) $suffix .= ' DEFAULT SERIAL';
+		elseif (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+
+	function AddColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		return array( 'ALTER TABLE ' . $tabname . ' ADD (' . implode(', ',$lines) . ')' );
+	}
+	
+	function AlterColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		return array( 'ALTER TABLE ' . $tabname . ' MODIFY (' . implode(', ',$lines) . ')' );
+	}
+
+	function DropColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		if (!is_array($flds)) $flds = explode(',',$flds);
+		foreach($flds as $k => $v) {
+			$flds[$k] = $this->NameQuote($v);
+		}
+		return array( 'ALTER TABLE ' . $tabname . ' DROP (' . implode(', ',$flds) . ')' );
+	}	
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-sybase.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-sybase.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/datadict/datadict-sybase.inc.php	(revision 225)
@@ -0,0 +1,228 @@
+<?php
+
+/**
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+ 
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB2_sybase extends ADODB_DataDict {
+	var $databaseType = 'sybase';
+	
+	var $dropIndex = 'DROP INDEX %2$s.%1$s';
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		$len = -1; // mysql max_length is not accurate
+		switch (strtoupper($t)) {
+
+		case 'INT': 
+		case 'INTEGER': return  'I';
+		case 'BIT':
+		case 'TINYINT': return  'I1';
+		case 'SMALLINT': return 'I2';
+		case 'BIGINT':  return  'I8';
+		
+		case 'REAL':
+		case 'FLOAT': return 'F';
+		default: return parent::MetaType($t,$len,$fieldobj);
+		}
+	}
+	
+	function ActualType($meta)
+	{
+		switch(strtoupper($meta)) {
+		case 'C': return 'VARCHAR';
+		case 'XL':
+		case 'X': return 'TEXT';
+		
+		case 'C2': return 'NVARCHAR';
+		case 'X2': return 'NTEXT';
+		
+		case 'B': return 'IMAGE';
+			
+		case 'D': return 'DATETIME';
+		case 'T': return 'DATETIME';
+		case 'L': return 'BIT';
+		
+		case 'I': return 'INT'; 
+		case 'I1': return 'TINYINT';
+		case 'I2': return 'SMALLINT';
+		case 'I4': return 'INT';
+		case 'I8': return 'BIGINT';
+		
+		case 'F': return 'REAL';
+		case 'N': return 'NUMERIC';
+		default:
+			return $meta;
+		}
+	}
+	
+	
+	function AddColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$f = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		$s = "ALTER TABLE $tabname $this->addCol";
+		foreach($lines as $v) {
+			$f[] = "\n $v";
+		}
+		$s .= implode(', ',$f);
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	function AlterColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName ($tabname);
+		$sql = array();
+		list($lines,$pkey) = $this->_GenFields($flds);
+		foreach($lines as $v) {
+			$sql[] = "ALTER TABLE $tabname $this->alterCol $v";
+		}
+
+		return $sql;
+	}
+	
+	function DropColumnSQL($tabname, $flds)
+	{
+		$tabname = $this->TableName($tabname);
+		if (!is_array($flds)) $flds = explode(',',$flds);
+		$f = array();
+		$s = "ALTER TABLE $tabname";
+		foreach($flds as $v) {
+			$f[] = "\n$this->dropCol ".$this->NameQuote($v);
+		}
+		$s .= implode(', ',$f);
+		$sql[] = $s;
+		return $sql;
+	}
+	
+	// return string must begin with space
+	function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint)
+	{	
+		$suffix = '';
+		if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
+		if ($fautoinc) $suffix .= ' DEFAULT AUTOINCREMENT';
+		if ($fnotnull) $suffix .= ' NOT NULL';
+		else if ($suffix == '') $suffix .= ' NULL';
+		if ($fconstraint) $suffix .= ' '.$fconstraint;
+		return $suffix;
+	}
+	
+	/*
+CREATE TABLE 
+    [ database_name.[ owner ] . | owner. ] table_name 
+    ( { < column_definition > 
+        | column_name AS computed_column_expression 
+        | < table_constraint > ::= [ CONSTRAINT constraint_name ] }
+
+            | [ { PRIMARY KEY | UNIQUE } [ ,...n ] 
+    ) 
+
+[ ON { filegroup | DEFAULT } ] 
+[ TEXTIMAGE_ON { filegroup | DEFAULT } ] 
+
+< column_definition > ::= { column_name data_type } 
+    [ COLLATE < collation_name > ] 
+    [ [ DEFAULT constant_expression ] 
+        | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ]
+    ] 
+    [ ROWGUIDCOL] 
+    [ < column_constraint > ] [ ...n ] 
+
+< column_constraint > ::= [ CONSTRAINT constraint_name ] 
+    { [ NULL | NOT NULL ] 
+        | [ { PRIMARY KEY | UNIQUE } 
+            [ CLUSTERED | NONCLUSTERED ] 
+            [ WITH FILLFACTOR = fillfactor ] 
+            [ON {filegroup | DEFAULT} ] ] 
+        ] 
+        | [ [ FOREIGN KEY ] 
+            REFERENCES ref_table [ ( ref_column ) ] 
+            [ ON DELETE { CASCADE | NO ACTION } ] 
+            [ ON UPDATE { CASCADE | NO ACTION } ] 
+            [ NOT FOR REPLICATION ] 
+        ] 
+        | CHECK [ NOT FOR REPLICATION ] 
+        ( logical_expression ) 
+    } 
+
+< table_constraint > ::= [ CONSTRAINT constraint_name ] 
+    { [ { PRIMARY KEY | UNIQUE } 
+        [ CLUSTERED | NONCLUSTERED ] 
+        { ( column [ ASC | DESC ] [ ,...n ] ) } 
+        [ WITH FILLFACTOR = fillfactor ] 
+        [ ON { filegroup | DEFAULT } ] 
+    ] 
+    | FOREIGN KEY 
+        [ ( column [ ,...n ] ) ] 
+        REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] 
+        [ ON DELETE { CASCADE | NO ACTION } ] 
+        [ ON UPDATE { CASCADE | NO ACTION } ] 
+        [ NOT FOR REPLICATION ] 
+    | CHECK [ NOT FOR REPLICATION ] 
+        ( search_conditions ) 
+    } 
+
+
+	*/
+	
+	/*
+	CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name 
+    ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) 
+		[ WITH < index_option > [ ,...n] ] 
+		[ ON filegroup ]
+		< index_option > :: = 
+		    { PAD_INDEX | 
+		        FILLFACTOR = fillfactor | 
+		        IGNORE_DUP_KEY | 
+		        DROP_EXISTING | 
+		    STATISTICS_NORECOMPUTE | 
+		    SORT_IN_TEMPDB  
+		}
+*/
+	function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
+	{
+		$sql = array();
+		
+		if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
+			$sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
+			if ( isset($idxoptions['DROP']) )
+				return $sql;
+		}
+		
+		if ( empty ($flds) ) {
+			return $sql;
+		}
+		
+		$unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
+		$clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : '';
+		
+		if ( is_array($flds) )
+			$flds = implode(', ',$flds);
+		$s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
+		
+		if ( isset($idxoptions[$this->upperName]) )
+			$s .= $idxoptions[$this->upperName];
+
+		$sql[] = $s;
+		
+		return $sql;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-active-record.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-active-record.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-active-record.htm	(revision 225)
@@ -0,0 +1,541 @@
+<html>
+<style>
+pre {
+  background-color: #eee;
+  padding: 0.75em 1.5em;
+  font-size: 12px;
+  border: 1px solid #ddd;
+}
+
+li,p {
+font-family: Arial, Helvetica, sans-serif ;
+}
+</style>
+<title>ADOdb Active Record</title>
+<body>
+<h1>ADOdb Active Record</h1>
+<p> (c) 2000-2007 John Lim (jlim#natsoft.com)</p>
+<p><font size="1">This software is dual licensed using BSD-Style and LGPL. This 
+  means you can use it in compiled proprietary and commercial products.</font></p>
+<p><hr>
+<ol>
+
+<h3><li>Introduction</h3>
+<p>
+ADOdb_Active_Record is an Object Relation Mapping (ORM) implementation using PHP. In an ORM system, the tables and rows of the database are abstracted into native PHP objects. This allows the programmer to focus more on manipulating the data and less on writing SQL queries.
+<p>
+This implementation differs from Zend Framework's implementation in the following ways:
+<ul>
+<li>Works with PHP4 and PHP5 and provides equivalent functionality in both versions of PHP.<p>
+<li>ADOdb_Active_Record works when you are connected to multiple databases. Zend's only works when connected to a default database.<p>
+<li>Support for $ADODB_ASSOC_CASE. The field names are upper-cased, lower-cased or left in natural case depending on this setting.<p>
+<li>No field name conversion to camel-caps style, unlike Zend's implementation which will convert field names such as 'first_name' to 'firstName'.<p>
+<li>NewADOConnection::GetActiveRecords() and ADOConnection::GetActiveRecordsClass() functions in adodb.inc.php.<p>
+<li>Caching of table metadata so it is only queried once per table, no matter how many Active Records are created.<p>
+<li>The additional functionality is described <a href=#additional>below</a>. 
+</ul>
+<P>
+ADOdb_Active_Record is designed upon the principles of the "ActiveRecord" design pattern, which was first described by Martin Fowler. The ActiveRecord pattern has been implemented in many forms across the spectrum of programming languages. ADOdb_Active_Record attempts to represent the database as closely to native PHP objects as possible.
+<p>
+ADOdb_Active_Record maps a database table to a PHP class, and each instance of that class represents a table row. Relations between tables can also be defined, allowing the ADOdb_Active_Record objects to be nested.
+<p>
+
+<h3><li>Setting the Database Connection</h3>
+<p>
+The first step to using  ADOdb_Active_Record is to set the default connection that an ADOdb_Active_Record objects will use to connect to a database. 
+
+<pre>
+require_once('adodb/adodb-active-record.inc.php');
+
+$db = NewADOConnection('mysql://root:pwd@localhost/dbname');
+ADOdb_Active_Record::SetDatabaseAdapter($db);
+</pre>        
+
+<h3><li>Table Rows as Objects</h3>
+<p>
+First, let's create a temporary table in our MySQL database that we can use for demonstrative purposes throughout the rest of this tutorial. We can do this by sending a CREATE query:
+
+<pre>
+$db->Execute("CREATE TEMPORARY TABLE `persons` (
+                `id` int(10) unsigned NOT NULL auto_increment,
+                `name_first` varchar(100) NOT NULL default '',
+                `name_last` varchar(100) NOT NULL default '',
+                `favorite_color` varchar(100) NOT NULL default '',
+                PRIMARY KEY  (`id`)
+            ) ENGINE=MyISAM;
+           ");
+ </pre>   
+<p>
+ADOdb_Active_Record's are object representations of table rows. Each table in the database is represented by a class in PHP. To begin working with a table as a ADOdb_Active_Record, a class that extends ADOdb_Active_Records needs to be created for it.
+
+<pre>
+class Person extends ADOdb_Active_Record{}
+$person = new Person();
+</pre>   
+
+<p>
+In the above example, a new ADOdb_Active_Record object $person was created to access the "persons" table. Zend_Db_DataObject takes the name of the class, pluralizes it (according to American English rules), and assumes that this is the name of the table in the database.
+<p>
+This kind of behavior is typical of ADOdb_Active_Record. It will assume as much as possible by convention rather than explicit configuration. In situations where it isn't possible to use the conventions that ADOdb_Active_Record expects, options can be overridden as we'll see later.
+
+<h3><li>Table Columns as Object Properties</h3>
+<p>
+When the $person object was instantiated, ADOdb_Active_Record read the table metadata from the database itself, and then exposed the table's columns (fields) as object properties.
+<p>
+Our "persons" table has three fields: "name_first", "name_last", and "favorite_color". Each of these fields is now a property of the $person object. To see all these properties, use the ADOdb_Active_Record::getAttributeNames() method:
+<pre>
+var_dump($person->getAttributeNames());
+
+/**
+ * Outputs the following:
+ * array(4) {
+ *    [0]=>
+ *    string(2) "id"
+ *    [1]=>
+ *    string(9) "name_first"
+ *    [2]=>
+ *    string(8) "name_last"
+ *    [3]=>
+ *    string(13) "favorite_color"
+ *  }
+ */
+    </pre>   
+<p>
+One big difference between ADOdb and Zend's implementation is we do not automatically convert to camelCaps style.
+<p>
+<h3><li>Inserting and Updating a Record</h3><p>
+
+An ADOdb_Active_Record object is a representation of a single table row. However, when our $person object is instantiated, it does not reference any particular row. It is a blank record that does not yet exist in the database. An ADOdb_Active_Record object is considered blank when its primary key is NULL. The primary key in our persons table is "id".
+<p>
+To insert a new record into the database, change the object's properties and then call the ADOdb_Active_Record::save() method:
+<pre>
+$person = new Person();
+$person->nameFirst = 'Andi';
+$person->nameLast  = 'Gutmans';
+$person->save();
+ </pre>   
+<p>
+Oh, no! The above code snippet does not insert a new record into the database. Instead, outputs an error:
+<pre>
+1048: Column 'name_first' cannot be null
+ </pre>   
+<p>
+This error occurred because MySQL rejected the INSERT query that was generated by ADOdb_Active_Record. If exceptions are enabled in ADOdb and you are using PHP5, an error will be thrown. In the definition of our table, we specified all of the fields as NOT NULL; i.e., they must contain a value.
+<p>
+ADOdb_Active_Records are bound by the same contraints as the database tables they represent. If the field in the database cannot be NULL, the corresponding property in the ADOdb_Active_Record also cannot be NULL. In the example above, we failed to set the property $person->favoriteColor, which caused the INSERT to be rejected by MySQL.
+<p>
+To insert a new ADOdb_Active_Record in the database, populate all of ADOdb_Active_Record's properties so that they satisfy the constraints of the database table, and then call the save() method:
+<pre>
+/**
+ * Calling the save() method will successfully INSERT
+ * this $person into the database table.
+ */
+$person = new Person();
+$person->name_first     = 'Andi';
+$person->name_last      = 'Gutmans';
+$person->favorite_color = 'blue';
+$person->save();
+</pre>
+<p>
+Once this $person has been INSERTed into the database by calling save(), the primary key can now be read as a property. Since this is the first row inserted into our temporary table, its "id" will be 1:
+<pre>
+var_dump($person->id);
+
+/**
+ * Outputs the following:
+ * string(1)
+ */
+ </pre>       
+<p>
+From this point on, updating it is simply a matter of changing the object's properties and calling the save() method again:
+
+<pre>
+$person->favorite_color = 'red';
+$person->save();
+   </pre>
+<p>
+The code snippet above will change the favorite color to red, and then UPDATE the record in the database.
+
+<a name=additional>
+<h2>ADOdb Specific Functionality</h2>
+<h3><li>Setting the Table Name</h3>
+<p>The default behaviour on creating an ADOdb_Active_Record is to "pluralize" the class name and
+ use that as the table name. Often, this is not the case. For example, the Person class could be reading 
+ from the "People" table. 
+<p>We provide two ways to define your own table:
+<p>1. Use a constructor parameter to override the default table naming behaviour.
+<pre>
+	class Person extends ADOdb_Active_Record{}
+	$person = new Person('People');
+</pre>
+<p>2. Define it in a class declaration:
+<pre>
+	class Person extends ADOdb_Active_Record
+	{
+	var $_table = 'People';
+	}
+	$person = new Person();
+</pre>
+
+<h3><li>$ADODB_ASSOC_CASE</h3>
+<p>This allows you to control the case of field names and properties. For example, all field names in Oracle are upper-case by default. So you 
+can force field names to be lowercase using $ADODB_ASSOC_CASE. Legal values are as follows:
+<pre>
+ 0: lower-case
+ 1: upper-case
+ 2: native-case
+</pre>
+<p>So to force all Oracle field names to lower-case, use
+<pre>
+$ADODB_ASSOC_CASE = 0;
+$person = new Person('People');
+$person->name = 'Lily';
+$ADODB_ASSOC_CASE = 2;
+$person2 = new Person('People');
+$person2->NAME = 'Lily'; 
+</pre>
+
+<p>Also see <a href=http://phplens.com/adodb/reference.constants.adodb_assoc_case.html>$ADODB_ASSOC_CASE</a>.
+
+<h3><li>ADOdb_Active_Record::Save()</h3>
+<p>
+Saves a record by executing an INSERT or UPDATE SQL statement as appropriate. 
+<p>Returns false on  unsuccessful INSERT, true if successsful INSERT.
+<p>Returns 0 on failed UPDATE, and 1 on UPDATE if data has changed, and -1 if no data was changed, so no UPDATE statement was executed.
+
+<h3><li>ADOdb_Active_Record::Replace()</h3>
+<p>
+ADOdb supports replace functionality, whereby the record is inserted if it does not exists, or updated otherwise.
+<pre>
+$rec = new ADOdb_Active_Record("product");
+$rec->name = 'John';
+$rec->tel_no = '34111145';
+$ok = $rec->replace(); // 0=failure, 1=update, 2=insert
+</pre>
+
+
+<h3><li>ADOdb_Active_Record::Load($where)</h3>
+<p>Sometimes, we want to load a single record into an Active Record. We can do so using:
+<pre>
+$person->load("id=3");
+
+// or using bind parameters
+
+$person->load("id=?", array(3));
+</pre>
+<p>Returns false if an error occurs.
+
+<h3><li>ADOdb_Active_Record::Find($whereOrderBy, $bindarr=false, $pkeyArr=false)</h3>
+<p>We want to retrieve an array of active records based on some search criteria. For example:
+<pre>
+class Person extends ADOdb_Active_Record {
+var $_table = 'people';
+}
+
+$person = new Person();
+$peopleArray =& $person->Find("name like ? order by age", array('Sm%'));
+</pre>
+
+<h3><li>Error Handling and Debugging</h3>
+<p>
+In PHP5, if adodb-exceptions.inc.php is included, then errors are thrown. Otherwise errors are handled by returning a value. False by default means an error has occurred. You can get the last error message using the ErrorMsg() function. 
+<p>
+To check for errors in ADOdb_Active_Record, do not poll ErrorMsg() as the last error message will always be returned, even if it occurred several operations ago. Do this instead:
+<pre>
+# right!
+$ok = $rec->Save();
+if (!$ok) $err = $rec->ErrorMsg();
+
+# wrong :(
+$rec->Save();
+if ($rec->ErrorMsg()) echo "Wrong way to detect error";
+</pre>
+<p>The ADOConnection::Debug property is obeyed. So
+if $db->debug is enabled, then ADOdb_Active_Record errors are also outputted to standard output and written to the browser.
+
+<h3><li>ADOdb_Active_Record::Set()</h3>
+<p>You can convert an array to an ADOdb_Active_Record using Set(). The array must be numerically indexed, and have all fields of the table defined in the array. The elements of the array must be in the table's natural order too.
+<pre>
+$row = $db->GetRow("select * from tablex where id=$id");
+
+# PHP4 or PHP5 without enabling exceptions
+$obj =& new ADOdb_Active_Record('Products');
+if ($obj->ErrorMsg()){
+	echo $obj->ErrorMsg();
+} else {
+	$obj->Set($row);
+}
+
+# in PHP5, with exceptions enabled:
+
+include('adodb-exceptions.inc.php');
+try {
+	$obj =& new ADOdb_Active_Record('Products');
+	$obj->Set($row);
+} catch(exceptions $e) {
+	echo $e->getMessage();
+}
+</pre>
+<p>
+<h3><li>Primary Keys</h3>
+<p>
+ADOdb_Active_Record does not require the table to have a primary key. You can insert records for such a table, but you will not be able to update nor delete. 
+<p>Sometimes you are retrieving data from a view or table that has no primary key, but has a unique index. You can dynamically set the primary key of a table through the constructor, or using ADOdb_Active_Record::SetPrimaryKeys():
+<pre>
+	$pkeys = array('category','prodcode');
+	
+	// set primary key using constructor
+	$rec = new ADOdb_Active_Record('Products', $pkeys);
+	
+	 // or use method
+	$rec->SetPrimaryKeys($pkeys);
+</pre>
+
+
+<h3><li>Retrieval of Auto-incrementing ID</h3>
+When creating a new record, the retrieval of the last auto-incrementing ID is not reliable for databases that do not support the Insert_ID() function call (check $connection->hasInsertID). In this case we perform a <b>SELECT MAX($primarykey) FROM $table</b>, which will not work reliably in a multi-user environment. You can override the ADOdb_Active_Record::LastInsertID() function in this case.
+
+<h3><li>Dealing with Multiple Databases</h3>
+<p>
+Sometimes we want to load  data from one database and insert it into another using ActiveRecords. This can be done using the optional parameter of the ADOdb_Active_Record constructor. In the following example, we read data from db.table1 and store it in db2.table2:
+<pre>
+$db = NewADOConnection(...);
+$db2 = NewADOConnection(...);
+
+ADOdb_Active_Record::SetDatabaseAdapter($db2);
+
+$activeRecs = $db->GetActiveRecords('table1');
+
+foreach($activeRecs as $rec) {
+	$rec2 = new ADOdb_Active_Record('table2',$db2);
+	$rec2->id = $rec->id;
+	$rec2->name = $rec->name;
+	
+	$rec2->Save();
+}
+</pre>
+<p>
+If you have to pass in a primary key called "id" and the 2nd db connection in the constructor, you can do so too:
+<pre>
+$rec = new ADOdb_Active_Record("table1",array("id"),$db2);
+</pre>
+
+<h3><li>$ADODB_ACTIVE_CACHESECS</h3>
+<p>You can cache the table metadata (field names, types, and other info such primary keys) in $ADODB_CACHE_DIR (which defaults to /tmp) by setting
+the global variable $ADODB_ACTIVE_CACHESECS to a value greater than 0. This will be the number of seconds to cache.
+ You should set this to a value of 30 seconds or greater for optimal performance.
+
+<h3><li>Active Record Considered Bad?</h3>
+<p>Although the Active Record concept is useful, you have to be aware of some pitfalls when using Active Record. The level of granularity of Active Record is individual records. It encourages code like the following, used to increase the price of all furniture products by 10%:
+<pre>
+ $recs = $db->GetActiveRecords("Products","category='Furniture'");
+ foreach($recs as $rec) {
+    $rec->price *= 1.1; // increase price by 10% for all Furniture products
+    $rec->save();
+ }
+</pre>
+Of course a SELECT statement is superior because it's simpler and much more efficient (probably by a factor of x10 or more):
+<pre>
+   $db->Execute("update Products set price = price * 1.1 where category='Furniture'");
+</pre>
+<p>Another issue is performance. For performance sensitive code, using direct SQL will always be faster than using Active Records due to overhead and the fact that all fields in a row are retrieved (rather than only the subset you need) whenever an Active Record is loaded.
+
+<h3><li>Transactions</h3>
+<p>
+The default transaction mode in ADOdb is autocommit. So that is the default with active record too. 
+The general rules for managing transactions still apply. Active Record to the database is a set of insert/update/delete statements, and the db has no knowledge of active records.
+<p>
+Smart transactions, that does an auto-rollback if an error occurs, is still the best method to multiple activities (inserts/updates/deletes) that need to be treated as a single transaction:
+<pre>
+$conn->StartTrans();
+$parent->save();
+$child->save();
+$conn->CompleteTrans();
+</pre>
+
+<h2>ADOConnection Supplement</h2>
+
+<h3><li>ADOConnection::GetActiveRecords()</h3>
+<p>
+This allows you to retrieve an array of ADOdb_Active_Records. Returns false if an error occurs.
+<pre>
+$table = 'products';
+$whereOrderBy = "name LIKE 'A%' ORDER BY Name";
+$activeRecArr = $db->GetActiveRecords($table, $whereOrderBy);
+foreach($activeRecArr as $rec) {
+	$rec->id = rand();
+	$rec->save();
+}
+</pre>
+<p>
+And to retrieve all records ordered by specific fields:
+<pre>
+$whereOrderBy = "1=1 ORDER BY Name";
+$activeRecArr = $db->ADOdb_Active_Records($table);
+</pre>
+<p>
+To use bind variables (assuming ? is the place-holder for your database):
+<pre>
+$activeRecArr = $db->GetActiveRecords($tableName, 'name LIKE ?',
+						array('A%'));
+</pre>
+<p>You can also define the primary keys of the table by passing an array of field names:
+<pre>
+$activeRecArr = $db->GetActiveRecords($tableName, 'name LIKE ?',
+						array('A%'), array('id'));
+</pre>
+
+<h3><li>ADOConnection::GetActiveRecordsClass()</h3>
+<p>
+This allows you to retrieve an array of objects derived from ADOdb_Active_Records. Returns false if an error occurs.
+<pre>
+class Product extends ADOdb_Active_Records{};
+$table = 'products';
+$whereOrderBy = "name LIKE 'A%' ORDER BY Name";
+$activeRecArr = $db->GetActiveRecordsClass('Product',$table, $whereOrderBy);
+
+# the objects in $activeRecArr are of class 'Product'
+foreach($activeRecArr as $rec) {
+	$rec->id = rand();
+	$rec->save();
+}
+</pre>
+<p>
+To use bind variables (assuming ? is the place-holder for your database):
+<pre>
+$activeRecArr = $db->GetActiveRecordsClass($className,$tableName, 'name LIKE ?',
+						array('A%'));
+</pre>
+<p>You can also define the primary keys of the table by passing an array of field names:
+<pre>
+$activeRecArr = $db->GetActiveRecordsClass($className,$tableName, 'name LIKE ?',
+						array('A%'), array('id'));
+</pre>
+
+</ol>
+
+<h3><li>ADOConnection::ErrorMsg()</h3>
+<p>Returns last error message.
+<h3><li>ADOConnection::ErrorNo()</h3>
+<p>Returns last error number.
+<h2>Code Sample</h2>
+<p>The following works with PHP4 and PHP5
+<pre>
+include('../adodb.inc.php');
+include('../adodb-active-record.inc.php');
+
+// uncomment the following if you want to test exceptions
+#if (PHP_VERSION >= 5) include('../adodb-exceptions.inc.php');
+
+$db = NewADOConnection('mysql://root@localhost/northwind');
+$db->debug=1;
+ADOdb_Active_Record::SetDatabaseAdapter($db);
+
+$db->Execute("CREATE TEMPORARY TABLE `persons` (
+                `id` int(10) unsigned NOT NULL auto_increment,
+                `name_first` varchar(100) NOT NULL default '',
+                `name_last` varchar(100) NOT NULL default '',
+                `favorite_color` varchar(100) NOT NULL default '',
+                PRIMARY KEY  (`id`)
+            ) ENGINE=MyISAM;
+           ");
+		   
+class Person extends ADOdb_Active_Record{}
+$person = new Person();
+
+echo "&lt;p>Output of getAttributeNames: ";
+var_dump($person->getAttributeNames());
+
+/**
+ * Outputs the following:
+ * array(4) {
+ *    [0]=>
+ *    string(2) "id"
+ *    [1]=>
+ *    string(9) "name_first"
+ *    [2]=>
+ *    string(8) "name_last"
+ *    [3]=>
+ *    string(13) "favorite_color"
+ *  }
+ */
+
+$person = new Person();
+$person->nameFirst = 'Andi';
+$person->nameLast  = 'Gutmans';
+$person->save(); // this save() will fail on INSERT as favorite_color is a must fill...
+
+
+$person = new Person();
+$person->name_first     = 'Andi';
+$person->name_last      = 'Gutmans';
+$person->favorite_color = 'blue';
+$person->save(); // this save will perform an INSERT successfully
+
+echo "&lt;p>The Insert ID generated:"; print_r($person->id);
+
+$person->favorite_color = 'red';
+$person->save(); // this save() will perform an UPDATE
+
+$person = new Person();
+$person->name_first     = 'John';
+$person->name_last      = 'Lim';
+$person->favorite_color = 'lavender';
+$person->save(); // this save will perform an INSERT successfully
+
+// load record where id=2 into a new ADOdb_Active_Record
+$person2 = new Person();
+$person2->Load('id=2');
+var_dump($person2);
+
+// retrieve an array of records
+$activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2));
+$person2 =& $activeArr[0];
+echo "&lt;p>Name first (should be John): ",$person->name_first, "&lt;br>Class = ",get_class($person2);	
+</pre>
+
+ <h3>Todo (Code Contributions welcome)</h3>
+ <p>Check _original and current field values before update, only update changes. Also if the primary key value is changed, then on update, we should save and use the original primary key values in the WHERE clause!
+ <p>Handle 1-to-many relationships.
+ <p>PHP5 specific:  Make GetActiveRecords*() return an Iterator.
+ <p>PHP5 specific: Change PHP5 implementation of Active Record to use __get() and __set() for better performance.
+
+<h3> Change Log</h3>
+<p>0.07
+<p>$ADODB_ASSOC_CASE=2 did not work properly. Fixed.
+<p>Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter.
+
+<p>0.06
+<p>Added ErrorNo().
+<p>Fixed php 5.2.0 compat issues.
+ 
+<p>0.05
+<p>If inserting a record and the value of a primary key field is null, then we do not insert that field in as
+we assume it is an auto-increment field. Needed by mssql.
+
+<p>0.04 5 June 2006 <br>
+<p>Added support for declaring table name in $_table in class declaration. Thx Bill Dueber for idea.
+<p>Added find($where,$bindarr=false) method to retrieve an array of active record objects.
+
+<p>0.03 <br>
+- Now we only update fields that have changed, using $this->_original.<br>
+- We do not include auto_increment fields in replace(). Thx Travis Cline<br>
+- Added ADODB_ACTIVE_CACHESECS.<br>
+
+<p>0.02 <br>
+- Much better error handling. ErrorMsg() implemented. Throw implemented if adodb-exceptions.inc.php detected.<br>
+- You can now define the primary keys of the view or table you are accessing manually.<br>
+- The Active Record allows you to create an object which does not have a primary key. You can INSERT but not UPDATE in this case.
+- Set() documented.<br>
+- Fixed _pluralize bug with y suffix.
+
+<p>
+ 0.01 6 Mar 2006<br>
+- Fixed handling of nulls when saving (it didn't save nulls, saved them as '').<br>
+- Better error handling messages.<br>
+- Factored out a new method GetPrimaryKeys().<br>
+ <p>
+ 0.00 5 Mar 2006<br>
+ 1st release
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-adodb.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-adodb.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-adodb.htm	(revision 225)
@@ -0,0 +1,3568 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>ADODB Manual</title>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+	
+<style>
+pre {
+  background-color: #eee;
+  padding: 0.75em 1.5em;
+  font-size: 12px;
+  border: 1px solid #ddd;
+}
+</style></head>
+<body bgcolor="#ffffff" text="black">
+
+<h2>ADOdb Library for PHP</h2>
+<p>V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com)</p>
+<p><font size="1">This software is dual licensed using BSD-Style and LGPL. This 
+  means you can use it in compiled proprietary and commercial products.</font></p>
+  
+
+	<p>Useful ADOdb links:  <a href="http://adodb.sourceforge.net/#download">Download</a> &nbsp; <a href="http://adodb.sourceforge.net/#docs">Other Docs</a>
+
+</p><p><a href="#intro"><b>Introduction</b></a><b><br>
+	<a href="#features">Unique Features</a><br>
+	<a href="#users">How People are using ADOdb</a><br>
+	<a href="#bugs">Feature Requests and Bug Reports</a><br>
+	</b><b><a href="#install">Installation</a><br>
+	<a href="#mininstall">Minimum Install</a><br>
+	<a href="#coding">Initializing Code and Connectioning to Databases</a><br>
+	</b><font size="2"> &nbsp; <a href="#dsnsupport">Data Source Name (DSN) Support</a></font>  &nbsp;  <a href="#connect_ex">Connection Examples</a> <br>
+	<b><a href="#speed">High Speed ADOdb - tuning tips</a></b><br>
+	<b><a href="#hack">Hacking and Modifying ADOdb Safely</a><br>
+	<a href="#php5">PHP5 Features</a></b><br>
+	<font size="2"><a href="#php5iterators">foreach iterators</a> <a href="#php5exceptions">exceptions</a></font><br>
+	<b> <a href="#drivers">Supported Databases</a></b><br>
+	<b> <a href="#quickstart">Tutorials</a></b><br>
+	<a href="#ex1">Example 1: Select</a><br>
+	<a href="#ex2">Example 2: Advanced Select</a><br>
+	<a href="#ex3">Example 3: Insert</a><br>
+	<a href="#ex4">Example 4: Debugging</a> &nbsp;<a href="#exrs2html">rs2html 
+	example</a><br>
+	<a href="#ex5">Example 5: MySQL and Menus</a><br>
+	<a href="#ex6">Example 6: Connecting to Multiple Databases at once</a> <br>
+	<a href="#ex7">Example 7: Generating Update and Insert SQL</a> <br>
+	<a href="#ex8">Example 8: Implementing Scrolling with Next and Previous</a><br>
+	<a href="#ex9">Example 9: Exporting in CSV or Tab-Delimited Format</a> <br>
+	<a href="#ex10">Example 10: Custom filters</a><br>
+	<a href="#ex11">Example 11: Smart Transactions</a><br>
+	<br>
+	<b> <a href="#errorhandling">Using Custom Error Handlers and PEAR_Error</a><br>
+	<a href="#DSN">Data Source Names</a><br>
+	<a href="#caching">Caching</a><br>
+	<a href="#pivot">Pivot Tables</a></b> 
+</p><p><a href="#ref"><b>REFERENCE</b></a>
+</p><p> <font size="2">Variables: <a href="#adodb_countrecs">$ADODB_COUNTRECS</a> 
+<a href="#adodb_ansi_padding_off">$ADODB_ANSI_PADDING_OFF</a>
+  <a href="#adodb_cache_dir">$ADODB_CACHE_DIR</a> <br>
+  &nbsp; &nbsp; &nbsp; &nbsp;  <a href="#force_type">$ADODB_FORCE_TYPE</a> 
+  <a href="#adodb_fetch_mode">$ADODB_FETCH_MODE</a> 
+  <a href="#adodb_lang">$ADODB_LANG</a> <a href=#adodb_auto_quote>ADODB_QUOTE_FIELDNAMES</a> <br>
+  Constants: </font><font size="2"><a href="#adodb_assoc_case">ADODB_ASSOC_CASE</a> 
+  </font><br>
+  <a href="#ADOConnection"><b> ADOConnection</b></a><br>
+  <font size="2">Connections: <a href="#connect">Connect</a> <a href="#pconnect">PConnect</a> 
+  <a href="#nconnect">NConnect</a> <a href="#isconnected">IsConnected</a><br>
+  Executing SQL: <a href="#execute">Execute</a> <a href="#cacheexecute"><i>CacheExecute</i></a> 
+  <a href="#selectlimit">SelectLimit</a> <a href="#cacheSelectLimit"><i>CacheSelectLimit</i></a> 
+  <a href="#param">Param</a> <a href="#prepare">Prepare</a> <a href="#preparesp">PrepareSP</a> 
+  <a href="#inparameter">InParameter</a> <a href="#outparameter">OutParameter</a> <a href="#autoexecute">AutoExecute</a>
+  <br>
+  &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#getone">GetOne</a> 
+  <a href="#cachegetone"><i>CacheGetOne</i></a> <a href="#getrow">GetRow</a> <a href="#cachegetrow"><i>CacheGetRow</i></a> 
+  <a href="#getall">GetAll</a> <a href="#cachegetall"><i>CacheGetAll</i></a> <a href="#getcol">GetCol</a> 
+  <a href="#cachegetcol"><i>CacheGetCol</i></a> <a href="#getassoc1">GetAssoc</a> <a href="#cachegetassoc"><i>CacheGetAssoc</i></a> <a href="#replace">Replace</a> 
+  <br>
+  &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#executecursor">ExecuteCursor</a> 
+  (oci8 only)<br>
+  Generates SQL strings: <a href="#getupdatesql">GetUpdateSQL</a> <a href="#getinsertsql">GetInsertSQL</a> 
+  <a href="#concat">Concat</a> <a href="#ifnull">IfNull</a> <a href="#length">length</a> <a href="#random">random</a> <a href="#substr">substr</a> 
+  <a href="#qstr">qstr</a> <a href="#param">Param</a>  <a href="#OffsetDate">OffsetDate</a> <a href="#sqldate">SQLDate</a> 
+  <a href="#dbdate">DBDate</a>  <a href="#dbtimestamp">DBTimeStamp</a>
+  <a href="#binddate">BindDate</a>  <a href="#bindtimestamp">BindTimeStamp</a>
+  <br>
+  Blobs: <a href="#updateblob">UpdateBlob</a> <a href="#updateclob">UpdateClob</a> 
+  <a href="#updateblobfile">UpdateBlobFile</a> <a href="#blobencode">BlobEncode</a> 
+  <a href="#blobdecode">BlobDecode</a><br>
+  Paging/Scrolling: <a href="#pageexecute">PageExecute</a> <a href="#cachepageexecute">CachePageExecute</a><br>
+  Cleanup: <a href="#cacheflush">CacheFlush</a> <a href="#Close">Close</a><br>
+  Transactions: <a href="#starttrans">StartTrans</a> <a href="#completetrans">CompleteTrans</a> 
+  <a href="#failtrans">FailTrans</a> <a href="#hasfailedtrans">HasFailedTrans</a> 
+  <a href="#begintrans">BeginTrans</a> <a href="#committrans">CommitTrans</a> 
+  <a href="#rollbacktrans">RollbackTrans</a> <a href=#SetTransactionMode>SetTransactionMode</a><br>
+  Fetching Data: </font> <font size="2"><a href="#setfetchmode">SetFetchMode</a><br>
+  Strings: <a href="#concat">concat</a> <a href="#length">length</a>  <a href="#qstr">qstr</a> <a href="#quote">quote</a> <a href="#substr">substr</a><br>
+  Dates: <a href="#dbdate">DBDate</a> <a href="#dbtimestamp">DBTimeStamp</a> <a href="#unixdate">UnixDate</a> 
+  <a href="#binddate">BindDate</a>  <a href="#bindtimestamp">BindTimeStamp</a>
+  <a href="#unixtimestamp">UnixTimeStamp</a> <a href="#OffsetDate">OffsetDate</a> 
+  <a href="#SQLDate">SQLDate</a> <br>
+  Row Management: <a href="#affected_rows">Affected_Rows</a> <a href="#inserted_id">Insert_ID</a>  <a href="#rowlock">RowLock</a>
+  <a href="#genid">GenID</a> <a href="#createseq">CreateSequence</a> <a href="#dropseq">DropSequence</a> 
+  <br>
+  Error Handling: <a href="#errormsg">ErrorMsg</a> <a href="#errorno">ErrorNo</a> 
+  <a href="#metaerror">MetaError</a> <a href="#metaerrormsg">MetaErrorMsg</a> <a href="#ignoreerrors">IgnoreErrors</a><br>
+  Data Dictionary (metadata): <a href="#metadatabases">MetaDatabases</a> <a href="#metatables">MetaTables</a> 
+  <a href="#metacolumns">MetaColumns</a> <a href="#metacolumnames">MetaColumnNames</a> 
+  <a href="#metaprimarykeys">MetaPrimaryKeys</a> <a href="#metaforeignkeys">MetaForeignKeys</a> 
+  <a href="#serverinfo">ServerInfo</a> <br>
+  Statistics and Query-Rewriting: <a href="#logsql">LogSQL</a> <a href="#fnexecute">fnExecute 
+  and fnCacheExecute</a><br>
+  </font><font size="2">Deprecated: <a href="#bind">Bind</a> <a href="#blankrecordset">BlankRecordSet</a>
+  <a href="#parameter">Parameter</a></font>
+  <a href="#adorecordSet"><b><br>
+  ADORecordSet</b></a><br>
+  <font size="2">
+  Returns one field: <a href="#fields">Fields</a><br>
+ Returns one row:<a href="#fetchrow">FetchRow</a> <a href="#fetchinto">FetchInto</a> 
+  <a href="#fetchobject">FetchObject</a> <a href="#fetchnextobject">FetchNextObject</a> 
+  <a href="#fetchobj">FetchObj</a> <a href="#fetchnextobj">FetchNextObj</a>
+ <a href="#getrowassoc">GetRowAssoc</a> <br>
+  Returns all rows:<a href="#getarray">GetArray</a> <a href="#getrows">GetRows</a> 
+  <a href="#getassoc">GetAssoc</a><br>
+  Scrolling:<a href="#move">Move</a> <a href="#movenext">MoveNext</a> <a href="#movefirst">MoveFirst</a> 
+  <a href="#movelast">MoveLast</a> <a href="#abspos">AbsolutePosition</a> <a href="#currentrow">CurrentRow</a> 
+  <a href="#atfirstpage">AtFirstPage</a> <a href="#atlastpage">AtLastPage</a> 
+  <a href="#absolutepage">AbsolutePage</a> </font> <font size="2"><br>
+  Menu generation:<a href="#getmenu">GetMenu</a> <a href="#getmenu2">GetMenu2</a><br>
+  Dates:<a href="#userdate">UserDate</a> <a href="#usertimestamp">UserTimeStamp</a> 
+  <a href="#unixdate">UnixDate</a> <a href="#unixtimestamp">UnixTimeStamp<br>
+  </a>Recordset Info:<a href="#recordcount">RecordCount</a> <a href="#po_recordcount">PO_RecordCount</a> 
+  <a href="#nextrecordset">NextRecordSet</a><br>
+  Field Info:<a href="#fieldcount">FieldCount</a> <a href="#fetchfield">FetchField</a> 
+  <a href="#metatype">MetaType</a><br>
+  Cleanup: <a href="#rsclose">Close</a></font>  
+</p>
+<p><font size="2"><a href="#rs2html"><b>rs2html</b></a>&nbsp; <a href="#exrs2html">example</a></font><br>
+  <a href="#adodiff">Differences between ADOdb and ADO</a><br>
+  <a href="#driverguide"><b>Database Driver Guide<br>
+  </b></a><b><a href="#changes">Change Log</a></b><br>
+</p>
+<h2>Introduction<a name="intro"></a></h2>
+<p>PHP's database access functions are not standardised. This creates a need for 
+  a database class library to hide the differences between the different database 
+  API's (encapsulate the differences) so we can easily switch databases. PHP 4.0.5 or later
+  is now required (because we use array-based str_replace).</p>
+<p>We currently support MySQL, Oracle, Microsoft SQL Server, Sybase, Sybase SQL Anywhere, Informix, 
+  PostgreSQL, FrontBase,  SQLite, Interbase (Firebird and Borland variants), Foxpro, Access, ADO, DB2, SAP DB and ODBC. 
+  We have had successful reports of connecting to Progress and CacheLite via ODBC. We hope more people 
+  will contribute drivers to support other databases.</p>
+<p>PHP4 supports session variables. You can store your session information using 
+  ADOdb for true portability and scalability. See adodb-session.php for more information.</p>
+<p>Also read <a href="http://phplens.com/lens/adodb/tips_portable_sql.htm">tips_portable_sql.htm</a> 
+ for tips on writing 
+  portable SQL.</p>
+<h2>Unique Features of ADOdb<a name="features"></a></h2>
+<ul>
+  <li><b>Easy for Windows programmers</b> to adapt to because many of the conventions 
+	are similar to Microsoft's ADO.</li>
+  <li>Unlike other PHP database classes which focus only on select statements, 
+	<b>we provide support code to handle inserts and updates which can be adapted 
+	to multiple databases quickly.</b> Methods are provided for date handling, 
+	string concatenation and string quoting characters for differing databases.</li>
+  <li>A<b> metatype system </b>is built in so that we can figure out that types 
+	such as CHAR, TEXT and STRING are equivalent in different databases.</li>
+  <li><b>Easy to port</b> because all the database dependant code are stored in 
+	stub functions. You do not need to port the core logic of the classes.</li>
+  <li><b>Portable table and index creation</b> with the <a href="docs-datadict.htm">datadict</a> classes.
+  </li><li><b>Database performance monitoring and SQL tuning</b> with the <a href="docs-perf.htm">performance monitoring</a> classes.
+  </li><li><b>Database-backed sessions</b> with the <a href="docs-session.htm">session management</a> classes. Supports session expiry notification.
+<li><b>Object-Relational Mapping</b> using <a href="docs-active-record.htm">ADOdb_Active_Record</a> classes.
+</li></ul>
+<h2>How People are using ADOdb<a name="users"></a></h2>
+Here are some examples of how people are using ADOdb (for a much longer list, 
+visit <a href="http://phplens.com/phpeverywhere/adodb-cool-apps">adodb-cool-apps</a>): 
+<ul>
+<li><a href="http://phplens.com/">PhpLens</a> is a commercial data grid
+component that allows both cool Web designers and serious unshaved
+programmers to develop and maintain databases on the Web easily.
+Developed by the author of ADOdb.<p>
+
+</p></li><li><a href="http://www.interakt.ro/phakt/">PHAkt: PHP Extension for DreamWeaver Ultradev</a> allows you to script PHP in the popular Web page editor. Database handling provided by ADOdb.<p>
+
+</p></li><li><a href="http://www.andrew.cmu.edu/%7Erdanyliw/snort/snortacid.html">Analysis Console for Intrusion Databases</a>
+(ACID): PHP-based analysis engine to search and process a database of
+security incidents generated by security-related software such as IDSes
+and firewalls (e.g. Snort, ipchains). By Roman Danyliw.<p>
+
+</p></li><li><a href="http://www.postnuke.com/">PostNuke</a> is a very
+popular free content management system and weblog system. It offers
+full CSS support, HTML 4.01 transitional compliance throughout, an
+advanced blocks system, and is fully multi-lingual enabled. <p>
+
+</p></li><li><a href="http://www.auto-net.no/easypublish.php?page=index&amp;lang_id=2">EasyPublish CMS</a>
+is another free content management system for managing information and
+integrated modules on your internet, intranet- and extranet-sites. From
+Norway.<p>
+
+</p></li><li><a href="http://nola.noguska.com/">NOLA</a> is a full featured accounting, inventory, and job tracking application. It is licensed under the GPL, and developed by Noguska.
+</li></ul><p>
+
+</p><h2>Feature Requests and Bug Reports<a name="bugs"></a></h2>
+<p>Feature requests and bug reports can be emailed to <a href="mailto:jlim#natsoft.com.my">jlim#natsoft.com.my</a> 
+  or posted to the ADOdb Help forums at <a href="http://phplens.com/lens/lensforum/topics.php?id=4">http://phplens.com/lens/lensforum/topics.php?id=4</a>.</p>
+<h2>Installation Guide<a name="install"></a></h2>
+<p>Make sure you are running PHP 4.0.5 or later. 
+  Unpack all the files into a directory accessible by your webserver.</p>
+<p>To test, try modifying some of the tutorial examples. Make sure you customize 
+  the connection settings correctly. You can debug using <i>$db-&gt;debug = true</i> as shown below:</p>
+<pre>&lt;?php<br>	include('adodb/adodb.inc.php');<br>	$db = <a href="#adonewconnection">ADONewConnection</a>($dbdriver); # eg 'mysql' or 'postgres'<br>	$db-&gt;debug = true;<br>	$db-&gt;<a href="#connect">Connect</a>($server, $user, $password, $database);<br>	$rs = $db-&gt;<a href="#execute">Execute</a>('select * from some_small_table');<br>	print "&lt;pre&gt;";<br>	print_r($rs-&gt;<a href="#getrows">GetRows</a>());<br>	print "&lt;/pre&gt;";<br>?&gt;</pre>
+
+ <h3>Minimum Install<a name="mininstall"></a></h3>
+<p>For developers who want to release a minimal install of ADOdb, you will need:
+</p><ul>
+<li>adodb.inc.php
+</li><li>adodb-lib.inc.php
+</li><li>adodb-time.inc.php
+</li><li>drivers/adodb-$database.inc.php
+</li><li>license.txt (for legal reasons)
+</li><li>adodb-php4.inc.php 
+</li><li>adodb-iterator.inc.php  (php5 functionality)
+</li></ul>
+Optional:
+<ul>
+<li>adodb-error.inc.php and lang/adodb-$lang.inc.php (if you use MetaError())
+</li><li>adodb-csvlib.inc.php (if you use cached recordsets - CacheExecute(), etc)
+</li><li>adodb-exceptions.inc.php and adodb-errorhandler.inc.php (if you use adodb error handler or php5 exceptions).
+<li>adodb-active-record.inc.php if you use <a href=docs-active-record.htm>Active Records</a>.
+</li></ul>
+
+<h3>Code Initialization Examples<a name="coding"></a></h3>
+<p>When running ADOdb, at least two files are loaded. First is adodb/adodb.inc.php, 
+ which contains all functions used by all database classes. The code specific 
+ to a particular database is in the adodb/driver/adodb-????.inc.php file.</p>
+ <a name="adonewconnection"></a>
+<p>For example, to connect to a mysql database:</p>
+<pre>include('/path/to/set/here/adodb.inc.php');<br>$conn = &amp;ADONewConnection('mysql');<br></pre>
+<p>Whenever you need to connect to a database, you create a Connection object 
+  using the <b>ADONewConnection</b>($driver) function. 
+  <b>NewADOConnection</b>($driver) is an alternative name for the same function.</p>
+
+<p>At this point, you are not connected to the database (no longer true if you pass in a <a href="#dsnsupport">dsn</a>). You will first need to decide
+whether to use <i>persistent</i> or <i>non-persistent</i> connections. The advantage of <i>persistent</i>
+connections is that they are faster, as the database connection is never closed (even 
+when you call Close()). <i>Non-persistent </i>connections take up much fewer resources though,
+reducing the risk of your database and your web-server becoming overloaded. 
+</p><p>For persistent connections,
+use $conn-&gt;<a href="#pconnect">PConnect()</a>,
+ or $conn-&gt;<a href="#connect">Connect()</a> for non-persistent connections.
+Some database drivers also support <a href="#nconnect">NConnect()</a>, which forces 
+the creation of a new connection. 
+
+<a name="connection_gotcha"></a>
+</p><p><b>Connection Gotcha</b>:  If you create two connections, but both use the same userid and password,
+PHP will share the same connection. This can cause problems if the connections are meant to 
+different databases. The solution is to always use different userid's for different databases,
+ or use NConnect().
+
+ <a name="dsnsupport"></a>
+ </p><h3>Data Source Name (DSN) Support</h3>
+ <p> Since ADOdb 4.51, you can connect to a database by passing a dsn to NewADOConnection() (or ADONewConnection, which is
+ the same function). The dsn format is:
+</p><pre>	$driver://$username:$password@hostname/$database?options[=value]<br></pre><p>
+NewADOConnection() calls Connect() or PConnect() internally for you. If the connection fails, false is returned.
+</p><pre>	<font color="#008000"># non-persistent connection</font>
+	$dsn = 'mysql://root:pwd@localhost/mydb'; 
+	$db = NewADOConnection($dsn);
+	if (!$db) die("Connection failed");   
+	
+	<font color="#008000"># no need to call connect/pconnect!</font>
+	$arr = $db-&gt;GetArray("select * from table");
+	
+	<font color="#008000"># persistent connection</font>
+	$dsn2 = 'mysql://root:pwd@localhost/mydb?persist'; 
+</pre>
+<p>
+If you have special characters such as /:?_ in your dsn, then you need to rawurlencode them first:
+</p><pre>	$pwd = rawurlencode($pwd);<br>	$dsn = "mysql://root:$pwd@localhost/mydb";
+	$dsn2=rawurlencode("sybase_ase")."://user:pass@host/path?query";<br></pre>
+<p>
+Legal options are:
+</p><p>
+<table align="center" border="1"><tbody><tr><td>For all drivers</td><td>
+	'persist', 'persistent', 'debug', 'fetchmode', 'new'
+	</td></tr><tr><td>Interbase/Firebird
+	</td><td>
+					 'dialect','charset','buffers','role'
+	</td></tr><tr><td>M'soft ADO</td><td>
+					 'charpage'
+					
+		</td></tr><tr><td>MySQL</td><td>
+					'clientflags'
+</td></tr><tr><td>MySQLi</td><td>
+	'port', 'socket', 'clientflags'
+</td></tr><tr><td>Oci8</td><td>
+ 'nls_date_format','charset'
+</td></tr></tbody></table>
+</p><p>
+For all drivers, when the options <i>persist</i> or <i>persistent</i> are set,  a persistent connection is forced; similarly, when <i>new</i> is set, then
+a new connection will be created using NConnect if the underlying driver supports it. 
+The <i>debug</i> option enables debugging. The <i>fetchmode</i> calls <a href="#setfetchmode">SetFetchMode()</a>.
+If no value is defined for an option, then the value is set to 1.
+</p><p>
+ADOdb DSN's are compatible with version 1.0 of PEAR DB's DSN format.
+<a name="connect_ex">
+</a></p><h3><a name="connect_ex">Examples of Connecting to Databases</a></h3>
+<h4><a name="connect_ex">MySQL and Most Other Database Drivers</a></h4>
+<p><a name="connect_ex">MySQL connections are very straightforward, and the parameters are identical 
+  to mysql_connect:</a></p>
+<pre><a name="connect_ex">	$conn = &amp;ADONewConnection('mysql'); <br>	$conn-&gt;PConnect('localhost','userid','password','database');<br>	<br>	<font color="#008000"># or dsn </font>
+	$dsn = 'mysql://user:pwd@localhost/mydb'; 
+	$conn = ADONewConnection($dsn);  # no need for Connect()
+	
+	<font color="#008000"># or persistent dsn</font>
+	$dsn = 'mysql://user:pwd@localhost/mydb?persist'; 
+	$conn = ADONewConnection($dsn);  # no need for PConnect()
+	
+	<font color="#008000"># a more complex example:</font>
+	$pwd = urlencode($pwd);
+	$flags =  MYSQL_CLIENT_COMPRESS;
+	$dsn = "mysql://user:$pwd@localhost/mydb?persist&amp;clientflags=$flags";
+	$conn = ADONewConnection($dsn);  # no need for PConnect()
+ </a></pre>
+<p><a name="connect_ex"> For most drivers, you can use the standard function: Connect($server, $user, $password, $database), or
+a </a><a href="dsnsupport">DSN</a> since ADOdb 4.51. Exceptions to this are listed below.
+</p>
+<a name=pdo>
+<h4>PDO</h4>
+<p>PDO, which only works with PHP5, accepts a driver specific connection string:
+<pre>
+	$conn =& NewADConnection('pdo');
+	$conn->Connect('mysql:host=localhost',$user,$pwd,$mydb);
+	$conn->Connect('mysql:host=localhost;dbname=mydb',$user,$pwd);
+	$conn->Connect("mysql:host=localhost;dbname=mydb;username=$user;password=$pwd");
+</pre>
+<p>The DSN mechanism is also supported:
+<pre>
+	$conn =& NewADConnection("pdo_mysql://user:pwd@localhost/mydb?persist"); # persist is optional
+</pre>
+<h4>PostgreSQL</h4>
+<p>PostgreSQL 7 and 8 accepts connections using: </p>
+<p>a. the standard connection string:</p>
+<pre>	$conn = &amp;ADONewConnection('postgres');  <br>	$conn-&gt;PConnect('host=localhost port=5432 dbname=mary');</pre>
+<p> b. the classical 4 parameters:</p>
+ <pre>	$conn-&gt;PConnect('localhost','userid','password','database');<br> </pre>
+<p>c. dsn:
+</p><pre>	$dsn = 'postgres://user:pwd@localhost/mydb?persist';  # persist is optional
+	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect<br></pre>
+<a name="ldap"></a>
+
+ <h4>LDAP</h4>
+  <p>Here is an example of querying a LDAP server. Thanks to Josh Eldridge for the driver and this example:
+</p><pre>
+require('/path/to/adodb.inc.php');
+
+/* Make sure to set this BEFORE calling Connect() */
+$LDAP_CONNECT_OPTIONS = Array(
+	Array ("OPTION_NAME"=>LDAP_OPT_DEREF, "OPTION_VALUE"=>2),
+	Array ("OPTION_NAME"=>LDAP_OPT_SIZELIMIT,"OPTION_VALUE"=>100),
+	Array ("OPTION_NAME"=>LDAP_OPT_TIMELIMIT,"OPTION_VALUE"=>30),
+	Array ("OPTION_NAME"=>LDAP_OPT_PROTOCOL_VERSION,"OPTION_VALUE"=>3),
+	Array ("OPTION_NAME"=>LDAP_OPT_ERROR_NUMBER,"OPTION_VALUE"=>13),
+	Array ("OPTION_NAME"=>LDAP_OPT_REFERRALS,"OPTION_VALUE"=>FALSE),
+	Array ("OPTION_NAME"=>LDAP_OPT_RESTART,"OPTION_VALUE"=>FALSE)
+);
+$host = 'ldap.baylor.edu';
+$ldapbase = 'ou=People,o=Baylor University,c=US';
+
+$ldap = NewADOConnection( 'ldap' );
+$ldap->Connect( $host, $user_name='', $password='', $ldapbase );
+
+echo "&lt;pre>";
+
+print_r( $ldap->ServerInfo() );
+$ldap->SetFetchMode(ADODB_FETCH_ASSOC);
+$userName = 'eldridge';
+$filter="(|(CN=$userName*)(sn=$userName*)(givenname=$userName*)(uid=$userName*))";
+
+$rs = $ldap->Execute( $filter );
+if ($rs)
+	while ($arr = $rs->FetchRow()) {
+	     print_r($arr);	
+	}
+
+$rs = $ldap->Execute( $filter );
+if ($rs) 
+	while (!$rs->EOF) {
+ 		print_r($rs->fields);	
+		$rs->MoveNext();
+	} 
+	
+print_r( $ldap->GetArray( $filter ) );
+print_r( $ldap->GetRow( $filter ) );
+
+$ldap->Close();
+echo "&lt;/pre>";
+</pre>
+<p>Using DSN:
+<pre>
+$dsn = "ldap://ldap.baylor.edu/ou=People,o=Baylor University,c=US";
+$db = NewADOConnection($dsn);
+</pre>
+<h4>Interbase/Firebird</h4>
+You define the database in the $host parameter:
+<pre>	$conn = &amp;ADONewConnection('ibase'); <br>	$conn-&gt;PConnect('localhost:c:\ibase\employee.gdb','sysdba','masterkey');<br></pre>
+<p>Or dsn:
+</p><pre>	$dsn = 'firebird://user:pwd@localhost/mydb?persist&amp;dialect=3';  # persist is optional<br>	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect<br></pre>
+<h4>SQLite</h4>
+Sqlite will create the database file if it does not exist.
+<pre>	$conn = &amp;ADONewConnection('sqlite');
+	$conn-&gt;PConnect('c:\path\to\sqlite.db'); # sqlite will create if does not exist<br></pre>
+<p>Or dsn:
+</p><pre>	$path = urlencode('c:\path\to\sqlite.db');
+	$dsn = "sqlite://$path/?persist";  # persist is optional
+	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect<br></pre>
+<h4>Oracle (oci8)</h4>
+<p>With oci8, you can connect in multiple ways. Note that oci8 works fine with 
+newer versions of the Oracle, eg. 9i and 10g.</p>
+<p>a. PHP and Oracle reside on the same machine, use default SID.</p>
+<pre>	$conn-&gt;Connect(false, 'scott', 'tiger');</pre>
+<p>b. TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS'</p>
+<pre>	$conn-&gt;PConnect(false, 'scott', 'tiger', 'myTNS');</pre>
+<p>or</p>
+<pre> 	$conn-&gt;PConnect('myTNS', 'scott', 'tiger');</pre>
+<p>c. Host Address and SID</p>
+<pre>
+	$conn->connectSID = true;
+	$conn-&gt;Connect('192.168.0.1', 'scott', 'tiger', 'SID');</pre>
+<p>d. Host Address and Service Name</p>
+<pre>	$conn-&gt;Connect('192.168.0.1', 'scott', 'tiger', 'servicename');</pre>
+<p>e. Oracle connection string:
+</p><pre>	$cstr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port))<br>			(CONNECT_DATA=(SID=$sid)))";<br>	$conn-&gt;Connect($cstr, 'scott', 'tiger');<br></pre>
+<p>f. ADOdb dsn:
+</p><pre>	$dsn = 'oci8://user:pwd@tnsname/?persist';  # persist is optional<br>	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect<br>	<br>	$dsn = 'oci8://user:pwd@host/sid';<br>	$conn = ADONewConnection($dsn);<br>	<br>	$dsn = 'oci8://user:pwd@/';   # oracle on local machine<br>	$conn = ADONewConnection($dsn);<br></pre>
+<p>You can also set the charSet for Oracle 9.2 and later, supported since PHP 4.3.2, ADOdb 4.54:
+</p><pre>	$conn-&gt;charSet = 'we8iso8859p1';<br>	$conn-&gt;Connect(...);<br>	<br>	# or<br>	$dsn = 'oci8://user:pwd@tnsname/?charset=WE8MSWIN1252';<br>	$db = ADONewConnection($dsn);<br></pre>
+<a name="dsnless"></a>
+<h4>DSN-less ODBC ( Access, MSSQL and DB2 examples)</h4>
+<p>ODBC DSN's can be created in the ODBC control panel, or you can use a DSN-less 
+  connection.To use DSN-less connections with ODBC you need PHP 4.3 or later. 
+</p>
+<p>For Microsoft Access:</p>
+<pre>	$db =&amp; ADONewConnection('access');<br>	$dsn = <strong>"Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\\northwind.mdb;Uid=Admin;Pwd=;";</strong>
+	$db-&gt;Connect($dsn);
+</pre>
+For Microsoft SQL Server: 
+<pre>	$db =&amp; ADONewConnection('odbc_mssql');<br>	$dsn = <strong>"Driver={SQL Server};Server=localhost;Database=northwind;"</strong>;<br>	$db-&gt;Connect($dsn,'userid','password');<br></pre>
+or if you prefer to use the mssql extension (which is limited to mssql 6.5 functionality):
+<pre>	$db =&amp; ADONewConnection('mssql');<br>	$db-&gt;Execute('localhost', 'userid', 'password', 'northwind');<br></pre>
+For DB2:
+<pre>
+	$dbms = 'db2'; # or 'odbc_db2' if db2 extension not available
+	$db =&amp; ADONewConnection($dbms);
+	$dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP;".
+				"uid=root; pwd=secret";<br>	$db-&gt;Connect($dsn);
+</pre>
+<b>DSN-less Connections with ADO</b><br>
+If you are using versions of PHP earlier than PHP 4.3.0, DSN-less connections 
+only work with Microsoft's ADO, which is Microsoft's COM based API. An example 
+using the ADOdb library and Microsoft's ADO: 
+<pre>&lt;?php<br>	include('adodb.inc.php'); <br>	$db = &amp;ADONewConnection("ado_mssql");<br>	print "&lt;h1&gt;Connecting DSN-less $db-&gt;databaseType...&lt;/h1&gt;";<br>		<br>	<b>$myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};"<br>		. "SERVER=flipper;DATABASE=ai;UID=sa;PWD=;"  ;</b>
+	$db-&gt;Connect($myDSN);
+	
+	$rs = $db-&gt;Execute("select * from table");
+	$arr = $rs-&gt;GetArray();
+	print_r($arr);
+?&gt;
+</pre><a name="speed"></a>
+<h2>High Speed ADOdb - tuning tips</h2>
+<p>ADOdb is a big class library, yet it <a href="http://phplens.com/lens/adodb/">consistently beats</a> all other PHP class 
+  libraries in performance. This is because it is designed in a layered fashion, 
+  like an onion, with the fastest functions in the innermost layer. Stick to the 
+  following functions for best performance:</p>
+<table align="center" border="1" width="40%">
+  <tbody><tr>
+    <td><div align="center"><b>Innermost Layer</b></div></td>
+  </tr>
+  <tr> 
+    <td><p align="center">Connect, PConnect, NConnect<br>
+        Execute, CacheExecute<br>
+        SelectLimit, CacheSelectLimit<br>
+        MoveNext, Close <br>
+		qstr, Affected_Rows, Insert_ID</p></td>
+  </tr>
+</tbody></table>
+<p>The fastest way to access the field data is by accessing the array $recordset-&gt;fields 
+  directly. Also set the global variables <a href="#adodb_fetch_mode">$ADODB_FETCH_MODE</a> 
+  = ADODB_FETCH_NUM, and (for oci8, ibase/firebird and odbc) <a href="#adodb_countrecs">$ADODB_COUNTRECS</a> = false 
+  before you connect to your database.</p>
+<p>Consider using bind parameters if your database supports it, as it improves 
+  query plan reuse. Use ADOdb's performance tuning system to identify bottlenecks 
+  quickly. At the time of writing (Dec 2003), this means oci8 and odbc drivers.</p>
+ <p>Lastly make sure you have a PHP accelerator cache installed such as APC, Turck 
+  MMCache, Zend Accelerator or ionCube.</p>
+ <p>Some examples:</p>
+ <table align="center" border="1"><tbody><tr><td><b>Fastest data retrieval using PHP</b></td><td><b>Fastest data retrieval using ADOdb extension</b></td></tr>
+<tr><td>
+<pre>$rs =&amp; $rs-&gt;Execute($sql);<br>while (!$rs-&gt;EOF) {<br>	var_dump($rs-&gt;fields);<br>	$rs-&gt;MoveNext();<br>}</pre></td><td>
+<pre>$rs =&amp; $rs-&gt;Execute($sql);<br>$array = adodb_getall($rs);<br>var_dump($array);<br><br><br></pre></td></tr></tbody></table>
+ <p><b>Advanced Tips</b>
+ </p><p>If you have the <a href="http://adodb.sourceforge.net/#extension">ADOdb C extension</a> installed, 
+ you can replace your calls to $rs-&gt;MoveNext() with adodb_movenext($rs). 
+ This doubles the speed of this operation. For retrieving entire recordsets at once,
+use GetArray(), which uses the high speed extension function adodb_getall($rs) internally.
+ </p><p>Execute() is the default way to run queries. You can use the low-level functions _Execute() and _query()
+to reduce query overhead.  Both these functions share the same parameters as Execute().
+</p><p>If you do not have any bind parameters or your database supports
+binding (without emulation),
+then you can call _Execute() directly. Calling this function bypasses
+bind emulation. Debugging is still supported in _Execute().
+</p><p>If you do not require debugging facilities nor emulated
+binding, and do not require a recordset to be returned, then you can
+call _query. This is great for inserts, updates and deletes. Calling
+this function
+bypasses emulated binding, debugging, and recordset handling. Either
+the resultid, true or false are returned by _query(). </p><p>For Informix, you can disable scrollable cursors with $db-&gt;cursorType = 0.
+</p><p><a name="hack"></a> </p>
+<h2>Hacking ADOdb Safely</h2>
+<p>You might want to modify ADOdb for your own purposes. Luckily you can
+still maintain backward compatibility by sub-classing ADOdb and using the $ADODB_NEWCONNECTION
+variable. $ADODB_NEWCONNECTION allows you to override the behaviour of ADONewConnection().
+ADOConnection() checks for this variable and will call
+the function-name stored in this variable if it is defined.
+</p><p>In the following example, new functionality for the connection object 
+is placed in the <i>hack_mysql</i> and <i>hack_postgres7</i> classes. The recordset class naming convention
+can be controlled using $rsPrefix. Here we set it to 'hack_rs_', which will make ADOdb use
+<i>hack_rs_mysql</i> and <i>hack_rs_postgres7</i> as the recordset classes.
+
+
+</p><pre>class hack_mysql extends adodb_mysql {<br>var $rsPrefix = 'hack_rs_';<br>  /* Your mods here */<br>}<br><br>class hack_rs_mysql extends ADORecordSet_mysql {<br>	 /* Your mods here */<br>}<br><br>class hack_postgres7 extends adodb_postgres7 {<br>var $rsPrefix = 'hack_rs_';<br>  /* Your mods here */<br>}<br><br>class hack_rs_postgres7 extends ADORecordSet_postgres7 {<br> /* Your mods here */<br>}<br><br>$ADODB_NEWCONNECTION = 'hack_factory';<br><br>function&amp; hack_factory($driver)<br>{<br>	if ($driver !== 'mysql' &amp;&amp; $driver !== 'postgres7') return false;<br>	<br>	$driver = 'hack_'.$driver;<br>	$obj = new $driver();<br>	return $obj;<br>}<br><br>include_once('adodb.inc.php');<br></pre>
+<p></p><p>Don't forget to call the constructor of the parent class in
+your constructor. If you want to use the default ADOdb drivers return
+false in the above hack_factory() function.
+<a name="php5"></a>
+</p><h2>PHP5 Features</h2>
+ ADOdb 4.02 or later will transparently determine which version of PHP you are using.
+If PHP5 is detected, the following features become available:
+<ul>
+
+<li><b>PDO</b>: PDO drivers are available. See the <a href=#pdo>connection examples</a>. Currently PDO drivers are
+ not as powerful as native drivers, and should be treated as experimental.<br><br>
+<a name="php5iterators"></a>
+<li><b>Foreach iterators</b>: This is a very natural way of going through a recordset:
+<pre>	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;<br>	$rs = $db-&gt;Execute($sql);<br>	foreach($rs as $k =&gt; $row) {<br>		echo "r1=".$row[0]." r2=".$row[1]."&lt;br&gt;";<br>	}<br></pre>
+<p>
+<a name="php5exceptions"></a>
+</p></li><li><b>Exceptions</b>: Just include <i>adodb-exceptions.inc.php</i> and you can now 
+catch exceptions on errors as they occur.
+<pre>	<b>include("../adodb-exceptions.inc.php");</b> <br>	include("../adodb.inc.php");	 <br>	try { <br>		$db = NewADOConnection("oci8"); <br>		$db-&gt;Connect('','scott','bad-password'); <br>	} catch (exception $e) { <br>		var_dump($e); <br>		adodb_backtrace($e-&gt;gettrace());<br>	} <br></pre>
+<p>Note that reaching EOF is <b>not</b> considered an error nor an exception.
+</p></li></ul> 
+<h3><a name="drivers"></a>Databases Supported</h3>
+The <i>name</i> below is the value you pass to NewADOConnection($name) to create a  connection object for that database.
+<p>
+</p><p> 
+</p><table border="1" width="100%">
+  <tbody><tr valign="top"> 
+    <td><b>Name</b></td>
+    <td><b>Tested</b></td>
+    <td><b>Database</b></td>
+    <td><b><font size="2">RecordCount() usable</font></b></td>
+    <td><b>Prerequisites</b></td>
+    <td><b>Operating Systems</b></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">access</font></b></td>
+    <td><font size="2">B</font></td>
+    <td><font size="2">Microsoft Access/Jet. You need to create an ODBC DSN.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">ODBC </font></td>
+    <td><font size="2">Windows only</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">ado</font></b></td>
+    <td><font size="2">B</font></td>
+    <td><p><font size="2">Generic ADO, not tuned for specific databases. Allows 
+        DSN-less connections. For best performance, use an OLEDB provider. This 
+        is the base class for all ado drivers.</font></p>
+      <p><font size="2">You can set $db-&gt;codePage before connecting.</font></p></td>
+    <td><font size="2">? depends on database</font></td>
+    <td><font size="2">ADO or OLEDB provider</font></td>
+    <td><font size="2">Windows only</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">ado_access</font></b></td>
+    <td><font size="2">B</font></td>
+    <td><font size="2">Microsoft Access/Jet using ADO. Allows DSN-less connections. 
+      For best performance, use an OLEDB provider.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">ADO or OLEDB provider</font></td>
+    <td><font size="2">Windows only</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">ado_mssql</font></b></td>
+    <td><font size="2">B</font></td>
+    <td><font size="2">Microsoft SQL Server using ADO. Allows DSN-less connections. 
+      For best performance, use an OLEDB provider.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">ADO or OLEDB provider</font></td>
+    <td><font size="2">Windows only</font></td>
+  </tr>
+    <tr valign="top"> 
+    <td height="54"><b><font size="2">db2</font></b></td>
+    <td height="54"><font size="2">C</font></td>
+    <td height="54"><font size="2">Uses PHP's db2-specific extension for better performance.</font></td>
+    <td height="54"><font size="2">Y/N</font></td>
+    <td height="54"><font size="2">DB2 CLI/ODBC interface</font></td>
+    <td height="54"> <p><font size="2">Unix and Windows. Requires IBM DB2 Universal Database client.</font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td height="54"><b><font size="2">odbc_db2</font></b></td>
+    <td height="54"><font size="2">C</font></td>
+    <td height="54"><font size="2">Connects to DB2 using generic ODBC extension.</font></td>
+    <td height="54"><font size="2">Y/N</font></td>
+    <td height="54"><font size="2">DB2 CLI/ODBC interface</font></td>
+    <td height="54"> <p><font size="2">Unix and Windows. <a href="http://www.faqts.com/knowledge_base/view.phtml/aid/6283/fid/14">Unix 
+        install hints</a>. I have had reports that the $host and $database params have to be reversed in Connect() when using the CLI interface.</font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">vfp</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">Microsoft Visual FoxPro. You need to create an ODBC DSN.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">ODBC</font></td>
+    <td><font size="2">Windows only</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">fbsql</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">FrontBase. </font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">?</font></td>
+    <td> <p><font size="2">Unix and Windows</font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">ibase</font></b></td>
+    <td><font size="2">B</font></td>
+    <td><font size="2">Interbase 6 or earlier. Some users report you might need 
+      to use this<br>
+      $db-&gt;PConnect('localhost:c:/ibase/employee.gdb', "sysdba", "masterkey") 
+      to connect. Lacks Affected_Rows currently.<br>
+      <br>
+      You can set $db-&gt;role, $db-&gt;dialect, $db-&gt;buffers and $db-&gt;charSet before connecting.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Interbase client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><i><font size="2">firebird</font></i></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Firebird version of interbase.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Interbase client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><i><font size="2">borland_ibase</font></i></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Borland version of Interbase 6.5 or later. Very sad that 
+      the forks differ.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Interbase client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+
+  <tr valign="top"> 
+    <td><b><font size="2">informix</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Generic informix driver. Use this if you are using Informix 7.3 or later.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Informix client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">informix72</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2"> Informix databases before Informix 7.3 that do no support 
+      SELECT FIRST.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Informix client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">ldap</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">LDAP driver. See this example for usage information.</font></td>
+    <td>&nbsp;</td>
+    <td><font size="2">LDAP extension</font></td>
+    <td><font size="2">?</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td height="73"><b><font size="2">mssql</font></b></td>
+    <td height="73"><font size="2">A</font></td>
+    <td height="73"> <p><font size="2">Microsoft SQL Server 7 and later. Works 
+        with Microsoft SQL Server 2000 also. Note that date formating is problematic 
+        with this driver. For example, the PHP mssql extension does not return 
+        the seconds for datetime!</font></p></td>
+    <td height="73"><font size="2">Y/N</font></td>
+    <td height="73"><font size="2">Mssql client</font></td>
+    <td height="73"> <p><font size="2">Unix and Windows. <br>
+        <a href="http://phpbuilder.com/columns/alberto20000919.php3">Unix install 
+        howto</a> and <a href="http://linuxjournal.com/article.php?sid=6636&amp;mode=thread&amp;order=0">another 
+        one</a>. </font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td height="73"><b><font size="2">mssqlpo</font></b></td>
+    <td height="73"><font size="2">A</font></td>
+    <td height="73"> <p><font size="2">Portable mssql driver. Identical to above 
+        mssql driver, except that '||', the concatenation operator, is converted 
+        to '+'. Useful for porting scripts from most other sql variants that use 
+        ||.</font></p></td>
+    <td height="73"><font size="2">Y/N</font></td>
+    <td height="73"><font size="2">Mssql client</font></td>
+    <td height="73"> <p><font size="2">Unix and Windows. <a href="http://phpbuilder.com/columns/alberto20000919.php3"><br>
+        Unix install howto</a>.</font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">mysql</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">MySQL without transaction support. You can also set $db-&gt;clientFlags 
+      before connecting.</font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">MySQL client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><font size="2"><b>mysqlt</b> or <b>maxsql</b></font></td>
+    <td><font size="2">A</font></td>
+    <td> <p><font size="2">MySQL with transaction support. We recommend using 
+        || as the concat operator for best portability. This can be done by running 
+        MySQL using: <br>
+        <i>mysqld --ansi</i> or <i>mysqld --sql-mode=PIPES_AS_CONCAT</i></font></p></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">MySQL client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">oci8</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">Oracle 8/9. Has more functionality than <i>oracle</i> driver 
+      (eg. Affected_Rows). You might have to putenv('ORACLE_HOME=...') before 
+      Connect/PConnect. </font> <p><font size="2"> There are 2 ways of connecting 
+        - with server IP and service name: <br>
+        <i>PConnect('serverip:1521','scott','tiger','service'</i>)<br>
+        or using an entry in TNSNAMES.ORA or ONAMES or HOSTNAMES: <br>
+        <i>PConnect(false, 'scott', 'tiger', $oraname)</i>. </font> 
+      </p><p><font size="2">Since 2.31, we support Oracle REF cursor variables directly 
+        (see <a href="#executecursor">ExecuteCursor</a>).</font> </p></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Oracle client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">oci805</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Supports reduced Oracle functionality for Oracle 8.0.5. 
+      SelectLimit is not as efficient as in the oci8 or oci8po drivers.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Oracle client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">oci8po</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">Oracle 8/9 portable driver. This is nearly identical with 
+      the oci8 driver except (a) bind variables in Prepare() use the ? convention, 
+      instead of :bindvar, (b) field names use the more common PHP convention 
+      of lowercase names. </font> <p><font size="2">Use this driver if porting 
+        from other databases is important. Otherwise the oci8 driver offers better 
+        performance. </font> </p></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Oracle client</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">odbc</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">Generic ODBC, not tuned for specific databases. To connect, 
+      use <br>
+      PConnect('DSN','user','pwd'). This is the base class for all odbc derived 
+      drivers.</font></td>
+    <td><font size="2">? depends on database</font></td>
+    <td><font size="2">ODBC</font></td>
+    <td><font size="2">Unix and Windows. <a href="http://phpbuilder.com/columns/alberto20000919.php3?page=4">Unix 
+      hints.</a></font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">odbc_mssql</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Uses ODBC to connect to MSSQL</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">ODBC</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">odbc_oracle</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Uses ODBC to connect to Oracle</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">ODBC</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+    
+  <tr valign="top"> 
+    <td><b><font size="2">odbtp</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Generic odbtp driver. <a href="http://odbtp.sourceforge.net/">Odbtp</a> is a software for
+	accessing Windows ODBC data sources from other operating systems.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">odbtp</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">odbtp_unicode</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Odtbp with unicode support</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">odbtp</font></td>
+    <td><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td height="34"><b><font size="2">oracle</font></b></td>
+    <td height="34"><font size="2">C</font></td>
+    <td height="34"><font size="2">Implements old Oracle 7 client API. Use oci8 
+      driver if possible for better performance.</font></td>
+    <td height="34"><font size="2">Y/N</font></td>
+    <td height="34"><font size="2">Oracle client</font></td>
+    <td height="34"><font size="2">Unix and Windows</font></td>
+  </tr>
+  <tr valign="top"> 
+    <td height="34"><b><font size="2">netezza</font></b></td>
+    <td height="34"><font size="2">C</font></td>
+    <td height="34"><font size="2">Netezza driver. Netezza is based on postgres code-base.</font></td>
+    <td height="34"><font size="2">Y</font></td>
+    <td height="34"><font size="2">?</font></td>
+    <td height="34"><font size="2">?</font></td>
+  </tr>
+     <tr valign="top"> 
+    <td><b><font size="2">pdo</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Generic PDO driver for PHP5. </font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">PDO extension and database specific drivers</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">postgres</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">Generic PostgreSQL driver. Currently identical to postgres7 
+      driver.</font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">PostgreSQL client</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">postgres64</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">For PostgreSQL 6.4 and earlier which does not support LIMIT 
+      internally.</font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">PostgreSQL client</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">postgres7</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">PostgreSQL which supports LIMIT and other version 7 functionality.</font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">PostgreSQL client</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+    <tr valign="top"> 
+    <td><b><font size="2">postgres8</font></b></td>
+    <td><font size="2">A</font></td>
+    <td><font size="2">PostgreSQL which supports version 8 functionality.</font></td>
+    <td><font size="2">Y</font></td>
+    <td><font size="2">PostgreSQL client</font></td>
+    <td><font size="2">Unix and Windows. </font></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">sapdb</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">SAP DB. Should work reliably as based on ODBC driver.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">SAP ODBC client</font></td>
+    <td> <p><font size="2">?</font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td><b><font size="2">sqlanywhere</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Sybase SQL Anywhere. Should work reliably as based on ODBC 
+      driver.</font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">SQL Anywhere ODBC client</font></td>
+    <td> <p><font size="2">?</font></p></td>
+  </tr>
+  <tr valign="top"> 
+    <td height="54"><b><font size="2">sqlite</font></b></td>
+    <td height="54"><font size="2">B</font></td>
+    <td height="54"><font size="2">SQLite.</font></td>
+    <td height="54"><font size="2">Y</font></td>
+    <td height="54"><font size="2">-</font></td>
+    <td height="54"> <p><font size="2">Unix and Windows.</font></p></td>
+  </tr>
+    <tr valign="top"> 
+    <td height="54"><b><font size="2">sqlitepo</font></b></td>
+    <td height="54"><font size="2">B</font></td>
+    <td height="54"><font size="2">Portable SQLite driver.  This is because assoc mode does not work like other drivers in sqlite.
+   Namely, when selecting (joining) multiple tables, the table
+   	  names are included in the assoc keys in the "sqlite" driver.</font><p>
+<font size="2">	  In "sqlitepo" driver, the table names are stripped from the returned column names. 
+	  When this results in a conflict,  the first field get preference.
+	  </font></p></td>
+    <td height="54"><font size="2">Y</font></td>
+    <td height="54"><font size="2">-</font></td>
+    <td height="54"> <p><font size="2">Unix and Windows.</font></p></td>
+  </tr>
+ 
+	  
+  <tr valign="top"> 
+    <td><b><font size="2">sybase</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Sybase. </font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Sybase client</font></td>
+    <td> <p><font size="2">Unix and Windows.</font></p></td>
+  </tr>
+  
+    <tr valign="top"> 
+    <td><b><font size="2">sybase_ase</font></b></td>
+    <td><font size="2">C</font></td>
+    <td><font size="2">Sybase ASE. </font></td>
+    <td><font size="2">Y/N</font></td>
+    <td><font size="2">Sybase client</font></td>
+    <td> <p><font size="2">Unix and Windows.</font></p></td>
+  </tr>
+  </tbody></table>
+
+<p></p><p>The "Tested" column indicates how extensively the code has been tested 
+  and used. <br>
+  A = well tested and used by many people<br>
+  B = tested and usable, but some features might not be implemented<br>
+  C = user contributed or experimental driver. Might not fully support all of 
+  the latest features of ADOdb. </p>
+<p>The column "RecordCount() usable" indicates whether RecordCount() 
+  return the number of rows, or returns -1 when a SELECT statement is executed. 
+  If this column displays Y/N then the RecordCount() is emulated when the global 
+  variable $ADODB_COUNTRECS=true (this is the default). Note that for large recordsets, 
+  it might be better to disable RecordCount() emulation because substantial amounts 
+  of memory are required to cache the recordset for counting. Also there is a 
+  speed penalty of 40-50% if emulation is required. This is emulated in most databases 
+  except for PostgreSQL and MySQL. This variable is checked every time a query 
+  is executed, so you can selectively choose which recordsets to count.</p>
+<p> 
+</p><hr />
+<h1>Tutorials<a name="quickstart"></a></h1>
+<h3>Example 1: Select Statement<a name="ex1"></a></h3>
+<p>Task: Connect to the Access Northwind DSN, display the first 2 columns of each 
+  row.</p>
+<p>In this example, we create a ADOConnection object, which represents the connection 
+  to the database. The connection is initiated with <a href="#pconnect"><font face="Courier New, Courier, mono">PConnect</font></a>, 
+  which is a persistent connection. Whenever we want to query the database, we 
+  call the <font face="Courier New, Courier, mono">ADOConnection.<a href="#execute">Execute</a>()</font> 
+  function. This returns an ADORecordSet object which is actually a cursor that 
+  holds the current row in the array <font face="Courier New, Courier, mono">fields[]</font>. 
+  We use <font face="Courier New, Courier, mono"><a href="#movenext">MoveNext</a>()</font> 
+  to move from row to row.</p>
+<p>NB: A useful function that is not used in this example is <font face="Courier New, Courier, mono"><a href="#selectlimit">SelectLimit</a></font>, 
+  which allows us to limit the number of rows shown. 
+</p><pre>&lt;?<br><font face="Courier New, Courier, mono"><b>include</b>('adodb.inc.php');	   # load code common to ADOdb<br>$<font color="#660000">conn</font> = &amp;ADONewConnection('access');	# create a connection<br>$<font color="#660000">conn</font>-&gt;PConnect('northwind');   # connect to MS-Access, northwind DSN<br>$<font color="#660000">recordSet</font> = &amp;$<font color="#660000">conn</font>-&gt;Execute('select * from products');<br>if (!$<font color="#660000">recordSet</font>) <br>	print $<font color="#660000">conn</font>-&gt;ErrorMsg();<br>else<br><b>while</b> (!$<font color="#660000">recordSet</font>-&gt;EOF) {<br>	<b>print</b> $<font color="#660000">recordSet</font>-&gt;fields[0].' '.$<font color="#660000">recordSet</font>-&gt;fields[1].'&lt;BR&gt;';<br>	$<font color="#660000">recordSet</font>-&gt;MoveNext();<br>}</font><font face="Courier New, Courier, mono">
+
+$<font color="#660000">recordSet</font>-&gt;Close(); # optional<br>$<font color="#660000">conn</font>-&gt;Close(); # optional<br></font>
+?&gt;
+</pre>
+<p>The $<font face="Courier New, Courier, mono">recordSet</font> returned stores 
+  the current row in the <font face="Courier New, Courier, mono">$recordSet-&gt;fields</font> 
+  array, indexed by column number (starting from zero). We use the <font face="Courier New, Courier, mono"><a href="#movenext">MoveNext</a>()</font> 
+  function to move to the next row. The <font face="Courier New, Courier, mono">EOF</font> 
+  property is set to true when end-of-file is reached. If an error occurs in Execute(), 
+  we return false instead of a recordset.</p>
+<p>The <code>$recordSet-&gt;fields[]</code> array is generated by the PHP database 
+  extension. Some database extensions only index by number and do not index the 
+  array by field name. To force indexing by name - that is associative arrays 
+  - use the SetFetchMode function. Each recordset saves and uses whatever fetch 
+  mode was set when the recordset was created in Execute() or SelectLimit(). 
+</p><pre>	$db-&gt;SetFetchMode(ADODB_FETCH_NUM);<br>	$rs1 = $db-&gt;Execute('select * from table');<br>	$db-&gt;SetFetchMode(ADODB_FETCH_ASSOC);<br>	$rs2 = $db-&gt;Execute('select * from table');<br>	print_r($rs1-&gt;fields); # shows <i>array([0]=&gt;'v0',[1] =&gt;'v1')</i>
+	print_r($rs2-&gt;fields); # shows <i>array(['col1']=&gt;'v0',['col2'] =&gt;'v1')</i>
+</pre>
+<p> </p>
+<p>To get the number of rows in the select statement, you can use <font face="Courier New, Courier, mono">$recordSet-&gt;<a href="#recordcount">RecordCount</a>()</font>. 
+  Note that it can return -1 if the number of rows returned cannot be determined.</p>
+<h3>Example 2: Advanced Select with Field Objects<a name="ex2"></a></h3>
+<p>Select a table, display the first two columns. If the second column is a date 
+  or timestamp, reformat the date to US format.</p>
+<pre>&lt;?<br><font face="Courier New, Courier, mono"><b>include</b>('adodb.inc.php');	   # load code common to ADOdb<br>$<font color="#660000">conn</font> = &amp;ADONewConnection('access');	# create a connection<br>$<font color="#660000">conn</font>-&gt;PConnect('northwind');   # connect to MS-Access, northwind dsn<br>$<font color="#660000">recordSet</font> = &amp;$<font color="#660000">conn</font>-&gt;Execute('select CustomerID,OrderDate from Orders');<br>if (!$<font color="#660000">recordSet</font>) <br>	print $<font color="#660000">conn</font>-&gt;ErrorMsg();<br>else<br><b>while</b> (!$<font color="#660000">recordSet</font>-&gt;EOF) {<br>	$<font color="#660000">fld</font> = <font color="#336600"><b>$</b><font color="#660000">recordSet</font><b>-&gt;FetchField</b></font><font color="#006600">(</font>1<font color="#006600">);</font>
+	$<font color="#660000">type</font> = <font color="#336600"><b>$</b><font color="#660000">recordSet</font><b>-&gt;MetaType</b></font>($fld-&gt;type);<br><br>	<b>if</b> ( $<font color="#660000">type</font> == 'D' || $<font color="#660000">type</font> == 'T') <br>		<b>print</b> $<font color="#660000">recordSet</font>-&gt;fields[0].' '.<br>			<b><font color="#336600">$</font></b><font color="#660000">recordSet</font><b><font color="#336600">-&gt;UserDate</font></b>($<font color="#660000">recordSet</font>-&gt;fields[1],'<b>m/d/Y</b>').'&lt;BR&gt;';<br>	<b>else </b>
+		<b>print</b> $<font color="#660000">recordSet</font>-&gt;fields[0].' '.$<font color="#660000">recordSet</font>-&gt;fields[1].'&lt;BR&gt;';<br><br>	$<font color="#660000">recordSet</font>-&gt;MoveNext();<br>}</font><font face="Courier New, Courier, mono">
+$<font color="#660000">recordSet</font>-&gt;Close(); # optional<br>$<font color="#660000">conn</font>-&gt;Close(); # optional<br></font>
+?&gt;
+</pre>
+<p>In this example, we check the field type of the second column using <font face="Courier New, Courier, mono"><a href="#fetchfield">FetchField</a>().</font> 
+  This returns an object with at least 3 fields.</p>
+<ul>
+  <li><b>name</b>: name of column</li>
+  <li> <b>type</b>: native field type of column</li>
+  <li> <b>max_length</b>: maximum length of field. Some databases such as MySQL 
+    do not return the maximum length of the field correctly. In these cases max_length 
+    will be set to -1.</li>
+</ul>
+<p>We then use <font face="Courier New, Courier, mono"><a href="#metatype">MetaType</a>()</font> 
+  to translate the native type to a <i>generic</i> type. Currently the following 
+  <i>generic</i> types are defined:</p>
+<ul>
+  <li><b>C</b>: character fields that should be shown in a &lt;input type="text"&gt; 
+    tag.</li>
+  <li><b>X</b>: TeXt, large text fields that should be shown in a &lt;textarea&gt;</li>
+  <li><b>B</b>: Blobs, or Binary Large Objects. Typically images. 
+  </li><li><b>D</b>: Date field</li>
+  <li><b>T</b>: Timestamp field</li>
+  <li><b>L</b>: Logical field (boolean or bit-field)</li>
+  <li><b>I</b>:&nbsp; Integer field</li>
+  <li><b>N</b>: Numeric field. Includes autoincrement, numeric, floating point, 
+    real and integer. </li>
+  <li><b>R</b>: Serial field. Includes serial, autoincrement integers. This works 
+    for selected databases. </li>
+</ul>
+<p>If the metatype is of type date or timestamp, then we print it using the user 
+  defined date format with <font face="Courier New, Courier, mono"><a href="#userdate">UserDate</a>(),</font> 
+  which converts the PHP SQL date string format to a user defined one. Another 
+  use for <font face="Courier New, Courier, mono"><a href="#metatype">MetaType</a>()</font> 
+  is data validation before doing an SQL insert or update.</p>
+<h3>Example 3: Inserting<a name="ex3"></a></h3>
+<p>Insert a row to the Orders table containing dates and strings that need to 
+  be quoted before they can be accepted by the database, eg: the single-quote 
+  in the word <i>John's</i>.</p>
+<pre>&lt;?<br><b>include</b>('adodb.inc.php');	   # load code common to ADOdb<br>$<font color="#660000">conn</font> = &amp;ADONewConnection('access');	# create a connection<br><br>$<font color="#660000">conn</font>-&gt;PConnect('northwind');   # connect to MS-Access, northwind dsn<br>$<font color="#660000">shipto</font> = <font color="#006600"><b>$conn-&gt;qstr</b></font>("<i>John's Old Shoppe</i>");<br><br>$<font color="#660000">sql</font> = "insert into orders (customerID,EmployeeID,OrderDate,ShipName) ";<br>$<font color="#660000">sql</font> .= "values ('ANATR',2,".<b><font color="#006600">$conn-&gt;DBDate(</font>time()<font color="#006600">)</font></b><font color="#006600">.</font>",$<font color="#660000">shipto</font>)";<br><br><b>if</b> ($<font color="#660000">conn</font>-&gt;Execute($<font color="#660000">sql</font>) <font color="#336600"><b>=== false</b></font>) {<br>	<b>print</b> 'error inserting: '.<font color="#336600"><b>$conn-&gt;ErrorMsg()</b></font>.'&lt;BR&gt;';<br>}<br>?&gt;<br></pre>
+<p>In this example, we see the advanced date and quote handling facilities of 
+  ADOdb. The unix timestamp (which is a long integer) is appropriately formated 
+  for Access with <font face="Courier New, Courier, mono"><a href="#dbdate">DBDate</a>()</font>, 
+  and the right escape character is used for quoting the <i>John's Old Shoppe</i>, 
+  which is<b> </b><i>John'<b>'</b>s Old Shoppe</i> and not PHP's default <i>John<b>'</b>s 
+  Old Shoppe</i> with <font face="Courier New, Courier, mono"><a href="#qstr">qstr</a>()</font>. 
+</p>
+<p>Observe the error-handling of the Execute statement. False is returned by<font face="Courier New, Courier, mono"> 
+  <a href="#execute">Execute</a>() </font>if an error occured. The error message 
+  for the last error that occurred is displayed in <font face="Courier New, Courier, mono"><a href="#errormsg">ErrorMsg</a>()</font>. 
+  Note: <i>php_track_errors</i> might have to be enabled for error messages to 
+  be saved.</p>
+<h3> Example 4: Debugging<a name="ex4"></a></h3>
+<pre>&lt;?<br><b>include</b>('adodb.inc.php');	   # load code common to ADOdb<br>$<font color="#663300">conn</font> = &amp;ADONewConnection('access');	# create a connection<br>$<font color="#663300">conn</font>-&gt;PConnect('northwind');   # connect to MS-Access, northwind dsn<br><font>$<font color="#663300">shipto</font> = <b>$conn-&gt;qstr</b>("John's Old Shoppe");<br>$<font color="#663300">sql</font> = "insert into orders (customerID,EmployeeID,OrderDate,ShipName) ";<br>$<font color="#663300">sql</font> .= "values ('ANATR',2,".$<font color="#663300">conn</font>-&gt;FormatDate(time()).",$shipto)";<br><b><font color="#336600">$<font color="#663300">conn</font>-&gt;debug = true;</font></b>
+<b>if</b> ($<font color="#663300">conn</font>-&gt;Execute($sql) <b>=== false</b>) <b>print</b> 'error inserting';</font>
+?&gt;
+</pre>
+<p>In the above example, we have turned on debugging by setting <b>debug = true</b>. 
+  This will display the SQL statement before execution, and also show any error 
+  messages. There is no need to call <font face="Courier New, Courier, mono"><a href="#errormsg">ErrorMsg</a>()</font> 
+  in this case. For displaying the recordset, see the <font face="Courier New, Courier, mono"><a href="#exrs2html">rs2html</a>() 
+  </font>example.</p>
+<p>Also see the section on <a href="#errorhandling">Custom Error Handlers</a>.</p>
+<h3>Example 5: MySQL and Menus<a name="ex5"></a></h3>
+<p>Connect to MySQL database <i>agora</i>, and generate a &lt;select&gt; menu 
+  from an SQL statement where the &lt;option&gt; captions are in the 1st column, 
+  and the value to send back to the server is in the 2nd column.</p>
+<pre>&lt;?<br><b>include</b>('adodb.inc.php'); # load code common to ADOdb<br>$<font color="#663300">conn</font> = &amp;ADONewConnection('mysql');  # create a connection<br>$<font color="#663300">conn</font>-&gt;PConnect('localhost','userid','','agora');# connect to MySQL, agora db<br><font>$<font color="#663300">sql</font> = 'select CustomerName, CustomerID from customers';<br>$<font color="#663300">rs</font> = $<font color="#663300">conn</font>-&gt;Execute($sql);<br><b>print</b> <b><font color="#336600">$<font color="#663300">rs</font>-&gt;GetMenu('GetCust','Mary Rosli');<br>?&gt;</font></b></font></pre>
+<p>Here we define a menu named GetCust, with the menu option 'Mary Rosli' selected. 
+  See <a href="#getmenu"><font face="Courier New, Courier, mono">GetMenu</font></a><font face="Courier New, Courier, mono">()</font>. 
+  We also have functions that return the recordset as an array: <font face="Courier New, Courier, mono"><a href="#getarray">GetArray</a>()</font>, 
+  and as an associative array with the key being the first column: <a href="#getassoc1">GetAssoc</a>().</p>
+<h3>Example 6: Connecting to 2 Databases At Once<a name="ex6"></a></h3>
+<pre>&lt;?<br><b>include</b>('adodb.inc.php');	 # load code common to ADOdb<br>$<font color="#663300">conn1</font> = &amp;ADONewConnection('mysql');  # create a mysql connection<br>$<font color="#663300">conn2</font> = &amp;ADONewConnection('oracle');  # create a oracle connection<br><br>$conn1-&gt;PConnect($server, $userid, $password, $database);<br>$conn2-&gt;PConnect(false, $ora_userid, $ora_pwd, $oraname);<br><br>$conn1-&gt;Execute('insert ...');<br>$conn2-&gt;Execute('update ...');<br>?&gt;</pre>
+<p> 
+</p><h3>Example 7: Generating Update and Insert SQL<a name="ex7"></a></h3>
+<p>Since ADOdb 4.56, we support <a href="reference.functions.getupdatesql.html#autoexecute">AutoExecute()</a>, 
+which simplifies things by providing an advanced wrapper for GetInsertSQL() and GetUpdateSQL(). For example,
+an INSERT can be carried out with:
+
+<pre>
+    $record["firstname"] = "Bob"; 
+    $record["lastname"] = "Smith"; 
+    $record["created"] = time(); 
+    $insertSQL = $conn->AutoExecute($rs, $record, 'INSERT'); 
+</pre>
+
+and an UPDATE with:
+<pre>
+    $record["firstname"] = "Caroline"; 
+    $record["lastname"] = "Smith"; # Update Caroline's lastname from Miranda to Smith 
+    $insertSQL = $conn->AutoExecute($rs, $record, 'UPDATE', 'id = 1'); 
+</pre>
+<p>
+The rest of this section is out-of-date:
+<p>ADOdb 1.31 and later supports two new recordset functions: GetUpdateSQL( ) and 
+GetInsertSQL( ). This allow you to perform a "SELECT * FROM table query WHERE...", 
+make a copy of the $rs-&gt;fields, modify the fields, and then generate the SQL to 
+update or insert into the table automatically. 
+<p> We show how the functions can be used when accessing a table with the following 
+  fields: (ID, FirstName, LastName, Created). 
+</p><p> Before these functions can be called, you need to initialize the recordset 
+  by performing a select on the table. Idea and code by Jonathan Younger jyounger#unilab.com. 
+ Since ADOdb 2.42, you can pass a  table name instead of a recordset into 
+GetInsertSQL (in $rs), and it will generate an insert statement for that table.
+</p><p> 
+</p><pre>&lt;?<br>#==============================================<br># SAMPLE GetUpdateSQL() and GetInsertSQL() code<br>#==============================================<br>include('adodb.inc.php');<br>include('tohtml.inc.php');<br><br>#==========================<br># This code tests an insert<br><br>$sql = "SELECT * FROM ADOXYZ WHERE id = -1"; <br># Select an empty record from the database<br><br>$conn = &amp;ADONewConnection("mysql");  # create a connection<br>$conn-&gt;debug=1;<br>$conn-&gt;PConnect("localhost", "admin", "", "test"); # connect to MySQL, testdb<br>$rs = $conn-&gt;Execute($sql); # Execute the query and get the empty recordset<br><br>$record = array(); # Initialize an array to hold the record data to insert<br><br># Set the values for the fields in the record<br># Note that field names are case-insensitive<br>$record["firstname"] = "Bob";<br>$record["lastNamE"] = "Smith";<br>$record["creaTed"] = time();<br><br># Pass the empty recordset and the array containing the data to insert<br># into the GetInsertSQL function. The function will process the data and return<br># a fully formatted insert sql statement.<br>$insertSQL = $conn-&gt;GetInsertSQL($rs, $record);<br><br>$conn-&gt;Execute($insertSQL); # Insert the record into the database<br><br>#==========================<br># This code tests an update<br><br>$sql = "SELECT * FROM ADOXYZ WHERE id = 1"; <br># Select a record to update<br><br>$rs = $conn-&gt;Execute($sql); # Execute the query and get the existing record to update<br><br>$record = array(); # Initialize an array to hold the record data to update<br><br># Set the values for the fields in the record<br># Note that field names are case-insensitive<br>$record["firstname"] = "Caroline";<br>$record["LasTnAme"] = "Smith"; # Update Caroline's lastname from Miranda to Smith<br><br># Pass the single record recordset and the array containing the data to update<br># into the GetUpdateSQL function. The function will process the data and return<br># a fully formatted update sql statement with the correct WHERE clause.<br># If the data has not changed, no recordset is returned<br>$updateSQL = $conn-&gt;GetUpdateSQL($rs, $record);<br><br>$conn-&gt;Execute($updateSQL); # Update the record in the database<br>$conn-&gt;Close();<br>?&gt;<br></pre>
+<a name="ADODB_FORCE_TYPE"></a>
+<b>$ADODB_FORCE_TYPE</b><p>
+The behaviour of AutoExecute(), GetUpdateSQL() and GetInsertSQL()  
+when converting empty or null PHP variables to SQL is controlled by the
+ global $ADODB_FORCE_TYPE variable. Set it to one of the values below. Default
+  is ADODB_FORCE_VALUE (3):
+</p><pre>0 = ignore empty fields. All empty fields in array are ignored.<br>1 = force null. All empty, php null and string 'null' fields are changed to sql NULL values.<br>2 = force empty. All empty, php null and string 'null' fields are changed to sql empty '' or 0 values.<br>3 = force value. Value is left as it is. Php null and string 'null' are set to sql NULL values and <br>    empty fields '' are set to empty '' sql values.<br><br>define('ADODB_FORCE_IGNORE',0);<br>define('ADODB_FORCE_NULL',1);<br>define('ADODB_FORCE_EMPTY',2);<br>define('ADODB_FORCE_VALUE',3);<br></pre>
+<p>
+Thanks to Niko (nuko#mbnet.fi) for the $ADODB_FORCE_TYPE code.
+</p><p>
+Note: the constant ADODB_FORCE_NULLS is obsolete since 4.52 and is ignored. Set $ADODB_FORCE_TYPE = ADODB_FORCE_NULL
+for equivalent behaviour.
+<p>Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called.
+</p><h3>Example 8: Implementing Scrolling with Next and Previous<a name="ex8"></a></h3>
+<p> The following code creates a very simple recordset pager, where you can scroll 
+  from page to page of a recordset.</p>
+<pre>include_once('../adodb.inc.php');<br>include_once('../adodb-pager.inc.php');<br>session_start();<br><br>$db = NewADOConnection('mysql');<br><br>$db-&gt;Connect('localhost','root','','xphplens');<br><br>$sql = "select * from adoxyz ";<br><br>$pager = new ADODB_Pager($db,$sql);<br>$pager-&gt;Render($rows_per_page=5);</pre>
+<p>This will create a basic record pager that looks like this: <a name="scr"></a> 
+</p><p> 
+<table bgcolor="beige" border="1">
+  <tbody><tr> 
+    <td> <a href="#scr"><code>|&lt;</code></a> &nbsp; <a href="#scr"><code>&lt;&lt;</code></a> 
+      &nbsp; <a href="#scr"><code>&gt;&gt;</code></a> &nbsp; <a href="#scr"><code>&gt;|</code></a> 
+      &nbsp; </td>
+  </tr>
+  <tr>
+    <td><table bgcolor="white" border="1" cols="4" width="100%">
+        <tbody><tr><th>ID</th>
+        <th>First Name</th>
+        <th>Last Name</th>
+        <th>Date Created</th>
+        </tr><tr> 
+          <td align="right">36&nbsp;</td>
+          <td>Alan&nbsp;</td>
+          <td>Turing&nbsp;</td>
+          <td>Sat 06, Oct 2001&nbsp;</td>
+        </tr>
+        <tr> 
+          <td align="right">37&nbsp;</td>
+          <td>Serena&nbsp;</td>
+          <td>Williams&nbsp;</td>
+          <td>Sat 06, Oct 2001&nbsp;</td>
+        </tr>
+        <tr> 
+          <td align="right">38&nbsp;</td>
+          <td>Yat Sun&nbsp;</td>
+          <td>Sun&nbsp;</td>
+          <td>Sat 06, Oct 2001&nbsp;</td>
+        </tr>
+        <tr> 
+          <td align="right">39&nbsp;</td>
+          <td>Wai Hun&nbsp;</td>
+          <td>See&nbsp;</td>
+          <td>Sat 06, Oct 2001&nbsp;</td>
+        </tr>
+        <tr> 
+          <td align="right">40&nbsp;</td>
+          <td>Steven&nbsp;</td>
+          <td>Oey&nbsp;</td>
+          <td>Sat 06, Oct 2001&nbsp;</td>
+        </tr>
+      </tbody></table></td>
+  </tr>
+  <tr>
+    <td><font size="-1">Page 8/10</font></td>
+  </tr>
+</tbody></table>
+</p><p>The number of rows to display at one time is controled by the Render($rows) 
+  method. If you do not pass any value to Render(), ADODB_Pager will default to 
+  10 records per page. 
+</p><p>You can control the column titles by modifying your SQL (supported by most 
+  databases): 
+</p><pre>$sql = 'select id as "ID", firstname as "First Name", <br>		  lastname as "Last Name", created as "Date Created" <br>		from adoxyz';</pre>
+<p>The above code can be found in the <i>adodb/tests/testpaging.php</i> example 
+  included with this release, and the class ADODB_Pager in <i>adodb/adodb-pager.inc.php</i>. 
+  The ADODB_Pager code can be adapted by a programmer so that the text links can 
+  be replaced by images, and the dull white background be replaced with more interesting 
+  colors. 
+</p><p>You can also allow display of html by setting $pager-&gt;htmlSpecialChars = false. 
+</p><p>Some of the code used here was contributed by Iv&aacute;n Oliva and Cornel 
+  G. </p>
+<h3><a name="ex9"></a>Example 9: Exporting in CSV or Tab-Delimited Format</h3>
+<p>We provide some helper functions to export in comma-separated-value (CSV) and 
+  tab-delimited formats:</p>
+<pre><b>include_once('/path/to/adodb/toexport.inc.php');</b><br>include_once('/path/to/adodb/adodb.inc.php');<br>
+$db = &amp;NewADOConnection('mysql');<br>$db-&gt;Connect($server, $userid, $password, $database);<br><br>$rs = $db-&gt;Execute('select fname as "First Name", surname as "Surname" from table');<br><br>print "&lt;pre&gt;";<br>print <b>rs2csv</b>($rs); # return a string, CSV format<p>print '&lt;hr&gt;';<br><br>$rs-&gt;MoveFirst(); # note, some databases do not support MoveFirst<br>print <b>rs2tab</b>($rs,<i>false</i>); # return a string, tab-delimited<br>						 # false == suppress field names in first line</p>print '&lt;hr&gt;';<br>$rs-&gt;MoveFirst();<br><b>rs2tabout</b>($rs); # send to stdout directly (there is also an rs2csvout function)<br>print "&lt;/pre&gt;";<br><br>$rs-&gt;MoveFirst();<br>$fp = fopen($path, "w");<br>if ($fp) {<br>  <b>rs2csvfile</b>($rs, $fp); # write to file (there is also an rs2tabfile function)<br>  fclose($fp);<br>}<br></pre>
+<p> Carriage-returns or newlines are converted to spaces. Field names are returned 
+  in the first line of text. Strings containing the delimiter character are quoted 
+  with double-quotes. Double-quotes are double-quoted again. This conforms to 
+  Excel import and export guide-lines. 
+</p><p>All the above functions take as an optional last parameter, $addtitles which 
+  defaults to <i>true</i>. When set to <i>false</i> field names in the first line 
+  are suppressed. <br>
+</p><h3>Example 10: Recordset Filters<a name="ex10"></a></h3>
+<p>Sometimes we want to pre-process all rows in a recordset before we use it. 
+  For example, we want to ucwords all text in recordset. 
+</p><pre>include_once('adodb/rsfilter.inc.php');<br>include_once('adodb/adodb.inc.php');<br><br>// ucwords() every element in the recordset<br>function do_ucwords(&amp;$arr,$rs)<br>{<br>	foreach($arr as $k =&gt; $v) {<br>		$arr[$k] = ucwords($v);<br>	}<br>}<br><br>$db = NewADOConnection('mysql');<br>$db-&gt;PConnect('server','user','pwd','db');<br><br>$rs = $db-&gt;Execute('select ... from table');<br>$rs = <b>RSFilter</b>($rs,'do_ucwords');<br></pre>
+<p>The <i>RSFilter</i> function takes 2 parameters, the recordset, and the name 
+  of the <i>filter</i> function. It returns the processed recordset scrolled to 
+  the first record. The <i>filter</i> function takes two parameters, the current 
+  row as an array, and the recordset object. For future compatibility, you should 
+  not use the original recordset object. </p>
+<h3>Example 11:<a name="ex11"></a> Smart Transactions</h3>
+The old way of doing transactions required you to use 
+<pre>$conn-&gt;<b>BeginTrans</b>();<br>$ok = $conn-&gt;Execute($sql);<br>if ($ok) $ok = $conn-&gt;Execute($sql2);<br>if (!$ok) $conn-&gt;<b>RollbackTrans</b>();<br>else $conn-&gt;<b>CommitTrans</b>();<br></pre>
+This is very complicated for large projects because you have to track the error 
+status. Smart Transactions is much simpler. You start a smart transaction by calling 
+StartTrans(): 
+<pre>$conn-&gt;<b>StartTrans</b>();<br>$conn-&gt;Execute($sql);<br>$conn-&gt;Execute($Sql2);<br>$conn-&gt;<b>CompleteTrans</b>();<br></pre>
+CompleteTrans() detects when an SQL error occurs, and will Rollback/Commit as 
+appropriate. To specificly force a rollback even if no error occured, use FailTrans(). 
+Note that the rollback is done in CompleteTrans(), and not in FailTrans(). 
+<pre>$conn-&gt;<b>StartTrans</b>();<br>$conn-&gt;Execute($sql);<br>if (!CheckRecords()) $conn-&gt;<strong>FailTrans</strong>();<br>$conn-&gt;Execute($Sql2);<br>$conn-&gt;<b>CompleteTrans</b>();<br></pre>
+<p>You can also check if a transaction has failed, using HasFailedTrans(), which 
+  returns true if FailTrans() was called, or there was an error in the SQL execution. 
+  Make sure you call HasFailedTrans() before you call CompleteTrans(), as it is 
+  only works between StartTrans/CompleteTrans.
+</p><p>Lastly, StartTrans/CompleteTrans is nestable, and only the outermost block 
+  is executed. In contrast, BeginTrans/CommitTrans/RollbackTrans is NOT nestable. 
+</p><pre>$conn-&gt;<strong>StartTrans</strong>();<br>$conn-&gt;Execute($sql);<br>  $conn-&gt;<strong>StartTrans</strong>();    <font color="#006600"># ignored</font>
+  if (!CheckRecords()) $conn-&gt;FailTrans();
+  $conn-&gt;<strong>CompleteTrans</strong>(); <font color="#006600"># ignored</font>
+$conn-&gt;Execute($Sql2);
+$conn-&gt;<strong>CompleteTrans</strong>();<br></pre>
+<p>Note: Savepoints are currently not supported. 
+</p><h2><a name="errorhandling"></a>Using Custom Error Handlers and PEAR_Error</h2>
+<p>ADOdb supports PHP5 exceptions.  Just include <i>adodb-exceptions.inc.php</i> and you can now 
+catch exceptions on errors as they occur.
+</p><pre>	<b>include("../adodb-exceptions.inc.php");</b> <br>	include("../adodb.inc.php");	 <br>	try { <br>		$db = NewADOConnection("oci8://scott:bad-password@mytns/"); <br>	} catch (exception $e) { <br>		var_dump($e); <br>		adodb_backtrace($e-&gt;gettrace());<br>	} <br></pre>
+<p> ADOdb also provides two custom handlers which you can modify for your needs. The 
+  first one is in the <b>adodb-errorhandler.inc.php</b> file. This makes use of 
+  the standard PHP functions <a href="http://php.net/error_reporting">error_reporting</a> 
+  to control what error messages types to display, and <a href="http://php.net/trigger_error">trigger_error</a> 
+  which invokes the default PHP error handler. 
+</p><p> Including the above file will cause <i>trigger_error($errorstring,E_USER_ERROR)</i> 
+  to be called when<br>
+  (a) Connect() or PConnect() fails, or <br>
+  (b) a function that executes SQL statements such as Execute() or SelectLimit() 
+  has an error.<br>
+  (c) GenID() appears to go into an infinite loop. 
+</p><p> The $errorstring is generated by ADOdb and will contain useful debugging information 
+  similar to the error.log data generated below. This file adodb-errorhandler.inc.php 
+  should be included before you create any ADOConnection objects. 
+</p><p> If you define error_reporting(0), no errors will be passed to the error handler. 
+  If you set error_reporting(E_ALL), all errors will be passed to the error handler. 
+  You still need to use <b>ini_set("display_errors", "0" or "1")</b> to control 
+  the display of errors. 
+</p><pre>&lt;?php<br><b>error_reporting(E_ALL); # pass any error messages triggered to error handler<br>include('adodb-errorhandler.inc.php');</b>
+include('adodb.inc.php');
+include('tohtml.inc.php');
+$c = NewADOConnection('mysql');
+$c-&gt;PConnect('localhost','root','','northwind');
+$rs=$c-&gt;Execute('select * from productsz'); #invalid table productsz');
+if ($rs) rs2html($rs);
+?&gt;
+</pre>
+<p> If you want to log the error message, you can do so by defining the following 
+  optional constants ADODB_ERROR_LOG_TYPE and ADODB_ERROR_LOG_DEST. ADODB_ERROR_LOG_TYPE 
+  is the error log message type (see <a href="http://php.net/error_log">error_log</a> 
+  in the PHP manual). In this case we set it to 3, which means log to the file 
+  defined by the constant ADODB_ERROR_LOG_DEST. 
+</p><pre>&lt;?php<br><b>error_reporting(E_ALL); # report all errors<br>ini_set("display_errors", "0"); # but do not echo the errors<br>define('ADODB_ERROR_LOG_TYPE',3);<br>define('ADODB_ERROR_LOG_DEST','C:/errors.log');<br>include('adodb-errorhandler.inc.php');</b>
+include('adodb.inc.php');
+include('tohtml.inc.php');
+
+$c = NewADOConnection('mysql');
+$c-&gt;PConnect('localhost','root','','northwind');
+$rs=$c-&gt;Execute('select * from productsz'); ## invalid table productsz
+if ($rs) rs2html($rs);
+?&gt;
+</pre>
+The following message will be logged in the error.log file: 
+<pre>(2001-10-28 14:20:38) mysql error: [1146: Table 'northwind.productsz' doesn't exist] in<br> EXECUTE("select * from productsz")<br></pre>
+<h3>PEAR_ERROR</h3>
+The second error handler is <b>adodb-errorpear.inc.php</b>. This will create a 
+PEAR_Error derived object whenever an error occurs. The last PEAR_Error object 
+created can be retrieved using ADODB_Pear_Error(). 
+<pre>&lt;?php<br><b>include('adodb-errorpear.inc.php');</b>
+include('adodb.inc.php');
+include('tohtml.inc.php');
+$c = NewADOConnection('mysql');
+$c-&gt;PConnect('localhost','root','','northwind');
+$rs=$c-&gt;Execute('select * from productsz'); #invalid table productsz');
+if ($rs) rs2html($rs);
+else {
+	<b>$e = ADODB_Pear_Error();<br>	echo '&lt;p&gt;',$e-&gt;message,'&lt;/p&gt;';</b>
+}
+?&gt;
+</pre>
+<p> You can use a PEAR_Error derived class by defining the constant ADODB_PEAR_ERROR_CLASS 
+  before the adodb-errorpear.inc.php file is included. For easy debugging, you 
+  can set the default error handler in the beginning of the PHP script to PEAR_ERROR_DIE, 
+  which will cause an error message to be printed, then halt script execution: 
+</p><pre>include('PEAR.php');<br>PEAR::setErrorHandling('PEAR_ERROR_DIE');<br></pre>
+<p> Note that we do not explicitly return a PEAR_Error object to you when an error 
+  occurs. We return false instead. You have to call ADODB_Pear_Error() to get 
+  the last error or use the PEAR_ERROR_DIE technique. 
+</p>
+<h3>MetaError and MetaErrMsg</h3>
+ <p>If you need error messages that work across multiple databases, then use <a href="#metaerror">MetaError()</a>, which returns a virtualized error number, based on PEAR DB's error number system, and <a href=<a href="#metaerrmsg">MetaErrMsg()</a>.
+
+<h4>Error Messages</h4>
+<p>Error messages are outputted using the static method ADOConnnection::outp($msg,$newline=true). 
+  By default, it sends the messages to the client. You can override this to perform 
+  error-logging. 
+</p><h2><a name="dsn"></a> Data Source Names</h2>
+<p>We now support connecting using PEAR style DSN's. A DSN is a connection string 
+  of the form:</p>
+<p>$dsn = <i>"$driver://$username:$password@$hostname/$databasename"</i>;</p>
+<p>An example:</p>
+<pre>   $username = 'root';<br>   $password = '';<br>   $hostname = 'localhost';<br>   $databasename = 'xphplens';<br>   $driver = 'mysql';<br>   $dsn = "$driver://$username:$password@$hostname/$databasename"<br>   $db = NewADOConnection(); <br>   # DB::Connect($dsn) also works if you include 'adodb/adodb-pear.inc.php' at the top<br>   $rs = $db-&gt;query('select firstname,lastname from adoxyz');<br>   $cnt = 0;<br>   while ($arr = $rs-&gt;fetchRow()) {<br>		print_r($arr); print "&lt;br&gt;";<br>   }</pre>
+   <p></p>
+<p>   <a href="#dsnsupport">More info and connection examples</a> on the DSN format.
+
+</p><h2><a name="pear"></a>PEAR Compatibility</h2>
+  We support DSN's (see above), and the following functions:
+ <pre><b> DB_Common</b>
+ 	query - returns PEAR_Error on error
+	limitQuery - return PEAR_Error on error
+	prepare - does not return PEAR_Error on error
+	execute - does not return PEAR_Error on error
+	setFetchMode - supports ASSOC and ORDERED
+	errorNative
+	quote
+	nextID
+	disconnect
+	
+	getOne
+	getAssoc
+	getRow
+	getCol
+	
+<b> DB_Result</b>
+ 	numRows - returns -1 if not supported
+	numCols
+	fetchInto - does not support passing of fetchmode
+	fetchRows - does not support passing of fetchmode
+	free
+</pre>
+<h2><a name="caching"></a>Caching of Recordsets</h2>
+<p>ADOdb now supports caching of recordsets using the CacheExecute( ), CachePageExecute( 
+  ) and CacheSelectLimit( ) functions. There are similar to the non-cache functions, 
+  except that they take a new first parameter, $secs2cache. 
+</p><p> An example: 
+</p><pre><b>include</b>('adodb.inc.php'); # load code common to ADOdb<br>$ADODB_CACHE_DIR = '/usr/ADODB_cache';<br>$<font color="#663300">conn</font> = &amp;ADONewConnection('mysql');  # create a connection<br>$<font color="#663300">conn</font>-&gt;PConnect('localhost','userid','','agora');# connect to MySQL, agora db<br><font>$<font color="#663300">sql</font> = 'select CustomerName, CustomerID from customers';<br>$<font color="#663300">rs</font> = $<font color="#663300">conn</font>-&gt;CacheExecute(15,$sql);</font></pre>
+<p><font> The first parameter is the number of seconds to cache 
+  the query. Subsequent calls to that query will used the cached version stored 
+  in $ADODB_CACHE_DIR. To force a query to execute and flush the cache, call CacheExecute() 
+  with the first parameter set to zero. Alternatively, use the CacheFlush($sql) 
+  call. </font></p>
+<p><font>For the sake of security, we recommend you set <i>register_globals=off</i> 
+  in php.ini if you are using $ADODB_CACHE_DIR.</font></p>
+<p>In ADOdb 1.80 onwards, the secs2cache parameter is optional in CacheSelectLimit() 
+  and CacheExecute(). If you leave it out, it will use the $connection-&gt;cacheSecs 
+  parameter, which defaults to 60 minutes. 
+</p><pre>	$conn-&gt;Connect(...);<br>	$conn-&gt;cacheSecs = 3600*24; # cache 24 hours<br>	$rs = $conn-&gt;CacheExecute('select * from table');<br></pre>
+<p>Please note that magic_quotes_runtime should be turned off. <a href="http://phplens.com/lens/lensforum/msgs.php?LeNs#LensBM_forummsg">More 
+  info</a>, and do not change $ADODB_FETCH_MODE (or SetFetchMode) 
+  as the cached recordset will use the $ADODB_FETCH_MODE set when the query was executed. <font> 
+<h2><a name="pivot"></a>Pivot Tables</h2>
+</font> </p><p><font>Since ADOdb 2.30, we support the generation of 
+SQL to create pivot tables, also known as cross-tabulations. For further explanation 
+read this DevShed <a href="http://www.devshed.com/Server_Side/MySQL/MySQLWiz/">Cross-Tabulation 
+tutorial</a>. We assume that your database supports the SQL case-when expression. </font></p> 
+<font> 
+<p>In this example, we will use the Northwind database from Microsoft. In the 
+  database, we have a products table, and we want to analyze this table by <i>suppliers 
+  versus product categories</i>. We will place the suppliers on each row, and 
+  pivot on categories. So from the table on the left, we generate the pivot-table 
+  on the right:</p>
+</font> 
+<table align="center" border="0" cellpadding="2" cellspacing="2">
+  <tbody><tr>
+	<td>
+	  <table align="center" border="1" cellpadding="2" cellspacing="2" width="142">
+		<tbody><tr> 
+		  <td><i>Supplier</i></td>
+		  <td><i>Category</i></td>
+		</tr>
+		<tr> 
+		  <td>supplier1</td>
+		  <td>category1</td>
+		</tr>
+		<tr> 
+		  <td>supplier2</td>
+		  			<td>category1</td>
+		</tr>
+		<tr> 
+		  			<td>supplier2</td>
+		  <td>category2</td>
+		</tr>
+	  </tbody></table>
+	</td>
+	<td> <font face="Courier New, Courier, mono">--&gt;</font></td>
+	<td>
+	  <table align="center" border="1" cellpadding="2" cellspacing="2">
+		<tbody><tr> 
+		  <td>&nbsp;</td>
+		  <td><i>category1</i></td>
+		  <td><i>category2</i></td>
+		  <td><i>total</i></td>
+		</tr>
+		<tr> 
+		  <td><i>supplier1</i></td>
+		  <td align="right">1</td>
+		  <td align="right">0</td>
+		  <td align="right">1</td>
+		</tr>
+		<tr> 
+		  <td><i>supplier2</i></td>
+		  <td align="right">1</td>
+		  <td align="right">1</td>
+		  <td align="right">2</td>
+		</tr>
+	  </tbody></table>
+	</td>
+  </tr>
+</tbody></table>
+<font> 
+</font><p><font>The following code will generate the SQL for a cross-tabulation: 
+</font></p><pre><font># Query the main "product" table<br># Set the rows to SupplierName<br># and the columns to the values of Categories<br># and define the joins to link to lookup tables <br># "categories" and "suppliers"<br>#<br> include "adodb/pivottable.inc.php";<br> $sql = PivotTableSQL(<br> 	$gDB,                                      # adodb connection<br> 	'products p ,categories c ,suppliers s',   # tables<br>	'SupplierName',                             # rows (multiple fields allowed)<br>	'CategoryName',                            # column to pivot on <br>	'p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID' # joins/where<br>);<br></font></pre>
+ 
+<p><font> This will generate the following SQL:</font></p>
+<p><code><font size="2">SELECT SupplierName, <br>
+  SUM(CASE WHEN CategoryName='Beverages' THEN 1 ELSE 0 END) AS "Beverages", 
+  <br>
+  SUM(CASE WHEN CategoryName='Condiments' THEN 1 ELSE 0 END) AS "Condiments", 
+  <br>
+  SUM(CASE WHEN CategoryName='Confections' THEN 1 ELSE 0 END) AS "Confections", 
+  <br>
+  SUM(CASE WHEN CategoryName='Dairy Products' THEN 1 ELSE 0 END) AS "Dairy 
+  Products", <br>
+  SUM(CASE WHEN CategoryName='Grains/Cereals' THEN 1 ELSE 0 END) AS "Grains/Cereals", 
+  <br>
+  SUM(CASE WHEN CategoryName='Meat/Poultry' THEN 1 ELSE 0 END) AS "Meat/Poultry", 
+  <br>
+  SUM(CASE WHEN CategoryName='Produce' THEN 1 ELSE 0 END) AS "Produce", 
+  <br>
+  SUM(CASE WHEN CategoryName='Seafood' THEN 1 ELSE 0 END) AS "Seafood", 
+  <br>
+  SUM(1) as Total <br>
+  FROM products p ,categories c ,suppliers s WHERE p.CategoryID = c.CategoryID 
+  and s.SupplierID= p.SupplierID <br>
+  GROUP BY SupplierName</font></code></p>
+<p> You can also pivot on <i>numerical columns</i> and <i>generate totals</i> 
+	by using ranges. <font>This code was revised in ADODB 2.41 
+	and is not backward compatible.</font> The second example shows this:</p>
+<pre> $sql = PivotTableSQL(<br> 	$gDB,                                       # adodb connection<br> 	'products p ,categories c ,suppliers s',    # tables<br>	'SupplierName',                              #<font> rows (multiple fields allowed)</font>
+   array(                                       # column ranges
+	' 0 '      =&gt; 'UnitsInStock &lt;= 0',
+	"1 to 5"   =&gt; '0 &lt; UnitsInStock and UnitsInStock &lt;= 5',
+	"6 to 10"  =&gt; '5 &lt; UnitsInStock and UnitsInStock &lt;= 10',
+	"11 to 15" =&gt; '10 &lt; UnitsInStock and UnitsInStock &lt;= 15',
+	"16+"      =&gt; '15 &lt; UnitsInStock'
+	),
+	' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where
+	'UnitsInStock',                             # sum this field
+	'Sum '                                      # sum label prefix
+);
+</pre> 
+<p>Which generates: </p>
+<p> <code> <font size="2">SELECT SupplierName, <br>
+	SUM(CASE WHEN UnitsInStock &lt;= 0 THEN UnitsInStock ELSE 0 END) AS "Sum 
+	0 ", <br>
+	SUM(CASE WHEN 0 &lt; UnitsInStock and UnitsInStock &lt;= 5 THEN UnitsInStock 
+	ELSE 0 END) AS "Sum 1 to 5",<br>
+	SUM(CASE WHEN 5 &lt; UnitsInStock and UnitsInStock &lt;= 10 THEN UnitsInStock 
+	ELSE 0 END) AS "Sum 6 to 10",<br>
+	SUM(CASE WHEN 10 &lt; UnitsInStock and UnitsInStock &lt;= 15 THEN UnitsInStock 
+	ELSE 0 END) AS "Sum 11 to 15", <br>
+	SUM(CASE WHEN 15 &lt; UnitsInStock THEN UnitsInStock ELSE 0 END) AS "Sum 
+	16+", <br>
+	SUM(UnitsInStock) AS "Sum UnitsInStock", <br>
+	SUM(1) as Total,<br>
+	FROM products p ,categories c ,suppliers s WHERE p.CategoryID = c.CategoryID 
+	and s.SupplierID= p.SupplierID <br>
+	GROUP BY SupplierName</font></code><font size="2"><br>
+	</font> </p>
+<font><hr />
+<h1>Class Reference<a name="ref"></a></h1>
+<p>Function parameters with [ ] around them are optional.</p>
+</font> 
+<h2>Global Variables</h2>
+<h3><font><a name="adodb_countrecs"></a></font>$ADODB_COUNTRECS</h3>
+<p>If the database driver API does not support counting the number of records 
+	returned in a SELECT statement, the function RecordCount() is emulated when 
+	the global variable $ADODB_COUNTRECS is set to true, which is the default. 
+	We emulate this by buffering the records, which can take up large amounts 
+	of memory for big recordsets. Set this variable to false for the best performance. 
+	This variable is checked every time a query is executed, so you can selectively 
+	choose which recordsets to count.</p>
+<h3><font><a name="adodb_cache_dir"></a>$ADODB_CACHE_DIR</font></h3>
+<font> 
+<p>If you are using recordset caching, this is the directory to save your recordsets 
+  in. Define this before you call any caching functions such as CacheExecute( 
+  ). We recommend setting <i>register_globals=off</i> in php.ini if you use this 
+  feature for security reasons.</p>
+<p>If you are using Unix and apache, you might need to set your cache directory 
+  permissions to something similar to the following:</p>
+</font> 
+<p>chown -R apache /path/to/adodb/cache<br>
+  chgrp -R apache /path/to/adodb/cache </p>
+<h3><font><a name="adodb_ansi_padding_off"></a>$ADODB_ANSI_PADDING_OFF</font></h3>
+<p><font>Determines whether to right trim CHAR fields (and also VARCHAR for ibase/firebird).
+Set to true to trim. Default is false. Currently works for oci8po, ibase and firebird 
+drivers. Added in ADOdb 4.01.
+</font></p><h3><font><a name="adodb_lang"></a>$ADODB_LANG</font></h3>
+<p><font>Determines the language used in MetaErrorMsg(). The default is 'en', for English. 
+To find out what languages are supported, see the files 
+in adodb/lang/adodb-$lang.inc.php, where $lang is the supported langauge.
+</font></p><h3><font><a name="adodb_fetch_mode"></a>$ADODB_FETCH_MODE</font></h3>
+<p><font>This is a global variable that determines how arrays are retrieved by recordsets. 
+  The recordset saves this value on creation (eg. in Execute( ) or SelectLimit( 
+  )), and any subsequent changes to $ADODB_FETCH_MODE have no affect on existing 
+  recordsets, only on recordsets created in the future.</font></p>
+ <p><font>The following constants are defined:</font></p>
+ <p><font>define('ADODB_FETCH_DEFAULT',0);<br>
+  define('ADODB_FETCH_NUM',1);<br>
+  define('ADODB_FETCH_ASSOC',2);<br>
+  define('ADODB_FETCH_BOTH',3); </font></p>
+<font> 
+</font><p><font> An example: 
+</font></p><pre><font>	$ADODB_<b>FETCH_MODE</b> = ADODB_FETCH_NUM;<br>	$rs1 = $db-&gt;Execute('select * from table');<br>	$ADODB_<b>FETCH_MODE</b> = ADODB_FETCH_ASSOC;<br>	$rs2 = $db-&gt;Execute('select * from table');<br>	print_r($rs1-&gt;fields); # shows <i>array([0]=&gt;'v0',[1] =&gt;'v1')</i>
+	print_r($rs2-&gt;fields); # shows <i>array(['col1']=&gt;'v0',['col2'] =&gt;'v1')</i>
+</font></pre>
+<p><font> As you can see in the above example, both recordsets store and use different 
+	fetch modes based on the $ADODB_FETCH_MODE setting when the recordset was 
+	created by Execute().</font></p>
+<p><font>If no fetch mode is predefined, the fetch mode defaults to ADODB_FETCH_DEFAULT. 
+	The behaviour of this default mode varies from driver to driver, so do not 
+	rely on ADODB_FETCH_DEFAULT. For portability, we recommend sticking to ADODB_FETCH_NUM 
+	or ADODB_FETCH_ASSOC. Many drivers do not support ADODB_FETCH_BOTH.</font></p>
+<p><font><strong>SetFetchMode Function</strong></font></p>
+<p><font>If you have multiple connection objects, and want to have different fetch modes for each 
+connection, then use <a href="#setfetchmode">SetFetchMode</a>. 
+	Once this function is called for a connection object, that connection object 
+	will ignore the global variable $ADODB_FETCH_MODE and will use the internal 
+	fetchMode property exclusively.</font></p>
+<pre><font>	$db-&gt;SetFetchMode(ADODB_FETCH_NUM);<br>	$rs1 = $db-&gt;Execute('select * from table');<br>	$db-&gt;SetFetchMode(ADODB_FETCH_ASSOC);<br>	$rs2 = $db-&gt;Execute('select * from table');<br>	print_r($rs1-&gt;fields); # shows <i>array([0]=&gt;'v0',[1] =&gt;'v1')</i>
+	print_r($rs2-&gt;fields); # shows <i>array(['col1']=&gt;'v0',['col2'] =&gt;'v1')</i></font></pre>
+<p><font>To retrieve the previous fetch mode, you can use check the $db-&gt;fetchMode 
+	property, or use the return value of SetFetchMode( ). 
+</font></p><p><font><strong><a name="adodb_assoc_case"></a>ADODB_ASSOC_CASE</strong></font></p>
+<p><font>You can control the associative fetch case for certain drivers which behave 
+	differently. For the sybase, oci8po, mssql, odbc and ibase drivers and all 
+	drivers derived from them, ADODB_ASSOC_CASE will by default generate recordsets 
+	where the field name keys are lower-cased. Use the constant ADODB_ASSOC_CASE 
+	to change the case of the keys. There are 3 possible values:</font></p>
+<p><font>0 = assoc lowercase field names. $rs-&gt;fields['orderid']<br>
+	1 = assoc uppercase field names. $rs-&gt;fields['ORDERID']<br>
+	2 = use native-case field names. $rs-&gt;fields['OrderID'] -- this is the 
+	default since ADOdb 2.90</font></p>
+<p><font>To use it, declare it before you incldue adodb.inc.php.</font></p>
+<p><font>define('ADODB_ASSOC_CASE', 2); # use native-case for ADODB_FETCH_ASSOC<br>
+	include('adodb.inc.php'); </font></p>
+<h3><font><a name="force_type"></a>$ADODB_FORCE_TYPE</font></h3>
+<p><font>See the <a href="#ADODB_FORCE_TYPE">GetUpdateSQL tutorial</a>.
+</font></p>
+<h3><font><a name="adodb_auto_quote"></a>$ADODB_QUOTE_FIELDNAMES</font></h3>
+<p><font>Auto-quotes field names when using AutoExecute() when set to true. </font>
+<p>&nbsp;</p>
+<hr />
+<h2><font>ADOConnection<a name="adoconnection"></a></font></h2>
+<p><font>Object that performs the connection to the database, executes SQL statements 
+	and has a set of utility functions for standardising the format of SQL statements 
+	for issues such as concatenation and date formats.</font></p>
+<h3><font>ADOConnection Fields</font></h3>
+<p><font><b>databaseType</b>: Name of the database system we are connecting to. Eg. 
+	<b>odbc</b> or <b>mssql</b> or <b>mysql</b>.</font></p>
+<p><font><b>dataProvider</b>: The underlying mechanism used to connect to the database. 
+	Normally set to <b>native</b>, unless using <b>odbc</b> or <b>ado</b>.</font></p>
+<p><font><b>host: </b>Name of server or data source name (DSN) to connect to.</font></p>
+<p><font><b>database</b>: Name of the database or to connect to. If ado is used, it 
+	will hold the ado data provider.</font></p>
+<p><font><b>user</b>: Login id to connect to database. Password is not saved for security 
+	reasons.</font></p>
+<p><font><b>raiseErrorFn</b>: Allows you to define an error handling function. See adodb-errorhandler.inc.php 
+	for an example.</font></p>
+<p><font><b>debug</b>: Set to <i>true</i> to make debug statements to appear.</font></p>
+<p><font><b>concat_operator</b>: Set to '+' or '||' normally. The operator used to concatenate 
+	strings in SQL. Used by the <b><a href="#concat">Concat</a></b> function.</font></p>
+<p><font><b>fmtDate</b>: The format used by the <b><a href="#dbdate">DBDate</a></b> 
+	function to send dates to the database. is '#Y-m-d#' for Microsoft Access, 
+	and ''Y-m-d'' for MySQL.</font></p>
+<p><font><b>fmtTimeStamp: </b>The format used by the <b><a href="#dbtimestamp">DBTimeStamp</a></b> 
+	function to send timestamps to the database. </font></p>
+<p><font><b>true</b>: The value used to represent true.Eg. '.T.'. for Foxpro, '1' for 
+	Microsoft SQL.</font></p>
+<p><font><b>false: </b> The value used to represent false. Eg. '.F.'. for Foxpro, '0' 
+	for Microsoft SQL.</font></p>
+<p><font><b>replaceQuote</b>: The string used to escape quotes. Eg. double single-quotes 
+	for Microsoft SQL, and backslash-quote for MySQL. Used by <a href="#qstr">qstr</a>.</font></p>
+<p><font><b>autoCommit</b>: indicates whether automatic commit is enabled. Default is 
+	true.</font></p>
+<p><font><b>charSet</b>: set the default charset to use. Currently only interbase/firebird supports 
+	this.</font></p>
+<p><font><b>dialect</b>: set the default sql dialect to use. Currently only interbase/firebird 
+	supports this.</font></p>
+	<p><font><b>role</b>: set the role. Currently only interbase/firebird 
+	supports this.</font></p>
+<p><font><b>metaTablesSQL</b>: SQL statement to return a list of available tables. Eg. 
+	<i>SHOW TABLES</i> in MySQL.</font></p>
+<p><font><b>genID</b>: The latest id generated by GenID() if supported by the database.</font></p>
+<p><font><b>cacheSecs</b>: The number of seconds to cache recordsets if CacheExecute() 
+	or CacheSelectLimit() omit the $secs2cache parameter. Defaults to 60 minutes.</font></p>
+<p><font><b>sysDate</b>: String that holds the name of the database function to call 
+	to get the current date. Useful for inserts and updates.</font></p>
+<p><font><b>sysTimeStamp</b>: String that holds the name of the database function to 
+	call to get the current timestamp/datetime value.</font></p>
+<p><font><b>leftOuter</b>: String that holds operator for left outer join, if known. 
+	Otherwise set to false.</font></p>
+<p><font><b>rightOuter</b>: String that holds operator for left outer join, if known. 
+	Otherwise set to false.</font></p>
+<p><font><b>ansiOuter</b>: Boolean that if true indicates that ANSI style outer joins 
+	are permitted. Eg. <i>select * from table1 left join table2 on p1=p2.</i></font></p>
+<p><font><b>connectSID</b>: Boolean that indicates whether to treat the $database parameter 
+	in connects as the SID for the oci8 driver. Defaults to false. Useful for 
+	Oracle 8.0.5 and earlier.</font></p>
+<p><font><b>autoRollback</b>: Persistent connections are auto-rollbacked in PConnect( 
+	) if this is set to true. Default is false.</font></p>
+<hr />
+<h3><font>ADOConnection Main Functions</font></h3>
+<p><font><b>ADOConnection( )</b></font></p>
+<p><font>Constructor function. Do not call this directly. Use ADONewConnection( ) instead.</font></p>
+<p><font><b>Connect<a name="connect"></a>($host,[$user],[$password],[$database])</b></font></p>
+<p><font>Non-persistent connect to data source or server $<b>host</b>, using userid 
+	$<b>user </b>and password $<b>password</b>. If the server supports multiple 
+	databases, connect to database $<b>database</b>. </font></p>
+<p><font>Returns true/false depending on connection success. Since 4.23, null is returned if the extension is not loaded.</font></p>
+<p><font>ADO Note: If you are using a Microsoft ADO and not OLEDB, you can set the $database 
+	parameter to the OLEDB data provider you are using.</font></p>
+<p><font>PostgreSQL: An alternative way of connecting to the database is to pass the 
+	standard PostgreSQL connection string in the first parameter $host, and the 
+	other parameters will be ignored.</font></p>
+<p><font>For Oracle and Oci8, there are two ways to connect. First is to use the TNS 
+	name defined in your local tnsnames.ora (or ONAMES or HOSTNAMES). Place the 
+	name in the $database field, and set the $host field to false. Alternatively, 
+	set $host to the server, and $database to the database SID, this bypassed 
+	tnsnames.ora. 
+</font></p><p><font>Examples: 
+</font></p><pre><font> # $oraname in tnsnames.ora/ONAMES/HOSTNAMES<br> $conn-&gt;Connect(false, 'scott', 'tiger', $oraname); <br> $conn-&gt;Connect('server:1521', 'scott', 'tiger', 'ServiceName'); # bypass tnsnames.ora</font></pre>
+<p><font>There are many examples of connecting to a database.
+See  <a href="#connect_ex">Connection Examples</a> for many examples.
+
+</font></p><p><font><b>PConnect<a name="pconnect"></a>($host,[$user],[$password],[$database])</b></font></p>
+<p><font>Persistent connect to data source or server $<b>host</b>, using userid $<b>user</b> 
+	and password $<b>password</b>. If the server supports multiple databases, 
+	connect to database $<b>database</b>.</font></p>
+<p><font>We now perform a rollback on persistent connection for selected databases since 
+	2.21, as advised in the PHP manual. See change log or source code for which 
+	databases are affected. 
+</font></p><p><font>Returns true/false depending on connection. Since 4.23, 0 is returned if the extension is not loaded.
+See Connect( ) above for more info.</font></p>
+<p><font>Since ADOdb 2.21, we also support autoRollback. If you set:</font></p>
+ 
+<pre> $conn = &amp;NewADOConnection('mysql');<br> $conn-&gt;autoRollback = true; # default is false<br> $conn-&gt;PConnect(...); # rollback here</pre>
+<p> Then when doing a persistent connection with PConnect( ), ADOdb will 
+  perform a rollback first. This is because it is documented that PHP is 
+  not guaranteed to rollback existing failed transactions when 
+  persistent connections are used. This is implemented in Oracle, 
+  MySQL, PgSQL, MSSQL, ODBC currently. 
+</p><p>Since ADOdb 3.11, you can force non-persistent 
+connections even if PConnect is called by defining the constant 
+ADODB_NEVER_PERSIST  before you call PConnect.
+</p><p>
+Since 4.23, null is returned if the extension is not loaded.
+</p><p><b>NConnect<a name="nconnect"></a>($host,[$user],[$password],[$database])</b></p>
+<p>Always force a new connection. In contrast, PHP sometimes reuses connections 
+	when you use Connect() or PConnect(). Currently works only on mysql (PHP 4.3.0 
+	or later), postgresql and oci8-derived drivers. For other drivers, NConnect() works like 
+	Connect().</p>
+<p><font><b>IsConnected( )<a name="isconnected"></a></b></font></p>
+<p>
+<font>Returns true if connected to database. Added in 4.53.
+
+</font></p><p><font><b>Execute<a name="execute"></a>($sql,$inputarr=false)</b></font></p>
+<p><font>Execute SQL statement $<b>sql</b> and return derived class of ADORecordSet 
+	if successful. Note that a record set is always returned on success, even 
+	if we are executing an insert or update statement. You can also pass in $sql a statement prepared 
+	in <a href="#prepare">Prepare()</a>.</font></p>
+<p><font>Returns derived class of ADORecordSet. Eg. if connecting via mysql, then ADORecordSet_mysql 
+	would be returned. False is returned if there was an error in executing the 
+	sql.</font></p>
+<p><font>The $inputarr parameter can be used for binding variables to parameters. Below 
+	is an Oracle example:</font></p>
+<pre><font> $conn-&gt;Execute("SELECT * FROM TABLE WHERE COND=:val", array('val'=&gt; $val));<br> </font></pre>
+<p><font>Another example, using ODBC,which uses the ? convention:</font></p>
+<pre><font>  $conn-&gt;Execute("SELECT * FROM TABLE WHERE COND=?", array($val));<br></font></pre>
+<font><a name="binding"></a>
+<i>Binding variables</i></font><p>
+<font>Variable binding speeds the compilation and caching of SQL statements, leading 
+to higher performance. Currently Oracle, Interbase and ODBC supports variable binding. 
+Interbase/ODBC style ? binding is emulated in databases that do not support binding. 
+Note that you do not have to quote strings if you use binding.
+</font></p><p><font> Variable binding in the odbc, interbase and oci8po drivers. 
+</font></p><pre><font>$rs = $db-&gt;Execute('select * from table where val=?', array('10'));<br></font></pre>
+<font>Variable binding in the oci8 driver: 
+</font><pre><font>$rs = $db-&gt;Execute('select name from table where val=:key', <br>  array('key' =&gt; 10));<br></font></pre>
+<font><a name="bulkbind"></a>
+<i>Bulk binding</i>
+</font><p><font>Since ADOdb 3.80, we support bulk binding in Execute(), in which you pass in a 2-dimensional array to
+be bound to an INSERT/UPDATE or DELETE statement.
+</font></p><pre><font>$arr = array(<br>	array('Ahmad',32),<br>	array('Zulkifli', 24),<br>	array('Rosnah', 21)<br>	);<br>$ok = $db-&gt;Execute('insert into table (name,age) values (?,?)',$arr);<br></font></pre>
+<p><font>This provides very high performance as the SQL statement is prepared first. 
+The prepared statement is executed repeatedly for each array row until all rows are completed, 
+or until the first error. Very useful for importing data.
+
+</font></p><p><font><b>CacheExecute<a name="cacheexecute"></a>([$secs2cache,]$sql,$inputarr=false)</b></font></p>
+<p><font>Similar to Execute, except that the recordset is cached for $secs2cache seconds 
+	in the $ADODB_CACHE_DIR directory, and $inputarr only accepts 1-dimensional arrays. 
+	If CacheExecute() is called again with the same $sql, $inputarr, 
+	and also the same database, same userid, and the cached recordset 
+	has not expired, the cached recordset is returned. 
+</font></p><pre><font>  include('adodb.inc.php'); <br>  include('tohtml.inc.php');<br>  $ADODB_<b>CACHE_DIR</b> = '/usr/local/ADOdbcache';<br>  $conn = &amp;ADONewConnection('mysql'); <br>  $conn-&gt;PConnect('localhost','userid','password','database');<br>  $rs = $conn-&gt;<b>CacheExecute</b>(15, 'select * from table'); # cache 15 secs<br>  rs2html($rs); /* recordset to html table */  <br></font></pre>
+<p><font> Alternatively, since ADOdb 1.80, the $secs2cache parameter is optional:</font></p>
+<pre><font>	$conn-&gt;Connect(...);<br>   	$conn-&gt;cacheSecs = 3600*24; // cache 24 hours<br>	$rs = $conn-&gt;CacheExecute('select * from table');<br></font></pre>
+<font>If $secs2cache is omitted, we use the value 
+in $connection-&gt;cacheSecs (default is 3600 seconds, or 1 hour). Use CacheExecute() 
+only with SELECT statements. 
+</font><p><font>Performance note: I have done some benchmarks and found that they vary so greatly 
+	that it's better to talk about when caching is of benefit. When your database 
+	server is <i>much slower </i>than your Web server or the database is <i>very 
+	overloaded </i>then ADOdb's caching is good because it reduces the load on 
+	your database server. If your database server is lightly loaded or much faster 
+	than your Web server, then caching could actually reduce performance. </font></p>
+<p><font><b>ExecuteCursor<a name="executecursor"></a>($sql,$cursorName='rs',$parameters=false)</b></font></p>
+<p><font>Execute an Oracle stored procedure, and returns an Oracle REF cursor variable as 
+	a regular ADOdb recordset. Does not work with any other database except oci8. 
+	Thanks to Robert Tuttle for the design.
+</font></p><pre><font>    $db = ADONewConnection("oci8"); <br>    $db-&gt;Connect("foo.com:1521", "uid", "pwd", "FOO"); <br>    $rs = $db-&gt;ExecuteCursor("begin :cursorvar := getdata(:param1); end;", <br>					'cursorvar',<br>					array('param1'=&gt;10)); <br>    # $rs is now just like any other ADOdb recordset object<br>    rs2html($rs);</font></pre>
+<p><font>ExecuteCursor() is a helper function that does the following internally: 
+</font></p><pre><font>	$stmt = $db-&gt;Prepare("begin :cursorvar := getdata(:param1); end;", true); <br>	$db-&gt;Parameter($stmt, $cur, 'cursorvar', false, -1, OCI_B_CURSOR);<br>	$rs = $db-&gt;Execute($stmt,$bindarr);<br></font></pre>
+<p><font>ExecuteCursor only accepts 1 out parameter. So if you have 2 out parameters, use:
+</font></p><pre><font>	$vv = 'A%';<br>	$stmt = $db-&gt;PrepareSP("BEGIN list_tabs(:crsr,:tt); END;");<br>	$db-&gt;OutParameter($stmt, $cur, 'crsr', -1, OCI_B_CURSOR);<br>	$db-&gt;OutParameter($stmt, $vv, 'tt', 32); # return varchar(32)<br>	$arr = $db-&gt;GetArray($stmt);<br>	print_r($arr);<br>	echo " val = $vv"; ## outputs 'TEST'<br></font></pre>
+<font>for the following PL/SQL:
+</font><pre><font>	TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;<br><br>	PROCEDURE list_tabs(tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) IS<br>	BEGIN<br>		OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;<br>		tablenames := 'TEST';<br>	END list_tabs;<br></font></pre>
+<p><font><b>SelectLimit<a name="selectlimit"></a>($sql,$numrows=-1,$offset=-1,$inputarr=false)</b></font></p>
+<p><font>Returns a recordset if successful. Returns false otherwise. Performs a select 
+	statement, simulating PostgreSQL's SELECT statement, LIMIT $numrows OFFSET 
+	$offset clause.</font></p>
+<p><font>In PostgreSQL, SELECT * FROM TABLE LIMIT 3 will return the first 3 records 
+	only. The equivalent is <code>$connection-&gt;SelectLimit('SELECT * FROM TABLE',3)</code>. 
+	This functionality is simulated for databases that do not possess this feature.</font></p>
+<p><font>And SELECT * FROM TABLE LIMIT 3 OFFSET 2 will return records 3, 4 and 5 (eg. 
+	after record 2, return 3 rows). The equivalent in ADOdb is <code>$connection-&gt;SelectLimit('SELECT 
+	* FROM TABLE',3,2)</code>.</font></p>
+<p><font>Note that this is the <i>opposite</i> of MySQL's LIMIT clause. You can also 
+	set <code>$connection-&gt;SelectLimit('SELECT * FROM TABLE',-1,10)</code> to 
+	get rows 11 to the last row.</font></p>
+<p><font>The last parameter $inputarr is for databases that support variable binding 
+	such as Oracle oci8. This substantially reduces SQL compilation overhead. 
+	Below is an Oracle example:</font></p>
+<pre><font> $conn-&gt;SelectLimit("SELECT * FROM TABLE WHERE COND=:val", 100,-1,array('val'=&gt; $val));<br> </font></pre>
+<p><font>The oci8po driver (oracle portable driver) uses the more standard bind variable 
+	of ?: 
+</font></p><pre><font> $conn-&gt;SelectLimit("SELECT * FROM TABLE WHERE COND=?", 100,-1,array('val'=&gt; $val));<br></font></pre>
+<p><font> 
+</font></p><p><font>Ron Wilson reports that SelectLimit does not work with UNIONs. 
+</font></p><p><font><b>CacheSelectLimit<a name="cacheselectlimit"></a>([$secs2cache,] $sql, $numrows=-1,$offset=-1,$inputarr=false)</b></font></p>
+<p><font>Similar to SelectLimit, except that the recordset returned is cached for $secs2cache 
+	seconds in the $ADODB_CACHE_DIR directory. </font></p>
+<p><font>Since 1.80, $secs2cache has been optional, and you can define the caching time 
+	in $connection-&gt;cacheSecs.</font></p>
+ 
+<pre><font>	$conn-&gt;Connect(...);<br>   $conn-&gt;cacheSecs = 3600*24; // cache 24 hours<br>	$rs = $conn-&gt;CacheSelectLimit('select * from table',10);</font></pre>
+<font> 
+</font><p><font><b>CacheFlush<a name="cacheflush"></a>($sql=false,$inputarr=false)</b></font></p>
+<p><font>Flush (delete) any cached recordsets for the SQL statement $sql in $ADODB_CACHE_DIR. 
+</font></p><p><font>If no parameter is passed in, then all adodb_*.cache files are deleted. 
+</font></p>
+  <p>CacheSelectLimit() rewrites the SQL query, so you won't be able to pass the SQL to CacheFlush. In this case,
+   to flush the cached SQL recordset returned by CacheSelectLimit(), set $secs2cache to -1:
+<pre>
+	$db->CacheSelectLimit(-1, $sql, $nrows);
+</pre>
+<p><font> If you want to flush all cached recordsets manually, execute the following 
+	PHP code (works only under Unix): <br>
+	<code> &nbsp; system("rm -f `find ".$ADODB_CACHE_DIR." -name 
+	adodb_*.cache`");</code></font></p>
+<p><font>For general cleanup of all expired files, you should use <a href="http://www.superscripts.com/tutorial/crontab.html">crontab</a> 
+	on Unix, or at.exe on Windows, and a shell script similar to the following:<font face="Courier New, Courier, mono"><br>
+	#------------------------------------------------------ <br>
+	# This particular example deletes files in the TMPPATH <br>
+	# directory with the string ".cache" in their name that <br>
+	# are more than 7 days old. <br>
+	#------------------------------------------------------ <br>
+	AGED=7 <br>
+	find ${TMPPATH} -mtime +$AGED | grep "\.cache" | xargs rm -f <br>
+	</font> </font></p>
+<p><font><b>MetaError<a name="metaerror"></a>($errno=false)</b></font></p>
+<p><font>Returns a virtualized error number, based on PEAR DB's error number system. You might
+need to include adodb-error.inc.php before you call this function. The parameter $errno
+is the native error number you want to convert. If you do not pass any parameter, MetaError
+will call ErrorNo() for you and convert it. If the error number cannot be virtualized, MetaError 
+will return -1 (DB_ERROR).</font></p>
+
+<p><font><b>MetaErrorMsg<a name="metaerrormsg"></a>($errno)</b></font></p>
+<p><font>Pass the error number returned by MetaError() for the equivalent textual error message.</font></p>
+<p><font><b>ErrorMsg<a name="errormsg"></a>()</b></font></p>
+<p><font>Returns the last status or error message. The error message is reset after every 
+call to Execute(). 
+</font></p><p>
+<font>This can return a string even if 
+	no error occurs. In general you do not need to call this function unless an 
+	ADOdb function returns false on an error. </font></p>
+<p><font>Note: If <b>debug</b> is enabled, the SQL error message is always displayed 
+	when the <b>Execute</b> function is called.</font></p>
+<p><font><b>ErrorNo<a name="errorno"></a>()</b></font></p>
+<p><font>Returns the last error number. The error number is reset after every call to Execute(). 
+If 0 is returned, no error occurred.
+</font></p><p>
+<font>Note that old versions of PHP (pre 4.0.6) do 
+	not support error number for ODBC. In general you do not need to call this 
+	function unless an ADOdb function returns false on an error.</font></p>
+<p><font><b>IgnoreErrors<a name="ignoreerrors"></a>($saveErrHandlers)</b></font></p>
+<p>Allows you to ignore errors so that StartTrans()/CompleteTrans() is not affected, nor is the default error handler called if an error occurs.
+Useful when you want to check if a field or table exists in a database without invoking an error if it does not exist.
+<p>Usage:
+<pre>
+$saveErrHandlers = $conn->IgnoreErrors();
+$rs = $conn->Execute("select field from some_table_that_might_not_exist");
+$conn->IgnoreErrors($saveErrHandlers);
+</pre>
+<p>Warning: do not call StartTrans()/CompleteTrans() inside a code block that is using IgnoreErrors().
+<p><font><b>SetFetchMode<a name="setfetchmode"></a>($mode)</b></font></p>
+<p><font>Sets the current fetch mode for the connection and stores 
+	it in $db-&gt;fetchMode. Legal modes are ADODB_FETCH_ASSOC and ADODB_FETCH_NUM. 
+	For more info, see <a href="#adodb_fetch_mode">$ADODB_FETCH_MODE</a>.</font></p>
+<p><font>Returns the previous fetch mode, which could be false 
+	if SetFetchMode( ) has not been called before.</font></p>
+<font> 
+</font><p><font><b>CreateSequence<a name="createseq"></a>($seqName = 'adodbseq',$startID=1)</b></font></p>
+<p><font>Create a sequence. The next time GenID( ) is called, the value returned will 
+	be $startID. Added in 2.60. 
+</font></p><p><font><b>DropSequence<a name="dropseq"></a>($seqName = 'adodbseq')</b></font></p>
+<p><font>Delete a sequence. Added in 2.60. 
+</font></p><p><font><b>GenID<a name="genid"></a>($seqName = 'adodbseq',$startID=1)</b></font></p>
+<p><font>Generate a sequence number . Works for interbase, 
+	mysql, postgresql, oci8, oci8po, mssql, ODBC based (access,vfp,db2,etc) drivers 
+	currently. Uses $seqName as the name of the sequence. GenID() will automatically 
+	create the sequence for you if it does not exist (provided the userid has 
+	permission to do so). Otherwise you will have to create the sequence yourself. 
+</font></p><p><font> If your database driver emulates sequences, the name of the table is the sequence 
+	name. The table has one column, "id" which should be of type integer, or if 
+	you need something larger - numeric(16). 
+</font></p><p><font> For ODBC and databases that do not support sequences natively (eg mssql, mysql), 
+	we create a table for each sequence. If the sequence has not been defined 
+	earlier, it is created with the starting value set in $startID.</font></p>
+<p><font>Note that the mssql driver's GenID() before 1.90 used to generate 16 byte GUID's.</font></p>
+<p><font><b>UpdateBlob<a name="updateblob"></a>($table,$column,$val,$where)</b></font></p>
+<font>Allows you to store a blob (in $val) into $table into $column in a row at $where. 
+</font><p><font> Usage: 
+</font></p><p><font> 
+</font></p><pre><font>	# for oracle<br>	$conn-&gt;Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, empty_blob())');<br>	$conn-&gt;UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');<br>	<br>	# non oracle databases<br>	$conn-&gt;Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');<br>	$conn-&gt;UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');<br></font></pre>
+<p><font> Returns true if succesful, false otherwise. Supported by MySQL, PostgreSQL, 
+	Oci8, Oci8po and Interbase drivers. Other drivers might work, depending on 
+	the state of development.</font></p>
+<p><font>Note that when an Interbase blob is retrieved using SELECT, it still needs 
+	to be decoded using $connection-&gt;DecodeBlob($blob); to derive the original 
+	value in versions of PHP before 4.1.0. 
+</font></p><p><font>For PostgreSQL, you can store your blob using blob oid's or as a bytea field. 
+	You can use bytea fields but not blob oid's currently with UpdateBlob( ). 
+	Conversely UpdateBlobFile( ) supports oid's, but not bytea data.<br>
+	<br>
+	If you do not pass in an oid, then UpdateBlob() assumes that you are storing 
+	in bytea fields.
+	<p>If you do not have any blob fields, you can improve you can improve general SQL query performance by disabling blob handling with $connection->disableBlobs = true.
+</p></font><p><font><b>UpdateClob<a name="updateclob"></a>($table,$column,$val,$where)</b></font></p>
+<font>Allows you to store a clob (in $val) into $table into $column in a row at $where. 
+Similar to UpdateBlob (see above), but for Character Large OBjects. 
+</font><p><font> Usage:
+</font></p><pre><font>	# for oracle<br>	$conn-&gt;Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, empty_clob())');<br>	$conn-&gt;UpdateBlob('clobtable','clobcol',$clobvalue,'id=1');<br>	<br>	# non oracle databases<br>	$conn-&gt;Execute('INSERT INTO clobtable (id, clobcol) VALUES (1, null)');<br>	$conn-&gt;UpdateBlob('clobtable','clobcol',$clobvalue,'id=1');<br></font></pre>
+<p><font><b>UpdateBlobFile<a name="updateblobfile"></a>($table,$column,$path,$where,$blobtype='BLOB')</b></font></p>
+<p><font>Similar to UpdateBlob, except that we pass in a file path to where the blob 
+	resides.
+</font></p><p><font>For PostgreSQL, if you are using blob oid's, use this interface. This interface 
+	does not support bytea fields.
+</font></p><p><font>Returns true if successful, false otherwise. 
+</font></p><p><font><b>BlobEncode<a name="blobencode" id="blobencode"></a>($blob)</b> 
+</font></p><p><font>Some databases require blob's to be encoded manually before upload. Note if 
+	you use UpdateBlob( ) or UpdateBlobFile( ) the conversion is done automatically 
+	for you and you do not have to call this function. For PostgreSQL, currently, 
+	BlobEncode() can only be used for bytea fields.
+</font></p><p><font>Returns the encoded blob value.
+</font></p><p><font>Note that there is a connection property called <em>blobEncodeType</em> which 
+	has 3 legal values: 
+</font></p><p><font>false - no need to perform encoding or decoding.<br>
+	'I' - blob encoding required, and returned encoded blob is a numeric value 
+	(no need to quote).<br>
+	'C' - blob encoding required, and returned encoded blob is a character value 
+	(requires quoting).
+</font></p><p><font>This is purely for documentation purposes, so that programs that accept multiple 
+	database drivers know what is the right thing to do when processing blobs.
+</font></p><p><font><strong>BlobDecode<a name="blobdecode"></a>($blob, $maxblobsize = false)</strong> 
+</font></p><p><font>Some databases require blob's to be decoded manually after doing a select statement. 
+	If the database does not require decoding, then this function will return 
+	the blob unchanged. Currently BlobDecode is only required for one database, 
+	PostgreSQL, and only if you are using blob oid's (if you are using bytea fields, 
+	we auto-decode for you).</font> The default maxblobsize is set in $connection-&gt;maxblobsize, which 
+	is set to 256K in adodb 4.54. </p><p>
+	In ADOdb 4.54 and later, the blob is the return value. In earlier versions, the blob data is sent to stdout.</p><font>
+</font><p></p><pre><font>$rs = $db-&gt;Execute("select bloboid from postgres_table where id=$key");<br>$blob = $db-&gt;BlobDecode( reset($rs-&gt;fields) );</font></pre>
+<p><font><b>Replace<a name="replace"></a>($table, $arrFields, $keyCols,$autoQuote=false)</b></font></p>
+<p><font>Try to update a record, and if the record is not found, an insert statement 
+	is generated and executed. Returns 0 on failure, 1 if update statement worked, 
+	2 if no record was found and the insert was executed successfully. This differs 
+	from MySQL's replace which deletes the record and inserts a new record. This 
+	also means you cannot update the primary key. The only exception to this is 
+	Interbase and its derivitives, which uses delete and insert because of some 
+	Interbase API limitations. 
+</font></p><p><font>The parameters are $table which is the table name, the $arrFields which is an 
+	associative array where the keys are the field names, and $keyCols is the name 
+	of the primary key, or an array of field names if it is a compound key. If 
+	$autoQuote is set to true, then Replace() will quote all values that are non-numeric; 
+	auto-quoting will not quote nulls. Note that auto-quoting will not work if 
+	you use SQL functions or operators. 
+</font></p><p><font>Examples: 
+</font></p><pre><font># single field primary key<br>$ret = $db-&gt;Replace('atable', <br>	array('id'=&gt;1000,'firstname'=&gt;'Harun','lastname'=&gt;'Al-Rashid'),<br>	'id',$autoquote = true);	<br># generates UPDATE atable SET firstname='Harun',lastname='Al-Rashid' WHERE id=1000<br># or INSERT INTO atable (id,firstname,lastname) VALUES (1000,'Harun','Al-Rashid')<br><br># compound key<br>$ret = $db-&gt;Replace('atable2', <br>	array('firstname'=&gt;'Harun','lastname'=&gt;'Al-Rashid', 'age' =&gt; 33, 'birthday' =&gt; 'null'),<br>	array('lastname','firstname'),<br>	$autoquote = true);<br><br># no auto-quoting<br>$ret = $db-&gt;Replace('atable2', <br>	array('firstname'=&gt;"'Harun'",'lastname'=&gt;"'Al-Rashid'", 'age' =&gt; 'null'),<br>	array('lastname','firstname'));	<br></font></pre>
+<p><font><b>AutoExecute<a name="autoexecute"></a>($table, $arrFields, $mode, $where=false, $forceUpdate=true,$magicq=false)</b></font></p>
+<p>Since ADOdb 4.56, you can automatically generate and execute INSERTs and UPDATEs on a given table with this
+function, which is a wrapper for GetInsertSQL() and GetUpdateSQL().
+<p>AutoExecute() inserts or updates $table given an array of $arrFields, where the keys are the field names and the array values are the 
+field values to store. Note that there is some overhead because the table is first queried to extract key information 
+before the SQL is generated. We generate an INSERT or UPDATE based on $mode (see below).
+<p>
+Legal values for $mode are 
+<ul>
+<li>'INSERT' or 1 or DB_AUTOQUERY_INSERT
+<li>'UPDATE' or 2 or DB_AUTOQUERY_UPDATE
+</ul>
+<p>You have to define the constants DB_AUTOQUERY_UPDATE and DB_AUTOQUERY_INSERT yourself or include adodb-pear.inc.php.
+<p>The $where clause is required if $mode == 'UPDATE'. If $forceUpdate=false then we will query the 
+database first and check if the field value returned by the query matches the current field value; only if they differ do we update that field.
+<p>Returns true on success, false on error.
+<p>An example of its use is:
+<pre>
+$record["firstName"] = "Carol";
+$record["lasTname"] = "Smith"; 
+$conn->AutoExecute($table,$record,'INSERT');
+# executes <i>"INSERT INTO $table (firstName,lasTname) values ('Carol',Smith')"</i>;
+
+$record["firstName"] = "Carol";
+$record["lasTname"] = "Jones"; 
+$conn->AutoExecute($table,$record,'UPDATE', "lastname like 'Sm%'");
+# executes <i>"UPDATE $table SET firstName='Carol',lasTname='Jones' WHERE lastname like 'Sm%'"</i>;
+</pre>
+<p>Note: One of the strengths of ADOdb's AutoExecute() is that only valid field names for $table are updated. If $arrFields
+contains keys that are invalid field names for $table, they are ignored. There is some overhead in doing this as we have to 
+query the database to get the field names, but given that you are not directly coding the SQL yourself, you probably aren't interested in
+speed at all, but convenience.
+<p>Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called.
+<p>Since 4.94, setting the global variable $ADODB_QUOTE_FIELDNAMES to true will force field names to be auto-quoted in AutoExecute(), GetInsertSQL() and GetUpdateSQL(). </p>
+<p><font><b>GetUpdateSQL<a name="getupdatesql"></a>(&amp;$rs, $arrFields, $forceUpdate=false,$magicq=false, $force=null)</b></font></p>
+<p><font>Generate SQL to update a table given a recordset $rs, and the modified fields 
+	of the array $arrFields (which must be an associative array holding the column 
+	names and the new values) are compared with the current recordset. If $forceUpdate 
+	is true, then we also generate the SQL even if $arrFields is identical to 
+	$rs-&gt;fields. Requires the recordset to be associative. $magicq is used 
+	to indicate whether magic quotes are enabled (see qstr()). The field names in the array 
+	are case-insensitive.</font></p>
+<font>	</font><p><font>Since 4.52, we allow you to pass the $force type parameter, and this overrides the <a href="#ADODB_FORCE_TYPE">$ADODB_FORCE_TYPE</a>
+	global variable.
+<p>Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called.
+</p></font><p><font><b>GetInsertSQL<a name="getinsertsql"></a>(&amp;$rs, $arrFields,$magicq=false,$force_type=false)</b></font></p>
+<p><font>Generate SQL to insert into a table given a recordset $rs. Requires the query 
+	to be associative. $magicq is used to indicate whether magic quotes are enabled 
+	(for qstr()). The field names in the array are case-insensitive.</font></p>
+<p>
+<font>  Since 2.42, you can pass a  table name instead of a recordset into 
+GetInsertSQL (in $rs), and it will generate an insert statement for that table.
+</font></p><p><font>Since 4.52, we allow you to pass the $force_type parameter, and this overrides the <a href="#ADODB_FORCE_TYPE">$ADODB_FORCE_TYPE</a>
+	global variable.
+<p>Since 4.62, the table name to be used can be overridden by setting $rs->tableName before AutoExecute(), GetInsertSQL() or GetUpdateSQL() is called.
+</p></font><p><font><b>PageExecute<a name="pageexecute"></a>($sql, $nrows, $page, $inputarr=false)</b> 
+</font></p><p><font>Used for pagination of recordset. $page is 1-based. See <a href="#ex8">Example 
+  8</a>.</font></p>
+ 
+<p><font><b>CachePageExecute<a name="cachepageexecute"></a>($secs2cache, 
+  $sql, $nrows, $page, $inputarr=false)</b> </font></p>
+<p><font>Used for pagination of recordset. $page is 1-based. See 
+  <a href="#ex8">Example 8</a>. Caching version of PageExecute.</font></p>
+<font> 
+</font><p></p>
+<p><font><b>Close<a name="close"></a>( )</b></font></p>
+<p><font>Close the database connection. PHP4 proudly states that we no longer have to 
+  clean up at the end of the connection because the reference counting mechanism 
+  of PHP4 will automatically clean up for us.</font></p>
+<font>  </font><p><font><b>StartTrans<a name="starttrans"></a>( )</b></font></p>
+<font>  </font><p><font>Start a monitored transaction. As SQL statements are executed, ADOdb will monitor
+  for SQL errors, and if any are detected, when CompleteTrans() is called, we auto-rollback.
+  </font></p><p>
+<font>  </font></p><p><font> To understand why StartTrans() is superior to BeginTrans(), 
+  let us examine a few ways of using BeginTrans().
+  The following is the wrong way to use transactions: 
+</font></p><pre><font>$DB-&gt;BeginTrans();<br>$DB-&gt;Execute("update table1 set val=$val1 where id=$id");<br>$DB-&gt;Execute("update table2 set val=$val2 where id=$id");<br>$DB-&gt;CommitTrans();<br></font></pre>
+<p><font>because you perform no error checking. It is possible to update table1 and 
+  for the update on table2 to fail. Here is a better way: 
+</font></p><pre><font>$DB-&gt;BeginTrans();<br>$ok = $DB-&gt;Execute("update table1 set val=$val1 where id=$id");<br>if ($ok) $ok = $DB-&gt;Execute("update table2 set val=$val2 where id=$id");<br>if ($ok) $DB-&gt;CommitTrans();<br>else $DB-&gt;RollbackTrans();<br></font></pre>
+<p><font>Another way is (since ADOdb 2.0): 
+</font></p><pre><font>$DB-&gt;BeginTrans();<br>$ok = $DB-&gt;Execute("update table1 set val=$val1 where id=$id");<br>if ($ok) $ok = $DB-&gt;Execute("update table2 set val=$val2 where id=$id");<br>$DB-&gt;CommitTrans($ok);<br></font></pre>
+<p><font> Now it is a headache monitoring $ok all over the place. StartTrans() is an
+improvement because it monitors all SQL errors for you. This is particularly
+useful if you are calling black-box functions in which SQL queries might be executed.
+ Also all BeginTrans, CommitTrans and RollbackTrans calls inside a StartTrans block 
+  will be disabled, so even if the black box function does a commit, it will be ignored.
+</font></p><pre><font>$DB-&gt;StartTrans();<br>CallBlackBox();<br>$DB-&gt;Execute("update table1 set val=$val1 where id=$id");<br>$DB-&gt;Execute("update table2 set val=$val2 where id=$id");<br>$DB-&gt;CompleteTrans();<br></font></pre>
+<p><font>Note that a StartTrans blocks are nestable, the inner blocks are ignored.
+ </font></p><p><font><b>CompleteTrans<a name="completetrans"></a>($autoComplete=true)</b></font></p>
+<font>  </font><p><font>Complete a transaction called with StartTrans(). This function monitors
+  for SQL errors, and will commit if no errors have occured, otherwise it will rollback. 
+  Returns true on commit, false on rollback. If the parameter $autoComplete is true
+  monitor sql errors and commit and rollback as appropriate. Set $autoComplete to false 
+  to force rollback even if no SQL error detected.
+  </font></p><p><font><b>FailTrans<a name="failtrans"></a>( )</b></font></p>
+<font>  </font><p><font>Fail a transaction started with StartTrans(). The rollback will only occur when
+  CompleteTrans() is called.
+    </font></p><p><font><b>HasFailedTrans<a name="hasfailedtrans"></a>( )</b></font></p>
+<font>	</font><p><font>Check whether smart transaction has failed, 
+	eg. returns true if there was an error in SQL execution or FailTrans() was called.
+	If not within smart transaction, returns false.
+</font></p><p><font><b>BeginTrans<a name="begintrans"></a>( )</b></font></p>
+<p><font>Begin a transaction. Turns off autoCommit. Returns true if successful. Some 
+  databases will always return false if transaction support is not available. 
+   Any open transactions will be rolled back when the connection is closed. Among the
+   databases that support transactions are Oracle, PostgreSQL, Interbase, MSSQL, certain
+    versions of MySQL, DB2, Informix, Sybase, etc.</font></p>
+<font> </font><p><font>Note that <a href="#starttrans">StartTrans()</a> and CompleteTrans() is a superior method of 
+ handling transactions, available since ADOdb 3.40. For a explanation, see the <a href="#starttrans">StartTrans()</a> documentation.
+
+</font></p><p><font>You can also use the ADOdb <a href="#errorhandling">error handler</a> to die 
+  and rollback your transactions for you transparently. Some buggy database extensions 
+  are known to commit all outstanding tranasactions, so you might want to explicitly 
+  do a $DB-&gt;RollbackTrans() in your error handler for safety. 
+ </font></p><h4><font>Detecting Transactions</font></h4>
+<font> </font><p><font>Since ADOdb 2.50, you are able to detect when you are inside a transaction. Check
+ that $connection-&gt;transCnt &gt; 0. This variable is incremented whenever BeginTrans() is called,
+ and decremented whenever RollbackTrans() or CommitTrans() is called.
+</font></p><p><font><b>CommitTrans<a name="committrans"></a>($ok=true)</b></font></p>
+<p><font>End a transaction successfully. Returns true if successful. If the database 
+  does not support transactions, will return true also as data is always committed. 
+</font></p>
+<p><font>If you pass the parameter $ok=false, the data is rolled back. See example in 
+  BeginTrans().</font></p>
+<p><font><b>RollbackTrans<a name="rollbacktrans"></a>( )</b></font></p>
+<p><font>End a transaction, rollback all changes. Returns true if successful. If the 
+  database does not support transactions, will return false as data is never rollbacked. 
+</font></p>
+ 
+<p><font><b>SetTransactionMode<a name="SetTransactionMode"></a>($mode )</b></font></p>
+<p>SetTransactionMode allows you to pass in the transaction mode to use for all subsequent transactions. 
+Note: if you have persistent connections and using mssql or mysql, you might have to explicitly reset your transaction mode at the beginning of each page request. 
+This is only supported in postgresql, mssql, mysql with InnoDB and oci8 currently. For example:
+<pre>
+$db->SetTransactionMode("SERIALIZABLE");
+$db->BeginTrans();
+$db->Execute(...); $db->Execute(...);
+$db->CommiTrans();
+
+$db->SetTransactionMode(""); // restore to default
+$db->StartTrans();
+$db->Execute(...); $db->Execute(...);
+$db->CompleteTrans();
+</pre>
+
+<p>Supported values to pass in:
+<ul>
+<li>READ UNCOMMITTED (allows dirty reads, but fastest)
+<li>READ COMMITTED (default postgres, mssql and oci8)
+<li>REPEATABLE READ (default mysql)
+<li>SERIALIZABLE (slowest and most restrictive)
+</ul>
+<p>You can also pass in database specific values such as 'SNAPSHOT' for mssql or 'READ ONLY' for oci8/postgres.
+<p>See transaction levels for <a href=http://www.postgresql.org/docs/8.1/interactive/sql-set-transaction.html>PostgreSQL</a>,
+<a href=http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_10005.htm>Oracle</a>,
+<a href=http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html>MySQL</a>, and
+<a href=http://msdn2.microsoft.com/en-US/ms173763.aspx>MS SQL Server</a>.
+<p><font><b>GetAssoc<a name="getassoc1"></a>($sql,$inputarr=false,$force_array=false,$first2cols=false)</b></font></p>
+<p><font>Returns an associative array for the given query $sql with optional bind parameters 
+  in $inputarr. If the number of columns returned is greater to two, a 2-dimensional 
+  array is returned, with the first column of the recordset becomes the keys 
+  to the rest of the rows. If the columns is equal to two, a 1-dimensional array 
+  is created, where the the keys directly map to the values (unless $force_array 
+  is set to true, when an array is created for each value).
+</font></p><p><font> Examples:<a name="getassocex"></a></font></p>
+
+<p><font>We have the following data in a recordset:</font></p>
+<p><font>row1: Apple, Fruit, Edible<br>
+  row2: Cactus, Plant, Inedible<br>
+  row3: Rose, Flower, Edible</font></p>
+<p><font>GetAssoc will generate the following 2-dimensional associative 
+  array:</font></p>
+<p><font>Apple =&gt; array[Fruit, Edible]<br>
+  Cactus =&gt; array[Plant, Inedible]<br>
+  Rose =&gt; array[Flower,Edible]</font></p>
+<p><font>If the dataset is:</font></p>
+<p><font>row1: Apple, Fruit<br>
+row2: Cactus, Plant<br>
+row3: Rose, Flower </font></p>
+<p><font>GetAssoc will generate the following 1-dimensional associative
+  array (with $force_array==false):</font></p>
+<p><font>Apple =&gt; Fruit</font><br>
+  Cactus=&gt;Plant<br>
+  Rose=&gt;Flower </p>
+<p><font>The function returns:</font></p>
+<p><font>The associative array, or false if an error occurs.</font></p>
+<font>
+<p><b>CacheGetAssoc<a name="cachegetassoc"></a>([$secs2cache,] $sql,$inputarr=false,$force_array=false,$first2cols=false)</b></p>
+</font>
+<p><font>Caching version of <a href="#getassoc1">GetAssoc</a> function above.
+</font></p><p><font><b>GetOne<a name="getone"></a>($sql,$inputarr=false)</b></font></p>
+<p><font>Executes the SQL and returns the first field of the first row. The recordset 
+  and remaining rows are discarded for you automatically. If an error occur, false 
+  is returned.</font></p>
+<p><font><b>GetRow<a name="getrow"></a>($sql,$inputarr=false)</b></font></p>
+<p><font>Executes the SQL and returns the first row as an array. The recordset and remaining 
+  rows are discarded for you automatically. If an error occurs, false is returned.</font></p>
+<p><font><b>GetAll<a name="getall"></a>($sql,$inputarr=false)</b></font></p>
+
+<p>Executes the SQL and returns the all the rows as a 2-dimensional 
+  array. The recordset is discarded for you automatically. If an error occurs, 
+  false is returned. <i>GetArray</i> is a synonym for <i>GetAll</i>.</p>
+ <p><b>GetCol<a name="getcol"></a>($sql,$inputarr=false,$trim=false)</b></p>
+
+<p><font>Executes the SQL and returns all elements of the first column as a 
+1-dimensional array. The recordset is discarded for you automatically. If an error occurs, 
+  false is returned.</font></p>
+<p><font><b>CacheGetOne<a name="cachegetone"></a>([$secs2cache,] 
+  $sql,$inputarr=false), CacheGetRow<a name="cachegetrow"></a>([$secs2cache,] $sql,$inputarr=false), CacheGetAll<a name="cachegetall"></a>([$secs2cache,] 
+  $sql,$inputarr=false), CacheGetCol<a name="cachegetcol"></a>([$secs2cache,] 
+  $sql,$inputarr=false,$trim=false)</b></font></p>
+<font> 
+</font><p><font>Similar to above Get* functions, except that the recordset is serialized and 
+  cached in the $ADODB_CACHE_DIR directory for $secs2cache seconds. Good for speeding 
+  up queries on rarely changing data. Note that the $secs2cache parameter is optional. 
+  If omitted, we use the value in $connection-&gt;cacheSecs (default is 3600 seconds, 
+  or 1 hour).</font></p>
+<p><font><b>Prepare<a name="prepare"></a>($sql )</b></font></p>
+ 
+<p><font>Prepares (compiles) an SQL query for repeated execution. Bind parameters
+are denoted by ?, except for the oci8 driver, which uses the traditional Oracle :varname
+convention. 
+  </font></p>
+<p><font>Returns an array containing the original sql statement 
+  in the first array element; the remaining elements of the array are driver dependent. 
+  If there is an error, or we are emulating Prepare( ), we return the original 
+  $sql string. This is because all error-handling has been centralized in Execute( 
+  ).</font></p>
+<p><font>Prepare( ) cannot be used with functions that use SQL 
+  query rewriting techniques, e.g. PageExecute( ) and SelectLimit( ).</font></p>
+<p>Example:</p>
+<pre><font>$stmt = $DB-&gt;Prepare('insert into table (col1,col2) values (?,?)');<br>for ($i=0; $i &lt; $max; $i++)<br></font>	$DB-&gt;<font>Execute($stmt,array((string) rand(), $i));<br></font></pre>
+<font> 
+</font><p><font>Also see InParameter(), OutParameter() and PrepareSP() below. Only supported internally by interbase, 
+  oci8 and selected ODBC-based drivers, otherwise it is emulated. There is no 
+  performance advantage to using Prepare() with emulation. 
+</font></p><p><font> Important: Due to limitations or bugs in PHP, if you are getting errors when 
+  you using prepared queries, try setting $ADODB_COUNTRECS = false before preparing. 
+  This behaviour has been observed with ODBC. 
+</font></p><p><font><b>IfNull<a name="ifnull"></a>($field, $nullReplacementValue)</b></font></p>
+<p><font>Portable IFNULL function (NVL in Oracle). Returns a string that represents 
+  the function that checks whether a $field is null for the given database, and 
+  if null, change the value returned to $nullReplacementValue. Eg.</font></p>
+<pre><font>$sql = <font color="#993300">'SELECT '</font>.$db-&gt;IfNull('name', <font color="#993300">"'- unknown -'"</font>).<font color="#993300"> ' FROM table'</font>;</font></pre>
+
+<p><font><b>length<a name="length"></a></b></font></p>
+<p><font>This is not a function, but a property. Some databases have "length" and others "len"
+as the function to measure the length of a string. To use this property:
+</font></p><pre><font>  $sql = <font color="#993300">"SELECT "</font>.$db-&gt;length.<font color="#993300">"(field) from table"</font>;<br>  $rs = $db-&gt;Execute($sql);<br></font></pre>
+
+<p><font><b>random<a name="random"></a></b></font></p>
+<p><font>This is not a function, but a property. This is a string that holds the sql to
+generate a random number between 0.0 and 1.0 inclusive.
+
+</font></p><p><font><b>substr<a name="substr"></a></b></font></p>
+<p><font>This is not a function, but a property. Some databases have "substr" and others "substring"
+as the function to retrieve a sub-string. To use this property:
+</font></p><pre><font>  $sql = <font color="#993300">"SELECT "</font>.$db-&gt;substr.<font color="#993300">"(field, $offset, $length) from table"</font>;<br>  $rs = $db-&gt;Execute($sql);<br></font></pre>
+<p><font>For all databases, the 1st parameter of <i>substr</i> is the field, the 2nd is the
+offset (1-based) to the beginning of the sub-string, and the 3rd is the length of the sub-string.
+
+
+</font></p><p><font><b>Param<a name="param"></a>($name)</b></font></p>
+<p><font>Generates a bind placeholder portably. For most databases, the bind placeholder 
+  is "?". However some databases use named bind parameters such as Oracle, eg 
+  ":somevar". This allows us to portably define an SQL statement with bind parameters: 
+</font></p><pre><font>$sql = <font color="#993300">'insert into table (col1,col2) values ('</font>.$DB-&gt;Param('a').<font color="#993300">','</font>.$DB-&gt;Param('b').<font color="#993300">')'</font>;<br><font color="#006600"># generates 'insert into table (col1,col2) values (?,?)'<br># or        'insert into table (col1,col2) values (:a,:b)</font>'<br>$stmt = $DB-&gt;Prepare($sql);<br>$stmt = $DB-&gt;Execute($stmt,array('one','two'));<br></font></pre>
+<font> </font>
+<p></p>
+<p><font><b>PrepareSP</b><b><a name="preparesp"></a></b><b>($sql,
+$cursor=false )</b></font></p>
+<p><font>When calling stored procedures in mssql and oci8 (oracle),
+    and you might want to directly bind to parameters that return values, or
+for special LOB handling. PrepareSP() allows you to do so. </font></p>
+<p><font>Returns the same array or $sql string as Prepare( )
+    above. If you do not need to bind to return values, you should use Prepare(
+  ) instead.</font></p>
+<p><font>The 2nd parameter, $cursor is not used except with oci8.
+    Setting it to true will force OCINewCursor to be called; this is to support
+output REF CURSORs. </font></p>
+<p><font>For examples of usage of PrepareSP( ), see InParameter(
+) below. </font></p>
+<p><font>Note: in the mssql driver, preparing stored procedures
+    requires a special function call, mssql_init( ), which is called by this
+    function. PrepareSP( ) is available in all other drivers, and is emulated
+  by calling Prepare( ). </font></p>
+<p><font><b> InParameter<a name="inparameter"></a>($stmt, $var,
+  $name, $maxLen = 4000, $type = false )</b></font></p>
+<font>Binds a PHP variable as input to a stored procedure variable.
+The parameter <i>$stmt</i> is the value returned by PrepareSP(), <i>$var</i> is
+the PHP variable you want to bind, $name is the name of the stored procedure
+variable. Optional is <i>$maxLen</i>, the maximum length of the data to bind,
+and $type which is database dependant. Consult <a href="http://php.net/mssql_bind">mssql_bind</a> and <a href="http://php.net/ocibindbyname">ocibindbyname</a> docs
+at php.net for more info on legal values for $type. </font>
+<p>
+<font>InParameter() is a wrapper function that calls Parameter()
+with $isOutput=false. The advantage of this function is that it is self-documenting,
+because the $isOutput parameter is no longer needed. Only for mssql and oci8
+currently. </font></p>
+<p><font>Here is an example using oci8: </font></p>
+<pre><font><font color="green"># For oracle, Prepare and PrepareSP are identical</font>
+$stmt = $db-&gt;PrepareSP(
+	<font color="#993300">"declare RETVAL integer; <br>	begin<br>	:RETVAL := </font><font color="#993300">SP_RUNSOMETHING</font><font color="#993300">(:myid,:group);<br>	end;"</font>);<br>$db-&gt;InParameter($stmt,$id,'myid');<br>$db-&gt;InParameter($stmt,$group,'group',64);<br>$db-&gt;OutParameter($stmt,$ret,'RETVAL');<br>$db-&gt;Execute($stmt);<br></font></pre>
+<p><font> The same example using mssql:</font></p>
+<font> 
+</font><pre><font><font color="green"># @RETVAL = SP_RUNSOMETHING @myid,@group</font>
+$stmt = $db-&gt;PrepareSP(<font color="#993333">'<font color="#993300">SP_RUNSOMETHING</font>'</font>); <br><font color="green"># note that the parameter name does not have @ in front!</font>
+$db-&gt;InParameter($stmt,$id,'myid');
+$db-&gt;InParameter($stmt,$group,'group',64);
+<font color="green"># return value in mssql - RETVAL is hard-coded name</font> <br>$db-&gt;OutParameter($stmt,$ret,'RETVAL');<br>$db-&gt;Execute($stmt); </font></pre>
+
+<p><font>Note that the only difference between the oci8 and mssql implementations is $sql.</font></p>
+<p>
+<font> If $type parameter is set to false, in mssql, $type will be dynamicly determined 
+based on the type of the PHP variable passed <font face="Courier New, Courier, mono">(string 
+=&gt; SQLCHAR, boolean =&gt;SQLINT1, integer =&gt;SQLINT4 or float/double=&gt;SQLFLT8)</font>.
+</font></p><p><font> 
+In oci8, $type can be set to OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), 
+OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). To 
+pass in a null, use<font face="Courier New, Courier, mono"> $db-&gt;Parameter($stmt, 
+$null=null, 'param')</font>. 
+  </font></p><p><font><b> OutParameter<a name="outparameter"></a>($stmt, $var, $name, 
+  $maxLen = 4000, $type = false )</b></font></p>
+<font>  Binds a PHP variable as output from a stored procedure variable. The parameter <i>$stmt</i>
+ is the value returned by PrepareSP(), <i>$var</i> is the PHP variable you want to bind, <i>$name</i>
+ is the name of the stored procedure variable. Optional is <i>$maxLen</i>, the maximum length of the
+ data to bind, and <i>$type</i> which is database dependant. 
+</font><p>
+<font>  OutParameter() is a wrapper function that calls Parameter() with $isOutput=true. 
+  The advantage of this function is that it is self-documenting, because
+the $isOutput parameter is no longer needed.  Only for mssql 
+  and oci8 currently.
+</font></p><p>
+<font>For an example, see <a href="#inparameter">InParameter</a>.
+
+</font></p><p><font><b> Parameter<a name="parameter"></a>($stmt, $var, $name, $isOutput=false, 
+  $maxLen = 4000, $type = false )</b></font></p>
+<p><font>Note: This function is deprecated, because of the new InParameter() and OutParameter() functions.
+These are superior because they are self-documenting, unlike Parameter().
+</font></p><p><font>Adds a bind parameter suitable for return values or special data handling (eg. 
+  LOBs) after a statement has been prepared using PrepareSP(). Only for mssql 
+  and oci8 currently. The parameters are:<br>
+  <br>
+  $<i><b>stmt</b></i> Statement returned by Prepare() or PrepareSP().<br>
+  $<i><b>var</b></i> PHP variable to bind to. Make sure you pre-initialize it!<br>
+  $<i><b>name</b></i> Name of stored procedure variable name to bind to.<br>
+  [$<i><b>isOutput</b></i>] Indicates direction of parameter 0/false=IN 1=OUT 
+  2= IN/OUT. This is ignored in oci8 as this driver auto-detects the direction.<br>
+  [$<b>maxLen</b>] Maximum length of the parameter variable.<br>
+  [$<b>type</b>] Consult <a href="http://php.net/mssql_bind">mssql_bind</a> and 
+  <a href="http://php.net/ocibindbyname">ocibindbyname</a> docs at php.net for 
+  more info on legal values for type.</font></p>
+<p><font>Lastly, in oci8, bind parameters can be reused without calling PrepareSP( ) 
+  or Parameters again. This is not possible with mssql. An oci8 example:</font></p>
+<pre><font>$id = 0; $i = 0;<br>$stmt = $db-&gt;PrepareSP( <font color="#993300">"update table set val=:i where id=:id"</font>);<br>$db-&gt;Parameter($stmt,$id,'id');<br>$db-&gt;Parameter($stmt,$i, 'i');<br>for ($cnt=0; $cnt &lt; 1000; $cnt++) {<br>	$id = $cnt; <br>	$i = $cnt * $cnt; <font color="green"># works with oci8!</font>
+	$db-&gt;Execute($stmt); <br>}</font></pre>
+<p><font><b>Bind<a name="bind"></a>($stmt, $var, $size=4001, $type=false, $name=false)</b></font></p>
+ 
+<p><font>This is a low-level function supported only by the oci8 
+  driver. <b>Avoid using</b> unless you only want to support Oracle. The Parameter( 
+  ) function is the recommended way to go with bind variables.</font></p>
+<p><font>Bind( ) allows you to use bind variables in your sql 
+  statement. This binds a PHP variable to a name defined in an Oracle sql statement 
+  that was previously prepared using Prepare(). Oracle named variables begin with 
+  a colon, and ADOdb requires the named variables be called :0, :1, :2, :3, etc. 
+  The first invocation of Bind() will match :0, the second invocation will match 
+  :1, etc. Binding can provide 100% speedups for insert, select and update statements. 
+  </font></p>
+<p>The other variables, $size sets the buffer size for data storage, $type is 
+  the optional descriptor type OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), 
+  OCI_B_CLOB (Character-LOB), OCI_B_BLOB (Binary-LOB) and OCI_B_ROWID (ROWID). 
+  Lastly, instead of using the default :0, :1, etc names, you can define your 
+  own bind-name using $name. 
+</p><p><font>The following example shows 3 bind variables being used: 
+  p1, p2 and p3. These variables are bound to :0, :1 and :2.</font></p>
+<pre>$stmt = $DB-&gt;Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");<br>$DB-&gt;Bind($stmt, $p1);<br>$DB-&gt;Bind($stmt, $p2);<br>$DB-&gt;Bind($stmt, $p3);<br>for ($i = 0; $i &lt; $max; $i++) { <br>   $p1 = ?; $p2 = ?; $p3 = ?;<br>   $DB-&gt;Execute($stmt);<br>}</pre>
+<p>You can also use named variables:</p>
+<pre>$stmt = $DB-&gt;Prepare("insert into table (col0, col1, col2) values (:name0, :name1, :name2)");<br>$DB-&gt;Bind($stmt, $p1, "name0");<br>$DB-&gt;Bind($stmt, $p2, "name1");<br>$DB-&gt;Bind($stmt, $p3, "name2");<br>for ($i = 0; $i &lt; $max; $i++) { <br>   $p1 = ?; $p2 = ?; $p3 = ?;<br>   $DB-&gt;Execute($stmt);<br>}</pre>
+<p><b>LogSQL($enable=true)<a name="logsql"></a></b></p>
+Call this method to install a SQL logging and timing function (using fnExecute). 
+Then all SQL statements are logged into an adodb_logsql table in a database. If 
+the adodb_logsql table does not exist, ADOdb will create the table if you have 
+the appropriate permissions. Returns the previous logging value (true for enabled, 
+false for disabled). Here are samples of the DDL for selected databases: 
+<p> 
+</p><pre>		<b>mysql:</b>
+		CREATE TABLE adodb_logsql (
+		  created datetime NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 text NOT NULL,
+		  params text NOT NULL,
+		  tracer text NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)
+		
+		<b>postgres:</b>
+		CREATE TABLE adodb_logsql (
+		  created timestamp NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 text NOT NULL,
+		  params text NOT NULL,
+		  tracer text NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)
+		
+		<b>mssql:</b>
+		CREATE TABLE adodb_logsql (
+		  created datetime NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 varchar(4000) NOT NULL,
+		  params varchar(3000) NOT NULL,
+		  tracer varchar(500) NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)
+		
+		<b>oci8:</b>
+		CREATE TABLE adodb_logsql (
+		  created date NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 varchar(4000) NOT NULL,
+		  params varchar(4000),
+		  tracer varchar(4000),
+		  timer decimal(16,6) NOT NULL
+		)
+</pre>
+Usage: 
+<pre>	$conn-&gt;LogSQL(); // turn on logging<br>	  :<br>	$conn-&gt;Execute(...);<br>	  :<br>	$conn-&gt;LogSQL(false); // turn off logging<br>	<br>	# output summary of SQL logging results<br>	$perf = NewPerfMonitor($conn);<br>	echo $perf-&gt;SuspiciousSQL();<br>	echo $perf-&gt;ExpensiveSQL();<br></pre>
+<p>One limitation of logging is that rollback also prevents SQL from being logged.
+</p><p>
+If you prefer to use another name for the table used to store the SQL, you can override it by calling 
+adodb_perf::table($tablename), where $tablename is the new table name (you will still need to manually
+create the table yourself). An example:
+</p><pre>	include('adodb.inc.php');<br>	include('adodb-perf.inc.php');<br>	adodb_perf::table('my_logsql_table');<br></pre>
+Also see <a href="docs-perf.htm">Performance Monitor</a>. 
+<p><font><b>fnExecute and fnCacheExecute properties<a name="fnexecute" id="fnexecute"></a></b></font></p>
+<p>These two properties allow you to define bottleneck functions for all sql statements 
+  processed by ADOdb. This allows you to perform statistical analysis and query-rewriting 
+  of your sql. 
+</p><p><b>Examples of fnExecute</b></p>
+<p>Here is an example of using fnExecute, to count all cached queries and non-cached 
+  queries, you can do this:</p>
+<pre><font color="#006600"># $db is the connection object</font>
+function &CountExecs($db, $sql, $inputarray)
+{
+global $EXECS;
+
+	if (!is_array(inputarray)) $EXECS++;
+	<font color="#006600"># handle 2-dimensional input arrays</font>
+	else if (is_array(reset($inputarray))) $EXECS += sizeof($inputarray);
+	else $EXECS++;
+	
+	<font color="#006600"># in PHP4.4 and PHP5, we need to return a value by reference</font>
+	$null = null;
+	return $null;
+}
+
+<font color="#006600"># $db is the connection object</font>
+function CountCachedExecs($db, $secs2cache, $sql, $inputarray)
+{<br>global $CACHED; $CACHED++;<br>}<br><br>$db = NewADOConnection('mysql');<br>$db-&gt;Connect(...);<br>$db-&gt;<strong>fnExecute</strong> = 'CountExecs';<br>$db-&gt;<strong>fnCacheExecute</strong> = 'CountCachedExecs';<br> :<br> :<br><font color="#006600"># After many sql statements:</font>`<br>printf("&lt;p&gt;Total queries=%d; total cached=%d&lt;/p&gt;",$EXECS+$CACHED, $CACHED);<br></pre>
+<p>The fnExecute function is called before the sql is parsed and executed, so 
+  you can perform a query rewrite. If you are passing in a prepared statement, 
+  then $sql is an array (see <a href="#prepare">Prepare</a>). The fnCacheExecute 
+  function is only called if the recordset returned was cached.<font> 
+  The function parameters match the Execute and CacheExecute functions respectively, 
+  except that $this (the connection object) is passed as the first parameter.</font></p>
+<p>Since ADOdb 3.91, the behaviour of fnExecute varies depending on whether the 
+  defined function returns a value. If it does not return a value, then the $sql 
+  is executed as before. This is useful for query rewriting or counting sql queries. 
+</p><p> On the other hand, you might want to replace the Execute function with one 
+  of your own design. If this is the case, then have your function return a value. 
+  If a value is returned, that value is returned immediately, without any further 
+  processing. This is used internally by ADOdb to implement LogSQL() functionality. 
+</p>
+<p>
+</p><hr />
+<h3><font>ADOConnection Utility Functions</font></h3>
+<p><font><b>BlankRecordSet<a name="blankrecordset"></a>([$queryid])</b></font></p>
+<p><font>No longer available - removed since 1.99.</font></p>
+<p><font><b>Concat<a name="concat"></a>($s1,$s2,....)</b></font></p>
+<p><font>Generates the sql string used to concatenate $s1, $s2, etc together. Uses the 
+  string in the concat_operator field to generate the concatenation. Override 
+  this function if a concatenation operator is not used, eg. MySQL.</font></p>
+<p><font>Returns the concatenated string.</font></p>
+<p><font><b>DBDate<a name="dbdate"></a>($date)</b></font></p>
+<p><font>Format the $<b>date</b> in the format the database accepts. This is used in 
+  INSERT/UPDATE statements; for SELECT statements, use <a href="#sqldate">SQLDate</a>. 
+  The $<b>date</b> parameter can be a Unix integer timestamp or an ISO format 
+  Y-m-d. Uses the fmtDate field, which holds the format to use. If null or false 
+  or '' is passed in, it will be converted to an SQL null.</font></p>
+<p><font>Returns the date as a quoted string.</font></p>
+<pre>
+	$sql = "select * from atable where created > ".$db->DBDate("$year-$month-$day");
+	$db->Execute($sql);
+</pre>
+<p><font><b>BindDate<a name="binddate"></a>($date)</b></font></p>
+<p><font>Format the $<b>date</b> in the bind format the database accepts. Normally
+ this means that the date string is not quoted, unlike DBDate, which quotes the string.
+<pre>
+	$sql = "select * from atable where created > ".$db->Param('0');
+	// or
+	$sql = "select * from atable where created > ?";
+	$db->Execute($sql,array($db->BindDate("$year-$month-$day"));
+</pre>
+<p><font><b>DBTimeStamp<a name="dbtimestamp"></a>($ts)</b></font></p>
+<p><font>Format the timestamp $<b>ts</b> in the format the database accepts; this can 
+  be a Unix integer timestamp or an ISO format Y-m-d H:i:s. Uses the fmtTimeStamp 
+  field, which holds the format to use. If null or false or '' is passed in, it 
+  will be converted to an SQL null.</font></p>
+<p><font>Returns the timestamp as a quoted string.</font></p>
+<pre>
+	$sql = "select * from atable where created > ".$db->DBTimeStamp("$year-$month-$day $hr:$min:$secs");
+	$db->Execute($sql);
+</pre>
+<p><font><b>BindTimeStamp<a name="bindtimestamp"></a>($ts)</b></font></p>
+<p><font>Format the timestamp $<b>ts</b> in the bind format the database accepts. Normally
+ this means that the timestamp string is not quoted, unlike DBTimeStamp, which quotes the string.
+<pre>
+	$sql = "select * from atable where created > ".$db->Param('0');
+	// or
+	$sql = "select * from atable where created > ?";
+	$db->Execute($sql,array($db->BindTimeStamp("$year-$month-$day $hr:$min:$secs"));
+</pre>
+<p><font><b>qstr<a name="qstr"></a>($s,[$magic_quotes_enabled</b>=false]<b>)</b></font></p>
+<p><font>Quotes a string to be sent to the database. The $<b>magic_quotes_enabled</b> 
+  parameter may look funny, but the idea is if you are quoting a string extracted 
+  from a POST/GET variable, then pass get_magic_quotes_gpc() as the second parameter. 
+  This will ensure that the variable is not quoted twice, once by <i>qstr</i> 
+  and once by the <i>magic_quotes_gpc</i>.</font></p>
+<p><font>Eg.<font face="Courier New, Courier, mono"> $s = $db-&gt;qstr(HTTP_GET_VARS['name'],get_magic_quotes_gpc());</font></font></p>
+<p><font>Returns the quoted string.</font></p>
+<p><font><b>Quote<a name="quote"></a>($s)</b></font></p>
+<p><font>Quotes the string $s, escaping the database specific quote character as appropriate. 
+  Formerly checked magic quotes setting, but this was disabled since 3.31 for 
+  compatibility with PEAR DB. 
+</font></p><p><font><b>Affected_Rows<a name="affected_rows"></a>( )</b></font></p>
+<p><font>Returns the number of rows affected by a update or delete statement. Returns 
+  false if function not supported.</font></p>
+<p><font>Not supported by interbase/firebird currently. </font></p>
+<p><font><b>Insert_ID<a name="inserted_id"></a>( )</b></font></p>
+<p><font>Returns the last autonumbering ID inserted. Returns false if function not supported. 
+</font></p>
+<p><font>Only supported by databases that support auto-increment or object id's, such 
+  as PostgreSQL, MySQL and MS SQL Server currently. PostgreSQL returns the OID, which 
+  can change on a database reload.</font></p>
+<p><font><b>RowLock<a name="rowlock"></a>($table,$where)</b></font></p>
+<p><font>Lock a table row for the duration of a transaction. For example to lock record $id in table1:
+</font></p><pre><font>	$DB-&gt;StartTrans();<br>	$DB-&gt;RowLock("table1","rowid=$id");<br>	$DB-&gt;Execute($sql1);<br>	$DB-&gt;Execute($sql2);<br>	$DB-&gt;CompleteTrans();<br></font></pre>
+<p><font>Supported in db2, interbase, informix, mssql, oci8, postgres, sybase.
+</font></p><p><font><b>MetaDatabases<a name="metadatabases"></a>()</b></font></p>
+<p><font>Returns a list of databases available on the server as an array. You have to 
+  connect to the server first. Only available for ODBC, MySQL and ADO.</font></p>
+<p><font><b>MetaTables<a name="metatables"></a>($ttype = false, $showSchema = false, 
+  $mask=false)</b></font></p>
+<p><font>Returns an array of tables and views for the current database as an array. 
+  The array should exclude system catalog tables if possible. To only show tables, 
+  use $db-&gt;MetaTables('TABLES'). To show only views, use $db-&gt;MetaTables('VIEWS'). 
+  The $showSchema parameter currently works only for DB2, and when set to true, 
+  will add the schema name to the table, eg. "SCHEMA.TABLE". </font></p>
+<p><font>You can define a mask for matching. For example, setting $mask = 'TMP%' will 
+  match all tables that begin with 'TMP'. Currently only mssql, oci8, odbc_mssql 
+  and postgres* support $mask. 
+</font></p><p><font><b>MetaColumns<a name="metacolumns"></a>($table,$notcasesensitive=true)</b></font></p>
+<p><font>Returns an array of ADOFieldObject's, one field object for every column of 
+  $table. A field object is a class instance with (name, type, max_length) defined.
+  Currently Sybase does not recognise date types, and ADO cannot identify 
+  the correct data type (so we default to varchar).   
+ </font></p><p><font> The $notcasesensitive parameter determines whether we uppercase or lowercase the table name to normalize it
+ (required for some databases). Does not work with MySQL ISAM tables.
+ </font></p><p><font>For schema support, pass in the $table parameter, "$schema.$tablename". This is only
+ supported for selected databases.
+</font></p><p><font><b>MetaColumnNames<a name="metacolumnames"></a>($table,$numericIndex=false)</b></font></p>
+<p><font>Returns an array of column names for $table. Since ADOdb 4.22, this is an associative array, with the
+keys in uppercase. Set $numericIndex=true if you want the old behaviour of numeric indexes (since 4.23).
+</font></p><p>
+<font>e.g. array('FIELD1' =&gt; 'Field1', 'FIELD2'=&gt;'Field2')
+</font></p><p>
+</p><p><font><b>MetaPrimaryKeys<a name="metaprimarykeys"></a>($table,
+      $owner=false)</b></font> 
+</p>
+<p><font>Returns an array containing column names that are the 
+  primary keys of $table. Supported by mysql, odbc (including db2, odbc_mssql, 
+etc), mssql, postgres, interbase/firebird, oci8 currently. </font></p>
+<p><font>Views (and some tables) have primary keys, but sometimes this information is not available from the
+database. You can define a function  ADODB_View_PrimaryKeys($databaseType, $database, $view, $owner) that
+should return an array containing the fields that make up the primary key. If that function exists,
+it will be called when MetaPrimaryKeys() cannot find a primary key for a table or view.
+</font></p><pre><font>// In this example: dbtype = 'oci8', $db = 'mydb', $view = 'dataView', $owner = false <br>function ADODB_View_PrimaryKeys($dbtype,$db,$view,$owner)<br>{<br>	switch(strtoupper($view)) {<br>	case 'DATAVIEW': return array('DATAID');<br>	default: return false;<br>	}<br>}<br><br>$db = NewADOConnection('oci8');<br>$db-&gt;Connect('localhost','root','','mydb'); <br>$db-&gt;MetaPrimaryKeys('dataView');<br></font></pre>
+<p><font><b>ServerInfo<a name="serverinfo" id="serverinfo"></a>()</b></font> 
+</p>
+<p><font>Returns an array of containing two elements 'description' 
+  and 'version'. The 'description' element contains the string description of 
+  the database. The 'version' naturally holds the version number (which is also 
+a string).</font></p>
+<p><font><b>MetaForeignKeys<a name="metaforeignkeys"></a>($table, $owner=false, $upper=false)</b> 
+</font></p><p><font>Returns an associate array of foreign keys, or false if not supported. For 
+  example, if table employee has a foreign key where employee.deptkey points to 
+  dept_table.deptid, and employee.posn=posn_table.postionid and employee.poscategory=posn_table.category, 
+  then $conn-&gt;MetaForeignKeys('employee') will return 
+</font></p><pre><font>	array(<br>		'dept_table' =&gt; array('deptkey=deptid'),<br>		'posn_table' =&gt; array('posn=positionid','poscategory=category')<br>	)<br></font></pre>
+<p><font>The optional schema or owner can be defined in $owner. If $upper is true, then 
+  the table names (array keys) are upper-cased. 
+</font></p><hr />
+<h2><font>ADORecordSet<a name="adorecordset"></a></font></h2>
+<p><font>When an SQL statement successfully is executed by <font face="Courier New, Courier, mono">ADOConnection-&gt;Execute($sql),</font>an 
+  ADORecordSet object is returned. This object contains a virtual cursor so we 
+  can move from row to row, functions to obtain information about the columns 
+  and column types, and helper functions to deal with formating the results to 
+  show to the user.</font></p>
+<h3><font>ADORecordSet Fields</font></h3>
+<p><font><b>fields: </b>Array containing the current row. This is not associative, but 
+  is an indexed array from 0 to columns-1. See also the function <b><a href="#fields">Fields</a></b>, 
+  which behaves like an associative array.</font></p>
+<p><font><b>dataProvider</b>: The underlying mechanism used to connect to the database. 
+  Normally set to <b>native</b>, unless using <b>odbc</b> or <b>ado</b>.</font></p>
+<p><font><b>blobSize</b>: Maximum size of a char, string or varchar object before it 
+  is treated as a Blob (Blob's should be shown with textarea's). See the <a href="#metatype">MetaType</a> 
+  function.</font></p>
+<p><font><b>sql</b>: Holds the sql statement used to generate this record set.</font></p>
+<p><font><b>canSeek</b>: Set to true if Move( ) function works.</font></p>
+<p><font><b>EOF</b>: True if we have scrolled the cursor past the last record.</font></p>
+<h3><font>ADORecordSet Functions</font></h3>
+<p><font><b>ADORecordSet( )</b></font></p>
+<p><font>Constructer. Normally you never call this function yourself.</font></p>
+<p><font><b>GetAssoc<a name="getassoc"></a>([$force_array])</b></font></p>
+<p><font>Generates an associative array from the recordset. Note that is this function 
+  is also <a href="#getassoc1">available</a> in the connection object. More details 
+  can be found there.</font></p>
+<font> </font>
+<p><font><b>GetArray<a name="getarray"></a>([$number_of_rows])</b></font></p>
+<p><font>Generate a 2-dimensional array of records from the current
+    cursor position, indexed from 0 to $number_of_rows - 1. If $number_of_rows
+  is undefined, till EOF.</font></p>
+<p><font><b>GetRows<a name="getrows"></a>([$number_of_rows])</b></font></p>
+<font>Generate a 2-dimensional array of records from the current
+cursor position. Synonym for GetArray() for compatibility with Microsoft ADO. </font>
+<p><font> <b>GetMenu<a name="getmenu"></a>($name, [$default_str=''],
+  [$blank1stItem=true], [$multiple_select=false], [$size=0], [$moreAttr=''])</b></font></p>
+<p><font>Generate a HTML menu (&lt;select&gt;&lt;option&gt;&lt;option&gt;&lt;/select&gt;).
+    The first column of the recordset (fields[0]) will hold the string to display
+    in the option tags. If the recordset has more than 1 column, the second column
+    (fields[1]) is the value to send back to the web server.. The menu will be
+given the name $<i>name</i>. </font></p>
+<p><font> If $<i>default_str</i> is defined, then if $<i>default_str</i> ==
+    fields[0], that field is selected. If $<i>blank1stItem</i> is true, the first
+    option is empty. You can also set the first option strings by setting $blank1stItem
+  = "$value:$text".</font></p>
+<p><font>$<i>Default_str</i> can be array for a multiple select
+listbox.</font></p>
+<p><font>To get a listbox, set the $<i>size</i> to a non-zero
+    value (or pass $default_str as an array). If $<i>multiple_select</i> is true
+    then a listbox will be generated with $<i>size</i> items (or if $size==0,
+    then 5 items) visible, and we will return an array to a server. Lastly use
+  $<i>moreAttr </i> to add additional attributes such as javascript or styles. </font></p>
+<p><font>Menu Example 1: <code>GetMenu('menu1','A',true)</code> will
+    generate a menu:
+    <select name="menu1"><option> </option><option value="1" selected="selected">A </option><option value="2">B </option><option value="3">C </option></select>
+for the data (A,1), (B,2), (C,3). Also see <a href="#ex5">example 5</a>.</font></p>
+<p><font>Menu Example 2: For the same data, <code>GetMenu('menu1',array('A','B'),false)</code> will
+    generate a menu with both A and B selected: <br>
+    <select name="menu1" multiple="multiple" size="3"><option value="1" selected="selected">A </option><option value="2" selected="selected">B </option><option value="3">C </option></select>
+</font></p>
+<p><font> <b>GetMenu2<a name="getmenu2"></a>($name, [$default_str=''],
+  [$blank1stItem=true], [$multiple_select=false], [$size=0], [$moreAttr=''])</b></font></p>
+<p><font>This is nearly identical to GetMenu, except that the
+  $<i>default_str</i> is matched to fields[1] (the option values).</font></p>
+<p><font>Menu Example 3: Given the data in menu example 2, <code>GetMenu2('menu1',array('1','2'),false)</code> will
+    generate a menu with both A and B selected in menu example 2, but this time
+    the selection is based on the 2nd column, which holds the values to return
+to the Web server. </font></p>
+<p><font><b>UserDate<a name="userdate"></a>($str, [$fmt])</b></font></p>
+<p><font>Converts the date string $<i>str</i> to another format.
+    The date format is Y-m-d, or Unix timestamp format. The default $<i>fmt</i> is
+Y-m-d.</font></p>
+<p><font><b>UserTimeStamp<a name="usertimestamp"></a>($str, [$fmt])</b></font></p>
+<p><font>Converts the timestamp string $<b>str</b> to another
+    format. The timestamp format is Y-m-d H:i:s, as in '2002-02-28 23:00:12',
+    or Unix timestamp format. UserTimeStamp calls UnixTimeStamp to parse $<i>str</i>,
+and $<i>fmt</i> defaults to Y-m-d H:i:s if not defined. </font></p>
+<p><font><b>UnixDate<a name="unixdate"></a>($str)</b></font></p>
+<p><font>Parses the date string $<b>str</b> and returns it in
+    unix mktime format (eg. a number indicating the seconds after January 1st,
+    1970). Expects the date to be in Y-m-d H:i:s format, except for Sybase and
+    Microsoft SQL Server, where M d Y is also accepted (the 3 letter month strings
+  are controlled by a global array, which might need localisation).</font></p>
+<p><font>This function is available in both ADORecordSet and
+ADOConnection since 1.91.</font></p>
+<p><font><b>UnixTimeStamp<a name="unixtimestamp"></a>($str)</b></font></p>
+<p><font>Parses the timestamp string $<b>str</b> and returns
+    it in unix mktime format (eg. a number indicating the seconds after January
+    1st, 1970). Expects the date to be in "Y-m-d, H:i:s" (1970-12-24, 00:00:00)
+    or "Y-m-d H:i:s" (1970-12-24 00:00:00) or "YmdHis" (19701225000000) format,
+    except for Sybase and Microsoft SQL Server, where "M d Y h:i:sA" (Dec 25
+    1970 00:00:00AM) is also accepted (the 3 letter month strings are controlled
+by a global array, which might need localisation).</font></p>
+<font> 
+</font><p><font>This function is available in both ADORecordSet
+    and ADOConnection since 1.91. </font></p>
+<p><font><b>OffsetDate<a name="OffsetDate"></a>($dayFraction,
+  $basedate=false)</b></font></p>
+<p><font>Returns a string with the native SQL functions to calculate
+    future and past dates based on $basedate in a portable fashion. If $basedate
+    is not defined, then the current date (at 12 midnight) is used. Returns the
+  SQL string that performs the calculation when passed to Execute(). </font></p>
+<p><font>For example, in Oracle, to find the date and time that
+  is 2.5 days from today, you can use:</font></p>
+<pre><font># get date one week from now<br>$fld = $conn-&gt;OffsetDate(7); // returns "(trunc(sysdate)+7")</font></pre>
+<pre><font># get date and time that is 60 hours from current date and time<br>$fld = $conn-&gt;OffsetDate(2.5, $conn-&gt;sysTimeStamp);	// returns "(sysdate+2.5)"<br><br>$conn-&gt;Execute("UPDATE TABLE SET dodate=$fld WHERE ID=$id");</font></pre>
+<p><font> This function is available for mysql, mssql, oracle, oci8 and postgresql drivers 
+  since 2.13. It might work with other drivers provided they allow performing
+  numeric day arithmetic on dates.</font></p>
+<font> </font>
+<p><font><b>SQLDate<a name="sqldate"></a>($dateFormat, $basedate=false)</b></font></p>
+<font>Returns a string which contains the native SQL functions
+to format a date or date column $basedate. This is used in SELECT statements.
+For INSERT/UPDATE statements, use <a href="#dbdate">DBDate</a>. It uses a case-sensitive
+$dateFormat, which supports: </font>
+<pre><font> 
+  Y: 4-digit Year
+  Q: Quarter (1-4)
+  M: Month (Jan-Dec)
+  m: Month (01-12)
+  d: Day (01-31)
+  H: Hour (00-23)
+  h: Hour (1-12)
+  i: Minute (00-59)
+  s: Second (00-60)
+  A: AM/PM indicator
+  w: day of week (0-6 or 1-7 depending on DB)
+  l: day of week (as string - lowercase L)
+  W: week in year (0..53 for MySQL, 1..53 for PostgreSQL and Oracle)
+  </font></pre>
+<p><font>All other characters are treated as strings. You can
+    also use \ to escape characters. Available on selected databases, including
+mysql, postgresql, mssql, oci8 and DB2. </font></p>
+<p><font>This is useful in writing portable sql statements that
+    GROUP BY on dates. For example to display total cost of goods sold broken
+by quarter (dates are stored in a field called postdate): </font></p>
+<pre><font> $sqlfn = $db-&gt;SQLDate('Y-\QQ','postdate'); # get sql that formats postdate to output 2002-Q1<br> $sql = "SELECT $sqlfn,SUM(cogs) FROM table GROUP BY $sqlfn ORDER BY 1 desc";<br> </font></pre>
+<p><font><b>MoveNext<a name="movenext"></a>( )</b></font></p>
+<p><font>Move the internal cursor to the next row. The <i>$this-&gt;fields</i> array
+    is automatically updated. Returns false if unable to do so (normally because
+EOF has been reached), otherwise true. </font></p>
+<p><font> If EOF is reached, then the $this-&gt;fields array
+    is set to false (this was only implemented consistently in ADOdb 3.30). For
+    the pre-3.30 behaviour of $this-&gt;fields (at EOF), set the global variable
+  $ADODB_COMPAT_FETCH = true.</font></p>
+<p><font>Example:</font></p>
+<pre><font>$rs = $db-&gt;Execute($sql);<br>if ($rs) <br>	while (!$rs-&gt;EOF) {<br> 		ProcessArray($rs-&gt;fields);	<br>		$rs-&gt;MoveNext();<br>	} </font></pre>
+<p><font><b>Move<a name="move"></a>($to)</b></font></p>
+<p><font>Moves the internal cursor to a specific row $<b>to</b>.
+    Rows are zero-based eg. 0 is the first row. The <b>fields</b> array is automatically
+    updated. For databases that do not support scrolling internally, ADOdb will
+    simulate forward scrolling. Some databases do not support backward scrolling.
+    If the $<b>to</b> position is after the EOF, $<b>to</b> will move to the
+    end of the RecordSet for most databases. Some obscure databases using odbc
+  might not behave this way.</font></p>
+<p><font>Note: This function uses <i>absolute positioning</i>,
+unlike Microsoft's ADO.</font></p>
+<p><font>Returns true or false. If false, the internal cursor
+    is not moved in most implementations, so AbsolutePosition( ) will return
+  the last cursor position before the Move( ). </font></p>
+<p><font><b>MoveFirst<a name="movefirst"></a>()</b></font></p>
+<p><font>Internally calls Move(0). Note that some databases do
+not support this function.</font></p>
+<p><font><b>MoveLast<a name="movelast"></a>()</b></font></p>
+<p><font>Internally calls Move(RecordCount()-1). Note that some
+  databases do not support this function.</font></p>
+<p><font><b>GetRowAssoc</b><a name="getrowassoc"></a>($toUpper=true)</font></p>
+<p><font>Returns an associative array containing the current
+    row. The keys to the array are the column names. The column names are upper-cased
+  for easy access. To get the next row, you will still need to call MoveNext(). </font></p>
+<p><font>For example:<br>
+Array ( [ID] =&gt; 1 [FIRSTNAME] =&gt; Caroline [LASTNAME] =&gt; Miranda [CREATED]
+=&gt; 2001-07-05 ) </font></p>
+<p><font>Note: do not use GetRowAssoc() with $ADODB_FETCH_MODE
+    = ADODB_FETCH_ASSOC. Because they have the same functionality, they will
+  interfere with each other.</font></p>
+<font> 
+</font><p><font><b>AbsolutePage<a name="absolutepage"></a>($page=-1) </b></font></p>
+<p><font>Returns the current page. Requires PageExecute()/CachePageExecute() to be called. 
+  See <a href="#ex8">Example 8</a>.</font></p>
+<font>
+<p><b>AtFirstPage<a name="atfirstpage">($status='')</a></b></p>
+<p>Returns true if at first page (1-based). Requires PageExecute()/CachePageExecute()
+  to be called. See <a href="#ex8">Example 8</a>.</p>
+<p><b>AtLastPage<a name="atlastpage">($status='')</a></b></p>
+<p>Returns true if at last page (1-based). Requires PageExecute()/CachePageExecute()
+  to be called. See <a href="#ex8">Example 8</a>.</p>
+<p><b>Fields</b><a name="fields"></a>(<b>$colname</b>)</p>
+<p>Returns the value of the associated column $<b>colname</b> for the current
+  row. The column name is case-insensitive.</p>
+<p>This is a convenience function. For higher performance, use <a href="#adodb_fetch_mode">$ADODB_FETCH_MODE</a>. </p>
+<p><b>FetchRow</b><a name="fetchrow"></a>()</p> 
+</font><p><font>Returns array containing current row, or false
+    if EOF. FetchRow( ) internally moves to the next record after returning the
+    current row. </font></p>
+<p><font>Warning: Do not mix using FetchRow() with MoveNext().</font></p>
+<p><font>Usage:</font></p>
+<pre><font>$rs = $db-&gt;Execute($sql);<br>if ($rs)<br>	while ($arr = $rs-&gt;FetchRow()) {<br>	   &nbsp;&nbsp;# process $arr	<br>	}</font></pre>
+<p><font><b>FetchInto</b><a name="fetchinto"></a>(<b>&amp;$array</b>)</font></p>
+<p><font> Sets $array to the current row. Returns PEAR_Error
+    object if EOF, 1 if ok (DB_OK constant). If PEAR is undefined, false is returned
+    when EOF. FetchInto( ) internally moves to the next record after returning
+  the current row. </font></p>
+<p><font> FetchRow() is easier to use. See above.</font></p>
+<font> </font>
+<p><font><b>FetchField<a name="fetchfield"></a>($column_number)</b></font></p>
+<p><font>Returns an object containing the <b>name</b>, <b>type</b> and <b>max_length</b> of
+    the associated field. If the max_length cannot be determined reliably, it
+    will be set to -1. The column numbers are zero-based. See <a href="#ex2">example
+  2.</a></font></p>
+<p><font><b>FieldCount<a name="fieldcount"></a>( )</b></font></p>
+<p><font>Returns the number of fields (columns) in the record
+set.</font></p>
+<p><font><b>RecordCount<a name="recordcount"></a>( )</b></font></p>
+<p><font>Returns the number of rows in the record set. If the
+    number of records returned cannot be determined from the database driver
+    API, we will buffer all rows and return a count of the rows after all the
+    records have been retrieved. This buffering can be disabled (for performance
+    reasons) by setting the global variable $ADODB_COUNTRECS = false. When disabled,
+    RecordCount( ) will return -1 for certain databases. See the supported databases
+  list above for more details. </font></p>
+<p><font> RowCount is a synonym for RecordCount.</font></p>
+<p><font><b>PO_RecordCount<a name="po_recordcount"></a>($table,
+$where)</b></font></p>
+<p><font>Returns the number of rows in the record set. If the
+    database does not support this, it will perform a SELECT COUNT(*) on the
+    table $table, with the given $where condition to return an estimate of the
+  recordset size.</font></p>
+<p><font>$numrows = $rs-&gt;PO_RecordCount("articles_table", "group=$group");</font></p>
+<font><b> NextRecordSet<a name="nextrecordset" id="nextrecordset"></a>()</b> </font>
+<p><font>For databases that allow multiple recordsets to be returned
+    in one query, this function allows you to switch to the next recordset. Currently
+  only supported by mssql driver.</font></p>
+<pre><font>$rs = $db-&gt;Execute('execute return_multiple_rs');<br>$arr1 = $rs-&gt;GetArray();<br>$rs-&gt;NextRecordSet();<br>$arr2 = $rs-&gt;GetArray();</font></pre>
+<p><font><b>FetchObject<a name="fetchobject"></a>($toupper=true)</b></font></p>
+<p><font>Returns the current row as an object. If you set $toupper
+    to true, then the object fields are set to upper-case. Note: The newer FetchNextObject()
+  is the recommended way of accessing rows as objects. See below.</font></p>
+<p><font><b>FetchNextObject<a name="fetchnextobject"></a>($toupper=true)</b></font></p>
+<p><font>Gets the current row as an object and moves to the next
+    row automatically. Returns false if at end-of-file. If you set $toupper to
+  true, then the object fields are set to upper-case. Note that for some drivers such as mssql, you need to SetFetchMode(ADODB_FETCH_ASSOC) or SetFetchMode(ADODB_FETCH_BOTH).</font></p>
+<pre><font>$rs = $db-&gt;Execute('select firstname,lastname from table');<br>if ($rs) {<br>	while ($o = $rs-&gt;FetchNextObject()) {<br>		print "$o-&gt;FIRSTNAME, $o-&gt;LASTNAME&lt;BR&gt;";<br>	}<br>}<br></font></pre>
+<p><font>There is some trade-off in speed in using FetchNextObject().
+If performance is important, you should access rows with the <code>fields[]</code> array. <b>FetchObj<a name="fetchobj" id="fetchobj"></a>()</b> </font></p>
+<p><font>Returns the current record as an object. Fields are
+    not upper-cased, unlike FetchObject.  
+</font></p>
+<p><font><b>FetchNextObj<a name="fetchnextobj" id="fetchnextobj"></a>()</b> </font></p>
+<p><font>Returns the current record as an object and moves to
+    the next record. If EOF, false is returned. Fields are not upper-cased, unlike
+  FetctNextObject. </font></p>
+<font>
+<p><b>CurrentRow<a name="currentrow"></a>( )</b></p>
+<p>Returns the current row of the record set. 0 is the first row.</p>
+<p><b>AbsolutePosition<a name="abspos"></a>( )</b></p>
+<p>Synonym for <b>CurrentRow</b> for compatibility with ADO. Returns the current
+  row of the record set. 0 is the first row.</p>
+<p><b>MetaType<a name="metatype"></a>($nativeDBType[,$field_max_length],[$fieldobj])</b></p>
+<p>Determine what <i>generic</i> meta type a database field type is given its
+  native type $<b>nativeDBType</b> as a string and the length of the field $<b>field_max_length</b>.
+  Note that field_max_length can be -1 if it is not known. The field object returned
+  by FetchField() can be passed in $<b>fieldobj</b> or as the 1st parameter <b>$nativeDBType</b>.
+  This is useful for databases such as <i>mysql</i> which has additional properties
+  in the field object such as <i>primary_key</i>. </p>
+<p>Uses the field <b>blobSize</b> and compares it with $<b>field_max_length</b> to
+  determine whether the character field is actually a blob.</p>
+For example, $db-&gt;MetaType('char') will return 'C'.
+<p>Returns:</p>
+<ul>
+  <li><b>C</b>: Character fields that should be shown in a &lt;input type="text"&gt; tag. </li>
+  <li><b>X</b>: Clob (character large objects), or large text fields that should
+    be shown in a &lt;textarea&gt;</li>
+  <li><b>D</b>: Date field</li>
+  <li><b>T</b>: Timestamp field</li>
+  <li><b>L</b>: Logical field (boolean or bit-field)</li>
+  <li><b>N</b>: Numeric field. Includes decimal, numeric, floating point, and
+    real. </li>
+  <li><b>I</b>:&nbsp; Integer field. </li>
+  <li><b>R</b>: Counter or Autoincrement field. Must be numeric.</li>
+  <li><b>B</b>: Blob, or binary large objects. </li>
+</ul> 
+</font><p><font> Since ADOdb 3.0, MetaType accepts $fieldobj
+    as the first parameter, instead of $nativeDBType. </font></p>
+<font> </font>
+<p><font><b>Close( )<a name="rsclose"></a></b></font></p>
+<p><font>Closes the recordset, cleaning all memory and resources
+associated with the recordset. </font></p>
+<p>
+<font>If memory management is not an issue, you do not need to
+call this function as recordsets are closed for you by PHP at the end of the
+script. SQL statements such as INSERT/UPDATE/DELETE do not really return a recordset,
+so you do not have to call Close() for such SQL statements.</font></p>
+<hr />
+<h3><font>function rs2html<a name="rs2html"></a>($adorecordset,[$tableheader_attributes],
+  [$col_titles])</font></h3>
+<p><font>This is a standalone function (rs2html = recordset to
+    html) that is similar to PHP's <i>odbc_result_all</i> function, it prints
+    a ADORecordSet, $<b>adorecordset</b> as a HTML table. $<b>tableheader_attributes</b> allow
+    you to control the table <i>cellpadding</i>, <i>cellspacing</i> and <i>border</i> attributes.
+    Lastly you can replace the database column names with your own column titles
+    with the array $<b>col_titles</b>. This is designed more as a quick debugging
+  mechanism, not a production table recordset viewer.</font></p>
+<p><font>You will need to include the file <i>tohtml.inc.php</i>.</font></p>
+<p><font>Example of rs2html:<b><font color="#336600"><a name="exrs2html"></a></font></b></font></p>
+<pre><font><b><font color="#336600">&lt;?<br>include('tohtml.inc.php')</font></b>; # load code common to ADOdb <br><b>include</b>('adodb.inc.php'); # load code common to ADOdb <br>$<font color="#663300">conn</font> = &amp;ADONewConnection('mysql');   # create a connection <br>$<font color="#663300">conn</font>-&gt;PConnect('localhost','userid','','agora');# connect to MySQL, agora db<br>$<font color="#663300">sql</font> = 'select CustomerName, CustomerID from customers'; <br>$<font color="#663300">rs</font>   = $<font color="#663300">conn</font>-&gt;Execute($sql); <br><font color="#336600"><b>rs2html</b></font><b>($<font color="#663300">rs</font>,'<i>border=2 cellpadding=3</i>',array('<i>Customer Name','Customer ID</i>'));<br>?&gt;</b></font></pre>
+<hr />
+<h3><font>Differences between this ADOdb library and Microsoft
+ADO<a name="adodiff"></a></font></h3>
+<ol>
+<font>
+<li>ADOdb only supports recordsets created by a connection object. Recordsets
+  cannot be created independently.</li>
+<li>ADO properties are implemented as functions in ADOdb. This makes it easier
+  to implement any enhanced ADO functionality in the future.</li>
+<li>ADOdb's <font face="Courier New, Courier, mono">ADORecordSet-&gt;Move()</font> uses
+  absolute positioning, not relative. Bookmarks are not supported.</li>
+<li><font face="Courier New, Courier, mono">ADORecordSet-&gt;AbsolutePosition() </font>cannot
+  be used to move the record cursor.</li>
+<li>ADO Parameter objects are not supported. Instead we have the ADOConnection::<a href="#parameter">Parameter</a>(
+  ) function, which provides a simpler interface for calling preparing parameters
+  and calling stored procedures.</li>
+<li>Recordset properties for paging records are available, but implemented as
+  in <a href="#ex8">Example 8</a>.</li>
+</font></ol>
+<hr />
+<h1><font>Database Driver Guide<a name="driverguide"></a></font></h1>
+<p><font>This describes how to create a class to connect to a
+    new database. To ensure there is no duplication of work, kindly email me
+  at jlim#natsoft.com.my if you decide to create such a class.</font></p>
+<p><font>First decide on a name in lower case to call the database
+  type. Let's say we call it xbase. </font></p>
+<p><font>Then we need to create two classes ADODB_xbase and ADORecordSet_xbase
+  in the file adodb-xbase.inc.php.</font></p>
+<p><font>The simplest form of database driver is an adaptation
+    of an existing ODBC driver. Then we just need to create the class <i>ADODB_xbase
+    extends ADODB_odbc</i> to support the new <b>date</b> and <b>timestamp</b> formats,
+    the <b>concatenation</b> operator used, <b>true</b> and <b>false</b>. For
+    the<i> ADORecordSet_xbase extends ADORecordSet_odbc </i>we need to change
+  the <b>MetaType</b> function. See<b> adodb-vfp.inc.php</b> as an example.</font></p>
+<p><font>More complicated is a totally new database driver that
+    connects to a new PHP extension. Then you will need to implement several
+    functions. Fortunately, you do not have to modify most of the complex code.
+    You only need to override a few stub functions. See <b>adodb-mysql.inc.php</b> for
+  example.</font></p>
+<p><font>The default date format of ADOdb internally is YYYY-MM-DD
+    (Ansi-92). All dates should be converted to that format when passing to an
+    ADOdb date function. See Oracle for an example how we use ALTER SESSION to
+  change the default date format in _pconnect _connect.</font></p>
+<p><font><b>ADOConnection Functions to Override</b></font></p>
+<p><font>Defining a constructor for your ADOConnection derived
+  function is optional. There is no need to call the base class constructor.</font></p>
+<p><font>_<b>connect</b>: Low level implementation of Connect.
+  Returns true or false. Should set the _<b>connectionID</b>.</font></p>
+<p><font>_<b>pconnect:</b> Low level implemention of PConnect.
+  Returns true or false. Should set the _<b>connectionID</b>.</font></p>
+<p><font>_<b>query</b>: Execute a query. Returns the queryID,
+or false.</font></p>
+<p><font>_<b>close: </b>Close the connection -- PHP should clean
+up all recordsets. </font></p>
+<p><font><b>ErrorMsg</b>: Stores the error message in the private
+variable _errorMsg. </font></p>
+<p><font><b>ADOConnection Fields to Set</b></font></p>
+<p><font>_<b>bindInputArray</b>: Set to true if binding of parameters
+  for SQL inserts and updates is allowed using ?, eg. as with ODBC.</font></p>
+<p><font><b>fmtDate</b></font></p>
+<p><font><b>fmtTimeStamp</b></font></p>
+<p><font><b>true</b></font></p>
+<p><font><b>false</b></font></p>
+<p><font><b>concat_operator</b></font></p>
+<p><font><b>replaceQuote</b></font></p>
+<p><font><b>hasLimit</b> support SELECT * FROM TABLE LIMIT 10
+of MySQL.</font></p>
+<p><font><b>hasTop</b> support Microsoft style SELECT TOP 10
+* FROM TABLE.</font></p>
+<p><font><b>ADORecordSet Functions to Override</b></font></p>
+<p><font>You will need to define a constructor for your ADORecordSet
+  derived class that calls the parent class constructor.</font></p>
+<p><font><b>FetchField: </b> as documented above in ADORecordSet</font></p>
+<p><font>_<b>initrs</b>: low level initialization of the recordset:
+    setup the _<b>numOfRows</b> and _<b>numOfFields</b> fields -- called by the
+  constructor.</font></p>
+<p><font>_<b>seek</b>: seek to a particular row. Do not load
+    the data into the fields array. This is done by _fetch. Returns true or false.
+    Note that some implementations such as Interbase do not support seek. Set
+  canSeek to false.</font></p>
+<p><font>_<b>fetch</b>: fetch a row using the database extension
+    function and then move to the next row. Sets the <b>fields</b> array. If
+    the parameter $ignore_fields is true then there is no need to populate the <b>fields</b> array,
+  just move to the next row. then Returns true or false.</font></p>
+<p><font>_<b>close</b>: close the recordset</font></p>
+<p><font><b>Fields</b>: If the array row returned by the PHP
+    extension is not an associative one, you will have to override this. See
+    adodb-odbc.inc.php for an example. For databases such as MySQL and MSSQL
+    where an associative array is returned, there is no need to override this
+  function.</font></p>
+<p><font><b>ADOConnection Fields to Set</b></font></p>
+<p><font>canSeek: Set to true if the _seek function works.</font></p>
+<h2><font>Optimizing PHP</font></h2>
+    For info on tuning PHP, read this article on <a href="http://phplens.com/lens/php-book/optimizing-debugging-php.php">Optimizing
+  PHP</a>. </font></p>
+
+<h2><font>Change Log<a name="Changes"></a><a name="changes"></a><a name="changelog"></a></font></h2>
+
+<p><a name="4.94"></a><b>4.94 23 Jan 2007</b>
+<p>Active Record: $ADODB_ASSOC_CASE=2 did not work properly. Fixed. Thx gmane#auxbuss.com.
+<p>mysqli had bugs in BeginTrans() and EndTrans(). Fixed.</p>
+<p>Improved error handling when no database is connected for oci8. Thx Andy Hassall.</p>
+<p>Names longer than 30 chars in oci8 datadict will be changed to random name. Thx Eugenio. http://phplens.com/lens/lensforum/msgs.php?id=16182
+<p>Added var $upperCase = 'ucase' to access and ado_access drivers. Thx Renato De Giovanni renato#cria.org.br</p>
+<p>Postgres64 driver, if preparing plan failed in _query, did not handle error properly. Fixed. See http://phplens.com/lens/lensforum/msgs.php?id=16131.
+<p>Fixed  GetActiveRecordsClass() reference bug. See http://phplens.com/lens/lensforum/msgs.php?id=16120
+<p>
+
+Added handling of nulls in adodb-ado_mssql.inc.php for qstr(). Thx to Felix Rabinovich.
+<p>
+
+Adodb-dict contributions by Gaetano:
+<br>
++ Support for INDEX in data-dict. Example:
+idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94. The following example features mutiple indexes, including a compound index idx_ev1. 
+<pre>
+  event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
+  event_type I(4) NOTNULL  <b>INDEX idx_evt</b>,
+  event_start_date T DEFAULT NULL <b>INDEX id_esd</b>,
+  event_end_date T DEFAULT '0000-00-00 00:00:00' <b>INDEX id_eted</b>,
+  event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 <b>INDEX id_evp</b>,
+  event_owner I(11) DEFAULT 0 <b>INDEX idx_ev1</b>,
+  event_project I(11) DEFAULT 0 <b>INDEX idx_ev1</b>,
+  event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
+  event_icon C(20) DEFAULT 'obj/event',
+  event_description X
+</pre>
+<br>
++ Prevents the generated SQL from including double drop-sequence statements for REPLACE case of tables with autoincrement columns (on those dbs that emulate it via sequences)
+<br>
++ makes any date defined as DEFAULT value for D and T columns work cross-database, not just the "sysdate" value (as long as it is specified using adodb standard format). See above example.
+<p>Fixed pdo's GetInsertID() support. Thx Ricky Su.
+<p>oci8 Prepare() now sets error messages if an error occurs.
+<p>Added 'PT_BR' to SetDateLocale() -- brazilian portugese.
+<p>charset in oci8 was not set correctly on *Connect()
+<p>ADOConnection::Transpose() now appends as first column the field names.
+<p>Added $ADODB_QUOTE_FIELDNAMES. If set to true, will autoquote field names in AutoExecute(),GetInsertSQL(), GetUpdateSQL().
+<p>Transpose now adds the field names as the first column after transposition.
+<p>Added === check in ADODB_SetDatabaseAdapter for $db, adodb-active-record.inc.php. Thx Christian Affolter.
+<p>Added ErrorNo() to adodb-active-record.inc.php. Thx ante#novisplet.com.
+
+
+
+<p><a name="4.93"></a><b>4.93 10 Oct 2006</b>
+<p>Added support for multiple database connections in performance monitoring code (adodb-perf.inc.php). Now all sql in multiple database connections can be saved into one database ($ADODB_LOG_CONN).
+<p>Added MetaIndexes() to odbc_mssql.
+<p>Added connection property $db->null2null = 'null'. In autoexecute/getinsertsql/getupdatesql, this value will be converted to a null. Set this to a funny invalid value if you do not want null conversion. See http://phplens.com/lens/lensforum/msgs.php?id=15902.
+<p>Path disclosure problem in mysqli fixed. Thx Andy.
+<p>Fixed typo in session_schema2.xml.
+<p>Changed INT in oci8 to return correct precision in $fld->max_length, MetaColumns(). Thx Eloy Lafuente Plaza.
+<p>Patched postgres64 _connect to handle serverinfo(). see http://phplens.com/lens/lensforum/msgs.php?id=15887.
+<p>Added pdo fix for null columns. See http://phplens.com/lens/lensforum/msgs.php?id=15889
+<p>For stored procedures, missing connection id now passed into mssql_query(). Thx Ecsy (ecsy#freemail.hu).
+
+<p><a name="4.92a"></a><b>4.92a 30 Aug 2006</b>
+<p>Syntax error in postgres7 driver. Thx Eloy Lafuente Plaza. 
+<p>Minor bug fixes - adodb informix 10 types added to adodb.inc.php. Thx Fernando Ortiz.
+
+<p><a name="4.92"></a><b>4.92 29 Aug 2006</b>
+
+<p>Better odbtp date support.
+<P>Added IgnoreErrors() to bypass default error handling.
+<p>The _adodb_getcount() function in adodb-lib.inc.php, some ORDER BY bug fixes.
+<p>For ibase and firebird, set  $sysTimeStamp = "CURRENT_TIMESTAMP".
+<p>Fixed postgres connection bug: http://phplens.com/lens/lensforum/msgs.php?id=11057.
+<p>Changed CacheSelectLimit() to flush cache when $secs2cache==-1 due to complaints from other users. 
+<p>Added support for using memcached with CacheExecute/CacheSelectLimit. Requires memcache module PECL extension. Usage:
+<pre>
+$db = NewADOConnection($driver);
+$db->memCache = true; /// should we use memCache instead of caching in files
+$db->memCacheHost = 126.0.1.1; /// memCache host
+$db->memCachePort = 11211; /// this is default memCache port
+$db->memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
+
+$db->Connect(...);
+$db->CacheExecute($sql);
+</pre>
+<p>Implemented Transpose() for recordsets. Recordset must be retrieved using ADODB_FETCH_NUM. First column becomes the 
+column name.
+<pre>
+$DB = NewADOConnection('mysql');
+$DB->Connect(...);
+$DB->SetFetchMode(ADODB_FETCH_NUM);
+$rs = $DB->Execute('select productname,productid,unitprice from products limit 10');
+$rs2 = $DB->Transpose($rs);
+rs2html($rs2);
+</pre>
+<p><a name="4.91"></a><b>4.91 2 Aug 2006</b>
+<p>Major session code rewrite .... See session docs.
+<p>PDO bindinputarray was not set properly for MySQL (changed from true to false).
+<p>Changed CacheSelectLimit() to re-cache when $secs2cache==0. This is one way to flush the cache when SelectLimit is called.
+<p>Added to quotes to mysql  and mysqli: "SHOW COLUMNS FROM `%s`";
+<p>Removed accidental optgroup handling in GetMenu().
+<a>Fixed ibase _BlobDecode for php5 compat, and also mem alloc issues for small blobs, thx salvatori#interia.pl
+<p>Mysql driver OffsetDate() speedup, useful for adodb-sessions.
+<p>Fix for GetAssoc() PHP5 compat. See http://phplens.com/lens/lensforum/msgs.php?id=15425
+<p>Active Record - If inserting a record and the value of a primary key field is null, then we do not insert that field in as we assume it is an auto-increment field. Needed by mssql.
+<p>Changed postgres7 MetaForeignKeys() see http://phplens.com/lens/lensforum/msgs.php?id=15531
+<p>DB2 will now return db2_conn_errormsg() when it is a connection error. 
+<p><a name="4.90"></a><b>4.90 8 June 2006</b>
+<p>Changed adodb_countrec() in adodb-lib.inc.php to allow LIMIT to be used as a speedup to reduce no of records counted.
+<p>Added support for transaction modes for postgres and oci8 with SetTransactionMode(). 
+These transaction modes affect all subsequent transactions of that connection.
+<p>Thanks to Halmai Csongor for suggestion.
+<p>Removed $off = $fieldOffset - 1 line in db2 driver, FetchField(). Tx Larry Menard.
+<p>Added support for PHP5 objects as Execute() bind parameters using __toString (eg. Simple-XML). Thx Carl-Christian Salvesen.
+<p>Rounding in tohtml.inc.php did not work properly. Fixed.
+<p>MetaIndexes in postgres fails when fields are deleted then added in again because the attnum has gaps in it. 
+See http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976. Fixed.
+<p>MetaForeignkeys in mysql and mysqli did not work when fetchMode==ADODB_FETCH_ASSOC used. Fixed.
+<p>Reference error in AutoExecute() fixed.
+<p>Added macaddr postgres type to MetaType. Maps to 'C'.
+<p>Added to _connect() in adodb-ado5.inc.php support for $database and $dataProvider parameters.  Thx Larry Menard.
+<p>Added support for sequences in adodb-ado_mssql.inc.php. Thx Larry Menard.
+<p>Added ADODB_SESSION_READONLY.
+<p>Added session expiryref support to crc32 mode, and in LOB code.
+<p>Clear _errorMsg in postgres7 driver, so that ErrorMsg() displays properly when no error occurs.
+<p>Added BindDate and BindTimeStamp
+<p><a name="4.81"></a><b>4.81 3 May 2006</b>
+<p>Fixed variable ref errors in adodb-ado5.inc.php in _query().
+<p>Mysqli setcharset fix using method_exists().
+<p>The adodb-perf.inc.php CreateLogTable() code now works for user-defined table names.
+<p>Error in ibase_blob_open() fixed. See http://phplens.com/lens/lensforum/msgs.php?id=14997
+<p><a name="4.80"></a><b>4.80 8 Mar 2006</b>
+<p>Added activerecord support.
+<p>Added mysql $conn->compat323 = true if you want MySQL 3.23 compat enabled. Fixes GetOne() Select-Limit problems.
+<p>Added adodb-xmlschema03.inc.php to support XML Schema version 3 and updated adodb-datadict.htm docs.
+<p>Better memory management in Execute. Thx Mike Fedyk.
+<p><a name="4.72"></a><b>4.72 21 Feb 2006</b>
+<p>Added 'new' DSN parameter for NConnect().
+<p>Pager now sanitizes $PHP_SELF to protect against XSS. Thx to James Bercegay and others.
+<p>ADOConnection::MetaType changed to setup $rs->connection correctly. 
+<p>New native DB2 driver contributed by Larry Menard, Dan Scott, Andy Staudacher, Bharat Mediratta.
+<p>The mssql CreateSequence() did not BEGIN TRANSACTION correctly. Fixed. Thx Sean Lee.
+<p>The _adodb_countrecs() function in adodb-lib.inc.php has been revised to handle more ORDER BY variations.
+<p><a name="4.71"></a><b>4.71 24 Jan 2006</b>
+<p>Fixes postgresql security issue related to binary strings. Thx to Andy Staudacher.
+<p>Several DSN bugs found:
+<p>1. Fix bugs in DSN connections introduced in 4.70 when underscores are found in the DSN. 
+<p>2. DSN with _ did not work properly in PHP5 (fine in PHP4). Fixed.
+<p>3. Added support for PDO DSN connections in NewADOConnection(), and database parameter in PDO::Connect().
+<p>The oci8 datetime flag not correctly implemented in ADORecordSet_array. Fixed.
+<p>Added BlobDelete() to postgres, as a counterpoint to UpdateBlobFile().
+<p>Fixed GetInsertSQL() to support oci8po.
+<p>Fixed qstr() issue with postgresql with \0 in strings.
+<p>Fixed some datadict driver loading issues in _adodb_getdriver(). 
+<p>Added register shutdown function session_write_close in adodb-session.inc.php for PHP 5 compat. See http://phplens.com/lens/lensforum/msgs.php?id=14200.
+<p><a name="4.70"></a><b>4.70 6 Jan 2006</b>
+<p>Many fixes from Danila Ulyanov  to ibase, oci8, postgres, mssql, odbc_oracle, odbtp, etc drivers.
+<p>Changed usage of binary hint in adodb-session.inc.php for mysql. See 
+http://phplens.com/lens/lensforum/msgs.php?id=14160
+<p>Fixed invalid variable reference problem in undomq(), adodb-perf.inc.php.
+<p>Fixed http://phplens.com/lens/lensforum/msgs.php?id=14254 in adodb-perf.inc.php, _DBParameter() settings of fetchmode was wrong.
+<p>Fixed security issues in server.php and tmssql.php discussed by Andreas Sandblad in a Secunia security advisory. Added $ACCEPTIP = 127.0.0.1
+and changed suggested root password to something more secure.
+<p>Changed pager to close recordset after RenderLayout().
+<p><a name="4.68"></a><b>4.68 25 Nov  2005</b>
+<p>PHP 5 compat for mysqli. MetaForeignKeys repeated twice and MYSQLI_BINARY_FLAG missing.
+<p>PHP 5.1 support for postgresql bind parameters using ? did not work if >= 10 parameters. Fixed. Thx to Stanislav Shramko.
+<p>Lots of PDO improvements.
+<p>Spelling error fixed in mysql MetaForeignKeys, $associative parameter.
+<p><a name="4.67"></a><b>4.67 16 Nov  2005</b>
+<p>Postgresql not_null flag not set to false correctly. Thx Cristian MARIN.
+<p>We now check in Replace() if key is in fieldArray. Thx Sébastien Vanvelthem.
+<p>_file_get_contents() function was missing in xmlschema. fixed.
+<p>Added week in year support to SQLDate(), using 'W' flag. Thx Spider.
+<p>In sqlite metacolumns was repeated twice, causing PHP 5 problems. Fixed.
+<p>Made debug output XHTML compliant. 
+<p><a name="4.66"></a><b>4.66 28 Sept  2005</b>
+<p>ExecuteCursor() in oci8 did not clean up properly on failure. Fixed.
+<p>Updated xmlschema.dtd, by "Alec Smecher" asmecher#smecher.bc.ca
+<p>Hardened SelectLimit, typecasting nrows and offset to integer.
+<p>Fixed misc bugs in AutoExecute() and GetInsertSQL().
+<p>Added $conn->database as the property holding the database name. The older $conn->databaseName is retained for backward
+compat.
+<p>Changed _adodb_backtrace() compat check to use function_exists().
+<p>Bug in postgresql MetaIndexes fixed. Thx Kevin Jamieson. 
+<p>Improved OffsetDate for MySQL, reducing rounding error.
+<p>Metacolumns added to sqlite. Thx Mark Newnham.
+<p>PHP 4.4 compat fixes for GetAssoc().
+<p>Added postgresql bind support for php 5.1. Thx Cristiano da Cunha Duarte
+<p>OffsetDate() fixes for postgresql, typecasting strings to date or timestamp.
+<p>DBTimeStamp formats for mssql, odbc_mssql and postgresql made to conform with other db's.
+<p>Changed PDO constants from PDO_ to PDO:: to support latest spec.
+<p><a name="4.65"></a><b>4.65 22 July  2005</b>
+<p>Reverted 'X' in mssql datadict to 'TEXT' to be compat with mssql driver. However now you can 
+set $datadict->typeX = 'varchar(4000)' or 'TEXT' or 'CLOB' for mssql and oci8 drivers. 
+<p>Added charset support when using DSN for Oracle.
+<p>_adodb_getmenu did not use fieldcount() to get number of fields. Fixed.
+<p>MetaForeignKeys() for mysql/mysqli contributed by Juan Carlos Gonzalez.
+<p>MetaDatabases() now correctly returns an array for mysqli driver. Thx Cristian MARIN.
+<p>CompleteTrans(false) did not return false. Fixed. Thx to JMF.
+<p>AutoExecute() did not work with Oracle. Fixed. Thx José Moreira.
+<p>MetaType() added to connection object.
+<p>More PHP 4.4 reference return fixes. Thx Ryan C Bonham and others.
+
+<p><a name="4.64"></a><b>4.64 20 June 2005</b>
+<p>In datadict, if the default field value is set to '', then it is not applied when the field is created. Fixed by Eugenio.
+<p>MetaPrimaryKeys for postgres did not work because of true/false change in 4.63. Fixed.
+<p>Tested ocifetchstatement in oci8. Rejected at the end.
+<p>Added port to dsn handling. Supported in postgres, mysql, mysqli,ldap.
+<p>Added  'w' and 'l' to mysqli SQLDate().
+<p>Fixed error handling in ldap _connect() to be more consistent. Also added ErrorMsg() handling to ldap.
+<p>Added support for union in _adodb_getcount, adodb-lib.inc.php for postgres and oci8.
+<p>rs2html() did not work with null dates properly.
+<p>PHP 4.4 reference return fixes.
+
+<p><a name="4.63"></a><b>4.63  18 May 2005</b>
+<p>Added $nrows<0 check to mysqli's SelectLimit().
+<p>Added OptimizeTable() and OptimizeTables() in adodb-perf.inc.php. By Markus Staab.
+<p>PostgreSQL inconsistencies fixed. true and false set to TRUE and FALSE, and boolean type in datadict-postgres.inc.php set
+to 'L' => 'BOOLEAN'. Thx Kevin Jamieson.
+<p>New adodb_session_create_table() function in adodb-session.inc.php. By Markus Staab.
+<p>Added null check to UserTimeStamp().
+<p>Fixed typo in mysqlt driver in adorecordset. Thx to Andy Staudacher.
+<p>GenID() had a bug in the raiseErrorFn handling. Fixed. Thx Marcos Pont.
+<p>Datadict name quoting now handles ( ) in index fields correctly - they aren't part of the index field.
+<p>Performance monitoring: (1) oci8 Ixora checks moved down; (2) expensive sql changed so that only those sql with 
+count(*)>1 are shown; (3) changed sql1 field to a length+crc32 checksum - this breaks backward compat.
+<p>We remap firebird15 to firebird in data dictionary.
+
+<p><a name="4.62"></a><b>4.62  2 Apr 2005</b>
+<p>Added 'w' (dow as 0-6 or 1-7) and 'l' (dow as string) for SQLDate for oci8, postgres and mysql.
+<p>Rolled back MetaType() changes for mysqli done in prev version.
+<p>Datadict change by chris, cblin#tennaxia.com data mappings from:
+<pre>
+oci8:  X->varchar(4000) XL->CLOB
+mssql: X->XL->TEXT
+mysql: X->XL->LONGTEXT
+fbird: X->XL->varchar(4000)
+</pre>
+<p>to:
+<pre>
+oci8:  X->varchar(4000) XL->CLOB
+mssql: X->VARCHAR(4000) XL->TEXT
+mysql: X->TEXT          XL->LONGTEXT
+fbird: X->VARCHAR(4000) XL->VARCHAR(32000)
+</pre>
+<p>Added $connection->disableBlobs to postgresql to improve performance when no bytea is used (2-5% improvement).
+<p>Removed all HTTP_* vars.
+<p>Added $rs->tableName to be set before calling AutoExecute().
+<p>Alex Rootoff rootoff#pisem.net contributed ukrainian language file.
+<p>Added new mysql_option() support using $conn->optionFlags array.
+<p>Added support for ldap_set_option() using the $LDAP_CONNECT_OPTIONS global variable. Contributed by Josh Eldridge.
+<p>Added LDAP_* constant definitions to ldap.
+<p>Added support for boolean bind variables. We use $conn->false and $conn->true to hold values to set false/true to.
+<p>We now do not close the session connection in adodb-session.inc.php as other objects could be using this connection.
+<p>We now strip off \0 at end of Ixora SQL strings in $perf->tohtml() for oci8.
+<p><a name="4.61"></a><b>4.61 23 Feb 2005</b>
+<p>MySQLi added support for mysqli_connect_errno() and mysqli_connect_error().
+<p>Massive improvements to alpha PDO driver.
+<p>Quote string bind parameters logged by performance monitor for easy type checking. Thx Jason Judge.
+<p>Added support for $role when connecting with Interbase/firebird.
+<p>Added support for enum recognition in MetaColumns() mysql and mysqli. Thx Amedeo Petrella.
+<p>The sybase_ase driver contributed by Interakt Online. Thx Cristian Marin cristic#interaktonline.com.
+<p>Removed not_null, has_default, and default_value from ADOFieldObject.
+<p>Sessions code, fixed quoting of keys when handling LOBs in session write() function.
+<p>Sessions code, added adodb_session_regenerate_id(), to reduce risk of session hijacking by changing session cookie dynamically. Thx Joe Li.
+<p>Perf monitor, polling for CPU did not work for PHP 4.3.10 and 5.0.0-5.0.3 due to PHP bugs, so we special case these versions.
+<p>Postgresql, UpdateBlob() added code to handle type==CLOB.
+<p><a name="4.60"></a><b>4.60 24 Jan 2005</b>
+<p>Implemented PEAR DB's autoExecute(). Simplified design because I don't like using constants when
+strings work fine.
+<p>_rs2serialize will now update $rs->sql and $rs->oldProvider.
+<p>Added autoExecute().
+<p>Added support for postgres8 driver. Currently just remapped to postgres7 driver.
+<p>Changed oci8 _query(), so that OCIBindByName() sets the length to -1 if element size is > 4000. This provides better support
+for LONGs.
+<p>Added SetDateLocale() support for netherlands (Nl).
+<p>Spelling error in pivot code ($iff should be $iif).
+</p><p>mysql insert_id() did not work with mysql 3.x. Fixed.
+</p><p>"\r\n" not converted to spaces correctly in exporting data. Fixed.
+</p><p>_nconnect() in mysqli did not return value correctly. Fixed.
+</p><p>Arne Eckmann contributed danish language file.
+</p><p>Added clone() support to FetchObject() for PHP5.<br>
+</p>
+<p>Removed SQL_CUR_USE_ODBC from odbc_mssql.<br>
+</p>
+<p><a name="4.55"></a><b>4.55 5 Jan 2005</b>
+</p><p>Found bug in Execute() with bind params for db's that do not support binding natively.
+</p><p>DropSequence() now correctly uses default parameter.
+</p><p>Now Execute() ignores locale for floats, so 1.23 is NEVER converted to 1,23.
+</p><p>SetFetchMode() not properly saved in adodb-perf, suspicious sql and expensive sql. Fixed.
+</p><p>Added INET to postgresql metatypes. Thx motzel.
+</p><p>Allow oracle hints to work when counting with _adodb_getcount in adodb-lib.inc.php. Thx Chris Wrye.
+</p><p>Changed mysql insert_id() to use SELECT LAST_INSERT_ID().
+</p><p>If alter col in datadict does not modify col type/size of actual
+col, then it is removed from alter col code. By Mark Newham. Not
+perfect as MetaType() !== ActualType().
+</p><p>Added handling of view fields in metacolumns() for postgresql. Thx Renato De Giovanni.
+</p><p>Added to informix MetaPrimaryKeys and MetaColumns fixes for null bit. Thx to Cecilio Albero.
+</p><p>Removed obsolete connection_timeout() from perf code.
+</p><p>Added support for arrayClass in adodb-csv.inc.php.
+</p><p>RSFilter now accepts methods of the form $array($obj, 'methodname'). Thx to blake#near-time.com.
+</p><p>Changed CacheFlush to $cmd = 'rm -rf '.$ADODB_CACHE_DIR.'/[0-9a-f][0-9a-f]/'; 
+</p><p>For better cursor concurrency, added code to free ref cursors in
+oci8 when $rs-&gt;Close() is called. Note that CLose() is called
+internally by the Get* functions too.
+</p><p>Added IIF support for access when pivoting.  Thx Volodia Krupach.
+</p><p>Added mssql datadict support for timestamp. Thx Alexios.
+</p><p>Informix pager fix. By Mario Ramirez.
+</p><p>ADODB_TABLE_REGEX now includes ':'. By Mario Ramirez.
+</p><p>Mark Newnham contributed MetaIndexes for oci8 and db2.
+</p><p><a name="4.54"></a><b>4.54 5 Nov 2004</b>
+</p><p>
+Now you can set $db-&gt;charSet = ?? before doing a Connect() in oci8.
+</p><p>
+Added adodbFetchMode to sqlite.
+</p><p>
+Perf code, added a string typecast to substr in adodb_log_sql().
+</p><p>
+Postgres: Changed BlobDecode() to use po_loread, added new $maxblobsize parameter, and now it returns the blob instead
+of sending it to stdout - make sure to mention that as a compat warning.
+Also added $db-&gt;IsOID($oid) function; uses a heuristic, not guaranteed to work 100%.
+</p><p>
+Contributed arabic language file by "El-Shamaa, Khaled" k.el-shamaa#cgiar.org
+</p><p>
+PHP5 exceptions did not handle @ protocol properly. Fixed.
+</p><p>
+Added ifnull handling for postgresql (using coalesce).
+</p><p>
+Added  metatables() support for Postgresql 8.0 (no longer uses pg_% dictionary tables).
+</p><p>
+Improved Sybase ErrorMsg() function. By Gaetano Giunta.
+</p><p>
+Improved oci8 SelectLimit() to use Prepare(). By Cristiano Duarte.
+</p><p>
+Type-cast $row parameter in ifx_fetch_row() to int. Thx stefan bodgan.
+</p><p>Ralf becker contributed improvements in postgresql, sapdb, mysql data dictionary handling:<br>
+- MySql and Postgres MetaType was reporting every int column which was 
+part of a primary key and unique as serial<br>
+- Postgres was not reporting the scale of decimal types<br>
+- MaxDB was padding the defaults of none-string types with spaces<br>
+- MySql now correctly converts enum columns to varchar
+</p><p>
+Ralf also changed Postgresql datadict:<br>
+- you cant add NOT NULL columns in postgres in one go, they need to be 
+added as NULL and then altered to NOT NULL<br>
+- AlterColumnSQL could not change a varchar column with numbers into an 
+integer column, postgres need an explicit conversation<br>
+- a re-created sequence was not set to the correct value, if the name 
+was the old name (no implicit sequence), now always the new name of the 
+implicit sequence is used<br>
+</p><p>Sergio Strampelli added extra $intoken check to Lens_ParseArgs() in datadict code.
+</p><p><a name="4.53"></a><b>4.53 28 Sept 2004</b>
+</p><p>FetchMode cached in recordset is sometimes mapped to native db fetchMode. Normally this does not matter,
+but when using cached recordsets, we need to switch back to using adodb fetchmode.  So we cache this
+in $rs-&gt;adodbFetchMode if it differs from the db's fetchMode.
+</p><p>For informix we now set canSeek = false driver because stefan bodgan tells me that seeking doesn't work. 
+</p><p>SetDateLocale() never worked till now ;-) Thx david#tomato.it
+</p><p>Set $_bindInputArray = true in sapdb driver. Required for clob support.
+</p><p>Fixed some PEAR::DB emulation issues with isError() and isWarning. Thx to Gert-Rainer Bitterlich.
+</p><p>Empty() used in getupdatesql without strlen() check. Fixed.</p>
+<p>Added unsigned detection to mysql and mysqli drivers. Thx to dan cech.
+</p><p>Added hungarian language file. Thx to Hal&aacute;szv&aacute;ri G&aacute;bor.
+</p><p>Improved fieldname-type formatting of datadict SQL generated (adding $widespacing parameter to _GenField).
+</p><p>Datadict oci8 DROP CONSTRAINTS misspelt. Fixed. Thx Mark Newnham.
+</p><p>Changed odbtp to dynamically change databaseType based on connection, eg. from 'odbtp' to 'odbtp_mssql' when connecting
+to mssql database.
+</p><p>In datadict, MySQL I4 was wrongly mapped to MEDIUMINT, which is actually I3. Fixed.
+</p><p>Fixed mysqli MetaType() recognition. Mysqli returns numeric types unlike mysql extension. Thx Francesco Riosa.
+</p><p>VFP odbc driver curmode set wrongly, causing problems with memo fields. Fixed.
+</p><p>Odbc driver did not recognize odbc version 2 driver date types properly. Fixed. Thx Bostjan.
+</p><p>ChangeTableSQL() fixes to datadict-db2.inc.php by Mark Newnham.
+</p><p>Perf monitoring with odbc improved. Now we try in perf code to manually set the sysTimeStamp using date() if sysTimeStamp
+is empty.
+</p><p>All ADO errors are thrown as exceptions in PHP5. 
+So we added exception handling to ado in PHP5 by creating new adodb-ado5.inc.php driver.
+</p><p>Added IsConnected(). Returns true if connection object connected. By Luca.Gioppo.
+</p><p>"Ralf Becker"
+RalfBecker#digitalROCK.de contributed new sapdb data-dictionary driver
+and a large patch that implements field and table renaming for oracle,
+mssql, postgresql, mysql and sapdb. See the new RenameTableSQL() and
+RenameColumnSQL() functions.
+</p><p>We now check ExecuteCursor to see if PrepareSP was initially called.
+</p><p>Changed oci8 datadict to use MODIFY for $dd-&gt;alterCol. Thx Mark Newnham.
+</p><p><a name="4.52"></a><b>4.52  10 Aug 2004</b>
+</p><p>Bug found in Replace() when performance logging enabled, introduced in ADOdb 4.50. Fixed.
+</p><p>Replace() checks update stmt. If update stmt fails, we now return immediately. Thx to alex.
+</p><p>Added support for $ADODB_FORCE_TYPE in GetUpdateSQL/GetInsertSQL. Thx to niko.
+</p><p>Added ADODB_ASSOC_CASE support to postgres/postgres7 driver.
+</p><p>Support for DECLARE stmt in oci8. Thx Lochbrunner.
+</p><p><a name="4.51"></a><b>4.51  29 July  2004</b>
+</p><p>Added adodb-xmlschema 1.0.2. Thx dan and richard.
+</p><p>Added new adorecordset_ext_* classes. If ADOdb extension installed for mysql, mysqlt and oci8 
+(but not oci8po),  we use the superfast ADOdb extension code for movenext.
+</p><p>Added schema support to mssql and odbc_mssql MetaPrimaryKeys().
+</p><p>Patched MSSQL driver to support PHP NULL and Boolean values 
+while binding the input array parameters in the _query() function. By Stephen Farmer.
+</p><p>Added support for clob's for mssql,  UpdateBlob(). Thx to gfran#directa.com.br
+</p><p>Added normalize support for postgresql (true=lowercase table name, or false=case-sensitive table names) 
+to MetaColumns($table, $normalize=true).
+</p><p>PHP5 variant dates in ADO not working. Fixed in adodb-ado.inc.php.
+</p><p>Constant ADODB_FORCE_NULLS was not working properly for many releases (for GetUpdateSQL). Fixed. 
+Also GetUpdateSQL strips off ORDER BY now - thx Elieser Le&atilde;o.
+</p><p>Perf Monitor for oci8 now dynamically highlights optimizer_* params if too high/low.
+</p><p>Added dsn support to NewADOConnection/ADONewConnection.
+</p><p>Fixed out of page bounds bug in _adodb_pageexecute_all_rows() Thx to "Sergio Strampelli" sergio#rir.it
+</p><p>Speedup of movenext for mysql and oci8 drivers.
+</p><p>Moved debugging code _adodb_debug_execute() to adodb-lib.inc.php.
+</p><p>Fixed postgresql bytea detection bug. See http://phplens.com/lens/lensforum/msgs.php?id=9849.
+</p><p>Fixed ibase datetimestamp typo in PHP5. Thx stefan.
+</p><p>Removed whitespace at end of odbtp drivers.
+</p><p>Added db2 metaprimarykeys fix.
+</p><p>Optimizations to MoveNext() for mysql and oci8. Misc speedups to Get* functions.
+</p><p><a name="4.50"></a><b>4.50  6 July  2004</b>
+</p><p>Bumped it to 4.50 to avoid confusion with PHP 4.3.x series.
+</p><p>Added db2 metatables and metacolumns extensions.
+</p><p>Added alpha PDO driver. Very buggy, only works with odbc.
+</p><p>Tested mysqli. Set poorAffectedRows = true. Cleaned up movenext() and _fetch().
+</p><p>PageExecute does not work properly with php5 (return val not a variable). Reported Dmytro Sychevsky sych#php.com.ua.  Fixed.
+</p><p>MetaTables() for mysql, $showschema parameter was not backward compatible with older versions of adodb. Fixed.
+</p><p>Changed mysql GetOne() to work with mysql 3.23 when using with non-select stmts (e.g. SHOW TABLES).
+</p><p>Changed TRIG_ prefix to a variable in datadict-oci8.inc.php. Thx to Luca.Gioppo#csi.it.
+</p><p>New to adodb-time code. We allow you to define your own daylights savings function, 
+adodb_daylight_sv for pre-1970 dates. If the function is defined 
+(somewhere in an include), then you can correct 
+for daylights savings. See http://phplens.com/phpeverywhere/node/view/16#daylightsavings
+for more info.
+</p><p>New sqlitepo driver. This is because assoc mode does not work like other drivers in sqlite.
+   Namely, when selecting (joining) multiple tables, in assoc mode the table
+   	  names are included in the assoc keys in the "sqlite" driver.
+	  In "sqlitepo" driver, the table names are stripped from the returned column names. 
+	  When this results in a conflict,  the first field get preference.
+	Contributed by Herman Kuiper  herman#ozuzo.net  
+</p><p>Added $forcenull parameter to GetInsertSQL/GetUpdateSQL. Idea by Marco Aurelio Silva.
+</p><p>More XHTML changes for GetMenu. By Jeremy Evans.
+</p><p>Fixes some ibase date issues. Thx to stefan bogdan.
+</p><p>Improvements to mysqli driver to support $ADODB_COUNTRECS.
+</p><p>Fixed adodb-csvlib.inc.php problem when reading stream from socket. We need to poll stream continiously.
+</p><p><a name="4.23"></a><b>4.23  16 June   2004</b>
+</p><p>
+New interbase/firebird fixes thx to Lester Caine.
+Driver fixes a problem with getting field names in the result array, and 
+corrects a couple of data conversions. Also we default to dialect3 for firebird.
+Also ibase sysDate property was wrong. Changed to cast as timestamp.
+</p><p>
+The datadict driver is set up to give quoted tables and fields as this 
+was the only way round reserved words being used as field names in 
+TikiWiki. TikiPro is tidying that up, and I hope to be able to produce a 
+build of THAT which uses what I consider proper UPPERCASE field and 
+table names. The conversion of TikiWiki to ADOdb helped in that, but 
+until the database is completely tidied up in TikiPro ...
+</p><p>Modified _gencachename() to include fetchmode in name hash.
+This means you should clear your cache directory after installing this release as the 
+cache name algorithm has changed.
+</p><p>Now Cache* functions work in safe
+mode, because we do not create sub-directories in the $ADODB_CACHE_DIR
+in safe mode. In non-safe mode we still create sub-directories. Done by
+modifying _gencachename().
+</p><p>Added $gmt parameter (true/false)
+to UserDate and UserTimeStamp in connection class, to force conversion
+of input (in local time) to be converted to UTC/GMT.
+</p><p>Mssql datadict did not support INT types properly (no size param allowed). 
+Added _GetSize() to datadict-mssql.inc.php.
+</p><p>For borland_ibase, BeginTrans(), changed:<br>
+</p><pre>   $this-&gt;_transactionID = $this-&gt;_connectionID;</pre>
+to<br>
+<pre>   $this-&gt;_transactionID = ibase_trans($this-&gt;ibasetrans, $this-&gt;_connectionID);</pre>
+		
+<p>Fixed typo in mysqi_field_seek(). Thx to Sh4dow (sh4dow#php.pl).
+</p><p>LogSQL did not work with Firebird/Interbase. Fixed.
+</p><p>Postgres: made errorno() handling more consistent. Thx to Michael Jahn, Michael.Jahn#mailbox.tu-dresden.de.
+</p><p>Added informix patch to better support metatables, metacolumns by "Cecilio Albero" c-albero#eos-i.com
+</p><p>Cyril Malevanov contributed patch to oci8 to support passing of LOB parameters:
+</p><pre>	$text = 'test test test';<br>	$sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";<br>	$stmt = $conn -&gt; PrepareSP($sql);<br>	$conn -&gt; InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB);<br>	$rs = '';<br>	$conn -&gt; OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);<br>	$conn -&gt; Execute($stmt);<br>	echo "return = ".$rs."&lt;br&gt;";<br></pre>
+As he says, the LOBs limitations are:
+<pre> - use OCINewDescriptor before binding<br> - if Param is IN, uses save() before each execute. This is done automatically for you.<br> - if Param is OUT, uses load() after each execute. This is done automatically for you.<br> - when we bind $var as LOB, we create new descriptor and return it as a<br>   Bind Result, so if we want to use OUT parameters, we have to store<br>   somewhere &amp;$var to load() data from LOB to it.<br> - IN OUT params are not working now (should not be a big problem to fix it)<br> - now mass binding not working too (I've wrote about it before)<br></pre>
+<p>Simplified Connect() and PConnect() error handling.
+</p><p>When extension not loaded, Connect() and PConnect() will return null. On connect error, the fns will return false.
+</p><p>CacheGetArray() added to code.
+</p><p>Added Init() to adorecordset_empty().
+</p><p>Changed postgres64 driver, MetaColumns() to not strip off quotes in default value if :: detected (type-casting of default).
+</p><p>Added test: if (!defined('ADODB_DIR')) die(). Useful to prevent hackers from detecting file paths.
+</p><p>Changed metaTablesSQL to ignore Postgres 7.4 information schemas (sql_*).
+</p><p>New polish language file by  Grzegorz Pacan
+</p><p>Added support for UNION in _adodb_getcount().
+</p><p>Added security check for ADODB_DIR to limit path disclosure issues. Requested by postnuke team.
+</p><p>Added better error message support to oracle driver. Thx to Gaetano Giunta.
+</p><p>Added showSchema support to mysql.
+</p><p>Bind in oci8 did not handle $name=false properly. Fixed.
+</p><p>If extension not loaded, Connect(), PConnect(), NConnect() will return null.
+</p><p><b>4.22  15 Apr   2004</b>
+</p><p>Moved docs to own adodb/docs folder.
+</p><p>Fixed session bug when quoting compressed/encrypted data in Replace().
+</p><p>Netezza Driver and LDAP drivers contributed by Josh Eldridge.
+</p><p>GetMenu now uses rtrim() on values instead of trim().
+</p><p>Changed MetaColumnNames to return an associative array, keys being the field names in uppercase.
+</p><p>Suggested fix to adodb-ado.inc.php affected_rows to support PHP5 variants. Thx to Alexios Fakos.
+</p><p>Contributed bulgarian language file by Valentin Sheiretsky valio#valio.eu.org.
+</p><p>Contributed romanian language file by stefan bogdan.
+</p><p>GetInsertSQL now checks for table name (string) in $rs, and will create a recordset for that
+table automatically. Contributed by Walt Boring. Also added OCI_B_BLOB in bind on Walt's request - hope
+it doesn't break anything :-)
+</p><p>Some minor postgres speedups in _initrs().
+</p><p> ChangeTableSQL checks now if MetaColumns returns empty. Thx Jason Judge.
+</p><p>Added ADOConnection::Time(), returns current database time in unix timestamp format, or false.
+</p><p><b>4.21 20 Mar 2004</b>
+</p><p>We no longer in SelectLimit for VFP driver add SELECT TOP X unless an ORDER BY exists.
+</p><p>Pim Koeman contributed dutch language file adodb-nl.inc.php.
+</p><p>Rick Hickerson added CLOB support to db2 datadict.
+</p><p>Added odbtp driver. Thx to "stefan bogdan" sbogdan#rsb.ro.
+</p><p>Changed PrepareSP() 2nd parameter, $cursor, to default to true (formerly false). Fixes oci8 backward
+compat problems with OUT params.
+</p><p>Fixed month calculation error in adodb-time.inc.php. 2102-June-01 appeared as 2102-May-32.
+</p><p>Updated PHP5 RC1 iterator support. API changed, hasMore() renamed to valid().
+</p><p>Changed internal format of serialized cache recordsets. As we store a version number, this should be
+backward compatible.
+</p><p>Error handling when driver file not found was flawed in ADOLoadCode(). Fixed.
+</p><p><b>4.20 27 Feb 2004</b>
+</p><p>Updated to AXMLS 1.01.
+</p><p>MetaForeignKeys for postgres7 modified by Edward Jaramilla, works on pg 7.4.
+</p><p>Now numbers accepts function calls or sequences for GetInsertSQL/GetUpdateSQL numeric fields.
+</p><p>Changed quotes of 'delete from $perf_table' to "". Thx Kehui (webmaster#kehui.net)
+</p><p>Added ServerInfo() for ifx, and putenv trim fix. Thx Fernando Ortiz.
+</p><p>Added addq(), which is analogous to addslashes().
+</p><p>Tested with php5b4. Fix some php5 compat problems with exceptions and sybase.
+</p><p>Carl-Christian Salvesen added patch to mssql _query to support binds greater than 4000 chars.
+</p><p>Mike suggested patch to PHP5 exception handler. $errno must be numeric.
+</p><p>Added double quotes (") to ADODB_TABLE_REGEX.
+</p><p>For oci8, Prepare(...,$cursor),
+$cursor's meaning was accidentally inverted in 4.11. This causes
+problems with ExecuteCursor() too, which calls Prepare() internally.
+Thx to William Lovaton.
+</p><p>Now dateHasTime property in connection object renamed to datetime for consistency. This could break bc.
+</p><p>Csongor Halmai reports that db2 SelectLimit with input array is not working. Fixed..
+</p><p><b>4.11 27 Jan 2004</b>
+</p><p>Csongor Halmai reports db2 binding not working. Reverted back to emulated binding.
+</p><p>Dan Cech modifies datadict code. Adds support for DropIndex. Minor cleanups.
+</p><p>Table misspelt in perf-oci8.inc.php. Changed v$conn_cache_advice to v$db_cache_advice. Reported by Steve W.
+</p><p>UserTimeStamp and DBTimeStamp did not handle YYYYMMDDHHMMSS format properly. Reported by Mike Muir. Fixed.
+</p><p>Changed oci8 Prepare(). Does not auto-allocate OCINewCursor automatically, unless 2nd param is set to true.
+This will break backward compat, if Prepare/Execute is used instead of ExecuteCursor. Reported by Chris Jones.
+</p><p>Added InParameter() and OutParameter(). Wrapper functions to Parameter(), but nicer because they
+are self-documenting.
+</p><p>Added 'R' handling in ActualType() to datadict-mysql.inc.php
+</p><p>Added ADOConnection::SerializableRS($rs). Returns a recordset that can be serialized in a session.
+</p><p>Added "Run SQL" to performance UI().
+</p><p>Misc spelling corrections in adodb-mysqli.inc.php, adodb-oci8.inc.php and datadict-oci8.inc.php, from Heinz Hombergs.
+</p><p>MetaIndexes() for ibase contributed by Heinz Hombergs.
+</p><p><b>4.10 12 Jan 2004</b>
+</p><p>Dan Cech contributed extensive changes to data dictionary to support name quoting (with `), and drop table/index.
+</p><p>Informix added cursorType property. Default remains IFX_SCROLL, but you can change to 0 (non-scrollable cursor) for performance.
+</p><p>Added ADODB_View_PrimaryKeys() for returning view primary keys to MetaPrimaryKeys().
+</p><p>Simplified chinese file, adodb-cn.inc.php from cysoft.
+</p><p>Added check for ctype_alnum in adodb-datadict.inc.php. Thx to Jason Judge.
+</p><p>Added connection parameter to ibase Prepare(). Fix by Daniel Hassan.
+</p><p>Added nameQuote for quoting identifiers and names to connection obj. Requested by Jason Judge. Also the
+data dictionary parser now detects `field name` and generates column names with spaces correctly.
+</p><p>BOOL type not recognised correctly as L. Fixed.
+</p><p>Fixed paths in ADODB_DIR for session files, and back-ported it to 4.05 (15 Dec 2003)
+</p><p>Added Schema to postgresql MetaTables. Thx to col#gear.hu
+</p><p>Empty postgresql recordsets that had blob fields did not set EOF properly. Fixed.
+</p><p>CacheSelectLimit internal parameters to SelectLimit were wrong. Thx to Nio.
+</p><p>Modified adodb_pr() and adodb_backtrace() to support command-line usage (eg. no html).
+</p><p>Fixed some fr and it lang errors. Thx to Gaetano G.
+</p><p>Added contrib directory, with adodb rs to xmlrpc convertor by Gaetano G.
+</p><p>Fixed array recordset bugs when _skiprow1 is true. Thx to Gaetano G.
+</p><p>Fixed pivot table code when count is false.
+</p><p>
+
+</p><p><b>4.05 13 Dec 2003 </b>
+</p><p>Added MetaIndexes to data-dict code - thx to Dan Cech.
+</p><p>Rewritten session code by Ross Smith. Moved code to adodb/session directory.
+</p><p>Added function exists check on connecting to most drivers, so we don't crash with the unknown function error.
+</p><p>Smart Transactions failed with GenID() when it no seq table has been created because the sql
+	statement fails. Fix by Mark Newnham.
+</p><p>Added $db-&gt;length, which holds name of function that returns strlen.
+</p><p>Fixed error handling for bad driver in ADONewConnection - passed too few params to error-handler.
+</p><p>Datadict did not handle types like 16.0 properly in _GetSize. Fixed.
+</p><p>Oci8 driver SelectLimit() bug &amp;= instead of =&amp; used. Thx to Swen Th&uuml;mmler.
+</p><p>Jesse Mullan suggested not flushing outp when output buffering enabled. Due to Apache 2.0 bug. Added.
+</p><p>MetaTables/MetaColumns return ref bug with PHP5 fixed in adodb-datadict.inc.php.
+</p><p>New mysqli driver contributed by Arjen de Rijke. Based on adodb 3.40 driver.
+Then jlim added BeginTrans, CommitTrans, RollbackTrans, IfNull, SQLDate. Also fixed return ref bug.
+</p><p>$ADODB_FLUSH added, if true then force flush in debugging outp. Default is false.  In earlier
+versions, outp defaulted to flush, which is not compat with apache 2.0.
+</p><p>Mysql driver's GenID() function did not work when when sql logging is on. Fixed.
+</p><p>$ADODB_SESSION_TBL not declared as global var. Not available if adodb-session.inc.php included in function. Fixed.
+</p><p>The input array not passed to Execute() in _adodb_getcount(). Fixed.
+</p><p><b>4.04 13 Nov 2003 </b>
+</p><p>Switched back to foreach - faster than list-each.
+</p><p>Fixed bug in ado driver - wiping out $this-&gt;fields with date fields.
+</p><p>Performance Monitor, View SQL, Explain Plan did not work if strlen($SQL)&gt;max($_GET length). Fixed.
+</p><p>Performance monitor, oci8 driver added memory sort ratio.
+</p><p>Added random property, returns SQL to generate a floating point number between 0 and 1;
+</p><p><b>4.03 6 Nov 2003 </b>
+</p><p>The path to adodb-php4.inc.php and adodb-iterators.inc.php was not setup properly.
+</p><p>Patched SQLDate in interbase to support hours/mins/secs. Thx to ari kuorikoski.
+</p><p>Force autorollback for pgsql persistent connections - 
+apparently pgsql did not autorollback properly before 4.3.4. See http://bugs.php.net/bug.php?id=25404
+</p><p><b>4.02 5 Nov 2003 </b>
+</p><p>Some errors in adodb_error_pg() fixed. Thx to Styve.
+</p><p>Spurious Insert_ID() error was generated by LogSQL(). Fixed.
+</p><p>Insert_ID was interfering with Affected_Rows() and Replace()  when LogSQL() enabled. Fixed.
+</p><p>More foreach loops optimized with list/each.
+</p><p>Null dates not handled properly in ADO driver (it becomes 31 Dec 1969!).
+</p><p>Heinz Hombergs contributed patches for mysql MetaColumns - adding scale, made
+interbase MetaColumns work with firebird/interbase, and added lang/adodb-de.inc.php.
+</p><p>Added INFORMIXSERVER environment variable.
+</p><p>Added $ADODB_ANSI_PADDING_OFF for interbase/firebird.
+</p><p>PHP 5 beta 2 compat check. Foreach (Iterator) support. Exceptions support.
+</p><p><b>4.01 23 Oct 2003 </b>
+</p><p>Fixed bug in rs2html(), tohtml.inc.php, that generated blank table cells.
+</p><p>Fixed insert_id() incorrectly generated when logsql() enabled.
+</p><p>Modified PostgreSQL _fixblobs to use list/each instead of foreach.
+</p><p>Informix ErrorNo() implemented correctly.
+</p><p>Modified several places to use list/each, including GetRowAssoc().
+</p><p>Added UserTimeStamp() to connection class.
+</p><p>Added $ADODB_ANSI_PADDING_OFF for oci8po.
+</p><p><b>4.00 20 Oct 2003 </b>
+</p><p>Upgraded adodb-xmlschema to 1 Oct 2003 snapshot.
+</p><p>Fix to rs2html warning message. Thx to Filo.
+</p><p>Fix for odbc_mssql/mssql SQLDate(), hours was wrong.
+</p><p>Added MetaColumns and MetaPrimaryKeys for sybase. Thx to Chris Phillipson.
+</p><p>Added autoquoting to datadict for MySQL and PostgreSQL. Suggestion by Karsten Dambekalns  
+</p><p><b>3.94 11 Oct 2003 </b>
+</p><p>Create trigger in datadict-oci8.inc.php did not work, because all cr/lf's must be removed. 
+</p><p>ErrorMsg()/ErrorNo() did not work for many databases when logging enabled. Fixed.
+</p><p>Removed global variable $ADODB_LOGSQL as it does not work properly with multiple connections.
+</p><p>Added SQLDate support for sybase. Thx to Chris Phillipson
+</p><p>Postgresql checking of pgsql resultset resource was incorrect. Fix by Bharat Mediratta bharat#menalto.com.
+Same patch applied to  _insertid and _affectedrows for adodb-postgres64.inc.php.
+</p><p>Added support for NConnect for postgresql.
+</p><p>Added Sybase data dict support. Thx to Chris Phillipson  
+</p><p>Extensive improvements in $perf-&gt;UI(), eg. Explain now opens in new window, we show scripts
+which call sql, etc.
+</p><p>Perf Monitor UI works with magic quotes enabled.
+</p><p>rsPrefix was declared twice. Removed.
+</p><p>Oci8 stored procedure support, eg. "begin func(); end;" was incorrect in _query. Fixed.
+</p><p>Tiraboschi Massimiliano contributed italian language file.
+</p><p>Fernando Ortiz, fortiz#lacorona.com.mx, contributed informix performance monitor.
+</p><p>Added _varchar (varchar arrays) support for postgresql. Reported by PREVOT St&eacute;phane.<hr />
+<p><strong>0.10 Sept 9 2000</strong> First release 
+</p><h3><strong>Old change log history moved to <a href="old-changelog.htm">old-changelog.htm</a>. 
+  </strong></h3>
+<p>&nbsp;</p>
+<p>  
+</p></body></html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-datadict.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-datadict.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-datadict.htm	(revision 225)
@@ -0,0 +1,328 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>ADOdb Data Dictionary Manual</title>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <style type="text/css">
+      body, td {
+        /*font-family: Arial, Helvetica, sans-serif;*/
+        font-size: 11pt;
+      }
+      pre {
+        font-size: 9pt;
+         background-color: #EEEEEE; padding: .5em; margin: 0px; 
+      }
+      .toplink {
+        font-size: 8pt;
+      }
+    </style>
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<h2>ADOdb Data Dictionary Library for PHP</h2>
+<p>V4.94 23 Jan 2007 (c) 2000-2007 John Lim (<a
+ href="mailto:jlim#natsoft.com.my">jlim#natsoft.com.my</a>).<br>
+AXMLS (c) 2004 ars Cognita, Inc</p>
+<p><font size="1">This software is dual licensed using BSD-Style and
+LGPL. This means you can use it in compiled proprietary and commercial
+products.</font></p>
+
+<p>Useful ADOdb links: <a href="http://adodb.sourceforge.net/#download">Download</a>
+&nbsp; <a href="http://adodb.sourceforge.net/#docs">Other Docs</a>
+</p>
+<p>This documentation describes a PHP class library to automate the
+creation of tables, indexes and foreign key constraints portably for
+multiple databases. Richard Tango-Lowy and Dan Cech have been kind
+enough to contribute <a href="#xmlschema">AXMLS</a>, an XML schema
+system for defining databases. You can contact them at
+dcech#phpwerx.net and richtl#arscognita.com.</p>
+<p>Currently the following databases are supported:</p>
+<p> <b>Well-tested:</b> PostgreSQL, MySQL, Oracle, MSSQL.<br>
+<b>Beta-quality:</b> DB2, Informix, Sybase, Interbase, Firebird.<br>
+<b>Alpha-quality:</b> MS Access (does not support DEFAULT values) and
+generic ODBC.
+</p>
+<h3>Example Usage</h3>
+<pre>  include_once('adodb.inc.php');<br>  <font color="#006600"># First create a normal connection</font><br>  $db = NewADOConnection('mysql');<br>  $db-&gt;Connect(...);<br><br>  <font
+ color="#006600"># Then create a data dictionary object, using this connection</font><br>  $dict = <strong>NewDataDictionary</strong>($db);<br><br>  <font
+ color="#006600"># We have a portable declarative data dictionary format in ADOdb, similar to SQL.<br>  # Field types use 1 character codes, and fields are separated by commas.<br>  # The following example creates three fields: "col1", "col2" and "col3":</font><br>  $flds = " <br>  <font
+ color="#663300"><strong> col1 C(32) NOTNULL DEFAULT 'abc',<br>   col2 I  DEFAULT 0,<br>   col3 N(12.2)</strong></font><br>  ";<br><br>  <font
+ color="#006600"># We demonstrate creating tables and indexes</font><br>  $sqlarray = $dict-&gt;<strong>CreateTableSQL</strong>($tabname, $flds, $taboptarray);<br>  $dict-&gt;<strong>ExecuteSQLArray</strong>($sqlarray);<br><br>  $idxflds = 'co11, col2';<br>  $sqlarray = $dict-&gt;<strong>CreateIndexSQL</strong>($idxname, $tabname, $idxflds);<br>  $dict-&gt;<strong>ExecuteSQLArray</strong>($sqlarray);<br></pre>
+<h3>More Complex Table Sample</h3>
+<p>
+The following string will create a table with a primary key event_id and multiple indexes, including one compound index idx_ev1. The ability to define indexes using the INDEX keyword was added in ADOdb 4.94 by Gaetano Giunta.
+<pre>
+$flds = "
+  event_id I(11) NOTNULL AUTOINCREMENT PRIMARY,
+  event_type I(4) NOTNULL  <b>INDEX idx_evt</b>,
+  event_start_date T DEFAULT NULL <b>INDEX id_esd</b>,
+  event_end_date T DEFAULT '0000-00-00 00:00:00' <b>INDEX id_eted</b>,
+  event_parent I(11) UNSIGNED NOTNULL DEFAULT 0 <b>INDEX id_evp</b>,
+  event_owner I(11) DEFAULT 0 <b>INDEX idx_ev1</b>,
+  event_project I(11) DEFAULT 0 <b>INDEX idx_ev1</b>,
+  event_times_recuring I(11) UNSIGNED NOTNULL DEFAULT 0,
+  event_icon C(20) DEFAULT 'obj/event',
+  event_description X
+";
+$sqlarray = $db-><b>CreateTableSQL</b>($tablename, $flds);
+$dict-><b>ExecuteSQLArray</b>($sqlarray);
+</pre>
+<h3>Class Factory</h3>
+<h4>NewDataDictionary($connection, $drivername=false)</h4>
+<p>Creates a new data dictionary object. You pass a database connection object in $connection. The $connection does not have to be actually connected to the database. Some database connection objects are generic (eg. odbtp and odbc). Since 4.53, you can tell ADOdb  the actual database with $drivername. E.g.</p>
+<pre>
+$db =& NewADOConnection('odbtp');
+$datadict = NewDataDictionary($db, 'mssql'); # force mssql
+</pre>
+<h3>Class Functions</h3>
+<h4>function CreateDatabase($dbname, $optionsarray=false)</h4>
+<p>Create a database with the name $dbname;</p>
+<h4>function CreateTableSQL($tabname, $fldarray, $taboptarray=false)</h4>
+<pre>  RETURNS:      an array of strings, the sql to be executed, or false<br>  $tabname:     name of table<br>  $fldarray:    string (or array) containing field info<br>  $taboptarray: array containing table options<br></pre>
+<p>The new format of $fldarray uses a free text format, where each
+field is comma-delimited.
+The first token for each field is the field name, followed by the type
+and optional
+field size. Then optional keywords in $otheroptions:</p>
+<pre>  "$fieldname $type $colsize $otheroptions"</pre>
+<p>The older (and still supported) format of $fldarray is a
+2-dimensional array, where each row in the 1st dimension represents one
+field. Each row has this format:</p>
+<pre>  array($fieldname, $type, [,$colsize] [,$otheroptions]*)</pre>
+<p>The first 2 fields must be the field name and the field type. The
+field type can be a portable type codes or the actual type for that
+database.</p>
+<p>Legal portable type codes include:</p>
+<pre>  C:  Varchar, capped to 255 characters.<br>  X:  Larger varchar, capped to 4000 characters (to be compatible with Oracle). <br>  XL: For Oracle, returns CLOB, otherwise the largest varchar size.<br><br>  C2: Multibyte varchar<br>  X2: Multibyte varchar (largest size)<br><br>  B:  BLOB (binary large object)<br><br>  D:  Date (some databases do not support this, and we return a datetime type)<br>  T:  Datetime or Timestamp<br>  L:  Integer field suitable for storing booleans (0 or 1)<br>  I:  Integer (mapped to I4)<br>  I1: 1-byte integer<br>  I2: 2-byte integer<br>  I4: 4-byte integer<br>  I8: 8-byte integer<br>  F:  Floating point number<br>  N:  Numeric or decimal number<br></pre>
+<p>The $colsize field represents the size of the field. If a decimal
+number is used, then it is assumed that the number following the dot is
+the precision, so 6.2 means a number of size 6 digits and 2 decimal
+places. It is recommended that the default for number types be
+represented as a string to avoid any rounding errors.</p>
+<p>The $otheroptions include the following keywords (case-insensitive):</p>
+<pre>  AUTO            For autoincrement number. Emulated with triggers if not available.<br>                  Sets NOTNULL also.<br>  AUTOINCREMENT   Same as auto.<br>  KEY             Primary key field. Sets NOTNULL also. Compound keys are supported.<br>  PRIMARY         Same as KEY.<br>  DEF             Synonym for DEFAULT for lazy typists.<br>  DEFAULT         The default value. Character strings are auto-quoted unless<br>                  the string begins and ends with spaces, eg ' SYSDATE '.<br>  NOTNULL         If field is not null.<br>  DEFDATE         Set default value to call function to get today's date.<br>  DEFTIMESTAMP    Set default to call function to get today's datetime.<br>  NOQUOTE         Prevents autoquoting of default string values.<br>  CONSTRAINTS     Additional constraints defined at the end of the field<br>                  definition.<br></pre>
+<p>The Data Dictonary accepts two formats, the older array
+specification:</p>
+<pre>  $flds = array(<br>    array('COLNAME',   'DECIMAL', '8.4', 'DEFAULT' =&gt; 0, 'NOTNULL'),<br>    array('id',        'I'      , 'AUTO'),<br>    array('`MY DATE`', 'D'      , 'DEFDATE'),<br>    array('NAME',      'C'      , '32', 'CONSTRAINTS' =&gt; 'FOREIGN KEY REFERENCES reftable')<br>  );<br></pre>
+<p>Or the simpler declarative format:</p>
+<pre>  $flds = "<font color="#660000"><strong><br>    COLNAME DECIMAL(8.4) DEFAULT 0 NOTNULL,<br>    id I AUTO,<br>    `MY DATE` D DEFDATE,<br>    NAME C(32) CONSTRAINTS 'FOREIGN KEY REFERENCES reftable'</strong></font><br>  ";<br></pre>
+<p>Note that if you have special characters in the field name (e.g. My
+Date), you should enclose it in back-quotes. Normally field names are
+not case-sensitive, but if you enclose it in back-quotes, some
+databases will treat the names as case-sensitive (eg. Oracle) , and
+others won't. So be careful.</p>
+<p>The $taboptarray is the 3rd parameter of the CreateTableSQL
+function. This contains table specific settings. Legal keywords include:</p>
+<ul>
+  <li><b>REPLACE</b><br>
+Indicates that the previous table definition should be removed
+(dropped)together with ALL data. See first example below. </li>
+  <li><b>DROP</b><br>
+Drop table. Useful for removing unused tables. </li>
+  <li><b>CONSTRAINTS</b><br>
+Define this as the key, with the constraint as the value. See the
+postgresql <a href="#foreignkey">example</a> below. Additional constraints defined for the whole
+table. You will probably need to prefix this with a comma. </li>
+</ul>
+<p>Database specific table options can be defined also using the name
+of the database type as the array key. In the following example, <em>create
+the table as ISAM with MySQL, and store the table in the "users"
+tablespace if using Oracle</em>. And because we specified REPLACE, drop
+the table first.</p>
+<pre>  $taboptarray = array('mysql' =&gt; 'TYPE=ISAM', 'oci8' =&gt; 'tablespace users', 'REPLACE');</pre>
+<p><a name=foreignkey></a>You can also define foreign key constraints. The following is syntax
+for postgresql:
+</p>
+<pre>  $taboptarray = array('constraints' =&gt; ', FOREIGN KEY (col1) REFERENCES reftable (refcol)');</pre>
+<h4>function DropTableSQL($tabname)</h4>
+<p>Returns the SQL to drop the specified table.</p>
+<h4>function ChangeTableSQL($tabname, $flds)</h4>
+<p>Checks to see if table exists, if table does not exist, behaves like
+CreateTableSQL. If table exists, generates appropriate ALTER TABLE
+MODIFY COLUMN commands if field already exists, or ALTER TABLE ADD
+$column if field does not exist.</p>
+<p>The class must be connected to the database for ChangeTableSQL to
+detect the existence of the table. Idea and code contributed by Florian
+Buzin.</p>
+<h4>function RenameTableSQL($tabname,$newname)</h4>
+<p>Rename a table.  Returns the an array of strings, which is the SQL required to rename a table. Since ADOdb 4.53. Contributed by Ralf Becker.</p>
+<h4> function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='')</h4>
+<p>Rename a table field. Returns the an array of strings, which is the SQL required to rename a column. The optional $flds is a complete column-defintion-string like for AddColumnSQL, only used by mysql at the moment. Since ADOdb 4.53. Contributed by Ralf Becker.</p>
+<h4>function CreateIndexSQL($idxname, $tabname, $flds,
+$idxoptarray=false)</h4>
+<pre>  RETURNS:      an array of strings, the sql to be executed, or false<br>  $idxname:     name of index<br>  $tabname:     name of table<br>  $flds:        list of fields as a comma delimited string or an array of strings<br>  $idxoptarray: array of index creation options<br></pre>
+<p>$idxoptarray is similar to $taboptarray in that index specific
+information can be embedded in the array. Other options include:</p>
+<pre>  CLUSTERED     Create clustered index (only mssql)<br>  BITMAP        Create bitmap index (only oci8)<br>  UNIQUE        Make unique index<br>  FULLTEXT      Make fulltext index (only mysql)<br>  HASH          Create hash index (only postgres)<br>  DROP          Drop legacy index<br></pre>
+<h4>function DropIndexSQL ($idxname, $tabname = NULL)</h4>
+<p>Returns the SQL to drop the specified index.</p>
+<h4>function AddColumnSQL($tabname, $flds)</h4>
+<p>Add one or more columns. Not guaranteed to work under all situations.</p>
+<h4>function AlterColumnSQL($tabname, $flds)</h4>
+<p>Warning, not all databases support this feature.</p>
+<h4>function DropColumnSQL($tabname, $flds)</h4>
+<p>Drop 1 or more columns.</p>
+<h4>function SetSchema($schema)</h4>
+<p>Set the schema.</p>
+<h4>function &amp;MetaTables()</h4>
+<h4>function &amp;MetaColumns($tab, $upper=true, $schema=false)</h4>
+<h4>function &amp;MetaPrimaryKeys($tab,$owner=false,$intkey=false)</h4>
+<h4>function &amp;MetaIndexes($table, $primary = false, $owner = false)</h4>
+<p>These functions are wrappers for the corresponding functions in the
+connection object. However, the table names will be autoquoted by the
+TableName function (see below) before being passed to the connection
+object.</p>
+<h4>function NameQuote($name = NULL)</h4>
+<p>If the provided name is quoted with backquotes (`) or contains
+special characters, returns the name quoted with the appropriate quote
+character, otherwise the name is returned unchanged.</p>
+<h4>function TableName($name)</h4>
+<p>The same as NameQuote, but will prepend the current schema if
+specified</p>
+<h4>function MetaType($t,$len=-1,$fieldobj=false)</h4>
+<h4>function ActualType($meta)</h4>
+<p>Convert between database-independent 'Meta' and database-specific
+'Actual' type codes.</p>
+<h4>function ExecuteSQLArray($sqlarray, $contOnError = true)</h4>
+<pre>  RETURNS:      0 if failed, 1 if executed all but with errors, 2 if executed successfully<br>  $sqlarray:    an array of strings with sql code (no semicolon at the end of string)<br>  $contOnError: if true, then continue executing even if error occurs<br></pre>
+<p>Executes an array of SQL strings returned by CreateTableSQL or
+CreateIndexSQL.</p>
+<hr />
+<a name="xmlschema"></a>
+<h2>ADOdb XML Schema (AXMLS)</h2>
+<p>This is a class contributed by Richard Tango-Lowy and Dan Cech that
+allows the user to quickly
+and easily build a database using the excellent ADODB database library
+and a simple XML formatted file.
+You can <a href="http://sourceforge.net/projects/adodb-xmlschema/">download
+the latest version of AXMLS here</a>.</p>
+<h3>Quick Start</h3>
+<p>Adodb-xmlschema, or AXMLS, is a set of classes that allow the user
+to quickly and easily build or upgrade a database on almost any RDBMS
+using the excellent ADOdb database library and a simple XML formatted
+schema file. Our goal is to give developers a tool that's simple to
+use, but that will allow them to create a single file that can build,
+upgrade, and manipulate databases on most RDBMS platforms.</p>
+<span style="font-weight: bold;"> Installing axmls</span>
+<p>The easiest way to install AXMLS to download and install any recent
+version of the ADOdb database abstraction library. To install AXMLS
+manually, simply copy the adodb-xmlschema.inc.php file and the xsl
+directory into your adodb directory.</p>
+<span style="font-weight: bold;"> Using AXMLS in Your Application</span>
+<p>There are two steps involved in using AXMLS in your application:
+first, you must create a schema, or XML representation of your
+database, and second, you must create the PHP code that will parse and
+execute the schema.</p>
+<p>Let's begin with a schema that describes a typical, if simplistic
+user management table for an application.</p>
+<pre class="listing"><pre>&lt;?xml version="1.0"?&gt;<br>&lt;schema version="0.2"&gt;<br><br>  &lt;table name="users"&gt;<br>    &lt;desc&gt;A typical users table for our application.&lt;/desc&gt;<br>    &lt;field name="userId" type="I"&gt;<br>      &lt;descr&gt;A unique ID assigned to each user.&lt;/descr&gt;<br><br>      &lt;KEY/&gt;<br>      &lt;AUTOINCREMENT/&gt;<br>    &lt;/field&gt;<br>    <br>    &lt;field name="userName" type="C" size="16"&gt;&lt;NOTNULL/&gt;&lt;/field&gt;<br><br>    <br>    &lt;index name="userName"&gt;<br>      &lt;descr&gt;Put a unique index on the user name&lt;/descr&gt;<br>      &lt;col&gt;userName&lt;/col&gt;<br>      &lt;UNIQUE/&gt;<br><br>    &lt;/index&gt;<br>  &lt;/table&gt;<br>  <br>  &lt;sql&gt;<br>    &lt;descr&gt;Insert some data into the users table.&lt;/descr&gt;<br>    &lt;query&gt;insert into users (userName) values ( 'admin' )&lt;/query&gt;<br><br>    &lt;query&gt;insert into users (userName) values ( 'Joe' )&lt;/query&gt;<br>  &lt;/sql&gt;<br>&lt;/schema&gt;			<br></pre></pre>
+<p>Let's take a detailed look at this schema.</p>
+<p>The opening &lt;?xml version="1.0"?&gt; tag is required by XML. The
+&lt;schema&gt; tag tells the parser that the enclosed markup defines an
+XML schema. The version="0.2" attribute sets <em>the version of the
+AXMLS DTD used by the XML schema.</em> </p>
+<p>All versions of AXMLS prior to version 1.0 have a schema version of
+"0.1". The current schema version is "0.2".</p>
+<pre class="listing"><pre>&lt;?xml version="1.0"?&gt;<br>&lt;schema version="0.2"&gt;<br>  ...<br>&lt;/schema&gt;<br></pre></pre>
+<p>Next we define one or more tables. A table consists of a fields (and
+other objects) enclosed by &lt;table&gt; tags. The name="" attribute
+specifies the name of the table that will be created in the database.</p>
+<pre class="listing"><pre>&lt;table name="users"&gt;<br><br>    &lt;desc&gt;A typical users table for our application.&lt;/desc&gt;<br>    &lt;field name="userId" type="I"&gt;<br><br>      &lt;descr&gt;A unique ID assigned to each user.&lt;/descr&gt;<br>      &lt;KEY/&gt;<br>      &lt;AUTOINCREMENT/&gt;<br>    &lt;/field&gt;<br>    <br>    &lt;field name="userName" type="C" size="16"&gt;&lt;NOTNULL/&gt;&lt;/field&gt;<br><br>    <br>&lt;/table&gt;<br></pre></pre>
+<p>This table is called "users" and has a description and two fields.
+The description is optional, and is currently only for your own
+information; it is not applied to the database.</p>
+<p>The first &lt;field&gt; tag will create a field named "userId" of
+type "I", or integer. (See the ADOdb Data Dictionary documentation for
+a list of valid types.) This &lt;field&gt; tag encloses two special
+field options: &lt;KEY/&gt;, which specifies this field as a primary
+key, and &lt;AUTOINCREMENT/&gt;, which specifies that the database
+engine should automatically fill this field with the next available
+value when a new row is inserted.</p>
+<p>The second &lt;field&gt; tag will create a field named "userName" of
+type "C", or character, and of length 16 characters. The
+&lt;NOTNULL/&gt; option specifies that this field does not allow NULLs.</p>
+<p>There are two ways to add indexes to a table. The simplest is to
+mark a field with the &lt;KEY/&gt; option as described above; a primary
+key is a unique index. The second and more powerful method uses the
+&lt;index&gt; tags.</p>
+<pre class="listing"><pre>&lt;table name="users"&gt;<br>  ...<br>    <br>  &lt;index name="userName"&gt;<br>    &lt;descr&gt;Put a unique index on the user name&lt;/descr&gt;<br>    &lt;col&gt;userName&lt;/col&gt;<br><br>    &lt;UNIQUE/&gt;<br>  &lt;/index&gt;<br>    <br>&lt;/table&gt;<br></pre></pre>
+<p>The &lt;index&gt; tag specifies that an index should be created on
+the enclosing table. The name="" attribute provides the name of the
+index that will be created in the database. The description, as above,
+is for your information only. The &lt;col&gt; tags list each column
+that will be included in the index. Finally, the &lt;UNIQUE/&gt; tag
+specifies that this will be created as a unique index.</p>
+<p>Finally, AXMLS allows you to include arbitrary SQL that will be
+applied to the database when the schema is executed.</p>
+<pre class="listing"><pre>&lt;sql&gt;<br>  &lt;descr&gt;Insert some data into the users table.&lt;/descr&gt;<br>  &lt;query&gt;insert into users (userName) values ( 'admin' )&lt;/query&gt;<br><br>  &lt;query&gt;insert into users (userName) values ( 'Joe' )&lt;/query&gt;<br>&lt;/sql&gt;<br></pre></pre>
+<p>The &lt;sql&gt; tag encloses any number of SQL queries that you
+define for your own use.</p>
+<p>Now that we've defined an XML schema, you need to know how to apply
+it to your database. Here's a simple PHP script that shows how to load
+the schema.</p>
+<pre class="listing"><pre>&lt;?PHP<br>/* You must tell the script where to find the ADOdb and<br> * the AXMLS libraries.<br> */
+require( "path_to_adodb/adodb.inc.php");
+require( "path_to_adodb/adodb-xmlschema.inc.php" ); # or adodb-xmlschema03.inc.php
+
+/* Configuration information. Define the schema filename,<br> * RDBMS platform (see the ADODB documentation for valid<br> * platform names), and database connection information here.<br> */<br>$schemaFile = 'example.xml';<br>$platform = 'mysql';<br>$dbHost = 'localhost';<br>$dbName = 'database';<br>$dbUser = 'username';<br>$dbPassword = 'password';<br><br>/* Start by creating a normal ADODB connection.<br> */<br>$db = ADONewConnection( $platform );<br>$db-&gt;Connect( $dbHost, $dbUser, $dbPassword, $dbName );<br><br>/* Use the database connection to create a new adoSchema object.<br> */<br>$schema = new adoSchema( $db );<br><br>/* Call ParseSchema() to build SQL from the XML schema file.<br> * Then call ExecuteSchema() to apply the resulting SQL to <br> * the database.<br> */<br>$sql = $schema-&gt;ParseSchema( $schemaFile );<br>$result = $schema-&gt;ExecuteSchema();<br>?&gt;<br></pre></pre>
+<p>Let's look at each part of the example in turn. After you manually
+create the database, there are three steps required to load (or
+upgrade) your schema.</p>
+<p>First, create a normal ADOdb connection. The variables and values
+here should be those required to connect to your database.</p>
+<pre class="listing"><pre>$db = ADONewConnection( 'mysql' );<br>$db-&gt;Connect( 'host', 'user', 'password', 'database' );<br></pre></pre>
+<p>Second, create the adoSchema object that load and manipulate your
+schema. You must pass an ADOdb database connection object in order to
+create the adoSchema object.</p>
+<pre class="listing">$schema = new adoSchema( $db );<br></pre>
+<p>Third, call ParseSchema() to parse the schema and then
+ExecuteSchema() to apply it to the database. You must pass
+ParseSchema() the path and filename of your schema file.</p>
+<pre class="listing">$schema-&gt;ParseSchema( $schemaFile ); <br>$schema-&gt;ExecuteSchema();</pre>
+<p>Execute the above code and then log into your database. If you've
+done all this right, you should see your tables, indexes, and SQL.</p>
+<p>You can find the source files for this tutorial in the examples
+directory as tutorial_shema.xml and tutorial.php. See the class
+documentation for a more detailed description of the adoSchema methods,
+including methods and schema elements that are not described in this
+tutorial.</p>
+<h3>XML Schema Version 3</h3>
+<p>In March 2006, we added adodb-xmlschema03.inc.php to the release, which supports version 3 of XML Schema. 
+The adodb-xmlschema.inc.php remains the same as previous releases, and supports version 2 of XML Schema. 
+Version 3 provides some enhancements:
+
+<ul>
+     <li> Support for updating table data during an upgrade.
+     <li> Support for platform-specific table options and platform negation.
+     <li> Support for unsigned fields.
+     <li> Fixed opt and constraint support
+     <li> Many other fixes such as OPT tag, which allows you to set optional platform settings:
+</ul>
+
+<p>Example usage:
+<pre>&lt;?xml version="1.0"?>
+<b>&lt;schema version="0.3"></b>
+ &lt;table name="ats_kb">
+  &lt;descr>ATS KnowledgeBase&lt;/descr>
+  &lt;opt platform="mysql">TYPE=INNODB&lt;/opt>
+  &lt;field name="recid" type="I"/>
+  &lt;field name="organization_code" type="I4"/> 
+  &lt;field name="sub_code" type="C" size="20"/>
+  etc...
+</pre>
+<p>To use it, change your code to include adodb-xmlschema03.inc.php.
+
+<h3>Upgrading</h3>
+<p>
+If your schema version is older, than XSLT is used to transform the
+schema to the newest version. This means that if you are using an older
+XML schema format, you need to have the XSLT extension installed.
+If you do not want to require your users to have the XSLT extension
+installed, make sure you modify your XML schema to conform to the
+latest version.
+<hr />
+<address>If you have any questions or comments, please email them to
+Richard at richtl#arscognita.com.
+</address>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-oracle.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-oracle.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-oracle.htm	(revision 225)
@@ -0,0 +1,542 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<style>
+pre {
+  background-color: #eee;
+  padding: 0.75em 1.5em;
+  font-size: 12px;
+  border: 1px solid #ddd;
+}
+.greybg {
+  background-color: #eee;
+  padding: 0.75em 1.5em;
+  font-size: 12px;
+  border: 1px solid #ddd;
+}
+.style1 {color: #660000}
+</style>
+<title>ADOdb with PHP and Oracle</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</style>
+</head>
+
+<body>
+<table width=100%><tr><td>
+<h2>Using ADOdb with PHP and Oracle: an advanced tutorial</h2>
+</td><td><div align="right"><img src=cute_icons_for_site/adodb.gif width="88" height="31"></div></tr></table>
+<p><font size="1">(c)2004-2005 John Lim. All rights reserved.</font></p>
+<h3>1. Introduction</h3>
+<p>Oracle is the most popular commercial database used with PHP. There are many ways of accessing Oracle databases in PHP. These include:</p>
+<ul>
+  <li>The oracle extension</li>
+  <li>The oci8 extension</li>
+  <li>PEAR DB library</li>
+  <li>ADOdb library</li>
+</ul>
+<p>The wide range of choices is confusing to someone just starting with Oracle and PHP. I will briefly summarize the differences, and  show you the advantages of using <a href="http://adodb.sourceforge.net/">ADOdb</a>. </p>
+<p>First we have the C extensions which provide low-level access to Oracle functionality. These C extensions are precompiled into PHP, or linked in dynamically when the web server starts up. Just in case you need it, here's a <a href=http://www.oracle.com/technology/tech/opensource/php/apache/inst_php_apache_linux.html>guide to installing Oracle and PHP on Linux</a>.</p>
+<table width="75%" border="1" align="center">
+  <tr valign="top">
+    <td nowrap><b>Oracle extension</b></td>
+    <td>Designed for Oracle 7 or earlier. This is obsolete.</td>
+  </tr>
+  <tr valign="top">
+    <td nowrap><b>Oci8 extension</b></td>
+    <td> Despite it's name, which implies it is only for Oracle 8i, this is the standard method for accessing databases running Oracle 8i, 9i or 10g (and later).</td>
+  </tr>
+</table>
+<p>Here is an example of using the oci8 extension to query the <i>emp</i> table of the <i>scott</i> schema with bind parameters:
+<pre>
+$conn = OCILogon("scott","tiger", $tnsName); 
+
+$stmt = OCIParse($conn,"select * from emp where empno > :emp order by empno"); 
+$emp = 7900;
+OCIBindByName($stmt, ':emp', $emp);
+$ok = OCIExecute($stmt);
+while (OCIFetchInto($stmt,$arr)) {
+	print_r($arr);
+	echo "&lt;hr>";	
+} 
+</pre>
+<p>This generates the following output:
+<div class=greybg>
+Array ( [0] => 7902 [1] => FORD [2] => ANALYST [3] => 7566 [4] => 03/DEC/81 [5] => 3000 [7] => 20 ) 
+<hr />
+  Array ( [0] => 7934 [1] => MILLER [2] => CLERK [3] => 7782 [4] => 23/JAN/82 [5] => 1300 [7] => 10 )
+</div>
+<p>We also have  many higher level PHP libraries that allow you to simplify the above code. The most popular are <a href="http://pear.php.net/">PEAR DB</a> and <a href="http://adodb.sourceforge.net/">ADOdb</a>.  Here are some of the differences between these libraries:</p>
+<table width="75%" border="1" align="center">
+  <tr>
+    <td><b>Feature</b></td>
+    <td><b>PEAR DB 1.6</b></td>
+    <td><b>ADOdb 4.52</b></td>
+  </tr>
+  <tr valign="top">
+    <td>General Style</td>
+    <td>Simple, easy to use. Lacks Oracle specific functionality.</td>
+    <td>Has multi-tier design. Simple high-level design for beginners, and also lower-level advanced Oracle functionality.</td>
+  </tr>
+  <tr valign="top">
+    <td>Support for Prepare</td>
+    <td>Yes, but only on one statement, as the last prepare overwrites previous prepares.</td>
+    <td>Yes (multiple simultaneous prepare's allowed)</td>
+  </tr>
+  <tr valign="top">
+    <td>Support for LOBs</td>
+    <td>No</td>
+    <td>Yes, using update semantics</td>
+  </tr>
+  <tr valign="top">
+    <td>Support for REF Cursors</td>
+    <td>No</td>
+    <td>Yes</td>
+  </tr>
+  <tr valign="top">
+    <td>Support for IN Parameters</td>
+    <td>Yes</td>
+    <td>Yes</td>
+  </tr>
+  <tr valign="top">
+    <td>Support for OUT Parameters</td>
+    <td>No</td>
+    <td>Yes</td>
+  </tr>
+  <tr valign="top">
+    <td>Schema creation using XML</td>
+    <td>No</td>
+    <td>Yes, including ability to define tablespaces and constraints</td>
+  </tr>
+  <tr valign="top">
+    <td>Provides database portability features</td>
+    <td>No</td>
+    <td>Yes, has some ability to abstract features that differ between databases such as dates, bind parameters, and data types.</td>
+  </tr>
+  <tr valign="top">
+    <td>Performance monitoring and tracing</td>
+    <td>No</td>
+    <td>Yes. SQL can be traced and linked to web page it was executed on. Explain plan support included.</td>
+  </tr>
+  <tr valign="top">
+    <td>Recordset caching for frequently used queries</td>
+    <td>No</td>
+    <td>Yes. Provides great speedups for SQL involving complex <i>where, group-by </i>and <i>order-by</i> clauses.</td>
+  </tr>
+  <tr valign="top">
+    <td>Popularity</td>
+    <td>Yes, part of PEAR release</td>
+    <td>Yes, many open source projects are using this software, including PostNuke, Xaraya, Mambo, Tiki Wiki.</td>
+  </tr>
+  <tr valign="top">
+    <td>Speed</td>
+    <td>Medium speed.</td>
+    <td>Very high speed. Fastest database abstraction library available for PHP. <a href="http://phplens.com/lens/adodb/">Benchmarks are available</a>.</td>
+  </tr>
+  <tr valign="top">
+    <td>High Speed Extension available</td>
+    <td>No</td>
+    <td>Yes. You can install the optional ADOdb extension, which reimplements the most frequently used parts of ADOdb as fast C code. Note that the source code version of ADOdb runs just fine without this extension, and only makes use of the extension if detected.</td>
+  </tr>
+</table>
+<p> PEAR DB is good enough for simple web apps. But if you need more power, you can see ADOdb offers more sophisticated functionality. The rest of this article will concentrate on using ADOdb with Oracle. You can find out more about <a href="#connecting">connecting to Oracle</a> later in this guide.</p>
+<h4>ADOdb Example</h4>
+<p>In ADOdb, the above oci8 example querying the <i>emp</i> table could be written as:</p>
+<pre>
+include "/path/to/adodb.inc.php";
+$db = NewADOConnection("oci8");
+$db->Connect($tnsName, "scott", "tiger");
+
+$rs = $db->Execute("select * from emp where empno>:emp order by empno", 
+                    array('emp' => 7900));
+while ($arr = $rs->FetchRow()) {
+    print_r($arr);
+	echo "&lt;hr>";
+}
+</pre>
+<p>The Execute( ) function returns a recordset object, and you can retrieve the rows returned using $recordset-&gt;FetchRow( ). </p>
+<p>If we ignore the initial connection preamble, we can see the ADOdb version is much easier and simpler:</p>
+<table width="100%" border="1">
+  <tr valign="top" bgcolor="#FFFFFF">
+    <td width="50%" bgcolor="#e0e0e0"><b>Oci8</b></td>
+    <td bgcolor="#e0e0e0"><b>ADOdb</b></td>
+  </tr>
+  <tr valign="top" bgcolor="#CCCCCC">
+    <td><pre><font size="1">$stmt = <b>OCIParse</b>($conn,
+       "select * from emp where empno > :emp"); 
+$emp = 7900;
+<b>OCIBindByName</b>($stmt, ':emp', $emp);
+$ok = <b>OCIExecute</b>($stmt);
+
+while (<b>OCIFetchInto</b>($stmt,$arr)) {
+	print_r($arr);
+	echo "&lt;hr>";	
+} </font></pre></td>
+    <td><pre><font size="1">$recordset = $db-><b>Execute</b>("select * from emp where empno>:emp", 
+                           array('emp' => 7900));
+
+while ($arr = $recordset-><b>FetchRow</b>()) {
+	print_r($arr);
+	echo "&lt;hr>";
+}</font></pre></td>
+  </tr>
+</table>
+<p>&nbsp;</p>
+<h3>2. ADOdb Query Semantics</h3>
+<p>You can also query the database using the standard Microsoft ADO MoveNext( ) metaphor. The data array for the current row is stored in the <i>fields</i> property of the recordset object, $rs.
+MoveNext( ) offers the highest performance among all the techniques for iterating through a recordset:
+<pre>
+$rs = $db->Execute("select * from emp where empno>:emp", array('emp' => 7900));
+while (!$rs->EOF) {
+	print_r($rs->fields);
+	$rs->MoveNext();
+}
+</pre>
+<p>And if you are interested in having the data returned in a 2-dimensional array, you can use:
+<pre>
+$arr = $db->GetArray("select * from emp where empno>:emp", array('emp' => 7900));
+</pre>
+<p>Now to obtain only the first row as an array:
+<pre>
+$arr = $db->GetRow("select * from emp where empno=:emp", array('emp' => 7900));
+</pre>
+<p>Or to retrieve only the first field of the first row:
+<pre>
+$arr = $db->GetOne("select ename from emp where empno=:emp", array('emp' => 7900));
+</pre>
+<p>For easy pagination support, we provide the SelectLimit function. The following will perform a select query, limiting it to 100 rows, starting from row 201 (row 1 being the 1st row):
+<pre>
+$offset = 200; $limitrows = 100;
+$rs = $db->SelectLimit('select * from table', $limitrows, $offset);
+</pre>
+<p>The $offset parameter is optional.
+<h4>Array Fetch Mode</h4>
+<p>When data is being returned in an array, you can choose the type of array the data is returned in. 
+<ol>
+  <li> Numeric indexes - use <font size="2" face="Courier New, Courier, mono">$connection-&gt;SetFetchMode(ADODB_FETCH_NUM).</font></li>
+  <li>Associative indexes - the keys of the array are the names of the fields (in upper-case). Use <font size="2" face="Courier New, Courier, mono">$connection-&gt;SetFetchMode(ADODB_FETCH_ASSOC)</font><font face="Courier New, Courier, mono">.</font></li>
+  <li>Both numeric and associative indexes - use <font size="2" face="Courier New, Courier, mono">$connection-&gt;SetFetchMode(ADODB_FETCH_BOTH).</font></li>
+</ol>
+<p>The default is ADODB_FETCH_BOTH for Oracle.</p>
+<h4><b>Caching</b></h4>
+<p>You can define a database cache directory using $ADODB_CACHE_DIR, and cache the results of frequently used queries that rarely change. This is particularly useful for SQL with complex where clauses and group-by's and order-by's. It is also good for relieving heavily-loaded database servers.</p>
+<p>This example will cache the following select statement for 3600 seconds (1 hour):</p>
+<pre>
+$ADODB_CACHE_DIR = '/var/adodb/tmp';
+$rs = $db->CacheExecute(3600, "select names from allcountries order by 1");
+</pre>
+There are analogous CacheGetArray(
+), CacheGetRow( ),  CacheGetOne( ) and CacheSelectLimit( )  functions. The first parameter is the number of seconds to cache. You can also pass a bind array as a 3rd parameter (not shown above).
+<p>There is an alternative syntax for the caching functions. The first parameter is omitted, and you set the cacheSecs
+ property of the connection object:
+<pre>
+$ADODB_CACHE_DIR = '/var/adodb/tmp';
+$connection->cacheSecs = 3600;
+$rs = $connection->CacheExecute($sql, array('id' => 1));
+</pre>
+<h3>&nbsp;</h3>
+<h3>3. Using Prepare( ) For Frequently Used Statements</h3>
+<p>Prepare( ) is  for compiling frequently used  SQL statement for reuse. For example, suppose we have a large array which needs to be inserted into an Oracle database. The following will result in a massive speedup in query execution (at least 20-40%), as the SQL statement only needs to be compiled once:</p>
+<pre>
+$stmt = $db->Prepare('insert into table (field1, field2) values (:f1, :f2)');
+foreach ($arrayToInsert as $key => $value) {
+	$db->Execute($stmt, array('f1' => $key, 'f2' => $val);
+}
+</pre>
+<p>&nbsp;</p>
+<h3>4. Working With LOBs</h3>
+<p>Oracle treats data which is more than 4000 bytes in length specially. These are called Large Objects, or LOBs for short. Binary LOBs are BLOBs, and character LOBs are CLOBs. In most Oracle libraries, you need to do a lot of work to process LOBs, probably because Oracle designed it to work in systems with little memory. ADOdb tries to make things easy by assuming the LOB can fit into main memory. </p>
+<p>ADOdb will transparently handle LOBs  in <i>select</i> statements. The LOBs are automatically converted to PHP variables without any special coding.</p>
+<p>For updating records with LOBs, the functions UpdateBlob( ) and UpdateClob( ) are provided. Here's a BLOB example. The parameters should be self-explanatory:
+<pre>
+$ok = $db->Execute("insert into aTable (id, name, ablob) 
+                                values (aSequence.nextVal, 'Name', null)");
+if (!$ok) return LogError($db-&gt;ErrorMsg());
+<font color="#006600"># params: $tableName, $blobFieldName, $blobValue, $whereClause</font>
+$db->UpdateBlob('aTable', 'ablob', $blobValue, 'id=aSequence.currVal');
+</pre>
+<p>and the analogous CLOB example:
+<pre>
+$ok = $db->Execute("insert into aTable (id, name, aclob) 
+                                values (aSequence.nextVal, 'Name', null)");
+if (!$ok) return LogError($db-&gt;ErrorMsg());
+$db->UpdateClob('aTable', 'aclob', $clobValue, 'id=aSequence.currVal');
+</pre>
+<p>Note that LogError( ) is a user-defined function, and not part of ADOdb.
+<p>Inserting LOBs is more complicated. Since ADOdb 4.55, we allow you to do this
+  (assuming that the <em>photo</em> field is a BLOB, and we want to store $blob_data into
+  this field, and the primary key is the <em>id</em> field):
+<pre>
+	$sql = <span class="style1">"INSERT INTO photos ( ID, photo) ".
+			"VALUES ( :id, empty_blob() )".
+			" RETURNING photo INTO :xx"</span>;
+
+ 		$stmt = $db->PrepareSP($sql);
+		$db->InParameter($stmt, $<strong>id</strong>, <span class="style1">'id'</span>);
+		$blob = $db->InParameter($stmt, $<strong>blob_data</strong>, <span class="style1">'xx'</span>,-1, OCI_B_BLOB);
+		$db->StartTrans();
+		$ok = $db->Execute($stmt);
+		$db->CompleteTrans();
+</pre> 
+<p>
+<h3>5. REF CURSORs</h3>
+<p>Oracle recordsets can be passed around as variables called REF Cursors. For example, in PL/SQL, we could define a function <i>open_tab</i> that returns a REF CURSOR in the first parameter:</p>
+<pre>
+TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;
+
+PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR) IS
+	BEGIN
+		OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
+	END open_tab;
+</pre>
+<p>In ADOdb, we could access this REF Cursor using the ExecuteCursor() function. The following will find
+ all table names that begin with 'A' in the current schema:
+<pre>
+$rs = $db->ExecuteCursor("BEGIN open_tab(:refc,'A%'); END;",'refc');
+while ($arr = $rs->FetchRow()) print_r($arr);
+</pre>
+<p>The first parameter is the PL/SQL statement, and the second parameter is the name of the REF Cursor.
+</p>
+<p>&nbsp;</p>
+<h3>6. In and Out Parameters</h3>
+<p>The following PL/SQL
+stored procedure  requires an input  variable, and returns a result into an output variable:
+<pre>
+PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS
+	BEGIN
+		output := 'I love '||input;
+	END;
+</pre>
+<p>The following ADOdb code allows you to call the stored procedure:</p>
+<pre>
+$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;");
+$input = 'Sophia Loren';
+$db->InParameter($stmt,$input,'a1');
+$db->OutParameter($stmt,$output,'a2');
+$ok = $db->Execute($stmt);
+if ($ok) echo ($output == 'I love Sophia Loren') ? 'OK' : 'Failed';
+</pre>
+<p>PrepareSP( ) is a special function that knows about bind parameters.
+The main limitation currently is that IN OUT parameters do not work.
+<h4>Bind Parameters and REF CURSORs</h4>
+<p>We could also rewrite the REF CURSOR example to use InParameter (requires ADOdb 4.53 or later):
+<pre>
+$stmt = $db->PrepareSP("BEGIN adodb.open_tab(:refc,:tabname); END;");
+$input = 'A%';
+$db->InParameter($stmt,$input,'tabname');
+$rs = $db->ExecuteCursor($stmt,'refc');
+while ($arr = $rs->FetchRow()) print_r($arr);
+</pre>
+<h4>Bind Parameters and LOBs</h4>
+<p>You can also operate on LOBs. In this example, we have IN and OUT parameters using CLOBs. 
+<pre>
+	$text = 'test test test';
+	$sql = "declare rs clob; begin :rs := lobinout(:sa0); end;";
+	$stmt = $conn -> PrepareSP($sql);
+	$conn -> InParameter($stmt,$text,'sa0', -1, OCI_B_CLOB); # -1 means variable length
+	$rs = '';
+	$conn -> OutParameter($stmt,$rs,'rs', -1, OCI_B_CLOB);
+	$conn -> Execute($stmt);
+	echo "return = ".$rs."&lt;br>";
+</pre>
+<p>Similarly, you can use the constant OCI_B_BLOB to indicate that you are using BLOBs.
+<h4>Reusing Bind Parameters with CURSOR_SHARING=FORCE</h4>
+<p>Many web programmers do not care to use bind parameters, and prefer to enter the SQL directly. So instead of:</p>
+<pre>
+$arr = $db->GetArray("select * from emp where empno>:emp", array('emp' => 7900));
+</pre>
+<p>They prefer  entering the values inside the SQL:
+<pre>
+$arr = $db->GetArray("select * from emp where empno>7900");
+</pre>
+<p>This reduces Oracle performance because Oracle will reuse compiled SQL which is identical to previously compiled SQL. The above example with the values inside the SQL
+is unlikely to be reused. As an optimization, from Oracle 8.1 onwards, you can set the following session parameter after you login:
+<pre>
+ALTER SESSION SET CURSOR_SHARING=FORCE
+</pre>
+<p>This will force Oracle to convert all such variables (eg. the 7900 value) into constant bind parameters, improving SQL reuse.</p>
+<p>More <a href="http://phplens.com/adodb/code.initialization.html#speed">speedup tips</a>.</p>
+<p>&nbsp;</p>
+<h3>7. Dates and Datetime in ADOdb</h3>
+<p>There are two things you need to know about dates in ADOdb. </p>
+<p>First, to ensure cross-database compability, ADOdb assumes that dates are returned in ISO format (YYYY-MM-DD H24:MI:SS).</p>
+<p>Secondly, since Oracle treats dates and datetime as the same data type, we decided not to display the time in the default date format. So on login, ADOdb will set the NLS_DATE_FORMAT to 'YYYY-MM-DD'. If you prefer to show the date and time by default, do this:</p>
+<pre>
+$db = NewADOConnection('oci8');
+$db->NLS_DATE_FORMAT =  'RRRR-MM-DD HH24:MI:SS';
+$db->Connect($tns, $user, $pwd);
+</pre>
+<p>Or execute:</p>
+<pre>$sql = &quot;ALTER SESSION SET NLS_DATE_FORMAT = 'RRRR-MM-DD HH24:MI:SS'&quot;;
+$db-&gt;Execute($sql);
+</pre>
+<p>If you are not concerned about date portability and do not use ADOdb's portability layer, you can use your preferred date format instead.
+<p>
+<h3>8. Database Portability Layer</h3>
+<p>ADOdb provides the following functions for portably generating SQL functions 
+  as strings to be merged into your SQL statements:</p>
+<table width="75%" border="1" align=center>
+  <tr> 
+    <td width=30%><b>Function</b></td>
+    <td><b>Description</b></td>
+  </tr>
+  <tr> 
+    <td>DBDate($date)</td>
+    <td>Pass in a UNIX timestamp or ISO date and it will convert it to a date 
+      string formatted for INSERT/UPDATE</td>
+  </tr>
+  <tr> 
+    <td>DBTimeStamp($date)</td>
+    <td>Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp 
+      string formatted for INSERT/UPDATE</td>
+  </tr>
+  <tr> 
+    <td>SQLDate($date, $fmt)</td>
+    <td>Portably generate a date formatted using $fmt mask, for use in SELECT 
+      statements.</td>
+  </tr>
+  <tr> 
+    <td>OffsetDate($date, $ndays)</td>
+    <td>Portably generate a $date offset by $ndays.</td>
+  </tr>
+  <tr> 
+    <td>Concat($s1, $s2, ...)</td>
+    <td>Portably concatenate strings. Alternatively, for mssql use mssqlpo driver, 
+      which allows || operator.</td>
+  </tr>
+  <tr> 
+    <td>IfNull($fld, $replaceNull)</td>
+    <td>Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.</td>
+  </tr>
+  <tr>
+    <td>Param($name)</td>
+    <td>Generates bind placeholders, using ? or named conventions as appropriate.</td>
+  </tr>
+  <tr><td>$db->sysDate</td><td>Property that holds the SQL function that returns today's date</td>
+</tr>
+<tr><td>$db->sysTimeStamp</td><td>Property that holds the SQL function that returns the current
+timestamp (date+time).
+</td>
+</tr>
+<tr>
+<td>$db->concat_operator</td><td>Property that holds the concatenation operator
+</td>
+</tr>
+<tr><td>$db->length</td><td>Property that holds the name of the SQL strlen function.
+</td></tr>
+
+<tr><td>$db->upperCase</td><td>Property that holds the name of the SQL strtoupper function.
+</td></tr>
+<tr><td>$db->random</td><td>Property that holds the SQL to generate a random number between 0.00 and 1.00.
+</td>
+</tr>
+<tr><td>$db->substr</td><td>Property that holds the name of the SQL substring function.
+</td></tr>
+</table>
+<p>ADOdb also provides multiple oracle oci8 drivers for different scenarios:</p>
+<table width="75%" border="1" align="center">
+  <tr>
+    <td nowrap><b>Driver Name</b></td>
+    <td><b>Description</b></td>
+  </tr>
+  <tr>
+    <td>oci805 </td>
+    <td>Specifically for Oracle 8.0.5. This driver has a slower SelectLimit( ).</td>
+  </tr>
+  <tr>
+    <td>oci8</td>
+    <td>The default high performance driver. The keys of associative arrays returned in a recordset are upper-case.</td>
+  </tr>
+  <tr>
+    <td>oci8po</td>
+    <td> The portable Oracle driver. Slightly slower than oci8. This driver uses ? instead of :<i>bindvar</i> for binding variables, which is the standard for  other databases. Also the keys of associative arrays are in lower-case like other databases.</td>
+  </tr>
+</table>
+<p>Here's an example of calling the <i>oci8po</i> driver. Note that the bind variables use question-mark:</p>
+<pre>$db = NewADOConnection('oci8po');
+$db-&gt;Connect($tns, $user, $pwd);
+$db-&gt;Execute(&quot;insert into atable (f1, f2) values (?,?)&quot;, array(12, 'abc'));</pre>
+<p>&nbsp;<a name=connecting></a>
+<h3>9. Connecting to Oracle</h3>
+<p>Before you can use ADOdb, you need to have the Oracle client installed and setup the oci8 extension. This extension comes pre-compiled for Windows (but you still need to enable it in the php.ini file). For information on compiling the oci8 extension for PHP and Apache on Unix, there is an excellent guide at <a href="http://www.oracle.com/technology/tech/opensource/php/apache/inst_php_apache_linux.html">oracle.com</a>. </p>
+<h4>Should You Use Persistent Connections</h4>
+<p>One question that is frequently asked is should you use persistent connections to Oracle. Persistent connections allow PHP to recycle existing connections, reusing them after the previous web pages have completed. Non-persistent connections close automatically after the web page has completed. Persistent connections are faster because the cost of reconnecting is expensive, but there is additional resource overhead. As an alternative, Oracle allows you to pool and reuse server processes; this is called  <a href="http://www.cise.ufl.edu/help/database/oracle-docs/server.920/a96521/manproc.htm#13132">Shared Server</a> (also known as MTS).</p>
+<p>The author's benchmarks suggest that using non-persistent connections and the  Shared Server configuration offer the best performance. If Shared Server is not an option, only then consider using persistent connections.</p>
+<h4>Connection Examples</h4>
+<p>Just in case you are having problems connecting to Oracle, here are some examples:</p>
+<p>a. PHP and Oracle reside on the same machine, use default SID, with non-persistent connections:</p>
+<pre>	$conn = NewADOConnection('oci8');
+	$conn-&gt;Connect(false, 'scott', 'tiger');</pre>
+<p>b. TNS Name defined in tnsnames.ora (or ONAMES or HOSTNAMES), eg. 'myTNS', using persistent connections:</p>
+<pre>	$conn = NewADOConnection('oci8');
+	$conn-&gt;PConnect(false, 'scott', 'tiger', 'myTNS');</pre>
+<p>or</p>
+<pre> 	$conn-&gt;PConnect('myTNS', 'scott', 'tiger');</pre>
+<p>c. Host Address and SID</p>
+<pre>
+	$conn->connectSID = true;	
+	$conn-&gt;Connect('192.168.0.1', 'scott', 'tiger', 'SID');</pre>
+<p>d. Host Address and Service Name</p>
+<pre>	$conn-&gt;Connect('192.168.0.1', 'scott', 'tiger', 'servicename');</pre>
+<p>e. Oracle connection string:
+<pre>	$cstr = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port))
+			(CONNECT_DATA=(SID=$sid)))";
+	$conn-&gt;Connect($cstr, 'scott', 'tiger');
+</pre>
+<p>f. ADOdb data source names (dsn):
+<pre>
+	$dsn = 'oci8://user:pwd@tnsname/?persist';  # persist is optional
+	$conn = ADONewConnection($dsn);  # no need for Connect/PConnect
+	
+	$dsn = 'oci8://user:pwd@host/sid';
+	$conn = ADONewConnection($dsn);
+	
+	$dsn = 'oci8://user:pwd@/';   # oracle on local machine
+	$conn = ADONewConnection($dsn);</pre>
+<p>With ADOdb data source names,
+you don't have to call Connect( ) or PConnect( ).
+</p>
+<p>&nbsp;</p>
+<h3>10. Error Checking</h3>
+<p>The examples in this article are easy to read but a bit simplistic because we ignore error-handling. Execute( ) and Connect( ) will return false on error. So a more realistic way to call Connect( ) and Execute( ) is:
+<pre>function InvokeErrorHandler()
+{<br>global $db; ## assume global
+    MyLogFunction($db-&gt;ErrorNo(), $db-&gt;ErrorMsg());
+}
+if (!$db-&gt;Connect($tns, $usr, $pwd)) InvokeErrorHandler();
+
+$rs = $db->Execute("select * from emp where empno>:emp order by empno", 
+                    array('emp' => 7900));
+if (!$rs) return InvokeErrorHandler();
+while ($arr = $rs->FetchRow()) {
+    print_r($arr);
+	echo "&lt;hr>";
+}
+</pre>
+<p>You can retrieve the  error message and error number of the last SQL statement executed from ErrorMsg( ) and ErrorNo( ). You can also <a href=http://phplens.com/adodb/using.custom.error.handlers.and.pear_error.html>define a custom error handler function</a>.
+ADOdb also supports throwing exceptions in PHP5.
+<p>&nbsp;</p>
+<h3>Handling Large Recordsets (added 27 May 2005)</h3>
+The oci8 driver does not support counting the number of records returned in a SELECT statement, so the function RecordCount() 
+is emulated when the global variable $ADODB_COUNTRECS is set to true, which is the default. 
+We emulate this by buffering all the records. This can take up large amounts of memory for big recordsets.
+ Set $ADODB_COUNTRECS to false for the best performance. 
+ <p>
+This variable is checked every time a query is executed, so you can selectively choose which recordsets to count.
+<p>&nbsp;</p>
+<h3>11. Other ADOdb Features</h3>
+<p><a href="http://phplens.com/lens/adodb/docs-datadict.htm">Schema generation</a>. This allows you to define a schema using XML and import it into different RDBMS systems portably.</p>
+<p><a href="http://phplens.com/lens/adodb/docs-perf.htm">Performance monitoring and tracing</a>. Highlights of performance monitoring include identification of poor and suspicious SQL, with explain plan support, and identifying which web pages the SQL ran on.</p>
+<p>&nbsp;</p>
+<h3>12. Download</h3>
+<p>You can <a href="http://adodb.sourceforge.net/#download">download ADOdb from sourceforge</a>. ADOdb uses a BSD style license. That means that it is free for commercial use, and redistribution without source code is allowed.</p>
+<p>&nbsp;</p>
+<h3>13. Resources</h3>
+<ul>
+  <li>Oracle's <a href="http://www.oracle.com/technology/pub/articles/php_experts/index.html">Hitchhiker Guide to PHP</a></li>
+  <li>OTN article on <a href=http://www.oracle.com/technology/pub/articles/deployphp/lim_deployphp.html>Optimizing PHP and Oracle</a> by this author.
+  <li>Oracle has an excellent <a href="http://www.oracle.com/technology/tech/opensource/php/php_troubleshooting_faq.html">FAQ on PHP</a></li>
+  <li>PHP <a href="http://php.net/oci8">oci8</a> manual pages</li>
+  <li><a href=http://phplens.com/lens/lensforum/topics.php?id=4>ADOdb forums</a>.
+</ul>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-perf.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-perf.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-perf.htm	(revision 225)
@@ -0,0 +1,962 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>ADOdb Performance Monitoring Library</title>
+  <style type="text/css">
+body, td {
+/*font-family: Arial, Helvetica, sans-serif;*/
+font-size: 11pt;
+}
+pre {
+font-size: 9pt;
+background-color: #EEEEEE; padding: .5em; margin: 0px;
+}
+.toplink {
+font-size: 8pt;
+}
+  </style>
+</head>
+<body>
+<h3>The ADOdb Performance Monitoring Library</h3>
+<p>V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my)</p>
+<p><font size="1">This software is dual licensed using BSD-Style and
+LGPL. This means you can use it in compiled proprietary and commercial
+products.</font></p>
+<p>Useful ADOdb links: <a href="http://adodb.sourceforge.net/#download">Download</a>
+&nbsp; <a href="http://adodb.sourceforge.net/#docs">Other Docs</a>
+</p>
+<h3>Introduction</h3>
+<p>This module, part of the ADOdb package, provides both CLI and HTML
+interfaces for viewing key performance indicators of your database.
+This is very useful because web apps such as the popular phpMyAdmin
+currently do not provide effective database health monitoring tools.
+The module provides the following: </p>
+<ul>
+  <li>A quick health check of your database server using <code>$perf-&gt;HealthCheck()</code>
+or <code>$perf-&gt;HealthCheckCLI()</code>. </li>
+  <li>User interface for performance monitoring, <code>$perf-&gt;UI()</code>.
+This UI displays:
+    <ul>
+      <li>the health check, </li>
+      <li>all SQL logged and their query plans, </li>
+      <li>a list of all tables in the current database</li>
+      <li>an interface to continiously poll the server for key
+performance indicators such as CPU, Hit Ratio, Disk I/O</li>
+      <li>a form where you can enter and run SQL interactively.</li>
+    </ul>
+  </li>
+  <li>Gives you an API to build database monitoring tools for a server
+farm, for example calling <code>$perf-&gt;DBParameter('data cache hit
+ratio')</code> returns this very important statistic in a database
+independant manner. </li>
+</ul>
+<p>ADOdb also has the ability to log all SQL executed, using <a
+ href="docs-adodb.htm#logsql">LogSQL</a>. All SQL logged can be
+analyzed through the performance monitor <a href="#ui">UI</a>. In the <i>View
+SQL</i> mode, we categorize the SQL into 3 types:
+</p>
+<ul>
+  <li><b>Suspicious SQL</b>: queries with high average execution times,
+and are potential candidates for rewriting</li>
+  <li><b>Expensive SQL</b>: queries with high total execution times
+(#executions * avg execution time). Optimizing these queries will
+reduce your database server load.</li>
+  <li><b>Invalid SQL</b>: queries that generate errors.</li>
+</ul>
+<p>Each query is hyperlinked to a description of the query plan, and
+every PHP script that executed that query is also shown.</p>
+<p>Please note that the information presented is a very basic database
+health check, and does not provide a complete overview of database
+performance. Although some attempt has been made to make it work across
+multiple databases in the same way, it is impossible to do so. For the
+health check, we do try to display the following key database
+parameters for all drivers:</p>
+<ul>
+  <li><b>data cache size</b> - The amount of memory allocated to the
+cache.</li>
+  <li><b>data cache hit ratio</b> - A measure of how effective the
+cache is, as a percentage. The higher, the better.</li>
+  <li><b>current connections</b> - The number of sessions currently
+connected to the database. </li>
+</ul>
+<p>You will need to connect to the database as an administrator to view
+most of the parameters. </p>
+<p>Code improvements as very welcome, particularly adding new database
+parameters and automated tuning hints.</p>
+<a name="usage"></a>
+<h3>Usage</h3>
+<p>Currently, the following drivers: <em>mysql</em>, <em>postgres</em>,
+<em>oci8</em>, <em>mssql</em>, <i>informix</i> and <em>db2</em> are
+supported. To create a new performance monitor, call NewPerfMonitor( )
+as demonstrated below: </p>
+<pre>&lt;?php<br>include_once('adodb.inc.php');<br>session_start(); <font
+ color="#006600"># session variables required for monitoring</font><br>$conn = ADONewConnection($driver);<br>$conn-&gt;Connect($server,$user,$pwd,$db);<br>$perf =&amp; NewPerfMonitor($conn);<br>$perf-&gt;UI($pollsecs=5);<br>?&gt;<br></pre>
+<p>It is also possible to retrieve a single database parameter:</p>
+<pre>$size = $perf-&gt;DBParameter('data cache size');<br></pre>
+<p>
+Thx to Fernando Ortiz for the informix module. </p>
+<h3>Methods</h3>
+<a name="ui"></a>
+<p><font face="Courier New, Courier, mono">function <b>UI($pollsecs=5)</b></font></p>
+<p>Creates a web-based user interface for performance monitoring. When
+you click on Poll, server statistics will be displayed every $pollsecs
+seconds. See <a href="#usage">Usage</a> above. </p>
+<p>Since 4.11, we allow users to enter and run SQL interactively via
+the "Run SQL" link. To disable this for security reasons, set this
+constant before calling $perf-&gt;UI(). </p>
+<p> </p>
+<pre>define('ADODB_PERF_NO_RUN_SQL',1);</pre>
+<p>Sample output follows below:</p>
+<table bgcolor="lightyellow" border="1" width="100%">
+  <tbody>
+    <tr>
+      <td> <b><a href="http://php.weblogs.com/adodb?perf=1">ADOdb</a>
+Performance Monitor</b> for localhost, db=test<br>
+      <font size="-1">PostgreSQL 7.3.2 on i686-pc-cygwin, compiled by
+GCC gcc (GCC) 3.2 20020927 (prerelease)</font></td>
+    </tr>
+    <tr>
+      <td> <a href="#">Performance Stats</a> &nbsp; <a href="#">View
+SQL</a> &nbsp; <a href="#">View Tables</a> &nbsp; <a href="#">Poll
+Stats</a></td>
+    </tr>
+  </tbody>
+</table>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>postgres7</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Value</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>statistics collector</td>
+      <td>TRUE</td>
+      <td>Value must be TRUE to enable hit ratio statistics (<i>stats_start_collector</i>,<i>stats_row_level</i>
+and <i>stats_block_level</i> must be set to true in postgresql.conf)</td>
+    </tr>
+    <tr>
+      <td>data cache hit ratio</td>
+      <td>99.7967555299239</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>IO</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data reads</td>
+      <td>125</td>
+      <td>&nbsp; </td>
+    </tr>
+    <tr>
+      <td>data writes</td>
+      <td>21.78125000000000000</td>
+      <td>Count of inserts/updates/deletes * coef</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Data Cache</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache buffers</td>
+      <td>640</td>
+      <td>Number of cache buffers. <a
+ href="http://www.varlena.com/GeneralBits/Tidbits/perf.html#basic">Tuning</a></td>
+    </tr>
+    <tr>
+      <td>cache blocksize</td>
+      <td>8192</td>
+      <td>(estimate)</td>
+    </tr>
+    <tr>
+      <td>data cache size</td>
+      <td>5M</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>operating system cache size</td>
+      <td>80M</td>
+      <td>(effective cache size)</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Memory Usage</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>sort buffer size</td>
+      <td>1M</td>
+      <td>Size of sort buffer (per query)</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>current connections</td>
+      <td>0</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>max connections</td>
+      <td>32</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Parameters</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>rollback buffers</td>
+      <td>8</td>
+      <td>WAL buffers</td>
+    </tr>
+    <tr>
+      <td>random page cost</td>
+      <td>4</td>
+      <td>Cost of doing a seek (default=4). See <a
+ href="http://www.varlena.com/GeneralBits/Tidbits/perf.html#less">random_page_cost</a></td>
+    </tr>
+  </tbody>
+</table>
+<p><font face="Courier New, Courier, mono">function <b>HealthCheck</b>()</font></p>
+<p>Returns database health check parameters as a HTML table. You will
+need to echo or print the output of this function,</p>
+<p><font face="Courier New, Courier, mono">function <b>HealthCheckCLI</b>()</font></p>
+<p>Returns database health check parameters formatted for a command
+line interface. You will need to echo or print the output of this
+function. Sample output for mysql:</p>
+<pre>-- Ratios -- <br>          MyISAM cache hit ratio =&gt; 56.5635738832 <br>          InnoDB cache hit ratio =&gt; 0 <br>             sql cache hit ratio =&gt; 0 <br> -- IO -- <br>                      data reads =&gt; 2622 <br>                     data writes =&gt; 2415.5 <br> -- Data Cache -- <br>          MyISAM data cache size =&gt; 512K <br>             BDB data cache size =&gt; 8388600<br>          InnoDB data cache size =&gt; 8M<br> -- Memory Pools -- <br>                read buffer size =&gt; 131072 <br>                sort buffer size =&gt; 65528 <br>                     table cache =&gt; 4 <br> -- Connections -- <br>             current connections =&gt; 3<br>                 max connections =&gt; 100</pre>
+<p><font face="Courier New, Courier, mono">function <b>Poll</b>($pollSecs=5)
+</font> </p>
+<p> Run in infinite loop, displaying the following information every
+$pollSecs. This will not work properly if output buffering is enabled.
+In the example below, $pollSecs=3:
+</p>
+<pre>Accumulating statistics...<br> Time   WS-CPU%   Hit%   Sess        Reads/s          Writes/s<br>11:08:30    0.7  56.56      1         0.0000            0.0000<br>11:08:33    1.8  56.56      2         0.0000            0.0000<br>11:08:36   11.1  56.55      3         2.5000            0.0000<br>11:08:39    9.8  56.55      2         3.1121            0.0000<br>11:08:42    2.8  56.55      1         0.0000            0.0000<br>11:08:45    7.4  56.55      2         0.0000            1.5000<br></pre>
+<p><b>WS-CPU%</b> is the Web Server CPU load of the server that PHP is
+running from (eg. the database client), and not the database. The <b>Hit%</b>
+is the data cache hit ratio. <b>Sess</b> is the current number of
+sessions connected to the database. If you are using persistent
+connections, this should not change much. The <b>Reads/s</b> and <b>Writes/s</b>
+are synthetic values to give the viewer a rough guide to I/O, and are
+not to be taken literally. </p>
+<p><font face="Courier New, Courier, mono">function <b>SuspiciousSQL</b>($numsql=10)</font></p>
+<p>Returns SQL which have high average execution times as a HTML table.
+Each sql statement
+is hyperlinked to a new window which details the execution plan and the
+scripts that execute this SQL.
+</p>
+<p> The number of statements returned is determined by $numsql. Data is
+taken from the adodb_logsql table, where the sql statements are logged
+when
+$connection-&gt;LogSQL(true) is enabled. The adodb_logsql table is
+populated using <a href="docs-adodb.htm#logsql">$conn-&gt;LogSQL</a>.
+</p>
+<p>For Oracle, Ixora Suspicious SQL returns a list of SQL statements
+that are most cache intensive as a HTML table. These are data intensive
+SQL statements that could benefit most from tuning. </p>
+<p><font face="Courier New, Courier, mono">function <b>ExpensiveSQL</b>($numsql=10)</font></p>
+<p>Returns SQL whose total execution time (avg time * #executions) is
+high as a HTML table. Each sql statement
+is hyperlinked to a new window which details the execution plan and the
+scripts that execute this SQL.
+</p>
+<p> The number of statements returned is determined by $numsql. Data is
+taken from the adodb_logsql table, where the sql statements are logged
+when
+$connection-&gt;LogSQL(true) is enabled. The adodb_logsql table is
+populated using <a href="docs-adodb.htm#logsql">$conn-&gt;LogSQL</a>.
+</p>
+<p>For Oracle, Ixora Expensive SQL returns a list of SQL statements
+that are taking the most CPU load when run.
+</p>
+<p><font face="Courier New, Courier, mono">function <b>InvalidSQL</b>($numsql=10)</font></p>
+<p>Returns a list of invalid SQL as an HTML table.
+</p>
+<p>Data is taken from the adodb_logsql table, where the sql statements
+are logged when
+$connection-&gt;LogSQL(true) is enabled.
+</p>
+<p><font face="Courier New, Courier, mono">function <b>Tables</b>($orderby=1)</font></p>
+<p>Returns information on all tables in a database, with the first two
+fields containing the table name and table size, the remaining fields
+depend on the database driver. If $orderby is set to 1, it will sort by
+name. If $orderby is set to 2, then it will sort by table size. Some
+database drivers (mssql and mysql) will ignore the $orderby clause. For
+postgresql, the information is up-to-date since the last <i>vacuum</i>.
+Not supported currently for db2.</p>
+<h3>Raw Functions</h3>
+<p>Raw functions return values without any formatting.</p>
+<p><font face="Courier New, Courier, mono">function <b>DBParameter</b>($paramname)</font></p>
+<p>Returns the value of a database parameter, such as
+$this-&gt;DBParameter("data cache size").</p>
+<p><font face="Courier New, Courier, mono">function <b>CPULoad</b>()</font></p>
+<p>Returns the CPU load of the database client (NOT THE SERVER) as a
+percentage. Only works for Linux and Windows. For Windows, WMI must be
+available.</p>
+<h3>Format of $settings Property</h3>
+<p> To create new database parameters, you need to understand
+$settings. The $settings data structure is an associative array. Each
+element of the array defines a database parameter. The key is the name
+of the database parameter. If no key is defined, then it is assumed to
+be a section break, and the value is the name of the section break. If
+this is too confusing, looking at the source code will help a lot!</p>
+<p> Each database parameter is itself an array consisting of the
+following elements:</p>
+<ol start="0">
+  <li> Category code, used to group related db parameters. If the
+category code is 'HIDE', then
+the database parameter is not shown when HTML() is called. <br>
+  </li>
+  <li> either
+    <ol type="a">
+      <li>sql string to retrieve value, eg. "select value from
+v\$parameter where name='db_block_size'", </li>
+      <li>array holding sql string and field to look for, e.g.
+array('show variables','table_cache'); optional 3rd parameter is the
+$rs-&gt;fields[$index] to use (otherwise $index=1), and optional 4th
+parameter is a constant to multiply the result with (typically 100 for
+percentage calculations),</li>
+      <li>a string prefixed by =, then a PHP method of the class is
+invoked, e.g. to invoke $this-&gt;GetIndexValue(), set this array
+element to '=GetIndexValue', <br>
+      </li>
+    </ol>
+  </li>
+  <li> Description of database parameter. If description begins with an
+=, then it is interpreted as a method call, just as in (1c) above,
+taking one parameter, the current value. E.g. '=GetIndexDescription'
+will invoke $this-&gt;GetIndexDescription($val). This is useful for
+generating tuning suggestions. For an example, see WarnCacheRatio().</li>
+</ol>
+<p>Example from MySQL, table_cache database parameter:</p>
+<pre>'table cache' =&gt; array('CACHE',            # category code<br>   array("show variables", 'table_cache'), # array (type 1b)<br>   'Number of tables to keep open'),       # description</pre>
+<h3>Example Health Check Output</h3>
+<p><a href="#db2">db2</a> <a href="#informix">informix</a> <a
+ href="#mysql">mysql</a> <a href="#mssql">mssql</a> <a href="#oci8">oci8</a>
+<a href="#postgres">postgres</a></p>
+<p><a name="db2"></a></p>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>db2</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Value</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr bgcolor="#ffffff">
+      <td>data cache hit ratio</td>
+      <td>0 &nbsp; </td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Data Cache</i></td>
+    </tr>
+    <tr bgcolor="#ffffff">
+      <td>data cache buffers</td>
+      <td>250 &nbsp; </td>
+      <td>See <a
+ href="http://www7b.boulder.ibm.com/dmdd/library/techarticle/anshum/0107anshum.html#bufferpoolsize">tuning
+reference</a>.</td>
+    </tr>
+    <tr bgcolor="#ffffff">
+      <td>cache blocksize</td>
+      <td>4096 &nbsp; </td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#ffffff">
+      <td>data cache size</td>
+      <td>1000K &nbsp; </td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i></td>
+    </tr>
+    <tr bgcolor="#ffffff">
+      <td>current connections</td>
+      <td>2 &nbsp; </td>
+      <td>&nbsp;</td>
+    </tr>
+  </tbody>
+</table>
+<p>&nbsp;</p>
+<p><a name="informix"></a>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>informix</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Val
+ue</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache hit
+ratio</td>
+      <td>95.89</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>IO</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data
+reads</td>
+      <td>1883884</td>
+      <td>Page reads</td>
+    </tr>
+    <tr>
+      <td>data writes</td>
+      <td>1716724</td>
+      <td>Page writes</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i>
+&nbsp;</td>
+    </tr>
+    <tr>
+      <td>current connections</td>
+      <td>263.0</td>
+      <td>Number of
+sessions</td>
+    </tr>
+  </tbody>
+</table>
+</p>
+<p>&nbsp;</p>
+<p><a name="mysql" id="mysql"></a></p>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>mysql</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Value</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>MyISAM cache hit ratio</td>
+      <td>56.5658301822</td>
+      <td><font color="red"><b>Cache ratio should be at least 90%</b></font></td>
+    </tr>
+    <tr>
+      <td>InnoDB cache hit ratio</td>
+      <td>0</td>
+      <td><font color="red"><b>Cache ratio should be at least 90%</b></font></td>
+    </tr>
+    <tr>
+      <td>sql cache hit ratio</td>
+      <td>0</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>IO</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data reads</td>
+      <td>2622</td>
+      <td>Number of selects (Key_reads is not accurate)</td>
+    </tr>
+    <tr>
+      <td>data writes</td>
+      <td>2415.5</td>
+      <td>Number of inserts/updates/deletes * coef (Key_writes is not
+accurate)</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Data Cache</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>MyISAM data cache size</td>
+      <td>512K</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>BDB data cache size</td>
+      <td>8388600</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>InnoDB data cache size</td>
+      <td>8M</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Memory Pools</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>read buffer size</td>
+      <td>131072</td>
+      <td>(per session)</td>
+    </tr>
+    <tr>
+      <td>sort buffer size</td>
+      <td>65528</td>
+      <td>Size of sort buffer (per session)</td>
+    </tr>
+    <tr>
+      <td>table cache</td>
+      <td>4</td>
+      <td>Number of tables to keep open</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>current connections</td>
+      <td>3</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>max connections</td>
+      <td>100</td>
+      <td>&nbsp;</td>
+    </tr>
+  </tbody>
+</table>
+<p>&nbsp;</p>
+<p><a name="mssql" id="mssql"></a></p>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>mssql</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Value</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache hit ratio</td>
+      <td>99.9999694824</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>prepared sql hit ratio</td>
+      <td>99.7738579828</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>adhoc sql hit ratio</td>
+      <td>98.4540169133</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>IO</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data reads</td>
+      <td>2858</td>
+      <td>&nbsp; </td>
+    </tr>
+    <tr>
+      <td>data writes</td>
+      <td>1438</td>
+      <td>&nbsp; </td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Data Cache</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache size</td>
+      <td>4362</td>
+      <td>in K</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>current connections</td>
+      <td>14</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>max connections</td>
+      <td>32767</td>
+      <td>&nbsp;</td>
+    </tr>
+  </tbody>
+</table>
+<p>&nbsp;</p>
+<p><a name="oci8" id="oci8"></a></p>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>oci8</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Value</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache hit ratio</td>
+      <td>96.98</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>sql cache hit ratio</td>
+      <td>99.96</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>IO</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data reads</td>
+      <td>842938</td>
+      <td>&nbsp; </td>
+    </tr>
+    <tr>
+      <td>data writes</td>
+      <td>16852</td>
+      <td>&nbsp; </td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Data Cache</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache buffers</td>
+      <td>3072</td>
+      <td>Number of cache buffers</td>
+    </tr>
+    <tr>
+      <td>data cache blocksize</td>
+      <td>8192</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache size</td>
+      <td>48M</td>
+      <td>shared_pool_size</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Memory Pools</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>java pool size</td>
+      <td>0</td>
+      <td>java_pool_size</td>
+    </tr>
+    <tr>
+      <td>sort buffer size</td>
+      <td>512K</td>
+      <td>sort_area_size (per query)</td>
+    </tr>
+    <tr>
+      <td>user session buffer size</td>
+      <td>8M</td>
+      <td>large_pool_size</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>current connections</td>
+      <td>1</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>max connections</td>
+      <td>170</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache utilization ratio</td>
+      <td>88.46</td>
+      <td>Percentage of data cache actually in use</td>
+    </tr>
+    <tr>
+      <td>user cache utilization ratio</td>
+      <td>91.76</td>
+      <td>Percentage of user cache (large_pool) actually in use</td>
+    </tr>
+    <tr>
+      <td>rollback segments</td>
+      <td>11</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Transactions</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>peak transactions</td>
+      <td>24</td>
+      <td>Taken from high-water-mark</td>
+    </tr>
+    <tr>
+      <td>max transactions</td>
+      <td>187</td>
+      <td>max transactions / rollback segments &lt; 3.5 (or
+transactions_per_rollback_segment)</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Parameters</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>cursor sharing</td>
+      <td>EXACT</td>
+      <td>Cursor reuse strategy. Recommended is FORCE (8i+) or SIMILAR
+(9i+). See <a
+ href="http://www.praetoriate.com/oracle_tips_cursor_sharing.htm">cursor_sharing</a>.</td>
+    </tr>
+    <tr>
+      <td>index cache cost</td>
+      <td>0</td>
+      <td>% of indexed data blocks expected in the cache. Recommended
+is 20-80. Default is 0. See <a
+ href="http://www.dba-oracle.com/oracle_tips_cbo_part1.htm">optimizer_index_caching</a>.</td>
+    </tr>
+    <tr>
+      <td>random page cost</td>
+      <td>100</td>
+      <td>Recommended is 10-50 for TP, and 50 for data warehouses.
+Default is 100. See <a
+ href="http://www.dba-oracle.com/oracle_tips_cost_adj.htm">optimizer_index_cost_adj</a>.
+      </td>
+    </tr>
+  </tbody>
+</table>
+<h3>Suspicious SQL</h3>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td><b>LOAD</b></td>
+      <td><b>EXECUTES</b></td>
+      <td><b>SQL_TEXT</b></td>
+    </tr>
+    <tr>
+      <td align="right"> .73%</td>
+      <td align="right">89</td>
+      <td>select u.name, o.name, t.spare1, t.pctfree$ from sys.obj$ o,
+sys.user$ u, sys.tab$ t where (bitand(t.trigflag, 1048576) = 1048576)
+and o.obj#=t.obj# and o.owner# = u.user# select i.obj#, i.flags,
+u.name, o.name from sys.obj$ o, sys.user$ u, sys.ind$ i where
+(bitand(i.flags, 256) = 256 or bitand(i.flags, 512) = 512) and
+(not((i.type# = 9) and bitand(i.flags,8) = 8)) and o.obj#=i.obj# and
+o.owner# = u.user# </td>
+    </tr>
+    <tr>
+      <td align="right"> .84%</td>
+      <td align="right">3</td>
+      <td>select /*+ RULE */ distinct tabs.table_name, tabs.owner ,
+partitioned, iot_type , TEMPORARY, table_type, table_type_owner from
+DBA_ALL_TABLES tabs where tabs.owner = :own </td>
+    </tr>
+    <tr>
+      <td align="right"> 3.95%</td>
+      <td align="right">6</td>
+      <td>SELECT round(count(1)*avg(buf.block_size)/1048576) FROM
+DBA_OBJECTS obj, V$BH bh, dba_segments seg, v$buffer_pool buf WHERE
+obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner =
+seg.owner and obj.object_name = seg.segment_name and obj.object_type =
+seg.segment_type and seg.buffer_pool = buf.name and buf.name =
+'DEFAULT' </td>
+    </tr>
+    <tr>
+      <td align="right"> 4.50%</td>
+      <td align="right">6</td>
+      <td>SELECT round(count(1)*avg(tsp.block_size)/1048576) FROM
+DBA_OBJECTS obj, V$BH bh, dba_segments seg, dba_tablespaces tsp WHERE
+obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner =
+seg.owner and obj.object_name = seg.segment_name and obj.object_type =
+seg.segment_type and seg.tablespace_name = tsp.tablespace_name </td>
+    </tr>
+    <tr>
+      <td align="right">57.34%</td>
+      <td align="right">9267</td>
+      <td>select t.schema, t.name, t.flags, q.name from
+system.aq$_queue_tables t, sys.aq$_queue_table_affinities aft,
+system.aq$_queues q where aft.table_objno = t.objno and
+aft.owner_instance = :1 and q.table_objno = t.objno and q.usage = 0 and
+bitand(t.flags, 4+16+32+64+128+256) = 0 for update of t.name,
+aft.table_objno skip locked </td>
+    </tr>
+  </tbody>
+</table>
+<h3>Expensive SQL</h3>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td><b>LOAD</b></td>
+      <td><b>EXECUTES</b></td>
+      <td><b>SQL_TEXT</b></td>
+    </tr>
+    <tr>
+      <td align="right"> 5.24%</td>
+      <td align="right">1</td>
+      <td>select round(sum(bytes)/1048576) from dba_segments </td>
+    </tr>
+    <tr>
+      <td align="right"> 6.89%</td>
+      <td align="right">6</td>
+      <td>SELECT round(count(1)*avg(buf.block_size)/1048576) FROM
+DBA_OBJECTS obj, V$BH bh, dba_segments seg, v$buffer_pool buf WHERE
+obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner =
+seg.owner and obj.object_name = seg.segment_name and obj.object_type =
+seg.segment_type and seg.buffer_pool = buf.name and buf.name =
+'DEFAULT' </td>
+    </tr>
+    <tr>
+      <td align="right"> 7.85%</td>
+      <td align="right">6</td>
+      <td>SELECT round(count(1)*avg(tsp.block_size)/1048576) FROM
+DBA_OBJECTS obj, V$BH bh, dba_segments seg, dba_tablespaces tsp WHERE
+obj.object_id = bh.objd AND obj.owner != 'SYS' and obj.owner =
+seg.owner and obj.object_name = seg.segment_name and obj.object_type =
+seg.segment_type and seg.tablespace_name = tsp.tablespace_name </td>
+    </tr>
+    <tr>
+      <td align="right">33.69%</td>
+      <td align="right">89</td>
+      <td>select u.name, o.name, t.spare1, t.pctfree$ from sys.obj$ o,
+sys.user$ u, sys.tab$ t where (bitand(t.trigflag, 1048576) = 1048576)
+and o.obj#=t.obj# and o.owner# = u.user# </td>
+    </tr>
+    <tr>
+      <td align="right">36.44%</td>
+      <td align="right">89</td>
+      <td>select i.obj#, i.flags, u.name, o.name from sys.obj$ o,
+sys.user$ u, sys.ind$ i where (bitand(i.flags, 256) = 256 or
+bitand(i.flags, 512) = 512) and (not((i.type# = 9) and
+bitand(i.flags,8) = 8)) and o.obj#=i.obj# and o.owner# = u.user# </td>
+    </tr>
+  </tbody>
+</table>
+<p><a name="postgres" id="postgres"></a></p>
+<table bgcolor="white" border="1">
+  <tbody>
+    <tr>
+      <td colspan="3">
+      <h3>postgres7</h3>
+      </td>
+    </tr>
+    <tr>
+      <td><b>Parameter</b></td>
+      <td><b>Value</b></td>
+      <td><b>Description</b></td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Ratios</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>statistics collector</td>
+      <td>FALSE</td>
+      <td>Must be set to TRUE to enable hit ratio statistics (<i>stats_start_collector</i>,<i>stats_row_level</i>
+and <i>stats_block_level</i> must be set to true in postgresql.conf)</td>
+    </tr>
+    <tr>
+      <td>data cache hit ratio</td>
+      <td>99.9666031916603</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>IO</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data reads</td>
+      <td>15</td>
+      <td>&nbsp; </td>
+    </tr>
+    <tr>
+      <td>data writes</td>
+      <td>0.000000000000000000</td>
+      <td>Count of inserts/updates/deletes * coef</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Data Cache</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>data cache buffers</td>
+      <td>1280</td>
+      <td>Number of cache buffers. <a
+ href="http://www.varlena.com/GeneralBits/Tidbits/perf.html#basic">Tuning</a></td>
+    </tr>
+    <tr>
+      <td>cache blocksize</td>
+      <td>8192</td>
+      <td>(estimate)</td>
+    </tr>
+    <tr>
+      <td>data cache size</td>
+      <td>10M</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>operating system cache size</td>
+      <td>80000K</td>
+      <td>(effective cache size)</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Memory Pools</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>sort buffer size</td>
+      <td>1M</td>
+      <td>Size of sort buffer (per query)</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Connections</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>current connections</td>
+      <td>13</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr>
+      <td>max connections</td>
+      <td>32</td>
+      <td>&nbsp;</td>
+    </tr>
+    <tr bgcolor="#f0f0f0">
+      <td colspan="3"><i>Parameters</i> &nbsp;</td>
+    </tr>
+    <tr>
+      <td>rollback buffers</td>
+      <td>8</td>
+      <td>WAL buffers</td>
+    </tr>
+    <tr>
+      <td>random page cost</td>
+      <td>4</td>
+      <td>Cost of doing a seek (default=4). See <a
+ href="http://www.varlena.com/GeneralBits/Tidbits/perf.html#less">random_page_cost</a></td>
+    </tr>
+  </tbody>
+</table>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-session.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-session.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-session.htm	(revision 225)
@@ -0,0 +1,336 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>ADODB Session Management Manual</title>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <style type="text/css">
+body, td {
+/*font-family: Arial, Helvetica, sans-serif;*/
+font-size: 11pt;
+}
+pre {
+font-size: 9pt;
+background-color: #EEEEEE; padding: .5em; margin: 0px;
+}
+.toplink {
+font-size: 8pt;
+}
+  </style>
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<h1>ADODB Session 2 Management Manual</h1>
+<p>
+V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my)
+</p>
+<p> <font size="1">This software is dual licensed using BSD-Style and
+LGPL. This means you can use it in compiled proprietary and commercial
+products. </font>
+<p>Useful ADOdb links: <a href="http://adodb.sourceforge.net/#download">Download</a>
+&nbsp; <a href="http://adodb.sourceforge.net/#docs">Other Docs</a>
+</p>
+<h2>Introduction</h2>
+<p> This document discusses the newer session handler adodb-session2.php. If
+  you have used the older adodb-session.php, then be forewarned that you will
+  need to alter your session table format. Otherwise everything is <a href="#compat">backward
+  compatible</a>.
+  Here are the <a href="docs-session.old.htm">older
+    docs</a> for
+  adodb-session.php.</p>
+<h2>Why Session Variables in a Database? </h2>
+<p>We store state information specific to a user or web
+    client in session variables. These session variables persist throughout a
+session, as the user moves from page to page. </p>
+<p>To use session variables, call session_start() at the beginning of
+your web page, before your HTTP headers are sent. Then for every
+variable you want to keep alive for the duration of the session, call
+session_register($variable_name). By default, the session handler will
+keep track of the session by using a cookie. You can save objects or
+arrays in session variables also.
+</p>
+<p>The default method of storing sessions is to store it in a file.
+However if you have special needs such as you:
+</p>
+<ul>
+  <li>Have multiple web servers that need to share session info</li>
+  <li>Need to do special processing of each session</li>
+  <li>Require notification when a session expires</li>
+</ul>
+<p>The ADOdb session handler provides you with the above
+additional capabilities by storing the session information as records
+in a database table that can be shared across multiple servers. </p>
+<p>These records will be garbage collected based on the php.ini [session] timeout settings. 
+You can register a notification function to notify you when the record has expired and 
+is about to be freed by the garbage collector.</p>
+<p>An alternative to using a database backed session handler is to use <a href="http://www.danga.com/memcached/">memcached</a>.
+  This is a distributed memory based caching system suitable for storing session
+  information.
+  </p>
+<h2> The Improved Session Handler</h2>
+<p>In ADOdb 4.91, we added a new session handler, in adodb-session2.php.
+It features the following improvements:
+<ul>
+<li>Fully supports server farms using a new database table format. The
+  previous version used the web server time for timestamps, which can cause problems
+  on a system with multiple web servers with possibly inconsistent
+  times. The new version uses the database server time instead for all timestamps.
+<li>The older database table format is obsolete. The database table must be modified
+  to support storage of the database server time mentioned above. Also the field
+  named DATA has been changed to SESSDATA. In some databases, DATA is a reserved
+  word.
+<li>The functions dataFieldName() and syncSeconds() is obsolete.
+</ul>
+
+<p>Usage is 
+
+<pre>
+include_once("adodb/session/adodb-session2.php");
+ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);
+session_start();
+
+<font
+ color="#004040">#<br># Test session vars, the following should increment on refresh<br>#<br>$_SESSION['AVAR'] += 1;<br>print "&lt;p&gt;\$_SESSION['AVAR']={$_SESSION['AVAR']}&lt;/p&gt;";</font>
+</pre>
+
+<p>When the session is created in session_start( ), the global variable $<b>ADODB_SESS_CONN</b> holds
+the connection object.
+<p>The default name of the table is sessions2. If you want to override it:
+  
+<pre>
+include_once("adodb/session/adodb-session2.php");
+$options['table'] = 'mytablename';
+ADOdb_Session::config($driver, $host, $user, $password, $database,$options);
+session_start();
+</pre>
+
+
+<h3>ADOdb Session Handler Features</h3>
+<ul>
+  <li>Ability to define a notification function that is called when a
+session expires. Typically
+used to detect session logout and release global resources. </li>
+  <li>Optimization of database writes. We crc32 the session data and
+only perform an update
+to the session data if there is a data change. </li>
+  <li>Support for large amounts of session data with CLOBs (see
+adodb-session-clob2.php). Useful
+for Oracle. </li>
+  <li>Support for encrypted session data, see
+adodb-cryptsession2.php. Enabling encryption is simply a matter of
+including adodb-cryptsession2.php instead of adodb-session2.php. </li>
+</ul>
+<h3>Session Handler Files </h3>
+<p>There are 3 session management files that you can use:
+</p>
+<pre>adodb-session2.php        : The default<br>adodb-cryptsession2.php   : Use this if you want to store encrypted session data in the database<br>adodb-session-clob2.php   : Use this if you are storing DATA in clobs and you are NOT using oci8 driver</pre>
+<h2><strong>Usage Examples</strong></h2>
+<p>To force non-persistent connections, call <font color="#004040"><b>Persist</b></font>() first before session_start():
+
+ 
+<pre>
+ <font color="#004040">
+include_once("adodb/session/adodb-session2.php");
+$driver = 'mysql'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb';
+ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);<b><br>ADOdb_session::Persist($connectMode=false);</b>
+session_start();<br> </font>
+</pre>
+<p> The parameter to the Persist( ) method sets the connection mode. You can
+  pass the following:</p>
+<table width="50%" border="1">
+  <tr>
+    <td><b>$connectMode</b></td>
+    <td><b>Connection Method</b></td>
+  </tr>
+  <tr>
+    <td>true</td>
+    <td><p>PConnect( )</p></td>
+  </tr>
+  <tr>
+    <td>false</td>
+    <td>Connect( )</td>
+  </tr>
+  <tr>
+    <td>'N'</td>
+    <td>NConnect( )</td>
+  </tr>
+  <tr>
+    <td>'P'</td>
+    <td>PConnect( )</td>
+  </tr>
+  <tr>
+    <td>'C'</td>
+    <td>Connect( )</td>
+  </tr>
+</table>
+<p>To use a encrypted sessions, simply replace the file adodb-session2.php:</p>
+ <pre> <font
+ color="#004040"><b><br>include('adodb/session/adodb-cryptsession2.php');</b><br>$driver = 'mysql'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb';
+ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);<b><br>adodb_sess_open(false,false,$connectMode=false);</b>
+session_start();<br></font></pre>
+ <p>And the same technique for adodb-session-clob2.php:</p>
+ <pre>  <font
+ color="#004040"><br><b>include('adodb/session/adodb-session2-clob2.php');</b><br>$driver = 'oci8'; $host = 'localhost'; $user = 'auser'; $pwd = 'secret'; $database = 'sessiondb';
+ADOdb_Session::config($driver, $host, $user, $password, $database,$options=false);<b><br>adodb_sess_open(false,false,$connectMode=false);</b>
+session_start();</font></pre>
+ <h2>Installation</h2>
+<p>1. Create this table in your database. Here is the MySQL version:
+<pre> <a
+ name="sessiontab"></a> <font color="#004040">
+CREATE TABLE sessions2(
+	  sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
+  	  expiry DATETIME NOT NULL ,
+	  expireref VARCHAR( 250 ) DEFAULT '',
+	  created DATETIME NOT NULL ,
+	  modified DATETIME NOT NULL ,
+	  sessdata LONGTEXT DEFAULT '',
+	  PRIMARY KEY ( sesskey ) ,
+	  INDEX sess2_expiry( expiry ),
+	  INDEX sess2_expireref( expireref )
+)</font></pre>
+
+ <p> For PostgreSQL, use:
+ <pre>CREATE TABLE sessions2(
+ sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
+ expiry TIMESTAMP NOT NULL ,
+ expireref VARCHAR( 250 ) DEFAULT '',
+ created TIMESTAMP NOT NULL ,
+ modified TIMESTAMP NOT NULL ,
+ sessdata TEXT DEFAULT '',
+ PRIMARY KEY ( sesskey )
+ );
+</pre>
+ <pre>create INDEX sess2_expiry on sessions2( expiry );
+create INDEX sess2_expireref on sessions2 ( expireref );</pre>
+ <p>Here is the Oracle definition, which uses a CLOB for the SESSDATA field:
+ <pre>
+  <font
+ color="#004040">CREATE TABLE SESSIONS2<br>(<br>   SESSKEY    VARCHAR2(48 BYTE)                  NOT NULL,<br>   EXPIRY     DATE                               NOT NULL,<br>   EXPIREREF  VARCHAR2(200 BYTE),<br>   CREATED    DATE                               NOT NULL,<br>   MODIFIED   DATE                               NOT NULL,<br>   SESSDATA   CLOB,<br>  PRIMARY KEY(SESSKEY)<br>);
+<br>CREATE INDEX SESS2_EXPIRY ON SESSIONS2(EXPIRY);
+CREATE INDEX SESS2_EXPIREREF ON SESSIONS2(EXPIREREF);</font></pre>
+<p> We need to use a CLOB here because for text greater than 4000 bytes long,
+  Oracle requires you to use the CLOB data type. If you are using the oci8 driver,
+  ADOdb will automatically enable CLOB handling. So you can use either adodb-session2.php
+  or adodb-session-clob2.php - in this case it doesn't matter. <br>    
+<h2>Notifications</h2>
+<p>You can receive notification when your session is cleaned up by the session garbage collector or
+when you call session_destroy().
+<p>PHP's session extension will automatically run a special garbage collection function based on
+your php.ini session.cookie_lifetime and session.gc_probability settings. This will in turn call
+adodb's garbage collection function, which can be setup to do notification.
+<p>
+<pre>
+	PHP Session --> ADOdb Session  --> Find all recs  --> Send          --> Delete queued
+	GC Function     GC Function        to be deleted      notification      records
+	executed at     called by                             for all recs
+	random time     Session Extension                     queued for deletion
+</pre>
+<p>When a session is created, we need to store a value in the session record (in the EXPIREREF field), typically 
+the userid of the session. Later when the session has expired,  just before the record is deleted,
+we reload the EXPIREREF field and call the notification function with the value of EXPIREREF, which 
+is the userid of the person being logged off.
+<p>ADOdb uses a global variable $ADODB_SESSION_EXPIRE_NOTIFY that you must predefine before session
+start to store the notification configuration. 
+$ADODB_SESSION_EXPIRE_NOTIFY is an array with 2 elements, the
+first being the name of the session variable you would like to store in
+the EXPIREREF field, and the 2nd is the notification function's name. </p>
+<p>For example, suppose we want to be notified when a user's session has expired,
+based on the userid. When the user logs in, we store the id in the global session variable
+$USERID. The function name is 'NotifyFn'. 
+<p>
+So we define (before session_start() is called): </p>
+<pre> <font color="#004040">
+	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
+</font></pre>
+And when the NotifyFn is called (when the session expires), the
+$USERID is passed in as the first parameter, eg. NotifyFn($userid, $sesskey). The
+session key (which is the primary key of the record in the sessions
+table) is the 2nd parameter.
+<p> Here is an example of a Notification function that deletes some
+records in the database and temporary files: </p>
+<pre><font color="#004040">
+	function NotifyFn($expireref, $sesskey)
+	{
+		global $ADODB_SESS_CONN; # the session connection object
+		$user = $ADODB_SESS_CONN-&gt;qstr($expireref);
+		
+		$ADODB_SESS_CONN-&gt;Execute("delete from shopping_cart where user=$user");          
+		system("rm /work/tmpfiles/$expireref/*");
+	}</font>  
+			  </pre>
+<p> NOTE 1: If you have register_globals disabled in php.ini, then you
+will have to manually set the EXPIREREF. E.g. </p>
+<pre> <font color="#004040">
+$GLOBALS['USERID'] = GetUserID();
+$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');</font>
+</pre>
+<p> NOTE 2: If you want to change the EXPIREREF after the session
+record has been created, you will need to modify any session variable
+to force a database record update.
+</p>
+<h3>Neat Notification Tricks</h3>
+<p><i>ExpireRef</i> normally holds the user id of the current session.
+</p>
+<p>1. You can then write a session monitor, scanning expireref to see
+who is currently logged on.
+</p>
+<p>2. If you delete the sessions record for a specific user, eg.
+</p>
+<pre>delete from sessions where expireref = '$USER'<br></pre>
+then the user is logged out. Useful for ejecting someone from a
+site.
+<p>3. You can scan the sessions table to ensure no user
+can be logged in twice. Useful for security reasons.
+</p>
+<h2>Compression/Encryption Schemes</h2>
+Since ADOdb 4.05, thanks to Ross Smith, multiple encryption and
+compression schemes are supported. Currently, supported are:
+<p>
+<pre>  MD5Crypt (crypt.inc.php)<br>  MCrypt<br>  Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)<br>  GZip<br>  BZip2<br></pre>
+<p>These are stackable. E.g.
+<pre>ADODB_Session::filter(new ADODB_Compress_Bzip2());<br>ADODB_Session::filter(new ADODB_Encrypt_MD5());<br></pre>
+will compress and then encrypt the record in the database.
+<h2>Session Cookie Regeneration: adodb_session_regenerate_id()</h2>
+<p>Dynamically change the current session id with a newly generated one and update
+  database. Currently only works with cookies. Useful to improve security by
+  reducing the risk of session-hijacking. See this article on <a href=http://shiflett.org/articles/security-corner-feb2004>Session
+  Fixation</a> for more info 
+on the theory behind this feature. Usage:<pre>
+	include('path/to/adodb/session/adodb-session2.php');
+	
+	session_start();
+	# Approximately every 10 page loads, reset cookie for safety.
+	# This is extremely simplistic example, better 
+	# to regenerate only when the user logs in or changes
+	# user privilege levels.
+	if ((rand()%10) == 0) adodb_session_regenerate_id(); 
+</pre>
+<p>This function calls session_regenerate_id() internally or simulates it if the function does not exist.
+<h2>Vacuum/Optimize Database</h2>
+<p>During session garbage collection, if postgresql is detected,
+  ADOdb can be set to run VACUUM. If mysql is detected, then optimize database
+  could be called.You can turn this on or off using:</p>
+<pre>$turnOn = true; # or false
+ADODB_Session::optimize($turnOn);
+</pre>
+<p>The default  is optimization is disabled.</p>
+<h2><a name=compat></a>Backwards Compatability </h2>
+<p>The older method of connecting to ADOdb using global variables is still supported:</p>
+<pre> $ADODB_SESSION_DRIVER='mysql';
+ $ADODB_SESSION_CONNECT='localhost';
+ $ADODB_SESSION_USER ='root';
+ $ADODB_SESSION_PWD ='abc';
+ $ADODB_SESSION_DB ='phplens';
+ 
+ include('path/to/adodb/session/adodb-<strong>session2</strong>.php'); </pre>
+<p>In the above example, the only things you need to change in your code to upgrade
+  is </p>
+<ul>
+  <li>your session table format to the new one.</li>
+  <li>the include file from adodb-session.php to adodb-session2.php. </li>
+</ul>
+<h2>More Info</h2>
+<p>Also see the <a href="docs-adodb.htm">core ADOdb documentation</a>. And if
+  you are interested in the obsolete adodb-session.php, see <a href="docs-session.old.htm">old
+    session documentation</a>. </p>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/docs-session.old.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/docs-session.old.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/docs-session.old.htm	(revision 225)
@@ -0,0 +1,313 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>ADODB Old Session Management Manual</title>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+  <style type="text/css">
+body, td {
+/*font-family: Arial, Helvetica, sans-serif;*/
+font-size: 11pt;
+}
+pre {
+font-size: 9pt;
+background-color: #EEEEEE; padding: .5em; margin: 0px;
+}
+.toplink {
+font-size: 8pt;
+}
+  </style>
+</head>
+<body style="background-color: rgb(255, 255, 255);">
+<h3>ADODB Session Management Manual</h3>
+<p>
+V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my)
+</p>
+<p> <font size="1">This software is dual licensed using BSD-Style and
+LGPL. This means you can use it in compiled proprietary and commercial
+products. </font>
+<p>Useful ADOdb links: <a href="http://adodb.sourceforge.net/#download">Download</a>
+&nbsp; <a href="http://adodb.sourceforge.net/#docs">Other Docs</a>
+</p>
+<h3>Introduction</h3>
+<p>This documentation discusses the old adodb-session.php. 
+Here is the <a href=docs-session.htm>new documentation</a> on the newer adodb-session2.php.
+<p> We store state information specific to a user or web client in
+session variables. These session variables persist throughout a
+session, as the user moves from page to page. </p>
+<p>To use session variables, call session_start() at the beginning of
+your web page, before your HTTP headers are sent. Then for every
+variable you want to keep alive for the duration of the session, call
+session_register($variable_name). By default, the session handler will
+keep track of the session by using a cookie. You can save objects or
+arrays in session variables also.
+</p>
+<p>The default method of storing sessions is to store it in a file.
+However if you have special needs such as you:
+</p>
+<ul>
+  <li>Have multiple web servers that need to share session info</li>
+  <li>Need to do special processing of each session</li>
+  <li>Require notification when a session expires</li>
+</ul>
+<p>The ADOdb session handler provides you with the above
+additional capabilities by storing the session information as records
+in a database table that can be shared across multiple servers. </p>
+<p>These records will be garbage collected based on the php.ini [session] timeout settings. 
+You can register a notification function to notify you when the record has expired and 
+is about to be freed by the garbage collector.</p>
+<p><b>Important Upgrade Notice:</b> Since ADOdb 4.05, the session files
+have been moved to its own folder, adodb/session. This is a rewrite
+of the session code by Ross Smith. The old session code is in
+adodb/session/old. </p>
+<h4>ADOdb Session Handler Features</h4>
+<ul>
+  <li>Ability to define a notification function that is called when a
+session expires. Typically
+used to detect session logout and release global resources. </li>
+  <li>Optimization of database writes. We crc32 the session data and
+only perform an update
+to the session data if there is a data change. </li>
+  <li>Support for large amounts of session data with CLOBs (see
+adodb-session-clob.php). Useful
+for Oracle. </li>
+  <li>Support for encrypted session data, see
+adodb-cryptsession.php. Enabling encryption is simply a matter of
+including adodb-cryptsession.php instead of adodb-session.php. </li>
+</ul>
+<h3>Setup</h3>
+<p>There are 3 session management files that you can use:
+</p>
+<pre>adodb-session.php        : The default<br>adodb-session-clob.php   : Use this if you are storing DATA in clobs<br>adodb-cryptsession.php   : Use this if you want to store encrypted session data in the database<br><br>
+</pre>
+<p><strong>Examples</strong>
+<p><pre>
+ <font
+ color="#004040">    include('adodb/adodb.inc.php');<br>    <br><b>    $ADODB_SESSION_DRIVER='mysql';<br>    $ADODB_SESSION_CONNECT='localhost';<br>    $ADODB_SESSION_USER ='scott';<br>    $ADODB_SESSION_PWD ='tiger';<br>    $ADODB_SESSION_DB ='sessiondb';</b><br>    <br>    <b>include('adodb/session/adodb-session.php');</b><br>    session_start();<br>    <br>    #<br>    # Test session vars, the following should increment on refresh<br>    #<br>    $_SESSION['AVAR'] += 1;<br>    print "&lt;p&gt;\$_SESSION['AVAR']={$_SESSION['AVAR']}&lt;/p&gt;";<br></font></pre>
+ 
+<p>To force non-persistent connections, call adodb_session_open() first before session_start():
+<p>
+ <pre>
+ <font color="#004040"><br>    include('adodb/adodb.inc.php');<br>    <br><b>    $ADODB_SESSION_DRIVER='mysql';<br>    $ADODB_SESSION_CONNECT='localhost';<br>    $ADODB_SESSION_USER ='scott';<br>    $ADODB_SESSION_PWD ='tiger';<br>    $ADODB_SESSION_DB ='sessiondb';</b><br>    <br>    <b>include('adodb/session/adodb-session.php');<br>    adodb_sess_open(false,false,false);</b><br>    session_start();<br> </font>
+ </pre>
+<p> The 3rd parameter to adodb_sess_open($path, $sessname, $connectMode)  sets the connection method. You can pass in the following:</p>
+<table width="50%" border="1">
+  <tr>
+    <td><b>$connectMode</b></td>
+    <td><b>Connection Method</b></td>
+  </tr>
+  <tr>
+    <td>true</td>
+    <td><p>PConnect( )</p></td>
+  </tr>
+  <tr>
+    <td>false</td>
+    <td>Connect( )</td>
+  </tr>
+  <tr>
+    <td>'N'</td>
+    <td>NConnect( )</td>
+  </tr>
+  <tr>
+    <td>'P'</td>
+    <td>PConnect( )</td>
+  </tr>
+  <tr>
+    <td>'C'</td>
+    <td>Connect( )</td>
+  </tr>
+</table>
+<p>To use a encrypted sessions, simply replace the file adodb-session.php:</p>
+ <pre> <font
+ color="#004040"><br>    include('adodb/adodb.inc.php');<br>    <br><b>    $ADODB_SESSION_DRIVER='mysql';<br>    $ADODB_SESSION_CONNECT='localhost';<br>    $ADODB_SESSION_USER ='scott';<br>    $ADODB_SESSION_PWD ='tiger';<br>    $ADODB_SESSION_DB ='sessiondb';<br>    <br>    include('adodb/session/adodb-cryptsession.php');</b><br>    session_start();</font><br>
+ </pre>
+ <p>And the same technique for adodb-session-clob.php:</p>
+ <pre>  <font
+ color="#004040"><br>    include('adodb/adodb.inc.php');<br>    <br><b>    $ADODB_SESSION_DRIVER='mysql';<br>    $ADODB_SESSION_CONNECT='localhost';<br>    $ADODB_SESSION_USER ='scott';<br>    $ADODB_SESSION_PWD ='tiger';<br>    $ADODB_SESSION_DB ='sessiondb';<br>    <br>    include('adodb/session/adodb-session-clob.php');</b><br>    session_start();</font>
+ </pre>
+ <p>An alternative way to set persistant or non-persistent connections is to call the following function before session_start() is called.
+ <pre>
+ 	ADODB_Session::persist('P'); # 'C' for non-persistent connections
+ </pre>
+ <h4>Installation</h4>
+<p>1. Create this table in your database (MySQL syntax):
+<p><pre> <a
+ name="sessiontab"></a> <font color="#004040">
+   create table sessions (
+       SESSKEY char(32) not null,
+       EXPIRY int(11) unsigned not null,
+       EXPIREREF varchar(64),
+	   DATA text not null,
+	   primary key (sesskey)
+	   );</font>
+ </pre>
+
+ <p>You may want to rename the 'data' field to 'session_data' as
+	'data' appears to be a reserved word for one or more of the following:
+	<ul>
+	<li>	ANSI SQL
+	<li>	IBM DB2
+	<li>	MS SQL Server
+	<li>	Postgres
+	<li>	SAP
+		</ul>
+<p>
+	If you do, then execute:
+<pre>
+		ADODB_Session::dataFieldName('session_data');
+</pre>
+ <p> For the adodb-session-clob.php version, create this:
+<p>  <pre>
+    <font
+ color="#004040"><br>    create table sessions (<br>       SESSKEY char(32) not null,<br>       EXPIRY int(11) unsigned not null,<br>       EXPIREREF varchar(64),<br>       DATA CLOB,<br>      primary key (sesskey)<br>  );</font>
+ </pre>
+ <p>2. Then define the following parameters. You can either modify this file, or define them before this file is included:
+ <pre>      <font
+ color="#004040"><br>    $ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase';<br>    $ADODB_SESSION_CONNECT='server to connect to';<br>    $ADODB_SESSION_USER ='user';<br>    $ADODB_SESSION_PWD ='password';<br>    $ADODB_SESSION_DB ='database';<br>    $ADODB_SESSION_TBL = 'sessions'; # setting this is optional<br>	</font>
+ </pre><p>
+     When the session is created, $<b>ADODB_SESS_CONN</b> holds the connection object.<br>    <br>  3. Recommended is PHP 4.0.6 or later. There are documented session bugs in earlier versions of PHP.
+<h3>Notifications</h3>
+<p>You can receive notification when your session is cleaned up by the session garbage collector or
+when you call session_destroy().
+<p>PHP's session extension will automatically run a special garbage collection function based on
+your php.ini session.cookie_lifetime and session.gc_probability settings. This will in turn call
+adodb's garbage collection function, which can be setup to do notification.
+<p>
+<pre>
+	PHP Session --> ADOdb Session  --> Find all recs  --> Send          --> Delete queued
+	GC Function     GC Function        to be deleted      notification      records
+	executed at     called by                             for all recs
+	random time     Session Extension                     queued for deletion
+</pre>
+<p>When a session is created, we need to store a value in the session record (in the EXPIREREF field), typically 
+the userid of the session. Later when the session has expired,  just before the record is deleted,
+we reload the EXPIREREF field and call the notification function with the value of EXPIREREF, which 
+is the userid of the person being logged off.
+<p>ADOdb uses a global variable $ADODB_SESSION_EXPIRE_NOTIFY that you must predefine before session
+start to store the notification configuration. 
+$ADODB_SESSION_EXPIRE_NOTIFY is an array with 2 elements, the
+first being the name of the session variable you would like to store in
+the EXPIREREF field, and the 2nd is the notification function's name. </p>
+<p>For example, suppose we want to be notified when a user's session has expired,
+based on the userid. When the user logs in, we store the id in the global session variable
+$USERID. The function name is 'NotifyFn'. 
+<p>
+So we define (before session_start() is called): </p>
+<pre> <font color="#004040">
+	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
+</font></pre>
+And when the NotifyFn is called (when the session expires), the
+$USERID is passed in as the first parameter, eg. NotifyFn($userid, $sesskey). The
+session key (which is the primary key of the record in the sessions
+table) is the 2nd parameter.
+<p> Here is an example of a Notification function that deletes some
+records in the database and temporary files: </p>
+<pre><font color="#004040">
+	function NotifyFn($expireref, $sesskey)
+	{
+		global $ADODB_SESS_CONN; # the session connection object
+		$user = $ADODB_SESS_CONN-&gt;qstr($expireref);
+		
+		$ADODB_SESS_CONN-&gt;Execute("delete from shopping_cart where user=$user");          
+		system("rm /work/tmpfiles/$expireref/*");
+	}</font>  
+			  </pre>
+<p> NOTE 1: If you have register_globals disabled in php.ini, then you
+will have to manually set the EXPIREREF. E.g. </p>
+<pre> <font color="#004040">
+$GLOBALS['USERID'] = GetUserID();
+$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');</font>
+</pre>
+<p> NOTE 2: If you want to change the EXPIREREF after the session
+record has been created, you will need to modify any session variable
+to force a database record update.
+</p>
+<h4>Neat Notification Tricks</h4>
+<p><i>ExpireRef</i> normally holds the user id of the current session.
+</p>
+<p>1. You can then write a session monitor, scanning expireref to see
+who is currently logged on.
+</p>
+<p>2. If you delete the sessions record for a specific user, eg.
+</p>
+<pre>delete from sessions where expireref = '$USER'<br></pre>
+then the user is logged out. Useful for ejecting someone from a
+site.
+<p>3. You can scan the sessions table to ensure no user
+can be logged in twice. Useful for security reasons.
+</p>
+<h3>Using Oracle CLOBs</h3>
+<p>Suppose you are storing the DATA field in a CLOB:
+ <pre><font color="#004040">
+   CREATE TABLE sessions (
+       SESSKEY VARCHAR(32) NOT NULL,
+       EXPIRY NUMBER(16)  NOT NULL,
+       EXPIREREF VARCHAR(64),
+       DATA CLOB,
+      PRIMARY KEY (sesskey)
+  );</font>
+ </pre> 
+ <p>Then your PHP code could look like this:
+	 <pre>
+	ADODB_SESSION_DRIVER='oci8';
+	$ADODB_SESSION_CONNECT=$tnsname;
+	$ADODB_SESSION_USER ='scott';
+	$ADODB_SESSION_PWD = 'tiger';
+	$ADODB_SESSION_DB ='';
+	
+	$ADODB_SESSION_USE_LOBS = 'clob';
+	$ADODB_SESSION_TBL = 'sessions';
+	
+	$ADODB_SESS_DEBUG=0;
+	
+	include(ADODB_DIR.'/session/adodb-session.php');
+	
+	ADODB_Session::persist('P'); # use 'C' for non-persistent connects
+	
+	session_start();
+ </pre>
+ <p>Note that you can set persistance using ADODB_Session::persist('P').
+ 
+<h3>Compression/Encryption Schemes</h3>
+Since ADOdb 4.05, thanks to Ross Smith, multiple encryption and
+compression schemes are supported. Currently, supported are:
+<p>
+<pre>  MD5Crypt (crypt.inc.php)<br>  MCrypt<br>  Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)<br>  GZip<br>  BZip2<br></pre>
+<p>These are stackable. E.g.
+<p><pre>ADODB_Session::filter(new ADODB_Compress_Bzip2());<br>ADODB_Session::filter(new ADODB_Encrypt_MD5());<br></pre>
+will compress and then encrypt the record in the database.
+<h3>adodb_session_regenerate_id()</h3>
+<p>Dynamically change the current session id with a newly generated one and update database. Currently only
+works with cookies. Useful to improve security by reducing the risk of session-hijacking.
+See this article on <a href=http://shiflett.org/articles/security-corner-feb2004>Session Fixation</a> for more info 
+on the theory behind this feature. Usage:
+<pre>
+	$ADODB_SESSION_DRIVER='mysql';
+	$ADODB_SESSION_CONNECT='localhost';
+	$ADODB_SESSION_USER ='root';
+	$ADODB_SESSION_PWD ='abc';
+	$ADODB_SESSION_DB ='phplens';
+	
+	include('path/to/adodb/session/adodb-session.php');
+	
+	session_start();
+	# Every 10 page loads, reset cookie for safety.
+	# This is extremely simplistic example, better 
+	# to regenerate only when the user logs in or changes
+	# user privilege levels.
+	if ((rand()%10) == 0) adodb_session_regenerate_id(); 
+</pre>
+<p>This function calls session_regenerate_id() internally or simulates it if the function does not exist.
+<h3>Vacuum/Optimize Database</h3>
+<p>During session garbage collection, if postgresql is detected,
+  ADOdb can be set to run VACUUM. If mysql is detected, then optimize database
+  could be called.You can turn this on or off using:</p>
+<pre>$turnOn = true; # or false
+ADODB_Session::optimize($turnOn);
+</pre>
+<p>The default for optimization is it is disabled.</p>
+<h2>More Info</h2>
+<p>Also see the <a href="docs-adodb.htm">core ADOdb documentation</a>.
+</p>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/old-changelog.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/old-changelog.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/old-changelog.htm	(revision 225)
@@ -0,0 +1,822 @@
+<html><title>Old Changelog: ADOdb</title><body>
+<h3>Old Changelog</h3>
+
+</p><p><b>3.92 22 Sept 2003</b> 
+</p><p>Added GetAssoc and CacheGetAssoc to connection object.
+</p><p>Removed TextMax and CharMax functions from adodb.inc.php. 
+</p><p>HasFailedTrans() returned false when trans failed. Fixed. 
+</p><p>Moved perf driver classes into adodb/perf/*.php. 
+</p><p>Misc improvements to performance monitoring, including UI(). 
+</p><p>RETVAL in mssql Parameter(), we do not append @ now. 
+</p><p>Added Param($name) to connection class, returns '?' or ":$name", for defining 
+  bind parameters portably. 
+</p><p>LogSQL traps affected_rows() and saves its value properly now. Also fixed oci8 
+  _stmt and _affectedrows() bugs. 
+</p><p>Session code timestamp check for oci8 works now. Formerly default NLS_DATE_FORMAT 
+  stripped off time portion. Thx to Tony Blair (tonanbarbarian#hotmail.com). Also 
+  added new $conn-&gt;datetime field to oci8, controls whether MetaType() returns 
+  'D' ($this-&gt;datetime==false) or 'T' ($this-&gt;datetime == true) for DATE type. 
+</p><p>Fixed bugs in adodb-cryptsession.inc.php and adodb-session-clob.inc.php. 
+</p><p>Fixed misc bugs in adodb_key_exists, GetInsertSQL() and GetUpdateSQL(). 
+</p><p>Tuned include_once handling to reduce file-system checking overhead. 
+</p><p><b>3.91 9 Sept 2003</b> 
+</p><p>Only released to InterAkt 
+</p><p>Added LogSQL() for sql logging and $ADODB_NEWCONNECTION to override factory 
+  for driver instantiation. 
+</p><p>Added IfNull($field,$ifNull) function, thx to johnwilk#juno.com 
+</p><p>Added portable substr support. 
+</p><p>Now rs2html() has new parameter, $echo. Set to false to return $html instead 
+  of echoing it. 
+</p><p><b>3.90 5 Sept 2003</b> 
+</p><p>First beta of performance monitoring released. 
+</p><p>MySQL supports MetaTable() masking. 
+</p><p>Fixed key_exists() bug in adodb-lib.inc.php 
+</p><p>Added sp_executesql Prepare() support to mssql. 
+</p><p>Added bind support to db2. 
+</p><p>Added swedish language file - Christian Tiberg" christian#commsoft.nu 
+</p><p>Bug in drop index for mssql data dict fixed. Thx to Gert-Rainer Bitterlich. 
+</p><p>Left join setting for oci8 was wrong. Thx to johnwilk#juno.com 
+</p><p><b>3.80 27 Aug 2003</b> 
+</p><p>Patch for PHP 4.3.3 cached recordset csv2rs() fread loop incompatibility. 
+</p><p>Added matching mask for MetaTables. Only for oci8, mssql and postgres currently. 
+</p><p>Rewrite of "oracle" driver connection code, merging with "oci8", by Gaetano. 
+</p><p>Added better debugging for Smart Transactions. 
+</p><p>Postgres DBTimeStamp() was wrongly using TO_DATE. Changed to TO_TIMESTAMP. 
+</p><p>ADODB_FETCH_CASE check pushed to ADONewConnection to allow people to define 
+  it after including adodb.inc.php. 
+</p><p>Added portugese (brazilian) to languages. Thx to "Levi Fukumori". 
+</p><p>Removed arg3 parameter from Execute/SelectLimit/Cache* functions. 
+</p><p>Execute() now accepts 2-d array as $inputarray. Also changed docs of fnExecute() 
+  to note change in sql query counting with 2-d arrays. 
+</p><p>Added MONEY to MetaType in PostgreSQL. 
+</p><p>Added more debugging output to CacheFlush(). 
+</p><p><b>3.72 9 Aug 2003</b> 
+</p><p>Added qmagic($str), which is a qstr($str) that auto-checks for magic quotes 
+  and does the right thing... 
+</p><p>Fixed CacheFlush() bug - Thx to martin#gmx.de 
+</p><p>Walt Boring contributed MetaForeignKeys for postgres7. 
+</p><p>_fetch() called _BlobDecode() wrongly in interbase. Fixed. 
+</p><p>adodb_time bug fixed with dates after 2038 fixed by Jason Pell. http://phplens.com/lens/lensforum/msgs.php?id=6980 
+</p><p><b>3.71 4 Aug 2003</b> 
+</p><p>The oci8 driver, MetaPrimaryKeys() did not check the owner correctly when $owner 
+  == false. 
+</p><p>Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru. 
+</p><p>Spanish language file contributed by "Horacio Degiorgi" horaciod#codigophp.com. 
+</p><p>Error handling in oci8 bugfix - if there was an error in Execute(), then when 
+  calling ErrorNo() and/or ErrorMsg(), the 1st call would return the error, but 
+  the 2nd call would return no error. 
+</p><p>Error handling in odbc bugfix. ODBC would always return the last error, even 
+  if it happened 5 queries ago. Now we reset the errormsg to '' and errorno to 
+  0 everytime before CacheExecute() and Execute(). 
+</p><p><b>3.70 29 July 2003</b> 
+</p><p>Added new SQLite driver. Tested on PHP 4.3 and PHP 5. 
+</p><p>Added limited "sapdb" driver support - mainly date support. 
+</p><p>The oci8 driver did not identify NUMBER with no defined precision correctly. 
+</p><p>Added ADODB_FORCE_NULLS, if set, then PHP nulls are converted to SQL nulls 
+  in GetInsertSQL/GetUpdateSQL. 
+</p><p>DBDate() and DBTimeStamp() format for postgresql had problems. Fixed. 
+</p><p>Added tableoptions to ChangeTableSQL(). Thx to Mike Benoit. 
+</p><p>Added charset support to postgresql. Thx to Julian Tarkhanov. 
+</p><p>Changed OS check for MS-Windows to prevent confusion with darWIN (MacOS) 
+</p><p>Timestamp format for db2 was wrong. Changed to yyyy-mm-dd-hh.mm.ss.nnnnnn. 
+</p><p>adodb-cryptsession.php includes wrong. Fixed. 
+</p><p>Added MetaForeignKeys(). Supported by mssql, odbc_mssql and oci8. 
+</p><p>Fixed some oci8 MetaColumns/MetaPrimaryKeys bugs. Thx to Walt Boring. 
+</p><p>adodb_getcount() did not init qryRecs to 0. Missing "WHERE" clause checking 
+  in GetUpdateSQL fixed. Thx to Sebastiaan van Stijn. 
+</p><p>Added support for only 'VIEWS' and "TABLES" in MetaTables. From Walt Boring. 
+</p><p>Upgraded to adodb-xmlschema.inc.php 0.0.2. 
+</p><p>NConnect for mysql now returns value. Thx to Dennis Verspuij. 
+</p><p>ADODB_FETCH_BOTH support added to interbase/firebird. 
+</p><p>Czech language file contributed by Kamil Jakubovic jake#host.sk. 
+</p><p>PostgreSQL BlobDecode did not use _connectionID properly. Thx to Juraj Chlebec. 
+</p><p>Added some new initialization stuff for Informix. Thx to "Andrea Pinnisi" pinnisi#sysnet.it 
+</p><p>ADODB_ASSOC_CASE constant wrong in sybase _fetch(). Fixed. 
+</p><p><b>3.60 16 June 2003</b> 
+</p><p>We now SET CONCAT_NULL_YIELDS_NULL OFF for odbc_mssql driver to be compat with 
+  mssql driver. 
+</p><p>The property $emptyDate missing from connection class. Also changed 1903 to 
+  constant (TIMESTAMP_FIRST_YEAR=100). Thx to Sebastiaan van Stijn. 
+</p><p>ADOdb speedup optimization - we now return all arrays by reference. 
+</p><p>Now DBDate() and DBTimeStamp() now accepts the string 'null' as a parameter. 
+  Suggested by vincent. 
+</p><p>Added GetArray() to connection class. 
+</p><p>Added not_null check in informix metacolumns(). 
+</p><p>Connection parameters for postgresql did not work correctly when port was defined. 
+</p><p>DB2 is now a tested driver, making adodb 100% compatible. Extensive changes 
+  to odbc driver for DB2, including implementing serverinfo() and SQLDate(), switching 
+  to SQL_CUR_USE_ODBC as the cursor mode, and lastAffectedRows and SelectLimit() 
+  fixes. 
+</p><p>The odbc driver's FetchField() field names did not obey ADODB_ASSOC_CASE. Fixed. 
+</p><p>Some bugs in adodb_backtrace() fixed. 
+</p><p>Added "INT IDENTITY" type to adorecordset::MetaType() to support odbc_mssql 
+  properly. 
+</p><p>MetaColumns() for oci8, mssql, odbc revised to support scale. Also minor revisions 
+  to odbc MetaColumns() for vfp and db2 compat. 
+</p><p>Added unsigned support to mysql datadict class. Thx to iamsure. 
+</p><p>Infinite loop in mssql MoveNext() fixed when ADODB_FETCH_ASSOC used. Thx to 
+  Josh R, Night_Wulfe#hotmail.com. 
+</p><p>ChangeTableSQL contributed by Florian Buzin. 
+</p><p>The odbc_mssql driver now sets CONCAT_NULL_YIELDS_NULL OFF for compat with 
+  mssql driver. 
+</p>
+
+<p><b>3.50 19 May 2003</b></p>
+<p>Fixed mssql compat with FreeTDS. FreeTDS does not implement mssql_fetch_assoc(). 
+<p>Merged back connection and recordset code into adodb.inc.php. 
+<p>ADOdb sessions using oracle clobs contributed by achim.gosse#ddd.de. See adodb-session-clob.php. 
+<p>Added /s modifier to preg_match everywhere, which ensures that regex does not 
+  stop at /n. Thx Pao-Hsi Huang. 
+<p>Fixed error in metacolumns() for mssql. 
+<p>Added time format support for SQLDate. 
+<p>Image => B added to metatype. 
+<p>MetaType now checks empty($this->blobSize) instead of empty($this). 
+<p>Datadict has beta support for informix, sybase (mapped to mssql), db2 and generic 
+  (which is a fudge). 
+<p>BlobEncode for postgresql uses pg_escape_bytea, if available. Needed for compat 
+  with 7.3. 
+<p>Added $ADODB_LANG, to support multiple languages in MetaErrorMsg(). 
+<p>Datadict can now parse table definition as declarative text. 
+<p>For DataDict, oci8 autoincrement trigger missing semi-colon. Fixed. 
+<p>For DataDict, when REPLACE flag enabled, drop sequence in datadict for autoincrement 
+  field in postgres and oci8.s 
+<p>Postgresql defaults to template1 database if no database defined in connect/pconnect. 
+<p>We now clear _resultid in postgresql if query fails. 
+<p><b>3.40 19 May 2003</b></p>
+<p>Added insert_id for odbc_mssql. 
+<p>Modified postgresql UpdateBlobFile() because it did not work in safe mode. 
+<p>Now connection object is passed to raiseErrorFn as last parameter. Needed by 
+  StartTrans(). 
+<p>Added StartTrans() and CompleteTrans(). It is recommended that you do not modify 
+  transOff, but use the above functions. 
+<p>oci8po now obeys ADODB_ASSOC_CASE settings. 
+<p>Added virtualized error codes, using PEAR DB equivalents. Requires you to manually 
+  include adodb-error.inc.php yourself, with MetaError() and MetaErrorMsg($errno). 
+<p>GetRowAssoc for mysql and pgsql were flawed. Fix by Ross Smith. 
+<p>Added to datadict types I1, I2, I4 and I8. Changed datadict type 'T' to map 
+  to timestamp instead of datetime for postgresql. 
+<p>Error handling in ExecuteSQLArray(), adodb-datadict.inc.php did not work. 
+<p>We now auto-quote postgresql connection parameters when building connection 
+  string. 
+<p>Added session expiry notification. 
+<p>We now test with odbc mysql - made some changes to odbc recordset constructor. 
+<p>MetaColumns now special cases access and other databases for odbc. 
+<p><b>3.31 17 March 2003</b></p>
+<p>Added row checking for _fetch in postgres. 
+<p>Added Interval type to MetaType for postgres. 
+<p>Remapped postgres driver to call postgres7 driver internally. 
+<p>Adorecordset_array::getarray() did not return array when nRows >= 0. 
+<p>Postgresql: at times, no error message returned by pg_result_error() but error 
+  message returned in pg_last_error(). Recoded again. 
+<p>Interbase blob's now use chunking for updateblob. 
+<p>Move() did not set EOF correctly. Reported by Jorma T. 
+<p>We properly support mysql timestamp fields when we are creating mysql tables 
+  using the data-dict interface. 
+<p>Table regex includes backticks character now. 
+<p><b>3.30 3 March 2003</b></p>
+<p>Added $ADODB_EXTENSION and $ADODB_COMPAT_FETCH constant. 
+<p>Made blank1stItem configurable using syntax "value:text" in GetMenu/GetMenu2. 
+  Thx to Gabriel Birke. 
+<p>Previously ADOdb differed from the Microsoft standard because it did not define 
+  what to set $this->fields when EOF was reached. Now at EOF, ADOdb sets $this->fields 
+  to false for all databases, which is consist with Microsoft's implementation. 
+  Postgresql and mysql have always worked this way (in 3.11 and earlier). If you 
+  are experiencing compatibility problems (and you are not using postgresql nor 
+  mysql) on upgrading to 3.30, try setting the global variables $ADODB_COUNTRECS 
+  = true (which is the default) and $ADODB_FETCH_COMPAT = true (this is a new 
+  global variable). 
+<p>We now check both pg_result_error and pg_last_error as sometimes pg_result_error 
+  does not display anything. Iman Mayes 
+<p> We no longer check for magic quotes gpc in Quote(). 
+<p> Misc fixes for table creation in adodb-datadict.inc.php. Thx to iamsure. 
+<p> Time calculations use adodb_time library for all negative timestamps due to 
+  problems in Red Hat 7.3 or later. Formerly, only did this for Windows. 
+<p> In mssqlpo, we now check if $sql in _query is a string before we change || 
+  to +. This is to support prepared stmts. 
+<p> Move() and MoveLast() internals changed to support to support EOF and $this->fields 
+  change. 
+<p> Added ADODB_FETCH_BOTH support to mssql. Thx to Angel Fradejas afradejas#mediafusion.es 
+<p> We now check if link resource exists before we run mysql_escape_string in 
+  qstr(). 
+<p> Before we flock in csv code, we check that it is not a http url. 
+<p><b>3.20 17 Feb 2003</b></p>
+<p>Added new Data Dictionary classes for creating tables and indexes. Warning 
+  - this is very much alpha quality code. The API can still change. See adodb/tests/test-datadict.php 
+  for more info. 
+<p>We now ignore $ADODB_COUNTRECS for mysql, because PHP truncates incomplete 
+  recordsets when mysql_unbuffered_query() is called a second time. 
+<p>Now postgresql works correctly when $ADODB_COUNTRECS = false. 
+<p>Changed _adodb_getcount to properly support SELECT DISTINCT. 
+<p>Discovered that $ADODB_COUNTRECS=true has some problems with prepared queries 
+  - suspect PHP bug. 
+<p>Now GetOne and GetRow run in $ADODB_COUNTRECS=false mode for better performance. 
+<p>Added support for mysql_real_escape_string() and pg_escape_string() in qstr(). 
+<p>Added an intermediate variable for mysql _fetch() and MoveNext() to store fields, 
+  to prevent overwriting field array with boolean when mysql_fetch_array() returns 
+  false. 
+<p>Made arrays for getinsertsql and getupdatesql case-insensitive. Suggested by 
+  Tim Uckun" tim#diligence.com 
+<p><b>3.11 11 Feb 2003</b></p>
+<p>Added check for ADODB_NEVER_PERSIST constant in PConnect(). If defined, then 
+  PConnect() will actually call non-persistent Connect(). 
+<p>Modified interbase to properly work with Prepare(). 
+<p>Added $this->ibase_timefmt to allow you to change the date and time format. 
+<p>Added support for $input_array parameter in CacheFlush(). 
+<p>Added experimental support for dbx, which was then removed when i found that 
+  it was slower than using native calls. 
+<p>Added MetaPrimaryKeys for mssql and ibase/firebird. 
+<p>Added new $trim parameter to GetCol and CacheGetCol 
+<p>Uses updated adodb-time.inc.php 0.06. 
+<p><b>3.10 27 Jan 2003</b> 
+<p>Added adodb_date(), adodb_getdate(), adodb_mktime() and adodb-time.inc.php. 
+<p>For interbase, added code to handle unlimited number of bind parameters. From 
+  Daniel Hasan daniel#hasan.cl. 
+<p>Added BlobDecode and UpdateBlob for informix. Thx to Fernando Ortiz. 
+<p>Added constant ADODB_WINDOWS. If defined, means that running on Windows. 
+<p>Added constant ADODB_PHPVER which stores php version as a hex num. Removed 
+  $ADODB_PHPVER variable. 
+<p>Felho Bacsi reported a minor white-space regular expression problem in GetInsertSQL. 
+<p>Modified ADO to use variant to store _affectedRows 
+<p>Changed ibase to use base class Replace(). Modified base class Replace() to 
+  support ibase. 
+<p>Changed odbc to auto-detect when 0 records returned is wrong due to bad odbc 
+  drivers. 
+<p>Changed mssql to use datetimeconvert ini setting only when 4.30 or later (does 
+  not work in 4.23). 
+<p>ExecuteCursor($stmt, $cursorname, $params) now accepts a new $params array 
+  of additional bind parameters -- William Lovaton walovaton#yahoo.com.mx. 
+<p>Added support for sybase_unbuffered_query if ADODB_COUNTRECS == false. Thx 
+  to chuck may. 
+<p>Fixed FetchNextObj() bug. Thx to Jorma Tuomainen. 
+<p>We now use SCOPE_IDENTITY() instead of @@IDENTITY for mssql - thx to marchesini#eside.it 
+<p>Changed postgresql movenext logic to prevent illegal row number from being 
+  passed to pg_fetch_array(). 
+<p>Postgresql initrs bug found by "Bogdan RIPA" bripa#interakt.ro $f1 accidentally 
+  named $f 
+<p><b>3.00 6 Jan 2003</b> 
+<p>Fixed adodb-pear.inc.php syntax error. 
+<p>Improved _adodb_getcount() to use SELECT COUNT(*) FROM ($sql) for languages 
+  that accept it. 
+<p>Fixed _adodb_getcount() caching error. 
+<p>Added sql to retrive table and column info for odbc_mssql. 
+<p><strong>2.91 3 Jan 2003</strong> 
+<p>Revised PHP version checking to use $ADODB_PHPVER with legal values 0x4000, 
+  0x4050, 0x4200, 0x4300. 
+<p>Added support for bytea fields and oid blobs in postgres by allowing BlobDecode() 
+  to detect and convert non-oid fields. Also added BlobEncode to postgres when 
+  you want to encode oid blobs. 
+<p>Added blobEncodeType property for connections to inform phpLens what encoding 
+  method to use for blobs. 
+<p>Added BlobDecode() and BlobEncode() to base ADOConnection class. 
+<p>Added umask() to _gencachename() when creating directories. 
+<p>Added charPage for ado drivers, so you can set the code page. 
+<pre>
+$conn->charPage = CP_UTF8;
+$conn->Connect($dsn);
+</pre>
+<p>Modified _seek in mysql to check for num rows=0. 
+<p>Added to metatypes new informix types for IDS 9.30. Thx Fernando Ortiz. 
+<p>_maxrecordcount returned in CachePageExecute $rsreturn 
+<p>Fixed sybase cacheselectlimit( ) problems 
+<p>MetaColumns() max_length should use precision for types X and C for ms access. 
+  Fixed. 
+<p>Speedup of odbc non-SELECT sql statements. 
+<p>Added support in MetaColumns for Wide Char types for ODBC. We halve max_length 
+  if unicode/wide char. 
+<p>Added 'B' to types handled by GetUpdateSQL/GetInsertSQL. 
+<p>Fixed warning message in oci8 driver with $persist variable when using PConnect. 
+<p><b>2.90 11 Dec 2002</b> 
+<p>Mssql and mssqlpo and oci8po now support ADODB_ASSOC_CASE. 
+<p>Now MetaType() can accept a field object as the first parameter. 
+<p>New $arr = $db-&gt;ServerInfo( ) function. Returns $arr['description'] which 
+  is the string description, and $arr['version']. 
+<p>PostgreSQL and MSSQL speedups for insert/updates. 
+<p> Implemented new SetFetchMode() that removes the need to use $ADODB_FETCH_MODE. 
+  Each connection has independant fetchMode. 
+<p>ADODB_ASSOC_CASE now defaults to 2, use native defaults. This is because we 
+  would break backward compat for too many applications otherwise. 
+<p>Patched encrypted sessions to use replace() 
+<p>The qstr function supports quoting of nulls when escape character is \ 
+<p>Rewrote bits and pieces of session code to check for time synch and improve 
+  reliability. 
+<p>Added property ADOConnection::hasTransactions = true/false; 
+<p>Added CreateSequence and DropSequence functions 
+<p>Found misplaced MoveNext() in adodb-postgres.inc.php. Fixed. 
+<p>Sybase SelectLimit not reliable because 'set rowcount' not cached - fixed. 
+<p>Moved ADOConnection to adodb-connection.inc.php and ADORecordSet to adodb-recordset.inc.php. 
+  This allows us to use doxygen to generate documentation. Doxygen doesn't like 
+  the classes in the main adodb.inc.php file for some mysterious reason. 
+<p><b>2.50, 14 Nov 2002</b> 
+<p>Added transOff and transCnt properties for disabling (transOff = true) and 
+  tracking transaction status (transCnt>0). 
+<p>Added inputarray handling into _adodb_pageexecute_all_rows - "Ross Smith" RossSmith#bnw.com. 
+<p>Fixed postgresql inconsistencies in date handling. 
+<p>Added support for mssql_fetch_assoc. 
+<p>Fixed $ADODB_FETCH_MODE bug in odbc MetaTables() and MetaPrimaryKeys(). 
+<p>Accidentally declared UnixDate() twice, making adodb incompatible with php 
+  4.3.0. Fixed. 
+<p>Fixed pager problems with some databases that returned -1 for _currentRow on 
+  MoveLast() by switching to MoveNext() in adodb-lib.inc.php. 
+<p>Also fixed uninited $discard in adodb-lib.inc.php. 
+<p><b>2.43, 25 Oct 2002</b></p>
+Added ADODB_ASSOC_CASE constant to better support ibase and odbc field names. 
+<p>Added support for NConnect() for oracle OCINLogin. 
+<p>Fixed NumCols() bug. 
+<p>Changed session handler to use Replace() on write. 
+<p>Fixed oci8 SelectLimit aggregate function bug again. 
+<p>Rewrote pivoting code. 
+<p><b>2.42, 4 Oct 2002</b></p>
+<p>Fixed ibase_fetch() problem with nulls. Also interbase now does automatic blob 
+  decoding, and is backward compatible. Suggested by Heinz Hombergs heinz#hhombergs.de. 
+<p>Fixed postgresql MoveNext() problems when called repeatedly after EOF. Also 
+  suggested by Heinz Hombergs. 
+<p>PageExecute() does not rewrite queries if SELECT DISTINCT is used. Requested 
+  by hans#velum.net 
+<p>Added additional fixes to oci8 SelectLimit handling with aggregate functions 
+  - thx to Christian Bugge for reporting the problem. 
+<p><b>2.41, 2 Oct 2002</b></p>
+<p>Fixed ADODB_COUNTRECS bug in odbc. Thx to Joshua Zoshi jzoshi#hotmail.com. 
+<p>Increased buffers for adodb-csvlib.inc.php for extremely long sql from 8192 
+  to 32000. 
+<p>Revised pivottable.inc.php code. Added better support for aggregate fields. 
+<p>Fixed mysql text/blob types problem in MetaTypes base class - thx to horacio 
+  degiorgi. 
+<p>Added SQLDate($fmt,$date) function, which allows an sql date format string 
+  to be generated - useful for group by's. 
+<p>Fixed bug in oci8 SelectLimit when offset>100. 
+<p><b>2.40 4 Sept 2002</b></p>
+<p>Added new NLS_DATE_FORMAT property to oci8. Suggested by Laurent NAVARRO ln#altidev.com 
+<p>Now use bind parameters in oci8 selectlimit for better performance. 
+<p>Fixed interbase replaceQuote for dialect != 1. Thx to "BEGUIN Pierre-Henri 
+  - INFOCOB" phb#infocob.com. 
+<p>Added white-space check to QA. 
+<p>Changed unixtimestamp to support fractional seconds (we always round down/floor 
+  the seconds). Thanks to beezly#beezly.org.uk. 
+<p>Now you can set the trigger_error type your own user-defined type in adodb-errorhandler.inc.php. 
+  Suggested by Claudio Bustos clbustos#entelchile.net. 
+<p>Added recordset filters with rsfilter.inc.php. 
+<p>$conn->_rs2rs does not create a new recordset when it detects it is of type 
+  array. Some trickery there as there seems to be a bug in Zend Engine 
+<p>Added render_pagelinks to adodb-pager.inc.php. Code by "Pablo Costa" pablo#cbsp.com.br. 
+<p>MetaType() speedup in adodb.inc.php by using hashing instead of switch. Best 
+  performance if constant arrays are supported, as they are in PHP5. 
+<p>adodb-session.php now updates only the expiry date if the crc32 check indicates 
+  that the data has not been modified. 
+<p><b>2.31 20 Aug 2002</b></p>
+<p>Made changes to pivottable.inc.php due to daniel lucuzaeu's suggestions (we sum the pivottable column if desired).
+<p>Fixed ErrorNo() in postgres so it does not depend on _errorMsg property.
+<p>Robert Tuttle added support for oracle cursors. See ExecuteCursor().
+<p>Fixed Replace() so it works with mysql when updating record where data has not changed. Reported by
+Cal Evans (cal#calevans.com).
+<p><b>2.30 1 Aug 2002</b></p>
+<p>Added pivottable.inc.php. Thanks to daniel.lucazeau#ajornet.com for the original 
+  concept.
+<p>Added ADOConnection::outp($msg,$newline) to output error and debugging messages. Now 
+you can override this using the ADODB_OUTP constant and use your own output handler.
+<p>Changed == to === for 'null' comparison. Reported by ericquil#yahoo.com 
+<p>Fixed mssql SelectLimit( ) bug when distinct used.
+<p><b>2.30 1 Aug 2002</b></p>
+<p>New GetCol() and CacheGetCol() from ross#bnw.com that returns the first field as a 1 dim array.
+<p>We have an empty recordset, but RecordCount() could return -1. Fixed. Reported by  "Jonathan Polansky" jonathan#polansky.com.
+<p>We now check for session variable changes using strlen($sessval).crc32($sessval). 
+Formerly we only used crc32().
+<p>Informix SelectLimit() problem with $ADODB_COUNTRECS fixed.
+<p>Fixed informix SELECT FIRST x DISTINCT, and not SELECT DISTINCT FIRST x - reported by F Riosa
+<p>Now default adodb error handlers ignores error if @ used.
+<p>If you set $conn->autoRollback=true, we auto-rollback persistent connections for odbc, mysql, oci8, mssql. 
+Default for autoRollback is false. No need to do so for postgres. 
+As interbase requires a transaction id (what a flawed api), we don't do it for interbase.
+<p>Changed PageExecute() to use non-greedy preg_match when searching for "FROM" keyword.
+<p><b>2.20 9 July 2002</b></p>
+<p>Added CacheGetOne($secs2cache,$sql), CacheGetRow($secs2cache,$sql), CacheGetAll($secs2cache,$sql).
+<p>Added $conn->OffsetDate($dayFraction,$date=false) to generate sql that calcs 
+  date offsets. Useful for scheduling appointments.
+<p>Added connection properties: leftOuter, rightOuter that hold left and right 
+  outer join operators.
+<p>Added connection property: ansiOuter to indicate whether ansi outer joins supported.
+<p>New driver <i>mssqlpo</i>, the portable mssql driver, which converts string 
+  concat operator from || to +.
+<p>Fixed ms access bug - SelectLimit() did not support ties - fixed.
+<p>Karsten Kraus (Karsten.Kraus#web.de), contributed error-handling code to ADONewConnection. 
+  Unfortunately due to backward compat problems, had to rollback most of the changes.
+<p>Added new parameter to GetAssoc() to allow returning an array of key-value pairs, 
+ignoring any additional columns in the recordset. Off by default.
+<p>Corrected mssql $conn->sysDate to return only date using convert().
+<p>CacheExecute() improved debugging output.
+<p>Changed rs2html() so newlines are converted to BR tags. Also optimized rs2html() based
+on feedback by "Jerry Workman" jerry#mtncad.com.
+<p>Added support for Replace() with Interbase, using DELETE and INSERT.
+<p>Some minor optimizations (mostly removing & references when passing arrays).
+<p>Changed  GenID() to allows id's larger than the size of an integer.
+<p>Added force_session property to oci8 for better updateblob() support.
+<p>Fixed PageExecute() which did not work properly with sql containing GROUP BY.
+<p><b>2.12 12 June 2002</b></p>
+<p>Added toexport.inc.php to export recordsets in CSV and tab-delimited format.
+<p>CachePageExecute() does not work - fixed - thx John Huong.
+<p>Interbase aliases not set properly in FetchField() - fixed. Thx Stefan Goethals.
+<p>Added cache property to adodb pager class. The number of secs to cache recordsets.
+<p>SQL rewriting bug in pageexecute() due to skipping of newlines due to missing /s modifier. Fixed.
+<p>Max size of cached recordset due to a bug was 256000 bytes. Fixed.
+<p>Speedup of 1st invocation of CacheExecute() by tuning code.
+<p>We compare $rewritesql with $sql in pageexecute code in case of rewrite failure.
+<p><b>2.11 7 June 2002</b></p>
+<p>Fixed PageExecute() rewrite sql problem - COUNT(*) and ORDER BY don't go together with
+	mssql, access and postgres. Thx to Alexander Zhukov alex#unipack.ru
+<p>DB2 support for CHARACTER type added - thx John Huong huongch#bigfoot.com
+<p>For ado, $argProvider not properly checked. Fixed - kalimero#ngi.it
+<p>Added $conn->Replace() function for update with automatic insert if the record does not exist. 
+	Supported by all databases except interbase.
+<p><b>2.10 4 June 2002</b></p>
+<p>Added uniqueSort property to indicate mssql ORDER BY cols must be unique.
+<p>Optimized session handler by crc32 the data. We only write if session data has changed.
+<p>adodb_sess_read in adodb-session.php now returns ''correctly - thanks to Jorma Tuomainen, webmaster#wizactive.com
+<p>Mssql driver did not throw EXECUTE errors correctly because ErrorMsg() and ErrorNo() called in wrong order. 
+Pointed out by Alexios Fakos. Fixed.
+<p>Changed ado to use client cursors. This fixes BeginTran() problems with ado.
+<p>Added handling of timestamp type in ado.
+<p>Added to ado_mssql support for insert_id() and affected_rows().
+<p>Added support for mssql.datetimeconvert=0, available since php 4.2.0.
+<p>Made UnixDate() less strict, so that the time is ignored if present.
+<p>Changed quote() so that it checks for magic_quotes_gpc.
+<p>Changed maxblobsize for odbc to default to 64000.
+<p><b>2.00 13 May 2002</b></p>
+<p>Added drivers <i>informix72</i> for pre-7.3 versions, and <i>oci805</i> for 
+  oracle 8.0.5, and postgres64 for postgresql 6.4 and earlier. The postgres and postgres7 drivers
+  are now identical.
+<p>Interbase now partially supports ADODB_FETCH_BOTH, by defaulting to ASSOC mode.
+<p>Proper support for blobs in mssql. Also revised blob support code 
+is base class. Now UpdateBlobFile() calls UpdateBlob() for consistency.
+<p>Added support for changed odbc_fetch_into api in php 4.2.0 
+with $conn-&gt;_has_stupid_odbc_fetch_api_change.
+<p>Fixed spelling of tablock locking hint in GenID( ) for mssql. 
+<p>Added RowLock( ) to several databases, including oci8, informix, sybase, etc. 
+  Fixed where error in mssql RowLock().
+<p>Added sysDate and sysTimeStamp properties to most database drivers. These are the sql
+functions/constants for that database that return the current date and current timestamp, and 
+are useful for portable inserts and updates.
+<p>Support for RecordCount() caused date handling in sybase and mssql to break. 
+Fixed, thanks to Toni Tunkkari, by creating derived classes for ADORecordSet_array for
+both databases. Generalized using arrayClass property. Also to support RecordCount(), 
+changed metatype handling for ado drivers. Now the type returned in FetchField 
+  is no longer a number, but the 1-char data type returned by MetaType.
+  At the same time, fixed a lot of date handling. Now mssql support dmy and mdy date formats. 
+Also speedups in sybase and mssql with preg_match and ^ in date/timestamp handling.
+Added support in sybase and mssql for 24 hour clock in timestamps (no AM/PM).
+<p>Extensive revisions to informix driver - thanks to Samuel CARRIERE samuel_carriere#hotmail.com 
+<p>Added $ok parameter to CommitTrans($ok) for easy rollbacks.
+<p>Fixed odbc MetaColumns and MetaTables to save and restore $ADODB_FETCH_MODE.
+<p>Some odbc drivers did not call the base connection class constructor. Fixed.
+<p>Fixed regex for GetUpdateSQL() and GetInsertSQL() to support more legal character combinations.
+
+<p><b>1.99 21 April 2002</b></p>
+<p>Added emulated RecordCount() to all database drivers if $ADODB_COUNTRECS = true 
+  (which it is by default). Inspired by Cristiano Duarte (cunha17#uol.com.br). 
+<p>Unified stored procedure support for mssql and oci8. Parameter() and PrepareSP() 
+  functions implemented. 
+<p>Added support for SELECT FIRST in informix, modified hasTop property to support 
+  this. 
+<p>Changed csv driver to handle updates/deletes/inserts properly (when Execute() returns true).
+Bind params also work now, and raiseErrorFn with csv driver. Added csv driver to QA process. 
+<p>Better error checking in oci8 UpdateBlob() and UpdateBlobFile().
+<p>Added TIME type to MySQL - patch by Manfred h9125297#zechine.wu-wien.ac.at
+<p>Prepare/Execute implemented for Interbase/Firebird 
+<p>Changed some regular expressions to be anchored by /^ $/ for speed.
+<p>Added UnixTimeStamp() and UnixDate() to ADOConnection(). Now these functions 
+  are in both ADOConnection and ADORecordSet classes.
+<p>Empty recordsets were not cached - fixed.
+<p>Thanks to Gaetano Giunta (g.giunta#libero.it) for the oci8 code review. We 
+  didn't agree on everything, but i hoped we agreed to disagree! 
+<p><b>1.90 6 April 2002</b></p>
+<p>Now all database drivers support fetch modes ADODB_FETCH_NUM and ADODB_FETCH_ASSOC, though
+	still not fully tested. Eg. Frontbase, Sybase, Informix.
+<p>NextRecordSet() support for mssql. Contributed by "Sven Axelsson" sven.axelsson#bokochwebb.se
+<p>Added blob support for SQL Anywhere. Contributed by Wade Johnson wade#wadejohnson.de
+<p>Fixed some security loopholes in server.php. Server.php also supports fetch mode.
+<p>Generalized GenID() to support odbc and mssql drivers. Mssql no longer generates GUID's.
+<p>Experimental RowLock($table,$where) for mssql.
+<p>Properly implemented Prepare() in oci8 and ODBC.
+<p>Added Bind() support to oci8 to support Prepare().
+<p>Improved error handler. Catches CacheExecute() and GenID() errors now.
+<p>Now if you are running php from the command line, debugging messages do not output html formating.
+Not 100% complete, but getting there.
+<p><b>1.81 22 March 2002</b></p>
+<p>Restored default $ADODB_FETCH_MODE = ADODB_FETCH_DEFAULT for backward compatibility.
+<p>SelectLimit for oci8 improved - Our FIRST_ROWS optimization now does not overwrite existing hint.
+<p>New Sybase SQL Anywhere driver. Contributed by Wade Johnson wade#wadejohnson.de
+<p><b>1.80 15 March 2002</b></p>
+<p>Redesigned directory structure of ADOdb files. Added new driver directory where
+all database drivers reside.
+<p>Changed caching algorithm to create subdirectories. Now we scale better.
+<p>Informix driver now supports insert_id(). Contribution by "Andrea Pinnisi" pinnisi#sysnet.it
+<p>Added experimental ISO date and FetchField support for informix.
+<p>Fixed a quoting bug in Execute() with bind parameters, causing problems with blobs.
+<p>Mssql driver speedup by 10-15%.
+<p>Now in CacheExecute($secs2cache,$sql,...), $secs2cache is optional. If missing, it will
+take the value defined in $connection->cacheSecs (default is 3600 seconds). Note that
+CacheSelectLimit(), the secs2cache is still compulsory - sigh.
+<p>Sybase SQL Anywhere driver (using ODBC) contributed by Wade Johnson wade#wadejohnson.de
+<p><b>1.72 8 March 2002</b></p>
+<p>Added @ when returning Fields() to prevent spurious error - "Michael William Miller" mille562#pilot.msu.edu
+<p>MetaDatabases() for postgres contributed by Phil pamelant#nerim.net
+ <p>Mitchell T. Young (mitch#youngfamily.org) contributed informix driver.
+ <p>Fixed rs2html() problem. I cannot reproduce, so probably a problem with pre PHP 4.1.0 versions,
+  when supporting new ADODB_FETCH_MODEs.
+ <p>Mattia Rossi (mattia#technologist.com) contributed BlobDecode() and UpdateBlobFile() for postgresql
+ using the postgres specific pg_lo_import()/pg_lo_open() - i don't use them but hopefully others will
+ find this useful. See <a href="http://phplens.com/lens/lensforum/msgs.php?id=1262">this posting</a>
+ for an example of usage.
+ <p>Added UpdateBlobFile() for uploading files to a database.
+ <p>Made UpdateBlob() compatible with oci8po driver.
+ <p>Added noNullStrings support to oci8 driver. Oracle changes all ' ' strings to nulls,
+  so you need to set strings to ' ' to prevent the nullifying of strings. $conn->noNullStrings = true;
+  will do this for you automatically. This is useful when you define a char column as NOT NULL.
+  <p>Fixed UnixTimeStamp() bug - wasn't setting minutes and seconds properly. Patch from Agusti Fita i Borrell agusti#anglatecnic.com.
+  <p>Toni Tunkkari added patch for sybase dates. Problem with spaces in day part of date fixed.
+ <p><b>1.71 18 Jan 2002</b></p>
+ <p>Sequence start id support. Now $conn->Gen_ID('seqname', 50) to start sequence from 50.
+ <p>CSV driver fix for selectlimit, from Andreas - akaiser#vocote.de.
+<P>Gam3r spotted that a global variable was undefined in the session handler. 
+<p>Mssql date regex had error. Fixed - reported by Minh Hoang vb_user#yahoo.com.
+<p>DBTimeStamp() and DBDate() now accept iso dates and unix timestamps. This means
+that the PostgreSQL handling of dates in GetInsertSQL() and GetUpdateSQL() can
+be removed. Also if these functions are passed '' or null or false, we return a SQL null.
+<p>GetInsertSQL() and GetUpdateSQL() now accept a new parameter, $magicq to 
+indicate whether quotes should be inserted based on magic quote settings - suggested by
+dj#4ict.com.
+<p>Reformated docs slightly based on suggestions by Chris Small.
+ <p><b>1.65 28 Dec 2001</b></p>
+ <p>Fixed borland_ibase class naming bug.
+ <p>Now instead of using $rs->fields[0] internally, we use reset($rs->fields) so 
+ that we are compatible with ADODB_FETCH_ASSOC mode. Reported by Nico S.
+ <p>Changed recordset constructor and _initrs() for oci8 so that it returns the field definitions even
+ if no rows in the recordset. Reported by Rick Hickerson (rhickers#mv.mv.com).
+ <p>Improved support for postgresql in GetInsertSQL and GetUpdateSQL by
+  "mike" mike#partner2partner.com  and "Ryan Bailey" rebel#windriders.com
+ <p><b>1.64 20 Dec 2001</b></p>
+<p>Danny Milosavljevic &lt;danny.milo#gmx.net> added some patches for MySQL error handling
+and displaying default values.
+<p>Fixed some ADODB_FETCH_BOTH inconsistencies in odbc and interbase.
+<p>Added more tests to test suite to cover ADODB_FETCH_* and ADODB_ERROR_HANDLER.
+<p>Added firebird (ibase) driver
+<p>Added borland_ibase driver for interbase 6.5
+<p><b>1.63 13 Dec 2001</b></p>
+Absolute to the adodb-lib.inc.php file not set properly. Fixed.<p>
+
+<p><b>1.62 11 Dec 2001</b></p>
+<p>Major speedup of ADOdb for low-end web sites by reducing the php code loading and compiling
+cycle. We conditionally compile not so common functions. 
+Moved csv code to adodb-csvlib.inc.php to reduce adodb.inc.php parsing. This file
+is loaded only when the csv/proxy driver is used, or CacheExecute() is run.
+Also moved PageExecute(), GetSelectSQL() and GetUpdateSQL() core code to adodb-lib.inc.php.
+This reduced the 70K main adodb.inc.php file to 55K, and since at least 20K of the file
+is comments, we have reduced 50K of code in adodb.inc.php to 35K. There
+ should be 35% reduction in memory and thus 35% speedup in compiling the php code for the
+main adodb.inc.php file.
+<p>Highly tuned SelectLimit() for oci8 for massive speed improvements on large files. 
+Selecting 20 rows starting from the 20,000th row of a table is now 7 times faster. 
+Thx to Tomas V V Cox.
+<p>Allow . and # in table definitions in GetInsertSQL and GetUpdateSQL.
+ See ADODB_TABLE_REGEX constant. Thx to Ari Kuorikoski.
+<p>Added ADODB_PREFETCH_ROWS constant, defaulting to 10. This determines the number
+of records to prefetch in a SELECT statement. Only used by oci8.</p>
+<p>Added high portability Oracle class called oci8po. This uses ? for bind variables, and 
+lower cases column names.</p>
+<p>Now all database drivers support $ADODB_FETCH_MODE, including interbase, ado, and odbc:
+ADODB_FETCH_NUM and ADODB_FETCH_ASSOC. ADODB_FETCH_BOTH is not fully implemented for all 
+database drivers.
+<p><b>1.61 Nov 2001</b></p>
+<p>Added PO_RecordCount() and PO_Insert_ID(). PO stands for portable. Pablo Roca 
+  [pabloroca#mvps.org]</p>
+<p>GenID now returns 0 if not available. Safer is that you should check $conn->hasGenID 
+  for availability.</p>
+<p>M'soft ADO we now correctly close recordset in _close() peterd#telephonetics.co.uk</p>
+<p>MSSQL now supports GenID(). It generates a 16-byte GUID from mssql newid() 
+  function.</p>
+<p>Changed ereg_replace to preg_replace in SelectLimit. This is a fix for mssql. 
+  Ereg doesn't support t or n! Reported by marino Carlos xaplo#postnuke-espanol.org</p>
+<p>Added $recordset->connection. This is the ADOConnection object for the recordset. 
+Works with cached and normal recordsets. Surprisingly, this had no affect on performance!</p>
+<p><b>1.54 15 Nov 2001</b></p>
+Fixed some more bugs in PageExecute().  I am getting sick of bug in this and will have to 
+reconsider my QA here. The main issue is that I don't use PageExecute() and 
+to check whether it is working requires a visual inspection of the html generated currently.
+It is possible to write a test script but it would be quite complicated :(
+<p> More speedups of SelectLimit() for DB2, Oci8, access, vfp, mssql.
+<p>
+
+<p><b>1.53 7 Nov 2001</b></p>
+Added support for ADODB_FETCH_ASSOC for ado and odbc drivers.<p>
+Tuned GetRowAssoc(false) in postgresql and mysql.<p>
+Stephen Van Dyke contributed ADOdb icon, accepted with some minor mods.<p>
+Enabled Affected_Rows() for postgresql<p>
+Speedup for Concat() using implode() - Benjamin Curtis ben_curtis#yahoo.com<p>
+Fixed some more bugs in PageExecute() to prevent infinite loops<p>
+<p><b>1.52 5 Nov 2001</b></p>
+Spelling error in CacheExecute() caused it to fail. $ql should be $sql in line 625!<p>
+Added fixes for parsing [ and ] in GetUpdateSQL().
+<p><b>1.51 5 Nov 2001</b></p>
+<p>Oci8 SelectLimit() speedup by using OCIFetch().
+<p>Oci8 was mistakenly reporting errors when $db->debug = true.
+<p>If a connection failed with ODBC, it was not correctly reported - fixed.
+<p>_connectionID was inited to -1, changed to false.
+<p>Added $rs->FetchRow(), to simplify API, ala PEAR DB
+<p>Added PEAR DB compat mode, which is still faster than PEAR! See adodb-pear.inc.php.
+<p>Removed postgres pconnect debugging statement.
+<p><b>1.50 31 Oct 2001</b></p>
+<p>ADOdbConnection renamed to ADOConnection, and ADOdbFieldObject to ADOFieldObject.
+<p>PageExecute() now checks for empty $rs correctly, and the errors in the docs on this subject have been fixed.
+<p>odbc_error() does not return 6 digit error correctly at times. Implemented workaround.
+<p>Added ADORecordSet_empty class. This will speedup INSERTS/DELETES/UPDATES because the return
+object created is much smaller.
+<p>Added Prepare() to odbc, and oci8 (but doesn't work properly for oci8 still).
+<p>Made pgsql a synonym for postgre7, and changed SELECT LIMIT to use OFFSET for compat with 
+postgres 7.2.
+<p>Revised adodb-cryptsession.php thanks to Ari.
+<p>Set resources to false on _close, to force freeing of resources.
+<p>Added adodb-errorhandler.inc.php, adodb-errorpear.inc.php and raiseErrorFn on Freek's urging.
+<p>GetRowAssoc($toUpper=true): $toUpper added as default.
+<p>Errors when connecting to a database were not captured formerly. Now we do it correctly.
+<p><b>1.40 19 September 2001</b></p>
+<p>PageExecute() to implement page scrolling added. Code and idea by Iv&aacute;n Oliva.</p>
+<p>Some minor postgresql fixes.</p>
+<p>Added sequence support using GenID() for postgresql, oci8, mysql, interbase.</p>
+<p>Added UpdateBlob support for interbase (untested).</p>
+<p>Added encrypted sessions (see adodb-cryptsession.php). By Ari Kuorikoski &lt;kuoriari#finebyte.com></p>
+<p><b>1.31 21 August 2001</b></p>
+<p>Many bug fixes thanks to "GaM3R (Cameron)" &lt;gamr#outworld.cx>. Some session changes due to Gam3r.
+<p>Fixed qstr() to quote  also.
+<p>rs2html() now pretty printed.
+<p>Jonathan Younger jyounger#unilab.com contributed the great idea GetUpdateSQL() and GetInsertSQL() which
+generates SQL to update and insert into a table from a recordset. Modify the recordset fields
+array, then can this function to generate the SQL (the SQL is not executed).
+<p>"Nicola Fankhauser" &lt;nicola.fankhauser#couniq.com> found some bugs in date handling for mssql.</p>
+<p>Added minimal Oracle support for LOBs. Still under development.</p>
+Added $ADODB_FETCH_MODE so you can control whether recordsets return arrays which are
+numeric, associative or both. This is a global variable you set. Currently only MySQL, Oci8, Postgres
+drivers support this.
+<p>PostgreSQL properly closes recordsets now. Reported by several people.
+<p>
+Added UpdateBlob() for Oracle. A hack to make it easier to save blobs.
+<p>
+Oracle timestamps did not display properly. Fixed.
+<p><b>1.20 6 June 2001</b></p>
+<p>Now Oracle can connect using tnsnames.ora or server and service name</p>
+<p>Extensive Oci8 speed optimizations. 
+Oci8 code revised to support variable binding, and /*+ FIRST_ROWS */ hint.</p>
+<p>Worked around some 4.0.6 bugs in odbc_fetch_into().</p>
+<p>Paolo S. Asioli paolo.asioli#libero.it suggested GetRowAssoc().</p>
+<p>Escape quotes for oracle wrongly set to '. Now '' is used.</p>
+<p>Variable binding now works in ODBC also.</p>
+<p>Jumped to version 1.20 because I don't like 13 :-)</p>
+<p><b>1.12 6 June 2001</b></p>
+<p>Changed $ADODB_DIR to ADODB_DIR constant to plug a security loophole.</p>
+<p>Changed _close() to close persistent connections also. Prevents connection leaks.</p>
+<p>Major revision of oracle and oci8 drivers. 
+Added OCI_RETURN_NULLS and OCI_RETURN_LOBS to OCIFetchInto(). BLOB, CLOB and VARCHAR2 recognition
+in MetaType() improved. MetaColumns() returns columns in correct sort order.</p>
+<p>Interbase timestamp input format was wrong. Fixed.</p>
+<p><b>1.11 20 May 2001</b></p>
+<p>Improved file locking for Windows.</p>
+<p>Probabilistic flushing of cache to avoid avalanche updates when cache timeouts.</p>
+<p>Cached recordset timestamp not saved in some scenarios. Fixed.</p>
+<p><b>1.10 19 May 2001</b></p>
+<p>Added caching. CacheExecute() and CacheSelectLimit().
+<p>Added csv driver. See <a href="http://php.weblogs.com/adodb_csv">http://php.weblogs.com/ADODB_csv</a>. 
+<p>Fixed SelectLimit(), SELECT TOP not working under certain circumstances.
+<p>Added better Frontbase support of MetaTypes() by Frank M. Kromann.
+<p><b>1.01 24 April 2001</b></p>
+<p>Fixed SelectLimit bug.  not quoted properly.
+<p>SelectLimit: SELECT TOP -1 * FROM TABLE not support by Microsoft. Fixed.</p>
+<p>GetMenu improved by glen.davies#cce.ac.nz to support multiple hilited items<p>
+<p>FetchNextObject() did not work with only 1 record returned. Fixed bug reported by $tim#orotech.net</p>
+<p>Fixed mysql field max_length problem. Fix suggested by Jim Nicholson (jnich#att.com)</p>
+<p><b>1.00 16 April 2001</b></p>
+<p>Given some brilliant suggestions on how to simplify ADOdb by akul. You no longer need to
+setup $ADODB_DIR yourself, and ADOLoadCode() is automatically called by ADONewConnection(), 
+simplifying the startup code.</p>
+<p>FetchNextObject() added. Suggested by Jakub Marecek. This makes FetchObject() obsolete, as
+this is more flexible and powerful.</p>
+<p>Misc fixes to SelectLimit() to support Access (top must follow distinct) and Fields() 
+in the array recordset. From Reinhard Balling.</p>
+<p><b>0.96 27 Mar 2001</b></p>
+<p>ADOConnection Close() did not return a value correctly. Thanks to akul#otamedia.com.</p>
+<p>When the horrible magic_quotes is enabled, back-slash () is changed to double-backslash (\).
+This doesn't make sense for Microsoft/Sybase databases. We fix this in qstr().</p>
+<p>Fixed Sybase date problem in UnixDate() thanks to Toni Tunkkari. Also fixed MSSQL problem
+in UnixDate() - thanks to milhouse31#hotmail.com.</p>
+<p>MoveNext() moved to leaf classes for speed in MySQL/PostgreSQL. 10-15% speedup.</p>
+<p>Added null handling in bindInputArray in Execute() -- Ron Baldwin suggestion.</p>
+<p>Fixed some option tags. Thanks to john#jrmstudios.com.</p>
+<p><b>0.95 13 Mar 2001</b></p>
+<p>Added postgres7 database driver which supports LIMIT and other version 7 stuff in the future.</p>
+<p>Added SelectLimit to ADOConnection to simulate PostgreSQL's "select * from table limit 10 offset 3".
+Added helper function GetArrayLimit() to ADORecordSet.</p>
+<p>Fixed mysql metacolumns bug. Thanks to Freek Dijkstra (phpeverywhere#macfreek.com).</p>
+<p>Also many PostgreSQL changes by Freek. He almost rewrote the whole PostgreSQL driver!</p>
+<p>Added fix to input parameters in Execute for non-strings by Ron Baldwin.</p>
+<p>Added new metatype, X for TeXt. Formerly, metatype B for Blob also included
+text fields. Now 'B' is for binary/image data. 'X' for textual data.</p>
+<p>Fixed $this->GetArray() in GetRows().</p>
+<p>Oracle and OCI8: 1st parameter is always blank -- now warns if it is filled.</p>
+<p>Now <i>hasLimit</i> and <i>hasTop</i> added to indicate whether 
+SELECT * FROM TABLE LIMIT 10 or SELECT TOP 10 * FROM TABLE are supported.</p>
+<p><b>0.94 04 Feb 2001</b></p>
+<p>Added ADORecordSet::GetRows() for compatibility with Microsoft ADO. Synonym for GetArray().</p>
+<p>Added new metatype 'R' to represent autoincrement numbers.</p>
+<p>Added ADORecordSet.FetchObject() to return a row as an object.</p>
+<p>Finally got a Linux box to test PostgreSql. Many fixes.</p>
+<p>Fixed copyright misspellings in 0.93.</p>
+<p>Fixed mssql MetaColumns type bug.</p>
+<p>Worked around odbc bug in PHP4 for sessions.</p>
+<p>Fixed many documentation bugs (affected_rows, metadatabases, qstr).</p>
+<p>Fixed MySQL timestamp format (removed comma).</p>
+<p>Interbase driver did not call ibase_pconnect(). Fixed.</p>
+<p><b>0.93 18 Jan 2002</b></p>
+<p>Fixed GetMenu bug.</p>
+<p>Simplified Interbase commit and rollback.</p>
+<p>Default behaviour on closing a connection is now to rollback all active transactions.</p>
+<p>Added field object handling for array recordset for future XML compatibility.</p>
+<p>Added arr2html() to convert array to html table.</p>
+<p><b>0.92 2 Jan 2002</b></p>
+<p>Interbase Commit and Rollback should be working again.</p>
+<p>Changed initialisation of ADORecordSet. This is internal and should not affect users. We
+are doing this to support cached recordsets in the future.</p>
+
+<p>Implemented ADORecordSet_array class. This allows you to simulate a database recordset
+with an array.</p>
+<p>Added UnixDate() and UnixTimeStamp() to ADORecordSet.</p>
+<p><b>0.91 21 Dec 2000</b></p>
+<p>Fixed ODBC so ErrorMsg() is working.</p>
+<p>Worked around ADO unrecognised null (0x1) value problem in COM.</p>
+<p>Added Sybase support for FetchField() type</p>
+<p>Removed debugging code and unneeded html from various files</p>
+<p>Changed to javadoc style comments to adodb.inc.php.</p>
+<p>Added maxsql as synonym for mysqlt</p>
+<p>Now ODBC downloads first 8K of blob by default
+<p><b>0.90 15 Nov 2000</b></p>
+<p>Lots of testing of Microsoft ADO. Should be more stable now.</p>
+<p>Added $ADODB_COUNTREC. Set to false for high speed selects.</p>
+<p>Added Sybase support. Contributed by Toni Tunkkari (toni.tunkkari#finebyte.com). Bug in Sybase 
+  API: GetFields is unable to determine date types.</p>
+<p>Changed behaviour of RecordSet.GetMenu() to support size parameter (listbox) properly.</p>
+<p>Added emptyDate and emptyTimeStamp to RecordSet class that defines how to represent 
+  empty dates.</p>
+<p>Added MetaColumns($table) that returns an array of ADOFieldObject's listing 
+  the columns of a table.</p>
+<p>Added transaction support for PostgresSQL -- thanks to "Eric G. Werk" egw#netguide.dk.</p>
+<p>Added adodb-session.php for session support.</p>
+<p><b>0.80 30 Nov 2000</b></p>
+<p>Added support for charSet for interbase. Implemented MetaTables for most databases. 
+  PostgreSQL more extensively tested.</p>
+<p><b>0.71 22 Nov 2000</b></p>
+<p>Switched from using require_once to include/include_once for backward compatability with PHP 4.02 and earlier.</p>
+<p><b>0.70 15 Nov 2000</b></p>
+<p>Calls by reference have been removed (call_time_pass_reference=Off) to ensure compatibility with future versions of PHP, 
+except in Oracle 7 driver due to a bug in php_oracle.dll.</p>
+<p>PostgreSQL database driver contributed by Alberto Cerezal (acerezalp#dbnet.es). 
+</p>
+<p>Oci8 driver for Oracle 8 contributed by George Fourlanos (fou#infomap.gr).</p>
+<p>Added <i>mysqlt</i> database driver to support MySQL 3.23 which has transaction 
+ support. </p>
+<p>Oracle default date format (DD-MON-YY) did not match ADOdb default date format (which is YYYY-MM-DD). Use ALTER SESSION to force the default date.</p>
+<p>Error message checking is now included in test suite.</p>
+<p>MoveNext() did not check EOF properly -- fixed.</p>
+<p><b>0.60 Nov 8 2000</b></p>
+<p>Fixed some constructor bugs in ODBC and ADO. Added ErrorNo function to ADOConnection 
+ class. </p>
+<p><b>0.51 Oct 18 2000</b></p>
+<p>Fixed some interbase bugs.</p>
+<p><b>0.50 Oct 16 2000</b></p>
+<p>Interbase commit/rollback changed to be compatible with PHP 4.03. </p>
+<p>CommitTrans( ) will now return true if transactions not supported. </p>
+<p>Conversely RollbackTrans( ) will return false if transactions not supported. 
+</p>
+<p><b>0.46 Oct 12</b></p>
+Many Oracle compatibility issues fixed. 
+<p><b>0.40 Sept 26</b></p>
+<p>Many bug fixes</p>
+<p>Now Code for BeginTrans, CommitTrans and RollbackTrans is working. So is the Affected_Rows
+and Insert_ID. Added above functions to test.php.</p>
+<p>ADO type handling was busted in 0.30. Fixed.</p>
+<p>Generalised Move( ) so it works will all databases, including ODBC.</p>
+<p><b>0.30 Sept 18</b></p>
+<p>Renamed ADOLoadDB to ADOLoadCode. This is clearer.</p>
+<p>Added BeginTrans, CommitTrans and RollbackTrans functions.</p>
+<p>Added Affected_Rows() and Insert_ID(), _affectedrows() and _insertID(), ListTables(), 
+ ListDatabases(), ListColumns().</p>
+<p>Need to add New_ID() and hasInsertID and hasAffectedRows, autoCommit </p>
+<p><b>0.20 Sept 12</b></p>
+<p>Added support for Microsoft's ADO.</p>
+<p>Added new field to ADORecordSet -- canSeek</p>
+<p>Added new parameter to _fetch($ignore_fields = false). Setting to true will 
+ not update fields array for faster performance.</p>
+<p>Added new field to ADORecordSet/ADOConnection -- dataProvider to indicate whether 
+ a class is derived from odbc or ado.</p>
+<p>Changed class ODBCFieldObject to ADOFieldObject -- not documented currently.</p>
+<p>Added benchmark.php and testdatabases.inc.php to the test suite.</p>
+<p>Added to ADORecordSet FastForward( ) for future high speed scrolling. Not documented.</p>
+<p>Realised that ADO's Move( ) uses relative positioning. ADOdb uses absolute. 
+</p>
+<p><b>0.10 Sept 9 2000</b></p>
+<p>First release</p>
+</body></html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/readme.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/readme.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/readme.htm	(revision 225)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<title>ADODB Manual</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<XSTYLE
+	body,td {font-family:Arial,Helvetica,sans-serif;font-size:11pt}
+	pre {font-size:9pt}
+	.toplink {font-size:8pt}
+	/>
+</head>	
+<body bgcolor="#FFFFFF">
+
+<h3>ADOdb Library for PHP</h3>
+<p>ADOdb is a suite of database libraries that allow you to connect to multiple 
+	databases in a portable manner. Download from <a href=http://adodb.sourceforge.net/>http://adodb.sourceforge.net/</a>.
+<ul><li>The ADOdb documentation has moved to <a href=docs-adodb.htm>docs-adodb.htm</a> 
+	This allows you to query, update and insert records using a portable API.
+<p><li>The ADOdb data dictionary docs are at <a href=docs-datadict.htm>docs-datadict.htm</a>. 
+	This allows you to create database tables and indexes in a portable manner.
+<p><li>The ADOdb database performance monitoring docs are at <a href=docs-perf.htm>docs-perf.htm</a>. 
+	This allows you to perform health checks, tune and monitor your database.
+<p><li>The ADOdb database-backed session docs are at <a href=docs-session.htm>docs-session.htm</a>. 
+</ul>
+<p>
+<h3>Installation</h3>
+Make sure you are running PHP4.0.4 or later. Unpack all the files into a directory accessible by your webserver.
+<p>
+To test, try modifying some of the tutorial examples. Make sure you customize the connection settings correctly. You can debug using:
+<pre>
+&lt;?php
+include('adodb/adodb.inc.php');
+
+$db = <b>ADONewConnection</b>($driver); # eg. 'mysql' or 'oci8' 
+$db->debug = true;
+$db-><b>Connect</b>($server, $user, $password, $database);
+$rs = $db-><b>Execute</b>('select * from some_small_table');
+print "&lt;pre>";
+print_r($rs-><b>GetRows</b>());
+print "&lt;/pre>";
+?>
+</pre>
+<h3>How are people using ADOdb</h3>
+Here are some examples of how people are using ADOdb: 
+<ul>
+	<li> <strong>PhpLens</strong> is a commercial data grid component that allows 
+		both cool Web designers and serious unshaved programmers to develop and 
+		maintain databases on the Web easily. Developed by the author of ADOdb. 
+	</li>
+	<li> <strong>PHAkt</strong>: PHP Extension for DreamWeaver Ultradev allows 
+		you to script PHP in the popular Web page editor. Database handling provided 
+		by ADOdb. </li>
+	<li> <strong>Analysis Console for Intrusion Databases (ACID)</strong>: PHP-based 
+		analysis engine to search and process a database of security incidents 
+		generated by security-related software such as IDSes and firewalls (e.g. 
+		Snort, ipchains). By Roman Danyliw. </li>
+	<li> <strong>PostNuke</strong> is a very popular free content management system 
+		and weblog system. It offers full CSS support, HTML 4.01 transitional 
+		compliance throughout, an advanced blocks system, and is fully multi-lingual 
+		enabled. </li>
+	<li><strong> EasyPublish CMS</strong> is another free content management system 
+		for managing information and integrated modules on your internet, intranet- 
+		and extranet-sites. From Norway. </li>
+	<li> <strong>NOLA</strong> is a full featured accounting, inventory, and job 
+		tracking application. It is licensed under the GPL, and developed by Noguska. 
+	</li>
+</ul>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/tips_portable_sql.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/tips_portable_sql.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/tips_portable_sql.htm	(revision 225)
@@ -0,0 +1,367 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<title>Tips on Writing Portable SQL for Multiple Databases for PHP</title>
+</head>
+
+<body bgcolor=white>
+<table width=100% border=0><tr><td><h2>Tips on Writing Portable SQL &nbsp;</h2></td><td>
+ <div align=right><img src="cute_icons_for_site/adodb.gif"></div></td></tr></table>
+  <p>Updated 6 Oct 2006. Added OffsetDate example.
+  <p>Updated 18 Sep 2003. Added Portable Native SQL section.
+<p>
+
+ If you are writing an application that is used in multiple environments and 
+  operating systems, you need to plan to support multiple databases. This article 
+  is based on my experiences with multiple database systems, stretching from 4th 
+  Dimension in my Mac days, to the databases I currently use, which are: Oracle, 
+  FoxPro, Access, MS SQL Server and MySQL. Although most of the advice here applies 
+  to using SQL with Perl, Python and other programming languages, I will focus on PHP and how 
+  the <a href="http://adodb.sourceforge.net/">ADOdb</a> database abstraction library 
+  offers some solutions.<p></p>
+<p>Most database vendors practice product lock-in. The best or fastest way to 
+  do things is often implemented using proprietary extensions to SQL. This makes 
+  it extremely hard to write portable SQL code that performs well under all conditions. 
+  When the first ANSI committee got together in 1984 to standardize SQL, the database 
+  vendors had such different implementations that they could only agree on the 
+  core functionality of SQL. Many important application specific requirements 
+  were not standardized, and after so many years since the ANSI effort began, 
+  it looks as if much useful database functionality will never be standardized. 
+  Even though ANSI-92 SQL has codified much more, we still have to implement portability 
+  at the application level.</p>
+<h3><b>Selects</b></h3>
+<p>The SELECT statement has been standardized to a great degree. Nearly every 
+  database supports the following:</p>
+<p>SELECT [cols] FROM [tables]<br>
+  &nbsp;&nbsp;[WHERE conditions]<br>
+  &nbsp; [GROUP BY cols]<br>
+  &nbsp; [HAVING conditions] <br>
+  &nbsp; [ORDER BY cols]</p>
+<p>But so many useful techniques can only be implemented by using proprietary 
+  extensions. For example, when writing SQL to retrieve the first 10 rows for 
+  paging, you could write...</p>
+<table width="80%" border="1" cellspacing="0" cellpadding="0" align="center">
+  <tr> 
+	<td><b>Database</b></td>
+	<td><b>SQL Syntax</b></td>
+  </tr>
+  <tr> 
+	<td>DB2</td>
+	<td>select * from table fetch first 10 rows only</td>
+  </tr>
+  <tr> 
+	<td>Informix</td>
+	<td>select first 10 * from table</td>
+  </tr>
+  <tr> 
+	<td>Microsoft SQL Server and Access</td>
+	<td>select top 10 * from table</td>
+  </tr>
+  <tr> 
+	<td>MySQL and PostgreSQL</td>
+	<td>select * from table limit 10</td>
+  </tr>
+  <tr> 
+	<td>Oracle 8i</td>
+	<td>select * from (select * from table) where rownum &lt;= 10</td>
+  </tr>
+</table>
+<p>This feature of getting a subset of data is so useful that in the PHP class 
+  library ADOdb, we have a SelectLimit( ) function that allows you to hide the 
+  implementation details within a function that will rewrite your SQL for you:</p>
+<pre>$connection-&gt;SelectLimit('select * from table', 10);
+</pre>
+<p><b>Selects: Fetch Modes</b></p>
+<p>PHP allows you to retrieve database records as arrays. You can choose to have 
+  the arrays indexed by field name or number. However different low-level PHP 
+  database drivers are inconsistent in their indexing efforts. ADOdb allows you 
+  to determine your prefered mode. You set this by setting the variable $ADODB_FETCH_MODE 
+  to either of the constants ADODB_FETCH_NUM (for numeric indexes) or ADODB_FETCH_ASSOC 
+  (using field names as an associative index).</p>
+<p>The default behaviour of ADOdb varies depending on the database you are using. 
+  For consistency, set the fetch mode to either ADODB_FETCH_NUM (for speed) or 
+  ADODB_FETCH_ASSOC (for convenience) at the beginning of your code. </p>
+<p><b>Selects: Counting Records</b></p>
+<p>Another problem with SELECTs is that some databases do not return the number 
+  of rows retrieved from a select statement. This is because the highest performance 
+  databases will return records to you even before the last record has been found. 
+</p>
+<p>In ADOdb, RecordCount( ) returns the number of rows returned, or will emulate 
+  it by buffering the rows and returning the count after all rows have been returned. 
+  This can be disabled for performance reasons when retrieving large recordsets 
+  by setting the global variable $ADODB_COUNTRECS = false. This variable is checked 
+  every time a query is executed, so you can selectively choose which recordsets 
+  to count.</p>
+<p>If you prefer to set $ADODB_COUNTRECS = false, ADOdb still has the PO_RecordCount( 
+  ) function. This will return the number of rows, or if it is not found, it will 
+  return an estimate using SELECT COUNT(*):</p>
+<pre>$rs = $db-&gt;Execute(&quot;select * from table where state=$state&quot;);
+$numrows = $rs-&gt;PO_RecordCount('table', &quot;state=$state&quot;);</pre>
+<p><b>Selects: Locking</b> </p>
+<p>SELECT statements are commonly used to implement row-level locking of tables. 
+  Other databases such as Oracle, Interbase, PostgreSQL and MySQL with InnoDB 
+  do not require row-level locking because they use versioning to display data 
+  consistent with a specific point in time.</p>
+<p>Currently, I recommend encapsulating the row-level locking in a separate function, 
+  such as RowLock($table, $where):</p>
+<pre>$connection-&gt;BeginTrans( );
+$connection-&gt;RowLock($table, $where); </pre>
+<pre><font color=green># some operation</font></pre>
+<pre>if ($ok) $connection-&gt;CommitTrans( );
+else $connection-&gt;RollbackTrans( );
+</pre>
+<p><b>Selects: Outer Joins</b></p>
+<p>Not all databases support outer joins. Furthermore the syntax for outer joins 
+  differs dramatically between database vendors. One portable (and possibly slower) 
+  method of implementing outer joins is using UNION.</p>
+<p>For example, an ANSI-92 left outer join between two tables t1 and t2 could 
+  look like:</p>
+<pre>SELECT t1.col1, t1.col2, t2.cola <br>  FROM t1 <i>LEFT JOIN</i> t2 ON t1.col = t2.col</pre>
+<p>This can be emulated using:</p>
+<pre>SELECT t1.col1, t1.col2, t2.cola FROM t1, t2 <br>	   WHERE t1.col = t2.col 
+   UNION ALL
+SELECT col1, col2, null FROM t1 <br>	   WHERE t1.col not in (select distinct col from t2)
+</pre>
+<p>Since ADOdb 2.13, we provide some hints in the connection object as to legal 
+  join variations. This is still incomplete and sometimes depends on the database 
+  version you are using, but is useful as a general guideline:</p>
+<p><font face="Courier New, Courier, mono">$conn-&gt;leftOuter</font>: holds the 
+  operator used for left outer joins (eg. '*='), or false if not known or not 
+  available.<br>
+  <font face="Courier New, Courier, mono">$conn-&gt;rightOuter</font>: holds the 
+  operator used for right outer joins (eg '=*'), or false if not known or not 
+  available.<br>
+  <font face="Courier New, Courier, mono">$conn-&gt;ansiOuter</font>: boolean 
+  that if true means that ANSI-92 style outer joins are supported, or false if 
+  not known.</p>
+<h3><b>Inserts</b> </h3>
+<p>When you create records, you need to generate unique id's for each record. 
+  There are two common techniques: (1) auto-incrementing columns and (2) sequences. 
+</p>
+<p>Auto-incrementing columns are supported by MySQL, Sybase and Microsoft Access 
+  and SQL Server. However most other databases do not support this feature. So 
+  for portability, you have little choice but to use sequences. Sequences are 
+  special functions that return a unique incrementing number every time you call 
+  it, suitable to be used as database keys. In ADOdb, we use the GenID( ) function. 
+  It has takes a parameter, the sequence name. Different tables can have different 
+  sequences. </p>
+<pre>$id = $connection-&gt;GenID('sequence_name');<br>$connection-&gt;Execute(&quot;insert into table (id, firstname, lastname) <br>			   values ($id, $firstname, $lastname)&quot;);</pre>
+<p>For databases that do not support sequences natively, ADOdb emulates sequences 
+  by creating a table for every sequence.</p>
+<h3><b>Binding</b></h3>
+<p>Binding variables in an SQL statement is another tricky feature. Binding is 
+  useful because it allows pre-compilation of SQL. When inserting multiple records 
+  into a database in a loop, binding can offer a 50% (or greater) speedup. However 
+  many databases such as Access and MySQL do not support binding natively and 
+  there is some overhead in emulating binding. Furthermore, different databases 
+  (specificly Oracle!) implement binding differently. My recommendation is to 
+  use binding if your database queries are too slow, but make sure you are using 
+  a database that supports it like Oracle. </p>
+<p>ADOdb supports portable Prepare/Execute with:</p>
+<pre>$stmt = $db-&gt;Prepare('select * from customers where custid=? and state=?');
+$rs = $db-&gt;Execute($stmt, array($id,'New York'));</pre>
+<p>Oracle uses named bind placeholders, not "?", so to support portable binding, we have Param() that generates 
+the correct placeholder (available since ADOdb 3.92):
+<pre><font color="#000000">$sql = <font color="#993300">'insert into table (col1,col2) values ('</font>.$DB-&gt;Param('a').<font color="#993300">','</font>.$DB-&gt;Param('b').<font color="#993300">')'</font>;
+<font color="#006600"># generates 'insert into table (col1,col2) values (?,?)'
+# or        'insert into table (col1,col2) values (:a,:b)</font>'
+$stmt = $DB-&gt;Prepare($sql);
+$stmt = $DB-&gt;Execute($stmt,array('one','two'));
+</font></pre>
+<a name="native"></a>
+<h2>Portable Native SQL</h2>
+<p>ADOdb provides the following functions for portably generating SQL functions 
+  as strings to be merged into your SQL statements (some are only available since 
+  ADOdb 3.92): </p>
+<table width="75%" border="1" align=center>
+  <tr> 
+    <td width=30%><b>Function</b></td>
+    <td><b>Description</b></td>
+  </tr>
+  <tr> 
+    <td>DBDate($date)</td>
+    <td>Pass in a UNIX timestamp or ISO date and it will convert it to a date 
+      string formatted for INSERT/UPDATE</td>
+  </tr>
+  <tr> 
+    <td>DBTimeStamp($date)</td>
+    <td>Pass in a UNIX timestamp or ISO date and it will convert it to a timestamp 
+      string formatted for INSERT/UPDATE</td>
+  </tr>
+  <tr> 
+    <td>SQLDate($date, $fmt)</td>
+    <td>Portably generate a date formatted using $fmt mask, for use in SELECT 
+      statements.</td>
+  </tr>
+  <tr> 
+    <td>OffsetDate($date, $ndays)</td>
+    <td>Portably generate a $date offset by $ndays.</td>
+  </tr>
+  <tr> 
+    <td>Concat($s1, $s2, ...)</td>
+    <td>Portably concatenate strings. Alternatively, for mssql use mssqlpo driver, 
+      which allows || operator.</td>
+  </tr>
+  <tr> 
+    <td>IfNull($fld, $replaceNull)</td>
+    <td>Returns a string that is the equivalent of MySQL IFNULL or Oracle NVL.</td>
+  </tr>
+  <tr>
+    <td>Param($name)</td>
+    <td>Generates bind placeholders, using ? or named conventions as appropriate.</td>
+  </tr>
+  <tr><td>$db->sysDate</td><td>Property that holds the SQL function that returns today's date</td>
+</tr>
+<tr><td>$db->sysTimeStamp</td><td>Property that holds the SQL function that returns the current
+timestamp (date+time).
+</td>
+</tr>
+<tr>
+<td>$db->concat_operator</td><td>Property that holds the concatenation operator
+</td>
+</tr>
+<tr><td>$db->length</td><td>Property that holds the name of the SQL strlen function.
+</td></tr>
+
+<tr><td>$db->upperCase</td><td>Property that holds the name of the SQL strtoupper function.
+</td></tr>
+<tr><td>$db->random</td><td>Property that holds the SQL to generate a random number between 0.00 and 1.00.
+</td>
+</tr>
+<tr><td>$db->substr</td><td>Property that holds the name of the SQL substring function.
+</td></tr>
+</table>
+<p>&nbsp; </p>
+<h2>DDL and Tuning</h2>
+There are database design tools such as ERWin or Dezign that allow you to generate data definition language commands such as ALTER TABLE or CREATE INDEX from Entity-Relationship diagrams. 
+<p>
+However if you prefer to use a PHP-based table creation scheme, adodb provides you with this feature. Here is the code to generate the SQL to create a table with: 
+<ol>
+	<li> Auto-increment primary key 'ID', </li>
+	<li>The person's 'NAME' VARCHAR(32) NOT NULL and defaults to '', </li>
+	<li>The date and time of record creation 'CREATED', </li>
+	<li> The person's 'AGE', defaulting to 0, type NUMERIC(16). </li>
+</ol>
+<p>
+Also create a compound index consisting of 'NAME' and 'AGE': 
+<pre>
+$datadict = <strong>NewDataDictionary</strong>($connection);
+$flds = " 
+<font color="#660000">  ID I AUTOINCREMENT PRIMARY,
+  NAME C(32) DEFAULT '' NOTNULL,
+  CREATED T DEFTIMESTAMP,
+  AGE N(16) DEFAULT 0</font>
+";
+$sql1 = $datadict-><strong>CreateTableSQL</strong>('tabname', $flds);
+$sql2 = $datadict-><strong>CreateIndexSQL</strong>('idx_name_age', 'tabname', 'NAME,AGE');
+</pre>
+
+<h3>Data Types</h3>
+<p>Stick to a few data types that are available in most databases. Char, varchar 
+  and numeric/number are supported by most databases. Most other data types (including 
+  integer, boolean and float) cannot be relied on being available. I recommend 
+  using char(1) or number(1) to hold booleans. </p>
+<p>Different databases have different ways of representing dates and timestamps/datetime. 
+  ADOdb attempts to display all dates in ISO (YYYY-MM-DD) format. ADOdb also provides 
+  DBDate( ) and DBTimeStamp( ) to convert dates to formats that are acceptable 
+  to that database. Both functions accept Unix integer timestamps and date strings 
+  in ISO format.</p>
+<pre>$date1 = $connection-&gt;DBDate(time( ));<br>$date2 = $connection-&gt;DBTimeStamp('2002-02-23 13:03:33');</pre>
+<p>We also provide functions to convert database dates to Unix timestamps:</p>
+<pre>$unixts = $recordset-&gt;UnixDate('#2002-02-30#'); <font color="green"># MS Access date =&gt; unix timestamp</font></pre>
+<p>For date calculations, we have OffsetDate which allows you to calculate dates such as <i>yesterday</i> and <i>next week</i> in a RDBMS independant fashion. For example, if we want to set a field to 6 hour from now, use:
+<pre>
+$sql = 'update table set dtimefld='.$db-&gt;OffsetDate($db-&gtsysTimeStamp, 6/24).' where ...';
+</pre>
+<p>The maximum length of a char/varchar field is also database specific. You can 
+  only assume that field lengths of up to 250 characters are supported. This is 
+  normally impractical for web based forum or content management systems. You 
+  will need to be familiar with how databases handle large objects (LOBs). ADOdb 
+  implements two functions, UpdateBlob( ) and UpdateClob( ) that allow you to 
+  update fields holding Binary Large Objects (eg. pictures) and Character Large 
+  Objects (eg. HTML articles):</p>
+<pre><font color=green># for oracle </font>
+$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1,empty_blob())'); 
+$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1'); 
+   
+<font color=green># non-oracle databases</font>
+$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)'); 
+$conn->UpdateBlob('blobtable','blobcol',$blobvalue,'id=1');
+</pre>
+<p>Null handling is another area where differences can occur. This is a mine-field, 
+  because 3-value logic is tricky.
+<p>In general, I avoid using nulls except for dates and default all my numeric 
+  and character fields to 0 or the empty string. This maintains consistency with 
+  PHP, where empty strings and zero are treated as equivalent, and avoids SQL 
+  ambiguities when you use the ANY and EXISTS operators. However if your database 
+  has significant amounts of missing or unknown data, using nulls might be a good 
+  idea. 
+  <p>
+  ADOdb also supports a portable <a href=http://phplens.com/adodb/reference.functions.concat.html#ifnull>IfNull</a> function, so you can define what to display
+  if the field contains a null.
+<h3><b>Stored Procedures</b></h3>
+<p>Stored procedures are another problem area. Some databases allow recordsets 
+  to be returned in a stored procedure (Microsoft SQL Server and Sybase), and 
+  others only allow output parameters to be returned. Stored procedures sometimes 
+  need to be wrapped in special syntax. For example, Oracle requires such code 
+  to be wrapped in an anonymous block with BEGIN and END. Also internal sql operators 
+  and functions such as +, ||, TRIM( ), SUBSTR( ) or INSTR( ) vary between vendors. 
+</p>
+<p>An example of how to call a stored procedure with 2 parameters and 1 return 
+  value follows:</p>
+<pre>	switch ($db->databaseType) {
+	case '<font color="#993300">mssql</font>':
+	  $sql = <font color="#000000"><font color="#993333">'<font color="#993300">SP_RUNSOMETHING</font>'</font></font>; break;
+	case '<font color="#993300">oci8</font>':
+	  $sql = 
+<font color="#993300">	  </font><font color="#000000"><font color="#993300">&quot;declare RETVAL integer;begin :RETVAL := </font><font color="#000000"><font color="#993333"><font color="#993300">SP_RUNSOMETHING</font></font></font><font color="#993300">(:myid,:group);end;&quot;;
+</font>	  break;</font>
+	default:
+	  die('<font color="#993300">Unsupported feature</font>');
+	}
+<font color="#000000"><font color="green">	# @RETVAL = SP_RUNSOMETHING @myid,@group</font>
+	$stmt = $db-&gt;PrepareSP($sql);	<br>	$db-&gt;Parameter($stmt,$id,'<font color="#993300">myid</font>'); 
+	$db-&gt;Parameter($stmt,$group,'<font color="#993300">group</font>');
+	<font color="green"># true indicates output parameter<br>	</font>$db-&gt;Parameter($stmt,$ret,'<font color="#993300">RETVAL</font>',true); 
+	$db-&gt;Execute($stmt); </font></pre>
+<p>As you can see, the ADOdb API is the same for both databases. But the stored 
+  procedure SQL syntax is quite different between databases and is not portable, 
+  so be forewarned! However sometimes you have little choice as some systems only 
+  allow data to be accessed via stored procedures. This is when the ultimate portability 
+  solution might be the only solution: <i>treating portable SQL as a localization 
+  exercise...</i></p>
+<h3><b>SQL as a Localization Exercise</b></h3>
+<p> In general to provide real portability, you will have to treat SQL coding 
+  as a localization exercise. In PHP, it has become common to define separate 
+  language files for English, Russian, Korean, etc. Similarly, I would suggest 
+  you have separate Sybase, Intebase, MySQL, etc files, and conditionally include 
+  the SQL based on the database. For example, each MySQL SQL statement would be 
+  stored in a separate variable, in a file called 'mysql-lang.inc.php'.</p>
+<pre>$sqlGetPassword = '<font color="#993300">select password from users where userid=%s</font>';
+$sqlSearchKeyword = &quot;<font color="#993300">SELECT * FROM articles WHERE match (title,body) against (%s</font>)&quot;;</pre>
+<p>In our main PHP file:</p>
+<pre><font color=green># define which database to load...</font>
+<b>$database = '<font color="#993300">mysql</font>';
+include_once(&quot;<font color="#993300">$database-lang.inc.php</font>&quot;);</b>
+
+$db = &amp;NewADOConnection($database);
+$db->PConnect(...) or die('<font color="#993300">Failed to connect to database</font>');
+
+<font color=green># search for a keyword $word</font>
+$rs = $db-&gt;Execute(sprintf($sqlSearchKeyWord,$db-&gt;qstr($word)));</pre>
+<p>Note that we quote the $word variable using the qstr( ) function. This is because 
+  each database quotes strings using different conventions.</p>
+<p>
+<h3>Final Thoughts</h3>
+<p>The best way to ensure that you have portable SQL is to have your data tables designed using 
+sound principles. Learn the theory of normalization and entity-relationship diagrams and model 
+your data carefully. Understand how joins and indexes work and how they are used to tune performance.
+<p> Visit the following page for more references on database theory and vendors: 
+  <a href="http://php.weblogs.com/sql_tutorial">http://php.weblogs.com/sql_tutorial</a>. 
+  Also read this article on <a href=http://phplens.com/lens/php-book/optimizing-debugging-php.php>Optimizing PHP</a>.
+<p>
+<font size=1>(c) 2002-2003 John Lim.</font>
+
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/docs/tute.htm
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/docs/tute.htm	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/docs/tute.htm	(revision 225)
@@ -0,0 +1,290 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<title>Tutorial: Moving from MySQL to ADODB</title>
+</head>
+
+<body bgcolor=white>
+<h1>Tutorial: Moving from MySQL to ADODB</h1>
+
+<pre>		You say eether and I say eyether, 
+		You say neether and I say nyther; 
+		Eether, eyether, neether, nyther - 
+		Let's call the whole thing off ! 
+<br>
+		You like potato and I like po-tah-to, 
+		You like tomato and I like to-mah-to; 
+		Potato, po-tah-to, tomato, to-mah-to - 
+		Let's call the whole thing off ! 
+</pre>
+<p>I love this song, especially the version with Louis Armstrong and Ella singing 
+  duet. It is all about how hard it is for two people in love to be compatible 
+  with each other. It's about compromise and finding a common ground, and that's 
+  what this article is all about. 
+<p>PHP is all about creating dynamic web-sites with the least fuss and the most 
+  fun. To create these websites we need to use databases to retrieve login information, 
+  to splash dynamic news onto the web page and store forum postings. So let's 
+  say we were using the popular MySQL database for this. Your company has done 
+  such a fantastic job that the Web site is more popular than your wildest dreams. 
+  You find that MySQL cannot scale to handle the workload; time to switch databases. 
+<p> Unfortunately in PHP every database is accessed slightly differently. To connect 
+  to MySQL, you would use <i>mysql_connect()</i>; when you decide to upgrade to 
+  Oracle or Microsoft SQL Server, you would use <i>ocilogon() </i>or <i>mssql_connect()</i> 
+  respectively. What is worse is that the parameters you use for the different 
+  connect functions are different also.. One database says po-tato, the other 
+  database says pota-to. Oh-oh. 
+<h3>Let's NOT call the whole thing off</h3>
+<p>A database wrapper library such as ADODB comes in handy when you need to ensure portability. It provides 
+  you with a common API to communicate with any supported database so you don't have to call things off. <p>
+
+<p>ADODB stands for Active Data Objects DataBase (sorry computer guys are sometimes 
+  not very original). ADODB currently supports MySQL, PostgreSQL, Oracle, Interbase, 
+  Microsoft SQL Server, Access, FoxPro, Sybase, ODBC and ADO. You can download 
+  ADODB from <a href=http://php.weblogs.com/adodb></a><a href="http://php.weblogs.com/adodb">http://php.weblogs.com/adodb</a>.
+<h3>MySQL Example</h3>
+<p>The most common database used with PHP is MySQL, so I guess you should be familiar 
+  with the following code. It connects to a MySQL server at <i>localhost</i>, 
+  database <i>mydb</i>, and executes an SQL select statement. The results are 
+  printed, one line per row. 
+<pre><font color="#666600">$db = <b>mysql_connect</b>(&quot;localhost&quot;, &quot;root&quot;, &quot;password&quot;);
+<b>mysql_select_db</b>(&quot;mydb&quot;,$db);</font>
+<font color="#660000">$result = <b>mysql_query</b>(&quot;SELECT * FROM employees&quot;,$db)</font><code><font color="#663300">;
+if ($result === false) die(&quot;failed&quot;);</font></code> 
+<font color="#006666"><b>while</b> ($fields =<b> mysql_fetch_row</b>($result)) &#123;
+ <b>for</b> ($i=0, $max=sizeof($fields); $i &lt; $max; $i++) &#123;
+		<b>print</b> $fields[$i].' ';
+ &#125;
+ <b>print</b> &quot;&lt;br&gt;\n&quot;;
+&#125;</font> 
+</pre>
+<p>The above code has been color-coded by section. The first section is the connection 
+  phase. The second is the execution of the SQL, and the last section is displaying 
+  the fields. The <i>while</i> loop scans the rows of the result, while the <i>for</i> 
+  loop scans the fields in one row.</p>
+<p>Here is the equivalent code in ADODB</p>
+<pre><b><font color="#666600"> include(&quot;adodb.inc.php&quot;);</font></b><font color="#666600">
+ $db = <b>NewADOConnection</b>('mysql');
+ $db-&gt;<b>Connect</b>(&quot;localhost&quot;, &quot;root&quot;, &quot;password&quot;, &quot;mydb&quot;);</font>
+ <font color="#663300">$result = $db-&gt;<b>Execute</b>(&quot;SELECT * FROM employees&quot;);
+ </font><font color="#663300"></font><code><font color="#663300">if ($result === false) die(&quot;failed&quot;)</font></code><code><font color="#663300">;</font></code>  
+ <font color="#006666"><b>while</b> (!$result-&gt;EOF) &#123;
+	<b>for</b> ($i=0, $max=$result-&gt;<b>FieldCount</b>(); $i &lt; $max; $i++)
+		   <b>print</b> $result-&gt;fields[$i].' ';
+	$result-&gt;<b>MoveNext</b>();
+	<b>print</b> &quot;&lt;br&gt;\n&quot;;
+ &#125;</font> </pre>
+<p></p>
+<p>Now porting to Oracle is as simple as changing the second line to <code>NewADOConnection('oracle')</code>. 
+  Let's walk through the code...</p>
+<h3>Connecting to the Database</h3>
+<p></p>
+<pre><b><font color="#666600">include(&quot;adodb.inc.php&quot;);</font></b><font color="#666600">
+$db = <b>NewADOConnection</b>('mysql');
+$db-&gt;<b>Connect</b>(&quot;localhost&quot;, &quot;root&quot;, &quot;password&quot;, &quot;mydb&quot;);</font></pre>
+<p>The connection code is a bit more sophisticated than MySQL's because our needs 
+  are more sophisticated. In ADODB, we use an object-oriented approach to managing 
+  the complexity of handling multiple databases. We have different classes to 
+  handle different databases. If you aren't familiar with object-oriented programing, 
+  don't worry -- the complexity is all hidden away in the<code> NewADOConnection()</code> 
+  function.</p>
+<p>To conserve memory, we only load the PHP code specific to the database you 
+  are connecting to. We do this by calling <code>NewADOConnection(databasedriver)</code>. 
+  Legal database drivers include <i>mysql, mssql, oracle, oci8, postgres, sybase, 
+  vfp, access, ibase </i>and many others.</p>
+<p>Then we create a new instance of the connection class by calling <code>NewADOConnection()</code>. 
+  Finally we connect to the database using <code>$db-&gt;Connect(). </code></p>
+<h3>Executing the SQL</h3>
+<p><code><font color="#663300">$result = $db-&gt;<b>Execute</b>(&quot;SELECT * 
+  FROM employees&quot;);<br>
+  if ($result === false) die(&quot;failed&quot;)</font></code><code><font color="#663300">;</font></code> 
+  <br>
+</p>
+<p>Sending the SQL statement to the server is straight forward. Execute() will 
+  return a recordset object on successful execution. You should check $result 
+  as we do above.
+<p>An issue that confuses beginners is the fact that we have two types of objects 
+  in ADODB, the connection object and the recordset object. When do we use each?
+<p>The connection object ($db) is responsible for connecting to the database, 
+  formatting your SQL and querying the database server. The recordset object ($result) 
+  is responsible for retrieving the results and formatting the reply as text or 
+  as an array.
+<p>The only thing I need to add is that ADODB provides several helper functions 
+  for making INSERT and UPDATE statements easier, which we will cover in the Advanced 
+  section. 
+<h3>Retrieving the Data<br>
+</h3>
+<pre><font color="#006666"><b>while</b> (!$result-&gt;EOF) &#123;
+   <b>for</b> ($i=0, $max=$result-&gt;<b>FieldCount</b>(); $i &lt; $max; $i++)
+	   <b>print</b> $result-&gt;fields[$i].' ';
+   $result-&gt;<b>MoveNext</b>();
+   <b>print</b> &quot;&lt;br&gt;\n&quot;;
+&#125;</font></pre>
+<p>The paradigm for getting the data is that it's like reading a file. For every 
+  line, we check first whether we have reached the end-of-file (EOF). While not 
+  end-of-file, loop through each field in the row. Then move to the next line 
+  (MoveNext) and repeat. 
+<p>The <code>$result-&gt;fields[]</code> array is generated by the PHP database 
+  extension. Some database extensions do not index the array by field name. 
+  To force indexing by name - that is associative arrays - 
+  use the $ADODB_FETCH_MODE global variable. 
+<pre>
+	$<b>ADODB_FETCH_MODE</b> = ADODB_FETCH_NUM;
+	$rs1 = $db->Execute('select * from table');
+	$<b>ADODB_FETCH_MODE</b> = ADODB_FETCH_ASSOC;
+	$rs2 = $db->Execute('select * from table');
+	print_r($rs1->fields); // shows <i>array([0]=>'v0',[1] =>'v1')</i>
+	print_r($rs2->fields); // shows <i>array(['col1']=>'v0',['col2'] =>'v1')</i>
+</pre>
+<p>
+As you can see in the above example, both recordsets store and use different fetch modes
+based on the $ADODB_FETCH_MODE setting when the recordset was created by Execute().</p>
+<h2>ADOConnection<a name="ADOConnection"></a></h2>
+<p>Object that performs the connection to the database, executes SQL statements 
+  and has a set of utility functions for standardising the format of SQL statements 
+  for issues such as concatenation and date formats.</p>
+  
+<h3>Other Useful Functions</h3>
+<p><code>$recordset-&gt;Move($pos)</code> scrolls to that particular row. ADODB supports forward 
+  scrolling for all databases. Some databases will not support backwards scrolling. 
+  This is normally not a problem as you can always cache records to simulate backwards 
+  scrolling. 
+<p><code>$recordset-&gt;RecordCount()</code> returns the number of records accessed by the 
+  SQL statement. Some databases will return -1 because it is not supported. 
+<p><code>$recordset-&gt;GetArray()</code> returns the result as an array. 
+<p><code>rs2html($recordset)</code> is a function that is generates a HTML table based on the 
+  $recordset passed to it. An example with the relevant lines in bold:
+<pre>   include('adodb.inc.php'); 
+   <b>include('tohtml.inc.php');</b> /* includes the rs2html function */
+   $conn = &amp;ADONewConnection('mysql'); 
+   $conn-&gt;PConnect('localhost','userid','password','database');
+   $rs = $conn-&gt;Execute('select * from table');
+  <b> rs2html($rs)</b>; /* recordset to html table */ </pre>
+<p>There are many other helper functions that are listed in the documentation available at <a href="http://php.weblogs.com/adodb_manual"></a><a href="http://php.weblogs.com/adodb_manual">http://php.weblogs.com/adodb_manual</a>. 
+<h2>Advanced Material</h2>
+<h3>Inserts and Updates </h3>
+<p>Let's say you want to insert the following data into a database. 
+<p><b>ID</b> = 3<br>
+  <b>TheDate</b>=mktime(0,0,0,8,31,2001) /* 31st August 2001 */<br>
+  <b>Note</b>= sugar why don't we call it off 
+<p>When you move to another database, your insert might no longer work.</p>
+<p>The first problem is that each database has a different default date format. 
+  MySQL expects YYYY-MM-DD format, while other databases have different defaults. 
+  ADODB has a function called DBDate() that addresses this issue by converting 
+  converting the date to the correct format.</p>
+<p>The next problem is that the <b>don't</b> in the Note needs to be quoted. In 
+  MySQL, we use <b>don\'t</b> but in some other databases (Sybase, Access, Microsoft 
+  SQL Server) we use <b>don''t. </b>The qstr() function addresses this issue.</p>
+<p>So how do we use the functions? Like this:</p>
+<pre>$sql = &quot;INSERT INTO table (id, thedate,note) values (&quot; 
+   . $<b>ID</b> . ','
+   . $db-&gt;DBDate($<b>TheDate</b>) .','
+   . $db-&gt;qstr($<b>Note</b>).&quot;)&quot;;
+$db-&gt;Execute($sql);</pre>
+<p>ADODB also supports <code>$connection-&gt;Affected_Rows()</code> (returns the 
+  number of rows affected by last update or delete) and <code>$recordset-&gt;Insert_ID()</code> 
+  (returns last autoincrement number generated by an insert statement). Be forewarned 
+  that not all databases support the two functions.<br>
+</p>
+<h3>MetaTypes</h3>
+<p>You can find out more information about each of the fields (I use the words 
+  fields and columns interchangebly) you are selecting by calling the recordset 
+  method <code>FetchField($fieldoffset)</code>. This will return an object with 
+  3 properties: name, type and max_length. 
+<pre>For example:</pre>
+<pre>$recordset = $conn-&gt;Execute(&quot;select adate from table&quot;);<br>$f0 = $recordset-&gt;FetchField(0);
+</pre>
+<p>Then <code>$f0-&gt;name</code> will hold <i>'adata'</i>, <code>$f0-&gt;type</code> 
+  will be set to '<i>date'</i>. If the max_length is unknown, it will be set to 
+  -1. 
+<p>One problem with handling different databases is that each database often calls 
+  the same type by a different name. For example a <i>timestamp</i> type is called 
+  <i>datetime</i> in one database and <i>time</i> in another. So ADODB has a special 
+  <code>MetaType($type, $max_length)</code> function that standardises the types 
+  to the following: 
+<p>C: character and varchar types<br>
+  X: text or long character (eg. more than 255 bytes wide).<br>
+  B: blob or binary image<br>
+  D: date<br>
+  T: timestamp<br>
+  L: logical (boolean)<br>
+  I: integer<br>
+  N: numeric (float, double, money) 
+<p>In the above date example, 
+<p><code>$recordset = $conn-&gt;Execute(&quot;select adate from table&quot;);<br>
+  $f0 = $recordset-&gt;FetchField(0);<br>
+  $type = $recordset-&gt;MetaType($f0-&gt;type, $f0-&gt;max_length);<br>
+  print $type; /* should print 'D'</code> */
+<p> 
+<p><b>Select Limit and Top Support</b> 
+<p>ADODB has a function called $connection->SelectLimit($sql,$nrows,$offset) that allows
+you to retrieve a subset of the recordset. This will take advantage of native
+SELECT TOP on Microsoft products and SELECT ... LIMIT with PostgreSQL and MySQL, and
+emulated if the database does not support it.
+<p><b>Caching Support</b> 
+<p>ADODB allows you to cache recordsets in your file system, and only requery the database
+server after a certain timeout period with $connection->CacheExecute($secs2cache,$sql) and 
+$connection->CacheSelectLimit($secs2cache,$sql,$nrows,$offset).
+<p><b>PHP4 Session Handler Support</b> 
+<p>ADODB also supports PHP4 session handlers. You can store your session variables 
+  in a database for true scalability using ADODB. For further information, visit 
+  <a href="http://php.weblogs.com/adodb-sessions"></a><a href="http://php.weblogs.com/adodb-sessions">http://php.weblogs.com/adodb-sessions</a>
+<h3>Commercial Use Encouraged</h3>
+<p>If you plan to write commercial PHP applications that you want to resell, you should consider ADODB. It has been released using the lesser GPL, which means you can legally include it in commercial applications, while keeping your code proprietary. Commercial use of ADODB is strongly encouraged! We are using it internally for this reason.<p>
+
+<h2>Conclusion</h2>
+<p>As a thank you for finishing this article, here are the complete lyrics for 
+  <i>let's call the whole thing off</i>.<br>
+  <br>
+<pre>
+   Refrain 
+<br>
+		You say eether and I say eyether, 
+		You say neether and I say nyther; 
+		Eether, eyether, neether, nyther - 
+		Let's call the whole thing off ! 
+<br>
+		You like potato and I like po-tah-to, 
+		You like tomato and I like to-mah-to; 
+		Potato, po-tah-to, tomato, to-mah-to - 
+		Let's call the whole thing off ! 
+<br>
+But oh, if we call the whole thing off, then we must part. 
+And oh, if we ever part, then that might break my heart. 
+<br>
+		So, if you like pajamas and I like pa-jah-mas, 
+		I'll wear pajamas and give up pa-jah-mas. 
+		For we know we 
+		Need each other, so we 
+		Better call the calling off off. 
+		Let's call the whole thing off ! 
+<br>
+   Second Refrain 
+<br>
+		You say laughter and I say lawfter, 
+		You say after and I say awfter; 
+		Laughter, lawfter, after, awfter - 
+		Let's call the whole thing off ! 
+<br>
+		You like vanilla and I like vanella, 
+		You, sa's'parilla and I sa's'parella; 
+		Vanilla, vanella, choc'late, strawb'ry - 
+		Let's call the whole thing off ! 
+<br>
+But oh, if we call the whole thing off, then we must part. 
+And oh, if we ever part, then that might break my heart. 
+<br>
+		So, if you go for oysters and I go for ersters, 
+		I'll order oysters and cancel the ersters. 
+		For we know we 
+		Need each other, so we 
+		Better call the calling off off. 
+		Let's call the whole thing off ! 
+  </pre>
+<p><font size=2>Song and lyrics by George and Ira Gershwin, introduced by Fred Astaire and Ginger Rogers
+in the film "Shall We Dance?"  </font><p>
+<p>
+(c)2001-2002 John Lim.
+
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-access.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-access.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-access.inc.php	(revision 225)
@@ -0,0 +1,87 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Microsoft Access data driver. Requires ODBC. Works only on MS Windows.
+*/
+if (!defined('_ADODB_ODBC_LAYER')) {
+	if (!defined('ADODB_DIR')) die();
+	
+	include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+ if (!defined('_ADODB_ACCESS')) {
+ 	define('_ADODB_ACCESS',1);
+
+class  ADODB_access extends ADODB_odbc {	
+	var $databaseType = 'access';
+	var $hasTop = 'top';		// support mssql SELECT TOP 10 * FROM TABLE
+	var $fmtDate = "#Y-m-d#";
+	var $fmtTimeStamp = "#Y-m-d h:i:sA#"; // note not comma
+	var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
+	var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
+	var $sysTimeStamp = 'NOW';
+	var $hasTransactions = false;
+	var $upperCase = 'ucase';
+	
+	function ADODB_access()
+	{
+	global $ADODB_EXTENSION;
+	
+		$ADODB_EXTENSION = false;
+		$this->ADODB_odbc();
+	}
+	
+	function Time()
+	{
+		return time();
+	}
+	
+	function BeginTrans() { return false;}
+	
+	function IfNull( $field, $ifNull ) 
+	{
+		return " IIF(IsNull($field), $ifNull, $field) "; // if Access
+	}
+/*
+	function &MetaTables()
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = odbc_tables($this->_connectionID);
+		$rs = new ADORecordSet_odbc($qid);
+		$ADODB_FETCH_MODE = $savem;
+		if (!$rs) return false;
+		
+		$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
+		
+		$arr = &$rs->GetArray();
+		//print_pre($arr);
+		$arr2 = array();
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE')
+				$arr2[] = $arr[$i][2];
+		}
+		return $arr2;
+	}*/
+}
+
+ 
+class  ADORecordSet_access extends ADORecordSet_odbc {	
+	
+	var $databaseType = "access";		
+	
+	function ADORecordSet_access($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbc($id,$mode);
+	}
+}// class
+} 
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado.inc.php	(revision 225)
@@ -0,0 +1,634 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+	Microsoft ADO data driver. Requires ADO. Works only on MS Windows.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+	
+define("_ADODB_ADO_LAYER", 1 );
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+
+	
+class ADODB_ado extends ADOConnection {
+	var $databaseType = "ado";	
+	var $_bindInputArray = false;
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d, h:i:sA'";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $dataProvider = "ado";	
+	var $hasAffectedRows = true;
+	var $adoParameterType = 201; // 201 = long varchar, 203=long wide varchar, 205 = long varbinary
+	var $_affectedRows = false;
+	var $_thisTransactions;
+	var $_cursor_type = 3; // 3=adOpenStatic,0=adOpenForwardOnly,1=adOpenKeyset,2=adOpenDynamic
+	var $_cursor_location = 3; // 2=adUseServer, 3 = adUseClient;
+	var $_lock_type = -1;
+	var $_execute_option = -1;
+	var $poorAffectedRows = true; 
+	var $charPage;
+		
+	function ADODB_ado() 
+	{ 	
+		$this->_affectedRows = new VARIANT;
+	}
+
+	function ServerInfo()
+	{
+		if (!empty($this->_connectionID)) $desc = $this->_connectionID->provider;
+		return array('description' => $desc, 'version' => '');
+	}
+	
+	function _affectedrows()
+	{
+		if (PHP_VERSION >= 5) return $this->_affectedRows;
+		
+		return $this->_affectedRows->value;
+	}
+	
+	// you can also pass a connection string like this:
+	//
+	// $DB->Connect('USER ID=sa;PASSWORD=pwd;SERVER=mangrove;DATABASE=ai',false,false,'SQLOLEDB');
+	function _connect($argHostname, $argUsername, $argPassword, $argProvider= 'MSDASQL')
+	{
+		$u = 'UID';
+		$p = 'PWD';
+	
+		if (!empty($this->charPage))
+			$dbc = new COM('ADODB.Connection',null,$this->charPage);
+		else
+			$dbc = new COM('ADODB.Connection');
+			
+		if (! $dbc) return false;
+
+		/* special support if provider is mssql or access */
+		if ($argProvider=='mssql') {
+			$u = 'User Id';  //User parameter name for OLEDB
+			$p = 'Password'; 
+			$argProvider = "SQLOLEDB"; // SQL Server Provider
+			
+			// not yet
+			//if ($argDatabasename) $argHostname .= ";Initial Catalog=$argDatabasename";
+			
+			//use trusted conection for SQL if username not specified
+			if (!$argUsername) $argHostname .= ";Trusted_Connection=Yes";
+		} else if ($argProvider=='access')
+			$argProvider = "Microsoft.Jet.OLEDB.4.0"; // Microsoft Jet Provider
+		
+		if ($argProvider) $dbc->Provider = $argProvider;	
+		
+		if ($argUsername) $argHostname .= ";$u=$argUsername";
+		if ($argPassword)$argHostname .= ";$p=$argPassword";
+		
+		if ($this->debug) ADOConnection::outp( "Host=".$argHostname."<BR>\n version=$dbc->version");
+		// @ added below for php 4.0.1 and earlier
+		@$dbc->Open((string) $argHostname);
+		
+		$this->_connectionID = $dbc;
+		
+		$dbc->CursorLocation = $this->_cursor_location;
+		return  $dbc->State > 0;
+	}
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argProvider='MSDASQL')
+	{
+		return $this->_connect($argHostname,$argUsername,$argPassword,$argProvider);
+	}	
+	
+/*
+	adSchemaCatalogs	= 1,
+	adSchemaCharacterSets	= 2,
+	adSchemaCollations	= 3,
+	adSchemaColumns	= 4,
+	adSchemaCheckConstraints	= 5,
+	adSchemaConstraintColumnUsage	= 6,
+	adSchemaConstraintTableUsage	= 7,
+	adSchemaKeyColumnUsage	= 8,
+	adSchemaReferentialContraints	= 9,
+	adSchemaTableConstraints	= 10,
+	adSchemaColumnsDomainUsage	= 11,
+	adSchemaIndexes	= 12,
+	adSchemaColumnPrivileges	= 13,
+	adSchemaTablePrivileges	= 14,
+	adSchemaUsagePrivileges	= 15,
+	adSchemaProcedures	= 16,
+	adSchemaSchemata	= 17,
+	adSchemaSQLLanguages	= 18,
+	adSchemaStatistics	= 19,
+	adSchemaTables	= 20,
+	adSchemaTranslations	= 21,
+	adSchemaProviderTypes	= 22,
+	adSchemaViews	= 23,
+	adSchemaViewColumnUsage	= 24,
+	adSchemaViewTableUsage	= 25,
+	adSchemaProcedureParameters	= 26,
+	adSchemaForeignKeys	= 27,
+	adSchemaPrimaryKeys	= 28,
+	adSchemaProcedureColumns	= 29,
+	adSchemaDBInfoKeywords	= 30,
+	adSchemaDBInfoLiterals	= 31,
+	adSchemaCubes	= 32,
+	adSchemaDimensions	= 33,
+	adSchemaHierarchies	= 34,
+	adSchemaLevels	= 35,
+	adSchemaMeasures	= 36,
+	adSchemaProperties	= 37,
+	adSchemaMembers	= 38
+
+*/
+	
+	function &MetaTables()
+	{
+		$arr= array();
+		$dbc = $this->_connectionID;
+		
+		$adors=@$dbc->OpenSchema(20);//tables
+		if ($adors){
+			$f = $adors->Fields(2);//table/view name
+			$t = $adors->Fields(3);//table type
+			while (!$adors->EOF){
+				$tt=substr($t->value,0,6);
+				if ($tt!='SYSTEM' && $tt !='ACCESS')
+					$arr[]=$f->value;
+				//print $f->value . ' ' . $t->value.'<br>';
+				$adors->MoveNext();
+			}
+			$adors->Close();
+		}
+		
+		return $arr;
+	}
+	
+	function &MetaColumns($table)
+	{
+		$table = strtoupper($table);
+		$arr = array();
+		$dbc = $this->_connectionID;
+		
+		$adors=@$dbc->OpenSchema(4);//tables
+	
+		if ($adors){
+			$t = $adors->Fields(2);//table/view name
+			while (!$adors->EOF){
+				
+				
+				if (strtoupper($t->Value) == $table) {
+				
+					$fld = new ADOFieldObject();
+					$c = $adors->Fields(3);
+					$fld->name = $c->Value;
+					$fld->type = 'CHAR'; // cannot discover type in ADO!
+					$fld->max_length = -1;
+					$arr[strtoupper($fld->name)]=$fld;
+				}
+		
+				$adors->MoveNext();
+			}
+			$adors->Close();
+		}
+		$false = false;
+		return empty($arr) ? $false : $arr;
+	}
+	
+
+
+	
+	/* returns queryID or false */
+	function &_query($sql,$inputarr=false) 
+	{
+		
+		$dbc = $this->_connectionID;
+		$false = false;
+		
+	//	return rs	
+		if ($inputarr) {
+			
+			if (!empty($this->charPage))
+				$oCmd = new COM('ADODB.Command',null,$this->charPage);
+			else
+				$oCmd = new COM('ADODB.Command');
+			$oCmd->ActiveConnection = $dbc;
+			$oCmd->CommandText = $sql;
+			$oCmd->CommandType = 1;
+
+			foreach($inputarr as $val) {
+				// name, type, direction 1 = input, len,
+				$this->adoParameterType = 130;
+				$p = $oCmd->CreateParameter('name',$this->adoParameterType,1,strlen($val),$val);
+				//print $p->Type.' '.$p->value;
+				$oCmd->Parameters->Append($p);
+			}
+			$p = false;
+			$rs = $oCmd->Execute();
+			$e = $dbc->Errors;
+			if ($dbc->Errors->Count > 0) return $false;
+			return $rs;
+		}
+		
+		$rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option);
+
+		if ($dbc->Errors->Count > 0) return $false;
+		if (! $rs) return $false;
+		
+		if ($rs->State == 0) {
+			$true = true;
+			return $true; // 0 = adStateClosed means no records returned
+		}
+		return $rs;
+	}
+
+	
+	function BeginTrans() 
+	{ 
+		if ($this->transOff) return true;
+		
+		if (isset($this->_thisTransactions))
+			if (!$this->_thisTransactions) return false;
+		else {
+			$o = $this->_connectionID->Properties("Transaction DDL");
+			$this->_thisTransactions = $o ? true : false;
+			if (!$o) return false;
+		}
+		@$this->_connectionID->BeginTrans();
+		$this->transCnt += 1;
+		return true;
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transOff) return true;
+		
+		@$this->_connectionID->CommitTrans();
+		if ($this->transCnt) @$this->transCnt -= 1;
+		return true;
+	}
+	function RollbackTrans() {
+		if ($this->transOff) return true;
+		@$this->_connectionID->RollbackTrans();
+		if ($this->transCnt) @$this->transCnt -= 1;
+		return true;
+	}
+	
+	/*	Returns: the last error message from previous database operation	*/	
+
+	function ErrorMsg() 
+	{
+		if (!$this->_connectionID) return "No connection established";
+		$errc = $this->_connectionID->Errors;
+		if (!$errc) return "No Errors object found";
+		if ($errc->Count == 0) return '';
+		$err = $errc->Item($errc->Count-1);
+		return $err->Description;
+	}
+	
+	function ErrorNo() 
+	{
+		$errc = $this->_connectionID->Errors;
+		if ($errc->Count == 0) return 0;
+		$err = $errc->Item($errc->Count-1);
+		return $err->NativeError;
+	}
+
+	// returns true or false
+	function _close()
+	{
+		if ($this->_connectionID) $this->_connectionID->Close();
+		$this->_connectionID = false;
+		return true;
+	}
+	
+	
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_ado extends ADORecordSet {	
+	
+	var $bind = false;
+	var $databaseType = "ado";	
+	var $dataProvider = "ado";	
+	var $_tarr = false; // caches the types
+	var $_flds; // and field objects
+	var $canSeek = true;
+  	var $hideErrors = true;
+		  
+	function ADORecordSet_ado($id,$mode=false)
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		return $this->ADORecordSet($id,$mode);
+	}
+
+
+	// returns the field object
+	function &FetchField($fieldOffset = -1) {
+		$off=$fieldOffset+1; // offsets begin at 1
+		
+		$o= new ADOFieldObject();
+		$rs = $this->_queryID;
+		$f = $rs->Fields($fieldOffset);
+		$o->name = $f->Name;
+		$t = $f->Type;
+		$o->type = $this->MetaType($t);
+		$o->max_length = $f->DefinedSize;
+		$o->ado_type = $t;	
+
+		//print "off=$off name=$o->name type=$o->type len=$o->max_length<br>";
+		return $o;
+	}
+	
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+
+		
+	function _initrs()
+	{
+		$rs = $this->_queryID;
+		$this->_numOfRows = $rs->RecordCount;
+		
+		$f = $rs->Fields;
+		$this->_numOfFields = $f->Count;
+	}
+	
+	
+	 // should only be used to move forward as we normally use forward-only cursors
+	function _seek($row)
+	{
+	   $rs = $this->_queryID; 
+		// absoluteposition doesn't work -- my maths is wrong ?
+		//	$rs->AbsolutePosition->$row-2;
+		//	return true;
+		if ($this->_currentRow > $row) return false;
+		@$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst
+		return true;
+	}
+	
+/*
+	OLEDB types
+	
+	 enum DBTYPEENUM
+	{	DBTYPE_EMPTY	= 0,
+	DBTYPE_NULL	= 1,
+	DBTYPE_I2	= 2,
+	DBTYPE_I4	= 3,
+	DBTYPE_R4	= 4,
+	DBTYPE_R8	= 5,
+	DBTYPE_CY	= 6,
+	DBTYPE_DATE	= 7,
+	DBTYPE_BSTR	= 8,
+	DBTYPE_IDISPATCH	= 9,
+	DBTYPE_ERROR	= 10,
+	DBTYPE_BOOL	= 11,
+	DBTYPE_VARIANT	= 12,
+	DBTYPE_IUNKNOWN	= 13,
+	DBTYPE_DECIMAL	= 14,
+	DBTYPE_UI1	= 17,
+	DBTYPE_ARRAY	= 0x2000,
+	DBTYPE_BYREF	= 0x4000,
+	DBTYPE_I1	= 16,
+	DBTYPE_UI2	= 18,
+	DBTYPE_UI4	= 19,
+	DBTYPE_I8	= 20,
+	DBTYPE_UI8	= 21,
+	DBTYPE_GUID	= 72,
+	DBTYPE_VECTOR	= 0x1000,
+	DBTYPE_RESERVED	= 0x8000,
+	DBTYPE_BYTES	= 128,
+	DBTYPE_STR	= 129,
+	DBTYPE_WSTR	= 130,
+	DBTYPE_NUMERIC	= 131,
+	DBTYPE_UDT	= 132,
+	DBTYPE_DBDATE	= 133,
+	DBTYPE_DBTIME	= 134,
+	DBTYPE_DBTIMESTAMP	= 135
+	
+	ADO Types
+	
+   	adEmpty	= 0,
+	adTinyInt	= 16,
+	adSmallInt	= 2,
+	adInteger	= 3,
+	adBigInt	= 20,
+	adUnsignedTinyInt	= 17,
+	adUnsignedSmallInt	= 18,
+	adUnsignedInt	= 19,
+	adUnsignedBigInt	= 21,
+	adSingle	= 4,
+	adDouble	= 5,
+	adCurrency	= 6,
+	adDecimal	= 14,
+	adNumeric	= 131,
+	adBoolean	= 11,
+	adError	= 10,
+	adUserDefined	= 132,
+	adVariant	= 12,
+	adIDispatch	= 9,
+	adIUnknown	= 13,	
+	adGUID	= 72,
+	adDate	= 7,
+	adDBDate	= 133,
+	adDBTime	= 134,
+	adDBTimeStamp	= 135,
+	adBSTR	= 8,
+	adChar	= 129,
+	adVarChar	= 200,
+	adLongVarChar	= 201,
+	adWChar	= 130,
+	adVarWChar	= 202,
+	adLongVarWChar	= 203,
+	adBinary	= 128,
+	adVarBinary	= 204,
+	adLongVarBinary	= 205,
+	adChapter	= 136,
+	adFileTime	= 64,
+	adDBFileTime	= 137,
+	adPropVariant	= 138,
+	adVarNumeric	= 139
+*/
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		if (!is_numeric($t)) return $t;
+		
+		switch ($t) {
+		case 0:
+		case 12: // variant
+		case 8: // bstr
+		case 129: //char
+		case 130: //wc
+		case 200: // varc
+		case 202:// varWC
+		case 128: // bin
+		case 204: // varBin
+		case 72: // guid
+			if ($len <= $this->blobSize) return 'C';
+		
+		case 201:
+		case 203:
+			return 'X';
+		case 128:
+		case 204:
+		case 205:
+			 return 'B';
+		case 7:
+		case 133: return 'D';
+		
+		case 134:
+		case 135: return 'T';
+		
+		case 11: return 'L';
+		
+		case 16://	adTinyInt	= 16,
+		case 2://adSmallInt	= 2,
+		case 3://adInteger	= 3,
+		case 4://adBigInt	= 20,
+		case 17://adUnsignedTinyInt	= 17,
+		case 18://adUnsignedSmallInt	= 18,
+		case 19://adUnsignedInt	= 19,
+		case 20://adUnsignedBigInt	= 21,
+			return 'I';
+		default: return 'N';
+		}
+	}
+	
+	// time stamp not supported yet
+	function _fetch()
+	{	
+		$rs = $this->_queryID;
+		if (!$rs or $rs->EOF) {
+			$this->fields = false;
+			return false;
+		}
+		$this->fields = array();
+	
+		if (!$this->_tarr) {
+			$tarr = array();
+			$flds = array();
+			for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) {
+				$f = $rs->Fields($i);
+				$flds[] = $f;
+				$tarr[] = $f->Type;
+			}
+			// bind types and flds only once
+			$this->_tarr = $tarr; 
+			$this->_flds = $flds;
+		}
+		$t = reset($this->_tarr);
+		$f = reset($this->_flds);
+		
+		if ($this->hideErrors)  $olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null
+		for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) {
+			//echo "<p>",$t,' ';var_dump($f->value); echo '</p>';
+			switch($t) {
+			case 135: // timestamp
+				if (!strlen((string)$f->value)) $this->fields[] = false;
+				else {
+					if (!is_numeric($f->value)) # $val = variant_date_to_timestamp($f->value);
+						// VT_DATE stores dates as (float) fractional days since 1899/12/30 00:00:00
+						$val=(float) variant_cast($f->value,VT_R8)*3600*24-2209161600;
+					else 
+						$val = $f->value;
+					$this->fields[] = adodb_date('Y-m-d H:i:s',$val);
+				}
+				break;			
+			case 133:// A date value (yyyymmdd) 
+				if ($val = $f->value) {
+					$this->fields[] = substr($val,0,4).'-'.substr($val,4,2).'-'.substr($val,6,2);
+				} else
+					$this->fields[] = false;
+				break;
+			case 7: // adDate
+				if (!strlen((string)$f->value)) $this->fields[] = false;
+				else {
+					if (!is_numeric($f->value)) $val = variant_date_to_timestamp($f->value);
+					else $val = $f->value;
+					
+					if (($val % 86400) == 0) $this->fields[] = adodb_date('Y-m-d',$val);
+					else $this->fields[] = adodb_date('Y-m-d H:i:s',$val);
+				}
+				break;
+			case 1: // null
+				$this->fields[] = false;
+				break;
+			case 6: // currency is not supported properly;
+				ADOConnection::outp( '<b>'.$f->Name.': currency type not supported by PHP</b>');
+				$this->fields[] = (float) $f->value;
+				break;
+			default:
+				$this->fields[] = $f->value; 
+				break;
+			}
+			//print " $f->value $t, ";
+			$f = next($this->_flds);
+			$t = next($this->_tarr);
+		} // for
+		if ($this->hideErrors) error_reporting($olde);
+		@$rs->MoveNext(); // @ needed for some versions of PHP!
+		
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+			$this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE);
+		}
+		return true;
+	}
+	
+		function NextRecordSet()
+		{
+			$rs = $this->_queryID;
+			$this->_queryID = $rs->NextRecordSet();
+			//$this->_queryID = $this->_QueryId->NextRecordSet();
+			if ($this->_queryID == null) return false;
+			
+			$this->_currentRow = -1;
+			$this->_currentPage = -1;
+			$this->bind = false;
+			$this->fields = false;
+			$this->_flds = false;
+			$this->_tarr = false;
+			
+			$this->_inited = false;
+			$this->Init();
+			return true;
+		}
+
+	function _close() {
+		$this->_flds = false;
+		@$this->_queryID->Close();// by Pete Dishman (peterd@telephonetics.co.uk)
+		$this->_queryID = false;	
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado5.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado5.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado5.inc.php	(revision 225)
@@ -0,0 +1,668 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+	Microsoft ADO data driver. Requires ADO. Works only on MS Windows. PHP5 compat version.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+	
+define("_ADODB_ADO_LAYER", 1 );
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+
+	
+class ADODB_ado extends ADOConnection {
+	var $databaseType = "ado";	
+	var $_bindInputArray = false;
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d, h:i:sA'";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $dataProvider = "ado";	
+	var $hasAffectedRows = true;
+	var $adoParameterType = 201; // 201 = long varchar, 203=long wide varchar, 205 = long varbinary
+	var $_affectedRows = false;
+	var $_thisTransactions;
+	var $_cursor_type = 3; // 3=adOpenStatic,0=adOpenForwardOnly,1=adOpenKeyset,2=adOpenDynamic
+	var $_cursor_location = 3; // 2=adUseServer, 3 = adUseClient;
+	var $_lock_type = -1;
+	var $_execute_option = -1;
+	var $poorAffectedRows = true; 
+	var $charPage;
+		
+	function ADODB_ado() 
+	{ 	
+		$this->_affectedRows = new VARIANT;
+	}
+
+	function ServerInfo()
+	{
+		if (!empty($this->_connectionID)) $desc = $this->_connectionID->provider;
+		return array('description' => $desc, 'version' => '');
+	}
+	
+	function _affectedrows()
+	{
+		if (PHP_VERSION >= 5) return $this->_affectedRows;
+		
+		return $this->_affectedRows->value;
+	}
+	
+	// you can also pass a connection string like this:
+	//
+	// $DB->Connect('USER ID=sa;PASSWORD=pwd;SERVER=mangrove;DATABASE=ai',false,false,'SQLOLEDB');
+	function _connect($argHostname, $argUsername, $argPassword,$argDBorProvider, $argProvider= '')
+	{
+	// two modes
+	//	-	if $argProvider is empty, we assume that $argDBorProvider holds provider -- this is for backward compat
+	//	- 	if $argProvider is not empty, then $argDBorProvider holds db
+	
+		
+		 if ($argProvider) {
+		 	$argDatabasename = $argDBorProvider;
+		 } else {
+		 	$argDatabasename = '';
+		 	if ($argDBorProvider) $argProvider = $argDBorProvider;
+			else $argProvider = 'MSDASQL';
+		}
+		
+		
+		try {
+		$u = 'UID';
+		$p = 'PWD';
+	
+		if (!empty($this->charPage))
+			$dbc = new COM('ADODB.Connection',null,$this->charPage);
+		else
+			$dbc = new COM('ADODB.Connection');
+			
+		if (! $dbc) return false;
+
+		/* special support if provider is mssql or access */
+		if ($argProvider=='mssql') {
+			$u = 'User Id';  //User parameter name for OLEDB
+			$p = 'Password'; 
+			$argProvider = "SQLOLEDB"; // SQL Server Provider
+			
+			// not yet
+			//if ($argDatabasename) $argHostname .= ";Initial Catalog=$argDatabasename";
+			
+			//use trusted conection for SQL if username not specified
+			if (!$argUsername) $argHostname .= ";Trusted_Connection=Yes";
+		} else if ($argProvider=='access')
+			$argProvider = "Microsoft.Jet.OLEDB.4.0"; // Microsoft Jet Provider
+		
+		if ($argProvider) $dbc->Provider = $argProvider;	
+
+		if ($argProvider) $argHostname = "PROVIDER=$argProvider;DRIVER={SQL Server};SERVER=$argHostname";	
+		
+
+		if ($argDatabasename) $argHostname .= ";DATABASE=$argDatabasename";		
+		if ($argUsername) $argHostname .= ";$u=$argUsername";
+		if ($argPassword)$argHostname .= ";$p=$argPassword";
+		
+		if ($this->debug) ADOConnection::outp( "Host=".$argHostname."<BR>\n version=$dbc->version");
+		// @ added below for php 4.0.1 and earlier
+		@$dbc->Open((string) $argHostname);
+		
+		$this->_connectionID = $dbc;
+		
+		$dbc->CursorLocation = $this->_cursor_location;
+		return  $dbc->State > 0;
+		} catch (exception $e) {
+		}
+		
+		return false;
+	}
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argProvider='MSDASQL')
+	{
+		return $this->_connect($argHostname,$argUsername,$argPassword,$argProvider);
+	}	
+	
+/*
+	adSchemaCatalogs	= 1,
+	adSchemaCharacterSets	= 2,
+	adSchemaCollations	= 3,
+	adSchemaColumns	= 4,
+	adSchemaCheckConstraints	= 5,
+	adSchemaConstraintColumnUsage	= 6,
+	adSchemaConstraintTableUsage	= 7,
+	adSchemaKeyColumnUsage	= 8,
+	adSchemaReferentialContraints	= 9,
+	adSchemaTableConstraints	= 10,
+	adSchemaColumnsDomainUsage	= 11,
+	adSchemaIndexes	= 12,
+	adSchemaColumnPrivileges	= 13,
+	adSchemaTablePrivileges	= 14,
+	adSchemaUsagePrivileges	= 15,
+	adSchemaProcedures	= 16,
+	adSchemaSchemata	= 17,
+	adSchemaSQLLanguages	= 18,
+	adSchemaStatistics	= 19,
+	adSchemaTables	= 20,
+	adSchemaTranslations	= 21,
+	adSchemaProviderTypes	= 22,
+	adSchemaViews	= 23,
+	adSchemaViewColumnUsage	= 24,
+	adSchemaViewTableUsage	= 25,
+	adSchemaProcedureParameters	= 26,
+	adSchemaForeignKeys	= 27,
+	adSchemaPrimaryKeys	= 28,
+	adSchemaProcedureColumns	= 29,
+	adSchemaDBInfoKeywords	= 30,
+	adSchemaDBInfoLiterals	= 31,
+	adSchemaCubes	= 32,
+	adSchemaDimensions	= 33,
+	adSchemaHierarchies	= 34,
+	adSchemaLevels	= 35,
+	adSchemaMeasures	= 36,
+	adSchemaProperties	= 37,
+	adSchemaMembers	= 38
+
+*/
+	
+	function &MetaTables()
+	{
+		$arr= array();
+		$dbc = $this->_connectionID;
+		
+		$adors=@$dbc->OpenSchema(20);//tables
+		if ($adors){
+			$f = $adors->Fields(2);//table/view name
+			$t = $adors->Fields(3);//table type
+			while (!$adors->EOF){
+				$tt=substr($t->value,0,6);
+				if ($tt!='SYSTEM' && $tt !='ACCESS')
+					$arr[]=$f->value;
+				//print $f->value . ' ' . $t->value.'<br>';
+				$adors->MoveNext();
+			}
+			$adors->Close();
+		}
+		
+		return $arr;
+	}
+	
+	function &MetaColumns($table)
+	{
+		$table = strtoupper($table);
+		$arr= array();
+		$dbc = $this->_connectionID;
+		
+		$adors=@$dbc->OpenSchema(4);//tables
+	
+		if ($adors){
+			$t = $adors->Fields(2);//table/view name
+			while (!$adors->EOF){
+				
+				
+				if (strtoupper($t->Value) == $table) {
+				
+					$fld = new ADOFieldObject();
+					$c = $adors->Fields(3);
+					$fld->name = $c->Value;
+					$fld->type = 'CHAR'; // cannot discover type in ADO!
+					$fld->max_length = -1;
+					$arr[strtoupper($fld->name)]=$fld;
+				}
+		
+				$adors->MoveNext();
+			}
+			$adors->Close();
+		}
+		
+		return $arr;
+	}
+	
+	/* returns queryID or false */
+	function &_query($sql,$inputarr=false) 
+	{
+		try { // In PHP5, all COM errors are exceptions, so to maintain old behaviour...
+		
+		$dbc = $this->_connectionID;
+		
+	//	return rs	
+	
+		$false = false;
+		
+		if ($inputarr) {
+			
+			if (!empty($this->charPage))
+				$oCmd = new COM('ADODB.Command',null,$this->charPage);
+			else
+				$oCmd = new COM('ADODB.Command');
+			$oCmd->ActiveConnection = $dbc;
+			$oCmd->CommandText = $sql;
+			$oCmd->CommandType = 1;
+
+			foreach($inputarr as $val) {
+				// name, type, direction 1 = input, len,
+				$this->adoParameterType = 130;
+				$p = $oCmd->CreateParameter('name',$this->adoParameterType,1,strlen($val),$val);
+				//print $p->Type.' '.$p->value;
+				$oCmd->Parameters->Append($p);
+			}
+			$p = false;
+			$rs = $oCmd->Execute();
+			$e = $dbc->Errors;
+			if ($dbc->Errors->Count > 0) return $false;
+			return $rs;
+		}
+		
+		$rs = @$dbc->Execute($sql,$this->_affectedRows, $this->_execute_option);
+			
+		if ($dbc->Errors->Count > 0) return $false;
+		if (! $rs) return $false;
+		
+		if ($rs->State == 0) {
+			$true = true;
+			return $true; // 0 = adStateClosed means no records returned
+		}
+		return $rs;
+		
+		} catch (exception $e) {
+			
+		}
+		return $false;
+	}
+
+	
+	function BeginTrans() 
+	{ 
+		if ($this->transOff) return true;
+		
+		if (isset($this->_thisTransactions))
+			if (!$this->_thisTransactions) return false;
+		else {
+			$o = $this->_connectionID->Properties("Transaction DDL");
+			$this->_thisTransactions = $o ? true : false;
+			if (!$o) return false;
+		}
+		@$this->_connectionID->BeginTrans();
+		$this->transCnt += 1;
+		return true;
+	}
+	function CommitTrans($ok=true) 
+	{ 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transOff) return true;
+		
+		@$this->_connectionID->CommitTrans();
+		if ($this->transCnt) @$this->transCnt -= 1;
+		return true;
+	}
+	function RollbackTrans() {
+		if ($this->transOff) return true;
+		@$this->_connectionID->RollbackTrans();
+		if ($this->transCnt) @$this->transCnt -= 1;
+		return true;
+	}
+	
+	/*	Returns: the last error message from previous database operation	*/	
+
+	function ErrorMsg() 
+	{
+		if (!$this->_connectionID) return "No connection established";
+		$errmsg = '';
+		
+		try {
+			$errc = $this->_connectionID->Errors;
+			if (!$errc) return "No Errors object found";
+			if ($errc->Count == 0) return '';
+			$err = $errc->Item($errc->Count-1);
+			$errmsg = $err->Description;
+		}catch(exception $e) {
+		}
+		return $errmsg;
+	}
+	
+	function ErrorNo() 
+	{
+		$errc = $this->_connectionID->Errors;
+		if ($errc->Count == 0) return 0;
+		$err = $errc->Item($errc->Count-1);
+		return $err->NativeError;
+	}
+
+	// returns true or false
+	function _close()
+	{
+		if ($this->_connectionID) $this->_connectionID->Close();
+		$this->_connectionID = false;
+		return true;
+	}
+	
+	
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_ado extends ADORecordSet {	
+	
+	var $bind = false;
+	var $databaseType = "ado";	
+	var $dataProvider = "ado";	
+	var $_tarr = false; // caches the types
+	var $_flds; // and field objects
+	var $canSeek = true;
+  	var $hideErrors = true;
+		  
+	function ADORecordSet_ado($id,$mode=false)
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		return $this->ADORecordSet($id,$mode);
+	}
+
+
+	// returns the field object
+	function &FetchField($fieldOffset = -1) {
+		$off=$fieldOffset+1; // offsets begin at 1
+		
+		$o= new ADOFieldObject();
+		$rs = $this->_queryID;
+		$f = $rs->Fields($fieldOffset);
+		$o->name = $f->Name;
+		$t = $f->Type;
+		$o->type = $this->MetaType($t);
+		$o->max_length = $f->DefinedSize;
+		$o->ado_type = $t;
+		
+
+		//print "off=$off name=$o->name type=$o->type len=$o->max_length<br>";
+		return $o;
+	}
+	
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+
+		
+	function _initrs()
+	{
+		$rs = $this->_queryID;
+		$this->_numOfRows = $rs->RecordCount;
+		
+		$f = $rs->Fields;
+		$this->_numOfFields = $f->Count;
+	}
+	
+	
+	 // should only be used to move forward as we normally use forward-only cursors
+	function _seek($row)
+	{
+	   $rs = $this->_queryID; 
+		// absoluteposition doesn't work -- my maths is wrong ?
+		//	$rs->AbsolutePosition->$row-2;
+		//	return true;
+		if ($this->_currentRow > $row) return false;
+		@$rs->Move((integer)$row - $this->_currentRow-1); //adBookmarkFirst
+		return true;
+	}
+	
+/*
+	OLEDB types
+	
+	 enum DBTYPEENUM
+	{	DBTYPE_EMPTY	= 0,
+	DBTYPE_NULL	= 1,
+	DBTYPE_I2	= 2,
+	DBTYPE_I4	= 3,
+	DBTYPE_R4	= 4,
+	DBTYPE_R8	= 5,
+	DBTYPE_CY	= 6,
+	DBTYPE_DATE	= 7,
+	DBTYPE_BSTR	= 8,
+	DBTYPE_IDISPATCH	= 9,
+	DBTYPE_ERROR	= 10,
+	DBTYPE_BOOL	= 11,
+	DBTYPE_VARIANT	= 12,
+	DBTYPE_IUNKNOWN	= 13,
+	DBTYPE_DECIMAL	= 14,
+	DBTYPE_UI1	= 17,
+	DBTYPE_ARRAY	= 0x2000,
+	DBTYPE_BYREF	= 0x4000,
+	DBTYPE_I1	= 16,
+	DBTYPE_UI2	= 18,
+	DBTYPE_UI4	= 19,
+	DBTYPE_I8	= 20,
+	DBTYPE_UI8	= 21,
+	DBTYPE_GUID	= 72,
+	DBTYPE_VECTOR	= 0x1000,
+	DBTYPE_RESERVED	= 0x8000,
+	DBTYPE_BYTES	= 128,
+	DBTYPE_STR	= 129,
+	DBTYPE_WSTR	= 130,
+	DBTYPE_NUMERIC	= 131,
+	DBTYPE_UDT	= 132,
+	DBTYPE_DBDATE	= 133,
+	DBTYPE_DBTIME	= 134,
+	DBTYPE_DBTIMESTAMP	= 135
+	
+	ADO Types
+	
+   	adEmpty	= 0,
+	adTinyInt	= 16,
+	adSmallInt	= 2,
+	adInteger	= 3,
+	adBigInt	= 20,
+	adUnsignedTinyInt	= 17,
+	adUnsignedSmallInt	= 18,
+	adUnsignedInt	= 19,
+	adUnsignedBigInt	= 21,
+	adSingle	= 4,
+	adDouble	= 5,
+	adCurrency	= 6,
+	adDecimal	= 14,
+	adNumeric	= 131,
+	adBoolean	= 11,
+	adError	= 10,
+	adUserDefined	= 132,
+	adVariant	= 12,
+	adIDispatch	= 9,
+	adIUnknown	= 13,	
+	adGUID	= 72,
+	adDate	= 7,
+	adDBDate	= 133,
+	adDBTime	= 134,
+	adDBTimeStamp	= 135,
+	adBSTR	= 8,
+	adChar	= 129,
+	adVarChar	= 200,
+	adLongVarChar	= 201,
+	adWChar	= 130,
+	adVarWChar	= 202,
+	adLongVarWChar	= 203,
+	adBinary	= 128,
+	adVarBinary	= 204,
+	adLongVarBinary	= 205,
+	adChapter	= 136,
+	adFileTime	= 64,
+	adDBFileTime	= 137,
+	adPropVariant	= 138,
+	adVarNumeric	= 139
+*/
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		if (!is_numeric($t)) return $t;
+		
+		switch ($t) {
+		case 0:
+		case 12: // variant
+		case 8: // bstr
+		case 129: //char
+		case 130: //wc
+		case 200: // varc
+		case 202:// varWC
+		case 128: // bin
+		case 204: // varBin
+		case 72: // guid
+			if ($len <= $this->blobSize) return 'C';
+		
+		case 201:
+		case 203:
+			return 'X';
+		case 128:
+		case 204:
+		case 205:
+			 return 'B';
+		case 7:
+		case 133: return 'D';
+		
+		case 134:
+		case 135: return 'T';
+		
+		case 11: return 'L';
+		
+		case 16://	adTinyInt	= 16,
+		case 2://adSmallInt	= 2,
+		case 3://adInteger	= 3,
+		case 4://adBigInt	= 20,
+		case 17://adUnsignedTinyInt	= 17,
+		case 18://adUnsignedSmallInt	= 18,
+		case 19://adUnsignedInt	= 19,
+		case 20://adUnsignedBigInt	= 21,
+			return 'I';
+		default: return 'N';
+		}
+	}
+	
+	// time stamp not supported yet
+	function _fetch()
+	{	
+		$rs = $this->_queryID;
+		if (!$rs or $rs->EOF) {
+			$this->fields = false;
+			return false;
+		}
+		$this->fields = array();
+	
+		if (!$this->_tarr) {
+			$tarr = array();
+			$flds = array();
+			for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) {
+				$f = $rs->Fields($i);
+				$flds[] = $f;
+				$tarr[] = $f->Type;
+			}
+			// bind types and flds only once
+			$this->_tarr = $tarr; 
+			$this->_flds = $flds;
+		}
+		$t = reset($this->_tarr);
+		$f = reset($this->_flds);
+		
+		if ($this->hideErrors)  $olde = error_reporting(E_ERROR|E_CORE_ERROR);// sometimes $f->value be null
+		for ($i=0,$max = $this->_numOfFields; $i < $max; $i++) {
+			//echo "<p>",$t,' ';var_dump($f->value); echo '</p>';
+			switch($t) {
+			case 135: // timestamp
+				if (!strlen((string)$f->value)) $this->fields[] = false;
+				else {
+					if (!is_numeric($f->value)) # $val = variant_date_to_timestamp($f->value);
+						// VT_DATE stores dates as (float) fractional days since 1899/12/30 00:00:00
+						$val= (float) variant_cast($f->value,VT_R8)*3600*24-2209161600;
+					else 
+						$val = $f->value;
+					$this->fields[] = adodb_date('Y-m-d H:i:s',$val);
+				}
+				break;			
+			case 133:// A date value (yyyymmdd) 
+				if ($val = $f->value) {
+					$this->fields[] = substr($val,0,4).'-'.substr($val,4,2).'-'.substr($val,6,2);
+				} else
+					$this->fields[] = false;
+				break;
+			case 7: // adDate
+				if (!strlen((string)$f->value)) $this->fields[] = false;
+				else {
+					if (!is_numeric($f->value)) $val = variant_date_to_timestamp($f->value);
+					else $val = $f->value;
+					
+					if (($val % 86400) == 0) $this->fields[] = adodb_date('Y-m-d',$val);
+					else $this->fields[] = adodb_date('Y-m-d H:i:s',$val);
+				}
+				break;
+			case 1: // null
+				$this->fields[] = false;
+				break;
+			case 6: // currency is not supported properly;
+				ADOConnection::outp( '<b>'.$f->Name.': currency type not supported by PHP</b>');
+				$this->fields[] = (float) $f->value;
+				break;
+			default:
+				$this->fields[] = $f->value; 
+				break;
+			}
+			//print " $f->value $t, ";
+			$f = next($this->_flds);
+			$t = next($this->_tarr);
+		} // for
+		if ($this->hideErrors) error_reporting($olde);
+		@$rs->MoveNext(); // @ needed for some versions of PHP!
+		
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+			$this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE);
+		}
+		return true;
+	}
+	
+		function NextRecordSet()
+		{
+			$rs = $this->_queryID;
+			$this->_queryID = $rs->NextRecordSet();
+			//$this->_queryID = $this->_QueryId->NextRecordSet();
+			if ($this->_queryID == null) return false;
+			
+			$this->_currentRow = -1;
+			$this->_currentPage = -1;
+			$this->bind = false;
+			$this->fields = false;
+			$this->_flds = false;
+			$this->_tarr = false;
+			
+			$this->_inited = false;
+			$this->Init();
+			return true;
+		}
+
+	function _close() {
+		$this->_flds = false;
+		@$this->_queryID->Close();// by Pete Dishman (peterd@telephonetics.co.uk)
+		$this->_queryID = false;	
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado_access.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado_access.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado_access.inc.php	(revision 225)
@@ -0,0 +1,55 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+Released under both BSD license and Lesser GPL library license. 
+Whenever there is any discrepancy between the two licenses, 
+the BSD license will take precedence. See License.txt. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+	Microsoft Access ADO data driver. Requires ADO and ODBC. Works only on MS Windows.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ADO_LAYER')) {
+	if (PHP_VERSION >= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php");
+	else include(ADODB_DIR."/drivers/adodb-ado.inc.php");
+}
+
+class  ADODB_ado_access extends ADODB_ado {	
+	var $databaseType = 'ado_access';
+	var $hasTop = 'top';		// support mssql SELECT TOP 10 * FROM TABLE
+	var $fmtDate = "#Y-m-d#";
+	var $fmtTimeStamp = "#Y-m-d h:i:sA#";// note no comma
+	var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
+	var $sysTimeStamp = 'NOW';
+	var $hasTransactions = false;
+	var $upperCase = 'ucase';
+	
+	function ADODB_ado_access()
+	{
+		$this->ADODB_ado();
+	}
+	
+	function BeginTrans() { return false;}
+	
+	function CommitTrans() { return false;}
+	
+	function RollbackTrans() { return false;}
+
+}
+
+ 
+class  ADORecordSet_ado_access extends ADORecordSet_ado {	
+	
+	var $databaseType = "ado_access";		
+	
+	function ADORecordSet_ado_access($id,$mode=false)
+	{
+		return $this->ADORecordSet_ado($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado_mssql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado_mssql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ado_mssql.inc.php	(revision 225)
@@ -0,0 +1,154 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Microsoft SQL Server ADO data driver. Requires ADO and MSSQL client. 
+  Works only on MS Windows.
+  
+  Warning: Some versions of PHP (esp PHP4) leak memory when ADO/COM is used. 
+  Please check http://bugs.php.net/ for more info.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ADO_LAYER')) {
+	if (PHP_VERSION >= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php");
+	else include(ADODB_DIR."/drivers/adodb-ado.inc.php");
+}
+
+
+class  ADODB_ado_mssql extends ADODB_ado {        
+	var $databaseType = 'ado_mssql';
+	var $hasTop = 'top';
+	var $hasInsertID = true;
+	var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
+	var $sysTimeStamp = 'GetDate()';
+	var $leftOuter = '*=';
+	var $rightOuter = '=*';
+	var $ansiOuter = true; // for mssql7 or later
+	var $substr = "substring";
+	var $length = 'len';
+	var $_dropSeqSQL = "drop table %s";
+	
+	//var $_inTransaction = 1; // always open recordsets, so no transaction problems.
+	
+	function ADODB_ado_mssql()
+	{
+	        $this->ADODB_ado();
+	}
+	
+	function _insertid()
+	{
+	        return $this->GetOne('select @@identity');
+	}
+	
+	function _affectedrows()
+	{
+	        return $this->GetOne('select @@rowcount');
+	}
+	
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET TRANSACTION ".$transaction_mode);
+	}
+	
+	function qstr($s,$magic_quotes=false)
+	{
+		$s = ADOConnection::qstr($s, $magic_quotes);
+		return str_replace("\0", "\\\\000", $s);
+	}
+	
+	function MetaColumns($table)
+	{
+        $table = strtoupper($table);
+        $arr= array();
+        $dbc = $this->_connectionID;
+        
+        $osoptions = array();
+        $osoptions[0] = null;
+        $osoptions[1] = null;
+        $osoptions[2] = $table;
+        $osoptions[3] = null;
+        
+        $adors=@$dbc->OpenSchema(4, $osoptions);//tables
+
+        if ($adors){
+                while (!$adors->EOF){
+                        $fld = new ADOFieldObject();
+                        $c = $adors->Fields(3);
+                        $fld->name = $c->Value;
+                        $fld->type = 'CHAR'; // cannot discover type in ADO!
+                        $fld->max_length = -1;
+                        $arr[strtoupper($fld->name)]=$fld;
+        
+                        $adors->MoveNext();
+                }
+                $adors->Close();
+        }
+        $false = false;
+		return empty($arr) ? $false : $arr;
+	}
+	
+	function CreateSequence($seq='adodbseq',$start=1)
+	{
+		
+		$this->Execute('BEGIN TRANSACTION adodbseq');
+		$start -= 1;
+		$this->Execute("create table $seq (id float(53))");
+		$ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)");
+		if (!$ok) {
+				$this->Execute('ROLLBACK TRANSACTION adodbseq');
+				return false;
+		}
+		$this->Execute('COMMIT TRANSACTION adodbseq'); 
+		return true;
+	}
+
+	function GenID($seq='adodbseq',$start=1)
+	{
+		//$this->debug=1;
+		$this->Execute('BEGIN TRANSACTION adodbseq');
+		$ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1");
+		if (!$ok) {
+			$this->Execute("create table $seq (id float(53))");
+			$ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)");
+			if (!$ok) {
+				$this->Execute('ROLLBACK TRANSACTION adodbseq');
+				return false;
+			}
+			$this->Execute('COMMIT TRANSACTION adodbseq'); 
+			return $start;
+		}
+		$num = $this->GetOne("select id from $seq");
+		$this->Execute('COMMIT TRANSACTION adodbseq'); 
+		return $num;
+		
+		// in old implementation, pre 1.90, we returned GUID...
+		//return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'");
+	}
+	
+	} // end class 
+	
+	class  ADORecordSet_ado_mssql extends ADORecordSet_ado {        
+	
+	var $databaseType = 'ado_mssql';
+	
+	function ADORecordSet_ado_mssql($id,$mode=false)
+	{
+	        return $this->ADORecordSet_ado($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-borland_ibase.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-borland_ibase.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-borland_ibase.inc.php	(revision 225)
@@ -0,0 +1,92 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Support Borland Interbase 6.5 and later
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR."/drivers/adodb-ibase.inc.php");
+
+class ADODB_borland_ibase extends ADODB_ibase {
+	var $databaseType = "borland_ibase";	
+	
+	
+	function ADODB_borland_ibase()
+	{
+		$this->ADODB_ibase();
+	}
+	
+	function BeginTrans()
+	{	 
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		$this->autoCommit = false;
+	 	$this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
+		return $this->_transactionID;
+	}
+	
+	function ServerInfo()
+	{
+		$arr['dialect'] = $this->dialect;
+		switch($arr['dialect']) {
+		case '': 
+		case '1': $s = 'Interbase 6.5, Dialect 1'; break;
+		case '2': $s = 'Interbase 6.5, Dialect 2'; break;
+		default:
+		case '3': $s = 'Interbase 6.5, Dialect 3'; break;
+		}
+		$arr['version'] = '6.5';
+		$arr['description'] = $s;
+		return $arr;
+	}
+	
+	// Note that Interbase 6.5 uses ROWS instead - don't you love forking wars!
+	// 		SELECT col1, col2 FROM table ROWS 5 -- get 5 rows 
+	//		SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2
+	// Firebird uses
+	//		SELECT FIRST 5 SKIP 2 col1, col2 FROM TABLE
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
+	{
+		if ($nrows > 0) {
+			if ($offset <= 0) $str = " ROWS $nrows "; 
+			else {
+				$a = $offset+1;
+				$b = $offset+$nrows;
+				$str = " ROWS $a TO $b";
+			}
+		} else {
+			// ok, skip 
+			$a = $offset + 1;
+			$str = " ROWS $a TO 999999999"; // 999 million
+		}
+		$sql .= $str;
+		
+		return ($secs2cache) ? 
+				$this->CacheExecute($secs2cache,$sql,$inputarr)
+			:
+				$this->Execute($sql,$inputarr);
+	}
+	
+};
+ 
+
+class  ADORecordSet_borland_ibase extends ADORecordSet_ibase {	
+	
+	var $databaseType = "borland_ibase";		
+	
+	function ADORecordSet_borland_ibase($id,$mode=false)
+	{
+		$this->ADORecordSet_ibase($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-csv.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-csv.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-csv.inc.php	(revision 225)
@@ -0,0 +1,207 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 4.
+  
+  Currently unsupported: MetaDatabases, MetaTables and MetaColumns, and also inputarr in Execute.
+  Native types have been converted to MetaTypes.
+  Transactions not supported yet.
+  
+  Limitation of url length. For IIS, see MaxClientRequestBuffer registry value.
+  
+	  http://support.microsoft.com/default.aspx?scid=kb;en-us;260694
+*/ 
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (! defined("_ADODB_CSV_LAYER")) {
+ define("_ADODB_CSV_LAYER", 1 );
+
+include_once(ADODB_DIR.'/adodb-csvlib.inc.php');
+ 
+class ADODB_csv extends ADOConnection {
+	var $databaseType = 'csv';
+	var $databaseProvider = 'csv';
+	var $hasInsertID = true;
+	var $hasAffectedRows = true;	
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $_affectedrows=0;
+	var $_insertid=0;
+	var $_url;
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $hasTransactions = false;
+	var $_errorNo = false;
+	
+	function ADODB_csv() 
+	{		
+	}
+	
+	function _insertid()
+	{
+			return $this->_insertid;
+	}
+	
+	function _affectedrows()
+	{
+			return $this->_affectedrows;
+	}
+  
+  	function &MetaDatabases()
+	{
+		return false;
+	}
+
+	
+	// returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (strtolower(substr($argHostname,0,7)) !== 'http://') return false;
+		$this->_url = $argHostname;
+		return true;	
+	}
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (strtolower(substr($argHostname,0,7)) !== 'http://') return false;
+		$this->_url = $argHostname;
+		return true;
+	}
+	
+ 	function &MetaColumns($table) 
+	{
+		return false;
+	}
+		
+		
+	// parameters use PostgreSQL convention, not MySQL
+	function &SelectLimit($sql,$nrows=-1,$offset=-1)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$url = $this->_url.'?sql='.urlencode($sql)."&nrows=$nrows&fetch=".
+			(($this->fetchMode !== false)?$this->fetchMode : $ADODB_FETCH_MODE).
+			"&offset=$offset";
+		$err = false;
+		$rs = csv2rs($url,$err,false);
+		
+		if ($this->debug) print "$url<br><i>$err</i><br>";
+
+		$at = strpos($err,'::::');
+		if ($at === false) {
+			$this->_errorMsg = $err;
+			$this->_errorNo = (integer)$err;
+		} else {
+			$this->_errorMsg = substr($err,$at+4,1024);
+			$this->_errorNo = -9999;
+		}
+		if ($this->_errorNo) 
+			if ($fn = $this->raiseErrorFn) {
+				$fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,'');
+			}
+			
+		if (is_object($rs)) {	
+		
+			$rs->databaseType='csv';		
+			$rs->fetchMode = ($this->fetchMode !== false) ?  $this->fetchMode : $ADODB_FETCH_MODE;
+			$rs->connection = &$this;
+		}
+		return $rs;
+	}
+	
+	// returns queryID or false
+	function &_Execute($sql,$inputarr=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		if (!$this->_bindInputArray && $inputarr) {
+			$sqlarr = explode('?',$sql);
+			$sql = '';
+			$i = 0;
+			foreach($inputarr as $v) {
+
+				$sql .= $sqlarr[$i];
+				if (gettype($v) == 'string')
+					$sql .= $this->qstr($v);
+				else if ($v === null)
+					$sql .= 'NULL';
+				else
+					$sql .= $v;
+				$i += 1;
+	
+			}
+			$sql .= $sqlarr[$i];
+			if ($i+1 != sizeof($sqlarr))	
+				print "Input Array does not match ?: ".htmlspecialchars($sql);
+			$inputarr = false;
+		}
+		
+		$url =  $this->_url.'?sql='.urlencode($sql)."&fetch=".
+			(($this->fetchMode !== false)?$this->fetchMode : $ADODB_FETCH_MODE);
+		$err = false;
+		
+		
+		$rs = csv2rs($url,$err,false);
+		if ($this->debug) print urldecode($url)."<br><i>$err</i><br>";
+		$at = strpos($err,'::::');
+		if ($at === false) {		
+			$this->_errorMsg = $err;
+			$this->_errorNo = (integer)$err;
+		} else {
+			$this->_errorMsg = substr($err,$at+4,1024);
+			$this->_errorNo = -9999;
+		}
+		
+		if ($this->_errorNo) 
+			if ($fn = $this->raiseErrorFn) {
+				$fn($this->databaseType,'EXECUTE',$this->ErrorNo(),$this->ErrorMsg(),$sql,$inputarr);
+			}
+		if (is_object($rs)) {
+			$rs->fetchMode = ($this->fetchMode !== false) ?  $this->fetchMode : $ADODB_FETCH_MODE;
+			
+			$this->_affectedrows = $rs->affectedrows;
+			$this->_insertid = $rs->insertid;
+			$rs->databaseType='csv';
+			$rs->connection = &$this;
+		}
+		return $rs;
+	}
+
+	/*	Returns: the last error message from previous database operation	*/	
+	function ErrorMsg() 
+	{
+			return $this->_errorMsg;
+	}
+	
+	/*	Returns: the last error number from previous database operation	*/	
+	function ErrorNo() 
+	{
+		return $this->_errorNo;
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		return true;
+	}
+} // class
+
+class ADORecordset_csv extends ADORecordset {
+	function ADORecordset_csv($id,$mode=false)
+	{
+		$this->ADORecordset($id,$mode);
+	}
+	
+	function _close()
+	{
+		return true;
+	}
+}
+
+} // define
+	
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-db2.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-db2.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-db2.inc.php	(revision 225)
@@ -0,0 +1,828 @@
+<?php
+/* 
+  V4.94 23 Jan 2007  (c) 2006 John Lim (jlim#natsoft.com.my). All rights reserved.
+
+  This is a version of the ADODB driver for DB2.  It uses the 'ibm_db2' PECL extension
+  for PHP (http://pecl.php.net/package/ibm_db2), which in turn requires DB2 V8.2.2 or
+  higher.
+
+  Originally tested with PHP 5.1.1 and Apache 2.0.55 on Windows XP SP2.
+  More recently tested with PHP 5.1.2 and Apache 2.0.55 on Windows XP SP2.
+
+  This file was ported from "adodb-odbc.inc.php" by Larry Menard, "larry.menard#rogers.com".
+  I ripped out what I believed to be a lot of redundant or obsolete code, but there are
+  probably still some remnants of the ODBC support in this file; I'm relying on reviewers
+  of this code to point out any other things that can be removed.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+  define("_ADODB_DB2_LAYER", 2 );
+	 
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+
+
+class ADODB_db2 extends ADOConnection {
+	var $databaseType = "db2";	
+	var $fmtDate = "'Y-m-d'";
+	var $concat_operator = '||';
+	
+	var $sysTime = 'CURRENT TIME';
+	var $sysDate = 'CURRENT DATE';
+	var $sysTimeStamp = 'CURRENT TIMESTAMP';
+	
+	var $fmtTimeStamp = "'Y-m-d-H.i.s'";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $dataProvider = "db2";
+	var $hasAffectedRows = true;
+
+	var $binmode = DB2_BINARY;
+
+	var $useFetchArray = false; // setting this to true will make array elements in FETCH_ASSOC mode case-sensitive
+								// breaking backward-compat
+	var $_bindInputArray = false;	
+	var $_genIDSQL = "VALUES NEXTVAL FOR %s";
+	var $_genSeqSQL = "CREATE SEQUENCE %s START WITH 1 NO MAXVALUE NO CYCLE";
+	var $_dropSeqSQL = "DROP SEQUENCE %s";
+	var $_autocommit = true;
+	var $_haserrorfunctions = true;
+	var $_lastAffectedRows = 0;
+	var $uCaseTables = true; // for meta* functions, uppercase table names
+	var $hasInsertID = true;
+	
+    function _insertid()
+    {
+        return ADOConnection::GetOne('VALUES IDENTITY_VAL_LOCAL()');
+    }
+	
+	function ADODB_db2() 
+	{ 	
+		$this->_haserrorfunctions = ADODB_PHPVER >= 0x4050;
+	}
+	
+		// returns true or false
+	function _connect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+		global $php_errormsg;
+		
+		if (!function_exists('db2_connect')) {
+			ADOConnection::outp("Warning: The old ODBC based DB2 driver has been renamed 'odbc_db2'. This ADOdb driver calls PHP's native db2 extension.");
+			return null;
+		}
+		// This needs to be set before the connect().
+		// Replaces the odbc_binmode() call that was in Execute()
+		ini_set('ibm_db2.binmode', $this->binmode);
+
+		if ($argDatabasename) {
+			$this->_connectionID = db2_connect($argDatabasename,$argUsername,$argPassword);
+		} else {
+			$this->_connectionID = db2_connect($argDSN,$argUsername,$argPassword);
+		}
+		if (isset($php_errormsg)) $php_errormsg = '';
+
+		// For db2_connect(), there is an optional 4th arg.  If present, it must be
+		// an array of valid options.  So far, we don't use them.
+
+		$this->_errorMsg = @db2_conn_errormsg();
+ 
+		if (isset($this->connectStmt)) $this->Execute($this->connectStmt);
+		
+		return $this->_connectionID != false;
+	}
+	
+	// returns true or false
+	function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+		global $php_errormsg;
+	
+		if (!function_exists('db2_connect')) return null;
+		
+		// This needs to be set before the connect().
+		// Replaces the odbc_binmode() call that was in Execute()
+		ini_set('ibm_db2.binmode', $this->binmode);
+
+		if (isset($php_errormsg)) $php_errormsg = '';
+		$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		
+		if ($argDatabasename) {
+			$this->_connectionID = db2_pconnect($argDatabasename,$argUsername,$argPassword);
+		} else {
+			$this->_connectionID = db2_pconnect($argDSN,$argUsername,$argPassword);
+		}
+		if (isset($php_errormsg)) $php_errormsg = '';
+
+		$this->_errorMsg = @db2_conn_errormsg();
+		if ($this->_connectionID && $this->autoRollback) @db2_rollback($this->_connectionID);
+		if (isset($this->connectStmt)) $this->Execute($this->connectStmt);
+		
+		return $this->_connectionID != false;
+	}
+
+	// format and return date string in database timestamp format
+	function DBTimeStamp($ts)
+	{
+		if (empty($ts) && $ts !== 0) return 'null';
+		if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts);
+		return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'YYYY-MM-DD HH24:MI:SS')";
+	}
+	
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+	// use right() and replace() ?
+		if (!$col) $col = $this->sysDate;
+
+		/* use TO_CHAR() if $fmt is TO_CHAR() allowed fmt */
+		if ($fmt== 'Y-m-d H:i:s')
+			return 'TO_CHAR('.$col.", 'YYYY-MM-DD HH24:MI:SS')";
+
+		$s = '';
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			if ($s) $s .= $this->concat_operator;
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				if ($len==1) return "year($col)";
+				$s .= "char(year($col))";
+				break;
+			case 'M':
+				if ($len==1) return "monthname($col)";
+				$s .= "substr(monthname($col),1,3)";
+				break;
+			case 'm':
+				if ($len==1) return "month($col)";
+				$s .= "right(digits(month($col)),2)";
+				break;
+			case 'D':
+			case 'd':
+				if ($len==1) return "day($col)";
+				$s .= "right(digits(day($col)),2)";
+				break;
+			case 'H':
+			case 'h':
+				if ($len==1) return "hour($col)";
+				if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)";	
+				else $s .= "''";
+				break;
+			case 'i':
+			case 'I':
+				if ($len==1) return "minute($col)";
+				if ($col != $this->sysDate)
+					$s .= "right(digits(minute($col)),2)";
+					else $s .= "''";
+				break;
+			case 'S':
+			case 's':
+				if ($len==1) return "second($col)";
+				if ($col != $this->sysDate)
+					$s .= "right(digits(second($col)),2)";
+				else $s .= "''";
+				break;
+			default:
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				$s .= $this->qstr($ch);
+			}
+		}
+		return $s;
+	} 
+ 
+	
+	function ServerInfo()
+	{
+	
+		if (!empty($this->host) && ADODB_PHPVER >= 0x4300) {
+			$dsn = strtoupper($this->host);
+			$first = true;
+			$found = false;
+			
+			if (!function_exists('db2_data_source')) return false;
+			
+			while(true) {
+				
+				$rez = @db2_data_source($this->_connectionID,
+					$first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT);
+				$first = false;
+				if (!is_array($rez)) break;
+				if (strtoupper($rez['server']) == $dsn) {
+					$found = true;
+					break;
+				}
+			} 
+			if (!$found) return ADOConnection::ServerInfo();
+			if (!isset($rez['version'])) $rez['version'] = '';
+			return $rez;
+		} else {
+			return ADOConnection::ServerInfo();
+		}
+	}
+
+	
+	function CreateSequence($seqname='adodbseq',$start=1)
+	{
+		if (empty($this->_genSeqSQL)) return false;
+		$ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
+		if (!$ok) return false;
+		return true;
+	}
+	
+	function DropSequence($seqname)
+	{
+		if (empty($this->_dropSeqSQL)) return false;
+		return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
+	}
+	
+	/*
+		This algorithm is not very efficient, but works even if table locking
+		is not available.
+		
+		Will return false if unable to generate an ID after $MAXLOOPS attempts.
+	*/
+	function GenID($seq='adodbseq',$start=1)
+	{	
+		// if you have to modify the parameter below, your database is overloaded,
+		// or you need to implement generation of id's yourself!
+		$num = $this->GetOne("VALUES NEXTVAL FOR $seq");
+				return $num;
+			}
+
+
+	function ErrorMsg()
+	{
+		if ($this->_haserrorfunctions) {
+			if ($this->_errorMsg !== false) return $this->_errorMsg;
+			if (empty($this->_connectionID)) return @db2_conn_errormsg();
+			return @db2_conn_errormsg($this->_connectionID);
+		} else return ADOConnection::ErrorMsg();
+	}
+	
+	function ErrorNo()
+	{
+		
+		if ($this->_haserrorfunctions) {
+			if ($this->_errorCode !== false) {
+				// bug in 4.0.6, error number can be corrupted string (should be 6 digits)
+				return (strlen($this->_errorCode)<=2) ? 0 : $this->_errorCode;
+			}
+
+			if (empty($this->_connectionID)) $e = @db2_conn_error(); 
+			else $e = @db2_conn_error($this->_connectionID);
+			
+			 // bug in 4.0.6, error number can be corrupted string (should be 6 digits)
+			 // so we check and patch
+			if (strlen($e)<=2) return 0;
+			return $e;
+		} else return ADOConnection::ErrorNo();
+	}
+	
+	
+
+	function BeginTrans()
+	{	
+		if (!$this->hasTransactions) return false;
+		if ($this->transOff) return true; 
+		$this->transCnt += 1;
+		$this->_autocommit = false;
+		return db2_autocommit($this->_connectionID,false);
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true; 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->_autocommit = true;
+		$ret = db2_commit($this->_connectionID);
+		db2_autocommit($this->_connectionID,true);
+		return $ret;
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true; 
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->_autocommit = true;
+		$ret = db2_rollback($this->_connectionID);
+		db2_autocommit($this->_connectionID,true);
+		return $ret;
+	}
+	
+	function MetaPrimaryKeys($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		if ($this->uCaseTables) $table = strtoupper($table);
+		$schema = '';
+		$this->_findschema($table,$schema);
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = @db2_primarykeys($this->_connectionID,'',$schema,$table);
+		
+		if (!$qid) {
+			$ADODB_FETCH_MODE = $savem;
+			return false;
+		}
+		$rs = new ADORecordSet_db2($qid);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if (!$rs) return false;
+		
+		$arr =& $rs->GetArray();
+		$rs->Close();
+		$arr2 = array();
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if ($arr[$i][3]) $arr2[] = $arr[$i][3];
+		}
+		return $arr2;
+	}
+	
+	function MetaForeignKeys($table, $owner = FALSE, $upper = FALSE, $asociative = FALSE )
+	{
+	global $ADODB_FETCH_MODE;
+	
+		if ($this->uCaseTables) $table = strtoupper($table);
+		$schema = '';
+		$this->_findschema($table,$schema);
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = @db2_foreign_keys($this->_connectionID,'',$schema,$table);
+		if (!$qid) {
+			$ADODB_FETCH_MODE = $savem;
+			return false;
+		}
+		$rs = new ADORecordSet_db2($qid);
+
+		$ADODB_FETCH_MODE = $savem;
+		/*
+		$rs->fields indices
+		0 PKTABLE_CAT
+		1 PKTABLE_SCHEM
+		2 PKTABLE_NAME
+		3 PKCOLUMN_NAME
+		4 FKTABLE_CAT
+		5 FKTABLE_SCHEM
+		6 FKTABLE_NAME
+		7 FKCOLUMN_NAME
+		*/	
+		if (!$rs) return false;
+
+		$foreign_keys = array();	 	 
+		while (!$rs->EOF) {
+			if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) {
+				if (!is_array($foreign_keys[$rs->fields[5].'.'.$rs->fields[6]])) 
+					$foreign_keys[$rs->fields[5].'.'.$rs->fields[6]] = array();
+				$foreign_keys[$rs->fields[5].'.'.$rs->fields[6]][$rs->fields[7]] = $rs->fields[3];	 		
+			}
+			$rs->MoveNext();
+		}
+
+		$rs->Close();
+		return $foreign_key;
+	}
+	
+	
+	function &MetaTables($ttype=false,$schema=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = db2_tables($this->_connectionID);
+		
+		$rs = new ADORecordSet_db2($qid);
+		
+		$ADODB_FETCH_MODE = $savem;
+		if (!$rs) {
+			$false = false;
+			return $false;
+		}
+		
+		$arr =& $rs->GetArray();
+		
+		$rs->Close();
+		$arr2 = array();
+		
+		if ($ttype) {
+			$isview = strncmp($ttype,'V',1) === 0;
+		}
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if (!$arr[$i][2]) continue;
+			$type = $arr[$i][3];
+			$schemaval = ($schema) ? $arr[$i][1].'.' : '';
+			if ($ttype) { 
+				if ($isview) {
+					if (strncmp($type,'V',1) === 0) $arr2[] = $schemaval.$arr[$i][2];
+				} else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2];
+			} else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2];
+		}
+		return $arr2;
+	}
+	
+/*
+See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/db2/htm/db2datetime_data_type_changes.asp
+/ SQL data type codes /
+#define	SQL_UNKNOWN_TYPE	0
+#define SQL_CHAR			1
+#define SQL_NUMERIC		 2
+#define SQL_DECIMAL		 3
+#define SQL_INTEGER		 4
+#define SQL_SMALLINT		5
+#define SQL_FLOAT		   6
+#define SQL_REAL			7
+#define SQL_DOUBLE		  8
+#if (DB2VER >= 0x0300)
+#define SQL_DATETIME		9
+#endif
+#define SQL_VARCHAR		12
+
+
+/ One-parameter shortcuts for date/time data types /
+#if (DB2VER >= 0x0300)
+#define SQL_TYPE_DATE	  91
+#define SQL_TYPE_TIME	  92
+#define SQL_TYPE_TIMESTAMP 93
+
+#define SQL_UNICODE                             (-95)
+#define SQL_UNICODE_VARCHAR                     (-96)
+#define SQL_UNICODE_LONGVARCHAR                 (-97)
+*/
+	function DB2Types($t)
+	{
+		switch ((integer)$t) {
+		case 1:	
+		case 12:
+		case 0:
+		case -95:
+		case -96:
+			return 'C';
+		case -97:
+		case -1: //text
+			return 'X';
+		case -4: //image
+			return 'B';
+				
+		case 9:	
+		case 91:
+			return 'D';
+		
+		case 10:
+		case 11:
+		case 92:
+		case 93:
+			return 'T';
+			
+		case 4:
+		case 5:
+		case -6:
+			return 'I';
+			
+		case -11: // uniqidentifier
+			return 'R';
+		case -7: //bit
+			return 'L';
+		
+		default:
+			return 'N';
+		}
+	}
+	
+	function &MetaColumns($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$false = false;
+		if ($this->uCaseTables) $table = strtoupper($table);
+		$schema = '';
+		$this->_findschema($table,$schema);
+		
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+        	$colname = "%";
+	        $qid = db2_columns($this->_connectionID, "", $schema, $table, $colname);
+		if (empty($qid)) return $false;
+		
+		$rs =& new ADORecordSet_db2($qid);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if (!$rs) return $false;
+		$rs->_fetch();
+		
+		$retarr = array();
+		
+		/*
+		$rs->fields indices
+		0 TABLE_QUALIFIER
+		1 TABLE_SCHEM
+		2 TABLE_NAME
+		3 COLUMN_NAME
+		4 DATA_TYPE
+		5 TYPE_NAME
+		6 PRECISION
+		7 LENGTH
+		8 SCALE
+		9 RADIX
+		10 NULLABLE
+		11 REMARKS
+		*/
+		while (!$rs->EOF) {
+			if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) {
+				$fld = new ADOFieldObject();
+				$fld->name = $rs->fields[3];
+				$fld->type = $this->DB2Types($rs->fields[4]);
+				
+				// ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp
+				// access uses precision to store length for char/varchar
+				if ($fld->type == 'C' or $fld->type == 'X') {
+					if ($rs->fields[4] <= -95) // UNICODE
+						$fld->max_length = $rs->fields[7]/2;
+					else
+						$fld->max_length = $rs->fields[7];
+				} else 
+					$fld->max_length = $rs->fields[7];
+				$fld->not_null = !empty($rs->fields[10]);
+				$fld->scale = $rs->fields[8];
+				$fld->primary_key = false;
+				$retarr[strtoupper($fld->name)] = $fld;	
+			} else if (sizeof($retarr)>0)
+				break;
+			$rs->MoveNext();
+		}
+		$rs->Close(); 
+		if (empty($retarr)) $retarr = false;
+
+	      $qid = db2_primary_keys($this->_connectionID, "", $schema, $table);
+		if (empty($qid)) return $false;
+		
+		$rs =& new ADORecordSet_db2($qid);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if (!$rs) return $retarr;
+		$rs->_fetch();
+		
+		/*
+		$rs->fields indices
+		0 TABLE_CAT
+		1 TABLE_SCHEM
+		2 TABLE_NAME
+		3 COLUMN_NAME
+		4 KEY_SEQ
+		5 PK_NAME
+		*/
+		while (!$rs->EOF) {
+			if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) {
+				$retarr[strtoupper($rs->fields[3])]->primary_key = true;
+			} else if (sizeof($retarr)>0)
+				break;
+			$rs->MoveNext();
+		}
+		$rs->Close(); 
+		
+		if (empty($retarr)) $retarr = false;
+		return $retarr;
+	}
+	
+	function Prepare($sql)
+	{
+		if (! $this->_bindInputArray) return $sql; // no binding
+		$stmt = db2_prepare($this->_connectionID,$sql);
+		if (!$stmt) {
+			// we don't know whether db2 driver is parsing prepared stmts, so just return sql
+			return $sql;
+		}
+		return array($sql,$stmt,false);
+	}
+
+	/* returns queryID or false */
+	function _query($sql,$inputarr=false) 
+	{
+	GLOBAL $php_errormsg;
+		if (isset($php_errormsg)) $php_errormsg = '';
+		$this->_error = '';
+		
+		if ($inputarr) {
+			if (is_array($sql)) {
+				$stmtid = $sql[1];
+			} else {
+				$stmtid = db2_prepare($this->_connectionID,$sql);
+	
+				if ($stmtid == false) {
+					$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+					return false;
+				}
+			}
+			
+			if (! db2_execute($stmtid,$inputarr)) {
+				if ($this->_haserrorfunctions) {
+					$this->_errorMsg = db2_stmt_errormsg();
+					$this->_errorCode = db2_stmt_error();
+				}
+				return false;
+			}
+		
+		} else if (is_array($sql)) {
+			$stmtid = $sql[1];
+			if (!db2_execute($stmtid)) {
+				if ($this->_haserrorfunctions) {
+					$this->_errorMsg = db2_stmt_errormsg();
+					$this->_errorCode = db2_stmt_error();
+				}
+				return false;
+			}
+		} else
+			$stmtid = @db2_exec($this->_connectionID,$sql);
+		
+		$this->_lastAffectedRows = 0;
+		if ($stmtid) {
+			if (@db2_num_fields($stmtid) == 0) {
+				$this->_lastAffectedRows = db2_num_rows($stmtid);
+				$stmtid = true;
+			} else {
+				$this->_lastAffectedRows = 0;
+			}
+			
+			if ($this->_haserrorfunctions) {
+				$this->_errorMsg = '';
+				$this->_errorCode = 0;
+			} else
+				$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		} else {
+			if ($this->_haserrorfunctions) {
+				$this->_errorMsg = db2_stmt_errormsg();
+				$this->_errorCode = db2_stmt_error();
+			} else
+				$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+
+		}
+		return $stmtid;
+	}
+
+	/*
+		Insert a null into the blob field of the table first.
+		Then use UpdateBlob to store the blob.
+		
+		Usage:
+		 
+		$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+		$conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
+	*/
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+		return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false;
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		$ret = @db2_close($this->_connectionID);
+		$this->_connectionID = false;
+		return $ret;
+	}
+
+	function _affectedrows()
+	{
+		return $this->_lastAffectedRows;
+	}
+	
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_db2 extends ADORecordSet {	
+	
+	var $bind = false;
+	var $databaseType = "db2";		
+	var $dataProvider = "db2";
+	var $useFetchArray;
+	
+	function ADORecordSet_db2($id,$mode=false)
+	{
+		if ($mode === false) {  
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		
+		$this->_queryID = $id;
+	}
+
+
+	// returns the field object
+	function &FetchField($offset = -1) 
+	{
+		$o= new ADOFieldObject();
+		$o->name = @db2_field_name($this->_queryID,$offset);
+		$o->type = @db2_field_type($this->_queryID,$offset);
+		$o->max_length = db2_field_width($this->_queryID,$offset);
+		if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
+		else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
+		return $o;
+	}
+	
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+		
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+		$this->_numOfRows = ($ADODB_COUNTRECS) ? @db2_num_rows($this->_queryID) : -1;
+		$this->_numOfFields = @db2_num_fields($this->_queryID);
+		// some silly drivers such as db2 as/400 and intersystems cache return _numOfRows = 0
+		if ($this->_numOfRows == 0) $this->_numOfRows = -1;
+	}	
+	
+	function _seek($row)
+	{
+		return false;
+	}
+	
+	// speed up SelectLimit() by switching to ADODB_FETCH_NUM as ADODB_FETCH_ASSOC is emulated
+	function &GetArrayLimit($nrows,$offset=-1) 
+	{
+		if ($offset <= 0) {
+			$rs =& $this->GetArray($nrows);
+			return $rs;
+		}
+		$savem = $this->fetchMode;
+		$this->fetchMode = ADODB_FETCH_NUM;
+		$this->Move($offset);
+		$this->fetchMode = $savem;
+		
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+			$this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE);
+		}
+		
+		$results = array();
+		$cnt = 0;
+		while (!$this->EOF && $nrows != $cnt) {
+			$results[$cnt++] = $this->fields;
+			$this->MoveNext();
+		}
+		
+		return $results;
+	}
+	
+	
+	function MoveNext() 
+	{
+		if ($this->_numOfRows != 0 && !$this->EOF) {		
+			$this->_currentRow++;
+			
+			$this->fields = @db2_fetch_array($this->_queryID);
+			if ($this->fields) {
+				if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+					$this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE);
+				}
+				return true;
+			}
+		}
+		$this->fields = false;
+		$this->EOF = true;
+		return false;
+	}	
+	
+	function _fetch()
+	{
+
+		$this->fields = db2_fetch_array($this->_queryID);
+		if ($this->fields) {
+			if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+				$this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE);
+			}
+			return true;
+		}
+		$this->fields = false;
+		return false;
+	}
+	
+	function _close() 
+	{
+		return @db2_free_result($this->_queryID);		
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-fbsql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-fbsql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-fbsql.inc.php	(revision 225)
@@ -0,0 +1,266 @@
+<?php
+/*
+ @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+ Contribution by Frank M. Kromann <frank@frontbase.com>. 
+  Set tabs to 8.
+*/ 
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (! defined("_ADODB_FBSQL_LAYER")) {
+ define("_ADODB_FBSQL_LAYER", 1 );
+
+class ADODB_fbsql extends ADOConnection {
+	var $databaseType = 'fbsql';
+	var $hasInsertID = true;
+	var $hasAffectedRows = true;	
+	var $metaTablesSQL = "SHOW TABLES";	
+	var $metaColumnsSQL = "SHOW COLUMNS FROM %s";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $hasLimit = false;
+	
+	function ADODB_fbsql() 
+	{			
+	}
+	
+	function _insertid()
+	{
+			return fbsql_insert_id($this->_connectionID);
+	}
+	
+	function _affectedrows()
+	{
+			return fbsql_affected_rows($this->_connectionID);
+	}
+  
+  	function &MetaDatabases()
+	{
+		$qid = fbsql_list_dbs($this->_connectionID);
+		$arr = array();
+		$i = 0;
+		$max = fbsql_num_rows($qid);
+		while ($i < $max) {
+			$arr[] = fbsql_tablename($qid,$i);
+			$i += 1;
+		}
+		return $arr;
+	}
+
+	// returns concatenated string
+	function Concat()
+	{
+		$s = "";
+		$arr = func_get_args();
+		$first = true;
+
+		$s = implode(',',$arr);
+		if (sizeof($arr) > 0) return "CONCAT($s)";
+		else return '';
+	}
+	
+	// returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		$this->_connectionID = fbsql_connect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		$this->_connectionID = fbsql_pconnect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+ 	function &MetaColumns($table) 
+	{
+		if ($this->metaColumnsSQL) {
+			
+			$rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+			
+			if ($rs === false) return false;
+			
+			$retarr = array();
+			while (!$rs->EOF){
+				$fld = new ADOFieldObject();
+				$fld->name = $rs->fields[0];
+				$fld->type = $rs->fields[1];
+					
+				// split type into type(length):
+				if (preg_match("/^(.+)\((\d+)\)$/", $fld->type, $query_array)) {
+					$fld->type = $query_array[1];
+					$fld->max_length = $query_array[2];
+				} else {
+					$fld->max_length = -1;
+				}
+				$fld->not_null = ($rs->fields[2] != 'YES');
+				$fld->primary_key = ($rs->fields[3] == 'PRI');
+				$fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false);
+				$fld->binary = (strpos($fld->type,'blob') !== false);
+				
+				$retarr[strtoupper($fld->name)] = $fld;	
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			return $retarr;	
+		}
+		return false;
+	}
+		
+	// returns true or false
+	function SelectDB($dbName) 
+	{
+		$this->database = $dbName;
+		if ($this->_connectionID) {
+			return @fbsql_select_db($dbName,$this->_connectionID);		
+		}
+		else return false;	
+	}
+	
+	
+	// returns queryID or false
+	function _query($sql,$inputarr)
+	{
+		return fbsql_query("$sql;",$this->_connectionID);
+	}
+
+	/*	Returns: the last error message from previous database operation	*/	
+	function ErrorMsg() 
+	{
+		$this->_errorMsg = @fbsql_error($this->_connectionID);
+			return $this->_errorMsg;
+	}
+	
+	/*	Returns: the last error number from previous database operation	*/	
+	function ErrorNo() 
+	{
+		return @fbsql_errno($this->_connectionID);
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		return @fbsql_close($this->_connectionID);
+	}
+		
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_fbsql extends ADORecordSet{	
+	
+	var $databaseType = "fbsql";
+	var $canSeek = true;
+	
+	function ADORecordSet_fbsql($queryID,$mode=false) 
+	{
+		if (!$mode) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode) {
+		case ADODB_FETCH_NUM: $this->fetchMode = FBSQL_NUM; break;
+		case ADODB_FETCH_ASSOC: $this->fetchMode = FBSQL_ASSOC; break;
+		case ADODB_FETCH_BOTH: 
+		default:
+		$this->fetchMode = FBSQL_BOTH; break;
+		}
+		return $this->ADORecordSet($queryID);
+	}
+	
+	function _initrs()
+	{
+	GLOBAL $ADODB_COUNTRECS;
+		$this->_numOfRows = ($ADODB_COUNTRECS) ? @fbsql_num_rows($this->_queryID):-1;
+		$this->_numOfFields = @fbsql_num_fields($this->_queryID);
+	}
+	
+
+
+	function &FetchField($fieldOffset = -1) {
+		if ($fieldOffset != -1) {
+			$o =  @fbsql_fetch_field($this->_queryID, $fieldOffset);
+			//$o->max_length = -1; // fbsql returns the max length less spaces -- so it is unrealiable
+			$f = @fbsql_field_flags($this->_queryID,$fieldOffset);
+			$o->binary = (strpos($f,'binary')!== false);
+		}
+		else if ($fieldOffset == -1) {	/*	The $fieldOffset argument is not provided thus its -1 	*/
+			$o = @fbsql_fetch_field($this->_queryID);// fbsql returns the max length less spaces -- so it is unrealiable
+			//$o->max_length = -1;
+		}
+		
+		return $o;
+	}
+		
+	function _seek($row)
+	{
+		return @fbsql_data_seek($this->_queryID,$row);
+	}
+	
+	function _fetch($ignore_fields=false)
+	{
+		$this->fields = @fbsql_fetch_array($this->_queryID,$this->fetchMode);
+		return ($this->fields == true);
+	}
+	
+	function _close() {
+		return @fbsql_free_result($this->_queryID);		
+	}
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		$len = -1; // fbsql max_length is not accurate
+		switch (strtoupper($t)) {
+		case 'CHARACTER':
+		case 'CHARACTER VARYING': 
+		case 'BLOB': 
+		case 'CLOB': 
+		case 'BIT': 
+		case 'BIT VARYING': 
+			if ($len <= $this->blobSize) return 'C';
+			
+		// so we have to check whether binary...
+		case 'IMAGE':
+		case 'LONGBLOB': 
+		case 'BLOB':
+		case 'MEDIUMBLOB':
+			return !empty($fieldobj->binary) ? 'B' : 'X';
+			
+		case 'DATE': return 'D';
+		
+		case 'TIME':
+		case 'TIME WITH TIME ZONE':
+		case 'TIMESTAMP': 
+		case 'TIMESTAMP WITH TIME ZONE': return 'T';
+		
+		case 'PRIMARY_KEY':
+			return 'R';
+		case 'INTEGER':
+		case 'SMALLINT': 
+		case 'BOOLEAN':
+			
+			if (!empty($fieldobj->primary_key)) return 'R';
+			else return 'I';
+		
+		default: return 'N';
+		}
+	}
+
+} //class
+} // defined
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-firebird.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-firebird.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-firebird.inc.php	(revision 225)
@@ -0,0 +1,77 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR."/drivers/adodb-ibase.inc.php");
+
+class ADODB_firebird extends ADODB_ibase {
+	var $databaseType = "firebird";	
+	var $dialect = 3;
+	
+	var $sysTimeStamp = "CURRENT_TIMESTAMP"; //"cast('NOW' as timestamp)";
+	
+	function ADODB_firebird()
+	{	
+		$this->ADODB_ibase();
+	}
+	
+	function ServerInfo()
+	{
+		$arr['dialect'] = $this->dialect;
+		switch($arr['dialect']) {
+		case '': 
+		case '1': $s = 'Firebird Dialect 1'; break;
+		case '2': $s = 'Firebird Dialect 2'; break;
+		default:
+		case '3': $s = 'Firebird Dialect 3'; break;
+		}
+		$arr['version'] = ADOConnection::_findvers($s);
+		$arr['description'] = $s;
+		return $arr;
+	}
+	
+	// Note that Interbase 6.5 uses this ROWS instead - don't you love forking wars!
+	// 		SELECT col1, col2 FROM table ROWS 5 -- get 5 rows 
+	//		SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs=0)
+	{
+		$nrows = (integer) $nrows;
+		$offset = (integer) $offset;
+		$str = 'SELECT ';
+		if ($nrows >= 0) $str .= "FIRST $nrows "; 
+		$str .=($offset>=0) ? "SKIP $offset " : '';
+		
+		$sql = preg_replace('/^[ \t]*select/i',$str,$sql); 
+		if ($secs)
+			$rs =& $this->CacheExecute($secs,$sql,$inputarr);
+		else
+			$rs =& $this->Execute($sql,$inputarr);
+			
+		return $rs;
+	}
+	
+	
+};
+ 
+
+class  ADORecordSet_firebird extends ADORecordSet_ibase {	
+	
+	var $databaseType = "firebird";		
+	
+	function ADORecordSet_firebird($id,$mode=false)
+	{
+		$this->ADORecordSet_ibase($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ibase.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ibase.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ibase.inc.php	(revision 225)
@@ -0,0 +1,887 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.  
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Interbase data driver. Requires interbase client. Works on Windows and Unix.
+
+  3 Jan 2002 -- suggestions by Hans-Peter Oeri <kampfcaspar75@oeri.ch>
+  	changed transaction handling and added experimental blob stuff
+  
+  Docs to interbase at the website
+   http://www.synectics.co.za/php3/tutorial/IB_PHP3_API.html
+   
+  To use gen_id(), see
+   http://www.volny.cz/iprenosil/interbase/ip_ib_code.htm#_code_creategen
+   
+   $rs = $conn->Execute('select gen_id(adodb,1) from rdb$database');
+   $id = $rs->fields[0];
+   $conn->Execute("insert into table (id, col1,...) values ($id, $val1,...)");
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB_ibase extends ADOConnection {
+	var $databaseType = "ibase";
+	var $dataProvider = "ibase";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $ibase_datefmt = '%Y-%m-%d'; // For hours,mins,secs change to '%Y-%m-%d %H:%M:%S';
+	var $fmtDate = "'Y-m-d'";
+	var $ibase_timestampfmt = "%Y-%m-%d %H:%M:%S";
+	var $ibase_timefmt = "%H:%M:%S";
+	var $fmtTimeStamp = "'Y-m-d, H:i:s'";
+	var $concat_operator='||';
+	var $_transactionID;
+	var $metaTablesSQL = "select rdb\$relation_name from rdb\$relations where rdb\$relation_name not like 'RDB\$%'";
+	//OPN STUFF start
+	var $metaColumnsSQL = "select a.rdb\$field_name, a.rdb\$null_flag, a.rdb\$default_source, b.rdb\$field_length, b.rdb\$field_scale, b.rdb\$field_sub_type, b.rdb\$field_precision, b.rdb\$field_type from rdb\$relation_fields a, rdb\$fields b where a.rdb\$field_source = b.rdb\$field_name and a.rdb\$relation_name = '%s' order by a.rdb\$field_position asc";
+	//OPN STUFF end
+	var $ibasetrans;
+	var $hasGenID = true;
+	var $_bindInputArray = true;
+	var $buffers = 0;
+	var $dialect = 1;
+	var $sysDate = "cast('TODAY' as timestamp)";
+	var $sysTimeStamp = "CURRENT_TIMESTAMP"; //"cast('NOW' as timestamp)";
+	var $ansiOuter = true;
+	var $hasAffectedRows = false;
+	var $poorAffectedRows = true;
+	var $blobEncodeType = 'C';
+	var $role = false;
+	
+	function ADODB_ibase() 
+	{
+		 if (defined('IBASE_DEFAULT')) $this->ibasetrans = IBASE_DEFAULT;
+  	}
+	
+	
+	   // returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$persist=false)
+	{  
+		if (!function_exists('ibase_pconnect')) return null;
+		if ($argDatabasename) $argHostname .= ':'.$argDatabasename;
+		$fn = ($persist) ? 'ibase_pconnect':'ibase_connect';
+		if ($this->role)
+			$this->_connectionID = $fn($argHostname,$argUsername,$argPassword,
+					$this->charSet,$this->buffers,$this->dialect,$this->role);
+		else	
+			$this->_connectionID = $fn($argHostname,$argUsername,$argPassword,
+					$this->charSet,$this->buffers,$this->dialect);
+		
+		if ($this->dialect != 1) { // http://www.ibphoenix.com/ibp_60_del_id_ds.html
+			$this->replaceQuote = "''";
+		}
+		if ($this->_connectionID === false) {
+			$this->_handleerror();
+			return false;
+		}
+		
+		// PHP5 change.
+		if (function_exists('ibase_timefmt')) {
+			ibase_timefmt($this->ibase_datefmt,IBASE_DATE );
+			if ($this->dialect == 1) ibase_timefmt($this->ibase_datefmt,IBASE_TIMESTAMP );
+			else ibase_timefmt($this->ibase_timestampfmt,IBASE_TIMESTAMP );
+			ibase_timefmt($this->ibase_timefmt,IBASE_TIME );
+			
+		} else {
+			ini_set("ibase.timestampformat", $this->ibase_timestampfmt);
+			ini_set("ibase.dateformat", $this->ibase_datefmt);
+			ini_set("ibase.timeformat", $this->ibase_timefmt);
+		}
+		return true;
+	}
+	   // returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,true);
+	}	
+	
+	
+	function MetaPrimaryKeys($table,$owner_notused=false,$internalKey=false)
+	{	
+		if ($internalKey) return array('RDB$DB_KEY');
+		
+		$table = strtoupper($table);
+		
+		$sql = 'SELECT S.RDB$FIELD_NAME AFIELDNAME
+	FROM RDB$INDICES I JOIN RDB$INDEX_SEGMENTS S ON I.RDB$INDEX_NAME=S.RDB$INDEX_NAME  
+	WHERE I.RDB$RELATION_NAME=\''.$table.'\' and I.RDB$INDEX_NAME like \'RDB$PRIMARY%\'
+	ORDER BY I.RDB$INDEX_NAME,S.RDB$FIELD_POSITION';
+
+		$a = $this->GetCol($sql,false,true);
+		if ($a && sizeof($a)>0) return $a;
+		return false;	  
+	}
+	
+	function ServerInfo()
+	{
+		$arr['dialect'] = $this->dialect;
+		switch($arr['dialect']) {
+		case '': 
+		case '1': $s = 'Interbase 5.5 or earlier'; break;
+		case '2': $s = 'Interbase 5.6'; break;
+		default:
+		case '3': $s = 'Interbase 6.0'; break;
+		}
+		$arr['version'] = ADOConnection::_findvers($s);
+		$arr['description'] = $s;
+		return $arr;
+	}
+
+	function BeginTrans()
+	{	 
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		$this->autoCommit = false;
+	 	$this->_transactionID = $this->_connectionID;//ibase_trans($this->ibasetrans, $this->_connectionID);
+		return $this->_transactionID;
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$ret = false;
+		$this->autoCommit = true;
+		if ($this->_transactionID) {
+			   		//print ' commit ';
+			$ret = ibase_commit($this->_transactionID);
+		}
+		$this->_transactionID = false;
+		return $ret;
+	}
+	
+	// there are some compat problems with ADODB_COUNTRECS=false and $this->_logsql currently.
+	// it appears that ibase extension cannot support multiple concurrent queryid's
+	function &_Execute($sql,$inputarr=false) 
+	{
+	global $ADODB_COUNTRECS;
+	
+		if ($this->_logsql) {
+			$savecrecs = $ADODB_COUNTRECS;
+			$ADODB_COUNTRECS = true; // force countrecs
+			$ret =& ADOConnection::_Execute($sql,$inputarr);
+			$ADODB_COUNTRECS = $savecrecs;
+		} else {
+			$ret =& ADOConnection::_Execute($sql,$inputarr);
+		}
+		return $ret;
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$ret = false;
+		$this->autoCommit = true;
+		if ($this->_transactionID) 
+				  $ret = ibase_rollback($this->_transactionID);
+		$this->_transactionID = false;   
+		
+		return $ret;
+	}
+	
+	function &MetaIndexes ($table, $primary = FALSE, $owner=false)
+	{
+        // save old fetch mode
+        global $ADODB_FETCH_MODE;
+        $false = false;
+        $save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+               $savem = $this->SetFetchMode(FALSE);
+        }
+        $table = strtoupper($table);
+        $sql = "SELECT * FROM RDB\$INDICES WHERE RDB\$RELATION_NAME = '".$table."'";
+        if (!$primary) {
+        	$sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$%'";
+        } else {
+        	$sql .= " AND RDB\$INDEX_NAME NOT LIKE 'RDB\$FOREIGN%'";
+        }
+        // get index details
+        $rs = $this->Execute($sql);
+        if (!is_object($rs)) {
+	        // restore fetchmode
+	        if (isset($savem)) {
+	            $this->SetFetchMode($savem);
+	        }
+	        $ADODB_FETCH_MODE = $save;
+            return $false;
+        }
+        
+        $indexes = array();
+		while ($row = $rs->FetchRow()) {
+			$index = $row[0];
+             if (!isset($indexes[$index])) {
+             		if (is_null($row[3])) {$row[3] = 0;}
+                     $indexes[$index] = array(
+                             'unique' => ($row[3] == 1),
+                             'columns' => array()
+                     );
+             }
+			$sql = "SELECT * FROM RDB\$INDEX_SEGMENTS WHERE RDB\$INDEX_NAME = '".$index."' ORDER BY RDB\$FIELD_POSITION ASC";
+			$rs1 = $this->Execute($sql);
+            while ($row1 = $rs1->FetchRow()) {
+             	$indexes[$index]['columns'][$row1[2]] = $row1[1];
+        	}
+		}
+        // restore fetchmode
+        if (isset($savem)) {
+            $this->SetFetchMode($savem);
+        }
+        $ADODB_FETCH_MODE = $save;
+        
+        return $indexes;
+	}
+
+	
+	// See http://community.borland.com/article/0,1410,25844,00.html
+	function RowLock($tables,$where,$col)
+	{
+		if ($this->autoCommit) $this->BeginTrans();
+		$this->Execute("UPDATE $table SET $col=$col WHERE $where "); // is this correct - jlim?
+		return 1;
+	}
+	
+	
+	function CreateSequence($seqname,$startID=1)
+	{
+		$ok = $this->Execute(("INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" ));
+		if (!$ok) return false;
+		return $this->Execute("SET GENERATOR $seqname TO ".($startID-1).';');
+	}
+	
+	function DropSequence($seqname)
+	{
+		$seqname = strtoupper($seqname);
+		$this->Execute("delete from RDB\$GENERATORS where RDB\$GENERATOR_NAME='$seqname'");
+	}
+	
+	function GenID($seqname='adodbseq',$startID=1)
+	{
+		$getnext = ("SELECT Gen_ID($seqname,1) FROM RDB\$DATABASE");
+		$rs = @$this->Execute($getnext);
+		if (!$rs) {
+			$this->Execute(("INSERT INTO RDB\$GENERATORS (RDB\$GENERATOR_NAME) VALUES (UPPER('$seqname'))" ));
+			$this->Execute("SET GENERATOR $seqname TO ".($startID-1).';');
+			$rs = $this->Execute($getnext);
+		}
+		if ($rs && !$rs->EOF) $this->genID = (integer) reset($rs->fields);
+		else $this->genID = 0; // false
+		
+		if ($rs) $rs->Close();
+		
+		return $this->genID;
+	}
+
+	function SelectDB($dbName) 
+	{
+		   return false;
+	}
+
+	function _handleerror()
+	{
+		$this->_errorMsg = ibase_errmsg();
+	}
+
+	function ErrorNo() 
+	{
+		if (preg_match('/error code = ([\-0-9]*)/i', $this->_errorMsg,$arr)) return (integer) $arr[1];
+		else return 0;
+	}
+
+	function ErrorMsg() 
+	{
+			return $this->_errorMsg;
+	}
+
+	function Prepare($sql)
+	{
+		$stmt = ibase_prepare($this->_connectionID,$sql);
+		if (!$stmt) return false;
+		return array($sql,$stmt);
+	}
+
+	   // returns query ID if successful, otherwise false
+	   // there have been reports of problems with nested queries - the code is probably not re-entrant?
+	function _query($sql,$iarr=false)
+	{ 
+
+		if (!$this->autoCommit && $this->_transactionID) {
+			$conn = $this->_transactionID;
+			$docommit = false;
+		} else {
+			$conn = $this->_connectionID;
+			$docommit = true;
+		}
+		if (is_array($sql)) {
+			$fn = 'ibase_execute';
+			$sql = $sql[1];
+			if (is_array($iarr)) {
+				if  (ADODB_PHPVER >= 0x4050) { // actually 4.0.4
+					if ( !isset($iarr[0]) ) $iarr[0] = ''; // PHP5 compat hack
+					$fnarr =& array_merge( array($sql) , $iarr);
+					$ret = call_user_func_array($fn,$fnarr);
+				} else {
+					switch(sizeof($iarr)) {
+					case 1: $ret = $fn($sql,$iarr[0]); break;
+					case 2: $ret = $fn($sql,$iarr[0],$iarr[1]); break;
+					case 3: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2]); break;
+					case 4: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3]); break;
+					case 5: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4]); break;
+					case 6: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break;
+					case 7: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break;
+					default: ADOConnection::outp( "Too many parameters to ibase query $sql");
+					case 8: $ret = $fn($sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break;
+					}
+				}
+			} else $ret = $fn($sql); 
+		} else {
+			$fn = 'ibase_query';
+		
+			if (is_array($iarr)) {	
+				if (ADODB_PHPVER >= 0x4050) { // actually 4.0.4
+					if (sizeof($iarr) == 0) $iarr[0] = ''; // PHP5 compat hack
+					$fnarr =& array_merge( array($conn,$sql) , $iarr);
+					$ret = call_user_func_array($fn,$fnarr);
+				} else {
+					switch(sizeof($iarr)) {
+					case 1: $ret = $fn($conn,$sql,$iarr[0]); break;
+					case 2: $ret = $fn($conn,$sql,$iarr[0],$iarr[1]); break;
+					case 3: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2]); break;
+					case 4: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3]); break;
+					case 5: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4]); break;
+					case 6: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5]); break;
+					case 7: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6]); break;
+					default: ADOConnection::outp( "Too many parameters to ibase query $sql");
+					case 8: $ret = $fn($conn,$sql,$iarr[0],$iarr[1],$iarr[2],$iarr[3],$iarr[4],$iarr[5],$iarr[6],$iarr[7]); break;
+					}
+				}
+			} else $ret = $fn($conn,$sql); 
+		}
+		if ($docommit && $ret === true) ibase_commit($this->_connectionID);
+
+		$this->_handleerror();
+		return $ret;
+	}
+
+	 // returns true or false
+	 function _close()
+	 {	   
+		if (!$this->autoCommit) @ibase_rollback($this->_connectionID);
+		return @ibase_close($this->_connectionID);
+	 }
+	
+	//OPN STUFF start
+	function _ConvertFieldType(&$fld, $ftype, $flen, $fscale, $fsubtype, $fprecision, $dialect3)
+	{
+		$fscale = abs($fscale);
+		$fld->max_length = $flen;
+		$fld->scale = null;
+		switch($ftype){
+			case 7: 
+			case 8:
+				if ($dialect3) {
+				    switch($fsubtype){
+				    	case 0: 
+				    		$fld->type = ($ftype == 7 ? 'smallint' : 'integer');
+				    		break;
+				    	case 1: 
+				    		$fld->type = 'numeric';
+							$fld->max_length = $fprecision;
+							$fld->scale = $fscale;
+				    		break;
+				    	case 2:
+				    		$fld->type = 'decimal';
+							$fld->max_length = $fprecision;
+							$fld->scale = $fscale;
+				    		break;
+				    } // switch
+				} else {
+					if ($fscale !=0) {
+					    $fld->type = 'decimal';
+						$fld->scale = $fscale;
+						$fld->max_length = ($ftype == 7 ? 4 : 9);
+					} else {
+						$fld->type = ($ftype == 7 ? 'smallint' : 'integer');
+					}
+				}
+				break;
+			case 16: 
+				if ($dialect3) {
+				    switch($fsubtype){
+				    	case 0: 
+				    		$fld->type = 'decimal';
+							$fld->max_length = 18;
+							$fld->scale = 0;
+				    		break;
+				    	case 1: 
+				    		$fld->type = 'numeric';
+							$fld->max_length = $fprecision;
+							$fld->scale = $fscale;
+				    		break;
+				    	case 2:
+				    		$fld->type = 'decimal';
+							$fld->max_length = $fprecision;
+							$fld->scale = $fscale;
+				    		break;
+				    } // switch
+				}
+				break;
+			case 10:
+				$fld->type = 'float';
+				break;
+			case 14:
+				$fld->type = 'char';
+				break;
+			case 27:
+				if ($fscale !=0) {
+				    $fld->type = 'decimal';
+					$fld->max_length = 15;
+					$fld->scale = 5;
+				} else {
+					$fld->type = 'double';
+				}
+				break;
+			case 35:
+				if ($dialect3) {
+				    $fld->type = 'timestamp';
+				} else {
+					$fld->type = 'date';
+				}
+				break;
+			case 12:
+				$fld->type = 'date';
+				break;
+			case 13:
+				$fld->type = 'time';
+				break;
+			case 37:
+				$fld->type = 'varchar';
+				break;
+			case 40:
+				$fld->type = 'cstring';
+				break;
+			case 261:
+				$fld->type = 'blob';
+				$fld->max_length = -1;
+				break;
+		} // switch
+	}
+	//OPN STUFF end
+		// returns array of ADOFieldObjects for current table
+	function &MetaColumns($table) 
+	{
+	global $ADODB_FETCH_MODE;
+		
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
+	
+		$ADODB_FETCH_MODE = $save;
+		$false = false;
+		if ($rs === false) {
+			return $false;
+		}
+		
+		$retarr = array();
+		//OPN STUFF start
+		$dialect3 = ($this->dialect==3 ? true : false);
+		//OPN STUFF end
+		while (!$rs->EOF) { //print_r($rs->fields);
+			$fld = new ADOFieldObject();
+			$fld->name = trim($rs->fields[0]);
+			//OPN STUFF start
+			$this->_ConvertFieldType($fld, $rs->fields[7], $rs->fields[3], $rs->fields[4], $rs->fields[5], $rs->fields[6], $dialect3);
+			if (isset($rs->fields[1]) && $rs->fields[1]) {
+				$fld->not_null = true;
+			}				
+			if (isset($rs->fields[2])) {
+				
+				$fld->has_default = true;
+				$d = substr($rs->fields[2],strlen('default '));
+				switch ($fld->type)
+				{
+				case 'smallint':
+				case 'integer': $fld->default_value = (int) $d; break;
+				case 'char': 
+				case 'blob':
+				case 'text':
+				case 'varchar': $fld->default_value = (string) substr($d,1,strlen($d)-2); break;
+				case 'double':
+				case 'float': $fld->default_value = (float) $d; break;
+				default: $fld->default_value = $d; break;
+				}
+		//	case 35:$tt = 'TIMESTAMP'; break;
+			}
+			if ((isset($rs->fields[5])) && ($fld->type == 'blob')) {
+				$fld->sub_type = $rs->fields[5];
+			} else {
+				$fld->sub_type = null;
+			}
+			//OPN STUFF end
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[strtoupper($fld->name)] = $fld;
+			
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		if ( empty($retarr)) return $false;
+		else return $retarr;	
+	}
+	
+	function BlobEncode( $blob ) 
+	{
+		$blobid = ibase_blob_create( $this->_connectionID);
+		ibase_blob_add( $blobid, $blob );
+		return ibase_blob_close( $blobid );
+	}
+	
+	// since we auto-decode all blob's since 2.42, 
+	// BlobDecode should not do any transforms
+	function BlobDecode($blob)
+	{
+		return $blob; 
+	}
+	
+	
+	
+	
+	// old blobdecode function
+	// still used to auto-decode all blob's
+	function _BlobDecode_old( $blob ) 
+	{
+		$blobid = ibase_blob_open($this->_connectionID, $blob );
+		$realblob = ibase_blob_get( $blobid,$this->maxblobsize); // 2nd param is max size of blob -- Kevin Boillet <kevinboillet@yahoo.fr>
+		while($string = ibase_blob_get($blobid, 8192)){ 
+			$realblob .= $string; 
+		}
+		ibase_blob_close( $blobid );
+
+		return( $realblob );
+	} 
+	
+	function _BlobDecode( $blob ) 
+    {
+        if  (ADODB_PHPVER >= 0x5000) {
+            $blob_data = ibase_blob_info($this->_connectionID, $blob );
+            $blobid = ibase_blob_open($this->_connectionID, $blob );
+        } else {
+
+            $blob_data = ibase_blob_info( $blob );
+            $blobid = ibase_blob_open( $blob );
+        }
+
+        if( $blob_data[0] > $this->maxblobsize ) {
+
+            $realblob = ibase_blob_get($blobid, $this->maxblobsize);
+
+            while($string = ibase_blob_get($blobid, 8192)){
+                $realblob .= $string; 
+            }
+        } else {
+            $realblob = ibase_blob_get($blobid, $blob_data[0]);
+        }
+
+        ibase_blob_close( $blobid );
+        return( $realblob );
+	}
+	
+	function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') 
+	{ 
+		$fd = fopen($path,'rb'); 
+		if ($fd === false) return false; 
+		$blob_id = ibase_blob_create($this->_connectionID); 
+		
+		/* fill with data */ 
+		
+		while ($val = fread($fd,32768)){ 
+			ibase_blob_add($blob_id, $val); 
+		} 
+		
+		/* close and get $blob_id_str for inserting into table */ 
+		$blob_id_str = ibase_blob_close($blob_id); 
+		
+		fclose($fd); 
+		return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; 
+	} 
+	
+	/*
+		Insert a null into the blob field of the table first.
+		Then use UpdateBlob to store the blob.
+		
+		Usage:
+		 
+		$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+		$conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
+	*/
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') 
+	{ 
+	$blob_id = ibase_blob_create($this->_connectionID); 
+	
+	// ibase_blob_add($blob_id, $val); 
+	
+	// replacement that solves the problem by which only the first modulus 64K / 
+	// of $val are stored at the blob field //////////////////////////////////// 
+	// Thx Abel Berenstein  aberenstein#afip.gov.ar
+	$len = strlen($val); 
+	$chunk_size = 32768; 
+	$tail_size = $len % $chunk_size; 
+	$n_chunks = ($len - $tail_size) / $chunk_size; 
+	
+	for ($n = 0; $n < $n_chunks; $n++) { 
+		$start = $n * $chunk_size; 
+		$data = substr($val, $start, $chunk_size); 
+		ibase_blob_add($blob_id, $data); 
+	} 
+	
+	if ($tail_size) {
+		$start = $n_chunks * $chunk_size; 
+		$data = substr($val, $start, $tail_size); 
+		ibase_blob_add($blob_id, $data); 
+	}
+	// end replacement ///////////////////////////////////////////////////////// 
+	
+	$blob_id_str = ibase_blob_close($blob_id); 
+	
+	return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false; 
+	
+	} 
+	
+	
+	function OldUpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+		$blob_id = ibase_blob_create($this->_connectionID);
+		ibase_blob_add($blob_id, $val);
+		$blob_id_str = ibase_blob_close($blob_id);
+		return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blob_id_str)) != false;
+	}
+	
+	// Format date column in sql string given an input format that understands Y M D
+	// Only since Interbase 6.0 - uses EXTRACT
+	// problem - does not zero-fill the day and month yet
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysDate;
+		$s = '';
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			if ($s) $s .= '||';
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= "extract(year from $col)";
+				break;
+			case 'M':
+			case 'm':
+				$s .= "extract(month from $col)";
+				break;
+			case 'Q':
+			case 'q':
+				$s .= "cast(((extract(month from $col)+2) / 3) as integer)";
+				break;
+			case 'D':
+			case 'd':
+				$s .= "(extract(day from $col))";
+				break;
+			case 'H':
+			case 'h':
+			  $s .= "(extract(hour from $col))";
+			  break;                        
+			case 'I':
+			case 'i':
+			  $s .= "(extract(minute from $col))";
+			  break;                
+			case 'S':
+			case 's':
+			  $s .= "CAST((extract(second from $col)) AS INTEGER)";
+			  break;        
+
+			default:
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				$s .= $this->qstr($ch);
+				break;
+			}
+		}
+		return $s;
+	}
+}
+
+/*--------------------------------------------------------------------------------------
+		 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_ibase extends ADORecordSet
+{
+
+	var $databaseType = "ibase";
+	var $bind=false;
+	var $_cacheType;
+	
+	function ADORecordset_ibase($id,$mode=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+			$this->fetchMode = ($mode === false) ? $ADODB_FETCH_MODE : $mode;
+			$this->ADORecordSet($id);
+	}
+
+	/*		Returns: an object containing field information.
+			Get column information in the Recordset object. fetchField() can be used in order to obtain information about
+			fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
+			fetchField() is retrieved.		*/
+
+	function &FetchField($fieldOffset = -1)
+	{
+			 $fld = new ADOFieldObject;
+			 $ibf = ibase_field_info($this->_queryID,$fieldOffset);
+			 switch (ADODB_ASSOC_CASE) {
+			 case 2: // the default
+			 	$fld->name = ($ibf['alias']);
+				 if (empty($fld->name)) $fld->name = ($ibf['name']);
+				 break;
+			 case 0: 
+				 $fld->name = strtoupper($ibf['alias']);
+				 if (empty($fld->name)) $fld->name = strtoupper($ibf['name']);
+				 break;
+			 case 1: 
+			 	$fld->name = strtolower($ibf['alias']);
+				 if (empty($fld->name)) $fld->name = strtolower($ibf['name']);
+				 break;
+			 }
+			 
+			 $fld->type = $ibf['type'];
+			 $fld->max_length = $ibf['length'];
+			 
+			 /*       This needs to be populated from the metadata */ 
+			 $fld->not_null = false;
+			 $fld->has_default = false;
+			 $fld->default_value = 'null';
+			 return $fld;
+	}
+
+	function _initrs()
+	{
+		$this->_numOfRows = -1;
+		$this->_numOfFields = @ibase_num_fields($this->_queryID);
+
+		// cache types for blob decode check
+		for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { 
+			$f1 = $this->FetchField($i); 
+			$this->_cacheType[] = $f1->type;
+		}				
+	}
+
+	function _seek($row)
+	{
+		return false;
+	}
+	
+	function _fetch() 
+	{
+		$f = @ibase_fetch_row($this->_queryID); 
+		if ($f === false) {
+			$this->fields = false;
+			return false;
+		}
+		// OPN stuff start - optimized
+		// fix missing nulls and decode blobs automatically
+	
+		global $ADODB_ANSI_PADDING_OFF;
+		//$ADODB_ANSI_PADDING_OFF=1;
+		$rtrim = !empty($ADODB_ANSI_PADDING_OFF);
+		
+		for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) { 
+			if ($this->_cacheType[$i]=="BLOB") {
+				if (isset($f[$i])) { 
+					$f[$i] = $this->connection->_BlobDecode($f[$i]); 
+				} else { 
+					$f[$i] = null; 
+				} 
+			} else { 
+				if (!isset($f[$i])) { 
+					$f[$i] = null; 
+				} else if ($rtrim && is_string($f[$i])) {
+					$f[$i] = rtrim($f[$i]);
+				}
+			} 
+		} 
+		// OPN stuff end 
+		
+		$this->fields = $f;
+		if ($this->fetchMode == ADODB_FETCH_ASSOC) {
+			$this->fields = &$this->GetRowAssoc(ADODB_ASSOC_CASE);
+		} else if ($this->fetchMode == ADODB_FETCH_BOTH) {
+			$this->fields =& array_merge($this->fields,$this->GetRowAssoc(ADODB_ASSOC_CASE));
+		}
+		return true;
+	}
+
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		return $this->fields[$this->bind[strtoupper($colname)]];
+		
+	}
+	
+
+	function _close() 
+	{
+			return @ibase_free_result($this->_queryID);
+	}
+
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		switch (strtoupper($t)) {
+		case 'CHAR':
+			return 'C';
+			
+		case 'TEXT':
+		case 'VARCHAR':
+		case 'VARYING':
+		if ($len <= $this->blobSize) return 'C';
+			return 'X';
+		case 'BLOB':
+			return 'B';
+			   
+		case 'TIMESTAMP':
+		case 'DATE': return 'D';
+		case 'TIME': return 'T';
+				//case 'T': return 'T';
+
+				//case 'L': return 'L';
+		case 'INT': 
+		case 'SHORT':
+		case 'INTEGER': return 'I';
+		default: return 'N';
+		}
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-informix.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-informix.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-informix.inc.php	(revision 225)
@@ -0,0 +1,40 @@
+<?php
+/**
+* @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+* Released under both BSD license and Lesser GPL library license.
+* Whenever there is any discrepancy between the two licenses,
+* the BSD license will take precedence.
+*
+* Set tabs to 4 for best viewing.
+*
+* Latest version is available at http://php.weblogs.com
+*
+* Informix 9 driver that supports SELECT FIRST
+*
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR.'/drivers/adodb-informix72.inc.php');
+
+class ADODB_informix extends ADODB_informix72 {
+	var $databaseType = "informix";
+	var $hasTop = 'FIRST';
+	var $ansiOuter = true;
+	
+	function IfNull( $field, $ifNull )
+	{
+		return " NVL($field, $ifNull) "; // if Informix 9.X or 10.X
+	}
+}
+
+class ADORecordset_informix extends ADORecordset_informix72 {
+	var $databaseType = "informix";
+	
+	function ADORecordset_informix($id,$mode=false)
+	{
+		$this->ADORecordset_informix72($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-informix72.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-informix72.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-informix72.inc.php	(revision 225)
@@ -0,0 +1,475 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim. All rights reserved.
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+  Set tabs to 4 for best viewing.
+
+  Latest version is available at http://adodb.sourceforge.net
+
+  Informix port by Mitchell T. Young (mitch@youngfamily.org)
+
+  Further mods by "Samuel CARRIERE" <samuel_carriere@hotmail.com>
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('IFX_SCROLL')) define('IFX_SCROLL',1);
+
+class ADODB_informix72 extends ADOConnection {
+	var $databaseType = "informix72";
+	var $dataProvider = "informix";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $hasInsertID = true;
+	var $hasAffectedRows = true;
+    var $substr = 'substr';
+	var $metaTablesSQL="select tabname,tabtype from systables where tabtype in ('T','V') and owner!='informix'"; //Don't get informix tables and pseudo-tables
+
+
+	var $metaColumnsSQL = 
+		"select c.colname, c.coltype, c.collength, d.default,c.colno
+		from syscolumns c, systables t,outer sysdefaults d
+		where c.tabid=t.tabid and d.tabid=t.tabid and d.colno=c.colno
+		and tabname='%s' order by c.colno";
+
+	var $metaPrimaryKeySQL =
+		"select part1,part2,part3,part4,part5,part6,part7,part8 from
+		systables t,sysconstraints s,sysindexes i where t.tabname='%s'
+		and s.tabid=t.tabid and s.constrtype='P'
+		and i.idxname=s.idxname";
+
+	var $concat_operator = '||';
+
+	var $lastQuery = false;
+	var $has_insertid = true;
+
+	var $_autocommit = true;
+	var $_bindInputArray = true;  // set to true if ADOConnection.Execute() permits binding of array parameters.
+	var $sysDate = 'TODAY';
+	var $sysTimeStamp = 'CURRENT';
+	var $cursorType = IFX_SCROLL; // IFX_SCROLL or IFX_HOLD or 0
+   
+	function ADODB_informix72()
+	{
+		// alternatively, use older method:
+		//putenv("DBDATE=Y4MD-");
+		
+		// force ISO date format
+		putenv('GL_DATE=%Y-%m-%d');
+		
+		if (function_exists('ifx_byteasvarchar')) {
+			ifx_byteasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. 
+        	ifx_textasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. 
+        	ifx_blobinfile_mode(0); // Mode "0" means save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in a file.
+		}
+	}
+	
+	function ServerInfo()
+	{
+	    if (isset($this->version)) return $this->version;
+	
+	    $arr['description'] = $this->GetOne("select DBINFO('version','full') from systables where tabid = 1");
+	    $arr['version'] = $this->GetOne("select DBINFO('version','major') || DBINFO('version','minor') from systables where tabid = 1");
+	    $this->version = $arr;
+	    return $arr;
+	}
+
+
+
+	function _insertid()
+	{
+		$sqlca =ifx_getsqlca($this->lastQuery);
+		return @$sqlca["sqlerrd1"];
+	}
+
+	function _affectedrows()
+	{
+		if ($this->lastQuery) {
+		   return @ifx_affected_rows ($this->lastQuery);
+		}
+		return 0;
+	}
+
+	function BeginTrans()
+	{
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		$this->Execute('BEGIN');
+		$this->_autocommit = false;
+		return true;
+	}
+
+	function CommitTrans($ok=true) 
+	{ 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('COMMIT');
+		$this->_autocommit = true;
+		return true;
+	}
+
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('ROLLBACK');
+		$this->_autocommit = true;
+		return true;
+	}
+
+	function RowLock($tables,$where,$flds='1 as ignore')
+	{
+		if ($this->_autocommit) $this->BeginTrans();
+		return $this->GetOne("select $flds from $tables where $where for update");
+	}
+
+	/*	Returns: the last error message from previous database operation
+		Note: This function is NOT available for Microsoft SQL Server.	*/
+
+	function ErrorMsg() 
+	{
+		if (!empty($this->_logsql)) return $this->_errorMsg;
+		$this->_errorMsg = ifx_errormsg();
+		return $this->_errorMsg;
+	}
+
+	function ErrorNo()
+	{
+		preg_match("/.*SQLCODE=([^\]]*)/",ifx_error(),$parse);
+		if (is_array($parse) && isset($parse[1])) return (int)$parse[1]; 
+		return 0;
+	}
+
+   
+    function &MetaColumns($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$false = false;
+		if (!empty($this->metaColumnsSQL)) {
+			$save = $ADODB_FETCH_MODE;
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+			if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+          		$rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			if ($rs === false) return $false;
+			$rspkey = $this->Execute(sprintf($this->metaPrimaryKeySQL,$table)); //Added to get primary key colno items
+
+			$retarr = array();
+			while (!$rs->EOF) { //print_r($rs->fields);
+				$fld = new ADOFieldObject();
+				$fld->name = $rs->fields[0];
+/*  //!eos.
+						$rs->fields[1] is not the correct adodb type
+						$rs->fields[2] is not correct max_length, because can include not-null bit
+
+				$fld->type = $rs->fields[1];
+				$fld->primary_key=$rspkey->fields && array_search($rs->fields[4],$rspkey->fields); //Added to set primary key flag
+				$fld->max_length = $rs->fields[2];*/
+				$pr=ifx_props($rs->fields[1],$rs->fields[2]); //!eos
+				$fld->type = $pr[0] ;//!eos
+				$fld->primary_key=$rspkey->fields && array_search($rs->fields[4],$rspkey->fields);
+				$fld->max_length = $pr[1]; //!eos
+				$fld->precision = $pr[2] ;//!eos
+				$fld->not_null = $pr[3]=="N"; //!eos
+
+				if (trim($rs->fields[3]) != "AAAAAA 0") {
+	                    		$fld->has_default = 1;
+	                    		$fld->default_value = $rs->fields[3];
+				} else {
+					$fld->has_default = 0;
+				}
+
+                $retarr[strtolower($fld->name)] = $fld;	
+				$rs->MoveNext();
+			}
+
+			$rs->Close();
+			$rspkey->Close(); //!eos
+			return $retarr;	
+		}
+
+		return $false;
+	}
+	
+   function &xMetaColumns($table)
+   {
+		return ADOConnection::MetaColumns($table,false);
+   }
+
+	 function MetaForeignKeys($table, $owner=false, $upper=false) //!Eos
+	{
+		$sql = "
+			select tr.tabname,updrule,delrule,
+			i.part1 o1,i2.part1 d1,i.part2 o2,i2.part2 d2,i.part3 o3,i2.part3 d3,i.part4 o4,i2.part4 d4,
+			i.part5 o5,i2.part5 d5,i.part6 o6,i2.part6 d6,i.part7 o7,i2.part7 d7,i.part8 o8,i2.part8 d8
+			from systables t,sysconstraints s,sysindexes i,
+			sysreferences r,systables tr,sysconstraints s2,sysindexes i2
+			where t.tabname='$table'
+			and s.tabid=t.tabid and s.constrtype='R' and r.constrid=s.constrid
+			and i.idxname=s.idxname and tr.tabid=r.ptabid
+			and s2.constrid=r.primary and i2.idxname=s2.idxname";
+
+		$rs = $this->Execute($sql);
+		if (!$rs || $rs->EOF)  return false;
+		$arr =& $rs->GetArray();
+		$a = array();
+		foreach($arr as $v) {
+			$coldest=$this->metaColumnNames($v["tabname"]);
+			$colorig=$this->metaColumnNames($table);
+			$colnames=array();
+			for($i=1;$i<=8 && $v["o$i"] ;$i++) {
+				$colnames[]=$coldest[$v["d$i"]-1]."=".$colorig[$v["o$i"]-1];
+			}
+			if($upper)
+				$a[strtoupper($v["tabname"])] =  $colnames;
+			else
+				$a[$v["tabname"]] =  $colnames;
+		}
+		return $a;
+	 }
+
+   function UpdateBlob($table, $column, $val, $where, $blobtype = 'BLOB')
+   {
+   		$type = ($blobtype == 'TEXT') ? 1 : 0;
+		$blobid = ifx_create_blob($type,0,$val);
+		return $this->Execute("UPDATE $table SET $column=(?) WHERE $where",array($blobid));
+   }
+
+   function BlobDecode($blobid)
+   {
+   		return function_exists('ifx_byteasvarchar') ? $blobid : @ifx_get_blob($blobid);
+   }
+   
+	// returns true or false
+   function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('ifx_connect')) return null;
+		
+		$dbs = $argDatabasename . "@" . $argHostname;
+		if ($argHostname) putenv("INFORMIXSERVER=$argHostname"); 
+		putenv("INFORMIXSERVER=".trim($argHostname)); 
+		$this->_connectionID = ifx_connect($dbs,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		#if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;
+	}
+
+	// returns true or false
+   function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('ifx_connect')) return null;
+		
+		$dbs = $argDatabasename . "@" . $argHostname;
+		putenv("INFORMIXSERVER=".trim($argHostname)); 
+		$this->_connectionID = ifx_pconnect($dbs,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		#if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;
+	}
+/*
+	// ifx_do does not accept bind parameters - weird ???
+	function Prepare($sql)
+	{
+		$stmt = ifx_prepare($sql);
+		if (!$stmt) return $sql;
+		else return array($sql,$stmt);
+	}
+*/
+	// returns query ID if successful, otherwise false
+	function _query($sql,$inputarr)
+	{
+	global $ADODB_COUNTRECS;
+	
+	  // String parameters have to be converted using ifx_create_char
+	  if ($inputarr) {
+		 foreach($inputarr as $v) {
+			if (gettype($v) == 'string') {
+			   $tab[] = ifx_create_char($v);
+			}
+			else {
+			   $tab[] = $v;
+			}
+		 }
+	  }
+
+	  // In case of select statement, we use a scroll cursor in order
+	  // to be able to call "move", or "movefirst" statements
+	  if (!$ADODB_COUNTRECS && preg_match("/^\s*select/is", $sql)) {
+		 if ($inputarr) {
+			$this->lastQuery = ifx_query($sql,$this->_connectionID, $this->cursorType, $tab);
+		 }
+		 else {
+			$this->lastQuery = ifx_query($sql,$this->_connectionID, $this->cursorType);
+		 }
+	  }
+	  else {
+		 if ($inputarr) {
+			$this->lastQuery = ifx_query($sql,$this->_connectionID, $tab);
+		 }
+		 else {
+			$this->lastQuery = ifx_query($sql,$this->_connectionID);
+		 }
+	  }
+
+	  // Following line have been commented because autocommit mode is
+	  // not supported by informix SE 7.2
+
+	  //if ($this->_autocommit) ifx_query('COMMIT',$this->_connectionID);
+
+		return $this->lastQuery;
+	}
+
+	// returns true or false
+	function _close()
+	{
+		$this->lastQuery = false;
+		return ifx_close($this->_connectionID);
+	}
+}
+
+
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_informix72 extends ADORecordSet {
+
+	var $databaseType = "informix72";
+	var $canSeek = true;
+	var $_fieldprops = false;
+
+	function ADORecordset_informix72($id,$mode=false)
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		return $this->ADORecordSet($id);
+	}
+
+
+
+	/*	Returns: an object containing field information.
+		Get column information in the Recordset object. fetchField() can be used in order to obtain information about
+		fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
+		fetchField() is retrieved.	*/
+	function &FetchField($fieldOffset = -1)
+	{
+		if (empty($this->_fieldprops)) {
+			$fp = ifx_fieldproperties($this->_queryID);
+			foreach($fp as $k => $v) {
+				$o = new ADOFieldObject;
+				$o->name = $k;
+				$arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE"
+				$o->type = $arr[0];
+				$o->max_length = $arr[1];
+				$this->_fieldprops[] = $o;
+				$o->not_null = $arr[4]=="N";
+			}
+		}
+		$ret = $this->_fieldprops[$fieldOffset];
+		return $ret;
+	}
+
+	function _initrs()
+	{
+		$this->_numOfRows = -1; // ifx_affected_rows not reliable, only returns estimate -- ($ADODB_COUNTRECS)? ifx_affected_rows($this->_queryID):-1;
+		$this->_numOfFields = ifx_num_fields($this->_queryID);
+	}
+
+	function _seek($row)
+	{
+		return @ifx_fetch_row($this->_queryID, (int) $row);
+	}
+
+   function MoveLast()
+   {
+	  $this->fields = @ifx_fetch_row($this->_queryID, "LAST");
+	  if ($this->fields) $this->EOF = false;
+	  $this->_currentRow = -1;
+
+	  if ($this->fetchMode == ADODB_FETCH_NUM) {
+		 foreach($this->fields as $v) {
+			$arr[] = $v;
+		 }
+		 $this->fields = $arr;
+	  }
+
+	  return true;
+   }
+
+   function MoveFirst()
+	{
+	  $this->fields = @ifx_fetch_row($this->_queryID, "FIRST");
+	  if ($this->fields) $this->EOF = false;
+	  $this->_currentRow = 0;
+
+	  if ($this->fetchMode == ADODB_FETCH_NUM) {
+		 foreach($this->fields as $v) {
+			$arr[] = $v;
+		 }
+		 $this->fields = $arr;
+	  }
+
+	  return true;
+   }
+
+   function _fetch($ignore_fields=false)
+   {
+
+		$this->fields = @ifx_fetch_row($this->_queryID);
+
+		if (!is_array($this->fields)) return false;
+
+		if ($this->fetchMode == ADODB_FETCH_NUM) {
+			foreach($this->fields as $v) {
+				$arr[] = $v;
+			}
+			$this->fields = $arr;
+		}
+		return true;
+	}
+
+	/*	close() only needs to be called if you are worried about using too much memory while your script
+		is running. All associated result memory for the specified result identifier will automatically be freed.	*/
+	function _close()
+	{
+		return ifx_free_result($this->_queryID);
+	}
+
+}
+/** !Eos
+* Auxiliar function to Parse coltype,collength. Used by Metacolumns
+* return: array ($mtype,$length,$precision,$nullable) (similar to ifx_fieldpropierties)
+*/
+function ifx_props($coltype,$collength){
+	$itype=fmod($coltype+1,256);
+	$nullable=floor(($coltype+1) /256) ?"N":"Y";
+	$mtype=substr(" CIIFFNNDN TBXCC     ",$itype,1);
+	switch ($itype){
+		case 2:
+			$length=4;
+		case 6:
+		case 9:
+		case 14:
+			$length=floor($collength/256);
+			$precision=fmod($collength,256);
+			break;
+		default:
+			$precision=0;
+			$length=$collength;
+	}
+	return array($mtype,$length,$precision,$nullable);
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ldap.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ldap.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-ldap.inc.php	(revision 225)
@@ -0,0 +1,406 @@
+<?php
+/*
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+   Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+  
+  Revision 1: (02/25/2005) Updated codebase to include the _inject_bind_options function. This allows
+  users to access the options in the ldap_set_option function appropriately. Most importantly
+  LDAP Version 3 is now supported. See the examples for more information. Also fixed some minor
+  bugs that surfaced when PHP error levels were set high.
+  
+  Joshua Eldridge (joshuae74#hotmail.com)
+*/ 
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('LDAP_ASSOC')) {
+	 define('LDAP_ASSOC',ADODB_FETCH_ASSOC);
+	 define('LDAP_NUM',ADODB_FETCH_NUM);
+	 define('LDAP_BOTH',ADODB_FETCH_BOTH);
+}
+
+class ADODB_ldap extends ADOConnection {
+    var $databaseType = 'ldap';
+	var $dataProvider = 'ldap';
+	
+	# Connection information
+    var $username = false;
+    var $password = false;
+    
+    # Used during searches
+    var $filter;
+    var $dn;
+	var $version;
+	var $port = 389;
+
+	# Options configuration information
+	var $LDAP_CONNECT_OPTIONS;
+
+	function ADODB_ldap() 
+	{		
+	}
+  		
+	// returns true or false
+	
+	function _connect( $host, $username, $password, $ldapbase)
+	{
+	global $LDAP_CONNECT_OPTIONS;
+		
+		if ( !function_exists( 'ldap_connect' ) ) return null;
+		
+		$conn_info = array( $host,$this->port);
+		
+		if ( strstr( $host, ':' ) ) {
+		    $conn_info = split( ':', $host );
+		} 
+		
+		$this->_connectionID = ldap_connect( $conn_info[0], $conn_info[1] );
+		if (!$this->_connectionID) {
+			$e = 'Could not connect to ' . $conn_info[0];
+			$this->_errorMsg = $e;
+			if ($this->debug) ADOConnection::outp($e);
+			return false;
+		}
+		if( count( $LDAP_CONNECT_OPTIONS ) > 0 ) {
+			$this->_inject_bind_options( $LDAP_CONNECT_OPTIONS );
+		}
+		
+		if ($username) {
+		    $bind = ldap_bind( $this->_connectionID, $username, $password );
+		} else {
+			$username = 'anonymous';
+		    $bind = ldap_bind( $this->_connectionID );		
+		}
+		
+		if (!$bind) {
+			$e = 'Could not bind to ' . $conn_info[0] . " as ".$username;
+			$this->_errorMsg = $e;
+			if ($this->debug) ADOConnection::outp($e);
+			return false;
+		}
+		$this->_errorMsg = '';
+		$this->database = $ldapbase;
+		return $this->_connectionID;
+	}
+    
+/*
+	Valid Domain Values for LDAP Options:
+
+	LDAP_OPT_DEREF (integer)
+	LDAP_OPT_SIZELIMIT (integer)
+	LDAP_OPT_TIMELIMIT (integer)
+	LDAP_OPT_PROTOCOL_VERSION (integer)
+	LDAP_OPT_ERROR_NUMBER (integer)
+	LDAP_OPT_REFERRALS (boolean)
+	LDAP_OPT_RESTART (boolean)
+	LDAP_OPT_HOST_NAME (string)
+	LDAP_OPT_ERROR_STRING (string)
+	LDAP_OPT_MATCHED_DN (string)
+	LDAP_OPT_SERVER_CONTROLS (array)
+	LDAP_OPT_CLIENT_CONTROLS (array)
+
+	Make sure to set this BEFORE calling Connect()
+
+	Example:
+
+	$LDAP_CONNECT_OPTIONS = Array(
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_DEREF,
+			"OPTION_VALUE"=>2
+		),
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_SIZELIMIT,
+			"OPTION_VALUE"=>100
+		),
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_TIMELIMIT,
+			"OPTION_VALUE"=>30
+		),
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_PROTOCOL_VERSION,
+			"OPTION_VALUE"=>3
+		),
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_ERROR_NUMBER,
+			"OPTION_VALUE"=>13
+		),
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_REFERRALS,
+			"OPTION_VALUE"=>FALSE
+		),
+		Array (
+			"OPTION_NAME"=>LDAP_OPT_RESTART,
+			"OPTION_VALUE"=>FALSE
+		)
+	);
+*/
+
+	function _inject_bind_options( $options ) {
+		foreach( $options as $option ) {
+			ldap_set_option( $this->_connectionID, $option["OPTION_NAME"], $option["OPTION_VALUE"] )
+				or die( "Unable to set server option: " . $option["OPTION_NAME"] );
+		}
+	}
+	
+	/* returns _queryID or false */
+	function _query($sql,$inputarr)
+	{
+		$rs = ldap_search( $this->_connectionID, $this->database, $sql );
+		$this->_errorMsg = ($rs) ? '' : 'Search error on '.$sql;
+		return $rs; 
+	}
+
+    /* closes the LDAP connection */
+	function _close()
+	{
+		@ldap_close( $this->_connectionID );
+		$this->_connectionID = false;
+	}
+    
+	function SelectDB($db) {
+		$this->database = $db;
+		return true;
+	} // SelectDB
+
+    function ServerInfo()
+    {
+        if( !empty( $this->version ) ) return $this->version;
+        $version = array();
+        /*
+        Determines how aliases are handled during search. 
+        LDAP_DEREF_NEVER (0x00)
+        LDAP_DEREF_SEARCHING (0x01)
+        LDAP_DEREF_FINDING (0x02)
+        LDAP_DEREF_ALWAYS (0x03)
+        The LDAP_DEREF_SEARCHING value means aliases are dereferenced during the search but 
+        not when locating the base object of the search. The LDAP_DEREF_FINDING value means 
+        aliases are dereferenced when locating the base object but not during the search.  
+        Default: LDAP_DEREF_NEVER
+        */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_DEREF, $version['LDAP_OPT_DEREF'] ) ;
+        switch ( $version['LDAP_OPT_DEREF'] ) {
+          case 0:
+            $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_NEVER';
+          case 1:
+            $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_SEARCHING';
+          case 2:
+            $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_FINDING';
+          case 3:
+            $version['LDAP_OPT_DEREF'] = 'LDAP_DEREF_ALWAYS';
+        }
+        
+        /* 
+        A limit on the number of entries to return from a search. 
+        LDAP_NO_LIMIT (0) means no limit.
+        Default: LDAP_NO_LIMIT
+        */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_SIZELIMIT, $version['LDAP_OPT_SIZELIMIT'] );
+        if ( $version['LDAP_OPT_SIZELIMIT'] == 0 ) {
+           $version['LDAP_OPT_SIZELIMIT'] = 'LDAP_NO_LIMIT';
+        }
+        
+        /*
+        A limit on the number of seconds to spend on a search. 
+        LDAP_NO_LIMIT (0) means no limit.
+        Default: LDAP_NO_LIMIT
+        */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_TIMELIMIT, $version['LDAP_OPT_TIMELIMIT'] );
+        if ( $version['LDAP_OPT_TIMELIMIT'] == 0 ) {
+           $version['LDAP_OPT_TIMELIMIT'] = 'LDAP_NO_LIMIT';
+        }
+        
+        /*
+        Determines whether the LDAP library automatically follows referrals returned by LDAP servers or not. 
+        LDAP_OPT_ON
+        LDAP_OPT_OFF
+        Default: ON
+        */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_REFERRALS, $version['LDAP_OPT_REFERRALS'] );
+        if ( $version['LDAP_OPT_REFERRALS'] == 0 ) {
+           $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_OFF';
+        } else {
+           $version['LDAP_OPT_REFERRALS'] = 'LDAP_OPT_ON';
+        
+        }
+        /*
+        Determines whether LDAP I/O operations are automatically restarted if they abort prematurely. 
+        LDAP_OPT_ON
+        LDAP_OPT_OFF
+        Default: OFF
+        */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_RESTART, $version['LDAP_OPT_RESTART'] );
+        if ( $version['LDAP_OPT_RESTART'] == 0 ) {
+           $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_OFF';
+        } else {
+           $version['LDAP_OPT_RESTART'] = 'LDAP_OPT_ON';
+        
+        }
+        /*
+        This option indicates the version of the LDAP protocol used when communicating with the primary LDAP server.
+        LDAP_VERSION2 (2)
+        LDAP_VERSION3 (3)
+        Default: LDAP_VERSION2 (2)
+        */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_PROTOCOL_VERSION, $version['LDAP_OPT_PROTOCOL_VERSION'] );
+        if ( $version['LDAP_OPT_PROTOCOL_VERSION'] == 2 ) {
+           $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION2';
+        } else {
+           $version['LDAP_OPT_PROTOCOL_VERSION'] = 'LDAP_VERSION3';
+        
+        }
+        /* The host name (or list of hosts) for the primary LDAP server. */
+        ldap_get_option( $this->_connectionID, LDAP_OPT_HOST_NAME, $version['LDAP_OPT_HOST_NAME'] ); 
+        ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_NUMBER, $version['LDAP_OPT_ERROR_NUMBER'] ); 
+        ldap_get_option( $this->_connectionID, LDAP_OPT_ERROR_STRING, $version['LDAP_OPT_ERROR_STRING'] ); 
+        ldap_get_option( $this->_connectionID, LDAP_OPT_MATCHED_DN, $version['LDAP_OPT_MATCHED_DN'] ); 
+        
+        return $this->version = $version;
+    
+    }
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_ldap extends ADORecordSet{	
+	
+	var $databaseType = "ldap";
+	var $canSeek = false;
+	var $_entryID; /* keeps track of the entry resource identifier */
+	
+	function ADORecordSet_ldap($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: 
+		  $this->fetchMode = LDAP_NUM; 
+		break;
+		case ADODB_FETCH_ASSOC: 
+		  $this->fetchMode = LDAP_ASSOC; 
+		break;
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH: 
+		default:
+		  $this->fetchMode = LDAP_BOTH; 
+		break;
+		}
+	
+		$this->ADORecordSet($queryID);	
+	}
+	
+	function _initrs()
+	{
+	   /* 
+	   This could be teaked to respect the $COUNTRECS directive from ADODB
+	   It's currently being used in the _fetch() function and the
+	   GetAssoc() function
+       */
+	    $this->_numOfRows = ldap_count_entries( $this->connection->_connectionID, $this->_queryID );
+
+	}
+
+    /*
+    Return whole recordset as a multi-dimensional associative array
+	*/
+	function &GetAssoc($force_array = false, $first2cols = false) 
+	{
+		$records = $this->_numOfRows;
+        $results = array();
+            for ( $i=0; $i < $records; $i++ ) {
+                foreach ( $this->fields as $k=>$v ) {
+                    if ( is_array( $v ) ) {
+                        if ( $v['count'] == 1 ) {
+                            $results[$i][$k] = $v[0];
+                        } else {
+                            array_shift( $v );
+                            $results[$i][$k] = $v;
+                        } 
+                    }
+                }
+            }
+        
+		return $results; 
+	}
+    
+    function &GetRowAssoc()
+	{
+        $results = array();
+        foreach ( $this->fields as $k=>$v ) {
+            if ( is_array( $v ) ) {
+                if ( $v['count'] == 1 ) {
+                    $results[$k] = $v[0];
+                } else {
+                    array_shift( $v );
+                    $results[$k] = $v;
+                } 
+            }
+        }
+ 
+		return $results; 
+	}
+		
+    function GetRowNums()
+    {
+        $results = array();
+        foreach ( $this->fields as $k=>$v ) {
+        static $i = 0;
+            if (is_array( $v )) {
+                if ( $v['count'] == 1 ) {
+                    $results[$i] = $v[0];
+                } else {
+                    array_shift( $v );
+                    $results[$i] = $v;
+                } 
+            $i++;
+            }
+        }
+        return $results;
+    }
+	
+	function _fetch()
+	{		
+		if ( $this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0 )
+        	return false;
+        	
+        if ( $this->_currentRow == 0 ) {
+		  $this->_entryID = ldap_first_entry( $this->connection->_connectionID, $this->_queryID );
+        } else {
+          $this->_entryID = ldap_next_entry( $this->connection->_connectionID, $this->_entryID );
+        }
+	    
+	    $this->fields = ldap_get_attributes( $this->connection->_connectionID, $this->_entryID );
+	    $this->_numOfFields = $this->fields['count'];	
+	    switch ( $this->fetchMode ) {
+            
+            case LDAP_ASSOC:
+            $this->fields = $this->GetRowAssoc();
+            break;
+            
+            case LDAP_NUM:
+			$this->fields = array_merge($this->GetRowNums(),$this->GetRowAssoc());
+            break;
+            
+            case LDAP_BOTH:
+            default:
+			$this->fields = $this->GetRowNums();
+            break;
+        }
+        return ( is_array( $this->fields ) );        
+	}
+	
+	function _close() {
+		@ldap_free_result( $this->_queryID );	
+		$this->_queryID = false;
+	}
+	
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssql.inc.php	(revision 225)
@@ -0,0 +1,1037 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Native mssql driver. Requires mssql client. Works on Windows. 
+  To configure for Unix, see 
+   	http://phpbuilder.com/columns/alberto20000919.php3
+	
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+//----------------------------------------------------------------
+// MSSQL returns dates with the format Oct 13 2002 or 13 Oct 2002
+// and this causes tons of problems because localized versions of 
+// MSSQL will return the dates in dmy or  mdy order; and also the 
+// month strings depends on what language has been configured. The 
+// following two variables allow you to control the localization
+// settings - Ugh.
+//
+// MORE LOCALIZATION INFO
+// ----------------------
+// To configure datetime, look for and modify sqlcommn.loc, 
+//  	typically found in c:\mssql\install
+// Also read :
+//	 http://support.microsoft.com/default.aspx?scid=kb;EN-US;q220918
+// Alternatively use:
+// 	   CONVERT(char(12),datecol,120)
+//----------------------------------------------------------------
+
+
+// has datetime converstion to YYYY-MM-DD format, and also mssql_fetch_assoc
+if (ADODB_PHPVER >= 0x4300) {
+// docs say 4.2.0, but testing shows only since 4.3.0 does it work!
+	ini_set('mssql.datetimeconvert',0); 
+} else {
+global $ADODB_mssql_mths;		// array, months must be upper-case
+
+
+	$ADODB_mssql_date_order = 'mdy'; 
+	$ADODB_mssql_mths = array(
+		'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,
+		'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12);
+}
+
+//---------------------------------------------------------------------------
+// Call this to autoset $ADODB_mssql_date_order at the beginning of your code,
+// just after you connect to the database. Supports mdy and dmy only.
+// Not required for PHP 4.2.0 and above.
+function AutoDetect_MSSQL_Date_Order($conn)
+{
+global $ADODB_mssql_date_order;
+	$adate = $conn->GetOne('select getdate()');
+	if ($adate) {
+		$anum = (int) $adate;
+		if ($anum > 0) {
+			if ($anum > 31) {
+				//ADOConnection::outp( "MSSQL: YYYY-MM-DD date format not supported currently");
+			} else
+				$ADODB_mssql_date_order = 'dmy';
+		} else
+			$ADODB_mssql_date_order = 'mdy';
+	}
+}
+
+class ADODB_mssql extends ADOConnection {
+	var $databaseType = "mssql";	
+	var $dataProvider = "mssql";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $hasInsertID = true;
+	var $substr = "substring";
+	var $length = 'len';
+	var $hasAffectedRows = true;
+	var $metaDatabasesSQL = "select name from sysdatabases where name <> 'master'";
+	var $metaTablesSQL="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))";
+	var $metaColumnsSQL = # xtype==61 is datetime
+"select c.name,t.name,c.length,
+	(case when c.xusertype=61 then 0 else c.xprec end),
+	(case when c.xusertype=61 then 0 else c.xscale end) 
+	from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'";
+	var $hasTop = 'top';		// support mssql SELECT TOP 10 * FROM TABLE
+	var $hasGenID = true;
+	var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
+	var $sysTimeStamp = 'GetDate()';
+	var $_has_mssql_init;
+	var $maxParameterLen = 4000;
+	var $arrayClass = 'ADORecordSet_array_mssql';
+	var $uniqueSort = true;
+	var $leftOuter = '*=';
+	var $rightOuter = '=*';
+	var $ansiOuter = true; // for mssql7 or later
+	var $poorAffectedRows = true;
+	var $identitySQL = 'select @@IDENTITY'; // 'select SCOPE_IDENTITY'; # for mssql 2000
+	var $uniqueOrderBy = true;
+	var $_bindInputArray = true;
+	
+	function ADODB_mssql() 
+	{		
+		$this->_has_mssql_init = (strnatcmp(PHP_VERSION,'4.1.0')>=0);
+	}
+
+	function ServerInfo()
+	{
+	global $ADODB_FETCH_MODE;
+	
+	
+		if ($this->fetchMode === false) {
+			$savem = $ADODB_FETCH_MODE;
+			$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		} else 
+			$savem = $this->SetFetchMode(ADODB_FETCH_NUM);
+				
+		if (0) {
+			$stmt = $this->PrepareSP('sp_server_info');
+			$val = 2;
+			$this->Parameter($stmt,$val,'attribute_id');
+			$row = $this->GetRow($stmt);
+		}
+		
+		$row = $this->GetRow("execute sp_server_info 2");
+		
+		
+		if ($this->fetchMode === false) {
+			$ADODB_FETCH_MODE = $savem;
+		} else
+			$this->SetFetchMode($savem);
+		
+		$arr['description'] = $row[2];
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+	
+	function IfNull( $field, $ifNull ) 
+	{
+		return " ISNULL($field, $ifNull) "; // if MS SQL Server
+	}
+	
+	function _insertid()
+	{
+	// SCOPE_IDENTITY()
+	// Returns the last IDENTITY value inserted into an IDENTITY column in 
+	// the same scope. A scope is a module -- a stored procedure, trigger, 
+	// function, or batch. Thus, two statements are in the same scope if 
+	// they are in the same stored procedure, function, or batch.
+			return $this->GetOne($this->identitySQL);
+	}
+
+	function _affectedrows()
+	{
+		return $this->GetOne('select @@rowcount');
+	}
+
+	var $_dropSeqSQL = "drop table %s";
+	
+	function CreateSequence($seq='adodbseq',$start=1)
+	{
+		
+		$this->Execute('BEGIN TRANSACTION adodbseq');
+		$start -= 1;
+		$this->Execute("create table $seq (id float(53))");
+		$ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)");
+		if (!$ok) {
+				$this->Execute('ROLLBACK TRANSACTION adodbseq');
+				return false;
+		}
+		$this->Execute('COMMIT TRANSACTION adodbseq'); 
+		return true;
+	}
+
+	function GenID($seq='adodbseq',$start=1)
+	{
+		//$this->debug=1;
+		$this->Execute('BEGIN TRANSACTION adodbseq');
+		$ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1");
+		if (!$ok) {
+			$this->Execute("create table $seq (id float(53))");
+			$ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)");
+			if (!$ok) {
+				$this->Execute('ROLLBACK TRANSACTION adodbseq');
+				return false;
+			}
+			$this->Execute('COMMIT TRANSACTION adodbseq'); 
+			return $start;
+		}
+		$num = $this->GetOne("select id from $seq");
+		$this->Execute('COMMIT TRANSACTION adodbseq'); 
+		return $num;
+		
+		// in old implementation, pre 1.90, we returned GUID...
+		//return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'");
+	}
+	
+
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		if ($nrows > 0 && $offset <= 0) {
+			$sql = preg_replace(
+				'/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop." $nrows ",$sql);
+			$rs =& $this->Execute($sql,$inputarr);
+		} else
+			$rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+	
+		return $rs;
+	}
+	
+	
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysTimeStamp;
+		$s = '';
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			if ($s) $s .= '+';
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= "datename(yyyy,$col)";
+				break;
+			case 'M':
+				$s .= "convert(char(3),$col,0)";
+				break;
+			case 'm':
+				$s .= "replace(str(month($col),2),' ','0')";
+				break;
+			case 'Q':
+			case 'q':
+				$s .= "datename(quarter,$col)";
+				break;
+			case 'D':
+			case 'd':
+				$s .= "replace(str(day($col),2),' ','0')";
+				break;
+			case 'h':
+				$s .= "substring(convert(char(14),$col,0),13,2)";
+				break;
+			
+			case 'H':
+				$s .= "replace(str(datepart(hh,$col),2),' ','0')";
+				break;
+				
+			case 'i':
+				$s .= "replace(str(datepart(mi,$col),2),' ','0')";
+				break;
+			case 's':
+				$s .= "replace(str(datepart(ss,$col),2),' ','0')";
+				break;
+			case 'a':
+			case 'A':
+				$s .= "substring(convert(char(19),$col,0),18,2)";
+				break;
+				
+			default:
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				$s .= $this->qstr($ch);
+				break;
+			}
+		}
+		return $s;
+	}
+
+	
+	function BeginTrans()
+	{
+		if ($this->transOff) return true; 
+		$this->transCnt += 1;
+	   	$this->Execute('BEGIN TRAN');
+	   	return true;
+	}
+		
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true; 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('COMMIT TRAN');
+		return true;
+	}
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true; 
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('ROLLBACK TRAN');
+		return true;
+	}
+	
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET TRANSACTION ".$transaction_mode);
+	}
+	
+	/*
+		Usage:
+		
+		$this->BeginTrans();
+		$this->RowLock('table1,table2','table1.id=33 and table2.id=table1.id'); # lock row 33 for both tables
+		
+		# some operation on both tables table1 and table2
+		
+		$this->CommitTrans();
+		
+		See http://www.swynk.com/friends/achigrik/SQL70Locks.asp
+	*/
+	function RowLock($tables,$where,$flds='top 1 null as ignore') 
+	{
+		if (!$this->transCnt) $this->BeginTrans();
+		return $this->GetOne("select $flds from $tables with (ROWLOCK,HOLDLOCK) where $where");
+	}
+	
+	
+	function &MetaIndexes($table,$primary=false)
+	{
+		$table = $this->qstr($table);
+
+		$sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, 
+			CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK,
+			CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique
+			FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id 
+			INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid 
+			INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid
+			WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table
+			ORDER BY O.name, I.Name, K.keyno";
+
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+        	$savem = $this->SetFetchMode(FALSE);
+        }
+        
+        $rs = $this->Execute($sql);
+        if (isset($savem)) {
+        	$this->SetFetchMode($savem);
+        }
+        $ADODB_FETCH_MODE = $save;
+
+        if (!is_object($rs)) {
+        	return FALSE;
+        }
+
+		$indexes = array();
+		while ($row = $rs->FetchRow()) {
+			if (!$primary && $row[5]) continue;
+			
+            $indexes[$row[0]]['unique'] = $row[6];
+            $indexes[$row[0]]['columns'][] = $row[1];
+    	}
+        return $indexes;
+	}
+	
+	function MetaForeignKeys($table, $owner=false, $upper=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$table = $this->qstr(strtoupper($table));
+		
+		$sql = 
+"select object_name(constid) as constraint_name,
+	col_name(fkeyid, fkey) as column_name,
+	object_name(rkeyid) as referenced_table_name,
+   	col_name(rkeyid, rkey) as referenced_column_name
+from sysforeignkeys
+where upper(object_name(fkeyid)) = $table
+order by constraint_name, referenced_table_name, keyno";
+		
+		$constraints =& $this->GetArray($sql);
+		
+		$ADODB_FETCH_MODE = $save;
+		
+		$arr = false;
+		foreach($constraints as $constr) {
+			//print_r($constr);
+			$arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; 
+		}
+		if (!$arr) return false;
+		
+		$arr2 = false;
+		
+		foreach($arr as $k => $v) {
+			foreach($v as $a => $b) {
+				if ($upper) $a = strtoupper($a);
+				$arr2[$a] = $b;
+			}
+		}
+		return $arr2;
+	}
+
+	//From: Fernando Moreira <FMoreira@imediata.pt>
+	function MetaDatabases() 
+	{ 
+		if(@mssql_select_db("master")) { 
+				 $qry=$this->metaDatabasesSQL; 
+				 if($rs=@mssql_query($qry,$this->_connectionID)){ 
+						 $tmpAr=$ar=array(); 
+						 while($tmpAr=@mssql_fetch_row($rs)) 
+								 $ar[]=$tmpAr[0]; 
+						@mssql_select_db($this->database); 
+						 if(sizeof($ar)) 
+								 return($ar); 
+						 else 
+								 return(false); 
+				 } else { 
+						 @mssql_select_db($this->database); 
+						 return(false); 
+				 } 
+		 } 
+		 return(false); 
+	} 
+
+	// "Stein-Aksel Basma" <basma@accelero.no>
+	// tested with MSSQL 2000
+	function &MetaPrimaryKeys($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$schema = '';
+		$this->_findschema($table,$schema);
+		if (!$schema) $schema = $this->database;
+		if ($schema) $schema = "and k.table_catalog like '$schema%'"; 
+
+		$sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k,
+		information_schema.table_constraints tc 
+		where tc.constraint_name = k.constraint_name and tc.constraint_type =
+		'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position ";
+		
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$a = $this->GetCol($sql);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if ($a && sizeof($a)>0) return $a;
+		$false = false;
+		return $false;	  
+	}
+
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+		if ($mask) {
+			$save = $this->metaTablesSQL;
+			$mask = $this->qstr(($mask));
+			$this->metaTablesSQL .= " AND name like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		if ($mask) {
+			$this->metaTablesSQL = $save;
+		}
+		return $ret;
+	}
+ 
+	function SelectDB($dbName) 
+	{
+		$this->database = $dbName;
+		$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
+		if ($this->_connectionID) {
+			return @mssql_select_db($dbName);		
+		}
+		else return false;	
+	}
+	
+	function ErrorMsg() 
+	{
+		if (empty($this->_errorMsg)){
+			$this->_errorMsg = mssql_get_last_message();
+		}
+		return $this->_errorMsg;
+	}
+	
+	function ErrorNo() 
+	{
+		if ($this->_logsql && $this->_errorCode !== false) return $this->_errorCode;
+		if (empty($this->_errorMsg)) {
+			$this->_errorMsg = mssql_get_last_message();
+		}
+		$id = @mssql_query("select @@ERROR",$this->_connectionID);
+		if (!$id) return false;
+		$arr = mssql_fetch_array($id);
+		@mssql_free_result($id);
+		if (is_array($arr)) return $arr[0];
+	   else return -1;
+	}
+	
+	// returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('mssql_pconnect')) return null;
+		$this->_connectionID = mssql_connect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('mssql_pconnect')) return null;
+		$this->_connectionID = mssql_pconnect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		
+		// persistent connections can forget to rollback on crash, so we do it here.
+		if ($this->autoRollback) {
+			$cnt = $this->GetOne('select @@TRANCOUNT');
+			while (--$cnt >= 0) $this->Execute('ROLLBACK TRAN'); 
+		}
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+	function Prepare($sql)
+	{
+		$sqlarr = explode('?',$sql);
+		if (sizeof($sqlarr) <= 1) return $sql;
+		$sql2 = $sqlarr[0];
+		for ($i = 1, $max = sizeof($sqlarr); $i < $max; $i++) {
+			$sql2 .=  '@P'.($i-1) . $sqlarr[$i];
+		} 
+		return array($sql,$this->qstr($sql2),$max);
+	}
+	
+	function PrepareSP($sql)
+	{
+		if (!$this->_has_mssql_init) {
+			ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0");
+			return $sql;
+		}
+		$stmt = mssql_init($sql,$this->_connectionID);
+		if (!$stmt)  return $sql;
+		return array($sql,$stmt);
+	}
+	
+	// returns concatenated string
+    // MSSQL requires integers to be cast as strings
+    // automatically cast every datatype to VARCHAR(255)
+    // @author David Rogers (introspectshun)
+    function Concat()
+    {
+            $s = "";
+            $arr = func_get_args();
+
+            // Split single record on commas, if possible
+            if (sizeof($arr) == 1) {
+                foreach ($arr as $arg) {
+                    $args = explode(',', $arg);
+                }
+                $arr = $args;
+            }
+
+            array_walk($arr, create_function('&$v', '$v = "CAST(" . $v . " AS VARCHAR(255))";'));
+            $s = implode('+',$arr);
+            if (sizeof($arr) > 0) return "$s";
+            
+			return '';
+    }
+	
+	/* 
+	Usage:
+		$stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group
+		
+		# note that the parameter does not have @ in front!
+		$db->Parameter($stmt,$id,'myid');
+		$db->Parameter($stmt,$group,'group',false,64);
+		$db->Execute($stmt);
+		
+		@param $stmt Statement returned by Prepare() or PrepareSP().
+		@param $var PHP variable to bind to. Can set to null (for isNull support).
+		@param $name Name of stored procedure variable name to bind to.
+		@param [$isOutput] Indicates direction of parameter 0/false=IN  1=OUT  2= IN/OUT. This is ignored in oci8.
+		@param [$maxLen] Holds an maximum length of the variable.
+		@param [$type] The data type of $var. Legal values depend on driver.
+		
+		See mssql_bind documentation at php.net.
+	*/
+	function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=4000, $type=false)
+	{
+		if (!$this->_has_mssql_init) {
+			ADOConnection::outp( "Parameter: mssql_bind only available since PHP 4.1.0");
+			return false;
+		}
+
+		$isNull = is_null($var); // php 4.0.4 and above...
+			
+		if ($type === false) 
+			switch(gettype($var)) {
+			default:
+			case 'string': $type = SQLCHAR; break;
+			case 'double': $type = SQLFLT8; break;
+			case 'integer': $type = SQLINT4; break;
+			case 'boolean': $type = SQLINT1; break; # SQLBIT not supported in 4.1.0
+			}
+		
+		if  ($this->debug) {
+			$prefix = ($isOutput) ? 'Out' : 'In';
+			$ztype = (empty($type)) ? 'false' : $type;
+			ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);");
+		}
+		/*
+			See http://phplens.com/lens/lensforum/msgs.php?id=7231
+			
+			RETVAL is HARD CODED into php_mssql extension:
+			The return value (a long integer value) is treated like a special OUTPUT parameter, 
+			called "RETVAL" (without the @). See the example at mssql_execute to 
+			see how it works. - type: one of this new supported PHP constants. 
+				SQLTEXT, SQLVARCHAR,SQLCHAR, SQLINT1,SQLINT2, SQLINT4, SQLBIT,SQLFLT8 
+		*/
+		if ($name !== 'RETVAL') $name = '@'.$name;
+		return mssql_bind($stmt[1], $name, $var, $type, $isOutput, $isNull, $maxLen);
+	}
+	
+	/* 
+		Unfortunately, it appears that mssql cannot handle varbinary > 255 chars
+		So all your blobs must be of type "image".
+		
+		Remember to set in php.ini the following...
+		
+		; Valid range 0 - 2147483647. Default = 4096. 
+		mssql.textlimit = 0 ; zero to pass through 
+
+		; Valid range 0 - 2147483647. Default = 4096. 
+		mssql.textsize = 0 ; zero to pass through 
+	*/
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+	
+		if (strtoupper($blobtype) == 'CLOB') {
+			$sql = "UPDATE $table SET $column='" . $val . "' WHERE $where";
+			return $this->Execute($sql) != false;
+		}
+		$sql = "UPDATE $table SET $column=0x".bin2hex($val)." WHERE $where";
+		return $this->Execute($sql) != false;
+	}
+	
+	// returns query ID if successful, otherwise false
+	function _query($sql,$inputarr)
+	{
+		$this->_errorMsg = false;
+		if (is_array($inputarr)) {
+			
+			# bind input params with sp_executesql: 
+			# see http://www.quest-pipelines.com/newsletter-v3/0402_F.htm
+			# works only with sql server 7 and newer
+			if (!is_array($sql)) $sql = $this->Prepare($sql);
+			$params = '';
+			$decl = '';
+			$i = 0;
+			foreach($inputarr as $v) {
+				if ($decl) {
+					$decl .= ', ';
+					$params .= ', ';
+				}	
+				if (is_string($v)) {
+					$len = strlen($v);
+					if ($len == 0) $len = 1;
+					
+					if ($len > 4000 ) {
+						// NVARCHAR is max 4000 chars. Let's use NTEXT
+						$decl .= "@P$i NTEXT";
+					} else {
+						$decl .= "@P$i NVARCHAR($len)";
+					}
+
+					$params .= "@P$i=N". (strncmp($v,"'",1)==0? $v : $this->qstr($v));
+				} else if (is_integer($v)) {
+					$decl .= "@P$i INT";
+					$params .= "@P$i=".$v;
+				} else if (is_float($v)) {
+					$decl .= "@P$i FLOAT";
+					$params .= "@P$i=".$v;
+				} else if (is_bool($v)) {
+					$decl .= "@P$i INT"; # Used INT just in case BIT in not supported on the user's MSSQL version. It will cast appropriately.
+					$params .= "@P$i=".(($v)?'1':'0'); # True == 1 in MSSQL BIT fields and acceptable for storing logical true in an int field
+				} else {
+					$decl .= "@P$i CHAR"; # Used char because a type is required even when the value is to be NULL.
+					$params .= "@P$i=NULL";
+					}
+				$i += 1;
+			}
+			$decl = $this->qstr($decl);
+			if ($this->debug) ADOConnection::outp("<font size=-1>sp_executesql N{$sql[1]},N$decl,$params</font>");
+			$rez = mssql_query("sp_executesql N{$sql[1]},N$decl,$params", $this->_connectionID);
+			
+		} else if (is_array($sql)) {
+			# PrepareSP()
+			$rez = mssql_execute($sql[1]);
+			
+		} else {
+			$rez = mssql_query($sql,$this->_connectionID);
+		}
+		return $rez;
+	}
+	
+	// returns true or false
+	function _close()
+	{ 
+		if ($this->transCnt) $this->RollbackTrans();
+		$rez = @mssql_close($this->_connectionID);
+		$this->_connectionID = false;
+		return $rez;
+	}
+	
+	// mssql uses a default date like Dec 30 2000 12:00AM
+	function UnixDate($v)
+	{
+		return ADORecordSet_array_mssql::UnixDate($v);
+	}
+	
+	function UnixTimeStamp($v)
+	{
+		return ADORecordSet_array_mssql::UnixTimeStamp($v);
+	}	
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_mssql extends ADORecordSet {	
+
+	var $databaseType = "mssql";
+	var $canSeek = true;
+	var $hasFetchAssoc; // see http://phplens.com/lens/lensforum/msgs.php?id=6083
+	// _mths works only in non-localised system
+	
+	function ADORecordset_mssql($id,$mode=false)
+	{
+		// freedts check...
+		$this->hasFetchAssoc = function_exists('mssql_fetch_assoc');
+
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+
+		}
+		$this->fetchMode = $mode;
+		return $this->ADORecordSet($id,$mode);
+	}
+	
+	
+	function _initrs()
+	{
+	GLOBAL $ADODB_COUNTRECS;	
+		$this->_numOfRows = ($ADODB_COUNTRECS)? @mssql_num_rows($this->_queryID):-1;
+		$this->_numOfFields = @mssql_num_fields($this->_queryID);
+	}
+	
+
+	//Contributed by "Sven Axelsson" <sven.axelsson@bokochwebb.se>
+	// get next resultset - requires PHP 4.0.5 or later
+	function NextRecordSet()
+	{
+		if (!mssql_next_result($this->_queryID)) return false;
+		$this->_inited = false;
+		$this->bind = false;
+		$this->_currentRow = -1;
+		$this->Init();
+		return true;
+	}
+
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode != ADODB_FETCH_NUM) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+	/*	Returns: an object containing field information. 
+		Get column information in the Recordset object. fetchField() can be used in order to obtain information about
+		fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
+		fetchField() is retrieved.	*/
+
+	function &FetchField($fieldOffset = -1) 
+	{
+		if ($fieldOffset != -1) {
+			$f = @mssql_fetch_field($this->_queryID, $fieldOffset);
+		}
+		else if ($fieldOffset == -1) {	/*	The $fieldOffset argument is not provided thus its -1 	*/
+			$f = @mssql_fetch_field($this->_queryID);
+		}
+		$false = false;
+		if (empty($f)) return $false;
+		return $f;
+	}
+	
+	function _seek($row) 
+	{
+		return @mssql_data_seek($this->_queryID, $row);
+	}
+
+	// speedup
+	function MoveNext() 
+	{
+		if ($this->EOF) return false;
+		
+		$this->_currentRow++;
+		
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+			if ($this->fetchMode & ADODB_FETCH_NUM) {
+				//ADODB_FETCH_BOTH mode
+				$this->fields = @mssql_fetch_array($this->_queryID);
+			}
+			else {
+				if ($this->hasFetchAssoc) {// only for PHP 4.2.0 or later
+					 $this->fields = @mssql_fetch_assoc($this->_queryID);
+				} else {
+					$flds = @mssql_fetch_array($this->_queryID);
+					if (is_array($flds)) {
+						$fassoc = array();
+						foreach($flds as $k => $v) {
+							if (is_numeric($k)) continue;
+							$fassoc[$k] = $v;
+						}
+						$this->fields = $fassoc;
+					} else
+						$this->fields = false;
+				}
+			}
+			
+			if (is_array($this->fields)) {
+				if (ADODB_ASSOC_CASE == 0) {
+					foreach($this->fields as $k=>$v) {
+						$this->fields[strtolower($k)] = $v;
+					}
+				} else if (ADODB_ASSOC_CASE == 1) {
+					foreach($this->fields as $k=>$v) {
+						$this->fields[strtoupper($k)] = $v;
+					}
+				}
+			}
+		} else {
+			$this->fields = @mssql_fetch_row($this->_queryID);
+		}
+		if ($this->fields) return true;
+		$this->EOF = true;
+		
+		return false;
+	}
+
+	
+	// INSERT UPDATE DELETE returns false even if no error occurs in 4.0.4
+	// also the date format has been changed from YYYY-mm-dd to dd MMM YYYY in 4.0.4. Idiot!
+	function _fetch($ignore_fields=false) 
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+			if ($this->fetchMode & ADODB_FETCH_NUM) {
+				//ADODB_FETCH_BOTH mode
+				$this->fields = @mssql_fetch_array($this->_queryID);
+			} else {
+				if ($this->hasFetchAssoc) // only for PHP 4.2.0 or later
+					$this->fields = @mssql_fetch_assoc($this->_queryID);
+				else {
+					$this->fields = @mssql_fetch_array($this->_queryID);
+					if (@is_array($$this->fields)) {
+						$fassoc = array();
+						foreach($$this->fields as $k => $v) {
+							if (is_integer($k)) continue;
+							$fassoc[$k] = $v;
+						}
+						$this->fields = $fassoc;
+					}
+				}
+			}
+			
+			if (!$this->fields) {
+			} else if (ADODB_ASSOC_CASE == 0) {
+				foreach($this->fields as $k=>$v) {
+					$this->fields[strtolower($k)] = $v;
+				}
+			} else if (ADODB_ASSOC_CASE == 1) {
+				foreach($this->fields as $k=>$v) {
+					$this->fields[strtoupper($k)] = $v;
+				}
+			}
+		} else {
+			$this->fields = @mssql_fetch_row($this->_queryID);
+		}
+		return $this->fields;
+	}
+	
+	/*	close() only needs to be called if you are worried about using too much memory while your script
+		is running. All associated result memory for the specified result identifier will automatically be freed.	*/
+
+	function _close() 
+	{
+		$rez = mssql_free_result($this->_queryID);	
+		$this->_queryID = false;
+		return $rez;
+	}
+	// mssql uses a default date like Dec 30 2000 12:00AM
+	function UnixDate($v)
+	{
+		return ADORecordSet_array_mssql::UnixDate($v);
+	}
+	
+	function UnixTimeStamp($v)
+	{
+		return ADORecordSet_array_mssql::UnixTimeStamp($v);
+	}
+	
+}
+
+
+class ADORecordSet_array_mssql extends ADORecordSet_array {
+	function ADORecordSet_array_mssql($id=-1,$mode=false) 
+	{
+		$this->ADORecordSet_array($id,$mode);
+	}
+	
+		// mssql uses a default date like Dec 30 2000 12:00AM
+	function UnixDate($v)
+	{
+	
+		if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixDate($v);
+		
+	global $ADODB_mssql_mths,$ADODB_mssql_date_order;
+	
+		//Dec 30 2000 12:00AM 
+		if ($ADODB_mssql_date_order == 'dmy') {
+			if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4})|" ,$v, $rr)) {
+				return parent::UnixDate($v);
+			}
+			if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+			
+			$theday = $rr[1];
+			$themth =  substr(strtoupper($rr[2]),0,3);
+		} else {
+			if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})|" ,$v, $rr)) {
+				return parent::UnixDate($v);
+			}
+			if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+			
+			$theday = $rr[2];
+			$themth = substr(strtoupper($rr[1]),0,3);
+		}
+		$themth = $ADODB_mssql_mths[$themth];
+		if ($themth <= 0) return false;
+		// h-m-s-MM-DD-YY
+		return  mktime(0,0,0,$themth,$theday,$rr[3]);
+	}
+	
+	function UnixTimeStamp($v)
+	{
+	
+		if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixTimeStamp($v);
+		
+	global $ADODB_mssql_mths,$ADODB_mssql_date_order;
+	
+		//Dec 30 2000 12:00AM
+		 if ($ADODB_mssql_date_order == 'dmy') {
+			 if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|"
+			,$v, $rr)) return parent::UnixTimeStamp($v);
+			if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+		
+			$theday = $rr[1];
+			$themth =  substr(strtoupper($rr[2]),0,3);
+		} else {
+			if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|"
+			,$v, $rr)) return parent::UnixTimeStamp($v);
+			if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+		
+			$theday = $rr[2];
+			$themth = substr(strtoupper($rr[1]),0,3);
+		}
+		
+		$themth = $ADODB_mssql_mths[$themth];
+		if ($themth <= 0) return false;
+		
+		switch (strtoupper($rr[6])) {
+		case 'P':
+			if ($rr[4]<12) $rr[4] += 12;
+			break;
+		case 'A':
+			if ($rr[4]==12) $rr[4] = 0;
+			break;
+		default:
+			break;
+		}
+		// h-m-s-MM-DD-YY
+		return  mktime($rr[4],$rr[5],0,$themth,$theday,$rr[3]);
+	}
+}
+
+/*
+Code Example 1:
+
+select 	object_name(constid) as constraint_name,
+       	object_name(fkeyid) as table_name, 
+        col_name(fkeyid, fkey) as column_name,
+	object_name(rkeyid) as referenced_table_name,
+   	col_name(rkeyid, rkey) as referenced_column_name
+from sysforeignkeys
+where object_name(fkeyid) = x
+order by constraint_name, table_name, referenced_table_name,  keyno
+
+Code Example 2:
+select 	constraint_name,
+	column_name,
+	ordinal_position
+from information_schema.key_column_usage
+where constraint_catalog = db_name()
+and table_name = x
+order by constraint_name, ordinal_position
+
+http://www.databasejournal.com/scripts/article.php/1440551
+*/
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssql_n.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssql_n.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssql_n.inc.php	(revision 225)
@@ -0,0 +1,166 @@
+<?php  
+
+/// $Id $
+
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// NOTICE OF COPYRIGHT                                                   //
+//                                                                       //
+// ADOdb  - Database Abstraction Library for PHP                         //
+//          http://adodb.sourceforge.net/                                //
+//                                                                       //
+// Copyright (C) 2000-2007 John Lim (jlim\@natsoft.com.my)               //
+//          All rights reserved.                                         //
+//          Released under both BSD license and LGPL library license.    //
+//          Whenever there is any discrepancy between the two licenses,  //
+//          the BSD license will take precedence                         //
+//                                                                       //
+// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
+//          http://moodle.com                                            //
+//                                                                       //
+// Copyright (C) 2001-3001 Martin Dougiamas        http://dougiamas.com  //
+//           (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com  //
+//                                                                       //
+// This program is free software; you can redistribute it and/or modify  //
+// it under the terms of the GNU General Public License as published by  //
+// the Free Software Foundation; either version 2 of the License, or     //
+// (at your option) any later version.                                   //
+//                                                                       //
+// This program is distributed in the hope that it will be useful,       //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
+// GNU General Public License for more details:                          //
+//                                                                       //
+//          http://www.gnu.org/copyleft/gpl.html                         //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
+
+/**
+*  MSSQL Driver with auto-prepended "N" for correct unicode storage
+*  of SQL literal strings. Intended to be used with MSSQL drivers that
+*  are sending UCS-2 data to MSSQL (FreeTDS and ODBTP) in order to get
+*  true cross-db compatibility from the application point of view.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+// one useful constant
+if (!defined('SINGLEQUOTE')) define('SINGLEQUOTE', "'");
+
+include_once(ADODB_DIR.'/drivers/adodb-mssql.inc.php');
+
+class ADODB_mssql_n extends ADODB_mssql {
+	var $databaseType = "mssql_n";
+	
+	function ADODB_mssqlpo()
+	{
+		ADODB_mssql::ADODB_mssql();
+	}
+
+	function _query($sql,$inputarr)
+	{
+        $sql = $this->_appendN($sql);
+		return ADODB_mssql::_query($sql,$inputarr);
+	}
+
+    /**
+     * This function will intercept all the literals used in the SQL, prepending the "N" char to them
+     * in order to allow mssql to store properly data sent in the correct UCS-2 encoding (by freeTDS
+     * and ODBTP) keeping SQL compatibility at ADOdb level (instead of hacking every project to add
+     * the "N" notation when working against MSSQL.
+     *
+     * Note that this hack only must be used if ALL the char-based columns in your DB are of type nchar,
+     * nvarchar and ntext 
+     */
+    function _appendN($sql) {
+
+        $result = $sql;
+
+    /// Check we have some single quote in the query. Exit ok.
+        if (strpos($sql, SINGLEQUOTE) === false) {
+            return $sql;
+        }
+
+    /// Check we haven't an odd number of single quotes (this can cause problems below
+    /// and should be considered one wrong SQL). Exit with debug info.
+        if ((substr_count($sql, SINGLEQUOTE) & 1)) {
+            if ($this->debug) {
+                ADOConnection::outp("{$this->databaseType} internal transformation: not converted. Wrong number of quotes (odd)");
+            }
+            return $sql;
+        }
+
+    /// Check we haven't any backslash + single quote combination. It should mean wrong
+    /// backslashes use (bad magic_quotes_sybase?). Exit with debug info.
+        $regexp = '/(\\\\' . SINGLEQUOTE . '[^' . SINGLEQUOTE . '])/';
+        if (preg_match($regexp, $sql)) {
+            if ($this->debug) {
+                ADOConnection::outp("{$this->databaseType} internal transformation: not converted. Found bad use of backslash + single quote");
+            }
+            return $sql;
+        }
+
+    /// Remove pairs of single-quotes
+        $pairs = array();
+        $regexp = '/(' . SINGLEQUOTE . SINGLEQUOTE . ')/';
+        preg_match_all($regexp, $result, $list_of_pairs);
+        if ($list_of_pairs) {
+            foreach (array_unique($list_of_pairs[0]) as $key=>$value) {
+                $pairs['<@#@#@PAIR-'.$key.'@#@#@>'] = $value;
+            }
+            if (!empty($pairs)) {
+                $result = str_replace($pairs, array_keys($pairs), $result);
+            }
+        }
+
+    /// Remove the rest of literals present in the query
+        $literals = array();
+        $regexp = '/(N?' . SINGLEQUOTE . '.*?' . SINGLEQUOTE . ')/is';
+        preg_match_all($regexp, $result, $list_of_literals);
+        if ($list_of_literals) {
+            foreach (array_unique($list_of_literals[0]) as $key=>$value) {
+                $literals['<#@#@#LITERAL-'.$key.'#@#@#>'] = $value;
+            }
+            if (!empty($literals)) {
+                $result = str_replace($literals, array_keys($literals), $result);
+            }
+        }
+
+    /// Analyse literals to prepend the N char to them if their contents aren't numeric
+        if (!empty($literals)) {
+            foreach ($literals as $key=>$value) {
+                if (!is_numeric(trim($value, SINGLEQUOTE))) {
+                /// Non numeric string, prepend our dear N
+                    $literals[$key] = 'N' . trim($value, 'N'); //Trimming potentially existing previous "N"
+                }
+            }
+        }
+
+    /// Re-apply literals to the text
+        if (!empty($literals)) {
+            $result = str_replace(array_keys($literals), $literals, $result);
+        }
+
+    /// Re-apply pairs of single-quotes to the text
+        if (!empty($pairs)) {
+            $result = str_replace(array_keys($pairs), $pairs, $result);
+        }
+
+    /// Print transformation if debug = on
+        if ($result != $sql && $this->debug) {
+            ADOConnection::outp("{$this->databaseType} internal transformation:<br>{$sql}<br>to<br>{$result}");
+        }
+
+        return $result;
+    }
+}
+
+class ADORecordset_mssql_n extends ADORecordset_mssql {
+	var $databaseType = "mssql_n";
+	function ADORecordset_mssql_n($id,$mode=false)
+	{
+		$this->ADORecordset_mssql($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssqlpo.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssqlpo.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mssqlpo.inc.php	(revision 225)
@@ -0,0 +1,62 @@
+<?php
+/**
+* @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+* Released under both BSD license and Lesser GPL library license.
+* Whenever there is any discrepancy between the two licenses,
+* the BSD license will take precedence.
+*
+* Set tabs to 4 for best viewing.
+*
+* Latest version is available at http://php.weblogs.com
+*
+*  Portable MSSQL Driver that supports || instead of +
+*
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+
+/*
+	The big difference between mssqlpo and it's parent mssql is that mssqlpo supports
+	the more standard || string concatenation operator.
+*/
+	
+include_once(ADODB_DIR.'/drivers/adodb-mssql.inc.php');
+
+class ADODB_mssqlpo extends ADODB_mssql {
+	var $databaseType = "mssqlpo";
+	var $concat_operator = '||'; 
+	
+	function ADODB_mssqlpo()
+	{
+		ADODB_mssql::ADODB_mssql();
+	}
+
+	function PrepareSP($sql)
+	{
+		if (!$this->_has_mssql_init) {
+			ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0");
+			return $sql;
+		}
+		if (is_string($sql)) $sql = str_replace('||','+',$sql);
+		$stmt = mssql_init($sql,$this->_connectionID);
+		if (!$stmt)  return $sql;
+		return array($sql,$stmt);
+	}
+	
+	function _query($sql,$inputarr)
+	{
+		if (is_string($sql)) $sql = str_replace('||','+',$sql);
+		return ADODB_mssql::_query($sql,$inputarr);
+	}
+}
+
+class ADORecordset_mssqlpo extends ADORecordset_mssql {
+	var $databaseType = "mssqlpo";
+	function ADORecordset_mssqlpo($id,$mode=false)
+	{
+		$this->ADORecordset_mssql($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysql.inc.php	(revision 225)
@@ -0,0 +1,782 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+  
+  MySQL code that does not support transactions. Use mysqlt if you need transactions.
+  Requires mysql client. Works on Windows and Unix.
+  
+ 28 Feb 2001: MetaColumns bug fix - suggested by  Freek Dijkstra (phpeverywhere@macfreek.com)
+*/ 
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (! defined("_ADODB_MYSQL_LAYER")) {
+ define("_ADODB_MYSQL_LAYER", 1 );
+
+class ADODB_mysql extends ADOConnection {
+	var $databaseType = 'mysql';
+	var $dataProvider = 'mysql';
+	var $hasInsertID = true;
+	var $hasAffectedRows = true;	
+	var $metaTablesSQL = "SHOW TABLES";	
+	var $metaColumnsSQL = "SHOW COLUMNS FROM `%s`";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $hasLimit = true;
+	var $hasMoveFirst = true;
+	var $hasGenID = true;
+	var $isoDates = true; // accepts dates in ISO format
+	var $sysDate = 'CURDATE()';
+	var $sysTimeStamp = 'NOW()';
+	var $hasTransactions = false;
+	var $forceNewConnect = false;
+	var $poorAffectedRows = true;
+	var $clientFlags = 0;
+	var $substr = "substring";
+	var $nameQuote = '`';		/// string to use to quote identifiers and names
+	var $compat323 = false; 		// true if compat with mysql 3.23
+	
+	function ADODB_mysql() 
+	{			
+		if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
+	}
+	
+	function ServerInfo()
+	{
+		$arr['description'] = ADOConnection::GetOne("select version()");
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+	
+	function IfNull( $field, $ifNull ) 
+	{
+		return " IFNULL($field, $ifNull) "; // if MySQL
+	}
+	
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{	
+		$save = $this->metaTablesSQL;
+		if ($showSchema && is_string($showSchema)) {
+			$this->metaTablesSQL .= " from $showSchema";
+		}
+		
+		if ($mask) {
+			$mask = $this->qstr($mask);
+			$this->metaTablesSQL .= " like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		$this->metaTablesSQL = $save;
+		return $ret;
+	}
+	
+	
+	function &MetaIndexes ($table, $primary = FALSE, $owner=false)
+	{
+        // save old fetch mode
+        global $ADODB_FETCH_MODE;
+        
+		$false = false;
+        $save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+               $savem = $this->SetFetchMode(FALSE);
+        }
+        
+        // get index details
+        $rs = $this->Execute(sprintf('SHOW INDEX FROM %s',$table));
+        
+        // restore fetchmode
+        if (isset($savem)) {
+                $this->SetFetchMode($savem);
+        }
+        $ADODB_FETCH_MODE = $save;
+        
+        if (!is_object($rs)) {
+                return $false;
+        }
+        
+        $indexes = array ();
+        
+        // parse index data into array
+        while ($row = $rs->FetchRow()) {
+                if ($primary == FALSE AND $row[2] == 'PRIMARY') {
+                        continue;
+                }
+                
+                if (!isset($indexes[$row[2]])) {
+                        $indexes[$row[2]] = array(
+                                'unique' => ($row[1] == 0),
+                                'columns' => array()
+                        );
+                }
+                
+                $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4];
+        }
+        
+        // sort columns by order in the index
+        foreach ( array_keys ($indexes) as $index )
+        {
+                ksort ($indexes[$index]['columns']);
+        }
+        
+        return $indexes;
+	}
+
+	
+	// if magic quotes disabled, use mysql_real_escape_string()
+	function qstr($s,$magic_quotes=false)
+	{
+		if (!$magic_quotes) {
+		
+			if (ADODB_PHPVER >= 0x4300) {
+				if (is_resource($this->_connectionID))
+					return "'".mysql_real_escape_string($s,$this->_connectionID)."'";
+			}
+			if ($this->replaceQuote[0] == '\\'){
+				$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s);
+			}
+			return  "'".str_replace("'",$this->replaceQuote,$s)."'"; 
+		}
+		
+		// undo magic quotes for "
+		$s = str_replace('\\"','"',$s);
+		return "'$s'";
+	}
+	
+	function _insertid()
+	{
+		return ADOConnection::GetOne('SELECT LAST_INSERT_ID()');
+		//return mysql_insert_id($this->_connectionID);
+	}
+	
+	function GetOne($sql,$inputarr=false)
+	{
+		if ($this->compat323 == false && strncasecmp($sql,'sele',4) == 0) {
+			$rs =& $this->SelectLimit($sql,1,-1,$inputarr);
+			if ($rs) {
+				$rs->Close();
+				if ($rs->EOF) return false;
+				return reset($rs->fields);
+			}
+		} else {
+			return ADOConnection::GetOne($sql,$inputarr);
+		}
+		return false;
+	}
+	
+	function BeginTrans()
+	{
+		if ($this->debug) ADOConnection::outp("Transactions not supported in 'mysql' driver. Use 'mysqlt' or 'mysqli' driver");
+	}
+	
+	function _affectedrows()
+	{
+			return mysql_affected_rows($this->_connectionID);
+	}
+  
+ 	// See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html
+	// Reference on Last_Insert_ID on the recommended way to simulate sequences
+ 	var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);";
+	var $_genSeqSQL = "create table %s (id int not null)";
+	var $_genSeq2SQL = "insert into %s values (%s)";
+	var $_dropSeqSQL = "drop table %s";
+	
+	function CreateSequence($seqname='adodbseq',$startID=1)
+	{
+		if (empty($this->_genSeqSQL)) return false;
+		$u = strtoupper($seqname);
+		
+		$ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
+		if (!$ok) return false;
+		return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1));
+	}
+	
+
+	function GenID($seqname='adodbseq',$startID=1)
+	{
+		// post-nuke sets hasGenID to false
+		if (!$this->hasGenID) return false;
+		
+		$savelog = $this->_logsql;
+		$this->_logsql = false;
+		$getnext = sprintf($this->_genIDSQL,$seqname);
+		$holdtransOK = $this->_transOK; // save the current status
+		$rs = @$this->Execute($getnext);
+		if (!$rs) {
+			if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset
+			$u = strtoupper($seqname);
+			$this->Execute(sprintf($this->_genSeqSQL,$seqname));
+			$this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1));
+			$rs = $this->Execute($getnext);
+		}
+		$this->genID = mysql_insert_id($this->_connectionID);
+		
+		if ($rs) $rs->Close();
+		
+		$this->_logsql = $savelog;
+		return $this->genID;
+	}
+	
+  	function &MetaDatabases()
+	{
+		$qid = mysql_list_dbs($this->_connectionID);
+		$arr = array();
+		$i = 0;
+		$max = mysql_num_rows($qid);
+		while ($i < $max) {
+			$db = mysql_tablename($qid,$i);
+			if ($db != 'mysql') $arr[] = $db;
+			$i += 1;
+		}
+		return $arr;
+	}
+	
+		
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysTimeStamp;
+		$s = 'DATE_FORMAT('.$col.",'";
+		$concat = false;
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			$ch = $fmt[$i];
+			switch($ch) {
+				
+			default:
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				/** FALL THROUGH */
+			case '-':
+			case '/':
+				$s .= $ch;
+				break;
+				
+			case 'Y':
+			case 'y':
+				$s .= '%Y';
+				break;
+			case 'M':
+				$s .= '%b';
+				break;
+				
+			case 'm':
+				$s .= '%m';
+				break;
+			case 'D':
+			case 'd':
+				$s .= '%d';
+				break;
+			
+			case 'Q':
+			case 'q':
+				$s .= "'),Quarter($col)";
+				
+				if ($len > $i+1) $s .= ",DATE_FORMAT($col,'";
+				else $s .= ",('";
+				$concat = true;
+				break;
+			
+			case 'H': 
+				$s .= '%H';
+				break;
+				
+			case 'h':
+				$s .= '%I';
+				break;
+				
+			case 'i':
+				$s .= '%i';
+				break;
+				
+			case 's':
+				$s .= '%s';
+				break;
+				
+			case 'a':
+			case 'A':
+				$s .= '%p';
+				break;
+				
+			case 'w':
+				$s .= '%w';
+				break;
+				
+			 case 'W':
+				$s .= '%U';
+				break;
+				
+			case 'l':
+				$s .= '%W';
+				break;
+			}
+		}
+		$s.="')";
+		if ($concat) $s = "CONCAT($s)";
+		return $s;
+	}
+	
+
+	// returns concatenated string
+	// much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator
+	function Concat()
+	{
+		$s = "";
+		$arr = func_get_args();
+		
+		// suggestion by andrew005@mnogo.ru
+		$s = implode(',',$arr); 
+		if (strlen($s) > 0) return "CONCAT($s)";
+		else return '';
+	}
+	
+	function OffsetDate($dayFraction,$date=false)
+	{		
+		if (!$date) $date = $this->sysDate;
+		
+		$fraction = $dayFraction * 24 * 3600;
+		return $date . ' + INTERVAL ' .	 $fraction.' SECOND';
+		
+//		return "from_unixtime(unix_timestamp($date)+$fraction)";
+	}
+	
+	// returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!empty($this->port)) $argHostname .= ":".$this->port;
+		
+		if (ADODB_PHPVER >= 0x4300)
+			$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
+												$this->forceNewConnect,$this->clientFlags);
+		else if (ADODB_PHPVER >= 0x4200)
+			$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
+												$this->forceNewConnect);
+		else
+			$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword);
+	
+		if ($this->_connectionID === false) return false;
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!empty($this->port)) $argHostname .= ":".$this->port;
+		
+		if (ADODB_PHPVER >= 0x4300)
+			$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
+		else
+			$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		if ($this->autoRollback) $this->RollbackTrans();
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+	function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		$this->forceNewConnect = true;
+		return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename);
+	}
+	
+ 	function &MetaColumns($table) 
+	{
+		$this->_findschema($table,$schema);
+		if ($schema) {
+			$dbName = $this->database;
+			$this->SelectDB($schema);
+		}
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+		
+		if ($schema) {
+			$this->SelectDB($dbName);
+		}
+		
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		if (!is_object($rs)) {
+			$false = false;
+			return $false;
+		}
+			
+		$retarr = array();
+		while (!$rs->EOF){
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			$type = $rs->fields[1];
+			
+			// split type into type(length):
+			$fld->scale = null;
+			if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
+				$fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1;
+			} elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
+			} elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$arr = explode(",",$query_array[2]);
+				$fld->enums = $arr;
+				$zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
+				$fld->max_length = ($zlen > 0) ? $zlen : 1;
+			} else {
+				$fld->type = $type;
+				$fld->max_length = -1;
+			}
+			$fld->not_null = ($rs->fields[2] != 'YES');
+			$fld->primary_key = ($rs->fields[3] == 'PRI');
+			$fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false);
+			$fld->binary = (strpos($type,'blob') !== false);
+			$fld->unsigned = (strpos($type,'unsigned') !== false);
+				
+			if (!$fld->binary) {
+				$d = $rs->fields[4];
+				if ($d != '' && $d != 'NULL') {
+					$fld->has_default = true;
+					$fld->default_value = $d;
+				} else {
+					$fld->has_default = false;
+				}
+			}
+			
+			if ($save == ADODB_FETCH_NUM) {
+				$retarr[] = $fld;
+			} else {
+				$retarr[strtoupper($fld->name)] = $fld;
+			}
+				$rs->MoveNext();
+			}
+		
+			$rs->Close();
+			return $retarr;	
+	}
+		
+	// returns true or false
+	function SelectDB($dbName) 
+	{
+		$this->database = $dbName;
+		$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
+		if ($this->_connectionID) {
+			return @mysql_select_db($dbName,$this->_connectionID);		
+		}
+		else return false;	
+	}
+	
+	// parameters use PostgreSQL convention, not MySQL
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0)
+	{
+		$offsetStr =($offset>=0) ? ((integer)$offset)."," : '';
+		// jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220
+		if ($nrows < 0) $nrows = '18446744073709551615'; 
+		
+		if ($secs)
+			$rs =& $this->CacheExecute($secs,$sql." LIMIT $offsetStr".((integer)$nrows),$inputarr);
+		else
+			$rs =& $this->Execute($sql." LIMIT $offsetStr".((integer)$nrows),$inputarr);
+		return $rs;
+	}
+	
+	// returns queryID or false
+	function _query($sql,$inputarr)
+	{
+	//global $ADODB_COUNTRECS;
+		//if($ADODB_COUNTRECS) 
+		return mysql_query($sql,$this->_connectionID);
+		//else return @mysql_unbuffered_query($sql,$this->_connectionID); // requires PHP >= 4.0.6
+	}
+
+	/*	Returns: the last error message from previous database operation	*/	
+	function ErrorMsg() 
+	{
+	
+		if ($this->_logsql) return $this->_errorMsg;
+		if (empty($this->_connectionID)) $this->_errorMsg = @mysql_error();
+		else $this->_errorMsg = @mysql_error($this->_connectionID);
+		return $this->_errorMsg;
+	}
+	
+	/*	Returns: the last error number from previous database operation	*/	
+	function ErrorNo() 
+	{
+		if ($this->_logsql) return $this->_errorCode;
+		if (empty($this->_connectionID))  return @mysql_errno();
+		else return @mysql_errno($this->_connectionID);
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		@mysql_close($this->_connectionID);
+		$this->_connectionID = false;
+	}
+
+	
+	/*
+	* Maximum size of C field
+	*/
+	function CharMax()
+	{
+		return 255; 
+	}
+	
+	/*
+	* Maximum size of X field
+	*/
+	function TextMax()
+	{
+		return 4294967295; 
+	}
+	
+	// "Innox - Juan Carlos Gonzalez" <jgonzalez#innox.com.mx>
+	function MetaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE )
+     {
+	 global $ADODB_FETCH_MODE;
+		if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true;
+
+         if ( !empty($owner) ) {
+            $table = "$owner.$table";
+         }
+         $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table));
+		 if ($associative) $create_sql = $a_create_table["Create Table"];
+         else $create_sql  = $a_create_table[1];
+
+         $matches = array();
+
+         if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false;
+	     $foreign_keys = array();	 	 
+         $num_keys = count($matches[0]);
+         for ( $i = 0;  $i < $num_keys;  $i ++ ) {
+             $my_field  = explode('`, `', $matches[1][$i]);
+             $ref_table = $matches[2][$i];
+             $ref_field = explode('`, `', $matches[3][$i]);
+
+             if ( $upper ) {
+                 $ref_table = strtoupper($ref_table);
+             }
+
+             $foreign_keys[$ref_table] = array();
+             $num_fields = count($my_field);
+             for ( $j = 0;  $j < $num_fields;  $j ++ ) {
+                 if ( $associative ) {
+                     $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j];
+                 } else {
+                     $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}";
+                 }
+             }
+         }
+         
+         return  $foreign_keys;
+     }
+	 
+	
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+
+class ADORecordSet_mysql extends ADORecordSet{	
+	
+	var $databaseType = "mysql";
+	var $canSeek = true;
+	
+	function ADORecordSet_mysql($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
+		case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:
+		default:
+			$this->fetchMode = MYSQL_BOTH; break;
+		}
+		$this->adodbFetchMode = $mode;
+		$this->ADORecordSet($queryID);	
+	}
+	
+	function _initrs()
+	{
+	//GLOBAL $ADODB_COUNTRECS;
+	//	$this->_numOfRows = ($ADODB_COUNTRECS) ? @mysql_num_rows($this->_queryID):-1;
+		$this->_numOfRows = @mysql_num_rows($this->_queryID);
+		$this->_numOfFields = @mysql_num_fields($this->_queryID);
+	}
+	
+	function &FetchField($fieldOffset = -1) 
+	{	
+		if ($fieldOffset != -1) {
+			$o = @mysql_fetch_field($this->_queryID, $fieldOffset);
+			$f = @mysql_field_flags($this->_queryID,$fieldOffset);
+			$o->max_length = @mysql_field_len($this->_queryID,$fieldOffset); // suggested by: Jim Nicholson (jnich#att.com)
+			//$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
+			$o->binary = (strpos($f,'binary')!== false);
+		}
+		else if ($fieldOffset == -1) {	/*	The $fieldOffset argument is not provided thus its -1 	*/
+			$o = @mysql_fetch_field($this->_queryID);
+		$o->max_length = @mysql_field_len($this->_queryID); // suggested by: Jim Nicholson (jnich#att.com)
+		//$o->max_length = -1; // mysql returns the max length less spaces -- so it is unrealiable
+		}
+			
+		return $o;
+	}
+
+	function &GetRowAssoc($upper=true)
+	{
+		if ($this->fetchMode == MYSQL_ASSOC && !$upper) $row = $this->fields;
+		else $row =& ADORecordSet::GetRowAssoc($upper);
+		return $row;
+	}
+	
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{	
+		// added @ by "Michael William Miller" <mille562@pilot.msu.edu>
+		if ($this->fetchMode != MYSQL_NUM) return @$this->fields[$colname];
+		
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+	function _seek($row)
+	{
+		if ($this->_numOfRows == 0) return false;
+		return @mysql_data_seek($this->_queryID,$row);
+	}
+	
+	function MoveNext()
+	{
+		//return adodb_movenext($this);
+		//if (defined('ADODB_EXTENSION')) return adodb_movenext($this);
+		if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) {
+			$this->_currentRow += 1;
+			return true;
+		}
+		if (!$this->EOF) {
+			$this->_currentRow += 1;
+			$this->EOF = true;
+		}
+		return false;
+	}
+	
+	function _fetch()
+	{
+		$this->fields =  @mysql_fetch_array($this->_queryID,$this->fetchMode);
+		return is_array($this->fields);
+	}
+	
+	function _close() {
+		@mysql_free_result($this->_queryID);	
+		$this->_queryID = false;	
+	}
+	
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		$len = -1; // mysql max_length is not accurate
+		switch (strtoupper($t)) {
+		case 'STRING': 
+		case 'CHAR':
+		case 'VARCHAR': 
+		case 'TINYBLOB': 
+		case 'TINYTEXT': 
+		case 'ENUM': 
+		case 'SET': 
+			if ($len <= $this->blobSize) return 'C';
+			
+		case 'TEXT':
+		case 'LONGTEXT': 
+		case 'MEDIUMTEXT':
+			return 'X';
+			
+		// php_mysql extension always returns 'blob' even if 'text'
+		// so we have to check whether binary...
+		case 'IMAGE':
+		case 'LONGBLOB': 
+		case 'BLOB':
+		case 'MEDIUMBLOB':
+			return !empty($fieldobj->binary) ? 'B' : 'X';
+			
+		case 'YEAR':
+		case 'DATE': return 'D';
+		
+		case 'TIME':
+		case 'DATETIME':
+		case 'TIMESTAMP': return 'T';
+		
+		case 'INT': 
+		case 'INTEGER':
+		case 'BIGINT':
+		case 'TINYINT':
+		case 'MEDIUMINT':
+		case 'SMALLINT': 
+			
+			if (!empty($fieldobj->primary_key)) return 'R';
+			else return 'I';
+		
+		default: return 'N';
+		}
+	}
+
+}
+
+class ADORecordSet_ext_mysql extends ADORecordSet_mysql {	
+	function ADORecordSet_ext_mysql($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
+		case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:
+		default:
+		$this->fetchMode = MYSQL_BOTH; break;
+		}
+		$this->adodbFetchMode = $mode;
+		$this->ADORecordSet($queryID);
+	}
+	
+	function MoveNext()
+	{
+		return @adodb_movenext($this);
+	}
+}
+
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysqli.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysqli.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysqli.inc.php	(revision 225)
@@ -0,0 +1,1020 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+  Set tabs to 8.
+
+  MySQL code that does not support transactions. Use mysqlt if you need transactions.
+  Requires mysql client. Works on Windows and Unix.
+
+21 October 2003: MySQLi extension implementation by Arjen de Rijke (a.de.rijke@xs4all.nl)
+Based on adodb 3.40
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (! defined("_ADODB_MYSQLI_LAYER")) {
+ define("_ADODB_MYSQLI_LAYER", 1 );
+
+ // PHP5 compat...
+ if (! defined("MYSQLI_BINARY_FLAG"))  define("MYSQLI_BINARY_FLAG", 128);
+ if (!defined('MYSQLI_READ_DEFAULT_GROUP')) define('MYSQLI_READ_DEFAULT_GROUP',1);
+
+ // disable adodb extension - currently incompatible.
+ global $ADODB_EXTENSION; $ADODB_EXTENSION = false;
+
+class ADODB_mysqli extends ADOConnection {
+	var $databaseType = 'mysqli';
+	var $dataProvider = 'native';
+	var $hasInsertID = true;
+	var $hasAffectedRows = true;
+	var $metaTablesSQL = "SHOW TABLES";
+	var $metaColumnsSQL = "SHOW COLUMNS FROM `%s`";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $hasLimit = true;
+	var $hasMoveFirst = true;
+	var $hasGenID = true;
+	var $isoDates = true; // accepts dates in ISO format
+	var $sysDate = 'CURDATE()';
+	var $sysTimeStamp = 'NOW()';
+	var $hasTransactions = true;
+	var $forceNewConnect = false;
+	var $poorAffectedRows = true;
+	var $clientFlags = 0;
+	var $substr = "substring";
+	var $port = false;
+	var $socket = false;
+	var $_bindInputArray = false;
+	var $nameQuote = '`';		/// string to use to quote identifiers and names
+	var $optionFlags = array(array(MYSQLI_READ_DEFAULT_GROUP,0));
+
+	function ADODB_mysqli()
+	{
+	 // if(!extension_loaded("mysqli"))
+	      ;//trigger_error("You must have the mysqli extension installed.", E_USER_ERROR);
+
+	}
+
+	function SetTransactionMode( $transaction_mode )
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET SESSION TRANSACTION ".$transaction_mode);
+	}
+
+	// returns true or false
+	// To add: parameter int $port,
+	//         parameter string $socket
+	function _connect($argHostname = NULL,
+			  $argUsername = NULL,
+			  $argPassword = NULL,
+			  $argDatabasename = NULL, $persist=false)
+	  {
+	  	 if(!extension_loaded("mysqli")) {
+			return null;
+		 }
+	    $this->_connectionID = @mysqli_init();
+
+	    if (is_null($this->_connectionID)) {
+	      // mysqli_init only fails if insufficient memory
+	      if ($this->debug)
+				ADOConnection::outp("mysqli_init() failed : "  . $this->ErrorMsg());
+	      return false;
+	    }
+		/*
+		I suggest a simple fix which would enable adodb and mysqli driver to
+		read connection options from the standard mysql configuration file
+		/etc/my.cnf - "Bastien Duclaux" <bduclaux#yahoo.com>
+		*/
+		foreach($this->optionFlags as $arr) {
+			mysqli_options($this->_connectionID,$arr[0],$arr[1]);
+		}
+
+		#if (!empty($this->port)) $argHostname .= ":".$this->port;
+		$ok = mysqli_real_connect($this->_connectionID,
+ 				    $argHostname,
+ 				    $argUsername,
+ 				    $argPassword,
+ 				    $argDatabasename,
+					$this->port,
+					$this->socket,
+					$this->clientFlags);
+
+		if ($ok) {
+	 		if ($argDatabasename)  return $this->SelectDB($argDatabasename);
+ 			return true;
+ 	   } else {
+			if ($this->debug)
+		  		ADOConnection::outp("Could't connect : "  . $this->ErrorMsg());
+			return false;
+	   }
+	}
+
+	// returns true or false
+	// How to force a persistent connection
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename, true);
+
+	}
+
+	// When is this used? Close old connection first?
+	// In _connect(), check $this->forceNewConnect?
+	function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	  {
+	    $this->forceNewConnect = true;
+	    return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename);
+	  }
+
+	function IfNull( $field, $ifNull )
+	{
+		return " IFNULL($field, $ifNull) "; // if MySQL
+	}
+
+	// do not use $ADODB_COUNTRECS
+	function GetOne($sql,$inputarr=false)
+	{
+		$ret = false;
+		$rs = &$this->Execute($sql,$inputarr);
+		if ($rs) {
+			if (!$rs->EOF) $ret = reset($rs->fields);
+			$rs->Close();
+		}
+		return $ret;
+	}
+
+	function ServerInfo()
+	{
+		$arr['description'] = $this->GetOne("select version()");
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+
+
+	function BeginTrans()
+	{
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+
+		//$this->Execute('SET AUTOCOMMIT=0');
+		mysqli_autocommit($this->_connectionID, false);
+		$this->Execute('BEGIN');
+		return true;
+	}
+
+	function CommitTrans($ok=true)
+	{
+		if ($this->transOff) return true;
+		if (!$ok) return $this->RollbackTrans();
+
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('COMMIT');
+
+		//$this->Execute('SET AUTOCOMMIT=1');
+		mysqli_autocommit($this->_connectionID, true);
+		return true;
+	}
+
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('ROLLBACK');
+		//$this->Execute('SET AUTOCOMMIT=1');
+		mysqli_autocommit($this->_connectionID, true);
+		return true;
+	}
+
+	function RowLock($tables,$where='',$flds='1 as adodb_ignore')
+	{
+		if ($this->transCnt==0) $this->BeginTrans();
+		if ($where) $where = ' where '.$where;
+		$rs =& $this->Execute("select $flds from $tables $where for update");
+		return !empty($rs);
+	}
+
+	// if magic quotes disabled, use mysql_real_escape_string()
+	// From readme.htm:
+	// Quotes a string to be sent to the database. The $magic_quotes_enabled
+	// parameter may look funny, but the idea is if you are quoting a
+	// string extracted from a POST/GET variable, then
+	// pass get_magic_quotes_gpc() as the second parameter. This will
+	// ensure that the variable is not quoted twice, once by qstr and once
+	// by the magic_quotes_gpc.
+	//
+	//Eg. $s = $db->qstr(_GET['name'],get_magic_quotes_gpc());
+	function qstr($s, $magic_quotes = false)
+	{
+		if (!$magic_quotes) {
+	    	if (PHP_VERSION >= 5)
+	      		return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'";
+
+		if ($this->replaceQuote[0] == '\\')
+			$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$s);
+	    return  "'".str_replace("'",$this->replaceQuote,$s)."'";
+	  }
+	  // undo magic quotes for "
+	  $s = str_replace('\\"','"',$s);
+	  return "'$s'";
+	}
+
+	function _insertid()
+	{
+	  $result = @mysqli_insert_id($this->_connectionID);
+	  if ($result == -1){
+	      if ($this->debug) ADOConnection::outp("mysqli_insert_id() failed : "  . $this->ErrorMsg());
+	  }
+	  return $result;
+	}
+
+	// Only works for INSERT, UPDATE and DELETE query's
+	function _affectedrows()
+	{
+	  $result =  @mysqli_affected_rows($this->_connectionID);
+	  if ($result == -1) {
+	      if ($this->debug) ADOConnection::outp("mysqli_affected_rows() failed : "  . $this->ErrorMsg());
+	  }
+	  return $result;
+	}
+
+ 	// See http://www.mysql.com/doc/M/i/Miscellaneous_functions.html
+	// Reference on Last_Insert_ID on the recommended way to simulate sequences
+ 	var $_genIDSQL = "update %s set id=LAST_INSERT_ID(id+1);";
+	var $_genSeqSQL = "create table %s (id int not null)";
+	var $_genSeq2SQL = "insert into %s values (%s)";
+	var $_dropSeqSQL = "drop table %s";
+
+	function CreateSequence($seqname='adodbseq',$startID=1)
+	{
+		if (empty($this->_genSeqSQL)) return false;
+		$u = strtoupper($seqname);
+
+		$ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
+		if (!$ok) return false;
+		return $this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1));
+	}
+
+	function GenID($seqname='adodbseq',$startID=1)
+	{
+		// post-nuke sets hasGenID to false
+		if (!$this->hasGenID) return false;
+
+		$getnext = sprintf($this->_genIDSQL,$seqname);
+		$holdtransOK = $this->_transOK; // save the current status
+		$rs = @$this->Execute($getnext);
+		if (!$rs) {
+			if ($holdtransOK) $this->_transOK = true; //if the status was ok before reset
+			$u = strtoupper($seqname);
+			$this->Execute(sprintf($this->_genSeqSQL,$seqname));
+			$this->Execute(sprintf($this->_genSeq2SQL,$seqname,$startID-1));
+			$rs = $this->Execute($getnext);
+		}
+		$this->genID = mysqli_insert_id($this->_connectionID);
+
+		if ($rs) $rs->Close();
+
+		return $this->genID;
+	}
+
+  	function &MetaDatabases()
+	{
+		$query = "SHOW DATABASES";
+		$ret =& $this->Execute($query);
+		if ($ret && is_object($ret)){
+		   $arr = array();
+			while (!$ret->EOF){
+				$db = $ret->Fields('Database');
+				if ($db != 'mysql') $arr[] = $db;
+				$ret->MoveNext();
+			}
+   		   return $arr;
+		}
+        return $ret;
+	}
+
+
+	function &MetaIndexes ($table, $primary = FALSE)
+	{
+		// save old fetch mode
+		global $ADODB_FETCH_MODE;
+
+		$false = false;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== FALSE) {
+		       $savem = $this->SetFetchMode(FALSE);
+		}
+
+		// get index details
+		$rs = $this->Execute(sprintf('SHOW INDEXES FROM %s',$table));
+
+		// restore fetchmode
+		if (isset($savem)) {
+		        $this->SetFetchMode($savem);
+		}
+		$ADODB_FETCH_MODE = $save;
+
+		if (!is_object($rs)) {
+		        return $false;
+		}
+
+		$indexes = array ();
+
+		// parse index data into array
+		while ($row = $rs->FetchRow()) {
+		        if ($primary == FALSE AND $row[2] == 'PRIMARY') {
+		                continue;
+		        }
+
+		        if (!isset($indexes[$row[2]])) {
+		                $indexes[$row[2]] = array(
+		                        'unique' => ($row[1] == 0),
+		                        'columns' => array()
+		                );
+		        }
+
+		        $indexes[$row[2]]['columns'][$row[3] - 1] = $row[4];
+		}
+
+		// sort columns by order in the index
+		foreach ( array_keys ($indexes) as $index )
+		{
+		        ksort ($indexes[$index]['columns']);
+		}
+
+		return $indexes;
+	}
+
+
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{
+		if (!$col) $col = $this->sysTimeStamp;
+		$s = 'DATE_FORMAT('.$col.",'";
+		$concat = false;
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= '%Y';
+				break;
+			case 'Q':
+			case 'q':
+				$s .= "'),Quarter($col)";
+
+				if ($len > $i+1) $s .= ",DATE_FORMAT($col,'";
+				else $s .= ",('";
+				$concat = true;
+				break;
+			case 'M':
+				$s .= '%b';
+				break;
+
+			case 'm':
+				$s .= '%m';
+				break;
+			case 'D':
+			case 'd':
+				$s .= '%d';
+				break;
+
+			case 'H':
+				$s .= '%H';
+				break;
+
+			case 'h':
+				$s .= '%I';
+				break;
+
+			case 'i':
+				$s .= '%i';
+				break;
+
+			case 's':
+				$s .= '%s';
+				break;
+
+			case 'a':
+			case 'A':
+				$s .= '%p';
+				break;
+
+			case 'w':
+				$s .= '%w';
+				break;
+
+			case 'l':
+				$s .= '%W';
+				break;
+
+			default:
+
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				$s .= $ch;
+				break;
+			}
+		}
+		$s.="')";
+		if ($concat) $s = "CONCAT($s)";
+		return $s;
+	}
+
+	// returns concatenated string
+	// much easier to run "mysqld --ansi" or "mysqld --sql-mode=PIPES_AS_CONCAT" and use || operator
+	function Concat()
+	{
+		$s = "";
+		$arr = func_get_args();
+
+		// suggestion by andrew005@mnogo.ru
+		$s = implode(',',$arr);
+		if (strlen($s) > 0) return "CONCAT($s)";
+		else return '';
+	}
+
+	// dayFraction is a day in floating point
+	function OffsetDate($dayFraction,$date=false)
+	{
+		if (!$date) $date = $this->sysDate;
+
+		$fraction = $dayFraction * 24 * 3600;
+		return $date . ' + INTERVAL ' .	 $fraction.' SECOND';
+
+//		return "from_unixtime(unix_timestamp($date)+$fraction)";
+	}
+
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false)
+	{
+		$save = $this->metaTablesSQL;
+		if ($showSchema && is_string($showSchema)) {
+			$this->metaTablesSQL .= " from $showSchema";
+		}
+
+		if ($mask) {
+			$mask = $this->qstr($mask);
+			$this->metaTablesSQL .= " like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+
+		$this->metaTablesSQL = $save;
+		return $ret;
+	}
+
+	// "Innox - Juan Carlos Gonzalez" <jgonzalez#innox.com.mx>
+	function MetaForeignKeys( $table, $owner = FALSE, $upper = FALSE, $associative = FALSE )
+	{
+	 global $ADODB_FETCH_MODE;
+
+		if ($ADODB_FETCH_MODE == ADODB_FETCH_ASSOC || $this->fetchMode == ADODB_FETCH_ASSOC) $associative = true;
+
+	    if ( !empty($owner) ) {
+	       $table = "$owner.$table";
+	    }
+	    $a_create_table = $this->getRow(sprintf('SHOW CREATE TABLE %s', $table));
+		if ($associative) $create_sql = $a_create_table["Create Table"];
+	    else $create_sql  = $a_create_table[1];
+
+	    $matches = array();
+
+	    if (!preg_match_all("/FOREIGN KEY \(`(.*?)`\) REFERENCES `(.*?)` \(`(.*?)`\)/", $create_sql, $matches)) return false;
+	 	$foreign_keys = array();
+	    $num_keys = count($matches[0]);
+	    for ( $i = 0;  $i < $num_keys;  $i ++ ) {
+	        $my_field  = explode('`, `', $matches[1][$i]);
+	        $ref_table = $matches[2][$i];
+	        $ref_field = explode('`, `', $matches[3][$i]);
+
+	        if ( $upper ) {
+	            $ref_table = strtoupper($ref_table);
+	        }
+
+	        $foreign_keys[$ref_table] = array();
+	        $num_fields               = count($my_field);
+	        for ( $j = 0;  $j < $num_fields;  $j ++ ) {
+	            if ( $associative ) {
+	                $foreign_keys[$ref_table][$ref_field[$j]] = $my_field[$j];
+	            } else {
+	                $foreign_keys[$ref_table][] = "{$my_field[$j]}={$ref_field[$j]}";
+	            }
+	        }
+	    }
+
+	    return  $foreign_keys;
+	}
+
+ 	function &MetaColumns($table)
+	{
+		$false = false;
+		if (!$this->metaColumnsSQL)
+			return $false;
+
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false)
+			$savem = $this->SetFetchMode(false);
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		if (!is_object($rs))
+			return $false;
+
+		$retarr = array();
+		while (!$rs->EOF) {
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			$type = $rs->fields[1];
+
+			// split type into type(length):
+			$fld->scale = null;
+			if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
+				$fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1;
+			} elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
+			} elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = max(array_map("strlen",explode(",",$query_array[2]))) - 2; // PHP >= 4.0.6
+				$fld->max_length = ($fld->max_length == 0 ? 1 : $fld->max_length);
+			} else {
+				$fld->type = $type;
+				$fld->max_length = -1;
+			}
+			$fld->not_null = ($rs->fields[2] != 'YES');
+			$fld->primary_key = ($rs->fields[3] == 'PRI');
+			$fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false);
+			$fld->binary = (strpos($type,'blob') !== false);
+			$fld->unsigned = (strpos($type,'unsigned') !== false);
+
+			if (!$fld->binary) {
+				$d = $rs->fields[4];
+				if ($d != '' && $d != 'NULL') {
+					$fld->has_default = true;
+					$fld->default_value = $d;
+				} else {
+					$fld->has_default = false;
+				}
+			}
+
+			if ($save == ADODB_FETCH_NUM) {
+				$retarr[] = $fld;
+			} else {
+				$retarr[strtoupper($fld->name)] = $fld;
+			}
+			$rs->MoveNext();
+		}
+
+		$rs->Close();
+		return $retarr;
+	}
+
+	// returns true or false
+	function SelectDB($dbName)
+	{
+//	    $this->_connectionID = $this->mysqli_resolve_link($this->_connectionID);
+	    $this->database = $dbName;
+		$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
+
+	    if ($this->_connectionID) {
+        	$result = @mysqli_select_db($this->_connectionID, $dbName);
+			if (!$result) {
+		    	ADOConnection::outp("Select of database " . $dbName . " failed. " . $this->ErrorMsg());
+			}
+			return $result;
+		}
+	    return false;
+	}
+
+	// parameters use PostgreSQL convention, not MySQL
+	function &SelectLimit($sql,
+			      $nrows = -1,
+			      $offset = -1,
+			      $inputarr = false,
+			      $arg3 = false,
+			      $secs = 0)
+	{
+		$offsetStr = ($offset >= 0) ? "$offset," : '';
+		if ($nrows < 0) $nrows = '18446744073709551615';
+
+		if ($secs)
+			$rs =& $this->CacheExecute($secs, $sql . " LIMIT $offsetStr$nrows" , $inputarr , $arg3);
+		else
+			$rs =& $this->Execute($sql . " LIMIT $offsetStr$nrows" , $inputarr , $arg3);
+
+		return $rs;
+	}
+
+
+	function Prepare($sql)
+	{
+		return $sql;
+
+		$stmt = $this->_connectionID->prepare($sql);
+		if (!$stmt) {
+			echo $this->ErrorMsg();
+			return $sql;
+		}
+		return array($sql,$stmt);
+	}
+
+
+	// returns queryID or false
+	function _query($sql, $inputarr)
+	{
+	global $ADODB_COUNTRECS;
+
+		if (is_array($sql)) {
+			$stmt = $sql[1];
+			$a = '';
+			foreach($inputarr as $k => $v) {
+				if (is_string($v)) $a .= 's';
+				else if (is_integer($v)) $a .= 'i';
+				else $a .= 'd';
+			}
+
+			$fnarr = array_merge( array($stmt,$a) , $inputarr);
+			$ret = call_user_func_array('mysqli_stmt_bind_param',$fnarr);
+
+			$ret = mysqli_stmt_execute($stmt);
+			return $ret;
+		}
+		if (!$mysql_res =  mysqli_query($this->_connectionID, $sql, ($ADODB_COUNTRECS) ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT)) {
+		    if ($this->debug) ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg());
+		    return false;
+		}
+
+		return $mysql_res;
+	}
+
+	/*	Returns: the last error message from previous database operation	*/
+	function ErrorMsg()
+	  {
+	    if (empty($this->_connectionID))
+	      $this->_errorMsg = @mysqli_connect_error();
+	    else
+	      $this->_errorMsg = @mysqli_error($this->_connectionID);
+	    return $this->_errorMsg;
+	  }
+
+	/*	Returns: the last error number from previous database operation	*/
+	function ErrorNo()
+	  {
+	    if (empty($this->_connectionID))
+	      return @mysqli_connect_errno();
+	    else
+	      return @mysqli_errno($this->_connectionID);
+	  }
+
+	// returns true or false
+	function _close()
+	  {
+	    @mysqli_close($this->_connectionID);
+	    $this->_connectionID = false;
+	  }
+
+	/*
+	* Maximum size of C field
+	*/
+	function CharMax()
+	{
+		return 255;
+	}
+
+	/*
+	* Maximum size of X field
+	*/
+	function TextMax()
+	{
+	  return 4294967295;
+	}
+
+
+
+	// this is a set of functions for managing client encoding - very important if the encodings
+	// of your database and your output target (i.e. HTML) don't match
+	// for instance, you may have UTF8 database and server it on-site as latin1 etc.
+	// GetCharSet - get the name of the character set the client is using now
+	// Under Windows, the functions should work with MySQL 4.1.11 and above, the set of charsets supported
+	// depends on compile flags of mysql distribution
+
+  function GetCharSet()
+  {
+    //we will use ADO's builtin property charSet
+    if (!method_exists($this->_connectionID,'character_set_name'))
+    	return false;
+
+    $this->charSet = @$this->_connectionID->character_set_name();
+    if (!$this->charSet) {
+      return false;
+    } else {
+      return $this->charSet;
+    }
+  }
+
+  // SetCharSet - switch the client encoding
+  function SetCharSet($charset_name)
+  {
+    if (!method_exists($this->_connectionID,'set_charset'))
+    	return false;
+
+    if ($this->charSet !== $charset_name) {
+      $if = @$this->_connectionID->set_charset($charset_name);
+      if ($if == "0" & $this->GetCharSet() == $charset_name) {
+        return true;
+      } else return false;
+    } else return true;
+  }
+
+
+
+
+}
+
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_mysqli extends ADORecordSet{
+
+	var $databaseType = "mysqli";
+	var $canSeek = true;
+
+	function ADORecordSet_mysqli($queryID, $mode = false)
+	{
+	  if ($mode === false)
+	   {
+	      global $ADODB_FETCH_MODE;
+	      $mode = $ADODB_FETCH_MODE;
+	   }
+
+	  switch ($mode)
+	    {
+	    case ADODB_FETCH_NUM:
+	      $this->fetchMode = MYSQLI_NUM;
+	      break;
+	    case ADODB_FETCH_ASSOC:
+	      $this->fetchMode = MYSQLI_ASSOC;
+	      break;
+	    case ADODB_FETCH_DEFAULT:
+	    case ADODB_FETCH_BOTH:
+	    default:
+	      $this->fetchMode = MYSQLI_BOTH;
+	      break;
+	    }
+	  $this->adodbFetchMode = $mode;
+	  $this->ADORecordSet($queryID);
+	}
+
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+
+		$this->_numOfRows = $ADODB_COUNTRECS ? @mysqli_num_rows($this->_queryID) : -1;
+		$this->_numOfFields = @mysqli_num_fields($this->_queryID);
+	}
+
+/*
+1      = MYSQLI_NOT_NULL_FLAG
+2      = MYSQLI_PRI_KEY_FLAG
+4      = MYSQLI_UNIQUE_KEY_FLAG
+8      = MYSQLI_MULTIPLE_KEY_FLAG
+16     = MYSQLI_BLOB_FLAG
+32     = MYSQLI_UNSIGNED_FLAG
+64     = MYSQLI_ZEROFILL_FLAG
+128    = MYSQLI_BINARY_FLAG
+256    = MYSQLI_ENUM_FLAG
+512    = MYSQLI_AUTO_INCREMENT_FLAG
+1024   = MYSQLI_TIMESTAMP_FLAG
+2048   = MYSQLI_SET_FLAG
+32768  = MYSQLI_NUM_FLAG
+16384  = MYSQLI_PART_KEY_FLAG
+32768  = MYSQLI_GROUP_FLAG
+65536  = MYSQLI_UNIQUE_FLAG
+131072 = MYSQLI_BINCMP_FLAG
+*/
+
+	function &FetchField($fieldOffset = -1)
+	{
+		$fieldnr = $fieldOffset;
+		if ($fieldOffset != -1) {
+		  $fieldOffset = mysqli_field_seek($this->_queryID, $fieldnr);
+		}
+		$o = mysqli_fetch_field($this->_queryID);
+		/* Properties of an ADOFieldObject as set by MetaColumns */
+		$o->primary_key = $o->flags & MYSQLI_PRI_KEY_FLAG;
+		$o->not_null = $o->flags & MYSQLI_NOT_NULL_FLAG;
+		$o->auto_increment = $o->flags & MYSQLI_AUTO_INCREMENT_FLAG;
+		$o->binary = $o->flags & MYSQLI_BINARY_FLAG;
+		// $o->blob = $o->flags & MYSQLI_BLOB_FLAG; /* not returned by MetaColumns */
+		$o->unsigned = $o->flags & MYSQLI_UNSIGNED_FLAG;
+
+		return $o;
+	}
+
+	function &GetRowAssoc($upper = true)
+	{
+		if ($this->fetchMode == MYSQLI_ASSOC && !$upper)
+		  return $this->fields;
+		$row =& ADORecordSet::GetRowAssoc($upper);
+		return $row;
+	}
+
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+	  if ($this->fetchMode != MYSQLI_NUM)
+	    return @$this->fields[$colname];
+
+	  if (!$this->bind) {
+	    $this->bind = array();
+	    for ($i = 0; $i < $this->_numOfFields; $i++) {
+	      $o = $this->FetchField($i);
+	      $this->bind[strtoupper($o->name)] = $i;
+	    }
+	  }
+	  return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+
+	function _seek($row)
+	{
+	  if ($this->_numOfRows == 0)
+	    return false;
+
+	  if ($row < 0)
+	    return false;
+
+	  mysqli_data_seek($this->_queryID, $row);
+	  $this->EOF = false;
+	  return true;
+	}
+
+	// 10% speedup to move MoveNext to child class
+	// This is the only implementation that works now (23-10-2003).
+	// Other functions return no or the wrong results.
+	function MoveNext()
+	{
+		if ($this->EOF) return false;
+		$this->_currentRow++;
+		$this->fields = @mysqli_fetch_array($this->_queryID,$this->fetchMode);
+
+		if (is_array($this->fields)) return true;
+		$this->EOF = true;
+		return false;
+	}
+
+	function _fetch()
+	{
+		$this->fields = mysqli_fetch_array($this->_queryID,$this->fetchMode);
+	  	return is_array($this->fields);
+	}
+
+	function _close()
+	{
+		mysqli_free_result($this->_queryID);
+	  	$this->_queryID = false;
+	}
+
+/*
+
+0 = MYSQLI_TYPE_DECIMAL
+1 = MYSQLI_TYPE_CHAR
+1 = MYSQLI_TYPE_TINY
+2 = MYSQLI_TYPE_SHORT
+3 = MYSQLI_TYPE_LONG
+4 = MYSQLI_TYPE_FLOAT
+5 = MYSQLI_TYPE_DOUBLE
+6 = MYSQLI_TYPE_NULL
+7 = MYSQLI_TYPE_TIMESTAMP
+8 = MYSQLI_TYPE_LONGLONG
+9 = MYSQLI_TYPE_INT24
+10 = MYSQLI_TYPE_DATE
+11 = MYSQLI_TYPE_TIME
+12 = MYSQLI_TYPE_DATETIME
+13 = MYSQLI_TYPE_YEAR
+14 = MYSQLI_TYPE_NEWDATE
+247 = MYSQLI_TYPE_ENUM
+248 = MYSQLI_TYPE_SET
+249 = MYSQLI_TYPE_TINY_BLOB
+250 = MYSQLI_TYPE_MEDIUM_BLOB
+251 = MYSQLI_TYPE_LONG_BLOB
+252 = MYSQLI_TYPE_BLOB
+253 = MYSQLI_TYPE_VAR_STRING
+254 = MYSQLI_TYPE_STRING
+255 = MYSQLI_TYPE_GEOMETRY
+*/
+
+	function MetaType($t, $len = -1, $fieldobj = false)
+	{
+		if (is_object($t)) {
+		    $fieldobj = $t;
+		    $t = $fieldobj->type;
+		    $len = $fieldobj->max_length;
+		}
+
+
+		 $len = -1; // mysql max_length is not accurate
+		 switch (strtoupper($t)) {
+		 case 'STRING':
+		 case 'CHAR':
+		 case 'VARCHAR':
+		 case 'TINYBLOB':
+		 case 'TINYTEXT':
+		 case 'ENUM':
+		 case 'SET':
+
+		case MYSQLI_TYPE_TINY_BLOB :
+		case MYSQLI_TYPE_CHAR :
+		case MYSQLI_TYPE_STRING :
+		case MYSQLI_TYPE_ENUM :
+		case MYSQLI_TYPE_SET :
+		case 253 :
+		   if ($len <= $this->blobSize) return 'C';
+
+		case 'TEXT':
+		case 'LONGTEXT':
+		case 'MEDIUMTEXT':
+		   return 'X';
+
+
+		   // php_mysql extension always returns 'blob' even if 'text'
+		   // so we have to check whether binary...
+		case 'IMAGE':
+		case 'LONGBLOB':
+		case 'BLOB':
+		case 'MEDIUMBLOB':
+
+		case MYSQLI_TYPE_BLOB :
+		case MYSQLI_TYPE_LONG_BLOB :
+		case MYSQLI_TYPE_MEDIUM_BLOB :
+
+		   return !empty($fieldobj->binary) ? 'B' : 'X';
+		case 'YEAR':
+		case 'DATE':
+		case MYSQLI_TYPE_DATE :
+		case MYSQLI_TYPE_YEAR :
+
+		   return 'D';
+
+		case 'TIME':
+		case 'DATETIME':
+		case 'TIMESTAMP':
+
+		case MYSQLI_TYPE_DATETIME :
+		case MYSQLI_TYPE_NEWDATE :
+		case MYSQLI_TYPE_TIME :
+		case MYSQLI_TYPE_TIMESTAMP :
+
+			return 'T';
+
+		case 'INT':
+		case 'INTEGER':
+		case 'BIGINT':
+		case 'TINYINT':
+		case 'MEDIUMINT':
+		case 'SMALLINT':
+
+		case MYSQLI_TYPE_INT24 :
+		case MYSQLI_TYPE_LONG :
+		case MYSQLI_TYPE_LONGLONG :
+		case MYSQLI_TYPE_SHORT :
+		case MYSQLI_TYPE_TINY :
+
+		   if (!empty($fieldobj->primary_key)) return 'R';
+
+		   return 'I';
+
+
+		   // Added floating-point types
+		   // Maybe not necessery.
+		 case 'FLOAT':
+		 case 'DOUBLE':
+		   //		case 'DOUBLE PRECISION':
+		 case 'DECIMAL':
+		 case 'DEC':
+		 case 'FIXED':
+		 default:
+		 	//if (!is_numeric($t)) echo "<p>--- Error in type matching $t -----</p>";
+		 	return 'N';
+		}
+	} // function
+
+
+} // rs class
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysqlt.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysqlt.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-mysqlt.inc.php	(revision 225)
@@ -0,0 +1,155 @@
+<?php
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+  
+  MySQL code that supports transactions. For MySQL 3.23 or later.
+  Code from James Poon <jpoon88@yahoo.com>
+  
+  Requires mysql client. Works on Windows and Unix.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR."/drivers/adodb-mysql.inc.php");
+
+
+class ADODB_mysqlt extends ADODB_mysql {
+	var $databaseType = 'mysqlt';
+	var $ansiOuter = true; // for Version 3.23.17 or later
+	var $hasTransactions = true;
+	var $autoRollback = true; // apparently mysql does not autorollback properly 
+	
+	function ADODB_mysqlt() 
+	{			
+	global $ADODB_EXTENSION; if ($ADODB_EXTENSION) $this->rsPrefix .= 'ext_';
+	}
+	
+	/* set transaction mode
+	
+	SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL
+{ READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE }
+
+	*/
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET SESSION TRANSACTION ".$transaction_mode);
+	}
+	
+	function BeginTrans()
+	{	  
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		$this->Execute('SET AUTOCOMMIT=0');
+		$this->Execute('BEGIN');
+		return true;
+	}
+	
+	function CommitTrans($ok=true) 
+	{
+		if ($this->transOff) return true; 
+		if (!$ok) return $this->RollbackTrans();
+		
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('COMMIT');
+		$this->Execute('SET AUTOCOMMIT=1');
+		return true;
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->Execute('ROLLBACK');
+		$this->Execute('SET AUTOCOMMIT=1');
+		return true;
+	}
+	
+	function RowLock($tables,$where='',$flds='1 as adodb_ignore') 
+	{
+		if ($this->transCnt==0) $this->BeginTrans();
+		if ($where) $where = ' where '.$where;
+		$rs =& $this->Execute("select $flds from $tables $where for update");
+		return !empty($rs); 
+	}
+	
+}
+
+class ADORecordSet_mysqlt extends ADORecordSet_mysql{	
+	var $databaseType = "mysqlt";
+	
+	function ADORecordSet_mysqlt($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
+		case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
+		
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:
+		default: $this->fetchMode = MYSQL_BOTH; break;
+		}
+	
+		$this->adodbFetchMode = $mode;
+		$this->ADORecordSet($queryID);	
+	}
+	
+	function MoveNext()
+	{
+		if (@$this->fields = mysql_fetch_array($this->_queryID,$this->fetchMode)) {
+			$this->_currentRow += 1;
+			return true;
+		}
+		if (!$this->EOF) {
+			$this->_currentRow += 1;
+			$this->EOF = true;
+		}
+		return false;
+	}
+}
+
+class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt {	
+
+	function ADORecordSet_ext_mysqlt($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: $this->fetchMode = MYSQL_NUM; break;
+		case ADODB_FETCH_ASSOC:$this->fetchMode = MYSQL_ASSOC; break;
+		
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:
+		default: 
+			$this->fetchMode = MYSQL_BOTH; break;
+		}
+		$this->adodbFetchMode = $mode;
+		$this->ADORecordSet($queryID);	
+	}
+	
+	function MoveNext()
+	{
+		return adodb_movenext($this);
+	}
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-netezza.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-netezza.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-netezza.inc.php	(revision 225)
@@ -0,0 +1,170 @@
+<?php
+/*
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ 
+  First cut at the Netezza Driver by Josh Eldridge joshuae74#hotmail.com
+ Based on the previous postgres drivers.
+ http://www.netezza.com/
+ Major Additions/Changes:
+    MetaDatabasesSQL, MetaTablesSQL, MetaColumnsSQL
+    Note: You have to have admin privileges to access the system tables
+    Removed non-working keys code (Netezza has no concept of keys)
+    Fixed the way data types and lengths are returned in MetaColumns()
+    as well as added the default lengths for certain types
+    Updated public variables for Netezza
+    Still need to remove blob functions, as Netezza doesn't suppport blob
+*/
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR.'/drivers/adodb-postgres64.inc.php');
+
+class ADODB_netezza extends ADODB_postgres64 {
+    var $databaseType = 'netezza';	
+	var $dataProvider = 'netezza';
+	var $hasInsertID = false;
+	var $_resultid = false;
+  	var $concat_operator='||';
+  	var $random = 'random';
+	var $metaDatabasesSQL = "select objname from _v_object_data where objtype='database' order by 1";
+    var $metaTablesSQL = "select objname from _v_object_data where objtype='table' order by 1";
+	var $isoDates = true; // accepts dates in ISO format
+	var $sysDate = "CURRENT_DATE";
+	var $sysTimeStamp = "CURRENT_TIMESTAMP";
+	var $blobEncodeType = 'C';
+	var $metaColumnsSQL = "SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum";
+	var $metaColumnsSQL1 = "SELECT attname, atttype FROM _v_relation_column_def WHERE name = '%s' AND attnum > 0 ORDER BY attnum";
+	// netezza doesn't have keys. it does have distributions, so maybe this is 
+	// something that can be pulled from the system tables
+	var $metaKeySQL = "";
+	var $hasAffectedRows = true;
+	var $hasLimit = true;	
+	var $true = 't';		// string that represents TRUE for a database
+	var $false = 'f';		// string that represents FALSE for a database
+	var $fmtDate = "'Y-m-d'";	// used by DBDate() as the default date format used by the database
+	var $fmtTimeStamp = "'Y-m-d G:i:s'"; // used by DBTimeStamp as the default timestamp fmt.
+	var $ansiOuter = true;
+	var $autoRollback = true; // apparently pgsql does not autorollback properly before 4.3.4
+							// http://bugs.php.net/bug.php?id=25404
+
+							
+	function ADODB_netezza() 
+	{
+	
+	}
+	
+	function &MetaColumns($table,$upper=true) 
+	{
+	
+	// Changed this function to support Netezza which has no concept of keys
+	// could posisbly work on other things from the system table later.
+	
+	global $ADODB_FETCH_MODE;
+	
+		$table = strtolower($table);
+
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		
+		$rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table));
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if ($rs === false) return false;
+
+		$retarr = array();
+		while (!$rs->EOF) { 	
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			
+			// since we're returning type and length as one string, 
+			// split them out here.
+			
+			if ($first = strstr($rs->fields[1], "(")) {
+			 $fld->max_length = trim($first, "()");
+			} else {
+			 $fld->max_length = -1;
+			}
+		
+			if ($first = strpos($rs->fields[1], "(")) {
+			 $fld->type = substr($rs->fields[1], 0, $first);
+			} else {
+			 $fld->type = $rs->fields[1];
+			}
+			
+			switch ($fld->type) {
+			 case "byteint":
+			 case "boolean":
+			 $fld->max_length = 1;
+			 break;
+			 case "smallint":
+			 $fld->max_length = 2;
+			 break;
+			 case "integer":
+			 case "numeric":
+			 case "date":
+			 $fld->max_length = 4;
+			 break;
+			 case "bigint":
+			 case "time":
+			 case "timestamp":
+			 $fld->max_length = 8;
+			 break;
+			 case "timetz":
+			 case "time with time zone":
+			 $fld->max_length = 12;
+			 break;
+			}
+			
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[($upper) ? strtoupper($fld->name) : $fld->name] = $fld;
+			
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		return $retarr;	
+		
+	}
+
+		
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_netezza extends ADORecordSet_postgres64
+{
+	var $databaseType = "netezza";
+	var $canSeek = true;
+	
+	function ADORecordSet_netezza($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break;
+		case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break;
+		
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:
+		default: $this->fetchMode = PGSQL_BOTH; break;
+		}
+		$this->adodbFetchMode = $mode;
+		$this->ADORecordSet($queryID);
+	}
+	
+	// _initrs modified to disable blob handling
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+		$this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($this->_queryID):-1;
+		$this->_numOfFields = @pg_numfields($this->_queryID);
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci8.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci8.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci8.inc.php	(revision 225)
@@ -0,0 +1,1512 @@
+<?php
+/*
+
+  version V4.94 23 Jan 2007 (c) 2000-2007 John Lim. All rights reserved.
+
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Code contributed by George Fourlanos <fou@infomap.gr>
+  
+  13 Nov 2000 jlim - removed all ora_* references.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+/*
+NLS_Date_Format
+Allows you to use a date format other than the Oracle Lite default. When a literal
+character string appears where a date value is expected, the Oracle Lite database
+tests the string to see if it matches the formats of Oracle, SQL-92, or the value
+specified for this parameter in the POLITE.INI file. Setting this parameter also
+defines the default format used in the TO_CHAR or TO_DATE functions when no
+other format string is supplied.
+
+For Oracle the default is dd-mon-yy or dd-mon-yyyy, and for SQL-92 the default is
+yy-mm-dd or yyyy-mm-dd.
+
+Using 'RR' in the format forces two-digit years less than or equal to 49 to be
+interpreted as years in the 21st century (20002049), and years over 50 as years in
+the 20th century (19501999). Setting the RR format as the default for all two-digit
+year entries allows you to become year-2000 compliant. For example:
+NLS_DATE_FORMAT='RR-MM-DD'
+
+You can also modify the date format using the ALTER SESSION command. 
+*/
+
+# define the LOB descriptor type for the given type
+# returns false if no LOB descriptor
+function oci_lob_desc($type) {
+	switch ($type) {
+		case OCI_B_BFILE: $result = OCI_D_FILE; break;
+		case OCI_B_CFILEE: $result = OCI_D_FILE; break;
+		case OCI_B_CLOB: $result = OCI_D_LOB; break;
+		case OCI_B_BLOB: $result = OCI_D_LOB; break;
+		case OCI_B_ROWID: $result = OCI_D_ROWID; break;
+		default: $result = false; break;
+	}
+	return $result;
+}
+
+class ADODB_oci8 extends ADOConnection {
+	var $databaseType = 'oci8';
+	var $dataProvider = 'oci8';
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $concat_operator='||';
+	var $sysDate = "TRUNC(SYSDATE)";
+	var $sysTimeStamp = 'SYSDATE';
+	var $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1";
+	var $_stmt;
+	var $_commit = OCI_COMMIT_ON_SUCCESS;
+	var $_initdate = true; // init date to YYYY-MM-DD
+	var $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"; // bin$ tables are recycle bin tables
+	var $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net
+	var $_bindInputArray = true;
+	var $hasGenID = true;
+	var $_genIDSQL = "SELECT (%s.nextval) FROM DUAL";
+	var $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s";
+	var $_dropSeqSQL = "DROP SEQUENCE %s";
+	var $hasAffectedRows = true;
+	var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)";
+	var $noNullStrings = false;
+	var $connectSID = false;
+	var $_bind = false;
+	var $_nestedSQL = true;
+	var $_hasOCIFetchStatement = false;
+	var $_getarray = false; // currently not working
+	var $leftOuter = '';  // oracle wierdness, $col = $value (+) for LEFT OUTER, $col (+)= $value for RIGHT OUTER
+	var $session_sharing_force_blob = false; // alter session on updateblob if set to true 
+	var $firstrows = true; // enable first rows optimization on SelectLimit()
+	var $selectOffsetAlg1 = 100; // when to use 1st algorithm of selectlimit.
+	var $NLS_DATE_FORMAT = 'YYYY-MM-DD';  // To include time, use 'RRRR-MM-DD HH24:MI:SS'
+ 	var $useDBDateFormatForTextInput=false;
+	var $datetime = false; // MetaType('DATE') returns 'D' (datetime==false) or 'T' (datetime == true)
+	var $_refLOBs = array();
+	
+	// var $ansiOuter = true; // if oracle9
+    
+	function ADODB_oci8() 
+	{
+		$this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200;
+		if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
+	}
+	
+	/*  Function &MetaColumns($table) added by smondino@users.sourceforge.net*/
+	function &MetaColumns($table) 
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$false = false;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
+		
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		if (!$rs) {
+			return $false;
+		}
+		$retarr = array();
+		while (!$rs->EOF) { //print_r($rs->fields);
+			$fld = new ADOFieldObject();
+	   		$fld->name = $rs->fields[0];
+	   		$fld->type = $rs->fields[1];
+	   		$fld->max_length = $rs->fields[2];
+			$fld->scale = $rs->fields[3];
+			if ($rs->fields[1] == 'NUMBER') {
+				if ($rs->fields[3] == 0) $fld->type = 'INT';
+	     		$fld->max_length = $rs->fields[4];
+	    	}	
+		   	$fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0);
+			$fld->binary = (strpos($fld->type,'BLOB') !== false);
+			$fld->default_value = $rs->fields[6];
+			
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[strtoupper($fld->name)] = $fld;
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		if (empty($retarr))
+			return  $false;
+		else 
+			return $retarr;
+	}
+	
+	function Time()
+	{
+		$rs =& $this->Execute("select TO_CHAR($this->sysTimeStamp,'YYYY-MM-DD HH24:MI:SS') from dual");
+		if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields));
+		
+		return false;
+	}
+ 
+/*
+
+  Multiple modes of connection are supported:
+  
+  a. Local Database
+    $conn->Connect(false,'scott','tiger');
+  
+  b. From tnsnames.ora
+    $conn->Connect(false,'scott','tiger',$tnsname); 
+    $conn->Connect($tnsname,'scott','tiger'); 
+  
+  c. Server + service name
+    $conn->Connect($serveraddress,'scott,'tiger',$service_name);
+  
+  d. Server + SID
+  	$conn->connectSID = true;
+	$conn->Connect($serveraddress,'scott,'tiger',$SID);
+
+
+Example TNSName:
+---------------
+NATSOFT.DOMAIN =
+  (DESCRIPTION =
+	(ADDRESS_LIST =
+	  (ADDRESS = (PROTOCOL = TCP)(HOST = kermit)(PORT = 1523))
+	)
+	(CONNECT_DATA =
+	  (SERVICE_NAME = natsoft.domain)
+	)
+  )
+  
+  There are 3 connection modes, 0 = non-persistent, 1 = persistent, 2 = force new connection
+	
+*/
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$mode=0)
+	{
+		if (!function_exists('OCIPLogon')) return null;
+		
+		
+        $this->_errorMsg = false;
+		$this->_errorCode = false;
+		
+		if($argHostname) { // added by Jorma Tuomainen <jorma.tuomainen@ppoy.fi>
+			if (empty($argDatabasename)) $argDatabasename = $argHostname;
+			else {
+				if(strpos($argHostname,":")) {
+					$argHostinfo=explode(":",$argHostname);
+				   	$argHostname=$argHostinfo[0];
+					$argHostport=$argHostinfo[1];
+			 	} else {
+					$argHostport = empty($this->port)?  "1521" : $this->port;
+	   			}
+				
+				if ($this->connectSID) {
+					$argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname
+					.")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))";
+				} else
+					$argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname
+					.")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))";
+			}
+		}
+				
+ 		//if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>";
+		if ($mode==1) {
+			$this->_connectionID = ($this->charSet) ? 
+				OCIPLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
+				:
+				OCIPLogon($argUsername,$argPassword, $argDatabasename)
+				;
+			if ($this->_connectionID && $this->autoRollback)  OCIrollback($this->_connectionID);
+		} else if ($mode==2) {
+			$this->_connectionID = ($this->charSet) ? 
+				OCINLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
+				:
+				OCINLogon($argUsername,$argPassword, $argDatabasename);
+				
+		} else {
+			$this->_connectionID = ($this->charSet) ? 
+				OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
+				:
+				OCILogon($argUsername,$argPassword, $argDatabasename);
+		}
+		if (!$this->_connectionID) return false;
+		if ($this->_initdate) {
+			$this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'");
+		}
+		
+		// looks like: 
+		// Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production
+		// $vers = OCIServerVersion($this->_connectionID);
+		// if (strpos($vers,'8i') !== false) $this->ansiOuter = true;
+		return true;
+   	}
+	
+	function ServerInfo()
+	{
+		$arr['compat'] = $this->GetOne('select value from sys.database_compatible_level');
+		$arr['description'] = @OCIServerVersion($this->_connectionID);
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+		// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,1);
+	}
+	
+	// returns true or false
+	function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,2);
+	}
+	
+	function _affectedrows()
+	{
+		if (is_resource($this->_stmt)) return @OCIRowCount($this->_stmt);
+		return 0;
+	}
+	
+	function IfNull( $field, $ifNull ) 
+	{
+		return " NVL($field, $ifNull) "; // if Oracle
+	}
+	
+	// format and return date string in database date format
+	function DBDate($d)
+	{
+		if (empty($d) && $d !== 0) return 'null';
+		
+		if (is_string($d)) $d = ADORecordSet::UnixDate($d);
+		return "TO_DATE(".adodb_date($this->fmtDate,$d).",'".$this->NLS_DATE_FORMAT."')";
+	}
+
+	function BindDate($d)
+	{
+		$d = ADOConnection::DBDate($d);
+		if (strncmp($d,"'",1)) return $d;
+		
+		return substr($d,1,strlen($d)-2);
+	}
+	
+	function BindTimeStamp($d)
+	{
+		$d = ADOConnection::DBTimeStamp($d);
+		if (strncmp($d,"'",1)) return $d;
+		
+		return substr($d,1,strlen($d)-2);
+	}
+	
+	// format and return date string in database timestamp format
+	function DBTimeStamp($ts)
+	{
+		if (empty($ts) && $ts !== 0) return 'null';
+		if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts);
+		return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')";
+	}
+	
+	function RowLock($tables,$where,$flds='1 as ignore') 
+	{
+		if ($this->autoCommit) $this->BeginTrans();
+		return $this->GetOne("select $flds from $tables where $where for update");
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+		if ($mask) {
+			$save = $this->metaTablesSQL;
+			$mask = $this->qstr(strtoupper($mask));
+			$this->metaTablesSQL .= " AND upper(table_name) like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		if ($mask) {
+			$this->metaTablesSQL = $save;
+		}
+		return $ret;
+	}
+	
+	// Mark Newnham 
+	function &MetaIndexes ($table, $primary = FALSE, $owner=false)
+	{
+        // save old fetch mode
+        global $ADODB_FETCH_MODE;
+
+        $save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+
+        if ($this->fetchMode !== FALSE) {
+               $savem = $this->SetFetchMode(FALSE);
+        }
+
+		// get index details
+		$table = strtoupper($table);
+
+		// get Primary index
+		$primary_key = '';
+
+		$false = false;
+		$rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'",$table));
+		if ($row = $rs->FetchRow())
+		   $primary_key = $row[1]; //constraint_name
+
+		if ($primary==TRUE && $primary_key=='') {
+			 if (isset($savem)) 
+                $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			return $false; //There is no primary key
+		}
+
+        $rs = $this->Execute(sprintf("SELECT ALL_INDEXES.INDEX_NAME, ALL_INDEXES.UNIQUENESS, ALL_IND_COLUMNS.COLUMN_POSITION, ALL_IND_COLUMNS.COLUMN_NAME FROM ALL_INDEXES,ALL_IND_COLUMNS WHERE UPPER(ALL_INDEXES.TABLE_NAME)='%s' AND ALL_IND_COLUMNS.INDEX_NAME=ALL_INDEXES.INDEX_NAME",$table));
+
+		
+        if (!is_object($rs)) {
+			if (isset($savem)) 
+				$this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+            return $false;
+        }
+
+		$indexes = array ();
+        // parse index data into array
+
+        while ($row = $rs->FetchRow()) {
+			if ($primary && $row[0] != $primary_key) continue;
+            if (!isset($indexes[$row[0]])) {
+				$indexes[$row[0]] = array(
+				   'unique' => ($row[1] == 'UNIQUE'),
+				   'columns' => array()
+				);
+            }
+            $indexes[$row[0]]['columns'][$row[2] - 1] = $row[3];
+        }
+
+        // sort columns by order in the index
+        foreach ( array_keys ($indexes) as $index ) {
+            ksort ($indexes[$index]['columns']);
+        }
+
+		if (isset($savem)) { 
+            $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+		}
+        return $indexes;
+	}
+	
+	function BeginTrans()
+	{	
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		$this->autoCommit = false;
+		$this->_commit = OCI_DEFAULT;
+		
+		if ($this->_transmode) $this->Execute("SET TRANSACTION ".$this->_transmode);
+		return true;
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true;
+		if (!$ok) return $this->RollbackTrans();
+		
+		if ($this->transCnt) $this->transCnt -= 1;
+		$ret = OCIcommit($this->_connectionID);
+		$this->_commit = OCI_COMMIT_ON_SUCCESS;
+		$this->autoCommit = true;
+		return $ret;
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$ret = OCIrollback($this->_connectionID);
+		$this->_commit = OCI_COMMIT_ON_SUCCESS;
+		$this->autoCommit = true;
+		return $ret;
+	}
+	
+	
+	function SelectDB($dbName) 
+	{
+		return false;
+	}
+
+	function ErrorMsg() 
+	{
+		if ($this->_errorMsg !== false) return $this->_errorMsg;
+
+		if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
+		if (empty($arr)) {
+			if (is_resource($this->_connectionID)) $arr = @OCIError($this->_connectionID);
+			else $arr = @OCIError();
+			if ($arr === false) return '';
+		}
+		$this->_errorMsg = $arr['message'];
+		$this->_errorCode = $arr['code'];
+		return $this->_errorMsg;
+	}
+
+	function ErrorNo() 
+	{
+		if ($this->_errorCode !== false) return $this->_errorCode;
+		
+		if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
+		if (empty($arr)) {
+			$arr = @OCIError($this->_connectionID);
+			if ($arr == false) $arr = @OCIError();
+			if ($arr == false) return '';
+		}
+		
+		$this->_errorMsg = $arr['message'];
+		$this->_errorCode = $arr['code'];
+		
+		return $arr['code'];
+	}
+	
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysTimeStamp;
+		$s = 'TO_CHAR('.$col.",'";
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= 'YYYY';
+				break;
+			case 'Q':
+			case 'q':
+				$s .= 'Q';
+				break;
+				
+			case 'M':
+				$s .= 'Mon';
+				break;
+				
+			case 'm':
+				$s .= 'MM';
+				break;
+			case 'D':
+			case 'd':
+				$s .= 'DD';
+				break;
+			
+			case 'H':
+				$s.= 'HH24';
+				break;
+				
+			case 'h':
+				$s .= 'HH';
+				break;
+				
+			case 'i':
+				$s .= 'MI';
+				break;
+			
+			case 's':
+				$s .= 'SS';
+				break;
+			
+			case 'a':
+			case 'A':
+				$s .= 'AM';
+				break;
+				
+			case 'w':
+				$s .= 'D';
+				break;
+				
+			case 'l':
+				$s .= 'DAY';
+				break;
+				
+			 case 'W':
+				$s .= 'WW';
+				break;
+				
+			default:
+			// handle escape characters...
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				if (strpos('-/.:;, ',$ch) !== false) $s .= $ch;
+				else $s .= '"'.$ch.'"';
+				
+			}
+		}
+		return $s. "')";
+	}
+	
+	
+	/*
+	This algorithm makes use of
+	
+	a. FIRST_ROWS hint
+	The FIRST_ROWS hint explicitly chooses the approach to optimize response time, 
+	that is, minimum resource usage to return the first row. Results will be returned 
+	as soon as they are identified. 
+
+	b. Uses rownum tricks to obtain only the required rows from a given offset.
+	 As this uses complicated sql statements, we only use this if the $offset >= 100. 
+	 This idea by Tomas V V Cox.
+	 
+	 This implementation does not appear to work with oracle 8.0.5 or earlier. Comment
+	 out this function then, and the slower SelectLimit() in the base class will be used.
+	*/
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		// seems that oracle only supports 1 hint comment in 8i
+		if ($this->firstrows) {
+			if (strpos($sql,'/*+') !== false)
+				$sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
+			else
+				$sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
+		}
+		
+		if ($offset < $this->selectOffsetAlg1) {
+			if ($nrows > 0) {	
+				if ($offset > 0) $nrows += $offset;
+				//$inputarr['adodb_rownum'] = $nrows;
+				if ($this->databaseType == 'oci8po') {
+					$sql = "select * from (".$sql.") where rownum <= ?";
+				} else {
+					$sql = "select * from (".$sql.") where rownum <= :adodb_offset";
+				} 
+				$inputarr['adodb_offset'] = $nrows;
+				$nrows = -1;
+			}
+			// note that $nrows = 0 still has to work ==> no rows returned
+
+			$rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+			return $rs;
+			
+		} else {
+			 // Algorithm by Tomas V V Cox, from PEAR DB oci8.php
+			
+			 // Let Oracle return the name of the columns
+			$q_fields = "SELECT * FROM (".$sql.") WHERE NULL = NULL";
+			 
+			$false = false;
+			if (! $stmt_arr = $this->Prepare($q_fields)) {
+				return $false;
+			}
+			$stmt = $stmt_arr[1];
+			 
+			 if (is_array($inputarr)) {
+			 	foreach($inputarr as $k => $v) {
+					if (is_array($v)) {
+						if (sizeof($v) == 2) // suggested by g.giunta@libero.
+							OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
+						else
+							OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
+					} else {
+						$len = -1;
+						if ($v === ' ') $len = 1;
+						if (isset($bindarr)) {	// is prepared sql, so no need to ocibindbyname again
+							$bindarr[$k] = $v;
+						} else { 				// dynamic sql, so rebind every time
+							OCIBindByName($stmt,":$k",$inputarr[$k],$len);
+						}
+					}
+				}
+			}
+			
+			 if (!OCIExecute($stmt, OCI_DEFAULT)) {
+				 OCIFreeStatement($stmt); 
+				 return $false;
+			 }
+			 
+			 $ncols = OCINumCols($stmt);
+			 for ( $i = 1; $i <= $ncols; $i++ ) {
+				 $cols[] = '"'.OCIColumnName($stmt, $i).'"';
+			 }
+			 $result = false;
+			
+			 OCIFreeStatement($stmt); 
+			 $fields = implode(',', $cols);
+			 $nrows += $offset;
+			 $offset += 1; // in Oracle rownum starts at 1
+			
+			if ($this->databaseType == 'oci8po') {
+					 $sql = "SELECT $fields FROM".
+					  "(SELECT rownum as adodb_rownum, $fields FROM".
+					  " ($sql) WHERE rownum <= ?".
+					  ") WHERE adodb_rownum >= ?";
+				} else {
+					 $sql = "SELECT $fields FROM".
+					  "(SELECT rownum as adodb_rownum, $fields FROM".
+					  " ($sql) WHERE rownum <= :adodb_nrows".
+					  ") WHERE adodb_rownum >= :adodb_offset";
+				} 
+				$inputarr['adodb_nrows'] = $nrows;
+				$inputarr['adodb_offset'] = $offset;
+				
+			if ($secs2cache>0) $rs =& $this->CacheExecute($secs2cache, $sql,$inputarr);
+			else $rs =& $this->Execute($sql,$inputarr);
+			return $rs;
+		}
+	
+	}
+	
+	/**
+	* Usage:
+	* Store BLOBs and CLOBs
+	*
+	* Example: to store $var in a blob
+	*
+	*	$conn->Execute('insert into TABLE (id,ablob) values(12,empty_blob())');
+	*	$conn->UpdateBlob('TABLE', 'ablob', $varHoldingBlob, 'ID=12', 'BLOB');
+	*	
+	*	$blobtype supports 'BLOB' and 'CLOB', but you need to change to 'empty_clob()'.
+	*
+	*  to get length of LOB:
+	*  	select DBMS_LOB.GETLENGTH(ablob) from TABLE
+	*
+	* If you are using CURSOR_SHARING = force, it appears this will case a segfault
+	* under oracle 8.1.7.0. Run:
+	*	 $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT');
+	* before UpdateBlob() then...
+	*/
+
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+		
+		//if (strlen($val) < 4000) return $this->Execute("UPDATE $table SET $column=:blob WHERE $where",array('blob'=>$val)) != false;
+		
+		switch(strtoupper($blobtype)) {
+		default: ADOConnection::outp("<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); return false;
+		case 'BLOB': $type = OCI_B_BLOB; break;
+		case 'CLOB': $type = OCI_B_CLOB; break;
+		}
+		
+		if ($this->databaseType == 'oci8po') 
+			$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?";
+		else 
+			$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
+		
+		$desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
+		$arr['blob'] = array($desc,-1,$type);
+		if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT');
+		$commit = $this->autoCommit;
+		if ($commit) $this->BeginTrans();
+		$rs = $this->_Execute($sql,$arr);
+		if ($rez = !empty($rs)) $desc->save($val);
+		$desc->free();
+		if ($commit) $this->CommitTrans();
+		if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=FORCE');
+		
+		if ($rez) $rs->Close();
+		return $rez;
+	}
+	
+	/**
+	* Usage:  store file pointed to by $var in a blob
+	*/
+	function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB')
+	{
+		switch(strtoupper($blobtype)) {
+		default: ADOConnection::outp( "<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); return false;
+		case 'BLOB': $type = OCI_B_BLOB; break;
+		case 'CLOB': $type = OCI_B_CLOB; break;
+		}
+		
+		if ($this->databaseType == 'oci8po') 
+			$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?";
+		else 
+			$sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
+		
+		$desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
+		$arr['blob'] = array($desc,-1,$type);
+		
+		$this->BeginTrans();
+		$rs = ADODB_oci8::Execute($sql,$arr);
+		if ($rez = !empty($rs)) $desc->savefile($val);
+		$desc->free();
+		$this->CommitTrans();
+		
+		if ($rez) $rs->Close();
+		return $rez;
+	}
+
+		/**
+	 * Execute SQL 
+	 *
+	 * @param sql		SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text)
+	 * @param [inputarr]	holds the input data to bind to. Null elements will be set to null.
+	 * @return 		RecordSet or false
+	 */
+	function &Execute($sql,$inputarr=false) 
+	{
+		if ($this->fnExecute) {
+			$fn = $this->fnExecute;
+			$ret =& $fn($this,$sql,$inputarr);
+			if (isset($ret)) return $ret;
+		}
+		if ($inputarr) {
+			#if (!is_array($inputarr)) $inputarr = array($inputarr);
+			
+			$element0 = reset($inputarr);
+			
+			# is_object check because oci8 descriptors can be passed in
+			if (is_array($element0) && !is_object(reset($element0))) {
+				if (is_string($sql))
+					$stmt = $this->Prepare($sql);
+				else
+					$stmt = $sql;
+					
+				foreach($inputarr as $arr) {
+					$ret =& $this->_Execute($stmt,$arr);
+					if (!$ret) return $ret;
+				}
+			} else {
+				$ret =& $this->_Execute($sql,$inputarr);
+			}
+			
+		} else {
+			$ret =& $this->_Execute($sql,false);
+		}
+
+		return $ret;
+	}
+	
+	/*
+		Example of usage:
+		
+		$stmt = $this->Prepare('insert into emp (empno, ename) values (:empno, :ename)');
+	*/
+	function Prepare($sql,$cursor=false)
+	{
+	static $BINDNUM = 0;
+	
+		$stmt = OCIParse($this->_connectionID,$sql);
+
+		if (!$stmt) {
+			$this->_errorMsg = false;
+			$this->_errorCode = false;
+			$arr = @OCIError($this->_connectionID);
+			if ($arr === false) return false;
+		
+			$this->_errorMsg = $arr['message'];
+			$this->_errorCode = $arr['code'];
+			return false;
+		}
+		
+		$BINDNUM += 1;
+		
+		$sttype = @OCIStatementType($stmt);
+		if ($sttype == 'BEGIN' || $sttype == 'DECLARE') {
+			return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false);
+		}
+		return array($sql,$stmt,0,$BINDNUM);
+	}
+	
+	/*
+		Call an oracle stored procedure and returns a cursor variable as a recordset. 
+		Concept by Robert Tuttle robert@ud.com
+		
+		Example:
+			Note: we return a cursor variable in :RS2
+			$rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS2); END;",'RS2');
+			
+			$rs = $db->ExecuteCursor(
+				"BEGIN :RS2 = adodb.getdata(:VAR1); END;", 
+				'RS2',
+				array('VAR1' => 'Mr Bean'));
+			
+	*/
+	function &ExecuteCursor($sql,$cursorName='rs',$params=false)
+	{
+		if (is_array($sql)) $stmt = $sql;
+		else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor
+	
+		if (is_array($stmt) && sizeof($stmt) >= 5) {
+			$hasref = true;
+			$ignoreCur = false;
+			$this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR);
+			if ($params) {
+				foreach($params as $k => $v) {
+					$this->Parameter($stmt,$params[$k], $k);
+				}
+			}
+		} else
+			$hasref = false;
+			
+		$rs =& $this->Execute($stmt);
+		if ($rs) {
+			if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]);
+			else if ($hasref) $rs->_refcursor = $stmt[4];
+		}
+		return $rs;
+	}
+	
+	/*
+		Bind a variable -- very, very fast for executing repeated statements in oracle. 
+		Better than using
+			for ($i = 0; $i < $max; $i++) {	
+				$p1 = ?; $p2 = ?; $p3 = ?;
+				$this->Execute("insert into table (col0, col1, col2) values (:0, :1, :2)", 
+					array($p1,$p2,$p3));
+			}
+		
+		Usage:
+			$stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");
+			$DB->Bind($stmt, $p1);
+			$DB->Bind($stmt, $p2);
+			$DB->Bind($stmt, $p3);
+			for ($i = 0; $i < $max; $i++) {	
+				$p1 = ?; $p2 = ?; $p3 = ?;
+				$DB->Execute($stmt);
+			}
+			
+		Some timings:		
+			** Test table has 3 cols, and 1 index. Test to insert 1000 records
+			Time 0.6081s (1644.60 inserts/sec) with direct OCIParse/OCIExecute
+			Time 0.6341s (1577.16 inserts/sec) with ADOdb Prepare/Bind/Execute
+			Time 1.5533s ( 643.77 inserts/sec) with pure SQL using Execute
+			
+		Now if PHP only had batch/bulk updating like Java or PL/SQL...
+	
+		Note that the order of parameters differs from OCIBindByName,
+		because we default the names to :0, :1, :2
+	*/
+	function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false)
+	{
+		
+		if (!is_array($stmt)) return false;
+        
+        if (($type == OCI_B_CURSOR) && sizeof($stmt) >= 5) { 
+            return OCIBindByName($stmt[1],":".$name,$stmt[4],$size,$type);
+        }
+        
+		if ($name == false) {
+			if ($type !== false) $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size,$type);
+			else $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator
+			$stmt[2] += 1;
+		} else if (oci_lob_desc($type)) {
+			if ($this->debug) {
+				ADOConnection::outp("<b>Bind</b>: name = $name");
+			}
+            //we have to create a new Descriptor here
+			$numlob = count($this->_refLOBs);
+        	$this->_refLOBs[$numlob]['LOB'] = OCINewDescriptor($this->_connectionID, oci_lob_desc($type));
+			$this->_refLOBs[$numlob]['TYPE'] = $isOutput;
+			
+			$tmp = &$this->_refLOBs[$numlob]['LOB'];
+	        $rez = OCIBindByName($stmt[1], ":".$name, $tmp, -1, $type);
+			if ($this->debug) {
+				ADOConnection::outp("<b>Bind</b>: descriptor has been allocated, var (".$name.") binded");
+			}
+			
+			// if type is input then write data to lob now
+			if ($isOutput == false) {
+				$var = $this->BlobEncode($var);
+				$tmp->WriteTemporary($var);
+				$this->_refLOBs[$numlob]['VAR'] = &$var;
+				if ($this->debug) {
+					ADOConnection::outp("<b>Bind</b>: LOB has been written to temp");
+				}
+			} else {
+				$this->_refLOBs[$numlob]['VAR'] = &$var;
+			}
+			$rez = $tmp;
+		} else {
+			if ($this->debug) 
+				ADOConnection::outp("<b>Bind</b>: name = $name");
+			
+			if ($type !== false) $rez = OCIBindByName($stmt[1],":".$name,$var,$size,$type);
+			else $rez = OCIBindByName($stmt[1],":".$name,$var,$size); // +1 byte for null terminator
+		}
+		
+		return $rez;
+	}
+	
+	function Param($name,$type=false)
+	{
+		return ':'.$name;
+	}
+	
+	/* 
+	Usage:
+		$stmt = $db->Prepare('select * from table where id =:myid and group=:group');
+		$db->Parameter($stmt,$id,'myid');
+		$db->Parameter($stmt,$group,'group');
+		$db->Execute($stmt);
+		
+		@param $stmt Statement returned by Prepare() or PrepareSP().
+		@param $var PHP variable to bind to
+		@param $name Name of stored procedure variable name to bind to.
+		@param [$isOutput] Indicates direction of parameter 0/false=IN  1=OUT  2= IN/OUT. This is ignored in oci8.
+		@param [$maxLen] Holds an maximum length of the variable.
+		@param [$type] The data type of $var. Legal values depend on driver.
+		
+		See OCIBindByName documentation at php.net.
+	*/
+	function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false)
+	{
+			if  ($this->debug) {
+				$prefix = ($isOutput) ? 'Out' : 'In';
+				$ztype = (empty($type)) ? 'false' : $type;
+				ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);");
+			}
+			return $this->Bind($stmt,$var,$maxLen,$type,$name,$isOutput);
+	}
+	
+	/*
+	returns query ID if successful, otherwise false
+	this version supports:
+	
+	   1. $db->execute('select * from table');
+	   
+	   2. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)');
+		  $db->execute($prepared_statement, array(1,2,3));
+		  
+	   3. $db->execute('insert into table (a,b,c) values (:a,:b,:c)',array('a'=>1,'b'=>2,'c'=>3));
+	   
+	   4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)');
+		  $db->bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); 
+		  $db->execute($stmt);
+	*/ 
+	function _query($sql,$inputarr)
+	{
+		if (is_array($sql)) { // is prepared sql
+			$stmt = $sql[1];
+			
+			// we try to bind to permanent array, so that OCIBindByName is persistent
+			// and carried out once only - note that max array element size is 4000 chars
+			if (is_array($inputarr)) {
+				$bindpos = $sql[3];
+				if (isset($this->_bind[$bindpos])) {
+				// all tied up already
+					$bindarr = &$this->_bind[$bindpos];
+				} else {
+				// one statement to bind them all
+					$bindarr = array();
+					foreach($inputarr as $k => $v) {
+						$bindarr[$k] = $v;
+						OCIBindByName($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);
+					}
+					$this->_bind[$bindpos] = &$bindarr;
+				}
+			}
+		} else {
+			$stmt=OCIParse($this->_connectionID,$sql);
+		}
+			
+		$this->_stmt = $stmt;
+		if (!$stmt) return false;
+	
+		if (defined('ADODB_PREFETCH_ROWS')) @OCISetPrefetch($stmt,ADODB_PREFETCH_ROWS);
+			
+		if (is_array($inputarr)) {
+			foreach($inputarr as $k => $v) {
+				if (is_array($v)) {
+					if (sizeof($v) == 2) // suggested by g.giunta@libero.
+						OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
+					else
+						OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
+					
+					if ($this->debug==99) echo "name=:$k",' var='.$inputarr[$k][0],' len='.$v[1],' type='.$v[2],'<br>';
+				} else {
+					$len = -1;
+					if ($v === ' ') $len = 1;
+					if (isset($bindarr)) {	// is prepared sql, so no need to ocibindbyname again
+						$bindarr[$k] = $v;
+					} else { 				// dynamic sql, so rebind every time
+						OCIBindByName($stmt,":$k",$inputarr[$k],$len);
+					}
+				}
+			}
+		}
+		
+        $this->_errorMsg = false;
+		$this->_errorCode = false;
+		if (OCIExecute($stmt,$this->_commit)) {
+//OCIInternalDebug(1);			
+			if (count($this -> _refLOBs) > 0) {
+		
+				foreach ($this -> _refLOBs as $key => $value) {
+					if ($this -> _refLOBs[$key]['TYPE'] == true) {
+						$tmp = $this -> _refLOBs[$key]['LOB'] -> load();
+						if ($this -> debug) {
+							ADOConnection::outp("<b>OUT LOB</b>: LOB has been loaded. <br>");
+						}
+						//$_GLOBALS[$this -> _refLOBs[$key]['VAR']] = $tmp;
+						$this -> _refLOBs[$key]['VAR'] = $tmp;
+					} else {
+                        $this->_refLOBs[$key]['LOB']->save($this->_refLOBs[$key]['VAR']);
+						$this -> _refLOBs[$key]['LOB']->free();
+						unset($this -> _refLOBs[$key]);
+                        if ($this->debug) {
+							ADOConnection::outp("<b>IN LOB</b>: LOB has been saved. <br>");
+						}
+                    }					
+				}
+			}
+		
+            switch (@OCIStatementType($stmt)) {
+                case "SELECT":
+					return $stmt;
+				
+				case 'DECLARE':
+                case "BEGIN":
+                    if (is_array($sql) && !empty($sql[4])) {
+						$cursor = $sql[4];
+						if (is_resource($cursor)) {
+							$ok = OCIExecute($cursor);	
+	                        return $cursor;
+						}
+						return $stmt;
+                    } else {
+						if (is_resource($stmt)) {
+							OCIFreeStatement($stmt);
+							return true;
+						}
+                        return $stmt;
+                    }
+                    break;
+                default :
+					// ociclose -- no because it could be used in a LOB?
+                    return true;
+            }
+		}
+		return false;
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		if (!$this->_connectionID) return;
+		
+		if (!$this->autoCommit) OCIRollback($this->_connectionID);
+		if (count($this->_refLOBs) > 0) {
+			foreach ($this ->_refLOBs as $key => $value) {
+				$this->_refLOBs[$key]['LOB']->free();
+				unset($this->_refLOBs[$key]);
+			}
+		}
+		OCILogoff($this->_connectionID);
+		
+		$this->_stmt = false;
+		$this->_connectionID = false;
+	}
+	
+	function MetaPrimaryKeys($table, $owner=false,$internalKey=false)
+	{
+		if ($internalKey) return array('ROWID');
+		
+	// tested with oracle 8.1.7
+		$table = strtoupper($table);
+		if ($owner) {
+			$owner_clause = "AND ((a.OWNER = b.OWNER) AND (a.OWNER = UPPER('$owner')))";
+			$ptab = 'ALL_';
+		} else {
+			$owner_clause = '';
+			$ptab = 'USER_';
+		}
+		$sql = "
+SELECT /*+ RULE */ distinct b.column_name
+   FROM {$ptab}CONSTRAINTS a
+	  , {$ptab}CONS_COLUMNS b
+  WHERE ( UPPER(b.table_name) = ('$table'))
+	AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P')
+	$owner_clause
+	AND (a.constraint_name = b.constraint_name)";
+
+ 		$rs = $this->Execute($sql);
+		if ($rs && !$rs->EOF) {
+			$arr =& $rs->GetArray();
+			$a = array();
+			foreach($arr as $v) {
+				$a[] = reset($v);
+			}
+			return $a;
+		}
+		else return false;
+	}
+	
+	// http://gis.mit.edu/classes/11.521/sqlnotes/referential_integrity.html
+	function MetaForeignKeys($table, $owner=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$table = $this->qstr(strtoupper($table));
+		if (!$owner) {
+			$owner = $this->user;
+			$tabp = 'user_';
+		} else
+			$tabp = 'all_';
+			
+		$owner = ' and owner='.$this->qstr(strtoupper($owner));
+		
+		$sql = 
+"select constraint_name,r_owner,r_constraint_name 
+	from {$tabp}constraints
+	where constraint_type = 'R' and table_name = $table $owner";
+		
+		$constraints =& $this->GetArray($sql);
+		$arr = false;
+		foreach($constraints as $constr) {
+			$cons = $this->qstr($constr[0]);
+			$rowner = $this->qstr($constr[1]);
+			$rcons = $this->qstr($constr[2]);
+			$cols = $this->GetArray("select column_name from {$tabp}cons_columns where constraint_name=$cons $owner order by position");
+			$tabcol = $this->GetArray("select table_name,column_name from {$tabp}cons_columns where owner=$rowner and constraint_name=$rcons order by position");
+			
+			if ($cols && $tabcol) 
+				for ($i=0, $max=sizeof($cols); $i < $max; $i++) {
+					$arr[$tabcol[$i][0]] = $cols[$i][0].'='.$tabcol[$i][1];
+				}
+		}
+		$ADODB_FETCH_MODE = $save;
+		
+		return $arr;
+	}
+
+	
+	function CharMax()
+	{
+		return 4000;
+	}
+	
+	function TextMax()
+	{
+		return 4000;
+	}
+	
+	/**
+	 * Quotes a string.
+	 * An example is  $db->qstr("Don't bother",magic_quotes_runtime());
+	 * 
+	 * @param s			the string to quote
+	 * @param [magic_quotes]	if $s is GET/POST var, set to get_magic_quotes_gpc().
+	 *				This undoes the stupidity of magic quotes for GPC.
+	 *
+	 * @return  quoted string to be sent back to database
+	 */
+	function qstr($s,$magic_quotes=false)
+	{	
+		//$nofixquotes=false;
+	
+		if ($this->noNullStrings && strlen($s)==0)$s = ' ';
+		if (!$magic_quotes) {	
+			if ($this->replaceQuote[0] == '\\'){
+				$s = str_replace('\\','\\\\',$s);
+			}
+			return  "'".str_replace("'",$this->replaceQuote,$s)."'";
+		}
+		
+		// undo magic quotes for "
+		$s = str_replace('\\"','"',$s);
+		
+		$s = str_replace('\\\\','\\',$s);
+		return "'".str_replace("\\'",$this->replaceQuote,$s)."'";
+		
+	}
+	
+}
+
+/*--------------------------------------------------------------------------------------
+		 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_oci8 extends ADORecordSet {
+
+	var $databaseType = 'oci8';
+	var $bind=false;
+	var $_fieldobjs;
+	
+	//var $_arr = false;
+		
+	function ADORecordset_oci8($queryID,$mode=false)
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
+		case ADODB_FETCH_NUM: 
+		default:
+		$this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
+		}
+		
+		$this->adodbFetchMode = $mode;
+		$this->_queryID = $queryID;
+	}
+
+
+	function Init()
+	{
+		if ($this->_inited) return;
+		
+		$this->_inited = true;
+		if ($this->_queryID) {
+			
+			$this->_currentRow = 0;
+			@$this->_initrs();
+			$this->EOF = !$this->_fetch();
+			
+			/*
+			// based on idea by Gaetano Giunta to detect unusual oracle errors
+			// see http://phplens.com/lens/lensforum/msgs.php?id=6771
+			$err = OCIError($this->_queryID);
+			if ($err && $this->connection->debug) ADOConnection::outp($err);
+			*/
+			
+			if (!is_array($this->fields)) {
+				$this->_numOfRows = 0;
+				$this->fields = array();
+			}
+		} else {
+			$this->fields = array();
+			$this->_numOfRows = 0;
+			$this->_numOfFields = 0;
+			$this->EOF = true;
+		}
+	}
+	
+	function _initrs()
+	{
+		$this->_numOfRows = -1;
+		$this->_numOfFields = OCInumcols($this->_queryID);
+		if ($this->_numOfFields>0) {
+			$this->_fieldobjs = array();
+			$max = $this->_numOfFields;
+			for ($i=0;$i<$max; $i++) $this->_fieldobjs[] = $this->_FetchField($i);
+		}
+	}
+
+	  /*		Returns: an object containing field information.
+			  Get column information in the Recordset object. fetchField() can be used in order to obtain information about
+			  fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
+			  fetchField() is retrieved.		*/
+
+	function &_FetchField($fieldOffset = -1)
+	{
+		$fld = new ADOFieldObject;
+		$fieldOffset += 1;
+		$fld->name =OCIcolumnname($this->_queryID, $fieldOffset);
+		$fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
+		$fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
+	 	if ($fld->type == 'NUMBER') {
+	 		$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
+			$sc = OCIColumnScale($this->_queryID, $fieldOffset);
+			if ($p != 0 && $sc == 0) $fld->type = 'INT';
+			//echo " $this->name ($p.$sc) ";
+	 	}
+		return $fld;
+	}
+	
+	/* For some reason, OCIcolumnname fails when called after _initrs() so we cache it */
+	function &FetchField($fieldOffset = -1)
+	{
+		return $this->_fieldobjs[$fieldOffset];
+	}
+	
+	
+	/*
+	// 10% speedup to move MoveNext to child class
+	function _MoveNext() 
+	{
+	//global $ADODB_EXTENSION;if ($ADODB_EXTENSION) return @adodb_movenext($this);
+		
+		if ($this->EOF) return false;
+		
+		$this->_currentRow++;
+		if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode))
+			return true;
+		$this->EOF = true;
+		
+		return false;
+	}	*/
+	
+	
+	function MoveNext()
+	{
+		if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+			$this->_currentRow += 1;
+			return true;
+		}
+		if (!$this->EOF) {
+			$this->_currentRow += 1;
+			$this->EOF = true;
+		}
+		return false;
+	}
+	
+	/*
+	# does not work as first record is retrieved in _initrs(), so is not included in GetArray()
+	function &GetArray($nRows = -1) 
+	{
+	global $ADODB_OCI8_GETARRAY;
+	
+		if (true ||  !empty($ADODB_OCI8_GETARRAY)) {
+			# does not support $ADODB_ANSI_PADDING_OFF
+	
+			//OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by OCIfetchstatement
+			switch($this->adodbFetchMode) {
+			case ADODB_FETCH_NUM:
+			
+				$ncols = @OCIfetchstatement($this->_queryID, $results, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW+OCI_NUM);
+				$results = array_merge(array($this->fields),$results);
+				return $results;
+				
+			case ADODB_FETCH_ASSOC: 
+				if (ADODB_ASSOC_CASE != 2 || $this->databaseType != 'oci8') break;
+				
+				$ncols = @OCIfetchstatement($this->_queryID, $assoc, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW);
+				$results =& array_merge(array($this->fields),$assoc);
+				return $results;
+			
+			default:
+				break;
+			}
+		}
+			
+		$results =& ADORecordSet::GetArray($nRows);
+		return $results;
+		
+	} */
+	
+	/* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */
+	function &GetArrayLimit($nrows,$offset=-1) 
+	{
+		if ($offset <= 0) {
+			$arr =& $this->GetArray($nrows);
+			return $arr;
+		}
+		$arr = array();
+		for ($i=1; $i < $offset; $i++) 
+			if (!@OCIFetch($this->_queryID)) return $arr;
+			
+		if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) return $arr;;
+		$results = array();
+		$cnt = 0;
+		while (!$this->EOF && $nrows != $cnt) {
+			$results[$cnt++] = $this->fields;
+			$this->MoveNext();
+		}
+		
+		return $results;
+	}
+
+	
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+
+
+	function _seek($row)
+	{
+		return false;
+	}
+
+	function _fetch() 
+	{
+		return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode);
+	}
+
+	/*		close() only needs to be called if you are worried about using too much memory while your script
+			is running. All associated result memory for the specified result identifier will automatically be freed.		*/
+
+	function _close() 
+	{
+		if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false;
+		if (!empty($this->_refcursor)) {
+			OCIFreeCursor($this->_refcursor);
+			$this->_refcursor = false;
+		}
+		@OCIFreeStatement($this->_queryID);
+ 		$this->_queryID = false;
+		
+	}
+
+	function MetaType($t,$len=-1)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		switch (strtoupper($t)) {
+	 	case 'VARCHAR':
+	 	case 'VARCHAR2':
+		case 'CHAR':
+		case 'VARBINARY':
+		case 'BINARY':
+		case 'NCHAR':
+		case 'NVARCHAR':
+		case 'NVARCHAR2':
+				 if (isset($this) && $len <= $this->blobSize) return 'C';
+		
+		case 'NCLOB':
+		case 'LONG':
+		case 'LONG VARCHAR':
+		case 'CLOB':
+		return 'X';
+		
+		case 'LONG RAW':
+		case 'LONG VARBINARY':
+		case 'BLOB':
+			return 'B';
+		
+		case 'DATE': 
+			return  ($this->connection->datetime) ? 'T' : 'D';
+		
+		
+		case 'TIMESTAMP': return 'T';
+		
+		case 'INT': 
+		case 'SMALLINT':
+		case 'INTEGER': 
+			return 'I';
+			
+		default: return 'N';
+		}
+	}
+}
+
+class ADORecordSet_ext_oci8 extends ADORecordSet_oci8 {	
+	function ADORecordSet_ext_oci8($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
+		case ADODB_FETCH_NUM: 
+		default: $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
+		}
+		$this->adodbFetchMode = $mode;
+		$this->_queryID = $queryID;
+	}
+	
+	function MoveNext()
+	{
+		return adodb_movenext($this);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci805.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci805.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci805.inc.php	(revision 225)
@@ -0,0 +1,59 @@
+<?php
+/** 
+ * @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * Latest version is available at http://php.weblogs.com
+ *
+ * Oracle 8.0.5 driver
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');
+
+class ADODB_oci805 extends ADODB_oci8 {
+	var $databaseType = "oci805";	
+	var $connectSID = true;
+	
+	function ADODB_oci805() 
+	{
+		$this->ADODB_oci8();
+	}
+	
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		// seems that oracle only supports 1 hint comment in 8i
+		if (strpos($sql,'/*+') !== false)
+			$sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
+		else
+			$sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
+		
+		/* 
+			The following is only available from 8.1.5 because order by in inline views not 
+			available before then...
+			http://www.jlcomp.demon.co.uk/faq/top_sql.html
+		if ($nrows > 0) {	
+			if ($offset > 0) $nrows += $offset;
+			$sql = "select * from ($sql) where rownum <= $nrows";
+			$nrows = -1;
+		}
+		*/
+
+		return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+	}
+}
+
+class ADORecordset_oci805 extends ADORecordset_oci8 {	
+	var $databaseType = "oci805";
+	function ADORecordset_oci805($id,$mode=false)
+	{
+		$this->ADORecordset_oci8($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci8po.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci8po.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oci8po.inc.php	(revision 225)
@@ -0,0 +1,217 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim. All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Portable version of oci8 driver, to make it more similar to other database drivers.
+  The main differences are
+
+   1. that the OCI_ASSOC names are in lowercase instead of uppercase.
+   2. bind variables are mapped using ? instead of :<bindvar>
+
+   Should some emulation of RecordCount() be implemented?
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');
+
+class ADODB_oci8po extends ADODB_oci8 {
+	var $databaseType = 'oci8po';
+	var $dataProvider = 'oci8';
+	var $metaColumnsSQL = "select lower(cname),coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net
+	var $metaTablesSQL = "select lower(table_name),table_type from cat where table_type in ('TABLE','VIEW')";
+	
+	function ADODB_oci8po()
+	{
+		$this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200;
+		# oci8po does not support adodb extension: adodb_movenext()
+	}
+	
+	function Param($name)
+	{
+		return '?';
+	}
+	
+	function Prepare($sql,$cursor=false)
+	{
+		$sqlarr = explode('?',$sql);
+		$sql = $sqlarr[0];
+		for ($i = 1, $max = sizeof($sqlarr); $i < $max; $i++) {
+			$sql .=  ':'.($i-1) . $sqlarr[$i];
+		} 
+		return ADODB_oci8::Prepare($sql,$cursor);
+	}
+	
+	// emulate handling of parameters ? ?, replacing with :bind0 :bind1
+	function _query($sql,$inputarr)
+	{
+		if (is_array($inputarr)) {
+			$i = 0;
+			if (is_array($sql)) {
+				foreach($inputarr as $v) {
+					$arr['bind'.$i++] = $v;
+				} 
+			} else {
+				$sqlarr = explode('?',$sql);
+				$sql = $sqlarr[0];
+				foreach($inputarr as $k => $v) {
+					$sql .=  ":$k" . $sqlarr[++$i];
+				}
+			}
+		}
+		return ADODB_oci8::_query($sql,$inputarr);
+	}
+}
+
+/*--------------------------------------------------------------------------------------
+		 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_oci8po extends ADORecordset_oci8 {
+
+	var $databaseType = 'oci8po';
+	
+	function ADORecordset_oci8po($queryID,$mode=false)
+	{
+		$this->ADORecordset_oci8($queryID,$mode);
+	}
+
+	function Fields($colname)
+	{
+		if ($this->fetchMode & OCI_ASSOC) return $this->fields[$colname];
+		
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+	// lowercase field names...
+	function &_FetchField($fieldOffset = -1)
+	{
+		 $fld = new ADOFieldObject;
+ 		 $fieldOffset += 1;
+		 $fld->name = strtolower(OCIcolumnname($this->_queryID, $fieldOffset));
+		 $fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
+		 $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
+		 if ($fld->type == 'NUMBER') {
+		 	//$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
+			$sc = OCIColumnScale($this->_queryID, $fieldOffset);
+			if ($sc == 0) $fld->type = 'INT';
+		 }
+		 return $fld;
+	}
+	/*
+	function MoveNext()
+	{
+		if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+			$this->_currentRow += 1;
+			return true;
+		}
+		if (!$this->EOF) {
+			$this->_currentRow += 1;
+			$this->EOF = true;
+		}
+		return false;
+	}*/
+
+	// 10% speedup to move MoveNext to child class
+	function MoveNext() 
+	{
+		if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+		global $ADODB_ANSI_PADDING_OFF;
+			$this->_currentRow++;
+			
+			if ($this->fetchMode & OCI_ASSOC) $this->_updatefields();
+			if (!empty($ADODB_ANSI_PADDING_OFF)) {
+				foreach($this->fields as $k => $v) {
+					if (is_string($v)) $this->fields[$k] = rtrim($v);
+				}
+			}
+			return true;
+		}
+		if (!$this->EOF) {
+			$this->EOF = true;
+			$this->_currentRow++;
+		}
+		return false;
+	}	
+	
+	/* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */
+	function &GetArrayLimit($nrows,$offset=-1) 
+	{
+		if ($offset <= 0) {
+			$arr = $this->GetArray($nrows);
+			return $arr;
+		}
+		for ($i=1; $i < $offset; $i++) 
+			if (!@OCIFetch($this->_queryID)) {
+				$arr = array();
+				return $arr;
+			}
+		if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
+			$arr = array();
+			return $arr;
+		}
+		if ($this->fetchMode & OCI_ASSOC) $this->_updatefields();
+		$results = array();
+		$cnt = 0;
+		while (!$this->EOF && $nrows != $cnt) {
+			$results[$cnt++] = $this->fields;
+			$this->MoveNext();
+		}
+		
+		return $results;
+	}
+
+	// Create associative array
+	function _updatefields()
+	{
+		if (ADODB_ASSOC_CASE == 2) return; // native
+	
+		$arr = array();
+		$lowercase = (ADODB_ASSOC_CASE == 0);
+		
+		foreach($this->fields as $k => $v) {
+			if (is_integer($k)) $arr[$k] = $v;
+			else {
+				if ($lowercase)
+					$arr[strtolower($k)] = $v;
+				else
+					$arr[strtoupper($k)] = $v;
+			}
+		}
+		$this->fields = $arr;
+	}
+	
+	function _fetch() 
+	{
+		$ret = @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode);
+		if ($ret) {
+		global $ADODB_ANSI_PADDING_OFF;
+	
+				if ($this->fetchMode & OCI_ASSOC) $this->_updatefields();
+				if (!empty($ADODB_ANSI_PADDING_OFF)) {
+					foreach($this->fields as $k => $v) {
+						if (is_string($v)) $this->fields[$k] = rtrim($v);
+					}
+				}
+		}
+		return $ret;
+	}
+	
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc.inc.php	(revision 225)
@@ -0,0 +1,738 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Requires ODBC. Works on Windows and Unix.
+*/
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+  define("_ADODB_ODBC_LAYER", 2 );
+	 
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+
+
+class ADODB_odbc extends ADOConnection {
+	var $databaseType = "odbc";	
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d, h:i:sA'";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $dataProvider = "odbc";
+	var $hasAffectedRows = true;
+	var $binmode = ODBC_BINMODE_RETURN;
+	var $useFetchArray = false; // setting this to true will make array elements in FETCH_ASSOC mode case-sensitive
+								// breaking backward-compat
+	//var $longreadlen = 8000; // default number of chars to return for a Blob/Long field
+	var $_bindInputArray = false;	
+	var $curmode = SQL_CUR_USE_DRIVER; // See sqlext.h, SQL_CUR_DEFAULT == SQL_CUR_USE_DRIVER == 2L
+	var $_genSeqSQL = "create table %s (id integer)";
+	var $_autocommit = true;
+	var $_haserrorfunctions = true;
+	var $_has_stupid_odbc_fetch_api_change = true;
+	var $_lastAffectedRows = 0;
+	var $uCaseTables = true; // for meta* functions, uppercase table names
+	
+	function ADODB_odbc() 
+	{ 	
+		$this->_haserrorfunctions = ADODB_PHPVER >= 0x4050;
+		$this->_has_stupid_odbc_fetch_api_change = ADODB_PHPVER >= 0x4200;
+	}
+	
+		// returns true or false
+	function _connect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+	global $php_errormsg;
+		
+		if (!function_exists('odbc_connect')) return null;
+		
+		if ($this->debug && $argDatabasename && $this->databaseType != 'vfp') {
+			ADOConnection::outp("For odbc Connect(), $argDatabasename is not used. Place dsn in 1st parameter.");
+		}
+		if (isset($php_errormsg)) $php_errormsg = '';
+		if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword);
+		else $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,$this->curmode);
+		$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		if (isset($this->connectStmt)) $this->Execute($this->connectStmt);
+		
+		return $this->_connectionID != false;
+	}
+	
+	// returns true or false
+	function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+	global $php_errormsg;
+	
+		if (!function_exists('odbc_connect')) return null;
+		
+		if (isset($php_errormsg)) $php_errormsg = '';
+		$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		if ($this->debug && $argDatabasename) {
+			ADOConnection::outp("For odbc PConnect(), $argDatabasename is not used. Place dsn in 1st parameter.");
+		}
+	//	print "dsn=$argDSN u=$argUsername p=$argPassword<br>"; flush();
+		if ($this->curmode === false) $this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword);
+		else $this->_connectionID = odbc_pconnect($argDSN,$argUsername,$argPassword,$this->curmode);
+		
+		$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		if ($this->_connectionID && $this->autoRollback) @odbc_rollback($this->_connectionID);
+		if (isset($this->connectStmt)) $this->Execute($this->connectStmt);
+		
+		return $this->_connectionID != false;
+	}
+
+	
+	function ServerInfo()
+	{
+	
+		if (!empty($this->host) && ADODB_PHPVER >= 0x4300) {
+			$dsn = strtoupper($this->host);
+			$first = true;
+			$found = false;
+			
+			if (!function_exists('odbc_data_source')) return false;
+			
+			while(true) {
+				
+				$rez = @odbc_data_source($this->_connectionID,
+					$first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT);
+				$first = false;
+				if (!is_array($rez)) break;
+				if (strtoupper($rez['server']) == $dsn) {
+					$found = true;
+					break;
+				}
+			} 
+			if (!$found) return ADOConnection::ServerInfo();
+			if (!isset($rez['version'])) $rez['version'] = '';
+			return $rez;
+		} else {
+			return ADOConnection::ServerInfo();
+		}
+	}
+
+	
+	function CreateSequence($seqname='adodbseq',$start=1)
+	{
+		if (empty($this->_genSeqSQL)) return false;
+		$ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
+		if (!$ok) return false;
+		$start -= 1;
+		return $this->Execute("insert into $seqname values($start)");
+	}
+	
+	var $_dropSeqSQL = 'drop table %s';
+	function DropSequence($seqname)
+	{
+		if (empty($this->_dropSeqSQL)) return false;
+		return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
+	}
+	
+	/*
+		This algorithm is not very efficient, but works even if table locking
+		is not available.
+		
+		Will return false if unable to generate an ID after $MAXLOOPS attempts.
+	*/
+	function GenID($seq='adodbseq',$start=1)
+	{	
+		// if you have to modify the parameter below, your database is overloaded,
+		// or you need to implement generation of id's yourself!
+		$MAXLOOPS = 100;
+		//$this->debug=1;
+		while (--$MAXLOOPS>=0) {
+			$num = $this->GetOne("select id from $seq");
+			if ($num === false) {
+				$this->Execute(sprintf($this->_genSeqSQL ,$seq));	
+				$start -= 1;
+				$num = '0';
+				$ok = $this->Execute("insert into $seq values($start)");
+				if (!$ok) return false;
+			} 
+			$this->Execute("update $seq set id=id+1 where id=$num");
+			
+			if ($this->affected_rows() > 0) {
+				$num += 1;
+				$this->genID = $num;
+				return $num;
+			}
+		}
+		if ($fn = $this->raiseErrorFn) {
+			$fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num);
+		}
+		return false;
+	}
+
+
+	function ErrorMsg()
+	{
+		if ($this->_haserrorfunctions) {
+			if ($this->_errorMsg !== false) return $this->_errorMsg;
+			if (empty($this->_connectionID)) return @odbc_errormsg();
+			return @odbc_errormsg($this->_connectionID);
+		} else return ADOConnection::ErrorMsg();
+	}
+	
+	function ErrorNo()
+	{
+		
+		if ($this->_haserrorfunctions) {
+			if ($this->_errorCode !== false) {
+				// bug in 4.0.6, error number can be corrupted string (should be 6 digits)
+				return (strlen($this->_errorCode)<=2) ? 0 : $this->_errorCode;
+			}
+
+			if (empty($this->_connectionID)) $e = @odbc_error(); 
+			else $e = @odbc_error($this->_connectionID);
+			
+			 // bug in 4.0.6, error number can be corrupted string (should be 6 digits)
+			 // so we check and patch
+			if (strlen($e)<=2) return 0;
+			return $e;
+		} else return ADOConnection::ErrorNo();
+	}
+	
+	
+
+	function BeginTrans()
+	{	
+		if (!$this->hasTransactions) return false;
+		if ($this->transOff) return true; 
+		$this->transCnt += 1;
+		$this->_autocommit = false;
+		return odbc_autocommit($this->_connectionID,false);
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true; 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->_autocommit = true;
+		$ret = odbc_commit($this->_connectionID);
+		odbc_autocommit($this->_connectionID,true);
+		return $ret;
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true; 
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->_autocommit = true;
+		$ret = odbc_rollback($this->_connectionID);
+		odbc_autocommit($this->_connectionID,true);
+		return $ret;
+	}
+	
+	function MetaPrimaryKeys($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		if ($this->uCaseTables) $table = strtoupper($table);
+		$schema = '';
+		$this->_findschema($table,$schema);
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = @odbc_primarykeys($this->_connectionID,'',$schema,$table);
+		
+		if (!$qid) {
+			$ADODB_FETCH_MODE = $savem;
+			return false;
+		}
+		$rs = new ADORecordSet_odbc($qid);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if (!$rs) return false;
+		$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
+		
+		$arr =& $rs->GetArray();
+		$rs->Close();
+		//print_r($arr);
+		$arr2 = array();
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if ($arr[$i][3]) $arr2[] = $arr[$i][3];
+		}
+		return $arr2;
+	}
+	
+	
+	
+	function &MetaTables($ttype=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = odbc_tables($this->_connectionID);
+		
+		$rs = new ADORecordSet_odbc($qid);
+		
+		$ADODB_FETCH_MODE = $savem;
+		if (!$rs) {
+			$false = false;
+			return $false;
+		}
+		$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
+		
+		$arr =& $rs->GetArray();
+		//print_r($arr);
+		
+		$rs->Close();
+		$arr2 = array();
+		
+		if ($ttype) {
+			$isview = strncmp($ttype,'V',1) === 0;
+		}
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if (!$arr[$i][2]) continue;
+			$type = $arr[$i][3];
+			if ($ttype) { 
+				if ($isview) {
+					if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2];
+				} else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2];
+			} else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $arr[$i][2];
+		}
+		return $arr2;
+	}
+	
+/*
+See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcdatetime_data_type_changes.asp
+/ SQL data type codes /
+#define	SQL_UNKNOWN_TYPE	0
+#define SQL_CHAR			1
+#define SQL_NUMERIC		 2
+#define SQL_DECIMAL		 3
+#define SQL_INTEGER		 4
+#define SQL_SMALLINT		5
+#define SQL_FLOAT		   6
+#define SQL_REAL			7
+#define SQL_DOUBLE		  8
+#if (ODBCVER >= 0x0300)
+#define SQL_DATETIME		9
+#endif
+#define SQL_VARCHAR		12
+
+
+/ One-parameter shortcuts for date/time data types /
+#if (ODBCVER >= 0x0300)
+#define SQL_TYPE_DATE	  91
+#define SQL_TYPE_TIME	  92
+#define SQL_TYPE_TIMESTAMP 93
+
+#define SQL_UNICODE                             (-95)
+#define SQL_UNICODE_VARCHAR                     (-96)
+#define SQL_UNICODE_LONGVARCHAR                 (-97)
+*/
+	function ODBCTypes($t)
+	{
+		switch ((integer)$t) {
+		case 1:	
+		case 12:
+		case 0:
+		case -95:
+		case -96:
+			return 'C';
+		case -97:
+		case -1: //text
+			return 'X';
+		case -4: //image
+			return 'B';
+				
+		case 9:	
+		case 91:
+			return 'D';
+		
+		case 10:
+		case 11:
+		case 92:
+		case 93:
+			return 'T';
+			
+		case 4:
+		case 5:
+		case -6:
+			return 'I';
+			
+		case -11: // uniqidentifier
+			return 'R';
+		case -7: //bit
+			return 'L';
+		
+		default:
+			return 'N';
+		}
+	}
+	
+	function &MetaColumns($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$false = false;
+		if ($this->uCaseTables) $table = strtoupper($table);
+		$schema = '';
+		$this->_findschema($table,$schema);
+		
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+		/*if (false) { // after testing, confirmed that the following does not work becoz of a bug
+			$qid2 = odbc_tables($this->_connectionID);
+			$rs = new ADORecordSet_odbc($qid2);		
+			$ADODB_FETCH_MODE = $savem;
+			if (!$rs) return false;
+			$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
+			$rs->_fetch();
+			
+			while (!$rs->EOF) {
+				if ($table == strtoupper($rs->fields[2])) {
+					$q = $rs->fields[0];
+					$o = $rs->fields[1];
+					break;
+				}
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			
+			$qid = odbc_columns($this->_connectionID,$q,$o,strtoupper($table),'%');
+		} */
+		
+		switch ($this->databaseType) {
+		case 'access':
+		case 'vfp':
+			$qid = odbc_columns($this->_connectionID);#,'%','',strtoupper($table),'%');
+			break;
+		
+		
+		case 'db2':
+            $colname = "%";
+            $qid = odbc_columns($this->_connectionID, "", $schema, $table, $colname);
+            break;
+			
+		default:
+			$qid = @odbc_columns($this->_connectionID,'%','%',strtoupper($table),'%');
+			if (empty($qid)) $qid = odbc_columns($this->_connectionID);
+			break;
+		}
+		if (empty($qid)) return $false;
+		
+		$rs =& new ADORecordSet_odbc($qid);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if (!$rs) return $false;
+		$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
+		$rs->_fetch();
+		
+		$retarr = array();
+		
+		/*
+		$rs->fields indices
+		0 TABLE_QUALIFIER
+		1 TABLE_SCHEM
+		2 TABLE_NAME
+		3 COLUMN_NAME
+		4 DATA_TYPE
+		5 TYPE_NAME
+		6 PRECISION
+		7 LENGTH
+		8 SCALE
+		9 RADIX
+		10 NULLABLE
+		11 REMARKS
+		*/
+		while (!$rs->EOF) {
+		//	adodb_pr($rs->fields);
+			if (strtoupper(trim($rs->fields[2])) == $table && (!$schema || strtoupper($rs->fields[1]) == $schema)) {
+				$fld = new ADOFieldObject();
+				$fld->name = $rs->fields[3];
+				$fld->type = $this->ODBCTypes($rs->fields[4]);
+				
+				// ref: http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/html/msdn_odk.asp
+				// access uses precision to store length for char/varchar
+				if ($fld->type == 'C' or $fld->type == 'X') {
+					if ($this->databaseType == 'access') 
+						$fld->max_length = $rs->fields[6];
+					else if ($rs->fields[4] <= -95) // UNICODE
+						$fld->max_length = $rs->fields[7]/2;
+					else
+						$fld->max_length = $rs->fields[7];
+				} else 
+					$fld->max_length = $rs->fields[7];
+				$fld->not_null = !empty($rs->fields[10]);
+				$fld->scale = $rs->fields[8];
+				$retarr[strtoupper($fld->name)] = $fld;	
+			} else if (sizeof($retarr)>0)
+				break;
+			$rs->MoveNext();
+		}
+		$rs->Close(); //-- crashes 4.03pl1 -- why?
+		
+		if (empty($retarr)) $retarr = false;
+		return $retarr;
+	}
+	
+	function Prepare($sql)
+	{
+		if (! $this->_bindInputArray) return $sql; // no binding
+		$stmt = odbc_prepare($this->_connectionID,$sql);
+		if (!$stmt) {
+			// we don't know whether odbc driver is parsing prepared stmts, so just return sql
+			return $sql;
+		}
+		return array($sql,$stmt,false);
+	}
+
+	/* returns queryID or false */
+	function _query($sql,$inputarr=false) 
+	{
+	GLOBAL $php_errormsg;
+		if (isset($php_errormsg)) $php_errormsg = '';
+		$this->_error = '';
+		
+		if ($inputarr) {
+			if (is_array($sql)) {
+				$stmtid = $sql[1];
+			} else {
+				$stmtid = odbc_prepare($this->_connectionID,$sql);
+	
+				if ($stmtid == false) {
+					$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+					return false;
+				}
+			}
+			
+			if (! odbc_execute($stmtid,$inputarr)) {
+				//@odbc_free_result($stmtid);
+				if ($this->_haserrorfunctions) {
+					$this->_errorMsg = odbc_errormsg();
+					$this->_errorCode = odbc_error();
+				}
+				return false;
+			}
+		
+		} else if (is_array($sql)) {
+			$stmtid = $sql[1];
+			if (!odbc_execute($stmtid)) {
+				//@odbc_free_result($stmtid);
+				if ($this->_haserrorfunctions) {
+					$this->_errorMsg = odbc_errormsg();
+					$this->_errorCode = odbc_error();
+				}
+				return false;
+			}
+		} else
+			$stmtid = odbc_exec($this->_connectionID,$sql);
+		
+		$this->_lastAffectedRows = 0;
+		if ($stmtid) {
+			if (@odbc_num_fields($stmtid) == 0) {
+				$this->_lastAffectedRows = odbc_num_rows($stmtid);
+				$stmtid = true;
+			} else {
+				$this->_lastAffectedRows = 0;
+				odbc_binmode($stmtid,$this->binmode);
+				odbc_longreadlen($stmtid,$this->maxblobsize);
+			}
+			
+			if ($this->_haserrorfunctions) {
+				$this->_errorMsg = '';
+				$this->_errorCode = 0;
+			} else
+				$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		} else {
+			if ($this->_haserrorfunctions) {
+				$this->_errorMsg = odbc_errormsg();
+				$this->_errorCode = odbc_error();
+			} else
+				$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
+		}
+		return $stmtid;
+	}
+
+	/*
+		Insert a null into the blob field of the table first.
+		Then use UpdateBlob to store the blob.
+		
+		Usage:
+		 
+		$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+		$conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
+	*/
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+		return $this->Execute("UPDATE $table SET $column=? WHERE $where",array($val)) != false;
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		$ret = @odbc_close($this->_connectionID);
+		$this->_connectionID = false;
+		return $ret;
+	}
+
+	function _affectedrows()
+	{
+		return $this->_lastAffectedRows;
+	}
+	
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_odbc extends ADORecordSet {	
+	
+	var $bind = false;
+	var $databaseType = "odbc";		
+	var $dataProvider = "odbc";
+	var $useFetchArray;
+	var $_has_stupid_odbc_fetch_api_change;
+	
+	function ADORecordSet_odbc($id,$mode=false)
+	{
+		if ($mode === false) {  
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		
+		$this->_queryID = $id;
+		
+		// the following is required for mysql odbc driver in 4.3.1 -- why?
+		$this->EOF = false;
+		$this->_currentRow = -1;
+		//$this->ADORecordSet($id);
+	}
+
+
+	// returns the field object
+	function &FetchField($fieldOffset = -1) 
+	{
+		
+		$off=$fieldOffset+1; // offsets begin at 1
+		
+		$o= new ADOFieldObject();
+		$o->name = @odbc_field_name($this->_queryID,$off);
+		$o->type = @odbc_field_type($this->_queryID,$off);
+		$o->max_length = @odbc_field_len($this->_queryID,$off);
+		if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
+		else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
+		return $o;
+	}
+	
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+		
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+		$this->_numOfRows = ($ADODB_COUNTRECS) ? @odbc_num_rows($this->_queryID) : -1;
+		$this->_numOfFields = @odbc_num_fields($this->_queryID);
+		// some silly drivers such as db2 as/400 and intersystems cache return _numOfRows = 0
+		if ($this->_numOfRows == 0) $this->_numOfRows = -1;
+		//$this->useFetchArray = $this->connection->useFetchArray;
+		$this->_has_stupid_odbc_fetch_api_change = ADODB_PHPVER >= 0x4200;
+	}	
+	
+	function _seek($row)
+	{
+		return false;
+	}
+	
+	// speed up SelectLimit() by switching to ADODB_FETCH_NUM as ADODB_FETCH_ASSOC is emulated
+	function &GetArrayLimit($nrows,$offset=-1) 
+	{
+		if ($offset <= 0) {
+			$rs =& $this->GetArray($nrows);
+			return $rs;
+		}
+		$savem = $this->fetchMode;
+		$this->fetchMode = ADODB_FETCH_NUM;
+		$this->Move($offset);
+		$this->fetchMode = $savem;
+		
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+			$this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE);
+		}
+		
+		$results = array();
+		$cnt = 0;
+		while (!$this->EOF && $nrows != $cnt) {
+			$results[$cnt++] = $this->fields;
+			$this->MoveNext();
+		}
+		
+		return $results;
+	}
+	
+	
+	function MoveNext() 
+	{
+		if ($this->_numOfRows != 0 && !$this->EOF) {		
+			$this->_currentRow++;
+			
+			if ($this->_has_stupid_odbc_fetch_api_change)
+				$rez = @odbc_fetch_into($this->_queryID,$this->fields);
+			else {
+				$row = 0;
+				$rez = @odbc_fetch_into($this->_queryID,$row,$this->fields);
+			}
+			if ($rez) {
+				if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+					$this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE);
+				}
+				return true;
+			}
+		}
+		$this->fields = false;
+		$this->EOF = true;
+		return false;
+	}	
+	
+	function _fetch()
+	{
+
+		if ($this->_has_stupid_odbc_fetch_api_change)
+			$rez = @odbc_fetch_into($this->_queryID,$this->fields);
+		else {
+			$row = 0;
+			$rez = @odbc_fetch_into($this->_queryID,$row,$this->fields);
+		}
+		if ($rez) {
+			if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+				$this->fields =& $this->GetRowAssoc(ADODB_ASSOC_CASE);
+			}
+			return true;
+		}
+		$this->fields = false;
+		return false;
+	}
+	
+	function _close() 
+	{
+		return @odbc_free_result($this->_queryID);		
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_db2.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_db2.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_db2.inc.php	(revision 225)
@@ -0,0 +1,368 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  DB2 data driver. Requires ODBC.
+ 
+From phpdb list:
+
+Hi Andrew,
+
+thanks a lot for your help. Today we discovered what
+our real problem was:
+
+After "playing" a little bit with the php-scripts that try
+to connect to the IBM DB2, we set the optional parameter
+Cursortype when calling odbc_pconnect(....).
+
+And the exciting thing: When we set the cursor type
+to SQL_CUR_USE_ODBC Cursor Type, then
+the whole query speed up from 1 till 10 seconds
+to 0.2 till 0.3 seconds for 100 records. Amazing!!!
+
+Therfore, PHP is just almost fast as calling the DB2
+from Servlets using JDBC (don't take too much care
+about the speed at whole: the database was on a
+completely other location, so the whole connection
+was made over a slow network connection).
+
+I hope this helps when other encounter the same
+problem when trying to connect to DB2 from
+PHP.
+
+Kind regards,
+Christian Szardenings
+
+2 Oct 2001
+Mark Newnham has discovered that the SQL_CUR_USE_ODBC is not supported by 
+IBM's DB2 ODBC driver, so this must be a 3rd party ODBC driver.
+
+From the IBM CLI Reference:
+
+SQL_ATTR_ODBC_CURSORS (DB2 CLI v5) 
+This connection attribute is defined by ODBC, but is not supported by DB2
+CLI. Any attempt to set or get this attribute will result in an SQLSTATE of
+HYC00 (Driver not capable). 
+
+A 32-bit option specifying how the Driver Manager uses the ODBC cursor
+library. 
+
+So I guess this means the message [above] was related to using a 3rd party
+odbc driver.
+
+Setting SQL_CUR_USE_ODBC
+========================
+To set SQL_CUR_USE_ODBC for drivers that require it, do this:
+
+$db = NewADOConnection('odbc_db2');
+$db->curMode = SQL_CUR_USE_ODBC;
+$db->Connect($dsn, $userid, $pwd);
+
+
+
+USING CLI INTERFACE
+===================
+
+I have had reports that the $host and $database params have to be reversed in 
+Connect() when using the CLI interface. From Halmai Csongor csongor.halmai#nexum.hu:
+
+> The symptom is that if I change the database engine from postgres or any other to DB2 then the following
+> connection command becomes wrong despite being described this version to be correct in the docs. 
+>
+> $connection_object->Connect( $DATABASE_HOST, $DATABASE_AUTH_USER_NAME, $DATABASE_AUTH_PASSWORD, $DATABASE_NAME )
+>
+> In case of DB2 I had to swap the first and last arguments in order to connect properly. 
+
+
+System Error 5
+==============
+IF you get a System Error 5 when trying to Connect/Load, it could be a permission problem. Give the user connecting
+to DB2 full rights to the DB2 SQLLIB directory, and place the user in the DBUSERS group.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ODBC_LAYER')) {
+	include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+if (!defined('ADODB_ODBC_DB2')){
+define('ADODB_ODBC_DB2',1);
+
+class ADODB_ODBC_DB2 extends ADODB_odbc {
+	var $databaseType = "db2";	
+	var $concat_operator = '||';
+	var $sysTime = 'CURRENT TIME';
+	var $sysDate = 'CURRENT DATE';
+	var $sysTimeStamp = 'CURRENT TIMESTAMP';
+	// The complete string representation of a timestamp has the form 
+	// yyyy-mm-dd-hh.mm.ss.nnnnnn.
+	var $fmtTimeStamp = "'Y-m-d-H.i.s'";
+	var $ansiOuter = true;
+	var $identitySQL = 'values IDENTITY_VAL_LOCAL()';
+	var $_bindInputArray = true;
+	 var $hasInsertID = true;
+	var $rsPrefix = 'ADORecordset_odbc_';
+	
+	function ADODB_DB2()
+	{
+		if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC;
+		$this->ADODB_odbc();
+	}
+	
+	function IfNull( $field, $ifNull ) 
+	{
+		return " COALESCE($field, $ifNull) "; // if DB2 UDB
+	}
+	
+	function ServerInfo()
+	{
+		//odbc_setoption($this->_connectionID,1,101 /*SQL_ATTR_ACCESS_MODE*/, 1 /*SQL_MODE_READ_ONLY*/);
+		$vers = $this->GetOne('select versionnumber from sysibm.sysversions');
+		//odbc_setoption($this->_connectionID,1,101, 0 /*SQL_MODE_READ_WRITE*/);
+		return array('description'=>'DB2 ODBC driver', 'version'=>$vers);
+	}
+	
+	function _insertid()
+	{
+		return $this->GetOne($this->identitySQL);
+	}
+	
+	function RowLock($tables,$where,$flds='1 as ignore')
+	{
+		if ($this->_autocommit) $this->BeginTrans();
+		return $this->GetOne("select $flds from $tables where $where for update");
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false, $qtable="%", $qschema="%")
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$qid = odbc_tables($this->_connectionID, "", $qschema, $qtable, "");
+		
+		$rs = new ADORecordSet_odbc($qid);
+		
+		$ADODB_FETCH_MODE = $savem;
+		if (!$rs) {
+			$false = false;
+			return $false;
+		}
+		$rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
+		
+		$arr =& $rs->GetArray();
+		//print_r($arr);
+		
+		$rs->Close();
+		$arr2 = array();
+		
+		if ($ttype) {
+			$isview = strncmp($ttype,'V',1) === 0;
+		}
+		for ($i=0; $i < sizeof($arr); $i++) {
+		
+			if (!$arr[$i][2]) continue;
+			if (strncmp($arr[$i][1],'SYS',3) === 0) continue;
+			
+			$type = $arr[$i][3];
+			
+			if ($showSchema) $arr[$i][2] = $arr[$i][1].'.'.$arr[$i][2];
+			
+			if ($ttype) { 
+				if ($isview) {
+					if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2];
+				} else if (strncmp($type,'T',1) === 0) $arr2[] = $arr[$i][2];
+			} else if (strncmp($type,'S',1) !== 0) $arr2[] = $arr[$i][2];
+		}
+		return $arr2;
+	}
+
+	function &MetaIndexes ($table, $primary = FALSE, $owner=false)
+	{
+        // save old fetch mode
+        global $ADODB_FETCH_MODE;
+        $save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+               $savem = $this->SetFetchMode(FALSE);
+        }
+		$false = false;
+		// get index details
+		$table = strtoupper($table);
+		$SQL="SELECT NAME, UNIQUERULE, COLNAMES FROM SYSIBM.SYSINDEXES WHERE TBNAME='$table'";
+        if ($primary) 
+			$SQL.= " AND UNIQUERULE='P'";
+		$rs = $this->Execute($SQL);
+        if (!is_object($rs)) {
+			if (isset($savem)) 
+				$this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+            return $false;
+        }
+		$indexes = array ();
+        // parse index data into array
+        while ($row = $rs->FetchRow()) {
+			$indexes[$row[0]] = array(
+			   'unique' => ($row[1] == 'U' || $row[1] == 'P'),
+			   'columns' => array()
+			);
+			$cols = ltrim($row[2],'+');
+			$indexes[$row[0]]['columns'] = explode('+', $cols);
+        }
+		if (isset($savem)) { 
+            $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+		}
+        return $indexes;
+	}
+	
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+	// use right() and replace() ?
+		if (!$col) $col = $this->sysDate;
+		$s = '';
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			if ($s) $s .= '||';
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= "char(year($col))";
+				break;
+			case 'M':
+				$s .= "substr(monthname($col),1,3)";
+				break;
+			case 'm':
+				$s .= "right(digits(month($col)),2)";
+				break;
+			case 'D':
+			case 'd':
+				$s .= "right(digits(day($col)),2)";
+				break;
+			case 'H':
+			case 'h':
+				if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)";	
+				else $s .= "''";
+				break;
+			case 'i':
+			case 'I':
+				if ($col != $this->sysDate)
+					$s .= "right(digits(minute($col)),2)";
+					else $s .= "''";
+				break;
+			case 'S':
+			case 's':
+				if ($col != $this->sysDate)
+					$s .= "right(digits(second($col)),2)";
+				else $s .= "''";
+				break;
+			default:
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				$s .= $this->qstr($ch);
+			}
+		}
+		return $s;
+	} 
+ 
+	
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputArr=false)
+	{
+		$nrows = (integer) $nrows;
+		if ($offset <= 0) {
+		// could also use " OPTIMIZE FOR $nrows ROWS "
+			if ($nrows >= 0) $sql .=  " FETCH FIRST $nrows ROWS ONLY ";
+			$rs =& $this->Execute($sql,$inputArr);
+		} else {
+			if ($offset > 0 && $nrows < 0);
+			else {
+				$nrows += $offset;
+				$sql .=  " FETCH FIRST $nrows ROWS ONLY ";
+			}
+			$rs =& ADOConnection::SelectLimit($sql,-1,$offset,$inputArr);
+		}
+		
+		return $rs;
+	}
+	
+};
+ 
+
+class  ADORecordSet_odbc_db2 extends ADORecordSet_odbc {	
+	
+	var $databaseType = "db2";		
+	
+	function ADORecordSet_db2($id,$mode=false)
+	{
+		$this->ADORecordSet_odbc($id,$mode);
+	}
+
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		switch (strtoupper($t)) {
+		case 'VARCHAR':
+		case 'CHAR':
+		case 'CHARACTER':
+		case 'C':
+			if ($len <= $this->blobSize) return 'C';
+		
+		case 'LONGCHAR':
+		case 'TEXT':
+		case 'CLOB':
+		case 'DBCLOB': // double-byte
+		case 'X':
+			return 'X';
+		
+		case 'BLOB':
+		case 'GRAPHIC':
+		case 'VARGRAPHIC':
+			return 'B';
+			
+		case 'DATE':
+		case 'D':
+			return 'D';
+		
+		case 'TIME':
+		case 'TIMESTAMP':
+		case 'T':
+			return 'T';
+		
+		//case 'BOOLEAN': 
+		//case 'BIT':
+		//	return 'L';
+			
+		//case 'COUNTER':
+		//	return 'R';
+			
+		case 'INT':
+		case 'INTEGER':
+		case 'BIGINT':
+		case 'SMALLINT':
+		case 'I':
+			return 'I';
+			
+		default: return 'N';
+		}
+	}
+}
+
+} //define
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_mssql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_mssql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_mssql.inc.php	(revision 225)
@@ -0,0 +1,306 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  MSSQL support via ODBC. Requires ODBC. Works on Windows and Unix. 
+  For Unix configuration, see http://phpbuilder.com/columns/alberto20000919.php3
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ODBC_LAYER')) {
+	include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+
+ 
+class  ADODB_odbc_mssql extends ADODB_odbc {	
+	var $databaseType = 'odbc_mssql';
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $_bindInputArray = true;
+	var $metaTablesSQL="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE'))";
+	var $metaColumnsSQL = "select c.name,t.name,c.length from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'";
+	var $hasTop = 'top';		// support mssql/interbase SELECT TOP 10 * FROM TABLE
+	var $sysDate = 'GetDate()';
+	var $sysTimeStamp = 'GetDate()';
+	var $leftOuter = '*=';
+	var $rightOuter = '=*';
+	var $substr = 'substring';
+	var $length = 'len';
+	var $ansiOuter = true; // for mssql7 or later
+	var $identitySQL = 'select @@IDENTITY'; // 'select SCOPE_IDENTITY'; # for mssql 2000
+	var $hasInsertID = true;
+	var $connectStmt = 'SET CONCAT_NULL_YIELDS_NULL OFF'; # When SET CONCAT_NULL_YIELDS_NULL is ON, 
+														  # concatenating a null value with a string yields a NULL result
+	
+	function ADODB_odbc_mssql()
+	{
+		$this->ADODB_odbc();
+		//$this->curmode = SQL_CUR_USE_ODBC;	
+	}
+
+	// crashes php...
+	function ServerInfo()
+	{
+	global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$row = $this->GetRow("execute sp_server_info 2");
+		$ADODB_FETCH_MODE = $save;
+		if (!is_array($row)) return false;
+		$arr['description'] = $row[2];
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+
+	function IfNull( $field, $ifNull ) 
+	{
+		return " ISNULL($field, $ifNull) "; // if MS SQL Server
+	}
+	
+	function _insertid()
+	{
+	// SCOPE_IDENTITY()
+	// Returns the last IDENTITY value inserted into an IDENTITY column in 
+	// the same scope. A scope is a module -- a stored procedure, trigger, 
+	// function, or batch. Thus, two statements are in the same scope if 
+	// they are in the same stored procedure, function, or batch.
+			return $this->GetOne($this->identitySQL);
+	}
+	
+	
+	function MetaForeignKeys($table, $owner=false, $upper=false)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$table = $this->qstr(strtoupper($table));
+		
+		$sql = 
+"select object_name(constid) as constraint_name,
+	col_name(fkeyid, fkey) as column_name,
+	object_name(rkeyid) as referenced_table_name,
+   	col_name(rkeyid, rkey) as referenced_column_name
+from sysforeignkeys
+where upper(object_name(fkeyid)) = $table
+order by constraint_name, referenced_table_name, keyno";
+		
+		$constraints =& $this->GetArray($sql);
+		
+		$ADODB_FETCH_MODE = $save;
+		
+		$arr = false;
+		foreach($constraints as $constr) {
+			//print_r($constr);
+			$arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; 
+		}
+		if (!$arr) return false;
+		
+		$arr2 = false;
+		
+		foreach($arr as $k => $v) {
+			foreach($v as $a => $b) {
+				if ($upper) $a = strtoupper($a);
+				$arr2[$a] = $b;
+			}
+		}
+		return $arr2;
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+		if ($mask) {$this->debug=1;
+			$save = $this->metaTablesSQL;
+			$mask = $this->qstr($mask);
+			$this->metaTablesSQL .= " AND name like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		if ($mask) {
+			$this->metaTablesSQL = $save;
+		}
+		return $ret;
+	}
+	
+	function &MetaColumns($table)
+	{
+		$arr = ADOConnection::MetaColumns($table);
+		return $arr;
+	}
+	
+	
+	function &MetaIndexes($table,$primary=false)
+	{
+		$table = $this->qstr($table);
+
+		$sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, 
+			CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK,
+			CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique
+			FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id 
+			INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid 
+			INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid
+			WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table
+			ORDER BY O.name, I.Name, K.keyno";
+
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+        	$savem = $this->SetFetchMode(FALSE);
+        }
+        
+        $rs = $this->Execute($sql);
+        if (isset($savem)) {
+        	$this->SetFetchMode($savem);
+        }
+        $ADODB_FETCH_MODE = $save;
+
+        if (!is_object($rs)) {
+        	return FALSE;
+        }
+
+		$indexes = array();
+		while ($row = $rs->FetchRow()) {
+			if (!$primary && $row[5]) continue;
+			
+            $indexes[$row[0]]['unique'] = $row[6];
+            $indexes[$row[0]]['columns'][] = $row[1];
+    	}
+        return $indexes;
+	}
+	
+	function _query($sql,$inputarr)
+	{
+		if (is_string($sql)) $sql = str_replace('||','+',$sql);
+		return ADODB_odbc::_query($sql,$inputarr);
+	}
+	
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET TRANSACTION ".$transaction_mode);
+	}
+	
+	// "Stein-Aksel Basma" <basma@accelero.no>
+	// tested with MSSQL 2000
+	function &MetaPrimaryKeys($table)
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$schema = '';
+		$this->_findschema($table,$schema);
+		//if (!$schema) $schema = $this->database;
+		if ($schema) $schema = "and k.table_catalog like '$schema%'"; 
+	
+		$sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k,
+		information_schema.table_constraints tc 
+		where tc.constraint_name = k.constraint_name and tc.constraint_type =
+		'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position ";
+		
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+		$a = $this->GetCol($sql);
+		$ADODB_FETCH_MODE = $savem;
+		
+		if ($a && sizeof($a)>0) return $a;
+		$false = false;
+		return $false;	  
+	}
+	
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		if ($nrows > 0 && $offset <= 0) {
+			$sql = preg_replace(
+				'/(^\s*select\s+(distinctrow|distinct)?)/i','\\1 '.$this->hasTop." $nrows ",$sql);
+			$rs =& $this->Execute($sql,$inputarr);
+		} else
+			$rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+			
+		return $rs;
+	}
+	
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysTimeStamp;
+		$s = '';
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			if ($s) $s .= '+';
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= "datename(yyyy,$col)";
+				break;
+			case 'M':
+				$s .= "convert(char(3),$col,0)";
+				break;
+			case 'm':
+				$s .= "replace(str(month($col),2),' ','0')";
+				break;
+			case 'Q':
+			case 'q':
+				$s .= "datename(quarter,$col)";
+				break;
+			case 'D':
+			case 'd':
+				$s .= "replace(str(day($col),2),' ','0')";
+				break;
+			case 'h':
+				$s .= "substring(convert(char(14),$col,0),13,2)";
+				break;
+			
+			case 'H':
+				$s .= "replace(str(datepart(hh,$col),2),' ','0')";
+				break;
+				
+			case 'i':
+				$s .= "replace(str(datepart(mi,$col),2),' ','0')";
+				break;
+			case 's':
+				$s .= "replace(str(datepart(ss,$col),2),' ','0')";
+				break;
+			case 'a':
+			case 'A':
+				$s .= "substring(convert(char(19),$col,0),18,2)";
+				break;
+				
+			default:
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				$s .= $this->qstr($ch);
+				break;
+			}
+		}
+		return $s;
+	}
+
+} 
+ 
+class  ADORecordSet_odbc_mssql extends ADORecordSet_odbc {	
+	
+	var $databaseType = 'odbc_mssql';
+	
+	function ADORecordSet_odbc_mssql($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbc($id,$mode);
+	}	
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_oracle.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_oracle.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbc_oracle.inc.php	(revision 225)
@@ -0,0 +1,115 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Oracle support via ODBC. Requires ODBC. Works on Windows. 
+*/
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ODBC_LAYER')) {
+	include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+
+ 
+class  ADODB_odbc_oracle extends ADODB_odbc {	
+	var $databaseType = 'odbc_oracle';
+ 	var $replaceQuote = "''"; // string to use to replace quotes
+	var $concat_operator='||';
+	var $fmtDate = "'Y-m-d 00:00:00'"; 
+	var $fmtTimeStamp = "'Y-m-d h:i:sA'";
+	var $metaTablesSQL = 'select table_name from cat';
+	var $metaColumnsSQL = "select cname,coltype,width from col where tname='%s' order by colno";
+	var $sysDate = "TRUNC(SYSDATE)";
+	var $sysTimeStamp = 'SYSDATE';
+	
+	//var $_bindInputArray = false;
+	
+	function ADODB_odbc_oracle()
+	{
+		$this->ADODB_odbc();
+	}
+		
+	function &MetaTables() 
+	{
+		$false = false;
+		$rs = $this->Execute($this->metaTablesSQL);
+		if ($rs === false) return $false;
+		$arr = $rs->GetArray();
+		$arr2 = array();
+		for ($i=0; $i < sizeof($arr); $i++) {
+			$arr2[] = $arr[$i][0];
+		}
+		$rs->Close();
+		return $arr2;
+	}
+	
+	function &MetaColumns($table) 
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
+		if ($rs === false) {	
+			$false = false;
+			return $false;
+		}
+		$retarr = array();
+		while (!$rs->EOF) { //print_r($rs->fields);
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			$fld->type = $rs->fields[1];
+			$fld->max_length = $rs->fields[2];
+			
+			
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[strtoupper($fld->name)] = $fld;
+			
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		return $retarr;	
+	}
+
+	// returns true or false
+	function _connect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+	global $php_errormsg;
+	
+		$php_errormsg = '';
+		$this->_connectionID = odbc_connect($argDSN,$argUsername,$argPassword,SQL_CUR_USE_ODBC );
+		$this->_errorMsg = $php_errormsg;
+		
+		$this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'");
+		//if ($this->_connectionID) odbc_autocommit($this->_connectionID,true);
+		return $this->_connectionID != false;
+	}
+	// returns true or false
+	function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+	global $php_errormsg;
+		$php_errormsg = '';
+		$this->_connectionID = odbc_pconnect($argDSN,$argUsername,$argPassword,SQL_CUR_USE_ODBC );
+		$this->_errorMsg = $php_errormsg;
+		
+		$this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'");
+		//if ($this->_connectionID) odbc_autocommit($this->_connectionID,true);
+		return $this->_connectionID != false;
+	}
+} 
+ 
+class  ADORecordSet_odbc_oracle extends ADORecordSet_odbc {	
+	
+	var $databaseType = 'odbc_oracle';
+	
+	function ADORecordSet_odbc_oracle($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbc($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbtp.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbtp.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbtp.inc.php	(revision 225)
@@ -0,0 +1,743 @@
+<?php
+/*
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence. See License.txt.
+  Set tabs to 4 for best viewing.
+  Latest version is available at http://adodb.sourceforge.net
+*/
+// Code contributed by "stefan bogdan" <sbogdan#rsb.ro>
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+define("_ADODB_ODBTP_LAYER", 2 );
+
+class ADODB_odbtp extends ADOConnection{
+	var $databaseType = "odbtp";
+	var $dataProvider = "odbtp";
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d, h:i:sA'";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $odbc_driver = 0;
+	var $hasAffectedRows = true;
+	var $hasInsertID = false;
+	var $hasGenID = true;
+	var $hasMoveFirst = true;
+
+	var $_genSeqSQL = "create table %s (seq_name char(30) not null unique , seq_value integer not null)";
+	var $_dropSeqSQL = "delete from adodb_seq where seq_name = '%s'";
+	var $_bindInputArray = false;
+	var $_useUnicodeSQL = false;
+	var $_canPrepareSP = false;
+	var $_dontPoolDBC = true;
+
+	function ADODB_odbtp()
+	{
+	}
+
+	function ServerInfo()
+	{
+		return array('description' => @odbtp_get_attr( ODB_ATTR_DBMSNAME, $this->_connectionID),
+		             'version' => @odbtp_get_attr( ODB_ATTR_DBMSVER, $this->_connectionID));
+	}
+
+	function ErrorMsg()
+	{
+		if (empty($this->_connectionID)) return @odbtp_last_error();
+		return @odbtp_last_error($this->_connectionID);
+	}
+
+	function ErrorNo()
+	{
+		if (empty($this->_connectionID)) return @odbtp_last_error_state();
+			return @odbtp_last_error_state($this->_connectionID);
+	}
+
+	function _insertid()
+	{
+	// SCOPE_IDENTITY()
+	// Returns the last IDENTITY value inserted into an IDENTITY column in
+	// the same scope. A scope is a module -- a stored procedure, trigger,
+	// function, or batch. Thus, two statements are in the same scope if
+	// they are in the same stored procedure, function, or batch.
+			return $this->GetOne($this->identitySQL);
+	}
+
+	function _affectedrows()
+	{
+		if ($this->_queryID) {
+			return @odbtp_affected_rows ($this->_queryID);
+	   } else
+		return 0;
+	}
+
+	function CreateSequence($seqname='adodbseq',$start=1)
+	{
+		//verify existence
+		$num = $this->GetOne("select seq_value from adodb_seq");
+		$seqtab='adodb_seq';
+		if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) {
+			$path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID );
+			//if using vfp dbc file
+			if( !strcasecmp(strrchr($path, '.'), '.dbc') )
+                $path = substr($path,0,strrpos($path,'\/'));
+           	$seqtab = $path . '/' . $seqtab;
+        }
+		if($num == false) {
+			if (empty($this->_genSeqSQL)) return false;
+			$ok = $this->Execute(sprintf($this->_genSeqSQL ,$seqtab));
+		}
+		$num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seqname'");
+		if ($num) {
+			return false;
+		}
+		$start -= 1;
+		return $this->Execute("insert into adodb_seq values('$seqname',$start)");
+	}
+
+	function DropSequence($seqname)
+	{
+		if (empty($this->_dropSeqSQL)) return false;
+		return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
+	}
+
+	function GenID($seq='adodbseq',$start=1)
+	{
+		$seqtab='adodb_seq';
+		if( $this->odbc_driver == ODB_DRIVER_FOXPRO) {
+			$path = @odbtp_get_attr( ODB_ATTR_DATABASENAME, $this->_connectionID );
+			//if using vfp dbc file
+			if( !strcasecmp(strrchr($path, '.'), '.dbc') )
+                $path = substr($path,0,strrpos($path,'\/'));
+           	$seqtab = $path . '/' . $seqtab;
+        }
+		$MAXLOOPS = 100;
+		while (--$MAXLOOPS>=0) {
+			$num = $this->GetOne("select seq_value from adodb_seq where seq_name='$seq'");
+			if ($num === false) {
+				//verify if abodb_seq table exist
+				$ok = $this->GetOne("select seq_value from adodb_seq ");
+				if(!$ok) {
+					//creating the sequence table adodb_seq
+					$this->Execute(sprintf($this->_genSeqSQL ,$seqtab));
+				}
+				$start -= 1;
+				$num = '0';
+				$ok = $this->Execute("insert into adodb_seq values('$seq',$start)");
+				if (!$ok) return false;
+			}
+			$ok = $this->Execute("update adodb_seq set seq_value=seq_value+1 where seq_name='$seq'");
+			if($ok) {
+				$num += 1;
+				$this->genID = $num;
+				return $num;
+			}
+		}
+	if ($fn = $this->raiseErrorFn) {
+		$fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num);
+	}
+		return false;
+	}
+
+	//example for $UserOrDSN
+	//for visual fox : DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=c:\YourDbfFileDir;EXCLUSIVE=NO;
+	//for visual fox dbc: DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBC;SOURCEDB=c:\YourDbcFileDir\mydb.dbc;EXCLUSIVE=NO;
+	//for access : DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\path_to_access_db\base_test.mdb;UID=root;PWD=;
+	//for mssql : DRIVER={SQL Server};SERVER=myserver;UID=myuid;PWD=mypwd;DATABASE=OdbtpTest;
+	//if uid & pwd can be separate
+    function _connect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='')
+	{
+		$this->_connectionID = odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase);
+		if ($this->_connectionID === false) {
+			$this->_errorMsg = $this->ErrorMsg() ;
+			return false;
+		}
+		
+		odbtp_convert_datetime($this->_connectionID,true);
+		
+		if ($this->_dontPoolDBC) {
+			if (function_exists('odbtp_dont_pool_dbc'))
+				@odbtp_dont_pool_dbc($this->_connectionID);
+		}
+		else {
+			$this->_dontPoolDBC = true;
+		}
+		$this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID);
+		$dbms = strtolower(@odbtp_get_attr(ODB_ATTR_DBMSNAME, $this->_connectionID));
+		$this->odbc_name = $dbms;
+		
+		// Account for inconsistent DBMS names
+		if( $this->odbc_driver == ODB_DRIVER_ORACLE )
+			$dbms = 'oracle';
+		else if( $this->odbc_driver == ODB_DRIVER_SYBASE )
+			$dbms = 'sybase';
+
+		// Set DBMS specific attributes
+		switch( $dbms ) {
+			case 'microsoft sql server':
+				$this->databaseType = 'odbtp_mssql';
+				$this->fmtDate = "'Y-m-d'";
+				$this->fmtTimeStamp = "'Y-m-d h:i:sA'";
+				$this->sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
+				$this->sysTimeStamp = 'GetDate()';
+				$this->ansiOuter = true;
+				$this->leftOuter = '*=';
+				$this->rightOuter = '=*';
+                $this->hasTop = 'top';
+				$this->hasInsertID = true;
+				$this->hasTransactions = true;
+				$this->_bindInputArray = true;
+				$this->_canSelectDb = true;
+				$this->substr = "substring";
+				$this->length = 'len';
+				$this->identitySQL = 'select @@IDENTITY';
+				$this->metaDatabasesSQL = "select name from master..sysdatabases where name <> 'master'";
+				$this->_canPrepareSP = true;
+				break;
+			case 'access':
+				$this->databaseType = 'odbtp_access';
+				$this->fmtDate = "#Y-m-d#";
+				$this->fmtTimeStamp = "#Y-m-d h:i:sA#";
+				$this->sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
+				$this->sysTimeStamp = 'NOW';
+                $this->hasTop = 'top';
+				$this->hasTransactions = false;
+				$this->_canPrepareSP = true;  // For MS Access only.
+				break;
+			case 'visual foxpro':
+				$this->databaseType = 'odbtp_vfp';
+				$this->fmtDate = "{^Y-m-d}";
+				$this->fmtTimeStamp = "{^Y-m-d, h:i:sA}";
+				$this->sysDate = 'date()';
+				$this->sysTimeStamp = 'datetime()';
+				$this->ansiOuter = true;
+                $this->hasTop = 'top';
+				$this->hasTransactions = false;
+				$this->replaceQuote = "'+chr(39)+'";
+				$this->true = '.T.';
+				$this->false = '.F.';
+
+				break;
+			case 'oracle':
+				$this->databaseType = 'odbtp_oci8';
+				$this->fmtDate = "'Y-m-d 00:00:00'";
+				$this->fmtTimeStamp = "'Y-m-d h:i:sA'";
+				$this->sysDate = 'TRUNC(SYSDATE)';
+				$this->sysTimeStamp = 'SYSDATE';
+				$this->hasTransactions = true;
+				$this->_bindInputArray = true;
+				$this->concat_operator = '||';
+				break;
+			case 'sybase':
+				$this->databaseType = 'odbtp_sybase';
+				$this->fmtDate = "'Y-m-d'";
+				$this->fmtTimeStamp = "'Y-m-d H:i:s'";
+				$this->sysDate = 'GetDate()';
+				$this->sysTimeStamp = 'GetDate()';
+				$this->leftOuter = '*=';
+				$this->rightOuter = '=*';
+				$this->hasInsertID = true;
+				$this->hasTransactions = true;
+				$this->identitySQL = 'select @@IDENTITY';
+				break;
+			default:
+				$this->databaseType = 'odbtp';
+				if( @odbtp_get_attr(ODB_ATTR_TXNCAPABLE, $this->_connectionID) )
+					$this->hasTransactions = true;
+				else
+					$this->hasTransactions = false;
+		}
+        @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID );
+
+		if ($this->_useUnicodeSQL )
+			@odbtp_set_attr(ODB_ATTR_UNICODESQL, TRUE, $this->_connectionID);
+
+        return true;
+	}
+
+	function _pconnect($HostOrInterface, $UserOrDSN='', $argPassword='', $argDatabase='')
+	{
+		$this->_dontPoolDBC = false;
+  		return $this->_connect($HostOrInterface, $UserOrDSN, $argPassword, $argDatabase);
+	}
+
+	function SelectDB($dbName)
+	{
+		if (!@odbtp_select_db($dbName, $this->_connectionID)) {
+			return false;
+		}
+		$this->database = $dbName;
+		$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
+		return true;
+	}
+	
+	function &MetaTables($ttype='',$showSchema=false,$mask=false)
+	{
+	global $ADODB_FETCH_MODE;
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false);
+		
+		$arr =& $this->GetArray("||SQLTables||||$ttype");
+		
+		if (isset($savefm)) $this->SetFetchMode($savefm);
+		$ADODB_FETCH_MODE = $savem;
+
+		$arr2 = array();
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if ($arr[$i][3] == 'SYSTEM TABLE' )	continue;
+			if ($arr[$i][2])
+				$arr2[] = $showSchema && $arr[$i][1]? $arr[$i][1].'.'.$arr[$i][2] : $arr[$i][2];
+		}
+		return $arr2;
+	}
+	
+	function &MetaColumns($table,$upper=true)
+	{
+	global $ADODB_FETCH_MODE;
+
+		$schema = false;
+		$this->_findschema($table,$schema);
+		if ($upper) $table = strtoupper($table);
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savefm = $this->SetFetchMode(false);
+		
+		$rs = $this->Execute( "||SQLColumns||$schema|$table" );
+		
+		if (isset($savefm)) $this->SetFetchMode($savefm);
+		$ADODB_FETCH_MODE = $savem;
+
+		if (!$rs || $rs->EOF) {
+			$false = false;
+			return $false;
+		}
+		$retarr = array();
+		while (!$rs->EOF) {
+			//print_r($rs->fields);
+			if (strtoupper($rs->fields[2]) == $table) {
+				$fld = new ADOFieldObject();
+				$fld->name = $rs->fields[3];
+				$fld->type = $rs->fields[5];
+				$fld->max_length = $rs->fields[6];
+    			$fld->not_null = !empty($rs->fields[9]);
+ 				$fld->scale = $rs->fields[7];
+				if (isset($rs->fields[12])) // vfp does not have field 12
+	 				if (!is_null($rs->fields[12])) {
+	 					$fld->has_default = true;
+	 					$fld->default_value = $rs->fields[12];
+					}
+				$retarr[strtoupper($fld->name)] = $fld;
+			} else if (!empty($retarr))
+				break;
+			$rs->MoveNext();
+		}
+		$rs->Close();
+
+		return $retarr;
+	}
+
+	function &MetaPrimaryKeys($table, $owner='')
+	{
+	global $ADODB_FETCH_MODE;
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$arr =& $this->GetArray("||SQLPrimaryKeys||$owner|$table");
+		$ADODB_FETCH_MODE = $savem;
+
+		//print_r($arr);
+		$arr2 = array();
+		for ($i=0; $i < sizeof($arr); $i++) {
+			if ($arr[$i][3]) $arr2[] = $arr[$i][3];
+		}
+		return $arr2;
+	}
+
+	function &MetaForeignKeys($table, $owner='', $upper=false)
+	{
+	global $ADODB_FETCH_MODE;
+
+		$savem = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$constraints =& $this->GetArray("||SQLForeignKeys|||||$owner|$table");
+		$ADODB_FETCH_MODE = $savem;
+
+		$arr = false;
+		foreach($constraints as $constr) {
+			//print_r($constr);
+			$arr[$constr[11]][$constr[2]][] = $constr[7].'='.$constr[3];
+		}
+		if (!$arr) {
+			$false = false;
+			return $false;
+		}
+		
+		$arr2 = array();
+
+		foreach($arr as $k => $v) {
+			foreach($v as $a => $b) {
+				if ($upper) $a = strtoupper($a);
+				$arr2[$a] = $b;
+			}
+		}
+		return $arr2;
+	}
+
+	function BeginTrans()
+	{
+		if (!$this->hasTransactions) return false;
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		$this->autoCommit = false;
+		if (defined('ODB_TXN_DEFAULT'))
+			$txn = ODB_TXN_DEFAULT;
+		else
+			$txn = ODB_TXN_READUNCOMMITTED;
+		$rs = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS,$txn,$this->_connectionID);
+		if(!$rs) return false;
+		return true;
+	}
+
+	function CommitTrans($ok=true)
+	{
+		if ($this->transOff) return true;
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->autoCommit = true;
+		if( ($ret = @odbtp_commit($this->_connectionID)) )
+			$ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off
+		return $ret;
+	}
+
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->autoCommit = true;
+		if( ($ret = @odbtp_rollback($this->_connectionID)) )
+			$ret = @odbtp_set_attr(ODB_ATTR_TRANSACTIONS, ODB_TXN_NONE, $this->_connectionID);//set transaction off
+		return $ret;
+	}
+
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		// TOP requires ORDER BY for Visual FoxPro
+		if( $this->odbc_driver == ODB_DRIVER_FOXPRO ) {
+			if (!preg_match('/ORDER[ \t\r\n]+BY/is',$sql)) $sql .= ' ORDER BY 1';
+		}
+		$ret =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+		return $ret;
+	}
+
+	function Prepare($sql)
+	{
+		if (! $this->_bindInputArray) return $sql; // no binding
+		$stmt = @odbtp_prepare($sql,$this->_connectionID);
+		if (!$stmt) {
+		//	print "Prepare Error for ($sql) ".$this->ErrorMsg()."<br>";
+			return $sql;
+		}
+		return array($sql,$stmt,false);
+	}
+
+	function PrepareSP($sql)
+	{
+		if (!$this->_canPrepareSP) return $sql; // Can't prepare procedures
+
+		$stmt = @odbtp_prepare_proc($sql,$this->_connectionID);
+		if (!$stmt) return false;
+		return array($sql,$stmt);
+	}
+
+	/*
+	Usage:
+		$stmt = $db->PrepareSP('SP_RUNSOMETHING'); -- takes 2 params, @myid and @group
+
+		# note that the parameter does not have @ in front!
+		$db->Parameter($stmt,$id,'myid');
+		$db->Parameter($stmt,$group,'group',false,64);
+		$db->Parameter($stmt,$group,'photo',false,100000,ODB_BINARY);
+		$db->Execute($stmt);
+
+		@param $stmt Statement returned by Prepare() or PrepareSP().
+		@param $var PHP variable to bind to. Can set to null (for isNull support).
+		@param $name Name of stored procedure variable name to bind to.
+		@param [$isOutput] Indicates direction of parameter 0/false=IN  1=OUT  2= IN/OUT. This is ignored in odbtp.
+		@param [$maxLen] Holds an maximum length of the variable.
+		@param [$type] The data type of $var. Legal values depend on driver.
+
+		See odbtp_attach_param documentation at http://odbtp.sourceforge.net.
+	*/
+	function Parameter(&$stmt, &$var, $name, $isOutput=false, $maxLen=0, $type=0)
+	{
+		if ( $this->odbc_driver == ODB_DRIVER_JET ) {
+			$name = '['.$name.']';
+			if( !$type && $this->_useUnicodeSQL
+				&& @odbtp_param_bindtype($stmt[1], $name) == ODB_CHAR )
+			{
+				$type = ODB_WCHAR;
+			}
+		}
+		else {
+			$name = '@'.$name;
+		}
+		return @odbtp_attach_param($stmt[1], $name, $var, $type, $maxLen);
+	}
+
+	/*
+		Insert a null into the blob field of the table first.
+		Then use UpdateBlob to store the blob.
+
+		Usage:
+
+		$conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+		$conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
+	*/
+
+	function UpdateBlob($table,$column,$val,$where,$blobtype='image')
+	{
+		$sql = "UPDATE $table SET $column = ? WHERE $where";
+		if( !($stmt = @odbtp_prepare($sql, $this->_connectionID)) )
+			return false;
+		if( !@odbtp_input( $stmt, 1, ODB_BINARY, 1000000, $blobtype ) )
+			return false;
+		if( !@odbtp_set( $stmt, 1, $val ) )
+			return false;
+		return @odbtp_execute( $stmt ) != false;
+	}
+
+	function IfNull( $field, $ifNull )
+	{
+		switch( $this->odbc_driver ) {
+			case ODB_DRIVER_MSSQL:
+				return " ISNULL($field, $ifNull) ";
+			case ODB_DRIVER_JET:
+				return " IIF(IsNull($field), $ifNull, $field) ";
+		}
+		return " CASE WHEN $field is null THEN $ifNull ELSE $field END ";
+	}
+
+	function _query($sql,$inputarr=false)
+	{
+	global $php_errormsg;
+	
+ 		if ($inputarr) {
+			if (is_array($sql)) {
+				$stmtid = $sql[1];
+			} else {
+				$stmtid = @odbtp_prepare($sql,$this->_connectionID);
+				if ($stmtid == false) {
+					$this->_errorMsg = $php_errormsg;
+					return false;
+				}
+			}
+			$num_params = @odbtp_num_params( $stmtid );
+			for( $param = 1; $param <= $num_params; $param++ ) {
+				@odbtp_input( $stmtid, $param );
+				@odbtp_set( $stmtid, $param, $inputarr[$param-1] );
+			}
+			if (!@odbtp_execute($stmtid) ) {
+				return false;
+			}
+		} else if (is_array($sql)) {
+			$stmtid = $sql[1];
+			if (!@odbtp_execute($stmtid)) {
+				return false;
+			}
+		} else {
+			$stmtid = odbtp_query($sql,$this->_connectionID);
+   		}
+		$this->_lastAffectedRows = 0;
+		if ($stmtid) {
+				$this->_lastAffectedRows = @odbtp_affected_rows($stmtid);
+		}
+        return $stmtid;
+	}
+
+	function _close()
+	{
+		$ret = @odbtp_close($this->_connectionID);
+		$this->_connectionID = false;
+		return $ret;
+	}
+}
+
+class ADORecordSet_odbtp extends ADORecordSet {
+
+	var $databaseType = 'odbtp';
+	var $canSeek = true;
+
+	function ADORecordSet_odbtp($queryID,$mode=false)
+	{
+		if ($mode === false) {
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		$this->ADORecordSet($queryID);
+	}
+
+	function _initrs()
+	{
+		$this->_numOfFields = @odbtp_num_fields($this->_queryID);
+		if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID)))
+			$this->_numOfRows = -1;
+
+		if (!$this->connection->_useUnicodeSQL) return;
+
+		if ($this->connection->odbc_driver == ODB_DRIVER_JET) {
+			if (!@odbtp_get_attr(ODB_ATTR_MAPCHARTOWCHAR,
+			                     $this->connection->_connectionID))
+			{
+				for ($f = 0; $f < $this->_numOfFields; $f++) {
+					if (@odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR)
+						@odbtp_bind_field($this->_queryID, $f, ODB_WCHAR);
+				}
+			}
+		}
+	}
+
+	function &FetchField($fieldOffset = 0)
+	{
+		$off=$fieldOffset; // offsets begin at 0
+		$o= new ADOFieldObject();
+		$o->name = @odbtp_field_name($this->_queryID,$off);
+		$o->type = @odbtp_field_type($this->_queryID,$off);
+        $o->max_length = @odbtp_field_length($this->_queryID,$off);
+		if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
+		else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
+		return $o;
+	}
+
+	function _seek($row)
+	{
+		return @odbtp_data_seek($this->_queryID, $row);
+	}
+
+	function fields($colname)
+	{
+		if ($this->fetchMode & ADODB_FETCH_ASSOC) return $this->fields[$colname];
+
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$name = @odbtp_field_name( $this->_queryID, $i );
+				$this->bind[strtoupper($name)] = $i;
+			}
+		}
+		return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+
+	function _fetch_odbtp($type=0)
+	{
+		switch ($this->fetchMode) {
+			case ADODB_FETCH_NUM:
+				$this->fields = @odbtp_fetch_row($this->_queryID, $type);
+				break;
+			case ADODB_FETCH_ASSOC:
+				$this->fields = @odbtp_fetch_assoc($this->_queryID, $type);
+				break;
+            default:
+				$this->fields = @odbtp_fetch_array($this->_queryID, $type);
+		}
+		if ($this->databaseType = 'odbtp_vfp') {
+			if ($this->fields)
+			foreach($this->fields as $k => $v) {
+				if (strncmp($v,'1899-12-30',10) == 0) $this->fields[$k] = '';
+			}
+		}
+		return is_array($this->fields);
+	}
+
+	function _fetch()
+	{
+		return $this->_fetch_odbtp();
+	}
+
+	function MoveFirst()
+	{
+		if (!$this->_fetch_odbtp(ODB_FETCH_FIRST)) return false;
+		$this->EOF = false;
+		$this->_currentRow = 0;
+		return true;
+    }
+
+	function MoveLast()
+	{
+		if (!$this->_fetch_odbtp(ODB_FETCH_LAST)) return false;
+		$this->EOF = false;
+		$this->_currentRow = $this->_numOfRows - 1;
+		return true;
+	}
+
+	function NextRecordSet()
+	{
+		if (!@odbtp_next_result($this->_queryID)) return false;
+		$this->_inited = false;
+		$this->bind = false;
+		$this->_currentRow = -1;
+		$this->Init();
+		return true;
+	}
+
+	function _close()
+	{
+		return @odbtp_free_query($this->_queryID);
+	}
+}
+
+class ADORecordSet_odbtp_mssql extends ADORecordSet_odbtp {
+
+	var $databaseType = 'odbtp_mssql';
+
+	function ADORecordSet_odbtp_mssql($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbtp($id,$mode);
+	}
+}
+
+class ADORecordSet_odbtp_access extends ADORecordSet_odbtp {
+
+	var $databaseType = 'odbtp_access';
+
+	function ADORecordSet_odbtp_access($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbtp($id,$mode);
+	}
+}
+
+class ADORecordSet_odbtp_vfp extends ADORecordSet_odbtp {
+
+	var $databaseType = 'odbtp_vfp';
+
+	function ADORecordSet_odbtp_vfp($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbtp($id,$mode);
+	}
+}
+
+class ADORecordSet_odbtp_oci8 extends ADORecordSet_odbtp {
+
+	var $databaseType = 'odbtp_oci8';
+
+	function ADORecordSet_odbtp_oci8($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbtp($id,$mode);
+	}
+}
+
+class ADORecordSet_odbtp_sybase extends ADORecordSet_odbtp {
+
+	var $databaseType = 'odbtp_sybase';
+
+	function ADORecordSet_odbtp_sybase($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbtp($id,$mode);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbtp_unicode.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbtp_unicode.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-odbtp_unicode.inc.php	(revision 225)
@@ -0,0 +1,39 @@
+<?php
+/*
+	V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence. See License.txt.
+  Set tabs to 4 for best viewing.
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+// Code contributed by "Robert Twitty" <rtwitty#neutron.ushmm.org>
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+/*
+    Because the ODBTP server sends and reads UNICODE text data using UTF-8
+    encoding, the following HTML meta tag must be included within the HTML
+    head section of every HTML form and script page:
+
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+    Also, all SQL query strings must be submitted as UTF-8 encoded text.
+*/
+
+if (!defined('_ADODB_ODBTP_LAYER')) {
+	include(ADODB_DIR."/drivers/adodb-odbtp.inc.php");
+}
+
+class ADODB_odbtp_unicode extends ADODB_odbtp {
+	var $databaseType = 'odbtp';
+	var $_useUnicodeSQL = true;
+
+	function ADODB_odbtp_unicode()
+	{
+		$this->ADODB_odbtp();
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oracle.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oracle.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-oracle.inc.php	(revision 225)
@@ -0,0 +1,338 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Oracle data driver. Requires Oracle client. Works on Windows and Unix and Oracle 7.
+  
+  If you are using Oracle 8 or later, use the oci8 driver which is much better and more reliable.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB_oracle extends ADOConnection {
+	var $databaseType = "oracle";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $concat_operator='||';
+	var $_curs;
+	var $_initdate = true; // init date to YYYY-MM-DD
+	var $metaTablesSQL = 'select table_name from cat';	
+	var $metaColumnsSQL = "select cname,coltype,width from col where tname='%s' order by colno";
+	var $sysDate = "TO_DATE(TO_CHAR(SYSDATE,'YYYY-MM-DD'),'YYYY-MM-DD')";
+	var $sysTimeStamp = 'SYSDATE';
+	var $connectSID = true;
+	
+	function ADODB_oracle() 
+	{
+	}
+
+	// format and return date string in database date format
+	function DBDate($d)
+	{
+		if (is_string($d)) $d = ADORecordSet::UnixDate($d);
+		return 'TO_DATE('.adodb_date($this->fmtDate,$d).",'YYYY-MM-DD')";
+	}
+	
+	// format and return date string in database timestamp format
+	function DBTimeStamp($ts)
+	{
+
+		if (is_string($ts)) $d = ADORecordSet::UnixTimeStamp($ts);
+		return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')";
+	}
+	
+	
+	function BindDate($d)
+	{
+		$d = ADOConnection::DBDate($d);
+		if (strncmp($d,"'",1)) return $d;
+		
+		return substr($d,1,strlen($d)-2);
+	}
+	
+	function BindTimeStamp($d)
+	{
+		$d = ADOConnection::DBTimeStamp($d);
+		if (strncmp($d,"'",1)) return $d;
+		
+		return substr($d,1,strlen($d)-2);
+	}
+	
+
+	
+	function BeginTrans()
+	{	  
+		 $this->autoCommit = false;
+		 ora_commitoff($this->_connectionID);
+		 return true;
+	}
+
+	
+	function CommitTrans($ok=true) 
+	{ 
+		   if (!$ok) return $this->RollbackTrans();
+		   $ret = ora_commit($this->_connectionID);
+		   ora_commiton($this->_connectionID);
+		   return $ret;
+	}
+
+	
+	function RollbackTrans()
+	{
+		$ret = ora_rollback($this->_connectionID);
+		ora_commiton($this->_connectionID);
+		return $ret;
+	}
+
+
+	/* there seems to be a bug in the oracle extension -- always returns ORA-00000 - no error */
+	function ErrorMsg() 
+ 	{   
+        if ($this->_errorMsg !== false) return $this->_errorMsg;
+
+        if (is_resource($this->_curs)) $this->_errorMsg = @ora_error($this->_curs);
+ 		if (empty($this->_errorMsg)) $this->_errorMsg = @ora_error($this->_connectionID);
+		return $this->_errorMsg;
+	}
+
+ 
+	function ErrorNo() 
+	{
+		if ($this->_errorCode !== false) return $this->_errorCode;
+
+		if (is_resource($this->_curs)) $this->_errorCode = @ora_errorcode($this->_curs);
+		if (empty($this->_errorCode)) $this->_errorCode = @ora_errorcode($this->_connectionID);
+        return $this->_errorCode;
+	}
+
+	
+
+		// returns true or false
+		function _connect($argHostname, $argUsername, $argPassword, $argDatabasename, $mode=0)
+		{
+			if (!function_exists('ora_plogon')) return null;
+				
+            // <G. Giunta 2003/03/03/> Reset error messages before connecting
+            $this->_errorMsg = false;
+		    $this->_errorCode = false;
+        
+            // G. Giunta 2003/08/13 - This looks danegrously suspicious: why should we want to set
+            // the oracle home to the host name of remote DB?
+//			if ($argHostname) putenv("ORACLE_HOME=$argHostname");
+
+			if($argHostname) { // code copied from version submitted for oci8 by Jorma Tuomainen <jorma.tuomainen@ppoy.fi>
+				if (empty($argDatabasename)) $argDatabasename = $argHostname;
+				else {
+					if(strpos($argHostname,":")) {
+						$argHostinfo=explode(":",$argHostname);
+						$argHostname=$argHostinfo[0];
+						$argHostport=$argHostinfo[1];
+					} else {
+						$argHostport="1521";
+					}
+
+
+					if ($this->connectSID) {
+						$argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname
+						.")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))";
+					} else
+						$argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname
+						.")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))";
+				}
+
+			}
+
+			if ($argDatabasename) $argUsername .= "@$argDatabasename";
+
+		//if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>";
+			if ($mode = 1)
+				$this->_connectionID = ora_plogon($argUsername,$argPassword);
+			else
+				$this->_connectionID = ora_logon($argUsername,$argPassword);
+			if ($this->_connectionID === false) return false;
+			if ($this->autoCommit) ora_commiton($this->_connectionID);
+			if ($this->_initdate) {
+				$rs = $this->_query("ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD'");
+				if ($rs) ora_close($rs);
+			}
+
+			return true;
+		}
+
+
+		// returns true or false
+		function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+		{
+			return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename, 1);
+		}
+
+
+		// returns query ID if successful, otherwise false
+		function _query($sql,$inputarr=false)
+		{
+            // <G. Giunta 2003/03/03/> Reset error messages before executing
+            $this->_errorMsg = false;
+		    $this->_errorCode = false;
+
+			$curs = ora_open($this->_connectionID);
+		 
+		 	if ($curs === false) return false;
+			$this->_curs = $curs;
+			if (!ora_parse($curs,$sql)) return false;
+			if (ora_exec($curs)) return $curs;
+            // <G. Giunta 2004/03/03> before we close the cursor, we have to store the error message
+            // that we can obtain ONLY from the cursor (and not from the connection)
+            $this->_errorCode = @ora_errorcode($curs);
+            $this->_errorMsg = @ora_error($curs);
+            // </G. Giunta 2004/03/03>            
+		 	@ora_close($curs);
+			return false;
+		}
+
+
+		// returns true or false
+		function _close()
+		{
+			return @ora_logoff($this->_connectionID);
+		}
+
+
+
+}
+
+
+/*--------------------------------------------------------------------------------------
+		 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_oracle extends ADORecordSet {
+
+	var $databaseType = "oracle";
+	var $bind = false;
+
+	function ADORecordset_oracle($queryID,$mode=false)
+	{
+		
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->fetchMode = $mode;
+		
+		$this->_queryID = $queryID;
+	
+		$this->_inited = true;
+		$this->fields = array();
+		if ($queryID) {
+			$this->_currentRow = 0;
+			$this->EOF = !$this->_fetch();
+			@$this->_initrs();
+		} else {
+			$this->_numOfRows = 0;
+			$this->_numOfFields = 0;
+			$this->EOF = true;
+		}
+		
+		return $this->_queryID;
+	}
+
+
+
+	   /*		Returns: an object containing field information.
+			   Get column information in the Recordset object. fetchField() can be used in order to obtain information about
+			   fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
+			   fetchField() is retrieved.		*/
+
+	   function &FetchField($fieldOffset = -1)
+	   {
+			$fld = new ADOFieldObject;
+			$fld->name = ora_columnname($this->_queryID, $fieldOffset);
+			$fld->type = ora_columntype($this->_queryID, $fieldOffset);
+			$fld->max_length = ora_columnsize($this->_queryID, $fieldOffset);
+			return $fld;
+	   }
+
+	/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+   function _initrs()
+   {
+		   $this->_numOfRows = -1;
+		   $this->_numOfFields = @ora_numcols($this->_queryID);
+   }
+
+
+   function _seek($row)
+   {
+		   return false;
+   }
+
+   function _fetch($ignore_fields=false) {
+// should remove call by reference, but ora_fetch_into requires it in 4.0.3pl1
+		if ($this->fetchMode & ADODB_FETCH_ASSOC)
+			return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
+   		else 
+			return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS);
+   }
+
+   /*		close() only needs to be called if you are worried about using too much memory while your script
+		   is running. All associated result memory for the specified result identifier will automatically be freed.		*/
+
+   function _close() 
+{
+		   return @ora_close($this->_queryID);
+   }
+
+	function MetaType($t,$len=-1)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		
+		switch (strtoupper($t)) {
+		case 'VARCHAR':
+		case 'VARCHAR2':
+		case 'CHAR':
+		case 'VARBINARY':
+		case 'BINARY':
+				if ($len <= $this->blobSize) return 'C';
+		case 'LONG':
+		case 'LONG VARCHAR':
+		case 'CLOB':
+		return 'X';
+		case 'LONG RAW':
+		case 'LONG VARBINARY':
+		case 'BLOB':
+				return 'B';
+		
+		case 'DATE': return 'D';
+		
+		//case 'T': return 'T';
+		
+		case 'BIT': return 'L';
+		case 'INT': 
+		case 'SMALLINT':
+		case 'INTEGER': return 'I';
+		default: return 'N';
+		}
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo.inc.php	(revision 225)
@@ -0,0 +1,569 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Requires ODBC. Works on Windows and Unix.
+
+	Problems: 
+		Where is float/decimal type in pdo_param_type
+		LOB handling for CLOB/BLOB differs significantly
+*/
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+
+/*
+enum pdo_param_type {
+PDO::PARAM_NULL, 0
+
+/* int as in long (the php native int type).
+ * If you mark a column as an int, PDO expects get_col to return
+ * a pointer to a long 
+PDO::PARAM_INT, 1
+
+/* get_col ptr should point to start of the string buffer 
+PDO::PARAM_STR, 2
+
+/* get_col: when len is 0 ptr should point to a php_stream *,
+ * otherwise it should behave like a string. Indicate a NULL field
+ * value by setting the ptr to NULL 
+PDO::PARAM_LOB, 3
+
+/* get_col: will expect the ptr to point to a new PDOStatement object handle,
+ * but this isn't wired up yet 
+PDO::PARAM_STMT, 4 /* hierarchical result set 
+
+/* get_col ptr should point to a zend_bool 
+PDO::PARAM_BOOL, 5
+
+
+/* magic flag to denote a parameter as being input/output 
+PDO::PARAM_INPUT_OUTPUT = 0x80000000
+};
+*/
+	
+function adodb_pdo_type($t)
+{
+	switch($t) {
+	case 2: return 'VARCHAR';
+	case 3: return 'BLOB';
+	default: return 'NUMERIC';
+	}
+}
+	 
+/*--------------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------*/
+
+////////////////////////////////////////////////
+
+
+
+class ADODB_pdo_base extends ADODB_pdo {
+
+	var $sysDate = "'?'";
+	var $sysTimeStamp = "'?'";
+	
+
+	function _init($parentDriver)
+	{
+		$parentDriver->_bindInputArray = true;
+		#$parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true);
+	}
+	
+	function ServerInfo()
+	{
+		return ADOConnection::ServerInfo();
+	}
+	
+	function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
+	{
+		$ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+		return $ret;
+	}
+	
+	function MetaTables()
+	{
+		return false;
+	}
+	
+	function MetaColumns()
+	{
+		return false;
+	}
+}
+
+
+class ADODB_pdo extends ADOConnection {
+	var $databaseType = "pdo";	
+	var $dataProvider = "pdo";
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d, h:i:sA'";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $hasAffectedRows = true;
+	var $_bindInputArray = true;	
+	var $_genSeqSQL = "create table %s (id integer)";
+	var $_autocommit = true;
+	var $_haserrorfunctions = true;
+	var $_lastAffectedRows = 0;
+	
+	var $_errormsg = false;
+	var $_errorno = false;
+	
+	var $dsnType = '';
+	var $stmt = false;
+	
+	function ADODB_pdo()
+	{
+	}
+	
+	function _UpdatePDO()
+	{
+		$d = &$this->_driver;
+		$this->fmtDate = $d->fmtDate;
+		$this->fmtTimeStamp = $d->fmtTimeStamp;
+		$this->replaceQuote = $d->replaceQuote;
+		$this->sysDate = $d->sysDate;
+		$this->sysTimeStamp = $d->sysTimeStamp;
+		$this->random = $d->random;
+		$this->concat_operator = $d->concat_operator;
+		$this->nameQuote = $d->nameQuote;
+				
+		$this->hasGenID = $d->hasGenID;
+		$this->_genIDSQL = $d->_genIDSQL;
+		$this->_genSeqSQL = $d->_genSeqSQL;
+		$this->_dropSeqSQL = $d->_dropSeqSQL;
+
+		$d->_init($this);
+	}
+	
+	function Time()
+	{
+		if (!empty($this->_driver->_hasdual)) $sql = "select $this->sysTimeStamp from dual";
+		else $sql = "select $this->sysTimeStamp";
+		
+		$rs =& $this->_Execute($sql);
+		if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields));
+		
+		return false;
+	}
+	
+	// returns true or false
+	function _connect($argDSN, $argUsername, $argPassword, $argDatabasename, $persist=false)
+	{
+		$at = strpos($argDSN,':');
+		$this->dsnType = substr($argDSN,0,$at);
+
+		if ($argDatabasename) {
+			$argDSN .= ';dbname='.$argDatabasename;
+		}
+		try {
+			$this->_connectionID = new PDO($argDSN, $argUsername, $argPassword);
+		} catch (Exception $e) {
+			$this->_connectionID = false;
+			$this->_errorno = -1;
+			//var_dump($e);
+			$this->_errormsg = 'Connection attempt failed: '.$e->getMessage();
+			return false;
+		}
+		
+		if ($this->_connectionID) {
+			switch(ADODB_ASSOC_CASE){
+			case 0: $m = PDO::CASE_LOWER; break;
+			case 1: $m = PDO::CASE_UPPER; break;
+			default:
+			case 2: $m = PDO::CASE_NATURAL; break;
+			}
+			
+			//$this->_connectionID->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_SILENT );
+			$this->_connectionID->setAttribute(PDO::ATTR_CASE,$m);
+			
+			$class = 'ADODB_pdo_'.$this->dsnType;
+			//$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true);
+			switch($this->dsnType) {
+			case 'oci':
+			case 'mysql':
+			case 'pgsql':
+			case 'mssql':
+				include_once(ADODB_DIR.'/drivers/adodb-pdo_'.$this->dsnType.'.inc.php');
+				break;
+			}
+			if (class_exists($class))
+				$this->_driver = new $class();
+			else
+				$this->_driver = new ADODB_pdo_base();
+			
+			$this->_driver->_connectionID = $this->_connectionID;
+			$this->_UpdatePDO();
+			return true;
+		}
+		$this->_driver = new ADODB_pdo_base();
+		return false;
+	}
+	
+	// returns true or false
+	function _pconnect($argDSN, $argUsername, $argPassword, $argDatabasename)
+	{
+		return $this->_connect($argDSN, $argUsername, $argPassword, $argDatabasename, true);
+	}
+	
+	/*------------------------------------------------------------------------------*/
+	
+	
+	function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+	{	
+		$save = $this->_driver->fetchMode;
+		$this->_driver->fetchMode = $this->fetchMode;
+	 	$this->_driver->debug = $this->debug;
+		$ret = $this->_driver->SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+		$this->_driver->fetchMode = $save;
+		return $ret;
+	}
+	
+	
+	function ServerInfo()
+	{
+		return $this->_driver->ServerInfo();
+	}
+	
+	function MetaTables($ttype=false,$showSchema=false,$mask=false)
+	{
+		return $this->_driver->MetaTables($ttype,$showSchema,$mask);
+	}
+	
+	function MetaColumns($table,$normalize=true)
+	{
+		return $this->_driver->MetaColumns($table,$normalize);
+	}
+	
+	function InParameter(&$stmt,&$var,$name,$maxLen=4000,$type=false)
+	{
+		$obj = $stmt[1];
+		if ($type) $obj->bindParam($name,$var,$type,$maxLen);
+		else $obj->bindParam($name, $var);
+	}
+	
+	
+	function ErrorMsg()
+	{
+		if ($this->_errormsg !== false) return $this->_errormsg;
+		if (!empty($this->_stmt)) $arr = $this->_stmt->errorInfo();
+		else if (!empty($this->_connectionID)) $arr = $this->_connectionID->errorInfo();
+		else return 'No Connection Established';
+		
+		
+		if ($arr) {
+		 	if (sizeof($arr)<2) return '';
+			if ((integer)$arr[1]) return $arr[2];
+			else return '';
+		} else return '-1';
+	}
+	
+
+	function ErrorNo()
+	{
+		if ($this->_errorno !== false) return $this->_errorno;
+		if (!empty($this->_stmt)) $err = $this->_stmt->errorCode();
+		else if (!empty($this->_connectionID)) {
+			$arr = $this->_connectionID->errorInfo();
+			if (isset($arr[0])) $err = $arr[0];
+			else $err = -1;
+		} else
+			return 0;
+			
+		if ($err == '00000') return 0; // allows empty check
+		return $err;
+	}
+
+	function BeginTrans()
+	{	
+		if (!$this->hasTransactions) return false;
+		if ($this->transOff) return true; 
+		$this->transCnt += 1;
+		$this->_autocommit = false;
+		$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,false);
+		return $this->_connectionID->beginTransaction();
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if (!$this->hasTransactions) return false;
+		if ($this->transOff) return true; 
+		if (!$ok) return $this->RollbackTrans();
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->_autocommit = true;
+		
+		$ret = $this->_connectionID->commit();
+		$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true);
+		return $ret;
+	}
+	
+	function RollbackTrans()
+	{
+		if (!$this->hasTransactions) return false;
+		if ($this->transOff) return true; 
+		if ($this->transCnt) $this->transCnt -= 1;
+		$this->_autocommit = true;
+		
+		$ret = $this->_connectionID->rollback();
+		$this->_connectionID->setAttribute(PDO::ATTR_AUTOCOMMIT,true);
+		return $ret;
+	}
+	
+	function Prepare($sql)
+	{
+		$this->_stmt = $this->_connectionID->prepare($sql);
+		if ($this->_stmt) return array($sql,$this->_stmt);
+		
+		return false;
+	}
+	
+	function PrepareStmt($sql)
+	{
+		$stmt = $this->_connectionID->prepare($sql);
+		if (!$stmt) return false;
+		$obj = new ADOPDOStatement($stmt,$this);
+		return $obj;
+	}
+	
+	
+	/* returns queryID or false */
+	function _query($sql,$inputarr=false) 
+	{
+		if (is_array($sql)) {
+			$stmt = $sql[1];
+		} else {
+			$stmt = $this->_connectionID->prepare($sql);
+		}
+		#adodb_backtrace();
+		#var_dump($this->_bindInputArray);
+		if ($stmt) {
+			$this->_driver->debug = $this->debug;
+			if ($inputarr) $ok = $stmt->execute($inputarr);
+			else $ok = $stmt->execute();
+		} 
+		
+		
+		$this->_errormsg = false;
+		$this->_errorno = false;
+			
+		if ($ok) {
+			$this->_stmt = $stmt;
+			return $stmt;
+		}
+		
+		if ($stmt) {
+			
+			$arr = $stmt->errorinfo();
+			if ((integer)$arr[1]) {
+				$this->_errormsg = $arr[2];
+				$this->_errorno = $arr[1];
+			}
+
+		} else {
+			$this->_errormsg = false;
+			$this->_errorno = false;
+		}
+		return false;
+	}
+
+	// returns true or false
+	function _close()
+	{
+		$this->_stmt = false;
+		return true;
+	}
+
+	function _affectedrows()
+	{
+		return ($this->_stmt) ? $this->_stmt->rowCount() : 0;
+	}
+	
+	function _insertid()
+	{
+		return ($this->_connectionID) ? $this->_connectionID->lastInsertId() : 0;
+	}
+}
+
+class ADOPDOStatement {
+
+	var $databaseType = "pdo";		
+	var $dataProvider = "pdo";
+	var $_stmt;
+	var $_connectionID;
+	
+	function ADOPDOStatement($stmt,$connection)
+	{
+		$this->_stmt = $stmt;
+		$this->_connectionID = $connection;
+	}
+	
+	function Execute($inputArr=false)
+	{
+		$savestmt = $this->_connectionID->_stmt;
+		$rs = $this->_connectionID->Execute(array(false,$this->_stmt),$inputArr);
+		$this->_connectionID->_stmt = $savestmt;
+		return $rs;
+	}
+	
+	function InParameter(&$var,$name,$maxLen=4000,$type=false)
+	{
+
+		if ($type) $this->_stmt->bindParam($name,$var,$type,$maxLen);
+		else $this->_stmt->bindParam($name, $var);
+	}
+	
+	function Affected_Rows()
+	{
+		return ($this->_stmt) ? $this->_stmt->rowCount() : 0;
+	}
+	
+	function ErrorMsg()
+	{
+		if ($this->_stmt) $arr = $this->_stmt->errorInfo();
+		else $arr = $this->_connectionID->errorInfo();
+
+		if (is_array($arr)) {
+			if ((integer) $arr[0] && isset($arr[2])) return $arr[2];
+			else return '';
+		} else return '-1';
+	}
+	
+	function NumCols()
+	{
+		return ($this->_stmt) ? $this->_stmt->columnCount() : 0;
+	}
+	
+	function ErrorNo()
+	{
+		if ($this->_stmt) return $this->_stmt->errorCode();
+		else return $this->_connectionID->errorInfo();
+	}
+}
+
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_pdo extends ADORecordSet {	
+	
+	var $bind = false;
+	var $databaseType = "pdo";		
+	var $dataProvider = "pdo";
+	
+	function ADORecordSet_pdo($id,$mode=false)
+	{
+		if ($mode === false) {  
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		$this->adodbFetchMode = $mode;
+		switch($mode) {
+		case ADODB_FETCH_NUM: $mode = PDO::FETCH_NUM; break;
+		case ADODB_FETCH_ASSOC:  $mode = PDO::FETCH_ASSOC; break;
+		
+		case ADODB_FETCH_BOTH: 
+		default: $mode = PDO::FETCH_BOTH; break;
+		}
+		$this->fetchMode = $mode;
+		
+		$this->_queryID = $id;
+		$this->ADORecordSet($id);
+	}
+
+	
+	function Init()
+	{
+		if ($this->_inited) return;
+		$this->_inited = true;
+		if ($this->_queryID) @$this->_initrs();
+		else {
+			$this->_numOfRows = 0;
+			$this->_numOfFields = 0;
+		}
+		if ($this->_numOfRows != 0 && $this->_currentRow == -1) {
+			$this->_currentRow = 0;
+			if ($this->EOF = ($this->_fetch() === false)) {
+				$this->_numOfRows = 0; // _numOfRows could be -1
+			}
+		} else {
+			$this->EOF = true;
+		}
+	}
+	
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+	
+		$this->_numOfRows = ($ADODB_COUNTRECS) ? @$this->_queryID->rowCount() : -1;
+		if (!$this->_numOfRows) $this->_numOfRows = -1;
+		$this->_numOfFields = $this->_queryID->columnCount();
+	}
+
+	// returns the field object
+	function &FetchField($fieldOffset = -1) 
+	{
+		$off=$fieldOffset+1; // offsets begin at 1
+		
+		$o= new ADOFieldObject();
+		$arr = @$this->_queryID->getColumnMeta($fieldOffset);
+		if (!$arr) {
+			$o->name = 'bad getColumnMeta()';
+			$o->max_length = -1;
+			$o->type = 'VARCHAR';
+			$o->precision = 0;
+	#		$false = false;
+			return $o;
+		}
+		//adodb_pr($arr);
+		$o->name = $arr['name'];
+		if (isset($arr['native_type']) && $arr['native_type'] <> "null") $o->type = $arr['native_type'];
+		else $o->type = adodb_pdo_type($arr['pdo_type']);
+		$o->max_length = $arr['len'];
+		$o->precision = $arr['precision'];
+		
+		if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
+		else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
+		return $o;
+	}
+	
+	function _seek($row)
+	{
+		return false;
+	}
+	
+	function _fetch()
+	{
+		if (!$this->_queryID) return false;
+		
+		$this->fields = $this->_queryID->fetch($this->fetchMode);
+		return !empty($this->fields);
+	}
+	
+	function _close() 
+	{
+		$this->_queryID = false;
+	}
+	
+	function Fields($colname)
+	{
+		if ($this->adodbFetchMode != ADODB_FETCH_NUM) return @$this->fields[$colname];
+		
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_mssql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_mssql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_mssql.inc.php	(revision 225)
@@ -0,0 +1,61 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+ 
+*/ 
+
+class ADODB_pdo_mssql extends ADODB_pdo {
+	
+	var $hasTop = 'top';
+	var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
+	var $sysTimeStamp = 'GetDate()';
+	
+	
+	function _init($parentDriver)
+	{
+	
+		$parentDriver->hasTransactions = false; ## <<< BUG IN PDO mssql driver
+		$parentDriver->_bindInputArray = false;
+		$parentDriver->hasInsertID = true;
+	}
+	
+	function ServerInfo()
+	{
+		return ADOConnection::ServerInfo();
+	}
+	
+	function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
+	{
+		$ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+		return $ret;
+	}
+	
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET TRANSACTION ".$transaction_mode);
+	}
+	
+	function MetaTables()
+	{
+		return false;
+	}
+	
+	function MetaColumns()
+	{
+		return false;
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_mysql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_mysql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_mysql.inc.php	(revision 225)
@@ -0,0 +1,168 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+ 
+*/ 
+
+class ADODB_pdo_mysql extends ADODB_pdo {
+	var $metaTablesSQL = "SHOW TABLES";	
+	var $metaColumnsSQL = "SHOW COLUMNS FROM `%s`";
+	var $sysDate = 'CURDATE()';
+	var $sysTimeStamp = 'NOW()';
+	var $nameQuote = '`';
+
+	function _init($parentDriver)
+	{
+	
+		$parentDriver->hasTransactions = false;
+		$parentDriver->_bindInputArray = false;
+		$parentDriver->hasInsertID = true;
+		$parentDriver->_connectionID->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true);
+	}
+	
+		// dayFraction is a day in floating point
+	function OffsetDate($dayFraction,$date=false)
+	{		
+		if (!$date) $date = $this->sysDate;
+		
+		$fraction = $dayFraction * 24 * 3600;
+		return $date . ' + INTERVAL ' .	 $fraction.' SECOND';
+		
+//		return "from_unixtime(unix_timestamp($date)+$fraction)";
+	}
+	
+	function ServerInfo()
+	{
+		$arr['description'] = ADOConnection::GetOne("select version()");
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{	
+		$save = $this->metaTablesSQL;
+		if ($showSchema && is_string($showSchema)) {
+			$this->metaTablesSQL .= " from $showSchema";
+		}
+		
+		if ($mask) {
+			$mask = $this->qstr($mask);
+			$this->metaTablesSQL .= " like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		$this->metaTablesSQL = $save;
+		return $ret;
+	}
+	
+	function SetTransactionMode( $transaction_mode ) 
+	{
+		$this->_transmode  = $transaction_mode;
+		if (empty($transaction_mode)) {
+			$this->Execute('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ');
+			return;
+		}
+		if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
+		$this->Execute("SET SESSION TRANSACTION ".$transaction_mode);
+	}
+	
+ 	function &MetaColumns($table) 
+	{
+		$this->_findschema($table,$schema);
+		if ($schema) {
+			$dbName = $this->database;
+			$this->SelectDB($schema);
+		}
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+		
+		if ($schema) {
+			$this->SelectDB($dbName);
+		}
+		
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		if (!is_object($rs)) {
+			$false = false;
+			return $false;
+		}
+			
+		$retarr = array();
+		while (!$rs->EOF){
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			$type = $rs->fields[1];
+			
+			// split type into type(length):
+			$fld->scale = null;
+			if (preg_match("/^(.+)\((\d+),(\d+)/", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
+				$fld->scale = is_numeric($query_array[3]) ? $query_array[3] : -1;
+			} elseif (preg_match("/^(.+)\((\d+)/", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$fld->max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;
+			} elseif (preg_match("/^(enum)\((.*)\)$/i", $type, $query_array)) {
+				$fld->type = $query_array[1];
+				$arr = explode(",",$query_array[2]);
+				$fld->enums = $arr;
+				$zlen = max(array_map("strlen",$arr)) - 2; // PHP >= 4.0.6
+				$fld->max_length = ($zlen > 0) ? $zlen : 1;
+			} else {
+				$fld->type = $type;
+				$fld->max_length = -1;
+			}
+			$fld->not_null = ($rs->fields[2] != 'YES');
+			$fld->primary_key = ($rs->fields[3] == 'PRI');
+			$fld->auto_increment = (strpos($rs->fields[5], 'auto_increment') !== false);
+			$fld->binary = (strpos($type,'blob') !== false);
+			$fld->unsigned = (strpos($type,'unsigned') !== false);
+				
+			if (!$fld->binary) {
+				$d = $rs->fields[4];
+				if ($d != '' && $d != 'NULL') {
+					$fld->has_default = true;
+					$fld->default_value = $d;
+				} else {
+					$fld->has_default = false;
+				}
+			}
+			
+			if ($save == ADODB_FETCH_NUM) {
+				$retarr[] = $fld;
+			} else {
+				$retarr[strtoupper($fld->name)] = $fld;
+			}
+				$rs->MoveNext();
+			}
+		
+			$rs->Close();
+			return $retarr;	
+	}
+		
+	
+	// parameters use PostgreSQL convention, not MySQL
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs=0)
+	{
+		$offsetStr =($offset>=0) ? "$offset," : '';
+		// jason judge, see http://phplens.com/lens/lensforum/msgs.php?id=9220
+		if ($nrows < 0) $nrows = '18446744073709551615'; 
+		
+		if ($secs)
+			$rs =& $this->CacheExecute($secs,$sql." LIMIT $offsetStr$nrows",$inputarr);
+		else
+			$rs =& $this->Execute($sql." LIMIT $offsetStr$nrows",$inputarr);
+		return $rs;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_oci.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_oci.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_oci.inc.php	(revision 225)
@@ -0,0 +1,93 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+ 
+*/ 
+
+class ADODB_pdo_oci extends ADODB_pdo_base {
+
+	var $concat_operator='||';
+	var $sysDate = "TRUNC(SYSDATE)";
+	var $sysTimeStamp = 'SYSDATE';
+	var $NLS_DATE_FORMAT = 'YYYY-MM-DD';  // To include time, use 'RRRR-MM-DD HH24:MI:SS'
+	var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)";
+	var $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW')";
+	var $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; 
+		
+ 	var $_initdate = true;
+	var $_hasdual = true;
+	
+	function _init($parentDriver)
+	{
+		$parentDriver->_bindInputArray = true;
+		$parentDriver->_nestedSQL = true;
+		if ($this->_initdate) {
+			$parentDriver->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'");
+		}
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+		if ($mask) {
+			$save = $this->metaTablesSQL;
+			$mask = $this->qstr(strtoupper($mask));
+			$this->metaTablesSQL .= " AND table_name like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		if ($mask) {
+			$this->metaTablesSQL = $save;
+		}
+		return $ret;
+	}
+	
+	function &MetaColumns($table) 
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$false = false;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		
+		$rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
+		
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		if (!$rs) {
+			return $false;
+		}
+		$retarr = array();
+		while (!$rs->EOF) { //print_r($rs->fields);
+			$fld = new ADOFieldObject();
+	   		$fld->name = $rs->fields[0];
+	   		$fld->type = $rs->fields[1];
+	   		$fld->max_length = $rs->fields[2];
+			$fld->scale = $rs->fields[3];
+			if ($rs->fields[1] == 'NUMBER' && $rs->fields[3] == 0) {
+				$fld->type ='INT';
+	     		$fld->max_length = $rs->fields[4];
+	    	}	
+		   	$fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0);
+			$fld->binary = (strpos($fld->type,'BLOB') !== false);
+			$fld->default_value = $rs->fields[6];
+			
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[strtoupper($fld->name)] = $fld;
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		if (empty($retarr))
+			return  $false;
+		else 
+			return $retarr;
+	}
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_pgsql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_pgsql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-pdo_pgsql.inc.php	(revision 225)
@@ -0,0 +1,230 @@
+<?php
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+ 
+*/ 
+
+class ADODB_pdo_pgsql extends ADODB_pdo {
+	var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1";
+    var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
+	and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
+	 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') 
+	union 
+        select viewname,'V' from pg_views where viewname not like 'pg\_%'";
+	//"select tablename from pg_tables where tablename not like 'pg_%' order by 1";
+	var $isoDates = true; // accepts dates in ISO format
+	var $sysDate = "CURRENT_DATE";
+	var $sysTimeStamp = "CURRENT_TIMESTAMP";
+	var $blobEncodeType = 'C';
+	var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum 
+		FROM pg_class c, pg_attribute a,pg_type t 
+		WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%'
+AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
+
+	// used when schema defined
+	var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum 
+FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n 
+WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
+ and c.relnamespace=n.oid and n.nspname='%s' 
+	and a.attname not like '....%%' AND a.attnum > 0 
+	AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
+	
+	// get primary key etc -- from Freek Dijkstra
+	var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key 
+	FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'";
+	
+	var $hasAffectedRows = true;
+	var $hasLimit = false;	// set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10
+	// below suggested by Freek Dijkstra 
+	var $true = 't';		// string that represents TRUE for a database
+	var $false = 'f';		// string that represents FALSE for a database
+	var $fmtDate = "'Y-m-d'";	// used by DBDate() as the default date format used by the database
+	var $fmtTimeStamp = "'Y-m-d G:i:s'"; // used by DBTimeStamp as the default timestamp fmt.
+	var $hasMoveFirst = true;
+	var $hasGenID = true;
+	var $_genIDSQL = "SELECT NEXTVAL('%s')";
+	var $_genSeqSQL = "CREATE SEQUENCE %s START %s";
+	var $_dropSeqSQL = "DROP SEQUENCE %s";
+	var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum";
+	var $random = 'random()';		/// random function
+	var $concat_operator='||';
+	
+	function _init($parentDriver)
+	{
+	
+		$parentDriver->hasTransactions = false; ## <<< BUG IN PDO pgsql driver
+		$parentDriver->hasInsertID = true;
+		$parentDriver->_nestedSQL = true;
+	}
+	
+	function ServerInfo()
+	{
+		$arr['description'] = ADOConnection::GetOne("select version()");
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		return $arr;
+	}
+	
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+	{
+		 $offsetStr = ($offset >= 0) ? " OFFSET $offset" : '';
+		 $limitStr  = ($nrows >= 0)  ? " LIMIT $nrows" : '';
+		 if ($secs2cache)
+		  	$rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
+		 else
+		  	$rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr);
+		
+		return $rs;
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+		$info = $this->ServerInfo();
+		if ($info['version'] >= 7.3) {
+	    	$this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
+			  and schemaname  not in ( 'pg_catalog','information_schema')
+	union 
+        select viewname,'V' from pg_views where viewname not like 'pg\_%'  and schemaname  not in ( 'pg_catalog','information_schema') ";
+		}
+		if ($mask) {
+			$save = $this->metaTablesSQL;
+			$mask = $this->qstr(strtolower($mask));
+			if ($info['version']>=7.3)
+				$this->metaTablesSQL = "
+select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')  
+ union 
+select viewname,'V' from pg_views where viewname like $mask and schemaname  not in ( 'pg_catalog','information_schema')  ";
+			else
+				$this->metaTablesSQL = "
+select tablename,'T' from pg_tables where tablename like $mask 
+ union 
+select viewname,'V' from pg_views where viewname like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		if ($mask) {
+			$this->metaTablesSQL = $save;
+		}
+		return $ret;
+	}
+	
+	function &MetaColumns($table,$normalize=true) 
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$schema = false;
+		$this->_findschema($table,$schema);
+		
+		if ($normalize) $table = strtolower($table);
+
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		
+		if ($schema) $rs =& $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema));
+		else $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table));
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if ($rs === false) {
+			$false = false;
+			return $false;
+		}
+		if (!empty($this->metaKeySQL)) {
+			// If we want the primary keys, we have to issue a separate query
+			// Of course, a modified version of the metaColumnsSQL query using a 
+			// LEFT JOIN would have been much more elegant, but postgres does 
+			// not support OUTER JOINS. So here is the clumsy way.
+			
+			$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+			
+			$rskey = $this->Execute(sprintf($this->metaKeySQL,($table)));
+			// fetch all result in once for performance.
+			$keys =& $rskey->GetArray();
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			
+			$rskey->Close();
+			unset($rskey);
+		}
+
+		$rsdefa = array();
+		if (!empty($this->metaDefaultsSQL)) {
+			$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+			$sql = sprintf($this->metaDefaultsSQL, ($table));
+			$rsdef = $this->Execute($sql);
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			
+			if ($rsdef) {
+				while (!$rsdef->EOF) {
+					$num = $rsdef->fields['num'];
+					$s = $rsdef->fields['def'];
+					if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */
+						$s = substr($s, 1);
+						$s = substr($s, 0, strlen($s) - 1);
+					}
+
+					$rsdefa[$num] = $s;
+					$rsdef->MoveNext();
+				}
+			} else {
+				ADOConnection::outp( "==> SQL => " . $sql);
+			}
+			unset($rsdef);
+		}
+	
+		$retarr = array();
+		while (!$rs->EOF) { 	
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			$fld->type = $rs->fields[1];
+			$fld->max_length = $rs->fields[2];
+			if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4;
+			if ($fld->max_length <= 0) $fld->max_length = -1;
+			if ($fld->type == 'numeric') {
+				$fld->scale = $fld->max_length & 0xFFFF;
+				$fld->max_length >>= 16;
+			}
+			// dannym
+			// 5 hasdefault; 6 num-of-column
+			$fld->has_default = ($rs->fields[5] == 't');
+			if ($fld->has_default) {
+				$fld->default_value = $rsdefa[$rs->fields[6]];
+			}
+
+			//Freek
+			if ($rs->fields[4] == $this->true) {
+				$fld->not_null = true;
+			}
+			
+			// Freek
+			if (is_array($keys)) {
+				foreach($keys as $key) {
+					if ($fld->name == $key['column_name'] AND $key['primary_key'] == $this->true) 
+						$fld->primary_key = true;
+					if ($fld->name == $key['column_name'] AND $key['unique_key'] == $this->true) 
+						$fld->unique = true; // What name is more compatible?
+				}
+			}
+			
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld;
+			
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		if (empty($retarr)) {
+			$false = false;
+			return $false;
+		} else return $retarr;	
+		
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres.inc.php	(revision 225)
@@ -0,0 +1,14 @@
+<?php
+/*
+ V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 4.
+  
+  NOTE: Since 3.31, this file is no longer used, and the "postgres" driver is
+  remapped to "postgres7". Maintaining multiple postgres drivers is no easy
+  job, so hopefully this will ensure greater consistency and fewer bugs.
+*/
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres64.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres64.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres64.inc.php	(revision 225)
@@ -0,0 +1,1064 @@
+<?php
+/*
+ V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+  
+  Original version derived from Alberto Cerezal (acerezalp@dbnet.es) - DBNet Informatica & Comunicaciones. 
+  08 Nov 2000 jlim - Minor corrections, removing mysql stuff
+  09 Nov 2000 jlim - added insertid support suggested by "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
+					jlim - changed concat operator to || and data types to MetaType to match documented pgsql types 
+		 	see http://www.postgresql.org/devel-corner/docs/postgres/datatype.htm  
+  22 Nov 2000 jlim - added changes to FetchField() and MetaTables() contributed by "raser" <raser@mail.zen.com.tw>
+  27 Nov 2000 jlim - added changes to _connect/_pconnect from ideas by "Lennie" <leen@wirehub.nl>
+  15 Dec 2000 jlim - added changes suggested by Additional code changes by "Eric G. Werk" egw@netguide.dk. 
+  31 Jan 2002 jlim - finally installed postgresql. testing
+  01 Mar 2001 jlim - Freek Dijkstra changes, also support for text type
+  
+  See http://www.varlena.com/varlena/GeneralBits/47.php
+  
+	-- What indexes are on my table?
+	select * from pg_indexes where tablename = 'tablename';
+	
+	-- What triggers are on my table?
+	select c.relname as "Table", t.tgname as "Trigger Name", 
+	   t.tgconstrname as "Constraint Name", t.tgenabled as "Enabled",
+	   t.tgisconstraint as "Is Constraint", cc.relname as "Referenced Table",
+	   p.proname as "Function Name"
+	from pg_trigger t, pg_class c, pg_class cc, pg_proc p
+	where t.tgfoid = p.oid and t.tgrelid = c.oid
+	   and t.tgconstrrelid = cc.oid
+	   and c.relname = 'tablename';
+	
+	-- What constraints are on my table?
+	select r.relname as "Table", c.conname as "Constraint Name",
+	   contype as "Constraint Type", conkey as "Key Columns",
+	   confkey as "Foreign Columns", consrc as "Source"
+	from pg_class r, pg_constraint c
+	where r.oid = c.conrelid
+	   and relname = 'tablename';
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+function adodb_addslashes($s)
+{
+	$len = strlen($s);
+	if ($len == 0) return "''";
+	if (strncmp($s,"'",1) === 0 && substr($s,$len-1) == "'") return $s; // already quoted
+	
+	return "'".addslashes($s)."'";
+}
+
+class ADODB_postgres64 extends ADOConnection{
+	var $databaseType = 'postgres64';
+	var $dataProvider = 'postgres';
+	var $hasInsertID = true;
+	var $_resultid = false;
+  	var $concat_operator='||';
+	var $metaDatabasesSQL = "select datname from pg_database where datname not in ('template0','template1') order by 1";
+    var $metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
+	and tablename not in ('sql_features', 'sql_implementation_info', 'sql_languages',
+	 'sql_packages', 'sql_sizing', 'sql_sizing_profiles') 
+	union 
+        select viewname,'V' from pg_views where viewname not like 'pg\_%'";
+	//"select tablename from pg_tables where tablename not like 'pg_%' order by 1";
+	var $isoDates = true; // accepts dates in ISO format
+	var $sysDate = "CURRENT_DATE";
+	var $sysTimeStamp = "CURRENT_TIMESTAMP";
+	var $blobEncodeType = 'C';
+	var $metaColumnsSQL = "SELECT a.attname,t.typname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum 
+		FROM pg_class c, pg_attribute a,pg_type t 
+		WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s')) and a.attname not like '....%%'
+AND a.attnum > 0 AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
+
+	// used when schema defined
+	var $metaColumnsSQL1 = "SELECT a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum 
+FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n 
+WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
+ and c.relnamespace=n.oid and n.nspname='%s' 
+	and a.attname not like '....%%' AND a.attnum > 0 
+	AND a.atttypid = t.oid AND a.attrelid = c.oid ORDER BY a.attnum";
+	
+	// get primary key etc -- from Freek Dijkstra
+	var $metaKeySQL = "SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key 
+	FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = '%s'";
+	
+	var $hasAffectedRows = true;
+	var $hasLimit = false;	// set to true for pgsql 7 only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10
+	// below suggested by Freek Dijkstra 
+	var $true = 'TRUE';		// string that represents TRUE for a database
+	var $false = 'FALSE';		// string that represents FALSE for a database
+	var $fmtDate = "'Y-m-d'";	// used by DBDate() as the default date format used by the database
+	var $fmtTimeStamp = "'Y-m-d H:i:s'"; // used by DBTimeStamp as the default timestamp fmt.
+	var $hasMoveFirst = true;
+	var $hasGenID = true;
+	var $_genIDSQL = "SELECT NEXTVAL('%s')";
+	var $_genSeqSQL = "CREATE SEQUENCE %s START %s";
+	var $_dropSeqSQL = "DROP SEQUENCE %s";
+	var $metaDefaultsSQL = "SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname='%s' order by d.adnum";
+	var $random = 'random()';		/// random function
+	var $autoRollback = true; // apparently pgsql does not autorollback properly before php 4.3.4
+							// http://bugs.php.net/bug.php?id=25404
+							
+	var $_bindInputArray = false; // requires postgresql 7.3+ and ability to modify database
+	var $disableBlobs = false; // set to true to disable blob checking, resulting in 2-5% improvement in performance.
+	
+	// The last (fmtTimeStamp is not entirely correct: 
+	// PostgreSQL also has support for time zones, 
+	// and writes these time in this format: "2001-03-01 18:59:26+02". 
+	// There is no code for the "+02" time zone information, so I just left that out. 
+	// I'm not familiar enough with both ADODB as well as Postgres 
+	// to know what the concequences are. The other values are correct (wheren't in 0.94)
+	// -- Freek Dijkstra 
+
+	function ADODB_postgres64() 
+	{
+	// changes the metaColumnsSQL, adds columns: attnum[6]
+	}
+	
+	function ServerInfo()
+	{
+		if (isset($this->version)) return $this->version;
+		
+		$arr['description'] = $this->GetOne("select version()");
+		$arr['version'] = ADOConnection::_findvers($arr['description']);
+		$this->version = $arr;
+		return $arr;
+	}
+
+	function IfNull( $field, $ifNull ) 
+	{
+		return " coalesce($field, $ifNull) "; 
+	}
+
+	// get the last id - never tested
+	function pg_insert_id($tablename,$fieldname)
+	{
+		$result=pg_exec($this->_connectionID, "SELECT last_value FROM ${tablename}_${fieldname}_seq");
+		if ($result) {
+			$arr = @pg_fetch_row($result,0);
+			pg_freeresult($result);
+			if (isset($arr[0])) return $arr[0];
+		}
+		return false;
+	}
+	
+/* Warning from http://www.php.net/manual/function.pg-getlastoid.php:
+Using a OID as a unique identifier is not generally wise. 
+Unless you are very careful, you might end up with a tuple having 
+a different OID if a database must be reloaded. */
+	function _insertid($table,$column)
+	{
+		if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false;
+		$oid = pg_getlastoid($this->_resultid);
+		// to really return the id, we need the table and column-name, else we can only return the oid != id
+		return empty($table) || empty($column) ? $oid : $this->GetOne("SELECT $column FROM $table WHERE oid=".(int)$oid);
+	}
+
+// I get this error with PHP before 4.0.6 - jlim
+// Warning: This compilation does not support pg_cmdtuples() in adodb-postgres.inc.php on line 44
+   function _affectedrows()
+   {
+   		if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false;
+	   	return pg_cmdtuples($this->_resultid);
+   }
+   
+	
+		// returns true/false
+	function BeginTrans()
+	{
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		return @pg_Exec($this->_connectionID, "begin ".$this->_transmode);
+	}
+	
+	function RowLock($tables,$where,$flds='1 as ignore') 
+	{
+		if (!$this->transCnt) $this->BeginTrans();
+		return $this->GetOne("select $flds from $tables where $where for update");
+	}
+
+	// returns true/false. 
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true;
+		if (!$ok) return $this->RollbackTrans();
+		
+		$this->transCnt -= 1;
+		return @pg_Exec($this->_connectionID, "commit");
+	}
+	
+	// returns true/false
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		$this->transCnt -= 1;
+		return @pg_Exec($this->_connectionID, "rollback");
+	}
+	
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false) 
+	{
+		$info = $this->ServerInfo();
+		if ($info['version'] >= 7.3) {
+	    	$this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
+			  and schemaname  not in ( 'pg_catalog','information_schema')
+	union 
+        select viewname,'V' from pg_views where viewname not like 'pg\_%'  and schemaname  not in ( 'pg_catalog','information_schema') ";
+		}
+		if ($mask) {
+			$save = $this->metaTablesSQL;
+			$mask = $this->qstr(strtolower($mask));
+			if ($info['version']>=7.3)
+				$this->metaTablesSQL = "
+select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')  
+ union 
+select viewname,'V' from pg_views where viewname like $mask and schemaname  not in ( 'pg_catalog','information_schema')  ";
+			else
+				$this->metaTablesSQL = "
+select tablename,'T' from pg_tables where tablename like $mask 
+ union 
+select viewname,'V' from pg_views where viewname like $mask";
+		}
+		$ret =& ADOConnection::MetaTables($ttype,$showSchema);
+		
+		if ($mask) {
+			$this->metaTablesSQL = $save;
+		}
+		return $ret;
+	}
+	
+	
+	// if magic quotes disabled, use pg_escape_string()
+	function qstr($s,$magic_quotes=false)
+	{
+		if (!$magic_quotes) {
+			if (ADODB_PHPVER >= 0x5200) {
+				return  "'".pg_escape_string($this->_connectionID,$s)."'";
+			} 
+			if (ADODB_PHPVER >= 0x4200) {
+				return  "'".pg_escape_string($s)."'";
+			}
+			if ($this->replaceQuote[0] == '\\'){
+				$s = adodb_str_replace(array('\\',"\0"),array('\\\\',"\\\\000"),$s);
+			}
+			return  "'".str_replace("'",$this->replaceQuote,$s)."'"; 
+		}
+		
+		// undo magic quotes for "
+		$s = str_replace('\\"','"',$s);
+		return "'$s'";
+	}
+	
+	
+	
+	// Format date column in sql string given an input format that understands Y M D
+	function SQLDate($fmt, $col=false)
+	{	
+		if (!$col) $col = $this->sysTimeStamp;
+		$s = 'TO_CHAR('.$col.",'";
+		
+		$len = strlen($fmt);
+		for ($i=0; $i < $len; $i++) {
+			$ch = $fmt[$i];
+			switch($ch) {
+			case 'Y':
+			case 'y':
+				$s .= 'YYYY';
+				break;
+			case 'Q':
+			case 'q':
+				$s .= 'Q';
+				break;
+				
+			case 'M':
+				$s .= 'Mon';
+				break;
+				
+			case 'm':
+				$s .= 'MM';
+				break;
+			case 'D':
+			case 'd':
+				$s .= 'DD';
+				break;
+			
+			case 'H':
+				$s.= 'HH24';
+				break;
+				
+			case 'h':
+				$s .= 'HH';
+				break;
+				
+			case 'i':
+				$s .= 'MI';
+				break;
+			
+			case 's':
+				$s .= 'SS';
+				break;
+			
+			case 'a':
+			case 'A':
+				$s .= 'AM';
+				break;
+				
+			case 'w':
+				$s .= 'D';
+				break;
+			
+			case 'l':
+				$s .= 'DAY';
+				break;
+			
+			 case 'W':
+				$s .= 'WW';
+				break;
+
+			default:
+			// handle escape characters...
+				if ($ch == '\\') {
+					$i++;
+					$ch = substr($fmt,$i,1);
+				}
+				if (strpos('-/.:;, ',$ch) !== false) $s .= $ch;
+				else $s .= '"'.$ch.'"';
+				
+			}
+		}
+		return $s. "')";
+	}
+	
+	
+	
+	/* 
+	* Load a Large Object from a file 
+	* - the procedure stores the object id in the table and imports the object using 
+	* postgres proprietary blob handling routines 
+	*
+	* contributed by Mattia Rossi mattia@technologist.com
+	* modified for safe mode by juraj chlebec
+	*/ 
+	function UpdateBlobFile($table,$column,$path,$where,$blobtype='BLOB') 
+	{ 
+		pg_exec ($this->_connectionID, "begin"); 
+		
+		$fd = fopen($path,'r');
+		$contents = fread($fd,filesize($path));
+		fclose($fd);
+		
+		$oid = pg_lo_create($this->_connectionID);
+		$handle = pg_lo_open($this->_connectionID, $oid, 'w');
+		pg_lo_write($handle, $contents);
+		pg_lo_close($handle);
+		
+		// $oid = pg_lo_import ($path); 
+		pg_exec($this->_connectionID, "commit"); 
+		$rs = ADOConnection::UpdateBlob($table,$column,$oid,$where,$blobtype); 
+		$rez = !empty($rs); 
+		return $rez; 
+	} 
+	
+	/*
+	* Deletes/Unlinks a Blob from the database, otherwise it 
+	* will be left behind
+	*
+	* Returns TRUE on success or FALSE on failure.
+	*
+	* contributed by Todd Rogers todd#windfox.net
+	*/
+	function BlobDelete( $blob )
+	{
+		pg_exec ($this->_connectionID, "begin");
+		$result = @pg_lo_unlink($blob);
+		pg_exec ($this->_connectionID, "commit");
+		return( $result );
+	}
+
+	/*
+		Hueristic - not guaranteed to work.
+	*/
+	function GuessOID($oid)
+	{
+		if (strlen($oid)>16) return false;
+		return is_numeric($oid);
+	}
+	
+	/* 
+	* If an OID is detected, then we use pg_lo_* to open the oid file and read the
+	* real blob from the db using the oid supplied as a parameter. If you are storing
+	* blobs using bytea, we autodetect and process it so this function is not needed.
+	*
+	* contributed by Mattia Rossi mattia@technologist.com
+	*
+	* see http://www.postgresql.org/idocs/index.php?largeobjects.html
+	*
+	* Since adodb 4.54, this returns the blob, instead of sending it to stdout. Also
+	* added maxsize parameter, which defaults to $db->maxblobsize if not defined.
+	*/ 
+	function BlobDecode($blob,$maxsize=false,$hastrans=true) 
+	{
+		if (!$this->GuessOID($blob)) return $blob;
+		
+		if ($hastrans) @pg_exec($this->_connectionID,"begin"); 
+		$fd = @pg_lo_open($this->_connectionID,$blob,"r");
+		if ($fd === false) {
+			if ($hastrans) @pg_exec($this->_connectionID,"commit");
+			return $blob;
+		}
+		if (!$maxsize) $maxsize = $this->maxblobsize;
+		$realblob = @pg_loread($fd,$maxsize); 
+		@pg_loclose($fd); 
+		if ($hastrans) @pg_exec($this->_connectionID,"commit"); 
+		return $realblob;
+	}
+	
+	/* 
+		See http://www.postgresql.org/idocs/index.php?datatype-binary.html
+	 	
+		NOTE: SQL string literals (input strings) must be preceded with two backslashes 
+		due to the fact that they must pass through two parsers in the PostgreSQL 
+		backend.
+	*/
+	function BlobEncode($blob)
+	{
+		if (ADODB_PHPVER >= 0x5200) return pg_escape_bytea($this->_connectionID, $blob);
+		if (ADODB_PHPVER >= 0x4200) return pg_escape_bytea($blob);
+		
+		/*92=backslash, 0=null, 39=single-quote*/
+		$badch = array(chr(92),chr(0),chr(39)); # \  null  '
+		$fixch = array('\\\\134','\\\\000','\\\\047');
+		return adodb_str_replace($badch,$fixch,$blob);
+		
+		// note that there is a pg_escape_bytea function only for php 4.2.0 or later
+	}
+	
+	// assumes bytea for blob, and varchar for clob
+	function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
+	{
+	
+		if ($blobtype == 'CLOB') {
+    		return $this->Execute("UPDATE $table SET $column=" . $this->qstr($val) . " WHERE $where");
+		}
+		// do not use bind params which uses qstr(), as blobencode() already quotes data
+		return $this->Execute("UPDATE $table SET $column='".$this->BlobEncode($val)."'::bytea WHERE $where");
+	}
+	
+	function OffsetDate($dayFraction,$date=false)
+	{		
+		if (!$date) $date = $this->sysDate;
+		else if (strncmp($date,"'",1) == 0) {
+			$len = strlen($date);
+			if (10 <= $len && $len <= 12) $date = 'date '.$date;
+			else $date = 'timestamp '.$date;
+		}
+		return "($date+interval'$dayFraction days')";
+	}
+	
+
+	// for schema support, pass in the $table param "$schema.$tabname".
+	// converts field names to lowercase, $upper is ignored
+	// see http://phplens.com/lens/lensforum/msgs.php?id=14018 for more info
+	function &MetaColumns($table,$normalize=true) 
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$schema = false;
+		$false = false;
+		$this->_findschema($table,$schema);
+		
+		if ($normalize) $table = strtolower($table);
+
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+		
+		if ($schema) $rs =& $this->Execute(sprintf($this->metaColumnsSQL1,$table,$table,$schema));
+		else $rs =& $this->Execute(sprintf($this->metaColumnsSQL,$table,$table));
+		if (isset($savem)) $this->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if ($rs === false) {
+			return $false;
+		}
+		if (!empty($this->metaKeySQL)) {
+			// If we want the primary keys, we have to issue a separate query
+			// Of course, a modified version of the metaColumnsSQL query using a 
+			// LEFT JOIN would have been much more elegant, but postgres does 
+			// not support OUTER JOINS. So here is the clumsy way.
+			
+			$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+			
+			$rskey = $this->Execute(sprintf($this->metaKeySQL,($table)));
+			// fetch all result in once for performance.
+			$keys =& $rskey->GetArray();
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			
+			$rskey->Close();
+			unset($rskey);
+		}
+
+		$rsdefa = array();
+		if (!empty($this->metaDefaultsSQL)) {
+			$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+			$sql = sprintf($this->metaDefaultsSQL, ($table));
+			$rsdef = $this->Execute($sql);
+			if (isset($savem)) $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+			
+			if ($rsdef) {
+				while (!$rsdef->EOF) {
+					$num = $rsdef->fields['num'];
+					$s = $rsdef->fields['def'];
+					if (strpos($s,'::')===false && substr($s, 0, 1) == "'") { /* quoted strings hack... for now... fixme */
+						$s = substr($s, 1);
+						$s = substr($s, 0, strlen($s) - 1);
+					}
+
+					$rsdefa[$num] = $s;
+					$rsdef->MoveNext();
+				}
+			} else {
+				ADOConnection::outp( "==> SQL => " . $sql);
+			}
+			unset($rsdef);
+		}
+	
+		$retarr = array();
+		while (!$rs->EOF) { 	
+			$fld = new ADOFieldObject();
+			$fld->name = $rs->fields[0];
+			$fld->type = $rs->fields[1];
+			$fld->max_length = $rs->fields[2];
+			$fld->attnum = $rs->fields[6];
+			
+			if ($fld->max_length <= 0) $fld->max_length = $rs->fields[3]-4;
+			if ($fld->max_length <= 0) $fld->max_length = -1;
+			if ($fld->type == 'numeric') {
+				$fld->scale = $fld->max_length & 0xFFFF;
+				$fld->max_length >>= 16;
+			}
+			// dannym
+			// 5 hasdefault; 6 num-of-column
+			$fld->has_default = ($rs->fields[5] == 't');
+			if ($fld->has_default) {
+				$fld->default_value = $rsdefa[$rs->fields[6]];
+			}
+
+			//Freek
+			$fld->not_null = $rs->fields[4] == 't';
+			
+			
+			// Freek
+			if (is_array($keys)) {
+				foreach($keys as $key) {
+					if ($fld->name == $key['column_name'] AND $key['primary_key'] == 't') 
+						$fld->primary_key = true;
+					if ($fld->name == $key['column_name'] AND $key['unique_key'] == 't') 
+						$fld->unique = true; // What name is more compatible?
+				}
+			}
+			
+			if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;	
+			else $retarr[($normalize) ? strtoupper($fld->name) : $fld->name] = $fld;
+			
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		if (empty($retarr))
+			return  $false;
+		else
+			return $retarr;	
+		
+	}
+
+	  function &MetaIndexes ($table, $primary = FALSE)
+      {
+         global $ADODB_FETCH_MODE;
+                
+				$schema = false;
+				$this->_findschema($table,$schema);
+
+				if ($schema) { // requires pgsql 7.3+ - pg_namespace used.
+					$sql = '
+SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns" 
+FROM pg_catalog.pg_class c 
+JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid 
+JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid
+	,pg_namespace n 
+WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\')) and c.relnamespace=c2.relnamespace and c.relnamespace=n.oid and n.nspname=\'%s\'';
+				} else {
+	                $sql = '
+SELECT c.relname as "Name", i.indisunique as "Unique", i.indkey as "Columns"
+FROM pg_catalog.pg_class c
+JOIN pg_catalog.pg_index i ON i.indexrelid=c.oid
+JOIN pg_catalog.pg_class c2 ON c2.oid=i.indrelid
+WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))';
+    			}
+				            
+                if ($primary == FALSE) {
+                	$sql .= ' AND i.indisprimary=false;';
+                }
+                
+                $save = $ADODB_FETCH_MODE;
+                $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+                if ($this->fetchMode !== FALSE) {
+                        $savem = $this->SetFetchMode(FALSE);
+                }
+                
+                $rs = $this->Execute(sprintf($sql,$table,$table,$schema));
+                if (isset($savem)) {
+                        $this->SetFetchMode($savem);
+                }
+                $ADODB_FETCH_MODE = $save;
+
+                if (!is_object($rs)) {
+                	$false = false;
+					return $false;
+                }
+				
+                $col_names = $this->MetaColumnNames($table,true,true); 
+				//3rd param is use attnum, 
+				// see http://sourceforge.net/tracker/index.php?func=detail&aid=1451245&group_id=42718&atid=433976
+                $indexes = array();
+                while ($row = $rs->FetchRow()) {
+                        $columns = array();
+                        foreach (explode(' ', $row[2]) as $col) {
+                                $columns[] = $col_names[$col];
+                        }
+                        
+                        $indexes[$row[0]] = array(
+                                'unique' => ($row[1] == 't'),
+                                'columns' => $columns
+                        );
+                }
+                return $indexes;
+        }
+
+	// returns true or false
+	//
+	// examples:
+	// 	$db->Connect("host=host1 user=user1 password=secret port=4341");
+	// 	$db->Connect('host1','user1','secret');
+	function _connect($str,$user='',$pwd='',$db='',$ctype=0)
+	{
+		
+		if (!function_exists('pg_connect')) return null;
+		
+		$this->_errorMsg = false;
+		
+		if ($user || $pwd || $db) {
+			$user = adodb_addslashes($user);
+			$pwd = adodb_addslashes($pwd);
+			if (strlen($db) == 0) $db = 'template1';
+			$db = adodb_addslashes($db);
+		   	if ($str)  {
+			 	$host = split(":", $str);
+				if ($host[0]) $str = "host=".adodb_addslashes($host[0]);
+				else $str = '';
+				if (isset($host[1])) $str .= " port=$host[1]";
+				else if (!empty($this->port)) $str .= " port=".$this->port;
+			}
+		   		if ($user) $str .= " user=".$user;
+		   		if ($pwd)  $str .= " password=".$pwd;
+				if ($db)   $str .= " dbname=".$db;
+		}
+
+		//if ($user) $linea = "user=$user host=$linea password=$pwd dbname=$db port=5432";
+		
+		if ($ctype === 1) { // persistent
+			$this->_connectionID = pg_pconnect($str);
+		} else {
+			if ($ctype === -1) { // nconnect, we trick pgsql ext by changing the connection str
+			static $ncnt;
+			
+				if (empty($ncnt)) $ncnt = 1;
+				else $ncnt += 1;
+				
+				$str .= str_repeat(' ',$ncnt);
+			}
+			$this->_connectionID = pg_connect($str);
+		}
+		if ($this->_connectionID === false) return false;
+		$this->Execute("set datestyle='ISO'");
+		
+		$info = $this->ServerInfo();
+		$this->pgVersion = (float) substr($info['version'],0,3);
+		if ($this->pgVersion >= 7.1) { // good till version 999
+			$this->_nestedSQL = true;
+		}
+		return true;
+	}
+	
+	function _nconnect($argHostname, $argUsername, $argPassword, $argDatabaseName)
+	{
+	 	return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabaseName,-1);
+	}
+	 
+	// returns true or false
+	//
+	// examples:
+	// 	$db->PConnect("host=host1 user=user1 password=secret port=4341");
+	// 	$db->PConnect('host1','user1','secret');
+	function _pconnect($str,$user='',$pwd='',$db='')
+	{
+		return $this->_connect($str,$user,$pwd,$db,1);
+	}
+	
+
+	// returns queryID or false
+	function _query($sql,$inputarr)
+	{
+		$this->_errorMsg = false;
+		if ($inputarr) {
+		/*
+			It appears that PREPARE/EXECUTE is slower for many queries.
+			
+			For query executed 1000 times:
+			"select id,firstname,lastname from adoxyz 
+				where firstname not like ? and lastname not like ? and id = ?"
+				
+			with plan = 1.51861286163 secs
+			no plan =   1.26903700829 secs
+
+			
+
+		*/
+			$plan = 'P'.md5($sql);
+				
+			$execp = '';
+			foreach($inputarr as $v) {
+				if ($execp) $execp .= ',';
+				if (is_string($v)) {
+					if (strncmp($v,"'",1) !== 0) $execp .= $this->qstr($v);
+				} else {
+					$execp .= $v;
+				}
+			}
+			
+			if ($execp) $exsql = "EXECUTE $plan ($execp)";
+			else $exsql = "EXECUTE $plan";
+			
+			
+			$rez = @pg_exec($this->_connectionID,$exsql);
+			if (!$rez) {
+			# Perhaps plan does not exist? Prepare/compile plan.
+				$params = '';
+				foreach($inputarr as $v) {
+					if ($params) $params .= ',';
+					if (is_string($v)) {
+						$params .= 'VARCHAR';
+					} else if (is_integer($v)) {
+						$params .= 'INTEGER';
+					} else {
+						$params .= "REAL";
+					}
+				}
+				$sqlarr = explode('?',$sql);
+				//print_r($sqlarr);
+				$sql = '';
+				$i = 1;
+				foreach($sqlarr as $v) {
+					$sql .= $v.' $'.$i;
+					$i++;
+				}
+				$s = "PREPARE $plan ($params) AS ".substr($sql,0,strlen($sql)-2);		
+				//adodb_pr($s);
+				$rez = pg_exec($this->_connectionID,$s);
+				//echo $this->ErrorMsg();
+			}
+			if ($rez)
+				$rez = pg_exec($this->_connectionID,$exsql);
+		} else {
+			//adodb_backtrace();
+			$rez = pg_exec($this->_connectionID,$sql);
+		}
+		// check if no data returned, then no need to create real recordset
+		if ($rez && pg_numfields($rez) <= 0) {
+			if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') {
+				pg_freeresult($this->_resultid);
+			}
+			$this->_resultid = $rez;
+			return true;
+		}
+		
+		return $rez;
+	}
+	
+	function _errconnect()
+	{
+		if (defined('DB_ERROR_CONNECT_FAILED')) return DB_ERROR_CONNECT_FAILED;
+		else return 'Database connection failed';
+	}
+
+	/*	Returns: the last error message from previous database operation	*/	
+	function ErrorMsg() 
+	{
+		if ($this->_errorMsg !== false) return $this->_errorMsg;
+		if (ADODB_PHPVER >= 0x4300) {
+			if (!empty($this->_resultid)) {
+				$this->_errorMsg = @pg_result_error($this->_resultid);
+				if ($this->_errorMsg) return $this->_errorMsg;
+			}
+			
+			if (!empty($this->_connectionID)) {
+				$this->_errorMsg = @pg_last_error($this->_connectionID);
+			} else $this->_errorMsg = $this->_errconnect();
+		} else {
+			if (empty($this->_connectionID)) $this->_errconnect();
+			else $this->_errorMsg = @pg_errormessage($this->_connectionID);
+		}
+		return $this->_errorMsg;
+	}
+	
+	function ErrorNo()
+	{
+		$e = $this->ErrorMsg();
+		if (strlen($e)) {
+			return ADOConnection::MetaError($e);
+		 }
+		 return 0;
+	}
+
+	// returns true or false
+	function _close()
+	{
+		if ($this->transCnt) $this->RollbackTrans();
+		if ($this->_resultid) {
+			@pg_freeresult($this->_resultid);
+			$this->_resultid = false;
+		}
+		@pg_close($this->_connectionID);
+		$this->_connectionID = false;
+		return true;
+	}
+	
+	
+	/*
+	* Maximum size of C field
+	*/
+	function CharMax()
+	{
+		return 1000000000;  // should be 1 Gb?
+	}
+	
+	/*
+	* Maximum size of X field
+	*/
+	function TextMax()
+	{
+		return 1000000000; // should be 1 Gb?
+	}
+	
+		
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_postgres64 extends ADORecordSet{
+	var $_blobArr;
+	var $databaseType = "postgres64";
+	var $canSeek = true;
+	function ADORecordSet_postgres64($queryID,$mode=false) 
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch ($mode)
+		{
+		case ADODB_FETCH_NUM: $this->fetchMode = PGSQL_NUM; break;
+		case ADODB_FETCH_ASSOC:$this->fetchMode = PGSQL_ASSOC; break;
+		
+		case ADODB_FETCH_DEFAULT:
+		case ADODB_FETCH_BOTH:
+		default: $this->fetchMode = PGSQL_BOTH; break;
+		}
+		$this->adodbFetchMode = $mode;
+		$this->ADORecordSet($queryID);
+	}
+	
+	function &GetRowAssoc($upper=true)
+	{
+		if ($this->fetchMode == PGSQL_ASSOC && !$upper) return $this->fields;
+		$row =& ADORecordSet::GetRowAssoc($upper);
+		return $row;
+	}
+
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+		$qid = $this->_queryID;
+		$this->_numOfRows = ($ADODB_COUNTRECS)? @pg_numrows($qid):-1;
+		$this->_numOfFields = @pg_numfields($qid);
+		
+		// cache types for blob decode check
+		// apparently pg_fieldtype actually performs an sql query on the database to get the type.
+		if (empty($this->connection->noBlobs))
+		for ($i=0, $max = $this->_numOfFields; $i < $max; $i++) {  
+			if (pg_fieldtype($qid,$i) == 'bytea') {
+				$this->_blobArr[$i] = pg_fieldname($qid,$i);
+			}
+		}
+	}
+
+		/* Use associative array to get fields array */
+	function Fields($colname)
+	{
+		if ($this->fetchMode != PGSQL_NUM) return @$this->fields[$colname];
+		
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+
+	function &FetchField($off = 0) 
+	{
+		// offsets begin at 0
+		
+		$o= new ADOFieldObject();
+		$o->name = @pg_fieldname($this->_queryID,$off);
+		$o->type = @pg_fieldtype($this->_queryID,$off);
+		$o->max_length = @pg_fieldsize($this->_queryID,$off);
+		return $o;	
+	}
+
+	function _seek($row)
+	{
+		return @pg_fetch_row($this->_queryID,$row);
+	}
+	
+	function _decode($blob)
+	{
+		eval('$realblob="'.adodb_str_replace(array('"','$'),array('\"','\$'),$blob).'";');
+		return $realblob;	
+	}
+	
+	function _fixblobs()
+	{
+		if ($this->fetchMode == PGSQL_NUM || $this->fetchMode == PGSQL_BOTH) {
+			foreach($this->_blobArr as $k => $v) {
+				$this->fields[$k] = ADORecordSet_postgres64::_decode($this->fields[$k]);
+			}
+		}
+		if ($this->fetchMode == PGSQL_ASSOC || $this->fetchMode == PGSQL_BOTH) {
+			foreach($this->_blobArr as $k => $v) {
+				$this->fields[$v] = ADORecordSet_postgres64::_decode($this->fields[$v]);
+			}
+		}
+	}
+	
+	// 10% speedup to move MoveNext to child class
+	function MoveNext() 
+	{
+		if (!$this->EOF) {
+			$this->_currentRow++;
+			if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
+				$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
+				if (is_array($this->fields) && $this->fields) {
+					if (isset($this->_blobArr)) $this->_fixblobs();
+					return true;
+				}
+			}
+			$this->fields = false;
+			$this->EOF = true;
+		}
+		return false;
+	}		
+	
+	function _fetch()
+	{
+				
+		if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0)
+        	return false;
+
+		$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
+		
+		if ($this->fields && isset($this->_blobArr)) $this->_fixblobs();
+			
+		return (is_array($this->fields));
+	}
+
+	function _close() 
+	{ 
+		return @pg_freeresult($this->_queryID);
+	}
+
+	function MetaType($t,$len=-1,$fieldobj=false)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		switch (strtoupper($t)) {
+				case 'MONEY': // stupid, postgres expects money to be a string
+				case 'INTERVAL':
+				case 'CHAR':
+				case 'CHARACTER':
+				case 'VARCHAR':
+				case 'NAME':
+		   		case 'BPCHAR':
+				case '_VARCHAR':
+				case 'INET':
+				case 'MACADDR':
+					if ($len <= $this->blobSize) return 'C';
+				
+				case 'TEXT':
+					return 'X';
+		
+				case 'IMAGE': // user defined type
+				case 'BLOB': // user defined type
+				case 'BIT':	// This is a bit string, not a single bit, so don't return 'L'
+				case 'VARBIT':
+				case 'BYTEA':
+					return 'B';
+				
+				case 'BOOL':
+				case 'BOOLEAN':
+					return 'L';
+				
+				case 'DATE':
+					return 'D';
+				
+				
+				case 'TIMESTAMP WITHOUT TIME ZONE':
+				case 'TIME':
+				case 'DATETIME':
+				case 'TIMESTAMP':
+				case 'TIMESTAMPTZ':
+					return 'T';
+				
+				case 'SMALLINT': 
+				case 'BIGINT': 
+				case 'INTEGER': 
+				case 'INT8': 
+				case 'INT4':
+				case 'INT2':
+					if (isset($fieldobj) &&
+				empty($fieldobj->primary_key) && empty($fieldobj->unique)) return 'I';
+				
+				case 'OID':
+				case 'SERIAL':
+					return 'R';
+				
+				 default:
+				 	return 'N';
+			}
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres7.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres7.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres7.inc.php	(revision 225)
@@ -0,0 +1,264 @@
+<?php
+/*
+ V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 4.
+  
+  Postgres7 support.
+  28 Feb 2001: Currently indicate that we support LIMIT
+  01 Dec 2001: dannym added support for default values
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR."/drivers/adodb-postgres64.inc.php");
+
+class ADODB_postgres7 extends ADODB_postgres64 {
+	var $databaseType = 'postgres7';	
+	var $hasLimit = true;	// set to true for pgsql 6.5+ only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10
+	var $ansiOuter = true;
+	var $charSet = true; //set to true for Postgres 7 and above - PG client supports encodings
+	
+	function ADODB_postgres7() 
+	{
+		$this->ADODB_postgres64();
+		if (ADODB_ASSOC_CASE !== 2) {
+			$this->rsPrefix .= 'assoc_';
+		}
+		$this->_bindInputArray = PHP_VERSION >= 5.1;
+	}
+
+	
+	// the following should be compat with postgresql 7.2, 
+	// which makes obsolete the LIMIT limit,offset syntax
+	 function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+	 {
+		 $offsetStr = ($offset >= 0) ? " OFFSET ".((integer)$offset) : '';
+		 $limitStr  = ($nrows >= 0)  ? " LIMIT ".((integer)$nrows) : '';
+		 if ($secs2cache)
+		  	$rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
+		 else
+		  	$rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr);
+		
+		return $rs;
+	 }
+ 	/*
+ 	function Prepare($sql)
+	{
+		$info = $this->ServerInfo();
+		if ($info['version']>=7.3) {
+			return array($sql,false);
+		}
+		return $sql;
+	}
+ 	*/
+
+
+	// from  Edward Jaramilla, improved version - works on pg 7.4
+	function MetaForeignKeys($table, $owner=false, $upper=false)
+	{
+		$sql = 'SELECT t.tgargs as args
+		FROM
+		pg_trigger t,pg_class c,pg_proc p
+		WHERE
+		t.tgenabled AND
+		t.tgrelid = c.oid AND
+		t.tgfoid = p.oid AND
+		p.proname = \'RI_FKey_check_ins\' AND
+		c.relname = \''.strtolower($table).'\'
+		ORDER BY
+			t.tgrelid';
+		
+		$rs =& $this->Execute($sql);
+		
+		if (!$rs || $rs->EOF) return false;
+		
+		$arr =& $rs->GetArray();
+		$a = array();
+		foreach($arr as $v) {
+			$data = explode(chr(0), $v['args']);
+			$size = count($data)-1; //-1 because the last node is empty
+			for($i = 4; $i < $size; $i++) {
+				if ($upper) 
+					$a[strtoupper($data[2])][] = strtoupper($data[$i].'='.$data[++$i]);
+				else 
+					$a[$data[2]][] = $data[$i].'='.$data[++$i];
+			}
+		}
+		return $a;
+	}
+
+	function _query($sql,$inputarr)
+	{
+		if (! $this->_bindInputArray) {
+			// We don't have native support for parameterized queries, so let's emulate it at the parent
+			return ADODB_postgres64::_query($sql, $inputarr);
+		}
+		$this->_errorMsg = false;
+		// -- added Cristiano da Cunha Duarte
+		if ($inputarr) {
+			$sqlarr = explode('?',trim($sql));
+			$sql = '';
+			$i = 1;
+			$last = sizeof($sqlarr)-1;
+			foreach($sqlarr as $v) {
+				if ($last < $i) $sql .= $v;
+				else $sql .= $v.' $'.$i;
+				$i++;
+			}
+			
+			$rez = pg_query_params($this->_connectionID,$sql, $inputarr);
+		} else {
+			$rez = pg_query($this->_connectionID,$sql);
+		}
+		// check if no data returned, then no need to create real recordset
+		if ($rez && pg_numfields($rez) <= 0) {
+			if (is_resource($this->_resultid) && get_resource_type($this->_resultid) === 'pgsql result') {
+				pg_freeresult($this->_resultid);
+			}
+			$this->_resultid = $rez;
+			return true;
+		}		
+		return $rez;
+	}
+	
+ 	 // this is a set of functions for managing client encoding - very important if the encodings
+	// of your database and your output target (i.e. HTML) don't match
+	//for instance, you may have UNICODE database and server it on-site as WIN1251 etc.
+	// GetCharSet - get the name of the character set the client is using now
+	// the functions should work with Postgres 7.0 and above, the set of charsets supported
+	// depends on compile flags of postgres distribution - if no charsets were compiled into the server
+	// it will return 'SQL_ANSI' always
+	function GetCharSet()
+	{
+		//we will use ADO's builtin property charSet
+		$this->charSet = @pg_client_encoding($this->_connectionID);
+		if (!$this->charSet) {
+			return false;
+		} else {
+			return $this->charSet;
+		}
+	}
+	
+	// SetCharSet - switch the client encoding
+	function SetCharSet($charset_name)
+	{
+		$this->GetCharSet();
+		if ($this->charSet !== $charset_name) {
+			$if = pg_set_client_encoding($this->_connectionID, $charset_name);
+			if ($if == "0" & $this->GetCharSet() == $charset_name) {
+				return true;
+			} else return false;
+		} else return true;
+	}
+
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordSet_postgres7 extends ADORecordSet_postgres64{
+
+	var $databaseType = "postgres7";
+	
+	
+	function ADORecordSet_postgres7($queryID,$mode=false) 
+	{
+		$this->ADORecordSet_postgres64($queryID,$mode);
+	}
+	
+	 	// 10% speedup to move MoveNext to child class
+	function MoveNext() 
+	{
+		if (!$this->EOF) {
+			$this->_currentRow++;
+			if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
+				$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
+			
+				if (is_array($this->fields)) {
+					if ($this->fields && isset($this->_blobArr)) $this->_fixblobs();
+					return true;
+				}
+			}
+			$this->fields = false;
+			$this->EOF = true;
+		}
+		return false;
+	}		
+
+}
+
+class ADORecordSet_assoc_postgres7 extends ADORecordSet_postgres64{
+
+	var $databaseType = "postgres7";
+	
+	
+	function ADORecordSet_assoc_postgres7($queryID,$mode=false) 
+	{
+		$this->ADORecordSet_postgres64($queryID,$mode);
+	}
+	
+	function _fetch()
+	{
+		if ($this->_currentRow >= $this->_numOfRows && $this->_numOfRows >= 0)
+        	return false;
+
+		$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
+		
+		if ($this->fields) {
+			if (isset($this->_blobArr)) $this->_fixblobs();
+			$this->_updatefields();
+		}
+			
+		return (is_array($this->fields));
+	}
+	
+		// Create associative array
+	function _updatefields()
+	{
+		if (ADODB_ASSOC_CASE == 2) return; // native
+	
+		$arr = array();
+		$lowercase = (ADODB_ASSOC_CASE == 0);
+		
+		foreach($this->fields as $k => $v) {
+			if (is_integer($k)) $arr[$k] = $v;
+			else {
+				if ($lowercase)
+					$arr[strtolower($k)] = $v;
+				else
+					$arr[strtoupper($k)] = $v;
+			}
+		}
+		$this->fields = $arr;
+	}
+	
+	function MoveNext() 
+	{
+		if (!$this->EOF) {
+			$this->_currentRow++;
+			if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
+				$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);
+			
+				if (is_array($this->fields)) {
+					if ($this->fields) {
+						if (isset($this->_blobArr)) $this->_fixblobs();
+					
+						$this->_updatefields();
+					}
+					return true;
+				}
+			}
+			
+			
+			$this->fields = false;
+			$this->EOF = true;
+		}
+		return false;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres8.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres8.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-postgres8.inc.php	(revision 225)
@@ -0,0 +1,12 @@
+<?php
+/*
+ V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 4.
+  
+  NOTE: The "postgres8" driver is remapped to "postgres7". 
+*/
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-proxy.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-proxy.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-proxy.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 4.
+  
+  Synonym for csv driver.
+*/ 
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (! defined("_ADODB_PROXY_LAYER")) {
+	 define("_ADODB_PROXY_LAYER", 1 );
+	 include(ADODB_DIR."/drivers/adodb-csv.inc.php");
+	 
+	class ADODB_proxy extends ADODB_csv {
+		var $databaseType = 'proxy';
+		var $databaseProvider = 'csv';
+	}
+	class ADORecordset_proxy extends ADORecordset_csv {
+	var $databaseType = "proxy";		
+	
+		function ADORecordset_proxy($id,$mode=false) 
+		{
+			$this->ADORecordset($id,$mode);
+		}
+	};
+} // define
+	
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sapdb.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sapdb.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sapdb.inc.php	(revision 225)
@@ -0,0 +1,184 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  SAPDB data driver. Requires ODBC.
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ODBC_LAYER')) {
+	include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+if (!defined('ADODB_SAPDB')){
+define('ADODB_SAPDB',1);
+
+class ADODB_SAPDB extends ADODB_odbc {
+	var $databaseType = "sapdb";	
+	var $concat_operator = '||';
+	var $sysDate = 'DATE';
+	var $sysTimeStamp = 'TIMESTAMP';
+	var $fmtDate = "'Y-m-d'";	/// used by DBDate() as the default date format used by the database
+	var $fmtTimeStamp = "'Y-m-d H:i:s'"; /// used by DBTimeStamp as the default timestamp fmt.
+	var $hasInsertId = true;
+	var $_bindInputArray = true;
+	
+	function ADODB_SAPDB()
+	{
+		//if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC;
+		$this->ADODB_odbc();
+	}
+	
+	function ServerInfo()
+	{
+		$info = ADODB_odbc::ServerInfo();
+		if (!$info['version'] && preg_match('/([0-9.]+)/',$info['description'],$matches)) {
+			$info['version'] = $matches[1];
+		}
+		return $info;
+	}
+
+	function MetaPrimaryKeys($table)
+	{
+		$table = $this->Quote(strtoupper($table));
+
+		return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos");
+	}
+		
+ 	function &MetaIndexes ($table, $primary = FALSE)
+	{
+		$table = $this->Quote(strtoupper($table));
+
+		$sql = "SELECT INDEXNAME,TYPE,COLUMNNAME FROM INDEXCOLUMNS ".
+			" WHERE TABLENAME=$table".
+			" ORDER BY INDEXNAME,COLUMNNO";
+
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+        	$savem = $this->SetFetchMode(FALSE);
+        }
+        
+        $rs = $this->Execute($sql);
+        if (isset($savem)) {
+        	$this->SetFetchMode($savem);
+        }
+        $ADODB_FETCH_MODE = $save;
+
+        if (!is_object($rs)) {
+        	return FALSE;
+        }
+
+		$indexes = array();
+		while ($row = $rs->FetchRow()) {
+            $indexes[$row[0]]['unique'] = $row[1] == 'UNIQUE';
+            $indexes[$row[0]]['columns'][] = $row[2];
+    	}
+		if ($primary) {
+			$indexes['SYSPRIMARYKEYINDEX'] = array(
+					'unique' => True,	// by definition
+					'columns' => $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos"),
+				);
+		}
+        return $indexes;
+	}
+	
+ 	function &MetaColumns ($table)
+	{
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+        	$savem = $this->SetFetchMode(FALSE);
+        }
+		$table = $this->Quote(strtoupper($table));
+		
+		$retarr = array();
+		foreach($this->GetAll("SELECT COLUMNNAME,DATATYPE,LEN,DEC,NULLABLE,MODE,\"DEFAULT\",CASE WHEN \"DEFAULT\" IS NULL THEN 0 ELSE 1 END AS HAS_DEFAULT FROM COLUMNS WHERE tablename=$table ORDER BY pos") as $column)
+		{
+			$fld = new ADOFieldObject();
+			$fld->name = $column[0];
+			$fld->type = $column[1];
+			$fld->max_length = $fld->type == 'LONG' ? 2147483647 : $column[2];
+			$fld->scale = $column[3];
+			$fld->not_null = $column[4] == 'NO';
+			$fld->primary_key = $column[5] == 'KEY';
+			if ($fld->has_default = $column[7]) {
+				if ($fld->primary_key && $column[6] == 'DEFAULT SERIAL (1)') {
+					$fld->auto_increment = true;
+					$fld->has_default = false;
+				} else {
+					$fld->default_value = $column[6];
+					switch($fld->type) {
+						case 'VARCHAR':
+						case 'CHARACTER':
+						case 'LONG':
+							$fld->default_value = $column[6];
+							break;
+						default:
+							$fld->default_value = trim($column[6]);
+							break;
+					}
+				}
+			}
+			$retarr[$fld->name] = $fld;	
+		}
+        if (isset($savem)) {
+        	$this->SetFetchMode($savem);
+        }
+        $ADODB_FETCH_MODE = $save;
+
+		return $retarr;
+	}
+	
+	function MetaColumnNames($table)
+	{
+		$table = $this->Quote(strtoupper($table));
+
+		return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table ORDER BY pos");
+	}
+	
+	// unlike it seems, this depends on the db-session and works in a multiuser environment
+	function _insertid($table,$column)
+	{
+		return empty($table) ? False : $this->GetOne("SELECT $table.CURRVAL FROM DUAL");
+	}
+
+	/*
+		SelectLimit implementation problems:
+	
+	 	The following will return random 10 rows as order by performed after "WHERE rowno<10"
+	 	which is not ideal...
+		
+	  		select * from table where rowno < 10 order by 1
+	  
+	  	This means that we have to use the adoconnection base class SelectLimit when
+	  	there is an "order by".
+		
+		See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html
+	 */
+	
+};
+ 
+
+class  ADORecordSet_sapdb extends ADORecordSet_odbc {	
+	
+	var $databaseType = "sapdb";		
+	
+	function ADORecordSet_sapdb($id,$mode=false)
+	{
+		$this->ADORecordSet_odbc($id,$mode);
+	}
+}
+
+} //define
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlanywhere.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlanywhere.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlanywhere.inc.php	(revision 225)
@@ -0,0 +1,169 @@
+<?php
+/* 
+version V4.94 23 Jan 2007 (c) 2000-2007  John Lim (jlim#natsoft.com.my).  All rights
+reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+
+  Latest version is available at http://adodb.sourceforge.net
+
+  21.02.2002 - Wade Johnson wade@wadejohnson.de
+			   Extended ODBC class for Sybase SQLAnywhere.
+   1) Added support to retrieve the last row insert ID on tables with
+	  primary key column using autoincrement function.
+
+   2) Added blob support.  Usage:
+		 a) create blob variable on db server:
+
+		$dbconn->create_blobvar($blobVarName);
+
+	  b) load blob var from file.  $filename must be complete path
+
+	  $dbcon->load_blobvar_from_file($blobVarName, $filename);
+
+	  c) Use the $blobVarName in SQL insert or update statement in the values
+	  clause:
+
+		$recordSet = $dbconn->Execute('INSERT INTO tabname (idcol, blobcol) '
+		.
+	   'VALUES (\'test\', ' . $blobVarName . ')');
+
+	 instead of loading blob from a file, you can also load from 
+	  an unformatted (raw) blob variable:
+	  $dbcon->load_blobvar_from_var($blobVarName, $varName);
+
+	  d) drop blob variable on db server to free up resources:
+	  $dbconn->drop_blobvar($blobVarName);
+
+  Sybase_SQLAnywhere data driver. Requires ODBC.
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ODBC_LAYER')) {
+ include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+
+if (!defined('ADODB_SYBASE_SQLANYWHERE')){
+
+ define('ADODB_SYBASE_SQLANYWHERE',1);
+
+ class ADODB_sqlanywhere extends ADODB_odbc {
+  	var $databaseType = "sqlanywhere";	
+	var $hasInsertID = true;
+	
+	function ADODB_sqlanywhere()
+	{
+		$this->ADODB_odbc();
+	}
+
+	 function _insertid() {
+  	   return $this->GetOne('select @@identity');
+	 }
+
+  function create_blobvar($blobVarName) {
+   $this->Execute("create variable $blobVarName long binary");
+   return;
+  }
+
+  function drop_blobvar($blobVarName) {
+   $this->Execute("drop variable $blobVarName");
+   return;
+  }
+
+  function load_blobvar_from_file($blobVarName, $filename) {
+   $chunk_size = 1000;
+
+   $fd = fopen ($filename, "rb");
+
+   $integer_chunks = (integer)filesize($filename) / $chunk_size;
+   $modulus = filesize($filename) % $chunk_size;
+   if ($modulus != 0){
+	$integer_chunks += 1;
+   }
+
+   for($loop=1;$loop<=$integer_chunks;$loop++){
+	$contents = fread ($fd, $chunk_size);
+	$contents = bin2hex($contents);
+
+	$hexstring = '';
+
+	for($loop2=0;$loop2<strlen($contents);$loop2+=2){
+	 $hexstring .= '\x' . substr($contents,$loop2,2);
+	 }
+
+	$hexstring = $this->qstr($hexstring);
+
+	$this->Execute("set $blobVarName = $blobVarName || " . $hexstring);
+   }
+
+   fclose ($fd);
+   return;
+  }
+
+  function load_blobvar_from_var($blobVarName, &$varName) {
+   $chunk_size = 1000;
+
+   $integer_chunks = (integer)strlen($varName) / $chunk_size;
+   $modulus = strlen($varName) % $chunk_size;
+   if ($modulus != 0){
+	$integer_chunks += 1;
+   }
+
+   for($loop=1;$loop<=$integer_chunks;$loop++){
+	$contents = substr ($varName, (($loop - 1) * $chunk_size), $chunk_size);
+	$contents = bin2hex($contents);
+
+	$hexstring = '';
+
+	for($loop2=0;$loop2<strlen($contents);$loop2+=2){
+	 $hexstring .= '\x' . substr($contents,$loop2,2);
+	 }
+
+	$hexstring = $this->qstr($hexstring);
+
+	$this->Execute("set $blobVarName = $blobVarName || " . $hexstring);
+   }
+
+   return;
+  }
+
+ /*
+  Insert a null into the blob field of the table first.
+  Then use UpdateBlob to store the blob.
+
+  Usage:
+
+  $conn->Execute('INSERT INTO blobtable (id, blobcol) VALUES (1, null)');
+  $conn->UpdateBlob('blobtable','blobcol',$blob,'id=1');
+ */
+  function UpdateBlob($table,$column,&$val,$where,$blobtype='BLOB')
+  {
+   $blobVarName = 'hold_blob';
+   $this->create_blobvar($blobVarName);
+   $this->load_blobvar_from_var($blobVarName, $val);
+   $this->Execute("UPDATE $table SET $column=$blobVarName WHERE $where");
+   $this->drop_blobvar($blobVarName);
+   return true;
+  }
+ }; //class
+
+ class  ADORecordSet_sqlanywhere extends ADORecordSet_odbc {	
+
+  var $databaseType = "sqlanywhere";		
+
+ function ADORecordSet_sqlanywhere($id,$mode=false)
+ {
+  $this->ADORecordSet_odbc($id,$mode);
+ }
+
+
+ }; //class
+
+
+} //define
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlite.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlite.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlite.inc.php	(revision 225)
@@ -0,0 +1,398 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+
+  Latest version is available at http://adodb.sourceforge.net
+  
+  SQLite info: http://www.hwaci.com/sw/sqlite/
+    
+  Install Instructions:
+  ====================
+  1. Place this in adodb/drivers
+  2. Rename the file, remove the .txt prefix.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB_sqlite extends ADOConnection {
+	var $databaseType = "sqlite";
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $concat_operator='||';
+	var $_errorNo = 0;
+	var $hasLimit = true;	
+	var $hasInsertID = true; 		/// supports autoincrement ID?
+	var $hasAffectedRows = true; 	/// supports affected rows for update/delete?
+	var $metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name";
+	var $sysDate = "adodb_date('Y-m-d')";
+	var $sysTimeStamp = "adodb_date('Y-m-d H:i:s')";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	
+	function ADODB_sqlite() 
+	{
+	}
+	
+/*
+  function __get($name) 
+  {
+  	switch($name) {
+	case 'sysDate': return "'".date($this->fmtDate)."'";
+	case 'sysTimeStamp' : return "'".date($this->sysTimeStamp)."'";
+	}
+  }*/
+	
+	function ServerInfo()
+	{
+		$arr['version'] = sqlite_libversion();
+		$arr['description'] = 'SQLite ';
+		$arr['encoding'] = sqlite_libencoding();
+		return $arr;
+	}
+	
+	function BeginTrans()
+	{	  
+		 if ($this->transOff) return true; 
+		 $ret = $this->Execute("BEGIN TRANSACTION");
+		 $this->transCnt += 1;
+		 return true;
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true; 
+		if (!$ok) return $this->RollbackTrans();
+		$ret = $this->Execute("COMMIT");
+		if ($this->transCnt>0)$this->transCnt -= 1;
+		return !empty($ret);
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true; 
+		$ret = $this->Execute("ROLLBACK");
+		if ($this->transCnt>0)$this->transCnt -= 1;
+		return !empty($ret);
+	}
+	
+	// mark newnham
+	function &MetaColumns($tab)
+	{
+	  global $ADODB_FETCH_MODE;
+	  $false = false;
+	  $save = $ADODB_FETCH_MODE;
+	  $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	  if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+	  $rs = $this->Execute("PRAGMA table_info('$tab')");
+	  if (isset($savem)) $this->SetFetchMode($savem);
+	  if (!$rs) {
+	    $ADODB_FETCH_MODE = $save; 
+	    return $false;
+	  }
+	  $arr = array();
+	  while ($r = $rs->FetchRow()) {
+	    $type = explode('(',$r['type']);
+	    $size = '';
+	    if (sizeof($type)==2)
+	    $size = trim($type[1],')');
+	    $fn = strtoupper($r['name']);
+	    $fld = new ADOFieldObject;
+	    $fld->name = $r['name'];
+	    $fld->type = $type[0];
+	    $fld->max_length = $size;
+	    $fld->not_null = $r['notnull'];
+	    $fld->default_value = $r['dflt_value'];
+	    $fld->scale = 0;
+	    if ($save == ADODB_FETCH_NUM) $arr[] = $fld;	
+	    else $arr[strtoupper($fld->name)] = $fld;
+	  }
+	  $rs->Close();
+	  $ADODB_FETCH_MODE = $save;
+	  return $arr;
+	}
+	
+	function _init($parentDriver)
+	{
+	
+		$parentDriver->hasTransactions = false;
+		$parentDriver->hasInsertID = true;
+	}
+
+	function _insertid()
+	{
+		return sqlite_last_insert_rowid($this->_connectionID);
+	}
+	
+	function _affectedrows()
+	{
+        return sqlite_changes($this->_connectionID);
+    }
+	
+	function ErrorMsg() 
+ 	{
+		if ($this->_logsql) return $this->_errorMsg;
+		return ($this->_errorNo) ? sqlite_error_string($this->_errorNo) : '';
+	}
+ 
+	function ErrorNo() 
+	{
+		return $this->_errorNo;
+	}
+	
+	function SQLDate($fmt, $col=false)
+	{
+		$fmt = $this->qstr($fmt);
+		return ($col) ? "adodb_date2($fmt,$col)" : "adodb_date($fmt)";
+	}
+	
+	
+	function _createFunctions()
+	{
+		@sqlite_create_function($this->_connectionID, 'adodb_date', 'adodb_date', 1);
+		@sqlite_create_function($this->_connectionID, 'adodb_date2', 'adodb_date2', 2);
+	}
+	
+
+	// returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('sqlite_open')) return null;
+		if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename;
+		
+		$this->_connectionID = sqlite_open($argHostname);
+		if ($this->_connectionID === false) return false;
+		$this->_createFunctions();
+		return true;
+	}
+	
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('sqlite_open')) return null;
+		if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename;
+		
+		$this->_connectionID = sqlite_popen($argHostname);
+		if ($this->_connectionID === false) return false;
+		$this->_createFunctions();
+		return true;
+	}
+
+	// returns query ID if successful, otherwise false
+	function _query($sql,$inputarr=false)
+	{
+		$rez = sqlite_query($sql,$this->_connectionID);
+		if (!$rez) {
+			$this->_errorNo = sqlite_last_error($this->_connectionID);
+		}
+		
+		return $rez;
+	}
+	
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+	{
+		$offsetStr = ($offset >= 0) ? " OFFSET $offset" : '';
+		$limitStr  = ($nrows >= 0)  ? " LIMIT $nrows" : ($offset >= 0 ? ' LIMIT 999999999' : '');
+	  	if ($secs2cache)
+	   		$rs =& $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
+	  	else
+	   		$rs =& $this->Execute($sql."$limitStr$offsetStr",$inputarr);
+			
+		return $rs;
+	}
+	
+	/*
+		This algorithm is not very efficient, but works even if table locking
+		is not available.
+		
+		Will return false if unable to generate an ID after $MAXLOOPS attempts.
+	*/
+	var $_genSeqSQL = "create table %s (id integer)";
+	
+	function GenID($seq='adodbseq',$start=1)
+	{	
+		// if you have to modify the parameter below, your database is overloaded,
+		// or you need to implement generation of id's yourself!
+		$MAXLOOPS = 100;
+		//$this->debug=1;
+		while (--$MAXLOOPS>=0) {
+			@($num = $this->GetOne("select id from $seq"));
+			if ($num === false) {
+				$this->Execute(sprintf($this->_genSeqSQL ,$seq));	
+				$start -= 1;
+				$num = '0';
+				$ok = $this->Execute("insert into $seq values($start)");
+				if (!$ok) return false;
+			} 
+			$this->Execute("update $seq set id=id+1 where id=$num");
+			
+			if ($this->affected_rows() > 0) {
+				$num += 1;
+				$this->genID = $num;
+				return $num;
+			}
+		}
+		if ($fn = $this->raiseErrorFn) {
+			$fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num);
+		}
+		return false;
+	}
+
+	function CreateSequence($seqname='adodbseq',$start=1)
+	{
+		if (empty($this->_genSeqSQL)) return false;
+		$ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
+		if (!$ok) return false;
+		$start -= 1;
+		return $this->Execute("insert into $seqname values($start)");
+	}
+	
+	var $_dropSeqSQL = 'drop table %s';
+	function DropSequence($seqname)
+	{
+		if (empty($this->_dropSeqSQL)) return false;
+		return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
+	}
+	
+	// returns true or false
+	function _close()
+	{
+		return @sqlite_close($this->_connectionID);
+	}
+
+	function &MetaIndexes($table, $primary = FALSE, $owner=false)
+	{
+		$false = false;
+		// save old fetch mode
+        global $ADODB_FETCH_MODE;
+        $save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+               $savem = $this->SetFetchMode(FALSE);
+        }
+		$SQL=sprintf("SELECT name,sql FROM sqlite_master WHERE type='index' AND tbl_name='%s'", strtolower($table));
+        $rs = $this->Execute($SQL);
+        if (!is_object($rs)) {
+			if (isset($savem)) 
+				$this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+            return $false;
+        }
+
+		$indexes = array ();
+		while ($row = $rs->FetchRow()) {
+			if ($primary && preg_match("/primary/i",$row[1]) == 0) continue;
+            if (!isset($indexes[$row[0]])) {
+
+			$indexes[$row[0]] = array(
+				   'unique' => preg_match("/unique/i",$row[1]),
+				   'columns' => array());
+			}
+			/**
+			  * There must be a more elegant way of doing this,
+			  * the index elements appear in the SQL statement
+			  * in cols[1] between parentheses
+			  * e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse)
+			  */
+			$cols = explode("(",$row[1]);
+			$cols = explode(")",$cols[1]);
+			array_pop($cols);
+			$indexes[$row[0]]['columns'] = $cols;
+		}
+		if (isset($savem)) { 
+            $this->SetFetchMode($savem);
+			$ADODB_FETCH_MODE = $save;
+		}
+        return $indexes;
+	}
+
+}
+
+/*--------------------------------------------------------------------------------------
+		 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_sqlite extends ADORecordSet {
+
+	var $databaseType = "sqlite";
+	var $bind = false;
+
+	function ADORecordset_sqlite($queryID,$mode=false)
+	{
+		
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		switch($mode) {
+		case ADODB_FETCH_NUM: $this->fetchMode = SQLITE_NUM; break;
+		case ADODB_FETCH_ASSOC: $this->fetchMode = SQLITE_ASSOC; break;
+		default: $this->fetchMode = SQLITE_BOTH; break;
+		}
+		$this->adodbFetchMode = $mode;
+		
+		$this->_queryID = $queryID;
+	
+		$this->_inited = true;
+		$this->fields = array();
+		if ($queryID) {
+			$this->_currentRow = 0;
+			$this->EOF = !$this->_fetch();
+			@$this->_initrs();
+		} else {
+			$this->_numOfRows = 0;
+			$this->_numOfFields = 0;
+			$this->EOF = true;
+		}
+		
+		return $this->_queryID;
+	}
+
+
+	function &FetchField($fieldOffset = -1)
+	{
+		$fld = new ADOFieldObject;
+		$fld->name = sqlite_field_name($this->_queryID, $fieldOffset);
+		$fld->type = 'VARCHAR';
+		$fld->max_length = -1;
+		return $fld;
+	}
+	
+   function _initrs()
+   {
+		$this->_numOfRows = @sqlite_num_rows($this->_queryID);
+		$this->_numOfFields = @sqlite_num_fields($this->_queryID);
+   }
+
+	function Fields($colname)
+	{
+		if ($this->fetchMode != SQLITE_NUM) return $this->fields[$colname];
+		if (!$this->bind) {
+			$this->bind = array();
+			for ($i=0; $i < $this->_numOfFields; $i++) {
+				$o = $this->FetchField($i);
+				$this->bind[strtoupper($o->name)] = $i;
+			}
+		}
+		
+		 return $this->fields[$this->bind[strtoupper($colname)]];
+	}
+	
+   function _seek($row)
+   {
+   		return sqlite_seek($this->_queryID, $row);
+   }
+
+	function _fetch($ignore_fields=false) 
+	{
+		$this->fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode);
+		return !empty($this->fields);
+	}
+	
+	function _close() 
+	{
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlitepo.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlitepo.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sqlitepo.inc.php	(revision 225)
@@ -0,0 +1,62 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+
+  Portable version of sqlite driver, to make it more similar to other database drivers.
+  The main differences are
+
+   1. When selecting (joining) multiple tables, in assoc mode the table
+   	  names are included in the assoc keys in the "sqlite" driver.
+	  
+	  In "sqlitepo" driver, the table names are stripped from the returned column names. 
+	  When this results in a conflict,  the first field get preference.
+
+	Contributed by Herman Kuiper  herman#ozuzo.net  
+*/
+
+if (!defined('ADODB_DIR')) die();
+
+include_once(ADODB_DIR.'/drivers/adodb-sqlite.inc.php');
+
+class ADODB_sqlitepo extends ADODB_sqlite {
+   var $databaseType = 'sqlitepo';
+
+   function ADODB_sqlitepo()
+   {
+      $this->ADODB_sqlite();
+   }
+}
+
+/*--------------------------------------------------------------------------------------
+       Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+class ADORecordset_sqlitepo extends ADORecordset_sqlite {
+
+   var $databaseType = 'sqlitepo';
+
+   function ADORecordset_sqlitepo($queryID,$mode=false)
+   {
+      $this->ADORecordset_sqlite($queryID,$mode);
+   }
+   
+   // Modified to strip table names from returned fields
+   function _fetch($ignore_fields=false)
+   {
+      $this->fields = array();
+      $fields = @sqlite_fetch_array($this->_queryID,$this->fetchMode);
+      if(is_array($fields))
+         foreach($fields as $n => $v)
+         {
+            if(($p = strpos($n, ".")) !== false)
+               $n = substr($n, $p+1);
+            $this->fields[$n] = $v;
+         }
+
+      return !empty($this->fields);
+   }
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sybase.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sybase.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sybase.inc.php	(revision 225)
@@ -0,0 +1,418 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim. All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Sybase driver contributed by Toni (toni.tunkkari@finebyte.com)
+  
+  - MSSQL date patch applied.
+  
+  Date patch by Toni 15 Feb 2002
+*/
+ 
+ // security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class ADODB_sybase extends ADOConnection {
+	var $databaseType = "sybase";	
+	var $dataProvider = 'sybase';
+	var $replaceQuote = "''"; // string to use to replace quotes
+	var $fmtDate = "'Y-m-d'";
+	var $fmtTimeStamp = "'Y-m-d H:i:s'";
+	var $hasInsertID = true;
+	var $hasAffectedRows = true;
+  	var $metaTablesSQL="select name from sysobjects where type='U' or type='V'";
+	// see http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=5981;uf=0?target=0;window=new;showtoc=true;book=dbrfen8
+	var $metaColumnsSQL = "SELECT c.column_name, c.column_type, c.width FROM syscolumn c, systable t WHERE t.table_name='%s' AND c.table_id=t.table_id AND t.table_type='BASE'";
+	/*
+	"select c.name,t.name,c.length from 
+	syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id 
+	where o.name='%s'";
+	*/
+	var $concat_operator = '+'; 
+	var $arrayClass = 'ADORecordSet_array_sybase';
+	var $sysDate = 'GetDate()';
+	var $leftOuter = '*=';
+	var $rightOuter = '=*';
+	
+	function ADODB_sybase() 
+	{			
+	}
+ 
+	// might require begintrans -- committrans
+	function _insertid()
+	{
+		return $this->GetOne('select @@identity');
+	}
+	  // might require begintrans -- committrans
+	function _affectedrows()
+	{
+	   return $this->GetOne('select @@rowcount');
+	}
+
+			  
+	function BeginTrans()
+	{	
+	
+		if ($this->transOff) return true;
+		$this->transCnt += 1;
+		   
+		$this->Execute('BEGIN TRAN');
+		return true;
+	}
+	
+	function CommitTrans($ok=true) 
+	{ 
+		if ($this->transOff) return true;
+		
+		if (!$ok) return $this->RollbackTrans();
+	
+		$this->transCnt -= 1;
+		$this->Execute('COMMIT TRAN');
+		return true;
+	}
+	
+	function RollbackTrans()
+	{
+		if ($this->transOff) return true;
+		$this->transCnt -= 1;
+		$this->Execute('ROLLBACK TRAN');
+		return true;
+	}
+	
+	// http://www.isug.com/Sybase_FAQ/ASE/section6.1.html#6.1.4
+	function RowLock($tables,$where,$flds='top 1 null as ignore') 
+	{
+		if (!$this->_hastrans) $this->BeginTrans();
+		$tables = str_replace(',',' HOLDLOCK,',$tables);
+		return $this->GetOne("select $flds from $tables HOLDLOCK where $where");
+		
+	}	
+		
+	function SelectDB($dbName) 
+	{
+		$this->database = $dbName;
+		$this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions
+		if ($this->_connectionID) {
+			return @sybase_select_db($dbName);		
+		}
+		else return false;	
+	}
+
+	/*	Returns: the last error message from previous database operation
+		Note: This function is NOT available for Microsoft SQL Server.	*/	
+
+	
+	function ErrorMsg()
+	{
+		if ($this->_logsql) return $this->_errorMsg;
+		if (function_exists('sybase_get_last_message'))
+			$this->_errorMsg = sybase_get_last_message();
+		else
+			$this->_errorMsg = isset($php_errormsg) ? $php_errormsg : 'SYBASE error messages not supported on this platform';
+		return $this->_errorMsg;
+	}
+
+	// returns true or false
+	function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('sybase_connect')) return null;
+		
+		$this->_connectionID = sybase_connect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	// returns true or false
+	function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
+	{
+		if (!function_exists('sybase_connect')) return null;
+		
+		$this->_connectionID = sybase_pconnect($argHostname,$argUsername,$argPassword);
+		if ($this->_connectionID === false) return false;
+		if ($argDatabasename) return $this->SelectDB($argDatabasename);
+		return true;	
+	}
+	
+	// returns query ID if successful, otherwise false
+	function _query($sql,$inputarr)
+	{
+	global $ADODB_COUNTRECS;
+	
+		if ($ADODB_COUNTRECS == false && ADODB_PHPVER >= 0x4300)
+			return sybase_unbuffered_query($sql,$this->_connectionID);
+		else
+			return sybase_query($sql,$this->_connectionID);
+	}
+	
+	// See http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#6.2.12
+	function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+	{
+		if ($secs2cache > 0) {// we do not cache rowcount, so we have to load entire recordset
+			$rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+			return $rs;
+		}
+		
+		$nrows = (integer) $nrows;
+		$offset = (integer) $offset;
+		
+		$cnt = ($nrows >= 0) ? $nrows : 999999999;
+		if ($offset > 0 && $cnt) $cnt += $offset;
+		
+		$this->Execute("set rowcount $cnt"); 
+		$rs =& ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,0);
+		$this->Execute("set rowcount 0");
+		
+		return $rs;
+	}
+
+	// returns true or false
+	function _close()
+	{ 
+		return @sybase_close($this->_connectionID);
+	}
+	
+	function UnixDate($v)
+	{
+		return ADORecordSet_array_sybase::UnixDate($v);
+	}
+	
+	function UnixTimeStamp($v)
+	{
+		return ADORecordSet_array_sybase::UnixTimeStamp($v);
+	}	
+	
+	
+
+	# Added 2003-10-05 by Chris Phillipson
+    # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=16756?target=%25N%15_12018_START_RESTART_N%25
+    # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version
+    // Format date column in sql string given an input format that understands Y M D
+    function SQLDate($fmt, $col=false)
+    {
+        if (!$col) $col = $this->sysTimeStamp;
+        $s = '';
+
+        $len = strlen($fmt);
+        for ($i=0; $i < $len; $i++) {
+            if ($s) $s .= '+';
+            $ch = $fmt[$i];
+            switch($ch) {
+            case 'Y':
+            case 'y':
+                $s .= "datename(yy,$col)";
+                break;
+            case 'M':
+                $s .= "convert(char(3),$col,0)";
+                break;
+            case 'm':
+                $s .= "replace(str(month($col),2),' ','0')";
+                break;
+            case 'Q':
+            case 'q':
+                $s .= "datename(qq,$col)";
+                break;
+            case 'D':
+            case 'd':
+                $s .= "replace(str(datepart(dd,$col),2),' ','0')";
+                break;
+            case 'h':
+                $s .= "substring(convert(char(14),$col,0),13,2)";
+                break;
+
+            case 'H':
+                $s .= "replace(str(datepart(hh,$col),2),' ','0')";
+                break;
+
+            case 'i':
+                $s .= "replace(str(datepart(mi,$col),2),' ','0')";
+                break;
+            case 's':
+                $s .= "replace(str(datepart(ss,$col),2),' ','0')";
+                break;
+            case 'a':
+            case 'A':
+                $s .= "substring(convert(char(19),$col,0),18,2)";
+                break;
+
+            default:
+                if ($ch == '\\') {
+                    $i++;
+                    $ch = substr($fmt,$i,1);
+                }
+                $s .= $this->qstr($ch);
+                break;
+            }
+        }
+        return $s;
+    }
+	
+	# Added 2003-10-07 by Chris Phillipson
+    # Used ASA SQL Reference Manual -- http://sybooks.sybase.com/onlinebooks/group-aw/awg0800e/dbrfen8/@ebt-link;pt=5981;uf=0?target=0;window=new;showtoc=true;book=dbrfen8
+    # to convert similar Microsoft SQL*Server (mssql) API into Sybase compatible version
+    function MetaPrimaryKeys($table)
+    {
+        $sql = "SELECT c.column_name " .
+               "FROM syscolumn c, systable t " .
+               "WHERE t.table_name='$table' AND c.table_id=t.table_id " .
+               "AND t.table_type='BASE' " .
+               "AND c.pkey = 'Y' " .
+               "ORDER BY c.column_id";
+
+        $a = $this->GetCol($sql);
+        if ($a && sizeof($a)>0) return $a;
+        return false;
+    }
+}
+	
+/*--------------------------------------------------------------------------------------
+	 Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+global $ADODB_sybase_mths;
+$ADODB_sybase_mths = array(
+	'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,
+	'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12);
+
+class ADORecordset_sybase extends ADORecordSet {	
+
+	var $databaseType = "sybase";
+	var $canSeek = true;
+	// _mths works only in non-localised system
+	var  $_mths = array('JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6,'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12);	
+
+	function ADORecordset_sybase($id,$mode=false)
+	{
+		if ($mode === false) { 
+			global $ADODB_FETCH_MODE;
+			$mode = $ADODB_FETCH_MODE;
+		}
+		if (!$mode) $this->fetchMode = ADODB_FETCH_ASSOC;
+		else $this->fetchMode = $mode;
+		$this->ADORecordSet($id,$mode);
+	}
+	
+	/*	Returns: an object containing field information. 
+		Get column information in the Recordset object. fetchField() can be used in order to obtain information about
+		fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
+		fetchField() is retrieved.	*/
+	function &FetchField($fieldOffset = -1) 
+	{
+		if ($fieldOffset != -1) {
+			$o = @sybase_fetch_field($this->_queryID, $fieldOffset);
+		}
+		else if ($fieldOffset == -1) {	/*	The $fieldOffset argument is not provided thus its -1 	*/
+			$o = @sybase_fetch_field($this->_queryID);
+		}
+		// older versions of PHP did not support type, only numeric
+		if ($o && !isset($o->type)) $o->type = ($o->numeric) ? 'float' : 'varchar';
+		return $o;
+	}
+	
+	function _initrs()
+	{
+	global $ADODB_COUNTRECS;
+		$this->_numOfRows = ($ADODB_COUNTRECS)? @sybase_num_rows($this->_queryID):-1;
+		$this->_numOfFields = @sybase_num_fields($this->_queryID);
+	}
+	
+	function _seek($row) 
+	{
+		return @sybase_data_seek($this->_queryID, $row);
+	}		
+
+	function _fetch($ignore_fields=false) 
+	{
+		if ($this->fetchMode == ADODB_FETCH_NUM) {
+			$this->fields = @sybase_fetch_row($this->_queryID);
+		} else if ($this->fetchMode == ADODB_FETCH_ASSOC) {
+			$this->fields = @sybase_fetch_row($this->_queryID);
+			if (is_array($this->fields)) {
+				$this->fields = $this->GetRowAssoc(ADODB_ASSOC_CASE);
+				return true;
+			}
+			return false;
+		}  else {
+			$this->fields = @sybase_fetch_array($this->_queryID);
+		}
+		if ( is_array($this->fields)) {
+			return true;
+		}
+
+		return false;
+	}
+	
+	/*	close() only needs to be called if you are worried about using too much memory while your script
+		is running. All associated result memory for the specified result identifier will automatically be freed.	*/
+	function _close() {
+		return @sybase_free_result($this->_queryID);		
+	}
+	
+	// sybase/mssql uses a default date like Dec 30 2000 12:00AM
+	function UnixDate($v)
+	{
+		return ADORecordSet_array_sybase::UnixDate($v);
+	}
+	
+	function UnixTimeStamp($v)
+	{
+		return ADORecordSet_array_sybase::UnixTimeStamp($v);
+	}
+}
+
+class ADORecordSet_array_sybase extends ADORecordSet_array {
+	function ADORecordSet_array_sybase($id=-1)
+	{
+		$this->ADORecordSet_array($id);
+	}
+	
+		// sybase/mssql uses a default date like Dec 30 2000 12:00AM
+	function UnixDate($v)
+	{
+	global $ADODB_sybase_mths;
+	
+		//Dec 30 2000 12:00AM
+		if (!ereg( "([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})"
+			,$v, $rr)) return parent::UnixDate($v);
+			
+		if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+		
+		$themth = substr(strtoupper($rr[1]),0,3);
+		$themth = $ADODB_sybase_mths[$themth];
+		if ($themth <= 0) return false;
+		// h-m-s-MM-DD-YY
+		return  mktime(0,0,0,$themth,$rr[2],$rr[3]);
+	}
+	
+	function UnixTimeStamp($v)
+	{
+	global $ADODB_sybase_mths;
+		//11.02.2001 Toni Tunkkari toni.tunkkari@finebyte.com
+		//Changed [0-9] to [0-9 ] in day conversion
+		if (!ereg( "([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})"
+			,$v, $rr)) return parent::UnixTimeStamp($v);
+		if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0;
+		
+		$themth = substr(strtoupper($rr[1]),0,3);
+		$themth = $ADODB_sybase_mths[$themth];
+		if ($themth <= 0) return false;
+		
+		switch (strtoupper($rr[6])) {
+		case 'P':
+			if ($rr[4]<12) $rr[4] += 12;
+			break;
+		case 'A':
+			if ($rr[4]==12) $rr[4] = 0;
+			break;
+		default:
+			break;
+		}
+		// h-m-s-MM-DD-YY
+		return  mktime($rr[4],$rr[5],0,$themth,$rr[2],$rr[3]);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sybase_ase.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sybase_ase.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-sybase_ase.inc.php	(revision 225)
@@ -0,0 +1,119 @@
+<?php
+/*
+  V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  
+  Set tabs to 4.
+  
+  Contributed by Interakt Online. Thx Cristian MARIN cristic#interaktonline.com
+*/
+
+
+require_once ADODB_DIR."/drivers/adodb-sybase.inc.php";
+
+class ADODB_sybase_ase extends ADODB_sybase {
+ 	var $databaseType = "sybase_ase";
+	
+	 var $metaTablesSQL="SELECT sysobjects.name FROM sysobjects, sysusers WHERE sysobjects.type='U' AND sysobjects.uid = sysusers.uid";
+	 var $metaColumnsSQL = "SELECT syscolumns.name AS field_name, systypes.name AS type, systypes.length AS width FROM sysobjects, syscolumns, systypes WHERE sysobjects.name='%s' AND syscolumns.id = sysobjects.id AND systypes.type=syscolumns.type";
+	 var $metaDatabasesSQL ="SELECT a.name FROM master.dbo.sysdatabases a, master.dbo.syslogins b WHERE a.suid = b.suid and a.name like '%' and a.name != 'tempdb' and a.status3 != 256  order by 1";
+
+	function ADODB_sybase_ase()
+	{
+	}
+	
+	// split the Views, Tables and procedures.
+	function &MetaTables($ttype=false,$showSchema=false,$mask=false)
+	{
+		$false = false;
+		if ($this->metaTablesSQL) {
+			// complicated state saving by the need for backward compat
+			
+			if ($ttype == 'VIEWS'){
+						$sql = str_replace('U', 'V', $this->metaTablesSQL);
+			}elseif (false === $ttype){
+						$sql = str_replace('U',"U' OR type='V", $this->metaTablesSQL);
+			}else{ // TABLES OR ANY OTHER 
+						$sql = $this->metaTablesSQL;
+			}
+			$rs = $this->Execute($sql);
+			
+			if ($rs === false || !method_exists($rs, 'GetArray')){
+					return $false;
+			}
+			$arr =& $rs->GetArray();
+
+			$arr2 = array();
+			foreach($arr as $key=>$value){
+					$arr2[] = trim($value['name']);
+			}
+			return $arr2;
+		}
+		return $false;
+	}
+
+	function MetaDatabases()
+	{
+			$arr = array();
+			if ($this->metaDatabasesSQL!='') {
+				$rs = $this->Execute($this->metaDatabasesSQL);
+				if ($rs && !$rs->EOF){
+					while (!$rs->EOF){
+						$arr[] = $rs->Fields('name');
+						$rs->MoveNext();
+					}
+					return $arr;
+				}
+			}
+			return false;
+	}
+
+	// fix a bug which prevent the metaColumns query to be executed for Sybase ASE
+	function &MetaColumns($table,$upper=false) 
+	{
+		$false = false;
+		if (!empty($this->metaColumnsSQL)) {
+		
+			$rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+			if ($rs === false) return $false;
+
+			$retarr = array();
+			while (!$rs->EOF) {
+				$fld =& new ADOFieldObject();
+				$fld->name = $rs->Fields('field_name');
+				$fld->type = $rs->Fields('type');
+				$fld->max_length = $rs->Fields('width');
+				$retarr[strtoupper($fld->name)] = $fld;
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			return $retarr;	
+		}
+		return $false;
+	}
+	
+	function getProcedureList($schema)
+	{
+			return false;
+	}
+
+	function ErrorMsg()
+	{
+		if (!function_exists('sybase_connect')){
+				return 'Your PHP doesn\'t contain the Sybase connection module!';
+		}
+		return parent::ErrorMsg();	
+	}
+}
+
+class adorecordset_sybase_ase extends ADORecordset_sybase {
+var $databaseType = "sybase_ase";
+function ADORecordset_sybase_ase($id,$mode=false)
+	{
+		$this->ADORecordSet_sybase($id,$mode);
+	}
+	
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-vfp.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-vfp.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/drivers/adodb-vfp.inc.php	(revision 225)
@@ -0,0 +1,107 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Microsoft Visual FoxPro data driver. Requires ODBC. Works only on MS Windows.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+if (!defined('_ADODB_ODBC_LAYER')) {
+	include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
+}
+if (!defined('ADODB_VFP')){
+define('ADODB_VFP',1);
+class ADODB_vfp extends ADODB_odbc {
+	var $databaseType = "vfp";	
+	var $fmtDate = "{^Y-m-d}";
+	var $fmtTimeStamp = "{^Y-m-d, h:i:sA}";
+	var $replaceQuote = "'+chr(39)+'" ;
+	var $true = '.T.';
+	var $false = '.F.';
+	var $hasTop = 'top';		// support mssql SELECT TOP 10 * FROM TABLE
+	var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
+	var $sysTimeStamp = 'datetime()';
+	var $sysDate = 'date()';
+	var $ansiOuter = true;
+	var $hasTransactions = false;
+	var $curmode = false ; // See sqlext.h, SQL_CUR_DEFAULT == SQL_CUR_USE_DRIVER == 2L
+	
+	function ADODB_vfp()
+	{
+		$this->ADODB_odbc();
+	}
+	
+	function Time()
+	{
+		return time();
+	}
+	
+	function BeginTrans() { return false;}
+	
+	// quote string to be sent back to database
+	function qstr($s,$nofixquotes=false)
+	{
+		if (!$nofixquotes) return  "'".str_replace("\r\n","'+chr(13)+'",str_replace("'",$this->replaceQuote,$s))."'";
+		return "'".$s."'";
+	}
+
+	
+	// TOP requires ORDER BY for VFP
+	function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
+	{
+		$this->hasTop = preg_match('/ORDER[ \t\r\n]+BY/is',$sql) ? 'top' : false;
+		$ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
+		return $ret;
+	}
+	
+
+
+};
+ 
+
+class  ADORecordSet_vfp extends ADORecordSet_odbc {	
+	
+	var $databaseType = "vfp";		
+
+	
+	function ADORecordSet_vfp($id,$mode=false)
+	{
+		return $this->ADORecordSet_odbc($id,$mode);
+	}
+
+	function MetaType($t,$len=-1)
+	{
+		if (is_object($t)) {
+			$fieldobj = $t;
+			$t = $fieldobj->type;
+			$len = $fieldobj->max_length;
+		}
+		switch (strtoupper($t)) {
+		case 'C':
+			if ($len <= $this->blobSize) return 'C';
+		case 'M':
+			return 'X';
+			 
+		case 'D': return 'D';
+		
+		case 'T': return 'T';
+		
+		case 'L': return 'L';
+		
+		case 'I': return 'I';
+		
+		default: return 'N';
+		}
+	}
+}
+
+} //define
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ar.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ar.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ar.inc.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+// by "El-Shamaa, Khaled" <k.el-shamaa#cgiar.org>
+$ADODB_LANG_ARRAY = array (
+			'LANG'			    => 'ar',
+	    DB_ERROR			=> 'ÎØÃ ÛíÑ ãÍÏÏ',
+	    DB_ERROR_ALREADY_EXISTS	=> 'ãæÌæÏ ãÓÈÞÇ',
+	    DB_ERROR_CANNOT_CREATE	=> 'áÇ íãßä ÅäÔÇÁ',
+	    DB_ERROR_CANNOT_DELETE	=> 'áÇ íãßä ÍÐÝ',
+	    DB_ERROR_CANNOT_DROP	=> 'áÇ íãßä ÍÐÝ',
+	    DB_ERROR_CONSTRAINT 	=> 'ÚãáíÉ ÅÏÎÇá ããäæÚÉ',
+	    DB_ERROR_DIVZERO		=> 'ÚãáíÉ ÇáÊÞÓíã Úáì ÕÝÑ',
+	    DB_ERROR_INVALID		=> 'ÛíÑ ÕÍíÍ',
+	    DB_ERROR_INVALID_DATE	=> 'ÕíÛÉ æÞÊ Ãæ ÊÇÑíÎ ÛíÑ ÕÍíÍÉ',
+	    DB_ERROR_INVALID_NUMBER	=> 'ÕíÛÉ ÑÞã ÛíÑ ÕÍíÍÉ',
+	    DB_ERROR_MISMATCH		=> 'ÛíÑ ãÊØÇÈÞ',
+	    DB_ERROR_NODBSELECTED	=> 'áã íÊã ÅÎÊíÇÑ ÞÇÚÏÉ ÇáÈíÇäÇÊ ÈÚÏ',
+	    DB_ERROR_NOSUCHFIELD	=> 'áíÓ åäÇáß ÍÞá ÈåÐÇ ÇáÇÓã',
+	    DB_ERROR_NOSUCHTABLE	=> 'áíÓ åäÇáß ÌÏæá ÈåÐÇ ÇáÇÓã',
+	    DB_ERROR_NOT_CAPABLE	=> 'ÞÇÚÏÉ ÇáÈíÇäÇÊ ÇáãÑÊÈØ ÈåÇ ÛíÑ ÞÇÏÑÉ',
+	    DB_ERROR_NOT_FOUND		=> 'áã íÊã ÅíÌÇÏå',
+	    DB_ERROR_NOT_LOCKED 	=> 'ÛíÑ ãÞÝæá',
+	    DB_ERROR_SYNTAX		=> 'ÎØÃ Ýí ÇáÕíÛÉ',
+	    DB_ERROR_UNSUPPORTED	=> 'ÛíÑ ãÏÚæã',
+	    DB_ERROR_VALUE_COUNT_ON_ROW => 'ÚÏÏ ÇáÞíã Ýí ÇáÓÌá',
+	    DB_ERROR_INVALID_DSN	=> 'DSN ÛíÑ ÕÍíÍ',
+	    DB_ERROR_CONNECT_FAILED	=> 'ÝÔá ÚãáíÉ ÇáÅÊÕÇá',
+	    0			       => 'áíÓ åäÇáß ÃÎØÇÁ', // DB_OK
+	    DB_ERROR_NEED_MORE_DATA	=> 'ÇáÈíÇäÇÊ ÇáãÒæÏÉ ÛíÑ ßÇÝíÉ',
+	    DB_ERROR_EXTENSION_NOT_FOUND=> 'áã íÊã ÅíÌÇÏ ÇáÅÖÇÝÉ ÇáãÊÚáÞÉ',
+	    DB_ERROR_NOSUCHDB		=> 'áíÓ åäÇáß ÞÇÚÏÉ ÈíÇäÇÊ ÈåÐÇ ÇáÇÓã',
+	    DB_ERROR_ACCESS_VIOLATION	=> 'ÓãÇÍíÇÊ ÛíÑ ßÇÝíÉ'
+);
+?>
+		
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-bg.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-bg.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-bg.inc.php	(revision 225)
@@ -0,0 +1,38 @@
+<?php
+/*
+	Bulgarian language, v1.0, 25.03.2004, encoding by Windows-1251 charset
+	contributed by Valentin Sheiretsky <valio#valio.eu.org>
+*/
+
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'bg',
+            DB_ERROR                    => 'íåèçâåñòíà ãðåøêà',
+            DB_ERROR_ALREADY_EXISTS     => 'âå÷å ñúùåñòâóâà',
+            DB_ERROR_CANNOT_CREATE      => 'íå ìîæå äà áúäå ñúçäàäåíà',
+            DB_ERROR_CANNOT_DELETE      => 'íå ìîæå äà áúäå èçòðèòà',
+            DB_ERROR_CANNOT_DROP        => 'íå ìîæå äà áúäå óíèùîæåíà',
+            DB_ERROR_CONSTRAINT         => 'íàðóøåíî óñëîâèå',
+            DB_ERROR_DIVZERO            => 'äåëåíèå íà íóëà',
+            DB_ERROR_INVALID            => 'íåïðàâèëíî',
+            DB_ERROR_INVALID_DATE       => 'íåêîðåêòíà äàòà èëè ÷àñ',
+            DB_ERROR_INVALID_NUMBER     => 'íåâàëèäåí íîìåð',
+            DB_ERROR_MISMATCH           => 'ïîãðåøíà óïîòðåáà',
+            DB_ERROR_NODBSELECTED       => 'íå å èçáðàíà áàçà äàííè',
+            DB_ERROR_NOSUCHFIELD        => 'íåñúùåñòâóâàùî ïîëå',
+            DB_ERROR_NOSUCHTABLE        => 'íåñúùåñòâóâàùà òàáëèöà',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend not capable',
+            DB_ERROR_NOT_FOUND          => 'íå å íàìåðåíà',
+            DB_ERROR_NOT_LOCKED         => 'íå å çàêëþ÷åíà',
+            DB_ERROR_SYNTAX             => 'ãðåøåí ñèíòàêñèñ',
+            DB_ERROR_UNSUPPORTED        => 'íå ñå ïîääúðæà',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'íåêîðåêòåí áðîé êîëîíè â ðåäà',
+            DB_ERROR_INVALID_DSN        => 'íåâàëèäåí DSN',
+            DB_ERROR_CONNECT_FAILED     => 'âðúçêàòà íå ìîæå äà áúäå îñúùåñòâåíà',
+            0	                        => 'íÿìà ãðåøêè', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'ïðåäîñòàâåíèòå äàííè ñà íåäîñòàòú÷íè',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ðàçøèðåíèåòî íå å íàìåðåíî',
+            DB_ERROR_NOSUCHDB           => 'íåñúùåñòâóâàùà áàçà äàííè',
+            DB_ERROR_ACCESS_VIOLATION   => 'íÿìàòå äîñòàòú÷íî ïðàâà'
+);
+?>
+		
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-bgutf8.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-bgutf8.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-bgutf8.inc.php	(revision 225)
@@ -0,0 +1,38 @@
+﻿<?php
+/*
+	Bulgarian language, v1.0, 25.03.2004, encoding by UTF-8 charset
+	contributed by Valentin Sheiretsky <valio#valio.eu.org>
+*/
+
+$ADODB_LANG_ARRAY = array (
+            'LANG'                      => 'bgutf8',
+            DB_ERROR                    => 'неизвестна грешка',
+            DB_ERROR_ALREADY_EXISTS     => 'вече съществува',
+            DB_ERROR_CANNOT_CREATE      => 'не може да бъде създадена',
+            DB_ERROR_CANNOT_DELETE      => 'не може да бъде изтрита',
+            DB_ERROR_CANNOT_DROP        => 'не може да бъде унищожена',
+            DB_ERROR_CONSTRAINT         => 'нарушено условие',
+            DB_ERROR_DIVZERO            => 'деление на нула',
+            DB_ERROR_INVALID            => 'неправилно',
+            DB_ERROR_INVALID_DATE       => 'некоректна дата или час',
+            DB_ERROR_INVALID_NUMBER     => 'невалиден номер',
+            DB_ERROR_MISMATCH           => 'погрешна употреба',
+            DB_ERROR_NODBSELECTED       => 'не е избрана база данни',
+            DB_ERROR_NOSUCHFIELD        => 'несъществуващо поле',
+            DB_ERROR_NOSUCHTABLE        => 'несъществуваща таблица',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend not capable',
+            DB_ERROR_NOT_FOUND          => 'не е намерена',
+            DB_ERROR_NOT_LOCKED         => 'не е заключена',
+            DB_ERROR_SYNTAX             => 'грешен синтаксис',
+            DB_ERROR_UNSUPPORTED        => 'не се поддържа',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда',
+            DB_ERROR_INVALID_DSN        => 'невалиден DSN',
+            DB_ERROR_CONNECT_FAILED     => 'връзката не може да бъде осъществена',
+            0	                        => 'няма грешки', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'предоставените данни са недостатъчни',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено',
+            DB_ERROR_NOSUCHDB           => 'несъществуваща база данни',
+            DB_ERROR_ACCESS_VIOLATION   => 'нямате достатъчно права'
+);
+?>
+		
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ca.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ca.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ca.inc.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+// Catalan language
+// contributed by "Josep Lladonosa" jlladono#pie.xtec.es
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'ca',
+            DB_ERROR                    => 'error desconegut',
+            DB_ERROR_ALREADY_EXISTS     => 'ja existeix',
+            DB_ERROR_CANNOT_CREATE      => 'no es pot crear',
+            DB_ERROR_CANNOT_DELETE      => 'no es pot esborrar',
+            DB_ERROR_CANNOT_DROP        => 'no es pot eliminar',
+            DB_ERROR_CONSTRAINT         => 'violació de constraint',
+            DB_ERROR_DIVZERO            => 'divisió per zero',
+            DB_ERROR_INVALID            => 'no és vàlid',
+            DB_ERROR_INVALID_DATE       => 'la data o l\'hora no són vàlides',
+            DB_ERROR_INVALID_NUMBER     => 'el nombre no és vàlid',
+            DB_ERROR_MISMATCH           => 'no hi ha coincidència',
+            DB_ERROR_NODBSELECTED       => 'cap base de dades seleccionada',
+            DB_ERROR_NOSUCHFIELD        => 'camp inexistent',
+            DB_ERROR_NOSUCHTABLE        => 'taula inexistent',
+            DB_ERROR_NOT_CAPABLE        => 'l\'execució secundària de DB no pot',
+            DB_ERROR_NOT_FOUND          => 'no trobat',
+            DB_ERROR_NOT_LOCKED         => 'no blocat',
+            DB_ERROR_SYNTAX             => 'error de sintaxi',
+            DB_ERROR_UNSUPPORTED        => 'no suportat',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila',
+            DB_ERROR_INVALID_DSN        => 'el DSN no és vàlid',
+            DB_ERROR_CONNECT_FAILED     => 'connexió fallida',
+            0	                       => 'cap error', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'les dades subministrades són insuficients',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensió no trobada',
+            DB_ERROR_NOSUCHDB           => 'base de dades inexistent',
+            DB_ERROR_ACCESS_VIOLATION   => 'permisos insuficients'
+);
+?>
+		
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-cn.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-cn.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-cn.inc.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+// Chinese language file contributed by "Cuiyan (cysoft)" cysoft#php.net.
+// Encode by GB2312
+// Simplified Chinese
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'cn',
+            DB_ERROR                    => 'ÎŽÖªŽíÎó',
+            DB_ERROR_ALREADY_EXISTS     => 'ÒÑŸ­ŽæÔÚ',
+            DB_ERROR_CANNOT_CREATE      => '²»ÄÜŽŽœš',
+            DB_ERROR_CANNOT_DELETE      => '²»ÄÜÉŸ³ý',
+            DB_ERROR_CANNOT_DROP        => '²»ÄÜ¶ªÆú',
+            DB_ERROR_CONSTRAINT         => 'ÔŒÊøÏÞÖÆ',
+            DB_ERROR_DIVZERO            => '±»0³ý',
+            DB_ERROR_INVALID            => 'ÎÞÐ§',
+            DB_ERROR_INVALID_DATE       => 'ÎÞÐ§µÄÈÕÆÚ»òÕßÊ±Œä',
+            DB_ERROR_INVALID_NUMBER     => 'ÎÞÐ§µÄÊý×Ö',
+            DB_ERROR_MISMATCH           => '²»Æ¥Åä',
+            DB_ERROR_NODBSELECTED       => 'Ã»ÓÐÊýŸÝ¿â±»Ñ¡Ôñ',
+            DB_ERROR_NOSUCHFIELD        => 'Ã»ÓÐÏàÓŠµÄ×Ö¶Î',
+            DB_ERROR_NOSUCHTABLE        => 'Ã»ÓÐÏàÓŠµÄ±í',
+            DB_ERROR_NOT_CAPABLE        => 'ÊýŸÝ¿âºóÌš²»ŒæÈÝ',
+            DB_ERROR_NOT_FOUND          => 'Ã»ÓÐ·¢ÏÖ',
+            DB_ERROR_NOT_LOCKED         => 'Ã»ÓÐ±»Ëø¶š',
+            DB_ERROR_SYNTAX             => 'Óï·šŽíÎó',
+            DB_ERROR_UNSUPPORTED        => '²»Ö§³Ö',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'ÔÚÐÐÉÏÀÛŒÆÖµ',
+            DB_ERROR_INVALID_DSN        => 'ÎÞÐ§µÄÊýŸÝÔŽ (DSN)',
+            DB_ERROR_CONNECT_FAILED     => 'Á¬œÓÊ§°Ü',
+            0	                       => 'Ã»ÓÐŽíÎó', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'Ìá¹©µÄÊýŸÝ²»ÄÜ·ûºÏÒªÇó',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'À©Õ¹Ã»ÓÐ±»·¢ÏÖ',
+            DB_ERROR_NOSUCHDB           => 'Ã»ÓÐÏàÓŠµÄÊýŸÝ¿â',
+            DB_ERROR_ACCESS_VIOLATION   => 'Ã»ÓÐºÏÊÊµÄÈšÏÞ'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-cz.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-cz.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-cz.inc.php	(revision 225)
@@ -0,0 +1,40 @@
+<?php
+
+# Czech language, encoding by ISO 8859-2 charset (Iso Latin-2)
+# For convert to MS Windows use shell command:
+#    iconv -f ISO_8859-2 -t CP1250 < adodb-cz.inc.php
+# For convert to ASCII use shell command:
+#    unaccent ISO_8859-2 < adodb-cz.inc.php
+# v1.0, 19.06.2003 Kamil Jakubovic <jake@host.sk>
+
+$ADODB_LANG_ARRAY = array (
+            'LANG'                      => 'cz',
+            DB_ERROR                    => 'neznámá chyba',
+            DB_ERROR_ALREADY_EXISTS     => 'ji? existuje',
+            DB_ERROR_CANNOT_CREATE      => 'nelze vytvo?it',
+            DB_ERROR_CANNOT_DELETE      => 'nelze smazat',
+            DB_ERROR_CANNOT_DROP        => 'nelze odstranit',
+            DB_ERROR_CONSTRAINT         => 'poru?ení omezující podmínky',
+            DB_ERROR_DIVZERO            => 'd?lení nulou',
+            DB_ERROR_INVALID            => 'neplatné',
+            DB_ERROR_INVALID_DATE       => 'neplatné datum nebo ?as',
+            DB_ERROR_INVALID_NUMBER     => 'neplatné ?íslo',
+            DB_ERROR_MISMATCH           => 'nesouhlasí',
+            DB_ERROR_NODBSELECTED       => '?ádná databáze není vybrána',
+            DB_ERROR_NOSUCHFIELD        => 'pole nenalezeno',
+            DB_ERROR_NOSUCHTABLE        => 'tabulka nenalezena',
+            DB_ERROR_NOT_CAPABLE        => 'nepodporováno',
+            DB_ERROR_NOT_FOUND          => 'nenalezeno',
+            DB_ERROR_NOT_LOCKED         => 'nezam?eno',
+            DB_ERROR_SYNTAX             => 'syntaktická chyba',
+            DB_ERROR_UNSUPPORTED        => 'nepodporováno',
+            DB_ERROR_VALUE_COUNT_ON_ROW => '',
+            DB_ERROR_INVALID_DSN        => 'neplatné DSN',
+            DB_ERROR_CONNECT_FAILED     => 'p?ipojení selhalo',
+            0	                        => 'bez chyb', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'málo zdrojových dat',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'roz?í?ení nenalezeno',
+            DB_ERROR_NOSUCHDB           => 'databáze neexistuje',
+            DB_ERROR_ACCESS_VIOLATION   => 'nedostate?ná práva'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-da.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-da.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-da.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+// Arne Eckmann bananstat#users.sourceforge.net
+$ADODB_LANG_ARRAY = array (
+  	    'LANG'                      => 'da',
+            DB_ERROR                    => 'ukendt fejl',
+            DB_ERROR_ALREADY_EXISTS     => 'eksisterer allerede',
+            DB_ERROR_CANNOT_CREATE      => 'kan ikke oprette',
+            DB_ERROR_CANNOT_DELETE      => 'kan ikke slette',
+            DB_ERROR_CANNOT_DROP        => 'kan ikke droppe',
+            DB_ERROR_CONSTRAINT         => 'begr&aelig;nsning kr&aelig;nket',
+            DB_ERROR_DIVZERO            => 'division med nul',
+            DB_ERROR_INVALID            => 'ugyldig',
+            DB_ERROR_INVALID_DATE       => 'ugyldig dato eller klokkeslet',
+            DB_ERROR_INVALID_NUMBER     => 'ugyldigt tal',
+            DB_ERROR_MISMATCH           => 'mismatch',
+            DB_ERROR_NODBSELECTED       => 'ingen database valgt',
+            DB_ERROR_NOSUCHFIELD        => 'felt findes ikke',
+            DB_ERROR_NOSUCHTABLE        => 'tabel findes ikke',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend opgav',
+            DB_ERROR_NOT_FOUND          => 'ikke fundet',
+            DB_ERROR_NOT_LOCKED         => 'ikke l&aring;st',
+            DB_ERROR_SYNTAX             => 'syntaksfejl',
+            DB_ERROR_UNSUPPORTED        => 'ikke underst&oslash;ttet',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til foresp&oslash;rgslens antal felter',
+            DB_ERROR_INVALID_DSN        => 'ugyldig DSN',
+            DB_ERROR_CONNECT_FAILED     => 'tilslutning mislykkedes',
+            0	                        => 'ingen fejl', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'utilstr&aelig;kkelige data angivet',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet',
+            DB_ERROR_NOSUCHDB           => 'database ikke fundet',
+            DB_ERROR_ACCESS_VIOLATION   => 'utilstr&aelig;kkelige rettigheder'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-de.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-de.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-de.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+// contributed by "Heinz Hombergs" <opn@hhombergs.de>
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'de',
+			DB_ERROR                    => 'Unbekannter Fehler',
+            DB_ERROR_ALREADY_EXISTS     => 'existiert bereits',
+            DB_ERROR_CANNOT_CREATE      => 'kann nicht erstellen',
+            DB_ERROR_CANNOT_DELETE      => 'kann nicht l&ouml;schen',
+            DB_ERROR_CANNOT_DROP        => 'Tabelle oder Index konnte nicht gel&ouml;scht werden',
+            DB_ERROR_CONSTRAINT         => 'Constraint Verletzung',
+            DB_ERROR_DIVZERO            => 'Division durch Null',
+            DB_ERROR_INVALID            => 'ung&uml;ltig',
+            DB_ERROR_INVALID_DATE       => 'ung&uml;ltiges Datum oder Zeit',
+            DB_ERROR_INVALID_NUMBER     => 'ung&uml;ltige Zahl',
+            DB_ERROR_MISMATCH           => 'Unvertr&auml;glichkeit',
+            DB_ERROR_NODBSELECTED       => 'keine Dantebank ausgew&auml;hlt',
+            DB_ERROR_NOSUCHFIELD        => 'Feld nicht vorhanden',
+            DB_ERROR_NOSUCHTABLE        => 'Tabelle nicht vorhanden',
+            DB_ERROR_NOT_CAPABLE        => 'Funktion nicht installiert',
+            DB_ERROR_NOT_FOUND          => 'nicht gefunden',
+            DB_ERROR_NOT_LOCKED         => 'nicht gesperrt',
+            DB_ERROR_SYNTAX             => 'Syntaxfehler',
+            DB_ERROR_UNSUPPORTED        => 'nicht Unterst&uml;tzt',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur&uml;ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage',
+            DB_ERROR_INVALID_DSN        => 'ung&uml;ltiger DSN',
+            DB_ERROR_CONNECT_FAILED     => 'Verbindung konnte nicht hergestellt werden',
+            0	                       => 'kein Fehler', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'Nicht gen&uml;gend Daten geliefert',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden',
+            DB_ERROR_NOSUCHDB           => 'keine Datenbank',
+            DB_ERROR_ACCESS_VIOLATION   => 'ungen&uml;gende Rechte'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-en.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-en.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-en.inc.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'en',
+            DB_ERROR                    => 'unknown error',
+            DB_ERROR_ALREADY_EXISTS     => 'already exists',
+            DB_ERROR_CANNOT_CREATE      => 'can not create',
+            DB_ERROR_CANNOT_DELETE      => 'can not delete',
+            DB_ERROR_CANNOT_DROP        => 'can not drop',
+            DB_ERROR_CONSTRAINT         => 'constraint violation',
+            DB_ERROR_DIVZERO            => 'division by zero',
+            DB_ERROR_INVALID            => 'invalid',
+            DB_ERROR_INVALID_DATE       => 'invalid date or time',
+            DB_ERROR_INVALID_NUMBER     => 'invalid number',
+            DB_ERROR_MISMATCH           => 'mismatch',
+            DB_ERROR_NODBSELECTED       => 'no database selected',
+            DB_ERROR_NOSUCHFIELD        => 'no such field',
+            DB_ERROR_NOSUCHTABLE        => 'no such table',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend not capable',
+            DB_ERROR_NOT_FOUND          => 'not found',
+            DB_ERROR_NOT_LOCKED         => 'not locked',
+            DB_ERROR_SYNTAX             => 'syntax error',
+            DB_ERROR_UNSUPPORTED        => 'not supported',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row',
+            DB_ERROR_INVALID_DSN        => 'invalid DSN',
+            DB_ERROR_CONNECT_FAILED     => 'connect failed',
+            0	                       => 'no error', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'insufficient data supplied',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extension not found',
+            DB_ERROR_NOSUCHDB           => 'no such database',
+            DB_ERROR_ACCESS_VIOLATION   => 'insufficient permissions'
+);
+?>
+		
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-es.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-es.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-es.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+// contributed by "Horacio Degiorgi" <horaciod@codigophp.com>
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'es',
+            DB_ERROR                    => 'error desconocido',
+            DB_ERROR_ALREADY_EXISTS     => 'ya existe',
+            DB_ERROR_CANNOT_CREATE      => 'imposible crear',
+            DB_ERROR_CANNOT_DELETE      => 'imposible borrar',
+            DB_ERROR_CANNOT_DROP        => 'imposible hacer drop',
+            DB_ERROR_CONSTRAINT         => 'violacion de constraint',
+            DB_ERROR_DIVZERO            => 'division por cero',
+            DB_ERROR_INVALID            => 'invalido',
+            DB_ERROR_INVALID_DATE       => 'fecha u hora invalida',
+            DB_ERROR_INVALID_NUMBER     => 'numero invalido',
+            DB_ERROR_MISMATCH           => 'error',
+            DB_ERROR_NODBSELECTED       => 'no hay base de datos seleccionada',
+            DB_ERROR_NOSUCHFIELD        => 'campo invalido',
+            DB_ERROR_NOSUCHTABLE        => 'tabla no existe',
+            DB_ERROR_NOT_CAPABLE        => 'capacidad invalida para esta DB',
+            DB_ERROR_NOT_FOUND          => 'no encontrado',
+            DB_ERROR_NOT_LOCKED         => 'no bloqueado',
+            DB_ERROR_SYNTAX             => 'error de sintaxis',
+            DB_ERROR_UNSUPPORTED        => 'no soportado',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores',
+            DB_ERROR_INVALID_DSN        => 'DSN invalido',
+            DB_ERROR_CONNECT_FAILED     => 'fallo la conexion',
+            0	                       => 'sin error', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'insuficientes datos',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada',
+            DB_ERROR_NOSUCHDB           => 'base de datos no encontrada',
+            DB_ERROR_ACCESS_VIOLATION   => 'permisos insuficientes'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-esperanto.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-esperanto.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-esperanto.inc.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+// Vivu Esperanto cxiam! 
+// Traduko fare de Antono Vasiljev (anders[#]brainactive.org)
+
+$ADODB_LANG_ARRAY = array (
+             'LANG'                      => 'eo',
+            DB_ERROR                    => 'nekonata eraro',
+            DB_ERROR_ALREADY_EXISTS     => 'jam ekzistas',
+            DB_ERROR_CANNOT_CREATE      => 'maleblas krei',
+            DB_ERROR_CANNOT_DELETE      => 'maleblas elimini',
+            DB_ERROR_CANNOT_DROP        => 'maleblas elimini (drop)',
+            DB_ERROR_CONSTRAINT         => 'rompo de kondicxoj de provo',
+            DB_ERROR_DIVZERO            => 'divido per 0 (nul)',
+            DB_ERROR_INVALID            => 'malregule',
+            DB_ERROR_INVALID_DATE       => 'malregula dato kaj tempo',
+            DB_ERROR_INVALID_NUMBER     => 'malregula nombro',
+            DB_ERROR_MISMATCH           => 'eraro',
+            DB_ERROR_NODBSELECTED       => 'datumbazo ne elektita',
+            DB_ERROR_NOSUCHFIELD        => 'ne ekzistas kampo',
+            DB_ERROR_NOSUCHTABLE        => 'ne ekzistas tabelo',
+            DB_ERROR_NOT_CAPABLE        => 'DBMS ne povas',
+            DB_ERROR_NOT_FOUND          => 'ne trovita',
+            DB_ERROR_NOT_LOCKED         => 'ne blokita',
+            DB_ERROR_SYNTAX             => 'sintaksa eraro',
+            DB_ERROR_UNSUPPORTED        => 'ne apogata',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio',
+            DB_ERROR_INVALID_DSN        => 'malregula DSN-o',
+            DB_ERROR_CONNECT_FAILED     => 'konekto malsukcesa',
+            0                               => 'cxio bone', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'ne suficxe da datumo',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita',
+            DB_ERROR_NOSUCHDB           => 'datumbazo ne ekzistas',
+            DB_ERROR_ACCESS_VIOLATION   => 'ne suficxe da rajto por atingo'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-fr.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-fr.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-fr.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+
+$ADODB_LANG_ARRAY = array (
+	'LANG'                      => 'fr',
+	DB_ERROR                    => 'erreur inconnue',
+	DB_ERROR_ALREADY_EXISTS     => 'existe d&eacute;j&agrave;',
+	DB_ERROR_CANNOT_CREATE      => 'cr&eacute;tion impossible',
+	DB_ERROR_CANNOT_DELETE      => 'effacement impossible',
+	DB_ERROR_CANNOT_DROP        => 'suppression impossible',
+	DB_ERROR_CONSTRAINT         => 'violation de contrainte',
+	DB_ERROR_DIVZERO            => 'division par z&eacute;ro',
+	DB_ERROR_INVALID            => 'invalide',
+	DB_ERROR_INVALID_DATE       => 'date ou heure invalide',
+	DB_ERROR_INVALID_NUMBER     => 'nombre invalide',
+	DB_ERROR_MISMATCH           => 'erreur de concordance',
+	DB_ERROR_NODBSELECTED       => 'pas de base de donn&eacute;ess&eacute;lectionn&eacute;e',
+	DB_ERROR_NOSUCHFIELD        => 'nom de colonne invalide',
+	DB_ERROR_NOSUCHTABLE        => 'table ou vue inexistante',
+	DB_ERROR_NOT_CAPABLE        => 'fonction optionnelle non install&eacute;e',
+	DB_ERROR_NOT_FOUND          => 'pas trouv&eacute;',
+	DB_ERROR_NOT_LOCKED         => 'non verrouill&eacute;',
+	DB_ERROR_SYNTAX             => 'erreur de syntaxe',
+	DB_ERROR_UNSUPPORTED        => 'non support&eacute;',
+	DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur ins&eacute;r&eacute;e trop grande pour colonne',
+	DB_ERROR_INVALID_DSN        => 'DSN invalide',
+	DB_ERROR_CONNECT_FAILED     => '&eacute;chec &agrave; la connexion',
+	0                        => "pas d'erreur", // DB_OK
+	DB_ERROR_NEED_MORE_DATA     => 'donn&eacute;es fournies insuffisantes',
+	DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouv&eacute;e',
+	DB_ERROR_NOSUCHDB           => 'base de donn&eacute;es inconnue',
+	DB_ERROR_ACCESS_VIOLATION   => 'droits insuffisants'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-hu.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-hu.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-hu.inc.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+# Hungarian language, encoding by ISO 8859-2 charset (Iso Latin-2)
+# Halászvári Gábor <g.halaszvari#portmax.hu>
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'hu',
+            DB_ERROR                    => 'ismeretlen hiba',
+            DB_ERROR_ALREADY_EXISTS     => 'már létezik',
+            DB_ERROR_CANNOT_CREATE      => 'nem sikerült létrehozni',
+            DB_ERROR_CANNOT_DELETE      => 'nem sikerült törölni',
+            DB_ERROR_CANNOT_DROP        => 'nem sikerült eldobni',
+            DB_ERROR_CONSTRAINT         => 'szabályok megszegése',
+            DB_ERROR_DIVZERO            => 'osztás nullával',
+            DB_ERROR_INVALID            => 'érvénytelen',
+            DB_ERROR_INVALID_DATE       => 'érvénytelen dátum vagy idõ',
+            DB_ERROR_INVALID_NUMBER     => 'érvénytelen szám',
+            DB_ERROR_MISMATCH           => 'nem megfelelõ',
+            DB_ERROR_NODBSELECTED       => 'nincs kiválasztott adatbázis',
+            DB_ERROR_NOSUCHFIELD        => 'nincs ilyen mezõ',
+            DB_ERROR_NOSUCHTABLE        => 'nincs ilyen tábla',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend nem támogatja',
+            DB_ERROR_NOT_FOUND          => 'nem található',
+            DB_ERROR_NOT_LOCKED         => 'nincs lezárva',
+            DB_ERROR_SYNTAX             => 'szintaktikai hiba',
+            DB_ERROR_UNSUPPORTED        => 'nem támogatott',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'soron végzett érték számlálás',
+            DB_ERROR_INVALID_DSN        => 'hibás DSN',
+            DB_ERROR_CONNECT_FAILED     => 'sikertelen csatlakozás',
+            0	                       => 'nincs hiba', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'túl kevés az adat',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'bõvítmény nem található',
+            DB_ERROR_NOSUCHDB           => 'nincs ilyen adatbázis',
+            DB_ERROR_ACCESS_VIOLATION   => 'nincs jogosultság'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-it.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-it.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-it.inc.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+// Italian language file contributed by Tiraboschi Massimiliano aka TiMax  
+// www.maxdev.com  timax@maxdev.com
+$ADODB_LANG_ARRAY = array (
+            'LANG'                      => 'it',
+            DB_ERROR                    => 'errore sconosciuto',
+            DB_ERROR_ALREADY_EXISTS     => 'esiste gi&agrave;',
+            DB_ERROR_CANNOT_CREATE      => 'non posso creare',
+            DB_ERROR_CANNOT_DELETE      => 'non posso cancellare',
+            DB_ERROR_CANNOT_DROP        => 'non posso eliminare',
+            DB_ERROR_CONSTRAINT         => 'violazione constraint',
+            DB_ERROR_DIVZERO            => 'divisione per zero',
+            DB_ERROR_INVALID            => 'non valido',
+            DB_ERROR_INVALID_DATE       => 'data od ora non valida',
+            DB_ERROR_INVALID_NUMBER     => 'numero non valido',
+            DB_ERROR_MISMATCH           => 'diversi',
+            DB_ERROR_NODBSELECTED       => 'nessun database selezionato',
+            DB_ERROR_NOSUCHFIELD        => 'nessun campo trovato',
+            DB_ERROR_NOSUCHTABLE        => 'nessuna tabella trovata',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend non abilitato',
+            DB_ERROR_NOT_FOUND          => 'non trovato',
+            DB_ERROR_NOT_LOCKED         => 'non bloccato',
+            DB_ERROR_SYNTAX             => 'errore di sintassi',
+            DB_ERROR_UNSUPPORTED        => 'non supportato',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna',
+            DB_ERROR_INVALID_DSN        => 'DSN non valido',
+            DB_ERROR_CONNECT_FAILED     => 'connessione fallita',
+            0                           => 'nessun errore', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'dati inseriti insufficienti',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata',
+            DB_ERROR_NOSUCHDB           => 'database non trovato',
+            DB_ERROR_ACCESS_VIOLATION   => 'permessi insufficienti'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-nl.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-nl.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-nl.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+// Translated by Pim Koeman (pim#wittenborg-university.com)
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'nl',
+            DB_ERROR                    => 'onbekende fout',
+            DB_ERROR_ALREADY_EXISTS     => 'bestaat al',
+            DB_ERROR_CANNOT_CREATE      => 'kan niet aanmaken',
+            DB_ERROR_CANNOT_DELETE      => 'kan niet wissen',
+            DB_ERROR_CANNOT_DROP        => 'kan niet verwijderen',
+            DB_ERROR_CONSTRAINT         => 'constraint overtreding',
+            DB_ERROR_DIVZERO            => 'poging tot delen door nul',
+            DB_ERROR_INVALID            => 'ongeldig',
+            DB_ERROR_INVALID_DATE       => 'ongeldige datum of tijd',
+            DB_ERROR_INVALID_NUMBER     => 'ongeldig nummer',
+            DB_ERROR_MISMATCH           => 'is incorrect',
+            DB_ERROR_NODBSELECTED       => 'geen database geselecteerd',
+            DB_ERROR_NOSUCHFIELD        => 'onbekend veld',
+            DB_ERROR_NOSUCHTABLE        => 'onbekende tabel',
+            DB_ERROR_NOT_CAPABLE        => 'database systeem is niet tot uitvoer in staat',
+            DB_ERROR_NOT_FOUND          => 'niet gevonden',
+            DB_ERROR_NOT_LOCKED         => 'niet vergrendeld',
+            DB_ERROR_SYNTAX             => 'syntaxis fout',
+            DB_ERROR_UNSUPPORTED        => 'niet ondersteund',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij',
+            DB_ERROR_INVALID_DSN        => 'ongeldige DSN',
+            DB_ERROR_CONNECT_FAILED     => 'connectie mislukt',
+            0	                       => 'geen fout', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'onvoldoende data gegeven',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden',
+            DB_ERROR_NOSUCHDB           => 'onbekende database',
+            DB_ERROR_ACCESS_VIOLATION   => 'onvoldoende rechten'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-pl.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-pl.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-pl.inc.php	(revision 225)
@@ -0,0 +1,36 @@
+<?php
+
+// Contributed by Grzegorz Pacan <gp#dione.cc>
+
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'pl',
+            DB_ERROR                    => 'niezidentyfikowany b³±d',
+            DB_ERROR_ALREADY_EXISTS     => 'ju¿ istniej±',
+            DB_ERROR_CANNOT_CREATE      => 'nie mo¿na stworzyæ',
+            DB_ERROR_CANNOT_DELETE      => 'nie mo¿na usun±æ',
+            DB_ERROR_CANNOT_DROP        => 'nie mo¿na porzuciæ',
+            DB_ERROR_CONSTRAINT         => 'pogwa³cenie uprawnieñ',
+            DB_ERROR_DIVZERO            => 'dzielenie przez zero',
+            DB_ERROR_INVALID            => 'b³êdny',
+            DB_ERROR_INVALID_DATE       => 'b³êdna godzina lub data',
+            DB_ERROR_INVALID_NUMBER     => 'b³êdny numer',
+            DB_ERROR_MISMATCH           => 'niedopasowanie',
+            DB_ERROR_NODBSELECTED       => 'baza danych nie zosta³a wybrana',
+            DB_ERROR_NOSUCHFIELD        => 'nie znaleziono pola',
+            DB_ERROR_NOSUCHTABLE        => 'nie znaleziono tabeli',
+            DB_ERROR_NOT_CAPABLE        => 'nie zdolny',
+            DB_ERROR_NOT_FOUND          => 'nie znaleziono',
+            DB_ERROR_NOT_LOCKED         => 'nie zakmniêty',
+            DB_ERROR_SYNTAX             => 'b³±d sk³adni',
+            DB_ERROR_UNSUPPORTED        => 'nie obs³uguje',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'warto¶æ liczona w szeregu',
+            DB_ERROR_INVALID_DSN        => 'b³êdny DSN',
+            DB_ERROR_CONNECT_FAILED     => 'po³±czenie nie zosta³o zrealizowane',
+            0	                       => 'brak b³êdów', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'niedostateczna ilo¶æ informacji',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia',
+            DB_ERROR_NOSUCHDB           => 'nie znaleziono bazy',
+            DB_ERROR_ACCESS_VIOLATION   => 'niedostateczne uprawnienia'
+);
+?>
+		
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-pt-br.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-pt-br.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-pt-br.inc.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+// contributed by "Levi Fukumori" levi _AT_ fukumori _DOT_ com _DOT_ br
+// portugese (brazilian)
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'pt-br',
+            DB_ERROR                    => 'erro desconhecido',
+            DB_ERROR_ALREADY_EXISTS     => 'já existe',
+            DB_ERROR_CANNOT_CREATE      => 'impossível criar',
+            DB_ERROR_CANNOT_DELETE      => 'impossível excluír',
+            DB_ERROR_CANNOT_DROP        => 'impossível remover',
+            DB_ERROR_CONSTRAINT         => 'violação do confinamente',
+            DB_ERROR_DIVZERO            => 'divisão por zero',
+            DB_ERROR_INVALID            => 'inválido',
+            DB_ERROR_INVALID_DATE       => 'data ou hora inválida',
+            DB_ERROR_INVALID_NUMBER     => 'número inválido',
+            DB_ERROR_MISMATCH           => 'erro',
+            DB_ERROR_NODBSELECTED       => 'nenhum banco de dados selecionado',
+            DB_ERROR_NOSUCHFIELD        => 'campo inválido',
+            DB_ERROR_NOSUCHTABLE        => 'tabela inexistente',
+            DB_ERROR_NOT_CAPABLE        => 'capacidade inválida para este BD',
+            DB_ERROR_NOT_FOUND          => 'não encontrado',
+            DB_ERROR_NOT_LOCKED         => 'não bloqueado',
+            DB_ERROR_SYNTAX             => 'erro de sintaxe',
+            DB_ERROR_UNSUPPORTED        => 
+'não suportado',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas não corresponde ao de valores',
+            DB_ERROR_INVALID_DSN        => 'DSN inválido',
+            DB_ERROR_CONNECT_FAILED     => 'falha na conexão',
+            0				=> 'sem erro', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'dados insuficientes',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensão não encontrada',
+            DB_ERROR_NOSUCHDB           => 'banco de dados não encontrado',
+            DB_ERROR_ACCESS_VIOLATION   => 'permissão insuficiente'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ro.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ro.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ro.inc.php	(revision 225)
@@ -0,0 +1,36 @@
+<?php
+
+/* Romanian - by "bogdan stefan" <sbogdan#rsb.ro> */
+
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'ro',
+            DB_ERROR                    => 'eroare necunoscuta',
+            DB_ERROR_ALREADY_EXISTS     => 'deja exista',
+            DB_ERROR_CANNOT_CREATE      => 'nu se poate creea',
+            DB_ERROR_CANNOT_DELETE      => 'nu se poate sterge',
+            DB_ERROR_CANNOT_DROP        => 'nu se poate executa drop',
+            DB_ERROR_CONSTRAINT         => 'violare de constrain',
+            DB_ERROR_DIVZERO            => 'se divide la zero',
+            DB_ERROR_INVALID            => 'invalid',
+            DB_ERROR_INVALID_DATE       => 'data sau timp invalide',
+            DB_ERROR_INVALID_NUMBER     => 'numar invalid',
+            DB_ERROR_MISMATCH           => 'nepotrivire-mismatch',
+            DB_ERROR_NODBSELECTED       => 'nu exista baza de date selectata',
+            DB_ERROR_NOSUCHFIELD        => 'camp inexistent',
+            DB_ERROR_NOSUCHTABLE        => 'tabela inexistenta',
+            DB_ERROR_NOT_CAPABLE        => 'functie optionala neinstalata',
+            DB_ERROR_NOT_FOUND          => 'negasit',
+            DB_ERROR_NOT_LOCKED         => 'neblocat',
+            DB_ERROR_SYNTAX             => 'eroare de sintaxa',
+            DB_ERROR_UNSUPPORTED        => 'nu e suportat',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana',
+            DB_ERROR_INVALID_DSN        => 'DSN invalid',
+            DB_ERROR_CONNECT_FAILED     => 'conectare esuata',
+            0	                       => 'fara eroare', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'data introduse insuficiente',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita',
+            DB_ERROR_NOSUCHDB           => 'nu exista baza de date',
+            DB_ERROR_ACCESS_VIOLATION   => 'permisiuni insuficiente'
+);
+?>
+
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ru1251.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ru1251.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-ru1251.inc.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+
+// Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru.
+
+$ADODB_LANG_ARRAY = array (
+             'LANG'                      => 'ru1251',
+            DB_ERROR                    => 'íåèçâåñòíàÿ îøèáêà',
+            DB_ERROR_ALREADY_EXISTS     => 'óæå ñóùåñòâóåò',
+            DB_ERROR_CANNOT_CREATE      => 'íåâîçìîæíî ñîçäàòü',
+            DB_ERROR_CANNOT_DELETE      => 'íåâîçìîæíî óäàëèòü',
+            DB_ERROR_CANNOT_DROP        => 'íåâîçìîæíî óäàëèòü (drop)',
+            DB_ERROR_CONSTRAINT         => 'íàðóøåíèå óñëîâèé ïðîâåðêè',
+            DB_ERROR_DIVZERO            => 'äåëåíèå íà 0',
+            DB_ERROR_INVALID            => 'íåïðàâèëüíî',
+            DB_ERROR_INVALID_DATE       => 'íåêîððåêòíàÿ äàòà èëè âðåìÿ',
+            DB_ERROR_INVALID_NUMBER     => 'íåêîððåêòíîå ÷èñëî',
+            DB_ERROR_MISMATCH           => 'îøèáêà',
+            DB_ERROR_NODBSELECTED       => 'ÁÄ íå âûáðàíà',
+            DB_ERROR_NOSUCHFIELD        => 'íå ñóùåñòâóåò ïîëå',
+            DB_ERROR_NOSUCHTABLE        => 'íå ñóùåñòâóåò òàáëèöà',
+            DB_ERROR_NOT_CAPABLE        => 'ÑÓÁÄ íå â ñîñòîÿíèè',
+            DB_ERROR_NOT_FOUND          => 'íå íàéäåíî',
+            DB_ERROR_NOT_LOCKED         => 'íå çàáëîêèðîâàíî',
+            DB_ERROR_SYNTAX             => 'ñèíòàêñè÷åñêàÿ îøèáêà',
+            DB_ERROR_UNSUPPORTED        => 'íå ïîääåðæèâàåòñÿ',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'ñ÷åò÷èê çíà÷åíèé â ñòðîêå',
+            DB_ERROR_INVALID_DSN        => 'íåïðàâèëüíàÿ DSN',
+            DB_ERROR_CONNECT_FAILED     => 'ñîåäèíåíèå íåóñïåøíî',
+            0                               => 'íåò îøèáêè', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'ïðåäîñòàâëåíî íåäîñòàòî÷íî äàííûõ',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ðàñøèðåíèå íå íàéäåíî',
+            DB_ERROR_NOSUCHDB           => 'íå ñóùåñòâóåò ÁÄ',
+            DB_ERROR_ACCESS_VIOLATION   => 'íåäîñòàòî÷íî ïðàâ äîñòóïà'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-sv.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-sv.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-sv.inc.php	(revision 225)
@@ -0,0 +1,33 @@
+<?php
+// Christian Tiberg" christian@commsoft.nu
+$ADODB_LANG_ARRAY = array (
+			'LANG'                      => 'en',
+            DB_ERROR                    => 'Okänt fel',
+            DB_ERROR_ALREADY_EXISTS     => 'finns redan',
+            DB_ERROR_CANNOT_CREATE      => 'kan inte skapa',
+            DB_ERROR_CANNOT_DELETE      => 'kan inte ta bort',
+            DB_ERROR_CANNOT_DROP        => 'kan inte släppa',
+            DB_ERROR_CONSTRAINT         => 'begränsning kränkt',
+            DB_ERROR_DIVZERO            => 'division med noll',
+            DB_ERROR_INVALID            => 'ogiltig',
+            DB_ERROR_INVALID_DATE       => 'ogiltigt datum eller tid',
+            DB_ERROR_INVALID_NUMBER     => 'ogiltigt tal',
+            DB_ERROR_MISMATCH           => 'felaktig matchning',
+            DB_ERROR_NODBSELECTED       => 'ingen databas vald',
+            DB_ERROR_NOSUCHFIELD        => 'inget sådant fält',
+            DB_ERROR_NOSUCHTABLE        => 'ingen sådan tabell',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend klarar det inte',
+            DB_ERROR_NOT_FOUND          => 'finns inte',
+            DB_ERROR_NOT_LOCKED         => 'inte låst',
+            DB_ERROR_SYNTAX             => 'syntaxfel',
+            DB_ERROR_UNSUPPORTED        => 'stöds ej',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'värde räknat på rad',
+            DB_ERROR_INVALID_DSN        => 'ogiltig DSN',
+            DB_ERROR_CONNECT_FAILED     => 'anslutning misslyckades',
+            0	                       => 'inget fel', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'otillräckligt med data angivet',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'utökning hittades ej',
+            DB_ERROR_NOSUCHDB           => 'ingen sådan databas',
+            DB_ERROR_ACCESS_VIOLATION   => 'otillräckliga rättigheter'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-uk1251.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-uk1251.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/lang/adodb-uk1251.inc.php	(revision 225)
@@ -0,0 +1,35 @@
+<?php
+
+// Ukrainian language file contributed by  Alex Rootoff rootoff{AT}pisem.net.
+
+$ADODB_LANG_ARRAY = array (
+             'LANG'                      => 'uk1251',
+            DB_ERROR                    => 'íåâ³äîìà ïîìèëêà',
+            DB_ERROR_ALREADY_EXISTS     => 'âæå ³ñíóº',
+            DB_ERROR_CANNOT_CREATE      => 'íåìîæëèâî ñòâîðèòè',
+            DB_ERROR_CANNOT_DELETE      => 'íåìîæëèâî âèäàëèòè',
+            DB_ERROR_CANNOT_DROP        => 'íåìîæëèâî çíèùèòè (drop)',
+            DB_ERROR_CONSTRAINT         => 'ïîðóøåííÿ óìîâ ïåðåâ³ðêè',
+            DB_ERROR_DIVZERO            => 'ä³ëåííÿ íà 0',
+            DB_ERROR_INVALID            => 'íåïðàâèëüíî',
+            DB_ERROR_INVALID_DATE       => 'íåïðàâèëüíà äàòà ÷è ÷àñ',
+            DB_ERROR_INVALID_NUMBER     => 'íåïðàâèëüíå ÷èñëî',
+            DB_ERROR_MISMATCH           => 'ïîìèëêà',
+            DB_ERROR_NODBSELECTED       => 'íå âèáðàíî ÁÄ',
+            DB_ERROR_NOSUCHFIELD        => 'íå ³ñíóº ïîëå',
+            DB_ERROR_NOSUCHTABLE        => 'íå ³ñíóº òàáëèöÿ',
+            DB_ERROR_NOT_CAPABLE        => 'ÑÓÁÄ íå â ñòàí³',
+            DB_ERROR_NOT_FOUND          => 'íå çíàéäåíî',
+            DB_ERROR_NOT_LOCKED         => 'íå çàáëîêîâàíî',
+            DB_ERROR_SYNTAX             => 'ñèíòàêñè÷íà ïîìèëêà',
+            DB_ERROR_UNSUPPORTED        => 'íå ï³äòðèìóºòüñÿ',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'ðàõ³âíèê çíà÷åíü â ñòð³÷ö³',
+            DB_ERROR_INVALID_DSN        => 'íåïðàâèëüíà DSN',
+            DB_ERROR_CONNECT_FAILED     => 'ç\'ºäíàííÿ íåóñï³øíå',
+            0                               => 'âñå ãàðàçä', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'íàäàíî íåäîñòàòíüî äàíèõ',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ðîçøèðåííÿ íå çíàéäåíî',
+            DB_ERROR_NOSUCHDB           => 'íå ³ñíóº ÁÄ',
+            DB_ERROR_ACCESS_VIOLATION   => 'íåäîñòàòíüî ïðàâ äîñòóïà'
+);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/license.txt
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/license.txt	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/license.txt	(revision 225)
@@ -0,0 +1,182 @@
+ADOdb is dual licensed using BSD and LGPL. 
+
+In plain English, you do not need to distribute your application  in source code form, nor do you need to distribute ADOdb source code, provided you follow the rest of terms of the BSD license.
+
+For more info about ADOdb, visit http://adodb.sourceforge.net/
+
+BSD Style-License
+=================
+
+Copyright (c) 2000, 2001, 2002, 2003, 2004 John Lim
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, 
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list 
+of conditions and the following disclaimer. 
+
+Redistributions in binary form must reproduce the above copyright notice, this list 
+of conditions and the following disclaimer in the documentation and/or other materials 
+provided with the distribution. 
+
+Neither the name of the John Lim nor the names of its contributors may be used to 
+endorse or promote products derived from this software without specific prior written 
+permission. 
+
+DISCLAIMER:
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
+JOHN LIM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==========================================================
+GNU LESSER GENERAL PUBLIC LICENSE
+Version 2.1, February 1999 
+ 
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+ 
+ 
+Preamble
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. 
+
+This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. 
+
+When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. 
+
+To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. 
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. 
+
+We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. 
+
+To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. 
+
+Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. 
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. 
+
+When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. 
+
+We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. 
+
+For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. 
+
+In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. 
+
+Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. 
+
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". 
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. 
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) 
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. 
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. 
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 
+
+
+a) The modified work must itself be a software library. 
+b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 
+c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. 
+d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. 
+(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. 
+
+In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. 
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. 
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. 
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. 
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. 
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. 
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) 
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 
+
+6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. 
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: 
+
+
+a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) 
+b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. 
+c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. 
+d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. 
+e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. 
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: 
+
+
+a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. 
+b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. 
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. 
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 
+
+13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 
+
+NO WARRANTY 
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
+
+
+END OF TERMS AND CONDITIONS
Index: Dev/branches/Demo/rdfapi/util/adodb/pear/Auth/Container/ADOdb.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/pear/Auth/Container/ADOdb.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/pear/Auth/Container/ADOdb.php	(revision 225)
@@ -0,0 +1,413 @@
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4                                                        |
+// +----------------------------------------------------------------------+
+// |                                                                      |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license,      |
+// | that is bundled with this package in the file LICENSE, and is        |
+// | available at through the world-wide-web at                           |
+// | http://www.php.net/license/2_02.txt.                                 |
+// | If you did not receive a copy of the PHP license and are unable to   |
+// | obtain it through the world-wide-web, please send a note to          |
+// | license@php.net so we can mail you a copy immediately.               |
+// +----------------------------------------------------------------------+
+// | Authors: Martin Jansen <mj@php.net>
+// |	Richard Tango-Lowy <richtl@arscognita.com>                                  |
+// +----------------------------------------------------------------------+
+//
+// $Id: ADOdb.php 350 2007-03-12 10:55:13Z cweiske $
+//
+
+require_once 'Auth/Container.php';
+require_once 'adodb.inc.php';
+require_once 'adodb-pear.inc.php';
+require_once 'adodb-errorpear.inc.php';
+
+/**
+ * Storage driver for fetching login data from a database using ADOdb-PHP.
+ *
+ * This storage driver can use all databases which are supported
+ * by the ADBdb DB abstraction layer to fetch login data.
+ * See http://php.weblogs.com/adodb for information on ADOdb.
+ * NOTE: The ADOdb directory MUST be in your PHP include_path!
+ *
+ * @author   Richard Tango-Lowy <richtl@arscognita.com>
+ * @package  Auth
+ * @version  $Revision: 350 $
+ */
+class Auth_Container_ADOdb extends Auth_Container
+{
+
+    /**
+     * Additional options for the storage container
+     * @var array
+     */
+    var $options = array();
+
+    /**
+     * DB object
+     * @var object
+     */
+    var $db = null;
+    var $dsn = '';
+	
+    /**
+     * User that is currently selected from the DB.
+     * @var string
+     */
+    var $activeUser = '';
+
+    // {{{ Constructor
+
+    /**
+     * Constructor of the container class
+     *
+     * Initate connection to the database via PEAR::ADOdb
+     *
+     * @param  string Connection data or DB object
+     * @return object Returns an error object if something went wrong
+     */
+    function Auth_Container_ADOdb($dsn)
+    {
+        $this->_setDefaults();
+		
+        if (is_array($dsn)) {
+            $this->_parseOptions($dsn);
+
+            if (empty($this->options['dsn'])) {
+                PEAR::raiseError('No connection parameters specified!');
+            }
+        } else {
+        	// Extract db_type from dsn string.
+            $this->options['dsn'] = $dsn;
+        }
+    }
+
+    // }}}
+    // {{{ _connect()
+
+    /**
+     * Connect to database by using the given DSN string
+     *
+     * @access private
+     * @param  string DSN string
+     * @return mixed  Object on error, otherwise bool
+     */
+     function _connect($dsn)
+    {
+        if (is_string($dsn) || is_array($dsn)) {
+        	if(!$this->db) {
+	        	$this->db = &ADONewConnection($dsn);
+	    		if( $err = ADODB_Pear_error() ) {
+	   	    		return PEAR::raiseError($err);
+	    		}
+        	}
+        	
+        } else {
+            return PEAR::raiseError('The given dsn was not valid in file ' . __FILE__ . ' at line ' . __LINE__,
+                                    41,
+                                    PEAR_ERROR_RETURN,
+                                    null,
+                                    null
+                                    );
+        }
+        
+        if(!$this->db) {
+        	return PEAR::raiseError(ADODB_Pear_error());
+        } else {
+        	return true;
+        }
+    }
+
+    // }}}
+    // {{{ _prepare()
+
+    /**
+     * Prepare database connection
+     *
+     * This function checks if we have already opened a connection to
+     * the database. If that's not the case, a new connection is opened.
+     *
+     * @access private
+     * @return mixed True or a DB error object.
+     */
+    function _prepare()
+    {
+    	if(!$this->db) {
+    		$res = $this->_connect($this->options['dsn']);  		
+    	}
+        return true;
+    }
+
+    // }}}
+    // {{{ query()
+
+    /**
+     * Prepare query to the database
+     *
+     * This function checks if we have already opened a connection to
+     * the database. If that's not the case, a new connection is opened.
+     * After that the query is passed to the database.
+     *
+     * @access public
+     * @param  string Query string
+     * @return mixed  a DB_result object or DB_OK on success, a DB
+     *                or PEAR error on failure
+     */
+    function query($query)
+    {
+        $err = $this->_prepare();
+        if ($err !== true) {
+            return $err;
+        }
+        return $this->db->query($query);
+    }
+
+    // }}}
+    // {{{ _setDefaults()
+
+    /**
+     * Set some default options
+     *
+     * @access private
+     * @return void
+     */
+    function _setDefaults()
+    {
+    	$this->options['db_type']	= 'mysql';
+        $this->options['table']       = 'auth';
+        $this->options['usernamecol'] = 'username';
+        $this->options['passwordcol'] = 'password';
+        $this->options['dsn']         = '';
+        $this->options['db_fields']   = '';
+        $this->options['cryptType']   = 'md5';
+    }
+
+    // }}}
+    // {{{ _parseOptions()
+
+    /**
+     * Parse options passed to the container class
+     *
+     * @access private
+     * @param  array
+     */
+    function _parseOptions($array)
+    {
+        foreach ($array as $key => $value) {
+            if (isset($this->options[$key])) {
+                $this->options[$key] = $value;
+            }
+        }
+
+        /* Include additional fields if they exist */
+        if(!empty($this->options['db_fields'])){
+            if(is_array($this->options['db_fields'])){
+                $this->options['db_fields'] = join($this->options['db_fields'], ', ');
+            }
+            $this->options['db_fields'] = ', '.$this->options['db_fields'];
+        }
+    }
+
+    // }}}
+    // {{{ fetchData()
+
+    /**
+     * Get user information from database
+     *
+     * This function uses the given username to fetch
+     * the corresponding login data from the database
+     * table. If an account that matches the passed username
+     * and password is found, the function returns true.
+     * Otherwise it returns false.
+     *
+     * @param   string Username
+     * @param   string Password
+     * @return  mixed  Error object or boolean
+     */
+    function fetchData($username, $password)
+    {
+        // Prepare for a database query
+        $err = $this->_prepare();
+        if ($err !== true) {
+            return PEAR::raiseError($err->getMessage(), $err->getCode());
+        }
+
+        // Find if db_fields contains a *, i so assume all col are selected
+        if(strstr($this->options['db_fields'], '*')){
+            $sql_from = "*";
+        }
+        else{
+            $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields'];
+        }
+        
+        $query = "SELECT ".$sql_from.
+                " FROM ".$this->options['table'].
+                " WHERE ".$this->options['usernamecol']." = " . $this->db->Quote($username);
+        
+        $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+        $rset = $this->db->Execute( $query );
+        $res = $rset->fetchRow();
+
+        if (DB::isError($res)) {
+            return PEAR::raiseError($res->getMessage(), $res->getCode());
+        }
+        if (!is_array($res)) {
+            $this->activeUser = '';
+            return false;
+        }
+        if ($this->verifyPassword(trim($password, "\r\n"),
+                                  trim($res[$this->options['passwordcol']], "\r\n"),
+                                  $this->options['cryptType'])) {
+            // Store additional field values in the session
+            foreach ($res as $key => $value) {
+                if ($key == $this->options['passwordcol'] ||
+                    $key == $this->options['usernamecol']) {
+                    continue;
+                }
+                // Use reference to the auth object if exists
+                // This is because the auth session variable can change so a static call to setAuthData does not make sence
+                if(is_object($this->_auth_obj)){
+                    $this->_auth_obj->setAuthData($key, $value);
+                } else {
+                    Auth::setAuthData($key, $value);
+                }
+            }
+
+            return true;
+        }
+
+        $this->activeUser = $res[$this->options['usernamecol']];
+        return false;
+    }
+
+    // }}}
+    // {{{ listUsers()
+
+    function listUsers()
+    {
+        $err = $this->_prepare();
+        if ($err !== true) {
+            return PEAR::raiseError($err->getMessage(), $err->getCode());
+        }
+
+        $retVal = array();
+
+        // Find if db_fileds contains a *, i so assume all col are selected
+        if(strstr($this->options['db_fields'], '*')){
+            $sql_from = "*";
+        }
+        else{
+            $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields'];
+        }
+
+        $query = sprintf("SELECT %s FROM %s",
+                         $sql_from,
+                         $this->options['table']
+                         );
+        $res = $this->db->getAll($query, null, DB_FETCHMODE_ASSOC);
+
+        if (DB::isError($res)) {
+            return PEAR::raiseError($res->getMessage(), $res->getCode());
+        } else {
+            foreach ($res as $user) {
+                $user['username'] = $user[$this->options['usernamecol']];
+                $retVal[] = $user;
+            }
+        }
+        return $retVal;
+    }
+
+    // }}}
+    // {{{ addUser()
+
+    /**
+     * Add user to the storage container
+     *
+     * @access public
+     * @param  string Username
+     * @param  string Password
+     * @param  mixed  Additional information that are stored in the DB
+     *
+     * @return mixed True on success, otherwise error object
+     */
+    function addUser($username, $password, $additional = "")
+    {
+        if (function_exists($this->options['cryptType'])) {
+            $cryptFunction = $this->options['cryptType'];
+        } else {
+            $cryptFunction = 'md5';
+        }
+
+        $additional_key   = '';
+        $additional_value = '';
+
+        if (is_array($additional)) {
+            foreach ($additional as $key => $value) {
+                $additional_key .= ', ' . $key;
+                $additional_value .= ", '" . $value . "'";
+            }
+        }
+
+        $query = sprintf("INSERT INTO %s (%s, %s%s) VALUES ('%s', '%s'%s)",
+                         $this->options['table'],
+                         $this->options['usernamecol'],
+                         $this->options['passwordcol'],
+                         $additional_key,
+                         $username,
+                         $cryptFunction($password),
+                         $additional_value
+                         );
+
+        $res = $this->query($query);
+
+        if (DB::isError($res)) {
+           return PEAR::raiseError($res->getMessage(), $res->getCode());
+        } else {
+          return true;
+        }
+    }
+
+    // }}}
+    // {{{ removeUser()
+
+    /**
+     * Remove user from the storage container
+     *
+     * @access public
+     * @param  string Username
+     *
+     * @return mixed True on success, otherwise error object
+     */
+    function removeUser($username)
+    {
+        $query = sprintf("DELETE FROM %s WHERE %s = '%s'",
+                         $this->options['table'],
+                         $this->options['usernamecol'],
+                         $username
+                         );
+
+        $res = $this->query($query);
+
+        if (DB::isError($res)) {
+           return PEAR::raiseError($res->getMessage(), $res->getCode());
+        } else {
+          return true;
+        }
+    }
+
+    // }}}
+}
+
+function showDbg( $string ) {
+	print "
+-- $string</P>";
+}
+function dump( $var, $str, $vardump = false ) {
+	print "<H4>$str</H4><pre>";
+	( !$vardump ) ? ( print_r( $var )) : ( var_dump( $var ));
+	print "</pre>";
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/pear/readme.Auth.txt
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/pear/readme.Auth.txt	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/pear/readme.Auth.txt	(revision 225)
@@ -0,0 +1,20 @@
+From: Rich Tango-Lowy (richtl#arscognita.com)
+Date: Sat, May 29, 2004 11:20 am
+
+OK, I hacked out an ADOdb container for PEAR-Auth. The error handling's 
+a bit of a mess, but all the methods work.
+
+Copy ADOdb.php to your pear/Auth/Container/ directory.
+
+Use the ADOdb container exactly as you would the DB
+container, but specify 'ADOdb' instead of 'DB':
+
+$dsn = "mysql://myuser:mypass@localhost/authdb";
+$a = new Auth("ADOdb", $dsn, "loginFunction");
+
+
+-------------------
+
+John Lim adds:
+
+See http://pear.php.net/manual/en/package.authentication.php
Index: Dev/branches/Demo/rdfapi/util/adodb/perf/perf-db2.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/perf/perf-db2.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/perf/perf-db2.inc.php	(revision 225)
@@ -0,0 +1,102 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning 
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+// Simple guide to configuring db2: so-so http://www.devx.com/gethelpon/10MinuteSolution/16575
+
+// SELECT * FROM TABLE(SNAPSHOT_APPL('SAMPLE', -1)) as t
+class perf_db2 extends adodb_perf{
+	var $createTableSQL = "CREATE TABLE adodb_logsql (
+		  created TIMESTAMP NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 varchar(4000) NOT NULL,
+		  params varchar(3000) NOT NULL,
+		  tracer varchar(500) NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)";
+		
+	var $settings = array(
+	'Ratios',
+		'data cache hit ratio' => array('RATIO',
+			"SELECT 
+				case when sum(POOL_DATA_L_READS+POOL_INDEX_L_READS)=0 then 0 
+				else 100*(1-sum(POOL_DATA_P_READS+POOL_INDEX_P_READS)/sum(POOL_DATA_L_READS+POOL_INDEX_L_READS)) end 
+				FROM TABLE(SNAPSHOT_APPL('',-2)) as t",
+			'=WarnCacheRatio'),
+			
+	'Data Cache',
+		'data cache buffers' => array('DATAC',
+		'select sum(npages) from SYSCAT.BUFFERPOOLS',
+			'See <a href=http://www7b.boulder.ibm.com/dmdd/library/techarticle/anshum/0107anshum.html#bufferpoolsize>tuning reference</a>.' ),
+		'cache blocksize' => array('DATAC',
+		'select avg(pagesize) from SYSCAT.BUFFERPOOLS',
+			'' ),
+		'data cache size' => array('DATAC',
+		'select sum(npages*pagesize) from SYSCAT.BUFFERPOOLS',
+			'' ),
+	'Connections',
+		'current connections' => array('SESS',
+			"SELECT count(*) FROM TABLE(SNAPSHOT_APPL_INFO('',-2)) as t",
+			''),
+
+		false
+	);
+
+
+	function perf_db2(&$conn)
+	{
+		$this->conn =& $conn;
+	}
+	
+	function Explain($sql,$partial=false)
+	{
+		$save = $this->conn->LogSQL(false);
+		if ($partial) {
+			$sqlq = $this->conn->qstr($sql.'%');
+			$arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq");
+			if ($arr) {
+				foreach($arr as $row) {
+					$sql = reset($row);
+					if (crc32($sql) == $partial) break;
+				}
+			}
+		}
+		$qno = rand();
+		$ok = $this->conn->Execute("EXPLAIN PLAN SET QUERYNO=$qno FOR $sql");
+		ob_start();
+		if (!$ok) echo "<p>Have EXPLAIN tables been created?</p>";
+		else {
+			$rs = $this->conn->Execute("select * from explain_statement where queryno=$qno");
+			if ($rs) rs2html($rs);
+		}
+		$s = ob_get_contents();
+		ob_end_clean();
+		$this->conn->LogSQL($save);
+		
+		$s .= $this->Tracer($sql);
+		return $s;
+	}
+	
+	
+	function Tables()
+	{
+		$rs = $this->conn->Execute("select tabschema,tabname,card as rows,
+			npages pages_used,fpages pages_allocated, tbspace tablespace  
+			from syscat.tables where tabschema not in ('SYSCAT','SYSIBM','SYSSTAT') order by 1,2");
+		return rs2html($rs,false,false,false,false);
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/perf/perf-informix.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/perf/perf-informix.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/perf/perf-informix.inc.php	(revision 225)
@@ -0,0 +1,70 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning 
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+//
+// Thx to  Fernando Ortiz, mailto:fortiz#lacorona.com.mx
+// With info taken from http://www.oninit.com/oninit/sysmaster/index.html
+//
+class perf_informix extends adodb_perf{
+
+	// Maximum size on varchar upto 9.30 255 chars
+	// better truncate varchar to 255 than char(4000) ?
+	var $createTableSQL = "CREATE TABLE adodb_logsql (
+		created datetime year to second NOT NULL,
+		sql0 varchar(250) NOT NULL,
+		sql1 varchar(255) NOT NULL,
+		params varchar(255) NOT NULL,
+		tracer varchar(255) NOT NULL,
+		timer decimal(16,6) NOT NULL
+	)";
+	
+	var $tablesSQL = "select a.tabname tablename, ti_nptotal*2 size_in_k, ti_nextns extents, ti_nrows records from systables c, sysmaster:systabnames a, sysmaster:systabinfo b where c.tabname not matches 'sys*' and c.partnum = a.partnum and c.partnum = b.ti_partnum";
+	
+	var $settings = array(
+	'Ratios',
+		'data cache hit ratio' => array('RATIOH',
+		"select round((1-(wt.value / (rd.value + wr.value)))*100,2)
+		from sysmaster:sysprofile wr, sysmaster:sysprofile rd, sysmaster:sysprofile wt
+		where rd.name = 'pagreads' and
+		wr.name = 'pagwrites' and
+		wt.name = 'buffwts'",
+		'=WarnCacheRatio'),
+	'IO',
+		'data reads' => array('IO',
+		"select value from sysmaster:sysprofile where name='pagreads'",
+		'Page reads'),
+		
+		'data writes' => array('IO',
+		"select value from sysmaster:sysprofile where name='pagwrites'",
+		'Page writes'),
+	
+	'Connections',
+		'current connections' => array('SESS',
+		'select count(*) from sysmaster:syssessions',
+		'Number of sessions'),
+	
+	false
+	
+	);
+	
+	function perf_informix(&$conn)
+	{
+		$this->conn =& $conn;
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/perf/perf-mssql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/perf/perf-mssql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/perf/perf-mssql.inc.php	(revision 225)
@@ -0,0 +1,164 @@
+<?php
+
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning 
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+/*
+	MSSQL has moved most performance info to Performance Monitor
+*/
+class perf_mssql extends adodb_perf{
+	var $sql1 = 'cast(sql1 as text)';
+	var $createTableSQL = "CREATE TABLE adodb_logsql (
+		  created datetime NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 varchar(4000) NOT NULL,
+		  params varchar(3000) NOT NULL,
+		  tracer varchar(500) NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)";
+		
+	var $settings = array(
+	'Ratios',
+		'data cache hit ratio' => array('RATIO',
+			"select round((a.cntr_value*100.0)/b.cntr_value,2) from master.dbo.sysperfinfo a, master.dbo.sysperfinfo b where a.counter_name = 'Buffer cache hit ratio' and b.counter_name='Buffer cache hit ratio base'",
+			'=WarnCacheRatio'),
+		'prepared sql hit ratio' => array('RATIO',
+			array('dbcc cachestats','Prepared',1,100),
+			''),
+		'adhoc sql hit ratio' => array('RATIO',
+			array('dbcc cachestats','Adhoc',1,100),
+			''),
+	'IO',
+		'data reads' => array('IO',
+		"select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page reads/sec'"),
+		'data writes' => array('IO',
+		"select cntr_value from master.dbo.sysperfinfo where counter_name = 'Page writes/sec'"),
+			
+	'Data Cache',
+		'data cache size' => array('DATAC',
+		"select cntr_value*8192 from master.dbo.sysperfinfo where counter_name = 'Total Pages' and object_name='SQLServer:Buffer Manager'",
+			'' ),
+		'data cache blocksize' => array('DATAC',
+			"select 8192",'page size'),
+	'Connections',
+		'current connections' => array('SESS',
+			'=sp_who',
+			''),
+		'max connections' => array('SESS',
+			"SELECT @@MAX_CONNECTIONS",
+			''),
+
+		false
+	);
+	
+	
+	function perf_mssql(&$conn)
+	{
+		if ($conn->dataProvider == 'odbc') {
+			$this->sql1 = 'sql1';
+			//$this->explain = false;
+		}
+		$this->conn =& $conn;
+	}
+	
+	function Explain($sql,$partial=false)
+	{
+		
+		$save = $this->conn->LogSQL(false);
+		if ($partial) {
+			$sqlq = $this->conn->qstr($sql.'%');
+			$arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq");
+			if ($arr) {
+				foreach($arr as $row) {
+					$sql = reset($row);
+					if (crc32($sql) == $partial) break;
+				}
+			}
+		}
+		
+		$s = '<p><b>Explain</b>: '.htmlspecialchars($sql).'</p>';
+		$this->conn->Execute("SET SHOWPLAN_ALL ON;");
+		$sql = str_replace('?',"''",$sql);
+		global $ADODB_FETCH_MODE;
+		
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$rs =& $this->conn->Execute($sql);
+		//adodb_printr($rs);
+		$ADODB_FETCH_MODE = $save;
+		if ($rs) {
+			$rs->MoveNext();
+			$s .= '<table bgcolor=white border=0 cellpadding="1" callspacing=0><tr><td nowrap align=center> Rows<td nowrap align=center> IO<td nowrap align=center> CPU<td align=left> &nbsp; &nbsp; Plan</tr>';
+			while (!$rs->EOF) {
+				$s .= '<tr><td>'.round($rs->fields[8],1).'<td>'.round($rs->fields[9],3).'<td align=right>'.round($rs->fields[10],3).'<td nowrap><pre>'.htmlspecialchars($rs->fields[0])."</td></pre></tr>\n"; ## NOTE CORRUPT </td></pre> tag is intentional!!!!
+				$rs->MoveNext();
+			}
+			$s .= '</table>';
+			
+			$rs->NextRecordSet();
+		}
+		
+		$this->conn->Execute("SET SHOWPLAN_ALL OFF;");
+		$this->conn->LogSQL($save);
+		$s .= $this->Tracer($sql);
+		return $s;
+	}
+	
+	function Tables()
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		//$this->conn->debug=1;
+		$s = '<table border=1 bgcolor=white><tr><td><b>tablename</b></td><td><b>size_in_k</b></td><td><b>index size</b></td><td><b>reserved size</b></td></tr>';
+		$rs1 = $this->conn->Execute("select distinct name from sysobjects where xtype='U'");
+		if ($rs1) {
+			while (!$rs1->EOF) {
+				$tab = $rs1->fields[0];
+				$tabq = $this->conn->qstr($tab);
+				$rs2 = $this->conn->Execute("sp_spaceused $tabq");
+				if ($rs2) {
+					$s .= '<tr><td>'.$tab.'</td><td align=right>'.$rs2->fields[3].'</td><td align=right>'.$rs2->fields[4].'</td><td align=right>'.$rs2->fields[2].'</td></tr>';
+					$rs2->Close();
+				}
+				$rs1->MoveNext();
+			}
+			$rs1->Close();
+		}
+		$ADODB_FETCH_MODE = $save;
+		return $s.'</table>';
+	}
+	
+	function sp_who()
+	{
+		$arr = $this->conn->GetArray('sp_who');
+		return sizeof($arr);
+	}
+	
+	function HealthCheck($cli=false)
+	{
+		
+		$this->conn->Execute('dbcc traceon(3604)');
+		$html =  adodb_perf::HealthCheck($cli);
+		$this->conn->Execute('dbcc traceoff(3604)');
+		return $html;
+	}
+	
+	
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/perf/perf-mysql.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/perf/perf-mysql.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/perf/perf-mysql.inc.php	(revision 225)
@@ -0,0 +1,315 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning 
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class perf_mysql extends adodb_perf{
+	
+	var $tablesSQL = 'show table status';
+	
+	var $createTableSQL = "CREATE TABLE adodb_logsql (
+		  created datetime NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 text NOT NULL,
+		  params text NOT NULL,
+		  tracer text NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)";
+		
+	var $settings = array(
+	'Ratios',
+		'MyISAM cache hit ratio' => array('RATIO',
+			'=GetKeyHitRatio',
+			'=WarnCacheRatio'),
+		'InnoDB cache hit ratio' => array('RATIO',
+			'=GetInnoDBHitRatio',
+			'=WarnCacheRatio'),
+		'data cache hit ratio' => array('HIDE', # only if called
+			'=FindDBHitRatio',
+			'=WarnCacheRatio'),
+		'sql cache hit ratio' => array('RATIO',
+			'=GetQHitRatio',
+			''),
+	'IO',
+		'data reads' => array('IO',
+			'=GetReads',
+			'Number of selects (Key_reads is not accurate)'),
+		'data writes' => array('IO',
+			'=GetWrites',
+			'Number of inserts/updates/deletes * coef (Key_writes is not accurate)'),
+		
+	'Data Cache',
+		'MyISAM data cache size' => array('DATAC',
+			array("show variables", 'key_buffer_size'),
+			'' ),
+		'BDB data cache size' => array('DATAC',
+			array("show variables", 'bdb_cache_size'),
+			'' ),
+		'InnoDB data cache size' => array('DATAC',
+			array("show variables", 'innodb_buffer_pool_size'),
+			'' ),
+	'Memory Usage',
+		'read buffer size' => array('CACHE',
+			array("show variables", 'read_buffer_size'),
+			'(per session)'),
+		'sort buffer size' => array('CACHE',
+			array("show variables", 'sort_buffer_size'),
+			'Size of sort buffer (per session)' ),
+		'table cache' => array('CACHE',
+			array("show variables", 'table_cache'),
+			'Number of tables to keep open'),
+	'Connections',	
+		'current connections' => array('SESS',
+			array('show status','Threads_connected'),
+			''),
+		'max connections' => array( 'SESS',
+			array("show variables",'max_connections'),
+			''),
+	
+		false
+	);
+	
+	function perf_mysql(&$conn)
+	{
+		$this->conn =& $conn;
+	}
+	
+	function Explain($sql,$partial=false)
+	{
+		
+		if (strtoupper(substr(trim($sql),0,6)) !== 'SELECT') return '<p>Unable to EXPLAIN non-select statement</p>';
+		$save = $this->conn->LogSQL(false);
+		if ($partial) {
+			$sqlq = $this->conn->qstr($sql.'%');
+			$arr = $this->conn->GetArray("select distinct sql1 from adodb_logsql where sql1 like $sqlq");
+			if ($arr) {
+				foreach($arr as $row) {
+					$sql = reset($row);
+					if (crc32($sql) == $partial) break;
+				}
+			}
+		}
+		$sql = str_replace('?',"''",$sql);
+		
+		if ($partial) {
+			$sqlq = $this->conn->qstr($sql.'%');
+			$sql = $this->conn->GetOne("select sql1 from adodb_logsql where sql1 like $sqlq");
+		}
+		
+		$s = '<p><b>Explain</b>: '.htmlspecialchars($sql).'</p>';
+		$rs = $this->conn->Execute('EXPLAIN '.$sql);
+		$s .= rs2html($rs,false,false,false,false);
+		$this->conn->LogSQL($save);
+		$s .= $this->Tracer($sql);
+		return $s;
+	}
+	
+	function Tables()
+	{
+		if (!$this->tablesSQL) return false;
+		
+		$rs = $this->conn->Execute($this->tablesSQL);
+		if (!$rs) return false;
+		
+		$html = rs2html($rs,false,false,false,false);
+		return $html;
+	}
+	
+	function GetReads()
+	{
+	global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+		
+		$rs = $this->conn->Execute('show status');
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if (!$rs) return 0;
+		$val = 0;
+		while (!$rs->EOF) {
+			switch($rs->fields[0]) {
+			case 'Com_select': 
+				$val = $rs->fields[1];
+				$rs->Close();
+				return $val;
+			}
+			$rs->MoveNext();
+		} 
+		
+		$rs->Close();
+		
+		return $val;
+	}
+	
+	function GetWrites()
+	{
+	global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+		
+		$rs = $this->conn->Execute('show status');
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if (!$rs) return 0;
+		$val = 0.0;
+		while (!$rs->EOF) {
+			switch($rs->fields[0]) {
+			case 'Com_insert': 
+				$val += $rs->fields[1]; break;
+			case 'Com_delete': 
+				$val += $rs->fields[1]; break;
+			case 'Com_update': 
+				$val += $rs->fields[1]/2;
+				$rs->Close();
+				return $val;
+			}
+			$rs->MoveNext();
+		} 
+		
+		$rs->Close();
+		
+		return $val;
+	}
+	
+	function FindDBHitRatio()
+	{
+		// first find out type of table
+		//$this->conn->debug=1;
+		
+		global $ADODB_FETCH_MODE;
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+		
+		$rs = $this->conn->Execute('show table status');
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if (!$rs) return '';
+		$type = strtoupper($rs->fields[1]);
+		$rs->Close();
+		switch($type){
+		case 'MYISAM':
+		case 'ISAM':
+			return $this->DBParameter('MyISAM cache hit ratio').' (MyISAM)';
+		case 'INNODB':
+			return $this->DBParameter('InnoDB cache hit ratio').' (InnoDB)';
+		default:
+			return $type.' not supported';
+		}
+		
+	}
+	
+	function GetQHitRatio()
+	{
+		//Total number of queries = Qcache_inserts + Qcache_hits + Qcache_not_cached
+		$hits = $this->_DBParameter(array("show status","Qcache_hits"));
+		$total = $this->_DBParameter(array("show status","Qcache_inserts"));
+		$total += $this->_DBParameter(array("show status","Qcache_not_cached"));
+		
+		$total += $hits;
+		if ($total) return round(($hits*100)/$total,2);
+		return 0;
+	}
+	
+	/*
+		Use session variable to store Hit percentage, because MySQL
+		does not remember last value of SHOW INNODB STATUS hit ratio
+		
+		# 1st query to SHOW INNODB STATUS
+		0.00 reads/s, 0.00 creates/s, 0.00 writes/s
+		Buffer pool hit rate 1000 / 1000
+		
+		# 2nd query to SHOW INNODB STATUS
+		0.00 reads/s, 0.00 creates/s, 0.00 writes/s
+		No buffer pool activity since the last printout
+	*/
+	function GetInnoDBHitRatio()
+	{
+	global $ADODB_FETCH_MODE;
+	
+		$save = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+		
+		$rs = $this->conn->Execute('show innodb status');
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_FETCH_MODE = $save;
+		
+		if (!$rs || $rs->EOF) return 0;
+		$stat = $rs->fields[0];
+		$rs->Close();
+		$at = strpos($stat,'Buffer pool hit rate');
+		$stat = substr($stat,$at,200);
+		if (preg_match('!Buffer pool hit rate\s*([0-9]*) / ([0-9]*)!',$stat,$arr)) {
+			$val = 100*$arr[1]/$arr[2];
+			$_SESSION['INNODB_HIT_PCT'] = $val;
+			return round($val,2);
+		} else {
+			if (isset($_SESSION['INNODB_HIT_PCT'])) return $_SESSION['INNODB_HIT_PCT'];
+			return 0;
+		}
+		return 0;
+	}
+	
+	function GetKeyHitRatio()
+	{
+		$hits = $this->_DBParameter(array("show status","Key_read_requests"));
+		$reqs = $this->_DBParameter(array("show status","Key_reads"));
+		if ($reqs == 0) return 0;
+		
+		return round(($hits/($reqs+$hits))*100,2);
+	}
+	
+    // start hack 
+    var $optimizeTableLow = 'CHECK TABLE %s FAST QUICK';
+    var $optimizeTableHigh = 'OPTIMIZE TABLE %s';
+    
+    /** 
+     * @see adodb_perf#optimizeTable
+     */
+     function optimizeTable( $table, $mode = ADODB_OPT_LOW) 
+     {
+        if ( !is_string( $table)) return false;
+        
+        $conn = $this->conn;
+        if ( !$conn) return false;
+        
+        $sql = '';
+        switch( $mode) {
+            case ADODB_OPT_LOW : $sql = $this->optimizeTableLow; break;
+            case ADODB_OPT_HIGH : $sql = $this->optimizeTableHigh; break;
+            default : 
+            {
+                // May dont use __FUNCTION__ constant for BC (__FUNCTION__ Added in PHP 4.3.0)
+                ADOConnection::outp( sprintf( "<p>%s: '%s' using of undefined mode '%s'</p>", __CLASS__, __FUNCTION__, $mode));
+                return false;
+            }
+        }
+        $sql = sprintf( $sql, $table);
+        
+        return $conn->Execute( $sql) !== false;
+     }
+    // end hack 
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/perf/perf-oci8.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/perf/perf-oci8.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/perf/perf-oci8.inc.php	(revision 225)
@@ -0,0 +1,509 @@
+<?php
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning 
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+class perf_oci8 extends ADODB_perf{
+	
+	var $tablesSQL = "select segment_name as \"tablename\", sum(bytes)/1024 as \"size_in_k\",tablespace_name as \"tablespace\",count(*) \"extents\" from sys.user_extents 
+	   group by segment_name,tablespace_name";
+	 
+	var $version;
+	var $createTableSQL = "CREATE TABLE adodb_logsql (
+		  created date NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 varchar(4000) NOT NULL,
+		  params varchar(4000),
+		  tracer varchar(4000),
+		  timer decimal(16,6) NOT NULL
+		)";
+	
+	var $settings = array(
+	'Ratios',
+		'data cache hit ratio' => array('RATIOH',
+			"select round((1-(phy.value / (cur.value + con.value)))*100,2) 
+			from v\$sysstat cur, v\$sysstat con, v\$sysstat phy
+			where cur.name = 'db block gets' and
+			      con.name = 'consistent gets' and
+			      phy.name = 'physical reads'",
+			'=WarnCacheRatio'),
+		
+		'sql cache hit ratio' => array( 'RATIOH',
+			'select round(100*(sum(pins)-sum(reloads))/sum(pins),2)  from v$librarycache',
+			'increase <i>shared_pool_size</i> if too ratio low'),
+			
+		'datadict cache hit ratio' => array('RATIOH',
+		"select      
+           round((1 - (sum(getmisses) / (sum(gets) +          
+   		 sum(getmisses))))*100,2)
+		from  v\$rowcache",
+		'increase <i>shared_pool_size</i> if too ratio low'),
+		
+		'memory sort ratio' => array('RATIOH',
+		"SELECT ROUND((100 * b.VALUE) /DECODE ((a.VALUE + b.VALUE), 
+       0,1,(a.VALUE + b.VALUE)),2)
+FROM   v\$sysstat a, 
+       v\$sysstat b
+WHERE  a.name = 'sorts (disk)'
+AND    b.name = 'sorts (memory)'",
+	"% of memory sorts compared to disk sorts - should be over 95%"),
+
+	'IO',
+		'data reads' => array('IO',
+		"select value from v\$sysstat where name='physical reads'"),
+	
+	'data writes' => array('IO',
+		"select value from v\$sysstat where name='physical writes'"),
+	
+	'Data Cache',
+		'data cache buffers' => array( 'DATAC',
+		"select a.value/b.value  from v\$parameter a, v\$parameter b 
+			where a.name = 'db_cache_size' and b.name= 'db_block_size'",
+			'Number of cache buffers. Tune <i>db_cache_size</i> if the <i>data cache hit ratio</i> is too low.'),
+		'data cache blocksize' => array('DATAC',
+			"select value from v\$parameter where name='db_block_size'",
+			'' ),			
+	'Memory Pools',
+		'data cache size' => array('DATAC',
+			"select value from v\$parameter where name = 'db_cache_size'",
+			'db_cache_size' ),
+		'shared pool size' => array('DATAC',
+			"select value from v\$parameter where name = 'shared_pool_size'",
+			'shared_pool_size, which holds shared sql, stored procedures, dict cache and similar shared structs' ),
+		'java pool size' => array('DATAJ',
+			"select value from v\$parameter where name = 'java_pool_size'",
+			'java_pool_size' ),
+		'large pool buffer size' => array('CACHE',
+			"select value from v\$parameter where name='large_pool_size'",
+			'this pool is for large mem allocations (not because it is larger than shared pool), for MTS sessions, parallel queries, io buffers (large_pool_size) ' ),
+
+		'pga buffer size' => array('CACHE',			
+			"select value from v\$parameter where name='pga_aggregate_target'",
+			'program global area is private memory for sorting, and hash and bitmap merges - since oracle 9i (pga_aggregate_target)' ),
+
+		
+		'Connections',
+		'current connections' => array('SESS',
+			'select count(*) from sys.v_$session where username is not null',
+			''),
+		'max connections' => array( 'SESS',
+			"select value from v\$parameter where name='sessions'",
+			''),
+
+	'Memory Utilization',		
+		'data cache utilization ratio' => array('RATIOU',
+			"select round((1-bytes/sgasize)*100, 2)
+			from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f
+			where name = 'free memory' and pool = 'shared pool'",
+		'Percentage of data cache actually in use - should be over 85%'),
+		
+		'shared pool utilization ratio' => array('RATIOU',
+		'select round((sga.bytes/p.value)*100,2)
+		from v$sgastat sga, v$parameter p
+		where sga.name = \'free memory\' and sga.pool = \'shared pool\'
+		and p.name = \'shared_pool_size\'',
+		'Percentage of shared pool actually used - too low is bad, too high is worse'),
+		
+		'large pool utilization ratio' => array('RATIOU',
+			"select round((1-bytes/sgasize)*100, 2)
+			from (select sum(bytes) sgasize from sys.v_\$sgastat) s, sys.v_\$sgastat f
+			where name = 'free memory' and pool = 'large pool'",
+		'Percentage of large_pool actually in use - too low is bad, too high is worse'),
+		'sort buffer size' => array('CACHE',
+			"select value from v\$parameter where name='sort_area_size'",
+			'max in-mem sort_area_size (per query), uses memory in pga' ),
+
+		'pga usage at peak' => array('RATIOU',
+		'=PGA','Mb utilization at peak transactions (requires Oracle 9i+)'),
+	'Transactions',
+		'rollback segments' => array('ROLLBACK',
+			"select count(*) from sys.v_\$rollstat",
+			''),
+	
+		'peak transactions' => array('ROLLBACK',
+			"select max_utilization  tx_hwm
+    		from sys.v_\$resource_limit
+    		where resource_name = 'transactions'",
+			'Taken from high-water-mark'),
+		'max transactions' => array('ROLLBACK',
+			"select value from v\$parameter where name = 'transactions'",
+			'max transactions / rollback segments < 3.5 (or transactions_per_rollback_segment)'),
+	'Parameters',	
+		'cursor sharing' => array('CURSOR',
+			"select value from v\$parameter where name = 'cursor_sharing'",
+			'Cursor reuse strategy. Recommended is FORCE (8i+) or SIMILAR (9i+). See <a href=http://www.praetoriate.com/oracle_tips_cursor_sharing.htm>cursor_sharing</a>.'),
+		/*
+		'cursor reuse' => array('CURSOR',
+			"select count(*) from (select sql_text_wo_constants, count(*)
+  from t1
+ group by sql_text_wo_constants
+having count(*) > 100)",'These are sql statements that should be using bind variables'),*/
+		'index cache cost' => array('COST',
+			"select value from v\$parameter where name = 'optimizer_index_caching'",
+			'=WarnIndexCost'),
+		'random page cost' => array('COST',
+			"select value from v\$parameter where name = 'optimizer_index_cost_adj'",
+			'=WarnPageCost'),
+		
+		false
+		
+	);
+	
+	
+	function perf_oci8(&$conn)
+	{
+		$savelog = $conn->LogSQL(false);	
+		$this->version = $conn->ServerInfo();
+		$conn->LogSQL($savelog);	
+		$this->conn =& $conn;
+	}
+	
+	function WarnPageCost($val)
+	{
+		if ($val == 100) $s = '<font color=red><b>Too High</b>. </font>';
+		else $s = '';
+		
+		return $s.'Recommended is 20-50 for TP, and 50 for data warehouses. Default is 100. See <a href=http://www.dba-oracle.com/oracle_tips_cost_adj.htm>optimizer_index_cost_adj</a>. ';
+	}
+	
+	function WarnIndexCost($val)
+	{
+		if ($val == 0) $s = '<font color=red><b>Too Low</b>. </font>';
+		else $s = '';
+		
+		return $s.'Percentage of indexed data blocks expected in the cache.
+			Recommended is 20 (fast disk array) to 50 (slower hard disks). Default is 0.
+			 See <a href=http://www.dba-oracle.com/oracle_tips_cbo_part1.htm>optimizer_index_caching</a>.';
+		}
+	
+	function PGA()
+	{
+		if ($this->version['version'] < 9) return 'Oracle 9i or later required';
+		
+		$rs = $this->conn->Execute("select a.mb,a.targ as pga_size_pct,a.pct from 
+	   (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb,
+	   	   pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r 
+	   	   from v\$pga_target_advice) a left join
+	   (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb,
+	   	   pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r 
+	   	   from v\$pga_target_advice) b on 
+	  a.r = b.r+1 where 
+  		b.pct < 100");
+		if (!$rs) return "Only in 9i or later";
+		$rs->Close();
+		if ($rs->EOF) return "PGA could be too big";
+		
+		return reset($rs->fields);
+	}
+	
+	function Explain($sql,$partial=false) 
+	{
+		$savelog = $this->conn->LogSQL(false);
+		$rs =& $this->conn->SelectLimit("select ID FROM PLAN_TABLE");
+		if (!$rs) {
+			echo "<p><b>Missing PLAN_TABLE</b></p>
+<pre>
+CREATE TABLE PLAN_TABLE (
+  STATEMENT_ID                    VARCHAR2(30),
+  TIMESTAMP                       DATE,
+  REMARKS                         VARCHAR2(80),
+  OPERATION                       VARCHAR2(30),
+  OPTIONS                         VARCHAR2(30),
+  OBJECT_NODE                     VARCHAR2(128),
+  OBJECT_OWNER                    VARCHAR2(30),
+  OBJECT_NAME                     VARCHAR2(30),
+  OBJECT_INSTANCE                 NUMBER(38),
+  OBJECT_TYPE                     VARCHAR2(30),
+  OPTIMIZER                       VARCHAR2(255),
+  SEARCH_COLUMNS                  NUMBER,
+  ID                              NUMBER(38),
+  PARENT_ID                       NUMBER(38),
+  POSITION                        NUMBER(38),
+  COST                            NUMBER(38),
+  CARDINALITY                     NUMBER(38),
+  BYTES                           NUMBER(38),
+  OTHER_TAG                       VARCHAR2(255),
+  PARTITION_START                 VARCHAR2(255),
+  PARTITION_STOP                  VARCHAR2(255),
+  PARTITION_ID                    NUMBER(38),
+  OTHER                           LONG,
+  DISTRIBUTION                    VARCHAR2(30)
+);
+</pre>";
+			return false;
+		}
+		
+		$rs->Close();
+	//	$this->conn->debug=1;
+	
+		if ($partial) {
+			$sqlq = $this->conn->qstr($sql.'%');
+			$arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq");
+			if ($arr) {
+				foreach($arr as $row) {
+					$sql = reset($row);
+					if (crc32($sql) == $partial) break;
+				}
+			}
+		}
+		
+		$s = "<p><b>Explain</b>: ".htmlspecialchars($sql)."</p>";	
+		
+		$this->conn->BeginTrans();
+		$id = "ADODB ".microtime();
+
+		$rs =& $this->conn->Execute("EXPLAIN PLAN SET STATEMENT_ID='$id' FOR $sql");
+		$m = $this->conn->ErrorMsg();
+		if ($m) {
+			$this->conn->RollbackTrans();
+			$this->conn->LogSQL($savelog);
+			$s .= "<p>$m</p>";
+			return $s;
+		}
+		$rs =& $this->conn->Execute("
+		select 
+  '<pre>'||lpad('--', (level-1)*2,'-') || trim(operation) || ' ' || trim(options)||'</pre>'  as Operation, 
+  object_name,COST,CARDINALITY,bytes
+		FROM plan_table 
+START WITH id = 0  and STATEMENT_ID='$id'  
+CONNECT BY prior id=parent_id and statement_id='$id'");
+		
+		$s .= rs2html($rs,false,false,false,false);
+		$this->conn->RollbackTrans();
+		$this->conn->LogSQL($savelog);
+		$s .= $this->Tracer($sql,$partial);
+		return $s;
+	}
+	
+	
+	function CheckMemory()
+	{
+		if ($this->version['version'] < 9) return 'Oracle 9i or later required';
+		
+		 $rs =& $this->conn->Execute("
+select  a.size_for_estimate as cache_mb_estimate,
+	case when a.size_factor=1 then 
+   		'&lt;&lt;= current'
+	 when a.estd_physical_read_factor-b.estd_physical_read_factor > 0 and a.estd_physical_read_factor<1 then
+		'- BETTER - '
+	else ' ' end as currsize, 
+   a.estd_physical_read_factor-b.estd_physical_read_factor as best_when_0
+   from (select size_for_estimate,size_factor,estd_physical_read_factor,rownum  r from v\$db_cache_advice) a , 
+   (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) b where a.r = b.r-1");
+		if (!$rs) return false;
+		
+		/*
+		The v$db_cache_advice utility show the marginal changes in physical data block reads for different sizes of db_cache_size
+		*/
+		$s = "<h3>Data Cache Estimate</h3>";
+		if ($rs->EOF) {
+			$s .= "<p>Cache that is 50% of current size is still too big</p>";
+		} else {
+			$s .= "Ideal size of Data Cache is when \"best_when_0\" changes from a positive number and becomes zero.";
+			$s .= rs2html($rs,false,false,false,false);
+		}
+		return $s;
+	}
+	
+	/*
+		Generate html for suspicious/expensive sql
+	*/
+	function tohtml(&$rs,$type)
+	{
+		$o1 = $rs->FetchField(0);
+		$o2 = $rs->FetchField(1);
+		$o3 = $rs->FetchField(2);
+		if ($rs->EOF) return '<p>None found</p>';
+		$check = '';
+		$sql = '';
+		$s = "\n\n<table border=1 bgcolor=white><tr><td><b>".$o1->name.'</b></td><td><b>'.$o2->name.'</b></td><td><b>'.$o3->name.'</b></td></tr>';
+		while (!$rs->EOF) {
+			if ($check != $rs->fields[0].'::'.$rs->fields[1]) {
+				if ($check) {
+					$carr = explode('::',$check);
+					$prefix = "<a href=\"?$type=1&sql=".rawurlencode($sql).'&x#explain">';
+					$suffix = '</a>';
+					if (strlen($prefix)>2000) {
+						$prefix = '';
+						$suffix = '';
+					}
+					
+					$s .=  "\n<tr><td align=right>".$carr[0].'</td><td align=right>'.$carr[1].'</td><td>'.$prefix.$sql.$suffix.'</td></tr>';
+				}
+				$sql = $rs->fields[2];
+				$check = $rs->fields[0].'::'.$rs->fields[1];			
+			} else
+				$sql .= $rs->fields[2];
+			if (substr($sql,strlen($sql)-1) == "\0") $sql = substr($sql,0,strlen($sql)-1);
+			$rs->MoveNext();
+		}
+		$rs->Close();
+		
+		$carr = explode('::',$check);
+		$prefix = "<a target=".rand()." href=\"?&hidem=1&$type=1&sql=".rawurlencode($sql).'&x#explain">';
+		$suffix = '</a>';
+		if (strlen($prefix)>2000) {
+			$prefix = '';
+			$suffix = '';
+		}
+		$s .=  "\n<tr><td align=right>".$carr[0].'</td><td align=right>'.$carr[1].'</td><td>'.$prefix.$sql.$suffix.'</td></tr>';
+					
+		return $s."</table>\n\n";
+	}
+	
+	// code thanks to Ixora. 
+	// http://www.ixora.com.au/scripts/query_opt.htm
+	// requires oracle 8.1.7 or later
+	function SuspiciousSQL($numsql=10)
+	{
+		$sql = "
+select
+  substr(to_char(s.pct, '99.00'), 2) || '%'  load,
+  s.executions  executes,
+  p.sql_text
+from
+  ( 
+    select
+      address,
+      buffer_gets,
+      executions,
+      pct,
+      rank() over (order by buffer_gets desc)  ranking
+    from
+      ( 
+	select
+	  address,
+	  buffer_gets,
+	  executions,
+	  100 * ratio_to_report(buffer_gets) over ()  pct
+	from
+	  sys.v_\$sql
+	where
+	  command_type != 47 and module != 'T.O.A.D.'
+      )
+    where
+      buffer_gets > 50 * executions
+  )  s,
+  sys.v_\$sqltext  p
+where
+  s.ranking <= $numsql and
+  p.address = s.address
+order by
+  1 desc, s.address, p.piece";
+
+  		global $ADODB_CACHE_MODE;
+  		if (isset($_GET['expsixora']) && isset($_GET['sql'])) {
+				$partial = empty($_GET['part']);
+				echo "<a name=explain></a>".$this->Explain($_GET['sql'],$partial)."\n";
+		}
+
+		if (isset($_GET['sql'])) return $this->_SuspiciousSQL($numsql);
+		
+		$s = '';
+		$s .= $this->_SuspiciousSQL($numsql);
+		$s .= '<p>';
+		
+		$save = $ADODB_CACHE_MODE;
+		$ADODB_CACHE_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+		
+		$savelog = $this->conn->LogSQL(false);
+		$rs =& $this->conn->SelectLimit($sql);
+		$this->conn->LogSQL($savelog);
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_CACHE_MODE = $save;
+		if ($rs) {
+			$s .= "\n<h3>Ixora Suspicious SQL</h3>";
+			$s .= $this->tohtml($rs,'expsixora');
+		}
+		
+		return $s;
+	}
+	
+	// code thanks to Ixora. 
+	// http://www.ixora.com.au/scripts/query_opt.htm
+	// requires oracle 8.1.7 or later
+	function ExpensiveSQL($numsql = 10)
+	{
+		$sql = "
+select
+  substr(to_char(s.pct, '99.00'), 2) || '%'  load,
+  s.executions  executes,
+  p.sql_text
+from
+  ( 
+    select
+      address,
+      disk_reads,
+      executions,
+      pct,
+      rank() over (order by disk_reads desc)  ranking
+    from
+      (
+	select
+	  address,
+	  disk_reads,
+	  executions,
+	  100 * ratio_to_report(disk_reads) over ()  pct
+	from
+	  sys.v_\$sql
+	where
+	  command_type != 47 and module != 'T.O.A.D.'
+      )
+    where
+      disk_reads > 50 * executions
+  )  s,
+  sys.v_\$sqltext  p
+where
+  s.ranking <= $numsql and
+  p.address = s.address
+order by
+  1 desc, s.address, p.piece
+";
+		global $ADODB_CACHE_MODE;
+  		if (isset($_GET['expeixora']) && isset($_GET['sql'])) {
+			$partial = empty($_GET['part']);	
+			echo "<a name=explain></a>".$this->Explain($_GET['sql'],$partial)."\n";
+		}
+		if (isset($_GET['sql'])) {
+			 $var = $this->_ExpensiveSQL($numsql);
+			 return $var;
+		}
+		
+		$s = '';		
+		$s .= $this->_ExpensiveSQL($numsql);
+		$s .= '<p>';
+		$save = $ADODB_CACHE_MODE;
+		$ADODB_CACHE_MODE = ADODB_FETCH_NUM;
+		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
+		
+		$savelog = $this->conn->LogSQL(false);
+		$rs =& $this->conn->Execute($sql);
+		$this->conn->LogSQL($savelog);
+		
+		if (isset($savem)) $this->conn->SetFetchMode($savem);
+		$ADODB_CACHE_MODE = $save;
+		
+		if ($rs) {
+			$s .= "\n<h3>Ixora Expensive SQL</h3>";
+			$s .= $this->tohtml($rs,'expeixora');
+		}
+	
+		return $s;
+	}
+	
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/perf/perf-postgres.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/perf/perf-postgres.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/perf/perf-postgres.inc.php	(revision 225)
@@ -0,0 +1,124 @@
+<?php
+
+/* 
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. See License.txt. 
+  Set tabs to 4 for best viewing.
+  
+  Latest version is available at http://adodb.sourceforge.net
+  
+  Library for basic performance monitoring and tuning 
+  
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+/*
+	Notice that PostgreSQL has no sql query cache
+*/
+class perf_postgres extends adodb_perf{
+	
+	var $tablesSQL = 
+	"select a.relname as tablename,(a.relpages+CASE WHEN b.relpages is null THEN 0 ELSE b.relpages END+CASE WHEN c.relpages is null THEN 0 ELSE c.relpages END)*8 as size_in_K,a.relfilenode as \"OID\"  from pg_class a left join pg_class b
+		on b.relname = 'pg_toast_'||trim(a.relfilenode) 
+		left join pg_class c on c.relname = 'pg_toast_'||trim(a.relfilenode)||'_index'
+		where a.relname in (select tablename from pg_tables where tablename not like 'pg_%')";
+	
+	var $createTableSQL = "CREATE TABLE adodb_logsql (
+		  created timestamp NOT NULL,
+		  sql0 varchar(250) NOT NULL,
+		  sql1 text NOT NULL,
+		  params text NOT NULL,
+		  tracer text NOT NULL,
+		  timer decimal(16,6) NOT NULL
+		)";	
+	
+	var $settings = array(
+	'Ratios',
+		'statistics collector' => array('RATIO',
+			"select case when count(*)=3 then 'TRUE' else 'FALSE' end from pg_settings where (name='stats_block_level' or name='stats_row_level' or name='stats_start_collector') and setting='on' ",
+			'Value must be TRUE to enable hit ratio statistics (<i>stats_start_collector</i>,<i>stats_row_level</i> and <i>stats_block_level</i> must be set to true in postgresql.conf)'),
+		'data cache hit ratio' => array('RATIO',
+			"select case when blks_hit=0 then 0 else round( ((1-blks_read::float/blks_hit)*100)::numeric, 2) end from pg_stat_database where datname='\$DATABASE'",
+			'=WarnCacheRatio'),
+	'IO',
+		'data reads' => array('IO',
+		'select sum(heap_blks_read+toast_blks_read) from pg_statio_user_tables',
+		),
+		'data writes' => array('IO',
+		'select round((sum(n_tup_ins/4.0+n_tup_upd/8.0+n_tup_del/4.0)/16)::numeric,2) from pg_stat_user_tables',
+		'Count of inserts/updates/deletes * coef'),
+
+	'Data Cache',
+		'data cache buffers' => array('DATAC',
+			"select setting from pg_settings where name='shared_buffers'",
+			'Number of cache buffers. <a href=http://www.varlena.com/GeneralBits/Tidbits/perf.html#basic>Tuning</a>'),
+		'cache blocksize' => array('DATAC',
+			'select 8192',
+			'(estimate)' ),
+		'data cache size' => array( 'DATAC',
+		"select setting::integer*8192 from pg_settings where name='shared_buffers'",
+			'' ),
+		'operating system cache size' => array( 'DATA',
+		"select setting::integer*8192 from pg_settings where name='effective_cache_size'",
+			'(effective cache size)' ),
+	'Memory Usage',
+	# Postgres 7.5 changelog: Rename server parameters SortMem and VacuumMem to work_mem and maintenance_work_mem;
+		'sort/work buffer size' => array('CACHE',
+			"select setting::integer*1024 from pg_settings where name='sort_mem' or name = 'work_mem' order by name",
+			'Size of sort buffer (per query)' ),
+	'Connections',
+		'current connections' => array('SESS',
+			'select count(*) from pg_stat_activity',
+			''),
+		'max connections' => array('SESS',
+			"select setting from pg_settings where name='max_connections'",
+			''),
+	'Parameters',
+		'rollback buffers' => array('COST',
+			"select setting from pg_settings where name='wal_buffers'",
+			'WAL buffers'),
+		'random page cost' => array('COST',
+			"select setting from pg_settings where name='random_page_cost'",
+			'Cost of doing a seek (default=4). See <a href=http://www.varlena.com/GeneralBits/Tidbits/perf.html#less>random_page_cost</a>'),
+		false
+	);
+	
+	function perf_postgres(&$conn)
+	{
+		$this->conn =& $conn;
+	}
+	
+	function Explain($sql,$partial=false)
+	{
+		$save = $this->conn->LogSQL(false);
+		
+		if ($partial) {
+			$sqlq = $this->conn->qstr($sql.'%');
+			$arr = $this->conn->GetArray("select distinct distinct sql1 from adodb_logsql where sql1 like $sqlq");
+			if ($arr) {
+				foreach($arr as $row) {
+					$sql = reset($row);
+					if (crc32($sql) == $partial) break;
+				}
+			}
+		}
+		$sql = str_replace('?',"''",$sql);
+		$s = '<p><b>Explain</b>: '.htmlspecialchars($sql).'</p>';
+		$rs = $this->conn->Execute('EXPLAIN '.$sql);
+		$this->conn->LogSQL($save);
+		$s .= '<pre>';
+		if ($rs)
+			while (!$rs->EOF) {
+				$s .= reset($rs->fields)."\n";
+				$rs->MoveNext();
+			}
+		$s .= '</pre>';
+		$s .= $this->Tracer($sql,$partial);
+		return $s;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/pivottable.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/pivottable.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/pivottable.inc.php	(revision 225)
@@ -0,0 +1,187 @@
+<?php
+/** 
+ * @version V4.93 10 Oct 2006 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+*/
+
+/*
+ * Concept from daniel.lucazeau@ajornet.com. 
+ *
+ * @param db		Adodb database connection
+ * @param tables	List of tables to join
+ * @rowfields		List of fields to display on each row
+ * @colfield		Pivot field to slice and display in columns, if we want to calculate
+ *						ranges, we pass in an array (see example2)
+ * @where			Where clause. Optional.
+ * @aggfield		This is the field to sum. Optional. 
+ *						Since 2.3.1, if you can use your own aggregate function 
+ *						instead of SUM, eg. $aggfield = 'fieldname'; $aggfn = 'AVG';
+ * @sumlabel		Prefix to display in sum columns. Optional.
+ * @aggfn			Aggregate function to use (could be AVG, SUM, COUNT)
+ * @showcount		Show count of records
+ *
+ * @returns			Sql generated
+ */
+ 
+ function PivotTableSQL(&$db,$tables,$rowfields,$colfield, $where=false,
+ 	$aggfield = false,$sumlabel='Sum ',$aggfn ='SUM', $showcount = true)
+ {
+	if ($aggfield) $hidecnt = true;
+	else $hidecnt = false;
+	
+	$iif = strpos($db->databaseType,'access') !== false; 
+		// note - vfp 6 still doesn' work even with IIF enabled || $db->databaseType == 'vfp';
+	
+	//$hidecnt = false;
+	
+ 	if ($where) $where = "\nWHERE $where";
+	if (!is_array($colfield)) $colarr = $db->GetCol("select distinct $colfield from $tables $where order by 1");
+	if (!$aggfield) $hidecnt = false;
+	
+	$sel = "$rowfields, ";
+	if (is_array($colfield)) {
+		foreach ($colfield as $k => $v) {
+			$k = trim($k);
+			if (!$hidecnt) {
+				$sel .= $iif ? 
+					"\n\t$aggfn(IIF($v,1,0)) AS \"$k\", "
+					:
+					"\n\t$aggfn(CASE WHEN $v THEN 1 ELSE 0 END) AS \"$k\", ";
+			}
+			if ($aggfield) {
+				$sel .= $iif ?
+					"\n\t$aggfn(IIF($v,$aggfield,0)) AS \"$sumlabel$k\", "
+					:
+					"\n\t$aggfn(CASE WHEN $v THEN $aggfield ELSE 0 END) AS \"$sumlabel$k\", ";
+			}
+		} 
+	} else {
+		foreach ($colarr as $v) {
+			if (!is_numeric($v)) $vq = $db->qstr($v);
+			else $vq = $v;
+			$v = trim($v);
+			if (strlen($v) == 0	) $v = 'null';
+			if (!$hidecnt) {
+				$sel .= $iif ?
+					"\n\t$aggfn(IIF($colfield=$vq,1,0)) AS \"$v\", "
+					:
+					"\n\t$aggfn(CASE WHEN $colfield=$vq THEN 1 ELSE 0 END) AS \"$v\", ";
+			}
+			if ($aggfield) {
+				if ($hidecnt) $label = $v;
+				else $label = "{$v}_$aggfield";
+				$sel .= $iif ?
+					"\n\t$aggfn(IIF($colfield=$vq,$aggfield,0)) AS \"$label\", "
+					:
+					"\n\t$aggfn(CASE WHEN $colfield=$vq THEN $aggfield ELSE 0 END) AS \"$label\", ";
+			}
+		}
+	}
+	if ($aggfield && $aggfield != '1'){
+		$agg = "$aggfn($aggfield)";
+		$sel .= "\n\t$agg as \"$sumlabel$aggfield\", ";		
+	}
+	
+	if ($showcount)
+		$sel .= "\n\tSUM(1) as Total";
+	else
+		$sel = substr($sel,0,strlen($sel)-2);
+	
+	
+	// Strip aliases
+	$rowfields = preg_replace('/ AS (\w+)/i', '', $rowfields);
+	
+	$sql = "SELECT $sel \nFROM $tables $where \nGROUP BY $rowfields";
+	
+	return $sql;
+ }
+
+/* EXAMPLES USING MS NORTHWIND DATABASE */
+if (0) {
+
+# example1
+#
+# Query the main "product" table
+# Set the rows to CompanyName and QuantityPerUnit
+# and the columns to the Categories
+# and define the joins to link to lookup tables 
+# "categories" and "suppliers"
+#
+
+ $sql = PivotTableSQL(
+ 	$gDB,  											# adodb connection
+ 	'products p ,categories c ,suppliers s',  		# tables
+	'CompanyName,QuantityPerUnit',					# row fields
+	'CategoryName',									# column fields 
+	'p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID' # joins/where
+);
+ print "<pre>$sql";
+ $rs = $gDB->Execute($sql);
+ rs2html($rs);
+ 
+/*
+Generated SQL:
+
+SELECT CompanyName,QuantityPerUnit, 
+	SUM(CASE WHEN CategoryName='Beverages' THEN 1 ELSE 0 END) AS "Beverages", 
+	SUM(CASE WHEN CategoryName='Condiments' THEN 1 ELSE 0 END) AS "Condiments", 
+	SUM(CASE WHEN CategoryName='Confections' THEN 1 ELSE 0 END) AS "Confections", 
+	SUM(CASE WHEN CategoryName='Dairy Products' THEN 1 ELSE 0 END) AS "Dairy Products", 
+	SUM(CASE WHEN CategoryName='Grains/Cereals' THEN 1 ELSE 0 END) AS "Grains/Cereals", 
+	SUM(CASE WHEN CategoryName='Meat/Poultry' THEN 1 ELSE 0 END) AS "Meat/Poultry", 
+	SUM(CASE WHEN CategoryName='Produce' THEN 1 ELSE 0 END) AS "Produce", 
+	SUM(CASE WHEN CategoryName='Seafood' THEN 1 ELSE 0 END) AS "Seafood", 
+	SUM(1) as Total 
+FROM products p ,categories c ,suppliers s  WHERE p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID 
+GROUP BY CompanyName,QuantityPerUnit
+*/
+//=====================================================================
+
+# example2
+#
+# Query the main "product" table
+# Set the rows to CompanyName and QuantityPerUnit
+# and the columns to the UnitsInStock for diiferent ranges
+# and define the joins to link to lookup tables 
+# "categories" and "suppliers"
+#
+ $sql = PivotTableSQL(
+ 	$gDB,										# adodb connection
+ 	'products p ,categories c ,suppliers s',	# tables
+	'CompanyName,QuantityPerUnit',				# row fields
+												# column ranges
+array(										
+' 0 ' => 'UnitsInStock <= 0',
+"1 to 5" => '0 < UnitsInStock and UnitsInStock <= 5',
+"6 to 10" => '5 < UnitsInStock and UnitsInStock <= 10',
+"11 to 15"  => '10 < UnitsInStock and UnitsInStock <= 15',
+"16+" =>'15 < UnitsInStock'
+),
+	' p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID', # joins/where
+	'UnitsInStock', 							# sum this field
+	'Sum'										# sum label prefix
+);
+ print "<pre>$sql";
+ $rs = $gDB->Execute($sql);
+ rs2html($rs);
+ /*
+ Generated SQL:
+ 
+SELECT CompanyName,QuantityPerUnit, 
+	SUM(CASE WHEN UnitsInStock <= 0 THEN UnitsInStock ELSE 0 END) AS "Sum  0 ", 
+	SUM(CASE WHEN 0 < UnitsInStock and UnitsInStock <= 5 THEN UnitsInStock ELSE 0 END) AS "Sum 1 to 5", 
+	SUM(CASE WHEN 5 < UnitsInStock and UnitsInStock <= 10 THEN UnitsInStock ELSE 0 END) AS "Sum 6 to 10", 
+	SUM(CASE WHEN 10 < UnitsInStock and UnitsInStock <= 15 THEN UnitsInStock ELSE 0 END) AS "Sum 11 to 15", 
+	SUM(CASE WHEN 15 < UnitsInStock THEN UnitsInStock ELSE 0 END) AS "Sum 16+",
+	SUM(UnitsInStock) AS "Sum UnitsInStock", 
+	SUM(1) as Total 
+FROM products p ,categories c ,suppliers s  WHERE  p.CategoryID = c.CategoryID and s.SupplierID= p.SupplierID 
+GROUP BY CompanyName,QuantityPerUnit
+ */
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/readme.txt
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/readme.txt	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/readme.txt	(revision 225)
@@ -0,0 +1,62 @@
+>> ADODB Library for PHP4
+
+(c) 2000-2004 John Lim (jlim@natsoft.com.my)
+
+Released under both BSD and GNU Lesser GPL library license. 
+This means you can use it in proprietary products.
+ 
+ 
+>> Introduction
+
+PHP's database access functions are not standardised. This creates a 
+need for a database class library to hide the differences between the 
+different databases (encapsulate the differences) so we can easily 
+switch databases.
+
+We currently support MySQL, Interbase, Sybase, PostgreSQL, Oracle, 
+Microsoft SQL server,  Foxpro ODBC, Access ODBC, Informix, DB2,
+Sybase SQL Anywhere, generic ODBC and Microsoft's ADO. 
+
+We hope more people will contribute drivers to support other databases.
+
+
+>> Documentation and Examples
+
+Refer to the adodb/docs directory for full documentation and examples. 
+There is also a  tutorial tute.htm that contrasts ADODB code with 
+mysql code.
+
+
+>>> Files
+Adodb.inc.php is the main file. You need to include only this file.
+
+Adodb-*.inc.php are the database specific driver code.
+
+Test.php contains a list of test commands to exercise the class library.
+
+Adodb-session.php is the PHP4 session handling code.
+
+Testdatabases.inc.php contains the list of databases to apply the tests on.
+
+Benchmark.php is a simple benchmark to test the throughput of a simple SELECT 
+statement for databases described in testdatabases.inc.php. The benchmark
+tables are created in test.php.
+
+readme.htm is the main documentation.
+
+tute.htm is the tutorial.
+
+
+>> More Info
+
+For more information, including installation see readme.htm
+or visit
+           http://adodb.sourceforge.net/
+
+
+>> Feature Requests and Bug Reports
+
+Email to jlim@natsoft.com.my 
+
+
+ 
Index: Dev/branches/Demo/rdfapi/util/adodb/rsfilter.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/rsfilter.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/rsfilter.inc.php	(revision 225)
@@ -0,0 +1,61 @@
+<?php
+/** 
+ * @version V4.93 10 Oct 2006 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * Latest version is available at http://php.weblogs.com
+ *
+ * Requires PHP4.01pl2 or later because it uses include_once
+*/
+
+/*
+	Filter all fields and all rows in a recordset and returns the 
+	processed recordset. We scroll to the beginning of the new recordset
+	after processing.
+	
+	We pass a recordset and function name to RSFilter($rs,'rowfunc');
+	and the function will be called multiple times, once
+	for each row in the recordset. The function will be passed
+	an array containing one row repeatedly.
+	
+	Example: 
+ 	
+	// ucwords() every element in the recordset
+	function do_ucwords(&$arr,$rs)
+	{
+		foreach($arr as $k => $v) {
+			$arr[$k] = ucwords($v);
+		}
+	}
+	$rs = RSFilter($rs,'do_ucwords');
+ */
+function &RSFilter($rs,$fn)
+{
+	if ($rs->databaseType != 'array') {
+		if (!$rs->connection) return false;
+		
+		$rs = &$rs->connection->_rs2rs($rs);
+	}
+	$rows = $rs->RecordCount();
+	for ($i=0; $i < $rows; $i++) {
+		if (is_array ($fn)) {
+        	$obj = $fn[0];
+        	$method = $fn[1];
+        	$obj->$method ($rs->_array[$i],$rs);
+      } else {
+			$fn($rs->_array[$i],$rs);
+      }
+	  
+	}
+	if (!$rs->EOF) {
+		$rs->_currentRow = 0;
+		$rs->fields = $rs->_array[0];
+	}
+	
+	return $rs;
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/server.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/server.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/server.php	(revision 225)
@@ -0,0 +1,100 @@
+<?php
+
+/** 
+ * @version V4.93 10 Oct 2006 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+ */
+ 
+/* Documentation on usage is at http://php.weblogs.com/adodb_csv
+ *
+ * Legal query string parameters:
+ * 
+ * sql = holds sql string
+ * nrows = number of rows to return 
+ * offset = skip offset rows of data
+ * fetch = $ADODB_FETCH_MODE
+ * 
+ * example:
+ *
+ * http://localhost/php/server.php?select+*+from+table&nrows=10&offset=2
+ */
+
+
+/* 
+ * Define the IP address you want to accept requests from 
+ * as a security measure. If blank we accept anyone promisciously!
+ */
+$ACCEPTIP = '127.0.0.1';
+
+/*
+ * Connection parameters
+ */
+$driver = 'mysql';
+$host = 'localhost'; // DSN for odbc
+$uid = 'root';
+$pwd = 'garbase-it-is';
+$database = 'test';
+
+/*============================ DO NOT MODIFY BELOW HERE =================================*/
+// $sep must match csv2rs() in adodb.inc.php
+$sep = ' :::: ';
+
+include('./adodb.inc.php');
+include_once(ADODB_DIR.'/adodb-csvlib.inc.php');
+
+function err($s)
+{
+	die('**** '.$s.' ');
+}
+
+// undo stupid magic quotes
+function undomq(&$m) 
+{
+	if (get_magic_quotes_gpc()) {
+		// undo the damage
+		$m = str_replace('\\\\','\\',$m);
+		$m = str_replace('\"','"',$m);
+		$m = str_replace('\\\'','\'',$m);
+		
+	}
+	return $m;
+}
+
+///////////////////////////////////////// DEFINITIONS
+
+
+$remote = $_SERVER["REMOTE_ADDR"]; 
+ 
+
+if (!empty($ACCEPTIP))
+ if ($remote != '127.0.0.1' && $remote != $ACCEPTIP) 
+ 	err("Unauthorised client: '$remote'");
+	
+	
+if (empty($_REQUEST['sql'])) err('No SQL');
+
+
+$conn = &ADONewConnection($driver);
+
+if (!$conn->Connect($host,$uid,$pwd,$database)) err($conn->ErrorNo(). $sep . $conn->ErrorMsg());
+$sql = undomq($_REQUEST['sql']);
+
+if (isset($_REQUEST['fetch']))
+	$ADODB_FETCH_MODE = $_REQUEST['fetch'];
+	
+if (isset($_REQUEST['nrows'])) {
+	$nrows = $_REQUEST['nrows'];
+	$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1;
+	$rs = $conn->SelectLimit($sql,$nrows,$offset);
+} else 
+	$rs = $conn->Execute($sql);
+if ($rs){ 
+	//$rs->timeToLive = 1;
+	echo _rs2serialize($rs,$conn,$sql);
+	$rs->Close();
+} else
+	err($conn->ErrorNo(). $sep .$conn->ErrorMsg());
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-compress-bzip2.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-compress-bzip2.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-compress-bzip2.php	(revision 225)
@@ -0,0 +1,118 @@
+<?php
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+
+*/
+
+if (!function_exists('bzcompress')) {
+	trigger_error('bzip2 functions are not available', E_USER_ERROR);
+	return 0;
+}
+
+/*
+*/
+class ADODB_Compress_Bzip2 {
+	/**
+	 */
+	var $_block_size = null;
+
+	/**
+	 */
+	var $_work_level = null;
+
+	/**
+	 */
+	var $_min_length = 1;
+
+	/**
+	 */
+	function getBlockSize() {
+		return $this->_block_size;
+	}
+
+	/**
+	 */
+	function setBlockSize($block_size) {
+		assert('$block_size >= 1');
+		assert('$block_size <= 9');
+		$this->_block_size = (int) $block_size;
+	}
+
+	/**
+	 */
+	function getWorkLevel() {
+		return $this->_work_level;
+	}
+
+	/**
+	 */
+	function setWorkLevel($work_level) {
+		assert('$work_level >= 0');
+		assert('$work_level <= 250');
+		$this->_work_level = (int) $work_level;
+	}
+
+	/**
+	 */
+	function getMinLength() {
+		return $this->_min_length;
+	}
+
+	/**
+	 */
+	function setMinLength($min_length) {
+		assert('$min_length >= 0');
+		$this->_min_length = (int) $min_length;
+	}
+
+	/**
+	 */
+	function ADODB_Compress_Bzip2($block_size = null, $work_level = null, $min_length = null) {
+		if (!is_null($block_size)) {
+			$this->setBlockSize($block_size);
+		}
+
+		if (!is_null($work_level)) {
+			$this->setWorkLevel($work_level);
+		}
+
+		if (!is_null($min_length)) {
+			$this->setMinLength($min_length);
+		}
+	}
+
+	/**
+	 */
+	function write($data, $key) {
+		if (strlen($data) < $this->_min_length) {
+			return $data;
+		}
+
+		if (!is_null($this->_block_size)) {
+			if (!is_null($this->_work_level)) {
+				return bzcompress($data, $this->_block_size, $this->_work_level);
+			} else {
+				return bzcompress($data, $this->_block_size);
+			}
+		}
+
+		return bzcompress($data);
+	}
+
+	/**
+	 */
+	function read($data, $key) {
+		return $data ? bzdecompress($data) : $data;
+	}
+
+}
+
+return 1;
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-compress-gzip.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-compress-gzip.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-compress-gzip.php	(revision 225)
@@ -0,0 +1,93 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+
+*/
+
+if (!function_exists('gzcompress')) {
+	trigger_error('gzip functions are not available', E_USER_ERROR);
+	return 0;
+}
+
+/*
+*/
+class ADODB_Compress_Gzip {
+	/**
+	 */
+	var $_level = null;
+
+	/**
+	 */
+	var $_min_length = 1;
+
+	/**
+	 */
+	function getLevel() {
+		return $this->_level;
+	}
+
+	/**
+	 */
+	function setLevel($level) {
+		assert('$level >= 0');
+		assert('$level <= 9');
+		$this->_level = (int) $level;
+	}
+
+	/**
+	 */
+	function getMinLength() {
+		return $this->_min_length;
+	}
+
+	/**
+	 */
+	function setMinLength($min_length) {
+		assert('$min_length >= 0');
+		$this->_min_length = (int) $min_length;
+	}
+
+	/**
+	 */
+	function ADODB_Compress_Gzip($level = null, $min_length = null) {
+		if (!is_null($level)) {
+			$this->setLevel($level);
+		}
+
+		if (!is_null($min_length)) {
+			$this->setMinLength($min_length);
+		}
+	}
+
+	/**
+	 */
+	function write($data, $key) {
+		if (strlen($data) < $this->_min_length) {
+			return $data;
+		}
+
+		if (!is_null($this->_level)) {
+			return gzcompress($data, $this->_level);
+		} else {
+			return gzcompress($data);
+		}
+	}
+
+	/**
+	 */
+	function read($data, $key) {
+		return $data ? gzuncompress($data) : $data;
+	}
+
+}
+
+return 1;
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-cryptsession.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-cryptsession.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-cryptsession.php	(revision 225)
@@ -0,0 +1,27 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+*/
+
+/*
+
+This file is provided for backwards compatibility purposes
+
+*/
+
+if (!defined('ADODB_SESSION')) {
+	require_once dirname(__FILE__) . '/adodb-session.php';
+}
+
+require_once  ADODB_SESSION . '/adodb-encrypt-md5.php';
+
+ADODB_Session::filter(new ADODB_Encrypt_MD5());
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-cryptsession2.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-cryptsession2.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-cryptsession2.php	(revision 225)
@@ -0,0 +1,27 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+*/
+
+/*
+
+This file is provided for backwards compatibility purposes
+
+*/
+
+if (!defined('ADODB_SESSION')) {
+	require_once dirname(__FILE__) . '/adodb-session2.php';
+}
+
+require_once  ADODB_SESSION . '/adodb-encrypt-md5.php';
+
+ADODB_Session::filter(new ADODB_Encrypt_MD5());
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-mcrypt.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-mcrypt.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-mcrypt.php	(revision 225)
@@ -0,0 +1,109 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+
+*/
+
+if (!function_exists('mcrypt_encrypt')) {
+	trigger_error('Mcrypt functions are not available', E_USER_ERROR);
+	return 0;
+}
+
+/**
+ */
+class ADODB_Encrypt_MCrypt {
+	/**
+	 */
+	var $_cipher;
+
+	/**
+	 */
+	var $_mode;
+
+	/**
+	 */
+	var $_source;
+
+	/**
+	 */
+	function getCipher() {
+		return $this->_cipher;
+	}
+
+	/**
+	 */
+	function setCipher($cipher) {
+		$this->_cipher = $cipher;
+	}
+
+	/**
+	 */
+	function getMode() {
+		return $this->_mode;
+	}
+
+	/**
+	 */
+	function setMode($mode) {
+		$this->_mode = $mode;
+	}
+
+	/**
+	 */
+	function getSource() {
+		return $this->_source;
+	}
+
+	/**
+	 */
+	function setSource($source) {
+		$this->_source = $source;
+	}
+
+	/**
+	 */
+	function ADODB_Encrypt_MCrypt($cipher = null, $mode = null, $source = null) {
+		if (!$cipher) {
+			$cipher = MCRYPT_RIJNDAEL_256;
+		}
+		if (!$mode) {
+			$mode = MCRYPT_MODE_ECB;
+		}
+		if (!$source) {
+			$source = MCRYPT_RAND;
+		}
+
+		$this->_cipher = $cipher;
+		$this->_mode = $mode;
+		$this->_source = $source;
+	}
+
+	/**
+	 */
+	function write($data, $key) {
+		$iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode);
+		$iv = mcrypt_create_iv($iv_size, $this->_source);
+		return mcrypt_encrypt($this->_cipher, $key, $data, $this->_mode, $iv);
+	}
+
+	/**
+	 */
+	function read($data, $key) {
+		$iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode);
+		$iv = mcrypt_create_iv($iv_size, $this->_source);
+		$rv = mcrypt_decrypt($this->_cipher, $key, $data, $this->_mode, $iv);
+		return rtrim($rv, "\0");
+	}
+
+}
+
+return 1;
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-md5.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-md5.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-md5.php	(revision 225)
@@ -0,0 +1,39 @@
+<?php
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+
+*/
+
+// security - hide paths
+if (!defined('ADODB_SESSION')) die();
+
+include_once ADODB_SESSION . '/crypt.inc.php';
+
+/**
+ */
+class ADODB_Encrypt_MD5 {
+	/**
+	 */
+	function write($data, $key) {
+		$md5crypt =& new MD5Crypt();
+		return $md5crypt->encrypt($data, $key);
+	}
+
+	/**
+	 */
+	function read($data, $key) {
+		$md5crypt =& new MD5Crypt();
+		return $md5crypt->decrypt($data, $key);
+	}
+
+}
+
+return 1;
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-secret.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-secret.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-secret.php	(revision 225)
@@ -0,0 +1,48 @@
+<?php
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+
+*/
+
+@define('HORDE_BASE', dirname(dirname(dirname(__FILE__))) . '/horde');
+
+if (!is_dir(HORDE_BASE)) {
+	trigger_error(sprintf('Directory not found: \'%s\'', HORDE_BASE), E_USER_ERROR);
+	return 0;
+}
+
+include_once HORDE_BASE . '/lib/Horde.php';
+include_once HORDE_BASE . '/lib/Secret.php';
+
+/**
+
+NOTE: On Windows 2000 SP4 with PHP 4.3.1, MCrypt 2.4.x, and Apache 1.3.28,
+the session didn't work properly.
+
+This may be resolved with 4.3.3.
+
+ */
+class ADODB_Encrypt_Secret {
+	/**
+	 */
+	function write($data, $key) {
+		return Secret::write($key, $data);
+	}
+
+	/**
+	 */
+	function read($data, $key) {
+		return Secret::read($key, $data);
+	}
+
+}
+
+return 1;
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-sha1.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-sha1.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-encrypt-sha1.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+if (!defined('ADODB_SESSION')) die();
+
+include_once ADODB_SESSION . '/crypt.inc.php';
+
+
+/**
+
+ */
+
+class ADODB_Encrypt_SHA1 {
+
+	function write($data, $key) 
+	{
+		$sha1crypt =& new SHA1Crypt();
+		return $sha1crypt->encrypt($data, $key);
+
+	}
+
+
+	function read($data, $key) 
+	{
+		$sha1crypt =& new SHA1Crypt();
+		return $sha1crypt->decrypt($data, $key);
+
+	}
+}
+
+
+
+return 1;
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sess.txt
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sess.txt	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sess.txt	(revision 225)
@@ -0,0 +1,131 @@
+John,
+
+I have been an extremely satisfied ADODB user for several years now.
+
+To give you something back for all your hard work, I've spent the last 3
+days rewriting the adodb-session.php code.
+
+----------
+What's New
+----------
+
+Here's a list of the new code's benefits:
+
+* Combines the functionality of the three files:
+
+adodb-session.php
+adodb-session-clob.php
+adodb-cryptsession.php
+
+each with very similar functionality, into a single file adodb-session.php.
+This will ease maintenance and support issues.
+
+* Supports multiple encryption and compression schemes.
+  Currently, we support:
+
+  MD5Crypt (crypt.inc.php)
+  MCrypt
+  Secure (Horde's emulation of MCrypt, if MCrypt module is not available.)
+  GZip
+  BZip2
+
+These can be stacked, so if you want to compress and then encrypt your
+session data, it's easy.
+Also, the built-in MCrypt functions will be *much* faster, and more secure,
+than the MD5Crypt code.
+
+* adodb-session.php contains a single class ADODB_Session that encapsulates
+all functionality.
+  This eliminates the use of global vars and defines (though they are
+supported for backwards compatibility).
+
+* All user defined parameters are now static functions in the ADODB_Session
+class.
+
+New parameters include:
+
+* encryptionKey(): Define the encryption key used to encrypt the session.
+Originally, it was a hard coded string.
+
+* persist(): Define if the database will be opened in persistent mode.
+Originally, the user had to call adodb_sess_open().
+
+* dataFieldName(): Define the field name used to store the session data, as
+'DATA' appears to be a reserved word in the following cases:
+	ANSI SQL
+	IBM DB2
+	MS SQL Server
+	Postgres
+	SAP
+
+* filter(): Used to support multiple, simulataneous encryption/compression
+schemes.
+
+* Debug support is improved thru _rsdump() function, which is called after
+every database call.
+
+------------
+What's Fixed
+------------
+
+The new code includes several bug fixes and enhancements:
+
+* sesskey is compared in BINARY mode for MySQL, to avoid problems with
+session keys that differ only by case.
+  Of course, the user should define the sesskey field as BINARY, to
+correctly fix this problem, otherwise performance will suffer.
+
+* In ADODB_Session::gc(), if $expire_notify is true, the multiple DELETES in
+the original code have been optimized to a single DELETE.
+
+* In ADODB_Session::destroy(), since "SELECT expireref, sesskey FROM $table
+WHERE sesskey = $qkey" will only return a single value, we don't loop on the
+result, we simply process the row, if any.
+
+* We close $rs after every use.
+
+---------------
+What's the Same
+---------------
+
+I know backwards compatibility is *very* important to you.  Therefore, the
+new code is 100% backwards compatible.
+
+If you like my code, but don't "trust" it's backwards compatible, maybe we
+offer it as beta code, in a new directory for a release or two?
+
+------------
+What's To Do
+------------
+
+I've vascillated over whether to use a single function to get/set
+parameters:
+
+$user = ADODB_Session::user(); 	// get
+ADODB_Session::user($user);		// set
+
+or to use separate functions (which is the PEAR/Java way):
+
+$user = ADODB_Session::getUser();
+ADODB_Session::setUser($user);
+
+I've chosen the former as it's makes for a simpler API, and reduces the
+amount of code, but I'd be happy to change it to the latter.
+
+Also, do you think the class should be a singleton class, versus a static
+class?
+
+Let me know if you find this code useful, and will be including it in the
+next release of ADODB.
+
+If so, I will modify the current documentation to detail the new
+functionality.  To that end, what file(s) contain the documentation?  Please
+send them to me if they are not publically available.
+
+Also, if there is *anything* in the code that you like to see changed, let
+me know.
+
+Thanks,
+
+Ross
+
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session-clob.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session-clob.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session-clob.php	(revision 225)
@@ -0,0 +1,24 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+*/
+
+/*
+
+This file is provided for backwards compatibility purposes
+
+*/
+
+if (!defined('ADODB_SESSION')) {
+	require_once dirname(__FILE__) . '/adodb-session.php';
+}
+ADODB_Session::clob('CLOB');
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session-clob2.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session-clob2.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session-clob2.php	(revision 225)
@@ -0,0 +1,24 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+*/
+
+/*
+
+This file is provided for backwards compatibility purposes
+
+*/
+
+if (!defined('ADODB_SESSION')) {
+	require_once dirname(__FILE__) . '/adodb-session2.php';
+}
+ADODB_Session::clob('CLOB');
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session.php	(revision 225)
@@ -0,0 +1,934 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+*/
+
+/*
+	You may want to rename the 'data' field to 'session_data' as
+	'data' appears to be a reserved word for one or more of the following:
+		ANSI SQL
+		IBM DB2
+		MS SQL Server
+		Postgres
+		SAP
+
+	If you do, then execute:
+
+		ADODB_Session::dataFieldName('session_data');
+
+*/
+
+if (!defined('_ADODB_LAYER')) {
+	require realpath(dirname(__FILE__) . '/../adodb.inc.php');
+}
+
+if (defined('ADODB_SESSION')) return 1;
+
+define('ADODB_SESSION', dirname(__FILE__));
+
+
+/* 
+	Unserialize session data manually. See http://phplens.com/lens/lensforum/msgs.php?id=9821 
+	
+	From Kerr Schere, to unserialize session data stored via ADOdb. 
+	1. Pull the session data from the db and loop through it. 
+	2. Inside the loop, you will need to urldecode the data column. 
+	3. After urldecode, run the serialized string through this function:
+
+*/
+function adodb_unserialize( $serialized_string ) 
+{
+	$variables = array( );
+	$a = preg_split( "/(\w+)\|/", $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
+	for( $i = 0; $i < count( $a ); $i = $i+2 ) {
+		$variables[$a[$i]] = unserialize( $a[$i+1] );
+	}
+	return( $variables );
+}
+
+/*
+	Thanks Joe Li. See http://phplens.com/lens/lensforum/msgs.php?id=11487&x=1
+	Since adodb 4.61.
+*/
+function adodb_session_regenerate_id() 
+{
+	$conn =& ADODB_Session::_conn();
+	if (!$conn) return false;
+
+	$old_id = session_id();
+	if (function_exists('session_regenerate_id')) {
+		session_regenerate_id();
+	} else {
+		session_id(md5(uniqid(rand(), true)));
+		$ck = session_get_cookie_params();
+		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
+		//@session_start();
+	}
+	$new_id = session_id();
+	$ok =& $conn->Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id));
+	
+	/* it is possible that the update statement fails due to a collision */
+	if (!$ok) {
+		session_id($old_id);
+		if (empty($ck)) $ck = session_get_cookie_params();
+		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
+		return false;
+	}
+	
+	return true;
+}
+
+/*
+    Generate database table for session data
+    @see http://phplens.com/lens/lensforum/msgs.php?id=12280
+    @return 0 if failure, 1 if errors, 2 if successful.
+	@author Markus Staab http://www.public-4u.de
+*/
+function adodb_session_create_table($schemaFile=null,$conn = null)
+{
+    // set default values
+    if ($schemaFile===null) $schemaFile = ADODB_SESSION . '/session_schema.xml';
+    if ($conn===null) $conn =& ADODB_Session::_conn();
+
+	if (!$conn) return 0;
+
+    $schema = new adoSchema($conn);
+    $schema->ParseSchema($schemaFile);
+    return $schema->ExecuteSchema();
+}
+
+/*!
+	\static
+*/
+class ADODB_Session {
+	/////////////////////
+	// getter/setter methods
+	/////////////////////
+	
+	/*
+	
+	function Lock($lock=null)
+	{
+	static $_lock = false;
+	
+		if (!is_null($lock)) $_lock = $lock;
+		return $lock;
+	}
+	*/
+	/*!
+	*/
+	function driver($driver = null) {
+		static $_driver = 'mysql';
+		static $set = false;
+
+		if (!is_null($driver)) {
+			$_driver = trim($driver);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_DRIVER'])) {
+				return $GLOBALS['ADODB_SESSION_DRIVER'];
+			}
+		}
+
+		return $_driver;
+	}
+
+	/*!
+	*/
+	function host($host = null) {
+		static $_host = 'localhost';
+		static $set = false;
+
+		if (!is_null($host)) {
+			$_host = trim($host);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_CONNECT'])) {
+				return $GLOBALS['ADODB_SESSION_CONNECT'];
+			}
+		}
+
+		return $_host;
+	}
+
+	/*!
+	*/
+	function user($user = null) {
+		static $_user = 'root';
+		static $set = false;
+
+		if (!is_null($user)) {
+			$_user = trim($user);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_USER'])) {
+				return $GLOBALS['ADODB_SESSION_USER'];
+			}
+		}
+
+		return $_user;
+	}
+
+	/*!
+	*/
+	function password($password = null) {
+		static $_password = '';
+		static $set = false;
+
+		if (!is_null($password)) {
+			$_password = $password;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_PWD'])) {
+				return $GLOBALS['ADODB_SESSION_PWD'];
+			}
+		}
+
+		return $_password;
+	}
+
+	/*!
+	*/
+	function database($database = null) {
+		static $_database = 'xphplens_2';
+		static $set = false;
+
+		if (!is_null($database)) {
+			$_database = trim($database);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_DB'])) {
+				return $GLOBALS['ADODB_SESSION_DB'];
+			}
+		}
+
+		return $_database;
+	}
+
+	/*!
+	*/
+	function persist($persist = null) 
+	{
+		static $_persist = true;
+
+		if (!is_null($persist)) {
+			$_persist = trim($persist);
+		}
+
+		return $_persist;
+	}
+
+	/*!
+	*/
+	function lifetime($lifetime = null) {
+		static $_lifetime;
+		static $set = false;
+
+		if (!is_null($lifetime)) {
+			$_lifetime = (int) $lifetime;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESS_LIFE'])) {
+				return $GLOBALS['ADODB_SESS_LIFE'];
+			}
+		}
+		if (!$_lifetime) {
+			$_lifetime = ini_get('session.gc_maxlifetime');
+			if ($_lifetime <= 1) {
+				// bug in PHP 4.0.3 pl 1  -- how about other versions?
+				//print "<h3>Session Error: PHP.INI setting <i>session.gc_maxlifetime</i>not set: $lifetime</h3>";
+				$_lifetime = 1440;
+			}
+		}
+
+		return $_lifetime;
+	}
+
+	/*!
+	*/
+	function debug($debug = null) {
+		static $_debug = false;
+		static $set = false;
+
+		if (!is_null($debug)) {
+			$_debug = (bool) $debug;
+
+			$conn = ADODB_Session::_conn();
+			if ($conn) {
+				$conn->debug = $_debug;
+			}
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESS_DEBUG'])) {
+				return $GLOBALS['ADODB_SESS_DEBUG'];
+			}
+		}
+
+		return $_debug;
+	}
+
+	/*!
+	*/
+	function expireNotify($expire_notify = null) {
+		static $_expire_notify;
+		static $set = false;
+
+		if (!is_null($expire_notify)) {
+			$_expire_notify = $expire_notify;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'])) {
+				return $GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'];
+			}
+		}
+
+		return $_expire_notify;
+	}
+
+	/*!
+	*/
+	function table($table = null) {
+		static $_table = 'sessions';
+		static $set = false;
+
+		if (!is_null($table)) {
+			$_table = trim($table);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_TBL'])) {
+				return $GLOBALS['ADODB_SESSION_TBL'];
+			}
+		}
+
+		return $_table;
+	}
+
+	/*!
+	*/
+	function optimize($optimize = null) {
+		static $_optimize = false;
+		static $set = false;
+
+		if (!is_null($optimize)) {
+			$_optimize = (bool) $optimize;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (defined('ADODB_SESSION_OPTIMIZE')) {
+				return true;
+			}
+		}
+
+		return $_optimize;
+	}
+
+	/*!
+	*/
+	function syncSeconds($sync_seconds = null) {
+		static $_sync_seconds = 60;
+		static $set = false;
+
+		if (!is_null($sync_seconds)) {
+			$_sync_seconds = (int) $sync_seconds;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (defined('ADODB_SESSION_SYNCH_SECS')) {
+				return ADODB_SESSION_SYNCH_SECS;
+			}
+		}
+
+		return $_sync_seconds;
+	}
+
+	/*!
+	*/
+	function clob($clob = null) {
+		static $_clob = false;
+		static $set = false;
+
+		if (!is_null($clob)) {
+			$_clob = strtolower(trim($clob));
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_USE_LOBS'])) {
+				return $GLOBALS['ADODB_SESSION_USE_LOBS'];
+			}
+		}
+
+		return $_clob;
+	}
+
+	/*!
+	*/
+	function dataFieldName($data_field_name = null) {
+		static $_data_field_name = 'data';
+
+		if (!is_null($data_field_name)) {
+			$_data_field_name = trim($data_field_name);
+		}
+
+		return $_data_field_name;
+	}
+
+	/*!
+	*/
+	function filter($filter = null) {
+		static $_filter = array();
+
+		if (!is_null($filter)) {
+			if (!is_array($filter)) {
+				$filter = array($filter);
+			}
+			$_filter = $filter;
+		}
+
+		return $_filter;
+	}
+
+	/*!
+	*/
+	function encryptionKey($encryption_key = null) {
+		static $_encryption_key = 'CRYPTED ADODB SESSIONS ROCK!';
+
+		if (!is_null($encryption_key)) {
+			$_encryption_key = $encryption_key;
+		}
+
+		return $_encryption_key;
+	}
+
+	/////////////////////
+	// private methods
+	/////////////////////
+
+	/*!
+	*/
+	function &_conn($conn=null) {
+		return $GLOBALS['ADODB_SESS_CONN'];
+	}
+
+	/*!
+	*/
+	function _crc($crc = null) {
+		static $_crc = false;
+
+		if (!is_null($crc)) {
+			$_crc = $crc;
+		}
+
+		return $_crc;
+	}
+
+	/*!
+	*/
+	function _init() {
+		session_module_name('user');
+		session_set_save_handler(
+			array('ADODB_Session', 'open'),
+			array('ADODB_Session', 'close'),
+			array('ADODB_Session', 'read'),
+			array('ADODB_Session', 'write'),
+			array('ADODB_Session', 'destroy'),
+			array('ADODB_Session', 'gc')
+		);
+	}
+
+
+	/*!
+	*/
+	function _sessionKey() {
+		// use this function to create the encryption key for crypted sessions
+		// crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt
+		return crypt(ADODB_Session::encryptionKey(), session_id());
+	}
+
+	/*!
+	*/
+	function _dumprs($rs) {
+		$conn	=& ADODB_Session::_conn();
+		$debug	= ADODB_Session::debug();
+
+		if (!$conn) {
+			return;
+		}
+
+		if (!$debug) {
+			return;
+		}
+
+		if (!$rs) {
+			echo "<br />\$rs is null or false<br />\n";
+			return;
+		}
+
+		//echo "<br />\nAffected_Rows=",$conn->Affected_Rows(),"<br />\n";
+
+		if (!is_object($rs)) {
+			return;
+		}
+
+		require_once ADODB_SESSION.'/../tohtml.inc.php';
+		rs2html($rs);
+	}
+
+	/////////////////////
+	// public methods
+	/////////////////////
+	
+	function config($driver, $host, $user, $password, $database=false,$options=false)
+	{
+		ADODB_Session::driver($driver);
+		ADODB_Session::host($host);
+		ADODB_Session::user($user);
+		ADODB_Session::password($password);
+		ADODB_Session::database($database);
+		
+		if ($driver == 'oci8' || $driver == 'oci8po') $options['lob'] = 'CLOB';
+		
+		if (isset($options['table'])) ADODB_Session::table($options['table']);
+		if (isset($options['lob'])) ADODB_Session::clob($options['lob']);
+		if (isset($options['debug'])) ADODB_Session::debug($options['debug']);
+	}
+
+	/*!
+		Create the connection to the database.
+
+		If $conn already exists, reuse that connection
+	*/
+	function open($save_path, $session_name, $persist = null) 
+	{
+		$conn =& ADODB_Session::_conn();
+
+		if ($conn) {
+			return true;
+		}
+
+		$database	= ADODB_Session::database();
+		$debug		= ADODB_Session::debug();
+		$driver		= ADODB_Session::driver();
+		$host		= ADODB_Session::host();
+		$password	= ADODB_Session::password();
+		$user		= ADODB_Session::user();
+
+		if (!is_null($persist)) {
+			ADODB_Session::persist($persist);
+		} else {
+			$persist = ADODB_Session::persist();
+		}
+
+# these can all be defaulted to in php.ini
+#		assert('$database');
+#		assert('$driver');
+#		assert('$host');
+
+		$conn =& ADONewConnection($driver);
+
+		if ($debug) {
+			$conn->debug = true;
+//			ADOConnection::outp( " driver=$driver user=$user pwd=$password db=$database ");
+		}
+
+		if ($persist) {
+			switch($persist) {
+			default:
+			case 'P': $ok = $conn->PConnect($host, $user, $password, $database); break;
+			case 'C': $ok = $conn->Connect($host, $user, $password, $database); break;
+			case 'N': $ok = $conn->NConnect($host, $user, $password, $database); break;
+			}
+		} else {
+			$ok = $conn->Connect($host, $user, $password, $database);
+		}
+
+		if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn;
+		else
+			ADOConnection::outp('<p>Session: connection failed</p>', false);
+		
+
+		return $ok;
+	}
+
+	/*!
+		Close the connection
+	*/
+	function close() 
+	{
+/*
+		$conn =& ADODB_Session::_conn();
+		if ($conn) $conn->Close();
+*/
+		return true;
+	}
+
+	/*
+		Slurp in the session variables and return the serialized string
+	*/
+	function read($key) 
+	{
+		$conn	=& ADODB_Session::_conn();
+		$data	= ADODB_Session::dataFieldName();
+		$filter	= ADODB_Session::filter();
+		$table	= ADODB_Session::table();
+
+		if (!$conn) {
+			return '';
+		}
+
+		//assert('$table');
+
+		$qkey = $conn->quote($key);
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+	
+		$sql = "SELECT $data FROM $table WHERE sesskey = $binary $qkey AND expiry >= " . time();
+		/* Lock code does not work as it needs to hold transaction within whole page, and we don't know if 
+		  developer has commited elsewhere... :(
+		 */
+		#if (ADODB_Session::Lock())
+		#	$rs =& $conn->RowLock($table, "$binary sesskey = $qkey AND expiry >= " . time(), $data);
+		#else
+		
+			$rs =& $conn->Execute($sql);
+		//ADODB_Session::_dumprs($rs);
+		if ($rs) {
+			if ($rs->EOF) {
+				$v = '';
+			} else {
+				$v = reset($rs->fields);
+				$filter = array_reverse($filter);
+				foreach ($filter as $f) {
+					if (is_object($f)) {
+						$v = $f->read($v, ADODB_Session::_sessionKey());
+					}
+				}
+				$v = rawurldecode($v);
+			}
+
+			$rs->Close();
+
+			ADODB_Session::_crc(strlen($v) . crc32($v));
+			return $v;
+		}
+
+		return '';
+	}
+
+	/*!
+		Write the serialized data to a database.
+
+		If the data has not been modified since the last read(), we do not write.
+	*/
+	function write($key, $val) 
+	{
+	global $ADODB_SESSION_READONLY;
+	
+		if (!empty($ADODB_SESSION_READONLY)) return;
+		
+		$clob			= ADODB_Session::clob();
+		$conn			=& ADODB_Session::_conn();
+		$crc			= ADODB_Session::_crc();
+		$data			= ADODB_Session::dataFieldName();
+		$debug			= ADODB_Session::debug();
+		$driver			= ADODB_Session::driver();
+		$expire_notify	= ADODB_Session::expireNotify();
+		$filter			= ADODB_Session::filter();
+		$lifetime		= ADODB_Session::lifetime();
+		$table			= ADODB_Session::table();
+	
+		if (!$conn) {
+			return false;
+		}
+		$qkey = $conn->qstr($key);
+	
+		//assert('$table');
+
+		$expiry = time() + $lifetime;
+
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+
+		// crc32 optimization since adodb 2.1
+		// now we only update expiry date, thx to sebastian thom in adodb 2.32
+		if ($crc !== false && $crc == (strlen($val) . crc32($val))) {
+			if ($debug) {
+				echo '<p>Session: Only updating date - crc32 not changed</p>';
+			}
+			
+			$expirevar = '';
+			if ($expire_notify) {
+				$var = reset($expire_notify);
+				global $$var;
+				if (isset($$var)) {
+					$expirevar = $$var;
+				}
+			}
+			
+			
+			$sql = "UPDATE $table SET expiry = ".$conn->Param('0').",expireref=".$conn->Param('1')." WHERE $binary sesskey = ".$conn->Param('2')." AND expiry >= ".$conn->Param('3');
+			$rs =& $conn->Execute($sql,array($expiry,$expirevar,$key,time()));
+			return true;
+		}
+		$val = rawurlencode($val);
+		foreach ($filter as $f) {
+			if (is_object($f)) {
+				$val = $f->write($val, ADODB_Session::_sessionKey());
+			}
+		}
+
+		$arr = array('sesskey' => $key, 'expiry' => $expiry, $data => $val, 'expireref' => '');
+		if ($expire_notify) {
+			$var = reset($expire_notify);
+			global $$var;
+			if (isset($$var)) {
+				$arr['expireref'] = $$var;
+			}
+		}
+
+		if (!$clob) {	// no lobs, simply use replace()
+			$arr[$data] = $conn->qstr($val);
+			$rs = $conn->Replace($table, $arr, 'sesskey', $autoQuote = true);
+			
+		} else {
+			// what value shall we insert/update for lob row?
+			switch ($driver) {
+				// empty_clob or empty_lob for oracle dbs
+				case 'oracle':
+				case 'oci8':
+				case 'oci8po':
+				case 'oci805':
+					$lob_value = sprintf('empty_%s()', strtolower($clob));
+					break;
+
+				// null for all other
+				default:
+					$lob_value = 'null';
+					break;
+			}
+			
+			$conn->StartTrans();
+			$expiryref = $conn->qstr($arr['expireref']);
+			// do we insert or update? => as for sesskey
+			$rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = $qkey");
+			if ($rs && reset($rs->fields) > 0) {
+				$sql = "UPDATE $table SET expiry = $expiry, $data = $lob_value, expireref=$expiryref WHERE  sesskey = $qkey";
+			} else {
+				$sql = "INSERT INTO $table (expiry, $data, sesskey,expireref) VALUES ($expiry, $lob_value, $qkey,$expiryref)";
+			}
+			if ($rs)$rs->Close();
+			
+
+			$err = '';
+			$rs1 =& $conn->Execute($sql);
+			if (!$rs1) $err = $conn->ErrorMsg()."\n";
+			
+			$rs2 =& $conn->UpdateBlob($table, $data, $val, " sesskey=$qkey", strtoupper($clob));
+			if (!$rs2) $err .= $conn->ErrorMsg()."\n";
+			
+			$rs = ($rs && $rs2) ? true : false;
+			$conn->CompleteTrans();
+		}
+
+		if (!$rs) {
+			ADOConnection::outp('<p>Session Replace: ' . $conn->ErrorMsg() . '</p>', false);
+			return false;
+		}  else {
+			// bug in access driver (could be odbc?) means that info is not committed
+			// properly unless select statement executed in Win2000
+			if ($conn->databaseType == 'access') {
+				$sql = "SELECT sesskey FROM $table WHERE $binary sesskey = $qkey";
+				$rs =& $conn->Execute($sql);
+				ADODB_Session::_dumprs($rs);
+				if ($rs) {
+					$rs->Close();
+				}
+			}
+		}/*
+		if (ADODB_Session::Lock()) {
+			$conn->CommitTrans();
+		}*/
+		return $rs ? true : false;
+	}
+
+	/*!
+	*/
+	function destroy($key) {
+		$conn			=& ADODB_Session::_conn();
+		$table			= ADODB_Session::table();
+		$expire_notify	= ADODB_Session::expireNotify();
+
+		if (!$conn) {
+			return false;
+		}
+
+		//assert('$table');
+
+		$qkey = $conn->quote($key);
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+
+		if ($expire_notify) {
+			reset($expire_notify);
+			$fn = next($expire_notify);
+			$savem = $conn->SetFetchMode(ADODB_FETCH_NUM);
+			$sql = "SELECT expireref, sesskey FROM $table WHERE $binary sesskey = $qkey";
+			$rs =& $conn->Execute($sql);
+			ADODB_Session::_dumprs($rs);
+			$conn->SetFetchMode($savem);
+			if (!$rs) {
+				return false;
+			}
+			if (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				//assert('$ref');
+				//assert('$key');
+				$fn($ref, $key);
+			}
+			$rs->Close();
+		}
+
+		$sql = "DELETE FROM $table WHERE $binary sesskey = $qkey";
+		$rs =& $conn->Execute($sql);
+		ADODB_Session::_dumprs($rs);
+
+		return $rs ? true : false;
+	}
+
+	/*!
+	*/
+	function gc($maxlifetime) 
+	{
+		$conn			=& ADODB_Session::_conn();
+		$debug			= ADODB_Session::debug();
+		$expire_notify	= ADODB_Session::expireNotify();
+		$optimize		= ADODB_Session::optimize();
+		$sync_seconds	= ADODB_Session::syncSeconds();
+		$table			= ADODB_Session::table();
+
+		if (!$conn) {
+			return false;
+		}
+
+
+		$time			= time();
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+
+		if ($expire_notify) {
+			reset($expire_notify);
+			$fn = next($expire_notify);
+			$savem = $conn->SetFetchMode(ADODB_FETCH_NUM);
+			$sql = "SELECT expireref, sesskey FROM $table WHERE expiry < $time";
+			$rs =& $conn->Execute($sql);
+			ADODB_Session::_dumprs($rs);
+			$conn->SetFetchMode($savem);
+			if ($rs) {
+				$conn->StartTrans();
+				$keys = array();
+				while (!$rs->EOF) {
+					$ref = $rs->fields[0];
+					$key = $rs->fields[1];
+					$fn($ref, $key);
+					$del = $conn->Execute("DELETE FROM $table WHERE sesskey=".$conn->Param('0'),array($key));
+					$rs->MoveNext();
+				}
+				$rs->Close();
+				
+				$conn->CompleteTrans();
+			}
+		} else {
+		
+			if (1) {
+				$sql = "SELECT sesskey FROM $table WHERE expiry < $time";
+				$arr =& $conn->GetAll($sql);
+				foreach ($arr as $row) {
+					$sql2 = "DELETE FROM $table WHERE sesskey=".$conn->Param('0');
+					$conn->Execute($sql2,array($row[0]));
+				}
+			} else {
+				$sql = "DELETE FROM $table WHERE expiry < $time";
+				$rs =& $conn->Execute($sql);
+				ADODB_Session::_dumprs($rs);
+				if ($rs) $rs->Close();
+			}
+			if ($debug) {
+				ADOConnection::outp("<p><b>Garbage Collection</b>: $sql</p>");
+			}
+		}
+
+		// suggested by Cameron, "GaM3R" <gamr@outworld.cx>
+		if ($optimize) {
+			$driver = ADODB_Session::driver();
+
+			if (preg_match('/mysql/i', $driver)) {
+				$sql = "OPTIMIZE TABLE $table";
+			}
+			if (preg_match('/postgres/i', $driver)) {
+				$sql = "VACUUM $table";
+			}
+			if (!empty($sql)) {
+				$conn->Execute($sql);
+			}
+		}
+
+		if ($sync_seconds) {
+			$sql = 'SELECT ';
+			if ($conn->dataProvider === 'oci8') {
+				$sql .= "TO_CHAR({$conn->sysTimeStamp}, 'RRRR-MM-DD HH24:MI:SS')";
+			} else {
+				$sql .= $conn->sysTimeStamp;
+			}
+			$sql .= " FROM $table";
+
+			$rs =& $conn->SelectLimit($sql, 1);
+			if ($rs && !$rs->EOF) {
+				$dbts = reset($rs->fields);
+				$rs->Close();
+				$dbt = $conn->UnixTimeStamp($dbts);
+				$t = time();
+
+				if (abs($dbt - $t) >= $sync_seconds) {
+					$msg = __FILE__ .
+						": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: " .
+						" database=$dbt ($dbts), webserver=$t (diff=". (abs($dbt - $t) / 60) . ' minutes)';
+					error_log($msg);
+					if ($debug) {
+						ADOConnection::outp("<p>$msg</p>");
+					}
+				}
+			}
+		}
+
+		return true;
+	}
+}
+
+ADODB_Session::_init();
+if (empty($ADODB_SESSION_READONLY))
+	register_shutdown_function('session_write_close');
+
+// for backwards compatability only
+function adodb_sess_open($save_path, $session_name, $persist = true) {
+	return ADODB_Session::open($save_path, $session_name, $persist);
+}
+
+// for backwards compatability only
+function adodb_sess_gc($t)
+{	
+	return ADODB_Session::gc($t);
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session2.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session2.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-session2.php	(revision 225)
@@ -0,0 +1,941 @@
+<?php
+
+
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+         Contributed by Ross Smith (adodb@netebb.com). 
+  Released under both BSD license and Lesser GPL library license.
+  Whenever there is any discrepancy between the two licenses,
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+	  
+
+*/
+
+/*
+
+CREATE Table SCripts
+
+Oracle
+======
+
+CREATE TABLE SESSIONS2
+(
+  SESSKEY    VARCHAR2(48 BYTE)                  NOT NULL,
+  EXPIRY     DATE                               NOT NULL,
+  EXPIREREF  VARCHAR2(200 BYTE),
+  CREATED    DATE                               NOT NULL,
+  MODIFIED   DATE                               NOT NULL,
+  SESSDATA   CLOB,
+  PRIMARY KEY(SESSKEY)
+);
+
+
+CREATE INDEX SESS2_EXPIRY ON SESSIONS2(EXPIRY);
+CREATE UNIQUE INDEX SESS2_PK ON SESSIONS2(SESSKEY);
+CREATE INDEX SESS2_EXP_REF ON SESSIONS2(EXPIREREF);
+
+
+ 
+ MySQL
+ =====
+ 
+CREATE TABLE sessions2(
+	sesskey VARCHAR( 64 ) NOT NULL DEFAULT '',
+	expiry TIMESTAMP NOT NULL ,
+	expireref VARCHAR( 250 ) DEFAULT '',
+	created TIMESTAMP NOT NULL ,
+	modified TIMESTAMP NOT NULL ,
+	sessdata LONGTEXT DEFAULT '',
+	PRIMARY KEY ( sesskey ) ,
+	INDEX sess2_expiry( expiry ),
+	INDEX sess2_expireref( expireref )
+)
+
+
+*/
+
+if (!defined('_ADODB_LAYER')) {
+	require realpath(dirname(__FILE__) . '/../adodb.inc.php');
+}
+
+if (defined('ADODB_SESSION')) return 1;
+
+define('ADODB_SESSION', dirname(__FILE__));
+define('ADODB_SESSION2', ADODB_SESSION);
+
+/* 
+	Unserialize session data manually. See http://phplens.com/lens/lensforum/msgs.php?id=9821 
+	
+	From Kerr Schere, to unserialize session data stored via ADOdb. 
+	1. Pull the session data from the db and loop through it. 
+	2. Inside the loop, you will need to urldecode the data column. 
+	3. After urldecode, run the serialized string through this function:
+
+*/
+function adodb_unserialize( $serialized_string ) 
+{
+	$variables = array( );
+	$a = preg_split( "/(\w+)\|/", $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
+	for( $i = 0; $i < count( $a ); $i = $i+2 ) {
+		$variables[$a[$i]] = unserialize( $a[$i+1] );
+	}
+	return( $variables );
+}
+
+/*
+	Thanks Joe Li. See http://phplens.com/lens/lensforum/msgs.php?id=11487&x=1
+	Since adodb 4.61.
+*/
+function adodb_session_regenerate_id() 
+{
+	$conn =& ADODB_Session::_conn();
+	if (!$conn) return false;
+
+	$old_id = session_id();
+	if (function_exists('session_regenerate_id')) {
+		session_regenerate_id();
+	} else {
+		session_id(md5(uniqid(rand(), true)));
+		$ck = session_get_cookie_params();
+		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
+		//@session_start();
+	}
+	$new_id = session_id();
+	$ok =& $conn->Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id));
+	
+	/* it is possible that the update statement fails due to a collision */
+	if (!$ok) {
+		session_id($old_id);
+		if (empty($ck)) $ck = session_get_cookie_params();
+		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
+		return false;
+	}
+	
+	return true;
+}
+
+/*
+    Generate database table for session data
+    @see http://phplens.com/lens/lensforum/msgs.php?id=12280
+    @return 0 if failure, 1 if errors, 2 if successful.
+	@author Markus Staab http://www.public-4u.de
+*/
+function adodb_session_create_table($schemaFile=null,$conn = null)
+{
+    // set default values
+    if ($schemaFile===null) $schemaFile = ADODB_SESSION . '/session_schema2.xml';
+    if ($conn===null) $conn =& ADODB_Session::_conn();
+
+	if (!$conn) return 0;
+
+    $schema = new adoSchema($conn);
+    $schema->ParseSchema($schemaFile);
+    return $schema->ExecuteSchema();
+}
+
+/*!
+	\static
+*/
+class ADODB_Session {
+	/////////////////////
+	// getter/setter methods
+	/////////////////////
+	
+	/*
+	
+	function Lock($lock=null)
+	{
+	static $_lock = false;
+	
+		if (!is_null($lock)) $_lock = $lock;
+		return $lock;
+	}
+	*/
+	/*!
+	*/
+	function driver($driver = null) 
+	{
+		static $_driver = 'mysql';
+		static $set = false;
+
+		if (!is_null($driver)) {
+			$_driver = trim($driver);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_DRIVER'])) {
+				return $GLOBALS['ADODB_SESSION_DRIVER'];
+			}
+		}
+
+		return $_driver;
+	}
+
+	/*!
+	*/
+	function host($host = null) {
+		static $_host = 'localhost';
+		static $set = false;
+
+		if (!is_null($host)) {
+			$_host = trim($host);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_CONNECT'])) {
+				return $GLOBALS['ADODB_SESSION_CONNECT'];
+			}
+		}
+
+		return $_host;
+	}
+
+	/*!
+	*/
+	function user($user = null) 
+	{
+		static $_user = 'root';
+		static $set = false;
+
+		if (!is_null($user)) {
+			$_user = trim($user);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_USER'])) {
+				return $GLOBALS['ADODB_SESSION_USER'];
+			}
+		}
+
+		return $_user;
+	}
+
+	/*!
+	*/
+	function password($password = null) 
+	{
+		static $_password = '';
+		static $set = false;
+
+		if (!is_null($password)) {
+			$_password = $password;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_PWD'])) {
+				return $GLOBALS['ADODB_SESSION_PWD'];
+			}
+		}
+
+		return $_password;
+	}
+
+	/*!
+	*/
+	function database($database = null) 
+	{
+		static $_database = '';
+		static $set = false;
+		
+		if (!is_null($database)) {
+			$_database = trim($database);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_DB'])) {
+				return $GLOBALS['ADODB_SESSION_DB'];
+			}
+		}
+		return $_database;
+	}
+
+	/*!
+	*/
+	function persist($persist = null) 
+	{
+		static $_persist = true;
+
+		if (!is_null($persist)) {
+			$_persist = trim($persist);
+		}
+
+		return $_persist;
+	}
+
+	/*!
+	*/
+	function lifetime($lifetime = null) 
+	{
+		static $_lifetime;
+		static $set = false;
+
+		if (!is_null($lifetime)) {
+			$_lifetime = (int) $lifetime;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESS_LIFE'])) {
+				return $GLOBALS['ADODB_SESS_LIFE'];
+			}
+		}
+		if (!$_lifetime) {
+			$_lifetime = ini_get('session.gc_maxlifetime');
+			if ($_lifetime <= 1) {
+				// bug in PHP 4.0.3 pl 1  -- how about other versions?
+				//print "<h3>Session Error: PHP.INI setting <i>session.gc_maxlifetime</i>not set: $lifetime</h3>";
+				$_lifetime = 1440;
+			}
+		}
+
+		return $_lifetime;
+	}
+
+	/*!
+	*/
+	function debug($debug = null) 
+	{
+		static $_debug = false;
+		static $set = false;
+
+		if (!is_null($debug)) {
+			$_debug = (bool) $debug;
+
+			$conn = ADODB_Session::_conn();
+			if ($conn) {
+				$conn->debug = $_debug;
+			}
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESS_DEBUG'])) {
+				return $GLOBALS['ADODB_SESS_DEBUG'];
+			}
+		}
+
+		return $_debug;
+	}
+
+	/*!
+	*/
+	function expireNotify($expire_notify = null) 
+	{
+		static $_expire_notify;
+		static $set = false;
+
+		if (!is_null($expire_notify)) {
+			$_expire_notify = $expire_notify;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'])) {
+				return $GLOBALS['ADODB_SESSION_EXPIRE_NOTIFY'];
+			}
+		}
+
+		return $_expire_notify;
+	}
+
+	/*!
+	*/
+	function table($table = null) 
+	{
+		static $_table = 'sessions2';
+		static $set = false;
+
+		if (!is_null($table)) {
+			$_table = trim($table);
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_TBL'])) {
+				return $GLOBALS['ADODB_SESSION_TBL'];
+			}
+		}
+
+		return $_table;
+	}
+
+	/*!
+	*/
+	function optimize($optimize = null) 
+	{
+		static $_optimize = false;
+		static $set = false;
+
+		if (!is_null($optimize)) {
+			$_optimize = (bool) $optimize;
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (defined('ADODB_SESSION_OPTIMIZE')) {
+				return true;
+			}
+		}
+
+		return $_optimize;
+	}
+
+	/*!
+	*/
+	function syncSeconds($sync_seconds = null) {
+		//echo ("<p>WARNING: ADODB_SESSION::syncSeconds is longer used, please remove this function for your code</p>");
+		
+		return 0;
+	}
+
+	/*!
+	*/
+	function clob($clob = null) {
+		static $_clob = false;
+		static $set = false;
+
+		if (!is_null($clob)) {
+			$_clob = strtolower(trim($clob));
+			$set = true;
+		} elseif (!$set) {
+			// backwards compatibility
+			if (isset($GLOBALS['ADODB_SESSION_USE_LOBS'])) {
+				return $GLOBALS['ADODB_SESSION_USE_LOBS'];
+			}
+		}
+
+		return $_clob;
+	}
+
+	/*!
+	*/
+	function dataFieldName($data_field_name = null) {
+		//echo ("<p>WARNING: ADODB_SESSION::dataFieldName() is longer used, please remove this function for your code</p>");
+		return '';
+	}
+
+	/*!
+	*/
+	function filter($filter = null) {
+		static $_filter = array();
+
+		if (!is_null($filter)) {
+			if (!is_array($filter)) {
+				$filter = array($filter);
+			}
+			$_filter = $filter;
+		}
+
+		return $_filter;
+	}
+
+	/*!
+	*/
+	function encryptionKey($encryption_key = null) {
+		static $_encryption_key = 'CRYPTED ADODB SESSIONS ROCK!';
+
+		if (!is_null($encryption_key)) {
+			$_encryption_key = $encryption_key;
+		}
+
+		return $_encryption_key;
+	}
+
+	/////////////////////
+	// private methods
+	/////////////////////
+
+	/*!
+	*/
+	function &_conn($conn=null) {
+		return $GLOBALS['ADODB_SESS_CONN'];
+	}
+
+	/*!
+	*/
+	function _crc($crc = null) {
+		static $_crc = false;
+
+		if (!is_null($crc)) {
+			$_crc = $crc;
+		}
+
+		return $_crc;
+	}
+
+	/*!
+	*/
+	function _init() {
+		session_module_name('user');
+		session_set_save_handler(
+			array('ADODB_Session', 'open'),
+			array('ADODB_Session', 'close'),
+			array('ADODB_Session', 'read'),
+			array('ADODB_Session', 'write'),
+			array('ADODB_Session', 'destroy'),
+			array('ADODB_Session', 'gc')
+		);
+	}
+
+
+	/*!
+	*/
+	function _sessionKey() {
+		// use this function to create the encryption key for crypted sessions
+		// crypt the used key, ADODB_Session::encryptionKey() as key and session_id() as salt
+		return crypt(ADODB_Session::encryptionKey(), session_id());
+	}
+
+	/*!
+	*/
+	function _dumprs($rs) {
+		$conn	=& ADODB_Session::_conn();
+		$debug	= ADODB_Session::debug();
+
+		if (!$conn) {
+			return;
+		}
+
+		if (!$debug) {
+			return;
+		}
+
+		if (!$rs) {
+			echo "<br />\$rs is null or false<br />\n";
+			return;
+		}
+
+		//echo "<br />\nAffected_Rows=",$conn->Affected_Rows(),"<br />\n";
+
+		if (!is_object($rs)) {
+			return;
+		}
+
+		require_once ADODB_SESSION.'/../tohtml.inc.php';
+		rs2html($rs);
+	}
+
+	/////////////////////
+	// public methods
+	/////////////////////
+	
+	function config($driver, $host, $user, $password, $database=false,$options=false)
+	{
+		ADODB_Session::driver($driver);
+		ADODB_Session::host($host);
+		ADODB_Session::user($user);
+		ADODB_Session::password($password);
+		ADODB_Session::database($database);
+		
+		if ($driver == 'oci8' || $driver == 'oci8po') $options['lob'] = 'CLOB';
+		
+		if (isset($options['table'])) ADODB_Session::table($options['table']);
+		if (isset($options['lob'])) ADODB_Session::clob($options['lob']);
+		if (isset($options['debug'])) ADODB_Session::debug($options['debug']);
+	}
+
+	/*!
+		Create the connection to the database.
+
+		If $conn already exists, reuse that connection
+	*/
+	function open($save_path, $session_name, $persist = null) 
+	{
+		$conn =& ADODB_Session::_conn();
+
+		if ($conn) {
+			return true;
+		}
+
+		$database	= ADODB_Session::database();
+		$debug		= ADODB_Session::debug();
+		$driver		= ADODB_Session::driver();
+		$host		= ADODB_Session::host();
+		$password	= ADODB_Session::password();
+		$user		= ADODB_Session::user();
+
+		if (!is_null($persist)) {
+			ADODB_Session::persist($persist);
+		} else {
+			$persist = ADODB_Session::persist();
+		}
+
+# these can all be defaulted to in php.ini
+#		assert('$database');
+#		assert('$driver');
+#		assert('$host');
+
+		$conn =& ADONewConnection($driver);
+
+		if ($debug) {
+			$conn->debug = true;		
+			ADOConnection::outp( " driver=$driver user=$user db=$database ");
+		}
+		
+		if ($persist) {
+			switch($persist) {
+			default:
+			case 'P': $ok = $conn->PConnect($host, $user, $password, $database); break;
+			case 'C': $ok = $conn->Connect($host, $user, $password, $database); break;
+			case 'N': $ok = $conn->NConnect($host, $user, $password, $database); break;
+			}
+		} else {
+			$ok = $conn->Connect($host, $user, $password, $database);
+		}
+
+		if ($ok) $GLOBALS['ADODB_SESS_CONN'] =& $conn;
+		else
+			ADOConnection::outp('<p>Session: connection failed</p>', false);
+		
+
+		return $ok;
+	}
+
+	/*!
+		Close the connection
+	*/
+	function close() 
+	{
+/*
+		$conn =& ADODB_Session::_conn();
+		if ($conn) $conn->Close();
+*/
+		return true;
+	}
+
+	/*
+		Slurp in the session variables and return the serialized string
+	*/
+	function read($key) 
+	{
+		$conn	=& ADODB_Session::_conn();
+		$filter	= ADODB_Session::filter();
+		$table	= ADODB_Session::table();
+
+		if (!$conn) {
+			return '';
+		}
+
+		//assert('$table');
+
+		$qkey = $conn->quote($key);
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+	
+		$sql = "SELECT sessdata FROM $table WHERE sesskey = $binary $qkey AND expiry >= " . $conn->sysTimeStamp;
+		/* Lock code does not work as it needs to hold transaction within whole page, and we don't know if 
+		  developer has commited elsewhere... :(
+		 */
+		#if (ADODB_Session::Lock())
+		#	$rs =& $conn->RowLock($table, "$binary sesskey = $qkey AND expiry >= " . time(), sessdata);
+		#else
+		
+			$rs =& $conn->Execute($sql);
+		//ADODB_Session::_dumprs($rs);
+		if ($rs) {
+			if ($rs->EOF) {
+				$v = '';
+			} else {
+				$v = reset($rs->fields);
+				$filter = array_reverse($filter);
+				foreach ($filter as $f) {
+					if (is_object($f)) {
+						$v = $f->read($v, ADODB_Session::_sessionKey());
+					}
+				}
+				$v = rawurldecode($v);
+			}
+
+			$rs->Close();
+
+			ADODB_Session::_crc(strlen($v) . crc32($v));
+			return $v;
+		}
+
+		return '';
+	}
+
+	/*!
+		Write the serialized data to a database.
+
+		If the data has not been modified since the last read(), we do not write.
+	*/
+	function write($key, $val) 
+	{
+	global $ADODB_SESSION_READONLY;
+	
+		if (!empty($ADODB_SESSION_READONLY)) return;
+		
+		$clob			= ADODB_Session::clob();
+		$conn			=& ADODB_Session::_conn();
+		$crc			= ADODB_Session::_crc();
+		$debug			= ADODB_Session::debug();
+		$driver			= ADODB_Session::driver();
+		$expire_notify	= ADODB_Session::expireNotify();
+		$filter			= ADODB_Session::filter();
+		$lifetime		= ADODB_Session::lifetime();
+		$table			= ADODB_Session::table();
+	
+		if (!$conn) {
+			return false;
+		}
+	
+		$sysTimeStamp = $conn->sysTimeStamp;
+		
+		//assert('$table');
+
+		$expiry = $conn->OffsetDate($lifetime/(24*3600),$sysTimeStamp);
+
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+
+		// crc32 optimization since adodb 2.1
+		// now we only update expiry date, thx to sebastian thom in adodb 2.32
+		if ($crc !== false && $crc == (strlen($val) . crc32($val))) {
+			if ($debug) {
+				echo '<p>Session: Only updating date - crc32 not changed</p>';
+			}
+			
+			$expirevar = '';
+			if ($expire_notify) {
+				$var = reset($expire_notify);
+				global $$var;
+				if (isset($$var)) {
+					$expirevar = $$var;
+				}
+			}
+			
+			
+			$sql = "UPDATE $table SET expiry = $expiry ,expireref=".$conn->Param('0').", modified = $sysTimeStamp WHERE $binary sesskey = ".$conn->Param('1')." AND expiry >= $sysTimeStamp";
+			$rs =& $conn->Execute($sql,array($expirevar,$key));
+			return true;
+		}
+		$val = rawurlencode($val);
+		foreach ($filter as $f) {
+			if (is_object($f)) {
+				$val = $f->write($val, ADODB_Session::_sessionKey());
+			}
+		}
+
+		$expireref = '';
+		if ($expire_notify) {
+			$var = reset($expire_notify);
+			global $$var;
+			if (isset($$var)) {
+				$expireref = $$var;
+			}
+		} 
+
+		if (!$clob) {	// no lobs, simply use replace()
+			$rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = ".$conn->Param(0),array($key));
+			if ($rs) $rs->Close();
+					
+			if ($rs && reset($rs->fields) > 0) {
+				$sql = "UPDATE $table SET expiry=$expiry, sessdata=".$conn->Param(0).", expireref= ".$conn->Param(1).",modified=$sysTimeStamp WHERE sesskey = ".$conn->Param('2');
+				
+			} else {
+				$sql = "INSERT INTO $table (expiry, sessdata, expireref, sesskey, created, modified) 
+					VALUES ($expiry,".$conn->Param('0').", ". $conn->Param('1').", ".$conn->Param('2').", $sysTimeStamp, $sysTimeStamp)";
+			}
+			
+	
+			$rs =& $conn->Execute($sql,array($val,$expireref,$key));
+			
+		} else {
+			// what value shall we insert/update for lob row?
+			switch ($driver) {
+				// empty_clob or empty_lob for oracle dbs
+				case 'oracle':
+				case 'oci8':
+				case 'oci8po':
+				case 'oci805':
+					$lob_value = sprintf('empty_%s()', strtolower($clob));
+					break;
+
+				// null for all other
+				default:
+					$lob_value = 'null';
+					break;
+			}
+			
+			$conn->StartTrans();
+			
+			$rs =& $conn->Execute("SELECT COUNT(*) AS cnt FROM $table WHERE $binary sesskey = ".$conn->Param(0),array($key));
+			if ($rs) $rs->Close();
+					
+			if ($rs && reset($rs->fields) > 0) {
+				$sql = "UPDATE $table SET expiry=$expiry, sessdata=$lob_value, expireref= ".$conn->Param(0).",modified=$sysTimeStamp WHERE sesskey = ".$conn->Param('1');
+				
+			} else {
+				$sql = "INSERT INTO $table (expiry, sessdata, expireref, sesskey, created, modified) 
+					VALUES ($expiry,$lob_value, ". $conn->Param('0').", ".$conn->Param('1').", $sysTimeStamp, $sysTimeStamp)";
+			}
+			
+			$rs =& $conn->Execute($sql,array($expireref,$key));
+			
+			$qkey = $conn->qstr($key);
+			$rs2 =& $conn->UpdateBlob($table, 'sessdata', $val, " sesskey=$qkey", strtoupper($clob));
+			$rs = @$conn->CompleteTrans();
+			
+			
+		}
+
+		if (!$rs) {
+			ADOConnection::outp('<p>Session Replace: ' . $conn->ErrorMsg() . '</p>', false);
+			return false;
+		}  else {
+			// bug in access driver (could be odbc?) means that info is not committed
+			// properly unless select statement executed in Win2000
+			if ($conn->databaseType == 'access') {
+				$sql = "SELECT sesskey FROM $table WHERE $binary sesskey = $qkey";
+				$rs =& $conn->Execute($sql);
+				ADODB_Session::_dumprs($rs);
+				if ($rs) {
+					$rs->Close();
+				}
+			}
+		}/*
+		if (ADODB_Session::Lock()) {
+			$conn->CommitTrans();
+		}*/
+		return $rs ? true : false;
+	}
+
+	/*!
+	*/
+	function destroy($key) {
+		$conn			=& ADODB_Session::_conn();
+		$table			= ADODB_Session::table();
+		$expire_notify	= ADODB_Session::expireNotify();
+
+		if (!$conn) {
+			return false;
+		}
+
+		//assert('$table');
+
+		$qkey = $conn->quote($key);
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+
+		if ($expire_notify) {
+			reset($expire_notify);
+			$fn = next($expire_notify);
+			$savem = $conn->SetFetchMode(ADODB_FETCH_NUM);
+			$sql = "SELECT expireref, sesskey FROM $table WHERE $binary sesskey = $qkey";
+			$rs =& $conn->Execute($sql);
+			ADODB_Session::_dumprs($rs);
+			$conn->SetFetchMode($savem);
+			if (!$rs) {
+				return false;
+			}
+			if (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				//assert('$ref');
+				//assert('$key');
+				$fn($ref, $key);
+			}
+			$rs->Close();
+		}
+
+		$sql = "DELETE FROM $table WHERE $binary sesskey = $qkey";
+		$rs =& $conn->Execute($sql);
+		ADODB_Session::_dumprs($rs);
+		if ($rs) {
+			$rs->Close();
+		}
+
+		return $rs ? true : false;
+	}
+
+	/*!
+	*/
+	function gc($maxlifetime) 
+	{
+		$conn			=& ADODB_Session::_conn();
+		$debug			= ADODB_Session::debug();
+		$expire_notify	= ADODB_Session::expireNotify();
+		$optimize		= ADODB_Session::optimize();
+		$table			= ADODB_Session::table();
+
+		if (!$conn) {
+			return false;
+		}
+
+		//assert('$table');
+
+		$time = $conn->sysTimeStamp;
+		$binary = $conn->dataProvider === 'mysql' ? '/*! BINARY */' : '';
+
+		if ($expire_notify) {
+			reset($expire_notify);
+			$fn = next($expire_notify);
+			$savem = $conn->SetFetchMode(ADODB_FETCH_NUM);
+			$sql = "SELECT expireref, sesskey FROM $table WHERE expiry < $time";
+			$rs =& $conn->Execute($sql);
+			ADODB_Session::_dumprs($rs);
+			$conn->SetFetchMode($savem);
+			if ($rs) {
+				$conn->StartTrans();
+				$keys = array();
+				while (!$rs->EOF) {
+					$ref = $rs->fields[0];
+					$key = $rs->fields[1];
+					$fn($ref, $key);
+					$del = $conn->Execute("DELETE FROM $table WHERE sesskey=".$conn->Param('0'),array($key));
+					$rs->MoveNext();
+				}
+				$rs->Close();
+				
+				$conn->CompleteTrans();
+			}
+		} else {
+		
+			if (0) {
+				$sql = "SELECT sesskey FROM $table WHERE expiry < $time";
+				$arr =& $conn->GetAll($sql);
+				foreach ($arr as $row) {
+					$sql2 = "DELETE FROM $table WHERE sesskey=".$conn->Param('0');
+					$conn->Execute($sql2,array($row[0]));
+				}
+			} else {
+				$sql = "DELETE FROM $table WHERE expiry < $time";
+				$rs =& $conn->Execute($sql);
+				ADODB_Session::_dumprs($rs);
+				if ($rs) $rs->Close();
+			}
+			if ($debug) {
+				ADOConnection::outp("<p><b>Garbage Collection</b>: $sql</p>");
+			}
+		}
+
+		// suggested by Cameron, "GaM3R" <gamr@outworld.cx>
+		if ($optimize) {
+			$driver = ADODB_Session::driver();
+
+			if (preg_match('/mysql/i', $driver)) {
+				$sql = "OPTIMIZE TABLE $table";
+			}
+			if (preg_match('/postgres/i', $driver)) {
+				$sql = "VACUUM $table";
+			}
+			if (!empty($sql)) {
+				$conn->Execute($sql);
+			}
+		}
+
+		
+		return true;
+	}
+}
+
+ADODB_Session::_init();
+if (empty($ADODB_SESSION_READONLY))
+	register_shutdown_function('session_write_close');
+
+// for backwards compatability only
+function adodb_sess_open($save_path, $session_name, $persist = true) {
+	return ADODB_Session::open($save_path, $session_name, $persist);
+}
+
+// for backwards compatability only
+function adodb_sess_gc($t)
+{	
+	return ADODB_Session::gc($t);
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.mysql.sql
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.mysql.sql	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.mysql.sql	(revision 225)
@@ -0,0 +1,16 @@
+-- $CVSHeader$
+
+CREATE DATABASE /*! IF NOT EXISTS */ adodb_sessions;
+
+USE adodb_sessions;
+
+DROP TABLE /*! IF EXISTS */ sessions;
+
+CREATE TABLE /*! IF NOT EXISTS */ sessions (
+	sesskey		CHAR(32)	/*! BINARY */ NOT NULL DEFAULT '',
+	expiry		INT(11)		/*! UNSIGNED */ NOT NULL DEFAULT 0,
+	expireref	VARCHAR(64)	DEFAULT '',
+	data		LONGTEXT	DEFAULT '',
+	PRIMARY KEY	(sesskey),
+	INDEX expiry (expiry)
+);
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.oracle.clob.sql
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.oracle.clob.sql	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.oracle.clob.sql	(revision 225)
@@ -0,0 +1,15 @@
+-- $CVSHeader$
+
+DROP TABLE adodb_sessions;
+
+CREATE TABLE sessions (
+	sesskey		CHAR(32)	DEFAULT '' NOT NULL,
+	expiry		INT		DEFAULT 0 NOT NULL,
+	expireref	VARCHAR(64)	DEFAULT '',
+	data		CLOB		DEFAULT '',
+	PRIMARY KEY	(sesskey)
+);
+
+CREATE INDEX ix_expiry ON sessions (expiry);
+
+QUIT;
Index: Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.oracle.sql
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.oracle.sql	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/adodb-sessions.oracle.sql	(revision 225)
@@ -0,0 +1,16 @@
+-- $CVSHeader$
+
+DROP TABLE adodb_sessions;
+
+CREATE TABLE sessions (
+	sesskey		CHAR(32)	DEFAULT '' NOT NULL,
+	expiry		INT		DEFAULT 0 NOT NULL,
+	expireref	VARCHAR(64)	DEFAULT '',
+	data		VARCHAR(4000)	DEFAULT '',
+	PRIMARY KEY	(sesskey),
+	INDEX expiry (expiry)
+);
+
+CREATE INDEX ix_expiry ON sessions (expiry);
+
+QUIT;
Index: Dev/branches/Demo/rdfapi/util/adodb/session/crypt.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/crypt.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/crypt.inc.php	(revision 225)
@@ -0,0 +1,161 @@
+<?php
+//	 Session Encryption by Ari Kuorikoski <ari.kuorikoski@finebyte.com>
+class MD5Crypt{
+		function keyED($txt,$encrypt_key)
+		{
+				$encrypt_key = md5($encrypt_key);
+				$ctr=0;
+				$tmp = "";
+				for ($i=0;$i<strlen($txt);$i++){
+						if ($ctr==strlen($encrypt_key)) $ctr=0;
+						$tmp.= substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1);
+						$ctr++;
+				}
+				return $tmp;
+		}
+
+		function Encrypt($txt,$key)
+		{
+				srand((double)microtime()*1000000);
+				$encrypt_key = md5(rand(0,32000));
+				$ctr=0;
+				$tmp = "";
+				for ($i=0;$i<strlen($txt);$i++)
+				{
+				if ($ctr==strlen($encrypt_key)) $ctr=0;
+				$tmp.= substr($encrypt_key,$ctr,1) .
+				(substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1));
+				$ctr++;
+				}
+				return base64_encode($this->keyED($tmp,$key));
+		}
+
+		function Decrypt($txt,$key)
+		{
+				$txt = $this->keyED(base64_decode($txt),$key);
+				$tmp = "";
+				for ($i=0;$i<strlen($txt);$i++){
+						$md5 = substr($txt,$i,1);
+						$i++;
+						$tmp.= (substr($txt,$i,1) ^ $md5);
+				}
+				return $tmp;
+		}
+
+		function RandPass()
+		{
+				$randomPassword = "";
+				srand((double)microtime()*1000000);
+				for($i=0;$i<8;$i++)
+				{
+						$randnumber = rand(48,120);
+
+						while (($randnumber >= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96))
+						{
+								$randnumber = rand(48,120);
+						}
+
+						$randomPassword .= chr($randnumber);
+				}
+				return $randomPassword;
+		}
+
+}
+
+
+class SHA1Crypt{
+
+		function keyED($txt,$encrypt_key)
+		{
+
+				$encrypt_key = sha1($encrypt_key);
+				$ctr=0;
+				$tmp = "";
+
+				for ($i=0;$i<strlen($txt);$i++){
+						if ($ctr==strlen($encrypt_key)) $ctr=0;
+						$tmp.= substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1);
+						$ctr++;
+				}
+				return $tmp;
+
+		}
+
+
+
+		function Encrypt($txt,$key)
+		{
+
+				srand((double)microtime()*1000000);
+				$encrypt_key = sha1(rand(0,32000));
+				$ctr=0;
+				$tmp = "";
+
+				for ($i=0;$i<strlen($txt);$i++)
+
+				{
+
+				if ($ctr==strlen($encrypt_key)) $ctr=0;
+
+				$tmp.= substr($encrypt_key,$ctr,1) .
+
+				(substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1));
+
+				$ctr++;
+
+				}
+
+				return base64_encode($this->keyED($tmp,$key));
+
+		}
+
+
+
+		function Decrypt($txt,$key)
+		{
+
+				$txt = $this->keyED(base64_decode($txt),$key);
+
+				$tmp = "";
+
+				for ($i=0;$i<strlen($txt);$i++){
+
+						$sha1 = substr($txt,$i,1);
+
+						$i++;
+
+						$tmp.= (substr($txt,$i,1) ^ $sha1);
+
+				}
+
+				return $tmp;
+		}
+
+
+
+		function RandPass()
+		{
+				$randomPassword = "";
+				srand((double)microtime()*1000000);
+
+				for($i=0;$i<8;$i++)
+				{
+
+						$randnumber = rand(48,120);
+
+						while (($randnumber >= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96))
+						{
+								$randnumber = rand(48,120);
+						}
+
+						$randomPassword .= chr($randnumber);
+				}
+
+				return $randomPassword;
+
+		}
+
+
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-cryptsession.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-cryptsession.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-cryptsession.php	(revision 225)
@@ -0,0 +1,324 @@
+<?php
+/*
+V4.94 23 Jan 2007  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	Made table name configurable - by David Johnson djohnson@inpro.net
+	Encryption by Ari Kuorikoski <ari.kuorikoski@finebyte.com>
+	
+  Set tabs to 4 for best viewing.
+  
+  Latest version of ADODB is available at http://php.weblogs.com/adodb
+  ======================================================================
+  
+ This file provides PHP4 session management using the ADODB database
+wrapper library.
+ 
+ Example
+ =======
+ 
+	include('adodb.inc.php');
+	#---------------------------------#
+	include('adodb-cryptsession.php'); 
+	#---------------------------------#
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	print "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
+
+ 
+ Installation
+ ============
+ 1. Create a new database in MySQL or Access "sessions" like
+so:
+ 
+  create table sessions (
+	   SESSKEY char(32) not null,
+	   EXPIRY int(11) unsigned not null,
+	   EXPIREREF varchar(64),
+	   DATA CLOB,
+	  primary key (sesskey)
+  );
+  
+  2. Then define the following parameters. You can either modify
+     this file, or define them before this file is included:
+	 
+  	$ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase';
+	$ADODB_SESSION_CONNECT='server to connect to';
+	$ADODB_SESSION_USER ='user';
+	$ADODB_SESSION_PWD ='password';
+	$ADODB_SESSION_DB ='database';
+	$ADODB_SESSION_TBL = 'sessions'
+	
+  3. Recommended is PHP 4.0.2 or later. There are documented
+session bugs in earlier versions of PHP.
+
+*/
+
+
+include_once('crypt.inc.php');
+
+if (!defined('_ADODB_LAYER')) {
+	include (dirname(__FILE__).'/adodb.inc.php');
+}
+
+ /* if database time and system time is difference is greater than this, then give warning */
+ define('ADODB_SESSION_SYNCH_SECS',60); 
+
+if (!defined('ADODB_SESSION')) {
+
+ define('ADODB_SESSION',1);
+ 
+GLOBAL 	$ADODB_SESSION_CONNECT, 
+	$ADODB_SESSION_DRIVER,
+	$ADODB_SESSION_USER,
+	$ADODB_SESSION_PWD,
+	$ADODB_SESSION_DB,
+	$ADODB_SESS_CONN,
+	$ADODB_SESS_LIFE,
+	$ADODB_SESS_DEBUG,
+	$ADODB_SESS_INSERT,
+	$ADODB_SESSION_EXPIRE_NOTIFY,
+	$ADODB_SESSION_TBL; 
+
+	//$ADODB_SESS_DEBUG = true;
+	
+	/* SET THE FOLLOWING PARAMETERS */
+if (empty($ADODB_SESSION_DRIVER)) {
+	$ADODB_SESSION_DRIVER='mysql';
+	$ADODB_SESSION_CONNECT='localhost';
+	$ADODB_SESSION_USER ='root';
+	$ADODB_SESSION_PWD ='';
+	$ADODB_SESSION_DB ='xphplens_2';
+}
+
+if (empty($ADODB_SESSION_TBL)){
+	$ADODB_SESSION_TBL = 'sessions';
+}
+
+if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) {
+	$ADODB_SESSION_EXPIRE_NOTIFY = false;
+}
+
+function ADODB_Session_Key() 
+{
+$ADODB_CRYPT_KEY = 'CRYPTED ADODB SESSIONS ROCK!';
+
+	/* USE THIS FUNCTION TO CREATE THE ENCRYPTION KEY FOR CRYPTED SESSIONS	*/
+	/* Crypt the used key, $ADODB_CRYPT_KEY as key and session_ID as SALT	*/
+	return crypt($ADODB_CRYPT_KEY, session_ID());
+}
+
+$ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime');
+if ($ADODB_SESS_LIFE <= 1) {
+	// bug in PHP 4.0.3 pl 1  -- how about other versions?
+	//print "<h3>Session Error: PHP.INI setting <i>session.gc_maxlifetime</i>not set: $ADODB_SESS_LIFE</h3>";
+	$ADODB_SESS_LIFE=1440;
+}
+
+function adodb_sess_open($save_path, $session_name) 
+{
+GLOBAL 	$ADODB_SESSION_CONNECT, 
+	$ADODB_SESSION_DRIVER,
+	$ADODB_SESSION_USER,
+	$ADODB_SESSION_PWD,
+	$ADODB_SESSION_DB,
+	$ADODB_SESS_CONN,
+	$ADODB_SESS_DEBUG;
+	
+	$ADODB_SESS_INSERT = false;
+	
+	if (isset($ADODB_SESS_CONN)) return true;
+	
+	$ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER);
+	if (!empty($ADODB_SESS_DEBUG)) {
+		$ADODB_SESS_CONN->debug = true;
+		print" conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB ";
+	}
+	return $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT,
+			$ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB);
+	
+}
+
+function adodb_sess_close() 
+{
+global $ADODB_SESS_CONN;
+
+	if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close();
+	return true;
+}
+
+function adodb_sess_read($key) 
+{
+$Crypt = new MD5Crypt;
+global $ADODB_SESS_CONN,$ADODB_SESS_INSERT,$ADODB_SESSION_TBL;
+	$rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time());
+	if ($rs) {
+		if ($rs->EOF) {
+			$ADODB_SESS_INSERT = true;
+			$v = '';
+		} else {
+			// Decrypt session data
+			$v = rawurldecode($Crypt->Decrypt(reset($rs->fields), ADODB_Session_Key()));
+		}
+		$rs->Close();
+		return $v;
+	}
+	else $ADODB_SESS_INSERT = true;
+	
+	return '';
+}
+
+function adodb_sess_write($key, $val) 
+{
+$Crypt = new MD5Crypt;
+	global $ADODB_SESS_INSERT,$ADODB_SESS_CONN, $ADODB_SESS_LIFE, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY;
+
+	$expiry = time() + $ADODB_SESS_LIFE;
+
+	// encrypt session data..	
+	$val = $Crypt->Encrypt(rawurlencode($val), ADODB_Session_Key());
+	
+	$arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val);
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		$var = reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		global $$var;
+		$arr['expireref'] = $$var;
+	}
+	$rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,
+	    $arr,
+    	'sesskey',$autoQuote = true);
+
+	if (!$rs) {
+		ADOConnection::outp( '
+-- Session Replace: '.$ADODB_SESS_CONN->ErrorMsg().'</p>',false);
+	} else {
+		// bug in access driver (could be odbc?) means that info is not commited
+		// properly unless select statement executed in Win2000
+	
+	if ($ADODB_SESS_CONN->databaseType == 'access') $rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'");
+	}
+	return isset($rs);
+}
+
+function adodb_sess_destroy($key) 
+{
+	global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY;
+	
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		$fn = next($ADODB_SESSION_EXPIRE_NOTIFY);
+		$savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM);
+		$rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+		$ADODB_SESS_CONN->SetFetchMode($savem);
+		if ($rs) {
+			$ADODB_SESS_CONN->BeginTrans();
+			while (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				$fn($ref,$key);
+				$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+				$rs->MoveNext();
+			}
+			$ADODB_SESS_CONN->CommitTrans();
+		}
+	} else {
+		$qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'";
+		$rs = $ADODB_SESS_CONN->Execute($qry);
+	}
+	return $rs ? true : false;
+}
+
+
+function adodb_sess_gc($maxlifetime) {
+	global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY,$ADODB_SESS_DEBUG;
+
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		$fn = next($ADODB_SESSION_EXPIRE_NOTIFY);
+		$savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM);
+		$t = time();
+		$rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t");
+		$ADODB_SESS_CONN->SetFetchMode($savem);
+		if ($rs) {
+			$ADODB_SESS_CONN->BeginTrans();
+			while (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				$fn($ref,$key);
+				//$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			
+			$ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < $t");
+			$ADODB_SESS_CONN->CommitTrans();
+		}
+	} else {
+		$qry = "DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time();
+		$ADODB_SESS_CONN->Execute($qry);
+	}
+	
+	// suggested by Cameron, "GaM3R" <gamr@outworld.cx>
+	if (defined('ADODB_SESSION_OPTIMIZE'))
+	{
+	global $ADODB_SESSION_DRIVER;
+	
+		switch( $ADODB_SESSION_DRIVER ) {
+			case 'mysql':
+			case 'mysqlt':
+				$opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL;
+				break;
+			case 'postgresql':
+			case 'postgresql7':
+				$opt_qry = 'VACUUM '.$ADODB_SESSION_TBL;	
+				break;
+		}
+	}
+	
+	if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select  TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL;
+	else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL;
+	
+	$rs =& $ADODB_SESS_CONN->SelectLimit($sql,1);
+	if ($rs && !$rs->EOF) {
+	
+		$dbts = reset($rs->fields);
+		$rs->Close();
+		$dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts);
+		$t = time();
+		if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) {
+			$msg = 
+			__FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)";
+			error_log($msg);
+			if ($ADODB_SESS_DEBUG) ADOConnection::outp("
+-- $msg</p>");
+		}
+	}
+	
+	return true;
+}
+
+session_module_name('user'); 
+session_set_save_handler(
+	"adodb_sess_open",
+	"adodb_sess_close",
+	"adodb_sess_read",
+	"adodb_sess_write",
+	"adodb_sess_destroy",
+	"adodb_sess_gc");
+}
+
+/*  TEST SCRIPT -- UNCOMMENT */
+/*
+if (0) {
+
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	print "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
+}
+*/
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-session-clob.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-session-clob.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-session-clob.php	(revision 225)
@@ -0,0 +1,448 @@
+<?php
+/*
+  V4.93 10 Oct 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+  
+  Latest version of ADODB is available at http://php.weblogs.com/adodb
+  ======================================================================
+  
+ This file provides PHP4 session management using the ADODB database
+ wrapper library, using Oracle CLOB's to store data. Contributed by achim.gosse@ddd.de.
+
+ Example
+ =======
+ 
+	include('adodb.inc.php');
+	include('adodb-session.php');
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	print "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
+	
+To force non-persistent connections, call adodb_session_open first before session_start():
+
+	include('adodb.inc.php');
+	include('adodb-session.php');
+	adodb_session_open(false,false,false);
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	print "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
+
+ 
+ Installation
+ ============
+ 1. Create this table in your database (syntax might vary depending on your db):
+ 
+  create table sessions (
+	   SESSKEY char(32) not null,
+	   EXPIRY int(11) unsigned not null,
+	   EXPIREREF varchar(64),
+	   DATA CLOB,
+	  primary key (sesskey)
+  );
+
+
+  2. Then define the following parameters in this file:
+  	$ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase';
+	$ADODB_SESSION_CONNECT='server to connect to';
+	$ADODB_SESSION_USER ='user';
+	$ADODB_SESSION_PWD ='password';
+	$ADODB_SESSION_DB ='database';
+	$ADODB_SESSION_TBL = 'sessions'
+	$ADODB_SESSION_USE_LOBS = false; (or, if you wanna use CLOBS (= 'CLOB') or ( = 'BLOB')
+	
+  3. Recommended is PHP 4.1.0 or later. There are documented
+	 session bugs in earlier versions of PHP.
+
+  4. If you want to receive notifications when a session expires, then
+  	 you can tag a session with an EXPIREREF, and before the session
+	 record is deleted, we can call a function that will pass the EXPIREREF
+	 as the first parameter, and the session key as the second parameter.
+	 
+	 To do this, define a notification function, say NotifyFn:
+	 
+	 	function NotifyFn($expireref, $sesskey)
+	 	{
+	 	}
+	 
+	 Then you need to define a global variable $ADODB_SESSION_EXPIRE_NOTIFY.
+	 This is an array with 2 elements, the first being the name of the variable
+	 you would like to store in the EXPIREREF field, and the 2nd is the 
+	 notification function's name.
+	 
+	 In this example, we want to be notified when a user's session 
+	 has expired, so we store the user id in the global variable $USERID, 
+	 store this value in the EXPIREREF field:
+	 
+	 	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
+		
+	Then when the NotifyFn is called, we are passed the $USERID as the first
+	parameter, eg. NotifyFn($userid, $sesskey).
+*/
+
+if (!defined('_ADODB_LAYER')) {
+	include (dirname(__FILE__).'/adodb.inc.php');
+}
+
+if (!defined('ADODB_SESSION')) {
+
+ define('ADODB_SESSION',1);
+ 
+ /* if database time and system time is difference is greater than this, then give warning */
+ define('ADODB_SESSION_SYNCH_SECS',60); 
+
+/****************************************************************************************\
+	Global definitions
+\****************************************************************************************/
+GLOBAL 	$ADODB_SESSION_CONNECT, 
+	$ADODB_SESSION_DRIVER,
+	$ADODB_SESSION_USER,
+	$ADODB_SESSION_PWD,
+	$ADODB_SESSION_DB,
+	$ADODB_SESS_CONN,
+	$ADODB_SESS_LIFE,
+	$ADODB_SESS_DEBUG,
+	$ADODB_SESSION_EXPIRE_NOTIFY,
+	$ADODB_SESSION_CRC,
+	$ADODB_SESSION_USE_LOBS,
+	$ADODB_SESSION_TBL;
+	
+	if (!isset($ADODB_SESSION_USE_LOBS)) $ADODB_SESSION_USE_LOBS = 'CLOB';
+	
+	$ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime');
+	if ($ADODB_SESS_LIFE <= 1) {
+	 // bug in PHP 4.0.3 pl 1  -- how about other versions?
+	 //print "<h3>Session Error: PHP.INI setting <i>session.gc_maxlifetime</i>not set: $ADODB_SESS_LIFE</h3>";
+	 	$ADODB_SESS_LIFE=1440;
+	}
+	$ADODB_SESSION_CRC = false;
+	//$ADODB_SESS_DEBUG = true;
+	
+	//////////////////////////////////
+	/* SET THE FOLLOWING PARAMETERS */
+	//////////////////////////////////
+	
+	if (empty($ADODB_SESSION_DRIVER)) {
+		$ADODB_SESSION_DRIVER='mysql';
+		$ADODB_SESSION_CONNECT='localhost';
+		$ADODB_SESSION_USER ='root';
+		$ADODB_SESSION_PWD ='';
+		$ADODB_SESSION_DB ='xphplens_2';
+	}
+	
+	if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) {
+		$ADODB_SESSION_EXPIRE_NOTIFY = false;
+	}
+	//  Made table name configurable - by David Johnson djohnson@inpro.net
+	if (empty($ADODB_SESSION_TBL)){
+		$ADODB_SESSION_TBL = 'sessions';
+	}
+	
+
+	// defaulting $ADODB_SESSION_USE_LOBS
+	if (!isset($ADODB_SESSION_USE_LOBS) || empty($ADODB_SESSION_USE_LOBS)) {
+		$ADODB_SESSION_USE_LOBS = false;
+	}
+
+	/*
+	$ADODB_SESS['driver'] = $ADODB_SESSION_DRIVER;
+	$ADODB_SESS['connect'] = $ADODB_SESSION_CONNECT;
+	$ADODB_SESS['user'] = $ADODB_SESSION_USER;
+	$ADODB_SESS['pwd'] = $ADODB_SESSION_PWD;
+	$ADODB_SESS['db'] = $ADODB_SESSION_DB;
+	$ADODB_SESS['life'] = $ADODB_SESS_LIFE;
+	$ADODB_SESS['debug'] = $ADODB_SESS_DEBUG;
+	
+	$ADODB_SESS['debug'] = $ADODB_SESS_DEBUG;
+	$ADODB_SESS['table'] = $ADODB_SESS_TBL;
+	*/
+	
+/****************************************************************************************\
+	Create the connection to the database. 
+	
+	If $ADODB_SESS_CONN already exists, reuse that connection
+\****************************************************************************************/
+function adodb_sess_open($save_path, $session_name,$persist=true) 
+{
+GLOBAL $ADODB_SESS_CONN;
+	if (isset($ADODB_SESS_CONN)) return true;
+	
+GLOBAL 	$ADODB_SESSION_CONNECT, 
+	$ADODB_SESSION_DRIVER,
+	$ADODB_SESSION_USER,
+	$ADODB_SESSION_PWD,
+	$ADODB_SESSION_DB,
+	$ADODB_SESS_DEBUG;
+	
+	// cannot use & below - do not know why...
+	$ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER);
+	if (!empty($ADODB_SESS_DEBUG)) {
+		$ADODB_SESS_CONN->debug = true;
+		ADOConnection::outp( " conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB ");
+	}
+	if ($persist) $ok = $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT,
+			$ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB);
+	else $ok = $ADODB_SESS_CONN->Connect($ADODB_SESSION_CONNECT,
+			$ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB);
+	
+	if (!$ok) ADOConnection::outp( "
+-- Session: connection failed</p>",false);
+}
+
+/****************************************************************************************\
+	Close the connection
+\****************************************************************************************/
+function adodb_sess_close() 
+{
+global $ADODB_SESS_CONN;
+
+	if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close();
+	return true;
+}
+
+/****************************************************************************************\
+	Slurp in the session variables and return the serialized string
+\****************************************************************************************/
+function adodb_sess_read($key) 
+{
+global $ADODB_SESS_CONN,$ADODB_SESSION_TBL,$ADODB_SESSION_CRC;
+
+	$rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time());
+	if ($rs) {
+		if ($rs->EOF) {
+			$v = '';
+		} else 
+			$v = rawurldecode(reset($rs->fields));
+			
+		$rs->Close();
+		
+		// new optimization adodb 2.1
+		$ADODB_SESSION_CRC = strlen($v).crc32($v);
+		
+		return $v;
+	}
+	
+	return ''; // thx to Jorma Tuomainen, webmaster#wizactive.com
+}
+
+/****************************************************************************************\
+	Write the serialized data to a database.
+	
+	If the data has not been modified since adodb_sess_read(), we do not write.
+\****************************************************************************************/
+function adodb_sess_write($key, $val) 
+{
+	global
+		$ADODB_SESS_CONN, 
+		$ADODB_SESS_LIFE, 
+		$ADODB_SESSION_TBL,
+		$ADODB_SESS_DEBUG, 
+		$ADODB_SESSION_CRC,
+		$ADODB_SESSION_EXPIRE_NOTIFY,
+		$ADODB_SESSION_DRIVER,			// added
+		$ADODB_SESSION_USE_LOBS;		// added
+
+	$expiry = time() + $ADODB_SESS_LIFE;
+	
+	// crc32 optimization since adodb 2.1
+	// now we only update expiry date, thx to sebastian thom in adodb 2.32
+	if ($ADODB_SESSION_CRC !== false && $ADODB_SESSION_CRC == strlen($val).crc32($val)) {
+		if ($ADODB_SESS_DEBUG) echo "
+-- Session: Only updating date - crc32 not changed</p>";
+		$qry = "UPDATE $ADODB_SESSION_TBL SET expiry=$expiry WHERE sesskey='$key' AND expiry >= " . time();
+		$rs = $ADODB_SESS_CONN->Execute($qry);	
+		return true;
+	}
+	$val = rawurlencode($val);
+	
+	$arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val);
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		$var = reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		global $$var;
+		$arr['expireref'] = $$var;
+	}
+
+	
+	if ($ADODB_SESSION_USE_LOBS === false) {	// no lobs, simply use replace()
+		$rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,$arr, 'sesskey',$autoQuote = true);
+		if (!$rs) {
+			$err = $ADODB_SESS_CONN->ErrorMsg();
+		}
+	} else {
+		// what value shall we insert/update for lob row?
+		switch ($ADODB_SESSION_DRIVER) {
+			// empty_clob or empty_lob for oracle dbs
+			case "oracle":
+			case "oci8":
+			case "oci8po":
+			case "oci805":
+				$lob_value = sprintf("empty_%s()", strtolower($ADODB_SESSION_USE_LOBS));
+				break;
+
+			// null for all other
+			default:
+				$lob_value = "null";
+				break;
+		}
+
+		// do we insert or update? => as for sesskey
+		$res = $ADODB_SESS_CONN->Execute("select count(*) as cnt from $ADODB_SESSION_TBL where sesskey = '$key'");
+		if ($res && reset($res->fields) > 0) {
+			$qry = sprintf("update %s set expiry = %d, data = %s where sesskey = '%s'", $ADODB_SESSION_TBL, $expiry, $lob_value, $key);
+		} else {
+			// insert
+			$qry = sprintf("insert into %s (sesskey, expiry, data) values ('%s', %d, %s)", $ADODB_SESSION_TBL, $key, $expiry, $lob_value);
+		}
+
+		$err = "";
+		$rs1 = $ADODB_SESS_CONN->Execute($qry);
+		if (!$rs1) {
+			$err .= $ADODB_SESS_CONN->ErrorMsg()."\n";
+		}
+		$rs2 = $ADODB_SESS_CONN->UpdateBlob($ADODB_SESSION_TBL, 'data', $val, "sesskey='$key'", strtoupper($ADODB_SESSION_USE_LOBS));
+		if (!$rs2) {
+			$err .= $ADODB_SESS_CONN->ErrorMsg()."\n";
+		}
+		$rs = ($rs1 && $rs2) ? true : false;
+	}
+
+	if (!$rs) {
+		ADOConnection::outp( '
+-- Session Replace: '.nl2br($err).'</p>',false);
+	}  else {
+		// bug in access driver (could be odbc?) means that info is not commited
+		// properly unless select statement executed in Win2000
+		if ($ADODB_SESS_CONN->databaseType == 'access') 
+			$rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'");
+	}
+	return !empty($rs);
+}
+
+function adodb_sess_destroy($key) 
+{
+	global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY;
+	
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		$fn = next($ADODB_SESSION_EXPIRE_NOTIFY);
+		$savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM);
+		$rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+		$ADODB_SESS_CONN->SetFetchMode($savem);
+		if ($rs) {
+			$ADODB_SESS_CONN->BeginTrans();
+			while (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				$fn($ref,$key);
+				$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+				$rs->MoveNext();
+			}
+			$ADODB_SESS_CONN->CommitTrans();
+		}
+	} else {
+		$qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'";
+		$rs = $ADODB_SESS_CONN->Execute($qry);
+	}
+	return $rs ? true : false;
+}
+
+function adodb_sess_gc($maxlifetime) 
+{
+	global $ADODB_SESS_DEBUG, $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY;
+	
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		$fn = next($ADODB_SESSION_EXPIRE_NOTIFY);
+		$savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM);
+		$t = time();
+		$rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t");
+		$ADODB_SESS_CONN->SetFetchMode($savem);
+		if ($rs) {
+			$ADODB_SESS_CONN->BeginTrans();
+			while (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				$fn($ref,$key);
+				$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			
+			//$ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < $t");
+			$ADODB_SESS_CONN->CommitTrans();
+			
+		}
+	} else {
+		$ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time());
+	
+		if ($ADODB_SESS_DEBUG) ADOConnection::outp("
+-- <b>Garbage Collection</b>: $qry</p>");
+	}
+	// suggested by Cameron, "GaM3R" <gamr@outworld.cx>
+	if (defined('ADODB_SESSION_OPTIMIZE')) {
+	global $ADODB_SESSION_DRIVER;
+	
+		switch( $ADODB_SESSION_DRIVER ) {
+			case 'mysql':
+			case 'mysqlt':
+				$opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL;
+				break;
+			case 'postgresql':
+			case 'postgresql7':
+				$opt_qry = 'VACUUM '.$ADODB_SESSION_TBL;	
+				break;
+		}
+		if (!empty($opt_qry)) {
+			$ADODB_SESS_CONN->Execute($opt_qry);
+		}
+	}
+	if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select  TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL;
+	else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL;
+	
+	$rs =& $ADODB_SESS_CONN->SelectLimit($sql,1);
+	if ($rs && !$rs->EOF) {
+	
+		$dbts = reset($rs->fields);
+		$rs->Close();
+		$dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts);
+		$t = time();
+		if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) {
+			$msg = 
+			__FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)";
+			error_log($msg);
+			if ($ADODB_SESS_DEBUG) ADOConnection::outp("
+-- $msg</p>");
+		}
+	}
+	
+	return true;
+}
+
+session_module_name('user'); 
+session_set_save_handler(
+	"adodb_sess_open",
+	"adodb_sess_close",
+	"adodb_sess_read",
+	"adodb_sess_write",
+	"adodb_sess_destroy",
+	"adodb_sess_gc");
+}
+
+/*  TEST SCRIPT -- UNCOMMENT */
+
+if (0) {
+
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	ADOConnection::outp( "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>",false);
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-session.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-session.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/old/adodb-session.php	(revision 225)
@@ -0,0 +1,439 @@
+<?php
+/*
+V4.93 10 Oct 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	  Set tabs to 4 for best viewing.
+  
+  Latest version of ADODB is available at http://php.weblogs.com/adodb
+  ======================================================================
+  
+ This file provides PHP4 session management using the ADODB database
+wrapper library.
+ 
+ Example
+ =======
+ 
+	include('adodb.inc.php');
+	include('adodb-session.php');
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	print "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
+	
+To force non-persistent connections, call adodb_session_open first before session_start():
+
+	include('adodb.inc.php');
+	include('adodb-session.php');
+	adodb_sess_open(false,false,false);
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	print "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>";
+
+ 
+ Installation
+ ============
+ 1. Create this table in your database (syntax might vary depending on your db):
+ 
+  create table sessions (
+	   SESSKEY char(32) not null,
+	   EXPIRY int(11) unsigned not null,
+	   EXPIREREF varchar(64),
+	   DATA text not null,
+	  primary key (sesskey)
+  );
+  
+  For oracle:
+    create table sessions (
+	   SESSKEY char(32) not null,
+	   EXPIRY DECIMAL(16)  not null,
+	   EXPIREREF varchar(64),
+	   DATA varchar(4000) not null,
+	  primary key (sesskey)
+  );
+
+
+  2. Then define the following parameters. You can either modify
+     this file, or define them before this file is included:
+	 
+  	$ADODB_SESSION_DRIVER='database driver, eg. mysql or ibase';
+	$ADODB_SESSION_CONNECT='server to connect to';
+	$ADODB_SESSION_USER ='user';
+	$ADODB_SESSION_PWD ='password';
+	$ADODB_SESSION_DB ='database';
+	$ADODB_SESSION_TBL = 'sessions'
+	
+  3. Recommended is PHP 4.1.0 or later. There are documented
+	 session bugs in earlier versions of PHP.
+
+  4. If you want to receive notifications when a session expires, then
+  	 you can tag a session with an EXPIREREF, and before the session
+	 record is deleted, we can call a function that will pass the EXPIREREF
+	 as the first parameter, and the session key as the second parameter.
+	 
+	 To do this, define a notification function, say NotifyFn:
+	 
+	 	function NotifyFn($expireref, $sesskey)
+	 	{
+	 	}
+	 
+	 Then you need to define a global variable $ADODB_SESSION_EXPIRE_NOTIFY.
+	 This is an array with 2 elements, the first being the name of the variable
+	 you would like to store in the EXPIREREF field, and the 2nd is the 
+	 notification function's name.
+	 
+	 In this example, we want to be notified when a user's session 
+	 has expired, so we store the user id in the global variable $USERID, 
+	 store this value in the EXPIREREF field:
+	 
+	 	$ADODB_SESSION_EXPIRE_NOTIFY = array('USERID','NotifyFn');
+		
+	Then when the NotifyFn is called, we are passed the $USERID as the first
+	parameter, eg. NotifyFn($userid, $sesskey).
+*/
+
+if (!defined('_ADODB_LAYER')) {
+	include (dirname(__FILE__).'/adodb.inc.php');
+}
+
+if (!defined('ADODB_SESSION')) {
+
+ define('ADODB_SESSION',1);
+ 
+ /* if database time and system time is difference is greater than this, then give warning */
+ define('ADODB_SESSION_SYNCH_SECS',60); 
+
+ /*
+	Thanks Joe Li. See http://phplens.com/lens/lensforum/msgs.php?id=11487&x=1
+*/
+function adodb_session_regenerate_id() 
+{
+	$conn =& ADODB_Session::_conn();
+	if (!$conn) return false;
+
+	$old_id = session_id();
+	if (function_exists('session_regenerate_id')) {
+		session_regenerate_id();
+	} else {
+		session_id(md5(uniqid(rand(), true)));
+		$ck = session_get_cookie_params();
+		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
+		//@session_start();
+	}
+	$new_id = session_id();
+	$ok =& $conn->Execute('UPDATE '. ADODB_Session::table(). ' SET sesskey='. $conn->qstr($new_id). ' WHERE sesskey='.$conn->qstr($old_id));
+	
+	/* it is possible that the update statement fails due to a collision */
+	if (!$ok) {
+		session_id($old_id);
+		if (empty($ck)) $ck = session_get_cookie_params();
+		setcookie(session_name(), session_id(), false, $ck['path'], $ck['domain'], $ck['secure']);
+		return false;
+	}
+	
+	return true;
+}
+
+/****************************************************************************************\
+	Global definitions
+\****************************************************************************************/
+GLOBAL 	$ADODB_SESSION_CONNECT, 
+	$ADODB_SESSION_DRIVER,
+	$ADODB_SESSION_USER,
+	$ADODB_SESSION_PWD,
+	$ADODB_SESSION_DB,
+	$ADODB_SESS_CONN,
+	$ADODB_SESS_LIFE,
+	$ADODB_SESS_DEBUG,
+	$ADODB_SESSION_EXPIRE_NOTIFY,
+	$ADODB_SESSION_CRC,
+	$ADODB_SESSION_TBL;
+	
+	
+	$ADODB_SESS_LIFE = ini_get('session.gc_maxlifetime');
+	if ($ADODB_SESS_LIFE <= 1) {
+	 // bug in PHP 4.0.3 pl 1  -- how about other versions?
+	 //print "<h3>Session Error: PHP.INI setting <i>session.gc_maxlifetime</i>not set: $ADODB_SESS_LIFE</h3>";
+	 	$ADODB_SESS_LIFE=1440;
+	}
+	$ADODB_SESSION_CRC = false;
+	//$ADODB_SESS_DEBUG = true;
+	
+	//////////////////////////////////
+	/* SET THE FOLLOWING PARAMETERS */
+	//////////////////////////////////
+	
+	if (empty($ADODB_SESSION_DRIVER)) {
+		$ADODB_SESSION_DRIVER='mysql';
+		$ADODB_SESSION_CONNECT='localhost';
+		$ADODB_SESSION_USER ='root';
+		$ADODB_SESSION_PWD ='';
+		$ADODB_SESSION_DB ='xphplens_2';
+	}
+	
+	if (empty($ADODB_SESSION_EXPIRE_NOTIFY)) {
+		$ADODB_SESSION_EXPIRE_NOTIFY = false;
+	}
+	//  Made table name configurable - by David Johnson djohnson@inpro.net
+	if (empty($ADODB_SESSION_TBL)){
+		$ADODB_SESSION_TBL = 'sessions';
+	}
+	
+	/*
+	$ADODB_SESS['driver'] = $ADODB_SESSION_DRIVER;
+	$ADODB_SESS['connect'] = $ADODB_SESSION_CONNECT;
+	$ADODB_SESS['user'] = $ADODB_SESSION_USER;
+	$ADODB_SESS['pwd'] = $ADODB_SESSION_PWD;
+	$ADODB_SESS['db'] = $ADODB_SESSION_DB;
+	$ADODB_SESS['life'] = $ADODB_SESS_LIFE;
+	$ADODB_SESS['debug'] = $ADODB_SESS_DEBUG;
+	
+	$ADODB_SESS['debug'] = $ADODB_SESS_DEBUG;
+	$ADODB_SESS['table'] = $ADODB_SESS_TBL;
+	*/
+	
+/****************************************************************************************\
+	Create the connection to the database. 
+	
+	If $ADODB_SESS_CONN already exists, reuse that connection
+\****************************************************************************************/
+function adodb_sess_open($save_path, $session_name,$persist=true) 
+{
+GLOBAL $ADODB_SESS_CONN;
+	if (isset($ADODB_SESS_CONN)) return true;
+	
+GLOBAL 	$ADODB_SESSION_CONNECT, 
+	$ADODB_SESSION_DRIVER,
+	$ADODB_SESSION_USER,
+	$ADODB_SESSION_PWD,
+	$ADODB_SESSION_DB,
+	$ADODB_SESS_DEBUG;
+	
+	// cannot use & below - do not know why...
+	$ADODB_SESS_CONN = ADONewConnection($ADODB_SESSION_DRIVER);
+	if (!empty($ADODB_SESS_DEBUG)) {
+		$ADODB_SESS_CONN->debug = true;
+		ADOConnection::outp( " conn=$ADODB_SESSION_CONNECT user=$ADODB_SESSION_USER pwd=$ADODB_SESSION_PWD db=$ADODB_SESSION_DB ");
+	}
+	if ($persist) $ok = $ADODB_SESS_CONN->PConnect($ADODB_SESSION_CONNECT,
+			$ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB);
+	else $ok = $ADODB_SESS_CONN->Connect($ADODB_SESSION_CONNECT,
+			$ADODB_SESSION_USER,$ADODB_SESSION_PWD,$ADODB_SESSION_DB);
+	
+	if (!$ok) ADOConnection::outp( "
+-- Session: connection failed</p>",false);
+}
+
+/****************************************************************************************\
+	Close the connection
+\****************************************************************************************/
+function adodb_sess_close() 
+{
+global $ADODB_SESS_CONN;
+
+	if ($ADODB_SESS_CONN) $ADODB_SESS_CONN->Close();
+	return true;
+}
+
+/****************************************************************************************\
+	Slurp in the session variables and return the serialized string
+\****************************************************************************************/
+function adodb_sess_read($key) 
+{
+global $ADODB_SESS_CONN,$ADODB_SESSION_TBL,$ADODB_SESSION_CRC;
+
+	$rs = $ADODB_SESS_CONN->Execute("SELECT data FROM $ADODB_SESSION_TBL WHERE sesskey = '$key' AND expiry >= " . time());
+	if ($rs) {
+		if ($rs->EOF) {
+			$v = '';
+		} else 
+			$v = rawurldecode(reset($rs->fields));
+			
+		$rs->Close();
+		
+		// new optimization adodb 2.1
+		$ADODB_SESSION_CRC = strlen($v).crc32($v);
+		
+		return $v;
+	}
+	
+	return ''; // thx to Jorma Tuomainen, webmaster#wizactive.com
+}
+
+/****************************************************************************************\
+	Write the serialized data to a database.
+	
+	If the data has not been modified since adodb_sess_read(), we do not write.
+\****************************************************************************************/
+function adodb_sess_write($key, $val) 
+{
+	global
+		$ADODB_SESS_CONN, 
+		$ADODB_SESS_LIFE, 
+		$ADODB_SESSION_TBL,
+		$ADODB_SESS_DEBUG, 
+		$ADODB_SESSION_CRC,
+		$ADODB_SESSION_EXPIRE_NOTIFY;
+
+	$expiry = time() + $ADODB_SESS_LIFE;
+	
+	// crc32 optimization since adodb 2.1
+	// now we only update expiry date, thx to sebastian thom in adodb 2.32
+	if ($ADODB_SESSION_CRC !== false && $ADODB_SESSION_CRC == strlen($val).crc32($val)) {
+		if ($ADODB_SESS_DEBUG) echo "
+-- Session: Only updating date - crc32 not changed</p>";
+		$qry = "UPDATE $ADODB_SESSION_TBL SET expiry=$expiry WHERE sesskey='$key' AND expiry >= " . time();
+		$rs = $ADODB_SESS_CONN->Execute($qry);	
+		return true;
+	}
+	$val = rawurlencode($val);
+	
+	$arr = array('sesskey' => $key, 'expiry' => $expiry, 'data' => $val);
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		$var = reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		global $$var;
+		$arr['expireref'] = $$var;
+	}
+	$rs = $ADODB_SESS_CONN->Replace($ADODB_SESSION_TBL,$arr,
+    	'sesskey',$autoQuote = true);
+	
+	if (!$rs) {
+		ADOConnection::outp( '
+-- Session Replace: '.$ADODB_SESS_CONN->ErrorMsg().'</p>',false);
+	}  else {
+		// bug in access driver (could be odbc?) means that info is not commited
+		// properly unless select statement executed in Win2000
+		if ($ADODB_SESS_CONN->databaseType == 'access') 
+			$rs = $ADODB_SESS_CONN->Execute("select sesskey from $ADODB_SESSION_TBL WHERE sesskey='$key'");
+	}
+	return !empty($rs);
+}
+
+function adodb_sess_destroy($key) 
+{
+	global $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY;
+	
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		$fn = next($ADODB_SESSION_EXPIRE_NOTIFY);
+		$savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM);
+		$rs = $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+		$ADODB_SESS_CONN->SetFetchMode($savem);
+		if ($rs) {
+			$ADODB_SESS_CONN->BeginTrans();
+			while (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				$fn($ref,$key);
+				$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+				$rs->MoveNext();
+			}
+			$ADODB_SESS_CONN->CommitTrans();
+		}
+	} else {
+		$qry = "DELETE FROM $ADODB_SESSION_TBL WHERE sesskey = '$key'";
+		$rs = $ADODB_SESS_CONN->Execute($qry);
+	}
+	return $rs ? true : false;
+}
+
+function adodb_sess_gc($maxlifetime) 
+{
+	global $ADODB_SESS_DEBUG, $ADODB_SESS_CONN, $ADODB_SESSION_TBL,$ADODB_SESSION_EXPIRE_NOTIFY;
+	
+	if ($ADODB_SESSION_EXPIRE_NOTIFY) {
+		reset($ADODB_SESSION_EXPIRE_NOTIFY);
+		$fn = next($ADODB_SESSION_EXPIRE_NOTIFY);
+		$savem = $ADODB_SESS_CONN->SetFetchMode(ADODB_FETCH_NUM);
+		$t = time();
+		$rs =& $ADODB_SESS_CONN->Execute("SELECT expireref,sesskey FROM $ADODB_SESSION_TBL WHERE expiry < $t");
+		$ADODB_SESS_CONN->SetFetchMode($savem);
+		if ($rs) {
+			$ADODB_SESS_CONN->BeginTrans();
+			while (!$rs->EOF) {
+				$ref = $rs->fields[0];
+				$key = $rs->fields[1];
+				$fn($ref,$key);
+				$del = $ADODB_SESS_CONN->Execute("DELETE FROM $ADODB_SESSION_TBL WHERE sesskey='$key'");
+				$rs->MoveNext();
+			}
+			$rs->Close();
+			
+			$ADODB_SESS_CONN->CommitTrans();
+			
+		}
+	} else {
+		$qry = "DELETE FROM $ADODB_SESSION_TBL WHERE expiry < " . time();
+		$ADODB_SESS_CONN->Execute($qry);
+	
+		if ($ADODB_SESS_DEBUG) ADOConnection::outp("
+-- <b>Garbage Collection</b>: $qry</p>");
+	}
+	// suggested by Cameron, "GaM3R" <gamr@outworld.cx>
+	if (defined('ADODB_SESSION_OPTIMIZE')) {
+	global $ADODB_SESSION_DRIVER;
+	
+		switch( $ADODB_SESSION_DRIVER ) {
+			case 'mysql':
+			case 'mysqlt':
+				$opt_qry = 'OPTIMIZE TABLE '.$ADODB_SESSION_TBL;
+				break;
+			case 'postgresql':
+			case 'postgresql7':
+				$opt_qry = 'VACUUM '.$ADODB_SESSION_TBL;	
+				break;
+		}
+		if (!empty($opt_qry)) {
+			$ADODB_SESS_CONN->Execute($opt_qry);
+		}
+	}
+	if ($ADODB_SESS_CONN->dataProvider === 'oci8') $sql = 'select  TO_CHAR('.($ADODB_SESS_CONN->sysTimeStamp).', \'RRRR-MM-DD HH24:MI:SS\') from '. $ADODB_SESSION_TBL;
+	else $sql = 'select '.$ADODB_SESS_CONN->sysTimeStamp.' from '. $ADODB_SESSION_TBL;
+	
+	$rs =& $ADODB_SESS_CONN->SelectLimit($sql,1);
+	if ($rs && !$rs->EOF) {
+	
+		$dbts = reset($rs->fields);
+		$rs->Close();
+		$dbt = $ADODB_SESS_CONN->UnixTimeStamp($dbts);
+		$t = time();
+	
+		if (abs($dbt - $t) >= ADODB_SESSION_SYNCH_SECS) {
+		
+			$msg = 
+			__FILE__.": Server time for webserver {$_SERVER['HTTP_HOST']} not in synch with database: database=$dbt ($dbts), webserver=$t (diff=".(abs($dbt-$t)/3600)." hrs)";
+			error_log($msg);
+			if ($ADODB_SESS_DEBUG) ADOConnection::outp("
+-- $msg</p>");
+		}
+	}
+	
+	return true;
+}
+
+session_module_name('user'); 
+session_set_save_handler(
+	"adodb_sess_open",
+	"adodb_sess_close",
+	"adodb_sess_read",
+	"adodb_sess_write",
+	"adodb_sess_destroy",
+	"adodb_sess_gc");
+}
+
+/*  TEST SCRIPT -- UNCOMMENT */
+
+if (0) {
+
+	session_start();
+	session_register('AVAR');
+	$_SESSION['AVAR'] += 1;
+	ADOConnection::outp( "
+-- \$_SESSION['AVAR']={$_SESSION['AVAR']}</p>",false);
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/old/crypt.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/old/crypt.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/old/crypt.inc.php	(revision 225)
@@ -0,0 +1,64 @@
+<?php
+//	 Session Encryption by Ari Kuorikoski <ari.kuorikoski@finebyte.com>
+class MD5Crypt{
+		function keyED($txt,$encrypt_key)
+		{
+				$encrypt_key = md5($encrypt_key);
+				$ctr=0;
+				$tmp = "";
+				for ($i=0;$i<strlen($txt);$i++){
+						if ($ctr==strlen($encrypt_key)) $ctr=0;
+						$tmp.= substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1);
+						$ctr++;
+				}
+				return $tmp;
+		}
+
+		function Encrypt($txt,$key)
+		{
+				srand((double)microtime()*1000000);
+				$encrypt_key = md5(rand(0,32000));
+				$ctr=0;
+				$tmp = "";
+				for ($i=0;$i<strlen($txt);$i++)
+				{
+				if ($ctr==strlen($encrypt_key)) $ctr=0;
+				$tmp.= substr($encrypt_key,$ctr,1) .
+				(substr($txt,$i,1) ^ substr($encrypt_key,$ctr,1));
+				$ctr++;
+				}
+				return base64_encode($this->keyED($tmp,$key));
+		}
+
+		function Decrypt($txt,$key)
+		{
+				$txt = $this->keyED(base64_decode($txt),$key);
+				$tmp = "";
+				for ($i=0;$i<strlen($txt);$i++){
+						$md5 = substr($txt,$i,1);
+						$i++;
+						$tmp.= (substr($txt,$i,1) ^ $md5);
+				}
+				return $tmp;
+		}
+
+		function RandPass()
+		{
+				$randomPassword = "";
+				srand((double)microtime()*1000000);
+				for($i=0;$i<8;$i++)
+				{
+						$randnumber = rand(48,120);
+
+						while (($randnumber >= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96))
+						{
+								$randnumber = rand(48,120);
+						}
+
+						$randomPassword .= chr($randnumber);
+				}
+				return $randomPassword;
+		}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/session_schema.xml
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/session_schema.xml	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/session_schema.xml	(revision 225)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<schema version="0.2">
+  <table name="sessions">
+    <desc>table for ADOdb session-management</desc>
+
+    <field name="SESSKEY" type="C" size="32">
+      <descr>session key</descr>
+      <KEY/>
+      <NOTNULL/>
+    </field>
+ 
+    <field name="EXPIRY" type="I" size="11">
+      <descr></descr>
+      <NOTNULL/>
+    </field>
+
+    <field name="EXPIREREF" type="C" size="64">
+      <descr></descr>
+    </field>
+
+    <field name="DATA" type="XL">
+      <descr></descr>
+      <NOTNULL/>
+    </field>
+  </table>
+</schema>
Index: Dev/branches/Demo/rdfapi/util/adodb/session/session_schema2.xml
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/session/session_schema2.xml	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/session/session_schema2.xml	(revision 225)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<schema version="0.3">
+  <table name="sessions2">
+    <desc>table for ADOdb session-management</desc>
+
+    <field name="SESSKEY" type="C" size="64">
+      <descr>session key</descr>
+      <KEY/>
+      <NOTNULL/>
+    </field>
+ 
+
+	
+    <field name="EXPIRY" type="T">
+      <descr></descr>
+      <NOTNULL/>
+    </field>
+	
+	 	<field name="CREATED" type="T">
+	     <descr></descr>
+      <NOTNULL/>
+    </field>
+	
+	 	<field name="MODIFIED" type="T">
+	     <descr></descr>
+      <NOTNULL/>
+    </field>
+
+    <field name="EXPIREREF" type="C" size="250">
+      <descr></descr>
+    </field>
+
+    <field name="SESSDATA" type="XL">
+      <descr></descr>
+      <NOTNULL/>
+    </field>
+  </table>
+</schema>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/benchmark.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/benchmark.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/benchmark.php	(revision 225)
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+	<title>ADODB Benchmarks</title>
+</head> 
+
+<body>
+<?php 
+/*
+V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  
+  Benchmark code to test the speed to the ADODB library with different databases.
+  This is a simplistic benchmark to be used as the basis for further testing.
+  It should not be used as proof of the superiority of one database over the other.
+*/ 
+ 
+$testmssql = true;
+//$testvfp = true;
+$testoracle = true;
+$testado = true; 
+$testibase = true;
+$testaccess = true;
+$testmysql = true;
+$testsqlite = true;;
+
+set_time_limit(240); // increase timeout
+
+include("../tohtml.inc.php");
+include("../adodb.inc.php");
+
+function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
+{
+GLOBAL $ADODB_version,$ADODB_FETCH_MODE;
+
+	adodb_backtrace();
+	
+	$max = 100;
+	$sql = 'select * from ADOXYZ';
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+	//print "<h3>ADODB Version: $ADODB_version Host: <i>$db->host</i> &nbsp; Database: <i>$db->database</i></h3>";
+	
+	// perform query once to cache results so we are only testing throughput 
+	$rs = $db->Execute($sql);
+	if (!$rs){
+		print "Error in recordset<p>";
+		return;
+	}	
+	$arr = $rs->GetArray();
+	//$db->debug = true;
+	global $ADODB_COUNTRECS;
+	$ADODB_COUNTRECS = false;
+	$start = microtime();
+	for ($i=0; $i < $max; $i++) {
+		$rs =& $db->Execute($sql);	
+		$arr =& $rs->GetArray();
+	   //		 print $arr[0][1];
+	}
+	$end =  microtime();
+	$start = explode(' ',$start);
+	$end = explode(' ',$end);
+	
+	//print_r($start);
+	//print_r($end);
+	
+	  //  print_r($arr);
+	$total = $end[0]+trim($end[1]) - $start[0]-trim($start[1]);
+	printf ("<p>seconds = %8.2f for %d iterations each with %d records</p>",$total,$max, sizeof($arr));
+	flush();
+
+
+		//$db->Close();
+}
+include("testdatabases.inc.php");
+
+?>
+
+
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/client.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/client.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/client.php	(revision 225)
@@ -0,0 +1,198 @@
+<html>
+<body bgcolor=white>
+<?php
+/** 
+ * V4.50 6 July 2004  (c) 2001-2002 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+ * 
+ * set tabs to 8
+ */
+ 
+ // documentation on usage is at http://php.weblogs.com/adodb_csv
+ 
+ echo PHP_VERSION,'<br>';
+ var_dump(parse_url('odbc_mssql://userserver/'));
+ die();
+ 
+include('../adodb.inc.php');
+include('../tohtml.inc.php');
+
+ function &send2server($url,$sql)
+ {
+	$url .= '?sql='.urlencode($sql);
+	print "<p>$url</p>";
+	$rs = csv2rs($url,$err);
+	if ($err) print $err;
+	return $rs;
+ }
+ 
+ function print_pre($s)
+ {
+ 	print "<pre>";print_r($s);print "</pre>";
+ }
+
+
+$serverURL = 'http://localhost/php/phplens/adodb/server.php';
+$testhttp = false;
+
+$sql1 = "insertz into products (productname) values ('testprod 1')";
+$sql2 = "insert into products (productname) values ('testprod 1')";
+$sql3 = "insert into products (productname) values ('testprod 2')";
+$sql4 = "delete from products where productid>80";
+$sql5 = 'select * from products';
+	
+if ($testhttp) {
+	print "<a href=#c>Client Driver Tests</a><p>";
+	print "<h3>Test Error</h3>";
+	$rs = send2server($serverURL,$sql1);
+	print_pre($rs);
+	print "<hr />";
+	
+	print "<h3>Test Insert</h3>";
+	
+	$rs = send2server($serverURL,$sql2);
+	print_pre($rs);
+	print "<hr />";
+	
+	print "<h3>Test Insert2</h3>";
+	
+	$rs = send2server($serverURL,$sql3);
+	print_pre($rs);
+	print "<hr />";
+	
+	print "<h3>Test Delete</h3>";
+	
+	$rs = send2server($serverURL,$sql4);
+	print_pre($rs);
+	print "<hr />";
+	
+	
+	print "<h3>Test Select</h3>";
+	$rs = send2server($serverURL,$sql5);
+	if ($rs) rs2html($rs);
+	
+	print "<hr />";
+}
+
+
+print "<a name=c><h1>CLIENT Driver Tests</h1>";
+$conn = ADONewConnection('csv');
+$conn->Connect($serverURL);
+$conn->debug = true;
+
+print "<h3>Bad SQL</h3>";
+
+$rs = $conn->Execute($sql1);
+
+print "<h3>Insert SQL 1</h3>";
+$rs = $conn->Execute($sql2);
+
+print "<h3>Insert SQL 2</h3>";
+$rs = $conn->Execute($sql3);
+
+print "<h3>Select SQL</h3>";
+$rs = $conn->Execute($sql5);
+if ($rs) rs2html($rs);
+
+print "<h3>Delete SQL</h3>";
+$rs = $conn->Execute($sql4);
+
+print "<h3>Select SQL</h3>";
+$rs = $conn->Execute($sql5);
+if ($rs) rs2html($rs);
+
+
+/* EXPECTED RESULTS FOR HTTP TEST:
+
+Test Insert
+http://localhost/php/adodb/server.php?sql=insert+into+products+%28productname%29+values+%28%27testprod%27%29
+
+adorecordset Object
+(
+	[dataProvider] => native
+	[fields] => 
+	[blobSize] => 64
+	[canSeek] => 
+	[EOF] => 1
+	[emptyTimeStamp] =>  
+	[emptyDate] =>  
+	[debug] => 
+	[timeToLive] => 0
+	[bind] => 
+	[_numOfRows] => -1
+	[_numOfFields] => 0
+	[_queryID] => 1
+	[_currentRow] => -1
+	[_closed] => 
+	[_inited] => 
+	[sql] => insert into products (productname) values ('testprod')
+	[affectedrows] => 1
+	[insertid] => 81
+)
+
+
+--------------------------------------------------------------------------------
+
+Test Insert2
+http://localhost/php/adodb/server.php?sql=insert+into+products+%28productname%29+values+%28%27testprod%27%29
+
+adorecordset Object
+(
+	[dataProvider] => native
+	[fields] => 
+	[blobSize] => 64
+	[canSeek] => 
+	[EOF] => 1
+	[emptyTimeStamp] =>  
+	[emptyDate] =>  
+	[debug] => 
+	[timeToLive] => 0
+	[bind] => 
+	[_numOfRows] => -1
+	[_numOfFields] => 0
+	[_queryID] => 1
+	[_currentRow] => -1
+	[_closed] => 
+	[_inited] => 
+	[sql] => insert into products (productname) values ('testprod')
+	[affectedrows] => 1
+	[insertid] => 82
+)
+
+
+--------------------------------------------------------------------------------
+
+Test Delete
+http://localhost/php/adodb/server.php?sql=delete+from+products+where+productid%3E80
+
+adorecordset Object
+(
+	[dataProvider] => native
+	[fields] => 
+	[blobSize] => 64
+	[canSeek] => 
+	[EOF] => 1
+	[emptyTimeStamp] =>  
+	[emptyDate] =>  
+	[debug] => 
+	[timeToLive] => 0
+	[bind] => 
+	[_numOfRows] => -1
+	[_numOfFields] => 0
+	[_queryID] => 1
+	[_currentRow] => -1
+	[_closed] => 
+	[_inited] => 
+	[sql] => delete from products where productid>80
+	[affectedrows] => 2
+	[insertid] => 0
+)
+
+[more stuff deleted]
+ .
+ . 
+ .
+*/
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/pdo.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/pdo.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/pdo.php	(revision 225)
@@ -0,0 +1,94 @@
+<?php
+error_reporting(E_ALL);
+include('../adodb.inc.php');
+
+echo "<pre>";
+try {
+	echo "New Connection\n";
+	
+	
+	$dsn = 'pdo_mysql://root:@localhost/northwind?persist';
+	
+	if (!empty($dsn)) {
+		$DB =& NewADOConnection($dsn) || die("CONNECT FAILED");
+		$connstr = $dsn;
+	} else {
+	
+		$DB = NewADOConnection('pdo');
+		
+		echo "Connect\n";
+		
+		$u = ''; $p = '';
+		/*
+		$connstr = 'odbc:nwind';
+		
+		$connstr = 'oci:';
+		$u = 'scott';
+		$p = 'natsoft';
+		
+		
+		$connstr ="sqlite:d:\inetpub\adodb\sqlite.db";
+		*/
+		
+		$connstr = "mysql:dbname=northwind";
+		$u = 'root';
+		
+		$connstr = "pgsql:dbname=test";
+		$u = 'tester';
+		$p = 'test';
+		
+		$DB->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	
+	}
+	
+	echo "connection string=$connstr\n Execute\n";
+	
+	//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$rs = $DB->Execute("select * from ADOXYZ where id<3");
+	if  ($DB->ErrorNo()) echo "*** errno=".$DB->ErrorNo() . " ".($DB->ErrorMsg())."\n";
+	
+	
+	//print_r(get_class_methods($DB->_stmt));
+	
+	if (!$rs) die("NO RS");
+	
+	echo "Meta\n";
+	for ($i=0; $i < $rs->NumCols(); $i++) {
+		var_dump($rs->FetchField($i));
+		echo "<br>";
+	}
+	
+	echo "FETCH\n";
+	$cnt = 0;
+	while (!$rs->EOF) {
+		adodb_pr($rs->fields); 
+		$rs->MoveNext();
+		if ($cnt++ > 1000) break;
+	}
+	
+	echo "<br>--------------------------------------------------------<br>\n\n\n";
+	
+	$stmt = $DB->PrepareStmt("select * from ADOXYZ");
+	
+	$rs = $stmt->Execute();
+	$cols = $stmt->NumCols(); // execute required
+	
+	echo "COLS = $cols";
+	for($i=1;$i<=$cols;$i++) {
+		$v = $stmt->_stmt->getColumnMeta($i);
+		var_dump($v);
+	}
+	
+	echo "e=".$stmt->ErrorNo() . " ".($stmt->ErrorMsg())."\n";
+	while ($arr = $rs->FetchRow()) {
+		adodb_pr($arr);
+	}
+	die("DONE\n");
+
+} catch (exception $e) {
+	echo "<pre>";
+	echo $e;
+	echo "</pre>";
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-active-record.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-active-record.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-active-record.php	(revision 225)
@@ -0,0 +1,82 @@
+<?php
+
+	include_once('../adodb.inc.php');
+	include_once('../adodb-active-record.inc.php');
+	
+	// uncomment the following if you want to test exceptions
+	if (@$_GET['except']) {
+		if (PHP_VERSION >= 5) {
+			include('../adodb-exceptions.inc.php');
+			echo "<h3>Exceptions included</h3>";
+		}
+	}
+
+	$db = NewADOConnection('mysql://root@localhost/northwind');
+	$db->debug=1;
+	ADOdb_Active_Record::SetDatabaseAdapter($db);
+
+	$db->Execute("CREATE TEMPORARY TABLE `persons` (
+	                `id` int(10) unsigned NOT NULL auto_increment,
+	                `name_first` varchar(100) NOT NULL default '',
+	                `name_last` varchar(100) NOT NULL default '',
+	                `favorite_color` varchar(100) NOT NULL default '',
+	                PRIMARY KEY  (`id`)
+	            ) ENGINE=MyISAM;
+	           ");
+			   
+	class Person extends ADOdb_Active_Record{}
+	$person = new Person();
+	
+	echo "<p>Output of getAttributeNames: ";
+	var_dump($person->getAttributeNames());
+	
+	/**
+	 * Outputs the following:
+	 * array(4) {
+	 *    [0]=>
+	 *    string(2) "id"
+	 *    [1]=>
+	 *    string(9) "name_first"
+	 *    [2]=>
+	 *    string(8) "name_last"
+	 *    [3]=>
+	 *    string(13) "favorite_color"
+	 *  }
+	 */
+	
+	$person = new Person();
+	$person->name_first = 'Andi';
+	$person->name_last  = 'Gutmans';
+	$person->save(); // this save() will fail on INSERT as favorite_color is a must fill...
+	
+	
+	$person = new Person();
+	$person->name_first     = 'Andi';
+	$person->name_last      = 'Gutmans';
+	$person->favorite_color = 'blue';
+	$person->save(); // this save will perform an INSERT successfully
+	
+	echo "<p>The Insert ID generated:"; print_r($person->id);
+	
+	$person->favorite_color = 'red';
+	$person->save(); // this save() will perform an UPDATE
+	
+	$person = new Person();
+	$person->name_first     = 'John';
+	$person->name_last      = 'Lim';
+	$person->favorite_color = 'lavender';
+	$person->save(); // this save will perform an INSERT successfully
+	
+	// load record where id=2 into a new ADOdb_Active_Record
+	$person2 = new Person();
+	$person2->Load('id=2');
+	
+	var_dump($person2);
+	
+	$activeArr = $db->GetActiveRecordsClass($class = "Person",$table = "persons","id=".$db->Param(0),array(2));
+	$person2 =& $activeArr[0];
+	echo "<p>Name (should be John): ",$person->name_first, " <br> Class (should be Person): ",get_class($person2);	
+	
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-active-recs2.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-active-recs2.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-active-recs2.php	(revision 225)
@@ -0,0 +1,75 @@
+<?php
+error_reporting(E_ALL);
+include('../adodb.inc.php');
+
+include('../adodb-active-record.inc.php');
+
+###########################
+
+$ADODB_ACTIVE_CACHESECS = 36;
+
+$DBMS = @$_GET['db'];
+if ($DBMS == 'mysql') {
+	$db = NewADOConnection('mysql://root@localhost/northwind');
+} else if ($DBMS == 'postgres') {
+	$db = NewADOConnection('postgres');
+	$db->Connect("localhost","tester","test","test");
+} else
+	$db = NewADOConnection('oci8://scott:natsoft@/');
+
+
+$arr = $db->ServerInfo();
+echo "<h3>$db->dataProvider: {$arr['description']}</h3>";
+
+$arr = $db->GetActiveRecords('products',' productid<10');
+adodb_pr($arr);
+
+ADOdb_Active_Record::SetDatabaseAdapter($db);
+if  (!$db)  die('failed');
+
+
+
+
+$rec = new ADODB_Active_Record('photos');
+
+$rec = new ADODB_Active_Record('products');
+
+
+adodb_pr($rec->getAttributeNames());
+
+echo "<hr>";
+
+
+$rec->load('productid=2');
+adodb_pr($rec);
+
+$db->debug=1;
+
+
+$rec->productname = 'Changie Chan'.rand();
+
+$rec->insert();
+$rec->update();
+
+$rec->productname = 'Changie Chan 99';
+$rec->replace();
+
+
+$rec2 = new ADODB_Active_Record('products');
+$rec->load('productid=3');
+$rec->save();
+
+$rec = new ADODB_Active_record('products');
+$rec->productname = 'John ActiveRec';
+$rec->notes = 22;
+#$rec->productid=0;
+$rec->discontinued=1;
+$rec->Save();
+$rec->supplierid=33;
+$rec->Save();
+$rec->discontinued=0;
+$rec->Save();
+$rec->Delete();
+
+echo "<p>Affected Rows after delete=".$db->Affected_Rows()."</p>";
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-datadict.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-datadict.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-datadict.php	(revision 225)
@@ -0,0 +1,248 @@
+<?php
+/*
+
+  V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+	
+  Set tabs to 4 for best viewing.
+
+*/
+
+error_reporting(E_ALL);
+include_once('../adodb.inc.php');
+
+foreach(array('sapdb','sybase','mysql','access','oci8po','postgres','odbc_mssql','odbc','db2','firebird','informix') as $dbType) {
+	echo "<h3>$dbType</h3><p>";
+	$db = NewADOConnection($dbType);
+	$dict = NewDataDictionary($db);
+
+	if (!$dict) continue;
+	$dict->debug = 1;
+	
+	$opts = array('REPLACE','mysql' => 'ENGINE=INNODB', 'oci8' => 'TABLESPACE USERS');
+	
+/*	$flds = array(
+		array('id',	'I',								
+							'AUTO','KEY'),
+							
+		array('name' => 'firstname', 'type' => 'varchar','size' => 30,
+							'DEFAULT'=>'Joan'),
+							
+		array('lastname','varchar',28,
+							'DEFAULT'=>'Chen','key'),
+							
+		array('averylonglongfieldname','X',1024,
+							'NOTNULL','default' => 'test'),
+							
+		array('price','N','7.2',
+							'NOTNULL','default' => '0.00'),
+							
+		array('MYDATE', 'D', 
+							'DEFDATE'),
+		array('TS','T',
+							'DEFTIMESTAMP')
+	);*/
+	
+	$flds = "
+ID            I           AUTO KEY,
+FIRSTNAME     VARCHAR(30) DEFAULT 'Joan' INDEX idx_name,
+LASTNAME      VARCHAR(28) DEFAULT 'Chen' key INDEX idx_name,
+averylonglongfieldname X(1024) DEFAULT 'test',
+price         N(7.2)  DEFAULT '0.00',
+MYDATE        D      DEFDATE INDEX idx_date,
+BIGFELLOW     X      NOTNULL,
+TS            T      DEFTIMESTAMP";
+
+
+	$sqla = $dict->CreateDatabase('KUTU',array('postgres'=>"LOCATION='/u01/postdata'"));
+	$dict->SetSchema('KUTU');
+	
+	$sqli = ($dict->CreateTableSQL('testtable',$flds, $opts));
+	$sqla = array_merge($sqla,$sqli);
+	
+	$sqli = $dict->CreateIndexSQL('idx','testtable','price,firstname,lastname',array('BITMAP','FULLTEXT','CLUSTERED','HASH'));
+	$sqla = array_merge($sqla,$sqli);
+	$sqli = $dict->CreateIndexSQL('idx2','testtable','price,lastname');//,array('BITMAP','FULLTEXT','CLUSTERED'));
+	$sqla = array_merge($sqla,$sqli);
+	
+	$addflds = array(array('height', 'F'),array('weight','F'));
+	$sqli = $dict->AddColumnSQL('testtable',$addflds);
+	$sqla = array_merge($sqla,$sqli);
+	$addflds = array(array('height', 'F','NOTNULL'),array('weight','F','NOTNULL'));
+	$sqli = $dict->AlterColumnSQL('testtable',$addflds);
+	$sqla = array_merge($sqla,$sqli);
+	
+	
+	printsqla($dbType,$sqla);
+	
+	if (file_exists('d:\inetpub\wwwroot\php\phplens\adodb\adodb.inc.php'))
+	if ($dbType == 'mysqlt') {
+		$db->Connect('localhost', "root", "", "test");
+		$dict->SetSchema('');
+		$sqla2 = $dict->ChangeTableSQL('adoxyz',$flds);
+		if ($sqla2) printsqla($dbType,$sqla2);
+	}
+	if ($dbType == 'postgres') {
+		if (@$db->Connect('localhost', "tester", "test", "test"));
+		$dict->SetSchema('');
+		$sqla2 = $dict->ChangeTableSQL('adoxyz',$flds);
+		if ($sqla2) printsqla($dbType,$sqla2);
+	}
+	
+	if ($dbType == 'odbc_mssql') {
+		$dsn = $dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=localhost;Database=northwind;";
+		if (@$db->Connect($dsn, "sa", "natsoft", "test"));
+		$dict->SetSchema('');
+		$sqla2 = $dict->ChangeTableSQL('adoxyz',$flds);
+		if ($sqla2) printsqla($dbType,$sqla2);
+	}
+	
+	
+	
+	adodb_pr($dict->databaseType);
+	printsqla($dbType, $dict->DropColumnSQL('table',array('my col','`col2_with_Quotes`','A_col3','col3(10)')));
+	printsqla($dbType, $dict->ChangeTableSQL('adoxyz','LASTNAME varchar(32)'));
+	
+}
+
+function printsqla($dbType,$sqla)
+{
+	print "<pre>";
+	//print_r($dict->MetaTables());
+	foreach($sqla as $s) {
+		$s = htmlspecialchars($s);
+		print "$s;\n";
+		if ($dbType == 'oci8') print "/\n";
+	}
+	print "</pre><hr />";
+}
+
+/***
+
+Generated SQL:
+
+mysql
+
+CREATE DATABASE KUTU;
+DROP TABLE KUTU.testtable;
+CREATE TABLE KUTU.testtable (
+id               INTEGER NOT NULL AUTO_INCREMENT,
+firstname        VARCHAR(30) DEFAULT 'Joan',
+lastname         VARCHAR(28) NOT NULL DEFAULT 'Chen',
+averylonglongfieldname LONGTEXT NOT NULL,
+price            NUMERIC(7,2) NOT NULL DEFAULT 0.00,
+MYDATE           DATE DEFAULT CURDATE(),
+                 PRIMARY KEY (id, lastname)
+)TYPE=ISAM;
+CREATE FULLTEXT INDEX idx ON KUTU.testtable (firstname,lastname);
+CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
+ALTER TABLE KUTU.testtable  ADD height           DOUBLE;
+ALTER TABLE KUTU.testtable  ADD weight           DOUBLE;
+ALTER TABLE KUTU.testtable  MODIFY COLUMN height           DOUBLE NOT NULL;
+ALTER TABLE KUTU.testtable  MODIFY COLUMN weight           DOUBLE NOT NULL;
+
+
+--------------------------------------------------------------------------------
+
+oci8
+
+CREATE USER KUTU IDENTIFIED BY tiger;
+/
+GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO KUTU;
+/
+DROP TABLE KUTU.testtable CASCADE CONSTRAINTS;
+/
+CREATE TABLE KUTU.testtable (
+id               NUMBER(16) NOT NULL,
+firstname        VARCHAR(30) DEFAULT 'Joan',
+lastname         VARCHAR(28) DEFAULT 'Chen' NOT NULL,
+averylonglongfieldname CLOB NOT NULL,
+price            NUMBER(7,2) DEFAULT 0.00 NOT NULL,
+MYDATE           DATE DEFAULT TRUNC(SYSDATE),
+                 PRIMARY KEY (id, lastname)
+)TABLESPACE USERS;
+/
+DROP SEQUENCE KUTU.SEQ_testtable;
+/
+CREATE SEQUENCE KUTU.SEQ_testtable;
+/
+CREATE OR REPLACE TRIGGER KUTU.TRIG_SEQ_testtable BEFORE insert ON KUTU.testtable 
+		FOR EACH ROW
+		BEGIN
+		  select KUTU.SEQ_testtable.nextval into :new.id from dual;
+		END;
+/
+CREATE BITMAP INDEX idx ON KUTU.testtable (firstname,lastname);
+/
+CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
+/
+ALTER TABLE testtable ADD (
+ height           NUMBER,
+ weight           NUMBER);
+/
+ALTER TABLE testtable MODIFY(
+ height           NUMBER NOT NULL,
+ weight           NUMBER NOT NULL);
+/
+
+
+--------------------------------------------------------------------------------
+
+postgres
+AlterColumnSQL not supported for PostgreSQL
+
+
+CREATE DATABASE KUTU LOCATION='/u01/postdata';
+DROP TABLE KUTU.testtable;
+CREATE TABLE KUTU.testtable (
+id               SERIAL,
+firstname        VARCHAR(30) DEFAULT 'Joan',
+lastname         VARCHAR(28) DEFAULT 'Chen' NOT NULL,
+averylonglongfieldname TEXT NOT NULL,
+price            NUMERIC(7,2) DEFAULT 0.00 NOT NULL,
+MYDATE           DATE DEFAULT CURRENT_DATE,
+                 PRIMARY KEY (id, lastname)
+);
+CREATE INDEX idx ON KUTU.testtable USING HASH (firstname,lastname);
+CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
+ALTER TABLE KUTU.testtable  ADD height           FLOAT8;
+ALTER TABLE KUTU.testtable  ADD weight           FLOAT8;
+
+
+--------------------------------------------------------------------------------
+
+odbc_mssql
+
+CREATE DATABASE KUTU;
+DROP TABLE KUTU.testtable;
+CREATE TABLE KUTU.testtable (
+id               INT IDENTITY(1,1) NOT NULL,
+firstname        VARCHAR(30) DEFAULT 'Joan',
+lastname         VARCHAR(28) DEFAULT 'Chen' NOT NULL,
+averylonglongfieldname TEXT NOT NULL,
+price            NUMERIC(7,2) DEFAULT 0.00 NOT NULL,
+MYDATE           DATETIME DEFAULT GetDate(),
+                 PRIMARY KEY (id, lastname)
+);
+CREATE CLUSTERED INDEX idx ON KUTU.testtable (firstname,lastname);
+CREATE INDEX idx2 ON KUTU.testtable (price,lastname);
+ALTER TABLE KUTU.testtable  ADD
+ height           REAL,
+ weight           REAL;
+ALTER TABLE KUTU.testtable  ALTER COLUMN height           REAL NOT NULL;
+ALTER TABLE KUTU.testtable  ALTER COLUMN weight           REAL NOT NULL;
+
+
+--------------------------------------------------------------------------------
+*/
+
+
+echo "<h1>Test XML Schema</h1>";
+$ff = file('xmlschema.xml');
+echo "<pre>";
+foreach($ff as $xml) echo htmlspecialchars($xml);
+echo "</pre>";
+include_once('test-xmlschema.php');
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-perf.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-perf.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-perf.php	(revision 225)
@@ -0,0 +1,50 @@
+<?php
+
+include_once('../adodb-perf.inc.php');
+
+error_reporting(E_ALL);
+session_start();
+
+if (isset($_GET)) {
+	foreach($_GET as $k => $v) {
+		if (strncmp($k,'test',4) == 0) $_SESSION['_db'] = $k;
+	}
+} 
+
+if (isset($_SESSION['_db'])) {
+	$_db = $_SESSION['_db'];
+	$_GET[$_db] = 1;
+	$$_db = 1;
+}
+
+echo "<h1>Performance Monitoring</h1>";
+include_once('testdatabases.inc.php');
+
+
+function testdb($db) 
+{
+	if (!$db) return;
+	echo "<font size=1>";print_r($db->ServerInfo()); echo " user=".$db->user."</font>";
+	
+	$perf = NewPerfMonitor($db); 
+	
+	# unit tests
+	if (0) {
+		//$DB->debug=1;
+		echo "Data Cache Size=".$perf->DBParameter('data cache size').'<p>';
+		echo $perf->HealthCheck();
+		echo($perf->SuspiciousSQL());
+		echo($perf->ExpensiveSQL());
+		echo($perf->InvalidSQL());
+		echo $perf->Tables();
+	
+		echo "<pre>";
+		echo $perf->HealthCheckCLI();
+		$perf->Poll(3);
+		die();
+	}
+	
+	if ($perf) $perf->UI(3);
+}
+ 
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-pgblob.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-pgblob.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-pgblob.php	(revision 225)
@@ -0,0 +1,88 @@
+<?php
+
+function getmicrotime()
+{
+	$t = microtime();
+	$t = explode(' ',$t);
+	return (float)$t[1]+ (float)$t[0];
+}
+
+function doloop()
+{
+global $db,$MAX;
+	
+	$sql = "select id,firstname,lastname from adoxyz where 
+		firstname not like ? and lastname not like ? and id=?";
+	$offset = 0;
+	/*$sql = "select * from juris9.employee join juris9.emp_perf_plan on epp_empkey = emp_id 
+		where emp_name not like ? and emp_name not like ? and emp_id=28000+?";
+	$offset = 28000;*/
+	for ($i=1; $i <= $MAX; $i++) {
+		$db->Param(false);
+		$x = (rand() % 10) + 1;
+		$db->debug= ($i==1);
+		$id = $db->GetOne($sql,
+			array('Z%','Z%',$x));
+		if($id != $offset+$x) {
+			print "<p>Error at $x";
+			break;
+		}
+	}
+}
+
+include_once('../adodb.inc.php');
+$db = NewADOConnection('postgres7');
+$db->PConnect('localhost','tester','test','test') || die("failed connection");
+
+$enc = "GIF89a%01%00%01%00%80%FF%00%C0%C0%C0%00%00%00%21%F9%04%01%00%00%00%00%2C%00%00%00%00%01%00%01%00%00%01%012%00%3Bt_clear.gif%0D";
+$val = rawurldecode($enc);
+
+$MAX = 1000;
+
+adodb_pr($db->ServerInfo());
+
+echo "<h4>Testing PREPARE/EXECUTE PLAN</h4>";
+
+
+$db->_bindInputArray = true; // requires postgresql 7.3+ and ability to modify database
+$t = getmicrotime();
+doloop();
+echo '<p>',$MAX,' times, with plan=',getmicrotime() - $t,'</p>';
+
+
+$db->_bindInputArray = false;
+$t = getmicrotime();
+doloop();
+echo '<p>',$MAX,' times, no plan=',getmicrotime() - $t,'</p>';
+
+
+
+echo "<h4>Testing UPDATEBLOB</h4>";
+$db->debug=1;
+
+### TEST BEGINS
+
+$db->Execute("insert into photos (id,name) values(9999,'dot.gif')");
+$db->UpdateBlob('photos','photo',$val,'id=9999');
+$v = $db->GetOne('select photo from photos where id=9999');
+
+
+### CLEANUP
+
+$db->Execute("delete from photos where id=9999");
+
+### VALIDATION
+
+if ($v !== $val) echo "<b>*** ERROR: Inserted value does not match downloaded val<b>";
+else echo "<b>*** OK: Passed</b>";
+
+echo "<pre>";
+echo "INSERTED: ", $enc;
+echo "<hr />";
+echo"RETURNED: ", rawurlencode($v);
+echo "<hr /><p>";
+echo "INSERTED: ", $val;
+echo "<hr />";
+echo "RETURNED: ", $v;
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-php5.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-php5.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-php5.php	(revision 225)
@@ -0,0 +1,108 @@
+<?php
+/*
+  V4.81 3 May 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+ */
+
+
+error_reporting(E_ALL);
+
+$path = dirname(__FILE__);
+
+include("$path/../adodb-exceptions.inc.php");
+include("$path/../adodb.inc.php");	
+
+echo "<h3>PHP ".PHP_VERSION."</h3>\n";
+try {
+
+$dbt = 'mysql';
+
+try {
+switch($dbt) {
+case 'oci8po':
+	$db = NewADOConnection("oci8po");
+	
+	$db->Connect('','scott','natsoft');
+	break;
+default:
+case 'mysql':
+	$db = NewADOConnection("mysql");
+	$db->Connect('localhost','root','','northwind');
+	break;
+	
+case 'mysqli':
+	$db = NewADOConnection("mysqli://root:@localhost/northwind");
+	//$db->Connect('localhost','root','','test');
+	break;
+}
+} catch (exception $e){
+	echo "Connect Failed";
+	adodb_pr($e);
+	die();
+}
+
+$db->debug=1;
+
+$cnt = $db->GetOne("select count(*) from adoxyz where ?<id and id<?",array(10,20));
+$stmt = $db->Prepare("select * from adoxyz where ?<id and id<?");
+if (!$stmt) echo $db->ErrorMsg(),"\n";
+$rs = $db->Execute($stmt,array(10,20));
+
+echo  "<hr /> Foreach Iterator Test (rand=".rand().")<hr />";
+$i = 0;
+foreach($rs as $v) {
+	$i += 1;
+	echo "rec $i: "; $s1 = adodb_pr($v,true); $s2 = adodb_pr($rs->fields,true);
+	if ($s1 != $s2 && !empty($v)) {adodb_pr($s1); adodb_pr($s2);}
+	else echo "passed<br>";
+	flush();
+}
+
+
+if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n");
+else echo "Count $i is correct<br>";
+
+$rs = $db->Execute("select bad from badder");
+
+} catch (exception $e) {
+	adodb_pr($e);
+	echo "<h3>adodb_backtrace:</h3>\n";
+	$e = adodb_backtrace($e->gettrace());
+}
+
+$rs = $db->Execute("select distinct id, firstname,lastname from adoxyz order by id");
+echo "Result=\n",$rs,"</p>";
+
+echo "<h3>Active Record</h3>";
+try {
+	include_once("../adodb-active-record.inc.php");
+	class City extends ADOdb_Active_Record{};
+	$a = new City();
+
+} catch(exception $e){
+	echo $e->getMessage();
+}
+
+try {
+	
+	ADOdb_Active_Record::SetDatabaseAdapter($db);
+	$a = new City();
+	
+	echo "<p>Successfully created City()<br>";
+	var_dump($a->GetPrimaryKeys());
+	$a->city = 'Kuala Lumpur';
+	$a->Save();
+	$a->Update();
+	$a->SetPrimaryKeys(array('city'));	
+	$a->country = "M'sia";
+	$a->save();
+	$a->Delete();
+} catch(exception $e){
+	echo $e->getMessage();
+}
+
+include_once("test-active-record.php");
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test-xmlschema.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test-xmlschema.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test-xmlschema.php	(revision 225)
@@ -0,0 +1,54 @@
+<?PHP
+
+// V4.50 6 July 2004
+
+error_reporting(E_ALL);
+include_once( "../adodb.inc.php" );
+include_once( "../adodb-xmlschema03.inc.php" );
+
+// To build the schema, start by creating a normal ADOdb connection:
+$db = ADONewConnection( 'mysql' );
+$db->Connect( 'localhost', 'root', '', 'test' ) || die('fail connect1');
+
+// To create a schema object and build the query array.
+$schema = new adoSchema( $db );
+
+// To upgrade an existing schema object, use the following 
+// To upgrade an existing database to the provided schema,
+// uncomment the following line:
+#$schema->upgradeSchema();
+
+print "<b>SQL to build xmlschema.xml</b>:\n<pre>";
+// Build the SQL array
+$sql = $schema->ParseSchema( "xmlschema.xml" );
+
+var_dump( $sql );
+print "</pre>\n";
+
+// Execute the SQL on the database
+//$result = $schema->ExecuteSchema( $sql );
+
+// Finally, clean up after the XML parser
+// (PHP won't do this for you!)
+//$schema->Destroy();
+
+
+
+print "<b>SQL to build xmlschema-mssql.xml</b>:\n<pre>";
+
+$db2 = ADONewConnection('mssql');
+$db2->Connect('','adodb','natsoft','northwind') || die("Fail 2");
+
+$db2->Execute("drop table simple_table");
+
+$schema = new adoSchema( $db2 );
+$sql = $schema->ParseSchema( "xmlschema-mssql.xml" );
+
+print_r( $sql );
+print "</pre>\n";
+
+$db2->debug=1;
+
+foreach ($sql as $s)
+$db2->Execute($s);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test.php	(revision 225)
@@ -0,0 +1,1743 @@
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+
+if (!defined('E_STRICT')) define('E_STRICT',0);
+error_reporting(E_ALL|E_STRICT);
+
+$ADODB_FLUSH = true;
+
+define('ADODB_ASSOC_CASE',0);
+
+
+function getmicrotime()
+{
+	$t = microtime();
+	$t = explode(' ',$t);
+	return (float)$t[1]+ (float)$t[0];
+}
+
+
+if (PHP_VERSION < 5) include_once('../adodb-pear.inc.php');
+//--------------------------------------------------------------------------------------
+//define('ADODB_ASSOC_CASE',1);
+//
+function Err($msg)
+{
+	print "<b>$msg</b><br>";
+	flush();
+}
+
+function CheckWS($conn)
+{
+global $ADODB_EXTENSION;
+
+	include_once('../session/adodb-session.php');
+	if (defined('CHECKWSFAIL')){ echo " TESTING $conn ";flush();}
+	$saved = $ADODB_EXTENSION;
+	$db = ADONewConnection($conn);
+	$ADODB_EXTENSION = $saved;
+	if (headers_sent()) {
+		print "<p><b>White space detected in adodb-$conn.inc.php or include file...</b></p>";
+		//die();
+	}
+}
+
+function do_strtolower(&$arr)
+{
+	foreach($arr as $k => $v) {
+		if (is_object($v)) $arr[$k] = adodb_pr($v,true);
+		else $arr[$k] = strtolower($v);
+	}
+}
+
+
+function CountExecs($db, $sql, $inputarray)
+{
+global $EXECS;  $EXECS++;
+}
+
+function CountCachedExecs($db, $secs2cache, $sql, $inputarray)
+{
+global $CACHED; $CACHED++;
+}
+
+// the table creation code is specific to the database, so we allow the user 
+// to define their own table creation stuff
+
+function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
+{
+GLOBAL $ADODB_vers,$ADODB_CACHE_DIR,$ADODB_FETCH_MODE,$ADODB_COUNTRECS;
+
+	//adodb_pr($db);
+	
+?>	<form method=GET>
+	</p>
+	<table width=100% ><tr><td bgcolor=beige>&nbsp;</td></tr></table>
+	</p>
+<?php  
+	$create =false;
+	/*$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+	$rs = $db->Execute('select lastname,firstname,lastname,id from ADOXYZ');
+	$arr = $rs->GetAssoc();
+	echo "<pre>";print_r($arr);
+	die();*/
+	
+	if (!$db) die("testdb: database not inited");
+	GLOBAL $EXECS, $CACHED;
+	
+	$EXECS = 0;
+	$CACHED = 0;
+	//$db->Execute("drop table adodb_logsql");
+	if ((rand()%3) == 0) @$db->Execute("delete from adodb_logsql");
+	$db->debug=1;
+	
+	$db->fnExecute = 'CountExecs';
+	$db->fnCacheExecute = 'CountCachedExecs';
+	
+	if (empty($_GET['nolog'])) {
+		echo "<h3>SQL Logging enabled</h3>";
+		$db->LogSQL();/*
+		$sql =
+"SELECT t1.sid, t1.sid, t1.title, t1.hometext, t1.notes, t1.aid, t1.informant, 
+t2.url, t2.email, t1.catid, t3.title, t1.topic, t4.topicname, t4.topicimage, 
+t4.topictext, t1.score, t1.ratings, t1.counter, t1.comments, t1.acomm 
+FROM `nuke_stories` `t1`, `nuke_authors` `t2`, `nuke_stories_cat` `t3`, `nuke_topics` `t4` 
+	WHERE ((t2.aid=t1.aid) AND (t3.catid=t1.catid) AND (t4.topicid=t1.topic) 
+	AND ((t1.alanguage='german') OR (t1.alanguage='')) AND (t1.ihome='0')) 
+	ORDER BY t1.time DESC";
+		$db->SelectLimit($sql);
+		echo $db->ErrorMsg();*/
+	}
+	$ADODB_CACHE_DIR = dirname(TempNam('/tmp','testadodb'));
+	$db->debug = false;
+	//print $db->UnixTimeStamp('2003-7-22 23:00:00');
+	
+	$phpv = phpversion();
+	if (defined('ADODB_EXTENSION')) $ext = ' &nbsp; Extension '.ADODB_EXTENSION.' installed';
+	else $ext = '';
+	print "<h3>ADODB Version: $ADODB_vers Host: <i>$db->host</i> &nbsp; Database: <i>$db->database</i> &nbsp; PHP: $phpv $ext</h3>";
+	
+	flush();
+
+	if (function_exists('date_default_timezone_set')) date_default_timezone_set('Asia/Kuala_Lumpur');
+	
+	$arr = $db->ServerInfo();
+	print_r($arr);
+	echo E_ALL,' ',E_STRICT, "<br>";
+	$e = error_reporting(E_ALL | E_STRICT);
+	echo error_reporting(),'<p>';
+	flush();
+	#$db->debug=1;
+	$tt  = $db->Time(); 
+	if ($tt == 0) echo '<br><b>$db->Time failed</b>';
+	else echo "<br>db->Time: ".date('d-m-Y H:i:s',$tt);
+	echo '<br>';
+	
+	echo "Date=",$db->UserDate('2002-04-07'),'<br>';
+	print "<i>date1</i> (1969-02-20) = ".$db->DBDate('1969-2-20');
+	print "<br><i>date1</i> (1999-02-20) = ".$db->DBDate('1999-2-20');
+	print "<br><i>date1.1</i> 1999 = ".$db->DBDate("'1999'");
+	print "<br><i>date2</i> (1970-1-2) = ".$db->DBDate(24*3600)."<p>";
+	print "<i>ts1</i> (1999-02-20 13:40:50) = ".$db->DBTimeStamp('1999-2-20 1:40:50 pm');
+	print "<br><i>ts1.1</i> (1999-02-20 13:40:00) = ".$db->DBTimeStamp('1999-2-20 13:40');
+	print "<br><i>ts2</i> (1999-02-20) = ".$db->DBTimeStamp('1999-2-20');
+	print "<br><i>ts3</i> (1970-1-2 +/- timezone) = ".$db->DBTimeStamp(24*3600);
+	print "<br> Fractional TS (1999-2-20 13:40:50.91): ".$db->DBTimeStamp($db->UnixTimeStamp('1999-2-20 13:40:50.91+1'));
+	 $dd = $db->UnixDate('1999-02-20');
+	print "<br>unixdate</i> 1999-02-20 = ".date('Y-m-d',$dd)."<p>";
+	print "<br><i>ts4</i> =".($db->UnixTimeStamp("19700101000101")+8*3600);
+	print "<br><i>ts5</i> =".$db->DBTimeStamp($db->UnixTimeStamp("20040110092123"));
+	print "<br><i>ts6</i> =".$db->UserTimeStamp("20040110092123");
+	print "<br><i>ts7</i> =".$db->DBTimeStamp("20040110092123");
+	flush();
+	// mssql too slow in failing bad connection
+	if (false && $db->databaseType != 'mssql') {
+		print "<p>Testing bad connection. Ignore following error msgs:<br>";
+		$db2 = ADONewConnection();
+		$rez = $db2->Connect("bad connection");
+		$err = $db2->ErrorMsg();
+		print "<i>Error='$err'</i></p>";
+		if ($rez) print "<b>Cannot check if connection failed.</b> The Connect() function returned true.</p>";
+	}
+	#error_reporting($e);
+	flush();
+
+	//$ADODB_COUNTRECS=false;
+	$rs=$db->Execute('select * from ADOXYZ order by id');
+	if($rs === false) $create = true;
+	else $rs->Close();
+	
+	//if ($db->databaseType !='vfp') $db->Execute("drop table ADOXYZ");
+	
+	if ($create) {
+		if (false && $db->databaseType == 'ibase') {
+			print "<b>Please create the following table for testing:</b></p>$createtab</p>";
+			return;
+		} else {
+			$db->debug = 99;
+		#	$e = error_reporting(E_ALL-E_WARNING);
+			$db->Execute($createtab);
+		#	error_reporting($e);
+		}
+	}
+	#error_reporting(E_ALL);
+	echo "<p>Testing Metatypes</p>";
+	$t = $db->MetaType('varchar');
+	if ($t != 'C') Err("Bad Metatype for varchar");
+	
+	$rs = $db->Execute("delete from ADOXYZ"); // some ODBC drivers will fail the drop so we delete
+	if ($rs) {
+		if(! $rs->EOF) print "<b>Error: </b>RecordSet returned by Execute('delete...') should show EOF</p>";
+		$rs->Close();
+	} else print "err=".$db->ErrorMsg();
+
+	print "<p>Test select on empty table, FetchField when EOF, and GetInsertSQL</p>";
+	$rs = $db->Execute("select id,firstname from ADOXYZ where id=9999");
+	if ($rs && !$rs->EOF) print "<b>Error: </b>RecordSet returned by Execute(select...') on empty table should show EOF</p>";
+	if ($rs->EOF && (($ox = $rs->FetchField(0)) && !empty($ox->name))) {
+		$record['id'] = 99;
+		$record['firstname'] = 'John';
+		$sql =  $db->GetInsertSQL($rs, $record);
+		if (strtoupper($sql) != strtoupper("INSERT INTO ADOXYZ ( id, firstname ) VALUES ( 99, 'John' )")) Err("GetInsertSQL does not work on empty table: $sql");
+	} else {
+		Err("FetchField does not work on empty recordset, meaning GetInsertSQL will fail...");
+	}
+	if ($rs) $rs->Close();
+	flush();
+	//$db->debug=true;	
+	print "<p>Testing Commit: ";
+	$time = $db->DBDate(time());
+	if (!$db->BeginTrans()) {
+		print '<b>Transactions not supported</b></p>';
+		if ($db->hasTransactions) Err("hasTransactions should be false");
+	} else { /* COMMIT */
+		if (!$db->hasTransactions) Err("hasTransactions should be true");
+		if ($db->transCnt != 1) Err("Invalid transCnt = $db->transCnt (should be 1)");
+		$rs = $db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (99,'Should Not','Exist (Commit)',$time)");
+		if ($rs && $db->CommitTrans()) {
+			$rs->Close();
+			$rs = $db->Execute("select * from ADOXYZ where id=99");
+			if ($rs === false || $rs->EOF) {
+				print '<b>Data not saved</b></p>';
+				$rs = $db->Execute("select * from ADOXYZ where id=99");
+				print_r($rs);
+				die();
+			} else print 'OK</p>';
+			if ($rs) $rs->Close();
+		} else {
+			if (!$rs) {
+				print "<b>Insert failed</b></p>";
+				$db->RollbackTrans();
+			} else print "<b>Commit failed</b></p>";
+		}
+		if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)");
+		
+		/* ROLLBACK */	
+		if (!$db->BeginTrans()) print "<p><b>Error in BeginTrans</b>()</p>";
+		print "<p>Testing Rollback: ";
+		$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values (100,'Should Not','Exist (Rollback)',$time)");
+		if ($db->RollbackTrans()) {
+			$rs = $db->Execute("select * from ADOXYZ where id=100");
+			if ($rs && !$rs->EOF) print '<b>Fail: Data should rollback</b></p>';
+			else print 'OK</p>';
+			if ($rs) $rs->Close();
+		} else
+			print "<b>Commit failed</b></p>";
+			
+		$rs = $db->Execute('delete from ADOXYZ where id>50');
+		if ($rs) $rs->Close();
+		
+		if ($db->transCnt != 0) Err("Invalid transCnt = $db->transCnt (should be 0)");
+	}
+	
+	if (1) {
+		print "<p>Testing MetaDatabases()</p>";
+		print_r( $db->MetaDatabases());
+
+		print "<p>Testing MetaTables() and MetaColumns()</p>";
+		$a = $db->MetaTables();
+		if ($a===false) print "<b>MetaTables not supported</b></p>";
+		else {
+			print "Array of tables and views: "; 
+			foreach($a as $v) print " ($v) ";
+			print '</p>';
+		}
+		
+		$a = $db->MetaTables('VIEW');
+		if ($a===false) print "<b>MetaTables not supported (views)</b></p>";
+		else {
+			print "Array of views: "; 
+			foreach($a as $v) print " ($v) ";
+			print '</p>';
+		}
+		
+		$a = $db->MetaTables(false,false,'aDo%');
+		if ($a===false) print "<b>MetaTables not supported (mask)</b></p>";
+		else {
+			print "Array of ado%: "; 
+			foreach($a as $v) print " ($v) ";
+			print '</p>';
+		}
+		
+		$a = $db->MetaTables('TABLE');
+		if ($a===false) print "<b>MetaTables not supported</b></p>";
+		else {
+			print "Array of tables: "; 
+			foreach($a as $v) print " ($v) ";
+			print '</p>';
+		}
+		
+		$db->debug=0;
+		$rez = $db->MetaColumns("NOSUCHTABLEHERE");
+		if ($rez !== false) {
+			Err("MetaColumns error handling failed");
+			var_dump($rez);
+		}
+		$db->debug=1;
+		$a = $db->MetaColumns('ADOXYZ');
+		if ($a===false) print "<b>MetaColumns not supported</b></p>";
+		else {
+			print "<p>Columns of ADOXYZ: <font size=1><br>";
+			foreach($a as $v) {print_r($v); echo "<br>";}
+			echo "</font>";
+		}
+		
+		print "<p>Testing MetaIndexes</p>";
+		
+		$a = $db->MetaIndexes(('ADOXYZ'),true);
+		if ($a===false) print "<b>MetaIndexes not supported</b></p>";
+		else {
+			print "<p>Indexes of ADOXYZ: <font size=1><br>";
+			adodb_pr($a);
+			echo "</font>";
+		}
+		print "<p>Testing MetaPrimaryKeys</p>";
+		$a = $db->MetaPrimaryKeys('ADOXYZ');
+		var_dump($a);
+	}
+	$rs = $db->Execute('delete from ADOXYZ');
+	if ($rs) $rs->Close();
+	
+	$db->debug = false;
+	
+	
+	switch ($db->databaseType) {
+	case 'vfp':
+		
+		if (0) {
+			// memo test
+			$rs = $db->Execute("select data from memo");
+			rs2html($rs);
+		}
+		break;
+
+	case 'postgres7':
+	case 'postgres64':
+	case 'postgres':
+	case 'ibase':
+		print "<p>Encode=".$db->BlobEncode("abc\0d\"'
+ef")."</p>";//'
+
+		print "<p>Testing Foreign Keys</p>";
+		$arr = $db->MetaForeignKeys('ADOXYZ',false,true);
+		print_r($arr);
+		if (!$arr) Err("No MetaForeignKeys");
+		break;
+	
+	case 'odbc_mssql':
+	case 'mssqlpo':
+		print "<p>Testing Foreign Keys</p>";
+		$arr = $db->MetaForeignKeys('Orders',false,true);
+		print_r($arr);
+		if (!$arr) Err("Bad MetaForeignKeys");
+		if ($db->databaseType == 'odbc_mssql') break;
+	
+	case 'mssql': 
+	
+		
+/*
+ASSUME Northwind available...
+
+CREATE PROCEDURE SalesByCategory
+	@CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998'
+AS
+IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998' 
+BEGIN
+	SELECT @OrdYear = '1998'
+END
+
+SELECT ProductName,
+	TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0)
+FROM [Order Details] OD, Orders O, Products P, Categories C
+WHERE OD.OrderID = O.OrderID 
+	AND OD.ProductID = P.ProductID 
+	AND P.CategoryID = C.CategoryID
+	AND C.CategoryName = @CategoryName
+	AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear
+GROUP BY ProductName
+ORDER BY ProductName
+GO
+
+
+CREATE PROCEDURE ADODBTestSP
+@a nvarchar(25)
+AS
+SELECT GETDATE() AS T, @a AS A
+GO
+*/
+		print "<h4>Testing Stored Procedures for mssql</h4>";
+		$saved = $db->debug;
+		$db->debug=true;
+		$assoc = $ADODB_FETCH_MODE;
+		$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+		$cmd = $db->PrepareSP('ADODBTestSP');
+		$ss = "You should see me in the output.";
+		$db->InParameter($cmd,$ss,'a');
+		$rs = $db->Execute($cmd);
+		#var_dump($rs->fields);
+		echo $rs->fields['T']." --- ".$rs->fields['A']."---<br>";
+
+		$cat = 'Dairy Products';
+		$yr = '1998';
+		
+		$stmt = $db->PrepareSP('SalesByCategory');
+		$db->InParameter($stmt,$cat,'CategoryName');
+		$db->InParameter($stmt,$yr,'OrdYear');
+		$rs = $db->Execute($stmt);
+		rs2html($rs);
+		
+		$cat = 'Grains/Cereals';
+		$yr = 1998;
+		
+		$stmt = $db->PrepareSP('SalesByCategory');
+		$db->InParameter($stmt,$cat,'CategoryName');
+		$db->InParameter($stmt,$yr,'OrdYear');
+		$rs = $db->Execute($stmt);
+		rs2html($rs);
+		
+		$ADODB_FETCH_MODE = $assoc;
+		
+		/*
+		Test out params - works in PHP 4.2.3 and 4.3.3 and 4.3.8 but not 4.3.0:
+		
+			CREATE PROCEDURE at_date_interval 
+				@days INTEGER, 
+				@start VARCHAR(20) OUT, 
+				@end VARCHAR(20) OUT 	
+			AS 
+			BEGIN 
+				set @start = CONVERT(VARCHAR(20), getdate(), 101) 
+				set @end =CONVERT(VARCHAR(20), dateadd(day, @days, getdate()), 101 ) 
+			END
+			GO
+		*/
+		$db->debug=1;
+		$stmt = $db->PrepareSP('at_date_interval');
+		$days = 10;
+		$begin_date = '';
+		$end_date = '';
+		$db->InParameter($stmt,$days,'days', 4, SQLINT4); 
+		$db->OutParameter($stmt,$begin_date,'start', 20, SQLVARCHAR ); 
+		$db->OutParameter($stmt,$end_date,'end', 20, SQLVARCHAR ); 
+		$db->Execute($stmt);
+		if (empty($begin_date) or empty($end_date) or $begin_date == $end_date) {
+			Err("MSSQL SP Test for OUT Failed");
+			print "begin=$begin_date end=$end_date<p>";
+		} else print "(Today +10days) = (begin=$begin_date end=$end_date)<p>";
+	
+		$db->debug = $saved;
+		break;
+	case 'oci8': 
+	case 'oci8po':
+		
+		if (0) {
+		$t = getmicrotime();
+		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+		$arr = $db->GetArray('select * from abalone_tree');
+		$arr = $db->GetArray('select * from abalone_tree');
+		$arr = $db->GetArray('select * from abalone_tree');
+		echo "<p>t = ",getmicrotime() - $t,"</p>";
+		die();
+		}
+		
+		# cleanup
+		$db->Execute("delete from photos where id=99 or id=1");
+		$db->Execute("insert into photos (id) values(1)");
+		$db->Execute("update photos set photo=null,descclob=null where id=1");
+		
+		$saved = $db->debug;
+		$db->debug=true;
+		
+		
+
+		/*
+		CREATE TABLE PHOTOS
+		(
+		  ID           NUMBER(16),
+		  PHOTO        BLOB,
+		  DESCRIPTION  VARCHAR2(4000 BYTE),
+		  DESCCLOB     CLOB
+		);
+		
+		INSERT INTO PHOTOS (ID) VALUES(1);
+		*/
+		$s = '';
+		for ($i = 0; $i <= 500; $i++) {
+			$s .= '1234567890';
+		}
+		
+		$sql = "INSERT INTO photos ( ID, photo) ".
+			"VALUES ( :id, empty_blob() )".
+			" RETURNING photo INTO :xx";
+
+		
+		$blob_data = $s;
+		$id = 99;
+		
+ 		$stmt = $db->PrepareSP($sql);
+		$db->InParameter($stmt, $id, 'id');
+		$blob = $db->InParameter($stmt, $s, 'xx',-1, OCI_B_BLOB);
+		$db->StartTrans();
+		$result = $db->Execute($stmt);
+		$db->CompleteTrans();
+		
+		$s2= $db->GetOne("select photo from photos where id=99");
+		echo "<br>---$s2";
+		if ($s !== $s2) Err("insert blob does not match");
+
+		print "<h4>Testing Blob: size=".strlen($s)."</h4>";
+		$ok = $db->Updateblob('photos','photo',$s,'id=1');
+		if (!$ok) Err("Blob failed 1");
+		else {
+			$s2= $db->GetOne("select photo from photos where id=1");
+			if ($s !== $s2) Err("updateblob does not match");
+		}
+		
+		print "<h4>Testing Clob: size=".strlen($s)."</h4>";
+		$ok = $db->UpdateClob('photos','descclob',$s,'id=1');
+		if (!$ok) Err("Clob failed 1");
+		else {
+			$s2= $db->GetOne("select descclob from photos where id=1");
+			if ($s !== $s2) Err("updateclob does not match");
+		}
+		
+		
+		$s = '';
+		$s2 = '';
+		print "<h4>Testing Foreign Keys</h4>";
+		$arr = $db->MetaForeignKeys('emp','scott');
+		print_r($arr);
+		if (!$arr) Err("Bad MetaForeignKeys");
+/*
+-- TEST PACKAGE
+-- "Set scan off" turns off substitution variables. 
+Set scan off; 
+
+CREATE OR REPLACE PACKAGE Adodb AS
+TYPE TabType IS REF CURSOR RETURN TAB%ROWTYPE;
+PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR);
+PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) ;
+PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR);
+PROCEDURE data_in(input IN VARCHAR);
+PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER);
+END Adodb;
+/
+
+
+CREATE OR REPLACE PACKAGE BODY Adodb AS
+PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames IN VARCHAR) IS
+	BEGIN
+		OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
+	END open_tab;
+
+	PROCEDURE open_tab2 (tabcursor IN OUT TabType,tablenames IN OUT VARCHAR) IS
+	BEGIN
+		OPEN tabcursor FOR SELECT * FROM TAB WHERE tname LIKE tablenames;
+		tablenames := 'TEST';
+	END open_tab2;
+
+PROCEDURE data_out(input IN VARCHAR, output OUT VARCHAR) IS
+	BEGIN
+		output := 'Cinta Hati '||input;
+	END;
+	
+PROCEDURE data_in(input IN VARCHAR) IS
+	ignore varchar(1000);
+	BEGIN
+		ignore := input;
+	END;
+
+PROCEDURE myproc (p1 IN NUMBER, p2 OUT NUMBER) AS
+BEGIN
+p2 := p1;
+END;
+END Adodb;
+/
+
+*/
+
+		print "<h4>Testing Cursor Variables</h4>";
+		$rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:zz,'A%'); END;",'zz');
+	
+		if ($rs && !$rs->EOF) {
+			$v = $db->GetOne("SELECT count(*) FROM tab where tname like 'A%'");
+			if ($v == $rs->RecordCount()) print "Test 1 RowCount: OK<p>";
+			else Err("Test 1 RowCount ".$rs->RecordCount().", actual = $v");
+		} else {
+			print "<b>Error in using Cursor Variables 1</b><p>";
+		}
+		$rs->Close();
+		
+		print "<h4>Testing Stored Procedures for oci8</h4>";
+		
+		$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;");
+		$a1 = 'Malaysia';
+		//$a2 = ''; # a2 doesn't even need to be defined!
+		$db->InParameter($stmt,$a1,'a1');
+		$db->OutParameter($stmt,$a2,'a2');
+		$rs = $db->Execute($stmt);
+		if ($rs) {
+			if ($a2 !== 'Cinta Hati Malaysia') print "<b>Stored Procedure Error: a2 = $a2</b><p>";
+			else echo  "OK: a2=$a2<p>";
+		} else {
+			print "<b>Error in using Stored Procedure IN/Out Variables</b><p>";
+		}
+		
+		$tname = 'A%';
+		
+		$stmt = $db->PrepareSP('select * from tab where tname like :tablename');
+		$db->Parameter($stmt,$tname,'tablename');
+		$rs = $db->Execute($stmt);
+		rs2html($rs);
+		
+		$stmt = $db->PrepareSP("begin adodb.data_in(:a1); end;");
+		$db->InParameter($stmt,$a1,'a1');
+		$db->Execute($stmt);
+		
+		$db->debug = $saved;
+		break;
+	
+	default:
+		break;
+	}
+	$arr = array(
+		array(1,'Caroline','Miranda'),
+		array(2,'John','Lim'),
+		array(3,'Wai Hun','See')
+	);
+	//$db->debug=1;
+	print "<p>Testing Bulk Insert of 3 rows</p>";
+
+	$sql = "insert into ADOXYZ (id,firstname,lastname) values (".$db->Param('0').",".$db->Param('1').",".$db->Param('2').")";
+	$db->StartTrans();
+	$db->Execute($sql,$arr);
+	$db->CompleteTrans();
+	$rs = $db->Execute('select * from ADOXYZ order by id');
+	if (!$rs || $rs->RecordCount() != 3) Err("Bad bulk insert");
+	
+	rs2html($rs);
+	
+	$db->Execute('delete from ADOXYZ');
+		
+	print "<p>Inserting 50 rows</p>";
+
+	for ($i = 0; $i < 5; $i++) {	
+
+	$time = $db->DBDate(time());
+	if (empty($_GET['hide'])) $db->debug = true;
+	switch($db->databaseType){
+	case 'mssqlpo':
+	case 'mssql':
+		$sqlt = "CREATE TABLE mytable (
+  row1 INT  IDENTITY(1,1) NOT NULL,
+  row2 varchar(16),
+  PRIMARY KEY  (row1))";
+  		//$db->debug=1;
+  		if (!$db->Execute("delete from mytable")) 
+			$db->Execute($sqlt);
+			
+		$ok = $db->Execute("insert into mytable (row2) values ('test')");
+		$ins_id=$db->Insert_ID();
+		echo "Insert ID=";var_dump($ins_id);
+		if ($ins_id == 0) Err("Bad Insert_ID()");
+		$ins_id2 = $db->GetOne("select row1 from mytable");
+		if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2");
+		
+		$arr = array(0=>'Caroline',1=>'Miranda');
+		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)";
+		break;
+	case 'mysqli':
+	case 'mysqlt':
+	case 'mysql':
+		$sqlt = "CREATE TABLE `mytable` (
+  `row1` int(11) NOT NULL auto_increment,
+  `row2` varchar(16) NOT NULL default '',
+  PRIMARY KEY  (`row1`),
+  KEY `myindex` (`row1`,`row2`)
+) ";
+		if (!$db->Execute("delete from mytable")) 
+			$db->Execute($sqlt);
+			
+		$ok = $db->Execute("insert into mytable (row2) values ('test')");
+		$ins_id=$db->Insert_ID();
+		echo "Insert ID=";var_dump($ins_id);
+		if ($ins_id == 0) Err("Bad Insert_ID()");
+		$ins_id2 = $db->GetOne("select row1 from mytable");
+		if ($ins_id != $ins_id2) Err("Bad Insert_ID() 2");
+		
+	default:
+		$arr = array(0=>'Caroline',1=>'Miranda');
+		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,?,?,$time)";
+		break;
+	
+	case 'oci8':
+	case 'oci805':
+		$arr = array('first'=>'Caroline','last'=>'Miranda');
+		$amt = rand() % 100;
+		$sql = "insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+0,:first,:last,$time)";		
+		break;
+	}
+	if ($i & 1) {
+		$sql = $db->Prepare($sql);
+	}
+	$rs = $db->Execute($sql,$arr);
+		
+	if ($rs === false) Err( 'Error inserting with parameters');
+	else $rs->Close();
+	$db->debug = false;
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+1,'John','Lim',$time)");
+	/*$ins_id=$db->Insert_ID();
+	echo "Insert ID=";var_dump($ins_id);*/
+	if ($db->databaseType == 'mysql') if ($ins_id == 0) Err('Bad Insert_ID');
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+2,'Mary','Lamb',$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+3,'George','Washington',$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+4,'Mr. Alan','Tam',$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+5,'Alan',".$db->quote("Turing'ton").",$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created)values ($i*10+6,'Serena','Williams',$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+7,'Yat Sun','Sun',$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+8,'Wai Hun','See',$time )");
+	$db->Execute("insert into ADOXYZ (id,firstname,lastname,created) values ($i*10+9,'Steven','Oey',$time )");
+	} // for
+	if (1) {
+	$db->debug=1;
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$cnt = $db->GetOne("select count(*) from ADOXYZ");
+	$rs = $db->Execute('update ADOXYZ set id=id+1');	
+	if (!is_object($rs)) {
+		print_r($rs);
+		err("Update should return object");
+	} 
+	if (!$rs) err("Update generated error");
+	
+	$nrows = $db->Affected_Rows();   
+	if ($nrows === false) print "<p><b>Affected_Rows() not supported</b></p>";
+	else if ($nrows != $cnt)  print "<p><b>Affected_Rows() Error: $nrows returned (should be 50) </b></p>";
+	else print "<p>Affected_Rows() passed</p>";
+	}
+	
+	if ($db->dataProvider == 'oci8')  $array = array('zid'=>1,'zdate'=>date('Y-m-d',time()));
+	else $array=array(1,date('Y-m-d',time()));
+	
+	
+	#$array = array(1,date('Y-m-d',time()));
+	$id = $db->GetOne("select id from ADOXYZ 
+		where id=".$db->Param('zid')." and created>=".$db->Param('ZDATE')."",
+		$array);
+	if ($id != 1) Err("Bad bind; id=$id");
+	else echo "<br>Bind date/integer 1 passed";
+	
+	$array =array(1,$db->BindDate(time()));
+	$id = $db->GetOne("select id from ADOXYZ 
+		where id=".$db->Param('0')." and created>=".$db->Param('1')."",
+		$array);
+	if ($id != 1) Err("Bad bind; id=$id");
+	else echo "<br>Bind date/integer 2 passed";
+	
+	$db->debug = false;
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+ //////////////////////////////////////////////////////////////////////////////////////////
+	
+	$rs = $db->Execute("select * from ADOXYZ where firstname = 'not known'");
+	if (!$rs ||  !$rs->EOF) print "<p><b>Error on empty recordset</b></p>";
+	else if ($rs->RecordCount() != 0) {
+		print "<p><b>Error on RecordCount. Should be 0. Was ".$rs->RecordCount()."</b></p>"; 
+		print_r($rs->fields);
+	}
+	if ($db->databaseType !== 'odbc') {
+		$rs = $db->Execute("select id,firstname,lastname,created,".$db->random." from ADOXYZ order by id");
+		if ($rs) {
+			if ($rs->RecordCount() != 50) {
+				print "<p><b>RecordCount returns ".$rs->RecordCount().", should be 50</b></p>";
+				adodb_pr($rs->GetArray());
+				$poc = $rs->PO_RecordCount('ADOXYZ');
+				if ($poc == 50) print "<p> &nbsp; &nbsp; PO_RecordCount passed</p>";
+				else print "<p><b>PO_RecordCount returns wrong value: $poc</b></p>";
+			} else print "<p>RecordCount() passed</p>";
+			if (isset($rs->fields['firstname'])) print '<p>The fields columns can be indexed by column name.</p>';
+			else {
+				Err( '<p>The fields columns <i>cannot</i> be indexed by column name.</p>');
+				print_r($rs->fields);
+			}
+			if (empty($_GET['hide'])) rs2html($rs);
+		}
+		else print "<p><b>Error in Execute of SELECT with random</b></p>";
+	}
+	$val = $db->GetOne("select count(*) from ADOXYZ");
+	 if ($val == 50) print "<p>GetOne returns ok</p>";
+	 else print "<p><b>Fail: GetOne returns $val</b></p>";
+
+	 echo "<b>GetRow Test</b>";
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	$val1 = $db->GetRow("select count(*) from ADOXYZ");
+	$val2 = $db->GetRow("select count(*) from ADOXYZ");
+	 if ($val1[0] == 50 and sizeof($val1) == 1 and $val2[0] == 50 and sizeof($val2) == 1) print "<p>GetRow returns ok</p>";
+	 else {
+	 	print_r($val);
+	 	print "<p><b>Fail: GetRow returns {$val2[0]}</b></p>";
+	}
+
+	print "<p>FetchObject/FetchNextObject Test</p>";
+	$rs = $db->Execute('select * from ADOXYZ');
+	if ($rs) {
+		if (empty($rs->connection)) print "<b>Connection object missing from recordset</b></br>";
+		
+		while ($o = $rs->FetchNextObject()) { // calls FetchObject internally
+			if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) {
+				print_r($o);
+				print "<p><b>Firstname is not string</b></p>";
+				break;
+			}
+		}
+	} else {
+		print "<p><b>Failed rs</b></p>";
+		die("<p>ADOXYZ table cannot be read - die()");
+	}
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	print "<p>FetchObject/FetchNextObject Test 2</p>";
+	#$db->debug=99;
+	$rs = $db->Execute('select * from ADOXYZ');
+	if (empty($rs->connection)) print "<b>Connection object missing from recordset</b></br>";
+	print_r($rs->fields);
+	while ($o = $rs->FetchNextObject()) { // calls FetchObject internally
+		if (!is_string($o->FIRSTNAME) || !is_string($o->LASTNAME)) {
+			print_r($o);
+			print "<p><b>Firstname is not string</b></p>";
+			break;
+		}
+	}
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+	$savefetch = $ADODB_FETCH_MODE;
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	
+	print "<p>CacheSelectLimit  Test...</p>";
+	$db->debug=1;
+	$rs = $db->CacheSelectLimit('select  id, firstname from  ADOXYZ order by id',2);
+	
+	if ($rs && !$rs->EOF) {
+		if (isset($rs->fields[0])) {
+			Err("ASSOC has numeric fields");
+			print_r($rs->fields);
+		}
+		if ($rs->fields['id'] != 1)  {Err("Error"); print_r($rs->fields);};
+		if (trim($rs->fields['firstname']) != 'Caroline')  {print Err("Error 2"); print_r($rs->fields);};
+		
+		$rs->MoveNext();
+		if ($rs->fields['id'] != 2)  {Err("Error 3"); print_r($rs->fields);};
+		$rs->MoveNext();
+		if (!$rs->EOF) {
+			Err("Error EOF");
+			print_r($rs);
+		}
+	}
+	
+	print "<p>FETCH_MODE = ASSOC: Should get 1, Caroline</p>";
+	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',2);
+	if ($rs && !$rs->EOF) {
+		if (ADODB_ASSOC_CASE == 2) {
+			$id = 'ID';
+			$fname = 'FIRSTNAME';
+		}else {
+			$id = 'id';
+			$fname = 'firstname';
+		}
+		if ($rs->fields[$id] != 1)  {Err("Error 1"); print_r($rs->fields);};
+		if (trim($rs->fields[$fname]) != 'Caroline')  {Err("Error 2"); print_r($rs->fields);};
+		$rs->MoveNext();
+		if ($rs->fields[$id] != 2)  {Err("Error 3"); print_r($rs->fields);};
+		$rs->MoveNext();
+		if (!$rs->EOF) Err("Error EOF");
+		else if (is_array($rs->fields) || $rs->fields) {
+			Err("Error: ## fields should be set to false on EOF");
+			print_r($rs->fields);
+		}
+	}
+	
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	print "<p>FETCH_MODE = NUM: Should get 1, Caroline</p>";
+	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1);
+	if ($rs && !$rs->EOF) {
+		if (isset($rs->fields['id'])) Err("FETCH_NUM has ASSOC fields");
+		if ($rs->fields[0] != 1)  {Err("Error 1"); print_r($rs->fields);};
+		if (trim($rs->fields[1]) != 'Caroline')  {Err("Error 2");print_r($rs->fields);};
+		$rs->MoveNext();
+		if (!$rs->EOF) Err("Error EOF");
+
+	}
+	$ADODB_FETCH_MODE = $savefetch;
+	
+	$db->debug = false;
+	print "<p>GetRowAssoc Upper: Should get 1, Caroline</p>";
+	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1);
+	if ($rs && !$rs->EOF) {
+		$arr = $rs->GetRowAssoc();
+		if ($arr['ID'] != 1) {Err("Error 1");print_r($arr);};
+		if (trim($arr['FIRSTNAME']) != 'Caroline') {Err("Error 2"); print_r($arr);};
+		$rs->MoveNext();
+		if (!$rs->EOF) Err("Error EOF");
+
+	}
+	print "<p>GetRowAssoc Lower: Should get 1, Caroline</p>";
+	$rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1);
+	if ($rs && !$rs->EOF) {
+		$arr = $rs->GetRowAssoc(false);
+		if ($arr['id'] != 1) {Err("Error 1"); print_r($arr);};
+		if (trim($arr['firstname']) != 'Caroline') {Err("Error 2"); print_r($arr);};
+
+	}
+	
+	print "<p>GetCol Test</p>";
+	$col = $db->GetCol('select distinct firstname from ADOXYZ order by 1');
+	if (!is_array($col)) Err("Col size is wrong");
+	if (trim($col[0]) != 'Alan' or trim($col[9]) != 'Yat Sun') Err("Col elements wrong");
+
+	$db->debug = true;
+	
+		
+	echo "<p>Date Update Test</p>";
+	$zdate = date('Y-m-d',time()+3600*24);
+	$zdate = $db->DBDate($zdate);
+	$db->Execute("update ADOXYZ set created=$zdate where id=1");
+	$row = $db->GetRow("select created,firstname from ADOXYZ where id=1");
+	print_r($row); echo "<br>";
+	
+	
+	
+	print "<p>SelectLimit Distinct Test 1: Should see Caroline, John and Mary</p>";
+	$rs = $db->SelectLimit('select distinct * from ADOXYZ order by id',3);
+	
+	
+	if ($rs && !$rs->EOF) {
+		if (trim($rs->fields[1]) != 'Caroline') Err("Error 1 (exp Caroline), ".$rs->fields[1]);
+		$rs->MoveNext();
+		
+		if (trim($rs->fields[1]) != 'John') Err("Error 2 (exp John), ".$rs->fields[1]);
+		$rs->MoveNext();
+		if (trim($rs->fields[1]) != 'Mary') Err("Error 3 (exp Mary),".$rs->fields[1]);
+		$rs->MoveNext();
+		if (! $rs->EOF) Err("Error EOF");
+		//rs2html($rs);
+	} else Err("Failed SelectLimit Test 1");
+	
+	print "<p>SelectLimit Test 2: Should see Mary, George and Mr. Alan</p>";
+	$rs = $db->SelectLimit('select * from ADOXYZ order by id',3,2);
+	if ($rs && !$rs->EOF) {
+		if (trim($rs->fields[1]) != 'Mary') Err("Error 1 - No Mary, instead: ".$rs->fields[1]);
+		$rs->MoveNext();
+		if (trim($rs->fields[1]) != 'George')Err("Error 2 - No George, instead: ".$rs->fields[1]);
+		$rs->MoveNext();
+		if (trim($rs->fields[1]) != 'Mr. Alan') Err("Error 3 - No Mr. Alan, instead: ".$rs->fields[1]);
+		$rs->MoveNext();
+		if (! $rs->EOF) Err("Error EOF");
+	//	rs2html($rs);
+	}
+	 else Err("Failed SelectLimit Test 2 ". ($rs ? 'EOF':'no RS'));
+	
+	print "<p>SelectLimit Test 3: Should see Wai Hun and Steven</p>";
+	$db->debug=1;
+	global $A; $A=1;
+	$rs = $db->SelectLimit('select * from ADOXYZ order by id',-1,48);
+	$A=0;
+	if ($rs && !$rs->EOF) {
+		if (empty($rs->connection)) print "<b>Connection object missing from recordset</b></br>";
+		if (trim($rs->fields[1]) != 'Wai Hun') Err("Error 1 ".$rs->fields[1]);
+		$rs->MoveNext();
+		if (trim($rs->fields[1]) != 'Steven') Err("Error 2 ".$rs->fields[1]);
+		$rs->MoveNext();
+		if (! $rs->EOF) {
+			Err("Error EOF");
+		}
+		//rs2html($rs);
+	}
+	 else Err("Failed SelectLimit Test 3");
+		$db->debug = false;
+	
+	
+	$rs = $db->Execute("select * from ADOXYZ order by id");
+	print "<p>Testing Move()</p>";	
+	if (!$rs)Err( "Failed Move SELECT");
+	else {
+		if (!$rs->Move(2)) {
+			if (!$rs->canSeek) print "<p>$db->databaseType: <b>Move(), MoveFirst() nor MoveLast() not supported.</b></p>";
+			else print '<p><b>RecordSet->canSeek property should be set to false</b></p>';
+		} else {
+			$rs->MoveFirst();
+			if (trim($rs->Fields("firstname")) != 'Caroline') {
+				print "<p><b>$db->databaseType: MoveFirst failed -- probably cannot scroll backwards</b></p>";
+			}
+			else print "MoveFirst() OK<BR>";
+						
+						// Move(3) tests error handling -- MoveFirst should not move cursor
+			$rs->Move(3);
+			if (trim($rs->Fields("firstname")) != 'George') {
+				print '<p>'.$rs->Fields("id")."<b>$db->databaseType: Move(3) failed</b></p>";
+			} else print "Move(3) OK<BR>";
+						
+			$rs->Move(7);
+			if (trim($rs->Fields("firstname")) != 'Yat Sun') {
+				print '<p>'.$rs->Fields("id")."<b>$db->databaseType: Move(7) failed</b></p>";
+				print_r($rs);
+			} else print "Move(7) OK<BR>";
+			if ($rs->EOF) Err("Move(7) is EOF already");
+			$rs->MoveLast();
+			if (trim($rs->Fields("firstname")) != 'Steven'){
+				 print '<p>'.$rs->Fields("id")."<b>$db->databaseType: MoveLast() failed</b></p>";
+				 print_r($rs);
+			}else print "MoveLast() OK<BR>";
+			$rs->MoveNext();
+			if (!$rs->EOF) err("Bad MoveNext");
+			if ($rs->canSeek) {
+				$rs->Move(3);
+				if (trim($rs->Fields("firstname")) != 'George') {
+					print '<p>'.$rs->Fields("id")."<b>$db->databaseType: Move(3) after MoveLast failed</b></p>";
+					
+				} else print "Move(3) after MoveLast() OK<BR>";
+			}
+			
+			print "<p>Empty Move Test";
+			$rs = $db->Execute("select * from ADOXYZ where id > 0 and id < 0");
+			$rs->MoveFirst();
+			if (!$rs->EOF || $rs->fields) Err("Error in empty move first");
+		}
+	}
+	
+	$rs = $db->Execute('select * from ADOXYZ where id = 2');
+	if ($rs->EOF || !is_array($rs->fields)) Err("Error in select");
+	$rs->MoveNext();
+	if (!$rs->EOF) Err("Error in EOF (xx) ");
+ //	$db->debug=true;
+	print "<p>Testing ADODB_FETCH_ASSOC and concat: concat firstname and lastname</p>";
+
+	$save = $ADODB_FETCH_MODE;
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	if ($db->dataProvider == 'postgres') {
+		$sql = "select ".$db->Concat('cast(firstname as varchar)',$db->qstr(' '),'lastname')." as fullname,id,".$db->sysTimeStamp." as d from ADOXYZ";
+		$rs = $db->Execute($sql);
+	} else {
+		$sql = "select distinct ".$db->Concat('firstname',$db->qstr(' '),'lastname')." as fullname,id,".$db->sysTimeStamp." as d from ADOXYZ";
+		$rs = $db->Execute($sql);
+	}
+	if ($rs) {
+		if (empty($_GET['hide'])) rs2html($rs);
+	} else {
+		Err( "Failed Concat:".$sql);
+	}
+	$ADODB_FETCH_MODE = $save;
+	print "<hr />Testing GetArray() ";
+	//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	
+	$rs = $db->Execute("select * from ADOXYZ order by id");
+	if ($rs) {
+		$arr = $rs->GetArray(10);
+		if (sizeof($arr) != 10 || trim($arr[1][1]) != 'John' || trim($arr[1][2]) != 'Lim') print $arr[1][1].' '.$arr[1][2]."<b> &nbsp; ERROR</b><br>";
+		else print " OK<BR>";
+	}
+	
+	$arr = $db->GetArray("select x from ADOXYZ");
+	$e = $db->ErrorMsg(); $e2 = $db->ErrorNo();
+	echo "Testing error handling, should see illegal column 'x' error=<i>$e ($e2) </i><br>";
+	if (!$e || !$e2) Err("Error handling did not work");
+	print "Testing FetchNextObject for 1 object ";
+	$rs = $db->Execute("select distinct lastname,firstname from ADOXYZ where firstname='Caroline'");
+	$fcnt = 0;
+	if ($rs)
+	while ($o = $rs->FetchNextObject()) {
+		$fcnt += 1;	
+	}
+	if ($fcnt == 1) print " OK<BR>";
+	else print "<b>FAILED</b><BR>";
+	
+	$stmt = $db->Prepare("select * from ADOXYZ where id < 3");
+	$rs = $db->Execute($stmt);
+	if (!$rs) Err("Prepare failed");
+	else {
+		$arr = $rs->GetArray();
+		if (!$arr) Err("Prepare failed 2");
+		if (sizeof($arr) != 2) Err("Prepare failed 3");
+	}
+	print "Testing GetAssoc() ";
+	$savecrecs = $ADODB_COUNTRECS;
+	$ADODB_COUNTRECS = false;
+	//$arr = $db->GetArray("select  lastname,firstname from ADOXYZ");
+	//print_r($arr);
+	print "<hr />";
+	$rs = $db->Execute("select distinct lastname,firstname,created from ADOXYZ");
+	
+	if ($rs) {
+		$arr = $rs->GetAssoc();
+		//print_r($arr);
+		if (empty($arr['See']) || trim(reset($arr['See'])) != 'Wai Hun') print $arr['See']." &nbsp; <b>ERROR</b><br>";
+		else print " OK 1";
+	}
+	
+	$arr = $db->GetAssoc("select distinct lastname,firstname from ADOXYZ");
+	if ($arr) {
+		//print_r($arr);
+		if (empty($arr['See']) || trim($arr['See']) != 'Wai Hun') print $arr['See']." &nbsp; <b>ERROR</b><br>";
+		else print " OK 2<BR>";
+	}
+	// Comment this out to test countrecs = false
+	$ADODB_COUNTRECS = $savecrecs;
+	$db->debug=1;
+	$query = $db->Prepare("select count(*) from ADOXYZ");
+	$rs = $db->CacheExecute(10,$query);
+	if (reset($rs->fields) != 50) echo Err("$cnt wrong for Prepare/CacheGetOne");
+	
+	for ($loop=0; $loop < 1; $loop++) {
+	print "Testing GetMenu() and CacheExecute<BR>";
+	$db->debug = true;
+	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
+	
+	
+
+
+	if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu('menu','Steven').'<BR>'; 
+	else print " Fail<BR>";
+	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
+	
+	if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu('menu','Steven',false).'<BR>';
+	else print " Fail<BR>";
+	
+	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
+	
+	if ($rs) print ' 1st line set to **** , Steven selected: '. $rs->GetMenu('menu','Steven','1st:****').'<BR>';
+	else print " Fail<BR>";
+	
+
+	
+	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
+	if ($rs) print ' Multiple, Alan selected: '. $rs->GetMenu('menu','Alan',false,true).'<BR>';
+	else print " Fail<BR>";
+	print '</p><hr />';
+	
+	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
+	if ($rs) {
+		print ' Multiple, Alan and George selected: '. $rs->GetMenu('menu',array('Alan','George'),false,true);
+		if (empty($rs->connection)) print "<b>Connection object missing from recordset</b></br>";
+	} else print " Fail<BR>";
+	print '</p><hr />';
+	
+	print "Testing GetMenu3()<br>";
+	$rs = $db->Execute("select ".$db->Concat('firstname',"'-'",'id').",id, lastname from ADOXYZ order by lastname,id");
+	if ($rs) print "Grouped Menu: ".$rs->GetMenu3('name');
+	else Err('Grouped Menu GetMenu3()');
+	print "<hr />";
+
+	print "Testing GetMenu2() <BR>";
+	$rs = $db->CacheExecute(4,"select distinct firstname,lastname from ADOXYZ");
+	if ($rs) print 'With blanks, Steven selected:'. $rs->GetMenu2('menu',('Oey')).'<BR>'; 
+	else print " Fail<BR>";
+	$rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ");
+	if ($rs) print ' No blanks, Steven selected: '. $rs->GetMenu2('menu',('Oey'),false).'<BR>';
+	else print " Fail<BR>";
+	}
+	echo "<h3>CacheExecute</h3>";
+
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	$rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ");
+	print_r($rs->fields); echo $rs->fetchMode;echo "<br>";
+	echo $rs->Fields('firstname');
+	
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$rs = $db->CacheExecute(6,"select distinct firstname,lastname from ADOXYZ");
+	print_r($rs->fields);echo "<br>";
+	echo $rs->Fields('firstname');
+	$db->debug = false;
+	
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	// phplens
+	
+	$sql = 'select * from ADOXYZ where 0=1';
+	echo "<p>**Testing '$sql' (phplens compat 1)</p>";
+	$rs = $db->Execute($sql);
+	if (!$rs) err( "<b>No recordset returned for '$sql'</b>");
+	if (!$rs->FieldCount()) err( "<b>No fields returned for $sql</b>");
+	if (!$rs->FetchField(1)) err( "<b>FetchField failed for $sql</b>");
+	
+	$sql = 'select * from ADOXYZ order by 1';
+	echo "<p>**Testing '$sql' (phplens compat 2)</p>";
+	$rs = $db->Execute($sql);
+	if (!$rs) err( "<b>No recordset returned for '$sql'<br>".$db->ErrorMsg()."</b>");
+	
+	
+	$sql = 'select * from ADOXYZ order by 1,1';
+	echo "<p>**Testing '$sql' (phplens compat 3)</p>";
+	$rs = $db->Execute($sql);
+	if (!$rs) err( "<b>No recordset returned for '$sql'<br>".$db->ErrorMsg()."</b>");
+	
+	
+	// Move
+	$rs1 = $db->Execute("select id from ADOXYZ where id <= 2 order by 1");
+	$rs2 = $db->Execute("select id from ADOXYZ where id = 3 or id = 4 order by 1");
+
+	if ($rs1) $rs1->MoveLast();
+	if ($rs2) $rs2->MoveLast();
+	
+	if (empty($rs1) || empty($rs2) || $rs1->fields[0] != 2 || $rs2->fields[0] != 4) {
+		$a = $rs1->fields[0];
+		$b = $rs2->fields[0];
+		print "<p><b>Error in multiple recordset test rs1=$a rs2=$b (should be rs1=2 rs2=4)</b></p>";
+	} else
+		print "<p>Testing multiple recordsets OK</p>";
+		
+	
+	echo "<p> GenID test: ";
+	for ($i=1; $i <= 10; $i++) 
+		echo  "($i: ",$val = $db->GenID($db->databaseType.'abcseq6' ,5), ") ";
+	if ($val == 0) Err("GenID not supported");
+	
+	if ($val) {
+		$db->DropSequence('abc_seq2');
+		$db->CreateSequence('abc_seq2');
+		$val = $db->GenID('abc_seq2');
+		$db->DropSequence('abc_seq2');
+		$db->CreateSequence('abc_seq2');
+		$val = $db->GenID('abc_seq2');
+		if ($val != 1) Err("Drop and Create Sequence not supported ($val)");
+	}
+	echo "<p>";
+	
+	if (substr($db->dataProvider,0,3) != 'notused') { // used to crash ado
+		$sql = "select firstnames from ADOXYZ";
+		print "<p>Testing execution of illegal statement: <i>$sql</i></p>";
+		if ($db->Execute($sql) === false) {
+			print "<p>This returns the following ErrorMsg(): <i>".$db->ErrorMsg()."</i> and ErrorNo(): ".$db->ErrorNo().'</p>';
+		} else 
+			print "<p><b>Error in error handling -- Execute() should return false</b></p>";
+	} else 
+		print "<p><b>ADO skipped error handling of bad select statement</b></p>";
+	
+	print "<p>ASSOC TEST 2<br>";
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$rs = $db->query('select * from ADOXYZ order by id');
+	if ($ee = $db->ErrorMsg()) {
+		Err("Error message=$ee");
+	}
+	if ($ee = $db->ErrorNo()) {
+		Err("Error No = $ee");
+	}
+	print_r($rs->fields);
+	for($i=0;$i<$rs->FieldCount();$i++) 
+	{ 
+		$fld=$rs->FetchField($i); 
+		print "<br> Field name is ".$fld->name; 
+		print " ".$rs->Fields($fld->name); 
+	} 
+
+		
+	print "<p>BOTH TEST 2<br>";
+	if ($db->dataProvider == 'ado') {
+		print "<b>ADODB_FETCH_BOTH not supported</b> for dataProvider=".$db->dataProvider."<br>";
+	} else {
+		$ADODB_FETCH_MODE = ADODB_FETCH_BOTH;
+		$rs = $db->query('select * from ADOXYZ order by id');
+		for($i=0;$i<$rs->FieldCount();$i++) 
+		{ 
+			$fld=$rs->FetchField($i); 
+			print "<br> Field name is ".$fld->name; 
+			print " ".$rs->Fields($fld->name); 
+		} 
+	}
+	
+	print "<p>NUM TEST 2<br>";
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	$rs = $db->query('select * from ADOXYZ order by id');
+	for($i=0;$i<$rs->FieldCount();$i++) 
+	{ 
+		$fld=$rs->FetchField($i); 
+		print "<br> Field name is ".$fld->name; 
+		print " ".$rs->Fields($fld->name); 
+	} 
+	
+	print "<p>ASSOC Test of SelectLimit<br>";
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$rs = $db->selectlimit('select * from ADOXYZ order by id',3,4);
+	$cnt = 0;
+	while ($rs && !$rs->EOF) {
+		$cnt += 1;
+		if (!isset($rs->fields['firstname'])) {
+			print "<br><b>ASSOC returned numeric field</b></p>";
+			break;
+		}
+		$rs->MoveNext();
+	}
+	if ($cnt != 3) print "<br><b>Count should be 3, instead it was $cnt</b></p>";
+	
+	
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	if ($db->sysDate) {
+		$saved = $db->debug;
+		$db->debug = 1;
+		$rs = $db->Execute("select {$db->sysDate} from ADOXYZ where id=1");
+		if (ADORecordSet::UnixDate(date('Y-m-d')) != $rs->UnixDate($rs->fields[0])) {
+			print "<p><b>Invalid date {$rs->fields[0]}</b></p>";
+		} else
+			print "<p>Passed \$sysDate test ({$rs->fields[0]})</p>";
+		
+		print_r($rs->FetchField(0));
+		print time();
+		$db->debug=$saved;
+	} else {
+		print "<p><b>\$db->sysDate not defined</b></p>";
+	}
+
+	print "<p>Test CSV</p>";
+	include_once('../toexport.inc.php');
+	//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$rs = $db->SelectLimit('select id,firstname,lastname,created,\'He, he\' he,\'"\' q  from ADOXYZ',10);	
+	
+	print "<pre>";
+	print rs2csv($rs);
+	print "</pre>";
+	
+	$rs = $db->SelectLimit('select id,firstname,lastname,created,\'The	"young man", he said\' from ADOXYZ',10);	
+	
+	if (PHP_VERSION < 5) {
+		print "<pre>";
+		rs2tabout($rs);
+		print "</pre>";
+	}
+	print " CacheFlush ";
+	$db->CacheFlush();
+	
+	$date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A');
+	$sql = "SELECT $date from ADOXYZ";
+	print "<p>Test SQLDate: ".htmlspecialchars($sql)."</p>";
+	$rs = $db->SelectLimit($sql,1);
+	$d = date('d-m-M-Y-').'Q'.(ceil(date('m')/3.0)).date(' h:i:s A');
+	if (!$rs) Err("SQLDate query returned no recordset");
+	else if ($d != $rs->fields[0]) Err("SQLDate 1 failed expected: <br>act:$d <br>sql:".$rs->fields[0]);
+	
+	$date = $db->SQLDate('d-m-M-Y-\QQ h:i:s A',$db->DBDate("1974-02-25"));
+	$sql = "SELECT $date from ADOXYZ";
+	print "<p>Test SQLDate: ".htmlspecialchars($sql)."</p>";
+	$db->debug=1;
+	$rs = $db->SelectLimit($sql,1);
+	$ts = ADOConnection::UnixDate('1974-02-25');
+	$d = date('d-m-M-Y-',$ts).'Q'.(ceil(date('m',$ts)/3.0)).date(' h:i:s A',$ts);
+	if (!$rs) {
+		Err("SQLDate query returned no recordset");
+		echo $db->ErrorMsg(),'<br>';
+	} else if ($d != reset($rs->fields)) {
+		Err("SQLDate 2 failed expected: <br>act:$d <br>sql:".$rs->fields[0].' <br>'.$db->ErrorMsg());
+	}
+	
+	
+	print "<p>Test Filter</p>";
+	$db->debug = 1;
+	
+	$rs = $db->SelectLimit('select * from ADOXYZ where id < 3 order by id');
+	
+	$rs = RSFilter($rs,'do_strtolower');
+	if (trim($rs->fields[1]) != 'caroline'  && trim($rs->fields[2]) != 'miranda') {
+		err('**** RSFilter failed');
+		print_r($rs->fields);
+	}
+	
+	rs2html($rs);
+		
+	$db->debug=1;
+	
+	
+	print "<p>Test Replace</p>";
+	
+	$ret = $db->Replace('ADOXYZ', 
+		array('id'=>1,'firstname'=>'Caroline','lastname'=>'Miranda'),
+		array('id'),
+		$autoq = true);
+	if (!$ret) echo "<p>Error in replacing existing record</p>";
+	else {
+		$saved = $db->debug;
+		$db->debug = 0;
+		$savec = $ADODB_COUNTRECS;
+		$ADODB_COUNTRECS = true;
+		$rs = $db->Execute('select * FROM ADOXYZ where id=1');
+		$db->debug = $saved;
+		if ($rs->RecordCount() != 1) {
+			$cnt = $rs->RecordCount();
+			rs2html($rs);
+			print "<b>Error - Replace failed, count=$cnt</b><p>";
+		}
+		$ADODB_COUNTRECS = $savec;
+	}
+	$ret = $db->Replace('ADOXYZ', 
+		array('id'=>1000,'firstname'=>'Harun','lastname'=>'Al-Rashid'),
+		array('id','firstname'),
+		$autoq = true);
+	if ($ret != 2) print "<b>Replace failed: </b>";
+	print "test A return value=$ret (2 expected) <p>";
+	
+	$ret = $db->Replace('ADOXYZ', 
+		array('id'=>1000,'firstname'=>'Sherazade','lastname'=>'Al-Rashid'),
+		'id',
+		$autoq = true);
+	if ($ret != 1) 
+		if ($db->dataProvider == 'ibase' && $ret == 2);
+		else print "<b>Replace failed: </b>";
+	print "test B return value=$ret (1 or if ibase then 2 expected) <p>";
+	
+	print "<h3>rs2rs Test</h3>";
+	
+	$rs = $db->Execute('select * from ADOXYZ where id>= 1 order by id');
+	$rs = $db->_rs2rs($rs);
+	$rs->valueX = 'X';
+	$rs->MoveNext();
+	$rs = $db->_rs2rs($rs);
+	if (!isset($rs->valueX)) err("rs2rs does not preserve array recordsets");
+	if (reset($rs->fields) != 1) err("rs2rs does not move to first row: id=".reset($rs->fields));
+
+	/////////////////////////////////////////////////////////////
+	include_once('../pivottable.inc.php');
+	print "<h3>Pivot Test</h3>";
+	$db->debug=true;
+ 	$sql = PivotTableSQL(
+ 		$db,  			# adodb connection
+ 		'ADOXYZ',  		# tables
+		'firstname',	# row fields
+		'lastname',		# column fields 
+		false,			# join
+		'ID', 			# sum
+		'Sum ',			# label for sum
+		'sum',			# aggregate function
+		true
+	);
+	$rs = $db->Execute($sql);
+	if ($rs) rs2html($rs);
+	else Err("Pivot sql error");
+	
+	$pear = true; //true;
+	$db->debug=false;
+	
+	if ($pear) {
+	// PEAR TESTS BELOW
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+	
+	include_once "PEAR.php";
+	$rs = $db->query('select * from ADOXYZ where id>0 and id<10 order by id');
+	
+	$i = 0;
+	if ($rs && !$rs->EOF) {
+		while ($arr = $rs->fetchRow()) {
+			$i++;
+			//print "$i ";
+			if ($arr[0] != $i) {
+				print_r($arr);
+				print "<p><b>PEAR DB emulation error 1.</b></p>";
+				$pear = false;
+				break;
+			}
+		}
+		$rs->Close();
+	}
+	
+	
+	if ($i != $db->GetOne('select count(*) from ADOXYZ where id>0 and id<10')) {
+		print "<p><b>PEAR DB emulation error 1.1 EOF ($i)</b></p>";
+		$pear = false;
+	}
+	
+	$rs = $db->limitQuery('select * from ADOXYZ where id>0 order by id',$i=3,$top=3);
+	$i2 = $i;
+	if ($rs && !$rs->EOF) {
+
+		while (!is_object($rs->fetchInto($arr))) {
+			$i2++;
+			
+	//			print_r($arr);
+	//		print "$i ";print_r($arr);
+			if ($arr[0] != $i2) {
+				print "<p><b>PEAR DB emulation error 2.</b></p>";
+				$pear = false;
+				break;
+			}
+		}
+		$rs->Close();
+	}
+	if ($i2 != $i+$top) {
+		print "<p><b>PEAR DB emulation error 2.1 EOF (correct=$i+$top, actual=$i2)</b></p>";
+		$pear = false;
+	}
+	}
+	if ($pear) print "<p>PEAR DB emulation passed.</p>";
+	flush();
+
+	
+	$rs = $db->SelectLimit("select ".$db->sysDate." from ADOXYZ",1);
+	$date = $rs->fields[0];
+	if (!$date) Err("Bad sysDate");
+	else {
+		$ds = $db->UserDate($date,"d m Y");
+		if ($ds != date("d m Y")) Err("Bad UserDate: ".$ds.' expected='.date("d m Y"));
+		else echo "Passed UserDate: $ds<p>";
+	}
+	$db->debug=1;
+	if ($db->dataProvider == 'oci8') 
+		$rs = $db->SelectLimit("select to_char(".$db->sysTimeStamp.",'YYYY-MM-DD HH24:MI:SS') from ADOXYZ",1);
+	else 
+		$rs = $db->SelectLimit("select ".$db->sysTimeStamp." from ADOXYZ",1);
+	$date = $rs->fields[0];
+	if (!$date) Err("Bad sysTimeStamp");
+	else {
+		$ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y");
+		if ($ds != date("H \\h\\r\\s-d m Y")) Err("Bad UserTimeStamp: ".$ds.", correct is ".date("H \\h\\r\\s-d m Y"));
+		else echo "Passed UserTimeStamp: $ds<p>";
+		
+		$date = 100;
+		$ds = $db->UserTimeStamp($date,"H \\h\\r\\s-d m Y");
+		$ds2 = date("H \\h\\r\\s-d m Y",$date);
+		if ($ds != $ds2) Err("Bad UserTimeStamp 2: $ds: $ds2");
+		else echo "Passed UserTimeStamp 2: $ds<p>";
+	}
+	flush();
+	
+	if ($db->hasTransactions) {
+		$db->debug=1;
+		echo "<p>Testing StartTrans CompleteTrans</p>";
+		$db->raiseErrorFn = false;
+		
+		$db->SetTransactionMode('SERIALIZABLE');
+		$db->StartTrans();
+		$rs = $db->Execute('select * from notable');
+			$db->StartTrans();
+				$db->BeginTrans();
+			$db->Execute("update ADOXYZ set firstname='Carolx' where id=1");
+				$db->CommitTrans();
+			$db->CompleteTrans();
+		$rez = $db->CompleteTrans();
+		$db->SetTransactionMode('');
+		$db->debug=0;
+		if ($rez !== false) {
+			if (is_null($rez)) Err("Error: _transOK not modified");
+			else Err("Error: CompleteTrans (1) should have failed");
+		} else {
+			$name = $db->GetOne("Select firstname from ADOXYZ where id=1");
+			if ($name == "Carolx") Err("Error: CompleteTrans (2) should have failed");
+			else echo "<p> -- Passed StartTrans test1 - rolling back</p>";
+		}
+		
+		$db->StartTrans();
+			$db->BeginTrans();
+		$db->Execute("update ADOXYZ set firstname='Carolx' where id=1");
+			$db->RollbackTrans();
+		$rez = $db->CompleteTrans();
+		if ($rez !== true) Err("Error: CompleteTrans (1) should have succeeded");
+		else {
+			$name = $db->GetOne("Select firstname from ADOXYZ where id=1");
+			if (trim($name) != "Carolx") Err("Error: CompleteTrans (2) should have succeeded, returned name=$name");
+			else echo "<p> -- Passed StartTrans test2 - commiting</p>";
+		}
+	}
+	flush();
+	$saved = $db->debug;
+	$db->debug=1;
+	$cnt = _adodb_getcount($db, 'select * from ADOXYZ where firstname in (select firstname from ADOXYZ)');
+	echo "<b>Count=</b> $cnt";
+	$db->debug=$saved;
+	
+	global $TESTERRS;
+	$debugerr = true;
+	
+	global $ADODB_LANG;$ADODB_LANG = 'fr';
+	$db->debug = false;
+	$TESTERRS = 0;
+	$db->raiseErrorFn = 'adodb_test_err';
+	global $ERRNO; // from adodb_test_err
+	$db->Execute('select * from nowhere');
+	$metae = $db->MetaError($ERRNO);
+	if ($metae !== DB_ERROR_NOSUCHTABLE) print "<p><b>MetaError=".$metae." wrong</b>, should be ".DB_ERROR_NOSUCHTABLE."</p>";
+	else print "<p>MetaError ok (".DB_ERROR_NOSUCHTABLE."): ".$db->MetaErrorMsg($metae)."</p>";
+	if ($TESTERRS != 1) print "<b>raiseErrorFn select nowhere failed</b><br>";
+	$rs = $db->Execute('select * from ADOXYZ');
+	if ($debugerr) print " Move";
+	$rs->Move(100);
+	$rs->_queryID = false;
+	if ($debugerr) print " MoveNext";
+	$rs->MoveNext();
+	if ($debugerr) print " $rs=false";
+	$rs = false;
+
+	flush();
+	
+	print "<p>SetFetchMode() tests</p>";
+	$db->SetFetchMode(ADODB_FETCH_ASSOC);
+	$rs = $db->SelectLimit('select firstname from ADOXYZ',1);
+	if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC");
+	
+	$ADODB_FETCH_MODE = ADODB_FETCH_NUM;	
+	$rs = $db->SelectLimit('select firstname from ADOXYZ',1);
+	//var_dump($rs->fields);
+	if (!isset($rs->fields['firstname'])) Err("BAD FETCH ASSOC");
+	
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;	
+	$db->SetFetchMode(ADODB_FETCH_NUM);
+	$rs = $db->SelectLimit('select firstname from ADOXYZ',1);
+	if (!isset($rs->fields[0])) Err("BAD FETCH NUM");
+	
+	flush();
+	
+	print "<p>Test MetaTables again with SetFetchMode()</p>";
+	$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+	$db->SetFetchMode(ADODB_FETCH_ASSOC);
+	print_r($db->MetaTables());
+	print "<p>";
+	
+	////////////////////////////////////////////////////////////////////
+	
+	print "<p>Testing Bad Connection</p>";
+	flush();
+	
+	if (true || PHP_VERSION < 5)  {
+		if ($db->dataProvider == 'odbtp') $db->databaseType = 'odbtp';
+		$conn = NewADOConnection($db->databaseType);
+		$conn->raiseErrorFn = 'adodb_test_err';
+		if (1) $conn->PConnect('abc','baduser','badpassword');
+		if ($TESTERRS == 2) print "raiseErrorFn tests passed<br>";
+		else print "<b>raiseErrorFn tests failed ($TESTERRS)</b><br>";
+		
+		flush();
+	}
+	////////////////////////////////////////////////////////////////////
+	
+	global $nocountrecs;
+	
+	if (isset($nocountrecs) && $ADODB_COUNTRECS) err("Error: \$ADODB_COUNTRECS is set");
+	if (empty($nocountrecs) && $ADODB_COUNTRECS==false) err("Error: \$ADODB_COUNTRECS is not set");
+
+	flush();
+?>
+	</p>
+	<table width=100% ><tr><td bgcolor=beige>&nbsp;</td></tr></table>
+	</p></form>
+<?php
+
+	if ($rs1) $rs1->Close();
+	if ($rs2) $rs2->Close();
+	if ($rs) $rs->Close();
+	$db->Close();
+	
+	if ($db->transCnt != 0) Err("Error in transCnt=$db->transCnt (should be 0)");
+	
+	
+	printf("<p>Total queries=%d; total cached=%d</p>",$EXECS+$CACHED, $CACHED);
+	flush();
+}
+
+function adodb_test_err($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
+{
+global $TESTERRS,$ERRNO;
+
+	$ERRNO = $errno;
+	$TESTERRS += 1;
+	print "<i>** $dbms ($fn): errno=$errno &nbsp; errmsg=$errmsg ($p1,$p2)</i><br>";
+}
+
+//--------------------------------------------------------------------------------------
+
+
+@set_time_limit(240); // increase timeout
+
+include("../tohtml.inc.php");
+include("../adodb.inc.php");
+include("../rsfilter.inc.php");
+
+/* White Space Check */
+
+if (isset($_SERVER['argv'][1])) {
+	//print_r($_SERVER['argv']);
+	$_GET[$_SERVER['argv'][1]] = 1;
+}
+
+if (@$_SERVER['COMPUTERNAME'] == 'TIGRESS') {
+	CheckWS('mysqlt');
+	CheckWS('postgres');
+	CheckWS('oci8po');
+	
+	CheckWS('firebird');
+	CheckWS('sybase');
+	if (!ini_get('safe_mode')) CheckWS('informix');
+
+	CheckWS('ado_mssql');
+	CheckWS('ado_access');
+	CheckWS('mssql');
+	
+	CheckWS('vfp');
+	CheckWS('sqlanywhere');
+	CheckWS('db2');
+	CheckWS('access');
+	CheckWS('odbc_mssql');
+	CheckWS('firebird15');
+	//
+	CheckWS('oracle');
+	CheckWS('proxy');
+	CheckWS('fbsql');
+	print "White Space Check complete<p>";
+}
+if (sizeof($_GET) == 0) $testmysql = true;
+
+
+foreach($_GET as $k=>$v)  {
+	//global $$k;
+	$$k = $v;
+}	
+if (strpos(PHP_VERSION,'5') === 0) {
+	//$testaccess=1;
+	//$testmssql = 1;
+	//$testsqlite=1;
+}
+?>
+<html>
+<title>ADODB Testing</title>
+<body bgcolor=white>
+<H1>ADODB Test</H1>
+
+This script tests the following databases: Interbase, Oracle, Visual FoxPro, Microsoft Access (ODBC and ADO), MySQL, MSSQL (ODBC, native, ADO). 
+There is also support for Sybase, PostgreSQL.</p>
+For the latest version of ADODB, visit <a href=http://adodb.sourceforge.net/>adodb.sourceforge.net</a>.</p>
+
+Test <a href=test4.php>GetInsertSQL/GetUpdateSQL</a> &nbsp; 
+	<a href=testsessions.php>Sessions</a> &nbsp;
+	<a href=testpaging.php>Paging</a> &nbsp;
+	<a href=test-perf.php>Perf Monitor</a><p>
+<?php
+include('./testdatabases.inc.php');
+
+echo "<br>vers=",ADOConnection::Version();
+
+
+include_once('../adodb-time.inc.php');
+if (isset($_GET['time'])) adodb_date_test();
+
+?>
+<p><i>ADODB Database Library  (c) 2000-2007 John Lim. All rights reserved. Released under BSD and LGPL, PHP <?php echo PHP_VERSION ?>.</i></p>
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test2.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test2.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test2.php	(revision 225)
@@ -0,0 +1,26 @@
+<?php
+
+// BASIC ADO test
+
+	include_once('../adodb.inc.php');
+
+	$db = &ADONewConnection("ado_access");
+	$db->debug=1;
+	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
+	$myDSN =  'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
+		. 'DATA SOURCE=' . $access . ';';
+		
+	echo "<p>PHP ",PHP_VERSION,"</p>";
+	
+	$db->Connect($myDSN) || die('fail');
+	
+	print_r($db->ServerInfo());
+	
+	try {
+	$rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
+	print_r($rs->fields);
+	} catch(exception $e) {
+	print_r($e);
+	echo "<p> Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y');
+	}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test3.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test3.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test3.php	(revision 225)
@@ -0,0 +1,44 @@
+<?php
+/*
+  V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  Set tabs to 8.
+ */
+
+
+error_reporting(E_ALL);
+
+$path = dirname(__FILE__);
+
+include("$path/../adodb-exceptions.inc.php");
+include("$path/../adodb.inc.php");	
+
+try {
+$db = NewADOConnection("oci8");
+$db->Connect('','scott','natsoft');
+$db->debug=1;
+
+$cnt = $db->GetOne("select count(*) from adoxyz");
+$rs = $db->Execute("select * from adoxyz order by id");
+
+$i = 0;
+foreach($rs as $k => $v) {
+	$i += 1;
+	echo $k; adodb_pr($v);
+	flush();
+}
+
+if ($i != $cnt) die("actual cnt is $i, cnt should be $cnt\n");
+
+
+
+$rs = $db->Execute("select bad from badder");
+
+} catch (exception $e) {
+	adodb_pr($e);
+	$e = adodb_backtrace($e->trace);
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test4.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test4.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test4.php	(revision 225)
@@ -0,0 +1,143 @@
+<?php
+
+/** 
+ * @version V4.50 6 July 2004 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * Latest version is available at http://php.weblogs.com
+ *
+ * Test GetUpdateSQL and GetInsertSQL.
+ */
+ 
+error_reporting(E_ALL);
+function testsql()
+{
+
+
+include('../adodb.inc.php');
+include('../tohtml.inc.php');
+
+global $ADODB_FORCE_TYPE;
+
+
+//==========================
+// This code tests an insert
+
+$sql = "
+SELECT * 
+FROM ADOXYZ WHERE id = -1"; 
+// Select an empty record from the database 
+
+
+#$conn = &ADONewConnection("mssql");  // create a connection
+#$conn->PConnect("", "sa", "natsoft", "northwind"); // connect to MySQL, testdb
+
+$conn = &ADONewConnection("mysql");  // create a connection
+$conn->PConnect("localhost", "root", "", "test"); // connect to MySQL, testdb
+
+
+#$conn =& ADONewConnection('oci8po');
+#$conn->Connect('','scott','natsoft');
+
+if (PHP_VERSION  >= 5) {
+	$connstr = "mysql:dbname=northwind";
+	$u = 'root';$p='';
+	$conn =& ADONewConnection('pdo');
+	$conn->Connect($connstr, $u, $p);
+}
+//$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+
+
+$conn->debug=1;
+$conn->Execute("delete from adoxyz where lastname like 'Smi%'");
+
+$rs = $conn->Execute($sql); // Execute the query and get the empty recordset
+$record = array(); // Initialize an array to hold the record data to insert
+
+if (strpos($conn->databaseType,'mysql')===false) $record['id'] = 751;
+$record["firstname"] = 'Jann';
+$record["lastname"] = "Smitts";
+$record["created"] = time();
+
+$insertSQL = $conn->GetInsertSQL($rs, $record);
+$conn->Execute($insertSQL); // Insert the record into the database
+
+if (strpos($conn->databaseType,'mysql')===false) $record['id'] = 752;
+// Set the values for the fields in the record
+$record["firstname"] = 'anull';
+$record["lastname"] = "Smith\$@//";
+$record["created"] = time();
+
+if (isset($_GET['f'])) $ADODB_FORCE_TYPE = $_GET['f'];
+
+//$record["id"] = -1;
+
+// Pass the empty recordset and the array containing the data to insert
+// into the GetInsertSQL function. The function will process the data and return
+// a fully formatted insert sql statement.
+$insertSQL = $conn->GetInsertSQL($rs, $record);
+$conn->Execute($insertSQL); // Insert the record into the database
+
+
+
+$insertSQL2 = $conn->GetInsertSQL($table='ADOXYZ', $record);
+if ($insertSQL != $insertSQL2) echo "<p><b>Walt's new stuff failed</b>: $insertSQL2</p>";
+//==========================
+// This code tests an update
+
+$sql = "
+SELECT * 
+FROM ADOXYZ WHERE lastname=".$conn->Param('var'). " ORDER BY 1"; 
+// Select a record to update 
+
+$varr = array('var'=>$record['lastname'].'');
+$rs = $conn->Execute($sql,$varr); // Execute the query and get the existing record to update
+if (!$rs || $rs->EOF) print "<p><b>No record found!</b></p>";
+
+$record = array(); // Initialize an array to hold the record data to update
+
+
+// Set the values for the fields in the record
+$record["firstName"] = "Caroline".rand();
+//$record["lasTname"] = ""; // Update Caroline's lastname from Miranda to Smith
+$record["creAted"] = '2002-12-'.(rand()%30+1);
+$record['num'] = '';
+// Pass the single record recordset and the array containing the data to update
+// into the GetUpdateSQL function. The function will process the data and return
+// a fully formatted update sql statement.
+// If the data has not changed, no recordset is returned
+
+$updateSQL = $conn->GetUpdateSQL($rs, $record);
+$conn->Execute($updateSQL,$varr); // Update the record in the database
+if ($conn->Affected_Rows() != 1)print "<p><b>Error1 </b>: Rows Affected=".$conn->Affected_Rows().", should be 1</p>";
+
+$record["firstName"] = "Caroline".rand();
+$record["lasTname"] = "Smithy Jones"; // Update Caroline's lastname from Miranda to Smith
+$record["creAted"] = '2002-12-'.(rand()%30+1);
+$record['num'] = 331;
+$updateSQL = $conn->GetUpdateSQL($rs, $record);
+$conn->Execute($updateSQL,$varr); // Update the record in the database
+if ($conn->Affected_Rows() != 1)print "<p><b>Error 2</b>: Rows Affected=".$conn->Affected_Rows().", should be 1</p>";
+
+$rs = $conn->Execute("select * from ADOXYZ where lastname like 'Sm%'");
+//adodb_pr($rs);
+rs2html($rs);
+
+$record["firstName"] = "Carol-new-".rand();
+$record["lasTname"] = "Smithy"; // Update Caroline's lastname from Miranda to Smith
+$record["creAted"] = '2002-12-'.(rand()%30+1);
+$record['num'] = 331;
+
+$conn->AutoExecute('ADOXYZ',$record,'UPDATE', "lastname like 'Sm%'");
+$rs = $conn->Execute("select * from ADOXYZ where lastname like 'Sm%'");
+//adodb_pr($rs);
+rs2html($rs);
+}
+
+
+testsql();
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test5.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test5.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test5.php	(revision 225)
@@ -0,0 +1,47 @@
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+
+// Select an empty record from the database 
+
+include('../adodb.inc.php');
+include('../tohtml.inc.php');
+
+include('../adodb-errorpear.inc.php');
+
+if (0) {
+	$conn = &ADONewConnection('mysql');
+	$conn->debug=1;
+	$conn->PConnect("localhost","root","","xphplens");
+	print $conn->databaseType.':'.$conn->GenID().'<br>';
+}
+
+if (0) {
+	$conn = &ADONewConnection("oci8");  // create a connection
+	$conn->debug=1;
+	$conn->PConnect("falcon", "scott", "tiger", "juris8.ecosystem.natsoft.com.my"); // connect to MySQL, testdb
+	print $conn->databaseType.':'.$conn->GenID();
+}
+
+if (0) {
+	$conn = &ADONewConnection("ibase");  // create a connection
+	$conn->debug=1;
+	$conn->Connect("localhost:c:\\Interbase\\Examples\\Database\\employee.gdb", "sysdba", "masterkey", ""); // connect to MySQL, testdb
+	print $conn->databaseType.':'.$conn->GenID().'<br>';
+}
+
+if (0) {
+	$conn = &ADONewConnection('postgres');
+	$conn->debug=1;
+	@$conn->PConnect("susetikus","tester","test","test");
+	print $conn->databaseType.':'.$conn->GenID().'<br>';
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/test_rs_array.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/test_rs_array.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/test_rs_array.php	(revision 225)
@@ -0,0 +1,47 @@
+<?php
+
+include_once('../adodb.inc.php');
+$rs = new ADORecordSet_array();
+
+$array = array(
+array ('Name', 'Age'),
+array ('John', '12'),
+array ('Jill', '8'),
+array ('Bill', '49')
+);
+
+$typearr = array('C','I');
+
+
+$rs->InitArray($array,$typearr);
+
+while (!$rs->EOF) {
+	print_r($rs->fields);echo "<br>";
+	$rs->MoveNext();
+}
+
+echo "<hr /> 1 Seek<br>";
+$rs->Move(1);
+while (!$rs->EOF) {
+	print_r($rs->fields);echo "<br>";
+	$rs->MoveNext();
+}
+
+echo "<hr /> 2 Seek<br>";
+$rs->Move(2);
+while (!$rs->EOF) {
+	print_r($rs->fields);echo "<br>";
+	$rs->MoveNext();
+}
+
+echo "<hr /> 3 Seek<br>";
+$rs->Move(3);
+while (!$rs->EOF) {
+	print_r($rs->fields);echo "<br>";
+	$rs->MoveNext();
+}
+
+
+
+die();
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testcache.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testcache.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testcache.php	(revision 225)
@@ -0,0 +1,29 @@
+<html>
+<body>
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+$ADODB_CACHE_DIR = dirname(tempnam('/tmp',''));
+include("../adodb.inc.php");
+
+if (isset($access)) {
+	$db=ADONewConnection('access');
+	$db->PConnect('nwind');
+} else {
+	$db = ADONewConnection('mysql');
+	$db->PConnect('mangrove','root','','xphplens');
+}
+if (isset($cache)) $rs = $db->CacheExecute(120,'select * from products');
+else $rs = $db->Execute('select * from products');
+
+$arr = $rs->GetArray();
+print sizeof($arr);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testdatabases.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testdatabases.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testdatabases.inc.php	(revision 225)
@@ -0,0 +1,442 @@
+<?php
+  
+/*
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+*/ 
+ 
+ /* this file is used by the ADODB test program: test.php */
+ ?>
+
+<table><tr valign=top><td>
+<form method=get>
+<input type=checkbox name="testaccess" value=1 <?php echo !empty($testaccess) ? 'checked' : '' ?>> <b>Access</b><br>
+<input type=checkbox name="testibase" value=1 <?php echo !empty($testibase) ? 'checked' : '' ?>> <b>Interbase</b><br>
+<input type=checkbox name="testmssql" value=1 <?php echo !empty($testmssql) ? 'checked' : '' ?>> <b>MSSQL</b><br>
+ <input type=checkbox name="testmysql" value=1 <?php echo !empty($testmysql) ? 'checked' : '' ?>> <b>MySQL</b><br>
+<input type=checkbox name="testmysqlodbc" value=1 <?php echo !empty($testmysqlodbc) ? 'checked' : '' ?>> <b>MySQL ODBC</b><br>
+<input type=checkbox name="testmysqli" value=1 <?php echo !empty($testmysqli) ? 'checked' : '' ?>> <b>MySQLi</b>
+<br>
+<td><input type=checkbox name="testsqlite" value=1 <?php echo !empty($testsqlite) ? 'checked' : '' ?>> <b>SQLite</b><br>
+<input type=checkbox name="testproxy" value=1 <?php echo !empty($testproxy) ? 'checked' : '' ?>> <b>MySQL Proxy</b><br>
+<input type=checkbox name="testoracle" value=1 <?php echo !empty($testoracle) ? 'checked' : '' ?>> <b>Oracle (oci8)</b> <br>
+<input type=checkbox name="testpostgres" value=1 <?php echo !empty($testpostgres) ? 'checked' : '' ?>> <b>PostgreSQL</b><br>
+<input type=checkbox name="testpgodbc" value=1 <?php echo !empty($testpgodbc) ? 'checked' : '' ?>> <b>PostgreSQL ODBC</b><br>
+<td>
+<input type=checkbox name="testpdopgsql" value=1 <?php echo !empty($testpdopgsql) ? 'checked' : '' ?>> <b>PgSQL PDO</b><br>
+<input type=checkbox name="testpdomysql" value=1 <?php echo !empty($testpdomysql) ? 'checked' : '' ?>> <b>MySQL PDO</b><br>
+<input type=checkbox name="testpdosqlite" value=1 <?php echo !empty($testpdosqlite) ? 'checked' : '' ?>> <b>SQLite PDO</b><br>
+<input type=checkbox name="testpdoaccess" value=1 <?php echo !empty($testpdoaccess) ? 'checked' : '' ?>> <b>Access PDO</b><br>
+<input type=checkbox name="testpdomssql" value=1 <?php echo !empty($testpdomssql) ? 'checked' : '' ?>> <b>MSSQL PDO</b><br>
+
+<input type=checkbox name="testpdoora" value=1 <?php echo !empty($testpdoora) ? 'checked' : '' ?>> <b>OCI PDO</b><br>
+
+<td><input type=checkbox name="testdb2" value=1 <?php echo !empty($testdb2) ? 'checked' : '' ?>> DB2<br>
+<input type=checkbox name="testvfp" value=1 <?php echo !empty($testvfp) ? 'checked' : '' ?>> VFP+ODBTP<br>
+<input type=checkbox name="testado" value=1 <?php echo !empty($testado) ? 'checked' : '' ?>> ADO (for mssql and access)<br>
+<input type=checkbox name="nocountrecs" value=1 <?php echo !empty($nocountrecs) ? 'checked' : '' ?>> $ADODB_COUNTRECS=false<br>
+<input type=checkbox name="nolog" value=1 <?php echo !empty($nolog) ? 'checked' : '' ?>> No SQL Logging<br>
+<input type=checkbox name="time" value=1 <?php echo !empty($_GET['time']) ? 'checked' : '' ?>> ADOdb time test
+</table>
+<input type=submit>
+</form>
+
+<?php
+
+if ($ADODB_FETCH_MODE != ADODB_FETCH_DEFAULT) print "<h3>FETCH MODE IS NOT ADODB_FETCH_DEFAULT</h3>";
+
+if (isset($nocountrecs)) $ADODB_COUNTRECS = false;
+
+// cannot test databases below, but we include them anyway to check
+// if they parse ok...
+
+if (!strpos(PHP_VERSION,'5') === 0) {
+	ADOLoadCode("sybase");
+	//ADOLoadCode("postgres");
+	//ADOLoadCode("postgres7");
+	ADOLoadCode("firebird");
+	ADOLoadCode("borland_ibase");
+	ADOLoadCode("informix");
+	ADOLoadCode("sqlanywhere");
+//	ADOLoadCode('mysqli');
+}
+
+
+flush();
+if (!empty($testpostgres)) {
+	//ADOLoadCode("postgres");
+
+	$db = &ADONewConnection('postgres');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if ($db->Connect("localhost","tester","test","test")) {
+		testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname varchar,created date)");
+	}else
+		print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.<BR>".$db->ErrorMsg();
+}
+
+if (!empty($testpgodbc)) { 
+	
+	$db = &ADONewConnection('odbc');
+	$db->hasTransactions = false;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	
+	if ($db->PConnect('Postgresql')) {
+		$db->hasTransactions = true;
+		testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb");
+	} else print "ERROR: PostgreSQL requires a database called test on server, user tester, password test.<BR>".$db->ErrorMsg();
+}
+
+if (!empty($testibase)) {
+	//$_GET['nolog'] = true;
+	$db = &ADONewConnection('firebird');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if ($db->PConnect("localhost:d:\\firebird\\151\\examples\\EMPLOYEE.fdb", "sysdba", "masterkey", ""))
+		testdb($db,"create table ADOXYZ (id integer, firstname char(24), lastname char(24),price numeric(12,2),created date)");
+	 else print "ERROR: Interbase test requires a database called employee.gdb".'<BR>'.$db->ErrorMsg();
+	
+}
+
+
+if (!empty($testsqlite)) {
+	$path =urlencode('d:\inetpub\adodb\sqlite.db');
+	$dsn = "sqlite://$path/";
+	$db = ADONewConnection($dsn);
+	//echo $dsn;
+	
+	//$db = &ADONewConnection('sqlite');
+	
+
+	if ($db && $db->PConnect("d:\\inetpub\\adodb\\sqlite.db", "", "", "")) {
+		print "<h1>Connecting $db->databaseType...</h1>";
+		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
+	} else 
+		print "ERROR: SQLite";
+	
+}
+
+if (!empty($testpdopgsql)) {
+	$connstr = "pgsql:dbname=test";
+	$u = 'tester';$p='test';
+	$db = &ADONewConnection('pdo');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+}
+
+if (!empty($testpdomysql)) {
+	$connstr = "mysql:dbname=northwind";
+	$u = 'root';$p='';
+	$db = &ADONewConnection('pdo');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	
+	testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+}
+
+if (!empty($testpdomssql)) {
+	$connstr = "mssql:dbname=northwind";
+	$u = 'sa';$p='natsoft';
+	$db = &ADONewConnection('pdo');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	
+	testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+}
+
+if (!empty($testpdosqlite)) {
+	$connstr = "sqlite:d:/inetpub/adodb/sqlite-pdo.db3";
+	$u = '';$p='';
+	$db = &ADONewConnection('pdo');
+	$db->hasTransactions = false;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+}
+
+if (!empty($testpdoaccess)) {
+	$connstr = 'odbc:nwind';
+	$u = '';$p='';
+	$db = &ADONewConnection('pdo');
+	$db->hasTransactions = false;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+}
+
+if (!empty($testpdoora)) {
+	$connstr = 'oci:';
+	$u = 'scott';$p='natsoft';
+	$db = &ADONewConnection('pdo');
+	#$db->hasTransactions = false;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$db->Connect($connstr,$u,$p) || die("CONNECT FAILED");
+	testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+}
+
+// REQUIRES ODBC DSN CALLED nwind
+if (!empty($testaccess)) {
+	$db = &ADONewConnection('access');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
+	$dsn = "nwind";
+	$dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=$access;Uid=Admin;Pwd=;";
+	
+	//$dsn =  'Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=' . $access . ';';
+	if ($db->PConnect($dsn, "", "", ""))
+		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
+	else print "ERROR: Access test requires a Windows ODBC DSN=nwind, Access driver";
+	
+}
+
+if (!empty($testaccess) && !empty($testado)) { // ADO ACCESS
+
+	$db = &ADONewConnection("ado_access");
+	print "<h1>Connecting $db->databaseType...</h1>";
+	
+	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
+	$myDSN =  'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
+		. 'DATA SOURCE=' . $access . ';';
+		//. 'USER ID=;PASSWORD=;';
+	$_GET['nolog'] = 1;
+	if ($db->PConnect($myDSN, "", "", "")) {
+		print "ADO version=".$db->_connectionID->version."<br>";
+		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
+	} else print "ERROR: Access test requires a Access database $access".'<BR>'.$db->ErrorMsg();
+	
+}
+
+if (!empty($testvfp)) { // ODBC
+	$db = &ADONewConnection('vfp');
+	print "<h1>Connecting $db->databaseType...</h1>";flush();
+
+	if ( $db->PConnect("vfp-adoxyz")) {
+		testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)");
+	 } else print "ERROR: Visual FoxPro test requires a Windows ODBC DSN=vfp-adoxyz, VFP driver";
+	
+	echo "<hr />";
+	$db = &ADONewConnection('odbtp');
+	
+	if ( $db->PConnect('localhost','DRIVER={Microsoft Visual FoxPro Driver};SOURCETYPE=DBF;SOURCEDB=d:\inetpub\adodb;EXCLUSIVE=NO;')) {
+	print "<h1>Connecting $db->databaseType...</h1>";flush();
+	testdb($db,"create table d:\\inetpub\\adodb\\ADOXYZ (id int, firstname char(24), lastname char(24),created date)");
+	 } else print "ERROR: Visual FoxPro odbtp requires a Windows ODBC DSN=vfp-adoxyz, VFP driver";
+	
+}
+
+
+// REQUIRES MySQL server at localhost with database 'test'
+if (!empty($testmysql)) { // MYSQL
+
+
+	if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost';
+	else $server = "mangrove";
+	$user = 'root'; $password = ''; $database = 'northwind';
+	$db = &ADONewConnection("mysqlt://$user:$password@$server/$database?persist");
+	print "<h1>Connecting $db->databaseType...</h1>";
+	
+	if (true || $db->PConnect($server, "root", "", "northwind")) {
+		//$db->Execute("DROP TABLE ADOXYZ") || die('fail drop');
+		//$db->debug=1;$db->Execute('drop table ADOXYZ');
+		testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) Type=InnoDB");
+	} else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'<BR>'.$db->ErrorMsg();
+}
+
+// REQUIRES MySQL server at localhost with database 'test'
+if (!empty($testmysqli)) { // MYSQL
+
+	$db = &ADONewConnection('mysqli');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if (PHP_VERSION >= 5 || $_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost';
+	else $server = "mangrove";
+	if ($db->PConnect($server, "root", "", "northwind")) {
+		//$db->debug=1;$db->Execute('drop table ADOXYZ');
+		testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)");
+	} else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'<BR>'.$db->ErrorMsg();
+}
+
+
+// REQUIRES MySQL server at localhost with database 'test'
+if (!empty($testmysqlodbc)) { // MYSQL
+	
+	$db = &ADONewConnection('odbc');
+	$db->hasTransactions = false;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost';
+	else $server = "mangrove";
+	if ($db->PConnect('mysql', "root", ""))
+		testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb");
+	else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'<BR>'.$db->ErrorMsg();
+}
+
+if (!empty($testproxy)){
+	$db = &ADONewConnection('proxy');
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if ($_SERVER['HTTP_HOST'] == 'localhost') $server = 'localhost';
+
+	if ($db->PConnect('http://localhost/php/phplens/adodb/server.php'))
+		testdb($db,
+		"create table ADOXYZ (id int, firstname char(24), lastname char(24), created date) type=innodb");
+	else print "ERROR: MySQL test requires a MySQL server on localhost, userid='admin', password='', database='test'".'<BR>'.$db->ErrorMsg();
+
+}
+
+ADOLoadCode('oci805');
+ADOLoadCode("oci8po");
+	
+if (!empty($testoracle)) {
+	$dsn = "oci8po://juris10:natsoft@sherkhan?persist";
+	$db = ADONewConnection($dsn );//'oci8');
+	
+	//$db->debug=1;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if (true || $db->Connect('', "scott", "natsoft",''))
+		testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
+	else 
+		print "ERROR: Oracle test requires an Oracle server setup with scott/natsoft".'<BR>'.$db->ErrorMsg();
+
+}
+ADOLoadCode("oracle"); // no longer supported
+if (false && !empty($testoracle)) { 
+	
+	$db = ADONewConnection();
+	print "<h1>Connecting $db->databaseType...</h1>";
+	if ($db->PConnect("", "scott", "tiger", "natsoft.domain"))
+		testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
+	else print "ERROR: Oracle test requires an Oracle server setup with scott/tiger".'<BR>'.$db->ErrorMsg();
+
+}
+
+ADOLoadCode("odbc_db2"); // no longer supported
+if (!empty($testdb2)) {
+	if (PHP_VERSION>=5.1) {
+		$db = ADONewConnection("db2");
+		print "<h1>Connecting $db->databaseType...</h1>";
+		
+		#$db->curMode = SQL_CUR_USE_ODBC;
+		#$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest";
+		if ($db->Connect('localhost','natsoft','guest','test')) {
+			testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
+		} else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'<BR>'.$db->ErrorMsg();
+	} else { 
+		$db = ADONewConnection("odbc_db2");
+		print "<h1>Connecting $db->databaseType...</h1>";
+		
+		$dsn = "db2test";
+		#$db->curMode = SQL_CUR_USE_ODBC;
+		#$dsn = "driver={IBM db2 odbc DRIVER};Database=test;hostname=localhost;port=50000;protocol=TCPIP; uid=natsoft; pwd=guest";
+		if ($db->Connect($dsn)) {
+			testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
+		} else print "ERROR: DB2 test requires an server setup with odbc data source db2_sample".'<BR>'.$db->ErrorMsg();
+	}
+echo "<hr />";
+flush();
+	$dsn = "driver={IBM db2 odbc DRIVER};Database=sample;hostname=localhost;port=50000;protocol=TCPIP; uid=root; pwd=natsoft";
+	
+	$db = ADONewConnection('odbtp');
+	if ($db->Connect('127.0.0.1',$dsn)) {
+		
+		$db->debug=1;
+		 $arr = $db->GetArray( "||SQLProcedures" ); adodb_pr($arr);
+	     $arr = $db->GetArray( "||SQLProcedureColumns|||GET_ROUTINE_SAR" );adodb_pr($arr);
+	
+		testdb($db,"create table ADOXYZ (id int, firstname varchar(24), lastname varchar(24),created date)");
+	} else echo ("ERROR Connection");
+	echo $db->ErrorMsg();
+}
+
+
+$server = 'sherkhan';
+
+
+
+ADOLoadCode("mssqlpo");
+if (!empty($testmssql)) { // MS SQL Server -- the extension is buggy -- probably better to use ODBC
+	$db = ADONewConnection("mssqlpo");
+	//$db->debug=1;
+	print "<h1>Connecting $db->databaseType...</h1>";
+	
+	$ok = $db->Connect('','adodb','natsoft','northwind');
+
+	if ($ok or $db->PConnect("mangrove", "sa", "natsoft", "ai")) {
+		AutoDetect_MSSQL_Date_Order($db);
+	//	$db->Execute('drop table adoxyz');
+		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
+	} else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='192.168.0.1', userid='adodb', password='natsoft', database='ai'".'<BR>'.$db->ErrorMsg();
+	
+}
+
+
+ADOLoadCode('odbc_mssql');
+if (!empty($testmssql)) { // MS SQL Server via ODBC
+	$db = ADONewConnection();
+	
+	print "<h1>Connecting $db->databaseType...</h1>";
+	
+	$dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;";
+	
+	if ($db->PConnect($dsn, "adodb", "natsoft", ""))  {
+		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
+	}
+	else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup";
+
+}
+
+ADOLoadCode("ado_mssql");
+if (!empty($testmssql) && !empty($testado) ) { // ADO ACCESS MSSQL -- thru ODBC -- DSN-less
+	
+	$db = &ADONewConnection("ado_mssql");
+	//$db->debug=1;
+	print "<h1>Connecting DSN-less $db->databaseType...</h1>";
+	
+	$myDSN="PROVIDER=MSDASQL;DRIVER={SQL Server};"
+		. "SERVER=$server;DATABASE=NorthWind;UID=adodb;PWD=natsoft;Trusted_Connection=No";
+
+		
+	if ($db->PConnect($myDSN, "", "", ""))
+		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
+	else print "ERROR: MSSQL test 2 requires MS SQL 7";
+	
+}
+
+if (!empty($testmssql) && !empty($testado)) { // ADO ACCESS MSSQL with OLEDB provider
+
+	$db = &ADONewConnection("ado_mssql");
+	print "<h1>Connecting DSN-less OLEDB Provider $db->databaseType...</h1>";
+	//$db->debug=1;
+	$myDSN="SERVER=localhost;DATABASE=northwind;Trusted_Connection=yes";
+	if ($db->PConnect($myDSN, "adodb", "natsoft", 'SQLOLEDB')) {
+		testdb($db,"create table ADOXYZ (id int, firstname char(24), lastname char(24),created datetime)");
+	} else print "ERROR: MSSQL test 2 requires a MS SQL 7 on a server='mangrove', userid='sa', password='', database='ai'";
+
+}
+
+
+if (extension_loaded('odbtp') && !empty($testmssql)) { // MS SQL Server via ODBC
+	$db = ADONewConnection('odbtp');
+	
+	$dsn = "PROVIDER=MSDASQL;Driver={SQL Server};Server=$server;Database=northwind;uid=adodb;pwd=natsoft";
+	
+	if ($db->PConnect('localhost',$dsn, "", ""))  {
+		print "<h1>Connecting $db->databaseType...</h1>";				
+		testdb($db,"create table ADOXYZ (id int, firstname char(24) null, lastname char(24) null,created datetime null)");
+	}
+	else print "ERROR: MSSQL test 1 requires a MS SQL 7 server setup with DSN setup";
+
+}
+
+
+print "<h3>Tests Completed</h3>";
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testgenid.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testgenid.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testgenid.php	(revision 225)
@@ -0,0 +1,36 @@
+<?php
+/*
+	V4.50 6 July 2004 
+	
+	Run multiple copies of this php script at the same time
+	to test unique generation of id's in multiuser mode
+*/
+include_once('../adodb.inc.php');
+$testaccess = true;
+include_once('testdatabases.inc.php');
+
+function testdb(&$db,$createtab="create table ADOXYZ (id int, firstname char(24), lastname char(24), created date)")
+{
+	$table = 'adodbseq';
+	
+	$db->Execute("drop table $table");
+	//$db->debug=true;
+	
+	$ctr = 5000;
+	$lastnum = 0;
+	
+	while (--$ctr >= 0) {
+		$num = $db->GenID($table);
+		if ($num === false) {	
+			print "GenID returned false";
+			break;
+		}
+		if ($lastnum + 1 == $num) print " $num ";
+		else {
+			print " <font color=red>$num</font> ";
+			flush();
+		}
+		$lastnum = $num;
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testmssql.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testmssql.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testmssql.php	(revision 225)
@@ -0,0 +1,76 @@
+<?php
+
+/** 
+ * @version V4.50 6 July 2004 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Set tabs to 4 for best viewing.
+ * 
+ * Latest version is available at http://php.weblogs.com
+ *
+ * Test GetUpdateSQL and GetInsertSQL.
+ */
+ 
+error_reporting(E_ALL);
+
+
+include('../adodb.inc.php');
+include('../tohtml.inc.php');
+
+//==========================
+// This code tests an insert
+
+
+
+$conn = &ADONewConnection("mssql");  // create a connection
+$conn->Connect('127.0.0.1','adodb','natsoft','northwind') or die('Fail');
+
+$conn->debug =1;
+$query = 'select * from products';
+$conn->SetFetchMode(ADODB_FETCH_ASSOC);
+$rs = $conn->Execute($query);
+echo "<pre>";
+while( !$rs->EOF ) {
+	$output[] = $rs->fields;
+	var_dump($rs->fields);
+	$rs->MoveNext();
+	print "<p>";
+}
+die();
+
+
+$p = $conn->Prepare('insert into products (productname,unitprice,dcreated) values (?,?,?)');
+echo "<pre>";
+print_r($p);
+
+$conn->debug=1;
+$conn->Execute($p,array('John'.rand(),33.3,$conn->DBDate(time())));
+
+$p = $conn->Prepare('select * from products where productname like ?');
+$arr = $conn->getarray($p,array('V%'));
+print_r($arr);
+die();
+
+//$conn = &ADONewConnection("mssql");
+//$conn->Connect('mangrove','sa','natsoft','ai');
+
+//$conn->Connect('mangrove','sa','natsoft','ai');
+$conn->debug=1;
+$conn->Execute('delete from blobtest');
+
+$conn->Execute('insert into blobtest (id) values(1)');
+$conn->UpdateBlobFile('blobtest','b1','../cute_icons_for_site/adodb.gif','id=1');
+$rs = $conn->Execute('select b1 from blobtest where id=1');
+
+$output = "c:\\temp\\test_out-".date('H-i-s').".gif"; 
+print "Saving file <b>$output</b>, size=".strlen($rs->fields[0])."<p>";
+$fd = fopen($output, "wb"); 
+fwrite($fd, $rs->fields[0]); 
+fclose($fd); 
+
+print " <a href=file://$output>View Image</a>";
+//$rs = $conn->Execute('SELECT id,SUBSTRING(b1, 1, 10) FROM blobtest');
+//rs2html($rs);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testoci8.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testoci8.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testoci8.php	(revision 225)
@@ -0,0 +1,83 @@
+<html>
+<body>
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+error_reporting(63);
+include("../adodb.inc.php");
+include("../tohtml.inc.php");
+
+if (0) {
+	$db = ADONewConnection('oci8po');
+	
+	$db->PConnect('','scott','natsoft');
+	if (!empty($testblob)) {
+		$varHoldingBlob = 'ABC DEF GEF John TEST';
+		$num = time()%10240;
+		// create table atable (id integer, ablob blob);
+		$db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())');
+		$db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB');
+		
+		$rs = &$db->Execute('select * from atable');
+		
+		if (!$rs) die("Empty RS");
+		if ($rs->EOF) die("EOF RS");
+		rs2html($rs);
+	}
+	$stmt = $db->Prepare('select * from adoxyz where id=?');
+	for ($i = 1; $i <= 10; $i++) {
+	$rs = &$db->Execute(
+		$stmt,
+		array($i));
+			
+		if (!$rs) die("Empty RS");
+		if ($rs->EOF) die("EOF RS");
+		rs2html($rs);
+	}
+}
+if (1) {
+	$db = ADONewConnection('oci8');
+	$db->PConnect('','scott','natsoft');
+	$db->debug = true;
+	$db->Execute("delete from emp where ename='John'");
+	print $db->Affected_Rows().'<BR>';
+	$stmt = &$db->Prepare('insert into emp (empno, ename) values (:empno, :ename)');
+	$rs = $db->Execute($stmt,array('empno'=>4321,'ename'=>'John'));
+	// prepare not quite ready for prime time
+	//$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John'));
+	if (!$rs) die("Empty RS");
+	
+	$db->setfetchmode(ADODB_FETCH_NUM);
+	
+	$vv = 'A%';
+	$stmt = $db->PrepareSP("BEGIN adodb.open_tab2(:rs,:tt); END;",true);
+	$db->OutParameter($stmt, $cur, 'rs', -1, OCI_B_CURSOR);
+	$db->OutParameter($stmt, $vv, 'tt');
+	$rs = $db->Execute($stmt);
+	while (!$rs->EOF) {
+		adodb_pr($rs->fields);
+		$rs->MoveNext();
+	}
+	echo " val = $vv";
+
+}
+
+if (0) {
+	$db = ADONewConnection('odbc_oracle');
+	if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect');
+	$db->debug = true;
+	$rs = &$db->Execute(
+		'select * from adoxyz where firstname=? and trim(lastname)=?',
+		array('first'=>'Caroline','last'=>'Miranda'));
+	if (!$rs) die("Empty RS");
+	if ($rs->EOF) die("EOF RS");
+	rs2html($rs);
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testoci8cursor.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testoci8cursor.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testoci8cursor.php	(revision 225)
@@ -0,0 +1,111 @@
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+/*
+	Test for Oracle Variable Cursors, which are treated as ADOdb recordsets.
+	
+	We have 2 examples. The first shows us using the Parameter statement. 
+	The second shows us using the new ExecuteCursor($sql, $cursorName)
+	function.
+	
+------------------------------------------------------------------
+-- TEST PACKAGE YOU NEED TO INSTALL ON ORACLE - run from sql*plus
+------------------------------------------------------------------
+
+
+-- TEST PACKAGE
+CREATE OR REPLACE PACKAGE adodb AS
+TYPE TabType IS REF CURSOR RETURN tab%ROWTYPE;
+PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames in varchar);
+PROCEDURE data_out(input IN varchar, output OUT varchar); 
+
+procedure myproc (p1 in number, p2 out number);
+END adodb;
+/
+
+CREATE OR REPLACE PACKAGE BODY adodb AS
+PROCEDURE open_tab (tabcursor IN OUT TabType,tablenames in varchar) IS
+	BEGIN
+		OPEN tabcursor FOR SELECT * FROM tab where tname like tablenames;
+	END open_tab;
+	
+PROCEDURE data_out(input IN varchar, output OUT varchar) IS
+	BEGIN
+		output := 'Cinta Hati '||input;
+	END;
+	
+procedure myproc (p1 in number, p2 out number) as
+begin
+p2 := p1;
+end;
+END adodb;
+/
+
+------------------------------------------------------------------
+-- END PACKAGE
+------------------------------------------------------------------
+
+*/
+
+include('../adodb.inc.php');
+include('../tohtml.inc.php');
+
+	error_reporting(E_ALL);
+	$db = ADONewConnection('oci8');
+	$db->PConnect('','scott','natsoft');
+	$db->debug = 99;
+
+
+/*
+*/
+
+	define('MYNUM',5);
+	
+
+	$rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS,'A%'); END;");
+	
+	if ($rs && !$rs->EOF) {
+		print "Test 1 RowCount: ".$rs->RecordCount()."<p>";
+	} else {
+		print "<b>Error in using Cursor Variables 1</b><p>";
+	}
+	
+	print "<h4>Testing Stored Procedures for oci8</h4>";
+	
+	$stid = $db->PrepareSP('BEGIN adodb.myproc('.MYNUM.', :myov); END;');
+	$db->OutParameter($stid, $myov, 'myov');
+	$db->Execute($stid);
+	if ($myov != MYNUM) print "<p><b>Error with myproc</b></p>";
+	
+	
+	$stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true);
+	$a1 = 'Malaysia';
+	//$a2 = ''; # a2 doesn't even need to be defined!
+	$db->InParameter($stmt,$a1,'a1');
+	$db->OutParameter($stmt,$a2,'a2');
+	$rs = $db->Execute($stmt);
+	if ($rs) {
+		if ($a2 !== 'Cinta Hati Malaysia') print "<b>Stored Procedure Error: a2 = $a2</b><p>";
+		else echo  "OK: a2=$a2<p>";
+	} else {
+		print "<b>Error in using Stored Procedure IN/Out Variables</b><p>";
+	}
+	
+	
+	$tname = 'A%';
+	
+	$stmt = $db->PrepareSP('select * from tab where tname like :tablename');
+	$db->Parameter($stmt,$tname,'tablename');
+	$rs = $db->Execute($stmt);
+	rs2html($rs);
+		
+		
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testpaging.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testpaging.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testpaging.php	(revision 225)
@@ -0,0 +1,86 @@
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+error_reporting(E_ALL);
+
+
+include_once('../adodb.inc.php');
+include_once('../adodb-pager.inc.php');
+
+$driver = 'oci8';
+$sql = 'select  ID, firstname as "First Name", lastname as "Last Name" from adoxyz  order  by  id';
+//$sql = 'select count(*),firstname from adoxyz group by firstname order by 2 ';
+//$sql = 'select distinct firstname, lastname from adoxyz  order  by  firstname';
+
+if ($driver == 'postgres') {
+	$db = NewADOConnection('postgres');
+	$db->PConnect('localhost','tester','test','test');
+}
+
+if ($driver == 'access') {
+	$db = NewADOConnection('access');
+	$db->PConnect("nwind", "", "", "");
+}
+
+if ($driver == 'ibase') {
+	$db = NewADOConnection('ibase');
+	$db->PConnect("localhost:e:\\firebird\\examples\\employee.gdb", "sysdba", "masterkey", "");
+	$sql = 'select distinct firstname, lastname  from adoxyz  order  by  firstname';
+
+}
+if ($driver == 'mssql') {
+	$db = NewADOConnection('mssql');
+	$db->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind');
+}
+if ($driver == 'oci8') {
+	$db = NewADOConnection('oci8');
+	$db->Connect('','scott','natsoft');
+	
+$sql = "select * from (select  ID, firstname as \"First Name\", lastname as \"Last Name\" from adoxyz 
+	 order  by  1)";
+}
+
+if ($driver == 'access') {
+	$db = NewADOConnection('access');
+	$db->Connect('nwind');
+}
+
+if (empty($driver) or $driver == 'mysql') {
+	$db = NewADOConnection('mysql');
+	$db->Connect('localhost','root','','test');
+}
+
+//$db->pageExecuteCountRows = false;
+
+$db->debug = true;
+
+if (0) {
+$rs = &$db->Execute($sql);
+include_once('../toexport.inc.php');
+print "<pre>";
+print rs2csv($rs); # return a string
+
+print '<hr />';
+$rs->MoveFirst(); # note, some databases do not support MoveFirst
+print rs2tab($rs); # return a string
+
+print '<hr />';
+$rs->MoveFirst();
+rs2tabout($rs); # send to stdout directly
+print "</pre>";
+}
+
+$pager = new ADODB_Pager($db,$sql);
+$pager->showPageLinks = true;
+$pager->linksPerPage = 10;
+$pager->cache = 60;
+$pager->Render($rows=7);
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testpear.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testpear.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testpear.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+error_reporting(E_ALL);
+
+include_once('../adodb-pear.inc.php');
+$username = 'root';
+$password = '';
+$hostname = 'localhost';
+$databasename = 'xphplens';
+$driver = 'mysql';
+
+$dsn = "$driver://$username:$password@$hostname/$databasename";
+
+$db = DB::Connect($dsn);
+$db->setFetchMode(ADODB_FETCH_ASSOC);
+$rs = $db->Query('select firstname,lastname from adoxyz');
+$cnt = 0;
+while ($arr = $rs->FetchRow()) {
+	print_r($arr);
+	print "<br>";
+	$cnt += 1;
+}
+
+if ($cnt != 50) print "<b>Error in \$cnt = $cnt</b>";
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/testsessions.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/testsessions.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/testsessions.php	(revision 225)
@@ -0,0 +1,90 @@
+<?php
+
+/* 
+V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence. 
+  Set tabs to 4 for best viewing.
+	
+  Latest version is available at http://adodb.sourceforge.net
+*/
+
+function NotifyExpire($ref,$key)
+{
+	print "<p><b>Notify Expiring=$ref, sessionkey=$key</b></p>";
+}
+
+//-------------------------------------------------------------------
+	
+error_reporting(E_ALL);
+
+
+ob_start();
+include('../session/adodb-cryptsession2.php');
+
+$options['debug'] = 99;
+$db = 'postgres';
+
+#### CONNECTION
+switch($db) {
+case 'oci8': 
+	$options['table'] = 'adodb_sessions2';
+	ADOdb_Session::config('oci8', '', 'jcollect', 'natsoft', '',$options);
+	break;
+
+case 'postgres':
+	ADOdb_Session::config('postgres', 'localhost', 'tester', 'test', 'test',$options);
+	break;
+	
+case 'mysql':
+default:
+	ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options);
+	break;
+
+
+}
+	
+
+	
+#### SETUP NOTIFICATION
+	$USER = 'JLIM'.rand();
+	$ADODB_SESSION_EXPIRE_NOTIFY = array('USER','NotifyExpire');
+
+	adodb_session_create_table();
+	session_start();
+
+	adodb_session_regenerate_id();
+	
+### SETUP SESSION VARIABLES 
+	if (empty($_SESSION['MONKEY'])) $_SESSION['MONKEY'] = array(1,'abc',44.41);
+	else $_SESSION['MONKEY'][0] += 1;
+	if (!isset($_GET['nochange'])) @$_SESSION['AVAR'] += 1;
+
+	
+### START DISPLAY
+	print "<h3>PHP ".PHP_VERSION."</h3>";
+	print "<p><b>\$_SESSION['AVAR']={$_SESSION['AVAR']}</b></p>";
+	
+	print "<hr /> <b>Cookies</b>: ";
+	print_r($_COOKIE);
+	
+	var_dump($_SESSION['MONKEY']);
+	
+### RANDOMLY PERFORM Garbage Collection
+### In real-production environment, this is done for you
+### by php's session extension, which calls adodb_sess_gc()
+### automatically for you. See php.ini's
+### session.cookie_lifetime and session.gc_probability
+
+	if (rand() % 5 == 0) {
+	
+		print "<hr /><p><b>Garbage Collection</b></p>";
+		adodb_sess_gc(10);
+		
+		if (rand() % 2 == 0) {
+			print "<p>Random session destroy</p>";
+			session_destroy();
+		}
+	}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/time.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/time.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/time.php	(revision 225)
@@ -0,0 +1,17 @@
+<?php
+
+include_once('../adodb-time.inc.php');
+//adodb_date_test();
+?>
+<?php 
+//require("adodb-time.inc.php"); 
+
+$datestring = "1963-12-04"; // string normally from mySQL 
+$stringArray = explode("-", $datestring);
+$date = adodb_mktime(0,0,0,$stringArray[1],$stringArray[2],$stringArray[0]); 
+
+$convertedDate = date("d-M-Y", $date); // converted string to UK style date
+
+echo( "Birthday: $convertedDate" ); //why is string returned as one day (3 not 4) less for this example??
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/tmssql.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/tmssql.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/tmssql.php	(revision 225)
@@ -0,0 +1,80 @@
+<?php
+error_reporting(E_ALL);
+ini_set('mssql.datetimeconvert',0); 
+
+function tmssql()
+{
+	print "<h3>mssql</h3>";
+	$db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection');
+	mssql_select_db('northwind',$db);
+	
+	$rs = mssql_query('select getdate() as date',$db);
+	$o = mssql_fetch_row($rs);
+	print_r($o);
+	mssql_free_result($rs);
+	
+	print "<p>Delete</p>"; flush();
+	$rs2 = mssql_query('delete from adoxyz',$db);
+	$p = mssql_num_rows($rs2);
+	mssql_free_result($rs2);
+
+}
+
+function tpear()
+{
+include_once('DB.php');
+
+	print "<h3>PEAR</h3>";
+	$username = 'adodb';
+	$password = 'natsoft';
+	$hostname = 'JAGUAR\vsdotnet';
+	$databasename = 'northwind';
+	
+	$dsn = "mssql://$username:$password@$hostname/$databasename";
+	$conn = &DB::connect($dsn);
+	print "date=".$conn->GetOne('select getdate()')."<br>";
+	@$conn->query('create table tester (id integer)');
+	print "<p>Delete</p>"; flush();
+	$rs = $conn->query('delete from tester');
+	print "date=".$conn->GetOne('select getdate()')."<br>";
+}
+
+function tadodb()
+{
+include_once('../adodb.inc.php');
+
+	print "<h3>ADOdb</h3>";
+	$conn = NewADOConnection('mssql');
+	$conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind');
+//	$conn->debug=1;
+	print "date=".$conn->GetOne('select getdate()')."<br>";
+	$conn->Execute('create table tester (id integer)');
+	print "<p>Delete</p>"; flush();
+	$rs = $conn->Execute('delete from tester');
+	print "date=".$conn->GetOne('select getdate()')."<br>";
+}
+
+
+$ACCEPTIP = '127.0.0.1';
+
+$remote = $_SERVER["REMOTE_ADDR"]; 
+
+if (!empty($ACCEPTIP))
+ if ($remote != '127.0.0.1' && $remote != $ACCEPTIP) 
+ 	die("Unauthorised client: '$remote'");
+	
+?>
+<a href=tmssql.php?do=tmssql>mssql</a>
+<a href=tmssql.php?do=tpear>pear</a>
+<a href=tmssql.php?do=tadodb>adodb</a>
+<?php
+if (!empty($_GET['do'])) {
+	$do = $_GET['do'];
+	switch($do) {
+	case 'tpear':
+	case 'tadodb':
+	case 'tmssql':
+		$do();
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/xmlschema-mssql.xml
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/xmlschema-mssql.xml	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/xmlschema-mssql.xml	(revision 225)
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<schema version="0.3">
+<table name="simple_table">
+<field name="id" type="I" size="11">
+<KEY/>
+<AUTOINCREMENT/>
+</field>
+<field name="name" type="C" size="3">
+<DEFAULT value="no"/>
+</field>
+<field name="description" type="X"></field>
+<index name="id">
+<UNIQUE/>
+<col>id</col>
+</index>
+<index name="id_2">
+<col>id</col>
+</index>
+<data>
+</data>
+</table>
+  <sql>
+    <descr>SQL to be executed only on specific platforms</descr>
+    <query platform="postgres|postgres7">
+      insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' )
+    </query>
+    <query platform="mysql">
+      insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' )
+    </query>
+	<query platform="mssql">
+      INSERT into simple_table ( name, description ) values ( '12', 'Microsoft stuff' )
+    </query>
+  </sql>
+</schema>
Index: Dev/branches/Demo/rdfapi/util/adodb/tests/xmlschema.xml
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tests/xmlschema.xml	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tests/xmlschema.xml	(revision 225)
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<schema version="0.3">
+  <table name="mytable">
+    <field name="row1" type="I">
+      <descr>An integer row that's a primary key and autoincrements</descr>
+      <KEY/>
+      <AUTOINCREMENT/>
+    </field>
+    <field name="row2" type="C" size="16">
+      <descr>A 16 character varchar row that can't be null</descr>
+      <NOTNULL/>
+    </field>
+    <index name="myindex">
+      <col>row1</col>
+      <col>row2</col>
+    </index>
+  </table>
+  <sql>
+    <descr>SQL to be executed only on specific platforms</descr>
+    <query platform="postgres|postgres7">
+      insert into mytable ( row1, row2 ) values ( 12, 'postgres stuff' )
+    </query>
+    <query platform="mysql">
+      insert into mytable ( row1, row2 ) values ( 12, 'mysql stuff' )
+    </query>
+	<query platform="mssql">
+      insert into mytable ( row1, row2 ) values ( 12, 'Microsoft stuff' )
+    </query>
+  </sql>
+  <table name="obsoletetable">
+    <DROP/>
+  </table>
+</schema>
Index: Dev/branches/Demo/rdfapi/util/adodb/toexport.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/toexport.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/toexport.inc.php	(revision 225)
@@ -0,0 +1,133 @@
+<?php
+
+/** 
+ * @version V4.93 10 Oct 2006 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+ * Released under both BSD license and Lesser GPL library license. 
+ * Whenever there is any discrepancy between the two licenses, 
+ * the BSD license will take precedence. 
+ *
+ * Code to export recordsets in several formats:
+ *
+ * AS VARIABLE
+ * $s = rs2csv($rs); # comma-separated values
+ * $s = rs2tab($rs); # tab delimited
+ * 
+ * TO A FILE
+ * $f = fopen($path,'w');
+ * rs2csvfile($rs,$f);
+ * fclose($f);
+ *
+ * TO STDOUT
+ * rs2csvout($rs);
+ */
+ 
+// returns a recordset as a csv string
+function rs2csv(&$rs,$addtitles=true)
+{
+	return _adodb_export($rs,',',',',false,$addtitles);
+}
+
+// writes recordset to csv file 
+function rs2csvfile(&$rs,$fp,$addtitles=true)
+{
+	_adodb_export($rs,',',',',$fp,$addtitles);
+}
+
+// write recordset as csv string to stdout
+function rs2csvout(&$rs,$addtitles=true)
+{
+	$fp = fopen('php://stdout','wb');
+	_adodb_export($rs,',',',',true,$addtitles);
+	fclose($fp);
+}
+
+function rs2tab(&$rs,$addtitles=true)
+{
+	return _adodb_export($rs,"\t",',',false,$addtitles);
+}
+
+// to file pointer
+function rs2tabfile(&$rs,$fp,$addtitles=true)
+{
+	_adodb_export($rs,"\t",',',$fp,$addtitles);
+}
+
+// to stdout
+function rs2tabout(&$rs,$addtitles=true)
+{
+	$fp = fopen('php://stdout','wb');
+	_adodb_export($rs,"\t",' ',true,$addtitles);
+	if ($fp) fclose($fp);
+}
+
+function _adodb_export(&$rs,$sep,$sepreplace,$fp=false,$addtitles=true,$quote = '"',$escquote = '"',$replaceNewLine = ' ')
+{
+	if (!$rs) return '';
+	//----------
+	// CONSTANTS
+	$NEWLINE = "\r\n";
+	$BUFLINES = 100;
+	$escquotequote = $escquote.$quote;
+	$s = '';
+	
+	if ($addtitles) {
+		$fieldTypes = $rs->FieldTypesArray();
+		reset($fieldTypes);
+		while(list(,$o) = each($fieldTypes)) {
+			
+			$v = $o->name;
+			if ($escquote) $v = str_replace($quote,$escquotequote,$v);
+			$v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v))));
+			$elements[] = $v;
+			
+		}
+		$s .= implode($sep, $elements).$NEWLINE;
+	}
+	$hasNumIndex = isset($rs->fields[0]);
+	
+	$line = 0;
+	$max = $rs->FieldCount();
+	
+	while (!$rs->EOF) {
+		$elements = array();
+		$i = 0;
+		
+		if ($hasNumIndex) {
+			for ($j=0; $j < $max; $j++) {
+				$v = $rs->fields[$j];
+				if (!is_object($v)) $v = trim($v);
+				else $v = 'Object';
+				if ($escquote) $v = str_replace($quote,$escquotequote,$v);
+				$v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v))));
+				
+				if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote";
+				else $elements[] = $v;
+			}
+		} else { // ASSOCIATIVE ARRAY
+			foreach($rs->fields as $v) {
+				if ($escquote) $v = str_replace($quote,$escquotequote,trim($v));
+				$v = strip_tags(str_replace("\n", $replaceNewLine, str_replace("\r\n",$replaceNewLine,str_replace($sep,$sepreplace,$v))));
+				
+				if (strpos($v,$sep) !== false || strpos($v,$quote) !== false) $elements[] = "$quote$v$quote";
+				else $elements[] = $v;
+			}
+		}
+		$s .= implode($sep, $elements).$NEWLINE;
+		$rs->MoveNext();
+		$line += 1;
+		if ($fp && ($line % $BUFLINES) == 0) {
+			if ($fp === true) echo $s;
+			else fwrite($fp,$s);
+			$s = '';
+		}
+	}
+	
+	if ($fp) {
+		if ($fp === true) echo $s;
+		else fwrite($fp,$s);
+		$s = '';
+	}
+	
+	return $s;
+}
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/tohtml.inc.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/tohtml.inc.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/tohtml.inc.php	(revision 225)
@@ -0,0 +1,195 @@
+<?php 
+/*
+  V4.93 10 Oct 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+  
+  Some pretty-printing by Chris Oxenreider <oxenreid@state.net>
+*/ 
+  
+// specific code for tohtml
+GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND;
+
+$ADODB_ROUND=4; // rounding
+$gSQLMaxRows = 1000; // max no of rows to download
+$gSQLBlockRows=20; // max no of rows per table block
+
+// RecordSet to HTML Table
+//------------------------------------------------------------
+// Convert a recordset to a html table. Multiple tables are generated
+// if the number of rows is > $gSQLBlockRows. This is because
+// web browsers normally require the whole table to be downloaded
+// before it can be rendered, so we break the output into several
+// smaller faster rendering tables.
+//
+// $rs: the recordset
+// $ztabhtml: the table tag attributes (optional)
+// $zheaderarray: contains the replacement strings for the headers (optional)
+//
+//  USAGE:
+//	include('adodb.inc.php');
+//	$db = ADONewConnection('mysql');
+//	$db->Connect('mysql','userid','password','database');
+//	$rs = $db->Execute('select col1,col2,col3 from table');
+//	rs2html($rs, 'BORDER=2', array('Title1', 'Title2', 'Title3'));
+//	$rs->Close();
+//
+// RETURNS: number of rows displayed
+
+
+function rs2html(&$rs,$ztabhtml=false,$zheaderarray=false,$htmlspecialchars=true,$echo = true)
+{
+$s ='';$rows=0;$docnt = false;
+GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND;
+
+	if (!$rs) {
+		printf(ADODB_BAD_RS,'rs2html');
+		return false;
+	}
+	
+	if (! $ztabhtml) $ztabhtml = "BORDER='1' WIDTH='98%'";
+	//else $docnt = true;
+	$typearr = array();
+	$ncols = $rs->FieldCount();
+	$hdr = "<TABLE COLS=$ncols $ztabhtml><tr>\n\n";
+	for ($i=0; $i < $ncols; $i++) {	
+		$field = $rs->FetchField($i);
+		if ($field) {
+			if ($zheaderarray) $fname = $zheaderarray[$i];
+			else $fname = htmlspecialchars($field->name);	
+			$typearr[$i] = $rs->MetaType($field->type,$field->max_length);
+ 			//print " $field->name $field->type $typearr[$i] ";
+		} else {
+			$fname = 'Field '.($i+1);
+			$typearr[$i] = 'C';
+		}
+		if (strlen($fname)==0) $fname = '&nbsp;';
+		$hdr .= "<TH>$fname</TH>";
+	}
+	$hdr .= "\n</tr>";
+	if ($echo) print $hdr."\n\n";
+	else $html = $hdr;
+	
+	// smart algorithm - handles ADODB_FETCH_MODE's correctly by probing...
+	$numoffset = isset($rs->fields[0]) ||isset($rs->fields[1]) || isset($rs->fields[2]);
+	while (!$rs->EOF) {
+		
+		$s .= "<TR valign=top>\n";
+		
+		for ($i=0; $i < $ncols; $i++) {
+			if ($i===0) $v=($numoffset) ? $rs->fields[0] : reset($rs->fields);
+			else $v = ($numoffset) ? $rs->fields[$i] : next($rs->fields);
+			
+			$type = $typearr[$i];
+			switch($type) {
+			case 'D':
+				if (empty($v)) $s .= "<TD> &nbsp; </TD>\n";
+				else if (!strpos($v,':')) {
+					$s .= "	<TD>".$rs->UserDate($v,"D d, M Y") ."&nbsp;</TD>\n";
+				}
+				break;
+			case 'T':
+				if (empty($v)) $s .= "<TD> &nbsp; </TD>\n";
+				else $s .= "	<TD>".$rs->UserTimeStamp($v,"D d, M Y, h:i:s") ."&nbsp;</TD>\n";
+			break;
+			
+			case 'N':
+				if (abs(abs($v) - round($v,0)) < 0.00000001)
+					$v = round($v);
+				else
+					$v = round($v,$ADODB_ROUND);
+			case 'I':
+				$s .= "	<TD align=right>".stripslashes((trim($v))) ."&nbsp;</TD>\n";
+			   	
+			break;
+			/*
+			case 'B':
+				if (substr($v,8,2)=="BM" ) $v = substr($v,8);
+				$mtime = substr(str_replace(' ','_',microtime()),2);
+				$tmpname = "tmp/".uniqid($mtime).getmypid();
+				$fd = @fopen($tmpname,'a');
+				@ftruncate($fd,0);
+				@fwrite($fd,$v);
+				@fclose($fd);
+				if (!function_exists ("mime_content_type")) {
+				  function mime_content_type ($file) {
+				    return exec("file -bi ".escapeshellarg($file));
+				  }
+				}
+				$t = mime_content_type($tmpname);
+				$s .= (substr($t,0,5)=="image") ? " <td><img src='$tmpname' alt='$t'></td>\\n" : " <td><a
+				href='$tmpname'>$t</a></td>\\n";
+				break;
+			*/
+
+			default:
+				if ($htmlspecialchars) $v = htmlspecialchars(trim($v));
+				$v = trim($v);
+				if (strlen($v) == 0) $v = '&nbsp;';
+				$s .= "	<TD>". str_replace("\n",'<br>',stripslashes($v)) ."</TD>\n";
+			  
+			}
+		} // for
+		$s .= "</TR>\n\n";
+			  
+		$rows += 1;
+		if ($rows >= $gSQLMaxRows) {
+			$rows = "<p>Truncated at $gSQLMaxRows</p>";
+			break;
+		} // switch
+
+		$rs->MoveNext();
+	
+	// additional EOF check to prevent a widow header
+		if (!$rs->EOF && $rows % $gSQLBlockRows == 0) {
+	
+		//if (connection_aborted()) break;// not needed as PHP aborts script, unlike ASP
+			if ($echo) print $s . "</TABLE>\n\n";
+			else $html .= $s ."</TABLE>\n\n";
+			$s = $hdr;
+		}
+	} // while
+
+	if ($echo) print $s."</TABLE>\n\n";
+	else $html .= $s."</TABLE>\n\n";
+	
+	if ($docnt) if ($echo) print "<H2>".$rows." Rows</H2>";
+	
+	return ($echo) ? $rows : $html;
+ }
+ 
+// pass in 2 dimensional array
+function arr2html(&$arr,$ztabhtml='',$zheaderarray='')
+{
+	if (!$ztabhtml) $ztabhtml = 'BORDER=1';
+	
+	$s = "<TABLE $ztabhtml>";//';print_r($arr);
+
+	if ($zheaderarray) {
+		$s .= '<TR>';
+		for ($i=0; $i<sizeof($zheaderarray); $i++) {
+			$s .= "	<TH>{$zheaderarray[$i]}</TH>\n";
+		}
+		$s .= "\n</TR>";
+	}
+	
+	for ($i=0; $i<sizeof($arr); $i++) {
+		$s .= '<TR>';
+		$a = &$arr[$i];
+		if (is_array($a)) 
+			for ($j=0; $j<sizeof($a); $j++) {
+				$val = $a[$j];
+				if (empty($val)) $val = '&nbsp;';
+				$s .= "	<TD>$val</TD>\n";
+			}
+		else if ($a) {
+			$s .=  '	<TD>'.$a."</TD>\n";
+		} else $s .= "	<TD>&nbsp;</TD>\n";
+		$s .= "\n</TR>\n";
+	}
+	$s .= '</TABLE>';
+	print $s;
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/adodb/xmlschema.dtd
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xmlschema.dtd	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xmlschema.dtd	(revision 225)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE adodb_schema [
+<!ELEMENT schema (table*, sql*)>
+<!ATTLIST schema version CDATA #REQUIRED>
+<!ELEMENT table ((field+|DROP), CONSTRAINT*, descr?, index*, data*)>
+<!ELEMENT field ((NOTNULL|KEY|PRIMARY)?, (AUTO|AUTOINCREMENT)?, (DEFAULT|DEFDATE|DEFTIMESTAMP)?, 
+NOQUOTE?, CONSTRAINT*, descr?)>
+<!ELEMENT data (row+)>
+<!ELEMENT row (f+)>
+<!ELEMENT f (#CDATA)>
+<!ELEMENT descr (#CDATA)>
+<!ELEMENT NOTNULL EMPTY>
+<!ELEMENT KEY EMPTY>
+<!ELEMENT PRIMARY EMPTY>
+<!ELEMENT AUTO EMPTY>
+<!ELEMENT AUTOINCREMENT EMPTY>
+<!ELEMENT DEFAULT EMPTY>
+<!ELEMENT DEFDATE EMPTY>
+<!ELEMENT DEFTIMESTAMP EMPTY>
+<!ELEMENT NOQUOTE EMPTY>
+<!ELEMENT DROP EMPTY>
+<!ELEMENT CONSTRAINT (#CDATA)>
+<!ATTLIST table name CDATA #REQUIRED platform CDATA #IMPLIED version CDATA #IMPLIED>
+<!ATTLIST field name CDATA #REQUIRED type (C|C2|X|X2|B|D|T|L|I|F|N) #REQUIRED size CDATA #IMPLIED>
+<!ATTLIST data platform CDATA #IMPLIED>
+<!ATTLIST f name CDATA #IMPLIED>
+<!ATTLIST DEFAULT VALUE CDATA #REQUIRED>
+<!ELEMENT index ((col+|DROP), CLUSTERED?, BITMAP?, UNIQUE?, FULLTEXT?, HASH?, descr?)>
+<!ELEMENT col (#CDATA)>
+<!ELEMENT CLUSTERED EMPTY>
+<!ELEMENT BITMAP EMPTY>
+<!ELEMENT UNIQUE EMPTY>
+<!ELEMENT FULLTEXT EMPTY>
+<!ELEMENT HASH EMPTY>
+<!ATTLIST index name CDATA #REQUIRED platform CDATA #IMPLIED>
+<!ELEMENT sql (query+, descr?)>
+<!ELEMENT query (#CDATA)>
+<!ATTLIST sql name CDATA #IMPLIED platform CDATA #IMPLIED, key CDATA, prefixmethod (AUTO|MANUAL|NONE) >
+] >
Index: Dev/branches/Demo/rdfapi/util/adodb/xmlschema03.dtd
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xmlschema03.dtd	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xmlschema03.dtd	(revision 225)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE adodb_schema [
+<!ELEMENT schema (table*, sql*)>
+<!ATTLIST schema version CDATA #REQUIRED>
+<!ELEMENT table (descr?, (field+|DROP), constraint*, opt*, index*, data*)>
+<!ATTLIST table name CDATA #REQUIRED platform CDATA #IMPLIED version CDATA #IMPLIED>
+<!ELEMENT field (descr?, (NOTNULL|KEY|PRIMARY)?, (AUTO|AUTOINCREMENT)?, (DEFAULT|DEFDATE|DEFTIMESTAMP)?, NOQUOTE?, UNSIGNED?, constraint*, opt*)>
+<!ATTLIST field name CDATA #REQUIRED type (C|C2|X|X2|B|D|T|L|I|F|N) #REQUIRED size CDATA #IMPLIED opts CDATA #IMPLIED>
+<!ELEMENT data (descr?, row+)>
+<!ATTLIST data platform CDATA #IMPLIED>
+<!ELEMENT row (f+)>
+<!ELEMENT f (#CDATA)>
+<!ATTLIST f name CDATA #IMPLIED>
+<!ELEMENT descr (#CDATA)>
+<!ELEMENT NOTNULL EMPTY>
+<!ELEMENT KEY EMPTY>
+<!ELEMENT PRIMARY EMPTY>
+<!ELEMENT AUTO EMPTY>
+<!ELEMENT AUTOINCREMENT EMPTY>
+<!ELEMENT DEFAULT EMPTY>
+<!ATTLIST DEFAULT value CDATA #REQUIRED>
+<!ELEMENT DEFDATE EMPTY>
+<!ELEMENT DEFTIMESTAMP EMPTY>
+<!ELEMENT NOQUOTE EMPTY>
+<!ELEMENT UNSIGNED EMPTY>
+<!ELEMENT DROP EMPTY>
+<!ELEMENT constraint (#CDATA)>
+<!ATTLIST constraint platform CDATA #IMPLIED>
+<!ELEMENT opt (#CDATA)>
+<!ATTLIST opt platform CDATA #IMPLIED>
+<!ELEMENT index ((col+|DROP), CLUSTERED?, BITMAP?, UNIQUE?, FULLTEXT?, HASH?, descr?)>
+<!ATTLIST index name CDATA #REQUIRED platform CDATA #IMPLIED>
+<!ELEMENT col (#CDATA)>
+<!ELEMENT CLUSTERED EMPTY>
+<!ELEMENT BITMAP EMPTY>
+<!ELEMENT UNIQUE EMPTY>
+<!ELEMENT FULLTEXT EMPTY>
+<!ELEMENT HASH EMPTY>
+<!ELEMENT sql (query+, descr?)>
+<!ATTLIST sql name CDATA #IMPLIED platform CDATA #IMPLIED, key CDATA, prefixmethod (AUTO|MANUAL|NONE)>
+<!ELEMENT query (#CDATA)>
+<!ATTLIST query platform CDATA #IMPLIED>
+]>
Index: Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.1-0.2.xsl
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.1-0.2.xsl	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.1-0.2.xsl	(revision 225)
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/>
+	
+	<!-- Schema -->
+	<xsl:template match="/">
+		<xsl:comment>
+ADODB XMLSchema
+http://adodb-xmlschema.sourceforge.net
+</xsl:comment>
+		
+		<xsl:element name="schema">
+			<xsl:attribute name="version">0.2</xsl:attribute>
+			
+			<xsl:apply-templates select="schema/table|schema/sql"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Table -->
+	<xsl:template match="table">
+		<xsl:variable name="table_name" select="@name"/>
+		
+		<xsl:element name="table">
+			<xsl:attribute name="name"><xsl:value-of select="$table_name"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@version) > 0">
+				<xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="field"/>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<xsl:apply-templates select="constraint"/>
+			
+			<xsl:apply-templates select="../index[@table=$table_name]"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Field -->
+	<xsl:template match="field">
+		<xsl:element name="field">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			<xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@size) > 0">
+				<xsl:attribute name="size"><xsl:value-of select="@size"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="count(PRIMARY) > 0">
+					<xsl:element name="PRIMARY"/>
+				</xsl:when>
+				<xsl:when test="count(KEY) > 0">
+					<xsl:element name="KEY"/>
+				</xsl:when>
+				<xsl:when test="count(NOTNULL) > 0">
+					<xsl:element name="NOTNULL"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(AUTO) > 0">
+					<xsl:element name="AUTO"/>
+				</xsl:when>
+				<xsl:when test="count(AUTOINCREMENT) > 0">
+					<xsl:element name="AUTOINCREMENT"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(DEFAULT) > 0">
+					<xsl:element name="DEFAULT">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFAULT[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFDATE) > 0">
+					<xsl:element name="DEFDATE">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFDATE[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFTIMESTAMP) > 0">
+					<xsl:element name="DEFTIMESTAMP">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFTIMESTAMP[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:if test="count(NOQUOTE) > 0">
+				<xsl:element name="NOQUOTE"/>
+			</xsl:if>
+			
+			<xsl:apply-templates select="constraint"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Constraint -->
+	<xsl:template match="constraint">
+		<xsl:element name="constraint">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index -->
+	<xsl:template match="index">
+		<xsl:element name="index">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:if test="count(CLUSTERED) > 0">
+				<xsl:element name="CLUSTERED"/>
+			</xsl:if>
+			
+			<xsl:if test="count(BITMAP) > 0">
+				<xsl:element name="BITMAP"/>
+			</xsl:if>
+			
+			<xsl:if test="count(UNIQUE) > 0">
+				<xsl:element name="UNIQUE"/>
+			</xsl:if>
+			
+			<xsl:if test="count(FULLTEXT) > 0">
+				<xsl:element name="FULLTEXT"/>
+			</xsl:if>
+			
+			<xsl:if test="count(HASH) > 0">
+				<xsl:element name="HASH"/>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="col"/>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index Column -->
+	<xsl:template match="col">
+		<xsl:element name="col">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- SQL QuerySet -->
+	<xsl:template match="sql">
+		<xsl:element name="sql">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@key) > 0">
+				<xsl:attribute name="key"><xsl:value-of select="@key"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@prefixmethod) > 0">
+				<xsl:attribute name="prefixmethod"><xsl:value-of select="@prefixmethod"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			<xsl:apply-templates select="query"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Query -->
+	<xsl:template match="query">
+		<xsl:element name="query">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Description -->
+	<xsl:template match="descr">
+		<xsl:element name="descr">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+</xsl:stylesheet>
Index: Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.1-0.3.xsl
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.1-0.3.xsl	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.1-0.3.xsl	(revision 225)
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/>
+	
+	<!-- Schema -->
+	<xsl:template match="/">
+		<xsl:comment>
+ADODB XMLSchema
+http://adodb-xmlschema.sourceforge.net
+</xsl:comment>
+		
+		<xsl:element name="schema">
+			<xsl:attribute name="version">0.3</xsl:attribute>
+			
+			<xsl:apply-templates select="schema/table|schema/sql"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Table -->
+	<xsl:template match="table">
+		<xsl:variable name="table_name" select="@name"/>
+		
+		<xsl:element name="table">
+			<xsl:attribute name="name"><xsl:value-of select="$table_name"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@version) > 0">
+				<xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="field"/>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<xsl:apply-templates select="constraint"/>
+			
+			<xsl:apply-templates select="../index[@table=$table_name]"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Field -->
+	<xsl:template match="field">
+		<xsl:element name="field">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			<xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@size) > 0">
+				<xsl:attribute name="size"><xsl:value-of select="@size"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="string-length(@opts) = 0"/>
+				<xsl:when test="@opts = 'UNSIGNED'">
+					<xsl:element name="UNSIGNED"/>
+				</xsl:when>
+				<xsl:when test="contains(@opts,'UNSIGNED')">
+					<xsl:attribute name="opts">
+						<xsl:value-of select="concat(substring-before(@opts,'UNSIGNED'),substring-after(@opts,'UNSIGNED'))"/>
+					</xsl:attribute>
+					<xsl:element name="UNSIGNED"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:attribute name="opts"><xsl:value-of select="@opts"/></xsl:attribute>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(PRIMARY) > 0">
+					<xsl:element name="PRIMARY"/>
+				</xsl:when>
+				<xsl:when test="count(KEY) > 0">
+					<xsl:element name="KEY"/>
+				</xsl:when>
+				<xsl:when test="count(NOTNULL) > 0">
+					<xsl:element name="NOTNULL"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(AUTO) > 0">
+					<xsl:element name="AUTO"/>
+				</xsl:when>
+				<xsl:when test="count(AUTOINCREMENT) > 0">
+					<xsl:element name="AUTOINCREMENT"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(DEFAULT) > 0">
+					<xsl:element name="DEFAULT">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFAULT[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFDATE) > 0">
+					<xsl:element name="DEFDATE">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFDATE[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFTIMESTAMP) > 0">
+					<xsl:element name="DEFTIMESTAMP">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFTIMESTAMP[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:if test="count(NOQUOTE) > 0">
+				<xsl:element name="NOQUOTE"/>
+			</xsl:if>
+			
+			<xsl:apply-templates select="constraint"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Constraint -->
+	<xsl:template match="constraint">
+		<xsl:element name="constraint">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index -->
+	<xsl:template match="index">
+		<xsl:element name="index">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:if test="count(CLUSTERED) > 0">
+				<xsl:element name="CLUSTERED"/>
+			</xsl:if>
+			
+			<xsl:if test="count(BITMAP) > 0">
+				<xsl:element name="BITMAP"/>
+			</xsl:if>
+			
+			<xsl:if test="count(UNIQUE) > 0">
+				<xsl:element name="UNIQUE"/>
+			</xsl:if>
+			
+			<xsl:if test="count(FULLTEXT) > 0">
+				<xsl:element name="FULLTEXT"/>
+			</xsl:if>
+			
+			<xsl:if test="count(HASH) > 0">
+				<xsl:element name="HASH"/>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="col"/>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index Column -->
+	<xsl:template match="col">
+		<xsl:element name="col">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- SQL QuerySet -->
+	<xsl:template match="sql">
+		<xsl:element name="sql">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@key) > 0">
+				<xsl:attribute name="key"><xsl:value-of select="@key"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@prefixmethod) > 0">
+				<xsl:attribute name="prefixmethod"><xsl:value-of select="@prefixmethod"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			<xsl:apply-templates select="query"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Query -->
+	<xsl:template match="query">
+		<xsl:element name="query">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Description -->
+	<xsl:template match="descr">
+		<xsl:element name="descr">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+</xsl:stylesheet>
Index: Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.2-0.1.xsl
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.2-0.1.xsl	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.2-0.1.xsl	(revision 225)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/>
+	
+	<!-- Schema -->
+	<xsl:template match="/">
+		<xsl:comment>
+ADODB XMLSchema
+http://adodb-xmlschema.sourceforge.net
+</xsl:comment>
+		
+		<xsl:element name="schema">
+			<xsl:attribute name="version">0.1</xsl:attribute>
+			
+			<xsl:apply-templates select="schema/table|schema/sql"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Table -->
+	<xsl:template match="table">
+		<xsl:variable name="table_name" select="@name"/>
+		
+		<xsl:element name="table">
+			<xsl:attribute name="name"><xsl:value-of select="$table_name"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@version) > 0">
+				<xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="field"/>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<xsl:apply-templates select="constraint"/>
+			
+		</xsl:element>
+		
+		<xsl:apply-templates select="index"/>
+	</xsl:template>
+	
+	<!-- Field -->
+	<xsl:template match="field">
+		<xsl:element name="field">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			<xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@size) > 0">
+				<xsl:attribute name="size"><xsl:value-of select="@size"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="count(PRIMARY) > 0">
+					<xsl:element name="PRIMARY"/>
+				</xsl:when>
+				<xsl:when test="count(KEY) > 0">
+					<xsl:element name="KEY"/>
+				</xsl:when>
+				<xsl:when test="count(NOTNULL) > 0">
+					<xsl:element name="NOTNULL"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(AUTO) > 0">
+					<xsl:element name="AUTO"/>
+				</xsl:when>
+				<xsl:when test="count(AUTOINCREMENT) > 0">
+					<xsl:element name="AUTOINCREMENT"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(DEFAULT) > 0">
+					<xsl:element name="DEFAULT">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFAULT[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFDATE) > 0">
+					<xsl:element name="DEFDATE">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFDATE[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFTIMESTAMP) > 0">
+					<xsl:element name="DEFDTIMESTAMP">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFTIMESTAMP[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:if test="count(NOQUOTE) > 0">
+				<xsl:element name="NOQUOTE"/>
+			</xsl:if>
+			
+			<xsl:apply-templates select="constraint"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Constraint -->
+	<xsl:template match="constraint">
+		<xsl:element name="constraint">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index -->
+	<xsl:template match="index">
+		<xsl:element name="index">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			<xsl:attribute name="table"><xsl:value-of select="../@name"/></xsl:attribute>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:if test="count(CLUSTERED) > 0">
+				<xsl:element name="CLUSTERED"/>
+			</xsl:if>
+			
+			<xsl:if test="count(BITMAP) > 0">
+				<xsl:element name="BITMAP"/>
+			</xsl:if>
+			
+			<xsl:if test="count(UNIQUE) > 0">
+				<xsl:element name="UNIQUE"/>
+			</xsl:if>
+			
+			<xsl:if test="count(FULLTEXT) > 0">
+				<xsl:element name="FULLTEXT"/>
+			</xsl:if>
+			
+			<xsl:if test="count(HASH) > 0">
+				<xsl:element name="HASH"/>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="col"/>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index Column -->
+	<xsl:template match="col">
+		<xsl:element name="col">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- SQL QuerySet -->
+	<xsl:template match="sql">
+		<xsl:element name="sql">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@key) > 0">
+				<xsl:attribute name="key"><xsl:value-of select="@key"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@prefixmethod) > 0">
+				<xsl:attribute name="prefixmethod"><xsl:value-of select="@prefixmethod"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			<xsl:apply-templates select="query"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Query -->
+	<xsl:template match="query">
+		<xsl:element name="query">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Description -->
+	<xsl:template match="descr">
+		<xsl:element name="descr">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+</xsl:stylesheet>
Index: Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.2-0.3.xsl
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.2-0.3.xsl	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xsl/convert-0.2-0.3.xsl	(revision 225)
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/>
+	
+	<!-- Schema -->
+	<xsl:template match="/">
+		<xsl:comment>
+ADODB XMLSchema
+http://adodb-xmlschema.sourceforge.net
+</xsl:comment>
+		
+		<xsl:element name="schema">
+			<xsl:attribute name="version">0.3</xsl:attribute>
+			
+			<xsl:apply-templates select="schema/table|schema/sql"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Table -->
+	<xsl:template match="table">
+		<xsl:element name="table">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@version) > 0">
+				<xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="field"/>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<xsl:apply-templates select="constraint"/>
+			
+			<xsl:apply-templates select="opt"/>
+			
+			<xsl:apply-templates select="index"/>
+			
+			<xsl:apply-templates select="data"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Field -->
+	<xsl:template match="field">
+		<xsl:element name="field">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			<xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
+			
+			<xsl:if test="string-length(@size) > 0">
+				<xsl:attribute name="size"><xsl:value-of select="@size"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="string-length(@opts) = 0">
+					<xsl:if test="count(UNSIGNED) > 0">
+						<xsl:element name="UNSIGNED"/>
+					</xsl:if>
+				</xsl:when>
+				<xsl:when test="@opts = 'UNSIGNED'">
+					<xsl:element name="UNSIGNED"/>
+				</xsl:when>
+				<xsl:when test="contains(@opts,'UNSIGNED')">
+					<xsl:attribute name="opts">
+						<xsl:value-of select="concat(substring-before(@opts,'UNSIGNED'),substring-after(@opts,'UNSIGNED'))"/>
+					</xsl:attribute>
+					<xsl:element name="UNSIGNED"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:attribute name="opts"><xsl:value-of select="@opts"/></xsl:attribute>
+					<xsl:if test="count(UNSIGNED) > 0">
+						<xsl:element name="UNSIGNED"/>
+					</xsl:if>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:choose>
+				<xsl:when test="count(PRIMARY) > 0">
+					<xsl:element name="PRIMARY"/>
+				</xsl:when>
+				<xsl:when test="count(KEY) > 0">
+					<xsl:element name="KEY"/>
+				</xsl:when>
+				<xsl:when test="count(NOTNULL) > 0">
+					<xsl:element name="NOTNULL"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(AUTO) > 0">
+					<xsl:element name="AUTO"/>
+				</xsl:when>
+				<xsl:when test="count(AUTOINCREMENT) > 0">
+					<xsl:element name="AUTOINCREMENT"/>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:choose>
+				<xsl:when test="count(DEFAULT) > 0">
+					<xsl:element name="DEFAULT">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFAULT[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFDATE) > 0">
+					<xsl:element name="DEFDATE">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFDATE[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+				<xsl:when test="count(DEFTIMESTAMP) > 0">
+					<xsl:element name="DEFTIMESTAMP">
+						<xsl:attribute name="value">
+							<xsl:value-of select="DEFTIMESTAMP[1]/@value"/>
+						</xsl:attribute>
+					</xsl:element>
+				</xsl:when>
+			</xsl:choose>
+			
+			<xsl:if test="count(NOQUOTE) > 0">
+				<xsl:element name="NOQUOTE"/>
+			</xsl:if>
+			
+			<xsl:apply-templates select="constraint"/>
+			
+			<xsl:apply-templates select="opt"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Constraint -->
+	<xsl:template match="constraint">
+		<xsl:element name="constraint">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Opt -->
+	<xsl:template match="opt">
+		<xsl:element name="opt">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index -->
+	<xsl:template match="index">
+		<xsl:element name="index">
+			<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:if test="count(CLUSTERED) > 0">
+				<xsl:element name="CLUSTERED"/>
+			</xsl:if>
+			
+			<xsl:if test="count(BITMAP) > 0">
+				<xsl:element name="BITMAP"/>
+			</xsl:if>
+			
+			<xsl:if test="count(UNIQUE) > 0">
+				<xsl:element name="UNIQUE"/>
+			</xsl:if>
+			
+			<xsl:if test="count(FULLTEXT) > 0">
+				<xsl:element name="FULLTEXT"/>
+			</xsl:if>
+			
+			<xsl:if test="count(HASH) > 0">
+				<xsl:element name="HASH"/>
+			</xsl:if>
+			
+			<xsl:choose>
+				<xsl:when test="count(DROP) > 0">
+					<xsl:element name="DROP"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:apply-templates select="col"/>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Index Column -->
+	<xsl:template match="col">
+		<xsl:element name="col">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- SQL QuerySet -->
+	<xsl:template match="sql">
+		<xsl:element name="sql">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@key) > 0">
+				<xsl:attribute name="key"><xsl:value-of select="@key"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:if test="string-length(@prefixmethod) > 0">
+				<xsl:attribute name="prefixmethod"><xsl:value-of select="@prefixmethod"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:apply-templates select="query"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Query -->
+	<xsl:template match="query">
+		<xsl:element name="query">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Description -->
+	<xsl:template match="descr">
+		<xsl:element name="descr">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Data -->
+	<xsl:template match="data">
+		<xsl:element name="data">
+			<xsl:if test="string-length(@platform) > 0">
+				<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:apply-templates select="descr[1]"/>
+			
+			<xsl:apply-templates select="row"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Data Row -->
+	<xsl:template match="row">
+		<xsl:element name="row">
+			<xsl:apply-templates select="f"/>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Data Field -->
+	<xsl:template match="f">
+		<xsl:element name="f">
+			<xsl:if test="string-length(@name) > 0">
+				<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+			</xsl:if>
+			
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+</xsl:stylesheet>
Index: Dev/branches/Demo/rdfapi/util/adodb/xsl/remove-0.2.xsl
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xsl/remove-0.2.xsl	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xsl/remove-0.2.xsl	(revision 225)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/>
+	
+	<!-- Schema -->
+	<xsl:template match="/">
+		<xsl:comment>
+ADODB XMLSchema
+http://adodb-xmlschema.sourceforge.net
+</xsl:comment>
+		
+		<xsl:comment>
+Uninstallation Schema
+</xsl:comment>
+		
+		<xsl:element name="schema">
+			<xsl:attribute name="version">0.2</xsl:attribute>
+			
+			<xsl:apply-templates select="schema/table">
+				<xsl:sort select="position()" data-type="number" order="descending"/>
+			</xsl:apply-templates>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Table -->
+	<xsl:template match="table">
+		<xsl:if test="count(DROP) = 0">
+			<xsl:element name="table">
+				<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+				
+				<xsl:if test="string-length(@platform) > 0">
+					<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+				</xsl:if>
+				
+				<xsl:if test="string-length(@version) > 0">
+					<xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
+				</xsl:if>
+				
+				<xsl:apply-templates select="descr[1]"/>
+				
+				<xsl:element name="DROP"/>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	
+	<!-- Description -->
+	<xsl:template match="descr">
+		<xsl:element name="descr">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+</xsl:stylesheet>
Index: Dev/branches/Demo/rdfapi/util/adodb/xsl/remove-0.3.xsl
===================================================================
--- Dev/branches/Demo/rdfapi/util/adodb/xsl/remove-0.3.xsl	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/adodb/xsl/remove-0.3.xsl	(revision 225)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+	<xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/>
+	
+	<!-- Schema -->
+	<xsl:template match="/">
+		<xsl:comment>
+ADODB XMLSchema
+http://adodb-xmlschema.sourceforge.net
+</xsl:comment>
+		
+		<xsl:comment>
+Uninstallation Schema
+</xsl:comment>
+		
+		<xsl:element name="schema">
+			<xsl:attribute name="version">0.3</xsl:attribute>
+			
+			<xsl:apply-templates select="schema/table">
+				<xsl:sort select="position()" data-type="number" order="descending"/>
+			</xsl:apply-templates>
+		</xsl:element>
+	</xsl:template>
+	
+	<!-- Table -->
+	<xsl:template match="table">
+		<xsl:if test="count(DROP) = 0">
+			<xsl:element name="table">
+				<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+				
+				<xsl:if test="string-length(@platform) > 0">
+					<xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute>
+				</xsl:if>
+				
+				<xsl:if test="string-length(@version) > 0">
+					<xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
+				</xsl:if>
+				
+				<xsl:apply-templates select="descr[1]"/>
+				
+				<xsl:element name="DROP"/>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	
+	<!-- Description -->
+	<xsl:template match="descr">
+		<xsl:element name="descr">
+			<xsl:value-of select="normalize-space(text())"/>
+		</xsl:element>
+	</xsl:template>
+</xsl:stylesheet>
Index: Dev/branches/Demo/rdfapi/util/magpie/AUTHORS
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/AUTHORS	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/AUTHORS	(revision 225)
@@ -0,0 +1,1 @@
+kellan <kellan@protest.net>
Index: Dev/branches/Demo/rdfapi/util/magpie/CHANGES
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/CHANGES	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/CHANGES	(revision 225)
@@ -0,0 +1,41 @@
+Version 0.72
+-----------
+    - fix security exploit: http://www.sec-consult.com/216.html
+    
+Version 0.7
+-----------
+    - support for input and output charset encoding
+      based on the work in FoF, uses iconv or mbstring if available
+    -
+
+Version 0.6
+-----------
+    - basic support for Atom syndication format
+      including support for Atom content constructs
+    - fixed support for private feeds (HTTP Auth and SSL)
+      (thanks to silverorange.com for providing test feeds)
+	- support for some broken webservers
+
+Version 0.52
+-----------
+    - support GZIP content negoiation
+    - PHP 4.3.2 support
+
+Version 0.4
+-----------
+	- improved error handling, better access for script authors
+	- included example scripts of working with MagpieRSS
+	- new Smarty plugin for RSS date parsing
+
+Version 0.3
+-----------
+	- added support for conditional gets (Last-Modified, ETag)
+	- now use Snoopy to handle fetching RSS files
+	
+Version 0.2
+-----------
+	- MAJOR CLEAN UP
+	- removed kludgy $options array in favour of constants
+	- phased out returning arrays
+	- added better error handling
+	- re-worked comments
Index: Dev/branches/Demo/rdfapi/util/magpie/ChangeLog
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/ChangeLog	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/ChangeLog	(revision 225)
@@ -0,0 +1,405 @@
+2005-10-28 14:11  kellan
+
+	* extlib/Snoopy.class.inc: a better solution
+
+2005-10-28 11:51  kellan
+
+	* extlib/Snoopy.class.inc: fix arbtriary code execution
+	  vulnerability when using curl+ssl
+
+	  http://www.sec-consult.com/216.html
+
+2005-03-08 10:46  kellan
+
+	* rss_parse.inc: fix bug w/ atom and date normalization
+
+2005-02-09 14:59  kellan
+
+	* rss_fetch.inc: fix stale cache bug
+
+2005-01-28 02:27  kellan
+
+	* rss_parse.inc: support php w/o array_change_case
+
+2005-01-23 20:02  kellan
+
+	* rss_fetch.inc: fix cache bug introduced by charset encoding
+
+2005-01-12 09:14  kellan
+
+	* rss_cache.inc, rss_fetch.inc: more sanity checks for when things
+	  go wrong
+
+2004-12-12 13:44  kellan
+
+	* INSTALL, rss_cache.inc, rss_utils.inc: detab
+
+2004-11-23 20:15  kellan
+
+	* rss_parse.inc: fix calling iconv instead of mb_convert_encoding
+
+2004-11-22 02:11  kellan
+
+	* CHANGES, ChangeLog, rss_parse.inc, scripts/magpie_debug.php: last
+	  bit of tidying
+
+2004-11-22 01:45  kellan
+
+	* rss_fetch.inc: detab, bump version
+
+2004-11-22 01:43  kellan
+
+	* rss_parse.inc: was filtering too much
+
+2004-11-22 00:03  kellan
+
+	* rss_fetch.inc, rss_parse.inc: cache on $url . $output_encoding
+	  otherwise we can get munged output
+
+2004-11-21 23:52  kellan
+
+	* rss_parse.inc: add WARNING
+
+2004-11-21 23:45  kellan
+
+	* rss_parse.inc: don't set ERROR on notice or warning (rss_fetch
+	  dies on parse errors)
+
+2004-11-21 23:44  kellan
+
+	* rss_fetch.inc: add encoding defines (fix timeout error reporting)
+
+2004-11-21 20:21  kellan
+
+	* rss_parse.inc: incorporate steve's patch
+
+2004-11-21 19:26  kellan
+
+	* rss_parse.inc: remove old debugging functions, totally
+	  arbitrarily.	might break stuff.  can't really explain why i'm
+	  doing this.
+
+2004-10-28 15:52  kellan
+
+	* rss_parse.inc: fixed '=' instead of '=='
+
+2004-10-26 00:48  kellan
+
+	* rss_parse.inc: chance epoch to timestamp to conform w/ php naming
+	  conventions
+
+2004-06-15 12:00  kellan
+
+	* rss_parse.inc: [no log message]
+
+2004-04-26 14:16  kellan
+
+	* rss_fetch.inc: bump version
+
+2004-04-26 12:36  kellan
+
+	* rss_parse.inc: fix field doubling
+
+2004-04-24 17:47  kellan
+
+	* CHANGES, ChangeLog: updated
+
+2004-04-24 17:35  kellan
+
+	* rss_fetch.inc: bumped version
+
+2004-04-24 16:52  kellan
+
+	* rss_parse.inc: support arbitrary atom content constructs
+
+	  some refactoring
+
+2004-04-24 16:15  kellan
+
+	* rss_parse.inc: support summary content contstruct.  add normalize
+	  function
+
+2004-03-27 16:29  kellan
+
+	* extlib/Snoopy.class.inc: accept self-signed certs
+
+2004-03-27 12:53  kellan
+
+	* extlib/Snoopy.class.inc: fixed SSL support   * set status   * set
+	  error on bad curl
+
+	  (also ripped out big chunks of dead weight (submit_form) which
+	  were getting in my way
+
+2004-01-25 02:25  kellan
+
+	* rss_parse.inc: make RSS 1.0's rdf:about available
+
+2004-01-25 02:07  kellan
+
+	* rss_parse.inc: clean up text, and line formats.  add support item
+	  rdf:about
+
+2004-01-24 23:40  kellan
+
+	* CHANGES, ChangeLog: update changes
+
+2004-01-24 23:37  kellan
+
+	* rss_fetch.inc: updated version
+
+2004-01-24 23:35  kellan
+
+	* rss_parse.inc: whitespace
+
+2004-01-24 23:23  kellan
+
+	* extlib/Snoopy.class.inc: support badly formatted http headers
+
+2004-01-24 23:20  kellan
+
+	* rss_parse.inc: added alpha atom parsing support
+
+2003-06-25 22:34  kellan
+
+	* extlib/Snoopy.class.inc: fixed fread 4.3.2 compatibility problems
+
+2003-06-13 11:31  kellan
+
+	* rss_fetch.inc: reset cache on 304
+
+2003-06-12 21:37  kellan
+
+	* rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc:
+	  bumped up version numbers
+
+2003-06-12 21:32  kellan
+
+	* htdocs/index.html: updated news
+
+2003-06-12 21:27  kellan
+
+	* NEWS: a manual blog :)
+
+2003-06-12 21:22  kellan
+
+	* htdocs/index.html: fully qualified img
+
+2003-06-12 21:20  kellan
+
+	* htdocs/index.html: clean up.	added badge.
+
+2003-06-12 21:04  kellan
+
+	* rss_utils.inc: clean up regex
+
+2003-06-12 21:02  kellan
+
+	* rss_cache.inc: suppress some warnings
+
+2003-05-30 20:44  kellan
+
+	* extlib/Snoopy.class.inc: more comments, cleaned up notice
+
+2003-05-30 15:14  kellan
+
+	* extlib/Snoopy.class.inc: don't advertise gzip support if the user
+	  hasn't built php with gzinflate support
+
+2003-05-12 22:32  kellan
+
+	* ChangeLog: changes
+
+2003-05-12 22:11  kellan
+
+	* htdocs/index.html: announce 0.5
+
+2003-05-12 21:42  kellan
+
+	* htdocs/index.html: change
+
+2003-05-12 21:39  kellan
+
+	* rss_fetch.inc: use gzip
+
+2003-05-12 21:37  kellan
+
+	* extlib/Snoopy.class.inc: added support gzip encoded content
+	  negoiation
+
+2003-05-12 21:32  kellan
+
+	* rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc: fixed
+	  typoes
+
+2003-04-26 21:44  kellan
+
+	* rss_parse.inc: fix minor typo
+
+2003-04-18 08:19  kellan
+
+	* htdocs/cookbook.html: updated cookbook to show more code for
+	  limiting items
+
+2003-03-03 16:02  kellan
+
+	* rss_parse.inc, scripts/magpie_slashbox.php: committed (or
+	  adpated) patch from Nicola (www.technick.com) to quell 'Undefined
+	  Indexes' notices
+
+2003-03-03 15:59  kellan
+
+	* rss_fetch.inc: commited patch from nicola (www.technick.com) to
+	  quell 'undefined indexes' notices.
+
+	  * Magpie now automatically includes its version in the
+	  user-agent, & whether cacheing is turned on.
+
+2003-02-12 01:22  kellan
+
+	* CHANGES, ChangeLog: ChangeLog now auto-generated by cvs2cl
+
+2003-02-12 00:21  kellan
+
+	* rss_fetch.inc: better errors, hopefully stomped on pesky notices
+
+2003-02-12 00:19  kellan
+
+	* rss_parse.inc: check to see is xml is supported, if not die
+
+	  also throw better xml errors
+
+2003-02-12 00:18  kellan
+
+	* rss_cache.inc: hopefully cleared up some notices that were being
+	  thrown into the log
+
+	  fixed a debug statement that was being called as an error
+
+2003-02-12 00:15  kellan
+
+	* scripts/: magpie_simple.php, magpie_slashbox.php: moved
+	  magpie_simple to magpie_slashbox, and replaced it with a simpler
+	  demo.
+
+2003-02-12 00:02  kellan
+
+	* INSTALL, README, TROUBLESHOOTING: Improved documentation.  Better
+	  install instructions.
+
+	  TROUBLESHOOTING cover common installation and usage problems
+
+2003-01-22 14:40  kellan
+
+	* htdocs/cookbook.html: added cookbook.html
+
+2003-01-21 23:47  kellan
+
+	* cookbook: a magpie cookbook
+
+2003-01-20 10:09  kellan
+
+	* ChangeLog: updated
+
+2003-01-20 09:23  kellan
+
+	* scripts/simple_smarty.php: minor clean up
+
+2003-01-20 09:15  kellan
+
+	* scripts/README: added smarty url
+
+2003-01-20 09:14  kellan
+
+	* magpie_simple.php, htdocs/index.html, scripts/README,
+	  scripts/magpie_debug.php, scripts/magpie_simple.php,
+	  scripts/simple_smarty.php,
+	  scripts/smarty_plugin/modifier.rss_date_parse.php,
+	  scripts/templates/simple.smarty: Added scripts directory for
+	  examples on how to use MagpieRSS
+
+	  magpie_simple - is a simple example magpie_debug - spew all the
+	  information from a parsed RSS feed simple_smary - example of
+	  using magpie with Smarty template system
+	  smarty_plugin/modifier.rss_date_parse.php - support file for the
+	  smarty demo templates/simple.smary - template for the smarty demo
+
+2003-01-20 09:11  kellan
+
+	* rss_fetch.inc, rss_parse.inc: changes to error handling to give
+	  script authors more access to magpie's errors.
+
+	  added method magpie_error() to retrieve global MAGPIE_ERROR
+	  variable for when fetch_rss() returns false
+
+2002-10-26 19:02  kellan
+
+	* htdocs/index.html: putting the website under source control
+
+2002-10-26 18:43  kellan
+
+	* AUTHORS, ChangeLog, INSTALL, README: some documentation to make
+	  it all look official :)
+
+2002-10-25 23:04  kellan
+
+	* magpie_simple.php: quxx
+
+2002-10-25 23:04  kellan
+
+	* rss_parse.inc: added support for textinput and image
+
+2002-10-25 19:23  kellan
+
+	* magpie_simple.php, rss_cache.inc, rss_fetch.inc, rss_parse.inc,
+	  rss_utils.inc: switched to using Snoopy for fetching remote RSS
+	  files.
+
+	  added support for conditional gets
+
+2002-10-25 19:22  kellan
+
+	* rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc:
+	  Change comment style to slavishly imitate the phpinsider style
+	  found in Smarty and Snoopy :)
+
+2002-10-25 19:18  kellan
+
+	* extlib/Snoopy.class.inc: added Snoopy in order to support
+	  conditional gets
+
+2002-10-23 23:19  kellan
+
+	* magpie_simple.php, rss_cache.inc, rss_fetch.inc, rss_parse.inc:
+	  MAJOR CLEANUP!
+
+	  * rss_fetch got rid of the options array, replaced it with a more
+	  PHP-like solution of using defines.  constants are setup, with
+	  defaults, in the function init()
+
+	  got rid of the idiom of passing back an array, its was awkward to
+	  deal with in PHP, and unusual (and consquently confusing to
+	  people).  now i return true/false values, and try to setup error
+	  string where appropiate (rss_cache has the most complete example
+	  of this)
+
+	  change the logic for interacting with the cache
+
+	  * rss_cache major re-working of how error are handled.  tried to
+	  make the code more resillient.  the cache is now much more aware
+	  of MAX_AGE, where before this was being driven out of rss_fetch
+	  (which was silly)
+
+	  * rss_parse properly handles xml parse errors.  used to sail
+	  along blithely unaware.
+
+2002-09-11 11:11  kellan
+
+	* rss_cache.inc, rss_parse.inc, magpie_simple.php, rss_fetch.inc,
+	  rss_utils.inc: Initial revision
+
+2002-09-11 11:11  kellan
+
+	* rss_cache.inc, rss_parse.inc, magpie_simple.php, rss_fetch.inc,
+	  rss_utils.inc: initial import
+
Index: Dev/branches/Demo/rdfapi/util/magpie/INSTALL
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/INSTALL	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/INSTALL	(revision 225)
@@ -0,0 +1,143 @@
+REQUIREMENTS
+
+    MapieRSS requires a recent PHP 4+ (developed with 4.2.0)
+    with xml (expat) support.
+    
+    Optionally:
+      * PHP5 with libxml2 support.
+      * cURL for SSL support
+      * iconv (preferred) or mb_string for expanded character set support
+    
+QUICK START
+
+    Magpie consists of 4 files (rss_fetch.inc, rss_parser.inc, rss_cache.inc, 
+    and rss_utils.inc), and the directory extlib (which contains a modified 
+    version of the Snoopy HTTP client)
+    
+    Copy these 5 resources to a directory named 'magpierss' in the same 
+    directory as your PHP script.
+    
+    At the top of your script add the following line:
+    
+        require_once('magpierss/rss_fetch.inc');
+    
+    Now you can use the fetch_rss() method:
+      
+        $rss = fetch_rss($url);
+        
+    Done.  That's it.   See README for more details on using MagpieRSS.
+
+NEXT STEPS
+
+    Important:  you'll probably want to get the cache directory working in 
+    order to speed up your application, and not abuse the webserver you're 
+    downloading the RSS from.
+    
+    Optionally you can install MagpieRSS in your PHP include path in order to 
+    make it available server wide.
+    
+    Lastly you might want to look through the constants in rss_fetch.inc see if 
+    there is anything you want to override (the defaults are pretty good)
+
+    For more info, or if you have trouble, see TROUBLESHOOTING
+
+SETTING UP CACHING
+
+    Magpie has built-in transparent caching.  With caching Magpie will only 
+    fetch and parse RSS feeds when there is new content.  Without this feature 
+    your pages will be slow, and the sites serving the RSS feed will be annoyed 
+    with you.
+    
+** Simple and Automatic **
+    
+    By default Magpie will try to create a cache directory named 'cache' in the
+    same directory as your PHP script.
+    
+** Creating a Local Cache Directory **
+    
+    Often this will fail, because your webserver doesn't have sufficient 
+    permissions to create the directory. 
+    
+    Exact instructions for how to do this will vary from install to install and 
+    platform to platform.  The steps are:
+    
+    1.  Make a directory named 'cache'
+    2.  Give the web server write access to that directory.
+    
+    An example of how to do this on Debian would be:
+    
+    1.  mkdir /path/to/script/cache
+    2.  chgrp www-data /path/to/script/cache
+    3.  chmod 775 /path/to/script/cache
+    
+    On other Unixes you'll need to change 'www-data' to what ever user Apache 
+    runs as. (on MacOS X the user would be 'www')
+    
+** Cache in /tmp **
+    
+    Sometimes you won't be able to create a local cache directory.  Some reasons 
+    might be:
+    
+    1.  No shell account
+    2.  Insufficient permissions to change ownership of a directory
+    3.  Webserver runs as 'nobody'
+    
+    In these situations using a cache directory in /tmp can often be a good 
+    option.
+    
+    The drawback is /tmp is public, so anyone on the box can read the cache 
+    files.  Usually RSS feeds are public information, so you'll have to decide 
+    how much of an issue that is.
+
+    To use /tmp as your cache directory you need to add the following line to 
+    your script:
+        
+        define('MAGPIE_CACHE_DIR', '/tmp/magpie_cache');
+        
+** Global Cache **
+
+    If you have several applications using Magpie, you can create a single 
+    shared cache directory, either using the /tmp cache, or somewhere else on 
+    the system.
+    
+    The upside is that you'll distribute fetching and parsing feeds across 
+    several applications.
+    
+INSTALLING MAGPIE SERVER WIDE
+
+    Rather then following the Quickstart instructions which requires you to have 
+    a copy of Magpie per application, alternately you can place it in some 
+    shared location.
+    
+** Adding Magpie to Your Include Path **
+
+    Copy the 5 resources (rss_fetch.inc, rss_parser.inc, rss_cache.inc,         
+    rss_utils.inc, and extlib) to a directory named 'magpierss' in your include 
+    path.  Now any PHP file on your system can use Magpie with:
+    
+        require_once('magpierss/rss_fetch.inc');
+
+    Different installs have different include paths, and you'll have to figure 
+    out what your include_path is.
+    
+    From shell you can try: 
+        
+        php -i | grep 'include_path'
+
+    Alternatley you can create a phpinfo.php file with contains:
+    
+        <?php phpinfo(); ?>
+    
+    Debian's default is:  
+        
+        /usr/share/php 
+        
+    (though more idealogically pure location would be /usr/local/share/php)
+    
+    Apple's default include path is:
+    
+        /usr/lib/php
+        
+    While the Entropy PHP build seems to use:
+    
+        /usr/local/php/lib/php
Index: Dev/branches/Demo/rdfapi/util/magpie/NEWS
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/NEWS	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/NEWS	(revision 225)
@@ -0,0 +1,53 @@
+MagpieRSS News
+
+MAGPIERSS 0.51 RELEASED
+	* important bugfix!
+	* fix "silent failure" when PHP doesn't have zlib
+
+FEED ON FEEDS USES MAGPIE
+	* web-based RSS aggregator built with Magpie
+	* easy to install, easy to use.
+	http://minutillo.com/steve/feedonfeeds/
+	
+MAGPIERSS 0.5 RELEASED
+	* supports transparent HTTP gzip content negotiation for reduced bandwidth usage
+    * quashed some undefined index notices
+
+MAGPIERSS 0.46 RELEASED
+    * minor release, more error handling clean up
+    * documentation fixes, simpler example
+    * new trouble shooting guide for installation and usage problems 
+      http://magpierss.sourceforge.net/TROUBLESHOOTING
+
+MAGPIE NEWS AS RSS
+    * releases, bug fixes, releated stories in RSS
+    
+MAGPIERSS COOKBOOK: SIMPLE PHP RSS HOW TOS
+    * answers some of the most frequently asked Magpie questions
+    * feedback, suggestions, requests, recipes welcome
+      http://magpierss.sourceforge.net/cookbook.html
+
+MAGPIERSS 0.4 RELEASED!
+    * improved error handling, more flexibility for script authors, backwards compatible
+    * new and better examples! including using MagpieRSS and Smarty
+    * new Smarty plugin for RSS date parsing
+      http://smarty.php.net
+
+INFINITE PENGUIN NOW SUPPORTS MAGPIE 0.3
+    * simple, sophisticated RSS viewer
+    * includes auto-generated javascript ticker from RSS feed
+      http://www.infinitepenguins.net/rss/
+
+TRAUMWIND RELEASES REX BACKEND FOR MAGPIERSS
+    * drop in support using regex based XML parser
+    * parses improperly formed XML that chokes expat
+      http://traumwind.de/blog/magpie/magpie_alike.php
+
+MAGPIERSS 0.3 RELEASED!
+    * Support added for HTTP Conditional GETs.
+      http://fishbowl.pastiche.org/archives/001132.html
+
+MAGPIERSS 0.2!
+    * Major clean up of the code. Easier to use.
+    * Simpler install on shared hosts.
+    * Better documentation and comments.
Index: Dev/branches/Demo/rdfapi/util/magpie/README
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/README	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/README	(revision 225)
@@ -0,0 +1,48 @@
+NAME
+
+	MagpieRSS - a simple RSS integration tool
+
+SYNOPSIS
+
+	require_once(rss_fetch.inc);
+	$url = $_GET['url'];
+	$rss = fetch_rss( $url );
+	
+	echo "Channel Title: " . $rss->channel['title'] . "<p>";
+	echo "<ul>";
+	foreach ($rss->items as $item) {
+		$href = $item['link'];
+		$title = $item['title'];
+		echo "<li><a href=$href>$title</a></li>";
+	}
+	echo "</ul>";
+
+DESCRIPTION
+
+	MapieRSS is an XML-based RSS parser in PHP.  It attempts to be "PHP-like",
+	and simple to use.
+	
+	Some features include:
+	
+	* supports RSS 0.9 - 1.0, with limited RSS 2.0 support
+	* supports namespaces, and modules, including mod_content and mod_event
+	* open minded [1]
+	* simple, functional interface, to object oriented backend parser
+	* automatic caching of parsed RSS objects makes its easy to integrate
+	* supports conditional GET with Last-Modified, and ETag
+	* uses constants for easy override of default behaviour 
+	* heavily commented
+
+
+1. By open minded I mean Magpie will accept any tag it finds in good faith that
+   it was supposed to be here.  For strict validation, look elsewhere.
+
+
+GETTING STARTED
+
+	
+
+COPYRIGHT:
+	Copyright(c) 2002 kellan@protest.net. All rights reserved.
+	This software is released under the GNU General Public License.
+	Please read the disclaimer at the top of the Snoopy.class.inc file.
Index: Dev/branches/Demo/rdfapi/util/magpie/TROUBLESHOOTING
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/TROUBLESHOOTING	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/TROUBLESHOOTING	(revision 225)
@@ -0,0 +1,152 @@
+TROUBLESHOOTING
+
+
+Trouble Installing MagpieRSS:
+
+1.	Fatal error: Failed opening required '/path/to/script/rss_fetch.inc' 
+	(include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear') 
+
+2.	Cache couldn't make dir './cache'.
+
+3.	Fatal error: Failed to load PHP's XML Extension. 
+	http://www.php.net/manual/en/ref.xml.php
+
+Trouble Using MagpieRSS
+
+4.	Warning: MagpieRSS: Failed to fetch example.com/index.rdf. 
+	(HTTP Error: Invalid protocol "")
+
+5.	Warning: MagpieRSS: Failed to parse RSS file. 
+	(not well-formed (invalid token) at line 19, column 98)
+
+6.	Warning: MagpieRSS: Failed to fetch http://localhost/rss/features.1-0.rss. 
+	(HTTP Response: HTTP/1.1 404 Not Found)
+
+If you would rather provide a custom error, see the COOKBOOK
+(http://magpierss.sf.net/cookbook.html) recipe 2.
+
+*************************************************************************
+1.	Fatal error: Failed opening required '/path/to/script/rss_fetch.inc' 
+	(include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear') 
+	
+	This could mean that:
+	
+	a) PHP can't find the MagpieRSS files.
+	b) PHP found them the MagpieRSS files, but can't read them.
+	
+	a. Telling PHP where to look for MagpieRSS file.
+	
+	This might mean your PHP program can't find the MagpieRSS libraries. 
+	Magpie relies on 4 include files, rss_fetch.inc, rss_parse.inc,
+	rss_cache.inc, rss_util.inc, and for normal use you'll need all 4 (see the
+	cookbook for exceptions).
+
+	This can be fixed by making sure the MagpieRSS files are in your include
+	path.
+	
+	If you can edit your include path (for example your on a shared host) then
+	you need to replace:
+	
+	require_once('rss_fetch.inc');
+		
+	-with-
+		
+	define('MAGPIE_DIR', '/path/to/magpierss/');
+	require_once(MAGPIE_DIR.'rss_fetch.inc');
+
+	b.  PHP can't read the MagpieRSS files
+	
+	All PHP libraries need to be readable by your webserver.
+	
+	On Unix you can accomplish this with:
+	
+	chmod 755 rss_fetch.inc rss_parse.inc rss_cache.inc rss_util.inc
+	
+*************************************************************************
+2. Cache couldn't make dir './cache'.
+
+	MagpieRSS caches the results of fetched and parsed RSS to reduce the load on
+	both your server, and the remote server providing the RSS.  It does this by
+	writing files to a cache directory.
+
+	This error means the webserver doesn't have write access to the current
+	directory.
+	
+	a. Make a webserver writeable cache directory
+	
+	Find the webserver's group. (on my system it is 'www')
+	
+	mkdir ./cache
+	chgrp www directory_name
+	chmod g+w directory_name
+	
+	(this is the best, and desired solution)
+	
+	b. Tell MagpieRSS to create the cache directory somewhere the webserver can
+	write to.
+	
+	define('MAGPIE_CACHE_DIR', '/tmp/magpierss');
+
+	(this is not a great solution, and might have security considerations)
+		
+	c. Turn off cacheing.  
+	
+	Magpie can work fine with cacheing, but it will be slower, and you might
+	become a nuiance to the RSS provider, but it is an option.
+	
+	define('MAGPIE_CACHE_ON', 0);
+	
+	d. And lastly, do NOT
+	
+	chmod 777 ./cache
+	
+	Any of the above solutions are better then this.
+
+	NOTE: If none of this works for you, let me know.  I've got root, and a
+	custom compiled Apache on almost any box I ever touch, so I can be a little
+	out of touch with reality.  But I won't know that if I don't feedback.
+
+************************************************************************* 3.
+3.	Fatal error: Failed to load PHP's XML Extension. 
+	http://www.php.net/manual/en/ref.xml.php
+
+	-or-
+	
+	Fatal error: Failed to create an instance of PHP's XML parser.
+	http://www.php.net/manual/en/ref.xml.php
+	
+	Make sure your PHP was built with --with-xml
+	
+	This has been turned on by default for several versions of PHP, but it might
+	be turned off in your build.
+	
+	See php.net for details on building and configuring PHP.
+
+
+*************************************************************************
+4.	Warning: MagpieRSS: Failed to fetch index.rdf. 
+	(HTTP Error: Invalid protocol "")
+	
+	You need to put http:// in front of your the URL to your RSS feed
+
+*************************************************************************	
+5.	Warning: MagpieRSS: Failed to parse RSS file. 
+	(not well-formed (invalid token) at line 19, column 98)
+
+	There is a problem with the RSS feed you are trying to read. 
+	MagpieRSS is an XML parser, and therefore can't parse RSS feed with invalid
+	characters.  Some RSS parser are based on regular expressions, and can
+	parse invalid RSS but they have their own problems.
+
+	You could try contacting the author of the RSS feed, and pointing them to
+	the online RSS validator at:
+	
+	http://feeds.archive.org/validator/
+
+*************************************************************************	
+6.	Warning: MagpieRSS: Failed to fetch http://example.com/index.rdf 
+	(HTTP Response: HTTP/1.1 404 Not Found)
+
+	Its a 404!  The RSS file ain't there.
+	
+	
Index: Dev/branches/Demo/rdfapi/util/magpie/cookbook
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/cookbook	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/cookbook	(revision 225)
@@ -0,0 +1,125 @@
+MAGPIERSS RECIPES:  Cooking with Corbies
+
+         "Four and twenty blackbirds baked in a pie."
+
+1. LIMIT THE NUMBER OF HEADLINES(AKA ITEMS) RETURNED.
+
+PROBLEM:
+
+You want to display the 10 (or 3) most recent headlines, but the RSS feed
+contains 15.
+
+SOLUTION:
+
+$num_items = 10;
+$rss = fetch_rss($url);
+
+$items = array_slice($rss->items, 0, $num_items);
+
+DISCUSSION:
+
+Rather then trying to limit the number of items Magpie parses, a much simpler,
+and more flexible approach is to take a "slice" of the array of items.  And
+array_slice() is smart enough to do the right thing if the feed has less items
+then $num_items.
+
+See: http://www.php.net/array_slice
+
+
+2. DISPLAY A CUSTOM ERROR MESSAGE IF SOMETHING GOES WRONG
+
+PROBLEM:
+
+You don't want Magpie's error messages showing up if something goes wrong.
+
+SOLUTION:
+
+# Magpie throws USER_WARNINGS only
+# so you can cloak these, by only showing ERRORs
+error_reporting(E_ERROR);
+
+# check the return value of fetch_rss()
+
+$rss = fetch_rss($url);
+
+if ( $rss ) {
+...display rss feed...
+}
+else {
+	echo "An error occured!  " .
+	     "Consider donating more $$$ for restoration of services." .
+		 "<br>Error Message: "	. magpie_error();
+}
+
+DISCUSSION:
+
+MagpieRSS triggers a warning in a number of circumstances.  The 2 most common
+circumstances are:  if the specified RSS file isn't properly formed (usually
+because it includes illegal HTML), or if Magpie can't download the remote RSS
+file, and there is no cached version.  
+
+If you don't want your users to see these warnings change your error_reporting
+settings to only display ERRORs.  Another option is to turn off display_error,
+so that WARNINGs, and NOTICEs still go to the error_log but not to the webpages.
+
+You can do this with:
+
+ini_set('display_errors', 0);
+
+See: http://www.php.net/error_reporting,
+     http://www.php.net/ini_set, 
+	 http://www.php.net/manual/en/ref.errorfunc.php
+
+3. GENERATE A NEW RSS FEED
+
+PROBLEM:
+
+Create an RSS feed for other people to use.
+
+SOLUTION:
+
+Use Useful Inc's RSSWriter (http://usefulinc.com/rss/rsswriter/)
+
+DISCUSSION:
+
+An example of turning a Magpie parsed RSS object back into an RSS file is forth
+coming.  In the meantime RSSWriter has great documentation.
+
+4. DISPLAY HEADLINES MORE RECENT THEN X DATE
+
+PROBLEM:
+
+You only want to display headlines that were published on, or after a certain
+date.
+
+
+SOLUTION:
+
+require 'rss_utils.inc';
+
+# get all headlines published today
+$today = getdate();
+
+# today, 12AM
+$date = mktime(0,0,0,$today['mon'], $today['mday'], $today['year']);
+
+$rss = fetch_rss($url);
+
+foreach ( $rss->items as $item ) {
+	$published = parse_w3cdtf($item['dc']['date']);
+	if ( $published >= $date ) {
+		echo "Title: " . $item['title'];
+		echo "Published: " . date("h:i:s A", $published);
+		echo "<p>";
+	}
+}
+
+DISCUSSION:
+
+This recipe only works for RSS 1.0 feeds that include the <dc:date> field.
+(which is very good RSS style)
+
+parse_w3cdtf is defined in rss_utils.inc, and parses RSS style dates into Unix
+epoch seconds.  
+
+See: http://www.php.net/manual/en/ref.datetime.php
Index: Dev/branches/Demo/rdfapi/util/magpie/extlib/Snoopy.class.inc
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/extlib/Snoopy.class.inc	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/extlib/Snoopy.class.inc	(revision 225)
@@ -0,0 +1,900 @@
+<?php
+
+/*************************************************
+
+Snoopy - the PHP net client
+Author: Monte Ohrt <monte@ispi.net>
+Copyright (c): 1999-2000 ispi, all rights reserved
+Version: 1.0
+
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+You may contact the author of Snoopy by e-mail at:
+monte@ispi.net
+
+Or, write to:
+Monte Ohrt
+CTO, ispi
+237 S. 70th suite 220
+Lincoln, NE 68510
+
+The latest version of Snoopy can be obtained from:
+http://snoopy.sourceforge.com
+
+*************************************************/
+
+class Snoopy
+{
+	/**** Public variables ****/
+	
+	/* user definable vars */
+
+	var $host			=	"www.php.net";		// host name we are connecting to
+	var $port			=	80;					// port we are connecting to
+	var $proxy_host		=	"";					// proxy host to use
+	var $proxy_port		=	"";					// proxy port to use
+	var $agent			=	"Snoopy v1.0";		// agent we masquerade as
+	var	$referer		=	"";					// referer info to pass
+	var $cookies		=	array();			// array of cookies to pass
+												// $cookies["username"]="joe";
+	var	$rawheaders		=	array();			// array of raw headers to send
+												// $rawheaders["Content-type"]="text/html";
+
+	var $maxredirs		=	5;					// http redirection depth maximum. 0 = disallow
+	var $lastredirectaddr	=	"";				// contains address of last redirected address
+	var	$offsiteok		=	true;				// allows redirection off-site
+	var $maxframes		=	0;					// frame content depth maximum. 0 = disallow
+	var $expandlinks	=	true;				// expand links to fully qualified URLs.
+												// this only applies to fetchlinks()
+												// or submitlinks()
+	var $passcookies	=	true;				// pass set cookies back through redirects
+												// NOTE: this currently does not respect
+												// dates, domains or paths.
+	
+	var	$user			=	"";					// user for http authentication
+	var	$pass			=	"";					// password for http authentication
+	
+	// http accept types
+	var $accept			=	"image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+	
+	var $results		=	"";					// where the content is put
+		
+	var $error			=	"";					// error messages sent here
+	var	$response_code	=	"";					// response code returned from server
+	var	$headers		=	array();			// headers returned from server sent here
+	var	$maxlength		=	500000;				// max return data length (body)
+	var $read_timeout	=	0;					// timeout on read operations, in seconds
+												// supported only since PHP 4 Beta 4
+												// set to 0 to disallow timeouts
+	var $timed_out		=	false;				// if a read operation timed out
+	var	$status			=	0;					// http request status
+	
+	var	$curl_path		=	"/usr/bin/curl";
+												// Snoopy will use cURL for fetching
+												// SSL content if a full system path to
+												// the cURL binary is supplied here.
+												// set to false if you do not have
+												// cURL installed. See http://curl.haxx.se
+												// for details on installing cURL.
+												// Snoopy does *not* use the cURL
+												// library functions built into php,
+												// as these functions are not stable
+												// as of this Snoopy release.
+	
+	// send Accept-encoding: gzip?
+	var $use_gzip		= true;	
+	
+	/**** Private variables ****/	
+	
+	var	$_maxlinelen	=	4096;				// max line length (headers)
+	
+	var $_httpmethod	=	"GET";				// default http request method
+	var $_httpversion	=	"HTTP/1.0";			// default http request version
+	var $_submit_method	=	"POST";				// default submit method
+	var $_submit_type	=	"application/x-www-form-urlencoded";	// default submit type
+	var $_mime_boundary	=   "";					// MIME boundary for multipart/form-data submit type
+	var $_redirectaddr	=	false;				// will be set if page fetched is a redirect
+	var $_redirectdepth	=	0;					// increments on an http redirect
+	var $_frameurls		= 	array();			// frame src urls
+	var $_framedepth	=	0;					// increments on frame depth
+	
+	var $_isproxy		=	false;				// set if using a proxy server
+	var $_fp_timeout	=	30;					// timeout for socket connection
+
+/*======================================================================*\
+	Function:	fetch
+	Purpose:	fetch the contents of a web page
+				(and possibly other protocols in the
+				future like ftp, nntp, gopher, etc.)
+	Input:		$URI	the location of the page to fetch
+	Output:		$this->results	the output text from the fetch
+\*======================================================================*/
+
+	function fetch($URI)
+	{
+	
+		//preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
+		$URI_PARTS = parse_url($URI);
+		if (!empty($URI_PARTS["user"]))
+			$this->user = $URI_PARTS["user"];
+		if (!empty($URI_PARTS["pass"]))
+			$this->pass = $URI_PARTS["pass"];
+				
+		switch($URI_PARTS["scheme"])
+		{
+			case "http":
+				$this->host = $URI_PARTS["host"];
+				if(!empty($URI_PARTS["port"]))
+					$this->port = $URI_PARTS["port"];
+				if($this->_connect($fp))
+				{
+					if($this->_isproxy)
+					{
+						// using proxy, send entire URI
+						$this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
+					}
+					else
+					{
+						$path = $URI_PARTS["path"].(isset($URI_PARTS["query"]) ? "?".$URI_PARTS["query"] : "");
+						// no proxy, send only the path
+						$this->_httprequest($path, $fp, $URI, $this->_httpmethod);
+					}
+					
+					$this->_disconnect($fp);
+
+					if($this->_redirectaddr)
+					{
+						/* url was redirected, check if we've hit the max depth */
+						if($this->maxredirs > $this->_redirectdepth)
+						{
+							// only follow redirect if it's on this site, or offsiteok is true
+							if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+							{
+								/* follow the redirect */
+								$this->_redirectdepth++;
+								$this->lastredirectaddr=$this->_redirectaddr;
+								$this->fetch($this->_redirectaddr);
+							}
+						}
+					}
+
+					if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+					{
+						$frameurls = $this->_frameurls;
+						$this->_frameurls = array();
+						
+						while(list(,$frameurl) = each($frameurls))
+						{
+							if($this->_framedepth < $this->maxframes)
+							{
+								$this->fetch($frameurl);
+								$this->_framedepth++;
+							}
+							else
+								break;
+						}
+					}					
+				}
+				else
+				{
+					return false;
+				}
+				return true;					
+				break;
+			case "https":
+				if(!$this->curl_path || (!is_executable($this->curl_path))) {
+					$this->error = "Bad curl ($this->curl_path), can't fetch HTTPS \n";
+					return false;
+				}
+				$this->host = $URI_PARTS["host"];
+				if(!empty($URI_PARTS["port"]))
+					$this->port = $URI_PARTS["port"];
+				if($this->_isproxy)
+				{
+					// using proxy, send entire URI
+					$this->_httpsrequest($URI,$URI,$this->_httpmethod);
+				}
+				else
+				{
+					$path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+					// no proxy, send only the path
+					$this->_httpsrequest($path, $URI, $this->_httpmethod);
+				}
+
+				if($this->_redirectaddr)
+				{
+					/* url was redirected, check if we've hit the max depth */
+					if($this->maxredirs > $this->_redirectdepth)
+					{
+						// only follow redirect if it's on this site, or offsiteok is true
+						if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+						{
+							/* follow the redirect */
+							$this->_redirectdepth++;
+							$this->lastredirectaddr=$this->_redirectaddr;
+							$this->fetch($this->_redirectaddr);
+						}
+					}
+				}
+
+				if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+				{
+					$frameurls = $this->_frameurls;
+					$this->_frameurls = array();
+
+					while(list(,$frameurl) = each($frameurls))
+					{
+						if($this->_framedepth < $this->maxframes)
+						{
+							$this->fetch($frameurl);
+							$this->_framedepth++;
+						}
+						else
+							break;
+					}
+				}					
+				return true;					
+				break;
+			default:
+				// not a valid protocol
+				$this->error	=	'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+				return false;
+				break;
+		}		
+		return true;
+	}
+
+
+
+/*======================================================================*\
+	Private functions
+\*======================================================================*/
+	
+	
+/*======================================================================*\
+	Function:	_striplinks
+	Purpose:	strip the hyperlinks from an html document
+	Input:		$document	document to strip.
+	Output:		$match		an array of the links
+\*======================================================================*/
+
+	function _striplinks($document)
+	{	
+		preg_match_all("'<\s*a\s+.*href\s*=\s*			# find <a href=
+						([\"\'])?					# find single or double quote
+						(?(1) (.*?)\\1 | ([^\s\>]+))		# if quote found, match up to next matching
+													# quote, otherwise match up to next space
+						'isx",$document,$links);
+						
+
+		// catenate the non-empty matches from the conditional subpattern
+
+		while(list($key,$val) = each($links[2]))
+		{
+			if(!empty($val))
+				$match[] = $val;
+		}				
+		
+		while(list($key,$val) = each($links[3]))
+		{
+			if(!empty($val))
+				$match[] = $val;
+		}		
+		
+		// return the links
+		return $match;
+	}
+
+/*======================================================================*\
+	Function:	_stripform
+	Purpose:	strip the form elements from an html document
+	Input:		$document	document to strip.
+	Output:		$match		an array of the links
+\*======================================================================*/
+
+	function _stripform($document)
+	{	
+		preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
+		
+		// catenate the matches
+		$match = implode("\r\n",$elements[0]);
+				
+		// return the links
+		return $match;
+	}
+
+	
+	
+/*======================================================================*\
+	Function:	_striptext
+	Purpose:	strip the text from an html document
+	Input:		$document	document to strip.
+	Output:		$text		the resulting text
+\*======================================================================*/
+
+	function _striptext($document)
+	{
+		
+		// I didn't use preg eval (//e) since that is only available in PHP 4.0.
+		// so, list your entities one by one here. I included some of the
+		// more common ones.
+								
+		$search = array("'<script[^>]*?>.*?</script>'si",	// strip out javascript
+						"'<[\/\!]*?[^<>]*?>'si",			// strip out html tags
+						"'([\r\n])[\s]+'",					// strip out white space
+						"'&(quote|#34);'i",					// replace html entities
+						"'&(amp|#38);'i",
+						"'&(lt|#60);'i",
+						"'&(gt|#62);'i",
+						"'&(nbsp|#160);'i",
+						"'&(iexcl|#161);'i",
+						"'&(cent|#162);'i",
+						"'&(pound|#163);'i",
+						"'&(copy|#169);'i"
+						);				
+		$replace = array(	"",
+							"",
+							"\\1",
+							"\"",
+							"&",
+							"<",
+							">",
+							" ",
+							chr(161),
+							chr(162),
+							chr(163),
+							chr(169));
+					
+		$text = preg_replace($search,$replace,$document);
+								
+		return $text;
+	}
+
+/*======================================================================*\
+	Function:	_expandlinks
+	Purpose:	expand each link into a fully qualified URL
+	Input:		$links			the links to qualify
+				$URI			the full URI to get the base from
+	Output:		$expandedLinks	the expanded links
+\*======================================================================*/
+
+	function _expandlinks($links,$URI)
+	{
+		
+		preg_match("/^[^\?]+/",$URI,$match);
+
+		$match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
+				
+		$search = array( 	"|^http://".preg_quote($this->host)."|i",
+							"|^(?!http://)(\/)?(?!mailto:)|i",
+							"|/\./|",
+							"|/[^\/]+/\.\./|"
+						);
+						
+		$replace = array(	"",
+							$match."/",
+							"/",
+							"/"
+						);			
+				
+		$expandedLinks = preg_replace($search,$replace,$links);
+
+		return $expandedLinks;
+	}
+
+/*======================================================================*\
+	Function:	_httprequest
+	Purpose:	go get the http data from the server
+	Input:		$url		the url to fetch
+				$fp			the current open file pointer
+				$URI		the full URI
+				$body		body contents to send if any (POST)
+	Output:		
+\*======================================================================*/
+	
+	function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
+	{
+		if($this->passcookies && $this->_redirectaddr)
+			$this->setcookies();
+			
+		$URI_PARTS = parse_url($URI);
+		if(empty($url))
+			$url = "/";
+		$headers = $http_method." ".$url." ".$this->_httpversion."\r\n";		
+		if(!empty($this->agent))
+			$headers .= "User-Agent: ".$this->agent."\r\n";
+		if(!empty($this->host) && !isset($this->rawheaders['Host']))
+			$headers .= "Host: ".$this->host."\r\n";
+		if(!empty($this->accept))
+			$headers .= "Accept: ".$this->accept."\r\n";
+		
+		if($this->use_gzip) {
+			// make sure PHP was built with --with-zlib
+			// and we can handle gzipp'ed data
+			if ( function_exists(gzinflate) ) {
+			   $headers .= "Accept-encoding: gzip\r\n";
+			}
+			else {
+			   trigger_error(
+			   	"use_gzip is on, but PHP was built without zlib support.".
+				"  Requesting file(s) without gzip encoding.", 
+				E_USER_NOTICE);
+			}
+		}
+		
+		if(!empty($this->referer))
+			$headers .= "Referer: ".$this->referer."\r\n";
+		if(!empty($this->cookies))
+		{			
+			if(!is_array($this->cookies))
+				$this->cookies = (array)$this->cookies;
+	
+			reset($this->cookies);
+			if ( count($this->cookies) > 0 ) {
+				$cookie_headers .= 'Cookie: ';
+				foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+				$cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
+				}
+				$headers .= substr($cookie_headers,0,-2) . "\r\n";
+			} 
+		}
+		if(!empty($this->rawheaders))
+		{
+			if(!is_array($this->rawheaders))
+				$this->rawheaders = (array)$this->rawheaders;
+			while(list($headerKey,$headerVal) = each($this->rawheaders))
+				$headers .= $headerKey.": ".$headerVal."\r\n";
+		}
+		if(!empty($content_type)) {
+			$headers .= "Content-type: $content_type";
+			if ($content_type == "multipart/form-data")
+				$headers .= "; boundary=".$this->_mime_boundary;
+			$headers .= "\r\n";
+		}
+		if(!empty($body))	
+			$headers .= "Content-length: ".strlen($body)."\r\n";
+		if(!empty($this->user) || !empty($this->pass))	
+			$headers .= "Authorization: BASIC ".base64_encode($this->user.":".$this->pass)."\r\n";
+
+		$headers .= "\r\n";
+		
+		// set the read timeout if needed
+		if ($this->read_timeout > 0)
+			socket_set_timeout($fp, $this->read_timeout);
+		$this->timed_out = false;
+		
+		fwrite($fp,$headers.$body,strlen($headers.$body));
+		
+		$this->_redirectaddr = false;
+		unset($this->headers);
+		
+		// content was returned gzip encoded?
+		$is_gzipped = false;
+						
+		while($currentHeader = fgets($fp,$this->_maxlinelen))
+		{
+			if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+			{
+				$this->status=-100;
+				return false;
+			}
+				
+		//	if($currentHeader == "\r\n")
+			if(preg_match("/^\r?\n$/", $currentHeader) )
+			      break;
+						
+			// if a header begins with Location: or URI:, set the redirect
+			if(preg_match("/^(Location:|URI:)/i",$currentHeader))
+			{
+				// get URL portion of the redirect
+				preg_match("/^(Location:|URI:)\s+(.*)/",chop($currentHeader),$matches);
+				// look for :// in the Location header to see if hostname is included
+				if(!preg_match("|\:\/\/|",$matches[2]))
+				{
+					// no host in the path, so prepend
+					$this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+					// eliminate double slash
+					if(!preg_match("|^/|",$matches[2]))
+							$this->_redirectaddr .= "/".$matches[2];
+					else
+							$this->_redirectaddr .= $matches[2];
+				}
+				else
+					$this->_redirectaddr = $matches[2];
+			}
+		
+			if(preg_match("|^HTTP/|",$currentHeader))
+			{
+                if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
+				{
+					$this->status= $status[1];
+                }				
+				$this->response_code = $currentHeader;
+			}
+			
+			if (preg_match("/Content-Encoding: gzip/", $currentHeader) ) {
+				$is_gzipped = true;
+			}
+			
+			$this->headers[] = $currentHeader;
+		}
+
+		# $results = fread($fp, $this->maxlength);
+		$results = "";
+		while ( $data = fread($fp, $this->maxlength) ) {
+		    $results .= $data;
+		    if (
+		        strlen($results) > $this->maxlength ) {
+		        break;
+		    }
+		}
+		
+		// gunzip
+		if ( $is_gzipped ) {
+			// per http://www.php.net/manual/en/function.gzencode.php
+			$results = substr($results, 10);
+			$results = gzinflate($results);
+		}
+		
+		if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+		{
+			$this->status=-100;
+			return false;
+		}
+		
+		// check if there is a a redirect meta tag
+		
+		if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+		{
+			$this->_redirectaddr = $this->_expandlinks($match[1],$URI);	
+		}
+
+		// have we hit our frame depth and is there frame src to fetch?
+		if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+		{
+			$this->results[] = $results;
+			for($x=0; $x<count($match[1]); $x++)
+				$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+		}
+		// have we already fetched framed content?
+		elseif(is_array($this->results))
+			$this->results[] = $results;
+		// no framed content
+		else
+			$this->results = $results;
+		
+		return true;
+	}
+
+/*======================================================================*\
+	Function:	_httpsrequest
+	Purpose:	go get the https data from the server using curl
+	Input:		$url		the url to fetch
+				$URI		the full URI
+				$body		body contents to send if any (POST)
+	Output:		
+\*======================================================================*/
+	
+	function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
+	{
+		if($this->passcookies && $this->_redirectaddr)
+			$this->setcookies();
+
+		$headers = array();		
+					
+		$URI_PARTS = parse_url($URI);
+		if(empty($url))
+			$url = "/";
+		// GET ... header not needed for curl
+		//$headers[] = $http_method." ".$url." ".$this->_httpversion;		
+		if(!empty($this->agent))
+			$headers[] = "User-Agent: ".$this->agent;
+		if(!empty($this->host))
+			$headers[] = "Host: ".$this->host;
+		if(!empty($this->accept))
+			$headers[] = "Accept: ".$this->accept;
+		if(!empty($this->referer))
+			$headers[] = "Referer: ".$this->referer;
+		if(!empty($this->cookies))
+		{			
+			if(!is_array($this->cookies))
+				$this->cookies = (array)$this->cookies;
+	
+			reset($this->cookies);
+			if ( count($this->cookies) > 0 ) {
+				$cookie_str = 'Cookie: ';
+				foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+				$cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
+				}
+				$headers[] = substr($cookie_str,0,-2);
+			}
+		}
+		if(!empty($this->rawheaders))
+		{
+			if(!is_array($this->rawheaders))
+				$this->rawheaders = (array)$this->rawheaders;
+			while(list($headerKey,$headerVal) = each($this->rawheaders))
+				$headers[] = $headerKey.": ".$headerVal;
+		}
+		if(!empty($content_type)) {
+			if ($content_type == "multipart/form-data")
+				$headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
+			else
+				$headers[] = "Content-type: $content_type";
+		}
+		if(!empty($body))	
+			$headers[] = "Content-length: ".strlen($body);
+		if(!empty($this->user) || !empty($this->pass))	
+			$headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
+			
+		for($curr_header = 0; $curr_header < count($headers); $curr_header++) {
+			$cmdline_params .= " -H \"".$headers[$curr_header]."\"";
+		}
+			  	                         
+		if(!empty($body))
+			$cmdline_params .= " -d \"$body\"";
+		
+		if($this->read_timeout > 0)
+			$cmdline_params .= " -m ".$this->read_timeout;
+		
+		$headerfile = uniqid(time());
+		
+		# accept self-signed certs
+		$cmdline_params .= " -k"; 
+		exec($this->curl_path." -D \"/tmp/$headerfile\"".escapeshellcmd($cmdline_params)." ".escapeshellcmd($URI),$results,$return);
+		
+		if($return)
+		{
+			$this->error = "Error: cURL could not retrieve the document, error $return.";
+			return false;
+		}
+			
+			
+		$results = implode("\r\n",$results);
+		
+		$result_headers = file("/tmp/$headerfile");
+						
+		$this->_redirectaddr = false;
+		unset($this->headers);
+						
+		for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
+		{
+			
+			// if a header begins with Location: or URI:, set the redirect
+			if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
+			{
+				// get URL portion of the redirect
+				preg_match("/^(Location: |URI:)(.*)/",chop($result_headers[$currentHeader]),$matches);
+				// look for :// in the Location header to see if hostname is included
+				if(!preg_match("|\:\/\/|",$matches[2]))
+				{
+					// no host in the path, so prepend
+					$this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+					// eliminate double slash
+					if(!preg_match("|^/|",$matches[2]))
+							$this->_redirectaddr .= "/".$matches[2];
+					else
+							$this->_redirectaddr .= $matches[2];
+				}
+				else
+					$this->_redirectaddr = $matches[2];
+			}
+		
+			if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
+			{
+			    $this->response_code = $result_headers[$currentHeader];
+			    if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$this->response_code, $match))
+			    {
+				$this->status= $match[1];
+                	    }
+			}
+			$this->headers[] = $result_headers[$currentHeader];
+		}
+
+		// check if there is a a redirect meta tag
+		
+		if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]+URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+		{
+			$this->_redirectaddr = $this->_expandlinks($match[1],$URI);	
+		}
+
+		// have we hit our frame depth and is there frame src to fetch?
+		if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+		{
+			$this->results[] = $results;
+			for($x=0; $x<count($match[1]); $x++)
+				$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+		}
+		// have we already fetched framed content?
+		elseif(is_array($this->results))
+			$this->results[] = $results;
+		// no framed content
+		else
+			$this->results = $results;
+
+		unlink("/tmp/$headerfile");
+		
+		return true;
+	}
+
+/*======================================================================*\
+	Function:	setcookies()
+	Purpose:	set cookies for a redirection
+\*======================================================================*/
+	
+	function setcookies()
+	{
+		for($x=0; $x<count($this->headers); $x++)
+		{
+		if(preg_match("/^set-cookie:[\s]+([^=]+)=([^;]+)/i", $this->headers[$x],$match))
+			$this->cookies[$match[1]] = $match[2];
+		}
+	}
+
+	
+/*======================================================================*\
+	Function:	_check_timeout
+	Purpose:	checks whether timeout has occurred
+	Input:		$fp	file pointer
+\*======================================================================*/
+
+	function _check_timeout($fp)
+	{
+		if ($this->read_timeout > 0) {
+			$fp_status = socket_get_status($fp);
+			if ($fp_status["timed_out"]) {
+				$this->timed_out = true;
+				return true;
+			}
+		}
+		return false;
+	}
+
+/*======================================================================*\
+	Function:	_connect
+	Purpose:	make a socket connection
+	Input:		$fp	file pointer
+\*======================================================================*/
+	
+	function _connect(&$fp)
+	{
+		if(!empty($this->proxy_host) && !empty($this->proxy_port))
+			{
+				$this->_isproxy = true;
+				$host = $this->proxy_host;
+				$port = $this->proxy_port;
+			}
+		else
+		{
+			$host = $this->host;
+			$port = $this->port;
+		}
+	
+		$this->status = 0;
+		
+		if($fp = fsockopen(
+					$host,
+					$port,
+					$errno,
+					$errstr,
+					$this->_fp_timeout
+					))
+		{
+			// socket connection succeeded
+
+			return true;
+		}
+		else
+		{
+			// socket connection failed
+			$this->status = $errno;
+			switch($errno)
+			{
+				case -3:
+					$this->error="socket creation failed (-3)";
+				case -4:
+					$this->error="dns lookup failure (-4)";
+				case -5:
+					$this->error="connection refused or timed out (-5)";
+				default:
+					$this->error="connection failed (".$errno.")";
+			}
+			return false;
+		}
+	}
+/*======================================================================*\
+	Function:	_disconnect
+	Purpose:	disconnect a socket connection
+	Input:		$fp	file pointer
+\*======================================================================*/
+	
+	function _disconnect($fp)
+	{
+		return(fclose($fp));
+	}
+
+	
+/*======================================================================*\
+	Function:	_prepare_post_body
+	Purpose:	Prepare post body according to encoding type
+	Input:		$formvars  - form variables
+				$formfiles - form upload files
+	Output:		post body
+\*======================================================================*/
+	
+	function _prepare_post_body($formvars, $formfiles)
+	{
+		settype($formvars, "array");
+		settype($formfiles, "array");
+
+		if (count($formvars) == 0 && count($formfiles) == 0)
+			return;
+		
+		switch ($this->_submit_type) {
+			case "application/x-www-form-urlencoded":
+				reset($formvars);
+				while(list($key,$val) = each($formvars)) {
+					if (is_array($val) || is_object($val)) {
+						while (list($cur_key, $cur_val) = each($val)) {
+							$postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
+						}
+					} else
+						$postdata .= urlencode($key)."=".urlencode($val)."&";
+				}
+				break;
+
+			case "multipart/form-data":
+				$this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
+				
+				reset($formvars);
+				while(list($key,$val) = each($formvars)) {
+					if (is_array($val) || is_object($val)) {
+						while (list($cur_key, $cur_val) = each($val)) {
+							$postdata .= "--".$this->_mime_boundary."\r\n";
+							$postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
+							$postdata .= "$cur_val\r\n";
+						}
+					} else {
+						$postdata .= "--".$this->_mime_boundary."\r\n";
+						$postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
+						$postdata .= "$val\r\n";
+					}
+				}
+				
+				reset($formfiles);
+				while (list($field_name, $file_names) = each($formfiles)) {
+					settype($file_names, "array");
+					while (list(, $file_name) = each($file_names)) {
+						if (!is_readable($file_name)) continue;
+
+						$fp = fopen($file_name, "r");
+						$file_content = fread($fp, filesize($file_name));
+						fclose($fp);
+						$base_name = basename($file_name);
+
+						$postdata .= "--".$this->_mime_boundary."\r\n";
+						$postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n";
+						$postdata .= "$file_content\r\n";
+					}
+				}
+				$postdata .= "--".$this->_mime_boundary."--\r\n";
+				break;
+		}
+
+		return $postdata;
+	}
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/htdocs/cookbook.html
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/htdocs/cookbook.html	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/htdocs/cookbook.html	(revision 225)
@@ -0,0 +1,237 @@
+<html>
+	<head>
+	<title>Magie RSS Recipes:  Simple PHP RSS How To</title>
+	<style>
+	body {
+		font-family:trebuchet MS, trebuchet, verdana, arial, sans-serif; 
+		font-size: 11px; 
+	
+	}
+	
+	pre { font-family: "Courier New", monospace; 
+      padding: 1em; 
+      margin: 0.2em 2.5em 0.2em 3em;
+      background-color: #efeff5;
+      border: 1px solid #cfcfcf;
+      white-space: pre;
+ 	}
+
+	</style>
+	</head>
+	<body>
+<p>
+<h1>MagpieRSS Recipes:  Cooking with Corbies</h1>
+
+<div align="center"><h3><em>"Four and twenty blackbirds baked in a
+pie."</em></h3></div>
+</p>
+<p>
+<ol>
+<li><a href="#limit">Limit the Number of Headlines(aka Items) Returned</a></li>
+<li><a href="#error_message">Display a Custom Error Message if Something Goes
+Wrong</a></li>
+<li><a href="#write_rss">Generate a New RSS Feed</a></li>
+<li><a href="#by_date">Display Headlines More Recent then X Date</a></li>
+<li><a href="#from_file">Parse a Local File Containing RSS</a></li>
+
+</ol>
+</p>
+
+<a name="limit"></a><h2>1. Limit the Number of Headlines(aka Items) Returned.</h2>
+
+<h3>Problem:</h3>
+
+You want to display the 10 (or 3 or whatever) most recent headlines, but the RSS feed
+contains 15.
+
+<h3>Solution:</h3>
+
+<pre>
+$num_items = 10;
+$rss = fetch_rss($url);
+
+$items = array_slice($rss->items, 0, $num_items);
+
+foreach ( $items as $item ) {
+</pre>
+<h3>Discussion:</h3>
+
+Rather then trying to limit the number of items Magpie parses, a much simpler,
+and more flexible approach is to take a "slice" of the array of items.  And
+array_slice() is smart enough to do the right thing if the feed has less items
+then $num_items.
+
+<h3>See:</h3> <a href="http://www.php.net/array_slice">http://www.php.net/array_slice</a>
+</p>
+
+<a name="error_message"></a><h2>2. Display a Custom Error Message if Something Goes Wrong</h2>
+
+<h3>Problem:</h3>
+
+You don't want Magpie's error messages showing up if something goes wrong.
+
+<h3>Solution:</h3>
+<pre>
+# Magpie throws USER_WARNINGS only
+# so you can cloak these, by only showing ERRORs
+error_reporting(E_ERROR);
+
+# check the return value of fetch_rss()
+
+$rss = fetch_rss($url);
+
+if ( $rss ) {
+...display rss feed...
+}
+else {
+   echo "An error occured!  " .
+        "Consider donating more $$$ for restoration of services." .
+        "&lt;br&gt;Error Message: " . magpie_error();
+}
+</pre>
+<h3>Discussion:</h3>
+
+MagpieRSS triggers a warning in a number of circumstances.  The 2 most common
+circumstances are:  if the specified RSS file isn't properly formed (usually
+because it includes illegal HTML), or if Magpie can't download the remote RSS
+file, and there is no cached version.  
+
+If you don't want your users to see these warnings change your error_reporting
+settings to only display ERRORs.<br />
+Another option is to turn off display_error,
+so that WARNINGs, and NOTICEs still go to the error_log but not to the webpages.
+
+You can do this with:
+
+<pre>
+# you can also do this in your php.ini file
+ini_set('display_errors', 0);
+</pre>
+
+<h3>See:</h3>
+<a
+href="http://www.php.net/error_reporting">http://www.php.net/error_reporting</a>,<br
+/>
+<a href="http://www.php.net/ini_set">http://www.php.net/ini_set</a>, <br />
+<a
+href="http://www.php.net/manual/en/ref.errorfunc.php">http://www.php.net/manual/en/ref.errorfunc.php</a><br
+/>
+
+<a name="write_rss"></a><h2>3. Generate a New RSS Feed</h2>
+
+<h3>Problem:</h3>
+
+Create an RSS feed for other people to use.
+
+<h3>Solution:</h3>
+
+Use Useful Inc's <a href="http://usefulinc.com/rss/rsswriter/">RSSWriter</a>.
+
+<h3>Discussion:</h3>
+
+An example of turning a Magpie parsed RSS object back into an RSS file is
+forthcoming.  In the meantime RSSWriter is well documented.
+
+<a name="by_date"></a><h2>4. Display Headlines More Recent then X Date</h2>
+
+<h3>Problem:</h3>
+
+You only want to display headlines that were published on, or after a certain
+date.
+
+
+<h3>Solution:</h3>
+<pre>
+require_once('rss_utils.inc');
+
+# get all headlines published today
+$today = getdate();
+
+# today, 12AM
+$date = mktime(0,0,0,$today['mon'], $today['mday'], $today['year']);
+
+$rss = fetch_rss($url);
+
+foreach ( $rss->items as $item ) {
+   $published = parse_w3cdtf($item['dc']['date']);
+   if ( $published &gt;= $date ) {
+        echo "Title: " . $item['title'];
+        echo "Published: " . date("h:i:s A", $published);
+        echo "&lt;p&gt;";
+    }
+}
+</pre>
+<h3>Discussion:</h3>
+
+This recipe only works for RSS 1.0 feeds that include the <dc:date> field.
+(which is very good RSS style) <br /> 
+<code>parse_w3cdtf()</code> is defined in
+<code>rss_utils.inc</code>, and parses RSS style dates into Unix epoch
+seconds.  
+
+<h3>See: </h3>
+<a
+href="http://www.php.net/manual/en/ref.datetime.php">http://www.php.net/manual/en/ref.datetime.php</a>
+
+<a name="from_file"></a>
+<h2>5. Parse a Local File Containing RSS</h2>
+<h3>Problem:</h3>
+MagpieRSS provides <code>fetch_rss()</code> which takes a URL and returns a
+parsed RSS object, but what if you want to parse a file stored locally that
+doesn't have a URL?
+
+<h3>Solution</h3>
+<pre>
+require_once('rss_parse.inc');
+
+$rss_file = 'some_rss_file.rdf';
+$rss_string = read_file($rss_file);
+$rss = new MagpieRSS( $rss_string );
+
+if ( $rss and !$rss->ERROR) {
+...display rss...
+}
+else {
+    echo "Error: " . $rss->ERROR;
+}
+
+# efficiently read a file into a string
+# in php >= 4.3.0 you can simply use file_get_contents()
+#
+function read_file($filename) {
+    $fh = fopen($filename, 'r') or die($php_errormsg);
+    $rss_string = fread($fh, filesize($filename) );
+    fclose($fh);
+    return $rss_string;
+}
+</pre>
+
+<h3>Discussion</h3>
+Here we are using MagpieRSS's RSS parser directly without the convience wrapper
+of <code>fetch_rss()</code>.  We read the contents of the RSS file into a
+string, and pass it to the parser constructor.  Notice also that error handling
+is subtly different.
+
+<h3>See: </h3>
+<a
+href="http://www.php.net/manual/en/ref.filesystem.php">http://www.php.net/manual/en/ref.filesystem.php</a>,<br
+/>
+<a
+href="http://www.php.net/manual/en/language.oop.php">http://www.php.net/manual/en/language.oop.php</a>
+
+<!-- 
+<a name="link"></a><h2>#. Recipe</h2>
+<h3>Problem:</h3>
+Problem description
+<h3>Solution</h3>
+<pre>
+code
+</pre>
+<h3>Discussion/h3>
+Discuss code
+<h3>See: </h3>
+Documentation links:
+-->
+
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/magpie/htdocs/index.html
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/htdocs/index.html	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/htdocs/index.html	(revision 225)
@@ -0,0 +1,419 @@
+<html>
+  <head>
+  <title>Magpie RSS - PHP RSS Parser</title>
+  <link rel="alternate" type="application/rss+xml" title="RSS"
+        href="http://laughingmeme.org/magpierss.rdf" />
+  <style>
+	body {
+		font-family:trebuchet MS, trebuchet, verdana, arial, sans-serif; 
+		font-size: 11px; 
+	
+	}
+	
+	pre { font-family: "Courier New", monospace; 
+      padding: 1em; 
+      margin: 0.2em 2.5em 0.2em 3em;
+      background-color: #efeff5;
+      border: 1px solid #cfcfcf;
+      white-space: pre;
+ }
+
+	li.news {
+		padding-bottom:15px;
+	}
+
+	a.nav { color: #FFFFFF; }
+	
+	div.nav {
+		width: 2in;
+		float: right;
+		border: 2px solid #cfcfcf;
+		padding: 5px;
+		background-color: #996699;
+	}
+	
+  </style> 
+  </head>
+  <body>
+  	<img src="magpie-photo.jpg">
+	<h1>MagpieRSS</h1>
+	<p>
+	<h2>MagpieRSS provides an XML-based (expat) RSS parser in PHP.</h2>
+	<p>
+	MagpieRSS is compatible with RSS .9 through RSS 1.0, and supports the
+	RSS 1.0's modules. (with a few exceptions)
+	<p>
+	<div class="nav">
+	<center><h3>Project Info</h3></center>
+	<ul>
+	<li><a class="nav"
+href="http://sourceforge.net/project/showfiles.php?group_id=55691">Download
+Magpie</a></li>
+	<li><a class="nav"
+href="http://sourceforge.net/mail/?group_id=55691">Mailing
+Lists</a></li>
+	<li><a class="nav" href="#news">News!</a></li>
+	<li><a class="nav" href="#why">Why?</a></li>
+	<li><a class="nav" href="#features">Features</a></li>
+	<li><a class="nav" href="#philosophy">Philosophy</a></li>
+	<li><a class="nav" href="#usage">Usage Examples</a></li>
+	<li><a class="nav" href="/cookbook.html">Cookbook</a></li>
+	<li><a class="nav" href="#todo">Todo</a></li>
+<li style="list-style: none; padding-top: 5px;"><a title="Keep up on MagpieRSS news via RSS" href="http://laughingmeme.org/magpierss.rdf"><img
+src="http://magpierss.sf.net/black_grey_magpie_news.gif" border="0"></a></li>
+</ul>
+</div>
+	<a name="news"></a>
+	<h3>News!</h3>
+	<ul>
+
+<li class="news">
+		<a 
+href="http://sourceforge.net/project/showfiles.php?group_id=55691">MagpieRSS
+0.51 Released</a>
+<ul>
+<li> important bugfix!</li>
+<li> fix <a href="http://laughingmeme.org/archives/000811.html
+">"silent failure"</a> when PHP doesn't have zlib</li>
+</ul>
+
+</li>
+
+<li class="news">
+		<a href="http://minutillo.com/steve/feedonfeeds/">Feed On Feeds Uses Magpie</a>
+<ul>
+<li> server based PHP RSS aggregator built with MagpieRSS</li>
+<li> easy to install, easy to use.</li>
+</ul>
+
+</li>
+
+
+<li class="news">
+		<a 
+href="http://sourceforge.net/project/showfiles.php?group_id=55691&release_id=158897">MagpieRSS
+0.5 Released</a>
+<ul>
+<li> supports transparent HTTP gzip content negotiation for reduced bandwidth usage</li> 
+<li> quashed some undefined index notices</li>
+</ul>
+
+</li>
+
+
+<li class="news">
+		<a 
+href="http://sourceforge.net/project/showfiles.php?group_id=55691&release_id=139643">MagpieRSS
+0.46 Released</a>
+<ul>
+<li> minor release, more error handling clean up</li> 
+<li> documentation fixes, simpler example</li>
+<li> new <a href="/TROUBLESHOOTING">trouble shooting</a> guide for installation and usage problems</a>
+</ul>
+
+</li>
+
+<li class="news">
+		<a 
+href="http://laughingmeme.org/magpierss.rdf">Magpie News as RSS</a>
+<ul>
+<li> releases, bug fixes, releated stories as an RSS feed</li> 
+</ul>
+
+</li>
+
+
+<li class="news">
+		<a 
+href="http://magpierss.sourceforge.net/cookbook.html">MagpieRSS
+Cookbook: Simple PHP RSS How Tos</a>
+<ul>
+<li> answers some of the most frequently asked Magpie questions</li> 
+<li> feedback, suggestions, requests, recipes welcome</li>
+</ul>
+
+</li>
+
+<li clas="news">
+ <a href="http://sourceforge.net/project/showfiles.php?group_id=55691&release_id=134850">MagpieRSS 0.4 Released!</a>
+<ul>
+<li> improved error handling, more flexibility for script authors,
+backwards compatible</li>
+<li> new and better examples!  including using MagpieRSS and <a
+href="http://smarty.php.net">Smarty</a></li>
+<li> new Smarty plugin for RSS date parsing</li>
+</ul>
+<br />
+</li>
+<!--
+<li class="news">
+<a href="http://www.infinitepenguins.net/rss/">Infinite Penguin now
+supports Magpie 0.3</a>
+<ul>
+<li> simple, sophisticated RSS viewer</li> 
+<li> includes auto-generated javascript ticker from RSS feed</li>
+</ul>
+
+</li>
+
+
+<li class="news">
+<a
+href="http://traumwind.tierpfad.de/blog/magpie/magpie_alike.php">Traumwind
+releases REX backend for MagpieRSS</a>
+<ul>
+<li>drop in support using regex based XML parser</li>
+<li>parses improperly formed XML that chokes expat</li>
+</ul>
+
+</li>
+
+<li class="news">
+		<a
+href="http://sourceforge.net/project/showfiles.php?group_id=55691&release_id=118652">
+		MagpieRSS 0.3 Released!</a>
+		<ul>
+		  <li>Support added for 
+			 <a href="http://fishbowl.pastiche.org/archives/001132.html">HTTP
+			 Conditional GETs</a>.</li>
+		  <li>See <a href="http://sourceforge.net/project/shownotes.php?group_id=55691&release_id=118652">ChangeLog</a>
+		  for more info.</li>
+	    </ul>
+		</li>
+		<li class="news">MagpieRSS 0.2!</a>
+		<ul>
+		  <li>Major clean up of the code.  Easier to use.</li>
+		  <li>Simpler install on shared hosts.</li>
+	      <li>Better documentation and comments.</li>
+		</ul>
+		</li>
+		<li class="news">We've <a href="http://sourceforge.net/projects/magpierss/">moved to
+		Sourceforge!</a></li>
+	-->
+	</ul>
+	</p>
+	<p>
+	<a name="why"></a>
+	<h3>Why?</h3>
+	I wrote MagpieRSS out of a frustration with the limitations of existing
+	solutions.   In particular many of the existing PHP solutions seemed to:
+	<ul>
+	<li>use a parser based on regular expressions, making for an inherently
+	fragile solution
+	<li>only support early versions of RSS
+	<li>discard all the interesting information besides item title, description,
+	and link.
+	<li>not build proper separation between parsing the RSS and displaying it.
+	</ul>
+	In particular I failed to find any PHP RSS parsers that could sufficiently
+	parse RSS 1.0 feeds, to be useful on the RSS based event feeds we generate
+	at <a href="http://protest.net">Protest.net</a>.
+	</p>
+	<p>
+	<a name="features"></a>
+	<h3>Features</h3>
+
+<ul>
+	<li class="toplevel">
+	<h4>Easy to Use</h4>
+	As simple as:
+<pre>
+require('rss_fetch.inc');
+$rss = fetch_rss($url);
+</pre>
+
+	</li>
+	<li class="toplevel">
+		<h4>Parses RSS 0.9 - RSS 1.0</h4>
+
+		Parses most RSS formats, including support for 
+		<a href="http://www.purl.org/rss/1.0/modules/">1.0 modules</a> and limited
+		namespace support.  RSS is packed into convenient data structures; easy to
+		use in PHP, and appropriate for passing to a templating system, like 
+		<a href="http://smarty.php.net">Smarty</a>.
+	</li>
+	<li>
+	<h4>Integrated Object Cache</h4>
+	
+	Caching the parsed RSS means that the 2nd request is fast, and that
+including the rss_fetch call in your PHP page won't destroy your performance,
+and force you to reply on an external cron job. And it happens transparently.
+
+	</li>
+	<li>
+	<h4>HTTP Conditional GETs</h4>
+	
+	Save bandwidth and speed up download times with intelligent use of
+	Last-Modified and ETag.<br /> See <a
+	href="http://fishbowl.pastiche.org/archives/001132.html">HTTP Conditional Get for RSS Hackers</a>
+	</li>
+	
+	<li><h4>Configurable</h4>
+	
+	Makes extensive use of constants to allow overriding default behaviour, and
+	installation on shared hosts.
+	</li>
+	<li><h4>Modular</h4>
+	<ul>
+		<li>rss_fetch.inc - wraps a simple interface (<code>fetch_rss()</code>)
+		around the library.
+		<li>rss_parse.inc - provides the RSS parser, and the RSS object
+		<li>rss_cache.inc - a simple (no GC) object cache, optimized for RSS objects
+		<li>rss_utils.inc - utility functions for working with RSS.  currently
+		provides <code>parse_w3cdtf()</code>, for parsing <a
+		href="http://www.w3.org/TR/NOTE-datetime">W3CDTF</a> into epoch seconds.
+	</ul>
+</ul>
+
+	
+	</p>
+<p>
+	<a name="philosophy"></a>
+	<h3>Magpie's approach to parsing RSS</h3>
+
+	Magpie takes a naive, and inclusive approach. Absolutely
+	non-validating, as long as the RSS feed is well formed, Magpie will
+	cheerfully parse new, and never before seen tags in your RSS feeds.
+	</p>
+	<p>
+	This makes it very simple support the varied versions of RSS simply, but
+	forces the consumer of a RSS feed to be cognizant of how it is
+	structured.(at least if you want to do something fancy)
+	</p>
+	<p>
+	Magpie parses a RSS feed into a simple object, with 4 fields:
+	<code>channel</code>, <code>items</code>, <code>image</code>, and
+	<code>textinput</code>.
+	</p>	
+	<p>
+	<h4>channel</h4>
+	<code>$rss->channel</code> contains key-value pairs of all tags, without
+	nested tags, found between the root tag (&lt;rdf:RDF&gt;, or &lt;rss&gt;) 
+	and the end of the document.
+	</p>
+	<p>
+	<h4>items</h4>
+	<code>$rss->items</code> is an array of associative arrays, each one
+	describing a single item.  An example that looks like:
+	<pre>
+&lt;item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=event&#38;ID=210257"&gt;
+&lt;title&gt;Weekly Peace Vigil&lt;/title&gt;
+&lt;link&gt;http://protest.net/NorthEast/calendrome.cgi?span=event&#38;ID=210257&lt;/link&gt;
+&lt;description&gt;Wear a white ribbon&lt;/description&gt;
+&lt;dc:subject&gt;Peace&lt;/dc:subject&gt;
+&lt;ev:startdate&gt;2002-06-01T11:00:00&lt;/ev:startdate&gt;
+&lt;ev:location&gt;Northampton, MA&lt;/ev:location&gt;
+&lt;ev:enddate&gt;2002-06-01T12:00:00&lt;/ev:enddate&gt;
+&lt;ev:type&gt;Protest&lt;/ev:type&gt;
+&lt;/item&gt;
+	</pre><p>
+	Is parsed, and pushed on the <code>$rss-&gt;items</code> array as:
+	<p><pre>
+array(
+	title =&gt; 'Weekly Peace Vigil',
+	link =&gt; 'http://protest.net/NorthEast/calendrome.cgi?span=event&#38;ID=210257',
+	description =&gt; 'Wear a white ribbon',
+	dc =&gt; array (
+			subject =&gt; 'Peace'
+		),
+	ev =&gt; array (
+		startdate =&gt; '2002-06-01T11:00:00',
+		enddate =&gt; '2002-06-01T12:00:00',
+		type =&gt; 'Protest',
+		location =&gt; 'Northampton, MA'
+	)
+);
+</pre>
+</p>
+<p>
+<h4>image and textinput</h4>
+<code>$rss->image</code> and <code>$rss-textinput</code> are associative arrays
+including name-value pairs for anything found between the respective parent
+tags.
+</p>
+<p>
+<a name="usage"></a>
+<h3>Usage Examples:</h3>
+
+A very simple example would be:
+<pre>
+require_once 'rss_fetch.inc';
+
+$url = 'http://magpie.sf.net/samples/imc.1-0.rdf';
+$rss = fetch_rss($url);
+
+echo "Site: ", $rss->channel['title'], "&lt;br&gt;\n";
+foreach ($rss->items as $item ) {
+	$title = $item[title];
+	$url   = $item[link];
+	echo "&lt;a href=$url&gt;$title&lt;/a&gt;&lt;/li&gt;&lt;br&gt;\n";
+}
+</pre>
+More soon....in the meantime you can check out a 
+<a href="http://www.infinitepenguins.net/rss/">cool tool built with
+MagpieRSS</a>, version 0.1.
+</p>
+<p>
+<a name="todo"></a>
+<h3>Todos</h3>
+	<h4>RSS Parser</h4>
+	<ul>
+		<li>Swap in a smarter parser that includes optional 
+		support for validation, and required fields.</li>
+		
+		<li>Support RSS 2.0 (as much as I'm annoyed by it)</li>
+		
+		<li>Improve support for modules that rely on attributes</li>
+	</ul>
+	
+	<h4>RSS Cache</h4>
+	<ul>
+		<li>Light-weight garbage collection
+	</ul>
+	
+	<h4>Fetch RSS</h4>
+	<ul>
+	<li>Attempt to <a
+	href="http://diveintomark.org/archives/2002/08/15.html">auto-detect an
+	RSS feed</a>, given a URL following, much like <a
+	href="http://diveintomark.org/projects/misc/rssfinder.py.txt">rssfinder.py</a>does.
+	</li>
+	</ul>
+	<h4>Misc</h4>
+		<ul>
+		<li>More examples</li>
+		<li>A test suite</li>
+		<li>RSS generation, perhaps with <a
+	href="http://usefulinc.com/rss/rsswriter/">RSSwriter</a>?
+		</li>
+		</ul>
+	
+</p>
+<p>
+<h3>RSS Resources</h3>
+	<ul>
+	<li><a href="http://mnot.net/rss/tutorial/">RSS Tutorial for Content Publishers
+	and Webmasters</a> is a great place to start.
+	<li><a href="http://gils.utah.gov/rss/">RSS Workshop:  Publish and Syndicate
+	Your News to the Web</a> is also a good introduction</li>
+	<li><a href="http://www.disobey.com/amphetadesk/finding_more.html">Finding
+	More Channels</a> on how to find RSS feeds.
+	<li>Hammersley's <a href="http://rss.benhammersley.com/">Content Syndication
+	with XML and RSS</a> is a blog covering RSS current events.
+	<li><a href="http://groups.yahoo.com/group/rss-dev/">RSS-DEV mailing
+	list</a> is generally a very helpful, informative space, with the occasional
+	heated debate	
+	<li><a href="http://feeds.archive.org/validator/">RSS Validator</a>
+	</ul>.
+</p>
+<h3>License and Contact Info</h3>
+Magpie is distributed under the GPL license...
+<p>
+coded by: kellan (at) protest.net, feedback is always appreciated.
+<p>
+<a href="http://sourceforge.net"><img
+src="http://sourceforge.net/sflogo.php?group_id=55691&amp;type=3" 
+width="125" height="37" border="0" alt="SourceForge.net Logo"></a>
+<img src="http://laughingmeme.org/magpie_views.gif">
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/util/magpie/rss_cache.inc
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/rss_cache.inc	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/rss_cache.inc	(revision 225)
@@ -0,0 +1,200 @@
+<?php
+/*
+ * Project:     MagpieRSS: a simple RSS integration tool
+ * File:        rss_cache.inc, a simple, rolling(no GC), cache 
+ *              for RSS objects, keyed on URL.
+ * Author:      Kellan Elliott-McCrea <kellan@protest.net>
+ * Version:     0.51
+ * License:     GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * http://lists.sourceforge.net/lists/listinfo/magpierss-general
+ *
+ */
+
+class RSSCache {
+    var $BASE_CACHE = './cache';    // where the cache files are stored
+    var $MAX_AGE    = 3600;         // when are files stale, default one hour
+    var $ERROR      = "";           // accumulate error messages
+    
+    function RSSCache ($base='', $age='') {
+        if ( $base ) {
+            $this->BASE_CACHE = $base;
+        }
+        if ( $age ) {
+            $this->MAX_AGE = $age;
+        }
+        
+        // attempt to make the cache directory
+        if ( ! file_exists( $this->BASE_CACHE ) ) {
+            $status = @mkdir( $this->BASE_CACHE, 0755 );
+            
+            // if make failed 
+            if ( ! $status ) {
+                $this->error(
+                    "Cache couldn't make dir '" . $this->BASE_CACHE . "'."
+                );
+            }
+        }
+    }
+    
+/*=======================================================================*\
+    Function:   set
+    Purpose:    add an item to the cache, keyed on url
+    Input:      url from wich the rss file was fetched
+    Output:     true on sucess  
+\*=======================================================================*/
+    function set ($url, $rss) {
+        $this->ERROR = "";
+        $cache_file = $this->file_name( $url );
+        $fp = @fopen( $cache_file, 'w' );
+        
+        if ( ! $fp ) {
+            $this->error(
+                "Cache unable to open file for writing: $cache_file"
+            );
+            return 0;
+        }
+        
+        
+        $data = $this->serialize( $rss );
+        fwrite( $fp, $data );
+        fclose( $fp );
+        
+        return $cache_file;
+    }
+    
+/*=======================================================================*\
+    Function:   get
+    Purpose:    fetch an item from the cache
+    Input:      url from wich the rss file was fetched
+    Output:     cached object on HIT, false on MISS 
+\*=======================================================================*/ 
+    function get ($url) {
+        $this->ERROR = "";
+        $cache_file = $this->file_name( $url );
+        
+        if ( ! file_exists( $cache_file ) ) {
+            $this->debug( 
+                "Cache doesn't contain: $url (cache file: $cache_file)"
+            );
+            return 0;
+        }
+        
+        $fp = @fopen($cache_file, 'r');
+        if ( ! $fp ) {
+            $this->error(
+                "Failed to open cache file for reading: $cache_file"
+            );
+            return 0;
+        }
+        
+        if ($filesize = filesize($cache_file) ) {
+        	$data = fread( $fp, filesize($cache_file) );
+        	$rss = $this->unserialize( $data );
+        
+        	return $rss;
+    	}
+    	
+    	return 0;
+    }
+
+/*=======================================================================*\
+    Function:   check_cache
+    Purpose:    check a url for membership in the cache
+                and whether the object is older then MAX_AGE (ie. STALE)
+    Input:      url from wich the rss file was fetched
+    Output:     cached object on HIT, false on MISS 
+\*=======================================================================*/     
+    function check_cache ( $url ) {
+        $this->ERROR = "";
+        $filename = $this->file_name( $url );
+        
+        if ( file_exists( $filename ) ) {
+            // find how long ago the file was added to the cache
+            // and whether that is longer then MAX_AGE
+            $mtime = filemtime( $filename );
+            $age = time() - $mtime;
+            if ( $this->MAX_AGE > $age ) {
+                // object exists and is current
+                return 'HIT';
+            }
+            else {
+                // object exists but is old
+                return 'STALE';
+            }
+        }
+        else {
+            // object does not exist
+            return 'MISS';
+        }
+    }
+
+	function cache_age( $cache_key ) {
+		$filename = $this->file_name( $url );
+		if ( file_exists( $filename ) ) {
+			$mtime = filemtime( $filename );
+            $age = time() - $mtime;
+			return $age;
+		}
+		else {
+			return -1;	
+		}
+	}
+	
+/*=======================================================================*\
+    Function:   serialize
+\*=======================================================================*/     
+    function serialize ( $rss ) {
+        return serialize( $rss );
+    }
+
+/*=======================================================================*\
+    Function:   unserialize
+\*=======================================================================*/     
+    function unserialize ( $data ) {
+        return unserialize( $data );
+    }
+    
+/*=======================================================================*\
+    Function:   file_name
+    Purpose:    map url to location in cache
+    Input:      url from wich the rss file was fetched
+    Output:     a file name
+\*=======================================================================*/     
+    function file_name ($url) {
+        $filename = md5( $url );
+        return join( DIRECTORY_SEPARATOR, array( $this->BASE_CACHE, $filename ) );
+    }
+
+/*=======================================================================*\
+    Function:   error
+    Purpose:    register error
+\*=======================================================================*/         
+    function error ($errormsg, $lvl=E_USER_WARNING) {
+        // append PHP's error message if track_errors enabled
+        if ( isset($php_errormsg) ) { 
+            $errormsg .= " ($php_errormsg)";
+        }
+        $this->ERROR = $errormsg;
+        if ( MAGPIE_DEBUG ) {
+            trigger_error( $errormsg, $lvl);
+        }
+        else {
+            error_log( $errormsg, 0);
+        }
+    }
+    
+    function debug ($debugmsg, $lvl=E_USER_NOTICE) {
+        if ( MAGPIE_DEBUG ) {
+            $this->error("MagpieRSS [debug] $debugmsg", $lvl);
+        }
+    }
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/rss_fetch.inc
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/rss_fetch.inc	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/rss_fetch.inc	(revision 225)
@@ -0,0 +1,458 @@
+<?php
+/*
+ * Project:     MagpieRSS: a simple RSS integration tool
+ * File:        rss_fetch.inc, a simple functional interface
+                to fetching and parsing RSS files, via the
+                function fetch_rss()
+ * Author:      Kellan Elliott-McCrea <kellan@protest.net>
+ * License:     GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ *
+ */
+ 
+// Setup MAGPIE_DIR for use on hosts that don't include
+// the current path in include_path.
+// with thanks to rajiv and smarty
+if (!defined('DIR_SEP')) {
+    define('DIR_SEP', DIRECTORY_SEPARATOR);
+}
+
+if (!defined('MAGPIE_DIR')) {
+    define('MAGPIE_DIR', dirname(__FILE__) . DIR_SEP);
+}
+
+require_once( MAGPIE_DIR . 'rss_parse.inc' );
+require_once( MAGPIE_DIR . 'rss_cache.inc' );
+
+// for including 3rd party libraries
+define('MAGPIE_EXTLIB', MAGPIE_DIR . 'extlib' . DIR_SEP);
+require_once( MAGPIE_EXTLIB . 'Snoopy.class.inc');
+
+
+/* 
+ * CONSTANTS - redefine these in your script to change the
+ * behaviour of fetch_rss() currently, most options effect the cache
+ *
+ * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? 
+ * For me a built in cache was essential to creating a "PHP-like" 
+ * feel to Magpie, see rss_cache.inc for rationale
+ *
+ *
+ * MAGPIE_CACHE_DIR - Where should Magpie cache parsed RSS objects?
+ * This should be a location that the webserver can write to.   If this 
+ * directory does not already exist Mapie will try to be smart and create 
+ * it.  This will often fail for permissions reasons.
+ *
+ *
+ * MAGPIE_CACHE_AGE - How long to store cached RSS objects? In seconds.
+ *
+ *
+ * MAGPIE_CACHE_FRESH_ONLY - If remote fetch fails, throw error
+ * instead of returning stale object?
+ *
+ * MAGPIE_DEBUG - Display debugging notices?
+ *
+*/
+
+
+/*=======================================================================*\
+    Function: fetch_rss: 
+    Purpose:  return RSS object for the give url
+              maintain the cache
+    Input:    url of RSS file
+    Output:   parsed RSS object (see rss_parse.inc)
+
+    NOTES ON CACHEING:  
+    If caching is on (MAGPIE_CACHE_ON) fetch_rss will first check the cache.
+    
+    NOTES ON RETRIEVING REMOTE FILES:
+    If conditional gets are on (MAGPIE_CONDITIONAL_GET_ON) fetch_rss will
+    return a cached object, and touch the cache object upon recieving a
+    304.
+    
+    NOTES ON FAILED REQUESTS:
+    If there is an HTTP error while fetching an RSS object, the cached
+    version will be return, if it exists (and if MAGPIE_CACHE_FRESH_ONLY is off)
+\*=======================================================================*/
+
+define('MAGPIE_VERSION', '0.72');
+
+$MAGPIE_ERROR = "";
+
+function fetch_rss ($url) {
+    // initialize constants
+    init();
+    
+    if ( !isset($url) ) {
+        error("fetch_rss called without a url");
+        return false;
+    }
+    
+    // if cache is disabled
+    if ( !MAGPIE_CACHE_ON ) {
+        // fetch file, and parse it
+        $resp = _fetch_remote_file( $url );
+        if ( is_success( $resp->status ) ) {
+            return _response_to_rss( $resp );
+        }
+        else {
+            error("Failed to fetch $url and cache is off");
+            return false;
+        }
+    } 
+    // else cache is ON
+    else {
+        // Flow
+        // 1. check cache
+        // 2. if there is a hit, make sure its fresh
+        // 3. if cached obj fails freshness check, fetch remote
+        // 4. if remote fails, return stale object, or error
+        
+        $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE );
+        
+        if (MAGPIE_DEBUG and $cache->ERROR) {
+            debug($cache->ERROR, E_USER_WARNING);
+        }
+        
+        
+        $cache_status    = 0;       // response of check_cache
+        $request_headers = array(); // HTTP headers to send with fetch
+        $rss             = 0;       // parsed RSS object
+        $errormsg        = 0;       // errors, if any
+        
+        // store parsed XML by desired output encoding
+        // as character munging happens at parse time
+        $cache_key       = $url . MAGPIE_OUTPUT_ENCODING;
+        
+        if (!$cache->ERROR) {
+            // return cache HIT, MISS, or STALE
+            $cache_status = $cache->check_cache( $cache_key);
+        }
+                
+        // if object cached, and cache is fresh, return cached obj
+        if ( $cache_status == 'HIT' ) {
+            $rss = $cache->get( $cache_key );
+            if ( isset($rss) and $rss ) {
+                // should be cache age
+                $rss->from_cache = 1;
+                if ( MAGPIE_DEBUG > 1) {
+                    debug("MagpieRSS: Cache HIT", E_USER_NOTICE);
+                }
+                return $rss;
+            }
+        }
+        
+        // else attempt a conditional get
+        
+        // setup headers
+        if ( $cache_status == 'STALE' ) {
+            $rss = $cache->get( $cache_key );
+            if ( $rss and $rss->etag and $rss->last_modified ) {
+                $request_headers['If-None-Match'] = $rss->etag;
+                $request_headers['If-Last-Modified'] = $rss->last_modified;
+            }
+        }
+        
+        $resp = _fetch_remote_file( $url, $request_headers );
+        
+        if (isset($resp) and $resp) {
+          if ($resp->status == '304' ) {
+                // we have the most current copy
+                if ( MAGPIE_DEBUG > 1) {
+                    debug("Got 304 for $url");
+                }
+                // reset cache on 304 (at minutillo insistent prodding)
+                $cache->set($cache_key, $rss);
+                return $rss;
+            }
+            elseif ( is_success( $resp->status ) ) {
+                $rss = _response_to_rss( $resp );
+                if ( $rss ) {
+                    if (MAGPIE_DEBUG > 1) {
+                        debug("Fetch successful");
+                    }
+                    // add object to cache
+                    $cache->set( $cache_key, $rss );
+                    return $rss;
+                }
+            }
+            else {
+                $errormsg = "Failed to fetch $url ";
+                if ( $resp->status == '-100' ) {
+                    $errormsg .= "(Request timed out after " . MAGPIE_FETCH_TIME_OUT . " seconds)";
+                }
+                elseif ( $resp->error ) {
+                    # compensate for Snoopy's annoying habbit to tacking
+                    # on '\n'
+                    $http_error = substr($resp->error, 0, -2); 
+                    $errormsg .= "(HTTP Error: $http_error)";
+                }
+                else {
+                    $errormsg .=  "(HTTP Response: " . $resp->response_code .')';
+                }
+            }
+        }
+        else {
+            $errormsg = "Unable to retrieve RSS file for unknown reasons.";
+        }
+        
+        // else fetch failed
+        
+        // attempt to return cached object
+        if ($rss) {
+            if ( MAGPIE_DEBUG ) {
+                debug("Returning STALE object for $url");
+            }
+            return $rss;
+        }
+        
+        // else we totally failed
+        error( $errormsg ); 
+        
+        return false;
+        
+    } // end if ( !MAGPIE_CACHE_ON ) {
+} // end fetch_rss()
+
+/*=======================================================================*\
+    Function:   error
+    Purpose:    set MAGPIE_ERROR, and trigger error
+\*=======================================================================*/
+
+function error ($errormsg, $lvl=E_USER_WARNING) {
+        global $MAGPIE_ERROR;
+        
+        // append PHP's error message if track_errors enabled
+        if ( isset($php_errormsg) ) { 
+            $errormsg .= " ($php_errormsg)";
+        }
+        if ( $errormsg ) {
+            $errormsg = "MagpieRSS: $errormsg";
+            $MAGPIE_ERROR = $errormsg;
+            trigger_error( $errormsg, $lvl);                
+        }
+}
+
+function debug ($debugmsg, $lvl=E_USER_NOTICE) {
+    trigger_error("MagpieRSS [debug] $debugmsg", $lvl);
+}
+            
+/*=======================================================================*\
+    Function:   magpie_error
+    Purpose:    accessor for the magpie error variable
+\*=======================================================================*/
+function magpie_error ($errormsg="") {
+    global $MAGPIE_ERROR;
+    
+    if ( isset($errormsg) and $errormsg ) { 
+        $MAGPIE_ERROR = $errormsg;
+    }
+    
+    return $MAGPIE_ERROR;   
+}
+
+/*=======================================================================*\
+    Function:   _fetch_remote_file
+    Purpose:    retrieve an arbitrary remote file
+    Input:      url of the remote file
+                headers to send along with the request (optional)
+    Output:     an HTTP response object (see Snoopy.class.inc)  
+\*=======================================================================*/
+function _fetch_remote_file ($url, $headers = "" ) {
+    // Snoopy is an HTTP client in PHP
+    $client = new Snoopy();
+    $client->agent = MAGPIE_USER_AGENT;
+    $client->read_timeout = MAGPIE_FETCH_TIME_OUT;
+    $client->use_gzip = MAGPIE_USE_GZIP;
+    if (is_array($headers) ) {
+        $client->rawheaders = $headers;
+    }
+    
+    @$client->fetch($url);
+    return $client;
+
+}
+
+/*=======================================================================*\
+    Function:   _response_to_rss
+    Purpose:    parse an HTTP response object into an RSS object
+    Input:      an HTTP response object (see Snoopy)
+    Output:     parsed RSS object (see rss_parse)
+\*=======================================================================*/
+function _response_to_rss ($resp) {
+    $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING );
+    
+    // if RSS parsed successfully       
+    if ( $rss and !$rss->ERROR) {
+        
+        // find Etag, and Last-Modified
+        foreach($resp->headers as $h) {
+            // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"
+            if (strpos($h, ": ")) {
+                list($field, $val) = explode(": ", $h, 2);
+            }
+            else {
+                $field = $h;
+                $val = "";
+            }
+            
+            if ( $field == 'ETag' ) {
+                $rss->etag = $val;
+            }
+            
+            if ( $field == 'Last-Modified' ) {
+                $rss->last_modified = $val;
+            }
+        }
+        
+        return $rss;    
+    } // else construct error message
+    else {
+        $errormsg = "Failed to parse RSS file.";
+        
+        if ($rss) {
+            $errormsg .= " (" . $rss->ERROR . ")";
+        }
+        error($errormsg);
+        
+        return false;
+    } // end if ($rss and !$rss->error)
+}
+
+/*=======================================================================*\
+    Function:   init
+    Purpose:    setup constants with default values
+                check for user overrides
+\*=======================================================================*/
+function init () {
+    if ( defined('MAGPIE_INITALIZED') ) {
+        return;
+    }
+    else {
+        define('MAGPIE_INITALIZED', true);
+    }
+    
+    if ( !defined('MAGPIE_CACHE_ON') ) {
+        define('MAGPIE_CACHE_ON', true);
+    }
+
+    if ( !defined('MAGPIE_CACHE_DIR') ) {
+        define('MAGPIE_CACHE_DIR', './cache');
+    }
+
+    if ( !defined('MAGPIE_CACHE_AGE') ) {
+        define('MAGPIE_CACHE_AGE', 60*60); // one hour
+    }
+
+    if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
+        define('MAGPIE_CACHE_FRESH_ONLY', false);
+    }
+
+    if ( !defined('MAGPIE_OUTPUT_ENCODING') ) {
+        define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1');
+    }
+    
+    if ( !defined('MAGPIE_INPUT_ENCODING') ) {
+        define('MAGPIE_INPUT_ENCODING', null);
+    }
+    
+    if ( !defined('MAGPIE_DETECT_ENCODING') ) {
+        define('MAGPIE_DETECT_ENCODING', true);
+    }
+    
+    if ( !defined('MAGPIE_DEBUG') ) {
+        define('MAGPIE_DEBUG', 0);
+    }
+    
+    if ( !defined('MAGPIE_USER_AGENT') ) {
+        $ua = 'MagpieRSS/'. MAGPIE_VERSION . ' (+http://magpierss.sf.net';
+        
+        if ( MAGPIE_CACHE_ON ) {
+            $ua = $ua . ')';
+        }
+        else {
+            $ua = $ua . '; No cache)';
+        }
+        
+        define('MAGPIE_USER_AGENT', $ua);
+    }
+    
+    if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
+        define('MAGPIE_FETCH_TIME_OUT', 5); // 5 second timeout
+    }
+    
+    // use gzip encoding to fetch rss files if supported?
+    if ( !defined('MAGPIE_USE_GZIP') ) {
+        define('MAGPIE_USE_GZIP', true);    
+    }
+}
+
+// NOTE: the following code should really be in Snoopy, or at least
+// somewhere other then rss_fetch!
+
+/*=======================================================================*\
+    HTTP STATUS CODE PREDICATES
+    These functions attempt to classify an HTTP status code
+    based on RFC 2616 and RFC 2518.
+    
+    All of them take an HTTP status code as input, and return true or false
+
+    All this code is adapted from LWP's HTTP::Status.
+\*=======================================================================*/
+
+
+/*=======================================================================*\
+    Function:   is_info
+    Purpose:    return true if Informational status code
+\*=======================================================================*/
+function is_info ($sc) { 
+    return $sc >= 100 && $sc < 200; 
+}
+
+/*=======================================================================*\
+    Function:   is_success
+    Purpose:    return true if Successful status code
+\*=======================================================================*/
+function is_success ($sc) { 
+    return $sc >= 200 && $sc < 300; 
+}
+
+/*=======================================================================*\
+    Function:   is_redirect
+    Purpose:    return true if Redirection status code
+\*=======================================================================*/
+function is_redirect ($sc) { 
+    return $sc >= 300 && $sc < 400; 
+}
+
+/*=======================================================================*\
+    Function:   is_error
+    Purpose:    return true if Error status code
+\*=======================================================================*/
+function is_error ($sc) { 
+    return $sc >= 400 && $sc < 600; 
+}
+
+/*=======================================================================*\
+    Function:   is_client_error
+    Purpose:    return true if Error status code, and its a client error
+\*=======================================================================*/
+function is_client_error ($sc) { 
+    return $sc >= 400 && $sc < 500; 
+}
+
+/*=======================================================================*\
+    Function:   is_client_error
+    Purpose:    return true if Error status code, and its a server error
+\*=======================================================================*/
+function is_server_error ($sc) { 
+    return $sc >= 500 && $sc < 600; 
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/rss_parse.inc
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/rss_parse.inc	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/rss_parse.inc	(revision 225)
@@ -0,0 +1,605 @@
+<?php
+
+/**
+* Project:     MagpieRSS: a simple RSS integration tool
+* File:        rss_parse.inc  - parse an RSS or Atom feed
+*               return as a simple object.
+*
+* Handles RSS 0.9x, RSS 2.0, RSS 1.0, and Atom 0.3
+*
+* The lastest version of MagpieRSS can be obtained from:
+* http://magpierss.sourceforge.net
+*
+* For questions, help, comments, discussion, etc., please join the
+* Magpie mailing list:
+* magpierss-general@lists.sourceforge.net
+*
+* @author           Kellan Elliott-McCrea <kellan@protest.net>
+* @version          0.7a
+* @license          GPL
+*
+*/
+
+define('RSS', 'RSS');
+define('ATOM', 'Atom');
+
+require_once (MAGPIE_DIR . 'rss_utils.inc');
+
+/**
+* Hybrid parser, and object, takes RSS as a string and returns a simple object.
+*
+* see: rss_fetch.inc for a simpler interface with integrated caching support
+*
+*/
+class MagpieRSS {
+    var $parser;
+    
+    var $current_item   = array();  // item currently being parsed
+    var $items          = array();  // collection of parsed items
+    var $channel        = array();  // hash of channel fields
+    var $textinput      = array();
+    var $image          = array();
+    var $feed_type;
+    var $feed_version;
+    var $encoding       = '';       // output encoding of parsed rss
+    
+    var $_source_encoding = '';     // only set if we have to parse xml prolog
+    
+    var $ERROR = "";
+    var $WARNING = "";
+    
+    // define some constants
+    
+    var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
+    var $_KNOWN_ENCODINGS    = array('UTF-8', 'US-ASCII', 'ISO-8859-1');
+
+    // parser variables, useless if you're not a parser, treat as private
+    var $stack              = array(); // parser stack
+    var $inchannel          = false;
+    var $initem             = false;
+    var $incontent          = false; // if in Atom <content mode="xml"> field 
+    var $intextinput        = false;
+    var $inimage            = false;
+    var $current_namespace  = false;
+    
+
+    /**
+     *  Set up XML parser, parse source, and return populated RSS object..
+     *   
+     *  @param string $source           string containing the RSS to be parsed
+     *
+     *  NOTE:  Probably a good idea to leave the encoding options alone unless
+     *         you know what you're doing as PHP's character set support is
+     *         a little weird.
+     *
+     *  NOTE:  A lot of this is unnecessary but harmless with PHP5 
+     *
+     *
+     *  @param string $output_encoding  output the parsed RSS in this character 
+     *                                  set defaults to ISO-8859-1 as this is PHP's
+     *                                  default.
+     *
+     *                                  NOTE: might be changed to UTF-8 in future
+     *                                  versions.
+     *                               
+     *  @param string $input_encoding   the character set of the incoming RSS source. 
+     *                                  Leave blank and Magpie will try to figure it
+     *                                  out.
+     *                                  
+     *                                   
+     *  @param bool   $detect_encoding  if false Magpie won't attempt to detect
+     *                                  source encoding. (caveat emptor)
+     *
+     */
+    function MagpieRSS ($source, $output_encoding='ISO-8859-1', 
+                        $input_encoding=null, $detect_encoding=true) 
+    {   
+        # if PHP xml isn't compiled in, die
+        #
+        if (!function_exists('xml_parser_create')) {
+            $this->error( "Failed to load PHP's XML Extension. " . 
+                          "http://www.php.net/manual/en/ref.xml.php",
+                           E_USER_ERROR );
+        }
+        
+        list($parser, $source) = $this->create_parser($source, 
+                $output_encoding, $input_encoding, $detect_encoding);
+        
+        
+        if (!is_resource($parser)) {
+            $this->error( "Failed to create an instance of PHP's XML parser. " .
+                          "http://www.php.net/manual/en/ref.xml.php",
+                          E_USER_ERROR );
+        }
+
+        
+        $this->parser = $parser;
+        
+        # pass in parser, and a reference to this object
+        # setup handlers
+        #
+        xml_set_object( $this->parser, $this );
+        xml_set_element_handler($this->parser, 
+                'feed_start_element', 'feed_end_element' );
+                        
+        xml_set_character_data_handler( $this->parser, 'feed_cdata' ); 
+    
+        $status = xml_parse( $this->parser, $source );
+        
+        if (! $status ) {
+            $errorcode = xml_get_error_code( $this->parser );
+            if ( $errorcode != XML_ERROR_NONE ) {
+                $xml_error = xml_error_string( $errorcode );
+                $error_line = xml_get_current_line_number($this->parser);
+                $error_col = xml_get_current_column_number($this->parser);
+                $errormsg = "$xml_error at line $error_line, column $error_col";
+
+                $this->error( $errormsg );
+            }
+        }
+        
+        xml_parser_free( $this->parser );
+
+        $this->normalize();
+    }
+    
+    function feed_start_element($p, $element, &$attrs) {
+        $el = $element = strtolower($element);
+        $attrs = array_change_key_case($attrs, CASE_LOWER);
+        
+        // check for a namespace, and split if found
+        $ns = false;
+        if ( strpos( $element, ':' ) ) {
+            list($ns, $el) = split( ':', $element, 2); 
+        }
+        if ( $ns and $ns != 'rdf' ) {
+            $this->current_namespace = $ns;
+        }
+            
+        # if feed type isn't set, then this is first element of feed
+        # identify feed from root element
+        #
+        if (!isset($this->feed_type) ) {
+            if ( $el == 'rdf' ) {
+                $this->feed_type = RSS;
+                $this->feed_version = '1.0';
+            }
+            elseif ( $el == 'rss' ) {
+                $this->feed_type = RSS;
+                $this->feed_version = $attrs['version'];
+            }
+            elseif ( $el == 'feed' ) {
+                $this->feed_type = ATOM;
+                $this->feed_version = $attrs['version'];
+                $this->inchannel = true;
+            }
+            return;
+        }
+    
+        if ( $el == 'channel' ) 
+        {
+            $this->inchannel = true;
+        }
+        elseif ($el == 'item' or $el == 'entry' ) 
+        {
+            $this->initem = true;
+            if ( isset($attrs['rdf:about']) ) {
+                $this->current_item['about'] = $attrs['rdf:about']; 
+            }
+        }
+        
+        // if we're in the default namespace of an RSS feed,
+        //  record textinput or image fields
+        elseif ( 
+            $this->feed_type == RSS and 
+            $this->current_namespace == '' and 
+            $el == 'textinput' ) 
+        {
+            $this->intextinput = true;
+        }
+        
+        elseif (
+            $this->feed_type == RSS and 
+            $this->current_namespace == '' and 
+            $el == 'image' ) 
+        {
+            $this->inimage = true;
+        }
+        
+        # handle atom content constructs
+        elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
+        {
+            // avoid clashing w/ RSS mod_content
+            if ($el == 'content' ) {
+                $el = 'atom_content';
+            }
+            
+            $this->incontent = $el;
+            
+            
+        }
+        
+        // if inside an Atom content construct (e.g. content or summary) field treat tags as text
+        elseif ($this->feed_type == ATOM and $this->incontent ) 
+        {
+            // if tags are inlined, then flatten
+            $attrs_str = join(' ', 
+                    array_map('map_attrs', 
+                    array_keys($attrs), 
+                    array_values($attrs) ) );
+            
+            $this->append_content( "<$element $attrs_str>"  );
+                    
+            array_unshift( $this->stack, $el );
+        }
+        
+        // Atom support many links per containging element.
+        // Magpie treats link elements of type rel='alternate'
+        // as being equivalent to RSS's simple link element.
+        //
+        elseif ($this->feed_type == ATOM and $el == 'link' ) 
+        {
+            if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) 
+            {
+                $link_el = 'link';
+            }
+            else {
+                $link_el = 'link_' . $attrs['rel'];
+            }
+            
+            $this->append($link_el, $attrs['href']);
+        }
+        // set stack[0] to current element
+        else {
+            array_unshift($this->stack, $el);
+        }
+    }
+    
+
+    
+    function feed_cdata ($p, $text) {
+        if ($this->feed_type == ATOM and $this->incontent) 
+        {
+            $this->append_content( $text );
+        }
+        else {
+            $current_el = join('_', array_reverse($this->stack));
+            $this->append($current_el, $text);
+        }
+    }
+    
+    function feed_end_element ($p, $el) {
+        $el = strtolower($el);
+        
+        if ( $el == 'item' or $el == 'entry' ) 
+        {
+            $this->items[] = $this->current_item;
+            $this->current_item = array();
+            $this->initem = false;
+        }
+        elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) 
+        {
+            $this->intextinput = false;
+        }
+        elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) 
+        {
+            $this->inimage = false;
+        }
+        elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) )
+        {   
+            $this->incontent = false;
+        }
+        elseif ($el == 'channel' or $el == 'feed' ) 
+        {
+            $this->inchannel = false;
+        }
+        elseif ($this->feed_type == ATOM and $this->incontent  ) {
+            // balance tags properly
+            // note:  i don't think this is actually neccessary
+            if ( $this->stack[0] == $el ) 
+            {
+                $this->append_content("</$el>");
+            }
+            else {
+                $this->append_content("<$el />");
+            }
+
+            array_shift( $this->stack );
+        }
+        else {
+            array_shift( $this->stack );
+        }
+        
+        $this->current_namespace = false;
+    }
+    
+    function concat (&$str1, $str2="") {
+        if (!isset($str1) ) {
+            $str1="";
+        }
+        $str1 .= $str2;
+    }
+    
+    
+    
+    function append_content($text) {
+        if ( $this->initem ) {
+            $this->concat( $this->current_item[ $this->incontent ], $text );
+        }
+        elseif ( $this->inchannel ) {
+            $this->concat( $this->channel[ $this->incontent ], $text );
+        }
+    }
+    
+    // smart append - field and namespace aware
+    function append($el, $text) {
+        if (!$el) {
+            return;
+        }
+        if ( $this->current_namespace ) 
+        {
+            if ( $this->initem ) {
+                $this->concat(
+                    $this->current_item[ $this->current_namespace ][ $el ], $text);
+            }
+            elseif ($this->inchannel) {
+                $this->concat(
+                    $this->channel[ $this->current_namespace][ $el ], $text );
+            }
+            elseif ($this->intextinput) {
+                $this->concat(
+                    $this->textinput[ $this->current_namespace][ $el ], $text );
+            }
+            elseif ($this->inimage) {
+                $this->concat(
+                    $this->image[ $this->current_namespace ][ $el ], $text );
+            }
+        }
+        else {
+            if ( $this->initem ) {
+                $this->concat(
+                    $this->current_item[ $el ], $text);
+            }
+            elseif ($this->intextinput) {
+                $this->concat(
+                    $this->textinput[ $el ], $text );
+            }
+            elseif ($this->inimage) {
+                $this->concat(
+                    $this->image[ $el ], $text );
+            }
+            elseif ($this->inchannel) {
+                $this->concat(
+                    $this->channel[ $el ], $text );
+            }
+            
+        }
+    }
+    
+    function normalize () {
+        // if atom populate rss fields
+        if ( $this->is_atom() ) {
+            $this->channel['description'] = $this->channel['tagline'];
+            for ( $i = 0; $i < count($this->items); $i++) {
+                $item = $this->items[$i];
+                if ( isset($item['summary']) )
+                    $item['description'] = $item['summary'];
+                if ( isset($item['atom_content']))
+                    $item['content']['encoded'] = $item['atom_content'];
+                
+                $atom_date = (isset($item['issued']) ) ? $item['issued'] : $item['modified'];
+                if ( $atom_date ) {
+                    $epoch = @parse_w3cdtf($atom_date);
+                    if ($epoch and $epoch > 0) {
+                        $item['date_timestamp'] = $epoch;
+                    }
+                }
+                
+                $this->items[$i] = $item;
+            }       
+        }
+        elseif ( $this->is_rss() ) {
+            $this->channel['tagline'] = $this->channel['description'];
+            for ( $i = 0; $i < count($this->items); $i++) {
+                $item = $this->items[$i];
+                if ( isset($item['description']))
+                    $item['summary'] = $item['description'];
+                if ( isset($item['content']['encoded'] ) )
+                    $item['atom_content'] = $item['content']['encoded'];
+                
+                if ( $this->is_rss() == '1.0' and isset($item['dc']['date']) ) {
+                    $epoch = @parse_w3cdtf($item['dc']['date']);
+                    if ($epoch and $epoch > 0) {
+                        $item['date_timestamp'] = $epoch;
+                    }
+                }
+                elseif ( isset($item['pubdate']) ) {
+                    $epoch = @strtotime($item['pubdate']);
+                    if ($epoch > 0) {
+                        $item['date_timestamp'] = $epoch;
+                    }
+                }
+                
+                $this->items[$i] = $item;
+            }
+        }
+    }
+    
+    
+    function is_rss () {
+        if ( $this->feed_type == RSS ) {
+            return $this->feed_version; 
+        }
+        else {
+            return false;
+        }
+    }
+    
+    function is_atom() {
+        if ( $this->feed_type == ATOM ) {
+            return $this->feed_version;
+        }
+        else {
+            return false;
+        }
+    }
+
+    /**
+    * return XML parser, and possibly re-encoded source
+    *
+    */
+    function create_parser($source, $out_enc, $in_enc, $detect) {
+        if ( substr(phpversion(),0,1) == 5) {
+            $parser = $this->php5_create_parser($in_enc, $detect);
+        }
+        else {
+            list($parser, $source) = $this->php4_create_parser($source, $in_enc, $detect);
+        }
+        if ($out_enc) {
+            $this->encoding = $out_enc;
+            xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $out_enc);
+        }
+        
+        return array($parser, $source);
+    }
+    
+    /**
+    * Instantiate an XML parser under PHP5
+    *
+    * PHP5 will do a fine job of detecting input encoding
+    * if passed an empty string as the encoding. 
+    *
+    * All hail libxml2!
+    *
+    */
+    function php5_create_parser($in_enc, $detect) {
+        // by default php5 does a fine job of detecting input encodings
+        if(!$detect && $in_enc) {
+            return xml_parser_create($in_enc);
+        }
+        else {
+            return xml_parser_create('');
+        }
+    }
+    
+    /**
+    * Instaniate an XML parser under PHP4
+    *
+    * Unfortunately PHP4's support for character encodings
+    * and especially XML and character encodings sucks.  As
+    * long as the documents you parse only contain characters
+    * from the ISO-8859-1 character set (a superset of ASCII,
+    * and a subset of UTF-8) you're fine.  However once you
+    * step out of that comfy little world things get mad, bad,
+    * and dangerous to know.
+    *
+    * The following code is based on SJM's work with FoF
+    * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
+    *
+    */
+    function php4_create_parser($source, $in_enc, $detect) {
+        if ( !$detect ) {
+            return array(xml_parser_create($in_enc), $source);
+        }
+        
+        if (!$in_enc) {
+            if (preg_match('/<?xml.*encoding=[\'"](.*?)[\'"].*?>/m', $source, $m)) {
+                $in_enc = strtoupper($m[1]);
+                $this->source_encoding = $in_enc;
+            }
+            else {
+                $in_enc = 'UTF-8';
+            }
+        }
+        
+        if ($this->known_encoding($in_enc)) {
+            return array(xml_parser_create($in_enc), $source);
+        }
+        
+        // the dectected encoding is not one of the simple encodings PHP knows
+        
+        // attempt to use the iconv extension to
+        // cast the XML to a known encoding
+        // @see http://php.net/iconv
+       
+        if (function_exists('iconv'))  {
+            $encoded_source = iconv($in_enc,'UTF-8', $source);
+            if ($encoded_source) {
+                return array(xml_parser_create('UTF-8'), $encoded_source);
+            }
+        }
+        
+        // iconv didn't work, try mb_convert_encoding
+        // @see http://php.net/mbstring
+        if(function_exists('mb_convert_encoding')) {
+            $encoded_source = mb_convert_encoding($source, 'UTF-8', $in_enc );
+            if ($encoded_source) {
+                return array(xml_parser_create('UTF-8'), $encoded_source);
+            }
+        }
+        
+        // else 
+        $this->error("Feed is in an unsupported character encoding. ($in_enc) " .
+                     "You may see strange artifacts, and mangled characters.",
+                     E_USER_NOTICE);
+            
+        return array(xml_parser_create(), $source);
+    }
+    
+    function known_encoding($enc) {
+        $enc = strtoupper($enc);
+        if ( in_array($enc, $this->_KNOWN_ENCODINGS) ) {
+            return $enc;
+        }
+        else {
+            return false;
+        }
+    }
+
+    function error ($errormsg, $lvl=E_USER_WARNING) {
+        // append PHP's error message if track_errors enabled
+        if ( isset($php_errormsg) ) { 
+            $errormsg .= " ($php_errormsg)";
+        }
+        if ( MAGPIE_DEBUG ) {
+            trigger_error( $errormsg, $lvl);        
+        }
+        else {
+            error_log( $errormsg, 0);
+        }
+        
+        $notices = E_USER_NOTICE|E_NOTICE;
+        if ( $lvl&$notices ) {
+            $this->WARNING = $errormsg;
+        } else {
+            $this->ERROR = $errormsg;
+        }
+    }
+    
+    
+} // end class RSS
+
+function map_attrs($k, $v) {
+    return "$k=\"$v\"";
+}
+
+// patch to support medieval versions of PHP4.1.x, 
+// courtesy, Ryan Currie, ryan@digibliss.com
+
+if (!function_exists('array_change_key_case')) {
+	define("CASE_UPPER",1);
+	define("CASE_LOWER",0);
+
+
+	function array_change_key_case($array,$case=CASE_LOWER) {
+       if ($case=CASE_LOWER) $cmd=strtolower;
+       elseif ($case=CASE_UPPER) $cmd=strtoupper;
+       foreach($array as $key=>$value) {
+               $output[$cmd($key)]=$value;
+       }
+       return $output;
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/rss_utils.inc
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/rss_utils.inc	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/rss_utils.inc	(revision 225)
@@ -0,0 +1,67 @@
+<?php
+/*
+ * Project:     MagpieRSS: a simple RSS integration tool
+ * File:        rss_utils.inc, utility methods for working with RSS
+ * Author:      Kellan Elliott-McCrea <kellan@protest.net>
+ * Version:     0.51
+ * License:     GPL
+ *
+ * The lastest version of MagpieRSS can be obtained from:
+ * http://magpierss.sourceforge.net
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Magpie mailing list:
+ * magpierss-general@lists.sourceforge.net
+ */
+
+
+/*======================================================================*\
+    Function: parse_w3cdtf
+    Purpose:  parse a W3CDTF date into unix epoch
+
+    NOTE: http://www.w3.org/TR/NOTE-datetime
+\*======================================================================*/
+
+function parse_w3cdtf ( $date_str ) {
+    
+    # regex to match wc3dtf
+    $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";
+    
+    if ( preg_match( $pat, $date_str, $match ) ) {
+        list( $year, $month, $day, $hours, $minutes, $seconds) = 
+            array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]);
+        
+        # calc epoch for current date assuming GMT
+        $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
+        
+        $offset = 0;
+        if ( $match[10] == 'Z' ) {
+            # zulu time, aka GMT
+        }
+        else {
+            list( $tz_mod, $tz_hour, $tz_min ) =
+                array( $match[8], $match[9], $match[10]);
+            
+            # zero out the variables
+            if ( ! $tz_hour ) { $tz_hour = 0; }
+            if ( ! $tz_min ) { $tz_min = 0; }
+        
+            $offset_secs = (($tz_hour*60)+$tz_min)*60;
+            
+            # is timezone ahead of GMT?  then subtract offset
+            #
+            if ( $tz_mod == '+' ) {
+                $offset_secs = $offset_secs * -1;
+            }
+            
+            $offset = $offset_secs; 
+        }
+        $epoch = $epoch + $offset;
+        return $epoch;
+    }
+    else {
+        return -1;
+    }
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/README
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/README	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/README	(revision 225)
@@ -0,0 +1,27 @@
+Some example on how to use Magpie:
+
+* magpie_simple.php *
+  Simple example of fetching and parsing an RSS file. Expects to be
+  called with a query param 'rss_url=http://<some rss file>'
+
+* simple_smarty.php *
+  Similiar to magpie_simple, but using the Smarty template engine to do
+  display.  Also demostrates using rss_utils.inc and a smarty plugin to
+  parse and display when each RSS item was published.
+
+* magpie_debug.php *
+  Displays all the information available from a parsed feed.
+
+* smarty_plugin/modifier.rss_date_parse.php *
+ 
+  A Smarty plugin for parsing RSS style dates.  You must include rss_utils.inc
+  for this plugin to work.  It also must be installed in the Smarty plugin
+  directory, see the Smarty docs for details.
+
+* templates/simple.smarty
+  A Smarty template used by simple_smarty.php which demostrates
+  displaying an RSS feed and using the date parse plugin.
+  
+  
+The Smarty template engine and documentation on how to use it are available from
+http://smarty.php.net
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_debug.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_debug.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_debug.php	(revision 225)
@@ -0,0 +1,80 @@
+<?php
+
+ini_set('display_errors', 1);
+ini_set('error_reporting', E_ALL);
+define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
+define('MAGPIE_DIR', '../');
+define('MAGPIE_DEBUG', 1);
+
+// flush cache quickly for debugging purposes, don't do this on a live site
+define('MAGPIE_CACHE_AGE', 10);
+
+require_once(MAGPIE_DIR.'rss_fetch.inc');
+
+
+if ( isset($_GET['url']) ) {
+	$url = $_GET['url'];
+}
+else {
+	$url = 'http://magpierss.sf.net/test.rss';
+}
+
+
+test_library_support();
+
+$rss = fetch_rss( $url );
+	
+if ($rss) {
+	echo "<h3>Example Output</h3>";
+	echo "Channel: " . $rss->channel['title'] . "<p>";
+	echo "<ul>";
+	foreach ($rss->items as $item) {
+		$href = $item['link'];
+		$title = $item['title'];	
+		echo "<li><a href=$href>$title</a></li>";
+	}
+	echo "</ul>";
+}
+else {
+	echo "Error: " . magpie_error();
+}
+?>
+
+<form>
+	RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br />
+	<input type="submit" value="Parse RSS">
+</form>
+
+<h3>Parsed Results (var_dump'ed)</h3>
+<pre>
+<?php var_dump($rss); ?>
+</pre>
+
+<?php
+
+function test_library_support() {
+   if (!function_exists('xml_parser_create')) {
+	   echo "<b>Error:</b> PHP compiled without XML support (--with-xml), Mapgie won't work without PHP support for XML.<br />\n";
+	   exit;
+   }
+   else {
+	   echo "<b>OK:</b> Found an XML parser. <br />\n";
+   }
+   
+   if ( ! function_exists('gzinflate') ) {
+	   echo "<b>Warning:</b>  PHP compiled without Zlib support (--with-zlib). No support for GZIP encoding.<br />\n";
+   }
+   else {
+	   echo "<b>OK:</b>  Support for GZIP encoding.<br />\n";
+   }
+   
+   if ( ! (function_exists('iconv') and function_exists('mb_convert_encoding') ) ) {
+	   echo "<b>Warning:</b>  No support for iconv (--with-iconv) or multi-byte strings (--enable-mbstring)." .  
+		   "No support character set munging.<br />\n";
+   }
+   else {
+	   echo "<b>OK:</b>  Support for character munging.<br />\n";
+   }
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_simple.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_simple.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_simple.php	(revision 225)
@@ -0,0 +1,29 @@
+<?php
+
+define('MAGPIE_DIR', '../');
+require_once(MAGPIE_DIR.'rss_fetch.inc');
+
+$url = $_GET['url'];
+
+if ( $url ) {
+	$rss = fetch_rss( $url );
+	echo "Channel: " . $rss->channel['title'] . "<p>";
+	echo "<ul>";
+	foreach ($rss->items as $item) {
+		$href = $item['link'];
+		$title = $item['title'];	
+		echo "<li><a href=$href>$title</a></li>";
+	}
+	echo "</ul>";
+}
+?>
+
+<form>
+	RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br />
+	<input type="submit" value="Parse RSS">
+</form>
+  
+<p>
+<h2>Security Note:</h2>
+This is a simple <b>example</b> script.  If this was a <b>real</b> script we probably wouldn't allow  strangers to submit random URLs, and we certainly wouldn't simply echo anything passed in the URL.  Additionally its a bad idea to leave this example script lying around.
+</p>
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_slashbox.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_slashbox.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/magpie_slashbox.php	(revision 225)
@@ -0,0 +1,66 @@
+<?php
+
+define('MAGPIE_DIR', '../');
+require_once(MAGPIE_DIR.'rss_fetch.inc');
+	
+$url = $_GET['rss_url'];
+
+?>
+
+<html
+<body LINK="#999999" VLINK="#000000">
+
+<form>
+<input type="text" name="rss_url" size="40" value="<?php echo $url ?>"><input type="Submit">
+</form>
+
+<?php
+
+if ( $url ) {
+	echo "displaying: $url<p>";
+	$rss = fetch_rss( $url );
+	echo slashbox ($rss);
+}
+
+echo "<pre>";
+print_r($rss);
+echo "</pre>";
+?>
+
+</body>
+</html>
+
+<?php
+
+# just some quick and ugly php to generate html
+#
+#
+function slashbox ($rss) {
+	echo "<table cellpadding=2 cellspacing=0><tr>";
+	echo "<td bgcolor=#006666>";
+	
+	# get the channel title and link properties off of the rss object
+	#
+	$title = $rss->channel['title'];
+	$link = $rss->channel['link'];
+	
+	echo "<a href=$link><font color=#FFFFFF><b>$title</b></font></a>";
+	echo "</td></tr>";
+	
+	# foreach over each item in the array.
+	# displaying simple links
+	#
+	# we could be doing all sorts of neat things with the dublin core
+	# info, or the event info, or what not, but keeping it simple for now.
+	#
+	foreach ($rss->items as $item ) {
+		echo "<tr><td bgcolor=#cccccc>";
+		echo "<a href=$item[link]>";
+		echo $item['title'];
+		echo "</a></td></tr>";
+	}		
+	
+	echo "</table>";
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/simple_smarty.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/simple_smarty.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/simple_smarty.php	(revision 225)
@@ -0,0 +1,58 @@
+<?php
+
+// Define path to Smarty files (don't forget trailing slash)
+// and load library.  (you'll want to change this value)
+//
+// NOTE:  you can also simply add Smarty to your include path
+define('SMARTY_DIR', '/home/kellan/projs/magpierss/scripts/Smarty/');
+require_once(SMARTY_DIR.'Smarty.class.php');
+
+// define path to Magpie files and load library
+// (you'll want to change this value)
+//
+// NOTE: you can also simple add MagpieRSS to your include path
+define('MAGPIE_DIR', '/home/kellan/projs/magpierss/');
+require_once(MAGPIE_DIR.'rss_fetch.inc');
+require_once(MAGPIE_DIR.'rss_utils.inc');
+
+
+// optionally show lots of debugging info
+# define('MAGPIE_DEBUG', 2);
+
+// optionally flush cache quickly for debugging purposes, 
+// don't do this on a live site
+# define('MAGPIE_CACHE_AGE', 10);
+
+// use cache?  default is yes.  see rss_fetch for other Magpie options
+# define('MAGPIE_CACHE_ON', 1)
+
+// setup template object
+$smarty = new Smarty;
+$smarty->compile_check = true;
+
+// url of an rss file
+$url = $_GET['rss_url'];
+
+
+if ( $url ) {
+	// assign a variable to smarty for use in the template
+	$smarty->assign('rss_url', $url);
+	
+	// use MagpieRSS to fetch remote RSS file, and parse it
+	$rss = fetch_rss( $url );
+	
+	// if fetch_rss returned false, we encountered an error
+	if ( !$rss ) {
+		$smarty->assign( 'error', magpie_error() );
+	}
+	$smarty->assign('rss', $rss );
+	
+	$item = $rss->items[0];
+	$date = parse_w3cdtf( $item['dc']['date'] );
+	$smarty->assign( 'date', $date );
+}
+
+// parse smarty template, and display using the variables we assigned
+$smarty->display('simple.smarty');
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/smarty_plugin/modifier.rss_date_parse.php	(revision 225)
@@ -0,0 +1,31 @@
+<?php
+
+/*
+ * Smarty plugin
+ * -------------------------------------------------------------
+ * Type:     modifier
+ * Name:     rss_date_parse
+ * Purpose:  parse rss date into unix epoch
+ * Input:    string: rss date
+ *			 default_date:  default date if $rss_date is empty
+ *
+ * NOTE!!!  parse_w3cdtf provided by MagpieRSS's rss_utils.inc
+ *          this file needs to be included somewhere in your script
+ * -------------------------------------------------------------
+ */
+ 
+function smarty_modifier_rss_date_parse ($rss_date, $default_date=null)
+{
+	if($rss_date != '') {
+    	return parse_w3cdtf( $rss_date );
+	} elseif (isset($default_date) && $default_date != '') {		
+    	return parse_w3cdtf( $default_date );
+	} else {
+		return;
+	}
+}
+
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/util/magpie/scripts/templates/simple.smarty
===================================================================
--- Dev/branches/Demo/rdfapi/util/magpie/scripts/templates/simple.smarty	(revision 225)
+++ Dev/branches/Demo/rdfapi/util/magpie/scripts/templates/simple.smarty	(revision 225)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<title>A Simple RSS Box:  I'm not a designer</title>
+</head>
+<body>
+
+<form>
+<b>RSS File:</b> 
+<input type=text" name="rss_url" value="{$rss_url}" size="50"> 
+<input type="submit">
+</form>
+
+<b>Displaying:</b> {$rss_url}
+<p>
+
+{* if $error display the error 
+  elseif parsed RSS object display the RSS 
+  else solicit user for a URL 
+*}
+
+{if $error }
+<b>Error:</b> {$error}
+{elseif $rss}
+<table border=1>
+  <tr>
+    <th colspan=2>
+      <a href="{$rss->channel.link}">{$rss->channel.title}</a>
+    </th>
+  </tr>
+  	{foreach from=$rss->items item=item}
+  	 <tr>
+	  <td>
+	  <a href="{$item.link}">{$item.title}</a>
+  	  </td>
+	  <td>
+	   {$item.dc.date|rss_date_parse|date_format:"%A, %B %e, %Y"}
+	  </td>
+	</tr>
+	{/foreach}
+</table>
+{else}
+  Enter the URL of an RSS file to display.
+{/if}
+
+</body>
+</html>
Index: Dev/branches/Demo/rdfapi/vocabulary/ATOM_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/ATOM_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/ATOM_C.php	(revision 225)
@@ -0,0 +1,206 @@
+<?php
+/**
+*   ATOM Vocabulary (Resource)
+*
+*   @version $Id: ATOM_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   ATOM Vocabulary;.
+*   For details about ATOM see: http://semtext.org/atom/atom.html.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class ATOM{
+
+	function TYPE()
+	{
+		return  new Resource(ATOM_NS . 'type');
+
+	}
+
+	function MODE()
+	{
+		return  new Resource(ATOM_NS . 'mode');
+
+	}
+
+	function NAME()
+	{
+		return  new Resource(ATOM_NS . 'name');
+
+	}
+
+	function URL()
+	{
+		return  new Resource(ATOM_NS . 'url');
+
+	}
+
+	function EMAIL()
+	{
+		return  new Resource(ATOM_NS . 'email');
+
+	}
+
+	function REL()
+	{
+		return  new Resource(ATOM_NS . 'rel');
+
+	}
+
+	function HREF()
+	{
+		return  new Resource(ATOM_NS . 'href');
+
+	}
+
+	function TITLE()
+	{
+		return  new Resource(ATOM_NS . 'title');
+
+	}
+
+	function ATOM_CONSTRUCT()
+	{
+		return  new Resource(ATOM_NS . 'AtomConstruct');
+
+	}
+
+	function CONTENT()
+	{
+		return  new Resource(ATOM_NS . 'Content');
+
+	}
+
+	function PERSON()
+	{
+		return  new Resource(ATOM_NS . 'Person');
+
+	}
+
+	function VALUE()
+	{
+		return  new Resource(ATOM_NS . 'value');
+
+	}
+
+	function LINK()
+	{
+		return  new Resource(ATOM_NS . 'Link');
+
+	}
+
+	function FEED()
+	{
+		return  new Resource(ATOM_NS . 'Feed');
+
+	}
+
+	function VERSION()
+	{
+		return  new Resource(ATOM_NS . 'version');
+
+	}
+
+	function LANG()
+	{
+		return  new Resource(ATOM_NS . 'lang');
+
+	}
+
+	function AUTHOR()
+	{
+		return  new Resource(ATOM_NS . 'author');
+
+	}
+
+	function CONTRIBUTOR()
+	{
+		return  new Resource(ATOM_NS . 'contributor');
+
+	}
+
+	function TAGLINE()
+	{
+		return  new Resource(ATOM_NS . 'tagline');
+
+	}
+
+	function GENERATOR()
+	{
+		return  new Resource(ATOM_NS . 'generator');
+
+	}
+
+	function COPYRIGHT()
+	{
+		return  new Resource(ATOM_NS . 'copyright');
+
+	}
+
+	function INFO()
+	{
+		return  new Resource(ATOM_NS . 'info');
+
+	}
+
+	function MODIFIED()
+	{
+		return  new Resource(ATOM_NS . 'modified');
+
+	}
+
+	function ENTRY()
+	{
+		return  new Resource(ATOM_NS . 'Entry');
+
+	}
+
+	function HAS_CHILD()
+	{
+		return  new Resource(ATOM_NS . 'hasChild');
+
+	}
+
+	function HAS_ENTRY()
+	{
+		return  new Resource(ATOM_NS . 'hasEntry');
+
+	}
+
+	function HAS_LINK()
+	{
+		return  new Resource(ATOM_NS . 'hasLink');
+
+	}
+
+	function HAS_TITLE()
+	{
+		return  new Resource(ATOM_NS . 'hasTitle');
+
+	}
+
+	function ISSUED()
+	{
+		return  new Resource(ATOM_NS . 'issued');
+
+	}
+
+	function CREATED()
+	{
+		return  new Resource(ATOM_NS . 'created');
+
+	}
+
+	function SUMMARY()
+	{
+		return  new Resource(ATOM_NS . 'summary');
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/ATOM_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/ATOM_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/ATOM_RES.php	(revision 225)
@@ -0,0 +1,206 @@
+<?php
+/**
+*   ATOM Vocabulary (Resource)
+*
+*   @version $Id: ATOM_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   ATOM Vocabulary;.
+*   For details about ATOM see: http://semtext.org/atom/atom.html.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class ATOM_RES{
+
+	function TYPE()
+	{
+		return  new ResResource(ATOM_NS . 'type');
+
+	}
+
+	function MODE()
+	{
+		return  new ResResource(ATOM_NS . 'mode');
+
+	}
+
+	function NAME()
+	{
+		return  new ResResource(ATOM_NS . 'name');
+
+	}
+
+	function URL()
+	{
+		return  new ResResource(ATOM_NS . 'url');
+
+	}
+
+	function EMAIL()
+	{
+		return  new ResResource(ATOM_NS . 'email');
+
+	}
+
+	function REL()
+	{
+		return  new ResResource(ATOM_NS . 'rel');
+
+	}
+
+	function HREF()
+	{
+		return  new ResResource(ATOM_NS . 'href');
+
+	}
+
+	function TITLE()
+	{
+		return  new ResResource(ATOM_NS . 'title');
+
+	}
+
+	function ATOM_CONSTRUCT()
+	{
+		return  new ResResource(ATOM_NS . 'AtomConstruct');
+
+	}
+
+	function CONTENT()
+	{
+		return  new ResResource(ATOM_NS . 'Content');
+
+	}
+
+	function PERSON()
+	{
+		return  new ResResource(ATOM_NS . 'Person');
+
+	}
+
+	function VALUE()
+	{
+		return  new ResResource(ATOM_NS . 'value');
+
+	}
+
+	function LINK()
+	{
+		return  new ResResource(ATOM_NS . 'Link');
+
+	}
+
+	function FEED()
+	{
+		return  new ResResource(ATOM_NS . 'Feed');
+
+	}
+
+	function VERSION()
+	{
+		return  new ResResource(ATOM_NS . 'version');
+
+	}
+
+	function LANG()
+	{
+		return  new ResResource(ATOM_NS . 'lang');
+
+	}
+
+	function AUTHOR()
+	{
+		return  new ResResource(ATOM_NS . 'author');
+
+	}
+
+	function CONTRIBUTOR()
+	{
+		return  new ResResource(ATOM_NS . 'contributor');
+
+	}
+
+	function TAGLINE()
+	{
+		return  new ResResource(ATOM_NS . 'tagline');
+
+	}
+
+	function GENERATOR()
+	{
+		return  new ResResource(ATOM_NS . 'generator');
+
+	}
+
+	function COPYRIGHT()
+	{
+		return  new ResResource(ATOM_NS . 'copyright');
+
+	}
+
+	function INFO()
+	{
+		return  new ResResource(ATOM_NS . 'info');
+
+	}
+
+	function MODIFIED()
+	{
+		return  new ResResource(ATOM_NS . 'modified');
+
+	}
+
+	function ENTRY()
+	{
+		return  new ResResource(ATOM_NS . 'Entry');
+
+	}
+
+	function HAS_CHILD()
+	{
+		return  new ResResource(ATOM_NS . 'hasChild');
+
+	}
+
+	function HAS_ENTRY()
+	{
+		return  new ResResource(ATOM_NS . 'hasEntry');
+
+	}
+
+	function HAS_LINK()
+	{
+		return  new ResResource(ATOM_NS . 'hasLink');
+
+	}
+
+	function HAS_TITLE()
+	{
+		return  new ResResource(ATOM_NS . 'hasTitle');
+
+	}
+
+	function ISSUED()
+	{
+		return  new ResResource(ATOM_NS . 'issued');
+
+	}
+
+	function CREATED()
+	{
+		return  new ResResource(ATOM_NS . 'created');
+
+	}
+
+	function SUMMARY()
+	{
+		return  new ResResource(ATOM_NS . 'summary');
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/DC.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/DC.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/DC.php	(revision 225)
@@ -0,0 +1,80 @@
+<?php
+// ----------------------------------------------------------------------------------
+// Dublin Core Vocabulary
+// ----------------------------------------------------------------------------------
+// @version                  : $Id: DC.php 268 2006-05-15 05:28:09Z tgauss $
+// Authors                   : Chris Bizer (chris@bizer.de)
+//
+// Description               : Wrapper, defining resources for all terms of the Dublin 
+//							   Core Vocabulary. For details about DC see: http://dublincore.org/
+// 							   Using the wrapper allows you to define all aspects of 
+//                             the vocabulary in one spot, simplifing implementation and 
+//                             maintainence. Working with the vocabulary, you should use 
+//                             these resources as shortcuts in your code. 
+//							   
+
+
+
+ 
+// DC concepts
+$DC_contributor = new Resource(DC_NS . 'contributor');    
+$DC_coverage = new Resource(DC_NS . 'coverage');  
+$DC_creator = new Resource(DC_NS . 'creator');  
+$DC_date = new Resource(DC_NS . 'date');  
+$DC_description = new Resource(DC_NS . 'description');  
+$DC_format = new Resource(DC_NS . 'format');  
+$DC_identifier = new Resource(DC_NS . 'identifier');  
+$DC_language = new Resource(DC_NS . 'language');  
+$DC_publisher = new Resource(DC_NS . 'publisher');  
+$DC_rights = new Resource(DC_NS . 'rights');  
+$DC_source = new Resource(DC_NS . 'source');  
+$DC_subject = new Resource(DC_NS . 'subject');  
+$DC_title = new Resource(DC_NS . 'title');  
+$DC_type = new Resource(DC_NS . 'type');  
+
+// Dublin Core Metadata Element Set (DCMES) 1.1
+$DCMES_name = array('contributor', 'coverage', 'creator', 'date',
+		    'description', 'format', 'identifier', 'language', 
+		    'publisher', 'relation', 'rights', 'source', 
+		    'subject', 'title', 'type');
+
+foreach ($DCMES_name as $name) {
+    $DCMES[$name] = new Resource(DC_NS . $name);
+    $GLOBALS['DC_' . $name] = $DCMES[$name];
+}
+
+// Other Elements and Element Refinements
+$DCTERM_name = array('abstract', 'accessRights', 'alternative', 'audience', 
+		     'available', 'bibliographicCitation', 'conformsTo',
+		     'created', 'dateAccepted', 'dateCopyrighted', 
+		     'dateSubmitted', 'educationLevel', 'extent',
+		     'hasFormat', 'hasPart', 'hasVersion', 
+		     'isFormatOf', 'isPartOf', 'isReferencedBy', 'isReplacedBy',
+		     'isRequiredBy', 'issued', 'isVersionOf', 'license',
+		     'mediator', 'medium', 'modified', 'references',
+		     'replaces', 'requires', 'rightsHolder', 'spatial',
+		     'tableOfContents', 'temporal', 'valid');
+foreach ($DCTERM_name as $name) {
+    $DCTERM[$name] = new Resource(DCTERM_NS . $name);
+}
+
+// Encoding schemes
+$scheme_name = array('Box', 'DCMIType', 'IMT', 'ISO3166', 'ISO639-2',
+		     'LCC', 'LCSH', 'MESH', 'Period', 'Point',
+		     'RFC1766', 'RFC3066', 'TGN', 'UDC', 'URI',
+		     'W3CDTF');
+
+foreach ($scheme_name as $name) {
+   $DCTERM[$name] = new Resource(DCTERM_NS . $name);
+}
+
+// DCMI Type Vocabulary
+$DCMITYPE_names = array('Collection', 'Dataset', 'Event', 'Image',
+			'InteractiveResource', 'MovingImage', 'PhysicalObject',
+			'Service', 'Software', 'Sound', 'StillImage', 'Text');
+
+foreach ($DCMITYPE_names as $name) {
+    $DCMITYPE[$name] = new Resource(DCMITYPE_NS . $name);
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/DC_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/DC_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/DC_C.php	(revision 225)
@@ -0,0 +1,486 @@
+<?php
+/**
+*   Dublin Core Vocabulary (Resource)
+*
+*   @version $Id: DC_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Chris Bizer (chris@bizer.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the Dublin
+*   Core Vocabulary. For details about DC see: http://dublincore.org/
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class DC{
+	// DC concepts
+	function CONTRIBUTOR()
+	{
+		return  new Resource(DC_NS . 'contributor');
+
+	}
+
+	function COVERAGE()
+	{
+		return  new Resource(DC_NS . 'coverage');
+
+	}
+
+	function CREATOR()
+	{
+		return  new Resource(DC_NS . 'creator');
+
+	}
+
+	function DATE()
+	{
+		return  new Resource(DC_NS . 'date');
+
+	}
+
+	function DESCRIPTION()
+	{
+		return  new Resource(DC_NS . 'description');
+
+	}
+
+	function FORMAT()
+	{
+		return  new Resource(DC_NS . 'format');
+
+	}
+
+	function IDENTIFIER()
+	{
+		return  new Resource(DC_NS . 'identifier');
+
+	}
+
+	function LANGUAGE()
+	{
+		return  new Resource(DC_NS . 'language');
+
+	}
+
+	function PUBLISHER()
+	{
+		return  new Resource(DC_NS . 'publisher');
+
+	}
+
+	function RIGHTS()
+	{
+		return  new Resource(DC_NS . 'rights');
+
+	}
+
+	function SOURCE()
+	{
+		return  new Resource(DC_NS . 'source');
+
+	}
+
+	function SUBJECT()
+	{
+		return  new Resource(DC_NS . 'subject');
+
+	}
+
+	function TITLE()
+	{
+		return  new Resource(DC_NS . 'title');
+
+	}
+
+	function TYPE()
+	{
+		return  new Resource(DC_NS . 'type');
+	}
+
+
+	// Other Elements and Element Refinements
+	function ABSTRACT_()
+	{
+		return  new Resource(DCTERM_NS . 'abstract');
+
+	}
+
+	function ACCESS_RIGHTS()
+	{
+		return  new Resource(DCTERM_NS . 'accessRights');
+
+	}
+
+	function ALTERNATIVE()
+	{
+		return  new Resource(DCTERM_NS . 'alternative');
+
+	}
+
+	function AUDIENCE()
+	{
+		return  new Resource(DCTERM_NS . 'audience');
+
+	}
+
+	function AVAILABLE()
+	{
+		return  new Resource(DCTERM_NS . 'available');
+
+	}
+
+	function BIBLIOGRAPHIC_CITATION()
+	{
+		return  new Resource(DCTERM_NS . 'bibliographicCitation');
+
+	}
+
+	function CONFORMS_TO()
+	{
+		return  new Resource(DCTERM_NS . 'conformsTo');
+
+	}
+
+	function CREATED()
+	{
+		return  new Resource(DCTERM_NS . 'created');
+
+	}
+
+	function DATE_ACCEPTED()
+	{
+		return  new Resource(DCTERM_NS . 'dateAccepted');
+
+	}
+
+	function DATE_COPYRIGHTED()
+	{
+		return  new Resource(DCTERM_NS . 'dateCopyrighted');
+
+	}
+
+	function DATE_SUBMITTED()
+	{
+		return  new Resource(DCTERM_NS . 'dateSubmitted');
+
+	}
+
+	function EDUCATION_LEVEL()
+	{
+		return  new Resource(DCTERM_NS . 'educationLevel');
+
+	}
+
+	function EXTENT()
+	{
+		return  new Resource(DCTERM_NS . 'extent');
+
+	}
+
+	function HAS_FORMAT()
+	{
+		return  new Resource(DCTERM_NS . 'hasFormat');
+
+	}
+
+	function HAS_PART()
+	{
+		return  new Resource(DCTERM_NS . 'hasPart');
+
+	}
+
+	function HAS_VERSION()
+	{
+		return  new Resource(DCTERM_NS . 'hasVersion');
+
+	}
+
+	function IS_FORMAT_OF()
+	{
+		return  new Resource(DCTERM_NS . 'isFormatOf');
+
+	}
+
+	function IS_PART_OF()
+	{
+		return  new Resource(DCTERM_NS . 'isPartOf');
+
+	}
+
+	function IS_REFERENCED_BY()
+	{
+		return  new Resource(DCTERM_NS . 'isReferencedBy');
+
+	}
+
+	function IS_REPLACED_BY()
+	{
+		return  new Resource(DCTERM_NS . 'isReplacedBy');
+
+	}
+
+	function IS_REQUIRED_BY()
+	{
+		return  new Resource(DCTERM_NS . 'isRequiredBy');
+
+	}
+
+	function ISSUED()
+	{
+		return  new Resource(DCTERM_NS . 'issued');
+
+	}
+
+	function IS_VERSION_OF()
+	{
+		return  new Resource(DCTERM_NS . 'isVersionOf');
+
+	}
+
+	function LICENSE()
+	{
+		return  new Resource(DCTERM_NS . 'license');
+
+	}
+
+	function MEDIATOR()
+	{
+		return  new Resource(DCTERM_NS . 'mediator');
+
+	}
+
+	function MEDIUM()
+	{
+		return  new Resource(DCTERM_NS . 'medium');
+
+	}
+
+	function MODIFIED()
+	{
+		return  new Resource(DCTERM_NS . 'modified');
+
+	}
+
+	function REFERENCES()
+	{
+		return  new Resource(DCTERM_NS . 'references');
+
+	}
+
+	function REPLACES()
+	{
+		return  new Resource(DCTERM_NS . 'replaces');
+
+	}
+
+	function REQUIRES()
+	{
+		return  new Resource(DCTERM_NS . 'requires');
+
+	}
+
+	function RIGHTS_HOLDER()
+	{
+		return  new Resource(DCTERM_NS . 'rightsHolder');
+
+	}
+
+	function SPATIAL()
+	{
+		return  new Resource(DCTERM_NS . 'spatial');
+
+	}
+
+	function TABLE_OF_CONTENTS()
+	{
+		return  new Resource(DCTERM_NS . 'tableOfContents');
+
+	}
+
+	function TEMPORAL()
+	{
+		return  new Resource(DCTERM_NS . 'temporal');
+
+	}
+
+	function VALID()
+	{
+		return  new Resource(DCTERM_NS . 'valid');
+
+	}
+
+
+	// Encoding schemes
+	function BOX()
+	{
+		return  new Resource(DCTERM_NS . 'Box');
+
+	}
+
+	function DCMI_TYPE()
+	{
+		return  new Resource(DCTERM_NS . 'DCMIType');
+
+	}
+
+	function IMT()
+	{
+		return  new Resource(DCTERM_NS . 'IMT');
+
+	}
+
+	function ISO3166()
+	{
+		return  new Resource(DCTERM_NS . 'ISO3166');
+
+	}
+
+	function ISO639_2()
+	{
+		return  new Resource(DCTERM_NS . 'ISO639-2');
+
+	}
+
+	function LCC()
+	{
+		return  new Resource(DCTERM_NS . 'LCC');
+
+	}
+
+	function LCSH()
+	{
+		return  new Resource(DCTERM_NS . 'LCSH');
+
+	}
+
+	function MESH()
+	{
+		return  new Resource(DCTERM_NS . 'MESH');
+
+	}
+
+	function PERIOD()
+	{
+		return  new Resource(DCTERM_NS . 'Period');
+
+	}
+
+	function POINT()
+	{
+		return  new Resource(DCTERM_NS . 'Point');
+
+	}
+
+	function RFC1766()
+	{
+		return  new Resource(DCTERM_NS . 'RFC1766');
+
+	}
+
+	function RFC3066()
+	{
+		return  new Resource(DCTERM_NS . 'RFC3066');
+
+	}
+
+	function TGN()
+	{
+		return  new Resource(DCTERM_NS . 'TGN');
+
+	}
+
+	function UDC()
+	{
+		return  new Resource(DCTERM_NS . 'UDC');
+
+	}
+
+	function URI()
+	{
+		return  new Resource(DCTERM_NS . 'URI');
+
+	}
+
+	function W3CDTF()
+	{
+		return  new Resource(DCTERM_NS . 'W3CDTF');
+
+	}
+
+
+	// DCMI Type Vocabulary
+	function COLLECTION()
+	{
+		return  new Resource(DCMITYPE_NS . 'Collection');
+
+	}
+
+	function DATASET()
+	{
+		return  new Resource(DCMITYPE_NS . 'Dataset');
+
+	}
+
+	function EVENT()
+	{
+		return  new Resource(DCMITYPE_NS . 'Event');
+
+	}
+
+	function IMAGE()
+	{
+		return  new Resource(DCMITYPE_NS . 'Image');
+
+	}
+
+	function INTERACTIVERESOURCE()
+	{
+		return  new Resource(DCMITYPE_NS . 'Interactive_Resource');
+
+	}
+
+	function MOVINGIMAGE()
+	{
+		return  new Resource(DCMITYPE_NS . 'Moving_Image');
+
+	}
+
+	function PHYSICALOBJECT()
+	{
+		return  new Resource(DCMITYPE_NS . 'Physical_Object');
+
+	}
+
+	function SERVICE()
+	{
+		return  new Resource(DCMITYPE_NS . 'Service');
+
+	}
+
+	function SOFTWARE()
+	{
+		return  new Resource(DCMITYPE_NS . 'Software');
+
+	}
+
+	function SOUND()
+	{
+		return  new Resource(DCMITYPE_NS . 'Sound');
+
+	}
+
+	function STILLIMAGE()
+	{
+		return  new Resource(DCMITYPE_NS . 'Still_Image');
+
+	}
+
+	function TEXT()
+	{
+		return  new Resource(DCMITYPE_NS . 'Text');
+	}
+
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/DC_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/DC_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/DC_RES.php	(revision 225)
@@ -0,0 +1,486 @@
+<?php
+/**
+*   Dublin Core Vocabulary (ResResource)
+*
+*   @version $Id: DC_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Chris Bizer (chris@bizer.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the Dublin
+*   Core Vocabulary. For details about DC see: http://dublincore.org/
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class DC_RES{
+	// DC concepts
+	function CONTRIBUTOR()
+	{
+		return  new ResResource(DC_NS . 'contributor');
+
+	}
+
+	function COVERAGE()
+	{
+		return  new ResResource(DC_NS . 'coverage');
+
+	}
+
+	function CREATOR()
+	{
+		return  new ResResource(DC_NS . 'creator');
+
+	}
+
+	function DATE()
+	{
+		return  new ResResource(DC_NS . 'date');
+
+	}
+
+	function DESCRIPTION()
+	{
+		return  new ResResource(DC_NS . 'description');
+
+	}
+
+	function FORMAT()
+	{
+		return  new ResResource(DC_NS . 'format');
+
+	}
+
+	function IDENTIFIER()
+	{
+		return  new ResResource(DC_NS . 'identifier');
+
+	}
+
+	function LANGUAGE()
+	{
+		return  new ResResource(DC_NS . 'language');
+
+	}
+
+	function PUBLISHER()
+	{
+		return  new ResResource(DC_NS . 'publisher');
+
+	}
+
+	function RIGHTS()
+	{
+		return  new ResResource(DC_NS . 'rights');
+
+	}
+
+	function SOURCE()
+	{
+		return  new ResResource(DC_NS . 'source');
+
+	}
+
+	function SUBJECT()
+	{
+		return  new ResResource(DC_NS . 'subject');
+
+	}
+
+	function TITLE()
+	{
+		return  new ResResource(DC_NS . 'title');
+
+	}
+
+	function TYPE()
+	{
+		return  new ResResource(DC_NS . 'type');
+	}
+
+
+	// Other Elements and Element Refinements
+	function ABSTRACT_()
+	{
+		return  new ResResource(DCTERM_NS . 'abstract');
+
+	}
+
+	function ACCESS_RIGHTS()
+	{
+		return  new ResResource(DCTERM_NS . 'accessRights');
+
+	}
+
+	function ALTERNATIVE()
+	{
+		return  new ResResource(DCTERM_NS . 'alternative');
+
+	}
+
+	function AUDIENCE()
+	{
+		return  new ResResource(DCTERM_NS . 'audience');
+
+	}
+
+	function AVAILABLE()
+	{
+		return  new ResResource(DCTERM_NS . 'available');
+
+	}
+
+	function BIBLIOGRAPHIC_CITATION()
+	{
+		return  new ResResource(DCTERM_NS . 'bibliographicCitation');
+
+	}
+
+	function CONFORMS_TO()
+	{
+		return  new ResResource(DCTERM_NS . 'conformsTo');
+
+	}
+
+	function CREATED()
+	{
+		return  new ResResource(DCTERM_NS . 'created');
+
+	}
+
+	function DATE_ACCEPTED()
+	{
+		return  new ResResource(DCTERM_NS . 'dateAccepted');
+
+	}
+
+	function DATE_COPYRIGHTED()
+	{
+		return  new ResResource(DCTERM_NS . 'dateCopyrighted');
+
+	}
+
+	function DATE_SUBMITTED()
+	{
+		return  new ResResource(DCTERM_NS . 'dateSubmitted');
+
+	}
+
+	function EDUCATION_LEVEL()
+	{
+		return  new ResResource(DCTERM_NS . 'educationLevel');
+
+	}
+
+	function EXTENT()
+	{
+		return  new ResResource(DCTERM_NS . 'extent');
+
+	}
+
+	function HAS_FORMAT()
+	{
+		return  new ResResource(DCTERM_NS . 'hasFormat');
+
+	}
+
+	function HAS_PART()
+	{
+		return  new ResResource(DCTERM_NS . 'hasPart');
+
+	}
+
+	function HAS_VERSION()
+	{
+		return  new ResResource(DCTERM_NS . 'hasVersion');
+
+	}
+
+	function IS_FORMAT_OF()
+	{
+		return  new ResResource(DCTERM_NS . 'isFormatOf');
+
+	}
+
+	function IS_PART_OF()
+	{
+		return  new ResResource(DCTERM_NS . 'isPartOf');
+
+	}
+
+	function IS_REFERENCED_BY()
+	{
+		return  new ResResource(DCTERM_NS . 'isReferencedBy');
+
+	}
+
+	function IS_REPLACED_BY()
+	{
+		return  new ResResource(DCTERM_NS . 'isReplacedBy');
+
+	}
+
+	function IS_REQUIRED_BY()
+	{
+		return  new ResResource(DCTERM_NS . 'isRequiredBy');
+
+	}
+
+	function ISSUED()
+	{
+		return  new ResResource(DCTERM_NS . 'issued');
+
+	}
+
+	function IS_VERSION_OF()
+	{
+		return  new ResResource(DCTERM_NS . 'isVersionOf');
+
+	}
+
+	function LICENSE()
+	{
+		return  new ResResource(DCTERM_NS . 'license');
+
+	}
+
+	function MEDIATOR()
+	{
+		return  new ResResource(DCTERM_NS . 'mediator');
+
+	}
+
+	function MEDIUM()
+	{
+		return  new ResResource(DCTERM_NS . 'medium');
+
+	}
+
+	function MODIFIED()
+	{
+		return  new ResResource(DCTERM_NS . 'modified');
+
+	}
+
+	function REFERENCES()
+	{
+		return  new ResResource(DCTERM_NS . 'references');
+
+	}
+
+	function REPLACES()
+	{
+		return  new ResResource(DCTERM_NS . 'replaces');
+
+	}
+
+	function REQUIRES()
+	{
+		return  new ResResource(DCTERM_NS . 'requires');
+
+	}
+
+	function RIGHTS_HOLDER()
+	{
+		return  new ResResource(DCTERM_NS . 'rightsHolder');
+
+	}
+
+	function SPATIAL()
+	{
+		return  new ResResource(DCTERM_NS . 'spatial');
+
+	}
+
+	function TABLE_OF_CONTENTS()
+	{
+		return  new ResResource(DCTERM_NS . 'tableOfContents');
+
+	}
+
+	function TEMPORAL()
+	{
+		return  new ResResource(DCTERM_NS . 'temporal');
+
+	}
+
+	function VALID()
+	{
+		return  new ResResource(DCTERM_NS . 'valid');
+
+	}
+
+
+	// Encoding schemes
+	function BOX()
+	{
+		return  new ResResource(DCTERM_NS . 'Box');
+
+	}
+
+	function DCMI_TYPE()
+	{
+		return  new ResResource(DCTERM_NS . 'DCMIType');
+
+	}
+
+	function IMT()
+	{
+		return  new ResResource(DCTERM_NS . 'IMT');
+
+	}
+
+	function ISO3166()
+	{
+		return  new ResResource(DCTERM_NS . 'ISO3166');
+
+	}
+
+	function ISO639_2()
+	{
+		return  new ResResource(DCTERM_NS . 'ISO639-2');
+
+	}
+
+	function LCC()
+	{
+		return  new ResResource(DCTERM_NS . 'LCC');
+
+	}
+
+	function LCSH()
+	{
+		return  new ResResource(DCTERM_NS . 'LCSH');
+
+	}
+
+	function MESH()
+	{
+		return  new ResResource(DCTERM_NS . 'MESH');
+
+	}
+
+	function PERIOD()
+	{
+		return  new ResResource(DCTERM_NS . 'Period');
+
+	}
+
+	function POINT()
+	{
+		return  new ResResource(DCTERM_NS . 'Point');
+
+	}
+
+	function RFC1766()
+	{
+		return  new ResResource(DCTERM_NS . 'RFC1766');
+
+	}
+
+	function RFC3066()
+	{
+		return  new ResResource(DCTERM_NS . 'RFC3066');
+
+	}
+
+	function TGN()
+	{
+		return  new ResResource(DCTERM_NS . 'TGN');
+
+	}
+
+	function UDC()
+	{
+		return  new ResResource(DCTERM_NS . 'UDC');
+
+	}
+
+	function URI()
+	{
+		return  new ResResource(DCTERM_NS . 'URI');
+
+	}
+
+	function W3CDTF()
+	{
+		return  new ResResource(DCTERM_NS . 'W3CDTF');
+
+	}
+
+
+	// DCMI Type Vocabulary
+	function COLLECTION()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Collection');
+
+	}
+
+	function DATASET()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Dataset');
+
+	}
+
+	function EVENT()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Event');
+
+	}
+
+	function IMAGE()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Image');
+
+	}
+
+	function INTERACTIVE_RESOURCE()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Interactive_Resource');
+
+	}
+
+	function MOVINGIMAGE()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Moving_Image');
+
+	}
+
+	function PHYSICALOBJECT()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Physical_Object');
+
+	}
+
+	function SERVICE()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Service');
+
+	}
+
+	function SOFTWARE()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Software');
+
+	}
+
+	function SOUND()
+	{
+		return  new Resource(DCMITYPE_NS . 'Sound');
+
+	}
+
+	function STILLIMAGE()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Still_Image');
+
+	}
+
+	function TEXT()
+	{
+		return  new ResResource(DCMITYPE_NS . 'Text');
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/FOAF.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/FOAF.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/FOAF.php	(revision 225)
@@ -0,0 +1,87 @@
+<?php
+/**
+*   Friend of a Friend (FOAF) Vocabulary (Resource)
+*
+*   @version $Id: FOAF.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   Friend of a Friend project (FOAF).
+*   For details about FOAF see: http://xmlns.com/foaf/0.1/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+
+
+
+// FOAF concepts
+$FOAF_Agent = new Resource(FOAF_NS . 'Agent');
+$FOAF_Document = new Resource(FOAF_NS . 'Document');
+$FOAF_Group = new Resource(FOAF_NS . 'Group');
+$FOAF_Image = new Resource(FOAF_NS . 'Image');
+$FOAF_OnlineAccount = new Resource(FOAF_NS . 'OnlineAccount');
+$FOAF_OnlineChatAccount = new Resource(FOAF_NS . 'OnlineChatAccount');
+$FOAF_OnlineEcommerceAccount = new Resource(FOAF_NS . 'OnlineEcommerceAccount');
+$FOAF_OnlineGamingAccount = new Resource(FOAF_NS . 'OnlineGamingAccount');
+$FOAF_Organization = new Resource(FOAF_NS . 'Organization');
+$FOAF_Person = new Resource(FOAF_NS . 'Person');
+$FOAF_PersonalProfileDocument = new Resource(FOAF_NS . 'PersonalProfileDocument');
+$FOAF_Project = new Resource(FOAF_NS . 'Project');
+$FOAF_accountName = new Resource(FOAF_NS . 'accountName');
+$FOAF_accountServiceHomepage = new Resource(FOAF_NS . 'accountServiceHomepage');
+$FOAF_aimChatID = new Resource(FOAF_NS . 'aimChatID');
+$FOAF_based_near = new Resource(FOAF_NS . 'based_near');
+$FOAF_currentProject = new Resource(FOAF_NS . 'currentProject');
+$FOAF_depiction = new Resource(FOAF_NS . 'depiction');
+$FOAF_depicts = new Resource(FOAF_NS . 'depicts');
+$FOAF_dnaChecksum = new Resource(FOAF_NS . 'dnaChecksum');
+$FOAF_family_name = new Resource(FOAF_NS . 'family_name');
+$FOAF_firstName = new Resource(FOAF_NS . 'firstName');
+$FOAF_fundedBy = new Resource(FOAF_NS . 'fundedBy');
+$FAOF_geekcode = new Resource(FOAF_NS . 'geekcode');
+$FOAF_gender = new Resource(FOAF_NS . 'gender');
+$FOAF_givenname = new Resource(FOAF_NS . 'givenname');
+$FOAF_holdsAccount = new Resource(FOAF_NS . 'holdsAccount');
+$FOAF_homepage = new Resource(FOAF_NS . 'homepage');
+$FOAF_icqChatID = new Resource(FOAF_NS . 'icqChatID');
+$FOAF_img = new Resource(FOAF_NS . 'img');
+$FOAF_interest = new Resource(FOAF_NS . 'interest');
+$FOAF_jabberID = new Resource(FOAF_NS . 'jabberID');
+$FOAF_knows = new Resource(FOAF_NS . 'knows');
+$FOAF_logo = new Resource(FOAF_NS . 'logo');
+$FOAF_made = new Resource(FOAF_NS . 'made');
+$FOAF_maker = new Resource(FOAF_NS . 'maker');
+$FOAF_mbox = new Resource(FOAF_NS . 'mbox');
+$FOAF_mbox_sha1sum = new Resource(FOAF_NS . 'mbox_sha1sum');
+$FOAF_member = new Resource(FOAF_NS . 'member');
+$FOAF_membershipClass =new Resource(FOAF_NS . 'membershipClass');
+$FOAF_msnChatID = new Resource(FOAF_NS . 'msnChatID');
+$FOAF_myersBriggs = new Resource(FOAF_NS . 'myersBriggs');
+$FOAF_name = new Resource(FOAF_NS . 'name');
+$FOAF_nick = new Resource(FOAF_NS . 'nick');
+$FOAF_page = new Resource(FOAF_NS . 'page');
+$FOAF_pastProject = new Resource(FOAF_NS . 'pastProject');
+$FOAF_phone = new Resource(FOAF_NS . 'phone');
+$FOAF_plan = new Resource(FOAF_NS . 'plan');
+$FOAF_primaryTopic = new Resource(FOAF_NS . 'primaryTopic');
+$FOAF_publications = new Resource(FOAF_NS . 'publications');
+$FOAF_schoolHomepage = new Resource (FOAF_NS . 'schoolHomepage');
+$FOAF_sha1 = new Resource (FOAF_NS . 'sha1');
+$FOAF_surname = new Resource (FOAF_NS . 'surname');
+$FOAF_theme = new Resource(FOAF_NS . 'theme');
+$FOAF_thumbnail = new Resource(FOAF_NS . 'thumbnail');
+$FOAF_tipjar = new Resource(FOAF_NS . 'tipjar');
+$FOAF_title = new Resource(FOAF_NS . 'title');
+$FOAF_topic = new Resource(FOAF_NS . 'topic');
+$FOAF_topic_interest = new Resource(FOAF_NS . 'topic_interest');
+$FOAF_weblog = new Resource(FOAF_NS . 'weblog');
+$FOAF_workInfoHomepage = new Resource(FOAF_NS . 'workInfoHomepage');
+$FOAF_workplaceHomepage = new Resource(FOAF_NS . 'workplaceHomepage');
+$FOAF_yahooChatID = new Resource(FOAF_NS . 'yahooChatID');
+
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/FOAF_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/FOAF_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/FOAF_C.php	(revision 225)
@@ -0,0 +1,401 @@
+<?php
+/**
+*   Friend of a Friend (FOAF) Vocabulary (Resource)
+*
+*   @version $Id: FOAF_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   Friend of a Friend project (FOAF).
+*   For details about FOAF see: http://xmlns.com/foaf/0.1/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class FOAF{
+
+
+	function AGENT()
+	{
+		return  new Resource(FOAF_NS . 'Agent');
+
+	}
+
+	function DOCUMENT()
+	{
+		return  new Resource(FOAF_NS . 'Document');
+
+	}
+
+	function GROUP()
+	{
+		return  new Resource(FOAF_NS . 'Group');
+
+	}
+
+	function IMAGE()
+	{
+		return  new Resource(FOAF_NS . 'Image');
+
+	}
+
+	function ONLINE_ACCOUNT()
+	{
+		return  new Resource(FOAF_NS . 'OnlineAccount');
+
+	}
+
+	function ONLINE_CHAT_ACCOUNT()
+	{
+		return  new Resource(FOAF_NS . 'OnlineChatAccount');
+
+	}
+
+	function ONLINE_ECOMMERCE_ACCOUNT()
+	{
+		return  new Resource(FOAF_NS . 'OnlineEcommerceAccount');
+
+	}
+
+	function ONLINE_GAMING_ACCOUNT()
+	{
+		return  new Resource(FOAF_NS . 'OnlineGamingAccount');
+
+	}
+
+	function ORGANIZATION()
+	{
+		return  new Resource(FOAF_NS . 'Organization');
+
+	}
+
+	function PERSON()
+	{
+		return  new Resource(FOAF_NS . 'Person');
+
+	}
+
+	function PERSONAL_PROFILE_DOCUMENT()
+	{
+		return  new Resource(FOAF_NS . 'PersonalProfileDocument');
+
+	}
+
+	function PROJECT()
+	{
+		return  new Resource(FOAF_NS . 'Project');
+
+	}
+
+	function ACCOUNT_NAME()
+	{
+		return  new Resource(FOAF_NS . 'accountName');
+
+	}
+
+	function ACCOUNT_SERVICE_HOMEPAGE()
+	{
+		return  new Resource(FOAF_NS . 'accountServiceHomepage');
+
+	}
+
+	function AIM_CHAT_ID()
+	{
+		return  new Resource(FOAF_NS . 'aimChatID');
+
+	}
+
+	function BASED_NEAR()
+	{
+		return  new Resource(FOAF_NS . 'based_near');
+
+	}
+
+	function CURRENT_PROJECT()
+	{
+		return  new Resource(FOAF_NS . 'currentProject');
+
+	}
+
+	function DEPICTION()
+	{
+		return  new Resource(FOAF_NS . 'depiction');
+
+	}
+
+	function DEPICTS()
+	{
+		return  new Resource(FOAF_NS . 'depicts');
+
+	}
+
+	function DNA_CHECKSUM()
+	{
+		return  new Resource(FOAF_NS . 'dnaChecksum');
+
+	}
+
+	function FAMILY_NAME()
+	{
+		return  new Resource(FOAF_NS . 'family_name');
+
+	}
+
+	function FIRST_NAME()
+	{
+		return  new Resource(FOAF_NS . 'firstName');
+
+	}
+
+	function FUNDED_BY()
+	{
+		return  new Resource(FOAF_NS . 'fundedBy');
+
+	}
+
+	function GEEKCODE()
+	{
+		return  new Resource(FOAF_NS . 'geekcode');
+
+	}
+
+	function GENDER()
+	{
+		return  new Resource(FOAF_NS . 'gender');
+
+	}
+
+	function GIVENNAME()
+	{
+		return  new Resource(FOAF_NS . 'givenname');
+
+	}
+
+	function HOLDS_ACCOUNT()
+	{
+		return  new Resource(FOAF_NS . 'holdsAccount');
+
+	}
+
+	function HOMEPAGE()
+	{
+		return  new Resource(FOAF_NS . 'homepage');
+
+	}
+
+	function ICQ_CHAT_ID()
+	{
+		return  new Resource(FOAF_NS . 'icqChatID');
+
+	}
+
+	function IMG()
+	{
+		return  new Resource(FOAF_NS . 'img');
+
+	}
+
+	function INTEREST()
+	{
+		return  new Resource(FOAF_NS . 'interest');
+
+	}
+
+	function JABBER_ID()
+	{
+		return  new Resource(FOAF_NS . 'jabberID');
+
+	}
+
+	function KNOWS()
+	{
+		return  new Resource(FOAF_NS . 'knows');
+
+	}
+
+	function LOGO()
+	{
+		return  new Resource(FOAF_NS . 'logo');
+
+	}
+
+	function MADE()
+	{
+		return  new Resource(FOAF_NS . 'made');
+
+	}
+
+	function MAKER()
+	{
+		return  new Resource(FOAF_NS . 'maker');
+
+	}
+
+	function MBOX()
+	{
+		return  new Resource(FOAF_NS . 'mbox');
+
+	}
+
+	function MBOX_SHA1SUM()
+	{
+		return  new Resource(FOAF_NS . 'mbox_sha1sum');
+
+	}
+
+	function MEMBER()
+	{
+		return  new Resource(FOAF_NS . 'member');
+
+	}
+
+	function MEMBERSHIP_CLASS()
+	{
+		return new Resource(FOAF_NS . 'membershipClass');
+
+	}
+
+	function MSN_CHAT_ID()
+	{
+		return  new Resource(FOAF_NS . 'msnChatID');
+
+	}
+
+	function MYERS_BRIGGS()
+	{
+		return  new Resource(FOAF_NS . 'myersBriggs');
+
+	}
+
+	function NAME()
+	{
+		return  new Resource(FOAF_NS . 'name');
+
+	}
+
+	function NICK()
+	{
+		return  new Resource(FOAF_NS . 'nick');
+
+	}
+
+	function PAGE()
+	{
+		return  new Resource(FOAF_NS . 'page');
+
+	}
+
+	function PAST_PROJECT()
+	{
+		return  new Resource(FOAF_NS . 'pastProject');
+
+	}
+
+	function PHONE()
+	{
+		return  new Resource(FOAF_NS . 'phone');
+
+	}
+
+	function PLAN()
+	{
+		return  new Resource(FOAF_NS . 'plan');
+
+	}
+
+	function PRIMARY_TOPIC()
+	{
+		return  new Resource(FOAF_NS . 'primaryTopic');
+
+	}
+
+	function PUBLICATIONS()
+	{
+		return  new Resource(FOAF_NS . 'publications');
+
+	}
+
+	function SCHOOL_HOMEPAGE()
+	{
+		return  new Resource (FOAF_NS . 'schoolHomepage');
+
+	}
+
+	function SHA1()
+	{
+		return  new Resource (FOAF_NS . 'sha1');
+
+	}
+
+	function SURNAME()
+	{
+		return  new Resource (FOAF_NS . 'surname');
+
+	}
+
+	function THEME()
+	{
+		return  new Resource(FOAF_NS . 'theme');
+
+	}
+
+	function THUMBNAIL()
+	{
+		return  new Resource(FOAF_NS . 'thumbnail');
+
+	}
+
+	function TIPJAR()
+	{
+		return  new Resource(FOAF_NS . 'tipjar');
+
+	}
+
+	function TITLE()
+	{
+		return  new Resource(FOAF_NS . 'title');
+
+	}
+
+	function TOPIC()
+	{
+		return  new Resource(FOAF_NS . 'topic');
+
+	}
+
+	function TOPIC_INTEREST()
+	{
+		return  new Resource(FOAF_NS . 'topic_interest');
+
+	}
+
+	function WEBLOG()
+	{
+		return  new Resource(FOAF_NS . 'weblog');
+
+	}
+
+	function WORK_INFO_HOMEPAGE()
+	{
+		return  new Resource(FOAF_NS . 'workInfoHomepage');
+
+	}
+
+	function WORKPLACE_HOMEPAGE()
+	{
+		return  new Resource(FOAF_NS . 'workplaceHomepage');
+
+	}
+
+	function YAHOO_CHAT_ID()
+	{
+		return  new Resource(FOAF_NS . 'yahooChatID');
+	}
+}
+
+
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/FOAF_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/FOAF_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/FOAF_RES.php	(revision 225)
@@ -0,0 +1,399 @@
+<?php
+/**
+*   Friend of a Friend (FOAF) Vocabulary (ResResource)
+*
+*   @version $Id: FOAF_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   Friend of a Friend project (FOAF).
+*   For details about FOAF see: http://xmlns.com/foaf/0.1/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class FOAF_RES{
+
+	function AGENT()
+	{
+		return  new ResResource(FOAF_NS . 'Agent');
+
+	}
+
+	function DOCUMENT()
+	{
+		return  new ResResource(FOAF_NS . 'Document');
+
+	}
+
+	function GROUP()
+	{
+		return  new ResResource(FOAF_NS . 'Group');
+
+	}
+
+	function IMAGE()
+	{
+		return  new ResResource(FOAF_NS . 'Image');
+
+	}
+
+	function ONLINE_ACCOUNT()
+	{
+		return  new ResResource(FOAF_NS . 'OnlineAccount');
+
+	}
+
+	function ONLINE_CHAT_ACCOUNT()
+	{
+		return  new ResResource(FOAF_NS . 'OnlineChatAccount');
+
+	}
+
+	function ONLINE_ECOMMERCE_ACCOUNT()
+	{
+		return  new ResResource(FOAF_NS . 'OnlineEcommerceAccount');
+
+	}
+
+	function ONLINE_GAMING_ACCOUNT()
+	{
+		return  new ResResource(FOAF_NS . 'OnlineGamingAccount');
+
+	}
+
+	function ORGANIZATION()
+	{
+		return  new ResResource(FOAF_NS . 'Organization');
+
+	}
+
+	function PERSON()
+	{
+		return  new ResResource(FOAF_NS . 'Person');
+
+	}
+
+	function PERSONAL_PROFILE_DOCUMENT()
+	{
+		return  new ResResource(FOAF_NS . 'PersonalProfileDocument');
+
+	}
+
+	function PROJECT()
+	{
+		return  new ResResource(FOAF_NS . 'Project');
+
+	}
+
+	function ACCOUNT_NAME()
+	{
+		return  new ResResource(FOAF_NS . 'accountName');
+
+	}
+
+	function ACCOUNT_SERVICE_HOMEPAGE()
+	{
+		return  new ResResource(FOAF_NS . 'accountServiceHomepage');
+
+	}
+
+	function AIM_CHAT_ID()
+	{
+		return  new ResResource(FOAF_NS . 'aimChatID');
+
+	}
+
+	function BASED_NEAR()
+	{
+		return  new ResResource(FOAF_NS . 'based_near');
+
+	}
+
+	function CURRENT_PROJECT()
+	{
+		return  new ResResource(FOAF_NS . 'currentProject');
+
+	}
+
+	function DEPICTION()
+	{
+		return  new ResResource(FOAF_NS . 'depiction');
+
+	}
+
+	function DEPICTS()
+	{
+		return  new ResResource(FOAF_NS . 'depicts');
+
+	}
+
+	function DNA_CHECKSUM()
+	{
+		return  new ResResource(FOAF_NS . 'dnaChecksum');
+
+	}
+
+	function FAMILY_NAME()
+	{
+		return  new ResResource(FOAF_NS . 'family_name');
+
+	}
+
+	function FIRST_NAME()
+	{
+		return  new ResResource(FOAF_NS . 'firstName');
+
+	}
+
+	function FUNDED_BY()
+	{
+		return  new ResResource(FOAF_NS . 'fundedBy');
+
+	}
+
+	function GEEKCODE()
+	{
+		return  new ResResource(FOAF_NS . 'geekcode');
+
+	}
+
+	function GENDER()
+	{
+		return  new ResResource(FOAF_NS . 'gender');
+
+	}
+
+	function GIVENNAME()
+	{
+		return  new ResResource(FOAF_NS . 'givenname');
+
+	}
+
+	function HOLDS_ACCOUNT()
+	{
+		return  new ResResource(FOAF_NS . 'holdsAccount');
+
+	}
+
+	function HOMEPAGE()
+	{
+		return  new ResResource(FOAF_NS . 'homepage');
+
+	}
+
+	function ICQ_CHAT_ID()
+	{
+		return  new ResResource(FOAF_NS . 'icqChatID');
+
+	}
+
+	function IMG()
+	{
+		return  new ResResource(FOAF_NS . 'img');
+
+	}
+
+	function INTEREST()
+	{
+		return  new ResResource(FOAF_NS . 'interest');
+
+	}
+
+	function JABBER_ID()
+	{
+		return  new ResResource(FOAF_NS . 'jabberID');
+
+	}
+
+	function KNOWS()
+	{
+		return  new ResResource(FOAF_NS . 'knows');
+
+	}
+
+	function LOGO()
+	{
+		return  new ResResource(FOAF_NS . 'logo');
+
+	}
+
+	function MADE()
+	{
+		return  new ResResource(FOAF_NS . 'made');
+
+	}
+
+	function MAKER()
+	{
+		return  new ResResource(FOAF_NS . 'maker');
+
+	}
+
+	function MBOX()
+	{
+		return  new ResResource(FOAF_NS . 'mbox');
+
+	}
+
+	function MBOX_SHA1SUM()
+	{
+		return  new ResResource(FOAF_NS . 'mbox_sha1sum');
+
+	}
+
+	function MEMBER()
+	{
+		return  new ResResource(FOAF_NS . 'member');
+
+	}
+
+	function MEMBERSHIP_CLASS()
+	{
+		return new ResResource(FOAF_NS . 'membershipClass');
+
+	}
+
+	function MSN_CHAT_ID()
+	{
+		return  new ResResource(FOAF_NS . 'msnChatID');
+
+	}
+
+	function MYERS_BRIGGS()
+	{
+		return  new ResResource(FOAF_NS . 'myersBriggs');
+
+	}
+
+	function NAME()
+	{
+		return  new ResResource(FOAF_NS . 'name');
+
+	}
+
+	function NICK()
+	{
+		return  new ResResource(FOAF_NS . 'nick');
+
+	}
+
+	function PAGE()
+	{
+		return  new ResResource(FOAF_NS . 'page');
+
+	}
+
+	function PAST_PROJECT()
+	{
+		return  new ResResource(FOAF_NS . 'pastProject');
+
+	}
+
+	function PHONE()
+	{
+		return  new ResResource(FOAF_NS . 'phone');
+
+	}
+
+	function PLAN()
+	{
+		return  new ResResource(FOAF_NS . 'plan');
+
+	}
+
+	function PRIMARY_TOPIC()
+	{
+		return  new ResResource(FOAF_NS . 'primaryTopic');
+
+	}
+
+	function PUBLICATIONS()
+	{
+		return  new ResResource(FOAF_NS . 'publications');
+
+	}
+
+	function SCHOOL_HOMEPAGE()
+	{
+		return  new ResResource (FOAF_NS . 'schoolHomepage');
+
+	}
+
+	function SHA1()
+	{
+		return  new ResResource (FOAF_NS . 'sha1');
+
+	}
+
+	function SURNAME()
+	{
+		return  new ResResource (FOAF_NS . 'surname');
+
+	}
+
+	function THEME()
+	{
+		return  new ResResource(FOAF_NS . 'theme');
+
+	}
+
+	function THUMBNAIL()
+	{
+		return  new ResResource(FOAF_NS . 'thumbnail');
+
+	}
+
+	function TIPJAR()
+	{
+		return  new ResResource(FOAF_NS . 'tipjar');
+
+	}
+
+	function TITLE()
+	{
+		return  new ResResource(FOAF_NS . 'title');
+
+	}
+
+	function TOPIC()
+	{
+		return  new ResResource(FOAF_NS . 'topic');
+
+	}
+
+	function TOPIC_INTEREST()
+	{
+		return  new ResResource(FOAF_NS . 'topic_interest');
+
+	}
+
+	function WEBLOG()
+	{
+		return  new ResResource(FOAF_NS . 'weblog');
+
+	}
+
+	function WORK_INFO_HOMEPAGE()
+	{
+		return  new ResResource(FOAF_NS . 'workInfoHomepage');
+
+	}
+
+	function WORKPLACE_HOMEPAGE()
+	{
+		return  new ResResource(FOAF_NS . 'workplaceHomepage');
+
+	}
+
+	function YAHOO_CHAT_ID()
+	{
+		return  new ResResource(FOAF_NS . 'yahooChatID');
+	}
+}
+
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/OWL.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/OWL.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/OWL.php	(revision 225)
@@ -0,0 +1,66 @@
+<?php
+/**
+*   OWL Vocabulary
+*
+*   @version $Id: OWL.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of theWeb
+*   Ontology Language (OWL). For details about OWL see:
+*   http://www.w3.org/TR/owl-ref/
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+
+// OWL concepts
+$OWL_AnnotationProperty = new Resource(OWL_NS . 'AnnotationProperty');
+$OWL_AllDifferent = new Resource(OWL_NS . 'AllDifferent');
+$OWL_allValuesFrom = new Resource(OWL_NS . 'allValuesFrom');
+$OWL_backwardCompatibleWith = new Resource(OWL_NS . 'backwardCompatibleWith');
+$OWL_cardinality = new Resource(OWL_NS . 'cardinality');
+$OWL_Class = new Resource(OWL_NS . 'Class');
+$OWL_complementOf = new Resource(OWL_NS . 'complementOf');
+$OWL_Datatype = new Resource(OWL_NS . 'Datatype');
+$OWL_DatatypeProperty = new Resource(OWL_NS . 'DatatypeProperty');
+$OWL_DataRange = new Resource(OWL_NS . 'DataRange');
+$OWL_DatatypeRestriction = new Resource(OWL_NS . 'DatatypeRestriction');
+$OWL_DeprecatedClass = new Resource(OWL_NS . 'DeprecatedClass');
+$OWL_DeprecatedProperty = new Resource(OWL_NS . 'DeprecatedProperty');
+$OWL_distinctMembers = new Resource(OWL_NS . 'distinctMembers');
+$OWL_differentFrom = new Resource(OWL_NS . 'differentFrom');
+$OWL_disjointWith = new Resource(OWL_NS . 'disjointWith');
+$OWL_equivalentClass = new Resource(OWL_NS . 'equivalentClass');
+$OWL_equivalentProperty = new Resource(OWL_NS . 'equivalentProperty');
+$OWL_FunctionalProperty = new Resource(OWL_NS . 'FunctionalProperty');
+$OWL_hasValue = new Resource(OWL_NS . 'hasValue');
+$OWL_incompatibleWith = new Resource(OWL_NS . 'incompatibleWith');
+$OWL_imports = new Resource(OWL_NS . 'imports');
+$OWL_intersectionOf = new Resource(OWL_NS . 'intersectionOf');
+$OWL_InverseFunctionalProperty = new Resource(OWL_NS . 'InverseFunctionalProperty');
+$OWL_inverseOf = new Resource(OWL_NS . 'inverseOf');
+$OWL_maxCardinality = new Resource(OWL_NS . 'maxCardinality');
+$OWL_minCardinality = new Resource(OWL_NS . 'minCardinality');
+$OWL_Nothing = new Resource(OWL_NS . 'Nothing');
+$OWL_ObjectClass = new Resource(OWL_NS . 'ObjectClass');
+$OWL_ObjectProperty = new Resource(OWL_NS . 'ObjectProperty');
+$OWL_ObjectRestriction = new Resource(OWL_NS . 'ObjectRestriction');
+$OWL_oneOf = new Resource(OWL_NS . 'oneOf');
+$OWL_onProperty = new Resource(OWL_NS . 'onProperty');
+$OWL_Ontology = new Resource(OWL_NS . 'Ontology');
+$OWL_priorVersion = new Resource(OWL_NS . 'priorVersion');
+$OWL_Property = new Resource(OWL_NS . 'Property');
+$OWL_Restriction = new Resource(OWL_NS . 'Restriction');
+$OWL_sameAs = new Resource(OWL_NS . 'sameAs');
+$OWL_sameClassAs = new Resource(OWL_NS . 'sameClassAs');
+$OWL_sameIndividualAs = new Resource(OWL_NS . 'sameIndividualAs');
+$OWL_samePropertyAs = new Resource(OWL_NS . 'samePropertyAs');
+$OWL_someValuesFrom = new Resource(OWL_NS . 'someValuesFrom');
+$OWL_SymmetricProperty = new Resource(OWL_NS . 'SymmetricProperty');
+$OWL_Thing = new Resource(OWL_NS . 'Thing');
+$OWL_TransitiveProperty = new Resource(OWL_NS . 'TransitiveProperty');
+$OWL_unionOf = new Resource(OWL_NS . 'unionOf');
+$OWL_versionInfo = new Resource(OWL_NS . 'versionInfo');
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/OWL_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/OWL_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/OWL_C.php	(revision 225)
@@ -0,0 +1,303 @@
+<?php
+/**
+*   OWL Vocabulary (Resource)
+*
+*   @version $Id: OWL_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of theWeb
+*   Ontology Language (OWL). For details about OWL see:
+*   http://www.w3.org/TR/owl-ref/
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class OWL{
+
+	// OWL concepts
+	function ANNOTATION_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'AnnotationProperty');
+
+	}
+
+	function ALL_DIFFERENT()
+	{
+		return  new Resource(OWL_NS . 'AllDifferent');
+
+	}
+
+	function ALL_VALUES_FROM()
+	{
+		return  new Resource(OWL_NS . 'allValuesFrom');
+
+	}
+
+	function BACKWARD_COMPATIBLE_WITH()
+	{
+		return  new Resource(OWL_NS . 'backwardCompatibleWith');
+
+	}
+
+	function CARDINALITY()
+	{
+		return  new Resource(OWL_NS . 'cardinality');
+
+	}
+
+	function OWL_CLASS()
+	{
+		return  new Resource(OWL_NS . 'Class');
+
+	}
+
+	function COMPLEMENT_OF()
+	{
+		return  new Resource(OWL_NS . 'complementOf');
+
+	}
+
+	function DATATYPE()
+	{
+		return  new Resource(OWL_NS . 'Datatype');
+
+	}
+
+	function DATATYPE_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'DatatypeProperty');
+
+	}
+
+	function DATA_RANGE()
+	{
+		return  new Resource(OWL_NS . 'DataRange');
+
+	}
+
+	function DATATYPE_RESTRICTION()
+	{
+		return  new Resource(OWL_NS . 'DatatypeRestriction');
+
+	}
+
+	function DEPRECATED_CLASS()
+	{
+		return  new Resource(OWL_NS . 'DeprecatedClass');
+
+	}
+
+	function DEPRECATED_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'DeprecatedProperty');
+
+	}
+
+	function DISTINCT_MEMBERS()
+	{
+		return  new Resource(OWL_NS . 'distinctMembers');
+
+	}
+
+	function DIFFERENT_FROM()
+	{
+		return  new Resource(OWL_NS . 'differentFrom');
+
+	}
+
+	function DISJOINT_WITH()
+	{
+		return  new Resource(OWL_NS . 'disjointWith');
+
+	}
+
+	function EQUIVALENT_CLASS()
+	{
+		return  new Resource(OWL_NS . 'equivalentClass');
+
+	}
+
+	function EQUIVALENT_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'equivalentProperty');
+
+	}
+
+	function FUNCTIONAL_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'FunctionalProperty');
+
+	}
+
+	function HAS_VALUE()
+	{
+		return  new Resource(OWL_NS . 'hasValue');
+
+	}
+
+	function INCOMPATIBLE_WITH()
+	{
+		return  new Resource(OWL_NS . 'incompatibleWith');
+
+	}
+
+	function IMPORTS()
+	{
+		return  new Resource(OWL_NS . 'imports');
+
+	}
+
+	function INTERSECTION_OF()
+	{
+		return  new Resource(OWL_NS . 'intersectionOf');
+
+	}
+
+	function INVERSE_FUNCTIONAL_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'InverseFunctionalProperty');
+
+	}
+
+	function INVERSE_OF()
+	{
+		return  new Resource(OWL_NS . 'inverseOf');
+
+	}
+
+	function MAX_CARDINALITY()
+	{
+		return  new Resource(OWL_NS . 'maxCardinality');
+
+	}
+
+	function MIN_CARDINALITY()
+	{
+		return  new Resource(OWL_NS . 'minCardinality');
+
+	}
+
+	function NOTHING()
+	{
+		return  new Resource(OWL_NS . 'Nothing');
+
+	}
+
+	function OBJECT_CLASS()
+	{
+		return  new Resource(OWL_NS . 'ObjectClass');
+
+	}
+
+	function OBJECT_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'ObjectProperty');
+
+	}
+
+	function OBJECT_RESTRICTION()
+	{
+		return  new Resource(OWL_NS . 'ObjectRestriction');
+
+	}
+
+	function ONE_OF()
+	{
+		return  new Resource(OWL_NS . 'oneOf');
+
+	}
+
+	function ON_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'onProperty');
+
+	}
+
+	function ONTOLOGY()
+	{
+		return  new Resource(OWL_NS . 'Ontology');
+
+	}
+
+	function PRIOR_VERSION()
+	{
+		return  new Resource(OWL_NS . 'priorVersion');
+
+	}
+
+	function PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'Property');
+
+	}
+
+	function RESTRICTION()
+	{
+		return  new Resource(OWL_NS . 'Restriction');
+
+	}
+
+	function SAME_AS()
+	{
+		return  new Resource(OWL_NS . 'sameAs');
+
+	}
+
+	function SAME_CLASS_AS()
+	{
+		return  new Resource(OWL_NS . 'sameClassAs');
+
+	}
+
+	function SAME_INDIVIDUAL_AS()
+	{
+		return  new Resource(OWL_NS . 'sameIndividualAs');
+
+	}
+
+	function SAME_PROPERTY_AS()
+	{
+		return  new Resource(OWL_NS . 'samePropertyAs');
+
+	}
+
+	function SOME_VALUES_FROM()
+	{
+		return  new Resource(OWL_NS . 'someValuesFrom');
+
+	}
+
+	function SYMMETRIC_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'SymmetricProperty');
+
+	}
+
+	function THING()
+	{
+		return  new Resource(OWL_NS . 'Thing');
+
+	}
+
+	function TRANSITIVE_PROPERTY()
+	{
+		return  new Resource(OWL_NS . 'TransitiveProperty');
+
+	}
+
+	function UNION_OF()
+	{
+		return  new Resource(OWL_NS . 'unionOf');
+
+	}
+
+	function VERSION_INFO()
+	{
+		return  new Resource(OWL_NS . 'versionInfo');
+	}
+
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/OWL_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/OWL_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/OWL_RES.php	(revision 225)
@@ -0,0 +1,303 @@
+<?php
+/**
+*   OWL Vocabulary (ResResource)
+*
+*   @version $Id: OWL_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of theWeb
+*   Ontology Language (OWL). For details about OWL see:
+*   http://www.w3.org/TR/owl-ref/
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class OWL_RES{
+
+	// OWL concepts
+	function ANNOTATION_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'AnnotationProperty');
+
+	}
+
+	function ALL_DIFFERENT()
+	{
+		return  new ResResource(OWL_NS . 'AllDifferent');
+
+	}
+
+	function ALL_VALUES_FROM()
+	{
+		return  new ResResource(OWL_NS . 'allValuesFrom');
+
+	}
+
+	function BACKWARD_COMPATIBLE_WITH()
+	{
+		return  new ResResource(OWL_NS . 'backwardCompatibleWith');
+
+	}
+
+	function CARDINALITY()
+	{
+		return  new ResResource(OWL_NS . 'cardinality');
+
+	}
+
+	function OWL_CLASS()
+	{
+		return  new ResResource(OWL_NS . 'Class');
+
+	}
+
+	function COMPLEMENT_OF()
+	{
+		return  new ResResource(OWL_NS . 'complementOf');
+
+	}
+
+	function DATATYPE()
+	{
+		return  new ResResource(OWL_NS . 'Datatype');
+
+	}
+
+	function DATATYPE_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'DatatypeProperty');
+
+	}
+
+	function DATA_RANGE()
+	{
+		return  new ResResource(OWL_NS . 'DataRange');
+
+	}
+
+	function DATATYPE_RESTRICTION()
+	{
+		return  new ResResource(OWL_NS . 'DatatypeRestriction');
+
+	}
+
+	function DEPRECATED_CLASS()
+	{
+		return  new ResResource(OWL_NS . 'DeprecatedClass');
+
+	}
+
+	function DEPRECATED_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'DeprecatedProperty');
+
+	}
+
+	function DISTINCT_MEMBERS()
+	{
+		return  new ResResource(OWL_NS . 'distinctMembers');
+
+	}
+
+	function DIFFERENT_FROM()
+	{
+		return  new ResResource(OWL_NS . 'differentFrom');
+
+	}
+
+	function DISJOINT_WITH()
+	{
+		return  new ResResource(OWL_NS . 'disjointWith');
+
+	}
+
+	function EQUIVALENT_CLASS()
+	{
+		return  new ResResource(OWL_NS . 'equivalentClass');
+
+	}
+
+	function EQUIVALENT_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'equivalentProperty');
+
+	}
+
+	function FUNCTIONAL_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'FunctionalProperty');
+
+	}
+
+	function HAS_VALUE()
+	{
+		return  new ResResource(OWL_NS . 'hasValue');
+
+	}
+
+	function INCOMPATIBLE_WITH()
+	{
+		return  new ResResource(OWL_NS . 'incompatibleWith');
+
+	}
+
+	function IMPORTS()
+	{
+		return  new ResResource(OWL_NS . 'imports');
+
+	}
+
+	function INTERSECTION_OF()
+	{
+		return  new ResResource(OWL_NS . 'intersectionOf');
+
+	}
+
+	function INVERSE_FUNCTIONAL_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'InverseFunctionalProperty');
+
+	}
+
+	function INVERSE_OF()
+	{
+		return  new ResResource(OWL_NS . 'inverseOf');
+
+	}
+
+	function MAX_CARDINALITY()
+	{
+		return  new ResResource(OWL_NS . 'maxCardinality');
+
+	}
+
+	function MIN_CARDINALITY()
+	{
+		return  new ResResource(OWL_NS . 'minCardinality');
+
+	}
+
+	function NOTHING()
+	{
+		return  new ResResource(OWL_NS . 'Nothing');
+
+	}
+
+	function OBJECT_CLASS()
+	{
+		return  new ResResource(OWL_NS . 'ObjectClass');
+
+	}
+
+	function OBJECT_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'ObjectProperty');
+
+	}
+
+	function OBJECT_RESTRICTION()
+	{
+		return  new ResResource(OWL_NS . 'ObjectRestriction');
+
+	}
+
+	function ONE_OF()
+	{
+		return  new ResResource(OWL_NS . 'oneOf');
+
+	}
+
+	function ON_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'onProperty');
+
+	}
+
+	function ONTOLOGY()
+	{
+		return  new ResResource(OWL_NS . 'Ontology');
+
+	}
+
+	function PRIOR_VERSION()
+	{
+		return  new ResResource(OWL_NS . 'priorVersion');
+
+	}
+
+	function PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'Property');
+
+	}
+
+	function RESTRICTION()
+	{
+		return  new ResResource(OWL_NS . 'Restriction');
+
+	}
+
+	function SAME_AS()
+	{
+		return  new ResResource(OWL_NS . 'sameAs');
+
+	}
+
+	function SAME_CLASS_AS()
+	{
+		return  new ResResource(OWL_NS . 'sameClassAs');
+
+	}
+
+	function SAME_INDIVIDUAL_AS()
+	{
+		return  new ResResource(OWL_NS . 'sameIndividualAs');
+
+	}
+
+	function SAME_PROPERTY_AS()
+	{
+		return  new ResResource(OWL_NS . 'samePropertyAs');
+
+	}
+
+	function SOME_VALUES_FROM()
+	{
+		return  new ResResource(OWL_NS . 'someValuesFrom');
+
+	}
+
+	function SYMMETRIC_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'SymmetricProperty');
+
+	}
+
+	function THING()
+	{
+		return  new ResResource(OWL_NS . 'Thing');
+
+	}
+
+	function TRANSITIVE_PROPERTY()
+	{
+		return  new ResResource(OWL_NS . 'TransitiveProperty');
+
+	}
+
+	function UNION_OF()
+	{
+		return  new ResResource(OWL_NS . 'unionOf');
+
+	}
+
+	function VERSION_INFO()
+	{
+		return  new ResResource(OWL_NS . 'versionInfo');
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RDF.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RDF.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RDF.php	(revision 225)
@@ -0,0 +1,49 @@
+<?php
+/**
+*   Resource Description Framework (RDF) Vocabulary
+*
+*   @version $Id: RDF.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   Resource Description Framework (RDF).
+*   For details about RDF see: http://www.w3.org/RDF/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+
+
+// RDF concepts (constants are defined in constants.php)
+$RDF_Alt = new Resource(RDF_NAMESPACE_URI . RDF_ALT);
+$RDF_Bag = new Resource(RDF_NAMESPACE_URI . RDF_BAG);
+$RDF_Property = new Resource(RDF_NAMESPACE_URI . RDF_PROPERTY);
+$RDF_Seq = new Resource(RDF_NAMESPACE_URI . RDF_SEQ);
+$RDF_Statement = new Resource(RDF_NAMESPACE_URI . RDF_STATEMENT);
+$RDF_List = new Resource(RDF_NAMESPACE_URI . RDF_LIST);
+$RDF_nil = new Resource(RDF_NAMESPACE_URI . RDF_NIL);
+$RDF_type = new Resource(RDF_NAMESPACE_URI . RDF_TYPE);
+$RDF_rest = new Resource(RDF_NAMESPACE_URI . RDF_REST);
+$RDF_first = new Resource(RDF_NAMESPACE_URI . RDF_FIRST);
+$RDF_subject = new Resource(RDF_NAMESPACE_URI . RDF_SUBJECT);
+$RDF_predicate = new Resource(RDF_NAMESPACE_URI . RDF_PREDICATE);
+$RDF_object = new Resource(RDF_NAMESPACE_URI . RDF_OBJECT);
+$RDF_Description = new Resource(RDF_NAMESPACE_URI . RDF_DESCRIPTION);
+$RDF_ID = new Resource(RDF_NAMESPACE_URI . RDF_ID);
+$RDF_about = new Resource(RDF_NAMESPACE_URI . RDF_ABOUT);
+$RDF_aboutEach = new Resource(RDF_NAMESPACE_URI . RDF_ABOUT_EACH);
+$RDF_aboutEachPrefix = new Resource(RDF_NAMESPACE_URI . RDF_ABOUT_EACH_PREFIX);
+$RDF_bagID = new Resource(RDF_NAMESPACE_URI . RDF_BAG_ID);
+$RDF_resource = new Resource(RDF_NAMESPACE_URI . RDF_RESOURCE);
+$RDF_parseType = new Resource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE);
+$RDF_Literal = new Resource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE_LITERAL);
+$RDF_Resource = new Resource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE_RESOURCE);
+$RDF_li = new Resource(RDF_NAMESPACE_URI . RDF_LI);
+$RDF_nodeID = new Resource(RDF_NAMESPACE_URI . RDF_NODEID);
+$RDF_datatype = new Resource(RDF_NAMESPACE_URI . RDF_DATATYPE);
+$RDF_seeAlso = new Resource(RDF_NAMESPACE_URI . RDF_SEEALSO);
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RDFS.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RDFS.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RDFS.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+/**
+*   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary
+*
+*   @version $Id: RDFS.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   RDF Schema (RDFS).
+*   For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+// RDFS concepts
+$RDFS_Resource = new Resource(RDF_SCHEMA_URI . 'Resource');
+$RDFS_Literal = new Resource(RDF_SCHEMA_URI . 'Literal');
+$RDFS_Class = new Resource(RDF_SCHEMA_URI . 'Class');
+$RDFS_Datatype = new Resource(RDF_SCHEMA_URI . 'Datatype');
+$RDFS_Container = new Resource(RDF_SCHEMA_URI . 'Container');
+$RDFS_ContainerMembershipProperty = new Resource(RDF_SCHEMA_URI . 'ContainerMembershipProperty');
+$RDFS_subClassOf = new Resource(RDF_SCHEMA_URI . 'subClassOf');
+$RDFS_subPropertyOf = new Resource(RDF_SCHEMA_URI . 'subPropertyOf');
+$RDFS_domain = new Resource(RDF_SCHEMA_URI . 'domain');
+$RDFS_range = new Resource(RDF_SCHEMA_URI . 'range');
+$RDFS_label = new Resource(RDF_SCHEMA_URI . 'label');
+$RDFS_comment = new Resource(RDF_SCHEMA_URI . 'comment');
+$RDFS_member = new Resource(RDF_SCHEMA_URI . 'member');
+$RDFS_seeAlso = new Resource(RDF_SCHEMA_URI . 'seeAlso');
+$RDFS_isDefinedBy = new Resource(RDF_SCHEMA_URI . 'isDefinedBy');
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RDFS_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RDFS_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RDFS_C.php	(revision 225)
@@ -0,0 +1,108 @@
+<?php
+/**
+*   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (Resource)
+*
+*   @version $Id: RDFS_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   RDF Schema (RDFS).
+*   For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class RDFS{
+
+	function RESOURCE()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'Resource');
+
+	}
+
+	function LITERAL()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'Literal');
+
+	}
+
+	function RDFS_CLASS()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'Class');
+
+	}
+
+	function DATATYPE()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'Datatype');
+
+	}
+
+	function CONTAINER()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'Container');
+
+	}
+
+	function CONTAINER_MEMBERSHIP_PROPERTY()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'ContainerMembershipProperty');
+
+	}
+
+	function SUB_CLASS_OF()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'subClassOf');
+
+	}
+
+	function SUB_PROPERTY_OF()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'subPropertyOf');
+
+	}
+
+	function DOMAIN()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'domain');
+
+	}
+
+	function RANGE()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'range');
+
+	}
+
+	function LABEL()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'label');
+
+	}
+
+	function COMMENT()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'comment');
+
+	}
+
+	function MEMBER()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'member');
+
+	}
+
+	function SEEALSO()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'seeAlso');
+
+	}
+
+	function IS_DEFINED_BY()
+	{
+		return  new Resource(RDF_SCHEMA_URI . 'isDefinedBy');
+	}
+
+}
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RDFS_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RDFS_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RDFS_RES.php	(revision 225)
@@ -0,0 +1,107 @@
+<?php
+/**
+*   RDF Vocabulary Description Language 1.0: RDF Schema (RDFS) Vocabulary (ResResource)
+*
+*   @version $Id: RDFS_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   RDF Schema (RDFS).
+*   For details about RDFS see: http://www.w3.org/TR/rdf-schema/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class RDFS_RES{
+
+	function RESOURCE()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'Resource');
+
+	}
+
+	function LITERAL()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'Literal');
+
+	}
+
+	function RDFS_CLASS()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'Class');
+
+	}
+
+	function DATATYPE()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'Datatype');
+
+	}
+
+	function CONTAINER()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'Container');
+
+	}
+
+	function CONTAINER_MEMBERSHIP_PROPERTY()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'ContainerMembershipProperty');
+
+	}
+
+	function SUB_CLASS_OF()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'subClassOf');
+
+	}
+
+	function SUB_PROPERTY_OF()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'subPropertyOf');
+
+	}
+
+	function DOMAIN()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'domain');
+
+	}
+
+	function RANGE()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'range');
+
+	}
+
+	function LABEL()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'label');
+
+	}
+
+	function COMMENT()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'comment');
+
+	}
+
+	function MEMBER()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'member');
+
+	}
+
+	function SEEALSO()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'seeAlso');
+
+	}
+
+	function IS_DEFINED_BY()
+	{
+		return  new ResResource(RDF_SCHEMA_URI . 'isDefinedBy');
+	}
+}
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RDF_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RDF_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RDF_C.php	(revision 225)
@@ -0,0 +1,182 @@
+<?php
+/**
+*   Resource Description Framework (RDF) Vocabulary (Resource)
+*
+*   @version $Id: RDF_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   Resource Description Framework (RDF).
+*   For details about RDF see: http://www.w3.org/RDF/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class RDF{
+
+	// RDF concepts (constants are defined in constants.php)
+	function ALT()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_ALT);
+
+	}
+
+	function BAG()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_BAG);
+
+	}
+
+	function PROPERTY()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_PROPERTY);
+
+	}
+
+	function SEQ()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_SEQ);
+
+	}
+
+	function STATEMENT()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_STATEMENT);
+
+	}
+
+	function RDF_LIST()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_LIST);
+
+	}
+
+	function NIL()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_NIL);
+
+	}
+
+	function TYPE()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_TYPE);
+
+	}
+
+	function REST()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_REST);
+
+	}
+
+	function FIRST()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_FIRST);
+
+	}
+
+	function SUBJECT()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_SUBJECT);
+
+	}
+
+	function PREDICATE()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_PREDICATE);
+
+	}
+
+	function OBJECT()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_OBJECT);
+
+	}
+
+	function DESCRIPTION()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_DESCRIPTION);
+
+	}
+
+	function ID()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_ID);
+
+	}
+
+	function ABOUT()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_ABOUT);
+
+	}
+
+	function ABOUT_EACH()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_ABOUT_EACH);
+
+	}
+
+	function ABOUT_EACH_PREFIX()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_ABOUT_EACH_PREFIX);
+
+	}
+
+	function BAG_ID()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_BAG_ID);
+
+	}
+
+	function RESOURCE()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_RESOURCE);
+
+	}
+
+	function PARSE_TYPE()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE);
+
+	}
+
+	function LITERAL()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE_LITERAL);
+
+	}
+
+	function PARSE_TYPE_RESOURCE()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE_RESOURCE);
+
+	}
+
+	function LI()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_LI);
+
+	}
+
+	function NODE_ID()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_NODEID);
+
+	}
+
+	function DATATYPE()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_DATATYPE);
+
+	}
+
+	function SEE_ALSO()
+	{
+		return  new Resource(RDF_NAMESPACE_URI . RDF_SEEALSO);
+	}
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RDF_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RDF_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RDF_RES.php	(revision 225)
@@ -0,0 +1,182 @@
+<?php
+/**
+*   Resource Description Framework (RDF) Vocabulary (ResResource)
+*
+*   @version $Id: RDF_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   Resource Description Framework (RDF).
+*   For details about RDF see: http://www.w3.org/RDF/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class RDF_RES{
+
+	// RDF concepts (constants are defined in constants.php)
+	function ALT()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_ALT);
+
+	}
+
+	function BAG()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_BAG);
+
+	}
+
+	function PROPERTY()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_PROPERTY);
+
+	}
+
+	function SEQ()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_SEQ);
+
+	}
+
+	function STATEMENT()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_STATEMENT);
+
+	}
+
+	function RDF_LIST()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_LIST);
+
+	}
+
+	function NIL()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_NIL);
+
+	}
+
+	function TYPE()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_TYPE);
+
+	}
+
+	function REST()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_REST);
+
+	}
+
+	function FIRST()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_FIRST);
+
+	}
+
+	function SUBJECT()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_SUBJECT);
+
+	}
+
+	function PREDICATE()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_PREDICATE);
+
+	}
+
+	function OBJECT()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_OBJECT);
+
+	}
+
+	function DESCRIPTION()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_DESCRIPTION);
+
+	}
+
+	function ID()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_ID);
+
+	}
+
+	function ABOUT()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_ABOUT);
+
+	}
+
+	function ABOUT_EACH()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_ABOUT_EACH);
+
+	}
+
+	function ABOUT_EACH_PREFIX()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_ABOUT_EACH_PREFIX);
+
+	}
+
+	function BAG_ID()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_BAG_ID);
+
+	}
+
+	function RESOURCE()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_RESOURCE);
+
+	}
+
+	function PARSE_TYPE()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE);
+
+	}
+
+	function LITERAL()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE_LITERAL);
+
+	}
+
+	function PARSE_TYPE_RESOURCE()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_PARSE_TYPE_RESOURCE);
+
+	}
+
+	function LI()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_LI);
+
+	}
+
+	function NODE_ID()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_NODEID);
+
+	}
+
+	function DATATYPE()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_DATATYPE);
+
+	}
+
+	function SEE_ALSO()
+	{
+		return  new ResResource(RDF_NAMESPACE_URI . RDF_SEEALSO);
+	}
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RSS.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RSS.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RSS.php	(revision 225)
@@ -0,0 +1,34 @@
+<?php
+/**
+*   RSS Vocabulary
+*
+*   @version $Id: RSS.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of
+*   RSS.
+*   For details about RSS see: http://purl.org/rss/1.0/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+// RSS concepts
+$RSS_channel = new Resource(RSS_NS . 'channel');
+$RSS_image = new Resource(RSS_NS . 'image');
+$RSS_item = new Resource(RSS_NS . 'item');
+$RSS_textinput = new Resource(RSS_NS . 'textinput');
+
+$RSS_items = new Resource(RSS_NS . 'items');
+$RSS_title = new Resource(RSS_NS . 'title');
+$RSS_link = new Resource(RSS_NS . 'link');
+$RSS_url = new Resource(RSS_NS . 'url');
+$RSS_description = new Resource(RSS_NS . 'description');
+$RSS_name = new Resource(RSS_NS . 'name');
+
+
+
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RSS_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RSS_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RSS_C.php	(revision 225)
@@ -0,0 +1,80 @@
+<?php
+/**
+*   RSS Vocabulary (Resource)
+*
+*   @version $Id: RSS_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of
+*   RSS.
+*   For details about RSS see: http://purl.org/rss/1.0/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class RSS{
+
+	function CHANNEL()
+	{
+		return  new Resource(RSS_NS . 'channel');
+
+	}
+
+	function IMAGE()
+	{
+		return  new Resource(RSS_NS . 'image');
+
+	}
+
+	function ITEM()
+	{
+		return  new Resource(RSS_NS . 'item');
+
+	}
+
+	function TEXTINPUT()
+	{
+		return  new Resource(RSS_NS . 'textinput');
+
+	}
+
+	function ITEMS()
+	{
+		return  new Resource(RSS_NS . 'items');
+
+	}
+
+	function TITLE()
+	{
+		return  new Resource(RSS_NS . 'title');
+
+	}
+
+	function LINK()
+	{
+		return  new Resource(RSS_NS . 'link');
+
+	}
+
+	function URL()
+	{
+		return  new Resource(RSS_NS . 'url');
+
+	}
+
+	function DESCRIPTION()
+	{
+		return  new Resource(RSS_NS . 'description');
+
+	}
+
+	function NAME()
+	{
+		return  new Resource(RSS_NS . 'name');
+	}
+}
+
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/RSS_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/RSS_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/RSS_RES.php	(revision 225)
@@ -0,0 +1,79 @@
+<?php
+/**
+*   RSS Vocabulary (ResResource)
+*
+*   @version $Id: RSS_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ (tobias.gauss@web.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of
+*   RSS.
+*   For details about RSS see: http://purl.org/rss/1.0/.
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class RSS_RES{
+
+	function CHANNEL()
+	{
+		return  new ResResource(RSS_NS . 'channel');
+
+	}
+
+	function IMAGE()
+	{
+		return  new ResResource(RSS_NS . 'image');
+
+	}
+
+	function ITEM()
+	{
+		return  new ResResource(RSS_NS . 'item');
+
+	}
+
+	function TEXTINPUT()
+	{
+		return  new ResResource(RSS_NS . 'textinput');
+
+	}
+
+	function ITEMS()
+	{
+		return  new ResResource(RSS_NS . 'items');
+
+	}
+
+	function TITLE()
+	{
+		return  new ResResource(RSS_NS . 'title');
+
+	}
+
+	function LINK()
+	{
+		return  new ResResource(RSS_NS . 'link');
+
+	}
+
+	function URL()
+	{
+		return  new ResResource(RSS_NS . 'url');
+
+	}
+
+	function DESCRIPTION()
+	{
+		return  new ResResource(RSS_NS . 'description');
+
+	}
+
+	function NAME()
+	{
+		return  new ResResource(RSS_NS . 'name');
+	}
+}
+
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/VCARD.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/VCARD.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/VCARD.php	(revision 225)
@@ -0,0 +1,66 @@
+<?php
+/**
+*   vCard profile defined by RFC 2426 - Vocabulary
+*
+*   @version $Id: VCARD.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   vCard Vocabulary.
+*   For details about vCard see: http://www.w3.org/TR/vcard-rdf .
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+
+// VCARD concepts
+$VCARD_UID = new Resource(VCARD_NS.'UID');
+$VCARD_ORGPROPERTIES = new Resource(VCARD_NS . 'ORGPROPERTIES');
+$VCARD_ADRTYPES = new Resource(VCARD_NS . 'ADRTYPES');
+$VCARD_NPROPERTIES = new Resource(VCARD_NS . 'NPROPERTIES');
+$VCARD_EMAILTYPES = new Resource(VCARD_NS . 'EMAILTYPES');
+$VCARD_TELTYPES = new Resource(VCARD_NS . 'TELTYPES');
+$VCARD_ADRPROPERTIES = new Resource(VCARD_NS . 'ADRPROPERTIES');
+$VCARD_TZTYPES = new Resource(VCARD_NS . 'TZTYPES');
+$VCARD_Street = new Resource(VCARD_NS . 'Street');
+$VCARD_AGENT = new Resource(VCARD_NS . 'AGENT');
+$VCARD_SOURCE = new Resource(VCARD_NS . 'SOURCE');
+$VCARD_BDAY = new Resource(VCARD_NS . 'BDAY');
+$VCARD_REV = new Resource(VCARD_NS . 'REV');
+$VCARD_SORT_STRING = new Resource(VCARD_NS . 'SORT_STRING');
+$VCARD_Orgname = new Resource(VCARD_NS . 'Orgname');
+$VCARD_CATEGORIES = new Resource(VCARD_NS . 'CATEGORIES');
+$VCARD_N = new Resource(VCARD_NS . 'N');
+$VCARD_Pcode = new Resource(VCARD_NS . 'Pcode');
+$VCARD_Prefix = new Resource(VCARD_NS . 'Prefix');
+$VCARD_PHOTO = new Resource(VCARD_NS . 'PHOTO');
+$VCARD_FN = new Resource(VCARD_NS . 'FN');
+$VCARD_Suffix = new Resource(VCARD_NS . 'Suffix');
+$VCARD_CLASS = new Resource(VCARD_NS . 'CLASS');
+$VCARD_ADR = new Resource(VCARD_NS . 'ADR');
+$VCARD_Region = new Resource(VCARD_NS . 'Region');
+$VCARD_GEO = new Resource(VCARD_NS . 'GEO');
+$VCARD_Extadd = new Resource(VCARD_NS . 'Extadd');
+$VCARD_GROUP = new Resource(VCARD_NS . 'GROUP');
+$VCARD_EMAIL = new Resource(VCARD_NS . 'EMAIL');
+$VCARD_Family = new Resource(VCARD_NS . 'Family');
+$VCARD_TZ = new Resource(VCARD_NS . 'TZ');
+$VCARD_NAME = new Resource(VCARD_NS . 'NAME');
+$VCARD_Orgunit = new Resource(VCARD_NS . 'Orgunit');
+$VCARD_Country = new Resource(VCARD_NS . 'Country');
+$VCARD_SOUND = new Resource(VCARD_NS . 'SOUND');
+$VCARD_TITLE = new Resource(VCARD_NS . 'TITLE');
+$VCARD_MAILER = new Resource(VCARD_NS . 'MAILER');
+$VCARD_Other = new Resource(VCARD_NS . 'Other');
+$VCARD_Locality = new Resource(VCARD_NS . 'Locality');
+$VCARD_Pobox = new Resource(VCARD_NS . 'Pobox');
+$VCARD_KEY = new Resource(VCARD_NS . 'KEY');
+$VCARD_PRODID = new Resource(VCARD_NS . 'PRODID');
+$VCARD_Given = new Resource(VCARD_NS . 'Given');
+$VCARD_LABEL = new Resource(VCARD_NS . 'LABEL');
+$VCARD_TEL = new Resource(VCARD_NS . 'TEL');
+$VCARD_NICKNAME = new Resource(VCARD_NS . 'NICKNAME');
+$VCARD_ROLE = new Resource(VCARD_NS . 'ROLE');
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/VCARD_C.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/VCARD_C.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/VCARD_C.php	(revision 225)
@@ -0,0 +1,301 @@
+<?php
+/**
+*   vCard profile defined by RFC 2426 - Vocabulary (Resource)
+*
+*   @version $Id: VCARD_C.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   vCard Vocabulary.
+*   For details about vCard see: http://www.w3.org/TR/vcard-rdf .
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class VCARD{
+
+	// VCARD concepts
+	function UID()
+	{
+		return  new Resource(VCARD_NS.'UID');
+
+	}
+
+	function ORGPROPERTIES()
+	{
+		return  new Resource(VCARD_NS . 'ORGPROPERTIES');
+
+	}
+
+	function ADRTYPES()
+	{
+		return  new Resource(VCARD_NS . 'ADRTYPES');
+
+	}
+
+	function NPROPERTIES()
+	{
+		return  new Resource(VCARD_NS . 'NPROPERTIES');
+
+	}
+
+	function EMAILTYPES()
+	{
+		return  new Resource(VCARD_NS . 'EMAILTYPES');
+
+	}
+
+	function TELTYPES()
+	{
+		return  new Resource(VCARD_NS . 'TELTYPES');
+
+	}
+
+	function ADRPROPERTIES()
+	{
+		return  new Resource(VCARD_NS . 'ADRPROPERTIES');
+
+	}
+
+	function TZTYPES()
+	{
+		return  new Resource(VCARD_NS . 'TZTYPES');
+
+	}
+
+	function STREET()
+	{
+		return  new Resource(VCARD_NS . 'Street');
+
+	}
+
+	function AGENT()
+	{
+		return  new Resource(VCARD_NS . 'AGENT');
+
+	}
+
+	function SOURCE()
+	{
+		return  new Resource(VCARD_NS . 'SOURCE');
+
+	}
+
+	function BDAY()
+	{
+		return  new Resource(VCARD_NS . 'BDAY');
+
+	}
+
+	function REV()
+	{
+		return  new Resource(VCARD_NS . 'REV');
+
+	}
+
+	function SORT_STRING()
+	{
+		return  new Resource(VCARD_NS . 'SORT_STRING');
+
+	}
+
+	function ORGNAME()
+	{
+		return  new Resource(VCARD_NS . 'Orgname');
+
+	}
+
+	function CATEGORIES()
+	{
+		return  new Resource(VCARD_NS . 'CATEGORIES');
+
+	}
+
+	function N()
+	{
+		return  new Resource(VCARD_NS . 'N');
+
+	}
+
+	function PCODE()
+	{
+		return  new Resource(VCARD_NS . 'Pcode');
+
+	}
+
+	function PREFIX()
+	{
+		return  new Resource(VCARD_NS . 'Prefix');
+
+	}
+
+	function PHOTO()
+	{
+		return  new Resource(VCARD_NS . 'PHOTO');
+
+	}
+
+	function FN()
+	{
+		return  new Resource(VCARD_NS . 'FN');
+
+	}
+
+	function SUFFIX()
+	{
+		return  new Resource(VCARD_NS . 'Suffix');
+
+	}
+
+	function VCARD_CLASS()
+	{
+		return  new Resource(VCARD_NS . 'CLASS');
+
+	}
+
+	function ADR()
+	{
+		return  new Resource(VCARD_NS . 'ADR');
+
+	}
+
+	function REGION()
+	{
+		return  new Resource(VCARD_NS . 'Region');
+
+	}
+
+	function GEO()
+	{
+		return  new Resource(VCARD_NS . 'GEO');
+
+	}
+
+	function EXTADD()
+	{
+		return  new Resource(VCARD_NS . 'Extadd');
+
+	}
+
+	function GROUP()
+	{
+		return  new Resource(VCARD_NS . 'GROUP');
+
+	}
+
+	function EMAIL()
+	{
+		return  new Resource(VCARD_NS . 'EMAIL');
+
+	}
+
+	function FAMILY()
+	{
+		return  new Resource(VCARD_NS . 'Family');
+
+	}
+
+	function TZ()
+	{
+		return  new Resource(VCARD_NS . 'TZ');
+
+	}
+
+	function NAME()
+	{
+		return  new Resource(VCARD_NS . 'NAME');
+
+	}
+
+	function ORGUNIT()
+	{
+		return  new Resource(VCARD_NS . 'Orgunit');
+
+	}
+
+	function COUNTRY()
+	{
+		return  new Resource(VCARD_NS . 'Country');
+
+	}
+
+	function SOUND()
+	{
+		return  new Resource(VCARD_NS . 'SOUND');
+
+	}
+
+	function TITLE()
+	{
+		return  new Resource(VCARD_NS . 'TITLE');
+
+	}
+
+	function MAILER()
+	{
+		return  new Resource(VCARD_NS . 'MAILER');
+
+	}
+
+	function OTHER()
+	{
+		return  new Resource(VCARD_NS . 'Other');
+
+	}
+
+	function LOCALITY()
+	{
+		return  new Resource(VCARD_NS . 'Locality');
+
+	}
+
+	function POBOX()
+	{
+		return  new Resource(VCARD_NS . 'Pobox');
+
+	}
+
+	function KEY()
+	{
+		return  new Resource(VCARD_NS . 'KEY');
+
+	}
+
+	function PRODID()
+	{
+		return  new Resource(VCARD_NS . 'PRODID');
+
+	}
+
+	function GIVEN()
+	{
+		return  new Resource(VCARD_NS . 'Given');
+
+	}
+
+	function LABEL()
+	{
+		return  new Resource(VCARD_NS . 'LABEL');
+
+	}
+
+	function TEL()
+	{
+		return  new Resource(VCARD_NS . 'TEL');
+
+	}
+
+	function NICKNAME()
+	{
+		return  new Resource(VCARD_NS . 'NICKNAME');
+
+	}
+
+	function ROLE()
+	{
+		return  new Resource(VCARD_NS . 'ROLE');
+	}
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/VCARD_RES.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/VCARD_RES.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/VCARD_RES.php	(revision 225)
@@ -0,0 +1,302 @@
+<?php
+/**
+*   vCard profile defined by RFC 2426 - Vocabulary (ResResource)
+*
+*   @version $Id: VCARD_RES.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Daniel Westphal (dawe@gmx.de)
+*   @package vocabulary
+*
+*   Wrapper, defining resources for all terms of the
+*   vCard Vocabulary.
+*   For details about vCard see: http://www.w3.org/TR/vcard-rdf .
+*   Using the wrapper allows you to define all aspects of
+*   the vocabulary in one spot, simplifing implementation and
+*   maintainence.
+*/
+class VCARD_RES{
+
+	// VCARD concepts
+	function UID()
+	{
+		return  new ResResource(VCARD_NS.'UID');
+
+	}
+
+	function ORGPROPERTIES()
+	{
+		return  new ResResource(VCARD_NS . 'ORGPROPERTIES');
+
+	}
+
+	function ADRTYPES()
+	{
+		return  new ResResource(VCARD_NS . 'ADRTYPES');
+
+	}
+
+	function NPROPERTIES()
+	{
+		return  new ResResource(VCARD_NS . 'NPROPERTIES');
+
+	}
+
+	function EMAILTYPES()
+	{
+		return  new ResResource(VCARD_NS . 'EMAILTYPES');
+
+	}
+
+	function TELTYPES()
+	{
+		return  new ResResource(VCARD_NS . 'TELTYPES');
+
+	}
+
+	function ADRPROPERTIES()
+	{
+		return  new ResResource(VCARD_NS . 'ADRPROPERTIES');
+
+	}
+
+	function TZTYPES()
+	{
+		return  new ResResource(VCARD_NS . 'TZTYPES');
+
+	}
+
+	function STREET()
+	{
+		return  new ResResource(VCARD_NS . 'Street');
+
+	}
+
+	function AGENT()
+	{
+		return  new ResResource(VCARD_NS . 'AGENT');
+
+	}
+
+	function SOURCE()
+	{
+		return  new ResResource(VCARD_NS . 'SOURCE');
+
+	}
+
+	function BDAY()
+	{
+		return  new ResResource(VCARD_NS . 'BDAY');
+
+	}
+
+	function REV()
+	{
+		return  new ResResource(VCARD_NS . 'REV');
+
+	}
+
+	function SORT_STRING()
+	{
+		return  new ResResource(VCARD_NS . 'SORT_STRING');
+
+	}
+
+	function ORGNAME()
+	{
+		return  new ResResource(VCARD_NS . 'Orgname');
+
+	}
+
+	function CATEGORIES()
+	{
+		return  new ResResource(VCARD_NS . 'CATEGORIES');
+
+	}
+
+	function N()
+	{
+		return  new ResResource(VCARD_NS . 'N');
+
+	}
+
+	function PCODE()
+	{
+		return  new ResResource(VCARD_NS . 'Pcode');
+
+	}
+
+	function PREFIX()
+	{
+		return  new ResResource(VCARD_NS . 'Prefix');
+
+	}
+
+	function PHOTO()
+	{
+		return  new ResResource(VCARD_NS . 'PHOTO');
+
+	}
+
+	function FN()
+	{
+		return  new ResResource(VCARD_NS . 'FN');
+
+	}
+
+	function SUFFIX()
+	{
+		return  new ResResource(VCARD_NS . 'Suffix');
+
+	}
+
+	function VCARD_CLASS()
+	{
+		return  new ResResource(VCARD_NS . 'CLASS');
+
+	}
+
+	function ADR()
+	{
+		return  new ResResource(VCARD_NS . 'ADR');
+
+	}
+
+	function REGION()
+	{
+		return  new ResResource(VCARD_NS . 'Region');
+
+	}
+
+	function GEO()
+	{
+		return  new ResResource(VCARD_NS . 'GEO');
+
+	}
+
+	function EXTADD()
+	{
+		return  new ResResource(VCARD_NS . 'Extadd');
+
+	}
+
+	function GROUP()
+	{
+		return  new ResResource(VCARD_NS . 'GROUP');
+
+	}
+
+	function EMAIL()
+	{
+		return  new ResResource(VCARD_NS . 'EMAIL');
+
+	}
+
+	function FAMILY()
+	{
+		return  new ResResource(VCARD_NS . 'Family');
+
+	}
+
+	function TZ()
+	{
+		return  new ResResource(VCARD_NS . 'TZ');
+
+	}
+
+	function NAME()
+	{
+		return  new ResResource(VCARD_NS . 'NAME');
+
+	}
+
+	function ORGUNIT()
+	{
+		return  new ResResource(VCARD_NS . 'Orgunit');
+
+	}
+
+	function COUNTRY()
+	{
+		return  new ResResource(VCARD_NS . 'Country');
+
+	}
+
+	function SOUND()
+	{
+		return  new ResResource(VCARD_NS . 'SOUND');
+
+	}
+
+	function TITLE()
+	{
+		return  new ResResource(VCARD_NS . 'TITLE');
+
+	}
+
+	function MAILER()
+	{
+		return  new ResResource(VCARD_NS . 'MAILER');
+
+	}
+
+	function OTHER()
+	{
+		return  new ResResource(VCARD_NS . 'Other');
+
+	}
+
+	function LOCALITY()
+	{
+		return  new ResResource(VCARD_NS . 'Locality');
+
+	}
+
+	function POBOX()
+	{
+		return  new ResResource(VCARD_NS . 'Pobox');
+
+	}
+
+	function KEY()
+	{
+		return  new ResResource(VCARD_NS . 'KEY');
+
+	}
+
+	function PRODID()
+	{
+		return  new ResResource(VCARD_NS . 'PRODID');
+
+	}
+
+	function GIVEN()
+	{
+		return  new ResResource(VCARD_NS . 'Given');
+
+	}
+
+	function LABEL()
+	{
+		return  new ResResource(VCARD_NS . 'LABEL');
+
+	}
+
+	function TEL()
+	{
+		return  new ResResource(VCARD_NS . 'TEL');
+
+	}
+
+	function NICKNAME()
+	{
+		return  new ResResource(VCARD_NS . 'NICKNAME');
+
+	}
+
+	function ROLE()
+	{
+		return  new ResResource(VCARD_NS . 'ROLE');
+	}
+
+}
+
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/Vocabulary.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/Vocabulary.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/Vocabulary.php	(revision 225)
@@ -0,0 +1,19 @@
+<?php
+/**
+*   Vocabulary
+*
+*   @version $Id: Vocabulary.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ <tobias.gauss@web.de>
+*   @package vocabulary
+*
+*/
+
+// Include vocabularies
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS.php';
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/VocabularyClass.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/VocabularyClass.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/VocabularyClass.php	(revision 225)
@@ -0,0 +1,20 @@
+<?php
+/**
+*   Vocabulary
+*
+*   @version $Id: VocabularyClass.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ <tobias.gauss@web.de>
+*   @package vocabulary
+*
+*/
+
+// Include vocabularies
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/ATOM_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_C.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS_C.php';
+?>
Index: Dev/branches/Demo/rdfapi/vocabulary/VocabularyRes.php
===================================================================
--- Dev/branches/Demo/rdfapi/vocabulary/VocabularyRes.php	(revision 225)
+++ Dev/branches/Demo/rdfapi/vocabulary/VocabularyRes.php	(revision 225)
@@ -0,0 +1,21 @@
+<?php
+/**
+*   Vocabulary
+*
+*   @version $Id: VocabularyRes.php 431 2007-05-01 15:49:19Z cweiske $
+*   @author Tobias GauÃ <tobias.gauss@web.de>
+*   @package vocabulary
+*
+*/
+
+// Include vocabularies
+include_once RDFAPI_INCLUDE_DIR . PACKAGE_RESMODEL);
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/ATOM_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDF_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RDFS_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/OWL_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/DC_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/VCARD_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/FOAF_RES.php';
+require_once RDFAPI_INCLUDE_DIR . 'vocabulary/RSS_RES.php';
+?>
Index: Dev/branches/Demo/register.php
===================================================================
--- Dev/branches/Demo/register.php	(revision 225)
+++ Dev/branches/Demo/register.php	(revision 225)
@@ -0,0 +1,30 @@
+<?php require 'classes/master.php'; //should be at top of every page    ?>
+
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title>Facilitator</title>
+        <?php new StyleSheet("awesome"); ?>
+        <script type="text/javascript" src="js/menu.js"></script>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+            <div id="content">
+                <div class="menu">
+                    <form action="index.php" method="POST"><br/>
+                        <h3>Username</h3>
+                        <input type="text" name="username"><br/>
+                        <h3>Password</h3>
+                        <input type="password" name="password"><br/><br/>
+                        <input type="submit" name="register" class="bigSurveyButton surveyButton" value="Register">
+                    </form>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/returnObjectDisplay.php
===================================================================
--- Dev/branches/Demo/returnObjectDisplay.php	(revision 225)
+++ Dev/branches/Demo/returnObjectDisplay.php	(revision 225)
@@ -0,0 +1,53 @@
+<?php
+
+require 'classes/master.php';
+
+/* 
+ * Note: do not try to implement info panel displays in this file as well, it passes and queries a lot of data that you really do not need.
+ * Since this function will be used so often, adding extra unneeded code to it will slow down the regular operation of the editor (refreshes, etc..) while not offering a significant advantage over the existing getInfo.php
+ */
+
+
+if(isset($_POST['args']) && !empty($_POST['args'])) {
+    // Get arguments and convert to object
+    $input = $_POST['args'];
+    $requestArray = json_decode($input);
+} else {
+    die('DOESNT WORK...');
+}
+
+$dbi = new DatabaseInterface();
+$outputArray = array();
+foreach ($requestArray as $request) {
+    
+    //!!! DEZE SHIT MOET WEER TERUGGEDRAAID WORDEN ZODRA QUESTIONS WEER GEWOON UIDS HEBBEN IPV CODES!
+    if ($request->type == "Question"){
+    $results = $dbi->get($request->type, array("code" => $request->uid));
+    // Bottom line, werkt prima. Questions werken nu op ns1:question_code, accessible als question->code
+    }
+    else {
+        $results =  $dbi->get($request->type, array("uid"=>$request->uid));
+    }
+    if (isset($results) && !empty($results)) {
+        is_array($results) ? $object = $results[0] : $object = $results;
+    }
+    // We now have the targeted object loaded in memory
+    // First add all shared properties
+    $objectProperties = array(
+        "uid" => $object->uid,
+        "title" => $object->title,
+        "type" => get_class($object),
+        "description" => $object->description
+    );
+    // Then add object-specific properties? (E.G. pipeline for sessions, answertype for questions, age for respondents)
+    // Nothing so far, though, because data structure changes all the time...
+    // Then add the resulting array to the outputArray
+    $outputArray[] = $objectProperties;
+}
+
+
+// Encode the output array in JSON format, then send back to the client
+$output = json_encode($outputArray);
+
+die($output);
+?>
Index: Dev/branches/Demo/saveSurvey.php
===================================================================
--- Dev/branches/Demo/saveSurvey.php	(revision 225)
+++ Dev/branches/Demo/saveSurvey.php	(revision 225)
@@ -0,0 +1,45 @@
+<?php
+
+require 'classes/master.php';
+
+// Quit if no arguments have been passed.
+if (!isset($_POST['args'])) {
+    if (empty($_POST['args'])) {
+        die("Error! No arguments passed!");
+    }
+}
+
+$args = json_decode($_POST['args']);
+if ($args == false) {
+    die("Error decoding JSON arguments!");
+}
+
+// At this point we know we have arguments in the POST data.
+// Query the survey object from the database.
+
+$dbi = new DatabaseInterface();
+$survey_results = $dbi->get("Survey", array("uid" => $args->uid));
+if (!empty($survey_results)) {
+    $survey = $survey_results[0];
+} else {
+    die("No survey found!");
+}
+
+$question->questions = array();
+foreach ($args->questions->uids as $questionUid) {
+    $question_results = $dbi->get("Question", array("code"=>$questionUid));
+    $question = $question_results[0];
+    $survey->questions[] = $question;
+}
+
+// The next part is a rather experimental way of automatically writing all passed arguments to the session object.
+// If this does not work properly, we should write the "write title to session->title" call by hand.
+/*
+  foreach ($args as $key=>$value) {
+  $session->$key = $value;
+  }
+ */
+var_dump($survey);
+// Do I need to check if this is done before proceeding?
+$dbi->set($survey);
+?>
Index: Dev/branches/Demo/savesession.php
===================================================================
--- Dev/branches/Demo/savesession.php	(revision 225)
+++ Dev/branches/Demo/savesession.php	(revision 225)
@@ -0,0 +1,46 @@
+<?php
+
+require 'classes/master.php'; //should be at top of every page
+
+/*
+ * Dit kan een STUK sneller. Vervang gewoon de hele pipeline string met de lokale versie.
+ * Daarna: $session->eval
+ */
+
+if (isset($_POST['uids']) && isset($_POST['types']) && isset($_POST['sessionUid'])) {
+    if (!empty($_POST['uids']) && !empty($_POST['types']) && !empty($_POST['sessionUid'])) {
+        // user has passed a pipeline/type string from javascript in order to save the session.
+        $pl = explode(",", $_POST['uids']);
+        $t = explode(",", $_POST['types']);
+
+        $sessionUid = $_POST['sessionUid'];
+        //var_dump($t);
+        $dbi = new DatabaseInterface();
+        $session_results = $dbi->get("Session", array("uid" => $sessionUid));
+        if (count($session_results) > 0) {
+            $session = $session_results[0];
+        } else {
+            echo "!!!!!!!!!!!!!!!!!!!!!!NO SESSION FOUND!!!!!!!!!!!!!!!!!!!!";
+            die();
+        }
+        if (count($pl) == count($t)) {
+            $count = count($pl);
+        } else {
+            echo "!!!!!!!!!!!!!!!!!NON MATCHING ARGUMENTS PASSED!!!!!!!!!!!!!!!";
+            die();
+        }
+        
+        $session->pipeline = array();
+        for ($i = 0; $i < $count; $i++) {
+            $results = $dbi->get($t[$i], array("uid" => $pl[$i]));
+            if (count($results) > 0) {
+                $result = $results[0];
+            }
+            $session->pipeline[] = $result;
+        }
+
+        $dbi->set($session);
+        //var_dump($session);
+    }
+}
+?>
Index: Dev/branches/Demo/selectSession.php
===================================================================
--- Dev/branches/Demo/selectSession.php	(revision 225)
+++ Dev/branches/Demo/selectSession.php	(revision 225)
@@ -0,0 +1,120 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['userUid'])) {
+    redirect("index.php");
+}
+
+if (isset($_SESSION['message'])) {
+    echo $_SESSION['message'];
+    unset($_SESSION['message']);
+}
+
+$dbi = new DatabaseInterface();
+
+if (isset($_POST['createSession'])) {
+    //check if name is set
+    if (isset($_POST['newSessionName'])) {
+        // check if name is available
+        if (!empty($_POST['newSessionName'])) {
+            $session_results = $dbi->get("Session", array("title" => $_POST['newSessionName']));
+            if (count($session_results) == 0) {
+                // make new session!
+                unset($session_results);
+                $creators = $dbi->get("User", array("uid" => $_SESSION['userUid']));
+                $creator = $creators[0];
+                $session = new Session(null, $_POST['newSessionName'], $creator, new DateTime(), null, null);
+                $dbi->set($session);
+            } else {
+                $errorMessage[] = "A session with the name " . $_POST['newSessionName'] . " already exists!";
+            }
+        }
+    } else {
+        $errorMessage[] = "Please enter a name for the new session!";
+    }
+}
+
+if (isset($_POST['deleteSession'])) {
+    if (isset($_POST['sessionUID'])) {
+        //Kan de database al objecten verwijderen?
+    }
+}
+
+if (isset($_POST['editSession'])) {
+	var_dump($_POST);
+    if (isset($_POST['sessionUid'])) {
+        $session_results = $dbi->get("SESSION", array("uid" => $_POST['sessionUid']));
+		var_dump($session_results);
+        if (count($session_results) == 1 && $session_results[0] != null) {
+            // DEZE SESSION MOET UITEINDELIJK EEN POST WORDEN, WANNEER DEZE HELE PAGINA IS OVERGEZET IN JAVASCRIPT!
+            $_SESSION['currentSession'] = $_POST['sessionUid'];
+            $_SESSION['updateNeeded'] = "true";
+            redirect("sessionEditor.php");
+        }
+    }
+}
+
+//Get available sessions for current user
+//$sessions = $dbi->get("Session", array("creator"=>$_SESSION['username']));  //This does not work, session.php does not yet have a property 'creator'
+$sessions = $dbi->get("Session");  // Let's just load everything then...
+?>
+
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title>Select a session</title>
+        <?php new StyleSheet("awesome"); ?>
+        <script type="text/javascript" src="js/sequencerScripts.js"></script>
+        <script type="text/javascript" src="js/generalScripts.js"></script>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+            <div id="content">
+                <form action="selectSession.php" method="POST">
+                    <fieldset name="selectionMenu">
+                        <!-- onchange van volgende select linkt deze aan de ajax-based info panel, script staat in sequencerScripts.js -->
+                        <select name="sessionUid" style="float: left;" onChange="ajaxInfoRequest(this.value, document.getElementById('infoPanelContent'), 'Session');">
+                            <option value="" disabled="true" selected>Please select a session</option>
+                            <?php
+                            foreach ($sessions as $session) {
+                                $selected = "";
+                                if ($session->title == $_POST['newSessionName']) {
+                                    $selected = ' selected="true"';
+                                }
+
+                                echo '<option value="' . $session->uid . '"' . $selected . '>' . $session->title . '</option>' . "\n";
+                            }
+                            ?>                    
+                        </select>
+                        <br /><br />
+                        <input type="hidden" name="updateNeeded" value="true" />
+                        <input type="text" name="newSessionName" value="Name..." style="float: left;" /><br />
+                        <input type="submit" name="createSession" value="Create new session" class="surveybutton" style="float: left;" />
+                        <input type="submit" name="editSession" value="Edit session" class="surveybutton" style="float: left;" />
+                        <input type="submit" name="deleteSession" value="Delete session" class="surveybutton" style="float: left;" />
+                        <br /><br /><br />
+                        <div id="errorDisplay"><?php
+                            if (isset($errorMessage)) {
+                                foreach ($errorMessage as $message) {
+                                    echo $message;
+                                }
+                            }
+                            ?></div>
+                    </fieldset>
+                    <fieldset id="sessionDescription">
+                        <div class="fieldsetTitle">
+                            Info
+                        </div>
+                        <div id="infoPanelContent">
+                        </div>
+                    </fieldset>
+                </form>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/sessionEditor.php
===================================================================
--- Dev/branches/Demo/sessionEditor.php	(revision 225)
+++ Dev/branches/Demo/sessionEditor.php	(revision 225)
@@ -0,0 +1,46 @@
+<?php
+require 'classes/master.php'; //should be at top of every page
+
+if (!isset($_SESSION['userUid'])) {
+    redirect('index.php');
+}
+
+$sequencer = new SessionEditorWidget();
+$sequencer->LoadSession(); //load session into php part of the sequencer
+$sequencer->HandlePostData();
+?>
+
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<!DOCTYPE html>
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title></title>
+        <?php
+        new StyleSheet("visualeditors");
+        $sequencer->Javascript();
+        ?>
+
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+            <div id="content">
+                <?php $sequencer->init(); ?>
+                <?php $toolbox = new Toolbox(); ?>
+                <?php new PipelineInfoPanel(); ?>
+            </div>
+        </div>
+        <div id="settingsFields">
+            <input type="hidden" id="sContentTypeField" value="session" />
+        </div>
+
+    </body>
+</html>
Index: Dev/branches/Demo/sessioncreation.php
===================================================================
--- Dev/branches/Demo/sessioncreation.php	(revision 225)
+++ Dev/branches/Demo/sessioncreation.php	(revision 225)
@@ -0,0 +1,41 @@
+<?php
+require 'classes/master.php';
+
+if (is_null($_SESSION['username']))
+    redirect('index.php');
+
+/* LOAD SURVEY */
+if (isset($_POST['UID'])) {
+    $sessionID = $_POST['UID'];
+    $sessionDBI = new SessionCreationDatabaseInterface($sessionID);
+    $info = $sessionDBI->getSessionInfo();
+}
+
+$session = Session::getSession($_POST);
+?>
+
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+            <title>Session Creation</title>
+            <?php new StyleSheet(); ?>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+        <div id="wrapper">
+
+            <div id="content">
+                <?php
+                    new SessionCreationTool($session);
+                ?>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/submitsurvey.php
===================================================================
--- Dev/branches/Demo/submitsurvey.php	(revision 225)
+++ Dev/branches/Demo/submitsurvey.php	(revision 225)
@@ -0,0 +1,6 @@
+<?php 
+require 'classes/master.php';
+
+var_dump($_POST);
+
+?>
Index: Dev/branches/Demo/survey.php
===================================================================
--- Dev/branches/Demo/survey.php	(revision 225)
+++ Dev/branches/Demo/survey.php	(revision 225)
@@ -0,0 +1,47 @@
+<?php
+require 'classes/master.php';
+
+    //var_dump($_POST);
+    
+if (is_null($_SESSION['username']))
+    redirect('index.php');
+
+if (isset($_GET['id']))
+{
+    $surveyID = $_GET['id'];
+
+    $surveyDBI = new SurveyAnswerDatabaseInterface($surveyID,'123','321');
+    $info = $surveyDBI->getSurveyInfo();
+    $surveyDBI->setRespondentInfo($_SESSION);
+    $surveyDBI->setSurveyAnswers($_POST);
+
+    $savedSurvey = Survey::getSurvey($info);
+    
+    var_dump($_POST);
+}
+else
+    redirect('index.php');
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+            <title>Survey</title>
+            <?php new StyleSheet(); ?>
+            <script type="text/javascript" src="js/menu.js"></script>
+    </head>
+
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+
+        <div id="wrapper">
+            <div id="content">
+                <?php new SurveyTool($savedSurvey); ?>
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/surveyEditor.php
===================================================================
--- Dev/branches/Demo/surveyEditor.php	(revision 225)
+++ Dev/branches/Demo/surveyEditor.php	(revision 225)
@@ -0,0 +1,32 @@
+<?php
+require "classes/master.php";
+
+$surveyEditor = new surveyEditorWidget();
+$surveyEditor->handlePost();
+?>
+
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <title>Edit survey</title>
+        <?php
+        $surveyEditor->javascript();
+        new StyleSheet("visualeditors");
+        ?>
+    </head>
+    <body>
+        <div id="wrapper">
+            <div id="content">
+                <?php $surveyEditor->init(); ?>
+            </div>
+            <div id="settingsFields">
+                <input type="hidden" id="sContentTypeField" value="Survey" />
+            </div>
+        </div>
+    </body>
+</html>
Index: Dev/branches/Demo/surveycreation.php
===================================================================
--- Dev/branches/Demo/surveycreation.php	(revision 225)
+++ Dev/branches/Demo/surveycreation.php	(revision 225)
@@ -0,0 +1,81 @@
+<?php
+require 'classes/master.php';
+
+if (is_null($_SESSION['username']))
+    redirect('index.php');
+
+if (isset($_POST['submit'])) {
+    if (isset($_POST['surveyName'])) {
+        $survey = new Survey(null, $_POST['surveyName'], "Thijs", null);
+        $dbi = new DatabaseInterface();
+        $dbi->set($survey);
+    }
+}
+
+
+
+
+/*
+  $savedSurvey = null;
+  $timeStamp = null;
+ */
+
+/* LOAD SURVEY */
+/*
+  if (isset($_POST['UID'])) {
+  $surveyID = $_POST['UID'];
+  $surveyDBI = new SurveyCreationDatabaseInterface($surveyID);
+  $info = $surveyDBI->getSurveyInfo();
+
+  $savedSurvey = Survey::getSurvey($info);
+  }
+ */
+/* AUTOSAVE */
+
+/*
+  else if (isset($_POST['timeStamp'])) {
+  $timeStamp = $_POST['timeStamp'];
+
+  echo 'This is what gets sent:';
+  var_dump($_POST);
+  echo '<br/><br/>';
+  $surveyDBI = new SurveyCreationDatabaseInterface($_POST['surveyID']);
+  $surveyDBI->setSurveyInfo($_POST,$_SESSION);
+  $info = $surveyDBI->getSurveyInfo();
+  echo '<br/><br/>';
+  echo 'This is what I get back:';
+  var_dump($info);
+
+  $savedSurvey = Survey::getSurvey($info);
+  }
+
+ */
+?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <title>Survey Creation</title>
+        <?php new StyleSheet("awesome"); ?>
+    </head>
+    <body>
+        <div id="header">
+            <?php new Logo(); ?>
+        </div>
+        <div id="wrapper">
+
+            <div id="content">
+                <form action="surveycreation.php" method="post">
+                    <fieldset>
+                    Name: <input type="text" name="surveyName" /><br />
+                    Uid: <input type="text" name="surveyID" /><br /><br />
+                    <input type="submit" name="submit" value="Make fake survey!" />
+                    </fieldset>
+                </form>
+            </div>
+        </div>
+    </body>
+</html>
